summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile75
-rw-r--r--SConstruct51
-rwxr-xr-xbin/mklib16
-rw-r--r--common.py36
-rw-r--r--configs/autoconf.in34
-rw-r--r--configs/default22
-rw-r--r--configs/freebsd-dri4
-rw-r--r--configs/linux-dri4
-rw-r--r--configs/linux-dri-xcb4
-rw-r--r--configs/linux-egl4
-rw-r--r--configs/linux-indirect3
-rw-r--r--configs/linux-llvm10
-rw-r--r--configure.ac259
-rw-r--r--docs/GL3.txt25
-rw-r--r--docs/MESA_multithread_makecurrent.spec158
-rw-r--r--docs/README.WIN3216
-rw-r--r--docs/WL_bind_wayland_display.spec92
-rw-r--r--docs/egl.html59
-rw-r--r--docs/envvars.html103
-rw-r--r--docs/news.html9
-rw-r--r--docs/opengles.html4
-rw-r--r--docs/relnotes-7.10.1.html380
-rw-r--r--docs/relnotes-7.10.html2753
-rw-r--r--docs/relnotes-7.11.html62
-rw-r--r--docs/relnotes-7.9.1.html406
-rw-r--r--docs/relnotes-7.9.2.html336
-rw-r--r--docs/relnotes.html5
-rw-r--r--docs/shading.html2
-rw-r--r--docs/sourcetree.html1
-rw-r--r--doxygen/.gitignore1
-rw-r--r--doxygen/Makefile1
-rw-r--r--doxygen/glsl.doxy39
-rw-r--r--doxygen/header.html1
-rw-r--r--include/EGL/eglext.h22
-rw-r--r--include/EGL/eglplatform.h6
-rw-r--r--include/GL/gl_mangle.h332
-rw-r--r--include/GL/glext.h14
-rw-r--r--include/GL/internal/dri_interface.h27
-rw-r--r--scons/crossmingw.py3
-rw-r--r--scons/custom.py2
-rwxr-xr-x[-rw-r--r--]scons/gallium.py52
-rw-r--r--scons/llvm.py4
-rw-r--r--scons/udis86.py44
-rw-r--r--src/Android.mk111
-rw-r--r--src/SConscript21
-rw-r--r--src/egl/Android.mk51
-rw-r--r--src/egl/Makefile7
-rw-r--r--src/egl/drivers/Makefile.template30
-rw-r--r--src/egl/drivers/android/droid.c223
-rw-r--r--src/egl/drivers/android/droid.h3
-rw-r--r--src/egl/drivers/android/droid_core.c26
-rw-r--r--src/egl/drivers/android/egl_android.c2
-rw-r--r--src/egl/drivers/dri2/Makefile22
-rw-r--r--src/egl/drivers/dri2/egl_dri2.c1873
-rw-r--r--src/egl/drivers/dri2/egl_dri2.h199
-rw-r--r--src/egl/drivers/dri2/platform_drm.c737
-rw-r--r--src/egl/drivers/dri2/platform_wayland.c707
-rw-r--r--src/egl/drivers/dri2/platform_x11.c1085
-rw-r--r--src/egl/drivers/glx/Makefile7
-rw-r--r--src/egl/drivers/glx/egl_glx.c359
-rw-r--r--src/egl/main/Makefile24
-rw-r--r--src/egl/main/SConscript30
-rw-r--r--src/egl/main/eglapi.c70
-rw-r--r--src/egl/main/eglapi.h20
-rw-r--r--src/egl/main/eglcurrent.c5
-rw-r--r--src/egl/main/egldisplay.c1
-rw-r--r--src/egl/main/egldisplay.h44
-rw-r--r--src/egl/main/egldriver.c361
-rw-r--r--src/egl/main/egldriver.h28
-rw-r--r--src/egl/main/eglmisc.c36
-rw-r--r--src/egl/main/eglstring.h1
-rw-r--r--src/egl/wayland/Makefile30
-rw-r--r--src/egl/wayland/wayland-drm/.gitignore3
-rw-r--r--src/egl/wayland/wayland-drm/Makefile45
-rw-r--r--src/egl/wayland/wayland-drm/protocol/wayland-drm.xml38
-rw-r--r--src/egl/wayland/wayland-drm/wayland-drm.c203
-rw-r--r--src/egl/wayland/wayland-drm/wayland-drm.h26
-rw-r--r--src/egl/wayland/wayland-egl/Makefile71
-rw-r--r--src/egl/wayland/wayland-egl/wayland-egl-priv.h60
-rw-r--r--src/egl/wayland/wayland-egl/wayland-egl.c226
-rw-r--r--src/egl/wayland/wayland-egl/wayland-egl.pc.in12
-rw-r--r--src/gallium/SConscript13
-rw-r--r--src/gallium/auxiliary/Android.mk6
-rw-r--r--src/gallium/auxiliary/Makefile8
-rw-r--r--src/gallium/auxiliary/SConscript9
-rw-r--r--src/gallium/auxiliary/cso_cache/cso_context.c665
-rw-r--r--src/gallium/auxiliary/cso_cache/cso_context.h7
-rw-r--r--src/gallium/auxiliary/draw/draw_context.c27
-rw-r--r--src/gallium/auxiliary/draw/draw_llvm.c46
-rw-r--r--src/gallium/auxiliary/draw/draw_llvm.h6
-rw-r--r--src/gallium/auxiliary/draw/draw_pipe.c4
-rw-r--r--src/gallium/auxiliary/draw/draw_pipe_aaline.c18
-rw-r--r--src/gallium/auxiliary/draw/draw_pipe_aapoint.c2
-rw-r--r--src/gallium/auxiliary/draw/draw_pipe_pstipple.c41
-rw-r--r--src/gallium/auxiliary/draw/draw_pipe_validate.c5
-rw-r--r--src/gallium/auxiliary/draw/draw_private.h1
-rw-r--r--src/gallium/auxiliary/draw/draw_pt.c3
-rw-r--r--src/gallium/auxiliary/draw/draw_pt_fetch.c4
-rw-r--r--src/gallium/auxiliary/draw/draw_pt_fetch_emit.c2
-rw-r--r--src/gallium/auxiliary/draw/draw_pt_fetch_shade_emit.c8
-rw-r--r--src/gallium/auxiliary/draw/draw_pt_vsplit_tmp.h3
-rw-r--r--src/gallium/auxiliary/draw/draw_vs.c40
-rw-r--r--src/gallium/auxiliary/draw/draw_vs.h73
-rw-r--r--src/gallium/auxiliary/draw/draw_vs_aos.c50
-rw-r--r--src/gallium/auxiliary/draw/draw_vs_aos.h10
-rw-r--r--src/gallium/auxiliary/draw/draw_vs_aos_io.c4
-rw-r--r--src/gallium/auxiliary/draw/draw_vs_exec.c8
-rw-r--r--src/gallium/auxiliary/draw/draw_vs_llvm.c14
-rw-r--r--src/gallium/auxiliary/draw/draw_vs_ppc.c4
-rw-r--r--src/gallium/auxiliary/draw/draw_vs_sse.c13
-rw-r--r--src/gallium/auxiliary/draw/draw_vs_varient.c32
-rw-r--r--src/gallium/auxiliary/gallivm/lp_bld_const.h18
-rw-r--r--src/gallium/auxiliary/gallivm/lp_bld_conv.c59
-rw-r--r--src/gallium/auxiliary/gallivm/lp_bld_debug.c141
-rw-r--r--src/gallium/auxiliary/gallivm/lp_bld_debug.cpp357
-rw-r--r--src/gallium/auxiliary/gallivm/lp_bld_debug.h10
-rw-r--r--src/gallium/auxiliary/gallivm/lp_bld_format_aos.c81
-rw-r--r--src/gallium/auxiliary/gallivm/lp_bld_init.c60
-rw-r--r--src/gallium/auxiliary/gallivm/lp_bld_misc.cpp62
-rw-r--r--src/gallium/auxiliary/gallivm/lp_bld_sample_aos.c2
-rw-r--r--src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c25
-rw-r--r--src/gallium/auxiliary/gallivm/lp_bld_tgsi.h8
-rw-r--r--src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c73
-rw-r--r--src/gallium/auxiliary/os/os_thread.h3
-rw-r--r--src/gallium/auxiliary/pipebuffer/pb_buffer_malloc.c11
-rw-r--r--src/gallium/auxiliary/pipebuffer/pb_bufmgr.h4
-rw-r--r--src/gallium/auxiliary/pipebuffer/pb_bufmgr_cache.c17
-rw-r--r--src/gallium/auxiliary/rbug/rbug_context.c4
-rw-r--r--src/gallium/auxiliary/rbug/rbug_context.h2
-rw-r--r--src/gallium/auxiliary/rtasm/rtasm_x86sse.c3
-rw-r--r--src/gallium/auxiliary/target-helpers/inline_noop_helper.h51
-rw-r--r--src/gallium/auxiliary/tgsi/tgsi_build.c59
-rw-r--r--src/gallium/auxiliary/tgsi/tgsi_dump.c61
-rw-r--r--src/gallium/auxiliary/tgsi/tgsi_dump.h17
-rw-r--r--src/gallium/auxiliary/tgsi/tgsi_exec.c307
-rw-r--r--src/gallium/auxiliary/tgsi/tgsi_exec.h14
-rw-r--r--src/gallium/auxiliary/tgsi/tgsi_info.c15
-rw-r--r--src/gallium/auxiliary/tgsi/tgsi_opcode_tmp.h17
-rw-r--r--src/gallium/auxiliary/tgsi/tgsi_parse.c4
-rw-r--r--src/gallium/auxiliary/tgsi/tgsi_parse.h6
-rw-r--r--src/gallium/auxiliary/tgsi/tgsi_ppc.c4
-rw-r--r--src/gallium/auxiliary/tgsi/tgsi_sanity.c3
-rw-r--r--src/gallium/auxiliary/tgsi/tgsi_sanity.h6
-rw-r--r--src/gallium/auxiliary/tgsi/tgsi_scan.c19
-rw-r--r--src/gallium/auxiliary/tgsi/tgsi_scan.h4
-rw-r--r--src/gallium/auxiliary/tgsi/tgsi_sse2.c79
-rw-r--r--src/gallium/auxiliary/tgsi/tgsi_text.c187
-rw-r--r--src/gallium/auxiliary/tgsi/tgsi_text.h6
-rw-r--r--src/gallium/auxiliary/tgsi/tgsi_ureg.c107
-rw-r--r--src/gallium/auxiliary/tgsi/tgsi_ureg.h101
-rw-r--r--src/gallium/auxiliary/tgsi/tgsi_util.c7
-rw-r--r--src/gallium/auxiliary/translate/translate.c2
-rw-r--r--src/gallium/auxiliary/translate/translate_cache.c4
-rw-r--r--src/gallium/auxiliary/util/dbghelp.h1265
-rw-r--r--src/gallium/auxiliary/util/u_blit.c165
-rw-r--r--src/gallium/auxiliary/util/u_blitter.c135
-rw-r--r--src/gallium/auxiliary/util/u_blitter.h34
-rw-r--r--src/gallium/auxiliary/util/u_cache.c170
-rw-r--r--src/gallium/auxiliary/util/u_cache.h4
-rw-r--r--src/gallium/auxiliary/util/u_caps.c3
-rw-r--r--src/gallium/auxiliary/util/u_debug.c85
-rw-r--r--src/gallium/auxiliary/util/u_debug.h37
-rw-r--r--src/gallium/auxiliary/util/u_debug_refcnt.c12
-rw-r--r--src/gallium/auxiliary/util/u_debug_symbol.c95
-rw-r--r--src/gallium/auxiliary/util/u_draw_quad.c18
-rw-r--r--src/gallium/auxiliary/util/u_draw_quad.h5
-rw-r--r--src/gallium/auxiliary/util/u_dump_state.c1
-rw-r--r--src/gallium/auxiliary/util/u_format.csv10
-rw-r--r--src/gallium/auxiliary/util/u_format.h42
-rw-r--r--src/gallium/auxiliary/util/u_format_latc.c328
-rw-r--r--src/gallium/auxiliary/util/u_format_latc.h108
-rw-r--r--src/gallium/auxiliary/util/u_format_pack.py2
-rw-r--r--src/gallium/auxiliary/util/u_format_rgtc.c464
-rw-r--r--src/gallium/auxiliary/util/u_format_rgtc.h114
-rwxr-xr-xsrc/gallium/auxiliary/util/u_format_table.py4
-rw-r--r--src/gallium/auxiliary/util/u_gen_mipmap.c131
-rw-r--r--src/gallium/auxiliary/util/u_index_modify.c127
-rw-r--r--src/gallium/auxiliary/util/u_index_modify.h27
-rw-r--r--src/gallium/auxiliary/util/u_inlines.h59
-rw-r--r--src/gallium/auxiliary/util/u_math.h25
-rw-r--r--src/gallium/auxiliary/util/u_pstipple.c434
-rw-r--r--src/gallium/auxiliary/util/u_pstipple.h56
-rw-r--r--src/gallium/auxiliary/util/u_resource.c10
-rw-r--r--src/gallium/auxiliary/util/u_simple_screen.h3
-rw-r--r--src/gallium/auxiliary/util/u_surface.c2
-rw-r--r--src/gallium/auxiliary/util/u_tile.c81
-rw-r--r--src/gallium/auxiliary/util/u_tile.h24
-rw-r--r--src/gallium/auxiliary/util/u_transfer.c14
-rw-r--r--src/gallium/auxiliary/util/u_transfer.h24
-rw-r--r--src/gallium/auxiliary/util/u_upload_mgr.c168
-rw-r--r--src/gallium/auxiliary/util/u_upload_mgr.h54
-rw-r--r--src/gallium/auxiliary/util/u_vbuf_mgr.c609
-rw-r--r--src/gallium/auxiliary/util/u_vbuf_mgr.h121
-rw-r--r--src/gallium/docs/d3d11ddi.txt5
-rw-r--r--src/gallium/docs/source/context.rst125
-rw-r--r--src/gallium/docs/source/screen.rst3
-rw-r--r--src/gallium/docs/source/tgsi.rst239
-rw-r--r--src/gallium/drivers/cell/ppu/cell_context.c20
-rw-r--r--src/gallium/drivers/cell/ppu/cell_fence.c6
-rw-r--r--src/gallium/drivers/cell/ppu/cell_fence.h9
-rw-r--r--src/gallium/drivers/cell/ppu/cell_flush.c7
-rw-r--r--src/gallium/drivers/cell/ppu/cell_screen.c3
-rw-r--r--src/gallium/drivers/cell/ppu/cell_state_vertex.c7
-rw-r--r--src/gallium/drivers/failover/fo_context.c23
-rw-r--r--src/gallium/drivers/failover/fo_state.c8
-rw-r--r--src/gallium/drivers/galahad/glhd_context.c36
-rw-r--r--src/gallium/drivers/galahad/glhd_screen.c20
-rw-r--r--src/gallium/drivers/i915/TODO25
-rw-r--r--src/gallium/drivers/i915/i915_batch.h7
-rw-r--r--src/gallium/drivers/i915/i915_batchbuffer.h26
-rw-r--r--src/gallium/drivers/i915/i915_blit.c23
-rw-r--r--src/gallium/drivers/i915/i915_clear.c105
-rw-r--r--src/gallium/drivers/i915/i915_context.c76
-rw-r--r--src/gallium/drivers/i915/i915_context.h85
-rw-r--r--src/gallium/drivers/i915/i915_debug.c19
-rw-r--r--src/gallium/drivers/i915/i915_debug.h1
-rw-r--r--src/gallium/drivers/i915/i915_flush.c29
-rw-r--r--src/gallium/drivers/i915/i915_fpc_translate.c23
-rw-r--r--src/gallium/drivers/i915/i915_prim_emit.c5
-rw-r--r--src/gallium/drivers/i915/i915_prim_vbuf.c31
-rw-r--r--src/gallium/drivers/i915/i915_reg.h1
-rw-r--r--src/gallium/drivers/i915/i915_resource.c1
-rw-r--r--src/gallium/drivers/i915/i915_resource_buffer.c40
-rw-r--r--src/gallium/drivers/i915/i915_resource_texture.c49
-rw-r--r--src/gallium/drivers/i915/i915_screen.c114
-rw-r--r--src/gallium/drivers/i915/i915_screen.h20
-rw-r--r--src/gallium/drivers/i915/i915_state.c159
-rw-r--r--src/gallium/drivers/i915/i915_state.h1
-rw-r--r--src/gallium/drivers/i915/i915_state_derived.c1
-rw-r--r--src/gallium/drivers/i915/i915_state_dynamic.c69
-rw-r--r--src/gallium/drivers/i915/i915_state_emit.c702
-rw-r--r--src/gallium/drivers/i915/i915_state_fpc.c2
-rw-r--r--src/gallium/drivers/i915/i915_state_immediate.c68
-rw-r--r--src/gallium/drivers/i915/i915_state_static.c154
-rw-r--r--src/gallium/drivers/i915/i915_surface.c152
-rw-r--r--src/gallium/drivers/i915/i915_winsys.h16
-rw-r--r--src/gallium/drivers/i965/brw_batchbuffer.c4
-rw-r--r--src/gallium/drivers/i965/brw_batchbuffer.h5
-rw-r--r--src/gallium/drivers/i965/brw_clip.c6
-rw-r--r--src/gallium/drivers/i965/brw_clip.h2
-rw-r--r--src/gallium/drivers/i965/brw_clip_line.c14
-rw-r--r--src/gallium/drivers/i965/brw_clip_state.c4
-rw-r--r--src/gallium/drivers/i965/brw_clip_tri.c8
-rw-r--r--src/gallium/drivers/i965/brw_clip_util.c12
-rw-r--r--src/gallium/drivers/i965/brw_context.c9
-rw-r--r--src/gallium/drivers/i965/brw_context.h15
-rw-r--r--src/gallium/drivers/i965/brw_defines.h361
-rw-r--r--src/gallium/drivers/i965/brw_disasm.c179
-rw-r--r--src/gallium/drivers/i965/brw_disasm.h6
-rw-r--r--src/gallium/drivers/i965/brw_draw_upload.c14
-rw-r--r--src/gallium/drivers/i965/brw_eu_emit.c158
-rw-r--r--src/gallium/drivers/i965/brw_gs.c4
-rw-r--r--src/gallium/drivers/i965/brw_gs_state.c2
-rw-r--r--src/gallium/drivers/i965/brw_misc_state.c24
-rw-r--r--src/gallium/drivers/i965/brw_pipe_flush.c1
-rw-r--r--src/gallium/drivers/i965/brw_pipe_rast.c2
-rw-r--r--src/gallium/drivers/i965/brw_pipe_surface.c21
-rw-r--r--src/gallium/drivers/i965/brw_pipe_vertex.c24
-rw-r--r--src/gallium/drivers/i965/brw_reg.h52
-rw-r--r--src/gallium/drivers/i965/brw_resource_buffer.c20
-rw-r--r--src/gallium/drivers/i965/brw_resource_texture.c45
-rw-r--r--src/gallium/drivers/i965/brw_resource_texture_layout.c2
-rw-r--r--src/gallium/drivers/i965/brw_screen.c74
-rw-r--r--src/gallium/drivers/i965/brw_screen.h6
-rw-r--r--src/gallium/drivers/i965/brw_sf_emit.c4
-rw-r--r--src/gallium/drivers/i965/brw_sf_state.c4
-rw-r--r--src/gallium/drivers/i965/brw_state.h2
-rw-r--r--src/gallium/drivers/i965/brw_state_upload.c2
-rw-r--r--src/gallium/drivers/i965/brw_structs.h238
-rw-r--r--src/gallium/drivers/i965/brw_structs_dump.c2
-rw-r--r--src/gallium/drivers/i965/brw_urb.c4
-rw-r--r--src/gallium/drivers/i965/brw_vs.h1
-rw-r--r--src/gallium/drivers/i965/brw_vs_emit.c17
-rw-r--r--src/gallium/drivers/i965/brw_vs_state.c8
-rw-r--r--src/gallium/drivers/i965/brw_winsys.h4
-rw-r--r--src/gallium/drivers/i965/brw_winsys_debug.c6
-rw-r--r--src/gallium/drivers/i965/brw_wm_emit.c12
-rw-r--r--src/gallium/drivers/i965/brw_wm_fp.c2
-rw-r--r--src/gallium/drivers/i965/brw_wm_glsl.c6
-rw-r--r--src/gallium/drivers/i965/brw_wm_state.c10
-rw-r--r--src/gallium/drivers/i965/intel_decode.c563
-rw-r--r--src/gallium/drivers/i965/intel_decode.h4
-rw-r--r--src/gallium/drivers/i965/intel_structs.h2
-rw-r--r--src/gallium/drivers/identity/id_context.c34
-rw-r--r--src/gallium/drivers/identity/id_screen.c20
-rw-r--r--src/gallium/drivers/llvmpipe/README23
-rw-r--r--src/gallium/drivers/llvmpipe/SConscript9
-rw-r--r--src/gallium/drivers/llvmpipe/lp_bld_alpha.h2
-rw-r--r--src/gallium/drivers/llvmpipe/lp_bld_depth.h4
-rw-r--r--src/gallium/drivers/llvmpipe/lp_context.c7
-rw-r--r--src/gallium/drivers/llvmpipe/lp_fence.c3
-rw-r--r--src/gallium/drivers/llvmpipe/lp_flush.c47
-rw-r--r--src/gallium/drivers/llvmpipe/lp_flush.h2
-rw-r--r--src/gallium/drivers/llvmpipe/lp_jit.c2
-rw-r--r--src/gallium/drivers/llvmpipe/lp_perf.h1
-rw-r--r--src/gallium/drivers/llvmpipe/lp_query.c4
-rw-r--r--src/gallium/drivers/llvmpipe/lp_scene.c1
-rw-r--r--src/gallium/drivers/llvmpipe/lp_scene_queue.h2
-rw-r--r--src/gallium/drivers/llvmpipe/lp_screen.c24
-rw-r--r--src/gallium/drivers/llvmpipe/lp_setup.c22
-rw-r--r--src/gallium/drivers/llvmpipe/lp_setup.h1
-rw-r--r--src/gallium/drivers/llvmpipe/lp_state_fs.c21
-rw-r--r--src/gallium/drivers/llvmpipe/lp_state_setup.c2
-rw-r--r--src/gallium/drivers/llvmpipe/lp_state_vertex.c9
-rw-r--r--src/gallium/drivers/llvmpipe/lp_surface.c2
-rw-r--r--src/gallium/drivers/llvmpipe/lp_test_main.c13
-rw-r--r--src/gallium/drivers/llvmpipe/lp_texture.c6
-rw-r--r--src/gallium/drivers/llvmpipe/lp_texture.h10
-rw-r--r--src/gallium/drivers/noop/noop_pipe.c90
-rw-r--r--src/gallium/drivers/noop/noop_public.h5
-rw-r--r--src/gallium/drivers/noop/noop_state.c2
-rw-r--r--src/gallium/drivers/nouveau/Makefile6
-rw-r--r--src/gallium/drivers/nouveau/nouveau_buffer.c487
-rw-r--r--src/gallium/drivers/nouveau/nouveau_buffer.h139
-rw-r--r--src/gallium/drivers/nouveau/nouveau_context.h26
-rw-r--r--src/gallium/drivers/nouveau/nouveau_fence.c223
-rw-r--r--src/gallium/drivers/nouveau/nouveau_fence.h59
-rw-r--r--src/gallium/drivers/nouveau/nouveau_mm.c288
-rw-r--r--src/gallium/drivers/nouveau/nouveau_mm.h32
-rw-r--r--src/gallium/drivers/nouveau/nouveau_screen.c45
-rw-r--r--src/gallium/drivers/nouveau/nouveau_screen.h25
-rw-r--r--src/gallium/drivers/nouveau/nouveau_stateobj.h316
-rw-r--r--src/gallium/drivers/nouveau/nouveau_winsys.h8
-rw-r--r--src/gallium/drivers/nouveau/nv_object.xml.h57
-rw-r--r--src/gallium/drivers/nv50/Makefile11
-rw-r--r--src/gallium/drivers/nv50/SConscript6
-rw-r--r--src/gallium/drivers/nv50/nv50_2d.xml.h393
-rw-r--r--src/gallium/drivers/nv50/nv50_3d.xml.h2084
-rw-r--r--src/gallium/drivers/nv50/nv50_3ddefs.xml.h98
-rw-r--r--src/gallium/drivers/nv50/nv50_buffer.c151
-rw-r--r--src/gallium/drivers/nv50/nv50_clear.c74
-rw-r--r--src/gallium/drivers/nv50/nv50_context.c195
-rw-r--r--src/gallium/drivers/nv50/nv50_context.h397
-rw-r--r--src/gallium/drivers/nv50/nv50_defs.xml.h142
-rw-r--r--src/gallium/drivers/nv50/nv50_draw.c37
-rw-r--r--src/gallium/drivers/nv50/nv50_formats.c314
-rw-r--r--src/gallium/drivers/nv50/nv50_miptree.c480
-rw-r--r--src/gallium/drivers/nv50/nv50_pc.c5
-rw-r--r--src/gallium/drivers/nv50/nv50_pc.h2
-rw-r--r--src/gallium/drivers/nv50/nv50_pc_emit.c3
-rw-r--r--src/gallium/drivers/nv50/nv50_pc_optimize.c8
-rw-r--r--src/gallium/drivers/nv50/nv50_program.c34
-rw-r--r--src/gallium/drivers/nv50/nv50_program.h8
-rw-r--r--src/gallium/drivers/nv50/nv50_push.c493
-rw-r--r--src/gallium/drivers/nv50/nv50_query.c364
-rw-r--r--src/gallium/drivers/nv50/nv50_reg.h1827
-rw-r--r--src/gallium/drivers/nv50/nv50_resource.c68
-rw-r--r--src/gallium/drivers/nv50/nv50_resource.h101
-rw-r--r--src/gallium/drivers/nv50/nv50_screen.c1121
-rw-r--r--src/gallium/drivers/nv50/nv50_screen.h149
-rw-r--r--src/gallium/drivers/nv50/nv50_shader_state.c703
-rw-r--r--src/gallium/drivers/nv50/nv50_state.c1311
-rw-r--r--src/gallium/drivers/nv50/nv50_state_validate.c687
-rw-r--r--src/gallium/drivers/nv50/nv50_stateobj.h55
-rw-r--r--src/gallium/drivers/nv50/nv50_stateobj_tex.h34
-rw-r--r--src/gallium/drivers/nv50/nv50_surface.c570
-rw-r--r--src/gallium/drivers/nv50/nv50_tex.c465
-rw-r--r--src/gallium/drivers/nv50/nv50_texture.h197
-rw-r--r--src/gallium/drivers/nv50/nv50_texture.xml.h279
-rw-r--r--src/gallium/drivers/nv50/nv50_tgsi_to_nc.c27
-rw-r--r--src/gallium/drivers/nv50/nv50_transfer.c636
-rw-r--r--src/gallium/drivers/nv50/nv50_transfer.h39
-rw-r--r--src/gallium/drivers/nv50/nv50_vbo.c1122
-rw-r--r--src/gallium/drivers/nv50/nv50_winsys.h106
-rw-r--r--src/gallium/drivers/nvc0/Makefile34
-rw-r--r--src/gallium/drivers/nvc0/SConscript33
-rw-r--r--src/gallium/drivers/nvc0/nvc0_2d.xml.h380
-rw-r--r--src/gallium/drivers/nvc0/nvc0_3d.xml.h1244
-rw-r--r--src/gallium/drivers/nvc0/nvc0_3ddefs.xml.h98
-rw-r--r--src/gallium/drivers/nvc0/nvc0_context.c208
-rw-r--r--src/gallium/drivers/nvc0/nvc0_context.h244
-rw-r--r--src/gallium/drivers/nvc0/nvc0_draw.c88
-rw-r--r--src/gallium/drivers/nvc0/nvc0_formats.c523
-rw-r--r--src/gallium/drivers/nvc0/nvc0_graph_macros.h235
-rw-r--r--src/gallium/drivers/nvc0/nvc0_m2mf.xml.h138
-rw-r--r--src/gallium/drivers/nvc0/nvc0_miptree.c319
-rw-r--r--src/gallium/drivers/nvc0/nvc0_pc.c716
-rw-r--r--src/gallium/drivers/nvc0/nvc0_pc.h650
-rw-r--r--src/gallium/drivers/nvc0/nvc0_pc_emit.c1020
-rw-r--r--src/gallium/drivers/nvc0/nvc0_pc_optimize.c1420
-rw-r--r--src/gallium/drivers/nvc0/nvc0_pc_print.c381
-rw-r--r--src/gallium/drivers/nvc0/nvc0_pc_regalloc.c1051
-rw-r--r--src/gallium/drivers/nvc0/nvc0_program.c728
-rw-r--r--src/gallium/drivers/nvc0/nvc0_program.h92
-rw-r--r--src/gallium/drivers/nvc0/nvc0_push.c354
-rw-r--r--src/gallium/drivers/nvc0/nvc0_push2.c333
-rw-r--r--src/gallium/drivers/nvc0/nvc0_query.c341
-rw-r--r--src/gallium/drivers/nvc0/nvc0_resource.c51
-rw-r--r--src/gallium/drivers/nvc0/nvc0_resource.h75
-rw-r--r--src/gallium/drivers/nvc0/nvc0_screen.c676
-rw-r--r--src/gallium/drivers/nvc0/nvc0_screen.h148
-rw-r--r--src/gallium/drivers/nvc0/nvc0_shader_state.c249
-rw-r--r--src/gallium/drivers/nvc0/nvc0_state.c860
-rw-r--r--src/gallium/drivers/nvc0/nvc0_state_validate.c483
-rw-r--r--src/gallium/drivers/nvc0/nvc0_stateobj.h60
-rw-r--r--src/gallium/drivers/nvc0/nvc0_surface.c451
-rw-r--r--src/gallium/drivers/nvc0/nvc0_tex.c302
-rw-r--r--src/gallium/drivers/nvc0/nvc0_tgsi_to_nc.c2023
-rw-r--r--src/gallium/drivers/nvc0/nvc0_transfer.c385
-rw-r--r--src/gallium/drivers/nvc0/nvc0_transfer.h44
-rw-r--r--src/gallium/drivers/nvc0/nvc0_vbo.c653
-rw-r--r--src/gallium/drivers/nvc0/nvc0_winsys.h120
-rw-r--r--src/gallium/drivers/nvfx/Makefile1
-rw-r--r--src/gallium/drivers/nvfx/nv04_2d.c2
-rw-r--r--src/gallium/drivers/nvfx/nv30_fragtex.c3
-rw-r--r--src/gallium/drivers/nvfx/nv40_fragtex.c5
-rw-r--r--src/gallium/drivers/nvfx/nvfx_context.c13
-rw-r--r--src/gallium/drivers/nvfx/nvfx_context.h14
-rw-r--r--src/gallium/drivers/nvfx/nvfx_draw.c14
-rw-r--r--src/gallium/drivers/nvfx/nvfx_fragprog.c16
-rw-r--r--src/gallium/drivers/nvfx/nvfx_fragtex.c4
-rw-r--r--src/gallium/drivers/nvfx/nvfx_miptree.c6
-rw-r--r--src/gallium/drivers/nvfx/nvfx_push.c57
-rw-r--r--src/gallium/drivers/nvfx/nvfx_query.c12
-rw-r--r--src/gallium/drivers/nvfx/nvfx_resource.c9
-rw-r--r--src/gallium/drivers/nvfx/nvfx_screen.c72
-rw-r--r--src/gallium/drivers/nvfx/nvfx_state.c2
-rw-r--r--src/gallium/drivers/nvfx/nvfx_state_emit.c70
-rw-r--r--src/gallium/drivers/nvfx/nvfx_state_fb.c39
-rw-r--r--src/gallium/drivers/nvfx/nvfx_surface.c8
-rw-r--r--src/gallium/drivers/nvfx/nvfx_vbo.c42
-rw-r--r--src/gallium/drivers/nvfx/nvfx_vertprog.c14
-rw-r--r--src/gallium/drivers/r300/r300_blit.c303
-rw-r--r--src/gallium/drivers/r300/r300_cb.h54
-rw-r--r--src/gallium/drivers/r300/r300_chipset.c10
-rw-r--r--src/gallium/drivers/r300/r300_chipset.h15
-rw-r--r--src/gallium/drivers/r300/r300_context.c165
-rw-r--r--src/gallium/drivers/r300/r300_context.h250
-rw-r--r--src/gallium/drivers/r300/r300_cs.h51
-rw-r--r--src/gallium/drivers/r300/r300_debug.c4
-rw-r--r--src/gallium/drivers/r300/r300_emit.c555
-rw-r--r--src/gallium/drivers/r300/r300_emit.h5
-rw-r--r--src/gallium/drivers/r300/r300_flush.c62
-rw-r--r--src/gallium/drivers/r300/r300_fs.c135
-rw-r--r--src/gallium/drivers/r300/r300_fs.h9
-rw-r--r--src/gallium/drivers/r300/r300_hyperz.c310
-rw-r--r--src/gallium/drivers/r300/r300_hyperz.h35
-rw-r--r--src/gallium/drivers/r300/r300_query.c23
-rw-r--r--src/gallium/drivers/r300/r300_reg.h17
-rw-r--r--src/gallium/drivers/r300/r300_render.c641
-rw-r--r--src/gallium/drivers/r300/r300_render_translate.c233
-rw-r--r--src/gallium/drivers/r300/r300_resource.c18
-rw-r--r--src/gallium/drivers/r300/r300_screen.c94
-rw-r--r--src/gallium/drivers/r300/r300_screen.h5
-rw-r--r--src/gallium/drivers/r300/r300_screen_buffer.c267
-rw-r--r--src/gallium/drivers/r300/r300_screen_buffer.h51
-rw-r--r--src/gallium/drivers/r300/r300_state.c559
-rw-r--r--src/gallium/drivers/r300/r300_state_derived.c170
-rw-r--r--src/gallium/drivers/r300/r300_state_derived.h30
-rw-r--r--src/gallium/drivers/r300/r300_state_inlines.h53
-rw-r--r--src/gallium/drivers/r300/r300_texture.c300
-rw-r--r--src/gallium/drivers/r300/r300_texture.h13
-rw-r--r--src/gallium/drivers/r300/r300_texture_desc.c439
-rw-r--r--src/gallium/drivers/r300/r300_texture_desc.h16
-rw-r--r--src/gallium/drivers/r300/r300_tgsi_to_rc.c9
-rw-r--r--src/gallium/drivers/r300/r300_tgsi_to_rc.h3
-rw-r--r--src/gallium/drivers/r300/r300_transfer.c83
-rw-r--r--src/gallium/drivers/r300/r300_vs.c7
-rw-r--r--src/gallium/drivers/r300/r300_winsys.h139
-rw-r--r--src/gallium/drivers/r600/Android.mk43
-rw-r--r--src/gallium/drivers/r600/SConscript2
-rw-r--r--src/gallium/drivers/r600/eg_asm.c51
-rw-r--r--src/gallium/drivers/r600/eg_state_inlines.h176
-rw-r--r--src/gallium/drivers/r600/eg_states_inc.h458
-rw-r--r--src/gallium/drivers/r600/evergreen_state.c520
-rw-r--r--src/gallium/drivers/r600/evergreend.h22
-rw-r--r--src/gallium/drivers/r600/r600.h25
-rw-r--r--src/gallium/drivers/r600/r600_asm.c1833
-rw-r--r--src/gallium/drivers/r600/r600_asm.h33
-rw-r--r--src/gallium/drivers/r600/r600_blit.c160
-rw-r--r--src/gallium/drivers/r600/r600_buffer.c343
-rw-r--r--src/gallium/drivers/r600/r600_opcodes.h4
-rw-r--r--src/gallium/drivers/r600/r600_pipe.c148
-rw-r--r--src/gallium/drivers/r600/r600_pipe.h92
-rw-r--r--src/gallium/drivers/r600/r600_query.c30
-rw-r--r--src/gallium/drivers/r600/r600_resource.c1
-rw-r--r--src/gallium/drivers/r600/r600_resource.h70
-rw-r--r--src/gallium/drivers/r600/r600_shader.c1321
-rw-r--r--src/gallium/drivers/r600/r600_shader.h3
-rw-r--r--src/gallium/drivers/r600/r600_sq.h6
-rw-r--r--src/gallium/drivers/r600/r600_state.c594
-rw-r--r--src/gallium/drivers/r600/r600_state_common.c358
-rw-r--r--src/gallium/drivers/r600/r600_state_inlines.h188
-rw-r--r--src/gallium/drivers/r600/r600_states_inc.h543
-rw-r--r--src/gallium/drivers/r600/r600_texture.c405
-rw-r--r--src/gallium/drivers/r600/r600_translate.c185
-rw-r--r--src/gallium/drivers/r600/r600d.h35
-rw-r--r--src/gallium/drivers/r600/r700_asm.c20
-rw-r--r--src/gallium/drivers/rbug/rbug_context.c248
-rw-r--r--src/gallium/drivers/rbug/rbug_core.c2
-rw-r--r--src/gallium/drivers/rbug/rbug_objects.c6
-rw-r--r--src/gallium/drivers/rbug/rbug_screen.c20
-rw-r--r--src/gallium/drivers/softpipe/sp_context.c70
-rw-r--r--src/gallium/drivers/softpipe/sp_context.h27
-rw-r--r--src/gallium/drivers/softpipe/sp_fence.c13
-rw-r--r--src/gallium/drivers/softpipe/sp_flush.c84
-rw-r--r--src/gallium/drivers/softpipe/sp_flush.h9
-rw-r--r--src/gallium/drivers/softpipe/sp_quad_blend.c14
-rw-r--r--src/gallium/drivers/softpipe/sp_screen.c10
-rw-r--r--src/gallium/drivers/softpipe/sp_setup.c2
-rw-r--r--src/gallium/drivers/softpipe/sp_state.h2
-rw-r--r--src/gallium/drivers/softpipe/sp_state_derived.c10
-rw-r--r--src/gallium/drivers/softpipe/sp_state_sampler.c127
-rw-r--r--src/gallium/drivers/softpipe/sp_state_shader.c4
-rw-r--r--src/gallium/drivers/softpipe/sp_state_vertex.c8
-rw-r--r--src/gallium/drivers/softpipe/sp_tex_sample.c503
-rw-r--r--src/gallium/drivers/softpipe/sp_tex_sample.h37
-rw-r--r--src/gallium/drivers/softpipe/sp_tex_tile_cache.c65
-rw-r--r--src/gallium/drivers/softpipe/sp_tex_tile_cache.h9
-rw-r--r--src/gallium/drivers/softpipe/sp_texture.c37
-rw-r--r--src/gallium/drivers/softpipe/sp_tile_cache.c22
-rw-r--r--src/gallium/drivers/svga/svga_cmd.c5
-rw-r--r--src/gallium/drivers/svga/svga_cmd.h3
-rw-r--r--src/gallium/drivers/svga/svga_context.c74
-rw-r--r--src/gallium/drivers/svga/svga_context.h28
-rw-r--r--src/gallium/drivers/svga/svga_draw.c8
-rw-r--r--src/gallium/drivers/svga/svga_draw_arrays.c5
-rw-r--r--src/gallium/drivers/svga/svga_draw_elements.c14
-rw-r--r--src/gallium/drivers/svga/svga_pipe_blit.c4
-rw-r--r--src/gallium/drivers/svga/svga_pipe_draw.c8
-rw-r--r--src/gallium/drivers/svga/svga_pipe_flush.c40
-rw-r--r--src/gallium/drivers/svga/svga_pipe_misc.c2
-rw-r--r--src/gallium/drivers/svga/svga_pipe_rasterizer.c37
-rw-r--r--src/gallium/drivers/svga/svga_pipe_sampler.c16
-rw-r--r--src/gallium/drivers/svga/svga_pipe_vertex.c1
-rw-r--r--src/gallium/drivers/svga/svga_resource.c2
-rw-r--r--src/gallium/drivers/svga/svga_resource_buffer.c168
-rw-r--r--src/gallium/drivers/svga/svga_resource_buffer.h6
-rw-r--r--src/gallium/drivers/svga/svga_resource_buffer_upload.c91
-rw-r--r--src/gallium/drivers/svga/svga_resource_buffer_upload.h4
-rw-r--r--src/gallium/drivers/svga/svga_resource_texture.c104
-rw-r--r--src/gallium/drivers/svga/svga_sampler_view.c26
-rw-r--r--src/gallium/drivers/svga/svga_sampler_view.h6
-rw-r--r--src/gallium/drivers/svga/svga_screen.c41
-rw-r--r--src/gallium/drivers/svga/svga_screen.h2
-rw-r--r--src/gallium/drivers/svga/svga_state.h4
-rw-r--r--src/gallium/drivers/svga/svga_state_constants.c9
-rw-r--r--src/gallium/drivers/svga/svga_state_framebuffer.c49
-rw-r--r--src/gallium/drivers/svga/svga_state_fs.c2
-rw-r--r--src/gallium/drivers/svga/svga_state_need_swtnl.c31
-rw-r--r--src/gallium/drivers/svga/svga_state_tss.c78
-rw-r--r--src/gallium/drivers/svga/svga_state_vdecl.c9
-rw-r--r--src/gallium/drivers/svga/svga_state_vs.c6
-rw-r--r--src/gallium/drivers/svga/svga_surface.c30
-rw-r--r--src/gallium/drivers/svga/svga_surface.h5
-rw-r--r--src/gallium/drivers/svga/svga_swtnl_backend.c14
-rw-r--r--src/gallium/drivers/svga/svga_swtnl_draw.c16
-rw-r--r--src/gallium/drivers/svga/svga_swtnl_state.c2
-rw-r--r--src/gallium/drivers/svga/svga_tgsi_insn.c236
-rw-r--r--src/gallium/drivers/svga/svga_winsys.h7
-rw-r--r--src/gallium/drivers/svga/svgadump/svga_shader_op.c4
-rw-r--r--src/gallium/drivers/trace/tr_context.c53
-rw-r--r--src/gallium/drivers/trace/tr_dump.c16
-rw-r--r--src/gallium/drivers/trace/tr_dump.h5
-rw-r--r--src/gallium/drivers/trace/tr_dump_state.c1
-rw-r--r--src/gallium/drivers/trace/tr_screen.c28
-rw-r--r--src/gallium/include/pipe/p_compiler.h12
-rw-r--r--src/gallium/include/pipe/p_context.h32
-rw-r--r--src/gallium/include/pipe/p_defines.h60
-rw-r--r--src/gallium/include/pipe/p_format.h21
-rw-r--r--src/gallium/include/pipe/p_screen.h20
-rw-r--r--src/gallium/include/pipe/p_shader_tokens.h33
-rw-r--r--src/gallium/include/pipe/p_state.h10
-rw-r--r--src/gallium/include/state_tracker/st_api.h5
-rw-r--r--src/gallium/state_trackers/Android.mk1
-rw-r--r--src/gallium/state_trackers/d3d1x/dxgi/src/dxgi_native.cpp13
-rw-r--r--src/gallium/state_trackers/d3d1x/gd3d11/d3d11_context.h3
-rw-r--r--src/gallium/state_trackers/d3d1x/gd3d11/d3d11_screen.h20
-rwxr-xr-xsrc/gallium/state_trackers/d3d1x/progs/bin/d3d10tri.exebin11776 -> 0 bytes
-rwxr-xr-xsrc/gallium/state_trackers/d3d1x/progs/bin/d3d11gears.exebin27136 -> 0 bytes
-rwxr-xr-xsrc/gallium/state_trackers/d3d1x/progs/bin/d3d11spikysphere.exebin17408 -> 0 bytes
-rwxr-xr-xsrc/gallium/state_trackers/d3d1x/progs/bin/d3d11tex.exebin22016 -> 0 bytes
-rwxr-xr-xsrc/gallium/state_trackers/d3d1x/progs/bin/d3d11tri.exebin11776 -> 0 bytes
-rw-r--r--src/gallium/state_trackers/dri/common/dri_context.c22
-rw-r--r--src/gallium/state_trackers/dri/common/dri_drawable.c2
-rw-r--r--src/gallium/state_trackers/dri/common/dri_drawable.h3
-rw-r--r--src/gallium/state_trackers/dri/common/dri_screen.c30
-rw-r--r--src/gallium/state_trackers/dri/drm/dri2.c95
-rw-r--r--src/gallium/state_trackers/dri/drm/dri2_buffer.h22
-rw-r--r--src/gallium/state_trackers/dri/sw/drisw.c3
-rw-r--r--src/gallium/state_trackers/egl/Makefile15
-rw-r--r--src/gallium/state_trackers/egl/SConscript38
-rw-r--r--src/gallium/state_trackers/egl/android/native_android.cpp162
-rw-r--r--src/gallium/state_trackers/egl/common/egl_g3d.c173
-rw-r--r--src/gallium/state_trackers/egl/common/egl_g3d.h1
-rw-r--r--src/gallium/state_trackers/egl/common/egl_g3d_api.c87
-rw-r--r--src/gallium/state_trackers/egl/common/egl_g3d_api.h3
-rw-r--r--src/gallium/state_trackers/egl/common/egl_g3d_image.c18
-rw-r--r--src/gallium/state_trackers/egl/common/egl_g3d_sync.c4
-rw-r--r--src/gallium/state_trackers/egl/common/native.h40
-rw-r--r--src/gallium/state_trackers/egl/common/native_helper.c150
-rw-r--r--src/gallium/state_trackers/egl/common/native_helper.h36
-rw-r--r--src/gallium/state_trackers/egl/drm/modeset.c48
-rw-r--r--src/gallium/state_trackers/egl/drm/native_drm.c21
-rw-r--r--src/gallium/state_trackers/egl/drm/native_drm.h2
-rw-r--r--src/gallium/state_trackers/egl/fbdev/native_fbdev.c18
-rw-r--r--src/gallium/state_trackers/egl/gdi/native_gdi.c19
-rw-r--r--src/gallium/state_trackers/egl/wayland/native_wayland.c626
-rw-r--r--src/gallium/state_trackers/egl/wayland/native_wayland.h97
-rw-r--r--src/gallium/state_trackers/egl/x11/native_dri2.c91
-rw-r--r--src/gallium/state_trackers/egl/x11/native_x11.c28
-rw-r--r--src/gallium/state_trackers/egl/x11/native_ximage.c83
-rw-r--r--src/gallium/state_trackers/glx/xlib/glx_api.c85
-rw-r--r--src/gallium/state_trackers/glx/xlib/xm_api.c15
-rw-r--r--src/gallium/state_trackers/python/p_context.i10
-rw-r--r--src/gallium/state_trackers/python/p_device.i10
-rw-r--r--src/gallium/state_trackers/vega/Makefile26
-rw-r--r--src/gallium/state_trackers/vega/SConscript23
-rw-r--r--src/gallium/state_trackers/vega/api_context.c7
-rw-r--r--src/gallium/state_trackers/vega/api_filters.c29
-rw-r--r--src/gallium/state_trackers/vega/api_images.c48
-rw-r--r--src/gallium/state_trackers/vega/api_masks.c35
-rw-r--r--src/gallium/state_trackers/vega/api_paint.c56
-rw-r--r--src/gallium/state_trackers/vega/api_params.c178
-rw-r--r--src/gallium/state_trackers/vega/api_path.c48
-rw-r--r--src/gallium/state_trackers/vega/api_text.c29
-rw-r--r--src/gallium/state_trackers/vega/handle.c93
-rw-r--r--src/gallium/state_trackers/vega/handle.h171
-rw-r--r--src/gallium/state_trackers/vega/image.c12
-rw-r--r--src/gallium/state_trackers/vega/mask.c2
-rw-r--r--src/gallium/state_trackers/vega/paint.c7
-rw-r--r--src/gallium/state_trackers/vega/paint.h1
-rw-r--r--src/gallium/state_trackers/vega/polygon.c2
-rw-r--r--src/gallium/state_trackers/vega/renderer.c24
-rw-r--r--src/gallium/state_trackers/vega/shader.c4
-rw-r--r--src/gallium/state_trackers/vega/text.c1
-rw-r--r--src/gallium/state_trackers/vega/vg_context.c29
-rw-r--r--src/gallium/state_trackers/vega/vg_context.h17
-rw-r--r--src/gallium/state_trackers/vega/vg_manager.c10
-rw-r--r--src/gallium/state_trackers/vega/vgu.c13
-rw-r--r--src/gallium/state_trackers/wgl/SConscript3
-rw-r--r--src/gallium/state_trackers/wgl/stw_context.c8
-rw-r--r--src/gallium/state_trackers/wgl/stw_device.c23
-rw-r--r--src/gallium/state_trackers/wgl/stw_pixelformat.c4
-rw-r--r--src/gallium/state_trackers/xorg/xorg_crtc.c13
-rw-r--r--src/gallium/state_trackers/xorg/xorg_dri2.c11
-rw-r--r--src/gallium/state_trackers/xorg/xorg_driver.c73
-rw-r--r--src/gallium/state_trackers/xorg/xorg_exa.c21
-rw-r--r--src/gallium/state_trackers/xorg/xorg_exa.h2
-rw-r--r--src/gallium/state_trackers/xorg/xorg_renderer.c14
-rw-r--r--src/gallium/state_trackers/xorg/xorg_tracker.h1
-rw-r--r--src/gallium/state_trackers/xorg/xorg_xv.c16
-rw-r--r--src/gallium/targets/Android.mk148
-rw-r--r--src/gallium/targets/SConscript.dri1
-rw-r--r--src/gallium/targets/dri-noop/Makefile34
-rw-r--r--src/gallium/targets/dri-noop/SConscript31
-rw-r--r--src/gallium/targets/dri-nouveau/Makefile1
-rw-r--r--src/gallium/targets/dri-r300/Makefile2
-rw-r--r--src/gallium/targets/dri-r300/SConscript2
-rw-r--r--src/gallium/targets/dri-r600/Makefile5
-rw-r--r--src/gallium/targets/dri-r600/SConscript2
-rw-r--r--src/gallium/targets/dri-r600/target.c2
-rw-r--r--src/gallium/targets/dri-vmwgfx/Makefile1
-rw-r--r--src/gallium/targets/dri-vmwgfx/SConscript8
-rw-r--r--src/gallium/targets/dri-vmwgfx/target.c3
-rw-r--r--src/gallium/targets/egl-gdi/SConscript55
-rw-r--r--src/gallium/targets/egl-static/SConscript134
-rw-r--r--src/gallium/targets/egl-static/egl.c (renamed from src/gallium/targets/egl-gdi/egl-static.c)127
-rw-r--r--src/gallium/targets/egl-static/egl_pipe.c215
-rw-r--r--src/gallium/targets/egl-static/egl_pipe.h40
-rw-r--r--src/gallium/targets/egl-static/egl_st.c105
-rw-r--r--src/gallium/targets/egl-static/egl_st.h (renamed from src/mesa/swrast/s_trispan.h)31
-rw-r--r--src/gallium/targets/egl/Makefile37
-rw-r--r--src/gallium/targets/egl/egl.c38
-rw-r--r--src/gallium/targets/egl/st_GLESv1_CM.c8
-rw-r--r--src/gallium/targets/egl/st_GLESv2.c8
-rw-r--r--src/gallium/targets/graw-gdi/graw_gdi.c4
-rw-r--r--src/gallium/targets/graw-null/graw_util.c1
-rw-r--r--src/gallium/targets/graw-xlib/graw_xlib.c20
-rw-r--r--src/gallium/targets/libgl-gdi/SConscript7
-rw-r--r--src/gallium/targets/libgl-xlib/Makefile4
-rw-r--r--src/gallium/targets/libgl-xlib/SConscript7
-rw-r--r--src/gallium/targets/libgl-xlib/xlib.c1
-rw-r--r--src/gallium/targets/xorg-radeon/Makefile2
-rw-r--r--src/gallium/tests/graw/SConscript3
-rw-r--r--src/gallium/tests/graw/clear.c18
-rw-r--r--src/gallium/tests/graw/fs-test.c18
-rw-r--r--src/gallium/tests/graw/gs-test.c19
-rw-r--r--src/gallium/tests/graw/quad-sample.c414
-rw-r--r--src/gallium/tests/graw/quad-tex.c19
-rw-r--r--src/gallium/tests/graw/shader-leak.c18
-rw-r--r--src/gallium/tests/graw/tri-gs.c17
-rw-r--r--src/gallium/tests/graw/tri-instanced.c17
-rw-r--r--src/gallium/tests/graw/tri.c16
-rw-r--r--src/gallium/tests/graw/vs-test.c16
-rw-r--r--src/gallium/tests/trivial/quad-tex.c5
-rw-r--r--src/gallium/tests/trivial/tri.c5
-rw-r--r--src/gallium/tests/unit/SConscript2
-rw-r--r--src/gallium/winsys/SConscript4
-rw-r--r--src/gallium/winsys/i915/drm/i915_drm_batchbuffer.c57
-rw-r--r--src/gallium/winsys/i915/drm/i915_drm_winsys.c1
-rw-r--r--src/gallium/winsys/i915/drm/i915_drm_winsys.h1
-rw-r--r--src/gallium/winsys/i915/sw/i915_sw_batchbuffer.c29
-rw-r--r--src/gallium/winsys/i915/sw/i915_sw_buffer.c2
-rw-r--r--src/gallium/winsys/i915/sw/i915_sw_winsys.c2
-rw-r--r--src/gallium/winsys/i965/drm/i965_drm_buffer.c4
-rw-r--r--src/gallium/winsys/nouveau/drm/nouveau_drm_winsys.c3
-rw-r--r--src/gallium/winsys/r600/Android.mk38
-rw-r--r--src/gallium/winsys/r600/drm/Makefile5
-rw-r--r--src/gallium/winsys/r600/drm/SConscript10
-rw-r--r--src/gallium/winsys/r600/drm/bof.c2
-rw-r--r--src/gallium/winsys/r600/drm/evergreen_hw_context.c76
-rw-r--r--src/gallium/winsys/r600/drm/r600.c175
-rw-r--r--src/gallium/winsys/r600/drm/r600_bo.c174
-rw-r--r--src/gallium/winsys/r600/drm/r600_bomgr.c161
-rw-r--r--src/gallium/winsys/r600/drm/r600_drm.c280
-rw-r--r--src/gallium/winsys/r600/drm/r600_hw_context.c238
-rw-r--r--src/gallium/winsys/r600/drm/r600_priv.h125
-rw-r--r--src/gallium/winsys/r600/drm/r600d.h18
-rw-r--r--src/gallium/winsys/r600/drm/radeon_bo.c31
-rw-r--r--src/gallium/winsys/r600/drm/radeon_bo_pb.c260
-rw-r--r--src/gallium/winsys/r600/drm/radeon_pciid.c114
-rw-r--r--src/gallium/winsys/radeon/drm/Makefile6
-rw-r--r--src/gallium/winsys/radeon/drm/SConscript11
-rw-r--r--src/gallium/winsys/radeon/drm/radeon_drm_bo.c602
-rw-r--r--src/gallium/winsys/radeon/drm/radeon_drm_bo.h (renamed from src/gallium/winsys/radeon/drm/radeon_drm_buffer.h)54
-rw-r--r--src/gallium/winsys/radeon/drm/radeon_drm_buffer.c564
-rw-r--r--src/gallium/winsys/radeon/drm/radeon_drm_common.c129
-rw-r--r--src/gallium/winsys/radeon/drm/radeon_drm_cs.c446
-rw-r--r--src/gallium/winsys/radeon/drm/radeon_drm_cs.h102
-rw-r--r--src/gallium/winsys/radeon/drm/radeon_r300.c266
-rw-r--r--src/gallium/winsys/radeon/drm/radeon_winsys.h40
-rw-r--r--src/gallium/winsys/svga/drm/vmw_buffer.c3
-rw-r--r--src/gallium/winsys/svga/drm/vmw_context.c2
-rw-r--r--src/gallium/winsys/svga/drm/vmw_screen.c2
-rw-r--r--src/gallium/winsys/sw/dri/SConscript2
-rw-r--r--src/gallium/winsys/sw/wrapper/wrapper_sw_winsys.c9
-rw-r--r--src/gallium/winsys/sw/xlib/SConscript2
-rw-r--r--src/getopt/SConscript15
-rw-r--r--src/getopt/getopt.h82
-rw-r--r--src/getopt/getopt_long.c511
-rw-r--r--src/glsl/.gitignore5
-rw-r--r--src/glsl/Android.mk10
-rw-r--r--src/glsl/Makefile74
-rw-r--r--src/glsl/SConscript111
-rw-r--r--src/glsl/ast.h72
-rw-r--r--src/glsl/ast_expr.cpp3
-rw-r--r--src/glsl/ast_function.cpp167
-rw-r--r--src/glsl/ast_to_hir.cpp920
-rw-r--r--src/glsl/ast_type.cpp24
-rw-r--r--src/glsl/builtin_function.cpp2686
-rw-r--r--src/glsl/builtin_stubs.cpp (renamed from src/glsl/builtins/tools/builtin_function.cpp)3
-rw-r--r--src/glsl/builtin_types.h9
-rw-r--r--src/glsl/builtin_variables.h5
-rw-r--r--src/glsl/builtins/ir/atan28
-rw-r--r--src/glsl/builtins/ir/distance6
-rw-r--r--src/glsl/builtins/ir/matrixCompMult54
-rw-r--r--src/glsl/builtins/ir/modf20
-rw-r--r--src/glsl/builtins/ir/noise232
-rw-r--r--src/glsl/builtins/ir/noise348
-rw-r--r--src/glsl/builtins/ir/noise472
-rw-r--r--src/glsl/builtins/ir/outerProduct54
-rw-r--r--src/glsl/builtins/ir/refract8
-rw-r--r--src/glsl/builtins/ir/smoothstep123
-rw-r--r--src/glsl/builtins/ir/step36
-rw-r--r--src/glsl/builtins/ir/transpose162
-rw-r--r--src/glsl/builtins/profiles/130.frag14
-rw-r--r--src/glsl/builtins/profiles/130.vert14
-rw-r--r--src/glsl/builtins/profiles/OES_texture_3D.frag7
-rw-r--r--src/glsl/builtins/profiles/OES_texture_3D.vert7
-rwxr-xr-xsrc/glsl/builtins/tools/generate_builtins.py40
-rwxr-xr-xsrc/glsl/builtins/tools/texture_builtins.py267
-rw-r--r--src/glsl/configure.ac69
-rw-r--r--src/glsl/glcpp/.gitignore3
-rw-r--r--src/glsl/glcpp/Makefile.am44
-rw-r--r--src/glsl/glcpp/glcpp-lex.c556
-rw-r--r--src/glsl/glcpp/glcpp-lex.l67
-rw-r--r--src/glsl/glcpp/glcpp-parse.c640
-rw-r--r--src/glsl/glcpp/glcpp-parse.h7
-rw-r--r--src/glsl/glcpp/glcpp-parse.y202
-rw-r--r--src/glsl/glcpp/glcpp.c48
-rw-r--r--src/glsl/glcpp/glcpp.h4
-rw-r--r--src/glsl/glcpp/pp.c30
-rw-r--r--src/glsl/glcpp/tests/063-comments.c.expected7
-rw-r--r--src/glsl/glcpp/tests/092-redefine-macro-error-2.c5
-rw-r--r--src/glsl/glcpp/tests/092-redefine-macro-error-2.c.expected10
-rw-r--r--src/glsl/glcpp/tests/093-divide-by-zero.c2
-rw-r--r--src/glsl/glcpp/tests/094-divide-by-zero-short-circuit.c2
-rw-r--r--src/glsl/glcpp/tests/095-recursive-define.c3
-rw-r--r--src/glsl/glsl_lexer.cpp2027
-rw-r--r--src/glsl/glsl_lexer.ll (renamed from src/glsl/glsl_lexer.lpp)41
-rw-r--r--src/glsl/glsl_parser.cpp3594
-rw-r--r--src/glsl/glsl_parser.h250
-rw-r--r--src/glsl/glsl_parser.yy (renamed from src/glsl/glsl_parser.ypp)249
-rw-r--r--src/glsl/glsl_parser_extras.cpp80
-rw-r--r--src/glsl/glsl_parser_extras.h52
-rw-r--r--src/glsl/glsl_symbol_table.cpp19
-rw-r--r--src/glsl/glsl_symbol_table.h20
-rw-r--r--src/glsl/glsl_types.cpp42
-rw-r--r--src/glsl/glsl_types.h30
-rw-r--r--src/glsl/ir.cpp121
-rw-r--r--src/glsl/ir.h83
-rw-r--r--src/glsl/ir_clone.cpp6
-rw-r--r--src/glsl/ir_constant_expression.cpp36
-rw-r--r--src/glsl/ir_expression_flattening.cpp2
-rw-r--r--src/glsl/ir_function.cpp1
-rw-r--r--src/glsl/ir_hierarchical_visitor.h1
-rw-r--r--src/glsl/ir_hv_accept.cpp6
-rw-r--r--src/glsl/ir_import_prototypes.cpp3
-rw-r--r--src/glsl/ir_optimization.h3
-rw-r--r--src/glsl/ir_print_visitor.cpp18
-rw-r--r--src/glsl/ir_reader.cpp1034
-rw-r--r--src/glsl/ir_rvalue_visitor.cpp1
-rw-r--r--src/glsl/ir_set_program_inouts.cpp41
-rw-r--r--src/glsl/ir_validate.cpp37
-rw-r--r--src/glsl/ir_variable.cpp33
-rw-r--r--src/glsl/ir_variable_refcount.h4
-rw-r--r--src/glsl/link_functions.cpp28
-rw-r--r--src/glsl/linker.cpp154
-rw-r--r--src/glsl/list.h28
-rw-r--r--src/glsl/loop_analysis.cpp17
-rw-r--r--src/glsl/loop_analysis.h2
-rw-r--r--src/glsl/loop_controls.cpp6
-rw-r--r--src/glsl/loop_unroll.cpp129
-rw-r--r--src/glsl/lower_discard.cpp2
-rw-r--r--src/glsl/lower_if_to_cond_assign.cpp44
-rw-r--r--src/glsl/lower_jumps.cpp8
-rw-r--r--src/glsl/lower_mat_op_to_vec.cpp2
-rw-r--r--src/glsl/lower_noise.cpp2
-rw-r--r--src/glsl/lower_texture_projection.cpp2
-rw-r--r--src/glsl/lower_variable_index_to_cond_assign.cpp59
-rw-r--r--src/glsl/lower_vec_index_to_cond_assign.cpp4
-rw-r--r--src/glsl/lower_vec_index_to_swizzle.cpp2
-rw-r--r--src/glsl/lower_vector.cpp2
-rw-r--r--src/glsl/main.cpp92
-rw-r--r--src/glsl/opt_algebraic.cpp2
-rw-r--r--src/glsl/opt_constant_folding.cpp2
-rw-r--r--src/glsl/opt_constant_propagation.cpp13
-rw-r--r--src/glsl/opt_constant_variable.cpp7
-rw-r--r--src/glsl/opt_copy_propagation.cpp15
-rw-r--r--src/glsl/opt_copy_propagation_elements.cpp458
-rw-r--r--src/glsl/opt_dead_code_local.cpp13
-rw-r--r--src/glsl/opt_dead_functions.cpp223
-rw-r--r--src/glsl/opt_discard_simplification.cpp10
-rw-r--r--src/glsl/opt_function_inlining.cpp14
-rw-r--r--src/glsl/opt_if_simplification.cpp10
-rw-r--r--src/glsl/opt_redundant_jumps.cpp9
-rw-r--r--src/glsl/opt_structure_splitting.cpp22
-rw-r--r--src/glsl/opt_tree_grafting.cpp3
-rw-r--r--src/glsl/ralloc.c462
-rw-r--r--src/glsl/ralloc.h345
-rw-r--r--src/glsl/s_expression.cpp76
-rw-r--r--src/glsl/s_expression.h42
-rw-r--r--src/glsl/strtod.c56
-rw-r--r--src/glsl/strtod.h43
-rw-r--r--src/glsl/tests/array-01.glsl3
-rw-r--r--src/glsl/tests/array-02.glsl3
-rw-r--r--src/glsl/tests/array-03.glsl3
-rw-r--r--src/glsl/tests/array-04.glsl2
-rw-r--r--src/glsl/tests/array-05.glsl2
-rw-r--r--src/glsl/tests/array-06.glsl2
-rw-r--r--src/glsl/tests/array-07.glsl2
-rw-r--r--src/glsl/tests/array-08.glsl2
-rw-r--r--src/glsl/tests/array-09.glsl9
-rw-r--r--src/glsl/tests/array-10.glsl11
-rw-r--r--src/glsl/tests/array-11.glsl9
-rw-r--r--src/glsl/tests/array-12.glsl11
-rw-r--r--src/glsl/tests/array-13.glsl11
-rw-r--r--src/glsl/tests/attribute-01.glsl7
-rw-r--r--src/glsl/tests/attribute-02.glsl7
-rw-r--r--src/glsl/tests/attribute-03.glsl7
-rw-r--r--src/glsl/tests/attribute-04.glsl7
-rw-r--r--src/glsl/tests/attribute-05.glsl7
-rw-r--r--src/glsl/tests/attribute-06.glsl7
-rw-r--r--src/glsl/tests/attribute-07.glsl7
-rw-r--r--src/glsl/tests/attribute-08.glsl7
-rw-r--r--src/glsl/tests/attribute-09.glsl7
-rw-r--r--src/glsl/tests/attribute-10.glsl8
-rw-r--r--src/glsl/tests/attribute-11.glsl8
-rw-r--r--src/glsl/tests/condition-01.glsl8
-rw-r--r--src/glsl/tests/condition-02.glsl8
-rw-r--r--src/glsl/tests/condition-03.glsl8
-rw-r--r--src/glsl/tests/condition-04.glsl8
-rw-r--r--src/glsl/tests/condition-05.glsl13
-rw-r--r--src/glsl/tests/constructor-01.glsl6
-rw-r--r--src/glsl/tests/constructor-02.glsl7
-rw-r--r--src/glsl/tests/constructor-03.glsl12
-rw-r--r--src/glsl/tests/constructor-04.glsl14
-rw-r--r--src/glsl/tests/constructor-05.glsl13
-rw-r--r--src/glsl/tests/constructor-06.glsl13
-rw-r--r--src/glsl/tests/constructor-07.glsl13
-rw-r--r--src/glsl/tests/constructor-08.glsl13
-rw-r--r--src/glsl/tests/constructor-09.glsl26
-rw-r--r--src/glsl/tests/function-01.glsl16
-rw-r--r--src/glsl/tests/function-02.glsl16
-rw-r--r--src/glsl/tests/function-03.glsl16
-rw-r--r--src/glsl/tests/function-04.glsl15
-rw-r--r--src/glsl/tests/function-05.glsl26
-rw-r--r--src/glsl/tests/if-01.glsl11
-rw-r--r--src/glsl/tests/if-02.glsl11
-rw-r--r--src/glsl/tests/if-03.glsl11
-rw-r--r--src/glsl/tests/if-04.glsl11
-rw-r--r--src/glsl/tests/matrix-01.glsl6
-rw-r--r--src/glsl/tests/matrix-02.glsl6
-rw-r--r--src/glsl/tests/matrix-03.glsl6
-rw-r--r--src/glsl/tests/matrix-04.glsl6
-rw-r--r--src/glsl/tests/matrix-05.glsl6
-rw-r--r--src/glsl/tests/matrix-06.glsl6
-rw-r--r--src/glsl/tests/matrix-07.glsl27
-rw-r--r--src/glsl/tests/matrix-08.glsl19
-rw-r--r--src/glsl/tests/matrix-09.glsl11
-rw-r--r--src/glsl/tests/matrix-10.glsl12
-rw-r--r--src/glsl/tests/parameters-01.glsl11
-rw-r--r--src/glsl/tests/parameters-02.glsl11
-rw-r--r--src/glsl/tests/parameters-03.glsl9
-rw-r--r--src/glsl/tests/qualifier-01.glsl3
-rw-r--r--src/glsl/tests/qualifier-02.glsl2
-rw-r--r--src/glsl/tests/qualifier-03.glsl2
-rw-r--r--src/glsl/tests/qualifier-04.glsl3
-rw-r--r--src/glsl/tests/qualifier-05.glsl3
-rw-r--r--src/glsl/tests/qualifier-06.glsl7
-rw-r--r--src/glsl/tests/qualifier-07.glsl7
-rw-r--r--src/glsl/tests/swiz-01.glsl11
-rw-r--r--src/glsl/tests/swiz-02.glsl11
-rw-r--r--src/glsl/tests/void-01.glsl2
-rw-r--r--src/glx/Makefile7
-rw-r--r--src/glx/dri2_glx.c46
-rw-r--r--src/glx/dri_common.c4
-rw-r--r--src/glx/dri_glx.c39
-rw-r--r--src/glx/drisw_glx.c7
-rw-r--r--src/glx/glx_pbuffer.c11
-rw-r--r--src/glx/glxclient.h6
-rw-r--r--src/glx/glxcmds.c23
-rw-r--r--src/glx/glxconfig.c5
-rw-r--r--src/glx/glxconfig.h3
-rw-r--r--src/glx/glxcurrent.c65
-rw-r--r--src/glx/glxext.c34
-rw-r--r--src/glx/glxextensions.c3
-rw-r--r--src/glx/glxextensions.h3
-rw-r--r--src/glx/indirect.c60
-rw-r--r--src/glx/indirect.h4
-rw-r--r--src/gralloc/Android.mk71
-rw-r--r--src/gralloc/gralloc_gem.c67
-rw-r--r--src/gralloc/gralloc_gem.h52
-rw-r--r--src/gralloc/gralloc_gem_intel.c (renamed from src/gralloc/gralloc_gem_i915.c)52
-rw-r--r--src/gralloc/gralloc_gem_pipe.c54
-rw-r--r--src/gralloc/gralloc_gem_radeon.c362
-rw-r--r--src/gralloc/gralloc_kms.c38
-rw-r--r--src/gralloc/gralloc_mod.c10
-rw-r--r--src/gralloc/gralloc_mod.h3
-rw-r--r--src/mapi/Android.mk45
-rw-r--r--src/mapi/es1api/.gitignore4
-rw-r--r--src/mapi/es1api/Makefile133
-rw-r--r--src/mapi/es1api/glapi/glapi_sparc.S1080
-rw-r--r--src/mapi/es1api/glapi/glapi_x86-64.S19246
-rw-r--r--src/mapi/es1api/glapi/glapi_x86.S1043
-rw-r--r--src/mapi/es1api/glapi/glapitable.h551
-rw-r--r--src/mapi/es1api/glapi/glapitemp.h4528
-rw-r--r--src/mapi/es1api/glapi/glprocs.h1977
-rw-r--r--src/mapi/es1api/glapi_mapi_tmp.h3394
-rw-r--r--src/mapi/es2api/.gitignore4
-rw-r--r--src/mapi/es2api/glapi/glapi_sparc.S1084
-rw-r--r--src/mapi/es2api/glapi/glapi_x86-64.S19796
-rw-r--r--src/mapi/es2api/glapi/glapi_x86.S1053
-rw-r--r--src/mapi/es2api/glapi/glapitable.h563
-rw-r--r--src/mapi/es2api/glapi/glapitemp.h4170
-rw-r--r--src/mapi/es2api/glapi/glprocs.h1877
-rw-r--r--src/mapi/es2api/glapi_mapi_tmp.h2632
-rw-r--r--src/mapi/generate_glapi.mk43
-rw-r--r--src/mapi/glapi/Makefile66
-rw-r--r--src/mapi/glapi/SConscript8
-rw-r--r--src/mapi/glapi/gen-es/Makefile61
-rw-r--r--src/mapi/glapi/gen/ARB_ES2_compatibility.xml58
-rw-r--r--src/mapi/glapi/gen/ARB_draw_buffers_blend.xml38
-rw-r--r--src/mapi/glapi/gen/ARB_get_program_binary.xml36
-rw-r--r--src/mapi/glapi/gen/ARB_instanced_arrays.xml21
-rw-r--r--src/mapi/glapi/gen/Makefile19
-rw-r--r--src/mapi/glapi/gen/NV_texture_barrier.xml13
-rw-r--r--src/mapi/glapi/gen/OES_fixed_point.xml259
-rw-r--r--src/mapi/glapi/gen/OES_single_precision.xml47
-rw-r--r--src/mapi/glapi/gen/es_EXT.xml618
-rw-r--r--src/mapi/glapi/gen/glX_API.xml14
-rw-r--r--src/mapi/glapi/gen/glX_proto_recv.py4
-rw-r--r--src/mapi/glapi/gen/glX_proto_send.py53
-rw-r--r--src/mapi/glapi/gen/gl_API.xml7
-rw-r--r--src/mapi/glapi/gen/gl_and_es_API.xml286
-rw-r--r--src/mapi/glapi/gen/gl_enums.py43
-rw-r--r--src/mapi/glapi/gen/gl_x86-64_asm.py3
-rw-r--r--src/mapi/glapi/gen/gl_x86_asm.py2
-rw-r--r--src/mapi/glapi/glapi.c65
-rw-r--r--src/mapi/glapi/glapi.h5
-rw-r--r--src/mapi/glapi/glapi_mapi_tmp.h13116
-rw-r--r--src/mapi/glapi/glapi_sparc.S671
-rw-r--r--src/mapi/glapi/glapi_x86-64.S3192
-rw-r--r--src/mapi/glapi/glapi_x86.S975
-rw-r--r--src/mapi/glapi/glapitable.h617
-rw-r--r--src/mapi/glapi/glapitemp.h294
-rw-r--r--src/mapi/glapi/glprocs.h1478
-rw-r--r--src/mapi/glapi/sources.mak3
-rw-r--r--src/mapi/mapi/entry.c37
-rw-r--r--src/mapi/mapi/entry.h9
-rw-r--r--src/mapi/mapi/entry_x86-64_tls.h41
-rw-r--r--src/mapi/mapi/entry_x86_tls.h36
-rw-r--r--src/mapi/mapi/entry_x86_tsd.h24
-rw-r--r--src/mapi/mapi/mapi.c7
-rw-r--r--src/mapi/mapi/mapi_abi.py944
-rw-r--r--src/mapi/mapi/mapi_glapi.c240
-rw-r--r--src/mapi/mapi/mapi_tmp.h15
-rw-r--r--src/mapi/mapi/sources.mak30
-rw-r--r--src/mapi/mapi/stub.c43
-rw-r--r--src/mapi/mapi/stub.h17
-rw-r--r--src/mapi/mapi/table.c4
-rw-r--r--src/mapi/mapi/table.h16
-rw-r--r--src/mapi/mapi/u_current.c49
-rw-r--r--src/mapi/mapi/u_current.h51
-rw-r--r--src/mapi/mapi/u_thread.c11
-rw-r--r--src/mapi/mapi/u_thread.h2
-rw-r--r--src/mapi/shared-glapi/.gitignore2
-rw-r--r--src/mapi/shared-glapi/Makefile66
-rw-r--r--src/mapi/shared-glapi/SConscript116
-rw-r--r--src/mapi/shared-glapi/glapi_mapi_tmp.h22410
-rw-r--r--src/mapi/vgapi/Makefile5
-rw-r--r--src/mapi/vgapi/SConscript13
-rw-r--r--src/mesa/Android.mk43
-rw-r--r--src/mesa/Makefile124
-rw-r--r--src/mesa/SConscript82
-rw-r--r--src/mesa/drivers/Android.mk56
-rw-r--r--src/mesa/drivers/beos/GLView.cpp4
-rw-r--r--src/mesa/drivers/common/driverfuncs.c15
-rw-r--r--src/mesa/drivers/common/meta.c24
-rw-r--r--src/mesa/drivers/dri/Makefile.template15
-rw-r--r--src/mesa/drivers/dri/common/dri_metaops.c291
-rw-r--r--src/mesa/drivers/dri/common/dri_metaops.h81
-rw-r--r--src/mesa/drivers/dri/common/dri_util.c23
-rw-r--r--src/mesa/drivers/dri/common/dri_util.h6
-rw-r--r--src/mesa/drivers/dri/common/drisw_util.c45
-rw-r--r--src/mesa/drivers/dri/common/spantmp2.h122
-rw-r--r--src/mesa/drivers/dri/common/utils.c3
-rw-r--r--src/mesa/drivers/dri/i810/i810context.c2
-rw-r--r--src/mesa/drivers/dri/i810/i810state.c4
-rw-r--r--src/mesa/drivers/dri/i915/i830_reg.h4
-rw-r--r--src/mesa/drivers/dri/i915/i830_state.c21
-rw-r--r--src/mesa/drivers/dri/i915/i830_texstate.c31
-rw-r--r--src/mesa/drivers/dri/i915/i830_vtbl.c65
-rw-r--r--src/mesa/drivers/dri/i915/i915_context.c28
-rw-r--r--src/mesa/drivers/dri/i915/i915_context.h37
-rw-r--r--src/mesa/drivers/dri/i915/i915_fragprog.c61
-rw-r--r--src/mesa/drivers/dri/i915/i915_program.c51
-rw-r--r--src/mesa/drivers/dri/i915/i915_reg.h7
-rw-r--r--src/mesa/drivers/dri/i915/i915_state.c290
-rw-r--r--src/mesa/drivers/dri/i915/i915_texstate.c2
-rw-r--r--src/mesa/drivers/dri/i915/i915_vtbl.c89
-rw-r--r--src/mesa/drivers/dri/i915/intel_render.c2
-rw-r--r--src/mesa/drivers/dri/i915/intel_tris.c92
-rw-r--r--src/mesa/drivers/dri/i965/Makefile1
-rw-r--r--src/mesa/drivers/dri/i965/brw_cc.c128
-rw-r--r--src/mesa/drivers/dri/i965/brw_context.c16
-rw-r--r--src/mesa/drivers/dri/i965/brw_context.h61
-rw-r--r--src/mesa/drivers/dri/i965/brw_cubemap_normalize.cpp2
-rw-r--r--src/mesa/drivers/dri/i965/brw_curbe.c20
-rw-r--r--src/mesa/drivers/dri/i965/brw_defines.h95
-rw-r--r--src/mesa/drivers/dri/i965/brw_disasm.c2
-rw-r--r--src/mesa/drivers/dri/i965/brw_draw.c53
-rw-r--r--src/mesa/drivers/dri/i965/brw_draw_upload.c519
-rw-r--r--src/mesa/drivers/dri/i965/brw_eu.h3
-rw-r--r--src/mesa/drivers/dri/i965/brw_eu_emit.c56
-rw-r--r--src/mesa/drivers/dri/i965/brw_fallback.c43
-rw-r--r--src/mesa/drivers/dri/i965/brw_fs.cpp567
-rw-r--r--src/mesa/drivers/dri/i965/brw_fs.h70
-rw-r--r--src/mesa/drivers/dri/i965/brw_fs_channel_expressions.cpp2
-rw-r--r--src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp13
-rw-r--r--src/mesa/drivers/dri/i965/brw_fs_schedule_instructions.cpp488
-rw-r--r--src/mesa/drivers/dri/i965/brw_fs_vector_splitting.cpp14
-rw-r--r--src/mesa/drivers/dri/i965/brw_gs.c5
-rw-r--r--src/mesa/drivers/dri/i965/brw_misc_state.c94
-rw-r--r--src/mesa/drivers/dri/i965/brw_program.c4
-rw-r--r--src/mesa/drivers/dri/i965/brw_queryobj.c10
-rw-r--r--src/mesa/drivers/dri/i965/brw_state.h13
-rw-r--r--src/mesa/drivers/dri/i965/brw_state_batch.c82
-rw-r--r--src/mesa/drivers/dri/i965/brw_state_cache.c4
-rw-r--r--src/mesa/drivers/dri/i965/brw_state_dump.c49
-rw-r--r--src/mesa/drivers/dri/i965/brw_state_upload.c105
-rw-r--r--src/mesa/drivers/dri/i965/brw_structs.h37
-rw-r--r--src/mesa/drivers/dri/i965/brw_urb.c8
-rw-r--r--src/mesa/drivers/dri/i965/brw_util.c10
-rw-r--r--src/mesa/drivers/dri/i965/brw_util.h9
-rw-r--r--src/mesa/drivers/dri/i965/brw_vs.c3
-rw-r--r--src/mesa/drivers/dri/i965/brw_vs.h1
-rw-r--r--src/mesa/drivers/dri/i965/brw_vs_emit.c103
-rw-r--r--src/mesa/drivers/dri/i965/brw_vs_state.c9
-rw-r--r--src/mesa/drivers/dri/i965/brw_vs_surface_state.c26
-rw-r--r--src/mesa/drivers/dri/i965/brw_vtbl.c24
-rw-r--r--src/mesa/drivers/dri/i965/brw_wm.c11
-rw-r--r--src/mesa/drivers/dri/i965/brw_wm.h2
-rw-r--r--src/mesa/drivers/dri/i965/brw_wm_emit.c101
-rw-r--r--src/mesa/drivers/dri/i965/brw_wm_sampler_state.c44
-rw-r--r--src/mesa/drivers/dri/i965/brw_wm_state.c5
-rw-r--r--src/mesa/drivers/dri/i965/brw_wm_surface_state.c508
-rw-r--r--src/mesa/drivers/dri/i965/gen6_cc.c26
-rw-r--r--src/mesa/drivers/dri/i965/gen6_clip_state.c9
-rw-r--r--src/mesa/drivers/dri/i965/gen6_gs_state.c6
-rw-r--r--src/mesa/drivers/dri/i965/gen6_sampler_state.c2
-rw-r--r--src/mesa/drivers/dri/i965/gen6_scissor_state.c2
-rw-r--r--src/mesa/drivers/dri/i965/gen6_sf_state.c38
-rw-r--r--src/mesa/drivers/dri/i965/gen6_urb.c29
-rw-r--r--src/mesa/drivers/dri/i965/gen6_viewport_state.c2
-rw-r--r--src/mesa/drivers/dri/i965/gen6_vs_state.c10
-rw-r--r--src/mesa/drivers/dri/i965/gen6_wm_state.c9
-rw-r--r--src/mesa/drivers/dri/intel/intel_batchbuffer.c274
-rw-r--r--src/mesa/drivers/dri/intel/intel_batchbuffer.h127
-rw-r--r--src/mesa/drivers/dri/intel/intel_blit.c140
-rw-r--r--src/mesa/drivers/dri/intel/intel_blit.h4
-rw-r--r--src/mesa/drivers/dri/intel/intel_buffer_objects.c320
-rw-r--r--src/mesa/drivers/dri/intel/intel_buffer_objects.h23
-rw-r--r--src/mesa/drivers/dri/intel/intel_chipset.h4
-rw-r--r--src/mesa/drivers/dri/intel/intel_clear.c50
-rw-r--r--src/mesa/drivers/dri/intel/intel_context.c101
-rw-r--r--src/mesa/drivers/dri/intel/intel_context.h31
-rw-r--r--src/mesa/drivers/dri/intel/intel_decode.c2
-rw-r--r--src/mesa/drivers/dri/intel/intel_extensions.c8
-rw-r--r--src/mesa/drivers/dri/intel/intel_extensions_es2.c17
-rw-r--r--src/mesa/drivers/dri/intel/intel_fbo.c408
-rw-r--r--src/mesa/drivers/dri/intel/intel_mipmap_tree.c4
-rw-r--r--src/mesa/drivers/dri/intel/intel_mipmap_tree.h2
-rw-r--r--src/mesa/drivers/dri/intel/intel_pixel.c12
-rw-r--r--src/mesa/drivers/dri/intel/intel_pixel_bitmap.c5
-rw-r--r--src/mesa/drivers/dri/intel/intel_pixel_read.c15
-rw-r--r--src/mesa/drivers/dri/intel/intel_reg.h2
-rw-r--r--src/mesa/drivers/dri/intel/intel_regions.c20
-rw-r--r--src/mesa/drivers/dri/intel/intel_screen.c94
-rw-r--r--src/mesa/drivers/dri/intel/intel_screen.h1
-rw-r--r--src/mesa/drivers/dri/intel/intel_span.c82
-rw-r--r--src/mesa/drivers/dri/intel/intel_span.h4
-rw-r--r--src/mesa/drivers/dri/intel/intel_syncobj.c4
-rw-r--r--src/mesa/drivers/dri/intel/intel_tex.c1
-rw-r--r--src/mesa/drivers/dri/intel/intel_tex.h11
-rw-r--r--src/mesa/drivers/dri/intel/intel_tex_copy.c123
-rw-r--r--src/mesa/drivers/dri/intel/intel_tex_format.c239
-rw-r--r--src/mesa/drivers/dri/intel/intel_tex_image.c165
-rw-r--r--src/mesa/drivers/dri/intel/intel_tex_obj.h8
-rw-r--r--src/mesa/drivers/dri/intel/intel_tex_subimage.c23
-rw-r--r--src/mesa/drivers/dri/intel/intel_tex_validate.c123
-rw-r--r--src/mesa/drivers/dri/mach64/mach64_context.c2
-rw-r--r--src/mesa/drivers/dri/mach64/mach64_context.h6
-rw-r--r--src/mesa/drivers/dri/mach64/mach64_state.c4
-rw-r--r--src/mesa/drivers/dri/mga/mga_xmesa.c2
-rw-r--r--src/mesa/drivers/dri/mga/mgastate.c13
-rw-r--r--src/mesa/drivers/dri/nouveau/nouveau_context.c3
-rw-r--r--src/mesa/drivers/dri/nouveau/nouveau_driver.c2
-rw-r--r--src/mesa/drivers/dri/nouveau/nouveau_driver.h3
-rw-r--r--src/mesa/drivers/dri/nouveau/nouveau_fbo.c1
-rw-r--r--src/mesa/drivers/dri/nouveau/nouveau_texture.c6
-rw-r--r--src/mesa/drivers/dri/nouveau/nv04_state_raster.c12
-rw-r--r--src/mesa/drivers/dri/nouveau/nv10_state_raster.c6
-rw-r--r--src/mesa/drivers/dri/nouveau/nv10_state_tnl.c2
-rw-r--r--src/mesa/drivers/dri/nouveau/nv20_state_tnl.c2
-rw-r--r--src/mesa/drivers/dri/r128/r128_context.c2
-rw-r--r--src/mesa/drivers/dri/r128/r128_state.c9
-rw-r--r--src/mesa/drivers/dri/r200/r200_context.c1
-rw-r--r--src/mesa/drivers/dri/r200/r200_state.c16
-rw-r--r--src/mesa/drivers/dri/r200/r200_state_init.c2
-rw-r--r--src/mesa/drivers/dri/r200/r200_tex.c1
-rw-r--r--src/mesa/drivers/dri/r200/r200_texstate.c20
-rw-r--r--src/mesa/drivers/dri/r200/r200_vertprog.c2
-rw-r--r--src/mesa/drivers/dri/r300/compiler/r300_fragprog.c43
-rw-r--r--src/mesa/drivers/dri/r300/compiler/r300_fragprog_emit.c133
-rw-r--r--src/mesa/drivers/dri/r300/compiler/r300_fragprog_swizzle.c15
-rw-r--r--src/mesa/drivers/dri/r300/compiler/r3xx_fragprog.c23
-rw-r--r--src/mesa/drivers/dri/r300/compiler/r3xx_vertprog.c69
-rw-r--r--src/mesa/drivers/dri/r300/compiler/r500_fragprog.c6
-rw-r--r--src/mesa/drivers/dri/r300/compiler/r500_fragprog_emit.c4
-rw-r--r--src/mesa/drivers/dri/r300/compiler/radeon_code.h18
-rw-r--r--src/mesa/drivers/dri/r300/compiler/radeon_compiler.c15
-rw-r--r--src/mesa/drivers/dri/r300/compiler/radeon_compiler.h4
-rw-r--r--src/mesa/drivers/dri/r300/compiler/radeon_compiler_util.c37
-rw-r--r--src/mesa/drivers/dri/r300/compiler/radeon_compiler_util.h4
-rw-r--r--src/mesa/drivers/dri/r300/compiler/radeon_dataflow.c10
-rw-r--r--src/mesa/drivers/dri/r300/compiler/radeon_dataflow_deadcode.c45
-rw-r--r--src/mesa/drivers/dri/r300/compiler/radeon_dataflow_swizzles.c1
-rw-r--r--src/mesa/drivers/dri/r300/compiler/radeon_optimize.c14
-rw-r--r--src/mesa/drivers/dri/r300/compiler/radeon_pair_schedule.c17
-rw-r--r--src/mesa/drivers/dri/r300/compiler/radeon_pair_translate.c23
-rw-r--r--src/mesa/drivers/dri/r300/compiler/radeon_program.h6
-rw-r--r--src/mesa/drivers/dri/r300/compiler/radeon_program_alu.c4
-rw-r--r--src/mesa/drivers/dri/r300/compiler/radeon_program_pair.c22
-rw-r--r--src/mesa/drivers/dri/r300/compiler/radeon_program_pair.h2
-rw-r--r--src/mesa/drivers/dri/r300/compiler/radeon_program_print.c4
-rw-r--r--src/mesa/drivers/dri/r300/compiler/radeon_program_tex.c99
-rw-r--r--src/mesa/drivers/dri/r300/compiler/radeon_rename_regs.c8
-rw-r--r--src/mesa/drivers/dri/r300/r300_blit.c3
-rw-r--r--src/mesa/drivers/dri/r300/r300_context.c1
-rw-r--r--src/mesa/drivers/dri/r300/r300_fragprog_common.c1
-rw-r--r--src/mesa/drivers/dri/r300/r300_reg.h44
-rw-r--r--src/mesa/drivers/dri/r300/r300_state.c22
-rw-r--r--src/mesa/drivers/dri/r300/r300_tex.c1
-rw-r--r--src/mesa/drivers/dri/r300/radeon_mesa_to_rc.c1
-rw-r--r--src/mesa/drivers/dri/r600/evergreen_blit.c88
-rw-r--r--src/mesa/drivers/dri/r600/evergreen_fragprog.c25
-rw-r--r--src/mesa/drivers/dri/r600/evergreen_state.c47
-rw-r--r--src/mesa/drivers/dri/r600/r600_context.c3
-rw-r--r--src/mesa/drivers/dri/r600/r600_tex.c5
-rw-r--r--src/mesa/drivers/dri/r600/r700_assembler.c85
-rw-r--r--src/mesa/drivers/dri/r600/r700_fragprog.c46
-rw-r--r--src/mesa/drivers/dri/r600/r700_state.c23
-rw-r--r--src/mesa/drivers/dri/r600/r700_vertprog.c11
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_bocs_wrapper.h3
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_chipset.h43
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_common.c2
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_common_context.c10
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_common_context.h3
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_context.c1
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_fbo.c3
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_queryobj.c8
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_screen.c49
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_span.c8
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_state.c28
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_state_init.c2
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_tex.c1
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_texstate.c13
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_texture.c2
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_texture.h1
-rw-r--r--src/mesa/drivers/dri/savage/savage_xmesa.c2
-rw-r--r--src/mesa/drivers/dri/savage/savagestate.c15
-rw-r--r--src/mesa/drivers/dri/sis/sis6326_state.c3
-rw-r--r--src/mesa/drivers/dri/sis/sis_context.c2
-rw-r--r--src/mesa/drivers/dri/sis/sis_state.c3
-rw-r--r--src/mesa/drivers/dri/swrast/swrast.c85
-rw-r--r--src/mesa/drivers/dri/tdfx/tdfx_context.c2
-rw-r--r--src/mesa/drivers/dri/tdfx/tdfx_state.c12
-rw-r--r--src/mesa/drivers/dri/unichrome/via_context.c2
-rw-r--r--src/mesa/drivers/dri/unichrome/via_state.c20
-rw-r--r--src/mesa/drivers/dri/unichrome/via_tex.c1
-rw-r--r--src/mesa/drivers/fbdev/glfbdev.c2
-rw-r--r--src/mesa/drivers/osmesa/Makefile2
-rw-r--r--src/mesa/drivers/osmesa/osmesa.c3
-rw-r--r--src/mesa/drivers/windows/gdi/wmesa.c3
-rw-r--r--src/mesa/drivers/windows/gldirect/dglcontext.c2
-rw-r--r--src/mesa/drivers/windows/gldirect/dx7/gld_driver_dx7.c2
-rw-r--r--src/mesa/drivers/windows/gldirect/dx7/gld_primitive_dx7.c1
-rw-r--r--src/mesa/drivers/windows/gldirect/dx8/gld_driver_dx8.c2
-rw-r--r--src/mesa/drivers/windows/gldirect/dx8/gld_primitive_dx8.c1
-rw-r--r--src/mesa/drivers/windows/gldirect/dx9/gld_driver_dx9.c2
-rw-r--r--src/mesa/drivers/windows/gldirect/dx9/gld_primitive_dx9.c1
-rw-r--r--src/mesa/drivers/windows/gldirect/mesasw/gld_wgl_mesasw.c1
-rw-r--r--src/mesa/drivers/x11/Makefile3
-rw-r--r--src/mesa/drivers/x11/fakeglx.c8
-rw-r--r--src/mesa/drivers/x11/xm_api.c6
-rw-r--r--src/mesa/drivers/x11/xm_dd.c1
-rw-r--r--src/mesa/drivers/x11/xmesa.h2
-rw-r--r--src/mesa/gl.pc.in1
-rw-r--r--src/mesa/main/.gitignore2
-rw-r--r--src/mesa/main/APIspec.xml71
-rw-r--r--src/mesa/main/accum.c2
-rw-r--r--src/mesa/main/api_arrayelt.c2
-rw-r--r--src/mesa/main/api_arrayelt.h1
-rw-r--r--src/mesa/main/api_exec.c16
-rw-r--r--src/mesa/main/api_exec_es1.c71
-rw-r--r--src/mesa/main/api_exec_es2.c73
-rw-r--r--src/mesa/main/api_noop.c1
-rw-r--r--src/mesa/main/api_noop.h1
-rw-r--r--src/mesa/main/api_validate.c16
-rw-r--r--src/mesa/main/arrayobj.c4
-rw-r--r--src/mesa/main/atifragshader.c2
-rw-r--r--src/mesa/main/attrib.c59
-rw-r--r--src/mesa/main/blend.c517
-rw-r--r--src/mesa/main/blend.h17
-rw-r--r--src/mesa/main/bufferobj.c259
-rw-r--r--src/mesa/main/bufferobj.h42
-rw-r--r--src/mesa/main/buffers.c1
-rw-r--r--src/mesa/main/clear.c1
-rw-r--r--src/mesa/main/colormac.h11
-rw-r--r--src/mesa/main/colortab.c129
-rw-r--r--src/mesa/main/condrender.c1
-rw-r--r--src/mesa/main/context.c112
-rw-r--r--src/mesa/main/context.h49
-rw-r--r--src/mesa/main/convolve.c1
-rw-r--r--src/mesa/main/cpuinfo.c2
-rw-r--r--src/mesa/main/dd.h15
-rw-r--r--src/mesa/main/debug.c47
-rw-r--r--src/mesa/main/debug.h3
-rw-r--r--src/mesa/main/depth.c12
-rw-r--r--src/mesa/main/depth.h3
-rw-r--r--src/mesa/main/dlist.c166
-rw-r--r--src/mesa/main/dlist.h1
-rw-r--r--src/mesa/main/drawpix.c23
-rw-r--r--src/mesa/main/drawtex.c6
-rw-r--r--src/mesa/main/enable.c30
-rw-r--r--src/mesa/main/enums.c224
-rw-r--r--src/mesa/main/enums.h2
-rw-r--r--src/mesa/main/eval.c1
-rw-r--r--src/mesa/main/eval.h1
-rw-r--r--src/mesa/main/extensions.c1039
-rw-r--r--src/mesa/main/fbobject.c307
-rw-r--r--src/mesa/main/fbobject.h6
-rw-r--r--src/mesa/main/feedback.c1
-rw-r--r--src/mesa/main/feedback.h1
-rw-r--r--src/mesa/main/ff_fragment_shader.cpp (renamed from src/mesa/main/texenvprogram.c)18
-rw-r--r--src/mesa/main/ffvertex_prog.c1
-rw-r--r--src/mesa/main/formats.c236
-rw-r--r--src/mesa/main/formats.h25
-rw-r--r--src/mesa/main/framebuffer.c15
-rw-r--r--src/mesa/main/framebuffer.h3
-rw-r--r--src/mesa/main/get.c115
-rw-r--r--src/mesa/main/getstring.c2
-rw-r--r--src/mesa/main/glapidispatch.h1282
-rw-r--r--src/mesa/main/glheader.h4
-rw-r--r--src/mesa/main/hint.c6
-rw-r--r--src/mesa/main/histogram.c1
-rw-r--r--src/mesa/main/image.c21
-rw-r--r--src/mesa/main/imports.c16
-rw-r--r--src/mesa/main/imports.h19
-rw-r--r--src/mesa/main/lines.c6
-rw-r--r--src/mesa/main/matrix.c1
-rw-r--r--src/mesa/main/mipmap.c71
-rw-r--r--src/mesa/main/mtypes.h237
-rw-r--r--src/mesa/main/multisample.c1
-rw-r--r--src/mesa/main/nvprogram.c1
-rw-r--r--src/mesa/main/pack.c1
-rw-r--r--src/mesa/main/pbo.c372
-rw-r--r--src/mesa/main/pbo.h92
-rw-r--r--src/mesa/main/pixel.c5
-rw-r--r--src/mesa/main/pixelstore.c1
-rw-r--r--src/mesa/main/pixeltransfer.c1
-rw-r--r--src/mesa/main/polygon.c2
-rw-r--r--src/mesa/main/queryobj.c79
-rw-r--r--src/mesa/main/queryobj.h1
-rw-r--r--src/mesa/main/rastpos.c2
-rw-r--r--src/mesa/main/readpix.c10
-rw-r--r--src/mesa/main/remap_helper.h4001
-rw-r--r--src/mesa/main/renderbuffer.c13
-rw-r--r--src/mesa/main/renderbuffer.h6
-rw-r--r--src/mesa/main/scissor.c1
-rw-r--r--src/mesa/main/shaderapi.c83
-rw-r--r--src/mesa/main/shaderobj.c20
-rw-r--r--src/mesa/main/shared.c1
-rw-r--r--src/mesa/main/state.c8
-rw-r--r--src/mesa/main/state.h39
-rw-r--r--src/mesa/main/stencil.c24
-rw-r--r--src/mesa/main/syncobj.c2
-rw-r--r--src/mesa/main/texcompress.c41
-rw-r--r--src/mesa/main/texcompress_fxt1.c1
-rw-r--r--src/mesa/main/texcompress_fxt1.h1
-rw-r--r--src/mesa/main/texcompress_rgtc.c460
-rw-r--r--src/mesa/main/texcompress_rgtc.h77
-rw-r--r--src/mesa/main/texcompress_rgtc_tmp.h418
-rw-r--r--src/mesa/main/texcompress_s3tc.c2
-rw-r--r--src/mesa/main/texenv.c1
-rw-r--r--src/mesa/main/texfetch.c124
-rw-r--r--src/mesa/main/texfetch.h5
-rw-r--r--src/mesa/main/texfetch_tmp.h148
-rw-r--r--src/mesa/main/texformat.c376
-rw-r--r--src/mesa/main/texgen.c1
-rw-r--r--src/mesa/main/texgen.h1
-rw-r--r--src/mesa/main/texgetimage.c17
-rw-r--r--src/mesa/main/teximage.c81
-rw-r--r--src/mesa/main/teximage.h2
-rw-r--r--src/mesa/main/texobj.c7
-rw-r--r--src/mesa/main/texpal.c1
-rw-r--r--src/mesa/main/texparam.c212
-rw-r--r--src/mesa/main/texrender.c42
-rw-r--r--src/mesa/main/texstate.c3
-rw-r--r--src/mesa/main/texstore.c307
-rw-r--r--src/mesa/main/texstore.h27
-rw-r--r--src/mesa/main/texturebarrier.c54
-rw-r--r--src/mesa/main/texturebarrier.h44
-rw-r--r--src/mesa/main/transformfeedback.c2
-rw-r--r--src/mesa/main/uniforms.c73
-rw-r--r--src/mesa/main/varray.c115
-rw-r--r--src/mesa/main/varray.h4
-rw-r--r--src/mesa/main/version.c3
-rw-r--r--src/mesa/main/version.h6
-rw-r--r--src/mesa/main/viewport.c7
-rw-r--r--src/mesa/main/viewport.h3
-rw-r--r--src/mesa/main/vtxfmt.c1
-rw-r--r--src/mesa/main/vtxfmt.h1
-rw-r--r--src/mesa/program/.gitignore3
-rw-r--r--src/mesa/program/Makefile7
-rw-r--r--src/mesa/program/arbprogparse.h6
-rw-r--r--src/mesa/program/ir_to_mesa.cpp384
-rw-r--r--src/mesa/program/ir_to_mesa.h7
-rw-r--r--src/mesa/program/lex.yy.c422
-rw-r--r--src/mesa/program/nvfragparse.h5
-rw-r--r--src/mesa/program/nvvertparse.h5
-rw-r--r--src/mesa/program/prog_cache.c53
-rw-r--r--src/mesa/program/prog_cache.h12
-rw-r--r--src/mesa/program/prog_execute.c16
-rw-r--r--src/mesa/program/prog_execute.h1
-rw-r--r--src/mesa/program/prog_instruction.h2
-rw-r--r--src/mesa/program/prog_optimize.h3
-rw-r--r--src/mesa/program/prog_print.c5
-rw-r--r--src/mesa/program/prog_statevars.h4
-rw-r--r--src/mesa/program/program.c8
-rw-r--r--src/mesa/program/program_parse.tab.c1528
-rw-r--r--src/mesa/program/program_parse.tab.h151
-rw-r--r--src/mesa/program/program_parse.y4
-rw-r--r--src/mesa/program/register_allocate.c122
-rw-r--r--src/mesa/program/sampler.cpp21
-rw-r--r--src/mesa/sources.mak16
-rw-r--r--src/mesa/state_tracker/st_atom.c4
-rw-r--r--src/mesa/state_tracker/st_atom_blend.c44
-rw-r--r--src/mesa/state_tracker/st_atom_constbuf.c27
-rw-r--r--src/mesa/state_tracker/st_atom_framebuffer.c6
-rw-r--r--src/mesa/state_tracker/st_atom_pixeltransfer.c4
-rw-r--r--src/mesa/state_tracker/st_atom_rasterizer.c14
-rw-r--r--src/mesa/state_tracker/st_atom_sampler.c46
-rw-r--r--src/mesa/state_tracker/st_atom_shader.c145
-rw-r--r--src/mesa/state_tracker/st_atom_texture.c44
-rw-r--r--src/mesa/state_tracker/st_atom_viewport.c4
-rw-r--r--src/mesa/state_tracker/st_cb_accum.c18
-rw-r--r--src/mesa/state_tracker/st_cb_accum.h6
-rw-r--r--src/mesa/state_tracker/st_cb_bitmap.c149
-rw-r--r--src/mesa/state_tracker/st_cb_bitmap.h9
-rw-r--r--src/mesa/state_tracker/st_cb_blit.c2
-rw-r--r--src/mesa/state_tracker/st_cb_blit.h1
-rw-r--r--src/mesa/state_tracker/st_cb_bufferobjects.c53
-rw-r--r--src/mesa/state_tracker/st_cb_clear.c90
-rw-r--r--src/mesa/state_tracker/st_cb_drawpixels.c347
-rw-r--r--src/mesa/state_tracker/st_cb_drawpixels.h11
-rw-r--r--src/mesa/state_tracker/st_cb_drawtex.c8
-rw-r--r--src/mesa/state_tracker/st_cb_drawtex.h1
-rw-r--r--src/mesa/state_tracker/st_cb_eglimage.c1
-rw-r--r--src/mesa/state_tracker/st_cb_eglimage.h1
-rw-r--r--src/mesa/state_tracker/st_cb_fbo.c51
-rw-r--r--src/mesa/state_tracker/st_cb_feedback.c1
-rw-r--r--src/mesa/state_tracker/st_cb_feedback.h1
-rw-r--r--src/mesa/state_tracker/st_cb_flush.c11
-rw-r--r--src/mesa/state_tracker/st_cb_flush.h2
-rw-r--r--src/mesa/state_tracker/st_cb_program.c112
-rw-r--r--src/mesa/state_tracker/st_cb_program.h5
-rw-r--r--src/mesa/state_tracker/st_cb_queryobj.c3
-rw-r--r--src/mesa/state_tracker/st_cb_queryobj.h1
-rw-r--r--src/mesa/state_tracker/st_cb_rasterpos.c1
-rw-r--r--src/mesa/state_tracker/st_cb_rasterpos.h1
-rw-r--r--src/mesa/state_tracker/st_cb_readpixels.c21
-rw-r--r--src/mesa/state_tracker/st_cb_readpixels.h4
-rw-r--r--src/mesa/state_tracker/st_cb_syncobj.c122
-rw-r--r--src/mesa/state_tracker/st_cb_syncobj.h38
-rw-r--r--src/mesa/state_tracker/st_cb_texture.c345
-rw-r--r--src/mesa/state_tracker/st_cb_texture.h3
-rw-r--r--src/mesa/state_tracker/st_cb_texturebarrier.c (renamed from src/gallium/targets/dri-noop/swrast_drm_api.c)53
-rw-r--r--src/mesa/state_tracker/st_cb_texturebarrier.h37
-rw-r--r--src/mesa/state_tracker/st_cb_xformfb.c1
-rw-r--r--src/mesa/state_tracker/st_cb_xformfb.h1
-rw-r--r--src/mesa/state_tracker/st_context.c20
-rw-r--r--src/mesa/state_tracker/st_context.h26
-rw-r--r--src/mesa/state_tracker/st_debug.c4
-rw-r--r--src/mesa/state_tracker/st_draw.c364
-rw-r--r--src/mesa/state_tracker/st_draw.h3
-rw-r--r--src/mesa/state_tracker/st_draw_feedback.c47
-rw-r--r--src/mesa/state_tracker/st_extensions.c112
-rw-r--r--src/mesa/state_tracker/st_format.c430
-rw-r--r--src/mesa/state_tracker/st_format.h9
-rw-r--r--src/mesa/state_tracker/st_gen_mipmap.c116
-rw-r--r--src/mesa/state_tracker/st_gen_mipmap.h4
-rw-r--r--src/mesa/state_tracker/st_manager.c31
-rw-r--r--src/mesa/state_tracker/st_mesa_to_tgsi.c53
-rw-r--r--src/mesa/state_tracker/st_mesa_to_tgsi.h16
-rw-r--r--src/mesa/state_tracker/st_program.c838
-rw-r--r--src/mesa/state_tracker/st_program.h139
-rw-r--r--src/mesa/state_tracker/st_texture.c96
-rw-r--r--src/mesa/state_tracker/st_texture.h26
-rw-r--r--src/mesa/swrast/s_aaline.h2
-rw-r--r--src/mesa/swrast/s_aatriangle.c3
-rw-r--r--src/mesa/swrast/s_aatriangle.h2
-rw-r--r--src/mesa/swrast/s_accum.h3
-rw-r--r--src/mesa/swrast/s_alpha.h4
-rw-r--r--src/mesa/swrast/s_atifragshader.h2
-rw-r--r--src/mesa/swrast/s_bitmap.c1
-rw-r--r--src/mesa/swrast/s_blend.c92
-rw-r--r--src/mesa/swrast/s_blend.h5
-rw-r--r--src/mesa/swrast/s_depth.h5
-rw-r--r--src/mesa/swrast/s_drawpix.c1
-rw-r--r--src/mesa/swrast/s_fog.h3
-rw-r--r--src/mesa/swrast/s_fragprog.h3
-rw-r--r--src/mesa/swrast/s_logic.h4
-rw-r--r--src/mesa/swrast/s_masking.h5
-rw-r--r--src/mesa/swrast/s_readpix.c2
-rw-r--r--src/mesa/swrast/s_span.h7
-rw-r--r--src/mesa/swrast/s_texcombine.c5
-rw-r--r--src/mesa/swrast/s_texcombine.h3
-rw-r--r--src/mesa/swrast/s_texfilter.c68
-rw-r--r--src/mesa/swrast/s_texfilter.h4
-rw-r--r--src/mesa/swrast/s_triangle.c7
-rw-r--r--src/mesa/swrast_setup/ss_triangle.h2
-rw-r--r--src/mesa/swrast_setup/ss_vb.h2
-rw-r--r--src/mesa/tnl/t_context.c3
-rw-r--r--src/mesa/tnl/t_context.h2
-rw-r--r--src/mesa/tnl/t_draw.c67
-rw-r--r--src/mesa/tnl/t_vb_program.c37
-rw-r--r--src/mesa/tnl/t_vertex.h5
-rw-r--r--src/mesa/tnl/t_vp_build.c2
-rw-r--r--src/mesa/tnl/t_vp_build.h2
-rw-r--r--src/mesa/tnl/tnl.h5
-rw-r--r--src/mesa/vbo/vbo.h13
-rw-r--r--src/mesa/vbo/vbo_attrib_tmp.h46
-rw-r--r--src/mesa/vbo/vbo_context.c1
-rw-r--r--src/mesa/vbo/vbo_context.h1
-rw-r--r--src/mesa/vbo/vbo_exec.h14
-rw-r--r--src/mesa/vbo/vbo_exec_api.c212
-rw-r--r--src/mesa/vbo/vbo_exec_array.c81
-rw-r--r--src/mesa/vbo/vbo_exec_draw.c27
-rw-r--r--src/mesa/vbo/vbo_save.c1
-rw-r--r--src/mesa/vbo/vbo_save.h5
-rw-r--r--src/mesa/vbo/vbo_save_api.c63
-rw-r--r--src/mesa/vbo/vbo_save_draw.c2
-rw-r--r--src/mesa/vbo/vbo_save_loopback.c1
-rw-r--r--src/mesa/vbo/vbo_split_copy.c1
-rw-r--r--src/mesa/vbo/vbo_split_inplace.c2
-rw-r--r--src/mesa/x86-64/xform4.S14
-rw-r--r--src/mesa/x86/mmx.h4
-rw-r--r--src/mesa/x86/read_rgba_span_x86.S10
-rw-r--r--src/talloc/Android.mk13
-rw-r--r--src/talloc/SConscript20
-rw-r--r--src/talloc/gpl-3.0.txt674
-rw-r--r--src/talloc/lgpl-3.0.txt165
-rw-r--r--src/talloc/talloc.c2034
-rw-r--r--src/talloc/talloc.def63
-rw-r--r--src/talloc/talloc.h202
-rw-r--r--src/talloc/talloc_guide.txt757
1509 files changed, 139602 insertions, 106978 deletions
diff --git a/Makefile b/Makefile
index 30269194f4b..a1ab65ef0c4 100644
--- a/Makefile
+++ b/Makefile
@@ -180,7 +180,7 @@ ultrix-gcc:
# Rules for making release tarballs
-VERSION=7.10-devel
+VERSION=7.11-devel
DIRECTORY = Mesa-$(VERSION)
LIB_NAME = MesaLib-$(VERSION)
GLUT_NAME = MesaGLUT-$(VERSION)
@@ -209,7 +209,6 @@ MAIN_FILES = \
$(DIRECTORY)/docs/README.* \
$(DIRECTORY)/docs/RELNOTES* \
$(DIRECTORY)/docs/*.spec \
- $(DIRECTORY)/include/GL/internal/glcore.h \
$(DIRECTORY)/include/GL/gl.h \
$(DIRECTORY)/include/GL/glext.h \
$(DIRECTORY)/include/GL/gl_mangle.h \
@@ -232,6 +231,7 @@ MAIN_FILES = \
$(DIRECTORY)/src/glsl/README \
$(DIRECTORY)/src/glsl/glcpp/*.[chly] \
$(DIRECTORY)/src/glsl/glcpp/README \
+ $(DIRECTORY)/src/glsl/builtins \
$(DIRECTORY)/src/Makefile \
$(DIRECTORY)/src/mesa/Makefile* \
$(DIRECTORY)/src/mesa/sources.mak \
@@ -283,8 +283,7 @@ MAIN_FILES = \
$(DIRECTORY)/src/mesa/x86/*.S \
$(DIRECTORY)/src/mesa/x86/rtasm/*.[ch] \
$(DIRECTORY)/src/mesa/x86-64/*.[chS] \
- $(DIRECTORY)/src/mesa/x86-64/Makefile \
- $(DIRECTORY)/windows/VC8/
+ $(DIRECTORY)/src/mesa/x86-64/Makefile
MAPI_FILES = \
$(DIRECTORY)/include/GLES/*.h \
@@ -308,8 +307,7 @@ MAPI_FILES = \
$(DIRECTORY)/src/mapi/mapi/*.[ch] \
$(DIRECTORY)/src/mapi/vgapi/Makefile \
$(DIRECTORY)/src/mapi/vgapi/vgapi.csv \
- $(DIRECTORY)/src/mapi/vgapi/vg.pc.in \
- $(DIRECTORY)/src/mapi/vgapi/*.h
+ $(DIRECTORY)/src/mapi/vgapi/vg.pc.in
EGL_FILES = \
$(DIRECTORY)/include/KHR/*.h \
@@ -422,10 +420,22 @@ LIB_FILES = \
$(GLW_FILES)
+parsers: configure
+ -@touch $(TOP)/configs/current
+ $(MAKE) -C src/glsl glsl_parser.cpp glsl_parser.h glsl_lexer.cpp
+ $(MAKE) -C src/glsl/glcpp glcpp-lex.c glcpp-parse.c glcpp-parse.h
+ $(MAKE) -C src/mesa/program lex.yy.c program_parse.tab.c program_parse.tab.h
+
# Everything for new a Mesa release:
-tarballs: rm_depend configure aclocal.m4 lib_gz glut_gz \
- lib_bz2 glut_bz2 lib_zip glut_zip md5
+ARCHIVES = $(LIB_NAME).tar.gz \
+ $(LIB_NAME).tar.bz2 \
+ $(LIB_NAME).zip \
+ $(GLUT_NAME).tar.gz \
+ $(GLUT_NAME).tar.bz2 \
+ $(GLUT_NAME).zip
+tarballs: md5
+ rm -f ../$(LIB_NAME).tar
# Helper for autoconf builds
ACLOCAL = aclocal
@@ -434,7 +444,7 @@ AUTOCONF = autoconf
AC_FLAGS =
aclocal.m4: configure.ac acinclude.m4
$(ACLOCAL) $(ACLOCAL_FLAGS)
-configure: configure.ac aclocal.m4 acinclude.m4
+configure: rm_depend configure.ac aclocal.m4 acinclude.m4
$(AUTOCONF) $(AC_FLAGS)
rm_depend:
@@ -443,47 +453,41 @@ rm_depend:
touch $$dep ; \
done
-rm_config:
+rm_config: parsers
rm -f configs/current
rm -f configs/autoconf
-lib_gz: rm_config
- cd .. ; \
- tar -cf $(LIB_NAME).tar $(LIB_FILES) ; \
- gzip $(LIB_NAME).tar ; \
- mv $(LIB_NAME).tar.gz $(DIRECTORY)
+$(LIB_NAME).tar: rm_config
+ cd .. ; tar -cf $(DIRECTORY)/$(LIB_NAME).tar $(LIB_FILES)
-glut_gz:
- cd .. ; \
- tar -cf $(GLUT_NAME).tar $(GLUT_FILES) ; \
- gzip $(GLUT_NAME).tar ; \
- mv $(GLUT_NAME).tar.gz $(DIRECTORY)
+$(LIB_NAME).tar.gz: $(LIB_NAME).tar
+ gzip --stdout --best $(LIB_NAME).tar > $(LIB_NAME).tar.gz
-lib_bz2: rm_config
- cd .. ; \
- tar -cf $(LIB_NAME).tar $(LIB_FILES) ; \
- bzip2 $(LIB_NAME).tar ; \
- mv $(LIB_NAME).tar.bz2 $(DIRECTORY)
+$(GLUT_NAME).tar: rm_depend
+ cd .. ; tar -cf $(DIRECTORY)/$(GLUT_NAME).tar $(GLUT_FILES)
-glut_bz2:
- cd .. ; \
- tar -cf $(GLUT_NAME).tar $(GLUT_FILES) ; \
- bzip2 $(GLUT_NAME).tar ; \
- mv $(GLUT_NAME).tar.bz2 $(DIRECTORY)
+$(GLUT_NAME).tar.gz: $(GLUT_NAME).tar
+ gzip --stdout --best $(GLUT_NAME).tar > $(GLUT_NAME).tar.gz
+
+$(LIB_NAME).tar.bz2: $(LIB_NAME).tar
+ bzip2 --stdout --best $(LIB_NAME).tar > $(LIB_NAME).tar.bz2
+
+$(GLUT_NAME).tar.bz2: $(GLUT_NAME).tar
+ bzip2 --stdout --best $(GLUT_NAME).tar > $(GLUT_NAME).tar.bz2
-lib_zip: rm_config
+$(LIB_NAME).zip: rm_config
rm -f $(LIB_NAME).zip ; \
cd .. ; \
zip -qr $(LIB_NAME).zip $(LIB_FILES) ; \
mv $(LIB_NAME).zip $(DIRECTORY)
-glut_zip:
+$(GLUT_NAME).zip:
rm -f $(GLUT_NAME).zip ; \
cd .. ; \
zip -qr $(GLUT_NAME).zip $(GLUT_FILES) ; \
mv $(GLUT_NAME).zip $(DIRECTORY)
-md5:
+md5: $(ARCHIVES)
@-md5sum $(LIB_NAME).tar.gz
@-md5sum $(LIB_NAME).tar.bz2
@-md5sum $(LIB_NAME).zip
@@ -491,7 +495,4 @@ md5:
@-md5sum $(GLUT_NAME).tar.bz2
@-md5sum $(GLUT_NAME).zip
-.PHONY: tarballs rm_depend rm_config md5 \
- lib_gz glut_gz \
- lib_bz2 glut_bz2 \
- lib_zip glut_zip
+.PHONY: tarballs rm_depend rm_config md5
diff --git a/SConstruct b/SConstruct
index 8880d851e64..8607d2cd8e0 100644
--- a/SConstruct
+++ b/SConstruct
@@ -56,6 +56,12 @@ else:
Help(opts.GenerateHelpText(env))
+# fail early for a common error on windows
+if env['gles']:
+ try:
+ import libxml2
+ except ImportError:
+ raise SCons.Errors.UserError, "GLES requires libxml2-python to build"
#######################################################################
# Environment setup
@@ -115,8 +121,51 @@ if env['platform'] in ('posix', 'linux', 'freebsd', 'darwin'):
# for debugging
#print env.Dump()
-Export('env')
+#######################################################################
+# Invoke host SConscripts
+#
+# For things that are meant to be run on the native host build machine, instead
+# of the target machine.
+#
+
+# Create host environent
+if env['crosscompile'] and env['platform'] != 'embedded':
+ host_env = Environment(
+ options = opts,
+ # no tool used
+ tools = [],
+ toolpath = ['#scons'],
+ ENV = os.environ,
+ )
+
+ # Override options
+ host_env['platform'] = common.host_platform
+ host_env['machine'] = common.host_machine
+ host_env['toolchain'] = 'default'
+ host_env['llvm'] = False
+
+ host_env.Tool('gallium')
+
+ host_env['hostonly'] = True
+ assert host_env['crosscompile'] == False
+
+ if host_env['msvc']:
+ host_env.Append(CPPPATH = ['#include/c99'])
+
+ target_env = env
+ env = host_env
+ Export('env')
+
+ SConscript(
+ 'src/SConscript',
+ variant_dir = host_env['build_dir'],
+ duplicate = 0, # http://www.scons.org/doc/0.97/HTML/scons-user/x2261.html
+ )
+
+ env = target_env
+
+Export('env')
#######################################################################
# Invoke SConscripts
diff --git a/bin/mklib b/bin/mklib
index 2f9223ff3c1..a511375e20e 100755
--- a/bin/mklib
+++ b/bin/mklib
@@ -307,7 +307,7 @@ fi
#
case $ARCH in
- 'Linux' | 'OpenBSD' | 'DragonFly' | 'GNU' | GNU/*)
+ 'Linux' | 'OpenBSD' | 'DragonFly' | 'GNU' | GNU/* | 'NetBSD')
# we assume gcc
if [ "x$LINK" = "x" ] ; then
@@ -574,20 +574,6 @@ case $ARCH in
fi
;;
- 'NetBSD')
- if [ $STATIC = 1 ] ; then
- LIBNAME="lib${LIBNAME}_pic.a"
- echo "mklib: Making NetBSD PIC static library: " ${LIBNAME}
- FINAL_LIBS=`make_ar_static_lib cq 1 ${LIBNAME} ${OBJECTS}`
- else
- LIBNAME="lib${LIBNAME}.so.${MAJOR}.${MINOR}"
- echo "mklib: Making NetBSD PIC shared library: " ${LIBNAME}
- rm -f ${LIBNAME}
- ld -x -Bshareable -Bforcearchive -o ${LIBNAME} ${OBJECTS}
- FINAL_LIBS=${LIBNAME}
- fi
- ;;
-
'IRIX' | 'IRIX64')
if [ $STATIC = 1 ] ; then
LIBNAME="lib${LIBNAME}.a"
diff --git a/common.py b/common.py
index 78e2d0fb24f..0a3dcdcf543 100644
--- a/common.py
+++ b/common.py
@@ -14,22 +14,16 @@ import SCons.Script.SConscript
#######################################################################
# Defaults
-_platform_map = {
- 'linux2': 'linux',
- 'win32': 'windows',
-}
-
-default_platform = sys.platform
-default_platform = _platform_map.get(default_platform, default_platform)
+host_platform = _platform.system().lower()
+if host_platform.startswith('cygwin'):
+ host_platform = 'cygwin'
# Search sys.argv[] for a "platform=foo" argument since we don't have
# an 'env' variable at this point.
if 'platform' in SCons.Script.ARGUMENTS:
- selected_platform = SCons.Script.ARGUMENTS['platform']
+ target_platform = SCons.Script.ARGUMENTS['platform']
else:
- selected_platform = default_platform
-
-cross_compiling = selected_platform != default_platform
+ target_platform = host_platform
_machine_map = {
'x86': 'x86',
@@ -38,19 +32,22 @@ _machine_map = {
'i586': 'x86',
'i686': 'x86',
'ppc' : 'ppc',
+ 'AMD64': 'x86_64',
'x86_64': 'x86_64',
}
-# find default_machine value
+# find host_machine value
if 'PROCESSOR_ARCHITECTURE' in os.environ:
- default_machine = os.environ['PROCESSOR_ARCHITECTURE']
+ host_machine = os.environ['PROCESSOR_ARCHITECTURE']
else:
- default_machine = _platform.machine()
-default_machine = _machine_map.get(default_machine, 'generic')
+ host_machine = _platform.machine()
+host_machine = _machine_map.get(host_machine, 'generic')
+
+default_machine = host_machine
default_toolchain = 'default'
-if selected_platform == 'windows' and cross_compiling:
+if target_platform == 'windows' and host_platform != 'windows':
default_machine = 'x86'
default_toolchain = 'crossmingw'
@@ -61,7 +58,7 @@ if 'LLVM' in os.environ:
else:
default_llvm = 'no'
try:
- if selected_platform != 'windows' and \
+ if target_platform != 'windows' and \
subprocess.call(['llvm-config', '--version'], stdout=subprocess.PIPE) == 0:
default_llvm = 'yes'
except:
@@ -85,9 +82,10 @@ def AddOptions(opts):
opts.Add(BoolOption('quiet', 'quiet command lines', 'yes'))
opts.Add(EnumOption('machine', 'use machine-specific assembly code', default_machine,
allowed_values=('generic', 'ppc', 'x86', 'x86_64')))
- opts.Add(EnumOption('platform', 'target platform', default_platform,
- allowed_values=('linux', 'cell', 'windows', 'winddk', 'wince', 'darwin', 'embedded', 'cygwin', 'sunos5', 'freebsd8')))
+ opts.Add(EnumOption('platform', 'target platform', host_platform,
+ allowed_values=('linux', 'cell', 'windows', 'winddk', 'wince', 'darwin', 'embedded', 'cygwin', 'sunos', 'freebsd8')))
opts.Add('toolchain', 'compiler toolchain', default_toolchain)
+ opts.Add(BoolOption('gles', 'EXPERIMENTAL: enable OpenGL ES support', 'no'))
opts.Add(BoolOption('llvm', 'use LLVM', default_llvm))
opts.Add(BoolOption('debug', 'DEPRECATED: debug build', 'yes'))
opts.Add(BoolOption('profile', 'DEPRECATED: profile build', 'no'))
diff --git a/configs/autoconf.in b/configs/autoconf.in
index e2d70c63a12..4e931a3a9cc 100644
--- a/configs/autoconf.in
+++ b/configs/autoconf.in
@@ -15,11 +15,13 @@ ASM_FLAGS = @ASM_FLAGS@
PIC_FLAGS = @PIC_FLAGS@
DEFINES = @DEFINES@
API_DEFINES = @API_DEFINES@
-GLES_OVERLAY = @GLES_OVERLAY@
-CFLAGS = @CPPFLAGS@ @CFLAGS@ \
+SHARED_GLAPI = @SHARED_GLAPI@
+CFLAGS_NOVISIBILITY = @CPPFLAGS@ @CFLAGS@ \
$(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(ASM_FLAGS) $(DEFINES)
-CXXFLAGS = @CPPFLAGS@ @CXXFLAGS@ \
+CXXFLAGS_NOVISIBILITY = @CPPFLAGS@ @CXXFLAGS@ \
$(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES)
+CFLAGS = $(CFLAGS_NOVISIBILITY) @VISIBILITY_CFLAGS@
+CXXFLAGS = $(CXXFLAGS_NOVISIBILITY) @VISIBILITY_CXXFLAGS@
LDFLAGS = @LDFLAGS@
EXTRA_LIB_PATH = @EXTRA_LIB_PATH@
RADEON_CFLAGS = @RADEON_CFLAGS@
@@ -33,9 +35,9 @@ LLVM_LDFLAGS = @LLVM_LDFLAGS@
LLVM_LIBS = @LLVM_LIBS@
GLW_CFLAGS = @GLW_CFLAGS@
GLUT_CFLAGS = @GLUT_CFLAGS@
-
-TALLOC_LIBS = @TALLOC_LIBS@
-TALLOC_CFLAGS = @TALLOC_CFLAGS@
+GLX_TLS = @GLX_TLS@
+DRI_CFLAGS = @DRI_CFLAGS@
+DRI_CXXFLAGS = @DRI_CXXFLAGS@
# dlopen
DLOPEN_LIBS = @DLOPEN_LIBS@
@@ -65,6 +67,8 @@ OSMESA_LIB = @OSMESA_LIB@
GLESv1_CM_LIB = GLESv1_CM
GLESv2_LIB = GLESv2
VG_LIB = OpenVG
+GLAPI_LIB = glapi
+WAYLAND_EGL_LIB = wayland-egl
# Library names (actual file names)
GL_LIB_NAME = @GL_LIB_NAME@
@@ -76,6 +80,8 @@ EGL_LIB_NAME = @EGL_LIB_NAME@
GLESv1_CM_LIB_NAME = @GLESv1_CM_LIB_NAME@
GLESv2_LIB_NAME = @GLESv2_LIB_NAME@
VG_LIB_NAME = @VG_LIB_NAME@
+GLAPI_LIB_NAME = @GLAPI_LIB_NAME@
+WAYLAND_EGL_LIB_NAME = @WAYLAND_EGL_LIB_NAME@
# Globs used to install the lib and all symlinks
GL_LIB_GLOB = @GL_LIB_GLOB@
@@ -87,6 +93,8 @@ EGL_LIB_GLOB = @EGL_LIB_GLOB@
GLESv1_CM_LIB_GLOB = @GLESv1_CM_LIB_GLOB@
GLESv2_LIB_GLOB = @GLESv2_LIB_GLOB@
VG_LIB_GLOB = @VG_LIB_GLOB@
+GLAPI_LIB_GLOB = @GLAPI_LIB_GLOB@
+WAYLAND_EGL_LIB_GLOB = @WAYLAND_EGL_LIB_GLOB@
# Directories to build
LIB_DIR = @LIB_DIR@
@@ -103,7 +111,10 @@ GALLIUM_AUXILIARIES = $(TOP)/src/gallium/auxiliary/libgallium.a
GALLIUM_DRIVERS = $(foreach DIR,$(GALLIUM_DRIVERS_DIRS),$(TOP)/src/gallium/drivers/$(DIR)/lib$(DIR).a)
# Driver specific build vars
-DRI_DIRS = @DRI_DIRS@
+DRI_DIRS = @DRI_DIRS@
+DRICORE_GLSL_LIBS = @DRICORE_GLSL_LIBS@
+DRICORE_LIBS = @DRICORE_LIBS@
+DRICORE_LIB_DEPS = @DRICORE_LIB_DEPS@
EGL_PLATFORMS = @EGL_PLATFORMS@
EGL_CLIENT_APIS = @EGL_CLIENT_APIS@
@@ -129,12 +140,16 @@ APP_LIB_DEPS = $(EXTRA_LIB_PATH) @APP_LIB_DEPS@
GLESv1_CM_LIB_DEPS = $(EXTRA_LIB_PATH) @GLESv1_CM_LIB_DEPS@
GLESv2_LIB_DEPS = $(EXTRA_LIB_PATH) @GLESv2_LIB_DEPS@
VG_LIB_DEPS = $(EXTRA_LIB_PATH) @VG_LIB_DEPS@
+GLAPI_LIB_DEPS = $(EXTRA_LIB_PATH) @GLAPI_LIB_DEPS@
+WAYLAND_EGL_LIB_DEPS = $(EXTRA_LIBPATH) @WAYLAND_EGL_LIB_DEPS@
# DRI dependencies
+MESA_MODULES = @MESA_MODULES@
DRI_LIB_DEPS = $(EXTRA_LIB_PATH) @DRI_LIB_DEPS@
LIBDRM_CFLAGS = @LIBDRM_CFLAGS@
LIBDRM_LIB = @LIBDRM_LIBS@
DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@
+GLPROTO_CFLAGS = @GLPROTO_CFLAGS@
EXPAT_INCLUDES = @EXPAT_INCLUDES@
# Autoconf directories
@@ -182,11 +197,16 @@ GLESv2_PC_LIB_PRIV = @GLESv2_PC_LIB_PRIV@
EGL_PC_REQ_PRIV = @GL_PC_REQ_PRIV@
EGL_PC_LIB_PRIV = @GL_PC_LIB_PRIV@
EGL_PC_CFLAGS = @GL_PC_CFLAGS@
+WAYLAND_EGL_PC_REQ_PRIV = @WAYLAND_EGL_PC_REQ_PRIV@
+WAYLAND_EGL_PC_LIB_PRIV = @WAYLAND_EGL_PC_LIB_PRIV@
+WAYLAND_EGL_PC_CFLAGS = @WAYLAND_EGL_PC_CFLAGS@
XCB_DRI2_CFLAGS = @XCB_DRI2_CFLAGS@
XCB_DRI2_LIBS = @XCB_DRI2_LIBS@
LIBUDEV_CFLAGS = @LIBUDEV_CFLAGS@
LIBUDEV_LIBS = @LIBUDEV_LIBS@
+WAYLAND_CFLAGS = @WAYLAND_CFLAGS@
+WAYLAND_LIBS = @WAYLAND_LIBS@
MESA_LLVM = @MESA_LLVM@
diff --git a/configs/default b/configs/default
index 0301345b1fc..0582a0210af 100644
--- a/configs/default
+++ b/configs/default
@@ -9,7 +9,7 @@ CONFIG_NAME = default
# Version info
MESA_MAJOR=7
-MESA_MINOR=10
+MESA_MINOR=11
MESA_TINY=0
MESA_VERSION = $(MESA_MAJOR).$(MESA_MINOR).$(MESA_TINY)
@@ -25,6 +25,7 @@ CXXFLAGS = -O
LDFLAGS =
HOST_CFLAGS = $(CFLAGS)
GLU_CFLAGS =
+GLX_TLS = no
# Compiler for building demos/tests/etc
APP_CC = $(CC)
@@ -58,6 +59,8 @@ EGL_LIB = EGL
GLESv1_CM_LIB = GLESv1_CM
GLESv2_LIB = GLESv2
VG_LIB = OpenVG
+GLAPI_LIB = glapi
+WAYLAND_EGL_LIB = wayland-egl
# Library names (actual file names)
@@ -70,6 +73,8 @@ EGL_LIB_NAME = lib$(EGL_LIB).so
GLESv1_CM_LIB_NAME = lib$(GLESv1_CM_LIB).so
GLESv2_LIB_NAME = lib$(GLESv2_LIB).so
VG_LIB_NAME = lib$(VG_LIB).so
+GLAPI_LIB_NAME = lib$(GLAPI_LIB).so
+WAYLAND_EGL_LIB_NAME = lib$(WAYLAND_EGL_LIB).so
# globs used to install the lib and all symlinks
GL_LIB_GLOB = $(GL_LIB_NAME)*
@@ -81,9 +86,11 @@ EGL_LIB_GLOB = $(EGL_LIB_NAME)*
GLESv1_CM_LIB_GLOB = $(GLESv1_CM_LIB_NAME)*
GLESv2_LIB_GLOB = $(GLESv2_LIB_NAME)*
VG_LIB_GLOB = $(VG_LIB_NAME)*
+GLAPI_LIB_GLOB = $(GLAPI_LIB_NAME)*
+WAYLAND_EGL_LIB_GLOB = $(WAYLAND_EGL_LIB_NAME)*
-TALLOC_LIBS = `pkg-config --libs talloc`
-TALLOC_CFLAGS = `pkg-config --cflags talloc`
+DRI_CFLAGS = $(CFLAGS)
+DRI_CXXFLAGS = $(CXXFLAGS)
# Optional assembly language optimization files for libGL
MESA_ASM_SOURCES =
@@ -107,7 +114,7 @@ EGL_DRIVERS_DIRS = glx
# Gallium directories and
GALLIUM_DIRS = auxiliary drivers state_trackers
GALLIUM_AUXILIARIES = $(TOP)/src/gallium/auxiliary/libgallium.a
-GALLIUM_DRIVERS_DIRS = softpipe trace rbug identity galahad i915 i965 svga r300 nvfx nv50 failover
+GALLIUM_DRIVERS_DIRS = softpipe trace rbug noop identity galahad i915 i965 svga r300 nvfx nv50 failover
GALLIUM_DRIVERS = $(foreach DIR,$(GALLIUM_DRIVERS_DIRS),$(TOP)/src/gallium/drivers/$(DIR)/lib$(DIR).a)
GALLIUM_WINSYS_DIRS = sw sw/xlib
GALLIUM_TARGET_DIRS = libgl-xlib
@@ -119,7 +126,7 @@ EGL_CLIENT_APIS = $(GL_LIB)
# Library dependencies
#EXTRA_LIB_PATH ?=
-GL_LIB_DEPS = $(EXTRA_LIB_PATH) -lX11 -lXext -lm -lpthread $(TALLOC_LIBS)
+GL_LIB_DEPS = $(EXTRA_LIB_PATH) -lX11 -lXext -lm -lpthread
EGL_LIB_DEPS = $(EXTRA_LIB_PATH) -ldl -lpthread
OSMESA_LIB_DEPS = $(EXTRA_LIB_PATH) -L$(TOP)/$(LIB_DIR) -l$(GL_LIB)
GLU_LIB_DEPS = $(EXTRA_LIB_PATH) -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) -lm
@@ -129,6 +136,8 @@ APP_LIB_DEPS = $(EXTRA_LIB_PATH) -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LI
GLESv1_CM_LIB_DEPS = $(EXTRA_LIB_PATH) -lpthread
GLESv2_LIB_DEPS = $(EXTRA_LIB_PATH) -lpthread
VG_LIB_DEPS = $(EXTRA_LIB_PATH) -lpthread
+GLAPI_LIB_DEPS = $(EXTRA_LIB_PATH) -lpthread
+WAYLAND_EGL_LIB_DEPS = $(EXTRA_LIB_PATH) -lwayland-client -ldrm
# Program dependencies - specific GL/glut libraries added in Makefiles
APP_LIB_DEPS = -lm
@@ -177,3 +186,6 @@ GLESv2_PC_CFLAGS =
VG_PC_REQ_PRIV =
VG_PC_LIB_PRIV =
VG_PC_CFLAGS =
+WAYLAND_EGL_PC_REQ_PRIV =
+WAYLAND_EGL_PC_LIB_PRIV =
+WAYLAND_EGL_PC_CFLAGS =
diff --git a/configs/freebsd-dri b/configs/freebsd-dri
index a4aa82e96df..23cf58a3bf5 100644
--- a/configs/freebsd-dri
+++ b/configs/freebsd-dri
@@ -30,9 +30,11 @@ ASM_SOURCES =
MESA_ASM_SOURCES =
# Library/program dependencies
+MESA_MODULES = $(TOP)/src/mesa/libmesa.a
+
LIBDRM_CFLAGS = `pkg-config --cflags libdrm`
LIBDRM_LIB = `pkg-config --libs libdrm`
-DRI_LIB_DEPS = -L/usr/local/lib -lm -pthread -lexpat $(LIBDRM_LIB)
+DRI_LIB_DEPS = $(MESA_MODULES) -L/usr/local/lib -lm -pthread -lexpat $(LIBDRM_LIB)
GL_LIB_DEPS = -L/usr/local/lib -lX11 -lXext -lXxf86vm -lXdamage -lXfixes \
-lm -pthread $(LIBDRM_LIB)
diff --git a/configs/linux-dri b/configs/linux-dri
index 64fc407c42e..22190bfc64f 100644
--- a/configs/linux-dri
+++ b/configs/linux-dri
@@ -43,9 +43,11 @@ MESA_ASM_SOURCES =
# Library/program dependencies
EXTRA_LIB_PATH=-L/usr/X11R6/lib
+MESA_MODULES = $(TOP)/src/mesa/libmesa.a
+
LIBDRM_CFLAGS = $(shell pkg-config --cflags libdrm)
LIBDRM_LIB = $(shell pkg-config --libs libdrm)
-DRI_LIB_DEPS = $(EXTRA_LIB_PATH) -lm -lpthread -lexpat -ldl -ltalloc $(LIBDRM_LIB)
+DRI_LIB_DEPS = $(MESA_MODULES) $(EXTRA_LIB_PATH) -lm -lpthread -lexpat -ldl $(LIBDRM_LIB)
GL_LIB_DEPS = $(EXTRA_LIB_PATH) -lX11 -lXext -lXxf86vm -lXdamage -lXfixes \
-lm -lpthread -ldl $(LIBDRM_LIB)
diff --git a/configs/linux-dri-xcb b/configs/linux-dri-xcb
index 8092a048d7c..7518080703b 100644
--- a/configs/linux-dri-xcb
+++ b/configs/linux-dri-xcb
@@ -41,9 +41,11 @@ MESA_ASM_SOURCES =
# Library/program dependencies
EXTRA_LIB_PATH=$(shell pkg-config --libs-only-L x11)
+MESA_MODULES = $(TOP)/src/mesa/libmesa.a
+
LIBDRM_CFLAGS = $(shell pkg-config --cflags libdrm)
LIBDRM_LIB = $(shell pkg-config --libs libdrm)
-DRI_LIB_DEPS = $(EXTRA_LIB_PATH) -lm -lpthread -lexpat -ldl $(LIBDRM_LIB)
+DRI_LIB_DEPS = $(MESA_MODULES) $(EXTRA_LIB_PATH) -lm -lpthread -lexpat -ldl $(LIBDRM_LIB)
GL_LIB_DEPS = $(EXTRA_LIB_PATH) -lX11 -lXext -lXxf86vm -lm -lpthread -ldl \
$(LIBDRM_LIB) $(shell pkg-config --libs xcb) $(shell pkg-config --libs x11-xcb) $(shell pkg-config --libs xcb-glx)
diff --git a/configs/linux-egl b/configs/linux-egl
index 6393e942c79..216bcbab321 100644
--- a/configs/linux-egl
+++ b/configs/linux-egl
@@ -38,9 +38,11 @@ MESA_ASM_SOURCES =
# Library/program dependencies
EXTRA_LIB_PATH=-L/usr/X11R6/lib
+MESA_MODULES = $(TOP)/src/mesa/libmesa.a
+
LIBDRM_CFLAGS = $(shell pkg-config --cflags libdrm)
LIBDRM_LIB = $(shell pkg-config --libs libdrm)
-DRI_LIB_DEPS = $(EXTRA_LIB_PATH) -lm -lpthread -lexpat -ldl $(LIBDRM_LIB)
+DRI_LIB_DEPS = $(MESA_MODULES) $(EXTRA_LIB_PATH) -lm -lpthread -lexpat -ldl $(LIBDRM_LIB)
GL_LIB_DEPS = $(EXTRA_LIB_PATH) -lX11 -lXext -lXxf86vm -lXdamage -lXfixes \
-lm -lpthread -ldl \
$(LIBDRM_LIB)
diff --git a/configs/linux-indirect b/configs/linux-indirect
index 272d34e8407..507382adced 100644
--- a/configs/linux-indirect
+++ b/configs/linux-indirect
@@ -42,7 +42,8 @@ MESA_ASM_SOURCES =
# Library/program dependencies
EXTRA_LIB_PATH=-L/usr/X11R6/lib
-DRI_LIB_DEPS = $(EXTRA_LIB_PATH) -lm -lpthread -lexpat -ldl
+MESA_MODULES = $(TOP)/src/mesa/libmesa.a
+DRI_LIB_DEPS = $(MESA_MODULES) $(EXTRA_LIB_PATH) -lm -lpthread -lexpat -ldl
GL_LIB_DEPS = $(EXTRA_LIB_PATH) -lX11 -lXext -lXxf86vm -lm -lpthread -ldl
diff --git a/configs/linux-llvm b/configs/linux-llvm
index 22de0662ee1..359bee28250 100644
--- a/configs/linux-llvm
+++ b/configs/linux-llvm
@@ -12,7 +12,7 @@ GALLIUM_DRIVERS_DIRS += llvmpipe
OPT_FLAGS = -O3 -ansi -pedantic
ARCH_FLAGS = -mmmx -msse -msse2 -mstackrealign
-DEFINES += -DNDEBUG -DGALLIUM_LLVMPIPE -DHAVE_UDIS86
+DEFINES += -DNDEBUG -DGALLIUM_LLVMPIPE
# override -std=c99
CFLAGS += -std=gnu99
@@ -31,9 +31,9 @@ endif
ifeq ($(MESA_LLVM),1)
LLVM_CFLAGS=`llvm-config --cppflags`
- LLVM_CXXFLAGS=`llvm-config --cxxflags backend bitreader engine ipo interpreter instrumentation` -Wno-long-long
- LLVM_LDFLAGS = $(shell llvm-config --ldflags backend bitreader engine ipo interpreter instrumentation)
- LLVM_LIBS = $(shell llvm-config --libs backend bitwriter bitreader engine ipo interpreter instrumentation)
+ LLVM_CXXFLAGS=`llvm-config --cxxflags` -Wno-long-long
+ LLVM_LDFLAGS = $(shell llvm-config --ldflags)
+ LLVM_LIBS = $(shell llvm-config --libs)
MKLIB_OPTIONS=-cplusplus
else
LLVM_CFLAGS=
@@ -41,4 +41,4 @@ else
endif
LD = g++
-GL_LIB_DEPS = $(LLVM_LDFLAGS) $(LLVM_LIBS) $(EXTRA_LIB_PATH) -lX11 -lXext -lm -lpthread -ltalloc -lstdc++ -ludis86
+GL_LIB_DEPS = $(LLVM_LDFLAGS) $(LLVM_LIBS) $(EXTRA_LIB_PATH) -lX11 -lXext -lm -lpthread -lstdc++
diff --git a/configure.ac b/configure.ac
index bd817753050..b5101519e0e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -18,11 +18,12 @@ AC_CONFIG_AUX_DIR([bin])
AC_CANONICAL_HOST
dnl Versions for external dependencies
-LIBDRM_REQUIRED=2.4.15
-LIBDRM_RADEON_REQUIRED=2.4.17
+LIBDRM_REQUIRED=2.4.24
+LIBDRM_RADEON_REQUIRED=2.4.24
+LIBDRM_INTEL_REQUIRED=2.4.24
DRI2PROTO_REQUIRED=2.1
GLPROTO_REQUIRED=1.4.11
-LIBDRM_XORG_REQUIRED=2.4.17
+LIBDRM_XORG_REQUIRED=2.4.24
LIBKMS_XORG_REQUIRED=1.0.0
dnl Check for progs
@@ -150,9 +151,13 @@ if test "x$GCC" = xyes; then
# Enable -fvisibility=hidden if using a gcc that supports it
save_CFLAGS="$CFLAGS"
AC_MSG_CHECKING([whether $CC supports -fvisibility=hidden])
- CFLAGS="$CFLAGS -fvisibility=hidden"
+ VISIBILITY_CFLAGS="-fvisibility=hidden"
+ CFLAGS="$CFLAGS $VISIBILITY_CFLAGS"
AC_LINK_IFELSE([AC_LANG_PROGRAM()], AC_MSG_RESULT([yes]),
- [CFLAGS="$save_CFLAGS" ; AC_MSG_RESULT([no])]);
+ [VISIBILITY_CFLAGS=""; AC_MSG_RESULT([no])]);
+
+ # Restore CFLAGS; VISIBILITY_CFLAGS are added to it where needed.
+ CFLAGS=$save_CFLAGS
# Work around aliasing bugs - developers should comment this out
CFLAGS="$CFLAGS -fno-strict-aliasing"
@@ -163,14 +168,21 @@ if test "x$GXX" = xyes; then
# Enable -fvisibility=hidden if using a gcc that supports it
save_CXXFLAGS="$CXXFLAGS"
AC_MSG_CHECKING([whether $CXX supports -fvisibility=hidden])
- CXXFLAGS="$CXXFLAGS -fvisibility=hidden"
+ VISIBILITY_CXXFLAGS="-fvisibility=hidden"
+ CXXFLAGS="$CXXFLAGS $VISIBILITY_CXXFLAGS"
AC_LINK_IFELSE([AC_LANG_PROGRAM()], AC_MSG_RESULT([yes]),
- [CXXFLAGS="$save_CXXFLAGS" ; AC_MSG_RESULT([no])]);
+ [VISIBILITY_CXXFLAGS="" ; AC_MSG_RESULT([no])]);
+
+ # Restore CXXFLAGS; VISIBILITY_CXXFLAGS are added to it where needed.
+ CXXFLAGS=$save_CXXFLAGS
# Work around aliasing bugs - developers should comment this out
CXXFLAGS="$CXXFLAGS -fno-strict-aliasing"
fi
+AC_SUBST([VISIBILITY_CFLAGS])
+AC_SUBST([VISIBILITY_CXXFLAGS])
+
dnl These should be unnecessary, but let the user set them if they want
AC_ARG_VAR([OPT_FLAGS], [Additional optimization flags for the compiler.
Default is to use CFLAGS.])
@@ -316,6 +328,8 @@ EGL_LIB_NAME='lib$(EGL_LIB).'${LIB_EXTENSION}
GLESv1_CM_LIB_NAME='lib$(GLESv1_CM_LIB).'${LIB_EXTENSION}
GLESv2_LIB_NAME='lib$(GLESv2_LIB).'${LIB_EXTENSION}
VG_LIB_NAME='lib$(VG_LIB).'${LIB_EXTENSION}
+GLAPI_LIB_NAME='lib$(GLAPI_LIB).'${LIB_EXTENSION}
+WAYLAND_EGL_LIB_NAME='lib$(WAYLAND_EGL_LIB).'${LIB_EXTENSION}
GL_LIB_GLOB=${LIB_PREFIX_GLOB}'$(GL_LIB)'${LIB_VERSION_SEPARATOR}'*'${LIB_EXTENSION}'*'
GLU_LIB_GLOB=${LIB_PREFIX_GLOB}'$(GLU_LIB)'${LIB_VERSION_SEPARATOR}'*'${LIB_EXTENSION}'*'
@@ -327,6 +341,8 @@ EGL_LIB_GLOB=${LIB_PREFIX_GLOB}'$(EGL_LIB)'${LIB_VERSION_SEPARATOR}'*'${LIB_EXTE
GLESv1_CM_LIB_GLOB=${LIB_PREFIX_GLOB}'$(GLESv1_CM_LIB)'${LIB_VERSION_SEPARATOR}'*'${LIB_EXTENSION}'*'
GLESv2_LIB_GLOB=${LIB_PREFIX_GLOB}'$(GLESv2_LIB)'${LIB_VERSION_SEPARATOR}'*'${LIB_EXTENSION}'*'
VG_LIB_GLOB=${LIB_PREFIX_GLOB}'$(VG_LIB)'${LIB_VERSION_SEPARATOR}'*'${LIB_EXTENSION}'*'
+GLAPI_LIB_GLOB=${LIB_PREFIX_GLOB}'$(GLAPI_LIB)'${LIB_VERSION_SEPARATOR}'*'${LIB_EXTENSION}'*'
+WAYLAND_EGL_LIB_GLOB=${LIB_PREFIX_GLOB}'$(WAYLAND_EGL_LIB)'${LIB_VERSION_SEPARATOR}'*'${LIB_EXTENSION}'*'
AC_SUBST([GL_LIB_NAME])
AC_SUBST([GLU_LIB_NAME])
@@ -337,6 +353,8 @@ AC_SUBST([EGL_LIB_NAME])
AC_SUBST([GLESv1_CM_LIB_NAME])
AC_SUBST([GLESv2_LIB_NAME])
AC_SUBST([VG_LIB_NAME])
+AC_SUBST([GLAPI_LIB_NAME])
+AC_SUBST([WAYLAND_EGL_LIB_NAME])
AC_SUBST([GL_LIB_GLOB])
AC_SUBST([GLU_LIB_GLOB])
@@ -347,6 +365,8 @@ AC_SUBST([EGL_LIB_GLOB])
AC_SUBST([GLESv1_CM_LIB_GLOB])
AC_SUBST([GLESv2_LIB_GLOB])
AC_SUBST([VG_LIB_GLOB])
+AC_SUBST([GLAPI_LIB_GLOB])
+AC_SUBST([WAYLAND_EGL_LIB_GLOB])
dnl
dnl Arch/platform-specific settings
@@ -377,14 +397,14 @@ if test "x$enable_asm" = xyes; then
case "$host_cpu" in
i?86)
case "$host_os" in
- linux* | *freebsd* | dragonfly*)
+ linux* | *freebsd* | dragonfly* | *netbsd*)
test "x$enable_64bit" = xyes && asm_arch=x86_64 || asm_arch=x86
;;
esac
;;
x86_64)
case "$host_os" in
- linux* | *freebsd* | dragonfly*)
+ linux* | *freebsd* | dragonfly* | *netbsd*)
test "x$enable_32bit" = xyes && asm_arch=x86 || asm_arch=x86_64
;;
esac
@@ -483,9 +503,9 @@ AC_ARG_ENABLE([gles2],
[enable_gles2=no])
AC_ARG_ENABLE([gles-overlay],
[AS_HELP_STRING([--enable-gles-overlay],
- [build separate OpenGL ES only libraries @<:@default=no@:>@])],
- [enable_gles_overlay="$enableval"],
- [enable_gles_overlay=no])
+ [DEPRECATED. Same as --enable-gles1 and --enable-gles2])],
+ [enable_gles1="$enableval"; enable_gles2="$enableval"],
+ [])
AC_ARG_ENABLE([openvg],
[AS_HELP_STRING([--enable-openvg],
@@ -506,13 +526,11 @@ fi
if test "x$enable_opengl" = xno -a \
"x$enable_gles1" = xno -a \
"x$enable_gles2" = xno -a \
- "x$enable_gles_overlay" = xno -a \
"x$enable_openvg" = xno; then
AC_MSG_ERROR([at least one API should be enabled])
fi
API_DEFINES=""
-GLES_OVERLAY=0
if test "x$enable_opengl" = xno; then
API_DEFINES="$API_DEFINES -DFEATURE_GL=0"
else
@@ -524,11 +542,19 @@ fi
if test "x$enable_gles2" = xyes; then
API_DEFINES="$API_DEFINES -DFEATURE_ES2=1"
fi
-if test "x$enable_gles_overlay" = xyes; then
- GLES_OVERLAY=1
-fi
AC_SUBST([API_DEFINES])
-AC_SUBST([GLES_OVERLAY])
+
+AC_ARG_ENABLE([shared-glapi],
+ [AS_HELP_STRING([--enable-shared-glapi],
+ [EXPERIMENTAL. Enable shared glapi for OpenGL @<:@default=no@:>@])],
+ [enable_shared_glapi="$enableval"],
+ [enable_shared_glapi=no])
+
+SHARED_GLAPI="0"
+if test "x$enable_shared_glapi" = xyes; then
+ SHARED_GLAPI="1"
+fi
+AC_SUBST([SHARED_GLAPI])
dnl
dnl Driver configuration. Options are xlib, dri and osmesa right now.
@@ -542,7 +568,7 @@ linux*)
i*86|x86_64|powerpc*|sparc*) default_driver="dri";;
esac
;;
-*freebsd* | dragonfly*)
+*freebsd* | dragonfly* | *netbsd*)
case "$host_cpu" in
i*86|x86_64|powerpc*|sparc*) default_driver="dri";;
esac
@@ -572,10 +598,6 @@ xno)
;;
esac
-PKG_CHECK_MODULES([TALLOC], [talloc])
-AC_SUBST([TALLOC_LIBS])
-AC_SUBST([TALLOC_CFLAGS])
-
dnl
dnl Driver specific build directories
dnl
@@ -588,20 +610,30 @@ GLU_DIRS="sgi"
GALLIUM_DIRS="auxiliary drivers state_trackers"
GALLIUM_TARGET_DIRS=""
GALLIUM_WINSYS_DIRS="sw"
-GALLIUM_DRIVERS_DIRS="softpipe failover galahad trace rbug identity"
+GALLIUM_DRIVERS_DIRS="softpipe failover galahad trace rbug noop identity"
GALLIUM_STATE_TRACKERS_DIRS=""
+# build shared-glapi if enabled for OpenGL or if OpenGL ES is enabled
+case "x$enable_shared_glapi$enable_gles1$enable_gles2" in
+x*yes*)
+ CORE_DIRS="$CORE_DIRS mapi/shared-glapi"
+ ;;
+esac
+
# build glapi if OpenGL is enabled
if test "x$enable_opengl" = xyes; then
CORE_DIRS="$CORE_DIRS mapi/glapi"
fi
-# build es1api and es2api if OpenGL ES is enabled
-case "x$enable_gles1$enable_gles2$enable_gles_overlay" in
-x*yes*)
- CORE_DIRS="$CORE_DIRS mapi/es1api mapi/es2api"
- ;;
-esac
+# build es1api if OpenGL ES 1.x is enabled
+if test "x$enable_gles1" = xyes; then
+ CORE_DIRS="$CORE_DIRS mapi/es1api"
+fi
+
+# build es2api if OpenGL ES 2.x is enabled
+if test "x$enable_gles2" = xyes; then
+ CORE_DIRS="$CORE_DIRS mapi/es2api"
+fi
# build vgapi if OpenVG is enabled
if test "x$enable_openvg" = xyes; then
@@ -609,7 +641,7 @@ if test "x$enable_openvg" = xyes; then
fi
# build glsl and mesa if OpenGL or OpenGL ES is enabled
-case "x$enable_opengl$enable_gles1$enable_gles2$enable_gles_overlay" in
+case "x$enable_opengl$enable_gles1$enable_gles2" in
x*yes*)
CORE_DIRS="$CORE_DIRS glsl mesa"
;;
@@ -714,8 +746,8 @@ xlib)
GL_PC_LIB_PRIV="$GL_LIB_DEPS"
GL_PC_CFLAGS="$X11_INCLUDES"
fi
- GL_LIB_DEPS="$GL_LIB_DEPS $SELINUX_LIBS -lm -lpthread $TALLOC_LIBS"
- GL_PC_LIB_PRIV="$GL_PC_LIB_PRIV $SELINUX_LIBS -lm -lpthread $TALLOC_LIBS"
+ GL_LIB_DEPS="$GL_LIB_DEPS $SELINUX_LIBS -lm -lpthread"
+ GL_PC_LIB_PRIV="$GL_PC_LIB_PRIV $SELINUX_LIBS -lm -lpthread"
# if static, move the external libraries to the programs
# and empty the libraries for libGL
@@ -795,11 +827,48 @@ AC_SUBST([GLESv1_CM_PC_LIB_PRIV])
AC_SUBST([GLESv2_LIB_DEPS])
AC_SUBST([GLESv2_PC_LIB_PRIV])
+GLAPI_LIB_DEPS="-lpthread"
+AC_SUBST([GLAPI_LIB_DEPS])
+
+
+dnl Setup default DRI CFLAGS
+DRI_CFLAGS='$(CFLAGS)'
+DRI_CXXFLAGS='$(CXXFLAGS)'
+DRI_LIB_DEPS='$(TOP)/src/mesa/libmesa.a'
+MESA_MODULES='$(TOP)/src/mesa/libmesa.a'
+
+AC_ARG_ENABLE([shared-dricore],
+ [AS_HELP_STRING([--enable-shared-dricore],
+ [link DRI modules with shared core DRI routines @<:@default=disabled@:>@])],
+ [enable_dricore="$enableval"],
+ [enable_dricore=no])
+if test "$mesa_driver" = dri ; then
+ if test "$enable_dricore" = yes ; then
+ if test "$GCC$GXX" != yesyes ; then
+ AC_MSG_WARN([Shared dricore requires GCC-compatible rpath handling. Disabling shared dricore])
+ enable_dricore=no
+ else
+ DRICORE_GLSL_LIBS='$(TOP)/$(LIB_DIR)/libglsl.so'
+ DRICORE_LIBS='$(TOP)/$(LIB_DIR)/libdricore.so'
+ DRICORE_LIB_DEPS='-L$(TOP)/$(LIB_DIR) -Wl,-R$(DRI_DRIVER_INSTALL_DIR) -lglsl'
+ DRI_LIB_DEPS='-L$(TOP)/$(LIB_DIR) -Wl,-R$(DRI_DRIVER_INSTALL_DIR) -ldricore -lglsl'
+ DRI_CFLAGS='$(CFLAGS_NOVISIBILITY) -DUSE_DRICORE'
+ DRI_CXXFLAGS='$(CXXFLAGS_NOVISIBILITY) -DUSE_DRICORE'
+ MESA_MODULES='$(DRICORE_LIBS) $(DRICORE_GLSL_LIBS)'
+ fi
+ fi
+fi
+AC_SUBST([DRICORE_LIBS])
+AC_SUBST([DRICORE_GLSL_LIBS])
+AC_SUBST([DRICORE_LIB_DEPS])
+AC_SUBST([DRI_CXXFLAGS])
+AC_SUBST([DRI_CFLAGS])
+AC_SUBST([MESA_MODULES])
AC_SUBST([HAVE_XF86VIDMODE])
PKG_CHECK_MODULES([LIBDRM_RADEON],
- [libdrm_radeon libdrm >= $LIBDRM_RADEON_REQUIRED],
+ [libdrm_radeon >= $LIBDRM_RADEON_REQUIRED],
HAVE_LIBDRM_RADEON=yes,
HAVE_LIBDRM_RADEON=no)
@@ -811,13 +880,22 @@ if test "$mesa_driver" = xlib; then
fi
dnl
-dnl More DRI setup
+dnl TLS detection
dnl
+
AC_ARG_ENABLE([glx-tls],
[AS_HELP_STRING([--enable-glx-tls],
[enable TLS support in GLX @<:@default=disabled@:>@])],
[GLX_USE_TLS="$enableval"],
[GLX_USE_TLS=no])
+AC_SUBST(GLX_TLS, ${GLX_USE_TLS})
+
+AS_IF([test "x$GLX_USE_TLS" = xyes],
+ [DEFINES="${DEFINES} -DGLX_USE_TLS -DPTHREADS"])
+
+dnl
+dnl More DRI setup
+dnl
dnl Directory for DRI drivers
AC_ARG_WITH([dri-driverdir],
[AS_HELP_STRING([--with-dri-driverdir=DIR],
@@ -870,11 +948,6 @@ esac
dnl Set DRI_DIRS, DEFINES and LIB_DEPS
if test "$mesa_driver" = dri -o "$mesa_driver" = no; then
- # Use TLS in GLX?
- if test "x$GLX_USE_TLS" = xyes; then
- DEFINES="$DEFINES -DGLX_USE_TLS -DPTHREADS"
- fi
-
# Platform specific settings and drivers to build
case "$host_os" in
linux*)
@@ -909,16 +982,13 @@ if test "$mesa_driver" = dri -o "$mesa_driver" = no; then
;;
esac
;;
- freebsd* | dragonfly*)
+ freebsd* | dragonfly* | *netbsd*)
DEFINES="$DEFINES -DPTHREADS -DUSE_EXTERNAL_DXTN_LIB=1"
DEFINES="$DEFINES -DIN_DRI_DRIVER -DHAVE_ALIAS"
DEFINES="$DEFINES -DGLX_INDIRECT_RENDERING"
if test "x$driglx_direct" = xyes; then
DEFINES="$DEFINES -DGLX_DIRECT_RENDERING"
fi
- if test "x$GXX" = xyes; then
- CXXFLAGS="$CXXFLAGS -ansi -pedantic"
- fi
if test "x$DRI_DIRS" = "xyes"; then
DRI_DIRS="i810 i915 i965 mach64 mga r128 r200 r300 r600 radeon tdfx \
@@ -963,8 +1033,8 @@ if test "$mesa_driver" = dri -o "$mesa_driver" = no; then
[AC_MSG_ERROR([Expat required for DRI.])])
fi
- # put all the necessary libs together
- DRI_LIB_DEPS="$SELINUX_LIBS $LIBDRM_LIBS $EXPAT_LIB -lm -lpthread $DLOPEN_LIBS $TALLOC_LIBS"
+ # put all the necessary libs together, including possibly libdricore
+ DRI_LIB_DEPS="$DRI_LIB_DEPS $SELINUX_LIBS $LIBDRM_LIBS $EXPAT_LIB -lm -lpthread $DLOPEN_LIBS"
fi
AC_SUBST([DRI_DIRS])
AC_SUBST([EXPAT_INCLUDES])
@@ -972,7 +1042,7 @@ AC_SUBST([DRI_LIB_DEPS])
case $DRI_DIRS in
*i915*|*i965*)
- PKG_CHECK_MODULES([INTEL], [libdrm_intel >= 2.4.21])
+ PKG_CHECK_MODULES([INTEL], [libdrm_intel >= $LIBDRM_INTEL_REQUIRED])
;;
esac
@@ -1040,12 +1110,12 @@ case "$DRIVER_DIRS" in
*osmesa*)
# only link libraries with osmesa if shared
if test "$enable_static" = no; then
- OSMESA_LIB_DEPS="-lm -lpthread $SELINUX_LIBS $DLOPEN_LIBS $TALLOC_LIBS"
+ OSMESA_LIB_DEPS="-lm -lpthread $SELINUX_LIBS $DLOPEN_LIBS"
else
OSMESA_LIB_DEPS=""
fi
OSMESA_MESA_DEPS=""
- OSMESA_PC_LIB_PRIV="-lm -lpthread $SELINUX_LIBS $DLOPEN_LIBS $TALLOC_LIBS"
+ OSMESA_PC_LIB_PRIV="-lm -lpthread $SELINUX_LIBS $DLOPEN_LIBS"
;;
esac
AC_SUBST([OSMESA_LIB_DEPS])
@@ -1092,6 +1162,9 @@ if test "x$enable_egl" = xyes; then
if test "$have_libudev" = yes; then
DEFINES="$DEFINES -DHAVE_LIBUDEV"
fi
+ # workaround a bug in xcb-dri2 generated by xcb-proto 1.6
+ AC_CHECK_LIB(xcb-dri2, xcb_dri2_connect_alignment_pad, [],
+ [DEFINES="$DEFINES -DXCB_DRI2_CONNECT_DEVICE_NAME_BROKEN"])
fi
fi
@@ -1327,8 +1400,6 @@ if test "x$enable_gallium" = xno -a "x$enable_openvg" = xyes; then
fi
if test "x$enable_gallium" = xyes; then
SRC_DIRS="$SRC_DIRS gallium gallium/winsys gallium/targets"
- AC_CHECK_HEADER([udis86.h], [HAS_UDIS86="yes"],
- [HAS_UDIS86="no"])
AC_PATH_PROG([LLVM_CONFIG], [llvm-config], [no])
fi
@@ -1352,7 +1423,7 @@ if test "x$enable_gallium_egl" = xauto; then
enable_gallium_egl=$enable_egl
;;
*)
- enable_gallium_egl=no
+ enable_gallium_egl=$enable_openvg
;;
esac
fi
@@ -1428,6 +1499,7 @@ yes)
if test "x$enable_openvg" != xyes; then
AC_MSG_ERROR([cannot build vega state tracker without --enable-openvg])
fi
+ have_st_vega="yes"
;;
esac
@@ -1442,6 +1514,14 @@ yes)
fi
done
GALLIUM_STATE_TRACKERS_DIRS="$state_trackers"
+
+ # append --enable-openvg/--enable-gallium-egl to --with-state-trackers
+ if test "x$have_st_vega" != xyes -a "x$enable_openvg" = xyes; then
+ AC_MSG_ERROR([--with-state-trackers specified but vega is missing])
+ fi
+ if test "x$HAVE_ST_EGL" != xyes -a "x$enable_gallium_egl" = xyes; then
+ AC_MSG_ERROR([--with-state-trackers specified but egl is missing])
+ fi
;;
esac
@@ -1454,9 +1534,6 @@ x*yes*)
EGL_CLIENT_APIS="$EGL_CLIENT_APIS "'$(GL_LIB)'
;;
esac
-if test "x$enable_gles_overlay" = xyes; then
- EGL_CLIENT_APIS="$EGL_CLIENT_APIS "'$(GLESv1_CM_LIB) $(GLESv2_LIB)'
-fi
if test "x$enable_openvg" = xyes; then
EGL_CLIENT_APIS="$EGL_CLIENT_APIS "'$(VG_LIB)'
VG_LIB_DEPS="$VG_LIB_DEPS -lpthread"
@@ -1467,10 +1544,6 @@ AC_SUBST([EGL_CLIENT_APIS])
if test "x$HAVE_ST_EGL" = xyes; then
GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS egl"
- # define GLX_DIRECT_RENDERING even when the driver is not dri
- if test "x$mesa_driver" != xdri -a "x$driglx_direct" = xyes; then
- DEFINES="$DEFINES -DGLX_DIRECT_RENDERING"
- fi
fi
if test "x$HAVE_ST_XORG" = xyes; then
@@ -1491,6 +1564,8 @@ AC_ARG_WITH([egl-displays],
[with_egl_platforms="$withval"])
EGL_PLATFORMS=""
+WAYLAND_EGL_LIB_DEPS=""
+
case "$with_egl_platforms" in
yes)
if test "x$enable_egl" = xyes && test "x$mesa_driver" != xosmesa; then
@@ -1508,16 +1583,31 @@ yes)
egl_platforms=`IFS=', '; echo $with_egl_platforms`
for plat in $egl_platforms; do
test -d "$srcdir/src/gallium/state_trackers/egl/$plat" || \
- AC_MSG_ERROR([EGL platform '$plat' does't exist])
+ AC_MSG_ERROR([EGL platform '$plat' doesn't exist])
if test "$plat" = "fbdev"; then
GALLIUM_WINSYS_DIRS="$GALLIUM_WINSYS_DIRS sw/fbdev"
fi
+ if test "$plat" = "wayland"; then
+ PKG_CHECK_MODULES([WAYLAND], [wayland-client wayland-server],, \
+ [AC_MSG_ERROR([cannot find libwayland-client])])
+ WAYLAND_EGL_LIB_DEPS="$WAYLAND_LIBS $LIBDRM_LIBS"
+ fi
done
EGL_PLATFORMS="$egl_platforms"
;;
esac
AC_SUBST([EGL_PLATFORMS])
+AC_SUBST([WAYLAND_EGL_LIB_DEPS])
+WAYLAND_EGL_PC_REQ_PRIV="wayland-client libdrm"
+WAYLAND_EGL_PC_LIB_PRIV=
+WAYLAND_EGL_PC_CFLAGS=
+
+AC_SUBST([WAYLAND_EGL_PC_REQ_PRIV])
+AC_SUBST([WAYLAND_EGL_PC_LIB_PRIV])
+AC_SUBST([WAYLAND_EGL_PC_CFLAGS])
+
+
AC_ARG_WITH([egl-driver-dir],
[AS_HELP_STRING([--with-egl-driver-dir=DIR],
[directory for EGL drivers [[default=${libdir}/egl]]])],
@@ -1559,12 +1649,8 @@ if test "x$enable_gallium_llvm" = xyes; then
if test "x$LLVM_CONFIG" != xno; then
LLVM_VERSION=`$LLVM_CONFIG --version`
LLVM_CFLAGS=`$LLVM_CONFIG --cppflags`
- LLVM_LIBS="`$LLVM_CONFIG --libs jit interpreter nativecodegen bitwriter` -lstdc++"
+ LLVM_LIBS="`$LLVM_CONFIG --libs` -lstdc++"
- if test "x$HAS_UDIS86" != xno; then
- LLVM_LIBS="$LLVM_LIBS -ludis86"
- DEFINES="$DEFINES -DHAVE_UDIS86"
- fi
LLVM_LDFLAGS=`$LLVM_CONFIG --ldflags`
GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS llvmpipe"
DEFINES="$DEFINES -DGALLIUM_LLVMPIPE -D__STDC_CONSTANT_MACROS"
@@ -1648,20 +1734,12 @@ AC_ARG_ENABLE([gallium-radeon],
[enable_gallium_radeon="$enableval"],
[enable_gallium_radeon=auto])
if test "x$enable_gallium_radeon" = xauto; then
- if test "x$HAVE_LIBDRM_RADEON" = xyes; then
- GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS r300"
- gallium_check_st "radeon/drm" "dri-r300"
- else
- AC_MSG_WARN([libdrm_radeon is missing, not building gallium-radeon (r300)])
- fi
+ GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS r300"
+ gallium_check_st "radeon/drm" "dri-r300"
fi
if test "x$enable_gallium_radeon" = xyes; then
- if test "x$HAVE_LIBDRM_RADEON" = xyes; then
- GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS r300"
- gallium_check_st "radeon/drm" "dri-r300" "xorg-radeon"
- else
- AC_MSG_ERROR([libdrm_radeon is missing, cannot build gallium-radeon (r300)])
- fi
+ GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS r300"
+ gallium_check_st "radeon/drm" "dri-r300" "xorg-radeon"
fi
dnl
@@ -1673,12 +1751,8 @@ AC_ARG_ENABLE([gallium-r600],
[enable_gallium_r600="$enableval"],
[enable_gallium_r600=auto])
if test "x$enable_gallium_r600" = xyes; then
- if test "x$HAVE_LIBDRM_RADEON" = xyes; then
- GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS r600"
- gallium_check_st "r600/drm" "dri-r600"
- else
- AC_MSG_ERROR([libdrm_radeon is missing, cannot build gallium-r600])
- fi
+ GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS r600"
+ gallium_check_st "r600/drm" "dri-r600"
fi
dnl
@@ -1690,7 +1764,7 @@ AC_ARG_ENABLE([gallium-nouveau],
[enable_gallium_nouveau="$enableval"],
[enable_gallium_nouveau=no])
if test "x$enable_gallium_nouveau" = xyes; then
- GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS nouveau nvfx nv50"
+ GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS nouveau nvfx nv50 nvc0"
gallium_check_st "nouveau/drm" "dri-nouveau" "xorg-nouveau"
fi
@@ -1708,19 +1782,6 @@ if test "x$enable_gallium_swrast" = xyes || test "x$enable_gallium_swrast" = xau
fi
fi
-dnl
-dnl Gallium noop configuration
-dnl
-AC_ARG_ENABLE([gallium-noop],
- [AS_HELP_STRING([--enable-gallium-noop],
- [build gallium radeon @<:@default=disabled@:>@])],
- [enable_gallium_noop="$enableval"],
- [enable_gallium_noop=auto])
-if test "x$enable_gallium_noop" = xyes; then
- GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS noop"
- GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS dri-noop"
-fi
-
dnl prepend CORE_DIRS to SRC_DIRS
SRC_DIRS="$CORE_DIRS $SRC_DIRS"
@@ -1753,7 +1814,6 @@ echo " includedir: $includedir"
dnl API info
echo ""
echo " OpenGL: $enable_opengl (ES1: $enable_gles1 ES2: $enable_gles2)"
-echo " GLES overlay: $enable_gles_overlay"
echo " OpenVG: $enable_openvg"
dnl Driver info
@@ -1775,6 +1835,7 @@ if test "$mesa_driver" != no; then
fi
echo " DRI driver dir: $DRI_DRIVER_INSTALL_DIR"
echo " Use XCB: $enable_xcb"
+ echo " Shared dricore: $enable_dricore"
fi
fi
echo ""
@@ -1790,7 +1851,7 @@ if test "$enable_egl" = yes; then
egl_drivers=""
for d in $EGL_DRIVERS_DIRS; do
- egl_drivers="$egl_drivers egl_$d"
+ egl_drivers="$egl_drivers builtin:egl_$d"
done
if test "$enable_gallium" = yes -a "$HAVE_ST_EGL" = yes; then
diff --git a/docs/GL3.txt b/docs/GL3.txt
index fb22739b6c7..ca265af54d7 100644
--- a/docs/GL3.txt
+++ b/docs/GL3.txt
@@ -15,40 +15,45 @@ GL 3.0:
GLSL changes (GL_EXT_gpu_shader4, etc) not started
Conditional rendering (GL_NV_conditional_render) DONE (swrast & softpipe)
Map buffer subranges (GL_ARB_map_buffer_range) DONE
-Float textures, renderbuffers some infrastructure done
- (incl. GL_EXT_packed_float, GL_EXT_shared_exponent)
+Clamping controls (GL_ARB_color_buffer_float) BRANCH ~mareko/mesa floating2
+Float textures, renderbuffers (GL_ARB_texture_float) BRANCH ~mareko/mesa floating2
+GL_EXT_packed_float not started
+GL_EXT_texture_shared_exponent not started
+Float depth buffers (GL_ARB_depth_buffer_float) not started
Framebuffer objects (GL_EXT_framebuffer_object) DONE
-Half-float some infrastructure done
+Half-float DONE
Multisample blit DONE
Non-normalized Integer texture/framebuffer formats ~50% done
1D/2D Texture arrays core Mesa, swrast done
Packed depth/stencil formats DONE
Per-buffer blend and masks (GL_EXT_draw_buffers2) DONE
-GL_EXT_texture_compression_rgtc not started
+GL_EXT_texture_compression_rgtc DONE (swrast, gallium r600)
Red and red/green texture formats DONE (swrast, i965, gallium)
Transform feedback (GL_EXT_transform_feedback) ~50% done
glBindFragDataLocation, glGetFragDataLocation,
glBindBufferRange, glBindBufferBase commands
Vertex array objects (GL_APPLE_vertex_array_object) DONE
-sRGB framebuffer format (GL_EXT_framebuffer_sRGB) not started
+sRGB framebuffer format (GL_EXT_framebuffer_sRGB) core GL done (i965, gallium), GLX todo
glClearBuffer commands DONE
glGetStringi command DONE
glTexParameterI, glGetTexParameterI commands DONE
glVertexAttribI commands DONE (but converts int
values to floats)
+Depth format cube textures 0% done
+
GL 3.1:
GLSL 1.30 and 1.40 not started
-Instanced drawing (GL_ARB_draw_instanced) ~50% done
+Instanced drawing (GL_ARB_draw_instanced) DONE (gallium, swrast)
Buffer copying (GL_ARB_copy_buffer) DONE
Primitive restart (GL_NV_primitive_restart) DONE (gallium)
16 vertex texture image units not started
Texture buffer objs (GL_ARB_texture_buffer_object) not started
Rectangular textures (GL_ARB_texture_rectangle) DONE
Uniform buffer objs (GL_ARB_uniform_buffer_object) not started
-Signed normalized texture formats ~50% done
+Signed normalized textures (GL_EXT_texture_snorm) ~50% done
GL 3.2:
@@ -71,12 +76,12 @@ GL 3.3:
GLSL 3.30 not started
GL_ARB_blend_func_extended not started
GL_ARB_explicit_attrib_location DONE (swrast, i915, i965)
-GL_ARB_occlusion_query2 not started
+GL_ARB_occlusion_query2 DONE (swrast, gallium)
GL_ARB_sampler_objects not started
GL_ARB_texture_rgb10_a2ui not started
GL_ARB_texture_swizzle DONE (same as EXT version)
GL_ARB_timer_query DONE (only Xlib sw driver)
-GL_ARB_instanced_arrays not started
+GL_ARB_instanced_arrays DONE (gallium)
GL_ARB_vertex_type_2_10_10_10_rev not started
@@ -84,7 +89,7 @@ GL 4.0:
GLSL 4.0 not started
GL_ARB_texture_query_lod not started
-GL_ARB_draw_buffers_blend not started
+GL_ARB_draw_buffers_blend DONE (gallium softpipe)
GL_ARB_draw_indirect not started
GL_ARB_gpu_shader_fp64 not started
GL_ARB_sample_shading not started
diff --git a/docs/MESA_multithread_makecurrent.spec b/docs/MESA_multithread_makecurrent.spec
new file mode 100644
index 00000000000..5065c2fc0a3
--- /dev/null
+++ b/docs/MESA_multithread_makecurrent.spec
@@ -0,0 +1,158 @@
+Name
+
+ MESA_multithread_makecurrent
+
+Name Strings
+
+ GLX_MESA_multithread_makecurrent
+
+Contact
+
+ Eric Anholt (eric@anholt.net)
+
+Status
+
+ Not shipping.
+
+Version
+
+ Last Modified Date: 21 February 2011
+
+Number
+
+ TBD
+
+Dependencies
+
+ OpenGL 1.0 or later is required.
+ GLX 1.3 or later is required.
+
+Overview
+
+ The GLX context setup encourages multithreaded applications to
+ create a context per thread which each operate on their own
+ objects in parallel, and leaves synchronization for write access
+ to shared objects up to the application.
+
+ For some applications, maintaining per-thread contexts and
+ ensuring that the glFlush happens in one thread before another
+ thread starts working on that object is difficult. For them,
+ using the same context across multiple threads and protecting its
+ usage with a mutex is both higher performance and easier to
+ implement. This extension gives those applications that option by
+ relaxing the context binding requirements.
+
+ This new behavior matches the requirements of AGL, while providing
+ a feature not specified in WGL.
+
+IP Status
+
+ Open-source; freely implementable.
+
+Issues
+
+ None.
+
+New Procedures and Functions
+
+ None.
+
+New Tokens
+
+ None.
+
+Changes to Chapter 2 of the GLX 1.3 Specification (Functions and Errors)
+
+ Replace the following sentence from section 2.2 Rendering Contexts:
+ In addition, a rendering context can be current for only one
+ thread at a time.
+ with:
+ In addition, an indirect rendering context can be current for
+ only one thread at a time. A direct rendering context may be
+ current to multiple threads, with synchronization of access to
+ the context thruogh the GL managed by the application through
+ mutexes.
+
+Changes to Chapter 3 of the GLX 1.3 Specification (Functions and Errors)
+
+ Replace the following sentence from section 3.3.7 Rendering Contexts:
+ If ctx is current to some other thread, then
+ glXMakeContextCurrent will generate a BadAccess error.
+ with:
+ If ctx is an indirect context current to some other thread,
+ then glXMakeContextCurrent will generate a BadAccess error.
+
+ Replace the following sentence from section 3.5 Rendering Contexts:
+ If ctx is current to some other thread, then
+ glXMakeCurrent will generate a BadAccess error.
+ with:
+ If ctx is an indirect context current to some other thread,
+ then glXMakeCurrent will generate a BadAccess error.
+
+GLX Protocol
+
+ None. The GLX extension only extends to direct rendering contexts.
+
+Errors
+
+ None.
+
+New State
+
+ None.
+
+Issues
+
+ (1) What happens if the app binds a context/drawable in multiple
+ threads, then binds a different context/thread in one of them?
+
+ As with binding a new context from the current thread, the old
+ context's refcount is reduced and the new context's refcount is
+ increased.
+
+ (2) What happens if the app binds a context/drawable in multiple
+ threads, then binds None/None in one of them?
+
+ The GLX context is unreferenced from that thread, and the other
+ threads retain their GLX context binding.
+
+ (3) What happens if the app binds a context/drawable in 7 threads,
+ then destroys the context in one of them?
+
+ As with GLX context destruction previously, the XID is destroyed
+ but the context remains usable by threads that have the context
+ current.
+
+ (4) What happens if the app binds a new drawable/readable with
+ glXMakeCurrent() when it is already bound to another thread?
+
+ The context becomes bound to the new drawable/readable, and
+ further rendering in either thread will use the new
+ drawable/readable.
+
+ (5) What requirements should be placed on the user managing contexts
+ from multiple threads?
+
+ The intention is to allow multithreaded access to the GL at the
+ minimal performance cost, so requiring that the GL do general
+ synchronization (beyond that already required by context sharing)
+ is not an option, and synchronizing of GL's access to the GL
+ context between multiple threads is left to the application to do
+ across GL calls. However, it would be unfortunate for a library
+ doing multithread_makecurrent to require that other libraries
+ share in synchronization for binding of their own contexts, so the
+ refcounting of the contexts is required to be threadsafe.
+
+ (6) Does this apply to indirect contexts?
+
+ This was ignored in the initial revision of the spec. Behavior
+ for indirect contexts is left as-is.
+
+Revision History
+
+ 20 November 2009 Eric Anholt - initial specification
+ 22 November 2009 Eric Anholt - added issues from Ian Romanick.
+ 3 February 2011 Eric Anholt - updated with resolution to issues 1-3
+ 3 February 2011 Eric Anholt - added issue 4, 5
+ 21 February 2011 Eric Anholt - Include glXMakeCurrent() sentence
+ along with glXMakeContextCurrent() for removal.
diff --git a/docs/README.WIN32 b/docs/README.WIN32
index 204b8e66041..986b5994f2e 100644
--- a/docs/README.WIN32
+++ b/docs/README.WIN32
@@ -1,6 +1,10 @@
File: docs/README.WIN32
-Last updated: Apr 25, 2007 - Karl Schultz - kschultz@users.sourceforge.net
+Last updated: Apr 25, 2007
+
+NOTE: This information only applies to Mesa 7.8 and older. Nowadays
+it's probably better to use Scons to build for Windows.
+
Quick Start
----- -----
@@ -130,11 +134,5 @@ change all the gl* symbols to mgl*. Because this is easy to do with a
global replace operation in a text editor, no additional mangled
version of mesa.def is maintained or shipped.
-If you have a Windows-related build problem or question, it is
-probably better to direct it to me (kschultz@users.sourceforge.net),
-rather than directly to the other Mesa developers. I will help you as
-much as I can. I also monitor the Mesa mailing lists and will answer
-questions in this area there as well.
-
-
-Karl Schultz
+If you have a Windows-related build problem or question, please post
+to the mesa-dev or mesa-users list.
diff --git a/docs/WL_bind_wayland_display.spec b/docs/WL_bind_wayland_display.spec
new file mode 100644
index 00000000000..0ff49d6a762
--- /dev/null
+++ b/docs/WL_bind_wayland_display.spec
@@ -0,0 +1,92 @@
+Name
+
+ WL_bind_wayland_display
+
+Name Strings
+
+ EGL_WL_bind_wayland_display
+
+Contact
+
+ Kristian Høgsberg <krh@bitplanet.net>
+ Benjamin Franzke <benjaminfranzke@googlemail.com>
+
+Status
+
+ Proposal
+
+Version
+
+ Version 1, March 1, 2011
+
+Number
+
+ EGL Extension #not assigned
+
+Dependencies
+
+ Reguires EGL 1.4 or later. This extension is written against the
+ wording of the EGL 1.4 specification.
+
+ EGL_KHR_base_image is required.
+
+Overview
+
+ This extension provides entry points for binding and unbinding the
+ wl_display of a Wayland compositor to an EGLDisplay. Binding a
+ wl_display means that the EGL implementation should provide one or
+ more interfaces in the Wayland protocol to allow clients to create
+ wl_buffer objects. On the server side, this extension also
+ provides a new target for eglCreateImageKHR, to create an EGLImage
+ from a wl_buffer
+
+ Adding a implementation specific wayland interface, allows the
+ EGL implementation to define specific wayland requests and events,
+ needed for buffer sharing in a EGL wayland platform.
+
+IP Status
+
+ Open-source; freely implementable.
+
+New Procedures and Functions
+
+ EGLBoolean eglBindWaylandDisplayWL(EGLDisplay dpy,
+ struct wl_display *display);
+
+ EGLBoolean eglUnbindWaylandDisplayWL(EGLDisplay dpy,
+ struct wl_display *display);
+
+New Tokens
+
+ Accepted as <target> in eglCreateImageKHR
+
+ EGL_WAYLAND_BUFFER_WL 0x31D5
+
+Additions to the EGL 1.4 Specification:
+
+ To bind a server side wl_display to an EGLDisplay, call
+
+ EGLBoolean eglBindWaylandDisplayWL(EGLDisplay dpy,
+ struct wl_display *display);
+
+ To unbind a server side wl_display from an EGLDisplay, call
+
+ EGLBoolean eglUnbindWaylandDisplayWL(EGLDisplay dpy,
+ struct wl_display *display);
+
+ eglBindWaylandDisplayWL returns EGL_FALSE when there is already a
+ wl_display bound to EGLDisplay otherwise EGL_TRUE.
+
+ eglUnbindWaylandDisplayWL returns EGL_FALSE when there is no
+ wl_display bound to the EGLDisplay currently otherwise EGL_TRUE.
+
+ Import a wl_buffer by calling eglCreateImageKHR with
+ wl_buffer as EGLClientBuffer, EGL_WAYLAND_BUFFER_WL as the target,
+ and an empty attribute_list.
+
+Issues
+
+Revision History
+
+ Version 1, March 1, 2011
+ Initial draft (Benjamin Franzke)
diff --git a/docs/egl.html b/docs/egl.html
index ee9bf355d7c..fb15086679f 100644
--- a/docs/egl.html
+++ b/docs/egl.html
@@ -19,10 +19,7 @@ API entry points and helper functions for use by the drivers. Drivers are
dynamically loaded by the main library and most of the EGL API calls are
directly dispatched to the drivers.</p>
-<p>The driver in use decides the window system to support. For drivers that
-support hardware rendering, there are usually multiple drivers supporting the
-same window system. Each one of of them supports a certain range of graphics
-cards.</p>
+<p>The driver in use decides the window system to support.</p>
<h2>Build EGL</h2>
@@ -86,16 +83,8 @@ select the right platforms automatically.</p>
<li><code>--enable-gles1</code> and <code>--enable-gles2</code>
-<p>These options enable OpenGL ES support in OpenGL. The result is
-one big library that supports multiple APIs.</p>
-
-</li>
-
-<li><code>--enable-gles-overlay</code>
-
-<p>This option enables OpenGL ES as separate libraries. This is an alternative
-approach to enable OpenGL ES. It is only supported by
-<code>egl_gallium</code>.</p>
+<p>These options enable OpenGL ES support in OpenGL. The result is one big
+internal library that supports multiple APIs.</p>
</li>
@@ -134,13 +123,24 @@ colon-separated directories where the main library will look for drivers, in
addition to the default directory. This variable is ignored for setuid/setgid
binaries.</p>
+<p>This variable is usually set to test an uninstalled build. For example, one
+may set</p>
+
+<pre>
+ $ export LD_LIBRARY_PATH=$mesa/lib
+ $ export EGL_DRIVERS_PATH=$mesa/lib/egl
+</pre>
+
+<p>to test a build without installation</p>
+
</li>
<li><code>EGL_DRIVER</code>
-<p>This variable specifies a full path to an EGL driver and it forces the
-specified EGL driver to be loaded. It comes in handy when one wants to test a
-specific driver. This variable is ignored for setuid/setgid binaries.</p>
+<p>This variable specifies a full path to or the name of an EGL driver. It
+forces the specified EGL driver to be loaded. It comes in handy when one wants
+to test a specific driver. This variable is ignored for setuid/setgid
+binaries.</p>
</li>
@@ -180,8 +180,10 @@ variable to true forces the use of software rendering.</p>
<li><code>egl_dri2</code>
<p>This driver supports both <code>x11</code> and <code>drm</code> platforms.
-It functions as a DRI2 driver loader. For <code>x11</code> support, it talks
-to the X server directly using (XCB-)DRI2 protocol.</p>
+It functions as a DRI driver loader. For <code>x11</code> support, it talks to
+the X server directly using (XCB-)DRI2 protocol.</p>
+
+<p>This driver can share DRI drivers with <code>libGL</code>.</p>
</li>
@@ -191,6 +193,10 @@ to the X server directly using (XCB-)DRI2 protocol.</p>
hardwares supported by Gallium3D. It is the only driver that supports OpenVG.
The supported platforms are X11, DRM, FBDEV, and GDI.</p>
+<p>This driver comes with its own hardware drivers
+(<code>pipe_&lt;hw&gt;</code>) and client API modules
+(<code>st_&lt;api&gt;</code>).</p>
+
</li>
<li><code>egl_glx</code>
@@ -202,6 +208,21 @@ is not available in GLX or GLX extensions.</p>
</li>
</ul>
+<h2>Packaging</h2>
+
+<p>The ABI between the main library and its drivers are not stable. Nor is
+there a plan to stabilize it at the moment. Of the EGL drivers,
+<code>egl_gallium</code> has its own hardware drivers and client API modules.
+They are considered internal to <code>egl_gallium</code> and there is also no
+stable ABI between them. These should be kept in mind when packaging for
+distribution.</p>
+
+<p>Generally, <code>egl_dri2</code> is preferred over <code>egl_gallium</code>
+when the system already has DRI drivers. As <code>egl_gallium</code> is loaded
+before <code>egl_dri2</code> when both are available, <code>egl_gallium</code>
+may either be disabled with <code>--disable-gallium-egl</code> or packaged
+separately.</p>
+
<h2>Developers</h2>
<p>The sources of the main library and the classic drivers can be found at
diff --git a/docs/envvars.html b/docs/envvars.html
index fd1700a02f1..c8be8437176 100644
--- a/docs/envvars.html
+++ b/docs/envvars.html
@@ -9,17 +9,38 @@
<H1>Environment Variables</H1>
<p>
-Mesa supports the following environment variables:
+Normally, no environment variables need to be set. Most of the environment
+variables used by Mesa/Gallium are for debugging purposes, but they can
+sometimes be useful for debugging end-user issues.
</p>
+
+
+<H2>LibGL environment variables</H2>
+
+<ul>
+<li>LIBGL_DEBUG - If defined debug information will be printed to stderr.
+ If set to 'verbose' additional information will be printed.
+<li>LIBGL_DRIVERS_PATH - colon-separated list of paths to search for DRI drivers
+<li>LIBGL_ALWAYS_INDIRECT - forces an indirect rendering context/connection.
+<li>LIBGL_ALWAYS_SOFTWARE - if set, always use software rendering
+<li>LIBGL_NO_DRAWARRAYS - if set do not use DrawArrays GLX protocol (for debugging)
+</ul>
+
+
+
+<H2>Core Mesa environment variables</H2>
+
<ul>
<li>MESA_NO_ASM - if set, disables all assembly language optimizations
<li>MESA_NO_MMX - if set, disables Intel MMX optimizations
<li>MESA_NO_3DNOW - if set, disables AMD 3DNow! optimizations
<li>MESA_NO_SSE - if set, disables Intel SSE optimizations
-<li>MESA_DEBUG - if set, error messages are printed to stderr.
-If the value of MESA_DEBUG is "FP" floating point arithmetic errors will
-generate exceptions.
-<li>MESA_NO_DITHER - if set, disables dithering, overriding glEnable(GL_DITHER)
+<li>MESA_DEBUG - if set, error messages are printed to stderr. For example,
+ if the application generates a GL_INVALID_ENUM error, a corresponding error
+ message indicating where the error occured, and possibly why, will be
+ printed to stderr.<br>
+ If the value of MESA_DEBUG is 'FP' floating point arithmetic errors will
+ generate exceptions.
<li>MESA_TEX_PROG - if set, implement conventional texture env modes with
fragment programs (intended for developers only)
<li>MESA_TNL_PROG - if set, implement conventional vertex transformation
@@ -28,11 +49,14 @@ Setting this variable automatically sets the MESA_TEX_PROG variable as well.
<li>MESA_EXTENSION_OVERRIDE - can be used to enable/disable extensions.
A value such as "GL_EXT_foo -GL_EXT_bar" will enable the GL_EXT_foo extension
and disable the GL_EXT_bar extension.
-<li>MESA_GLSL - <a href="shading.html#envvars">shading language options</a>
+<li>MESA_GLSL - <a href="shading.html#envvars">shading language compiler options</a>
</ul>
+
+<H2>Mesa Xlib driver environment variables</H2>
+
<p>
-The following are only applicable to the Xlib software driver.
+The following are only applicable to the Mesa Xlib software driver.
See the <A HREF="xlibdriver.html">Xlib software driver page</A> for details.
</p>
<ul>
@@ -51,9 +75,8 @@ See the <A HREF="xlibdriver.html">Xlib software driver page</A> for details.
</ul>
-<p>
-These environment variables are for the Intel i945/i965 drivers:
-</p>
+<h2>i945/i965 driver environment variables (non-Gallium)</h2>
+
<ul>
<li>INTEL_STRICT_CONFORMANCE - if set to 1, enable sw fallbacks to improve
OpenGL conformance. If set to 2, always use software rendering.
@@ -62,17 +85,71 @@ These environment variables are for the Intel i945/i965 drivers:
</ul>
-<p>
-These environment variables are for the Radeon R300 driver:
-</p>
+<h2>Radeon R300 driver environment variables (non-Gallium)</h2>
+
<ul>
<li>R300_NO_TCL - if set, disable hardware-accelerated Transform/Clip/Lighting.
</ul>
+
+<h2>EGL environment variables</h2>
+
<p>
Mesa EGL supports different sets of environment variables. See the
<a href="egl.html">Mesa EGL</a> page for the details.
</p>
+
+<h2>Gallium environment variables</h2>
+
+<ul>
+<li>GALLIUM_PRINT_OPTIONS - if non-zero, print all the Gallium environment
+ variables which are used, and their current values.
+<li>GALLIUM_NOSSE - if non-zero, do not use SSE runtime code generation for
+ shader execution
+<li>GALLIUM_NOPPC - if non-zero, do not use PPC runtime code generation for
+ shader execution
+<li>GALLIUM_DUMP_CPU - if non-zero, print information about the CPU on start-up
+<li>TGSI_PRINT_SANITY - if set, do extra sanity checking on TGSI shaders and
+ print any errors to stderr.
+<LI>DRAW_FSE - ???
+<LI>DRAW_NO_FSE - ???
+<li>DRAW_USE_LLVM - if set to zero, the draw module will not use LLVM to execute
+ shaders, vertex fetch, etc.
+</ul>
+
+<h3>Softpipe driver environment variables</h3>
+<ul>
+<li>SOFTPIPE_DUMP_FS - if set, the softpipe driver will print fragment shaders
+ to stderr
+<li>SOFTPIPE_DUMP_GS - if set, the softpipe driver will print geometry shaders
+ to stderr
+<li>SOFTPIPE_NO_RAST - if set, rasterization is no-op'd. For profiling purposes.
+</ul>
+
+
+<h3>LLVMpipe driver environment variables</h3>
+<ul>
+<li>LP_NO_RAST - if set LLVMpipe will no-op rasterization
+<li>LP_DEBUG - a comma-separated list of debug options is acceptec. See the
+ source code for details.
+<li>LP_PERF - a comma-separated list of options to selectively no-op various
+ parts of the driver. See the source code for details.
+<li>LP_NUM_THREADS - an integer indicating how many threads to use for rendering.
+ Zero turns of threading completely. The default value is the number of CPU
+ cores present.
+</ul>
+
+
+<p>
+Other Gallium drivers have their own environment variables. These may change
+frequently so the source code should be consulted for details.
+</p>
+
+
+<br>
+<br>
+
+
</BODY>
</HTML>
diff --git a/docs/news.html b/docs/news.html
index 72d38ee3f80..6a706ab3c56 100644
--- a/docs/news.html
+++ b/docs/news.html
@@ -11,6 +11,15 @@
<H1>News</H1>
+<h2>March 2, 2011</h2>
+
+<p>
+<a href="relnotes-7.9.2.html">Mesa 7.9.2</a> and
+<a href="relnotes-7.10.1.html">Mesa 7.10.1</a> are released. These are
+stable releases containing bug fixes since the 7.9.1 and 7.10 releases.
+</p>
+
+
<h2>October 4, 2010</h2>
<p>
diff --git a/docs/opengles.html b/docs/opengles.html
index 63cc1146a2e..742182e76a3 100644
--- a/docs/opengles.html
+++ b/docs/opengles.html
@@ -17,7 +17,7 @@ target="_parent"> http://www.khronos.org/opengles/</a>.</p>
<h2>Build the Libraries</h2>
<ol>
-<li>Run <code>configure</code> with <code>--enable-gles-overlay</code> and enable the Gallium driver for your hardware.</li>
+<li>Run <code>configure</code> with <code>--enable-gles1 --enable-gles2</code> and enable the Gallium driver for your hardware.</li>
<li>Build and install Mesa as usual.</li>
</ol>
@@ -53,8 +53,6 @@ your build. For example,</p>
<tr><td>Library Name</td><td>Used By</td><td>Enabled</td><td>OpenGL</td><td>OpenGL ES 1.x</td><td>OpenGL ES 2.x</td></tr>
<tr><td><code>libmesa.a</td><td>Classic DRI drivers</td><td>y</td><td>y</td><td>--enable-gles1</td><td>--enable-gles2</td></tr>
<tr><td><code>libmesagallium.a</td><td>Gallium EGL and DRI drivers</td><td>y</td><td>y</td><td>--enable-gles1</td><td>--enable-gles2</td></tr>
- <tr><td><code>libes1gallium.a</td><td>Gallium EGL drivers</td><td>--enable-gles-overlay</td><td>n</td><td>y</td><td>n</td></tr>
- <tr><td><code>libes2gallium.a</td><td>Gallium EGL drivers</td><td>--enable-gles-overlay</td><td>n</td><td>n</td><td>y</td></tr>
</table>
<h3>Dispatch Table</h3>
diff --git a/docs/relnotes-7.10.1.html b/docs/relnotes-7.10.1.html
new file mode 100644
index 00000000000..ea605d966ca
--- /dev/null
+++ b/docs/relnotes-7.10.1.html
@@ -0,0 +1,380 @@
+<HTML>
+
+<head>
+<TITLE>Mesa Release Notes</TITLE>
+<link rel="stylesheet" type="text/css" href="mesa.css">
+<meta http-equiv="content-type" content="text/html; charset=utf-8" />
+</head>
+
+<BODY>
+
+<body bgcolor="#eeeeee">
+
+<H1>Mesa 7.10.1 Release Notes / TBD</H1>
+
+<p>
+Mesa 7.10.1 is a bug fix release which fixes bugs found since the 7.10 release.
+</p>
+<p>
+Mesa 7.10.1 implements the OpenGL 2.1 API, but the version reported by
+glGetString(GL_VERSION) depends on the particular driver being used.
+Some drivers don't support all the features required in OpenGL 2.1.
+</p>
+<p>
+See the <a href="install.html">Compiling/Installing page</a> for prerequisites
+for DRI hardware acceleration.
+</p>
+
+
+<h2>MD5 checksums</h2>
+<pre>
+4b4cee19f3bf16eb78bd4cc278ccf812 MesaLib-7.10.1.tar.gz
+efe8da4d80c2a5d32a800770b8ce5dfa MesaLib-7.10.1.tar.bz2
+0fd2b1a025934de3f8cecf9fb9b57f4c MesaLib-7.10.1.zip
+42beb0f5188d544476c19496f725fa67 MesaGLUT-7.10.1.tar.gz
+637bb8a20fdad89f7382b4ea83f896e3 MesaGLUT-7.10.1.tar.bz2
+bdbf3ffb2606d6aa8afabb6c6243b91b MesaGLUT-7.10.1.zip
+</pre>
+
+
+<h2>New features</h2>
+<p>None.</p>
+
+<h2>Bug fixes</h2>
+<p>This list is likely incomplete.</p>
+<ul>
+<li>Fix an off-by-one bug in a vsplit assertion.</li>
+<li>Fix incorrect handling of <tt>layout</tt> qualifier
+with <tt>in</tt>, <tt>out</tt>, <tt>attribute</tt>, and <tt>varying</tt>.</li>
+
+<li>Fix an i965 shader bug where the negative absolute value was generated instead of the absolute value of a negation.</li>
+
+<li>Fix numerous issues handling precision qualifiers in GLSL ES.</li>
+
+<li>Fixed a few GLX protocol encoder bugs (Julien Cristau)</li>
+
+<li>Assorted Gallium llvmpipe driver bug fixes</li>
+
+<li>Assorted Mesa/Gallium state tracker bug fixes</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=26795">Bug 26795</a> - gl_FragCoord off by one in Gallium drivers.</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=29164">Bug 29164</a> - [GLSL 1.20] invariant variable shouldn't be used before declaration</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=29823">Bug 29823</a> - GetUniform[if]v busted</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=29927">Bug 29927</a> - [glsl2] fail to compile shader with constructor for array of struct type</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=30156">Bug 30156</a> - [i965] After updating to Mesa 7.9, Civilization IV starts to show garbage</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=31923">Bug 31923</a> - [GLSL 1.20] allowing inconsistent centroid declaration between two vertex shaders</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=31925">Bug 31925</a> - [GLSL 1.20] "#pragma STDGL invariant(all)" fail</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=32214">Bug 32214</a> - [gles2]no link error happens when missing vertex shader or frag shader</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=32375">Bug 32375</a> - [gl gles2] Not able to get the attribute by function glGetVertexAttribfv</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=32541">Bug 32541</a> - Segmentation Fault while running an HDR (high dynamic range) rendering demo</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=32569">Bug 32569</a> - [gles2] glGetShaderPrecisionFormat not implemented yet</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=32695">Bug 32695</a> - [glsl] SIGSEGV glcpp/glcpp-parse.y:833</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=32831">Bug 32831</a> - [glsl] division by zero crashes GLSL compiler</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=32910">Bug 32910</a> - Keywords 'in' and 'out' not handled properly for GLSL 1.20 shaders</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=33219">Bug 33219</a> -[GLSL bisected] implicit sized array triggers segfault in ir_to_mesa_visitor::copy_propagate</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=33306">Bug 33306</a> - GLSL integer division by zero crashes GLSL compiler</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=33308">Bug 33308</a> -[glsl] ast_to_hir.cpp:3016: virtual ir_rvalue* ast_jump_statement::hir(exec_list*, _mesa_glsl_parse_state*): Assertion `ret != __null' failed.</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=33316">Bug 33316</a> - uniform array will be allocate one line more and initialize it when it was freed will abort</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=33386">Bug 33386</a> - Dubious assembler in read_rgba_span_x86.S</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=33388">Bug 33388</a> - Dubious assembler in xform4.S</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=33433">Bug 33433</a> - Error in x86-64 API dispatch code.</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=33507">Bug 33507</a> - [glsl] GLSL preprocessor modulus by zero crash</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=33508">Bug 33508</a> - [glsl] GLSL compiler modulus by zero crash</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=33916">Bug 33916</a> - Compiler accepts reserved operators % and %=</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=34030">Bug 34030</a> - [bisected] Starcraft 2: some effects are corrupted or too big</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=34047">Bug 34047</a> - Assert in _tnl_import_array() when using GLfixed vertex datatypes with GLESv2</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=34114">Bug 34114</a> - Sun Studio build fails due to standard library functions not being in global namespace</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=34179">Bug 34179</a> - Nouveau 3D driver: nv50_pc_emit.c:863 assertion error kills Compiz</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=34198">Bug 34198</a> - [GLSL] implicit sized array with index 0 used gets assertion</li>
+
+<li><a href="https://bugs.launchpad.net/ubuntu/+source/mesa/+bug/691653">Ubuntu bug 691653</a> - compiz crashes when using alt-tab (the radeon driver kills it) </li>
+
+<li><a href="https://bugs.meego.com/show_bug.cgi?id=13005">Meego bug 13005</a> - Graphics GLSL issue lead to camera preview fail on Pinetrail</li>
+
+<!-- <li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=">Bug </a> - </li> -->
+
+</ul>
+
+
+<h2>Changes</h2>
+<p>The full set of changes can be viewed by using the following GIT command:</p>
+
+<pre>
+ git log mesa-7.10..mesa-7.10.1
+</pre>
+
+<p>Alberto Milone (1):
+<ul>
+ <li>r600c: add evergreen ARL support.</li>
+</ul></p>
+
+<p>Brian Paul (21):
+<ul>
+ <li>draw: Fix an off-by-one bug in a vsplit assertion.</li>
+ <li>docs: add links to 7.9.1 and 7.10 release notes</li>
+ <li>docs: added news item for 7.9.1 and 7.10 release</li>
+ <li>gallivm: work around LLVM 2.6 bug when calling C functions</li>
+ <li>gallivm: fix copy&amp;paste error from previous commit</li>
+ <li>mesa: fix a few format table mistakes, assertions</li>
+ <li>mesa: fix num_draw_buffers==0 in fixed-function fragment program generation</li>
+ <li>mesa: don't assert in GetIntegerIndexed, etc</li>
+ <li>mesa: check for dummy renderbuffer in _mesa_FramebufferRenderbufferEXT()</li>
+ <li>llvmpipe: make sure binning is active when we begin/end a query</li>
+ <li>st/mesa: fix incorrect fragcoord.x translation</li>
+ <li>softpipe: fix off-by-one error in setup_fragcoord_coeff()</li>
+ <li>cso: fix loop bound in cso_set_vertex_samplers()</li>
+ <li>st/mesa: fix incorrect glCopyPixels position on fallback path</li>
+ <li>st/mesa: set renderbuffer _BaseFormat in a few places</li>
+ <li>st/mesa: fix the default case in st_format_datatype()</li>
+ <li>st/mesa: need to translate clear color according to surface's base format</li>
+ <li>docs: update 7.9.2 release notes with Brian's cherry-picks</li>
+ <li>docs: add link to 7.10.1 release notes</li>
+ <li>mesa: implement glGetShaderPrecisionFormat()</li>
+ <li>docs: updated environment variable list</li>
+</ul></p>
+
+<p>Bryce Harrington (1):
+<ul>
+ <li>r300g: Null pointer check for buffer deref in gallium winsys</li>
+</ul></p>
+
+<p>Chad Versace (20):
+<ul>
+ <li>glsl: At link-time, check that globals have matching centroid qualifiers</li>
+ <li>glcpp: Fix segfault when validating macro redefinitions</li>
+ <li>glsl: Fix parser rule for type_specifier</li>
+ <li>glsl: Change default value of ast_type_specifier::precision</li>
+ <li>glsl: Add semantic checks for precision qualifiers</li>
+ <li>glsl: Add support for default precision statements</li>
+ <li>glsl: Remove redundant semantic check in parser</li>
+ <li>glsl: Fix semantic checks on precision qualifiers</li>
+ <li>glsl: Fix segfault due to missing printf argument</li>
+ <li>glsl: Mark 'in' variables at global scope as read-only</li>
+ <li>mesa: Refactor handling of extension strings</li>
+ <li>mesa: Add/remove extensions in extension string</li>
+ <li>mesa: Change dependencies of some OES extension strings</li>
+ <li>mesa: Change OES_point_sprite to depend on ARB_point_sprite</li>
+ <li>mesa: Change OES_standard_derivatives to be stand-alone extension</li>
+ <li>i915: Disable extension OES_standard_derivatives</li>
+ <li>glcpp: Raise error when modulus is zero</li>
+ <li>glsl: Set operators '%' and '%=' to be reserved when GLSL &lt 1.30</li>
+ <li>glsl: Reinstate constant-folding for division by zero</li>
+ <li>tnl: Add support for datatype GL_FIXED in vertex arrays</li>
+</ul></p>
+
+<p>Chia-I Wu (1):
+<ul>
+ <li>mesa: Add glDepthRangef and glClearDepthf to APIspec.xml.</li>
+</ul></p>
+
+<p>Christoph Bumiller (1):
+<ul>
+ <li>nv50,nvc0: do not forget to apply sign mode to saved TGSI inputs</li>
+</ul></p>
+
+<p>Cyril Brulebois (1):
+<ul>
+ <li>Point to bugs.freedesktop.org rather than bugzilla.freedesktop.org</li>
+</ul></p>
+
+<p>Dave Airlie (3):
+<ul>
+ <li>radeon/r200: fix fbo-clearmipmap + gen-teximage</li>
+ <li>radeon: calculate complete texture state inside TFP function</li>
+ <li>radeon: avoid segfault on 3D textures.</li>
+</ul></p>
+
+<p>Dimitry Andric (4):
+<ul>
+ <li>mesa: s/movzx/movzbl/</li>
+ <li>mesa: s/movzxw/movzwl/ in read_rgba_span_x86.S</li>
+ <li>glapi: adding @ char before type specifier in glapi_x86.S</li>
+ <li>glapi: add @GOTPCREL relocation type</li>
+</ul></p>
+
+<p>Eric Anholt (16):
+<ul>
+ <li>glsl: Fix the lowering of variable array indexing to not lose write_masks.</li>
+ <li>i965/fs: When producing ir_unop_abs of an operand, strip negate.</li>
+ <li>i965/vs: When MOVing to produce ABS, strip negate of the operand.</li>
+ <li>i965/fs: Do flat shading when appropriate.</li>
+ <li>i965: Avoid double-negation of immediate values in the VS.</li>
+ <li>intel: Make renderbuffer tiling choice match texture tiling choice.</li>
+ <li>i965: Fix dead pointers to fp-&gt;Parameters-&gt;ParameterValues[] after realloc.</li>
+ <li>docs: Add a relnote for the Civ IV on i965.</li>
+ <li>glapi: Add entrypoints and enums for GL_ARB_ES2_compatibility.</li>
+ <li>mesa: Add extension enable bit for GL_ARB_ES2_compatibility.</li>
+ <li>mesa: Add actual support for glReleaseShaderCompiler from ES2.</li>
+ <li>mesa: Add support for glDepthRangef and glClearDepthf.</li>
+ <li>mesa: Add getters for ARB_ES2_compatibility MAX_*_VECTORS.</li>
+ <li>mesa: Add getter for GL_SHADER_COMPILER with ARB_ES2_compatibility.</li>
+ <li>i965: Fix a bug in i965 compute-to-MRF.</li>
+ <li>i965/fs: Add a helper function for detecting math opcodes.</li>
+</ul></p>
+
+<p>Fredrik Höglund (1):
+<ul>
+ <li>st/mesa: fix a regression from cae2bb76</li>
+</ul></p>
+
+<p>Ian Romanick (42):
+<ul>
+ <li>docs: Add 7.10 md5sums</li>
+ <li>glsl: Support the 'invariant(all)' pragma</li>
+ <li>glcpp: Generate an error for division by zero</li>
+ <li>glsl: Add version_string containing properly formatted GLSL version</li>
+ <li>glsl &amp; glcpp: Refresh autogenerated lexer and parser files.</li>
+ <li>glsl: Disallow 'in' and 'out' on globals in GLSL 1.20</li>
+ <li>glsl: Track variable usage, use that to enforce semantics</li>
+ <li>glsl: Allow 'in' and 'out' when 'layout' is also available</li>
+ <li>docs: Initial bits of 7.10.1 release notes</li>
+ <li>mesa: bump version to 7.10.1-devel</li>
+ <li>doc: Update 7.10.1 release notes</li>
+ <li>glsl: Emit errors or warnings when 'layout' is used with 'attribute' or 'varying'</li>
+ <li>docs: Update 7.10.1 release notes</li>
+ <li>glsl: Refresh autogenerated lexer and parser files.</li>
+ <li>glsl: Don't assert when the value returned by a function has no rvalue</li>
+ <li>linker: Set sizes for non-global arrays as well</li>
+ <li>linker: Propagate max_array_access while linking functions</li>
+ <li>docs: Update 7.10.1 release notes</li>
+ <li>mesa: glGetUniform only returns a single element of an array</li>
+ <li>linker: Generate link errors when ES shaders are missing stages</li>
+ <li>mesa: Fix error checks in GetVertexAttrib functions</li>
+ <li>Use C-style system headers in C++ code to avoid issues with std:: namespace</li>
+ <li>docs: Update 7.10.1 release notes</li>
+ <li>glapi: Regenerate for GL_ARB_ES2_compatibility.</li>
+ <li>mesa: Connect glGetShaderPrecisionFormat into the dispatch table</li>
+ <li>i965: Set correct values for range/precision of fragment shader types</li>
+ <li>i915: Set correct values for range/precision of fragment shader types</li>
+ <li>intel: Fix typeos from 3d028024 and 790ff232</li>
+ <li>glsl: Ensure that all GLSL versions are supported in the stand-alone compiler</li>
+ <li>glsl: Reject shader versions not supported by the implementation</li>
+ <li>mesa: Initial size for secondary color array is 3</li>
+ <li>glsl: Finish out the reduce/reduce error fixes</li>
+ <li>glsl: Regenerate compiler and glcpp files from cherry picks</li>
+ <li>linker: Fix off-by-one error implicit array sizing</li>
+ <li>docs: update 7.10.1 release notes with Ian's recent cherry picks</li>
+ <li>i915: Only mark a register as available if all components are written</li>
+ <li>i915: Calculate partial result to temp register first</li>
+ <li>i915: Force lowering of all types of indirect array accesses in the FS</li>
+ <li>docs: Update 7.10.1 with (hopefully) the last of the cherry picks</li>
+ <li>docs: Clean up bug fixes list</li>
+ <li>intel: Remove driver date and related bits from renderer string</li>
+ <li>mesa: set version string to 7.10.1 (final)</li>
+</ul></p>
+
+<p>Jian Zhao (1):
+<ul>
+ <li>mesa: fix an error in uniform arrays in row calculating.</li>
+</ul></p>
+
+<p>Julien Cristau (3):
+<ul>
+ <li>glx: fix request lengths</li>
+ <li>glx: fix GLXChangeDrawableAttributesSGIX request</li>
+ <li>glx: fix length of GLXGetFBConfigsSGIX</li>
+</ul></p>
+
+<p>Keith Packard (1):
+<ul>
+ <li>glsl: Eliminate reduce/reduce conflicts in glsl grammar</li>
+</ul></p>
+
+<p>Kenneth Graunke (20):
+<ul>
+ <li>glsl: Expose a public glsl_type::void_type const pointer.</li>
+ <li>glsl: Don't bother unsetting a destructor that was never set.</li>
+ <li>glsl, i965: Remove unnecessary talloc includes.</li>
+ <li>glcpp: Remove use of talloc reference counting.</li>
+ <li>ralloc: Add a fake implementation of ralloc based on talloc.</li>
+ <li>Convert everything from the talloc API to the ralloc API.</li>
+ <li>ralloc: a new MIT-licensed recursive memory allocator.</li>
+ <li>Remove talloc from the make and automake build systems.</li>
+ <li>Remove talloc from the SCons build system.</li>
+ <li>Remove the talloc sources from the Mesa repository.</li>
+ <li>glsl: Fix use of uninitialized values in _mesa_glsl_parse_state ctor.</li>
+ <li>i965/fs: Apply source modifier workarounds to POW as well.</li>
+ <li>i965: Fix shaders that write to gl_PointSize on Sandybridge.</li>
+ <li>i965/fs: Avoid register coalescing away gen6 MATH workarounds.</li>
+ <li>i965/fs: Correctly set up gl_FragCoord.w on Sandybridge.</li>
+ <li>i965: Increase Sandybridge point size clamp.</li>
+ <li>i965/fs: Refactor control flow stack handling.</li>
+ <li>i965: Increase Sandybridge point size clamp in the clip state.</li>
+ <li>glsl: Use reralloc instead of plain realloc.</li>
+ <li>Revert "i965/fs: Correctly set up gl_FragCoord.w on Sandybridge."</li>
+</ul></p>
+
+<p>Marek Olšák (4):
+<ul>
+ <li>docs: fix messed up names with special characters in relnotes-7.10</li>
+ <li>docs: fix messed up names with special characters in relnotes-7.9.1</li>
+ <li>mesa: fix texture3D mipmap generation for UNSIGNED_BYTE_3_3_2</li>
+ <li>st/dri: Track drawable context bindings</li>
+</ul></p>
+
+<p>Paulo Zanoni (1):
+<ul>
+ <li>dri_util: fail driCreateNewScreen if InitScreen is NULL</li>
+</ul></p>
+
+<p>Sam Hocevar (2):
+<ul>
+ <li>docs: add glsl info</li>
+ <li>docs: fix glsl_compiler name</li>
+</ul></p>
+
+<p>Tom Fogal (1):
+<ul>
+ <li>Regenerate gl_mangle.h.</li>
+</ul></p>
+
+<p>Tom Stellard (2):
+<ul>
+ <li>r300/compiler: Disable register rename pass on r500</li>
+ <li>r300/compiler: Don't erase sources when converting RGB-&gt;Alpha</li>
+</ul></p>
+
+<p>Vinson Lee (3):
+<ul>
+ <li>ralloc: Add missing va_end following va_copy.</li>
+ <li>mesa: Move declaration before code in extensions.c.</li>
+ <li>mesa: Move loop variable declarations outside for loop in extensions.c.</li>
+</ul></p>
+
+<p>nobled (1):
+<ul>
+ <li>glx: Put null check before use</li>
+</ul></p>
+
+</p>
+
+</body>
+</html>
diff --git a/docs/relnotes-7.10.html b/docs/relnotes-7.10.html
index 1f5570d71d3..3f4f229b052 100644
--- a/docs/relnotes-7.10.html
+++ b/docs/relnotes-7.10.html
@@ -1,14 +1,16 @@
<HTML>
+<head>
<TITLE>Mesa Release Notes</TITLE>
-
-<head><link rel="stylesheet" type="text/css" href="mesa.css"></head>
+<link rel="stylesheet" type="text/css" href="mesa.css">
+<meta http-equiv="content-type" content="text/html; charset=utf-8" />
+</head>
<BODY>
<body bgcolor="#eeeeee">
-<H1>Mesa 7.10 Release Notes / tbd</H1>
+<H1>Mesa 7.10 Release Notes / January 7, 2011</H1>
<p>
Mesa 7.10 is a new development release.
@@ -28,7 +30,12 @@ for DRI hardware acceleration.
<h2>MD5 checksums</h2>
<pre>
-tbd
+0a70c15c135561824bdcae92bf232e43 MesaLib-7.10.tar.gz
+33fb94eccc02cbb4d8d1365615e38e46 MesaLib-7.10.tar.bz2
+5cafdc0eda0f9bf370b95c98df3338fa MesaLib-7.10.zip
+bc644be551ed585fc4f66c16b64a91c9 MesaGLUT-7.10.tar.gz
+5c2677a155672352d62b177e4f0f92e8 MesaGLUT-7.10.tar.bz2
+2ce5001f74496d1ba719ef74d910a5cf MesaGLUT-7.10.zip
</pre>
@@ -38,19 +45,2751 @@ tbd
<li>GL_ARB_texture_rg (Intel, software drivers, gallium drivers).
<li>GL_EXT_separate_shader_objects extension (Intel and software drivers).
<li>GL_NV_primitive_restart extension (Gallium softpipe, llvmpipe).
+<li>New fragment shader back-end for i965-class hardware.
+<li>Support for Sandybridge chipset in i965 DRI driver.
</ul>
<h2>Bug fixes</h2>
+<p>This list is likely incomplete.</p>
<ul>
-<li>tbd</li>
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=28800">Bug 28800</a> - [r300c, r300g] Texture corruption with World of Warcraft</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=29420">Bug 29420</a> - Amnesia / HPL2 RendererFeatTest - not rendering correctly</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=29946">Bug 29946</a> - [swrast] piglit valgrind glsl-array-bounds-04 fails</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=30261">Bug 30261</a> - [GLSL 1.20] allowing inconsistent invariant declaration between two vertex shaders</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=30632">Bug 30632</a> - [softpipe] state_tracker/st_manager.c:489: st_context_notify_invalid_framebuffer: Assertion `stfb &amp;&amp; stfb-&gt;iface == stfbi' failed.</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=30694">Bug 30694</a> - wincopy will crash on Gallium drivers when going to front buffer</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=30771">Bug 30771</a> - [r600g] vert-tex glsl demo</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=30787">Bug 30787</a> - Invalid asm shader does not generate draw-time error when used with GLSL shader</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=30974">Bug 30974</a> - [llvmpipe] SIGABRT src/gallium/drivers/llvmpipe/lp_state_fs.c:779</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=30993">Bug 30993</a> - getFramebufferAttachmentParameteriv wrongly generates error</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=31101">Bug 31101</a> - [glsl2] abort() in ir_validate::visit_enter(ir_assignment *ir)</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=31193">Bug 31193</a> - [regression] aa43176e break water reflections</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=31194">Bug 31194</a> - The mesa meta save/restore code doesn't ref the current GLSL program</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=31371">Bug 31371</a> - glslparsertest: ir.cpp:358: ir_constant::ir_constant(const glsl_type*, const ir_constant_data*): Assertion `(type->base_type &gt;= 0) &amp;&amp; (type->base_type &lt;= 3)' failed.</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=31439">Bug 31439</a> - Crash in glBufferSubData() with size == 0</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=31495">Bug 31495</a> - [i965 gles2c bisected] OpenGL ES 2.0 conformance GL2Tests_GetBIFD_input.run regressed</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=31514">Bug 31514</a> - isBuffer returns true for unbound buffers</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=31560">Bug 31560</a> - [tdfx] tdfx_tex.c:702: error: ‘const struct gl_color_table’ has no member named ‘Format’</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=31617">Bug 31617</a> - Radeon/Compiz: 'failed to attach dri2 front buffer', error case not handled</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=31648">Bug 31648</a> - [GLSL] array-struct-array gets assertion: `(size &gt;= 1) && (size &lt;= 4)' failed.</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=31650">Bug 31650</a> - [GLSL] varying gl_TexCoord fails to be re-declared to different size in the second shader</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=31673">Bug 31673</a> - GL_FRAGMENT_PRECISION_HIGH preprocessor macro undefined in GLSL ES</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=31690">Bug 31690</a> - i915 shader compiler fails to flatten if in Aquarium webgl demo.</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=31832">Bug 31832</a> - [i915] Bad renderbuffer format: 21</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=31841">Bug 31841</a> - [drm:radeon_cs_ioctl] *ERROR* Invalid command stream !</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=31894">Bug 31894</a> - Writing to gl_PointSize with GLES2 corrupts other varyings</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=31909">Bug 31909</a> - [i965] brw_fs.cpp:1461: void fs_visitor::emit_bool_to_cond_code(ir_rvalue*): Assertion `expr-&gt;operands[i]-&gt;type-&gt;is_scalar()' failed.</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=31934">Bug 31934</a> - [gallium] Mapping empty buffer object causes SIGSEGV</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=31983">Bug 31983</a> - [i915 gles2] "if (expression with builtin/varying variables) discard" breaks linkage</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=31985">Bug 31985</a> - [GLSL 1.20] initialized uniform array considered as "unsized"</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=31987">Bug 31987</a> - [gles2] if input a wrong pname(GL_NONE) to glGetBoolean, it will not case GL_INVALID_ENUM</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=32035">Bug 32035</a> - [GLSL bisected] comparing unsized array gets segfault</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=32070">Bug 32070</a> - llvmpipe renders stencil demo incorrectly</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=32273">Bug 32273</a> - assertion fails when starting vdrift 2010 release with shaders enabled</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=32287">Bug 32287</a> - [bisected GLSL] float-int failure</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=32311">Bug 32311</a> - [965 bisected] Array look-ups broken on GM45</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=32520">Bug 32520</a> - [gles2] glBlendFunc(GL_ZERO, GL_DST_COLOR) will result in GL_INVALID_ENUM</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=32825">Bug 32825</a> - egl_glx driver completely broken in 7.9 branch [fix in master]</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=">Bug </a> - </li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=">Bug </a> - </li>
+
</ul>
<h2>Changes</h2>
+<p>Adam Jackson (2):
<ul>
-<li>Upgraded glext.h to version 66</li>
-</ul>
+ <li>i965: Update renderer strings for sandybridge</li>
+ <li>drivers/x11: unifdef XFree86Server</li>
+</ul></p>
+
+<p>Alex Deucher (30):
+<ul>
+ <li>r600c: fix mipmap stride on evergreen</li>
+ <li>r600c: add reloc for CB_COLOR0_ATTRIB</li>
+ <li>r600c: pull over 6xx/7xx vertex fixes for evergreen</li>
+ <li>r600c: fix segfault in evergreen stencil code</li>
+ <li>r100: revalidate after radeon_update_renderbuffers</li>
+ <li>r600c: add missing radeon_prepare_render() call on evergreen</li>
+ <li>r600c: properly align mipmaps to group size</li>
+ <li>egl_dri2: Add radeon chip ids</li>
+ <li>r600c/evergreen: texture align is group_bytes just like 6xx/7xx</li>
+ <li>r600g: fix buffer alignment</li>
+ <li>r600g: All EVENT_WRITE packets need the EVENT_INDEX field</li>
+ <li>r600g: translate ARR instruction for evergreen</li>
+ <li>r600g: use meaningful defines for chiprev</li>
+ <li>r600g: use full range of VS resources for vertex samplers</li>
+ <li>r600g: fix additional EVENT_WRITE packet</li>
+ <li>r600g: fix some winsys functions to deal properly with evergreen</li>
+ <li>r600c: add Ontario Fusion APU support</li>
+ <li>r600g: add support for ontario APUs</li>
+ <li>r600c: fix VC flush on cedar and palm</li>
+ <li>gallium/egl: fix r300 vs r600 loading</li>
+ <li>r600c: fix some opcodes on evergreen</li>
+ <li>r600c: bump texture limits to hw limits</li>
+ <li>r600g: bump texture/cb limits appropriately for evergreen</li>
+ <li>radeon: bump mip tree levels to 15</li>
+ <li>r600g: fix rendering with a vertex attrib having a zero stride</li>
+ <li>r600g: remove useless switch statements</li>
+ <li>r600g: add support for NI (northern islands) asics</li>
+ <li>r600c: add support for NI asics</li>
+ <li>r600g: support up to 64 shader constants</li>
+ <li>r600c: fix up SQ setup in blit code for Ontario/NI</li>
+</ul></p>
+
+<p>Andre Maasikas (3):
+<ul>
+ <li>r600c: fix buffer height setting in dri2 case</li>
+ <li>r600g: break alu clause earlier</li>
+ <li>r600g: fix evergreen interpolation setup</li>
+</ul></p>
+
+<p>Andrew Randrianasulu (2):
+<ul>
+ <li>dri/nv04: Don't expose ARB_texture_env_combine/dot3.</li>
+ <li>dri/nv04: Enable eng3dm for A8/L8 textures.</li>
+</ul></p>
+
+<p>Aras Pranckevicius (2):
+<ul>
+ <li>glsl: fix crash in loop analysis when some controls can't be determined</li>
+ <li>glsl: fix matrix type check in ir_algebraic</li>
+</ul></p>
+
+<p>Bas Nieuwenhuizen (3):
+<ul>
+ <li>r600g: set ENABLE_KILL in the shader state in the new design</li>
+ <li>r600g: set ENABLE_KILL on evergreen too</li>
+ <li>r600g: use dirty list to track dirty blocks</li>
+</ul></p>
+
+<p>Ben Skeggs (3):
+<ul>
+ <li>nv50: DST</li>
+ <li>nv50: DPH</li>
+ <li>nv50: silence some unknown get_param warnings</li>
+</ul></p>
+
+<p>Benjamin Franzke (2):
+<ul>
+ <li>st/egl image: multiply drm buf-stride with blocksize</li>
+ <li>r600g: implement texture_get_handle (needed for eglExportDRMImageMESA)</li>
+</ul></p>
+
+<p>Brian Paul (296):
+<ul>
+ <li>glx: add const qualifiers to __indirect_glMultiDrawArraysEXT()</li>
+ <li>glsl2: fix signed/unsigned comparison warning</li>
+ <li>llvmpipe: cast to silence warning</li>
+ <li>llvmpipe: s/boolean/unsigned/ in bitfield to silence warning</li>
+ <li>nv50: use unsigned int for bitfields to silence warnings</li>
+ <li>tgsi: fix incorrect usage_mask for shadow tex instructions</li>
+ <li>gallivm: expand AoS sampling to cover all filtering modes</li>
+ <li>gallivm: fix incorrect vector shuffle datatype</li>
+ <li>gallivm: move i32_vec_type inside the #ifdef</li>
+ <li>mesa: include mfeatures.h in formats.c</li>
+ <li>gallivm: fix wrong return value in bitwise functions</li>
+ <li>tgsi/sse: fix aos_to_soa() loop to handle num_inputs==0</li>
+ <li>gallivm: added missing case for PIPE_TEXTURE_RECT</li>
+ <li>gallium: better docs for pipe_rasterizer_state::sprite_coord_enable</li>
+ <li>gallium: rework handling of sprite_coord_enable state</li>
+ <li>gallium/docs: added new pipeline.txt diagram</li>
+ <li>mesa: don't call valid_texture_object() in non-debug builds</li>
+ <li>glsl2: silence compiler warnings in printf() calls</li>
+ <li>docs: remove old broken link</li>
+ <li>docs: mark as obsolete, remove dead links</li>
+ <li>llvmpipe: fix query bug when no there's no scene</li>
+ <li>gallivm: remove debug code</li>
+ <li>llvmpipe: maintain fragment shader state for draw module</li>
+ <li>llvmpipe: indentation fix</li>
+ <li>llvmpipe: reformatting, remove trailing whitespace, etc</li>
+ <li>llvmpipe: clean-up, comments in setup_point_coefficient()</li>
+ <li>llvmpipe: rename sprite field, add sprite_coord_origin</li>
+ <li>llvmpipe: implement sprite coord origin modes</li>
+ <li>draw: fix test for using the wide-point stage</li>
+ <li>llvmpipe: check bitshift against PIPE_MAX_SHADER_OUTPUTS</li>
+ <li>draw: check bitshift against PIPE_MAX_SHADER_OUTPUS</li>
+ <li>Merge branch 'sprite-coord'</li>
+ <li>draw: new draw_fs.[ch] files</li>
+ <li>glsl2: fix typo in error msg</li>
+ <li>gallivm: fix lp_build_sample_compare()</li>
+ <li>softpipe: add missing calls to set draw vertex samplers/views</li>
+ <li>mesa: don't advertise bogus GL_ARB_shading_language_120 extension</li>
+ <li>configs: remove egl-swrast target from linux-dri config</li>
+ <li>llvmpipe: fix sprite texcoord setup for non-projective texturing</li>
+ <li>mesa: fix assertions to handle srgb formats</li>
+ <li>st/mesa: add missing MESA_FORMAT_S8 case in st_mesa_format_to_pipe_format()</li>
+ <li>st/mesa: use the wrapped renderbuffer in CopyPixels()</li>
+ <li>llvmpipe: make min/max lod and lod bias dynamic state</li>
+ <li>llvmpipe: make texture border_color dynamic state</li>
+ <li>softpipe: fix repeat() function for NPOT textures</li>
+ <li>gallivm: fix repeat() function for NPOT textures</li>
+ <li>swrast: update comments for REMAINDER() macro</li>
+ <li>softpipe: rename sp_state_fs.c -&gt; sp_state_shader.c</li>
+ <li>softpipe: make shader-related functions static</li>
+ <li>softpipe: make blend/stencil/depth functions static</li>
+ <li>softpipe: make sampler state functions static</li>
+ <li>softpipe: make vertex state functions static</li>
+ <li>softpipe: make rasterizer state functions static</li>
+ <li>softpipe: make stream out state functions static</li>
+ <li>softpipe: make clip state functions static</li>
+ <li>softpipe: minor asst. clean-ups</li>
+ <li>softpipe: allocate tile data on demand</li>
+ <li>llvmpipe: fix swizzling of texture border color</li>
+ <li>softpipe: fix swizzling of texture border color</li>
+ <li>draw: pass sampler state down to llvm jit state</li>
+ <li>gallivm: check for level=0 case in lp_build_minify()</li>
+ <li>gallivm: added some comments</li>
+ <li>draw: check for null sampler pointers</li>
+ <li>swrast: fix choose_depth_texture_level() to respect mipmap filtering state</li>
+ <li>st/mesa: replace assertion w/ conditional in framebuffer invalidation</li>
+ <li>glsl2: fix signed/unsigned comparison warning</li>
+ <li>st/xlib: add some comments</li>
+ <li>ir_to_mesa: assorted clean-ups, const qualifiers, new comments</li>
+ <li>mesa: remove assertion w/ undeclared variable texelBytes</li>
+ <li>gallivm: remove newlines</li>
+ <li>draw/llvmpipe: replace DRAW_MAX_TEXTURE_LEVELS with PIPE_MAX_TEXTURE_LEVELS</li>
+ <li>mesa: reformatting, comments, code movement</li>
+ <li>x11: fix breakage from gl_config::visualType removal</li>
+ <li>gallivm: work-around trilinear mipmap filtering regression with LLVM 2.8</li>
+ <li>mesa: remove post-convolution width/height vars</li>
+ <li>gallivm: add compile-time option to emit inst addrs and/or line numbers</li>
+ <li>llvmpipe: code to dump bytecode to file (disabled)</li>
+ <li>gallivm: added lp_build_print_vec4()</li>
+ <li>gallivm: added lp_build_load_volatile()</li>
+ <li>glsl: add ir_unop_round_even case to silence unhandled enum warning</li>
+ <li>st/mesa: fix regressions in glDrawPixels(GL_STENCIL_INDEX)</li>
+ <li>st/mesa: reformatting in st_cb_drawpixels.c</li>
+ <li>st/mesa: use GLuint to avoid problem w/ uint not defined on mingw32</li>
+ <li>st/mesa: update function name, comments</li>
+ <li>gallivm: use util_snprintf()</li>
+ <li>llvmpipe: remove lp_setup_coef*.c files from Makefile</li>
+ <li>mesa: fix mesa version string construction</li>
+ <li>gallivm: fix incorrect type for zero vector in emit_kilp()</li>
+ <li>llvmpipe/draw: always enable LLVMAddInstructionCombiningPass()</li>
+ <li>draw: use float version of LLVM Mul/Add instructions</li>
+ <li>draw: fix typo in comment</li>
+ <li>mesa: add GL_RG case to _mesa_source_buffer_exists()</li>
+ <li>mesa: add missing cases for packing red/green images</li>
+ <li>st/mesa: added cases for GL_COMPRESSED_RED/RG in st_choose_format()</li>
+ <li>docs: update texture red/green support in GL3.txt</li>
+ <li>docs: add GL_ARB_texture_rg to release notes</li>
+ <li>mesa: driver hook for primitive restart</li>
+ <li>mesa: set/get primitive restart state</li>
+ <li>mesa: API spec for primitive restart</li>
+ <li>mesa: regenerated files with primitive restart</li>
+ <li>mesa: plug in primitive restart function</li>
+ <li>vbo: support for primitive restart</li>
+ <li>gallium: new CAP, state for primitive restart</li>
+ <li>st/mesa: support for primitive restart</li>
+ <li>draw: implement primitive splitting for primitive restart</li>
+ <li>softpipe: enable primitive restart</li>
+ <li>llvmpipe: enable primitive restart</li>
+ <li>docs: added GL_NV_primitive_restart extension</li>
+ <li>Merge branch 'primitive-restart-cleanup'</li>
+ <li>winsys/xlib: formatting fixes</li>
+ <li>winsys/xlib: use Bool type for shm field</li>
+ <li>winsys/xlib: fix up allocation/dealloction of XImage</li>
+ <li>winsys/xlib: rename xm-&gt;xlib</li>
+ <li>galahad: silence warnings</li>
+ <li>mesa: move declaration before code</li>
+ <li>docs: updated GL3 status for primitive restart</li>
+ <li>mesa: 80-column wrapping</li>
+ <li>mesa: simplify fbo format checking code</li>
+ <li>mesa: split up the image.c file</li>
+ <li>mesa: add pixel packing for unscaled integer types</li>
+ <li>mesa: _mesa_ClearColorIuiEXT() and _mesa_ClearColorIiEXT()</li>
+ <li>mesa: _mesa_is_format_integer() function</li>
+ <li>mesa: minor reformatting, clean-ups</li>
+ <li>mesa: added _mesa_is_fragment_shader_active() helper</li>
+ <li>mesa: new glDrawPixels error check for integer formats</li>
+ <li>softpipe: added some texture sample debug code (disabled)</li>
+ <li>mesa: added new gl_extensions::EXT_gpu_shader4 field</li>
+ <li>mesa: added new gl_framebuffer::_IntegerColor field</li>
+ <li>mesa: added glGet query for GL_RGBA_INTEGER_MODE_EXT</li>
+ <li>mesa: compute _IntegerColor field in _mesa_test_framebuffer_completeness()</li>
+ <li>mesa: added cases for GL_EXT_texture_integer formats</li>
+ <li>mesa: added cases for GL_EXT_texture_integer</li>
+ <li>st/mesa: add format selection for signed/unsigned integer formats</li>
+ <li>mesa: simplify target_can_be_compressed() function</li>
+ <li>glapi: GL_EXT_texture_integer API</li>
+ <li>glapi: include/build EXT_texture_integer.xml</li>
+ <li>mesa: regenerated API files for GL_EXT_texture_integer</li>
+ <li>mesa: plug in GL_EXT_texture_integer functions</li>
+ <li>mesa: display list support for GL_EXT_texture_integer</li>
+ <li>st/mesa: be smarter choosing texture format for glDrawPixels()</li>
+ <li>softpipe: remove &gt;32bpp color restriction</li>
+ <li>mesa: silence enum comparison warning</li>
+ <li>mesa: fix uninitialized var warning</li>
+ <li>xlib: silence unused var warning</li>
+ <li>util: use pointer_to_func() to silence warning</li>
+ <li>rtasm: use pointer_to_func() to silence warning</li>
+ <li>translate: use function typedefs, casts to silence warnings</li>
+ <li>translate: remove unused prototypes</li>
+ <li>mesa: additional glReadPixels error checks for GL_EXT_texture_integer</li>
+ <li>mesa: additional switch cases for GL_EXT_texture_integer</li>
+ <li>mesa: additional teximage error checks for GL_EXT_texture_integer</li>
+ <li>mesa: do integer FB / shader validation check in _mesa_valid_to_render()</li>
+ <li>mesa: call _mesa_valid_to_render() in glDrawPixels, glCopyPixels, glBitmap</li>
+ <li>mesa: remove the unused _mesa_is_fragment_shader_active() function</li>
+ <li>mesa: fix bug in _mesa_is_format_integer()</li>
+ <li>mesa: rename function to _mesa_is_format_integer_color()</li>
+ <li>mesa: remove 'normalized' parameter from _mesa_VertexAttribIPointer()</li>
+ <li>vbo: re-indent file</li>
+ <li>glapi: xml spec file for GL_EXT_gpu_shader4</li>
+ <li>glapi: include EXT_gpu_shader4.xml</li>
+ <li>glapi: regenerated API files</li>
+ <li>mesa: plug in stubs for glBindFragDataLocation(), glGetFragDataLocation()</li>
+ <li>mesa: add glGetUniformuiv(), plug in uint glUniform funcs</li>
+ <li>mesa: plug in more GL_EXT_gpu_shader4 functions</li>
+ <li>mesa: add new GLvertexformat entries for integer-valued attributes</li>
+ <li>mesa: implement integer-valued vertex attribute functions</li>
+ <li>mesa: add gl_client_array::Integer field and related vertex array state code</li>
+ <li>mesa: consolidate glVertex/Color/etcPointer() code</li>
+ <li>mesa: state/queries for GL_MIN/MAX_PROGRAM_TEXEL_OFFSET_EXT</li>
+ <li>mesa: glArrayElement support for integer-valued arrays</li>
+ <li>mesa: clean-up array element code</li>
+ <li>mesa: add extension table entry for GL_EXT_gpu_shader4</li>
+ <li>mesa: remove obsolete comment</li>
+ <li>mesa: fix incorrect type in _mesa_texstore_rgba_int16()</li>
+ <li>mesa: fix integer cases in _mesa_is_legal_format_and_type()</li>
+ <li>mesa: add const qualifier to _mesa_is_legal_format_and_type()</li>
+ <li>mesa: additional integer formats in _mesa_bytes_per_pixel()</li>
+ <li>mesa: pixel transfer ops do not apply to integer-valued textures</li>
+ <li>mesa: remove dead code</li>
+ <li>osmesa: fix renderbuffer memleak in OSMesaMakeCurrent()</li>
+ <li>mesa: use GLubyte for edge flag arrays</li>
+ <li>mesa: move the gl_config struct declaration</li>
+ <li>dri/util: add a bunch of comments</li>
+ <li>mesa: remove always-false conditional in check_compatible()</li>
+ <li>mesa: fix aux/accum comment and error message mixups</li>
+ <li>llvmpipe: assign context's frag shader pointer before using it</li>
+ <li>llvmpipe: add a cast</li>
+ <li>mesa: silence new warnings in texobj.c</li>
+ <li>egl/gdi: fix typo: xsurf-&gt;gsurf</li>
+ <li>mesa: code to unpack RGBA as uints</li>
+ <li>gallivm: implement scatter stores into temp register file</li>
+ <li>gallivm: add some LLVM var labels</li>
+ <li>gallivm: added debug code to dump temp registers</li>
+ <li>gallivm: add pixel offsets in scatter stores</li>
+ <li>gallivm: added lp_elem_type()</li>
+ <li>gallivm: implement execution mask for scatter stores</li>
+ <li>tgsi: remove unused function</li>
+ <li>llvmpipe: added some debug assertions, but disabled</li>
+ <li>gallivm: alloca() was called too often for temporary arrays</li>
+ <li>gallivm: add const qualifiers, fix comment string</li>
+ <li>softpipe: disable vertex texturing with draw/llvm</li>
+ <li>mesa: consolidate pixel packing/unpacking code</li>
+ <li>mesa: rename vars in pixel pack/unpack code</li>
+ <li>mesa: implement uint texstore code</li>
+ <li>mesa: remove stray GL_FLOAT case in _mesa_is_legal_format_and_type()</li>
+ <li>mesa: make fixed-pt and byte-valued arrays a runtime feature</li>
+ <li>softpipe: can't no-op depth test stage when occlusion query is enabled</li>
+ <li>mesa: no-op glBufferSubData() on size==0</li>
+ <li>mesa: #include mfeatures.h in enums.h</li>
+ <li>mesa: improve error message</li>
+ <li>mesa: add missing formats in _mesa_format_to_type_and_comps()</li>
+ <li>mesa: handle more pixel types in mipmap generation code</li>
+ <li>mesa: make glIsBuffer() return false for never bound buffers</li>
+ <li>mesa: fix glDeleteBuffers() regression</li>
+ <li>tdfx: s/Format/_BaseFormat/</li>
+ <li>mesa: consolidate assertions in teximage code</li>
+ <li>radeon: set gl_texture_image::TexFormat field in radeonSetTexBuffer2()</li>
+ <li>r600: set gl_texture_image::TexFormat field in r600SetTexBuffer2()</li>
+ <li>r200: set gl_texture_image::TexFormat field in r200SetTexBuffer2()</li>
+ <li>r300: set gl_texture_image::TexFormat field in r300SetTexBuffer2()</li>
+ <li>evergreen: set gl_texture_image::TexFormat field in evergreenSetTexBuffer()</li>
+ <li>st/mesa: fix glDrawPixels(depth/stencil) bugs</li>
+ <li>glsl: fix assorted MSVC warnings</li>
+ <li>mesa: add more work-arounds for acoshf(), asinhf(), atahf()</li>
+ <li>glsl: remove opt_constant_expression.cpp from SConscript</li>
+ <li>mesa: fix error messages and minor reindenting</li>
+ <li>mesa: whitespace cleanups</li>
+ <li>mesa: 80-column wrapping</li>
+ <li>mesa: reorder texture_error_check() params</li>
+ <li>mesa: minor clean-ups in context code</li>
+ <li>mesa: upgrade to glext.h version 66</li>
+ <li>mesa: pass gl_format to _mesa_init_teximage_fields()</li>
+ <li>mesa: fix error msg typo</li>
+ <li>glapi: rename GL3.xml to GL3x.xml as it covers all GL 3.x versions</li>
+ <li>mesa: hook up GL 3.x entrypoints</li>
+ <li>docs: update some GL 3.0 status</li>
+ <li>mesa: fix get_texture_dimensions() for texture array targets</li>
+ <li>swrast: init alpha value to 1.0 in opt_sample_rgb_2d()</li>
+ <li>glsl: fix off by one in register index assertion</li>
+ <li>glsl: use gl_register_file in a few places</li>
+ <li>mesa: rename, make _mesa_register_file_name() non-static</li>
+ <li>mesa: _mesa_valid_register_index() to validate register indexes</li>
+ <li>mesa: replace #defines with new gl_shader_type enum</li>
+ <li>mesa: use gl_shader_type enum</li>
+ <li>glsl: better handling of linker failures</li>
+ <li>glsl: start restoring some geometry shader code</li>
+ <li>mesa: add assertion and update comment in _mesa_format_image_size()</li>
+ <li>mesa: added _mesa_format_image_size64()</li>
+ <li>x11: remove test_proxy_teximage() function</li>
+ <li>st/mesa: fix mapping of zero-sized buffer objects</li>
+ <li>gallivm/llvmpipe: squash merge of the llvm-context branch</li>
+ <li>mesa: raise max texture sizes to 16K</li>
+ <li>softpipe: increase max texture size to 16K</li>
+ <li>mesa: replace large/MAX_WIDTH stack allocations with heap allocations</li>
+ <li>mesa: replace large/MAX_WIDTH stack allocations with heap allocations</li>
+ <li>swrast: avoid large stack allocations in blend code</li>
+ <li>swrast: avoid large stack allocations in tex combine code</li>
+ <li>st/mesa: avoid large stack allocations in readpixels code</li>
+ <li>mesa: replace more MAX_WIDTH stack allocations with heap allocations</li>
+ <li>gallivm/llvmpipe: remove lp_build_context::builder</li>
+ <li>gallivm: fix null builder pointers</li>
+ <li>mesa: fix GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME query</li>
+ <li>mesa: return GL_FRAMEBUFFER_DEFAULT as FBO attachment type</li>
+ <li>llvmpipe: fix broken stencil writemask</li>
+ <li>mesa: consolidate some compiler -D flags</li>
+ <li>swrast: allow GL_RG format in glDrawPixels()</li>
+ <li>swrast: fix indentation</li>
+ <li>swrast: accept GL_RG in glReadPixels()</li>
+ <li>swrast: restructure some glReadPixels() code</li>
+ <li>mesa: make glGet*(GL_NONE) generate GL_INVALID_ENUM</li>
+ <li>mesa: remove unneeded cast</li>
+ <li>mesa: update comments, remove dead code</li>
+ <li>st/mesa: new comment about updating state vars</li>
+ <li>mesa: add error margin to clip mask debug/check code</li>
+ <li>gallium/util: minor formatting fixes</li>
+ <li>mesa/llvm: use llvm-config --cppflags</li>
+ <li>st/mesa: fix mipmap generation bug</li>
+ <li>mesa: test for cube map completeness in glGenerateMipmap()</li>
+ <li>mesa: set gl_texture_object::_Complete=FALSE in incomplete()</li>
+ <li>mesa: consolidate glTexImage1/2/3D() code</li>
+ <li>mesa: simplify proxy texture code in texture_error_check()</li>
+ <li>mesa: consolidate the glTexSubImage1/2/3D() functions</li>
+ <li>mesa: consolidate glCopyTexImage1/2D() code</li>
+ <li>mesa: consolidate glCopyTexSubImage1/2/3D() functions</li>
+ <li>mesa: consolidate glCompressedTexImage1/2/3D() functions</li>
+ <li>mesa: make _mesa_test_proxy_teximage() easier to read</li>
+ <li>configure: use llvm-config --cppflags instead of --cflags</li>
+ <li>mesa: revamp error checking for compressed texture images</li>
+ <li>mesa: simplify target checking for TexImage functions</li>
+ <li>draw/llvm: don't flush in vs_llvm_delete()</li>
+ <li>tnl: Initialize gl_program_machine memory in run_vp.</li>
+ <li>tnl: a better way to initialize the gl_program_machine memory</li>
+ <li>mesa, st/mesa: disable GL_ARB_geometry_shader4</li>
+ <li>mesa/meta: fix broken assertion, rename stack depth var</li>
+ <li>glsl: new glsl_strtod() wrapper to fix decimal point interpretation</li>
+ <li>st/mesa: fix renderbuffer pointer check in st_Clear()</li>
+</ul></p>
+
+<p>Brian Rogers (1):
+<ul>
+ <li>mesa: Add missing else in do_row_3D</li>
+</ul></p>
+
+<p>Chad Versace (25):
+<ul>
+ <li>intel_extensions: Add ability to set GLSL version via environment</li>
+ <li>glsl: Add glsl_type::uvecN_type for N=2,3</li>
+ <li>glsl: Add lexer rules for uint and uvecN (N=2..4)</li>
+ <li>glsl: Changes in generated file glsl_lexer.cpp</li>
+ <li>glsl: Add lexer rules for &lt&lt and &gt;&gt; in GLSL 1.30</li>
+ <li>glsl: Change generated file glsl_lexer.cpp</li>
+ <li>glsl: Implement ast-to-hir for binary shifts in GLSL 1.30</li>
+ <li>glsl: Implement constant expr evaluation for bitwise-not</li>
+ <li>glsl: Implement constant expr evaluation for bit-shift ops</li>
+ <li>glsl: Implement constant expr evaluation for bitwise logic ops</li>
+ <li>glsl: Fix ir validation for bit logic ops</li>
+ <li>glsl: Define shift_result_type() in ast_to_hir.cpp</li>
+ <li>glsl: Implement ast-to-hir for bit-shift-assignment</li>
+ <li>glsl: Define bit_logic_result_type() in ast_to_hir.cpp</li>
+ <li>glsl: Implement ast-to-hir for bit-logic ops</li>
+ <li>glsl: Fix lexer rule for ^=</li>
+ <li>glsl: Commit generated file glsl_lexer.cpp</li>
+ <li>glsl: Fix ast-to-hir for ARB_fragment_coord_conventions</li>
+ <li>mesa: Fix C++ includes in sampler.cpp</li>
+ <li>glsl: Fix ir_expression::constant_expression_value()</li>
+ <li>glsl: Fix erroneous cast in ast_jump_statement::hir()</li>
+ <li>glsl: Fix Doxygen tag file in recently renamed files</li>
+ <li>glsl: Improve usage message for glsl_compiler</li>
+ <li>glsl: Fix linker bug in cross_validate_globals()</li>
+ <li>glsl: In ast_to_hir, check sampler array indexing</li>
+</ul></p>
+
+<p>Chia-I Wu (149):
+<ul>
+ <li>glapi: Fix build errors for ES.</li>
+ <li>glapi: Fix ES build errors again.</li>
+ <li>mesa: Update ES APIspec.xml.</li>
+ <li>st/xlib: Notify the context when the front/back buffers are swapped.</li>
+ <li>targets/egl: Use C++ compiler to link GL/ES state trackers.</li>
+ <li>libgl-xlib: Remove unused st_api_create_OpenGL.</li>
+ <li>st/egl: Split modeset code support to modeset.c.</li>
+ <li>st/egl: Rename kms backend to drm.</li>
+ <li>st/egl: s/kms/drm/ on the drm backend.</li>
+ <li>egl: Enable drm platform by default.</li>
+ <li>egl: Check extensions.</li>
+ <li>st/egl: Skip single-buffered configs in EGL.</li>
+ <li>mapi: Fix compiler warnings.</li>
+ <li>st/egl: Drop context argument from egl_g3d_get_egl_image.</li>
+ <li>targets/egl: Fix linking with libdrm.</li>
+ <li>st/vega: Fix version check in context creation.</li>
+ <li>egl: Use attribute names as the _EGLConfig member names.</li>
+ <li>egl: Access config attributes directly.</li>
+ <li>st/egl: Access _EGLConfig directly.</li>
+ <li>st/egl: Do not finish a fence that is NULL.</li>
+ <li>mesa: Remove unused vtxfmt_tmp.h.</li>
+ <li>egl_dri2: Drop the use of _egl[SG]etConfigKey.</li>
+ <li>egl_glx: Drop the use of [SG]ET_CONFIG_ATTRIB.</li>
+ <li>egl_glx: Fix borken driver.</li>
+ <li>egl: Move attributes in _EGLImage to _EGLImageAttribs.</li>
+ <li>egl: Parse image attributes with _eglParseImageAttribList.</li>
+ <li>egl: Move fallback routines to eglfallbacks.c.</li>
+ <li>egl: Drop dpy argument from the link functions.</li>
+ <li>egl: Minor changes to the _EGLConfig interface.</li>
+ <li>egl: Minor changes to the _EGLScreen interface.</li>
+ <li>egl: Fix _eglModeLookup.</li>
+ <li>st/egl: Fix native_mode refresh mode.</li>
+ <li>egl: Add reference count for resources.</li>
+ <li>egl: Use reference counting to replace IsLinked or IsBound.</li>
+ <li>egl: Fix a false negative check in _eglCheckMakeCurrent.</li>
+ <li>st/egl: Use resource reference count for egl_g3d_sync.</li>
+ <li>egl_dri2: Fix a typo that make glFlush be called at wrong time.</li>
+ <li>glapi: Do not use glapidispatch.h.</li>
+ <li>glapi: Move glapidispatch.h to core mesa.</li>
+ <li>glapi: Do not use glapioffsets.h.</li>
+ <li>glapi: Merge glapioffsets.h into glapidispath.h.</li>
+ <li>vbo: Use CALL_* macros.</li>
+ <li>mesa: Remove unnecessary glapitable.h includes.</li>
+ <li>autoconf: Better client API selection.</li>
+ <li>docs: Update egl and openvg docs.</li>
+ <li>autoconf: Update configuration info.</li>
+ <li>Merge branch 'glapi-reorg'</li>
+ <li>targets: Add missing quotes to Makefile.xorg.</li>
+ <li>autoconf: st/vega requires --enable-openvg.</li>
+ <li>st/mesa: Unreference the sampler view in st_bind_surface.</li>
+ <li>autoconf: Tidy configure output for EGL.</li>
+ <li>targets/egl: Fix a warning with --disable-opengl build.</li>
+ <li>egl: Rework _eglGetSearchPath.</li>
+ <li>mesa: Select FEATURE_remap_table when multiple APIs are enabled.</li>
+ <li>mesa: Allow contexts of different APIs to coexist.</li>
+ <li>egl: Set up the pthread key even TLS is used.</li>
+ <li>st/egl: Add native_surface::present callback.</li>
+ <li>st/egl: Use native_surface::present callback.</li>
+ <li>d3d1x: Use native_surface::present.</li>
+ <li>st/egl: Remove flush_frontbuffer and swap_buffers.</li>
+ <li>st/egl: Add support for swap interval and swap behavior.</li>
+ <li>st/egl: Add support for EGL_MATCH_NATIVE_PIXMAP.</li>
+ <li>st/egl: Add extern "C" wrapper to native.h.</li>
+ <li>st/egl: Add native_display_buffer interface.</li>
+ <li>st/egl: Use native_display_buffer for EGL_MESA_drm_image.</li>
+ <li>autoconf: Add --enable-gallium-egl.</li>
+ <li>docs: Update egl docs.</li>
+ <li>st/dri: Add support for surfaceless current contexts.</li>
+ <li>egl_dri2: Fix __DRI_DRI2 version 1 support.</li>
+ <li>st/vega: Do not wait NULL fences.</li>
+ <li>gallium: Add st_api::name.</li>
+ <li>gallium: Add st_context_iface::share to st_api.</li>
+ <li>st/wgl: Use st_context_iface::share for DrvShareLists.</li>
+ <li>st/glx: Replace MESA_VERSION_STRING by xmesa_get_name.</li>
+ <li>mesa: Clean up core.h.</li>
+ <li>scons: Define IN_DRI_DRIVER.</li>
+ <li>tgsi: Add STENCIL to text parser.</li>
+ <li>st/vega: vegaLookupSingle should validate the state.</li>
+ <li>st/vega: Set wrap_r for mask and blend samplers.</li>
+ <li>st/vega: Fix vgReadPixels with a subrectangle.</li>
+ <li>egl_dri2: Fix one context, multiple surfaces.</li>
+ <li>auxiliary: util_blit_pixels_tex should restore the viewport.</li>
+ <li>st/vega: Fix a crash with empty paths.</li>
+ <li>st/vega: Masks and surfaces should share orientation.</li>
+ <li>st/vega: No flipping in vg_prepare_blend_surface.</li>
+ <li>st/vega: Fix a typo in EXTENDED_BLENDER_OVER_FUNC.</li>
+ <li>llvmpipe: Fix build errors on x86.</li>
+ <li>st/vega: Overhaul renderer with renderer states.</li>
+ <li>st/vega: Add DRAWTEX renderer state.</li>
+ <li>st/vega: Add SCISSOR renderer state.</li>
+ <li>st/vega: Add CLEAR renderer state for vgClear.</li>
+ <li>st/vega: Add FILTER renderer state for image filtering.</li>
+ <li>st/vega: Use the renderer for vgMask.</li>
+ <li>st/vega: Add POLYGON_STENCIL and POLYGON_FILL renderer state.</li>
+ <li>st/vega: Delay fb state update to vg_validate_state.</li>
+ <li>st/vega: Use st_framebuffer for fb width/height.</li>
+ <li>st/vega: Move g3d states to renderer.</li>
+ <li>st/vega: Make shader_bind call into the renderer.</li>
+ <li>st/vega: vg_manager should care about only the color buffer.</li>
+ <li>st/vega: Clean up vg_context fields and functions.</li>
+ <li>st/vega: Clean up renderer fields and functions.</li>
+ <li>st/vega: vg_copy_texture and vg_copy_surface should share code.</li>
+ <li>st/vega: Get rid of renderer_copy_texture.</li>
+ <li>st/vega: Update to latest headers.</li>
+ <li>st/vega: Fix image sampler views for alpha-only formats.</li>
+ <li>st/vega: Make path_render and path_stroke take a matrix.</li>
+ <li>st/vega: Make image_draw take a matrix.</li>
+ <li>st/vega: Add primitive text support.</li>
+ <li>st/vega: Revive mask layer support.</li>
+ <li>st/vega: More flexible shader selection.</li>
+ <li>st/vega: Add color transformation support.</li>
+ <li>st/vega: Bump version to 1.1.</li>
+ <li>st/vega: Fix paint coordinates transformations.</li>
+ <li>st/vega: Fix negated logic in image_draw.</li>
+ <li>st/vega: Fix degenerate paints.</li>
+ <li>st/vega: Simplify radial gradient.</li>
+ <li>st/vega: Remove st_inlines.h.</li>
+ <li>st/vega: Delay blend texture creation until needed.</li>
+ <li>st/vega: Create drawing surface mask as needed.</li>
+ <li>st/vega: Initialize pipe states with renderer.</li>
+ <li>st/vega: Avoid unnecessary constant bufer upload.</li>
+ <li>st/vega: Destroy the pipe context with vg_context.</li>
+ <li>st/vega: polygon_array requires a deep free.</li>
+ <li>st/egl: Set pipe_resource::array_size to 1.</li>
+ <li>st/vega: Set pipe_resource::array_size to 1.</li>
+ <li>st/vega: Move vertex transformation to shader.</li>
+ <li>st/vega: Add a missing break.</li>
+ <li>st/vega: Add some comments to pipeline shaders.</li>
+ <li>st/vega: Refactor blend shaders.</li>
+ <li>st/vega: Move masking after blending.</li>
+ <li>st/vega: Add support for per-channel alpha.</li>
+ <li>st/vega: Blending should use premultiplied alpha.</li>
+ <li>st/vega: Fix VG_BLEND_MULTIPLY.</li>
+ <li>st/vega: Add blend shaders for all blend modes.</li>
+ <li>st/vega: Fix pipe blend state for various blend modes.</li>
+ <li>egl: _eglFilterArray should not allocate.</li>
+ <li>mapi: Rewrite mapi_abi.py to get rid of preprocessor magic.</li>
+ <li>vbo: Drop second ATTR macro.</li>
+ <li>vbo: Fix GLES2 glVertexAttrib.</li>
+ <li>mesa: Do not advertise GL_OES_texture_3D.</li>
+ <li>mesa: Fix GL_FIXED arrays.</li>
+ <li>mesa: Fix glTexCoordPointer with type GL_FIXED.</li>
+ <li>st/egl: Plug pbuffer leaks.</li>
+ <li>st/egl: Fix eglCopyBuffers.</li>
+ <li>st/egl: Assorted fixes for dri2_display_get_configs.</li>
+ <li>docs/egl: Update egl.html.</li>
+ <li>st/egl: Fix eglChooseConfig when configs is NULL.</li>
+ <li>docs: Add an example for EGL_DRIVERS_PATH.</li>
+ <li>autoconf: Fix --with-driver=xlib --enable-openvg.</li>
+</ul></p>
+
+<p>Chris Wilson (2):
+<ul>
+ <li>i915g: Fix closure of full batch buffers</li>
+ <li>intel: Check for unsupported texture when finishing using as a render target</li>
+</ul></p>
+
+<p>Christoph Bumiller (80):
+<ul>
+ <li>nv50: import new compiler</li>
+ <li>nouveau: update nouveau_class.h</li>
+ <li>nv50: introduce the big formats table</li>
+ <li>nv50: don't produce MOV immediate to output reg in store opt</li>
+ <li>nv50: change back accidentally swapped UNORM,SNORM vertex type</li>
+ <li>nv50: add/fix some license headers</li>
+ <li>nv50: simple reload elimination and local CSE</li>
+ <li>nv50: fix constant_operand opt mul by 2 case</li>
+ <li>nv50: permit usage of undefined TGSI TEMPs</li>
+ <li>nv50: add missing 2nd source for POW multiplication</li>
+ <li>nv50: add signed RGTC1 to format table, allow 2_10_10_10 for vbufs</li>
+ <li>nv50: fix for empty BBs</li>
+ <li>nv50: insert MOVs also for PHI sources from dominating block</li>
+ <li>nv50: explicitly set src type for SET ops</li>
+ <li>nv50: fixes for nested IFs</li>
+ <li>nv50: don't eliminate loads to dedicated values</li>
+ <li>nv50: fix constbuf validation</li>
+ <li>nv50: build proper phi functions in the first place</li>
+ <li>nv50: fix reg count</li>
+ <li>nv50: begin implementing loops</li>
+ <li>nv50: more constant folding</li>
+ <li>nv50: loops part 2</li>
+ <li>nv50: flatten simple IF/ELSE/ENDIF constructs</li>
+ <li>nv50: fix thinko in store to output reg possible check</li>
+ <li>nv50: generate JOINs for outermost IF clauses</li>
+ <li>nv50: more TGSI opcodes (SIN, SCS, ARL, RET, KILP)</li>
+ <li>nv50: fix PSIZ and PRIMID mapping</li>
+ <li>nv50: check dst compatibility in CSE</li>
+ <li>nv50: initialize edgeflag input index</li>
+ <li>nv50: emit predicate for interp</li>
+ <li>Merge remote branch 'origin/master' into nv50-compiler</li>
+ <li>nv50: DP2, fix ARL</li>
+ <li>nv50: yet another case we need a nop.exit</li>
+ <li>nv50: fix check for sprite/point coord enable</li>
+ <li>nv50: handle TEXTURE_SWIZZLE and GEOMETRY_SHADER4 caps</li>
+ <li>nv50: set the FragDepth output index</li>
+ <li>nv50: turn off verbose debug output by default</li>
+ <li>nv50: attempt at making more complicated loops work</li>
+ <li>nv50: SSG</li>
+ <li>nv50: make FrontFacing -1 or +1</li>
+ <li>nv50: re-add proper TEXBIAS sequence</li>
+ <li>nv50: make use of TGSI immediate type</li>
+ <li>nv50: must join SELECT inputs before MOV inputs</li>
+ <li>nv50: fix XPD, was negated</li>
+ <li>nv50: fix find_dom_frontier</li>
+ <li>nv50: fix build-predicate function</li>
+ <li>Merge remote branch 'origin/master' into nv50-compiler</li>
+ <li>nv50: load address register before using it, not after</li>
+ <li>nv50: save tgsi instructions</li>
+ <li>nv50: prepare for having multiple functions</li>
+ <li>nv50: don't parse again in tgsi_2_nc</li>
+ <li>nv50: use actual loads/stores if TEMPs are accessed indirectly</li>
+ <li>nv50: create value references with the right type</li>
+ <li>nv50: duplicate interps in load_proj_tex_coords</li>
+ <li>nv50: address regs are 16 bit</li>
+ <li>nv50: fix can_load check for 3rd source</li>
+ <li>nv50: reduce bb_reachable_by runtime from pot to linear</li>
+ <li>nv50: minor compiler fixes and cleanups</li>
+ <li>nv50: cannot move from local mem to output reg directly</li>
+ <li>nv50: newlines in shader bincode printing</li>
+ <li>nv50: match TEMP limit with nv50 ir builder</li>
+ <li>nv50: handle TGSI EXP and LOG again</li>
+ <li>nv50: check for immediates when turning MUL ADD into MAD</li>
+ <li>nv50: interp cannot write flags reg</li>
+ <li>nv50: MOV TEMP[0], -CONST[0] must be float32 negation</li>
+ <li>nv50: fix indirect CONST access with large or negative offsets</li>
+ <li>nv50: fix TXP depth comparison value</li>
+ <li>nv50: consider address register in reload elimination</li>
+ <li>nv50: improve and fix modifier folding optimization</li>
+ <li>nv50: put low limit on REG_ALLOC_TEMP and FP_RESULT_COUNT</li>
+ <li>Merge remote branch 'origin/nv50-compiler'</li>
+ <li>nv50: don't segfault on shaders with 0 instructions</li>
+ <li>nv50: get shader fixups/relocations into working state</li>
+ <li>nv50: add relocs for stack and local mem buffers</li>
+ <li>nv50: emit constbuf relocs before uploading constants</li>
+ <li>nv50: fix typo in fifo packet length limit</li>
+ <li>nv50: use formats table in nv50_surface.c</li>
+ <li>nv50: use CLEAR_BUFFERS for surface fills</li>
+ <li>nv50: fix/handle a few more PIPE_CAPs</li>
+ <li>nv50: fix GP state bind and validate</li>
+</ul></p>
+
+<p>Corbin Simpson (8):
+<ul>
+ <li>r600g: Use align() instead of handrolled code.</li>
+ <li>r600g: Trivially deobfuscate r600_hw_states.</li>
+ <li>r600g: Deobfuscate and comment a few more functions in r600_hw_states.</li>
+ <li>r600g: Clean up some indentation and |= vs. | usage.</li>
+ <li>r600g: Fix false and true.</li>
+ <li>r600g: "tmp" is such a bad name for a texture.</li>
+ <li>r600g: Clean up PS setup.</li>
+ <li>r600g: Cleanup viewport floats.</li>
+</ul></p>
+
+<p>Daniel Lichtenberger (1):
+<ul>
+ <li>radeon: fix potential segfault in renderbuffer update</li>
+</ul></p>
+
+<p>Daniel Vetter (21):
+<ul>
+ <li>r200: revalidate after radeon_update_renderbuffers</li>
+ <li>i915g: rip out -&gt;sw_tiled</li>
+ <li>i915g: s/hw_tiled/tiling</li>
+ <li>i915g: add pineview pci ids</li>
+ <li>i915g: kill RGBA/X formats</li>
+ <li>i915g: kill buf-&gt;map_gtt</li>
+ <li>i915g: kill idws-&gt;pool</li>
+ <li>i915g: drop alignment parameter from iws-&gt;buffer_create</li>
+ <li>i915g: add winsys function to create tiled buffers</li>
+ <li>i915g: switch to tiled allocations, kill set_fence</li>
+ <li>i915g: prepare winsys/batchbuffer for execbuf2</li>
+ <li>i915g: return tiling in iws-&gt;buffer_from_handle</li>
+ <li>i915g: implement unfenced color&amp;depth buffer using tiling bits</li>
+ <li>i915g: implement unfenced relocs for textures using tiling bits</li>
+ <li>i915g: postpone mipmap/face offset calculation</li>
+ <li>i915g: don't pot-align stride for tiled buffers</li>
+ <li>i915g: enable X-tiling for textures</li>
+ <li>i915g: switch rendering to mipmapped textures to (x,y) offsets</li>
+ <li>i915g: enable x-tiling for render targets</li>
+ <li>i915g: assert(depth_surface-&gt;offset == 0)</li>
+ <li>i915g: track TODO items</li>
+</ul></p>
+
+<p>Dave Airlie (182):
+<ul>
+ <li>r300g: fix buffer reuse issue caused by previous commit</li>
+ <li>r600g: pull r600_draw struct out into header</li>
+ <li>r600g: use index min/max + index buffer offset.</li>
+ <li>r600g: add vgt dma src defines</li>
+ <li>r600g: fixup texture state on evergreen.</li>
+ <li>r600g: fix texture bos and avoid doing depth blit on evergreen</li>
+ <li>r600g: hide radeon_ctx inside winsys.</li>
+ <li>r600g: attempt to abstract kernel bos from pipe driver.</li>
+ <li>r600g: move constant buffer creation behind winsys abstraction.</li>
+ <li>r600g: use malloc bufmgr for constant buffers</li>
+ <li>r600g: add support for kernel bo</li>
+ <li>r600g: add winsys bo caching.</li>
+ <li>r600g: add upload manager support.</li>
+ <li>r600g: fixup map flushing.</li>
+ <li>r600g: use calloc for ctx bo allocations</li>
+ <li>r600g: oops got the use_mem_constant the wrong way around.</li>
+ <li>r600g; add uses waterfall to asm cf for r6xx.</li>
+ <li>r600g: only emit uses waterfall on r6xx hw.</li>
+ <li>util/r300g: split the r300 index buffer modifier functions out to util</li>
+ <li>r600g: modify index buffers for sizes the hw can't deal with.</li>
+ <li>r600g: send correct surface base update for multi-cbufs</li>
+ <li>r600g: fix fbo-drawbuffers-maxtargets</li>
+ <li>r600g: clean up valgrind issues on maxtargets test.</li>
+ <li>r600g: drop debugging that snuck in</li>
+ <li>r600g: fix tiling support for ddx supplied buffers</li>
+ <li>r600g: add z16 to color setup</li>
+ <li>r600g: add color/texture support for more depth formats.</li>
+ <li>r600g: fix r700 cube map sizing.</li>
+ <li>r600g: fixup r700 CB_SHADER_CONTROL register.</li>
+ <li>r600g: add missing BC_INST wrapper for evergreen</li>
+ <li>r600g: only flush for the correct colorbuffer, not all of them.</li>
+ <li>r600g: deal with overflow of VTX/TEX CF clauses.</li>
+ <li>r600g: set back to correct codepaths.</li>
+ <li>r600g: fixup evergreen miptree setup.</li>
+ <li>r600g: fix eg texture borders.</li>
+ <li>r600g: fix typo in struct member name</li>
+ <li>r600g: cleanup some of the DB blit code</li>
+ <li>r600g: make stencil readback work</li>
+ <li>r600g: disable dirty handling on texture from depth code.</li>
+ <li>r600g: use floats instead of hex for blit vbo</li>
+ <li>r600g: fix depth readback on rv610 and other quirky variants.</li>
+ <li>r600g: fix typo in evergreen register list</li>
+ <li>u_blitter: add a custom blitter call passing a dsa cso</li>
+ <li>r600g: use blitter to do db-&gt;cb flushing.</li>
+ <li>r600g: fix warnings since last commit.</li>
+ <li>egl: fix build since 17eace581d25a626a7d75d9d1205d012cbb14a6e</li>
+ <li>r300g: fix point sprite coord.</li>
+ <li>r600g: add vert support for 16/16 and 16/16/16 floats.</li>
+ <li>r600g: add some more vertex format support.</li>
+ <li>r600g: some more vertex formats</li>
+ <li>r600g: fix draw-elements and draw-elements-base-vertex</li>
+ <li>r600g: drop index_offset parameter to index buffer translate.</li>
+ <li>r600g: fixup tex wrapping.</li>
+ <li>r600g: fixup VP-&gt;FP output-&gt;input routing.</li>
+ <li>r600g: fix typo in r700 alu emit</li>
+ <li>r600g: fixup sprite coord enable.</li>
+ <li>r600g: fix polygon mode</li>
+ <li>mesa/mipmap: fix warning since 1acadebd6270d3604b026842b8a21360968618a0</li>
+ <li>r600g: add eg poly mode code.</li>
+ <li>r600g: make index bias fix for evergreen</li>
+ <li>r600g: add eg db count control register.</li>
+ <li>r300g: fix glsl-fs-pointcoord</li>
+ <li>r600g: add evergreen texture resource properly.</li>
+ <li>r600g: fix db flush breaking config state</li>
+ <li>r600g: on evergreen the centroid isn't set in this register.</li>
+ <li>r600g: add back evergreen name.</li>
+ <li>r600g: add evergreen texture border support to new path</li>
+ <li>r600g: move radeon.h members around to add back map flushing.</li>
+ <li>r600g: add initial vertex translate support.</li>
+ <li>r600g: remove old assert from new codepath</li>
+ <li>Revert "r600g: add initial vertex translate support."</li>
+ <li>r600g: port r300g fix for X* formats in texformat code</li>
+ <li>r600g: add L8A8 unorm.</li>
+ <li>r600g: clean up some code from move to new paths.</li>
+ <li>r600g: return string for chip family</li>
+ <li>r600g: use Elements macro instead of manual sizeofs</li>
+ <li>r600g: fix evergreen depth flushing.</li>
+ <li>r600g: add winsys support for CTL constants.</li>
+ <li>r600g: drop depth quirk on evergreen</li>
+ <li>r600g: add reloc for evergreen color attrib</li>
+ <li>r600g: realign evergreen code with r600 code.</li>
+ <li>r600g: add assembler support for other vtx fetch fields.</li>
+ <li>r600g: fixup vertex format picking.</li>
+ <li>r600g: sync vertex/texture cache on resources on evergreen</li>
+ <li>r600g: add cb flushing for extra buffers + depth buffer on r600/evergreen</li>
+ <li>r600g: fix evergreen draw-buffers</li>
+ <li>r600g: flush SH cache on constant change on evergreen</li>
+ <li>r600g: only set the Z export if shader exports it.</li>
+ <li>r600g: setup basic loop consts on r600 + evergreen.</li>
+ <li>mesa/st: initial attempt at RG support for gallium drivers</li>
+ <li>r600g: break out of search for reloc bo after finding it.</li>
+ <li>r600g: the code to check whether a new vertex shader is needed was wrong</li>
+ <li>r600g: fix wwarning in bo_map function</li>
+ <li>r600g: TODO domain management</li>
+ <li>r600g: add bo fenced list.</li>
+ <li>pb: don't keep checking buffers after first busy</li>
+ <li>r600g: add bo busy backoff.</li>
+ <li>r600g: drop mman allocator</li>
+ <li>r600g: drop use_mem_constant.</li>
+ <li>r600g: avoid unneeded bo wait</li>
+ <li>pb: fix numDelayed accounting</li>
+ <li>r600g: add evergreen stencil support.</li>
+ <li>r600g: use format from the sampler view not from the texture.</li>
+ <li>r600g: fix Z export enable bits.</li>
+ <li>r600g: add some RG texture format support.</li>
+ <li>r600g: drop width/height per level storage.</li>
+ <li>r600g: fix input/output Z export mixup for evergreen.</li>
+ <li>r600g: evergreen has no request size bit in texture word4</li>
+ <li>r600g: enable vertex samplers.</li>
+ <li>r600g: add TXL opcode support.</li>
+ <li>r600g: don't run with scissors.</li>
+ <li>r600g: fix typo in vertex sampling on r600</li>
+ <li>gallium/tgsi: add support for stencil writes.</li>
+ <li>gallium/format: add support for X24S8 and S8X24 formats.</li>
+ <li>gallium/format: add X32_S8X24_USCALED format.</li>
+ <li>gallium/util: add S8 tile sampling support.</li>
+ <li>mesa: add support for FRAG_RESULT_STENCIL.</li>
+ <li>mesa: improve texstore for 8/24 formats and add texstore for S8.</li>
+ <li>softpipe: add support for shader stencil export capability</li>
+ <li>st/mesa: add option to choose a texture format that we won't render to.</li>
+ <li>st/mesa: use shader stencil export to accelerate shader drawpixels.</li>
+ <li>r600g: add support for S8, X24S8 and S8X24 sampler formats.</li>
+ <li>r600g: add shader stencil export support.</li>
+ <li>glsl: add support for shader stencil export</li>
+ <li>st/mesa: enable stencil shader export extension if supported</li>
+ <li>r600g: fix depth0 setting</li>
+ <li>r600g: fix scissor/cliprect confusion</li>
+ <li>r600g: store samplers/views across blit when we need to modify them</li>
+ <li>r600g: reduce size of context structure.</li>
+ <li>r600g: the vs/ps const arrays weren't actually being used.</li>
+ <li>r600g: add copy into tiled texture</li>
+ <li>r600g: split out miptree setup like r300g</li>
+ <li>r600g: use common texture object create function</li>
+ <li>r600g: rename pitch in texture to pitch_in_bytes</li>
+ <li>r600g: remove bpt and start using pitch_in_bytes/pixels.</li>
+ <li>r600g: fix transfer stride.</li>
+ <li>r600g: drop all use of unsigned long</li>
+ <li>r600g: use blitter for hw copy region</li>
+ <li>r600g: evergreen add stencil export bit</li>
+ <li>r600g: add missing eg reg definition</li>
+ <li>r600g: fix stencil export for evergreen harder</li>
+ <li>r600g: drop unused context members</li>
+ <li>r600g: only pick centroid coordinate when asked.</li>
+ <li>r600g: fixup pos/face ena/address properly</li>
+ <li>r600g: fixup typo in macro name</li>
+ <li>r600g: select linear interpolate if tgsi input requests it</li>
+ <li>r300g: clean up warning due to unknown cap.</li>
+ <li>tgsi: add scanner support for centroid inputs</li>
+ <li>r600g: evergreen interpolation support.</li>
+ <li>r600g: add evergreen ARL support.</li>
+ <li>r600g: switch to a common formats.h file since they are in different regs</li>
+ <li>r600g: add defines for tiling</li>
+ <li>r600g: get tiling info from kernel</li>
+ <li>r600g: set tiling bits in hw state</li>
+ <li>r600g: do proper tracking of views/samplers.</li>
+ <li>r600g: fix typo in tiling setup cb code.</li>
+ <li>r600g: depth needs to bound to ds</li>
+ <li>r600g: attempt to cleanup depth blit</li>
+ <li>r600g: fix transfer function for tiling.</li>
+ <li>r600g: retrieve tiling info from kernel for shared buffers.</li>
+ <li>r600g: all non-0 mipmap levels need to be w/h aligned to POT.</li>
+ <li>r600g: move to per-miplevel array mode.</li>
+ <li>r600g: start adding hooks for aligning width/height for tiles.</li>
+ <li>r600g: add r600 surface to store the aligned height.</li>
+ <li>r600g: introduce a per-driver resource flag for transfers.</li>
+ <li>r600g: add texture tiling alignment support.</li>
+ <li>r600g: add texture tiling enable under a debug option.</li>
+ <li>r600g: initial translate state support</li>
+ <li>r600g: start splitting out common code from eg/r600.</li>
+ <li>r600g: not fatal if we can't get tiling info from kernel</li>
+ <li>r600g: merge more of the common r600/evergreen state handling</li>
+ <li>r600g: drop more common state handling code</li>
+ <li>r600g: fix magic 0x1 -&gt;flat shade ena</li>
+ <li>r600g: add assembler support for all the kcache fields.</li>
+ <li>gallium/noop: report GL 2.1</li>
+ <li>r600g: pick correct color swap for A8 fbos.</li>
+ <li>r300g/r600g: bump cache manager timeouts to 1s</li>
+ <li>r600g: it looks like r600 can handle dword offsets in the indices.</li>
+ <li>r300g: try and use all of vertex constant space</li>
+ <li>r300g: fixup rs690 tiling stride alignment calculations.</li>
+ <li>r600g: fix evergreen segfaults.</li>
+ <li>r600g: hack around property unknown issues.</li>
+</ul></p>
+
+<p>Eric Anholt (300):
+<ul>
+ <li>glsl: Add definition of gl_TextureMatrix inverse/transpose builtins.</li>
+ <li>i965: Share the KIL_NV implementation between glsl and non-glsl.</li>
+ <li>i965: Also enable CC statistics when doing OQs.</li>
+ <li>i965: Track the windowizer's dispatch for kill pixel, promoted, and OQ</li>
+ <li>glsl: Rework assignments with write_masks to have LHS chan count match RHS.</li>
+ <li>glsl: Fix copy'n'wasted ir_noop_swizzle conditions.</li>
+ <li>ir_to_mesa: Only compare vector_elements present for any_nequal/all_equal</li>
+ <li>i965: Fix the vector/expression splitting for the write_mask change.</li>
+ <li>i965: When splitting vector variable assignment, ignore unset channels.</li>
+ <li>i965: Update expression splitting for the vector-result change to compares.</li>
+ <li>i965: Warning fix for vector result any_nequal/all_equal change.</li>
+ <li>mesa: Remove the non-required ARB_imaging extension.</li>
+ <li>mesa: Remove EXT_histogram.</li>
+ <li>mesa: Remove SGI_color_table.</li>
+ <li>mesa: Remove SGI_color_matrix.</li>
+ <li>mesa: Remove EXT_convolution.</li>
+ <li>intel: Remove disabled stencil drawpixels acceleration.</li>
+ <li>intel: Remove unnecessary minimum pitch alignment to 32 bytes.</li>
+ <li>intel: Replace my intel_texture_bitmap code with _mesa_meta_Bitmap.</li>
+ <li>radeon: Remove copied minimum pitch alignment code.</li>
+ <li>unichrome: Mostly revert my convolution removal changes.</li>
+ <li>intel: Remove dead intelIsTextureResident().</li>
+ <li>i915: Remove a dead if (0) block.</li>
+ <li>intel: Dead comment removal.</li>
+ <li>intel: Corresponding FinishRenderTexture debug to BeginRenderTexture.</li>
+ <li>i965: Add support for rendering to SARGB8 FBOs.</li>
+ <li>intel: Fix segfault on INTEL_DEBUG=fbo with unsupported framebuffers.</li>
+ <li>intel: Add fallback debug to glGenerateMipmap.</li>
+ <li>intel: More reverting of the sw fallback for depth texture border color.</li>
+ <li>intel: Improve some of the miptree debugging.</li>
+ <li>mesa: Fix type typo in glGenerateMipmap handling of GL_UNSIGNED_INT data.</li>
+ <li>glsl: Fix broadcast_index of lower_variable_index_to_cond_assign.</li>
+ <li>glsl: Add validation that a swizzle only references valid channels.</li>
+ <li>i965: Fix up writemasked assignments in the new FS.</li>
+ <li>i965: Remove swizzling of assignment to vector-splitting single-channel LHS.</li>
+ <li>i965: Handle all_equal/any_nequal in the new FS.</li>
+ <li>i965: Fix vector splitting RHS channel selection with sparse writemasks.</li>
+ <li>i965: Add support for dFdx()/dFdy() to the FS backend.</li>
+ <li>i965: Add support for attribute interpolation on Sandybridge.</li>
+ <li>i965: Set up inputs to the fragment shader according to FP InputsRead.</li>
+ <li>i965: Add support for POW in gen6 FS.</li>
+ <li>i965: Fix negation in the new FS backend.</li>
+ <li>i965: Actually track the "if" depth in loop in the new FS backend.</li>
+ <li>i965: Apply the same set of lowering passes to new FS as to Mesa IR.</li>
+ <li>i965: Fix valgrind complaint about base_ir for new FS debugging.</li>
+ <li>i965: Fix up the FS backend for the variable array indexing pass.</li>
+ <li>i965: Set the variable type when dereferencing an array.</li>
+ <li>i965: Add support for dereferencing structs to the new FS backend.</li>
+ <li>i965: Add support for struct, array, and matrix uniforms to FS backend.</li>
+ <li>i965: Fix all non-snb regression in the snb attribute interpolation commit.</li>
+ <li>i965: Fix up part of my Sandybridge attributes support patch.</li>
+ <li>i965: Add support for gl_FrontFacing to the new FS backend.</li>
+ <li>i965: Subtract instead of adding when computing y delta in new FS backend.</li>
+ <li>mesa: Pull ir_to_mesa's sampler number fetcher out to shared code.</li>
+ <li>i965: Set up sampler numbers in the FS backend.</li>
+ <li>i965: Add support for non-color render target write data to new FS backend.</li>
+ <li>i965: Add support for MRT to the new FS backend.</li>
+ <li>i965: Add support for ir_loop counters to the new FS backend.</li>
+ <li>i965: Add support for ARB_fragment_coord_conventions to the new FS backend.</li>
+ <li>glsl: Also update implicit sizes of varyings at link time.</li>
+ <li>i965: Do interpolation for varying matrices and arrays in the FS backend.</li>
+ <li>i965: Don't try to emit interpolation for unused varying slots.</li>
+ <li>i965: Fix array indexing of arrays of matrices.</li>
+ <li>i965: Clean up obsolete FINISHME comment.</li>
+ <li>mesa: Move the list of builtin uniform info from ir_to_mesa to shared code.</li>
+ <li>i965: Add support for builtin uniforms to the new FS backend.</li>
+ <li>i965: Fix use of undefined mem_ctx in vector splitting.</li>
+ <li>i956: Make new FS discard do its work in a temp, not the null reg!</li>
+ <li>i965: Clean up the virtual GRF handling.</li>
+ <li>ra: First cut at a graph-coloring register allocator for mesa.</li>
+ <li>i965: First cut at register allocation using graph coloring.</li>
+ <li>i965: Add live interval analysis and hook it up to the register allocator.</li>
+ <li>i965: Remove my "safety counter" code from loops.</li>
+ <li>i965: Fix whole-structure/array assignment in new FS.</li>
+ <li>mesa: Don't reference a W component in setting up a vec3 uniform component.</li>
+ <li>i965: Fix new FS handling of builtin uniforms with packed scalars in structs.</li>
+ <li>glsl: Add a lowering pass for texture projection.</li>
+ <li>i965: Use the lowering pass for texture projection.</li>
+ <li>i965: Split the gen4 and gen5 sampler handling apart.</li>
+ <li>i965: Add gen6 attribute interpolation to new FS backend.</li>
+ <li>i965: Fix the gen6 jump size for BREAK/CONT in new FS.</li>
+ <li>i965: Also increment attribute location when skipping unused slots.</li>
+ <li>i965: Pre-gen6, map VS outputs (not FS inputs) to URB setup in the new FS.</li>
+ <li>i965: Add real support for pre-gen5 texture sampling to the new FS.</li>
+ <li>i965: Fix up copy'n'pasteo from moving coordinate setup around for gen4.</li>
+ <li>i965: Restore the forcing of aligned pairs for delta_xy on chips with PLN.</li>
+ <li>i965: When producing a single channel swizzle, don't make a temporary.</li>
+ <li>i965: Add a sanity check for register allocation sizes.</li>
+ <li>i965: Fix off-by-ones in handling the last members of register classes.</li>
+ <li>i965: Don't try to emit code if we failed register allocation.</li>
+ <li>i965: Add support for EXT_texture_swizzle to the new FS backend.</li>
+ <li>i965: Set up swizzling of shadow compare results for GL_DEPTH_TEXTURE_MODE.</li>
+ <li>i965: Fix glean/texSwizzle regression in previous commit.</li>
+ <li>i965: Be more conservative on live interval calculation.</li>
+ <li>i965: Add trivial dead code elimination in the new FS backend.</li>
+ <li>i965: Add initial folding of constants into operand immediate slots.</li>
+ <li>i965: In disasm, gen6 fb writes don't put msg reg # in destreg_conditionalmod.</li>
+ <li>i965: Add support for gen6 FB writes to the new FS.</li>
+ <li>i965: Enable the constant propagation code.</li>
+ <li>i965: Also do constant propagation for the second operand of CMP.</li>
+ <li>i965: Add back gen6 headerless FB writes to the new FS backend.</li>
+ <li>i965: Gen6 no longer has the IFF instruction; always use IF.</li>
+ <li>i965: Fix up IF/ELSE/ENDIF for gen6.</li>
+ <li>i965: Fix botch in the header_present case in the new FS.</li>
+ <li>i965: Add some clarification of the WECtrl field.</li>
+ <li>i965: Don't do 1/w multiplication in new FS for gen6</li>
+ <li>i965: Gen6's sampler messages are the same as Ironlake.</li>
+ <li>i965: Refactor gl_FrontFacing setup out of general variable setup.</li>
+ <li>i965: Add support for gl_FrontFacing on gen6.</li>
+ <li>i965: Don't assume that WPOS is always provided on gen6 in the new FS.</li>
+ <li>i965: Fix gen6 pointsize handling to match pre-gen6.</li>
+ <li>i965: Disable emitting if () statements on gen6 until we really fix them.</li>
+ <li>i965: Normalize cubemap coordinates like is done in the Mesa IR path.</li>
+ <li>mesa: Simplify a bit of _mesa_add_state_reference using memcmp.</li>
+ <li>i965: Drop the check for duplicate _mesa_add_state_reference.</li>
+ <li>i965: Drop the check for YUV constants in the param list.</li>
+ <li>i965: Handle swizzles in the addition of YUV texture constants.</li>
+ <li>i965: Fix gen6 WM push constants updates.</li>
+ <li>i965: Fix new FS gen6 interpolation for sparsely-populated arrays.</li>
+ <li>i965: Enable attribute swizzling (repositioning) in the gen6 SF.</li>
+ <li>i965: Add register coalescing to the new FS backend.</li>
+ <li>i965: Split FS_OPCODE_DISCARD into two steps.</li>
+ <li>i965: Reduce register interference checks for changed FS_OPCODE_DISCARD.</li>
+ <li>i965: Move FS backend structures to a header.</li>
+ <li>i965: Give the math opcodes information on base mrf/mrf len.</li>
+ <li>i965: Give the FB write and texture opcodes the info on base MRF, like math.</li>
+ <li>i965: Compute to MRF in the new FS backend.</li>
+ <li>i965: Don't consider gen6 math instructions to write to MRFs.</li>
+ <li>i965: Add a couple of checks for gen6 math instruction limits.</li>
+ <li>i965: Don't compute-to-MRF in gen6 math instructions.</li>
+ <li>i965: Expand uniform args to gen6 math to full registers to get hstride == 1.</li>
+ <li>i965: Don't compute-to-MRF in gen6 VS math.</li>
+ <li>i965: Fix gen6 pixel_[xy] setup to avoid mixing int and float src operands.</li>
+ <li>i965: Always use the new FS backend on gen6.</li>
+ <li>i965: Fix missing "break;" in i2b/f2b, and missing AND of CMP result.</li>
+ <li>intel: Allow CopyTexSubImage to InternalFormat 3/4 textures, like RGB/RGBA.</li>
+ <li>i965: Don't rebase the index buffer to min 0 if any arrays are in VBOs.</li>
+ <li>i965: Add support for rescaling GL_TEXTURE_RECTANGLE coords to new FS.</li>
+ <li>i965: Set class_sizes[] for the aligned reg pair class.</li>
+ <li>i965: Update the live interval when coalescing regs.</li>
+ <li>i965: Add a pass to the FS to split virtual GRFs to float channels.</li>
+ <li>i965: Add a function for handling the move of boolean values to flag regs.</li>
+ <li>i965: Add peepholing of conditional mod generation from expressions.</li>
+ <li>i965: Enable the new FS backend on pre-gen6 as well.</li>
+ <li>i965: Fix texturing on pre-gen5.</li>
+ <li>i965: Set the type of the null register to fix gen6 FS comparisons.</li>
+ <li>i965: Disable the debug printf I added for FS disasm.</li>
+ <li>i965: Fix a weirdness in NOT handling.</li>
+ <li>i965: Fix assertion failure on gen6 BufferSubData to busy BO.</li>
+ <li>i965: Assert out on gen6 VS constant buffer reads that hang the GPU for now.</li>
+ <li>i965: Fix scissor-offscreen on gen6 like we did pre-gen6.</li>
+ <li>i965: Avoid blits in BufferCopySubdata on gen6.</li>
+ <li>i965: Tell the shader compiler when we expect depth writes for gen6.</li>
+ <li>i965: Remove the gen6 emit_mi_flushes I sprinkled around the driver.</li>
+ <li>i965: Disable thread dispatch when the FS doesn't do any work.</li>
+ <li>i965: Add EU emit support for gen6's new IF instruction with comparison.</li>
+ <li>i965: Set the source operand types for gen6 if/else/endif to integer.</li>
+ <li>i965: Use the new style of IF statement with embedded comparison on gen6.</li>
+ <li>i965: Split register allocation out of the ever-growing brw_fs.cpp.</li>
+ <li>i965: Fix gl_FrontFacing emit on pre-gen6.</li>
+ <li>i965: Add support for register spilling.</li>
+ <li>i965: Don't emit register spill offsets directly into g0.</li>
+ <li>i965: Correct scratch space allocation.</li>
+ <li>i965: Be more aggressive in tracking live/dead intervals within loops.</li>
+ <li>i965: Move the FS disasm/annotation printout to codegen time.</li>
+ <li>i965: Add support for pull constants to the new FS backend.</li>
+ <li>i965: Add EU code for dword scattered reads (constant buffer array indexing).</li>
+ <li>i965: Clarify an XXX comment in FB writes with real info.</li>
+ <li>i965: Use SENDC on the first render target write on gen6.</li>
+ <li>i965: Clear some undefined fields of g0 when using them for gen6 FB writes.</li>
+ <li>i965: Add disasm for the flag register.</li>
+ <li>i965: Add support for discard instructions on gen6.</li>
+ <li>i965: Handle new ir_unop_round_even in channel expression splitting.</li>
+ <li>i965: Fix typo in comment about state flags.</li>
+ <li>i965: Set up the constant buffer on gen6 when it's needed.</li>
+ <li>i965: Add support for constant buffer loads on gen6.</li>
+ <li>i965: Drop the eot argument to read messages, which can never be set.</li>
+ <li>i965: Fix VS URB entry sizing.</li>
+ <li>i965: Disable register spilling on gen6 until it's fixed.</li>
+ <li>i965: Make FS uniforms be the actual type of the uniform at upload time.</li>
+ <li>i965: Add user clip planes support to gen6.</li>
+ <li>i965: Update gen6 SF state when point state (sprite or attenuation) changes.</li>
+ <li>i965: Upload required gen6 VS push constants even when using pull constants.</li>
+ <li>i965: Update the gen6 stencil ref state when stencil state changes.</li>
+ <li>mesa: Make metaops use program refcounts instead of names.</li>
+ <li>mesa: Don't compute an unused texture completeness debug string.</li>
+ <li>intel: For batch, use GTT mapping instead of writing to a malloc and copying.</li>
+ <li>intel: Annotate debug printout checks with unlikely().</li>
+ <li>intel: Remove the magic unaligned memcpy code.</li>
+ <li>i965: Remove dead intel_structs.h file.</li>
+ <li>intel: Avoid taking logbase2 of several things that we max.</li>
+ <li>intel: Remove duplicated teximage miptree to object miptree promotion.</li>
+ <li>intel: Remove leftover dri1 locking fields in the context.</li>
+ <li>mesa: Fix delayed state flagging for EXT_sso-related program changes.</li>
+ <li>intel: Fix the client-side swapbuffers throttling.</li>
+ <li>Revert "intel: Fix the client-side swapbuffers throttling."</li>
+ <li>i965: Allow OPCODE_SWZ to put immediates in the first arg.</li>
+ <li>i965: Add support for math on constants in gen6 brw_wm_glsl.c path.</li>
+ <li>i965: Work around strangeness in swizzling/masking of gen6 math.</li>
+ <li>i965: re-enable gen6 IF statements in the fragment shader.</li>
+ <li>glsl: Free the loop state context when we free the loop state.</li>
+ <li>i965: Fix gl_FragCoord inversion when drawing to an FBO.</li>
+ <li>i965: Shut up spurious gcc warning about GLSL_TYPE enums.</li>
+ <li>mesa: Don't spam the console in a debug build unless some spam is requested.</li>
+ <li>i965: Add state dumping for sampler state.</li>
+ <li>i965: Add dumping of the sampler default color.</li>
+ <li>i965: Fail on loops on gen6 for now until we write the EU emit code for it.</li>
+ <li>i965: Eliminate dead code more aggressively.</li>
+ <li>mesa: Include C++ files in the makedepend of DRI drivers.</li>
+ <li>i965: Fix compute_to_mrf to not move a MRF write up into another live range.</li>
+ <li>i965: Just use memset() to clear most members in FS constructors.</li>
+ <li>i965: Remove extra n at the end of every instruction in INTEL_DEBUG=wm.</li>
+ <li>i965: Fold constants into the second arg of BRW_SEL as well.</li>
+ <li>glsl: Add a helper function for determining if an rvalue could be a saturate.</li>
+ <li>i965: Recognize saturates and turn them into a saturated mov.</li>
+ <li>ir_to_mesa: Detect and emit MOV_SATs for saturate constructs.</li>
+ <li>i965: Improve compute-to-mrf.</li>
+ <li>i965: Remove duplicate MRF writes in the FS backend.</li>
+ <li>i965: Move gen4 blend constant color to the gen4 blending file.</li>
+ <li>i965: Don't upload polygon stipple unless required.</li>
+ <li>i965: Don't upload line stipple pattern unless we're stippling.</li>
+ <li>i965: Don't upload line smooth params unless we're line smoothing.</li>
+ <li>i965: Use the new embedded compare in SEL on gen6 for VS MIN and MAX opcodes.</li>
+ <li>i965: Fix type of gl_FragData[] dereference for FB write.</li>
+ <li>glsl: Make the symbol table's add_function just use the function's name.</li>
+ <li>glsl: Make the symbol table's add_variable just use the variable's name.</li>
+ <li>glsl: Add a helper constructor for expressions that works out result type.</li>
+ <li>glsl: Fix structure and array comparisions.</li>
+ <li>glsl: Quiet unreachable no-return-from-function warning.</li>
+ <li>i965: Dump the WHILE jump distance on gen6.</li>
+ <li>i965: Add support for gen6 DO/WHILE ISA emit.</li>
+ <li>i965: Add support for gen6 BREAK ISA emit.</li>
+ <li>i965: Add support for gen6 CONTINUE instruction emit.</li>
+ <li>i965: Enable IF statements in the VS.</li>
+ <li>i965: Add support for loops in the VS.</li>
+ <li>glsl: Mark the array access for whole-array comparisons.</li>
+ <li>glsl: Fix flipped return of has_value() for array constants.</li>
+ <li>mesa: Add getters for the rest of the supported draw buffers.</li>
+ <li>mesa: Add getters for ARB_copy_buffer's attachment points.</li>
+ <li>intel: Add an env var override to execute for a different GPU revision.</li>
+ <li>i965: Update gen6 WM state on compiled program change, not just FP change.</li>
+ <li>i965: Update gen6 SF state on fragment program change too.</li>
+ <li>i965: Fix compile warning about missing opcodes.</li>
+ <li>i965: Move payload reg setup to compile, not lookup time.</li>
+ <li>i965: Provide delta_xy reg to gen6 non-GLSL path PINTERP.</li>
+ <li>i965: Fix up 16-wide gen6 FB writes after various refactoring.</li>
+ <li>i965: Don't smash a group of coordinates doing gen6 16-wide sampler headers.</li>
+ <li>i965: Fix gen6 interpolation setup for 16-wide.</li>
+ <li>i965: Fix up gen6 samplers for their usage by brw_wm_emit.c</li>
+ <li>i965: Make the sampler's implied move on gen6 be a raw move.</li>
+ <li>i965: Align gen6 push constant size to dispatch width.</li>
+ <li>i965: Add support for the instruction compression bits on gen6.</li>
+ <li>i965: Nuke brw_wm_glsl.c.</li>
+ <li>i965: Remove INTEL_DEBUG=glsl_force now that there's no brw_wm_glsl.c</li>
+ <li>i965: Fix comment about gen6_wm_constants.</li>
+ <li>i965: Handle saturates on gen6 math instructions.</li>
+ <li>i965: Always hand the absolute value to RSQ.</li>
+ <li>i965: Add disabled debug code for dumping out the WM constant payload.</li>
+ <li>i965: Work around gen6 ignoring source modifiers on math instructions.</li>
+ <li>i965: Fix flipped value of the not-embedded-in-if on gen6.</li>
+ <li>i965: Don't try to store gen6 (float) blend constant color in bytes.</li>
+ <li>i965: Set up the color masking for the first drawbuffer on gen6.</li>
+ <li>i965: Set up the per-render-target blend state on gen6.</li>
+ <li>i965: Set the render target index in gen6 fixed-function/ARB_fp path.</li>
+ <li>i965: Use the new pixel mask location for gen6 ARB_fp KIL instructions.</li>
+ <li>i965: Drop KIL_NV from the ff/ARB_fp path since it was only used for GLSL.</li>
+ <li>i965: Drop push-mode reladdr constant loading and always use constant_map.</li>
+ <li>i965: Fix VS constants regression pre-gen6.</li>
+ <li>i965: Clean up VS constant buffer location setup.</li>
+ <li>i965: Set up the correct texture border color state struct for Ironlake.</li>
+ <li>i965: Set render_cache_read_write surface state bit on gen6 constant surfs.</li>
+ <li>i965: remove unused variable since brw_wm_glsl.c removal.</li>
+ <li>intel: Use plain R8 and RG8 for COMPRESSED_RED and COMPRESSED_RG.</li>
+ <li>intel: Set the swizzling for depth textures using the GL_RED depth mode.</li>
+ <li>glsl: Correct the marking of InputsRead/OutputsWritten on in/out matrices.</li>
+ <li>i965: Correct the dp_read message descriptor setup on g4x.</li>
+ <li>intel: Include stdbool so we can stop using GLboolean when we want to.</li>
+ <li>i965: Fix ARL to work on gen6.</li>
+ <li>i956: Fix the old FP path fragment position setup on gen6.</li>
+ <li>i965: Fix gl_FragCoord.z setup on gen6.</li>
+ <li>i965: Add support for using the BLT ring on gen6.</li>
+ <li>intel: Update renderbuffers before looking up CopyTexImage's read buffer.</li>
+ <li>intel: Drop commented intel_flush from copy_teximage.</li>
+ <li>intel: Try to sanely check that formats match for CopyTexImage.</li>
+ <li>intel: Support glCopyTexImage() from XRGB8888 to ARGB8888.</li>
+ <li>i965: Avoid using float type for raw moves, to work around SNB issue.</li>
+ <li>i965: Set the alternative floating point mode on gen6 VS and WM.</li>
+ <li>i965: Add support for gen6 constant-index constant loading.</li>
+ <li>i965: Add support for gen6 reladdr VS constant loading.</li>
+ <li>i965: Improve the hacks for ARB_fp scalar^scalar POW on gen6.</li>
+ <li>i965: Factor out the ir comparision to BRW_CONDITIONAL_* code.</li>
+ <li>i965: Fix regression in FS comparisons on original gen4 due to gen6 changes.</li>
+ <li>i965: Do lowering of array indexing of a vector in the FS.</li>
+ <li>intel: Only do frame throttling at glFlush time when using frontbuffer.</li>
+ <li>intel: Handle forced swrast clears before other clear bits.</li>
+ <li>intel: Use tri clears when we don't know how to blit clear the format.</li>
+ <li>intel: Add spans code for the ARB_texture_rg support.</li>
+ <li>intel: Add a couple of helper functions to reduce rb code duplication.</li>
+ <li>intel: Fix segfaults from trying to use _ColorDrawBuffers in FBO validation.</li>
+ <li>intel: When validating an FBO's combined depth/stencil, use the given FBO.</li>
+</ul></p>
+
+<p>Fabian Bieler (2):
+<ul>
+ <li>r600g: set address of pop instructions to next instruction</li>
+ <li>glsl: fix lowering conditional returns in subroutines</li>
+</ul></p>
+
+<p>Francisco Jerez (51):
+<ul>
+ <li>dri/nv04: Fix PGRAPH_ERRORs when running OA.</li>
+ <li>dri/nv04: Mipmapping fixes.</li>
+ <li>dri/nv04: Align SIFM transfer dimensions.</li>
+ <li>dri/nv04: Fix up color mask.</li>
+ <li>dri/nv04: Fix maximum texture size.</li>
+ <li>dri/nv04: Fix provoking vertex.</li>
+ <li>dri/nouveau: Update nouveau_class.h.</li>
+ <li>dri/nouveau: Add some more extensions.</li>
+ <li>dri/nouveau: Fix glRenderbufferStorage with DEPTH_COMPONENT as internal format.</li>
+ <li>dri/nouveau: Don't request a fake front unnecessarily.</li>
+ <li>dri/nouveau: Don't reemit the BO state in nouveau_state_emit().</li>
+ <li>dri/nouveau: Cleanup references to the old FBOs on glMakeCurrent().</li>
+ <li>meta: Don't bind the created texture object in init_temp_texture().</li>
+ <li>dri/nv10: Fix the CLAMP texture wrap mode.</li>
+ <li>dri/nv04: Use nvgl_wrap_mode().</li>
+ <li>dri/nouveau: Remove unnecessary assertion.</li>
+ <li>dri/nouveau: Cleanup more references to old FBOs and VBOs.</li>
+ <li>dri/nv10-nv20: Fix texturing in some cases after a base level change.</li>
+ <li>dri/nouveau: Fix software mipmap generation on 1x1 textures.</li>
+ <li>dri/nouveau: Have a smaller amount of larger scratch buffers.</li>
+ <li>dri/nouveau: Remove unnecessary flush.</li>
+ <li>dri/nv10: Use fast Z clears.</li>
+ <li>dri/nouveau: Minor cleanup.</li>
+ <li>dri/nv10: Fake fast Z clears for pre-nv17 cards.</li>
+ <li>dri/nouveau: Initialize tile_flags when allocating a render target.</li>
+ <li>nouveau: Get larger push buffers.</li>
+ <li>dri/nouveau: Force a "slow" Z clear if we're getting a new depth buffer.</li>
+ <li>dri/nv20: Clear with the 3D engine.</li>
+ <li>dri/nouveau: Don't assert(0) on compressed internal formats.</li>
+ <li>dri/nv25: Bind a hierarchical depth buffer.</li>
+ <li>dri/nouveau: Call _mesa_update_state() after framebuffer invalidation.</li>
+ <li>dri/nouveau: Honor the access flags in nouveau_bufferobj_map_range.</li>
+ <li>dri/nouveau: Tell the vbo module we want real hardware BOs.</li>
+ <li>dri/nouveau: Split out the scratch helpers to a separate file.</li>
+ <li>dri/nouveau: Avoid recursion in nouveau_bo_context_reset().</li>
+ <li>dri/nouveau: Use a macro to iterate over the bound vertex attributes.</li>
+ <li>dri/nouveau: Split out array handling to its own file.</li>
+ <li>dri/nouveau: Optimize VBO binding re-emission.</li>
+ <li>dri/nouveau: Keep small DYNAMIC_DRAW vertex buffers in system ram.</li>
+ <li>dri/nouveau: Pipeline glTexSubImage texture transfers.</li>
+ <li>dri/nouveau: Fix type promotion issue on 32bit platforms.</li>
+ <li>dri/nouveau: Validate the framebuffer state on read buffer changes.</li>
+ <li>dri/nouveau: Re-emit the BO state when coming back from a software fallback.</li>
+ <li>meta: Don't leak alpha function/reference value changes.</li>
+ <li>meta: Fix incorrect rendering of the bitmap alpha component.</li>
+ <li>vbo: Avoid unnecessary copy to/from current in vertex format upgrade.</li>
+ <li>meta: Don't try to disable cube maps if the driver doesn't expose the extension.</li>
+ <li>meta: Handle bitmaps with alpha test enabled.</li>
+ <li>dri/nouveau: Split hardware/software TNL instantiation more cleanly.</li>
+ <li>dri/nouveau: Fix typo.</li>
+ <li>dri/nouveau: Kill a bunch of ternary operators.</li>
+</ul></p>
+
+<p>Fredrik Höglund (2):
+<ul>
+ <li>r600g: Fix texture sampling with swizzled coords</li>
+ <li>r600g: fix pow(0, 0) evaluating to NaN</li>
+</ul></p>
+
+<p>Guillermo S. Romero (1):
+<ul>
+ <li>r300g: Do not use buf param before checking for NULL.</li>
+</ul></p>
+
+<p>Henri Verbeet (19):
+<ul>
+ <li>r600g: Flush upload buffers before draws instead of before flushes.</li>
+ <li>r600g: Check for other references before checking for existing mappings in radeon_bo_pb_map_internal().</li>
+ <li>r600g: Remove a redundant flush in r600_texture_transfer_map().</li>
+ <li>r600g: Buffer object maps imply a wait.</li>
+ <li>r600g: Respect PB_USAGE_UNSYNCHRONIZED in radeon_bo_pb_map_internal().</li>
+ <li>Revert "r600g: Flush upload buffers before draws instead of before flushes."</li>
+ <li>r600g: fix exports_ps to export a number not a mask.</li>
+ <li>r600g: Mention AMD in the renderer string.</li>
+ <li>r600g: Cleanup the fenced_bo list in r600_context_fini().</li>
+ <li>r600g: Evergreen has two extra frac_bits for the sampler LOD state.</li>
+ <li>r600: Evergreen has two extra frac_bits for the sampler LOD state.</li>
+ <li>r600g: Add PIPE_FORMAT_L8A8_UNORM for Evergreen as well.</li>
+ <li>r600g: Swizzle vertex data only once.</li>
+ <li>r600g: Synchronize supported color formats between Evergreen and r600/r700.</li>
+ <li>r600g: Fix the PIPE_FORMAT_L8A8_UNORM color swaps.</li>
+ <li>r600g: Fix the PIPE_FORMAT_A8_UNORM color swap for Evergreen as well.</li>
+ <li>r600g: Cleanup block bo references in r600_context_fini().</li>
+ <li>r600g: Cleanup fetch shader resources in r600_pipe_shader_destroy().</li>
+ <li>st/mesa: Handle wrapped depth buffers in st_copy_texsubimage().</li>
+</ul></p>
+
+<p>Hui Qi Tay (10):
+<ul>
+ <li>llvmpipe: minor changes in llvm coefficient calcs</li>
+ <li>draw: cliptest and viewport done in a single loop in vertex shader</li>
+ <li>draw: added viewport and cliptest flags</li>
+ <li>draw: sanitize llvm variant key</li>
+ <li>draw: corrections for w coordinate</li>
+ <li>draw: corrections to allow for different cliptest cases</li>
+ <li>llvmpipe: Moved draw pipeline twoside function to llvm setup code</li>
+ <li>llvmpipe: added llvm offset setup code</li>
+ <li>llvmpipe: clean up polygon offset function in lp setup code</li>
+ <li>llvmpipe: fix such that offset/twoside function only does in-place modification</li>
+</ul></p>
+
+<p>Ian Romanick (102):
+<ul>
+ <li>glsl2: Refactor testing for whether a deref is of a matrix or array</li>
+ <li>glsl2: Add flags to enable variable index lowering</li>
+ <li>glsl: Add doxygen comments</li>
+ <li>EGL DRI2: Silence piles of 'unused variable' warnings</li>
+ <li>EGL DRI2: Silence 'missing initializer' warnings</li>
+ <li>egl_glx: Silence piles of 'unused variable' warnings</li>
+ <li>egl: Fix several 'comparison between signed and unsigned integer' warnings</li>
+ <li>dri: Ensure that DRI driver cpp files are in tarballs</li>
+ <li>mesa: Force GL_ARB_copy_buffer to always be enabled</li>
+ <li>mesa: Force GL_SGIS_generate_mipmap to always be enabled</li>
+ <li>Remove GL_MESA_packed_depth_stencil</li>
+ <li>Remove GL_EXT_cull_vertex</li>
+ <li>Regenerate files changed by previous commit</li>
+ <li>Remove unnescessary initializations of UpdateTexturePalette</li>
+ <li>ARB_texture_rg: Add GLX protocol support</li>
+ <li>ARB_texture_rg: Correct some errors in RED / RG internal format handling</li>
+ <li>ARB_texture_rg: Add GL_TEXTURE_{RED,GREEN}_SIZE query support</li>
+ <li>ARB_texture_rg: Add GL_RED as a valid GL_DEPTH_TEXTURE_MODE</li>
+ <li>ARB_texture_rg: Handle RED and RG the same as RGB for tex env</li>
+ <li>ARB_texture_rg: Add R8, R16, RG88, and RG1616 internal formats</li>
+ <li>ARB_texture_rg: Allow RED and RG textures as FBO color buffer attachments</li>
+ <li>mesa: Enable GL_ARB_texture_rg in software paths</li>
+ <li>i965: Enable GL_ARB_texture_rg</li>
+ <li>mesa: Add ARB_texture_compression_rgtc as an alias for EXT_texture_compression_rgtc</li>
+ <li>ARB_texture_rg: Add GL_COMPRESSED_{RED,RG} cases in _mesa_is_color_format</li>
+ <li>mesa: Fix misplaced #endif</li>
+ <li>mesa: Trivial correction to comment</li>
+ <li>rgtc: Detect RGTC formats as color formats and as compressed formats</li>
+ <li>docs: Add list of bugs fixed in 7.9</li>
+ <li>docs: Import 7.9 release notes from 7.9 branch.</li>
+ <li>docs: Import 7.8.x release notes from 7.8 branch.</li>
+ <li>docs: download.html does not need to be updated for each release</li>
+ <li>docs: Update mailing lines from sf.net to freedesktop.org</li>
+ <li>docs: Import news updates from 7.9 branch</li>
+ <li>docs: added news item for 7.9 release</li>
+ <li>glsl: Fail linking if assign_attribute_locations fails</li>
+ <li>glsl: Refactor 'layout' grammar to match GLSL 1.60 spec grammar</li>
+ <li>glsl: Slight refactor of error / warning checking for ARB_fcc layout</li>
+ <li>glsl: Clear type_qualifier using memset</li>
+ <li>glsl: Wrap ast_type_qualifier contents in a struct in a union</li>
+ <li>glsl: Regenerate files modified by previous commits</li>
+ <li>glcpp: Add the define for ARB_explicit_attrib_location when present</li>
+ <li>glcpp: Regenerate files changes by previous commit</li>
+ <li>glsl: Add parser support for GL_ARB_explicit_attrib_location layouts</li>
+ <li>glsl: Regenerate files changes by previous commit</li>
+ <li>glsl: Track explicit location in AST to IR translation</li>
+ <li>glsl: Add linker support for explicit attribute locations</li>
+ <li>main: Enable GL_ARB_explicit_attrib_location for swrast</li>
+ <li>intel: Enable GL_ARB_explicit_attrib_location</li>
+ <li>glsl: Remove const decoration from inlined function parameters</li>
+ <li>docs: skeleton for 7.10 release notes</li>
+ <li>docs: Update status of GL 3.x related extensions</li>
+ <li>mesa: Validate assembly shaders when GLSL shaders are used</li>
+ <li>glsl: Fix incorrect assertion</li>
+ <li>linker: Reject shaders that have unresolved function calls</li>
+ <li>mesa: Silence unused variable warning</li>
+ <li>mesa: Refactor validation of shader targets</li>
+ <li>mesa: Clean up two 'comparison between signed and unsigned' warnings</li>
+ <li>mesa: Clean up various 'unused parameter' warnings in shaderapi</li>
+ <li>glsl: Slightly change the semantic of _LinkedShaders</li>
+ <li>linker: Trivial indention fix</li>
+ <li>i965: Fix indentation after commit 3322fbaf</li>
+ <li>linker: Improve handling of unread/unwritten shader inputs/outputs</li>
+ <li>glapi: Add GL_EXT_separate_shader_objects</li>
+ <li>glapi: Commit files changed by previous commit</li>
+ <li>mesa: Add infrastructure to track GL_EXT_separate_shader_objects</li>
+ <li>mesa: Skeletal support for GL_EXT_separate_shader_objects</li>
+ <li>mesa: Add display list support for GL_EXT_separate_shader_objects functions</li>
+ <li>mesa: Track an ActiveProgram distinct from CurrentProgram</li>
+ <li>Track separate programs for each stage</li>
+ <li>swrast: Enable GL_EXT_separate_shader_objects in software paths</li>
+ <li>intel: Enable GL_EXT_separate_shader_objects in Intel drivers</li>
+ <li>docs: add GL_EXT_separate_shader_objects to release notes</li>
+ <li>glsl: Fix incorrect gl_type of sampler2DArray and sampler1DArrayShadow</li>
+ <li>ir_to_mesa: Refactor code for emitting DP instructions</li>
+ <li>mesa: Allow query of MAX_SAMPLES with EXT_framebuffer_multisample</li>
+ <li>glsl: Refactor is_vec_{zero,one} to be methods of ir_constant</li>
+ <li>glsl: Simplify generation of swizzle for vector constructors</li>
+ <li>glsl: Make is_zero and is_one virtual methods of ir_rvalue</li>
+ <li>ir_to_mesa: Generate smarter code for some conditional moves</li>
+ <li>glsl: Add ir_unop_sin_reduced and ir_unop_cos_reduced</li>
+ <li>glsl: Eliminate assumptions about size of ir_expression::operands</li>
+ <li>glsl: Add ir_rvalue::is_negative_one predicate</li>
+ <li>glsl: Add unary ir_expression constructor</li>
+ <li>glsl: Add ir_quadop_vector expression</li>
+ <li>glsl: Fix matrix constructors with vector parameters</li>
+ <li>i915: Disallow alpha, red, RG, and sRGB as render targets</li>
+ <li>glsl: Use M_LOG2E constant instead of calling log2</li>
+ <li>glsl: Lower ir_binop_pow to a sequence of EXP2 and LOG2</li>
+ <li>i915: Request that POW instructions be lowered</li>
+ <li>i915: Correctly generate unconditional KIL instructions</li>
+ <li>glsl: Ensure that equality comparisons don't return a NULL IR tree</li>
+ <li>i965: Correctly emit constants for aggregate types (array, matrix, struct)</li>
+ <li>glsl: Inherrit type of declared variable from initializer</li>
+ <li>linker: Ensure that unsized arrays have a size after linking</li>
+ <li>linker: Fix regressions caused by previous commit</li>
+ <li>glsl: Inherrit type of declared variable from initializer after processing assignment</li>
+ <li>linker: Allow built-in arrays to have different sizes between shader stages</li>
+ <li>ir_to_mesa: Don't generate swizzles for record derefs of non-scalar/vectors</li>
+ <li>Refresh autogenerated file builtin_function.cpp.</li>
+ <li>glsl: Allow less restrictive uses of sampler array indexing in GLSL &lt= 1.20</li>
+ <li>docs: Import 7.9.1 release notes from 7.9 branch</li>
+</ul></p>
+
+<p>Jakob Bornecrantz (27):
+<ul>
+ <li>rbug: Cast opcode to corrent int size</li>
+ <li>rbug: Add function to get opcode name string</li>
+ <li>scons: Link against talloc in the Gallium DRI drivers</li>
+ <li>i915g: Link with wrapper sw winsys with scons</li>
+ <li>tgsi: Actually care what check_soa_dependencies says</li>
+ <li>tgsi: Fix missing test before check</li>
+ <li>llvmpipe: Move makefile include to before targets</li>
+ <li>wrapper: Fix spelling</li>
+ <li>wrapper: Add a way to dewrap a pipe screen without destroying it</li>
+ <li>egl: Remove unnecessary headers</li>
+ <li>target-helpers: Remove per target software wrapper check</li>
+ <li>graw: Tidy graw xlib scons file a bit</li>
+ <li>scons: Remove old pipebuffer SConscript</li>
+ <li>scons: Detabify</li>
+ <li>scons: Check for pkg-config before trying to use it</li>
+ <li>scons: Check for libdrm_[intel|radeon] as well</li>
+ <li>scons: Move dependancy checks to the main gallium scons file</li>
+ <li>scons: Unify state tracker SConscripts</li>
+ <li>galahad: Correct the name of the scons library</li>
+ <li>graw: Use inline sw helper instead of roll your own loader</li>
+ <li>libgl-xlib: Use sw helper instead of roll your own</li>
+ <li>libgl-xlib: Use inline debug helper instead of non-inline version</li>
+ <li>graw: Use inline debug helper instead of non-inline version</li>
+ <li>gallium: Remove redundant sw and debug target helpers</li>
+ <li>i915g: Improve debug printing for textures</li>
+ <li>i915g: Make sure that new vbo gets updated</li>
+ <li>st/mesa: Unbind all constant buffers</li>
+</ul></p>
+
+<p>Jerome Glisse (75):
+<ul>
+ <li>r600g: alternative command stream building from context</li>
+ <li>r600g: move chip class to radeon common structure</li>
+ <li>r600g: use pipe context for flushing inside map</li>
+ <li>r600g: add back reference check when mapping buffer</li>
+ <li>r600g: directly allocate bo for user buffer</li>
+ <li>r600g: fix multi buffer rendering</li>
+ <li>r600g: occlusion query for new design</li>
+ <li>r600g: flush color buffer after draw command</li>
+ <li>r600g: disable shader rebuild optimization &amp; account cb flush packet</li>
+ <li>r600g: fix multiple occlusion query on same id</li>
+ <li>r600g: initial evergreen support in new path</li>
+ <li>r600g: fix typo in evergreen define (resource are in x range)</li>
+ <li>r600g: move use_mem_constants flags for new designs structure alignment</li>
+ <li>r600g: evergreen fix for new design</li>
+ <li>r600g: fix compilation after change to evergreend.h</li>
+ <li>r600g: fixup some evergreen register definitions</li>
+ <li>r600g: fix evergreen new path</li>
+ <li>r600g: fix reg definition</li>
+ <li>r600g: fix evergreen new path</li>
+ <li>r600g: bring over fix from old path to new path</li>
+ <li>r600g: fix vertex resource &amp; polygon offset</li>
+ <li>r600g: disable early cull optimization when occlusion query running</li>
+ <li>r600g: move around variables to share depth uncompression code</li>
+ <li>r600g: use depth decompression in new path</li>
+ <li>r600g: fix index buffer drawing</li>
+ <li>r600g: build packet header once</li>
+ <li>r600g: fix pointsprite &amp; resource unbinding</li>
+ <li>r600g: fix routing btw vertex &amp; pixel shader</li>
+ <li>r600g: fix occlusion query after change to block structure</li>
+ <li>r600g: use ptr for blit depth uncompress function</li>
+ <li>r600g: fix remaining piglit issue in new design</li>
+ <li>r600g: switch to new design</li>
+ <li>r600g: suspend/resume occlusion query around clear/copy</li>
+ <li>r600g: avoid rebuilding the vertex shader if no change to input format</li>
+ <li>r600g: use a hash table instead of group</li>
+ <li>r600g: delete old path</li>
+ <li>r600g: cleanup</li>
+ <li>r600g: more cleanup</li>
+ <li>r600g: use constant buffer instead of register for constant</li>
+ <li>r600g: fix constant &amp; literal src splitting, also fix mplayer gl2 shader</li>
+ <li>evergreeng: avoid overlapping border color btw VS &amp; PS</li>
+ <li>r600g: indentation fixes</li>
+ <li>r600g: rename radeon_ws_bo to r600_bo</li>
+ <li>r600g: allow r600_bo to be a sub allocation of a big bo</li>
+ <li>r600g: use r600_bo for relocation argument, simplify code</li>
+ <li>r600g: rename radeon_ws_bo to r600_bo</li>
+ <li>r600g: remove dead label &amp; fix indentation</li>
+ <li>r600g: store reloc information in bo structure</li>
+ <li>r600g: improve bo flushing</li>
+ <li>r600g: simplify block relocation</li>
+ <li>r600g: userspace fence to avoid kernel call for testing bo busy status</li>
+ <li>r600g: avoid segfault due to unintialized list pointer</li>
+ <li>r600g: fix dirty state handling</li>
+ <li>r600g: allow driver to work without submitting cmd to GPU</li>
+ <li>gallium/noop: no operation gallium driver</li>
+ <li>r600g: code cleanup (indent, trailing space, empty line ...)</li>
+ <li>r600g: fix occlusion query on evergreen (avoid lockup)</li>
+ <li>r600g: add fetch shader capabilities</li>
+ <li>r600g: dump raw shader output for debugging</li>
+ <li>r600g: update polygon offset only when rasterizer or zbuffer change</li>
+ <li>r600g: indentation fix</li>
+ <li>r600g: more indentation fix + warning silencing + dead code removal</li>
+ <li>r600g: build fetch shader from vertex elements</li>
+ <li>r600g: avoid useless shader rebuild at draw call</li>
+ <li>r600g: remove useless flush map</li>
+ <li>r600g: remove dead code</li>
+ <li>r600g: fix userspace fence against lastest kernel</li>
+ <li>r600g: avoid using pb* helper we are loosing previous cpu cycle with it</li>
+ <li>r600g: specialized upload manager</li>
+ <li>r600g: indentation cleanup</li>
+ <li>r600g: fix bo size when creating bo from handle</li>
+ <li>r600g: fix segfault when translating vertex buffer</li>
+ <li>r600g: need to reference upload buffer as the might still live accross flush</li>
+ <li>r600g: properly unset vertex buffer</li>
+ <li>r600g: avoid segfault</li>
+</ul></p>
+
+<p>Joakim Sindholt (3):
+<ul>
+ <li>util/u_blitter: fix leak</li>
+ <li>radeong: fix leaks</li>
+ <li>r300g: silence guard band cap errors</li>
+</ul></p>
+
+<p>Johann Rudloff (3):
+<ul>
+ <li>radeon: Implement EGL_MESA_no_surface_extension</li>
+ <li>radeon: Implement __DRI_IMAGE and EGL_MESA_image_drm</li>
+ <li>radeon: Implement GL_OES_EGL_image</li>
+</ul></p>
+
+<p>John Doe (3):
+<ul>
+ <li>r600g: misc cleanup</li>
+ <li>r600g: don't double count dirty block</li>
+ <li>r600g: keep a mapping around for each bo</li>
+</ul></p>
+
+<p>Jon TURNEY (1):
+<ul>
+ <li>Ensure -L$(TOP)/$(LIB_DIR) appears in link line before any -L in $LDFLAGS</li>
+</ul></p>
+
+<p>José Fonseca (128):
+<ul>
+ <li>gallivm: Fix address register swizzle.</li>
+ <li>gallivm: Start collecting bitwise arithmetic helpers in a new module.</li>
+ <li>gallivm: Clamp indirect register indices to file_max.</li>
+ <li>util: linearized sRGB values don't fit into 8bits</li>
+ <li>llvmpipe: Default to no threading on single processor systems.</li>
+ <li>tgsi: Don't ignore indirect registers in tgsi_check_soa_dependencies</li>
+ <li>llvmpipe: Describe how to profile llvmpipe.</li>
+ <li>llvmpipe: When failing free fs shader too.</li>
+ <li>util: Flush stdout on util_format.</li>
+ <li>gallivm: Add unorm support to lp_build_lerp()</li>
+ <li>llvmpipe: Special case complementary and identify blend factors in SoA.</li>
+ <li>llvmpipe: Make rgb/alpha bland func/factors match, when there is no alpha.</li>
+ <li>draw: Prevent clipped vertices overflow.</li>
+ <li>draw: Fullfil the new min_lod/max_lod/lod_bias/border_color dynamic state</li>
+ <li>gallivm: Fetch the lod from the dynamic state when min_lod == max_lod.</li>
+ <li>gallivm: Remove dead experimental code.</li>
+ <li>llvmpipe: Decouple sampler view and sampler state updates.</li>
+ <li>scons: New build= option, with support for checked builds.</li>
+ <li>scons: New build= option, with support for checked builds.</li>
+ <li>trace: Fix set_index_buffer and draw_vbo tracing.</li>
+ <li>python/retrace: Handle set_index_buffer and draw_vbo.</li>
+ <li>gallivm: Use SSE4.1's ROUNDSS/ROUNDSD for scalar rounding.</li>
+ <li>gallivm: More comprehensive border usage logic.</li>
+ <li>retrace: Handle clear_render_target and clear_depth_stencil.</li>
+ <li>llvmpipe: Dump a few missing shader key flags.</li>
+ <li>llvmpipe: Fix perspective interpolation for point sprites.</li>
+ <li>llvmpipe: Fix sprite coord perspective interpolation of Q.</li>
+ <li>gallivm: Take the type signedness in consideration in round/ceil/floor.</li>
+ <li>gallivm: Use a faster (and less accurate) log2 in lod computation.</li>
+ <li>gallivm: Fast implementation of iround(log2(x))</li>
+ <li>gallivm: Combined ifloor &amp; fract helper.</li>
+ <li>gallivm: Only apply min/max_lod when necessary.</li>
+ <li>gallivm: Compute lod as integer whenever possible.</li>
+ <li>util: Cleanup util_pack_z_stencil and friends.</li>
+ <li>llvmpipe: Cleanup depth-stencil clears.</li>
+ <li>gallivm: Vectorize the rho computation.</li>
+ <li>gallivm: Do not do mipfiltering when magnifying.</li>
+ <li>gallivm: Simplify lp_build_mipmap_level_sizes' interface.</li>
+ <li>gallivm: Don't compute the second mipmap level when frac(lod) == 0</li>
+ <li>gallivm: Use lp_build_ifloor_fract for lod computation.</li>
+ <li>gallivm: Clamp mipmap level and zero mip weight simultaneously.</li>
+ <li>gallivm: Fix copy'n'paste typo in previous commit.</li>
+ <li>gallivm: Implement brilinear filtering.</li>
+ <li>gallivm: Use the wrappers for SSE pack intrinsics.</li>
+ <li>gallivm: Avoid control flow for two-sided stencil test.</li>
+ <li>gallivm: Warn when doing inefficient integer comparisons.</li>
+ <li>gallivm: Move into the as much of the second level code as possible.</li>
+ <li>llvmpipe: First minify the texture size, then broadcast.</li>
+ <li>gallivm: Help for combined extraction and broadcasting.</li>
+ <li>gallivm: Do size computations simultanously for all dimensions (AoS).</li>
+ <li>llvmpipe: Prevent z &gt; 1.0</li>
+ <li>llvmpipe: Fix MSVC build. Enable the new SSE2 code on non SSE3 systems.</li>
+ <li>gallivm: Handle code have ret correctly.</li>
+ <li>util: Defined M_SQRT2 when not available.</li>
+ <li>gallivm: Less code duplication in log computation.</li>
+ <li>gallivm: Special bri-linear computation path for unmodified rho.</li>
+ <li>gallivm: Don't generate Phis for execution mask.</li>
+ <li>gallivm: Use varilables instead of Phis for cubemap selection.</li>
+ <li>gallivm: Remove support for Phi generation.</li>
+ <li>gallivm: Factor out the SI-&gt;FP texture size conversion for SoA path too</li>
+ <li>gallivm: Simplify if/then/else implementation.</li>
+ <li>gallivm: Cleanup the rest of the flow module.</li>
+ <li>gallivm: Fix a long standing bug with nested if-then-else emission.</li>
+ <li>gallivm: Allow to disable bri-linear filtering with GALLIVM_DEBUG=no_brilinear runtime option</li>
+ <li>gallivm: Use variables instead of Phis in loops.</li>
+ <li>gallivm: Pass texture coords derivates as scalars.</li>
+ <li>llvmpipe: Remove outdated comment about stencil testing.</li>
+ <li>gallivm: Eliminate unsigned integer arithmetic from texture coordinates.</li>
+ <li>gallium: Define C99 restrict keyword where absent.</li>
+ <li>tgsi: Export some names for some tgsi enums.</li>
+ <li>gallivm: More detailed analysis of tgsi shaders.</li>
+ <li>llvmpipe: Use lp_tgsi_info.</li>
+ <li>llvmpipe: Do not dispose the execution engine.</li>
+ <li>llvmpipe: Fix MSVC build.</li>
+ <li>llmvpipe: improve mm_mullo_epi32</li>
+ <li>gallivm: Name anonymous union.</li>
+ <li>llvmpipe: Unbreak Z32_FLOAT.</li>
+ <li>gallivm: More accurate float -&gt; 24bit &amp; 32bit unorm conversion.</li>
+ <li>llvmpipe: Generalize the x8z24 fast path to all depth formats.</li>
+ <li>llvmpipe: Fix depth-stencil regression.</li>
+ <li>llvmpipe: Ensure z_shift and z_width is initialized.</li>
+ <li>gallivm: Fix SoA cubemap derivative computation.</li>
+ <li>llvmpipe: Fix bad refactoring.</li>
+ <li>llvmpipe: Initialize bld ctx via lp_build_context_init instead of ad-hoc and broken code.</li>
+ <li>gallivm: Comment lp_build_insert_new_block().</li>
+ <li>gallivm: Add a note about SSE4.1's nearest mode rounding.</li>
+ <li>llvmpipe: Don't test rounding of x.5 numbers.</li>
+ <li>gallium: Avoid using __doc__ in python scripts.</li>
+ <li>gallivm: always enable LLVMAddInstructionCombiningPass()</li>
+ <li>gallivm: Remove the EMMS opcodes.</li>
+ <li>mesa: Fix windows build (uint -&gt; GLuint).</li>
+ <li>scons: Revamp how to specify targets to build.</li>
+ <li>scons: Fix MinGW cross-compilation.</li>
+ <li>scons: Some pipe drivers are not portable for MSVC</li>
+ <li>scons: Restore x11 tool behavior for backwards compatability.</li>
+ <li>scons: Disable python state tracker when swig is not present.</li>
+ <li>r600g: List recently added files in SConscript.</li>
+ <li>scons: Add aliases for several pipe drivers.</li>
+ <li>scons: i915 can't build on MSVC either.</li>
+ <li>scons: Propagate installation targets.</li>
+ <li>xorg/vmwgfx: Add missing source file to SConscript.</li>
+ <li>st/xorg: Add missing n to error message.</li>
+ <li>st/xorg: Detect libkms with scons too.</li>
+ <li>xorg/vmwgfx: Link libkms when available.</li>
+ <li>r600g: Swap the util_blitter_destroy call order.</li>
+ <li>gallivm: Allocate TEMP/OUT arrays only once.</li>
+ <li>libgl-gdi: Allow to pick softpipe/llvmpipe on runtime.</li>
+ <li>scons: Use inline wrap helpers more consistently.</li>
+ <li>svga: Use consistent hexadecimal representation on debug output.</li>
+ <li>scons: Alias for svga</li>
+ <li>wgl: Stub WGL_ARB_pbuffer support.</li>
+ <li>wgl: More complete WGL_ARB_pbuffer support.</li>
+ <li>svga: Silence debug printf.</li>
+ <li>scons: Move MSVS_VERSION option to common module.</li>
+ <li>vega: Remove extraneous ;</li>
+ <li>retrace: Some fixes.</li>
+ <li>util: C++ safe.</li>
+ <li>wgl: Fix double free. Remove dead code.</li>
+ <li>util: Plug leaks in util_destroy_gen_mipmap.</li>
+ <li>util: __builtin_frame_address() doesn't work on mingw.</li>
+ <li>util: Don't try to use imagehlp on mingw.</li>
+ <li>wgl: Unreference the current framebuffer after the make_current call.</li>
+ <li>WIN32_THREADS -&gt; WIN32</li>
+ <li>mapi: Hack to avoid vgCreateFont being generated as vgCreateFontA.</li>
+ <li>wgl: Fix visual's buffer_mask configuration.</li>
+ <li>mesa: Temporary hack to prevent stack overflow on windows</li>
+ <li>mesa: Bump the number of bits in the register index.</li>
+ <li>llvmpipe: Plug fence leaks.</li>
+</ul></p>
+
+<p>Julien Cristau (1):
+<ul>
+ <li>Makefile: don't include the same files twice in the tarball</li>
+</ul></p>
+
+<p>Keith Whitwell (89):
+<ul>
+ <li>llvmpipe: brackets around macro arg</li>
+ <li>llvmpipe: remove duplicate code</li>
+ <li>llvmpipe: return zero from floor_pot(zero)</li>
+ <li>gallivm: make lp_build_sample_nop public</li>
+ <li>llvmpipe: add LP_PERF flag to disable various aspects of rasterization</li>
+ <li>llvmpipe: add DEBUG_FS to dump variant information</li>
+ <li>llvmpipe: use llvm for attribute interpolant calculation</li>
+ <li>graw: add frag-face shader</li>
+ <li>llvmpipe: fix flatshading in new line code</li>
+ <li>draw: don't apply flatshading to clipped tris with &lt3 verts</li>
+ <li>llvmpipe: handle FACING interpolants in line and point setup</li>
+ <li>llvmpipe: handle up to 8 planes in triangle binner</li>
+ <li>llvmpipe: make debug_fs_variant respect variant-&gt;nr_samplers</li>
+ <li>gallivm: don't apply zero lod_bias</li>
+ <li>llvmpipe: fail gracefully on oom in scene creation</li>
+ <li>llvmpipe: avoid overflow in triangle culling</li>
+ <li>gallivm: special case conversion 4x4f to 1x16ub</li>
+ <li>gallivm: round rather than truncate in new 4x4f-&gt;1x16ub conversion path</li>
+ <li>llvmpipe: clean up setup_tri a little</li>
+ <li>llvmpipe: add rast_tri_4_16 for small lines and points</li>
+ <li>llvmpipe: fix off-by-one in tri_16</li>
+ <li>llvmpipe: defer attribute interpolation until after mask and ztest</li>
+ <li>llvmpipe: use alloca for fs color outputs</li>
+ <li>llvmpipe: store zero into all alloca'd values</li>
+ <li>llvmpipe: dump fragment shader ir and asm when LP_DEBUG=fs</li>
+ <li>gallivm: specialized x8z24 depthtest path</li>
+ <li>gallivm: prefer blendvb for integer arguments</li>
+ <li>gallivm: simpler uint8-&gt;float conversions</li>
+ <li>llvmpipe: try to be sensible about whether to branch after mask updates</li>
+ <li>llvmpipe: clean up shader pre/postamble, try to catch more early-z</li>
+ <li>llvmpipe: simplified SSE2 swz/unswz routines</li>
+ <li>llvmpipe: try to do more of rast_tri_3_16 with intrinsics</li>
+ <li>llvmpipe: add debug helpers for epi32 etc</li>
+ <li>llvmpipe: try to keep plane c values small</li>
+ <li>llvmpipe: fix typo in last commit</li>
+ <li>gallium: move sse intrinsics debug helpers to u_sse.h</li>
+ <li>r600g: add missing file to sconscript</li>
+ <li>gallivm: don't branch on KILLs near end of shader</li>
+ <li>Revert "llvmpipe: try to keep plane c values small"</li>
+ <li>llvmpipe: make sure intrinsics code is guarded with PIPE_ARCH_SSE</li>
+ <li>llvmpipe: don't try to emit non-existent color outputs</li>
+ <li>r600/drm: fix segfaults in winsys create failure path</li>
+ <li>r600g: emit hardware linewidth</li>
+ <li>r600g: handle absolute modifier in shader translator</li>
+ <li>llvmpipe: reintroduce SET_STATE binner command</li>
+ <li>llvmpipe: don't pass frontfacing as a float</li>
+ <li>llvmpipe: slightly shrink the size of a binned triangle</li>
+ <li>llvmpipe: don't store plane.ei value in binned data</li>
+ <li>gallium: move some intrinsics helpers to u_sse.h</li>
+ <li>llvmpipe: do plane calculations with intrinsics</li>
+ <li>llvmpipe: use aligned loads/stores for plane values</li>
+ <li>llvmpipe: fix non-sse build after recent changes</li>
+ <li>llvmpipe: check shader outputs are non-null before using</li>
+ <li>llvmpipe: validate color outputs against key-&gt;nr_cbufs</li>
+ <li>llvmpipe: clean up fields in draw_llvm_variant_key</li>
+ <li>llvmpipe: remove setup fallback path</li>
+ <li>llvmpipe: fail cleanly on malloc failure in lp_setup_alloc_triangle</li>
+ <li>Merge remote branch 'origin/master' into lp-setup-llvm</li>
+ <li>llvmpipe: remove unused file</li>
+ <li>llvmpipe: remove unused arg from jit_setup_tri function</li>
+ <li>Merge branch 'llvm-cliptest-viewport'</li>
+ <li>draw: make sure viewport gets updated in draw llvm shader</li>
+ <li>llvmpipe: turn off draw offset/twoside when we can handle it</li>
+ <li>llvmpipe: avoid generating tri_16 for tris which extend past tile bounds</li>
+ <li>llvmpipe: guard against NULL task-&gt;query pointer</li>
+ <li>st/mesa: unbind constant buffer when not in use</li>
+ <li>r600g: propagate usage flags in texture transfers</li>
+ <li>r600g: propogate resource usage flags to winsys, use to choose bo domains</li>
+ <li>r600g: use a buffer in GTT as intermediate on texture up and downloads</li>
+ <li>r600g: remove unused flink, domain fields from r600_resource</li>
+ <li>r600g: set hardware pixel centers according to gl_rasterization_rules</li>
+ <li>evergreeng: protect against null constant buffers</li>
+ <li>r600g: don't call debug_get_bool_option for tiling more than once</li>
+ <li>evergreeng: respect linewidth state, use integer widths only</li>
+ <li>evergreeng: set hardware pixelcenters according to gl_rasterization_rules</li>
+ <li>r600g: avoid recursion with staged uploads</li>
+ <li>r600g: attempt to turn on DXTn formats</li>
+ <li>r600g: translate ARR instruction</li>
+ <li>r600: fix my pessimism about PIPE_TRANSFER_x flags</li>
+ <li>ws/r600: match bo_busy shared/fence logic in bo_wait</li>
+ <li>r600g: guard experimental s3tc code with R600_ENABLE_S3TC</li>
+ <li>r600g: do not try to use staging resource for depth textures</li>
+ <li>r600g: enforce minimum stride on render target texture images</li>
+ <li>llvmpipe: fix up twoside after recent changes</li>
+ <li>llvmpipe: twoside for specular color also</li>
+ <li>Merge branch 'lp-offset-twoside'</li>
+ <li>llvmpipe: raise dirty flag on transfers to bound constbuf</li>
+ <li>llvmpipe: remove misleading debug string</li>
+ <li>llvmpipe: shortcircuit some calls to set_scene_state</li>
+</ul></p>
+
+<p>Kenneth Graunke (94):
+<ul>
+ <li>glsl: Change from has_builtin_signature to has_user_signature.</li>
+ <li>glsl: Don't print blank (function ...) headers for built-ins.</li>
+ <li>glsl: Properly handle nested structure types.</li>
+ <li>glsl/builtins: Fix equal and notEqual builtins.</li>
+ <li>glsl/builtins: Switch comparison functions to just return an expression.</li>
+ <li>glsl: Add comments to clarify the types of comparison binops.</li>
+ <li>glsl: Fix broken handling of ir_binop_equal and ir_binop_nequal.</li>
+ <li>glsl: "Copyright", not "Constantright"</li>
+ <li>i965: Fix incorrect batchbuffer size in gen6 clip state command.</li>
+ <li>i965: Use logical-not when emitting ir_unop_ceil.</li>
+ <li>glsl: Add front-end support for the "trunc" built-in.</li>
+ <li>glsl: Refresh autogenerated file builtin_function.cpp.</li>
+ <li>i965: Use RNDZ for ir_unop_trunc in the new FS.</li>
+ <li>i965: Correctly emit the RNDZ instruction.</li>
+ <li>i965: Clean up a warning in the old fragment backend.</li>
+ <li>glsl: Add a new ir_unop_round_even opcode for GLSL 1.30's roundEven.</li>
+ <li>glsl: Add front-end support for GLSL 1.30's roundEven built-in.</li>
+ <li>i965: Add support for ir_unop_round_even via the RNDE instruction.</li>
+ <li>glsl: Add support for the 1.30 round() built-in.</li>
+ <li>glsl: Refresh autogenerated file builtin_function.cpp.</li>
+ <li>glsl: Don't return NULL IR for erroneous bit-shift operators.</li>
+ <li>i965: Add missing "break" statement.</li>
+ <li>glsl: Fix copy and paste error in ast_bit_and node creation.</li>
+ <li>glsl: Regenerate parser files.</li>
+ <li>i965: Remove unused variable.</li>
+ <li>glsl: Remove useless ir_shader enumeration value.</li>
+ <li>mesa: Remove FEATURE_ARB_shading_language_120 macro.</li>
+ <li>glcpp: Return NEWLINE token for newlines inside multi-line comments.</li>
+ <li>glcpp: Refresh autogenerated lexer file.</li>
+ <li>glsl: Add support for GLSL 1.30's modf built-in.</li>
+ <li>glsl: Refresh autogenerated file builtin_function.cpp.</li>
+ <li>generate_builtins.py: Output large strings as arrays of characters.</li>
+ <li>Refresh autogenerated file builtin_function.cpp.</li>
+ <li>glsl: Fix constant component count in vector constructor emitting.</li>
+ <li>Fix build on systems where "python" is python 3.</li>
+ <li>i965: Add bit operation support to the fragment shader backend.</li>
+ <li>glsl: Remove unused ARRAY_SIZE macro.</li>
+ <li>glsl/builtins: Rename 'x' to 'y_over_x' in atan(float) implementation.</li>
+ <li>glsl/builtins: Clean up some ugly autogenerated code in atan.</li>
+ <li>Refresh autogenerated file builtin_function.cpp.</li>
+ <li>glsl: Don't print a useless space at the end of an S-Expression list.</li>
+ <li>ir_reader: Return a specific ir_dereference variant.</li>
+ <li>ir_reader: Remove useless error check.</li>
+ <li>ir_reader: Fix some potential NULL pointer dereferences.</li>
+ <li>ir_dead_functions: Actually free dead functions and signatures.</li>
+ <li>glsl: Remove unnecessary "unused variable" warning suppression.</li>
+ <li>glsl: Remove GLSL_TYPE_FUNCTION define.</li>
+ <li>glsl: Convert glsl_type::base_type from #define'd constants to an enum.</li>
+ <li>glsl: Rework reserved word/keyword handling in the lexer.</li>
+ <li>glsl: Add new keywords and reserved words for GLSL 1.30.</li>
+ <li>glsl: Add support for the 'u' and 'U' unsigned integer suffixes.</li>
+ <li>glsl: Refresh autogenerated lexer and parser files.</li>
+ <li>generate_builtins.py: Fix inconsistent use of tabs and spaces warning.</li>
+ <li>glsl: Implement the asinh, acosh, and atanh built-in functions.</li>
+ <li>glsl: Refresh autogenerated file builtin_function.cpp.</li>
+ <li>glsl: Add constant expression handling for asinh, acosh, and atanh.</li>
+ <li>glsl: Remove unused and out of date Makefile.am.</li>
+ <li>glsl: Rename various ir_* files to lower_* and opt_*.</li>
+ <li>glcpp: Define GL_FRAGMENT_PRECISION_HIGH if GLSL version &gt;= 1.30.</li>
+ <li>Refresh autogenerated glcpp parser.</li>
+ <li>glsl: Fix constant expression handling for &lt, &gt;, &lt=, &gt;= on vectors.</li>
+ <li>glsl: Unconditionally define GL_FRAGMENT_PRECISION_HIGH in ES2 shaders.</li>
+ <li>Regenerate glcpp parser.</li>
+ <li>glsl: Reimplement the "cross" built-in without ir_binop_cross.</li>
+ <li>Refresh autogenerated file builtin_function.cpp.</li>
+ <li>glsl: Remove the ir_binop_cross opcode.</li>
+ <li>glsl: Refactor get_num_operands.</li>
+ <li>glsl: Simplify a type check by using type-&gt;is_integer().</li>
+ <li>glsl: Combine many instruction lowering passes into one.</li>
+ <li>mesa: Fix glGet of ES2's GL_MAX_*_VECTORS properties.</li>
+ <li>glsl: Don't inline function prototypes.</li>
+ <li>glsl: Use do_common_optimization in the standalone compiler.</li>
+ <li>glsl: Add a virtual as_discard() method.</li>
+ <li>glsl: Refactor out cloning of function prototypes.</li>
+ <li>glsl: Lazily import built-in function prototypes.</li>
+ <li>glsl: Remove anti-built-in hacks from the print visitor.</li>
+ <li>glsl/linker: Free any IR discarded by optimization passes.</li>
+ <li>glsl: Add an optimization pass to simplify discards.</li>
+ <li>glsl: Add a lowering pass to move discards out of if-statements.</li>
+ <li>glsl: Remove "discard" support from lower_jumps.</li>
+ <li>glsl: Add comments to lower_jumps (from the commit message).</li>
+ <li>ir_print_visitor: Print out constant structure values.</li>
+ <li>glsl: Factor out code which emits a new function into the IR stream.</li>
+ <li>symbol_table: Add support for adding a symbol at top-level/global scope.</li>
+ <li>glsl: Properly add functions during lazy built-in prototype importing.</li>
+ <li>glcpp: Don't emit SPACE tokens in conditional_tokens production.</li>
+ <li>Refresh autogenerated glcpp parser.</li>
+ <li>glsl: Clean up code by adding a new is_break() function.</li>
+ <li>glsl: Consider the "else" branch when looking for loop breaks.</li>
+ <li>Remove OES_compressed_paletted_texture from the ES2 extension list.</li>
+ <li>glsl/builtins: Compute the correct value for smoothstep(vec, vec, vec).</li>
+ <li>glsl: Support if-flattening beyond a given maximum nesting depth.</li>
+ <li>i965: Flatten if-statements beyond depth 16 on pre-gen6.</li>
+ <li>i965: Internally enable GL_NV_blend_square on ES2.</li>
+</ul></p>
+
+<p>Kristian Høgsberg (16):
+<ul>
+ <li>glx: Hold on to drawables if we're just switching to another context</li>
+ <li>intel: Fix GL_ARB_shading_language_120 commit</li>
+ <li>dri2: Make createImageFromName() take a __DRIscreen instead of __DRIcontext</li>
+ <li>glx: Invalidate buffers after binding a drawable</li>
+ <li>dri: Pass the __DRIscreen and the __DRIscreen private back to image lookup</li>
+ <li>glx: Only remove drawables from the hash when we actually delete them</li>
+ <li>gles2: Add GL_EXT_texture_format_BGRA8888 support</li>
+ <li>Get rid of GL/internal/glcore.h</li>
+ <li>gl: Remove unused GLcontextModes fields</li>
+ <li>Rename GLvisual and __GLcontextModes to struct gl_config</li>
+ <li>Drop GLframebuffer typedef and just use struct gl_framebuffer</li>
+ <li>Drop GLcontext typedef and use struct gl_context instead</li>
+ <li>Drop the "neutral" tnl module</li>
+ <li>Only install vtxfmt tables for OpenGL</li>
+ <li>i965: Don't write mrf assignment for pointsize output</li>
+ <li>docs: Fix MESA_drm_image typo</li>
+</ul></p>
+
+<p>Krzysztof Smiechowicz (1):
+<ul>
+ <li>nvfx: Pair os_malloc_aligned() with os_free_aligned().</li>
+</ul></p>
+
+<p>Luca Barbieri (84):
+<ul>
+ <li>auxiliary: fix unintended fallthrough</li>
+ <li>glsl: add pass to lower variable array indexing to conditional assignments</li>
+ <li>auxiliary: fix depth-only and stencil-only clears</li>
+ <li>gallium: avoid the C++ keyword "template" in sw_winsys.h</li>
+ <li>softpipe: make z/s test always pass if no zsbuf, instead of crashing</li>
+ <li>tgsi: add switch/case opcodes to tgsi_opcode_tmp.h</li>
+ <li>softpipe: fix whitespace</li>
+ <li>d3d1x: add new Direct3D 10/11 COM state tracker for Gallium</li>
+ <li>d3d1x: add blob and signature extraction APIs</li>
+ <li>d3d1x: fix compilation with recent Wine versions installed</li>
+ <li>d3d1x: add missing file</li>
+ <li>d3d1x: actually enable and fix blob apis</li>
+ <li>d3d1x: fix build with compilers other than GCC 4.5</li>
+ <li>d3d1x: add template parameters to base class ctor calls for GCC 4.4</li>
+ <li>d3d1x: fix GCC 4.1/4.2 build</li>
+ <li>d3d1x: ignore errors while building docs</li>
+ <li>d3d1x: attempt to fix/workaround bug #30322</li>
+ <li>nvfx: remove gl_PointCoord hack</li>
+ <li>glx: decouple dri2.c and GLX, fixing Gallium EGL and d3d1x build</li>
+ <li>winsys: automatically build sw winsys needed by EGL and d3d1x</li>
+ <li>d3d1x: don't build progs automatically</li>
+ <li>d3d1x: add missing memory barrier</li>
+ <li>d3d1x: link with CXXFLAGS</li>
+ <li>d3d1x: fix cf analysis</li>
+ <li>d3d1x: fix warning</li>
+ <li>d3d1x: fix segfault when hashing</li>
+ <li>d3d1x: destroy native_display on adapter destruction</li>
+ <li>d3d1x: fix GUID declarations</li>
+ <li>d3d1x: redesign the HWND resolver interface</li>
+ <li>d3d1x: fix API name</li>
+ <li>d3d1x: define GUIDs in the normal way</li>
+ <li>d3d1x: add Wine dlls (tri, tex working, but no other testing)</li>
+ <li>d3d1x: properly reference count the backend</li>
+ <li>d3d1x: fix deadlocks on non-recursive mutex</li>
+ <li>d3d1x: bind NULL CSOs before destroying default CSOs on context dtor</li>
+ <li>d3d1x: initialize the mutex</li>
+ <li>d3d1x: autogenerate shader enums and text from def files</li>
+ <li>d3d1x: s/tpf/sm4/g</li>
+ <li>d3d1x: normalize whitespace</li>
+ <li>d3d1x: remove specstrings</li>
+ <li>d3d1x: minifix</li>
+ <li>d3d1x: rename context params</li>
+ <li>d3d11: rename screen params</li>
+ <li>d3d1x: rename params in misc and objects</li>
+ <li>d3d1x: rename parameters in dxgi</li>
+ <li>d3d11: obliterate IDL parameter names</li>
+ <li>d3d1x: remove specstrings.h include</li>
+ <li>d3d1x: flush the pipe context when presenting</li>
+ <li>d3d1x: remove another include specstrings.h</li>
+ <li>d3d1x: flush properly</li>
+ <li>d3d1x: add missing guid.cpp</li>
+ <li>d3d1x: fix build without system EGL/egl.h</li>
+ <li>d3d1x: add autogenerated files as prerequisites, so make builds them</li>
+ <li>d3d1x: obliterate IDL parameter names from d3d10.idl from Wine too</li>
+ <li>d3d1x: add shader dumping</li>
+ <li>d3d1x: add untested support for geometry shader translation</li>
+ <li>d3d1x: don't assert on unsupported resource types</li>
+ <li>d3d1x: fix CheckMultisampleQualityLevels</li>
+ <li>d3d1x: draw to the correct buffer</li>
+ <li>d3d1x: fix linking of dxbc2tgsi</li>
+ <li>nvfx: allow setting NULL constant buffers</li>
+ <li>nvfx: add RGB framebuffer format support in addition to BGR</li>
+ <li>d3d1x: don't crash on drivers not supporting vertex or geometry sampling</li>
+ <li>d3d1x: assert if X visual is not among enumerated visuals</li>
+ <li>d3d1x: stop using GLX in demos, just use the default visual</li>
+ <li>d3d1x: CRLF -&gt; LF in progs</li>
+ <li>mesa: make makedepend an hard requirement</li>
+ <li>gallium: add $(PROGS_DEPS) as dependencies for $(PROGS)</li>
+ <li>d3d1x: fix parallel build</li>
+ <li>d3d1x: add private gitignore file</li>
+ <li>d3d1x: fix progs linking if not all EGL platforms are enabled</li>
+ <li>d3d1x: link progs with CXXFLAGS</li>
+ <li>d3d11: advertise IDXGIDevice1, not just IDXGIDevice</li>
+ <li>d3d11: ignore StructureByteStride</li>
+ <li>d3d1x: link to libdrm for X11 platform too</li>
+ <li>ureg: support centroid interpolation</li>
+ <li>d3d1x: support centroid interpolation</li>
+ <li>d3d1x: properly support specifying MipLevels as 0</li>
+ <li>d3d1x: put proper calling convention in headers, fixes 64-bit builds</li>
+ <li>d3d1x: rework DXGI for occlusion testing and default width/height</li>
+ <li>d3d1x: fix Map</li>
+ <li>d3d11: fix reference counting so devices get freed</li>
+ <li>d3d1x: work around crash in widl</li>
+ <li>glsl: Unroll loops with conditional breaks anywhere (not just the end)</li>
+</ul></p>
+
+<p>Lucas Stach (1):
+<ul>
+ <li>nvfx: fill PIPE_CAP_PRIMITIVE_RESTART and PIPE_CAP_SHADER_STENCIL_EXPORT</li>
+</ul></p>
+
+<p>Marek Olšák (100):
+<ul>
+ <li>r300g: prevent creating multiple winsys BOs for the same handle</li>
+ <li>r300g/swtcl: fix CS overrun</li>
+ <li>st/mesa: fix assertion failure in GetTexImage for cubemaps</li>
+ <li>util: make calling remove_from_list multiple times in a row safe</li>
+ <li>r300g: fixup long-lived BO maps being incorrectly unmapped when flushing</li>
+ <li>r300g: make accessing map_list and buffer_handles thread-safe</li>
+ <li>r300g: fix a copy-paste typo for logging</li>
+ <li>r300g: fix the border color for every format other than PIPE_FORMAT_B8G8R8A8</li>
+ <li>Build r300g by default</li>
+ <li>util: fix util_pack_color for B4G4R4A4</li>
+ <li>r300g: fix macrotiling on R350</li>
+ <li>r300g: code cleanups</li>
+ <li>r300/compiler: fix projective mapping of 2D NPOT textures</li>
+ <li>r300/compiler: do not use copy propagation if SaturateMode is used</li>
+ <li>r300/compiler: fix shadow sampling with swizzled coords</li>
+ <li>r300g: add support for 3D NPOT textures without mipmapping</li>
+ <li>r300g: fix swizzling of texture border color</li>
+ <li>configure.ac: look for libdrm_radeon before building gallium/r300,r600</li>
+ <li>configure.ac: do not build xorg-r300g by default</li>
+ <li>Makefile: ensure Gallium's Makefile.xorg and SConscript.dri are in the tarball</li>
+ <li>r300g: add support for formats beginning with X, like X8R8G8B8</li>
+ <li>r300g: fix conditional rendering in non-wait path</li>
+ <li>r300g: add support for R8G8 colorbuffers</li>
+ <li>r300g: add support for L8A8 colorbuffers</li>
+ <li>update release notes for Gallium</li>
+ <li>r300g: fix microtiling for 16-bits-per-channel formats</li>
+ <li>r300g: do not print get_param errors in non-debug build</li>
+ <li>r300g: say no to PIPE_CAP_STREAM_OUTPUT and PIPE_CAP_PRIMITIVE_RESTART</li>
+ <li>mesa: allow FBO attachments of formats LUMINANCE, LUMINANCE_ALPHA, and INTENSITY</li>
+ <li>r300g: fix texture border for 16-bits-per-channel formats</li>
+ <li>st/mesa: support RGBA16 and use it for RGBA12 as well</li>
+ <li>r300g: add a default channel ordering of texture border for unhandled formats</li>
+ <li>r300g: mention ATI in the renderer string</li>
+ <li>r300g: rename has_hyperz -&gt; can_hyperz</li>
+ <li>r300g: turn magic numbers into names in the hyperz code</li>
+ <li>gallium: add CAPs for indirect addressing and lower it in st/mesa when needed</li>
+ <li>tgsi: fill out CAPs for indirect addressing</li>
+ <li>i915g: fill out CAPs for indirect addressing</li>
+ <li>i965g: fill out CAPs for indirect addressing</li>
+ <li>nv50: fill out CAPs for indirect addressing</li>
+ <li>nvfx: fill out CAPs for indirect addressing</li>
+ <li>r300g: fill out CAPs for indirect addressing</li>
+ <li>r600g: fill out CAPs for indirect addressing</li>
+ <li>svga: fill out CAPs for indirect addressing</li>
+ <li>r300g: fix texture border color for all texture formats</li>
+ <li>r300g: clean up redundancy in draw functions</li>
+ <li>r300g: return shader caps from Draw for SWTCL vertex shaders</li>
+ <li>r300g: remove the hack with OPCODE_RET</li>
+ <li>r300g: print FS inputs uninitialized due to hardware limits to stderr</li>
+ <li>r300g: fix rendering with no vertex elements</li>
+ <li>st/mesa: enable ARB_explicit_attrib_location and EXT_separate_shader_objects</li>
+ <li>docs: add GL 4.1 status</li>
+ <li>gallium: add PIPE_SHADER_CAP_SUBROUTINES</li>
+ <li>st/mesa: set MaxUniformComponents</li>
+ <li>u_blitter: use PIPE_TRANSFER_DISCARD to prevent cpu/gpu stall</li>
+ <li>r300/compiler: fix rc_rewrite_depth_out for it to work with any instruction</li>
+ <li>r300/compiler: remove duplicate function rc_mask_to_swz</li>
+ <li>r300/compiler: add a function for swizzling a mask</li>
+ <li>r300/compiler: move util functions to radeon_compiler_util</li>
+ <li>u_blitter: interpolate clear color using a GENERIC varying instead of COLOR</li>
+ <li>st/mesa: fix texture border color for RED and RG base formats</li>
+ <li>util: rename u_mempool -&gt; u_slab</li>
+ <li>r300g: fix texture border color once again</li>
+ <li>r300/compiler: implement and lower OPCODE_CLAMP</li>
+ <li>ir_to_mesa: Add support for conditional discards.</li>
+ <li>r300g: fix texture swizzling with compressed textures on r400-r500</li>
+ <li>r300g: disable ARB_texture_swizzle if S3TC is enabled on r3xx-only</li>
+ <li>r300g: fix up cubemap texture offset computation</li>
+ <li>r300/compiler: disable the swizzle lowering pass in vertex shaders</li>
+ <li>r300g: fix build</li>
+ <li>r300g: use internal BO handle for add_buffer and write_reloc</li>
+ <li>r300g: implement simple transfer_inline_write for buffers</li>
+ <li>mesa, st/mesa: fix gl_FragCoord with FBOs in Gallium</li>
+ <li>r300g: fix pointer arithmetic with void* in transfer_inline_write</li>
+ <li>r300g: do not remove unused constants if we are not near the limit</li>
+ <li>r300g: add capability bit index_bias_supported</li>
+ <li>r300g: one more r500_index_bias_supported leftover</li>
+ <li>r300g: do not use the index parameter in set_constant_buffer</li>
+ <li>r300g: cleanup winsys</li>
+ <li>r300g: optimize looping over atoms</li>
+ <li>st/mesa: initialize key in st_vp_varient</li>
+ <li>u_blitter: use util_is_format_compatible in the assert</li>
+ <li>r300g: cache packet dwords of 3D_LOAD_VBPNTR in a command buffer if possible</li>
+ <li>r300g: validate buffers only if any of bound buffers is changed</li>
+ <li>r300g: also revalidate the SWTCL vertex buffer after its reallocation</li>
+ <li>r300/compiler: don't terminate regalloc if we surpass max temps limit</li>
+ <li>r300/compiler: add a function to query program stats (alu, tex, temps..)</li>
+ <li>r300/compiler: cleanup rc_run_compiler</li>
+ <li>r300/compiler: do not print pair/tex/presub program stats for vertex shaders</li>
+ <li>r300/compiler: handle DPH and XPD in rc_compute_sources_for_writemask</li>
+ <li>r300/compiler: make lowering passes possibly use up to two less temps</li>
+ <li>r300/compiler: remove at least unused immediates if externals cannot be removed</li>
+ <li>r300/compiler: fix LIT in VS</li>
+ <li>r300/compiler: fix swizzle lowering with a presubtract source operand</li>
+ <li>r300g: fix rendering with a vertex attrib having a zero stride</li>
+ <li>r300g: finally fix the texture corruption on r3xx-r4xx</li>
+ <li>r300g/swtcl: re-enable LLVM</li>
+ <li>r300g: mark vertex arrays as dirty after a buffer_offset change</li>
+ <li>mesa: fix texel store functions for some float formats</li>
+ <li>r300/compiler: disable the rename_regs pass for loops</li>
+</ul></p>
+
+<p>Mario Kleiner (1):
+<ul>
+ <li>mesa/r300classic: Fix dri2Invalidate/radeon_prepare_render for page flipping.</li>
+</ul></p>
+
+<p>Mathias Fröhlich (3):
+<ul>
+ <li>r300g: Avoid returning values in a static array, fixing a potential race</li>
+ <li>r600g: Only compare active vertex elements</li>
+ <li>st/mesa: Set PIPE_TRANSFER_DISCARD for GL_MAP_INVALIDATE_RANGE/BUFFFER_BIT</li>
+</ul></p>
+
+<p>Michal Krol (10):
+<ul>
+ <li>svga: Fix relative addressing translation for pixel shaders.</li>
+ <li>svga: Integer constant register file has a separate namespace.</li>
+ <li>tgsi/exec: Cleanup the remaining arithmetic instructions.</li>
+ <li>tgsi/exec: Get rid of obsolete condition codes.</li>
+ <li>tgsi/build: Reduce interface clutter.</li>
+ <li>graw/gdi: Initial commit.</li>
+ <li>scons: Hook-up graw-gdi target.</li>
+ <li>graw/gdi: Fix window dimensions.</li>
+ <li>os: Open file streams in binary mode.</li>
+ <li>graw: Export graw_save_surface_to_file().</li>
+</ul></p>
+
+<p>Nicolas Kaiser (26):
+<ul>
+ <li>swrast: remove duplicated include</li>
+ <li>egl: remove duplicated include</li>
+ <li>gallium/rtasm: remove duplicated include</li>
+ <li>gallium/util: remove duplicated include</li>
+ <li>gallium/i915: remove duplicated include</li>
+ <li>gallium/llvmpipe: remove duplicated include</li>
+ <li>gallium/softpipe: remove duplicated include</li>
+ <li>gallium/st: remove duplicated includes</li>
+ <li>gallium/winsys: remove duplicated include</li>
+ <li>glx: remove duplicated include</li>
+ <li>dri/common: remove duplicated include</li>
+ <li>dri/i810: remove duplicated include</li>
+ <li>dri/i915: remove duplicated include</li>
+ <li>dri/i965: remove duplicated include</li>
+ <li>dri/intel: remove duplicated include</li>
+ <li>dri/mga: remove duplicated include</li>
+ <li>dri/r128: remove duplicated include</li>
+ <li>dri/r300: remove duplicated include</li>
+ <li>dri/r600: remove duplicated include</li>
+ <li>dri/radeon: remove duplicated includes</li>
+ <li>dri/savage: remove duplicated include</li>
+ <li>main: remove duplicated includes</li>
+ <li>math: remove duplicated includes</li>
+ <li>st: remove duplicated include</li>
+ <li>i965g: use Elements macro instead of manual sizeofs</li>
+ <li>nv50: fix always true conditional in shader optimization</li>
+</ul></p>
+
+<p>Orion Poplawski (1):
+<ul>
+ <li>osmesa: link against libtalloc</li>
+</ul></p>
+
+<p>Owen W. Taylor (1):
+<ul>
+ <li>r600g: Fix location for clip plane registers</li>
+</ul></p>
+
+<p>Peter Clifton (3):
+<ul>
+ <li>intel: Fix emit_linear_blit to use DWORD aligned width blits</li>
+ <li>intel: Add assert check for blitting alignment.</li>
+ <li>meta: Mask Stencil.Clear against stencilMax in _mesa_meta_Clear</li>
+</ul></p>
+
+<p>Robert Hooker (2):
+<ul>
+ <li>intel: Add a new B43 pci id.</li>
+ <li>egl_dri2: Add missing intel chip ids.</li>
+</ul></p>
+
+<p>Roland Scheidegger (16):
+<ul>
+ <li>gallivm: fix copy&amp;paste bug</li>
+ <li>gallivm: don't use URem/UDiv when calculating offsets for blocks</li>
+ <li>gallivm: optimize yuv decoding</li>
+ <li>gallivm: fix trunc/itrunc comment</li>
+ <li>gallivm: faster iround implementation for sse2</li>
+ <li>gallivm: replace sub/floor/ifloor combo with ifloor_fract</li>
+ <li>gallivm: optimize some tex wrap mode calculations a bit</li>
+ <li>gallivm: more linear tex wrap mode calculation simplification</li>
+ <li>gallivm: avoid unnecessary URem in linear wrap repeat case</li>
+ <li>gallivm: optimize soa linear clamp to edge wrap mode a bit</li>
+ <li>gallivm: make use of new iround code in lp_bld_conv.</li>
+ <li>gallivm: fix different handling of [non]normalized coords in linear soa path</li>
+ <li>gallivm: only use lp_build_conv 4x4f -&gt; 1x16 ub fastpath with sse2</li>
+ <li>r200: fix r200 large points</li>
+ <li>mesa: remove unneeded DD_POINT_SIZE and DD_LINE_WIDTH tricaps</li>
+ <li>gallium: support for array textures and related changes</li>
+</ul></p>
+
+<p>Shuang He (1):
+<ul>
+ <li>mesa: allow GLfixed arrays for OpenGL ES 2.0</li>
+</ul></p>
+
+<p>Stephan Schmid (1):
+<ul>
+ <li>r600g: fix relative addressing when splitting constant accesses</li>
+</ul></p>
+
+<p>Thomas Hellstrom (21):
+<ul>
+ <li>st/xorg: Don't try to use option values before processing options</li>
+ <li>xorg/vmwgfx: Make vmwarectrl work also on 64-bit servers</li>
+ <li>st/xorg: Add a customizer option to get rid of annoying cursor update flicker</li>
+ <li>xorg/vmwgfx: Don't hide HW cursors when updating them</li>
+ <li>st/xorg: Don't try to remove invalid fbs</li>
+ <li>st/xorg: Fix typo</li>
+ <li>st/xorg, xorg/vmwgfx: Be a bit more frendly towards cross-compiling environments</li>
+ <li>st/xorg: Fix compilation errors for Xservers compiled without Composite</li>
+ <li>st/xorg: Don't use deprecated x*alloc / xfree functions</li>
+ <li>xorg/vmwgfx: Don't use deprecated x*alloc / xfree functions</li>
+ <li>st/xorg: Fix compilation for Xservers &gt;= 1.10</li>
+ <li>mesa: Make sure we have the talloc cflags when using the talloc headers</li>
+ <li>egl: Add an include for size_t</li>
+ <li>mesa: Add talloc includes for gles</li>
+ <li>st/egl: Fix build for include files in nonstandard places</li>
+ <li>svga/drm: Optionally resolve calls to powf during link-time</li>
+ <li>gallium/targets: Trivial crosscompiling fix</li>
+ <li>st/xorg: Add a function to flush pending rendering and damage</li>
+ <li>gallium/targets/xorg-vmwgfx: Xv fixes</li>
+ <li>xorg/vmwgfx: Flush even if we don't autopaint the color key</li>
+ <li>xorg/vmwgfx: Don't clip video to viewport</li>
+</ul></p>
+
+<p>Tilman Sauerbeck (35):
+<ul>
+ <li>r600g: Fixed a bo leak in r600_blit_state_ps_shader().</li>
+ <li>r600g: Use clamped math for RCP and RSQ.</li>
+ <li>r600g: Formatting fixes.</li>
+ <li>r600g: Added DB_SHADER_CONTROL defines.</li>
+ <li>r600g: Only set PA_SC_EDGERULE on rv770 and greater.</li>
+ <li>r600g: Enable PIPE_SHADER_CAP_TGSI_CONT_SUPPORTED.</li>
+ <li>r600g: Fixed the shift in S_02880C_KILL_ENABLE.</li>
+ <li>glsl2: Empty functions can be inlined.</li>
+ <li>glsl2: Fixed cloning of ir_call error instructions.</li>
+ <li>r600g: Added support for TGSI_SEMANTIC_FACE.</li>
+ <li>gallium/docs: Fixed a typo in the SCS opcode description.</li>
+ <li>r600g: Honour destination operand's writemask in the SCS implementation.</li>
+ <li>r600g: Implemented the Z and W component write for the SCS opcode.</li>
+ <li>python/tests: Fixed tri.py for API and TGSI syntax changes.</li>
+ <li>r600g: Removed debug code.</li>
+ <li>gallium/docs: The RET opcode may appear anywhere in a subroutine.</li>
+ <li>r600g: Destroy the blitter.</li>
+ <li>r600g: Fixed two texture surface leaks in r600_blit_uncompress_depth().</li>
+ <li>r600g: Cleaned up index buffer reference handling in the draw module.</li>
+ <li>r600g: Fixed r600_vertex_element leak.</li>
+ <li>r600g: Added r600_pipe_shader_destroy().</li>
+ <li>r600g: Also clear bc data when we're destroying a shader.</li>
+ <li>r600g: In radeon_bo(), call LIST_INITHEAD early.</li>
+ <li>r600g: Destroy the blitter.</li>
+ <li>r600g: Removed unused 'ptr' argument from radeon_bo().</li>
+ <li>r600g: Made radeon_bo_pb_map_internal() actually call radeon_bo_map().</li>
+ <li>r600g: Fixed unmap condition in radeon_bo_pb_destroy().</li>
+ <li>r600g: Made radeon_bo::map_count signed.</li>
+ <li>r600g: We don't support PIPE_CAP_PRIMITIVE_RESTART.</li>
+ <li>r600g: Delete custom_dsa_flush on shutdown.</li>
+ <li>r600g: Fixed two memory leaks in winsys.</li>
+ <li>r600g: Destroy the winsys in r600_destroy_screen().</li>
+ <li>st/mesa: Reset the index buffer before destroying the pipe context.</li>
+ <li>st/mesa: Reset the constant buffers before destroying the pipe context.</li>
+ <li>r600g: Removed duplicated call to tgsi_split_literal_constant().</li>
+</ul></p>
+
+<p>Timo Wiren (1):
+<ul>
+ <li>Fix typos in comments and debug output strings.</li>
+</ul></p>
+
+<p>Tom Fogal (3):
+<ul>
+ <li>Implement x86_64 atomics for compilers w/o intrinsics.</li>
+ <li>Prefer intrinsics to handrolled atomic ops.</li>
+ <li>Revert "Prefer intrinsics to handrolled atomic ops."</li>
+</ul></p>
+
+<p>Tom Stellard (32):
+<ul>
+ <li>r300/compiler: Refactor the pair instruction data structures</li>
+ <li>r300g: Always try to build libr300compiler.a</li>
+ <li>r300/compiler: Fix two mistakes in the presubtract optimization pass.</li>
+ <li>r300/compiler: Add more helper functions for iterating through sources</li>
+ <li>r300/compiler: Print immediate values after "dead constants" pass</li>
+ <li>r300/compiler: radeon_remove_constants.c: fix indentation</li>
+ <li>r300/compiler: Use rc_for_all_reads_src() in "dead constants" pass</li>
+ <li>r300/compiler: Fix segfault in error path</li>
+ <li>r300/compiler: Don't use rc_error() unless the error is unrecoverable</li>
+ <li>r300/compiler: Don't merge instructions that write output regs and ALU result</li>
+ <li>r300/compiler: Create a helper function for merging presubtract sources</li>
+ <li>r300/compiler: Fix incorrect assumption</li>
+ <li>r300/compiler: Clear empty registers after constant folding</li>
+ <li>r300/compiler: Add a new function for more efficient dataflow analysis</li>
+ <li>r300g: Add new debug option for logging vertex/fragment program stats</li>
+ <li>r300/compiler: Use rc_get_readers_normal() for presubtract optimizations</li>
+ <li>r300/compiler: Don't clobber presubtract sources during optimizations</li>
+ <li>r300/compiler: Don't track readers into an IF block.</li>
+ <li>r300/compiler: Make sure presubtract sources use supported swizzles</li>
+ <li>r300/compiler: Fix register allocator's handling of loops</li>
+ <li>r300/compiler: Fix instruction scheduling within IF blocks</li>
+ <li>r300/compiler: Use zero as the register index for unused sources</li>
+ <li>r300/compiler: Ignore alpha dest register when replicating the result</li>
+ <li>r300/compiler: Add rc_get_readers()</li>
+ <li>r300/compiler: Handle BREAK and CONTINUE in rc_get_readers()</li>
+ <li>r300/compiler: Track readers through branches in rc_get_readers()</li>
+ <li>r300/compiler: Convert RGB to alpha in the scheduler</li>
+ <li>r300/compiler: Use presubtract operations as much as possible</li>
+ <li>r300/compiler: Enable rename_reg pass for r500 cards</li>
+ <li>r300/compiler: Add a more efficient version of rc_find_free_temporary()</li>
+ <li>r300/compiler: Don't allow presubtract sources to be remapped twice</li>
+ <li>r300/compiler: Fix black terrain in Civ4</li>
+</ul></p>
+
+<p>Victor Tseng (1):
+<ul>
+ <li>egl/i965: include inline_wrapper_sw_helper.h</li>
+</ul></p>
+
+<p>Viktor Novotný (6):
+<ul>
+ <li>dri/nouveau: Import headers from rules-ng-ng</li>
+ <li>dri/nouveau: nv04: Use rules-ng-ng headers</li>
+ <li>dri/nouveau: nv10: Use rules-ng-ng headers</li>
+ <li>dri/nouveau nv20: Use rules-ng-ng headers</li>
+ <li>dri/nouveau: Remove nouveau_class.h, finishing switch to rules-ng-ng headers</li>
+ <li>dri/nouveau: Clean up magic numbers in get_rt_format</li>
+</ul></p>
+
+<p>Vinson Lee (214):
+<ul>
+ <li>llvmpipe: Remove unnecessary header.</li>
+ <li>r600g: Remove unnecessary headers.</li>
+ <li>mesa: Include missing header in program.h.</li>
+ <li>glsl: Fix 'format not a string literal and no format arguments' warning.</li>
+ <li>r600g: Silence uninitialized variable warning.</li>
+ <li>r600g: Silence uninitialized variable warning.</li>
+ <li>nvfx: Silence uninitialized variable warnings.</li>
+ <li>r600g: Silence uninitialized variable warning.</li>
+ <li>r600g: Silence uninitialized variable warning.</li>
+ <li>r600g: Silence uninitialized variable warning.</li>
+ <li>r600g: Silence unused variable warning.</li>
+ <li>nv50: Update files in SConscript to match Makefile.</li>
+ <li>nv50: Remove unnecessary headers.</li>
+ <li>nv50: Silence uninitialized variable warning.</li>
+ <li>nv50: Silence uninitialized variable warning.</li>
+ <li>nv50: Silence uninitialized variable warning.</li>
+ <li>gallivm: Remove unnecessary headers.</li>
+ <li>draw: Remove unnecessary header.</li>
+ <li>nv50: Silence uninitialized variable warnings.</li>
+ <li>nv50: Fix 'control reaches end of non-void function' warning.</li>
+ <li>mesa/st: Silence uninitialized variable warning.</li>
+ <li>gallivm: Remove unnecessary header.</li>
+ <li>r600g: Remove unnecessary header.</li>
+ <li>r600g: Remove unnecessary headers.</li>
+ <li>r600g: Fix implicit declaration warning.</li>
+ <li>r600g: Fix memory leak on error path.</li>
+ <li>r600g: Silence uninitialized variable warning.</li>
+ <li>r600g: Silence unused variable warnings.</li>
+ <li>mesa: bump version to 7.10</li>
+ <li>ir_to_mesa: Remove unused member array_indexed from struct statevar_element.</li>
+ <li>mesa: Silence "'valid_texture_object' defined but not used" warning.</li>
+ <li>x86: Silence unused variable warning on Mac OS X.</li>
+ <li>glsl: Fix 'control reaches end of non-void function' warning.</li>
+ <li>nvfx: Remove const qualifer from nvfx_vertprog_translate.</li>
+ <li>nvfx: Silence uninitialized variable warnings.</li>
+ <li>r600g: Remove unused variable.</li>
+ <li>nv50: Silence missing initializer warning.</li>
+ <li>nv50: Remove dead initialization.</li>
+ <li>nv50: Remove dead initialization.</li>
+ <li>tgsi: Remove duplicate case value.</li>
+ <li>glut: Define markWindowHidden for non-Windows only.</li>
+ <li>glut: Define eventParser for non-Windows only.</li>
+ <li>r300g: Silence uninitialized variable warning.</li>
+ <li>intel: Fix implicit declaration of function '_mesa_meta_Bitmap' warning.</li>
+ <li>mesa: Remove unnecessary headers.</li>
+ <li>r600g: Remove unnecessary header.</li>
+ <li>unichrome: Remove unnecessary header.</li>
+ <li>intel: Remove unnecessary headers.</li>
+ <li>r600g: Remove unused variable.</li>
+ <li>r600g: Disable unused variables.</li>
+ <li>r600g: Remove unused variable.</li>
+ <li>r600g: Silence 'control reaches end of non-void function' warning.</li>
+ <li>r600g: Remove unused variable.</li>
+ <li>r600g: Remove unused variable.</li>
+ <li>r600g: Disable unused variables.</li>
+ <li>intel: Remove unnecessary header.</li>
+ <li>st/dri: Remove unnecessary header.</li>
+ <li>r600g: Remove unused variable.</li>
+ <li>r300g: Remove unused variable.</li>
+ <li>r600g: Don't return a value in function returning void.</li>
+ <li>r600g: Remove unused variables.</li>
+ <li>r600g: Include p_compiler.h instead of malloc.h.</li>
+ <li>r600g: Silence uninitialized variable warnings.</li>
+ <li>scons: Add MinGW-w64 prefixes for MinGW build.</li>
+ <li>dri: Add GET_PROGRAM_NAME definition for Mac OS X.</li>
+ <li>scons: Add program/sampler.cpp to SCons build.</li>
+ <li>mesa: Fix printf format warning.</li>
+ <li>mesa: Fix printf format warning.</li>
+ <li>mesa: Fix printf format warning.</li>
+ <li>r300/compiler: Move declaration before code.</li>
+ <li>r300/compiler: Move declaration before code.</li>
+ <li>r300/compiler: Move declaration before code.</li>
+ <li>r300/compiler: Move declaration before code.</li>
+ <li>r600g: Update SConscript.</li>
+ <li>r300/compiler: Move declaration before code.</li>
+ <li>r600g: Update SConscript.</li>
+ <li>r300/compiler: Move declaration before code.</li>
+ <li>r600g: Update SConscript.</li>
+ <li>r300/compiler: Move declaration before code.</li>
+ <li>r600g: Fix SCons build.</li>
+ <li>r300/compiler: Move declaration before code.</li>
+ <li>r300/compiler: Move declaration before code.</li>
+ <li>r300/compiler: Move declaration before code.</li>
+ <li>r300/compiler: Remove declaration before code.</li>
+ <li>r300/compiler: Move declaration before code.</li>
+ <li>r300/compiler: Move declaration before code.</li>
+ <li>r300/compiler: Move declaration before code.</li>
+ <li>r300/compiler: Move declaration before code.</li>
+ <li>glsl: Remove unnecessary header.</li>
+ <li>savage: Remove unnecessary header.</li>
+ <li>r600g: Remove unused variable.</li>
+ <li>r600g: Remove unnecessary headers.</li>
+ <li>r600g: Fix SCons build.</li>
+ <li>r600g: Remove unnecessary header.</li>
+ <li>gallivm: Remove unnecessary header.</li>
+ <li>r600g: Silence uninitialized variable warning.</li>
+ <li>r600g: Silence uninitialized variable warning.</li>
+ <li>r600g: Silence uninitialized variable warning.</li>
+ <li>i915: Silence unused variable warning in non-debug builds.</li>
+ <li>i915: Silence unused variable warning in non-debug builds.</li>
+ <li>i965: Silence unused variable warning on non-debug builds.</li>
+ <li>i965: Silence unused variable warning on non-debug builds.</li>
+ <li>i965: Initialize member variables.</li>
+ <li>r300: Silence uninitialized variable warning.</li>
+ <li>tdfx: Silence unused variable warning on non-debug builds.</li>
+ <li>gallivm: Remove unnecessary header.</li>
+ <li>glsl: Initialize variable in ir_derefence_array::constant_expression_value</li>
+ <li>mesa: Add missing header to shaderobj.h.</li>
+ <li>llvmpipe: Return non-zero exit code for lp_test_round failures.</li>
+ <li>r300/compiler: Remove unused variable.</li>
+ <li>st/xorg: Fix memory leak on error path.</li>
+ <li>llvmpipe: Initialize state variable in debug_bin function.</li>
+ <li>llvmpipe: Initialize variable.</li>
+ <li>draw: Move loop variable declaration outside for loop.</li>
+ <li>r600g: Ensure r600_src is initialized in tgsi_exp function.</li>
+ <li>glsl: Add assert for unhandled ir_shader case.</li>
+ <li>swrast: Print out format on unexpected failure in _swrast_DrawPixels.</li>
+ <li>llvmpipe: Remove unnecessary header.</li>
+ <li>draw: Remove unnecessary header.</li>
+ <li>gallivm: Silence uninitialized variable warnings.</li>
+ <li>gallivm: Silence uninitialized variable warnings.</li>
+ <li>gallivm: Silence uninitialized variable warning.</li>
+ <li>r300g: Silence uninitialized variable warning.</li>
+ <li>mesa: Remove unnecessary headers.</li>
+ <li>r600g: Silence uninitialized variable warnings.</li>
+ <li>st/mesa: Remove unnecessary header.</li>
+ <li>mesa: Remove unnecessary header.</li>
+ <li>egl: Remove unnecessary headers.</li>
+ <li>swrast: Print out format on unexpected failure in _swrast_ReadPixels.</li>
+ <li>st/mesa: Silence uninitialized variable warning.</li>
+ <li>savage: Remove unnecessary header.</li>
+ <li>st/vega: Remove unnecessary headers.</li>
+ <li>dri/nouveau: Silence uninitialized variable warning.</li>
+ <li>r300/compiler: Move declaration before code.</li>
+ <li>r300/compiler: Move declaration before code.</li>
+ <li>i965: Silence uninitialized variable warning.</li>
+ <li>i965: Silence uninitialized variable warning.</li>
+ <li>mesa: Clean up header file inclusion in accum.h.</li>
+ <li>mesa: Clean up header file inclusion in version.h.</li>
+ <li>mesa: Clean up header file inclusion in api_loopback.h.</li>
+ <li>mesa: Clean up header file inclusion in api_validate.h.</li>
+ <li>mesa: Include mfeatures.h in api_loopback for FEATURE_beginend.</li>
+ <li>mesa: Include mfeatures.h in api_validate.c for FEATURE_* symbols.</li>
+ <li>mesa: Clean up header file inclusion in arrayobj.h.</li>
+ <li>mesa: Clean up header file inclusion in atifragshader.h.</li>
+ <li>mesa: Clean up header file inclusion in attrib.h.</li>
+ <li>mesa: Clean up header file inclusion in blend.h.</li>
+ <li>mesa: Clean up header file inclusion in buffers.h.</li>
+ <li>mesa: Clean up header file inclusion in colortab.h.</li>
+ <li>mesa: Clean up header file inclusion in convolve.h.</li>
+ <li>mesa: Clean up header file inclusion in debug.h.</li>
+ <li>mesa: Clean up header file inclusion in depth.h.</li>
+ <li>mesa: Clean up header file inclusion in depthstencil.h.</li>
+ <li>mesa: Clean up header file inclusion in drawpix.h.</li>
+ <li>mesa: Clean up header file inclusion in drawtex.h.</li>
+ <li>mesa: Clean up header file inclusion in enable.h.</li>
+ <li>mesa: Clean up header file inclusion in extensions.h.</li>
+ <li>graw: Add struct pipe_surface forward declaration.</li>
+ <li>mesa: Clean up header file inclusion in fbobject.h.</li>
+ <li>mesa: Clean up header file inclusion in ffvertex_prog.h.</li>
+ <li>mesa: Clean up header file inclusion in fog.h.</li>
+ <li>mesa: Clean up header file inclusion in framebuffer.h.</li>
+ <li>mesa: Clean up header file inclusion in hint.h.</li>
+ <li>mesa: Clean up header file inclusion in histogram.h.</li>
+ <li>mesa: Clean up header file inclusion in image.h.</li>
+ <li>mesa: Add missing header and forward declarations in dd.h.</li>
+ <li>mesa: Clean up header file inclusion in light.h.</li>
+ <li>mesa: Clean up header file inclusion in lines.h.</li>
+ <li>mesa: Clean up header file inclusion in matrix.h.</li>
+ <li>mesa: Clean up header file inclusion in multisample.h.</li>
+ <li>mesa: Clean up header file inclusion in nvprogram.h.</li>
+ <li>winsys/xlib: Add cygwin to SConscript.</li>
+ <li>mesa: Clean up header file inclusion in pixel.h.</li>
+ <li>mesa: Clean up header file inclusion in pixelstore.h.</li>
+ <li>mesa: Fix printf format warnings.</li>
+ <li>mesa: Clean up header file inclusion in points.h.</li>
+ <li>i965: Silence uninitialized variable warning.</li>
+ <li>glsl: Add ir_constant_expression.cpp to SConscript.</li>
+ <li>mesa: Add definitions for inverse hyperbolic function on MSVC.</li>
+ <li>glsl: Fix 'control reaches end of non-void function' warning.</li>
+ <li>glsl: Add lower_vector.cpp to SConscript.</li>
+ <li>glsl: Fix type of label 'default' in switch statement.</li>
+ <li>st/mesa: Remove unnecessary headers.</li>
+ <li>swrast: Remove unnecessary header.</li>
+ <li>r600: Remove unnecesary header.</li>
+ <li>intel: Remove unnecessary header.</li>
+ <li>mesa: Clean up header file inclusion in polygon.h.</li>
+ <li>mesa: Clean up header file inclusion in rastpos.h.</li>
+ <li>mesa: Clean up header file inclusion in readpix.h.</li>
+ <li>mesa: Clean up header file inclusion in renderbuffer.h.</li>
+ <li>mesa: Clean up header file inclusion in scissor.h.</li>
+ <li>mesa: Clean up header file inclusion in shaderapi.h.</li>
+ <li>mesa: Clean up header file inclusion in shared.h.</li>
+ <li>mesa: Clean up header file inclusion in stencil.h.</li>
+ <li>r600: Remove unnecessary header.</li>
+ <li>llvmpipe: Remove unnecessary headers.</li>
+ <li>mesa: Clean up header file inclusion in syncobj.h.</li>
+ <li>r300/compiler: Move declaration before code.</li>
+ <li>r300/compiler: Move declaration before code.</li>
+ <li>mesa: Clean up header file inclusion in texcompress.h.</li>
+ <li>st/vega: Silence uninitialized variable warning.</li>
+ <li>mesa: Clean up header file inclusion in texcompress_s3tc.h.</li>
+ <li>mesa: Clean up header file inclusion in texenvprogram.h.</li>
+ <li>mesa: Clean up header file inclusion in texformat.h.</li>
+ <li>mesa: Clean up header file inclusion in texgetimage.h.</li>
+ <li>mesa: Clean up header file inclusion in texobj.h.</li>
+ <li>gallium/noop: Add prototype for noop_init_state_functions.</li>
+ <li>mesa: Clean up header file inclusion in texrender.h.</li>
+ <li>mesa: Clean up header file inclusion in transformfeedback.h.</li>
+ <li>mesa: Clean up header file inclusion in varray.h.</li>
+ <li>mesa: Clean up header file inclusion in viewport.h.</li>
+ <li>r200: Silence uninitialized variable warning.</li>
+ <li>r600g: Fix SCons build.</li>
+ <li>i965: Silence uninitialized variable warning.</li>
+</ul></p>
+
+<p>Xavier Chantry (8):
+<ul>
+ <li>nv50: fix size of outputs_written array</li>
+ <li>nv50: apply layout_mask to tile_flags</li>
+ <li>nvfx: only expose one rt on nv30</li>
+ <li>nvfx: fb-&gt;nr_cbufs &lt= 1 on nv30</li>
+ <li>nvfx: reset nvfx-&gt;hw_zeta</li>
+ <li>nvfx: fixes after array textures merge</li>
+ <li>init ps-&gt;context with util_surfaces_get and do_get</li>
+ <li>gallium/trace: check bind_vertex_sampler_states and set_vertex_sampler_views</li>
+</ul></p>
+
+<p>Xiang, Haihao (10):
+<ul>
+ <li>mesa: fix regression from b4bb6680200b5a898583392f4c831c02f41e63f7</li>
+ <li>i965: add support for polygon mode on Sandybridge.</li>
+ <li>i965: fix for flat shading on Sandybridge</li>
+ <li>i965: set minimum/maximum Point Width on Sandybridge</li>
+ <li>meta: allow nested meta operations</li>
+ <li>i965: support for two-sided lighting on Sandybridge</li>
+ <li>i965: fix register region description</li>
+ <li>i965: use align1 access mode for instructions with execSize=1 in VS</li>
+ <li>i965: don't spawn GS thread for LINELOOP on Sandybridge</li>
+ <li>i965: use BLT to clear buffer if possible on Sandybridge</li>
+</ul></p>
+
+<p>Zack Rusin (8):
+<ul>
+ <li>rbug: fix rbug when contexts are being destroyed</li>
+ <li>llvmpipe: fix rasterization of vertical lines on pixel boundaries</li>
+ <li>scons: build the xorg state trackers only when env includes drm</li>
+ <li>gallivm: implement indirect addressing of the output registers</li>
+ <li>gallivm: implement indirect addressing over inputs</li>
+ <li>gallivm: fix storing of the addr register</li>
+ <li>scons: add alias for identity</li>
+ <li>gallium/util: add states relevant to geometry shaders</li>
+</ul></p>
+
+<p>Zhenyu Wang (40):
+<ul>
+ <li>i965: disasm quarter and write enable instruction control on sandybridge</li>
+ <li>i965: new state dump for sandybridge</li>
+ <li>i965: enable accumulator update in PS kernel too on sandybridge</li>
+ <li>i965: Fix color interpolation on sandybridge</li>
+ <li>i965: force zero in clipper to ignore RTAIndex on sandybridge</li>
+ <li>i965: fix point size setting in header on sandybridge</li>
+ <li>i965: ff sync message change for sandybridge</li>
+ <li>i965: ignore quads for GS kernel on sandybridge</li>
+ <li>i965: add sandybridge viewport state bo into validation list</li>
+ <li>i965: VS use SPF mode on sandybridge for now</li>
+ <li>i965: fix jump count on sandybridge</li>
+ <li>i965: Fix sampler on sandybridge</li>
+ <li>i965: fix const register count for sandybridge</li>
+ <li>i965: Add all device ids for sandybridge</li>
+ <li>i965: sandybridge pipe control workaround before write cache flush</li>
+ <li>i965: only allow SIMD8 kernel on sandybridge now</li>
+ <li>i965: don't do calculation for delta_xy on sandybridge</li>
+ <li>i965: fix pixel w interpolation on sandybridge</li>
+ <li>i965: enable polygon offset on sandybridge</li>
+ <li>i965: fix scissor state on sandybridge</li>
+ <li>i965: fix point sprite on sandybridge</li>
+ <li>i965: fix occlusion query on sandybridge</li>
+ <li>i965: fallback bitmap operation on sandybridge</li>
+ <li>i965: Always set tiling for depth buffer on sandybridge</li>
+ <li>i965: fallback lineloop on sandybridge for now</li>
+ <li>Revert "i965: Always set tiling for depth buffer on sandybridge"</li>
+ <li>i965: always set tiling for fbo depth buffer on sandybridge</li>
+ <li>i965: Fix GS hang on Sandybridge</li>
+ <li>Revert "i965: fallback lineloop on sandybridge for now"</li>
+ <li>i965: refresh wm push constant also for BRW_NEW_FRAMENT_PROGRAM on gen6</li>
+ <li>i965: fix dest type of 'endif' on sandybridge</li>
+ <li>Revert "i965: VS use SPF mode on sandybridge for now"</li>
+ <li>i965: also using align1 mode for math2 on sandybridge</li>
+ <li>i965: Fix GS state uploading on Sandybridge</li>
+ <li>i965: upload WM state for _NEW_POLYGON on sandybridge</li>
+ <li>i965: Use MI_FLUSH_DW for blt ring flush on sandybridge</li>
+ <li>i965: explicit tell header present for fb write on sandybridge</li>
+ <li>i965: Fix occlusion query on sandybridge</li>
+ <li>i965: Use last vertex convention for quad provoking vertex on sandybridge</li>
+ <li>i965: Fix provoking vertex select in clip state for sandybridge</li>
+</ul></p>
+
+<p>Zou Nan hai (1):
+<ul>
+ <li>i965: skip too small size mipmap</li>
+</ul></p>
+
+<p>delphi (2):
+<ul>
+ <li>draw: added userclip planes and updated variant_key</li>
+ <li>draw: some changes to allow for runtime changes to userclip planes</li>
+</ul></p>
+
+<p>nobled (3):
+<ul>
+ <li>r300g: Abort if atom allocations fail</li>
+ <li>r300g: Abort if draw_create() fails</li>
+ <li>r300g: Drop unnecessary cast</li>
+</ul></p>
+
+<p>pontus lidman (1):
+<ul>
+ <li>mesa: check for posix_memalign() errors</li>
+</ul></p>
+
+<p>richard (2):
+<ul>
+ <li>evergreen : fix z format setting, enable stencil.</li>
+ <li>r600c : inline vertex format is not updated in an app, switch to use vfetch constants. For the 7.9 and 7.10 branches as well.</li>
+</ul></p>
</body>
</html>
diff --git a/docs/relnotes-7.11.html b/docs/relnotes-7.11.html
new file mode 100644
index 00000000000..277339bc4ce
--- /dev/null
+++ b/docs/relnotes-7.11.html
@@ -0,0 +1,62 @@
+<HTML>
+
+<head>
+<TITLE>Mesa Release Notes</TITLE>
+<link rel="stylesheet" type="text/css" href="mesa.css">
+<meta http-equiv="content-type" content="text/html; charset=utf-8" />
+</head>
+
+<BODY>
+
+<body bgcolor="#eeeeee">
+
+<H1>Mesa 7.11 Release Notes / (release date TBD)</H1>
+
+<p>
+Mesa 7.11 is a new development release.
+People who are concerned with stability and reliability should stick
+with a previous release or wait for Mesa 7.11.1.
+</p>
+<p>
+Mesa 7.11 implements the OpenGL 2.1 API, but the version reported by
+glGetString(GL_VERSION) depends on the particular driver being used.
+Some drivers don't support all the features required in OpenGL 2.1.
+</p>
+<p>
+See the <a href="install.html">Compiling/Installing page</a> for prerequisites
+for DRI hardware acceleration.
+</p>
+
+
+<h2>MD5 checksums</h2>
+<pre>
+tbd
+</pre>
+
+
+<h2>New features</h2>
+<ul>
+<li>GL_ARB_draw_instanced extension (gallium drivers, swrast)
+<li>GL_ARB_instanced_arrays extension (gallium drivers)
+<li>GL_ARB_texture_compression_rgtc (gallium r600, swrast)
+<li>GL_ARB_draw_buffers_blend (gallium)
+<li>GL_EXT_texture_sRGB_decode (gallium drivers, swrast, i965)
+</ul>
+
+
+<h2>Bug fixes</h2>
+<ul>
+</ul>
+
+
+<h2>Changes</h2>
+<ul>
+<li>The Windows MSVC project files have been removed. They haven't been maintained
+in quite a while. Building with SCons is an alterantive.
+<li>Removed GL_SGI_texture_color_table support from swrast driver - the only
+driver that implemented it.
+</ul>
+
+
+</body>
+</html>
diff --git a/docs/relnotes-7.9.1.html b/docs/relnotes-7.9.1.html
new file mode 100644
index 00000000000..bef4ef1dd9a
--- /dev/null
+++ b/docs/relnotes-7.9.1.html
@@ -0,0 +1,406 @@
+<HTML>
+
+<head>
+<TITLE>Mesa Release Notes</TITLE>
+<link rel="stylesheet" type="text/css" href="mesa.css">
+<meta http-equiv="content-type" content="text/html; charset=utf-8" />
+</head>
+
+<BODY>
+
+<body bgcolor="#eeeeee">
+
+<H1>Mesa 7.9.1 Release Notes / January 7, 2011</H1>
+
+<p>
+Mesa 7.9.1 is a bug fix release which fixes bugs found since the 7.9 release.
+</p>
+<p>
+Mesa 7.9.1 implements the OpenGL 2.1 API, but the version reported by
+glGetString(GL_VERSION) depends on the particular driver being used.
+Some drivers don't support all the features required in OpenGL 2.1.
+</p>
+<p>
+See the <a href="install.html">Compiling/Installing page</a> for prerequisites
+for DRI hardware acceleration.
+</p>
+
+
+<h2>MD5 checksums</h2>
+<pre>
+78422843ea875ad4eac35b9b8584032b MesaLib-7.9.1.tar.gz
+07dc6cfb5928840b8b9df5bd1b3ae434 MesaLib-7.9.1.tar.bz2
+c8eaea5b3c3d6dee784bd8c2db91c80f MesaLib-7.9.1.zip
+ee9ecae4ca56fbb2d14dc15e3a0a7640 MesaGLUT-7.9.1.tar.gz
+41fc477d524e7dc5c84da8ef22422bea MesaGLUT-7.9.1.tar.bz2
+90b287229afdf19317aa989d19462e7a MesaGLUT-7.9.1.zip
+</pre>
+
+
+<h2>New features</h2>
+<p>None.</p>
+
+<h2>Bug fixes</h2>
+<p>This list is likely incomplete.</p>
+<ul>
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=28800">Bug 28800</a> - [r300c, r300g] Texture corruption with World of Warcraft</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=29420">Bug 29420</a> - Amnesia / HPL2 RendererFeatTest - not rendering correctly</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=29946">Bug 29946</a> - [swrast] piglit valgrind glsl-array-bounds-04 fails</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=30261">Bug 30261</a> - [GLSL 1.20] allowing inconsistent invariant declaration between two vertex shaders</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=30632">Bug 30632</a> - [softpipe] state_tracker/st_manager.c:489: st_context_notify_invalid_framebuffer: Assertion `stfb &amp;&amp; stfb-&gt;iface == stfbi' failed.</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=30694">Bug 30694</a> - wincopy will crash on Gallium drivers when going to front buffer</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=30787">Bug 30787</a> - Invalid asm shader does not generate draw-time error when used with GLSL shader</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=30993">Bug 30993</a> - getFramebufferAttachmentParameteriv wrongly generates error</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=31101">Bug 31101</a> - [glsl2] abort() in ir_validate::visit_enter(ir_assignment *ir)</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=31193">Bug 31193</a> - [regression] aa43176e break water reflections</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=31194">Bug 31194</a> - The mesa meta save/restore code doesn't ref the current GLSL program</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=31371">Bug 31371</a> - glslparsertest: ir.cpp:358: ir_constant::ir_constant(const glsl_type*, const ir_constant_data*): Assertion `(type->base_type &gt;= 0) &amp;&amp; (type->base_type &lt;= 3)' failed.</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=31439">Bug 31439</a> - Crash in glBufferSubData() with size == 0</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=31495">Bug 31495</a> - [i965 gles2c bisected] OpenGL ES 2.0 conformance GL2Tests_GetBIFD_input.run regressed</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=31514">Bug 31514</a> - isBuffer returns true for unbound buffers</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=31560">Bug 31560</a> - [tdfx] tdfx_tex.c:702: error: ‘const struct gl_color_table’ has no member named ‘Format’</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=31617">Bug 31617</a> - Radeon/Compiz: 'failed to attach dri2 front buffer', error case not handled</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=31648">Bug 31648</a> - [GLSL] array-struct-array gets assertion: `(size &gt;= 1) && (size &lt;= 4)' failed.</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=31650">Bug 31650</a> - [GLSL] varying gl_TexCoord fails to be re-declared to different size in the second shader</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=31673">Bug 31673</a> - GL_FRAGMENT_PRECISION_HIGH preprocessor macro undefined in GLSL ES</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=31690">Bug 31690</a> - i915 shader compiler fails to flatten if in Aquarium webgl demo.</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=31832">Bug 31832</a> - [i915] Bad renderbuffer format: 21</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=31841">Bug 31841</a> - [drm:radeon_cs_ioctl] *ERROR* Invalid command stream !</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=31894">Bug 31894</a> - Writing to gl_PointSize with GLES2 corrupts other varyings</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=31909">Bug 31909</a> - [i965] brw_fs.cpp:1461: void fs_visitor::emit_bool_to_cond_code(ir_rvalue*): Assertion `expr-&gt;operands[i]-&gt;type-&gt;is_scalar()' failed.</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=31934">Bug 31934</a> - [gallium] Mapping empty buffer object causes SIGSEGV</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=31983">Bug 31983</a> - [i915 gles2] "if (expression with builtin/varying variables) discard" breaks linkage</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=31985">Bug 31985</a> - [GLSL 1.20] initialized uniform array considered as "unsized"</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=31987">Bug 31987</a> - [gles2] if input a wrong pname(GL_NONE) to glGetBoolean, it will not case GL_INVALID_ENUM</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=32035">Bug 32035</a> - [GLSL bisected] comparing unsized array gets segfault</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=32070">Bug 32070</a> - llvmpipe renders stencil demo incorrectly</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=32273">Bug 32273</a> - assertion fails when starting vdrift 2010 release with shaders enabled</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=32287">Bug 32287</a> - [bisected GLSL] float-int failure</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=32311">Bug 32311</a> - [965 bisected] Array look-ups broken on GM45</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=32520">Bug 32520</a> - [gles2] glBlendFunc(GL_ZERO, GL_DST_COLOR) will result in GL_INVALID_ENUM</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=32825">Bug 32825</a> - egl_glx driver completely broken in 7.9 branch [fix in master]</li>
+</ul>
+
+
+<h2>Changes</h2>
+<p>The full set of changes can be viewed by using the following GIT command:</p>
+
+<pre>
+ git log mesa-7.9..mesa-7.9.1
+</pre>
+
+<p>Alex Deucher (5):
+<ul>
+ <li>r100: revalidate after radeon_update_renderbuffers</li>
+ <li>r600c: add missing radeon_prepare_render() call on evergreen</li>
+ <li>r600c: properly align mipmaps to group size</li>
+ <li>gallium/egl: fix r300 vs r600 loading</li>
+ <li>r600c: fix some opcodes on evergreen</li>
+</ul></p>
+
+<p>Aras Pranckevicius (2):
+<ul>
+ <li>glsl: fix crash in loop analysis when some controls can't be determined</li>
+ <li>glsl: fix matrix type check in ir_algebraic</li>
+</ul></p>
+
+<p>Brian Paul (27):
+<ul>
+ <li>swrast: fix choose_depth_texture_level() to respect mipmap filtering state</li>
+ <li>st/mesa: replace assertion w/ conditional in framebuffer invalidation</li>
+ <li>egl/i965: include inline_wrapper_sw_helper.h</li>
+ <li>mesa: Add missing else in do_row_3D</li>
+ <li>mesa: add missing formats in _mesa_format_to_type_and_comps()</li>
+ <li>mesa: handle more pixel types in mipmap generation code</li>
+ <li>mesa: make glIsBuffer() return false for never bound buffers</li>
+ <li>mesa: fix glDeleteBuffers() regression</li>
+ <li>swrast: init alpha value to 1.0 in opt_sample_rgb_2d()</li>
+ <li>meta: Mask Stencil.Clear against stencilMax in _mesa_meta_Clear</li>
+ <li>st/mesa: fix mapping of zero-sized buffer objects</li>
+ <li>mesa: check for posix_memalign() errors</li>
+ <li>llvmpipe: fix broken stencil writemask</li>
+ <li>mesa: fix GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME query</li>
+ <li>mesa: return GL_FRAMEBUFFER_DEFAULT as FBO attachment type</li>
+ <li>mesa: make glGet*(GL_NONE) generate GL_INVALID_ENUM</li>
+ <li>mesa: test for cube map completeness in glGenerateMipmap()</li>
+ <li>tnl: Initialize gl_program_machine memory in run_vp.</li>
+ <li>tnl: a better way to initialize the gl_program_machine memory</li>
+ <li>mesa, st/mesa: disable GL_ARB_geometry_shader4</li>
+ <li>glsl: fix off by one in register index assertion</li>
+ <li>st/mesa: fix mipmap generation bug</li>
+ <li>glsl: new glsl_strtod() wrapper to fix decimal point interpretation</li>
+ <li>mesa: no-op glBufferSubData() on size==0</li>
+ <li>tdfx: s/Format/_BaseFormat/</li>
+ <li>st/mesa: fix renderbuffer pointer check in st_Clear()</li>
+ <li>mesa: Bump the number of bits in the register index.</li>
+</ul></p>
+
+<p>Chad Versace (5):
+<ul>
+ <li>glsl: Fix lexer rule for ^=</li>
+ <li>glsl: Fix ast-to-hir for ARB_fragment_coord_conventions</li>
+ <li>glsl: Fix ir_expression::constant_expression_value()</li>
+ <li>glsl: Fix erroneous cast in ast_jump_statement::hir()</li>
+ <li>glsl: Fix linker bug in cross_validate_globals()</li>
+</ul></p>
+
+<p>Chia-I Wu (10):
+<ul>
+ <li>targets/egl: Fix linking with libdrm.</li>
+ <li>st/vega: Fix version check in context creation.</li>
+ <li>st/egl: Do not finish a fence that is NULL.</li>
+ <li>egl: Fix a false negative check in _eglCheckMakeCurrent.</li>
+ <li>st/mesa: Unreference the sampler view in st_bind_surface.</li>
+ <li>egl_dri2: Fix __DRI_DRI2 version 1 support.</li>
+ <li>st/vega: Do not wait NULL fences.</li>
+ <li>mesa: Do not advertise GL_OES_texture_3D.</li>
+ <li>egl_glx: Fix borken driver.</li>
+ <li>egl: Check extensions.</li>
+</ul></p>
+
+<p>Daniel Lichtenberger (1):
+<ul>
+ <li>radeon: fix potential segfault in renderbuffer update</li>
+</ul></p>
+
+<p>Daniel Vetter (1):
+<ul>
+ <li>r200: revalidate after radeon_update_renderbuffers</li>
+</ul></p>
+
+<p>Dave Airlie (1):
+<ul>
+ <li>r300g: fixup rs690 tiling stride alignment calculations.</li>
+</ul></p>
+
+<p>Eric Anholt (13):
+<ul>
+ <li>intel: Allow CopyTexSubImage to InternalFormat 3/4 textures, like RGB/RGBA.</li>
+ <li>glsl: Free the loop state context when we free the loop state.</li>
+ <li>i965: Allow OPCODE_SWZ to put immediates in the first arg.</li>
+ <li>i965: Add support for rendering to SARGB8 FBOs.</li>
+ <li>glsl: Add a helper constructor for expressions that works out result type.</li>
+ <li>glsl: Fix structure and array comparisions.</li>
+ <li>glsl: Quiet unreachable no-return-from-function warning.</li>
+ <li>glsl: Mark the array access for whole-array comparisons.</li>
+ <li>glsl: Fix flipped return of has_value() for array constants.</li>
+ <li>mesa: Add getters for the rest of the supported draw buffers.</li>
+ <li>mesa: Add getters for ARB_copy_buffer's attachment points.</li>
+ <li>i965: Correct the dp_read message descriptor setup on g4x.</li>
+ <li>glsl: Correct the marking of InputsRead/OutputsWritten on in/out matrices.</li>
+</ul></p>
+
+<p>Fabian Bieler (1):
+<ul>
+ <li>glsl: fix lowering conditional returns in subroutines</li>
+</ul></p>
+
+<p>Francisco Jerez (3):
+<ul>
+ <li>meta: Don't leak alpha function/reference value changes.</li>
+ <li>meta: Fix incorrect rendering of the bitmap alpha component.</li>
+ <li>meta: Don't try to disable cube maps if the driver doesn't expose the extension.</li>
+</ul></p>
+
+<p>Henri Verbeet (2):
+<ul>
+ <li>r600: Evergreen has two extra frac_bits for the sampler LOD state.</li>
+ <li>st/mesa: Handle wrapped depth buffers in st_copy_texsubimage().</li>
+</ul></p>
+
+<p>Ian Romanick (33):
+<ul>
+ <li>Add 7.9 md5sums</li>
+ <li>docs: Import 7.8.x release notes from 7.8 branch.</li>
+ <li>docs: download.html does not need to be updated for each release</li>
+ <li>docs: Update mailing lines from sf.net to freedesktop.org</li>
+ <li>docs: added news item for 7.9 release</li>
+ <li>mesa: Validate assembly shaders when GLSL shaders are used</li>
+ <li>linker: Reject shaders that have unresolved function calls</li>
+ <li>mesa: Refactor validation of shader targets</li>
+ <li>glsl: Slightly change the semantic of _LinkedShaders</li>
+ <li>linker: Improve handling of unread/unwritten shader inputs/outputs</li>
+ <li>glsl: Commit lexer files changed by previous cherry picking</li>
+ <li>mesa: Make metaops use program refcounts instead of names.</li>
+ <li>glsl: Fix incorrect gl_type of sampler2DArray and sampler1DArrayShadow</li>
+ <li>mesa: Allow query of MAX_SAMPLES with EXT_framebuffer_multisample</li>
+ <li>glsl: better handling of linker failures</li>
+ <li>mesa: Fix glGet of ES2's GL_MAX_*_VECTORS properties.</li>
+ <li>i915: Disallow alpha, red, RG, and sRGB as render targets</li>
+ <li>glsl/linker: Free any IR discarded by optimization passes.</li>
+ <li>glsl: Add an optimization pass to simplify discards.</li>
+ <li>glsl: Add a lowering pass to move discards out of if-statements.</li>
+ <li>i915: Correctly generate unconditional KIL instructions</li>
+ <li>glsl: Add unary ir_expression constructor</li>
+ <li>glsl: Ensure that equality comparisons don't return a NULL IR tree</li>
+ <li>glcpp: Commit changes in generated files cause by previous commit</li>
+ <li>glsl: Inherrit type of declared variable from initializer</li>
+ <li>glsl: Inherrit type of declared variable from initializer after processing assignment</li>
+ <li>linker: Ensure that unsized arrays have a size after linking</li>
+ <li>linker: Fix regressions caused by previous commit</li>
+ <li>linker: Allow built-in arrays to have different sizes between shader stages</li>
+ <li>ir_to_mesa: Don't generate swizzles for record derefs of non-scalar/vectors</li>
+ <li>Refresh autogenerated file builtin_function.cpp.</li>
+ <li>docs: Initial set of release notes for 7.9.1</li>
+ <li>mesa: set version string to 7.9.1</li>
+</ul></p>
+
+<p>Julien Cristau (1):
+<ul>
+ <li>Makefile: don't include the same files twice in the tarball</li>
+</ul></p>
+
+<p>Kenneth Graunke (19):
+<ul>
+ <li>glcpp: Return NEWLINE token for newlines inside multi-line comments.</li>
+ <li>generate_builtins.py: Output large strings as arrays of characters.</li>
+ <li>glsl: Fix constant component count in vector constructor emitting.</li>
+ <li>ir_dead_functions: Actually free dead functions and signatures.</li>
+ <li>glcpp: Define GL_FRAGMENT_PRECISION_HIGH if GLSL version &gt;= 1.30.</li>
+ <li>glsl: Unconditionally define GL_FRAGMENT_PRECISION_HIGH in ES2 shaders.</li>
+ <li>glsl: Fix constant expression handling for &lt, &gt;, &lt=, &gt;= on vectors.</li>
+ <li>glsl: Use do_common_optimization in the standalone compiler.</li>
+ <li>glsl: Don't inline function prototypes.</li>
+ <li>glsl: Add a virtual as_discard() method.</li>
+ <li>glsl: Remove "discard" support from lower_jumps.</li>
+ <li>glsl: Refactor get_num_operands.</li>
+ <li>glcpp: Don't emit SPACE tokens in conditional_tokens production.</li>
+ <li>glsl: Clean up code by adding a new is_break() function.</li>
+ <li>glsl: Consider the "else" branch when looking for loop breaks.</li>
+ <li>Remove OES_compressed_paletted_texture from the ES2 extension list.</li>
+ <li>glsl/builtins: Compute the correct value for smoothstep(vec, vec, vec).</li>
+ <li>Fix build on systems where "python" is python 3.</li>
+ <li>i965: Internally enable GL_NV_blend_square on ES2.</li>
+</ul></p>
+
+<p>Kristian Høgsberg (1):
+<ul>
+ <li>i965: Don't write mrf assignment for pointsize output</li>
+</ul></p>
+
+<p>Luca Barbieri (1):
+<ul>
+ <li>glsl: Unroll loops with conditional breaks anywhere (not just the end)</li>
+</ul></p>
+
+<p>Marek Olšák (17):
+<ul>
+ <li>r300g: fix microtiling for 16-bits-per-channel formats</li>
+ <li>r300g: fix texture border for 16-bits-per-channel formats</li>
+ <li>r300g: add a default channel ordering of texture border for unhandled formats</li>
+ <li>r300g: fix texture border color for all texture formats</li>
+ <li>r300g: fix rendering with no vertex elements</li>
+ <li>r300/compiler: fix rc_rewrite_depth_out for it to work with any instruction</li>
+ <li>r300g: fix texture border color once again</li>
+ <li>r300g: fix texture swizzling with compressed textures on r400-r500</li>
+ <li>r300g: disable ARB_texture_swizzle if S3TC is enabled on r3xx-only</li>
+ <li>mesa, st/mesa: fix gl_FragCoord with FBOs in Gallium</li>
+ <li>st/mesa: initialize key in st_vp_varient</li>
+ <li>r300/compiler: fix swizzle lowering with a presubtract source operand</li>
+ <li>r300g: fix rendering with a vertex attrib having a zero stride</li>
+ <li>ir_to_mesa: Add support for conditional discards.</li>
+ <li>r300g: finally fix the texture corruption on r3xx-r4xx</li>
+ <li>mesa: fix texel store functions for some float formats</li>
+ <li>r300/compiler: disable the rename_regs pass for loops</li>
+</ul></p>
+
+<p>Mario Kleiner (1):
+<ul>
+ <li>mesa/r300classic: Fix dri2Invalidate/radeon_prepare_render for page flipping.</li>
+</ul></p>
+
+<p>Peter Clifton (1):
+<ul>
+ <li>intel: Fix emit_linear_blit to use DWORD aligned width blits</li>
+</ul></p>
+
+<p>Robert Hooker (2):
+<ul>
+ <li>intel: Add a new B43 pci id.</li>
+ <li>egl_dri2: Add missing intel chip ids.</li>
+</ul></p>
+
+<p>Roland Scheidegger (1):
+<ul>
+ <li>r200: fix r200 large points</li>
+</ul></p>
+
+<p>Thomas Hellstrom (17):
+<ul>
+ <li>st/xorg: Don't try to use option values before processing options</li>
+ <li>xorg/vmwgfx: Make vmwarectrl work also on 64-bit servers</li>
+ <li>st/xorg: Add a customizer option to get rid of annoying cursor update flicker</li>
+ <li>xorg/vmwgfx: Don't hide HW cursors when updating them</li>
+ <li>st/xorg: Don't try to remove invalid fbs</li>
+ <li>st/xorg: Fix typo</li>
+ <li>st/xorg, xorg/vmwgfx: Be a bit more frendly towards cross-compiling environments</li>
+ <li>st/xorg: Fix compilation errors for Xservers compiled without Composite</li>
+ <li>st/xorg: Don't use deprecated x*alloc / xfree functions</li>
+ <li>xorg/vmwgfx: Don't use deprecated x*alloc / xfree functions</li>
+ <li>st/xorg: Fix compilation for Xservers &gt;= 1.10</li>
+ <li>mesa: Make sure we have the talloc cflags when using the talloc headers</li>
+ <li>egl: Add an include for size_t</li>
+ <li>mesa: Add talloc includes for gles</li>
+ <li>st/egl: Fix build for include files in nonstandard places</li>
+ <li>svga/drm: Optionally resolve calls to powf during link-time</li>
+ <li>gallium/targets: Trivial crosscompiling fix</li>
+</ul></p>
+
+<p>Tom Stellard (7):
+<ul>
+ <li>r300/compiler: Make sure presubtract sources use supported swizzles</li>
+ <li>r300/compiler: Fix register allocator's handling of loops</li>
+ <li>r300/compiler: Fix instruction scheduling within IF blocks</li>
+ <li>r300/compiler: Use zero as the register index for unused sources</li>
+ <li>r300/compiler: Ignore alpha dest register when replicating the result</li>
+ <li>r300/compiler: Use correct swizzles for all presubtract sources</li>
+ <li>r300/compiler: Don't allow presubtract sources to be remapped twice</li>
+</ul></p>
+
+<p>Vinson Lee (1):
+<ul>
+ <li>glsl: Fix 'control reaches end of non-void function' warning.</li>
+</ul></p>
+
+<p>richard (1):
+<ul>
+ <li>r600c : inline vertex format is not updated in an app, switch to use vfetch constants. For the 7.9 and 7.10 branches as well.</li>
+</ul></p>
+
+</body>
+</html>
diff --git a/docs/relnotes-7.9.2.html b/docs/relnotes-7.9.2.html
new file mode 100644
index 00000000000..65929cc2ac2
--- /dev/null
+++ b/docs/relnotes-7.9.2.html
@@ -0,0 +1,336 @@
+<HTML>
+
+<head>
+<TITLE>Mesa Release Notes</TITLE>
+<link rel="stylesheet" type="text/css" href="mesa.css">
+<meta http-equiv="content-type" content="text/html; charset=utf-8" />
+</head>
+
+<BODY>
+
+<body bgcolor="#eeeeee">
+
+<H1>Mesa 7.9.2 Release Notes / TBD</H1>
+
+<p>
+Mesa 7.9.2 is a bug fix release which fixes bugs found since the 7.9.1 release.
+</p>
+<p>
+Mesa 7.9.2 implements the OpenGL 2.1 API, but the version reported by
+glGetString(GL_VERSION) depends on the particular driver being used.
+Some drivers don't support all the features required in OpenGL 2.1.
+</p>
+<p>
+See the <a href="install.html">Compiling/Installing page</a> for prerequisites
+for DRI hardware acceleration.
+</p>
+
+
+<h2>MD5 checksums</h2>
+<pre>
+eb4ab8c1a03386def3ea34b1358e9cda MesaLib-7.9.2.tar.gz
+8f6d1474912787ce13bd35f3bae9938a MesaLib-7.9.2.tar.bz2
+427a81dd43ac97603768dc5c6af3df26 MesaLib-7.9.2.zip
+aacb8f4db997e346db40c6066942140a MesaGLUT-7.9.2.tar.gz
+18abe6cff4fad8ad4752c7b7ab548e5d MesaGLUT-7.9.2.tar.bz2
+3189e5732d636c71baf3d8bc23ce7b11 MesaGLUT-7.9.2.zip
+</pre>
+
+
+<h2>New features</h2>
+<p>None.</p>
+
+<h2>Bug fixes</h2>
+<p>This list is likely incomplete.</p>
+<ul>
+<li>Fix an off-by-one bug in a vsplit assertion.</li>
+<li>Fix incorrect handling of <tt>layout</tt> qualifier
+with <tt>in</tt>, <tt>out</tt>, <tt>attribute</tt>, and <tt>varying</tt>.</li>
+
+<li>Fix an i965 GPU hang in GLSL shaders that contain an unconditional <tt>discard</tt> statement.</li>
+
+<li>Fix an i965 shader bug where the negative absolute value was generated instead of the absolute value of a negation.</li>
+
+<li>Fix numerous issues handling precision qualifiers in GLSL ES.</li>
+
+<li>Fixed a few GLX protocol encoder bugs (Julien Cristau)</li>
+
+<li>Assorted Gallium llvmpipe driver bug fixes</li>
+
+<li>Assorted Mesa/Gallium state tracker bug fixes</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=26795">Bug 26795</a> - gl_FragCoord off by one in Gallium drivers.</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=29164">Bug 29164</a> - [GLSL 1.20] invariant variable shouldn't be used before declaration</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=29823">Bug 29823</a> - GetUniform[if]v busted</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=29927">Bug 29927</a> - [glsl2] fail to compile shader with constructor for array of struct type</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=30156">Bug 30156</a> - [i965] After updating to Mesa 7.9, Civilization IV starts to show garbage</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=31923">Bug 31923</a> - [GLSL 1.20] allowing inconsistent centroid declaration between two vertex shaders</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=31925">Bug 31925</a> - [GLSL 1.20] "#pragma STDGL invariant(all)" fail</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=32214">Bug 32214</a> - [gles2]no link error happens when missing vertex shader or frag shader</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=32375">Bug 32375</a> - [gl gles2] Not able to get the attribute by function glGetVertexAttribfv</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=32541">Bug 32541</a> - Segmentation Fault while running an HDR (high dynamic range) rendering demo</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=32569">Bug 32569</a> - [gles2] glGetShaderPrecisionFormat not implemented yet</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=32695">Bug 32695</a> - [glsl] SIGSEGV glcpp/glcpp-parse.y:833</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=32831">Bug 32831</a> - [glsl] division by zero crashes GLSL compiler</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=32910">Bug 32910</a> - Keywords 'in' and 'out' not handled properly for GLSL 1.20 shaders</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=33219">Bug 33219</a> -[GLSL bisected] implicit sized array triggers segfault in ir_to_mesa_visitor::copy_propagate</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=33306">Bug 33306</a> - GLSL integer division by zero crashes GLSL compiler</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=33308">Bug 33308</a> -[glsl] ast_to_hir.cpp:3016: virtual ir_rvalue* ast_jump_statement::hir(exec_list*, _mesa_glsl_parse_state*): Assertion `ret != __null' failed.</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=33316">Bug 33316</a> - uniform array will be allocate one line more and initialize it when it was freed will abort</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=33386">Bug 33386</a> - Dubious assembler in read_rgba_span_x86.S</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=33388">Bug 33388</a> - Dubious assembler in xform4.S</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=33433">Bug 33433</a> - Error in x86-64 API dispatch code.</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=33507">Bug 33507</a> - [glsl] GLSL preprocessor modulus by zero crash</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=33508">Bug 33508</a> - [glsl] GLSL compiler modulus by zero crash</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=33916">Bug 33916</a> - Compiler accepts reserved operators % and %=</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=34047">Bug 34047</a> - Assert in _tnl_import_array() when using GLfixed vertex datatypes with GLESv2</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=34114">Bug 34114</a> - Sun Studio build fails due to standard library functions not being in global namespace</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=34198">Bug 34198</a> - [GLSL] implicit sized array with index 0 used gets assertion</li>
+
+<li><a href="https://bugs.launchpad.net/ubuntu/+source/mesa/+bug/691653">Ubuntu bug 691653</a> - compiz crashes when using alt-tab (the radeon driver kills it) </li>
+
+<li><a href="https://bugs.meego.com/show_bug.cgi?id=13005">Meego bug 13005</a> - Graphics GLSL issue lead to camera preview fail on Pinetrail</li>
+
+<!-- <li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=">Bug </a> - </li> -->
+
+</ul>
+
+
+<h2>Changes</h2>
+<p>The full set of changes can be viewed by using the following GIT command:</p>
+
+<pre>
+ git log mesa-7.9.1..mesa-7.9.2
+</pre>
+
+<p>Alberto Milone (1):
+<ul>
+ <li>r600c: add evergreen ARL support.</li>
+</ul></p>
+
+<p>Brian Paul (19):
+<ul>
+ <li>draw: Fix an off-by-one bug in a vsplit assertion.</li>
+ <li>mesa: fix a few format table mistakes, assertions</li>
+ <li>mesa: fix num_draw_buffers==0 in fixed-function fragment program generation</li>
+ <li>mesa: don't assert in GetIntegerIndexed, etc</li>
+ <li>mesa: check for dummy renderbuffer in _mesa_FramebufferRenderbufferEXT()</li>
+ <li>llvmpipe: make sure binning is active when we begin/end a query</li>
+ <li>st/mesa: fix incorrect fragcoord.x translation</li>
+ <li>softpipe: fix off-by-one error in setup_fragcoord_coeff()</li>
+ <li>cso: fix loop bound in cso_set_vertex_samplers()</li>
+ <li>st/mesa: set renderbuffer _BaseFormat in a few places</li>
+ <li>st/mesa: fix the default case in st_format_datatype()</li>
+ <li>st/mesa: need to translate clear color according to surface's base format</li>
+ <li>docs: update 7.9.2 release notes with Brian's cherry-picks</li>
+ <li>docs: add links to 7.9.1 and 7.9.2 release notes</li>
+ <li>mesa: include compiler.h for ASSERT macro</li>
+ <li>glsl: add ir_shader case in switch stmt to silence warning</li>
+ <li>glsl2: fix signed/unsigned comparison warning</li>
+ <li>mesa: implement glGetShaderPrecisionFormat()</li>
+ <li>docs: updated environment variable list</li>
+</ul></p>
+
+<p>Bryce Harrington (1):
+<ul>
+ <li>r300g: Null pointer check for buffer deref in gallium winsys</li>
+</ul></p>
+
+<p>Chad Versace (14):
+<ul>
+ <li>glsl: At link-time, check that globals have matching centroid qualifiers</li>
+ <li>glcpp: Fix segfault when validating macro redefinitions</li>
+ <li>glsl: Fix parser rule for type_specifier</li>
+ <li>glsl: Change default value of ast_type_specifier::precision</li>
+ <li>glsl: Add semantic checks for precision qualifiers</li>
+ <li>glsl: Add support for default precision statements</li>
+ <li>glsl: Remove redundant semantic check in parser</li>
+ <li>glsl: Fix semantic checks on precision qualifiers</li>
+ <li>glsl: Fix segfault due to missing printf argument</li>
+ <li>glsl: Mark 'in' variables at global scope as read-only</li>
+ <li>glcpp: Raise error when modulus is zero</li>
+ <li>glsl: Set operators '%' and '%=' to be reserved when GLSL &lt 1.30</li>
+ <li>glsl: Reinstate constant-folding for division by zero</li>
+ <li>tnl: Add support for datatype GL_FIXED in vertex arrays</li>
+</ul></p>
+
+<p>Chia-I Wu (1):
+<ul>
+ <li>mesa: Add glDepthRangef and glClearDepthf to APIspec.xml.</li>
+</ul></p>
+
+<p>Chris Wilson (1):
+<ul>
+ <li>intel: Check for unsupported texture when finishing using as a render target</li>
+</ul></p>
+
+<p>Cyril Brulebois (1):
+<ul>
+ <li>Point to bugs.freedesktop.org rather than bugzilla.freedesktop.org</li>
+</ul></p>
+
+<p>Dave Airlie (2):
+<ul>
+ <li>radeon/r200: fix fbo-clearmipmap + gen-teximage</li>
+ <li>radeon: avoid segfault on 3D textures.</li>
+</ul></p>
+
+<p>Dimitry Andric (4):
+<ul>
+ <li>mesa: s/movzx/movzbl/</li>
+ <li>mesa: s/movzxw/movzwl/ in read_rgba_span_x86.S</li>
+ <li>glapi: adding @ char before type specifier in glapi_x86.S</li>
+ <li>glapi: add @GOTPCREL relocation type</li>
+</ul></p>
+
+<p>Eric Anholt (11):
+<ul>
+ <li>i965: Avoid double-negation of immediate values in the VS.</li>
+ <li>docs: Add a relnote for the Civ IV on i965.</li>
+ <li>i965/vs: When MOVing to produce ABS, strip negate of the operand.</li>
+ <li>glsl: Fix the lowering of variable array indexing to not lose write_masks.</li>
+ <li>intel: Make renderbuffer tiling choice match texture tiling choice.</li>
+ <li>glapi: Add entrypoints and enums for GL_ARB_ES2_compatibility.</li>
+ <li>mesa: Add extension enable bit for GL_ARB_ES2_compatibility.</li>
+ <li>mesa: Add actual support for glReleaseShaderCompiler from ES2.</li>
+ <li>mesa: Add support for glDepthRangef and glClearDepthf.</li>
+ <li>mesa: Add getters for ARB_ES2_compatibility MAX_*_VECTORS.</li>
+ <li>mesa: Add getter for GL_SHADER_COMPILER with ARB_ES2_compatibility.</li>
+</ul></p>
+
+<p>Ian Romanick (42):
+<ul>
+ <li>docs: Add 7.9.1 md5sums</li>
+ <li>glsl: Support the 'invariant(all)' pragma</li>
+ <li>glcpp: Generate an error for division by zero</li>
+ <li>glsl: Add version_string containing properly formatted GLSL version</li>
+ <li>glsl &amp; glcpp: Refresh autogenerated lexer and parser files.</li>
+ <li>glsl: Disallow 'in' and 'out' on globals in GLSL 1.20</li>
+ <li>glsl: Track variable usage, use that to enforce semantics</li>
+ <li>glsl: Allow 'in' and 'out' when 'layout' is also available</li>
+ <li>docs: Initial set of release notes for 7.9.2</li>
+ <li>mesa: bump version to 7.9.2-devel</li>
+ <li>docs: Update 7.9.2 release notes</li>
+ <li>i965: Make OPCODE_KIL_NV do its work in a temp, not the null reg!</li>
+ <li>glsl: Refresh autogenerated lexer and parser files.</li>
+ <li>glsl: Don't assert when the value returned by a function has no rvalue</li>
+ <li>linker: Set sizes for non-global arrays as well</li>
+ <li>linker: Propagate max_array_access while linking functions</li>
+ <li>docs: Update 7.9.2 release notes</li>
+ <li>Use C-style system headers in C++ code to avoid issues with std:: namespace</li>
+ <li>mesa: glGetUniform only returns a single element of an array</li>
+ <li>linker: Generate link errors when ES shaders are missing stages</li>
+ <li>mesa: Fix error checks in GetVertexAttrib functions</li>
+ <li>docs: Update 7.9.2 release notes</li>
+ <li>mesa: Remove unsupported OES extensions</li>
+ <li>glapi: Regenerate for GL_ARB_ES2_compatibility.</li>
+ <li>mesa: Connect glGetShaderPrecisionFormat into the dispatch table</li>
+ <li>i965: Set correct values for range/precision of fragment shader types</li>
+ <li>i915: Set correct values for range/precision of fragment shader types</li>
+ <li>intel: Fix typeos from 3d028024 and 790ff232</li>
+ <li>glsl: Ensure that all GLSL versions are supported in the stand-alone compiler</li>
+ <li>glsl: Reject shader versions not supported by the implementation</li>
+ <li>mesa: Initial size for secondary color array is 3</li>
+ <li>glcpp: Regenerate files from recent cherry picks</li>
+ <li>glsl: Finish out the reduce/reduce error fixes</li>
+ <li>glsl: Regenerate compiler files from cherry picks</li>
+ <li>linker: Fix off-by-one error implicit array sizing</li>
+ <li>i915: Only mark a register as available if all components are written</li>
+ <li>i915: Calculate partial result to temp register first</li>
+ <li>i915: Force lowering of all types of indirect array accesses in the FS</li>
+ <li>docs: Update 7.9.2 release notes for recent cherry picks</li>
+ <li>docs: Clean up bug fixes list</li>
+ <li>intel: Remove driver date and related bits from renderer string</li>
+ <li>mesa: set version string to 7.9.2 (final)</li>
+</ul></p>
+
+<p>Jian Zhao (1):
+<ul>
+ <li>mesa: fix an error in uniform arrays in row calculating.</li>
+</ul></p>
+
+<p>Julien Cristau (3):
+<ul>
+ <li>glx: fix request lengths</li>
+ <li>glx: fix GLXChangeDrawableAttributesSGIX request</li>
+ <li>glx: fix length of GLXGetFBConfigsSGIX</li>
+</ul></p>
+
+<p>Keith Packard (1):
+<ul>
+ <li>glsl: Eliminate reduce/reduce conflicts in glsl grammar</li>
+</ul></p>
+
+<p>Kenneth Graunke (12):
+<ul>
+ <li>glsl: Expose a public glsl_type::void_type const pointer.</li>
+ <li>glsl: Don't bother unsetting a destructor that was never set.</li>
+ <li>glsl, i965: Remove unnecessary talloc includes.</li>
+ <li>glcpp: Remove use of talloc reference counting.</li>
+ <li>ralloc: Add a fake implementation of ralloc based on talloc.</li>
+ <li>Convert everything from the talloc API to the ralloc API.</li>
+ <li>ralloc: a new MIT-licensed recursive memory allocator.</li>
+ <li>Remove talloc from the make and automake build systems.</li>
+ <li>Remove talloc from the SCons build system.</li>
+ <li>Remove the talloc sources from the Mesa repository.</li>
+ <li>glsl: Fix use of uninitialized values in _mesa_glsl_parse_state ctor.</li>
+ <li>glsl: Use reralloc instead of plain realloc.</li>
+</ul></p>
+
+<p>Marek Olšák (3):
+<ul>
+ <li>docs: fix messed up names with special characters in relnotes-7.9.1</li>
+ <li>mesa: fix texture3D mipmap generation for UNSIGNED_BYTE_3_3_2</li>
+ <li>st/dri: Track drawable context bindings</li>
+</ul></p>
+
+<p>Paulo Zanoni (1):
+<ul>
+ <li>dri_util: fail driCreateNewScreen if InitScreen is NULL</li>
+</ul></p>
+
+<p>Sam Hocevar (2):
+<ul>
+ <li>docs: add glsl info</li>
+ <li>docs: fix glsl_compiler name</li>
+</ul></p>
+
+<p>Vinson Lee (1):
+<ul>
+ <li>ralloc: Add missing va_end following va_copy.</li>
+</ul></p>
+
+<p>nobled (1):
+<ul>
+ <li>glx: Put null check before use</li>
+</ul></p>
+</p>
+
+</body>
+</html>
diff --git a/docs/relnotes.html b/docs/relnotes.html
index 4487af9dea6..b0ca3ef4313 100644
--- a/docs/relnotes.html
+++ b/docs/relnotes.html
@@ -13,6 +13,11 @@ The release notes summarize what's new or changed in each Mesa release.
</p>
<UL>
+<LI><A HREF="relnotes-7.11.html">7.11 release notes</A>
+<LI><A HREF="relnotes-7.10.1.html">7.10.1 release notes</A>
+<LI><A HREF="relnotes-7.10.html">7.10 release notes</A>
+<LI><A HREF="relnotes-7.9.2.html">7.9.2 release notes</A>
+<LI><A HREF="relnotes-7.9.1.html">7.9.1 release notes</A>
<LI><A HREF="relnotes-7.9.html">7.9 release notes</A>
<LI><A HREF="relnotes-7.8.3.html">7.8.3 release notes</A>
<LI><A HREF="relnotes-7.8.2.html">7.8.2 release notes</A>
diff --git a/docs/shading.html b/docs/shading.html
index c41d4a9be2b..aba39597429 100644
--- a/docs/shading.html
+++ b/docs/shading.html
@@ -167,7 +167,7 @@ Here's an example of using the compiler to compile a vertex shader and
emit GL_ARB_vertex_program-style instructions:
</p>
<pre>
- src/glsl/glslcompiler --dump-ast myshader.vert
+ src/glsl/glsl_compiler --dump-ast myshader.vert
</pre>
Options include
diff --git a/docs/sourcetree.html b/docs/sourcetree.html
index 00dc4e7c9f4..08a9a50e9ec 100644
--- a/docs/sourcetree.html
+++ b/docs/sourcetree.html
@@ -23,6 +23,7 @@ each directory.
<ul>
<li><b>docs</b> - EGL documentation
<li><b>drivers</b> - EGL drivers
+ <li><b>glsl</b> - the GLSL compiler
<li><b>main</b> - main EGL library implementation. This is where all
the EGL API functions are implemented, like eglCreateContext().
</ul>
diff --git a/doxygen/.gitignore b/doxygen/.gitignore
index 253aabac192..62a37224ddc 100644
--- a/doxygen/.gitignore
+++ b/doxygen/.gitignore
@@ -6,6 +6,7 @@ core
core_subset
gallium
glapi
+glsl
main
math
math_subset
diff --git a/doxygen/Makefile b/doxygen/Makefile
index 120372e1da6..386952000be 100644
--- a/doxygen/Makefile
+++ b/doxygen/Makefile
@@ -11,6 +11,7 @@ FULL = \
math.doxy \
vbo.doxy \
glapi.doxy \
+ glsl.doxy \
shader.doxy \
swrast.doxy \
swrast_setup.doxy \
diff --git a/doxygen/glsl.doxy b/doxygen/glsl.doxy
new file mode 100644
index 00000000000..5411ec44b77
--- /dev/null
+++ b/doxygen/glsl.doxy
@@ -0,0 +1,39 @@
+# Doxyfile 0.1
+
+@INCLUDE = common.doxy
+
+#---------------------------------------------------------------------------
+# General configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = "Mesa GLSL module"
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = ../src/glsl/
+RECURSIVE = NO
+EXCLUDE = ../src/glsl/glsl_lexer.cpp \
+ ../src/glsl/glsl_lexer.h \
+ ../src/glsl/glsl_parser.cpp \
+ ../src/glsl/glsl_parser.h
+EXCLUDE_PATTERNS =
+#---------------------------------------------------------------------------
+# configuration options related to the HTML output
+#---------------------------------------------------------------------------
+HTML_OUTPUT = glsl
+#---------------------------------------------------------------------------
+# Configuration options related to the preprocessor
+#---------------------------------------------------------------------------
+ENABLE_PREPROCESSING = YES
+MACRO_EXPANSION = NO
+EXPAND_ONLY_PREDEF = NO
+SEARCH_INCLUDES = YES
+INCLUDE_PATH =
+INCLUDE_FILE_PATTERNS =
+PREDEFINED =
+EXPAND_AS_DEFINED =
+SKIP_FUNCTION_MACROS = NO
+#---------------------------------------------------------------------------
+# Configuration::addtions related to external references
+#---------------------------------------------------------------------------
+TAGFILES =
+GENERATE_TAGFILE = glsl.tag
diff --git a/doxygen/header.html b/doxygen/header.html
index 378dc9490ca..ed3512d6d8b 100644
--- a/doxygen/header.html
+++ b/doxygen/header.html
@@ -7,6 +7,7 @@
<div class="qindex">
<a class="qindex" href="../main/index.html">core</a> |
<a class="qindex" href="../glapi/index.html">glapi</a> |
+<a class="qindex" href="../glsl/index.html">glsl</a> |
<a class="qindex" href="../vbo/index.html">vbo</a> |
<a class="qindex" href="../math/index.html">math</a> |
<a class="qindex" href="../shader/index.html">shader</a> |
diff --git a/include/EGL/eglext.h b/include/EGL/eglext.h
index 891152572d0..44bae42e088 100644
--- a/include/EGL/eglext.h
+++ b/include/EGL/eglext.h
@@ -143,6 +143,20 @@ typedef EGLImageKHR (EGLAPIENTRYP PFNEGLCREATEDRMIMAGEMESA) (EGLDisplay dpy, con
typedef EGLBoolean (EGLAPIENTRYP PFNEGLEXPORTDRMIMAGEMESA) (EGLDisplay dpy, EGLImageKHR image, EGLint *name, EGLint *handle, EGLint *stride);
#endif
+#ifndef EGL_WL_bind_wayland_display
+#define EGL_WL_bind_wayland_display 1
+
+#define EGL_WAYLAND_BUFFER_WL 0x31D5 /* eglCreateImageKHR target */
+struct wl_display;
+#ifdef EGL_EGLEXT_PROTOTYPES
+EGLAPI EGLBoolean EGLAPIENTRY eglBindWaylandDisplayWL(EGLDisplay dpy, struct wl_display *display);
+EGLAPI EGLBoolean EGLAPIENTRY eglUnbindWaylandDisplayWL(EGLDisplay dpy, struct wl_display *display);
+#else
+typedef EGLBoolean (EGLAPIENTRY PFNEGLBINDWAYLANDDISPLAYWL) (EGLDisplay dpy, struct wl_display *display);
+typedef EGLBoolean (EGLAPIENTRY PFNEGLUNBINDWAYLANDDISPLAYWL) (EGLDisplay dpy, struct wl_display *display);
+#endif
+#endif
+
#if KHRONOS_SUPPORT_INT64 /* EGLTimeKHR requires 64-bit uint support */
#ifndef EGL_KHR_reusable_sync
#define EGL_KHR_reusable_sync 1
@@ -382,14 +396,6 @@ struct android_native_buffer_t;
#define EGL_NATIVE_BUFFER_ANDROID 0x3140 /* eglCreateImageKHR target */
#endif
-#ifndef EGL_ANDROID_get_render_buffer
-#define EGL_ANDROID_get_render_buffer 1
-#ifdef EGL_EGLEXT_PROTOTYPES
-EGLAPI EGLClientBuffer EGLAPIENTRY eglGetRenderBufferANDROID(EGLDisplay dpy, EGLSurface draw);
-#endif
-typedef EGLClientBuffer (EGLAPIENTRYP PFNEGLGETRENDERBUFFERANDROIDPROC) (EGLDisplay dpy, EGLSurface draw);
-#endif
-
#ifndef EGL_ANDROID_swap_rectangle
#define EGL_ANDROID_swap_rectangle 1
#ifdef EGL_EGLEXT_PROTOTYPES
diff --git a/include/EGL/eglplatform.h b/include/EGL/eglplatform.h
index 22a263f522a..1c416c6edd5 100644
--- a/include/EGL/eglplatform.h
+++ b/include/EGL/eglplatform.h
@@ -78,6 +78,12 @@ typedef int EGLNativeDisplayType;
typedef void *EGLNativeWindowType;
typedef void *EGLNativePixmapType;
+#elif defined(WL_EGL_PLATFORM)
+
+typedef struct wl_egl_display *EGLNativeDisplayType;
+typedef struct wl_egl_pixmap *EGLNativePixmapType;
+typedef struct wl_egl_window *EGLNativeWindowType;
+
#elif defined(ANDROID) /* Android */
struct android_native_window_t;
diff --git a/include/GL/gl_mangle.h b/include/GL/gl_mangle.h
index 43d2e896b0b..36848033817 100644
--- a/include/GL/gl_mangle.h
+++ b/include/GL/gl_mangle.h
@@ -31,6 +31,7 @@
#define glAccum MANGLE(Accum)
#define glActiveProgramEXT MANGLE(ActiveProgramEXT)
+#define glActiveShaderProgram MANGLE(ActiveShaderProgram)
#define glActiveStencilFaceEXT MANGLE(ActiveStencilFaceEXT)
#define glActiveTextureARB MANGLE(ActiveTextureARB)
#define glActiveTexture MANGLE(ActiveTexture)
@@ -56,6 +57,7 @@
#define glBeginOcclusionQueryNV MANGLE(BeginOcclusionQueryNV)
#define glBeginPerfMonitorAMD MANGLE(BeginPerfMonitorAMD)
#define glBeginQueryARB MANGLE(BeginQueryARB)
+#define glBeginQueryIndexed MANGLE(BeginQueryIndexed)
#define glBeginQuery MANGLE(BeginQuery)
#define glBeginTransformFeedbackEXT MANGLE(BeginTransformFeedbackEXT)
#define glBeginTransformFeedback MANGLE(BeginTransformFeedback)
@@ -75,22 +77,27 @@
#define glBindBufferRange MANGLE(BindBufferRange)
#define glBindBufferRangeNV MANGLE(BindBufferRangeNV)
#define glBindFragDataLocationEXT MANGLE(BindFragDataLocationEXT)
+#define glBindFragDataLocationIndexed MANGLE(BindFragDataLocationIndexed)
#define glBindFragDataLocation MANGLE(BindFragDataLocation)
#define glBindFragmentShaderATI MANGLE(BindFragmentShaderATI)
#define glBindFramebufferEXT MANGLE(BindFramebufferEXT)
#define glBindFramebuffer MANGLE(BindFramebuffer)
+#define glBindImageTextureEXT MANGLE(BindImageTextureEXT)
#define glBindLightParameterEXT MANGLE(BindLightParameterEXT)
#define glBindMaterialParameterEXT MANGLE(BindMaterialParameterEXT)
#define glBindMultiTextureEXT MANGLE(BindMultiTextureEXT)
#define glBindParameterEXT MANGLE(BindParameterEXT)
#define glBindProgramARB MANGLE(BindProgramARB)
#define glBindProgramNV MANGLE(BindProgramNV)
+#define glBindProgramPipeline MANGLE(BindProgramPipeline)
#define glBindRenderbufferEXT MANGLE(BindRenderbufferEXT)
#define glBindRenderbuffer MANGLE(BindRenderbuffer)
+#define glBindSampler MANGLE(BindSampler)
#define glBindTexGenParameterEXT MANGLE(BindTexGenParameterEXT)
#define glBindTextureEXT MANGLE(BindTextureEXT)
#define glBindTexture MANGLE(BindTexture)
#define glBindTextureUnitParameterEXT MANGLE(BindTextureUnitParameterEXT)
+#define glBindTransformFeedback MANGLE(BindTransformFeedback)
#define glBindTransformFeedbackNV MANGLE(BindTransformFeedbackNV)
#define glBindVertexArrayAPPLE MANGLE(BindVertexArrayAPPLE)
#define glBindVertexArray MANGLE(BindVertexArray)
@@ -112,18 +119,22 @@
#define glBlendColorEXT MANGLE(BlendColorEXT)
#define glBlendColor MANGLE(BlendColor)
#define glBlendEquationEXT MANGLE(BlendEquationEXT)
+#define glBlendEquationiARB MANGLE(BlendEquationiARB)
#define glBlendEquationi MANGLE(BlendEquationi)
#define glBlendEquationIndexedAMD MANGLE(BlendEquationIndexedAMD)
#define glBlendEquation MANGLE(BlendEquation)
#define glBlendEquationSeparateATI MANGLE(BlendEquationSeparateATI)
#define glBlendEquationSeparateEXT MANGLE(BlendEquationSeparateEXT)
+#define glBlendEquationSeparateiARB MANGLE(BlendEquationSeparateiARB)
#define glBlendEquationSeparatei MANGLE(BlendEquationSeparatei)
#define glBlendEquationSeparateIndexedAMD MANGLE(BlendEquationSeparateIndexedAMD)
#define glBlendEquationSeparate MANGLE(BlendEquationSeparate)
+#define glBlendFunciARB MANGLE(BlendFunciARB)
#define glBlendFunci MANGLE(BlendFunci)
#define glBlendFuncIndexedAMD MANGLE(BlendFuncIndexedAMD)
#define glBlendFunc MANGLE(BlendFunc)
#define glBlendFuncSeparateEXT MANGLE(BlendFuncSeparateEXT)
+#define glBlendFuncSeparateiARB MANGLE(BlendFuncSeparateiARB)
#define glBlendFuncSeparatei MANGLE(BlendFuncSeparatei)
#define glBlendFuncSeparateIndexedAMD MANGLE(BlendFuncSeparateIndexedAMD)
#define glBlendFuncSeparateINGR MANGLE(BlendFuncSeparateINGR)
@@ -153,6 +164,7 @@
#define glClearColor MANGLE(ClearColor)
#define glClearDebugLogMESA MANGLE(ClearDebugLogMESA)
#define glClearDepthdNV MANGLE(ClearDepthdNV)
+#define glClearDepthf MANGLE(ClearDepthf)
#define glClearDepth MANGLE(ClearDepth)
#define glClearIndex MANGLE(ClearIndex)
#define glClear MANGLE(Clear)
@@ -215,6 +227,10 @@
#define glColorMaskIndexedEXT MANGLE(ColorMaskIndexedEXT)
#define glColorMask MANGLE(ColorMask)
#define glColorMaterial MANGLE(ColorMaterial)
+#define glColorP3ui MANGLE(ColorP3ui)
+#define glColorP3uiv MANGLE(ColorP3uiv)
+#define glColorP4ui MANGLE(ColorP4ui)
+#define glColorP4uiv MANGLE(ColorP4uiv)
#define glColorPointerEXT MANGLE(ColorPointerEXT)
#define glColorPointerListIBM MANGLE(ColorPointerListIBM)
#define glColorPointer MANGLE(ColorPointer)
@@ -236,6 +252,7 @@
#define glCombinerParameterivNV MANGLE(CombinerParameterivNV)
#define glCombinerStageParameterfvNV MANGLE(CombinerStageParameterfvNV)
#define glCompileShaderARB MANGLE(CompileShaderARB)
+#define glCompileShaderIncludeARB MANGLE(CompileShaderIncludeARB)
#define glCompileShader MANGLE(CompileShader)
#define glCompressedMultiTexImage1DEXT MANGLE(CompressedMultiTexImage1DEXT)
#define glCompressedMultiTexImage2DEXT MANGLE(CompressedMultiTexImage2DEXT)
@@ -310,10 +327,18 @@
#define glCreateShader MANGLE(CreateShader)
#define glCreateShaderObjectARB MANGLE(CreateShaderObjectARB)
#define glCreateShaderProgramEXT MANGLE(CreateShaderProgramEXT)
+#define glCreateShaderProgramv MANGLE(CreateShaderProgramv)
+#define glCreateSyncFromCLeventARB MANGLE(CreateSyncFromCLeventARB)
#define glCullFace MANGLE(CullFace)
#define glCullParameterdvEXT MANGLE(CullParameterdvEXT)
#define glCullParameterfvEXT MANGLE(CullParameterfvEXT)
#define glCurrentPaletteMatrixARB MANGLE(CurrentPaletteMatrixARB)
+#define glDebugMessageCallbackAMD MANGLE(DebugMessageCallbackAMD)
+#define glDebugMessageCallbackARB MANGLE(DebugMessageCallbackARB)
+#define glDebugMessageControlARB MANGLE(DebugMessageControlARB)
+#define glDebugMessageEnableAMD MANGLE(DebugMessageEnableAMD)
+#define glDebugMessageInsertAMD MANGLE(DebugMessageInsertAMD)
+#define glDebugMessageInsertARB MANGLE(DebugMessageInsertARB)
#define glDeformationMap3dSGIX MANGLE(DeformationMap3dSGIX)
#define glDeformationMap3fSGIX MANGLE(DeformationMap3fSGIX)
#define glDeformSGIX MANGLE(DeformSGIX)
@@ -326,20 +351,25 @@
#define glDeleteFramebuffersEXT MANGLE(DeleteFramebuffersEXT)
#define glDeleteFramebuffers MANGLE(DeleteFramebuffers)
#define glDeleteLists MANGLE(DeleteLists)
+#define glDeleteNamedStringARB MANGLE(DeleteNamedStringARB)
+#define glDeleteNamesAMD MANGLE(DeleteNamesAMD)
#define glDeleteObjectARB MANGLE(DeleteObjectARB)
#define glDeleteOcclusionQueriesNV MANGLE(DeleteOcclusionQueriesNV)
#define glDeletePerfMonitorsAMD MANGLE(DeletePerfMonitorsAMD)
#define glDeleteProgram MANGLE(DeleteProgram)
+#define glDeleteProgramPipelines MANGLE(DeleteProgramPipelines)
#define glDeleteProgramsARB MANGLE(DeleteProgramsARB)
#define glDeleteProgramsNV MANGLE(DeleteProgramsNV)
#define glDeleteQueriesARB MANGLE(DeleteQueriesARB)
#define glDeleteQueries MANGLE(DeleteQueries)
#define glDeleteRenderbuffersEXT MANGLE(DeleteRenderbuffersEXT)
#define glDeleteRenderbuffers MANGLE(DeleteRenderbuffers)
+#define glDeleteSamplers MANGLE(DeleteSamplers)
#define glDeleteShader MANGLE(DeleteShader)
#define glDeleteSync MANGLE(DeleteSync)
#define glDeleteTexturesEXT MANGLE(DeleteTexturesEXT)
#define glDeleteTextures MANGLE(DeleteTextures)
+#define glDeleteTransformFeedbacks MANGLE(DeleteTransformFeedbacks)
#define glDeleteTransformFeedbacksNV MANGLE(DeleteTransformFeedbacksNV)
#define glDeleteVertexArraysAPPLE MANGLE(DeleteVertexArraysAPPLE)
#define glDeleteVertexArrays MANGLE(DeleteVertexArrays)
@@ -348,7 +378,10 @@
#define glDepthBoundsEXT MANGLE(DepthBoundsEXT)
#define glDepthFunc MANGLE(DepthFunc)
#define glDepthMask MANGLE(DepthMask)
+#define glDepthRangeArrayv MANGLE(DepthRangeArrayv)
#define glDepthRangedNV MANGLE(DepthRangedNV)
+#define glDepthRangef MANGLE(DepthRangef)
+#define glDepthRangeIndexed MANGLE(DepthRangeIndexed)
#define glDepthRange MANGLE(DepthRange)
#define glDetachObjectARB MANGLE(DetachObjectARB)
#define glDetachShader MANGLE(DetachShader)
@@ -363,6 +396,7 @@
#define glDisableVertexAttribArrayARB MANGLE(DisableVertexAttribArrayARB)
#define glDisableVertexAttribArray MANGLE(DisableVertexAttribArray)
#define glDrawArraysEXT MANGLE(DrawArraysEXT)
+#define glDrawArraysIndirect MANGLE(DrawArraysIndirect)
#define glDrawArraysInstancedARB MANGLE(DrawArraysInstancedARB)
#define glDrawArraysInstancedEXT MANGLE(DrawArraysInstancedEXT)
#define glDrawArraysInstanced MANGLE(DrawArraysInstanced)
@@ -374,6 +408,7 @@
#define glDrawElementArrayAPPLE MANGLE(DrawElementArrayAPPLE)
#define glDrawElementArrayATI MANGLE(DrawElementArrayATI)
#define glDrawElementsBaseVertex MANGLE(DrawElementsBaseVertex)
+#define glDrawElementsIndirect MANGLE(DrawElementsIndirect)
#define glDrawElementsInstancedARB MANGLE(DrawElementsInstancedARB)
#define glDrawElementsInstancedBaseVertex MANGLE(DrawElementsInstancedBaseVertex)
#define glDrawElementsInstancedEXT MANGLE(DrawElementsInstancedEXT)
@@ -386,7 +421,9 @@
#define glDrawRangeElementsBaseVertex MANGLE(DrawRangeElementsBaseVertex)
#define glDrawRangeElementsEXT MANGLE(DrawRangeElementsEXT)
#define glDrawRangeElements MANGLE(DrawRangeElements)
+#define glDrawTransformFeedback MANGLE(DrawTransformFeedback)
#define glDrawTransformFeedbackNV MANGLE(DrawTransformFeedbackNV)
+#define glDrawTransformFeedbackStream MANGLE(DrawTransformFeedbackStream)
#define glEdgeFlagFormatNV MANGLE(EdgeFlagFormatNV)
#define glEdgeFlag MANGLE(EdgeFlag)
#define glEdgeFlagPointerEXT MANGLE(EdgeFlagPointerEXT)
@@ -414,6 +451,7 @@
#define glEndOcclusionQueryNV MANGLE(EndOcclusionQueryNV)
#define glEndPerfMonitorAMD MANGLE(EndPerfMonitorAMD)
#define glEndQueryARB MANGLE(EndQueryARB)
+#define glEndQueryIndexed MANGLE(EndQueryIndexed)
#define glEndQuery MANGLE(EndQuery)
#define glEndTransformFeedbackEXT MANGLE(EndTransformFeedbackEXT)
#define glEndTransformFeedback MANGLE(EndTransformFeedback)
@@ -447,6 +485,7 @@
#define glFlush MANGLE(Flush)
#define glFlushMappedBufferRangeAPPLE MANGLE(FlushMappedBufferRangeAPPLE)
#define glFlushMappedBufferRange MANGLE(FlushMappedBufferRange)
+#define glFlushMappedNamedBufferRangeEXT MANGLE(FlushMappedNamedBufferRangeEXT)
#define glFlushPixelDataRangeNV MANGLE(FlushPixelDataRangeNV)
#define glFlushRasterSGIX MANGLE(FlushRasterSGIX)
#define glFlushVertexArrayRangeAPPLE MANGLE(FlushVertexArrayRangeAPPLE)
@@ -498,7 +537,6 @@
#define glFramebufferTextureEXT MANGLE(FramebufferTextureEXT)
#define glFramebufferTextureFaceARB MANGLE(FramebufferTextureFaceARB)
#define glFramebufferTextureFaceEXT MANGLE(FramebufferTextureFaceEXT)
-#define glFramebufferTextureFace MANGLE(FramebufferTextureFace)
#define glFramebufferTextureLayerARB MANGLE(FramebufferTextureLayerARB)
#define glFramebufferTextureLayerEXT MANGLE(FramebufferTextureLayerEXT)
#define glFramebufferTextureLayer MANGLE(FramebufferTextureLayer)
@@ -521,23 +559,30 @@
#define glGenFramebuffersEXT MANGLE(GenFramebuffersEXT)
#define glGenFramebuffers MANGLE(GenFramebuffers)
#define glGenLists MANGLE(GenLists)
+#define glGenNamesAMD MANGLE(GenNamesAMD)
#define glGenOcclusionQueriesNV MANGLE(GenOcclusionQueriesNV)
#define glGenPerfMonitorsAMD MANGLE(GenPerfMonitorsAMD)
+#define glGenProgramPipelines MANGLE(GenProgramPipelines)
#define glGenProgramsARB MANGLE(GenProgramsARB)
#define glGenProgramsNV MANGLE(GenProgramsNV)
#define glGenQueriesARB MANGLE(GenQueriesARB)
#define glGenQueries MANGLE(GenQueries)
#define glGenRenderbuffersEXT MANGLE(GenRenderbuffersEXT)
#define glGenRenderbuffers MANGLE(GenRenderbuffers)
+#define glGenSamplers MANGLE(GenSamplers)
#define glGenSymbolsEXT MANGLE(GenSymbolsEXT)
#define glGenTexturesEXT MANGLE(GenTexturesEXT)
#define glGenTextures MANGLE(GenTextures)
+#define glGenTransformFeedbacks MANGLE(GenTransformFeedbacks)
#define glGenTransformFeedbacksNV MANGLE(GenTransformFeedbacksNV)
#define glGenVertexArraysAPPLE MANGLE(GenVertexArraysAPPLE)
#define glGenVertexArrays MANGLE(GenVertexArrays)
#define glGenVertexShadersEXT MANGLE(GenVertexShadersEXT)
#define glGetActiveAttribARB MANGLE(GetActiveAttribARB)
#define glGetActiveAttrib MANGLE(GetActiveAttrib)
+#define glGetActiveSubroutineName MANGLE(GetActiveSubroutineName)
+#define glGetActiveSubroutineUniformiv MANGLE(GetActiveSubroutineUniformiv)
+#define glGetActiveSubroutineUniformName MANGLE(GetActiveSubroutineUniformName)
#define glGetActiveUniformARB MANGLE(GetActiveUniformARB)
#define glGetActiveUniformBlockiv MANGLE(GetActiveUniformBlockiv)
#define glGetActiveUniformBlockName MANGLE(GetActiveUniformBlockName)
@@ -589,16 +634,21 @@
#define glGetConvolutionParameteriv MANGLE(GetConvolutionParameteriv)
#define glGetDebugLogLengthMESA MANGLE(GetDebugLogLengthMESA)
#define glGetDebugLogMESA MANGLE(GetDebugLogMESA)
+#define glGetDebugMessageLogAMD MANGLE(GetDebugMessageLogAMD)
+#define glGetDebugMessageLogARB MANGLE(GetDebugMessageLogARB)
#define glGetDetailTexFuncSGIS MANGLE(GetDetailTexFuncSGIS)
#define glGetDoubleIndexedvEXT MANGLE(GetDoubleIndexedvEXT)
+#define glGetDoublei_v MANGLE(GetDoublei_v)
#define glGetDoublev MANGLE(GetDoublev)
#define glGetError MANGLE(GetError)
#define glGetFenceivNV MANGLE(GetFenceivNV)
#define glGetFinalCombinerInputParameterfvNV MANGLE(GetFinalCombinerInputParameterfvNV)
#define glGetFinalCombinerInputParameterivNV MANGLE(GetFinalCombinerInputParameterivNV)
#define glGetFloatIndexedvEXT MANGLE(GetFloatIndexedvEXT)
+#define glGetFloati_v MANGLE(GetFloati_v)
#define glGetFloatv MANGLE(GetFloatv)
#define glGetFogFuncSGIS MANGLE(GetFogFuncSGIS)
+#define glGetFragDataIndex MANGLE(GetFragDataIndex)
#define glGetFragDataLocationEXT MANGLE(GetFragDataLocationEXT)
#define glGetFragDataLocation MANGLE(GetFragDataLocation)
#define glGetFragmentLightfvSGIX MANGLE(GetFragmentLightfvSGIX)
@@ -608,6 +658,7 @@
#define glGetFramebufferAttachmentParameterivEXT MANGLE(GetFramebufferAttachmentParameterivEXT)
#define glGetFramebufferAttachmentParameteriv MANGLE(GetFramebufferAttachmentParameteriv)
#define glGetFramebufferParameterivEXT MANGLE(GetFramebufferParameterivEXT)
+#define glGetGraphicsResetStatusARB MANGLE(GetGraphicsResetStatusARB)
#define glGetHandleARB MANGLE(GetHandleARB)
#define glGetHistogramEXT MANGLE(GetHistogramEXT)
#define glGetHistogram MANGLE(GetHistogram)
@@ -678,6 +729,26 @@
#define glGetNamedProgramLocalParameterIuivEXT MANGLE(GetNamedProgramLocalParameterIuivEXT)
#define glGetNamedProgramStringEXT MANGLE(GetNamedProgramStringEXT)
#define glGetNamedRenderbufferParameterivEXT MANGLE(GetNamedRenderbufferParameterivEXT)
+#define glGetNamedStringARB MANGLE(GetNamedStringARB)
+#define glGetNamedStringivARB MANGLE(GetNamedStringivARB)
+#define glGetnColorTableARB MANGLE(GetnColorTableARB)
+#define glGetnCompressedTexImageARB MANGLE(GetnCompressedTexImageARB)
+#define glGetnConvolutionFilterARB MANGLE(GetnConvolutionFilterARB)
+#define glGetnHistogramARB MANGLE(GetnHistogramARB)
+#define glGetnMapdvARB MANGLE(GetnMapdvARB)
+#define glGetnMapfvARB MANGLE(GetnMapfvARB)
+#define glGetnMapivARB MANGLE(GetnMapivARB)
+#define glGetnMinmaxARB MANGLE(GetnMinmaxARB)
+#define glGetnPixelMapfvARB MANGLE(GetnPixelMapfvARB)
+#define glGetnPixelMapuivARB MANGLE(GetnPixelMapuivARB)
+#define glGetnPixelMapusvARB MANGLE(GetnPixelMapusvARB)
+#define glGetnPolygonStippleARB MANGLE(GetnPolygonStippleARB)
+#define glGetnSeparableFilterARB MANGLE(GetnSeparableFilterARB)
+#define glGetnTexImageARB MANGLE(GetnTexImageARB)
+#define glGetnUniformdvARB MANGLE(GetnUniformdvARB)
+#define glGetnUniformfvARB MANGLE(GetnUniformfvARB)
+#define glGetnUniformivARB MANGLE(GetnUniformivARB)
+#define glGetnUniformuivARB MANGLE(GetnUniformuivARB)
#define glGetObjectBufferfvATI MANGLE(GetObjectBufferfvATI)
#define glGetObjectBufferivATI MANGLE(GetObjectBufferivATI)
#define glGetObjectParameterfvARB MANGLE(GetObjectParameterfvARB)
@@ -700,6 +771,7 @@
#define glGetPointervEXT MANGLE(GetPointervEXT)
#define glGetPointerv MANGLE(GetPointerv)
#define glGetPolygonStipple MANGLE(GetPolygonStipple)
+#define glGetProgramBinary MANGLE(GetProgramBinary)
#define glGetProgramEnvParameterdvARB MANGLE(GetProgramEnvParameterdvARB)
#define glGetProgramEnvParameterfvARB MANGLE(GetProgramEnvParameterfvARB)
#define glGetProgramEnvParameterIivNV MANGLE(GetProgramEnvParameterIivNV)
@@ -716,28 +788,42 @@
#define glGetProgramNamedParameterfvNV MANGLE(GetProgramNamedParameterfvNV)
#define glGetProgramParameterdvNV MANGLE(GetProgramParameterdvNV)
#define glGetProgramParameterfvNV MANGLE(GetProgramParameterfvNV)
+#define glGetProgramPipelineInfoLog MANGLE(GetProgramPipelineInfoLog)
+#define glGetProgramPipelineiv MANGLE(GetProgramPipelineiv)
#define glGetProgramRegisterfvMESA MANGLE(GetProgramRegisterfvMESA)
+#define glGetProgramStageiv MANGLE(GetProgramStageiv)
#define glGetProgramStringARB MANGLE(GetProgramStringARB)
#define glGetProgramStringNV MANGLE(GetProgramStringNV)
+#define glGetProgramSubroutineParameteruivNV MANGLE(GetProgramSubroutineParameteruivNV)
+#define glGetQueryIndexediv MANGLE(GetQueryIndexediv)
#define glGetQueryivARB MANGLE(GetQueryivARB)
#define glGetQueryiv MANGLE(GetQueryiv)
#define glGetQueryObjecti64vEXT MANGLE(GetQueryObjecti64vEXT)
+#define glGetQueryObjecti64v MANGLE(GetQueryObjecti64v)
#define glGetQueryObjectivARB MANGLE(GetQueryObjectivARB)
#define glGetQueryObjectiv MANGLE(GetQueryObjectiv)
#define glGetQueryObjectui64vEXT MANGLE(GetQueryObjectui64vEXT)
+#define glGetQueryObjectui64v MANGLE(GetQueryObjectui64v)
#define glGetQueryObjectuivARB MANGLE(GetQueryObjectuivARB)
#define glGetQueryObjectuiv MANGLE(GetQueryObjectuiv)
#define glGetRenderbufferParameterivEXT MANGLE(GetRenderbufferParameterivEXT)
#define glGetRenderbufferParameteriv MANGLE(GetRenderbufferParameteriv)
+#define glGetSamplerParameterfv MANGLE(GetSamplerParameterfv)
+#define glGetSamplerParameterIiv MANGLE(GetSamplerParameterIiv)
+#define glGetSamplerParameterIuiv MANGLE(GetSamplerParameterIuiv)
+#define glGetSamplerParameteriv MANGLE(GetSamplerParameteriv)
#define glGetSeparableFilterEXT MANGLE(GetSeparableFilterEXT)
#define glGetSeparableFilter MANGLE(GetSeparableFilter)
#define glGetShaderInfoLog MANGLE(GetShaderInfoLog)
#define glGetShaderiv MANGLE(GetShaderiv)
+#define glGetShaderPrecisionFormat MANGLE(GetShaderPrecisionFormat)
#define glGetShaderSourceARB MANGLE(GetShaderSourceARB)
#define glGetShaderSource MANGLE(GetShaderSource)
#define glGetSharpenTexFuncSGIS MANGLE(GetSharpenTexFuncSGIS)
#define glGetStringi MANGLE(GetStringi)
#define glGetString MANGLE(GetString)
+#define glGetSubroutineIndex MANGLE(GetSubroutineIndex)
+#define glGetSubroutineUniformLocation MANGLE(GetSubroutineUniformLocation)
#define glGetSynciv MANGLE(GetSynciv)
#define glGetTexBumpParameterfvATI MANGLE(GetTexBumpParameterfvATI)
#define glGetTexBumpParameterivATI MANGLE(GetTexBumpParameterivATI)
@@ -770,14 +856,17 @@
#define glGetTransformFeedbackVaryingNV MANGLE(GetTransformFeedbackVaryingNV)
#define glGetUniformBlockIndex MANGLE(GetUniformBlockIndex)
#define glGetUniformBufferSizeEXT MANGLE(GetUniformBufferSizeEXT)
+#define glGetUniformdv MANGLE(GetUniformdv)
#define glGetUniformfvARB MANGLE(GetUniformfvARB)
#define glGetUniformfv MANGLE(GetUniformfv)
+#define glGetUniformi64vNV MANGLE(GetUniformi64vNV)
#define glGetUniformIndices MANGLE(GetUniformIndices)
#define glGetUniformivARB MANGLE(GetUniformivARB)
#define glGetUniformiv MANGLE(GetUniformiv)
#define glGetUniformLocationARB MANGLE(GetUniformLocationARB)
#define glGetUniformLocation MANGLE(GetUniformLocation)
#define glGetUniformOffsetEXT MANGLE(GetUniformOffsetEXT)
+#define glGetUniformSubroutineuiv MANGLE(GetUniformSubroutineuiv)
#define glGetUniformui64vNV MANGLE(GetUniformui64vNV)
#define glGetUniformuivEXT MANGLE(GetUniformuivEXT)
#define glGetUniformuiv MANGLE(GetUniformuiv)
@@ -803,6 +892,10 @@
#define glGetVertexAttribivARB MANGLE(GetVertexAttribivARB)
#define glGetVertexAttribiv MANGLE(GetVertexAttribiv)
#define glGetVertexAttribivNV MANGLE(GetVertexAttribivNV)
+#define glGetVertexAttribLdvEXT MANGLE(GetVertexAttribLdvEXT)
+#define glGetVertexAttribLdv MANGLE(GetVertexAttribLdv)
+#define glGetVertexAttribLi64vNV MANGLE(GetVertexAttribLi64vNV)
+#define glGetVertexAttribLui64vNV MANGLE(GetVertexAttribLui64vNV)
#define glGetVertexAttribPointervARB MANGLE(GetVertexAttribPointervARB)
#define glGetVertexAttribPointerv MANGLE(GetVertexAttribPointerv)
#define glGetVertexAttribPointervNV MANGLE(GetVertexAttribPointervNV)
@@ -864,20 +957,25 @@
#define glIsFramebufferEXT MANGLE(IsFramebufferEXT)
#define glIsFramebuffer MANGLE(IsFramebuffer)
#define glIsList MANGLE(IsList)
+#define glIsNameAMD MANGLE(IsNameAMD)
#define glIsNamedBufferResidentNV MANGLE(IsNamedBufferResidentNV)
+#define glIsNamedStringARB MANGLE(IsNamedStringARB)
#define glIsObjectBufferATI MANGLE(IsObjectBufferATI)
#define glIsOcclusionQueryNV MANGLE(IsOcclusionQueryNV)
#define glIsProgramARB MANGLE(IsProgramARB)
#define glIsProgram MANGLE(IsProgram)
#define glIsProgramNV MANGLE(IsProgramNV)
+#define glIsProgramPipeline MANGLE(IsProgramPipeline)
#define glIsQueryARB MANGLE(IsQueryARB)
#define glIsQuery MANGLE(IsQuery)
#define glIsRenderbufferEXT MANGLE(IsRenderbufferEXT)
#define glIsRenderbuffer MANGLE(IsRenderbuffer)
+#define glIsSampler MANGLE(IsSampler)
#define glIsShader MANGLE(IsShader)
#define glIsSync MANGLE(IsSync)
#define glIsTextureEXT MANGLE(IsTextureEXT)
#define glIsTexture MANGLE(IsTexture)
+#define glIsTransformFeedback MANGLE(IsTransformFeedback)
#define glIsTransformFeedbackNV MANGLE(IsTransformFeedbackNV)
#define glIsVariantEnabledEXT MANGLE(IsVariantEnabledEXT)
#define glIsVertexArrayAPPLE MANGLE(IsVertexArrayAPPLE)
@@ -915,6 +1013,8 @@
#define glLogicOp MANGLE(LogicOp)
#define glMakeBufferNonResidentNV MANGLE(MakeBufferNonResidentNV)
#define glMakeBufferResidentNV MANGLE(MakeBufferResidentNV)
+#define glMakeNamedBufferNonResidentNV MANGLE(MakeNamedBufferNonResidentNV)
+#define glMakeNamedBufferResidentNV MANGLE(MakeNamedBufferResidentNV)
#define glMap1d MANGLE(Map1d)
#define glMap1f MANGLE(Map1f)
#define glMap2d MANGLE(Map2d)
@@ -928,6 +1028,7 @@
#define glMapGrid2d MANGLE(MapGrid2d)
#define glMapGrid2f MANGLE(MapGrid2f)
#define glMapNamedBufferEXT MANGLE(MapNamedBufferEXT)
+#define glMapNamedBufferRangeEXT MANGLE(MapNamedBufferRangeEXT)
#define glMapObjectBufferATI MANGLE(MapObjectBufferATI)
#define glMapParameterfvNV MANGLE(MapParameterfvNV)
#define glMapParameterivNV MANGLE(MapParameterivNV)
@@ -963,8 +1064,10 @@
#define glMatrixScalefEXT MANGLE(MatrixScalefEXT)
#define glMatrixTranslatedEXT MANGLE(MatrixTranslatedEXT)
#define glMatrixTranslatefEXT MANGLE(MatrixTranslatefEXT)
+#define glMemoryBarrierEXT MANGLE(MemoryBarrierEXT)
#define glMinmaxEXT MANGLE(MinmaxEXT)
#define glMinmax MANGLE(Minmax)
+#define glMinSampleShadingARB MANGLE(MinSampleShadingARB)
#define glMinSampleShading MANGLE(MinSampleShading)
#define glMultiDrawArraysEXT MANGLE(MultiDrawArraysEXT)
#define glMultiDrawArrays MANGLE(MultiDrawArrays)
@@ -1048,6 +1151,14 @@
#define glMultiTexCoord4s MANGLE(MultiTexCoord4s)
#define glMultiTexCoord4svARB MANGLE(MultiTexCoord4svARB)
#define glMultiTexCoord4sv MANGLE(MultiTexCoord4sv)
+#define glMultiTexCoordP1ui MANGLE(MultiTexCoordP1ui)
+#define glMultiTexCoordP1uiv MANGLE(MultiTexCoordP1uiv)
+#define glMultiTexCoordP2ui MANGLE(MultiTexCoordP2ui)
+#define glMultiTexCoordP2uiv MANGLE(MultiTexCoordP2uiv)
+#define glMultiTexCoordP3ui MANGLE(MultiTexCoordP3ui)
+#define glMultiTexCoordP3uiv MANGLE(MultiTexCoordP3uiv)
+#define glMultiTexCoordP4ui MANGLE(MultiTexCoordP4ui)
+#define glMultiTexCoordP4uiv MANGLE(MultiTexCoordP4uiv)
#define glMultiTexCoordPointerEXT MANGLE(MultiTexCoordPointerEXT)
#define glMultiTexEnvfEXT MANGLE(MultiTexEnvfEXT)
#define glMultiTexEnvfvEXT MANGLE(MultiTexEnvfvEXT)
@@ -1080,6 +1191,7 @@
#define glMultTransposeMatrixf MANGLE(MultTransposeMatrixf)
#define glNamedBufferDataEXT MANGLE(NamedBufferDataEXT)
#define glNamedBufferSubDataEXT MANGLE(NamedBufferSubDataEXT)
+#define glNamedCopyBufferSubDataEXT MANGLE(NamedCopyBufferSubDataEXT)
#define glNamedFramebufferRenderbufferEXT MANGLE(NamedFramebufferRenderbufferEXT)
#define glNamedFramebufferTexture1DEXT MANGLE(NamedFramebufferTexture1DEXT)
#define glNamedFramebufferTexture2DEXT MANGLE(NamedFramebufferTexture2DEXT)
@@ -1087,8 +1199,6 @@
#define glNamedFramebufferTextureEXT MANGLE(NamedFramebufferTextureEXT)
#define glNamedFramebufferTextureFaceEXT MANGLE(NamedFramebufferTextureFaceEXT)
#define glNamedFramebufferTextureLayerEXT MANGLE(NamedFramebufferTextureLayerEXT)
-#define glNamedMakeBufferNonResidentNV MANGLE(NamedMakeBufferNonResidentNV)
-#define glNamedMakeBufferResidentNV MANGLE(NamedMakeBufferResidentNV)
#define glNamedProgramLocalParameter4dEXT MANGLE(NamedProgramLocalParameter4dEXT)
#define glNamedProgramLocalParameter4dvEXT MANGLE(NamedProgramLocalParameter4dvEXT)
#define glNamedProgramLocalParameter4fEXT MANGLE(NamedProgramLocalParameter4fEXT)
@@ -1104,6 +1214,7 @@
#define glNamedRenderbufferStorageEXT MANGLE(NamedRenderbufferStorageEXT)
#define glNamedRenderbufferStorageMultisampleCoverageEXT MANGLE(NamedRenderbufferStorageMultisampleCoverageEXT)
#define glNamedRenderbufferStorageMultisampleEXT MANGLE(NamedRenderbufferStorageMultisampleEXT)
+#define glNamedStringARB MANGLE(NamedStringARB)
#define glNewList MANGLE(NewList)
#define glNewObjectBufferATI MANGLE(NewObjectBufferATI)
#define glNormal3b MANGLE(Normal3b)
@@ -1121,6 +1232,8 @@
#define glNormal3s MANGLE(Normal3s)
#define glNormal3sv MANGLE(Normal3sv)
#define glNormalFormatNV MANGLE(NormalFormatNV)
+#define glNormalP3ui MANGLE(NormalP3ui)
+#define glNormalP3uiv MANGLE(NormalP3uiv)
#define glNormalPointerEXT MANGLE(NormalPointerEXT)
#define glNormalPointerListIBM MANGLE(NormalPointerListIBM)
#define glNormalPointer MANGLE(NormalPointer)
@@ -1140,6 +1253,9 @@
#define glOrtho MANGLE(Ortho)
#define glPassTexCoordATI MANGLE(PassTexCoordATI)
#define glPassThrough MANGLE(PassThrough)
+#define glPatchParameterfv MANGLE(PatchParameterfv)
+#define glPatchParameteri MANGLE(PatchParameteri)
+#define glPauseTransformFeedback MANGLE(PauseTransformFeedback)
#define glPauseTransformFeedbackNV MANGLE(PauseTransformFeedbackNV)
#define glPixelDataRangeNV MANGLE(PixelDataRangeNV)
#define glPixelMapfv MANGLE(PixelMapfv)
@@ -1191,6 +1307,7 @@
#define glPrimitiveRestartNV MANGLE(PrimitiveRestartNV)
#define glPrioritizeTexturesEXT MANGLE(PrioritizeTexturesEXT)
#define glPrioritizeTextures MANGLE(PrioritizeTextures)
+#define glProgramBinary MANGLE(ProgramBinary)
#define glProgramBufferParametersfvNV MANGLE(ProgramBufferParametersfvNV)
#define glProgramBufferParametersIivNV MANGLE(ProgramBufferParametersIivNV)
#define glProgramBufferParametersIuivNV MANGLE(ProgramBufferParametersIuivNV)
@@ -1231,39 +1348,123 @@
#define glProgramParameters4dvNV MANGLE(ProgramParameters4dvNV)
#define glProgramParameters4fvNV MANGLE(ProgramParameters4fvNV)
#define glProgramStringARB MANGLE(ProgramStringARB)
+#define glProgramSubroutineParametersuivNV MANGLE(ProgramSubroutineParametersuivNV)
+#define glProgramUniform1dEXT MANGLE(ProgramUniform1dEXT)
+#define glProgramUniform1d MANGLE(ProgramUniform1d)
+#define glProgramUniform1dvEXT MANGLE(ProgramUniform1dvEXT)
+#define glProgramUniform1dv MANGLE(ProgramUniform1dv)
#define glProgramUniform1fEXT MANGLE(ProgramUniform1fEXT)
+#define glProgramUniform1f MANGLE(ProgramUniform1f)
#define glProgramUniform1fvEXT MANGLE(ProgramUniform1fvEXT)
+#define glProgramUniform1fv MANGLE(ProgramUniform1fv)
+#define glProgramUniform1i64NV MANGLE(ProgramUniform1i64NV)
+#define glProgramUniform1i64vNV MANGLE(ProgramUniform1i64vNV)
#define glProgramUniform1iEXT MANGLE(ProgramUniform1iEXT)
+#define glProgramUniform1i MANGLE(ProgramUniform1i)
#define glProgramUniform1ivEXT MANGLE(ProgramUniform1ivEXT)
+#define glProgramUniform1iv MANGLE(ProgramUniform1iv)
+#define glProgramUniform1ui64NV MANGLE(ProgramUniform1ui64NV)
+#define glProgramUniform1ui64vNV MANGLE(ProgramUniform1ui64vNV)
#define glProgramUniform1uiEXT MANGLE(ProgramUniform1uiEXT)
+#define glProgramUniform1ui MANGLE(ProgramUniform1ui)
#define glProgramUniform1uivEXT MANGLE(ProgramUniform1uivEXT)
+#define glProgramUniform1uiv MANGLE(ProgramUniform1uiv)
+#define glProgramUniform2dEXT MANGLE(ProgramUniform2dEXT)
+#define glProgramUniform2d MANGLE(ProgramUniform2d)
+#define glProgramUniform2dvEXT MANGLE(ProgramUniform2dvEXT)
+#define glProgramUniform2dv MANGLE(ProgramUniform2dv)
#define glProgramUniform2fEXT MANGLE(ProgramUniform2fEXT)
+#define glProgramUniform2f MANGLE(ProgramUniform2f)
#define glProgramUniform2fvEXT MANGLE(ProgramUniform2fvEXT)
+#define glProgramUniform2fv MANGLE(ProgramUniform2fv)
+#define glProgramUniform2i64NV MANGLE(ProgramUniform2i64NV)
+#define glProgramUniform2i64vNV MANGLE(ProgramUniform2i64vNV)
#define glProgramUniform2iEXT MANGLE(ProgramUniform2iEXT)
+#define glProgramUniform2i MANGLE(ProgramUniform2i)
#define glProgramUniform2ivEXT MANGLE(ProgramUniform2ivEXT)
+#define glProgramUniform2iv MANGLE(ProgramUniform2iv)
+#define glProgramUniform2ui64NV MANGLE(ProgramUniform2ui64NV)
+#define glProgramUniform2ui64vNV MANGLE(ProgramUniform2ui64vNV)
#define glProgramUniform2uiEXT MANGLE(ProgramUniform2uiEXT)
+#define glProgramUniform2ui MANGLE(ProgramUniform2ui)
#define glProgramUniform2uivEXT MANGLE(ProgramUniform2uivEXT)
+#define glProgramUniform2uiv MANGLE(ProgramUniform2uiv)
+#define glProgramUniform3dEXT MANGLE(ProgramUniform3dEXT)
+#define glProgramUniform3d MANGLE(ProgramUniform3d)
+#define glProgramUniform3dvEXT MANGLE(ProgramUniform3dvEXT)
+#define glProgramUniform3dv MANGLE(ProgramUniform3dv)
#define glProgramUniform3fEXT MANGLE(ProgramUniform3fEXT)
+#define glProgramUniform3f MANGLE(ProgramUniform3f)
#define glProgramUniform3fvEXT MANGLE(ProgramUniform3fvEXT)
+#define glProgramUniform3fv MANGLE(ProgramUniform3fv)
+#define glProgramUniform3i64NV MANGLE(ProgramUniform3i64NV)
+#define glProgramUniform3i64vNV MANGLE(ProgramUniform3i64vNV)
#define glProgramUniform3iEXT MANGLE(ProgramUniform3iEXT)
+#define glProgramUniform3i MANGLE(ProgramUniform3i)
#define glProgramUniform3ivEXT MANGLE(ProgramUniform3ivEXT)
+#define glProgramUniform3iv MANGLE(ProgramUniform3iv)
+#define glProgramUniform3ui64NV MANGLE(ProgramUniform3ui64NV)
+#define glProgramUniform3ui64vNV MANGLE(ProgramUniform3ui64vNV)
#define glProgramUniform3uiEXT MANGLE(ProgramUniform3uiEXT)
+#define glProgramUniform3ui MANGLE(ProgramUniform3ui)
#define glProgramUniform3uivEXT MANGLE(ProgramUniform3uivEXT)
+#define glProgramUniform3uiv MANGLE(ProgramUniform3uiv)
+#define glProgramUniform4dEXT MANGLE(ProgramUniform4dEXT)
+#define glProgramUniform4d MANGLE(ProgramUniform4d)
+#define glProgramUniform4dvEXT MANGLE(ProgramUniform4dvEXT)
+#define glProgramUniform4dv MANGLE(ProgramUniform4dv)
#define glProgramUniform4fEXT MANGLE(ProgramUniform4fEXT)
+#define glProgramUniform4f MANGLE(ProgramUniform4f)
#define glProgramUniform4fvEXT MANGLE(ProgramUniform4fvEXT)
+#define glProgramUniform4fv MANGLE(ProgramUniform4fv)
+#define glProgramUniform4i64NV MANGLE(ProgramUniform4i64NV)
+#define glProgramUniform4i64vNV MANGLE(ProgramUniform4i64vNV)
#define glProgramUniform4iEXT MANGLE(ProgramUniform4iEXT)
+#define glProgramUniform4i MANGLE(ProgramUniform4i)
#define glProgramUniform4ivEXT MANGLE(ProgramUniform4ivEXT)
+#define glProgramUniform4iv MANGLE(ProgramUniform4iv)
+#define glProgramUniform4ui64NV MANGLE(ProgramUniform4ui64NV)
+#define glProgramUniform4ui64vNV MANGLE(ProgramUniform4ui64vNV)
#define glProgramUniform4uiEXT MANGLE(ProgramUniform4uiEXT)
+#define glProgramUniform4ui MANGLE(ProgramUniform4ui)
#define glProgramUniform4uivEXT MANGLE(ProgramUniform4uivEXT)
+#define glProgramUniform4uiv MANGLE(ProgramUniform4uiv)
+#define glProgramUniformMatrix2dvEXT MANGLE(ProgramUniformMatrix2dvEXT)
+#define glProgramUniformMatrix2dv MANGLE(ProgramUniformMatrix2dv)
#define glProgramUniformMatrix2fvEXT MANGLE(ProgramUniformMatrix2fvEXT)
+#define glProgramUniformMatrix2fv MANGLE(ProgramUniformMatrix2fv)
+#define glProgramUniformMatrix2x3dvEXT MANGLE(ProgramUniformMatrix2x3dvEXT)
+#define glProgramUniformMatrix2x3dv MANGLE(ProgramUniformMatrix2x3dv)
#define glProgramUniformMatrix2x3fvEXT MANGLE(ProgramUniformMatrix2x3fvEXT)
+#define glProgramUniformMatrix2x3fv MANGLE(ProgramUniformMatrix2x3fv)
+#define glProgramUniformMatrix2x4dvEXT MANGLE(ProgramUniformMatrix2x4dvEXT)
+#define glProgramUniformMatrix2x4dv MANGLE(ProgramUniformMatrix2x4dv)
#define glProgramUniformMatrix2x4fvEXT MANGLE(ProgramUniformMatrix2x4fvEXT)
+#define glProgramUniformMatrix2x4fv MANGLE(ProgramUniformMatrix2x4fv)
+#define glProgramUniformMatrix3dvEXT MANGLE(ProgramUniformMatrix3dvEXT)
+#define glProgramUniformMatrix3dv MANGLE(ProgramUniformMatrix3dv)
#define glProgramUniformMatrix3fvEXT MANGLE(ProgramUniformMatrix3fvEXT)
+#define glProgramUniformMatrix3fv MANGLE(ProgramUniformMatrix3fv)
+#define glProgramUniformMatrix3x2dvEXT MANGLE(ProgramUniformMatrix3x2dvEXT)
+#define glProgramUniformMatrix3x2dv MANGLE(ProgramUniformMatrix3x2dv)
#define glProgramUniformMatrix3x2fvEXT MANGLE(ProgramUniformMatrix3x2fvEXT)
+#define glProgramUniformMatrix3x2fv MANGLE(ProgramUniformMatrix3x2fv)
+#define glProgramUniformMatrix3x4dvEXT MANGLE(ProgramUniformMatrix3x4dvEXT)
+#define glProgramUniformMatrix3x4dv MANGLE(ProgramUniformMatrix3x4dv)
#define glProgramUniformMatrix3x4fvEXT MANGLE(ProgramUniformMatrix3x4fvEXT)
+#define glProgramUniformMatrix3x4fv MANGLE(ProgramUniformMatrix3x4fv)
+#define glProgramUniformMatrix4dvEXT MANGLE(ProgramUniformMatrix4dvEXT)
+#define glProgramUniformMatrix4dv MANGLE(ProgramUniformMatrix4dv)
#define glProgramUniformMatrix4fvEXT MANGLE(ProgramUniformMatrix4fvEXT)
+#define glProgramUniformMatrix4fv MANGLE(ProgramUniformMatrix4fv)
+#define glProgramUniformMatrix4x2dvEXT MANGLE(ProgramUniformMatrix4x2dvEXT)
+#define glProgramUniformMatrix4x2dv MANGLE(ProgramUniformMatrix4x2dv)
#define glProgramUniformMatrix4x2fvEXT MANGLE(ProgramUniformMatrix4x2fvEXT)
+#define glProgramUniformMatrix4x2fv MANGLE(ProgramUniformMatrix4x2fv)
+#define glProgramUniformMatrix4x3dvEXT MANGLE(ProgramUniformMatrix4x3dvEXT)
+#define glProgramUniformMatrix4x3dv MANGLE(ProgramUniformMatrix4x3dv)
#define glProgramUniformMatrix4x3fvEXT MANGLE(ProgramUniformMatrix4x3fvEXT)
+#define glProgramUniformMatrix4x3fv MANGLE(ProgramUniformMatrix4x3fv)
#define glProgramUniformui64NV MANGLE(ProgramUniformui64NV)
#define glProgramUniformui64vNV MANGLE(ProgramUniformui64vNV)
#define glProgramVertexLimitNV MANGLE(ProgramVertexLimitNV)
@@ -1274,6 +1475,7 @@
#define glPushClientAttrib MANGLE(PushClientAttrib)
#define glPushMatrix MANGLE(PushMatrix)
#define glPushName MANGLE(PushName)
+#define glQueryCounter MANGLE(QueryCounter)
#define glRasterPos2d MANGLE(RasterPos2d)
#define glRasterPos2dv MANGLE(RasterPos2dv)
#define glRasterPos2f MANGLE(RasterPos2f)
@@ -1300,6 +1502,7 @@
#define glRasterPos4sv MANGLE(RasterPos4sv)
#define glReadBuffer MANGLE(ReadBuffer)
#define glReadInstrumentsSGIX MANGLE(ReadInstrumentsSGIX)
+#define glReadnPixelsARB MANGLE(ReadnPixelsARB)
#define glReadPixels MANGLE(ReadPixels)
#define glRectd MANGLE(Rectd)
#define glRectdv MANGLE(Rectdv)
@@ -1310,6 +1513,7 @@
#define glRects MANGLE(Rects)
#define glRectsv MANGLE(Rectsv)
#define glReferencePlaneSGIX MANGLE(ReferencePlaneSGIX)
+#define glReleaseShaderCompiler MANGLE(ReleaseShaderCompiler)
#define glRenderbufferStorageEXT MANGLE(RenderbufferStorageEXT)
#define glRenderbufferStorage MANGLE(RenderbufferStorage)
#define glRenderbufferStorageMultisampleCoverageNV MANGLE(RenderbufferStorageMultisampleCoverageNV)
@@ -1345,6 +1549,7 @@
#define glResetMinmaxEXT MANGLE(ResetMinmaxEXT)
#define glResetMinmax MANGLE(ResetMinmax)
#define glResizeBuffersMESA MANGLE(ResizeBuffersMESA)
+#define glResumeTransformFeedback MANGLE(ResumeTransformFeedback)
#define glResumeTransformFeedbackNV MANGLE(ResumeTransformFeedbackNV)
#define glRotated MANGLE(Rotated)
#define glRotatef MANGLE(Rotatef)
@@ -1357,8 +1562,17 @@
#define glSampleMaskSGIS MANGLE(SampleMaskSGIS)
#define glSamplePatternEXT MANGLE(SamplePatternEXT)
#define glSamplePatternSGIS MANGLE(SamplePatternSGIS)
+#define glSamplerParameterf MANGLE(SamplerParameterf)
+#define glSamplerParameterfv MANGLE(SamplerParameterfv)
+#define glSamplerParameterIiv MANGLE(SamplerParameterIiv)
+#define glSamplerParameteri MANGLE(SamplerParameteri)
+#define glSamplerParameterIuiv MANGLE(SamplerParameterIuiv)
+#define glSamplerParameteriv MANGLE(SamplerParameteriv)
#define glScaled MANGLE(Scaled)
#define glScalef MANGLE(Scalef)
+#define glScissorArrayv MANGLE(ScissorArrayv)
+#define glScissorIndexed MANGLE(ScissorIndexed)
+#define glScissorIndexedv MANGLE(ScissorIndexedv)
#define glScissor MANGLE(Scissor)
#define glSecondaryColor3bEXT MANGLE(SecondaryColor3bEXT)
#define glSecondaryColor3b MANGLE(SecondaryColor3b)
@@ -1395,6 +1609,8 @@
#define glSecondaryColor3usvEXT MANGLE(SecondaryColor3usvEXT)
#define glSecondaryColor3usv MANGLE(SecondaryColor3usv)
#define glSecondaryColorFormatNV MANGLE(SecondaryColorFormatNV)
+#define glSecondaryColorP3ui MANGLE(SecondaryColorP3ui)
+#define glSecondaryColorP3uiv MANGLE(SecondaryColorP3uiv)
#define glSecondaryColorPointerEXT MANGLE(SecondaryColorPointerEXT)
#define glSecondaryColorPointerListIBM MANGLE(SecondaryColorPointerListIBM)
#define glSecondaryColorPointer MANGLE(SecondaryColorPointer)
@@ -1408,6 +1624,7 @@
#define glSetInvariantEXT MANGLE(SetInvariantEXT)
#define glSetLocalConstantEXT MANGLE(SetLocalConstantEXT)
#define glShadeModel MANGLE(ShadeModel)
+#define glShaderBinary MANGLE(ShaderBinary)
#define glShaderOp1EXT MANGLE(ShaderOp1EXT)
#define glShaderOp2EXT MANGLE(ShaderOp2EXT)
#define glShaderOp3EXT MANGLE(ShaderOp3EXT)
@@ -1509,6 +1726,14 @@
#define glTexCoord4s MANGLE(TexCoord4s)
#define glTexCoord4sv MANGLE(TexCoord4sv)
#define glTexCoordFormatNV MANGLE(TexCoordFormatNV)
+#define glTexCoordP1ui MANGLE(TexCoordP1ui)
+#define glTexCoordP1uiv MANGLE(TexCoordP1uiv)
+#define glTexCoordP2ui MANGLE(TexCoordP2ui)
+#define glTexCoordP2uiv MANGLE(TexCoordP2uiv)
+#define glTexCoordP3ui MANGLE(TexCoordP3ui)
+#define glTexCoordP3uiv MANGLE(TexCoordP3uiv)
+#define glTexCoordP4ui MANGLE(TexCoordP4ui)
+#define glTexCoordP4uiv MANGLE(TexCoordP4uiv)
#define glTexCoordPointerEXT MANGLE(TexCoordPointerEXT)
#define glTexCoordPointerListIBM MANGLE(TexCoordPointerListIBM)
#define glTexCoordPointer MANGLE(TexCoordPointer)
@@ -1569,73 +1794,108 @@
#define glTextureSubImage3DEXT MANGLE(TextureSubImage3DEXT)
#define glTrackMatrixNV MANGLE(TrackMatrixNV)
#define glTransformFeedbackAttribsNV MANGLE(TransformFeedbackAttribsNV)
+#define glTransformFeedbackStreamAttribsNV MANGLE(TransformFeedbackStreamAttribsNV)
#define glTransformFeedbackVaryingsEXT MANGLE(TransformFeedbackVaryingsEXT)
#define glTransformFeedbackVaryings MANGLE(TransformFeedbackVaryings)
#define glTransformFeedbackVaryingsNV MANGLE(TransformFeedbackVaryingsNV)
#define glTranslated MANGLE(Translated)
#define glTranslatef MANGLE(Translatef)
+#define glUniform1d MANGLE(Uniform1d)
+#define glUniform1dv MANGLE(Uniform1dv)
#define glUniform1fARB MANGLE(Uniform1fARB)
#define glUniform1f MANGLE(Uniform1f)
#define glUniform1fvARB MANGLE(Uniform1fvARB)
#define glUniform1fv MANGLE(Uniform1fv)
+#define glUniform1i64NV MANGLE(Uniform1i64NV)
+#define glUniform1i64vNV MANGLE(Uniform1i64vNV)
#define glUniform1iARB MANGLE(Uniform1iARB)
#define glUniform1i MANGLE(Uniform1i)
#define glUniform1ivARB MANGLE(Uniform1ivARB)
#define glUniform1iv MANGLE(Uniform1iv)
+#define glUniform1ui64NV MANGLE(Uniform1ui64NV)
+#define glUniform1ui64vNV MANGLE(Uniform1ui64vNV)
#define glUniform1uiEXT MANGLE(Uniform1uiEXT)
#define glUniform1ui MANGLE(Uniform1ui)
#define glUniform1uivEXT MANGLE(Uniform1uivEXT)
#define glUniform1uiv MANGLE(Uniform1uiv)
+#define glUniform2d MANGLE(Uniform2d)
+#define glUniform2dv MANGLE(Uniform2dv)
#define glUniform2fARB MANGLE(Uniform2fARB)
#define glUniform2f MANGLE(Uniform2f)
#define glUniform2fvARB MANGLE(Uniform2fvARB)
#define glUniform2fv MANGLE(Uniform2fv)
+#define glUniform2i64NV MANGLE(Uniform2i64NV)
+#define glUniform2i64vNV MANGLE(Uniform2i64vNV)
#define glUniform2iARB MANGLE(Uniform2iARB)
#define glUniform2i MANGLE(Uniform2i)
#define glUniform2ivARB MANGLE(Uniform2ivARB)
#define glUniform2iv MANGLE(Uniform2iv)
+#define glUniform2ui64NV MANGLE(Uniform2ui64NV)
+#define glUniform2ui64vNV MANGLE(Uniform2ui64vNV)
#define glUniform2uiEXT MANGLE(Uniform2uiEXT)
#define glUniform2ui MANGLE(Uniform2ui)
#define glUniform2uivEXT MANGLE(Uniform2uivEXT)
#define glUniform2uiv MANGLE(Uniform2uiv)
+#define glUniform3d MANGLE(Uniform3d)
+#define glUniform3dv MANGLE(Uniform3dv)
#define glUniform3fARB MANGLE(Uniform3fARB)
#define glUniform3f MANGLE(Uniform3f)
#define glUniform3fvARB MANGLE(Uniform3fvARB)
#define glUniform3fv MANGLE(Uniform3fv)
+#define glUniform3i64NV MANGLE(Uniform3i64NV)
+#define glUniform3i64vNV MANGLE(Uniform3i64vNV)
#define glUniform3iARB MANGLE(Uniform3iARB)
#define glUniform3i MANGLE(Uniform3i)
#define glUniform3ivARB MANGLE(Uniform3ivARB)
#define glUniform3iv MANGLE(Uniform3iv)
+#define glUniform3ui64NV MANGLE(Uniform3ui64NV)
+#define glUniform3ui64vNV MANGLE(Uniform3ui64vNV)
#define glUniform3uiEXT MANGLE(Uniform3uiEXT)
#define glUniform3ui MANGLE(Uniform3ui)
#define glUniform3uivEXT MANGLE(Uniform3uivEXT)
#define glUniform3uiv MANGLE(Uniform3uiv)
+#define glUniform4d MANGLE(Uniform4d)
+#define glUniform4dv MANGLE(Uniform4dv)
#define glUniform4fARB MANGLE(Uniform4fARB)
#define glUniform4f MANGLE(Uniform4f)
#define glUniform4fvARB MANGLE(Uniform4fvARB)
#define glUniform4fv MANGLE(Uniform4fv)
+#define glUniform4i64NV MANGLE(Uniform4i64NV)
+#define glUniform4i64vNV MANGLE(Uniform4i64vNV)
#define glUniform4iARB MANGLE(Uniform4iARB)
#define glUniform4i MANGLE(Uniform4i)
#define glUniform4ivARB MANGLE(Uniform4ivARB)
#define glUniform4iv MANGLE(Uniform4iv)
+#define glUniform4ui64NV MANGLE(Uniform4ui64NV)
+#define glUniform4ui64vNV MANGLE(Uniform4ui64vNV)
#define glUniform4uiEXT MANGLE(Uniform4uiEXT)
#define glUniform4ui MANGLE(Uniform4ui)
#define glUniform4uivEXT MANGLE(Uniform4uivEXT)
#define glUniform4uiv MANGLE(Uniform4uiv)
#define glUniformBlockBinding MANGLE(UniformBlockBinding)
#define glUniformBufferEXT MANGLE(UniformBufferEXT)
+#define glUniformMatrix2dv MANGLE(UniformMatrix2dv)
#define glUniformMatrix2fvARB MANGLE(UniformMatrix2fvARB)
#define glUniformMatrix2fv MANGLE(UniformMatrix2fv)
+#define glUniformMatrix2x3dv MANGLE(UniformMatrix2x3dv)
#define glUniformMatrix2x3fv MANGLE(UniformMatrix2x3fv)
+#define glUniformMatrix2x4dv MANGLE(UniformMatrix2x4dv)
#define glUniformMatrix2x4fv MANGLE(UniformMatrix2x4fv)
+#define glUniformMatrix3dv MANGLE(UniformMatrix3dv)
#define glUniformMatrix3fvARB MANGLE(UniformMatrix3fvARB)
#define glUniformMatrix3fv MANGLE(UniformMatrix3fv)
+#define glUniformMatrix3x2dv MANGLE(UniformMatrix3x2dv)
#define glUniformMatrix3x2fv MANGLE(UniformMatrix3x2fv)
+#define glUniformMatrix3x4dv MANGLE(UniformMatrix3x4dv)
#define glUniformMatrix3x4fv MANGLE(UniformMatrix3x4fv)
+#define glUniformMatrix4dv MANGLE(UniformMatrix4dv)
#define glUniformMatrix4fvARB MANGLE(UniformMatrix4fvARB)
#define glUniformMatrix4fv MANGLE(UniformMatrix4fv)
+#define glUniformMatrix4x2dv MANGLE(UniformMatrix4x2dv)
#define glUniformMatrix4x2fv MANGLE(UniformMatrix4x2fv)
+#define glUniformMatrix4x3dv MANGLE(UniformMatrix4x3dv)
#define glUniformMatrix4x3fv MANGLE(UniformMatrix4x3fv)
+#define glUniformSubroutinesuiv MANGLE(UniformSubroutinesuiv)
#define glUniformui64NV MANGLE(Uniformui64NV)
#define glUniformui64vNV MANGLE(Uniformui64vNV)
#define glUnlockArraysEXT MANGLE(UnlockArraysEXT)
@@ -1646,9 +1906,11 @@
#define glUpdateObjectBufferATI MANGLE(UpdateObjectBufferATI)
#define glUseProgram MANGLE(UseProgram)
#define glUseProgramObjectARB MANGLE(UseProgramObjectARB)
+#define glUseProgramStages MANGLE(UseProgramStages)
#define glUseShaderProgramEXT MANGLE(UseShaderProgramEXT)
#define glValidateProgramARB MANGLE(ValidateProgramARB)
#define glValidateProgram MANGLE(ValidateProgram)
+#define glValidateProgramPipeline MANGLE(ValidateProgramPipeline)
#define glVariantArrayObjectATI MANGLE(VariantArrayObjectATI)
#define glVariantbvEXT MANGLE(VariantbvEXT)
#define glVariantdvEXT MANGLE(VariantdvEXT)
@@ -1659,6 +1921,16 @@
#define glVariantubvEXT MANGLE(VariantubvEXT)
#define glVariantuivEXT MANGLE(VariantuivEXT)
#define glVariantusvEXT MANGLE(VariantusvEXT)
+#define glVDPAUFiniNV MANGLE(VDPAUFiniNV)
+#define glVDPAUGetSurfaceivNV MANGLE(VDPAUGetSurfaceivNV)
+#define glVDPAUInitNV MANGLE(VDPAUInitNV)
+#define glVDPAUIsSurfaceNV MANGLE(VDPAUIsSurfaceNV)
+#define glVDPAUMapSurfacesNV MANGLE(VDPAUMapSurfacesNV)
+#define glVDPAURegisterOutputSurfaceNV MANGLE(VDPAURegisterOutputSurfaceNV)
+#define glVDPAURegisterVideoSurfaceNV MANGLE(VDPAURegisterVideoSurfaceNV)
+#define glVDPAUSurfaceAccessNV MANGLE(VDPAUSurfaceAccessNV)
+#define glVDPAUUnmapSurfacesNV MANGLE(VDPAUUnmapSurfacesNV)
+#define glVDPAUUnregisterSurfaceNV MANGLE(VDPAUUnregisterSurfaceNV)
#define glVertex2d MANGLE(Vertex2d)
#define glVertex2dv MANGLE(Vertex2dv)
#define glVertex2f MANGLE(Vertex2f)
@@ -1692,6 +1964,7 @@
#define glVertexArrayParameteriAPPLE MANGLE(VertexArrayParameteriAPPLE)
#define glVertexArrayRangeAPPLE MANGLE(VertexArrayRangeAPPLE)
#define glVertexArrayRangeNV MANGLE(VertexArrayRangeNV)
+#define glVertexArrayVertexAttribLOffsetEXT MANGLE(VertexArrayVertexAttribLOffsetEXT)
#define glVertexAttrib1dARB MANGLE(VertexAttrib1dARB)
#define glVertexAttrib1d MANGLE(VertexAttrib1d)
#define glVertexAttrib1dNV MANGLE(VertexAttrib1dNV)
@@ -1800,6 +2073,7 @@
#define glVertexAttrib4usv MANGLE(VertexAttrib4usv)
#define glVertexAttribArrayObjectATI MANGLE(VertexAttribArrayObjectATI)
#define glVertexAttribDivisorARB MANGLE(VertexAttribDivisorARB)
+#define glVertexAttribDivisor MANGLE(VertexAttribDivisor)
#define glVertexAttribFormatNV MANGLE(VertexAttribFormatNV)
#define glVertexAttribI1iEXT MANGLE(VertexAttribI1iEXT)
#define glVertexAttribI1i MANGLE(VertexAttribI1i)
@@ -1844,6 +2118,49 @@
#define glVertexAttribIFormatNV MANGLE(VertexAttribIFormatNV)
#define glVertexAttribIPointerEXT MANGLE(VertexAttribIPointerEXT)
#define glVertexAttribIPointer MANGLE(VertexAttribIPointer)
+#define glVertexAttribL1dEXT MANGLE(VertexAttribL1dEXT)
+#define glVertexAttribL1d MANGLE(VertexAttribL1d)
+#define glVertexAttribL1dvEXT MANGLE(VertexAttribL1dvEXT)
+#define glVertexAttribL1dv MANGLE(VertexAttribL1dv)
+#define glVertexAttribL1i64NV MANGLE(VertexAttribL1i64NV)
+#define glVertexAttribL1i64vNV MANGLE(VertexAttribL1i64vNV)
+#define glVertexAttribL1ui64NV MANGLE(VertexAttribL1ui64NV)
+#define glVertexAttribL1ui64vNV MANGLE(VertexAttribL1ui64vNV)
+#define glVertexAttribL2dEXT MANGLE(VertexAttribL2dEXT)
+#define glVertexAttribL2d MANGLE(VertexAttribL2d)
+#define glVertexAttribL2dvEXT MANGLE(VertexAttribL2dvEXT)
+#define glVertexAttribL2dv MANGLE(VertexAttribL2dv)
+#define glVertexAttribL2i64NV MANGLE(VertexAttribL2i64NV)
+#define glVertexAttribL2i64vNV MANGLE(VertexAttribL2i64vNV)
+#define glVertexAttribL2ui64NV MANGLE(VertexAttribL2ui64NV)
+#define glVertexAttribL2ui64vNV MANGLE(VertexAttribL2ui64vNV)
+#define glVertexAttribL3dEXT MANGLE(VertexAttribL3dEXT)
+#define glVertexAttribL3d MANGLE(VertexAttribL3d)
+#define glVertexAttribL3dvEXT MANGLE(VertexAttribL3dvEXT)
+#define glVertexAttribL3dv MANGLE(VertexAttribL3dv)
+#define glVertexAttribL3i64NV MANGLE(VertexAttribL3i64NV)
+#define glVertexAttribL3i64vNV MANGLE(VertexAttribL3i64vNV)
+#define glVertexAttribL3ui64NV MANGLE(VertexAttribL3ui64NV)
+#define glVertexAttribL3ui64vNV MANGLE(VertexAttribL3ui64vNV)
+#define glVertexAttribL4dEXT MANGLE(VertexAttribL4dEXT)
+#define glVertexAttribL4d MANGLE(VertexAttribL4d)
+#define glVertexAttribL4dvEXT MANGLE(VertexAttribL4dvEXT)
+#define glVertexAttribL4dv MANGLE(VertexAttribL4dv)
+#define glVertexAttribL4i64NV MANGLE(VertexAttribL4i64NV)
+#define glVertexAttribL4i64vNV MANGLE(VertexAttribL4i64vNV)
+#define glVertexAttribL4ui64NV MANGLE(VertexAttribL4ui64NV)
+#define glVertexAttribL4ui64vNV MANGLE(VertexAttribL4ui64vNV)
+#define glVertexAttribLFormatNV MANGLE(VertexAttribLFormatNV)
+#define glVertexAttribLPointerEXT MANGLE(VertexAttribLPointerEXT)
+#define glVertexAttribLPointer MANGLE(VertexAttribLPointer)
+#define glVertexAttribP1ui MANGLE(VertexAttribP1ui)
+#define glVertexAttribP1uiv MANGLE(VertexAttribP1uiv)
+#define glVertexAttribP2ui MANGLE(VertexAttribP2ui)
+#define glVertexAttribP2uiv MANGLE(VertexAttribP2uiv)
+#define glVertexAttribP3ui MANGLE(VertexAttribP3ui)
+#define glVertexAttribP3uiv MANGLE(VertexAttribP3uiv)
+#define glVertexAttribP4ui MANGLE(VertexAttribP4ui)
+#define glVertexAttribP4uiv MANGLE(VertexAttribP4uiv)
#define glVertexAttribPointerARB MANGLE(VertexAttribPointerARB)
#define glVertexAttribPointer MANGLE(VertexAttribPointer)
#define glVertexAttribPointerNV MANGLE(VertexAttribPointerNV)
@@ -1868,6 +2185,12 @@
#define glVertexBlendEnvfATI MANGLE(VertexBlendEnvfATI)
#define glVertexBlendEnviATI MANGLE(VertexBlendEnviATI)
#define glVertexFormatNV MANGLE(VertexFormatNV)
+#define glVertexP2ui MANGLE(VertexP2ui)
+#define glVertexP2uiv MANGLE(VertexP2uiv)
+#define glVertexP3ui MANGLE(VertexP3ui)
+#define glVertexP3uiv MANGLE(VertexP3uiv)
+#define glVertexP4ui MANGLE(VertexP4ui)
+#define glVertexP4uiv MANGLE(VertexP4uiv)
#define glVertexPointerEXT MANGLE(VertexPointerEXT)
#define glVertexPointerListIBM MANGLE(VertexPointerListIBM)
#define glVertexPointer MANGLE(VertexPointer)
@@ -1913,6 +2236,9 @@
#define glVideoCaptureStreamParameterdvNV MANGLE(VideoCaptureStreamParameterdvNV)
#define glVideoCaptureStreamParameterfvNV MANGLE(VideoCaptureStreamParameterfvNV)
#define glVideoCaptureStreamParameterivNV MANGLE(VideoCaptureStreamParameterivNV)
+#define glViewportArrayv MANGLE(ViewportArrayv)
+#define glViewportIndexedf MANGLE(ViewportIndexedf)
+#define glViewportIndexedfv MANGLE(ViewportIndexedfv)
#define glViewport MANGLE(Viewport)
#define glWaitSync MANGLE(WaitSync)
#define glWeightbvARB MANGLE(WeightbvARB)
diff --git a/include/GL/glext.h b/include/GL/glext.h
index 9818cbc99c9..6e5e6a11180 100644
--- a/include/GL/glext.h
+++ b/include/GL/glext.h
@@ -29,9 +29,9 @@ extern "C" {
*/
/* Header file version number, required by OpenGL ABI for Linux */
-/* glext.h last updated $Date: 2010-11-03 18:59:30 -0700 (Wed, 03 Nov 2010) $ */
+/* glext.h last updated $Date: 2010-12-09 02:15:08 -0800 (Thu, 09 Dec 2010) $ */
/* Current version at http://www.opengl.org/registry/ */
-#define GL_GLEXT_VERSION 66
+#define GL_GLEXT_VERSION 67
/* Function declaration macros - to move into glplatform.h */
#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__)
@@ -5026,6 +5026,12 @@ extern "C" {
#define GL_DEPTH_CLAMP_FAR_AMD 0x901F
#endif
+#ifndef GL_EXT_texture_sRGB_decode
+#define GL_TEXTURE_SRGB_DECODE_EXT 0x8A48
+#define GL_DECODE_EXT 0x8A49
+#define GL_SKIP_DECODE_EXT 0x8A4A
+#endif
+
/*************************************************************/
@@ -11031,6 +11037,10 @@ typedef void (APIENTRYP PFNGLVDPAUUNMAPSURFACESNVPROC) (GLsizei numSurface, cons
#define GL_AMD_depth_clamp_separate 1
#endif
+#ifndef GL_EXT_texture_sRGB_decode
+#define GL_EXT_texture_sRGB_decode 1
+#endif
+
#ifdef __cplusplus
}
diff --git a/include/GL/internal/dri_interface.h b/include/GL/internal/dri_interface.h
index 2c4d9069813..ecd4a90ded4 100644
--- a/include/GL/internal/dri_interface.h
+++ b/include/GL/internal/dri_interface.h
@@ -251,6 +251,15 @@ struct __DRItexBufferExtensionRec {
GLint target,
GLint format,
__DRIdrawable *pDraw);
+ /**
+ * Method to release texture buffer in case some special platform
+ * need this.
+ *
+ * For GLX_EXT_texture_from_pixmap with AIGLX.
+ */
+ void (*releaseTexBuffer)(__DRIcontext *pDRICtx,
+ GLint target,
+ __DRIdrawable *pDraw);
};
/**
@@ -490,6 +499,7 @@ struct __DRIuseInvalidateExtensionRec {
#define __DRI_ATTRIB_BIND_TO_MIPMAP_TEXTURE 45
#define __DRI_ATTRIB_BIND_TO_TEXTURE_TARGETS 46
#define __DRI_ATTRIB_YINVERTED 47
+#define __DRI_ATTRIB_FRAMEBUFFER_SRGB_CAPABLE 48
/* __DRI_ATTRIB_RENDER_TYPE */
#define __DRI_ATTRIB_RGBA_BIT 0x01
@@ -647,7 +657,7 @@ struct __DRIlegacyExtensionRec {
* conjunction with the core extension.
*/
#define __DRI_SWRAST "DRI_SWRast"
-#define __DRI_SWRAST_VERSION 1
+#define __DRI_SWRAST_VERSION 2
struct __DRIswrastExtensionRec {
__DRIextension base;
@@ -660,6 +670,13 @@ struct __DRIswrastExtensionRec {
__DRIdrawable *(*createNewDrawable)(__DRIscreen *screen,
const __DRIconfig *config,
void *loaderPrivate);
+
+ /* Since version 2 */
+ __DRIcontext *(*createNewContextForAPI)(__DRIscreen *screen,
+ int api,
+ const __DRIconfig *config,
+ __DRIcontext *shared,
+ void *data);
};
/**
@@ -769,6 +786,14 @@ struct __DRIdri2ExtensionRec {
const __DRIconfig *config,
__DRIcontext *shared,
void *data);
+
+ __DRIbuffer *(*allocateBuffer)(__DRIscreen *screen,
+ unsigned int attachment,
+ unsigned int format,
+ int width,
+ int height);
+ void (*releaseBuffer)(__DRIscreen *screen,
+ __DRIbuffer *buffer);
};
diff --git a/scons/crossmingw.py b/scons/crossmingw.py
index 8af0d93f01a..cc046229e2c 100644
--- a/scons/crossmingw.py
+++ b/scons/crossmingw.py
@@ -194,5 +194,8 @@ def generate(env):
env.AppendUnique(SHLINKFLAGS = ['-Wl,--enable-stdcall-fixup'])
#env.AppendUnique(SHLINKFLAGS = ['-Wl,--kill-at'])
+ # Avoid depending on gcc runtime DLLs
+ env.AppendUnique(LINKFLAGS = ['-static-libgcc'])
+
def exists(env):
return find(env)
diff --git a/scons/custom.py b/scons/custom.py
index 364da292dd3..7c59fe985d0 100644
--- a/scons/custom.py
+++ b/scons/custom.py
@@ -56,6 +56,8 @@ def quietCommandLines(env):
env['SHLINKCOMSTR'] = " Linking $TARGET ..."
env['LDMODULECOMSTR'] = " Linking $TARGET ..."
env['SWIGCOMSTR'] = " Generating $TARGET ..."
+ env['LEXCOMSTR'] = " Generating $TARGET ..."
+ env['YACCCOMSTR'] = " Generating $TARGET ..."
env['CODEGENCOMSTR'] = " Generating $TARGET ..."
diff --git a/scons/gallium.py b/scons/gallium.py
index 75e9b9e7fc3..4dcb8d0a423 100644..100755
--- a/scons/gallium.py
+++ b/scons/gallium.py
@@ -35,6 +35,7 @@ import os
import os.path
import re
import subprocess
+import platform as _platform
import SCons.Action
import SCons.Builder
@@ -141,6 +142,10 @@ def pkg_config_modules(env, name, modules):
def generate(env):
"""Common environment generation code"""
+ # Tell tools which machine to compile for
+ env['TARGET_ARCH'] = env['machine']
+ env['MSVS_ARCH'] = env['machine']
+
# Toolchain
platform = env['platform']
if env['toolchain'] == 'default':
@@ -175,6 +180,10 @@ def generate(env):
env['gcc'] = 'gcc' in os.path.basename(env['CC']).split('-')
env['msvc'] = env['CC'] == 'cl'
+ if env['msvc'] and env['toolchain'] == 'default' and env['machine'] == 'x86_64':
+ # MSVC x64 support is broken in earlier versions of scons
+ env.EnsurePythonVersion(2, 0)
+
# shortcuts
machine = env['machine']
platform = env['platform']
@@ -183,6 +192,27 @@ def generate(env):
gcc = env['gcc']
msvc = env['msvc']
+ # Determine whether we are cross compiling; in particular, whether we need
+ # to compile code generators with a different compiler as the target code.
+ host_platform = _platform.system().lower()
+ if host_platform.startswith('cygwin'):
+ host_platform = 'cygwin'
+ host_machine = os.environ.get('PROCESSOR_ARCHITEW6432', os.environ.get('PROCESSOR_ARCHITECTURE', _platform.machine()))
+ host_machine = {
+ 'x86': 'x86',
+ 'i386': 'x86',
+ 'i486': 'x86',
+ 'i586': 'x86',
+ 'i686': 'x86',
+ 'ppc' : 'ppc',
+ 'AMD64': 'x86_64',
+ 'x86_64': 'x86_64',
+ }.get(host_machine, 'generic')
+ env['crosscompile'] = platform != host_platform
+ if machine == 'x86_64' and host_machine != 'x86_64':
+ env['crosscompile'] = True
+ env['hostonly'] = False
+
# Backwards compatability with the debug= profile= options
if env['build'] == 'debug':
if not env['debug']:
@@ -349,12 +379,15 @@ def generate(env):
'-m32',
#'-march=pentium4',
]
- if distutils.version.LooseVersion(ccversion) >= distutils.version.LooseVersion('4.2'):
+ if distutils.version.LooseVersion(ccversion) >= distutils.version.LooseVersion('4.2') \
+ and (platform != 'windows' or env['build'] == 'debug' or True):
# NOTE: We need to ensure stack is realigned given that we
# produce shared objects, and have no control over the stack
# alignment policy of the application. Therefore we need
# -mstackrealign ore -mincoming-stack-boundary=2.
#
+ # XXX: -O and -mstackrealign causes stack corruption on MinGW
+ #
# XXX: We could have SSE without -mstackrealign if we always used
# __attribute__((force_align_arg_pointer)), but that's not
# always the case.
@@ -402,13 +435,19 @@ def generate(env):
'/Od', # disable optimizations
'/Oi', # enable intrinsic functions
'/Oy-', # disable frame pointer omission
- '/GL-', # disable whole program optimization
]
else:
ccflags += [
'/O2', # optimize for speed
+ ]
+ if env['build'] == 'release':
+ ccflags += [
'/GL', # enable whole program optimization
]
+ else:
+ ccflags += [
+ '/GL-', # disable whole program optimization
+ ]
ccflags += [
'/fp:fast', # fast floating point
'/W3', # warning level
@@ -498,7 +537,7 @@ def generate(env):
else:
env['_LIBFLAGS'] = '-Wl,--start-group ' + env['_LIBFLAGS'] + ' -Wl,--end-group'
if msvc:
- if env['build'] != 'debug':
+ if env['build'] == 'release':
# enable Link-time Code Generation
linkflags += ['/LTCG']
env.Append(ARFLAGS = ['/LTCG'])
@@ -551,13 +590,18 @@ def generate(env):
env.Append(LINKFLAGS = linkflags)
env.Append(SHLINKFLAGS = shlinkflags)
+ # We have C++ in several libraries, so always link with the C++ compiler
+ if env['gcc']:
+ env['LINK'] = env['CXX']
+
# Default libs
env.Append(LIBS = [])
# Load tools
+ env.Tool('lex')
+ env.Tool('yacc')
if env['llvm']:
env.Tool('llvm')
- env.Tool('udis86')
pkg_config_modules(env, 'x11', ['x11', 'xext'])
pkg_config_modules(env, 'drm', ['libdrm'])
diff --git a/scons/llvm.py b/scons/llvm.py
index 1b033acb1b3..b89899bbf87 100644
--- a/scons/llvm.py
+++ b/scons/llvm.py
@@ -142,13 +142,11 @@ def generate(env):
try:
env.ParseConfig('llvm-config --cppflags')
- env.ParseConfig('llvm-config --libs jit interpreter nativecodegen bitwriter')
+ env.ParseConfig('llvm-config --libs')
env.ParseConfig('llvm-config --ldflags')
except OSError:
print 'scons: llvm-config version %s failed' % llvm_version
return
- else:
- env['LINK'] = env['CXX']
assert llvm_version is not None
env['llvm'] = True
diff --git a/scons/udis86.py b/scons/udis86.py
deleted file mode 100644
index bb91d3c35cf..00000000000
--- a/scons/udis86.py
+++ /dev/null
@@ -1,44 +0,0 @@
-"""udis86
-
-Tool-specific initialization for udis86
-
-"""
-
-#
-# Copyright (c) 2009 VMware, Inc.
-#
-# Permission is hereby granted, free of charge, to any person obtaining
-# a copy of this software and associated documentation files (the
-# "Software"), to deal in the Software without restriction, including
-# without limitation the rights to use, copy, modify, merge, publish,
-# distribute, sublicense, and/or sell copies of the Software, and to
-# permit persons to whom the Software is furnished to do so, subject to
-# the following conditions:
-#
-# The above copyright notice and this permission notice shall be included
-# in all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
-# KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
-# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-# NONINFRINGEMENT. IN NO EVENT SHALL 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.
-#
-
-def generate(env):
- conf = env.Configure()
-
- if conf.CheckHeader('udis86.h'): # and conf.CheckLib('udis86'):
- env['UDIS86'] = True
- env.Prepend(LIBS = ['udis86'])
- else:
- env['UDIS86'] = False
-
- conf.Finish()
-
-def exists(env):
- return True
-
-# vim:set ts=4 sw=4 et:
diff --git a/src/Android.mk b/src/Android.mk
index 66f2f913121..204b380e7d8 100644
--- a/src/Android.mk
+++ b/src/Android.mk
@@ -1,72 +1,101 @@
+# Either one of, or both of, MESA_BUILD_CLASSIC and MESA_BUILD_GALLIUM must be
+# set. When MESA_BUILD_GALLIUM is not set, EGL consists of
+#
+# libmesa_classic_egl
+# libmesa_egl
+#
+# and the rules for it can be found in egl/drivers/android/Android.mk.
+#
+# When MESA_BUILD_GALLIUM is set, EGL consists of
+#
+# libmesa_st_egl
+# libmesa_egl
+# libmesa_st_mesa
+# libmesa_pipe_<DRIVER>
+# libmesa_winsys_<DRIVER>
+# libmesa_gallium
+# <plus libmesa_classic_egl if MESA_BUILD_CLASSIC is also set>
+#
+# and the rules for it can be found in gallium/targets/Android.mk
+#
+# When MESA_BUILD_CLASSIC is set, DRI drivers are created. A DRI driver
+# consists of
+#
+# libmesa_classic_mesa
+# libmesa_glsl
+# <driver-specific objects>
+#
+# and the rules for it can be found in mesa/drivers/Android.mk.
+#
+# As for gralloc, the goal is to provide a single module that is able to
+# detect and support the hardware. This is not the case yet though.
+
LOCAL_PATH := $(call my-dir)
-# build classic static libraries
+# DRI drivers
MESA_BUILD_CLASSIC := false
-
-# build gallium static libraries
-MESA_BUILD_GALLIUM := false
-
-# build gralloc.i915
-MESA_BUILD_I915 := false
-
-# build libGLES_i915c
MESA_BUILD_I915C := false
+MESA_BUILD_I965C := false
-# build libGLES_swrast
+# Gallium drivers
+MESA_BUILD_GALLIUM := false
+MESA_BUILD_I915G := false
+MESA_BUILD_R600G := false
MESA_BUILD_SWRAST := false
-# build gralloc.vmwgfx
+# gralloc modules
+MESA_BUILD_INTEL := false
+MESA_BUILD_RADEON := false
MESA_BUILD_VMWGFX := false
-# build libGLES_i915g
-MESA_BUILD_I915G := false
-
-# for testing purpose
-#BOARD_USES_I915C := true
-#BOARD_USES_I915G := true
-#BOARD_USES_I965C := true
-#BOARD_USES_VMWGFX := true
-
-MESA_GRALLOC_NAME :=
-MESA_GLES_NAME :=
+MESA_DO_BUILD := false
ifeq ($(strip $(BOARD_USES_I915C)),true)
MESA_BUILD_CLASSIC := true
-MESA_BUILD_I915 := true
MESA_BUILD_I915C := true
+# gralloc
+MESA_BUILD_INTEL := true
-MESA_GRALLOC_NAME := i915
-MESA_GLES_NAME := i915c
+MESA_DO_BUILD := true
endif
ifeq ($(strip $(BOARD_USES_I915G)),true)
MESA_BUILD_GALLIUM := true
-MESA_BUILD_I915 := true
MESA_BUILD_I915G := true
+# gralloc
+MESA_BUILD_INTEL := true
-MESA_GRALLOC_NAME := i915
-MESA_GLES_NAME := i915g
+MESA_DO_BUILD := true
endif
ifeq ($(strip $(BOARD_USES_I965C)),true)
MESA_BUILD_CLASSIC := true
-MESA_BUILD_I915 := true
MESA_BUILD_I965C := true
+# gralloc
+MESA_BUILD_INTEL := true
-MESA_GRALLOC_NAME := i915
-MESA_GLES_NAME := i965c
+MESA_DO_BUILD := true
+endif
+
+ifeq ($(strip $(BOARD_USES_R600G)),true)
+MESA_BUILD_GALLIUM := true
+MESA_BUILD_R600G := true
+# gralloc
+MESA_BUILD_RADEON := true
+
+MESA_DO_BUILD := true
endif
ifeq ($(strip $(BOARD_USES_VMWGFX)),true)
MESA_BUILD_GALLIUM := true
MESA_BUILD_SWRAST := true
+# gralloc
MESA_BUILD_VMWGFX := true
-MESA_GRALLOC_NAME := vmwgfx
-MESA_GLES_NAME := swrast
+MESA_DO_BUILD := true
endif
-ifneq ($(strip $(MESA_GRALLOC_NAME) $(MESA_GLES_NAME)),)
+ifeq ($(strip $(MESA_DO_BUILD)),true)
# build the real modules
include $(call all-subdir-makefiles)
@@ -74,7 +103,7 @@ include $(call all-subdir-makefiles)
include $(CLEAR_VARS)
symlink := $(TARGET_OUT_SHARED_LIBRARIES)/hw/gralloc.$(TARGET_PRODUCT)$(TARGET_SHLIB_SUFFIX)
-symlink_to := gralloc.$(MESA_GRALLOC_NAME)$(TARGET_SHLIB_SUFFIX)
+symlink_to := gralloc.mesa$(TARGET_SHLIB_SUFFIX)
$(symlink): PRIVATE_TO := $(symlink_to)
$(symlink): $(TARGET_OUT_SHARED_LIBRARIES)/hw/$(symlink_to)
@echo "Symlink: $@ -> $(PRIVATE_TO)"
@@ -83,14 +112,4 @@ $(symlink): $(TARGET_OUT_SHARED_LIBRARIES)/hw/$(symlink_to)
$(hide) ln -sf $(PRIVATE_TO) $@
ALL_PREBUILT += $(symlink)
-symlink := $(TARGET_OUT_SHARED_LIBRARIES)/egl/libGLES_mesa$(TARGET_SHLIB_SUFFIX)
-symlink_to := libGLES_$(MESA_GLES_NAME)$(TARGET_SHLIB_SUFFIX)
-$(symlink): PRIVATE_TO := $(symlink_to)
-$(symlink): $(TARGET_OUT_SHARED_LIBRARIES)/egl/$(symlink_to)
- @echo "Symlink: $@ -> $(PRIVATE_TO)"
- @mkdir -p $(dir $@)
- @rm -rf $@
- $(hide) ln -sf $(PRIVATE_TO) $@
-ALL_PREBUILT += $(symlink)
-
-endif # MESA_GRALLOC_NAME || MESA_GLES_NAME
+endif # MESA_DO_BUILD
diff --git a/src/SConscript b/src/SConscript
index c42d9bff2d7..f11894f2990 100644
--- a/src/SConscript
+++ b/src/SConscript
@@ -1,17 +1,32 @@
Import('*')
-SConscript('mapi/vgapi/SConscript')
if env['platform'] == 'windows':
- SConscript('egl/main/SConscript')
- SConscript('talloc/SConscript')
+ SConscript('getopt/SConscript')
SConscript('glsl/SConscript')
+
+if env['hostonly']:
+ # We are just compiling the things necessary on the host for cross
+ # compilation
+ Return()
+
+
+# When env['gles'] is set, the targets defined in mapi/glapi/SConscript are not
+# used. libgl-xlib and libgl-gdi adapt themselves to use the targets defined
+# in mapi/glapi-shared/SConscript. mesa/SConscript also adapts itself to
+# enable OpenGL ES support.
SConscript('mapi/glapi/SConscript')
SConscript('mesa/SConscript')
+SConscript('mapi/vgapi/SConscript')
+
if env['platform'] != 'embedded':
+ SConscript('egl/main/SConscript')
SConscript('glut/glx/SConscript')
+ if env['gles']:
+ SConscript('mapi/shared-glapi/SConscript')
+
SConscript('gallium/SConscript')
diff --git a/src/egl/Android.mk b/src/egl/Android.mk
index 8e89eb012bd..f1cedc07926 100644
--- a/src/egl/Android.mk
+++ b/src/egl/Android.mk
@@ -1,5 +1,9 @@
+# Android.mk for EGL
+
LOCAL_PATH := $(call my-dir)
+include $(CLEAR_VARS)
+
# from main/Makefile
SOURCES = \
eglapi.c \
@@ -20,8 +24,6 @@ SOURCES = \
eglsurface.c \
eglsync.c
-include $(CLEAR_VARS)
-
LOCAL_SRC_FILES := \
$(addprefix main/, $(SOURCES))
@@ -29,9 +31,17 @@ LOCAL_CFLAGS := \
-DPTHREADS \
-D_EGL_NATIVE_PLATFORM=_EGL_PLATFORM_ANDROID \
-D_EGL_DRIVER_SEARCH_DIR=\"/system/lib/egl\" \
+ -D_EGL_OS_UNIX=1 \
-fvisibility=hidden \
-Wno-sign-compare
+ifeq ($(strip $(MESA_BUILD_CLASSIC)),true)
+LOCAL_CFLAGS += -D_EGL_BUILT_IN_DRIVER_ANDROID
+endif
+ifeq ($(strip $(MESA_BUILD_GALLIUM)),true)
+LOCAL_CFLAGS += -D_EGL_BUILT_IN_DRIVER_GALLIUM
+endif
+
LOCAL_C_INCLUDES := \
external/mesa/include
@@ -48,8 +58,9 @@ LOCAL_SRC_FILES := \
drivers/android/droid_core.c \
drivers/android/droid_image.c
-
LOCAL_CFLAGS := \
+ -D_EGL_MAIN=_eglBuiltInDriverANDROID \
+ -DDEFAULT_DRIVER_DIR=\"/system/lib/dri\" \
-DPTHREADS \
-fvisibility=hidden \
-Wno-sign-compare
@@ -60,9 +71,41 @@ LOCAL_C_INCLUDES := \
external/mesa/src/egl/main \
external/mesa/src/gralloc \
external/drm \
- external/drm/include/drm
+ external/drm/include/drm \
+ external/mesa/src/mesa/drivers \
+ external/mesa/src/gallium/include \
+ external/mesa/src/gallium/winsys
LOCAL_MODULE := libmesa_classic_egl
include $(BUILD_STATIC_LIBRARY)
+
+# build libGLES if gallium is not enabled
+ifneq ($(strip $(MESA_BUILD_GALLIUM)),true)
+include $(CLEAR_VARS)
+
+LOCAL_SRC_FILES :=
+LOCAL_CFLAGS :=
+LOCAL_C_INCLUDES :=
+
+LOCAL_STATIC_LIBRARIES :=
+
+LOCAL_WHOLE_STATIC_LIBRARIES := \
+ libmesa_classic_egl \
+ libmesa_egl
+
+LOCAL_SHARED_LIBRARIES := \
+ libglapi \
+ libdrm \
+ libdl \
+ libhardware \
+ liblog \
+ libcutils
+
+LOCAL_MODULE := libGLES_mesa
+LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)/egl
+
+include $(BUILD_SHARED_LIBRARY)
+endif # MESA_BUILD_GALLIUM
+
endif # MESA_BUILD_CLASSIC
diff --git a/src/egl/Makefile b/src/egl/Makefile
index 5b09e178c63..361f6889580 100644
--- a/src/egl/Makefile
+++ b/src/egl/Makefile
@@ -3,8 +3,13 @@
TOP = ../..
include $(TOP)/configs/current
-SUBDIRS = main drivers
+SUBDIRS =
+ifneq ($(findstring wayland, $(EGL_PLATFORMS)),)
+SUBDIRS += wayland
+endif
+
+SUBDIRS += drivers main
default: subdirs
diff --git a/src/egl/drivers/Makefile.template b/src/egl/drivers/Makefile.template
index 47709e3c59f..76dbe260c6b 100644
--- a/src/egl/drivers/Makefile.template
+++ b/src/egl/drivers/Makefile.template
@@ -2,6 +2,7 @@
#
# Drivers should define
#
+# EGL_BUILTIN, the driver is built-in or external
# EGL_DRIVER, the driver name
# EGL_SOURCES, the driver sources
# EGL_INCLUDES, the include pathes
@@ -12,32 +13,45 @@
#
-EGL_DRIVER_PATH = $(TOP)/$(LIB_DIR)/egl/$(EGL_DRIVER)
+EGL_DRIVER_PATH = $(TOP)/$(LIB_DIR)/egl/$(EGL_DRIVER).so
EGL_OBJECTS = $(EGL_SOURCES:.c=.o)
+# built-in or external
+ifeq ($(EGL_BUILTIN),true)
+EGL_TARGET = lib$(EGL_DRIVER).a
+EGL_INSTALL =
+else
+EGL_TARGET = $(EGL_DRIVER_PATH)
+EGL_INSTALL = install-so
+endif
-default: depend $(EGL_DRIVER_PATH)
+default: depend $(EGL_TARGET)
-$(EGL_DRIVER_PATH): $(EGL_DRIVER)
+$(EGL_DRIVER_PATH): $(EGL_DRIVER).so
@$(INSTALL) -d $(TOP)/$(LIB_DIR)/egl
$(INSTALL) $< $(TOP)/$(LIB_DIR)/egl
-$(EGL_DRIVER): $(EGL_OBJECTS) Makefile $(TOP)/src/egl/drivers/Makefile.template
- @$(MKLIB) -o $(EGL_DRIVER) -noprefix \
+$(EGL_DRIVER).so: $(EGL_OBJECTS) Makefile $(TOP)/src/egl/drivers/Makefile.template
+ @$(MKLIB) -o $(EGL_DRIVER).so -noprefix \
-linker '$(CC)' -ldflags '-L$(TOP)/$(LIB_DIR) $(LDFLAGS)' \
$(MKLIB_OPTIONS) \
$(EGL_OBJECTS) $(EGL_LIBS) -l$(EGL_LIB)
+lib$(EGL_DRIVER).a: $(EGL_OBJECTS) Makefile $(TOP)/src/egl/drivers/Makefile.template
+ @$(MKLIB) -o $(EGL_DRIVER) -static $(EGL_OBJECTS)
+
.c.o:
$(CC) -c $(EGL_INCLUDES) $(CFLAGS) $(EGL_CFLAGS) $< -o $@
-
-install: $(EGL_DRIVER_PATH)
+install-so: $(EGL_DRIVER_PATH)
$(INSTALL) -d $(DESTDIR)$(EGL_DRIVER_INSTALL_DIR)
$(MINSTALL) $(EGL_DRIVER_PATH) $(DESTDIR)$(EGL_DRIVER_INSTALL_DIR)
+install: $(EGL_INSTALL)
+
clean:
- rm -f $(EGL_DRIVER)
+ rm -f $(EGL_DRIVER).so
+ rm -f lib$(EGL_DRIVER).a
rm -f $(EGL_OBJECTS)
rm -f depend depend.bak
diff --git a/src/egl/drivers/android/droid.c b/src/egl/drivers/android/droid.c
index 60c100bb131..a902b2d86e6 100644
--- a/src/egl/drivers/android/droid.c
+++ b/src/egl/drivers/android/droid.c
@@ -27,9 +27,11 @@
#define LOG_TAG "MESA-EGL"
+#include <stdlib.h>
+#include <string.h>
+#include <dlfcn.h>
#include <cutils/log.h>
-#include "glapi/glapi.h"
#include "droid.h"
static const __DRIuseInvalidateExtension use_invalidate = {
@@ -157,6 +159,9 @@ droid_get_buffers_with_format(__DRIdrawable * driDrawable,
return NULL;
}
+ dsurf->base.Width = dsurf->buffer->width;
+ dsurf->base.Height = dsurf->buffer->height;
+
if (width)
*width = dsurf->buffer->width;
if (height)
@@ -216,6 +221,7 @@ static const EGLint droid_to_egl_attribute_map[] = {
0, /* __DRI_ATTRIB_BIND_TO_MIPMAP_TEXTURE */
0, /* __DRI_ATTRIB_BIND_TO_TEXTURE_TARGETS */
EGL_Y_INVERTED_NOK, /* __DRI_ATTRIB_YINVERTED */
+ 0, /* __DRI_ATTRIB_FRAMEBUFFER_SRGB_CAPABLE */
};
static struct droid_egl_config *
@@ -226,7 +232,7 @@ droid_add_config(_EGLDisplay *dpy, const __DRIconfig *dri_config, int id,
struct droid_egl_display *ddpy;
_EGLConfig base;
unsigned int attrib, value, double_buffer;
- EGLint key, bind_to_texture_rgb, bind_to_texture_rgba;
+ EGLint key;
int dri_masks[4] = { 0, 0, 0, 0 };
int i;
@@ -235,8 +241,6 @@ droid_add_config(_EGLDisplay *dpy, const __DRIconfig *dri_config, int id,
i = 0;
double_buffer = 0;
- bind_to_texture_rgb = 0;
- bind_to_texture_rgba = 0;
while (ddpy->core->indexConfigAttrib(dri_config, i++, &attrib, &value)) {
switch (attrib) {
@@ -260,14 +264,6 @@ droid_add_config(_EGLDisplay *dpy, const __DRIconfig *dri_config, int id,
_eglSetConfigKey(&base, EGL_CONFIG_CAVEAT, value);
break;
- case __DRI_ATTRIB_BIND_TO_TEXTURE_RGB:
- bind_to_texture_rgb = value;
- break;
-
- case __DRI_ATTRIB_BIND_TO_TEXTURE_RGBA:
- bind_to_texture_rgba = value;
- break;
-
case __DRI_ATTRIB_DOUBLE_BUFFER:
double_buffer = value;
break;
@@ -315,15 +311,9 @@ droid_add_config(_EGLDisplay *dpy, const __DRIconfig *dri_config, int id,
_eglSetConfigKey(&base, EGL_NATIVE_RENDERABLE, EGL_TRUE);
_eglSetConfigKey(&base, EGL_SURFACE_TYPE, surface_type);
- if (surface_type & (EGL_PIXMAP_BIT | EGL_PBUFFER_BIT)) {
- _eglSetConfigKey(&base, EGL_BIND_TO_TEXTURE_RGB, bind_to_texture_rgb);
- if (_eglGetConfigKey(&base, EGL_ALPHA_SIZE) > 0)
- _eglSetConfigKey(&base,
- EGL_BIND_TO_TEXTURE_RGBA, bind_to_texture_rgba);
- }
- _eglSetConfigKey(&base, EGL_RENDERABLE_TYPE, dpy->ClientAPIsMask);
- _eglSetConfigKey(&base, EGL_CONFORMANT, dpy->ClientAPIsMask);
+ _eglSetConfigKey(&base, EGL_RENDERABLE_TYPE, dpy->ClientAPIs);
+ _eglSetConfigKey(&base, EGL_CONFORMANT, dpy->ClientAPIs);
if (!_eglValidateConfig(&base, EGL_FALSE)) {
_eglLog(_EGL_DEBUG, "DRI2: failed to validate config %d", id);
@@ -462,15 +452,15 @@ droid_create_screen(_EGLDisplay *dpy)
if (ddpy->dri2->base.version >= 2)
api_mask = ddpy->dri2->getAPIMask(ddpy->dri_screen);
else
- api_mask = __DRI_API_OPENGL;
+ api_mask = 1 << __DRI_API_OPENGL;
- dpy->ClientAPIsMask = 0;
+ dpy->ClientAPIs = 0;
if (api_mask & (1 <<__DRI_API_OPENGL))
- dpy->ClientAPIsMask |= EGL_OPENGL_BIT;
+ dpy->ClientAPIs |= EGL_OPENGL_BIT;
if (api_mask & (1 <<__DRI_API_GLES))
- dpy->ClientAPIsMask |= EGL_OPENGL_ES_BIT;
+ dpy->ClientAPIs |= EGL_OPENGL_ES_BIT;
if (api_mask & (1 << __DRI_API_GLES2))
- dpy->ClientAPIsMask |= EGL_OPENGL_ES2_BIT;
+ dpy->ClientAPIs |= EGL_OPENGL_ES2_BIT;
if (ddpy->dri2->base.version >= 2) {
dpy->Extensions.KHR_surfaceless_gles1 = EGL_TRUE;
@@ -482,26 +472,110 @@ droid_create_screen(_EGLDisplay *dpy)
}
static EGLBoolean
-droid_load_driver(_EGLDisplay *disp)
+droid_load_driver(_EGLDisplay *dpy, const char *driver_name)
{
- struct droid_egl_display *ddpy = disp->DriverData;
+ struct droid_egl_display *ddpy = droid_egl_display(dpy);
const __DRIextension **extensions;
+ char path[PATH_MAX], *base = NULL;
+ void *handle;
+
+ if (geteuid() == getuid()) {
+ /* don't allow setuid apps to use LIBGL_DRIVERS_PATH */
+ base = getenv("LIBGL_DRIVERS_PATH");
+ }
+ if (!base)
+ base = DEFAULT_DRIVER_DIR;
+ snprintf(path, sizeof(path), "%s/%s_dri.so", base, driver_name);
+
+ handle = dlopen(path, RTLD_NOW | RTLD_GLOBAL);
+ if (!handle) {
+ _eglLog(_EGL_WARNING, "DRI2: failed to load %s: %s", path, dlerror());
+ return EGL_FALSE;
+ }
- extensions = __driDriverExtensions;
+ _eglLog(_EGL_DEBUG, "DRI2: dlopen(%s)", path);
+ extensions = dlsym(handle, __DRI_DRIVER_EXTENSIONS);
+ if (!extensions) {
+ _eglLog(_EGL_WARNING, "DRI2: driver exports no extensions");
+ dlclose(handle);
+ return EGL_FALSE;
+ }
- if (!droid_bind_extensions(ddpy, droid_driver_extensions, extensions))
+ if (!droid_bind_extensions(ddpy, droid_driver_extensions, extensions)) {
+ dlclose(handle);
return EGL_FALSE;
+ }
+
+ ddpy->dri_handle = handle;
return EGL_TRUE;
}
-static EGLBoolean
-droid_initialize_android(_EGLDriver *drv, _EGLDisplay *dpy,
- EGLint *major, EGLint *minor)
+#include <xf86drm.h>
+/* for i915 */
+#include <i915_drm.h>
+#include "dri/intel/intel_chipset.h"
+/* for radeon */
+#include <radeon_drm.h>
+#include "radeon/drm/radeon_drm_public.h"
+static const char *
+droid_get_driver_name(int fd)
+{
+ drmVersionPtr version;
+ char *name = NULL;
+
+ version = drmGetVersion(fd);
+ if (!version) {
+ _eglLog(_EGL_WARNING, "invalid drm fd");
+ return NULL;
+ }
+ if (!version->name) {
+ _eglLog(_EGL_WARNING, "unable to determine the driver name");
+ drmFreeVersion(version);
+ return NULL;
+ }
+
+ if (strcmp(version->name, "i915") == 0) {
+ struct drm_i915_getparam gp;
+ int id, ret;
+
+ memset(&gp, 0, sizeof(gp));
+ gp.param = I915_PARAM_CHIPSET_ID;
+ gp.value = &id;
+ ret = drmCommandWriteRead(fd, DRM_I915_GETPARAM, &gp, sizeof(gp));
+ if (ret) {
+ _eglLog(_EGL_WARNING, "failed to get param for i915");
+ }
+ else {
+ name = (IS_965(id)) ? "i965" : "i915";
+ }
+ }
+ else if (strcmp(version->name, "radeon") == 0) {
+ struct drm_radeon_info info;
+ int id, ret;
+
+ memset(&info, 0, sizeof(info));
+ info.request = RADEON_INFO_DEVICE_ID;
+ info.value = (long) &id;
+ ret = drmCommandWriteRead(fd, DRM_RADEON_INFO, &info, sizeof(info));
+ if (ret) {
+ _eglLog(_EGL_WARNING, "failed to get info for radeon");
+ }
+ else {
+ name = (is_r3xx(id)) ? "r300" : "r600";
+ }
+ }
+
+ drmFreeVersion(version);
+
+ return name;
+}
+
+static int
+droid_open_device(void)
{
- struct droid_egl_display *ddpy;
- int fd = -1, err, i;
const hw_module_t *mod;
+ int fd = -1, err;
err = hw_get_module(GRALLOC_HARDWARE_MODULE_ID, &mod);
if (!err) {
@@ -513,17 +587,34 @@ droid_initialize_android(_EGLDriver *drv, _EGLDisplay *dpy,
}
if (err || fd < 0) {
_eglLog(_EGL_WARNING, "fail to get drm fd");
- return EGL_FALSE;
+ fd = -1;
}
+ return fd;
+}
+
+static EGLBoolean
+droid_initialize_android(_EGLDriver *drv, _EGLDisplay *dpy)
+{
+ struct droid_egl_display *ddpy;
+ const char *driver_name;
+ int fd;
+
+ fd = droid_open_device();
+ if (fd < 0)
+ return EGL_FALSE;
+ driver_name = droid_get_driver_name(fd);
+ if (!driver_name)
+ return EGL_FALSE;
+
ddpy = calloc(1, sizeof(*ddpy));
if (!ddpy)
return _eglError(EGL_BAD_ALLOC, "eglInitialize");
+ ddpy->fd = fd;
dpy->DriverData = (void *) ddpy;
- ddpy->fd = fd;
- if (!droid_load_driver(dpy))
+ if (!droid_load_driver(dpy, driver_name))
return EGL_FALSE;
ddpy->loader_extension.base.name = __DRI_DRI2_LOADER;
@@ -552,8 +643,8 @@ droid_initialize_android(_EGLDriver *drv, _EGLDisplay *dpy,
dpy->Extensions.KHR_image_base = EGL_TRUE;
/* we're supporting EGL 1.4 */
- *major = 1;
- *minor = 4;
+ dpy->VersionMajor = 1;
+ dpy->VersionMinor = 4;
return EGL_TRUE;
}
@@ -567,19 +658,26 @@ droid_terminate(_EGLDriver *drv, _EGLDisplay *dpy)
_eglCleanupDisplay(dpy);
ddpy->core->destroyScreen(ddpy->dri_screen);
+ dlclose(ddpy->dri_handle);
free(ddpy);
+
dpy->DriverData = NULL;
return EGL_TRUE;
}
static EGLBoolean
-droid_initialize(_EGLDriver *drv, _EGLDisplay *dpy,
- EGLint *major, EGLint *minor)
+droid_initialize(_EGLDriver *drv, _EGLDisplay *dpy)
{
+ /* not until swrast_dri is supported */
+ if (dpy->Options.UseFallback)
+ return EGL_FALSE;
+
switch (dpy->Platform) {
case _EGL_PLATFORM_ANDROID:
- return droid_initialize_android(drv, dpy, major, minor);
+ if (dpy->Options.TestOnly)
+ return EGL_TRUE;
+ return droid_initialize_android(drv, dpy);
default:
return EGL_FALSE;
}
@@ -588,16 +686,9 @@ droid_initialize(_EGLDriver *drv, _EGLDisplay *dpy,
static _EGLProc
droid_get_proc_address(_EGLDriver *drv, const char *procname)
{
- return (_EGLProc) _glapi_get_proc_address(procname);
-}
-
-
-static void
-droid_unload(_EGLDriver *drv)
-{
struct droid_egl_driver *ddrv = droid_egl_driver(drv);
- free(ddrv);
+ return ddrv->get_proc_address(procname);
}
static void
@@ -621,6 +712,30 @@ droid_log(EGLint level, const char *msg)
}
}
+static void
+droid_unload(_EGLDriver *drv)
+{
+ struct droid_egl_driver *ddrv = droid_egl_driver(drv);
+
+ free(ddrv);
+}
+
+#include "glapi/glapi.h" /* for _glapi_get_proc_address */
+static EGLBoolean
+droid_load(_EGLDriver *drv)
+{
+ struct droid_egl_driver *ddrv = droid_egl_driver(drv);
+
+ ddrv->get_proc_address = (_EGLProc (*)(const char *)) _glapi_get_proc_address;
+
+ ddrv->glFlush = (void (*)(void))
+ ddrv->get_proc_address("glFlush");
+ ddrv->glFinish = (void (*)(void))
+ ddrv->get_proc_address("glFinish");
+
+ return EGL_TRUE;
+}
+
_EGLDriver *
droid_create_driver(void)
{
@@ -630,6 +745,9 @@ droid_create_driver(void)
if (!ddrv)
return NULL;
+ if (!droid_load(&ddrv->base))
+ return NULL;
+
_eglSetLogProc(droid_log);
ddrv->base.Name = "Droid";
@@ -640,10 +758,5 @@ droid_create_driver(void)
ddrv->base.API.Terminate = droid_terminate;
ddrv->base.API.GetProcAddress = droid_get_proc_address;
- ddrv->glFlush =
- (void (*)(void)) droid_get_proc_address(&ddrv->base, "glFlush");
- ddrv->glFinish =
- (void (*)(void)) droid_get_proc_address(&ddrv->base, "glFinish");
-
return &ddrv->base;
}
diff --git a/src/egl/drivers/android/droid.h b/src/egl/drivers/android/droid.h
index 20e32a65885..0a0e6147f2a 100644
--- a/src/egl/drivers/android/droid.h
+++ b/src/egl/drivers/android/droid.h
@@ -50,6 +50,7 @@ struct droid_egl_driver
{
_EGLDriver base;
+ _EGLProc (*get_proc_address)(const char *procname);
void (*glFlush)(void);
void (*glFinish)(void);
};
@@ -58,6 +59,8 @@ struct droid_egl_display
{
int fd;
+ void *dri_handle;
+
__DRIscreen *dri_screen;
const __DRIconfig **dri_configs;
__DRIcoreExtension *core;
diff --git a/src/egl/drivers/android/droid_core.c b/src/egl/drivers/android/droid_core.c
index 82c21d4aa94..26eb96c7ff1 100644
--- a/src/egl/drivers/android/droid_core.c
+++ b/src/egl/drivers/android/droid_core.c
@@ -105,6 +105,24 @@ droid_create_context(_EGLDriver *drv, _EGLDisplay *disp, _EGLConfig *conf,
return NULL;
}
+static EGLBoolean
+droid_destroy_context(_EGLDriver *drv, _EGLDisplay *disp, _EGLContext *ctx)
+{
+ struct droid_egl_display *ddpy = droid_egl_display(disp);
+ struct droid_egl_context *dctx = droid_egl_context(ctx);
+
+ (void) drv;
+
+ if (!_eglPutContext(ctx))
+ return EGL_TRUE;
+
+ (*ddpy->core->destroyContext)(dctx->dri_context);
+
+ free(dctx);
+
+ return EGL_TRUE;
+}
+
static _EGLSurface *
droid_create_surface(_EGLDriver *drv, _EGLDisplay *disp, EGLint type,
_EGLConfig *conf, EGLNativeWindowType window,
@@ -203,7 +221,9 @@ droid_destroy_surface(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *surf)
(*ddpy->core->destroyDrawable)(dsurf->dri_drawable);
- droid_enqueue_buffer(dsurf);
+ if (dsurf->buffer)
+ droid_enqueue_buffer(dsurf);
+
dsurf->window->common.decRef(&dsurf->window->common);
free(surf);
@@ -247,8 +267,7 @@ droid_make_current(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *dsurf,
__DRIcontext *old_cctx = droid_egl_context(old_ctx)->dri_context;
ddpy->core->unbindContext(old_cctx);
}
- /* no destroy? */
- _eglPutContext(old_ctx);
+ droid_destroy_context(drv, disp, old_ctx);
}
return EGL_TRUE;
@@ -317,6 +336,7 @@ droid_init_core_functions(_EGLDriver *drv)
struct droid_egl_driver *ddrv = droid_egl_driver(drv);
ddrv->base.API.CreateContext = droid_create_context;
+ ddrv->base.API.DestroyContext = droid_destroy_context;
ddrv->base.API.CreateWindowSurface = droid_create_window_surface;
ddrv->base.API.CreatePixmapSurface = droid_create_pixmap_surface;
ddrv->base.API.CreatePbufferSurface = droid_create_pbuffer_surface;
diff --git a/src/egl/drivers/android/egl_android.c b/src/egl/drivers/android/egl_android.c
index 3f1cb36b788..56a29bb7b72 100644
--- a/src/egl/drivers/android/egl_android.c
+++ b/src/egl/drivers/android/egl_android.c
@@ -28,7 +28,7 @@
#include "droid.h"
_EGLDriver *
-_eglMain(const char *args)
+_EGL_MAIN(const char *args)
{
_EGLDriver *drv;
diff --git a/src/egl/drivers/dri2/Makefile b/src/egl/drivers/dri2/Makefile
index 8a3c9b6a0aa..4783975852a 100644
--- a/src/egl/drivers/dri2/Makefile
+++ b/src/egl/drivers/dri2/Makefile
@@ -3,8 +3,8 @@
TOP = ../../../..
include $(TOP)/configs/current
-EGL_DRIVER = egl_dri2.so
-EGL_SOURCES = egl_dri2.c
+EGL_DRIVER = egl_dri2
+EGL_SOURCES = egl_dri2.c platform_x11.c platform_drm.c
EGL_INCLUDES = \
-I$(TOP)/include \
@@ -15,6 +15,22 @@ EGL_INCLUDES = \
$(LIBUDEV_CFLAGS) \
$(LIBDRM_CFLAGS)
-EGL_LIBS = $(XCB_DRI2_LIBS) $(LIBUDEV_LIBS) $(LIBDRM_LIBS)
+EGL_LIBS = $(XCB_DRI2_LIBS) $(LIBUDEV_LIBS) $(DLOPEN_LIBS) $(LIBDRM_LIB)
+
+EGL_CFLAGS = -D_EGL_MAIN=_eglBuiltInDriverDRI2
+EGL_BUILTIN = true
+
+ifeq ($(SHARED_GLAPI),1)
+EGL_CFLAGS += -DHAVE_SHARED_GLAPI
+endif
+
+ifneq ($(findstring wayland, $(EGL_PLATFORMS)),)
+EGL_SOURCES += platform_wayland.c
+EGL_INCLUDES += -DHAVE_WAYLAND_PLATFORM $(WAYLAND_CFLAGS) \
+ -I$(TOP)/src/egl/wayland/wayland-egl \
+ -I$(TOP)/src/egl/wayland/wayland-drm
+EGL_LIBS += $(WAYLAND_LIBS) \
+ $(TOP)/src/egl/wayland/wayland-drm/libwayland-drm.a
+endif
include ../Makefile.template
diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c
index 6f40ab951f9..f7e063b3524 100644
--- a/src/egl/drivers/dri2/egl_dri2.c
+++ b/src/egl/drivers/dri2/egl_dri2.c
@@ -36,93 +36,12 @@
#include <xf86drm.h>
#include <GL/gl.h>
#include <GL/internal/dri_interface.h>
-#include <xcb/xcb.h>
-#include <xcb/dri2.h>
-#include <xcb/xfixes.h>
-#include <X11/Xlib-xcb.h>
#include <sys/types.h>
#include <sys/stat.h>
-#ifdef HAVE_LIBUDEV
-#include <libudev.h>
-#endif
-
-#include <glapi/glapi.h>
-#include "eglconfig.h"
-#include "eglcontext.h"
-#include "egldisplay.h"
-#include "egldriver.h"
-#include "eglcurrent.h"
-#include "egllog.h"
-#include "eglsurface.h"
-#include "eglimage.h"
-
-#define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0]))
-
-struct dri2_egl_driver
-{
- _EGLDriver base;
-
- void (*glFlush)(void);
-};
-
-struct dri2_egl_display
-{
- xcb_connection_t *conn;
- int dri2_major;
- int dri2_minor;
- __DRIscreen *dri_screen;
- const __DRIconfig **driver_configs;
- void *driver;
- __DRIcoreExtension *core;
- __DRIdri2Extension *dri2;
- __DRI2flushExtension *flush;
- __DRItexBufferExtension *tex_buffer;
- __DRIimageExtension *image;
- int fd;
-
- char *device_name;
- char *driver_name;
-
- __DRIdri2LoaderExtension loader_extension;
- const __DRIextension *extensions[3];
-};
-
-struct dri2_egl_context
-{
- _EGLContext base;
- __DRIcontext *dri_context;
-};
-
-struct dri2_egl_surface
-{
- _EGLSurface base;
- __DRIdrawable *dri_drawable;
- xcb_drawable_t drawable;
- __DRIbuffer buffers[5];
- int buffer_count;
- xcb_xfixes_region_t region;
- int have_fake_front;
- int swap_interval;
-};
-
-struct dri2_egl_config
-{
- _EGLConfig base;
- const __DRIconfig *dri_config;
-};
+#include "egl_dri2.h"
-struct dri2_egl_image
-{
- _EGLImage base;
- __DRIimage *dri_image;
-};
-
-/* standard typecasts */
-_EGL_DRIVER_STANDARD_TYPECASTS(dri2_egl)
-_EGL_DRIVER_TYPECAST(dri2_egl_image, _EGLImage, obj)
-
-static const __DRIuseInvalidateExtension use_invalidate = {
+const __DRIuseInvalidateExtension use_invalidate = {
{ __DRI_USE_INVALIDATE, 1 }
};
@@ -175,17 +94,21 @@ EGLint dri2_to_egl_attribute_map[] = {
0, /* __DRI_ATTRIB_BIND_TO_MIPMAP_TEXTURE */
0, /* __DRI_ATTRIB_BIND_TO_TEXTURE_TARGETS */
EGL_Y_INVERTED_NOK, /* __DRI_ATTRIB_YINVERTED */
+ 0, /* __DRI_ATTRIB_FRAMEBUFFER_SRGB_CAPABLE */
};
-static struct dri2_egl_config *
+struct dri2_egl_config *
dri2_add_config(_EGLDisplay *disp, const __DRIconfig *dri_config, int id,
- int depth, EGLint surface_type)
+ int depth, EGLint surface_type, const EGLint *attr_list)
{
struct dri2_egl_config *conf;
struct dri2_egl_display *dri2_dpy;
_EGLConfig base;
unsigned int attrib, value, double_buffer;
EGLint key, bind_to_texture_rgb, bind_to_texture_rgba;
+ _EGLConfig *matching_config;
+ EGLint num_configs = 0;
+ EGLint config_id;
int i;
dri2_dpy = disp->DriverData;
@@ -238,15 +161,9 @@ dri2_add_config(_EGLDisplay *disp, const __DRIconfig *dri_config, int id,
}
}
- /* In EGL, double buffer or not isn't a config attribute. Pixmaps
- * surfaces are always single buffered, pbuffer surfaces are always
- * back buffers and windows can be either, selected by passing an
- * attribute at window surface construction time. To support this
- * we ignore all double buffer configs and manipulate the buffer we
- * return in the getBuffer callback to get the behaviour we want. */
-
- if (double_buffer)
- return NULL;
+ if (attr_list)
+ for (i = 0; attr_list[i] != EGL_NONE; i += 2)
+ _eglSetConfigKey(&base, attr_list[i], attr_list[i+1]);
if (depth > 0 && depth != base.BufferSize)
return NULL;
@@ -254,124 +171,64 @@ dri2_add_config(_EGLDisplay *disp, const __DRIconfig *dri_config, int id,
base.NativeRenderable = EGL_TRUE;
base.SurfaceType = surface_type;
- if (surface_type & (EGL_PIXMAP_BIT | EGL_PBUFFER_BIT)) {
+ if (surface_type & (EGL_PBUFFER_BIT |
+ (disp->Extensions.NOK_texture_from_pixmap ? EGL_PIXMAP_BIT : 0))) {
base.BindToTextureRGB = bind_to_texture_rgb;
if (base.AlphaSize > 0)
base.BindToTextureRGBA = bind_to_texture_rgba;
}
- base.RenderableType = disp->ClientAPIsMask;
- base.Conformant = disp->ClientAPIsMask;
+ base.RenderableType = disp->ClientAPIs;
+ base.Conformant = disp->ClientAPIs;
if (!_eglValidateConfig(&base, EGL_FALSE)) {
_eglLog(_EGL_DEBUG, "DRI2: failed to validate config %d", id);
return NULL;
}
- conf = malloc(sizeof *conf);
- if (conf != NULL) {
- memcpy(&conf->base, &base, sizeof base);
- conf->dri_config = dri_config;
- _eglLinkConfig(&conf->base);
- }
+ config_id = base.ConfigID;
+ base.ConfigID = EGL_DONT_CARE;
+ base.SurfaceType = EGL_DONT_CARE;
+ num_configs = _eglFilterArray(disp->Configs, (void **) &matching_config, 1,
+ (_EGLArrayForEach) _eglMatchConfig, &base);
- return conf;
-}
+ if (num_configs == 1) {
+ conf = (struct dri2_egl_config *) matching_config;
-/**
- * Process list of buffer received from the server
- *
- * Processes the list of buffers received in a reply from the server to either
- * \c DRI2GetBuffers or \c DRI2GetBuffersWithFormat.
- */
-static void
-dri2_process_buffers(struct dri2_egl_surface *dri2_surf,
- xcb_dri2_dri2_buffer_t *buffers, unsigned count)
-{
- struct dri2_egl_display *dri2_dpy =
- dri2_egl_display(dri2_surf->base.Resource.Display);
- xcb_rectangle_t rectangle;
- unsigned i;
-
- dri2_surf->buffer_count = count;
- dri2_surf->have_fake_front = 0;
-
- /* This assumes the DRI2 buffer attachment tokens matches the
- * __DRIbuffer tokens. */
- for (i = 0; i < count; i++) {
- dri2_surf->buffers[i].attachment = buffers[i].attachment;
- dri2_surf->buffers[i].name = buffers[i].name;
- dri2_surf->buffers[i].pitch = buffers[i].pitch;
- dri2_surf->buffers[i].cpp = buffers[i].cpp;
- dri2_surf->buffers[i].flags = buffers[i].flags;
-
- /* We only use the DRI drivers single buffer configs. This
- * means that if we try to render to a window, DRI2 will give us
- * the fake front buffer, which we'll use as a back buffer.
- * Note that EGL doesn't require that several clients rendering
- * to the same window must see the same aux buffers. */
- if (dri2_surf->buffers[i].attachment == __DRI_BUFFER_FAKE_FRONT_LEFT)
- dri2_surf->have_fake_front = 1;
+ if (double_buffer && !conf->dri_double_config)
+ conf->dri_double_config = dri_config;
+ else if (!double_buffer && !conf->dri_single_config)
+ conf->dri_single_config = dri_config;
+ else
+ /* a similar config type is already added
+ * => attach it as new config
+ */
+ num_configs = 0;
}
- if (dri2_surf->region != XCB_NONE)
- xcb_xfixes_destroy_region(dri2_dpy->conn, dri2_surf->region);
-
- rectangle.x = 0;
- rectangle.y = 0;
- rectangle.width = dri2_surf->base.Width;
- rectangle.height = dri2_surf->base.Height;
- dri2_surf->region = xcb_generate_id(dri2_dpy->conn);
- xcb_xfixes_create_region(dri2_dpy->conn, dri2_surf->region, 1, &rectangle);
-}
-
-static __DRIbuffer *
-dri2_get_buffers(__DRIdrawable * driDrawable,
- int *width, int *height,
- unsigned int *attachments, int count,
- int *out_count, void *loaderPrivate)
-{
- struct dri2_egl_surface *dri2_surf = loaderPrivate;
- struct dri2_egl_display *dri2_dpy =
- dri2_egl_display(dri2_surf->base.Resource.Display);
- xcb_dri2_dri2_buffer_t *buffers;
- xcb_dri2_get_buffers_reply_t *reply;
- xcb_dri2_get_buffers_cookie_t cookie;
-
- (void) driDrawable;
-
- cookie = xcb_dri2_get_buffers_unchecked (dri2_dpy->conn,
- dri2_surf->drawable,
- count, count, attachments);
- reply = xcb_dri2_get_buffers_reply (dri2_dpy->conn, cookie, NULL);
- buffers = xcb_dri2_get_buffers_buffers (reply);
- if (buffers == NULL)
- return NULL;
-
- *out_count = reply->count;
- dri2_surf->base.Width = *width = reply->width;
- dri2_surf->base.Height = *height = reply->height;
- dri2_process_buffers(dri2_surf, buffers, *out_count);
-
- free(reply);
+ if (num_configs == 0) {
+ conf = malloc(sizeof *conf);
+ if (conf == NULL)
+ return NULL;
- return dri2_surf->buffers;
-}
-
-static void
-dri2_flush_front_buffer(__DRIdrawable * driDrawable, void *loaderPrivate)
-{
- (void) driDrawable;
+ memcpy(&conf->base, &base, sizeof base);
+ if (double_buffer) {
+ conf->dri_double_config = dri_config;
+ conf->dri_single_config = NULL;
+ } else {
+ conf->dri_single_config = dri_config;
+ conf->dri_double_config = NULL;
+ }
+ conf->base.SurfaceType = 0;
+ conf->base.ConfigID = config_id;
- /* FIXME: Does EGL support front buffer rendering at all? */
+ _eglLinkConfig(&conf->base);
+ }
-#if 0
- struct dri2_egl_surface *dri2_surf = loaderPrivate;
+ conf->base.SurfaceType |= surface_type & (!double_buffer ? EGL_PIXMAP_BIT:
+ (EGL_WINDOW_BIT | EGL_PBUFFER_BIT | EGL_SWAP_BEHAVIOR_PRESERVED_BIT));
- dri2WaitGL(dri2_surf);
-#else
- (void) loaderPrivate;
-#endif
+ return conf;
}
static __DRIimage *
@@ -394,49 +251,11 @@ dri2_lookup_egl_image(__DRIscreen *screen, void *image, void *data)
return dri2_img->dri_image;
}
-static const __DRIimageLookupExtension image_lookup_extension = {
+const __DRIimageLookupExtension image_lookup_extension = {
{ __DRI_IMAGE_LOOKUP, 1 },
dri2_lookup_egl_image
};
-static __DRIbuffer *
-dri2_get_buffers_with_format(__DRIdrawable * driDrawable,
- int *width, int *height,
- unsigned int *attachments, int count,
- int *out_count, void *loaderPrivate)
-{
- struct dri2_egl_surface *dri2_surf = loaderPrivate;
- struct dri2_egl_display *dri2_dpy =
- dri2_egl_display(dri2_surf->base.Resource.Display);
- xcb_dri2_dri2_buffer_t *buffers;
- xcb_dri2_get_buffers_with_format_reply_t *reply;
- xcb_dri2_get_buffers_with_format_cookie_t cookie;
- xcb_dri2_attach_format_t *format_attachments;
-
- (void) driDrawable;
-
- format_attachments = (xcb_dri2_attach_format_t *) attachments;
- cookie = xcb_dri2_get_buffers_with_format_unchecked (dri2_dpy->conn,
- dri2_surf->drawable,
- count, count,
- format_attachments);
-
- reply = xcb_dri2_get_buffers_with_format_reply (dri2_dpy->conn,
- cookie, NULL);
- if (reply == NULL)
- return NULL;
-
- buffers = xcb_dri2_get_buffers_with_format_buffers (reply);
- dri2_surf->base.Width = *width = reply->width;
- dri2_surf->base.Height = *height = reply->height;
- *out_count = reply->count;
- dri2_process_buffers(dri2_surf, buffers, *out_count);
-
- free(reply);
-
- return dri2_surf->buffers;
-}
-
static const char dri_driver_path[] = DEFAULT_DRIVER_DIR;
struct dri2_extension_match {
@@ -458,6 +277,17 @@ static struct dri2_extension_match dri2_core_extensions[] = {
{ NULL, 0, 0 }
};
+static struct dri2_extension_match swrast_driver_extensions[] = {
+ { __DRI_CORE, 1, offsetof(struct dri2_egl_display, core) },
+ { __DRI_SWRAST, 2, offsetof(struct dri2_egl_display, swrast) },
+ { NULL }
+};
+
+static struct dri2_extension_match swrast_core_extensions[] = {
+ { __DRI_TEX_BUFFER, 2, offsetof(struct dri2_egl_display, tex_buffer) },
+ { NULL }
+};
+
static EGLBoolean
dri2_bind_extensions(struct dri2_egl_display *dri2_dpy,
struct dri2_extension_match *matches,
@@ -491,180 +321,7 @@ dri2_bind_extensions(struct dri2_egl_display *dri2_dpy,
return ret;
}
-static char *
-dri2_strndup(const char *s, int length)
-{
- char *d;
-
- d = malloc(length + 1);
- if (d == NULL)
- return NULL;
-
- memcpy(d, s, length);
- d[length] = '\0';
-
- return d;
-}
-
-static EGLBoolean
-dri2_connect(struct dri2_egl_display *dri2_dpy)
-{
- xcb_xfixes_query_version_reply_t *xfixes_query;
- xcb_xfixes_query_version_cookie_t xfixes_query_cookie;
- xcb_dri2_query_version_reply_t *dri2_query;
- xcb_dri2_query_version_cookie_t dri2_query_cookie;
- xcb_dri2_connect_reply_t *connect;
- xcb_dri2_connect_cookie_t connect_cookie;
- xcb_generic_error_t *error;
- xcb_screen_iterator_t s;
-
- xcb_prefetch_extension_data (dri2_dpy->conn, &xcb_xfixes_id);
- xcb_prefetch_extension_data (dri2_dpy->conn, &xcb_dri2_id);
-
- xfixes_query_cookie = xcb_xfixes_query_version(dri2_dpy->conn,
- XCB_XFIXES_MAJOR_VERSION,
- XCB_XFIXES_MINOR_VERSION);
-
- dri2_query_cookie = xcb_dri2_query_version (dri2_dpy->conn,
- XCB_DRI2_MAJOR_VERSION,
- XCB_DRI2_MINOR_VERSION);
-
- s = xcb_setup_roots_iterator(xcb_get_setup(dri2_dpy->conn));
- connect_cookie = xcb_dri2_connect_unchecked (dri2_dpy->conn,
- s.data->root,
- XCB_DRI2_DRIVER_TYPE_DRI);
-
- xfixes_query =
- xcb_xfixes_query_version_reply (dri2_dpy->conn,
- xfixes_query_cookie, &error);
- if (xfixes_query == NULL ||
- error != NULL || xfixes_query->major_version < 2) {
- _eglLog(_EGL_FATAL, "DRI2: failed to query xfixes version");
- free(error);
- return EGL_FALSE;
- }
- free(xfixes_query);
-
- dri2_query =
- xcb_dri2_query_version_reply (dri2_dpy->conn, dri2_query_cookie, &error);
- if (dri2_query == NULL || error != NULL) {
- _eglLog(_EGL_FATAL, "DRI2: failed to query version");
- free(error);
- return EGL_FALSE;
- }
- dri2_dpy->dri2_major = dri2_query->major_version;
- dri2_dpy->dri2_minor = dri2_query->minor_version;
- free(dri2_query);
-
- connect = xcb_dri2_connect_reply (dri2_dpy->conn, connect_cookie, NULL);
- if (connect == NULL ||
- connect->driver_name_length + connect->device_name_length == 0) {
- _eglLog(_EGL_FATAL, "DRI2: failed to authenticate");
- return EGL_FALSE;
- }
-
- dri2_dpy->device_name =
- dri2_strndup(xcb_dri2_connect_device_name (connect),
- xcb_dri2_connect_device_name_length (connect));
-
- dri2_dpy->driver_name =
- dri2_strndup(xcb_dri2_connect_driver_name (connect),
- xcb_dri2_connect_driver_name_length (connect));
-
- if (dri2_dpy->device_name == NULL || dri2_dpy->driver_name == NULL) {
- free(dri2_dpy->device_name);
- free(dri2_dpy->driver_name);
- free(connect);
- return EGL_FALSE;
- }
- free(connect);
-
- return EGL_TRUE;
-}
-
-static EGLBoolean
-dri2_authenticate(struct dri2_egl_display *dri2_dpy)
-{
- xcb_dri2_authenticate_reply_t *authenticate;
- xcb_dri2_authenticate_cookie_t authenticate_cookie;
- xcb_screen_iterator_t s;
- drm_magic_t magic;
-
- if (drmGetMagic(dri2_dpy->fd, &magic)) {
- _eglLog(_EGL_FATAL, "DRI2: failed to get drm magic");
- return EGL_FALSE;
- }
-
- s = xcb_setup_roots_iterator(xcb_get_setup(dri2_dpy->conn));
- authenticate_cookie =
- xcb_dri2_authenticate_unchecked(dri2_dpy->conn, s.data->root, magic);
- authenticate =
- xcb_dri2_authenticate_reply(dri2_dpy->conn, authenticate_cookie, NULL);
- if (authenticate == NULL || !authenticate->authenticated) {
- _eglLog(_EGL_FATAL, "DRI2: failed to authenticate");
- free(authenticate);
- return EGL_FALSE;
- }
-
- free(authenticate);
-
- return EGL_TRUE;
-}
-
-static EGLBoolean
-dri2_add_configs_for_visuals(struct dri2_egl_display *dri2_dpy,
- _EGLDisplay *disp)
-{
- xcb_screen_iterator_t s;
- xcb_depth_iterator_t d;
- xcb_visualtype_t *visuals;
- int i, j, id;
- struct dri2_egl_config *conf;
- EGLint surface_type;
-
- s = xcb_setup_roots_iterator(xcb_get_setup(dri2_dpy->conn));
- d = xcb_screen_allowed_depths_iterator(s.data);
- id = 1;
-
- surface_type =
- EGL_WINDOW_BIT |
- EGL_PIXMAP_BIT |
- EGL_PBUFFER_BIT |
- EGL_SWAP_BEHAVIOR_PRESERVED_BIT;
-
- while (d.rem > 0) {
- EGLBoolean class_added[6] = { 0, };
-
- visuals = xcb_depth_visuals(d.data);
- for (i = 0; i < xcb_depth_visuals_length(d.data); i++) {
- if (class_added[visuals[i]._class])
- continue;
-
- class_added[visuals[i]._class] = EGL_TRUE;
- for (j = 0; dri2_dpy->driver_configs[j]; j++) {
- conf = dri2_add_config(disp, dri2_dpy->driver_configs[j],
- id++, d.data->depth, surface_type);
- if (conf == NULL)
- continue;
- _eglSetConfigKey(&conf->base,
- EGL_NATIVE_VISUAL_ID, visuals[i].visual_id);
- _eglSetConfigKey(&conf->base,
- EGL_NATIVE_VISUAL_TYPE, visuals[i]._class);
- }
- }
-
- xcb_depth_next(&d);
- }
-
- if (!_eglGetArraySize(disp->Configs)) {
- _eglLog(_EGL_WARNING, "DRI2: failed to create any config");
- return EGL_FALSE;
- }
-
- return EGL_TRUE;
-}
-
-static EGLBoolean
+EGLBoolean
dri2_load_driver(_EGLDisplay *disp)
{
struct dri2_egl_display *dri2_dpy = disp->DriverData;
@@ -718,15 +375,22 @@ dri2_load_driver(_EGLDisplay *disp)
return EGL_FALSE;
}
- if (!dri2_bind_extensions(dri2_dpy, dri2_driver_extensions, extensions)) {
- dlclose(dri2_dpy->driver);
- return EGL_FALSE;
- }
+ if (strcmp(dri2_dpy->driver_name, "swrast") == 0) {
+ if (!dri2_bind_extensions(dri2_dpy, swrast_driver_extensions, extensions)) {
+ dlclose(dri2_dpy->driver);
+ return EGL_FALSE;
+ }
+ } else {
+ if (!dri2_bind_extensions(dri2_dpy, dri2_driver_extensions, extensions)) {
+ dlclose(dri2_dpy->driver);
+ return EGL_FALSE;
+ }
+ }
return EGL_TRUE;
}
-static EGLBoolean
+EGLBoolean
dri2_create_screen(_EGLDisplay *disp)
{
const __DRIextension **extensions;
@@ -734,9 +398,17 @@ dri2_create_screen(_EGLDisplay *disp)
unsigned int api_mask;
dri2_dpy = disp->DriverData;
- dri2_dpy->dri_screen =
- dri2_dpy->dri2->createNewScreen(0, dri2_dpy->fd, dri2_dpy->extensions,
- &dri2_dpy->driver_configs, disp);
+
+ if (dri2_dpy->dri2) {
+ dri2_dpy->dri_screen =
+ dri2_dpy->dri2->createNewScreen(0, dri2_dpy->fd, dri2_dpy->extensions,
+ &dri2_dpy->driver_configs, disp);
+ } else {
+ assert(dri2_dpy->swrast);
+ dri2_dpy->dri_screen =
+ dri2_dpy->swrast->createNewScreen(0, dri2_dpy->extensions,
+ &dri2_dpy->driver_configs, disp);
+ }
if (dri2_dpy->dri_screen == NULL) {
_eglLog(_EGL_WARNING, "DRI2: failed to create dri screen");
@@ -744,26 +416,50 @@ dri2_create_screen(_EGLDisplay *disp)
}
extensions = dri2_dpy->core->getExtensions(dri2_dpy->dri_screen);
- if (!dri2_bind_extensions(dri2_dpy, dri2_core_extensions, extensions))
- goto cleanup_dri_screen;
+
+ if (dri2_dpy->dri2) {
+ if (!dri2_bind_extensions(dri2_dpy, dri2_core_extensions, extensions))
+ goto cleanup_dri_screen;
+ } else {
+ assert(dri2_dpy->swrast);
+ if (!dri2_bind_extensions(dri2_dpy, swrast_core_extensions, extensions))
+ goto cleanup_dri_screen;
+ }
- if (dri2_dpy->dri2->base.version >= 2)
- api_mask = dri2_dpy->dri2->getAPIMask(dri2_dpy->dri_screen);
- else
- api_mask = 1 << __DRI_API_OPENGL;
+ if (dri2_dpy->dri2) {
+ if (dri2_dpy->dri2->base.version >= 2)
+ api_mask = dri2_dpy->dri2->getAPIMask(dri2_dpy->dri_screen);
+ else
+ api_mask = 1 << __DRI_API_OPENGL;
+ } else {
+ assert(dri2_dpy->swrast);
+ if (dri2_dpy->swrast->base.version >= 2)
+ api_mask = 1 << __DRI_API_OPENGL | 1 << __DRI_API_GLES | 1 << __DRI_API_GLES2;
+ else
+ api_mask = 1 << __DRI_API_OPENGL;
+ }
- disp->ClientAPIsMask = 0;
+ disp->ClientAPIs = 0;
if (api_mask & (1 <<__DRI_API_OPENGL))
- disp->ClientAPIsMask |= EGL_OPENGL_BIT;
+ disp->ClientAPIs |= EGL_OPENGL_BIT;
if (api_mask & (1 <<__DRI_API_GLES))
- disp->ClientAPIsMask |= EGL_OPENGL_ES_BIT;
+ disp->ClientAPIs |= EGL_OPENGL_ES_BIT;
if (api_mask & (1 << __DRI_API_GLES2))
- disp->ClientAPIsMask |= EGL_OPENGL_ES2_BIT;
+ disp->ClientAPIs |= EGL_OPENGL_ES2_BIT;
- if (dri2_dpy->dri2->base.version >= 2) {
- disp->Extensions.KHR_surfaceless_gles1 = EGL_TRUE;
- disp->Extensions.KHR_surfaceless_gles2 = EGL_TRUE;
- disp->Extensions.KHR_surfaceless_opengl = EGL_TRUE;
+ if (dri2_dpy->dri2) {
+ if (dri2_dpy->dri2->base.version >= 2) {
+ disp->Extensions.KHR_surfaceless_gles1 = EGL_TRUE;
+ disp->Extensions.KHR_surfaceless_gles2 = EGL_TRUE;
+ disp->Extensions.KHR_surfaceless_opengl = EGL_TRUE;
+ }
+ } else {
+ assert(dri2_dpy->swrast);
+ if (dri2_dpy->swrast->base.version >= 2) {
+ disp->Extensions.KHR_surfaceless_gles1 = EGL_TRUE;
+ disp->Extensions.KHR_surfaceless_gles2 = EGL_TRUE;
+ disp->Extensions.KHR_surfaceless_opengl = EGL_TRUE;
+ }
}
return EGL_TRUE;
@@ -774,712 +470,33 @@ dri2_create_screen(_EGLDisplay *disp)
return EGL_FALSE;
}
-static EGLBoolean
-dri2_initialize_x11(_EGLDriver *drv, _EGLDisplay *disp,
- EGLint *major, EGLint *minor)
-{
- struct dri2_egl_display *dri2_dpy;
-
- (void) drv;
-
- dri2_dpy = malloc(sizeof *dri2_dpy);
- if (!dri2_dpy)
- return _eglError(EGL_BAD_ALLOC, "eglInitialize");
-
- disp->DriverData = (void *) dri2_dpy;
- if (disp->PlatformDisplay == NULL) {
- dri2_dpy->conn = xcb_connect(0, 0);
- } else {
- dri2_dpy->conn = XGetXCBConnection((Display *) disp->PlatformDisplay);
- }
-
- if (xcb_connection_has_error(dri2_dpy->conn)) {
- _eglLog(_EGL_WARNING, "DRI2: xcb_connect failed");
- goto cleanup_dpy;
- }
-
- if (dri2_dpy->conn) {
- if (!dri2_connect(dri2_dpy))
- goto cleanup_conn;
- }
-
- if (!dri2_load_driver(disp))
- goto cleanup_conn;
-
- dri2_dpy->fd = open(dri2_dpy->device_name, O_RDWR);
- if (dri2_dpy->fd == -1) {
- _eglLog(_EGL_WARNING,
- "DRI2: could not open %s (%s)", dri2_dpy->device_name,
- strerror(errno));
- goto cleanup_driver;
- }
-
- if (dri2_dpy->conn) {
- if (!dri2_authenticate(dri2_dpy))
- goto cleanup_fd;
- }
-
- if (dri2_dpy->dri2_minor >= 1) {
- dri2_dpy->loader_extension.base.name = __DRI_DRI2_LOADER;
- dri2_dpy->loader_extension.base.version = 3;
- dri2_dpy->loader_extension.getBuffers = dri2_get_buffers;
- dri2_dpy->loader_extension.flushFrontBuffer = dri2_flush_front_buffer;
- dri2_dpy->loader_extension.getBuffersWithFormat =
- dri2_get_buffers_with_format;
- } else {
- dri2_dpy->loader_extension.base.name = __DRI_DRI2_LOADER;
- dri2_dpy->loader_extension.base.version = 2;
- dri2_dpy->loader_extension.getBuffers = dri2_get_buffers;
- dri2_dpy->loader_extension.flushFrontBuffer = dri2_flush_front_buffer;
- dri2_dpy->loader_extension.getBuffersWithFormat = NULL;
- }
-
- dri2_dpy->extensions[0] = &dri2_dpy->loader_extension.base;
- dri2_dpy->extensions[1] = &image_lookup_extension.base;
- dri2_dpy->extensions[2] = NULL;
-
- if (!dri2_create_screen(disp))
- goto cleanup_fd;
-
- if (dri2_dpy->conn) {
- if (!dri2_add_configs_for_visuals(dri2_dpy, disp))
- goto cleanup_configs;
- }
-
- disp->Extensions.MESA_drm_image = EGL_TRUE;
- disp->Extensions.KHR_image_base = EGL_TRUE;
- disp->Extensions.KHR_image_pixmap = EGL_TRUE;
- disp->Extensions.KHR_gl_renderbuffer_image = EGL_TRUE;
- disp->Extensions.KHR_gl_texture_2D_image = EGL_TRUE;
- disp->Extensions.NOK_swap_region = EGL_TRUE;
- disp->Extensions.NOK_texture_from_pixmap = EGL_TRUE;
-
- /* we're supporting EGL 1.4 */
- *major = 1;
- *minor = 4;
-
- return EGL_TRUE;
-
- cleanup_configs:
- _eglCleanupDisplay(disp);
- dri2_dpy->core->destroyScreen(dri2_dpy->dri_screen);
- cleanup_fd:
- close(dri2_dpy->fd);
- cleanup_driver:
- dlclose(dri2_dpy->driver);
- cleanup_conn:
- if (disp->PlatformDisplay == NULL)
- xcb_disconnect(dri2_dpy->conn);
- cleanup_dpy:
- free(dri2_dpy);
-
- return EGL_FALSE;
-}
-
-#ifdef HAVE_LIBUDEV
-
-struct dri2_driver_map {
- int vendor_id;
- const char *driver;
- const int *chip_ids;
- int num_chips_ids;
-};
-
-const int i915_chip_ids[] = {
- 0x3577, /* PCI_CHIP_I830_M */
- 0x2562, /* PCI_CHIP_845_G */
- 0x3582, /* PCI_CHIP_I855_GM */
- 0x2572, /* PCI_CHIP_I865_G */
- 0x2582, /* PCI_CHIP_I915_G */
- 0x258a, /* PCI_CHIP_E7221_G */
- 0x2592, /* PCI_CHIP_I915_GM */
- 0x2772, /* PCI_CHIP_I945_G */
- 0x27a2, /* PCI_CHIP_I945_GM */
- 0x27ae, /* PCI_CHIP_I945_GME */
- 0x29b2, /* PCI_CHIP_Q35_G */
- 0x29c2, /* PCI_CHIP_G33_G */
- 0x29d2, /* PCI_CHIP_Q33_G */
- 0xa001, /* PCI_CHIP_IGD_G */
- 0xa011, /* Pineview */
-};
-
-const int i965_chip_ids[] = {
- 0x0042, /* PCI_CHIP_ILD_G */
- 0x0046, /* PCI_CHIP_ILM_G */
- 0x0102, /* PCI_CHIP_SANDYBRIDGE_GT1 */
- 0x0106, /* PCI_CHIP_SANDYBRIDGE_M_GT1 */
- 0x010a, /* PCI_CHIP_SANDYBRIDGE_S */
- 0x0112, /* PCI_CHIP_SANDYBRIDGE_GT2 */
- 0x0116, /* PCI_CHIP_SANDYBRIDGE_M_GT2 */
- 0x0122, /* PCI_CHIP_SANDYBRIDGE_GT2_PLUS */
- 0x0126, /* PCI_CHIP_SANDYBRIDGE_M_GT2_PLUS */
- 0x29a2, /* PCI_CHIP_I965_G */
- 0x2992, /* PCI_CHIP_I965_Q */
- 0x2982, /* PCI_CHIP_I965_G_1 */
- 0x2972, /* PCI_CHIP_I946_GZ */
- 0x2a02, /* PCI_CHIP_I965_GM */
- 0x2a12, /* PCI_CHIP_I965_GME */
- 0x2a42, /* PCI_CHIP_GM45_GM */
- 0x2e02, /* PCI_CHIP_IGD_E_G */
- 0x2e12, /* PCI_CHIP_Q45_G */
- 0x2e22, /* PCI_CHIP_G45_G */
- 0x2e32, /* PCI_CHIP_G41_G */
- 0x2e42, /* PCI_CHIP_B43_G */
- 0x2e92, /* PCI_CHIP_B43_G1 */
-};
-
-const int r100_chip_ids[] = {
- 0x4C57, /* PCI_CHIP_RADEON_LW */
- 0x4C58, /* PCI_CHIP_RADEON_LX */
- 0x4C59, /* PCI_CHIP_RADEON_LY */
- 0x4C5A, /* PCI_CHIP_RADEON_LZ */
- 0x5144, /* PCI_CHIP_RADEON_QD */
- 0x5145, /* PCI_CHIP_RADEON_QE */
- 0x5146, /* PCI_CHIP_RADEON_QF */
- 0x5147, /* PCI_CHIP_RADEON_QG */
- 0x5159, /* PCI_CHIP_RADEON_QY */
- 0x515A, /* PCI_CHIP_RADEON_QZ */
- 0x5157, /* PCI_CHIP_RV200_QW */
- 0x5158, /* PCI_CHIP_RV200_QX */
- 0x515E, /* PCI_CHIP_RN50_515E */
- 0x5969, /* PCI_CHIP_RN50_5969 */
- 0x4136, /* PCI_CHIP_RS100_4136 */
- 0x4336, /* PCI_CHIP_RS100_4336 */
- 0x4137, /* PCI_CHIP_RS200_4137 */
- 0x4337, /* PCI_CHIP_RS200_4337 */
- 0x4237, /* PCI_CHIP_RS250_4237 */
- 0x4437, /* PCI_CHIP_RS250_4437 */
-};
-
-const int r200_chip_ids[] = {
- 0x5148, /* PCI_CHIP_R200_QH */
- 0x514C, /* PCI_CHIP_R200_QL */
- 0x514D, /* PCI_CHIP_R200_QM */
- 0x4242, /* PCI_CHIP_R200_BB */
- 0x4243, /* PCI_CHIP_R200_BC */
- 0x4966, /* PCI_CHIP_RV250_If */
- 0x4967, /* PCI_CHIP_RV250_Ig */
- 0x4C64, /* PCI_CHIP_RV250_Ld */
- 0x4C66, /* PCI_CHIP_RV250_Lf */
- 0x4C67, /* PCI_CHIP_RV250_Lg */
- 0x5960, /* PCI_CHIP_RV280_5960 */
- 0x5961, /* PCI_CHIP_RV280_5961 */
- 0x5962, /* PCI_CHIP_RV280_5962 */
- 0x5964, /* PCI_CHIP_RV280_5964 */
- 0x5965, /* PCI_CHIP_RV280_5965 */
- 0x5C61, /* PCI_CHIP_RV280_5C61 */
- 0x5C63, /* PCI_CHIP_RV280_5C63 */
- 0x5834, /* PCI_CHIP_RS300_5834 */
- 0x5835, /* PCI_CHIP_RS300_5835 */
- 0x7834, /* PCI_CHIP_RS350_7834 */
- 0x7835, /* PCI_CHIP_RS350_7835 */
-};
-
-const int r300_chip_ids[] = {
- 0x4144, /* PCI_CHIP_R300_AD */
- 0x4145, /* PCI_CHIP_R300_AE */
- 0x4146, /* PCI_CHIP_R300_AF */
- 0x4147, /* PCI_CHIP_R300_AG */
- 0x4E44, /* PCI_CHIP_R300_ND */
- 0x4E45, /* PCI_CHIP_R300_NE */
- 0x4E46, /* PCI_CHIP_R300_NF */
- 0x4E47, /* PCI_CHIP_R300_NG */
- 0x4E48, /* PCI_CHIP_R350_NH */
- 0x4E49, /* PCI_CHIP_R350_NI */
- 0x4E4B, /* PCI_CHIP_R350_NK */
- 0x4148, /* PCI_CHIP_R350_AH */
- 0x4149, /* PCI_CHIP_R350_AI */
- 0x414A, /* PCI_CHIP_R350_AJ */
- 0x414B, /* PCI_CHIP_R350_AK */
- 0x4E4A, /* PCI_CHIP_R360_NJ */
- 0x4150, /* PCI_CHIP_RV350_AP */
- 0x4151, /* PCI_CHIP_RV350_AQ */
- 0x4152, /* PCI_CHIP_RV350_AR */
- 0x4153, /* PCI_CHIP_RV350_AS */
- 0x4154, /* PCI_CHIP_RV350_AT */
- 0x4155, /* PCI_CHIP_RV350_AU */
- 0x4156, /* PCI_CHIP_RV350_AV */
- 0x4E50, /* PCI_CHIP_RV350_NP */
- 0x4E51, /* PCI_CHIP_RV350_NQ */
- 0x4E52, /* PCI_CHIP_RV350_NR */
- 0x4E53, /* PCI_CHIP_RV350_NS */
- 0x4E54, /* PCI_CHIP_RV350_NT */
- 0x4E56, /* PCI_CHIP_RV350_NV */
- 0x5460, /* PCI_CHIP_RV370_5460 */
- 0x5462, /* PCI_CHIP_RV370_5462 */
- 0x5464, /* PCI_CHIP_RV370_5464 */
- 0x5B60, /* PCI_CHIP_RV370_5B60 */
- 0x5B62, /* PCI_CHIP_RV370_5B62 */
- 0x5B63, /* PCI_CHIP_RV370_5B63 */
- 0x5B64, /* PCI_CHIP_RV370_5B64 */
- 0x5B65, /* PCI_CHIP_RV370_5B65 */
- 0x3150, /* PCI_CHIP_RV380_3150 */
- 0x3152, /* PCI_CHIP_RV380_3152 */
- 0x3154, /* PCI_CHIP_RV380_3154 */
- 0x3155, /* PCI_CHIP_RV380_3155 */
- 0x3E50, /* PCI_CHIP_RV380_3E50 */
- 0x3E54, /* PCI_CHIP_RV380_3E54 */
- 0x4A48, /* PCI_CHIP_R420_JH */
- 0x4A49, /* PCI_CHIP_R420_JI */
- 0x4A4A, /* PCI_CHIP_R420_JJ */
- 0x4A4B, /* PCI_CHIP_R420_JK */
- 0x4A4C, /* PCI_CHIP_R420_JL */
- 0x4A4D, /* PCI_CHIP_R420_JM */
- 0x4A4E, /* PCI_CHIP_R420_JN */
- 0x4A4F, /* PCI_CHIP_R420_JO */
- 0x4A50, /* PCI_CHIP_R420_JP */
- 0x4A54, /* PCI_CHIP_R420_JT */
- 0x5548, /* PCI_CHIP_R423_UH */
- 0x5549, /* PCI_CHIP_R423_UI */
- 0x554A, /* PCI_CHIP_R423_UJ */
- 0x554B, /* PCI_CHIP_R423_UK */
- 0x5550, /* PCI_CHIP_R423_5550 */
- 0x5551, /* PCI_CHIP_R423_UQ */
- 0x5552, /* PCI_CHIP_R423_UR */
- 0x5554, /* PCI_CHIP_R423_UT */
- 0x5D57, /* PCI_CHIP_R423_5D57 */
- 0x554C, /* PCI_CHIP_R430_554C */
- 0x554D, /* PCI_CHIP_R430_554D */
- 0x554E, /* PCI_CHIP_R430_554E */
- 0x554F, /* PCI_CHIP_R430_554F */
- 0x5D48, /* PCI_CHIP_R430_5D48 */
- 0x5D49, /* PCI_CHIP_R430_5D49 */
- 0x5D4A, /* PCI_CHIP_R430_5D4A */
- 0x5D4C, /* PCI_CHIP_R480_5D4C */
- 0x5D4D, /* PCI_CHIP_R480_5D4D */
- 0x5D4E, /* PCI_CHIP_R480_5D4E */
- 0x5D4F, /* PCI_CHIP_R480_5D4F */
- 0x5D50, /* PCI_CHIP_R480_5D50 */
- 0x5D52, /* PCI_CHIP_R480_5D52 */
- 0x4B49, /* PCI_CHIP_R481_4B49 */
- 0x4B4A, /* PCI_CHIP_R481_4B4A */
- 0x4B4B, /* PCI_CHIP_R481_4B4B */
- 0x4B4C, /* PCI_CHIP_R481_4B4C */
- 0x564A, /* PCI_CHIP_RV410_564A */
- 0x564B, /* PCI_CHIP_RV410_564B */
- 0x564F, /* PCI_CHIP_RV410_564F */
- 0x5652, /* PCI_CHIP_RV410_5652 */
- 0x5653, /* PCI_CHIP_RV410_5653 */
- 0x5657, /* PCI_CHIP_RV410_5657 */
- 0x5E48, /* PCI_CHIP_RV410_5E48 */
- 0x5E4A, /* PCI_CHIP_RV410_5E4A */
- 0x5E4B, /* PCI_CHIP_RV410_5E4B */
- 0x5E4C, /* PCI_CHIP_RV410_5E4C */
- 0x5E4D, /* PCI_CHIP_RV410_5E4D */
- 0x5E4F, /* PCI_CHIP_RV410_5E4F */
- 0x5A41, /* PCI_CHIP_RS400_5A41 */
- 0x5A42, /* PCI_CHIP_RS400_5A42 */
- 0x5A61, /* PCI_CHIP_RC410_5A61 */
- 0x5A62, /* PCI_CHIP_RC410_5A62 */
- 0x5954, /* PCI_CHIP_RS480_5954 */
- 0x5955, /* PCI_CHIP_RS480_5955 */
- 0x5974, /* PCI_CHIP_RS482_5974 */
- 0x5975, /* PCI_CHIP_RS482_5975 */
- 0x7100, /* PCI_CHIP_R520_7100 */
- 0x7101, /* PCI_CHIP_R520_7101 */
- 0x7102, /* PCI_CHIP_R520_7102 */
- 0x7103, /* PCI_CHIP_R520_7103 */
- 0x7104, /* PCI_CHIP_R520_7104 */
- 0x7105, /* PCI_CHIP_R520_7105 */
- 0x7106, /* PCI_CHIP_R520_7106 */
- 0x7108, /* PCI_CHIP_R520_7108 */
- 0x7109, /* PCI_CHIP_R520_7109 */
- 0x710A, /* PCI_CHIP_R520_710A */
- 0x710B, /* PCI_CHIP_R520_710B */
- 0x710C, /* PCI_CHIP_R520_710C */
- 0x710E, /* PCI_CHIP_R520_710E */
- 0x710F, /* PCI_CHIP_R520_710F */
- 0x7140, /* PCI_CHIP_RV515_7140 */
- 0x7141, /* PCI_CHIP_RV515_7141 */
- 0x7142, /* PCI_CHIP_RV515_7142 */
- 0x7143, /* PCI_CHIP_RV515_7143 */
- 0x7144, /* PCI_CHIP_RV515_7144 */
- 0x7145, /* PCI_CHIP_RV515_7145 */
- 0x7146, /* PCI_CHIP_RV515_7146 */
- 0x7147, /* PCI_CHIP_RV515_7147 */
- 0x7149, /* PCI_CHIP_RV515_7149 */
- 0x714A, /* PCI_CHIP_RV515_714A */
- 0x714B, /* PCI_CHIP_RV515_714B */
- 0x714C, /* PCI_CHIP_RV515_714C */
- 0x714D, /* PCI_CHIP_RV515_714D */
- 0x714E, /* PCI_CHIP_RV515_714E */
- 0x714F, /* PCI_CHIP_RV515_714F */
- 0x7151, /* PCI_CHIP_RV515_7151 */
- 0x7152, /* PCI_CHIP_RV515_7152 */
- 0x7153, /* PCI_CHIP_RV515_7153 */
- 0x715E, /* PCI_CHIP_RV515_715E */
- 0x715F, /* PCI_CHIP_RV515_715F */
- 0x7180, /* PCI_CHIP_RV515_7180 */
- 0x7181, /* PCI_CHIP_RV515_7181 */
- 0x7183, /* PCI_CHIP_RV515_7183 */
- 0x7186, /* PCI_CHIP_RV515_7186 */
- 0x7187, /* PCI_CHIP_RV515_7187 */
- 0x7188, /* PCI_CHIP_RV515_7188 */
- 0x718A, /* PCI_CHIP_RV515_718A */
- 0x718B, /* PCI_CHIP_RV515_718B */
- 0x718C, /* PCI_CHIP_RV515_718C */
- 0x718D, /* PCI_CHIP_RV515_718D */
- 0x718F, /* PCI_CHIP_RV515_718F */
- 0x7193, /* PCI_CHIP_RV515_7193 */
- 0x7196, /* PCI_CHIP_RV515_7196 */
- 0x719B, /* PCI_CHIP_RV515_719B */
- 0x719F, /* PCI_CHIP_RV515_719F */
- 0x7200, /* PCI_CHIP_RV515_7200 */
- 0x7210, /* PCI_CHIP_RV515_7210 */
- 0x7211, /* PCI_CHIP_RV515_7211 */
- 0x71C0, /* PCI_CHIP_RV530_71C0 */
- 0x71C1, /* PCI_CHIP_RV530_71C1 */
- 0x71C2, /* PCI_CHIP_RV530_71C2 */
- 0x71C3, /* PCI_CHIP_RV530_71C3 */
- 0x71C4, /* PCI_CHIP_RV530_71C4 */
- 0x71C5, /* PCI_CHIP_RV530_71C5 */
- 0x71C6, /* PCI_CHIP_RV530_71C6 */
- 0x71C7, /* PCI_CHIP_RV530_71C7 */
- 0x71CD, /* PCI_CHIP_RV530_71CD */
- 0x71CE, /* PCI_CHIP_RV530_71CE */
- 0x71D2, /* PCI_CHIP_RV530_71D2 */
- 0x71D4, /* PCI_CHIP_RV530_71D4 */
- 0x71D5, /* PCI_CHIP_RV530_71D5 */
- 0x71D6, /* PCI_CHIP_RV530_71D6 */
- 0x71DA, /* PCI_CHIP_RV530_71DA */
- 0x71DE, /* PCI_CHIP_RV530_71DE */
- 0x7281, /* PCI_CHIP_RV560_7281 */
- 0x7283, /* PCI_CHIP_RV560_7283 */
- 0x7287, /* PCI_CHIP_RV560_7287 */
- 0x7290, /* PCI_CHIP_RV560_7290 */
- 0x7291, /* PCI_CHIP_RV560_7291 */
- 0x7293, /* PCI_CHIP_RV560_7293 */
- 0x7297, /* PCI_CHIP_RV560_7297 */
- 0x7280, /* PCI_CHIP_RV570_7280 */
- 0x7288, /* PCI_CHIP_RV570_7288 */
- 0x7289, /* PCI_CHIP_RV570_7289 */
- 0x728B, /* PCI_CHIP_RV570_728B */
- 0x728C, /* PCI_CHIP_RV570_728C */
- 0x7240, /* PCI_CHIP_R580_7240 */
- 0x7243, /* PCI_CHIP_R580_7243 */
- 0x7244, /* PCI_CHIP_R580_7244 */
- 0x7245, /* PCI_CHIP_R580_7245 */
- 0x7246, /* PCI_CHIP_R580_7246 */
- 0x7247, /* PCI_CHIP_R580_7247 */
- 0x7248, /* PCI_CHIP_R580_7248 */
- 0x7249, /* PCI_CHIP_R580_7249 */
- 0x724A, /* PCI_CHIP_R580_724A */
- 0x724B, /* PCI_CHIP_R580_724B */
- 0x724C, /* PCI_CHIP_R580_724C */
- 0x724D, /* PCI_CHIP_R580_724D */
- 0x724E, /* PCI_CHIP_R580_724E */
- 0x724F, /* PCI_CHIP_R580_724F */
- 0x7284, /* PCI_CHIP_R580_7284 */
- 0x793F, /* PCI_CHIP_RS600_793F */
- 0x7941, /* PCI_CHIP_RS600_7941 */
- 0x7942, /* PCI_CHIP_RS600_7942 */
- 0x791E, /* PCI_CHIP_RS690_791E */
- 0x791F, /* PCI_CHIP_RS690_791F */
- 0x796C, /* PCI_CHIP_RS740_796C */
- 0x796D, /* PCI_CHIP_RS740_796D */
- 0x796E, /* PCI_CHIP_RS740_796E */
- 0x796F, /* PCI_CHIP_RS740_796F */
-};
-
-const int r600_chip_ids[] = {
- 0x9400, /* PCI_CHIP_R600_9400 */
- 0x9401, /* PCI_CHIP_R600_9401 */
- 0x9402, /* PCI_CHIP_R600_9402 */
- 0x9403, /* PCI_CHIP_R600_9403 */
- 0x9405, /* PCI_CHIP_R600_9405 */
- 0x940A, /* PCI_CHIP_R600_940A */
- 0x940B, /* PCI_CHIP_R600_940B */
- 0x940F, /* PCI_CHIP_R600_940F */
- 0x94C0, /* PCI_CHIP_RV610_94C0 */
- 0x94C1, /* PCI_CHIP_RV610_94C1 */
- 0x94C3, /* PCI_CHIP_RV610_94C3 */
- 0x94C4, /* PCI_CHIP_RV610_94C4 */
- 0x94C5, /* PCI_CHIP_RV610_94C5 */
- 0x94C6, /* PCI_CHIP_RV610_94C6 */
- 0x94C7, /* PCI_CHIP_RV610_94C7 */
- 0x94C8, /* PCI_CHIP_RV610_94C8 */
- 0x94C9, /* PCI_CHIP_RV610_94C9 */
- 0x94CB, /* PCI_CHIP_RV610_94CB */
- 0x94CC, /* PCI_CHIP_RV610_94CC */
- 0x94CD, /* PCI_CHIP_RV610_94CD */
- 0x9580, /* PCI_CHIP_RV630_9580 */
- 0x9581, /* PCI_CHIP_RV630_9581 */
- 0x9583, /* PCI_CHIP_RV630_9583 */
- 0x9586, /* PCI_CHIP_RV630_9586 */
- 0x9587, /* PCI_CHIP_RV630_9587 */
- 0x9588, /* PCI_CHIP_RV630_9588 */
- 0x9589, /* PCI_CHIP_RV630_9589 */
- 0x958A, /* PCI_CHIP_RV630_958A */
- 0x958B, /* PCI_CHIP_RV630_958B */
- 0x958C, /* PCI_CHIP_RV630_958C */
- 0x958D, /* PCI_CHIP_RV630_958D */
- 0x958E, /* PCI_CHIP_RV630_958E */
- 0x958F, /* PCI_CHIP_RV630_958F */
- 0x9500, /* PCI_CHIP_RV670_9500 */
- 0x9501, /* PCI_CHIP_RV670_9501 */
- 0x9504, /* PCI_CHIP_RV670_9504 */
- 0x9505, /* PCI_CHIP_RV670_9505 */
- 0x9506, /* PCI_CHIP_RV670_9506 */
- 0x9507, /* PCI_CHIP_RV670_9507 */
- 0x9508, /* PCI_CHIP_RV670_9508 */
- 0x9509, /* PCI_CHIP_RV670_9509 */
- 0x950F, /* PCI_CHIP_RV670_950F */
- 0x9511, /* PCI_CHIP_RV670_9511 */
- 0x9515, /* PCI_CHIP_RV670_9515 */
- 0x9517, /* PCI_CHIP_RV670_9517 */
- 0x9519, /* PCI_CHIP_RV670_9519 */
- 0x95C0, /* PCI_CHIP_RV620_95C0 */
- 0x95C2, /* PCI_CHIP_RV620_95C2 */
- 0x95C4, /* PCI_CHIP_RV620_95C4 */
- 0x95C5, /* PCI_CHIP_RV620_95C5 */
- 0x95C6, /* PCI_CHIP_RV620_95C6 */
- 0x95C7, /* PCI_CHIP_RV620_95C7 */
- 0x95C9, /* PCI_CHIP_RV620_95C9 */
- 0x95CC, /* PCI_CHIP_RV620_95CC */
- 0x95CD, /* PCI_CHIP_RV620_95CD */
- 0x95CE, /* PCI_CHIP_RV620_95CE */
- 0x95CF, /* PCI_CHIP_RV620_95CF */
- 0x9590, /* PCI_CHIP_RV635_9590 */
- 0x9591, /* PCI_CHIP_RV635_9591 */
- 0x9593, /* PCI_CHIP_RV635_9593 */
- 0x9595, /* PCI_CHIP_RV635_9595 */
- 0x9596, /* PCI_CHIP_RV635_9596 */
- 0x9597, /* PCI_CHIP_RV635_9597 */
- 0x9598, /* PCI_CHIP_RV635_9598 */
- 0x9599, /* PCI_CHIP_RV635_9599 */
- 0x959B, /* PCI_CHIP_RV635_959B */
- 0x9610, /* PCI_CHIP_RS780_9610 */
- 0x9611, /* PCI_CHIP_RS780_9611 */
- 0x9612, /* PCI_CHIP_RS780_9612 */
- 0x9613, /* PCI_CHIP_RS780_9613 */
- 0x9614, /* PCI_CHIP_RS780_9614 */
- 0x9615, /* PCI_CHIP_RS780_9615 */
- 0x9616, /* PCI_CHIP_RS780_9616 */
- 0x9710, /* PCI_CHIP_RS880_9710 */
- 0x9711, /* PCI_CHIP_RS880_9711 */
- 0x9712, /* PCI_CHIP_RS880_9712 */
- 0x9713, /* PCI_CHIP_RS880_9713 */
- 0x9714, /* PCI_CHIP_RS880_9714 */
- 0x9715, /* PCI_CHIP_RS880_9715 */
- 0x9440, /* PCI_CHIP_RV770_9440 */
- 0x9441, /* PCI_CHIP_RV770_9441 */
- 0x9442, /* PCI_CHIP_RV770_9442 */
- 0x9443, /* PCI_CHIP_RV770_9443 */
- 0x9444, /* PCI_CHIP_RV770_9444 */
- 0x9446, /* PCI_CHIP_RV770_9446 */
- 0x944A, /* PCI_CHIP_RV770_944A */
- 0x944B, /* PCI_CHIP_RV770_944B */
- 0x944C, /* PCI_CHIP_RV770_944C */
- 0x944E, /* PCI_CHIP_RV770_944E */
- 0x9450, /* PCI_CHIP_RV770_9450 */
- 0x9452, /* PCI_CHIP_RV770_9452 */
- 0x9456, /* PCI_CHIP_RV770_9456 */
- 0x945A, /* PCI_CHIP_RV770_945A */
- 0x945B, /* PCI_CHIP_RV770_945B */
- 0x945E, /* PCI_CHIP_RV770_945E */
- 0x9460, /* PCI_CHIP_RV790_9460 */
- 0x9462, /* PCI_CHIP_RV790_9462 */
- 0x946A, /* PCI_CHIP_RV770_946A */
- 0x946B, /* PCI_CHIP_RV770_946B */
- 0x947A, /* PCI_CHIP_RV770_947A */
- 0x947B, /* PCI_CHIP_RV770_947B */
- 0x9480, /* PCI_CHIP_RV730_9480 */
- 0x9487, /* PCI_CHIP_RV730_9487 */
- 0x9488, /* PCI_CHIP_RV730_9488 */
- 0x9489, /* PCI_CHIP_RV730_9489 */
- 0x948A, /* PCI_CHIP_RV730_948A */
- 0x948F, /* PCI_CHIP_RV730_948F */
- 0x9490, /* PCI_CHIP_RV730_9490 */
- 0x9491, /* PCI_CHIP_RV730_9491 */
- 0x9495, /* PCI_CHIP_RV730_9495 */
- 0x9498, /* PCI_CHIP_RV730_9498 */
- 0x949C, /* PCI_CHIP_RV730_949C */
- 0x949E, /* PCI_CHIP_RV730_949E */
- 0x949F, /* PCI_CHIP_RV730_949F */
- 0x9540, /* PCI_CHIP_RV710_9540 */
- 0x9541, /* PCI_CHIP_RV710_9541 */
- 0x9542, /* PCI_CHIP_RV710_9542 */
- 0x954E, /* PCI_CHIP_RV710_954E */
- 0x954F, /* PCI_CHIP_RV710_954F */
- 0x9552, /* PCI_CHIP_RV710_9552 */
- 0x9553, /* PCI_CHIP_RV710_9553 */
- 0x9555, /* PCI_CHIP_RV710_9555 */
- 0x9557, /* PCI_CHIP_RV710_9557 */
- 0x955F, /* PCI_CHIP_RV710_955F */
- 0x94A0, /* PCI_CHIP_RV740_94A0 */
- 0x94A1, /* PCI_CHIP_RV740_94A1 */
- 0x94A3, /* PCI_CHIP_RV740_94A3 */
- 0x94B1, /* PCI_CHIP_RV740_94B1 */
- 0x94B3, /* PCI_CHIP_RV740_94B3 */
- 0x94B4, /* PCI_CHIP_RV740_94B4 */
- 0x94B5, /* PCI_CHIP_RV740_94B5 */
- 0x94B9, /* PCI_CHIP_RV740_94B9 */
- 0x68E0, /* PCI_CHIP_CEDAR_68E0 */
- 0x68E1, /* PCI_CHIP_CEDAR_68E1 */
- 0x68E4, /* PCI_CHIP_CEDAR_68E4 */
- 0x68E5, /* PCI_CHIP_CEDAR_68E5 */
- 0x68E8, /* PCI_CHIP_CEDAR_68E8 */
- 0x68E9, /* PCI_CHIP_CEDAR_68E9 */
- 0x68F1, /* PCI_CHIP_CEDAR_68F1 */
- 0x68F8, /* PCI_CHIP_CEDAR_68F8 */
- 0x68F9, /* PCI_CHIP_CEDAR_68F9 */
- 0x68FE, /* PCI_CHIP_CEDAR_68FE */
- 0x68C0, /* PCI_CHIP_REDWOOD_68C0 */
- 0x68C1, /* PCI_CHIP_REDWOOD_68C1 */
- 0x68C8, /* PCI_CHIP_REDWOOD_68C8 */
- 0x68C9, /* PCI_CHIP_REDWOOD_68C9 */
- 0x68D8, /* PCI_CHIP_REDWOOD_68D8 */
- 0x68D9, /* PCI_CHIP_REDWOOD_68D9 */
- 0x68DA, /* PCI_CHIP_REDWOOD_68DA */
- 0x68DE, /* PCI_CHIP_REDWOOD_68DE */
- 0x68A0, /* PCI_CHIP_JUNIPER_68A0 */
- 0x68A1, /* PCI_CHIP_JUNIPER_68A1 */
- 0x68A8, /* PCI_CHIP_JUNIPER_68A8 */
- 0x68A9, /* PCI_CHIP_JUNIPER_68A9 */
- 0x68B0, /* PCI_CHIP_JUNIPER_68B0 */
- 0x68B8, /* PCI_CHIP_JUNIPER_68B8 */
- 0x68B9, /* PCI_CHIP_JUNIPER_68B9 */
- 0x68BE, /* PCI_CHIP_JUNIPER_68BE */
- 0x6880, /* PCI_CHIP_CYPRESS_6880 */
- 0x6888, /* PCI_CHIP_CYPRESS_6888 */
- 0x6889, /* PCI_CHIP_CYPRESS_6889 */
- 0x688A, /* PCI_CHIP_CYPRESS_688A */
- 0x6898, /* PCI_CHIP_CYPRESS_6898 */
- 0x6899, /* PCI_CHIP_CYPRESS_6899 */
- 0x689E, /* PCI_CHIP_CYPRESS_689E */
- 0x689C, /* PCI_CHIP_HEMLOCK_689C */
- 0x689D, /* PCI_CHIP_HEMLOCK_689D */
-};
-
-const struct dri2_driver_map driver_map[] = {
- { 0x8086, "i915", i915_chip_ids, ARRAY_SIZE(i915_chip_ids) },
- { 0x8086, "i965", i965_chip_ids, ARRAY_SIZE(i965_chip_ids) },
- { 0x1002, "radeon", r100_chip_ids, ARRAY_SIZE(r100_chip_ids) },
- { 0x1002, "r200", r200_chip_ids, ARRAY_SIZE(r200_chip_ids) },
- { 0x1002, "r300", r300_chip_ids, ARRAY_SIZE(r300_chip_ids) },
- { 0x1002, "r600", r600_chip_ids, ARRAY_SIZE(r600_chip_ids) },
-};
-
-static char *
-dri2_get_driver_for_fd(int fd)
-{
- struct udev *udev;
- struct udev_device *device, *parent;
- struct stat buf;
- const char *pci_id;
- char *driver = NULL;
- int vendor_id, chip_id, i, j;
-
- udev = udev_new();
- if (fstat(fd, &buf) < 0) {
- _eglLog(_EGL_WARNING, "EGL-DRI2: failed to stat fd %d", fd);
- goto out;
- }
-
- device = udev_device_new_from_devnum(udev, 'c', buf.st_rdev);
- if (device == NULL) {
- _eglLog(_EGL_WARNING,
- "EGL-DRI2: could not create udev device for fd %d", fd);
- goto out;
- }
-
- parent = udev_device_get_parent(device);
- if (parent == NULL) {
- _eglLog(_EGL_WARNING, "DRI2: could not get parent device");
- goto out;
- }
-
- pci_id = udev_device_get_property_value(parent, "PCI_ID");
- if (pci_id == NULL || sscanf(pci_id, "%x:%x", &vendor_id, &chip_id) != 2) {
- _eglLog(_EGL_WARNING, "EGL-DRI2: malformed or no PCI ID");
- goto out;
- }
-
- for (i = 0; i < ARRAY_SIZE(driver_map); i++) {
- if (vendor_id != driver_map[i].vendor_id)
- continue;
- for (j = 0; j < driver_map[i].num_chips_ids; j++)
- if (driver_map[i].chip_ids[j] == chip_id) {
- driver = strdup(driver_map[i].driver);
- _eglLog(_EGL_DEBUG, "pci id for %d: %04x:%04x, driver %s",
- fd, vendor_id, chip_id, driver);
- goto out;
- }
- }
-
- out:
- udev_device_unref(device);
- udev_unref(udev);
-
- return driver;
-}
-
-static EGLBoolean
-dri2_initialize_drm(_EGLDriver *drv, _EGLDisplay *disp,
- EGLint *major, EGLint *minor)
-{
- struct dri2_egl_display *dri2_dpy;
- int i;
-
- dri2_dpy = malloc(sizeof *dri2_dpy);
- if (!dri2_dpy)
- return _eglError(EGL_BAD_ALLOC, "eglInitialize");
-
- disp->DriverData = (void *) dri2_dpy;
- dri2_dpy->fd = (int) disp->PlatformDisplay;
-
- dri2_dpy->driver_name = dri2_get_driver_for_fd(dri2_dpy->fd);
- if (dri2_dpy->driver_name == NULL)
- return _eglError(EGL_BAD_ALLOC, "DRI2: failed to get driver name");
-
- if (!dri2_load_driver(disp))
- goto cleanup_driver_name;
-
- dri2_dpy->extensions[0] = &image_lookup_extension.base;
- dri2_dpy->extensions[1] = &use_invalidate.base;
- dri2_dpy->extensions[2] = NULL;
-
- if (!dri2_create_screen(disp))
- goto cleanup_driver;
-
- for (i = 0; dri2_dpy->driver_configs[i]; i++)
- dri2_add_config(disp, dri2_dpy->driver_configs[i], i + 1, 0, 0);
-
- disp->Extensions.MESA_drm_image = EGL_TRUE;
- disp->Extensions.KHR_image_base = EGL_TRUE;
- disp->Extensions.KHR_gl_renderbuffer_image = EGL_TRUE;
- disp->Extensions.KHR_gl_texture_2D_image = EGL_TRUE;
-
- /* we're supporting EGL 1.4 */
- *major = 1;
- *minor = 4;
-
- return EGL_TRUE;
-
- cleanup_driver:
- dlclose(dri2_dpy->driver);
- cleanup_driver_name:
- free(dri2_dpy->driver_name);
-
- return EGL_FALSE;
-}
-
-#endif
-
/**
* Called via eglInitialize(), GLX_drv->API.Initialize().
*/
static EGLBoolean
-dri2_initialize(_EGLDriver *drv, _EGLDisplay *disp,
- EGLint *major, EGLint *minor)
+dri2_initialize(_EGLDriver *drv, _EGLDisplay *disp)
{
+ /* not until swrast_dri is supported */
+ if (disp->Options.UseFallback)
+ return EGL_FALSE;
+
switch (disp->Platform) {
case _EGL_PLATFORM_X11:
- return dri2_initialize_x11(drv, disp, major, minor);
+ if (disp->Options.TestOnly)
+ return EGL_TRUE;
+ return dri2_initialize_x11(drv, disp);
#ifdef HAVE_LIBUDEV
case _EGL_PLATFORM_DRM:
- return dri2_initialize_drm(drv, disp, major, minor);
+ if (disp->Options.TestOnly)
+ return EGL_TRUE;
+ return dri2_initialize_drm(drv, disp);
+#ifdef HAVE_WAYLAND_PLATFORM
+ case _EGL_PLATFORM_WAYLAND:
+ if (disp->Options.TestOnly)
+ return EGL_TRUE;
+ return dri2_initialize_wayland(drv, disp);
+#endif
#endif
default:
@@ -1499,7 +516,8 @@ dri2_terminate(_EGLDriver *drv, _EGLDisplay *disp)
_eglCleanupDisplay(disp);
dri2_dpy->core->destroyScreen(dri2_dpy->dri_screen);
- close(dri2_dpy->fd);
+ if (dri2_dpy->fd)
+ close(dri2_dpy->fd);
dlclose(dri2_dpy->driver);
if (disp->PlatformDisplay == NULL)
xcb_disconnect(dri2_dpy->conn);
@@ -1557,28 +575,61 @@ dri2_create_context(_EGLDriver *drv, _EGLDisplay *disp, _EGLConfig *conf,
return NULL;
}
- if (conf != NULL)
- dri_config = dri2_config->dri_config;
+ if (conf != NULL) {
+ /* The config chosen here isn't necessarily
+ * used for surfaces later.
+ * A pixmap surface will use the single config.
+ * This opportunity depends on disabling the
+ * doubleBufferMode check in
+ * src/mesa/main/context.c:check_compatible()
+ */
+ if (dri2_config->dri_double_config)
+ dri_config = dri2_config->dri_double_config;
+ else
+ dri_config = dri2_config->dri_single_config;
+ }
else
dri_config = NULL;
- if (dri2_dpy->dri2->base.version >= 2) {
- dri2_ctx->dri_context =
- dri2_dpy->dri2->createNewContextForAPI(dri2_dpy->dri_screen,
- api,
- dri_config,
- dri2_ctx_shared ?
- dri2_ctx_shared->dri_context : NULL,
- dri2_ctx);
- } else if (api == __DRI_API_OPENGL) {
- dri2_ctx->dri_context =
- dri2_dpy->dri2->createNewContext(dri2_dpy->dri_screen,
- dri2_config->dri_config,
- dri2_ctx_shared ?
- dri2_ctx_shared->dri_context : NULL,
- dri2_ctx);
+ if (dri2_dpy->dri2) {
+ if (dri2_dpy->dri2->base.version >= 2) {
+ dri2_ctx->dri_context =
+ dri2_dpy->dri2->createNewContextForAPI(dri2_dpy->dri_screen,
+ api,
+ dri_config,
+ dri2_ctx_shared ?
+ dri2_ctx_shared->dri_context : NULL,
+ dri2_ctx);
+ } else if (api == __DRI_API_OPENGL) {
+ dri2_ctx->dri_context =
+ dri2_dpy->dri2->createNewContext(dri2_dpy->dri_screen,
+ dri_config,
+ dri2_ctx_shared ?
+ dri2_ctx_shared->dri_context : NULL,
+ dri2_ctx);
+ } else {
+ /* fail */
+ }
} else {
- /* fail */
+ assert(dri2_dpy->swrast);
+ if (dri2_dpy->swrast->base.version >= 2) {
+ dri2_ctx->dri_context =
+ dri2_dpy->swrast->createNewContextForAPI(dri2_dpy->dri_screen,
+ api,
+ dri_config,
+ dri2_ctx_shared ?
+ dri2_ctx_shared->dri_context : NULL,
+ dri2_ctx);
+ } else if (api == __DRI_API_OPENGL) {
+ dri2_ctx->dri_context =
+ dri2_dpy->core->createNewContext(dri2_dpy->dri_screen,
+ dri_config,
+ dri2_ctx_shared ?
+ dri2_ctx_shared->dri_context : NULL,
+ dri2_ctx);
+ } else {
+ /* fail */
+ }
}
if (!dri2_ctx->dri_context)
@@ -1591,29 +642,6 @@ dri2_create_context(_EGLDriver *drv, _EGLDisplay *disp, _EGLConfig *conf,
return NULL;
}
-static EGLBoolean
-dri2_destroy_surface(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *surf)
-{
- struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
- struct dri2_egl_surface *dri2_surf = dri2_egl_surface(surf);
-
- (void) drv;
-
- if (!_eglPutSurface(surf))
- return EGL_TRUE;
-
- (*dri2_dpy->core->destroyDrawable)(dri2_surf->dri_drawable);
-
- xcb_dri2_destroy_drawable (dri2_dpy->conn, dri2_surf->drawable);
-
- if (surf->Type == EGL_PBUFFER_BIT)
- xcb_free_pixmap (dri2_dpy->conn, dri2_surf->drawable);
-
- free(surf);
-
- return EGL_TRUE;
-}
-
/**
* Called via eglMakeCurrent(), drv->API.MakeCurrent().
*/
@@ -1643,19 +671,20 @@ dri2_make_current(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *dsurf,
rdraw = (dri2_rsurf) ? dri2_rsurf->dri_drawable : NULL;
cctx = (dri2_ctx) ? dri2_ctx->dri_context : NULL;
+ if (old_ctx) {
+ __DRIcontext *old_cctx = dri2_egl_context(old_ctx)->dri_context;
+ dri2_dpy->core->unbindContext(old_cctx);
+ }
+
if ((cctx == NULL && ddraw == NULL && rdraw == NULL) ||
dri2_dpy->core->bindContext(cctx, ddraw, rdraw)) {
- dri2_destroy_surface(drv, disp, old_dsurf);
- dri2_destroy_surface(drv, disp, old_rsurf);
- if (old_ctx) {
- /* unbind the old context only when there is no new context bound */
- if (!ctx) {
- __DRIcontext *old_cctx = dri2_egl_context(old_ctx)->dri_context;
- dri2_dpy->core->unbindContext(old_cctx);
- }
- /* no destroy? */
+ if (old_dsurf)
+ drv->API.DestroySurface(drv, disp, old_dsurf);
+ if (old_rsurf)
+ drv->API.DestroySurface(drv, disp, old_rsurf);
+ /* no destroy? */
+ if (old_ctx)
_eglPutContext(old_ctx);
- }
return EGL_TRUE;
} else {
@@ -1677,201 +706,15 @@ dri2_make_current(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *dsurf,
}
}
-/**
- * Called via eglCreateWindowSurface(), drv->API.CreateWindowSurface().
- */
-static _EGLSurface *
-dri2_create_surface(_EGLDriver *drv, _EGLDisplay *disp, EGLint type,
- _EGLConfig *conf, EGLNativeWindowType window,
- const EGLint *attrib_list)
-{
- struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
- struct dri2_egl_config *dri2_conf = dri2_egl_config(conf);
- struct dri2_egl_surface *dri2_surf;
- xcb_get_geometry_cookie_t cookie;
- xcb_get_geometry_reply_t *reply;
- xcb_screen_iterator_t s;
- xcb_generic_error_t *error;
-
- (void) drv;
-
- dri2_surf = malloc(sizeof *dri2_surf);
- if (!dri2_surf) {
- _eglError(EGL_BAD_ALLOC, "dri2_create_surface");
- return NULL;
- }
-
- if (!_eglInitSurface(&dri2_surf->base, disp, type, conf, attrib_list))
- goto cleanup_surf;
-
- dri2_surf->region = XCB_NONE;
- if (type == EGL_PBUFFER_BIT) {
- dri2_surf->drawable = xcb_generate_id(dri2_dpy->conn);
- s = xcb_setup_roots_iterator(xcb_get_setup(dri2_dpy->conn));
- xcb_create_pixmap(dri2_dpy->conn, conf->BufferSize,
- dri2_surf->drawable, s.data->root,
- dri2_surf->base.Width, dri2_surf->base.Height);
- } else {
- dri2_surf->drawable = window;
- }
-
- dri2_surf->dri_drawable =
- (*dri2_dpy->dri2->createNewDrawable) (dri2_dpy->dri_screen,
- dri2_conf->dri_config, dri2_surf);
- if (dri2_surf->dri_drawable == NULL) {
- _eglError(EGL_BAD_ALLOC, "dri2->createNewDrawable");
- goto cleanup_pixmap;
- }
-
- xcb_dri2_create_drawable (dri2_dpy->conn, dri2_surf->drawable);
-
- if (type != EGL_PBUFFER_BIT) {
- cookie = xcb_get_geometry (dri2_dpy->conn, dri2_surf->drawable);
- reply = xcb_get_geometry_reply (dri2_dpy->conn, cookie, &error);
- if (reply == NULL || error != NULL) {
- _eglError(EGL_BAD_ALLOC, "xcb_get_geometry");
- free(error);
- goto cleanup_dri_drawable;
- }
-
- dri2_surf->base.Width = reply->width;
- dri2_surf->base.Height = reply->height;
- free(reply);
- }
-
- return &dri2_surf->base;
-
- cleanup_dri_drawable:
- dri2_dpy->core->destroyDrawable(dri2_surf->dri_drawable);
- cleanup_pixmap:
- if (type == EGL_PBUFFER_BIT)
- xcb_free_pixmap(dri2_dpy->conn, dri2_surf->drawable);
- cleanup_surf:
- free(dri2_surf);
-
- return NULL;
-}
-
-/**
- * Called via eglCreateWindowSurface(), drv->API.CreateWindowSurface().
- */
-static _EGLSurface *
-dri2_create_window_surface(_EGLDriver *drv, _EGLDisplay *disp,
- _EGLConfig *conf, EGLNativeWindowType window,
- const EGLint *attrib_list)
-{
- return dri2_create_surface(drv, disp, EGL_WINDOW_BIT, conf,
- window, attrib_list);
-}
-
-static _EGLSurface *
-dri2_create_pixmap_surface(_EGLDriver *drv, _EGLDisplay *disp,
- _EGLConfig *conf, EGLNativePixmapType pixmap,
- const EGLint *attrib_list)
-{
- return dri2_create_surface(drv, disp, EGL_PIXMAP_BIT, conf,
- pixmap, attrib_list);
-}
-
-static _EGLSurface *
-dri2_create_pbuffer_surface(_EGLDriver *drv, _EGLDisplay *disp,
- _EGLConfig *conf, const EGLint *attrib_list)
-{
- return dri2_create_surface(drv, disp, EGL_PBUFFER_BIT, conf,
- XCB_WINDOW_NONE, attrib_list);
-}
-
-static EGLBoolean
-dri2_copy_region(_EGLDriver *drv, _EGLDisplay *disp,
- _EGLSurface *draw, xcb_xfixes_region_t region)
-{
- struct dri2_egl_driver *dri2_drv = dri2_egl_driver(drv);
- struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
- struct dri2_egl_surface *dri2_surf = dri2_egl_surface(draw);
- _EGLContext *ctx;
- xcb_dri2_copy_region_cookie_t cookie;
-
- if (dri2_drv->glFlush) {
- ctx = _eglGetCurrentContext();
- if (ctx && ctx->DrawSurface == &dri2_surf->base)
- dri2_drv->glFlush();
- }
-
- (*dri2_dpy->flush->flush)(dri2_surf->dri_drawable);
-
-#if 0
- /* FIXME: Add support for dri swapbuffers, that'll give us swap
- * interval and page flipping (at least for fullscreen windows) as
- * well as the page flip event. Unless surface->SwapBehavior is
- * EGL_BUFFER_PRESERVED. */
-#if __DRI2_FLUSH_VERSION >= 2
- if (pdraw->psc->f)
- (*pdraw->psc->f->flushInvalidate)(pdraw->driDrawable);
-#endif
-#endif
-
- if (!dri2_surf->have_fake_front)
- return EGL_TRUE;
-
- cookie = xcb_dri2_copy_region_unchecked(dri2_dpy->conn,
- dri2_surf->drawable,
- region,
- XCB_DRI2_ATTACHMENT_BUFFER_FRONT_LEFT,
- XCB_DRI2_ATTACHMENT_BUFFER_FAKE_FRONT_LEFT);
- free(xcb_dri2_copy_region_reply(dri2_dpy->conn, cookie, NULL));
-
- return EGL_TRUE;
-}
-
-static EGLBoolean
-dri2_swap_buffers(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *draw)
-{
- struct dri2_egl_surface *dri2_surf = dri2_egl_surface(draw);
-
- return dri2_copy_region(drv, disp, draw, dri2_surf->region);
-}
-
-static EGLBoolean
-dri2_swap_buffers_region(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *draw,
- EGLint numRects, const EGLint *rects)
-{
- struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
- struct dri2_egl_surface *dri2_surf = dri2_egl_surface(draw);
- EGLBoolean ret;
- xcb_xfixes_region_t region;
- xcb_rectangle_t rectangles[16];
- int i;
-
- if (numRects > (int)ARRAY_SIZE(rectangles))
- return dri2_copy_region(drv, disp, draw, dri2_surf->region);
-
- /* FIXME: Invert y here? */
- for (i = 0; i < numRects; i++) {
- rectangles[i].x = rects[i * 4];
- rectangles[i].y = rects[i * 4 + 1];
- rectangles[i].width = rects[i * 4 + 2];
- rectangles[i].height = rects[i * 4 + 3];
- }
-
- region = xcb_generate_id(dri2_dpy->conn);
- xcb_xfixes_create_region(dri2_dpy->conn, region, numRects, rectangles);
- ret = dri2_copy_region(drv, disp, draw, region);
- xcb_xfixes_destroy_region(dri2_dpy->conn, region);
-
- return ret;
-}
-
/*
* Called from eglGetProcAddress() via drv->API.GetProcAddress().
*/
static _EGLProc
dri2_get_proc_address(_EGLDriver *drv, const char *procname)
{
- (void) drv;
-
- /* FIXME: Do we need to support lookup of EGL symbols too? */
+ struct dri2_egl_driver *dri2_drv = dri2_egl_driver(drv);
- return (_EGLProc) _glapi_get_proc_address(procname);
+ return dri2_drv->get_proc_address(procname);
}
static EGLBoolean
@@ -1903,40 +746,6 @@ dri2_wait_native(_EGLDriver *drv, _EGLDisplay *disp, EGLint engine)
return EGL_TRUE;
}
-static void
-dri2_unload(_EGLDriver *drv)
-{
- struct dri2_egl_driver *dri2_drv = dri2_egl_driver(drv);
- free(dri2_drv);
-}
-
-static EGLBoolean
-dri2_copy_buffers(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *surf,
- EGLNativePixmapType target)
-{
- struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
- struct dri2_egl_surface *dri2_surf = dri2_egl_surface(surf);
- xcb_gcontext_t gc;
-
- (void) drv;
-
- (*dri2_dpy->flush->flush)(dri2_surf->dri_drawable);
-
- gc = xcb_generate_id(dri2_dpy->conn);
- xcb_create_gc(dri2_dpy->conn, gc, target, 0, NULL);
- xcb_copy_area(dri2_dpy->conn,
- dri2_surf->drawable,
- target,
- gc,
- 0, 0,
- 0, 0,
- dri2_surf->base.Width,
- dri2_surf->base.Height);
- xcb_free_gc(dri2_dpy->conn, gc);
-
- return EGL_TRUE;
-}
-
static EGLBoolean
dri2_bind_tex_image(_EGLDriver *drv,
_EGLDisplay *disp, _EGLSurface *surf, EGLint buffer)
@@ -1983,100 +792,33 @@ static EGLBoolean
dri2_release_tex_image(_EGLDriver *drv,
_EGLDisplay *disp, _EGLSurface *surf, EGLint buffer)
{
- (void) drv;
- (void) disp;
- (void) surf;
- (void) buffer;
-
- return EGL_TRUE;
-}
-
-static _EGLImage *
-dri2_create_image_khr_pixmap(_EGLDisplay *disp, _EGLContext *ctx,
- EGLClientBuffer buffer, const EGLint *attr_list)
-{
+#if __DRI_TEX_BUFFER_VERSION >= 3
struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
- struct dri2_egl_image *dri2_img;
- unsigned int attachments[1];
- xcb_drawable_t drawable;
- xcb_dri2_get_buffers_cookie_t buffers_cookie;
- xcb_dri2_get_buffers_reply_t *buffers_reply;
- xcb_dri2_dri2_buffer_t *buffers;
- xcb_get_geometry_cookie_t geometry_cookie;
- xcb_get_geometry_reply_t *geometry_reply;
- xcb_generic_error_t *error;
- int stride, format;
-
- (void) ctx;
+ struct dri2_egl_surface *dri2_surf = dri2_egl_surface(surf);
+ struct dri2_egl_context *dri2_ctx;
+ _EGLContext *ctx;
+ GLint target;
- drawable = (xcb_drawable_t) buffer;
- xcb_dri2_create_drawable (dri2_dpy->conn, drawable);
- attachments[0] = XCB_DRI2_ATTACHMENT_BUFFER_FRONT_LEFT;
- buffers_cookie =
- xcb_dri2_get_buffers_unchecked (dri2_dpy->conn,
- drawable, 1, 1, attachments);
- geometry_cookie = xcb_get_geometry (dri2_dpy->conn, drawable);
- buffers_reply = xcb_dri2_get_buffers_reply (dri2_dpy->conn,
- buffers_cookie, NULL);
- buffers = xcb_dri2_get_buffers_buffers (buffers_reply);
- if (buffers == NULL) {
- return NULL;
- }
+ ctx = _eglGetCurrentContext();
+ dri2_ctx = dri2_egl_context(ctx);
- geometry_reply = xcb_get_geometry_reply (dri2_dpy->conn,
- geometry_cookie, &error);
- if (geometry_reply == NULL || error != NULL) {
- _eglError(EGL_BAD_ALLOC, "xcb_get_geometry");
- free(error);
- free(buffers_reply);
- }
+ if (!_eglReleaseTexImage(drv, disp, surf, buffer))
+ return EGL_FALSE;
- switch (geometry_reply->depth) {
- case 16:
- format = __DRI_IMAGE_FORMAT_RGB565;
- break;
- case 24:
- format = __DRI_IMAGE_FORMAT_XRGB8888;
- break;
- case 32:
- format = __DRI_IMAGE_FORMAT_ARGB8888;
+ switch (dri2_surf->base.TextureTarget) {
+ case EGL_TEXTURE_2D:
+ target = GL_TEXTURE_2D;
break;
default:
- _eglError(EGL_BAD_PARAMETER,
- "dri2_create_image_khr: unsupported pixmap depth");
- free(buffers_reply);
- free(geometry_reply);
- return NULL;
- }
-
- dri2_img = malloc(sizeof *dri2_img);
- if (!dri2_img) {
- free(buffers_reply);
- free(geometry_reply);
- _eglError(EGL_BAD_ALLOC, "dri2_create_image_khr");
- return EGL_NO_IMAGE_KHR;
- }
-
- if (!_eglInitImage(&dri2_img->base, disp)) {
- free(buffers_reply);
- free(geometry_reply);
- return EGL_NO_IMAGE_KHR;
+ assert(0);
}
+ if (dri2_dpy->tex_buffer->releaseTexBuffer!=NULL)
+ (*dri2_dpy->tex_buffer->releaseTexBuffer)(dri2_ctx->dri_context,
+ target,
+ dri2_surf->dri_drawable);
+#endif
- stride = buffers[0].pitch / buffers[0].cpp;
- dri2_img->dri_image =
- dri2_dpy->image->createImageFromName(dri2_dpy->dri_screen,
- buffers_reply->width,
- buffers_reply->height,
- format,
- buffers[0].name,
- stride,
- dri2_img);
-
- free(buffers_reply);
- free(geometry_reply);
-
- return &dri2_img->base;
+ return EGL_TRUE;
}
static _EGLImage *
@@ -2174,7 +916,52 @@ dri2_create_image_mesa_drm_buffer(_EGLDisplay *disp, _EGLContext *ctx,
return &dri2_img->base;
}
+static EGLBoolean
+dri2_export_drm_image_mesa(_EGLDriver *drv, _EGLDisplay *disp, _EGLImage *img,
+ EGLint *name, EGLint *handle, EGLint *stride);
+
static _EGLImage *
+dri2_reference_drm_image(_EGLDisplay *disp, _EGLContext *ctx,
+ _EGLImage *image, EGLint width, EGLint height)
+{
+ EGLint attr_list[] = {
+ EGL_WIDTH, 0,
+ EGL_HEIGHT, 0,
+ EGL_DRM_BUFFER_STRIDE_MESA, 0,
+ EGL_DRM_BUFFER_FORMAT_MESA, EGL_DRM_BUFFER_FORMAT_ARGB32_MESA,
+ EGL_NONE
+ };
+ EGLint name, stride;
+
+ dri2_export_drm_image_mesa(disp->Driver, disp, image,
+ &name, NULL, &stride);
+
+ attr_list[1] = width;
+ attr_list[3] = height;
+ attr_list[5] = stride / 4;
+
+ return dri2_create_image_mesa_drm_buffer(disp, ctx,
+ (EGLClientBuffer)(intptr_t) name,
+ attr_list);
+}
+
+#ifdef HAVE_WAYLAND_PLATFORM
+static _EGLImage *
+dri2_create_image_wayland_wl_buffer(_EGLDisplay *disp, _EGLContext *ctx,
+ EGLClientBuffer buffer,
+ const EGLint *attr_list)
+{
+ struct wl_drm_buffer *wl_drm_buffer = (struct wl_drm_buffer *) buffer;
+
+ (void) attr_list;
+
+ return dri2_reference_drm_image(disp, ctx, wl_drm_buffer->image,
+ wl_drm_buffer->buffer.width,
+ wl_drm_buffer->buffer.height);
+}
+#endif
+
+_EGLImage *
dri2_create_image_khr(_EGLDriver *drv, _EGLDisplay *disp,
_EGLContext *ctx, EGLenum target,
EGLClientBuffer buffer, const EGLint *attr_list)
@@ -2182,12 +969,14 @@ dri2_create_image_khr(_EGLDriver *drv, _EGLDisplay *disp,
(void) drv;
switch (target) {
- case EGL_NATIVE_PIXMAP_KHR:
- return dri2_create_image_khr_pixmap(disp, ctx, buffer, attr_list);
case EGL_GL_RENDERBUFFER_KHR:
return dri2_create_image_khr_renderbuffer(disp, ctx, buffer, attr_list);
case EGL_DRM_BUFFER_MESA:
return dri2_create_image_mesa_drm_buffer(disp, ctx, buffer, attr_list);
+#ifdef HAVE_WAYLAND_PLATFORM
+ case EGL_WAYLAND_BUFFER_WL:
+ return dri2_create_image_wayland_wl_buffer(disp, ctx, buffer, attr_list);
+#endif
default:
_eglError(EGL_BAD_PARAMETER, "dri2_create_image_khr");
return EGL_NO_IMAGE_KHR;
@@ -2316,12 +1105,104 @@ dri2_export_drm_image_mesa(_EGLDriver *drv, _EGLDisplay *disp, _EGLImage *img,
return EGL_TRUE;
}
+#ifdef HAVE_WAYLAND_PLATFORM
+static EGLBoolean
+dri2_bind_wayland_display_wl(_EGLDriver *drv, _EGLDisplay *disp,
+ struct wl_display *wl_dpy)
+{
+ struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
+
+ (void) drv;
+
+ if (dri2_dpy->wl_server_drm)
+ return EGL_FALSE;
+
+ dri2_dpy->wl_server_drm =
+ wayland_drm_init(wl_dpy, disp,
+ dri2_dpy->authenticate,
+ dri2_dpy->device_name);
+
+ if (!dri2_dpy->wl_server_drm)
+ return EGL_FALSE;
+
+ return EGL_TRUE;
+}
+
+static EGLBoolean
+dri2_unbind_wayland_display_wl(_EGLDriver *drv, _EGLDisplay *disp,
+ struct wl_display *wl_dpy)
+{
+ struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
+
+ (void) drv;
+
+ if (!dri2_dpy->wl_server_drm)
+ return EGL_FALSE;
+
+ wayland_drm_destroy(dri2_dpy->wl_server_drm);
+ dri2_dpy->wl_server_drm = NULL;
+
+ return EGL_TRUE;
+}
+#endif
+
+static void
+dri2_unload(_EGLDriver *drv)
+{
+ struct dri2_egl_driver *dri2_drv = dri2_egl_driver(drv);
+
+ if (dri2_drv->handle)
+ dlclose(dri2_drv->handle);
+ free(dri2_drv);
+}
+
+static EGLBoolean
+dri2_load(_EGLDriver *drv)
+{
+ struct dri2_egl_driver *dri2_drv = dri2_egl_driver(drv);
+#ifdef HAVE_SHARED_GLAPI
+ const char *libname = "libglapi.so.0";
+#else
+ /*
+ * Both libGL.so and libglapi.so are glapi providers. There is no way to
+ * tell which one to load.
+ */
+ const char *libname = NULL;
+#endif
+ void *handle;
+
+ /* RTLD_GLOBAL to make sure glapi symbols are visible to DRI drivers */
+ handle = dlopen(libname, RTLD_LAZY | RTLD_GLOBAL);
+ if (handle) {
+ dri2_drv->get_proc_address = (_EGLProc (*)(const char *))
+ dlsym(handle, "_glapi_get_proc_address");
+ if (!dri2_drv->get_proc_address || !libname) {
+ /* no need to keep a reference */
+ dlclose(handle);
+ handle = NULL;
+ }
+ }
+
+ /* if glapi is not available, loading DRI drivers will fail */
+ if (!dri2_drv->get_proc_address) {
+ _eglLog(_EGL_WARNING, "DRI2: failed to find _glapi_get_proc_address");
+ return EGL_FALSE;
+ }
+
+ dri2_drv->glFlush = (void (*)(void))
+ dri2_drv->get_proc_address("glFlush");
+
+ dri2_drv->handle = handle;
+
+ return EGL_TRUE;
+}
+
/**
* This is the main entrypoint into the driver, called by libEGL.
* Create a new _EGLDriver object and init its dispatch table.
*/
_EGLDriver *
-_eglMain(const char *args)
+_EGL_MAIN(const char *args)
{
struct dri2_egl_driver *dri2_drv;
@@ -2332,33 +1213,31 @@ _eglMain(const char *args)
return NULL;
memset(dri2_drv, 0, sizeof *dri2_drv);
+
+ if (!dri2_load(&dri2_drv->base))
+ return NULL;
+
_eglInitDriverFallbacks(&dri2_drv->base);
dri2_drv->base.API.Initialize = dri2_initialize;
dri2_drv->base.API.Terminate = dri2_terminate;
dri2_drv->base.API.CreateContext = dri2_create_context;
dri2_drv->base.API.MakeCurrent = dri2_make_current;
- dri2_drv->base.API.CreateWindowSurface = dri2_create_window_surface;
- dri2_drv->base.API.CreatePixmapSurface = dri2_create_pixmap_surface;
- dri2_drv->base.API.CreatePbufferSurface = dri2_create_pbuffer_surface;
- dri2_drv->base.API.DestroySurface = dri2_destroy_surface;
- dri2_drv->base.API.SwapBuffers = dri2_swap_buffers;
dri2_drv->base.API.GetProcAddress = dri2_get_proc_address;
dri2_drv->base.API.WaitClient = dri2_wait_client;
dri2_drv->base.API.WaitNative = dri2_wait_native;
- dri2_drv->base.API.CopyBuffers = dri2_copy_buffers;
dri2_drv->base.API.BindTexImage = dri2_bind_tex_image;
dri2_drv->base.API.ReleaseTexImage = dri2_release_tex_image;
dri2_drv->base.API.CreateImageKHR = dri2_create_image_khr;
dri2_drv->base.API.DestroyImageKHR = dri2_destroy_image_khr;
- dri2_drv->base.API.SwapBuffersRegionNOK = dri2_swap_buffers_region;
dri2_drv->base.API.CreateDRMImageMESA = dri2_create_drm_image_mesa;
dri2_drv->base.API.ExportDRMImageMESA = dri2_export_drm_image_mesa;
+#ifdef HAVE_WAYLAND_PLATFORM
+ dri2_drv->base.API.BindWaylandDisplayWL = dri2_bind_wayland_display_wl;
+ dri2_drv->base.API.UnbindWaylandDisplayWL = dri2_unbind_wayland_display_wl;
+#endif
dri2_drv->base.Name = "DRI2";
dri2_drv->base.Unload = dri2_unload;
- dri2_drv->glFlush =
- (void (*)(void)) dri2_get_proc_address(&dri2_drv->base, "glFlush");
-
return &dri2_drv->base;
}
diff --git a/src/egl/drivers/dri2/egl_dri2.h b/src/egl/drivers/dri2/egl_dri2.h
new file mode 100644
index 00000000000..cb1de2681f1
--- /dev/null
+++ b/src/egl/drivers/dri2/egl_dri2.h
@@ -0,0 +1,199 @@
+/*
+ * Copyright © 2011 Intel Corporation
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ * Authors:
+ * Kristian Høgsberg <krh@bitplanet.net>
+ */
+
+#ifndef EGL_DRI2_INCLUDED
+#define EGL_DRI2_INCLUDED
+
+#include <xcb/xcb.h>
+#include <xcb/dri2.h>
+#include <xcb/xfixes.h>
+#include <X11/Xlib-xcb.h>
+
+#ifdef HAVE_WAYLAND_PLATFORM
+#include <wayland-client.h>
+#include "wayland-drm.h"
+#include "wayland-egl-priv.h"
+#endif
+
+#include <GL/gl.h>
+#include <GL/internal/dri_interface.h>
+
+#include "eglconfig.h"
+#include "eglcontext.h"
+#include "egldisplay.h"
+#include "egldriver.h"
+#include "eglcurrent.h"
+#include "egllog.h"
+#include "eglsurface.h"
+#include "eglimage.h"
+
+#define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0]))
+
+struct dri2_egl_driver
+{
+ _EGLDriver base;
+
+ void *handle;
+ _EGLProc (*get_proc_address)(const char *procname);
+ void (*glFlush)(void);
+};
+
+struct dri2_egl_display
+{
+ xcb_connection_t *conn;
+ int dri2_major;
+ int dri2_minor;
+ __DRIscreen *dri_screen;
+ const __DRIconfig **driver_configs;
+ void *driver;
+ __DRIcoreExtension *core;
+ __DRIdri2Extension *dri2;
+ __DRIswrastExtension *swrast;
+ __DRI2flushExtension *flush;
+ __DRItexBufferExtension *tex_buffer;
+ __DRIimageExtension *image;
+ int fd;
+
+ char *device_name;
+ char *driver_name;
+
+ __DRIdri2LoaderExtension dri2_loader_extension;
+ __DRIswrastLoaderExtension swrast_loader_extension;
+ const __DRIextension *extensions[3];
+#ifdef HAVE_WAYLAND_PLATFORM
+ struct wl_egl_display *wl_dpy;
+ struct wl_drm *wl_server_drm;
+#endif
+
+ int (*authenticate) (_EGLDisplay *disp, uint32_t id);
+};
+
+struct dri2_egl_context
+{
+ _EGLContext base;
+ __DRIcontext *dri_context;
+};
+
+#ifdef HAVE_WAYLAND_PLATFORM
+enum wayland_buffer_type {
+ WL_BUFFER_FRONT,
+ WL_BUFFER_BACK,
+ WL_BUFFER_COUNT
+};
+
+#define __DRI_BUFFER_COUNT 10
+#endif
+
+enum dri2_surface_type {
+ DRI2_WINDOW_SURFACE,
+ DRI2_PIXMAP_SURFACE,
+ DRI2_PBUFFER_SURFACE
+};
+
+struct dri2_egl_surface
+{
+ _EGLSurface base;
+ __DRIdrawable *dri_drawable;
+ xcb_drawable_t drawable;
+ __DRIbuffer buffers[5];
+ int buffer_count;
+ xcb_xfixes_region_t region;
+ int have_fake_front;
+ int swap_interval;
+
+ int depth;
+ int bytes_per_pixel;
+ xcb_gcontext_t gc;
+ xcb_gcontext_t swapgc;
+
+ enum dri2_surface_type type;
+#ifdef HAVE_WAYLAND_PLATFORM
+ struct wl_egl_window *wl_win;
+ struct wl_egl_pixmap *wl_pix;
+ struct wl_buffer *wl_drm_buffer[WL_BUFFER_COUNT];
+ int dx;
+ int dy;
+ __DRIbuffer *dri_buffers[__DRI_BUFFER_COUNT];
+ __DRIbuffer *pending_buffer;
+ EGLBoolean block_swap_buffers;
+#endif
+};
+
+struct dri2_egl_buffer {
+ __DRIbuffer *dri_buffer;
+ struct dri2_egl_display *dri2_dpy;
+};
+
+
+struct dri2_egl_config
+{
+ _EGLConfig base;
+ const __DRIconfig *dri_single_config;
+ const __DRIconfig *dri_double_config;
+};
+
+struct dri2_egl_image
+{
+ _EGLImage base;
+ __DRIimage *dri_image;
+};
+
+/* standard typecasts */
+_EGL_DRIVER_STANDARD_TYPECASTS(dri2_egl)
+_EGL_DRIVER_TYPECAST(dri2_egl_image, _EGLImage, obj)
+
+extern const __DRIimageLookupExtension image_lookup_extension;
+extern const __DRIuseInvalidateExtension use_invalidate;
+
+EGLBoolean
+dri2_load_driver(_EGLDisplay *disp);
+
+EGLBoolean
+dri2_create_screen(_EGLDisplay *disp);
+
+struct dri2_egl_config *
+dri2_add_config(_EGLDisplay *disp, const __DRIconfig *dri_config, int id,
+ int depth, EGLint surface_type, const EGLint *attr_list);
+
+_EGLImage *
+dri2_create_image_khr(_EGLDriver *drv, _EGLDisplay *disp,
+ _EGLContext *ctx, EGLenum target,
+ EGLClientBuffer buffer, const EGLint *attr_list);
+
+EGLBoolean
+dri2_initialize_x11(_EGLDriver *drv, _EGLDisplay *disp);
+
+EGLBoolean
+dri2_initialize_drm(_EGLDriver *drv, _EGLDisplay *disp);
+
+EGLBoolean
+dri2_initialize_wayland(_EGLDriver *drv, _EGLDisplay *disp);
+
+char *
+dri2_get_driver_for_fd(int fd);
+
+#endif /* EGL_DRI2_INCLUDED */
diff --git a/src/egl/drivers/dri2/platform_drm.c b/src/egl/drivers/dri2/platform_drm.c
new file mode 100644
index 00000000000..bd4fa80af59
--- /dev/null
+++ b/src/egl/drivers/dri2/platform_drm.c
@@ -0,0 +1,737 @@
+/*
+ * Copyright © 2011 Intel Corporation
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ * Authors:
+ * Kristian Høgsberg <krh@bitplanet.net>
+ */
+
+#include <stdlib.h>
+#include <string.h>
+#include <stdio.h>
+#include <limits.h>
+#include <dlfcn.h>
+#include <fcntl.h>
+#include <errno.h>
+#include <unistd.h>
+#include <xf86drm.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+
+#ifdef HAVE_LIBUDEV
+#include <libudev.h>
+#endif
+
+#include "egl_dri2.h"
+
+
+#ifdef HAVE_LIBUDEV
+
+struct dri2_driver_map {
+ int vendor_id;
+ const char *driver;
+ const int *chip_ids;
+ int num_chips_ids;
+};
+
+const int i915_chip_ids[] = {
+ 0x3577, /* PCI_CHIP_I830_M */
+ 0x2562, /* PCI_CHIP_845_G */
+ 0x3582, /* PCI_CHIP_I855_GM */
+ 0x2572, /* PCI_CHIP_I865_G */
+ 0x2582, /* PCI_CHIP_I915_G */
+ 0x258a, /* PCI_CHIP_E7221_G */
+ 0x2592, /* PCI_CHIP_I915_GM */
+ 0x2772, /* PCI_CHIP_I945_G */
+ 0x27a2, /* PCI_CHIP_I945_GM */
+ 0x27ae, /* PCI_CHIP_I945_GME */
+ 0x29b2, /* PCI_CHIP_Q35_G */
+ 0x29c2, /* PCI_CHIP_G33_G */
+ 0x29d2, /* PCI_CHIP_Q33_G */
+ 0xa001, /* PCI_CHIP_IGD_G */
+ 0xa011, /* Pineview */
+};
+
+const int i965_chip_ids[] = {
+ 0x0042, /* PCI_CHIP_ILD_G */
+ 0x0046, /* PCI_CHIP_ILM_G */
+ 0x0102, /* PCI_CHIP_SANDYBRIDGE_GT1 */
+ 0x0106, /* PCI_CHIP_SANDYBRIDGE_M_GT1 */
+ 0x010a, /* PCI_CHIP_SANDYBRIDGE_S */
+ 0x0112, /* PCI_CHIP_SANDYBRIDGE_GT2 */
+ 0x0116, /* PCI_CHIP_SANDYBRIDGE_M_GT2 */
+ 0x0122, /* PCI_CHIP_SANDYBRIDGE_GT2_PLUS */
+ 0x0126, /* PCI_CHIP_SANDYBRIDGE_M_GT2_PLUS */
+ 0x29a2, /* PCI_CHIP_I965_G */
+ 0x2992, /* PCI_CHIP_I965_Q */
+ 0x2982, /* PCI_CHIP_I965_G_1 */
+ 0x2972, /* PCI_CHIP_I946_GZ */
+ 0x2a02, /* PCI_CHIP_I965_GM */
+ 0x2a12, /* PCI_CHIP_I965_GME */
+ 0x2a42, /* PCI_CHIP_GM45_GM */
+ 0x2e02, /* PCI_CHIP_IGD_E_G */
+ 0x2e12, /* PCI_CHIP_Q45_G */
+ 0x2e22, /* PCI_CHIP_G45_G */
+ 0x2e32, /* PCI_CHIP_G41_G */
+ 0x2e42, /* PCI_CHIP_B43_G */
+ 0x2e92, /* PCI_CHIP_B43_G1 */
+};
+
+const int r100_chip_ids[] = {
+ 0x4C57, /* PCI_CHIP_RADEON_LW */
+ 0x4C58, /* PCI_CHIP_RADEON_LX */
+ 0x4C59, /* PCI_CHIP_RADEON_LY */
+ 0x4C5A, /* PCI_CHIP_RADEON_LZ */
+ 0x5144, /* PCI_CHIP_RADEON_QD */
+ 0x5145, /* PCI_CHIP_RADEON_QE */
+ 0x5146, /* PCI_CHIP_RADEON_QF */
+ 0x5147, /* PCI_CHIP_RADEON_QG */
+ 0x5159, /* PCI_CHIP_RADEON_QY */
+ 0x515A, /* PCI_CHIP_RADEON_QZ */
+ 0x5157, /* PCI_CHIP_RV200_QW */
+ 0x5158, /* PCI_CHIP_RV200_QX */
+ 0x515E, /* PCI_CHIP_RN50_515E */
+ 0x5969, /* PCI_CHIP_RN50_5969 */
+ 0x4136, /* PCI_CHIP_RS100_4136 */
+ 0x4336, /* PCI_CHIP_RS100_4336 */
+ 0x4137, /* PCI_CHIP_RS200_4137 */
+ 0x4337, /* PCI_CHIP_RS200_4337 */
+ 0x4237, /* PCI_CHIP_RS250_4237 */
+ 0x4437, /* PCI_CHIP_RS250_4437 */
+};
+
+const int r200_chip_ids[] = {
+ 0x5148, /* PCI_CHIP_R200_QH */
+ 0x514C, /* PCI_CHIP_R200_QL */
+ 0x514D, /* PCI_CHIP_R200_QM */
+ 0x4242, /* PCI_CHIP_R200_BB */
+ 0x4966, /* PCI_CHIP_RV250_If */
+ 0x4967, /* PCI_CHIP_RV250_Ig */
+ 0x4C64, /* PCI_CHIP_RV250_Ld */
+ 0x4C66, /* PCI_CHIP_RV250_Lf */
+ 0x4C67, /* PCI_CHIP_RV250_Lg */
+ 0x5960, /* PCI_CHIP_RV280_5960 */
+ 0x5961, /* PCI_CHIP_RV280_5961 */
+ 0x5962, /* PCI_CHIP_RV280_5962 */
+ 0x5964, /* PCI_CHIP_RV280_5964 */
+ 0x5965, /* PCI_CHIP_RV280_5965 */
+ 0x5C61, /* PCI_CHIP_RV280_5C61 */
+ 0x5C63, /* PCI_CHIP_RV280_5C63 */
+ 0x5834, /* PCI_CHIP_RS300_5834 */
+ 0x5835, /* PCI_CHIP_RS300_5835 */
+ 0x7834, /* PCI_CHIP_RS350_7834 */
+ 0x7835, /* PCI_CHIP_RS350_7835 */
+};
+
+const int r300_chip_ids[] = {
+ 0x4144, /* PCI_CHIP_R300_AD */
+ 0x4145, /* PCI_CHIP_R300_AE */
+ 0x4146, /* PCI_CHIP_R300_AF */
+ 0x4147, /* PCI_CHIP_R300_AG */
+ 0x4E44, /* PCI_CHIP_R300_ND */
+ 0x4E45, /* PCI_CHIP_R300_NE */
+ 0x4E46, /* PCI_CHIP_R300_NF */
+ 0x4E47, /* PCI_CHIP_R300_NG */
+ 0x4E48, /* PCI_CHIP_R350_NH */
+ 0x4E49, /* PCI_CHIP_R350_NI */
+ 0x4E4B, /* PCI_CHIP_R350_NK */
+ 0x4148, /* PCI_CHIP_R350_AH */
+ 0x4149, /* PCI_CHIP_R350_AI */
+ 0x414A, /* PCI_CHIP_R350_AJ */
+ 0x414B, /* PCI_CHIP_R350_AK */
+ 0x4E4A, /* PCI_CHIP_R360_NJ */
+ 0x4150, /* PCI_CHIP_RV350_AP */
+ 0x4151, /* PCI_CHIP_RV350_AQ */
+ 0x4152, /* PCI_CHIP_RV350_AR */
+ 0x4153, /* PCI_CHIP_RV350_AS */
+ 0x4154, /* PCI_CHIP_RV350_AT */
+ 0x4155, /* PCI_CHIP_RV350_AU */
+ 0x4156, /* PCI_CHIP_RV350_AV */
+ 0x4E50, /* PCI_CHIP_RV350_NP */
+ 0x4E51, /* PCI_CHIP_RV350_NQ */
+ 0x4E52, /* PCI_CHIP_RV350_NR */
+ 0x4E53, /* PCI_CHIP_RV350_NS */
+ 0x4E54, /* PCI_CHIP_RV350_NT */
+ 0x4E56, /* PCI_CHIP_RV350_NV */
+ 0x5460, /* PCI_CHIP_RV370_5460 */
+ 0x5462, /* PCI_CHIP_RV370_5462 */
+ 0x5464, /* PCI_CHIP_RV370_5464 */
+ 0x5B60, /* PCI_CHIP_RV370_5B60 */
+ 0x5B62, /* PCI_CHIP_RV370_5B62 */
+ 0x5B63, /* PCI_CHIP_RV370_5B63 */
+ 0x5B64, /* PCI_CHIP_RV370_5B64 */
+ 0x5B65, /* PCI_CHIP_RV370_5B65 */
+ 0x3150, /* PCI_CHIP_RV380_3150 */
+ 0x3152, /* PCI_CHIP_RV380_3152 */
+ 0x3154, /* PCI_CHIP_RV380_3154 */
+ 0x3155, /* PCI_CHIP_RV380_3155 */
+ 0x3E50, /* PCI_CHIP_RV380_3E50 */
+ 0x3E54, /* PCI_CHIP_RV380_3E54 */
+ 0x4A48, /* PCI_CHIP_R420_JH */
+ 0x4A49, /* PCI_CHIP_R420_JI */
+ 0x4A4A, /* PCI_CHIP_R420_JJ */
+ 0x4A4B, /* PCI_CHIP_R420_JK */
+ 0x4A4C, /* PCI_CHIP_R420_JL */
+ 0x4A4D, /* PCI_CHIP_R420_JM */
+ 0x4A4E, /* PCI_CHIP_R420_JN */
+ 0x4A4F, /* PCI_CHIP_R420_JO */
+ 0x4A50, /* PCI_CHIP_R420_JP */
+ 0x4A54, /* PCI_CHIP_R420_JT */
+ 0x5548, /* PCI_CHIP_R423_UH */
+ 0x5549, /* PCI_CHIP_R423_UI */
+ 0x554A, /* PCI_CHIP_R423_UJ */
+ 0x554B, /* PCI_CHIP_R423_UK */
+ 0x5550, /* PCI_CHIP_R423_5550 */
+ 0x5551, /* PCI_CHIP_R423_UQ */
+ 0x5552, /* PCI_CHIP_R423_UR */
+ 0x5554, /* PCI_CHIP_R423_UT */
+ 0x5D57, /* PCI_CHIP_R423_5D57 */
+ 0x554C, /* PCI_CHIP_R430_554C */
+ 0x554D, /* PCI_CHIP_R430_554D */
+ 0x554E, /* PCI_CHIP_R430_554E */
+ 0x554F, /* PCI_CHIP_R430_554F */
+ 0x5D48, /* PCI_CHIP_R430_5D48 */
+ 0x5D49, /* PCI_CHIP_R430_5D49 */
+ 0x5D4A, /* PCI_CHIP_R430_5D4A */
+ 0x5D4C, /* PCI_CHIP_R480_5D4C */
+ 0x5D4D, /* PCI_CHIP_R480_5D4D */
+ 0x5D4E, /* PCI_CHIP_R480_5D4E */
+ 0x5D4F, /* PCI_CHIP_R480_5D4F */
+ 0x5D50, /* PCI_CHIP_R480_5D50 */
+ 0x5D52, /* PCI_CHIP_R480_5D52 */
+ 0x4B49, /* PCI_CHIP_R481_4B49 */
+ 0x4B4A, /* PCI_CHIP_R481_4B4A */
+ 0x4B4B, /* PCI_CHIP_R481_4B4B */
+ 0x4B4C, /* PCI_CHIP_R481_4B4C */
+ 0x564A, /* PCI_CHIP_RV410_564A */
+ 0x564B, /* PCI_CHIP_RV410_564B */
+ 0x564F, /* PCI_CHIP_RV410_564F */
+ 0x5652, /* PCI_CHIP_RV410_5652 */
+ 0x5653, /* PCI_CHIP_RV410_5653 */
+ 0x5657, /* PCI_CHIP_RV410_5657 */
+ 0x5E48, /* PCI_CHIP_RV410_5E48 */
+ 0x5E4A, /* PCI_CHIP_RV410_5E4A */
+ 0x5E4B, /* PCI_CHIP_RV410_5E4B */
+ 0x5E4C, /* PCI_CHIP_RV410_5E4C */
+ 0x5E4D, /* PCI_CHIP_RV410_5E4D */
+ 0x5E4F, /* PCI_CHIP_RV410_5E4F */
+ 0x5A41, /* PCI_CHIP_RS400_5A41 */
+ 0x5A42, /* PCI_CHIP_RS400_5A42 */
+ 0x5A61, /* PCI_CHIP_RC410_5A61 */
+ 0x5A62, /* PCI_CHIP_RC410_5A62 */
+ 0x5954, /* PCI_CHIP_RS480_5954 */
+ 0x5955, /* PCI_CHIP_RS480_5955 */
+ 0x5974, /* PCI_CHIP_RS482_5974 */
+ 0x5975, /* PCI_CHIP_RS482_5975 */
+ 0x7100, /* PCI_CHIP_R520_7100 */
+ 0x7101, /* PCI_CHIP_R520_7101 */
+ 0x7102, /* PCI_CHIP_R520_7102 */
+ 0x7103, /* PCI_CHIP_R520_7103 */
+ 0x7104, /* PCI_CHIP_R520_7104 */
+ 0x7105, /* PCI_CHIP_R520_7105 */
+ 0x7106, /* PCI_CHIP_R520_7106 */
+ 0x7108, /* PCI_CHIP_R520_7108 */
+ 0x7109, /* PCI_CHIP_R520_7109 */
+ 0x710A, /* PCI_CHIP_R520_710A */
+ 0x710B, /* PCI_CHIP_R520_710B */
+ 0x710C, /* PCI_CHIP_R520_710C */
+ 0x710E, /* PCI_CHIP_R520_710E */
+ 0x710F, /* PCI_CHIP_R520_710F */
+ 0x7140, /* PCI_CHIP_RV515_7140 */
+ 0x7141, /* PCI_CHIP_RV515_7141 */
+ 0x7142, /* PCI_CHIP_RV515_7142 */
+ 0x7143, /* PCI_CHIP_RV515_7143 */
+ 0x7144, /* PCI_CHIP_RV515_7144 */
+ 0x7145, /* PCI_CHIP_RV515_7145 */
+ 0x7146, /* PCI_CHIP_RV515_7146 */
+ 0x7147, /* PCI_CHIP_RV515_7147 */
+ 0x7149, /* PCI_CHIP_RV515_7149 */
+ 0x714A, /* PCI_CHIP_RV515_714A */
+ 0x714B, /* PCI_CHIP_RV515_714B */
+ 0x714C, /* PCI_CHIP_RV515_714C */
+ 0x714D, /* PCI_CHIP_RV515_714D */
+ 0x714E, /* PCI_CHIP_RV515_714E */
+ 0x714F, /* PCI_CHIP_RV515_714F */
+ 0x7151, /* PCI_CHIP_RV515_7151 */
+ 0x7152, /* PCI_CHIP_RV515_7152 */
+ 0x7153, /* PCI_CHIP_RV515_7153 */
+ 0x715E, /* PCI_CHIP_RV515_715E */
+ 0x715F, /* PCI_CHIP_RV515_715F */
+ 0x7180, /* PCI_CHIP_RV515_7180 */
+ 0x7181, /* PCI_CHIP_RV515_7181 */
+ 0x7183, /* PCI_CHIP_RV515_7183 */
+ 0x7186, /* PCI_CHIP_RV515_7186 */
+ 0x7187, /* PCI_CHIP_RV515_7187 */
+ 0x7188, /* PCI_CHIP_RV515_7188 */
+ 0x718A, /* PCI_CHIP_RV515_718A */
+ 0x718B, /* PCI_CHIP_RV515_718B */
+ 0x718C, /* PCI_CHIP_RV515_718C */
+ 0x718D, /* PCI_CHIP_RV515_718D */
+ 0x718F, /* PCI_CHIP_RV515_718F */
+ 0x7193, /* PCI_CHIP_RV515_7193 */
+ 0x7196, /* PCI_CHIP_RV515_7196 */
+ 0x719B, /* PCI_CHIP_RV515_719B */
+ 0x719F, /* PCI_CHIP_RV515_719F */
+ 0x7200, /* PCI_CHIP_RV515_7200 */
+ 0x7210, /* PCI_CHIP_RV515_7210 */
+ 0x7211, /* PCI_CHIP_RV515_7211 */
+ 0x71C0, /* PCI_CHIP_RV530_71C0 */
+ 0x71C1, /* PCI_CHIP_RV530_71C1 */
+ 0x71C2, /* PCI_CHIP_RV530_71C2 */
+ 0x71C3, /* PCI_CHIP_RV530_71C3 */
+ 0x71C4, /* PCI_CHIP_RV530_71C4 */
+ 0x71C5, /* PCI_CHIP_RV530_71C5 */
+ 0x71C6, /* PCI_CHIP_RV530_71C6 */
+ 0x71C7, /* PCI_CHIP_RV530_71C7 */
+ 0x71CD, /* PCI_CHIP_RV530_71CD */
+ 0x71CE, /* PCI_CHIP_RV530_71CE */
+ 0x71D2, /* PCI_CHIP_RV530_71D2 */
+ 0x71D4, /* PCI_CHIP_RV530_71D4 */
+ 0x71D5, /* PCI_CHIP_RV530_71D5 */
+ 0x71D6, /* PCI_CHIP_RV530_71D6 */
+ 0x71DA, /* PCI_CHIP_RV530_71DA */
+ 0x71DE, /* PCI_CHIP_RV530_71DE */
+ 0x7281, /* PCI_CHIP_RV560_7281 */
+ 0x7283, /* PCI_CHIP_RV560_7283 */
+ 0x7287, /* PCI_CHIP_RV560_7287 */
+ 0x7290, /* PCI_CHIP_RV560_7290 */
+ 0x7291, /* PCI_CHIP_RV560_7291 */
+ 0x7293, /* PCI_CHIP_RV560_7293 */
+ 0x7297, /* PCI_CHIP_RV560_7297 */
+ 0x7280, /* PCI_CHIP_RV570_7280 */
+ 0x7288, /* PCI_CHIP_RV570_7288 */
+ 0x7289, /* PCI_CHIP_RV570_7289 */
+ 0x728B, /* PCI_CHIP_RV570_728B */
+ 0x728C, /* PCI_CHIP_RV570_728C */
+ 0x7240, /* PCI_CHIP_R580_7240 */
+ 0x7243, /* PCI_CHIP_R580_7243 */
+ 0x7244, /* PCI_CHIP_R580_7244 */
+ 0x7245, /* PCI_CHIP_R580_7245 */
+ 0x7246, /* PCI_CHIP_R580_7246 */
+ 0x7247, /* PCI_CHIP_R580_7247 */
+ 0x7248, /* PCI_CHIP_R580_7248 */
+ 0x7249, /* PCI_CHIP_R580_7249 */
+ 0x724A, /* PCI_CHIP_R580_724A */
+ 0x724B, /* PCI_CHIP_R580_724B */
+ 0x724C, /* PCI_CHIP_R580_724C */
+ 0x724D, /* PCI_CHIP_R580_724D */
+ 0x724E, /* PCI_CHIP_R580_724E */
+ 0x724F, /* PCI_CHIP_R580_724F */
+ 0x7284, /* PCI_CHIP_R580_7284 */
+ 0x793F, /* PCI_CHIP_RS600_793F */
+ 0x7941, /* PCI_CHIP_RS600_7941 */
+ 0x7942, /* PCI_CHIP_RS600_7942 */
+ 0x791E, /* PCI_CHIP_RS690_791E */
+ 0x791F, /* PCI_CHIP_RS690_791F */
+ 0x796C, /* PCI_CHIP_RS740_796C */
+ 0x796D, /* PCI_CHIP_RS740_796D */
+ 0x796E, /* PCI_CHIP_RS740_796E */
+ 0x796F, /* PCI_CHIP_RS740_796F */
+};
+
+const int r600_chip_ids[] = {
+ 0x9400, /* PCI_CHIP_R600_9400 */
+ 0x9401, /* PCI_CHIP_R600_9401 */
+ 0x9402, /* PCI_CHIP_R600_9402 */
+ 0x9403, /* PCI_CHIP_R600_9403 */
+ 0x9405, /* PCI_CHIP_R600_9405 */
+ 0x940A, /* PCI_CHIP_R600_940A */
+ 0x940B, /* PCI_CHIP_R600_940B */
+ 0x940F, /* PCI_CHIP_R600_940F */
+ 0x94C0, /* PCI_CHIP_RV610_94C0 */
+ 0x94C1, /* PCI_CHIP_RV610_94C1 */
+ 0x94C3, /* PCI_CHIP_RV610_94C3 */
+ 0x94C4, /* PCI_CHIP_RV610_94C4 */
+ 0x94C5, /* PCI_CHIP_RV610_94C5 */
+ 0x94C6, /* PCI_CHIP_RV610_94C6 */
+ 0x94C7, /* PCI_CHIP_RV610_94C7 */
+ 0x94C8, /* PCI_CHIP_RV610_94C8 */
+ 0x94C9, /* PCI_CHIP_RV610_94C9 */
+ 0x94CB, /* PCI_CHIP_RV610_94CB */
+ 0x94CC, /* PCI_CHIP_RV610_94CC */
+ 0x94CD, /* PCI_CHIP_RV610_94CD */
+ 0x9580, /* PCI_CHIP_RV630_9580 */
+ 0x9581, /* PCI_CHIP_RV630_9581 */
+ 0x9583, /* PCI_CHIP_RV630_9583 */
+ 0x9586, /* PCI_CHIP_RV630_9586 */
+ 0x9587, /* PCI_CHIP_RV630_9587 */
+ 0x9588, /* PCI_CHIP_RV630_9588 */
+ 0x9589, /* PCI_CHIP_RV630_9589 */
+ 0x958A, /* PCI_CHIP_RV630_958A */
+ 0x958B, /* PCI_CHIP_RV630_958B */
+ 0x958C, /* PCI_CHIP_RV630_958C */
+ 0x958D, /* PCI_CHIP_RV630_958D */
+ 0x958E, /* PCI_CHIP_RV630_958E */
+ 0x958F, /* PCI_CHIP_RV630_958F */
+ 0x9500, /* PCI_CHIP_RV670_9500 */
+ 0x9501, /* PCI_CHIP_RV670_9501 */
+ 0x9504, /* PCI_CHIP_RV670_9504 */
+ 0x9505, /* PCI_CHIP_RV670_9505 */
+ 0x9506, /* PCI_CHIP_RV670_9506 */
+ 0x9507, /* PCI_CHIP_RV670_9507 */
+ 0x9508, /* PCI_CHIP_RV670_9508 */
+ 0x9509, /* PCI_CHIP_RV670_9509 */
+ 0x950F, /* PCI_CHIP_RV670_950F */
+ 0x9511, /* PCI_CHIP_RV670_9511 */
+ 0x9515, /* PCI_CHIP_RV670_9515 */
+ 0x9517, /* PCI_CHIP_RV670_9517 */
+ 0x9519, /* PCI_CHIP_RV670_9519 */
+ 0x95C0, /* PCI_CHIP_RV620_95C0 */
+ 0x95C2, /* PCI_CHIP_RV620_95C2 */
+ 0x95C4, /* PCI_CHIP_RV620_95C4 */
+ 0x95C5, /* PCI_CHIP_RV620_95C5 */
+ 0x95C6, /* PCI_CHIP_RV620_95C6 */
+ 0x95C7, /* PCI_CHIP_RV620_95C7 */
+ 0x95C9, /* PCI_CHIP_RV620_95C9 */
+ 0x95CC, /* PCI_CHIP_RV620_95CC */
+ 0x95CD, /* PCI_CHIP_RV620_95CD */
+ 0x95CE, /* PCI_CHIP_RV620_95CE */
+ 0x95CF, /* PCI_CHIP_RV620_95CF */
+ 0x9590, /* PCI_CHIP_RV635_9590 */
+ 0x9591, /* PCI_CHIP_RV635_9591 */
+ 0x9593, /* PCI_CHIP_RV635_9593 */
+ 0x9595, /* PCI_CHIP_RV635_9595 */
+ 0x9596, /* PCI_CHIP_RV635_9596 */
+ 0x9597, /* PCI_CHIP_RV635_9597 */
+ 0x9598, /* PCI_CHIP_RV635_9598 */
+ 0x9599, /* PCI_CHIP_RV635_9599 */
+ 0x959B, /* PCI_CHIP_RV635_959B */
+ 0x9610, /* PCI_CHIP_RS780_9610 */
+ 0x9611, /* PCI_CHIP_RS780_9611 */
+ 0x9612, /* PCI_CHIP_RS780_9612 */
+ 0x9613, /* PCI_CHIP_RS780_9613 */
+ 0x9614, /* PCI_CHIP_RS780_9614 */
+ 0x9615, /* PCI_CHIP_RS780_9615 */
+ 0x9616, /* PCI_CHIP_RS780_9616 */
+ 0x9710, /* PCI_CHIP_RS880_9710 */
+ 0x9711, /* PCI_CHIP_RS880_9711 */
+ 0x9712, /* PCI_CHIP_RS880_9712 */
+ 0x9713, /* PCI_CHIP_RS880_9713 */
+ 0x9714, /* PCI_CHIP_RS880_9714 */
+ 0x9715, /* PCI_CHIP_RS880_9715 */
+ 0x9440, /* PCI_CHIP_RV770_9440 */
+ 0x9441, /* PCI_CHIP_RV770_9441 */
+ 0x9442, /* PCI_CHIP_RV770_9442 */
+ 0x9443, /* PCI_CHIP_RV770_9443 */
+ 0x9444, /* PCI_CHIP_RV770_9444 */
+ 0x9446, /* PCI_CHIP_RV770_9446 */
+ 0x944A, /* PCI_CHIP_RV770_944A */
+ 0x944B, /* PCI_CHIP_RV770_944B */
+ 0x944C, /* PCI_CHIP_RV770_944C */
+ 0x944E, /* PCI_CHIP_RV770_944E */
+ 0x9450, /* PCI_CHIP_RV770_9450 */
+ 0x9452, /* PCI_CHIP_RV770_9452 */
+ 0x9456, /* PCI_CHIP_RV770_9456 */
+ 0x945A, /* PCI_CHIP_RV770_945A */
+ 0x945B, /* PCI_CHIP_RV770_945B */
+ 0x945E, /* PCI_CHIP_RV770_945E */
+ 0x9460, /* PCI_CHIP_RV790_9460 */
+ 0x9462, /* PCI_CHIP_RV790_9462 */
+ 0x946A, /* PCI_CHIP_RV770_946A */
+ 0x946B, /* PCI_CHIP_RV770_946B */
+ 0x947A, /* PCI_CHIP_RV770_947A */
+ 0x947B, /* PCI_CHIP_RV770_947B */
+ 0x9480, /* PCI_CHIP_RV730_9480 */
+ 0x9487, /* PCI_CHIP_RV730_9487 */
+ 0x9488, /* PCI_CHIP_RV730_9488 */
+ 0x9489, /* PCI_CHIP_RV730_9489 */
+ 0x948A, /* PCI_CHIP_RV730_948A */
+ 0x948F, /* PCI_CHIP_RV730_948F */
+ 0x9490, /* PCI_CHIP_RV730_9490 */
+ 0x9491, /* PCI_CHIP_RV730_9491 */
+ 0x9495, /* PCI_CHIP_RV730_9495 */
+ 0x9498, /* PCI_CHIP_RV730_9498 */
+ 0x949C, /* PCI_CHIP_RV730_949C */
+ 0x949E, /* PCI_CHIP_RV730_949E */
+ 0x949F, /* PCI_CHIP_RV730_949F */
+ 0x9540, /* PCI_CHIP_RV710_9540 */
+ 0x9541, /* PCI_CHIP_RV710_9541 */
+ 0x9542, /* PCI_CHIP_RV710_9542 */
+ 0x954E, /* PCI_CHIP_RV710_954E */
+ 0x954F, /* PCI_CHIP_RV710_954F */
+ 0x9552, /* PCI_CHIP_RV710_9552 */
+ 0x9553, /* PCI_CHIP_RV710_9553 */
+ 0x9555, /* PCI_CHIP_RV710_9555 */
+ 0x9557, /* PCI_CHIP_RV710_9557 */
+ 0x955F, /* PCI_CHIP_RV710_955F */
+ 0x94A0, /* PCI_CHIP_RV740_94A0 */
+ 0x94A1, /* PCI_CHIP_RV740_94A1 */
+ 0x94A3, /* PCI_CHIP_RV740_94A3 */
+ 0x94B1, /* PCI_CHIP_RV740_94B1 */
+ 0x94B3, /* PCI_CHIP_RV740_94B3 */
+ 0x94B4, /* PCI_CHIP_RV740_94B4 */
+ 0x94B5, /* PCI_CHIP_RV740_94B5 */
+ 0x94B9, /* PCI_CHIP_RV740_94B9 */
+ 0x68E0, /* PCI_CHIP_CEDAR_68E0 */
+ 0x68E1, /* PCI_CHIP_CEDAR_68E1 */
+ 0x68E4, /* PCI_CHIP_CEDAR_68E4 */
+ 0x68E5, /* PCI_CHIP_CEDAR_68E5 */
+ 0x68E8, /* PCI_CHIP_CEDAR_68E8 */
+ 0x68E9, /* PCI_CHIP_CEDAR_68E9 */
+ 0x68F1, /* PCI_CHIP_CEDAR_68F1 */
+ 0x68F8, /* PCI_CHIP_CEDAR_68F8 */
+ 0x68F9, /* PCI_CHIP_CEDAR_68F9 */
+ 0x68FE, /* PCI_CHIP_CEDAR_68FE */
+ 0x68C0, /* PCI_CHIP_REDWOOD_68C0 */
+ 0x68C1, /* PCI_CHIP_REDWOOD_68C1 */
+ 0x68C8, /* PCI_CHIP_REDWOOD_68C8 */
+ 0x68C9, /* PCI_CHIP_REDWOOD_68C9 */
+ 0x68D8, /* PCI_CHIP_REDWOOD_68D8 */
+ 0x68D9, /* PCI_CHIP_REDWOOD_68D9 */
+ 0x68DA, /* PCI_CHIP_REDWOOD_68DA */
+ 0x68DE, /* PCI_CHIP_REDWOOD_68DE */
+ 0x68A0, /* PCI_CHIP_JUNIPER_68A0 */
+ 0x68A1, /* PCI_CHIP_JUNIPER_68A1 */
+ 0x68A8, /* PCI_CHIP_JUNIPER_68A8 */
+ 0x68A9, /* PCI_CHIP_JUNIPER_68A9 */
+ 0x68B0, /* PCI_CHIP_JUNIPER_68B0 */
+ 0x68B8, /* PCI_CHIP_JUNIPER_68B8 */
+ 0x68B9, /* PCI_CHIP_JUNIPER_68B9 */
+ 0x68BE, /* PCI_CHIP_JUNIPER_68BE */
+ 0x6880, /* PCI_CHIP_CYPRESS_6880 */
+ 0x6888, /* PCI_CHIP_CYPRESS_6888 */
+ 0x6889, /* PCI_CHIP_CYPRESS_6889 */
+ 0x688A, /* PCI_CHIP_CYPRESS_688A */
+ 0x6898, /* PCI_CHIP_CYPRESS_6898 */
+ 0x6899, /* PCI_CHIP_CYPRESS_6899 */
+ 0x689E, /* PCI_CHIP_CYPRESS_689E */
+ 0x689C, /* PCI_CHIP_HEMLOCK_689C */
+ 0x689D, /* PCI_CHIP_HEMLOCK_689D */
+ 0x9802, /* PCI_CHIP_PALM_9802 */
+ 0x9803, /* PCI_CHIP_PALM_9803 */
+ 0x9804, /* PCI_CHIP_PALM_9804 */
+ 0x9805, /* PCI_CHIP_PALM_9805 */
+ 0x6720, /* PCI_CHIP_BARTS_6720 */
+ 0x6721, /* PCI_CHIP_BARTS_6721 */
+ 0x6722, /* PCI_CHIP_BARTS_6722 */
+ 0x6723, /* PCI_CHIP_BARTS_6723 */
+ 0x6724, /* PCI_CHIP_BARTS_6724 */
+ 0x6725, /* PCI_CHIP_BARTS_6725 */
+ 0x6726, /* PCI_CHIP_BARTS_6726 */
+ 0x6727, /* PCI_CHIP_BARTS_6727 */
+ 0x6728, /* PCI_CHIP_BARTS_6728 */
+ 0x6729, /* PCI_CHIP_BARTS_6729 */
+ 0x6738, /* PCI_CHIP_BARTS_6738 */
+ 0x6739, /* PCI_CHIP_BARTS_6738 */
+ 0x6740, /* PCI_CHIP_TURKS_6740 */
+ 0x6741, /* PCI_CHIP_TURKS_6741 */
+ 0x6742, /* PCI_CHIP_TURKS_6742 */
+ 0x6743, /* PCI_CHIP_TURKS_6743 */
+ 0x6744, /* PCI_CHIP_TURKS_6744 */
+ 0x6745, /* PCI_CHIP_TURKS_6745 */
+ 0x6746, /* PCI_CHIP_TURKS_6746 */
+ 0x6747, /* PCI_CHIP_TURKS_6747 */
+ 0x6748, /* PCI_CHIP_TURKS_6748 */
+ 0x6749, /* PCI_CHIP_TURKS_6749 */
+ 0x6750, /* PCI_CHIP_TURKS_6750 */
+ 0x6758, /* PCI_CHIP_TURKS_6758 */
+ 0x6759, /* PCI_CHIP_TURKS_6759 */
+ 0x6760, /* PCI_CHIP_CAICOS_6760 */
+ 0x6761, /* PCI_CHIP_CAICOS_6761 */
+ 0x6762, /* PCI_CHIP_CAICOS_6762 */
+ 0x6763, /* PCI_CHIP_CAICOS_6763 */
+ 0x6764, /* PCI_CHIP_CAICOS_6764 */
+ 0x6765, /* PCI_CHIP_CAICOS_6765 */
+ 0x6766, /* PCI_CHIP_CAICOS_6766 */
+ 0x6767, /* PCI_CHIP_CAICOS_6767 */
+ 0x6768, /* PCI_CHIP_CAICOS_6768 */
+ 0x6770, /* PCI_CHIP_CAICOS_6770 */
+ 0x6779, /* PCI_CHIP_CAICOS_6779 */
+};
+
+const struct dri2_driver_map driver_map[] = {
+ { 0x8086, "i915", i915_chip_ids, ARRAY_SIZE(i915_chip_ids) },
+ { 0x8086, "i965", i965_chip_ids, ARRAY_SIZE(i965_chip_ids) },
+ { 0x1002, "radeon", r100_chip_ids, ARRAY_SIZE(r100_chip_ids) },
+ { 0x1002, "r200", r200_chip_ids, ARRAY_SIZE(r200_chip_ids) },
+ { 0x1002, "r300", r300_chip_ids, ARRAY_SIZE(r300_chip_ids) },
+ { 0x1002, "r600", r600_chip_ids, ARRAY_SIZE(r600_chip_ids) },
+ { 0x10de, "nouveau", NULL, -1 },
+};
+
+static char *
+dri2_get_device_name(int fd)
+{
+ struct udev *udev;
+ struct udev_device *device;
+ struct stat buf;
+ char *device_name;
+
+ udev = udev_new();
+ if (fstat(fd, &buf) < 0) {
+ _eglLog(_EGL_WARNING, "EGL-DRI2: failed to stat fd %d", fd);
+ goto out;
+ }
+
+ device = udev_device_new_from_devnum(udev, 'c', buf.st_rdev);
+ if (device == NULL) {
+ _eglLog(_EGL_WARNING,
+ "EGL-DRI2: could not create udev device for fd %d", fd);
+ goto out;
+ }
+
+ device_name = udev_device_get_devnode(device);
+ if (!device_name)
+ goto out;
+ device_name = strdup(device_name);
+
+ out:
+ udev_device_unref(device);
+ udev_unref(udev);
+
+ return device_name;
+}
+
+char *
+dri2_get_driver_for_fd(int fd)
+{
+ struct udev *udev;
+ struct udev_device *device, *parent;
+ struct stat buf;
+ const char *pci_id;
+ char *driver = NULL;
+ int vendor_id, chip_id, i, j;
+
+ udev = udev_new();
+ if (fstat(fd, &buf) < 0) {
+ _eglLog(_EGL_WARNING, "EGL-DRI2: failed to stat fd %d", fd);
+ goto out;
+ }
+
+ device = udev_device_new_from_devnum(udev, 'c', buf.st_rdev);
+ if (device == NULL) {
+ _eglLog(_EGL_WARNING,
+ "EGL-DRI2: could not create udev device for fd %d", fd);
+ goto out;
+ }
+
+ parent = udev_device_get_parent(device);
+ if (parent == NULL) {
+ _eglLog(_EGL_WARNING, "DRI2: could not get parent device");
+ goto out;
+ }
+
+ pci_id = udev_device_get_property_value(parent, "PCI_ID");
+ if (pci_id == NULL || sscanf(pci_id, "%x:%x", &vendor_id, &chip_id) != 2) {
+ _eglLog(_EGL_WARNING, "EGL-DRI2: malformed or no PCI ID");
+ goto out;
+ }
+
+ for (i = 0; i < ARRAY_SIZE(driver_map); i++) {
+ if (vendor_id != driver_map[i].vendor_id)
+ continue;
+ if (driver_map[i].num_chips_ids == -1) {
+ driver = strdup(driver_map[i].driver);
+ _eglLog(_EGL_DEBUG, "pci id for %d: %04x:%04x, driver %s",
+ fd, vendor_id, chip_id, driver);
+ goto out;
+ }
+
+ for (j = 0; j < driver_map[i].num_chips_ids; j++)
+ if (driver_map[i].chip_ids[j] == chip_id) {
+ driver = strdup(driver_map[i].driver);
+ _eglLog(_EGL_DEBUG, "pci id for %d: %04x:%04x, driver %s",
+ fd, vendor_id, chip_id, driver);
+ goto out;
+ }
+ }
+
+ out:
+ udev_device_unref(device);
+ udev_unref(udev);
+
+ return driver;
+}
+
+static int
+dri2_drm_authenticate(_EGLDisplay *disp, uint32_t id)
+{
+ struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
+
+ return drmAuthMagic(dri2_dpy->fd, id);
+}
+
+EGLBoolean
+dri2_initialize_drm(_EGLDriver *drv, _EGLDisplay *disp)
+{
+ struct dri2_egl_display *dri2_dpy;
+ int i;
+
+ dri2_dpy = malloc(sizeof *dri2_dpy);
+ if (!dri2_dpy)
+ return _eglError(EGL_BAD_ALLOC, "eglInitialize");
+
+ memset(dri2_dpy, 0, sizeof *dri2_dpy);
+
+ disp->DriverData = (void *) dri2_dpy;
+ dri2_dpy->fd = (int) disp->PlatformDisplay;
+
+ dri2_dpy->driver_name = dri2_get_driver_for_fd(dri2_dpy->fd);
+ if (dri2_dpy->driver_name == NULL)
+ return _eglError(EGL_BAD_ALLOC, "DRI2: failed to get driver name");
+
+ dri2_dpy->device_name = dri2_get_device_name(dri2_dpy->fd);
+ if (dri2_dpy->device_name == NULL) {
+ _eglError(EGL_BAD_ALLOC, "DRI2: failed to get device name");
+ goto cleanup_driver_name;
+ }
+
+ if (!dri2_load_driver(disp))
+ goto cleanup_device_name;
+
+ dri2_dpy->extensions[0] = &image_lookup_extension.base;
+ dri2_dpy->extensions[1] = &use_invalidate.base;
+ dri2_dpy->extensions[2] = NULL;
+
+ if (!dri2_create_screen(disp))
+ goto cleanup_driver;
+
+ for (i = 0; dri2_dpy->driver_configs[i]; i++)
+ dri2_add_config(disp, dri2_dpy->driver_configs[i], i + 1, 0, 0, NULL);
+
+ disp->Extensions.MESA_drm_image = EGL_TRUE;
+ disp->Extensions.KHR_image_base = EGL_TRUE;
+ disp->Extensions.KHR_gl_renderbuffer_image = EGL_TRUE;
+ disp->Extensions.KHR_gl_texture_2D_image = EGL_TRUE;
+
+#ifdef HAVE_WAYLAND_PLATFORM
+ disp->Extensions.WL_bind_wayland_display = EGL_TRUE;
+#endif
+ dri2_dpy->authenticate = dri2_drm_authenticate;
+
+ /* we're supporting EGL 1.4 */
+ disp->VersionMajor = 1;
+ disp->VersionMinor = 4;
+
+ return EGL_TRUE;
+
+ cleanup_driver:
+ dlclose(dri2_dpy->driver);
+ cleanup_device_name:
+ free(dri2_dpy->device_name);
+ cleanup_driver_name:
+ free(dri2_dpy->driver_name);
+
+ return EGL_FALSE;
+}
+
+#endif
diff --git a/src/egl/drivers/dri2/platform_wayland.c b/src/egl/drivers/dri2/platform_wayland.c
new file mode 100644
index 00000000000..6ae3f6554b1
--- /dev/null
+++ b/src/egl/drivers/dri2/platform_wayland.c
@@ -0,0 +1,707 @@
+/*
+ * Copyright © 2011 Intel Corporation
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ * Authors:
+ * Kristian Høgsberg <krh@bitplanet.net>
+ * Benjamin Franzke <benjaminfranzke@googlemail.com>
+ */
+
+#include <stdlib.h>
+#include <string.h>
+#include <limits.h>
+#include <dlfcn.h>
+#include <errno.h>
+#include <unistd.h>
+
+#include "egl_dri2.h"
+
+#include <wayland-client.h>
+#include "wayland-drm-client-protocol.h"
+
+static void
+sync_callback(void *data)
+{
+ int *done = data;
+
+ *done = 1;
+}
+
+static void
+force_roundtrip(struct wl_display *display)
+{
+ int done = 0;
+
+ wl_display_sync_callback(display, sync_callback, &done);
+ wl_display_iterate(display, WL_DISPLAY_WRITABLE);
+ while (!done)
+ wl_display_iterate(display, WL_DISPLAY_READABLE);
+}
+
+
+/**
+ * Called via eglCreateWindowSurface(), drv->API.CreateWindowSurface().
+ */
+static _EGLSurface *
+dri2_create_surface(_EGLDriver *drv, _EGLDisplay *disp, EGLint type,
+ _EGLConfig *conf, EGLNativeWindowType window,
+ const EGLint *attrib_list)
+{
+ struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
+ struct dri2_egl_config *dri2_conf = dri2_egl_config(conf);
+ struct dri2_egl_surface *dri2_surf;
+ struct dri2_egl_buffer *dri2_buf;
+ int i;
+
+ (void) drv;
+
+ dri2_surf = malloc(sizeof *dri2_surf);
+ if (!dri2_surf) {
+ _eglError(EGL_BAD_ALLOC, "dri2_create_surface");
+ return NULL;
+ }
+
+ if (!_eglInitSurface(&dri2_surf->base, disp, type, conf, attrib_list))
+ goto cleanup_surf;
+
+ for (i = 0; i < WL_BUFFER_COUNT; ++i)
+ dri2_surf->wl_drm_buffer[i] = NULL;
+
+ for (i = 0; i < __DRI_BUFFER_COUNT; ++i)
+ dri2_surf->dri_buffers[i] = NULL;
+
+ dri2_surf->pending_buffer = NULL;
+ dri2_surf->block_swap_buffers = EGL_FALSE;
+
+ switch (type) {
+ case EGL_WINDOW_BIT:
+ dri2_surf->wl_win = (struct wl_egl_window *) window;
+ dri2_surf->type = DRI2_WINDOW_SURFACE;
+
+ dri2_surf->base.Width = -1;
+ dri2_surf->base.Height = -1;
+ break;
+ case EGL_PIXMAP_BIT:
+ dri2_surf->wl_pix = (struct wl_egl_pixmap *) window;
+ dri2_surf->type = DRI2_PIXMAP_SURFACE;
+
+ dri2_surf->base.Width = dri2_surf->wl_pix->width;
+ dri2_surf->base.Height = dri2_surf->wl_pix->height;
+
+ if (dri2_surf->wl_pix->name > 0) {
+ dri2_buf = dri2_surf->wl_pix->driver_private;
+ dri2_surf->dri_buffers[__DRI_BUFFER_FRONT_LEFT] = dri2_buf->dri_buffer;
+ }
+ break;
+ default:
+ goto cleanup_surf;
+ }
+
+ dri2_surf->dri_drawable =
+ (*dri2_dpy->dri2->createNewDrawable) (dri2_dpy->dri_screen,
+ type == EGL_WINDOW_BIT ?
+ dri2_conf->dri_double_config :
+ dri2_conf->dri_single_config,
+ dri2_surf);
+ if (dri2_surf->dri_drawable == NULL) {
+ _eglError(EGL_BAD_ALLOC, "dri2->createNewDrawable");
+ goto cleanup_dri_drawable;
+ }
+
+ return &dri2_surf->base;
+
+ cleanup_dri_drawable:
+ dri2_dpy->core->destroyDrawable(dri2_surf->dri_drawable);
+ cleanup_surf:
+ free(dri2_surf);
+
+ return NULL;
+}
+
+/**
+ * Called via eglCreateWindowSurface(), drv->API.CreateWindowSurface().
+ */
+static _EGLSurface *
+dri2_create_window_surface(_EGLDriver *drv, _EGLDisplay *disp,
+ _EGLConfig *conf, EGLNativeWindowType window,
+ const EGLint *attrib_list)
+{
+ return dri2_create_surface(drv, disp, EGL_WINDOW_BIT, conf,
+ window, attrib_list);
+}
+
+static _EGLSurface *
+dri2_create_pixmap_surface(_EGLDriver *drv, _EGLDisplay *disp,
+ _EGLConfig *conf, EGLNativePixmapType pixmap,
+ const EGLint *attrib_list)
+{
+ return dri2_create_surface(drv, disp, EGL_PIXMAP_BIT, conf,
+ pixmap, attrib_list);
+}
+
+/**
+ * Called via eglDestroySurface(), drv->API.DestroySurface().
+ */
+static EGLBoolean
+dri2_destroy_surface(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *surf)
+{
+ struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
+ struct dri2_egl_surface *dri2_surf = dri2_egl_surface(surf);
+ int i;
+
+ (void) drv;
+
+ if (!_eglPutSurface(surf))
+ return EGL_TRUE;
+
+ (*dri2_dpy->core->destroyDrawable)(dri2_surf->dri_drawable);
+
+ for (i = 0; i < WL_BUFFER_COUNT; ++i)
+ if (dri2_surf->wl_drm_buffer[i])
+ wl_buffer_destroy(dri2_surf->wl_drm_buffer[i]);
+
+ for (i = 0; i < __DRI_BUFFER_COUNT; ++i)
+ if (dri2_surf->dri_buffers[i] && !(i == __DRI_BUFFER_FRONT_LEFT &&
+ dri2_surf->type == DRI2_PIXMAP_SURFACE))
+ dri2_dpy->dri2->releaseBuffer(dri2_dpy->dri_screen,
+ dri2_surf->dri_buffers[i]);
+
+ free(surf);
+
+ return EGL_TRUE;
+}
+
+static void
+dri2_wl_egl_pixmap_destroy(struct wl_egl_pixmap *egl_pixmap)
+{
+ struct dri2_egl_buffer *dri2_buf = egl_pixmap->driver_private;
+
+ assert(dri2_buf);
+
+ dri2_buf->dri2_dpy->dri2->releaseBuffer(dri2_buf->dri2_dpy->dri_screen,
+ dri2_buf->dri_buffer);
+
+ free(dri2_buf);
+
+ egl_pixmap->driver_private = NULL;
+ egl_pixmap->destroy = NULL;
+ egl_pixmap->name = 0;
+}
+
+static void
+dri2_process_back_buffer(struct dri2_egl_surface *dri2_surf, unsigned format)
+{
+ struct dri2_egl_display *dri2_dpy =
+ dri2_egl_display(dri2_surf->base.Resource.Display);
+
+ (void) format;
+
+ switch (dri2_surf->type) {
+ case DRI2_WINDOW_SURFACE:
+ /* allocate a front buffer for our double-buffered window*/
+ dri2_surf->dri_buffers[__DRI_BUFFER_FRONT_LEFT] =
+ dri2_dpy->dri2->allocateBuffer(dri2_dpy->dri_screen,
+ __DRI_BUFFER_FRONT_LEFT, format,
+ dri2_surf->base.Width, dri2_surf->base.Height);
+ break;
+ default:
+ break;
+ }
+}
+
+static void
+dri2_process_front_buffer(struct dri2_egl_surface *dri2_surf, unsigned format)
+{
+ struct dri2_egl_display *dri2_dpy =
+ dri2_egl_display(dri2_surf->base.Resource.Display);
+ struct dri2_egl_buffer *dri2_buf;
+
+ switch (dri2_surf->type) {
+ case DRI2_PIXMAP_SURFACE:
+ dri2_buf = malloc(sizeof *dri2_buf);
+ if (!dri2_buf)
+ return;
+
+ dri2_buf->dri_buffer = dri2_surf->dri_buffers[__DRI_BUFFER_FRONT_LEFT];
+ dri2_buf->dri2_dpy = dri2_dpy;
+
+ dri2_surf->wl_pix->name = dri2_buf->dri_buffer->name;
+ dri2_surf->wl_pix->stride = dri2_buf->dri_buffer->pitch;
+ dri2_surf->wl_pix->driver_private = dri2_buf;
+ dri2_surf->wl_pix->destroy = dri2_wl_egl_pixmap_destroy;
+ break;
+ default:
+ break;
+ }
+}
+
+static void
+dri2_release_pending_buffer(void *data)
+{
+ struct dri2_egl_surface *dri2_surf = data;
+ struct dri2_egl_display *dri2_dpy =
+ dri2_egl_display(dri2_surf->base.Resource.Display);
+
+ /* FIXME: print internal error */
+ if (!dri2_surf->pending_buffer)
+ return;
+
+ dri2_dpy->dri2->releaseBuffer(dri2_dpy->dri_screen,
+ dri2_surf->pending_buffer);
+ dri2_surf->pending_buffer = NULL;
+}
+
+static void
+dri2_release_buffers(struct dri2_egl_surface *dri2_surf)
+{
+ struct dri2_egl_display *dri2_dpy =
+ dri2_egl_display(dri2_surf->base.Resource.Display);
+ int i;
+
+ for (i = 0; i < __DRI_BUFFER_COUNT; ++i) {
+ if (dri2_surf->dri_buffers[i]) {
+ switch (i) {
+ case __DRI_BUFFER_FRONT_LEFT:
+ if (dri2_surf->pending_buffer)
+ force_roundtrip(dri2_dpy->wl_dpy->display);
+ dri2_surf->pending_buffer = dri2_surf->dri_buffers[i];
+ wl_display_sync_callback(dri2_dpy->wl_dpy->display,
+ dri2_release_pending_buffer, dri2_surf);
+ break;
+ default:
+ dri2_dpy->dri2->releaseBuffer(dri2_dpy->dri_screen,
+ dri2_surf->dri_buffers[i]);
+ break;
+ }
+ dri2_surf->dri_buffers[i] = NULL;
+ }
+ }
+}
+
+static __DRIbuffer *
+dri2_get_buffers_with_format(__DRIdrawable * driDrawable,
+ int *width, int *height,
+ unsigned int *attachments, int count,
+ int *out_count, void *loaderPrivate)
+{
+ struct dri2_egl_surface *dri2_surf = loaderPrivate;
+ struct dri2_egl_display *dri2_dpy =
+ dri2_egl_display(dri2_surf->base.Resource.Display);
+ int i;
+
+ if (dri2_surf->type == DRI2_WINDOW_SURFACE &&
+ (dri2_surf->base.Width != dri2_surf->wl_win->width ||
+ dri2_surf->base.Height != dri2_surf->wl_win->height)) {
+
+ dri2_release_buffers(dri2_surf);
+
+ dri2_surf->base.Width = dri2_surf->wl_win->width;
+ dri2_surf->base.Height = dri2_surf->wl_win->height;
+ dri2_surf->dx = dri2_surf->wl_win->dx;
+ dri2_surf->dy = dri2_surf->wl_win->dy;
+
+ for (i = 0; i < WL_BUFFER_COUNT; ++i) {
+ if (dri2_surf->wl_drm_buffer[i])
+ wl_buffer_destroy(dri2_surf->wl_drm_buffer[i]);
+ dri2_surf->wl_drm_buffer[i] = NULL;
+ }
+ }
+
+ dri2_surf->buffer_count = 0;
+ for (i = 0; i < 2*count; i+=2) {
+ assert(attachments[i] < __DRI_BUFFER_COUNT);
+ assert(dri2_surf->buffer_count < 5);
+
+ if (dri2_surf->dri_buffers[attachments[i]] == NULL) {
+
+ dri2_surf->dri_buffers[attachments[i]] =
+ dri2_dpy->dri2->allocateBuffer(dri2_dpy->dri_screen,
+ attachments[i], attachments[i+1],
+ dri2_surf->base.Width, dri2_surf->base.Height);
+
+ if (!dri2_surf->dri_buffers[attachments[i]])
+ continue;
+
+ if (attachments[i] == __DRI_BUFFER_FRONT_LEFT)
+ dri2_process_front_buffer(dri2_surf, attachments[i+1]);
+ else if (attachments[i] == __DRI_BUFFER_BACK_LEFT)
+ dri2_process_back_buffer(dri2_surf, attachments[i+1]);
+ }
+
+ memcpy(&dri2_surf->buffers[dri2_surf->buffer_count],
+ dri2_surf->dri_buffers[attachments[i]],
+ sizeof(__DRIbuffer));
+
+ dri2_surf->buffer_count++;
+ }
+
+ assert(dri2_surf->type == DRI2_PIXMAP_SURFACE ||
+ dri2_surf->dri_buffers[__DRI_BUFFER_BACK_LEFT]);
+
+ *out_count = dri2_surf->buffer_count;
+ if (dri2_surf->buffer_count == 0)
+ return NULL;
+
+ *width = dri2_surf->base.Width;
+ *height = dri2_surf->base.Height;
+
+ return dri2_surf->buffers;
+}
+
+static __DRIbuffer *
+dri2_get_buffers(__DRIdrawable * driDrawable,
+ int *width, int *height,
+ unsigned int *attachments, int count,
+ int *out_count, void *loaderPrivate)
+{
+ unsigned int *attachments_with_format;
+ __DRIbuffer *buffer;
+ const unsigned int format = 32;
+ int i;
+
+ attachments_with_format = calloc(count * 2, sizeof(unsigned int));
+ if (!attachments_with_format) {
+ *out_count = 0;
+ return NULL;
+ }
+
+ for (i = 0; i < count; ++i) {
+ attachments_with_format[2*i] = attachments[i];
+ attachments_with_format[2*i + 1] = format;
+ }
+
+ buffer =
+ dri2_get_buffers_with_format(driDrawable,
+ width, height,
+ attachments_with_format, count,
+ out_count, loaderPrivate);
+
+ free(attachments_with_format);
+
+ return buffer;
+}
+
+
+static void
+dri2_flush_front_buffer(__DRIdrawable * driDrawable, void *loaderPrivate)
+{
+ (void) driDrawable;
+
+ /* FIXME: Does EGL support front buffer rendering at all? */
+
+#if 0
+ struct dri2_egl_surface *dri2_surf = loaderPrivate;
+
+ dri2WaitGL(dri2_surf);
+#else
+ (void) loaderPrivate;
+#endif
+}
+
+static struct wl_buffer *
+wayland_create_buffer(struct dri2_egl_surface *dri2_surf, __DRIbuffer *buffer)
+{
+ struct dri2_egl_display *dri2_dpy =
+ dri2_egl_display(dri2_surf->base.Resource.Display);
+
+ return wl_drm_create_buffer(dri2_dpy->wl_dpy->drm, buffer->name,
+ dri2_surf->base.Width, dri2_surf->base.Height,
+ buffer->pitch, dri2_surf->wl_win->visual);
+}
+
+static void
+wayland_frame_callback(void *data, uint32_t time)
+{
+ struct dri2_egl_surface *dri2_surf = data;
+
+ dri2_surf->block_swap_buffers = EGL_FALSE;
+}
+
+static inline void
+pointer_swap(const void **p1, const void **p2)
+{
+ const void *tmp = *p1;
+ *p1 = *p2;
+ *p2 = tmp;
+}
+
+/**
+ * Called via eglSwapBuffers(), drv->API.SwapBuffers().
+ */
+static EGLBoolean
+dri2_swap_buffers(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *draw)
+{
+ struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
+ struct dri2_egl_surface *dri2_surf = dri2_egl_surface(draw);
+ struct dri2_egl_driver *dri2_drv = dri2_egl_driver(drv);
+
+ while (dri2_surf->block_swap_buffers)
+ wl_display_iterate(dri2_dpy->wl_dpy->display, WL_DISPLAY_READABLE);
+
+ dri2_surf->block_swap_buffers = EGL_TRUE;
+ wl_display_frame_callback(dri2_dpy->wl_dpy->display,
+ wayland_frame_callback, dri2_surf);
+
+ if (dri2_surf->type == DRI2_WINDOW_SURFACE) {
+ pointer_swap(
+ (const void **) &dri2_surf->dri_buffers[__DRI_BUFFER_FRONT_LEFT],
+ (const void **) &dri2_surf->dri_buffers[__DRI_BUFFER_BACK_LEFT]);
+
+ dri2_surf->dri_buffers[__DRI_BUFFER_FRONT_LEFT]->attachment =
+ __DRI_BUFFER_FRONT_LEFT;
+ dri2_surf->dri_buffers[__DRI_BUFFER_BACK_LEFT]->attachment =
+ __DRI_BUFFER_BACK_LEFT;
+
+ pointer_swap((const void **) &dri2_surf->wl_drm_buffer[WL_BUFFER_FRONT],
+ (const void **) &dri2_surf->wl_drm_buffer[WL_BUFFER_BACK]);
+
+ if (!dri2_surf->wl_drm_buffer[WL_BUFFER_FRONT])
+ dri2_surf->wl_drm_buffer[WL_BUFFER_FRONT] =
+ wayland_create_buffer(dri2_surf,
+ dri2_surf->dri_buffers[__DRI_BUFFER_FRONT_LEFT]);
+
+ wl_surface_attach(dri2_surf->wl_win->surface,
+ dri2_surf->wl_drm_buffer[WL_BUFFER_FRONT],
+ dri2_surf->dx, dri2_surf->dy);
+
+ dri2_surf->wl_win->attached_width = dri2_surf->base.Width;
+ dri2_surf->wl_win->attached_height = dri2_surf->base.Height;
+ /* reset resize growing parameters */
+ dri2_surf->dx = 0;
+ dri2_surf->dy = 0;
+
+ wl_surface_damage(dri2_surf->wl_win->surface, 0, 0,
+ dri2_surf->base.Width, dri2_surf->base.Height);
+ }
+
+ _EGLContext *ctx;
+ if (dri2_drv->glFlush) {
+ ctx = _eglGetCurrentContext();
+ if (ctx && ctx->DrawSurface == &dri2_surf->base)
+ dri2_drv->glFlush();
+ }
+
+ (*dri2_dpy->flush->flush)(dri2_surf->dri_drawable);
+ (*dri2_dpy->flush->invalidate)(dri2_surf->dri_drawable);
+
+ return EGL_TRUE;
+}
+
+/**
+ * Called via eglCreateImageKHR(), drv->API.CreateImageKHR().
+ */
+static _EGLImage *
+dri2_create_image_khr_pixmap(_EGLDisplay *disp, _EGLContext *ctx,
+ EGLClientBuffer buffer, const EGLint *attr_list)
+{
+ struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
+ struct wl_egl_pixmap *wl_egl_pixmap = (struct wl_egl_pixmap *) buffer;
+ struct dri2_egl_buffer *dri2_buf;
+ EGLint wl_attr_list[] = {
+ EGL_WIDTH, 0,
+ EGL_HEIGHT, 0,
+ EGL_DRM_BUFFER_STRIDE_MESA, 0,
+ EGL_DRM_BUFFER_FORMAT_MESA, EGL_DRM_BUFFER_FORMAT_ARGB32_MESA,
+ EGL_NONE
+ };
+
+ dri2_buf = malloc(sizeof *dri2_buf);
+ if (!dri2_buf)
+ return NULL;
+
+ dri2_buf->dri2_dpy = dri2_dpy;
+ dri2_buf->dri_buffer =
+ dri2_dpy->dri2->allocateBuffer(dri2_dpy->dri_screen,
+ __DRI_BUFFER_FRONT_LEFT, 32,
+ wl_egl_pixmap->width,
+ wl_egl_pixmap->height);
+
+ wl_egl_pixmap->name = dri2_buf->dri_buffer->name;
+ wl_egl_pixmap->stride = dri2_buf->dri_buffer->pitch;
+ wl_egl_pixmap->destroy = dri2_wl_egl_pixmap_destroy;
+ wl_egl_pixmap->driver_private = dri2_buf;
+
+ wl_attr_list[1] = wl_egl_pixmap->width;
+ wl_attr_list[3] = wl_egl_pixmap->height;
+ wl_attr_list[5] = wl_egl_pixmap->stride / 4;
+
+
+ return dri2_create_image_khr(disp->Driver, disp, ctx, EGL_DRM_BUFFER_MESA,
+ (EGLClientBuffer)(intptr_t) wl_egl_pixmap->name, wl_attr_list);
+}
+
+static _EGLImage *
+dri2_wayland_create_image_khr(_EGLDriver *drv, _EGLDisplay *disp,
+ _EGLContext *ctx, EGLenum target,
+ EGLClientBuffer buffer, const EGLint *attr_list)
+{
+ (void) drv;
+
+ switch (target) {
+ case EGL_NATIVE_PIXMAP_KHR:
+ return dri2_create_image_khr_pixmap(disp, ctx, buffer, attr_list);
+ default:
+ return dri2_create_image_khr(drv, disp, ctx, target, buffer, attr_list);
+ }
+}
+
+static int
+dri2_wayland_authenticate(_EGLDisplay *disp, uint32_t id)
+{
+ struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
+ int ret = 0;
+
+ dri2_dpy->wl_dpy->authenticated = false;
+
+ wl_drm_authenticate(dri2_dpy->wl_dpy->drm, id);
+ force_roundtrip(dri2_dpy->wl_dpy->display);
+
+ if (!dri2_dpy->wl_dpy->authenticated)
+ ret = -1;
+
+ /* reset authenticated */
+ dri2_dpy->wl_dpy->authenticated = true;
+
+ return ret;
+}
+
+/**
+ * Called via eglTerminate(), drv->API.Terminate().
+ */
+static EGLBoolean
+dri2_terminate(_EGLDriver *drv, _EGLDisplay *disp)
+{
+ struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
+
+ _eglReleaseDisplayResources(drv, disp);
+ _eglCleanupDisplay(disp);
+
+ dri2_dpy->core->destroyScreen(dri2_dpy->dri_screen);
+ close(dri2_dpy->fd);
+ dlclose(dri2_dpy->driver);
+ free(dri2_dpy->driver_name);
+ free(dri2_dpy);
+ disp->DriverData = NULL;
+
+ return EGL_TRUE;
+}
+
+EGLBoolean
+dri2_initialize_wayland(_EGLDriver *drv, _EGLDisplay *disp)
+{
+ struct dri2_egl_display *dri2_dpy;
+ int i;
+
+ drv->API.CreateWindowSurface = dri2_create_window_surface;
+ drv->API.CreatePixmapSurface = dri2_create_pixmap_surface;
+ drv->API.DestroySurface = dri2_destroy_surface;
+ drv->API.SwapBuffers = dri2_swap_buffers;
+ drv->API.CreateImageKHR = dri2_wayland_create_image_khr;
+ drv->API.Terminate = dri2_terminate;
+
+ dri2_dpy = malloc(sizeof *dri2_dpy);
+ if (!dri2_dpy)
+ return _eglError(EGL_BAD_ALLOC, "eglInitialize");
+
+ memset(dri2_dpy, 0, sizeof *dri2_dpy);
+
+ disp->DriverData = (void *) dri2_dpy;
+ dri2_dpy->wl_dpy = disp->PlatformDisplay;
+
+ if (dri2_dpy->wl_dpy->fd == -1)
+ force_roundtrip(dri2_dpy->wl_dpy->display);
+ if (dri2_dpy->wl_dpy->fd == -1)
+ goto cleanup_dpy;
+
+ dri2_dpy->fd = dup(dri2_dpy->wl_dpy->fd);
+ if (dri2_dpy->fd < 0) {
+ _eglError(EGL_BAD_ALLOC, "DRI2: failed to dup fd");
+ goto cleanup_dpy;
+ }
+
+ if (!dri2_dpy->wl_dpy->authenticated)
+ force_roundtrip(dri2_dpy->wl_dpy->display);
+ if (!dri2_dpy->wl_dpy->authenticated)
+ goto cleanup_dpy;
+
+ dri2_dpy->driver_name = dri2_get_driver_for_fd(dri2_dpy->fd);
+ if (dri2_dpy->driver_name == NULL) {
+ _eglError(EGL_BAD_ALLOC, "DRI2: failed to get driver name");
+ goto cleanup_fd;
+ }
+
+ dri2_dpy->device_name = strdup(dri2_dpy->wl_dpy->device_name);
+ if (dri2_dpy->device_name == NULL) {
+ _eglError(EGL_BAD_ALLOC, "DRI2: failed to get device name");
+ goto cleanup_driver_name;
+ }
+
+ if (!dri2_load_driver(disp))
+ goto cleanup_device_name;
+
+ dri2_dpy->dri2_loader_extension.base.name = __DRI_DRI2_LOADER;
+ dri2_dpy->dri2_loader_extension.base.version = 3;
+ dri2_dpy->dri2_loader_extension.getBuffers = dri2_get_buffers;
+ dri2_dpy->dri2_loader_extension.flushFrontBuffer = dri2_flush_front_buffer;
+ dri2_dpy->dri2_loader_extension.getBuffersWithFormat =
+ dri2_get_buffers_with_format;
+
+ dri2_dpy->extensions[0] = &dri2_dpy->dri2_loader_extension.base;
+ dri2_dpy->extensions[1] = &image_lookup_extension.base;
+ dri2_dpy->extensions[2] = NULL;
+
+ if (!dri2_create_screen(disp))
+ goto cleanup_driver;
+
+ for (i = 0; dri2_dpy->driver_configs[i]; i++)
+ dri2_add_config(disp, dri2_dpy->driver_configs[i], i + 1, 0,
+ EGL_WINDOW_BIT | EGL_PIXMAP_BIT, NULL);
+
+
+ disp->Extensions.MESA_drm_image = EGL_TRUE;
+ disp->Extensions.KHR_image_base = EGL_TRUE;
+ disp->Extensions.KHR_image_pixmap = EGL_TRUE;
+ disp->Extensions.KHR_gl_renderbuffer_image = EGL_TRUE;
+ disp->Extensions.KHR_gl_texture_2D_image = EGL_TRUE;
+
+ disp->Extensions.WL_bind_wayland_display = EGL_TRUE;
+ dri2_dpy->authenticate = dri2_wayland_authenticate;
+
+ /* we're supporting EGL 1.4 */
+ disp->VersionMajor = 1;
+ disp->VersionMinor = 4;
+
+ return EGL_TRUE;
+
+ cleanup_driver:
+ dlclose(dri2_dpy->driver);
+ cleanup_device_name:
+ free(dri2_dpy->device_name);
+ cleanup_driver_name:
+ free(dri2_dpy->driver_name);
+ cleanup_fd:
+ close(dri2_dpy->fd);
+ cleanup_dpy:
+ free(dri2_dpy);
+
+ return EGL_FALSE;
+}
diff --git a/src/egl/drivers/dri2/platform_x11.c b/src/egl/drivers/dri2/platform_x11.c
new file mode 100644
index 00000000000..b3e60b8a115
--- /dev/null
+++ b/src/egl/drivers/dri2/platform_x11.c
@@ -0,0 +1,1085 @@
+/*
+ * Copyright © 2011 Intel Corporation
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ * Authors:
+ * Kristian Høgsberg <krh@bitplanet.net>
+ */
+
+#include <stdlib.h>
+#include <string.h>
+#include <stdio.h>
+#include <limits.h>
+#include <dlfcn.h>
+#include <fcntl.h>
+#include <errno.h>
+#include <unistd.h>
+#include <xf86drm.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+
+#include "egl_dri2.h"
+
+static void
+swrastCreateDrawable(struct dri2_egl_display * dri2_dpy,
+ struct dri2_egl_surface * dri2_surf,
+ int depth)
+{
+ uint32_t mask;
+ const uint32_t function = GXcopy;
+ uint32_t valgc[2];
+
+ /* create GC's */
+ dri2_surf->gc = xcb_generate_id(dri2_dpy->conn);
+ mask = XCB_GC_FUNCTION;
+ xcb_create_gc(dri2_dpy->conn, dri2_surf->gc, dri2_surf->drawable, mask, &function);
+
+ dri2_surf->swapgc = xcb_generate_id(dri2_dpy->conn);
+ mask = XCB_GC_FUNCTION | XCB_GC_GRAPHICS_EXPOSURES;
+ valgc[0] = function;
+ valgc[1] = False;
+ xcb_create_gc(dri2_dpy->conn, dri2_surf->swapgc, dri2_surf->drawable, mask, valgc);
+ dri2_surf->depth = depth;
+ switch (depth) {
+ case 32:
+ case 24:
+ dri2_surf->bytes_per_pixel = 4;
+ break;
+ case 16:
+ dri2_surf->bytes_per_pixel = 2;
+ break;
+ case 8:
+ dri2_surf->bytes_per_pixel = 1;
+ break;
+ case 0:
+ dri2_surf->bytes_per_pixel = 0;
+ break;
+ default:
+ _eglLog(_EGL_WARNING, "unsupported depth %d", depth);
+ }
+}
+
+static void
+swrastDestroyDrawable(struct dri2_egl_display * dri2_dpy,
+ struct dri2_egl_surface * dri2_surf)
+{
+ xcb_free_gc(dri2_dpy->conn, dri2_surf->gc);
+ xcb_free_gc(dri2_dpy->conn, dri2_surf->swapgc);
+}
+
+static void
+swrastGetDrawableInfo(__DRIdrawable * draw,
+ int *x, int *y, int *w, int *h,
+ void *loaderPrivate)
+{
+ struct dri2_egl_surface *dri2_surf = loaderPrivate;
+ struct dri2_egl_display *dri2_dpy = dri2_egl_display(dri2_surf->base.Resource.Display);
+
+ xcb_get_geometry_cookie_t cookie;
+ xcb_get_geometry_reply_t *reply;
+ xcb_generic_error_t *error;
+
+ *w = *h = 0;
+ cookie = xcb_get_geometry (dri2_dpy->conn, dri2_surf->drawable);
+ reply = xcb_get_geometry_reply (dri2_dpy->conn, cookie, &error);
+ if (reply == NULL)
+ return;
+
+ if (error != NULL) {
+ _eglLog(_EGL_WARNING, "error in xcb_get_geometry");
+ free(error);
+ } else {
+ *w = reply->width;
+ *h = reply->height;
+ }
+ free(reply);
+}
+
+static void
+swrastPutImage(__DRIdrawable * draw, int op,
+ int x, int y, int w, int h,
+ char *data, void *loaderPrivate)
+{
+ struct dri2_egl_surface *dri2_surf = loaderPrivate;
+ struct dri2_egl_display *dri2_dpy = dri2_egl_display(dri2_surf->base.Resource.Display);
+
+ xcb_gcontext_t gc;
+
+ switch (op) {
+ case __DRI_SWRAST_IMAGE_OP_DRAW:
+ gc = dri2_surf->gc;
+ break;
+ case __DRI_SWRAST_IMAGE_OP_SWAP:
+ gc = dri2_surf->swapgc;
+ break;
+ default:
+ return;
+ }
+
+ xcb_put_image(dri2_dpy->conn, XCB_IMAGE_FORMAT_Z_PIXMAP, dri2_surf->drawable,
+ gc, w, h, x, y, 0, dri2_surf->depth,
+ w*h*dri2_surf->bytes_per_pixel, (const uint8_t *)data);
+}
+
+static void
+swrastGetImage(__DRIdrawable * read,
+ int x, int y, int w, int h,
+ char *data, void *loaderPrivate)
+{
+ struct dri2_egl_surface *dri2_surf = loaderPrivate;
+ struct dri2_egl_display *dri2_dpy = dri2_egl_display(dri2_surf->base.Resource.Display);
+
+ xcb_get_image_cookie_t cookie;
+ xcb_get_image_reply_t *reply;
+ xcb_generic_error_t *error;
+
+ cookie = xcb_get_image (dri2_dpy->conn, XCB_IMAGE_FORMAT_Z_PIXMAP,
+ dri2_surf->drawable, x, y, w, h, ~0);
+ reply = xcb_get_image_reply (dri2_dpy->conn, cookie, &error);
+ if (reply == NULL)
+ return;
+
+ if (error != NULL) {
+ _eglLog(_EGL_WARNING, "error in xcb_get_image");
+ free(error);
+ } else {
+ uint32_t bytes = xcb_get_image_data_length(reply);
+ uint8_t *idata = xcb_get_image_data(reply);
+ memcpy(data, idata, bytes);
+ }
+ free(reply);
+}
+
+
+/**
+ * Called via eglCreateWindowSurface(), drv->API.CreateWindowSurface().
+ */
+static _EGLSurface *
+dri2_create_surface(_EGLDriver *drv, _EGLDisplay *disp, EGLint type,
+ _EGLConfig *conf, EGLNativeWindowType window,
+ const EGLint *attrib_list)
+{
+ struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
+ struct dri2_egl_config *dri2_conf = dri2_egl_config(conf);
+ struct dri2_egl_surface *dri2_surf;
+ xcb_get_geometry_cookie_t cookie;
+ xcb_get_geometry_reply_t *reply;
+ xcb_screen_iterator_t s;
+ xcb_generic_error_t *error;
+
+ (void) drv;
+
+ dri2_surf = malloc(sizeof *dri2_surf);
+ if (!dri2_surf) {
+ _eglError(EGL_BAD_ALLOC, "dri2_create_surface");
+ return NULL;
+ }
+
+ if (!_eglInitSurface(&dri2_surf->base, disp, type, conf, attrib_list))
+ goto cleanup_surf;
+
+ dri2_surf->region = XCB_NONE;
+ if (type == EGL_PBUFFER_BIT) {
+ dri2_surf->drawable = xcb_generate_id(dri2_dpy->conn);
+ s = xcb_setup_roots_iterator(xcb_get_setup(dri2_dpy->conn));
+ xcb_create_pixmap(dri2_dpy->conn, conf->BufferSize,
+ dri2_surf->drawable, s.data->root,
+ dri2_surf->base.Width, dri2_surf->base.Height);
+ } else {
+ dri2_surf->drawable = window;
+ }
+
+ if (dri2_dpy->dri2) {
+ dri2_surf->dri_drawable =
+ (*dri2_dpy->dri2->createNewDrawable) (dri2_dpy->dri_screen,
+ type == EGL_WINDOW_BIT ?
+ dri2_conf->dri_double_config :
+ dri2_conf->dri_single_config,
+ dri2_surf);
+ } else {
+ assert(dri2_dpy->swrast);
+ dri2_surf->dri_drawable =
+ (*dri2_dpy->swrast->createNewDrawable) (dri2_dpy->dri_screen,
+ dri2_conf->dri_double_config,
+ dri2_surf);
+ }
+
+ if (dri2_surf->dri_drawable == NULL) {
+ _eglError(EGL_BAD_ALLOC, "dri2->createNewDrawable");
+ goto cleanup_pixmap;
+ }
+
+ if (dri2_dpy->dri2) {
+ xcb_dri2_create_drawable (dri2_dpy->conn, dri2_surf->drawable);
+ } else {
+ swrastCreateDrawable(dri2_dpy, dri2_surf, _eglGetConfigKey(conf, EGL_DEPTH_SIZE));
+ }
+
+ if (type != EGL_PBUFFER_BIT) {
+ cookie = xcb_get_geometry (dri2_dpy->conn, dri2_surf->drawable);
+ reply = xcb_get_geometry_reply (dri2_dpy->conn, cookie, &error);
+ if (reply == NULL || error != NULL) {
+ _eglError(EGL_BAD_ALLOC, "xcb_get_geometry");
+ free(error);
+ goto cleanup_dri_drawable;
+ }
+
+ dri2_surf->base.Width = reply->width;
+ dri2_surf->base.Height = reply->height;
+ free(reply);
+ }
+
+ return &dri2_surf->base;
+
+ cleanup_dri_drawable:
+ dri2_dpy->core->destroyDrawable(dri2_surf->dri_drawable);
+ cleanup_pixmap:
+ if (type == EGL_PBUFFER_BIT)
+ xcb_free_pixmap(dri2_dpy->conn, dri2_surf->drawable);
+ cleanup_surf:
+ free(dri2_surf);
+
+ return NULL;
+}
+
+/**
+ * Called via eglCreateWindowSurface(), drv->API.CreateWindowSurface().
+ */
+static _EGLSurface *
+dri2_create_window_surface(_EGLDriver *drv, _EGLDisplay *disp,
+ _EGLConfig *conf, EGLNativeWindowType window,
+ const EGLint *attrib_list)
+{
+ return dri2_create_surface(drv, disp, EGL_WINDOW_BIT, conf,
+ window, attrib_list);
+}
+
+static _EGLSurface *
+dri2_create_pixmap_surface(_EGLDriver *drv, _EGLDisplay *disp,
+ _EGLConfig *conf, EGLNativePixmapType pixmap,
+ const EGLint *attrib_list)
+{
+ return dri2_create_surface(drv, disp, EGL_PIXMAP_BIT, conf,
+ pixmap, attrib_list);
+}
+
+static _EGLSurface *
+dri2_create_pbuffer_surface(_EGLDriver *drv, _EGLDisplay *disp,
+ _EGLConfig *conf, const EGLint *attrib_list)
+{
+ return dri2_create_surface(drv, disp, EGL_PBUFFER_BIT, conf,
+ XCB_WINDOW_NONE, attrib_list);
+}
+
+static EGLBoolean
+dri2_destroy_surface(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *surf)
+{
+ struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
+ struct dri2_egl_surface *dri2_surf = dri2_egl_surface(surf);
+
+ (void) drv;
+
+ if (!_eglPutSurface(surf))
+ return EGL_TRUE;
+
+ (*dri2_dpy->core->destroyDrawable)(dri2_surf->dri_drawable);
+
+ if (dri2_dpy->dri2) {
+ xcb_dri2_destroy_drawable (dri2_dpy->conn, dri2_surf->drawable);
+ } else {
+ assert(dri2_dpy->swrast);
+ swrastDestroyDrawable(dri2_dpy, dri2_surf);
+ }
+
+ if (surf->Type == EGL_PBUFFER_BIT)
+ xcb_free_pixmap (dri2_dpy->conn, dri2_surf->drawable);
+
+ free(surf);
+
+ return EGL_TRUE;
+}
+
+/**
+ * Process list of buffer received from the server
+ *
+ * Processes the list of buffers received in a reply from the server to either
+ * \c DRI2GetBuffers or \c DRI2GetBuffersWithFormat.
+ */
+static void
+dri2_process_buffers(struct dri2_egl_surface *dri2_surf,
+ xcb_dri2_dri2_buffer_t *buffers, unsigned count)
+{
+ struct dri2_egl_display *dri2_dpy =
+ dri2_egl_display(dri2_surf->base.Resource.Display);
+ xcb_rectangle_t rectangle;
+ unsigned i;
+
+ dri2_surf->buffer_count = count;
+ dri2_surf->have_fake_front = 0;
+
+ /* This assumes the DRI2 buffer attachment tokens matches the
+ * __DRIbuffer tokens. */
+ for (i = 0; i < count; i++) {
+ dri2_surf->buffers[i].attachment = buffers[i].attachment;
+ dri2_surf->buffers[i].name = buffers[i].name;
+ dri2_surf->buffers[i].pitch = buffers[i].pitch;
+ dri2_surf->buffers[i].cpp = buffers[i].cpp;
+ dri2_surf->buffers[i].flags = buffers[i].flags;
+
+ /* We only use the DRI drivers single buffer configs. This
+ * means that if we try to render to a window, DRI2 will give us
+ * the fake front buffer, which we'll use as a back buffer.
+ * Note that EGL doesn't require that several clients rendering
+ * to the same window must see the same aux buffers. */
+ if (dri2_surf->buffers[i].attachment == __DRI_BUFFER_FAKE_FRONT_LEFT)
+ dri2_surf->have_fake_front = 1;
+ }
+
+ if (dri2_surf->region != XCB_NONE)
+ xcb_xfixes_destroy_region(dri2_dpy->conn, dri2_surf->region);
+
+ rectangle.x = 0;
+ rectangle.y = 0;
+ rectangle.width = dri2_surf->base.Width;
+ rectangle.height = dri2_surf->base.Height;
+ dri2_surf->region = xcb_generate_id(dri2_dpy->conn);
+ xcb_xfixes_create_region(dri2_dpy->conn, dri2_surf->region, 1, &rectangle);
+}
+
+static __DRIbuffer *
+dri2_get_buffers(__DRIdrawable * driDrawable,
+ int *width, int *height,
+ unsigned int *attachments, int count,
+ int *out_count, void *loaderPrivate)
+{
+ struct dri2_egl_surface *dri2_surf = loaderPrivate;
+ struct dri2_egl_display *dri2_dpy =
+ dri2_egl_display(dri2_surf->base.Resource.Display);
+ xcb_dri2_dri2_buffer_t *buffers;
+ xcb_dri2_get_buffers_reply_t *reply;
+ xcb_dri2_get_buffers_cookie_t cookie;
+
+ (void) driDrawable;
+
+ cookie = xcb_dri2_get_buffers_unchecked (dri2_dpy->conn,
+ dri2_surf->drawable,
+ count, count, attachments);
+ reply = xcb_dri2_get_buffers_reply (dri2_dpy->conn, cookie, NULL);
+ buffers = xcb_dri2_get_buffers_buffers (reply);
+ if (buffers == NULL)
+ return NULL;
+
+ *out_count = reply->count;
+ dri2_surf->base.Width = *width = reply->width;
+ dri2_surf->base.Height = *height = reply->height;
+ dri2_process_buffers(dri2_surf, buffers, *out_count);
+
+ free(reply);
+
+ return dri2_surf->buffers;
+}
+
+static __DRIbuffer *
+dri2_get_buffers_with_format(__DRIdrawable * driDrawable,
+ int *width, int *height,
+ unsigned int *attachments, int count,
+ int *out_count, void *loaderPrivate)
+{
+ struct dri2_egl_surface *dri2_surf = loaderPrivate;
+ struct dri2_egl_display *dri2_dpy =
+ dri2_egl_display(dri2_surf->base.Resource.Display);
+ xcb_dri2_dri2_buffer_t *buffers;
+ xcb_dri2_get_buffers_with_format_reply_t *reply;
+ xcb_dri2_get_buffers_with_format_cookie_t cookie;
+ xcb_dri2_attach_format_t *format_attachments;
+
+ (void) driDrawable;
+
+ format_attachments = (xcb_dri2_attach_format_t *) attachments;
+ cookie = xcb_dri2_get_buffers_with_format_unchecked (dri2_dpy->conn,
+ dri2_surf->drawable,
+ count, count,
+ format_attachments);
+
+ reply = xcb_dri2_get_buffers_with_format_reply (dri2_dpy->conn,
+ cookie, NULL);
+ if (reply == NULL)
+ return NULL;
+
+ buffers = xcb_dri2_get_buffers_with_format_buffers (reply);
+ dri2_surf->base.Width = *width = reply->width;
+ dri2_surf->base.Height = *height = reply->height;
+ *out_count = reply->count;
+ dri2_process_buffers(dri2_surf, buffers, *out_count);
+
+ free(reply);
+
+ return dri2_surf->buffers;
+}
+
+static void
+dri2_flush_front_buffer(__DRIdrawable * driDrawable, void *loaderPrivate)
+{
+ (void) driDrawable;
+
+ /* FIXME: Does EGL support front buffer rendering at all? */
+
+#if 0
+ struct dri2_egl_surface *dri2_surf = loaderPrivate;
+
+ dri2WaitGL(dri2_surf);
+#else
+ (void) loaderPrivate;
+#endif
+}
+
+static char *
+dri2_strndup(const char *s, int length)
+{
+ char *d;
+
+ d = malloc(length + 1);
+ if (d == NULL)
+ return NULL;
+
+ memcpy(d, s, length);
+ d[length] = '\0';
+
+ return d;
+}
+
+static EGLBoolean
+dri2_connect(struct dri2_egl_display *dri2_dpy)
+{
+ xcb_xfixes_query_version_reply_t *xfixes_query;
+ xcb_xfixes_query_version_cookie_t xfixes_query_cookie;
+ xcb_dri2_query_version_reply_t *dri2_query;
+ xcb_dri2_query_version_cookie_t dri2_query_cookie;
+ xcb_dri2_connect_reply_t *connect;
+ xcb_dri2_connect_cookie_t connect_cookie;
+ xcb_generic_error_t *error;
+ xcb_screen_iterator_t s;
+ char *driver_name, *device_name;
+
+ xcb_prefetch_extension_data (dri2_dpy->conn, &xcb_xfixes_id);
+ xcb_prefetch_extension_data (dri2_dpy->conn, &xcb_dri2_id);
+
+ xfixes_query_cookie = xcb_xfixes_query_version(dri2_dpy->conn,
+ XCB_XFIXES_MAJOR_VERSION,
+ XCB_XFIXES_MINOR_VERSION);
+
+ dri2_query_cookie = xcb_dri2_query_version (dri2_dpy->conn,
+ XCB_DRI2_MAJOR_VERSION,
+ XCB_DRI2_MINOR_VERSION);
+
+ s = xcb_setup_roots_iterator(xcb_get_setup(dri2_dpy->conn));
+ connect_cookie = xcb_dri2_connect_unchecked (dri2_dpy->conn,
+ s.data->root,
+ XCB_DRI2_DRIVER_TYPE_DRI);
+
+ xfixes_query =
+ xcb_xfixes_query_version_reply (dri2_dpy->conn,
+ xfixes_query_cookie, &error);
+ if (xfixes_query == NULL ||
+ error != NULL || xfixes_query->major_version < 2) {
+ _eglLog(_EGL_WARNING, "DRI2: failed to query xfixes version");
+ free(error);
+ return EGL_FALSE;
+ }
+ free(xfixes_query);
+
+ dri2_query =
+ xcb_dri2_query_version_reply (dri2_dpy->conn, dri2_query_cookie, &error);
+ if (dri2_query == NULL || error != NULL) {
+ _eglLog(_EGL_WARNING, "DRI2: failed to query version");
+ free(error);
+ return EGL_FALSE;
+ }
+ dri2_dpy->dri2_major = dri2_query->major_version;
+ dri2_dpy->dri2_minor = dri2_query->minor_version;
+ free(dri2_query);
+
+ connect = xcb_dri2_connect_reply (dri2_dpy->conn, connect_cookie, NULL);
+ if (connect == NULL ||
+ connect->driver_name_length + connect->device_name_length == 0) {
+ _eglLog(_EGL_WARNING, "DRI2: failed to authenticate");
+ return EGL_FALSE;
+ }
+
+ driver_name = xcb_dri2_connect_driver_name (connect);
+ dri2_dpy->driver_name =
+ dri2_strndup(driver_name,
+ xcb_dri2_connect_driver_name_length (connect));
+
+#if XCB_DRI2_CONNECT_DEVICE_NAME_BROKEN
+ device_name = driver_name + ((connect->driver_name_length + 3) & ~3);
+#else
+ device_name = xcb_dri2_connect_device_name (connect);
+#endif
+
+ dri2_dpy->device_name =
+ dri2_strndup(device_name,
+ xcb_dri2_connect_device_name_length (connect));
+
+ if (dri2_dpy->device_name == NULL || dri2_dpy->driver_name == NULL) {
+ free(dri2_dpy->device_name);
+ free(dri2_dpy->driver_name);
+ free(connect);
+ return EGL_FALSE;
+ }
+ free(connect);
+
+ return EGL_TRUE;
+}
+
+static int
+dri2_x11_authenticate(_EGLDisplay *disp, uint32_t id)
+{
+ struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
+ xcb_dri2_authenticate_reply_t *authenticate;
+ xcb_dri2_authenticate_cookie_t authenticate_cookie;
+ xcb_screen_iterator_t s;
+ int ret = 0;
+
+ s = xcb_setup_roots_iterator(xcb_get_setup(dri2_dpy->conn));
+ authenticate_cookie =
+ xcb_dri2_authenticate_unchecked(dri2_dpy->conn, s.data->root, id);
+ authenticate =
+ xcb_dri2_authenticate_reply(dri2_dpy->conn, authenticate_cookie, NULL);
+
+ if (authenticate == NULL || !authenticate->authenticated)
+ ret = -1;
+
+ if (authenticate)
+ free(authenticate);
+
+ return ret;
+}
+
+static EGLBoolean
+dri2_authenticate(_EGLDisplay *disp)
+{
+ struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
+ drm_magic_t magic;
+
+ if (drmGetMagic(dri2_dpy->fd, &magic)) {
+ _eglLog(_EGL_WARNING, "DRI2: failed to get drm magic");
+ return EGL_FALSE;
+ }
+
+ if (dri2_x11_authenticate(disp, magic) < 0) {
+ _eglLog(_EGL_WARNING, "DRI2: failed to authenticate");
+ return EGL_FALSE;
+ }
+
+ return EGL_TRUE;
+}
+
+static EGLBoolean
+dri2_add_configs_for_visuals(struct dri2_egl_display *dri2_dpy,
+ _EGLDisplay *disp)
+{
+ xcb_screen_iterator_t s;
+ xcb_depth_iterator_t d;
+ xcb_visualtype_t *visuals;
+ int i, j, id;
+ EGLint surface_type;
+ EGLint config_attrs[] = {
+ EGL_NATIVE_VISUAL_ID, 0,
+ EGL_NATIVE_VISUAL_TYPE, 0,
+ EGL_NONE
+ };
+
+ s = xcb_setup_roots_iterator(xcb_get_setup(dri2_dpy->conn));
+ d = xcb_screen_allowed_depths_iterator(s.data);
+ id = 1;
+
+ surface_type =
+ EGL_WINDOW_BIT |
+ EGL_PIXMAP_BIT |
+ EGL_PBUFFER_BIT |
+ EGL_SWAP_BEHAVIOR_PRESERVED_BIT;
+
+ while (d.rem > 0) {
+ EGLBoolean class_added[6] = { 0, };
+
+ visuals = xcb_depth_visuals(d.data);
+ for (i = 0; i < xcb_depth_visuals_length(d.data); i++) {
+ if (class_added[visuals[i]._class])
+ continue;
+
+ class_added[visuals[i]._class] = EGL_TRUE;
+ for (j = 0; dri2_dpy->driver_configs[j]; j++) {
+ config_attrs[1] = visuals[i].visual_id;
+ config_attrs[3] = visuals[i]._class;
+
+ dri2_add_config(disp, dri2_dpy->driver_configs[j], id++,
+ d.data->depth, surface_type, config_attrs);
+ }
+ }
+
+ xcb_depth_next(&d);
+ }
+
+ if (!_eglGetArraySize(disp->Configs)) {
+ _eglLog(_EGL_WARNING, "DRI2: failed to create any config");
+ return EGL_FALSE;
+ }
+
+ return EGL_TRUE;
+}
+
+static EGLBoolean
+dri2_copy_region(_EGLDriver *drv, _EGLDisplay *disp,
+ _EGLSurface *draw, xcb_xfixes_region_t region)
+{
+ struct dri2_egl_driver *dri2_drv = dri2_egl_driver(drv);
+ struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
+ struct dri2_egl_surface *dri2_surf = dri2_egl_surface(draw);
+ _EGLContext *ctx;
+ enum xcb_dri2_attachment_t render_attachment;
+ xcb_dri2_copy_region_cookie_t cookie;
+
+ if (dri2_drv->glFlush) {
+ ctx = _eglGetCurrentContext();
+ if (ctx && ctx->DrawSurface == &dri2_surf->base)
+ dri2_drv->glFlush();
+ }
+
+ (*dri2_dpy->flush->flush)(dri2_surf->dri_drawable);
+
+#if 0
+ /* FIXME: Add support for dri swapbuffers, that'll give us swap
+ * interval and page flipping (at least for fullscreen windows) as
+ * well as the page flip event. Unless surface->SwapBehavior is
+ * EGL_BUFFER_PRESERVED. */
+#if __DRI2_FLUSH_VERSION >= 2
+ if (pdraw->psc->f)
+ (*pdraw->psc->f->flushInvalidate)(pdraw->driDrawable);
+#endif
+#endif
+
+ if (dri2_surf->have_fake_front)
+ render_attachment = XCB_DRI2_ATTACHMENT_BUFFER_FAKE_FRONT_LEFT;
+ else
+ render_attachment = XCB_DRI2_ATTACHMENT_BUFFER_BACK_LEFT;
+
+ cookie = xcb_dri2_copy_region_unchecked(dri2_dpy->conn,
+ dri2_surf->drawable,
+ region,
+ XCB_DRI2_ATTACHMENT_BUFFER_FRONT_LEFT,
+ render_attachment);
+ free(xcb_dri2_copy_region_reply(dri2_dpy->conn, cookie, NULL));
+
+ return EGL_TRUE;
+}
+
+static EGLBoolean
+dri2_swap_buffers(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *draw)
+{
+ struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
+ struct dri2_egl_surface *dri2_surf = dri2_egl_surface(draw);
+
+ if (dri2_dpy->dri2) {
+ return dri2_copy_region(drv, disp, draw, dri2_surf->region);
+ } else {
+ assert(dri2_dpy->swrast);
+
+ dri2_dpy->core->swapBuffers(dri2_surf->dri_drawable);
+ return EGL_TRUE;
+ }
+}
+
+static EGLBoolean
+dri2_swap_buffers_region(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *draw,
+ EGLint numRects, const EGLint *rects)
+{
+ struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
+ struct dri2_egl_surface *dri2_surf = dri2_egl_surface(draw);
+ EGLBoolean ret;
+ xcb_xfixes_region_t region;
+ xcb_rectangle_t rectangles[16];
+ int i;
+
+ if (numRects > (int)ARRAY_SIZE(rectangles))
+ return dri2_copy_region(drv, disp, draw, dri2_surf->region);
+
+ /* FIXME: Invert y here? */
+ for (i = 0; i < numRects; i++) {
+ rectangles[i].x = rects[i * 4];
+ rectangles[i].y = rects[i * 4 + 1];
+ rectangles[i].width = rects[i * 4 + 2];
+ rectangles[i].height = rects[i * 4 + 3];
+ }
+
+ region = xcb_generate_id(dri2_dpy->conn);
+ xcb_xfixes_create_region(dri2_dpy->conn, region, numRects, rectangles);
+ ret = dri2_copy_region(drv, disp, draw, region);
+ xcb_xfixes_destroy_region(dri2_dpy->conn, region);
+
+ return ret;
+}
+
+static EGLBoolean
+dri2_copy_buffers(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *surf,
+ EGLNativePixmapType target)
+{
+ struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
+ struct dri2_egl_surface *dri2_surf = dri2_egl_surface(surf);
+ xcb_gcontext_t gc;
+
+ (void) drv;
+
+ (*dri2_dpy->flush->flush)(dri2_surf->dri_drawable);
+
+ gc = xcb_generate_id(dri2_dpy->conn);
+ xcb_create_gc(dri2_dpy->conn, gc, target, 0, NULL);
+ xcb_copy_area(dri2_dpy->conn,
+ dri2_surf->drawable,
+ target,
+ gc,
+ 0, 0,
+ 0, 0,
+ dri2_surf->base.Width,
+ dri2_surf->base.Height);
+ xcb_free_gc(dri2_dpy->conn, gc);
+
+ return EGL_TRUE;
+}
+
+static _EGLImage *
+dri2_create_image_khr_pixmap(_EGLDisplay *disp, _EGLContext *ctx,
+ EGLClientBuffer buffer, const EGLint *attr_list)
+{
+ struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
+ struct dri2_egl_image *dri2_img;
+ unsigned int attachments[1];
+ xcb_drawable_t drawable;
+ xcb_dri2_get_buffers_cookie_t buffers_cookie;
+ xcb_dri2_get_buffers_reply_t *buffers_reply;
+ xcb_dri2_dri2_buffer_t *buffers;
+ xcb_get_geometry_cookie_t geometry_cookie;
+ xcb_get_geometry_reply_t *geometry_reply;
+ xcb_generic_error_t *error;
+ int stride, format;
+
+ (void) ctx;
+
+ drawable = (xcb_drawable_t) buffer;
+ xcb_dri2_create_drawable (dri2_dpy->conn, drawable);
+ attachments[0] = XCB_DRI2_ATTACHMENT_BUFFER_FRONT_LEFT;
+ buffers_cookie =
+ xcb_dri2_get_buffers_unchecked (dri2_dpy->conn,
+ drawable, 1, 1, attachments);
+ geometry_cookie = xcb_get_geometry (dri2_dpy->conn, drawable);
+ buffers_reply = xcb_dri2_get_buffers_reply (dri2_dpy->conn,
+ buffers_cookie, NULL);
+ buffers = xcb_dri2_get_buffers_buffers (buffers_reply);
+ if (buffers == NULL) {
+ return NULL;
+ }
+
+ geometry_reply = xcb_get_geometry_reply (dri2_dpy->conn,
+ geometry_cookie, &error);
+ if (geometry_reply == NULL || error != NULL) {
+ _eglError(EGL_BAD_ALLOC, "xcb_get_geometry");
+ free(error);
+ free(buffers_reply);
+ return NULL;
+ }
+
+ switch (geometry_reply->depth) {
+ case 16:
+ format = __DRI_IMAGE_FORMAT_RGB565;
+ break;
+ case 24:
+ format = __DRI_IMAGE_FORMAT_XRGB8888;
+ break;
+ case 32:
+ format = __DRI_IMAGE_FORMAT_ARGB8888;
+ break;
+ default:
+ _eglError(EGL_BAD_PARAMETER,
+ "dri2_create_image_khr: unsupported pixmap depth");
+ free(buffers_reply);
+ free(geometry_reply);
+ return NULL;
+ }
+
+ dri2_img = malloc(sizeof *dri2_img);
+ if (!dri2_img) {
+ free(buffers_reply);
+ free(geometry_reply);
+ _eglError(EGL_BAD_ALLOC, "dri2_create_image_khr");
+ return EGL_NO_IMAGE_KHR;
+ }
+
+ if (!_eglInitImage(&dri2_img->base, disp)) {
+ free(buffers_reply);
+ free(geometry_reply);
+ return EGL_NO_IMAGE_KHR;
+ }
+
+ stride = buffers[0].pitch / buffers[0].cpp;
+ dri2_img->dri_image =
+ dri2_dpy->image->createImageFromName(dri2_dpy->dri_screen,
+ buffers_reply->width,
+ buffers_reply->height,
+ format,
+ buffers[0].name,
+ stride,
+ dri2_img);
+
+ free(buffers_reply);
+ free(geometry_reply);
+
+ return &dri2_img->base;
+}
+
+static _EGLImage *
+dri2_x11_create_image_khr(_EGLDriver *drv, _EGLDisplay *disp,
+ _EGLContext *ctx, EGLenum target,
+ EGLClientBuffer buffer, const EGLint *attr_list)
+{
+ (void) drv;
+
+ switch (target) {
+ case EGL_NATIVE_PIXMAP_KHR:
+ return dri2_create_image_khr_pixmap(disp, ctx, buffer, attr_list);
+ default:
+ return dri2_create_image_khr(drv, disp, ctx, target, buffer, attr_list);
+ }
+}
+
+static EGLBoolean
+dri2_initialize_x11_swrast(_EGLDriver *drv, _EGLDisplay *disp)
+{
+ struct dri2_egl_display *dri2_dpy;
+
+ drv->API.CreateWindowSurface = dri2_create_window_surface;
+ drv->API.CreatePixmapSurface = dri2_create_pixmap_surface;
+ drv->API.CreatePbufferSurface = dri2_create_pbuffer_surface;
+ drv->API.DestroySurface = dri2_destroy_surface;
+ drv->API.SwapBuffers = dri2_swap_buffers;
+ drv->API.CopyBuffers = dri2_copy_buffers;
+
+ drv->API.SwapBuffersRegionNOK = NULL;
+ drv->API.CreateImageKHR = NULL;
+ drv->API.DestroyImageKHR = NULL;
+ drv->API.CreateDRMImageMESA = NULL;
+ drv->API.ExportDRMImageMESA = NULL;
+
+ dri2_dpy = malloc(sizeof *dri2_dpy);
+ if (!dri2_dpy)
+ return _eglError(EGL_BAD_ALLOC, "eglInitialize");
+
+ memset(dri2_dpy, 0, sizeof *dri2_dpy);
+
+ disp->DriverData = (void *) dri2_dpy;
+ if (disp->PlatformDisplay == NULL) {
+ dri2_dpy->conn = xcb_connect(0, 0);
+ } else {
+ dri2_dpy->conn = XGetXCBConnection((Display *) disp->PlatformDisplay);
+ }
+
+ if (xcb_connection_has_error(dri2_dpy->conn)) {
+ _eglLog(_EGL_WARNING, "DRI2: xcb_connect failed");
+ goto cleanup_dpy;
+ }
+
+ dri2_dpy->driver_name = dri2_strndup("swrast", strlen("swrast"));
+
+ if (!dri2_load_driver(disp))
+ goto cleanup_conn;
+
+ dri2_dpy->swrast_loader_extension.base.name = __DRI_SWRAST_LOADER;
+ dri2_dpy->swrast_loader_extension.base.version = __DRI_SWRAST_LOADER_VERSION;
+ dri2_dpy->swrast_loader_extension.getDrawableInfo = swrastGetDrawableInfo;
+ dri2_dpy->swrast_loader_extension.putImage = swrastPutImage;
+ dri2_dpy->swrast_loader_extension.getImage = swrastGetImage;
+
+ dri2_dpy->extensions[0] = &dri2_dpy->swrast_loader_extension.base;
+ dri2_dpy->extensions[1] = NULL;
+ dri2_dpy->extensions[2] = NULL;
+
+ if (!dri2_create_screen(disp))
+ goto cleanup_driver;
+
+ if (dri2_dpy->conn) {
+ if (!dri2_add_configs_for_visuals(dri2_dpy, disp))
+ goto cleanup_configs;
+ }
+
+ /* we're supporting EGL 1.4 */
+ disp->VersionMajor = 1;
+ disp->VersionMinor = 4;
+
+ return EGL_TRUE;
+
+ cleanup_configs:
+ _eglCleanupDisplay(disp);
+ dri2_dpy->core->destroyScreen(dri2_dpy->dri_screen);
+ cleanup_driver:
+ dlclose(dri2_dpy->driver);
+ cleanup_conn:
+ if (disp->PlatformDisplay == NULL)
+ xcb_disconnect(dri2_dpy->conn);
+ cleanup_dpy:
+ free(dri2_dpy);
+
+ return EGL_FALSE;
+}
+
+
+static EGLBoolean
+dri2_initialize_x11_dri2(_EGLDriver *drv, _EGLDisplay *disp)
+{
+ struct dri2_egl_display *dri2_dpy;
+
+ drv->API.CreateWindowSurface = dri2_create_window_surface;
+ drv->API.CreatePixmapSurface = dri2_create_pixmap_surface;
+ drv->API.CreatePbufferSurface = dri2_create_pbuffer_surface;
+ drv->API.DestroySurface = dri2_destroy_surface;
+ drv->API.SwapBuffers = dri2_swap_buffers;
+ drv->API.CopyBuffers = dri2_copy_buffers;
+ drv->API.CreateImageKHR = dri2_x11_create_image_khr;
+ drv->API.SwapBuffersRegionNOK = dri2_swap_buffers_region;
+
+ dri2_dpy = malloc(sizeof *dri2_dpy);
+ if (!dri2_dpy)
+ return _eglError(EGL_BAD_ALLOC, "eglInitialize");
+
+ memset(dri2_dpy, 0, sizeof *dri2_dpy);
+
+ disp->DriverData = (void *) dri2_dpy;
+ if (disp->PlatformDisplay == NULL) {
+ dri2_dpy->conn = xcb_connect(0, 0);
+ } else {
+ dri2_dpy->conn = XGetXCBConnection((Display *) disp->PlatformDisplay);
+ }
+
+ if (xcb_connection_has_error(dri2_dpy->conn)) {
+ _eglLog(_EGL_WARNING, "DRI2: xcb_connect failed");
+ goto cleanup_dpy;
+ }
+
+ if (dri2_dpy->conn) {
+ if (!dri2_connect(dri2_dpy))
+ goto cleanup_conn;
+ }
+
+ if (!dri2_load_driver(disp))
+ goto cleanup_conn;
+
+ dri2_dpy->fd = open(dri2_dpy->device_name, O_RDWR);
+ if (dri2_dpy->fd == -1) {
+ _eglLog(_EGL_WARNING,
+ "DRI2: could not open %s (%s)", dri2_dpy->device_name,
+ strerror(errno));
+ goto cleanup_driver;
+ }
+
+ if (dri2_dpy->conn) {
+ if (!dri2_authenticate(disp))
+ goto cleanup_fd;
+ }
+
+ if (dri2_dpy->dri2_minor >= 1) {
+ dri2_dpy->dri2_loader_extension.base.name = __DRI_DRI2_LOADER;
+ dri2_dpy->dri2_loader_extension.base.version = 3;
+ dri2_dpy->dri2_loader_extension.getBuffers = dri2_get_buffers;
+ dri2_dpy->dri2_loader_extension.flushFrontBuffer = dri2_flush_front_buffer;
+ dri2_dpy->dri2_loader_extension.getBuffersWithFormat =
+ dri2_get_buffers_with_format;
+ } else {
+ dri2_dpy->dri2_loader_extension.base.name = __DRI_DRI2_LOADER;
+ dri2_dpy->dri2_loader_extension.base.version = 2;
+ dri2_dpy->dri2_loader_extension.getBuffers = dri2_get_buffers;
+ dri2_dpy->dri2_loader_extension.flushFrontBuffer = dri2_flush_front_buffer;
+ dri2_dpy->dri2_loader_extension.getBuffersWithFormat = NULL;
+ }
+
+ dri2_dpy->extensions[0] = &dri2_dpy->dri2_loader_extension.base;
+ dri2_dpy->extensions[1] = &image_lookup_extension.base;
+ dri2_dpy->extensions[2] = NULL;
+
+ if (!dri2_create_screen(disp))
+ goto cleanup_fd;
+
+ if (dri2_dpy->conn) {
+ if (!dri2_add_configs_for_visuals(dri2_dpy, disp))
+ goto cleanup_configs;
+ }
+
+ disp->Extensions.MESA_drm_image = EGL_TRUE;
+ disp->Extensions.KHR_image_base = EGL_TRUE;
+ disp->Extensions.KHR_image_pixmap = EGL_TRUE;
+ disp->Extensions.KHR_gl_renderbuffer_image = EGL_TRUE;
+ disp->Extensions.KHR_gl_texture_2D_image = EGL_TRUE;
+ disp->Extensions.NOK_swap_region = EGL_TRUE;
+ disp->Extensions.NOK_texture_from_pixmap = EGL_TRUE;
+
+#ifdef HAVE_WAYLAND_PLATFORM
+ disp->Extensions.WL_bind_wayland_display = EGL_TRUE;
+#endif
+ dri2_dpy->authenticate = dri2_x11_authenticate;
+
+ /* we're supporting EGL 1.4 */
+ disp->VersionMajor = 1;
+ disp->VersionMinor = 4;
+
+ return EGL_TRUE;
+
+ cleanup_configs:
+ _eglCleanupDisplay(disp);
+ dri2_dpy->core->destroyScreen(dri2_dpy->dri_screen);
+ cleanup_fd:
+ close(dri2_dpy->fd);
+ cleanup_driver:
+ dlclose(dri2_dpy->driver);
+ cleanup_conn:
+ if (disp->PlatformDisplay == NULL)
+ xcb_disconnect(dri2_dpy->conn);
+ cleanup_dpy:
+ free(dri2_dpy);
+
+ return EGL_FALSE;
+}
+
+EGLBoolean
+dri2_initialize_x11(_EGLDriver *drv, _EGLDisplay *disp)
+{
+ EGLBoolean initialized = EGL_TRUE;
+
+ int x11_dri2_accel = (getenv("LIBGL_ALWAYS_SOFTWARE") == NULL);
+
+ if (x11_dri2_accel) {
+ if (!dri2_initialize_x11_dri2(drv, disp)) {
+ initialized = dri2_initialize_x11_swrast(drv, disp);
+ }
+ } else {
+ initialized = dri2_initialize_x11_swrast(drv, disp);
+ }
+
+ return initialized;
+}
+
diff --git a/src/egl/drivers/glx/Makefile b/src/egl/drivers/glx/Makefile
index d976b91a74e..a1e6b731fe9 100644
--- a/src/egl/drivers/glx/Makefile
+++ b/src/egl/drivers/glx/Makefile
@@ -3,7 +3,7 @@
TOP = ../../../..
include $(TOP)/configs/current
-EGL_DRIVER = egl_glx.so
+EGL_DRIVER = egl_glx
EGL_SOURCES = egl_glx.c
EGL_INCLUDES = \
@@ -11,6 +11,9 @@ EGL_INCLUDES = \
-I$(TOP)/src/egl/main
EGL_CFLAGS = $(X11_CFLAGS)
-EGL_LIBS = $(X11_LIBS) -lGL
+EGL_LIBS = $(X11_LIBS) $(DLOPEN_LIBS)
+
+EGL_CFLAGS += -D_EGL_MAIN=_eglBuiltInDriverGLX
+EGL_BUILTIN = true
include ../Makefile.template
diff --git a/src/egl/drivers/glx/egl_glx.c b/src/egl/drivers/glx/egl_glx.c
index 8ec7c48c50e..c3c11c7b6eb 100644
--- a/src/egl/drivers/glx/egl_glx.c
+++ b/src/egl/drivers/glx/egl_glx.c
@@ -36,8 +36,8 @@
#include <stdlib.h>
#include <string.h>
#include <X11/Xlib.h>
-#include <GL/glx.h>
-#include <EGL/egl.h>
+#include <dlfcn.h>
+#include "GL/glx.h"
#include "eglconfig.h"
#include "eglcontext.h"
@@ -54,10 +54,66 @@
#error "GL/glx.h must be equal to or greater than GLX 1.4"
#endif
+/* GLX 1.0 */
+typedef GLXContext (*GLXCREATECONTEXTPROC)( Display *dpy, XVisualInfo *vis, GLXContext shareList, Bool direct );
+typedef void (*GLXDESTROYCONTEXTPROC)( Display *dpy, GLXContext ctx );
+typedef Bool (*GLXMAKECURRENTPROC)( Display *dpy, GLXDrawable drawable, GLXContext ctx);
+typedef void (*GLXSWAPBUFFERSPROC)( Display *dpy, GLXDrawable drawable );
+typedef GLXPixmap (*GLXCREATEGLXPIXMAPPROC)( Display *dpy, XVisualInfo *visual, Pixmap pixmap );
+typedef void (*GLXDESTROYGLXPIXMAPPROC)( Display *dpy, GLXPixmap pixmap );
+typedef Bool (*GLXQUERYVERSIONPROC)( Display *dpy, int *maj, int *min );
+typedef int (*GLXGETCONFIGPROC)( Display *dpy, XVisualInfo *visual, int attrib, int *value );
+typedef void (*GLXWAITGLPROC)( void );
+typedef void (*GLXWAITXPROC)( void );
+
+/* GLX 1.1 */
+typedef const char *(*GLXQUERYEXTENSIONSSTRINGPROC)( Display *dpy, int screen );
+typedef const char *(*GLXQUERYSERVERSTRINGPROC)( Display *dpy, int screen, int name );
+typedef const char *(*GLXGETCLIENTSTRINGPROC)( Display *dpy, int name );
+
/** subclass of _EGLDriver */
struct GLX_egl_driver
{
_EGLDriver Base; /**< base class */
+
+ void *handle;
+
+ /* GLX 1.0 */
+ GLXCREATECONTEXTPROC glXCreateContext;
+ GLXDESTROYCONTEXTPROC glXDestroyContext;
+ GLXMAKECURRENTPROC glXMakeCurrent;
+ GLXSWAPBUFFERSPROC glXSwapBuffers;
+ GLXCREATEGLXPIXMAPPROC glXCreateGLXPixmap;
+ GLXDESTROYGLXPIXMAPPROC glXDestroyGLXPixmap;
+ GLXQUERYVERSIONPROC glXQueryVersion;
+ GLXGETCONFIGPROC glXGetConfig;
+ GLXWAITGLPROC glXWaitGL;
+ GLXWAITXPROC glXWaitX;
+
+ /* GLX 1.1 */
+ GLXQUERYEXTENSIONSSTRINGPROC glXQueryExtensionsString;
+ GLXQUERYSERVERSTRINGPROC glXQueryServerString;
+ GLXGETCLIENTSTRINGPROC glXGetClientString;
+
+ /* GLX 1.3 or (GLX_SGI_make_current_read and GLX_SGIX_fbconfig) */
+ PFNGLXGETFBCONFIGSPROC glXGetFBConfigs;
+ PFNGLXGETFBCONFIGATTRIBPROC glXGetFBConfigAttrib;
+ PFNGLXGETVISUALFROMFBCONFIGPROC glXGetVisualFromFBConfig;
+ PFNGLXCREATEWINDOWPROC glXCreateWindow;
+ PFNGLXDESTROYWINDOWPROC glXDestroyWindow;
+ PFNGLXCREATEPIXMAPPROC glXCreatePixmap;
+ PFNGLXDESTROYPIXMAPPROC glXDestroyPixmap;
+ PFNGLXCREATEPBUFFERPROC glXCreatePbuffer;
+ PFNGLXDESTROYPBUFFERPROC glXDestroyPbuffer;
+ PFNGLXCREATENEWCONTEXTPROC glXCreateNewContext;
+ PFNGLXMAKECONTEXTCURRENTPROC glXMakeContextCurrent;
+
+ /* GLX 1.4 or GLX_ARB_get_proc_address */
+ PFNGLXGETPROCADDRESSPROC glXGetProcAddress;
+
+ /* GLX_SGIX_pbuffer */
+ PFNGLXCREATEGLXPBUFFERSGIXPROC glXCreateGLXPbufferSGIX;
+ PFNGLXDESTROYGLXPBUFFERSGIXPROC glXDestroyGLXPbufferSGIX;
};
@@ -76,14 +132,9 @@ struct GLX_egl_display
EGLBoolean have_fbconfig;
EGLBoolean have_pbuffer;
- /* GLX_SGIX_pbuffer */
- PFNGLXCREATEGLXPBUFFERSGIXPROC glXCreateGLXPbufferSGIX;
- PFNGLXDESTROYGLXPBUFFERSGIXPROC glXDestroyGLXPbufferSGIX;
-
/* workaround quirks of different GLX implementations */
EGLBoolean single_buffered_quirk;
EGLBoolean glx_window_quirk;
-
};
@@ -168,19 +219,21 @@ static const struct {
static EGLBoolean
-convert_fbconfig(Display *dpy, GLXFBConfig fbconfig,
+convert_fbconfig(struct GLX_egl_driver *GLX_drv,
+ struct GLX_egl_display *GLX_dpy, GLXFBConfig fbconfig,
struct GLX_egl_config *GLX_conf)
{
+ Display *dpy = GLX_dpy->dpy;
int err, attr, val;
unsigned i;
/* must have rgba bit */
- err = glXGetFBConfigAttrib(dpy, fbconfig, GLX_RENDER_TYPE, &val);
+ err = GLX_drv->glXGetFBConfigAttrib(dpy, fbconfig, GLX_RENDER_TYPE, &val);
if (err || !(val & GLX_RGBA_BIT))
return EGL_FALSE;
/* must know whether it is double-buffered */
- err = glXGetFBConfigAttrib(dpy, fbconfig, GLX_DOUBLEBUFFER, &val);
+ err = GLX_drv->glXGetFBConfigAttrib(dpy, fbconfig, GLX_DOUBLEBUFFER, &val);
if (err)
return EGL_FALSE;
GLX_conf->double_buffered = val;
@@ -196,7 +249,7 @@ convert_fbconfig(Display *dpy, GLXFBConfig fbconfig,
if (!egl_attr)
continue;
- err = glXGetFBConfigAttrib(dpy, fbconfig, attr, &val);
+ err = GLX_drv->glXGetFBConfigAttrib(dpy, fbconfig, attr, &val);
if (err) {
if (err == GLX_BAD_ATTRIBUTE) {
err = 0;
@@ -303,21 +356,23 @@ static const struct {
};
static EGLBoolean
-convert_visual(Display *dpy, XVisualInfo *vinfo,
+convert_visual(struct GLX_egl_driver *GLX_drv,
+ struct GLX_egl_display *GLX_dpy, XVisualInfo *vinfo,
struct GLX_egl_config *GLX_conf)
{
+ Display *dpy = GLX_dpy->dpy;
int err, attr, val;
unsigned i;
/* the visual must support OpenGL and RGBA buffer */
- err = glXGetConfig(dpy, vinfo, GLX_USE_GL, &val);
+ err = GLX_drv->glXGetConfig(dpy, vinfo, GLX_USE_GL, &val);
if (!err && val)
- err = glXGetConfig(dpy, vinfo, GLX_RGBA, &val);
+ err = GLX_drv->glXGetConfig(dpy, vinfo, GLX_RGBA, &val);
if (err || !val)
return EGL_FALSE;
/* must know whether it is double-buffered */
- err = glXGetConfig(dpy, vinfo, GLX_DOUBLEBUFFER, &val);
+ err = GLX_drv->glXGetConfig(dpy, vinfo, GLX_DOUBLEBUFFER, &val);
if (err)
return EGL_FALSE;
GLX_conf->double_buffered = val;
@@ -341,7 +396,7 @@ convert_visual(Display *dpy, XVisualInfo *vinfo,
if (!egl_attr)
continue;
- err = glXGetConfig(dpy, vinfo, attr, &val);
+ err = GLX_drv->glXGetConfig(dpy, vinfo, attr, &val);
if (err) {
if (err == GLX_BAD_ATTRIBUTE) {
err = 0;
@@ -406,14 +461,16 @@ fix_config(struct GLX_egl_display *GLX_dpy, struct GLX_egl_config *GLX_conf)
static EGLBoolean
-create_configs(_EGLDisplay *dpy, struct GLX_egl_display *GLX_dpy,
- EGLint screen)
+create_configs(_EGLDriver *drv, _EGLDisplay *dpy, EGLint screen)
{
+ struct GLX_egl_driver *GLX_drv = GLX_egl_driver(drv);
+ struct GLX_egl_display *GLX_dpy = GLX_egl_display(dpy);
EGLint num_configs = 0, i;
EGLint id = 1;
if (GLX_dpy->have_fbconfig) {
- GLX_dpy->fbconfigs = glXGetFBConfigs(GLX_dpy->dpy, screen, &num_configs);
+ GLX_dpy->fbconfigs =
+ GLX_drv->glXGetFBConfigs(GLX_dpy->dpy, screen, &num_configs);
}
else {
XVisualInfo vinfo_template;
@@ -434,10 +491,14 @@ create_configs(_EGLDisplay *dpy, struct GLX_egl_display *GLX_dpy,
memset(&template, 0, sizeof(template));
_eglInitConfig(&template.Base, dpy, id);
- if (GLX_dpy->have_fbconfig)
- ok = convert_fbconfig(GLX_dpy->dpy, GLX_dpy->fbconfigs[i], &template);
- else
- ok = convert_visual(GLX_dpy->dpy, &GLX_dpy->visuals[i], &template);
+ if (GLX_dpy->have_fbconfig) {
+ ok = convert_fbconfig(GLX_drv, GLX_dpy,
+ GLX_dpy->fbconfigs[i], &template);
+ }
+ else {
+ ok = convert_visual(GLX_drv, GLX_dpy,
+ &GLX_dpy->visuals[i], &template);
+ }
if (!ok)
continue;
@@ -462,13 +523,12 @@ create_configs(_EGLDisplay *dpy, struct GLX_egl_display *GLX_dpy,
static void
-check_extensions(struct GLX_egl_display *GLX_dpy, EGLint screen)
+check_extensions(struct GLX_egl_driver *GLX_drv,
+ struct GLX_egl_display *GLX_dpy, EGLint screen)
{
GLX_dpy->extensions =
- glXQueryExtensionsString(GLX_dpy->dpy, screen);
+ GLX_drv->glXQueryExtensionsString(GLX_dpy->dpy, screen);
if (GLX_dpy->extensions) {
- /* glXGetProcAddress is assumed */
-
if (strstr(GLX_dpy->extensions, "GLX_SGI_make_current_read")) {
/* GLX 1.3 entry points are used */
GLX_dpy->have_make_current_read = EGL_TRUE;
@@ -480,13 +540,8 @@ check_extensions(struct GLX_egl_display *GLX_dpy, EGLint screen)
}
if (strstr(GLX_dpy->extensions, "GLX_SGIX_pbuffer")) {
- GLX_dpy->glXCreateGLXPbufferSGIX = (PFNGLXCREATEGLXPBUFFERSGIXPROC)
- glXGetProcAddress((const GLubyte *) "glXCreateGLXPbufferSGIX");
- GLX_dpy->glXDestroyGLXPbufferSGIX = (PFNGLXDESTROYGLXPBUFFERSGIXPROC)
- glXGetProcAddress((const GLubyte *) "glXDestroyGLXPbufferSGIX");
-
- if (GLX_dpy->glXCreateGLXPbufferSGIX &&
- GLX_dpy->glXDestroyGLXPbufferSGIX &&
+ if (GLX_drv->glXCreateGLXPbufferSGIX &&
+ GLX_drv->glXDestroyGLXPbufferSGIX &&
GLX_dpy->have_fbconfig)
GLX_dpy->have_pbuffer = EGL_TRUE;
}
@@ -502,16 +557,17 @@ check_extensions(struct GLX_egl_display *GLX_dpy, EGLint screen)
static void
-check_quirks(struct GLX_egl_display *GLX_dpy, EGLint screen)
+check_quirks(struct GLX_egl_driver *GLX_drv,
+ struct GLX_egl_display *GLX_dpy, EGLint screen)
{
const char *vendor;
GLX_dpy->single_buffered_quirk = EGL_TRUE;
GLX_dpy->glx_window_quirk = EGL_TRUE;
- vendor = glXGetClientString(GLX_dpy->dpy, GLX_VENDOR);
+ vendor = GLX_drv->glXGetClientString(GLX_dpy->dpy, GLX_VENDOR);
if (vendor && strstr(vendor, "NVIDIA")) {
- vendor = glXQueryServerString(GLX_dpy->dpy, screen, GLX_VENDOR);
+ vendor = GLX_drv->glXQueryServerString(GLX_dpy->dpy, screen, GLX_VENDOR);
if (vendor && strstr(vendor, "NVIDIA")) {
_eglLog(_EGL_DEBUG, "disable quirks");
GLX_dpy->single_buffered_quirk = EGL_FALSE;
@@ -525,16 +581,21 @@ check_quirks(struct GLX_egl_display *GLX_dpy, EGLint screen)
* Called via eglInitialize(), GLX_drv->API.Initialize().
*/
static EGLBoolean
-GLX_eglInitialize(_EGLDriver *drv, _EGLDisplay *disp,
- EGLint *major, EGLint *minor)
+GLX_eglInitialize(_EGLDriver *drv, _EGLDisplay *disp)
{
+ struct GLX_egl_driver *GLX_drv = GLX_egl_driver(drv);
struct GLX_egl_display *GLX_dpy;
- (void) drv;
-
if (disp->Platform != _EGL_PLATFORM_X11)
return EGL_FALSE;
+ /* this is a fallback driver */
+ if (!disp->Options.UseFallback)
+ return EGL_FALSE;
+
+ if (disp->Options.TestOnly)
+ return EGL_TRUE;
+
GLX_dpy = CALLOC_STRUCT(GLX_egl_display);
if (!GLX_dpy)
return _eglError(EGL_BAD_ALLOC, "eglInitialize");
@@ -549,7 +610,8 @@ GLX_eglInitialize(_EGLDriver *drv, _EGLDisplay *disp,
}
}
- if (!glXQueryVersion(GLX_dpy->dpy, &GLX_dpy->glx_maj, &GLX_dpy->glx_min)) {
+ if (!GLX_drv->glXQueryVersion(GLX_dpy->dpy,
+ &GLX_dpy->glx_maj, &GLX_dpy->glx_min)) {
_eglLog(_EGL_WARNING, "GLX: glXQueryVersion failed");
if (!disp->PlatformDisplay)
XCloseDisplay(GLX_dpy->dpy);
@@ -557,10 +619,13 @@ GLX_eglInitialize(_EGLDriver *drv, _EGLDisplay *disp,
return EGL_FALSE;
}
- check_extensions(GLX_dpy, DefaultScreen(GLX_dpy->dpy));
- check_quirks(GLX_dpy, DefaultScreen(GLX_dpy->dpy));
+ disp->DriverData = (void *) GLX_dpy;
+ disp->ClientAPIs = EGL_OPENGL_BIT;
+
+ check_extensions(GLX_drv, GLX_dpy, DefaultScreen(GLX_dpy->dpy));
+ check_quirks(GLX_drv, GLX_dpy, DefaultScreen(GLX_dpy->dpy));
- create_configs(disp, GLX_dpy, DefaultScreen(GLX_dpy->dpy));
+ create_configs(drv, disp, DefaultScreen(GLX_dpy->dpy));
if (!_eglGetArraySize(disp->Configs)) {
_eglLog(_EGL_WARNING, "GLX: failed to create any config");
if (!disp->PlatformDisplay)
@@ -569,16 +634,14 @@ GLX_eglInitialize(_EGLDriver *drv, _EGLDisplay *disp,
return EGL_FALSE;
}
- disp->DriverData = (void *) GLX_dpy;
- disp->ClientAPIsMask = EGL_OPENGL_BIT;
-
/* we're supporting EGL 1.4 */
- *major = 1;
- *minor = 4;
+ disp->VersionMajor = 1;
+ disp->VersionMinor = 4;
return EGL_TRUE;
}
+
/**
* Called via eglTerminate(), drv->API.Terminate().
*/
@@ -612,12 +675,11 @@ static _EGLContext *
GLX_eglCreateContext(_EGLDriver *drv, _EGLDisplay *disp, _EGLConfig *conf,
_EGLContext *share_list, const EGLint *attrib_list)
{
+ struct GLX_egl_driver *GLX_drv = GLX_egl_driver(drv);
struct GLX_egl_context *GLX_ctx = CALLOC_STRUCT(GLX_egl_context);
struct GLX_egl_display *GLX_dpy = GLX_egl_display(disp);
struct GLX_egl_context *GLX_ctx_shared = GLX_egl_context(share_list);
- (void) drv;
-
if (!GLX_ctx) {
_eglError(EGL_BAD_ALLOC, "eglCreateContext");
return NULL;
@@ -628,19 +690,19 @@ GLX_eglCreateContext(_EGLDriver *drv, _EGLDisplay *disp, _EGLConfig *conf,
return NULL;
}
- if (GLX_dpy->have_fbconfig)
- GLX_ctx->context =
- glXCreateNewContext(GLX_dpy->dpy,
- GLX_dpy->fbconfigs[GLX_egl_config_index(conf)],
- GLX_RGBA_TYPE,
- GLX_ctx_shared ? GLX_ctx_shared->context : NULL,
- GL_TRUE);
- else
- GLX_ctx->context =
- glXCreateContext(GLX_dpy->dpy,
- &GLX_dpy->visuals[GLX_egl_config_index(conf)],
- GLX_ctx_shared ? GLX_ctx_shared->context : NULL,
- GL_TRUE);
+ if (GLX_dpy->have_fbconfig) {
+ GLX_ctx->context = GLX_drv->glXCreateNewContext(GLX_dpy->dpy,
+ GLX_dpy->fbconfigs[GLX_egl_config_index(conf)],
+ GLX_RGBA_TYPE,
+ GLX_ctx_shared ? GLX_ctx_shared->context : NULL,
+ GL_TRUE);
+ }
+ else {
+ GLX_ctx->context = GLX_drv->glXCreateContext(GLX_dpy->dpy,
+ &GLX_dpy->visuals[GLX_egl_config_index(conf)],
+ GLX_ctx_shared ? GLX_ctx_shared->context : NULL,
+ GL_TRUE);
+ }
if (!GLX_ctx->context) {
free(GLX_ctx);
return NULL;
@@ -673,6 +735,7 @@ static EGLBoolean
GLX_eglMakeCurrent(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *dsurf,
_EGLSurface *rsurf, _EGLContext *ctx)
{
+ struct GLX_egl_driver *GLX_drv = GLX_egl_driver(drv);
struct GLX_egl_display *GLX_dpy = GLX_egl_display(disp);
struct GLX_egl_surface *GLX_dsurf = GLX_egl_surface(dsurf);
struct GLX_egl_surface *GLX_rsurf = GLX_egl_surface(rsurf);
@@ -683,8 +746,6 @@ GLX_eglMakeCurrent(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *dsurf,
GLXContext cctx;
EGLBoolean ret = EGL_FALSE;
- (void) drv;
-
/* make new bindings */
if (!_eglBindContext(ctx, dsurf, rsurf, &old_ctx, &old_dsurf, &old_rsurf))
return EGL_FALSE;
@@ -694,9 +755,9 @@ GLX_eglMakeCurrent(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *dsurf,
cctx = (GLX_ctx) ? GLX_ctx->context : NULL;
if (GLX_dpy->have_make_current_read)
- ret = glXMakeContextCurrent(GLX_dpy->dpy, ddraw, rdraw, cctx);
+ ret = GLX_drv->glXMakeContextCurrent(GLX_dpy->dpy, ddraw, rdraw, cctx);
else if (ddraw == rdraw)
- ret = glXMakeCurrent(GLX_dpy->dpy, ddraw, cctx);
+ ret = GLX_drv->glXMakeCurrent(GLX_dpy->dpy, ddraw, cctx);
if (ret) {
if (_eglPutSurface(old_dsurf))
@@ -747,12 +808,11 @@ GLX_eglCreateWindowSurface(_EGLDriver *drv, _EGLDisplay *disp,
_EGLConfig *conf, EGLNativeWindowType window,
const EGLint *attrib_list)
{
+ struct GLX_egl_driver *GLX_drv = GLX_egl_driver(drv);
struct GLX_egl_display *GLX_dpy = GLX_egl_display(disp);
struct GLX_egl_surface *GLX_surf;
uint width, height;
- (void) drv;
-
GLX_surf = CALLOC_STRUCT(GLX_egl_surface);
if (!GLX_surf) {
_eglError(EGL_BAD_ALLOC, "eglCreateWindowSurface");
@@ -767,13 +827,14 @@ GLX_eglCreateWindowSurface(_EGLDriver *drv, _EGLDisplay *disp,
GLX_surf->drawable = window;
- if (GLX_dpy->have_1_3 && !GLX_dpy->glx_window_quirk)
- GLX_surf->glx_drawable =
- glXCreateWindow(GLX_dpy->dpy,
- GLX_dpy->fbconfigs[GLX_egl_config_index(conf)],
- GLX_surf->drawable, NULL);
- else
+ if (GLX_dpy->have_1_3 && !GLX_dpy->glx_window_quirk) {
+ GLX_surf->glx_drawable = GLX_drv->glXCreateWindow(GLX_dpy->dpy,
+ GLX_dpy->fbconfigs[GLX_egl_config_index(conf)],
+ GLX_surf->drawable, NULL);
+ }
+ else {
GLX_surf->glx_drawable = GLX_surf->drawable;
+ }
if (!GLX_surf->glx_drawable) {
free(GLX_surf);
@@ -781,7 +842,7 @@ GLX_eglCreateWindowSurface(_EGLDriver *drv, _EGLDisplay *disp,
}
if (GLX_dpy->have_1_3 && !GLX_dpy->glx_window_quirk)
- GLX_surf->destroy = glXDestroyWindow;
+ GLX_surf->destroy = GLX_drv->glXDestroyWindow;
get_drawable_size(GLX_dpy->dpy, window, &width, &height);
GLX_surf->Base.Width = width;
@@ -795,12 +856,11 @@ GLX_eglCreatePixmapSurface(_EGLDriver *drv, _EGLDisplay *disp,
_EGLConfig *conf, EGLNativePixmapType pixmap,
const EGLint *attrib_list)
{
+ struct GLX_egl_driver *GLX_drv = GLX_egl_driver(drv);
struct GLX_egl_display *GLX_dpy = GLX_egl_display(disp);
struct GLX_egl_surface *GLX_surf;
uint width, height;
- (void) drv;
-
GLX_surf = CALLOC_STRUCT(GLX_egl_surface);
if (!GLX_surf) {
_eglError(EGL_BAD_ALLOC, "eglCreatePixmapSurface");
@@ -816,25 +876,25 @@ GLX_eglCreatePixmapSurface(_EGLDriver *drv, _EGLDisplay *disp,
GLX_surf->drawable = pixmap;
if (GLX_dpy->have_1_3) {
- GLX_surf->glx_drawable =
- glXCreatePixmap(GLX_dpy->dpy,
- GLX_dpy->fbconfigs[GLX_egl_config_index(conf)],
- GLX_surf->drawable, NULL);
+ GLX_surf->glx_drawable = GLX_drv->glXCreatePixmap(GLX_dpy->dpy,
+ GLX_dpy->fbconfigs[GLX_egl_config_index(conf)],
+ GLX_surf->drawable, NULL);
}
else if (GLX_dpy->have_fbconfig) {
GLXFBConfig fbconfig = GLX_dpy->fbconfigs[GLX_egl_config_index(conf)];
- XVisualInfo *vinfo = glXGetVisualFromFBConfig(GLX_dpy->dpy, fbconfig);
+ XVisualInfo *vinfo;
+
+ vinfo = GLX_drv->glXGetVisualFromFBConfig(GLX_dpy->dpy, fbconfig);
if (vinfo) {
- GLX_surf->glx_drawable =
- glXCreateGLXPixmap(GLX_dpy->dpy, vinfo, GLX_surf->drawable);
+ GLX_surf->glx_drawable = GLX_drv->glXCreateGLXPixmap(GLX_dpy->dpy,
+ vinfo, GLX_surf->drawable);
XFree(vinfo);
}
}
else {
- GLX_surf->glx_drawable =
- glXCreateGLXPixmap(GLX_dpy->dpy,
- &GLX_dpy->visuals[GLX_egl_config_index(conf)],
- GLX_surf->drawable);
+ GLX_surf->glx_drawable = GLX_drv->glXCreateGLXPixmap(GLX_dpy->dpy,
+ &GLX_dpy->visuals[GLX_egl_config_index(conf)],
+ GLX_surf->drawable);
}
if (!GLX_surf->glx_drawable) {
@@ -843,7 +903,7 @@ GLX_eglCreatePixmapSurface(_EGLDriver *drv, _EGLDisplay *disp,
}
GLX_surf->destroy = (GLX_dpy->have_1_3) ?
- glXDestroyPixmap : glXDestroyGLXPixmap;
+ GLX_drv->glXDestroyPixmap : GLX_drv->glXDestroyGLXPixmap;
get_drawable_size(GLX_dpy->dpy, pixmap, &width, &height);
GLX_surf->Base.Width = width;
@@ -856,13 +916,12 @@ static _EGLSurface *
GLX_eglCreatePbufferSurface(_EGLDriver *drv, _EGLDisplay *disp,
_EGLConfig *conf, const EGLint *attrib_list)
{
+ struct GLX_egl_driver *GLX_drv = GLX_egl_driver(drv);
struct GLX_egl_display *GLX_dpy = GLX_egl_display(disp);
struct GLX_egl_surface *GLX_surf;
int attribs[5];
int i;
- (void) drv;
-
GLX_surf = CALLOC_STRUCT(GLX_egl_surface);
if (!GLX_surf) {
_eglError(EGL_BAD_ALLOC, "eglCreatePbufferSurface");
@@ -892,14 +951,11 @@ GLX_eglCreatePbufferSurface(_EGLDriver *drv, _EGLDisplay *disp,
}
attribs[i] = None;
- GLX_surf->glx_drawable =
- glXCreatePbuffer(GLX_dpy->dpy,
- GLX_dpy->fbconfigs[GLX_egl_config_index(conf)],
- attribs);
+ GLX_surf->glx_drawable = GLX_drv->glXCreatePbuffer(GLX_dpy->dpy,
+ GLX_dpy->fbconfigs[GLX_egl_config_index(conf)], attribs);
}
else if (GLX_dpy->have_pbuffer) {
- GLX_surf->glx_drawable = GLX_dpy->glXCreateGLXPbufferSGIX(
- GLX_dpy->dpy,
+ GLX_surf->glx_drawable = GLX_drv->glXCreateGLXPbufferSGIX(GLX_dpy->dpy,
GLX_dpy->fbconfigs[GLX_egl_config_index(conf)],
GLX_surf->Base.Width,
GLX_surf->Base.Height,
@@ -912,7 +968,7 @@ GLX_eglCreatePbufferSurface(_EGLDriver *drv, _EGLDisplay *disp,
}
GLX_surf->destroy = (GLX_dpy->have_1_3) ?
- glXDestroyPbuffer : GLX_dpy->glXDestroyGLXPbufferSGIX;
+ GLX_drv->glXDestroyPbuffer : GLX_drv->glXDestroyGLXPbufferSGIX;
return &GLX_surf->Base;
}
@@ -933,12 +989,11 @@ GLX_eglDestroySurface(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *surf)
static EGLBoolean
GLX_eglSwapBuffers(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *draw)
{
+ struct GLX_egl_driver *GLX_drv = GLX_egl_driver(drv);
struct GLX_egl_display *GLX_dpy = GLX_egl_display(disp);
struct GLX_egl_surface *GLX_surf = GLX_egl_surface(draw);
- (void) drv;
-
- glXSwapBuffers(GLX_dpy->dpy, GLX_surf->glx_drawable);
+ GLX_drv->glXSwapBuffers(GLX_dpy->dpy, GLX_surf->glx_drawable);
return EGL_TRUE;
}
@@ -949,31 +1004,33 @@ GLX_eglSwapBuffers(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *draw)
static _EGLProc
GLX_eglGetProcAddress(_EGLDriver *drv, const char *procname)
{
- (void) drv;
+ struct GLX_egl_driver *GLX_drv = GLX_egl_driver(drv);
- return (_EGLProc) glXGetProcAddress((const GLubyte *) procname);
+ return (_EGLProc) GLX_drv->glXGetProcAddress((const GLubyte *) procname);
}
static EGLBoolean
GLX_eglWaitClient(_EGLDriver *drv, _EGLDisplay *dpy, _EGLContext *ctx)
{
- (void) drv;
+ struct GLX_egl_driver *GLX_drv = GLX_egl_driver(drv);
+
(void) dpy;
(void) ctx;
- glXWaitGL();
+ GLX_drv->glXWaitGL();
return EGL_TRUE;
}
static EGLBoolean
GLX_eglWaitNative(_EGLDriver *drv, _EGLDisplay *dpy, EGLint engine)
{
- (void) drv;
+ struct GLX_egl_driver *GLX_drv = GLX_egl_driver(drv);
+
(void) dpy;
if (engine != EGL_CORE_NATIVE_ENGINE)
return _eglError(EGL_BAD_PARAMETER, "eglWaitNative");
- glXWaitX();
+ GLX_drv->glXWaitX();
return EGL_TRUE;
}
@@ -981,16 +1038,90 @@ static void
GLX_Unload(_EGLDriver *drv)
{
struct GLX_egl_driver *GLX_drv = GLX_egl_driver(drv);
+
+ if (GLX_drv->handle)
+ dlclose(GLX_drv->handle);
free(GLX_drv);
}
+static EGLBoolean
+GLX_Load(_EGLDriver *drv)
+{
+ struct GLX_egl_driver *GLX_drv = GLX_egl_driver(drv);
+ void *handle;
+
+ handle = dlopen("libGL.so", RTLD_LAZY | RTLD_LOCAL);
+ if (!handle)
+ goto fail;
+
+ GLX_drv->glXGetProcAddress = dlsym(handle, "glXGetProcAddress");
+ if (!GLX_drv->glXGetProcAddress)
+ GLX_drv->glXGetProcAddress = dlsym(handle, "glXGetProcAddressARB");
+ if (!GLX_drv->glXGetProcAddress)
+ goto fail;
+
+#define GET_PROC(proc_type, proc_name, check) \
+ do { \
+ GLX_drv->proc_name = (proc_type) \
+ GLX_drv->glXGetProcAddress((const GLubyte *) #proc_name); \
+ if (check && !GLX_drv->proc_name) goto fail; \
+ } while (0)
+
+ /* GLX 1.0 */
+ GET_PROC(GLXCREATECONTEXTPROC, glXCreateContext, EGL_TRUE);
+ GET_PROC(GLXDESTROYCONTEXTPROC, glXDestroyContext, EGL_TRUE);
+ GET_PROC(GLXMAKECURRENTPROC, glXMakeCurrent, EGL_TRUE);
+ GET_PROC(GLXSWAPBUFFERSPROC, glXSwapBuffers, EGL_TRUE);
+ GET_PROC(GLXCREATEGLXPIXMAPPROC, glXCreateGLXPixmap, EGL_TRUE);
+ GET_PROC(GLXDESTROYGLXPIXMAPPROC, glXDestroyGLXPixmap, EGL_TRUE);
+ GET_PROC(GLXQUERYVERSIONPROC, glXQueryVersion, EGL_TRUE);
+ GET_PROC(GLXGETCONFIGPROC, glXGetConfig, EGL_TRUE);
+ GET_PROC(GLXWAITGLPROC, glXWaitGL, EGL_TRUE);
+ GET_PROC(GLXWAITXPROC, glXWaitX, EGL_TRUE);
+
+ /* GLX 1.1 */
+ GET_PROC(GLXQUERYEXTENSIONSSTRINGPROC, glXQueryExtensionsString, EGL_TRUE);
+ GET_PROC(GLXQUERYSERVERSTRINGPROC, glXQueryServerString, EGL_TRUE);
+ GET_PROC(GLXGETCLIENTSTRINGPROC, glXGetClientString, EGL_TRUE);
+
+ /* GLX 1.3 */
+ GET_PROC(PFNGLXGETFBCONFIGSPROC, glXGetFBConfigs, EGL_FALSE);
+ GET_PROC(PFNGLXGETFBCONFIGATTRIBPROC, glXGetFBConfigAttrib, EGL_FALSE);
+ GET_PROC(PFNGLXGETVISUALFROMFBCONFIGPROC, glXGetVisualFromFBConfig, EGL_FALSE);
+ GET_PROC(PFNGLXCREATEWINDOWPROC, glXCreateWindow, EGL_FALSE);
+ GET_PROC(PFNGLXDESTROYWINDOWPROC, glXDestroyWindow, EGL_FALSE);
+ GET_PROC(PFNGLXCREATEPIXMAPPROC, glXCreatePixmap, EGL_FALSE);
+ GET_PROC(PFNGLXDESTROYPIXMAPPROC, glXDestroyPixmap, EGL_FALSE);
+ GET_PROC(PFNGLXCREATEPBUFFERPROC, glXCreatePbuffer, EGL_FALSE);
+ GET_PROC(PFNGLXDESTROYPBUFFERPROC, glXDestroyPbuffer, EGL_FALSE);
+ GET_PROC(PFNGLXCREATENEWCONTEXTPROC, glXCreateNewContext, EGL_FALSE);
+ GET_PROC(PFNGLXMAKECONTEXTCURRENTPROC, glXMakeContextCurrent, EGL_FALSE);
+
+ /* GLX_SGIX_pbuffer */
+ GET_PROC(PFNGLXCREATEGLXPBUFFERSGIXPROC,
+ glXCreateGLXPbufferSGIX, EGL_FALSE);
+ GET_PROC(PFNGLXDESTROYGLXPBUFFERSGIXPROC,
+ glXDestroyGLXPbufferSGIX, EGL_FALSE);
+#undef GET_PROC
+
+ GLX_drv->handle = handle;
+
+ return EGL_TRUE;
+
+fail:
+ if (handle)
+ dlclose(handle);
+ return EGL_FALSE;
+}
+
+
/**
* This is the main entrypoint into the driver, called by libEGL.
* Create a new _EGLDriver object and init its dispatch table.
*/
_EGLDriver *
-_eglMain(const char *args)
+_EGL_MAIN(const char *args)
{
struct GLX_egl_driver *GLX_drv = CALLOC_STRUCT(GLX_egl_driver);
@@ -999,6 +1130,12 @@ _eglMain(const char *args)
if (!GLX_drv)
return NULL;
+ if (!GLX_Load(&GLX_drv->Base)) {
+ _eglLog(_EGL_WARNING, "GLX: failed to load GLX");
+ free(GLX_drv);
+ return NULL;
+ }
+
_eglInitDriverFallbacks(&GLX_drv->Base);
GLX_drv->Base.API.Initialize = GLX_eglInitialize;
GLX_drv->Base.API.Terminate = GLX_eglTerminate;
diff --git a/src/egl/main/Makefile b/src/egl/main/Makefile
index b4ca20c094a..820788d696b 100644
--- a/src/egl/main/Makefile
+++ b/src/egl/main/Makefile
@@ -52,12 +52,31 @@ OBJECTS = $(SOURCES:.c=.o)
# use dl*() to load drivers
LOCAL_CFLAGS = -D_EGL_OS_UNIX=1
+LOCAL_LIBS =
+
+# egl_dri2 and egl_glx are built-ins
+ifeq ($(filter dri2, $(EGL_DRIVERS_DIRS)),dri2)
+LOCAL_CFLAGS += -D_EGL_BUILT_IN_DRIVER_DRI2
+LOCAL_LIBS += $(TOP)/src/egl/drivers/dri2/libegl_dri2.a
+ifneq ($(findstring wayland, $(EGL_PLATFORMS)),)
+LOCAL_LIBS += $(TOP)/src/egl/wayland/wayland-drm/libwayland-drm.a
+endif
+EGL_LIB_DEPS += $(XCB_DRI2_LIBS) $(LIBUDEV_LIBS) $(DLOPEN_LIBS) $(LIBDRM_LIB) $(WAYLAND_LIBS)
+endif
+ifeq ($(filter glx, $(EGL_DRIVERS_DIRS)),glx)
+LOCAL_CFLAGS += -D_EGL_BUILT_IN_DRIVER_GLX
+LOCAL_LIBS += $(TOP)/src/egl/drivers/glx/libegl_glx.a
+EGL_LIB_DEPS += $(X11_LIBS) $(DLOPEN_LIBS)
+endif
# translate --with-egl-platforms to _EGLPlatformType
EGL_NATIVE_PLATFORM=_EGL_INVALID_PLATFORM
ifeq ($(firstword $(EGL_PLATFORMS)),x11)
EGL_NATIVE_PLATFORM=_EGL_PLATFORM_X11
endif
+ifeq ($(firstword $(EGL_PLATFORMS)),wayland)
+EGL_NATIVE_PLATFORM=_EGL_PLATFORM_WAYLAND
+endif
ifeq ($(firstword $(EGL_PLATFORMS)),drm)
EGL_NATIVE_PLATFORM=_EGL_PLATFORM_DRM
endif
@@ -80,11 +99,12 @@ default: depend library
# EGL Library
library: $(TOP)/$(LIB_DIR)/$(EGL_LIB_NAME)
-$(TOP)/$(LIB_DIR)/$(EGL_LIB_NAME): $(OBJECTS)
+$(TOP)/$(LIB_DIR)/$(EGL_LIB_NAME): $(OBJECTS) $(LOCAL_LIBS)
$(MKLIB) -o $(EGL_LIB) -linker '$(CC)' -ldflags '$(LDFLAGS)' \
-major $(EGL_MAJOR) -minor $(EGL_MINOR) \
-install $(TOP)/$(LIB_DIR) $(MKLIB_OPTIONS) \
- $(EGL_LIB_DEPS) $(OBJECTS)
+ -L$(TOP)/$(LIB_DIR) $(EGL_LIB_DEPS) \
+ $(OBJECTS) $(LOCAL_LIBS)
install-headers:
$(INSTALL) -d $(DESTDIR)$(INSTALL_INC_DIR)/KHR
diff --git a/src/egl/main/SConscript b/src/egl/main/SConscript
index f001b81600f..8c57ceaf20f 100644
--- a/src/egl/main/SConscript
+++ b/src/egl/main/SConscript
@@ -7,13 +7,23 @@ Import('*')
env = env.Clone()
env.Append(CPPDEFINES = [
- '_EGL_NATIVE_PLATFORM=_EGL_PLATFORM_WINDOWS',
+ '_EGL_BUILT_IN_DRIVER_GALLIUM',
'_EGL_DRIVER_SEARCH_DIR=\\"\\"',
- '_EGL_OS_WINDOWS',
- '_EGL_GET_CORE_ADDRESSES',
- 'KHRONOS_DLL_EXPORTS',
])
+if env['platform'] == 'windows':
+ env.Append(CPPDEFINES = [
+ '_EGL_NATIVE_PLATFORM=_EGL_PLATFORM_WINDOWS',
+ '_EGL_OS_WINDOWS',
+ '_EGL_GET_CORE_ADDRESSES',
+ 'KHRONOS_DLL_EXPORTS',
+ ])
+else:
+ env.Append(CPPDEFINES = [
+ '_EGL_NATIVE_PLATFORM=_EGL_PLATFORM_X11',
+ '_EGL_OS_UNIX',
+ ])
+
env.Append(CPPPATH = [
'#/include',
])
@@ -38,15 +48,9 @@ egl_sources = [
'eglsync.c',
]
-egl = env.SharedLibrary(
- target = 'libEGL',
- source = egl_sources + ['egl.def'],
+egl = env.ConvenienceLibrary(
+ target = 'egl',
+ source = egl_sources,
)
-installed_egl = env.InstallSharedLibrary(egl, version=(1, 4, 0))
-
-env.Alias('egl', installed_egl)
-
-egl = [env.FindIxes(egl, 'LIBPREFIX', 'LIBSUFFIX')]
-
Export('egl')
diff --git a/src/egl/main/eglapi.c b/src/egl/main/eglapi.c
index c339e6ebebd..90f622690c2 100644
--- a/src/egl/main/eglapi.c
+++ b/src/egl/main/eglapi.c
@@ -57,7 +57,6 @@
#include <stdlib.h>
#include <string.h>
-#include "eglstring.h"
#include "eglcontext.h"
#include "egldisplay.h"
#include "egltypedefs.h"
@@ -294,16 +293,14 @@ eglInitialize(EGLDisplay dpy, EGLint *major, EGLint *minor)
if (!_eglMatchDriver(disp, EGL_FALSE))
RETURN_EGL_ERROR(disp, EGL_NOT_INITIALIZED, EGL_FALSE);
- _eglsnprintf(disp->Version, sizeof(disp->Version), "%d.%d (%s)",
- disp->APImajor, disp->APIminor, disp->Driver->Name);
/* limit to APIs supported by core */
- disp->ClientAPIsMask &= _EGL_API_ALL_BITS;
+ disp->ClientAPIs &= _EGL_API_ALL_BITS;
}
/* Update applications version of major and minor if not NULL */
if ((major != NULL) && (minor != NULL)) {
- *major = disp->APImajor;
- *minor = disp->APIminor;
+ *major = disp->VersionMajor;
+ *minor = disp->VersionMinor;
}
RETURN_EGL_SUCCESS(disp, EGL_TRUE);
@@ -917,12 +914,13 @@ eglGetProcAddress(const char *procname)
{ "eglCreateDRMImageMESA", (_EGLProc) eglCreateDRMImageMESA },
{ "eglExportDRMImageMESA", (_EGLProc) eglExportDRMImageMESA },
#endif
+#ifdef EGL_WL_bind_display
+ { "eglBindWaylandDisplayWL", (_EGLProc) eglBindWaylandDisplayWL },
+ { "eglUnbindWaylandDisplayWL", (_EGLProc) eglUnbindWaylandDisplayWL },
+#endif
#ifdef EGL_ANDROID_swap_rectangle
{ "eglSetSwapRectangleANDROID", (_EGLProc) eglSetSwapRectangleANDROID },
#endif
-#ifdef EGL_ANDROID_get_render_buffer
- { "eglGetRenderBufferANDROID", (_EGLProc) eglGetRenderBufferANDROID },
-#endif
{ NULL, NULL }
};
EGLint i;
@@ -1501,48 +1499,64 @@ eglExportDRMImageMESA(EGLDisplay dpy, EGLImageKHR image,
#endif
-#ifdef EGL_ANDROID_swap_rectangle
+#ifdef EGL_WL_bind_wayland_display
+struct wl_display;
EGLBoolean EGLAPIENTRY
-eglSetSwapRectangleANDROID(EGLDisplay dpy, EGLSurface draw,
- EGLint left, EGLint top,
- EGLint width, EGLint height)
+eglBindWaylandDisplayWL(EGLDisplay dpy, struct wl_display *display)
{
_EGLDisplay *disp = _eglLockDisplay(dpy);
- _EGLSurface *surf = _eglLookupSurface(draw, disp);
_EGLDriver *drv;
EGLBoolean ret;
- _EGL_CHECK_SURFACE(disp, surf, EGL_FALSE, drv);
+ _EGL_CHECK_DISPLAY(disp, EGL_FALSE, drv);
+ assert(disp->Extensions.WL_bind_wayland_display);
- if (!disp->Extensions.ANDROID_swap_rectangle)
- RETURN_EGL_EVAL(disp, EGL_FALSE);
+ if (!display)
+ RETURN_EGL_ERROR(disp, EGL_BAD_PARAMETER, EGL_FALSE);
- ret = drv->API.SetSwapRectangleANDROID(drv, disp, surf, left, top, width, height);
+ ret = drv->API.BindWaylandDisplayWL(drv, disp, display);
RETURN_EGL_EVAL(disp, ret);
}
-#endif
+EGLBoolean EGLAPIENTRY
+eglUnbindWaylandDisplayWL(EGLDisplay dpy, struct wl_display *display)
+{
+ _EGLDisplay *disp = _eglLockDisplay(dpy);
+ _EGLDriver *drv;
+ EGLBoolean ret;
-#ifdef EGL_ANDROID_get_render_buffer
+ _EGL_CHECK_DISPLAY(disp, EGL_FALSE, drv);
+ assert(disp->Extensions.WL_bind_wayland_display);
+
+ if (!display)
+ RETURN_EGL_ERROR(disp, EGL_BAD_PARAMETER, EGL_FALSE);
+
+ ret = drv->API.UnbindWaylandDisplayWL(drv, disp, display);
+
+ RETURN_EGL_EVAL(disp, ret);
+}
+#endif
-EGLClientBuffer EGLAPIENTRY
-eglGetRenderBufferANDROID(EGLDisplay dpy, EGLSurface draw)
+#ifdef EGL_ANDROID_swap_rectangle
+EGLBoolean EGLAPIENTRY
+eglSetSwapRectangleANDROID(EGLDisplay dpy, EGLSurface draw,
+ EGLint left, EGLint top,
+ EGLint width, EGLint height)
{
_EGLDisplay *disp = _eglLockDisplay(dpy);
_EGLSurface *surf = _eglLookupSurface(draw, disp);
_EGLDriver *drv;
- EGLClientBuffer ret;
+ EGLBoolean ret;
- _EGL_CHECK_SURFACE(disp, surf, NULL, drv);
+ _EGL_CHECK_SURFACE(disp, surf, EGL_FALSE, drv);
- if (!disp->Extensions.ANDROID_get_render_buffer)
- RETURN_EGL_EVAL(disp, NULL);
+ if (!disp->Extensions.ANDROID_swap_rectangle)
+ RETURN_EGL_EVAL(disp, EGL_FALSE);
- ret = drv->API.GetRenderBufferANDROID(drv, disp, surf);
+ ret = drv->API.SetSwapRectangleANDROID(drv, disp, surf, left, top, width, height);
RETURN_EGL_EVAL(disp, ret);
}
-
#endif
diff --git a/src/egl/main/eglapi.h b/src/egl/main/eglapi.h
index 96db72c70f5..cb83bc03d1d 100644
--- a/src/egl/main/eglapi.h
+++ b/src/egl/main/eglapi.h
@@ -12,7 +12,7 @@ typedef void (*_EGLProc)(void);
*/
/* driver funcs */
-typedef EGLBoolean (*Initialize_t)(_EGLDriver *, _EGLDisplay *dpy, EGLint *major, EGLint *minor);
+typedef EGLBoolean (*Initialize_t)(_EGLDriver *, _EGLDisplay *dpy);
typedef EGLBoolean (*Terminate_t)(_EGLDriver *, _EGLDisplay *dpy);
/* config funcs */
@@ -95,12 +95,14 @@ typedef _EGLImage *(*CreateDRMImageMESA_t)(_EGLDriver *drv, _EGLDisplay *disp, c
typedef EGLBoolean (*ExportDRMImageMESA_t)(_EGLDriver *drv, _EGLDisplay *disp, _EGLImage *img, EGLint *name, EGLint *handle, EGLint *stride);
#endif
-#ifdef EGL_ANDROID_swap_rectangle
-typedef EGLBoolean (*SetSwapRectangleANDROID_t)(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *draw, EGLint left, EGLint top, EGLint width, EGLint height);
+#ifdef EGL_WL_bind_wayland_display
+struct wl_display;
+typedef EGLBoolean (*BindWaylandDisplayWL_t)(_EGLDriver *drv, _EGLDisplay *disp, struct wl_display *display);
+typedef EGLBoolean (*UnbindWaylandDisplayWL_t)(_EGLDriver *drv, _EGLDisplay *disp, struct wl_display *display);
#endif
-#ifdef EGL_ANDROID_get_render_buffer
-typedef EGLClientBuffer (*GetRenderBufferANDROID_t)(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *draw);
+#ifdef EGL_ANDROID_swap_rectangle
+typedef EGLBoolean (*SetSwapRectangleANDROID_t)(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *draw, EGLint left, EGLint top, EGLint width, EGLint height);
#endif
/**
@@ -178,12 +180,14 @@ struct _egl_api
ExportDRMImageMESA_t ExportDRMImageMESA;
#endif
+#ifdef EGL_WL_bind_wayland_display
+ BindWaylandDisplayWL_t BindWaylandDisplayWL;
+ UnbindWaylandDisplayWL_t UnbindWaylandDisplayWL;
+#endif
+
#ifdef EGL_ANDROID_swap_rectangle
SetSwapRectangleANDROID_t SetSwapRectangleANDROID;
#endif
-#ifdef EGL_ANDROID_get_render_buffer
- GetRenderBufferANDROID_t GetRenderBufferANDROID;
-#endif
};
#endif /* EGLAPI_INCLUDED */
diff --git a/src/egl/main/eglcurrent.c b/src/egl/main/eglcurrent.c
index cbca9ff2c2f..4221a9be3e1 100644
--- a/src/egl/main/eglcurrent.c
+++ b/src/egl/main/eglcurrent.c
@@ -286,6 +286,9 @@ _eglError(EGLint errCode, const char *msg)
case EGL_BAD_SURFACE:
s = "EGL_BAD_SURFACE";
break;
+ case EGL_NOT_INITIALIZED:
+ s = "EGL_NOT_INITIALIZED";
+ break;
#ifdef EGL_MESA_screen_surface
case EGL_BAD_SCREEN_MESA:
s = "EGL_BAD_SCREEN_MESA";
@@ -295,7 +298,7 @@ _eglError(EGLint errCode, const char *msg)
break;
#endif
default:
- s = "other";
+ s = "other EGL error";
}
_eglLog(_EGL_DEBUG, "EGL user error 0x%x (%s) in %s\n", errCode, s, msg);
}
diff --git a/src/egl/main/egldisplay.c b/src/egl/main/egldisplay.c
index cabf1d40fee..bc4afd183f6 100644
--- a/src/egl/main/egldisplay.c
+++ b/src/egl/main/egldisplay.c
@@ -27,6 +27,7 @@ _eglGetNativePlatformFromEnv(void)
} egl_platforms[_EGL_NUM_PLATFORMS] = {
{ _EGL_PLATFORM_WINDOWS, "gdi" },
{ _EGL_PLATFORM_X11, "x11" },
+ { _EGL_PLATFORM_WAYLAND, "wayland" },
{ _EGL_PLATFORM_DRM, "drm" },
{ _EGL_PLATFORM_FBDEV, "fbdev" },
{ _EGL_PLATFORM_ANDROID, "android" }
diff --git a/src/egl/main/egldisplay.h b/src/egl/main/egldisplay.h
index b409ade827e..8bbb9e9e43a 100644
--- a/src/egl/main/egldisplay.h
+++ b/src/egl/main/egldisplay.h
@@ -11,6 +11,7 @@
enum _egl_platform_type {
_EGL_PLATFORM_WINDOWS,
_EGL_PLATFORM_X11,
+ _EGL_PLATFORM_WAYLAND,
_EGL_PLATFORM_DRM,
_EGL_PLATFORM_FBDEV,
_EGL_PLATFORM_ANDROID,
@@ -58,6 +59,8 @@ struct _egl_extensions
EGLBoolean MESA_drm_display;
EGLBoolean MESA_drm_image;
+ EGLBoolean WL_bind_wayland_display;
+
EGLBoolean KHR_image_base;
EGLBoolean KHR_image_pixmap;
EGLBoolean KHR_vg_parent_image;
@@ -78,9 +81,6 @@ struct _egl_extensions
EGLBoolean ANDROID_image_native_buffer;
EGLBoolean ANDROID_swap_rectangle;
- EGLBoolean ANDROID_get_render_buffer;
-
- char String[_EGL_MAX_EXTENSIONS_LEN];
};
@@ -91,21 +91,29 @@ struct _egl_display
_EGLMutex Mutex;
- _EGLPlatformType Platform;
- void *PlatformDisplay;
-
- EGLBoolean Initialized; /**< True if the display is initialized */
- _EGLDriver *Driver;
- void *DriverData; /* private to driver */
-
- int APImajor, APIminor; /**< as returned by eglInitialize() */
- char Version[1000]; /**< initialized from APImajor/minor, DriverName */
-
- /** Bitmask of supported APIs (EGL_xx_BIT) set by the driver during init */
- EGLint ClientAPIsMask;
- char ClientAPIs[1000]; /**< updated by eglQueryString */
-
- _EGLExtensions Extensions;
+ _EGLPlatformType Platform; /**< The type of the platform display */
+ void *PlatformDisplay; /**< A pointer to the platform display */
+
+ _EGLDriver *Driver; /**< Matched driver of the display */
+ EGLBoolean Initialized; /**< True if the display is initialized */
+
+ /* options that affect how the driver initializes the display */
+ struct {
+ EGLBoolean TestOnly; /**< Driver should not set fields when true */
+ EGLBoolean UseFallback; /**< Use fallback driver (sw or less features) */
+ } Options;
+
+ /* these fields are set by the driver during init */
+ void *DriverData; /**< Driver private data */
+ EGLint VersionMajor; /**< EGL major version */
+ EGLint VersionMinor; /**< EGL minor version */
+ EGLint ClientAPIs; /**< Bitmask of APIs supported (EGL_xxx_BIT) */
+ _EGLExtensions Extensions; /**< Extensions supported */
+
+ /* these fields are derived from above */
+ char VersionString[1000]; /**< EGL_VERSION */
+ char ClientAPIsString[1000]; /**< EGL_CLIENT_APIS */
+ char ExtensionsString[_EGL_MAX_EXTENSIONS_LEN]; /**< EGL_EXTENSIONS */
_EGLArray *Screens;
_EGLArray *Configs;
diff --git a/src/egl/main/egldriver.c b/src/egl/main/egldriver.c
index 7790436489e..5667f48764e 100644
--- a/src/egl/main/egldriver.c
+++ b/src/egl/main/egldriver.c
@@ -25,6 +25,7 @@
typedef struct _egl_module {
char *Path;
+ _EGLMain_t BuiltIn;
void *Handle;
_EGLDriver *Driver;
} _EGLModule;
@@ -32,6 +33,24 @@ typedef struct _egl_module {
static _EGL_DECLARE_MUTEX(_eglModuleMutex);
static _EGLArray *_eglModules;
+const struct {
+ const char *name;
+ _EGLMain_t main;
+} _eglBuiltInDrivers[] = {
+#ifdef _EGL_BUILT_IN_DRIVER_GALLIUM
+ { "egl_gallium", _eglBuiltInDriverGALLIUM },
+#endif
+#ifdef _EGL_BUILT_IN_DRIVER_ANDROID
+ { "egl_android", _eglBuiltInDriverANDROID },
+#endif
+#ifdef _EGL_BUILT_IN_DRIVER_DRI2
+ { "egl_dri2", _eglBuiltInDriverDRI2 },
+#endif
+#ifdef _EGL_BUILT_IN_DRIVER_GLX
+ { "egl_glx", _eglBuiltInDriverGLX },
+#endif
+ { NULL, NULL }
+};
/**
* Wrappers for dlopen/dlclose()
@@ -86,30 +105,6 @@ library_suffix(void)
}
-#else /* _EGL_PLATFORM_NO_OS */
-
-
-typedef void *lib_handle;
-
-static INLINE void *
-open_library(const char *filename)
-{
- return (void *) filename;
-}
-
-static INLINE void
-close_library(void *lib)
-{
-}
-
-
-static const char *
-library_suffix(void)
-{
- return NULL;
-}
-
-
#endif
@@ -147,16 +142,11 @@ _eglOpenLibrary(const char *driverPath, lib_handle *handle)
else {
error = dlerror();
}
-#else /* _EGL_PLATFORM_NO_OS */
- mainFunc = (_EGLMain_t) _eglMain;
#endif
if (!lib) {
_eglLog(_EGL_WARNING, "Could not open driver %s (%s)",
driverPath, error);
- if (!getenv("EGL_DRIVER"))
- _eglLog(_EGL_WARNING,
- "The driver can be overridden by setting EGL_DRIVER");
return NULL;
}
@@ -183,9 +173,18 @@ _eglLoadModule(_EGLModule *mod)
lib_handle lib;
_EGLDriver *drv;
- mainFunc = _eglOpenLibrary(mod->Path, &lib);
- if (!mainFunc)
- return EGL_FALSE;
+ if (mod->Driver)
+ return EGL_TRUE;
+
+ if (mod->BuiltIn) {
+ lib = (lib_handle) NULL;
+ mainFunc = mod->BuiltIn;
+ }
+ else {
+ mainFunc = _eglOpenLibrary(mod->Path, &lib);
+ if (!mainFunc)
+ return EGL_FALSE;
+ }
drv = mainFunc(NULL);
if (!drv) {
@@ -212,11 +211,22 @@ _eglLoadModule(_EGLModule *mod)
static void
_eglUnloadModule(_EGLModule *mod)
{
+#if defined(_EGL_OS_UNIX)
/* destroy the driver */
if (mod->Driver && mod->Driver->Unload)
mod->Driver->Unload(mod->Driver);
+
+ /*
+ * XXX At this point (atexit), the module might be the last reference to
+ * libEGL. Closing the module might unmap libEGL and give problems.
+ */
+#if 0
if (mod->Handle)
close_library(mod->Handle);
+#endif
+#elif defined(_EGL_OS_WINDOWS)
+ /* XXX Windows unloads DLLs before atexit */
+#endif
mod->Driver = NULL;
mod->Handle = NULL;
@@ -328,68 +338,6 @@ _eglLoaderFile(const char *dir, size_t len, void *loader_data)
/**
- * A loader function for use with _eglPreloadForEach. The loader data is the
- * pattern (prefix) of the files to look for.
- */
-static EGLBoolean
-_eglLoaderPattern(const char *dir, size_t len, void *loader_data)
-{
-#if defined(_EGL_OS_UNIX)
- const char *prefix, *suffix;
- size_t prefix_len, suffix_len;
- DIR *dirp;
- struct dirent *dirent;
- char path[1024];
-
- if (len + 2 > sizeof(path))
- return EGL_TRUE;
- if (len) {
- memcpy(path, dir, len);
- path[len++] = '/';
- }
- path[len] = '\0';
-
- dirp = opendir(path);
- if (!dirp)
- return EGL_TRUE;
-
- prefix = (const char *) loader_data;
- prefix_len = strlen(prefix);
- suffix = library_suffix();
- suffix_len = (suffix) ? strlen(suffix) : 0;
-
- while ((dirent = readdir(dirp))) {
- size_t dirent_len = strlen(dirent->d_name);
- const char *p;
-
- /* match the prefix */
- if (strncmp(dirent->d_name, prefix, prefix_len) != 0)
- continue;
- /* match the suffix */
- if (suffix) {
- p = dirent->d_name + dirent_len - suffix_len;
- if (p < dirent->d_name || strcmp(p, suffix) != 0)
- continue;
- }
-
- /* make a full path and add it to the module array */
- if (len + dirent_len + 1 <= sizeof(path)) {
- strcpy(path + len, dirent->d_name);
- _eglAddModule(path);
- }
- }
-
- closedir(dirp);
-
- return EGL_TRUE;
-#else /* _EGL_OS_UNIX */
- /* stop immediately */
- return EGL_FALSE;
-#endif
-}
-
-
-/**
* Run the callback function on each driver directory.
*
* The process may end prematurely if the callback function returns false.
@@ -487,11 +435,12 @@ _eglGetSearchPath(void)
*
* The user driver is specified by EGL_DRIVER.
*/
-static void
+static EGLBoolean
_eglAddUserDriver(void)
{
const char *search_path = _eglGetSearchPath();
char *env;
+ size_t name_len = 0;
env = getenv("EGL_DRIVER");
#if defined(_EGL_OS_UNIX)
@@ -503,39 +452,73 @@ _eglAddUserDriver(void)
env = NULL;
}
}
-#endif /* _EGL_OS_UNIX */
+ else if (env) {
+ char *suffix = strchr(env, '.');
+ name_len = (suffix) ? suffix - env : strlen(env);
+ }
+#else
if (env)
+ name_len = strlen(env);
+#endif /* _EGL_OS_UNIX */
+
+ /*
+ * Try built-in drivers first if we know the driver name. This makes sure
+ * we do not load the outdated external driver that is still on the
+ * filesystem.
+ */
+ if (name_len) {
+ _EGLModule *mod;
+ EGLint i;
+
+ for (i = 0; _eglBuiltInDrivers[i].name; i++) {
+ if (strlen(_eglBuiltInDrivers[i].name) == name_len &&
+ !strncmp(_eglBuiltInDrivers[i].name, env, name_len)) {
+ mod = _eglAddModule(env);
+ if (mod)
+ mod->BuiltIn = _eglBuiltInDrivers[i].main;
+
+ return EGL_TRUE;
+ }
+ }
+ }
+
+ /* otherwise, treat env as a path */
+ if (env) {
_eglPreloadForEach(search_path, _eglLoaderFile, (void *) env);
+
+ return EGL_TRUE;
+ }
+
+ return EGL_FALSE;
}
/**
- * Add default drivers to the module array.
+ * Add egl_gallium to the module array.
*/
static void
-_eglAddDefaultDrivers(void)
+_eglAddGalliumDriver(void)
{
- const char *search_path = _eglGetSearchPath();
- EGLint i;
-#if defined(_EGL_OS_WINDOWS)
- const char *DefaultDriverNames[] = {
- "egl_gallium"
- };
-#elif defined(_EGL_OS_UNIX)
- const char *DefaultDriverNames[] = {
- "egl_gallium",
- "egl_dri2",
- "egl_glx"
- };
-#else /* _EGL_PLATFORM_NO_OS */
- const char *DefaultDriverNames[] = {
- "<builtin>"
- };
+#ifndef _EGL_BUILT_IN_DRIVER_GALLIUM
+ void *external = (void *) "egl_gallium";
+ _eglPreloadForEach(_eglGetSearchPath(), _eglLoaderFile, external);
#endif
+}
+
- for (i = 0; i < ARRAY_SIZE(DefaultDriverNames); i++) {
- void *name = (void *) DefaultDriverNames[i];
- _eglPreloadForEach(search_path, _eglLoaderFile, name);
+/**
+ * Add built-in drivers to the module array.
+ */
+static void
+_eglAddBuiltInDrivers(void)
+{
+ _EGLModule *mod;
+ EGLint i;
+
+ for (i = 0; _eglBuiltInDrivers[i].name; i++) {
+ mod = _eglAddModule(_eglBuiltInDrivers[i].name);
+ if (mod)
+ mod->BuiltIn = _eglBuiltInDrivers[i].main;
}
}
@@ -550,113 +533,96 @@ _eglAddDrivers(void)
if (_eglModules)
return EGL_TRUE;
- /* the order here decides the priorities of the drivers */
- _eglAddUserDriver();
- _eglAddDefaultDrivers();
- _eglPreloadForEach(_eglGetSearchPath(), _eglLoaderPattern, (void *) "egl_");
+ if (!_eglAddUserDriver()) {
+ /*
+ * Add other drivers only when EGL_DRIVER is not set. The order here
+ * decides the priorities.
+ */
+ _eglAddGalliumDriver();
+ _eglAddBuiltInDrivers();
+ }
return (_eglModules != NULL);
}
/**
- * Match a display to a driver. The display is initialized unless use_probe is
- * true.
- *
- * The matching is done by finding the first driver that can initialize the
- * display, or when use_probe is true, the driver with highest score.
+ * A helper function for _eglMatchDriver. It finds the first driver that can
+ * initialize the display and return.
*/
-_EGLDriver *
-_eglMatchDriver(_EGLDisplay *dpy, EGLBoolean use_probe)
+static _EGLDriver *
+_eglMatchAndInitialize(_EGLDisplay *dpy)
{
- _EGLModule *mod;
- _EGLDriver *best_drv = NULL;
- EGLint best_score = 0;
- EGLint major, minor, i;
-
- _eglLockMutex(&_eglModuleMutex);
+ _EGLDriver *drv = NULL;
+ EGLint i = 0;
if (!_eglAddDrivers()) {
- _eglUnlockMutex(&_eglModuleMutex);
- return EGL_FALSE;
+ _eglLog(_EGL_WARNING, "failed to find any driver");
+ return NULL;
}
- /* match the loaded modules */
- for (i = 0; i < _eglModules->Size; i++) {
- mod = (_EGLModule *) _eglModules->Elements[i];
- if (!mod->Driver)
- break;
+ if (dpy->Driver) {
+ drv = dpy->Driver;
+ /* no re-matching? */
+ if (!drv->API.Initialize(drv, dpy))
+ drv = NULL;
+ return drv;
+ }
- if (use_probe) {
- EGLint score = (mod->Driver->Probe) ?
- mod->Driver->Probe(mod->Driver, dpy) : 1;
- if (score > best_score) {
- best_drv = mod->Driver;
- best_score = score;
- }
+ while (i < _eglModules->Size) {
+ _EGLModule *mod = (_EGLModule *) _eglModules->Elements[i];
+
+ if (!_eglLoadModule(mod)) {
+ /* remove invalid modules */
+ _eglEraseArray(_eglModules, i, _eglFreeModule);
+ continue;
+ }
+
+ if (mod->Driver->API.Initialize(mod->Driver, dpy)) {
+ drv = mod->Driver;
+ break;
}
else {
- if (mod->Driver->API.Initialize(mod->Driver, dpy, &major, &minor)) {
- best_drv = mod->Driver;
- best_score = 100;
- }
+ i++;
}
- /* perfect match */
- if (best_score >= 100)
- break;
}
- /* load more modules */
- if (!best_drv) {
- EGLint first_unloaded = i;
+ return drv;
+}
- while (i < _eglModules->Size) {
- mod = (_EGLModule *) _eglModules->Elements[i];
- assert(!mod->Driver);
- if (!_eglLoadModule(mod)) {
- /* remove invalid modules */
- _eglEraseArray(_eglModules, i, _eglFreeModule);
- continue;
- }
+/**
+ * Match a display to a driver. The display is initialized unless test_only is
+ * true. The matching is done by finding the first driver that can initialize
+ * the display.
+ */
+_EGLDriver *
+_eglMatchDriver(_EGLDisplay *dpy, EGLBoolean test_only)
+{
+ _EGLDriver *best_drv;
- if (use_probe) {
- best_score = (mod->Driver->Probe) ?
- mod->Driver->Probe(mod->Driver, dpy) : 1;
- }
- else {
- if (mod->Driver->API.Initialize(mod->Driver, dpy, &major, &minor))
- best_score = 100;
- }
+ assert(!dpy->Initialized);
- if (best_score > 0) {
- best_drv = mod->Driver;
- /* loaded modules come before unloaded ones */
- if (first_unloaded != i) {
- void *tmp = _eglModules->Elements[i];
- _eglModules->Elements[i] =
- _eglModules->Elements[first_unloaded];
- _eglModules->Elements[first_unloaded] = tmp;
- }
- break;
- }
- else {
- _eglUnloadModule(mod);
- i++;
- }
- }
+ _eglLockMutex(&_eglModuleMutex);
+
+ /* set options */
+ dpy->Options.TestOnly = test_only;
+ dpy->Options.UseFallback = EGL_FALSE;
+
+ best_drv = _eglMatchAndInitialize(dpy);
+ if (!best_drv) {
+ dpy->Options.UseFallback = EGL_TRUE;
+ best_drv = _eglMatchAndInitialize(dpy);
}
_eglUnlockMutex(&_eglModuleMutex);
if (best_drv) {
- _eglLog(_EGL_DEBUG, "the best driver is %s (score %d)",
- best_drv->Name, best_score);
- if (!use_probe) {
+ _eglLog(_EGL_DEBUG, "the best driver is %s%s",
+ best_drv->Name, (test_only) ? " (test only) " : "");
+ if (!test_only) {
dpy->Driver = best_drv;
dpy->Initialized = EGL_TRUE;
- dpy->APImajor = major;
- dpy->APIminor = minor;
}
}
@@ -700,12 +666,7 @@ _eglUnloadDrivers(void)
{
/* this is called at atexit time */
if (_eglModules) {
-#if defined(_EGL_OS_UNIX)
_eglDestroyArray(_eglModules, _eglFreeModule);
-#elif defined(_EGL_OS_WINDOWS)
- /* XXX Windows unloads DLLs before atexit */
- _eglDestroyArray(_eglModules, NULL);
-#endif
_eglModules = NULL;
}
}
diff --git a/src/egl/main/egldriver.h b/src/egl/main/egldriver.h
index 1a0aaad1f8c..7db2fcbc4cb 100644
--- a/src/egl/main/egldriver.h
+++ b/src/egl/main/egldriver.h
@@ -44,16 +44,6 @@ struct _egl_driver
const char *Name; /**< name of this driver */
/**
- * Probe a display and return a score.
- *
- * Roughly,
- * 50 means the driver supports the display;
- * 90 means the driver can accelerate the display;
- * 100 means a perfect match.
- */
- EGLint (*Probe)(_EGLDriver *drv, _EGLDisplay *dpy);
-
- /**
* Release the driver resource.
*
* It is called before dlclose().
@@ -64,12 +54,28 @@ struct _egl_driver
};
+extern _EGLDriver *
+_eglBuiltInDriverGALLIUM(const char *args);
+
+
+extern _EGLDriver *
+_eglBuiltInDriverANDROID(const char *args);
+
+
+extern _EGLDriver *
+_eglBuiltInDriverDRI2(const char *args);
+
+
+extern _EGLDriver *
+_eglBuiltInDriverGLX(const char *args);
+
+
PUBLIC _EGLDriver *
_eglMain(const char *args);
extern _EGLDriver *
-_eglMatchDriver(_EGLDisplay *dpy, EGLBoolean probe_only);
+_eglMatchDriver(_EGLDisplay *dpy, EGLBoolean test_only);
extern __eglMustCastToProperFunctionPointerType
diff --git a/src/egl/main/eglmisc.c b/src/egl/main/eglmisc.c
index de20d249c3a..32f0c039e82 100644
--- a/src/egl/main/eglmisc.c
+++ b/src/egl/main/eglmisc.c
@@ -36,6 +36,8 @@
#include "eglcurrent.h"
#include "eglmisc.h"
#include "egldisplay.h"
+#include "egldriver.h"
+#include "eglstring.h"
/**
@@ -73,11 +75,11 @@ _eglUpdateExtensionsString(_EGLDisplay *dpy)
do { \
if (dpy->Extensions.ext) { \
_eglAppendExtension(&exts, "EGL_" #ext); \
- assert(exts <= dpy->Extensions.String + _EGL_MAX_EXTENSIONS_LEN); \
+ assert(exts <= dpy->ExtensionsString + _EGL_MAX_EXTENSIONS_LEN); \
} \
} while (0)
- char *exts = dpy->Extensions.String;
+ char *exts = dpy->ExtensionsString;
if (exts[0])
return;
@@ -87,6 +89,8 @@ _eglUpdateExtensionsString(_EGLDisplay *dpy)
_EGL_CHECK_EXTENSION(MESA_drm_display);
_EGL_CHECK_EXTENSION(MESA_drm_image);
+ _EGL_CHECK_EXTENSION(WL_bind_wayland_display);
+
_EGL_CHECK_EXTENSION(KHR_image_base);
_EGL_CHECK_EXTENSION(KHR_image_pixmap);
if (dpy->Extensions.KHR_image_base && dpy->Extensions.KHR_image_pixmap)
@@ -110,7 +114,6 @@ _eglUpdateExtensionsString(_EGLDisplay *dpy)
_EGL_CHECK_EXTENSION(ANDROID_image_native_buffer);
_EGL_CHECK_EXTENSION(ANDROID_swap_rectangle);
- _EGL_CHECK_EXTENSION(ANDROID_get_render_buffer);
#undef _EGL_CHECK_EXTENSION
}
@@ -118,24 +121,24 @@ _eglUpdateExtensionsString(_EGLDisplay *dpy)
static void
_eglUpdateAPIsString(_EGLDisplay *dpy)
{
- char *apis = dpy->ClientAPIs;
+ char *apis = dpy->ClientAPIsString;
- if (apis[0] || !dpy->ClientAPIsMask)
+ if (apis[0] || !dpy->ClientAPIs)
return;
- if (dpy->ClientAPIsMask & EGL_OPENGL_BIT)
+ if (dpy->ClientAPIs & EGL_OPENGL_BIT)
strcat(apis, "OpenGL ");
- if (dpy->ClientAPIsMask & EGL_OPENGL_ES_BIT)
+ if (dpy->ClientAPIs & EGL_OPENGL_ES_BIT)
strcat(apis, "OpenGL_ES ");
- if (dpy->ClientAPIsMask & EGL_OPENGL_ES2_BIT)
+ if (dpy->ClientAPIs & EGL_OPENGL_ES2_BIT)
strcat(apis, "OpenGL_ES2 ");
- if (dpy->ClientAPIsMask & EGL_OPENVG_BIT)
+ if (dpy->ClientAPIs & EGL_OPENVG_BIT)
strcat(apis, "OpenVG ");
- assert(strlen(apis) < sizeof(dpy->ClientAPIs));
+ assert(strlen(apis) < sizeof(dpy->ClientAPIsString));
}
@@ -143,20 +146,21 @@ const char *
_eglQueryString(_EGLDriver *drv, _EGLDisplay *dpy, EGLint name)
{
(void) drv;
- (void) dpy;
+
switch (name) {
case EGL_VENDOR:
return _EGL_VENDOR_STRING;
case EGL_VERSION:
- return dpy->Version;
+ _eglsnprintf(dpy->VersionString, sizeof(dpy->VersionString),
+ "%d.%d (%s)", dpy->VersionMajor, dpy->VersionMinor,
+ dpy->Driver->Name);
+ return dpy->VersionString;
case EGL_EXTENSIONS:
_eglUpdateExtensionsString(dpy);
- return dpy->Extensions.String;
-#ifdef EGL_VERSION_1_2
+ return dpy->ExtensionsString;
case EGL_CLIENT_APIS:
_eglUpdateAPIsString(dpy);
- return dpy->ClientAPIs;
-#endif
+ return dpy->ClientAPIsString;
default:
_eglError(EGL_BAD_PARAMETER, "eglQueryString");
return NULL;
diff --git a/src/egl/main/eglstring.h b/src/egl/main/eglstring.h
index f1d559b24a2..d4c89541362 100644
--- a/src/egl/main/eglstring.h
+++ b/src/egl/main/eglstring.h
@@ -2,6 +2,7 @@
#define EGLSTRING_INCLUDED
#include <string.h>
+#include <stdio.h>
#ifdef _EGL_OS_WINDOWS
#define _eglstrcasecmp _stricmp
diff --git a/src/egl/wayland/Makefile b/src/egl/wayland/Makefile
new file mode 100644
index 00000000000..c38a1302f18
--- /dev/null
+++ b/src/egl/wayland/Makefile
@@ -0,0 +1,30 @@
+# src/egl/wayland/Makefile
+
+TOP = ../../..
+include $(TOP)/configs/current
+
+SUBDIRS = wayland-drm wayland-egl
+
+default: subdirs
+
+
+subdirs:
+ @for dir in $(SUBDIRS) ; do \
+ if [ -d $$dir ] ; then \
+ (cd $$dir && $(MAKE)) || exit 1 ; \
+ fi \
+ done
+
+install:
+ @for dir in $(SUBDIRS) ; do \
+ if [ -d $$dir ] ; then \
+ (cd $$dir && $(MAKE) install) || exit 1 ; \
+ fi \
+ done
+
+clean:
+ -@for dir in $(SUBDIRS) ; do \
+ if [ -d $$dir ] ; then \
+ (cd $$dir && $(MAKE) clean) ; \
+ fi \
+ done
diff --git a/src/egl/wayland/wayland-drm/.gitignore b/src/egl/wayland/wayland-drm/.gitignore
new file mode 100644
index 00000000000..f4ed848476f
--- /dev/null
+++ b/src/egl/wayland/wayland-drm/.gitignore
@@ -0,0 +1,3 @@
+wayland-drm-client-protocol.h
+wayland-drm-server-protocol.h
+wayland-drm-protocol.c
diff --git a/src/egl/wayland/wayland-drm/Makefile b/src/egl/wayland/wayland-drm/Makefile
new file mode 100644
index 00000000000..c232769697a
--- /dev/null
+++ b/src/egl/wayland/wayland-drm/Makefile
@@ -0,0 +1,45 @@
+# src/egl/wayland/wayland-drm/Makefile
+
+TOP = ../../../..
+include $(TOP)/configs/current
+
+GEN_SOURCES = wayland-drm-protocol.c
+
+GEN_HEADERS = wayland-drm-client-protocol.h wayland-drm-server-protocol.h
+
+wayland_drm_SOURCES = wayland-drm.c $(GEN_SOURCES)
+wayland_drm_OBJECTS = $(wayland_drm_SOURCES:.c=.o)
+
+wayland_drm_INCLUDES = \
+ $(WAYLAND_CFLAGS) \
+ -I$(TOP)/src/egl/main
+
+# Generate protocol sources
+prefix=$(shell pkg-config --variable=prefix wayland-server)
+exec_prefx=$(shell pkg-config --variable=exec_prefix wayland-server)
+wayland_protocoldir = $(PWD)/protocol
+wayland_scanner=$(exec_prefix)/bin/wayland-scanner
+
+default: depend libwayland-drm.a $(GEN_SOURCES) $(GEN_HEADERS)
+
+libwayland-drm.a: $(wayland_drm_OBJECTS) Makefile
+ $(MKLIB) -o wayland-drm -static $(wayland_drm_OBJECTS)
+
+depend:
+ rm -f depend
+ touch depend
+ $(MKDEP) $(MKDEP_OPTIONS) $(wayland_drm_INCLUDES) $(wayland_drm_SOURCES) 2> /dev/null
+
+clean:
+ rm -rf libwayland-drm.a $(wayland_drm_OBJECTS) \
+ $(GEN_SOURCES) $(GEN_HEADERS)
+
+install:
+ @echo -n ""
+
+$(wayland_drm_OBJECTS): %.o: %.c $(GEN_HEADERS)
+ $(CC) -c $(wayland_drm_INCLUDES) $(CFLAGS) $< -o $@
+
+include $(prefix)/share/aclocal/wayland-scanner.mk
+
+sinclude depend
diff --git a/src/egl/wayland/wayland-drm/protocol/wayland-drm.xml b/src/egl/wayland/wayland-drm/protocol/wayland-drm.xml
new file mode 100644
index 00000000000..46725d85179
--- /dev/null
+++ b/src/egl/wayland/wayland-drm/protocol/wayland-drm.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<protocol name="drm">
+ <!-- drm support. This object is created by the server and published
+ using the display's global event. -->
+ <interface name="drm" version="1">
+ <!-- Call this request with the magic received from drmGetMagic().
+ It will be passed on to the drmAuthMagic() or
+ DRIAuthConnection() call. This authentication must be
+ completed before create_buffer could be used. -->
+ <request name="authenticate">
+ <arg name="id" type="uint"/>
+ </request>
+
+ <!-- Create a wayland buffer for the named DRM buffer. The DRM
+ surface must have a name using the flink ioctl -->
+ <request name="create_buffer">
+ <arg name="id" type="new_id" interface="buffer"/>
+ <arg name="name" type="uint"/>
+ <arg name="width" type="int"/>
+ <arg name="height" type="int"/>
+ <arg name="stride" type="uint"/>
+ <arg name="visual" type="object" interface="visual"/>
+ </request>
+
+ <!-- Notification of the path of the drm device which is used by
+ the server. The client should use this device for creating
+ local buffers. Only buffers created from this device should
+ be be passed to the server using this drm object's
+ create_buffer request. -->
+ <event name="device">
+ <arg name="name" type="string"/>
+ </event>
+
+ <!-- Raised if the authenticate request succeeded -->
+ <event name="authenticated"/>
+ </interface>
+
+</protocol>
diff --git a/src/egl/wayland/wayland-drm/wayland-drm.c b/src/egl/wayland/wayland-drm/wayland-drm.c
new file mode 100644
index 00000000000..6624fbe9d4e
--- /dev/null
+++ b/src/egl/wayland/wayland-drm/wayland-drm.c
@@ -0,0 +1,203 @@
+/*
+ * Copyright © 2011 Kristian Høgsberg
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ * Authors:
+ * Kristian Høgsberg <krh@bitplanet.net>
+ * Benjamin Franzke <benjaminfranzke@googlemail.com>
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <stddef.h>
+
+#include <wayland-server.h>
+#include "wayland-drm.h"
+#include "wayland-drm-server-protocol.h"
+
+#include "egldisplay.h"
+#include "egldriver.h"
+#include "eglimage.h"
+#include "egltypedefs.h"
+
+struct wl_drm {
+ struct wl_object object;
+ struct wl_display *display;
+
+ _EGLDisplay *edisp;
+
+ char *device_name;
+ authenticate_t authenticate;
+};
+
+static void
+drm_buffer_damage(struct wl_buffer *buffer_base,
+ struct wl_surface *surface,
+ int32_t x, int32_t y, int32_t width, int32_t height)
+{
+}
+
+static void
+destroy_buffer(struct wl_resource *resource, struct wl_client *client)
+{
+ struct wl_drm_buffer *buffer = (struct wl_drm_buffer *) resource;
+ _EGLDriver *drv = buffer->drm->edisp->Driver;
+
+ drv->API.DestroyImageKHR(drv, buffer->drm->edisp, buffer->image);
+ free(buffer);
+}
+
+static void
+buffer_destroy(struct wl_client *client, struct wl_buffer *buffer)
+{
+ wl_resource_destroy(&buffer->resource, client);
+}
+
+const static struct wl_buffer_interface buffer_interface = {
+ buffer_destroy
+};
+
+static void
+drm_create_buffer(struct wl_client *client, struct wl_drm *drm,
+ uint32_t id, uint32_t name, int32_t width, int32_t height,
+ uint32_t stride, struct wl_visual *visual)
+{
+ struct wl_drm_buffer *buffer;
+ EGLint attribs[] = {
+ EGL_WIDTH, 0,
+ EGL_HEIGHT, 0,
+ EGL_DRM_BUFFER_STRIDE_MESA, 0,
+ EGL_DRM_BUFFER_FORMAT_MESA, EGL_DRM_BUFFER_FORMAT_ARGB32_MESA,
+ EGL_NONE
+ };
+ _EGLDriver *drv = drm->edisp->Driver;
+
+ buffer = malloc(sizeof *buffer);
+ if (buffer == NULL) {
+ wl_client_post_no_memory(client);
+ return;
+ }
+
+ buffer->drm = drm;
+ buffer->buffer.compositor = NULL;
+ buffer->buffer.width = width;
+ buffer->buffer.height = height;
+ buffer->buffer.visual = visual;
+ buffer->buffer.attach = NULL;
+ buffer->buffer.damage = drm_buffer_damage;
+
+ if (visual->object.interface != &wl_visual_interface) {
+ /* FIXME: Define a real exception event instead of
+ * abusing this one */
+ wl_client_post_event(client,
+ (struct wl_object *) drm->display,
+ WL_DISPLAY_INVALID_OBJECT, 0);
+ fprintf(stderr, "invalid visual in create_buffer\n");
+ return;
+ }
+
+ attribs[1] = width;
+ attribs[3] = height;
+ attribs[5] = stride / 4;
+ buffer->image = drv->API.CreateImageKHR(drv, drm->edisp,
+ EGL_NO_CONTEXT,
+ EGL_DRM_BUFFER_MESA,
+ (EGLClientBuffer) (intptr_t) name,
+ attribs);
+
+ if (buffer->image == NULL) {
+ /* FIXME: Define a real exception event instead of
+ * abusing this one */
+ wl_client_post_event(client,
+ (struct wl_object *) drm->display,
+ WL_DISPLAY_INVALID_OBJECT, 0);
+ fprintf(stderr, "failed to create image for name %d\n", name);
+ return;
+ }
+
+ buffer->buffer.resource.object.id = id;
+ buffer->buffer.resource.object.interface = &wl_buffer_interface;
+ buffer->buffer.resource.object.implementation = (void (**)(void))
+ &buffer_interface;
+
+ buffer->buffer.resource.destroy = destroy_buffer;
+
+ wl_client_add_resource(client, &buffer->buffer.resource);
+}
+
+static void
+drm_authenticate(struct wl_client *client,
+ struct wl_drm *drm, uint32_t id)
+{
+ if (drm->authenticate(drm->edisp, id) < 0)
+ wl_client_post_event(client,
+ (struct wl_object *) drm->display,
+ WL_DISPLAY_INVALID_OBJECT, 0);
+ else
+ wl_client_post_event(client, &drm->object,
+ WL_DRM_AUTHENTICATED);
+}
+
+const static struct wl_drm_interface drm_interface = {
+ drm_authenticate,
+ drm_create_buffer
+};
+
+static void
+post_drm_device(struct wl_client *client, struct wl_object *global)
+{
+ struct wl_drm *drm = (struct wl_drm *) global;
+
+ wl_client_post_event(client, global, WL_DRM_DEVICE, drm->device_name);
+}
+
+struct wl_drm *
+wayland_drm_init(struct wl_display *display, _EGLDisplay *disp,
+ authenticate_t authenticate, char *device_name)
+{
+ struct wl_drm *drm;
+
+ drm = malloc(sizeof *drm);
+
+ drm->display = display;
+ drm->edisp = disp;
+ drm->authenticate = authenticate;
+ drm->device_name = strdup(device_name);
+
+ drm->object.interface = &wl_drm_interface;
+ drm->object.implementation = (void (**)(void)) &drm_interface;
+ wl_display_add_object(display, &drm->object);
+ wl_display_add_global(display, &drm->object, post_drm_device);
+
+ return drm;
+}
+
+void
+wayland_drm_destroy(struct wl_drm *drm)
+{
+ free(drm->device_name);
+
+ /* FIXME: need wl_display_del_{object,global} */
+
+ free(drm);
+}
diff --git a/src/egl/wayland/wayland-drm/wayland-drm.h b/src/egl/wayland/wayland-drm/wayland-drm.h
new file mode 100644
index 00000000000..675a6a5ce43
--- /dev/null
+++ b/src/egl/wayland/wayland-drm/wayland-drm.h
@@ -0,0 +1,26 @@
+#ifndef WAYLAND_DRM_H
+#define WAYLAND_DRM_H
+
+#include "egldisplay.h"
+#include "eglimage.h"
+
+#include <wayland-server.h>
+
+struct wl_drm;
+
+typedef int (*authenticate_t) (_EGLDisplay *disp, uint32_t id);
+
+struct wl_drm_buffer {
+ struct wl_buffer buffer;
+ struct wl_drm *drm;
+ _EGLImage *image;
+};
+
+struct wl_drm *
+wayland_drm_init(struct wl_display *display, _EGLDisplay *disp,
+ authenticate_t authenticate, char *device_name);
+
+void
+wayland_drm_destroy(struct wl_drm *drm);
+
+#endif
diff --git a/src/egl/wayland/wayland-egl/Makefile b/src/egl/wayland/wayland-egl/Makefile
new file mode 100644
index 00000000000..b9d13dce5d0
--- /dev/null
+++ b/src/egl/wayland/wayland-egl/Makefile
@@ -0,0 +1,71 @@
+# src/egl/wayland/wayland-egl/Makefile
+
+TOP = ../../../..
+include $(TOP)/configs/current
+
+INCLUDE_DIRS = -I$(TOP)/include \
+ -I$(TOP)/include/EGL \
+ -I$(TOP)/src/egl/wayland/wayland-drm
+
+
+HEADERS = wayland-egl-priv.h
+SOURCES = wayland-egl.c
+
+OBJECTS = $(SOURCES:.c=.o)
+
+LOCAL_CFLAGS = $(LIBDRM_CFLAGS) \
+ $(WAYLAND_CFLAGS)
+
+LOCAL_LIBS =
+
+.c.o:
+ $(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $(LOCAL_CFLAGS) $< -o $@
+
+
+default: depend library
+
+# wayland-egl Library
+library: $(TOP)/$(LIB_DIR)/$(WAYLAND_EGL_LIB_NAME)
+
+$(TOP)/$(LIB_DIR)/$(WAYLAND_EGL_LIB_NAME): $(OBJECTS) $(LOCAL_LIBS)
+ $(MKLIB) -o $(WAYLAND_EGL_LIB) -linker '$(CC)' -ldflags '$(LDFLAGS)' \
+ -install $(TOP)/$(LIB_DIR) $(MKLIB_OPTIONS) \
+ -L$(TOP)/$(LIB_DIR) $(WAYLAND_EGL_LIB_DEPS) \
+ $(OBJECTS) $(LOCAL_LIBS)
+
+PKG_CONFIG_DIR = $(INSTALL_LIB_DIR)/pkgconfig
+
+gl_pcedit = sed \
+ -e 's,@INSTALL_DIR@,$(INSTALL_DIR),' \
+ -e 's,@INSTALL_LIB_DIR@,$(INSTALL_LIB_DIR),' \
+ -e 's,@INSTALL_INC_DIR@,$(INSTALL_INC_DIR),' \
+ -e 's,@VERSION@,$(MESA_MAJOR).$(MESA_MINOR).$(MESA_TINY),' \
+ -e 's,@WAYLAND_EGL_PC_REQ_PRIV@,$(WAYLAND_EGL_PC_REQ_PRIV),' \
+ -e 's,@WAYLAND_EGL_PC_LIB_PRIV@,$(WAYLAND_EGL_PC_LIB_PRIV),' \
+ -e 's,@WAYLAND_EGL_PC_CFLAGS@,$(WAYLAND_EGL_PC_CFLAGS),' \
+ -e 's,@WAYLAND_EGL_LIB@,$(WAYLAND_EGL_LIB),'
+
+wayland-egl.pc: wayland-egl.pc.in
+ $(gl_pcedit) $< > $@
+
+install: default wayland-egl.pc
+ $(INSTALL) -d $(DESTDIR)$(INSTALL_LIB_DIR)
+ $(MINSTALL) $(TOP)/$(LIB_DIR)/$(WAYLAND_EGL_LIB_GLOB) \
+ $(DESTDIR)$(INSTALL_LIB_DIR)
+ $(INSTALL) -d $(DESTDIR)$(PKG_CONFIG_DIR)
+ $(INSTALL) -m 644 wayland-egl.pc $(DESTDIR)$(PKG_CONFIG_DIR)
+
+clean:
+ -rm -f *.o
+ -rm -f depend depend.bak
+
+depend: $(SOURCES) $(HEADERS)
+ @ echo "running $(MKDEP)"
+ @ rm -f depend
+ @ touch depend
+ $(MKDEP) $(MKDEP_OPTIONS) $(DEFINES) $(INCLUDE_DIRS) \
+ $(SOURCES) $(HEADERS) > /dev/null 2>/dev/null
+
+
+-include depend
+# DO NOT DELETE
diff --git a/src/egl/wayland/wayland-egl/wayland-egl-priv.h b/src/egl/wayland/wayland-egl/wayland-egl-priv.h
new file mode 100644
index 00000000000..38b21c25be2
--- /dev/null
+++ b/src/egl/wayland/wayland-egl/wayland-egl-priv.h
@@ -0,0 +1,60 @@
+#ifndef _WAYLAND_EGL_PRIV_H
+#define _WAYLAND_EGL_PRIV_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* GCC visibility */
+#if defined(__GNUC__) && __GNUC__ >= 4
+#define WL_EGL_EXPORT __attribute__ ((visibility("default")))
+#else
+#define WL_EGL_EXPORT
+#endif
+
+#include <stdbool.h>
+#include <wayland-client.h>
+
+struct wl_egl_display {
+ struct wl_display *display;
+
+ struct wl_drm *drm;
+ int fd;
+ char *device_name;
+ bool authenticated;
+
+ void (*glFlush)(void);
+};
+
+struct wl_egl_window {
+ struct wl_surface *surface;
+ struct wl_visual *visual;
+
+ int width;
+ int height;
+ int dx;
+ int dy;
+
+ int attached_width;
+ int attached_height;
+};
+
+struct wl_egl_pixmap {
+ struct wl_egl_display *display;
+ struct wl_visual *visual;
+
+ int name;
+ int width;
+ int height;
+ int stride;
+
+ void (*destroy) (struct wl_egl_pixmap *egl_pixmap);
+
+ void *driver_private;
+};
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/src/egl/wayland/wayland-egl/wayland-egl.c b/src/egl/wayland/wayland-egl/wayland-egl.c
new file mode 100644
index 00000000000..2c84bec64a5
--- /dev/null
+++ b/src/egl/wayland/wayland-egl/wayland-egl.c
@@ -0,0 +1,226 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <stdbool.h>
+#include <errno.h>
+
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <unistd.h>
+
+#include <dlfcn.h>
+
+#include <wayland-client.h>
+#include "wayland-egl.h"
+#include "wayland-egl-priv.h"
+#include "wayland-drm-client-protocol.h"
+#include <xf86drm.h>
+
+static void
+drm_handle_device(void *data, struct wl_drm *drm, const char *device)
+{
+ struct wl_egl_display *egl_display = data;
+ drm_magic_t magic;
+
+ egl_display->device_name = strdup(device);
+
+ egl_display->fd = open(egl_display->device_name, O_RDWR);
+
+ if (egl_display->fd == -1) {
+ fprintf(stderr, "wayland-egl: could not open %s (%s)",
+ egl_display->device_name, strerror(errno));
+ return;
+ }
+ drmGetMagic(egl_display->fd, &magic);
+ wl_drm_authenticate(egl_display->drm, magic);
+}
+
+static void
+drm_handle_authenticated(void *data, struct wl_drm *drm)
+{
+ struct wl_egl_display *egl_display = data;
+
+ egl_display->authenticated = true;
+}
+
+static const struct wl_drm_listener drm_listener = {
+ drm_handle_device,
+ drm_handle_authenticated
+};
+
+static void
+wl_display_handle_global(struct wl_display *display, uint32_t id,
+ const char *interface, uint32_t version, void *data)
+{
+ struct wl_egl_display *egl_display = data;
+
+ if (strcmp(interface, "drm") == 0) {
+ egl_display->drm = wl_drm_create(display, id);
+ wl_drm_add_listener(egl_display->drm, &drm_listener,
+ egl_display);
+ }
+}
+
+/* stolen from egl_dri2:dri2_load() */
+static void *
+get_flush_address() {
+ void *handle;
+ void *(*get_proc_address)(const char *procname);
+
+ handle = dlopen(NULL, RTLD_LAZY | RTLD_GLOBAL);
+ if (handle) {
+ get_proc_address = (void* (*)(const char *))
+ dlsym(handle, "_glapi_get_proc_address");
+ /* no need to keep a reference */
+ dlclose(handle);
+ }
+
+ /*
+ * If glapi is not available, loading DRI drivers will fail. Ideally, we
+ * should load one of libGL, libGLESv1_CM, or libGLESv2 and go on. But if
+ * the app has loaded another one of them with RTLD_LOCAL, there may be
+ * unexpected behaviors later because there will be two copies of glapi
+ * (with global variables of the same names!) in the memory.
+ */
+ if (!get_proc_address) {
+ fprintf(stderr, "failed to find _glapi_get_proc_address");
+ return NULL;
+ }
+
+ return get_proc_address("glFlush");
+}
+
+WL_EGL_EXPORT struct wl_egl_display *
+wl_egl_display_create(struct wl_display *display)
+{
+ struct wl_egl_display *egl_display;
+
+ egl_display = malloc(sizeof *egl_display);
+ if (!egl_display)
+ return NULL;
+
+ egl_display->display = display;
+ egl_display->drm = NULL;
+ egl_display->fd = -1;
+ egl_display->device_name = NULL;
+ egl_display->authenticated = false;
+
+ egl_display->glFlush = (void (*)(void)) get_flush_address();
+
+ wl_display_add_global_listener(display, wl_display_handle_global,
+ egl_display);
+
+ return egl_display;
+}
+
+WL_EGL_EXPORT void
+wl_egl_display_destroy(struct wl_egl_display *egl_display)
+{
+
+ free(egl_display->device_name);
+ close(egl_display->fd);
+
+ wl_drm_destroy(egl_display->drm);
+
+ free(egl_display);
+}
+
+WL_EGL_EXPORT void
+wl_egl_window_resize(struct wl_egl_window *egl_window,
+ int width, int height,
+ int dx, int dy)
+{
+ egl_window->width = width;
+ egl_window->height = height;
+ egl_window->dx = dx;
+ egl_window->dy = dy;
+}
+
+WL_EGL_EXPORT struct wl_egl_window *
+wl_egl_window_create(struct wl_egl_display *egl_display,
+ struct wl_surface *surface,
+ int width, int height,
+ struct wl_visual *visual)
+{
+ struct wl_egl_window *egl_window;
+
+ egl_window = malloc(sizeof *egl_window);
+ if (!egl_window)
+ return NULL;
+
+ egl_window->surface = surface;
+ egl_window->visual = visual;
+ wl_egl_window_resize(egl_window, width, height, 0, 0);
+ egl_window->attached_width = 0;
+ egl_window->attached_height = 0;
+
+ return egl_window;
+}
+
+WL_EGL_EXPORT void
+wl_egl_window_destroy(struct wl_egl_window *egl_window)
+{
+ free(egl_window);
+}
+
+WL_EGL_EXPORT void
+wl_egl_window_get_attached_size(struct wl_egl_window *egl_window,
+ int *width, int *height)
+{
+ if (width)
+ *width = egl_window->attached_width;
+ if (height)
+ *height = egl_window->attached_height;
+}
+
+WL_EGL_EXPORT struct wl_egl_pixmap *
+wl_egl_pixmap_create(struct wl_egl_display *egl_display,
+ int width, int height,
+ struct wl_visual *visual, uint32_t flags)
+{
+ struct wl_egl_pixmap *egl_pixmap;
+
+ egl_pixmap = malloc(sizeof *egl_pixmap);
+ if (egl_pixmap == NULL)
+ return NULL;
+
+ egl_pixmap->display = egl_display;
+ egl_pixmap->width = width;
+ egl_pixmap->height = height;
+ egl_pixmap->visual = visual;
+ egl_pixmap->name = 0;
+ egl_pixmap->stride = 0;
+
+ egl_pixmap->destroy = NULL;
+
+ return egl_pixmap;
+}
+
+WL_EGL_EXPORT void
+wl_egl_pixmap_destroy(struct wl_egl_pixmap *egl_pixmap)
+{
+ if (egl_pixmap->destroy)
+ egl_pixmap->destroy(egl_pixmap);
+ free(egl_pixmap);
+}
+
+WL_EGL_EXPORT struct wl_buffer *
+wl_egl_pixmap_create_buffer(struct wl_egl_display *egl_display,
+ struct wl_egl_pixmap *egl_pixmap)
+{
+ if (egl_pixmap->name == 0)
+ return NULL;
+
+ return wl_drm_create_buffer(egl_display->drm, egl_pixmap->name,
+ egl_pixmap->width, egl_pixmap->height,
+ egl_pixmap->stride, egl_pixmap->visual);
+}
+
+WL_EGL_EXPORT void
+wl_egl_pixmap_flush(struct wl_egl_display *egl_display,
+ struct wl_egl_pixmap *egl_pixmap)
+{
+ if (egl_display->glFlush)
+ egl_display->glFlush();
+}
diff --git a/src/egl/wayland/wayland-egl/wayland-egl.pc.in b/src/egl/wayland/wayland-egl/wayland-egl.pc.in
new file mode 100644
index 00000000000..3c2067c2a77
--- /dev/null
+++ b/src/egl/wayland/wayland-egl/wayland-egl.pc.in
@@ -0,0 +1,12 @@
+prefix=@INSTALL_DIR@
+exec_prefix=${prefix}
+libdir=@INSTALL_LIB_DIR@
+includedir=@INSTALL_INC_DIR@
+
+Name: wayland-egl
+Description: Mesa wayland-egl library
+Requires.private: @WAYLAND_EGL_PC_REQ_PRIV@
+Version: @VERSION@
+Libs: -L${libdir} -l@WAYLAND_EGL_LIB@
+Libs.private: @WAYLAND_EGL_PC_LIB_PRIV@
+Cflags: -I${includedir} @WAYLAND_EGL_PC_CFLAGS@
diff --git a/src/gallium/SConscript b/src/gallium/SConscript
index 0efab834f66..31580556f03 100644
--- a/src/gallium/SConscript
+++ b/src/gallium/SConscript
@@ -42,6 +42,7 @@ if env['drm']:
# SConscript([
# 'drivers/nouveau/SConscript',
# 'drivers/nv50/SConscript',
+ # 'drivers/nvc0/SConscript',
# 'drivers/nvfx/SConscript',
# ])
@@ -55,6 +56,7 @@ SConscript('winsys/sw/null/SConscript')
SConscript('state_trackers/python/SConscript')
if env['platform'] != 'embedded':
SConscript('state_trackers/vega/SConscript')
+ SConscript('state_trackers/egl/SConscript')
if env['x11']:
SConscript('state_trackers/glx/xlib/SConscript')
@@ -66,10 +68,7 @@ if env['platform'] != 'embedded':
SConscript('state_trackers/xorg/SConscript')
if env['platform'] == 'windows':
- SConscript([
- 'state_trackers/egl/SConscript',
- 'state_trackers/wgl/SConscript',
- ])
+ SConscript('state_trackers/wgl/SConscript')
#
# Winsys
@@ -85,6 +84,11 @@ SConscript([
'targets/graw-null/SConscript',
])
+if env['platform'] != 'embedded':
+ SConscript([
+ 'targets/egl-static/SConscript'
+ ])
+
if env['x11']:
SConscript([
'targets/graw-xlib/SConscript',
@@ -95,7 +99,6 @@ if env['platform'] == 'windows':
SConscript([
'targets/graw-gdi/SConscript',
'targets/libgl-gdi/SConscript',
- #'egl-gdi/SConscript',
])
if env['dri']:
diff --git a/src/gallium/auxiliary/Android.mk b/src/gallium/auxiliary/Android.mk
index 7c333051b47..f5513794eea 100644
--- a/src/gallium/auxiliary/Android.mk
+++ b/src/gallium/auxiliary/Android.mk
@@ -108,7 +108,9 @@ C_SOURCES = \
util/u_draw_quad.c \
util/u_format.c \
util/u_format_other.c \
+ util/u_format_latc.c \
util/u_format_s3tc.c \
+ util/u_format_rgtc.c \
util/u_format_srgb.c \
util/u_format_table.c \
util/u_format_tests.c \
@@ -127,6 +129,7 @@ C_SOURCES = \
util/u_network.c \
util/u_math.c \
util/u_mm.c \
+ util/u_pstipple.c \
util/u_rect.c \
util/u_ringbuffer.c \
util/u_sampler.c \
@@ -140,7 +143,8 @@ C_SOURCES = \
util/u_tile.c \
util/u_transfer.c \
util/u_resource.c \
- util/u_upload_mgr.c
+ util/u_upload_mgr.c \
+ util/u_vbuf_mgr.c
GENERATED_SOURCES = \
indices/u_indices_gen.c \
diff --git a/src/gallium/auxiliary/Makefile b/src/gallium/auxiliary/Makefile
index ff355c47832..c7654046a58 100644
--- a/src/gallium/auxiliary/Makefile
+++ b/src/gallium/auxiliary/Makefile
@@ -110,7 +110,9 @@ C_SOURCES = \
util/u_draw_quad.c \
util/u_format.c \
util/u_format_other.c \
+ util/u_format_latc.c \
util/u_format_s3tc.c \
+ util/u_format_rgtc.c \
util/u_format_srgb.c \
util/u_format_table.c \
util/u_format_tests.c \
@@ -129,6 +131,7 @@ C_SOURCES = \
util/u_network.c \
util/u_math.c \
util/u_mm.c \
+ util/u_pstipple.c \
util/u_rect.c \
util/u_ringbuffer.c \
util/u_sampler.c \
@@ -142,7 +145,8 @@ C_SOURCES = \
util/u_tile.c \
util/u_transfer.c \
util/u_resource.c \
- util/u_upload_mgr.c
+ util/u_upload_mgr.c \
+ util/u_vbuf_mgr.c
# Disabling until pipe-video branch gets merged in
#vl/vl_bitstream_parser.c \
@@ -157,7 +161,6 @@ GALLIVM_SOURCES = \
gallivm/lp_bld_bitarit.c \
gallivm/lp_bld_const.c \
gallivm/lp_bld_conv.c \
- gallivm/lp_bld_debug.c \
gallivm/lp_bld_flow.c \
gallivm/lp_bld_format_aos.c \
gallivm/lp_bld_format_soa.c \
@@ -185,6 +188,7 @@ GALLIVM_SOURCES = \
draw/draw_pt_fetch_shade_pipeline_llvm.c
GALLIVM_CPP_SOURCES = \
+ gallivm/lp_bld_debug.cpp \
gallivm/lp_bld_misc.cpp
GENERATED_SOURCES = \
diff --git a/src/gallium/auxiliary/SConscript b/src/gallium/auxiliary/SConscript
index fca7e5fd117..8e422b2c11f 100644
--- a/src/gallium/auxiliary/SConscript
+++ b/src/gallium/auxiliary/SConscript
@@ -157,7 +157,9 @@ source = [
'util/u_draw_quad.c',
'util/u_format.c',
'util/u_format_other.c',
+ 'util/u_format_latc.c',
'util/u_format_s3tc.c',
+ 'util/u_format_rgtc.c',
'util/u_format_srgb.c',
'util/u_format_table.c',
'util/u_format_tests.c',
@@ -176,6 +178,7 @@ source = [
'util/u_network.c',
'util/u_math.c',
'util/u_mm.c',
+ 'util/u_pstipple.c',
'util/u_rect.c',
'util/u_resource.c',
'util/u_ringbuffer.c',
@@ -190,6 +193,7 @@ source = [
'util/u_tile.c',
'util/u_transfer.c',
'util/u_upload_mgr.c',
+ 'util/u_vbuf_mgr.c',
# Disabling until pipe-video branch gets merged in
#'vl/vl_bitstream_parser.c',
#'vl/vl_mpeg12_mc_renderer.c',
@@ -199,16 +203,13 @@ source = [
]
if env['llvm']:
- if env['UDIS86']:
- env.Append(CPPDEFINES = [('HAVE_UDIS86', '1')])
-
source += [
'gallivm/lp_bld_arit.c',
'gallivm/lp_bld_assert.c',
'gallivm/lp_bld_bitarit.c',
'gallivm/lp_bld_const.c',
'gallivm/lp_bld_conv.c',
- 'gallivm/lp_bld_debug.c',
+ 'gallivm/lp_bld_debug.cpp',
'gallivm/lp_bld_flow.c',
'gallivm/lp_bld_format_aos.c',
'gallivm/lp_bld_format_soa.c',
diff --git a/src/gallium/auxiliary/cso_cache/cso_context.c b/src/gallium/auxiliary/cso_cache/cso_context.c
index 58b022d531d..fdd40fca126 100644
--- a/src/gallium/auxiliary/cso_cache/cso_context.c
+++ b/src/gallium/auxiliary/cso_cache/cso_context.c
@@ -47,41 +47,45 @@
#include "cso_cache/cso_hash.h"
#include "cso_context.h"
-struct cso_context {
- struct pipe_context *pipe;
- struct cso_cache *cache;
+/**
+ * Info related to samplers and sampler views.
+ * We have one of these for fragment samplers and another for vertex samplers.
+ */
+struct sampler_info
+{
struct {
void *samplers[PIPE_MAX_SAMPLERS];
unsigned nr_samplers;
-
- void *vertex_samplers[PIPE_MAX_VERTEX_SAMPLERS];
- unsigned nr_vertex_samplers;
} hw;
void *samplers[PIPE_MAX_SAMPLERS];
unsigned nr_samplers;
- void *vertex_samplers[PIPE_MAX_VERTEX_SAMPLERS];
- unsigned nr_vertex_samplers;
-
- unsigned nr_samplers_saved;
void *samplers_saved[PIPE_MAX_SAMPLERS];
+ unsigned nr_samplers_saved;
+
+ struct pipe_sampler_view *views[PIPE_MAX_SAMPLERS];
+ unsigned nr_views;
+
+ struct pipe_sampler_view *views_saved[PIPE_MAX_SAMPLERS];
+ unsigned nr_views_saved;
+};
+
- unsigned nr_vertex_samplers_saved;
- void *vertex_samplers_saved[PIPE_MAX_VERTEX_SAMPLERS];
- uint nr_fragment_sampler_views;
- struct pipe_sampler_view *fragment_sampler_views[PIPE_MAX_SAMPLERS];
+struct cso_context {
+ struct pipe_context *pipe;
+ struct cso_cache *cache;
- uint nr_vertex_sampler_views;
- struct pipe_sampler_view *vertex_sampler_views[PIPE_MAX_VERTEX_SAMPLERS];
+ struct sampler_info fragment_samplers;
+ struct sampler_info vertex_samplers;
- uint nr_fragment_sampler_views_saved;
- struct pipe_sampler_view *fragment_sampler_views_saved[PIPE_MAX_SAMPLERS];
+ uint nr_vertex_buffers;
+ struct pipe_vertex_buffer vertex_buffers[PIPE_MAX_ATTRIBS];
- uint nr_vertex_sampler_views_saved;
- struct pipe_sampler_view *vertex_sampler_views_saved[PIPE_MAX_VERTEX_SAMPLERS];
+ uint nr_vertex_buffers_saved;
+ struct pipe_vertex_buffer vertex_buffers_saved[PIPE_MAX_ATTRIBS];
/** Current and saved state.
* The saved state is used as a 1-deep stack.
@@ -252,6 +256,8 @@ struct cso_context *cso_create_context( struct pipe_context *pipe )
if (ctx == NULL)
goto out;
+ assert(PIPE_MAX_SAMPLERS == PIPE_MAX_VERTEX_SAMPLERS);
+
ctx->cache = cso_cache_create();
if (ctx->cache == NULL)
goto out;
@@ -278,7 +284,8 @@ out:
void cso_release_all( struct cso_context *ctx )
{
unsigned i;
-
+ struct sampler_info *info;
+
if (ctx->pipe) {
ctx->pipe->bind_blend_state( ctx->pipe, NULL );
ctx->pipe->bind_rasterizer_state( ctx->pipe, NULL );
@@ -294,19 +301,30 @@ void cso_release_all( struct cso_context *ctx )
ctx->pipe->set_vertex_sampler_views(ctx->pipe, 0, NULL);
}
+ /* free fragment samplers, views */
+ info = &ctx->fragment_samplers;
for (i = 0; i < PIPE_MAX_SAMPLERS; i++) {
- pipe_sampler_view_reference(&ctx->fragment_sampler_views[i], NULL);
- pipe_sampler_view_reference(&ctx->fragment_sampler_views_saved[i], NULL);
+ pipe_sampler_view_reference(&info->views[i], NULL);
+ pipe_sampler_view_reference(&info->views_saved[i], NULL);
}
- for (i = 0; i < PIPE_MAX_VERTEX_SAMPLERS; i++) {
- pipe_sampler_view_reference(&ctx->vertex_sampler_views[i], NULL);
- pipe_sampler_view_reference(&ctx->vertex_sampler_views_saved[i], NULL);
+ /* free vertex samplers, views */
+ info = &ctx->vertex_samplers;
+ for (i = 0; i < PIPE_MAX_SAMPLERS; i++) {
+ pipe_sampler_view_reference(&info->views[i], NULL);
+ pipe_sampler_view_reference(&info->views_saved[i], NULL);
}
util_unreference_framebuffer_state(&ctx->fb);
util_unreference_framebuffer_state(&ctx->fb_saved);
+ util_copy_vertex_buffers(ctx->vertex_buffers,
+ &ctx->nr_vertex_buffers,
+ NULL, 0);
+ util_copy_vertex_buffers(ctx->vertex_buffers_saved,
+ &ctx->nr_vertex_buffers_saved,
+ NULL, 0);
+
if (ctx->cache) {
cso_cache_delete( ctx->cache );
ctx->cache = NULL;
@@ -395,233 +413,6 @@ void cso_restore_blend(struct cso_context *ctx)
-enum pipe_error cso_single_sampler(struct cso_context *ctx,
- unsigned idx,
- const struct pipe_sampler_state *templ)
-{
- void *handle = NULL;
-
- if (templ != NULL) {
- unsigned key_size = sizeof(struct pipe_sampler_state);
- unsigned hash_key = cso_construct_key((void*)templ, key_size);
- struct cso_hash_iter iter = cso_find_state_template(ctx->cache,
- hash_key, CSO_SAMPLER,
- (void*)templ, key_size);
-
- if (cso_hash_iter_is_null(iter)) {
- struct cso_sampler *cso = MALLOC(sizeof(struct cso_sampler));
- if (!cso)
- return PIPE_ERROR_OUT_OF_MEMORY;
-
- memcpy(&cso->state, templ, sizeof(*templ));
- cso->data = ctx->pipe->create_sampler_state(ctx->pipe, &cso->state);
- cso->delete_state = (cso_state_callback)ctx->pipe->delete_sampler_state;
- cso->context = ctx->pipe;
-
- iter = cso_insert_state(ctx->cache, hash_key, CSO_SAMPLER, cso);
- if (cso_hash_iter_is_null(iter)) {
- FREE(cso);
- return PIPE_ERROR_OUT_OF_MEMORY;
- }
-
- handle = cso->data;
- }
- else {
- handle = ((struct cso_sampler *)cso_hash_iter_data(iter))->data;
- }
- }
-
- ctx->samplers[idx] = handle;
- return PIPE_OK;
-}
-
-enum pipe_error
-cso_single_vertex_sampler(struct cso_context *ctx,
- unsigned idx,
- const struct pipe_sampler_state *templ)
-{
- void *handle = NULL;
-
- if (templ != NULL) {
- unsigned key_size = sizeof(struct pipe_sampler_state);
- unsigned hash_key = cso_construct_key((void*)templ, key_size);
- struct cso_hash_iter iter = cso_find_state_template(ctx->cache,
- hash_key, CSO_SAMPLER,
- (void*)templ, key_size);
-
- if (cso_hash_iter_is_null(iter)) {
- struct cso_sampler *cso = MALLOC(sizeof(struct cso_sampler));
- if (!cso)
- return PIPE_ERROR_OUT_OF_MEMORY;
-
- memcpy(&cso->state, templ, sizeof(*templ));
- cso->data = ctx->pipe->create_sampler_state(ctx->pipe, &cso->state);
- cso->delete_state = (cso_state_callback)ctx->pipe->delete_sampler_state;
- cso->context = ctx->pipe;
-
- iter = cso_insert_state(ctx->cache, hash_key, CSO_SAMPLER, cso);
- if (cso_hash_iter_is_null(iter)) {
- FREE(cso);
- return PIPE_ERROR_OUT_OF_MEMORY;
- }
-
- handle = cso->data;
- }
- else {
- handle = ((struct cso_sampler *)cso_hash_iter_data(iter))->data;
- }
- }
-
- ctx->vertex_samplers[idx] = handle;
- return PIPE_OK;
-}
-
-void cso_single_sampler_done( struct cso_context *ctx )
-{
- unsigned i;
-
- /* find highest non-null sampler */
- for (i = PIPE_MAX_SAMPLERS; i > 0; i--) {
- if (ctx->samplers[i - 1] != NULL)
- break;
- }
-
- ctx->nr_samplers = i;
-
- if (ctx->hw.nr_samplers != ctx->nr_samplers ||
- memcmp(ctx->hw.samplers,
- ctx->samplers,
- ctx->nr_samplers * sizeof(void *)) != 0)
- {
- memcpy(ctx->hw.samplers, ctx->samplers, ctx->nr_samplers * sizeof(void *));
- ctx->hw.nr_samplers = ctx->nr_samplers;
-
- ctx->pipe->bind_fragment_sampler_states(ctx->pipe, ctx->nr_samplers, ctx->samplers);
- }
-}
-
-void
-cso_single_vertex_sampler_done(struct cso_context *ctx)
-{
- unsigned i;
-
- /* find highest non-null sampler */
- for (i = PIPE_MAX_VERTEX_SAMPLERS; i > 0; i--) {
- if (ctx->vertex_samplers[i - 1] != NULL)
- break;
- }
-
- ctx->nr_vertex_samplers = i;
-
- if (ctx->hw.nr_vertex_samplers != ctx->nr_vertex_samplers ||
- memcmp(ctx->hw.vertex_samplers,
- ctx->vertex_samplers,
- ctx->nr_vertex_samplers * sizeof(void *)) != 0)
- {
- memcpy(ctx->hw.vertex_samplers,
- ctx->vertex_samplers,
- ctx->nr_vertex_samplers * sizeof(void *));
- ctx->hw.nr_vertex_samplers = ctx->nr_vertex_samplers;
-
- ctx->pipe->bind_vertex_sampler_states(ctx->pipe,
- ctx->nr_vertex_samplers,
- ctx->vertex_samplers);
- }
-}
-
-/*
- * If the function encouters any errors it will return the
- * last one. Done to always try to set as many samplers
- * as possible.
- */
-enum pipe_error cso_set_samplers( struct cso_context *ctx,
- unsigned nr,
- const struct pipe_sampler_state **templates )
-{
- unsigned i;
- enum pipe_error temp, error = PIPE_OK;
-
- /* TODO: fastpath
- */
-
- for (i = 0; i < nr; i++) {
- temp = cso_single_sampler( ctx, i, templates[i] );
- if (temp != PIPE_OK)
- error = temp;
- }
-
- for ( ; i < ctx->nr_samplers; i++) {
- temp = cso_single_sampler( ctx, i, NULL );
- if (temp != PIPE_OK)
- error = temp;
- }
-
- cso_single_sampler_done( ctx );
-
- return error;
-}
-
-void cso_save_samplers(struct cso_context *ctx)
-{
- ctx->nr_samplers_saved = ctx->nr_samplers;
- memcpy(ctx->samplers_saved, ctx->samplers, sizeof(ctx->samplers));
-}
-
-void cso_restore_samplers(struct cso_context *ctx)
-{
- ctx->nr_samplers = ctx->nr_samplers_saved;
- memcpy(ctx->samplers, ctx->samplers_saved, sizeof(ctx->samplers));
- cso_single_sampler_done( ctx );
-}
-
-/*
- * If the function encouters any errors it will return the
- * last one. Done to always try to set as many samplers
- * as possible.
- */
-enum pipe_error cso_set_vertex_samplers(struct cso_context *ctx,
- unsigned nr,
- const struct pipe_sampler_state **templates)
-{
- unsigned i;
- enum pipe_error temp, error = PIPE_OK;
-
- /* TODO: fastpath
- */
-
- for (i = 0; i < nr; i++) {
- temp = cso_single_vertex_sampler( ctx, i, templates[i] );
- if (temp != PIPE_OK)
- error = temp;
- }
-
- for ( ; i < ctx->nr_samplers; i++) {
- temp = cso_single_vertex_sampler( ctx, i, NULL );
- if (temp != PIPE_OK)
- error = temp;
- }
-
- cso_single_vertex_sampler_done( ctx );
-
- return error;
-}
-
-void
-cso_save_vertex_samplers(struct cso_context *ctx)
-{
- ctx->nr_vertex_samplers_saved = ctx->nr_vertex_samplers;
- memcpy(ctx->vertex_samplers_saved, ctx->vertex_samplers, sizeof(ctx->vertex_samplers));
-}
-
-void
-cso_restore_vertex_samplers(struct cso_context *ctx)
-{
- ctx->nr_vertex_samplers = ctx->nr_vertex_samplers_saved;
- memcpy(ctx->vertex_samplers, ctx->vertex_samplers_saved, sizeof(ctx->vertex_samplers));
- cso_single_vertex_sampler_done(ctx);
-}
-
-
enum pipe_error cso_set_depth_stencil_alpha(struct cso_context *ctx,
const struct pipe_depth_stencil_alpha_state *templ)
{
@@ -1143,121 +934,361 @@ void cso_restore_vertex_elements(struct cso_context *ctx)
ctx->velements_saved = NULL;
}
-/* fragment sampler view state */
+/* vertex buffers */
-void
-cso_set_fragment_sampler_views(struct cso_context *cso,
- uint count,
- struct pipe_sampler_view **views)
+void cso_set_vertex_buffers(struct cso_context *ctx,
+ unsigned count,
+ const struct pipe_vertex_buffer *buffers)
{
- uint i;
-
- for (i = 0; i < count; i++) {
- pipe_sampler_view_reference(&cso->fragment_sampler_views[i], views[i]);
+ if (count != ctx->nr_vertex_buffers ||
+ memcmp(buffers, ctx->vertex_buffers,
+ sizeof(struct pipe_vertex_buffer) * count) != 0) {
+ util_copy_vertex_buffers(ctx->vertex_buffers, &ctx->nr_vertex_buffers,
+ buffers, count);
+ ctx->pipe->set_vertex_buffers(ctx->pipe, count, buffers);
}
- for (; i < cso->nr_fragment_sampler_views; i++) {
- pipe_sampler_view_reference(&cso->fragment_sampler_views[i], NULL);
+}
+
+void cso_save_vertex_buffers(struct cso_context *ctx)
+{
+ util_copy_vertex_buffers(ctx->vertex_buffers_saved,
+ &ctx->nr_vertex_buffers_saved,
+ ctx->vertex_buffers,
+ ctx->nr_vertex_buffers);
+}
+
+void cso_restore_vertex_buffers(struct cso_context *ctx)
+{
+ util_copy_vertex_buffers(ctx->vertex_buffers,
+ &ctx->nr_vertex_buffers,
+ ctx->vertex_buffers_saved,
+ ctx->nr_vertex_buffers_saved);
+ ctx->pipe->set_vertex_buffers(ctx->pipe, ctx->nr_vertex_buffers,
+ ctx->vertex_buffers);
+}
+
+
+/**************** fragment/vertex sampler view state *************************/
+
+static enum pipe_error
+single_sampler(struct cso_context *ctx,
+ struct sampler_info *info,
+ unsigned idx,
+ const struct pipe_sampler_state *templ)
+{
+ void *handle = NULL;
+
+ if (templ != NULL) {
+ unsigned key_size = sizeof(struct pipe_sampler_state);
+ unsigned hash_key = cso_construct_key((void*)templ, key_size);
+ struct cso_hash_iter iter =
+ cso_find_state_template(ctx->cache,
+ hash_key, CSO_SAMPLER,
+ (void *) templ, key_size);
+
+ if (cso_hash_iter_is_null(iter)) {
+ struct cso_sampler *cso = MALLOC(sizeof(struct cso_sampler));
+ if (!cso)
+ return PIPE_ERROR_OUT_OF_MEMORY;
+
+ memcpy(&cso->state, templ, sizeof(*templ));
+ cso->data = ctx->pipe->create_sampler_state(ctx->pipe, &cso->state);
+ cso->delete_state = (cso_state_callback)ctx->pipe->delete_sampler_state;
+ cso->context = ctx->pipe;
+
+ iter = cso_insert_state(ctx->cache, hash_key, CSO_SAMPLER, cso);
+ if (cso_hash_iter_is_null(iter)) {
+ FREE(cso);
+ return PIPE_ERROR_OUT_OF_MEMORY;
+ }
+
+ handle = cso->data;
+ }
+ else {
+ handle = ((struct cso_sampler *)cso_hash_iter_data(iter))->data;
+ }
}
- cso->pipe->set_fragment_sampler_views(cso->pipe,
- MAX2(count, cso->nr_fragment_sampler_views),
- cso->fragment_sampler_views);
+ info->samplers[idx] = handle;
- cso->nr_fragment_sampler_views = count;
+ return PIPE_OK;
}
-void
-cso_save_fragment_sampler_views(struct cso_context *cso)
+enum pipe_error
+cso_single_sampler(struct cso_context *ctx,
+ unsigned idx,
+ const struct pipe_sampler_state *templ)
{
- uint i;
+ return single_sampler(ctx, &ctx->fragment_samplers, idx, templ);
+}
+
+enum pipe_error
+cso_single_vertex_sampler(struct cso_context *ctx,
+ unsigned idx,
+ const struct pipe_sampler_state *templ)
+{
+ return single_sampler(ctx, &ctx->vertex_samplers, idx, templ);
+}
+
- cso->nr_fragment_sampler_views_saved = cso->nr_fragment_sampler_views;
- for (i = 0; i < cso->nr_fragment_sampler_views; i++) {
- assert(!cso->fragment_sampler_views_saved[i]);
+static void
+single_sampler_done(struct cso_context *ctx,
+ struct sampler_info *info)
+{
+ unsigned i;
- pipe_sampler_view_reference(&cso->fragment_sampler_views_saved[i],
- cso->fragment_sampler_views[i]);
+ /* find highest non-null sampler */
+ for (i = PIPE_MAX_SAMPLERS; i > 0; i--) {
+ if (info->samplers[i - 1] != NULL)
+ break;
+ }
+
+ info->nr_samplers = i;
+
+ if (info->hw.nr_samplers != info->nr_samplers ||
+ memcmp(info->hw.samplers,
+ info->samplers,
+ info->nr_samplers * sizeof(void *)) != 0)
+ {
+ memcpy(info->hw.samplers,
+ info->samplers,
+ info->nr_samplers * sizeof(void *));
+ info->hw.nr_samplers = info->nr_samplers;
+
+ if (info == &ctx->fragment_samplers) {
+ ctx->pipe->bind_fragment_sampler_states(ctx->pipe,
+ info->nr_samplers,
+ info->samplers);
+ }
+ else if (info == &ctx->vertex_samplers) {
+ ctx->pipe->bind_vertex_sampler_states(ctx->pipe,
+ info->nr_samplers,
+ info->samplers);
+ }
+ else {
+ assert(0);
+ }
}
}
void
-cso_restore_fragment_sampler_views(struct cso_context *cso)
+cso_single_sampler_done( struct cso_context *ctx )
{
- uint i;
+ single_sampler_done(ctx, &ctx->fragment_samplers);
+}
+
+void
+cso_single_vertex_sampler_done(struct cso_context *ctx)
+{
+ single_sampler_done(ctx, &ctx->vertex_samplers);
+}
- for (i = 0; i < cso->nr_fragment_sampler_views_saved; i++) {
- pipe_sampler_view_reference(&cso->fragment_sampler_views[i], cso->fragment_sampler_views_saved[i]);
- pipe_sampler_view_reference(&cso->fragment_sampler_views_saved[i], NULL);
+
+/*
+ * If the function encouters any errors it will return the
+ * last one. Done to always try to set as many samplers
+ * as possible.
+ */
+static enum pipe_error
+set_samplers(struct cso_context *ctx,
+ struct sampler_info *info,
+ unsigned nr,
+ const struct pipe_sampler_state **templates)
+{
+ unsigned i;
+ enum pipe_error temp, error = PIPE_OK;
+
+ /* TODO: fastpath
+ */
+
+ for (i = 0; i < nr; i++) {
+ temp = single_sampler(ctx, info, i, templates[i]);
+ if (temp != PIPE_OK)
+ error = temp;
}
- for (; i < cso->nr_fragment_sampler_views; i++) {
- pipe_sampler_view_reference(&cso->fragment_sampler_views[i], NULL);
+
+ for ( ; i < info->nr_samplers; i++) {
+ temp = single_sampler(ctx, info, i, NULL);
+ if (temp != PIPE_OK)
+ error = temp;
}
- cso->pipe->set_fragment_sampler_views(cso->pipe,
- MAX2(cso->nr_fragment_sampler_views, cso->nr_fragment_sampler_views_saved),
- cso->fragment_sampler_views);
+ single_sampler_done(ctx, info);
+
+ return error;
+}
+
+enum pipe_error
+cso_set_samplers(struct cso_context *ctx,
+ unsigned nr,
+ const struct pipe_sampler_state **templates)
+{
+ return set_samplers(ctx, &ctx->fragment_samplers, nr, templates);
+}
- cso->nr_fragment_sampler_views = cso->nr_fragment_sampler_views_saved;
- cso->nr_fragment_sampler_views_saved = 0;
+enum pipe_error
+cso_set_vertex_samplers(struct cso_context *ctx,
+ unsigned nr,
+ const struct pipe_sampler_state **templates)
+{
+ return set_samplers(ctx, &ctx->vertex_samplers, nr, templates);
}
-/* vertex sampler view state */
+
+static void
+save_samplers(struct cso_context *ctx, struct sampler_info *info)
+{
+ info->nr_samplers_saved = info->nr_samplers;
+ memcpy(info->samplers_saved, info->samplers, sizeof(info->samplers));
+}
void
-cso_set_vertex_sampler_views(struct cso_context *cso,
- uint count,
- struct pipe_sampler_view **views)
+cso_save_samplers(struct cso_context *ctx)
+{
+ save_samplers(ctx, &ctx->fragment_samplers);
+}
+
+void
+cso_save_vertex_samplers(struct cso_context *ctx)
+{
+ save_samplers(ctx, &ctx->vertex_samplers);
+}
+
+
+
+static void
+restore_samplers(struct cso_context *ctx, struct sampler_info *info)
+{
+ info->nr_samplers = info->nr_samplers_saved;
+ memcpy(info->samplers, info->samplers_saved, sizeof(info->samplers));
+ single_sampler_done(ctx, info);
+}
+
+void
+cso_restore_samplers(struct cso_context *ctx)
+{
+ restore_samplers(ctx, &ctx->fragment_samplers);
+}
+
+void
+cso_restore_vertex_samplers(struct cso_context *ctx)
+{
+ restore_samplers(ctx, &ctx->vertex_samplers);
+}
+
+
+
+static void
+set_sampler_views(struct cso_context *ctx,
+ struct sampler_info *info,
+ void (*set_views)(struct pipe_context *,
+ unsigned num_views,
+ struct pipe_sampler_view **),
+ uint count,
+ struct pipe_sampler_view **views)
{
uint i;
+ /* reference new views */
for (i = 0; i < count; i++) {
- pipe_sampler_view_reference(&cso->vertex_sampler_views[i], views[i]);
+ pipe_sampler_view_reference(&info->views[i], views[i]);
}
- for (; i < cso->nr_vertex_sampler_views; i++) {
- pipe_sampler_view_reference(&cso->vertex_sampler_views[i], NULL);
+ /* unref extra old views, if any */
+ for (; i < info->nr_views; i++) {
+ pipe_sampler_view_reference(&info->views[i], NULL);
}
- cso->pipe->set_vertex_sampler_views(cso->pipe,
- MAX2(count, cso->nr_vertex_sampler_views),
- cso->vertex_sampler_views);
+ info->nr_views = count;
- cso->nr_vertex_sampler_views = count;
+ /* bind the new sampler views */
+ set_views(ctx->pipe, count, info->views);
}
void
-cso_save_vertex_sampler_views(struct cso_context *cso)
+cso_set_fragment_sampler_views(struct cso_context *ctx,
+ uint count,
+ struct pipe_sampler_view **views)
{
- uint i;
+ set_sampler_views(ctx, &ctx->fragment_samplers,
+ ctx->pipe->set_fragment_sampler_views,
+ count, views);
+}
- cso->nr_vertex_sampler_views_saved = cso->nr_vertex_sampler_views;
+void
+cso_set_vertex_sampler_views(struct cso_context *ctx,
+ uint count,
+ struct pipe_sampler_view **views)
+{
+ set_sampler_views(ctx, &ctx->vertex_samplers,
+ ctx->pipe->set_vertex_sampler_views,
+ count, views);
+}
- for (i = 0; i < cso->nr_vertex_sampler_views; i++) {
- assert(!cso->vertex_sampler_views_saved[i]);
- pipe_sampler_view_reference(&cso->vertex_sampler_views_saved[i],
- cso->vertex_sampler_views[i]);
+
+static void
+save_sampler_views(struct cso_context *ctx,
+ struct sampler_info *info)
+{
+ uint i;
+
+ info->nr_views_saved = info->nr_views;
+
+ for (i = 0; i < info->nr_views; i++) {
+ assert(!info->views_saved[i]);
+ pipe_sampler_view_reference(&info->views_saved[i], info->views[i]);
}
}
void
-cso_restore_vertex_sampler_views(struct cso_context *cso)
+cso_save_fragment_sampler_views(struct cso_context *ctx)
+{
+ save_sampler_views(ctx, &ctx->fragment_samplers);
+}
+
+void
+cso_save_vertex_sampler_views(struct cso_context *ctx)
+{
+ save_sampler_views(ctx, &ctx->vertex_samplers);
+}
+
+
+static void
+restore_sampler_views(struct cso_context *ctx,
+ struct sampler_info *info,
+ void (*set_views)(struct pipe_context *,
+ unsigned num_views,
+ struct pipe_sampler_view **))
{
uint i;
- for (i = 0; i < cso->nr_vertex_sampler_views_saved; i++) {
- pipe_sampler_view_reference(&cso->vertex_sampler_views[i], cso->vertex_sampler_views_saved[i]);
- pipe_sampler_view_reference(&cso->vertex_sampler_views_saved[i], NULL);
+ for (i = 0; i < info->nr_views_saved; i++) {
+ pipe_sampler_view_reference(&info->views[i], info->views_saved[i]);
+ pipe_sampler_view_reference(&info->views_saved[i], NULL);
}
- for (; i < cso->nr_vertex_sampler_views; i++) {
- pipe_sampler_view_reference(&cso->vertex_sampler_views[i], NULL);
+ for (; i < info->nr_views; i++) {
+ pipe_sampler_view_reference(&info->views[i], NULL);
}
- cso->pipe->set_vertex_sampler_views(cso->pipe,
- MAX2(cso->nr_vertex_sampler_views, cso->nr_vertex_sampler_views_saved),
- cso->vertex_sampler_views);
+ /* bind the old/saved sampler views */
+ set_views(ctx->pipe, info->nr_views_saved, info->views);
+
+ info->nr_views = info->nr_views_saved;
+ info->nr_views_saved = 0;
+}
+
+void
+cso_restore_fragment_sampler_views(struct cso_context *ctx)
+{
+ restore_sampler_views(ctx, &ctx->fragment_samplers,
+ ctx->pipe->set_fragment_sampler_views);
+}
- cso->nr_vertex_sampler_views = cso->nr_vertex_sampler_views_saved;
- cso->nr_vertex_sampler_views_saved = 0;
+void
+cso_restore_vertex_sampler_views(struct cso_context *ctx)
+{
+ restore_sampler_views(ctx, &ctx->vertex_samplers,
+ ctx->pipe->set_vertex_sampler_views);
}
diff --git a/src/gallium/auxiliary/cso_cache/cso_context.h b/src/gallium/auxiliary/cso_cache/cso_context.h
index f0b07f73765..00edc9f8dd4 100644
--- a/src/gallium/auxiliary/cso_cache/cso_context.h
+++ b/src/gallium/auxiliary/cso_cache/cso_context.h
@@ -110,6 +110,13 @@ void cso_save_vertex_elements(struct cso_context *ctx);
void cso_restore_vertex_elements(struct cso_context *ctx);
+void cso_set_vertex_buffers(struct cso_context *ctx,
+ unsigned count,
+ const struct pipe_vertex_buffer *buffers);
+void cso_save_vertex_buffers(struct cso_context *ctx);
+void cso_restore_vertex_buffers(struct cso_context *ctx);
+
+
/* These aren't really sensible -- most of the time the api provides
* object semantics for shaders anyway, and the cases where it doesn't
* (eg mesa's internall-generated texenv programs), it will be up to
diff --git a/src/gallium/auxiliary/draw/draw_context.c b/src/gallium/auxiliary/draw/draw_context.c
index 73d5b6e403f..95d96719873 100644
--- a/src/gallium/auxiliary/draw/draw_context.c
+++ b/src/gallium/auxiliary/draw/draw_context.c
@@ -35,6 +35,7 @@
#include "util/u_memory.h"
#include "util/u_math.h"
#include "util/u_cpu_detect.h"
+#include "util/u_inlines.h"
#include "draw_context.h"
#include "draw_vs.h"
#include "draw_gs.h"
@@ -87,8 +88,14 @@ draw_create_gallivm(struct pipe_context *pipe, struct gallivm_state *gallivm)
goto fail;
#if HAVE_LLVM
- if (draw_get_option_use_llvm() && gallivm) {
- draw->llvm = draw_llvm_create(draw, gallivm);
+ if (draw_get_option_use_llvm()) {
+ if (!gallivm) {
+ gallivm = gallivm_create();
+ draw->own_gallivm = gallivm;
+ }
+
+ if (gallivm)
+ draw->llvm = draw_llvm_create(draw, gallivm);
}
#endif
@@ -164,6 +171,10 @@ void draw_destroy( struct draw_context *draw )
}
}
+ for (i = 0; i < draw->pt.nr_vertex_buffers; i++) {
+ pipe_resource_reference(&draw->pt.vertex_buffer[i].buffer, NULL);
+ }
+
/* Not so fast -- we're just borrowing this at the moment.
*
if (draw->render)
@@ -175,8 +186,11 @@ void draw_destroy( struct draw_context *draw )
draw_vs_destroy( draw );
draw_gs_destroy( draw );
#ifdef HAVE_LLVM
- if(draw->llvm)
+ if (draw->llvm)
draw_llvm_destroy( draw->llvm );
+
+ if (draw->own_gallivm)
+ gallivm_destroy(draw->own_gallivm);
#endif
FREE( draw );
@@ -307,8 +321,9 @@ draw_set_vertex_buffers(struct draw_context *draw,
{
assert(count <= PIPE_MAX_ATTRIBS);
- memcpy(draw->pt.vertex_buffer, buffers, count * sizeof(buffers[0]));
- draw->pt.nr_vertex_buffers = count;
+ util_copy_vertex_buffers(draw->pt.vertex_buffer,
+ &draw->pt.nr_vertex_buffers,
+ buffers, count);
}
@@ -395,7 +410,7 @@ void
draw_wide_line_threshold(struct draw_context *draw, float threshold)
{
draw_do_flush( draw, DRAW_FLUSH_STATE_CHANGE );
- draw->pipeline.wide_line_threshold = threshold;
+ draw->pipeline.wide_line_threshold = roundf(threshold);
}
diff --git a/src/gallium/auxiliary/draw/draw_llvm.c b/src/gallium/auxiliary/draw/draw_llvm.c
index 3b8286f05d5..a5217c1d4ec 100644
--- a/src/gallium/auxiliary/draw/draw_llvm.c
+++ b/src/gallium/auxiliary/draw/draw_llvm.c
@@ -214,13 +214,12 @@ static LLVMTypeRef
create_jit_vertex_buffer_type(struct gallivm_state *gallivm)
{
LLVMTargetDataRef target = gallivm->target;
- LLVMTypeRef elem_types[4];
+ LLVMTypeRef elem_types[3];
LLVMTypeRef vb_type;
elem_types[0] =
- elem_types[1] =
- elem_types[2] = LLVMInt32TypeInContext(gallivm->context);
- elem_types[3] = LLVMPointerType(LLVMOpaqueTypeInContext(gallivm->context), 0); /* vs_constants */
+ elem_types[1] = LLVMInt32TypeInContext(gallivm->context);
+ elem_types[2] = LLVMPointerType(LLVMInt8TypeInContext(gallivm->context), 0); /* vs_constants */
vb_type = LLVMStructTypeInContext(gallivm->context, elem_types,
Elements(elem_types), 0);
@@ -230,7 +229,7 @@ create_jit_vertex_buffer_type(struct gallivm_state *gallivm)
LP_CHECK_MEMBER_OFFSET(struct pipe_vertex_buffer, stride,
target, vb_type, 0);
LP_CHECK_MEMBER_OFFSET(struct pipe_vertex_buffer, buffer_offset,
- target, vb_type, 2);
+ target, vb_type, 1);
LP_CHECK_STRUCT_SIZE(struct pipe_vertex_buffer, target, vb_type);
@@ -437,6 +436,7 @@ generate_vs(struct draw_llvm *llvm,
LLVMBuilderRef builder,
LLVMValueRef (*outputs)[NUM_CHANNELS],
const LLVMValueRef (*inputs)[NUM_CHANNELS],
+ LLVMValueRef system_values_array,
LLVMValueRef context_ptr,
struct lp_build_sampler_soa *draw_sampler)
{
@@ -468,6 +468,7 @@ generate_vs(struct draw_llvm *llvm,
vs_type,
NULL /*struct lp_build_mask_context *mask*/,
consts_ptr,
+ system_values_array,
NULL /*pos*/,
inputs,
outputs,
@@ -509,9 +510,7 @@ generate_fetch(struct gallivm_state *gallivm,
LLVMValueRef vbuffer_ptr = LLVMBuildGEP(builder, vbuffers_ptr,
&indices, 1, "");
LLVMValueRef vb_stride = draw_jit_vbuffer_stride(gallivm, vbuf);
- LLVMValueRef vb_max_index = draw_jit_vbuffer_max_index(gallivm, vbuf);
LLVMValueRef vb_buffer_offset = draw_jit_vbuffer_offset(gallivm, vbuf);
- LLVMValueRef cond;
LLVMValueRef stride;
if (velem->instance_divisor) {
@@ -521,10 +520,6 @@ generate_fetch(struct gallivm_state *gallivm,
"instance_divisor");
}
- /* limit index to min(index, vb_max_index) */
- cond = LLVMBuildICmp(builder, LLVMIntULE, index, vb_max_index, "");
- index = LLVMBuildSelect(builder, cond, index, vb_max_index, "");
-
stride = LLVMBuildMul(builder, vb_stride, index, "");
vbuffer_ptr = LLVMBuildLoad(builder, vbuffer_ptr, "vbuffer");
@@ -1118,7 +1113,9 @@ draw_llvm_generate(struct draw_llvm *llvm, struct draw_llvm_variant *variant)
LLVMValueRef start, end, count, stride, step, io_itr;
LLVMValueRef io_ptr, vbuffers_ptr, vb_ptr;
LLVMValueRef instance_id;
+ LLVMValueRef system_values_array;
struct draw_context *draw = llvm->draw;
+ const struct tgsi_shader_info *vs_info = &draw->vs.vertex_shader->info;
unsigned i, j;
struct lp_build_context bld;
struct lp_build_loop_state lp_loop;
@@ -1179,6 +1176,9 @@ draw_llvm_generate(struct draw_llvm *llvm, struct draw_llvm_variant *variant)
lp_build_context_init(&bld, llvm->gallivm, lp_type_int(32));
+ system_values_array = lp_build_system_values_array(gallivm, vs_info,
+ instance_id, NULL);
+
end = lp_build_add(&bld, start, count);
step = lp_build_const_int32(gallivm, max_vertices);
@@ -1233,6 +1233,7 @@ draw_llvm_generate(struct draw_llvm *llvm, struct draw_llvm_variant *variant)
builder,
outputs,
ptr_aos,
+ system_values_array,
context_ptr,
sampler);
@@ -1263,8 +1264,7 @@ draw_llvm_generate(struct draw_llvm *llvm, struct draw_llvm_variant *variant)
/* store clipmask in vertex header and positions in data */
convert_to_aos(gallivm, io, outputs, clipmask,
- draw->vs.vertex_shader->info.num_outputs,
- max_vertices);
+ vs_info->num_outputs, max_vertices);
}
lp_build_loop_end_cond(&lp_loop, end, step, LLVMIntUGE);
@@ -1315,7 +1315,9 @@ draw_llvm_generate_elts(struct draw_llvm *llvm, struct draw_llvm_variant *varian
LLVMValueRef fetch_elts, fetch_count, stride, step, io_itr;
LLVMValueRef io_ptr, vbuffers_ptr, vb_ptr;
LLVMValueRef instance_id;
+ LLVMValueRef system_values_array;
struct draw_context *draw = llvm->draw;
+ const struct tgsi_shader_info *vs_info = &draw->vs.vertex_shader->info;
unsigned i, j;
struct lp_build_context bld;
struct lp_build_loop_state lp_loop;
@@ -1376,6 +1378,10 @@ draw_llvm_generate_elts(struct draw_llvm *llvm, struct draw_llvm_variant *varian
lp_build_context_init(&bld, gallivm, lp_type_int(32));
+ system_values_array = lp_build_system_values_array(gallivm, vs_info,
+ instance_id, NULL);
+
+
step = lp_build_const_int32(gallivm, max_vertices);
/* code generated texture sampling */
@@ -1438,6 +1444,7 @@ draw_llvm_generate_elts(struct draw_llvm *llvm, struct draw_llvm_variant *varian
builder,
outputs,
ptr_aos,
+ system_values_array,
context_ptr,
sampler);
@@ -1471,8 +1478,7 @@ draw_llvm_generate_elts(struct draw_llvm *llvm, struct draw_llvm_variant *varian
* and transformed positions in data
*/
convert_to_aos(gallivm, io, outputs, clipmask,
- draw->vs.vertex_shader->info.num_outputs,
- max_vertices);
+ vs_info->num_outputs, max_vertices);
}
lp_build_loop_end_cond(&lp_loop, fetch_count, step, LLVMIntUGE);
@@ -1610,16 +1616,14 @@ draw_llvm_destroy_variant(struct draw_llvm_variant *variant)
struct draw_llvm *llvm = variant->llvm;
if (variant->function_elts) {
- if (variant->function_elts)
- LLVMFreeMachineCodeForFunction(llvm->gallivm->engine,
- variant->function_elts);
+ LLVMFreeMachineCodeForFunction(llvm->gallivm->engine,
+ variant->function_elts);
LLVMDeleteFunction(variant->function_elts);
}
if (variant->function) {
- if (variant->function)
- LLVMFreeMachineCodeForFunction(llvm->gallivm->engine,
- variant->function);
+ LLVMFreeMachineCodeForFunction(llvm->gallivm->engine,
+ variant->function);
LLVMDeleteFunction(variant->function);
}
diff --git a/src/gallium/auxiliary/draw/draw_llvm.h b/src/gallium/auxiliary/draw/draw_llvm.h
index 73c1d9251ec..e8623e7bcdc 100644
--- a/src/gallium/auxiliary/draw/draw_llvm.h
+++ b/src/gallium/auxiliary/draw/draw_llvm.h
@@ -133,11 +133,8 @@ struct draw_jit_context
#define draw_jit_vbuffer_stride(_gallivm, _ptr) \
lp_build_struct_get(_gallivm, _ptr, 0, "stride")
-#define draw_jit_vbuffer_max_index(_gallivm, _ptr) \
- lp_build_struct_get(_gallivm, _ptr, 1, "max_index")
-
#define draw_jit_vbuffer_offset(_gallivm, _ptr) \
- lp_build_struct_get(_gallivm, _ptr, 2, "buffer_offset")
+ lp_build_struct_get(_gallivm, _ptr, 1, "buffer_offset")
typedef int
@@ -229,7 +226,6 @@ struct draw_llvm_variant
/* key is variable-sized, must be last */
struct draw_llvm_variant_key key;
- /* key is variable-sized, must be last */
};
struct llvm_vertex_shader {
diff --git a/src/gallium/auxiliary/draw/draw_pipe.c b/src/gallium/auxiliary/draw/draw_pipe.c
index 6206197dae9..f1b0171f520 100644
--- a/src/gallium/auxiliary/draw/draw_pipe.c
+++ b/src/gallium/auxiliary/draw/draw_pipe.c
@@ -64,8 +64,8 @@ boolean draw_pipeline_init( struct draw_context *draw )
return FALSE;
/* these defaults are oriented toward the needs of softpipe */
- draw->pipeline.wide_point_threshold = 1000000.0; /* infinity */
- draw->pipeline.wide_line_threshold = 1.0;
+ draw->pipeline.wide_point_threshold = 1000000.0f; /* infinity */
+ draw->pipeline.wide_line_threshold = 1.0f;
draw->pipeline.wide_point_sprites = FALSE;
draw->pipeline.line_stipple = TRUE;
draw->pipeline.point_sprite = TRUE;
diff --git a/src/gallium/auxiliary/draw/draw_pipe_aaline.c b/src/gallium/auxiliary/draw/draw_pipe_aaline.c
index 0851b9acc0d..32af29ae144 100644
--- a/src/gallium/auxiliary/draw/draw_pipe_aaline.c
+++ b/src/gallium/auxiliary/draw/draw_pipe_aaline.c
@@ -55,9 +55,16 @@
/**
+ * Size for the alpha texture used for antialiasing
+ */
+#define TEXTURE_SIZE_LOG2 5 /* 32 x 32 */
+
+/**
* Max texture level for the alpha texture used for antialiasing
+ *
+ * Don't use the 1x1 and 2x2 mipmap levels.
*/
-#define MAX_TEXTURE_LEVEL 5 /* 32 x 32 */
+#define MAX_TEXTURE_LEVEL (TEXTURE_SIZE_LOG2 - 2)
/**
@@ -403,8 +410,8 @@ aaline_create_texture(struct aaline_stage *aaline)
texTemp.target = PIPE_TEXTURE_2D;
texTemp.format = PIPE_FORMAT_A8_UNORM; /* XXX verify supported by driver! */
texTemp.last_level = MAX_TEXTURE_LEVEL;
- texTemp.width0 = 1 << MAX_TEXTURE_LEVEL;
- texTemp.height0 = 1 << MAX_TEXTURE_LEVEL;
+ texTemp.width0 = 1 << TEXTURE_SIZE_LOG2;
+ texTemp.height0 = 1 << TEXTURE_SIZE_LOG2;
texTemp.depth0 = 1;
texTemp.array_size = 1;
texTemp.bind = PIPE_BIND_SAMPLER_VIEW;
@@ -461,7 +468,7 @@ aaline_create_texture(struct aaline_stage *aaline)
d = 200; /* tuneable */
}
else if (i == 0 || j == 0 || i == size - 1 || j == size - 1) {
- d = 0;
+ d = 35; /* edge texel */
}
else {
d = 255;
@@ -498,8 +505,7 @@ aaline_create_sampler(struct aaline_stage *aaline)
sampler.mag_img_filter = PIPE_TEX_FILTER_LINEAR;
sampler.normalized_coords = 1;
sampler.min_lod = 0.0f;
- /* avoid using the 1x1 and 2x2 mipmap levels */
- sampler.max_lod = MAX_TEXTURE_LEVEL - 2;
+ sampler.max_lod = MAX_TEXTURE_LEVEL;
aaline->sampler_cso = pipe->create_sampler_state(pipe, &sampler);
if (aaline->sampler_cso == NULL)
diff --git a/src/gallium/auxiliary/draw/draw_pipe_aapoint.c b/src/gallium/auxiliary/draw/draw_pipe_aapoint.c
index 5ea552f51c1..60f6380c503 100644
--- a/src/gallium/auxiliary/draw/draw_pipe_aapoint.c
+++ b/src/gallium/auxiliary/draw/draw_pipe_aapoint.c
@@ -874,6 +874,8 @@ draw_install_aapoint_stage(struct draw_context *draw,
{
struct aapoint_stage *aapoint;
+ pipe->draw = (void *) draw;
+
/*
* Create / install AA point drawing / prim stage
*/
diff --git a/src/gallium/auxiliary/draw/draw_pipe_pstipple.c b/src/gallium/auxiliary/draw/draw_pipe_pstipple.c
index f5515c1df76..fe3627be867 100644
--- a/src/gallium/auxiliary/draw/draw_pipe_pstipple.c
+++ b/src/gallium/auxiliary/draw/draw_pipe_pstipple.c
@@ -27,8 +27,9 @@
/**
* Polygon stipple stage: implement polygon stipple with texture map and
- * fragment program. The fragment program samples the texture and does
- * a fragment kill for the stipple-failing fragments.
+ * fragment program. The fragment program samples the texture using the
+ * fragment window coordinate register and does a fragment kill for the
+ * stipple-failing fragments.
*
* Authors: Brian Paul
*/
@@ -114,7 +115,8 @@ struct pstip_stage
/**
* Subclass of tgsi_transform_context, used for transforming the
- * user's fragment shader to add the special AA instructions.
+ * user's fragment shader to add the extra texture sample and fragment kill
+ * instructions.
*/
struct pstip_transform_context {
struct tgsi_transform_context base;
@@ -386,13 +388,6 @@ pstip_update_texture(struct pstip_stage *pstip)
uint i, j;
ubyte *data;
- /* XXX: want to avoid flushing just because we use stipple:
- *
- * Flush should no longer be necessary if driver is properly
- * interleaving drawing and transfers on a given context:
- */
- pipe->flush( pipe, PIPE_FLUSH_TEXTURE_CACHE, NULL );
-
transfer = pipe_get_transfer(pipe, pstip->texture, 0, 0,
PIPE_TRANSFER_WRITE, 0, 0, 32, 32);
data = pipe->transfer_map(pipe, transfer);
@@ -658,16 +653,16 @@ pstip_create_fs_state(struct pipe_context *pipe,
const struct pipe_shader_state *fs)
{
struct pstip_stage *pstip = pstip_stage_from_pipe(pipe);
- struct pstip_fragment_shader *aafs = CALLOC_STRUCT(pstip_fragment_shader);
+ struct pstip_fragment_shader *pstipfs = CALLOC_STRUCT(pstip_fragment_shader);
- if (aafs) {
- aafs->state = *fs;
+ if (pstipfs) {
+ pstipfs->state = *fs;
/* pass-through */
- aafs->driver_fs = pstip->driver_create_fs_state(pstip->pipe, fs);
+ pstipfs->driver_fs = pstip->driver_create_fs_state(pstip->pipe, fs);
}
- return aafs;
+ return pstipfs;
}
@@ -675,12 +670,12 @@ static void
pstip_bind_fs_state(struct pipe_context *pipe, void *fs)
{
struct pstip_stage *pstip = pstip_stage_from_pipe(pipe);
- struct pstip_fragment_shader *aafs = (struct pstip_fragment_shader *) fs;
+ struct pstip_fragment_shader *pstipfs = (struct pstip_fragment_shader *) fs;
/* save current */
- pstip->fs = aafs;
+ pstip->fs = pstipfs;
/* pass-through */
pstip->driver_bind_fs_state(pstip->pipe,
- (aafs ? aafs->driver_fs : NULL));
+ (pstipfs ? pstipfs->driver_fs : NULL));
}
@@ -688,14 +683,14 @@ static void
pstip_delete_fs_state(struct pipe_context *pipe, void *fs)
{
struct pstip_stage *pstip = pstip_stage_from_pipe(pipe);
- struct pstip_fragment_shader *aafs = (struct pstip_fragment_shader *) fs;
+ struct pstip_fragment_shader *pstipfs = (struct pstip_fragment_shader *) fs;
/* pass-through */
- pstip->driver_delete_fs_state(pstip->pipe, aafs->driver_fs);
+ pstip->driver_delete_fs_state(pstip->pipe, pstipfs->driver_fs);
- if (aafs->pstip_fs)
- pstip->driver_delete_fs_state(pstip->pipe, aafs->pstip_fs);
+ if (pstipfs->pstip_fs)
+ pstip->driver_delete_fs_state(pstip->pipe, pstipfs->pstip_fs);
- FREE(aafs);
+ FREE(pstipfs);
}
diff --git a/src/gallium/auxiliary/draw/draw_pipe_validate.c b/src/gallium/auxiliary/draw/draw_pipe_validate.c
index c575a8ac7ca..27afba5af3d 100644
--- a/src/gallium/auxiliary/draw/draw_pipe_validate.c
+++ b/src/gallium/auxiliary/draw/draw_pipe_validate.c
@@ -29,6 +29,7 @@
*/
#include "util/u_memory.h"
+#include "util/u_math.h"
#include "pipe/p_defines.h"
#include "draw_private.h"
#include "draw_pipe.h"
@@ -86,7 +87,7 @@ draw_need_pipeline(const struct draw_context *draw,
return TRUE;
/* wide lines */
- if (rasterizer->line_width > draw->pipeline.wide_line_threshold)
+ if (roundf(rasterizer->line_width) > draw->pipeline.wide_line_threshold)
return TRUE;
/* AA lines */
@@ -169,7 +170,7 @@ static struct draw_stage *validate_pipeline( struct draw_stage *stage )
stage->next = next;
/* drawing wide lines? */
- wide_lines = (rast->line_width > draw->pipeline.wide_line_threshold
+ wide_lines = (roundf(rast->line_width) > draw->pipeline.wide_line_threshold
&& !rast->line_smooth);
/* drawing large/sprite points (but not AA points)? */
diff --git a/src/gallium/auxiliary/draw/draw_private.h b/src/gallium/auxiliary/draw/draw_private.h
index 06ed4d60ef2..db2e3c5410d 100644
--- a/src/gallium/auxiliary/draw/draw_private.h
+++ b/src/gallium/auxiliary/draw/draw_private.h
@@ -286,6 +286,7 @@ struct draw_context
#ifdef HAVE_LLVM
struct draw_llvm *llvm;
+ struct gallivm_state *own_gallivm;
#endif
struct pipe_sampler_view *sampler_views[PIPE_MAX_VERTEX_SAMPLERS];
diff --git a/src/gallium/auxiliary/draw/draw_pt.c b/src/gallium/auxiliary/draw/draw_pt.c
index 4078b2a07d0..c3d7e871f7a 100644
--- a/src/gallium/auxiliary/draw/draw_pt.c
+++ b/src/gallium/auxiliary/draw/draw_pt.c
@@ -459,10 +459,9 @@ draw_vbo(struct draw_context *draw,
}
debug_printf("Buffers:\n");
for (i = 0; i < draw->pt.nr_vertex_buffers; i++) {
- debug_printf(" %u: stride=%u maxindex=%u offset=%u ptr=%p\n",
+ debug_printf(" %u: stride=%u offset=%u ptr=%p\n",
i,
draw->pt.vertex_buffer[i].stride,
- draw->pt.vertex_buffer[i].max_index,
draw->pt.vertex_buffer[i].buffer_offset,
draw->pt.user.vbuffer[i]);
}
diff --git a/src/gallium/auxiliary/draw/draw_pt_fetch.c b/src/gallium/auxiliary/draw/draw_pt_fetch.c
index ae12ee24bdc..4fa3b265e10 100644
--- a/src/gallium/auxiliary/draw/draw_pt_fetch.c
+++ b/src/gallium/auxiliary/draw/draw_pt_fetch.c
@@ -139,7 +139,7 @@ void draw_pt_fetch_run( struct pt_fetch *fetch,
((char *)draw->pt.user.vbuffer[i] +
draw->pt.vertex_buffer[i].buffer_offset),
draw->pt.vertex_buffer[i].stride,
- draw->pt.vertex_buffer[i].max_index);
+ draw->pt.user.max_index);
}
translate->run_elts( translate,
@@ -166,7 +166,7 @@ void draw_pt_fetch_run_linear( struct pt_fetch *fetch,
((char *)draw->pt.user.vbuffer[i] +
draw->pt.vertex_buffer[i].buffer_offset),
draw->pt.vertex_buffer[i].stride,
- draw->pt.vertex_buffer[i].max_index);
+ draw->pt.user.max_index);
}
translate->run( translate,
diff --git a/src/gallium/auxiliary/draw/draw_pt_fetch_emit.c b/src/gallium/auxiliary/draw/draw_pt_fetch_emit.c
index e706b7796f8..51043102a61 100644
--- a/src/gallium/auxiliary/draw/draw_pt_fetch_emit.c
+++ b/src/gallium/auxiliary/draw/draw_pt_fetch_emit.c
@@ -186,7 +186,7 @@ static void fetch_emit_prepare( struct draw_pt_middle_end *middle,
((char *)draw->pt.user.vbuffer[i] +
draw->pt.vertex_buffer[i].buffer_offset),
draw->pt.vertex_buffer[i].stride,
- draw->pt.vertex_buffer[i].max_index);
+ draw->pt.user.max_index);
}
*max_vertices = (draw->render->max_vertex_buffer_bytes /
diff --git a/src/gallium/auxiliary/draw/draw_pt_fetch_shade_emit.c b/src/gallium/auxiliary/draw/draw_pt_fetch_shade_emit.c
index 7c198c6026d..1e926fb028e 100644
--- a/src/gallium/auxiliary/draw/draw_pt_fetch_shade_emit.c
+++ b/src/gallium/auxiliary/draw/draw_pt_fetch_shade_emit.c
@@ -58,8 +58,8 @@ struct fetch_shade_emit {
const ubyte *src[PIPE_MAX_ATTRIBS];
unsigned prim;
- struct draw_vs_varient_key key;
- struct draw_vs_varient *active;
+ struct draw_vs_variant_key key;
+ struct draw_vs_variant *active;
const struct vertex_info *vinfo;
@@ -150,7 +150,7 @@ static void fse_prepare( struct draw_pt_middle_end *middle,
}
- fse->active = draw_vs_lookup_varient( draw->vs.vertex_shader,
+ fse->active = draw_vs_lookup_variant( draw->vs.vertex_shader,
&fse->key );
if (!fse->active) {
@@ -169,7 +169,7 @@ static void fse_prepare( struct draw_pt_middle_end *middle,
((const ubyte *) draw->pt.user.vbuffer[i] +
draw->pt.vertex_buffer[i].buffer_offset),
draw->pt.vertex_buffer[i].stride,
- draw->pt.vertex_buffer[i].max_index );
+ draw->pt.user.max_index );
}
*max_vertices = (draw->render->max_vertex_buffer_bytes /
diff --git a/src/gallium/auxiliary/draw/draw_pt_vsplit_tmp.h b/src/gallium/auxiliary/draw/draw_pt_vsplit_tmp.h
index 3f66f962e11..75dba8c39a5 100644
--- a/src/gallium/auxiliary/draw/draw_pt_vsplit_tmp.h
+++ b/src/gallium/auxiliary/draw/draw_pt_vsplit_tmp.h
@@ -258,9 +258,10 @@ vsplit_segment_fan_linear(struct vsplit_frontend *vsplit, unsigned flags,
boolean use_spoken = ((flags & DRAW_SPLIT_BEFORE) != 0);
unsigned nr = 0, i;
- assert(icount + !!use_spoken <= vsplit->segment_size);
+ assert(icount <= vsplit->segment_size);
if (use_spoken) {
+ /* replace istart by i0 */
vsplit->fetch_elts[nr++] = i0;
for (i = 1 ; i < icount; i++)
vsplit->fetch_elts[nr++] = istart + i;
diff --git a/src/gallium/auxiliary/draw/draw_vs.c b/src/gallium/auxiliary/draw/draw_vs.c
index fb665b08fff..7caad6f0053 100644
--- a/src/gallium/auxiliary/draw/draw_vs.c
+++ b/src/gallium/auxiliary/draw/draw_vs.c
@@ -165,10 +165,10 @@ draw_delete_vertex_shader(struct draw_context *draw,
{
unsigned i;
- for (i = 0; i < dvs->nr_varients; i++)
- dvs->varient[i]->destroy( dvs->varient[i] );
+ for (i = 0; i < dvs->nr_variants; i++)
+ dvs->variant[i]->destroy( dvs->variant[i] );
- dvs->nr_varients = 0;
+ dvs->nr_variants = 0;
dvs->delete( dvs );
}
@@ -225,40 +225,40 @@ draw_vs_destroy( struct draw_context *draw )
}
-struct draw_vs_varient *
-draw_vs_lookup_varient( struct draw_vertex_shader *vs,
- const struct draw_vs_varient_key *key )
+struct draw_vs_variant *
+draw_vs_lookup_variant( struct draw_vertex_shader *vs,
+ const struct draw_vs_variant_key *key )
{
- struct draw_vs_varient *varient;
+ struct draw_vs_variant *variant;
unsigned i;
- /* Lookup existing varient:
+ /* Lookup existing variant:
*/
- for (i = 0; i < vs->nr_varients; i++)
- if (draw_vs_varient_key_compare(key, &vs->varient[i]->key) == 0)
- return vs->varient[i];
+ for (i = 0; i < vs->nr_variants; i++)
+ if (draw_vs_variant_key_compare(key, &vs->variant[i]->key) == 0)
+ return vs->variant[i];
/* Else have to create a new one:
*/
- varient = vs->create_varient( vs, key );
- if (varient == NULL)
+ variant = vs->create_variant( vs, key );
+ if (variant == NULL)
return NULL;
/* Add it to our list, could be smarter:
*/
- if (vs->nr_varients < Elements(vs->varient)) {
- vs->varient[vs->nr_varients++] = varient;
+ if (vs->nr_variants < Elements(vs->variant)) {
+ vs->variant[vs->nr_variants++] = variant;
}
else {
- vs->last_varient++;
- vs->last_varient %= Elements(vs->varient);
- vs->varient[vs->last_varient]->destroy(vs->varient[vs->last_varient]);
- vs->varient[vs->last_varient] = varient;
+ vs->last_variant++;
+ vs->last_variant %= Elements(vs->variant);
+ vs->variant[vs->last_variant]->destroy(vs->variant[vs->last_variant]);
+ vs->variant[vs->last_variant] = variant;
}
/* Done
*/
- return varient;
+ return variant;
}
diff --git a/src/gallium/auxiliary/draw/draw_vs.h b/src/gallium/auxiliary/draw/draw_vs.h
index f9a038788fb..e6d187e9774 100644
--- a/src/gallium/auxiliary/draw/draw_vs.h
+++ b/src/gallium/auxiliary/draw/draw_vs.h
@@ -33,12 +33,13 @@
#include "draw_context.h"
#include "draw_private.h"
+#include "draw_vertex.h"
struct draw_context;
struct pipe_shader_state;
-struct draw_varient_input
+struct draw_variant_input
{
enum pipe_format format;
unsigned buffer;
@@ -46,19 +47,19 @@ struct draw_varient_input
unsigned instance_divisor;
};
-struct draw_varient_output
+struct draw_variant_output
{
- enum pipe_format format; /* output format */
+ enum attrib_emit format; /* output format */
unsigned vs_output:8; /* which vertex shader output is this? */
unsigned offset:24; /* offset into output vertex */
};
-struct draw_varient_element {
- struct draw_varient_input in;
- struct draw_varient_output out;
+struct draw_variant_element {
+ struct draw_variant_input in;
+ struct draw_variant_output out;
};
-struct draw_vs_varient_key {
+struct draw_vs_variant_key {
unsigned output_stride;
unsigned nr_elements:8; /* max2(nr_inputs, nr_outputs) */
unsigned nr_inputs:8;
@@ -66,34 +67,34 @@ struct draw_vs_varient_key {
unsigned viewport:1;
unsigned clip:1;
unsigned const_vbuffers:5;
- struct draw_varient_element element[PIPE_MAX_ATTRIBS];
+ struct draw_variant_element element[PIPE_MAX_ATTRIBS];
};
-struct draw_vs_varient;
+struct draw_vs_variant;
-struct draw_vs_varient {
- struct draw_vs_varient_key key;
+struct draw_vs_variant {
+ struct draw_vs_variant_key key;
struct draw_vertex_shader *vs;
- void (*set_buffer)( struct draw_vs_varient *,
+ void (*set_buffer)( struct draw_vs_variant *,
unsigned i,
const void *ptr,
unsigned stride,
unsigned max_stride );
- void (PIPE_CDECL *run_linear)( struct draw_vs_varient *shader,
+ void (PIPE_CDECL *run_linear)( struct draw_vs_variant *shader,
unsigned start,
unsigned count,
void *output_buffer );
- void (PIPE_CDECL *run_elts)( struct draw_vs_varient *shader,
+ void (PIPE_CDECL *run_elts)( struct draw_vs_variant *shader,
const unsigned *elts,
unsigned count,
void *output_buffer );
- void (*destroy)( struct draw_vs_varient * );
+ void (*destroy)( struct draw_vs_variant * );
};
@@ -117,11 +118,11 @@ struct draw_vertex_shader {
/*
*/
- struct draw_vs_varient *varient[16];
- unsigned nr_varients;
- unsigned last_varient;
- struct draw_vs_varient *(*create_varient)( struct draw_vertex_shader *shader,
- const struct draw_vs_varient_key *key );
+ struct draw_vs_variant *variant[16];
+ unsigned nr_variants;
+ unsigned last_variant;
+ struct draw_vs_variant *(*create_variant)( struct draw_vertex_shader *shader,
+ const struct draw_vs_variant_key *key );
void (*prepare)( struct draw_vertex_shader *shader,
@@ -144,9 +145,9 @@ struct draw_vertex_shader {
};
-struct draw_vs_varient *
-draw_vs_lookup_varient( struct draw_vertex_shader *base,
- const struct draw_vs_varient_key *key );
+struct draw_vs_variant *
+draw_vs_lookup_variant( struct draw_vertex_shader *base,
+ const struct draw_vs_variant_key *key );
/********************************************************************************
@@ -166,12 +167,12 @@ draw_create_vs_ppc(struct draw_context *draw,
const struct pipe_shader_state *templ);
-struct draw_vs_varient_key;
+struct draw_vs_variant_key;
struct draw_vertex_shader;
-struct draw_vs_varient *
-draw_vs_create_varient_aos_sse( struct draw_vertex_shader *vs,
- const struct draw_vs_varient_key *key );
+struct draw_vs_variant *
+draw_vs_create_variant_aos_sse( struct draw_vertex_shader *vs,
+ const struct draw_vs_variant_key *key );
#if HAVE_LLVM
struct draw_vertex_shader *
@@ -181,7 +182,7 @@ draw_create_vs_llvm(struct draw_context *draw,
/********************************************************************************
- * Helpers for vs implementations that don't do their own fetch/emit varients.
+ * Helpers for vs implementations that don't do their own fetch/emit variants.
* Means these can be shared between shaders.
*/
struct translate;
@@ -194,21 +195,21 @@ struct translate *draw_vs_get_fetch( struct draw_context *draw,
struct translate *draw_vs_get_emit( struct draw_context *draw,
struct translate_key *key );
-struct draw_vs_varient *
-draw_vs_create_varient_generic( struct draw_vertex_shader *vs,
- const struct draw_vs_varient_key *key );
+struct draw_vs_variant *
+draw_vs_create_variant_generic( struct draw_vertex_shader *vs,
+ const struct draw_vs_variant_key *key );
-static INLINE int draw_vs_varient_keysize( const struct draw_vs_varient_key *key )
+static INLINE int draw_vs_variant_keysize( const struct draw_vs_variant_key *key )
{
- return 2 * sizeof(int) + key->nr_elements * sizeof(struct draw_varient_element);
+ return 2 * sizeof(int) + key->nr_elements * sizeof(struct draw_variant_element);
}
-static INLINE int draw_vs_varient_key_compare( const struct draw_vs_varient_key *a,
- const struct draw_vs_varient_key *b )
+static INLINE int draw_vs_variant_key_compare( const struct draw_vs_variant_key *a,
+ const struct draw_vs_variant_key *b )
{
- int keysize = draw_vs_varient_keysize(a);
+ int keysize = draw_vs_variant_keysize(a);
return memcmp(a, b, keysize);
}
diff --git a/src/gallium/auxiliary/draw/draw_vs_aos.c b/src/gallium/auxiliary/draw/draw_vs_aos.c
index 19f49e34c8b..7b90dba0cd5 100644
--- a/src/gallium/auxiliary/draw/draw_vs_aos.c
+++ b/src/gallium/auxiliary/draw/draw_vs_aos.c
@@ -1918,7 +1918,7 @@ static void find_last_write_outputs( struct aos_compilation *cp )
#define ARG_OUTBUF 4
-static boolean build_vertex_program( struct draw_vs_varient_aos_sse *varient,
+static boolean build_vertex_program( struct draw_vs_variant_aos_sse *variant,
boolean linear )
{
struct tgsi_parse_context parse;
@@ -1927,14 +1927,14 @@ static boolean build_vertex_program( struct draw_vs_varient_aos_sse *varient,
util_init_math();
- tgsi_parse_init( &parse, varient->base.vs->state.tokens );
+ tgsi_parse_init( &parse, variant->base.vs->state.tokens );
memset(&cp, 0, sizeof(cp));
cp.insn_counter = 1;
- cp.vaos = varient;
+ cp.vaos = variant;
cp.have_sse2 = 1;
- cp.func = &varient->func[ linear ? 0 : 1 ];
+ cp.func = &variant->func[ linear ? 0 : 1 ];
cp.tmp_EAX = x86_make_reg(file_REG32, reg_AX);
cp.idx_EBX = x86_make_reg(file_REG32, reg_BX);
@@ -2090,20 +2090,20 @@ static boolean build_vertex_program( struct draw_vs_varient_aos_sse *varient,
/** cast wrapper */
-static INLINE struct draw_vs_varient_aos_sse *
-draw_vs_varient_aos_sse(struct draw_vs_varient *varient)
+static INLINE struct draw_vs_variant_aos_sse *
+draw_vs_variant_aos_sse(struct draw_vs_variant *variant)
{
- return (struct draw_vs_varient_aos_sse *) varient;
+ return (struct draw_vs_variant_aos_sse *) variant;
}
-static void vaos_set_buffer( struct draw_vs_varient *varient,
+static void vaos_set_buffer( struct draw_vs_variant *variant,
unsigned buf,
const void *ptr,
unsigned stride,
unsigned max_stride)
{
- struct draw_vs_varient_aos_sse *vaos = draw_vs_varient_aos_sse(varient);
+ struct draw_vs_variant_aos_sse *vaos = draw_vs_variant_aos_sse(variant);
if (buf < vaos->nr_vb) {
vaos->buffer[buf].base_ptr = (char *)ptr;
@@ -2115,12 +2115,12 @@ static void vaos_set_buffer( struct draw_vs_varient *varient,
-static void PIPE_CDECL vaos_run_elts( struct draw_vs_varient *varient,
+static void PIPE_CDECL vaos_run_elts( struct draw_vs_variant *variant,
const unsigned *elts,
unsigned count,
void *output_buffer )
{
- struct draw_vs_varient_aos_sse *vaos = draw_vs_varient_aos_sse(varient);
+ struct draw_vs_variant_aos_sse *vaos = draw_vs_variant_aos_sse(variant);
struct aos_machine *machine = vaos->draw->vs.aos_machine;
unsigned i;
@@ -2139,12 +2139,12 @@ static void PIPE_CDECL vaos_run_elts( struct draw_vs_varient *varient,
output_buffer );
}
-static void PIPE_CDECL vaos_run_linear( struct draw_vs_varient *varient,
+static void PIPE_CDECL vaos_run_linear( struct draw_vs_variant *variant,
unsigned start,
unsigned count,
void *output_buffer )
{
- struct draw_vs_varient_aos_sse *vaos = draw_vs_varient_aos_sse(varient);
+ struct draw_vs_variant_aos_sse *vaos = draw_vs_variant_aos_sse(variant);
struct aos_machine *machine = vaos->draw->vs.aos_machine;
unsigned i;
@@ -2171,9 +2171,9 @@ static void PIPE_CDECL vaos_run_linear( struct draw_vs_varient *varient,
-static void vaos_destroy( struct draw_vs_varient *varient )
+static void vaos_destroy( struct draw_vs_variant *variant )
{
- struct draw_vs_varient_aos_sse *vaos = draw_vs_varient_aos_sse(varient);
+ struct draw_vs_variant_aos_sse *vaos = draw_vs_variant_aos_sse(variant);
FREE( vaos->buffer );
@@ -2185,11 +2185,11 @@ static void vaos_destroy( struct draw_vs_varient *varient )
-static struct draw_vs_varient *varient_aos_sse( struct draw_vertex_shader *vs,
- const struct draw_vs_varient_key *key )
+static struct draw_vs_variant *variant_aos_sse( struct draw_vertex_shader *vs,
+ const struct draw_vs_variant_key *key )
{
unsigned i;
- struct draw_vs_varient_aos_sse *vaos = CALLOC_STRUCT(draw_vs_varient_aos_sse);
+ struct draw_vs_variant_aos_sse *vaos = CALLOC_STRUCT(draw_vs_variant_aos_sse);
if (!vaos)
goto fail;
@@ -2249,17 +2249,17 @@ static struct draw_vs_varient *varient_aos_sse( struct draw_vertex_shader *vs,
}
-struct draw_vs_varient *
-draw_vs_create_varient_aos_sse( struct draw_vertex_shader *vs,
- const struct draw_vs_varient_key *key )
+struct draw_vs_variant *
+draw_vs_create_variant_aos_sse( struct draw_vertex_shader *vs,
+ const struct draw_vs_variant_key *key )
{
- struct draw_vs_varient *varient = varient_aos_sse( vs, key );
+ struct draw_vs_variant *variant = variant_aos_sse( vs, key );
- if (varient == NULL) {
- varient = draw_vs_create_varient_generic( vs, key );
+ if (variant == NULL) {
+ variant = draw_vs_create_variant_generic( vs, key );
}
- return varient;
+ return variant;
}
diff --git a/src/gallium/auxiliary/draw/draw_vs_aos.h b/src/gallium/auxiliary/draw/draw_vs_aos.h
index 68e8295b5e1..55e63d8b9fa 100644
--- a/src/gallium/auxiliary/draw/draw_vs_aos.h
+++ b/src/gallium/auxiliary/draw/draw_vs_aos.h
@@ -98,9 +98,9 @@ struct aos_buffer {
-/* This is the temporary storage used by all the aos_sse vs varients.
+/* This is the temporary storage used by all the aos_sse vs variants.
* Create one per context and reuse by passing a pointer in at
- * vs_varient creation??
+ * vs_variant creation??
*/
struct aos_machine {
float input [MAX_INPUTS ][4];
@@ -134,7 +134,7 @@ struct aos_machine {
struct aos_compilation {
struct x86_function *func;
- struct draw_vs_varient_aos_sse *vaos;
+ struct draw_vs_variant_aos_sse *vaos;
unsigned insn_counter;
unsigned num_immediates;
@@ -234,8 +234,8 @@ typedef void (PIPE_CDECL *vaos_run_linear_func)( struct aos_machine *,
void *output_buffer);
-struct draw_vs_varient_aos_sse {
- struct draw_vs_varient base;
+struct draw_vs_variant_aos_sse {
+ struct draw_vs_variant base;
struct draw_context *draw;
struct aos_buffer *buffer;
diff --git a/src/gallium/auxiliary/draw/draw_vs_aos_io.c b/src/gallium/auxiliary/draw/draw_vs_aos_io.c
index 8f8bbe7cb88..f1dd4487732 100644
--- a/src/gallium/auxiliary/draw/draw_vs_aos_io.c
+++ b/src/gallium/auxiliary/draw/draw_vs_aos_io.c
@@ -384,7 +384,7 @@ static void emit_store_R8G8B8A8_UNORM( struct aos_compilation *cp,
static boolean emit_output( struct aos_compilation *cp,
struct x86_reg ptr,
struct x86_reg dataXMM,
- unsigned format )
+ enum attrib_emit format )
{
switch (format) {
case EMIT_1F:
@@ -422,7 +422,7 @@ boolean aos_emit_outputs( struct aos_compilation *cp )
unsigned i;
for (i = 0; i < cp->vaos->base.key.nr_outputs; i++) {
- unsigned format = cp->vaos->base.key.element[i].out.format;
+ enum attrib_emit format = cp->vaos->base.key.element[i].out.format;
unsigned offset = cp->vaos->base.key.element[i].out.offset;
unsigned vs_output = cp->vaos->base.key.element[i].out.vs_output;
diff --git a/src/gallium/auxiliary/draw/draw_vs_exec.c b/src/gallium/auxiliary/draw/draw_vs_exec.c
index dab3eb1ca8e..c41d7c42a01 100644
--- a/src/gallium/auxiliary/draw/draw_vs_exec.c
+++ b/src/gallium/auxiliary/draw/draw_vs_exec.c
@@ -99,6 +99,12 @@ vs_exec_run_linear( struct draw_vertex_shader *shader,
tgsi_exec_set_constant_buffers(machine, PIPE_MAX_CONSTANT_BUFFERS,
constants, const_size);
+ if (shader->info.uses_instanceid) {
+ unsigned i = machine->SysSemanticToIndex[TGSI_SEMANTIC_INSTANCEID];
+ assert(i < Elements(machine->SystemValue));
+ machine->SystemValue[i][0] = shader->draw->instance_id;
+ }
+
for (i = 0; i < count; i += MAX_TGSI_VERTICES) {
unsigned int max_vertices = MIN2(MAX_TGSI_VERTICES, count - i);
@@ -203,7 +209,7 @@ draw_create_vs_exec(struct draw_context *draw,
vs->base.prepare = vs_exec_prepare;
vs->base.run_linear = vs_exec_run_linear;
vs->base.delete = vs_exec_delete;
- vs->base.create_varient = draw_vs_create_varient_generic;
+ vs->base.create_variant = draw_vs_create_variant_generic;
vs->machine = draw->vs.machine;
return &vs->base;
diff --git a/src/gallium/auxiliary/draw/draw_vs_llvm.c b/src/gallium/auxiliary/draw/draw_vs_llvm.c
index fa9992db783..54a5574f73f 100644
--- a/src/gallium/auxiliary/draw/draw_vs_llvm.c
+++ b/src/gallium/auxiliary/draw/draw_vs_llvm.c
@@ -65,19 +65,7 @@ static void
vs_llvm_delete( struct draw_vertex_shader *dvs )
{
struct llvm_vertex_shader *shader = llvm_vertex_shader(dvs);
- struct pipe_fence_handle *fence = NULL;
struct draw_llvm_variant_list_item *li;
- struct pipe_context *pipe = dvs->draw->pipe;
-
- /*
- * XXX: This might be not neccessary at all.
- */
- pipe->flush(pipe, 0, &fence);
- if (fence) {
- pipe->screen->fence_finish(pipe->screen, fence, 0);
- pipe->screen->fence_reference(pipe->screen, &fence, NULL);
- }
-
li = first_elem(&shader->variants);
while(!at_end(&shader->variants, li)) {
@@ -119,7 +107,7 @@ draw_create_vs_llvm(struct draw_context *draw,
vs->base.prepare = vs_llvm_prepare;
vs->base.run_linear = vs_llvm_run_linear;
vs->base.delete = vs_llvm_delete;
- vs->base.create_varient = draw_vs_create_varient_generic;
+ vs->base.create_variant = draw_vs_create_variant_generic;
make_empty_list(&vs->variants);
diff --git a/src/gallium/auxiliary/draw/draw_vs_ppc.c b/src/gallium/auxiliary/draw/draw_vs_ppc.c
index 5df84916c51..cf894bbe8af 100644
--- a/src/gallium/auxiliary/draw/draw_vs_ppc.c
+++ b/src/gallium/auxiliary/draw/draw_vs_ppc.c
@@ -187,10 +187,10 @@ draw_create_vs_ppc(struct draw_context *draw,
vs->base.draw = draw;
#if 0
if (1)
- vs->base.create_varient = draw_vs_varient_aos_ppc;
+ vs->base.create_variant = draw_vs_variant_aos_ppc;
else
#endif
- vs->base.create_varient = draw_vs_create_varient_generic;
+ vs->base.create_variant = draw_vs_create_variant_generic;
vs->base.prepare = vs_ppc_prepare;
vs->base.run_linear = vs_ppc_run_linear;
vs->base.delete = vs_ppc_delete;
diff --git a/src/gallium/auxiliary/draw/draw_vs_sse.c b/src/gallium/auxiliary/draw/draw_vs_sse.c
index 0b0c6077c6f..d918579bda4 100644
--- a/src/gallium/auxiliary/draw/draw_vs_sse.c
+++ b/src/gallium/auxiliary/draw/draw_vs_sse.c
@@ -71,6 +71,12 @@ vs_sse_prepare( struct draw_vertex_shader *base,
struct tgsi_exec_machine *machine = shader->machine;
machine->Samplers = draw->vs.samplers;
+
+ if (base->info.uses_instanceid) {
+ unsigned i = machine->SysSemanticToIndex[TGSI_SEMANTIC_INSTANCEID];
+ assert(i < Elements(machine->SystemValue));
+ machine->SystemValue[i][0] = base->draw->instance_id;
+ }
}
@@ -166,9 +172,9 @@ draw_create_vs_sse(struct draw_context *draw,
vs->base.draw = draw;
if (1)
- vs->base.create_varient = draw_vs_create_varient_aos_sse;
+ vs->base.create_variant = draw_vs_create_variant_aos_sse;
else
- vs->base.create_varient = draw_vs_create_varient_generic;
+ vs->base.create_variant = draw_vs_create_variant_generic;
vs->base.prepare = vs_sse_prepare;
vs->base.run_linear = vs_sse_run_linear;
vs->base.delete = vs_sse_delete;
@@ -194,7 +200,8 @@ draw_create_vs_sse(struct draw_context *draw,
return &vs->base;
fail:
- debug_error("tgsi_emit_sse2() failed, falling back to interpreter\n");
+ if (0)
+ debug_warning("tgsi_emit_sse2() failed, falling back to interpreter\n");
x86_release_func( &vs->sse2_program );
diff --git a/src/gallium/auxiliary/draw/draw_vs_varient.c b/src/gallium/auxiliary/draw/draw_vs_varient.c
index eacd1601877..d8f030f61eb 100644
--- a/src/gallium/auxiliary/draw/draw_vs_varient.c
+++ b/src/gallium/auxiliary/draw/draw_vs_varient.c
@@ -41,8 +41,8 @@
/* A first pass at incorporating vertex fetch/emit functionality into
*/
-struct draw_vs_varient_generic {
- struct draw_vs_varient base;
+struct draw_vs_variant_generic {
+ struct draw_vs_variant base;
struct draw_vertex_shader *shader;
struct draw_context *draw;
@@ -63,13 +63,13 @@ struct draw_vs_varient_generic {
-static void vsvg_set_buffer( struct draw_vs_varient *varient,
+static void vsvg_set_buffer( struct draw_vs_variant *variant,
unsigned buffer,
const void *ptr,
unsigned stride,
unsigned max_index )
{
- struct draw_vs_varient_generic *vsvg = (struct draw_vs_varient_generic *)varient;
+ struct draw_vs_variant_generic *vsvg = (struct draw_vs_variant_generic *)variant;
vsvg->fetch->set_buffer(vsvg->fetch,
buffer,
@@ -81,7 +81,7 @@ static void vsvg_set_buffer( struct draw_vs_varient *varient,
/* Mainly for debug at this stage:
*/
-static void do_rhw_viewport( struct draw_vs_varient_generic *vsvg,
+static void do_rhw_viewport( struct draw_vs_variant_generic *vsvg,
unsigned count,
void *output_buffer )
{
@@ -104,7 +104,7 @@ static void do_rhw_viewport( struct draw_vs_varient_generic *vsvg,
}
}
-static void do_viewport( struct draw_vs_varient_generic *vsvg,
+static void do_viewport( struct draw_vs_variant_generic *vsvg,
unsigned count,
void *output_buffer )
{
@@ -126,12 +126,12 @@ static void do_viewport( struct draw_vs_varient_generic *vsvg,
}
-static void PIPE_CDECL vsvg_run_elts( struct draw_vs_varient *varient,
+static void PIPE_CDECL vsvg_run_elts( struct draw_vs_variant *variant,
const unsigned *elts,
unsigned count,
void *output_buffer)
{
- struct draw_vs_varient_generic *vsvg = (struct draw_vs_varient_generic *)varient;
+ struct draw_vs_variant_generic *vsvg = (struct draw_vs_variant_generic *)variant;
unsigned temp_vertex_stride = vsvg->temp_vertex_stride;
void *temp_buffer = MALLOC( align(count,4) * temp_vertex_stride );
@@ -193,12 +193,12 @@ static void PIPE_CDECL vsvg_run_elts( struct draw_vs_varient *varient,
}
-static void PIPE_CDECL vsvg_run_linear( struct draw_vs_varient *varient,
+static void PIPE_CDECL vsvg_run_linear( struct draw_vs_variant *variant,
unsigned start,
unsigned count,
void *output_buffer )
{
- struct draw_vs_varient_generic *vsvg = (struct draw_vs_varient_generic *)varient;
+ struct draw_vs_variant_generic *vsvg = (struct draw_vs_variant_generic *)variant;
unsigned temp_vertex_stride = vsvg->temp_vertex_stride;
void *temp_buffer = MALLOC( align(count,4) * temp_vertex_stride );
@@ -259,20 +259,20 @@ static void PIPE_CDECL vsvg_run_linear( struct draw_vs_varient *varient,
-static void vsvg_destroy( struct draw_vs_varient *varient )
+static void vsvg_destroy( struct draw_vs_variant *variant )
{
- FREE(varient);
+ FREE(variant);
}
-struct draw_vs_varient *
-draw_vs_create_varient_generic( struct draw_vertex_shader *vs,
- const struct draw_vs_varient_key *key )
+struct draw_vs_variant *
+draw_vs_create_variant_generic( struct draw_vertex_shader *vs,
+ const struct draw_vs_variant_key *key )
{
unsigned i;
struct translate_key fetch, emit;
- struct draw_vs_varient_generic *vsvg = CALLOC_STRUCT( draw_vs_varient_generic );
+ struct draw_vs_variant_generic *vsvg = CALLOC_STRUCT( draw_vs_variant_generic );
if (vsvg == NULL)
return NULL;
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_const.h b/src/gallium/auxiliary/gallivm/lp_bld_const.h
index c749a7a3150..69718eb4b3d 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_const.h
+++ b/src/gallium/auxiliary/gallivm/lp_bld_const.h
@@ -125,4 +125,22 @@ lp_build_const_float(struct gallivm_state *gallivm, float x)
}
+/** Return constant-valued pointer to int */
+static INLINE LLVMValueRef
+lp_build_const_int_pointer(struct gallivm_state *gallivm, const void *ptr)
+{
+ LLVMTypeRef int_type;
+ LLVMValueRef v;
+
+ /* int type large enough to hold a pointer */
+ int_type = LLVMIntTypeInContext(gallivm->context, 8 * sizeof(void *));
+ v = LLVMConstInt(int_type, (uintptr_t) ptr, 0);
+ v = LLVMBuildIntToPtr(gallivm->builder, v,
+ LLVMPointerType(int_type, 0),
+ "cast int to ptr");
+ return v;
+}
+
+
+
#endif /* !LP_BLD_CONST_H */
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_conv.c b/src/gallium/auxiliary/gallivm/lp_bld_conv.c
index c43ee8ac638..c261d761161 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_conv.c
+++ b/src/gallium/auxiliary/gallivm/lp_bld_conv.c
@@ -231,44 +231,53 @@ lp_build_unsigned_norm_to_float(struct gallivm_state *gallivm,
assert(dst_type.floating);
- /* Special-case int8->float, though most cases could be handled
- * this way:
- */
- if (src_width == 8) {
- scale = 1.0/255.0;
+ mantissa = lp_mantissa(dst_type);
+
+ if (src_width <= (mantissa + 1)) {
+ /*
+ * The source width matches fits what can be represented in floating
+ * point (i.e., mantissa + 1 bits). So do a straight multiplication
+ * followed by casting. No further rounding is necessary.
+ */
+
+ scale = 1.0/(double)((1ULL << src_width) - 1);
res = LLVMBuildSIToFP(builder, src, vec_type, "");
res = LLVMBuildFMul(builder, res,
lp_build_const_vec(gallivm, dst_type, scale), "");
return res;
}
+ else {
+ /*
+ * The source width exceeds what can be represented in floating
+ * point. So truncate the incoming values.
+ */
- mantissa = lp_mantissa(dst_type);
-
- n = MIN2(mantissa, src_width);
+ n = MIN2(mantissa, src_width);
- ubound = ((unsigned long long)1 << n);
- mask = ubound - 1;
- scale = (double)ubound/mask;
- bias = (double)((unsigned long long)1 << (mantissa - n));
+ ubound = ((unsigned long long)1 << n);
+ mask = ubound - 1;
+ scale = (double)ubound/mask;
+ bias = (double)((unsigned long long)1 << (mantissa - n));
- res = src;
+ res = src;
- if(src_width > mantissa) {
- int shift = src_width - mantissa;
- res = LLVMBuildLShr(builder, res,
- lp_build_const_int_vec(gallivm, dst_type, shift), "");
- }
+ if (src_width > mantissa) {
+ int shift = src_width - mantissa;
+ res = LLVMBuildLShr(builder, res,
+ lp_build_const_int_vec(gallivm, dst_type, shift), "");
+ }
- bias_ = lp_build_const_vec(gallivm, dst_type, bias);
+ bias_ = lp_build_const_vec(gallivm, dst_type, bias);
- res = LLVMBuildOr(builder,
- res,
- LLVMBuildBitCast(builder, bias_, int_vec_type, ""), "");
+ res = LLVMBuildOr(builder,
+ res,
+ LLVMBuildBitCast(builder, bias_, int_vec_type, ""), "");
- res = LLVMBuildBitCast(builder, res, vec_type, "");
+ res = LLVMBuildBitCast(builder, res, vec_type, "");
- res = LLVMBuildFSub(builder, res, bias_, "");
- res = LLVMBuildFMul(builder, res, lp_build_const_vec(gallivm, dst_type, scale), "");
+ res = LLVMBuildFSub(builder, res, bias_, "");
+ res = LLVMBuildFMul(builder, res, lp_build_const_vec(gallivm, dst_type, scale), "");
+ }
return res;
}
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_debug.c b/src/gallium/auxiliary/gallivm/lp_bld_debug.c
deleted file mode 100644
index 93e56553d7b..00000000000
--- a/src/gallium/auxiliary/gallivm/lp_bld_debug.c
+++ /dev/null
@@ -1,141 +0,0 @@
-/**************************************************************************
- *
- * 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 VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR
- * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
- * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- **************************************************************************/
-
-
-#ifdef HAVE_UDIS86
-#include <udis86.h>
-#endif
-
-#include "util/u_math.h"
-#include "util/u_debug.h"
-#include "lp_bld_debug.h"
-
-
-/**
- * Check alignment.
- *
- * It is important that this check is not implemented as a macro or inlined
- * function, as the compiler assumptions in respect to alignment of global
- * and stack variables would often make the check a no op, defeating the
- * whole purpose of the exercise.
- */
-boolean
-lp_check_alignment(const void *ptr, unsigned alignment)
-{
- assert(util_is_power_of_two(alignment));
- return ((uintptr_t)ptr & (alignment - 1)) == 0;
-}
-
-
-void
-lp_disassemble(const void* func)
-{
-#ifdef HAVE_UDIS86
- ud_t ud_obj;
- uint64_t max_jmp_pc;
- uint inst_no;
- boolean emit_addrs = TRUE, emit_line_nos = FALSE;
-
- ud_init(&ud_obj);
-
- ud_set_input_buffer(&ud_obj, (void*)func, 0xffff);
-
- max_jmp_pc = (uint64_t) (uintptr_t) func;
- ud_set_pc(&ud_obj, max_jmp_pc);
-
-#ifdef PIPE_ARCH_X86
- ud_set_mode(&ud_obj, 32);
-#endif
-#ifdef PIPE_ARCH_X86_64
- ud_set_mode(&ud_obj, 64);
-#endif
-
- ud_set_syntax(&ud_obj, UD_SYN_ATT);
-
- while (ud_disassemble(&ud_obj)) {
-
- if (emit_addrs) {
-#ifdef PIPE_ARCH_X86
- debug_printf("0x%08lx:\t", (unsigned long)ud_insn_off(&ud_obj));
-#endif
-#ifdef PIPE_ARCH_X86_64
- debug_printf("0x%016llx:\t", (unsigned long long)ud_insn_off(&ud_obj));
-#endif
- }
- else if (emit_line_nos) {
- debug_printf("%6d:\t", inst_no);
- inst_no++;
- }
-#if 0
- debug_printf("%-16s ", ud_insn_hex(&ud_obj));
-#endif
-
- debug_printf("%s\n", ud_insn_asm(&ud_obj));
-
- if(ud_obj.mnemonic != UD_Icall) {
- unsigned i;
- for(i = 0; i < 3; ++i) {
- const struct ud_operand *op = &ud_obj.operand[i];
- if (op->type == UD_OP_JIMM){
- uint64_t pc = ud_obj.pc;
-
- switch (op->size) {
- case 8:
- pc += op->lval.sbyte;
- break;
- case 16:
- pc += op->lval.sword;
- break;
- case 32:
- pc += op->lval.sdword;
- break;
- default:
- break;
- }
- if(pc > max_jmp_pc)
- max_jmp_pc = pc;
- }
- }
- }
-
- if (ud_obj.mnemonic == UD_Iinvalid ||
- (ud_insn_off(&ud_obj) >= max_jmp_pc &&
- (ud_obj.mnemonic == UD_Iret ||
- ud_obj.mnemonic == UD_Ijmp)))
- break;
- }
-
-#if 0
- /* Print GDB command, useful to verify udis86 output */
- debug_printf("disassemble %p %p\n", func, (void*)(uintptr_t)ud_obj.pc);
-#endif
-
- debug_printf("\n");
-#else
- (void)func;
-#endif
-}
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp b/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp
new file mode 100644
index 00000000000..bb2c82fe0ed
--- /dev/null
+++ b/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp
@@ -0,0 +1,357 @@
+/**************************************************************************
+ *
+ * Copyright 2009-2011 VMware, Inc.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+#include <llvm-c/Core.h>
+#include <llvm/Target/TargetMachine.h>
+#include <llvm/Target/TargetRegistry.h>
+#include <llvm/Target/TargetSelect.h>
+#include <llvm/Target/TargetInstrInfo.h>
+#include <llvm/Support/raw_ostream.h>
+#include <llvm/Support/MemoryObject.h>
+#include <llvm/System/Host.h>
+
+#if HAVE_LLVM >= 0x0207
+#include <llvm/MC/MCDisassembler.h>
+#include <llvm/MC/MCAsmInfo.h>
+#include <llvm/MC/MCInst.h>
+#include <llvm/MC/MCInstPrinter.h>
+#endif /* HAVE_LLVM >= 0x0207 */
+
+#include "util/u_math.h"
+#include "util/u_debug.h"
+
+#include "lp_bld_debug.h"
+
+
+
+/**
+ * Check alignment.
+ *
+ * It is important that this check is not implemented as a macro or inlined
+ * function, as the compiler assumptions in respect to alignment of global
+ * and stack variables would often make the check a no op, defeating the
+ * whole purpose of the exercise.
+ */
+extern "C" boolean
+lp_check_alignment(const void *ptr, unsigned alignment)
+{
+ assert(util_is_power_of_two(alignment));
+ return ((uintptr_t)ptr & (alignment - 1)) == 0;
+}
+
+
+class raw_debug_ostream :
+ public llvm::raw_ostream
+{
+ uint64_t pos;
+
+ void write_impl(const char *Ptr, size_t Size);
+ uint64_t current_pos() { return pos; }
+ uint64_t current_pos() const { return pos; }
+
+#if HAVE_LLVM >= 0x207
+ uint64_t preferred_buffer_size() { return 512; }
+#else
+ size_t preferred_buffer_size() { return 512; }
+#endif
+};
+
+
+void
+raw_debug_ostream::write_impl(const char *Ptr, size_t Size)
+{
+ if (Size > 0) {
+ char *lastPtr = (char *)&Ptr[Size];
+ char last = *lastPtr;
+ *lastPtr = 0;
+ _debug_printf("%*s", Size, Ptr);
+ *lastPtr = last;
+ pos += Size;
+ }
+}
+
+
+/**
+ * Same as LLVMDumpValue, but through our debugging channels.
+ */
+extern "C" void
+lp_debug_dump_value(LLVMValueRef value)
+{
+#if (defined(PIPE_OS_WINDOWS) && !defined(PIPE_CC_MSVC)) || defined(PIPE_OS_EMBDDED)
+ raw_debug_ostream os;
+ llvm::unwrap(value)->print(os);
+ os.flush();
+#else
+ LLVMDumpValue(value);
+#endif
+}
+
+
+#if HAVE_LLVM >= 0x0207
+/*
+ * MemoryObject wrapper around a buffer of memory, to be used by MC
+ * disassembler.
+ */
+class BufferMemoryObject:
+ public llvm::MemoryObject
+{
+private:
+ const uint8_t *Bytes;
+ uint64_t Length;
+public:
+ BufferMemoryObject(const uint8_t *bytes, uint64_t length) :
+ Bytes(bytes), Length(length)
+ {
+ }
+
+ uint64_t getBase() const
+ {
+ return 0;
+ }
+
+ uint64_t getExtent() const
+ {
+ return Length;
+ }
+
+ int readByte(uint64_t addr, uint8_t *byte) const
+ {
+ if (addr > getExtent())
+ return -1;
+ *byte = Bytes[addr];
+ return 0;
+ }
+};
+#endif /* HAVE_LLVM >= 0x0207 */
+
+
+/*
+ * Disassemble a function, using the LLVM MC disassembler.
+ *
+ * See also:
+ * - http://blog.llvm.org/2010/01/x86-disassembler.html
+ * - http://blog.llvm.org/2010/04/intro-to-llvm-mc-project.html
+ */
+extern "C" void
+lp_disassemble(const void* func)
+{
+#if HAVE_LLVM >= 0x0207
+ using namespace llvm;
+
+ const uint8_t *bytes = (const uint8_t *)func;
+
+ /*
+ * Limit disassembly to this extent
+ */
+ const uint64_t extent = 0x10000;
+
+ uint64_t max_pc = 0;
+
+ /*
+ * Initialize all used objects.
+ */
+
+ std::string Triple = sys::getHostTriple();
+
+ std::string Error;
+ const Target *T = TargetRegistry::lookupTarget(Triple, Error);
+
+#if HAVE_LLVM >= 0x0208
+ InitializeNativeTargetAsmPrinter();
+#else
+ InitializeAllAsmPrinters();
+#endif
+
+ InitializeAllDisassemblers();
+
+ OwningPtr<const MCAsmInfo> AsmInfo(T->createAsmInfo(Triple));
+
+ if (!AsmInfo) {
+ debug_printf("error: no assembly info for target %s\n", Triple.c_str());
+ return;
+ }
+
+ OwningPtr<const MCDisassembler> DisAsm(T->createMCDisassembler());
+ if (!DisAsm) {
+ debug_printf("error: no disassembler for target %s\n", Triple.c_str());
+ return;
+ }
+
+ raw_debug_ostream Out;
+
+ int AsmPrinterVariant = AsmInfo->getAssemblerDialect();
+#if HAVE_LLVM >= 0x0208
+ OwningPtr<MCInstPrinter> Printer(
+ T->createMCInstPrinter(AsmPrinterVariant, *AsmInfo));
+#else
+ OwningPtr<MCInstPrinter> Printer(
+ T->createMCInstPrinter(AsmPrinterVariant, *AsmInfo, Out));
+#endif
+ if (!Printer) {
+ debug_printf("error: no instruction printer for target %s\n", Triple.c_str());
+ return;
+ }
+
+ TargetMachine *TM = T->createTargetMachine(Triple, "");
+
+ const TargetInstrInfo *TII = TM->getInstrInfo();
+
+ /*
+ * Wrap the data in a MemoryObject
+ */
+ BufferMemoryObject memoryObject((const uint8_t *)bytes, extent);
+
+ uint64_t pc;
+ pc = 0;
+ while (true) {
+ MCInst Inst;
+ uint64_t Size;
+
+ /*
+ * Print address. We use addresses relative to the start of the function,
+ * so that between runs.
+ */
+
+ debug_printf("%6lu:\t", (unsigned long)pc);
+
+ if (!DisAsm->getInstruction(Inst, Size, memoryObject,
+ pc,
+ nulls())) {
+ debug_printf("invalid\n");
+ pc += 1;
+ }
+
+ /*
+ * Output the bytes in hexidecimal format.
+ */
+
+ if (0) {
+ unsigned i;
+ for (i = 0; i < Size; ++i) {
+ debug_printf("%02x ", ((const uint8_t*)bytes)[pc + i]);
+ }
+ for (; i < 16; ++i) {
+ debug_printf(" ");
+ }
+ }
+
+ /*
+ * Print the instruction.
+ */
+
+#if HAVE_LLVM >= 0x208
+ Printer->printInst(&Inst, Out);
+#else
+ Printer->printInst(&Inst);
+#endif
+ Out.flush();
+
+ /*
+ * Advance.
+ */
+
+ pc += Size;
+
+ const TargetInstrDesc &TID = TII->get(Inst.getOpcode());
+
+ /*
+ * Keep track of forward jumps to a nearby address.
+ */
+
+ if (TID.isBranch()) {
+ for (unsigned i = 0; i < Inst.getNumOperands(); ++i) {
+ const MCOperand &operand = Inst.getOperand(i);
+ if (operand.isImm()) {
+ uint64_t jump;
+
+ /*
+ * FIXME: Handle both relative and absolute addresses correctly.
+ * EDInstInfo actually has this info, but operandTypes and
+ * operandFlags enums are not exposed in the public interface.
+ */
+
+ if (1) {
+ /*
+ * PC relative addr.
+ */
+
+ jump = pc + operand.getImm();
+ } else {
+ /*
+ * Absolute addr.
+ */
+
+ jump = (uint64_t)operand.getImm();
+ }
+
+ /*
+ * Output the address relative to the function start, given
+ * that MC will print the addresses relative the current pc.
+ */
+ debug_printf("\t\t; %lu", (unsigned long)jump);
+
+ /*
+ * Ignore far jumps given it could be actually a tail return to
+ * a random address.
+ */
+
+ if (jump > max_pc &&
+ jump < extent) {
+ max_pc = jump;
+ }
+ }
+ }
+ }
+
+ debug_printf("\n");
+
+ /*
+ * Stop disassembling on return statements, if there is no record of a
+ * jump to a successive address.
+ */
+
+ if (TID.isReturn()) {
+ if (pc > max_pc) {
+ break;
+ }
+ }
+ }
+
+ /*
+ * Print GDB command, useful to verify output.
+ */
+
+ if (0) {
+ debug_printf("disassemble %p %p\n", bytes, bytes + pc);
+ }
+
+ debug_printf("\n");
+#else /* HAVE_LLVM < 0x0207 */
+ (void)func;
+#endif /* HAVE_LLVM < 0x0207 */
+}
+
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_debug.h b/src/gallium/auxiliary/gallivm/lp_bld_debug.h
index 8a58f95b78f..da873f30b2d 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_debug.h
+++ b/src/gallium/auxiliary/gallivm/lp_bld_debug.h
@@ -45,6 +45,11 @@
#define GALLIVM_DEBUG_GC (1 << 6)
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
#ifdef DEBUG
extern unsigned gallivm_debug;
#else
@@ -81,4 +86,9 @@ void
lp_disassemble(const void* func);
+#ifdef __cplusplus
+}
+#endif
+
+
#endif /* !LP_BLD_DEBUG_H */
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_format_aos.c b/src/gallium/auxiliary/gallivm/lp_bld_format_aos.c
index 75d2e666f09..82ab19eda14 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_format_aos.c
+++ b/src/gallium/auxiliary/gallivm/lp_bld_format_aos.c
@@ -36,6 +36,7 @@
#include "util/u_format.h"
#include "util/u_memory.h"
#include "util/u_math.h"
+#include "util/u_pointer.h"
#include "util/u_string.h"
#include "lp_bld_arit.h"
@@ -511,8 +512,6 @@ lp_build_fetch_rgba_aos(struct gallivm_state *gallivm,
* or incentive to optimize.
*/
- LLVMModuleRef module = LLVMGetGlobalParent(LLVMGetBasicBlockParent(LLVMGetInsertBlock(gallivm->builder)));
- char name[256];
LLVMTypeRef i8t = LLVMInt8TypeInContext(gallivm->context);
LLVMTypeRef pi8t = LLVMPointerType(i8t, 0);
LLVMTypeRef i32t = LLVMInt32TypeInContext(gallivm->context);
@@ -522,19 +521,20 @@ lp_build_fetch_rgba_aos(struct gallivm_state *gallivm,
LLVMValueRef res;
unsigned k;
- util_snprintf(name, sizeof name, "util_format_%s_fetch_rgba_8unorm",
- format_desc->short_name);
-
if (gallivm_debug & GALLIVM_DEBUG_PERF) {
- debug_printf("%s: falling back to %s\n", __FUNCTION__, name);
+ debug_printf("%s: falling back to util_format_%s_fetch_rgba_8unorm\n",
+ __FUNCTION__, format_desc->short_name);
}
/*
* Declare and bind format_desc->fetch_rgba_8unorm().
*/
- function = LLVMGetNamedFunction(module, name);
- if (!function) {
+ {
+ /*
+ * Function to call looks like:
+ * fetch(uint8_t *dst, const uint8_t *src, unsigned i, unsigned j)
+ */
LLVMTypeRef ret_type;
LLVMTypeRef arg_types[4];
LLVMTypeRef function_type;
@@ -542,17 +542,19 @@ lp_build_fetch_rgba_aos(struct gallivm_state *gallivm,
ret_type = LLVMVoidTypeInContext(gallivm->context);
arg_types[0] = pi8t;
arg_types[1] = pi8t;
- arg_types[3] = arg_types[2] = LLVMIntTypeInContext(gallivm->context, sizeof(unsigned) * 8);
- function_type = LLVMFunctionType(ret_type, arg_types, Elements(arg_types), 0);
- function = LLVMAddFunction(module, name, function_type);
-
- LLVMSetFunctionCallConv(function, LLVMCCallConv);
- LLVMSetLinkage(function, LLVMExternalLinkage);
-
- assert(LLVMIsDeclaration(function));
-
- LLVMAddGlobalMapping(gallivm->engine, function,
- func_to_pointer((func_pointer)format_desc->fetch_rgba_8unorm));
+ arg_types[2] = i32t;
+ arg_types[3] = i32t;
+ function_type = LLVMFunctionType(ret_type, arg_types,
+ Elements(arg_types), 0);
+
+ /* make const pointer for the C fetch_rgba_8unorm function */
+ function = lp_build_const_int_pointer(gallivm,
+ func_to_pointer((func_pointer) format_desc->fetch_rgba_8unorm));
+
+ /* cast the callee pointer to the function's type */
+ function = LLVMBuildBitCast(builder, function,
+ LLVMPointerType(function_type, 0),
+ "cast callee");
}
tmp_ptr = lp_build_alloca(gallivm, i32t, "");
@@ -614,48 +616,55 @@ lp_build_fetch_rgba_aos(struct gallivm_state *gallivm,
* or incentive to optimize.
*/
- LLVMModuleRef module = LLVMGetGlobalParent(LLVMGetBasicBlockParent(LLVMGetInsertBlock(builder)));
- char name[256];
LLVMTypeRef f32t = LLVMFloatTypeInContext(gallivm->context);
LLVMTypeRef f32x4t = LLVMVectorType(f32t, 4);
LLVMTypeRef pf32t = LLVMPointerType(f32t, 0);
+ LLVMTypeRef pi8t = LLVMPointerType(LLVMInt8TypeInContext(gallivm->context), 0);
+ LLVMTypeRef i32t = LLVMInt32TypeInContext(gallivm->context);
LLVMValueRef function;
LLVMValueRef tmp_ptr;
LLVMValueRef tmps[LP_MAX_VECTOR_LENGTH/4];
LLVMValueRef res;
unsigned k;
- util_snprintf(name, sizeof name, "util_format_%s_fetch_rgba_float",
- format_desc->short_name);
-
if (gallivm_debug & GALLIVM_DEBUG_PERF) {
- debug_printf("%s: falling back to %s\n", __FUNCTION__, name);
+ debug_printf("%s: falling back to util_format_%s_fetch_rgba_float\n",
+ __FUNCTION__, format_desc->short_name);
}
/*
* Declare and bind format_desc->fetch_rgba_float().
*/
- function = LLVMGetNamedFunction(module, name);
- if (!function) {
+ {
+ /*
+ * Function to call looks like:
+ * fetch(float *dst, const uint8_t *src, unsigned i, unsigned j)
+ */
LLVMTypeRef ret_type;
LLVMTypeRef arg_types[4];
LLVMTypeRef function_type;
ret_type = LLVMVoidTypeInContext(gallivm->context);
arg_types[0] = pf32t;
- arg_types[1] = LLVMPointerType(LLVMInt8TypeInContext(gallivm->context), 0);
- arg_types[3] = arg_types[2] = LLVMIntTypeInContext(gallivm->context, sizeof(unsigned) * 8);
- function_type = LLVMFunctionType(ret_type, arg_types, Elements(arg_types), 0);
- function = LLVMAddFunction(module, name, function_type);
+ arg_types[1] = pi8t;
+ arg_types[2] = i32t;
+ arg_types[3] = i32t;
+ function_type = LLVMFunctionType(ret_type, arg_types,
+ Elements(arg_types), 0);
- LLVMSetFunctionCallConv(function, LLVMCCallConv);
- LLVMSetLinkage(function, LLVMExternalLinkage);
+ /* Note: we're using this casting here instead of LLVMAddGlobalMapping()
+ * to work around a bug in LLVM 2.6, and for efficiency/simplicity.
+ */
- assert(LLVMIsDeclaration(function));
+ /* make const pointer for the C fetch_rgba_float function */
+ function = lp_build_const_int_pointer(gallivm,
+ func_to_pointer((func_pointer) format_desc->fetch_rgba_float));
- LLVMAddGlobalMapping(gallivm->engine, function,
- func_to_pointer((func_pointer)format_desc->fetch_rgba_float));
+ /* cast the callee pointer to the function's type */
+ function = LLVMBuildBitCast(builder, function,
+ LLVMPointerType(function_type, 0),
+ "cast callee");
}
tmp_ptr = lp_build_alloca(gallivm, f32x4t, "");
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_init.c b/src/gallium/auxiliary/gallivm/lp_bld_init.c
index efe8d38b8f0..45addee8fab 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_init.c
+++ b/src/gallium/auxiliary/gallivm/lp_bld_init.c
@@ -30,6 +30,7 @@
#include "util/u_cpu_detect.h"
#include "util/u_debug.h"
#include "util/u_memory.h"
+#include "util/u_simple_list.h"
#include "lp_bld_debug.h"
#include "lp_bld_init.h"
@@ -221,11 +222,12 @@ free_gallivm_state(struct gallivm_state *gallivm)
static boolean
init_gallivm_state(struct gallivm_state *gallivm)
{
- assert(gallivm_initialized);
assert(!gallivm->context);
assert(!gallivm->module);
assert(!gallivm->provider);
+ lp_build_init();
+
gallivm->context = LLVMContextCreate();
if (!gallivm->context)
goto fail;
@@ -291,12 +293,12 @@ struct callback
{
garbage_collect_callback_func func;
void *cb_data;
+ struct callback *prev, *next;
};
-#define MAX_CALLBACKS 32
-static struct callback Callbacks[MAX_CALLBACKS];
-static unsigned NumCallbacks = 0;
+/** list of all garbage collector callbacks */
+static struct callback callback_list = {NULL, NULL, NULL, NULL};
/**
@@ -307,20 +309,24 @@ void
gallivm_register_garbage_collector_callback(garbage_collect_callback_func func,
void *cb_data)
{
- unsigned i;
+ struct callback *cb;
+
+ if (!callback_list.prev) {
+ make_empty_list(&callback_list);
+ }
- for (i = 0; i < NumCallbacks; i++) {
- if (Callbacks[i].func == func && Callbacks[i].cb_data == cb_data) {
- /* already in list: no-op */
+ /* see if already in list */
+ foreach(cb, &callback_list) {
+ if (cb->func == func && cb->cb_data == cb_data)
return;
- }
}
- assert(NumCallbacks < MAX_CALLBACKS);
- if (NumCallbacks < MAX_CALLBACKS) {
- Callbacks[NumCallbacks].func = func;
- Callbacks[NumCallbacks].cb_data = cb_data;
- NumCallbacks++;
+ /* add to list */
+ cb = CALLOC_STRUCT(callback);
+ if (cb) {
+ cb->func = func;
+ cb->cb_data = cb_data;
+ insert_at_head(&callback_list, cb);
}
}
@@ -332,15 +338,13 @@ void
gallivm_remove_garbage_collector_callback(garbage_collect_callback_func func,
void *cb_data)
{
- unsigned i;
-
- for (i = 0; i < NumCallbacks; i++) {
- if (Callbacks[i].func == func && Callbacks[i].cb_data == cb_data) {
- /* found, now remove it */
- NumCallbacks--;
- for ( ; i < NumCallbacks; i++) {
- Callbacks[i] = Callbacks[i + 1];
- }
+ struct callback *cb;
+
+ /* search list */
+ foreach(cb, &callback_list) {
+ if (cb->func == func && cb->cb_data == cb_data) {
+ /* found, remove it */
+ remove_from_list(cb);
return;
}
}
@@ -354,10 +358,9 @@ gallivm_remove_garbage_collector_callback(garbage_collect_callback_func func,
static void
call_garbage_collector_callbacks(void)
{
- unsigned i;
-
- for (i = 0; i < NumCallbacks; i++) {
- Callbacks[i].func(Callbacks[i].cb_data);
+ struct callback *cb;
+ foreach(cb, &callback_list) {
+ cb->func(cb->cb_data);
}
}
@@ -385,6 +388,9 @@ gallivm_garbage_collect(struct gallivm_state *gallivm)
void
lp_build_init(void)
{
+ if (gallivm_initialized)
+ return;
+
#ifdef DEBUG
gallivm_debug = debug_get_option_gallivm_debug();
#endif
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp
index f56ddee7fd7..843a14a500c 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp
+++ b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp
@@ -46,66 +46,6 @@
#include "util/u_debug.h"
-#if (defined(PIPE_OS_WINDOWS) && !defined(PIPE_CC_MSVC)) || defined(PIPE_OS_EMBDDED)
-
-#include "llvm/Support/raw_ostream.h"
-
-class raw_debug_ostream :
- public llvm::raw_ostream
-{
- uint64_t pos;
-
- void write_impl(const char *Ptr, size_t Size);
- uint64_t current_pos() { return pos; }
- uint64_t current_pos() const { return pos; }
-
-#if HAVE_LLVM >= 0x207
- uint64_t preferred_buffer_size() { return 512; }
-#else
- size_t preferred_buffer_size() { return 512; }
-#endif
-};
-
-
-void
-raw_debug_ostream::write_impl(const char *Ptr, size_t Size)
-{
- if (Size > 0) {
- char *lastPtr = (char *)&Ptr[Size];
- char last = *lastPtr;
- *lastPtr = 0;
- _debug_printf("%*s", Size, Ptr);
- *lastPtr = last;
- pos += Size;
- }
-}
-
-
-/**
- * Same as LLVMDumpValue, but through our debugging channels.
- */
-extern "C" void
-lp_debug_dump_value(LLVMValueRef value)
-{
- raw_debug_ostream os;
- llvm::unwrap(value)->print(os);
- os.flush();
-}
-
-
-#else
-
-
-extern "C" void
-lp_debug_dump_value(LLVMValueRef value)
-{
- LLVMDumpValue(value);
-}
-
-
-#endif
-
-
/**
* Register the engine with oprofile.
*
@@ -144,6 +84,7 @@ lp_set_target_options(void)
llvm::UnsafeFPMath = true;
#endif
+#if HAVE_LLVM < 0x0209
/*
* LLVM will generate MMX instructions for vectors <= 64 bits, leading to
* innefficient code, and in 32bit systems, to the corruption of the FPU
@@ -162,6 +103,7 @@ lp_set_target_options(void)
llvm::cl::ParseCommandLineOptions(2, const_cast<char**>(options));
first = FALSE;
}
+#endif
/*
* By default LLVM adds a signal handler to output a pretty stack trace.
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_sample_aos.c b/src/gallium/auxiliary/gallivm/lp_bld_sample_aos.c
index 991f6fa5ef7..e61cf9541ea 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_sample_aos.c
+++ b/src/gallium/auxiliary/gallivm/lp_bld_sample_aos.c
@@ -1098,6 +1098,4 @@ lp_build_sample_aos(struct lp_build_sample_context *bld,
texel_out[2] = unswizzled[2];
texel_out[3] = unswizzled[3];
}
-
- apply_sampler_swizzle(bld, texel_out);
}
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c b/src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c
index cf46e2be832..9961ba08f3a 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c
+++ b/src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c
@@ -187,8 +187,6 @@ lp_build_sample_texel_soa(struct lp_build_sample_context *bld,
border_chan_vec, texel_out[chan]);
}
}
-
- apply_sampler_swizzle(bld, texel_out);
}
@@ -834,14 +832,14 @@ lp_build_sample_mipmap(struct lp_build_sample_context *bld,
LLVMValueRef *colors_out)
{
LLVMBuilderRef builder = bld->gallivm->builder;
- LLVMValueRef size0;
- LLVMValueRef size1;
- LLVMValueRef row_stride0_vec;
- LLVMValueRef row_stride1_vec;
- LLVMValueRef img_stride0_vec;
- LLVMValueRef img_stride1_vec;
- LLVMValueRef data_ptr0;
- LLVMValueRef data_ptr1;
+ LLVMValueRef size0 = NULL;
+ LLVMValueRef size1 = NULL;
+ LLVMValueRef row_stride0_vec = NULL;
+ LLVMValueRef row_stride1_vec = NULL;
+ LLVMValueRef img_stride0_vec = NULL;
+ LLVMValueRef img_stride1_vec = NULL;
+ LLVMValueRef data_ptr0 = NULL;
+ LLVMValueRef data_ptr1 = NULL;
LLVMValueRef colors0[4], colors1[4];
unsigned chan;
@@ -1110,6 +1108,11 @@ lp_build_sample_compare(struct lp_build_sample_context *bld,
coord, tex);
}
+ /* Clamp p coords to [0,1] */
+ p = lp_build_clamp(&bld->coord_bld, p,
+ bld->coord_bld.zero,
+ bld->coord_bld.one);
+
/* result = (p FUNC texel) ? 1 : 0 */
res = lp_build_cmp(texel_bld, bld->static_state->compare_func,
p, texel[chan]);
@@ -1268,4 +1271,6 @@ lp_build_sample_soa(struct gallivm_state *gallivm,
}
lp_build_sample_compare(&bld, r, texel_out);
+
+ apply_sampler_swizzle(&bld, texel_out);
}
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_tgsi.h b/src/gallium/auxiliary/gallivm/lp_bld_tgsi.h
index 40186befb9f..9713d100484 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_tgsi.h
+++ b/src/gallium/auxiliary/gallivm/lp_bld_tgsi.h
@@ -180,6 +180,7 @@ lp_build_tgsi_soa(struct gallivm_state *gallivm,
struct lp_type type,
struct lp_build_mask_context *mask,
LLVMValueRef consts_ptr,
+ LLVMValueRef system_values_array,
const LLVMValueRef *pos,
const LLVMValueRef (*inputs)[4],
LLVMValueRef (*outputs)[4],
@@ -199,4 +200,11 @@ lp_build_tgsi_aos(struct gallivm_state *gallivm,
const struct tgsi_shader_info *info);
+LLVMValueRef
+lp_build_system_values_array(struct gallivm_state *gallivm,
+ const struct tgsi_shader_info *info,
+ LLVMValueRef instance_id,
+ LLVMValueRef facing);
+
+
#endif /* LP_BLD_TGSI_H */
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c b/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c
index 1b5a8a5903b..d1585c8e2b7 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c
+++ b/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c
@@ -157,6 +157,8 @@ struct lp_build_tgsi_soa_context
*/
LLVMValueRef inputs_array;
+ LLVMValueRef system_values_array;
+
const struct tgsi_shader_info *info;
/** bitmask indicating which register files are accessed indirectly */
unsigned indirect_files;
@@ -759,6 +761,23 @@ emit_fetch(
}
break;
+ case TGSI_FILE_SYSTEM_VALUE:
+ assert(!reg->Register.Indirect);
+ {
+ LLVMValueRef index; /* index into the system value array */
+ LLVMValueRef scalar, scalar_ptr;
+
+ index = lp_build_const_int32(gallivm,
+ reg->Register.Index * 4 + swizzle);
+
+ scalar_ptr = LLVMBuildGEP(builder, bld->system_values_array,
+ &index, 1, "");
+ scalar = LLVMBuildLoad(builder, scalar_ptr, "");
+
+ res = lp_build_broadcast_scalar(&bld->base, scalar);
+ }
+ break;
+
default:
assert(0 && "invalid src register in emit_fetch()");
return bld->base.undef;
@@ -2322,6 +2341,7 @@ lp_build_tgsi_soa(struct gallivm_state *gallivm,
struct lp_type type,
struct lp_build_mask_context *mask,
LLVMValueRef consts_ptr,
+ LLVMValueRef system_values_array,
const LLVMValueRef *pos,
const LLVMValueRef (*inputs)[NUM_CHANNELS],
LLVMValueRef (*outputs)[NUM_CHANNELS],
@@ -2411,6 +2431,8 @@ lp_build_tgsi_soa(struct gallivm_state *gallivm,
}
}
+ bld.system_values_array = system_values_array;
+
tgsi_parse_init( &parse, tokens );
while( !tgsi_parse_end_of_tokens( &parse ) ) {
@@ -2512,3 +2534,54 @@ lp_build_tgsi_soa(struct gallivm_state *gallivm,
FREE( bld.instructions );
}
+
+/**
+ * Build up the system values array out of individual values such as
+ * the instance ID, front-face, primitive ID, etc. The shader info is
+ * used to determine which system values are needed and where to put
+ * them in the system values array.
+ *
+ * XXX only instance ID is implemented at this time.
+ *
+ * The system values register file is similar to the constants buffer.
+ * Example declaration:
+ * DCL SV[0], INSTANCEID
+ * Example instruction:
+ * MOVE foo, SV[0].xxxx;
+ *
+ * \return LLVM float array (interpreted as float [][4])
+ */
+LLVMValueRef
+lp_build_system_values_array(struct gallivm_state *gallivm,
+ const struct tgsi_shader_info *info,
+ LLVMValueRef instance_id,
+ LLVMValueRef facing)
+{
+ LLVMValueRef size = lp_build_const_int32(gallivm, 4 * info->num_system_values);
+ LLVMTypeRef float_t = LLVMFloatTypeInContext(gallivm->context);
+ LLVMValueRef array = lp_build_array_alloca(gallivm, float_t,
+ size, "sysvals_array");
+ unsigned i;
+
+ for (i = 0; i < info->num_system_values; i++) {
+ LLVMValueRef index = lp_build_const_int32(gallivm, i * 4);
+ LLVMValueRef ptr, value;
+
+ switch (info->system_value_semantic_name[i]) {
+ case TGSI_SEMANTIC_INSTANCEID:
+ /* convert instance ID from int to float */
+ value = LLVMBuildSIToFP(gallivm->builder, instance_id, float_t,
+ "sysval_instanceid");
+ break;
+ case TGSI_SEMANTIC_FACE:
+ /* fall-through */
+ default:
+ assert(0 && "unexpected semantic in build_system_values_array()");
+ }
+
+ ptr = LLVMBuildGEP(gallivm->builder, array, &index, 1, "");
+ LLVMBuildStore(gallivm->builder, value, ptr);
+ }
+
+ return array;
+}
diff --git a/src/gallium/auxiliary/os/os_thread.h b/src/gallium/auxiliary/os/os_thread.h
index 64e3869a748..3ad7ce645d3 100644
--- a/src/gallium/auxiliary/os/os_thread.h
+++ b/src/gallium/auxiliary/os/os_thread.h
@@ -152,8 +152,9 @@ static INLINE int pipe_thread_destroy( pipe_thread thread )
*/
typedef CRITICAL_SECTION pipe_mutex;
+/* http://locklessinc.com/articles/pthreads_on_windows/ */
#define pipe_static_mutex(mutex) \
- /*static*/ pipe_mutex mutex = {0,0,0,0,0,0}
+ static pipe_mutex mutex = {(PCRITICAL_SECTION_DEBUG)-1, -1, 0, 0, 0, 0}
#define pipe_mutex_init(mutex) \
InitializeCriticalSection(&mutex)
diff --git a/src/gallium/auxiliary/pipebuffer/pb_buffer_malloc.c b/src/gallium/auxiliary/pipebuffer/pb_buffer_malloc.c
index c2322eed19b..5754f476188 100644
--- a/src/gallium/auxiliary/pipebuffer/pb_buffer_malloc.c
+++ b/src/gallium/auxiliary/pipebuffer/pb_buffer_malloc.c
@@ -174,11 +174,20 @@ pb_malloc_bufmgr_destroy(struct pb_manager *mgr)
}
+static boolean
+pb_malloc_bufmgr_is_buffer_busy( struct pb_manager *mgr,
+ struct pb_buffer *buf )
+{
+ return FALSE;
+}
+
+
static struct pb_manager
pb_malloc_bufmgr = {
pb_malloc_bufmgr_destroy,
pb_malloc_bufmgr_create_buffer,
- pb_malloc_bufmgr_flush
+ pb_malloc_bufmgr_flush,
+ pb_malloc_bufmgr_is_buffer_busy
};
diff --git a/src/gallium/auxiliary/pipebuffer/pb_bufmgr.h b/src/gallium/auxiliary/pipebuffer/pb_bufmgr.h
index 2ef02160f23..960068c494d 100644
--- a/src/gallium/auxiliary/pipebuffer/pb_bufmgr.h
+++ b/src/gallium/auxiliary/pipebuffer/pb_bufmgr.h
@@ -82,6 +82,10 @@ struct pb_manager
*/
void
(*flush)( struct pb_manager *mgr );
+
+ boolean
+ (*is_buffer_busy)( struct pb_manager *mgr,
+ struct pb_buffer *buf );
};
diff --git a/src/gallium/auxiliary/pipebuffer/pb_bufmgr_cache.c b/src/gallium/auxiliary/pipebuffer/pb_bufmgr_cache.c
index a6eb4039621..25accefa8d6 100644
--- a/src/gallium/auxiliary/pipebuffer/pb_bufmgr_cache.c
+++ b/src/gallium/auxiliary/pipebuffer/pb_bufmgr_cache.c
@@ -227,8 +227,6 @@ pb_cache_is_buffer_compat(struct pb_cache_buffer *buf,
pb_size size,
const struct pb_desc *desc)
{
- void *map;
-
if(buf->base.base.size < size)
return 0;
@@ -242,13 +240,18 @@ pb_cache_is_buffer_compat(struct pb_cache_buffer *buf,
if(!pb_check_usage(desc->usage, buf->base.base.usage))
return 0;
- map = pb_map(buf->buffer, PB_USAGE_DONTBLOCK, NULL);
- if (!map) {
- return -1;
+ if (buf->mgr->provider->is_buffer_busy) {
+ if (buf->mgr->provider->is_buffer_busy(buf->mgr->provider, buf->buffer))
+ return -1;
+ } else {
+ void *ptr = pb_map(buf->buffer, PB_USAGE_DONTBLOCK, NULL);
+
+ if (!ptr)
+ return -1;
+
+ pb_unmap(buf->buffer);
}
- pb_unmap(buf->buffer);
-
return 1;
}
diff --git a/src/gallium/auxiliary/rbug/rbug_context.c b/src/gallium/auxiliary/rbug/rbug_context.c
index a3fd7e8430e..36824058c7d 100644
--- a/src/gallium/auxiliary/rbug/rbug_context.c
+++ b/src/gallium/auxiliary/rbug/rbug_context.c
@@ -288,7 +288,6 @@ int rbug_send_context_draw_rule(struct rbug_connection *__con,
int rbug_send_context_flush(struct rbug_connection *__con,
rbug_context_t context,
- int32_t flags,
uint32_t *__serial)
{
uint32_t __len = 0;
@@ -298,7 +297,6 @@ int rbug_send_context_flush(struct rbug_connection *__con,
LEN(8); /* header */
LEN(8); /* context */
- LEN(4); /* flags */
/* align */
PAD(__len, 8);
@@ -310,7 +308,6 @@ int rbug_send_context_flush(struct rbug_connection *__con,
WRITE(4, int32_t, ((int32_t)RBUG_OP_CONTEXT_FLUSH));
WRITE(4, uint32_t, ((uint32_t)(__len / 4)));
WRITE(8, rbug_context_t, context); /* context */
- WRITE(4, int32_t, flags); /* flags */
/* final pad */
PAD(__pos, 8);
@@ -663,7 +660,6 @@ struct rbug_proto_context_flush * rbug_demarshal_context_flush(struct rbug_proto
ret->header.opcode = header->opcode;
READ(8, rbug_context_t, context); /* context */
- READ(4, int32_t, flags); /* flags */
return ret;
}
diff --git a/src/gallium/auxiliary/rbug/rbug_context.h b/src/gallium/auxiliary/rbug/rbug_context.h
index 03126d6b123..4a865c25fc5 100644
--- a/src/gallium/auxiliary/rbug/rbug_context.h
+++ b/src/gallium/auxiliary/rbug/rbug_context.h
@@ -96,7 +96,6 @@ struct rbug_proto_context_flush
{
struct rbug_header header;
rbug_context_t context;
- int32_t flags;
};
struct rbug_proto_context_list_reply
@@ -162,7 +161,6 @@ int rbug_send_context_draw_rule(struct rbug_connection *__con,
int rbug_send_context_flush(struct rbug_connection *__con,
rbug_context_t context,
- int32_t flags,
uint32_t *__serial);
int rbug_send_context_list_reply(struct rbug_connection *__con,
diff --git a/src/gallium/auxiliary/rtasm/rtasm_x86sse.c b/src/gallium/auxiliary/rtasm/rtasm_x86sse.c
index 75b0f6a68ea..b03dd3a0cf8 100644
--- a/src/gallium/auxiliary/rtasm/rtasm_x86sse.c
+++ b/src/gallium/auxiliary/rtasm/rtasm_x86sse.c
@@ -2132,7 +2132,8 @@ struct x86_reg x86_fn_arg( struct x86_function *p,
return x86_make_disp(x86_make_reg(file_REG32, reg_SP),
p->stack_offset + arg * 4); /* ??? */
default:
- abort();
+ assert(0 && "Unexpected x86 target ABI in x86_fn_arg");
+ return x86_make_reg(file_REG32, reg_CX); /* not used / silence warning */
}
}
diff --git a/src/gallium/auxiliary/target-helpers/inline_noop_helper.h b/src/gallium/auxiliary/target-helpers/inline_noop_helper.h
new file mode 100644
index 00000000000..77c7cfd0c20
--- /dev/null
+++ b/src/gallium/auxiliary/target-helpers/inline_noop_helper.h
@@ -0,0 +1,51 @@
+
+#ifndef INLINE_DEBUG_HELPER_H
+#define INLINE_DEBUG_HELPER_H
+
+#include "pipe/p_compiler.h"
+#include "util/u_debug.h"
+
+
+/* Helper function to wrap a screen with
+ * one or more debug driver: rbug, trace.
+ */
+
+#ifdef GALLIUM_TRACE
+#include "trace/tr_public.h"
+#endif
+
+#ifdef GALLIUM_RBUG
+#include "rbug/rbug_public.h"
+#endif
+
+#ifdef GALLIUM_GALAHAD
+#include "galahad/glhd_public.h"
+#endif
+
+#ifdef GALLIUM_NOOP
+#include "noop/noop_public.h"
+#endif
+
+static INLINE struct pipe_screen *
+debug_screen_wrap(struct pipe_screen *screen)
+{
+#if defined(GALLIUM_RBUG)
+ screen = rbug_screen_create(screen);
+#endif
+
+#if defined(GALLIUM_TRACE)
+ screen = trace_screen_create(screen);
+#endif
+
+#if defined(GALLIUM_GALAHAD)
+ screen = galahad_screen_create(screen);
+#endif
+
+#if defined(GALLIUM_NOOP)
+ screen = noop_screen_create(screen);
+#endif
+
+ return screen;
+}
+
+#endif
diff --git a/src/gallium/auxiliary/tgsi/tgsi_build.c b/src/gallium/auxiliary/tgsi/tgsi_build.c
index 16a205f2068..d2cb98e84af 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_build.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_build.c
@@ -26,6 +26,7 @@
**************************************************************************/
#include "util/u_debug.h"
+#include "pipe/p_format.h"
#include "pipe/p_shader_tokens.h"
#include "tgsi_build.h"
#include "tgsi_parse.h"
@@ -226,6 +227,45 @@ tgsi_build_declaration_semantic(
return ds;
}
+
+static struct tgsi_declaration_resource
+tgsi_default_declaration_resource(void)
+{
+ struct tgsi_declaration_resource declaration_resource;
+
+ declaration_resource.Resource = TGSI_TEXTURE_UNKNOWN;
+ declaration_resource.ReturnTypeX = PIPE_TYPE_UNORM;
+ declaration_resource.ReturnTypeY = PIPE_TYPE_UNORM;
+ declaration_resource.ReturnTypeZ = PIPE_TYPE_UNORM;
+ declaration_resource.ReturnTypeW = PIPE_TYPE_UNORM;
+
+ return declaration_resource;
+}
+
+static struct tgsi_declaration_resource
+tgsi_build_declaration_resource(unsigned texture,
+ unsigned return_type_x,
+ unsigned return_type_y,
+ unsigned return_type_z,
+ unsigned return_type_w,
+ struct tgsi_declaration *declaration,
+ struct tgsi_header *header)
+{
+ struct tgsi_declaration_resource declaration_resource;
+
+ declaration_resource = tgsi_default_declaration_resource();
+ declaration_resource.Resource = texture;
+ declaration_resource.ReturnTypeX = return_type_x;
+ declaration_resource.ReturnTypeY = return_type_y;
+ declaration_resource.ReturnTypeZ = return_type_z;
+ declaration_resource.ReturnTypeW = return_type_w;
+
+ declaration_grow(declaration, header);
+
+ return declaration_resource;
+}
+
+
struct tgsi_full_declaration
tgsi_default_full_declaration( void )
{
@@ -235,6 +275,7 @@ tgsi_default_full_declaration( void )
full_declaration.Range = tgsi_default_declaration_range();
full_declaration.Semantic = tgsi_default_declaration_semantic();
full_declaration.ImmediateData.u = NULL;
+ full_declaration.Resource = tgsi_default_declaration_resource();
return full_declaration;
}
@@ -324,6 +365,24 @@ tgsi_build_full_declaration(
}
}
+ if (full_decl->Declaration.File == TGSI_FILE_RESOURCE) {
+ struct tgsi_declaration_resource *dr;
+
+ if (maxsize <= size) {
+ return 0;
+ }
+ dr = (struct tgsi_declaration_resource *)&tokens[size];
+ size++;
+
+ *dr = tgsi_build_declaration_resource(full_decl->Resource.Resource,
+ full_decl->Resource.ReturnTypeX,
+ full_decl->Resource.ReturnTypeY,
+ full_decl->Resource.ReturnTypeZ,
+ full_decl->Resource.ReturnTypeW,
+ declaration,
+ header);
+ }
+
return size;
}
diff --git a/src/gallium/auxiliary/tgsi/tgsi_dump.c b/src/gallium/auxiliary/tgsi/tgsi_dump.c
index 77bde86684e..c12662076b1 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_dump.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_dump.c
@@ -104,7 +104,8 @@ tgsi_file_names[TGSI_FILE_COUNT] =
"PRED",
"SV",
"IMMX",
- "TEMPX"
+ "TEMPX",
+ "RES"
};
static const char *interpolate_names[] =
@@ -138,7 +139,7 @@ static const char *immediate_type_names[] =
};
const char *
-tgsi_swizzle_names[] =
+tgsi_swizzle_names[4] =
{
"x",
"y",
@@ -147,7 +148,7 @@ tgsi_swizzle_names[] =
};
const char *
-tgsi_texture_names[] =
+tgsi_texture_names[TGSI_TEXTURE_COUNT] =
{
"UNKNOWN",
"1D",
@@ -157,19 +158,31 @@ tgsi_texture_names[] =
"RECT",
"SHADOW1D",
"SHADOW2D",
- "SHADOWRECT"
+ "SHADOWRECT",
+ "1DARRAY",
+ "2DARRAY"
};
-static const char *property_names[] =
+const char *tgsi_property_names[TGSI_PROPERTY_COUNT] =
{
"GS_INPUT_PRIMITIVE",
"GS_OUTPUT_PRIMITIVE",
"GS_MAX_OUTPUT_VERTICES",
"FS_COORD_ORIGIN",
- "FS_COORD_PIXEL_CENTER"
+ "FS_COORD_PIXEL_CENTER",
+ "FS_COLOR0_WRITES_ALL_CBUFS",
};
-static const char *primitive_names[] =
+static const char *tgsi_type_names[] =
+{
+ "UNORM",
+ "SNORM",
+ "SINT",
+ "UINT",
+ "FLOAT"
+};
+
+const char *tgsi_primitive_names[PIPE_PRIM_MAX] =
{
"POINTS",
"LINES",
@@ -187,13 +200,13 @@ static const char *primitive_names[] =
"TRIANGLE_STRIP_ADJACENCY"
};
-static const char *fs_coord_origin_names[] =
+const char *tgsi_fs_coord_origin_names[2] =
{
"UPPER_LEFT",
"LOWER_LEFT"
};
-static const char *fs_coord_pixel_center_names[] =
+const char *tgsi_fs_coord_pixel_center_names[2] =
{
"HALF_INTEGER",
"INTEGER"
@@ -392,6 +405,26 @@ iter_declaration(
}
}
+ if (decl->Declaration.File == TGSI_FILE_RESOURCE) {
+ TXT(", ");
+ ENM(decl->Resource.Resource, tgsi_texture_names);
+ TXT(", ");
+ if ((decl->Resource.ReturnTypeX == decl->Resource.ReturnTypeY) &&
+ (decl->Resource.ReturnTypeX == decl->Resource.ReturnTypeZ) &&
+ (decl->Resource.ReturnTypeX == decl->Resource.ReturnTypeW)) {
+ ENM(decl->Resource.ReturnTypeX, tgsi_type_names);
+ } else {
+ ENM(decl->Resource.ReturnTypeX, tgsi_type_names);
+ TXT(", ");
+ ENM(decl->Resource.ReturnTypeY, tgsi_type_names);
+ TXT(", ");
+ ENM(decl->Resource.ReturnTypeZ, tgsi_type_names);
+ TXT(", ");
+ ENM(decl->Resource.ReturnTypeW, tgsi_type_names);
+ }
+
+ }
+
if (iter->processor.Processor == TGSI_PROCESSOR_FRAGMENT &&
decl->Declaration.File == TGSI_FILE_INPUT)
{
@@ -484,10 +517,10 @@ iter_property(
int i;
struct dump_ctx *ctx = (struct dump_ctx *)iter;
- assert(Elements(property_names) == TGSI_PROPERTY_COUNT);
+ assert(Elements(tgsi_property_names) == TGSI_PROPERTY_COUNT);
TXT( "PROPERTY " );
- ENM(prop->Property.PropertyName, property_names);
+ ENM(prop->Property.PropertyName, tgsi_property_names);
if (prop->Property.NrTokens > 1)
TXT(" ");
@@ -496,13 +529,13 @@ iter_property(
switch (prop->Property.PropertyName) {
case TGSI_PROPERTY_GS_INPUT_PRIM:
case TGSI_PROPERTY_GS_OUTPUT_PRIM:
- ENM(prop->u[i].Data, primitive_names);
+ ENM(prop->u[i].Data, tgsi_primitive_names);
break;
case TGSI_PROPERTY_FS_COORD_ORIGIN:
- ENM(prop->u[i].Data, fs_coord_origin_names);
+ ENM(prop->u[i].Data, tgsi_fs_coord_origin_names);
break;
case TGSI_PROPERTY_FS_COORD_PIXEL_CENTER:
- ENM(prop->u[i].Data, fs_coord_pixel_center_names);
+ ENM(prop->u[i].Data, tgsi_fs_coord_pixel_center_names);
break;
default:
SID( prop->u[i].Data );
diff --git a/src/gallium/auxiliary/tgsi/tgsi_dump.h b/src/gallium/auxiliary/tgsi/tgsi_dump.h
index fc0429ad8d9..2491e9198a2 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_dump.h
+++ b/src/gallium/auxiliary/tgsi/tgsi_dump.h
@@ -29,6 +29,7 @@
#define TGSI_DUMP_H
#include "pipe/p_compiler.h"
+#include "pipe/p_defines.h"
#include "pipe/p_shader_tokens.h"
#if defined __cplusplus
@@ -39,10 +40,22 @@ extern const char *
tgsi_file_names[TGSI_FILE_COUNT];
extern const char *
-tgsi_swizzle_names[];
+tgsi_swizzle_names[4];
extern const char *
-tgsi_texture_names[];
+tgsi_texture_names[TGSI_TEXTURE_COUNT];
+
+extern const char *
+tgsi_property_names[TGSI_PROPERTY_COUNT];
+
+extern const char *
+tgsi_primitive_names[PIPE_PRIM_MAX];
+
+extern const char *
+tgsi_fs_coord_origin_names[2];
+
+extern const char *
+tgsi_fs_coord_pixel_center_names[2];
void
tgsi_dump_str(
diff --git a/src/gallium/auxiliary/tgsi/tgsi_exec.c b/src/gallium/auxiliary/tgsi/tgsi_exec.c
index 7892a67f04c..9cf74a838fe 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_exec.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_exec.c
@@ -672,6 +672,31 @@ tgsi_exec_machine_bind_shader(
mach->Processor = parse.FullHeader.Processor.Processor;
mach->ImmLimit = 0;
+ if (mach->Processor == TGSI_PROCESSOR_GEOMETRY &&
+ !mach->UsedGeometryShader) {
+ struct tgsi_exec_vector *inputs =
+ align_malloc(sizeof(struct tgsi_exec_vector) *
+ TGSI_MAX_PRIM_VERTICES * PIPE_MAX_ATTRIBS,
+ 16);
+ struct tgsi_exec_vector *outputs =
+ align_malloc(sizeof(struct tgsi_exec_vector) *
+ TGSI_MAX_TOTAL_VERTICES, 16);
+
+ if (!inputs)
+ return;
+ if (!outputs) {
+ align_free(inputs);
+ return;
+ }
+
+ align_free(mach->Inputs);
+ align_free(mach->Outputs);
+
+ mach->Inputs = inputs;
+ mach->Outputs = outputs;
+ mach->UsedGeometryShader = TRUE;
+ }
+
declarations = (struct tgsi_full_declaration *)
MALLOC( maxDeclarations * sizeof(struct tgsi_full_declaration) );
@@ -801,6 +826,11 @@ tgsi_exec_machine_create( void )
mach->MaxGeometryShaderOutputs = TGSI_MAX_TOTAL_VERTICES;
mach->Predicates = &mach->Temps[TGSI_EXEC_TEMP_P0];
+ mach->Inputs = align_malloc(sizeof(struct tgsi_exec_vector) * PIPE_MAX_ATTRIBS, 16);
+ mach->Outputs = align_malloc(sizeof(struct tgsi_exec_vector) * PIPE_MAX_ATTRIBS, 16);
+ if (!mach->Inputs || !mach->Outputs)
+ goto fail;
+
/* Setup constants needed by the SSE2 executor. */
for( i = 0; i < 4; i++ ) {
mach->Temps[TGSI_EXEC_TEMP_00000000_I].xyzw[TGSI_EXEC_TEMP_00000000_C].u[i] = 0x00000000;
@@ -824,7 +854,11 @@ tgsi_exec_machine_create( void )
return mach;
fail:
- align_free(mach);
+ if (mach) {
+ align_free(mach->Inputs);
+ align_free(mach->Outputs);
+ align_free(mach);
+ }
return NULL;
}
@@ -836,10 +870,13 @@ tgsi_exec_machine_destroy(struct tgsi_exec_machine *mach)
if (mach->Instructions)
FREE(mach->Instructions);
if (mach->Declarations)
- FREE(mach->Declarations);
- }
+ FREE(mach->Declarations);
+
+ align_free(mach->Inputs);
+ align_free(mach->Outputs);
- align_free(mach);
+ align_free(mach);
+ }
}
static void
@@ -1038,7 +1075,6 @@ fetch_src_file_channel(const struct tgsi_exec_machine *mach,
break;
case TGSI_FILE_INPUT:
- case TGSI_FILE_SYSTEM_VALUE:
for (i = 0; i < QUAD_SIZE; i++) {
/*
if (TGSI_PROCESSOR_GEOMETRY == mach->Processor) {
@@ -1048,11 +1084,20 @@ fetch_src_file_channel(const struct tgsi_exec_machine *mach,
}*/
int pos = index2D->i[i] * TGSI_EXEC_MAX_INPUT_ATTRIBS + index->i[i];
assert(pos >= 0);
- assert(pos < Elements(mach->Inputs));
+ assert(pos < TGSI_MAX_PRIM_VERTICES * PIPE_MAX_ATTRIBS);
chan->u[i] = mach->Inputs[pos].xyzw[swizzle].u[i];
}
break;
+ case TGSI_FILE_SYSTEM_VALUE:
+ /* XXX no swizzling at this point. Will be needed if we put
+ * gl_FragCoord, for example, in a sys value register.
+ */
+ for (i = 0; i < QUAD_SIZE; i++) {
+ chan->f[i] = mach->SystemValue[index->i[i]][0];
+ }
+ break;
+
case TGSI_FILE_TEMPORARY:
for (i = 0; i < QUAD_SIZE; i++) {
assert(index->i[i] < TGSI_EXEC_NUM_TEMPS);
@@ -1742,6 +1787,36 @@ exec_tex(struct tgsi_exec_machine *mach,
&r[0], &r[1], &r[2], &r[3]); /* outputs */
break;
+ case TGSI_TEXTURE_1D_ARRAY:
+ FETCH(&r[0], 0, CHAN_X);
+ FETCH(&r[1], 0, CHAN_Y);
+
+ if (modifier == TEX_MODIFIER_PROJECTED) {
+ micro_div(&r[0], &r[0], &r[3]);
+ }
+
+ fetch_texel(mach->Samplers[unit],
+ &r[0], &r[1], &r[2], lod, /* S, T, P, LOD */
+ control,
+ &r[0], &r[1], &r[2], &r[3]); /* outputs */
+ break;
+
+ case TGSI_TEXTURE_2D_ARRAY:
+ FETCH(&r[0], 0, CHAN_X);
+ FETCH(&r[1], 0, CHAN_Y);
+ FETCH(&r[2], 0, CHAN_Z);
+
+ if (modifier == TEX_MODIFIER_PROJECTED) {
+ micro_div(&r[0], &r[0], &r[3]);
+ micro_div(&r[1], &r[1], &r[3]);
+ }
+
+ fetch_texel(mach->Samplers[unit],
+ &r[0], &r[1], &r[2], lod, /* S, T, P, LOD */
+ control,
+ &r[0], &r[1], &r[2], &r[3]); /* outputs */
+ break;
+
case TGSI_TEXTURE_3D:
case TGSI_TEXTURE_CUBE:
FETCH(&r[0], 0, CHAN_X);
@@ -1835,6 +1910,164 @@ exec_txd(struct tgsi_exec_machine *mach,
}
+
+static void
+exec_sample(struct tgsi_exec_machine *mach,
+ const struct tgsi_full_instruction *inst,
+ uint modifier)
+{
+ const uint resource_unit = inst->Src[1].Register.Index;
+ const uint sampler_unit = inst->Src[2].Register.Index;
+ union tgsi_exec_channel r[4];
+ const union tgsi_exec_channel *lod = &ZeroVec;
+ enum tgsi_sampler_control control;
+ uint chan;
+
+ if (modifier != TEX_MODIFIER_NONE) {
+ if (modifier == TEX_MODIFIER_LOD_BIAS)
+ FETCH(&r[3], 3, CHAN_X);
+ else /*TEX_MODIFIER_LOD*/
+ FETCH(&r[3], 0, CHAN_W);
+
+ if (modifier != TEX_MODIFIER_PROJECTED) {
+ lod = &r[3];
+ }
+ }
+
+ if (modifier == TEX_MODIFIER_EXPLICIT_LOD) {
+ control = tgsi_sampler_lod_explicit;
+ } else {
+ control = tgsi_sampler_lod_bias;
+ }
+
+ switch (mach->Resources[resource_unit].Resource) {
+ case TGSI_TEXTURE_1D:
+ case TGSI_TEXTURE_SHADOW1D:
+ FETCH(&r[0], 0, CHAN_X);
+
+ if (modifier == TEX_MODIFIER_PROJECTED) {
+ micro_div(&r[0], &r[0], &r[3]);
+ }
+
+ fetch_texel(mach->Samplers[sampler_unit],
+ &r[0], &ZeroVec, &ZeroVec, lod, /* S, T, P, LOD */
+ control,
+ &r[0], &r[1], &r[2], &r[3]); /* R, G, B, A */
+ break;
+
+ case TGSI_TEXTURE_2D:
+ case TGSI_TEXTURE_RECT:
+ case TGSI_TEXTURE_SHADOW2D:
+ case TGSI_TEXTURE_SHADOWRECT:
+ FETCH(&r[0], 0, CHAN_X);
+ FETCH(&r[1], 0, CHAN_Y);
+ FETCH(&r[2], 0, CHAN_Z);
+
+ if (modifier == TEX_MODIFIER_PROJECTED) {
+ micro_div(&r[0], &r[0], &r[3]);
+ micro_div(&r[1], &r[1], &r[3]);
+ micro_div(&r[2], &r[2], &r[3]);
+ }
+
+ fetch_texel(mach->Samplers[sampler_unit],
+ &r[0], &r[1], &r[2], lod, /* S, T, P, LOD */
+ control,
+ &r[0], &r[1], &r[2], &r[3]); /* outputs */
+ break;
+
+ case TGSI_TEXTURE_3D:
+ case TGSI_TEXTURE_CUBE:
+ FETCH(&r[0], 0, CHAN_X);
+ FETCH(&r[1], 0, CHAN_Y);
+ FETCH(&r[2], 0, CHAN_Z);
+
+ if (modifier == TEX_MODIFIER_PROJECTED) {
+ micro_div(&r[0], &r[0], &r[3]);
+ micro_div(&r[1], &r[1], &r[3]);
+ micro_div(&r[2], &r[2], &r[3]);
+ }
+
+ fetch_texel(mach->Samplers[sampler_unit],
+ &r[0], &r[1], &r[2], lod,
+ control,
+ &r[0], &r[1], &r[2], &r[3]);
+ break;
+
+ default:
+ assert(0);
+ }
+
+ for (chan = 0; chan < NUM_CHANNELS; chan++) {
+ if (inst->Dst[0].Register.WriteMask & (1 << chan)) {
+ store_dest(mach, &r[chan], &inst->Dst[0], inst, chan, TGSI_EXEC_DATA_FLOAT);
+ }
+ }
+}
+
+static void
+exec_sample_d(struct tgsi_exec_machine *mach,
+ const struct tgsi_full_instruction *inst)
+{
+ const uint resource_unit = inst->Src[1].Register.Index;
+ const uint sampler_unit = inst->Src[2].Register.Index;
+ union tgsi_exec_channel r[4];
+ uint chan;
+ /*
+ * XXX: This is fake SAMPLE_D -- the derivatives are not taken into account, yet.
+ */
+
+ switch (mach->Resources[resource_unit].Resource) {
+ case TGSI_TEXTURE_1D:
+ case TGSI_TEXTURE_SHADOW1D:
+
+ FETCH(&r[0], 0, CHAN_X);
+
+ fetch_texel(mach->Samplers[sampler_unit],
+ &r[0], &ZeroVec, &ZeroVec, &ZeroVec, /* S, T, P, BIAS */
+ tgsi_sampler_lod_bias,
+ &r[0], &r[1], &r[2], &r[3]); /* R, G, B, A */
+ break;
+
+ case TGSI_TEXTURE_2D:
+ case TGSI_TEXTURE_RECT:
+ case TGSI_TEXTURE_SHADOW2D:
+ case TGSI_TEXTURE_SHADOWRECT:
+
+ FETCH(&r[0], 0, CHAN_X);
+ FETCH(&r[1], 0, CHAN_Y);
+ FETCH(&r[2], 0, CHAN_Z);
+
+ fetch_texel(mach->Samplers[sampler_unit],
+ &r[0], &r[1], &r[2], &ZeroVec, /* inputs */
+ tgsi_sampler_lod_bias,
+ &r[0], &r[1], &r[2], &r[3]); /* outputs */
+ break;
+
+ case TGSI_TEXTURE_3D:
+ case TGSI_TEXTURE_CUBE:
+
+ FETCH(&r[0], 0, CHAN_X);
+ FETCH(&r[1], 0, CHAN_Y);
+ FETCH(&r[2], 0, CHAN_Z);
+
+ fetch_texel(mach->Samplers[sampler_unit],
+ &r[0], &r[1], &r[2], &ZeroVec,
+ tgsi_sampler_lod_bias,
+ &r[0], &r[1], &r[2], &r[3]);
+ break;
+
+ default:
+ assert(0);
+ }
+
+ for (chan = 0; chan < NUM_CHANNELS; chan++) {
+ if (inst->Dst[0].Register.WriteMask & (1 << chan)) {
+ store_dest(mach, &r[chan], &inst->Dst[0], inst, chan, TGSI_EXEC_DATA_FLOAT);
+ }
+ }
+}
+
+
/**
* Evaluate a constant-valued coefficient at the position of the
* current quad.
@@ -1906,9 +2139,13 @@ static void
exec_declaration(struct tgsi_exec_machine *mach,
const struct tgsi_full_declaration *decl)
{
+ if (decl->Declaration.File == TGSI_FILE_RESOURCE) {
+ mach->Resources[decl->Range.First] = decl->Resource;
+ return;
+ }
+
if (mach->Processor == TGSI_PROCESSOR_FRAGMENT) {
- if (decl->Declaration.File == TGSI_FILE_INPUT ||
- decl->Declaration.File == TGSI_FILE_SYSTEM_VALUE) {
+ if (decl->Declaration.File == TGSI_FILE_INPUT) {
uint first, last, mask;
first = decl->Range.First;
@@ -1921,6 +2158,7 @@ exec_declaration(struct tgsi_exec_machine *mach,
* ureg code to emit the right UsageMask value (WRITEMASK_X).
* Then, we could remove the tgsi_exec_machine::Face field.
*/
+ /* XXX make FACE a system value */
if (decl->Semantic.Name == TGSI_SEMANTIC_FACE) {
uint i;
@@ -1962,8 +2200,13 @@ exec_declaration(struct tgsi_exec_machine *mach,
}
}
}
+
+ if (decl->Declaration.File == TGSI_FILE_SYSTEM_VALUE) {
+ mach->SysSemanticToIndex[decl->Declaration.Semantic] = decl->Range.First;
+ }
}
+
typedef void (* micro_op)(union tgsi_exec_channel *dst);
static void
@@ -3675,6 +3918,54 @@ exec_instruction(
exec_endswitch(mach);
break;
+ case TGSI_OPCODE_LOAD:
+ assert(0);
+ break;
+
+ case TGSI_OPCODE_LOAD_MS:
+ assert(0);
+ break;
+
+ case TGSI_OPCODE_SAMPLE:
+ exec_sample(mach, inst, TEX_MODIFIER_NONE);
+ break;
+
+ case TGSI_OPCODE_SAMPLE_B:
+ exec_sample(mach, inst, TEX_MODIFIER_LOD_BIAS);
+ break;
+
+ case TGSI_OPCODE_SAMPLE_C:
+ exec_sample(mach, inst, TEX_MODIFIER_NONE);
+ break;
+
+ case TGSI_OPCODE_SAMPLE_C_LZ:
+ exec_sample(mach, inst, TEX_MODIFIER_LOD_BIAS);
+ break;
+
+ case TGSI_OPCODE_SAMPLE_D:
+ exec_sample_d(mach, inst);
+ break;
+
+ case TGSI_OPCODE_SAMPLE_L:
+ exec_sample(mach, inst, TEX_MODIFIER_EXPLICIT_LOD);
+ break;
+
+ case TGSI_OPCODE_GATHER4:
+ assert(0);
+ break;
+
+ case TGSI_OPCODE_RESINFO:
+ assert(0);
+ break;
+
+ case TGSI_OPCODE_SAMPLE_POS:
+ assert(0);
+ break;
+
+ case TGSI_OPCODE_SAMPLE_INFO:
+ assert(0);
+ break;
+
default:
assert( 0 );
}
diff --git a/src/gallium/auxiliary/tgsi/tgsi_exec.h b/src/gallium/auxiliary/tgsi/tgsi_exec.h
index b5ebbfbfaab..33f33aa82c7 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_exec.h
+++ b/src/gallium/auxiliary/tgsi/tgsi_exec.h
@@ -31,6 +31,7 @@
#include "pipe/p_compiler.h"
#include "pipe/p_state.h"
+#include "pipe/p_shader_tokens.h"
#if defined __cplusplus
extern "C" {
@@ -181,6 +182,8 @@ struct tgsi_sampler
/* The maximum total number of vertices */
#define TGSI_MAX_TOTAL_VERTICES (TGSI_MAX_PRIM_VERTICES * TGSI_MAX_PRIMITIVES * PIPE_MAX_ATTRIBS)
+#define TGSI_MAX_MISC_INPUTS 8
+
/** function call/activation record */
struct tgsi_call_record
{
@@ -225,8 +228,12 @@ struct tgsi_exec_machine
float ImmArray[TGSI_EXEC_NUM_IMMEDIATES][4];
- struct tgsi_exec_vector Inputs[TGSI_MAX_PRIM_VERTICES * PIPE_MAX_ATTRIBS];
- struct tgsi_exec_vector Outputs[TGSI_MAX_TOTAL_VERTICES];
+ struct tgsi_exec_vector *Inputs;
+ struct tgsi_exec_vector *Outputs;
+
+ /* System values */
+ unsigned SysSemanticToIndex[TGSI_SEMANTIC_COUNT];
+ float SystemValue[TGSI_MAX_MISC_INPUTS][4];
struct tgsi_exec_vector *Addrs;
struct tgsi_exec_vector *Predicates;
@@ -301,6 +308,9 @@ struct tgsi_exec_machine
struct tgsi_full_declaration *Declarations;
uint NumDeclarations;
+ struct tgsi_declaration_resource Resources[PIPE_MAX_SHADER_RESOURCES];
+
+ boolean UsedGeometryShader;
};
struct tgsi_exec_machine *
diff --git a/src/gallium/auxiliary/tgsi/tgsi_info.c b/src/gallium/auxiliary/tgsi/tgsi_info.c
index e59e964ffa7..14ed56a1f6a 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_info.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_info.c
@@ -175,7 +175,20 @@ static const struct tgsi_opcode_info opcode_info[TGSI_OPCODE_LAST] =
{ 0, 1, 0, 0, 0, 0, "SWITCH", TGSI_OPCODE_SWITCH },
{ 0, 1, 0, 0, 0, 0, "CASE", TGSI_OPCODE_CASE },
{ 0, 0, 0, 0, 0, 0, "DEFAULT", TGSI_OPCODE_DEFAULT },
- { 0, 0, 0, 0, 0, 0, "ENDSWITCH", TGSI_OPCODE_ENDSWITCH }
+ { 0, 0, 0, 0, 0, 0, "ENDSWITCH", TGSI_OPCODE_ENDSWITCH },
+
+ { 1, 2, 0, 0, 0, 0, "LOAD", TGSI_OPCODE_LOAD },
+ { 1, 2, 0, 0, 0, 0, "LOAD_MS", TGSI_OPCODE_LOAD_MS },
+ { 1, 3, 0, 0, 0, 0, "SAMPLE", TGSI_OPCODE_SAMPLE },
+ { 1, 4, 0, 0, 0, 0, "SAMPLE_B", TGSI_OPCODE_SAMPLE_B },
+ { 1, 4, 0, 0, 0, 0, "SAMPLE_C", TGSI_OPCODE_SAMPLE_C },
+ { 1, 4, 0, 0, 0, 0, "SAMPLE_C_LZ", TGSI_OPCODE_SAMPLE_C_LZ },
+ { 1, 5, 0, 0, 0, 0, "SAMPLE_D", TGSI_OPCODE_SAMPLE_D },
+ { 1, 3, 0, 0, 0, 0, "SAMPLE_L", TGSI_OPCODE_SAMPLE_L },
+ { 1, 3, 0, 0, 0, 0, "GATHER4", TGSI_OPCODE_GATHER4 },
+ { 1, 2, 0, 0, 0, 0, "RESINFO", TGSI_OPCODE_RESINFO },
+ { 1, 2, 0, 0, 0, 0, "SAMPLE_POS", TGSI_OPCODE_SAMPLE_POS },
+ { 1, 2, 0, 0, 0, 0, "SAMPLE_INFO", TGSI_OPCODE_SAMPLE_INFO },
};
const struct tgsi_opcode_info *
diff --git a/src/gallium/auxiliary/tgsi/tgsi_opcode_tmp.h b/src/gallium/auxiliary/tgsi/tgsi_opcode_tmp.h
index b3123ed016d..b5d4504425b 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_opcode_tmp.h
+++ b/src/gallium/auxiliary/tgsi/tgsi_opcode_tmp.h
@@ -168,6 +168,19 @@ OP01(CASE)
OP00(DEFAULT)
OP00(ENDSWITCH)
+OP12(LOAD)
+OP12(LOAD_MS)
+OP13(SAMPLE)
+OP14(SAMPLE_B)
+OP14(SAMPLE_C)
+OP14(SAMPLE_C_LZ)
+OP15(SAMPLE_D)
+OP13(SAMPLE_L)
+OP13(GATHER4)
+OP12(RESINFO)
+OP13(SAMPLE_POS)
+OP12(SAMPLE_INFO)
+
#undef OP00
#undef OP01
@@ -180,6 +193,10 @@ OP00(ENDSWITCH)
#undef OP14
#endif
+#ifdef OP15
+#undef OP15
+#endif
+
#undef OP00_LBL
#undef OP01_LBL
diff --git a/src/gallium/auxiliary/tgsi/tgsi_parse.c b/src/gallium/auxiliary/tgsi/tgsi_parse.c
index 1891203abe1..fb36f9de32d 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_parse.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_parse.c
@@ -128,6 +128,10 @@ tgsi_parse_token(
}
}
+ if (decl->Declaration.File == TGSI_FILE_RESOURCE) {
+ next_token(ctx, &decl->Resource);
+ }
+
break;
}
diff --git a/src/gallium/auxiliary/tgsi/tgsi_parse.h b/src/gallium/auxiliary/tgsi/tgsi_parse.h
index d4df5851764..b7a3c9bc0e6 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_parse.h
+++ b/src/gallium/auxiliary/tgsi/tgsi_parse.h
@@ -69,6 +69,7 @@ struct tgsi_full_declaration
struct tgsi_declaration_dimension Dim;
struct tgsi_declaration_semantic Semantic;
struct tgsi_immediate_array_data ImmediateData;
+ struct tgsi_declaration_resource Resource;
};
struct tgsi_full_immediate
@@ -84,7 +85,7 @@ struct tgsi_full_property
};
#define TGSI_FULL_MAX_DST_REGISTERS 2
-#define TGSI_FULL_MAX_SRC_REGISTERS 4 /* TXD has 4 */
+#define TGSI_FULL_MAX_SRC_REGISTERS 5 /* SAMPLE_D has 5 */
struct tgsi_full_instruction
{
@@ -136,7 +137,8 @@ tgsi_parse_token(
static INLINE unsigned
tgsi_num_tokens(const struct tgsi_token *tokens)
{
- struct tgsi_header header = *(const struct tgsi_header *) tokens;
+ struct tgsi_header header;
+ memcpy(&header, tokens, sizeof(header));
return header.HeaderSize + header.BodySize;
}
diff --git a/src/gallium/auxiliary/tgsi/tgsi_ppc.c b/src/gallium/auxiliary/tgsi/tgsi_ppc.c
index 3521847b619..537a0f6c5e4 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_ppc.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_ppc.c
@@ -294,7 +294,6 @@ emit_fetch(struct gen_context *gen,
case TGSI_SWIZZLE_W:
switch (reg->Register.File) {
case TGSI_FILE_INPUT:
- case TGSI_FILE_SYSTEM_VALUE:
{
int offset = (reg->Register.Index * 4 + swizzle) * 16;
int offset_reg = emit_li_offset(gen, offset);
@@ -302,6 +301,9 @@ emit_fetch(struct gen_context *gen,
ppc_lvx(gen->f, dst_vec, gen->inputs_reg, offset_reg);
}
break;
+ case TGSI_FILE_SYSTEM_VALUE:
+ assert(!"unhandled system value in tgsi_ppc.c");
+ break;
case TGSI_FILE_TEMPORARY:
if (is_ppc_vec_temporary(reg)) {
/* use PPC vec register */
diff --git a/src/gallium/auxiliary/tgsi/tgsi_sanity.c b/src/gallium/auxiliary/tgsi/tgsi_sanity.c
index acbff103efe..509c5346837 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_sanity.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_sanity.c
@@ -258,7 +258,8 @@ static const char *file_names[TGSI_FILE_COUNT] =
"PRED",
"SV",
"IMMX",
- "TEMPX"
+ "TEMPX",
+ "RES"
};
static boolean
diff --git a/src/gallium/auxiliary/tgsi/tgsi_sanity.h b/src/gallium/auxiliary/tgsi/tgsi_sanity.h
index 73f0f414e3f..707d11ec6dd 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_sanity.h
+++ b/src/gallium/auxiliary/tgsi/tgsi_sanity.h
@@ -28,12 +28,14 @@
#ifndef TGSI_SANITY_H
#define TGSI_SANITY_H
-#include "pipe/p_shader_tokens.h"
-
#if defined __cplusplus
extern "C" {
#endif
+#include "pipe/p_compiler.h"
+
+struct tgsi_token;
+
/* Check the given token stream for errors and common mistakes.
* Diagnostic messages are printed out to the debug output, and is
* controlled by the debug option TGSI_PRINT_SANITY (default false).
diff --git a/src/gallium/auxiliary/tgsi/tgsi_scan.c b/src/gallium/auxiliary/tgsi/tgsi_scan.c
index 6585da3e838..83c6ac75e54 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_scan.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_scan.c
@@ -143,7 +143,7 @@ tgsi_scan_shader(const struct tgsi_token *tokens,
info->file_count[file]++;
info->file_max[file] = MAX2(info->file_max[file], (int)reg);
- if (file == TGSI_FILE_INPUT || file == TGSI_FILE_SYSTEM_VALUE) {
+ if (file == TGSI_FILE_INPUT) {
info->input_semantic_name[reg] = (ubyte)fulldecl->Semantic.Name;
info->input_semantic_index[reg] = (ubyte)fulldecl->Semantic.Index;
info->input_interpolate[reg] = (ubyte)fulldecl->Declaration.Interpolate;
@@ -151,6 +151,23 @@ tgsi_scan_shader(const struct tgsi_token *tokens,
info->input_cylindrical_wrap[reg] = (ubyte)fulldecl->Declaration.CylindricalWrap;
info->num_inputs++;
}
+ else if (file == TGSI_FILE_SYSTEM_VALUE) {
+ unsigned index = fulldecl->Range.First;
+ unsigned semName = fulldecl->Semantic.Name;
+
+ info->system_value_semantic_name[index] = semName;
+ info->num_system_values = MAX2(info->num_system_values,
+ index + 1);
+
+ /*
+ info->system_value_semantic_name[info->num_system_values++] =
+ fulldecl->Semantic.Name;
+ */
+
+ if (fulldecl->Semantic.Name == TGSI_SEMANTIC_INSTANCEID) {
+ info->uses_instanceid = TRUE;
+ }
+ }
else if (file == TGSI_FILE_OUTPUT) {
info->output_semantic_name[reg] = (ubyte)fulldecl->Semantic.Name;
info->output_semantic_index[reg] = (ubyte)fulldecl->Semantic.Index;
diff --git a/src/gallium/auxiliary/tgsi/tgsi_scan.h b/src/gallium/auxiliary/tgsi/tgsi_scan.h
index 104097fbc03..53ab3d509dd 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_scan.h
+++ b/src/gallium/auxiliary/tgsi/tgsi_scan.h
@@ -51,6 +51,9 @@ struct tgsi_shader_info
ubyte output_semantic_name[PIPE_MAX_SHADER_OUTPUTS]; /**< TGSI_SEMANTIC_x */
ubyte output_semantic_index[PIPE_MAX_SHADER_OUTPUTS];
+ ubyte num_system_values;
+ ubyte system_value_semantic_name[PIPE_MAX_SHADER_INPUTS];
+
uint file_mask[TGSI_FILE_COUNT]; /**< bitmask of declared registers */
uint file_count[TGSI_FILE_COUNT]; /**< number of declared registers */
int file_max[TGSI_FILE_COUNT]; /**< highest index of declared registers */
@@ -64,6 +67,7 @@ struct tgsi_shader_info
boolean writes_stencil; /**< does fragment shader write stencil value? */
boolean writes_edgeflag; /**< vertex shader outputs edgeflag */
boolean uses_kill; /**< KIL or KILP instruction used? */
+ boolean uses_instanceid;
/**
* Bitmask indicating which register files are accessed with
diff --git a/src/gallium/auxiliary/tgsi/tgsi_sse2.c b/src/gallium/auxiliary/tgsi/tgsi_sse2.c
index 086d983a73a..664946b00f6 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_sse2.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_sse2.c
@@ -28,7 +28,9 @@
#include "pipe/p_config.h"
-#if defined(PIPE_ARCH_X86)
+#include "tgsi/tgsi_sse2.h"
+
+#if defined(PIPE_ARCH_X86) && 0 /* See FIXME notes below */
#include "util/u_debug.h"
#include "pipe/p_shader_tokens.h"
@@ -42,7 +44,6 @@
#include "tgsi/tgsi_util.h"
#include "tgsi/tgsi_dump.h"
#include "tgsi/tgsi_exec.h"
-#include "tgsi/tgsi_sse2.h"
#include "rtasm/rtasm_x86sse.h"
@@ -118,6 +119,7 @@ get_machine_base( void )
static struct x86_reg
get_input_base( void )
{
+ /* FIXME: tgsi_exec_machine::Inputs is a pointer now! */
return x86_make_disp(
get_machine_base(),
Offset(struct tgsi_exec_machine, Inputs) );
@@ -126,6 +128,7 @@ get_input_base( void )
static struct x86_reg
get_output_base( void )
{
+ /* FIXME: tgsi_exec_machine::Ouputs is a pointer now! */
return x86_make_disp(
get_machine_base(),
Offset(struct tgsi_exec_machine, Outputs) );
@@ -163,6 +166,14 @@ get_immediate_base( void )
reg_DX );
}
+static struct x86_reg
+get_system_value_base( void )
+{
+ return x86_make_disp(
+ get_machine_base(),
+ Offset(struct tgsi_exec_machine, SystemValue) );
+}
+
/**
* Data access helpers.
@@ -229,6 +240,16 @@ get_temp(
}
static struct x86_reg
+get_system_value(
+ unsigned vec,
+ unsigned chan )
+{
+ return x86_make_disp(
+ get_system_value_base(), /* base */
+ (vec * 4 + chan) * 4 ); /* byte offset from base */
+}
+
+static struct x86_reg
get_coef(
unsigned vec,
unsigned chan,
@@ -423,6 +444,30 @@ emit_tempf(
}
/**
+ * Copy a system value to xmm register
+ * \param xmm the destination xmm register
+ * \param vec the source system value register
+ * \param chan src channel to fetch (X, Y, Z or W)
+ */
+static void
+emit_system_value(
+ struct x86_function *func,
+ unsigned xmm,
+ unsigned vec,
+ unsigned chan )
+{
+ sse_movss(
+ func,
+ make_xmm( xmm ),
+ get_system_value( vec, chan ) );
+ sse_shufps(
+ func,
+ make_xmm( xmm ),
+ make_xmm( xmm ),
+ SHUF( 0, 0, 0, 0 ) );
+}
+
+/**
* Load an xmm register with an input attrib coefficient (a0, dadx or dady)
* \param xmm the destination xmm register
* \param vec the src input/attribute coefficient index
@@ -1281,8 +1326,15 @@ emit_fetch(
swizzle );
break;
- case TGSI_FILE_INPUT:
case TGSI_FILE_SYSTEM_VALUE:
+ emit_system_value(
+ func,
+ xmm,
+ reg->Register.Index,
+ swizzle );
+ break;
+
+ case TGSI_FILE_INPUT:
emit_inputf(
func,
xmm,
@@ -1465,6 +1517,7 @@ emit_tex( struct x86_function *func,
break;
case TGSI_TEXTURE_2D:
case TGSI_TEXTURE_RECT:
+ case TGSI_TEXTURE_1D_ARRAY:
count = 2;
break;
case TGSI_TEXTURE_SHADOW1D:
@@ -1472,6 +1525,7 @@ emit_tex( struct x86_function *func,
case TGSI_TEXTURE_SHADOWRECT:
case TGSI_TEXTURE_3D:
case TGSI_TEXTURE_CUBE:
+ case TGSI_TEXTURE_2D_ARRAY:
count = 3;
break;
default:
@@ -2636,8 +2690,7 @@ emit_declaration(
struct x86_function *func,
struct tgsi_full_declaration *decl )
{
- if( decl->Declaration.File == TGSI_FILE_INPUT ||
- decl->Declaration.File == TGSI_FILE_SYSTEM_VALUE ) {
+ if( decl->Declaration.File == TGSI_FILE_INPUT ) {
unsigned first, last, mask;
unsigned i, j;
@@ -2710,6 +2763,7 @@ static void aos_to_soa( struct x86_function *func,
x86_mov( func, aos_input, x86_fn_arg( func, arg_aos ) );
x86_mov( func, soa_input, x86_fn_arg( func, arg_machine ) );
+ /* FIXME: tgsi_exec_machine::Inputs is a pointer now! */
x86_lea( func, soa_input,
x86_make_disp( soa_input,
Offset(struct tgsi_exec_machine, Inputs) ) );
@@ -2778,6 +2832,7 @@ static void soa_to_aos( struct x86_function *func,
x86_mov( func, aos_output, x86_fn_arg( func, arg_aos ) );
x86_mov( func, soa_output, x86_fn_arg( func, arg_machine ) );
+ /* FIXME: tgsi_exec_machine::Ouputs is a pointer now! */
x86_lea( func, soa_output,
x86_make_disp( soa_output,
Offset(struct tgsi_exec_machine, Outputs) ) );
@@ -3032,4 +3087,16 @@ tgsi_emit_sse2(
return ok;
}
-#endif /* PIPE_ARCH_X86 */
+#else /* !PIPE_ARCH_X86 */
+
+unsigned
+tgsi_emit_sse2(
+ const struct tgsi_token *tokens,
+ struct x86_function *func,
+ float (*immediates)[4],
+ boolean do_swizzles )
+{
+ return 0;
+}
+
+#endif /* !PIPE_ARCH_X86 */
diff --git a/src/gallium/auxiliary/tgsi/tgsi_text.c b/src/gallium/auxiliary/tgsi/tgsi_text.c
index 9a38c37979c..57622a0dea6 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_text.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_text.c
@@ -36,6 +36,7 @@
#include "tgsi_parse.h"
#include "tgsi_sanity.h"
#include "tgsi_util.h"
+#include "tgsi_dump.h"
static boolean is_alpha_underscore( const char *cur )
{
@@ -136,7 +137,7 @@ static boolean parse_identifier( const char **pcur, char *ret )
int i = 0;
if (is_alpha_underscore( cur )) {
ret[i++] = *cur++;
- while (is_alpha_underscore( cur ))
+ while (is_alpha_underscore( cur ) || is_digit( cur ))
ret[i++] = *cur++;
ret[i++] = '\0';
*pcur = cur;
@@ -282,7 +283,8 @@ static const char *file_names[TGSI_FILE_COUNT] =
"PRED",
"SV",
"IMMX",
- "TEMPX"
+ "TEMPX",
+ "RES"
};
static boolean
@@ -827,6 +829,15 @@ static const char *texture_names[TGSI_TEXTURE_COUNT] =
"SHADOWRECT"
};
+static const char *type_names[] =
+{
+ "UNORM",
+ "SNORM",
+ "SINT",
+ "UINT",
+ "FLOAT"
+};
+
static boolean
match_inst_mnemonic(const char **pcur,
const struct tgsi_opcode_info *info)
@@ -1103,42 +1114,113 @@ static boolean parse_declaration( struct translate_ctx *ctx )
cur = ctx->cur;
eat_opt_white( &cur );
if (*cur == ',' && !is_vs_input) {
- uint i;
+ uint i, j;
cur++;
eat_opt_white( &cur );
- for (i = 0; i < TGSI_SEMANTIC_COUNT; i++) {
- if (str_match_no_case( &cur, semantic_names[i] )) {
- const char *cur2 = cur;
- uint index;
-
- if (is_digit_alpha_underscore( cur ))
- continue;
- eat_opt_white( &cur2 );
- if (*cur2 == '[') {
- cur2++;
- eat_opt_white( &cur2 );
- if (!parse_uint( &cur2, &index )) {
- report_error( ctx, "Expected literal integer" );
+ if (file == TGSI_FILE_RESOURCE) {
+ for (i = 0; i < TGSI_TEXTURE_COUNT; i++) {
+ if (str_match_no_case(&cur, texture_names[i])) {
+ if (!is_digit_alpha_underscore(cur)) {
+ decl.Resource.Resource = i;
+ break;
+ }
+ }
+ }
+ if (i == TGSI_TEXTURE_COUNT) {
+ report_error(ctx, "Expected texture target");
+ return FALSE;
+ }
+ eat_opt_white( &cur );
+ if (*cur != ',') {
+ report_error( ctx, "Expected `,'" );
+ return FALSE;
+ }
+ ++cur;
+ eat_opt_white( &cur );
+ for (j = 0; j < 4; ++j) {
+ for (i = 0; i < PIPE_TYPE_COUNT; ++i) {
+ if (str_match_no_case(&cur, type_names[i])) {
+ if (!is_digit_alpha_underscore(cur)) {
+ switch (j) {
+ case 0:
+ decl.Resource.ReturnTypeX = i;
+ break;
+ case 1:
+ decl.Resource.ReturnTypeY = i;
+ break;
+ case 2:
+ decl.Resource.ReturnTypeZ = i;
+ break;
+ case 3:
+ decl.Resource.ReturnTypeW = i;
+ break;
+ default:
+ assert(0);
+ }
+ break;
+ }
+ }
+ }
+ if (i == PIPE_TYPE_COUNT) {
+ if (j == 0 || j > 2) {
+ report_error(ctx, "Expected type name");
return FALSE;
}
+ break;
+ } else {
+ const char *cur2 = cur;
eat_opt_white( &cur2 );
- if (*cur2 != ']') {
- report_error( ctx, "Expected `]'" );
- return FALSE;
+ if (*cur2 == ',') {
+ cur2++;
+ eat_opt_white( &cur2 );
+ cur = cur2;
+ continue;
+ } else
+ break;
+ }
+ }
+ if (j < 4) {
+ decl.Resource.ReturnTypeY =
+ decl.Resource.ReturnTypeZ =
+ decl.Resource.ReturnTypeW =
+ decl.Resource.ReturnTypeX;
+ }
+ ctx->cur = cur;
+ } else {
+ for (i = 0; i < TGSI_SEMANTIC_COUNT; i++) {
+ if (str_match_no_case( &cur, semantic_names[i] )) {
+ const char *cur2 = cur;
+ uint index;
+
+ if (is_digit_alpha_underscore( cur ))
+ continue;
+ eat_opt_white( &cur2 );
+ if (*cur2 == '[') {
+ cur2++;
+ eat_opt_white( &cur2 );
+ if (!parse_uint( &cur2, &index )) {
+ report_error( ctx, "Expected literal integer" );
+ return FALSE;
+ }
+ eat_opt_white( &cur2 );
+ if (*cur2 != ']') {
+ report_error( ctx, "Expected `]'" );
+ return FALSE;
+ }
+ cur2++;
+
+ decl.Semantic.Index = index;
+
+ cur = cur2;
}
- cur2++;
- decl.Semantic.Index = index;
+ decl.Declaration.Semantic = 1;
+ decl.Semantic.Name = i;
- cur = cur2;
+ ctx->cur = cur;
+ break;
}
-
- decl.Declaration.Semantic = 1;
- decl.Semantic.Name = i;
-
- ctx->cur = cur;
- break;
}
}
} else if (is_imm_array) {
@@ -1258,42 +1340,6 @@ static boolean parse_immediate( struct translate_ctx *ctx )
return TRUE;
}
-static const char *property_names[] =
-{
- "GS_INPUT_PRIMITIVE",
- "GS_OUTPUT_PRIMITIVE",
- "GS_MAX_OUTPUT_VERTICES",
- "FS_COORD_ORIGIN",
- "FS_COORD_PIXEL_CENTER"
-};
-
-static const char *primitive_names[] =
-{
- "POINTS",
- "LINES",
- "LINE_LOOP",
- "LINE_STRIP",
- "TRIANGLES",
- "TRIANGLE_STRIP",
- "TRIANGLE_FAN",
- "QUADS",
- "QUAD_STRIP",
- "POLYGON"
-};
-
-static const char *fs_coord_origin_names[] =
-{
- "UPPER_LEFT",
- "LOWER_LEFT"
-};
-
-static const char *fs_coord_pixel_center_names[] =
-{
- "HALF_INTEGER",
- "INTEGER"
-};
-
-
static boolean
parse_primitive( const char **pcur, uint *primitive )
{
@@ -1302,7 +1348,7 @@ parse_primitive( const char **pcur, uint *primitive )
for (i = 0; i < PIPE_PRIM_MAX; i++) {
const char *cur = *pcur;
- if (str_match_no_case( &cur, primitive_names[i])) {
+ if (str_match_no_case( &cur, tgsi_primitive_names[i])) {
*primitive = i;
*pcur = cur;
return TRUE;
@@ -1316,10 +1362,10 @@ parse_fs_coord_origin( const char **pcur, uint *fs_coord_origin )
{
uint i;
- for (i = 0; i < sizeof(fs_coord_origin_names) / sizeof(fs_coord_origin_names[0]); i++) {
+ for (i = 0; i < Elements(tgsi_fs_coord_origin_names); i++) {
const char *cur = *pcur;
- if (str_match_no_case( &cur, fs_coord_origin_names[i])) {
+ if (str_match_no_case( &cur, tgsi_fs_coord_origin_names[i])) {
*fs_coord_origin = i;
*pcur = cur;
return TRUE;
@@ -1333,10 +1379,10 @@ parse_fs_coord_pixel_center( const char **pcur, uint *fs_coord_pixel_center )
{
uint i;
- for (i = 0; i < sizeof(fs_coord_pixel_center_names) / sizeof(fs_coord_pixel_center_names[0]); i++) {
+ for (i = 0; i < Elements(tgsi_fs_coord_pixel_center_names); i++) {
const char *cur = *pcur;
- if (str_match_no_case( &cur, fs_coord_pixel_center_names[i])) {
+ if (str_match_no_case( &cur, tgsi_fs_coord_pixel_center_names[i])) {
*fs_coord_pixel_center = i;
*pcur = cur;
return TRUE;
@@ -1364,7 +1410,7 @@ static boolean parse_property( struct translate_ctx *ctx )
}
for (property_name = 0; property_name < TGSI_PROPERTY_COUNT;
++property_name) {
- if (streq_nocase_uprcase(property_names[property_name], id)) {
+ if (streq_nocase_uprcase(tgsi_property_names[property_name], id)) {
break;
}
}
@@ -1398,6 +1444,7 @@ static boolean parse_property( struct translate_ctx *ctx )
return FALSE;
}
break;
+ case TGSI_PROPERTY_FS_COLOR0_WRITES_ALL_CBUFS:
default:
if (!parse_uint(&ctx->cur, &values[0] )) {
report_error( ctx, "Expected unsigned integer as property!" );
diff --git a/src/gallium/auxiliary/tgsi/tgsi_text.h b/src/gallium/auxiliary/tgsi/tgsi_text.h
index 8eeeeef1402..5fe53cf007d 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_text.h
+++ b/src/gallium/auxiliary/tgsi/tgsi_text.h
@@ -28,12 +28,14 @@
#ifndef TGSI_TEXT_H
#define TGSI_TEXT_H
-#include "pipe/p_shader_tokens.h"
-
#if defined __cplusplus
extern "C" {
#endif
+#include "pipe/p_compiler.h"
+
+struct tgsi_token;
+
boolean
tgsi_text_translate(
const char *text,
diff --git a/src/gallium/auxiliary/tgsi/tgsi_ureg.c b/src/gallium/auxiliary/tgsi/tgsi_ureg.c
index 7d13a17bdbc..4564ab81f99 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_ureg.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_ureg.c
@@ -1,6 +1,6 @@
/**************************************************************************
*
- * Copyright 2009 VMware, Inc.
+ * Copyright 2009-2010 VMware, Inc.
* All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
@@ -47,6 +47,7 @@ union tgsi_any_token {
struct tgsi_declaration_range decl_range;
struct tgsi_declaration_dimension decl_dim;
struct tgsi_declaration_semantic decl_semantic;
+ struct tgsi_declaration_resource decl_resource;
struct tgsi_immediate imm;
union tgsi_immediate_data imm_data;
struct tgsi_instruction insn;
@@ -137,6 +138,16 @@ struct ureg_program
struct ureg_src sampler[PIPE_MAX_SAMPLERS];
unsigned nr_samplers;
+ struct {
+ unsigned index;
+ unsigned target;
+ unsigned return_type_x;
+ unsigned return_type_y;
+ unsigned return_type_z;
+ unsigned return_type_w;
+ } resource[PIPE_MAX_SHADER_RESOURCES];
+ unsigned nr_resources;
+
unsigned temps_active[UREG_MAX_TEMP / 32];
unsigned nr_temps;
@@ -148,6 +159,7 @@ struct ureg_program
unsigned property_gs_max_vertices;
unsigned char property_fs_coord_origin; /* = TGSI_FS_COORD_ORIGIN_* */
unsigned char property_fs_coord_pixel_center; /* = TGSI_FS_COORD_PIXEL_CENTER_* */
+ unsigned char property_fs_color0_writes_all_cbufs; /* = TGSI_FS_COLOR0_WRITES_ALL_CBUFS * */
unsigned nr_addrs;
unsigned nr_preds;
@@ -284,7 +296,12 @@ ureg_property_fs_coord_pixel_center(struct ureg_program *ureg,
ureg->property_fs_coord_pixel_center = fs_coord_pixel_center;
}
-
+void
+ureg_property_fs_color0_writes_all_cbufs(struct ureg_program *ureg,
+ unsigned fs_color0_writes_all_cbufs)
+{
+ ureg->property_fs_color0_writes_all_cbufs = fs_color0_writes_all_cbufs;
+}
struct ureg_src
ureg_DECL_fs_input_cyl_centroid(struct ureg_program *ureg,
@@ -572,6 +589,41 @@ struct ureg_src ureg_DECL_sampler( struct ureg_program *ureg,
return ureg->sampler[0];
}
+/*
+ * Allocate a new shader resource.
+ */
+struct ureg_src
+ureg_DECL_resource(struct ureg_program *ureg,
+ unsigned index,
+ unsigned target,
+ unsigned return_type_x,
+ unsigned return_type_y,
+ unsigned return_type_z,
+ unsigned return_type_w)
+{
+ struct ureg_src reg = ureg_src_register(TGSI_FILE_RESOURCE, index);
+ uint i;
+
+ for (i = 0; i < ureg->nr_resources; i++) {
+ if (ureg->resource[i].index == index) {
+ return reg;
+ }
+ }
+
+ if (i < PIPE_MAX_SHADER_RESOURCES) {
+ ureg->resource[i].index = index;
+ ureg->resource[i].target = target;
+ ureg->resource[i].return_type_x = return_type_x;
+ ureg->resource[i].return_type_y = return_type_y;
+ ureg->resource[i].return_type_z = return_type_z;
+ ureg->resource[i].return_type_w = return_type_w;
+ ureg->nr_resources++;
+ return reg;
+ }
+
+ assert(0);
+ return reg;
+}
static int
match_or_expand_immediate( const unsigned *v,
@@ -815,9 +867,10 @@ ureg_emit_dst( struct ureg_program *ureg,
assert(dst.File != TGSI_FILE_CONSTANT);
assert(dst.File != TGSI_FILE_INPUT);
assert(dst.File != TGSI_FILE_SAMPLER);
+ assert(dst.File != TGSI_FILE_RESOURCE);
assert(dst.File != TGSI_FILE_IMMEDIATE);
assert(dst.File < TGSI_FILE_COUNT);
-
+
out[n].value = 0;
out[n].dst.File = dst.File;
out[n].dst.WriteMask = dst.WriteMask;
@@ -1200,6 +1253,36 @@ emit_decl_range2D(struct ureg_program *ureg,
}
static void
+emit_decl_resource(struct ureg_program *ureg,
+ unsigned index,
+ unsigned target,
+ unsigned return_type_x,
+ unsigned return_type_y,
+ unsigned return_type_z,
+ unsigned return_type_w )
+{
+ union tgsi_any_token *out = get_tokens(ureg, DOMAIN_DECL, 3);
+
+ out[0].value = 0;
+ out[0].decl.Type = TGSI_TOKEN_TYPE_DECLARATION;
+ out[0].decl.NrTokens = 3;
+ out[0].decl.File = TGSI_FILE_RESOURCE;
+ out[0].decl.UsageMask = 0xf;
+ out[0].decl.Interpolate = TGSI_INTERPOLATE_CONSTANT;
+
+ out[1].value = 0;
+ out[1].decl_range.First = index;
+ out[1].decl_range.Last = index;
+
+ out[2].value = 0;
+ out[2].decl_resource.Resource = target;
+ out[2].decl_resource.ReturnTypeX = return_type_x;
+ out[2].decl_resource.ReturnTypeY = return_type_y;
+ out[2].decl_resource.ReturnTypeZ = return_type_z;
+ out[2].decl_resource.ReturnTypeW = return_type_w;
+}
+
+static void
emit_immediate( struct ureg_program *ureg,
const unsigned *v,
unsigned type )
@@ -1278,6 +1361,14 @@ static void emit_decls( struct ureg_program *ureg )
ureg->property_fs_coord_pixel_center);
}
+ if (ureg->property_fs_color0_writes_all_cbufs) {
+ assert(ureg->processor == TGSI_PROCESSOR_FRAGMENT);
+
+ emit_property(ureg,
+ TGSI_PROPERTY_FS_COLOR0_WRITES_ALL_CBUFS,
+ ureg->property_fs_color0_writes_all_cbufs);
+ }
+
if (ureg->processor == TGSI_PROCESSOR_VERTEX) {
for (i = 0; i < UREG_MAX_INPUT; i++) {
if (ureg->vs_inputs[i/32] & (1 << (i%32))) {
@@ -1327,6 +1418,16 @@ static void emit_decls( struct ureg_program *ureg )
ureg->sampler[i].Index, 1 );
}
+ for (i = 0; i < ureg->nr_resources; i++) {
+ emit_decl_resource(ureg,
+ ureg->resource[i].index,
+ ureg->resource[i].target,
+ ureg->resource[i].return_type_x,
+ ureg->resource[i].return_type_y,
+ ureg->resource[i].return_type_z,
+ ureg->resource[i].return_type_w);
+ }
+
if (ureg->const_decls.nr_constant_ranges) {
for (i = 0; i < ureg->const_decls.nr_constant_ranges; i++) {
emit_decl_range(ureg,
diff --git a/src/gallium/auxiliary/tgsi/tgsi_ureg.h b/src/gallium/auxiliary/tgsi/tgsi_ureg.h
index acc463200a6..9d5553f0ea0 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_ureg.h
+++ b/src/gallium/auxiliary/tgsi/tgsi_ureg.h
@@ -43,24 +43,24 @@ struct ureg_program;
*/
struct ureg_src
{
- unsigned File : 4; /* TGSI_FILE_ */
- unsigned SwizzleX : 2; /* TGSI_SWIZZLE_ */
- unsigned SwizzleY : 2; /* TGSI_SWIZZLE_ */
- unsigned SwizzleZ : 2; /* TGSI_SWIZZLE_ */
- unsigned SwizzleW : 2; /* TGSI_SWIZZLE_ */
- unsigned Indirect : 1; /* BOOL */
- unsigned DimIndirect : 1; /* BOOL */
- unsigned Dimension : 1; /* BOOL */
- unsigned Absolute : 1; /* BOOL */
- unsigned Negate : 1; /* BOOL */
- int Index : 16; /* SINT */
+ unsigned File : 4; /* TGSI_FILE_ */
+ unsigned SwizzleX : 2; /* TGSI_SWIZZLE_ */
+ unsigned SwizzleY : 2; /* TGSI_SWIZZLE_ */
+ unsigned SwizzleZ : 2; /* TGSI_SWIZZLE_ */
+ unsigned SwizzleW : 2; /* TGSI_SWIZZLE_ */
+ unsigned Indirect : 1; /* BOOL */
+ unsigned DimIndirect : 1; /* BOOL */
+ unsigned Dimension : 1; /* BOOL */
+ unsigned Absolute : 1; /* BOOL */
+ unsigned Negate : 1; /* BOOL */
unsigned IndirectFile : 4; /* TGSI_FILE_ */
- int IndirectIndex : 16; /* SINT */
unsigned IndirectSwizzle : 2; /* TGSI_SWIZZLE_ */
- int DimensionIndex : 16; /* SINT */
unsigned DimIndFile : 4; /* TGSI_FILE_ */
- int DimIndIndex : 16; /* SINT */
unsigned DimIndSwizzle : 2; /* TGSI_SWIZZLE_ */
+ int Index : 16; /* SINT */
+ int IndirectIndex : 16; /* SINT */
+ int DimensionIndex : 16; /* SINT */
+ int DimIndIndex : 16; /* SINT */
};
/* Very similar to a tgsi_dst_register, removing unsupported fields
@@ -153,6 +153,10 @@ void
ureg_property_fs_coord_pixel_center(struct ureg_program *ureg,
unsigned fs_coord_pixel_center);
+void
+ureg_property_fs_color0_writes_all_cbufs(struct ureg_program *ureg,
+ unsigned fs_color0_writes_all_cbufs);
+
/***********************************************************************
* Build shader declarations:
*/
@@ -266,6 +270,15 @@ struct ureg_src
ureg_DECL_sampler( struct ureg_program *,
unsigned index );
+struct ureg_src
+ureg_DECL_resource(struct ureg_program *,
+ unsigned index,
+ unsigned target,
+ unsigned return_type_x,
+ unsigned return_type_y,
+ unsigned return_type_z,
+ unsigned return_type_w );
+
static INLINE struct ureg_src
ureg_imm4f( struct ureg_program *ureg,
@@ -729,6 +742,66 @@ static INLINE void ureg_##op( struct ureg_program *ureg, \
}
+#define OP14( op ) \
+static INLINE void ureg_##op( struct ureg_program *ureg, \
+ struct ureg_dst dst, \
+ struct ureg_src src0, \
+ struct ureg_src src1, \
+ struct ureg_src src2, \
+ struct ureg_src src3 ) \
+{ \
+ unsigned opcode = TGSI_OPCODE_##op; \
+ unsigned insn = ureg_emit_insn(ureg, \
+ opcode, \
+ dst.Saturate, \
+ dst.Predicate, \
+ dst.PredNegate, \
+ dst.PredSwizzleX, \
+ dst.PredSwizzleY, \
+ dst.PredSwizzleZ, \
+ dst.PredSwizzleW, \
+ 1, \
+ 4).insn_token; \
+ ureg_emit_dst( ureg, dst ); \
+ ureg_emit_src( ureg, src0 ); \
+ ureg_emit_src( ureg, src1 ); \
+ ureg_emit_src( ureg, src2 ); \
+ ureg_emit_src( ureg, src3 ); \
+ ureg_fixup_insn_size( ureg, insn ); \
+}
+
+
+#define OP15( op ) \
+static INLINE void ureg_##op( struct ureg_program *ureg, \
+ struct ureg_dst dst, \
+ struct ureg_src src0, \
+ struct ureg_src src1, \
+ struct ureg_src src2, \
+ struct ureg_src src3, \
+ struct ureg_src src4 ) \
+{ \
+ unsigned opcode = TGSI_OPCODE_##op; \
+ unsigned insn = ureg_emit_insn(ureg, \
+ opcode, \
+ dst.Saturate, \
+ dst.Predicate, \
+ dst.PredNegate, \
+ dst.PredSwizzleX, \
+ dst.PredSwizzleY, \
+ dst.PredSwizzleZ, \
+ dst.PredSwizzleW, \
+ 1, \
+ 5).insn_token; \
+ ureg_emit_dst( ureg, dst ); \
+ ureg_emit_src( ureg, src0 ); \
+ ureg_emit_src( ureg, src1 ); \
+ ureg_emit_src( ureg, src2 ); \
+ ureg_emit_src( ureg, src3 ); \
+ ureg_emit_src( ureg, src4 ); \
+ ureg_fixup_insn_size( ureg, insn ); \
+}
+
+
/* Use a template include to generate a correctly-typed ureg_OP()
* function for each TGSI opcode:
*/
diff --git a/src/gallium/auxiliary/tgsi/tgsi_util.c b/src/gallium/auxiliary/tgsi/tgsi_util.c
index 08e7e89bd67..aa9a886d4a9 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_util.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_util.c
@@ -280,7 +280,12 @@ tgsi_util_get_inst_usage_mask(const struct tgsi_full_instruction *inst,
case TGSI_TEXTURE_CUBE:
read_mask = TGSI_WRITEMASK_XYZ;
break;
-
+ case TGSI_TEXTURE_1D_ARRAY:
+ read_mask = TGSI_WRITEMASK_XY;
+ break;
+ case TGSI_TEXTURE_2D_ARRAY:
+ read_mask = TGSI_WRITEMASK_XYZ;
+ break;
default:
assert(0);
read_mask = 0;
diff --git a/src/gallium/auxiliary/translate/translate.c b/src/gallium/auxiliary/translate/translate.c
index 73287b667db..05e455388b0 100644
--- a/src/gallium/auxiliary/translate/translate.c
+++ b/src/gallium/auxiliary/translate/translate.c
@@ -39,7 +39,7 @@ struct translate *translate_create( const struct translate_key *key )
struct translate *translate = NULL;
#if defined(PIPE_ARCH_X86) || defined(PIPE_ARCH_X86_64)
- translate = translate_sse2_create( key );
+ /*translate = translate_sse2_create( key );*/
if (translate)
return translate;
#else
diff --git a/src/gallium/auxiliary/translate/translate_cache.c b/src/gallium/auxiliary/translate/translate_cache.c
index d8069a149cf..3f1ecb630f2 100644
--- a/src/gallium/auxiliary/translate/translate_cache.c
+++ b/src/gallium/auxiliary/translate/translate_cache.c
@@ -40,6 +40,10 @@ struct translate_cache {
struct translate_cache * translate_cache_create( void )
{
struct translate_cache *cache = MALLOC_STRUCT(translate_cache);
+ if (cache == NULL) {
+ return NULL;
+ }
+
cache->hash = cso_hash_create();
return cache;
}
diff --git a/src/gallium/auxiliary/util/dbghelp.h b/src/gallium/auxiliary/util/dbghelp.h
new file mode 100644
index 00000000000..bc7c53cf9f2
--- /dev/null
+++ b/src/gallium/auxiliary/util/dbghelp.h
@@ -0,0 +1,1265 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the w64 mingw-runtime package.
+ * No warranty is given; refer to the file DISCLAIMER.PD within this package.
+ */
+#ifndef _DBGHELP_
+#define _DBGHELP_
+
+#ifdef _WIN64
+#ifndef _IMAGEHLP64
+#define _IMAGEHLP64
+#endif
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define IMAGEAPI DECLSPEC_IMPORT WINAPI
+#define DBHLP_DEPRECIATED __declspec(deprecated)
+
+#define DBHLPAPI IMAGEAPI
+
+#define IMAGE_SEPARATION (64*1024)
+
+ typedef struct _LOADED_IMAGE {
+ PSTR ModuleName;
+ HANDLE hFile;
+ PUCHAR MappedAddress;
+#ifdef _IMAGEHLP64
+ PIMAGE_NT_HEADERS64 FileHeader;
+#else
+ PIMAGE_NT_HEADERS32 FileHeader;
+#endif
+ PIMAGE_SECTION_HEADER LastRvaSection;
+ ULONG NumberOfSections;
+ PIMAGE_SECTION_HEADER Sections;
+ ULONG Characteristics;
+ BOOLEAN fSystemImage;
+ BOOLEAN fDOSImage;
+ LIST_ENTRY Links;
+ ULONG SizeOfImage;
+ } LOADED_IMAGE,*PLOADED_IMAGE;
+
+#define MAX_SYM_NAME 2000
+
+ typedef BOOL (CALLBACK *PFIND_DEBUG_FILE_CALLBACK)(HANDLE FileHandle,PSTR FileName,PVOID CallerData);
+ typedef BOOL (CALLBACK *PFINDFILEINPATHCALLBACK)(PSTR filename,PVOID context);
+ typedef BOOL (CALLBACK *PFIND_EXE_FILE_CALLBACK)(HANDLE FileHandle,PSTR FileName,PVOID CallerData);
+
+ typedef BOOL (WINAPI *PSYMBOLSERVERPROC)(LPCSTR,LPCSTR,PVOID,DWORD,DWORD,LPSTR);
+ typedef BOOL (WINAPI *PSYMBOLSERVEROPENPROC)(VOID);
+ typedef BOOL (WINAPI *PSYMBOLSERVERCLOSEPROC)(VOID);
+ typedef BOOL (WINAPI *PSYMBOLSERVERSETOPTIONSPROC)(UINT_PTR,ULONG64);
+ typedef BOOL (CALLBACK WINAPI *PSYMBOLSERVERCALLBACKPROC)(UINT_PTR action,ULONG64 data,ULONG64 context);
+ typedef UINT_PTR (WINAPI *PSYMBOLSERVERGETOPTIONSPROC)();
+ typedef BOOL (WINAPI *PSYMBOLSERVERPINGPROC)(LPCSTR);
+
+ HANDLE IMAGEAPI FindDebugInfoFile(PSTR FileName,PSTR SymbolPath,PSTR DebugFilePath);
+ HANDLE IMAGEAPI FindDebugInfoFileEx(PSTR FileName,PSTR SymbolPath,PSTR DebugFilePath,PFIND_DEBUG_FILE_CALLBACK Callback,PVOID CallerData);
+ BOOL IMAGEAPI SymFindFileInPath(HANDLE hprocess,LPSTR SearchPath,LPSTR FileName,PVOID id,DWORD two,DWORD three,DWORD flags,LPSTR FoundFile,PFINDFILEINPATHCALLBACK callback,PVOID context);
+ HANDLE IMAGEAPI FindExecutableImage(PSTR FileName,PSTR SymbolPath,PSTR ImageFilePath);
+ HANDLE IMAGEAPI FindExecutableImageEx(PSTR FileName,PSTR SymbolPath,PSTR ImageFilePath,PFIND_EXE_FILE_CALLBACK Callback,PVOID CallerData);
+ PIMAGE_NT_HEADERS IMAGEAPI ImageNtHeader(PVOID Base);
+ PVOID IMAGEAPI ImageDirectoryEntryToDataEx(PVOID Base,BOOLEAN MappedAsImage,USHORT DirectoryEntry,PULONG Size,PIMAGE_SECTION_HEADER *FoundHeader);
+ PVOID IMAGEAPI ImageDirectoryEntryToData(PVOID Base,BOOLEAN MappedAsImage,USHORT DirectoryEntry,PULONG Size);
+ PIMAGE_SECTION_HEADER IMAGEAPI ImageRvaToSection(PIMAGE_NT_HEADERS NtHeaders,PVOID Base,ULONG Rva);
+ PVOID IMAGEAPI ImageRvaToVa(PIMAGE_NT_HEADERS NtHeaders,PVOID Base,ULONG Rva,PIMAGE_SECTION_HEADER *LastRvaSection);
+
+#define SSRVOPT_CALLBACK 0x0001
+#define SSRVOPT_DWORD 0x0002
+#define SSRVOPT_DWORDPTR 0x0004
+#define SSRVOPT_GUIDPTR 0x0008
+#define SSRVOPT_OLDGUIDPTR 0x0010
+#define SSRVOPT_UNATTENDED 0x0020
+#define SSRVOPT_NOCOPY 0x0040
+#define SSRVOPT_PARENTWIN 0x0080
+#define SSRVOPT_PARAMTYPE 0x0100
+#define SSRVOPT_SECURE 0x0200
+#define SSRVOPT_TRACE 0x0400
+#define SSRVOPT_SETCONTEXT 0x0800
+#define SSRVOPT_PROXY 0x1000
+#define SSRVOPT_DOWNSTREAM_STORE 0x2000
+#define SSRVOPT_RESET ((ULONG_PTR)-1)
+
+#define SSRVACTION_TRACE 1
+#define SSRVACTION_QUERYCANCEL 2
+#define SSRVACTION_EVENT 3
+
+#ifndef _WIN64
+
+ typedef struct _IMAGE_DEBUG_INFORMATION {
+ LIST_ENTRY List;
+ DWORD ReservedSize;
+ PVOID ReservedMappedBase;
+ USHORT ReservedMachine;
+ USHORT ReservedCharacteristics;
+ DWORD ReservedCheckSum;
+ DWORD ImageBase;
+ DWORD SizeOfImage;
+ DWORD ReservedNumberOfSections;
+ PIMAGE_SECTION_HEADER ReservedSections;
+ DWORD ReservedExportedNamesSize;
+ PSTR ReservedExportedNames;
+ DWORD ReservedNumberOfFunctionTableEntries;
+ PIMAGE_FUNCTION_ENTRY ReservedFunctionTableEntries;
+ DWORD ReservedLowestFunctionStartingAddress;
+ DWORD ReservedHighestFunctionEndingAddress;
+ DWORD ReservedNumberOfFpoTableEntries;
+ PFPO_DATA ReservedFpoTableEntries;
+ DWORD SizeOfCoffSymbols;
+ PIMAGE_COFF_SYMBOLS_HEADER CoffSymbols;
+ DWORD ReservedSizeOfCodeViewSymbols;
+ PVOID ReservedCodeViewSymbols;
+ PSTR ImageFilePath;
+ PSTR ImageFileName;
+ PSTR ReservedDebugFilePath;
+ DWORD ReservedTimeDateStamp;
+ BOOL ReservedRomImage;
+ PIMAGE_DEBUG_DIRECTORY ReservedDebugDirectory;
+ DWORD ReservedNumberOfDebugDirectories;
+ DWORD ReservedOriginalFunctionTableBaseAddress;
+ DWORD Reserved[2 ];
+ } IMAGE_DEBUG_INFORMATION,*PIMAGE_DEBUG_INFORMATION;
+
+ PIMAGE_DEBUG_INFORMATION IMAGEAPI MapDebugInformation(HANDLE FileHandle,PSTR FileName,PSTR SymbolPath,DWORD ImageBase);
+ BOOL IMAGEAPI UnmapDebugInformation(PIMAGE_DEBUG_INFORMATION DebugInfo);
+#endif
+
+ typedef BOOL (CALLBACK *PENUMDIRTREE_CALLBACK)(LPCSTR FilePath,PVOID CallerData);
+
+ BOOL IMAGEAPI SearchTreeForFile(PSTR RootPath,PSTR InputPathName,PSTR OutputPathBuffer);
+ BOOL IMAGEAPI EnumDirTree(HANDLE hProcess,PSTR RootPath,PSTR InputPathName,PSTR OutputPathBuffer,PENUMDIRTREE_CALLBACK Callback,PVOID CallbackData);
+ BOOL IMAGEAPI MakeSureDirectoryPathExists(PCSTR DirPath);
+
+#define UNDNAME_COMPLETE (0x0000)
+#define UNDNAME_NO_LEADING_UNDERSCORES (0x0001)
+#define UNDNAME_NO_MS_KEYWORDS (0x0002)
+#define UNDNAME_NO_FUNCTION_RETURNS (0x0004)
+#define UNDNAME_NO_ALLOCATION_MODEL (0x0008)
+#define UNDNAME_NO_ALLOCATION_LANGUAGE (0x0010)
+#define UNDNAME_NO_MS_THISTYPE (0x0020)
+#define UNDNAME_NO_CV_THISTYPE (0x0040)
+#define UNDNAME_NO_THISTYPE (0x0060)
+#define UNDNAME_NO_ACCESS_SPECIFIERS (0x0080)
+#define UNDNAME_NO_THROW_SIGNATURES (0x0100)
+#define UNDNAME_NO_MEMBER_TYPE (0x0200)
+#define UNDNAME_NO_RETURN_UDT_MODEL (0x0400)
+#define UNDNAME_32_BIT_DECODE (0x0800)
+#define UNDNAME_NAME_ONLY (0x1000)
+#define UNDNAME_NO_ARGUMENTS (0x2000)
+#define UNDNAME_NO_SPECIAL_SYMS (0x4000)
+
+ DWORD IMAGEAPI WINAPI UnDecorateSymbolName(PCSTR DecoratedName,PSTR UnDecoratedName,DWORD UndecoratedLength,DWORD Flags);
+
+#define DBHHEADER_DEBUGDIRS 0x1
+
+ typedef struct _MODLOAD_DATA {
+ DWORD ssize;
+ DWORD ssig;
+ PVOID data;
+ DWORD size;
+ DWORD flags;
+ } MODLOAD_DATA,*PMODLOAD_DATA;
+
+ typedef enum {
+ AddrMode1616,AddrMode1632,AddrModeReal,AddrModeFlat
+ } ADDRESS_MODE;
+
+ typedef struct _tagADDRESS64 {
+ DWORD64 Offset;
+ WORD Segment;
+ ADDRESS_MODE Mode;
+ } ADDRESS64,*LPADDRESS64;
+
+#ifdef _IMAGEHLP64
+#define ADDRESS ADDRESS64
+#define LPADDRESS LPADDRESS64
+#else
+ typedef struct _tagADDRESS {
+ DWORD Offset;
+ WORD Segment;
+ ADDRESS_MODE Mode;
+ } ADDRESS,*LPADDRESS;
+
+ static __inline void Address32To64(LPADDRESS a32,LPADDRESS64 a64) {
+ a64->Offset = (ULONG64)(LONG64)(LONG)a32->Offset;
+ a64->Segment = a32->Segment;
+ a64->Mode = a32->Mode;
+ }
+
+ static __inline void Address64To32(LPADDRESS64 a64,LPADDRESS a32) {
+ a32->Offset = (ULONG)a64->Offset;
+ a32->Segment = a64->Segment;
+ a32->Mode = a64->Mode;
+ }
+#endif
+
+ typedef struct _KDHELP64 {
+ DWORD64 Thread;
+ DWORD ThCallbackStack;
+ DWORD ThCallbackBStore;
+ DWORD NextCallback;
+ DWORD FramePointer;
+ DWORD64 KiCallUserMode;
+ DWORD64 KeUserCallbackDispatcher;
+ DWORD64 SystemRangeStart;
+ DWORD64 Reserved[8];
+ } KDHELP64,*PKDHELP64;
+
+#ifdef _IMAGEHLP64
+#define KDHELP KDHELP64
+#define PKDHELP PKDHELP64
+#else
+ typedef struct _KDHELP {
+ DWORD Thread;
+ DWORD ThCallbackStack;
+ DWORD NextCallback;
+ DWORD FramePointer;
+ DWORD KiCallUserMode;
+ DWORD KeUserCallbackDispatcher;
+ DWORD SystemRangeStart;
+ DWORD ThCallbackBStore;
+ DWORD Reserved[8];
+ } KDHELP,*PKDHELP;
+
+ static __inline void KdHelp32To64(PKDHELP p32,PKDHELP64 p64) {
+ p64->Thread = p32->Thread;
+ p64->ThCallbackStack = p32->ThCallbackStack;
+ p64->NextCallback = p32->NextCallback;
+ p64->FramePointer = p32->FramePointer;
+ p64->KiCallUserMode = p32->KiCallUserMode;
+ p64->KeUserCallbackDispatcher = p32->KeUserCallbackDispatcher;
+ p64->SystemRangeStart = p32->SystemRangeStart;
+ }
+#endif
+
+ typedef struct _tagSTACKFRAME64 {
+ ADDRESS64 AddrPC;
+ ADDRESS64 AddrReturn;
+ ADDRESS64 AddrFrame;
+ ADDRESS64 AddrStack;
+ ADDRESS64 AddrBStore;
+ PVOID FuncTableEntry;
+ DWORD64 Params[4];
+ BOOL Far;
+ BOOL Virtual;
+ DWORD64 Reserved[3];
+ KDHELP64 KdHelp;
+ } STACKFRAME64,*LPSTACKFRAME64;
+
+#ifdef _IMAGEHLP64
+#define STACKFRAME STACKFRAME64
+#define LPSTACKFRAME LPSTACKFRAME64
+#else
+ typedef struct _tagSTACKFRAME {
+ ADDRESS AddrPC;
+ ADDRESS AddrReturn;
+ ADDRESS AddrFrame;
+ ADDRESS AddrStack;
+ PVOID FuncTableEntry;
+ DWORD Params[4];
+ BOOL Far;
+ BOOL Virtual;
+ DWORD Reserved[3];
+ KDHELP KdHelp;
+ ADDRESS AddrBStore;
+ } STACKFRAME,*LPSTACKFRAME;
+#endif
+
+ typedef BOOL (WINAPI *PREAD_PROCESS_MEMORY_ROUTINE64)(HANDLE hProcess,DWORD64 qwBaseAddress,PVOID lpBuffer,DWORD nSize,LPDWORD lpNumberOfBytesRead);
+ typedef PVOID (WINAPI *PFUNCTION_TABLE_ACCESS_ROUTINE64)(HANDLE hProcess,DWORD64 AddrBase);
+ typedef DWORD64 (WINAPI *PGET_MODULE_BASE_ROUTINE64)(HANDLE hProcess,DWORD64 Address);
+ typedef DWORD64 (WINAPI *PTRANSLATE_ADDRESS_ROUTINE64)(HANDLE hProcess,HANDLE hThread,LPADDRESS64 lpaddr);
+
+ BOOL IMAGEAPI StackWalk64(DWORD MachineType,HANDLE hProcess,HANDLE hThread,LPSTACKFRAME64 StackFrame,PVOID ContextRecord,PREAD_PROCESS_MEMORY_ROUTINE64 ReadMemoryRoutine,PFUNCTION_TABLE_ACCESS_ROUTINE64 FunctionTableAccessRoutine,PGET_MODULE_BASE_ROUTINE64 GetModuleBaseRoutine,PTRANSLATE_ADDRESS_ROUTINE64 TranslateAddress);
+
+#ifdef _IMAGEHLP64
+#define PREAD_PROCESS_MEMORY_ROUTINE PREAD_PROCESS_MEMORY_ROUTINE64
+#define PFUNCTION_TABLE_ACCESS_ROUTINE PFUNCTION_TABLE_ACCESS_ROUTINE64
+#define PGET_MODULE_BASE_ROUTINE PGET_MODULE_BASE_ROUTINE64
+#define PTRANSLATE_ADDRESS_ROUTINE PTRANSLATE_ADDRESS_ROUTINE64
+#define StackWalk StackWalk64
+#else
+ typedef BOOL (WINAPI *PREAD_PROCESS_MEMORY_ROUTINE)(HANDLE hProcess,DWORD lpBaseAddress,PVOID lpBuffer,DWORD nSize,PDWORD lpNumberOfBytesRead);
+ typedef PVOID (WINAPI *PFUNCTION_TABLE_ACCESS_ROUTINE)(HANDLE hProcess,DWORD AddrBase);
+ typedef DWORD (WINAPI *PGET_MODULE_BASE_ROUTINE)(HANDLE hProcess,DWORD Address);
+ typedef DWORD (WINAPI *PTRANSLATE_ADDRESS_ROUTINE)(HANDLE hProcess,HANDLE hThread,LPADDRESS lpaddr);
+
+ BOOL IMAGEAPI StackWalk(DWORD MachineType,HANDLE hProcess,HANDLE hThread,LPSTACKFRAME StackFrame,PVOID ContextRecord,PREAD_PROCESS_MEMORY_ROUTINE ReadMemoryRoutine,PFUNCTION_TABLE_ACCESS_ROUTINE FunctionTableAccessRoutine,PGET_MODULE_BASE_ROUTINE GetModuleBaseRoutine,PTRANSLATE_ADDRESS_ROUTINE TranslateAddress);
+#endif
+
+#define API_VERSION_NUMBER 9
+
+ typedef struct API_VERSION {
+ USHORT MajorVersion;
+ USHORT MinorVersion;
+ USHORT Revision;
+ USHORT Reserved;
+ } API_VERSION,*LPAPI_VERSION;
+
+ LPAPI_VERSION IMAGEAPI ImagehlpApiVersion(VOID);
+ LPAPI_VERSION IMAGEAPI ImagehlpApiVersionEx(LPAPI_VERSION AppVersion);
+ DWORD IMAGEAPI GetTimestampForLoadedLibrary(HMODULE Module);
+
+ typedef BOOL (CALLBACK *PSYM_ENUMMODULES_CALLBACK64)(PSTR ModuleName,DWORD64 BaseOfDll,PVOID UserContext);
+ typedef BOOL (CALLBACK *PSYM_ENUMSYMBOLS_CALLBACK64)(PSTR SymbolName,DWORD64 SymbolAddress,ULONG SymbolSize,PVOID UserContext);
+ typedef BOOL (CALLBACK *PSYM_ENUMSYMBOLS_CALLBACK64W)(PWSTR SymbolName,DWORD64 SymbolAddress,ULONG SymbolSize,PVOID UserContext);
+ typedef BOOL (CALLBACK *PENUMLOADED_MODULES_CALLBACK64)(PSTR ModuleName,DWORD64 ModuleBase,ULONG ModuleSize,PVOID UserContext);
+ typedef BOOL (CALLBACK *PSYMBOL_REGISTERED_CALLBACK64)(HANDLE hProcess,ULONG ActionCode,ULONG64 CallbackData,ULONG64 UserContext);
+ typedef PVOID (CALLBACK *PSYMBOL_FUNCENTRY_CALLBACK)(HANDLE hProcess,DWORD AddrBase,PVOID UserContext);
+ typedef PVOID (CALLBACK *PSYMBOL_FUNCENTRY_CALLBACK64)(HANDLE hProcess,ULONG64 AddrBase,ULONG64 UserContext);
+
+#ifdef _IMAGEHLP64
+#define PSYM_ENUMMODULES_CALLBACK PSYM_ENUMMODULES_CALLBACK64
+#define PSYM_ENUMSYMBOLS_CALLBACK PSYM_ENUMSYMBOLS_CALLBACK64
+#define PSYM_ENUMSYMBOLS_CALLBACKW PSYM_ENUMSYMBOLS_CALLBACK64W
+#define PENUMLOADED_MODULES_CALLBACK PENUMLOADED_MODULES_CALLBACK64
+#define PSYMBOL_REGISTERED_CALLBACK PSYMBOL_REGISTERED_CALLBACK64
+#define PSYMBOL_FUNCENTRY_CALLBACK PSYMBOL_FUNCENTRY_CALLBACK64
+#else
+ typedef BOOL (CALLBACK *PSYM_ENUMMODULES_CALLBACK)(PSTR ModuleName,ULONG BaseOfDll,PVOID UserContext);
+ typedef BOOL (CALLBACK *PSYM_ENUMSYMBOLS_CALLBACK)(PSTR SymbolName,ULONG SymbolAddress,ULONG SymbolSize,PVOID UserContext);
+ typedef BOOL (CALLBACK *PSYM_ENUMSYMBOLS_CALLBACKW)(PWSTR SymbolName,ULONG SymbolAddress,ULONG SymbolSize,PVOID UserContext);
+ typedef BOOL (CALLBACK *PENUMLOADED_MODULES_CALLBACK)(PSTR ModuleName,ULONG ModuleBase,ULONG ModuleSize,PVOID UserContext);
+ typedef BOOL (CALLBACK *PSYMBOL_REGISTERED_CALLBACK)(HANDLE hProcess,ULONG ActionCode,PVOID CallbackData,PVOID UserContext);
+#endif
+
+#define SYMFLAG_VALUEPRESENT 0x00000001
+#define SYMFLAG_REGISTER 0x00000008
+#define SYMFLAG_REGREL 0x00000010
+#define SYMFLAG_FRAMEREL 0x00000020
+#define SYMFLAG_PARAMETER 0x00000040
+#define SYMFLAG_LOCAL 0x00000080
+#define SYMFLAG_CONSTANT 0x00000100
+#define SYMFLAG_EXPORT 0x00000200
+#define SYMFLAG_FORWARDER 0x00000400
+#define SYMFLAG_FUNCTION 0x00000800
+#define SYMFLAG_VIRTUAL 0x00001000
+#define SYMFLAG_THUNK 0x00002000
+#define SYMFLAG_TLSREL 0x00004000
+
+ typedef enum {
+ SymNone = 0,SymCoff,SymCv,SymPdb,SymExport,SymDeferred,SymSym,SymDia,SymVirtual,NumSymTypes
+ } SYM_TYPE;
+
+ typedef struct _IMAGEHLP_SYMBOL64 {
+ DWORD SizeOfStruct;
+ DWORD64 Address;
+ DWORD Size;
+ DWORD Flags;
+ DWORD MaxNameLength;
+ CHAR Name[1];
+ } IMAGEHLP_SYMBOL64,*PIMAGEHLP_SYMBOL64;
+
+ typedef struct _IMAGEHLP_SYMBOL64_PACKAGE {
+ IMAGEHLP_SYMBOL64 sym;
+ CHAR name[MAX_SYM_NAME + 1];
+ } IMAGEHLP_SYMBOL64_PACKAGE,*PIMAGEHLP_SYMBOL64_PACKAGE;
+
+#ifdef _IMAGEHLP64
+
+#define IMAGEHLP_SYMBOL IMAGEHLP_SYMBOL64
+#define PIMAGEHLP_SYMBOL PIMAGEHLP_SYMBOL64
+#define IMAGEHLP_SYMBOL_PACKAGE IMAGEHLP_SYMBOL64_PACKAGE
+#define PIMAGEHLP_SYMBOL_PACKAGE PIMAGEHLP_SYMBOL64_PACKAGE
+#else
+
+ typedef struct _IMAGEHLP_SYMBOL {
+ DWORD SizeOfStruct;
+ DWORD Address;
+ DWORD Size;
+ DWORD Flags;
+ DWORD MaxNameLength;
+ CHAR Name[1];
+ } IMAGEHLP_SYMBOL,*PIMAGEHLP_SYMBOL;
+
+ typedef struct _IMAGEHLP_SYMBOL_PACKAGE {
+ IMAGEHLP_SYMBOL sym;
+ CHAR name[MAX_SYM_NAME + 1];
+ } IMAGEHLP_SYMBOL_PACKAGE,*PIMAGEHLP_SYMBOL_PACKAGE;
+#endif
+
+ typedef struct _IMAGEHLP_MODULE64 {
+ DWORD SizeOfStruct;
+ DWORD64 BaseOfImage;
+ DWORD ImageSize;
+ DWORD TimeDateStamp;
+ DWORD CheckSum;
+ DWORD NumSyms;
+ SYM_TYPE SymType;
+ CHAR ModuleName[32];
+ CHAR ImageName[256];
+ CHAR LoadedImageName[256];
+ CHAR LoadedPdbName[256];
+ DWORD CVSig;
+ CHAR CVData[MAX_PATH*3];
+ DWORD PdbSig;
+ GUID PdbSig70;
+ DWORD PdbAge;
+ BOOL PdbUnmatched;
+ BOOL DbgUnmatched;
+ BOOL LineNumbers;
+ BOOL GlobalSymbols;
+ BOOL TypeInfo;
+ } IMAGEHLP_MODULE64,*PIMAGEHLP_MODULE64;
+
+ typedef struct _IMAGEHLP_MODULE64W {
+ DWORD SizeOfStruct;
+ DWORD64 BaseOfImage;
+ DWORD ImageSize;
+ DWORD TimeDateStamp;
+ DWORD CheckSum;
+ DWORD NumSyms;
+ SYM_TYPE SymType;
+ WCHAR ModuleName[32];
+ WCHAR ImageName[256];
+ WCHAR LoadedImageName[256];
+ WCHAR LoadedPdbName[256];
+ DWORD CVSig;
+ WCHAR CVData[MAX_PATH*3];
+ DWORD PdbSig;
+ GUID PdbSig70;
+ DWORD PdbAge;
+ BOOL PdbUnmatched;
+ BOOL DbgUnmatched;
+ BOOL LineNumbers;
+ BOOL GlobalSymbols;
+ BOOL TypeInfo;
+ } IMAGEHLP_MODULEW64,*PIMAGEHLP_MODULEW64;
+
+#ifdef _IMAGEHLP64
+#define IMAGEHLP_MODULE IMAGEHLP_MODULE64
+#define PIMAGEHLP_MODULE PIMAGEHLP_MODULE64
+#define IMAGEHLP_MODULEW IMAGEHLP_MODULEW64
+#define PIMAGEHLP_MODULEW PIMAGEHLP_MODULEW64
+#else
+ typedef struct _IMAGEHLP_MODULE {
+ DWORD SizeOfStruct;
+ DWORD BaseOfImage;
+ DWORD ImageSize;
+ DWORD TimeDateStamp;
+ DWORD CheckSum;
+ DWORD NumSyms;
+ SYM_TYPE SymType;
+ CHAR ModuleName[32];
+ CHAR ImageName[256];
+ CHAR LoadedImageName[256];
+ } IMAGEHLP_MODULE,*PIMAGEHLP_MODULE;
+
+ typedef struct _IMAGEHLP_MODULEW {
+ DWORD SizeOfStruct;
+ DWORD BaseOfImage;
+ DWORD ImageSize;
+ DWORD TimeDateStamp;
+ DWORD CheckSum;
+ DWORD NumSyms;
+ SYM_TYPE SymType;
+ WCHAR ModuleName[32];
+ WCHAR ImageName[256];
+ WCHAR LoadedImageName[256];
+ } IMAGEHLP_MODULEW,*PIMAGEHLP_MODULEW;
+#endif
+
+ typedef struct _IMAGEHLP_LINE64 {
+ DWORD SizeOfStruct;
+ PVOID Key;
+ DWORD LineNumber;
+ PCHAR FileName;
+ DWORD64 Address;
+ } IMAGEHLP_LINE64,*PIMAGEHLP_LINE64;
+
+#ifdef _IMAGEHLP64
+#define IMAGEHLP_LINE IMAGEHLP_LINE64
+#define PIMAGEHLP_LINE PIMAGEHLP_LINE64
+#else
+ typedef struct _IMAGEHLP_LINE {
+ DWORD SizeOfStruct;
+ PVOID Key;
+ DWORD LineNumber;
+ PCHAR FileName;
+ DWORD Address;
+ } IMAGEHLP_LINE,*PIMAGEHLP_LINE;
+#endif
+
+ typedef struct _SOURCEFILE {
+ DWORD64 ModBase;
+ PCHAR FileName;
+ } SOURCEFILE,*PSOURCEFILE;
+
+#define CBA_DEFERRED_SYMBOL_LOAD_START 0x00000001
+#define CBA_DEFERRED_SYMBOL_LOAD_COMPLETE 0x00000002
+#define CBA_DEFERRED_SYMBOL_LOAD_FAILURE 0x00000003
+#define CBA_SYMBOLS_UNLOADED 0x00000004
+#define CBA_DUPLICATE_SYMBOL 0x00000005
+#define CBA_READ_MEMORY 0x00000006
+#define CBA_DEFERRED_SYMBOL_LOAD_CANCEL 0x00000007
+#define CBA_SET_OPTIONS 0x00000008
+#define CBA_EVENT 0x00000010
+#define CBA_DEFERRED_SYMBOL_LOAD_PARTIAL 0x00000020
+#define CBA_DEBUG_INFO 0x10000000
+
+ typedef struct _IMAGEHLP_CBA_READ_MEMORY {
+ DWORD64 addr;
+ PVOID buf;
+ DWORD bytes;
+ DWORD *bytesread;
+ } IMAGEHLP_CBA_READ_MEMORY,*PIMAGEHLP_CBA_READ_MEMORY;
+
+ enum {
+ sevInfo = 0,sevProblem,sevAttn,sevFatal,sevMax
+ };
+
+ typedef struct _IMAGEHLP_CBA_EVENT {
+ DWORD severity;
+ DWORD code;
+ PCHAR desc;
+ PVOID object;
+ } IMAGEHLP_CBA_EVENT,*PIMAGEHLP_CBA_EVENT;
+
+ typedef struct _IMAGEHLP_DEFERRED_SYMBOL_LOAD64 {
+ DWORD SizeOfStruct;
+ DWORD64 BaseOfImage;
+ DWORD CheckSum;
+ DWORD TimeDateStamp;
+ CHAR FileName[MAX_PATH];
+ BOOLEAN Reparse;
+ HANDLE hFile;
+ DWORD Flags;
+ } IMAGEHLP_DEFERRED_SYMBOL_LOAD64,*PIMAGEHLP_DEFERRED_SYMBOL_LOAD64;
+
+#define DSLFLAG_MISMATCHED_PDB 0x1
+#define DSLFLAG_MISMATCHED_DBG 0x2
+
+#ifdef _IMAGEHLP64
+#define IMAGEHLP_DEFERRED_SYMBOL_LOAD IMAGEHLP_DEFERRED_SYMBOL_LOAD64
+#define PIMAGEHLP_DEFERRED_SYMBOL_LOAD PIMAGEHLP_DEFERRED_SYMBOL_LOAD64
+#else
+ typedef struct _IMAGEHLP_DEFERRED_SYMBOL_LOAD {
+ DWORD SizeOfStruct;
+ DWORD BaseOfImage;
+ DWORD CheckSum;
+ DWORD TimeDateStamp;
+ CHAR FileName[MAX_PATH];
+ BOOLEAN Reparse;
+ HANDLE hFile;
+ } IMAGEHLP_DEFERRED_SYMBOL_LOAD,*PIMAGEHLP_DEFERRED_SYMBOL_LOAD;
+#endif
+
+ typedef struct _IMAGEHLP_DUPLICATE_SYMBOL64 {
+ DWORD SizeOfStruct;
+ DWORD NumberOfDups;
+ PIMAGEHLP_SYMBOL64 Symbol;
+ DWORD SelectedSymbol;
+ } IMAGEHLP_DUPLICATE_SYMBOL64,*PIMAGEHLP_DUPLICATE_SYMBOL64;
+
+#ifdef _IMAGEHLP64
+#define IMAGEHLP_DUPLICATE_SYMBOL IMAGEHLP_DUPLICATE_SYMBOL64
+#define PIMAGEHLP_DUPLICATE_SYMBOL PIMAGEHLP_DUPLICATE_SYMBOL64
+#else
+ typedef struct _IMAGEHLP_DUPLICATE_SYMBOL {
+ DWORD SizeOfStruct;
+ DWORD NumberOfDups;
+ PIMAGEHLP_SYMBOL Symbol;
+ DWORD SelectedSymbol;
+ } IMAGEHLP_DUPLICATE_SYMBOL,*PIMAGEHLP_DUPLICATE_SYMBOL;
+#endif
+
+ BOOL IMAGEAPI SymSetParentWindow(HWND hwnd);
+ PCHAR IMAGEAPI SymSetHomeDirectory(PCSTR dir);
+ PCHAR IMAGEAPI SymGetHomeDirectory(DWORD type,PSTR dir,size_t size);
+
+ enum {
+ hdBase = 0,hdSym,hdSrc,hdMax
+ };
+
+#define SYMOPT_CASE_INSENSITIVE 0x00000001
+#define SYMOPT_UNDNAME 0x00000002
+#define SYMOPT_DEFERRED_LOADS 0x00000004
+#define SYMOPT_NO_CPP 0x00000008
+#define SYMOPT_LOAD_LINES 0x00000010
+#define SYMOPT_OMAP_FIND_NEAREST 0x00000020
+#define SYMOPT_LOAD_ANYTHING 0x00000040
+#define SYMOPT_IGNORE_CVREC 0x00000080
+#define SYMOPT_NO_UNQUALIFIED_LOADS 0x00000100
+#define SYMOPT_FAIL_CRITICAL_ERRORS 0x00000200
+#define SYMOPT_EXACT_SYMBOLS 0x00000400
+#define SYMOPT_ALLOW_ABSOLUTE_SYMBOLS 0x00000800
+#define SYMOPT_IGNORE_NT_SYMPATH 0x00001000
+#define SYMOPT_INCLUDE_32BIT_MODULES 0x00002000
+#define SYMOPT_PUBLICS_ONLY 0x00004000
+#define SYMOPT_NO_PUBLICS 0x00008000
+#define SYMOPT_AUTO_PUBLICS 0x00010000
+#define SYMOPT_NO_IMAGE_SEARCH 0x00020000
+#define SYMOPT_SECURE 0x00040000
+#define SYMOPT_NO_PROMPTS 0x00080000
+
+#define SYMOPT_DEBUG 0x80000000
+
+ DWORD IMAGEAPI SymSetOptions(DWORD SymOptions);
+ DWORD IMAGEAPI SymGetOptions(VOID);
+ BOOL IMAGEAPI SymCleanup(HANDLE hProcess);
+ BOOL IMAGEAPI SymMatchString(LPSTR string,LPSTR expression,BOOL fCase);
+
+ typedef BOOL (CALLBACK *PSYM_ENUMSOURCFILES_CALLBACK)(PSOURCEFILE pSourceFile,PVOID UserContext);
+
+ BOOL IMAGEAPI SymEnumSourceFiles(HANDLE hProcess,ULONG64 ModBase,LPSTR Mask,PSYM_ENUMSOURCFILES_CALLBACK cbSrcFiles,PVOID UserContext);
+ BOOL IMAGEAPI SymEnumerateModules64(HANDLE hProcess,PSYM_ENUMMODULES_CALLBACK64 EnumModulesCallback,PVOID UserContext);
+
+#ifdef _IMAGEHLP64
+#define SymEnumerateModules SymEnumerateModules64
+#else
+ BOOL IMAGEAPI SymEnumerateModules(HANDLE hProcess,PSYM_ENUMMODULES_CALLBACK EnumModulesCallback,PVOID UserContext);
+#endif
+
+ BOOL IMAGEAPI SymEnumerateSymbols64(HANDLE hProcess,DWORD64 BaseOfDll,PSYM_ENUMSYMBOLS_CALLBACK64 EnumSymbolsCallback,PVOID UserContext);
+ BOOL IMAGEAPI SymEnumerateSymbolsW64(HANDLE hProcess,DWORD64 BaseOfDll,PSYM_ENUMSYMBOLS_CALLBACK64W EnumSymbolsCallback,PVOID UserContext);
+
+#ifdef _IMAGEHLP64
+#define SymEnumerateSymbols SymEnumerateSymbols64
+#define SymEnumerateSymbolsW SymEnumerateSymbolsW64
+#else
+ BOOL IMAGEAPI SymEnumerateSymbols(HANDLE hProcess,DWORD BaseOfDll,PSYM_ENUMSYMBOLS_CALLBACK EnumSymbolsCallback,PVOID UserContext);
+ BOOL IMAGEAPI SymEnumerateSymbolsW(HANDLE hProcess,DWORD BaseOfDll,PSYM_ENUMSYMBOLS_CALLBACKW EnumSymbolsCallback,PVOID UserContext);
+#endif
+
+ BOOL IMAGEAPI EnumerateLoadedModules64(HANDLE hProcess,PENUMLOADED_MODULES_CALLBACK64 EnumLoadedModulesCallback,PVOID UserContext);
+#ifdef _IMAGEHLP64
+#define EnumerateLoadedModules EnumerateLoadedModules64
+#else
+ BOOL IMAGEAPI EnumerateLoadedModules(HANDLE hProcess,PENUMLOADED_MODULES_CALLBACK EnumLoadedModulesCallback,PVOID UserContext);
+#endif
+
+ PVOID IMAGEAPI SymFunctionTableAccess64(HANDLE hProcess,DWORD64 AddrBase);
+
+#ifdef _IMAGEHLP64
+#define SymFunctionTableAccess SymFunctionTableAccess64
+#else
+ PVOID IMAGEAPI SymFunctionTableAccess(HANDLE hProcess,DWORD AddrBase);
+#endif
+
+ BOOL IMAGEAPI SymGetModuleInfo64(HANDLE hProcess,DWORD64 qwAddr,PIMAGEHLP_MODULE64 ModuleInfo);
+ BOOL IMAGEAPI SymGetModuleInfoW64(HANDLE hProcess,DWORD64 qwAddr,PIMAGEHLP_MODULEW64 ModuleInfo);
+
+#ifdef _IMAGEHLP64
+#define SymGetModuleInfo SymGetModuleInfo64
+#define SymGetModuleInfoW SymGetModuleInfoW64
+#else
+ BOOL IMAGEAPI SymGetModuleInfo(HANDLE hProcess,DWORD dwAddr,PIMAGEHLP_MODULE ModuleInfo);
+ BOOL IMAGEAPI SymGetModuleInfoW(HANDLE hProcess,DWORD dwAddr,PIMAGEHLP_MODULEW ModuleInfo);
+#endif
+
+ DWORD64 IMAGEAPI SymGetModuleBase64(HANDLE hProcess,DWORD64 qwAddr);
+
+#ifdef _IMAGEHLP64
+#define SymGetModuleBase SymGetModuleBase64
+#else
+ DWORD IMAGEAPI SymGetModuleBase(HANDLE hProcess,DWORD dwAddr);
+#endif
+
+ BOOL IMAGEAPI SymGetSymNext64(HANDLE hProcess,PIMAGEHLP_SYMBOL64 Symbol);
+
+#ifdef _IMAGEHLP64
+#define SymGetSymNext SymGetSymNext64
+#else
+ BOOL IMAGEAPI SymGetSymNext(HANDLE hProcess,PIMAGEHLP_SYMBOL Symbol);
+#endif
+
+ BOOL IMAGEAPI SymGetSymPrev64(HANDLE hProcess,PIMAGEHLP_SYMBOL64 Symbol);
+
+#ifdef _IMAGEHLP64
+#define SymGetSymPrev SymGetSymPrev64
+#else
+ BOOL IMAGEAPI SymGetSymPrev(HANDLE hProcess,PIMAGEHLP_SYMBOL Symbol);
+#endif
+
+ typedef struct _SRCCODEINFO {
+ DWORD SizeOfStruct;
+ PVOID Key;
+ DWORD64 ModBase;
+ CHAR Obj[MAX_PATH + 1];
+ CHAR FileName[MAX_PATH + 1];
+ DWORD LineNumber;
+ DWORD64 Address;
+ } SRCCODEINFO,*PSRCCODEINFO;
+
+ typedef BOOL (CALLBACK *PSYM_ENUMLINES_CALLBACK)(PSRCCODEINFO LineInfo,PVOID UserContext);
+
+ BOOL IMAGEAPI SymEnumLines(HANDLE hProcess,ULONG64 Base,PCSTR Obj,PCSTR File,PSYM_ENUMLINES_CALLBACK EnumLinesCallback,PVOID UserContext);
+ BOOL IMAGEAPI SymGetLineFromAddr64(HANDLE hProcess,DWORD64 qwAddr,PDWORD pdwDisplacement,PIMAGEHLP_LINE64 Line64);
+
+#ifdef _IMAGEHLP64
+#define SymGetLineFromAddr SymGetLineFromAddr64
+#else
+ BOOL IMAGEAPI SymGetLineFromAddr(HANDLE hProcess,DWORD dwAddr,PDWORD pdwDisplacement,PIMAGEHLP_LINE Line);
+#endif
+
+ BOOL IMAGEAPI SymGetLineFromName64(HANDLE hProcess,PSTR ModuleName,PSTR FileName,DWORD dwLineNumber,PLONG plDisplacement,PIMAGEHLP_LINE64 Line);
+
+#ifdef _IMAGEHLP64
+#define SymGetLineFromName SymGetLineFromName64
+#else
+ BOOL IMAGEAPI SymGetLineFromName(HANDLE hProcess,PSTR ModuleName,PSTR FileName,DWORD dwLineNumber,PLONG plDisplacement,PIMAGEHLP_LINE Line);
+#endif
+
+ BOOL IMAGEAPI SymGetLineNext64(HANDLE hProcess,PIMAGEHLP_LINE64 Line);
+
+#ifdef _IMAGEHLP64
+#define SymGetLineNext SymGetLineNext64
+#else
+ BOOL IMAGEAPI SymGetLineNext(HANDLE hProcess,PIMAGEHLP_LINE Line);
+#endif
+
+ BOOL IMAGEAPI SymGetLinePrev64(HANDLE hProcess,PIMAGEHLP_LINE64 Line);
+
+#ifdef _IMAGEHLP64
+#define SymGetLinePrev SymGetLinePrev64
+#else
+ BOOL IMAGEAPI SymGetLinePrev(HANDLE hProcess,PIMAGEHLP_LINE Line);
+#endif
+
+ BOOL IMAGEAPI SymMatchFileName(PSTR FileName,PSTR Match,PSTR *FileNameStop,PSTR *MatchStop);
+ BOOL IMAGEAPI SymInitialize(HANDLE hProcess,PSTR UserSearchPath,BOOL fInvadeProcess);
+ BOOL IMAGEAPI SymGetSearchPath(HANDLE hProcess,PSTR SearchPath,DWORD SearchPathLength);
+ BOOL IMAGEAPI SymSetSearchPath(HANDLE hProcess,PSTR SearchPath);
+ DWORD64 IMAGEAPI SymLoadModule64(HANDLE hProcess,HANDLE hFile,PSTR ImageName,PSTR ModuleName,DWORD64 BaseOfDll,DWORD SizeOfDll);
+
+#define SLMFLAG_VIRTUAL 0x1
+
+ DWORD64 IMAGEAPI SymLoadModuleEx(HANDLE hProcess,HANDLE hFile,PSTR ImageName,PSTR ModuleName,DWORD64 BaseOfDll,DWORD DllSize,PMODLOAD_DATA Data,DWORD Flags);
+
+#ifdef _IMAGEHLP64
+#define SymLoadModule SymLoadModule64
+#else
+ DWORD IMAGEAPI SymLoadModule(HANDLE hProcess,HANDLE hFile,PSTR ImageName,PSTR ModuleName,DWORD BaseOfDll,DWORD SizeOfDll);
+#endif
+
+ BOOL IMAGEAPI SymUnloadModule64(HANDLE hProcess,DWORD64 BaseOfDll);
+
+#ifdef _IMAGEHLP64
+#define SymUnloadModule SymUnloadModule64
+#else
+ BOOL IMAGEAPI SymUnloadModule(HANDLE hProcess,DWORD BaseOfDll);
+#endif
+
+ BOOL IMAGEAPI SymUnDName64(PIMAGEHLP_SYMBOL64 sym,PSTR UnDecName,DWORD UnDecNameLength);
+
+#ifdef _IMAGEHLP64
+#define SymUnDName SymUnDName64
+#else
+ BOOL IMAGEAPI SymUnDName(PIMAGEHLP_SYMBOL sym,PSTR UnDecName,DWORD UnDecNameLength);
+#endif
+
+ BOOL IMAGEAPI SymRegisterCallback64(HANDLE hProcess,PSYMBOL_REGISTERED_CALLBACK64 CallbackFunction,ULONG64 UserContext);
+
+ BOOL IMAGEAPI SymRegisterFunctionEntryCallback64(HANDLE hProcess,PSYMBOL_FUNCENTRY_CALLBACK64 CallbackFunction,ULONG64 UserContext);
+
+#ifdef _IMAGEHLP64
+#define SymRegisterCallback SymRegisterCallback64
+#define SymRegisterFunctionEntryCallback SymRegisterFunctionEntryCallback64
+#else
+ BOOL IMAGEAPI SymRegisterCallback(HANDLE hProcess,PSYMBOL_REGISTERED_CALLBACK CallbackFunction,PVOID UserContext);
+ BOOL IMAGEAPI SymRegisterFunctionEntryCallback(HANDLE hProcess,PSYMBOL_FUNCENTRY_CALLBACK CallbackFunction,PVOID UserContext);
+#endif
+
+ typedef struct _IMAGEHLP_SYMBOL_SRC {
+ DWORD sizeofstruct;
+ DWORD type;
+ char file[MAX_PATH];
+ } IMAGEHLP_SYMBOL_SRC,*PIMAGEHLP_SYMBOL_SRC;
+
+ typedef struct _MODULE_TYPE_INFO {
+ USHORT dataLength;
+ USHORT leaf;
+ BYTE data[1];
+ } MODULE_TYPE_INFO,*PMODULE_TYPE_INFO;
+
+ typedef struct _SYMBOL_INFO {
+ ULONG SizeOfStruct;
+ ULONG TypeIndex;
+ ULONG64 Reserved[2];
+ ULONG info;
+ ULONG Size;
+ ULONG64 ModBase;
+ ULONG Flags;
+ ULONG64 Value;
+ ULONG64 Address;
+ ULONG Register;
+ ULONG Scope;
+ ULONG Tag;
+ ULONG NameLen;
+ ULONG MaxNameLen;
+ CHAR Name[1];
+ } SYMBOL_INFO,*PSYMBOL_INFO;
+
+ typedef struct _SYMBOL_INFO_PACKAGE {
+ SYMBOL_INFO si;
+ CHAR name[MAX_SYM_NAME + 1];
+ } SYMBOL_INFO_PACKAGE,*PSYMBOL_INFO_PACKAGE;
+
+ typedef struct _IMAGEHLP_STACK_FRAME
+ {
+ ULONG64 InstructionOffset;
+ ULONG64 ReturnOffset;
+ ULONG64 FrameOffset;
+ ULONG64 StackOffset;
+ ULONG64 BackingStoreOffset;
+ ULONG64 FuncTableEntry;
+ ULONG64 Params[4];
+ ULONG64 Reserved[5];
+ BOOL Virtual;
+ ULONG Reserved2;
+ } IMAGEHLP_STACK_FRAME,*PIMAGEHLP_STACK_FRAME;
+
+ typedef VOID IMAGEHLP_CONTEXT,*PIMAGEHLP_CONTEXT;
+
+ BOOL IMAGEAPI SymSetContext(HANDLE hProcess,PIMAGEHLP_STACK_FRAME StackFrame,PIMAGEHLP_CONTEXT Context);
+ BOOL IMAGEAPI SymFromAddr(HANDLE hProcess,DWORD64 Address,PDWORD64 Displacement,PSYMBOL_INFO Symbol);
+ BOOL IMAGEAPI SymFromToken(HANDLE hProcess,DWORD64 Base,DWORD Token,PSYMBOL_INFO Symbol);
+ BOOL IMAGEAPI SymFromName(HANDLE hProcess,LPSTR Name,PSYMBOL_INFO Symbol);
+
+ typedef BOOL (CALLBACK *PSYM_ENUMERATESYMBOLS_CALLBACK)(PSYMBOL_INFO pSymInfo,ULONG SymbolSize,PVOID UserContext);
+
+ BOOL IMAGEAPI SymEnumSymbols(HANDLE hProcess,ULONG64 BaseOfDll,PCSTR Mask,PSYM_ENUMERATESYMBOLS_CALLBACK EnumSymbolsCallback,PVOID UserContext);
+ BOOL IMAGEAPI SymEnumSymbolsForAddr(HANDLE hProcess,DWORD64 Address,PSYM_ENUMERATESYMBOLS_CALLBACK EnumSymbolsCallback,PVOID UserContext);
+
+#define SYMENUMFLAG_FULLSRCH 1
+#define SYMENUMFLAG_SPEEDSRCH 2
+
+ typedef enum _IMAGEHLP_SYMBOL_TYPE_INFO {
+ TI_GET_SYMTAG,TI_GET_SYMNAME,TI_GET_LENGTH,TI_GET_TYPE,TI_GET_TYPEID,TI_GET_BASETYPE,TI_GET_ARRAYINDEXTYPEID,TI_FINDCHILDREN,
+ TI_GET_DATAKIND,TI_GET_ADDRESSOFFSET,TI_GET_OFFSET,TI_GET_VALUE,TI_GET_COUNT,TI_GET_CHILDRENCOUNT,TI_GET_BITPOSITION,TI_GET_VIRTUALBASECLASS,
+ TI_GET_VIRTUALTABLESHAPEID,TI_GET_VIRTUALBASEPOINTEROFFSET,TI_GET_CLASSPARENTID,TI_GET_NESTED,TI_GET_SYMINDEX,TI_GET_LEXICALPARENT,
+ TI_GET_ADDRESS,TI_GET_THISADJUST,TI_GET_UDTKIND,TI_IS_EQUIV_TO,TI_GET_CALLING_CONVENTION
+ } IMAGEHLP_SYMBOL_TYPE_INFO;
+
+ typedef struct _TI_FINDCHILDREN_PARAMS {
+ ULONG Count;
+ ULONG Start;
+ ULONG ChildId[1];
+ } TI_FINDCHILDREN_PARAMS;
+
+ BOOL IMAGEAPI SymGetTypeInfo(HANDLE hProcess,DWORD64 ModBase,ULONG TypeId,IMAGEHLP_SYMBOL_TYPE_INFO GetType,PVOID pInfo);
+ BOOL IMAGEAPI SymEnumTypes(HANDLE hProcess,ULONG64 BaseOfDll,PSYM_ENUMERATESYMBOLS_CALLBACK EnumSymbolsCallback,PVOID UserContext);
+ BOOL IMAGEAPI SymGetTypeFromName(HANDLE hProcess,ULONG64 BaseOfDll,LPSTR Name,PSYMBOL_INFO Symbol);
+ BOOL IMAGEAPI SymAddSymbol(HANDLE hProcess,ULONG64 BaseOfDll,PCSTR Name,DWORD64 Address,DWORD Size,DWORD Flags);
+ BOOL IMAGEAPI SymDeleteSymbol(HANDLE hProcess,ULONG64 BaseOfDll,PCSTR Name,DWORD64 Address,DWORD Flags);
+
+ typedef BOOL (WINAPI *PDBGHELP_CREATE_USER_DUMP_CALLBACK)(DWORD DataType,PVOID *Data,LPDWORD DataLength,PVOID UserData);
+
+ BOOL WINAPI DbgHelpCreateUserDump(LPSTR FileName,PDBGHELP_CREATE_USER_DUMP_CALLBACK Callback,PVOID UserData);
+ BOOL WINAPI DbgHelpCreateUserDumpW(LPWSTR FileName,PDBGHELP_CREATE_USER_DUMP_CALLBACK Callback,PVOID UserData);
+ BOOL IMAGEAPI SymGetSymFromAddr64(HANDLE hProcess,DWORD64 qwAddr,PDWORD64 pdwDisplacement,PIMAGEHLP_SYMBOL64 Symbol);
+
+#ifdef _IMAGEHLP64
+#define SymGetSymFromAddr SymGetSymFromAddr64
+#else
+ BOOL IMAGEAPI SymGetSymFromAddr(HANDLE hProcess,DWORD dwAddr,PDWORD pdwDisplacement,PIMAGEHLP_SYMBOL Symbol);
+#endif
+
+ BOOL IMAGEAPI SymGetSymFromName64(HANDLE hProcess,PSTR Name,PIMAGEHLP_SYMBOL64 Symbol);
+
+#ifdef _IMAGEHLP64
+#define SymGetSymFromName SymGetSymFromName64
+#else
+ BOOL IMAGEAPI SymGetSymFromName(HANDLE hProcess,PSTR Name,PIMAGEHLP_SYMBOL Symbol);
+#endif
+
+ DBHLP_DEPRECIATED BOOL IMAGEAPI FindFileInPath(HANDLE hprocess,LPSTR SearchPath,LPSTR FileName,PVOID id,DWORD two,DWORD three,DWORD flags,LPSTR FilePath);
+ DBHLP_DEPRECIATED BOOL IMAGEAPI FindFileInSearchPath(HANDLE hprocess,LPSTR SearchPath,LPSTR FileName,DWORD one,DWORD two,DWORD three,LPSTR FilePath);
+ DBHLP_DEPRECIATED BOOL IMAGEAPI SymEnumSym(HANDLE hProcess,ULONG64 BaseOfDll,PSYM_ENUMERATESYMBOLS_CALLBACK EnumSymbolsCallback,PVOID UserContext);
+
+#define SYMF_OMAP_GENERATED 0x00000001
+#define SYMF_OMAP_MODIFIED 0x00000002
+#define SYMF_REGISTER 0x00000008
+#define SYMF_REGREL 0x00000010
+#define SYMF_FRAMEREL 0x00000020
+#define SYMF_PARAMETER 0x00000040
+#define SYMF_LOCAL 0x00000080
+#define SYMF_CONSTANT 0x00000100
+#define SYMF_EXPORT 0x00000200
+#define SYMF_FORWARDER 0x00000400
+#define SYMF_FUNCTION 0x00000800
+#define SYMF_VIRTUAL 0x00001000
+#define SYMF_THUNK 0x00002000
+#define SYMF_TLSREL 0x00004000
+
+#define IMAGEHLP_SYMBOL_INFO_VALUEPRESENT 1
+#define IMAGEHLP_SYMBOL_INFO_REGISTER SYMF_REGISTER
+#define IMAGEHLP_SYMBOL_INFO_REGRELATIVE SYMF_REGREL
+#define IMAGEHLP_SYMBOL_INFO_FRAMERELATIVE SYMF_FRAMEREL
+#define IMAGEHLP_SYMBOL_INFO_PARAMETER SYMF_PARAMETER
+#define IMAGEHLP_SYMBOL_INFO_LOCAL SYMF_LOCAL
+#define IMAGEHLP_SYMBOL_INFO_CONSTANT SYMF_CONSTANT
+#define IMAGEHLP_SYMBOL_FUNCTION SYMF_FUNCTION
+#define IMAGEHLP_SYMBOL_VIRTUAL SYMF_VIRTUAL
+#define IMAGEHLP_SYMBOL_THUNK SYMF_THUNK
+#define IMAGEHLP_SYMBOL_INFO_TLSRELATIVE SYMF_TLSREL
+
+#include <pshpack4.h>
+
+#define MINIDUMP_SIGNATURE ('PMDM')
+#define MINIDUMP_VERSION (42899)
+ typedef DWORD RVA;
+ typedef ULONG64 RVA64;
+
+ typedef struct _MINIDUMP_LOCATION_DESCRIPTOR {
+ ULONG32 DataSize;
+ RVA Rva;
+ } MINIDUMP_LOCATION_DESCRIPTOR;
+
+ typedef struct _MINIDUMP_LOCATION_DESCRIPTOR64 {
+ ULONG64 DataSize;
+ RVA64 Rva;
+ } MINIDUMP_LOCATION_DESCRIPTOR64;
+
+ typedef struct _MINIDUMP_MEMORY_DESCRIPTOR {
+ ULONG64 StartOfMemoryRange;
+ MINIDUMP_LOCATION_DESCRIPTOR Memory;
+ } MINIDUMP_MEMORY_DESCRIPTOR,*PMINIDUMP_MEMORY_DESCRIPTOR;
+
+ typedef struct _MINIDUMP_MEMORY_DESCRIPTOR64 {
+ ULONG64 StartOfMemoryRange;
+ ULONG64 DataSize;
+ } MINIDUMP_MEMORY_DESCRIPTOR64,*PMINIDUMP_MEMORY_DESCRIPTOR64;
+
+ typedef struct _MINIDUMP_HEADER {
+ ULONG32 Signature;
+ ULONG32 Version;
+ ULONG32 NumberOfStreams;
+ RVA StreamDirectoryRva;
+ ULONG32 CheckSum;
+ union {
+ ULONG32 Reserved;
+ ULONG32 TimeDateStamp;
+ } DUMMYUNIONNAME;
+ ULONG64 Flags;
+ } MINIDUMP_HEADER,*PMINIDUMP_HEADER;
+
+ typedef struct _MINIDUMP_DIRECTORY {
+ ULONG32 StreamType;
+ MINIDUMP_LOCATION_DESCRIPTOR Location;
+ } MINIDUMP_DIRECTORY,*PMINIDUMP_DIRECTORY;
+
+ typedef struct _MINIDUMP_STRING {
+ ULONG32 Length;
+ WCHAR Buffer [0];
+ } MINIDUMP_STRING,*PMINIDUMP_STRING;
+
+ typedef enum _MINIDUMP_STREAM_TYPE {
+ UnusedStream = 0,ReservedStream0 = 1,ReservedStream1 = 2,ThreadListStream = 3,ModuleListStream = 4,MemoryListStream = 5,
+ ExceptionStream = 6,SystemInfoStream = 7,ThreadExListStream = 8,Memory64ListStream = 9,CommentStreamA = 10,CommentStreamW = 11,
+ HandleDataStream = 12,FunctionTableStream = 13,UnloadedModuleListStream = 14,MiscInfoStream = 15,LastReservedStream = 0xffff
+ } MINIDUMP_STREAM_TYPE;
+
+ typedef union _CPU_INFORMATION {
+ struct {
+ ULONG32 VendorId [3 ];
+ ULONG32 VersionInformation;
+ ULONG32 FeatureInformation;
+ ULONG32 AMDExtendedCpuFeatures;
+ } X86CpuInfo;
+ struct {
+ ULONG64 ProcessorFeatures [2 ];
+ } OtherCpuInfo;
+ } CPU_INFORMATION,*PCPU_INFORMATION;
+
+ typedef struct _MINIDUMP_SYSTEM_INFO {
+ USHORT ProcessorArchitecture;
+ USHORT ProcessorLevel;
+ USHORT ProcessorRevision;
+ union {
+ USHORT Reserved0;
+ struct {
+ UCHAR NumberOfProcessors;
+ UCHAR ProductType;
+ } DUMMYSTRUCTNAME;
+ } DUMMYUNIONNAME;
+ ULONG32 MajorVersion;
+ ULONG32 MinorVersion;
+ ULONG32 BuildNumber;
+ ULONG32 PlatformId;
+ RVA CSDVersionRva;
+ union {
+ ULONG32 Reserved1;
+ struct {
+ USHORT SuiteMask;
+ USHORT Reserved2;
+ } DUMMYSTRUCTNAME;
+ } DUMMYUNIONNAME1;
+ CPU_INFORMATION Cpu;
+ } MINIDUMP_SYSTEM_INFO,*PMINIDUMP_SYSTEM_INFO;
+
+ C_ASSERT (sizeof (((PPROCESS_INFORMATION)0)->dwThreadId)==4);
+
+ typedef struct _MINIDUMP_THREAD {
+ ULONG32 ThreadId;
+ ULONG32 SuspendCount;
+ ULONG32 PriorityClass;
+ ULONG32 Priority;
+ ULONG64 Teb;
+ MINIDUMP_MEMORY_DESCRIPTOR Stack;
+ MINIDUMP_LOCATION_DESCRIPTOR ThreadContext;
+ } MINIDUMP_THREAD,*PMINIDUMP_THREAD;
+
+ typedef struct _MINIDUMP_THREAD_LIST {
+ ULONG32 NumberOfThreads;
+ MINIDUMP_THREAD Threads [0];
+ } MINIDUMP_THREAD_LIST,*PMINIDUMP_THREAD_LIST;
+
+ typedef struct _MINIDUMP_THREAD_EX {
+ ULONG32 ThreadId;
+ ULONG32 SuspendCount;
+ ULONG32 PriorityClass;
+ ULONG32 Priority;
+ ULONG64 Teb;
+ MINIDUMP_MEMORY_DESCRIPTOR Stack;
+ MINIDUMP_LOCATION_DESCRIPTOR ThreadContext;
+ MINIDUMP_MEMORY_DESCRIPTOR BackingStore;
+ } MINIDUMP_THREAD_EX,*PMINIDUMP_THREAD_EX;
+
+ typedef struct _MINIDUMP_THREAD_EX_LIST {
+ ULONG32 NumberOfThreads;
+ MINIDUMP_THREAD_EX Threads [0];
+ } MINIDUMP_THREAD_EX_LIST,*PMINIDUMP_THREAD_EX_LIST;
+
+ typedef struct _MINIDUMP_EXCEPTION {
+ ULONG32 ExceptionCode;
+ ULONG32 ExceptionFlags;
+ ULONG64 ExceptionRecord;
+ ULONG64 ExceptionAddress;
+ ULONG32 NumberParameters;
+ ULONG32 __unusedAlignment;
+ ULONG64 ExceptionInformation [EXCEPTION_MAXIMUM_PARAMETERS ];
+ } MINIDUMP_EXCEPTION,*PMINIDUMP_EXCEPTION;
+
+ typedef struct MINIDUMP_EXCEPTION_STREAM {
+ ULONG32 ThreadId;
+ ULONG32 __alignment;
+ MINIDUMP_EXCEPTION ExceptionRecord;
+ MINIDUMP_LOCATION_DESCRIPTOR ThreadContext;
+ } MINIDUMP_EXCEPTION_STREAM,*PMINIDUMP_EXCEPTION_STREAM;
+
+ typedef struct _MINIDUMP_MODULE {
+ ULONG64 BaseOfImage;
+ ULONG32 SizeOfImage;
+ ULONG32 CheckSum;
+ ULONG32 TimeDateStamp;
+ RVA ModuleNameRva;
+ VS_FIXEDFILEINFO VersionInfo;
+ MINIDUMP_LOCATION_DESCRIPTOR CvRecord;
+ MINIDUMP_LOCATION_DESCRIPTOR MiscRecord;
+ ULONG64 Reserved0;
+ ULONG64 Reserved1;
+ } MINIDUMP_MODULE,*PMINIDUMP_MODULE;
+
+ typedef struct _MINIDUMP_MODULE_LIST {
+ ULONG32 NumberOfModules;
+ MINIDUMP_MODULE Modules [0 ];
+ } MINIDUMP_MODULE_LIST,*PMINIDUMP_MODULE_LIST;
+
+ typedef struct _MINIDUMP_MEMORY_LIST {
+ ULONG32 NumberOfMemoryRanges;
+ MINIDUMP_MEMORY_DESCRIPTOR MemoryRanges [0];
+ } MINIDUMP_MEMORY_LIST,*PMINIDUMP_MEMORY_LIST;
+
+ typedef struct _MINIDUMP_MEMORY64_LIST {
+ ULONG64 NumberOfMemoryRanges;
+ RVA64 BaseRva;
+ MINIDUMP_MEMORY_DESCRIPTOR64 MemoryRanges [0];
+ } MINIDUMP_MEMORY64_LIST,*PMINIDUMP_MEMORY64_LIST;
+
+ typedef struct _MINIDUMP_EXCEPTION_INFORMATION {
+ DWORD ThreadId;
+ PEXCEPTION_POINTERS ExceptionPointers;
+ BOOL ClientPointers;
+ } MINIDUMP_EXCEPTION_INFORMATION,*PMINIDUMP_EXCEPTION_INFORMATION;
+
+ typedef struct _MINIDUMP_EXCEPTION_INFORMATION64 {
+ DWORD ThreadId;
+ ULONG64 ExceptionRecord;
+ ULONG64 ContextRecord;
+ BOOL ClientPointers;
+ } MINIDUMP_EXCEPTION_INFORMATION64,*PMINIDUMP_EXCEPTION_INFORMATION64;
+
+ typedef struct _MINIDUMP_HANDLE_DESCRIPTOR {
+ ULONG64 Handle;
+ RVA TypeNameRva;
+ RVA ObjectNameRva;
+ ULONG32 Attributes;
+ ULONG32 GrantedAccess;
+ ULONG32 HandleCount;
+ ULONG32 PointerCount;
+ } MINIDUMP_HANDLE_DESCRIPTOR,*PMINIDUMP_HANDLE_DESCRIPTOR;
+
+ typedef struct _MINIDUMP_HANDLE_DATA_STREAM {
+ ULONG32 SizeOfHeader;
+ ULONG32 SizeOfDescriptor;
+ ULONG32 NumberOfDescriptors;
+ ULONG32 Reserved;
+ } MINIDUMP_HANDLE_DATA_STREAM,*PMINIDUMP_HANDLE_DATA_STREAM;
+
+ typedef struct _MINIDUMP_FUNCTION_TABLE_DESCRIPTOR {
+ ULONG64 MinimumAddress;
+ ULONG64 MaximumAddress;
+ ULONG64 BaseAddress;
+ ULONG32 EntryCount;
+ ULONG32 SizeOfAlignPad;
+ } MINIDUMP_FUNCTION_TABLE_DESCRIPTOR,*PMINIDUMP_FUNCTION_TABLE_DESCRIPTOR;
+
+ typedef struct _MINIDUMP_FUNCTION_TABLE_STREAM {
+ ULONG32 SizeOfHeader;
+ ULONG32 SizeOfDescriptor;
+ ULONG32 SizeOfNativeDescriptor;
+ ULONG32 SizeOfFunctionEntry;
+ ULONG32 NumberOfDescriptors;
+ ULONG32 SizeOfAlignPad;
+ } MINIDUMP_FUNCTION_TABLE_STREAM,*PMINIDUMP_FUNCTION_TABLE_STREAM;
+
+ typedef struct _MINIDUMP_UNLOADED_MODULE {
+ ULONG64 BaseOfImage;
+ ULONG32 SizeOfImage;
+ ULONG32 CheckSum;
+ ULONG32 TimeDateStamp;
+ RVA ModuleNameRva;
+ } MINIDUMP_UNLOADED_MODULE,*PMINIDUMP_UNLOADED_MODULE;
+
+ typedef struct _MINIDUMP_UNLOADED_MODULE_LIST {
+ ULONG32 SizeOfHeader;
+ ULONG32 SizeOfEntry;
+ ULONG32 NumberOfEntries;
+ } MINIDUMP_UNLOADED_MODULE_LIST,*PMINIDUMP_UNLOADED_MODULE_LIST;
+
+#define MINIDUMP_MISC1_PROCESS_ID 0x00000001
+#define MINIDUMP_MISC1_PROCESS_TIMES 0x00000002
+
+ typedef struct _MINIDUMP_MISC_INFO {
+ ULONG32 SizeOfInfo;
+ ULONG32 Flags1;
+ ULONG32 ProcessId;
+ ULONG32 ProcessCreateTime;
+ ULONG32 ProcessUserTime;
+ ULONG32 ProcessKernelTime;
+ } MINIDUMP_MISC_INFO,*PMINIDUMP_MISC_INFO;
+
+ typedef struct _MINIDUMP_USER_RECORD {
+ ULONG32 Type;
+ MINIDUMP_LOCATION_DESCRIPTOR Memory;
+ } MINIDUMP_USER_RECORD,*PMINIDUMP_USER_RECORD;
+
+ typedef struct _MINIDUMP_USER_STREAM {
+ ULONG32 Type;
+ ULONG BufferSize;
+ PVOID Buffer;
+ } MINIDUMP_USER_STREAM,*PMINIDUMP_USER_STREAM;
+
+ typedef struct _MINIDUMP_USER_STREAM_INFORMATION {
+ ULONG UserStreamCount;
+ PMINIDUMP_USER_STREAM UserStreamArray;
+ } MINIDUMP_USER_STREAM_INFORMATION,*PMINIDUMP_USER_STREAM_INFORMATION;
+
+ typedef enum _MINIDUMP_CALLBACK_TYPE {
+ ModuleCallback,ThreadCallback,ThreadExCallback,IncludeThreadCallback,IncludeModuleCallback,MemoryCallback
+ } MINIDUMP_CALLBACK_TYPE;
+
+ typedef struct _MINIDUMP_THREAD_CALLBACK {
+ ULONG ThreadId;
+ HANDLE ThreadHandle;
+ CONTEXT Context;
+ ULONG SizeOfContext;
+ ULONG64 StackBase;
+ ULONG64 StackEnd;
+ } MINIDUMP_THREAD_CALLBACK,*PMINIDUMP_THREAD_CALLBACK;
+
+ typedef struct _MINIDUMP_THREAD_EX_CALLBACK {
+ ULONG ThreadId;
+ HANDLE ThreadHandle;
+ CONTEXT Context;
+ ULONG SizeOfContext;
+ ULONG64 StackBase;
+ ULONG64 StackEnd;
+ ULONG64 BackingStoreBase;
+ ULONG64 BackingStoreEnd;
+ } MINIDUMP_THREAD_EX_CALLBACK,*PMINIDUMP_THREAD_EX_CALLBACK;
+
+ typedef struct _MINIDUMP_INCLUDE_THREAD_CALLBACK {
+ ULONG ThreadId;
+ } MINIDUMP_INCLUDE_THREAD_CALLBACK,*PMINIDUMP_INCLUDE_THREAD_CALLBACK;
+
+ typedef enum _THREAD_WRITE_FLAGS {
+ ThreadWriteThread = 0x0001,ThreadWriteStack = 0x0002,ThreadWriteContext = 0x0004,ThreadWriteBackingStore = 0x0008,
+ ThreadWriteInstructionWindow = 0x0010,ThreadWriteThreadData = 0x0020
+ } THREAD_WRITE_FLAGS;
+
+ typedef struct _MINIDUMP_MODULE_CALLBACK {
+ PWCHAR FullPath;
+ ULONG64 BaseOfImage;
+ ULONG SizeOfImage;
+ ULONG CheckSum;
+ ULONG TimeDateStamp;
+ VS_FIXEDFILEINFO VersionInfo;
+ PVOID CvRecord;
+ ULONG SizeOfCvRecord;
+ PVOID MiscRecord;
+ ULONG SizeOfMiscRecord;
+ } MINIDUMP_MODULE_CALLBACK,*PMINIDUMP_MODULE_CALLBACK;
+
+ typedef struct _MINIDUMP_INCLUDE_MODULE_CALLBACK {
+ ULONG64 BaseOfImage;
+ } MINIDUMP_INCLUDE_MODULE_CALLBACK,*PMINIDUMP_INCLUDE_MODULE_CALLBACK;
+
+ typedef enum _MODULE_WRITE_FLAGS {
+ ModuleWriteModule = 0x0001,ModuleWriteDataSeg = 0x0002,ModuleWriteMiscRecord = 0x0004,ModuleWriteCvRecord = 0x0008,
+ ModuleReferencedByMemory = 0x0010
+ } MODULE_WRITE_FLAGS;
+
+ typedef struct _MINIDUMP_CALLBACK_INPUT {
+ ULONG ProcessId;
+ HANDLE ProcessHandle;
+ ULONG CallbackType;
+ union {
+ MINIDUMP_THREAD_CALLBACK Thread;
+ MINIDUMP_THREAD_EX_CALLBACK ThreadEx;
+ MINIDUMP_MODULE_CALLBACK Module;
+ MINIDUMP_INCLUDE_THREAD_CALLBACK IncludeThread;
+ MINIDUMP_INCLUDE_MODULE_CALLBACK IncludeModule;
+ } DUMMYUNIONNAME;
+ } MINIDUMP_CALLBACK_INPUT,*PMINIDUMP_CALLBACK_INPUT;
+
+ typedef struct _MINIDUMP_CALLBACK_OUTPUT {
+ union {
+ ULONG ModuleWriteFlags;
+ ULONG ThreadWriteFlags;
+ struct {
+ ULONG64 MemoryBase;
+ ULONG MemorySize;
+ } DUMMYSTRUCTNAME;
+ } DUMMYUNIONNAME;
+ } MINIDUMP_CALLBACK_OUTPUT,*PMINIDUMP_CALLBACK_OUTPUT;
+
+ typedef enum _MINIDUMP_TYPE {
+ MiniDumpNormal = 0x0000,MiniDumpWithDataSegs = 0x0001,MiniDumpWithFullMemory = 0x0002,MiniDumpWithHandleData = 0x0004,
+ MiniDumpFilterMemory = 0x0008,MiniDumpScanMemory = 0x0010,MiniDumpWithUnloadedModules = 0x0020,MiniDumpWithIndirectlyReferencedMemory = 0x0040,
+ MiniDumpFilterModulePaths = 0x0080,MiniDumpWithProcessThreadData = 0x0100,MiniDumpWithPrivateReadWriteMemory = 0x0200,
+ MiniDumpWithoutOptionalData = 0x0400
+ } MINIDUMP_TYPE;
+
+ typedef BOOL (WINAPI *MINIDUMP_CALLBACK_ROUTINE)(PVOID CallbackParam,CONST PMINIDUMP_CALLBACK_INPUT CallbackInput,PMINIDUMP_CALLBACK_OUTPUT CallbackOutput);
+
+ typedef struct _MINIDUMP_CALLBACK_INFORMATION {
+ MINIDUMP_CALLBACK_ROUTINE CallbackRoutine;
+ PVOID CallbackParam;
+ } MINIDUMP_CALLBACK_INFORMATION,*PMINIDUMP_CALLBACK_INFORMATION;
+
+#define RVA_TO_ADDR(Mapping,Rva) ((PVOID)(((ULONG_PTR) (Mapping)) + (Rva)))
+
+ BOOL WINAPI MiniDumpWriteDump(HANDLE hProcess,DWORD ProcessId,HANDLE hFile,MINIDUMP_TYPE DumpType,CONST PMINIDUMP_EXCEPTION_INFORMATION ExceptionParam,CONST PMINIDUMP_USER_STREAM_INFORMATION UserStreamParam,CONST PMINIDUMP_CALLBACK_INFORMATION CallbackParam);
+ BOOL WINAPI MiniDumpReadDumpStream(PVOID BaseOfDump,ULONG StreamNumber,PMINIDUMP_DIRECTORY *Dir,PVOID *StreamPointer,ULONG *StreamSize);
+
+#include <poppack.h>
+
+#ifdef __cplusplus
+}
+#endif
+#endif
diff --git a/src/gallium/auxiliary/util/u_blit.c b/src/gallium/auxiliary/util/u_blit.c
index c11f7d383db..421726b40e0 100644
--- a/src/gallium/auxiliary/util/u_blit.c
+++ b/src/gallium/auxiliary/util/u_blit.c
@@ -128,21 +128,6 @@ util_create_blit(struct pipe_context *pipe, struct cso_context *cso)
ctx->velem[i].src_format = PIPE_FORMAT_R32G32B32A32_FLOAT;
}
- /* vertex shader - still required to provide the linkage between
- * fragment shader input semantics and vertex_element/buffers.
- */
- {
- const uint semantic_names[] = { TGSI_SEMANTIC_POSITION,
- TGSI_SEMANTIC_GENERIC };
- const uint semantic_indexes[] = { 0, 0 };
- ctx->vs = util_make_vertex_passthrough_shader(pipe, 2, semantic_names,
- semantic_indexes);
- }
-
- /* fragment shader */
- ctx->fs[TGSI_WRITEMASK_XYZW] =
- util_make_fragment_tex_shader(pipe, TGSI_TEXTURE_2D,
- TGSI_INTERPOLATE_LINEAR);
ctx->vbuf = NULL;
/* init vertex data that doesn't change */
@@ -170,7 +155,8 @@ util_destroy_blit(struct blit_state *ctx)
struct pipe_context *pipe = ctx->pipe;
unsigned i;
- pipe->delete_vs_state(pipe, ctx->vs);
+ if (ctx->vs)
+ pipe->delete_vs_state(pipe, ctx->vs);
for (i = 0; i < Elements(ctx->fs); i++)
if (ctx->fs[i])
@@ -186,6 +172,59 @@ util_destroy_blit(struct blit_state *ctx)
/**
+ * Helper function to set the fragment shaders.
+ */
+static INLINE void
+set_fragment_shader(struct blit_state *ctx, uint writemask)
+{
+ if (!ctx->fs[writemask])
+ ctx->fs[writemask] =
+ util_make_fragment_tex_shader_writemask(ctx->pipe, TGSI_TEXTURE_2D,
+ TGSI_INTERPOLATE_LINEAR,
+ writemask);
+
+ cso_set_fragment_shader_handle(ctx->cso, ctx->fs[writemask]);
+}
+
+
+/**
+ * Helper function to set the depthwrite shader.
+ */
+static INLINE void
+set_depth_fragment_shader(struct blit_state *ctx)
+{
+ if (!ctx->fs_depth)
+ ctx->fs_depth =
+ util_make_fragment_tex_shader_writedepth(ctx->pipe, TGSI_TEXTURE_2D,
+ TGSI_INTERPOLATE_LINEAR);
+
+ cso_set_fragment_shader_handle(ctx->cso, ctx->fs_depth);
+}
+
+
+/**
+ * Helper function to set the vertex shader.
+ */
+static INLINE void
+set_vertex_shader(struct blit_state *ctx)
+{
+ /* vertex shader - still required to provide the linkage between
+ * fragment shader input semantics and vertex_element/buffers.
+ */
+ if (!ctx->vs) {
+ const uint semantic_names[] = { TGSI_SEMANTIC_POSITION,
+ TGSI_SEMANTIC_GENERIC };
+ const uint semantic_indexes[] = { 0, 0 };
+ ctx->vs = util_make_vertex_passthrough_shader(ctx->pipe, 2,
+ semantic_names,
+ semantic_indexes);
+ }
+
+ cso_set_vertex_shader_handle(ctx->cso, ctx->vs);
+}
+
+
+/**
* Get offset of next free slot in vertex buffer for quad vertices.
*/
static unsigned
@@ -199,6 +238,7 @@ get_next_slot( struct blit_state *ctx )
if (!ctx->vbuf) {
ctx->vbuf = pipe_buffer_create(ctx->pipe->screen,
PIPE_BIND_VERTEX_BUFFER,
+ PIPE_USAGE_STREAM,
max_slots * sizeof ctx->vertices);
}
@@ -303,8 +343,10 @@ util_blit_pixels_writemask(struct blit_state *ctx,
{
struct pipe_context *pipe = ctx->pipe;
struct pipe_screen *screen = pipe->screen;
+ enum pipe_format src_format, dst_format;
struct pipe_sampler_view *sampler_view = NULL;
struct pipe_sampler_view sv_templ;
+ struct pipe_surface *dst_surface;
struct pipe_framebuffer_state fb;
const int srcW = abs(srcX1 - srcX0);
const int srcH = abs(srcY1 - srcY0);
@@ -325,12 +367,15 @@ util_blit_pixels_writemask(struct blit_state *ctx,
regions_overlap(srcX0, srcY0, srcX1, srcY1,
dstX0, dstY0, dstX1, dstY1);
+ src_format = util_format_linear(src_tex->format);
+ dst_format = util_format_linear(dst->format);
+
/*
* Check for simple case: no format conversion, no flipping, no stretching,
* no overlapping.
* Filter mode should not matter since there's no stretching.
*/
- if (dst->format == src_tex->format &&
+ if (dst_format == src_format &&
srcX0 < srcX1 &&
dstX0 < dstX1 &&
srcY0 < srcY1 &&
@@ -353,6 +398,14 @@ util_blit_pixels_writemask(struct blit_state *ctx,
return;
}
+ if (dst_format == dst->format) {
+ dst_surface = dst;
+ } else {
+ struct pipe_surface templ = *dst;
+ templ.format = dst_format;
+ dst_surface = pipe->create_surface(pipe, dst->texture, &templ);
+ }
+
/* Create a temporary texture when src and dest alias or when src
* is anything other than a 2d texture.
* XXX should just use appropriate shader to access 1d / 3d slice / cube face,
@@ -360,9 +413,9 @@ util_blit_pixels_writemask(struct blit_state *ctx,
*
* This can still be improved upon.
*/
- if ((src_tex == dst->texture &&
- dst->u.tex.level == src_level &&
- dst->u.tex.first_layer == srcZ0) ||
+ if ((src_tex == dst_surface->texture &&
+ dst_surface->u.tex.level == src_level &&
+ dst_surface->u.tex.first_layer == srcZ0) ||
(src_tex->target != PIPE_TEXTURE_2D &&
src_tex->target != PIPE_TEXTURE_2D &&
src_tex->target != PIPE_TEXTURE_RECT))
@@ -391,7 +444,7 @@ util_blit_pixels_writemask(struct blit_state *ctx,
/* create temp texture */
memset(&texTemp, 0, sizeof(texTemp));
texTemp.target = ctx->internal_target;
- texTemp.format = src_tex->format;
+ texTemp.format = src_format;
texTemp.last_level = 0;
texTemp.width0 = srcW;
texTemp.height0 = srcH;
@@ -438,7 +491,7 @@ util_blit_pixels_writemask(struct blit_state *ctx,
pipe_resource_reference(&tex, NULL);
}
else {
- u_sampler_view_default_template(&sv_templ, src_tex, src_tex->format);
+ u_sampler_view_default_template(&sv_templ, src_tex, src_format);
sampler_view = pipe->create_sampler_view(pipe, src_tex, &sv_templ);
if (!sampler_view) {
@@ -459,15 +512,15 @@ util_blit_pixels_writemask(struct blit_state *ctx,
}
}
- dst_is_depth = util_format_is_depth_or_stencil(dst->format);
+ dst_is_depth = util_format_is_depth_or_stencil(dst_format);
assert(screen->is_format_supported(screen, sampler_view->format, ctx->internal_target,
sampler_view->texture->nr_samples,
- PIPE_BIND_SAMPLER_VIEW, 0));
- assert(screen->is_format_supported(screen, dst->format, ctx->internal_target,
- dst->texture->nr_samples,
+ PIPE_BIND_SAMPLER_VIEW));
+ assert(screen->is_format_supported(screen, dst_format, ctx->internal_target,
+ dst_surface->texture->nr_samples,
dst_is_depth ? PIPE_BIND_DEPTH_STENCIL :
- PIPE_BIND_RENDER_TARGET, 0));
+ PIPE_BIND_RENDER_TARGET));
/* save state (restored below) */
cso_save_blend(ctx->cso);
cso_save_depth_stencil_alpha(ctx->cso);
@@ -480,6 +533,7 @@ util_blit_pixels_writemask(struct blit_state *ctx,
cso_save_vertex_shader(ctx->cso);
cso_save_clip(ctx->cso);
cso_save_vertex_elements(ctx->cso);
+ cso_save_vertex_buffers(ctx->cso);
/* set misc state we care about */
cso_set_blend(ctx->cso, &ctx->blend);
@@ -500,12 +554,12 @@ util_blit_pixels_writemask(struct blit_state *ctx,
cso_single_sampler_done(ctx->cso);
/* viewport */
- ctx->viewport.scale[0] = 0.5f * dst->width;
- ctx->viewport.scale[1] = 0.5f * dst->height;
+ ctx->viewport.scale[0] = 0.5f * dst_surface->width;
+ ctx->viewport.scale[1] = 0.5f * dst_surface->height;
ctx->viewport.scale[2] = 0.5f;
ctx->viewport.scale[3] = 1.0f;
- ctx->viewport.translate[0] = 0.5f * dst->width;
- ctx->viewport.translate[1] = 0.5f * dst->height;
+ ctx->viewport.translate[0] = 0.5f * dst_surface->width;
+ ctx->viewport.translate[1] = 0.5f * dst_surface->height;
ctx->viewport.translate[2] = 0.5f;
ctx->viewport.translate[3] = 0.0f;
cso_set_viewport(ctx->cso, &ctx->viewport);
@@ -515,46 +569,35 @@ util_blit_pixels_writemask(struct blit_state *ctx,
/* shaders */
if (dst_is_depth) {
- if (ctx->fs_depth == NULL)
- ctx->fs_depth =
- util_make_fragment_tex_shader_writedepth(pipe, TGSI_TEXTURE_2D,
- TGSI_INTERPOLATE_LINEAR);
-
- cso_set_fragment_shader_handle(ctx->cso, ctx->fs_depth);
+ set_depth_fragment_shader(ctx);
} else {
- if (ctx->fs[writemask] == NULL)
- ctx->fs[writemask] =
- util_make_fragment_tex_shader_writemask(pipe, TGSI_TEXTURE_2D,
- TGSI_INTERPOLATE_LINEAR,
- writemask);
-
- cso_set_fragment_shader_handle(ctx->cso, ctx->fs[writemask]);
+ set_fragment_shader(ctx, writemask);
}
- cso_set_vertex_shader_handle(ctx->cso, ctx->vs);
+ set_vertex_shader(ctx);
/* drawing dest */
memset(&fb, 0, sizeof(fb));
- fb.width = dst->width;
- fb.height = dst->height;
+ fb.width = dst_surface->width;
+ fb.height = dst_surface->height;
if (dst_is_depth) {
- fb.zsbuf = dst;
+ fb.zsbuf = dst_surface;
} else {
fb.nr_cbufs = 1;
- fb.cbufs[0] = dst;
+ fb.cbufs[0] = dst_surface;
}
cso_set_framebuffer(ctx->cso, &fb);
/* draw quad */
offset = setup_vertex_data_tex(ctx,
- (float) dstX0 / dst->width * 2.0f - 1.0f,
- (float) dstY0 / dst->height * 2.0f - 1.0f,
- (float) dstX1 / dst->width * 2.0f - 1.0f,
- (float) dstY1 / dst->height * 2.0f - 1.0f,
+ (float) dstX0 / dst_surface->width * 2.0f - 1.0f,
+ (float) dstY0 / dst_surface->height * 2.0f - 1.0f,
+ (float) dstX1 / dst_surface->width * 2.0f - 1.0f,
+ (float) dstY1 / dst_surface->height * 2.0f - 1.0f,
s0, t0,
s1, t1,
z);
- util_draw_vertex_buffer(ctx->pipe, ctx->vbuf, offset,
+ util_draw_vertex_buffer(ctx->pipe, ctx->cso, ctx->vbuf, offset,
PIPE_PRIM_TRIANGLE_FAN,
4, /* verts */
2); /* attribs/vert */
@@ -571,8 +614,11 @@ util_blit_pixels_writemask(struct blit_state *ctx,
cso_restore_vertex_shader(ctx->cso);
cso_restore_clip(ctx->cso);
cso_restore_vertex_elements(ctx->cso);
+ cso_restore_vertex_buffers(ctx->cso);
pipe_sampler_view_reference(&sampler_view, NULL);
+ if (dst_surface != dst)
+ pipe_surface_reference(&dst_surface, NULL);
}
@@ -657,8 +703,7 @@ util_blit_pixels_tex(struct blit_state *ctx,
assert(ctx->pipe->screen->is_format_supported(ctx->pipe->screen, dst->format,
PIPE_TEXTURE_2D,
dst->texture->nr_samples,
- PIPE_BIND_RENDER_TARGET,
- 0));
+ PIPE_BIND_RENDER_TARGET));
/* save state (restored below) */
cso_save_blend(ctx->cso);
@@ -672,6 +717,7 @@ util_blit_pixels_tex(struct blit_state *ctx,
cso_save_vertex_shader(ctx->cso);
cso_save_clip(ctx->cso);
cso_save_vertex_elements(ctx->cso);
+ cso_save_vertex_buffers(ctx->cso);
/* set misc state we care about */
cso_set_blend(ctx->cso, &ctx->blend);
@@ -702,8 +748,8 @@ util_blit_pixels_tex(struct blit_state *ctx,
cso_set_fragment_sampler_views(ctx->cso, 1, &src_sampler_view);
/* shaders */
- cso_set_fragment_shader_handle(ctx->cso, ctx->fs[TGSI_WRITEMASK_XYZW]);
- cso_set_vertex_shader_handle(ctx->cso, ctx->vs);
+ set_fragment_shader(ctx, TGSI_WRITEMASK_XYZW);
+ set_vertex_shader(ctx);
/* drawing dest */
memset(&fb, 0, sizeof(fb));
@@ -722,7 +768,7 @@ util_blit_pixels_tex(struct blit_state *ctx,
s0, t0, s1, t1,
z);
- util_draw_vertex_buffer(ctx->pipe,
+ util_draw_vertex_buffer(ctx->pipe, ctx->cso,
ctx->vbuf, offset,
PIPE_PRIM_TRIANGLE_FAN,
4, /* verts */
@@ -740,4 +786,5 @@ util_blit_pixels_tex(struct blit_state *ctx,
cso_restore_vertex_shader(ctx->cso);
cso_restore_clip(ctx->cso);
cso_restore_vertex_elements(ctx->cso);
+ cso_restore_vertex_buffers(ctx->cso);
}
diff --git a/src/gallium/auxiliary/util/u_blitter.c b/src/gallium/auxiliary/util/u_blitter.c
index 4c986e3565c..a4c399052fd 100644
--- a/src/gallium/auxiliary/util/u_blitter.c
+++ b/src/gallium/auxiliary/util/u_blitter.c
@@ -86,7 +86,6 @@ struct blitter_context_priv
void *dsa_write_depth_keep_stencil;
void *dsa_keep_depth_stencil;
void *dsa_keep_depth_write_stencil;
- void *dsa_flush_depth_stencil;
void *velem_state;
@@ -156,10 +155,6 @@ struct blitter_context *util_blitter_create(struct pipe_context *pipe)
ctx->dsa_keep_depth_stencil =
pipe->create_depth_stencil_alpha_state(pipe, &dsa);
- dsa.depth.writemask = 1;
- ctx->dsa_flush_depth_stencil =
- pipe->create_depth_stencil_alpha_state(pipe, &dsa);
-
dsa.depth.enabled = 1;
dsa.depth.writemask = 1;
dsa.depth.func = PIPE_FUNC_ALWAYS;
@@ -225,9 +220,10 @@ struct blitter_context *util_blitter_create(struct pipe_context *pipe)
ctx->vertices[i][0][3] = 1; /*v.w*/
/* create the vertex buffer */
- ctx->vbuf = pipe_buffer_create(ctx->base.pipe->screen,
- PIPE_BIND_VERTEX_BUFFER,
- sizeof(ctx->vertices));
+ ctx->vbuf = pipe_user_buffer_create(ctx->base.pipe->screen,
+ ctx->vertices,
+ sizeof(ctx->vertices),
+ PIPE_BIND_VERTEX_BUFFER);
return &ctx->base;
}
@@ -245,7 +241,6 @@ void util_blitter_destroy(struct blitter_context *blitter)
ctx->dsa_write_depth_keep_stencil);
pipe->delete_depth_stencil_alpha_state(pipe, ctx->dsa_write_depth_stencil);
pipe->delete_depth_stencil_alpha_state(pipe, ctx->dsa_keep_depth_write_stencil);
- pipe->delete_depth_stencil_alpha_state(pipe, ctx->dsa_flush_depth_stencil);
pipe->delete_rasterizer_state(pipe, ctx->rs_state);
pipe->delete_vs_state(pipe, ctx->vs);
@@ -272,6 +267,12 @@ void util_blitter_destroy(struct blitter_context *blitter)
static void blitter_check_saved_CSOs(struct blitter_context_priv *ctx)
{
+ if (ctx->base.running) {
+ _debug_printf("u_blitter: Caught recursion on save. "
+ "This is a driver bug.\n");
+ }
+ ctx->base.running = TRUE;
+
/* make sure these CSOs have been saved */
assert(ctx->base.saved_blend_state != INVALID_PTR &&
ctx->base.saved_dsa_state != INVALID_PTR &&
@@ -302,7 +303,6 @@ static void blitter_restore_CSOs(struct blitter_context_priv *ctx)
ctx->base.saved_velem_state = INVALID_PTR;
pipe->set_stencil_ref(pipe, &ctx->base.saved_stencil_ref);
-
pipe->set_viewport_state(pipe, &ctx->base.saved_viewport);
pipe->set_clip_state(pipe, &ctx->base.saved_clip);
@@ -346,6 +346,12 @@ static void blitter_restore_CSOs(struct blitter_context_priv *ctx)
}
ctx->base.saved_num_vertex_buffers = ~0;
}
+
+ if (!ctx->base.running) {
+ _debug_printf("u_blitter: Caught recursion on restore. "
+ "This is a driver bug.\n");
+ }
+ ctx->base.running = FALSE;
}
static void blitter_set_rectangle(struct blitter_context_priv *ctx,
@@ -509,22 +515,6 @@ static void blitter_set_dst_dimensions(struct blitter_context_priv *ctx,
ctx->dst_height = height;
}
-static void blitter_draw_quad(struct blitter_context_priv *ctx)
-{
- struct pipe_context *pipe = ctx->base.pipe;
- struct pipe_box box;
-
- /* write vertices and draw them */
- u_box_1d(0, sizeof(ctx->vertices), &box);
- pipe->transfer_inline_write(pipe, ctx->vbuf, 0,
- PIPE_TRANSFER_WRITE | PIPE_TRANSFER_DISCARD,
- &box, ctx->vertices, sizeof(ctx->vertices), 0);
-
- util_draw_vertex_buffer(pipe, ctx->vbuf, 0, PIPE_PRIM_TRIANGLE_FAN,
- 4, /* verts */
- 2); /* attribs/vert */
-}
-
static INLINE
void **blitter_get_sampler_state(struct blitter_context_priv *ctx,
int miplevel, boolean normalized)
@@ -649,15 +639,19 @@ static void blitter_draw_rectangle(struct blitter_context *blitter,
}
blitter_set_rectangle(ctx, x1, y1, x2, y2, depth);
- blitter_draw_quad(ctx);
+ ctx->base.pipe->redefine_user_buffer(ctx->base.pipe, ctx->vbuf,
+ 0, ctx->vbuf->width0);
+ util_draw_vertex_buffer(ctx->base.pipe, NULL, ctx->vbuf, 0,
+ PIPE_PRIM_TRIANGLE_FAN, 4, 2);
}
-void util_blitter_clear(struct blitter_context *blitter,
- unsigned width, unsigned height,
- unsigned num_cbufs,
- unsigned clear_buffers,
- const float *rgba,
- double depth, unsigned stencil)
+static void util_blitter_clear_custom(struct blitter_context *blitter,
+ unsigned width, unsigned height,
+ unsigned num_cbufs,
+ unsigned clear_buffers,
+ const float *rgba,
+ double depth, unsigned stencil,
+ void *custom_blend, void *custom_dsa)
{
struct blitter_context_priv *ctx = (struct blitter_context_priv*)blitter;
struct pipe_context *pipe = ctx->base.pipe;
@@ -668,26 +662,28 @@ void util_blitter_clear(struct blitter_context *blitter,
blitter_check_saved_CSOs(ctx);
/* bind CSOs */
- if (clear_buffers & PIPE_CLEAR_COLOR)
+ if (custom_blend) {
+ pipe->bind_blend_state(pipe, custom_blend);
+ } else if (clear_buffers & PIPE_CLEAR_COLOR) {
pipe->bind_blend_state(pipe, ctx->blend_write_color);
- else
+ } else {
pipe->bind_blend_state(pipe, ctx->blend_keep_color);
+ }
- if ((clear_buffers & PIPE_CLEAR_DEPTHSTENCIL) == PIPE_CLEAR_DEPTHSTENCIL) {
- sr.ref_value[0] = stencil & 0xff;
+ if (custom_dsa) {
+ pipe->bind_depth_stencil_alpha_state(pipe, custom_dsa);
+ } else if ((clear_buffers & PIPE_CLEAR_DEPTHSTENCIL) == PIPE_CLEAR_DEPTHSTENCIL) {
pipe->bind_depth_stencil_alpha_state(pipe, ctx->dsa_write_depth_stencil);
- pipe->set_stencil_ref(pipe, &sr);
- }
- else if (clear_buffers & PIPE_CLEAR_DEPTH) {
+ } else if (clear_buffers & PIPE_CLEAR_DEPTH) {
pipe->bind_depth_stencil_alpha_state(pipe, ctx->dsa_write_depth_keep_stencil);
- }
- else if (clear_buffers & PIPE_CLEAR_STENCIL) {
- sr.ref_value[0] = stencil & 0xff;
+ } else if (clear_buffers & PIPE_CLEAR_STENCIL) {
pipe->bind_depth_stencil_alpha_state(pipe, ctx->dsa_keep_depth_write_stencil);
- pipe->set_stencil_ref(pipe, &sr);
- }
- else
+ } else {
pipe->bind_depth_stencil_alpha_state(pipe, ctx->dsa_keep_depth_stencil);
+ }
+
+ sr.ref_value[0] = stencil & 0xff;
+ pipe->set_stencil_ref(pipe, &sr);
pipe->bind_rasterizer_state(pipe, ctx->rs_state);
pipe->bind_vertex_elements_state(pipe, ctx->velem_state);
@@ -700,6 +696,27 @@ void util_blitter_clear(struct blitter_context *blitter,
blitter_restore_CSOs(ctx);
}
+void util_blitter_clear(struct blitter_context *blitter,
+ unsigned width, unsigned height,
+ unsigned num_cbufs,
+ unsigned clear_buffers,
+ const float *rgba,
+ double depth, unsigned stencil)
+{
+ util_blitter_clear_custom(blitter, width, height, num_cbufs,
+ clear_buffers, rgba, depth, stencil,
+ NULL, NULL);
+}
+
+void util_blitter_clear_depth_custom(struct blitter_context *blitter,
+ unsigned width, unsigned height,
+ double depth, void *custom_dsa)
+{
+ const float rgba[4] = {0, 0, 0, 0};
+ util_blitter_clear_custom(blitter, width, height, 0,
+ 0, rgba, depth, 0, NULL, custom_dsa);
+}
+
static
boolean is_overlap(unsigned sx1, unsigned sx2, unsigned sy1, unsigned sy2,
unsigned dx1, unsigned dx2, unsigned dy1, unsigned dy2)
@@ -737,9 +754,6 @@ void util_blitter_copy_region(struct blitter_context *blitter,
if (dst == src) {
assert(!is_overlap(srcbox->x, srcbox->x + width, srcbox->y, srcbox->y + height,
dstx, dstx + width, dsty, dsty + height));
- } else {
- assert(util_is_format_compatible(util_format_description(dst->format),
- util_format_description(src->format)));
}
assert(src->target < PIPE_MAX_TEXTURE_TYPES);
/* XXX should handle 3d regions */
@@ -758,17 +772,20 @@ void util_blitter_copy_region(struct blitter_context *blitter,
/* (assuming copying a stencil buffer is not possible) */
if ((!ignore_stencil && is_stencil) ||
!screen->is_format_supported(screen, dst->format, dst->target,
- dst->nr_samples, bind, 0) ||
+ dst->nr_samples, bind) ||
!screen->is_format_supported(screen, src->format, src->target,
- src->nr_samples, PIPE_BIND_SAMPLER_VIEW, 0)) {
+ src->nr_samples, PIPE_BIND_SAMPLER_VIEW)) {
+ ctx->base.running = TRUE;
util_resource_copy_region(pipe, dst, dstlevel, dstx, dsty, dstz,
src, srclevel, srcbox);
+ ctx->base.running = FALSE;
return;
}
/* Get surface. */
memset(&surf_templ, 0, sizeof(surf_templ));
u_surface_default_template(&surf_templ, dst, bind);
+ surf_templ.format = util_format_linear(dst->format);
surf_templ.u.tex.level = dstlevel;
surf_templ.u.tex.first_layer = dstz;
surf_templ.u.tex.last_layer = dstz;
@@ -807,7 +824,7 @@ void util_blitter_copy_region(struct blitter_context *blitter,
normalized = src->target != PIPE_TEXTURE_RECT;
/* Initialize sampler view. */
- u_sampler_view_default_template(&viewTempl, src, src->format);
+ u_sampler_view_default_template(&viewTempl, src, util_format_linear(src->format));
view = pipe->create_sampler_view(pipe, src, &viewTempl);
/* Set rasterizer state, shaders, and textures. */
@@ -853,7 +870,10 @@ void util_blitter_copy_region(struct blitter_context *blitter,
/* Draw. */
blitter_set_rectangle(ctx, dstx, dsty, dstx+width, dsty+height, 0);
- blitter_draw_quad(ctx);
+ ctx->base.pipe->redefine_user_buffer(ctx->base.pipe, ctx->vbuf,
+ 0, ctx->vbuf->width0);
+ util_draw_vertex_buffer(ctx->base.pipe, NULL, ctx->vbuf, 0,
+ PIPE_PRIM_TRIANGLE_FAN, 4, 2);
break;
default:
@@ -1014,12 +1034,3 @@ void util_blitter_custom_depth_stencil(struct blitter_context *blitter,
UTIL_BLITTER_ATTRIB_NONE, NULL);
blitter_restore_CSOs(ctx);
}
-
-/* flush a region of a depth stencil surface for r300g */
-void util_blitter_flush_depth_stencil(struct blitter_context *blitter,
- struct pipe_surface *dstsurf)
-{
- struct blitter_context_priv *ctx = (struct blitter_context_priv*)blitter;
- util_blitter_custom_depth_stencil(blitter, dstsurf, NULL,
- ctx->dsa_flush_depth_stencil, 0.0f);
-}
diff --git a/src/gallium/auxiliary/util/u_blitter.h b/src/gallium/auxiliary/util/u_blitter.h
index c5660cf2d00..41470d92bba 100644
--- a/src/gallium/auxiliary/util/u_blitter.h
+++ b/src/gallium/auxiliary/util/u_blitter.h
@@ -55,13 +55,13 @@ struct blitter_context
* \param y1 A Y coordinate of the top-left corner.
* \param x2 An X coordinate of the bottom-right corner.
* \param y2 A Y coordinate of the bottom-right corner.
- * \param depth A depth which the rectangle is rendered at.
+ * \param depth A depth which the rectangle is rendered at.
*
* \param type Semantics of the attributes "attrib".
* If type is UTIL_BLITTER_ATTRIB_NONE, ignore them.
* If type is UTIL_BLITTER_ATTRIB_COLOR, the attributes
- * make up a constant RGBA color, and should go to the COLOR0
- * varying slot of a fragment shader.
+ * make up a constant RGBA color, and should go
+ * to the GENERIC0 varying slot of a fragment shader.
* If type is UTIL_BLITTER_ATTRIB_TEXCOORD, {a1, a2} and
* {a3, a4} specify top-left and bottom-right texture
* coordinates of the rectangle, respectively, and should go
@@ -79,6 +79,9 @@ struct blitter_context
enum blitter_attrib_type type,
const float attrib[4]);
+ /* Whether the blitter is running. */
+ boolean running;
+
/* Private members, really. */
struct pipe_context *pipe; /**< pipe context */
@@ -141,6 +144,10 @@ void util_blitter_clear(struct blitter_context *blitter,
const float *rgba,
double depth, unsigned stencil);
+void util_blitter_clear_depth_custom(struct blitter_context *blitter,
+ unsigned width, unsigned height,
+ double depth, void *custom_dsa);
+
/**
* Copy a block of pixels from one surface to another.
*
@@ -200,9 +207,6 @@ void util_blitter_clear_depth_stencil(struct blitter_context *blitter,
unsigned dstx, unsigned dsty,
unsigned width, unsigned height);
-void util_blitter_flush_depth_stencil(struct blitter_context *blitter,
- struct pipe_surface *dstsurf);
-
void util_blitter_custom_depth_stencil(struct blitter_context *blitter,
struct pipe_surface *zsurf,
struct pipe_surface *cbsurf,
@@ -318,21 +322,13 @@ util_blitter_save_vertex_buffers(struct blitter_context *blitter,
int num_vertex_buffers,
struct pipe_vertex_buffer *vertex_buffers)
{
- unsigned i;
assert(num_vertex_buffers <= Elements(blitter->saved_vertex_buffers));
- blitter->saved_num_vertex_buffers = num_vertex_buffers;
-
- for (i = 0; i < num_vertex_buffers; i++) {
- if (vertex_buffers[i].buffer) {
- pipe_resource_reference(&blitter->saved_vertex_buffers[i].buffer,
- vertex_buffers[i].buffer);
- }
- }
-
- memcpy(blitter->saved_vertex_buffers,
- vertex_buffers,
- num_vertex_buffers * sizeof(struct pipe_vertex_buffer));
+ blitter->saved_num_vertex_buffers = 0;
+ util_copy_vertex_buffers(blitter->saved_vertex_buffers,
+ (unsigned*)&blitter->saved_num_vertex_buffers,
+ vertex_buffers,
+ num_vertex_buffers);
}
#ifdef __cplusplus
diff --git a/src/gallium/auxiliary/util/u_cache.c b/src/gallium/auxiliary/util/u_cache.c
index 15f4a8831f2..df08ec302a2 100644
--- a/src/gallium/auxiliary/util/u_cache.c
+++ b/src/gallium/auxiliary/util/u_cache.c
@@ -27,9 +27,10 @@
/**
* @file
- * Simple cache implementation.
+ * Improved cache implementation.
*
- * We simply have fixed size array, and destroy previous values on collision.
+ * Fixed size array with linear probing on collision and LRU eviction
+ * on full.
*
* @author Jose Fonseca <jfonseca@vmware.com>
*/
@@ -41,10 +42,17 @@
#include "util/u_math.h"
#include "util/u_memory.h"
#include "util/u_cache.h"
+#include "util/u_simple_list.h"
struct util_cache_entry
{
+ enum { EMPTY = 0, FILLED, DELETED } state;
+ uint32_t hash;
+
+ struct util_cache_entry *next;
+ struct util_cache_entry *prev;
+
void *key;
void *value;
@@ -69,11 +77,14 @@ struct util_cache
struct util_cache_entry *entries;
-#ifdef DEBUG
unsigned count;
-#endif
+ struct util_cache_entry lru;
};
+static void
+ensure_sanity(const struct util_cache *cache);
+
+#define CACHE_DEFAULT_ALPHA 2
struct util_cache *
util_cache_create(uint32_t (*hash)(const void *key),
@@ -90,6 +101,10 @@ util_cache_create(uint32_t (*hash)(const void *key),
cache->hash = hash;
cache->compare = compare;
cache->destroy = destroy;
+
+ make_empty_list(&cache->lru);
+
+ size *= CACHE_DEFAULT_ALPHA;
cache->size = size;
cache->entries = CALLOC(size, sizeof(struct util_cache_entry));
@@ -98,19 +113,46 @@ util_cache_create(uint32_t (*hash)(const void *key),
return NULL;
}
+ ensure_sanity(cache);
return cache;
}
-static INLINE struct util_cache_entry *
+static struct util_cache_entry *
util_cache_entry_get(struct util_cache *cache,
+ uint32_t hash,
const void *key)
{
- uint32_t hash;
-
- hash = cache->hash(key);
+ struct util_cache_entry *first_unfilled = NULL;
+ uint32_t index = hash % cache->size;
+ uint32_t probe;
+
+ /* Probe until we find either a matching FILLED entry or an EMPTY
+ * slot (which has never been occupied).
+ *
+ * Deleted or non-matching slots are not indicative of completion
+ * as a previous linear probe for the same key could have continued
+ * past this point.
+ */
+ for (probe = 0; probe < cache->size; probe++) {
+ uint32_t i = (index + probe) % cache->size;
+ struct util_cache_entry *current = &cache->entries[i];
+
+ if (current->state == FILLED) {
+ if (current->hash == hash &&
+ cache->compare(key, current->key) == 0)
+ return current;
+ }
+ else {
+ if (!first_unfilled)
+ first_unfilled = current;
+
+ if (current->state == EMPTY)
+ return first_unfilled;
+ }
+ }
- return &cache->entries[hash % cache->size];
+ return NULL;
}
static INLINE void
@@ -123,9 +165,15 @@ util_cache_entry_destroy(struct util_cache *cache,
entry->key = NULL;
entry->value = NULL;
- if(key || value)
+ if (entry->state == FILLED) {
+ remove_from_list(entry);
+ cache->count--;
+
if(cache->destroy)
cache->destroy(key, value);
+
+ entry->state = DELETED;
+ }
}
@@ -135,21 +183,33 @@ util_cache_set(struct util_cache *cache,
void *value)
{
struct util_cache_entry *entry;
+ uint32_t hash = cache->hash(key);
assert(cache);
if (!cache)
return;
- entry = util_cache_entry_get(cache, key);
+ entry = util_cache_entry_get(cache, hash, key);
+ if (!entry)
+ entry = cache->lru.prev;
+
+ if (cache->count >= cache->size / CACHE_DEFAULT_ALPHA)
+ util_cache_entry_destroy(cache, cache->lru.prev);
+
util_cache_entry_destroy(cache, entry);
#ifdef DEBUG
++entry->count;
- ++cache->count;
#endif
entry->key = key;
+ entry->hash = hash;
entry->value = value;
+ entry->state = FILLED;
+ insert_at_head(&cache->lru, entry);
+ cache->count++;
+
+ ensure_sanity(cache);
}
@@ -158,17 +218,18 @@ util_cache_get(struct util_cache *cache,
const void *key)
{
struct util_cache_entry *entry;
+ uint32_t hash = cache->hash(key);
assert(cache);
if (!cache)
return NULL;
- entry = util_cache_entry_get(cache, key);
- if(!entry->key && !entry->value)
- return NULL;
-
- if(cache->compare(key, entry->key) != 0)
+ entry = util_cache_entry_get(cache, hash, key);
+ if (!entry)
return NULL;
+
+ if (entry->state == FILLED)
+ move_to_head(&cache->lru, entry);
return entry->value;
}
@@ -183,8 +244,14 @@ util_cache_clear(struct util_cache *cache)
if (!cache)
return;
- for(i = 0; i < cache->size; ++i)
+ for(i = 0; i < cache->size; ++i) {
util_cache_entry_destroy(cache, &cache->entries[i]);
+ cache->entries[i].state = EMPTY;
+ }
+
+ assert(cache->count == 0);
+ assert(is_empty_list(&cache->lru));
+ ensure_sanity(cache);
}
@@ -215,3 +282,70 @@ util_cache_destroy(struct util_cache *cache)
FREE(cache->entries);
FREE(cache);
}
+
+
+void
+util_cache_remove(struct util_cache *cache,
+ const void *key)
+{
+ struct util_cache_entry *entry;
+ uint32_t hash;
+
+ assert(cache);
+ if (!cache)
+ return;
+
+ hash = cache->hash(key);
+
+ entry = util_cache_entry_get(cache, hash, key);
+ if (!entry)
+ return;
+
+ if (entry->state == FILLED)
+ util_cache_entry_destroy(cache, entry);
+
+ ensure_sanity(cache);
+}
+
+
+static void
+ensure_sanity(const struct util_cache *cache)
+{
+#ifdef DEBUG
+ unsigned i, cnt = 0;
+
+ assert(cache);
+ for (i = 0; i < cache->size; i++) {
+ struct util_cache_entry *header = &cache->entries[i];
+
+ assert(header);
+ assert(header->state == FILLED ||
+ header->state == EMPTY ||
+ header->state == DELETED);
+ if (header->state == FILLED) {
+ cnt++;
+ assert(header->hash == cache->hash(header->key));
+ }
+ }
+
+ assert(cnt == cache->count);
+ assert(cache->size >= cnt);
+
+ if (cache->count == 0) {
+ assert (is_empty_list(&cache->lru));
+ }
+ else {
+ struct util_cache_entry *header = cache->lru.next;
+
+ assert (header);
+ assert (!is_empty_list(&cache->lru));
+
+ for (i = 0; i < cache->count; i++)
+ header = header->next;
+
+ assert(header == &cache->lru);
+ }
+#endif
+
+ (void)cache;
+}
diff --git a/src/gallium/auxiliary/util/u_cache.h b/src/gallium/auxiliary/util/u_cache.h
index 8a612c6585f..be3631b7254 100644
--- a/src/gallium/auxiliary/util/u_cache.h
+++ b/src/gallium/auxiliary/util/u_cache.h
@@ -79,6 +79,10 @@ util_cache_clear(struct util_cache *cache);
void
util_cache_destroy(struct util_cache *cache);
+void
+util_cache_remove(struct util_cache *cache,
+ const void *key);
+
#ifdef __cplusplus
}
diff --git a/src/gallium/auxiliary/util/u_caps.c b/src/gallium/auxiliary/util/u_caps.c
index e209a98b706..75677b2b133 100644
--- a/src/gallium/auxiliary/util/u_caps.c
+++ b/src/gallium/auxiliary/util/u_caps.c
@@ -69,8 +69,7 @@ util_check_caps_out(struct pipe_screen *screen, const unsigned *list, int *out)
list[i++],
PIPE_TEXTURE_2D,
0,
- PIPE_BIND_SAMPLER_VIEW,
- 0)) {
+ PIPE_BIND_SAMPLER_VIEW)) {
*out = i - 2;
return FALSE;
}
diff --git a/src/gallium/auxiliary/util/u_debug.c b/src/gallium/auxiliary/util/u_debug.c
index 2ad2f95b13e..36ce4b57713 100644
--- a/src/gallium/auxiliary/util/u_debug.c
+++ b/src/gallium/auxiliary/util/u_debug.c
@@ -44,9 +44,11 @@
#include "util/u_surface.h"
#include <limits.h> /* CHAR_BIT */
+#include <ctype.h> /* isalnum */
void _debug_vprintf(const char *format, va_list ap)
{
+#if defined(PIPE_OS_WINDOWS) || defined(PIPE_OS_EMBEDDED)
/* We buffer until we find a newline. */
static char buf[4096] = {'\0'};
size_t len = strlen(buf);
@@ -55,6 +57,10 @@ void _debug_vprintf(const char *format, va_list ap)
os_log_message(buf);
buf[0] = '\0';
}
+#else
+ /* Just print as-is to stderr */
+ vfprintf(stderr, format, ap);
+#endif
}
@@ -175,6 +181,48 @@ debug_get_num_option(const char *name, long dfault)
return result;
}
+static boolean str_has_option(const char *str, const char *name)
+{
+ /* Empty string. */
+ if (!*str) {
+ return FALSE;
+ }
+
+ /* OPTION=all */
+ if (!util_strcmp(str, "all")) {
+ return TRUE;
+ }
+
+ /* Find 'name' in 'str' surrounded by non-alphanumeric characters. */
+ {
+ const char *start = str;
+ unsigned name_len = strlen(name);
+
+ /* 'start' is the beginning of the currently-parsed word,
+ * we increment 'str' each iteration.
+ * if we find either the end of string or a non-alphanumeric character,
+ * we compare 'start' up to 'str-1' with 'name'. */
+
+ while (1) {
+ if (!*str || !isalnum(*str)) {
+ if (str-start == name_len &&
+ !memcmp(start, name, name_len)) {
+ return TRUE;
+ }
+
+ if (!*str) {
+ return FALSE;
+ }
+
+ start = str+1;
+ }
+
+ str++;
+ }
+ }
+
+ return FALSE;
+}
unsigned long
debug_get_flags_option(const char *name,
@@ -202,7 +250,7 @@ debug_get_flags_option(const char *name,
else {
result = 0;
while( flags->name ) {
- if (!util_strcmp(str, "all") || util_strstr(str, flags->name ))
+ if (str_has_option(str, flags->name))
result |= flags->value;
++flags;
}
@@ -354,6 +402,41 @@ const char *u_prim_name( unsigned prim )
+#ifdef DEBUG
+int fl_indent = 0;
+const char* fl_function[1024];
+
+int debug_funclog_enter(const char* f, const int line, const char* file)
+{
+ int i;
+
+ for (i = 0; i < fl_indent; i++)
+ debug_printf(" ");
+ debug_printf("%s\n", f);
+
+ assert(fl_indent < 1023);
+ fl_function[fl_indent++] = f;
+
+ return 0;
+}
+
+void debug_funclog_exit(const char* f, const int line, const char* file)
+{
+ --fl_indent;
+ assert(fl_indent >= 0);
+ assert(fl_function[fl_indent] == f);
+}
+
+void debug_funclog_enter_exit(const char* f, const int line, const char* file)
+{
+ int i;
+ for (i = 0; i < fl_indent; i++)
+ debug_printf(" ");
+ debug_printf("%s\n", f);
+}
+#endif
+
+
#ifdef DEBUG
/**
diff --git a/src/gallium/auxiliary/util/u_debug.h b/src/gallium/auxiliary/util/u_debug.h
index 1c9624ea3ed..c47c13c64cf 100644
--- a/src/gallium/auxiliary/util/u_debug.h
+++ b/src/gallium/auxiliary/util/u_debug.h
@@ -280,6 +280,43 @@ debug_dump_flags(const struct debug_named_value *names,
/**
+ * Function enter exit loggers
+ */
+#ifdef DEBUG
+int debug_funclog_enter(const char* f, const int line, const char* file);
+void debug_funclog_exit(const char* f, const int line, const char* file);
+void debug_funclog_enter_exit(const char* f, const int line, const char* file);
+
+#define DEBUG_FUNCLOG_ENTER() \
+ int __debug_decleration_work_around = \
+ debug_funclog_enter(__FUNCTION__, __LINE__, __FILE__)
+#define DEBUG_FUNCLOG_EXIT() \
+ do { \
+ (void)__debug_decleration_work_around; \
+ debug_funclog_exit(__FUNCTION__, __LINE__, __FILE__); \
+ return; \
+ } while(0)
+#define DEBUG_FUNCLOG_EXIT_RET(ret) \
+ do { \
+ (void)__debug_decleration_work_around; \
+ debug_funclog_exit(__FUNCTION__, __LINE__, __FILE__); \
+ return ret; \
+ } while(0)
+#define DEBUG_FUNCLOG_ENTER_EXIT() \
+ debug_funclog_enter_exit(__FUNCTION__, __LINE__, __FILE__)
+
+#else
+#define DEBUG_FUNCLOG_ENTER() \
+ int __debug_decleration_work_around
+#define DEBUG_FUNCLOG_EXIT() \
+ do { (void)__debug_decleration_work_around; return; } while(0)
+#define DEBUG_FUNCLOG_EXIT_RET(ret) \
+ do { (void)__debug_decleration_work_around; return ret; } while(0)
+#define DEBUG_FUNCLOG_ENTER_EXIT()
+#endif
+
+
+/**
* Get option.
*
* It is an alias for getenv on Linux.
diff --git a/src/gallium/auxiliary/util/u_debug_refcnt.c b/src/gallium/auxiliary/util/u_debug_refcnt.c
index 40a26c9c697..6f706a35fda 100644
--- a/src/gallium/auxiliary/util/u_debug_refcnt.c
+++ b/src/gallium/auxiliary/util/u_debug_refcnt.c
@@ -43,7 +43,8 @@ int debug_refcnt_state;
struct os_stream* stream;
/* TODO: maybe move this serial machinery to a stand-alone module and expose it? */
-static pipe_mutex serials_mutex;
+pipe_static_mutex(serials_mutex);
+
static struct util_hash_table* serials_hash;
static unsigned serials_last;
@@ -66,6 +67,15 @@ static boolean debug_serial(void* p, unsigned* pserial)
{
unsigned serial;
boolean found = TRUE;
+#ifdef PIPE_SUBSYSTEM_WINDOWS_USER
+ static boolean first = TRUE;
+
+ if (first) {
+ pipe_mutex_init(serials_mutex);
+ first = FALSE;
+ }
+#endif
+
pipe_mutex_lock(serials_mutex);
if(!serials_hash)
serials_hash = util_hash_table_create(hash_ptr, compare_ptr);
diff --git a/src/gallium/auxiliary/util/u_debug_symbol.c b/src/gallium/auxiliary/util/u_debug_symbol.c
index 44d437747a1..bae9be87a26 100644
--- a/src/gallium/auxiliary/util/u_debug_symbol.c
+++ b/src/gallium/auxiliary/util/u_debug_symbol.c
@@ -40,20 +40,43 @@
#include "u_debug_symbol.h"
#include "u_hash_table.h"
-#if defined(PIPE_CC_MSVC) && defined(PIPE_ARCH_X86)
+#if defined(PIPE_OS_WINDOWS) && defined(PIPE_ARCH_X86)
#include <windows.h>
#include <stddef.h>
-#include <imagehlp.h>
-/*
- * TODO: Cleanup code.
- * TODO: Support x86_64
- */
+#include "dbghelp.h"
+
static BOOL bSymInitialized = FALSE;
-static HMODULE hModule_Imagehlp = NULL;
+static HMODULE hModule_Dbghelp = NULL;
+
+
+static
+FARPROC WINAPI __GetProcAddress(LPCSTR lpProcName)
+{
+#ifdef PIPE_CC_GCC
+ if (!hModule_Dbghelp) {
+ /*
+ * bfdhelp.dll is a dbghelp.dll look-alike replacement, which is able to
+ * understand MinGW symbols using BFD library. It is available from
+ * http://people.freedesktop.org/~jrfonseca/bfdhelp/ for now.
+ */
+ hModule_Dbghelp = LoadLibraryA("bfdhelp.dll");
+ }
+#endif
+
+ if (!hModule_Dbghelp) {
+ hModule_Dbghelp = LoadLibraryA("dbghelp.dll");
+ if (!hModule_Dbghelp) {
+ return NULL;
+ }
+ }
+
+ return GetProcAddress(hModule_Dbghelp, lpProcName);
+}
+
typedef BOOL (WINAPI *PFNSYMINITIALIZE)(HANDLE, LPSTR, BOOL);
static PFNSYMINITIALIZE pfnSymInitialize = NULL;
@@ -62,8 +85,7 @@ static
BOOL WINAPI j_SymInitialize(HANDLE hProcess, PSTR UserSearchPath, BOOL fInvadeProcess)
{
if(
- (hModule_Imagehlp || (hModule_Imagehlp = LoadLibraryA("IMAGEHLP.DLL"))) &&
- (pfnSymInitialize || (pfnSymInitialize = (PFNSYMINITIALIZE) GetProcAddress(hModule_Imagehlp, "SymInitialize")))
+ (pfnSymInitialize || (pfnSymInitialize = (PFNSYMINITIALIZE) __GetProcAddress("SymInitialize")))
)
return pfnSymInitialize(hProcess, UserSearchPath, fInvadeProcess);
else
@@ -77,57 +99,41 @@ static
DWORD WINAPI j_SymSetOptions(DWORD SymOptions)
{
if(
- (hModule_Imagehlp || (hModule_Imagehlp = LoadLibraryA("IMAGEHLP.DLL"))) &&
- (pfnSymSetOptions || (pfnSymSetOptions = (PFNSYMSETOPTIONS) GetProcAddress(hModule_Imagehlp, "SymSetOptions")))
+ (pfnSymSetOptions || (pfnSymSetOptions = (PFNSYMSETOPTIONS) __GetProcAddress("SymSetOptions")))
)
return pfnSymSetOptions(SymOptions);
else
return FALSE;
}
-typedef PGET_MODULE_BASE_ROUTINE PFNSYMGETMODULEBASE;
-static PFNSYMGETMODULEBASE pfnSymGetModuleBase = NULL;
+typedef BOOL (WINAPI *PFNSYMGETSYMFROMADDR)(HANDLE, DWORD64, PDWORD64, PSYMBOL_INFO);
+static PFNSYMGETSYMFROMADDR pfnSymFromAddr = NULL;
static
-DWORD WINAPI j_SymGetModuleBase(HANDLE hProcess, DWORD dwAddr)
+BOOL WINAPI j_SymFromAddr(HANDLE hProcess, DWORD64 Address, PDWORD64 Displacement, PSYMBOL_INFO Symbol)
{
if(
- (hModule_Imagehlp || (hModule_Imagehlp = LoadLibraryA("IMAGEHLP.DLL"))) &&
- (pfnSymGetModuleBase || (pfnSymGetModuleBase = (PFNSYMGETMODULEBASE) GetProcAddress(hModule_Imagehlp, "SymGetModuleBase")))
+ (pfnSymFromAddr || (pfnSymFromAddr = (PFNSYMGETSYMFROMADDR) __GetProcAddress("SymFromAddr")))
)
- return pfnSymGetModuleBase(hProcess, dwAddr);
- else
- return 0;
-}
-
-typedef BOOL (WINAPI *PFNSYMGETSYMFROMADDR)(HANDLE, DWORD, LPDWORD, PIMAGEHLP_SYMBOL);
-static PFNSYMGETSYMFROMADDR pfnSymGetSymFromAddr = NULL;
-
-static
-BOOL WINAPI j_SymGetSymFromAddr(HANDLE hProcess, DWORD Address, PDWORD Displacement, PIMAGEHLP_SYMBOL Symbol)
-{
- if(
- (hModule_Imagehlp || (hModule_Imagehlp = LoadLibraryA("IMAGEHLP.DLL"))) &&
- (pfnSymGetSymFromAddr || (pfnSymGetSymFromAddr = (PFNSYMGETSYMFROMADDR) GetProcAddress(hModule_Imagehlp, "SymGetSymFromAddr")))
- )
- return pfnSymGetSymFromAddr(hProcess, Address, Displacement, Symbol);
+ return pfnSymFromAddr(hProcess, Address, Displacement, Symbol);
else
return FALSE;
}
static INLINE void
-debug_symbol_name_imagehlp(const void *addr, char* buf, unsigned size)
+debug_symbol_name_dbghelp(const void *addr, char* buf, unsigned size)
{
HANDLE hProcess;
BYTE symbolBuffer[1024];
- PIMAGEHLP_SYMBOL pSymbol = (PIMAGEHLP_SYMBOL) symbolBuffer;
- DWORD dwDisplacement = 0; /* Displacement of the input address, relative to the start of the symbol */
+ PSYMBOL_INFO pSymbol = (PSYMBOL_INFO) symbolBuffer;
+ DWORD64 dwDisplacement = 0; /* Displacement of the input address, relative to the start of the symbol */
hProcess = GetCurrentProcess();
+ memset(pSymbol, 0, sizeof *pSymbol);
pSymbol->SizeOfStruct = sizeof(symbolBuffer);
- pSymbol->MaxNameLength = sizeof(symbolBuffer) - offsetof(IMAGEHLP_SYMBOL, Name);
+ pSymbol->MaxNameLen = sizeof(symbolBuffer) - offsetof(SYMBOL_INFO, Name);
if(!bSymInitialized) {
j_SymSetOptions(/* SYMOPT_UNDNAME | */ SYMOPT_LOAD_LINES);
@@ -135,7 +141,7 @@ debug_symbol_name_imagehlp(const void *addr, char* buf, unsigned size)
bSymInitialized = TRUE;
}
- if(!j_SymGetSymFromAddr(hProcess, (DWORD)addr, &dwDisplacement, pSymbol))
+ if(!j_SymFromAddr(hProcess, (DWORD64)(uintptr_t)addr, &dwDisplacement, pSymbol))
buf[0] = 0;
else
{
@@ -165,8 +171,8 @@ debug_symbol_name_glibc(const void *addr, char* buf, unsigned size)
void
debug_symbol_name(const void *addr, char* buf, unsigned size)
{
-#if defined(PIPE_CC_MSVC) && defined(PIPE_ARCH_X86)
- debug_symbol_name_imagehlp(addr, buf, size);
+#if defined(PIPE_OS_WINDOWS) && defined(PIPE_ARCH_X86)
+ debug_symbol_name_dbghelp(addr, buf, size);
if(buf[0])
return;
#endif
@@ -190,7 +196,7 @@ debug_symbol_print(const void *addr)
}
struct util_hash_table* symbols_hash;
-pipe_mutex symbols_mutex;
+pipe_static_mutex(symbols_mutex);
static unsigned hash_ptr(void* p)
{
@@ -211,6 +217,15 @@ const char*
debug_symbol_name_cached(const void *addr)
{
const char* name;
+#ifdef PIPE_SUBSYSTEM_WINDOWS_USER
+ static boolean first = TRUE;
+
+ if (first) {
+ pipe_mutex_init(symbols_mutex);
+ first = FALSE;
+ }
+#endif
+
pipe_mutex_lock(symbols_mutex);
if(!symbols_hash)
symbols_hash = util_hash_table_create(hash_ptr, compare_ptr);
diff --git a/src/gallium/auxiliary/util/u_draw_quad.c b/src/gallium/auxiliary/util/u_draw_quad.c
index 0b6dc5880f3..8ed3b3c0959 100644
--- a/src/gallium/auxiliary/util/u_draw_quad.c
+++ b/src/gallium/auxiliary/util/u_draw_quad.c
@@ -31,6 +31,7 @@
#include "util/u_inlines.h"
#include "util/u_draw_quad.h"
#include "util/u_memory.h"
+#include "cso_cache/cso_context.h"
/**
@@ -39,6 +40,7 @@
*/
void
util_draw_vertex_buffer(struct pipe_context *pipe,
+ struct cso_context *cso,
struct pipe_resource *vbuf,
uint offset,
uint prim_type,
@@ -54,8 +56,12 @@ util_draw_vertex_buffer(struct pipe_context *pipe,
vbuffer.buffer = vbuf;
vbuffer.stride = num_attribs * 4 * sizeof(float); /* vertex size */
vbuffer.buffer_offset = offset;
- vbuffer.max_index = num_verts - 1;
- pipe->set_vertex_buffers(pipe, 1, &vbuffer);
+
+ if (cso) {
+ cso_set_vertex_buffers(cso, 1, &vbuffer);
+ } else {
+ pipe->set_vertex_buffers(pipe, 1, &vbuffer);
+ }
/* note: vertex elements already set by caller */
@@ -70,13 +76,13 @@ util_draw_vertex_buffer(struct pipe_context *pipe,
* Note: this isn't especially efficient.
*/
void
-util_draw_texquad(struct pipe_context *pipe,
+util_draw_texquad(struct pipe_context *pipe, struct cso_context *cso,
float x0, float y0, float x1, float y1, float z)
{
uint numAttribs = 2, i, j;
uint vertexBytes = 4 * (4 * numAttribs * sizeof(float));
struct pipe_resource *vbuf = NULL;
- uint *v = NULL;
+ float *v = NULL;
v = MALLOC(vertexBytes);
if (v == NULL)
@@ -115,10 +121,10 @@ util_draw_texquad(struct pipe_context *pipe,
vbuf = pipe_user_buffer_create(pipe->screen, v, vertexBytes,
PIPE_BIND_VERTEX_BUFFER);
- if (!vbuf)
+ if (!vbuf)
goto out;
- util_draw_vertex_buffer(pipe, vbuf, 0, PIPE_PRIM_TRIANGLE_FAN, 4, 2);
+ util_draw_vertex_buffer(pipe, cso, vbuf, 0, PIPE_PRIM_TRIANGLE_FAN, 4, 2);
out:
if (vbuf)
diff --git a/src/gallium/auxiliary/util/u_draw_quad.h b/src/gallium/auxiliary/util/u_draw_quad.h
index 52994fe05c3..f1167786f0e 100644
--- a/src/gallium/auxiliary/util/u_draw_quad.h
+++ b/src/gallium/auxiliary/util/u_draw_quad.h
@@ -38,17 +38,18 @@ extern "C" {
#endif
struct pipe_resource;
+struct cso_context;
#include "util/u_draw.h"
extern void
-util_draw_vertex_buffer(struct pipe_context *pipe,
+util_draw_vertex_buffer(struct pipe_context *pipe, struct cso_context *cso,
struct pipe_resource *vbuf, uint offset,
uint num_attribs, uint num_verts, uint prim_type);
extern void
-util_draw_texquad(struct pipe_context *pipe,
+util_draw_texquad(struct pipe_context *pipe, struct cso_context *cso,
float x0, float y0, float x1, float y1, float z);
diff --git a/src/gallium/auxiliary/util/u_dump_state.c b/src/gallium/auxiliary/util/u_dump_state.c
index b471d59eebf..5ecf8cbb067 100644
--- a/src/gallium/auxiliary/util/u_dump_state.c
+++ b/src/gallium/auxiliary/util/u_dump_state.c
@@ -681,7 +681,6 @@ util_dump_vertex_buffer(struct os_stream *stream, const struct pipe_vertex_buffe
util_dump_struct_begin(stream, "pipe_vertex_buffer");
util_dump_member(stream, uint, state, stride);
- util_dump_member(stream, uint, state, max_index);
util_dump_member(stream, uint, state, buffer_offset);
util_dump_member(stream, ptr, state, buffer);
diff --git a/src/gallium/auxiliary/util/u_format.csv b/src/gallium/auxiliary/util/u_format.csv
index 1fbd83841c1..6f5cc618ffc 100644
--- a/src/gallium/auxiliary/util/u_format.csv
+++ b/src/gallium/auxiliary/util/u_format.csv
@@ -76,6 +76,7 @@ PIPE_FORMAT_B4G4R4X4_UNORM , plain, 1, 1, un4 , un4 , un4 , x4 , zyx1, r
PIPE_FORMAT_B5G6R5_UNORM , plain, 1, 1, un5 , un6 , un5 , , zyx1, rgb
PIPE_FORMAT_R10G10B10A2_UNORM , plain, 1, 1, un10, un10, un10, un2 , xyzw, rgb
PIPE_FORMAT_B10G10R10A2_UNORM , plain, 1, 1, un10, un10, un10, un2 , zyxw, rgb
+PIPE_FORMAT_B2G3R3_UNORM , plain, 1, 1, un2 , un3 , un3 , , zyx1, rgb
# Luminance/Intensity/Alpha formats
PIPE_FORMAT_L8_UNORM , plain, 1, 1, un8 , , , , xxx1, rgb
@@ -84,6 +85,9 @@ PIPE_FORMAT_I8_UNORM , plain, 1, 1, un8 , , , , xxxx, r
PIPE_FORMAT_L4A4_UNORM , plain, 1, 1, un4 , un4 , , , xxxy, rgb
PIPE_FORMAT_L8A8_UNORM , plain, 1, 1, un8 , un8 , , , xxxy, rgb
PIPE_FORMAT_L16_UNORM , plain, 1, 1, un16, , , , xxx1, rgb
+PIPE_FORMAT_A16_UNORM , plain, 1, 1, un16, , , , 000x, rgb
+PIPE_FORMAT_I16_UNORM , plain, 1, 1, un16, , , , xxxx, rgb
+PIPE_FORMAT_L16A16_UNORM , plain, 1, 1, un16, un16, , , xxxy, rgb
# SRGB formats
PIPE_FORMAT_L8_SRGB , plain, 1, 1, un8 , , , , xxx1, srgb
@@ -137,6 +141,7 @@ PIPE_FORMAT_R8G8Bx_SNORM , other, 1, 1, sn8 , sn8 , , , x
# - http://en.wikipedia.org/wiki/S3_Texture_Compression
# - http://www.opengl.org/registry/specs/EXT/texture_compression_s3tc.txt
# - http://www.opengl.org/registry/specs/ARB/texture_compression_rgtc.txt
+# - http://www.opengl.org/registry/specs/EXT/texture_compression_latc.txt
# - http://msdn.microsoft.com/en-us/library/bb694531.aspx
PIPE_FORMAT_DXT1_RGB , s3tc, 4, 4, x64 , , , , xyz1, rgb
PIPE_FORMAT_DXT1_RGBA , s3tc, 4, 4, x64 , , , , xyzw, rgb
@@ -152,6 +157,11 @@ PIPE_FORMAT_RGTC1_SNORM , rgtc, 4, 4, x64, , , , x001, rg
PIPE_FORMAT_RGTC2_UNORM , rgtc, 4, 4, x128, , , , xy01, rgb
PIPE_FORMAT_RGTC2_SNORM , rgtc, 4, 4, x128, , , , xy01, rgb
+PIPE_FORMAT_LATC1_UNORM , rgtc, 4, 4, x64, , , , xxx1, rgb
+PIPE_FORMAT_LATC1_SNORM , rgtc, 4, 4, x64, , , , xxx1, rgb
+PIPE_FORMAT_LATC2_UNORM , rgtc, 4, 4, x128, , , , xxxy, rgb
+PIPE_FORMAT_LATC2_SNORM , rgtc, 4, 4, x128, , , , xxxy, rgb
+
# Straightforward D3D10-like formats (also used for
# vertex buffer element description)
#
diff --git a/src/gallium/auxiliary/util/u_format.h b/src/gallium/auxiliary/util/u_format.h
index 03b73c0e98f..7659a802a41 100644
--- a/src/gallium/auxiliary/util/u_format.h
+++ b/src/gallium/auxiliary/util/u_format.h
@@ -673,7 +673,8 @@ util_format_has_alpha(enum pipe_format format)
}
/**
- * Return the matching SRGB format, or PIPE_FORMAT_NONE if none.
+ * Given a linear RGB colorspace format, return the corresponding SRGB
+ * format, or PIPE_FORMAT_NONE if none.
*/
static INLINE enum pipe_format
util_format_srgb(enum pipe_format format)
@@ -711,6 +712,45 @@ util_format_srgb(enum pipe_format format)
}
/**
+ * Given an sRGB format, return the corresponding linear colorspace format.
+ * For non sRGB formats, return the format unchanged.
+ */
+static INLINE enum pipe_format
+util_format_linear(enum pipe_format format)
+{
+ switch (format) {
+ case PIPE_FORMAT_L8_SRGB:
+ return PIPE_FORMAT_L8_UNORM;
+ case PIPE_FORMAT_L8A8_SRGB:
+ return PIPE_FORMAT_L8A8_UNORM;
+ case PIPE_FORMAT_R8G8B8_SRGB:
+ return PIPE_FORMAT_R8G8B8_UNORM;
+ case PIPE_FORMAT_A8B8G8R8_SRGB:
+ return PIPE_FORMAT_A8B8G8R8_UNORM;
+ case PIPE_FORMAT_X8B8G8R8_SRGB:
+ return PIPE_FORMAT_X8B8G8R8_UNORM;
+ case PIPE_FORMAT_B8G8R8A8_SRGB:
+ return PIPE_FORMAT_B8G8R8A8_UNORM;
+ case PIPE_FORMAT_B8G8R8X8_SRGB:
+ return PIPE_FORMAT_B8G8R8X8_UNORM;
+ case PIPE_FORMAT_A8R8G8B8_SRGB:
+ return PIPE_FORMAT_A8R8G8B8_UNORM;
+ case PIPE_FORMAT_X8R8G8B8_SRGB:
+ return PIPE_FORMAT_X8R8G8B8_UNORM;
+ case PIPE_FORMAT_DXT1_SRGB:
+ return PIPE_FORMAT_DXT1_RGB;
+ case PIPE_FORMAT_DXT1_SRGBA:
+ return PIPE_FORMAT_DXT1_RGBA;
+ case PIPE_FORMAT_DXT3_SRGBA:
+ return PIPE_FORMAT_DXT3_RGBA;
+ case PIPE_FORMAT_DXT5_SRGBA:
+ return PIPE_FORMAT_DXT5_RGBA;
+ default:
+ return format;
+ }
+}
+
+/**
* Return the number of components stored.
* Formats with block size != 1x1 will always have 1 component (the block).
*/
diff --git a/src/gallium/auxiliary/util/u_format_latc.c b/src/gallium/auxiliary/util/u_format_latc.c
new file mode 100644
index 00000000000..e84c493bb1e
--- /dev/null
+++ b/src/gallium/auxiliary/util/u_format_latc.c
@@ -0,0 +1,328 @@
+/**************************************************************************
+ *
+ * Copyright (C) 2011 Red Hat Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+#include <stdio.h>
+#include "u_math.h"
+#include "u_format.h"
+#include "u_format_rgtc.h"
+#include "u_format_latc.h"
+
+static void u_format_unsigned_encode_rgtc_chan(uint8_t *blkaddr, uint8_t srccolors[4][4],
+ int numxpixels, int numypixels);
+
+static void u_format_unsigned_fetch_texel_rgtc(unsigned srcRowStride, const uint8_t *pixdata,
+ unsigned i, unsigned j, uint8_t *value, unsigned comps);
+
+static void u_format_signed_encode_rgtc_chan(int8_t *blkaddr, int8_t srccolors[4][4],
+ int numxpixels, int numypixels);
+
+static void u_format_signed_fetch_texel_rgtc(unsigned srcRowStride, const int8_t *pixdata,
+ unsigned i, unsigned j, int8_t *value, unsigned comps);
+
+void
+util_format_latc1_unorm_fetch_rgba_8unorm(uint8_t *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ /* Fix warnings here: */
+ (void) u_format_unsigned_encode_rgtc_chan;
+ (void) u_format_signed_encode_rgtc_chan;
+
+ u_format_unsigned_fetch_texel_rgtc(0, src, i, j, dst, 1);
+}
+
+void
+util_format_latc1_unorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ util_format_rgtc1_unorm_unpack_rgba_8unorm(dst_row, dst_stride, src_row, src_stride, width, height);
+}
+
+void
+util_format_latc1_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row,
+ unsigned src_stride, unsigned width, unsigned height)
+{
+ util_format_rgtc1_unorm_pack_rgba_8unorm(dst_row, dst_stride, src_row, src_stride, width, height);
+}
+
+void
+util_format_latc1_unorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y, i, j;
+ int block_size = 8;
+
+ for(y = 0; y < height; y += 4) {
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 4) {
+ for(j = 0; j < 4; ++j) {
+ for(i = 0; i < 4; ++i) {
+ float *dst = dst_row + (y + j)*dst_stride/sizeof(*dst_row) + (x + i)*4;
+ uint8_t tmp_r;
+ u_format_unsigned_fetch_texel_rgtc(0, src, i, j, &tmp_r, 1);
+ dst[0] =
+ dst[1] =
+ dst[2] = ubyte_to_float(tmp_r);
+ dst[3] = 1.0;
+ }
+ }
+ src += block_size;
+ }
+ src_row += src_stride;
+ }
+}
+
+void
+util_format_latc1_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ util_format_rgtc1_unorm_pack_rgba_float(dst_row, dst_stride, src_row, src_stride, width, height);
+}
+
+void
+util_format_latc1_unorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ uint8_t tmp_r;
+
+ u_format_unsigned_fetch_texel_rgtc(0, src, i, j, &tmp_r, 1);
+ dst[0] =
+ dst[1] =
+ dst[2] = ubyte_to_float(tmp_r);
+ dst[3] = 1.0;
+}
+
+void
+util_format_latc1_snorm_fetch_rgba_8unorm(uint8_t *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ fprintf(stderr,"%s\n", __func__);
+}
+
+void
+util_format_latc1_snorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ fprintf(stderr,"%s\n", __func__);
+}
+
+void
+util_format_latc1_snorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ fprintf(stderr,"%s\n", __func__);
+}
+
+void
+util_format_latc1_snorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ util_format_rgtc1_snorm_pack_rgba_float(dst_row, dst_stride, src_row, src_stride, width, height);
+}
+
+void
+util_format_latc1_snorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y, i, j;
+ int block_size = 8;
+
+ for(y = 0; y < height; y += 4) {
+ const int8_t *src = (int8_t *)src_row;
+ for(x = 0; x < width; x += 4) {
+ for(j = 0; j < 4; ++j) {
+ for(i = 0; i < 4; ++i) {
+ float *dst = dst_row + (y + j)*dst_stride/sizeof(*dst_row) + (x + i)*4;
+ int8_t tmp_r;
+ u_format_signed_fetch_texel_rgtc(0, src, i, j, &tmp_r, 1);
+ dst[0] =
+ dst[1] =
+ dst[2] = byte_to_float_tex(tmp_r);
+ dst[3] = 1.0;
+ }
+ }
+ src += block_size;
+ }
+ src_row += src_stride;
+ }
+}
+
+void
+util_format_latc1_snorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ int8_t tmp_r;
+
+ u_format_signed_fetch_texel_rgtc(0, (int8_t *)src, i, j, &tmp_r, 1);
+ dst[0] =
+ dst[1] =
+ dst[2] = byte_to_float_tex(tmp_r);
+ dst[3] = 1.0;
+}
+
+
+void
+util_format_latc2_unorm_fetch_rgba_8unorm(uint8_t *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ puts(__func__);
+
+ u_format_unsigned_fetch_texel_rgtc(0, src, i, j, dst, 2);
+ u_format_unsigned_fetch_texel_rgtc(0, src + 8, i, j, dst + 1, 2);
+}
+
+void
+util_format_latc2_unorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ util_format_rgtc2_unorm_unpack_rgba_8unorm(dst_row, dst_stride, src_row, src_stride, width, height);
+}
+
+void
+util_format_latc2_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ util_format_rgtc2_unorm_pack_rgba_8unorm(dst_row, dst_stride, src_row, src_stride, width, height);
+}
+
+void
+util_format_latc2_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ util_format_rxtc2_unorm_pack_rgba_float(dst_row, dst_stride, src_row, src_stride, width, height, 3);
+}
+
+void
+util_format_latc2_unorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y, i, j;
+ int block_size = 16;
+
+ for(y = 0; y < height; y += 4) {
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 4) {
+ for(j = 0; j < 4; ++j) {
+ for(i = 0; i < 4; ++i) {
+ float *dst = dst_row + (y + j)*dst_stride/sizeof(*dst_row) + (x + i)*4;
+ uint8_t tmp_r, tmp_g;
+ u_format_unsigned_fetch_texel_rgtc(0, src, i, j, &tmp_r, 2);
+ u_format_unsigned_fetch_texel_rgtc(0, src + 8, i, j, &tmp_g, 2);
+ dst[0] =
+ dst[1] =
+ dst[2] = ubyte_to_float(tmp_r);
+ dst[3] = ubyte_to_float(tmp_g);
+ }
+ }
+ src += block_size;
+ }
+ src_row += src_stride;
+ }
+}
+
+void
+util_format_latc2_unorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ uint8_t tmp_r, tmp_g;
+
+ u_format_unsigned_fetch_texel_rgtc(0, src, i, j, &tmp_r, 2);
+ u_format_unsigned_fetch_texel_rgtc(0, src + 8, i, j, &tmp_g, 2);
+ dst[0] =
+ dst[1] =
+ dst[2] = ubyte_to_float(tmp_r);
+ dst[3] = ubyte_to_float(tmp_g);
+}
+
+
+void
+util_format_latc2_snorm_fetch_rgba_8unorm(uint8_t *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ fprintf(stderr,"%s\n", __func__);
+}
+
+void
+util_format_latc2_snorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ fprintf(stderr,"%s\n", __func__);
+}
+
+void
+util_format_latc2_snorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ fprintf(stderr,"%s\n", __func__);
+}
+
+void
+util_format_latc2_snorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y, i, j;
+ int block_size = 16;
+
+ for(y = 0; y < height; y += 4) {
+ const int8_t *src = (int8_t *)src_row;
+ for(x = 0; x < width; x += 4) {
+ for(j = 0; j < 4; ++j) {
+ for(i = 0; i < 4; ++i) {
+ float *dst = dst_row + (y + j)*dst_stride/sizeof(*dst_row) + (x + i)*4;
+ int8_t tmp_r, tmp_g;
+ u_format_signed_fetch_texel_rgtc(0, src, i, j, &tmp_r, 2);
+ u_format_signed_fetch_texel_rgtc(0, src + 8, i, j, &tmp_g, 2);
+ dst[0] =
+ dst[1] =
+ dst[2] = byte_to_float_tex(tmp_r);
+ dst[3] = byte_to_float_tex(tmp_g);
+ }
+ }
+ src += block_size;
+ }
+ src_row += src_stride;
+ }
+}
+
+void
+util_format_latc2_snorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ util_format_rxtc2_snorm_pack_rgba_float(dst_row, dst_stride, src_row, src_stride, width, height, 3);
+}
+
+void
+util_format_latc2_snorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ int8_t tmp_r, tmp_g;
+
+ u_format_signed_fetch_texel_rgtc(0, (int8_t *)src, i, j, &tmp_r, 2);
+ u_format_signed_fetch_texel_rgtc(0, (int8_t *)src + 8, i, j, &tmp_g, 2);
+ dst[0] =
+ dst[1] =
+ dst[2] = byte_to_float_tex(tmp_r);
+ dst[3] = byte_to_float_tex(tmp_g);
+}
+
+
+#define TAG(x) u_format_unsigned_##x
+#define TYPE uint8_t
+#define T_MIN 0
+#define T_MAX 255
+
+#include "../../../mesa/main/texcompress_rgtc_tmp.h"
+
+#undef TYPE
+#undef TAG
+#undef T_MIN
+#undef T_MAX
+
+
+#define TAG(x) u_format_signed_##x
+#define TYPE int8_t
+#define T_MIN (int8_t)-128
+#define T_MAX (int8_t)127
+
+#include "../../../mesa/main/texcompress_rgtc_tmp.h"
+
+#undef TYPE
+#undef TAG
+#undef T_MIN
+#undef T_MAX
diff --git a/src/gallium/auxiliary/util/u_format_latc.h b/src/gallium/auxiliary/util/u_format_latc.h
new file mode 100644
index 00000000000..1f08887533d
--- /dev/null
+++ b/src/gallium/auxiliary/util/u_format_latc.h
@@ -0,0 +1,108 @@
+/**************************************************************************
+ *
+ * Copyright 2011 Red Hat Inc.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE COPYRIGHT HOLDERS, AUTHORS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM,
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
+ * USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ **************************************************************************/
+
+#ifndef U_FORMAT_LATC_H_
+#define U_FORMAT_LATC_H_
+
+void
+util_format_latc1_unorm_fetch_rgba_8unorm(uint8_t *dst, const uint8_t *src, unsigned i, unsigned j);
+
+void
+util_format_latc1_unorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
+
+void
+util_format_latc1_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
+
+void
+util_format_latc1_unorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
+
+void
+util_format_latc1_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height);
+
+void
+util_format_latc1_unorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j);
+
+
+
+void
+util_format_latc1_snorm_fetch_rgba_8unorm(uint8_t *dst, const uint8_t *src, unsigned i, unsigned j);
+
+void
+util_format_latc1_snorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
+
+void
+util_format_latc1_snorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
+
+void
+util_format_latc1_snorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height);
+
+void
+util_format_latc1_snorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
+
+void
+util_format_latc1_snorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j);
+
+
+void
+util_format_latc2_unorm_fetch_rgba_8unorm(uint8_t *dst, const uint8_t *src, unsigned i, unsigned j);
+
+void
+util_format_latc2_unorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
+
+void
+util_format_latc2_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
+
+void
+util_format_latc2_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height);
+
+void
+util_format_latc2_unorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
+
+void
+util_format_latc2_unorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j);
+
+
+void
+util_format_latc2_snorm_fetch_rgba_8unorm(uint8_t *dst, const uint8_t *src, unsigned i, unsigned j);
+
+void
+util_format_latc2_snorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
+
+void
+util_format_latc2_snorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
+
+void
+util_format_latc2_snorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
+
+void
+util_format_latc2_snorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height);
+
+void
+util_format_latc2_snorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j);
+
+
+#endif
diff --git a/src/gallium/auxiliary/util/u_format_pack.py b/src/gallium/auxiliary/util/u_format_pack.py
index 6d0016c0ad8..cc173f808ae 100644
--- a/src/gallium/auxiliary/util/u_format_pack.py
+++ b/src/gallium/auxiliary/util/u_format_pack.py
@@ -632,7 +632,7 @@ def generate_format_fetch(format, dst_channel, dst_native_type, dst_suffix):
def is_format_hand_written(format):
- return format.layout in ('s3tc', 'subsampled', 'other') or format.colorspace == ZS
+ return format.layout in ('s3tc', 'rgtc', 'subsampled', 'other') or format.colorspace == ZS
def generate(formats):
diff --git a/src/gallium/auxiliary/util/u_format_rgtc.c b/src/gallium/auxiliary/util/u_format_rgtc.c
new file mode 100644
index 00000000000..c929fd47e99
--- /dev/null
+++ b/src/gallium/auxiliary/util/u_format_rgtc.c
@@ -0,0 +1,464 @@
+/**************************************************************************
+ *
+ * Copyright (C) 2011 Red Hat Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+#include <stdio.h>
+#include "u_math.h"
+#include "u_format.h"
+#include "u_format_rgtc.h"
+
+static void u_format_unsigned_encode_rgtc_chan(uint8_t *blkaddr, uint8_t srccolors[4][4],
+ int numxpixels, int numypixels);
+
+static void u_format_unsigned_fetch_texel_rgtc(unsigned srcRowStride, const uint8_t *pixdata,
+ unsigned i, unsigned j, uint8_t *value, unsigned comps);
+
+static void u_format_signed_encode_rgtc_chan(int8_t *blkaddr, int8_t srccolors[4][4],
+ int numxpixels, int numypixels);
+
+static void u_format_signed_fetch_texel_rgtc(unsigned srcRowStride, const int8_t *pixdata,
+ unsigned i, unsigned j, int8_t *value, unsigned comps);
+
+void
+util_format_rgtc1_unorm_fetch_rgba_8unorm(uint8_t *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ u_format_unsigned_fetch_texel_rgtc(0, src, i, j, dst, 1);
+}
+
+void
+util_format_rgtc1_unorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ const unsigned bw = 4, bh = 4, comps = 4;
+ unsigned x, y, i, j;
+ unsigned block_size = 8;
+
+ for(y = 0; y < height; y += bh) {
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += bw) {
+ for(j = 0; j < bh; ++j) {
+ for(i = 0; i < bw; ++i) {
+ uint8_t *dst = dst_row + (y + j)*dst_stride/sizeof(*dst_row) + (x + i)*comps;
+ u_format_unsigned_fetch_texel_rgtc(0, src, i, j, dst, 1);
+ }
+ }
+ src += block_size;
+ }
+ src_row += src_stride;
+ }
+}
+
+void
+util_format_rgtc1_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row,
+ unsigned src_stride, unsigned width, unsigned height)
+{
+ const unsigned bw = 4, bh = 4, bytes_per_block = 8;
+ unsigned x, y, i, j;
+
+ for(y = 0; y < height; y += bh) {
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += bw) {
+ uint8_t tmp[4][4]; /* [bh][bw][comps] */
+ for(j = 0; j < bh; ++j) {
+ for(i = 0; i < bw; ++i) {
+ tmp[j][i] = src_row[(y + j)*src_stride/sizeof(*src_row) + (x + i)*4];
+ }
+ }
+ u_format_unsigned_encode_rgtc_chan(dst, tmp, 4, 4);
+ dst += bytes_per_block;
+ }
+ dst_row += dst_stride / sizeof(*dst_row);
+ }
+}
+
+void
+util_format_rgtc1_unorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y, i, j;
+ int block_size = 8;
+ for(y = 0; y < height; y += 4) {
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 4) {
+ for(j = 0; j < 4; ++j) {
+ for(i = 0; i < 4; ++i) {
+ float *dst = dst_row + (y + j)*dst_stride/sizeof(*dst_row) + (x + i)*4;
+ uint8_t tmp_r;
+ u_format_unsigned_fetch_texel_rgtc(0, src, i, j, &tmp_r, 1);
+ dst[0] = ubyte_to_float(tmp_r);
+ dst[1] = 0.0;
+ dst[2] = 0.0;
+ dst[3] = 1.0;
+ }
+ }
+ src += block_size;
+ }
+ src_row += src_stride;
+ }
+}
+
+void
+util_format_rgtc1_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ const unsigned bw = 4, bh = 4, bytes_per_block = 8;
+ unsigned x, y, i, j;
+
+ for(y = 0; y < height; y += bh) {
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += bw) {
+ uint8_t tmp[4][4]; /* [bh][bw][comps] */
+ for(j = 0; j < bh; ++j) {
+ for(i = 0; i < bw; ++i) {
+ tmp[j][i] = float_to_ubyte(src_row[(y + j)*src_stride/sizeof(*src_row) + (x + i)*4]);
+ }
+ }
+ u_format_unsigned_encode_rgtc_chan(dst, tmp, 4, 4);
+ dst += bytes_per_block;
+ }
+ dst_row += dst_stride / sizeof(*dst_row);
+ }
+}
+
+void
+util_format_rgtc1_unorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ uint8_t tmp_r;
+ u_format_unsigned_fetch_texel_rgtc(0, src, i, j, &tmp_r, 1);
+ dst[0] = ubyte_to_float(tmp_r);
+ dst[1] = 0.0;
+ dst[2] = 0.0;
+ dst[3] = 1.0;
+}
+
+void
+util_format_rgtc1_snorm_fetch_rgba_8unorm(uint8_t *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ fprintf(stderr,"%s\n", __func__);
+}
+
+void
+util_format_rgtc1_snorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ fprintf(stderr,"%s\n", __func__);
+}
+
+void
+util_format_rgtc1_snorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ fprintf(stderr,"%s\n", __func__);
+}
+
+void
+util_format_rgtc1_snorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ const unsigned bw = 4, bh = 4, bytes_per_block = 8;
+ unsigned x, y, i, j;
+
+ for(y = 0; y < height; y += bh) {
+ int8_t *dst = (int8_t *)dst_row;
+ for(x = 0; x < width; x += bw) {
+ int8_t tmp[4][4]; /* [bh][bw][comps] */
+ for(j = 0; j < bh; ++j) {
+ for(i = 0; i < bw; ++i) {
+ tmp[j][i] = float_to_byte_tex(src_row[(y + j)*src_stride/sizeof(*src_row) + (x + i)*4]);
+ }
+ }
+ u_format_signed_encode_rgtc_chan(dst, tmp, 4, 4);
+ dst += bytes_per_block;
+ }
+ dst_row += dst_stride / sizeof(*dst_row);
+ }
+}
+
+void
+util_format_rgtc1_snorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y, i, j;
+ int block_size = 8;
+ for(y = 0; y < height; y += 4) {
+ const int8_t *src = (int8_t *)src_row;
+ for(x = 0; x < width; x += 4) {
+ for(j = 0; j < 4; ++j) {
+ for(i = 0; i < 4; ++i) {
+ float *dst = dst_row + (y + j)*dst_stride/sizeof(*dst_row) + (x + i)*4;
+ int8_t tmp_r;
+ u_format_signed_fetch_texel_rgtc(0, src, i, j, &tmp_r, 1);
+ dst[0] = byte_to_float_tex(tmp_r);
+ dst[1] = 0.0;
+ dst[2] = 0.0;
+ dst[3] = 1.0;
+ }
+ }
+ src += block_size;
+ }
+ src_row += src_stride;
+ }
+}
+
+void
+util_format_rgtc1_snorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ int8_t tmp_r;
+ u_format_signed_fetch_texel_rgtc(0, (int8_t *)src, i, j, &tmp_r, 1);
+ dst[0] = byte_to_float_tex(tmp_r);
+ dst[1] = 0.0;
+ dst[2] = 0.0;
+ dst[3] = 1.0;
+}
+
+
+void
+util_format_rgtc2_unorm_fetch_rgba_8unorm(uint8_t *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ u_format_unsigned_fetch_texel_rgtc(0, src, i, j, dst, 2);
+ u_format_unsigned_fetch_texel_rgtc(0, src + 8, i, j, dst + 1, 2);
+}
+
+void
+util_format_rgtc2_unorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ const unsigned bw = 4, bh = 4, comps = 4;
+ unsigned x, y, i, j;
+ unsigned block_size = 16;
+
+ for(y = 0; y < height; y += bh) {
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += bw) {
+ for(j = 0; j < bh; ++j) {
+ for(i = 0; i < bw; ++i) {
+ uint8_t *dst = dst_row + (y + j)*dst_stride/sizeof(*dst_row) + (x + i)*comps;
+ u_format_unsigned_fetch_texel_rgtc(0, src, i, j, dst, 2);
+ u_format_unsigned_fetch_texel_rgtc(0, src + 8, i, j, dst + 1, 2);
+
+ }
+ }
+ src += block_size;
+ }
+ src_row += src_stride;
+ }
+}
+
+void
+util_format_rgtc2_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ const unsigned bw = 4, bh = 4, bytes_per_block = 16;
+ unsigned x, y, i, j;
+
+ for(y = 0; y < height; y += bh) {
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += bw) {
+ uint8_t tmp_r[4][4]; /* [bh][bw] */
+ uint8_t tmp_g[4][4]; /* [bh][bw] */
+ for(j = 0; j < bh; ++j) {
+ for(i = 0; i < bw; ++i) {
+ tmp_r[j][i] = src_row[(y + j)*src_stride/sizeof(*src_row) + (x + i)*4];
+ tmp_g[j][i] = src_row[((y + j)*src_stride/sizeof(*src_row) + (x + i)*4) + 1];
+ }
+ }
+ u_format_unsigned_encode_rgtc_chan(dst, tmp_r, 4, 4);
+ u_format_unsigned_encode_rgtc_chan(dst + 8, tmp_g, 4, 4);
+ dst += bytes_per_block;
+ }
+ dst_row += dst_stride / sizeof(*dst_row);
+ }
+}
+
+void
+util_format_rxtc2_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height, unsigned chan2off)
+{
+ const unsigned bw = 4, bh = 4, bytes_per_block = 16;
+ unsigned x, y, i, j;
+
+ for(y = 0; y < height; y += bh) {
+ uint8_t *dst = dst_row;
+ for(x = 0; x < width; x += bw) {
+ uint8_t tmp_r[4][4]; /* [bh][bw][comps] */
+ uint8_t tmp_g[4][4]; /* [bh][bw][comps] */
+ for(j = 0; j < bh; ++j) {
+ for(i = 0; i < bw; ++i) {
+ tmp_r[j][i] = float_to_ubyte(src_row[(y + j)*src_stride/sizeof(*src_row) + (x + i)*4]);
+ tmp_g[j][i] = float_to_ubyte(src_row[(y + j)*src_stride/sizeof(*src_row) + (x + i)*4 + chan2off]);
+ }
+ }
+ u_format_unsigned_encode_rgtc_chan(dst, tmp_r, 4, 4);
+ u_format_unsigned_encode_rgtc_chan(dst + 8, tmp_g, 4, 4);
+ dst += bytes_per_block;
+ }
+ dst_row += dst_stride / sizeof(*dst_row);
+ }
+}
+
+void
+util_format_rgtc2_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ util_format_rxtc2_unorm_pack_rgba_float(dst_row, dst_stride, src_row, src_stride, width, height, 1);
+}
+
+void
+util_format_rgtc2_unorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y, i, j;
+ int block_size = 16;
+ for(y = 0; y < height; y += 4) {
+ const uint8_t *src = src_row;
+ for(x = 0; x < width; x += 4) {
+ for(j = 0; j < 4; ++j) {
+ for(i = 0; i < 4; ++i) {
+ float *dst = dst_row + (y + j)*dst_stride/sizeof(*dst_row) + (x + i)*4;
+ uint8_t tmp_r, tmp_g;
+ u_format_unsigned_fetch_texel_rgtc(0, src, i, j, &tmp_r, 2);
+ u_format_unsigned_fetch_texel_rgtc(0, src + 8, i, j, &tmp_g, 2);
+ dst[0] = ubyte_to_float(tmp_r);
+ dst[1] = ubyte_to_float(tmp_g);
+ dst[2] = 0.0;
+ dst[3] = 1.0;
+ }
+ }
+ src += block_size;
+ }
+ src_row += src_stride;
+ }
+}
+
+void
+util_format_rgtc2_unorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ uint8_t tmp_r, tmp_g;
+ u_format_unsigned_fetch_texel_rgtc(0, src, i, j, &tmp_r, 2);
+ u_format_unsigned_fetch_texel_rgtc(0, src + 8, i, j, &tmp_g, 2);
+ dst[0] = ubyte_to_float(tmp_r);
+ dst[1] = ubyte_to_float(tmp_g);
+ dst[2] = 0.0;
+ dst[3] = 1.0;
+}
+
+
+void
+util_format_rgtc2_snorm_fetch_rgba_8unorm(uint8_t *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ fprintf(stderr,"%s\n", __func__);
+}
+
+void
+util_format_rgtc2_snorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ fprintf(stderr,"%s\n", __func__);
+}
+
+void
+util_format_rgtc2_snorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ fprintf(stderr,"%s\n", __func__);
+}
+
+void
+util_format_rgtc2_snorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ unsigned x, y, i, j;
+ int block_size = 16;
+ for(y = 0; y < height; y += 4) {
+ const int8_t *src = (int8_t *)src_row;
+ for(x = 0; x < width; x += 4) {
+ for(j = 0; j < 4; ++j) {
+ for(i = 0; i < 4; ++i) {
+ float *dst = dst_row + (y + j)*dst_stride/sizeof(*dst_row) + (x + i)*4;
+ int8_t tmp_r, tmp_g;
+ u_format_signed_fetch_texel_rgtc(0, src, i, j, &tmp_r, 2);
+ u_format_signed_fetch_texel_rgtc(0, src + 8, i, j, &tmp_g, 2);
+ dst[0] = byte_to_float_tex(tmp_r);
+ dst[1] = byte_to_float_tex(tmp_g);
+ dst[2] = 0.0;
+ dst[3] = 1.0;
+ }
+ }
+ src += block_size;
+ }
+ src_row += src_stride;
+ }
+}
+
+void
+util_format_rxtc2_snorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height, unsigned chan2off)
+{
+ const unsigned bw = 4, bh = 4, bytes_per_block = 16;
+ unsigned x, y, i, j;
+
+ for(y = 0; y < height; y += bh) {
+ int8_t *dst = (int8_t *)dst_row;
+ for(x = 0; x < width; x += bw) {
+ int8_t tmp_r[4][4]; /* [bh][bw][comps] */
+ int8_t tmp_g[4][4]; /* [bh][bw][comps] */
+ for(j = 0; j < bh; ++j) {
+ for(i = 0; i < bw; ++i) {
+ tmp_r[j][i] = float_to_byte_tex(src_row[(y + j)*src_stride/sizeof(*src_row) + (x + i)*4]);
+ tmp_g[j][i] = float_to_byte_tex(src_row[(y + j)*src_stride/sizeof(*src_row) + (x + i)*4 + chan2off]);
+ }
+ }
+ u_format_signed_encode_rgtc_chan(dst, tmp_r, 4, 4);
+ u_format_signed_encode_rgtc_chan(dst + 8, tmp_g, 4, 4);
+ dst += bytes_per_block;
+ }
+ dst_row += dst_stride / sizeof(*dst_row);
+ }
+}
+
+void
+util_format_rgtc2_snorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height)
+{
+ util_format_rxtc2_snorm_pack_rgba_float(dst_row, dst_stride, src_row, src_stride, width, height, 1);
+}
+
+void
+util_format_rgtc2_snorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j)
+{
+ int8_t tmp_r, tmp_g;
+ u_format_signed_fetch_texel_rgtc(0, (int8_t *)src, i, j, &tmp_r, 2);
+ u_format_signed_fetch_texel_rgtc(0, (int8_t *)src + 8, i, j, &tmp_g, 2);
+ dst[0] = byte_to_float_tex(tmp_r);
+ dst[1] = byte_to_float_tex(tmp_g);
+ dst[2] = 0.0;
+ dst[3] = 1.0;
+}
+
+
+#define TAG(x) u_format_unsigned_##x
+#define TYPE uint8_t
+#define T_MIN 0
+#define T_MAX 255
+
+#include "../../../mesa/main/texcompress_rgtc_tmp.h"
+
+#undef TYPE
+#undef TAG
+#undef T_MIN
+#undef T_MAX
+
+
+#define TAG(x) u_format_signed_##x
+#define TYPE int8_t
+#define T_MIN (int8_t)-128
+#define T_MAX (int8_t)127
+
+#include "../../../mesa/main/texcompress_rgtc_tmp.h"
+
+#undef TYPE
+#undef TAG
+#undef T_MIN
+#undef T_MAX
diff --git a/src/gallium/auxiliary/util/u_format_rgtc.h b/src/gallium/auxiliary/util/u_format_rgtc.h
new file mode 100644
index 00000000000..67ac4728e56
--- /dev/null
+++ b/src/gallium/auxiliary/util/u_format_rgtc.h
@@ -0,0 +1,114 @@
+/**************************************************************************
+ *
+ * Copyright 2011 Red Hat Inc.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE COPYRIGHT HOLDERS, AUTHORS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM,
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
+ * USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ **************************************************************************/
+
+#ifndef U_FORMAT_RGTC_H_
+#define U_FORMAT_RGTC_H_
+
+void
+util_format_rgtc1_unorm_fetch_rgba_8unorm(uint8_t *dst, const uint8_t *src, unsigned i, unsigned j);
+
+void
+util_format_rgtc1_unorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
+
+void
+util_format_rgtc1_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
+
+void
+util_format_rgtc1_unorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
+
+void
+util_format_rgtc1_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height);
+
+void
+util_format_rgtc1_unorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j);
+
+
+
+void
+util_format_rgtc1_snorm_fetch_rgba_8unorm(uint8_t *dst, const uint8_t *src, unsigned i, unsigned j);
+
+void
+util_format_rgtc1_snorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
+
+void
+util_format_rgtc1_snorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
+
+void
+util_format_rgtc1_snorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height);
+
+void
+util_format_rgtc1_snorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
+
+void
+util_format_rgtc1_snorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j);
+
+
+void
+util_format_rgtc2_unorm_fetch_rgba_8unorm(uint8_t *dst, const uint8_t *src, unsigned i, unsigned j);
+
+void
+util_format_rgtc2_unorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
+
+void
+util_format_rgtc2_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
+
+void
+util_format_rxtc2_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height, unsigned chan2off);
+
+void
+util_format_rgtc2_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height);
+
+void
+util_format_rgtc2_unorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
+
+void
+util_format_rgtc2_unorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j);
+
+
+void
+util_format_rgtc2_snorm_fetch_rgba_8unorm(uint8_t *dst, const uint8_t *src, unsigned i, unsigned j);
+
+void
+util_format_rgtc2_snorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
+
+void
+util_format_rgtc2_snorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
+
+void
+util_format_rgtc2_snorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
+
+void
+util_format_rxtc2_snorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height, unsigned chan2off);
+
+void
+util_format_rgtc2_snorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height);
+
+void
+util_format_rgtc2_snorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j);
+
+
+#endif
diff --git a/src/gallium/auxiliary/util/u_format_table.py b/src/gallium/auxiliary/util/u_format_table.py
index 8cc22a56371..55e0f7827ef 100755
--- a/src/gallium/auxiliary/util/u_format_table.py
+++ b/src/gallium/auxiliary/util/u_format_table.py
@@ -87,6 +87,8 @@ def write_format_table(formats):
print
print '#include "u_format.h"'
print '#include "u_format_s3tc.h"'
+ print '#include "u_format_rgtc.h"'
+ print '#include "u_format_latc.h"'
print
u_format_pack.generate(formats)
@@ -132,7 +134,7 @@ def write_format_table(formats):
if format.colorspace != ZS:
print " &util_format_%s_unpack_rgba_8unorm," % format.short_name()
print " &util_format_%s_pack_rgba_8unorm," % format.short_name()
- if format.layout == 's3tc':
+ if format.layout == 's3tc' or format.layout == 'rgtc':
print " &util_format_%s_fetch_rgba_8unorm," % format.short_name()
else:
print " NULL, /* fetch_rgba_8unorm */"
diff --git a/src/gallium/auxiliary/util/u_gen_mipmap.c b/src/gallium/auxiliary/util/u_gen_mipmap.c
index d22ae8b375b..4a1662462e5 100644
--- a/src/gallium/auxiliary/util/u_gen_mipmap.c
+++ b/src/gallium/auxiliary/util/u_gen_mipmap.c
@@ -67,7 +67,7 @@ struct gen_mipmap_state
struct pipe_vertex_element velem[2];
void *vs;
- void *fs1d, *fs2d, *fs3d, *fsCube;
+ void *fs[TGSI_TEXTURE_COUNT]; /**< Not all are used, but simplifies code */
struct pipe_resource *vbuf; /**< quad vertices */
unsigned vbuf_slot;
@@ -1301,27 +1301,6 @@ util_create_gen_mipmap(struct pipe_context *pipe,
ctx->velem[i].src_format = PIPE_FORMAT_R32G32B32A32_FLOAT;
}
- /* vertex shader - still needed to specify mapping from fragment
- * shader input semantics to vertex elements
- */
- {
- const uint semantic_names[] = { TGSI_SEMANTIC_POSITION,
- TGSI_SEMANTIC_GENERIC };
- const uint semantic_indexes[] = { 0, 0 };
- ctx->vs = util_make_vertex_passthrough_shader(pipe, 2, semantic_names,
- semantic_indexes);
- }
-
- /* fragment shader */
- ctx->fs1d = util_make_fragment_tex_shader(pipe, TGSI_TEXTURE_1D,
- TGSI_INTERPOLATE_LINEAR);
- ctx->fs2d = util_make_fragment_tex_shader(pipe, TGSI_TEXTURE_2D,
- TGSI_INTERPOLATE_LINEAR);
- ctx->fs3d = util_make_fragment_tex_shader(pipe, TGSI_TEXTURE_3D,
- TGSI_INTERPOLATE_LINEAR);
- ctx->fsCube = util_make_fragment_tex_shader(pipe, TGSI_TEXTURE_CUBE,
- TGSI_INTERPOLATE_LINEAR);
-
/* vertex data that doesn't change */
for (i = 0; i < 4; i++) {
ctx->vertices[i][0][2] = 0.0f; /* z */
@@ -1336,6 +1315,44 @@ util_create_gen_mipmap(struct pipe_context *pipe,
/**
+ * Helper function to set the fragment shaders.
+ */
+static INLINE void
+set_fragment_shader(struct gen_mipmap_state *ctx, uint type)
+{
+ if (!ctx->fs[type])
+ ctx->fs[type] =
+ util_make_fragment_tex_shader(ctx->pipe, type,
+ TGSI_INTERPOLATE_LINEAR);
+
+ cso_set_fragment_shader_handle(ctx->cso, ctx->fs[type]);
+}
+
+
+/**
+ * Helper function to set the vertex shader.
+ */
+static INLINE void
+set_vertex_shader(struct gen_mipmap_state *ctx)
+{
+ /* vertex shader - still required to provide the linkage between
+ * fragment shader input semantics and vertex_element/buffers.
+ */
+ if (!ctx->vs)
+ {
+ const uint semantic_names[] = { TGSI_SEMANTIC_POSITION,
+ TGSI_SEMANTIC_GENERIC };
+ const uint semantic_indexes[] = { 0, 0 };
+ ctx->vs = util_make_vertex_passthrough_shader(ctx->pipe, 2,
+ semantic_names,
+ semantic_indexes);
+ }
+
+ cso_set_vertex_shader_handle(ctx->cso, ctx->vs);
+}
+
+
+/**
* Get next "slot" of vertex space in the vertex buffer.
* We're allocating one large vertex buffer and using it piece by piece.
*/
@@ -1350,6 +1367,7 @@ get_next_slot(struct gen_mipmap_state *ctx)
if (!ctx->vbuf) {
ctx->vbuf = pipe_buffer_create(ctx->pipe->screen,
PIPE_BIND_VERTEX_BUFFER,
+ PIPE_USAGE_STREAM,
max_slots * sizeof ctx->vertices);
}
@@ -1389,8 +1407,25 @@ set_vertex_data(struct gen_mipmap_state *ctx,
util_map_texcoords2d_onto_cubemap(layer, &st[0][0], 2,
&ctx->vertices[0][1][0], 8);
}
- else {
- /* 1D/2D/3D */
+ else if (tex_target == PIPE_TEXTURE_1D_ARRAY) {
+ /* 1D texture array */
+ ctx->vertices[0][1][0] = 0.0f; /*s*/
+ ctx->vertices[0][1][1] = r; /*t*/
+ ctx->vertices[0][1][2] = 0.0f; /*r*/
+
+ ctx->vertices[1][1][0] = 1.0f;
+ ctx->vertices[1][1][1] = r;
+ ctx->vertices[1][1][2] = 0.0f;
+
+ ctx->vertices[2][1][0] = 1.0f;
+ ctx->vertices[2][1][1] = r;
+ ctx->vertices[2][1][2] = 0.0f;
+
+ ctx->vertices[3][1][0] = 0.0f;
+ ctx->vertices[3][1][1] = r;
+ ctx->vertices[3][1][2] = 0.0f;
+ } else {
+ /* 1D/2D/3D/2D array */
ctx->vertices[0][1][0] = 0.0f; /*s*/
ctx->vertices[0][1][1] = 0.0f; /*t*/
ctx->vertices[0][1][2] = r; /*r*/
@@ -1425,12 +1460,14 @@ void
util_destroy_gen_mipmap(struct gen_mipmap_state *ctx)
{
struct pipe_context *pipe = ctx->pipe;
+ unsigned i;
+
+ for (i = 0; i < Elements(ctx->fs); i++)
+ if (ctx->fs[i])
+ pipe->delete_fs_state(pipe, ctx->fs[i]);
- pipe->delete_fs_state(pipe, ctx->fsCube);
- pipe->delete_fs_state(pipe, ctx->fs3d);
- pipe->delete_fs_state(pipe, ctx->fs2d);
- pipe->delete_fs_state(pipe, ctx->fs1d);
- pipe->delete_vs_state(pipe, ctx->vs);
+ if (ctx->vs)
+ pipe->delete_vs_state(pipe, ctx->vs);
pipe_resource_reference(&ctx->vbuf, NULL);
@@ -1469,9 +1506,9 @@ util_gen_mipmap(struct gen_mipmap_state *ctx,
struct pipe_screen *screen = pipe->screen;
struct pipe_framebuffer_state fb;
struct pipe_resource *pt = psv->texture;
- void *fs;
uint dstLevel;
uint offset;
+ uint type;
/* The texture object should have room for the levels which we're
* about to generate.
@@ -1486,27 +1523,31 @@ util_gen_mipmap(struct gen_mipmap_state *ctx,
switch (pt->target) {
case PIPE_TEXTURE_1D:
- fs = ctx->fs1d;
+ type = TGSI_TEXTURE_1D;
break;
case PIPE_TEXTURE_2D:
- fs = ctx->fs2d;
+ type = TGSI_TEXTURE_2D;
break;
case PIPE_TEXTURE_3D:
- fs = ctx->fs3d;
+ type = TGSI_TEXTURE_3D;
break;
case PIPE_TEXTURE_CUBE:
- fs = ctx->fsCube;
+ type = TGSI_TEXTURE_CUBE;
break;
case PIPE_TEXTURE_1D_ARRAY:
+ type = TGSI_TEXTURE_1D_ARRAY;
+ break;
case PIPE_TEXTURE_2D_ARRAY:
+ type = TGSI_TEXTURE_2D_ARRAY;
+ break;
default:
assert(0);
- fs = ctx->fs2d;
+ type = TGSI_TEXTURE_2D;
}
/* check if we can render in the texture's format */
if (!screen->is_format_supported(screen, psv->format, pt->target,
- pt->nr_samples, PIPE_BIND_RENDER_TARGET, 0)) {
+ pt->nr_samples, PIPE_BIND_RENDER_TARGET)) {
fallback_gen_mipmap(ctx, pt, face, baseLevel, lastLevel);
return;
}
@@ -1531,8 +1572,8 @@ util_gen_mipmap(struct gen_mipmap_state *ctx,
cso_set_clip(ctx->cso, &ctx->clip);
cso_set_vertex_elements(ctx->cso, 2, ctx->velem);
- cso_set_fragment_shader_handle(ctx->cso, fs);
- cso_set_vertex_shader_handle(ctx->cso, ctx->vs);
+ set_fragment_shader(ctx, type);
+ set_vertex_shader(ctx);
/* init framebuffer state */
memset(&fb, 0, sizeof(fb));
@@ -1554,6 +1595,8 @@ util_gen_mipmap(struct gen_mipmap_state *ctx,
if (pt->target == PIPE_TEXTURE_3D)
nr_layers = u_minify(pt->depth0, dstLevel);
+ else if (pt->target == PIPE_TEXTURE_2D_ARRAY || pt->target == PIPE_TEXTURE_1D_ARRAY)
+ nr_layers = pt->array_size;
else
nr_layers = 1;
@@ -1563,11 +1606,12 @@ util_gen_mipmap(struct gen_mipmap_state *ctx,
/* in theory with geom shaders and driver with full layer support
could do that in one go. */
layer = i;
- offset = 1.0f / (float)(nr_layers * 2);
/* XXX hmm really? */
rcoord = (float)layer / (float)nr_layers + 1.0f / (float)(nr_layers * 2);
- }
- else
+ } else if (pt->target == PIPE_TEXTURE_2D_ARRAY || pt->target == PIPE_TEXTURE_1D_ARRAY) {
+ layer = i;
+ rcoord = (float)layer;
+ } else
layer = face;
memset(&surf_templ, 0, sizeof(surf_templ));
@@ -1616,15 +1660,14 @@ util_gen_mipmap(struct gen_mipmap_state *ctx,
face,
rcoord);
- util_draw_vertex_buffer(ctx->pipe,
+ util_draw_vertex_buffer(ctx->pipe,
+ ctx->cso,
ctx->vbuf,
offset,
PIPE_PRIM_TRIANGLE_FAN,
4, /* verts */
2); /* attribs/vert */
- pipe->flush(pipe, PIPE_FLUSH_RENDER_CACHE, NULL);
-
/* need to signal that the texture has changed _after_ rendering to it */
pipe_surface_reference( &surf, NULL );
}
diff --git a/src/gallium/auxiliary/util/u_index_modify.c b/src/gallium/auxiliary/util/u_index_modify.c
index 65b079ed537..d0a28b5fdfa 100644
--- a/src/gallium/auxiliary/util/u_index_modify.c
+++ b/src/gallium/auxiliary/util/u_index_modify.c
@@ -24,26 +24,77 @@
#include "util/u_index_modify.h"
#include "util/u_inlines.h"
+/* Ubyte indices. */
+
+void util_shorten_ubyte_elts_to_userptr(struct pipe_context *context,
+ struct pipe_resource *elts,
+ int index_bias,
+ unsigned start,
+ unsigned count,
+ void *out)
+{
+ struct pipe_transfer *src_transfer;
+ unsigned char *in_map;
+ unsigned short *out_map = out;
+ unsigned i;
+
+ in_map = pipe_buffer_map(context, elts,
+ PIPE_TRANSFER_READ |
+ PIPE_TRANSFER_UNSYNCHRONIZED,
+ &src_transfer);
+ in_map += start;
+
+ for (i = 0; i < count; i++) {
+ *out_map = (unsigned short)(*in_map + index_bias);
+ in_map++;
+ out_map++;
+ }
+
+ pipe_buffer_unmap(context, src_transfer);
+}
+
void util_shorten_ubyte_elts(struct pipe_context *context,
struct pipe_resource **elts,
int index_bias,
unsigned start,
unsigned count)
{
- struct pipe_screen* screen = context->screen;
struct pipe_resource* new_elts;
- unsigned char *in_map;
unsigned short *out_map;
- struct pipe_transfer *src_transfer, *dst_transfer;
- unsigned i;
+ struct pipe_transfer *dst_transfer;
- new_elts = pipe_buffer_create(screen,
+ new_elts = pipe_buffer_create(context->screen,
PIPE_BIND_INDEX_BUFFER,
+ PIPE_USAGE_STATIC,
2 * count);
- in_map = pipe_buffer_map(context, *elts, PIPE_TRANSFER_READ, &src_transfer);
- out_map = pipe_buffer_map(context, new_elts, PIPE_TRANSFER_WRITE, &dst_transfer);
+ out_map = pipe_buffer_map(context, new_elts, PIPE_TRANSFER_WRITE,
+ &dst_transfer);
+ util_shorten_ubyte_elts_to_userptr(context, *elts, index_bias,
+ start, count, out_map);
+ pipe_buffer_unmap(context, dst_transfer);
+
+ *elts = new_elts;
+}
+
+
+/* Ushort indices. */
+void util_rebuild_ushort_elts_to_userptr(struct pipe_context *context,
+ struct pipe_resource *elts,
+ int index_bias,
+ unsigned start, unsigned count,
+ void *out)
+{
+ struct pipe_transfer *in_transfer = NULL;
+ unsigned short *in_map;
+ unsigned short *out_map = out;
+ unsigned i;
+
+ in_map = pipe_buffer_map(context, elts,
+ PIPE_TRANSFER_READ |
+ PIPE_TRANSFER_UNSYNCHRONIZED,
+ &in_transfer);
in_map += start;
for (i = 0; i < count; i++) {
@@ -52,10 +103,7 @@ void util_shorten_ubyte_elts(struct pipe_context *context,
out_map++;
}
- pipe_buffer_unmap(context, *elts, src_transfer);
- pipe_buffer_unmap(context, new_elts, dst_transfer);
-
- *elts = new_elts;
+ pipe_buffer_unmap(context, in_transfer);
}
void util_rebuild_ushort_elts(struct pipe_context *context,
@@ -63,33 +111,51 @@ void util_rebuild_ushort_elts(struct pipe_context *context,
int index_bias,
unsigned start, unsigned count)
{
- struct pipe_transfer *in_transfer = NULL;
struct pipe_transfer *out_transfer = NULL;
struct pipe_resource *new_elts;
- unsigned short *in_map;
unsigned short *out_map;
- unsigned i;
new_elts = pipe_buffer_create(context->screen,
PIPE_BIND_INDEX_BUFFER,
+ PIPE_USAGE_STATIC,
2 * count);
- in_map = pipe_buffer_map(context, *elts,
- PIPE_TRANSFER_READ, &in_transfer);
out_map = pipe_buffer_map(context, new_elts,
PIPE_TRANSFER_WRITE, &out_transfer);
+ util_rebuild_ushort_elts_to_userptr(context, *elts, index_bias,
+ start, count, out_map);
+ pipe_buffer_unmap(context, out_transfer);
+
+ *elts = new_elts;
+}
+
+
+/* Uint indices. */
+void util_rebuild_uint_elts_to_userptr(struct pipe_context *context,
+ struct pipe_resource *elts,
+ int index_bias,
+ unsigned start, unsigned count,
+ void *out)
+{
+ struct pipe_transfer *in_transfer = NULL;
+ unsigned int *in_map;
+ unsigned int *out_map = out;
+ unsigned i;
+
+ in_map = pipe_buffer_map(context, elts,
+ PIPE_TRANSFER_READ |
+ PIPE_TRANSFER_UNSYNCHRONIZED,
+ &in_transfer);
in_map += start;
+
for (i = 0; i < count; i++) {
- *out_map = (unsigned short)(*in_map + index_bias);
+ *out_map = (unsigned int)(*in_map + index_bias);
in_map++;
out_map++;
}
- pipe_buffer_unmap(context, *elts, in_transfer);
- pipe_buffer_unmap(context, new_elts, out_transfer);
-
- *elts = new_elts;
+ pipe_buffer_unmap(context, in_transfer);
}
void util_rebuild_uint_elts(struct pipe_context *context,
@@ -97,31 +163,20 @@ void util_rebuild_uint_elts(struct pipe_context *context,
int index_bias,
unsigned start, unsigned count)
{
- struct pipe_transfer *in_transfer = NULL;
struct pipe_transfer *out_transfer = NULL;
struct pipe_resource *new_elts;
- unsigned int *in_map;
unsigned int *out_map;
- unsigned i;
new_elts = pipe_buffer_create(context->screen,
PIPE_BIND_INDEX_BUFFER,
+ PIPE_USAGE_STATIC,
2 * count);
- in_map = pipe_buffer_map(context, *elts,
- PIPE_TRANSFER_READ, &in_transfer);
out_map = pipe_buffer_map(context, new_elts,
PIPE_TRANSFER_WRITE, &out_transfer);
-
- in_map += start;
- for (i = 0; i < count; i++) {
- *out_map = (unsigned int)(*in_map + index_bias);
- in_map++;
- out_map++;
- }
-
- pipe_buffer_unmap(context, *elts, in_transfer);
- pipe_buffer_unmap(context, new_elts, out_transfer);
+ util_rebuild_uint_elts_to_userptr(context, *elts, index_bias,
+ start, count, out_map);
+ pipe_buffer_unmap(context, out_transfer);
*elts = new_elts;
}
diff --git a/src/gallium/auxiliary/util/u_index_modify.h b/src/gallium/auxiliary/util/u_index_modify.h
index 01a6cae94fc..1e9de3dfac8 100644
--- a/src/gallium/auxiliary/util/u_index_modify.h
+++ b/src/gallium/auxiliary/util/u_index_modify.h
@@ -23,19 +23,46 @@
#ifndef UTIL_INDEX_MODIFY_H
#define UTIL_INDEX_MODIFY_H
+struct pipe_context;
+struct pipe_resource;
+
+void util_shorten_ubyte_elts_to_userptr(struct pipe_context *context,
+ struct pipe_resource *elts,
+ int index_bias,
+ unsigned start,
+ unsigned count,
+ void *out);
+
void util_shorten_ubyte_elts(struct pipe_context *context,
struct pipe_resource **elts,
int index_bias,
unsigned start,
unsigned count);
+
+
+void util_rebuild_ushort_elts_to_userptr(struct pipe_context *context,
+ struct pipe_resource *elts,
+ int index_bias,
+ unsigned start, unsigned count,
+ void *out);
+
void util_rebuild_ushort_elts(struct pipe_context *context,
struct pipe_resource **elts,
int index_bias,
unsigned start, unsigned count);
+
+
+void util_rebuild_uint_elts_to_userptr(struct pipe_context *context,
+ struct pipe_resource *elts,
+ int index_bias,
+ unsigned start, unsigned count,
+ void *out);
+
void util_rebuild_uint_elts(struct pipe_context *context,
struct pipe_resource **elts,
int index_bias,
unsigned start, unsigned count);
+
#endif
diff --git a/src/gallium/auxiliary/util/u_inlines.h b/src/gallium/auxiliary/util/u_inlines.h
index e55aafe90f0..ddb81b5b957 100644
--- a/src/gallium/auxiliary/util/u_inlines.h
+++ b/src/gallium/auxiliary/util/u_inlines.h
@@ -160,6 +160,21 @@ pipe_surface_init(struct pipe_context *ctx, struct pipe_surface* ps,
pipe_surface_reset(ctx, ps, pt, level, layer, flags);
}
+/* Return true if the surfaces are equal. */
+static INLINE boolean
+pipe_surface_equal(struct pipe_surface *s1, struct pipe_surface *s2)
+{
+ return s1->texture == s2->texture &&
+ s1->format == s2->format &&
+ (s1->texture->target != PIPE_BUFFER ||
+ (s1->u.buf.first_element == s2->u.buf.first_element &&
+ s1->u.buf.last_element == s2->u.buf.last_element)) &&
+ (s1->texture->target == PIPE_BUFFER ||
+ (s1->u.tex.level == s2->u.tex.level &&
+ s1->u.tex.first_layer == s2->u.tex.first_layer &&
+ s1->u.tex.last_layer == s2->u.tex.last_layer));
+}
+
/*
* Convenience wrappers for screen buffer functions.
*/
@@ -167,6 +182,7 @@ pipe_surface_init(struct pipe_context *ctx, struct pipe_surface* ps,
static INLINE struct pipe_resource *
pipe_buffer_create( struct pipe_screen *screen,
unsigned bind,
+ unsigned usage,
unsigned size )
{
struct pipe_resource buffer;
@@ -174,7 +190,7 @@ pipe_buffer_create( struct pipe_screen *screen,
buffer.target = PIPE_BUFFER;
buffer.format = PIPE_FORMAT_R8_UNORM; /* want TYPELESS or similar */
buffer.bind = bind;
- buffer.usage = PIPE_USAGE_DEFAULT;
+ buffer.usage = usage;
buffer.flags = 0;
buffer.width0 = size;
buffer.height0 = 1;
@@ -220,6 +236,7 @@ pipe_buffer_map_range(struct pipe_context *pipe,
map = pipe->transfer_map( pipe, *transfer );
if (map == NULL) {
pipe->transfer_destroy( pipe, *transfer );
+ *transfer = NULL;
return NULL;
}
@@ -242,7 +259,6 @@ pipe_buffer_map(struct pipe_context *pipe,
static INLINE void
pipe_buffer_unmap(struct pipe_context *pipe,
- struct pipe_resource *buf,
struct pipe_transfer *transfer)
{
if (transfer) {
@@ -283,13 +299,20 @@ pipe_buffer_write(struct pipe_context *pipe,
const void *data)
{
struct pipe_box box;
+ unsigned usage = PIPE_TRANSFER_WRITE;
+
+ if (offset == 0 && size == buf->width0) {
+ usage |= PIPE_TRANSFER_DISCARD_WHOLE_RESOURCE;
+ } else {
+ usage |= PIPE_TRANSFER_DISCARD_RANGE;
+ }
u_box_1d(offset, size, &box);
pipe->transfer_inline_write( pipe,
buf,
0,
- PIPE_TRANSFER_WRITE,
+ usage,
&box,
data,
size,
@@ -341,7 +364,7 @@ pipe_buffer_read(struct pipe_context *pipe,
if (map)
memcpy(data, map + offset, size);
- pipe_buffer_unmap(pipe, buf, src_transfer);
+ pipe_buffer_unmap(pipe, src_transfer);
}
static INLINE struct pipe_transfer *
@@ -401,6 +424,34 @@ static INLINE boolean util_get_offset(
}
}
+/**
+ * This function is used to copy an array of pipe_vertex_buffer structures,
+ * while properly referencing the pipe_vertex_buffer::buffer member.
+ *
+ * \sa util_copy_framebuffer_state
+ */
+static INLINE void util_copy_vertex_buffers(struct pipe_vertex_buffer *dst,
+ unsigned *dst_count,
+ const struct pipe_vertex_buffer *src,
+ unsigned src_count)
+{
+ unsigned i;
+
+ /* Reference the buffers of 'src' in 'dst'. */
+ for (i = 0; i < src_count; i++) {
+ pipe_resource_reference(&dst[i].buffer, src[i].buffer);
+ }
+ /* Unreference the rest of the buffers in 'dst'. */
+ for (; i < *dst_count; i++) {
+ pipe_resource_reference(&dst[i].buffer, NULL);
+ }
+
+ /* Update the size of 'dst' and copy over the other members
+ * of pipe_vertex_buffer. */
+ *dst_count = src_count;
+ memcpy(dst, src, src_count * sizeof(struct pipe_vertex_buffer));
+}
+
#ifdef __cplusplus
}
#endif
diff --git a/src/gallium/auxiliary/util/u_math.h b/src/gallium/auxiliary/util/u_math.h
index cfcb9cd857b..00653562ade 100644
--- a/src/gallium/auxiliary/util/u_math.h
+++ b/src/gallium/auxiliary/util/u_math.h
@@ -176,7 +176,7 @@ static INLINE float logf( float f )
#define isfinite(x) _finite((double)(x))
#define isnan(x) _isnan((double)(x))
-#endif
+#endif /* _MSC_VER < 1400 && !defined(__cplusplus) */
static INLINE double log2( double x )
{
@@ -184,6 +184,18 @@ static INLINE double log2( double x )
return log( x ) * invln2;
}
+static INLINE double
+round(double x)
+{
+ return x >= 0.0 ? floor(x + 0.5) : ceil(x - 0.5);
+}
+
+static INLINE float
+roundf(float x)
+{
+ return x >= 0.0f ? floorf(x + 0.5f) : ceilf(x - 0.5f);
+}
+
#endif /* _MSC_VER */
@@ -473,6 +485,17 @@ float_to_ubyte(float f)
}
}
+static INLINE float
+byte_to_float_tex(int8_t b)
+{
+ return (b == -128) ? -1.0F : b * 1.0F / 127.0F;
+}
+
+static INLINE int8_t
+float_to_byte_tex(float f)
+{
+ return (int8_t) (127.0F * f);
+}
/**
* Calc log base 2
diff --git a/src/gallium/auxiliary/util/u_pstipple.c b/src/gallium/auxiliary/util/u_pstipple.c
new file mode 100644
index 00000000000..f79a6938d1d
--- /dev/null
+++ b/src/gallium/auxiliary/util/u_pstipple.c
@@ -0,0 +1,434 @@
+/**************************************************************************
+ *
+ * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
+ * Copyright 2010 VMware, Inc.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The 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.
+ *
+ **************************************************************************/
+
+/**
+ * Polygon stipple helper module. Drivers/GPUs which don't support polygon
+ * stipple natively can use this module to simulate it.
+ *
+ * Basically, modify fragment shader to sample the 32x32 stipple pattern
+ * texture and do a fragment kill for the 'off' bits.
+ *
+ * This was originally a 'draw' module stage, but since we don't need
+ * vertex window coords or anything, it can be a stand-alone utility module.
+ *
+ * Authors: Brian Paul
+ */
+
+
+#include "pipe/p_context.h"
+#include "pipe/p_defines.h"
+#include "pipe/p_shader_tokens.h"
+#include "util/u_inlines.h"
+
+#include "util/u_format.h"
+#include "util/u_memory.h"
+#include "util/u_pstipple.h"
+#include "util/u_sampler.h"
+
+#include "tgsi/tgsi_transform.h"
+#include "tgsi/tgsi_dump.h"
+
+/** Approx number of new tokens for instructions in pstip_transform_inst() */
+#define NUM_NEW_TOKENS 50
+
+
+static void
+util_pstipple_update_stipple_texture(struct pipe_context *pipe,
+ struct pipe_resource *tex,
+ const uint32_t pattern[32])
+{
+ static const uint bit31 = 1 << 31;
+ struct pipe_transfer *transfer;
+ ubyte *data;
+ int i, j;
+
+ /* map texture memory */
+ transfer = pipe_get_transfer(pipe, tex, 0, 0,
+ PIPE_TRANSFER_WRITE, 0, 0, 32, 32);
+ data = pipe->transfer_map(pipe, transfer);
+
+ /*
+ * Load alpha texture.
+ * Note: 0 means keep the fragment, 255 means kill it.
+ * We'll negate the texel value and use KILP which kills if value
+ * is negative.
+ */
+ for (i = 0; i < 32; i++) {
+ for (j = 0; j < 32; j++) {
+ if (pattern[i] & (bit31 >> j)) {
+ /* fragment "on" */
+ data[i * transfer->stride + j] = 0;
+ }
+ else {
+ /* fragment "off" */
+ data[i * transfer->stride + j] = 255;
+ }
+ }
+ }
+
+ /* unmap */
+ pipe->transfer_unmap(pipe, transfer);
+ pipe->transfer_destroy(pipe, transfer);
+}
+
+
+/**
+ * Create a 32x32 alpha8 texture that encodes the given stipple pattern.
+ */
+struct pipe_resource *
+util_pstipple_create_stipple_texture(struct pipe_context *pipe,
+ const uint32_t pattern[32])
+{
+ struct pipe_screen *screen = pipe->screen;
+ struct pipe_resource templat, *tex;
+
+ memset(&templat, 0, sizeof(templat));
+ templat.target = PIPE_TEXTURE_2D;
+ templat.format = PIPE_FORMAT_A8_UNORM;
+ templat.last_level = 0;
+ templat.width0 = 32;
+ templat.height0 = 32;
+ templat.depth0 = 1;
+ templat.array_size = 1;
+ templat.bind = PIPE_BIND_SAMPLER_VIEW;
+
+ tex = screen->resource_create(screen, &templat);
+
+ if (tex)
+ util_pstipple_update_stipple_texture(pipe, tex, pattern);
+
+ return tex;
+}
+
+
+/**
+ * Create sampler view to sample the stipple texture.
+ */
+struct pipe_sampler_view *
+util_pstipple_create_sampler_view(struct pipe_context *pipe,
+ struct pipe_resource *tex)
+{
+ struct pipe_sampler_view templat, *sv;
+
+ u_sampler_view_default_template(&templat, tex, tex->format);
+ sv = pipe->create_sampler_view(pipe, tex, &templat);
+
+ return sv;
+}
+
+
+/**
+ * Create the sampler CSO that'll be used for stippling.
+ */
+void *
+util_pstipple_create_sampler(struct pipe_context *pipe)
+{
+ struct pipe_sampler_state templat;
+ void *s;
+
+ memset(&templat, 0, sizeof(templat));
+ templat.wrap_s = PIPE_TEX_WRAP_REPEAT;
+ templat.wrap_t = PIPE_TEX_WRAP_REPEAT;
+ templat.wrap_r = PIPE_TEX_WRAP_REPEAT;
+ templat.min_mip_filter = PIPE_TEX_MIPFILTER_NONE;
+ templat.min_img_filter = PIPE_TEX_FILTER_NEAREST;
+ templat.mag_img_filter = PIPE_TEX_FILTER_NEAREST;
+ templat.normalized_coords = 1;
+ templat.min_lod = 0.0f;
+ templat.max_lod = 0.0f;
+
+ s = pipe->create_sampler_state(pipe, &templat);
+ return s;
+}
+
+
+
+/**
+ * Subclass of tgsi_transform_context, used for transforming the
+ * user's fragment shader to add the extra texture sample and fragment kill
+ * instructions.
+ */
+struct pstip_transform_context {
+ struct tgsi_transform_context base;
+ uint tempsUsed; /**< bitmask */
+ int wincoordInput;
+ int maxInput;
+ uint samplersUsed; /**< bitfield of samplers used */
+ int freeSampler; /** an available sampler for the pstipple */
+ int texTemp; /**< temp registers */
+ int numImmed;
+ boolean firstInstruction;
+};
+
+
+/**
+ * TGSI declaration transform callback.
+ * Look for a free sampler, a free input attrib, and two free temp regs.
+ */
+static void
+pstip_transform_decl(struct tgsi_transform_context *ctx,
+ struct tgsi_full_declaration *decl)
+{
+ struct pstip_transform_context *pctx =
+ (struct pstip_transform_context *) ctx;
+
+ if (decl->Declaration.File == TGSI_FILE_SAMPLER) {
+ uint i;
+ for (i = decl->Range.First;
+ i <= decl->Range.Last; i++) {
+ pctx->samplersUsed |= 1 << i;
+ }
+ }
+ else if (decl->Declaration.File == TGSI_FILE_INPUT) {
+ pctx->maxInput = MAX2(pctx->maxInput, (int) decl->Range.Last);
+ if (decl->Semantic.Name == TGSI_SEMANTIC_POSITION)
+ pctx->wincoordInput = (int) decl->Range.First;
+ }
+ else if (decl->Declaration.File == TGSI_FILE_TEMPORARY) {
+ uint i;
+ for (i = decl->Range.First;
+ i <= decl->Range.Last; i++) {
+ pctx->tempsUsed |= (1 << i);
+ }
+ }
+
+ ctx->emit_declaration(ctx, decl);
+}
+
+
+static void
+pstip_transform_immed(struct tgsi_transform_context *ctx,
+ struct tgsi_full_immediate *immed)
+{
+ struct pstip_transform_context *pctx =
+ (struct pstip_transform_context *) ctx;
+ pctx->numImmed++;
+}
+
+
+/**
+ * Find the lowest zero bit in the given word, or -1 if bitfield is all ones.
+ */
+static int
+free_bit(uint bitfield)
+{
+ return ffs(~bitfield) - 1;
+}
+
+
+/**
+ * TGSI instruction transform callback.
+ * Replace writes to result.color w/ a temp reg.
+ * Upon END instruction, insert texture sampling code for antialiasing.
+ */
+static void
+pstip_transform_inst(struct tgsi_transform_context *ctx,
+ struct tgsi_full_instruction *inst)
+{
+ struct pstip_transform_context *pctx =
+ (struct pstip_transform_context *) ctx;
+
+ if (pctx->firstInstruction) {
+ /* emit our new declarations before the first instruction */
+
+ struct tgsi_full_declaration decl;
+ struct tgsi_full_instruction newInst;
+ uint i;
+ int wincoordInput;
+
+ /* find free sampler */
+ pctx->freeSampler = free_bit(pctx->samplersUsed);
+ if (pctx->freeSampler >= PIPE_MAX_SAMPLERS)
+ pctx->freeSampler = PIPE_MAX_SAMPLERS - 1;
+
+ if (pctx->wincoordInput < 0)
+ wincoordInput = pctx->maxInput + 1;
+ else
+ wincoordInput = pctx->wincoordInput;
+
+ /* find one free temp reg */
+ for (i = 0; i < 32; i++) {
+ if ((pctx->tempsUsed & (1 << i)) == 0) {
+ /* found a free temp */
+ if (pctx->texTemp < 0)
+ pctx->texTemp = i;
+ else
+ break;
+ }
+ }
+ assert(pctx->texTemp >= 0);
+
+ if (pctx->wincoordInput < 0) {
+ /* declare new position input reg */
+ decl = tgsi_default_full_declaration();
+ decl.Declaration.File = TGSI_FILE_INPUT;
+ decl.Declaration.Interpolate = TGSI_INTERPOLATE_LINEAR;
+ decl.Declaration.Semantic = 1;
+ decl.Semantic.Name = TGSI_SEMANTIC_POSITION;
+ decl.Semantic.Index = 0;
+ decl.Range.First =
+ decl.Range.Last = wincoordInput;
+ ctx->emit_declaration(ctx, &decl);
+ }
+
+ /* declare new sampler */
+ decl = tgsi_default_full_declaration();
+ decl.Declaration.File = TGSI_FILE_SAMPLER;
+ decl.Range.First =
+ decl.Range.Last = pctx->freeSampler;
+ ctx->emit_declaration(ctx, &decl);
+
+ /* declare new temp regs */
+ decl = tgsi_default_full_declaration();
+ decl.Declaration.File = TGSI_FILE_TEMPORARY;
+ decl.Range.First =
+ decl.Range.Last = pctx->texTemp;
+ ctx->emit_declaration(ctx, &decl);
+
+ /* emit immediate = {1/32, 1/32, 1, 1}
+ * The index/position of this immediate will be pctx->numImmed
+ */
+ {
+ static const float value[4] = { 1.0/32, 1.0/32, 1.0, 1.0 };
+ struct tgsi_full_immediate immed;
+ uint size = 4;
+ immed = tgsi_default_full_immediate();
+ immed.Immediate.NrTokens = 1 + size; /* one for the token itself */
+ immed.u[0].Float = value[0];
+ immed.u[1].Float = value[1];
+ immed.u[2].Float = value[2];
+ immed.u[3].Float = value[3];
+ ctx->emit_immediate(ctx, &immed);
+ }
+
+ pctx->firstInstruction = FALSE;
+
+
+ /*
+ * Insert new MUL/TEX/KILP instructions at start of program
+ * Take gl_FragCoord, divide by 32 (stipple size), sample the
+ * texture and kill fragment if needed.
+ *
+ * We'd like to use non-normalized texcoords to index into a RECT
+ * texture, but we can only use REPEAT wrap mode with normalized
+ * texcoords. Darn.
+ */
+
+ /* XXX invert wincoord if origin isn't lower-left... */
+
+ /* MUL texTemp, INPUT[wincoord], 1/32; */
+ newInst = tgsi_default_full_instruction();
+ newInst.Instruction.Opcode = TGSI_OPCODE_MUL;
+ newInst.Instruction.NumDstRegs = 1;
+ newInst.Dst[0].Register.File = TGSI_FILE_TEMPORARY;
+ newInst.Dst[0].Register.Index = pctx->texTemp;
+ newInst.Instruction.NumSrcRegs = 2;
+ newInst.Src[0].Register.File = TGSI_FILE_INPUT;
+ newInst.Src[0].Register.Index = wincoordInput;
+ newInst.Src[1].Register.File = TGSI_FILE_IMMEDIATE;
+ newInst.Src[1].Register.Index = pctx->numImmed;
+ ctx->emit_instruction(ctx, &newInst);
+
+ /* TEX texTemp, texTemp, sampler; */
+ newInst = tgsi_default_full_instruction();
+ newInst.Instruction.Opcode = TGSI_OPCODE_TEX;
+ newInst.Instruction.NumDstRegs = 1;
+ newInst.Dst[0].Register.File = TGSI_FILE_TEMPORARY;
+ newInst.Dst[0].Register.Index = pctx->texTemp;
+ newInst.Instruction.NumSrcRegs = 2;
+ newInst.Instruction.Texture = TRUE;
+ newInst.Texture.Texture = TGSI_TEXTURE_2D;
+ newInst.Src[0].Register.File = TGSI_FILE_TEMPORARY;
+ newInst.Src[0].Register.Index = pctx->texTemp;
+ newInst.Src[1].Register.File = TGSI_FILE_SAMPLER;
+ newInst.Src[1].Register.Index = pctx->freeSampler;
+ ctx->emit_instruction(ctx, &newInst);
+
+ /* KIL -texTemp; # if -texTemp < 0, KILL fragment */
+ newInst = tgsi_default_full_instruction();
+ newInst.Instruction.Opcode = TGSI_OPCODE_KIL;
+ newInst.Instruction.NumDstRegs = 0;
+ newInst.Instruction.NumSrcRegs = 1;
+ newInst.Src[0].Register.File = TGSI_FILE_TEMPORARY;
+ newInst.Src[0].Register.Index = pctx->texTemp;
+ newInst.Src[0].Register.Negate = 1;
+ ctx->emit_instruction(ctx, &newInst);
+ }
+
+ /* emit this instruction */
+ ctx->emit_instruction(ctx, inst);
+}
+
+
+/**
+ * Given a fragment shader, return a new fragment shader which
+ * samples a stipple texture and executes KILL.
+ */
+struct pipe_shader_state *
+util_pstipple_create_fragment_shader(struct pipe_context *pipe,
+ struct pipe_shader_state *fs,
+ unsigned *samplerUnitOut)
+{
+ struct pipe_shader_state *new_fs;
+ struct pstip_transform_context transform;
+ const uint newLen = tgsi_num_tokens(fs->tokens) + NUM_NEW_TOKENS;
+
+ new_fs = MALLOC(sizeof(*new_fs));
+ if (!new_fs)
+ return NULL;
+
+ new_fs->tokens = tgsi_alloc_tokens(newLen);
+ if (!new_fs->tokens) {
+ FREE(new_fs);
+ return NULL;
+ }
+
+ memset(&transform, 0, sizeof(transform));
+ transform.wincoordInput = -1;
+ transform.maxInput = -1;
+ transform.texTemp = -1;
+ transform.firstInstruction = TRUE;
+ transform.base.transform_instruction = pstip_transform_inst;
+ transform.base.transform_declaration = pstip_transform_decl;
+ transform.base.transform_immediate = pstip_transform_immed;
+
+ tgsi_transform_shader(fs->tokens,
+ (struct tgsi_token *) new_fs->tokens,
+ newLen, &transform.base);
+
+#if 0 /* DEBUG */
+ tgsi_dump(fs->tokens, 0);
+ tgsi_dump(pstip_fs.tokens, 0);
+#endif
+
+ assert(transform.freeSampler < PIPE_MAX_SAMPLERS);
+ *samplerUnitOut = transform.freeSampler;
+
+ return new_fs;
+}
+
diff --git a/src/gallium/auxiliary/util/u_pstipple.h b/src/gallium/auxiliary/util/u_pstipple.h
new file mode 100644
index 00000000000..1c2f5f48af4
--- /dev/null
+++ b/src/gallium/auxiliary/util/u_pstipple.h
@@ -0,0 +1,56 @@
+/**************************************************************************
+ *
+ * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
+ * Copyright 2010 VMware, Inc.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The 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 U_PSTIPPLE_H
+#define U_PSTIPPLE_H
+
+#include "pipe/p_compiler.h"
+
+struct pipe_context;
+struct pipe_resource;
+struct pipe_shader_state;
+
+
+extern struct pipe_resource *
+util_pstipple_create_stipple_texture(struct pipe_context *pipe,
+ const uint32_t pattern[32]);
+
+extern struct pipe_sampler_view *
+util_pstipple_create_sampler_view(struct pipe_context *pipe,
+ struct pipe_resource *tex);
+
+extern void *
+util_pstipple_create_sampler(struct pipe_context *pipe);
+
+extern struct pipe_shader_state *
+util_pstipple_create_fragment_shader(struct pipe_context *pipe,
+ struct pipe_shader_state *fs,
+ unsigned *samplerUnitOut);
+
+
+#endif
diff --git a/src/gallium/auxiliary/util/u_resource.c b/src/gallium/auxiliary/util/u_resource.c
index 443c9f8067e..50a7cd4d55b 100644
--- a/src/gallium/auxiliary/util/u_resource.c
+++ b/src/gallium/auxiliary/util/u_resource.c
@@ -24,18 +24,10 @@ void u_resource_destroy_vtbl(struct pipe_screen *screen,
ur->vtbl->resource_destroy(screen, resource);
}
-unsigned u_is_resource_referenced_vtbl( struct pipe_context *pipe,
- struct pipe_resource *resource,
- unsigned level, int layer)
-{
- struct u_resource *ur = u_resource(resource);
- return ur->vtbl->is_resource_referenced(pipe, resource, level, layer);
-}
-
struct pipe_transfer *u_get_transfer_vtbl(struct pipe_context *context,
struct pipe_resource *resource,
unsigned level,
- enum pipe_transfer_usage usage,
+ unsigned usage,
const struct pipe_box *box)
{
struct u_resource *ur = u_resource(resource);
diff --git a/src/gallium/auxiliary/util/u_simple_screen.h b/src/gallium/auxiliary/util/u_simple_screen.h
index 7139aaabc56..7caeb75cd27 100644
--- a/src/gallium/auxiliary/util/u_simple_screen.h
+++ b/src/gallium/auxiliary/util/u_simple_screen.h
@@ -159,7 +159,8 @@ struct pipe_winsys
*/
int (*fence_finish)( struct pipe_winsys *ws,
struct pipe_fence_handle *fence,
- unsigned flag );
+ unsigned flags,
+ uint64_t timeout );
};
diff --git a/src/gallium/auxiliary/util/u_surface.c b/src/gallium/auxiliary/util/u_surface.c
index 4eddd3f519e..9caf76c802b 100644
--- a/src/gallium/auxiliary/util/u_surface.c
+++ b/src/gallium/auxiliary/util/u_surface.c
@@ -84,7 +84,7 @@ util_create_rgba_surface(struct pipe_context *pipe,
/* Choose surface format */
for (i = 0; rgbaFormats[i]; i++) {
if (screen->is_format_supported(screen, rgbaFormats[i],
- target, 0, bind, 0)) {
+ target, 0, bind)) {
format = rgbaFormats[i];
break;
}
diff --git a/src/gallium/auxiliary/util/u_tile.c b/src/gallium/auxiliary/util/u_tile.c
index 44cadbfcdd0..e3c7085ba92 100644
--- a/src/gallium/auxiliary/util/u_tile.c
+++ b/src/gallium/auxiliary/util/u_tile.c
@@ -367,47 +367,19 @@ pipe_get_tile_rgba(struct pipe_context *pipe,
uint x, uint y, uint w, uint h,
float *p)
{
- unsigned dst_stride = w * 4;
- void *packed;
- enum pipe_format format = pt->resource->format;
-
- if (u_clip_tile(x, y, &w, &h, &pt->box))
- return;
-
- packed = MALLOC(util_format_get_nblocks(format, w, h) * util_format_get_blocksize(format));
-
- if (!packed)
- return;
-
- if(format == PIPE_FORMAT_UYVY || format == PIPE_FORMAT_YUYV)
- assert((x & 1) == 0);
-
- pipe_get_tile_raw(pipe, pt, x, y, w, h, packed, 0);
-
- pipe_tile_raw_to_rgba(format, packed, w, h, p, dst_stride);
-
- FREE(packed);
+ pipe_get_tile_rgba_format(pipe, pt, x, y, w, h, pt->resource->format, p);
}
void
-pipe_get_tile_swizzle(struct pipe_context *pipe,
- struct pipe_transfer *pt,
- uint x,
- uint y,
- uint w,
- uint h,
- uint swizzle_r,
- uint swizzle_g,
- uint swizzle_b,
- uint swizzle_a,
- enum pipe_format format,
- float *p)
+pipe_get_tile_rgba_format(struct pipe_context *pipe,
+ struct pipe_transfer *pt,
+ uint x, uint y, uint w, uint h,
+ enum pipe_format format,
+ float *p)
{
unsigned dst_stride = w * 4;
void *packed;
- uint iy;
- float rgba01[6];
if (u_clip_tile(x, y, &w, &h, &pt->box)) {
return;
@@ -427,35 +399,6 @@ pipe_get_tile_swizzle(struct pipe_context *pipe,
pipe_tile_raw_to_rgba(format, packed, w, h, p, dst_stride);
FREE(packed);
-
- if (swizzle_r == PIPE_SWIZZLE_RED &&
- swizzle_g == PIPE_SWIZZLE_GREEN &&
- swizzle_b == PIPE_SWIZZLE_BLUE &&
- swizzle_a == PIPE_SWIZZLE_ALPHA) {
- /* no-op, skip */
- return;
- }
-
- rgba01[PIPE_SWIZZLE_ZERO] = 0.0f;
- rgba01[PIPE_SWIZZLE_ONE] = 1.0f;
-
- for (iy = 0; iy < h; iy++) {
- float *row = p;
- uint ix;
-
- for (ix = 0; ix < w; ix++) {
- rgba01[PIPE_SWIZZLE_RED] = row[0];
- rgba01[PIPE_SWIZZLE_GREEN] = row[1];
- rgba01[PIPE_SWIZZLE_BLUE] = row[2];
- rgba01[PIPE_SWIZZLE_ALPHA] = row[3];
-
- *row++ = rgba01[swizzle_r];
- *row++ = rgba01[swizzle_g];
- *row++ = rgba01[swizzle_b];
- *row++ = rgba01[swizzle_a];
- }
- p += dst_stride;
- }
}
@@ -465,9 +408,19 @@ pipe_put_tile_rgba(struct pipe_context *pipe,
uint x, uint y, uint w, uint h,
const float *p)
{
+ pipe_put_tile_rgba_format(pipe, pt, x, y, w, h, pt->resource->format, p);
+}
+
+
+void
+pipe_put_tile_rgba_format(struct pipe_context *pipe,
+ struct pipe_transfer *pt,
+ uint x, uint y, uint w, uint h,
+ enum pipe_format format,
+ const float *p)
+{
unsigned src_stride = w * 4;
void *packed;
- enum pipe_format format = pt->resource->format;
if (u_clip_tile(x, y, &w, &h, &pt->box))
return;
diff --git a/src/gallium/auxiliary/util/u_tile.h b/src/gallium/auxiliary/util/u_tile.h
index 558351d0ce5..0ba274308fe 100644
--- a/src/gallium/auxiliary/util/u_tile.h
+++ b/src/gallium/auxiliary/util/u_tile.h
@@ -80,18 +80,11 @@ pipe_get_tile_rgba(struct pipe_context *pipe,
float *p);
void
-pipe_get_tile_swizzle(struct pipe_context *pipe,
- struct pipe_transfer *pt,
- uint x,
- uint y,
- uint w,
- uint h,
- uint swizzle_r,
- uint swizzle_g,
- uint swizzle_b,
- uint swizzle_a,
- enum pipe_format format,
- float *p);
+pipe_get_tile_rgba_format(struct pipe_context *pipe,
+ struct pipe_transfer *pt,
+ uint x, uint y, uint w, uint h,
+ enum pipe_format format,
+ float *p);
void
pipe_put_tile_rgba(struct pipe_context *pipe,
@@ -99,6 +92,13 @@ pipe_put_tile_rgba(struct pipe_context *pipe,
uint x, uint y, uint w, uint h,
const float *p);
+void
+pipe_put_tile_rgba_format(struct pipe_context *pipe,
+ struct pipe_transfer *pt,
+ uint x, uint y, uint w, uint h,
+ enum pipe_format format,
+ const float *p);
+
void
pipe_get_tile_z(struct pipe_context *pipe,
diff --git a/src/gallium/auxiliary/util/u_transfer.c b/src/gallium/auxiliary/util/u_transfer.c
index e2828cfd99e..7e72a59ee00 100644
--- a/src/gallium/auxiliary/util/u_transfer.c
+++ b/src/gallium/auxiliary/util/u_transfer.c
@@ -73,13 +73,6 @@ void u_default_transfer_flush_region( struct pipe_context *pipe,
*/
}
-unsigned u_default_is_resource_referenced( struct pipe_context *pipe,
- struct pipe_resource *resource,
- unsigned level, int layer)
-{
- return 0;
-}
-
struct pipe_transfer * u_default_get_transfer(struct pipe_context *context,
struct pipe_resource *resource,
unsigned level,
@@ -112,3 +105,10 @@ void u_default_transfer_destroy(struct pipe_context *pipe,
FREE(transfer);
}
+void u_default_redefine_user_buffer(struct pipe_context *ctx,
+ struct pipe_resource *resource,
+ unsigned offset,
+ unsigned size)
+{
+ resource->width0 = MAX2(resource->width0, offset + size);
+}
diff --git a/src/gallium/auxiliary/util/u_transfer.h b/src/gallium/auxiliary/util/u_transfer.h
index 3412e13c3cc..5b5ddeb4aba 100644
--- a/src/gallium/auxiliary/util/u_transfer.h
+++ b/src/gallium/auxiliary/util/u_transfer.h
@@ -27,10 +27,6 @@ void u_default_transfer_flush_region( struct pipe_context *pipe,
struct pipe_transfer *transfer,
const struct pipe_box *box);
-unsigned u_default_is_resource_referenced( struct pipe_context *pipe,
- struct pipe_resource *resource,
- unsigned level, int layer);
-
struct pipe_transfer * u_default_get_transfer(struct pipe_context *context,
struct pipe_resource *resource,
unsigned level,
@@ -57,10 +53,6 @@ struct u_resource_vtbl {
void (*resource_destroy)(struct pipe_screen *,
struct pipe_resource *pt);
- unsigned (*is_resource_referenced)(struct pipe_context *pipe,
- struct pipe_resource *texture,
- unsigned level, int layer);
-
struct pipe_transfer *(*get_transfer)(struct pipe_context *,
struct pipe_resource *resource,
unsigned level,
@@ -93,7 +85,7 @@ struct u_resource_vtbl {
struct u_resource {
struct pipe_resource b;
- struct u_resource_vtbl *vtbl;
+ const struct u_resource_vtbl *vtbl;
};
@@ -104,10 +96,6 @@ boolean u_resource_get_handle_vtbl(struct pipe_screen *screen,
void u_resource_destroy_vtbl(struct pipe_screen *screen,
struct pipe_resource *resource);
-unsigned u_is_resource_referenced_vtbl( struct pipe_context *pipe,
- struct pipe_resource *resource,
- unsigned level, int layer);
-
struct pipe_transfer *u_get_transfer_vtbl(struct pipe_context *context,
struct pipe_resource *resource,
unsigned level,
@@ -136,11 +124,9 @@ void u_transfer_inline_write_vtbl( struct pipe_context *rm_ctx,
unsigned stride,
unsigned layer_stride);
-
-
-
-
-
-
+void u_default_redefine_user_buffer(struct pipe_context *ctx,
+ struct pipe_resource *resource,
+ unsigned offset,
+ unsigned size);
#endif
diff --git a/src/gallium/auxiliary/util/u_upload_mgr.c b/src/gallium/auxiliary/util/u_upload_mgr.c
index af229e61a00..9562acb8210 100644
--- a/src/gallium/auxiliary/util/u_upload_mgr.c
+++ b/src/gallium/auxiliary/util/u_upload_mgr.c
@@ -41,22 +41,23 @@
struct u_upload_mgr {
struct pipe_context *pipe;
- unsigned default_size;
- unsigned alignment;
- unsigned usage;
-
- /* The active buffer:
- */
- struct pipe_resource *buffer;
- unsigned size;
- unsigned offset;
+ unsigned default_size; /* Minimum size of the upload buffer, in bytes. */
+ unsigned alignment; /* Alignment of each sub-allocation. */
+ unsigned bind; /* Bitmask of PIPE_BIND_* flags. */
+
+ struct pipe_resource *buffer; /* Upload buffer. */
+ struct pipe_transfer *transfer; /* Transfer object for the upload buffer. */
+ uint8_t *map; /* Pointer to the mapped upload buffer. */
+ unsigned size; /* Actual size of the upload buffer. */
+ unsigned offset; /* Aligned offset to the upload buffer, pointing
+ * at the first unused byte. */
};
struct u_upload_mgr *u_upload_create( struct pipe_context *pipe,
unsigned default_size,
unsigned alignment,
- unsigned usage )
+ unsigned bind )
{
struct u_upload_mgr *upload = CALLOC_STRUCT( u_upload_mgr );
if (!upload)
@@ -65,54 +66,12 @@ struct u_upload_mgr *u_upload_create( struct pipe_context *pipe,
upload->pipe = pipe;
upload->default_size = default_size;
upload->alignment = alignment;
- upload->usage = usage;
+ upload->bind = bind;
upload->buffer = NULL;
return upload;
}
-/* Slightly specialized version of buffer_write designed to maximize
- * chances of the driver consolidating successive writes into a single
- * upload.
- *
- * dirty_size may be slightly greater than size to cope with
- * alignment. We don't want to leave holes between succesively mapped
- * regions as that may prevent the driver from consolidating uploads.
- *
- * Note that the 'data' pointer has probably come from the application
- * and we cannot read even a byte past its end without risking
- * segfaults, or at least complaints from valgrind..
- */
-static INLINE enum pipe_error
-my_buffer_write(struct pipe_context *pipe,
- struct pipe_resource *buf,
- unsigned offset, unsigned size, unsigned dirty_size,
- const void *data)
-{
- struct pipe_transfer *transfer = NULL;
- uint8_t *map;
-
- assert(offset < buf->width0);
- assert(offset + size <= buf->width0);
- assert(dirty_size >= size);
- assert(size);
-
- map = pipe_buffer_map_range(pipe, buf, offset, dirty_size,
- PIPE_TRANSFER_WRITE |
- PIPE_TRANSFER_FLUSH_EXPLICIT |
- PIPE_TRANSFER_DISCARD |
- PIPE_TRANSFER_UNSYNCHRONIZED,
- &transfer);
- if (map == NULL)
- return PIPE_ERROR_OUT_OF_MEMORY;
-
- memcpy(map + offset, data, size);
- pipe_buffer_flush_mapped_range(pipe, transfer, offset, dirty_size);
- pipe_buffer_unmap(pipe, buf, transfer);
-
- return PIPE_OK;
-}
-
/* Release old buffer.
*
* This must usually be called prior to firing the command stream
@@ -124,6 +83,16 @@ my_buffer_write(struct pipe_context *pipe,
*/
void u_upload_flush( struct u_upload_mgr *upload )
{
+ /* Unmap and unreference the upload buffer. */
+ if (upload->transfer) {
+ if (upload->offset) {
+ pipe_buffer_flush_mapped_range(upload->pipe, upload->transfer,
+ 0, upload->offset);
+ }
+ pipe_transfer_unmap(upload->pipe, upload->transfer);
+ pipe_transfer_destroy(upload->pipe, upload->transfer);
+ upload->transfer = NULL;
+ }
pipe_resource_reference( &upload->buffer, NULL );
upload->size = 0;
}
@@ -142,7 +111,7 @@ u_upload_alloc_buffer( struct u_upload_mgr *upload,
{
unsigned size;
- /* Release old buffer, if present:
+ /* Release the old buffer, if present:
*/
u_upload_flush( upload );
@@ -151,10 +120,18 @@ u_upload_alloc_buffer( struct u_upload_mgr *upload,
size = align(MAX2(upload->default_size, min_size), 4096);
upload->buffer = pipe_buffer_create( upload->pipe->screen,
- upload->usage,
+ upload->bind,
+ PIPE_USAGE_STREAM,
size );
if (upload->buffer == NULL)
goto fail;
+
+ /* Map the new buffer. */
+ upload->map = pipe_buffer_map_range(upload->pipe, upload->buffer,
+ 0, size,
+ PIPE_TRANSFER_WRITE |
+ PIPE_TRANSFER_FLUSH_EXPLICIT,
+ &upload->transfer);
upload->size = size;
@@ -168,38 +145,62 @@ fail:
return PIPE_ERROR_OUT_OF_MEMORY;
}
-
-enum pipe_error u_upload_data( struct u_upload_mgr *upload,
- unsigned size,
- const void *data,
- unsigned *out_offset,
- struct pipe_resource **outbuf )
+enum pipe_error u_upload_alloc( struct u_upload_mgr *upload,
+ unsigned min_out_offset,
+ unsigned size,
+ unsigned *out_offset,
+ struct pipe_resource **outbuf,
+ boolean *flushed,
+ void **ptr )
{
unsigned alloc_size = align( size, upload->alignment );
- enum pipe_error ret = PIPE_OK;
+ unsigned alloc_offset = align(min_out_offset, upload->alignment);
+ unsigned offset;
- if (upload->offset + alloc_size > upload->size) {
- ret = u_upload_alloc_buffer( upload, alloc_size );
+ /* Make sure we have enough space in the upload buffer
+ * for the sub-allocation. */
+ if (MAX2(upload->offset, alloc_offset) + alloc_size > upload->size) {
+ enum pipe_error ret = u_upload_alloc_buffer(upload,
+ alloc_offset + alloc_size);
if (ret)
return ret;
+
+ *flushed = TRUE;
+ } else {
+ *flushed = FALSE;
}
- /* Copy the data, using map_range if available:
- */
- ret = my_buffer_write( upload->pipe,
- upload->buffer,
- upload->offset,
- size,
- alloc_size,
- data );
+ offset = MAX2(upload->offset, alloc_offset);
+
+ assert(offset < upload->buffer->width0);
+ assert(offset + size <= upload->buffer->width0);
+ assert(size);
+
+ /* Emit the return values: */
+ *ptr = upload->map + offset;
+ pipe_resource_reference( outbuf, upload->buffer );
+ *out_offset = offset;
+
+ upload->offset = offset + alloc_size;
+ return PIPE_OK;
+}
+
+enum pipe_error u_upload_data( struct u_upload_mgr *upload,
+ unsigned min_out_offset,
+ unsigned size,
+ const void *data,
+ unsigned *out_offset,
+ struct pipe_resource **outbuf,
+ boolean *flushed )
+{
+ uint8_t *ptr;
+ enum pipe_error ret = u_upload_alloc(upload, min_out_offset, size,
+ out_offset, outbuf, flushed,
+ (void**)&ptr);
if (ret)
return ret;
- /* Emit the return values:
- */
- pipe_resource_reference( outbuf, upload->buffer );
- *out_offset = upload->offset;
- upload->offset += alloc_size;
+ memcpy(ptr, data, size);
return PIPE_OK;
}
@@ -210,11 +211,13 @@ enum pipe_error u_upload_data( struct u_upload_mgr *upload,
* renders or DrawElements calls.
*/
enum pipe_error u_upload_buffer( struct u_upload_mgr *upload,
+ unsigned min_out_offset,
unsigned offset,
unsigned size,
struct pipe_resource *inbuf,
unsigned *out_offset,
- struct pipe_resource **outbuf )
+ struct pipe_resource **outbuf,
+ boolean *flushed )
{
enum pipe_error ret = PIPE_OK;
struct pipe_transfer *transfer = NULL;
@@ -233,17 +236,16 @@ enum pipe_error u_upload_buffer( struct u_upload_mgr *upload,
if (0)
debug_printf("upload ptr %p ofs %d sz %d\n", map, offset, size);
- ret = u_upload_data( upload,
+ ret = u_upload_data( upload,
+ min_out_offset,
size,
map + offset,
out_offset,
- outbuf );
- if (ret)
- goto done;
+ outbuf, flushed );
done:
if (map)
- pipe_buffer_unmap( upload->pipe, inbuf, transfer );
+ pipe_buffer_unmap( upload->pipe, transfer );
return ret;
}
diff --git a/src/gallium/auxiliary/util/u_upload_mgr.h b/src/gallium/auxiliary/util/u_upload_mgr.h
index de016df02e0..c9a2ffeb572 100644
--- a/src/gallium/auxiliary/util/u_upload_mgr.h
+++ b/src/gallium/auxiliary/util/u_upload_mgr.h
@@ -32,15 +32,28 @@
#ifndef U_UPLOAD_MGR_H
#define U_UPLOAD_MGR_H
+#include "pipe/p_compiler.h"
+
struct pipe_context;
struct pipe_resource;
+/**
+ * Create the upload manager.
+ *
+ * \param pipe Pipe driver.
+ * \param default_size Minimum size of the upload buffer, in bytes.
+ * \param alignment Alignment of each suballocation in the upload buffer.
+ * \param bind Bitmask of PIPE_BIND_* flags.
+ */
struct u_upload_mgr *u_upload_create( struct pipe_context *pipe,
unsigned default_size,
unsigned alignment,
- unsigned usage );
+ unsigned bind );
+/**
+ * Destroy the upload manager.
+ */
void u_upload_destroy( struct u_upload_mgr *upload );
/* Unmap and release old buffer.
@@ -53,20 +66,55 @@ void u_upload_destroy( struct u_upload_mgr *upload );
*/
void u_upload_flush( struct u_upload_mgr *upload );
+/**
+ * Sub-allocate new memory from the upload buffer.
+ *
+ * \param upload Upload manager
+ * \param min_out_offset Minimum offset that should be returned in out_offset.
+ * \param size Size of the allocation.
+ * \param out_offset Pointer to where the new buffer offset will be returned.
+ * \param outbuf Pointer to where the upload buffer will be returned.
+ * \param flushed Whether the upload buffer was flushed.
+ * \param ptr Pointer to the allocated memory that is returned.
+ */
+enum pipe_error u_upload_alloc( struct u_upload_mgr *upload,
+ unsigned min_out_offset,
+ unsigned size,
+ unsigned *out_offset,
+ struct pipe_resource **outbuf,
+ boolean *flushed,
+ void **ptr );
+
+/**
+ * Allocate and write data to the upload buffer.
+ *
+ * Same as u_upload_alloc, but in addition to that, it copies "data"
+ * to the pointer returned from u_upload_alloc.
+ */
enum pipe_error u_upload_data( struct u_upload_mgr *upload,
+ unsigned min_out_offset,
unsigned size,
const void *data,
unsigned *out_offset,
- struct pipe_resource **outbuf );
+ struct pipe_resource **outbuf,
+ boolean *flushed );
+/**
+ * Allocate and copy an input buffer to the upload buffer.
+ *
+ * Same as u_upload_data, except that the input data comes from a buffer
+ * instead of a user pointer.
+ */
enum pipe_error u_upload_buffer( struct u_upload_mgr *upload,
+ unsigned min_out_offset,
unsigned offset,
unsigned size,
struct pipe_resource *inbuf,
unsigned *out_offset,
- struct pipe_resource **outbuf );
+ struct pipe_resource **outbuf,
+ boolean *flushed );
diff --git a/src/gallium/auxiliary/util/u_vbuf_mgr.c b/src/gallium/auxiliary/util/u_vbuf_mgr.c
new file mode 100644
index 00000000000..521ac07747c
--- /dev/null
+++ b/src/gallium/auxiliary/util/u_vbuf_mgr.c
@@ -0,0 +1,609 @@
+/**************************************************************************
+ *
+ * Copyright 2011 Marek Olšák <maraeo@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, 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 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.
+ *
+ **************************************************************************/
+
+#include "util/u_vbuf_mgr.h"
+
+#include "util/u_format.h"
+#include "util/u_inlines.h"
+#include "util/u_memory.h"
+#include "util/u_upload_mgr.h"
+#include "translate/translate.h"
+#include "translate/translate_cache.h"
+
+/* Hardware vertex fetcher limitations can be described by this structure. */
+struct u_vbuf_caps {
+ /* Vertex format CAPs. */
+ /* TRUE if hardware supports it. */
+ unsigned format_fixed32:1; /* PIPE_FORMAT_*32*_FIXED */
+ unsigned format_float16:1; /* PIPE_FORMAT_*16*_FLOAT */
+ unsigned format_float64:1; /* PIPE_FORMAT_*64*_FLOAT */
+ unsigned format_norm32:1; /* PIPE_FORMAT_*32*NORM */
+ unsigned format_scaled32:1; /* PIPE_FORMAT_*32*SCALED */
+
+ /* Whether vertex fetches don't have to be dword-aligned. */
+ /* TRUE if hardware supports it. */
+ unsigned fetch_dword_unaligned:1;
+};
+
+struct u_vbuf_mgr_elements {
+ unsigned count;
+ struct pipe_vertex_element ve[PIPE_MAX_ATTRIBS];
+
+ /* If (velem[i].src_format != real_format[i]), the vertex buffer
+ * referenced by the vertex element cannot be used for rendering and
+ * its vertex data must be translated to real_format[i]. */
+ enum pipe_format native_format[PIPE_MAX_ATTRIBS];
+ unsigned native_format_size[PIPE_MAX_ATTRIBS];
+
+ /* This might mean two things:
+ * - src_format != native_format, as discussed above.
+ * - src_offset % 4 != 0 (if the caps don't allow such an offset). */
+ boolean incompatible_layout;
+};
+
+struct u_vbuf_mgr_priv {
+ struct u_vbuf_mgr b;
+ struct u_vbuf_caps caps;
+ struct pipe_context *pipe;
+
+ struct translate_cache *translate_cache;
+ unsigned translate_vb_slot;
+
+ struct u_vbuf_mgr_elements *ve;
+ void *saved_ve, *fallback_ve;
+ boolean ve_binding_lock;
+
+ boolean any_user_vbs;
+ boolean incompatible_vb_layout;
+};
+
+static void u_vbuf_mgr_init_format_caps(struct u_vbuf_mgr_priv *mgr)
+{
+ struct pipe_screen *screen = mgr->pipe->screen;
+
+ mgr->caps.format_fixed32 =
+ screen->is_format_supported(screen, PIPE_FORMAT_R32_FIXED, PIPE_BUFFER,
+ 0, PIPE_BIND_VERTEX_BUFFER);
+
+ mgr->caps.format_float16 =
+ screen->is_format_supported(screen, PIPE_FORMAT_R16_FLOAT, PIPE_BUFFER,
+ 0, PIPE_BIND_VERTEX_BUFFER);
+
+ mgr->caps.format_float64 =
+ screen->is_format_supported(screen, PIPE_FORMAT_R64_FLOAT, PIPE_BUFFER,
+ 0, PIPE_BIND_VERTEX_BUFFER);
+
+ mgr->caps.format_norm32 =
+ screen->is_format_supported(screen, PIPE_FORMAT_R32_UNORM, PIPE_BUFFER,
+ 0, PIPE_BIND_VERTEX_BUFFER) &&
+ screen->is_format_supported(screen, PIPE_FORMAT_R32_SNORM, PIPE_BUFFER,
+ 0, PIPE_BIND_VERTEX_BUFFER);
+
+ mgr->caps.format_scaled32 =
+ screen->is_format_supported(screen, PIPE_FORMAT_R32_USCALED, PIPE_BUFFER,
+ 0, PIPE_BIND_VERTEX_BUFFER) &&
+ screen->is_format_supported(screen, PIPE_FORMAT_R32_SSCALED, PIPE_BUFFER,
+ 0, PIPE_BIND_VERTEX_BUFFER);
+}
+
+struct u_vbuf_mgr *
+u_vbuf_mgr_create(struct pipe_context *pipe,
+ unsigned upload_buffer_size,
+ unsigned upload_buffer_alignment,
+ unsigned upload_buffer_bind,
+ enum u_fetch_alignment fetch_alignment)
+{
+ struct u_vbuf_mgr_priv *mgr = CALLOC_STRUCT(u_vbuf_mgr_priv);
+
+ mgr->pipe = pipe;
+ mgr->translate_cache = translate_cache_create();
+
+ mgr->b.uploader = u_upload_create(pipe, upload_buffer_size,
+ upload_buffer_alignment,
+ upload_buffer_bind);
+
+ mgr->caps.fetch_dword_unaligned =
+ fetch_alignment == U_VERTEX_FETCH_BYTE_ALIGNED;
+
+ u_vbuf_mgr_init_format_caps(mgr);
+
+ return &mgr->b;
+}
+
+void u_vbuf_mgr_destroy(struct u_vbuf_mgr *mgrb)
+{
+ struct u_vbuf_mgr_priv *mgr = (struct u_vbuf_mgr_priv*)mgrb;
+ unsigned i;
+
+ for (i = 0; i < mgr->b.nr_real_vertex_buffers; i++) {
+ pipe_resource_reference(&mgr->b.vertex_buffer[i].buffer, NULL);
+ pipe_resource_reference(&mgr->b.real_vertex_buffer[i], NULL);
+ }
+
+ translate_cache_destroy(mgr->translate_cache);
+ u_upload_destroy(mgr->b.uploader);
+ FREE(mgr);
+}
+
+
+static void u_vbuf_translate_begin(struct u_vbuf_mgr_priv *mgr,
+ int min_index, int max_index,
+ boolean *upload_flushed)
+{
+ struct translate_key key;
+ struct translate_element *te;
+ unsigned tr_elem_index[PIPE_MAX_ATTRIBS];
+ struct translate *tr;
+ boolean vb_translated[PIPE_MAX_ATTRIBS] = {0};
+ uint8_t *vb_map[PIPE_MAX_ATTRIBS] = {0}, *out_map;
+ struct pipe_transfer *vb_transfer[PIPE_MAX_ATTRIBS] = {0};
+ struct pipe_resource *out_buffer = NULL;
+ unsigned i, num_verts, out_offset;
+ struct pipe_vertex_element new_velems[PIPE_MAX_ATTRIBS];
+
+ memset(&key, 0, sizeof(key));
+ memset(tr_elem_index, 0xff, sizeof(tr_elem_index));
+
+ /* Initialize the translate key, i.e. the recipe how vertices should be
+ * translated. */
+ memset(&key, 0, sizeof key);
+ for (i = 0; i < mgr->ve->count; i++) {
+ struct pipe_vertex_buffer *vb =
+ &mgr->b.vertex_buffer[mgr->ve->ve[i].vertex_buffer_index];
+ enum pipe_format output_format = mgr->ve->native_format[i];
+ unsigned output_format_size = mgr->ve->native_format_size[i];
+
+ /* Check for support. */
+ if (mgr->ve->ve[i].src_format == mgr->ve->native_format[i] &&
+ (mgr->caps.fetch_dword_unaligned ||
+ (vb->buffer_offset % 4 == 0 &&
+ vb->stride % 4 == 0 &&
+ mgr->ve->ve[i].src_offset % 4 == 0))) {
+ continue;
+ }
+
+ /* Workaround for translate: output floats instead of halfs. */
+ switch (output_format) {
+ case PIPE_FORMAT_R16_FLOAT:
+ output_format = PIPE_FORMAT_R32_FLOAT;
+ output_format_size = 4;
+ break;
+ case PIPE_FORMAT_R16G16_FLOAT:
+ output_format = PIPE_FORMAT_R32G32_FLOAT;
+ output_format_size = 8;
+ break;
+ case PIPE_FORMAT_R16G16B16_FLOAT:
+ output_format = PIPE_FORMAT_R32G32B32_FLOAT;
+ output_format_size = 12;
+ break;
+ case PIPE_FORMAT_R16G16B16A16_FLOAT:
+ output_format = PIPE_FORMAT_R32G32B32A32_FLOAT;
+ output_format_size = 16;
+ break;
+ default:;
+ }
+
+ /* Add this vertex element. */
+ te = &key.element[key.nr_elements];
+ /*te->type;
+ te->instance_divisor;*/
+ te->input_buffer = mgr->ve->ve[i].vertex_buffer_index;
+ te->input_format = mgr->ve->ve[i].src_format;
+ te->input_offset = mgr->ve->ve[i].src_offset;
+ te->output_format = output_format;
+ te->output_offset = key.output_stride;
+
+ key.output_stride += output_format_size;
+ vb_translated[mgr->ve->ve[i].vertex_buffer_index] = TRUE;
+ tr_elem_index[i] = key.nr_elements;
+ key.nr_elements++;
+ }
+
+ /* Get a translate object. */
+ tr = translate_cache_find(mgr->translate_cache, &key);
+
+ /* Map buffers we want to translate. */
+ for (i = 0; i < mgr->b.nr_vertex_buffers; i++) {
+ if (vb_translated[i]) {
+ struct pipe_vertex_buffer *vb = &mgr->b.vertex_buffer[i];
+
+ vb_map[i] = pipe_buffer_map(mgr->pipe, vb->buffer,
+ PIPE_TRANSFER_READ, &vb_transfer[i]);
+
+ tr->set_buffer(tr, i,
+ vb_map[i] + vb->buffer_offset + vb->stride * min_index,
+ vb->stride, ~0);
+ }
+ }
+
+ /* Create and map the output buffer. */
+ num_verts = max_index + 1 - min_index;
+
+ u_upload_alloc(mgr->b.uploader,
+ key.output_stride * min_index,
+ key.output_stride * num_verts,
+ &out_offset, &out_buffer, upload_flushed,
+ (void**)&out_map);
+
+ out_offset -= key.output_stride * min_index;
+
+ /* Translate. */
+ tr->run(tr, 0, num_verts, 0, out_map);
+
+ /* Unmap all buffers. */
+ for (i = 0; i < mgr->b.nr_vertex_buffers; i++) {
+ if (vb_translated[i]) {
+ pipe_buffer_unmap(mgr->pipe, vb_transfer[i]);
+ }
+ }
+
+ /* Setup the new vertex buffer in the first free slot. */
+ mgr->translate_vb_slot = ~0;
+ for (i = 0; i < PIPE_MAX_ATTRIBS; i++) {
+ if (!mgr->b.vertex_buffer[i].buffer) {
+ mgr->translate_vb_slot = i;
+
+ if (i >= mgr->b.nr_vertex_buffers) {
+ mgr->b.nr_real_vertex_buffers = i+1;
+ }
+ break;
+ }
+ }
+
+ if (mgr->translate_vb_slot != ~0) {
+ /* Setup the new vertex buffer. */
+ pipe_resource_reference(
+ &mgr->b.real_vertex_buffer[mgr->translate_vb_slot], out_buffer);
+ mgr->b.vertex_buffer[mgr->translate_vb_slot].buffer_offset = out_offset;
+ mgr->b.vertex_buffer[mgr->translate_vb_slot].stride = key.output_stride;
+
+ /* Setup new vertex elements. */
+ for (i = 0; i < mgr->ve->count; i++) {
+ if (tr_elem_index[i] < key.nr_elements) {
+ te = &key.element[tr_elem_index[i]];
+ new_velems[i].instance_divisor = mgr->ve->ve[i].instance_divisor;
+ new_velems[i].src_format = te->output_format;
+ new_velems[i].src_offset = te->output_offset;
+ new_velems[i].vertex_buffer_index = mgr->translate_vb_slot;
+ } else {
+ memcpy(&new_velems[i], &mgr->ve->ve[i],
+ sizeof(struct pipe_vertex_element));
+ }
+ }
+
+ mgr->fallback_ve =
+ mgr->pipe->create_vertex_elements_state(mgr->pipe, mgr->ve->count,
+ new_velems);
+
+ /* Preserve saved_ve. */
+ mgr->ve_binding_lock = TRUE;
+ mgr->pipe->bind_vertex_elements_state(mgr->pipe, mgr->fallback_ve);
+ mgr->ve_binding_lock = FALSE;
+ }
+
+ pipe_resource_reference(&out_buffer, NULL);
+}
+
+static void u_vbuf_translate_end(struct u_vbuf_mgr_priv *mgr)
+{
+ if (mgr->fallback_ve == NULL) {
+ return;
+ }
+
+ /* Restore vertex elements. */
+ /* Note that saved_ve will be overwritten in bind_vertex_elements_state. */
+ mgr->pipe->bind_vertex_elements_state(mgr->pipe, mgr->saved_ve);
+ mgr->pipe->delete_vertex_elements_state(mgr->pipe, mgr->fallback_ve);
+ mgr->fallback_ve = NULL;
+
+ /* Delete the now-unused VBO. */
+ pipe_resource_reference(&mgr->b.real_vertex_buffer[mgr->translate_vb_slot],
+ NULL);
+ mgr->b.nr_real_vertex_buffers = mgr->b.nr_vertex_buffers;
+}
+
+#define FORMAT_REPLACE(what, withwhat) \
+ case PIPE_FORMAT_##what: format = PIPE_FORMAT_##withwhat; break
+
+struct u_vbuf_mgr_elements *
+u_vbuf_mgr_create_vertex_elements(struct u_vbuf_mgr *mgrb,
+ unsigned count,
+ const struct pipe_vertex_element *attribs,
+ struct pipe_vertex_element *native_attribs)
+{
+ struct u_vbuf_mgr_priv *mgr = (struct u_vbuf_mgr_priv*)mgrb;
+ unsigned i;
+ struct u_vbuf_mgr_elements *ve = CALLOC_STRUCT(u_vbuf_mgr_elements);
+
+ ve->count = count;
+
+ if (!count) {
+ return ve;
+ }
+
+ memcpy(ve->ve, attribs, sizeof(struct pipe_vertex_element) * count);
+ memcpy(native_attribs, attribs, sizeof(struct pipe_vertex_element) * count);
+
+ /* Set the best native format in case the original format is not
+ * supported. */
+ for (i = 0; i < count; i++) {
+ enum pipe_format format = ve->ve[i].src_format;
+
+ /* Choose a native format.
+ * For now we don't care about the alignment, that's going to
+ * be sorted out later. */
+ if (!mgr->caps.format_fixed32) {
+ switch (format) {
+ FORMAT_REPLACE(R32_FIXED, R32_FLOAT);
+ FORMAT_REPLACE(R32G32_FIXED, R32G32_FLOAT);
+ FORMAT_REPLACE(R32G32B32_FIXED, R32G32B32_FLOAT);
+ FORMAT_REPLACE(R32G32B32A32_FIXED, R32G32B32A32_FLOAT);
+ default:;
+ }
+ }
+ if (!mgr->caps.format_float16) {
+ switch (format) {
+ FORMAT_REPLACE(R16_FLOAT, R32_FLOAT);
+ FORMAT_REPLACE(R16G16_FLOAT, R32G32_FLOAT);
+ FORMAT_REPLACE(R16G16B16_FLOAT, R32G32B32_FLOAT);
+ FORMAT_REPLACE(R16G16B16A16_FLOAT, R32G32B32A32_FLOAT);
+ default:;
+ }
+ }
+ if (!mgr->caps.format_float64) {
+ switch (format) {
+ FORMAT_REPLACE(R64_FLOAT, R32_FLOAT);
+ FORMAT_REPLACE(R64G64_FLOAT, R32G32_FLOAT);
+ FORMAT_REPLACE(R64G64B64_FLOAT, R32G32B32_FLOAT);
+ FORMAT_REPLACE(R64G64B64A64_FLOAT, R32G32B32A32_FLOAT);
+ default:;
+ }
+ }
+ if (!mgr->caps.format_norm32) {
+ switch (format) {
+ FORMAT_REPLACE(R32_UNORM, R32_FLOAT);
+ FORMAT_REPLACE(R32G32_UNORM, R32G32_FLOAT);
+ FORMAT_REPLACE(R32G32B32_UNORM, R32G32B32_FLOAT);
+ FORMAT_REPLACE(R32G32B32A32_UNORM, R32G32B32A32_FLOAT);
+ FORMAT_REPLACE(R32_SNORM, R32_FLOAT);
+ FORMAT_REPLACE(R32G32_SNORM, R32G32_FLOAT);
+ FORMAT_REPLACE(R32G32B32_SNORM, R32G32B32_FLOAT);
+ FORMAT_REPLACE(R32G32B32A32_SNORM, R32G32B32A32_FLOAT);
+ default:;
+ }
+ }
+ if (!mgr->caps.format_scaled32) {
+ switch (format) {
+ FORMAT_REPLACE(R32_USCALED, R32_FLOAT);
+ FORMAT_REPLACE(R32G32_USCALED, R32G32_FLOAT);
+ FORMAT_REPLACE(R32G32B32_USCALED, R32G32B32_FLOAT);
+ FORMAT_REPLACE(R32G32B32A32_USCALED,R32G32B32A32_FLOAT);
+ FORMAT_REPLACE(R32_SSCALED, R32_FLOAT);
+ FORMAT_REPLACE(R32G32_SSCALED, R32G32_FLOAT);
+ FORMAT_REPLACE(R32G32B32_SSCALED, R32G32B32_FLOAT);
+ FORMAT_REPLACE(R32G32B32A32_SSCALED,R32G32B32A32_FLOAT);
+ default:;
+ }
+ }
+
+ native_attribs[i].src_format = format;
+ ve->native_format[i] = format;
+ ve->native_format_size[i] =
+ util_format_get_blocksize(ve->native_format[i]);
+
+ ve->incompatible_layout =
+ ve->incompatible_layout ||
+ ve->ve[i].src_format != ve->native_format[i] ||
+ (!mgr->caps.fetch_dword_unaligned && ve->ve[i].src_offset % 4 != 0);
+ }
+
+ /* Align the formats to the size of DWORD if needed. */
+ if (!mgr->caps.fetch_dword_unaligned) {
+ for (i = 0; i < count; i++) {
+ ve->native_format_size[i] = align(ve->native_format_size[i], 4);
+ }
+ }
+
+ return ve;
+}
+
+void u_vbuf_mgr_bind_vertex_elements(struct u_vbuf_mgr *mgrb,
+ void *cso,
+ struct u_vbuf_mgr_elements *ve)
+{
+ struct u_vbuf_mgr_priv *mgr = (struct u_vbuf_mgr_priv*)mgrb;
+
+ if (!cso) {
+ return;
+ }
+
+ if (!mgr->ve_binding_lock) {
+ mgr->saved_ve = cso;
+ mgr->ve = ve;
+ }
+}
+
+void u_vbuf_mgr_destroy_vertex_elements(struct u_vbuf_mgr *mgr,
+ struct u_vbuf_mgr_elements *ve)
+{
+ FREE(ve);
+}
+
+void u_vbuf_mgr_set_vertex_buffers(struct u_vbuf_mgr *mgrb,
+ unsigned count,
+ const struct pipe_vertex_buffer *bufs)
+{
+ struct u_vbuf_mgr_priv *mgr = (struct u_vbuf_mgr_priv*)mgrb;
+ unsigned i;
+
+ mgr->b.max_index = ~0;
+ mgr->any_user_vbs = FALSE;
+ mgr->incompatible_vb_layout = FALSE;
+
+ if (!mgr->caps.fetch_dword_unaligned) {
+ /* Check if the strides and offsets are aligned to the size of DWORD. */
+ for (i = 0; i < count; i++) {
+ if (bufs[i].buffer) {
+ if (bufs[i].stride % 4 != 0 ||
+ bufs[i].buffer_offset % 4 != 0) {
+ mgr->incompatible_vb_layout = TRUE;
+ break;
+ }
+ }
+ }
+ }
+
+ for (i = 0; i < count; i++) {
+ const struct pipe_vertex_buffer *vb = &bufs[i];
+
+ pipe_resource_reference(&mgr->b.vertex_buffer[i].buffer, vb->buffer);
+ pipe_resource_reference(&mgr->b.real_vertex_buffer[i], NULL);
+
+ if (u_vbuf_resource(vb->buffer)->user_ptr) {
+ mgr->any_user_vbs = TRUE;
+ continue;
+ }
+
+ pipe_resource_reference(&mgr->b.real_vertex_buffer[i], vb->buffer);
+
+ /* The stride of zero means we will be fetching only the first
+ * vertex, so don't care about max_index. */
+ if (!vb->stride) {
+ continue;
+ }
+
+ /* Update the maximum index. */
+ mgr->b.max_index =
+ MIN2(mgr->b.max_index,
+ (vb->buffer->width0 - vb->buffer_offset) / vb->stride);
+ }
+
+ for (; i < mgr->b.nr_real_vertex_buffers; i++) {
+ pipe_resource_reference(&mgr->b.vertex_buffer[i].buffer, NULL);
+ pipe_resource_reference(&mgr->b.real_vertex_buffer[i], NULL);
+ }
+
+ memcpy(mgr->b.vertex_buffer, bufs,
+ sizeof(struct pipe_vertex_buffer) * count);
+
+ mgr->b.nr_vertex_buffers = count;
+ mgr->b.nr_real_vertex_buffers = count;
+}
+
+static void u_vbuf_upload_buffers(struct u_vbuf_mgr_priv *mgr,
+ int min_index, int max_index,
+ unsigned instance_count,
+ boolean *upload_flushed)
+{
+ int i, nr = mgr->ve->count;
+ unsigned count = max_index + 1 - min_index;
+ boolean uploaded[PIPE_MAX_ATTRIBS] = {0};
+
+ for (i = 0; i < nr; i++) {
+ unsigned index = mgr->ve->ve[i].vertex_buffer_index;
+ struct pipe_vertex_buffer *vb = &mgr->b.vertex_buffer[index];
+
+ if (vb->buffer &&
+ u_vbuf_resource(vb->buffer)->user_ptr &&
+ !uploaded[index]) {
+ unsigned first, size;
+ boolean flushed;
+ unsigned instance_div = mgr->ve->ve[i].instance_divisor;
+
+ if (instance_div) {
+ first = 0;
+ size = vb->stride *
+ ((instance_count + instance_div - 1) / instance_div);
+ } else if (vb->stride) {
+ first = vb->stride * min_index;
+ size = vb->stride * count;
+ } else {
+ first = 0;
+ size = mgr->ve->native_format_size[i];
+ }
+
+ u_upload_data(mgr->b.uploader, first, size,
+ u_vbuf_resource(vb->buffer)->user_ptr + first,
+ &vb->buffer_offset,
+ &mgr->b.real_vertex_buffer[index],
+ &flushed);
+
+ vb->buffer_offset -= first;
+
+ uploaded[index] = TRUE;
+ *upload_flushed = *upload_flushed || flushed;
+ } else {
+ assert(mgr->b.real_vertex_buffer[index]);
+ }
+ }
+}
+
+void u_vbuf_mgr_draw_begin(struct u_vbuf_mgr *mgrb,
+ const struct pipe_draw_info *info,
+ boolean *buffers_updated,
+ boolean *uploader_flushed)
+{
+ struct u_vbuf_mgr_priv *mgr = (struct u_vbuf_mgr_priv*)mgrb;
+ boolean bufs_updated = FALSE, upload_flushed = FALSE;
+ int min_index, max_index;
+
+ min_index = info->min_index - info->index_bias;
+ max_index = info->max_index - info->index_bias;
+
+ /* Translate vertices with non-native layouts or formats. */
+ if (mgr->incompatible_vb_layout || mgr->ve->incompatible_layout) {
+ u_vbuf_translate_begin(mgr, min_index, max_index, &upload_flushed);
+
+ if (mgr->fallback_ve) {
+ bufs_updated = TRUE;
+ }
+ }
+
+ /* Upload user buffers. */
+ if (mgr->any_user_vbs) {
+ u_vbuf_upload_buffers(mgr, min_index, max_index, info->instance_count,
+ &upload_flushed);
+ bufs_updated = TRUE;
+ }
+
+ /* Set the return values. */
+ if (buffers_updated) {
+ *buffers_updated = bufs_updated;
+ }
+ if (uploader_flushed) {
+ *uploader_flushed = upload_flushed;
+ }
+}
+
+void u_vbuf_mgr_draw_end(struct u_vbuf_mgr *mgrb)
+{
+ struct u_vbuf_mgr_priv *mgr = (struct u_vbuf_mgr_priv*)mgrb;
+
+ if (mgr->fallback_ve) {
+ u_vbuf_translate_end(mgr);
+ }
+}
diff --git a/src/gallium/auxiliary/util/u_vbuf_mgr.h b/src/gallium/auxiliary/util/u_vbuf_mgr.h
new file mode 100644
index 00000000000..8b241854c83
--- /dev/null
+++ b/src/gallium/auxiliary/util/u_vbuf_mgr.h
@@ -0,0 +1,121 @@
+/**************************************************************************
+ *
+ * Copyright 2011 Marek Olšák <maraeo@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, 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 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 U_VBUF_MGR_H
+#define U_VBUF_MGR_H
+
+/* This module builds upon u_upload_mgr and translate_cache and takes care of
+ * user buffer uploads and vertex format fallbacks. It's designed
+ * for the drivers which don't always use the Draw module. (e.g. for HWTCL)
+ */
+
+#include "pipe/p_context.h"
+#include "pipe/p_state.h"
+#include "util/u_transfer.h"
+
+/* The manager.
+ * This structure should also be used to access vertex buffers
+ * from a driver. */
+struct u_vbuf_mgr {
+ /* This is what was set in set_vertex_buffers.
+ * May contain user buffers. */
+ struct pipe_vertex_buffer vertex_buffer[PIPE_MAX_ATTRIBS];
+ unsigned nr_vertex_buffers;
+
+ /* Contains only real vertex buffers.
+ * Hardware drivers should use real_vertex_buffers[i]
+ * instead of vertex_buffers[i].buffer. */
+ struct pipe_resource *real_vertex_buffer[PIPE_MAX_ATTRIBS];
+ int nr_real_vertex_buffers;
+
+ /* Precomputed max_index for hardware vertex buffers. */
+ int max_index;
+
+ /* This uploader can optionally be used by the driver.
+ *
+ * Allowed functions:
+ * - u_upload_alloc
+ * - u_upload_data
+ * - u_upload_buffer
+ * - u_upload_flush */
+ struct u_upload_mgr *uploader;
+};
+
+struct u_vbuf_resource {
+ struct u_resource b;
+ uint8_t *user_ptr;
+};
+
+/* Opaque type containing information about vertex elements for the manager. */
+struct u_vbuf_mgr_elements;
+
+enum u_fetch_alignment {
+ U_VERTEX_FETCH_BYTE_ALIGNED,
+ U_VERTEX_FETCH_DWORD_ALIGNED
+};
+
+
+struct u_vbuf_mgr *
+u_vbuf_mgr_create(struct pipe_context *pipe,
+ unsigned upload_buffer_size,
+ unsigned upload_buffer_alignment,
+ unsigned upload_buffer_bind,
+ enum u_fetch_alignment fetch_alignment);
+
+void u_vbuf_mgr_destroy(struct u_vbuf_mgr *mgr);
+
+struct u_vbuf_mgr_elements *
+u_vbuf_mgr_create_vertex_elements(struct u_vbuf_mgr *mgr,
+ unsigned count,
+ const struct pipe_vertex_element *attrs,
+ struct pipe_vertex_element *native_attrs);
+
+void u_vbuf_mgr_bind_vertex_elements(struct u_vbuf_mgr *mgr,
+ void *cso,
+ struct u_vbuf_mgr_elements *ve);
+
+void u_vbuf_mgr_destroy_vertex_elements(struct u_vbuf_mgr *mgr,
+ struct u_vbuf_mgr_elements *ve);
+
+void u_vbuf_mgr_set_vertex_buffers(struct u_vbuf_mgr *mgr,
+ unsigned count,
+ const struct pipe_vertex_buffer *bufs);
+
+void u_vbuf_mgr_draw_begin(struct u_vbuf_mgr *mgr,
+ const struct pipe_draw_info *info,
+ boolean *buffers_updated,
+ boolean *uploader_flushed);
+
+void u_vbuf_mgr_draw_end(struct u_vbuf_mgr *mgr);
+
+
+static INLINE struct u_vbuf_resource *u_vbuf_resource(struct pipe_resource *r)
+{
+ return (struct u_vbuf_resource*)r;
+}
+
+#endif
diff --git a/src/gallium/docs/d3d11ddi.txt b/src/gallium/docs/d3d11ddi.txt
index 11e77190895..b5a06b4b943 100644
--- a/src/gallium/docs/d3d11ddi.txt
+++ b/src/gallium/docs/d3d11ddi.txt
@@ -337,7 +337,6 @@ IaSetTopology
+ Gallium supports line loops, triangle fans, quads, quad strips and polygons
IaSetVertexBuffers -> set_vertex_buffers
- + Gallium allows to specify a max_index here
- Gallium only allows setting all vertex buffers at once, while D3D11 supports setting a subset
OpenResource -> texture_from_handle
@@ -454,8 +453,8 @@ SetVertexPipelineOutput (D3D10.1+ only)
SetViewports
- Gallium lacks support for multiple geometry-shader-selectable viewports D3D11 has
-ShaderResourceViewReadAfterWriteHazard -> flush(PIPE_FLUSH_RENDER_CACHE)
- - Gallium does not support specifying this per-render-target/view
+ShaderResourceViewReadAfterWriteHazard
+ - Gallium lacks support for this
SoSetTargets -> set_stream_output_buffers
diff --git a/src/gallium/docs/source/context.rst b/src/gallium/docs/source/context.rst
index c33cf7c5738..b0229c70f20 100644
--- a/src/gallium/docs/source/context.rst
+++ b/src/gallium/docs/source/context.rst
@@ -3,8 +3,12 @@
Context
=======
-The context object represents the purest, most directly accessible, abilities
-of the device's 3D rendering pipeline.
+A Gallium rendering context encapsulates the state which effects 3D
+rendering such as blend state, depth/stencil state, texture samplers,
+etc.
+
+Note that resource/texture allocation is not per-context but per-screen.
+
Methods
-------
@@ -12,20 +16,23 @@ Methods
CSO State
^^^^^^^^^
-All CSO state is created, bound, and destroyed, with triplets of methods that
-all follow a specific naming scheme. For example, ``create_blend_state``,
-``bind_blend_state``, and ``destroy_blend_state``.
+All Constant State Object (CSO) state is created, bound, and destroyed,
+with triplets of methods that all follow a specific naming scheme.
+For example, ``create_blend_state``, ``bind_blend_state``, and
+``destroy_blend_state``.
CSO objects handled by the context object:
* :ref:`Blend`: ``*_blend_state``
-* :ref:`Sampler`: These are special; they can be bound to either vertex or
- fragment samplers, and they are bound in groups.
- ``bind_fragment_sampler_states``, ``bind_vertex_sampler_states``
+* :ref:`Sampler`: Texture sampler states are bound separately for fragment,
+ vertex and geometry samplers. Note that sampler states are set en masse.
+ If M is the max number of sampler units supported by the driver and N
+ samplers are bound with ``bind_fragment_sampler_states`` then sampler
+ units N..M-1 are considered disabled/NULL.
* :ref:`Rasterizer`: ``*_rasterizer_state``
* :ref:`Depth, Stencil, & Alpha`: ``*_depth_stencil_alpha_state``
-* :ref:`Shader`: These have two sets of methods. ``*_fs_state`` is for
- fragment shaders, and ``*_vs_state`` is for vertex shaders.
+* :ref:`Shader`: These are create, bind and destroy methods for vertex,
+ fragment and geometry shaders.
* :ref:`Vertex Elements`: ``*_vertex_elements_state``
@@ -47,6 +54,9 @@ buffers, surfaces) are bound to the driver.
* ``set_index_buffer``
+* ``set_stream_output_buffers``
+
+
Non-CSO State
^^^^^^^^^^^^^
@@ -96,7 +106,9 @@ to the array index which is used for sampling.
* ``set_fragment_sampler_views`` binds an array of sampler views to
fragment shader stage. Every binding point acquires a reference
to a respective sampler view and releases a reference to the previous
- sampler view.
+ sampler view. If M is the maximum number of sampler units and N units
+ is passed to set_fragment_sampler_views, the driver should unbind the
+ sampler views for units N..M-1.
* ``set_vertex_sampler_views`` binds an array of sampler views to vertex
shader stage. Every binding point acquires a reference to a respective
@@ -232,9 +244,16 @@ The most common type of query is the occlusion query,
``PIPE_QUERY_OCCLUSION_COUNTER``, which counts the number of fragments which
are written to the framebuffer without being culled by
:ref:`Depth, Stencil, & Alpha` testing or shader KILL instructions.
+The result is an unsigned 64-bit integer.
+In cases where a boolean result of an occlusion query is enough,
+``PIPE_QUERY_OCCLUSION_PREDICATE`` should be used. It is just like
+``PIPE_QUERY_OCCLUSION_COUNTER`` except that the result is a boolean
+value of FALSE for cases where COUNTER would result in 0 and TRUE
+for all other cases.
Another type of query, ``PIPE_QUERY_TIME_ELAPSED``, returns the amount of
time, in nanoseconds, the context takes to perform operations.
+The result is an unsigned 64-bit integer.
Gallium does not guarantee the availability of any query types; one must
always check the capabilities of the :ref:`Screen` first.
@@ -347,6 +366,22 @@ Any pointers into the map should be considered invalid and discarded.
Basically get_transfer, transfer_map, data write, transfer_unmap, and
transfer_destroy all in one.
+
+The box parameter to some of these functions defines a 1D, 2D or 3D
+region of pixels. This is self-explanatory for 1D, 2D and 3D texture
+targets.
+
+For PIPE_TEXTURE_1D_ARRAY, the box::y and box::height fields refer to the
+array dimension of the texture.
+
+For PIPE_TEXTURE_2D_ARRAY, the box::z and box::depth fields refer to the
+array dimension of the texture.
+
+For PIPE_TEXTURE_CUBE, the box:z and box::depth fields refer to the
+faces of the cube map (z + depth <= 6).
+
+
+
.. _transfer_flush_region:
transfer_flush_region
@@ -357,6 +392,32 @@ be flushed on write or unmap. Flushes must be requested with
``transfer_flush_region``. Flush ranges are relative to the mapped range, not
the beginning of the resource.
+
+
+.. _redefine_user_buffer:
+
+redefine_user_buffer
+%%%%%%%%%%%%%%%%%%%%
+
+This function notifies a driver that the user buffer content has been changed.
+The updated region starts at ``offset`` and is ``size`` bytes large.
+The ``offset`` is relative to the pointer specified in ``user_buffer_create``.
+While uploading the user buffer, the driver is allowed not to upload
+the memory outside of this region.
+The width0 is redefined to ``MAX2(width0, offset+size)``.
+
+
+
+.. _texture_barrier
+
+texture_barrier
+%%%%%%%%%%%%%%%
+
+This function flushes all pending writes to the currently-set surfaces and
+invalidates all read caches of the currently-set samplers.
+
+
+
.. _pipe_transfer:
PIPE_TRANSFER
@@ -364,16 +425,32 @@ PIPE_TRANSFER
These flags control the behavior of a transfer object.
-* ``READ``: resource contents are read at transfer create time.
-* ``WRITE``: resource contents will be written back at transfer destroy time.
-* ``MAP_DIRECTLY``: a transfer should directly map the resource. May return
- NULL if not supported.
-* ``DISCARD``: The memory within the mapped region is discarded.
- Cannot be used with ``READ``.
-* ``DONTBLOCK``: Fail if the resource cannot be mapped immediately.
-* ``UNSYNCHRONIZED``: Do not synchronize pending operations on the resource
- when mapping. The interaction of any writes to the map and any
- operations pending on the resource are undefined. Cannot be used with
- ``READ``.
-* ``FLUSH_EXPLICIT``: Written ranges will be notified later with
- :ref:`transfer_flush_region`. Cannot be used with ``READ``.
+``PIPE_TRANSFER_READ``
+ Resource contents read back (or accessed directly) at transfer create time.
+
+``PIPE_TRANSFER_WRITE``
+ Resource contents will be written back at transfer_destroy time (or modified
+ as a result of being accessed directly).
+
+``PIPE_TRANSFER_MAP_DIRECTLY``
+ a transfer should directly map the resource. May return NULL if not supported.
+
+``PIPE_TRANSFER_DISCARD_RANGE``
+ The memory within the mapped region is discarded. Cannot be used with
+ ``PIPE_TRANSFER_READ``.
+
+``PIPE_TRANSFER_DISCARD_WHOLE_RESOURCE``
+ Discards all memory backing the resource. It should not be used with
+ ``PIPE_TRANSFER_READ``.
+
+``PIPE_TRANSFER_DONTBLOCK``
+ Fail if the resource cannot be mapped immediately.
+
+``PIPE_TRANSFER_UNSYNCHRONIZED``
+ Do not synchronize pending operations on the resource when mapping. The
+ interaction of any writes to the map and any operations pending on the
+ resource are undefined. Cannot be used with ``PIPE_TRANSFER_READ``.
+
+``PIPE_TRANSFER_FLUSH_EXPLICIT``
+ Written ranges will be notified later with :ref:`transfer_flush_region`.
+ Cannot be used with ``PIPE_TRANSFER_READ``.
diff --git a/src/gallium/docs/source/screen.rst b/src/gallium/docs/source/screen.rst
index 09edbaa673d..976e75bed04 100644
--- a/src/gallium/docs/source/screen.rst
+++ b/src/gallium/docs/source/screen.rst
@@ -36,6 +36,7 @@ The integer capabilities:
bound.
* ``OCCLUSION_QUERY``: Whether occlusion queries are available.
* ``TIMER_QUERY``: Whether timer queries are available.
+* ``INSTANCED_DRAWING``: indicates support for instanced drawing.
* ``TEXTURE_SHADOW_MAP``: indicates whether the fragment shader hardware
can do the depth texture / Z comparison operation in TEX instructions
for shadow testing.
@@ -272,7 +273,7 @@ Modern APIs allow using buffers as shader resources.
**depth0** the depth of the base mip level of the texture
(1 for everything else).
-**array_size the array size for 1D and 2D array textures.
+**array_size** the array size for 1D and 2D array textures.
For cube maps this must be 6, for other textures 1.
**last_level** the last mip map level present.
diff --git a/src/gallium/docs/source/tgsi.rst b/src/gallium/docs/source/tgsi.rst
index d99ed7c6d6b..4debcc6ecc4 100644
--- a/src/gallium/docs/source/tgsi.rst
+++ b/src/gallium/docs/source/tgsi.rst
@@ -577,17 +577,45 @@ This instruction replicates its result.
.. opcode:: TEX - Texture Lookup
- TBD
+.. math::
+
+ coord = src0
+
+ bias = 0.0
+
+ dst = texture_sample(unit, coord, bias)
.. opcode:: TXD - Texture Lookup with Derivatives
- TBD
+.. math::
+
+ coord = src0
+
+ ddx = src1
+
+ ddy = src2
+
+ bias = 0.0
+
+ dst = texture_sample_deriv(unit, coord, bias, ddx, ddy)
.. opcode:: TXP - Projective Texture Lookup
- TBD
+.. math::
+
+ coord.x = src0.x / src.w
+
+ coord.y = src0.y / src.w
+
+ coord.z = src0.z / src.w
+
+ coord.w = src0.w
+
+ bias = 0.0
+
+ dst = texture_sample(unit, coord, bias)
.. opcode:: UP2H - Unpack Two 16-Bit Floats
@@ -729,7 +757,19 @@ This instruction replicates its result.
.. opcode:: TXB - Texture Lookup With Bias
- TBD
+.. math::
+
+ coord.x = src.x
+
+ coord.y = src.y
+
+ coord.z = src.z
+
+ coord.w = 1.0
+
+ bias = src.z
+
+ dst = texture_sample(unit, coord, bias)
.. opcode:: NRM - 3-component Vector Normalise
@@ -767,9 +807,21 @@ This instruction replicates its result.
dst = src0.x \times src1.x + src0.y \times src1.y
-.. opcode:: TXL - Texture Lookup With LOD
+.. opcode:: TXL - Texture Lookup With explicit LOD
- TBD
+.. math::
+
+ coord.x = src0.x
+
+ coord.y = src0.y
+
+ coord.z = src0.z
+
+ coord.w = 1.0
+
+ lod = src0.w
+
+ dst = texture_sample(unit, coord, lod)
.. opcode:: BRK - Break
@@ -1198,6 +1250,157 @@ This opcode is the inverse of :opcode:`DFRACEXP`.
dst.zw = \sqrt{src.zw}
+.. _resourceopcodes:
+
+Resource Access Opcodes
+^^^^^^^^^^^^^^^^^^^^^^^^
+
+Those opcodes follow very closely semantics of the respective Direct3D
+instructions. If in doubt double check Direct3D documentation.
+
+.. opcode:: LOAD - Simplified alternative to the "SAMPLE" instruction.
+ Using the provided integer address, LOAD fetches data
+ from the specified buffer/texture without any filtering.
+ The source data may come from any resource type other
+ than CUBE.
+ LOAD dst, address, resource
+ e.g.
+ LOAD TEMP[0], TEMP[1], RES[0]
+ The 'address' is specified as unsigned integers. If the
+ 'address' is out of range [0...(# texels - 1)] the
+ result of the fetch is always 0 in all components.
+ As such the instruction doesn't honor address wrap
+ modes, in cases where that behavior is desirable
+ 'sample' instruction should be used.
+ address.w always provides an unsigned integer mipmap
+ level. If the value is out of the range then the
+ instruction always returns 0 in all components.
+ address.yz are ignored for buffers and 1d textures.
+ address.z is ignored for 1d texture arrays and 2d
+ textures.
+ For 1D texture arrays address.y provides the array
+ index (also as unsigned integer). If the value is
+ out of the range of available array indices
+ [0... (array size - 1)] then the opcode always returns
+ 0 in all components.
+ For 2D texture arrays address.z provides the array
+ index, otherwise it exhibits the same behavior as in
+ the case for 1D texture arrays.
+ The exeact semantics of the source address are presented
+ in the table below:
+ resource type X Y Z W
+ ------------- ------------------------
+ PIPE_BUFFER x ignored
+ PIPE_TEXTURE_1D x mpl
+ PIPE_TEXTURE_2D x y mpl
+ PIPE_TEXTURE_3D x y z mpl
+ PIPE_TEXTURE_RECT x y mpl
+ PIPE_TEXTURE_CUBE not allowed as source
+ PIPE_TEXTURE_1D_ARRAY x idx mpl
+ PIPE_TEXTURE_2D_ARRAY x y idx mpl
+
+ Where 'mpl' is a mipmap level and 'idx' is the
+ array index.
+
+
+.. opcode:: LOAD_MS - Just like LOAD but allows fetch data from
+ multi-sampled surfaces.
+
+.. opcode:: SAMPLE - Using provided address, sample data from the
+ specified texture using the filtering mode identified
+ by the gven sampler. The source data may come from
+ any resource type other than buffers.
+ SAMPLE dst, address, resource, sampler
+ e.g.
+ SAMPLE TEMP[0], TEMP[1], RES[0], SAMP[0]
+
+.. opcode:: SAMPLE_B - Just like the SAMPLE instruction with the
+ exception that an additiona bias is applied to the
+ level of detail computed as part of the instruction
+ execution.
+ SAMPLE_B dst, address, resource, sampler, lod_bias
+ e.g.
+ SAMPLE_B TEMP[0], TEMP[1], RES[0], SAMP[0], TEMP[2].x
+
+.. opcode:: SAMPLE_C - Similar to the SAMPLE instruction but it
+ performs a comparison filter. The operands to SAMPLE_C
+ are identical to SAMPLE, except that tere is an additional
+ float32 operand, reference value, which must be a register
+ with single-component, or a scalar literal.
+ SAMPLE_C makes the hardware use the current samplers
+ compare_func (in pipe_sampler_state) to compare
+ reference value against the red component value for the
+ surce resource at each texel that the currently configured
+ texture filter covers based on the provided coordinates.
+ SAMPLE_C dst, address, resource.r, sampler, ref_value
+ e.g.
+ SAMPLE_C TEMP[0], TEMP[1], RES[0].r, SAMP[0], TEMP[2].x
+
+.. opcode:: SAMPLE_C_LZ - Same as SAMPLE_C, but LOD is 0 and derivatives
+ are ignored. The LZ stands for level-zero.
+ SAMPLE_C_LZ dst, address, resource.r, sampler, ref_value
+ e.g.
+ SAMPLE_C_LZ TEMP[0], TEMP[1], RES[0].r, SAMP[0], TEMP[2].x
+
+
+.. opcode:: SAMPLE_D - SAMPLE_D is identical to the SAMPLE opcode except
+ that the derivatives for the source address in the x
+ direction and the y direction are provided by extra
+ parameters.
+ SAMPLE_D dst, address, resource, sampler, der_x, der_y
+ e.g.
+ SAMPLE_D TEMP[0], TEMP[1], RES[0], SAMP[0], TEMP[2], TEMP[3]
+
+.. opcode:: SAMPLE_L - SAMPLE_L is identical to the SAMPLE opcode except
+ that the LOD is provided directly as a scalar value,
+ representing no anisotropy. Source addresses A channel
+ is used as the LOD.
+ SAMPLE_L dst, address, resource, sampler
+ e.g.
+ SAMPLE_L TEMP[0], TEMP[1], RES[0], SAMP[0]
+
+
+.. opcode:: GATHER4 - Gathers the four texels to be used in a bi-linear
+ filtering operation and packs them into a single register.
+ Only woth with 2D, 2D array, cubemaps, and cubemaps arrays.
+ For 2D textures, only the addressing modes of the sampler and
+ the top level of any mip pyramid are used. Set W to zero.
+ It behaves like the SAMPLE instruction, but a filtered
+ sample is not generated. The four samples that contribute
+ to filtering are places into xyzw in cunter-clockwise order,
+ starting with the (u,v) texture coordinate delta at the
+ following locations (-, +), (+, +), (+, -), (-, -), where
+ the magnitude of the deltas are half a texel.
+
+
+.. opcode:: RESINFO - query the dimensions of a given input buffer.
+ dst receives width, height, depth or array size and
+ number of mipmap levels. The dst can have a writemask
+ which will specify what info is the caller interested
+ in.
+ RESINFO dst, src_mip_level, resource
+ e.g.
+ RESINFO TEMP[0], TEMP[1].x, RES[0]
+ src_mip_level is an unsigned integer scalar. If it's
+ out of range then returns 0 for width, height and
+ depth/array size but the total number of mipmap is
+ still returned correctly for the given resource.
+ The returned width, height and depth values are for
+ the mipmap level selected by the src_mip_level and
+ are in the number of texels.
+ For 1d texture array width is in dst.x, array size
+ is in dst.y and dst.zw are always 0.
+
+.. opcode:: SAMPLE_POS - query the position of a given sample.
+ dst receives float4 (x, y, 0, 0) indicated where the
+ sample is located. If the resource is not a multi-sample
+ resource and not a render target, the result is 0.
+
+.. opcode:: SAMPLE_INFO - dst receives number of samples in x.
+ If the resource is not a multi-sample resource and
+ not a render target, the result is 0.
+
+
Explanation of symbols used
------------------------------
@@ -1280,6 +1483,8 @@ wrapping when interpolating by the rasteriser. If TGSI_CYLINDRICAL_WRAP_X
is set to 1, the X component should be interpolated according to cylindrical
wrapping rules.
+If file is TGSI_FILE_RESOURCE, a Declaration Resource token follows.
+
Declaration Semantic
^^^^^^^^^^^^^^^^^^^^^^^^
@@ -1423,6 +1628,23 @@ is a writable stencil reference value. Only the Y component is writable.
This allows the fragment shader to change the fragments stencilref value.
+Declaration Resource
+^^^^^^^^^^^^^^^^^^^^^^^^
+
+ Follows Declaration token if file is TGSI_FILE_RESOURCE.
+
+ DCL RES[#], resource, type(s)
+
+ Declares a shader input resource and assigns it to a RES[#]
+ register.
+
+ resource can be one of BUFFER, 1D, 2D, 3D, CUBE, 1DArray and
+ 2DArray.
+
+ type must be 1 or 4 entries (if specifying on a per-component
+ level) out of UNORM, SNORM, SINT, UINT and FLOAT.
+
+
Properties
^^^^^^^^^^^^^^^^^^^^^^^^
@@ -1464,6 +1686,11 @@ GL_ARB_fragment_coord_conventions extension.
DirectX 9 uses INTEGER.
DirectX 10 uses HALF_INTEGER.
+FS_COLOR0_WRITES_ALL_CBUFS
+""""""""""""""""""""""""""
+Specifies that writes to the fragment shader color 0 are replicated to all
+bound cbufs. This facilitates OpenGL's fragColor output vs fragData[0] where
+fragData is directed to a single color buffer, but fragColor is broadcast.
Texture Sampling and Texture Formats
diff --git a/src/gallium/drivers/cell/ppu/cell_context.c b/src/gallium/drivers/cell/ppu/cell_context.c
index b6b3a700cda..58e647a39fa 100644
--- a/src/gallium/drivers/cell/ppu/cell_context.c
+++ b/src/gallium/drivers/cell/ppu/cell_context.c
@@ -37,6 +37,7 @@
#include "pipe/p_format.h"
#include "util/u_memory.h"
#include "pipe/p_screen.h"
+#include "util/u_inlines.h"
#include "draw/draw_context.h"
#include "draw/draw_private.h"
@@ -61,6 +62,11 @@ static void
cell_destroy_context( struct pipe_context *pipe )
{
struct cell_context *cell = cell_context(pipe);
+ unsigned i;
+
+ for (i = 0; i < cell->num_vertex_buffers; i++) {
+ pipe_resource_reference(&cell->vertex_buffer[i].buffer, NULL);
+ }
util_delete_keymap(cell->fragment_ops_cache, NULL);
@@ -98,18 +104,6 @@ static const struct debug_named_value cell_debug_flags[] = {
DEBUG_NAMED_VALUE_END
};
-static unsigned int
-cell_is_resource_referenced( struct pipe_context *pipe,
- struct pipe_resource *texture,
- unsigned level, int layer)
-{
- /**
- * FIXME: Optimize.
- */
-
- return PIPE_REFERENCED_FOR_READ | PIPE_REFERENCED_FOR_WRITE;
-}
-
struct pipe_context *
cell_create_context(struct pipe_screen *screen,
@@ -134,8 +128,6 @@ cell_create_context(struct pipe_screen *screen,
cell->pipe.clear = cell_clear;
cell->pipe.flush = cell_flush;
- cell->pipe.is_resource_referenced = cell_is_resource_referenced;
-
#if 0
cell->pipe.begin_query = cell_begin_query;
cell->pipe.end_query = cell_end_query;
diff --git a/src/gallium/drivers/cell/ppu/cell_fence.c b/src/gallium/drivers/cell/ppu/cell_fence.c
index e7c9fc46d9f..181fef44f45 100644
--- a/src/gallium/drivers/cell/ppu/cell_fence.c
+++ b/src/gallium/drivers/cell/ppu/cell_fence.c
@@ -59,9 +59,10 @@ cell_fence_signalled(const struct cell_context *cell,
}
-void
+boolean
cell_fence_finish(const struct cell_context *cell,
- const struct cell_fence *fence)
+ const struct cell_fence *fence,
+ uint64_t timeout)
{
while (!cell_fence_signalled(cell, fence)) {
usleep(10);
@@ -75,6 +76,7 @@ cell_fence_finish(const struct cell_context *cell,
}
}
#endif
+ return TRUE;
}
diff --git a/src/gallium/drivers/cell/ppu/cell_fence.h b/src/gallium/drivers/cell/ppu/cell_fence.h
index 536b4ba411a..3568230b1c0 100644
--- a/src/gallium/drivers/cell/ppu/cell_fence.h
+++ b/src/gallium/drivers/cell/ppu/cell_fence.h
@@ -36,12 +36,15 @@ cell_fence_init(struct cell_fence *fence);
extern boolean
cell_fence_signalled(const struct cell_context *cell,
- const struct cell_fence *fence);
+ const struct cell_fence *fence,
+ unsigned flags);
-extern void
+extern boolean
cell_fence_finish(const struct cell_context *cell,
- const struct cell_fence *fence);
+ const struct cell_fence *fence,
+ unsigned flags,
+ uint64_t timeout);
diff --git a/src/gallium/drivers/cell/ppu/cell_flush.c b/src/gallium/drivers/cell/ppu/cell_flush.c
index 8275c9dc9c7..463f4d03eb9 100644
--- a/src/gallium/drivers/cell/ppu/cell_flush.c
+++ b/src/gallium/drivers/cell/ppu/cell_flush.c
@@ -38,19 +38,16 @@
* Called via pipe->flush()
*/
void
-cell_flush(struct pipe_context *pipe, unsigned flags,
+cell_flush(struct pipe_context *pipe,
struct pipe_fence_handle **fence)
{
struct cell_context *cell = cell_context(pipe);
if (fence) {
*fence = NULL;
- /* XXX: Implement real fencing */
- flags |= CELL_FLUSH_WAIT;
}
- if (flags & (PIPE_FLUSH_SWAPBUFFERS | PIPE_FLUSH_RENDER_CACHE))
- flags |= CELL_FLUSH_WAIT;
+ flags |= CELL_FLUSH_WAIT;
draw_flush( cell->draw );
cell_flush_int(cell, flags);
diff --git a/src/gallium/drivers/cell/ppu/cell_screen.c b/src/gallium/drivers/cell/ppu/cell_screen.c
index 8d2b4b96438..0ee124a24fc 100644
--- a/src/gallium/drivers/cell/ppu/cell_screen.c
+++ b/src/gallium/drivers/cell/ppu/cell_screen.c
@@ -149,8 +149,7 @@ cell_is_format_supported( struct pipe_screen *screen,
enum pipe_format format,
enum pipe_texture_target target,
unsigned sample_count,
- unsigned tex_usage,
- unsigned geom_flags )
+ unsigned tex_usage)
{
struct sw_winsys *winsys = cell_screen(screen)->winsys;
diff --git a/src/gallium/drivers/cell/ppu/cell_state_vertex.c b/src/gallium/drivers/cell/ppu/cell_state_vertex.c
index a065d68b5a6..7f65b82619e 100644
--- a/src/gallium/drivers/cell/ppu/cell_state_vertex.c
+++ b/src/gallium/drivers/cell/ppu/cell_state_vertex.c
@@ -33,6 +33,7 @@
#include "cell_state.h"
#include "util/u_memory.h"
+#include "util/u_transfer.h"
#include "draw/draw_context.h"
@@ -82,8 +83,9 @@ cell_set_vertex_buffers(struct pipe_context *pipe,
assert(count <= PIPE_MAX_ATTRIBS);
- memcpy(cell->vertex_buffer, buffers, count * sizeof(buffers[0]));
- cell->num_vertex_buffers = count;
+ util_copy_vertex_buffers(cell->vertex_buffer,
+ &cell->num_vertex_buffers,
+ buffers, count);
cell->dirty |= CELL_NEW_VERTEX;
@@ -114,4 +116,5 @@ cell_init_vertex_functions(struct cell_context *cell)
cell->pipe.create_vertex_elements_state = cell_create_vertex_elements_state;
cell->pipe.bind_vertex_elements_state = cell_bind_vertex_elements_state;
cell->pipe.delete_vertex_elements_state = cell_delete_vertex_elements_state;
+ cell->pipe.redefine_user_buffer = u_default_redefine_user_buffer;
}
diff --git a/src/gallium/drivers/failover/fo_context.c b/src/gallium/drivers/failover/fo_context.c
index e4d289c8a4d..0fefec9aaea 100644
--- a/src/gallium/drivers/failover/fo_context.c
+++ b/src/gallium/drivers/failover/fo_context.c
@@ -29,6 +29,7 @@
#include "pipe/p_defines.h"
#include "util/u_memory.h"
#include "pipe/p_context.h"
+#include "util/u_inlines.h"
#include "fo_context.h"
#include "fo_winsys.h"
@@ -38,6 +39,11 @@
static void failover_destroy( struct pipe_context *pipe )
{
struct failover_context *failover = failover_context( pipe );
+ unsigned i;
+
+ for (i = 0; i < failover->num_vertex_buffers; i++) {
+ pipe_resource_reference(&failover->vertex_buffers[i].buffer, NULL);
+ }
FREE( failover );
}
@@ -73,7 +79,7 @@ static void failover_draw_vbo( struct pipe_context *pipe,
if (failover->mode == FO_SW) {
if (failover->dirty) {
- failover->hw->flush( failover->hw, ~0, NULL );
+ failover->hw->flush( failover->hw, NULL );
failover_state_emit( failover );
}
@@ -83,22 +89,10 @@ static void failover_draw_vbo( struct pipe_context *pipe,
* intervening flush. Unlikely to be much performance impact to
* this:
*/
- failover->sw->flush( failover->sw, ~0, NULL );
+ failover->sw->flush( failover->sw, NULL );
}
}
-static unsigned int
-failover_is_resource_referenced( struct pipe_context *_pipe,
- struct pipe_resource *resource,
- unsigned level, int layer)
-{
- struct failover_context *failover = failover_context( _pipe );
- struct pipe_context *pipe = (failover->mode == FO_HW) ?
- failover->hw : failover->sw;
-
- return pipe->is_resource_referenced(pipe, resource, level, layer);
-}
-
struct pipe_context *failover_create( struct pipe_context *hw,
struct pipe_context *sw )
{
@@ -144,7 +138,6 @@ struct pipe_context *failover_create( struct pipe_context *hw,
#endif
failover->pipe.flush = hw->flush;
- failover->pipe.is_resource_referenced = failover_is_resource_referenced;
failover->dirty = 0;
diff --git a/src/gallium/drivers/failover/fo_state.c b/src/gallium/drivers/failover/fo_state.c
index c265f381b67..b4da1b8b901 100644
--- a/src/gallium/drivers/failover/fo_state.c
+++ b/src/gallium/drivers/failover/fo_state.c
@@ -30,6 +30,7 @@
#include "util/u_inlines.h"
#include "util/u_memory.h"
+#include "util/u_transfer.h"
#include "fo_context.h"
@@ -574,10 +575,10 @@ failover_set_vertex_buffers(struct pipe_context *pipe,
{
struct failover_context *failover = failover_context(pipe);
- memcpy(failover->vertex_buffers, vertex_buffers,
- count * sizeof(vertex_buffers[0]));
+ util_copy_vertex_buffers(failover->vertex_buffers,
+ &failover->num_vertex_buffers,
+ vertex_buffers, count);
failover->dirty |= FO_NEW_VERTEX_BUFFER;
- failover->num_vertex_buffers = count;
failover->sw->set_vertex_buffers( failover->sw, count, vertex_buffers );
failover->hw->set_vertex_buffers( failover->hw, count, vertex_buffers );
}
@@ -656,4 +657,5 @@ failover_init_state_functions( struct failover_context *failover )
failover->pipe.set_constant_buffer = failover_set_constant_buffer;
failover->pipe.create_sampler_view = failover_create_sampler_view;
failover->pipe.sampler_view_destroy = failover_sampler_view_destroy;
+ failover->pipe.redefine_user_buffer = u_default_redefine_user_buffer;
}
diff --git a/src/gallium/drivers/galahad/glhd_context.c b/src/gallium/drivers/galahad/glhd_context.c
index a572ad22bd0..813a21e2ee3 100644
--- a/src/gallium/drivers/galahad/glhd_context.c
+++ b/src/gallium/drivers/galahad/glhd_context.c
@@ -381,6 +381,8 @@ galahad_create_vertex_elements_state(struct pipe_context *_pipe,
struct galahad_context *glhd_pipe = galahad_context(_pipe);
struct pipe_context *pipe = glhd_pipe->pipe;
+ /* XXX check if stride lines up with element size, at least for floats */
+
return pipe->create_vertex_elements_state(pipe,
num_elements,
vertex_elements);
@@ -759,34 +761,15 @@ galahad_clear_depth_stencil(struct pipe_context *_pipe,
static void
galahad_flush(struct pipe_context *_pipe,
- unsigned flags,
struct pipe_fence_handle **fence)
{
struct galahad_context *glhd_pipe = galahad_context(_pipe);
struct pipe_context *pipe = glhd_pipe->pipe;
pipe->flush(pipe,
- flags,
fence);
}
-static unsigned int
-galahad_is_resource_referenced(struct pipe_context *_pipe,
- struct pipe_resource *_resource,
- unsigned level,
- int layer)
-{
- struct galahad_context *glhd_pipe = galahad_context(_pipe);
- struct galahad_resource *glhd_resource = galahad_resource(_resource);
- struct pipe_context *pipe = glhd_pipe->pipe;
- struct pipe_resource *resource = glhd_resource->resource;
-
- return pipe->is_resource_referenced(pipe,
- resource,
- level,
- layer);
-}
-
static struct pipe_sampler_view *
galahad_context_create_sampler_view(struct pipe_context *_pipe,
struct pipe_resource *_resource,
@@ -960,6 +943,19 @@ galahad_context_transfer_inline_write(struct pipe_context *_context,
}
+static void galahad_redefine_user_buffer(struct pipe_context *_context,
+ struct pipe_resource *_resource,
+ unsigned offset, unsigned size)
+{
+ struct galahad_context *glhd_context = galahad_context(_context);
+ struct galahad_resource *glhd_resource = galahad_resource(_resource);
+ struct pipe_context *context = glhd_context->pipe;
+ struct pipe_resource *resource = glhd_resource->resource;
+
+ context->redefine_user_buffer(context, resource, offset, size);
+}
+
+
struct pipe_context *
galahad_context_create(struct pipe_screen *_screen, struct pipe_context *pipe)
{
@@ -1023,7 +1019,6 @@ galahad_context_create(struct pipe_screen *_screen, struct pipe_context *pipe)
glhd_pipe->base.clear_render_target = galahad_clear_render_target;
glhd_pipe->base.clear_depth_stencil = galahad_clear_depth_stencil;
glhd_pipe->base.flush = galahad_flush;
- glhd_pipe->base.is_resource_referenced = galahad_is_resource_referenced;
glhd_pipe->base.create_sampler_view = galahad_context_create_sampler_view;
glhd_pipe->base.sampler_view_destroy = galahad_context_sampler_view_destroy;
glhd_pipe->base.create_surface = galahad_context_create_surface;
@@ -1034,6 +1029,7 @@ galahad_context_create(struct pipe_screen *_screen, struct pipe_context *pipe)
glhd_pipe->base.transfer_unmap = galahad_context_transfer_unmap;
glhd_pipe->base.transfer_flush_region = galahad_context_transfer_flush_region;
glhd_pipe->base.transfer_inline_write = galahad_context_transfer_inline_write;
+ glhd_pipe->base.redefine_user_buffer = galahad_redefine_user_buffer;
glhd_pipe->pipe = pipe;
diff --git a/src/gallium/drivers/galahad/glhd_screen.c b/src/gallium/drivers/galahad/glhd_screen.c
index b4825bef66d..b4edebe4920 100644
--- a/src/gallium/drivers/galahad/glhd_screen.c
+++ b/src/gallium/drivers/galahad/glhd_screen.c
@@ -106,8 +106,7 @@ galahad_screen_is_format_supported(struct pipe_screen *_screen,
enum pipe_format format,
enum pipe_texture_target target,
unsigned sample_count,
- unsigned tex_usage,
- unsigned geom_flags)
+ unsigned tex_usage)
{
struct galahad_screen *glhd_screen = galahad_screen(_screen);
struct pipe_screen *screen = glhd_screen->screen;
@@ -120,8 +119,7 @@ galahad_screen_is_format_supported(struct pipe_screen *_screen,
format,
target,
sample_count,
- tex_usage,
- geom_flags);
+ tex_usage);
}
static struct pipe_context *
@@ -276,30 +274,28 @@ galahad_screen_fence_reference(struct pipe_screen *_screen,
fence);
}
-static int
+static boolean
galahad_screen_fence_signalled(struct pipe_screen *_screen,
- struct pipe_fence_handle *fence,
- unsigned flags)
+ struct pipe_fence_handle *fence)
{
struct galahad_screen *glhd_screen = galahad_screen(_screen);
struct pipe_screen *screen = glhd_screen->screen;
return screen->fence_signalled(screen,
- fence,
- flags);
+ fence);
}
-static int
+static boolean
galahad_screen_fence_finish(struct pipe_screen *_screen,
struct pipe_fence_handle *fence,
- unsigned flags)
+ uint64_t timeout)
{
struct galahad_screen *glhd_screen = galahad_screen(_screen);
struct pipe_screen *screen = glhd_screen->screen;
return screen->fence_finish(screen,
fence,
- flags);
+ timeout);
}
struct pipe_screen *
diff --git a/src/gallium/drivers/i915/TODO b/src/gallium/drivers/i915/TODO
index 94c428bebf8..fba180064c3 100644
--- a/src/gallium/drivers/i915/TODO
+++ b/src/gallium/drivers/i915/TODO
@@ -1,25 +1,30 @@
Random list of problems with i915g:
+- Check if PIPE_CAP_BLEND_EQUATION_SEPARATE work, the code is there.
+ If not fix it! A simple task, good for beginners.
+
+- Add support for PIPE_CAP_POINT_SPRITE either via the draw module or directly
+ via the hardware, look at the classic driver, more advanced.
+
+- What does this button do? Figure out LIS7 with regards to depth offset.
+
- Dies with BadDrawable on GLXFBconfig changes/destruction. Makes piglit totally
unusable :( Upgrading xserver helped here, it doesn't crash anymore. Still
broken, it doesn't update the viewport/get new buffers.
-- Tends to hang the chip after a few minutes of openarena. Looks tiling related,
- at the last frame rendered has tiling corruption over the complete frame.
-
- Kills the chip in 3D_PRIMITIVE LINELIST with mesa-demos/fbotexture in
- wireframe mode.
-
-- Tiling is funny: If unlucky, it renders/samples all black. No clue yet what's
- going on. Seems to depend on tiny details like whethever the sampler
- relocation is fenced/unfenced (broken _with_ fenced reloc using tiling bits!).
+ wireframe mode. Changing the cullmode to cw from none mitigates the crash. As
+ does emitting only one line segment (2 indices) per 3D_PRIMITIVE command in
+ the batch.
- Y-tiling is even more fun. i915c doesn't use it, maybe there's a reason?
Texture sampling from Y-tiled buffers seems to work, though (save above
problems).
+ RESOLVED: Y-tiling works with the render engine, but not with the blitter.
+ Use u_blitter and hw clears (PRIM3D_CLEAR_RECT).
-- Need to validate buffers before usage. Currently do_exec on the batchbuffer
- can fail with -ENOSPC.
+- src/xvmc/i915_structs.h in xf86-video-intel has a few more bits of various
+ commands defined. Scavenge them and see what's useful.
Other bugs can be found here:
https://bugs.freedesktop.org/buglist.cgi?bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&component=Drivers/Gallium/i915g
diff --git a/src/gallium/drivers/i915/i915_batch.h b/src/gallium/drivers/i915/i915_batch.h
index 6e93da76209..ce2691b2fd7 100644
--- a/src/gallium/drivers/i915/i915_batch.h
+++ b/src/gallium/drivers/i915/i915_batch.h
@@ -31,12 +31,15 @@
#include "i915_batchbuffer.h"
-#define BEGIN_BATCH(dwords, relocs) \
- (i915_winsys_batchbuffer_check(i915->batch, dwords, relocs))
+#define BEGIN_BATCH(dwords) \
+ (i915_winsys_batchbuffer_check(i915->batch, dwords))
#define OUT_BATCH(dword) \
i915_winsys_batchbuffer_dword(i915->batch, dword)
+#define OUT_BATCH_F(f) \
+ i915_winsys_batchbuffer_float(i915->batch, f)
+
#define OUT_RELOC(buf, usage, offset) \
i915_winsys_batchbuffer_reloc(i915->batch, buf, usage, offset, false)
diff --git a/src/gallium/drivers/i915/i915_batchbuffer.h b/src/gallium/drivers/i915/i915_batchbuffer.h
index d92b2ccb31e..78554034781 100644
--- a/src/gallium/drivers/i915/i915_batchbuffer.h
+++ b/src/gallium/drivers/i915/i915_batchbuffer.h
@@ -41,11 +41,9 @@ i915_winsys_batchbuffer_space(struct i915_winsys_batchbuffer *batch)
static INLINE boolean
i915_winsys_batchbuffer_check(struct i915_winsys_batchbuffer *batch,
- size_t dwords,
- size_t relocs)
+ size_t dwords)
{
- return dwords * 4 <= i915_winsys_batchbuffer_space(batch) &&
- relocs <= (batch->max_relocs - batch->relocs);
+ return dwords * 4 <= i915_winsys_batchbuffer_space(batch);
}
static INLINE void
@@ -57,6 +55,16 @@ i915_winsys_batchbuffer_dword_unchecked(struct i915_winsys_batchbuffer *batch,
}
static INLINE void
+i915_winsys_batchbuffer_float(struct i915_winsys_batchbuffer *batch,
+ float f)
+{
+ union { float f; unsigned int ui; } uif;
+ uif.f = f;
+ assert (i915_winsys_batchbuffer_space(batch) >= 4);
+ i915_winsys_batchbuffer_dword_unchecked(batch, uif.ui);
+}
+
+static INLINE void
i915_winsys_batchbuffer_dword(struct i915_winsys_batchbuffer *batch,
unsigned dword)
{
@@ -71,10 +79,18 @@ i915_winsys_batchbuffer_write(struct i915_winsys_batchbuffer *batch,
{
assert (i915_winsys_batchbuffer_space(batch) >= size);
- memcpy(data, batch->ptr, size);
+ memcpy(batch->ptr, data, size);
batch->ptr += size;
}
+static INLINE boolean
+i915_winsys_validate_buffers(struct i915_winsys_batchbuffer *batch,
+ struct i915_winsys_buffer **buffers,
+ int num_of_buffers)
+{
+ return batch->iws->validate_buffers(batch, buffers, num_of_buffers);
+}
+
static INLINE int
i915_winsys_batchbuffer_reloc(struct i915_winsys_batchbuffer *batch,
struct i915_winsys_buffer *buffer,
diff --git a/src/gallium/drivers/i915/i915_blit.c b/src/gallium/drivers/i915/i915_blit.c
index 97c25665156..baaed3767ff 100644
--- a/src/gallium/drivers/i915/i915_blit.c
+++ b/src/gallium/drivers/i915/i915_blit.c
@@ -49,6 +49,11 @@ i915_fill_blit(struct i915_context *i915,
I915_DBG(DBG_BLIT, "%s dst:buf(%p)/%d+%d %d,%d sz:%dx%d\n",
__FUNCTION__, dst_buffer, dst_pitch, dst_offset, x, y, w, h);
+ if(!i915_winsys_validate_buffers(i915->batch, &dst_buffer, 1)) {
+ FLUSH_BATCH(NULL);
+ assert(i915_winsys_validate_buffers(i915->batch, &dst_buffer, 1));
+ }
+
switch (cpp) {
case 1:
case 2:
@@ -66,9 +71,9 @@ i915_fill_blit(struct i915_context *i915,
return;
}
- if (!BEGIN_BATCH(6, 1)) {
+ if (!BEGIN_BATCH(6)) {
FLUSH_BATCH(NULL);
- assert(BEGIN_BATCH(6, 1));
+ assert(BEGIN_BATCH(6));
}
OUT_BATCH(CMD);
OUT_BATCH(BR13);
@@ -76,6 +81,8 @@ i915_fill_blit(struct i915_context *i915,
OUT_BATCH(((y + h) << 16) | (x + w));
OUT_RELOC_FENCED(dst_buffer, I915_USAGE_2D_TARGET, dst_offset);
OUT_BATCH(color);
+
+ i915_set_flush_dirty(i915, I915_FLUSH_CACHE);
}
void
@@ -94,6 +101,7 @@ i915_copy_blit(struct i915_context *i915,
unsigned CMD, BR13;
int dst_y2 = dst_y + h;
int dst_x2 = dst_x + w;
+ struct i915_winsys_buffer *buffers[2] = {src_buffer, dst_buffer};
I915_DBG(DBG_BLIT,
@@ -102,6 +110,11 @@ i915_copy_blit(struct i915_context *i915,
src_buffer, src_pitch, src_offset, src_x, src_y,
dst_buffer, dst_pitch, dst_offset, dst_x, dst_y, w, h);
+ if(!i915_winsys_validate_buffers(i915->batch, buffers, 2)) {
+ FLUSH_BATCH(NULL);
+ assert(i915_winsys_validate_buffers(i915->batch, buffers, 2));
+ }
+
switch (cpp) {
case 1:
case 2:
@@ -130,9 +143,9 @@ i915_copy_blit(struct i915_context *i915,
*/
assert (dst_pitch > 0 && src_pitch > 0);
- if (!BEGIN_BATCH(8, 2)) {
+ if (!BEGIN_BATCH(8)) {
FLUSH_BATCH(NULL);
- assert(BEGIN_BATCH(8, 2));
+ assert(BEGIN_BATCH(8));
}
OUT_BATCH(CMD);
OUT_BATCH(BR13);
@@ -142,4 +155,6 @@ i915_copy_blit(struct i915_context *i915,
OUT_BATCH((src_y << 16) | src_x);
OUT_BATCH(((int) src_pitch & 0xffff));
OUT_RELOC_FENCED(src_buffer, I915_USAGE_2D_SOURCE, src_offset);
+
+ i915_set_flush_dirty(i915, I915_FLUSH_CACHE);
}
diff --git a/src/gallium/drivers/i915/i915_clear.c b/src/gallium/drivers/i915/i915_clear.c
index 6d824a507aa..4a97746e981 100644
--- a/src/gallium/drivers/i915/i915_clear.c
+++ b/src/gallium/drivers/i915/i915_clear.c
@@ -31,17 +31,118 @@
#include "util/u_clear.h"
+#include "util/u_format.h"
+#include "util/u_pack_color.h"
#include "i915_context.h"
+#include "i915_screen.h"
+#include "i915_reg.h"
+#include "i915_batch.h"
+#include "i915_resource.h"
+#include "i915_state.h"
+void
+i915_clear_emit(struct pipe_context *pipe, unsigned buffers, const float *rgba,
+ double depth, unsigned stencil,
+ unsigned destx, unsigned desty, unsigned width, unsigned height)
+{
+ struct i915_context *i915 = i915_context(pipe);
+ uint32_t clear_params, clear_color, clear_depth, clear_stencil,
+ clear_color8888, packed_z_stencil;
+ union util_color u_color;
+ float f_depth = depth;
+ struct i915_texture *cbuf_tex, *depth_tex;
+
+ cbuf_tex = depth_tex = NULL;
+ clear_params = 0;
+
+ if (buffers & PIPE_CLEAR_COLOR) {
+ struct pipe_surface *cbuf = i915->framebuffer.cbufs[0];
+
+ clear_params |= CLEARPARAM_WRITE_COLOR;
+ cbuf_tex = i915_texture(cbuf->texture);
+ util_pack_color(rgba, cbuf->format, &u_color);
+ if (util_format_get_blocksize(cbuf_tex->b.b.format) == 4)
+ clear_color = u_color.ui;
+ else
+ clear_color = (u_color.ui & 0xffff) | (u_color.ui << 16);
+
+ util_pack_color(rgba, PIPE_FORMAT_B8G8R8A8_UNORM, &u_color);
+ clear_color8888 = u_color.ui;
+ } else
+ clear_color = clear_color8888 = 0;
+
+ clear_depth = clear_stencil = 0;
+ if (buffers & PIPE_CLEAR_DEPTH) {
+ struct pipe_surface *zbuf = i915->framebuffer.zsbuf;
+
+ clear_params |= CLEARPARAM_WRITE_DEPTH;
+ depth_tex = i915_texture(zbuf->texture);
+ packed_z_stencil = util_pack_z_stencil(depth_tex->b.b.format, depth, stencil);
+
+ if (util_format_get_blocksize(depth_tex->b.b.format) == 4) {
+ /* Avoid read-modify-write if there's no stencil. */
+ if (buffers & PIPE_CLEAR_STENCIL
+ || depth_tex->b.b.format != PIPE_FORMAT_Z24_UNORM_S8_USCALED) {
+ clear_params |= CLEARPARAM_WRITE_STENCIL;
+ clear_stencil = packed_z_stencil & 0xff;
+ clear_depth = packed_z_stencil;
+ } else
+ clear_depth = packed_z_stencil & 0xffffff00;
+ } else {
+ clear_depth = (clear_depth & 0xffff) | (clear_depth << 16);
+ }
+ }
+
+ if (i915->hardware_dirty)
+ i915_emit_hardware_state(i915);
+
+ if (!BEGIN_BATCH(7 + 7)) {
+ FLUSH_BATCH(NULL);
+
+ i915_emit_hardware_state(i915);
+ i915->vbo_flushed = 1;
+
+ assert(BEGIN_BATCH(7 + 7));
+ }
+
+ OUT_BATCH(_3DSTATE_CLEAR_PARAMETERS);
+ OUT_BATCH(clear_params | CLEARPARAM_CLEAR_RECT);
+ OUT_BATCH(clear_color);
+ OUT_BATCH(clear_depth);
+ OUT_BATCH(clear_color8888);
+ OUT_BATCH_F(f_depth);
+ OUT_BATCH(clear_stencil);
+
+ OUT_BATCH(_3DPRIMITIVE | PRIM3D_CLEAR_RECT | 5);
+ OUT_BATCH_F(destx + width);
+ OUT_BATCH_F(desty + height);
+ OUT_BATCH_F(destx);
+ OUT_BATCH_F(desty + height);
+ OUT_BATCH_F(destx);
+ OUT_BATCH_F(desty);
+}
/**
* Clear the given buffers to the specified values.
* No masking, no scissor (clear entire buffer).
*/
void
-i915_clear(struct pipe_context *pipe, unsigned buffers, const float *rgba,
- double depth, unsigned stencil)
+i915_clear_blitter(struct pipe_context *pipe, unsigned buffers, const float *rgba,
+ double depth, unsigned stencil)
{
util_clear(pipe, &i915_context(pipe)->framebuffer, buffers, rgba, depth,
stencil);
}
+
+void
+i915_clear_render(struct pipe_context *pipe, unsigned buffers, const float *rgba,
+ double depth, unsigned stencil)
+{
+ struct i915_context *i915 = i915_context(pipe);
+
+ if (i915->dirty)
+ i915_update_derived(i915);
+
+ i915_clear_emit(pipe, buffers, rgba, depth, stencil,
+ 0, 0, i915->framebuffer.width, i915->framebuffer.height);
+}
diff --git a/src/gallium/drivers/i915/i915_context.c b/src/gallium/drivers/i915/i915_context.c
index 847dd6dd47e..7a98ef73c1f 100644
--- a/src/gallium/drivers/i915/i915_context.c
+++ b/src/gallium/drivers/i915/i915_context.c
@@ -39,6 +39,9 @@
#include "pipe/p_screen.h"
+DEBUG_GET_ONCE_BOOL_OPTION(i915_no_vbuf, "I915_NO_VBUF", FALSE)
+
+
/*
* Draw functions
*/
@@ -50,18 +53,17 @@ i915_draw_vbo(struct pipe_context *pipe, const struct pipe_draw_info *info)
struct i915_context *i915 = i915_context(pipe);
struct draw_context *draw = i915->draw;
void *mapped_indices = NULL;
- unsigned i;
+ unsigned cbuf_dirty;
- if (i915->dirty)
- i915_update_derived(i915);
/*
- * Map vertex buffers
+ * Ack vs contants here, helps ipers a lot.
*/
- for (i = 0; i < i915->num_vertex_buffers; i++) {
- void *buf = i915_buffer(i915->vertex_buffer[i].buffer)->data;
- draw_set_mapped_vertex_buffer(draw, i, buf);
- }
+ cbuf_dirty = i915->dirty & I915_NEW_VS_CONSTANTS;
+ i915->dirty &= ~I915_NEW_VS_CONSTANTS;
+
+ if (i915->dirty)
+ i915_update_derived(i915);
/*
* Map index buffer, if present
@@ -70,23 +72,21 @@ i915_draw_vbo(struct pipe_context *pipe, const struct pipe_draw_info *info)
mapped_indices = i915_buffer(i915->index_buffer.buffer)->data;
draw_set_mapped_index_buffer(draw, mapped_indices);
- draw_set_mapped_constant_buffer(draw, PIPE_SHADER_VERTEX, 0,
- i915->current.constants[PIPE_SHADER_VERTEX],
- (i915->current.num_user_constants[PIPE_SHADER_VERTEX] *
- 4 * sizeof(float)));
+ if (cbuf_dirty) {
+ if (i915->constants[PIPE_SHADER_VERTEX])
+ draw_set_mapped_constant_buffer(draw, PIPE_SHADER_VERTEX, 0,
+ i915_buffer(i915->constants[PIPE_SHADER_VERTEX])->data,
+ (i915->current.num_user_constants[PIPE_SHADER_VERTEX] *
+ 4 * sizeof(float)));
+ else
+ draw_set_mapped_constant_buffer(draw, PIPE_SHADER_VERTEX, 0, NULL, 0);
+ }
/*
* Do the drawing
*/
draw_vbo(i915->draw, info);
- /*
- * unmap vertex/index buffers
- */
- for (i = 0; i < i915->num_vertex_buffers; i++) {
- draw_set_mapped_vertex_buffer(draw, i, NULL);
- }
-
if (mapped_indices)
draw_set_mapped_index_buffer(draw, NULL);
}
@@ -103,6 +103,9 @@ static void i915_destroy(struct pipe_context *pipe)
int i;
draw_destroy(i915->draw);
+
+ if (i915->blitter)
+ util_blitter_destroy(i915->blitter);
if(i915->batch)
i915->iws->batchbuffer_destroy(i915->batch);
@@ -113,6 +116,11 @@ static void i915_destroy(struct pipe_context *pipe)
}
pipe_surface_reference(&i915->framebuffer.zsbuf, NULL);
+ /* unbind constant buffers */
+ for (i = 0; i < PIPE_SHADER_TYPES; i++) {
+ pipe_resource_reference(&i915->constants[i], NULL);
+ }
+
FREE(i915);
}
@@ -132,16 +140,27 @@ i915_create_context(struct pipe_screen *screen, void *priv)
i915->base.destroy = i915_destroy;
- i915->base.clear = i915_clear;
+ if (i915_screen(screen)->debug.use_blitter)
+ i915->base.clear = i915_clear_blitter;
+ else
+ i915->base.clear = i915_clear_render;
i915->base.draw_vbo = i915_draw_vbo;
+ /* init this before draw */
+ util_slab_create(&i915->transfer_pool, sizeof(struct pipe_transfer),
+ 16, UTIL_SLAB_SINGLETHREADED);
+
+ /* Batch stream debugging is a bit hacked up at the moment:
+ */
+ i915->batch = i915->iws->batchbuffer_create(i915->iws);
+
/*
* Create drawing context and plug our rendering stage into it.
*/
i915->draw = draw_create(&i915->base);
assert(i915->draw);
- if (!debug_get_bool_option("I915_NO_VBUF", FALSE)) {
+ if (!debug_get_option_i915_no_vbuf()) {
draw_set_rasterize_stage(i915->draw, i915_draw_vbuf_stage(i915));
} else {
draw_set_rasterize_stage(i915->draw, i915_draw_render_stage(i915));
@@ -155,12 +174,19 @@ i915_create_context(struct pipe_screen *screen, void *priv)
draw_install_aaline_stage(i915->draw, &i915->base);
draw_install_aapoint_stage(i915->draw, &i915->base);
+ /* augmented draw pipeline clobbers state functions */
+ i915_init_fixup_state_functions(i915);
+
+ /* Create blitter last - calls state creation functions. */
+ i915->blitter = util_blitter_create(&i915->base);
+ assert(i915->blitter);
+
i915->dirty = ~0;
i915->hardware_dirty = ~0;
-
- /* Batch stream debugging is a bit hacked up at the moment:
- */
- i915->batch = i915->iws->batchbuffer_create(i915->iws);
+ i915->immediate_dirty = ~0;
+ i915->dynamic_dirty = ~0;
+ i915->static_dirty = ~0;
+ i915->flush_dirty = 0;
return &i915->base;
}
diff --git a/src/gallium/drivers/i915/i915_context.h b/src/gallium/drivers/i915/i915_context.h
index 7103a1b8c16..dacf50e870d 100644
--- a/src/gallium/drivers/i915/i915_context.h
+++ b/src/gallium/drivers/i915/i915_context.h
@@ -37,6 +37,9 @@
#include "tgsi/tgsi_scan.h"
+#include "util/u_slab.h"
+#include "util/u_blitter.h"
+
struct i915_winsys;
struct i915_winsys_buffer;
@@ -134,7 +137,6 @@ struct i915_state
unsigned immediate[I915_MAX_IMMEDIATE];
unsigned dynamic[I915_MAX_DYNAMIC];
- float constants[PIPE_SHADER_TYPES][I915_MAX_CONSTANT][4];
/** number of constants passed in through a constant buffer */
uint num_user_constants[PIPE_SHADER_TYPES];
@@ -149,6 +151,15 @@ struct i915_state
/** Describes the current hardware vertex layout */
struct vertex_info vertex_info;
+ /* static state (dst/depth buffer state) */
+ struct i915_winsys_buffer *cbuf_bo;
+ unsigned cbuf_flags;
+ struct i915_winsys_buffer *depth_bo;
+ unsigned depth_flags;
+ unsigned dst_buf_vars;
+ uint32_t draw_offset;
+ uint32_t draw_size;
+
unsigned id; /* track lost context events */
};
@@ -175,7 +186,7 @@ struct i915_rasterizer_state {
unsigned LIS7;
unsigned sc[1];
- const struct pipe_rasterizer_state *templ;
+ struct pipe_rasterizer_state templ;
union { float f; unsigned u; } ds[2];
};
@@ -212,21 +223,18 @@ struct i915_context {
struct pipe_blend_color blend_color;
struct pipe_stencil_ref stencil_ref;
struct pipe_clip_state clip;
- /* XXX unneded */
struct pipe_resource *constants[PIPE_SHADER_TYPES];
struct pipe_framebuffer_state framebuffer;
struct pipe_poly_stipple poly_stipple;
struct pipe_scissor_state scissor;
struct pipe_sampler_view *fragment_sampler_views[PIPE_MAX_SAMPLERS];
struct pipe_viewport_state viewport;
- struct pipe_vertex_buffer vertex_buffer[PIPE_MAX_ATTRIBS];
struct pipe_index_buffer index_buffer;
unsigned dirty;
unsigned num_samplers;
unsigned num_fragment_sampler_views;
- unsigned num_vertex_buffers;
struct i915_winsys_batchbuffer *batch;
@@ -237,6 +245,35 @@ struct i915_context {
struct i915_state current;
unsigned hardware_dirty;
+ unsigned immediate_dirty : I915_MAX_IMMEDIATE;
+ unsigned dynamic_dirty : I915_MAX_DYNAMIC;
+ unsigned static_dirty : 4;
+ unsigned flush_dirty : 2;
+
+ struct i915_winsys_buffer *validation_buffers[2 + 1 + I915_TEX_UNITS];
+ int num_validation_buffers;
+
+ struct util_slab_mempool transfer_pool;
+
+ /** blitter/hw-clear */
+ struct blitter_context* blitter;
+
+ /** State tracking needed by u_blitter for save/restore. */
+ void *saved_fs;
+ void (*saved_bind_fs_state)(struct pipe_context *pipe, void *shader);
+ void *saved_vs;
+ struct pipe_clip_state saved_clip;
+ struct i915_velems_state *saved_velems;
+ unsigned saved_nr_vertex_buffers;
+ struct pipe_vertex_buffer saved_vertex_buffers[PIPE_MAX_ATTRIBS];
+ unsigned saved_nr_samplers;
+ void *saved_samplers[PIPE_MAX_SAMPLERS];
+ void (*saved_bind_sampler_states)(struct pipe_context *pipe,
+ unsigned num, void **sampler);
+ unsigned saved_nr_sampler_views;
+ struct pipe_sampler_view *saved_sampler_views[PIPE_MAX_SAMPLERS];
+ void (*saved_set_sampler_views)(struct pipe_context *pipe,
+ unsigned num, struct pipe_sampler_view **views);
};
/* A flag for each state_tracker state object:
@@ -253,9 +290,11 @@ struct i915_context {
#define I915_NEW_DEPTH_STENCIL 0x200
#define I915_NEW_SAMPLER 0x400
#define I915_NEW_SAMPLER_VIEW 0x800
-#define I915_NEW_CONSTANTS 0x1000
-#define I915_NEW_VBO 0x2000
-#define I915_NEW_VS 0x4000
+#define I915_NEW_VS_CONSTANTS 0x1000
+#define I915_NEW_FS_CONSTANTS 0x2000
+#define I915_NEW_GS_CONSTANTS 0x4000
+#define I915_NEW_VBO 0x8000
+#define I915_NEW_VS 0x10000
/* Driver's internally generated state flags:
@@ -272,7 +311,25 @@ struct i915_context {
#define I915_HW_PROGRAM (1<<I915_CACHE_PROGRAM)
#define I915_HW_CONSTANTS (1<<I915_CACHE_CONSTANTS)
#define I915_HW_IMMEDIATE (1<<(I915_MAX_CACHE+0))
-#define I915_HW_INVARIENT (1<<(I915_MAX_CACHE+1))
+#define I915_HW_INVARIANT (1<<(I915_MAX_CACHE+1))
+#define I915_HW_FLUSH (1<<(I915_MAX_CACHE+1))
+
+/* hw flush handling */
+#define I915_FLUSH_CACHE 1
+#define I915_PIPELINE_FLUSH 2
+
+/* split up static state */
+#define I915_DST_BUF_COLOR 1
+#define I915_DST_BUF_DEPTH 2
+#define I915_DST_VARS 4
+#define I915_DST_RECT 8
+
+static INLINE
+void i915_set_flush_dirty(struct i915_context *i915, unsigned flush)
+{
+ i915->hardware_dirty |= I915_HW_FLUSH;
+ i915->flush_dirty |= flush;
+}
/***********************************************************************
@@ -297,14 +354,20 @@ void i915_emit_hardware_state(struct i915_context *i915 );
/***********************************************************************
* i915_clear.c:
*/
-void i915_clear( struct pipe_context *pipe, unsigned buffers, const float *rgba,
- double depth, unsigned stencil);
+void i915_clear_blitter(struct pipe_context *pipe, unsigned buffers, const float *rgba,
+ double depth, unsigned stencil);
+void i915_clear_render(struct pipe_context *pipe, unsigned buffers, const float *rgba,
+ double depth, unsigned stencil);
+void i915_clear_emit(struct pipe_context *pipe, unsigned buffers, const float *rgba,
+ double depth, unsigned stencil,
+ unsigned destx, unsigned desty, unsigned width, unsigned height);
/***********************************************************************
*
*/
void i915_init_state_functions( struct i915_context *i915 );
+void i915_init_fixup_state_functions( struct i915_context *i915 );
void i915_init_flush_functions( struct i915_context *i915 );
void i915_init_string_functions( struct i915_context *i915 );
diff --git a/src/gallium/drivers/i915/i915_debug.c b/src/gallium/drivers/i915/i915_debug.c
index d7150c99c4e..c4eed473e90 100644
--- a/src/gallium/drivers/i915/i915_debug.c
+++ b/src/gallium/drivers/i915/i915_debug.c
@@ -46,12 +46,18 @@ static const struct debug_named_value debug_options[] = {
};
unsigned i915_debug = 0;
-boolean i915_tiling = TRUE;
-void i915_debug_init(struct i915_screen *screen)
+DEBUG_GET_ONCE_FLAGS_OPTION(i915_debug, "I915_DEBUG", debug_options, 0)
+DEBUG_GET_ONCE_BOOL_OPTION(i915_no_tiling, "I915_NO_TILING", FALSE)
+DEBUG_GET_ONCE_BOOL_OPTION(i915_lie, "I915_LIE", FALSE)
+DEBUG_GET_ONCE_BOOL_OPTION(i915_use_blitter, "I915_USE_BLITTER", FALSE)
+
+void i915_debug_init(struct i915_screen *is)
{
- i915_debug = debug_get_flags_option("I915_DEBUG", debug_options, 0);
- i915_tiling = !debug_get_bool_option("I915_NO_TILING", FALSE);
+ i915_debug = debug_get_option_i915_debug();
+ is->debug.tiling = !debug_get_option_i915_no_tiling();
+ is->debug.lie = debug_get_option_i915_lie();
+ is->debug.use_blitter = debug_get_option_i915_use_blitter();
}
@@ -948,7 +954,8 @@ i915_dump_dirty(struct i915_context *i915, const char *func)
{I915_NEW_DEPTH_STENCIL, "depth_stencil"},
{I915_NEW_SAMPLER, "sampler"},
{I915_NEW_SAMPLER_VIEW, "sampler_view"},
- {I915_NEW_CONSTANTS, "constants"},
+ {I915_NEW_VS_CONSTANTS, "vs_const"},
+ {I915_NEW_FS_CONSTANTS, "fs_const"},
{I915_NEW_VBO, "vbo"},
{I915_NEW_VS, "vs"},
{0, NULL},
@@ -976,7 +983,7 @@ i915_dump_hardware_dirty(struct i915_context *i915, const char *func)
{I915_HW_PROGRAM, "program"},
{I915_HW_CONSTANTS, "constants"},
{I915_HW_IMMEDIATE, "immediate"},
- {I915_HW_INVARIENT, "invarient"},
+ {I915_HW_INVARIANT, "invariant"},
{0, NULL},
};
int i;
diff --git a/src/gallium/drivers/i915/i915_debug.h b/src/gallium/drivers/i915/i915_debug.h
index 11af7662f0a..fa60799d0c5 100644
--- a/src/gallium/drivers/i915/i915_debug.h
+++ b/src/gallium/drivers/i915/i915_debug.h
@@ -46,7 +46,6 @@ struct i915_winsys_batchbuffer;
#define DBG_CONSTANTS 0x20
extern unsigned i915_debug;
-extern boolean i915_tiling;
#ifdef DEBUG
static INLINE boolean
diff --git a/src/gallium/drivers/i915/i915_flush.c b/src/gallium/drivers/i915/i915_flush.c
index a2c70b11991..b4e81147c4f 100644
--- a/src/gallium/drivers/i915/i915_flush.c
+++ b/src/gallium/drivers/i915/i915_flush.c
@@ -39,34 +39,12 @@
static void i915_flush_pipe( struct pipe_context *pipe,
- unsigned flags,
struct pipe_fence_handle **fence )
{
struct i915_context *i915 = i915_context(pipe);
draw_flush(i915->draw);
-#if 0
- /* Do we need to emit an MI_FLUSH command to flush the hardware
- * caches?
- */
- if (flags & (PIPE_FLUSH_RENDER_CACHE | PIPE_FLUSH_TEXTURE_CACHE)) {
- unsigned flush = MI_FLUSH;
-
- if (!(flags & PIPE_FLUSH_RENDER_CACHE))
- flush |= INHIBIT_FLUSH_RENDER_CACHE;
-
- if (flags & PIPE_FLUSH_TEXTURE_CACHE)
- flush |= FLUSH_MAP_CACHE;
-
- if (!BEGIN_BATCH(1, 0)) {
- FLUSH_BATCH(NULL);
- assert(BEGIN_BATCH(1, 0));
- }
- OUT_BATCH( flush );
- }
-#endif
-
if (i915->batch->map == i915->batch->ptr) {
return;
}
@@ -74,7 +52,6 @@ static void i915_flush_pipe( struct pipe_context *pipe,
/* If there are no flags, just flush pending commands to hardware:
*/
FLUSH_BATCH(fence);
- i915->vbo_flushed = 1;
I915_DBG(DBG_FLUSH, "%s: #####\n", __FUNCTION__);
}
@@ -93,5 +70,11 @@ void i915_flush(struct i915_context *i915, struct pipe_fence_handle **fence)
struct i915_winsys_batchbuffer *batch = i915->batch;
batch->iws->batchbuffer_flush(batch, fence);
+ i915->vbo_flushed = 1;
i915->hardware_dirty = ~0;
+ i915->immediate_dirty = ~0;
+ i915->dynamic_dirty = ~0;
+ i915->static_dirty = ~0;
+ /* kernel emits flushes in between batchbuffers */
+ i915->flush_dirty = 0;
}
diff --git a/src/gallium/drivers/i915/i915_fpc_translate.c b/src/gallium/drivers/i915/i915_fpc_translate.c
index 25c53210be8..b145b58be30 100644
--- a/src/gallium/drivers/i915/i915_fpc_translate.c
+++ b/src/gallium/drivers/i915/i915_fpc_translate.c
@@ -924,6 +924,14 @@ i915_translate_instructions(struct i915_fp_compile *p,
tgsi_parse_token( &parse );
switch( parse.FullToken.Token.Type ) {
+ case TGSI_TOKEN_TYPE_PROPERTY:
+ /*
+ * We only support one cbuf, but we still need to ignore the property
+ * correctly so we don't hit the assert at the end of the switch case.
+ */
+ assert(parse.FullToken.FullProperty.Property.PropertyName ==
+ TGSI_PROPERTY_FS_COLOR0_WRITES_ALL_CBUFS);
+ break;
case TGSI_TOKEN_TYPE_DECLARATION:
if (parse.FullToken.FullDeclaration.Declaration.File
== TGSI_FILE_CONSTANT) {
@@ -1166,15 +1174,24 @@ void
i915_translate_fragment_program( struct i915_context *i915,
struct i915_fragment_shader *fs)
{
- struct i915_fp_compile *p = i915_init_compile(i915, fs);
+ struct i915_fp_compile *p;
const struct tgsi_token *tokens = fs->state.tokens;
- i915_find_wpos_space(p);
-
#if 0
tgsi_dump(tokens, 0);
#endif
+ /* hw doesn't seem to like empty frag programs, even when the depth write
+ * fixup gets emitted below - may that one is fishy, too? */
+ if (fs->info.num_instructions == 1) {
+ i915_use_passthrough_shader(fs);
+
+ return;
+ }
+
+ p = i915_init_compile(i915, fs);
+ i915_find_wpos_space(p);
+
i915_translate_instructions(p, tokens);
i915_fixup_depth_write(p);
diff --git a/src/gallium/drivers/i915/i915_prim_emit.c b/src/gallium/drivers/i915/i915_prim_emit.c
index dd997e2cf48..85656cd7846 100644
--- a/src/gallium/drivers/i915/i915_prim_emit.c
+++ b/src/gallium/drivers/i915/i915_prim_emit.c
@@ -144,15 +144,14 @@ emit_prim( struct draw_stage *stage,
vertex_size = i915->current.vertex_info.size * 4; /* in bytes */
assert(vertex_size >= 12); /* never smaller than 12 bytes */
- if (!BEGIN_BATCH( 1 + nr * vertex_size / 4, 0 )) {
+ if (!BEGIN_BATCH( 1 + nr * vertex_size / 4)) {
FLUSH_BATCH(NULL);
/* Make sure state is re-emitted after a flush:
*/
- i915_update_derived( i915 );
i915_emit_hardware_state( i915 );
- if (!BEGIN_BATCH( 1 + nr * vertex_size / 4, 0 )) {
+ if (!BEGIN_BATCH( 1 + nr * vertex_size / 4)) {
assert(0);
return;
}
diff --git a/src/gallium/drivers/i915/i915_prim_vbuf.c b/src/gallium/drivers/i915/i915_prim_vbuf.c
index baebbc7bae3..79db3b650eb 100644
--- a/src/gallium/drivers/i915/i915_prim_vbuf.c
+++ b/src/gallium/drivers/i915/i915_prim_vbuf.c
@@ -181,6 +181,7 @@ i915_vbuf_render_new_buf(struct i915_vbuf_render *i915_render, size_t size)
struct i915_winsys *iws = i915->iws;
if (i915_render->vbo) {
+ iws->buffer_unmap(iws, i915_render->vbo);
iws->buffer_destroy(iws, i915_render->vbo);
/*
* XXX If buffers where referenced then this should be done in
@@ -208,6 +209,7 @@ i915_vbuf_render_new_buf(struct i915_vbuf_render *i915_render, size_t size)
i915_render->vbo = iws->buffer_create(iws, i915_render->vbo_size,
I915_NEW_VERTEX);
+ i915_render->vbo_ptr = iws->buffer_map(iws, i915_render->vbo, TRUE);
}
/**
@@ -262,16 +264,13 @@ i915_vbuf_render_map_vertices(struct vbuf_render *render)
{
struct i915_vbuf_render *i915_render = i915_vbuf_render(render);
struct i915_context *i915 = i915_render->i915;
- struct i915_winsys *iws = i915->iws;
if (i915->vbo_flushed)
debug_printf("%s bad vbo flush occured stalling on hw\n", __FUNCTION__);
#ifdef VBUF_MAP_BUFFER
- i915_render->vbo_ptr = iws->buffer_map(iws, i915_render->vbo, TRUE);
return (unsigned char *)i915_render->vbo_ptr + i915_render->vbo_sw_offset;
#else
- (void)iws;
return (unsigned char *)i915_render->vbo_ptr;
#endif
}
@@ -288,7 +287,7 @@ i915_vbuf_render_unmap_vertices(struct vbuf_render *render,
i915_render->vbo_max_index = max_index;
i915_render->vbo_max_used = MAX2(i915_render->vbo_max_used, i915_render->vertex_size * (max_index + 1));
#ifdef VBUF_MAP_BUFFER
- iws->buffer_unmap(iws, i915_render->vbo);
+ (void)iws;
#else
i915_render->map_used_start = i915_render->vertex_size * min_index;
i915_render->map_used_end = i915_render->vertex_size * (max_index + 1);
@@ -466,16 +465,15 @@ draw_arrays_fallback(struct vbuf_render *render,
if (i915->hardware_dirty)
i915_emit_hardware_state(i915);
- if (!BEGIN_BATCH(1 + (nr_indices + 1)/2, 1)) {
+ if (!BEGIN_BATCH(1 + (nr_indices + 1)/2)) {
FLUSH_BATCH(NULL);
/* Make sure state is re-emitted after a flush:
*/
- i915_update_derived(i915);
i915_emit_hardware_state(i915);
i915->vbo_flushed = 1;
- if (!BEGIN_BATCH(1 + (nr_indices + 1)/2, 1)) {
+ if (!BEGIN_BATCH(1 + (nr_indices + 1)/2)) {
assert(0);
goto out;
}
@@ -515,16 +513,15 @@ i915_vbuf_render_draw_arrays(struct vbuf_render *render,
if (i915->hardware_dirty)
i915_emit_hardware_state(i915);
- if (!BEGIN_BATCH(2, 0)) {
+ if (!BEGIN_BATCH(2)) {
FLUSH_BATCH(NULL);
/* Make sure state is re-emitted after a flush:
*/
- i915_update_derived(i915);
i915_emit_hardware_state(i915);
i915->vbo_flushed = 1;
- if (!BEGIN_BATCH(2, 0)) {
+ if (!BEGIN_BATCH(2)) {
assert(0);
goto out;
}
@@ -636,16 +633,15 @@ i915_vbuf_render_draw_elements(struct vbuf_render *render,
if (i915->hardware_dirty)
i915_emit_hardware_state(i915);
- if (!BEGIN_BATCH(1 + (nr_indices + 1)/2, 1)) {
+ if (!BEGIN_BATCH(1 + (nr_indices + 1)/2)) {
FLUSH_BATCH(NULL);
/* Make sure state is re-emitted after a flush:
*/
- i915_update_derived(i915);
i915_emit_hardware_state(i915);
i915->vbo_flushed = 1;
- if (!BEGIN_BATCH(1 + (nr_indices + 1)/2, 1)) {
+ if (!BEGIN_BATCH(1 + (nr_indices + 1)/2)) {
assert(0);
goto out;
}
@@ -684,6 +680,15 @@ static void
i915_vbuf_render_destroy(struct vbuf_render *render)
{
struct i915_vbuf_render *i915_render = i915_vbuf_render(render);
+ struct i915_context *i915 = i915_render->i915;
+ struct i915_winsys *iws = i915->iws;
+
+ if (i915_render->vbo) {
+ i915->vbo = NULL;
+ iws->buffer_unmap(iws, i915_render->vbo);
+ iws->buffer_destroy(iws, i915_render->vbo);
+ }
+
FREE(i915_render);
}
diff --git a/src/gallium/drivers/i915/i915_reg.h b/src/gallium/drivers/i915/i915_reg.h
index 5e4e80ddf6b..6fe032cdb6e 100644
--- a/src/gallium/drivers/i915/i915_reg.h
+++ b/src/gallium/drivers/i915/i915_reg.h
@@ -148,6 +148,7 @@
/* p161 */
#define _3DSTATE_DST_BUF_VARS_CMD (CMD_3D | (0x1d<<24) | (0x85<<16))
/* Dword 1 */
+#define CLASSIC_EARLY_DEPTH (1<<31)
#define TEX_DEFAULT_COLOR_OGL (0<<30)
#define TEX_DEFAULT_COLOR_D3D (1<<30)
#define ZR_EARLY_DEPTH (1<<29)
diff --git a/src/gallium/drivers/i915/i915_resource.c b/src/gallium/drivers/i915/i915_resource.c
index 499233ceb9b..7f52ba11d61 100644
--- a/src/gallium/drivers/i915/i915_resource.c
+++ b/src/gallium/drivers/i915/i915_resource.c
@@ -31,7 +31,6 @@ i915_resource_from_handle(struct pipe_screen * screen,
void
i915_init_resource_functions(struct i915_context *i915 )
{
- i915->base.is_resource_referenced = u_default_is_resource_referenced;
i915->base.get_transfer = u_get_transfer_vtbl;
i915->base.transfer_map = u_transfer_map_vtbl;
i915->base.transfer_flush_region = u_transfer_flush_region_vtbl;
diff --git a/src/gallium/drivers/i915/i915_resource_buffer.c b/src/gallium/drivers/i915/i915_resource_buffer.c
index d3d6a6752ae..d02c7687037 100644
--- a/src/gallium/drivers/i915/i915_resource_buffer.c
+++ b/src/gallium/drivers/i915/i915_resource_buffer.c
@@ -60,6 +60,38 @@ i915_buffer_destroy(struct pipe_screen *screen,
}
+static struct pipe_transfer *
+i915_get_transfer(struct pipe_context *pipe,
+ struct pipe_resource *resource,
+ unsigned level,
+ unsigned usage,
+ const struct pipe_box *box)
+{
+ struct i915_context *i915 = i915_context(pipe);
+ struct pipe_transfer *transfer = util_slab_alloc(&i915->transfer_pool);
+
+ if (transfer == NULL)
+ return NULL;
+
+ transfer->resource = resource;
+ transfer->level = level;
+ transfer->usage = usage;
+ transfer->box = *box;
+
+ /* Note strides are zero, this is ok for buffers, but not for
+ * textures 2d & higher at least.
+ */
+ return transfer;
+}
+
+static void
+i915_transfer_destroy(struct pipe_context *pipe,
+ struct pipe_transfer *transfer)
+{
+ struct i915_context *i915 = i915_context(pipe);
+ util_slab_free(&i915->transfer_pool, transfer);
+}
+
static void *
i915_buffer_transfer_map( struct pipe_context *pipe,
struct pipe_transfer *transfer )
@@ -91,9 +123,8 @@ struct u_resource_vtbl i915_buffer_vtbl =
{
i915_buffer_get_handle, /* get_handle */
i915_buffer_destroy, /* resource_destroy */
- NULL, /* is_resource_referenced */
- u_default_get_transfer, /* get_transfer */
- u_default_transfer_destroy, /* transfer_destroy */
+ i915_get_transfer, /* get_transfer */
+ i915_transfer_destroy, /* transfer_destroy */
i915_buffer_transfer_map, /* transfer_map */
u_default_transfer_flush_region, /* transfer_flush_region */
u_default_transfer_unmap, /* transfer_unmap */
@@ -115,8 +146,7 @@ i915_buffer_create(struct pipe_screen *screen,
buf->b.vtbl = &i915_buffer_vtbl;
pipe_reference_init(&buf->b.b.reference, 1);
buf->b.b.screen = screen;
-
- buf->data = MALLOC(template->width0);
+ buf->data = align_malloc(template->width0, 16);
buf->free_on_destroy = TRUE;
if (!buf->data)
diff --git a/src/gallium/drivers/i915/i915_resource_texture.c b/src/gallium/drivers/i915/i915_resource_texture.c
index f19106f3414..7816925d230 100644
--- a/src/gallium/drivers/i915/i915_resource_texture.c
+++ b/src/gallium/drivers/i915/i915_resource_texture.c
@@ -172,19 +172,22 @@ i915_texture_set_image_offset(struct i915_texture *tex,
}
static enum i915_winsys_buffer_tile
-i915_texture_tiling(struct pipe_resource *pt)
+i915_texture_tiling(struct i915_screen *is, struct i915_texture *tex)
{
- if (!i915_tiling)
+ if (!is->debug.tiling)
return I915_TILE_NONE;
- if (pt->target == PIPE_TEXTURE_1D)
+ if (tex->b.b.target == PIPE_TEXTURE_1D)
return I915_TILE_NONE;
- if (util_format_is_s3tc(pt->format))
+ if (util_format_is_s3tc(tex->b.b.format))
/* XXX X-tiling might make sense */
return I915_TILE_NONE;
- return I915_TILE_X;
+ if (is->debug.use_blitter)
+ return I915_TILE_X;
+ else
+ return I915_TILE_Y;
}
@@ -401,11 +404,7 @@ i915_texture_layout_3d(struct i915_texture *tex)
static boolean
i915_texture_layout(struct i915_texture * tex)
{
- struct pipe_resource *pt = &tex->b.b;
-
- tex->tiling = i915_texture_tiling(pt);
-
- switch (pt->target) {
+ switch (tex->b.b.target) {
case PIPE_TEXTURE_1D:
case PIPE_TEXTURE_2D:
case PIPE_TEXTURE_RECT:
@@ -649,11 +648,7 @@ i945_texture_layout_cube(struct i915_texture *tex)
static boolean
i945_texture_layout(struct i915_texture * tex)
{
- struct pipe_resource *pt = &tex->b.b;
-
- tex->tiling = i915_texture_tiling(pt);
-
- switch (pt->target) {
+ switch (tex->b.b.target) {
case PIPE_TEXTURE_1D:
case PIPE_TEXTURE_2D:
case PIPE_TEXTURE_RECT:
@@ -664,7 +659,7 @@ i945_texture_layout(struct i915_texture * tex)
i945_texture_layout_3d(tex);
break;
case PIPE_TEXTURE_CUBE:
- if (!util_format_is_s3tc(pt->format))
+ if (!util_format_is_s3tc(tex->b.b.format))
i9x5_texture_layout_cube(tex);
else
i945_texture_layout_cube(tex);
@@ -716,14 +711,16 @@ i915_texture_destroy(struct pipe_screen *screen,
}
static struct pipe_transfer *
-i915_texture_get_transfer(struct pipe_context *context,
+i915_texture_get_transfer(struct pipe_context *pipe,
struct pipe_resource *resource,
unsigned level,
unsigned usage,
const struct pipe_box *box)
{
+ struct i915_context *i915 = i915_context(pipe);
struct i915_texture *tex = i915_texture(resource);
- struct pipe_transfer *transfer = CALLOC_STRUCT(pipe_transfer);
+ struct pipe_transfer *transfer = util_slab_alloc(&i915->transfer_pool);
+
if (transfer == NULL)
return NULL;
@@ -737,6 +734,14 @@ i915_texture_get_transfer(struct pipe_context *context,
return transfer;
}
+static void
+i915_transfer_destroy(struct pipe_context *pipe,
+ struct pipe_transfer *transfer)
+{
+ struct i915_context *i915 = i915_context(pipe);
+ util_slab_free(&i915->transfer_pool, transfer);
+}
+
static void *
i915_texture_transfer_map(struct pipe_context *pipe,
struct pipe_transfer *transfer)
@@ -754,6 +759,9 @@ i915_texture_transfer_map(struct pipe_context *pipe,
assert(box->z == 0);
offset = i915_texture_offset(tex, transfer->level, box->z);
+ /* TODO this is a sledgehammer */
+ pipe->flush(pipe, NULL);
+
map = iws->buffer_map(iws, tex->buffer,
(transfer->usage & PIPE_TRANSFER_WRITE) ? TRUE : FALSE);
if (map == NULL)
@@ -779,9 +787,8 @@ struct u_resource_vtbl i915_texture_vtbl =
{
i915_texture_get_handle, /* get_handle */
i915_texture_destroy, /* resource_destroy */
- NULL, /* is_resource_referenced */
i915_texture_get_transfer, /* get_transfer */
- u_default_transfer_destroy, /* transfer_destroy */
+ i915_transfer_destroy, /* transfer_destroy */
i915_texture_transfer_map, /* transfer_map */
u_default_transfer_flush_region, /* transfer_flush_region */
i915_texture_transfer_unmap, /* transfer_unmap */
@@ -808,6 +815,8 @@ i915_texture_create(struct pipe_screen *screen,
pipe_reference_init(&tex->b.b.reference, 1);
tex->b.b.screen = screen;
+ tex->tiling = i915_texture_tiling(is, tex);
+
if (is->is_i945) {
if (!i945_texture_layout(tex))
goto fail;
diff --git a/src/gallium/drivers/i915/i915_screen.c b/src/gallium/drivers/i915/i915_screen.c
index f66478e729c..e62b609eb5a 100644
--- a/src/gallium/drivers/i915/i915_screen.c
+++ b/src/gallium/drivers/i915/i915_screen.c
@@ -35,7 +35,6 @@
#include "i915_debug.h"
#include "i915_context.h"
#include "i915_screen.h"
-#include "i915_surface.h"
#include "i915_resource.h"
#include "i915_winsys.h"
#include "i915_public.h"
@@ -99,59 +98,84 @@ i915_get_name(struct pipe_screen *screen)
}
static int
-i915_get_param(struct pipe_screen *screen, enum pipe_cap param)
+i915_get_param(struct pipe_screen *screen, enum pipe_cap cap)
{
- switch (param) {
- case PIPE_CAP_MAX_TEXTURE_IMAGE_UNITS:
- return 8;
- case PIPE_CAP_MAX_VERTEX_TEXTURE_UNITS:
- return 0;
- case PIPE_CAP_MAX_COMBINED_SAMPLERS:
- return 8;
+ struct i915_screen *is = i915_screen(screen);
+
+ switch (cap) {
+ /* Supported features (boolean caps). */
+ case PIPE_CAP_ANISOTROPIC_FILTER:
+ case PIPE_CAP_DEPTHSTENCIL_CLEAR_SEPARATE:
case PIPE_CAP_NPOT_TEXTURES:
- return 1;
+ case PIPE_CAP_PRIMITIVE_RESTART: /* draw module */
+ case PIPE_CAP_TEXTURE_MIRROR_REPEAT:
+ case PIPE_CAP_TEXTURE_SHADOW_MAP:
case PIPE_CAP_TWO_SIDED_STENCIL:
return 1;
- case PIPE_CAP_GLSL:
- return 0;
- case PIPE_CAP_ANISOTROPIC_FILTER:
- return 0;
+
+ /* Features that should be supported (boolean caps). */
+ /* XXX: Just test the code */
+ case PIPE_CAP_BLEND_EQUATION_SEPARATE:
+ /* XXX: No code but hw supports it */
case PIPE_CAP_POINT_SPRITE:
+ /* Also lie about these when asked to (needed for GLSL / GL 2.0) */
+ return is->debug.lie ? 1 : 0;
+
+ /* Unsupported features (boolean caps). */
+ case PIPE_CAP_ARRAY_TEXTURES:
+ case PIPE_CAP_DEPTH_CLAMP:
+ case PIPE_CAP_INDEP_BLEND_ENABLE:
+ case PIPE_CAP_INDEP_BLEND_FUNC:
+ case PIPE_CAP_TGSI_INSTANCEID:
+ case PIPE_CAP_VERTEX_ELEMENT_INSTANCE_DIVISOR:
+ case PIPE_CAP_SHADER_STENCIL_EXPORT:
+ case PIPE_CAP_TEXTURE_MIRROR_CLAMP:
+ case PIPE_CAP_TEXTURE_SWIZZLE:
+ case PIPE_CAP_TIMER_QUERY:
return 0;
- case PIPE_CAP_MAX_RENDER_TARGETS:
- return 1;
+
+ /* Features we can lie about (boolean caps). */
+ case PIPE_CAP_GLSL:
case PIPE_CAP_OCCLUSION_QUERY:
+ return is->debug.lie ? 1 : 0;
+
+ /* Texturing. */
+ case PIPE_CAP_MAX_TEXTURE_IMAGE_UNITS:
+ case PIPE_CAP_MAX_COMBINED_SAMPLERS:
+ return 8;
+ case PIPE_CAP_MAX_VERTEX_TEXTURE_UNITS:
return 0;
- case PIPE_CAP_TIMER_QUERY:
- return 0;
- case PIPE_CAP_TEXTURE_SHADOW_MAP:
- return 1;
case PIPE_CAP_MAX_TEXTURE_2D_LEVELS:
return I915_MAX_TEXTURE_2D_LEVELS;
case PIPE_CAP_MAX_TEXTURE_3D_LEVELS:
return I915_MAX_TEXTURE_3D_LEVELS;
case PIPE_CAP_MAX_TEXTURE_CUBE_LEVELS:
return I915_MAX_TEXTURE_2D_LEVELS;
+
+ /* Render targets. */
+ case PIPE_CAP_MAX_RENDER_TARGETS:
+ return 1;
+
+ /* Fragment coordinate conventions. */
case PIPE_CAP_TGSI_FS_COORD_ORIGIN_UPPER_LEFT:
case PIPE_CAP_TGSI_FS_COORD_PIXEL_CENTER_HALF_INTEGER:
return 1;
case PIPE_CAP_TGSI_FS_COORD_ORIGIN_LOWER_LEFT:
case PIPE_CAP_TGSI_FS_COORD_PIXEL_CENTER_INTEGER:
return 0;
- case PIPE_CAP_DEPTHSTENCIL_CLEAR_SEPARATE:
- /* disable for now */
- return 0;
+
default:
+ debug_printf("%s: Unkown cap %u.\n", __FUNCTION__, cap);
return 0;
}
}
static int
-i915_get_shader_param(struct pipe_screen *screen, unsigned shader, enum pipe_shader_cap param)
+i915_get_shader_param(struct pipe_screen *screen, unsigned shader, enum pipe_shader_cap cap)
{
switch(shader) {
case PIPE_SHADER_VERTEX:
- return draw_get_shader_param(shader, param);
+ return draw_get_shader_param(shader, cap);
case PIPE_SHADER_FRAGMENT:
break;
default:
@@ -159,7 +183,7 @@ i915_get_shader_param(struct pipe_screen *screen, unsigned shader, enum pipe_sha
}
/* XXX: these are just shader model 2.0 values, fix this! */
- switch(param) {
+ switch(cap) {
case PIPE_SHADER_CAP_MAX_INSTRUCTIONS:
return 96;
case PIPE_SHADER_CAP_MAX_ALU_INSTRUCTIONS:
@@ -192,15 +216,15 @@ i915_get_shader_param(struct pipe_screen *screen, unsigned shader, enum pipe_sha
case PIPE_SHADER_CAP_SUBROUTINES:
return 0;
default:
- assert(0);
+ debug_printf("%s: Unkown cap %u.\n", __FUNCTION__, cap);
return 0;
}
}
static float
-i915_get_paramf(struct pipe_screen *screen, enum pipe_cap param)
+i915_get_paramf(struct pipe_screen *screen, enum pipe_cap cap)
{
- switch (param) {
+ switch(cap) {
case PIPE_CAP_MAX_LINE_WIDTH:
/* fall-through */
case PIPE_CAP_MAX_LINE_WIDTH_AA:
@@ -218,6 +242,7 @@ i915_get_paramf(struct pipe_screen *screen, enum pipe_cap param)
return 16.0;
default:
+ debug_printf("%s: Unkown cap %u.\n", __FUNCTION__, cap);
return 0;
}
}
@@ -227,8 +252,7 @@ i915_is_format_supported(struct pipe_screen *screen,
enum pipe_format format,
enum pipe_texture_target target,
unsigned sample_count,
- unsigned tex_usage,
- unsigned geom_flags)
+ unsigned tex_usage)
{
static const enum pipe_format tex_supported[] = {
PIPE_FORMAT_B8G8R8A8_UNORM,
@@ -295,24 +319,23 @@ i915_fence_reference(struct pipe_screen *screen,
is->iws->fence_reference(is->iws, ptr, fence);
}
-static int
+static boolean
i915_fence_signalled(struct pipe_screen *screen,
- struct pipe_fence_handle *fence,
- unsigned flags)
+ struct pipe_fence_handle *fence)
{
struct i915_screen *is = i915_screen(screen);
- return is->iws->fence_signalled(is->iws, fence);
+ return is->iws->fence_signalled(is->iws, fence) == 0;
}
-static int
+static boolean
i915_fence_finish(struct pipe_screen *screen,
struct pipe_fence_handle *fence,
- unsigned flags)
+ uint64_t timeout)
{
struct i915_screen *is = i915_screen(screen);
- return is->iws->fence_finish(is->iws, fence);
+ return is->iws->fence_finish(is->iws, fence) == 0;
}
@@ -322,6 +345,20 @@ i915_fence_finish(struct pipe_screen *screen,
static void
+i915_flush_frontbuffer(struct pipe_screen *screen,
+ struct pipe_resource *resource,
+ unsigned level, unsigned layer,
+ void *winsys_drawable_handle)
+{
+ /* XXX: Dummy right now. */
+ (void)screen;
+ (void)resource;
+ (void)level;
+ (void)layer;
+ (void)winsys_drawable_handle;
+}
+
+static void
i915_destroy_screen(struct pipe_screen *screen)
{
struct i915_screen *is = i915_screen(screen);
@@ -372,6 +409,7 @@ i915_screen_create(struct i915_winsys *iws)
is->base.winsys = NULL;
is->base.destroy = i915_destroy_screen;
+ is->base.flush_frontbuffer = i915_flush_frontbuffer;
is->base.get_name = i915_get_name;
is->base.get_vendor = i915_get_vendor;
diff --git a/src/gallium/drivers/i915/i915_screen.h b/src/gallium/drivers/i915/i915_screen.h
index 0c4186c68ee..cfc585b5350 100644
--- a/src/gallium/drivers/i915/i915_screen.h
+++ b/src/gallium/drivers/i915/i915_screen.h
@@ -45,16 +45,12 @@ struct i915_screen
struct i915_winsys *iws;
boolean is_i945;
-};
-
-/**
- * Subclass of pipe_transfer
- */
-struct i915_transfer
-{
- struct pipe_transfer base;
- unsigned offset;
+ struct {
+ boolean tiling;
+ boolean lie;
+ boolean use_blitter;
+ } debug;
};
@@ -69,11 +65,5 @@ i915_screen(struct pipe_screen *pscreen)
return (struct i915_screen *) pscreen;
}
-static INLINE struct i915_transfer *
-i915_transfer(struct pipe_transfer *transfer)
-{
- return (struct i915_transfer *)transfer;
-}
-
#endif /* I915_SCREEN_H */
diff --git a/src/gallium/drivers/i915/i915_state.c b/src/gallium/drivers/i915/i915_state.c
index bbfcff6bc4d..1b57c5776f2 100644
--- a/src/gallium/drivers/i915/i915_state.c
+++ b/src/gallium/drivers/i915/i915_state.c
@@ -33,6 +33,7 @@
#include "util/u_inlines.h"
#include "util/u_math.h"
#include "util/u_memory.h"
+#include "util/u_transfer.h"
#include "tgsi/tgsi_parse.h"
#include "i915_context.h"
@@ -57,10 +58,8 @@ translate_wrap_mode(unsigned wrap)
return TEXCOORDMODE_CLAMP_EDGE;
case PIPE_TEX_WRAP_CLAMP_TO_BORDER:
return TEXCOORDMODE_CLAMP_BORDER;
- /*
- case PIPE_TEX_WRAP_MIRRORED_REPEAT:
+ case PIPE_TEX_WRAP_MIRROR_REPEAT:
return TEXCOORDMODE_MIRROR;
- */
default:
return TEXCOORDMODE_WRAP;
}
@@ -288,6 +287,17 @@ i915_create_sampler_state(struct pipe_context *pipe,
return cso;
}
+static void i915_fixup_bind_sampler_states(struct pipe_context *pipe,
+ unsigned num, void **sampler)
+{
+ struct i915_context *i915 = i915_context(pipe);
+
+ i915->saved_nr_samplers = num;
+ memcpy(&i915->saved_samplers, sampler, sizeof(void *) * num);
+
+ i915->saved_bind_sampler_states(pipe, num, sampler);
+}
+
static void i915_bind_sampler_states(struct pipe_context *pipe,
unsigned num, void **sampler)
{
@@ -467,6 +477,17 @@ i915_create_fs_state(struct pipe_context *pipe,
}
static void
+i915_fixup_bind_fs_state(struct pipe_context *pipe, void *shader)
+{
+ struct i915_context *i915 = i915_context(pipe);
+ draw_flush(i915->draw);
+
+ i915->saved_fs = shader;
+
+ i915->saved_bind_fs_state(pipe, shader);
+}
+
+static void
i915_bind_fs_state(struct pipe_context *pipe, void *shader)
{
struct i915_context *i915 = i915_context(pipe);
@@ -506,6 +527,8 @@ static void i915_bind_vs_state(struct pipe_context *pipe, void *shader)
{
struct i915_context *i915 = i915_context(pipe);
+ i915->saved_vs = shader;
+
/* just pass-through to draw module */
draw_bind_vertex_shader(i915->draw, (struct draw_vertex_shader *) shader);
@@ -525,32 +548,74 @@ static void i915_set_constant_buffer(struct pipe_context *pipe,
struct pipe_resource *buf)
{
struct i915_context *i915 = i915_context(pipe);
- draw_flush(i915->draw);
+ unsigned new_num = 0;
+ boolean diff = TRUE;
- /* Make a copy of shader constants.
- * During fragment program translation we may add additional
- * constants to the array.
- *
- * We want to consider the situation where some user constants
- * (ex: a material color) may change frequently but the shader program
- * stays the same. In that case we should only be updating the first
- * N constants, leaving any extras from shader translation alone.
- */
+
+ /* XXX don't support geom shaders now */
+ if (shader == PIPE_SHADER_GEOMETRY)
+ return;
+
+ /* if we have a new buffer compare it with the old one */
if (buf) {
- struct i915_buffer *ir = i915_buffer(buf);
- memcpy(i915->current.constants[shader], ir->data, ir->b.b.width0);
- i915->current.num_user_constants[shader] = (ir->b.b.width0 /
- 4 * sizeof(float));
- }
- else {
- i915->current.num_user_constants[shader] = 0;
+ struct i915_buffer *ibuf = i915_buffer(buf);
+ struct pipe_resource *old_buf = i915->constants[shader];
+ struct i915_buffer *old = old_buf ? i915_buffer(old_buf) : NULL;
+ unsigned old_num = i915->current.num_user_constants[shader];
+
+ new_num = ibuf->b.b.width0 / 4 * sizeof(float);
+
+ if (old_num == new_num) {
+ if (old_num == 0)
+ diff = FALSE;
+#if 0
+ /* XXX no point in running this code since st/mesa only uses user buffers */
+ /* Can't compare the buffer data since they are userbuffers */
+ else if (old && old->free_on_destroy)
+ diff = memcmp(old->data, ibuf->data, ibuf->b.b.width0);
+#else
+ (void)old;
+#endif
+ }
+ } else {
+ diff = i915->current.num_user_constants[shader] != 0;
}
+ /*
+ * flush before updateing the state.
+ */
+ if (diff && shader == PIPE_SHADER_FRAGMENT)
+ draw_flush(i915->draw);
+
+ pipe_resource_reference(&i915->constants[shader], buf);
+ i915->current.num_user_constants[shader] = new_num;
- i915->dirty |= I915_NEW_CONSTANTS;
+ if (diff)
+ i915->dirty |= shader == PIPE_SHADER_VERTEX ? I915_NEW_VS_CONSTANTS : I915_NEW_FS_CONSTANTS;
}
+static void
+i915_fixup_set_fragment_sampler_views(struct pipe_context *pipe,
+ unsigned num,
+ struct pipe_sampler_view **views)
+{
+ struct i915_context *i915 = i915_context(pipe);
+ int i;
+
+ for (i = 0; i < num; i++)
+ pipe_sampler_view_reference(&i915->saved_sampler_views[i],
+ views[i]);
+
+ for (i = num; i < i915->saved_nr_sampler_views; i++)
+ pipe_sampler_view_reference(&i915->saved_sampler_views[i],
+ NULL);
+
+ i915->saved_nr_sampler_views = num;
+
+ i915->saved_set_sampler_views(pipe, num, views);
+}
+
static void i915_set_fragment_sampler_views(struct pipe_context *pipe,
unsigned num,
struct pipe_sampler_view **views)
@@ -622,7 +687,8 @@ static void i915_set_framebuffer_state(struct pipe_context *pipe,
i915->framebuffer.height = fb->height;
i915->framebuffer.nr_cbufs = fb->nr_cbufs;
for (i = 0; i < PIPE_MAX_COLOR_BUFS; i++) {
- pipe_surface_reference(&i915->framebuffer.cbufs[i], fb->cbufs[i]);
+ pipe_surface_reference(&i915->framebuffer.cbufs[i],
+ i < fb->nr_cbufs ? fb->cbufs[i] : NULL);
}
pipe_surface_reference(&i915->framebuffer.zsbuf, fb->zsbuf);
@@ -637,6 +703,8 @@ static void i915_set_clip_state( struct pipe_context *pipe,
struct i915_context *i915 = i915_context(pipe);
draw_flush(i915->draw);
+ i915->saved_clip = *clip;
+
draw_set_clip_state(i915->draw, clip);
i915->dirty |= I915_NEW_CLIP;
@@ -667,7 +735,7 @@ i915_create_rasterizer_state(struct pipe_context *pipe,
{
struct i915_rasterizer_state *cso = CALLOC_STRUCT( i915_rasterizer_state );
- cso->templ = rasterizer;
+ cso->templ = *rasterizer;
cso->color_interp = rasterizer->flatshade ? INTERP_CONSTANT : INTERP_LINEAR;
cso->light_twoside = rasterizer->light_twoside;
cso->ds[0].u = _3DSTATE_DEPTH_OFFSET_SCALE;
@@ -738,7 +806,7 @@ static void i915_bind_rasterizer_state( struct pipe_context *pipe,
/* pass-through to draw module */
draw_set_rasterizer_state(i915->draw,
- (i915->rasterizer ? i915->rasterizer->templ : NULL),
+ (i915->rasterizer ? &(i915->rasterizer->templ) : NULL),
raster);
i915->dirty |= I915_NEW_RASTERIZER;
@@ -755,16 +823,28 @@ static void i915_set_vertex_buffers(struct pipe_context *pipe,
const struct pipe_vertex_buffer *buffers)
{
struct i915_context *i915 = i915_context(pipe);
- /* Because we change state before the draw_set_vertex_buffers call
- * we need a flush here, just to be sure.
- */
- draw_flush(i915->draw);
+ struct draw_context *draw = i915->draw;
+ int i;
- memcpy(i915->vertex_buffer, buffers, count * sizeof(buffers[0]));
- i915->num_vertex_buffers = count;
+ util_copy_vertex_buffers(i915->saved_vertex_buffers,
+ &i915->saved_nr_vertex_buffers,
+ buffers, count);
+#if 0
+ /* XXX doesn't look like this is needed */
+ /* unmap old */
+ for (i = 0; i < i915->num_vertex_buffers; i++) {
+ draw_set_mapped_vertex_buffer(draw, i, NULL);
+ }
+#endif
/* pass-through to draw module */
- draw_set_vertex_buffers(i915->draw, count, buffers);
+ draw_set_vertex_buffers(draw, count, buffers);
+
+ /* map new */
+ for (i = 0; i < count; i++) {
+ void *buf = i915_buffer(buffers[i].buffer)->data;
+ draw_set_mapped_vertex_buffer(draw, i, buf);
+ }
}
static void *
@@ -789,10 +869,7 @@ i915_bind_vertex_elements_state(struct pipe_context *pipe,
struct i915_context *i915 = i915_context(pipe);
struct i915_velems_state *i915_velems = (struct i915_velems_state *) velems;
- /* Because we change state before the draw_set_vertex_buffers call
- * we need a flush here, just to be sure.
- */
- draw_flush(i915->draw);
+ i915->saved_velems = velems;
/* pass-through to draw module */
if (i915_velems) {
@@ -870,4 +947,16 @@ i915_init_state_functions( struct i915_context *i915 )
i915->base.set_viewport_state = i915_set_viewport_state;
i915->base.set_vertex_buffers = i915_set_vertex_buffers;
i915->base.set_index_buffer = i915_set_index_buffer;
+ i915->base.redefine_user_buffer = u_default_redefine_user_buffer;
+}
+
+void
+i915_init_fixup_state_functions( struct i915_context *i915 )
+{
+ i915->saved_bind_fs_state = i915->base.bind_fs_state;
+ i915->base.bind_fs_state = i915_fixup_bind_fs_state;
+ i915->saved_bind_sampler_states = i915->base.bind_fragment_sampler_states;
+ i915->base.bind_fragment_sampler_states = i915_fixup_bind_sampler_states;
+ i915->saved_set_sampler_views = i915->base.set_fragment_sampler_views;
+ i915->base.set_fragment_sampler_views = i915_fixup_set_fragment_sampler_views;
}
diff --git a/src/gallium/drivers/i915/i915_state.h b/src/gallium/drivers/i915/i915_state.h
index b4074dc35ba..3f4e40294e6 100644
--- a/src/gallium/drivers/i915/i915_state.h
+++ b/src/gallium/drivers/i915/i915_state.h
@@ -48,6 +48,7 @@ extern struct i915_tracked_state i915_hw_immediate;
extern struct i915_tracked_state i915_hw_dynamic;
extern struct i915_tracked_state i915_hw_fs;
extern struct i915_tracked_state i915_hw_framebuffer;
+extern struct i915_tracked_state i915_hw_dst_buf_vars;
extern struct i915_tracked_state i915_hw_constants;
void i915_update_derived(struct i915_context *i915);
diff --git a/src/gallium/drivers/i915/i915_state_derived.c b/src/gallium/drivers/i915/i915_state_derived.c
index 1d4026a214e..59ac2f7292a 100644
--- a/src/gallium/drivers/i915/i915_state_derived.c
+++ b/src/gallium/drivers/i915/i915_state_derived.c
@@ -165,6 +165,7 @@ static struct i915_tracked_state *atoms[] = {
&i915_hw_dynamic,
&i915_hw_fs,
&i915_hw_framebuffer,
+ &i915_hw_dst_buf_vars,
&i915_hw_constants,
NULL,
};
diff --git a/src/gallium/drivers/i915/i915_state_dynamic.c b/src/gallium/drivers/i915/i915_state_dynamic.c
index d61a8c3407f..204cee6fe9e 100644
--- a/src/gallium/drivers/i915/i915_state_dynamic.c
+++ b/src/gallium/drivers/i915/i915_state_dynamic.c
@@ -46,18 +46,34 @@
* (active) state every time a 4kb boundary is crossed.
*/
-static INLINE void set_dynamic_indirect(struct i915_context *i915,
- unsigned offset,
- const unsigned *src,
- unsigned dwords)
+static INLINE void set_dynamic(struct i915_context *i915,
+ unsigned offset,
+ const unsigned state)
+{
+ if (i915->current.dynamic[offset] == state)
+ return;
+
+ i915->current.dynamic[offset] = state;
+ i915->dynamic_dirty |= 1 << offset;
+ i915->hardware_dirty |= I915_HW_DYNAMIC;
+}
+
+
+
+static INLINE void set_dynamic_array(struct i915_context *i915,
+ unsigned offset,
+ const unsigned *src,
+ unsigned dwords)
{
unsigned i;
if (!memcmp(src, &i915->current.dynamic[offset], dwords * 4))
return;
- for (i = 0; i < dwords; i++)
+ for (i = 0; i < dwords; i++) {
i915->current.dynamic[offset + i] = src[i];
+ i915->dynamic_dirty |= 1 << (offset + i);
+ }
i915->hardware_dirty |= I915_HW_DYNAMIC;
}
@@ -79,12 +95,7 @@ static void upload_MODES4(struct i915_context *i915)
*/
modes4 |= i915->blend->modes4;
- /* Always, so that we know when state is in-active:
- */
- set_dynamic_indirect(i915,
- I915_DYNAMIC_MODES4,
- &modes4,
- 1);
+ set_dynamic(i915, I915_DYNAMIC_MODES4, modes4);
}
const struct i915_tracked_state i915_upload_MODES4 = {
@@ -107,10 +118,7 @@ static void upload_BFO(struct i915_context *i915)
bfo[0] |= i915->stencil_ref.ref_value[1] << BFO_STENCIL_REF_SHIFT;
}
- set_dynamic_indirect(i915,
- I915_DYNAMIC_BFO_0,
- &(bfo[0]),
- 2);
+ set_dynamic_array(i915, I915_DYNAMIC_BFO_0, bfo, 2);
}
const struct i915_tracked_state i915_upload_BFO = {
@@ -141,10 +149,7 @@ static void upload_BLENDCOLOR(struct i915_context *i915)
color[3]);
}
- set_dynamic_indirect(i915,
- I915_DYNAMIC_BC_0,
- bc,
- 2);
+ set_dynamic_array(i915, I915_DYNAMIC_BC_0, bc, 2);
}
const struct i915_tracked_state i915_upload_BLENDCOLOR = {
@@ -161,10 +166,7 @@ static void upload_IAB(struct i915_context *i915)
{
unsigned iab = i915->blend->iab;
- set_dynamic_indirect(i915,
- I915_DYNAMIC_IAB,
- &iab,
- 1);
+ set_dynamic(i915, I915_DYNAMIC_IAB, iab);
}
const struct i915_tracked_state i915_upload_IAB = {
@@ -179,10 +181,8 @@ const struct i915_tracked_state i915_upload_IAB = {
*/
static void upload_DEPTHSCALE(struct i915_context *i915)
{
- set_dynamic_indirect(i915,
- I915_DYNAMIC_DEPTHSCALE_0,
- &(i915->rasterizer->ds[0].u),
- 2);
+ set_dynamic_array(i915, I915_DYNAMIC_DEPTHSCALE_0,
+ &i915->rasterizer->ds[0].u, 2);
}
const struct i915_tracked_state i915_upload_DEPTHSCALE = {
@@ -234,10 +234,7 @@ static void upload_STIPPLE(struct i915_context *i915)
(p[3] << 12));
}
- set_dynamic_indirect(i915,
- I915_DYNAMIC_STP_0,
- &st[0],
- 2);
+ set_dynamic_array(i915, I915_DYNAMIC_STP_0, st, 2);
}
const struct i915_tracked_state i915_upload_STIPPLE = {
@@ -253,10 +250,7 @@ const struct i915_tracked_state i915_upload_STIPPLE = {
*/
static void upload_SCISSOR_ENABLE( struct i915_context *i915 )
{
- set_dynamic_indirect(i915,
- I915_DYNAMIC_SC_ENA_0,
- &(i915->rasterizer->sc[0]),
- 1);
+ set_dynamic(i915, I915_DYNAMIC_SC_ENA_0, i915->rasterizer->sc[0]);
}
const struct i915_tracked_state i915_upload_SCISSOR_ENABLE = {
@@ -282,10 +276,7 @@ static void upload_SCISSOR_RECT(struct i915_context *i915)
sc[1] = (y1 << 16) | (x1 & 0xffff);
sc[2] = (y2 << 16) | (x2 & 0xffff);
- set_dynamic_indirect(i915,
- I915_DYNAMIC_SC_RECT_0,
- &sc[0],
- 3);
+ set_dynamic_array(i915, I915_DYNAMIC_SC_RECT_0, sc, 3);
}
const struct i915_tracked_state i915_upload_SCISSOR_RECT = {
diff --git a/src/gallium/drivers/i915/i915_state_emit.c b/src/gallium/drivers/i915/i915_state_emit.c
index c48d53ffbb2..0155cd83510 100644
--- a/src/gallium/drivers/i915/i915_state_emit.c
+++ b/src/gallium/drivers/i915/i915_state_emit.c
@@ -35,411 +35,425 @@
#include "pipe/p_context.h"
#include "pipe/p_defines.h"
-static unsigned translate_format( enum pipe_format format )
+#include "util/u_math.h"
+#include "util/u_memory.h"
+
+struct i915_tracked_hw_state {
+ const char *name;
+ void (*validate)(struct i915_context *, unsigned *batch_space);
+ void (*emit)(struct i915_context *);
+ unsigned dirty, batch_space;
+};
+
+
+static void
+validate_flush(struct i915_context *i915, unsigned *batch_space)
{
- switch (format) {
- case PIPE_FORMAT_B8G8R8A8_UNORM:
- return COLOR_BUF_ARGB8888;
- case PIPE_FORMAT_B5G6R5_UNORM:
- return COLOR_BUF_RGB565;
- default:
- assert(0);
- return 0;
- }
+ *batch_space = i915->flush_dirty ? 1 : 0;
}
-static unsigned translate_depth_format( enum pipe_format zformat )
+static void
+emit_flush(struct i915_context *i915)
{
- switch (zformat) {
- case PIPE_FORMAT_Z24X8_UNORM:
- case PIPE_FORMAT_Z24_UNORM_S8_USCALED:
- return DEPTH_FRMT_24_FIXED_8_OTHER;
- case PIPE_FORMAT_Z16_UNORM:
- return DEPTH_FRMT_16_FIXED;
- default:
- assert(0);
- return 0;
- }
+ /* Cache handling is very cheap atm. State handling can request to flushes:
+ * - I915_FLUSH_CACHE which is a flush everything request and
+ * - I915_PIPELINE_FLUSH which is specifically for the draw_offset flush.
+ * Because the cache handling is so dumb, no explicit "invalidate map cache".
+ * Also, the first is a strict superset of the latter, so the following logic
+ * works. */
+ if (i915->flush_dirty & I915_FLUSH_CACHE)
+ OUT_BATCH(MI_FLUSH | FLUSH_MAP_CACHE);
+ else if (i915->flush_dirty & I915_PIPELINE_FLUSH)
+ OUT_BATCH(MI_FLUSH | INHIBIT_FLUSH_RENDER_CACHE);
}
+uint32_t invariant_state[] = {
+ _3DSTATE_AA_CMD | AA_LINE_ECAAR_WIDTH_ENABLE | AA_LINE_ECAAR_WIDTH_1_0 |
+ AA_LINE_REGION_WIDTH_ENABLE | AA_LINE_REGION_WIDTH_1_0,
-/**
- * Examine framebuffer state to determine width, height.
- */
-static boolean
-framebuffer_size(const struct pipe_framebuffer_state *fb,
- uint *width, uint *height)
+ _3DSTATE_DFLT_DIFFUSE_CMD, 0,
+
+ _3DSTATE_DFLT_SPEC_CMD, 0,
+
+ _3DSTATE_DFLT_Z_CMD, 0,
+
+ _3DSTATE_COORD_SET_BINDINGS |
+ CSB_TCB(0, 0) |
+ CSB_TCB(1, 1) |
+ CSB_TCB(2, 2) |
+ CSB_TCB(3, 3) |
+ CSB_TCB(4, 4) |
+ CSB_TCB(5, 5) |
+ CSB_TCB(6, 6) |
+ CSB_TCB(7, 7),
+
+ _3DSTATE_RASTER_RULES_CMD |
+ ENABLE_POINT_RASTER_RULE |
+ OGL_POINT_RASTER_RULE |
+ ENABLE_LINE_STRIP_PROVOKE_VRTX |
+ ENABLE_TRI_FAN_PROVOKE_VRTX |
+ LINE_STRIP_PROVOKE_VRTX(1) |
+ TRI_FAN_PROVOKE_VRTX(2) |
+ ENABLE_TEXKILL_3D_4D |
+ TEXKILL_4D,
+
+ _3DSTATE_DEPTH_SUBRECT_DISABLE,
+
+ /* disable indirect state for now
+ */
+ _3DSTATE_LOAD_INDIRECT | 0, 0};
+
+static void
+emit_invariant(struct i915_context *i915)
{
- if (fb->cbufs[0]) {
- *width = fb->cbufs[0]->width;
- *height = fb->cbufs[0]->height;
- return TRUE;
- }
- else if (fb->zsbuf) {
- *width = fb->zsbuf->width;
- *height = fb->zsbuf->height;
- return TRUE;
- }
- else {
- *width = *height = 0;
- return FALSE;
- }
+ i915_winsys_batchbuffer_write(i915->batch, invariant_state,
+ Elements(invariant_state)*sizeof(uint32_t));
}
-static inline uint32_t
-buf_3d_tiling_bits(enum i915_winsys_buffer_tile tiling)
+static void
+validate_immediate(struct i915_context *i915, unsigned *batch_space)
{
- uint32_t tiling_bits = 0;
-
- switch (tiling) {
- case I915_TILE_Y:
- tiling_bits |= BUF_3D_TILE_WALK_Y;
- case I915_TILE_X:
- tiling_bits |= BUF_3D_TILED_SURFACE;
- case I915_TILE_NONE:
- break;
- }
+ unsigned dirty = (1 << I915_IMMEDIATE_S0 | 1 << I915_IMMEDIATE_S1 |
+ 1 << I915_IMMEDIATE_S2 | 1 << I915_IMMEDIATE_S3 |
+ 1 << I915_IMMEDIATE_S3 | 1 << I915_IMMEDIATE_S4 |
+ 1 << I915_IMMEDIATE_S5 | 1 << I915_IMMEDIATE_S6) &
+ i915->immediate_dirty;
- return tiling_bits;
+ if (i915->immediate_dirty & (1 << I915_IMMEDIATE_S0) && i915->vbo)
+ i915->validation_buffers[i915->num_validation_buffers++] = i915->vbo;
+
+ *batch_space = 1 + util_bitcount(dirty);
}
-/* Push the state into the sarea and/or texture memory.
- */
-void
-i915_emit_hardware_state(struct i915_context *i915 )
+static void
+emit_immediate(struct i915_context *i915)
{
- /* XXX: there must be an easier way */
- const unsigned dwords = ( 14 +
- 7 +
- I915_MAX_DYNAMIC +
- 8 +
- 2 + I915_TEX_UNITS*3 +
- 2 + I915_TEX_UNITS*3 +
- 2 + I915_MAX_CONSTANT*4 +
-#if 0
- i915->current.program_len +
-#else
- i915->fs->program_len +
-#endif
- 6
- ) * 3/2; /* plus 50% margin */
- const unsigned relocs = ( I915_TEX_UNITS +
- 3
- ) * 3/2; /* plus 50% margin */
+ /* remove unwatned bits and S7 */
+ unsigned dirty = (1 << I915_IMMEDIATE_S0 | 1 << I915_IMMEDIATE_S1 |
+ 1 << I915_IMMEDIATE_S2 | 1 << I915_IMMEDIATE_S3 |
+ 1 << I915_IMMEDIATE_S3 | 1 << I915_IMMEDIATE_S4 |
+ 1 << I915_IMMEDIATE_S5 | 1 << I915_IMMEDIATE_S6) &
+ i915->immediate_dirty;
+ int i, num = util_bitcount(dirty);
+ assert(num && num <= I915_MAX_IMMEDIATE);
+
+ OUT_BATCH(_3DSTATE_LOAD_STATE_IMMEDIATE_1 |
+ dirty << 4 | (num - 1));
+
+ if (i915->immediate_dirty & (1 << I915_IMMEDIATE_S0)) {
+ if (i915->vbo)
+ OUT_RELOC(i915->vbo, I915_USAGE_VERTEX,
+ i915->current.immediate[I915_IMMEDIATE_S0]);
+ else
+ OUT_BATCH(0);
+ }
- uintptr_t save_ptr;
- size_t save_relocs;
+ for (i = 1; i < I915_MAX_IMMEDIATE; i++) {
+ if (dirty & (1 << i))
+ OUT_BATCH(i915->current.immediate[i]);
+ }
+}
- if (I915_DBG_ON(DBG_ATOMS))
- i915_dump_hardware_dirty(i915, __FUNCTION__);
+static void
+validate_dynamic(struct i915_context *i915, unsigned *batch_space)
+{
+ *batch_space = util_bitcount(i915->dynamic_dirty & ((1 << I915_MAX_DYNAMIC) - 1));
+}
- if(!BEGIN_BATCH(dwords, relocs)) {
- FLUSH_BATCH(NULL);
- assert(BEGIN_BATCH(dwords, relocs));
+static void
+emit_dynamic(struct i915_context *i915)
+{
+ int i;
+ for (i = 0; i < I915_MAX_DYNAMIC; i++) {
+ if (i915->dynamic_dirty & (1 << i))
+ OUT_BATCH(i915->current.dynamic[i]);
}
+}
- save_ptr = (uintptr_t)i915->batch->ptr;
- save_relocs = i915->batch->relocs;
-
- /* 14 dwords, 0 relocs */
- if (i915->hardware_dirty & I915_HW_INVARIENT)
- {
- OUT_BATCH(_3DSTATE_AA_CMD |
- AA_LINE_ECAAR_WIDTH_ENABLE |
- AA_LINE_ECAAR_WIDTH_1_0 |
- AA_LINE_REGION_WIDTH_ENABLE | AA_LINE_REGION_WIDTH_1_0);
-
- OUT_BATCH(_3DSTATE_DFLT_DIFFUSE_CMD);
- OUT_BATCH(0);
-
- OUT_BATCH(_3DSTATE_DFLT_SPEC_CMD);
- OUT_BATCH(0);
-
- OUT_BATCH(_3DSTATE_DFLT_Z_CMD);
- OUT_BATCH(0);
-
- OUT_BATCH(_3DSTATE_COORD_SET_BINDINGS |
- CSB_TCB(0, 0) |
- CSB_TCB(1, 1) |
- CSB_TCB(2, 2) |
- CSB_TCB(3, 3) |
- CSB_TCB(4, 4) |
- CSB_TCB(5, 5) |
- CSB_TCB(6, 6) |
- CSB_TCB(7, 7));
-
- OUT_BATCH(_3DSTATE_RASTER_RULES_CMD |
- ENABLE_POINT_RASTER_RULE |
- OGL_POINT_RASTER_RULE |
- ENABLE_LINE_STRIP_PROVOKE_VRTX |
- ENABLE_TRI_FAN_PROVOKE_VRTX |
- LINE_STRIP_PROVOKE_VRTX(1) |
- TRI_FAN_PROVOKE_VRTX(2) |
- ENABLE_TEXKILL_3D_4D |
- TEXKILL_4D);
-
- /* Need to initialize this to zero.
- */
- OUT_BATCH(_3DSTATE_LOAD_STATE_IMMEDIATE_1 | I1_LOAD_S(3) | (0));
- OUT_BATCH(0);
-
- OUT_BATCH(_3DSTATE_DEPTH_SUBRECT_DISABLE);
-
- /* disable indirect state for now
- */
- OUT_BATCH(_3DSTATE_LOAD_INDIRECT | 0);
- OUT_BATCH(0);
+static void
+validate_static(struct i915_context *i915, unsigned *batch_space)
+{
+ *batch_space = 0;
+
+ if (i915->current.cbuf_bo && (i915->static_dirty & I915_DST_BUF_COLOR)) {
+ i915->validation_buffers[i915->num_validation_buffers++]
+ = i915->current.cbuf_bo;
+ *batch_space += 3;
}
- /* 7 dwords, 1 relocs */
- if (i915->hardware_dirty & I915_HW_IMMEDIATE)
- {
- OUT_BATCH(_3DSTATE_LOAD_STATE_IMMEDIATE_1 |
- I1_LOAD_S(0) |
- I1_LOAD_S(1) |
- I1_LOAD_S(2) |
- I1_LOAD_S(4) |
- I1_LOAD_S(5) |
- I1_LOAD_S(6) |
- (5));
-
- if(i915->vbo)
- OUT_RELOC(i915->vbo,
- I915_USAGE_VERTEX,
- i915->current.immediate[I915_IMMEDIATE_S0]);
- else
- /* FIXME: we should not do this */
- OUT_BATCH(0);
- OUT_BATCH(i915->current.immediate[I915_IMMEDIATE_S1]);
- OUT_BATCH(i915->current.immediate[I915_IMMEDIATE_S2]);
- OUT_BATCH(i915->current.immediate[I915_IMMEDIATE_S4]);
- OUT_BATCH(i915->current.immediate[I915_IMMEDIATE_S5]);
- OUT_BATCH(i915->current.immediate[I915_IMMEDIATE_S6]);
- }
-
-#if 01
- /* I915_MAX_DYNAMIC dwords, 0 relocs */
- if (i915->hardware_dirty & I915_HW_DYNAMIC)
- {
- int i;
- for (i = 0; i < I915_MAX_DYNAMIC; i++) {
- OUT_BATCH(i915->current.dynamic[i]);
- }
+ if (i915->current.depth_bo && (i915->static_dirty & I915_DST_BUF_DEPTH)) {
+ i915->validation_buffers[i915->num_validation_buffers++]
+ = i915->current.depth_bo;
+ *batch_space += 3;
}
-#endif
-#if 01
- /* 8 dwords, 2 relocs */
- if (i915->hardware_dirty & I915_HW_STATIC)
- {
- struct pipe_surface *cbuf_surface = i915->framebuffer.cbufs[0];
- struct pipe_surface *depth_surface = i915->framebuffer.zsbuf;
+ if (i915->static_dirty & I915_DST_VARS)
+ *batch_space += 2;
+
+ if (i915->static_dirty & I915_DST_RECT)
+ *batch_space += 5;
+}
- if (cbuf_surface) {
- struct i915_texture *tex = i915_texture(cbuf_surface->texture);
- assert(tex);
+static void
+emit_static(struct i915_context *i915)
+{
+ if (i915->current.cbuf_bo && (i915->static_dirty & I915_DST_BUF_COLOR)) {
+ OUT_BATCH(_3DSTATE_BUF_INFO_CMD);
+ OUT_BATCH(i915->current.cbuf_flags);
+ OUT_RELOC(i915->current.cbuf_bo,
+ I915_USAGE_RENDER,
+ 0);
+ }
- OUT_BATCH(_3DSTATE_BUF_INFO_CMD);
+ /* What happens if no zbuf??
+ */
+ if (i915->current.depth_bo && (i915->static_dirty & I915_DST_BUF_DEPTH)) {
+ OUT_BATCH(_3DSTATE_BUF_INFO_CMD);
+ OUT_BATCH(i915->current.depth_flags);
+ OUT_RELOC(i915->current.depth_bo,
+ I915_USAGE_RENDER,
+ 0);
+ }
- OUT_BATCH(BUF_3D_ID_COLOR_BACK |
- BUF_3D_PITCH(tex->stride) | /* pitch in bytes */
- buf_3d_tiling_bits(tex->tiling));
+ if (i915->static_dirty & I915_DST_VARS) {
+ OUT_BATCH(_3DSTATE_DST_BUF_VARS_CMD);
+ OUT_BATCH(i915->current.dst_buf_vars);
+ }
+}
- OUT_RELOC(tex->buffer,
- I915_USAGE_RENDER,
- 0);
- }
+static void
+validate_map(struct i915_context *i915, unsigned *batch_space)
+{
+ const uint enabled = i915->current.sampler_enable_flags;
+ uint unit;
+ struct i915_texture *tex;
- /* What happens if no zbuf??
- */
- if (depth_surface) {
- struct i915_texture *tex = i915_texture(depth_surface->texture);
- unsigned offset = i915_texture_offset(tex, depth_surface->u.tex.level,
- depth_surface->u.tex.first_layer);
- assert(tex);
- assert(offset == 0);
-
- OUT_BATCH(_3DSTATE_BUF_INFO_CMD);
-
- assert(tex);
- OUT_BATCH(BUF_3D_ID_DEPTH |
- BUF_3D_PITCH(tex->stride) | /* pitch in bytes */
- buf_3d_tiling_bits(tex->tiling));
-
- OUT_RELOC(tex->buffer,
- I915_USAGE_RENDER,
- 0);
- }
+ *batch_space = i915->current.sampler_enable_nr ?
+ 2 + 3*i915->current.sampler_enable_nr : 0;
- {
- unsigned cformat, zformat = 0;
-
- if (cbuf_surface)
- cformat = cbuf_surface->format;
- else
- cformat = PIPE_FORMAT_B8G8R8A8_UNORM; /* arbitrary */
- cformat = translate_format(cformat);
-
- if (depth_surface)
- zformat = translate_depth_format( i915->framebuffer.zsbuf->format );
-
- OUT_BATCH(_3DSTATE_DST_BUF_VARS_CMD);
- OUT_BATCH(DSTORG_HORT_BIAS(0x8) | /* .5 */
- DSTORG_VERT_BIAS(0x8) | /* .5 */
- LOD_PRECLAMP_OGL |
- TEX_DEFAULT_COLOR_OGL |
- cformat |
- zformat );
+ for (unit = 0; unit < I915_TEX_UNITS; unit++) {
+ if (enabled & (1 << unit)) {
+ tex = i915_texture(i915->fragment_sampler_views[unit]->texture);
+ i915->validation_buffers[i915->num_validation_buffers++] = tex->buffer;
}
}
-#endif
+}
-#if 01
- /* texture images */
- /* 2 + I915_TEX_UNITS*3 dwords, I915_TEX_UNITS relocs */
- if (i915->hardware_dirty & (I915_HW_MAP | I915_HW_SAMPLER))
- {
- const uint nr = i915->current.sampler_enable_nr;
- if (nr) {
- const uint enabled = i915->current.sampler_enable_flags;
- uint unit;
- uint count = 0;
- OUT_BATCH(_3DSTATE_MAP_STATE | (3 * nr));
- OUT_BATCH(enabled);
- for (unit = 0; unit < I915_TEX_UNITS; unit++) {
- if (enabled & (1 << unit)) {
- struct i915_texture *texture = i915_texture(i915->fragment_sampler_views[unit]->texture);
- struct i915_winsys_buffer *buf = texture->buffer;
- assert(buf);
-
- count++;
-
- OUT_RELOC(buf, I915_USAGE_SAMPLER, 0);
- OUT_BATCH(i915->current.texbuffer[unit][0]); /* MS3 */
- OUT_BATCH(i915->current.texbuffer[unit][1]); /* MS4 */
- }
- }
- assert(count == nr);
+static void
+emit_map(struct i915_context *i915)
+{
+ const uint nr = i915->current.sampler_enable_nr;
+ if (nr) {
+ const uint enabled = i915->current.sampler_enable_flags;
+ uint unit;
+ uint count = 0;
+ OUT_BATCH(_3DSTATE_MAP_STATE | (3 * nr));
+ OUT_BATCH(enabled);
+ for (unit = 0; unit < I915_TEX_UNITS; unit++) {
+ if (enabled & (1 << unit)) {
+ struct i915_texture *texture = i915_texture(i915->fragment_sampler_views[unit]->texture);
+ struct i915_winsys_buffer *buf = texture->buffer;
+ assert(buf);
+
+ count++;
+
+ OUT_RELOC(buf, I915_USAGE_SAMPLER, 0);
+ OUT_BATCH(i915->current.texbuffer[unit][0]); /* MS3 */
+ OUT_BATCH(i915->current.texbuffer[unit][1]); /* MS4 */
}
}
-#endif
+ assert(count == nr);
+ }
+}
+
+static void
+validate_sampler(struct i915_context *i915, unsigned *batch_space)
+{
+ *batch_space = i915->current.sampler_enable_nr ?
+ 2 + 3*i915->current.sampler_enable_nr : 0;
+}
-#if 01
- /* samplers */
- /* 2 + I915_TEX_UNITS*3 dwords, 0 relocs */
- if (i915->hardware_dirty & I915_HW_SAMPLER)
- {
- if (i915->current.sampler_enable_nr) {
- int i;
-
- OUT_BATCH( _3DSTATE_SAMPLER_STATE |
- (3 * i915->current.sampler_enable_nr) );
-
- OUT_BATCH( i915->current.sampler_enable_flags );
-
- for (i = 0; i < I915_TEX_UNITS; i++) {
- if (i915->current.sampler_enable_flags & (1<<i)) {
- OUT_BATCH( i915->current.sampler[i][0] );
- OUT_BATCH( i915->current.sampler[i][1] );
- OUT_BATCH( i915->current.sampler[i][2] );
- }
+static void
+emit_sampler(struct i915_context *i915)
+{
+ if (i915->current.sampler_enable_nr) {
+ int i;
+
+ OUT_BATCH( _3DSTATE_SAMPLER_STATE |
+ (3 * i915->current.sampler_enable_nr) );
+
+ OUT_BATCH( i915->current.sampler_enable_flags );
+
+ for (i = 0; i < I915_TEX_UNITS; i++) {
+ if (i915->current.sampler_enable_flags & (1<<i)) {
+ OUT_BATCH( i915->current.sampler[i][0] );
+ OUT_BATCH( i915->current.sampler[i][1] );
+ OUT_BATCH( i915->current.sampler[i][2] );
}
}
}
-#endif
+}
+
+static void
+validate_constants(struct i915_context *i915, unsigned *batch_space)
+{
+ *batch_space = i915->fs->num_constants ?
+ 2 + 4*i915->fs->num_constants : 0;
+}
+
+static void
+emit_constants(struct i915_context *i915)
+{
+ /* Collate the user-defined constants with the fragment shader's
+ * immediates according to the constant_flags[] array.
+ */
+ const uint nr = i915->fs->num_constants;
+ if (nr) {
+ uint i;
+
+ OUT_BATCH( _3DSTATE_PIXEL_SHADER_CONSTANTS | (nr * 4) );
+ OUT_BATCH((1 << nr) - 1);
-#if 01
- /* constants */
- /* 2 + I915_MAX_CONSTANT*4 dwords, 0 relocs */
- if (i915->hardware_dirty & I915_HW_CONSTANTS)
- {
- /* Collate the user-defined constants with the fragment shader's
- * immediates according to the constant_flags[] array.
- */
- const uint nr = i915->fs->num_constants;
- if (nr) {
- uint i;
-
- OUT_BATCH( _3DSTATE_PIXEL_SHADER_CONSTANTS | (nr * 4) );
- OUT_BATCH( (1 << (nr - 1)) | ((1 << (nr - 1)) - 1) );
-
- for (i = 0; i < nr; i++) {
- const uint *c;
- if (i915->fs->constant_flags[i] == I915_CONSTFLAG_USER) {
- /* grab user-defined constant */
- c = (uint *) i915->current.constants[PIPE_SHADER_FRAGMENT][i];
- }
- else {
- /* emit program constant */
- c = (uint *) i915->fs->constants[i];
- }
+ for (i = 0; i < nr; i++) {
+ const uint *c;
+ if (i915->fs->constant_flags[i] == I915_CONSTFLAG_USER) {
+ /* grab user-defined constant */
+ c = (uint *) i915_buffer(i915->constants[PIPE_SHADER_FRAGMENT])->data;
+ c += 4 * i;
+ }
+ else {
+ /* emit program constant */
+ c = (uint *) i915->fs->constants[i];
+ }
#if 0 /* debug */
- {
- float *f = (float *) c;
- printf("Const %2d: %f %f %f %f %s\n", i, f[0], f[1], f[2], f[3],
- (i915->fs->constant_flags[i] == I915_CONSTFLAG_USER
- ? "user" : "immediate"));
- }
-#endif
- OUT_BATCH(*c++);
- OUT_BATCH(*c++);
- OUT_BATCH(*c++);
- OUT_BATCH(*c++);
+ {
+ float *f = (float *) c;
+ printf("Const %2d: %f %f %f %f %s\n", i, f[0], f[1], f[2], f[3],
+ (i915->fs->constant_flags[i] == I915_CONSTFLAG_USER
+ ? "user" : "immediate"));
}
+#endif
+ OUT_BATCH(*c++);
+ OUT_BATCH(*c++);
+ OUT_BATCH(*c++);
+ OUT_BATCH(*c++);
}
}
-#endif
+}
-#if 01
- /* Fragment program */
- /* i915->current.program_len dwords, 0 relocs */
- if (i915->hardware_dirty & I915_HW_PROGRAM)
- {
+static void
+validate_program(struct i915_context *i915, unsigned *batch_space)
+{
+ *batch_space = i915->fs->program_len;
+}
+
+static void
+emit_program(struct i915_context *i915)
+{
uint i;
/* we should always have, at least, a pass-through program */
assert(i915->fs->program_len > 0);
for (i = 0; i < i915->fs->program_len; i++) {
OUT_BATCH(i915->fs->program[i]);
}
+}
+
+static void
+emit_draw_rect(struct i915_context *i915)
+{
+ if (i915->static_dirty & I915_DST_RECT) {
+ OUT_BATCH(_3DSTATE_DRAW_RECT_CMD);
+ OUT_BATCH(DRAW_RECT_DIS_DEPTH_OFS);
+ OUT_BATCH(i915->current.draw_offset);
+ OUT_BATCH(i915->current.draw_size);
+ OUT_BATCH(i915->current.draw_offset);
}
-#endif
+}
-#if 01
- /* drawing surface size */
- /* 6 dwords, 0 relocs */
- if (i915->hardware_dirty & I915_HW_STATIC)
- {
- uint w, h;
- struct pipe_surface *cbuf_surface = i915->framebuffer.cbufs[0];
- struct i915_texture *tex = i915_texture(cbuf_surface->texture);
- unsigned x, y;
- int layer;
- uint32_t draw_offset;
- boolean ret;
+static boolean
+i915_validate_state(struct i915_context *i915, unsigned *batch_space)
+{
+ unsigned tmp;
+
+ i915->num_validation_buffers = 0;
+ if (i915->hardware_dirty & I915_HW_INVARIANT)
+ *batch_space = Elements(invariant_state);
+ else
+ *batch_space = 0;
+
+#define VALIDATE_ATOM(atom, hw_dirty) \
+ if (i915->hardware_dirty & hw_dirty) { \
+ validate_##atom(i915, &tmp); \
+ *batch_space += tmp; }
+ VALIDATE_ATOM(flush, I915_HW_FLUSH);
+ VALIDATE_ATOM(immediate, I915_HW_IMMEDIATE);
+ VALIDATE_ATOM(dynamic, I915_HW_DYNAMIC);
+ VALIDATE_ATOM(static, I915_HW_STATIC);
+ VALIDATE_ATOM(map, I915_HW_MAP);
+ VALIDATE_ATOM(sampler, I915_HW_SAMPLER);
+ VALIDATE_ATOM(constants, I915_HW_CONSTANTS);
+ VALIDATE_ATOM(program, I915_HW_PROGRAM);
+#undef VALIDATE_ATOM
+
+ if (i915->num_validation_buffers == 0)
+ return TRUE;
- ret = framebuffer_size(&i915->framebuffer, &w, &h);
- assert(ret);
+ if (!i915_winsys_validate_buffers(i915->batch, i915->validation_buffers,
+ i915->num_validation_buffers))
+ return FALSE;
- layer = cbuf_surface->u.tex.first_layer;
+ return TRUE;
+}
- x = tex->image_offset[cbuf_surface->u.tex.level][layer].nblocksx;
- y = tex->image_offset[cbuf_surface->u.tex.level][layer].nblocksy;
+/* Push the state into the sarea and/or texture memory.
+ */
+void
+i915_emit_hardware_state(struct i915_context *i915 )
+{
+ unsigned batch_space;
+ uintptr_t save_ptr;
- draw_offset = x | (y << 16);
+ assert(i915->dirty == 0);
- /* XXX flush only required when the draw_offset changes! */
- OUT_BATCH(MI_FLUSH | INHIBIT_FLUSH_RENDER_CACHE);
- OUT_BATCH(_3DSTATE_DRAW_RECT_CMD);
- OUT_BATCH(DRAW_RECT_DIS_DEPTH_OFS);
- OUT_BATCH(draw_offset);
- OUT_BATCH((w - 1 + x) | ((h - 1 + y) << 16));
- OUT_BATCH(draw_offset);
+ if (I915_DBG_ON(DBG_ATOMS))
+ i915_dump_hardware_dirty(i915, __FUNCTION__);
+
+ if (!i915_validate_state(i915, &batch_space)) {
+ FLUSH_BATCH(NULL);
+ assert(i915_validate_state(i915, &batch_space));
}
-#endif
- I915_DBG(DBG_EMIT, "%s: used %d dwords, %d relocs\n", __FUNCTION__,
+ if(!BEGIN_BATCH(batch_space)) {
+ FLUSH_BATCH(NULL);
+ assert(i915_validate_state(i915, &batch_space));
+ assert(BEGIN_BATCH(batch_space));
+ }
+
+ save_ptr = (uintptr_t)i915->batch->ptr;
+
+#define EMIT_ATOM(atom, hw_dirty) \
+ if (i915->hardware_dirty & hw_dirty) \
+ emit_##atom(i915);
+ EMIT_ATOM(flush, I915_HW_FLUSH);
+ EMIT_ATOM(invariant, I915_HW_INVARIANT);
+ EMIT_ATOM(immediate, I915_HW_IMMEDIATE);
+ EMIT_ATOM(dynamic, I915_HW_DYNAMIC);
+ EMIT_ATOM(static, I915_HW_STATIC);
+ EMIT_ATOM(map, I915_HW_MAP);
+ EMIT_ATOM(sampler, I915_HW_SAMPLER);
+ EMIT_ATOM(constants, I915_HW_CONSTANTS);
+ EMIT_ATOM(program, I915_HW_PROGRAM);
+ EMIT_ATOM(draw_rect, I915_HW_STATIC);
+#undef EMIT_ATOM
+
+ I915_DBG(DBG_EMIT, "%s: used %d dwords, %d dwords reserved\n", __FUNCTION__,
((uintptr_t)i915->batch->ptr - save_ptr) / 4,
- i915->batch->relocs - save_relocs);
+ batch_space);
+ assert(((uintptr_t)i915->batch->ptr - save_ptr) / 4 == batch_space);
i915->hardware_dirty = 0;
+ i915->immediate_dirty = 0;
+ i915->dynamic_dirty = 0;
+ i915->static_dirty = 0;
+ i915->flush_dirty = 0;
}
diff --git a/src/gallium/drivers/i915/i915_state_fpc.c b/src/gallium/drivers/i915/i915_state_fpc.c
index ec7cec0e471..1959a24691d 100644
--- a/src/gallium/drivers/i915/i915_state_fpc.c
+++ b/src/gallium/drivers/i915/i915_state_fpc.c
@@ -40,7 +40,7 @@ static void update_hw_constants(struct i915_context *i915)
struct i915_tracked_state i915_hw_constants = {
"hw_constants",
update_hw_constants,
- I915_NEW_CONSTANTS | I915_NEW_FS
+ I915_NEW_FS_CONSTANTS | I915_NEW_FS
};
diff --git a/src/gallium/drivers/i915/i915_state_immediate.c b/src/gallium/drivers/i915/i915_state_immediate.c
index f9ade7077f2..81348647399 100644
--- a/src/gallium/drivers/i915/i915_state_immediate.c
+++ b/src/gallium/drivers/i915/i915_state_immediate.c
@@ -36,12 +36,20 @@
#include "util/u_memory.h"
-/* All state expressable with the LOAD_STATE_IMMEDIATE_1 packet.
- * Would like to opportunistically recombine all these fragments into
- * a single packet containing only what has changed, but for now emit
- * as multiple packets.
+/* Convinience function to check immediate state.
*/
+static INLINE void set_immediate(struct i915_context *i915,
+ unsigned offset,
+ const unsigned state)
+{
+ if (i915->current.immediate[offset] == state)
+ return;
+
+ i915->current.immediate[offset] = state;
+ i915->immediate_dirty |= 1 << offset;
+ i915->hardware_dirty |= I915_HW_IMMEDIATE;
+}
@@ -56,9 +64,14 @@ static void upload_S0S1(struct i915_context *i915)
*/
LIS0 = i915->vbo_offset;
+ /* Need to force this */
+ if (i915->dirty & I915_NEW_VBO) {
+ i915->immediate_dirty |= 1 << I915_IMMEDIATE_S0;
+ i915->hardware_dirty |= I915_HW_IMMEDIATE;
+ }
+
/* I915_NEW_VERTEX_SIZE
*/
- /* XXX do this where the vertex size is calculated! */
{
unsigned vertex_size = i915->current.vertex_info.size;
@@ -66,16 +79,8 @@ static void upload_S0S1(struct i915_context *i915)
(vertex_size << 16));
}
- /* I915_NEW_VBO
- */
- if (1 ||
- i915->current.immediate[I915_IMMEDIATE_S0] != LIS0 ||
- i915->current.immediate[I915_IMMEDIATE_S1] != LIS1)
- {
- i915->current.immediate[I915_IMMEDIATE_S0] = LIS0;
- i915->current.immediate[I915_IMMEDIATE_S1] = LIS1;
- i915->hardware_dirty |= I915_HW_IMMEDIATE;
- }
+ set_immediate(i915, I915_IMMEDIATE_S0, LIS0);
+ set_immediate(i915, I915_IMMEDIATE_S1, LIS1);
}
const struct i915_tracked_state i915_upload_S0S1 = {
@@ -98,21 +103,13 @@ static void upload_S2S4(struct i915_context *i915)
{
LIS2 = i915->current.vertex_info.hwfmt[1];
LIS4 = i915->current.vertex_info.hwfmt[0];
- /*
- debug_printf("LIS2: 0x%x LIS4: 0x%x\n", LIS2, LIS4);
- */
assert(LIS4); /* should never be zero? */
}
LIS4 |= i915->rasterizer->LIS4;
- if (LIS2 != i915->current.immediate[I915_IMMEDIATE_S2] ||
- LIS4 != i915->current.immediate[I915_IMMEDIATE_S4]) {
-
- i915->current.immediate[I915_IMMEDIATE_S2] = LIS2;
- i915->current.immediate[I915_IMMEDIATE_S4] = LIS4;
- i915->hardware_dirty |= I915_HW_IMMEDIATE;
- }
+ set_immediate(i915, I915_IMMEDIATE_S2, LIS2);
+ set_immediate(i915, I915_IMMEDIATE_S4, LIS4);
}
const struct i915_tracked_state i915_upload_S2S4 = {
@@ -142,15 +139,12 @@ static void upload_S5(struct i915_context *i915)
#if 0
/* I915_NEW_RASTERIZER
*/
- if (i915->state.Polygon->OffsetFill) {
+ if (i915->rasterizer->LIS7) {
LIS5 |= S5_GLOBAL_DEPTH_OFFSET_ENABLE;
}
#endif
- if (LIS5 != i915->current.immediate[I915_IMMEDIATE_S5]) {
- i915->current.immediate[I915_IMMEDIATE_S5] = LIS5;
- i915->hardware_dirty |= I915_HW_IMMEDIATE;
- }
+ set_immediate(i915, I915_IMMEDIATE_S5, LIS5);
}
const struct i915_tracked_state i915_upload_S5 = {
@@ -180,14 +174,11 @@ static void upload_S6(struct i915_context *i915)
*/
LIS6 |= i915->depth_stencil->depth_LIS6;
- if (LIS6 != i915->current.immediate[I915_IMMEDIATE_S6]) {
- i915->current.immediate[I915_IMMEDIATE_S6] = LIS6;
- i915->hardware_dirty |= I915_HW_IMMEDIATE;
- }
+ set_immediate(i915, I915_IMMEDIATE_S6, LIS6);
}
const struct i915_tracked_state i915_upload_S6 = {
- "imm s6",
+ "imm S6",
upload_S6,
I915_NEW_BLEND | I915_NEW_DEPTH_STENCIL | I915_NEW_FRAMEBUFFER
};
@@ -204,10 +195,9 @@ static void upload_S7(struct i915_context *i915)
*/
LIS7 = i915->rasterizer->LIS7;
- if (LIS7 != i915->current.immediate[I915_IMMEDIATE_S7]) {
- i915->current.immediate[I915_IMMEDIATE_S7] = LIS7;
- i915->hardware_dirty |= I915_HW_IMMEDIATE;
- }
+#if 0
+ set_immediate(i915, I915_IMMEDIATE_S7, LIS7);
+#endif
}
const struct i915_tracked_state i915_upload_S7 = {
diff --git a/src/gallium/drivers/i915/i915_state_static.c b/src/gallium/drivers/i915/i915_state_static.c
index dc9a4c1e2fd..2865298318c 100644
--- a/src/gallium/drivers/i915/i915_state_static.c
+++ b/src/gallium/drivers/i915/i915_state_static.c
@@ -27,17 +27,120 @@
#include "i915_reg.h"
#include "i915_context.h"
#include "i915_state.h"
+#include "i915_resource.h"
+#include "i915_screen.h"
/***********************************************************************
* Update framebuffer state
*/
+static unsigned translate_format(enum pipe_format format)
+{
+ switch (format) {
+ case PIPE_FORMAT_B8G8R8A8_UNORM:
+ return COLOR_BUF_ARGB8888;
+ case PIPE_FORMAT_B5G6R5_UNORM:
+ return COLOR_BUF_RGB565;
+ default:
+ assert(0);
+ return 0;
+ }
+}
+
+static unsigned translate_depth_format(enum pipe_format zformat)
+{
+ switch (zformat) {
+ case PIPE_FORMAT_Z24X8_UNORM:
+ case PIPE_FORMAT_Z24_UNORM_S8_USCALED:
+ return DEPTH_FRMT_24_FIXED_8_OTHER;
+ case PIPE_FORMAT_Z16_UNORM:
+ return DEPTH_FRMT_16_FIXED;
+ default:
+ assert(0);
+ return 0;
+ }
+}
+
+static inline uint32_t
+buf_3d_tiling_bits(enum i915_winsys_buffer_tile tiling)
+{
+ uint32_t tiling_bits = 0;
+
+ switch (tiling) {
+ case I915_TILE_Y:
+ tiling_bits |= BUF_3D_TILE_WALK_Y;
+ case I915_TILE_X:
+ tiling_bits |= BUF_3D_TILED_SURFACE;
+ case I915_TILE_NONE:
+ break;
+ }
+
+ return tiling_bits;
+}
+
static void update_framebuffer(struct i915_context *i915)
{
- /* HW emit currently references framebuffer state directly:
+ struct pipe_surface *cbuf_surface = i915->framebuffer.cbufs[0];
+ struct pipe_surface *depth_surface = i915->framebuffer.zsbuf;
+ unsigned x, y;
+ int layer;
+ uint32_t draw_offset, draw_size;
+
+ if (cbuf_surface) {
+ struct i915_texture *tex = i915_texture(cbuf_surface->texture);
+ assert(tex);
+
+ i915->current.cbuf_bo = tex->buffer;
+ i915->current.cbuf_flags = BUF_3D_ID_COLOR_BACK |
+ BUF_3D_PITCH(tex->stride) | /* pitch in bytes */
+ buf_3d_tiling_bits(tex->tiling);
+
+ layer = cbuf_surface->u.tex.first_layer;
+
+ x = tex->image_offset[cbuf_surface->u.tex.level][layer].nblocksx;
+ y = tex->image_offset[cbuf_surface->u.tex.level][layer].nblocksy;
+ } else {
+ i915->current.cbuf_bo = NULL;
+ x = y = 0;
+ }
+ i915->static_dirty |= I915_DST_BUF_COLOR;
+
+ /* What happens if no zbuf??
*/
+ if (depth_surface) {
+ struct i915_texture *tex = i915_texture(depth_surface->texture);
+ unsigned offset = i915_texture_offset(tex, depth_surface->u.tex.level,
+ depth_surface->u.tex.first_layer);
+ assert(tex);
+ assert(offset == 0);
+
+ i915->current.depth_bo = tex->buffer;
+ i915->current.depth_flags = BUF_3D_ID_DEPTH |
+ BUF_3D_PITCH(tex->stride) | /* pitch in bytes */
+ buf_3d_tiling_bits(tex->tiling);
+ } else
+ i915->current.depth_bo = NULL;
+ i915->static_dirty |= I915_DST_BUF_DEPTH;
+
+ /* drawing rect calculations */
+ draw_offset = x | (y << 16);
+ draw_size = (i915->framebuffer.width - 1 + x) |
+ ((i915->framebuffer.height - 1 + y) << 16);
+ if (i915->current.draw_offset != draw_offset) {
+ i915->current.draw_offset = draw_offset;
+ i915_set_flush_dirty(i915, I915_PIPELINE_FLUSH);
+ i915->static_dirty |= I915_DST_RECT;
+ }
+ if (i915->current.draw_size != draw_size) {
+ i915->current.draw_size = draw_size;
+ i915->static_dirty |= I915_DST_RECT;
+ }
+
i915->hardware_dirty |= I915_HW_STATIC;
+
+ /* flush the cache in case we sample from the old renderbuffers */
+ i915_set_flush_dirty(i915, I915_FLUSH_CACHE);
}
struct i915_tracked_state i915_hw_framebuffer = {
@@ -45,3 +148,52 @@ struct i915_tracked_state i915_hw_framebuffer = {
update_framebuffer,
I915_NEW_FRAMEBUFFER
};
+
+static void update_dst_buf_vars(struct i915_context *i915)
+{
+ struct pipe_surface *cbuf_surface = i915->framebuffer.cbufs[0];
+ struct pipe_surface *depth_surface = i915->framebuffer.zsbuf;
+ uint32_t dst_buf_vars, cformat, zformat;
+ uint32_t early_z = 0;
+
+ if (cbuf_surface)
+ cformat = cbuf_surface->format;
+ else
+ cformat = PIPE_FORMAT_B8G8R8A8_UNORM; /* arbitrary */
+ cformat = translate_format(cformat);
+
+ if (depth_surface) {
+ struct i915_texture *tex = i915_texture(depth_surface->texture);
+ struct i915_screen *is = i915_screen(i915->base.screen);
+
+ zformat = translate_depth_format(depth_surface->format);
+
+ if (is->is_i945 && tex->tiling != I915_TILE_NONE
+ && !i915->fs->info.writes_z)
+ early_z = CLASSIC_EARLY_DEPTH;
+ } else
+ zformat = 0;
+
+ dst_buf_vars = DSTORG_HORT_BIAS(0x8) | /* .5 */
+ DSTORG_VERT_BIAS(0x8) | /* .5 */
+ LOD_PRECLAMP_OGL |
+ TEX_DEFAULT_COLOR_OGL |
+ cformat |
+ zformat |
+ early_z;
+
+ if (i915->current.dst_buf_vars != dst_buf_vars) {
+ if (early_z != (i915->current.dst_buf_vars & CLASSIC_EARLY_DEPTH))
+ i915_set_flush_dirty(i915, I915_PIPELINE_FLUSH);
+
+ i915->current.dst_buf_vars = dst_buf_vars;
+ i915->static_dirty |= I915_DST_VARS;
+ i915->hardware_dirty |= I915_HW_STATIC;
+ }
+}
+
+struct i915_tracked_state i915_hw_dst_buf_vars = {
+ "dst buf vars",
+ update_dst_buf_vars,
+ I915_NEW_FRAMEBUFFER | I915_NEW_FS
+};
diff --git a/src/gallium/drivers/i915/i915_surface.c b/src/gallium/drivers/i915/i915_surface.c
index becc6e93c2d..d02c420f6c2 100644
--- a/src/gallium/drivers/i915/i915_surface.c
+++ b/src/gallium/drivers/i915/i915_surface.c
@@ -27,6 +27,7 @@
#include "i915_surface.h"
#include "i915_resource.h"
+#include "i915_state.h"
#include "i915_blit.h"
#include "i915_reg.h"
#include "i915_screen.h"
@@ -37,16 +38,119 @@
#include "util/u_memory.h"
#include "util/u_pack_color.h"
+/*
+ * surface functions using the render engine
+ */
+
+static void
+i915_surface_copy_render(struct pipe_context *pipe,
+ struct pipe_resource *dst, unsigned dst_level,
+ unsigned dstx, unsigned dsty, unsigned dstz,
+ struct pipe_resource *src, unsigned src_level,
+ const struct pipe_box *src_box)
+{
+ struct i915_context *i915 = i915_context(pipe);
+
+ util_blitter_save_blend(i915->blitter, (void *)i915->blend);
+ util_blitter_save_depth_stencil_alpha(i915->blitter, (void *)i915->depth_stencil);
+ util_blitter_save_stencil_ref(i915->blitter, &i915->stencil_ref);
+ util_blitter_save_rasterizer(i915->blitter, (void *)i915->rasterizer);
+ util_blitter_save_fragment_shader(i915->blitter, i915->saved_fs);
+ util_blitter_save_vertex_shader(i915->blitter, i915->saved_vs);
+ util_blitter_save_viewport(i915->blitter, &i915->viewport);
+ util_blitter_save_clip(i915->blitter, &i915->saved_clip);
+ util_blitter_save_vertex_elements(i915->blitter, i915->saved_velems);
+ util_blitter_save_vertex_buffers(i915->blitter, i915->saved_nr_vertex_buffers,
+ i915->saved_vertex_buffers);
+
+ util_blitter_save_framebuffer(i915->blitter, &i915->framebuffer);
+
+ util_blitter_save_fragment_sampler_states(i915->blitter,
+ i915->saved_nr_samplers,
+ i915->saved_samplers);
+ util_blitter_save_fragment_sampler_views(i915->blitter,
+ i915->saved_nr_sampler_views,
+ i915->saved_sampler_views);
+
+ util_blitter_copy_region(i915->blitter, dst, dst_level, dstx, dsty, dstz,
+ src, src_level, src_box, TRUE);
+}
+
+static void
+i915_clear_render_target_render(struct pipe_context *pipe,
+ struct pipe_surface *dst,
+ const float *rgba,
+ unsigned dstx, unsigned dsty,
+ unsigned width, unsigned height)
+{
+ struct i915_context *i915 = i915_context(pipe);
+ struct pipe_framebuffer_state fb_state;
+
+ util_blitter_save_framebuffer(i915->blitter, &i915->framebuffer);
+
+ fb_state.width = dst->width;
+ fb_state.height = dst->height;
+ fb_state.nr_cbufs = 1;
+ fb_state.cbufs[0] = dst;
+ fb_state.zsbuf = NULL;
+ pipe->set_framebuffer_state(pipe, &fb_state);
+
+ if (i915->dirty)
+ i915_update_derived(i915);
+
+ i915_clear_emit(pipe, PIPE_CLEAR_COLOR, rgba, 0.0, 0x0,
+ dstx, dsty, width, height);
+
+ pipe->set_framebuffer_state(pipe, &i915->blitter->saved_fb_state);
+ util_unreference_framebuffer_state(&i915->blitter->saved_fb_state);
+ i915->blitter->saved_fb_state.nr_cbufs = ~0;
+}
+
+static void
+i915_clear_depth_stencil_render(struct pipe_context *pipe,
+ struct pipe_surface *dst,
+ unsigned clear_flags,
+ double depth,
+ unsigned stencil,
+ unsigned dstx, unsigned dsty,
+ unsigned width, unsigned height)
+{
+ struct i915_context *i915 = i915_context(pipe);
+ struct pipe_framebuffer_state fb_state;
+
+ util_blitter_save_framebuffer(i915->blitter, &i915->framebuffer);
+
+ fb_state.width = dst->width;
+ fb_state.height = dst->height;
+ fb_state.nr_cbufs = 0;
+ fb_state.zsbuf = dst;
+ pipe->set_framebuffer_state(pipe, &fb_state);
+
+ if (i915->dirty)
+ i915_update_derived(i915);
+
+ i915_clear_emit(pipe, clear_flags & PIPE_CLEAR_DEPTHSTENCIL,
+ NULL, depth, stencil,
+ dstx, dsty, width, height);
+
+ pipe->set_framebuffer_state(pipe, &i915->blitter->saved_fb_state);
+ util_unreference_framebuffer_state(&i915->blitter->saved_fb_state);
+ i915->blitter->saved_fb_state.nr_cbufs = ~0;
+}
+
+/*
+ * surface functions using the blitter
+ */
/* Assumes all values are within bounds -- no checking at this level -
* do it higher up if required.
*/
static void
-i915_surface_copy(struct pipe_context *pipe,
- struct pipe_resource *dst, unsigned dst_level,
- unsigned dstx, unsigned dsty, unsigned dstz,
- struct pipe_resource *src, unsigned src_level,
- const struct pipe_box *src_box)
+i915_surface_copy_blitter(struct pipe_context *pipe,
+ struct pipe_resource *dst, unsigned dst_level,
+ unsigned dstx, unsigned dsty, unsigned dstz,
+ struct pipe_resource *src, unsigned src_level,
+ const struct pipe_box *src_box)
{
struct i915_texture *dst_tex = i915_texture(dst);
struct i915_texture *src_tex = i915_texture(src);
@@ -66,7 +170,6 @@ i915_surface_copy(struct pipe_context *pipe,
assert(src_box->z == 0);
src_offset = i915_texture_offset(src_tex, src_level, src_box->z);
- assert( dst != src );
assert( util_format_get_blocksize(dpt->format) == util_format_get_blocksize(spt->format) );
assert( util_format_get_blockwidth(dpt->format) == util_format_get_blockwidth(spt->format) );
assert( util_format_get_blockheight(dpt->format) == util_format_get_blockheight(spt->format) );
@@ -81,13 +184,12 @@ i915_surface_copy(struct pipe_context *pipe,
(short) src_box->width, (short) src_box->height );
}
-
static void
-i915_clear_render_target(struct pipe_context *pipe,
- struct pipe_surface *dst,
- const float *rgba,
- unsigned dstx, unsigned dsty,
- unsigned width, unsigned height)
+i915_clear_render_target_blitter(struct pipe_context *pipe,
+ struct pipe_surface *dst,
+ const float *rgba,
+ unsigned dstx, unsigned dsty,
+ unsigned width, unsigned height)
{
struct i915_texture *tex = i915_texture(dst->texture);
struct pipe_resource *pt = &tex->b.b;
@@ -109,13 +211,13 @@ i915_clear_render_target(struct pipe_context *pipe,
}
static void
-i915_clear_depth_stencil(struct pipe_context *pipe,
- struct pipe_surface *dst,
- unsigned clear_flags,
- double depth,
- unsigned stencil,
- unsigned dstx, unsigned dsty,
- unsigned width, unsigned height)
+i915_clear_depth_stencil_blitter(struct pipe_context *pipe,
+ struct pipe_surface *dst,
+ unsigned clear_flags,
+ double depth,
+ unsigned stencil,
+ unsigned dstx, unsigned dsty,
+ unsigned width, unsigned height)
{
struct i915_texture *tex = i915_texture(dst->texture);
struct pipe_resource *pt = &tex->b.b;
@@ -193,9 +295,15 @@ i915_surface_destroy(struct pipe_context *ctx,
void
i915_init_surface_functions(struct i915_context *i915)
{
- i915->base.resource_copy_region = i915_surface_copy;
- i915->base.clear_render_target = i915_clear_render_target;
- i915->base.clear_depth_stencil = i915_clear_depth_stencil;
+ if (i915_screen(i915->base.screen)->debug.use_blitter) {
+ i915->base.resource_copy_region = i915_surface_copy_blitter;
+ i915->base.clear_render_target = i915_clear_render_target_blitter;
+ i915->base.clear_depth_stencil = i915_clear_depth_stencil_blitter;
+ } else {
+ i915->base.resource_copy_region = i915_surface_copy_render;
+ i915->base.clear_render_target = i915_clear_render_target_render;
+ i915->base.clear_depth_stencil = i915_clear_depth_stencil_render;
+ }
i915->base.create_surface = i915_create_surface;
i915->base.surface_destroy = i915_surface_destroy;
}
diff --git a/src/gallium/drivers/i915/i915_winsys.h b/src/gallium/drivers/i915/i915_winsys.h
index 24ea416f015..21cfdc9613e 100644
--- a/src/gallium/drivers/i915/i915_winsys.h
+++ b/src/gallium/drivers/i915/i915_winsys.h
@@ -76,7 +76,6 @@ struct i915_winsys_batchbuffer {
size_t size;
size_t relocs;
- size_t max_relocs;
/*@}*/
};
@@ -95,6 +94,18 @@ struct i915_winsys {
(*batchbuffer_create)(struct i915_winsys *iws);
/**
+ * Validate buffers for usage in this batchbuffer.
+ * Does space-checking and asorted other book-keeping.
+ *
+ * @batch
+ * @buffers array to buffers to validate
+ * @num_of_buffers size of the passed array
+ */
+ boolean (*validate_buffers)(struct i915_winsys_batchbuffer *batch,
+ struct i915_winsys_buffer **buffers,
+ int num_of_buffers);
+
+ /**
* Emit a relocation to a buffer.
* Target position in batchbuffer is the same as ptr.
*
@@ -103,11 +114,12 @@ struct i915_winsys {
* @usage how is the hardware going to use the buffer.
* @offset add this to the reloc buffers address
* @target buffer where to write the address, null for batchbuffer.
+ * @fenced relocation needs a fence.
*/
int (*batchbuffer_reloc)(struct i915_winsys_batchbuffer *batch,
struct i915_winsys_buffer *reloc,
enum i915_winsys_buffer_usage usage,
- unsigned offset, bool fenced);
+ unsigned offset, boolean fenced);
/**
* Flush a bufferbatch.
diff --git a/src/gallium/drivers/i965/brw_batchbuffer.c b/src/gallium/drivers/i965/brw_batchbuffer.c
index e80067f3b19..3c935792465 100644
--- a/src/gallium/drivers/i965/brw_batchbuffer.c
+++ b/src/gallium/drivers/i965/brw_batchbuffer.c
@@ -64,13 +64,11 @@ brw_batchbuffer_reset(struct brw_batchbuffer *batch)
}
struct brw_batchbuffer *
-brw_batchbuffer_alloc(struct brw_winsys_screen *sws,
- struct brw_chipset chipset)
+brw_batchbuffer_alloc(struct brw_winsys_screen *sws)
{
struct brw_batchbuffer *batch = CALLOC_STRUCT(brw_batchbuffer);
batch->sws = sws;
- batch->chipset = chipset;
brw_batchbuffer_reset(batch);
return batch;
diff --git a/src/gallium/drivers/i965/brw_batchbuffer.h b/src/gallium/drivers/i965/brw_batchbuffer.h
index 6ca9f617f5e..6ecb91857dd 100644
--- a/src/gallium/drivers/i965/brw_batchbuffer.h
+++ b/src/gallium/drivers/i965/brw_batchbuffer.h
@@ -26,7 +26,6 @@ struct brw_batchbuffer {
struct brw_winsys_screen *sws;
struct brw_winsys_buffer *buf;
- struct brw_chipset chipset;
/**
* Values exported to speed up the writing the batchbuffer,
@@ -47,8 +46,8 @@ struct brw_batchbuffer {
/*@}*/
};
-struct brw_batchbuffer *brw_batchbuffer_alloc( struct brw_winsys_screen *sws,
- struct brw_chipset chipset );
+struct brw_batchbuffer *brw_batchbuffer_alloc( struct brw_winsys_screen *sws );
+
void brw_batchbuffer_free(struct brw_batchbuffer *batch);
diff --git a/src/gallium/drivers/i965/brw_clip.c b/src/gallium/drivers/i965/brw_clip.c
index ccba205e8c7..66b13ea58e2 100644
--- a/src/gallium/drivers/i965/brw_clip.c
+++ b/src/gallium/drivers/i965/brw_clip.c
@@ -66,16 +66,14 @@ compile_clip_prog( struct brw_context *brw,
c.func.single_program_flow = 1;
- c.chipset = brw->chipset;
c.key = *key;
- c.need_ff_sync = c.chipset.is_igdng;
/* Need to locate the two positions present in vertex + header.
* These are currently hardcoded:
*/
c.header_position_offset = ATTR_SIZE;
- if (c.chipset.is_igdng)
+ if (brw->gen == 5)
delta = 3 * REG_SIZE;
else
delta = REG_SIZE;
@@ -97,7 +95,7 @@ compile_clip_prog( struct brw_context *brw,
if (c.key.output_edgeflag != BRW_OUTPUT_NOT_PRESENT)
c.offset_edgeflag = delta + c.key.output_edgeflag * ATTR_SIZE;
- if (BRW_IS_IGDNG(brw))
+ if (brw->gen == 5)
c.nr_regs = (c.key.nr_attrs + 1) / 2 + 3; /* are vertices packed, or reg-aligned? */
else
c.nr_regs = (c.key.nr_attrs + 1) / 2 + 1; /* are vertices packed, or reg-aligned? */
diff --git a/src/gallium/drivers/i965/brw_clip.h b/src/gallium/drivers/i965/brw_clip.h
index 80e3a11a370..f123b73c063 100644
--- a/src/gallium/drivers/i965/brw_clip.h
+++ b/src/gallium/drivers/i965/brw_clip.h
@@ -125,12 +125,10 @@ struct brw_clip_compile {
GLuint last_tmp;
GLboolean need_direction;
- struct brw_chipset chipset;
GLuint last_mrf;
GLuint header_position_offset;
- GLboolean need_ff_sync;
GLuint nr_color_attrs;
GLuint offset_color0;
diff --git a/src/gallium/drivers/i965/brw_clip_line.c b/src/gallium/drivers/i965/brw_clip_line.c
index 66caadc4d53..4ed7362171b 100644
--- a/src/gallium/drivers/i965/brw_clip_line.c
+++ b/src/gallium/drivers/i965/brw_clip_line.c
@@ -32,6 +32,7 @@
#include "util/u_debug.h"
#include "brw_defines.h"
+#include "brw_context.h"
#include "brw_eu.h"
#include "brw_clip.h"
@@ -41,7 +42,7 @@
static void brw_clip_line_alloc_regs( struct brw_clip_compile *c )
{
GLuint i = 0,j;
-
+ struct brw_context *brw = c->func.brw;
/* Register usage is static, precompute here:
*/
c->reg.R0 = retype(brw_vec8_grf(i, 0), BRW_REGISTER_TYPE_UD); i++;
@@ -79,7 +80,7 @@ static void brw_clip_line_alloc_regs( struct brw_clip_compile *c )
i++;
}
- if (c->need_ff_sync) {
+ if (brw->needs_ff_sync) {
c->reg.ff_sync = retype(brw_vec1_grf(i, 0), BRW_REGISTER_TYPE_UD);
i++;
}
@@ -120,6 +121,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);
@@ -146,7 +148,7 @@ static void clip_and_emit_line( struct brw_clip_compile *c )
brw_clip_init_clipmask(c);
/* -ve rhw workaround */
- if (c->chipset.is_965) {
+ 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));
@@ -183,7 +185,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 (c->chipset.is_965) {
+ 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);
{
@@ -208,7 +210,7 @@ static void clip_and_emit_line( struct brw_clip_compile *c )
/* If both are positive, do nothing */
/* Only on GM965/G965 */
- if (c->chipset.is_965) {
+ 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);
}
@@ -223,7 +225,7 @@ static void clip_and_emit_line( struct brw_clip_compile *c )
brw_set_predicate_control(p, BRW_PREDICATE_NONE);
}
- if (c->chipset.is_965) {
+ if (brw->has_negative_rhw_bug) {
brw_ENDIF(p, is_neg2);
}
}
diff --git a/src/gallium/drivers/i965/brw_clip_state.c b/src/gallium/drivers/i965/brw_clip_state.c
index 5c3ccfd8d0d..f56edf3177c 100644
--- a/src/gallium/drivers/i965/brw_clip_state.c
+++ b/src/gallium/drivers/i965/brw_clip_state.c
@@ -109,7 +109,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 (brw->gen == 5)
clip.thread4.max_threads = 16 - 1;
else
clip.thread4.max_threads = 2 - 1;
@@ -134,7 +134,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 (brw->is_g4x)
clip.clip5.negative_w_clip_test = 1;
clip.clip6.clipper_viewport_state_ptr = 0;
diff --git a/src/gallium/drivers/i965/brw_clip_tri.c b/src/gallium/drivers/i965/brw_clip_tri.c
index 069524bc14f..7d400e6028b 100644
--- a/src/gallium/drivers/i965/brw_clip_tri.c
+++ b/src/gallium/drivers/i965/brw_clip_tri.c
@@ -30,6 +30,7 @@
*/
#include "brw_defines.h"
+#include "brw_context.h"
#include "brw_eu.h"
#include "brw_clip.h"
@@ -43,6 +44,7 @@ void brw_clip_tri_alloc_regs( struct brw_clip_compile *c,
GLuint nr_verts )
{
GLuint i = 0,j;
+ struct brw_context *brw = c->func.brw;
/* Register usage is static, precompute here:
*/
@@ -69,7 +71,7 @@ void brw_clip_tri_alloc_regs( struct brw_clip_compile *c,
for (j = 0; j < 3; j++) {
GLuint delta = c->key.nr_attrs*16 + 32;
- if (c->chipset.is_igdng)
+ if (brw->gen == 5)
delta = c->key.nr_attrs * 16 + 32 * 3;
brw_MOV(&c->func, byte_offset(c->reg.vertex[j], delta), brw_imm_f(0));
@@ -110,7 +112,7 @@ void brw_clip_tri_alloc_regs( struct brw_clip_compile *c,
i++;
}
- if (c->need_ff_sync) {
+ if (brw->needs_ff_sync) {
c->reg.ff_sync = retype(brw_vec1_grf(i, 0), BRW_REGISTER_TYPE_UD);
i++;
}
@@ -563,7 +565,7 @@ void brw_emit_tri_clip( struct brw_clip_compile *c )
/* if -ve rhw workaround bit is set,
do cliptest */
- if (c->chipset.is_965) {
+ if (p->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/gallium/drivers/i965/brw_clip_util.c b/src/gallium/drivers/i965/brw_clip_util.c
index 23e51ee9bcd..5713f25da7c 100644
--- a/src/gallium/drivers/i965/brw_clip_util.c
+++ b/src/gallium/drivers/i965/brw_clip_util.c
@@ -31,6 +31,7 @@
#include "brw_defines.h"
+#include "brw_context.h"
#include "brw_eu.h"
#include "brw_clip.h"
@@ -126,6 +127,7 @@ void brw_clip_interp_vertex( struct brw_clip_compile *c,
GLboolean force_edgeflag)
{
struct brw_compile *p = &c->func;
+ struct brw_context *brw = p->brw;
struct brw_reg tmp = get_tmp(c);
GLuint i;
@@ -142,7 +144,7 @@ void brw_clip_interp_vertex( struct brw_clip_compile *c,
for (i = 0; i < c->key.nr_attrs; i++) {
GLuint delta = i*16 + 32;
- if (c->chipset.is_igdng)
+ if (brw->gen == 5)
delta = i * 16 + 32 * 3;
if (delta == c->offset_edgeflag) {
@@ -176,7 +178,7 @@ void brw_clip_interp_vertex( struct brw_clip_compile *c,
if (i & 1) {
GLuint delta = i*16 + 32;
- if (c->chipset.is_igdng)
+ if (brw->gen == 5)
delta = i * 16 + 32 * 3;
brw_MOV(p, deref_4f(dest_ptr, delta), brw_imm_f(0));
@@ -350,7 +352,8 @@ 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 brw_context *brw = c->func.brw;
+ if (brw->needs_ff_sync) {
struct brw_compile *p = &c->func;
struct brw_instruction *need_ff_sync;
@@ -379,7 +382,8 @@ 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 brw_context *brw = c->func.brw;
+ if (brw->needs_ff_sync) {
struct brw_compile *p = &c->func;
brw_MOV(p, c->reg.ff_sync, brw_imm_ud(0));
diff --git a/src/gallium/drivers/i965/brw_context.c b/src/gallium/drivers/i965/brw_context.c
index a2736f783d5..41a468a32f0 100644
--- a/src/gallium/drivers/i965/brw_context.c
+++ b/src/gallium/drivers/i965/brw_context.c
@@ -107,7 +107,7 @@ struct pipe_context *brw_create_context(struct pipe_screen *screen,
void *priv)
{
struct brw_context *brw = (struct brw_context *) CALLOC_STRUCT(brw_context);
-
+ struct brw_screen *brs = brw_screen(screen);
if (!brw) {
debug_printf("%s: failed to alloc context\n", __FUNCTION__);
return NULL;
@@ -117,7 +117,10 @@ struct pipe_context *brw_create_context(struct pipe_screen *screen,
brw->base.priv = priv;
brw->base.destroy = brw_destroy_context;
brw->sws = brw_screen(screen)->sws;
- brw->chipset = brw_screen(screen)->chipset;
+ brw->is_g4x = brs->is_g4x;
+ brw->needs_ff_sync = brs->needs_ff_sync;
+ brw->has_negative_rhw_bug = brs->has_negative_rhw_bug;
+ brw->gen = brs->gen;
brw_init_resource_functions( brw );
brw_pipe_blend_init( brw );
@@ -145,7 +148,7 @@ struct pipe_context *brw_create_context(struct pipe_screen *screen,
make_empty_list(&brw->query.active_head);
- brw->batch = brw_batchbuffer_alloc( brw->sws, brw->chipset );
+ brw->batch = brw_batchbuffer_alloc( brw->sws );
if (brw->batch == NULL)
goto fail;
diff --git a/src/gallium/drivers/i965/brw_context.h b/src/gallium/drivers/i965/brw_context.h
index d927f382d5f..45fc26dd7d8 100644
--- a/src/gallium/drivers/i965/brw_context.h
+++ b/src/gallium/drivers/i965/brw_context.h
@@ -529,7 +529,14 @@ struct brw_query_object {
struct brw_context
{
struct pipe_context base;
- struct brw_chipset chipset;
+ int gen;
+ boolean has_negative_rhw_bug;
+ boolean needs_ff_sync;
+ boolean is_g4x;
+
+ int urb_size;
+ int vs_max_threads;
+ int wm_max_threads;
struct brw_winsys_screen *sws;
@@ -854,11 +861,5 @@ brw_context( struct pipe_context *ctx )
return (struct brw_context *)ctx;
}
-
-#define BRW_IS_965(brw) ((brw)->chipset.is_965)
-#define BRW_IS_IGDNG(brw) ((brw)->chipset.is_igdng)
-#define BRW_IS_G4X(brw) ((brw)->chipset.is_g4x)
-
-
#endif
diff --git a/src/gallium/drivers/i965/brw_defines.h b/src/gallium/drivers/i965/brw_defines.h
index e201ce4d7ce..7547eae97c7 100644
--- a/src/gallium/drivers/i965/brw_defines.h
+++ b/src/gallium/drivers/i965/brw_defines.h
@@ -463,6 +463,13 @@
#define BRW_COMPRESSION_2NDHALF 1
#define BRW_COMPRESSION_COMPRESSED 2
+#define GEN6_COMPRESSION_1Q 0
+#define GEN6_COMPRESSION_2Q 1
+#define GEN6_COMPRESSION_3Q 2
+#define GEN6_COMPRESSION_4Q 3
+#define GEN6_COMPRESSION_1H 0
+#define GEN6_COMPRESSION_2H 2
+
#define BRW_CONDITIONAL_NONE 0
#define BRW_CONDITIONAL_Z 1
#define BRW_CONDITIONAL_NZ 2
@@ -502,6 +509,27 @@
#define BRW_MASK_ENABLE 0
#define BRW_MASK_DISABLE 1
+/** @{
+ *
+ * Gen6 has replaced "mask enable/disable" with WECtrl, which is
+ * effectively the same but much simpler to think about. Now, there
+ * are two contributors ANDed together to whether channels are
+ * executed: The predication on the instruction, and the channel write
+ * enable.
+ */
+/**
+ * This is the default value. It means that a channel's write enable is set
+ * if the per-channel IP is pointing at this instruction.
+ */
+#define BRW_WE_NORMAL 0
+/**
+ * This is used like BRW_MASK_DISABLE, and causes all channels to have
+ * their write enable set. Note that predication still contributes to
+ * whether the channel actually gets written.
+ */
+#define BRW_WE_ALL 1
+/** @} */
+
#define BRW_OPCODE_MOV 1
#define BRW_OPCODE_SEL 2
#define BRW_OPCODE_NOT 4
@@ -531,6 +559,8 @@
#define BRW_OPCODE_POP 47
#define BRW_OPCODE_WAIT 48
#define BRW_OPCODE_SEND 49
+#define BRW_OPCODE_SENDC 50
+#define BRW_OPCODE_MATH 56
#define BRW_OPCODE_ADD 64
#define BRW_OPCODE_MUL 65
#define BRW_OPCODE_AVG 66
@@ -550,6 +580,7 @@
#define BRW_OPCODE_DP2 87
#define BRW_OPCODE_DPA2 88
#define BRW_OPCODE_LINE 89
+#define BRW_OPCODE_PLN 90
#define BRW_OPCODE_NOP 126
#define BRW_PREDICATE_NONE 0
@@ -599,6 +630,8 @@
#define BRW_ARF_NOTIFICATION_COUNT 0x90
#define BRW_ARF_IP 0xA0
+#define BRW_MRF_COMPR4 (1 << 7)
+
#define BRW_AMASK 0
#define BRW_IMASK 1
#define BRW_LMASK 2
@@ -645,13 +678,14 @@
#define BRW_POLYGON_FACING_BACK 1
#define BRW_MESSAGE_TARGET_NULL 0
-#define BRW_MESSAGE_TARGET_MATH 1
+#define BRW_MESSAGE_TARGET_MATH 1 /* reserved on GEN6 */
#define BRW_MESSAGE_TARGET_SAMPLER 2
#define BRW_MESSAGE_TARGET_GATEWAY 3
-#define BRW_MESSAGE_TARGET_DATAPORT_READ 4
-#define BRW_MESSAGE_TARGET_DATAPORT_WRITE 5
+#define BRW_MESSAGE_TARGET_DATAPORT_READ 4 /* sampler cache on GEN6 */
+#define BRW_MESSAGE_TARGET_DATAPORT_WRITE 5 /* render cache on Gen6 */
#define BRW_MESSAGE_TARGET_URB 6
#define BRW_MESSAGE_TARGET_THREAD_SPAWNER 7
+#define BRW_MESSAGE_TARGET_CONST_CACHE 9 /* GEN6 */
#define BRW_SAMPLER_RETURN_FORMAT_FLOAT32 0
#define BRW_SAMPLER_RETURN_FORMAT_UINT32 2
@@ -674,20 +708,15 @@
#define BRW_SAMPLER_MESSAGE_SIMD8_LD 3
#define BRW_SAMPLER_MESSAGE_SIMD16_LD 3
-#define BRW_SAMPLER_MESSAGE_SIMD8_SAMPLE_IGDNG 0
-#define BRW_SAMPLER_MESSAGE_SIMD4X2_SAMPLE_IGDNG 0
-#define BRW_SAMPLER_MESSAGE_SIMD16_SAMPLE_IGDNG 0
-#define BRW_SAMPLER_MESSAGE_SIMD8_SAMPLE_BIAS_IGDNG 1
-#define BRW_SAMPLER_MESSAGE_SIMD4X2_SAMPLE_BIAS_IGDNG 1
-#define BRW_SAMPLER_MESSAGE_SIMD16_SAMPLE_BIAS_IGDNG 1
-#define BRW_SAMPLER_MESSAGE_SIMD8_SAMPLE_LOD_IGDNG 2
-#define BRW_SAMPLER_MESSAGE_SIMD4X2_SAMPLE_LOD_IGDNG 2
-#define BRW_SAMPLER_MESSAGE_SIMD16_SAMPLE_LOD_IGDNG 2
-#define BRW_SAMPLER_MESSAGE_SIMD8_SAMPLE_COMPARE_IGDNG 3
-#define BRW_SAMPLER_MESSAGE_SIMD4X2_SAMPLE_COMPARE_IGDNG 3
-#define BRW_SAMPLER_MESSAGE_SIMD16_SAMPLE_COMPARE_IGDNG 3
-
-/* for IGDNG only */
+#define BRW_SAMPLER_MESSAGE_SAMPLE_GEN5 0
+#define BRW_SAMPLER_MESSAGE_SAMPLE_BIAS_GEN5 1
+#define BRW_SAMPLER_MESSAGE_SAMPLE_LOD_GEN5 2
+#define BRW_SAMPLER_MESSAGE_SAMPLE_COMPARE_GEN5 3
+#define BRW_SAMPLER_MESSAGE_SAMPLE_DERIVS_GEN5 4
+#define BRW_SAMPLER_MESSAGE_SAMPLE_BIAS_COMPARE_GEN5 5
+#define BRW_SAMPLER_MESSAGE_SAMPLE_LOD_COMPARE_GEN5 6
+
+/* for GEN5 only */
#define BRW_SAMPLER_SIMD_MODE_SIMD4X2 0
#define BRW_SAMPLER_SIMD_MODE_SIMD8 1
#define BRW_SAMPLER_SIMD_MODE_SIMD16 2
@@ -705,10 +734,24 @@
#define BRW_DATAPORT_DWORD_SCATTERED_BLOCK_8DWORDS 2
#define BRW_DATAPORT_DWORD_SCATTERED_BLOCK_16DWORDS 3
+/* This one stays the same across generations. */
#define BRW_DATAPORT_READ_MESSAGE_OWORD_BLOCK_READ 0
+/* GEN4 */
#define BRW_DATAPORT_READ_MESSAGE_OWORD_DUAL_BLOCK_READ 1
-#define BRW_DATAPORT_READ_MESSAGE_DWORD_BLOCK_READ 2
+#define BRW_DATAPORT_READ_MESSAGE_MEDIA_BLOCK_READ 2
#define BRW_DATAPORT_READ_MESSAGE_DWORD_SCATTERED_READ 3
+/* G45, GEN5 */
+#define G45_DATAPORT_READ_MESSAGE_RENDER_UNORM_READ 1
+#define G45_DATAPORT_READ_MESSAGE_OWORD_DUAL_BLOCK_READ 2
+#define G45_DATAPORT_READ_MESSAGE_AVC_LOOP_FILTER_READ 3
+#define G45_DATAPORT_READ_MESSAGE_MEDIA_BLOCK_READ 4
+#define G45_DATAPORT_READ_MESSAGE_DWORD_SCATTERED_READ 6
+/* GEN6 */
+#define GEN6_DATAPORT_READ_MESSAGE_RENDER_UNORM_READ 1
+#define GEN6_DATAPORT_READ_MESSAGE_OWORD_DUAL_BLOCK_READ 2
+#define GEN6_DATAPORT_READ_MESSAGE_MEDIA_BLOCK_READ 4
+#define GEN6_DATAPORT_READ_MESSAGE_OWORD_UNALIGN_BLOCK_READ 5
+#define GEN6_DATAPORT_READ_MESSAGE_DWORD_SCATTERED_READ 6
#define BRW_DATAPORT_READ_TARGET_DATA_CACHE 0
#define BRW_DATAPORT_READ_TARGET_RENDER_CACHE 1
@@ -728,6 +771,16 @@
#define BRW_DATAPORT_WRITE_MESSAGE_STREAMED_VERTEX_BUFFER_WRITE 5
#define BRW_DATAPORT_WRITE_MESSAGE_FLUSH_RENDER_CACHE 7
+/* GEN6 */
+#define BRW_DATAPORT_WRITE_MESSAGE_DWORD_ATOMIC_WRITE_GEN6 7
+#define BRW_DATAPORT_WRITE_MESSAGE_OWORD_BLOCK_WRITE_GEN6 8
+#define BRW_DATAPORT_WRITE_MESSAGE_OWORD_DUAL_BLOCK_WRITE_GEN6 9
+#define BRW_DATAPORT_WRITE_MESSAGE_MEDIA_BLOCK_WRITE_GEN6 10
+#define BRW_DATAPORT_WRITE_MESSAGE_DWORLD_SCATTERED_WRITE_GEN6 11
+#define BRW_DATAPORT_WRITE_MESSAGE_RENDER_TARGET_WRITE_GEN6 12
+#define BRW_DATAPORT_WRITE_MESSAGE_STREAMED_VB_WRITE_GEN6 13
+#define BRW_DATAPORT_WRITE_MESSAGE_RENDER_TARGET_UNORM_WRITE_GEN6 14
+
#define BRW_MATH_FUNCTION_INV 1
#define BRW_MATH_FUNCTION_LOG 2
#define BRW_MATH_FUNCTION_EXP 3
@@ -736,7 +789,8 @@
#define BRW_MATH_FUNCTION_SIN 6 /* was 7 */
#define BRW_MATH_FUNCTION_COS 7 /* was 8 */
#define BRW_MATH_FUNCTION_SINCOS 8 /* was 6 */
-#define BRW_MATH_FUNCTION_TAN 9
+#define BRW_MATH_FUNCTION_TAN 9 /* gen4 */
+#define BRW_MATH_FUNCTION_FDIV 9 /* gen6+ */
#define BRW_MATH_FUNCTION_POW 10
#define BRW_MATH_FUNCTION_INT_DIV_QUOTIENT_AND_REMAINDER 11
#define BRW_MATH_FUNCTION_INT_DIV_QUOTIENT 12
@@ -787,17 +841,33 @@
#define CMD_PIPELINED_STATE_POINTERS 0x7800
#define CMD_BINDING_TABLE_PTRS 0x7801
+# define GEN6_BINDING_TABLE_MODIFY_VS (1 << 8)
+# define GEN6_BINDING_TABLE_MODIFY_GS (1 << 9)
+# define GEN6_BINDING_TABLE_MODIFY_PS (1 << 12)
+
+#define CMD_3D_SAMPLER_STATE_POINTERS 0x7802 /* SNB+ */
+# define PS_SAMPLER_STATE_CHANGE (1 << 12)
+# define GS_SAMPLER_STATE_CHANGE (1 << 9)
+# define VS_SAMPLER_STATE_CHANGE (1 << 8)
+/* DW1: VS */
+/* DW2: GS */
+/* DW3: PS */
#define CMD_VERTEX_BUFFER 0x7808
# define BRW_VB0_INDEX_SHIFT 27
+# define GEN6_VB0_INDEX_SHIFT 26
# define BRW_VB0_ACCESS_VERTEXDATA (0 << 26)
# define BRW_VB0_ACCESS_INSTANCEDATA (1 << 26)
+# define GEN6_VB0_ACCESS_VERTEXDATA (0 << 20)
+# define GEN6_VB0_ACCESS_INSTANCEDATA (1 << 20)
# define BRW_VB0_PITCH_SHIFT 0
#define CMD_VERTEX_ELEMENT 0x7809
# define BRW_VE0_INDEX_SHIFT 27
+# define GEN6_VE0_INDEX_SHIFT 26
# define BRW_VE0_FORMAT_SHIFT 16
# define BRW_VE0_VALID (1 << 26)
+# define GEN6_VE0_VALID (1 << 25)
# define BRW_VE0_SRC_OFFSET_SHIFT 0
# define BRW_VE1_COMPONENT_NOSTORE 0
# define BRW_VE1_COMPONENT_STORE_SRC 1
@@ -816,6 +886,236 @@
#define CMD_INDEX_BUFFER 0x780a
#define CMD_VF_STATISTICS_965 0x780b
#define CMD_VF_STATISTICS_GM45 0x680b
+#define CMD_3D_CC_STATE_POINTERS 0x780e /* GEN6+ */
+
+#define CMD_URB 0x7805 /* GEN6+ */
+# define GEN6_URB_VS_SIZE_SHIFT 16
+# define GEN6_URB_VS_ENTRIES_SHIFT 0
+# define GEN6_URB_GS_ENTRIES_SHIFT 8
+# define GEN6_URB_GS_SIZE_SHIFT 0
+
+#define CMD_VIEWPORT_STATE_POINTERS 0x780d /* GEN6+ */
+# define GEN6_CC_VIEWPORT_MODIFY (1 << 12)
+# define GEN6_SF_VIEWPORT_MODIFY (1 << 11)
+# define GEN6_CLIP_VIEWPORT_MODIFY (1 << 10)
+
+#define CMD_3D_SCISSOR_STATE_POINTERS 0x780f /* GEN6+ */
+
+#define CMD_3D_VS_STATE 0x7810 /* GEN6+ */
+/* DW2 */
+# define GEN6_VS_SPF_MODE (1 << 31)
+# define GEN6_VS_VECTOR_MASK_ENABLE (1 << 30)
+# define GEN6_VS_SAMPLER_COUNT_SHIFT 27
+# define GEN6_VS_BINDING_TABLE_ENTRY_COUNT_SHIFT 18
+# define GEN6_VS_FLOATING_POINT_MODE_IEEE_754 (0 << 16)
+# define GEN6_VS_FLOATING_POINT_MODE_ALT (1 << 16)
+/* DW4 */
+# define GEN6_VS_DISPATCH_START_GRF_SHIFT 20
+# define GEN6_VS_URB_READ_LENGTH_SHIFT 11
+# define GEN6_VS_URB_ENTRY_READ_OFFSET_SHIFT 4
+/* DW5 */
+# define GEN6_VS_MAX_THREADS_SHIFT 25
+# define GEN6_VS_STATISTICS_ENABLE (1 << 10)
+# define GEN6_VS_CACHE_DISABLE (1 << 1)
+# define GEN6_VS_ENABLE (1 << 0)
+
+#define CMD_3D_GS_STATE 0x7811 /* GEN6+ */
+/* DW2 */
+# define GEN6_GS_SPF_MODE (1 << 31)
+# define GEN6_GS_VECTOR_MASK_ENABLE (1 << 30)
+# define GEN6_GS_SAMPLER_COUNT_SHIFT 27
+# define GEN6_GS_BINDING_TABLE_ENTRY_COUNT_SHIFT 18
+/* DW4 */
+# define GEN6_GS_URB_READ_LENGTH_SHIFT 11
+# define GEN6_GS_URB_ENTRY_READ_OFFSET_SHIFT 4
+# define GEN6_GS_DISPATCH_START_GRF_SHIFT 0
+/* DW5 */
+# define GEN6_GS_MAX_THREADS_SHIFT 25
+# define GEN6_GS_STATISTICS_ENABLE (1 << 10)
+# define GEN6_GS_SO_STATISTICS_ENABLE (1 << 9)
+# define GEN6_GS_RENDERING_ENABLE (1 << 8)
+/* DW6 */
+# define GEN6_GS_ENABLE (1 << 15)
+
+#define CMD_3D_CLIP_STATE 0x7812 /* GEN6+ */
+/* DW1 */
+# define GEN6_CLIP_STATISTICS_ENABLE (1 << 10)
+/**
+ * Just does cheap culling based on the clip distance. Bits must be
+ * disjoint with USER_CLIP_CLIP_DISTANCE bits.
+ */
+# define GEN6_USER_CLIP_CULL_DISTANCES_SHIFT 0
+/* DW2 */
+# define GEN6_CLIP_ENABLE (1 << 31)
+# define GEN6_CLIP_API_OGL (0 << 30)
+# define GEN6_CLIP_API_D3D (1 << 30)
+# define GEN6_CLIP_XY_TEST (1 << 28)
+# define GEN6_CLIP_Z_TEST (1 << 27)
+# define GEN6_CLIP_GB_TEST (1 << 26)
+/** 8-bit field of which user clip distances to clip aganist. */
+# define GEN6_USER_CLIP_CLIP_DISTANCES_SHIFT 16
+# define GEN6_CLIP_MODE_NORMAL (0 << 13)
+# define GEN6_CLIP_MODE_REJECT_ALL (3 << 13)
+# define GEN6_CLIP_MODE_ACCEPT_ALL (4 << 13)
+# define GEN6_CLIP_PERSPECTIVE_DIVIDE_DISABLE (1 << 9)
+# define GEN6_CLIP_BARYCENTRIC_ENABLE (1 << 8)
+# define GEN6_CLIP_TRI_PROVOKE_SHIFT 4
+# define GEN6_CLIP_LINE_PROVOKE_SHIFT 2
+# define GEN6_CLIP_TRIFAN_PROVOKE_SHIFT 0
+/* DW3 */
+# define GEN6_CLIP_MIN_POINT_WIDTH_SHIFT 17
+# define GEN6_CLIP_MAX_POINT_WIDTH_SHIFT 6
+# define GEN6_CLIP_FORCE_ZERO_RTAINDEX (1 << 5)
+
+#define CMD_3D_SF_STATE 0x7813 /* GEN6+ */
+/* DW1 */
+# define GEN6_SF_NUM_OUTPUTS_SHIFT 22
+# define GEN6_SF_SWIZZLE_ENABLE (1 << 21)
+# define GEN6_SF_POINT_SPRITE_LOWERLEFT (1 << 20)
+# define GEN6_SF_URB_ENTRY_READ_LENGTH_SHIFT 11
+# define GEN6_SF_URB_ENTRY_READ_OFFSET_SHIFT 4
+/* DW2 */
+# define GEN6_SF_LEGACY_GLOBAL_DEPTH_BIAS (1 << 11)
+# define GEN6_SF_STATISTICS_ENABLE (1 << 10)
+# define GEN6_SF_GLOBAL_DEPTH_OFFSET_SOLID (1 << 9)
+# define GEN6_SF_GLOBAL_DEPTH_OFFSET_WIREFRAME (1 << 8)
+# define GEN6_SF_GLOBAL_DEPTH_OFFSET_POINT (1 << 7)
+# define GEN6_SF_FRONT_SOLID (0 << 5)
+# define GEN6_SF_FRONT_WIREFRAME (1 << 5)
+# define GEN6_SF_FRONT_POINT (2 << 5)
+# define GEN6_SF_BACK_SOLID (0 << 3)
+# define GEN6_SF_BACK_WIREFRAME (1 << 3)
+# define GEN6_SF_BACK_POINT (2 << 3)
+# define GEN6_SF_VIEWPORT_TRANSFORM_ENABLE (1 << 1)
+# define GEN6_SF_WINDING_CCW (1 << 0)
+/* DW3 */
+# define GEN6_SF_LINE_AA_ENABLE (1 << 31)
+# define GEN6_SF_CULL_BOTH (0 << 29)
+# define GEN6_SF_CULL_NONE (1 << 29)
+# define GEN6_SF_CULL_FRONT (2 << 29)
+# define GEN6_SF_CULL_BACK (3 << 29)
+# define GEN6_SF_LINE_WIDTH_SHIFT 18 /* U3.7 */
+# define GEN6_SF_LINE_END_CAP_WIDTH_0_5 (0 << 16)
+# define GEN6_SF_LINE_END_CAP_WIDTH_1_0 (1 << 16)
+# define GEN6_SF_LINE_END_CAP_WIDTH_2_0 (2 << 16)
+# define GEN6_SF_LINE_END_CAP_WIDTH_4_0 (3 << 16)
+# define GEN6_SF_SCISSOR_ENABLE (1 << 11)
+# define GEN6_SF_MSRAST_OFF_PIXEL (0 << 8)
+# define GEN6_SF_MSRAST_OFF_PATTERN (1 << 8)
+# define GEN6_SF_MSRAST_ON_PIXEL (2 << 8)
+# define GEN6_SF_MSRAST_ON_PATTERN (3 << 8)
+/* DW4 */
+# define GEN6_SF_TRI_PROVOKE_SHIFT 29
+# define GEN6_SF_LINE_PROVOKE_SHIFT 27
+# define GEN6_SF_TRIFAN_PROVOKE_SHIFT 25
+# define GEN6_SF_LINE_AA_MODE_MANHATTAN (0 << 14)
+# define GEN6_SF_LINE_AA_MODE_TRUE (1 << 14)
+# define GEN6_SF_VERTEX_SUBPIXEL_8BITS (0 << 12)
+# define GEN6_SF_VERTEX_SUBPIXEL_4BITS (1 << 12)
+# define GEN6_SF_USE_STATE_POINT_WIDTH (1 << 11)
+# define GEN6_SF_POINT_WIDTH_SHIFT 0 /* U8.3 */
+/* DW5: depth offset constant */
+/* DW6: depth offset scale */
+/* DW7: depth offset clamp */
+/* DW8 */
+# define ATTRIBUTE_1_OVERRIDE_W (1 << 31)
+# define ATTRIBUTE_1_OVERRIDE_Z (1 << 30)
+# define ATTRIBUTE_1_OVERRIDE_Y (1 << 29)
+# define ATTRIBUTE_1_OVERRIDE_X (1 << 28)
+# define ATTRIBUTE_1_CONST_SOURCE_SHIFT 25
+# define ATTRIBUTE_1_SWIZZLE_SHIFT 22
+# define ATTRIBUTE_1_SOURCE_SHIFT 16
+# define ATTRIBUTE_0_OVERRIDE_W (1 << 15)
+# define ATTRIBUTE_0_OVERRIDE_Z (1 << 14)
+# define ATTRIBUTE_0_OVERRIDE_Y (1 << 13)
+# define ATTRIBUTE_0_OVERRIDE_X (1 << 12)
+# define ATTRIBUTE_0_CONST_SOURCE_SHIFT 9
+# define ATTRIBUTE_0_SWIZZLE_SHIFT 6
+# define ATTRIBUTE_0_SOURCE_SHIFT 0
+
+# define ATTRIBUTE_SWIZZLE_INPUTATTR 0
+# define ATTRIBUTE_SWIZZLE_INPUTATTR_FACING 1
+# define ATTRIBUTE_SWIZZLE_INPUTATTR_W 2
+# define ATTRIBUTE_SWIZZLE_INPUTATTR_FACING_W 3
+# define ATTRIBUTE_SWIZZLE_SHIFT 6
+
+/* DW16: Point sprite texture coordinate enables */
+/* DW17: Constant interpolation enables */
+/* DW18: attr 0-7 wrap shortest enables */
+/* DW19: attr 8-16 wrap shortest enables */
+
+#define CMD_3D_WM_STATE 0x7814 /* GEN6+ */
+/* DW1: kernel pointer */
+/* DW2 */
+# define GEN6_WM_SPF_MODE (1 << 31)
+# define GEN6_WM_VECTOR_MASK_ENABLE (1 << 30)
+# define GEN6_WM_SAMPLER_COUNT_SHIFT 27
+# define GEN6_WM_BINDING_TABLE_ENTRY_COUNT_SHIFT 18
+# define GEN6_WM_FLOATING_POINT_MODE_IEEE_754 (0 << 16)
+# define GEN6_WM_FLOATING_POINT_MODE_ALT (1 << 16)
+/* DW3: scratch space */
+/* DW4 */
+# define GEN6_WM_STATISTICS_ENABLE (1 << 31)
+# define GEN6_WM_DEPTH_CLEAR (1 << 30)
+# define GEN6_WM_DEPTH_RESOLVE (1 << 28)
+# define GEN6_WM_HIERARCHICAL_DEPTH_RESOLVE (1 << 27)
+# define GEN6_WM_DISPATCH_START_GRF_SHIFT_0 16
+# define GEN6_WM_DISPATCH_START_GRF_SHIFT_1 8
+# define GEN6_WM_DISPATCH_START_GRF_SHIFT_2 0
+/* DW5 */
+# define GEN6_WM_MAX_THREADS_SHIFT 25
+# define GEN6_WM_KILL_ENABLE (1 << 22)
+# define GEN6_WM_COMPUTED_DEPTH (1 << 21)
+# define GEN6_WM_USES_SOURCE_DEPTH (1 << 20)
+# define GEN6_WM_DISPATCH_ENABLE (1 << 19)
+# define GEN6_WM_LINE_END_CAP_AA_WIDTH_0_5 (0 << 16)
+# define GEN6_WM_LINE_END_CAP_AA_WIDTH_1_0 (1 << 16)
+# define GEN6_WM_LINE_END_CAP_AA_WIDTH_2_0 (2 << 16)
+# define GEN6_WM_LINE_END_CAP_AA_WIDTH_4_0 (3 << 16)
+# define GEN6_WM_LINE_AA_WIDTH_0_5 (0 << 14)
+# define GEN6_WM_LINE_AA_WIDTH_1_0 (1 << 14)
+# define GEN6_WM_LINE_AA_WIDTH_2_0 (2 << 14)
+# define GEN6_WM_LINE_AA_WIDTH_4_0 (3 << 14)
+# define GEN6_WM_POLYGON_STIPPLE_ENABLE (1 << 13)
+# define GEN6_WM_LINE_STIPPLE_ENABLE (1 << 11)
+# define GEN6_WM_OMASK_TO_RENDER_TARGET (1 << 9)
+# define GEN6_WM_USES_SOURCE_W (1 << 8)
+# define GEN6_WM_DUAL_SOURCE_BLEND_ENABLE (1 << 7)
+# define GEN6_WM_32_DISPATCH_ENABLE (1 << 2)
+# define GEN6_WM_16_DISPATCH_ENABLE (1 << 1)
+# define GEN6_WM_8_DISPATCH_ENABLE (1 << 0)
+/* DW6 */
+# define GEN6_WM_NUM_SF_OUTPUTS_SHIFT 20
+# define GEN6_WM_POSOFFSET_NONE (0 << 18)
+# define GEN6_WM_POSOFFSET_CENTROID (2 << 18)
+# define GEN6_WM_POSOFFSET_SAMPLE (3 << 18)
+# define GEN6_WM_POSITION_ZW_PIXEL (0 << 16)
+# define GEN6_WM_POSITION_ZW_CENTROID (2 << 16)
+# define GEN6_WM_POSITION_ZW_SAMPLE (3 << 16)
+# define GEN6_WM_NONPERSPECTIVE_SAMPLE_BARYCENTRIC (1 << 15)
+# define GEN6_WM_NONPERSPECTIVE_CENTROID_BARYCENTRIC (1 << 14)
+# define GEN6_WM_NONPERSPECTIVE_PIXEL_BARYCENTRIC (1 << 13)
+# define GEN6_WM_PERSPECTIVE_SAMPLE_BARYCENTRIC (1 << 12)
+# define GEN6_WM_PERSPECTIVE_CENTROID_BARYCENTRIC (1 << 11)
+# define GEN6_WM_PERSPECTIVE_PIXEL_BARYCENTRIC (1 << 10)
+# define GEN6_WM_POINT_RASTRULE_UPPER_RIGHT (1 << 9)
+# define GEN6_WM_MSRAST_OFF_PIXEL (0 << 1)
+# define GEN6_WM_MSRAST_OFF_PATTERN (1 << 1)
+# define GEN6_WM_MSRAST_ON_PIXEL (2 << 1)
+# define GEN6_WM_MSRAST_ON_PATTERN (3 << 1)
+# define GEN6_WM_MSDISPMODE_PERPIXEL (1 << 0)
+/* DW7: kernel 1 pointer */
+/* DW8: kernel 2 pointer */
+
+#define CMD_3D_CONSTANT_VS_STATE 0x7815 /* GEN6+ */
+#define CMD_3D_CONSTANT_GS_STATE 0x7816 /* GEN6+ */
+#define CMD_3D_CONSTANT_PS_STATE 0x7817 /* GEN6+ */
+# define GEN6_CONSTANT_BUFFER_3_ENABLE (1 << 15)
+# define GEN6_CONSTANT_BUFFER_2_ENABLE (1 << 14)
+# define GEN6_CONSTANT_BUFFER_1_ENABLE (1 << 13)
+# define GEN6_CONSTANT_BUFFER_0_ENABLE (1 << 12)
+
+#define CMD_3D_SAMPLE_MASK 0x7818 /* GEN6+ */
#define CMD_DRAW_RECT 0x7900
#define CMD_BLEND_CONSTANT_COLOR 0x7901
@@ -827,6 +1127,25 @@
#define CMD_GLOBAL_DEPTH_OFFSET_CLAMP 0x7909
#define CMD_AA_LINE_PARAMETERS 0x790a
+#define CMD_GS_SVB_INDEX 0x790b /* CTG+ */
+/* DW1 */
+# define SVB_INDEX_SHIFT 29
+# define SVB_LOAD_INTERNAL_VERTEX_COUNT (1 << 0) /* SNB+ */
+/* DW2: SVB index */
+/* DW3: SVB maximum index */
+
+#define CMD_3D_MULTISAMPLE 0x790d /* SNB+ */
+/* DW1 */
+# define MS_PIXEL_LOCATION_CENTER (0 << 4)
+# define MS_PIXEL_LOCATION_UPPER_LEFT (1 << 4)
+# define MS_NUMSAMPLES_1 (0 << 1)
+# define MS_NUMSAMPLES_4 (2 << 1)
+# define MS_NUMSAMPLES_8 (3 << 1)
+
+#define CMD_3D_CLEAR_PARAMS 0x7910 /* ILK+ */
+# define DEPTH_CLEAR_VALID (1 << 15)
+/* DW1: depth clear value */
+
#define CMD_PIPE_CONTROL 0x7a00
#define CMD_3D_PRIM 0x7b00
@@ -839,8 +1158,8 @@
#define R02_PRIM_END 0x1
#define R02_PRIM_START 0x2
-#define URB_SIZES(brw) (BRW_IS_IGDNG(brw) ? 1024 : \
- (BRW_IS_G4X(brw) ? 384 : 256)) /* 512 bit units */
+#define URB_SIZES(brw) (brw->gen == 5 ? 1024 : \
+ (brw->is_g4x ? 384 : 256)) /* 512 bit units */
diff --git a/src/gallium/drivers/i965/brw_disasm.c b/src/gallium/drivers/i965/brw_disasm.c
index 28c83515ba9..b093569f0cf 100644
--- a/src/gallium/drivers/i965/brw_disasm.c
+++ b/src/gallium/drivers/i965/brw_disasm.c
@@ -49,12 +49,14 @@ struct {
[BRW_OPCODE_MAC] = { .name = "mac", .nsrc = 2, .ndst = 1 },
[BRW_OPCODE_MACH] = { .name = "mach", .nsrc = 2, .ndst = 1 },
[BRW_OPCODE_LINE] = { .name = "line", .nsrc = 2, .ndst = 1 },
+ [BRW_OPCODE_PLN] = { .name = "pln", .nsrc = 2, .ndst = 1 },
[BRW_OPCODE_SAD2] = { .name = "sad2", .nsrc = 2, .ndst = 1 },
[BRW_OPCODE_SADA2] = { .name = "sada2", .nsrc = 2, .ndst = 1 },
[BRW_OPCODE_DP4] = { .name = "dp4", .nsrc = 2, .ndst = 1 },
[BRW_OPCODE_DPH] = { .name = "dph", .nsrc = 2, .ndst = 1 },
[BRW_OPCODE_DP3] = { .name = "dp3", .nsrc = 2, .ndst = 1 },
[BRW_OPCODE_DP2] = { .name = "dp2", .nsrc = 2, .ndst = 1 },
+ [BRW_OPCODE_MATH] = { .name = "math", .nsrc = 2, .ndst = 1 },
[BRW_OPCODE_AVG] = { .name = "avg", .nsrc = 2, .ndst = 1 },
[BRW_OPCODE_ADD] = { .name = "add", .nsrc = 2, .ndst = 1 },
@@ -69,13 +71,14 @@ struct {
[BRW_OPCODE_CMPN] = { .name = "cmpn", .nsrc = 2, .ndst = 1 },
[BRW_OPCODE_SEND] = { .name = "send", .nsrc = 1, .ndst = 1 },
+ [BRW_OPCODE_SENDC] = { .name = "sendc", .nsrc = 1, .ndst = 1 },
[BRW_OPCODE_NOP] = { .name = "nop", .nsrc = 0, .ndst = 0 },
[BRW_OPCODE_JMPI] = { .name = "jmpi", .nsrc = 1, .ndst = 0 },
[BRW_OPCODE_IF] = { .name = "if", .nsrc = 2, .ndst = 0 },
- [BRW_OPCODE_IFF] = { .name = "iff", .nsrc = 1, .ndst = 01 },
- [BRW_OPCODE_WHILE] = { .name = "while", .nsrc = 1, .ndst = 0 },
+ [BRW_OPCODE_IFF] = { .name = "iff", .nsrc = 2, .ndst = 1 },
+ [BRW_OPCODE_WHILE] = { .name = "while", .nsrc = 2, .ndst = 0 },
[BRW_OPCODE_ELSE] = { .name = "else", .nsrc = 2, .ndst = 0 },
- [BRW_OPCODE_BREAK] = { .name = "break", .nsrc = 1, .ndst = 0 },
+ [BRW_OPCODE_BREAK] = { .name = "break", .nsrc = 2, .ndst = 0 },
[BRW_OPCODE_CONTINUE] = { .name = "cont", .nsrc = 1, .ndst = 0 },
[BRW_OPCODE_HALT] = { .name = "halt", .nsrc = 1, .ndst = 0 },
[BRW_OPCODE_MSAVE] = { .name = "msave", .nsrc = 1, .ndst = 1 },
@@ -144,7 +147,6 @@ char *chan_sel[4] = {
};
char *dest_condmod[16] = {
- [0] = NULL
};
char *debug_ctrl[2] = {
@@ -157,6 +159,16 @@ char *saturate[2] = {
[1] = ".sat"
};
+char *accwr[2] = {
+ [0] = "",
+ [1] = "AccWrEnable"
+};
+
+char *wectrl[2] = {
+ [0] = "WE_normal",
+ [1] = "WE_all"
+};
+
char *exec_size[8] = {
[0] = "1",
[1] = "2",
@@ -204,6 +216,7 @@ char *compr_ctrl[4] = {
[0] = "",
[1] = "sechalf",
[2] = "compr",
+ [3] = "compr4",
};
char *dep_ctrl[4] = {
@@ -233,6 +246,16 @@ char *reg_encoding[8] = {
[7] = "F"
};
+int reg_type_size[8] = {
+ [0] = 4,
+ [1] = 4,
+ [2] = 2,
+ [3] = 2,
+ [4] = 1,
+ [5] = 1,
+ [7] = 4
+};
+
char *imm_encoding[8] = {
[0] = "UD",
[1] = "D",
@@ -321,6 +344,11 @@ char *math_precision[2] = {
[1] = "partial_precision"
};
+char *urb_opcode[2] = {
+ [0] = "urb_write",
+ [1] = "ff_sync",
+};
+
char *urb_swizzle[4] = {
[BRW_URB_SWIZZLE_NONE] = "",
[BRW_URB_SWIZZLE_INTERLEAVE] = "interleave",
@@ -416,6 +444,11 @@ static int print_opcode (FILE *file, int id)
static int reg (FILE *file, GLuint _reg_file, GLuint _reg_nr)
{
int err = 0;
+
+ /* Clear the Compr4 instruction compression bit. */
+ if (_reg_file == BRW_MESSAGE_REGISTER_FILE)
+ _reg_nr &= ~(1 << 7);
+
if (_reg_file == BRW_ARCHITECTURE_REGISTER_FILE) {
switch (_reg_nr & 0xf0) {
case BRW_ARF_NULL:
@@ -427,6 +460,9 @@ static int reg (FILE *file, GLuint _reg_file, GLuint _reg_nr)
case BRW_ARF_ACCUMULATOR:
format (file, "acc%d", _reg_nr & 0x0f);
break;
+ case BRW_ARF_FLAG:
+ format (file, "f%d", _reg_nr & 0x0f);
+ break;
case BRW_ARF_MASK:
format (file, "mask%d", _reg_nr & 0x0f);
break;
@@ -457,7 +493,7 @@ static int reg (FILE *file, GLuint _reg_file, GLuint _reg_nr)
return err;
}
-static int dest (FILE *file, const struct brw_instruction *inst)
+static int dest (FILE *file, struct brw_instruction *inst)
{
int err = 0;
@@ -469,7 +505,8 @@ static int dest (FILE *file, const struct brw_instruction *inst)
if (err == -1)
return 0;
if (inst->bits1.da1.dest_subreg_nr)
- format (file, ".%d", inst->bits1.da1.dest_subreg_nr);
+ format (file, ".%d", inst->bits1.da1.dest_subreg_nr /
+ reg_type_size[inst->bits1.da1.dest_reg_type]);
format (file, "<%d>", inst->bits1.da1.dest_horiz_stride);
err |= control (file, "dest reg encoding", reg_encoding, inst->bits1.da1.dest_reg_type, NULL);
}
@@ -477,7 +514,8 @@ static int dest (FILE *file, const struct brw_instruction *inst)
{
string (file, "g[a0");
if (inst->bits1.ia1.dest_subreg_nr)
- format (file, ".%d", inst->bits1.ia1.dest_subreg_nr);
+ format (file, ".%d", inst->bits1.ia1.dest_subreg_nr /
+ reg_type_size[inst->bits1.ia1.dest_reg_type]);
if (inst->bits1.ia1.dest_indirect_offset)
format (file, " %d", inst->bits1.ia1.dest_indirect_offset);
string (file, "]");
@@ -493,7 +531,8 @@ static int dest (FILE *file, const struct brw_instruction *inst)
if (err == -1)
return 0;
if (inst->bits1.da16.dest_subreg_nr)
- format (file, ".%d", inst->bits1.da16.dest_subreg_nr);
+ format (file, ".%d", inst->bits1.da16.dest_subreg_nr /
+ reg_type_size[inst->bits1.da16.dest_reg_type]);
string (file, "<1>");
err |= control (file, "writemask", writemask, inst->bits1.da16.dest_writemask, NULL);
err |= control (file, "dest reg encoding", reg_encoding, inst->bits1.da16.dest_reg_type, NULL);
@@ -534,7 +573,7 @@ static int src_da1 (FILE *file, GLuint type, GLuint _reg_file,
if (err == -1)
return 0;
if (sub_reg_num)
- format (file, ".%d", sub_reg_num);
+ format (file, ".%d", sub_reg_num / reg_type_size[type]); /* use formal style like spec */
src_align1_region (file, _vert_stride, _width, _horiz_stride);
err |= control (file, "src reg encoding", reg_encoding, type, NULL);
return err;
@@ -588,11 +627,12 @@ static int src_da16 (FILE *file,
if (err == -1)
return 0;
if (_subreg_nr)
- format (file, ".%d", _subreg_nr);
+ /* bit4 for subreg number byte addressing. Make this same meaning as
+ in da1 case, so output looks consistent. */
+ format (file, ".%d", 16 / reg_type_size[_reg_type]);
string (file, "<");
err |= control (file, "vert stride", vert_stride, _vert_stride, NULL);
- string (file, ",1,1>");
- err |= control (file, "src da16 reg type", reg_encoding, _reg_type, NULL);
+ string (file, ",4,1>");
/*
* Three kinds of swizzle display:
* identity - nothing printed
@@ -619,11 +659,12 @@ static int src_da16 (FILE *file,
err |= control (file, "channel select", chan_sel, swz_z, NULL);
err |= control (file, "channel select", chan_sel, swz_w, NULL);
}
+ err |= control (file, "src da16 reg type", reg_encoding, _reg_type, NULL);
return err;
}
-static int imm (FILE *file, GLuint type, const struct brw_instruction *inst) {
+static int imm (FILE *file, GLuint type, struct brw_instruction *inst) {
switch (type) {
case BRW_REGISTER_TYPE_UD:
format (file, "0x%08xUD", inst->bits3.ud);
@@ -652,7 +693,7 @@ static int imm (FILE *file, GLuint type, const struct brw_instruction *inst) {
return 0;
}
-static int src0 (FILE *file, const struct brw_instruction *inst)
+static int src0 (FILE *file, struct brw_instruction *inst)
{
if (inst->bits1.da1.src0_reg_file == BRW_IMMEDIATE_VALUE)
return imm (file, inst->bits1.da1.src0_reg_type,
@@ -712,7 +753,7 @@ static int src0 (FILE *file, const struct brw_instruction *inst)
}
}
-static int src1 (FILE *file, const struct brw_instruction *inst)
+static int src1 (FILE *file, struct brw_instruction *inst)
{
if (inst->bits1.da1.src1_reg_file == BRW_IMMEDIATE_VALUE)
return imm (file, inst->bits1.da1.src1_reg_type,
@@ -772,7 +813,7 @@ static int src1 (FILE *file, const struct brw_instruction *inst)
}
}
-int brw_disasm_insn (FILE *file, const struct brw_instruction *inst)
+int brw_disasm_insn (FILE *file, struct brw_instruction *inst, int gen)
{
int err = 0;
int space = 0;
@@ -822,7 +863,8 @@ int brw_disasm_insn (FILE *file, const struct brw_instruction *inst)
err |= src1 (file, inst);
}
- if (inst->header.opcode == BRW_OPCODE_SEND) {
+ if (inst->header.opcode == BRW_OPCODE_SEND ||
+ inst->header.opcode == BRW_OPCODE_SENDC) {
newline (file);
pad (file, 16);
space = 0;
@@ -842,24 +884,70 @@ int brw_disasm_insn (FILE *file, const struct brw_instruction *inst)
inst->bits3.math.precision, &space);
break;
case BRW_MESSAGE_TARGET_SAMPLER:
- format (file, " (%d, %d, ",
- inst->bits3.sampler.binding_table_index,
- inst->bits3.sampler.sampler);
- err |= control (file, "sampler target format", sampler_target_format,
- inst->bits3.sampler.return_format, NULL);
- string (file, ")");
+ if (gen >= 5) {
+ format (file, " (%d, %d, %d, %d)",
+ inst->bits3.sampler_gen5.binding_table_index,
+ inst->bits3.sampler_gen5.sampler,
+ inst->bits3.sampler_gen5.msg_type,
+ inst->bits3.sampler_gen5.simd_mode);
+ } else if (0 /* FINISHME: is_g4x */) {
+ format (file, " (%d, %d)",
+ inst->bits3.sampler_g4x.binding_table_index,
+ inst->bits3.sampler_g4x.sampler);
+ } else {
+ format (file, " (%d, %d, ",
+ inst->bits3.sampler.binding_table_index,
+ inst->bits3.sampler.sampler);
+ err |= control (file, "sampler target format", sampler_target_format,
+ inst->bits3.sampler.return_format, NULL);
+ string (file, ")");
+ }
+ break;
+ case BRW_MESSAGE_TARGET_DATAPORT_READ:
+ if (gen >= 6) {
+ format (file, " (%d, %d, %d, %d, %d, %d)",
+ inst->bits3.dp_render_cache.binding_table_index,
+ inst->bits3.dp_render_cache.msg_control,
+ inst->bits3.dp_render_cache.msg_type,
+ inst->bits3.dp_render_cache.send_commit_msg,
+ inst->bits3.dp_render_cache.msg_length,
+ inst->bits3.dp_render_cache.response_length);
+ } else if (gen >= 5 /* FINISHME: || is_g4x */) {
+ format (file, " (%d, %d, %d)",
+ inst->bits3.dp_read_gen5.binding_table_index,
+ inst->bits3.dp_read_gen5.msg_control,
+ inst->bits3.dp_read_gen5.msg_type);
+ } else {
+ format (file, " (%d, %d, %d)",
+ inst->bits3.dp_read.binding_table_index,
+ inst->bits3.dp_read.msg_control,
+ inst->bits3.dp_read.msg_type);
+ }
break;
case BRW_MESSAGE_TARGET_DATAPORT_WRITE:
- format (file, " (%d, %d, %d, %d)",
- inst->bits3.dp_write.binding_table_index,
- (inst->bits3.dp_write.pixel_scoreboard_clear << 3) |
- inst->bits3.dp_write.msg_control,
- inst->bits3.dp_write.msg_type,
- inst->bits3.dp_write.send_commit_msg);
+ if (gen >= 6) {
+ format (file, " (%d, %d, %d, %d, %d, %d)",
+ inst->bits3.dp_render_cache.binding_table_index,
+ inst->bits3.dp_render_cache.msg_control,
+ inst->bits3.dp_render_cache.msg_type,
+ inst->bits3.dp_render_cache.send_commit_msg,
+ inst->bits3.dp_render_cache.msg_length,
+ inst->bits3.dp_render_cache.response_length);
+ } else {
+ format (file, " (%d, %d, %d, %d)",
+ inst->bits3.dp_write.binding_table_index,
+ (inst->bits3.dp_write.pixel_scoreboard_clear << 3) |
+ inst->bits3.dp_write.msg_control,
+ inst->bits3.dp_write.msg_type,
+ inst->bits3.dp_write.send_commit_msg);
+ }
break;
case BRW_MESSAGE_TARGET_URB:
- format (file, " %d", inst->bits3.urb.offset);
- space = 1;
+ if (gen >= 5) {
+ format (file, " %d", inst->bits3.urb_gen5.offset);
+ } else {
+ format (file, " %d", inst->bits3.urb.offset);
+ }
err |= control (file, "urb swizzle", urb_swizzle,
inst->bits3.urb.swizzle_control, &space);
err |= control (file, "urb allocate", urb_allocate,
@@ -868,6 +956,11 @@ int brw_disasm_insn (FILE *file, const struct brw_instruction *inst)
inst->bits3.urb.used, &space);
err |= control (file, "urb complete", urb_complete,
inst->bits3.urb.complete, &space);
+ if (gen >= 5) {
+ format (file, " mlen %d, rlen %d\n",
+ inst->bits3.urb_gen5.msg_length,
+ inst->bits3.urb_gen5.response_length);
+ }
break;
case BRW_MESSAGE_TARGET_THREAD_SPAWNER:
break;
@@ -877,10 +970,17 @@ int brw_disasm_insn (FILE *file, const struct brw_instruction *inst)
}
if (space)
string (file, " ");
- format (file, "mlen %d",
- inst->bits3.generic.msg_length);
- format (file, " rlen %d",
- inst->bits3.generic.response_length);
+ if (gen >= 5) {
+ format (file, "mlen %d",
+ inst->bits3.generic_gen5.msg_length);
+ format (file, " rlen %d",
+ inst->bits3.generic_gen5.response_length);
+ } else {
+ format (file, "mlen %d",
+ inst->bits3.generic.msg_length);
+ format (file, " rlen %d",
+ inst->bits3.generic.response_length);
+ }
}
pad (file, 64);
if (inst->header.opcode != BRW_OPCODE_NOP) {
@@ -891,7 +991,8 @@ int brw_disasm_insn (FILE *file, const struct brw_instruction *inst)
err |= control (file, "dependency control", dep_ctrl, inst->header.dependency_control, &space);
err |= control (file, "compression control", compr_ctrl, inst->header.compression_control, &space);
err |= control (file, "thread control", thread_ctrl, inst->header.thread_control, &space);
- if (inst->header.opcode == BRW_OPCODE_SEND)
+ if (inst->header.opcode == BRW_OPCODE_SEND ||
+ inst->header.opcode == BRW_OPCODE_SENDC)
err |= control (file, "end of thread", end_of_thread,
inst->bits3.generic.end_of_thread, &space);
if (space)
@@ -905,13 +1006,13 @@ int brw_disasm_insn (FILE *file, const struct brw_instruction *inst)
int brw_disasm (FILE *file,
- const struct brw_instruction *inst,
- unsigned count)
+ struct brw_instruction *inst,
+ unsigned count, int gen)
{
int i, err;
for (i = 0; i < count; i++) {
- err = brw_disasm_insn(stderr, &inst[i]);
+ err = brw_disasm_insn(stderr, &inst[i], gen);
if (err)
return err;
}
diff --git a/src/gallium/drivers/i965/brw_disasm.h b/src/gallium/drivers/i965/brw_disasm.h
index ba5b109c483..ce451ed5a06 100644
--- a/src/gallium/drivers/i965/brw_disasm.h
+++ b/src/gallium/drivers/i965/brw_disasm.h
@@ -27,10 +27,10 @@
struct brw_instruction;
-int brw_disasm_insn (FILE *file, const struct brw_instruction *inst);
+int brw_disasm_insn (FILE *file, struct brw_instruction *inst, int gen);
int brw_disasm (FILE *file,
- const struct brw_instruction *inst,
- unsigned count);
+ struct brw_instruction *inst,
+ unsigned count, int gen);
#endif
diff --git a/src/gallium/drivers/i965/brw_draw_upload.c b/src/gallium/drivers/i965/brw_draw_upload.c
index ebeb1e146aa..04ec5c81a6b 100644
--- a/src/gallium/drivers/i965/brw_draw_upload.c
+++ b/src/gallium/drivers/i965/brw_draw_upload.c
@@ -89,13 +89,16 @@ static int brw_prepare_vertices(struct brw_context *brw)
vb->buffer->width0 - vb->buffer_offset :
MAX2(vb->buffer->width0 - vb->buffer_offset,
vb->stride * (max_index + 1 - min_index)));
+ boolean flushed;
- ret = u_upload_buffer( brw->vb.upload_vertex,
+ ret = u_upload_buffer( brw->vb.upload_vertex,
+ 0,
vb->buffer_offset + min_index * vb->stride,
size,
vb->buffer,
&offset,
- &upload_buf );
+ &upload_buf,
+ &flushed );
if (ret)
return ret;
@@ -167,7 +170,7 @@ static int brw_emit_vertex_buffers( struct brw_context *brw )
OUT_RELOC(brw->vb.vb[i].bo,
BRW_USAGE_VERTEX,
brw->vb.vb[i].offset);
- if (BRW_IS_IGDNG(brw)) {
+ if (brw->gen == 5) {
OUT_RELOC(brw->vb.vb[i].bo,
BRW_USAGE_VERTEX,
brw->vb.vb[i].bo->size - 1);
@@ -251,13 +254,16 @@ static int brw_prepare_indices(struct brw_context *brw)
/* Turn userbuffer into a proper hardware buffer?
*/
if (brw_buffer_is_user_buffer(index_buffer)) {
+ boolean flushed;
ret = u_upload_buffer( brw->vb.upload_index,
+ 0,
index_offset,
ib_size,
index_buffer,
&offset,
- &upload_buf );
+ &upload_buf,
+ &flushed );
if (ret)
return ret;
diff --git a/src/gallium/drivers/i965/brw_eu_emit.c b/src/gallium/drivers/i965/brw_eu_emit.c
index 00d8eaccbc4..ba1159e4c32 100644
--- a/src/gallium/drivers/i965/brw_eu_emit.c
+++ b/src/gallium/drivers/i965/brw_eu_emit.c
@@ -255,19 +255,19 @@ static void brw_set_math_message( struct brw_context *brw,
{
brw_set_src1(insn, brw_imm_d(0));
- if (BRW_IS_IGDNG(brw)) {
- insn->bits3.math_igdng.function = function;
- insn->bits3.math_igdng.int_type = integer_type;
- insn->bits3.math_igdng.precision = low_precision;
- insn->bits3.math_igdng.saturate = saturate;
- insn->bits3.math_igdng.data_type = dataType;
- insn->bits3.math_igdng.snapshot = 0;
- insn->bits3.math_igdng.header_present = 0;
- insn->bits3.math_igdng.response_length = response_length;
- insn->bits3.math_igdng.msg_length = msg_length;
- insn->bits3.math_igdng.end_of_thread = 0;
- insn->bits2.send_igdng.sfid = BRW_MESSAGE_TARGET_MATH;
- insn->bits2.send_igdng.end_of_thread = 0;
+ if (brw->gen == 5) {
+ insn->bits3.math_gen5.function = function;
+ insn->bits3.math_gen5.int_type = integer_type;
+ insn->bits3.math_gen5.precision = low_precision;
+ insn->bits3.math_gen5.saturate = saturate;
+ insn->bits3.math_gen5.data_type = dataType;
+ insn->bits3.math_gen5.snapshot = 0;
+ insn->bits3.math_gen5.header_present = 0;
+ insn->bits3.math_gen5.response_length = response_length;
+ insn->bits3.math_gen5.msg_length = msg_length;
+ insn->bits3.math_gen5.end_of_thread = 0;
+ insn->bits2.send_gen5.sfid = BRW_MESSAGE_TARGET_MATH;
+ insn->bits2.send_gen5.end_of_thread = 0;
} else {
insn->bits3.math.function = function;
insn->bits3.math.int_type = integer_type;
@@ -295,18 +295,18 @@ static void brw_set_ff_sync_message( struct brw_context *brw,
{
brw_set_src1(insn, brw_imm_d(0));
- insn->bits3.urb_igdng.opcode = 1;
- insn->bits3.urb_igdng.offset = offset;
- insn->bits3.urb_igdng.swizzle_control = swizzle_control;
- insn->bits3.urb_igdng.allocate = allocate;
- insn->bits3.urb_igdng.used = used;
- insn->bits3.urb_igdng.complete = complete;
- insn->bits3.urb_igdng.header_present = 1;
- insn->bits3.urb_igdng.response_length = response_length;
- insn->bits3.urb_igdng.msg_length = msg_length;
- insn->bits3.urb_igdng.end_of_thread = end_of_thread;
- insn->bits2.send_igdng.sfid = BRW_MESSAGE_TARGET_URB;
- insn->bits2.send_igdng.end_of_thread = end_of_thread;
+ insn->bits3.urb_gen5.opcode = 1;
+ insn->bits3.urb_gen5.offset = offset;
+ insn->bits3.urb_gen5.swizzle_control = swizzle_control;
+ insn->bits3.urb_gen5.allocate = allocate;
+ insn->bits3.urb_gen5.used = used;
+ insn->bits3.urb_gen5.complete = complete;
+ insn->bits3.urb_gen5.header_present = 1;
+ insn->bits3.urb_gen5.response_length = response_length;
+ insn->bits3.urb_gen5.msg_length = msg_length;
+ insn->bits3.urb_gen5.end_of_thread = end_of_thread;
+ insn->bits2.send_gen5.sfid = BRW_MESSAGE_TARGET_URB;
+ insn->bits2.send_gen5.end_of_thread = end_of_thread;
}
static void brw_set_urb_message( struct brw_context *brw,
@@ -322,19 +322,19 @@ static void brw_set_urb_message( struct brw_context *brw,
{
brw_set_src1(insn, brw_imm_d(0));
- if (BRW_IS_IGDNG(brw)) {
- insn->bits3.urb_igdng.opcode = 0; /* ? */
- insn->bits3.urb_igdng.offset = offset;
- insn->bits3.urb_igdng.swizzle_control = swizzle_control;
- insn->bits3.urb_igdng.allocate = allocate;
- insn->bits3.urb_igdng.used = used; /* ? */
- insn->bits3.urb_igdng.complete = complete;
- insn->bits3.urb_igdng.header_present = 1;
- insn->bits3.urb_igdng.response_length = response_length;
- insn->bits3.urb_igdng.msg_length = msg_length;
- insn->bits3.urb_igdng.end_of_thread = end_of_thread;
- insn->bits2.send_igdng.sfid = BRW_MESSAGE_TARGET_URB;
- insn->bits2.send_igdng.end_of_thread = end_of_thread;
+ if (brw->gen == 5) {
+ insn->bits3.urb_gen5.opcode = 0; /* ? */
+ insn->bits3.urb_gen5.offset = offset;
+ insn->bits3.urb_gen5.swizzle_control = swizzle_control;
+ insn->bits3.urb_gen5.allocate = allocate;
+ insn->bits3.urb_gen5.used = used; /* ? */
+ insn->bits3.urb_gen5.complete = complete;
+ insn->bits3.urb_gen5.header_present = 1;
+ insn->bits3.urb_gen5.response_length = response_length;
+ insn->bits3.urb_gen5.msg_length = msg_length;
+ insn->bits3.urb_gen5.end_of_thread = end_of_thread;
+ insn->bits2.send_gen5.sfid = BRW_MESSAGE_TARGET_URB;
+ insn->bits2.send_gen5.end_of_thread = end_of_thread;
} else {
insn->bits3.urb.opcode = 0; /* ? */
insn->bits3.urb.offset = offset;
@@ -361,18 +361,18 @@ static void brw_set_dp_write_message( struct brw_context *brw,
{
brw_set_src1(insn, brw_imm_d(0));
- if (BRW_IS_IGDNG(brw)) {
- 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;
- insn->bits3.dp_write_igdng.msg_type = msg_type;
- insn->bits3.dp_write_igdng.send_commit_msg = 0;
- insn->bits3.dp_write_igdng.header_present = 1;
- insn->bits3.dp_write_igdng.response_length = response_length;
- insn->bits3.dp_write_igdng.msg_length = msg_length;
- insn->bits3.dp_write_igdng.end_of_thread = end_of_thread;
- insn->bits2.send_igdng.sfid = BRW_MESSAGE_TARGET_DATAPORT_WRITE;
- insn->bits2.send_igdng.end_of_thread = end_of_thread;
+ if (brw->gen == 5) {
+ insn->bits3.dp_write_gen5.binding_table_index = binding_table_index;
+ insn->bits3.dp_write_gen5.msg_control = msg_control;
+ insn->bits3.dp_write_gen5.pixel_scoreboard_clear = pixel_scoreboard_clear;
+ insn->bits3.dp_write_gen5.msg_type = msg_type;
+ insn->bits3.dp_write_gen5.send_commit_msg = 0;
+ insn->bits3.dp_write_gen5.header_present = 1;
+ insn->bits3.dp_write_gen5.response_length = response_length;
+ insn->bits3.dp_write_gen5.msg_length = msg_length;
+ insn->bits3.dp_write_gen5.end_of_thread = end_of_thread;
+ insn->bits2.send_gen5.sfid = BRW_MESSAGE_TARGET_DATAPORT_WRITE;
+ insn->bits2.send_gen5.end_of_thread = end_of_thread;
} else {
insn->bits3.dp_write.binding_table_index = binding_table_index;
insn->bits3.dp_write.msg_control = msg_control;
@@ -398,18 +398,18 @@ static void brw_set_dp_read_message( struct brw_context *brw,
{
brw_set_src1(insn, brw_imm_d(0));
- if (BRW_IS_IGDNG(brw)) {
- 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;
- insn->bits3.dp_read_igdng.target_cache = target_cache;
- insn->bits3.dp_read_igdng.header_present = 1;
- insn->bits3.dp_read_igdng.response_length = response_length;
- insn->bits3.dp_read_igdng.msg_length = msg_length;
- insn->bits3.dp_read_igdng.pad1 = 0;
- insn->bits3.dp_read_igdng.end_of_thread = end_of_thread;
- insn->bits2.send_igdng.sfid = BRW_MESSAGE_TARGET_DATAPORT_READ;
- insn->bits2.send_igdng.end_of_thread = end_of_thread;
+ if (brw->gen == 5) {
+ insn->bits3.dp_read_gen5.binding_table_index = binding_table_index;
+ insn->bits3.dp_read_gen5.msg_control = msg_control;
+ insn->bits3.dp_read_gen5.msg_type = msg_type;
+ insn->bits3.dp_read_gen5.target_cache = target_cache;
+ insn->bits3.dp_read_gen5.header_present = 1;
+ insn->bits3.dp_read_gen5.response_length = response_length;
+ insn->bits3.dp_read_gen5.msg_length = msg_length;
+ insn->bits3.dp_read_gen5.pad1 = 0;
+ insn->bits3.dp_read_gen5.end_of_thread = end_of_thread;
+ insn->bits2.send_gen5.sfid = BRW_MESSAGE_TARGET_DATAPORT_READ;
+ insn->bits2.send_gen5.end_of_thread = end_of_thread;
} else {
insn->bits3.dp_read.binding_table_index = binding_table_index; /*0:7*/
insn->bits3.dp_read.msg_control = msg_control; /*8:11*/
@@ -437,18 +437,18 @@ static void brw_set_sampler_message(struct brw_context *brw,
assert(eot == 0);
brw_set_src1(insn, brw_imm_d(0));
- if (BRW_IS_IGDNG(brw)) {
- insn->bits3.sampler_igdng.binding_table_index = binding_table_index;
- insn->bits3.sampler_igdng.sampler = sampler;
- insn->bits3.sampler_igdng.msg_type = msg_type;
- insn->bits3.sampler_igdng.simd_mode = simd_mode;
- insn->bits3.sampler_igdng.header_present = header_present;
- insn->bits3.sampler_igdng.response_length = response_length;
- insn->bits3.sampler_igdng.msg_length = msg_length;
- 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)) {
+ if (brw->gen == 5) {
+ insn->bits3.sampler_gen5.binding_table_index = binding_table_index;
+ insn->bits3.sampler_gen5.sampler = sampler;
+ insn->bits3.sampler_gen5.msg_type = msg_type;
+ insn->bits3.sampler_gen5.simd_mode = simd_mode;
+ insn->bits3.sampler_gen5.header_present = header_present;
+ insn->bits3.sampler_gen5.response_length = response_length;
+ insn->bits3.sampler_gen5.msg_length = msg_length;
+ insn->bits3.sampler_gen5.end_of_thread = eot;
+ insn->bits2.send_gen5.sfid = BRW_MESSAGE_TARGET_SAMPLER;
+ insn->bits2.send_gen5.end_of_thread = eot;
+ } else if (brw->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;
@@ -478,7 +478,7 @@ static struct brw_instruction *next_insn( struct brw_compile *p,
if (0 && (BRW_DEBUG & DEBUG_DISASSEM))
{
if (p->nr_insn)
- brw_disasm_insn(stderr, &p->store[p->nr_insn-1]);
+ brw_disasm_insn(stderr, &p->store[p->nr_insn-1], p->brw->gen);
}
assert(p->nr_insn + 1 < BRW_EU_MAX_INSN);
@@ -658,7 +658,7 @@ struct brw_instruction *brw_ELSE(struct brw_compile *p,
struct brw_instruction *insn;
GLuint br = 1;
- if (BRW_IS_IGDNG(p->brw))
+ if (p->brw->gen == 5)
br = 2;
if (p->single_program_flow) {
@@ -699,7 +699,7 @@ void brw_ENDIF(struct brw_compile *p,
{
GLuint br = 1;
- if (BRW_IS_IGDNG(p->brw))
+ if (p->brw->gen == 5)
br = 2;
if (p->single_program_flow) {
@@ -813,7 +813,7 @@ struct brw_instruction *brw_WHILE(struct brw_compile *p,
struct brw_instruction *insn;
GLuint br = 1;
- if (BRW_IS_IGDNG(p->brw))
+ if (p->brw->gen == 5)
br = 2;
if (p->single_program_flow)
@@ -856,7 +856,7 @@ void brw_land_fwd_jump(struct brw_compile *p,
struct brw_instruction *landing = &p->store[p->nr_insn];
GLuint jmpi = 1;
- if (BRW_IS_IGDNG(p->brw))
+ if (p->brw->gen == 5)
jmpi = 2;
assert(jmp_insn->header.opcode == BRW_OPCODE_JMPI);
diff --git a/src/gallium/drivers/i965/brw_gs.c b/src/gallium/drivers/i965/brw_gs.c
index 06826635a8a..2a8165b83ee 100644
--- a/src/gallium/drivers/i965/brw_gs.c
+++ b/src/gallium/drivers/i965/brw_gs.c
@@ -51,13 +51,13 @@ static enum pipe_error compile_gs_prog( struct brw_context *brw,
memset(&c, 0, sizeof(c));
c.key = *key;
- c.need_ff_sync = BRW_IS_IGDNG(brw);
+ c.need_ff_sync = brw->gen == 5;
/* Need to locate the two positions present in vertex + header.
* These are currently hardcoded:
*/
c.nr_attrs = c.key.nr_attrs;
- if (BRW_IS_IGDNG(brw))
+ if (brw->gen == 5)
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? */
diff --git a/src/gallium/drivers/i965/brw_gs_state.c b/src/gallium/drivers/i965/brw_gs_state.c
index b64ec286cea..6e070f6d756 100644
--- a/src/gallium/drivers/i965/brw_gs_state.c
+++ b/src/gallium/drivers/i965/brw_gs_state.c
@@ -103,7 +103,7 @@ gs_unit_create_from_key(struct brw_context *brw,
else
gs.thread4.max_threads = 0;
- if (BRW_IS_IGDNG(brw))
+ if (brw->gen == 5)
gs.thread4.rendering_enable = 1;
if (BRW_DEBUG & DEBUG_STATS)
diff --git a/src/gallium/drivers/i965/brw_misc_state.c b/src/gallium/drivers/i965/brw_misc_state.c
index 6d89b5d2baf..d53ce6ccfd4 100644
--- a/src/gallium/drivers/i965/brw_misc_state.c
+++ b/src/gallium/drivers/i965/brw_misc_state.c
@@ -239,7 +239,7 @@ static int prepare_depthbuffer(struct brw_context *brw)
static int emit_depthbuffer(struct brw_context *brw)
{
struct pipe_surface *surface = brw->curr.fb.zsbuf;
- unsigned int len = (BRW_IS_G4X(brw) || BRW_IS_IGDNG(brw)) ? 6 : 5;
+ unsigned int len = (brw->is_g4x || brw->gen == 5) ? 6 : 5;
if (surface == NULL) {
BEGIN_BATCH(len, IGNORE_CLIPRECTS);
@@ -250,7 +250,7 @@ static int emit_depthbuffer(struct brw_context *brw)
OUT_BATCH(0);
OUT_BATCH(0);
- if (BRW_IS_G4X(brw) || BRW_IS_IGDNG(brw))
+ if (brw->is_g4x || brw->gen == 5)
OUT_BATCH(0);
ADVANCE_BATCH();
@@ -298,7 +298,7 @@ static int emit_depthbuffer(struct brw_context *brw)
((surface->height - 1) << 19));
OUT_BATCH(0);
- if (BRW_IS_G4X(brw) || BRW_IS_IGDNG(brw))
+ if (brw->is_g4x || brw->gen == 5)
OUT_BATCH(0);
ADVANCE_BATCH();
@@ -363,10 +363,10 @@ const struct brw_tracked_state brw_line_stipple = {
/***********************************************************************
- * Misc invarient state packets
+ * Misc invariant state packets
*/
-static int upload_invarient_state( struct brw_context *brw )
+static int upload_invariant_state( struct brw_context *brw )
{
{
/* 0x61040000 Pipeline Select */
@@ -374,7 +374,7 @@ static int upload_invarient_state( struct brw_context *brw )
struct brw_pipeline_select ps;
memset(&ps, 0, sizeof(ps));
- if (BRW_IS_G4X(brw) || BRW_IS_IGDNG(brw))
+ if (brw->is_g4x || brw->gen == 5)
ps.header.opcode = CMD_PIPELINE_SELECT_GM45;
else
ps.header.opcode = CMD_PIPELINE_SELECT_965;
@@ -413,7 +413,7 @@ static int upload_invarient_state( struct brw_context *brw )
struct brw_vf_statistics vfs;
memset(&vfs, 0, sizeof(vfs));
- if (BRW_IS_G4X(brw) || BRW_IS_IGDNG(brw))
+ if (brw->is_g4x || brw->gen == 5)
vfs.opcode = CMD_VF_STATISTICS_GM45;
else
vfs.opcode = CMD_VF_STATISTICS_965;
@@ -424,7 +424,7 @@ static int upload_invarient_state( struct brw_context *brw )
BRW_BATCH_STRUCT(brw, &vfs);
}
- if (!BRW_IS_965(brw))
+ if (!(brw->gen == 4))
{
struct brw_aa_line_parameters balp;
@@ -439,7 +439,7 @@ static int upload_invarient_state( struct brw_context *brw )
{
struct brw_polygon_stipple_offset bpso;
- /* This is invarient state in gallium:
+ /* This is invariant state in gallium:
*/
memset(&bpso, 0, sizeof(bpso));
bpso.header.opcode = CMD_POLY_STIPPLE_OFFSET;
@@ -453,13 +453,13 @@ static int upload_invarient_state( struct brw_context *brw )
return 0;
}
-const struct brw_tracked_state brw_invarient_state = {
+const struct brw_tracked_state brw_invariant_state = {
.dirty = {
.mesa = 0,
.brw = BRW_NEW_CONTEXT,
.cache = 0
},
- .emit = upload_invarient_state
+ .emit = upload_invariant_state
};
@@ -480,7 +480,7 @@ static int 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)) {
+ if (brw->gen == 5) {
BEGIN_BATCH(8, IGNORE_CLIPRECTS);
OUT_BATCH(CMD_STATE_BASE_ADDRESS << 16 | (8 - 2));
OUT_BATCH(1); /* General state base address */
diff --git a/src/gallium/drivers/i965/brw_pipe_flush.c b/src/gallium/drivers/i965/brw_pipe_flush.c
index 0ae1a6be9e5..3b4a99beed2 100644
--- a/src/gallium/drivers/i965/brw_pipe_flush.c
+++ b/src/gallium/drivers/i965/brw_pipe_flush.c
@@ -38,7 +38,6 @@ void brw_context_flush( struct brw_context *brw )
static void
brw_flush( struct pipe_context *pipe,
- unsigned flags,
struct pipe_fence_handle **fence )
{
brw_context_flush( brw_context( pipe ) );
diff --git a/src/gallium/drivers/i965/brw_pipe_rast.c b/src/gallium/drivers/i965/brw_pipe_rast.c
index 4c1a6d7dcdf..c86681d1495 100644
--- a/src/gallium/drivers/i965/brw_pipe_rast.c
+++ b/src/gallium/drivers/i965/brw_pipe_rast.c
@@ -35,7 +35,7 @@ calculate_clip_key_rast( const struct brw_context *brw,
{
memset(key, 0, sizeof *key);
- if (brw->chipset.is_igdng)
+ if (brw->gen == 5)
key->clip_mode = BRW_CLIPMODE_KERNEL_CLIP;
else
key->clip_mode = BRW_CLIPMODE_NORMAL;
diff --git a/src/gallium/drivers/i965/brw_pipe_surface.c b/src/gallium/drivers/i965/brw_pipe_surface.c
index 4deead98b19..58a610089e2 100644
--- a/src/gallium/drivers/i965/brw_pipe_surface.c
+++ b/src/gallium/drivers/i965/brw_pipe_surface.c
@@ -169,20 +169,15 @@ static struct brw_surface *create_in_place_view( struct brw_screen *brw_screen,
surface->ss.ss1.base_addr = surface->offset - tile_offset;
- if (brw_screen->chipset.is_g4x) {
- if (tex->tiling == BRW_TILING_X) {
- /* Note that the low bits of these fields are missing, so
- * there's the possibility of getting in trouble.
- */
- surface->ss.ss5.x_offset = (tile_offset % 512) / tex->cpp / 4;
- surface->ss.ss5.y_offset = tile_offset / 512 / 2;
- } else {
- surface->ss.ss5.x_offset = (tile_offset % 128) / tex->cpp / 4;
+ if (tex->tiling == BRW_TILING_X) {
+ /* Note that the low bits of these fields are missing, so
+ * there's the possibility of getting in trouble.
+ */
+ surface->ss.ss5.x_offset = (tile_offset % 512) / tex->cpp / 4;
+ surface->ss.ss5.y_offset = tile_offset / 512 / 2;
+ } else {
+ surface->ss.ss5.x_offset = (tile_offset % 128) / tex->cpp / 4;
surface->ss.ss5.y_offset = tile_offset / 128 / 2;
- }
- }
- else {
- assert(tile_offset == 0);
}
}
diff --git a/src/gallium/drivers/i965/brw_pipe_vertex.c b/src/gallium/drivers/i965/brw_pipe_vertex.c
index 007239efc40..570ea23ff45 100644
--- a/src/gallium/drivers/i965/brw_pipe_vertex.c
+++ b/src/gallium/drivers/i965/brw_pipe_vertex.c
@@ -4,6 +4,7 @@
#include "util/u_memory.h"
#include "util/u_format.h"
+#include "util/u_transfer.h"
static unsigned brw_translate_surface_format( unsigned id )
@@ -203,7 +204,7 @@ static void brw_translate_vertex_elements(struct brw_context *brw,
brw_velems->ve[i].ve1.vfcomponent2 = comp2;
brw_velems->ve[i].ve1.vfcomponent3 = comp3;
- if (BRW_IS_IGDNG(brw))
+ if (brw->gen == 5)
brw_velems->ve[i].ve1.dst_offset = 0;
else
brw_velems->ve[i].ve1.dst_offset = i * 4;
@@ -248,7 +249,6 @@ static void brw_set_vertex_buffers(struct pipe_context *pipe,
const struct pipe_vertex_buffer *buffers)
{
struct brw_context *brw = brw_context(pipe);
- unsigned i;
/* Check for no change */
if (count == brw->curr.num_vertex_buffers &&
@@ -257,18 +257,9 @@ static void brw_set_vertex_buffers(struct pipe_context *pipe,
count * sizeof buffers[0]) == 0)
return;
- /* Adjust refcounts */
- for (i = 0; i < count; i++)
- pipe_resource_reference(&brw->curr.vertex_buffer[i].buffer,
- buffers[i].buffer);
-
- for ( ; i < brw->curr.num_vertex_buffers; i++)
- pipe_resource_reference(&brw->curr.vertex_buffer[i].buffer,
- NULL);
-
- /* Copy remaining data */
- memcpy(brw->curr.vertex_buffer, buffers, count * sizeof buffers[0]);
- brw->curr.num_vertex_buffers = count;
+ util_copy_vertex_buffers(brw->curr.vertex_buffer,
+ &brw->curr.num_vertex_buffers,
+ buffers, count);
brw->state.dirty.mesa |= PIPE_NEW_VERTEX_BUFFER;
}
@@ -312,15 +303,20 @@ brw_pipe_vertex_init( struct brw_context *brw )
brw->base.create_vertex_elements_state = brw_create_vertex_elements_state;
brw->base.bind_vertex_elements_state = brw_bind_vertex_elements_state;
brw->base.delete_vertex_elements_state = brw_delete_vertex_elements_state;
+ brw->base.redefine_user_buffer = u_default_redefine_user_buffer;
}
void
brw_pipe_vertex_cleanup( struct brw_context *brw )
{
+ unsigned i;
/* Release bound pipe vertex_buffers
*/
+ for (i = 0; i < brw->curr.num_vertex_buffers; i++) {
+ pipe_resource_reference(&brw->curr.vertex_buffer[i].buffer, NULL);
+ }
/* Release some other stuff
*/
diff --git a/src/gallium/drivers/i965/brw_reg.h b/src/gallium/drivers/i965/brw_reg.h
index ba10f9d5df1..53c7c435713 100644
--- a/src/gallium/drivers/i965/brw_reg.h
+++ b/src/gallium/drivers/i965/brw_reg.h
@@ -93,18 +93,54 @@
#define PCI_CHIP_G45_G 0x2E22
#define PCI_CHIP_G41_G 0x2E32
#define PCI_CHIP_B43_G 0x2E42
+#define PCI_CHIP_B43_G1 0x2E92
#define PCI_CHIP_ILD_G 0x0042
#define PCI_CHIP_ILM_G 0x0046
-struct brw_chipset {
- unsigned pci_id:16;
- unsigned is_965:1;
- unsigned is_igdng:1;
- unsigned is_g4x:1;
- unsigned pad:13;
-};
-
+#define PCI_CHIP_SANDYBRIDGE_GT1 0x0102 /* Desktop */
+#define PCI_CHIP_SANDYBRIDGE_GT2 0x0112
+#define PCI_CHIP_SANDYBRIDGE_GT2_PLUS 0x0122
+#define PCI_CHIP_SANDYBRIDGE_M_GT1 0x0106 /* Mobile */
+#define PCI_CHIP_SANDYBRIDGE_M_GT2 0x0116
+#define PCI_CHIP_SANDYBRIDGE_M_GT2_PLUS 0x0126
+#define PCI_CHIP_SANDYBRIDGE_S 0x010A /* Server */
+
+#define IS_G45(devid) (devid == PCI_CHIP_IGD_E_G || \
+ devid == PCI_CHIP_Q45_G || \
+ devid == PCI_CHIP_G45_G || \
+ devid == PCI_CHIP_G41_G || \
+ devid == PCI_CHIP_B43_G || \
+ devid == PCI_CHIP_B43_G1)
+#define IS_GM45(devid) (devid == PCI_CHIP_GM45_GM)
+#define IS_G4X(devid) (IS_G45(devid) || IS_GM45(devid))
+
+#define IS_GEN4(devid) (devid == PCI_CHIP_I965_G || \
+ devid == PCI_CHIP_I965_Q || \
+ devid == PCI_CHIP_I965_G_1 || \
+ devid == PCI_CHIP_I965_GM || \
+ devid == PCI_CHIP_I965_GME || \
+ devid == PCI_CHIP_I946_GZ || \
+ IS_G4X(devid))
+
+#define IS_ILD(devid) (devid == PCI_CHIP_ILD_G)
+#define IS_ILM(devid) (devid == PCI_CHIP_ILM_G)
+#define IS_GEN5(devid) (IS_ILD(devid) || IS_ILM(devid))
+
+#define IS_IRONLAKE(devid) IS_GEN5(devid)
+
+#define IS_GEN6(devid) (devid == PCI_CHIP_SANDYBRIDGE_GT1 || \
+ devid == PCI_CHIP_SANDYBRIDGE_GT2 || \
+ devid == PCI_CHIP_SANDYBRIDGE_GT2_PLUS || \
+ devid == PCI_CHIP_SANDYBRIDGE_M_GT1 || \
+ devid == PCI_CHIP_SANDYBRIDGE_M_GT2 || \
+ devid == PCI_CHIP_SANDYBRIDGE_M_GT2_PLUS || \
+ devid == PCI_CHIP_SANDYBRIDGE_S)
+
+#define IS_965(devid) (IS_GEN4(devid) || \
+ IS_G4X(devid) || \
+ IS_GEN5(devid) || \
+ IS_GEN6(devid))
/* XXX: hacks
*/
diff --git a/src/gallium/drivers/i965/brw_resource_buffer.c b/src/gallium/drivers/i965/brw_resource_buffer.c
index afb96ee3e7f..32dc54f2b26 100644
--- a/src/gallium/drivers/i965/brw_resource_buffer.c
+++ b/src/gallium/drivers/i965/brw_resource_buffer.c
@@ -91,30 +91,10 @@ brw_buffer_transfer_unmap( struct pipe_context *pipe,
}
-static unsigned brw_buffer_is_referenced( struct pipe_context *pipe,
- struct pipe_resource *resource,
- unsigned level,
- int layer)
-{
- struct brw_context *brw = brw_context(pipe);
- struct brw_winsys_buffer *batch_bo = brw->batch->buf;
- struct brw_buffer *buf = brw_buffer(resource);
-
- if (buf->bo == NULL)
- return PIPE_UNREFERENCED;
-
- if (!brw_screen(pipe->screen)->sws->bo_references( batch_bo, buf->bo ))
- return PIPE_UNREFERENCED;
-
- return PIPE_REFERENCED_FOR_READ | PIPE_REFERENCED_FOR_WRITE;
-}
-
-
struct u_resource_vtbl brw_buffer_vtbl =
{
brw_buffer_get_handle, /* get_handle */
brw_buffer_destroy, /* resource_destroy */
- brw_buffer_is_referenced, /* is_resource_referenced */
u_default_get_transfer, /* get_transfer */
u_default_transfer_destroy, /* transfer_destroy */
brw_buffer_transfer_map, /* transfer_map */
diff --git a/src/gallium/drivers/i965/brw_resource_texture.c b/src/gallium/drivers/i965/brw_resource_texture.c
index fded2da3820..71a18290248 100644
--- a/src/gallium/drivers/i965/brw_resource_texture.c
+++ b/src/gallium/drivers/i965/brw_resource_texture.c
@@ -225,48 +225,6 @@ static void brw_texture_destroy(struct pipe_screen *screen,
}
-
-
-static unsigned brw_texture_is_referenced( struct pipe_context *pipe,
- struct pipe_resource *texture,
- unsigned level,
- int layer )
-{
- struct brw_context *brw = brw_context(pipe);
- struct brw_screen *bscreen = brw_screen(pipe->screen);
- struct brw_winsys_buffer *batch_bo = brw->batch->buf;
- struct brw_texture *tex = brw_texture(texture);
- struct brw_surface *surf;
- int i;
-
- /* XXX: this is subject to false positives if the underlying
- * texture BO is referenced, we can't tell whether the sub-region
- * we care about participates in that.
- */
- if (bscreen->sws->bo_references( batch_bo, tex->bo ))
- return PIPE_REFERENCED_FOR_READ | PIPE_REFERENCED_FOR_WRITE;
-
- /* Find any view on this texture for this level/layer and see if it
- * is referenced:
- */
- for (i = 0; i < 2; i++) {
- foreach (surf, &tex->views[i]) {
- if (surf->bo == tex->bo)
- continue;
-
- if (!(layer == -1 || surf->id.bits.layer == layer) ||
- surf->id.bits.level != level)
- continue;
-
- if (bscreen->sws->bo_references( batch_bo, surf->bo))
- return PIPE_REFERENCED_FOR_READ | PIPE_REFERENCED_FOR_WRITE;
- }
- }
-
- return PIPE_UNREFERENCED;
-}
-
-
/*
* Transfer functions
*/
@@ -347,7 +305,6 @@ struct u_resource_vtbl brw_texture_vtbl =
{
brw_texture_get_handle, /* get_handle */
brw_texture_destroy, /* resource_destroy */
- brw_texture_is_referenced, /* is_resource_referenced */
brw_texture_get_transfer, /* get_transfer */
u_default_transfer_destroy, /* transfer_destroy */
brw_texture_transfer_map, /* transfer_map */
@@ -392,7 +349,7 @@ brw_texture_create( struct pipe_screen *screen,
if (tex->compressed == 0 &&
!bscreen->no_tiling)
{
- if (bscreen->chipset.is_965 &&
+ if (bscreen->gen < 5 &&
util_format_is_depth_or_stencil(template->format))
tex->tiling = BRW_TILING_Y;
else
diff --git a/src/gallium/drivers/i965/brw_resource_texture_layout.c b/src/gallium/drivers/i965/brw_resource_texture_layout.c
index 2187bdd82ce..afecc77e312 100644
--- a/src/gallium/drivers/i965/brw_resource_texture_layout.c
+++ b/src/gallium/drivers/i965/brw_resource_texture_layout.c
@@ -388,7 +388,7 @@ GLboolean brw_texture_layout(struct brw_screen *brw_screen,
{
switch (tex->b.b.target) {
case PIPE_TEXTURE_CUBE:
- if (brw_screen->chipset.is_igdng)
+ if (brw_screen->gen == 5)
brw_layout_cubemap_idgng( tex );
else
brw_layout_3d_cube( tex );
diff --git a/src/gallium/drivers/i965/brw_screen.c b/src/gallium/drivers/i965/brw_screen.c
index f5b75b17e36..25204fd088d 100644
--- a/src/gallium/drivers/i965/brw_screen.c
+++ b/src/gallium/drivers/i965/brw_screen.c
@@ -97,7 +97,7 @@ brw_get_name(struct pipe_screen *screen)
static char buffer[128];
const char *chipset;
- switch (brw_screen(screen)->chipset.pci_id) {
+ switch (brw_screen(screen)->pci_id) {
case PCI_CHIP_I965_G:
chipset = "I965_G";
break;
@@ -278,8 +278,7 @@ brw_is_format_supported(struct pipe_screen *screen,
enum pipe_format format,
enum pipe_texture_target target,
unsigned sample_count,
- unsigned tex_usage,
- unsigned geom_flags)
+ unsigned tex_usage)
{
static const enum pipe_format tex_supported[] = {
PIPE_FORMAT_L8_UNORM,
@@ -365,20 +364,19 @@ brw_fence_reference(struct pipe_screen *screen,
{
}
-static int
+static boolean
brw_fence_signalled(struct pipe_screen *screen,
- struct pipe_fence_handle *fence,
- unsigned flags)
+ struct pipe_fence_handle *fence)
{
- return 0; /* XXX shouldn't this be a boolean? */
+ return TRUE;
}
-static int
+static boolean
brw_fence_finish(struct pipe_screen *screen,
struct pipe_fence_handle *fence,
- unsigned flags)
+ uint64_t timeout)
{
- return 0;
+ return TRUE;
}
@@ -405,8 +403,6 @@ struct pipe_screen *
brw_screen_create(struct brw_winsys_screen *sws)
{
struct brw_screen *bscreen;
- struct brw_chipset chipset;
-
#ifdef DEBUG
BRW_DEBUG = debug_get_flags_option("BRW_DEBUG", debug_names, 0);
BRW_DEBUG |= debug_get_flags_option("INTEL_DEBUG", debug_names, 0);
@@ -415,46 +411,30 @@ brw_screen_create(struct brw_winsys_screen *sws)
BRW_DUMP = debug_get_flags_option("BRW_DUMP", dump_names, 0);
#endif
- memset(&chipset, 0, sizeof chipset);
-
- chipset.pci_id = sws->pci_id;
-
- switch (chipset.pci_id) {
- case PCI_CHIP_I965_G:
- case PCI_CHIP_I965_Q:
- case PCI_CHIP_I965_G_1:
- case PCI_CHIP_I946_GZ:
- case PCI_CHIP_I965_GM:
- case PCI_CHIP_I965_GME:
- chipset.is_965 = TRUE;
- break;
-
- case PCI_CHIP_GM45_GM:
- case PCI_CHIP_IGD_E_G:
- case PCI_CHIP_Q45_G:
- case PCI_CHIP_G45_G:
- case PCI_CHIP_G41_G:
- case PCI_CHIP_B43_G:
- chipset.is_g4x = TRUE;
- break;
-
- case PCI_CHIP_ILD_G:
- case PCI_CHIP_ILM_G:
- chipset.is_igdng = TRUE;
- break;
+ bscreen = CALLOC_STRUCT(brw_screen);
+ if (!bscreen)
+ return NULL;
- default:
+ bscreen->pci_id = sws->pci_id;
+ if (IS_GEN6(sws->pci_id)) {
+ bscreen->gen = 6;
+ bscreen->needs_ff_sync = TRUE;
+ } else if (IS_GEN5(sws->pci_id)) {
+ bscreen->gen = 5;
+ bscreen->needs_ff_sync = TRUE;
+ } else if (IS_965(sws->pci_id)) {
+ bscreen->gen = 4;
+ if (IS_G4X(sws->pci_id)) {
+ bscreen->is_g4x = true;
+ }
+ } else {
debug_printf("%s: unknown pci id 0x%x, cannot create screen\n",
- __FUNCTION__, chipset.pci_id);
+ __FUNCTION__, sws->pci_id);
+ free(bscreen);
return NULL;
}
-
- bscreen = CALLOC_STRUCT(brw_screen);
- if (!bscreen)
- return NULL;
-
- bscreen->chipset = chipset;
+ sws->gen = bscreen->gen;
bscreen->sws = sws;
bscreen->base.winsys = NULL;
bscreen->base.destroy = brw_destroy_screen;
diff --git a/src/gallium/drivers/i965/brw_screen.h b/src/gallium/drivers/i965/brw_screen.h
index 58e293bc76f..a62e1afc405 100644
--- a/src/gallium/drivers/i965/brw_screen.h
+++ b/src/gallium/drivers/i965/brw_screen.h
@@ -43,7 +43,11 @@ struct brw_winsys_screen;
struct brw_screen
{
struct pipe_screen base;
- struct brw_chipset chipset;
+ int gen;
+ boolean has_negative_rhw_bug;
+ boolean needs_ff_sync;
+ boolean is_g4x;
+ int pci_id;
struct brw_winsys_screen *sws;
boolean no_tiling;
};
diff --git a/src/gallium/drivers/i965/brw_sf_emit.c b/src/gallium/drivers/i965/brw_sf_emit.c
index 497634ec9ed..901c3341642 100644
--- a/src/gallium/drivers/i965/brw_sf_emit.c
+++ b/src/gallium/drivers/i965/brw_sf_emit.c
@@ -161,7 +161,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 (p->brw->gen == 5)
jmpi = 2;
brw_push_insn_state(p);
@@ -205,7 +205,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 (p->brw->gen == 5)
jmpi = 2;
brw_push_insn_state(p);
diff --git a/src/gallium/drivers/i965/brw_sf_state.c b/src/gallium/drivers/i965/brw_sf_state.c
index 6c299a86b49..eec024650ce 100644
--- a/src/gallium/drivers/i965/brw_sf_state.c
+++ b/src/gallium/drivers/i965/brw_sf_state.c
@@ -148,7 +148,7 @@ sf_unit_create_from_key(struct brw_context *brw,
sf.thread3.dispatch_grf_start_reg = 3;
- if (BRW_IS_IGDNG(brw))
+ if (brw->gen == 5)
sf.thread3.urb_entry_read_offset = 3;
else
sf.thread3.urb_entry_read_offset = 1;
@@ -161,7 +161,7 @@ sf_unit_create_from_key(struct brw_context *brw,
/* Each SF thread produces 1 PUE, and there can be up to 24(Pre-IGDNG) or
* 48(IGDNG) threads
*/
- if (BRW_IS_IGDNG(brw))
+ if (brw->gen == 5)
chipset_max_threads = 48;
else
chipset_max_threads = 24;
diff --git a/src/gallium/drivers/i965/brw_state.h b/src/gallium/drivers/i965/brw_state.h
index d2bbd0123d1..380d511f9bb 100644
--- a/src/gallium/drivers/i965/brw_state.h
+++ b/src/gallium/drivers/i965/brw_state.h
@@ -56,7 +56,7 @@ const struct brw_tracked_state brw_clip_prog;
const struct brw_tracked_state brw_clip_unit;
const struct brw_tracked_state brw_curbe_buffer;
const struct brw_tracked_state brw_curbe_offsets;
-const struct brw_tracked_state brw_invarient_state;
+const struct brw_tracked_state brw_invariant_state;
const struct brw_tracked_state brw_gs_prog;
const struct brw_tracked_state brw_gs_unit;
const struct brw_tracked_state brw_line_stipple;
diff --git a/src/gallium/drivers/i965/brw_state_upload.c b/src/gallium/drivers/i965/brw_state_upload.c
index f8b91eff816..cdbf270e06a 100644
--- a/src/gallium/drivers/i965/brw_state_upload.c
+++ b/src/gallium/drivers/i965/brw_state_upload.c
@@ -69,7 +69,7 @@ const struct brw_tracked_state *atoms[] =
/* Command packets:
*/
- &brw_invarient_state,
+ &brw_invariant_state,
&brw_state_base_address,
&brw_binding_table_pointers,
diff --git a/src/gallium/drivers/i965/brw_structs.h b/src/gallium/drivers/i965/brw_structs.h
index e97ddeb5e1c..b0d75b4f828 100644
--- a/src/gallium/drivers/i965/brw_structs.h
+++ b/src/gallium/drivers/i965/brw_structs.h
@@ -279,7 +279,7 @@ struct brw_aa_line_parameters
struct header header;
struct {
- GLuint aa_coverage_scope:8;
+ GLuint aa_coverage_slope:8;
GLuint pad0:8;
GLuint aa_coverage_bias:8;
GLuint pad1:8;
@@ -659,7 +659,105 @@ struct brw_clip_unit_state
GLfloat viewport_ymax;
};
+struct gen6_blend_state
+{
+ struct {
+ GLuint dest_blend_factor:5;
+ GLuint source_blend_factor:5;
+ GLuint pad3:1;
+ GLuint blend_func:3;
+ GLuint pad2:1;
+ GLuint ia_dest_blend_factor:5;
+ GLuint ia_source_blend_factor:5;
+ GLuint pad1:1;
+ GLuint ia_blend_func:3;
+ GLuint pad0:1;
+ GLuint ia_blend_enable:1;
+ GLuint blend_enable:1;
+ } blend0;
+
+ struct {
+ GLuint post_blend_clamp_enable:1;
+ GLuint pre_blend_clamp_enable:1;
+ GLuint clamp_range:2;
+ GLuint pad0:4;
+ GLuint x_dither_offset:2;
+ GLuint y_dither_offset:2;
+ GLuint dither_enable:1;
+ GLuint alpha_test_func:3;
+ GLuint alpha_test_enable:1;
+ GLuint pad1:1;
+ GLuint logic_op_func:4;
+ GLuint logic_op_enable:1;
+ GLuint pad2:1;
+ GLuint write_disable_b:1;
+ GLuint write_disable_g:1;
+ GLuint write_disable_r:1;
+ GLuint write_disable_a:1;
+ GLuint pad3:1;
+ GLuint alpha_to_coverage_dither:1;
+ GLuint alpha_to_one:1;
+ GLuint alpha_to_coverage:1;
+ } blend1;
+};
+struct gen6_color_calc_state
+{
+ struct {
+ GLuint alpha_test_format:1;
+ GLuint pad0:14;
+ GLuint round_disable:1;
+ GLuint bf_stencil_ref:8;
+ GLuint stencil_ref:8;
+ } cc0;
+
+ union {
+ GLfloat alpha_ref_f;
+ struct {
+ GLuint ui:8;
+ GLuint pad0:24;
+ } alpha_ref_fi;
+ } cc1;
+
+ GLfloat constant_r;
+ GLfloat constant_g;
+ GLfloat constant_b;
+ GLfloat constant_a;
+};
+
+struct gen6_depth_stencil_state
+{
+ struct {
+ GLuint pad0:3;
+ GLuint bf_stencil_pass_depth_pass_op:3;
+ GLuint bf_stencil_pass_depth_fail_op:3;
+ GLuint bf_stencil_fail_op:3;
+ GLuint bf_stencil_func:3;
+ GLuint bf_stencil_enable:1;
+ GLuint pad1:2;
+ GLuint stencil_write_enable:1;
+ GLuint stencil_pass_depth_pass_op:3;
+ GLuint stencil_pass_depth_fail_op:3;
+ GLuint stencil_fail_op:3;
+ GLuint stencil_func:3;
+ GLuint stencil_enable:1;
+ } ds0;
+
+ struct {
+ GLuint bf_stencil_write_mask:8;
+ GLuint bf_stencil_test_mask:8;
+ GLuint stencil_write_mask:8;
+ GLuint stencil_test_mask:8;
+ } ds1;
+
+ struct {
+ GLuint pad0:26;
+ GLuint depth_write_enable:1;
+ GLuint depth_test_func:3;
+ GLuint pad1:1;
+ GLuint depth_test_enable:1;
+ } ds2;
+};
struct brw_cc_unit_state
{
@@ -814,6 +912,13 @@ struct brw_sf_unit_state
};
+struct gen6_scissor_rect
+{
+ GLuint xmin:16;
+ GLuint ymin:16;
+ GLuint xmax:16;
+ GLuint ymax:16;
+};
struct brw_gs_unit_state
{
@@ -825,7 +930,7 @@ struct brw_gs_unit_state
struct
{
GLuint pad0:8;
- GLuint rendering_enable:1; /* for IGDNG */
+ GLuint rendering_enable:1; /* for Ironlake */
GLuint pad4:1;
GLuint stats_enable:1;
GLuint nr_urb_entries:7;
@@ -935,7 +1040,7 @@ struct brw_wm_unit_state
GLfloat global_depth_offset_constant;
GLfloat global_depth_offset_scale;
- /* for IGDNG only */
+ /* for Ironlake only */
struct {
GLuint pad0:1;
GLuint grf_reg_count_1:3;
@@ -962,6 +1067,15 @@ struct brw_sampler_default_color {
GLfloat color[4];
};
+struct gen5_sampler_default_color {
+ uint8_t ub[4];
+ float f[4];
+ uint16_t hf[4];
+ uint16_t us[4];
+ int16_t s[4];
+ uint8_t b[4];
+};
+
struct brw_sampler_state
{
@@ -973,7 +1087,7 @@ struct brw_sampler_state
GLuint mag_filter:3;
GLuint mip_filter:2;
GLuint base_level:5;
- GLuint pad:1;
+ GLuint min_mag_neq:1;
GLuint lod_preclamp:1;
GLuint default_color_mode:1;
GLuint pad0:1;
@@ -985,7 +1099,8 @@ struct brw_sampler_state
GLuint r_wrap_mode:3;
GLuint t_wrap_mode:3;
GLuint s_wrap_mode:3;
- GLuint pad:3;
+ GLuint cube_control_mode:1;
+ GLuint pad:2;
GLuint max_lod:10;
GLuint min_lod:10;
} ss1;
@@ -999,7 +1114,9 @@ struct brw_sampler_state
struct brw_ss3
{
- GLuint pad:19;
+ GLuint non_normalized_coord:1;
+ GLuint pad:12;
+ GLuint address_round:6;
GLuint max_aniso:3;
GLuint chroma_key_mode:1;
GLuint chroma_key_index:2;
@@ -1044,6 +1161,15 @@ struct brw_sf_viewport
} scissor;
};
+struct gen6_sf_viewport {
+ GLfloat m00;
+ GLfloat m11;
+ GLfloat m22;
+ GLfloat m30;
+ GLfloat m31;
+ GLfloat m32;
+};
+
/* Documented in the subsystem/shared-functions/sampler chapter...
*/
struct brw_surface_state
@@ -1055,7 +1181,12 @@ struct brw_surface_state
GLuint cube_neg_y:1;
GLuint cube_pos_x:1;
GLuint cube_neg_x:1;
- GLuint pad:4;
+ GLuint pad:2;
+ /* Required on gen6 for surfaces accessed through render cache messages.
+ */
+ GLuint render_cache_read_write:1;
+ /* Ironlake and newer: instead of replicating one of the texels */
+ GLuint cube_corner_average:1;
GLuint mipmap_layout_mode:1;
GLuint vert_line_stride_ofs:1;
GLuint vert_line_stride:1;
@@ -1202,7 +1333,8 @@ struct brw_instruction
GLuint predicate_inverse:1;
GLuint execution_size:3;
GLuint destreg__conditionalmod:4; /* destreg - send, conditionalmod - others */
- GLuint pad0:2;
+ GLuint acc_wr_control:1;
+ GLuint cmpt_control:1;
GLuint debug_control:1;
GLuint saturate:1;
} header;
@@ -1250,7 +1382,7 @@ struct brw_instruction
GLuint dest_writemask:4;
GLuint dest_subreg_nr:1;
GLuint dest_reg_nr:8;
- GLuint pad1:2;
+ GLuint dest_horiz_stride:2;
GLuint dest_address_mode:1;
} da16;
@@ -1264,9 +1396,21 @@ struct brw_instruction
GLuint dest_writemask:4;
GLint dest_indirect_offset:6;
GLuint dest_subreg_nr:3;
- GLuint pad1:2;
+ GLuint dest_horiz_stride:2;
GLuint dest_address_mode:1;
} ia16;
+
+ struct {
+ GLuint dest_reg_file:2;
+ GLuint dest_reg_type:3;
+ GLuint src0_reg_file:2;
+ GLuint src0_reg_type:3;
+ GLuint src1_reg_file:2;
+ GLuint src1_reg_type:3;
+ GLuint pad:1;
+
+ GLint jump_count:16;
+ } branch_gen6;
} bits1;
@@ -1339,7 +1483,7 @@ struct brw_instruction
GLuint end_of_thread:1;
GLuint pad1:1;
GLuint sfid:4;
- } send_igdng; /* for IGDNG only */
+ } send_gen5; /* for Ironlake only */
} bits2;
@@ -1413,6 +1557,21 @@ struct brw_instruction
GLuint pad0:12;
} if_else;
+ struct
+ {
+ /* Signed jump distance to the ip to jump to if all channels
+ * are disabled after the break or continue. It should point
+ * to the end of the innermost control flow block, as that's
+ * where some channel could get re-enabled.
+ */
+ int jip:16;
+
+ /* Signed jump distance to the location to resume execution
+ * of this channel if it's enabled for the break or continue.
+ */
+ int uip:16;
+ } break_cont;
+
struct {
GLuint function:4;
GLuint int_type:1;
@@ -1440,7 +1599,7 @@ struct brw_instruction
GLuint msg_length:4;
GLuint pad1:2;
GLuint end_of_thread:1;
- } math_igdng;
+ } math_gen5;
struct {
GLuint binding_table_index:8;
@@ -1476,7 +1635,7 @@ struct brw_instruction
GLuint msg_length:4;
GLuint pad1:2;
GLuint end_of_thread:1;
- } sampler_igdng;
+ } sampler_gen5;
struct brw_urb_immediate urb;
@@ -1494,7 +1653,7 @@ struct brw_instruction
GLuint msg_length:4;
GLuint pad1:2;
GLuint end_of_thread:1;
- } urb_igdng;
+ } urb_gen5;
struct {
GLuint binding_table_index:8;
@@ -1510,6 +1669,18 @@ struct brw_instruction
struct {
GLuint binding_table_index:8;
+ GLuint msg_control:3;
+ GLuint msg_type:3;
+ GLuint target_cache:2;
+ GLuint response_length:4;
+ GLuint msg_length:4;
+ GLuint msg_target:4;
+ GLuint pad1:3;
+ GLuint end_of_thread:1;
+ } dp_read_g4x;
+
+ struct {
+ GLuint binding_table_index:8;
GLuint msg_control:3;
GLuint msg_type:3;
GLuint target_cache:2;
@@ -1519,7 +1690,7 @@ struct brw_instruction
GLuint msg_length:4;
GLuint pad1:2;
GLuint end_of_thread:1;
- } dp_read_igdng;
+ } dp_read_gen5;
struct {
GLuint binding_table_index:8;
@@ -1546,10 +1717,38 @@ struct brw_instruction
GLuint msg_length:4;
GLuint pad1:2;
GLuint end_of_thread:1;
- } dp_write_igdng;
+ } dp_write_gen5;
+
+ /* Sandybridge DP for sample cache, constant cache, render cache */
+ struct {
+ GLuint binding_table_index:8;
+ GLuint msg_control:5;
+ GLuint msg_type:3;
+ GLuint pad0:3;
+ GLuint header_present:1;
+ GLuint response_length:5;
+ GLuint msg_length:4;
+ GLuint pad1:2;
+ GLuint end_of_thread:1;
+ } dp_sampler_const_cache;
+
+ struct {
+ GLuint binding_table_index:8;
+ GLuint msg_control:3;
+ GLuint slot_group_select:1;
+ GLuint pixel_scoreboard_clear:1;
+ GLuint msg_type:4;
+ GLuint send_commit_msg:1;
+ GLuint pad0:1;
+ GLuint header_present:1;
+ GLuint response_length:5;
+ GLuint msg_length:4;
+ GLuint pad1:2;
+ GLuint end_of_thread:1;
+ } dp_render_cache;
struct {
- GLuint pad:16;
+ GLuint function_control:16;
GLuint response_length:4;
GLuint msg_length:4;
GLuint msg_target:4;
@@ -1557,14 +1756,15 @@ struct brw_instruction
GLuint end_of_thread:1;
} generic;
+ /* Of this struct, only end_of_thread is not present for gen6. */
struct {
- GLuint pad:19;
+ GLuint function_control:19;
GLuint header_present:1;
GLuint response_length:5;
GLuint msg_length:4;
GLuint pad1:2;
GLuint end_of_thread:1;
- } generic_igdng;
+ } generic_gen5;
GLint d;
GLuint ud;
diff --git a/src/gallium/drivers/i965/brw_structs_dump.c b/src/gallium/drivers/i965/brw_structs_dump.c
index cd40fc6d618..f3de2f995b3 100644
--- a/src/gallium/drivers/i965/brw_structs_dump.c
+++ b/src/gallium/drivers/i965/brw_structs_dump.c
@@ -72,7 +72,7 @@ brw_dump_aa_line_parameters(const struct brw_aa_line_parameters *ptr)
{
debug_printf("\t\t.header.length = 0x%x\n", (*ptr).header.length);
debug_printf("\t\t.header.opcode = 0x%x\n", (*ptr).header.opcode);
- debug_printf("\t\t.bits0.aa_coverage_scope = 0x%x\n", (*ptr).bits0.aa_coverage_scope);
+ debug_printf("\t\t.bits0.aa_coverage_scope = 0x%x\n", (*ptr).bits0.aa_coverage_slope);
debug_printf("\t\t.bits0.aa_coverage_bias = 0x%x\n", (*ptr).bits0.aa_coverage_bias);
debug_printf("\t\t.bits1.aa_coverage_endcap_slope = 0x%x\n", (*ptr).bits1.aa_coverage_endcap_slope);
debug_printf("\t\t.bits1.aa_coverage_endcap_bias = 0x%x\n", (*ptr).bits1.aa_coverage_endcap_bias);
diff --git a/src/gallium/drivers/i965/brw_urb.c b/src/gallium/drivers/i965/brw_urb.c
index 907ec56c6ca..b630752809e 100644
--- a/src/gallium/drivers/i965/brw_urb.c
+++ b/src/gallium/drivers/i965/brw_urb.c
@@ -147,7 +147,7 @@ static int recalculate_urb_fence( struct brw_context *brw )
brw->urb.constrained = 0;
- if (BRW_IS_IGDNG(brw)) {
+ if (brw->gen == 5) {
brw->urb.nr_vs_entries = 128;
brw->urb.nr_sf_entries = 48;
if (check_urb_layout(brw)) {
@@ -157,7 +157,7 @@ static int 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 (brw->is_g4x) {
brw->urb.nr_vs_entries = 64;
if (check_urb_layout(brw)) {
goto done;
diff --git a/src/gallium/drivers/i965/brw_vs.h b/src/gallium/drivers/i965/brw_vs.h
index 944d88c84cc..b6d1091618e 100644
--- a/src/gallium/drivers/i965/brw_vs.h
+++ b/src/gallium/drivers/i965/brw_vs.h
@@ -56,7 +56,6 @@ struct brw_vs_compile {
struct brw_compile func;
struct brw_vs_prog_key key;
struct brw_vs_prog_data prog_data;
- struct brw_chipset chipset;
struct brw_vertex_shader *vp;
diff --git a/src/gallium/drivers/i965/brw_vs_emit.c b/src/gallium/drivers/i965/brw_vs_emit.c
index 5dcbd597ddc..559f0c61d8d 100644
--- a/src/gallium/drivers/i965/brw_vs_emit.c
+++ b/src/gallium/drivers/i965/brw_vs_emit.c
@@ -116,6 +116,7 @@ static boolean find_output_slot( struct brw_vs_compile *c,
*/
static void brw_vs_alloc_regs( struct brw_vs_compile *c )
{
+ struct brw_context *brw = c->func.brw;
GLuint i, reg = 0, subreg = 0, mrf;
int attributes_in_vue;
@@ -218,7 +219,7 @@ static void brw_vs_alloc_regs( struct brw_vs_compile *c )
*/
c->nr_outputs = c->prog_data.nr_outputs;
- if (c->chipset.is_igdng)
+ if (brw->gen == 5)
mrf = 8;
else
mrf = 4;
@@ -333,7 +334,7 @@ static void brw_vs_alloc_regs( struct brw_vs_compile *c )
*/
attributes_in_vue = MAX2(c->nr_outputs, c->nr_inputs);
- if (c->chipset.is_igdng)
+ if (brw->gen == 5)
c->prog_data.urb_entry_size = (attributes_in_vue + 6 + 3) / 4;
else
c->prog_data.urb_entry_size = (attributes_in_vue + 2 + 3) / 4;
@@ -1124,6 +1125,7 @@ static struct brw_reg get_dst( 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 brw_reg m0 = brw_message_reg(0);
struct brw_reg pos = c->regs[TGSI_FILE_OUTPUT][VERT_RESULT_HPOS];
struct brw_reg ndc;
@@ -1143,7 +1145,7 @@ static void emit_vertex_write( struct brw_vs_compile *c)
*/
if (c->prog_data.writes_psiz ||
c->key.nr_userclip ||
- c->chipset.is_965)
+ brw->has_negative_rhw_bug)
{
struct brw_reg header1 = retype(get_tmp(c), BRW_REGISTER_TYPE_UD);
GLuint i;
@@ -1174,7 +1176,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 (c->chipset.is_965) {
+ if (brw->has_negative_rhw_bug) {
brw_CMP(p,
vec8(brw_null_reg()),
BRW_CONDITIONAL_L,
@@ -1202,7 +1204,7 @@ 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 (c->chipset.is_igdng) {
+ if (brw->gen == 5) {
/* There are 20 DWs (D0-D19) in VUE vertex header on IGDNG */
brw_MOV(p, offset(m0, 3), pos); /* a portion of vertex header */
/* m4, m5 contain the distances from vertex to the user clip planeXXX.
@@ -1339,6 +1341,7 @@ static void emit_insn(struct brw_vs_compile *c,
unsigned opcode = inst->Instruction.Opcode;
unsigned label = inst->Label.Label;
struct brw_compile *p = &c->func;
+ struct brw_context *brw = p->brw;
struct brw_reg args[3], dst;
GLuint i;
@@ -1514,7 +1517,7 @@ static void emit_insn(struct brw_vs_compile *c,
c->loop_depth--;
- if (c->chipset.is_igdng)
+ if (brw->gen == 5)
br = 2;
inst0 = inst1 = brw_WHILE(p, c->loop_inst[c->loop_depth]);
@@ -1652,6 +1655,6 @@ void brw_vs_emit(struct brw_vs_compile *c)
if (BRW_DEBUG & DEBUG_VS) {
debug_printf("vs-native:\n");
- brw_disasm(stderr, p->store, p->nr_insn);
+ brw_disasm(stderr, p->store, p->nr_insn, p->brw->gen);
}
}
diff --git a/src/gallium/drivers/i965/brw_vs_state.c b/src/gallium/drivers/i965/brw_vs_state.c
index dadbb622e4d..6d2ccfd6d98 100644
--- a/src/gallium/drivers/i965/brw_vs_state.c
+++ b/src/gallium/drivers/i965/brw_vs_state.c
@@ -100,7 +100,7 @@ vs_unit_create_from_key(struct brw_context *brw,
*/
vs.thread1.single_program_flow = 0;
- if (BRW_IS_IGDNG(brw))
+ if (brw->gen == 5)
vs.thread1.binding_table_entry_count = 0; /* hardware requirement */
else
vs.thread1.binding_table_entry_count = key->nr_surfaces;
@@ -111,16 +111,16 @@ vs_unit_create_from_key(struct brw_context *brw,
vs.thread3.urb_entry_read_offset = 0;
vs.thread3.const_urb_entry_read_offset = key->curbe_offset * 2;
- if (BRW_IS_IGDNG(brw))
+ if (brw->gen == 5)
vs.thread4.nr_urb_entries = key->nr_urb_entries >> 2;
else
vs.thread4.nr_urb_entries = key->nr_urb_entries;
vs.thread4.urb_entry_allocation_size = key->urb_size - 1;
- if (BRW_IS_IGDNG(brw))
+ if (brw->gen == 5)
chipset_max_threads = 72;
- else if (BRW_IS_G4X(brw))
+ else if (brw->is_g4x)
chipset_max_threads = 32;
else
chipset_max_threads = 16;
diff --git a/src/gallium/drivers/i965/brw_winsys.h b/src/gallium/drivers/i965/brw_winsys.h
index a06f8bb7d61..038f6f788a0 100644
--- a/src/gallium/drivers/i965/brw_winsys.h
+++ b/src/gallium/drivers/i965/brw_winsys.h
@@ -148,7 +148,7 @@ static INLINE void make_reloc(struct brw_winsys_reloc *reloc,
struct brw_winsys_screen {
unsigned pci_id;
-
+ int gen;
/**
* Buffer functions.
*/
@@ -282,7 +282,7 @@ void brw_dump_data( unsigned pci_id,
enum brw_buffer_data_type data_type,
unsigned offset,
const void *data,
- size_t size );
+ size_t size, int gen );
#endif
diff --git a/src/gallium/drivers/i965/brw_winsys_debug.c b/src/gallium/drivers/i965/brw_winsys_debug.c
index f8f6a539bc9..b66b1cfccb6 100644
--- a/src/gallium/drivers/i965/brw_winsys_debug.c
+++ b/src/gallium/drivers/i965/brw_winsys_debug.c
@@ -9,7 +9,7 @@ void brw_dump_data( unsigned pci_id,
enum brw_buffer_data_type data_type,
unsigned offset,
const void *data,
- size_t size )
+ size_t size, int gen )
{
if (BRW_DUMP & DUMP_ASM) {
switch (data_type) {
@@ -18,7 +18,7 @@ void brw_dump_data( unsigned pci_id,
case BRW_DATA_GS_VS_PROG:
case BRW_DATA_GS_GS_PROG:
case BRW_DATA_GS_CLIP_PROG:
- brw_disasm( stderr, data, size / sizeof(struct brw_instruction) );
+ brw_disasm( stderr, (struct brw_instruction *)data, size / sizeof(struct brw_instruction), gen );
break;
default:
break;
@@ -77,7 +77,7 @@ void brw_dump_data( unsigned pci_id,
if (BRW_DUMP & DUMP_BATCH) {
switch (data_type) {
case BRW_DATA_BATCH_BUFFER:
- intel_decode(data, size / 4, offset, pci_id);
+ intel_decode(data, size / 4, offset, pci_id, 0);
break;
default:
break;
diff --git a/src/gallium/drivers/i965/brw_wm_emit.c b/src/gallium/drivers/i965/brw_wm_emit.c
index 8f983a60ae8..6301062fd79 100644
--- a/src/gallium/drivers/i965/brw_wm_emit.c
+++ b/src/gallium/drivers/i965/brw_wm_emit.c
@@ -848,11 +848,11 @@ static void emit_tex( struct brw_wm_compile *c,
responseLength = 8; /* always */
- if (BRW_IS_IGDNG(p->brw)) {
+ if (p->brw->gen == 5) {
if (shadow)
- msg_type = BRW_SAMPLER_MESSAGE_SIMD16_SAMPLE_COMPARE_IGDNG;
+ msg_type = BRW_SAMPLER_MESSAGE_SAMPLE_COMPARE_GEN5;
else
- msg_type = BRW_SAMPLER_MESSAGE_SIMD16_SAMPLE_IGDNG;
+ msg_type = BRW_SAMPLER_MESSAGE_SAMPLE_GEN5;
} else {
if (shadow)
msg_type = BRW_SAMPLER_MESSAGE_SIMD16_SAMPLE_COMPARE;
@@ -917,8 +917,8 @@ static void emit_txb( struct brw_wm_compile *c,
brw_MOV(p, brw_message_reg(8), coord[3]);
msgLength = 9;
- if (BRW_IS_IGDNG(p->brw))
- msg_type = BRW_SAMPLER_MESSAGE_SIMD16_SAMPLE_BIAS_IGDNG;
+ if (p->brw->gen == 5)
+ msg_type = BRW_SAMPLER_MESSAGE_SAMPLE_BIAS_GEN5;
else
msg_type = BRW_SAMPLER_MESSAGE_SIMD16_SAMPLE_BIAS;
@@ -1516,6 +1516,6 @@ void brw_wm_emit( struct brw_wm_compile *c )
if (BRW_DEBUG & DEBUG_WM) {
debug_printf("wm-native:\n");
- brw_disasm(stderr, p->store, p->nr_insn);
+ brw_disasm(stderr, p->store, p->nr_insn, p->brw->gen);
}
}
diff --git a/src/gallium/drivers/i965/brw_wm_fp.c b/src/gallium/drivers/i965/brw_wm_fp.c
index f7ee55cc1c8..a65e16edec0 100644
--- a/src/gallium/drivers/i965/brw_wm_fp.c
+++ b/src/gallium/drivers/i965/brw_wm_fp.c
@@ -812,7 +812,7 @@ static void precalc_tex( struct brw_wm_compile *c,
}
/* XXX: add GL_EXT_texture_swizzle support to gallium -- by
- * generating shader varients in mesa state tracker.
+ * generating shader variants in mesa state tracker.
*/
/* Release this temp if we ended up allocating it:
diff --git a/src/gallium/drivers/i965/brw_wm_glsl.c b/src/gallium/drivers/i965/brw_wm_glsl.c
index 3b3afc39d3c..fb8e40d928e 100644
--- a/src/gallium/drivers/i965/brw_wm_glsl.c
+++ b/src/gallium/drivers/i965/brw_wm_glsl.c
@@ -1607,7 +1607,7 @@ static void emit_txb(struct brw_wm_compile *c,
brw_MOV(p, brw_message_reg(5), src[3]); /* bias */
brw_MOV(p, brw_message_reg(6), brw_imm_f(0)); /* ref (unused?) */
- if (BRW_IS_IGDNG(p->brw)) {
+ if (p->brw->gen == 5) {
msg_type = BRW_SAMPLER_MESSAGE_SIMD8_SAMPLE_BIAS_IGDNG;
} else {
/* Does it work well on SIMD8? */
@@ -1688,7 +1688,7 @@ static void emit_tex(struct brw_wm_compile *c,
brw_MOV(p, brw_message_reg(6), src[2]); /* ref value / R coord */
}
- if (BRW_IS_IGDNG(p->brw)) {
+ if (p->brw->gen == 5) {
if (shadow)
msg_type = BRW_SAMPLER_MESSAGE_SIMD8_SAMPLE_COMPARE_IGDNG;
else
@@ -1970,7 +1970,7 @@ static void brw_wm_emit_branching_shader(struct brw_context *brw, struct brw_wm_
struct brw_instruction *inst0, *inst1;
GLuint br = 1;
- if (BRW_IS_IGDNG(brw))
+ if (brw->gen == 5)
br = 2;
loop_depth--;
diff --git a/src/gallium/drivers/i965/brw_wm_state.c b/src/gallium/drivers/i965/brw_wm_state.c
index efc2d96be13..a690003ecbd 100644
--- a/src/gallium/drivers/i965/brw_wm_state.c
+++ b/src/gallium/drivers/i965/brw_wm_state.c
@@ -70,9 +70,9 @@ wm_unit_populate_key(struct brw_context *brw, struct brw_wm_unit_key *key)
key->max_threads = 1;
else {
/* WM maximum threads is number of EUs times number of threads per EU. */
- if (BRW_IS_IGDNG(brw))
+ if (brw->gen == 5)
key->max_threads = 12 * 6;
- else if (BRW_IS_G4X(brw))
+ else if (brw->is_g4x)
key->max_threads = 10 * 5;
else
key->max_threads = 8 * 4;
@@ -155,7 +155,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 (brw->gen == 5)
wm.thread1.binding_table_entry_count = 0; /* hardware requirement */
else
wm.thread1.binding_table_entry_count = key->nr_surfaces;
@@ -174,7 +174,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 (brw->gen == 5)
wm.wm4.sampler_count = 0; /* hardware requirement */
else
wm.wm4.sampler_count = (key->sampler_count + 1) / 4;
@@ -277,7 +277,7 @@ static enum pipe_error upload_wm_unit( struct brw_context *brw )
grf_reg_count = (align(key.total_grf, 16) / 16 - 1);
per_thread_scratch_space = key.total_scratch / 1024 - 1;
stats_enable = (BRW_DEBUG & DEBUG_STATS) || key.stats_wm;
- sampler_count = BRW_IS_IGDNG(brw) ? 0 :(key.sampler_count + 1) / 4;
+ sampler_count = brw->gen == 5 ? 0 :(key.sampler_count + 1) / 4;
/* Emit WM program relocation */
make_reloc(&reloc[nr_reloc++],
diff --git a/src/gallium/drivers/i965/intel_decode.c b/src/gallium/drivers/i965/intel_decode.c
index 36c04a31655..1abe869f1ae 100644
--- a/src/gallium/drivers/i965/intel_decode.c
+++ b/src/gallium/drivers/i965/intel_decode.c
@@ -42,10 +42,11 @@
#include "util/u_memory.h"
#include "util/u_string.h"
+
#include "intel_decode.h"
+#include "brw_reg.h"
/*#include "intel_chipset.h"*/
-#define IS_965(x) 1 /* XXX */
#define IS_9XX(x) 1 /* XXX */
#define BUFFER_FAIL(_count, _len, _name) do { \
@@ -99,10 +100,11 @@ decode_mi(const uint32_t *data, int count, uint32_t hw_offset, int *failures)
} opcodes_mi[] = {
{ 0x08, 0, 1, 1, "MI_ARB_ON_OFF" },
{ 0x0a, 0, 1, 1, "MI_BATCH_BUFFER_END" },
+ { 0x30, 0x3f, 3, 3, "MI_BATCH_BUFFER" },
{ 0x31, 0x3f, 2, 2, "MI_BATCH_BUFFER_START" },
{ 0x14, 0x3f, 3, 3, "MI_DISPLAY_BUFFER_INFO" },
{ 0x04, 0, 1, 1, "MI_FLUSH" },
- { 0x22, 0, 3, 3, "MI_LOAD_REGISTER_IMM" },
+ { 0x22, 0x1f, 3, 3, "MI_LOAD_REGISTER_IMM" },
{ 0x13, 0x3f, 2, 2, "MI_LOAD_SCAN_LINES_EXCL" },
{ 0x12, 0x3f, 2, 2, "MI_LOAD_SCAN_LINES_INCL" },
{ 0x00, 0, 1, 1, "MI_NOOP" },
@@ -116,6 +118,11 @@ decode_mi(const uint32_t *data, int count, uint32_t hw_offset, int *failures)
{ 0x03, 0, 1, 1, "MI_WAIT_FOR_EVENT" },
};
+ switch ((data[0] & 0x1f800000) >> 23) {
+ case 0x0a:
+ instr_out(data, hw_offset, 0, "MI_BATCH_BUFFER_END\n");
+ return -1;
+ }
for (opcode = 0; opcode < Elements(opcodes_mi); opcode++) {
if ((data[0] & 0x1f800000) >> 23 == opcodes_mi[opcode].opcode) {
@@ -308,9 +315,13 @@ decode_2d(const uint32_t *data, int count, uint32_t hw_offset, int *failures)
static int
decode_3d_1c(const uint32_t *data, int count, uint32_t hw_offset, int *failures)
{
- switch ((data[0] & 0x00f80000) >> 19) {
+ uint32_t opcode;
+
+ opcode = (data[0] & 0x00f80000) >> 19;
+
+ switch (opcode) {
case 0x11:
- instr_out(data, hw_offset, 0, "3DSTATE_DEPTH_SUBRECTANGLE_DISALBE\n");
+ instr_out(data, hw_offset, 0, "3DSTATE_DEPTH_SUBRECTANGLE_DISABLE\n");
return 1;
case 0x10:
instr_out(data, hw_offset, 0, "3DSTATE_SCISSOR_ENABLE\n");
@@ -326,7 +337,8 @@ decode_3d_1c(const uint32_t *data, int count, uint32_t hw_offset, int *failures)
return 1;
}
- instr_out(data, hw_offset, 0, "3D UNKNOWN\n");
+ instr_out(data, hw_offset, 0, "3D UNKNOWN: 3d_1c opcode = 0x%x\n",
+ opcode);
(*failures)++;
return 1;
}
@@ -384,7 +396,7 @@ i915_get_instruction_dst(const uint32_t *data, int i, char *dstname, int do_mask
sprintf(dstname, "oD%s%s", dstmask, sat);
break;
case 6:
- if (dst_nr > 2)
+ if (dst_nr > 3)
fprintf(out, "bad destination reg U%d\n", dst_nr);
sprintf(dstname, "U%d%s%s", dst_nr, dstmask, sat);
break;
@@ -455,7 +467,7 @@ i915_get_instruction_src_name(uint32_t src_type, uint32_t src_nr, char *name)
break;
case 6:
sprintf(name, "U%d", src_nr);
- if (src_nr > 2)
+ if (src_nr > 3)
fprintf(out, "bad src reg %s\n", name);
break;
default:
@@ -800,10 +812,14 @@ i915_decode_instruction(const uint32_t *data, uint32_t hw_offset,
}
static int
-decode_3d_1d(const uint32_t *data, int count, uint32_t hw_offset, int *failures, int i830)
+decode_3d_1d(const uint32_t *data, int count,
+ uint32_t hw_offset,
+ uint32_t devid,
+ int *failures)
{
- unsigned int len, i, c, opcode, word, map, sampler, instr;
+ unsigned int len, i, c, idx, word, map, sampler, instr;
char *format;
+ uint32_t opcode;
struct {
uint32_t opcode;
@@ -814,7 +830,7 @@ decode_3d_1d(const uint32_t *data, int count, uint32_t hw_offset, int *failures,
} opcodes_3d_1d[] = {
{ 0x8e, 0, 3, 3, "3DSTATE_BUFFER_INFO" },
{ 0x86, 0, 4, 4, "3DSTATE_CHROMA_KEY" },
- { 0x9c, 0, 1, 1, "3DSTATE_CLEAR_PARAMETERS" },
+ { 0x9c, 0, 7, 7, "3DSTATE_CLEAR_PARAMETERS" },
{ 0x88, 0, 2, 2, "3DSTATE_CONSTANT_BLEND_COLOR" },
{ 0x99, 0, 2, 2, "3DSTATE_DEFAULT_DIFFUSE" },
{ 0x9a, 0, 2, 2, "3DSTATE_DEFAULT_SPECULAR" },
@@ -822,7 +838,6 @@ decode_3d_1d(const uint32_t *data, int count, uint32_t hw_offset, int *failures,
{ 0x97, 0, 2, 2, "3DSTATE_DEPTH_OFFSET_SCALE" },
{ 0x85, 0, 2, 2, "3DSTATE_DEST_BUFFER_VARIABLES" },
{ 0x80, 0, 5, 5, "3DSTATE_DRAWING_RECTANGLE" },
- { 0x8e, 0, 3, 3, "3DSTATE_BUFFER_INFO" },
{ 0x9d, 0, 65, 65, "3DSTATE_FILTER_COEFFICIENTS_4X4" },
{ 0x9e, 0, 4, 4, "3DSTATE_MONO_FILTER" },
{ 0x89, 0, 4, 4, "3DSTATE_FOG_MODE" },
@@ -834,9 +849,11 @@ decode_3d_1d(const uint32_t *data, int count, uint32_t hw_offset, int *failures,
{ 0x8d, 1, 3, 3, "3DSTATE_W_STATE_I830" },
{ 0x01, 1, 2, 2, "3DSTATE_COLOR_FACTOR_I830" },
{ 0x02, 1, 2, 2, "3DSTATE_MAP_COORD_SETBIND_I830" },
- };
+ }, *opcode_3d_1d;
- switch ((data[0] & 0x00ff0000) >> 16) {
+ opcode = (data[0] & 0x00ff0000) >> 16;
+
+ switch (opcode) {
case 0x07:
/* This instruction is unusual. A 0 length means just 1 DWORD instead of
* 2. The 0 length is specified in one place to be unsupported, but
@@ -891,26 +908,56 @@ decode_3d_1d(const uint32_t *data, int count, uint32_t hw_offset, int *failures,
instr_out(data, hw_offset, 0, "3DSTATE_LOAD_STATE_IMMEDIATE_1\n");
len = (data[0] & 0x0000000f) + 2;
i = 1;
- for (word = 0; word <= 7; word++) {
+ for (word = 0; word <= 8; word++) {
if (data[0] & (1 << (4 + word))) {
if (i >= count)
BUFFER_FAIL(count, len, "3DSTATE_LOAD_STATE_IMMEDIATE_1");
/* save vertex state for decode */
- if (word == 2) {
- saved_s2_set = 1;
- saved_s2 = data[i];
- }
- if (word == 4) {
- saved_s4_set = 1;
- saved_s4 = data[i];
+ if (IS_9XX(devid)) {
+ if (word == 2) {
+ saved_s2_set = 1;
+ saved_s2 = data[i];
+ }
+ if (word == 4) {
+ saved_s4_set = 1;
+ saved_s4 = data[i];
+ }
}
instr_out(data, hw_offset, i++, "S%d\n", word);
}
}
if (len != i) {
- fprintf(out, "Bad count in 3DSTATE_LOAD_INDIRECT\n");
+ fprintf(out, "Bad count in 3DSTATE_LOAD_STATE_IMMEDIATE_1\n");
+ (*failures)++;
+ }
+ return len;
+ case 0x03:
+ instr_out(data, hw_offset, 0, "3DSTATE_LOAD_STATE_IMMEDIATE_2\n");
+ len = (data[0] & 0x0000000f) + 2;
+ i = 1;
+ for (word = 6; word <= 14; word++) {
+ if (data[0] & (1 << word)) {
+ if (i >= count)
+ BUFFER_FAIL(count, len, "3DSTATE_LOAD_STATE_IMMEDIATE_2");
+
+ if (word == 6)
+ instr_out(data, hw_offset, i++, "TBCF\n");
+ else if (word >= 7 && word <= 10) {
+ instr_out(data, hw_offset, i++, "TB%dC\n", word - 7);
+ instr_out(data, hw_offset, i++, "TB%dA\n", word - 7);
+ } else if (word >= 11 && word <= 14) {
+ instr_out(data, hw_offset, i++, "TM%dS0\n", word - 11);
+ instr_out(data, hw_offset, i++, "TM%dS1\n", word - 11);
+ instr_out(data, hw_offset, i++, "TM%dS2\n", word - 11);
+ instr_out(data, hw_offset, i++, "TM%dS3\n", word - 11);
+ instr_out(data, hw_offset, i++, "TM%dS4\n", word - 11);
+ }
+ }
+ }
+ if (len != i) {
+ fprintf(out, "Bad count in 3DSTATE_LOAD_STATE_IMMEDIATE_2\n");
(*failures)++;
}
return len;
@@ -922,11 +969,27 @@ decode_3d_1d(const uint32_t *data, int count, uint32_t hw_offset, int *failures,
i = 2;
for (map = 0; map <= 15; map++) {
if (data[1] & (1 << map)) {
+ int width, height, pitch, dword;
+ const char *tiling;
+
if (i + 3 >= count)
BUFFER_FAIL(count, len, "3DSTATE_MAP_STATE");
instr_out(data, hw_offset, i++, "map %d MS2\n", map);
- instr_out(data, hw_offset, i++, "map %d MS3\n", map);
- instr_out(data, hw_offset, i++, "map %d MS4\n", map);
+
+ dword = data[i];
+ width = ((dword >> 10) & ((1 << 11) - 1))+1;
+ height = ((dword >> 21) & ((1 << 11) - 1))+1;
+
+ tiling = "none";
+ if (dword & (1 << 2))
+ tiling = "fenced";
+ else if (dword & (1 << 1))
+ tiling = dword & (1 << 0) ? "Y" : "X";
+ instr_out(data, hw_offset, i++, "map %d MS3 [width=%d, height=%d, tiling=%s]\n", map, width, height, tiling);
+
+ dword = data[i];
+ pitch = 4*(((dword >> 21) & ((1 << 11) - 1))+1);
+ instr_out(data, hw_offset, i++, "map %d MS4 [pitch=%d]\n", map, pitch);
}
}
if (len != i) {
@@ -982,8 +1045,8 @@ decode_3d_1d(const uint32_t *data, int count, uint32_t hw_offset, int *failures,
}
return len;
case 0x01:
- if (i830)
- break;
+ if (!IS_9XX(devid))
+ break;
instr_out(data, hw_offset, 0, "3DSTATE_SAMPLER_STATE\n");
instr_out(data, hw_offset, 1, "mask\n");
len = (data[0] & 0x0000003f) + 2;
@@ -1034,30 +1097,61 @@ decode_3d_1d(const uint32_t *data, int count, uint32_t hw_offset, int *failures,
format,
(data[1] & (1 << 31)) ? "en" : "dis");
return len;
+
+ case 0x8e:
+ {
+ const char *name, *tiling;
+
+ len = (data[0] & 0x0000000f) + 2;
+ if (len != 3)
+ fprintf(out, "Bad count in 3DSTATE_BUFFER_INFO\n");
+ if (count < 3)
+ BUFFER_FAIL(count, len, "3DSTATE_BUFFER_INFO");
+
+ switch((data[1] >> 24) & 0x7) {
+ case 0x3: name = "color"; break;
+ case 0x7: name = "depth"; break;
+ default: name = "unknown"; break;
+ }
+
+ tiling = "none";
+ if (data[1] & (1 << 23))
+ tiling = "fenced";
+ else if (data[1] & (1 << 22))
+ tiling = data[1] & (1 << 21) ? "Y" : "X";
+
+ instr_out(data, hw_offset, 0, "3DSTATE_BUFFER_INFO\n");
+ instr_out(data, hw_offset, 1, "%s, tiling = %s, pitch=%d\n", name, tiling, data[1]&0xffff);
+
+ instr_out(data, hw_offset, 2, "address\n");
+ return len;
+ }
}
- for (opcode = 0; opcode < Elements(opcodes_3d_1d); opcode++) {
- if (opcodes_3d_1d[opcode].i830_only && !i830)
+ for (idx = 0; idx < Elements(opcodes_3d_1d); idx++)
+ {
+ opcode_3d_1d = &opcodes_3d_1d[idx];
+ if (opcode_3d_1d->i830_only && IS_9XX(devid))
continue;
- if (((data[0] & 0x00ff0000) >> 16) == opcodes_3d_1d[opcode].opcode) {
+ if (((data[0] & 0x00ff0000) >> 16) == opcode_3d_1d->opcode) {
len = 1;
- instr_out(data, hw_offset, 0, "%s\n", opcodes_3d_1d[opcode].name);
- if (opcodes_3d_1d[opcode].max_len > 1) {
+ instr_out(data, hw_offset, 0, "%s\n", opcode_3d_1d->name);
+ if (opcode_3d_1d->max_len > 1) {
len = (data[0] & 0x0000ffff) + 2;
- if (len < opcodes_3d_1d[opcode].min_len ||
- len > opcodes_3d_1d[opcode].max_len)
+ if (len < opcode_3d_1d->min_len ||
+ len > opcode_3d_1d->max_len)
{
fprintf(out, "Bad count in %s\n",
- opcodes_3d_1d[opcode].name);
+ opcode_3d_1d->name);
(*failures)++;
}
}
for (i = 1; i < len; i++) {
if (i >= count)
- BUFFER_FAIL(count, len, opcodes_3d_1d[opcode].name);
+ BUFFER_FAIL(count, len, opcode_3d_1d->name);
instr_out(data, hw_offset, i, "dword %d\n", i);
}
@@ -1065,7 +1159,7 @@ decode_3d_1d(const uint32_t *data, int count, uint32_t hw_offset, int *failures,
}
}
- instr_out(data, hw_offset, 0, "3D UNKNOWN\n");
+ instr_out(data, hw_offset, 0, "3D UNKNOWN: 3d_1d opcode = 0x%x\n", opcode);
(*failures)++;
return 1;
}
@@ -1075,8 +1169,10 @@ decode_3d_primitive(const uint32_t *data, int count, uint32_t hw_offset,
int *failures)
{
char immediate = (data[0] & (1 << 23)) == 0;
- unsigned int len, i;
+ unsigned int len, i, ret;
char *primtype;
+ int original_s2 = saved_s2;
+ int original_s4 = saved_s4;
switch ((data[0] >> 18) & 0xf) {
case 0x0: primtype = "TRILIST"; break;
@@ -1089,7 +1185,7 @@ decode_3d_primitive(const uint32_t *data, int count, uint32_t hw_offset,
case 0x7: primtype = "RECTLIST"; break;
case 0x8: primtype = "POINTLIST"; break;
case 0x9: primtype = "DIB"; break;
- case 0xa: primtype = "CLEAR_RECT"; break;
+ case 0xa: primtype = "CLEAR_RECT"; saved_s4 = 3 << 6; saved_s2 = ~0; break;
default: primtype = "unknown"; break;
}
@@ -1193,6 +1289,8 @@ decode_3d_primitive(const uint32_t *data, int count, uint32_t hw_offset,
vertex++;
}
}
+
+ ret = len;
} else {
/* indirect vertices */
len = data[0] & 0x0000ffff; /* index count */
@@ -1210,13 +1308,15 @@ decode_3d_primitive(const uint32_t *data, int count, uint32_t hw_offset,
if ((data[i] & 0xffff) == 0xffff) {
instr_out(data, hw_offset, i,
" indices: (terminator)\n");
- return i;
+ ret = i;
+ goto out;
} else if ((data[i] >> 16) == 0xffff) {
instr_out(data, hw_offset, i,
" indices: 0x%04x, "
"(terminator)\n",
data[i] & 0xffff);
- return i;
+ ret = i;
+ goto out;
} else {
instr_out(data, hw_offset, i,
" indices: 0x%04x, 0x%04x\n",
@@ -1226,7 +1326,8 @@ decode_3d_primitive(const uint32_t *data, int count, uint32_t hw_offset,
fprintf(out,
"3DPRIMITIVE: no terminator found in index buffer\n");
(*failures)++;
- return count;
+ ret = count;
+ goto out;
} else {
/* fixed size vertex index buffer */
for (i = 0; i < len; i += 2) {
@@ -1241,7 +1342,8 @@ decode_3d_primitive(const uint32_t *data, int count, uint32_t hw_offset,
}
}
}
- return (len + 1) / 2 + 1;
+ ret = (len + 1) / 2 + 1;
+ goto out;
} else {
/* sequential vertex access */
if (count < 2)
@@ -1250,17 +1352,22 @@ decode_3d_primitive(const uint32_t *data, int count, uint32_t hw_offset,
"3DPRIMITIVE sequential indirect %s, %d starting from "
"%d\n", primtype, len, data[1] & 0xffff);
instr_out(data, hw_offset, 1, " start\n");
- return 2;
+ ret = 2;
+ goto out;
}
}
- return len;
+out:
+ saved_s2 = original_s2;
+ saved_s4 = original_s4;
+ return ret;
}
static int
-decode_3d(const uint32_t *data, int count, uint32_t hw_offset, int *failures)
+decode_3d(const uint32_t *data, int count, uint32_t hw_offset, uint32_t devid, int *failures)
{
- unsigned int opcode;
+ uint32_t opcode;
+ unsigned int idx;
struct {
uint32_t opcode;
@@ -1277,41 +1384,44 @@ decode_3d(const uint32_t *data, int count, uint32_t hw_offset, int *failures)
{ 0x0d, 1, 1, "3DSTATE_MODES_4" },
{ 0x0c, 1, 1, "3DSTATE_MODES_5" },
{ 0x07, 1, 1, "3DSTATE_RASTERIZATION_RULES" },
- };
+ }, *opcode_3d;
+
+ opcode = (data[0] & 0x1f000000) >> 24;
- switch ((data[0] & 0x1f000000) >> 24) {
+ switch (opcode) {
case 0x1f:
return decode_3d_primitive(data, count, hw_offset, failures);
case 0x1d:
- return decode_3d_1d(data, count, hw_offset, failures, 0);
+ return decode_3d_1d(data, count, hw_offset, devid, failures);
case 0x1c:
return decode_3d_1c(data, count, hw_offset, failures);
}
- for (opcode = 0; opcode < Elements(opcodes_3d); opcode++) {
- if ((data[0] & 0x1f000000) >> 24 == opcodes_3d[opcode].opcode) {
+ for (idx = 0; idx < Elements(opcodes_3d); idx++) {
+ opcode_3d = &opcodes_3d[idx];
+ if (opcode == opcode_3d->opcode) {
unsigned int len = 1, i;
- instr_out(data, hw_offset, 0, "%s\n", opcodes_3d[opcode].name);
- if (opcodes_3d[opcode].max_len > 1) {
+ instr_out(data, hw_offset, 0, "%s\n", opcode_3d->name);
+ if (opcode_3d->max_len > 1) {
len = (data[0] & 0xff) + 2;
- if (len < opcodes_3d[opcode].min_len ||
- len > opcodes_3d[opcode].max_len)
+ if (len < opcode_3d->min_len ||
+ len > opcode_3d->max_len)
{
- fprintf(out, "Bad count in %s\n", opcodes_3d[opcode].name);
+ fprintf(out, "Bad count in %s\n", opcode_3d->name);
}
}
for (i = 1; i < len; i++) {
if (i >= count)
- BUFFER_FAIL(count, len, opcodes_3d[opcode].name);
+ BUFFER_FAIL(count, len, opcode_3d->name);
instr_out(data, hw_offset, i, "dword %d\n", i);
}
return len;
}
}
- instr_out(data, hw_offset, 0, "3D UNKNOWN\n");
+ instr_out(data, hw_offset, 0, "3D UNKNOWN: 3d opcode = 0x%x\n", opcode);
(*failures)++;
return 1;
}
@@ -1401,12 +1511,87 @@ get_965_prim_type(uint32_t data)
default: return "fail";
}
}
+static int
+i965_decode_urb_fence(const uint32_t *data, uint32_t hw_offset, int len, int count,
+ int *failures)
+{
+ uint32_t vs_fence, clip_fence, gs_fence, sf_fence, vfe_fence, cs_fence;
+
+ if (len != 3)
+ fprintf(out, "Bad count in URB_FENCE\n");
+ if (count < 3)
+ BUFFER_FAIL(count, len, "URB_FENCE");
+
+ vs_fence = data[1] & 0x3ff;
+ gs_fence = (data[1] >> 10) & 0x3ff;
+ clip_fence = (data[1] >> 20) & 0x3ff;
+ sf_fence = data[2] & 0x3ff;
+ vfe_fence = (data[2] >> 10) & 0x3ff;
+ cs_fence = (data[2] >> 20) & 0x7ff;
+
+ instr_out(data, hw_offset, 0, "URB_FENCE: %s%s%s%s%s%s\n",
+ (data[0] >> 13) & 1 ? "cs " : "",
+ (data[0] >> 12) & 1 ? "vfe " : "",
+ (data[0] >> 11) & 1 ? "sf " : "",
+ (data[0] >> 10) & 1 ? "clip " : "",
+ (data[0] >> 9) & 1 ? "gs " : "",
+ (data[0] >> 8) & 1 ? "vs " : "");
+ instr_out(data, hw_offset, 1,
+ "vs fence: %d, clip_fence: %d, gs_fence: %d\n",
+ vs_fence, clip_fence, gs_fence);
+ instr_out(data, hw_offset, 2,
+ "sf fence: %d, vfe_fence: %d, cs_fence: %d\n",
+ sf_fence, vfe_fence, cs_fence);
+ if (gs_fence < vs_fence)
+ fprintf(out, "gs fence < vs fence!\n");
+ if (clip_fence < gs_fence)
+ fprintf(out, "clip fence < gs fence!\n");
+ if (sf_fence < clip_fence)
+ fprintf(out, "sf fence < clip fence!\n");
+ if (cs_fence < sf_fence)
+ fprintf(out, "cs fence < sf fence!\n");
+
+ return len;
+}
+
+static void
+state_base_out(const uint32_t *data, uint32_t hw_offset, unsigned int index,
+ char *name)
+{
+ if (data[index] & 1) {
+ instr_out(data, hw_offset, index, "%s state base address 0x%08x\n",
+ name, data[index] & ~1);
+ } else {
+ instr_out(data, hw_offset, index, "%s state base not updated\n",
+ name);
+ }
+}
+
+static void
+state_max_out(const uint32_t *data, uint32_t hw_offset, unsigned int index,
+ char *name)
+{
+ if (data[index] & 1) {
+ if (data[index] == 1) {
+ instr_out(data, hw_offset, index,
+ "%s state upper bound disabled\n", name);
+ } else {
+ instr_out(data, hw_offset, index, "%s state upper bound 0x%08x\n",
+ name, data[index] & ~1);
+ }
+ } else {
+ instr_out(data, hw_offset, index, "%s state upper bound not updated\n",
+ name);
+ }
+}
static int
-decode_3d_965(const uint32_t *data, int count, uint32_t hw_offset, int *failures)
+decode_3d_965(const uint32_t *data, int count, uint32_t hw_offset, uint32_t devid, int *failures)
{
- unsigned int opcode, len;
- int i;
+ uint32_t opcode;
+ unsigned int idx, len;
+ int i, sba_len;
+ char *desc1 = NULL;
struct {
uint32_t opcode;
@@ -1435,51 +1620,78 @@ decode_3d_965(const uint32_t *data, int count, uint32_t hw_offset, int *failures
{ 0x7907, 33, 33, "3DSTATE_POLY_STIPPLE_PATTERN" },
{ 0x7908, 3, 3, "3DSTATE_LINE_STIPPLE" },
{ 0x7909, 2, 2, "3DSTATE_GLOBAL_DEPTH_OFFSET_CLAMP" },
+ { 0x7909, 2, 2, "3DSTATE_CLEAR_PARAMS" },
{ 0x790a, 3, 3, "3DSTATE_AA_LINE_PARAMETERS" },
+ { 0x790b, 4, 4, "3DSTATE_GS_SVB_INDEX" },
+ { 0x790d, 3, 3, "3DSTATE_MULTISAMPLE" },
{ 0x7b00, 6, 6, "3DPRIMITIVE" },
- };
+ { 0x7802, 4, 4, "3DSTATE_SAMPLER_STATE_POINTERS" },
+ { 0x7805, 3, 3, "3DSTATE_URB" },
+ { 0x780e, 4, 4, "3DSTATE_CC_STATE_POINTERS" },
+ { 0x7810, 6, 6, "3DSTATE_VS_STATE" },
+ { 0x7811, 7, 7, "3DSTATE_GS_STATE" },
+ { 0x7812, 4, 4, "3DSTATE_CLIP_STATE" },
+ { 0x7813, 20, 20, "3DSTATE_SF_STATE" },
+ { 0x7814, 9, 9, "3DSTATE_WM_STATE" },
+ { 0x7812, 4, 4, "3DSTATE_CLIP_STATE" },
+ { 0x7815, 5, 5, "3DSTATE_CONSTANT_VS_STATE" },
+ { 0x7816, 5, 5, "3DSTATE_CONSTANT_GS_STATE" },
+ { 0x7817, 5, 5, "3DSTATE_CONSTANT_PS_STATE" },
+ { 0x7818, 2, 2, "3DSTATE_SAMPLE_MASK" },
+ }, *opcode_3d;
len = (data[0] & 0x0000ffff) + 2;
- switch ((data[0] & 0xffff0000) >> 16) {
+ opcode = (data[0] & 0xffff0000) >> 16;
+ switch (opcode) {
+ case 0x6000:
+ len = (data[0] & 0x000000ff) + 2;
+ return i965_decode_urb_fence(data, hw_offset, len, count, failures);
+ case 0x6001:
+ instr_out(data, hw_offset, 0, "CS_URB_STATE\n");
+ instr_out(data, hw_offset, 1, "entry_size: %d [%d bytes], n_entries: %d\n",
+ (data[1] >> 4) & 0x1f,
+ (((data[1] >> 4) & 0x1f) + 1) * 64,
+ data[1] & 0x7);
+ return len;
+ case 0x6002:
+ len = (data[0] & 0x000000ff) + 2;
+ instr_out(data, hw_offset, 0, "CONSTANT_BUFFER: %s\n",
+ (data[0] >> 8) & 1 ? "valid" : "invalid");
+ instr_out(data, hw_offset, 1, "offset: 0x%08x, length: %d bytes\n",
+ data[1] & ~0x3f, ((data[1] & 0x3f) + 1) * 64);
+ return len;
case 0x6101:
- if (len != 6)
+ if (IS_GEN6(devid))
+ sba_len = 10;
+ else if (IS_IRONLAKE(devid))
+ sba_len = 8;
+ else
+ sba_len = 6;
+ if (len != sba_len)
fprintf(out, "Bad count in STATE_BASE_ADDRESS\n");
- if (count < 6)
+ if (len != sba_len)
BUFFER_FAIL(count, len, "STATE_BASE_ADDRESS");
+ i = 0;
instr_out(data, hw_offset, 0,
"STATE_BASE_ADDRESS\n");
-
- if (data[1] & 1) {
- instr_out(data, hw_offset, 1, "General state at 0x%08x\n",
- data[1] & ~1);
- } else
- instr_out(data, hw_offset, 1, "General state not updated\n");
-
- if (data[2] & 1) {
- instr_out(data, hw_offset, 2, "Surface state at 0x%08x\n",
- data[2] & ~1);
- } else
- instr_out(data, hw_offset, 2, "Surface state not updated\n");
-
- if (data[3] & 1) {
- instr_out(data, hw_offset, 3, "Indirect state at 0x%08x\n",
- data[3] & ~1);
- } else
- instr_out(data, hw_offset, 3, "Indirect state not updated\n");
-
- if (data[4] & 1) {
- instr_out(data, hw_offset, 4, "General state upper bound 0x%08x\n",
- data[4] & ~1);
- } else
- instr_out(data, hw_offset, 4, "General state not updated\n");
-
- if (data[5] & 1) {
- instr_out(data, hw_offset, 5, "Indirect state upper bound 0x%08x\n",
- data[5] & ~1);
- } else
- instr_out(data, hw_offset, 5, "Indirect state not updated\n");
+ i++;
+
+ state_base_out(data, hw_offset, i++, "general");
+ state_base_out(data, hw_offset, i++, "surface");
+ if (IS_GEN6(devid))
+ state_base_out(data, hw_offset, i++, "dynamic");
+ state_base_out(data, hw_offset, i++, "indirect");
+ if (IS_IRONLAKE(devid) || IS_GEN6(devid))
+ state_base_out(data, hw_offset, i++, "instruction");
+
+ state_max_out(data, hw_offset, i++, "general");
+ if (IS_GEN6(devid))
+ state_max_out(data, hw_offset, i++, "dynamic");
+ state_max_out(data, hw_offset, i++, "indirect");
+ if (IS_IRONLAKE(devid) || IS_GEN6(devid))
+ state_max_out(data, hw_offset, i++, "instruction");
return len;
case 0x7800:
@@ -1498,18 +1710,33 @@ decode_3d_965(const uint32_t *data, int count, uint32_t hw_offset, int *failures
instr_out(data, hw_offset, 6, "CC state\n");
return len;
case 0x7801:
- if (len != 6)
+ len = (data[0] & 0x000000ff) + 2;
+ if (len != 6 && len != 4)
fprintf(out, "Bad count in 3DSTATE_BINDING_TABLE_POINTERS\n");
- if (count < 6)
- BUFFER_FAIL(count, len, "3DSTATE_BINDING_TABLE_POINTERS");
+ if (len == 6) {
+ if (count < 6)
+ BUFFER_FAIL(count, len, "3DSTATE_BINDING_TABLE_POINTERS");
+ instr_out(data, hw_offset, 0,
+ "3DSTATE_BINDING_TABLE_POINTERS\n");
+ instr_out(data, hw_offset, 1, "VS binding table\n");
+ instr_out(data, hw_offset, 2, "GS binding table\n");
+ instr_out(data, hw_offset, 3, "Clip binding table\n");
+ instr_out(data, hw_offset, 4, "SF binding table\n");
+ instr_out(data, hw_offset, 5, "WM binding table\n");
+ } else {
+ if (count < 4)
+ BUFFER_FAIL(count, len, "3DSTATE_BINDING_TABLE_POINTERS");
- instr_out(data, hw_offset, 0,
- "3DSTATE_BINDING_TABLE_POINTERS\n");
- instr_out(data, hw_offset, 1, "VS binding table\n");
- instr_out(data, hw_offset, 2, "GS binding table\n");
- instr_out(data, hw_offset, 3, "Clip binding table\n");
- instr_out(data, hw_offset, 4, "SF binding table\n");
- instr_out(data, hw_offset, 5, "WM binding table\n");
+ instr_out(data, hw_offset, 0,
+ "3DSTATE_BINDING_TABLE_POINTERS: VS mod %d, "
+ "GS mod %d, PS mod %d\n",
+ (data[0] & (1 << 8)) != 0,
+ (data[0] & (1 << 9)) != 0,
+ (data[0] & (1 << 10)) != 0);
+ instr_out(data, hw_offset, 1, "VS binding table\n");
+ instr_out(data, hw_offset, 2, "GS binding table\n");
+ instr_out(data, hw_offset, 3, "WM binding table\n");
+ }
return len;
@@ -1560,6 +1787,18 @@ decode_3d_965(const uint32_t *data, int count, uint32_t hw_offset, int *failures
}
return len;
+ case 0x780d:
+ len = (data[0] & 0xff) + 2;
+ if (len != 4)
+ fprintf(out, "Bad count in 3DSTATE_VIEWPORT_STATE_POINTERS\n");
+ if (count < len)
+ BUFFER_FAIL(count, len, "3DSTATE_VIEWPORT_STATE_POINTERS");
+ instr_out(data, hw_offset, 0, "3DSTATE_VIEWPORT_STATE_POINTERS\n");
+ instr_out(data, hw_offset, 1, "clip\n");
+ instr_out(data, hw_offset, 2, "sf\n");
+ instr_out(data, hw_offset, 3, "cc\n");
+ return len;
+
case 0x780a:
len = (data[0] & 0xff) + 2;
if (len != 3)
@@ -1592,7 +1831,7 @@ decode_3d_965(const uint32_t *data, int count, uint32_t hw_offset, int *failures
return len;
case 0x7905:
- if (len != 5 && len != 6)
+ if (len < 5 || len > 7)
fprintf(out, "Bad count in 3DSTATE_DEPTH_BUFFER\n");
if (count < len)
BUFFER_FAIL(count, len, "3DSTATE_DEPTH_BUFFER");
@@ -1609,9 +1848,36 @@ decode_3d_965(const uint32_t *data, int count, uint32_t hw_offset, int *failures
((data[3] & 0x0007ffc0) >> 6) + 1,
((data[3] & 0xfff80000) >> 19) + 1);
instr_out(data, hw_offset, 4, "volume depth\n");
- if (len == 6)
+ if (len >= 6)
instr_out(data, hw_offset, 5, "\n");
+ if (len >= 7)
+ instr_out(data, hw_offset, 6, "render target view extent\n");
+
+ return len;
+ case 0x7a00:
+ len = (data[0] & 0xff) + 2;
+ if (len != 4)
+ fprintf(out, "Bad count in PIPE_CONTROL\n");
+ if (count < len)
+ BUFFER_FAIL(count, len, "PIPE_CONTROL");
+
+ switch ((data[0] >> 14) & 0x3) {
+ case 0: desc1 = "no write"; break;
+ case 1: desc1 = "qword write"; break;
+ case 2: desc1 = "PS_DEPTH_COUNT write"; break;
+ case 3: desc1 = "TIMESTAMP write"; break;
+ }
+ instr_out(data, hw_offset, 0,
+ "PIPE_CONTROL: %s, %sdepth stall, %sRC write flush, "
+ "%sinst flush\n",
+ desc1,
+ data[0] & (1 << 13) ? "" : "no ",
+ data[0] & (1 << 12) ? "" : "no ",
+ data[0] & (1 << 11) ? "" : "no ");
+ instr_out(data, hw_offset, 1, "destination address\n");
+ instr_out(data, hw_offset, 2, "immediate dword low\n");
+ instr_out(data, hw_offset, 3, "immediate dword high\n");
return len;
case 0x7b00:
@@ -1633,39 +1899,41 @@ decode_3d_965(const uint32_t *data, int count, uint32_t hw_offset, int *failures
return len;
}
- for (opcode = 0; opcode < Elements(opcodes_3d); opcode++) {
- if ((data[0] & 0xffff0000) >> 16 == opcodes_3d[opcode].opcode) {
+ for (idx = 0; idx < Elements(opcodes_3d); idx++) {
+ opcode_3d = &opcodes_3d[idx];
+ if ((data[0] & 0xffff0000) >> 16 == opcode_3d->opcode) {
unsigned int i;
len = 1;
- instr_out(data, hw_offset, 0, "%s\n", opcodes_3d[opcode].name);
- if (opcodes_3d[opcode].max_len > 1) {
+ instr_out(data, hw_offset, 0, "%s\n", opcode_3d->name);
+ if (opcode_3d->max_len > 1) {
len = (data[0] & 0xff) + 2;
- if (len < opcodes_3d[opcode].min_len ||
- len > opcodes_3d[opcode].max_len)
+ if (len < opcode_3d->min_len ||
+ len > opcode_3d->max_len)
{
- fprintf(out, "Bad count in %s\n", opcodes_3d[opcode].name);
+ fprintf(out, "Bad count in %s\n", opcode_3d->name);
}
}
for (i = 1; i < len; i++) {
if (i >= count)
- BUFFER_FAIL(count, len, opcodes_3d[opcode].name);
+ BUFFER_FAIL(count, len, opcode_3d->name);
instr_out(data, hw_offset, i, "dword %d\n", i);
}
return len;
}
}
- instr_out(data, hw_offset, 0, "3D UNKNOWN\n");
+ instr_out(data, hw_offset, 0, "3D UNKNOWN: 3d_965 opcode = 0x%x\n", opcode);
(*failures)++;
return 1;
}
static int
-decode_3d_i830(const uint32_t *data, int count, uint32_t hw_offset, int *failures)
+decode_3d_i830(const uint32_t *data, int count, uint32_t hw_offset, uint32_t devid, int *failures)
{
- unsigned int opcode;
+ unsigned int idx;
+ uint32_t opcode;
struct {
uint32_t opcode;
@@ -1689,41 +1957,44 @@ decode_3d_i830(const uint32_t *data, int count, uint32_t hw_offset, int *failure
{ 0x0f, 1, 1, "3DSTATE_MODES_2" },
{ 0x15, 1, 1, "3DSTATE_FOG_COLOR" },
{ 0x16, 1, 1, "3DSTATE_MODES_4" },
- };
+ }, *opcode_3d;
+
+ opcode = (data[0] & 0x1f000000) >> 24;
- switch ((data[0] & 0x1f000000) >> 24) {
+ switch (opcode) {
case 0x1f:
return decode_3d_primitive(data, count, hw_offset, failures);
case 0x1d:
- return decode_3d_1d(data, count, hw_offset, failures, 1);
+ return decode_3d_1d(data, count, hw_offset, devid, failures);
case 0x1c:
return decode_3d_1c(data, count, hw_offset, failures);
}
- for (opcode = 0; opcode < Elements(opcodes_3d); opcode++) {
- if ((data[0] & 0x1f000000) >> 24 == opcodes_3d[opcode].opcode) {
+ for (idx = 0; idx < Elements(opcodes_3d); idx++) {
+ opcode_3d = &opcodes_3d[idx];
+ if ((data[0] & 0x1f000000) >> 24 == opcode_3d->opcode) {
unsigned int len = 1, i;
- instr_out(data, hw_offset, 0, "%s\n", opcodes_3d[opcode].name);
- if (opcodes_3d[opcode].max_len > 1) {
+ instr_out(data, hw_offset, 0, "%s\n", opcode_3d->name);
+ if (opcode_3d->max_len > 1) {
len = (data[0] & 0xff) + 2;
- if (len < opcodes_3d[opcode].min_len ||
- len > opcodes_3d[opcode].max_len)
+ if (len < opcode_3d->min_len ||
+ len > opcode_3d->max_len)
{
- fprintf(out, "Bad count in %s\n", opcodes_3d[opcode].name);
+ fprintf(out, "Bad count in %s\n", opcode_3d->name);
}
}
for (i = 1; i < len; i++) {
if (i >= count)
- BUFFER_FAIL(count, len, opcodes_3d[opcode].name);
+ BUFFER_FAIL(count, len, opcode_3d->name);
instr_out(data, hw_offset, i, "dword %d\n", i);
}
return len;
}
}
- instr_out(data, hw_offset, 0, "3D UNKNOWN\n");
+ instr_out(data, hw_offset, 0, "3D UNKNOWN: 3d_i830 opcode = 0x%x\n", opcode);
(*failures)++;
return 1;
}
@@ -1736,8 +2007,12 @@ decode_3d_i830(const uint32_t *data, int count, uint32_t hw_offset, int *failure
* \param hw_offset hardware address for the buffer
*/
int
-intel_decode(const uint32_t *data, int count, uint32_t hw_offset, uint32_t devid)
+intel_decode(const uint32_t *data, int count,
+ uint32_t hw_offset,
+ uint32_t devid,
+ uint32_t ignore_end_of_batchbuffer)
{
+ int ret;
int index = 0;
int failures = 0;
@@ -1746,8 +2021,23 @@ intel_decode(const uint32_t *data, int count, uint32_t hw_offset, uint32_t devid
while (index < count) {
switch ((data[index] & 0xe0000000) >> 29) {
case 0x0:
- index += decode_mi(data + index, count - index,
+ ret = decode_mi(data + index, count - index,
hw_offset + index * 4, &failures);
+
+ /* If MI_BATCHBUFFER_END happened, then dump the rest of the
+ * output in case we some day want it in debugging, but don't
+ * decode it since it'll just confuse in the common case.
+ */
+ if (ret == -1) {
+ if (ignore_end_of_batchbuffer) {
+ index++;
+ } else {
+ for (index = index + 1; index < count; index++) {
+ instr_out(data, hw_offset, index, "\n");
+ }
+ }
+ } else
+ index += ret;
break;
case 0x2:
index += decode_2d(data + index, count - index,
@@ -1756,13 +2046,16 @@ intel_decode(const uint32_t *data, int count, uint32_t hw_offset, uint32_t devid
case 0x3:
if (IS_965(devid)) {
index += decode_3d_965(data + index, count - index,
- hw_offset + index * 4, &failures);
+ hw_offset + index * 4,
+ devid, &failures);
} else if (IS_9XX(devid)) {
index += decode_3d(data + index, count - index,
- hw_offset + index * 4, &failures);
+ hw_offset + index * 4,
+ devid, &failures);
} else {
index += decode_3d_i830(data + index, count - index,
- hw_offset + index * 4, &failures);
+ hw_offset + index * 4,
+ devid, &failures);
}
break;
default:
diff --git a/src/gallium/drivers/i965/intel_decode.h b/src/gallium/drivers/i965/intel_decode.h
index 7683097b869..7e7c108c0c6 100644
--- a/src/gallium/drivers/i965/intel_decode.h
+++ b/src/gallium/drivers/i965/intel_decode.h
@@ -25,5 +25,7 @@
*
*/
-int intel_decode(const uint32_t *data, int count, uint32_t hw_offset, uint32_t devid);
+#include "pipe/p_compiler.h"
+
+int intel_decode(const uint32_t *data, int count, uint32_t hw_offset, uint32_t devid, uint32_t ignore_end_of_batchbuffer);
void intel_decode_context_reset(void);
diff --git a/src/gallium/drivers/i965/intel_structs.h b/src/gallium/drivers/i965/intel_structs.h
index 522e3bd92c2..ec6eec8910f 100644
--- a/src/gallium/drivers/i965/intel_structs.h
+++ b/src/gallium/drivers/i965/intel_structs.h
@@ -1,6 +1,8 @@
#ifndef INTEL_STRUCTS_H
#define INTEL_STRUCTS_H
+#include "brw_types.h"
+
struct br0 {
GLuint length:8;
GLuint pad0:3;
diff --git a/src/gallium/drivers/identity/id_context.c b/src/gallium/drivers/identity/id_context.c
index 3efbd6a246d..2a9d7360155 100644
--- a/src/gallium/drivers/identity/id_context.c
+++ b/src/gallium/drivers/identity/id_context.c
@@ -668,34 +668,15 @@ identity_clear_depth_stencil(struct pipe_context *_pipe,
static void
identity_flush(struct pipe_context *_pipe,
- unsigned flags,
struct pipe_fence_handle **fence)
{
struct identity_context *id_pipe = identity_context(_pipe);
struct pipe_context *pipe = id_pipe->pipe;
pipe->flush(pipe,
- flags,
fence);
}
-static unsigned int
-identity_is_resource_referenced(struct pipe_context *_pipe,
- struct pipe_resource *_resource,
- unsigned level,
- int layer)
-{
- struct identity_context *id_pipe = identity_context(_pipe);
- struct identity_resource *id_resource = identity_resource(_resource);
- struct pipe_context *pipe = id_pipe->pipe;
- struct pipe_resource *resource = id_resource->resource;
-
- return pipe->is_resource_referenced(pipe,
- resource,
- level,
- layer);
-}
-
static struct pipe_sampler_view *
identity_context_create_sampler_view(struct pipe_context *_pipe,
struct pipe_resource *_resource,
@@ -855,6 +836,19 @@ identity_context_transfer_inline_write(struct pipe_context *_context,
}
+static void identity_redefine_user_buffer(struct pipe_context *_context,
+ struct pipe_resource *_resource,
+ unsigned offset, unsigned size)
+{
+ struct identity_context *id_context = identity_context(_context);
+ struct identity_resource *id_resource = identity_resource(_resource);
+ struct pipe_context *context = id_context->pipe;
+ struct pipe_resource *resource = id_resource->resource;
+
+ context->redefine_user_buffer(context, resource, offset, size);
+}
+
+
struct pipe_context *
identity_context_create(struct pipe_screen *_screen, struct pipe_context *pipe)
{
@@ -918,7 +912,6 @@ identity_context_create(struct pipe_screen *_screen, struct pipe_context *pipe)
id_pipe->base.clear_render_target = identity_clear_render_target;
id_pipe->base.clear_depth_stencil = identity_clear_depth_stencil;
id_pipe->base.flush = identity_flush;
- id_pipe->base.is_resource_referenced = identity_is_resource_referenced;
id_pipe->base.create_surface = identity_context_create_surface;
id_pipe->base.surface_destroy = identity_context_surface_destroy;
id_pipe->base.create_sampler_view = identity_context_create_sampler_view;
@@ -929,6 +922,7 @@ identity_context_create(struct pipe_screen *_screen, struct pipe_context *pipe)
id_pipe->base.transfer_unmap = identity_context_transfer_unmap;
id_pipe->base.transfer_flush_region = identity_context_transfer_flush_region;
id_pipe->base.transfer_inline_write = identity_context_transfer_inline_write;
+ id_pipe->base.redefine_user_buffer = identity_redefine_user_buffer;
id_pipe->pipe = pipe;
diff --git a/src/gallium/drivers/identity/id_screen.c b/src/gallium/drivers/identity/id_screen.c
index 644481bb748..9bf7fd4c0ee 100644
--- a/src/gallium/drivers/identity/id_screen.c
+++ b/src/gallium/drivers/identity/id_screen.c
@@ -103,8 +103,7 @@ identity_screen_is_format_supported(struct pipe_screen *_screen,
enum pipe_format format,
enum pipe_texture_target target,
unsigned sample_count,
- unsigned tex_usage,
- unsigned geom_flags)
+ unsigned tex_usage)
{
struct identity_screen *id_screen = identity_screen(_screen);
struct pipe_screen *screen = id_screen->screen;
@@ -113,8 +112,7 @@ identity_screen_is_format_supported(struct pipe_screen *_screen,
format,
target,
sample_count,
- tex_usage,
- geom_flags);
+ tex_usage);
}
static struct pipe_context *
@@ -242,30 +240,28 @@ identity_screen_fence_reference(struct pipe_screen *_screen,
fence);
}
-static int
+static boolean
identity_screen_fence_signalled(struct pipe_screen *_screen,
- struct pipe_fence_handle *fence,
- unsigned flags)
+ struct pipe_fence_handle *fence)
{
struct identity_screen *id_screen = identity_screen(_screen);
struct pipe_screen *screen = id_screen->screen;
return screen->fence_signalled(screen,
- fence,
- flags);
+ fence);
}
-static int
+static boolean
identity_screen_fence_finish(struct pipe_screen *_screen,
struct pipe_fence_handle *fence,
- unsigned flags)
+ uint64_t timeout)
{
struct identity_screen *id_screen = identity_screen(_screen);
struct pipe_screen *screen = id_screen->screen;
return screen->fence_finish(screen,
fence,
- flags);
+ timeout);
}
struct pipe_screen *
diff --git a/src/gallium/drivers/llvmpipe/README b/src/gallium/drivers/llvmpipe/README
index e9374cc6efa..1fc7746a834 100644
--- a/src/gallium/drivers/llvmpipe/README
+++ b/src/gallium/drivers/llvmpipe/README
@@ -12,7 +12,7 @@ Requirements
See /proc/cpuinfo to know what your CPU supports.
- - LLVM 2.6 (or later)
+ - LLVM. Version 2.8 recommended. 2.6 or later required.
For Linux, on a recent Debian based distribution do:
@@ -30,21 +30,8 @@ Requirements
debug=no. This is necessary as LLVM builds as static library so the chosen
MS CRT must match.
- The version of LLVM from SVN ("2.7svn") from mid-March 2010 is pretty
- stable and has some features not in version 2.6.
-
- scons (optional)
- - udis86, http://udis86.sourceforge.net/ (optional). My personal repository
- supports more opcodes which haven't been merged upstream yet:
-
- git clone git://anongit.freedesktop.org/~jrfonseca/udis86
- cd udis86
- ./autogen.sh
- ./configure --with-pic
- make
- sudo make install
-
Building
========
@@ -94,13 +81,7 @@ that no tail call optimizations are done by gcc.
To better profile JIT code you'll need to build LLVM with oprofile integration.
- source_dir=$PWD/llvm-2.6
- build_dir=$source_dir/build/profile
- install_dir=$source_dir-profile
-
- mkdir -p "$build_dir"
- cd "$build_dir" && \
- $source_dir/configure \
+ ./configure \
--prefix=$install_dir \
--enable-optimized \
--disable-profiling \
diff --git a/src/gallium/drivers/llvmpipe/SConscript b/src/gallium/drivers/llvmpipe/SConscript
index 26b258b9569..c10a8cbc12c 100644
--- a/src/gallium/drivers/llvmpipe/SConscript
+++ b/src/gallium/drivers/llvmpipe/SConscript
@@ -96,10 +96,15 @@ if env['platform'] != 'embedded':
tests.append('round')
for test in tests:
+ testname = 'lp_test_' + test
target = env.Program(
- target = 'lp_test_' + test,
- source = ['lp_test_' + test + '.c', 'lp_test_main.c'],
+ target = testname,
+ source = [testname + '.c', 'lp_test_main.c'],
)
env.InstallProgram(target)
+
+ # http://www.scons.org/wiki/UnitTests
+ alias = env.Alias(testname, [target], target[0].abspath)
+ AlwaysBuild(alias)
Export('llvmpipe')
diff --git a/src/gallium/drivers/llvmpipe/lp_bld_alpha.h b/src/gallium/drivers/llvmpipe/lp_bld_alpha.h
index 5c9392504f1..06206a24d83 100644
--- a/src/gallium/drivers/llvmpipe/lp_bld_alpha.h
+++ b/src/gallium/drivers/llvmpipe/lp_bld_alpha.h
@@ -34,10 +34,12 @@
#ifndef LP_BLD_ALPHA_H
#define LP_BLD_ALPHA_H
+#include "pipe/p_compiler.h"
#include "gallivm/lp_bld.h"
struct pipe_alpha_state;
+struct gallivm_state;
struct lp_type;
struct lp_build_mask_context;
diff --git a/src/gallium/drivers/llvmpipe/lp_bld_depth.h b/src/gallium/drivers/llvmpipe/lp_bld_depth.h
index 038b136a281..e01fc46ec16 100644
--- a/src/gallium/drivers/llvmpipe/lp_bld_depth.h
+++ b/src/gallium/drivers/llvmpipe/lp_bld_depth.h
@@ -36,10 +36,14 @@
#define LP_BLD_DEPTH_H
+#include "pipe/p_compiler.h"
+#include "pipe/p_state.h"
+
#include "gallivm/lp_bld.h"
struct pipe_depth_state;
+struct gallivm_state;
struct util_format_description;
struct lp_type;
struct lp_build_mask_context;
diff --git a/src/gallium/drivers/llvmpipe/lp_context.c b/src/gallium/drivers/llvmpipe/lp_context.c
index 2de20d6e9a3..8a5655d4996 100644
--- a/src/gallium/drivers/llvmpipe/lp_context.c
+++ b/src/gallium/drivers/llvmpipe/lp_context.c
@@ -125,6 +125,10 @@ static void llvmpipe_destroy( struct pipe_context *pipe )
}
}
+ for (i = 0; i < llvmpipe->num_vertex_buffers; i++) {
+ pipe_resource_reference(&llvmpipe->vertex_buffer[i].buffer, NULL);
+ }
+
gallivm_destroy(llvmpipe->gallivm);
align_free( llvmpipe );
@@ -132,10 +136,9 @@ static void llvmpipe_destroy( struct pipe_context *pipe )
static void
do_flush( struct pipe_context *pipe,
- unsigned flags,
struct pipe_fence_handle **fence)
{
- llvmpipe_flush(pipe, flags, fence, __FUNCTION__);
+ llvmpipe_flush(pipe, fence, __FUNCTION__);
}
diff --git a/src/gallium/drivers/llvmpipe/lp_fence.c b/src/gallium/drivers/llvmpipe/lp_fence.c
index 3a55e76bc35..a21a3c74484 100644
--- a/src/gallium/drivers/llvmpipe/lp_fence.c
+++ b/src/gallium/drivers/llvmpipe/lp_fence.c
@@ -47,6 +47,9 @@ lp_fence_create(unsigned rank)
static int fence_id;
struct lp_fence *fence = CALLOC_STRUCT(lp_fence);
+ if (!fence)
+ return NULL;
+
pipe_reference_init(&fence->reference, 1);
pipe_mutex_init(fence->mutex);
diff --git a/src/gallium/drivers/llvmpipe/lp_flush.c b/src/gallium/drivers/llvmpipe/lp_flush.c
index 85e3cdec82c..42430550ea6 100644
--- a/src/gallium/drivers/llvmpipe/lp_flush.c
+++ b/src/gallium/drivers/llvmpipe/lp_flush.c
@@ -40,12 +40,10 @@
/**
- * \param flags bitmask of PIPE_FLUSH_x flags
* \param fence if non-null, returns pointer to a fence which can be waited on
*/
void
llvmpipe_flush( struct pipe_context *pipe,
- unsigned flags,
struct pipe_fence_handle **fence,
const char *reason)
{
@@ -54,7 +52,7 @@ llvmpipe_flush( struct pipe_context *pipe,
draw_flush(llvmpipe->draw);
/* ask the setup module to flush */
- lp_setup_flush(llvmpipe->setup, flags, fence, reason);
+ lp_setup_flush(llvmpipe->setup, fence, reason);
if (llvmpipe_variant_count > 1000) {
@@ -65,23 +63,21 @@ llvmpipe_flush( struct pipe_context *pipe,
/* Enable to dump BMPs of the color/depth buffers each frame */
if (0) {
- if (flags & PIPE_FLUSH_FRAME) {
- static unsigned frame_no = 1;
- char filename[256];
- unsigned i;
-
- for (i = 0; i < llvmpipe->framebuffer.nr_cbufs; i++) {
- util_snprintf(filename, sizeof(filename), "cbuf%u_%u", i, frame_no);
- debug_dump_surface_bmp(&llvmpipe->pipe, filename, llvmpipe->framebuffer.cbufs[0]);
- }
-
- if (0) {
- util_snprintf(filename, sizeof(filename), "zsbuf_%u", frame_no);
- debug_dump_surface_bmp(&llvmpipe->pipe, filename, llvmpipe->framebuffer.zsbuf);
- }
-
- ++frame_no;
+ static unsigned frame_no = 1;
+ char filename[256];
+ unsigned i;
+
+ for (i = 0; i < llvmpipe->framebuffer.nr_cbufs; i++) {
+ util_snprintf(filename, sizeof(filename), "cbuf%u_%u", i, frame_no);
+ debug_dump_surface_bmp(&llvmpipe->pipe, filename, llvmpipe->framebuffer.cbufs[i]);
+ }
+
+ if (0) {
+ util_snprintf(filename, sizeof(filename), "zsbuf_%u", frame_no);
+ debug_dump_surface_bmp(&llvmpipe->pipe, filename, llvmpipe->framebuffer.zsbuf);
}
+
+ ++frame_no;
}
}
@@ -90,9 +86,9 @@ llvmpipe_finish( struct pipe_context *pipe,
const char *reason )
{
struct pipe_fence_handle *fence = NULL;
- llvmpipe_flush(pipe, 0, &fence, reason);
+ llvmpipe_flush(pipe, &fence, reason);
if (fence) {
- pipe->screen->fence_finish(pipe->screen, fence, 0);
+ pipe->screen->fence_finish(pipe->screen, fence, PIPE_TIMEOUT_INFINITE);
pipe->screen->fence_reference(pipe->screen, &fence, NULL);
}
}
@@ -110,7 +106,6 @@ llvmpipe_flush_resource(struct pipe_context *pipe,
struct pipe_resource *resource,
unsigned level,
int layer,
- unsigned flush_flags,
boolean read_only,
boolean cpu_access,
boolean do_not_block,
@@ -118,10 +113,10 @@ llvmpipe_flush_resource(struct pipe_context *pipe,
{
unsigned referenced;
- referenced = pipe->is_resource_referenced(pipe, resource, level, layer);
+ referenced = llvmpipe_is_resource_referenced(pipe, resource, level, layer);
- if ((referenced & PIPE_REFERENCED_FOR_WRITE) ||
- ((referenced & PIPE_REFERENCED_FOR_READ) && !read_only)) {
+ if ((referenced & LP_REFERENCED_FOR_WRITE) ||
+ ((referenced & LP_REFERENCED_FOR_READ) && !read_only)) {
if (cpu_access) {
/*
@@ -136,7 +131,7 @@ llvmpipe_flush_resource(struct pipe_context *pipe,
* Just flush.
*/
- llvmpipe_flush(pipe, flush_flags, NULL, reason);
+ llvmpipe_flush(pipe, NULL, reason);
}
}
diff --git a/src/gallium/drivers/llvmpipe/lp_flush.h b/src/gallium/drivers/llvmpipe/lp_flush.h
index 579d24c68ad..efff94c8c0c 100644
--- a/src/gallium/drivers/llvmpipe/lp_flush.h
+++ b/src/gallium/drivers/llvmpipe/lp_flush.h
@@ -36,7 +36,6 @@ struct pipe_resource;
void
llvmpipe_flush(struct pipe_context *pipe,
- unsigned flags,
struct pipe_fence_handle **fence,
const char *reason);
@@ -49,7 +48,6 @@ llvmpipe_flush_resource(struct pipe_context *pipe,
struct pipe_resource *resource,
unsigned level,
int layer,
- unsigned flush_flags,
boolean read_only,
boolean cpu_access,
boolean do_not_block,
diff --git a/src/gallium/drivers/llvmpipe/lp_jit.c b/src/gallium/drivers/llvmpipe/lp_jit.c
index a775990f92a..482a902dd23 100644
--- a/src/gallium/drivers/llvmpipe/lp_jit.c
+++ b/src/gallium/drivers/llvmpipe/lp_jit.c
@@ -36,9 +36,7 @@
#include "util/u_memory.h"
#include "gallivm/lp_bld_init.h"
#include "gallivm/lp_bld_debug.h"
-#include "gallivm/lp_bld_intr.h"
#include "lp_context.h"
-#include "lp_screen.h"
#include "lp_jit.h"
diff --git a/src/gallium/drivers/llvmpipe/lp_perf.h b/src/gallium/drivers/llvmpipe/lp_perf.h
index b23a100b873..455adf7d6f8 100644
--- a/src/gallium/drivers/llvmpipe/lp_perf.h
+++ b/src/gallium/drivers/llvmpipe/lp_perf.h
@@ -33,6 +33,7 @@
#ifndef LP_PERF_H
#define LP_PERF_H
+#include "pipe/p_compiler.h"
/**
* Various counters
diff --git a/src/gallium/drivers/llvmpipe/lp_query.c b/src/gallium/drivers/llvmpipe/lp_query.c
index 84c66dd36e8..1e2401fa84d 100644
--- a/src/gallium/drivers/llvmpipe/lp_query.c
+++ b/src/gallium/drivers/llvmpipe/lp_query.c
@@ -69,7 +69,7 @@ llvmpipe_destroy_query(struct pipe_context *pipe, struct pipe_query *q)
*/
if (pq->fence) {
if (!lp_fence_issued(pq->fence))
- llvmpipe_flush(pipe, 0, NULL, __FUNCTION__);
+ llvmpipe_flush(pipe, NULL, __FUNCTION__);
if (!lp_fence_signalled(pq->fence))
lp_fence_wait(pq->fence);
@@ -99,7 +99,7 @@ llvmpipe_get_query_result(struct pipe_context *pipe,
if (!lp_fence_signalled(pq->fence)) {
if (!lp_fence_issued(pq->fence))
- llvmpipe_flush(pipe, 0, NULL, __FUNCTION__);
+ llvmpipe_flush(pipe, NULL, __FUNCTION__);
if (!wait)
return FALSE;
diff --git a/src/gallium/drivers/llvmpipe/lp_scene.c b/src/gallium/drivers/llvmpipe/lp_scene.c
index 978d17c5754..5d0f5f8b7b5 100644
--- a/src/gallium/drivers/llvmpipe/lp_scene.c
+++ b/src/gallium/drivers/llvmpipe/lp_scene.c
@@ -74,6 +74,7 @@ lp_scene_create( struct pipe_context *pipe )
void
lp_scene_destroy(struct lp_scene *scene)
{
+ lp_fence_reference(&scene->fence, NULL);
pipe_mutex_destroy(scene->mutex);
assert(scene->data.head->next == NULL);
FREE(scene->data.head);
diff --git a/src/gallium/drivers/llvmpipe/lp_scene_queue.h b/src/gallium/drivers/llvmpipe/lp_scene_queue.h
index fd7c65a2c8b..dd9ab593b4a 100644
--- a/src/gallium/drivers/llvmpipe/lp_scene_queue.h
+++ b/src/gallium/drivers/llvmpipe/lp_scene_queue.h
@@ -29,6 +29,8 @@
#ifndef LP_SCENE_QUEUE
#define LP_SCENE_QUEUE
+#include "pipe/p_compiler.h"
+
struct lp_scene_queue;
struct lp_scene;
diff --git a/src/gallium/drivers/llvmpipe/lp_screen.c b/src/gallium/drivers/llvmpipe/lp_screen.c
index 9459a3cd113..521a52ad3ae 100644
--- a/src/gallium/drivers/llvmpipe/lp_screen.c
+++ b/src/gallium/drivers/llvmpipe/lp_screen.c
@@ -151,7 +151,7 @@ llvmpipe_get_param(struct pipe_screen *screen, enum pipe_cap param)
case PIPE_CAP_INDEP_BLEND_ENABLE:
return 1;
case PIPE_CAP_INDEP_BLEND_FUNC:
- return 0;
+ return 1;
case PIPE_CAP_TGSI_FS_COORD_ORIGIN_UPPER_LEFT:
case PIPE_CAP_TGSI_FS_COORD_PIXEL_CENTER_INTEGER:
return 1;
@@ -164,6 +164,9 @@ llvmpipe_get_param(struct pipe_screen *screen, enum pipe_cap param)
return 1;
case PIPE_CAP_DEPTH_CLAMP:
return 0;
+ case PIPE_CAP_TGSI_INSTANCEID:
+ case PIPE_CAP_VERTEX_ELEMENT_INSTANCE_DIVISOR:
+ return 1;
default:
return 0;
}
@@ -222,8 +225,7 @@ llvmpipe_is_format_supported( struct pipe_screen *_screen,
enum pipe_format format,
enum pipe_texture_target target,
unsigned sample_count,
- unsigned bind,
- unsigned geom_flags )
+ unsigned bind)
{
struct llvmpipe_screen *screen = llvmpipe_screen(_screen);
struct sw_winsys *winsys = screen->winsys;
@@ -276,6 +278,11 @@ llvmpipe_is_format_supported( struct pipe_screen *_screen,
return util_format_s3tc_enabled;
}
+ /* u_format doesn't support RGTC yet */
+ if (format_desc->layout == UTIL_FORMAT_LAYOUT_RGTC) {
+ return FALSE;
+ }
+
/*
* Everything else should be supported by u_format.
*/
@@ -341,10 +348,9 @@ llvmpipe_fence_reference(struct pipe_screen *screen,
/**
* Has the fence been executed/finished?
*/
-static int
+static boolean
llvmpipe_fence_signalled(struct pipe_screen *screen,
- struct pipe_fence_handle *fence,
- unsigned flag)
+ struct pipe_fence_handle *fence)
{
struct lp_fence *f = (struct lp_fence *) fence;
return lp_fence_signalled(f);
@@ -354,15 +360,15 @@ llvmpipe_fence_signalled(struct pipe_screen *screen,
/**
* Wait for the fence to finish.
*/
-static int
+static boolean
llvmpipe_fence_finish(struct pipe_screen *screen,
struct pipe_fence_handle *fence_handle,
- unsigned flag)
+ uint64_t timeout)
{
struct lp_fence *f = (struct lp_fence *) fence_handle;
lp_fence_wait(f);
- return 0;
+ return TRUE;
}
diff --git a/src/gallium/drivers/llvmpipe/lp_setup.c b/src/gallium/drivers/llvmpipe/lp_setup.c
index db04c84efb5..3813e0ed972 100644
--- a/src/gallium/drivers/llvmpipe/lp_setup.c
+++ b/src/gallium/drivers/llvmpipe/lp_setup.c
@@ -333,12 +333,8 @@ fail:
}
-/**
- * \param flags bitmask of PIPE_FLUSH_x flags
- */
void
lp_setup_flush( struct lp_setup_context *setup,
- unsigned flags,
struct pipe_fence_handle **fence,
const char *reason)
{
@@ -469,7 +465,7 @@ lp_setup_clear( struct lp_setup_context *setup,
unsigned flags )
{
if (!lp_setup_try_clear( setup, color, depth, stencil, flags )) {
- lp_setup_flush(setup, 0, NULL, __FUNCTION__);
+ lp_setup_flush(setup, NULL, __FUNCTION__);
if (!lp_setup_try_clear( setup, color, depth, stencil, flags ))
assert(0);
@@ -753,20 +749,20 @@ lp_setup_is_resource_referenced( const struct lp_setup_context *setup,
/* check the render targets */
for (i = 0; i < setup->fb.nr_cbufs; i++) {
if (setup->fb.cbufs[i]->texture == texture)
- return PIPE_REFERENCED_FOR_READ | PIPE_REFERENCED_FOR_WRITE;
+ return LP_REFERENCED_FOR_READ | LP_REFERENCED_FOR_WRITE;
}
if (setup->fb.zsbuf && setup->fb.zsbuf->texture == texture) {
- return PIPE_REFERENCED_FOR_READ | PIPE_REFERENCED_FOR_WRITE;
+ return LP_REFERENCED_FOR_READ | LP_REFERENCED_FOR_WRITE;
}
/* check textures referenced by the scene */
for (i = 0; i < Elements(setup->scenes); i++) {
if (lp_scene_is_resource_referenced(setup->scenes[i], texture)) {
- return PIPE_REFERENCED_FOR_READ;
+ return LP_REFERENCED_FOR_READ;
}
}
- return PIPE_UNREFERENCED;
+ return LP_UNREFERENCED;
}
@@ -996,6 +992,8 @@ lp_setup_destroy( struct lp_setup_context *setup )
lp_scene_destroy(scene);
}
+ lp_fence_reference(&setup->last_fence, NULL);
+
FREE( setup );
}
@@ -1062,6 +1060,8 @@ lp_setup_begin_query(struct lp_setup_context *setup,
{
/* init the query to its beginning state */
assert(setup->active_query == NULL);
+
+ set_scene_state(setup, SETUP_ACTIVE, "begin_query");
if (setup->scene) {
if (!lp_scene_bin_everywhere(setup->scene,
@@ -1091,6 +1091,8 @@ lp_setup_end_query(struct lp_setup_context *setup, struct llvmpipe_query *pq)
{
union lp_rast_cmd_arg dummy = { 0 };
+ set_scene_state(setup, SETUP_ACTIVE, "end_query");
+
assert(setup->active_query == pq);
setup->active_query = NULL;
@@ -1108,7 +1110,7 @@ lp_setup_end_query(struct lp_setup_context *setup, struct llvmpipe_query *pq)
if (!lp_scene_bin_everywhere(setup->scene,
LP_RAST_OP_END_QUERY,
dummy)) {
- lp_setup_flush(setup, 0, NULL, __FUNCTION__);
+ lp_setup_flush(setup, NULL, __FUNCTION__);
}
}
else {
diff --git a/src/gallium/drivers/llvmpipe/lp_setup.h b/src/gallium/drivers/llvmpipe/lp_setup.h
index 0d6e161a218..8655259d27c 100644
--- a/src/gallium/drivers/llvmpipe/lp_setup.h
+++ b/src/gallium/drivers/llvmpipe/lp_setup.h
@@ -64,7 +64,6 @@ lp_setup_clear(struct lp_setup_context *setup,
void
lp_setup_flush( struct lp_setup_context *setup,
- unsigned flags,
struct pipe_fence_handle **fence,
const char *reason);
diff --git a/src/gallium/drivers/llvmpipe/lp_state_fs.c b/src/gallium/drivers/llvmpipe/lp_state_fs.c
index 2c4943a69f6..6243a96f454 100644
--- a/src/gallium/drivers/llvmpipe/lp_state_fs.c
+++ b/src/gallium/drivers/llvmpipe/lp_state_fs.c
@@ -90,7 +90,6 @@
#include "lp_context.h"
#include "lp_debug.h"
#include "lp_perf.h"
-#include "lp_screen.h"
#include "lp_setup.h"
#include "lp_state.h"
#include "lp_tex_sample.h"
@@ -335,7 +334,8 @@ generate_fs(struct gallivm_state *gallivm,
/* Build the actual shader */
lp_build_tgsi_soa(gallivm, tokens, type, &mask,
- consts_ptr, interp->pos, interp->inputs,
+ consts_ptr, NULL, /* sys values array */
+ interp->pos, interp->inputs,
outputs, sampler, &shader->info.base);
/* Alpha test */
@@ -546,6 +546,7 @@ generate_fragment(struct llvmpipe_context *lp,
unsigned i;
unsigned chan;
unsigned cbuf;
+ boolean cbuf0_write_all;
/* Adjust color input interpolation according to flatshade state:
*/
@@ -559,6 +560,15 @@ generate_fragment(struct llvmpipe_context *lp,
}
}
+ /* check if writes to cbuf[0] are to be copied to all cbufs */
+ cbuf0_write_all = FALSE;
+ for (i = 0;i < shader->info.base.num_properties; i++) {
+ if (shader->info.base.properties[i].name ==
+ TGSI_PROPERTY_FS_COLOR0_WRITES_ALL_CBUFS) {
+ cbuf0_write_all = TRUE;
+ break;
+ }
+ }
/* TODO: actually pick these based on the fs and color buffer
* characteristics. */
@@ -697,9 +707,10 @@ generate_fragment(struct llvmpipe_context *lp,
mask_input,
counter);
- for(cbuf = 0; cbuf < key->nr_cbufs; cbuf++)
- for(chan = 0; chan < NUM_CHANNELS; ++chan)
- fs_out_color[cbuf][chan][i] = out_color[cbuf][chan];
+ for (cbuf = 0; cbuf < key->nr_cbufs; cbuf++)
+ for (chan = 0; chan < NUM_CHANNELS; ++chan)
+ fs_out_color[cbuf][chan][i] =
+ out_color[cbuf * !cbuf0_write_all][chan];
}
sampler->destroy(sampler);
diff --git a/src/gallium/drivers/llvmpipe/lp_state_setup.c b/src/gallium/drivers/llvmpipe/lp_state_setup.c
index ad751b9ef42..9f1ec146e9d 100644
--- a/src/gallium/drivers/llvmpipe/lp_state_setup.c
+++ b/src/gallium/drivers/llvmpipe/lp_state_setup.c
@@ -651,7 +651,7 @@ generate_setup_variant(struct gallivm_state *gallivm,
LLVMTypeRef arg_types[7];
LLVMBasicBlockRef block;
LLVMBuilderRef builder = gallivm->builder;
- int64_t t0, t1;
+ int64_t t0 = 0, t1;
if (0)
goto fail;
diff --git a/src/gallium/drivers/llvmpipe/lp_state_vertex.c b/src/gallium/drivers/llvmpipe/lp_state_vertex.c
index fb29423dd35..be86f66de91 100644
--- a/src/gallium/drivers/llvmpipe/lp_state_vertex.c
+++ b/src/gallium/drivers/llvmpipe/lp_state_vertex.c
@@ -33,6 +33,8 @@
#include "lp_state.h"
#include "draw/draw_context.h"
+#include "util/u_inlines.h"
+#include "util/u_transfer.h"
static void *
@@ -80,8 +82,9 @@ llvmpipe_set_vertex_buffers(struct pipe_context *pipe,
assert(count <= PIPE_MAX_ATTRIBS);
- memcpy(llvmpipe->vertex_buffer, buffers, count * sizeof(buffers[0]));
- llvmpipe->num_vertex_buffers = count;
+ util_copy_vertex_buffers(llvmpipe->vertex_buffer,
+ &llvmpipe->num_vertex_buffers,
+ buffers, count);
llvmpipe->dirty |= LP_NEW_VERTEX;
@@ -112,4 +115,6 @@ llvmpipe_init_vertex_funcs(struct llvmpipe_context *llvmpipe)
llvmpipe->pipe.set_vertex_buffers = llvmpipe_set_vertex_buffers;
llvmpipe->pipe.set_index_buffer = llvmpipe_set_index_buffer;
+
+ llvmpipe->pipe.redefine_user_buffer = u_default_redefine_user_buffer;
}
diff --git a/src/gallium/drivers/llvmpipe/lp_surface.c b/src/gallium/drivers/llvmpipe/lp_surface.c
index e7e46a628a1..f49638acf08 100644
--- a/src/gallium/drivers/llvmpipe/lp_surface.c
+++ b/src/gallium/drivers/llvmpipe/lp_surface.c
@@ -69,7 +69,6 @@ lp_resource_copy(struct pipe_context *pipe,
llvmpipe_flush_resource(pipe,
dst, dst_level, dstz,
- 0, /* flush_flags */
FALSE, /* read_only */
TRUE, /* cpu_access */
FALSE, /* do_not_block */
@@ -77,7 +76,6 @@ lp_resource_copy(struct pipe_context *pipe,
llvmpipe_flush_resource(pipe,
src, src_level, src_box->z,
- 0, /* flush_flags */
TRUE, /* read_only */
TRUE, /* cpu_access */
FALSE, /* do_not_block */
diff --git a/src/gallium/drivers/llvmpipe/lp_test_main.c b/src/gallium/drivers/llvmpipe/lp_test_main.c
index 149ee6f1256..d229c620310 100644
--- a/src/gallium/drivers/llvmpipe/lp_test_main.c
+++ b/src/gallium/drivers/llvmpipe/lp_test_main.c
@@ -35,24 +35,13 @@
#include "util/u_cpu_detect.h"
+#include "util/u_math.h"
#include "gallivm/lp_bld_const.h"
#include "gallivm/lp_bld_init.h"
#include "lp_test.h"
-#ifdef PIPE_CC_MSVC
-static INLINE double
-round(double x)
-{
- if (x >= 0.0)
- return floor(x + 0.5);
- else
- return ceil(x - 0.5);
-}
-#endif
-
-
void
dump_type(FILE *fp,
struct lp_type type)
diff --git a/src/gallium/drivers/llvmpipe/lp_texture.c b/src/gallium/drivers/llvmpipe/lp_texture.c
index 9753da5e57e..fa4ce5bf2ac 100644
--- a/src/gallium/drivers/llvmpipe/lp_texture.c
+++ b/src/gallium/drivers/llvmpipe/lp_texture.c
@@ -575,7 +575,6 @@ llvmpipe_get_transfer(struct pipe_context *pipe,
if (!llvmpipe_flush_resource(pipe, resource,
level,
box->depth > 1 ? -1 : box->z,
- 0, /* flush_flags */
read_only,
TRUE, /* cpu_access */
do_not_block,
@@ -695,7 +694,7 @@ llvmpipe_transfer_unmap(struct pipe_context *pipe,
transfer->box.z);
}
-static unsigned int
+unsigned int
llvmpipe_is_resource_referenced( struct pipe_context *pipe,
struct pipe_resource *presource,
unsigned level, int layer)
@@ -703,7 +702,7 @@ llvmpipe_is_resource_referenced( struct pipe_context *pipe,
struct llvmpipe_context *llvmpipe = llvmpipe_context( pipe );
if (presource->target == PIPE_BUFFER)
- return PIPE_UNREFERENCED;
+ return LP_UNREFERENCED;
return lp_setup_is_resource_referenced(llvmpipe->setup, presource);
}
@@ -1401,7 +1400,6 @@ llvmpipe_init_context_resource_funcs(struct pipe_context *pipe)
pipe->transfer_destroy = llvmpipe_transfer_destroy;
pipe->transfer_map = llvmpipe_transfer_map;
pipe->transfer_unmap = llvmpipe_transfer_unmap;
- pipe->is_resource_referenced = llvmpipe_is_resource_referenced;
pipe->transfer_flush_region = u_default_transfer_flush_region;
pipe->transfer_inline_write = u_default_transfer_inline_write;
diff --git a/src/gallium/drivers/llvmpipe/lp_texture.h b/src/gallium/drivers/llvmpipe/lp_texture.h
index b789c0f4090..b4a0dfd1c36 100644
--- a/src/gallium/drivers/llvmpipe/lp_texture.h
+++ b/src/gallium/drivers/llvmpipe/lp_texture.h
@@ -243,4 +243,14 @@ llvmpipe_init_screen_texture_funcs(struct pipe_screen *screen);
extern void
llvmpipe_init_context_texture_funcs(struct pipe_context *pipe);
+
+#define LP_UNREFERENCED 0
+#define LP_REFERENCED_FOR_READ (1 << 0)
+#define LP_REFERENCED_FOR_WRITE (1 << 1)
+
+unsigned int
+llvmpipe_is_resource_referenced( struct pipe_context *pipe,
+ struct pipe_resource *presource,
+ unsigned level, int layer);
+
#endif /* LP_TEXTURE_H */
diff --git a/src/gallium/drivers/noop/noop_pipe.c b/src/gallium/drivers/noop/noop_pipe.c
index c9c463f470f..496b7f5ec6d 100644
--- a/src/gallium/drivers/noop/noop_pipe.c
+++ b/src/gallium/drivers/noop/noop_pipe.c
@@ -30,10 +30,16 @@
#include <util/u_inlines.h>
#include <util/u_format.h>
#include "noop_public.h"
-#include "state_tracker/sw_winsys.h"
+
+DEBUG_GET_ONCE_BOOL_OPTION(noop, "GALLIUM_NOOP", FALSE)
void noop_init_state_functions(struct pipe_context *ctx);
+struct noop_pipe_screen {
+ struct pipe_screen pscreen;
+ struct pipe_screen *oscreen;
+};
+
/*
* query
*/
@@ -81,13 +87,6 @@ struct noop_resource {
struct sw_displaytarget *dt;
};
-static unsigned noop_is_resource_referenced(struct pipe_context *pipe,
- struct pipe_resource *resource,
- unsigned level, int layer)
-{
- return PIPE_UNREFERENCED;
-}
-
static struct pipe_resource *noop_resource_create(struct pipe_screen *screen,
const struct pipe_resource *templ)
{
@@ -108,52 +107,29 @@ static struct pipe_resource *noop_resource_create(struct pipe_screen *screen,
FREE(nresource);
return NULL;
}
-#if 0
- if (nresource->base.bind & (PIPE_BIND_DISPLAY_TARGET |
- PIPE_BIND_SCANOUT |
- PIPE_BIND_SHARED)) {
- struct sw_winsys *winsys = (struct sw_winsys *)screen->winsys;
- unsigned stride;
-
- nresource->dt = winsys->displaytarget_create(winsys, nresource->base.bind,
- nresource->base.format,
- nresource->base.width0,
- nresource->base.height0,
- 16, &stride);
- }
-#endif
return &nresource->base;
}
-static struct pipe_resource *noop_resource_from_handle(struct pipe_screen * screen,
+static struct pipe_resource *noop_resource_from_handle(struct pipe_screen *screen,
const struct pipe_resource *templ,
- struct winsys_handle *whandle)
+ struct winsys_handle *handle)
{
- struct sw_winsys *winsys = (struct sw_winsys *)screen->winsys;
- struct noop_resource *nresource;
- struct sw_displaytarget *dt;
- unsigned stride;
+ struct noop_pipe_screen *noop_screen = (struct noop_pipe_screen*)screen;
+ struct pipe_screen *oscreen = noop_screen->oscreen;
+ struct pipe_resource *result;
+ struct pipe_resource *noop_resource;
- dt = winsys->displaytarget_from_handle(winsys, templ, whandle, &stride);
- if (dt == NULL) {
- return NULL;
- }
- nresource = (struct noop_resource *)noop_resource_create(screen, templ);
- nresource->dt = dt;
- return &nresource->base;
+ result = oscreen->resource_from_handle(oscreen, templ, handle);
+ noop_resource = noop_resource_create(screen, result);
+ pipe_resource_reference(&result, NULL);
+ return noop_resource;
}
static boolean noop_resource_get_handle(struct pipe_screen *screen,
struct pipe_resource *resource,
struct winsys_handle *handle)
{
- struct sw_winsys *winsys = (struct sw_winsys *)screen->winsys;
- struct noop_resource *nresource = (struct noop_resource *)resource;
-
- if (nresource->dt == NULL)
- return FALSE;
-
- return winsys->displaytarget_get_handle(winsys, nresource->dt, handle);
+ return FALSE;
}
static void noop_resource_destroy(struct pipe_screen *screen,
@@ -161,11 +137,6 @@ static void noop_resource_destroy(struct pipe_screen *screen,
{
struct noop_resource *nresource = (struct noop_resource *)resource;
- if (nresource->dt) {
- /* display target */
- struct sw_winsys *winsys = (struct sw_winsys *)screen->winsys;
- winsys->displaytarget_destroy(winsys, nresource->dt);
- }
free(nresource->data);
FREE(resource);
}
@@ -289,7 +260,7 @@ static void noop_resource_copy_region(struct pipe_context *ctx,
/*
* context
*/
-static void noop_flush(struct pipe_context *ctx, unsigned flags,
+static void noop_flush(struct pipe_context *ctx,
struct pipe_fence_handle **fence)
{
}
@@ -325,7 +296,6 @@ static struct pipe_context *noop_create_context(struct pipe_screen *screen, void
ctx->transfer_unmap = noop_transfer_unmap;
ctx->transfer_destroy = noop_transfer_destroy;
ctx->transfer_inline_write = noop_transfer_inline_write;
- ctx->is_resource_referenced = noop_is_resource_referenced;
noop_init_state_functions(ctx);
return ctx;
@@ -475,27 +445,37 @@ static boolean noop_is_format_supported(struct pipe_screen* screen,
enum pipe_format format,
enum pipe_texture_target target,
unsigned sample_count,
- unsigned usage,
- unsigned geom_flags)
+ unsigned usage)
{
return true;
}
static void noop_destroy_screen(struct pipe_screen *screen)
{
+ struct noop_pipe_screen *noop_screen = (struct noop_pipe_screen*)screen;
+ struct pipe_screen *oscreen = noop_screen->oscreen;
+
+ oscreen->destroy(oscreen);
FREE(screen);
}
-struct pipe_screen *noop_screen_create(struct sw_winsys *winsys)
+struct pipe_screen *noop_screen_create(struct pipe_screen *oscreen)
{
+ struct noop_pipe_screen *noop_screen;
struct pipe_screen *screen;
- screen = CALLOC_STRUCT(pipe_screen);
- if (screen == NULL) {
+ if (!debug_get_option_noop()) {
+ return oscreen;
+ }
+
+ noop_screen = CALLOC_STRUCT(noop_pipe_screen);
+ if (noop_screen == NULL) {
return NULL;
}
+ noop_screen->oscreen = oscreen;
+ screen = &noop_screen->pscreen;
- screen->winsys = (struct pipe_winsys*)winsys;
+ screen->winsys = oscreen->winsys;
screen->destroy = noop_destroy_screen;
screen->get_name = noop_get_name;
screen->get_vendor = noop_get_vendor;
diff --git a/src/gallium/drivers/noop/noop_public.h b/src/gallium/drivers/noop/noop_public.h
index 8ce82bec698..180ea597fab 100644
--- a/src/gallium/drivers/noop/noop_public.h
+++ b/src/gallium/drivers/noop/noop_public.h
@@ -23,8 +23,7 @@
#ifndef NOOP_PUBLIC_H
#define NOOP_PUBLIC_H
-struct sw_winsys;
-
-struct pipe_screen *noop_screen_create(struct sw_winsys *winsys);
+struct pipe_screen;
+struct pipe_screen *noop_screen_create(struct pipe_screen *screen);
#endif
diff --git a/src/gallium/drivers/noop/noop_state.c b/src/gallium/drivers/noop/noop_state.c
index ad324774c03..00a4c1eb01e 100644
--- a/src/gallium/drivers/noop/noop_state.c
+++ b/src/gallium/drivers/noop/noop_state.c
@@ -28,6 +28,7 @@
#include <pipe/p_screen.h>
#include <util/u_memory.h>
#include <util/u_inlines.h>
+#include "util/u_transfer.h"
static void noop_draw_vbo(struct pipe_context *ctx, const struct pipe_draw_info *info)
{
@@ -287,4 +288,5 @@ void noop_init_state_functions(struct pipe_context *ctx)
ctx->sampler_view_destroy = noop_sampler_view_destroy;
ctx->surface_destroy = noop_surface_destroy;
ctx->draw_vbo = noop_draw_vbo;
+ ctx->redefine_user_buffer = u_default_redefine_user_buffer;
}
diff --git a/src/gallium/drivers/nouveau/Makefile b/src/gallium/drivers/nouveau/Makefile
index db591b756c4..3210d1ff77b 100644
--- a/src/gallium/drivers/nouveau/Makefile
+++ b/src/gallium/drivers/nouveau/Makefile
@@ -4,8 +4,12 @@ include $(TOP)/configs/current
LIBNAME = nouveau
LIBRARY_INCLUDES = \
+ $(LIBDRM_CFLAGS) \
-I$(TOP)/src/gallium/drivers/nouveau/include
-C_SOURCES = nouveau_screen.c
+C_SOURCES = nouveau_screen.c \
+ nouveau_fence.c \
+ nouveau_mm.c \
+ nouveau_buffer.c
include ../../Makefile.template
diff --git a/src/gallium/drivers/nouveau/nouveau_buffer.c b/src/gallium/drivers/nouveau/nouveau_buffer.c
new file mode 100644
index 00000000000..01d3aa46d0e
--- /dev/null
+++ b/src/gallium/drivers/nouveau/nouveau_buffer.c
@@ -0,0 +1,487 @@
+
+#include "util/u_inlines.h"
+#include "util/u_memory.h"
+#include "util/u_math.h"
+
+#include "nouveau_screen.h"
+#include "nouveau_context.h"
+#include "nouveau_winsys.h"
+#include "nouveau_fence.h"
+#include "nouveau_buffer.h"
+#include "nouveau_mm.h"
+
+struct nouveau_transfer {
+ struct pipe_transfer base;
+};
+
+static INLINE struct nouveau_transfer *
+nouveau_transfer(struct pipe_transfer *transfer)
+{
+ return (struct nouveau_transfer *)transfer;
+}
+
+static INLINE boolean
+nouveau_buffer_allocate(struct nouveau_screen *screen,
+ struct nv04_resource *buf, unsigned domain)
+{
+ if (domain == NOUVEAU_BO_VRAM) {
+ buf->mm = nouveau_mm_allocate(screen->mm_VRAM, buf->base.width0,
+ &buf->bo, &buf->offset);
+ if (!buf->bo)
+ return nouveau_buffer_allocate(screen, buf, NOUVEAU_BO_GART);
+ } else
+ if (domain == NOUVEAU_BO_GART) {
+ buf->mm = nouveau_mm_allocate(screen->mm_GART, buf->base.width0,
+ &buf->bo, &buf->offset);
+ if (!buf->bo)
+ return FALSE;
+ }
+ if (domain != NOUVEAU_BO_GART) {
+ if (!buf->data) {
+ buf->data = MALLOC(buf->base.width0);
+ if (!buf->data)
+ return FALSE;
+ }
+ }
+ buf->domain = domain;
+ return TRUE;
+}
+
+static INLINE void
+release_allocation(struct nouveau_mm_allocation **mm,
+ struct nouveau_fence *fence)
+{
+ nouveau_fence_work(fence, nouveau_mm_free_work, *mm);
+ (*mm) = NULL;
+}
+
+INLINE void
+nouveau_buffer_release_gpu_storage(struct nv04_resource *buf)
+{
+ nouveau_bo_ref(NULL, &buf->bo);
+
+ if (buf->mm)
+ release_allocation(&buf->mm, buf->fence);
+
+ buf->domain = 0;
+}
+
+static INLINE boolean
+nouveau_buffer_reallocate(struct nouveau_screen *screen,
+ struct nv04_resource *buf, unsigned domain)
+{
+ nouveau_buffer_release_gpu_storage(buf);
+
+ return nouveau_buffer_allocate(screen, buf, domain);
+}
+
+static void
+nouveau_buffer_destroy(struct pipe_screen *pscreen,
+ struct pipe_resource *presource)
+{
+ struct nv04_resource *res = nv04_resource(presource);
+
+ nouveau_buffer_release_gpu_storage(res);
+
+ if (res->data && !(res->status & NOUVEAU_BUFFER_STATUS_USER_MEMORY))
+ FREE(res->data);
+
+ FREE(res);
+}
+
+/* Maybe just migrate to GART right away if we actually need to do this. */
+boolean
+nouveau_buffer_download(struct nouveau_context *nv, struct nv04_resource *buf,
+ unsigned start, unsigned size)
+{
+ struct nouveau_mm_allocation *mm;
+ struct nouveau_bo *bounce = NULL;
+ uint32_t offset;
+
+ assert(buf->domain == NOUVEAU_BO_VRAM);
+
+ mm = nouveau_mm_allocate(nv->screen->mm_GART, size, &bounce, &offset);
+ if (!bounce)
+ return FALSE;
+
+ nv->copy_data(nv, bounce, offset, NOUVEAU_BO_GART,
+ buf->bo, buf->offset + start, NOUVEAU_BO_VRAM, size);
+
+ if (nouveau_bo_map_range(bounce, offset, size, NOUVEAU_BO_RD))
+ return FALSE;
+ memcpy(buf->data + start, bounce->map, size);
+ nouveau_bo_unmap(bounce);
+
+ buf->status &= ~NOUVEAU_BUFFER_STATUS_GPU_WRITING;
+
+ nouveau_bo_ref(NULL, &bounce);
+ if (mm)
+ nouveau_mm_free(mm);
+ return TRUE;
+}
+
+static boolean
+nouveau_buffer_upload(struct nouveau_context *nv, struct nv04_resource *buf,
+ unsigned start, unsigned size)
+{
+ struct nouveau_mm_allocation *mm;
+ struct nouveau_bo *bounce = NULL;
+ uint32_t offset;
+
+ if (size <= 192) {
+ nv->push_data(nv, buf->bo, buf->offset + start, buf->domain,
+ size, buf->data + start);
+ return TRUE;
+ }
+
+ mm = nouveau_mm_allocate(nv->screen->mm_GART, size, &bounce, &offset);
+ if (!bounce)
+ return FALSE;
+
+ nouveau_bo_map_range(bounce, offset, size,
+ NOUVEAU_BO_WR | NOUVEAU_BO_NOSYNC);
+ memcpy(bounce->map, buf->data + start, size);
+ nouveau_bo_unmap(bounce);
+
+ nv->copy_data(nv, buf->bo, buf->offset + start, NOUVEAU_BO_VRAM,
+ bounce, offset, NOUVEAU_BO_GART, size);
+
+ nouveau_bo_ref(NULL, &bounce);
+ if (mm)
+ release_allocation(&mm, nv->screen->fence.current);
+
+ if (start == 0 && size == buf->base.width0)
+ buf->status &= ~NOUVEAU_BUFFER_STATUS_GPU_WRITING;
+ return TRUE;
+}
+
+static struct pipe_transfer *
+nouveau_buffer_transfer_get(struct pipe_context *pipe,
+ struct pipe_resource *resource,
+ unsigned level, unsigned usage,
+ const struct pipe_box *box)
+{
+ struct nv04_resource *buf = nv04_resource(resource);
+ struct nouveau_context *nv = nouveau_context(pipe);
+ struct nouveau_transfer *xfr = CALLOC_STRUCT(nouveau_transfer);
+ if (!xfr)
+ return NULL;
+
+ xfr->base.resource = resource;
+ xfr->base.box.x = box->x;
+ xfr->base.box.width = box->width;
+ xfr->base.usage = usage;
+
+ if (buf->domain == NOUVEAU_BO_VRAM) {
+ if (usage & PIPE_TRANSFER_READ) {
+ if (buf->status & NOUVEAU_BUFFER_STATUS_GPU_WRITING)
+ nouveau_buffer_download(nv, buf, 0, buf->base.width0);
+ }
+ }
+
+ return &xfr->base;
+}
+
+static void
+nouveau_buffer_transfer_destroy(struct pipe_context *pipe,
+ struct pipe_transfer *transfer)
+{
+ struct nv04_resource *buf = nv04_resource(transfer->resource);
+ struct nouveau_transfer *xfr = nouveau_transfer(transfer);
+ struct nouveau_context *nv = nouveau_context(pipe);
+
+ if (xfr->base.usage & PIPE_TRANSFER_WRITE) {
+ /* writing is worse */
+ nouveau_buffer_adjust_score(nv, buf, -5000);
+
+ if (buf->domain == NOUVEAU_BO_VRAM) {
+ nouveau_buffer_upload(nv, buf, transfer->box.x, transfer->box.width);
+ }
+
+ if (buf->domain != 0 && (buf->base.bind & (PIPE_BIND_VERTEX_BUFFER |
+ PIPE_BIND_INDEX_BUFFER)))
+ nouveau_context(pipe)->vbo_dirty = TRUE;
+ }
+
+ FREE(xfr);
+}
+
+static INLINE boolean
+nouveau_buffer_sync(struct nv04_resource *buf, unsigned rw)
+{
+ if (rw == PIPE_TRANSFER_READ) {
+ if (!buf->fence_wr)
+ return TRUE;
+ if (!nouveau_fence_wait(buf->fence_wr))
+ return FALSE;
+ } else {
+ if (!buf->fence)
+ return TRUE;
+ if (!nouveau_fence_wait(buf->fence))
+ return FALSE;
+
+ nouveau_fence_ref(NULL, &buf->fence);
+ }
+ nouveau_fence_ref(NULL, &buf->fence_wr);
+
+ return TRUE;
+}
+
+static INLINE boolean
+nouveau_buffer_busy(struct nv04_resource *buf, unsigned rw)
+{
+ if (rw == PIPE_TRANSFER_READ)
+ return (buf->fence_wr && !nouveau_fence_signalled(buf->fence_wr));
+ else
+ return (buf->fence && !nouveau_fence_signalled(buf->fence));
+}
+
+static void *
+nouveau_buffer_transfer_map(struct pipe_context *pipe,
+ struct pipe_transfer *transfer)
+{
+ struct nouveau_transfer *xfr = nouveau_transfer(transfer);
+ struct nv04_resource *buf = nv04_resource(transfer->resource);
+ struct nouveau_bo *bo = buf->bo;
+ uint8_t *map;
+ int ret;
+ uint32_t offset = xfr->base.box.x;
+ uint32_t flags;
+
+ nouveau_buffer_adjust_score(nouveau_context(pipe), buf, -250);
+
+ if (buf->domain != NOUVEAU_BO_GART)
+ return buf->data + offset;
+
+ if (buf->mm)
+ flags = NOUVEAU_BO_NOSYNC | NOUVEAU_BO_RDWR;
+ else
+ flags = nouveau_screen_transfer_flags(xfr->base.usage);
+
+ offset += buf->offset;
+
+ ret = nouveau_bo_map_range(buf->bo, offset, xfr->base.box.width, flags);
+ if (ret)
+ return NULL;
+ map = bo->map;
+
+ /* Unmap right now. Since multiple buffers can share a single nouveau_bo,
+ * not doing so might make future maps fail or trigger "reloc while mapped"
+ * errors. For now, mappings to userspace are guaranteed to be persistent.
+ */
+ nouveau_bo_unmap(bo);
+
+ if (buf->mm) {
+ if (xfr->base.usage & PIPE_TRANSFER_DONTBLOCK) {
+ if (nouveau_buffer_busy(buf, xfr->base.usage & PIPE_TRANSFER_READ_WRITE))
+ return NULL;
+ } else
+ if (!(xfr->base.usage & PIPE_TRANSFER_UNSYNCHRONIZED)) {
+ nouveau_buffer_sync(buf, xfr->base.usage & PIPE_TRANSFER_READ_WRITE);
+ }
+ }
+ return map;
+}
+
+
+
+static void
+nouveau_buffer_transfer_flush_region(struct pipe_context *pipe,
+ struct pipe_transfer *transfer,
+ const struct pipe_box *box)
+{
+ struct nv04_resource *res = nv04_resource(transfer->resource);
+ struct nouveau_bo *bo = res->bo;
+ unsigned offset = res->offset + transfer->box.x + box->x;
+
+ /* not using non-snoop system memory yet, no need for cflush */
+ if (1)
+ return;
+
+ /* XXX: maybe need to upload for VRAM buffers here */
+
+ nouveau_screen_bo_map_flush_range(pipe->screen, bo, offset, box->width);
+}
+
+static void
+nouveau_buffer_transfer_unmap(struct pipe_context *pipe,
+ struct pipe_transfer *transfer)
+{
+ /* we've called nouveau_bo_unmap right after map */
+}
+
+const struct u_resource_vtbl nouveau_buffer_vtbl =
+{
+ u_default_resource_get_handle, /* get_handle */
+ nouveau_buffer_destroy, /* resource_destroy */
+ nouveau_buffer_transfer_get, /* get_transfer */
+ nouveau_buffer_transfer_destroy, /* transfer_destroy */
+ nouveau_buffer_transfer_map, /* transfer_map */
+ nouveau_buffer_transfer_flush_region, /* transfer_flush_region */
+ nouveau_buffer_transfer_unmap, /* transfer_unmap */
+ u_default_transfer_inline_write /* transfer_inline_write */
+};
+
+struct pipe_resource *
+nouveau_buffer_create(struct pipe_screen *pscreen,
+ const struct pipe_resource *templ)
+{
+ struct nouveau_screen *screen = nouveau_screen(pscreen);
+ struct nv04_resource *buffer;
+ boolean ret;
+
+ buffer = CALLOC_STRUCT(nv04_resource);
+ if (!buffer)
+ return NULL;
+
+ buffer->base = *templ;
+ buffer->vtbl = &nouveau_buffer_vtbl;
+ pipe_reference_init(&buffer->base.reference, 1);
+ buffer->base.screen = pscreen;
+
+ if ((buffer->base.bind & screen->sysmem_bindings) == screen->sysmem_bindings)
+ ret = nouveau_buffer_allocate(screen, buffer, 0);
+ else
+ ret = nouveau_buffer_allocate(screen, buffer, NOUVEAU_BO_GART);
+
+ if (ret == FALSE)
+ goto fail;
+
+ return &buffer->base;
+
+fail:
+ FREE(buffer);
+ return NULL;
+}
+
+
+struct pipe_resource *
+nouveau_user_buffer_create(struct pipe_screen *pscreen, void *ptr,
+ unsigned bytes, unsigned bind)
+{
+ struct nv04_resource *buffer;
+
+ buffer = CALLOC_STRUCT(nv04_resource);
+ if (!buffer)
+ return NULL;
+
+ pipe_reference_init(&buffer->base.reference, 1);
+ buffer->vtbl = &nouveau_buffer_vtbl;
+ buffer->base.screen = pscreen;
+ buffer->base.format = PIPE_FORMAT_R8_UNORM;
+ buffer->base.usage = PIPE_USAGE_IMMUTABLE;
+ buffer->base.bind = bind;
+ buffer->base.width0 = bytes;
+ buffer->base.height0 = 1;
+ buffer->base.depth0 = 1;
+
+ buffer->data = ptr;
+ buffer->status = NOUVEAU_BUFFER_STATUS_USER_MEMORY;
+
+ return &buffer->base;
+}
+
+/* Like download, but for GART buffers. Merge ? */
+static INLINE boolean
+nouveau_buffer_data_fetch(struct nv04_resource *buf, struct nouveau_bo *bo,
+ unsigned offset, unsigned size)
+{
+ if (!buf->data) {
+ buf->data = MALLOC(size);
+ if (!buf->data)
+ return FALSE;
+ }
+ if (nouveau_bo_map_range(bo, offset, size, NOUVEAU_BO_RD))
+ return FALSE;
+ memcpy(buf->data, bo->map, size);
+ nouveau_bo_unmap(bo);
+
+ return TRUE;
+}
+
+/* Migrate a linear buffer (vertex, index, constants) USER -> GART -> VRAM. */
+boolean
+nouveau_buffer_migrate(struct nouveau_context *nv,
+ struct nv04_resource *buf, const unsigned new_domain)
+{
+ struct nouveau_screen *screen = nv->screen;
+ struct nouveau_bo *bo;
+ const unsigned old_domain = buf->domain;
+ unsigned size = buf->base.width0;
+ unsigned offset;
+ int ret;
+
+ assert(new_domain != old_domain);
+
+ if (new_domain == NOUVEAU_BO_GART && old_domain == 0) {
+ if (!nouveau_buffer_allocate(screen, buf, new_domain))
+ return FALSE;
+ ret = nouveau_bo_map_range(buf->bo, buf->offset, size, NOUVEAU_BO_WR |
+ NOUVEAU_BO_NOSYNC);
+ if (ret)
+ return ret;
+ memcpy(buf->bo->map, buf->data, size);
+ nouveau_bo_unmap(buf->bo);
+ FREE(buf->data);
+ } else
+ if (old_domain != 0 && new_domain != 0) {
+ struct nouveau_mm_allocation *mm = buf->mm;
+
+ if (new_domain == NOUVEAU_BO_VRAM) {
+ /* keep a system memory copy of our data in case we hit a fallback */
+ if (!nouveau_buffer_data_fetch(buf, buf->bo, buf->offset, size))
+ return FALSE;
+ debug_printf("migrating %u KiB to VRAM\n", size / 1024);
+ }
+
+ offset = buf->offset;
+ bo = buf->bo;
+ buf->bo = NULL;
+ buf->mm = NULL;
+ nouveau_buffer_allocate(screen, buf, new_domain);
+
+ nv->copy_data(nv, buf->bo, buf->offset, new_domain,
+ bo, offset, old_domain, buf->base.width0);
+
+ nouveau_bo_ref(NULL, &bo);
+ if (mm)
+ release_allocation(&mm, screen->fence.current);
+ } else
+ if (new_domain == NOUVEAU_BO_VRAM && old_domain == 0) {
+ if (!nouveau_buffer_allocate(screen, buf, NOUVEAU_BO_VRAM))
+ return FALSE;
+ if (!nouveau_buffer_upload(nv, buf, 0, buf->base.width0))
+ return FALSE;
+ } else
+ return FALSE;
+
+ assert(buf->domain == new_domain);
+ return TRUE;
+}
+
+/* Migrate data from glVertexAttribPointer(non-VBO) user buffers to GART.
+ * We'd like to only allocate @size bytes here, but then we'd have to rebase
+ * the vertex indices ...
+ */
+boolean
+nouveau_user_buffer_upload(struct nv04_resource *buf,
+ unsigned base, unsigned size)
+{
+ struct nouveau_screen *screen = nouveau_screen(buf->base.screen);
+ int ret;
+
+ assert(buf->status & NOUVEAU_BUFFER_STATUS_USER_MEMORY);
+
+ buf->base.width0 = base + size;
+ if (!nouveau_buffer_reallocate(screen, buf, NOUVEAU_BO_GART))
+ return FALSE;
+
+ ret = nouveau_bo_map_range(buf->bo, buf->offset + base, size,
+ NOUVEAU_BO_WR | NOUVEAU_BO_NOSYNC);
+ if (ret)
+ return FALSE;
+ memcpy(buf->bo->map, buf->data + base, size);
+ nouveau_bo_unmap(buf->bo);
+
+ return TRUE;
+}
diff --git a/src/gallium/drivers/nouveau/nouveau_buffer.h b/src/gallium/drivers/nouveau/nouveau_buffer.h
new file mode 100644
index 00000000000..46e3554bdf7
--- /dev/null
+++ b/src/gallium/drivers/nouveau/nouveau_buffer.h
@@ -0,0 +1,139 @@
+#ifndef __NOUVEAU_BUFFER_H__
+#define __NOUVEAU_BUFFER_H__
+
+#include "util/u_transfer.h"
+#include "util/u_double_list.h"
+
+struct pipe_resource;
+struct nouveau_context;
+struct nouveau_bo;
+
+#define NOUVEAU_BUFFER_SCORE_MIN -25000
+#define NOUVEAU_BUFFER_SCORE_MAX 25000
+#define NOUVEAU_BUFFER_SCORE_VRAM_THRESHOLD 20000
+
+/* DIRTY: buffer was (or will be after the next flush) written to by GPU and
+ * resource->data has not been updated to reflect modified VRAM contents
+ *
+ * USER_MEMORY: resource->data is a pointer to client memory and may change
+ * between GL calls
+ */
+#define NOUVEAU_BUFFER_STATUS_GPU_READING (1 << 0)
+#define NOUVEAU_BUFFER_STATUS_GPU_WRITING (1 << 1)
+#define NOUVEAU_BUFFER_STATUS_USER_MEMORY (1 << 7)
+
+/* Resources, if mapped into the GPU's address space, are guaranteed to
+ * have constant virtual addresses (nv50+).
+ *
+ * The address of a resource will lie within the nouveau_bo referenced,
+ * and this bo should be added to the memory manager's validation list.
+ */
+struct nv04_resource {
+ struct pipe_resource base;
+ const struct u_resource_vtbl *vtbl;
+
+ uint8_t *data;
+ struct nouveau_bo *bo;
+ uint32_t offset;
+
+ uint8_t status;
+ uint8_t domain;
+
+ int16_t score; /* low if mapped very often, if high can move to VRAM */
+
+ struct nouveau_fence *fence;
+ struct nouveau_fence *fence_wr;
+
+ struct nouveau_mm_allocation *mm;
+};
+
+void
+nouveau_buffer_release_gpu_storage(struct nv04_resource *);
+
+boolean
+nouveau_buffer_download(struct nouveau_context *, struct nv04_resource *,
+ unsigned start, unsigned size);
+
+boolean
+nouveau_buffer_migrate(struct nouveau_context *,
+ struct nv04_resource *, unsigned domain);
+
+static INLINE void
+nouveau_buffer_adjust_score(struct nouveau_context *pipe,
+ struct nv04_resource *res, int16_t score)
+{
+ if (score < 0) {
+ if (res->score > NOUVEAU_BUFFER_SCORE_MIN)
+ res->score += score;
+ } else
+ if (score > 0){
+ if (res->score < NOUVEAU_BUFFER_SCORE_MAX)
+ res->score += score;
+ if (res->domain == NOUVEAU_BO_GART &&
+ res->score > NOUVEAU_BUFFER_SCORE_VRAM_THRESHOLD)
+ nouveau_buffer_migrate(pipe, res, NOUVEAU_BO_VRAM);
+ }
+}
+
+/* XXX: wait for fence (atm only using this for vertex push) */
+static INLINE void *
+nouveau_resource_map_offset(struct nouveau_context *pipe,
+ struct nv04_resource *res, uint32_t offset,
+ uint32_t flags)
+{
+ void *map;
+
+ nouveau_buffer_adjust_score(pipe, res, -250);
+
+ if ((res->domain == NOUVEAU_BO_VRAM) &&
+ (res->status & NOUVEAU_BUFFER_STATUS_GPU_WRITING))
+ nouveau_buffer_download(pipe, res, 0, res->base.width0);
+
+ if ((res->domain != NOUVEAU_BO_GART) ||
+ (res->status & NOUVEAU_BUFFER_STATUS_USER_MEMORY))
+ return res->data + offset;
+
+ if (res->mm)
+ flags |= NOUVEAU_BO_NOSYNC;
+
+ if (nouveau_bo_map_range(res->bo, res->offset + offset,
+ res->base.width0, flags))
+ return NULL;
+
+ map = res->bo->map;
+ nouveau_bo_unmap(res->bo);
+ return map;
+}
+
+static INLINE void
+nouveau_resource_unmap(struct nv04_resource *res)
+{
+ /* no-op */
+}
+
+static INLINE struct nv04_resource *
+nv04_resource(struct pipe_resource *resource)
+{
+ return (struct nv04_resource *)resource;
+}
+
+/* is resource mapped into the GPU's address space (i.e. VRAM or GART) ? */
+static INLINE boolean
+nouveau_resource_mapped_by_gpu(struct pipe_resource *resource)
+{
+ return nv04_resource(resource)->domain != 0;
+}
+
+struct pipe_resource *
+nouveau_buffer_create(struct pipe_screen *pscreen,
+ const struct pipe_resource *templ);
+
+struct pipe_resource *
+nouveau_user_buffer_create(struct pipe_screen *screen, void *ptr,
+ unsigned bytes, unsigned usage);
+
+boolean
+nouveau_user_buffer_upload(struct nv04_resource *, unsigned base,
+ unsigned size);
+
+#endif
diff --git a/src/gallium/drivers/nouveau/nouveau_context.h b/src/gallium/drivers/nouveau/nouveau_context.h
new file mode 100644
index 00000000000..696e0d3f24e
--- /dev/null
+++ b/src/gallium/drivers/nouveau/nouveau_context.h
@@ -0,0 +1,26 @@
+#ifndef __NOUVEAU_CONTEXT_H__
+#define __NOUVEAU_CONTEXT_H__
+
+#include "pipe/p_context.h"
+
+struct nouveau_context {
+ struct pipe_context pipe;
+ struct nouveau_screen *screen;
+
+ boolean vbo_dirty;
+
+ void (*copy_data)(struct nouveau_context *,
+ struct nouveau_bo *dst, unsigned, unsigned,
+ struct nouveau_bo *src, unsigned, unsigned, unsigned);
+ void (*push_data)(struct nouveau_context *,
+ struct nouveau_bo *dst, unsigned, unsigned,
+ unsigned, void *);
+};
+
+static INLINE struct nouveau_context *
+nouveau_context(struct pipe_context *pipe)
+{
+ return (struct nouveau_context *)pipe;
+}
+
+#endif
diff --git a/src/gallium/drivers/nouveau/nouveau_fence.c b/src/gallium/drivers/nouveau/nouveau_fence.c
new file mode 100644
index 00000000000..d8f59dce9ed
--- /dev/null
+++ b/src/gallium/drivers/nouveau/nouveau_fence.c
@@ -0,0 +1,223 @@
+/*
+ * Copyright 2010 Christoph Bumiller
+ *
+ * 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 "util/u_double_list.h"
+
+#include "nouveau_screen.h"
+#include "nouveau_fence.h"
+
+#include "nouveau/nouveau_pushbuf.h"
+
+#ifdef PIPE_OS_UNIX
+#include <sched.h>
+#endif
+
+boolean
+nouveau_fence_new(struct nouveau_screen *screen, struct nouveau_fence **fence,
+ boolean emit)
+{
+ *fence = CALLOC_STRUCT(nouveau_fence);
+ if (!*fence)
+ return FALSE;
+
+ (*fence)->screen = screen;
+ (*fence)->ref = 1;
+ LIST_INITHEAD(&(*fence)->work);
+
+ if (emit)
+ nouveau_fence_emit(*fence);
+
+ return TRUE;
+}
+
+static void
+nouveau_fence_trigger_work(struct nouveau_fence *fence)
+{
+ struct nouveau_fence_work *work, *tmp;
+
+ LIST_FOR_EACH_ENTRY_SAFE(work, tmp, &fence->work, list) {
+ work->func(work->data);
+ LIST_DEL(&work->list);
+ FREE(work);
+ }
+}
+
+boolean
+nouveau_fence_work(struct nouveau_fence *fence,
+ void (*func)(void *), void *data)
+{
+ struct nouveau_fence_work *work;
+
+ if (!fence || fence->state == NOUVEAU_FENCE_STATE_SIGNALLED) {
+ func(data);
+ return TRUE;
+ }
+
+ work = CALLOC_STRUCT(nouveau_fence_work);
+ if (!work)
+ return FALSE;
+ work->func = func;
+ work->data = data;
+ LIST_ADD(&work->list, &fence->work);
+ return TRUE;
+}
+
+void
+nouveau_fence_emit(struct nouveau_fence *fence)
+{
+ struct nouveau_screen *screen = fence->screen;
+
+ fence->sequence = ++screen->fence.sequence;
+
+ assert(fence->state == NOUVEAU_FENCE_STATE_AVAILABLE);
+
+ /* set this now, so that if fence.emit triggers a flush we don't recurse */
+ fence->state = NOUVEAU_FENCE_STATE_EMITTED;
+
+ screen->fence.emit(&screen->base, fence->sequence);
+
+ ++fence->ref;
+
+ if (screen->fence.tail)
+ screen->fence.tail->next = fence;
+ else
+ screen->fence.head = fence;
+
+ screen->fence.tail = fence;
+}
+
+void
+nouveau_fence_del(struct nouveau_fence *fence)
+{
+ struct nouveau_fence *it;
+ struct nouveau_screen *screen = fence->screen;
+
+ if (fence->state == NOUVEAU_FENCE_STATE_EMITTED ||
+ fence->state == NOUVEAU_FENCE_STATE_FLUSHED) {
+ if (fence == screen->fence.head) {
+ screen->fence.head = fence->next;
+ if (!screen->fence.head)
+ screen->fence.tail = NULL;
+ } else {
+ for (it = screen->fence.head; it && it->next != fence; it = it->next);
+ it->next = fence->next;
+ if (screen->fence.tail == fence)
+ screen->fence.tail = it;
+ }
+ }
+
+ if (!LIST_IS_EMPTY(&fence->work)) {
+ debug_printf("WARNING: deleting fence with work still pending !\n");
+ nouveau_fence_trigger_work(fence);
+ }
+
+ FREE(fence);
+}
+
+void
+nouveau_fence_update(struct nouveau_screen *screen, boolean flushed)
+{
+ struct nouveau_fence *fence;
+ struct nouveau_fence *next = NULL;
+ u32 sequence = screen->fence.update(&screen->base);
+
+ if (screen->fence.sequence_ack == sequence)
+ return;
+ screen->fence.sequence_ack = sequence;
+
+ for (fence = screen->fence.head; fence; fence = next) {
+ next = fence->next;
+ sequence = fence->sequence;
+
+ fence->state = NOUVEAU_FENCE_STATE_SIGNALLED;
+
+ nouveau_fence_trigger_work(fence);
+ nouveau_fence_ref(NULL, &fence);
+
+ if (sequence == screen->fence.sequence_ack)
+ break;
+ }
+ screen->fence.head = next;
+ if (!next)
+ screen->fence.tail = NULL;
+
+ if (flushed) {
+ for (fence = next; fence; fence = fence->next)
+ fence->state = NOUVEAU_FENCE_STATE_FLUSHED;
+ }
+}
+
+#define NOUVEAU_FENCE_MAX_SPINS (1 << 31)
+
+boolean
+nouveau_fence_signalled(struct nouveau_fence *fence)
+{
+ struct nouveau_screen *screen = fence->screen;
+
+ if (fence->state >= NOUVEAU_FENCE_STATE_EMITTED)
+ nouveau_fence_update(screen, FALSE);
+
+ return fence->state == NOUVEAU_FENCE_STATE_SIGNALLED;
+}
+
+boolean
+nouveau_fence_wait(struct nouveau_fence *fence)
+{
+ struct nouveau_screen *screen = fence->screen;
+ uint32_t spins = 0;
+
+ if (fence->state < NOUVEAU_FENCE_STATE_EMITTED) {
+ nouveau_fence_emit(fence);
+
+ if (fence == screen->fence.current)
+ nouveau_fence_new(screen, &screen->fence.current, FALSE);
+ }
+ if (fence->state < NOUVEAU_FENCE_STATE_FLUSHED)
+ FIRE_RING(screen->channel);
+
+ do {
+ nouveau_fence_update(screen, FALSE);
+
+ if (fence->state == NOUVEAU_FENCE_STATE_SIGNALLED)
+ return TRUE;
+ spins++;
+#ifdef PIPE_OS_UNIX
+ if (!(spins % 8)) /* donate a few cycles */
+ sched_yield();
+#endif
+ } while (spins < NOUVEAU_FENCE_MAX_SPINS);
+
+ debug_printf("Wait on fence %u (ack = %u, next = %u) timed out !\n",
+ fence->sequence,
+ screen->fence.sequence_ack, screen->fence.sequence);
+
+ return FALSE;
+}
+
+void
+nouveau_fence_next(struct nouveau_screen *screen)
+{
+ if (screen->fence.current->state < NOUVEAU_FENCE_STATE_EMITTED)
+ nouveau_fence_emit(screen->fence.current);
+
+ nouveau_fence_new(screen, &screen->fence.current, FALSE);
+}
diff --git a/src/gallium/drivers/nouveau/nouveau_fence.h b/src/gallium/drivers/nouveau/nouveau_fence.h
new file mode 100644
index 00000000000..680c75e99f9
--- /dev/null
+++ b/src/gallium/drivers/nouveau/nouveau_fence.h
@@ -0,0 +1,59 @@
+
+#ifndef __NOUVEAU_FENCE_H__
+#define __NOUVEAU_FENCE_H__
+
+#include "util/u_inlines.h"
+#include "util/u_double_list.h"
+
+#define NOUVEAU_FENCE_STATE_AVAILABLE 0
+#define NOUVEAU_FENCE_STATE_EMITTED 1
+#define NOUVEAU_FENCE_STATE_FLUSHED 2
+#define NOUVEAU_FENCE_STATE_SIGNALLED 3
+
+struct nouveau_fence_work {
+ struct list_head list;
+ void (*func)(void *);
+ void *data;
+};
+
+struct nouveau_fence {
+ struct nouveau_fence *next;
+ struct nouveau_screen *screen;
+ int state;
+ int ref;
+ uint32_t sequence;
+ struct list_head work;
+};
+
+void nouveau_fence_emit(struct nouveau_fence *);
+void nouveau_fence_del(struct nouveau_fence *);
+
+boolean nouveau_fence_new(struct nouveau_screen *, struct nouveau_fence **,
+ boolean emit);
+boolean nouveau_fence_work(struct nouveau_fence *, void (*)(void *), void *);
+void nouveau_fence_update(struct nouveau_screen *, boolean flushed);
+void nouveau_fence_next(struct nouveau_screen *);
+boolean nouveau_fence_wait(struct nouveau_fence *);
+boolean nouveau_fence_signalled(struct nouveau_fence *);
+
+static INLINE void
+nouveau_fence_ref(struct nouveau_fence *fence, struct nouveau_fence **ref)
+{
+ if (fence)
+ ++fence->ref;
+
+ if (*ref) {
+ if (--(*ref)->ref == 0)
+ nouveau_fence_del(*ref);
+ }
+
+ *ref = fence;
+}
+
+static INLINE struct nouveau_fence *
+nouveau_fence(struct pipe_fence_handle *fence)
+{
+ return (struct nouveau_fence *)fence;
+}
+
+#endif // __NOUVEAU_FENCE_H__
diff --git a/src/gallium/drivers/nouveau/nouveau_mm.c b/src/gallium/drivers/nouveau/nouveau_mm.c
new file mode 100644
index 00000000000..7edeb4d21d6
--- /dev/null
+++ b/src/gallium/drivers/nouveau/nouveau_mm.c
@@ -0,0 +1,288 @@
+
+#include "util/u_inlines.h"
+#include "util/u_memory.h"
+#include "util/u_double_list.h"
+
+#include "nouveau_screen.h"
+#include "nouveau_mm.h"
+
+#include "nouveau/nouveau_bo.h"
+
+#define MM_MIN_ORDER 7
+#define MM_MAX_ORDER 20
+
+#define MM_NUM_BUCKETS (MM_MAX_ORDER - MM_MIN_ORDER + 1)
+
+#define MM_MIN_SIZE (1 << MM_MIN_ORDER)
+#define MM_MAX_SIZE (1 << MM_MAX_ORDER)
+
+struct mm_bucket {
+ struct list_head free;
+ struct list_head used;
+ struct list_head full;
+ int num_free;
+};
+
+struct nouveau_mman {
+ struct nouveau_device *dev;
+ struct mm_bucket bucket[MM_NUM_BUCKETS];
+ uint32_t storage_type;
+ uint32_t domain;
+ uint64_t allocated;
+};
+
+struct mm_slab {
+ struct list_head head;
+ struct nouveau_bo *bo;
+ struct nouveau_mman *cache;
+ int order;
+ int count;
+ int free;
+ uint32_t bits[0];
+};
+
+static int
+mm_slab_alloc(struct mm_slab *slab)
+{
+ int i, n, b;
+
+ if (slab->free == 0)
+ return -1;
+
+ for (i = 0; i < (slab->count + 31) / 32; ++i) {
+ b = ffs(slab->bits[i]) - 1;
+ if (b >= 0) {
+ n = i * 32 + b;
+ assert(n < slab->count);
+ slab->free--;
+ slab->bits[i] &= ~(1 << b);
+ return n;
+ }
+ }
+ return -1;
+}
+
+static INLINE void
+mm_slab_free(struct mm_slab *slab, int i)
+{
+ assert(i < slab->count);
+ slab->bits[i / 32] |= 1 << (i % 32);
+ slab->free++;
+ assert(slab->free <= slab->count);
+}
+
+static INLINE int
+mm_get_order(uint32_t size)
+{
+ int s = __builtin_clz(size) ^ 31;
+
+ if (size > (1 << s))
+ s += 1;
+ return s;
+}
+
+static struct mm_bucket *
+mm_bucket_by_order(struct nouveau_mman *cache, int order)
+{
+ if (order > MM_MAX_ORDER)
+ return NULL;
+ return &cache->bucket[MAX2(order, MM_MIN_ORDER) - MM_MIN_ORDER];
+}
+
+static struct mm_bucket *
+mm_bucket_by_size(struct nouveau_mman *cache, unsigned size)
+{
+ return mm_bucket_by_order(cache, mm_get_order(size));
+}
+
+/* size of bo allocation for slab with chunks of (1 << chunk_order) bytes */
+static INLINE uint32_t
+mm_default_slab_size(unsigned chunk_order)
+{
+ static const int8_t slab_order[MM_MAX_ORDER - MM_MIN_ORDER + 1] =
+ {
+ 12, 12, 13, 14, 14, 17, 17, 17, 17, 19, 19, 20, 21, 22
+ };
+
+ assert(chunk_order <= MM_MAX_ORDER && chunk_order >= MM_MIN_ORDER);
+
+ return 1 << slab_order[chunk_order - MM_MIN_ORDER];
+}
+
+static int
+mm_slab_new(struct nouveau_mman *cache, int chunk_order)
+{
+ struct mm_slab *slab;
+ int words, ret;
+ const uint32_t size = mm_default_slab_size(chunk_order);
+
+ words = ((size >> chunk_order) + 31) / 32;
+ assert(words);
+
+ slab = MALLOC(sizeof(struct mm_slab) + words * 4);
+ if (!slab)
+ return PIPE_ERROR_OUT_OF_MEMORY;
+
+ memset(&slab->bits[0], ~0, words * 4);
+
+ slab->bo = NULL;
+ ret = nouveau_bo_new_tile(cache->dev, cache->domain, 0, size,
+ 0, cache->storage_type, &slab->bo);
+ if (ret) {
+ FREE(slab);
+ return PIPE_ERROR_OUT_OF_MEMORY;
+ }
+
+ LIST_INITHEAD(&slab->head);
+
+ slab->cache = cache;
+ slab->order = chunk_order;
+ slab->count = slab->free = size >> chunk_order;
+
+ LIST_ADD(&slab->head, &mm_bucket_by_order(cache, chunk_order)->free);
+
+ cache->allocated += size;
+
+ debug_printf("MM: new slab, total memory = %lu KiB\n",
+ cache->allocated / 1024);
+
+ return PIPE_OK;
+}
+
+/* @return token to identify slab or NULL if we just allocated a new bo */
+struct nouveau_mm_allocation *
+nouveau_mm_allocate(struct nouveau_mman *cache,
+ uint32_t size, struct nouveau_bo **bo, uint32_t *offset)
+{
+ struct mm_bucket *bucket;
+ struct mm_slab *slab;
+ struct nouveau_mm_allocation *alloc;
+ int ret;
+
+ bucket = mm_bucket_by_size(cache, size);
+ if (!bucket) {
+ ret = nouveau_bo_new_tile(cache->dev, cache->domain, 0, size,
+ 0, cache->storage_type, bo);
+ if (ret)
+ debug_printf("bo_new(%x, %x): %i\n", size, cache->storage_type, ret);
+
+ *offset = 0;
+ return NULL;
+ }
+
+ if (!LIST_IS_EMPTY(&bucket->used)) {
+ slab = LIST_ENTRY(struct mm_slab, bucket->used.next, head);
+ } else {
+ if (LIST_IS_EMPTY(&bucket->free)) {
+ mm_slab_new(cache, MAX2(mm_get_order(size), MM_MIN_ORDER));
+ }
+ slab = LIST_ENTRY(struct mm_slab, bucket->free.next, head);
+
+ LIST_DEL(&slab->head);
+ LIST_ADD(&slab->head, &bucket->used);
+ }
+
+ *offset = mm_slab_alloc(slab) << slab->order;
+
+ alloc = MALLOC_STRUCT(nouveau_mm_allocation);
+ if (!alloc)
+ return NULL;
+
+ nouveau_bo_ref(slab->bo, bo);
+
+ if (slab->free == 0) {
+ LIST_DEL(&slab->head);
+ LIST_ADD(&slab->head, &bucket->full);
+ }
+
+ alloc->next = NULL;
+ alloc->offset = *offset;
+ alloc->priv = (void *)slab;
+
+ return alloc;
+}
+
+void
+nouveau_mm_free(struct nouveau_mm_allocation *alloc)
+{
+ struct mm_slab *slab = (struct mm_slab *)alloc->priv;
+ struct mm_bucket *bucket = mm_bucket_by_order(slab->cache, slab->order);
+
+ mm_slab_free(slab, alloc->offset >> slab->order);
+
+ if (slab->free == 1) {
+ LIST_DEL(&slab->head);
+
+ if (slab->count > 1)
+ LIST_ADDTAIL(&slab->head, &bucket->used);
+ else
+ LIST_ADDTAIL(&slab->head, &bucket->free);
+ }
+
+ FREE(alloc);
+}
+
+void
+nouveau_mm_free_work(void *data)
+{
+ nouveau_mm_free(data);
+}
+
+struct nouveau_mman *
+nouveau_mm_create(struct nouveau_device *dev, uint32_t domain,
+ uint32_t storage_type)
+{
+ struct nouveau_mman *cache = MALLOC_STRUCT(nouveau_mman);
+ int i;
+
+ if (!cache)
+ return NULL;
+
+ cache->dev = dev;
+ cache->domain = domain;
+ cache->storage_type = storage_type;
+ cache->allocated = 0;
+
+ for (i = 0; i < MM_NUM_BUCKETS; ++i) {
+ LIST_INITHEAD(&cache->bucket[i].free);
+ LIST_INITHEAD(&cache->bucket[i].used);
+ LIST_INITHEAD(&cache->bucket[i].full);
+ }
+
+ return cache;
+}
+
+static INLINE void
+nouveau_mm_free_slabs(struct list_head *head)
+{
+ struct mm_slab *slab, *next;
+
+ LIST_FOR_EACH_ENTRY_SAFE(slab, next, head, head) {
+ LIST_DEL(&slab->head);
+ nouveau_bo_ref(NULL, &slab->bo);
+ FREE(slab);
+ }
+}
+
+void
+nouveau_mm_destroy(struct nouveau_mman *cache)
+{
+ int i;
+
+ if (!cache)
+ return;
+
+ for (i = 0; i < MM_NUM_BUCKETS; ++i) {
+ if (!LIST_IS_EMPTY(&cache->bucket[i].used) ||
+ !LIST_IS_EMPTY(&cache->bucket[i].full))
+ debug_printf("WARNING: destroying GPU memory cache "
+ "with some buffers still in use\n");
+
+ nouveau_mm_free_slabs(&cache->bucket[i].free);
+ nouveau_mm_free_slabs(&cache->bucket[i].used);
+ nouveau_mm_free_slabs(&cache->bucket[i].full);
+ }
+
+ FREE(cache);
+}
+
diff --git a/src/gallium/drivers/nouveau/nouveau_mm.h b/src/gallium/drivers/nouveau/nouveau_mm.h
new file mode 100644
index 00000000000..5b57c8ba4f2
--- /dev/null
+++ b/src/gallium/drivers/nouveau/nouveau_mm.h
@@ -0,0 +1,32 @@
+#ifndef __NOUVEAU_MM_H__
+#define __NOUVEAU_MM_H__
+
+struct nouveau_mman;
+
+/* Since a resource can be migrated, we need to decouple allocations from
+ * them. This struct is linked with fences for delayed freeing of allocs.
+ */
+struct nouveau_mm_allocation {
+ struct nouveau_mm_allocation *next;
+ void *priv;
+ uint32_t offset;
+};
+
+extern struct nouveau_mman *
+nouveau_mm_create(struct nouveau_device *, uint32_t domain,
+ uint32_t storage_type);
+
+extern void
+nouveau_mm_destroy(struct nouveau_mman *);
+
+extern struct nouveau_mm_allocation *
+nouveau_mm_allocate(struct nouveau_mman *, uint32_t size,
+ struct nouveau_bo **, uint32_t *offset);
+
+extern void
+nouveau_mm_free(struct nouveau_mm_allocation *);
+
+extern void
+nouveau_mm_free_work(void *);
+
+#endif // __NOUVEAU_MM_H__
diff --git a/src/gallium/drivers/nouveau/nouveau_screen.c b/src/gallium/drivers/nouveau/nouveau_screen.c
index a9426df686f..4cd82a51c14 100644
--- a/src/gallium/drivers/nouveau/nouveau_screen.c
+++ b/src/gallium/drivers/nouveau/nouveau_screen.c
@@ -14,6 +14,7 @@
#include "nouveau/nouveau_bo.h"
#include "nouveau_winsys.h"
#include "nouveau_screen.h"
+#include "nouveau_fence.h"
/* XXX this should go away */
#include "state_tracker/drm_driver.h"
@@ -150,23 +151,22 @@ nouveau_screen_fence_ref(struct pipe_screen *pscreen,
struct pipe_fence_handle **ptr,
struct pipe_fence_handle *pfence)
{
- *ptr = pfence;
+ nouveau_fence_ref(nouveau_fence(pfence), (struct nouveau_fence **)ptr);
}
-static int
+static boolean
nouveau_screen_fence_signalled(struct pipe_screen *screen,
- struct pipe_fence_handle *pfence,
- unsigned flags)
+ struct pipe_fence_handle *pfence)
{
- return 0;
+ return nouveau_fence_signalled(nouveau_fence(pfence));
}
-static int
+static boolean
nouveau_screen_fence_finish(struct pipe_screen *screen,
struct pipe_fence_handle *pfence,
- unsigned flags)
+ uint64_t timeout)
{
- return 0;
+ return nouveau_fence_wait(nouveau_fence(pfence));
}
@@ -209,26 +209,6 @@ nouveau_screen_bo_get_handle(struct pipe_screen *pscreen,
}
}
-
-unsigned int
-nouveau_reference_flags(struct nouveau_bo *bo)
-{
- uint32_t bo_flags;
- int flags = 0;
-
- bo_flags = nouveau_bo_pending(bo);
- if (bo_flags & NOUVEAU_BO_RD)
- flags |= PIPE_REFERENCED_FOR_READ;
- if (bo_flags & NOUVEAU_BO_WR)
- flags |= PIPE_REFERENCED_FOR_WRITE;
-
- return flags;
-}
-
-
-
-
-
int
nouveau_screen_init(struct nouveau_screen *screen, struct nouveau_device *dev)
{
@@ -250,6 +230,10 @@ nouveau_screen_init(struct nouveau_screen *screen, struct nouveau_device *dev)
util_format_s3tc_init();
+ screen->mm_GART = nouveau_mm_create(dev,
+ NOUVEAU_BO_GART | NOUVEAU_BO_MAP,
+ 0x000);
+ screen->mm_VRAM = nouveau_mm_create(dev, NOUVEAU_BO_VRAM, 0x000);
return 0;
}
@@ -257,7 +241,12 @@ void
nouveau_screen_fini(struct nouveau_screen *screen)
{
struct pipe_winsys *ws = screen->base.winsys;
+
+ nouveau_mm_destroy(screen->mm_GART);
+ nouveau_mm_destroy(screen->mm_VRAM);
+
nouveau_channel_free(&screen->channel);
+
if (ws)
ws->destroy(ws);
}
diff --git a/src/gallium/drivers/nouveau/nouveau_screen.h b/src/gallium/drivers/nouveau/nouveau_screen.h
index 8c290273fb4..186ada39677 100644
--- a/src/gallium/drivers/nouveau/nouveau_screen.h
+++ b/src/gallium/drivers/nouveau/nouveau_screen.h
@@ -2,6 +2,10 @@
#define __NOUVEAU_SCREEN_H__
#include "pipe/p_screen.h"
+#include "util/u_memory.h"
+typedef uint32_t u32;
+
+struct nouveau_bo;
struct nouveau_screen {
struct pipe_screen base;
@@ -12,6 +16,20 @@ struct nouveau_screen {
* these almost always should be set to the same value */
unsigned vertex_buffer_flags;
unsigned index_buffer_flags;
+ unsigned sysmem_bindings;
+
+ struct {
+ struct nouveau_fence *head;
+ struct nouveau_fence *tail;
+ struct nouveau_fence *current;
+ u32 sequence;
+ u32 sequence_ack;
+ void (*emit)(struct pipe_screen *, u32 sequence);
+ u32 (*update)(struct pipe_screen *);
+ } fence;
+
+ struct nouveau_mman *mm_VRAM;
+ struct nouveau_mman *mm_GART;
};
static INLINE struct nouveau_screen *
@@ -56,17 +74,13 @@ nouveau_screen_bo_from_handle(struct pipe_screen *pscreen,
struct winsys_handle *whandle,
unsigned *out_stride);
-unsigned int
-nouveau_reference_flags(struct nouveau_bo *bo);
-
-
int nouveau_screen_init(struct nouveau_screen *, struct nouveau_device *);
void nouveau_screen_fini(struct nouveau_screen *);
-
+#ifndef NOUVEAU_NVC0
static INLINE unsigned
RING_3D(unsigned mthd, unsigned size)
{
@@ -78,5 +92,6 @@ RING_3D_NI(unsigned mthd, unsigned size)
{
return 0x40000000 | (7 << 13) | (size << 18) | mthd;
}
+#endif
#endif
diff --git a/src/gallium/drivers/nouveau/nouveau_stateobj.h b/src/gallium/drivers/nouveau/nouveau_stateobj.h
deleted file mode 100644
index e920cf9f3bc..00000000000
--- a/src/gallium/drivers/nouveau/nouveau_stateobj.h
+++ /dev/null
@@ -1,316 +0,0 @@
-#ifndef __NOUVEAU_STATEOBJ_H__
-#define __NOUVEAU_STATEOBJ_H__
-
-#include "util/u_debug.h"
-
-#ifdef DEBUG
-#define DEBUG_NOUVEAU_STATEOBJ
-#endif /* DEBUG */
-
-struct nouveau_stateobj_reloc {
- struct nouveau_bo *bo;
-
- struct nouveau_grobj *gr;
- uint32_t push_offset;
- uint32_t mthd;
-
- uint32_t data;
- unsigned flags;
- unsigned vor;
- unsigned tor;
-};
-
-struct nouveau_stateobj_start {
- struct nouveau_grobj *gr;
- uint32_t mthd;
- uint32_t size;
- unsigned offset;
-};
-
-struct nouveau_stateobj {
- struct pipe_reference reference;
-
- struct nouveau_stateobj_start *start;
- struct nouveau_stateobj_reloc *reloc;
-
- /* Common memory pool for data. */
- uint32_t *pool;
- unsigned pool_cur;
-
-#ifdef DEBUG_NOUVEAU_STATEOBJ
- unsigned start_alloc;
- unsigned reloc_alloc;
- unsigned pool_alloc;
-#endif /* DEBUG_NOUVEAU_STATEOBJ */
-
- unsigned total; /* includes begin_ring */
- unsigned cur; /* excludes begin_ring, offset from "cur_start" */
- unsigned cur_start;
- unsigned cur_reloc;
-};
-
-static INLINE void
-so_dump(struct nouveau_stateobj *so)
-{
- unsigned i, nr, total = 0;
-
- for (i = 0; i < so->cur_start; i++) {
- if (so->start[i].gr->subc > -1)
- debug_printf("+0x%04x: 0x%08x\n", total++,
- (so->start[i].size << 18) | (so->start[i].gr->subc << 13)
- | so->start[i].mthd);
- else
- debug_printf("+0x%04x: 0x%08x\n", total++,
- (so->start[i].size << 18) | so->start[i].mthd);
- for (nr = 0; nr < so->start[i].size; nr++, total++)
- debug_printf("+0x%04x: 0x%08x\n", total,
- so->pool[so->start[i].offset + nr]);
- }
-}
-
-static INLINE struct nouveau_stateobj *
-so_new(unsigned start, unsigned push, unsigned reloc)
-{
- struct nouveau_stateobj *so;
-
- so = MALLOC(sizeof(struct nouveau_stateobj));
- pipe_reference_init(&so->reference, 1);
- so->total = so->cur = so->cur_start = so->cur_reloc = 0;
-
-#ifdef DEBUG_NOUVEAU_STATEOBJ
- so->start_alloc = start;
- so->reloc_alloc = reloc;
- so->pool_alloc = push;
-#endif /* DEBUG_NOUVEAU_STATEOBJ */
-
- so->start = MALLOC(start * sizeof(struct nouveau_stateobj_start));
- so->reloc = MALLOC(reloc * sizeof(struct nouveau_stateobj_reloc));
- so->pool = MALLOC(push * sizeof(uint32_t));
- so->pool_cur = 0;
-
- if (!so->start || !so->reloc || !so->pool) {
- debug_printf("malloc failed\n");
- assert(0);
- }
-
- return so;
-}
-
-static INLINE void
-so_ref(struct nouveau_stateobj *ref, struct nouveau_stateobj **pso)
-{
- struct nouveau_stateobj *so = *pso;
- int i;
-
- if (pipe_reference(&(*pso)->reference, &ref->reference)) {
- FREE(so->start);
- for (i = 0; i < so->cur_reloc; i++)
- nouveau_bo_ref(NULL, &so->reloc[i].bo);
- FREE(so->reloc);
- FREE(so->pool);
- FREE(so);
- }
- *pso = ref;
-}
-
-static INLINE void
-so_data(struct nouveau_stateobj *so, uint32_t data)
-{
-#ifdef DEBUG_NOUVEAU_STATEOBJ
- if (so->cur >= so->start[so->cur_start - 1].size) {
- debug_printf("exceeding specified size\n");
- assert(0);
- }
-#endif /* DEBUG_NOUVEAU_STATEOBJ */
-
- so->pool[so->start[so->cur_start - 1].offset + so->cur++] = data;
-}
-
-static INLINE void
-so_datap(struct nouveau_stateobj *so, uint32_t *data, unsigned size)
-{
-#ifdef DEBUG_NOUVEAU_STATEOBJ
- if ((so->cur + size) > so->start[so->cur_start - 1].size) {
- debug_printf("exceeding specified size\n");
- assert(0);
- }
-#endif /* DEBUG_NOUVEAU_STATEOBJ */
-
- while (size--)
- so->pool[so->start[so->cur_start - 1].offset + so->cur++] =
- *data++;
-}
-
-static INLINE void
-so_method(struct nouveau_stateobj *so, struct nouveau_grobj *gr,
- unsigned mthd, unsigned size)
-{
- struct nouveau_stateobj_start *start;
-
-#ifdef DEBUG_NOUVEAU_STATEOBJ
- if (so->start_alloc <= so->cur_start) {
- debug_printf("exceeding num_start size\n");
- assert(0);
- }
-#endif /* DEBUG_NOUVEAU_STATEOBJ */
- start = so->start;
-
-#ifdef DEBUG_NOUVEAU_STATEOBJ
- if (so->cur_start > 0 && start[so->cur_start - 1].size > so->cur) {
- debug_printf("previous so_method was not filled\n");
- assert(0);
- }
-#endif /* DEBUG_NOUVEAU_STATEOBJ */
-
- start[so->cur_start].gr = gr;
- start[so->cur_start].mthd = mthd;
- start[so->cur_start].size = size;
-
-#ifdef DEBUG_NOUVEAU_STATEOBJ
- if (so->pool_alloc < (size + so->pool_cur)) {
- debug_printf("exceeding num_pool size\n");
- assert(0);
- }
-#endif /* DEBUG_NOUVEAU_STATEOBJ */
-
- start[so->cur_start].offset = so->pool_cur;
- so->pool_cur += size;
-
- so->cur_start++;
- /* The 1 is for *this* begin_ring. */
- so->total += so->cur + 1;
- so->cur = 0;
-}
-
-static INLINE void
-so_reloc(struct nouveau_stateobj *so, struct nouveau_bo *bo,
- unsigned data, unsigned flags, unsigned vor, unsigned tor)
-{
- struct nouveau_stateobj_reloc *r;
-
-#ifdef DEBUG_NOUVEAU_STATEOBJ
- if (so->reloc_alloc <= so->cur_reloc) {
- debug_printf("exceeding num_reloc size\n");
- assert(0);
- }
-#endif /* DEBUG_NOUVEAU_STATEOBJ */
- r = so->reloc;
-
- r[so->cur_reloc].bo = NULL;
- nouveau_bo_ref(bo, &(r[so->cur_reloc].bo));
- r[so->cur_reloc].gr = so->start[so->cur_start-1].gr;
- r[so->cur_reloc].push_offset = so->total + so->cur;
- r[so->cur_reloc].data = data;
- r[so->cur_reloc].flags = flags;
- r[so->cur_reloc].mthd = so->start[so->cur_start-1].mthd +
- (so->cur << 2);
- r[so->cur_reloc].vor = vor;
- r[so->cur_reloc].tor = tor;
-
- so_data(so, data);
- so->cur_reloc++;
-}
-
-/* Determine if this buffer object is referenced by this state object. */
-static INLINE boolean
-so_bo_is_reloc(struct nouveau_stateobj *so, struct nouveau_bo *bo)
-{
- int i;
-
- for (i = 0; i < so->cur_reloc; i++)
- if (so->reloc[i].bo == bo)
- return true;
-
- return false;
-}
-
-static INLINE void
-so_emit(struct nouveau_channel *chan, struct nouveau_stateobj *so)
-{
- unsigned nr, i;
- int ret = 0;
-
-#ifdef DEBUG_NOUVEAU_STATEOBJ
- if (so->start[so->cur_start - 1].size > so->cur) {
- debug_printf("emit: previous so_method was not filled\n");
- assert(0);
- }
-#endif /* DEBUG_NOUVEAU_STATEOBJ */
-
- /* We cannot update total in case we so_emit again. */
- nr = so->total + so->cur;
-
- /* This will flush if we need space.
- * We don't actually need the marker.
- */
- if ((ret = nouveau_pushbuf_marker_emit(chan, nr, so->cur_reloc))) {
- debug_printf("so_emit failed marker emit with error %d\n", ret);
- assert(0);
- }
-
- /* Submit data. This will ensure proper binding of objects. */
- for (i = 0; i < so->cur_start; i++) {
- BEGIN_RING(chan, so->start[i].gr, so->start[i].mthd, so->start[i].size);
- OUT_RINGp(chan, &(so->pool[so->start[i].offset]), so->start[i].size);
- }
-
- for (i = 0; i < so->cur_reloc; i++) {
- struct nouveau_stateobj_reloc *r = &so->reloc[i];
-
- if ((ret = nouveau_pushbuf_emit_reloc(chan, chan->cur - nr +
- r->push_offset, r->bo, r->data,
- 0, r->flags, r->vor, r->tor))) {
- debug_printf("so_emit failed reloc with error %d\n", ret);
- assert(0);
- }
- }
-}
-
-static INLINE void
-so_emit_reloc_markers(struct nouveau_channel *chan, struct nouveau_stateobj *so)
-{
- unsigned i;
- int ret = 0;
-
- if (!so)
- return;
-
- /* If we need to flush in flush notify, then we have a problem anyway. */
- for (i = 0; i < so->cur_reloc; i++) {
- struct nouveau_stateobj_reloc *r = &so->reloc[i];
-
-#ifdef DEBUG_NOUVEAU_STATEOBJ
- if (r->mthd & 0x40000000) {
- debug_printf("error: NI mthd 0x%08X\n", r->mthd);
- continue;
- }
-#endif /* DEBUG_NOUVEAU_STATEOBJ */
-
- /* We don't need to autobind, since there are enough subchannels
- * for all objects we use. If this is changed, account for the extra
- * space in callers of this function.
- */
- assert(r->gr->bound != NOUVEAU_GROBJ_UNBOUND);
-
- /* Some relocs really don't like to be hammered,
- * NOUVEAU_BO_DUMMY makes sure it only
- * happens when needed.
- */
- ret = OUT_RELOC(chan, r->bo, (r->gr->subc << 13) | (1<< 18) |
- r->mthd, (r->flags & (NOUVEAU_BO_VRAM | NOUVEAU_BO_GART
- | NOUVEAU_BO_RDWR)) | NOUVEAU_BO_DUMMY, 0, 0);
- if (ret) {
- debug_printf("OUT_RELOC failed %d\n", ret);
- assert(0);
- }
-
- ret = OUT_RELOC(chan, r->bo, r->data, r->flags |
- NOUVEAU_BO_DUMMY, r->vor, r->tor);
- if (ret) {
- debug_printf("OUT_RELOC failed %d\n", ret);
- assert(0);
- }
- }
-}
-
-#endif
diff --git a/src/gallium/drivers/nouveau/nouveau_winsys.h b/src/gallium/drivers/nouveau/nouveau_winsys.h
index ab480cabd09..484f870bd86 100644
--- a/src/gallium/drivers/nouveau/nouveau_winsys.h
+++ b/src/gallium/drivers/nouveau/nouveau_winsys.h
@@ -9,8 +9,9 @@
#include "nouveau/nouveau_device.h"
#include "nouveau/nouveau_grobj.h"
#include "nouveau/nouveau_notifier.h"
-#include "nouveau/nouveau_resource.h"
-#include "nouveau/nouveau_pushbuf.h"
+#ifndef NOUVEAU_NVC0
+#include "nouveau/nv04_pushbuf.h"
+#endif
#ifndef NV04_PFIFO_MAX_PACKET_LEN
#define NV04_PFIFO_MAX_PACKET_LEN 2047
@@ -41,4 +42,7 @@ nvfx_screen_create(struct pipe_winsys *ws, struct nouveau_device *);
extern struct pipe_screen *
nv50_screen_create(struct pipe_winsys *ws, struct nouveau_device *);
+extern struct pipe_screen *
+nvc0_screen_create(struct pipe_winsys *ws, struct nouveau_device *);
+
#endif
diff --git a/src/gallium/drivers/nouveau/nv_object.xml.h b/src/gallium/drivers/nouveau/nv_object.xml.h
index cb7653c3fe2..a5b0d0478c8 100644
--- a/src/gallium/drivers/nouveau/nv_object.xml.h
+++ b/src/gallium/drivers/nouveau/nv_object.xml.h
@@ -8,12 +8,10 @@ http://0x04.net/cgit/index.cgi/rules-ng-ng
git clone git://0x04.net/rules-ng-ng
The rules-ng-ng source files this header was generated from are:
-- nv30-40_3d.xml ( 31709 bytes, from 2010-09-05 07:53:14)
-- copyright.xml ( 6503 bytes, from 2010-04-10 23:15:50)
-- nv_3ddefs.xml ( 15193 bytes, from 2010-09-05 07:50:15)
-- nv_defs.xml ( 4437 bytes, from 2010-08-05 19:38:53)
-- nv_object.xml ( 10424 bytes, from 2010-08-05 19:38:53)
-- nvchipsets.xml ( 2824 bytes, from 2010-08-05 19:38:53)
+- nv_object.xml ( 11547 bytes, from 2010-10-24 15:29:34)
+- copyright.xml ( 6498 bytes, from 2010-10-03 13:18:37)
+- nvchipsets.xml ( 2907 bytes, from 2010-10-15 16:28:21)
+- nv_defs.xml ( 4437 bytes, from 2010-07-06 07:43:58)
Copyright (C) 2006-2010 by the following authors:
- Artur Huillet <arthur.huillet@free.fr> (ahuillet)
@@ -37,7 +35,7 @@ Copyright (C) 2006-2010 by the following authors:
- Mark Carey <mark.carey@gmail.com> (careym)
- Matthieu Castet <matthieu.castet@parrot.com> (mat-c)
- nvidiaman <nvidiaman@users.sf.net> (nvidiaman)
-- Patrice Mandin <mandin.patrice@orange.fr> (pmandin, pmdata)
+- Patrice Mandin <patmandin@gmail.com> (pmandin, pmdata)
- Pekka Paalanen <pq@iki.fi> (pq, ppaalanen)
- Peter Popov <ironpeter@users.sf.net> (ironpeter)
- Richard Hughes <hughsient@users.sf.net> (hughsient)
@@ -180,6 +178,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#define NV50_COMPUTE 0x000050c0
#define NVA3_COMPUTE 0x000085c0
#define NVC0_COMPUTE 0x000090c0
+#define NV84_CRYPT 0x000074c1
#define NV01_SUBCHAN__SIZE 0x00002000
#define NV01_SUBCHAN 0x00000000
@@ -194,9 +193,9 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#define NV84_SUBCHAN_QUERY_GET 0x0000001c
-#define NV84_SUBCHAN_UNK20 0x00000020
+#define NV84_SUBCHAN_QUERY_INTR 0x00000020
-#define NV84_SUBCHAN_UNK24 0x00000024
+#define NV84_SUBCHAN_WRCACHE_FLUSH 0x00000024
#define NV10_SUBCHAN_REF_CNT 0x00000050
@@ -209,7 +208,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#define NV11_SUBCHAN_SEMAPHORE_RELEASE 0x0000006c
-#define NV50_SUBCHAN_UNK80 0x00000080
+#define NV40_SUBCHAN_YIELD 0x00000080
#define NV01_GRAPH 0x00000000
@@ -227,5 +226,43 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#define NV40_GRAPH_PM_TRIGGER 0x00000140
+#define NVC0_SUBCHAN__SIZE 0x00008000
+#define NVC0_SUBCHAN 0x00000000
+
+#define NVC0_SUBCHAN_OBJECT 0x00000000
+
+
+#define NVC0_SUBCHAN_QUERY_ADDRESS_HIGH 0x00000010
+
+#define NVC0_SUBCHAN_QUERY_ADDRESS_LOW 0x00000014
+
+#define NVC0_SUBCHAN_QUERY_SEQUENCE 0x00000018
+
+#define NVC0_SUBCHAN_QUERY_GET 0x0000001c
+
+#define NVC0_SUBCHAN_REF_CNT 0x00000050
+
+#define NVC0_GRAPH 0x00000000
+
+#define NVC0_GRAPH_NOP 0x00000100
+
+#define NVC0_GRAPH_NOTIFY_ADDRESS_HIGH 0x00000104
+
+#define NVC0_GRAPH_NOTIFY_ADDRESS_LOW 0x00000108
+
+#define NVC0_GRAPH_NOTIFY 0x0000010c
+#define NVC0_GRAPH_NOTIFY_WRITE 0x00000000
+#define NVC0_GRAPH_NOTIFY_WRITE_AND_AWAKEN 0x00000001
+
+#define NVC0_GRAPH_SERIALIZE 0x00000110
+
+#define NVC0_GRAPH_MACRO_UPLOAD_POS 0x00000114
+
+#define NVC0_GRAPH_MACRO_UPLOAD_DATA 0x00000118
+
+#define NVC0_GRAPH_MACRO_ID 0x0000011c
+
+#define NVC0_GRAPH_MACRO_POS 0x00000120
+
#endif /* NV_OBJECT_XML */
diff --git a/src/gallium/drivers/nv50/Makefile b/src/gallium/drivers/nv50/Makefile
index bf1e8201a08..02bcc26cfb3 100644
--- a/src/gallium/drivers/nv50/Makefile
+++ b/src/gallium/drivers/nv50/Makefile
@@ -4,13 +4,10 @@ include $(TOP)/configs/current
LIBNAME = nv50
C_SOURCES = \
- nv50_buffer.c \
- nv50_clear.c \
nv50_context.c \
nv50_draw.c \
nv50_formats.c \
nv50_miptree.c \
- nv50_query.c \
nv50_resource.c \
nv50_screen.c \
nv50_state.c \
@@ -19,7 +16,6 @@ C_SOURCES = \
nv50_tex.c \
nv50_transfer.c \
nv50_vbo.c \
- nv50_push.c \
nv50_program.c \
nv50_shader_state.c \
nv50_pc.c \
@@ -27,6 +23,11 @@ C_SOURCES = \
nv50_pc_emit.c \
nv50_tgsi_to_nc.c \
nv50_pc_optimize.c \
- nv50_pc_regalloc.c
+ nv50_pc_regalloc.c \
+ nv50_push.c \
+ nv50_query.c
+
+LIBRARY_INCLUDES = \
+ $(LIBDRM_CFLAGS)
include ../../Makefile.template
diff --git a/src/gallium/drivers/nv50/SConscript b/src/gallium/drivers/nv50/SConscript
index 8e7892a9ab6..3c8a7276b97 100644
--- a/src/gallium/drivers/nv50/SConscript
+++ b/src/gallium/drivers/nv50/SConscript
@@ -5,13 +5,10 @@ env = env.Clone()
nv50 = env.ConvenienceLibrary(
target = 'nv50',
source = [
- 'nv50_buffer.c',
- 'nv50_clear.c',
'nv50_context.c',
'nv50_draw.c',
'nv50_formats.c',
'nv50_miptree.c',
- 'nv50_query.c',
'nv50_resource.c',
'nv50_screen.c',
'nv50_state.c',
@@ -20,7 +17,6 @@ nv50 = env.ConvenienceLibrary(
'nv50_tex.c',
'nv50_transfer.c',
'nv50_vbo.c',
- 'nv50_push.c',
'nv50_program.c',
'nv50_shader_state.c',
'nv50_pc.c',
@@ -29,6 +25,8 @@ nv50 = env.ConvenienceLibrary(
'nv50_tgsi_to_nc.c',
'nv50_pc_optimize.c',
'nv50_pc_regalloc.c',
+ 'nv50_push.c',
+ 'nv50_query.c'
])
Export('nv50')
diff --git a/src/gallium/drivers/nv50/nv50_2d.xml.h b/src/gallium/drivers/nv50/nv50_2d.xml.h
new file mode 100644
index 00000000000..bc9bcf7839e
--- /dev/null
+++ b/src/gallium/drivers/nv50/nv50_2d.xml.h
@@ -0,0 +1,393 @@
+#ifndef NV50_2D_XML
+#define NV50_2D_XML
+
+/* Autogenerated file, DO NOT EDIT manually!
+
+This file was generated by the rules-ng-ng headergen tool in this git repository:
+http://0x04.net/cgit/index.cgi/rules-ng-ng
+git clone git://0x04.net/rules-ng-ng
+
+The rules-ng-ng source files this header was generated from are:
+- nv50_2d.xml ( 9799 bytes, from 2010-12-28 17:17:11)
+- copyright.xml ( 6452 bytes, from 2010-12-15 23:45:18)
+- nv_object.xml ( 11898 bytes, from 2010-12-28 17:17:11)
+- nvchipsets.xml ( 3074 bytes, from 2010-12-15 23:45:18)
+- nv_defs.xml ( 4437 bytes, from 2010-12-15 23:45:18)
+- nv50_defs.xml ( 4487 bytes, from 2010-12-15 23:45:18)
+
+Copyright (C) 2006-2010 by the following authors:
+- Artur Huillet <arthur.huillet@free.fr> (ahuillet)
+- Ben Skeggs (darktama, darktama_)
+- B. R. <koala_br@users.sourceforge.net> (koala_br)
+- Carlos Martin <carlosmn@users.sf.net> (carlosmn)
+- Christoph Bumiller <e0425955@student.tuwien.ac.at> (calim, chrisbmr)
+- Dawid Gajownik <gajownik@users.sf.net> (gajownik)
+- Dmitry Baryshkov
+- Dmitry Eremin-Solenikov <lumag@users.sf.net> (lumag)
+- EdB <edb_@users.sf.net> (edb_)
+- Erik Waling <erikwailing@users.sf.net> (erikwaling)
+- Francisco Jerez <currojerez@riseup.net> (curro)
+- imirkin <imirkin@users.sf.net> (imirkin)
+- jb17bsome <jb17bsome@bellsouth.net> (jb17bsome)
+- Jeremy Kolb <kjeremy@users.sf.net> (kjeremy)
+- Laurent Carlier <lordheavym@gmail.com> (lordheavy)
+- Luca Barbieri <luca@luca-barbieri.com> (lb, lb1)
+- Maarten Maathuis <madman2003@gmail.com> (stillunknown)
+- Marcin Kościelnicki <koriakin@0x04.net> (mwk, koriakin)
+- Mark Carey <mark.carey@gmail.com> (careym)
+- Matthieu Castet <matthieu.castet@parrot.com> (mat-c)
+- nvidiaman <nvidiaman@users.sf.net> (nvidiaman)
+- Patrice Mandin <patmandin@gmail.com> (pmandin, pmdata)
+- Pekka Paalanen <pq@iki.fi> (pq, ppaalanen)
+- Peter Popov <ironpeter@users.sf.net> (ironpeter)
+- Richard Hughes <hughsient@users.sf.net> (hughsient)
+- Rudi Cilibrasi <cilibrar@users.sf.net> (cilibrar)
+- Serge Martin
+- Simon Raffeiner
+- Stephane Loeuillet <leroutier@users.sf.net> (leroutier)
+- Stephane Marchesin <stephane.marchesin@gmail.com> (marcheu)
+- sturmflut <sturmflut@users.sf.net> (sturmflut)
+- Sylvain Munaut <tnt@246tNt.com>
+- Victor Stinner <victor.stinner@haypocalc.com> (haypo)
+- Wladmir van der Laan <laanwj@gmail.com> (miathan6)
+- Younes Manton <younes.m@gmail.com> (ymanton)
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice (including the
+next paragraph) shall be included in all copies or substantial
+portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE COPYRIGHT OWNER(S) AND/OR ITS SUPPLIERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+*/
+
+
+
+
+#define NV50_2D_DMA_NOTIFY 0x00000180
+
+#define NV50_2D_DMA_DST 0x00000184
+
+#define NV50_2D_DMA_SRC 0x00000188
+
+#define NV50_2D_DMA_COND 0x0000018c
+
+#define NV50_2D_DST_FORMAT 0x00000200
+
+#define NV50_2D_DST_LINEAR 0x00000204
+
+#define NV50_2D_DST_TILE_MODE 0x00000208
+
+#define NV50_2D_DST_DEPTH 0x0000020c
+
+#define NV50_2D_DST_LAYER 0x00000210
+
+#define NV50_2D_DST_PITCH 0x00000214
+
+#define NV50_2D_DST_WIDTH 0x00000218
+
+#define NV50_2D_DST_HEIGHT 0x0000021c
+
+#define NV50_2D_DST_ADDRESS_HIGH 0x00000220
+
+#define NV50_2D_DST_ADDRESS_LOW 0x00000224
+
+#define NV50_2D_UNK228 0x00000228
+
+#define NV50_2D_SRC_FORMAT 0x00000230
+
+#define NV50_2D_SRC_LINEAR 0x00000234
+
+#define NV50_2D_SRC_TILE_MODE 0x00000238
+
+#define NV50_2D_SRC_DEPTH 0x0000023c
+
+#define NV50_2D_SRC_LAYER 0x00000240
+
+#define NV50_2D_SRC_PITCH 0x00000244
+#define NV50_2D_SRC_PITCH__MAX 0x00040000
+
+#define NV50_2D_SRC_WIDTH 0x00000248
+#define NV50_2D_SRC_WIDTH__MAX 0x00010000
+
+#define NV50_2D_SRC_HEIGHT 0x0000024c
+#define NV50_2D_SRC_HEIGHT__MAX 0x00010000
+
+#define NV50_2D_SRC_ADDRESS_HIGH 0x00000250
+
+#define NV50_2D_SRC_ADDRESS_LOW 0x00000254
+
+#define NV50_2D_UNK258 0x00000258
+
+#define NV50_2D_UNK260 0x00000260
+
+#define NV50_2D_COND_ADDRESS_HIGH 0x00000264
+
+#define NV50_2D_COND_ADDRESS_LOW 0x00000268
+
+#define NV50_2D_COND_MODE 0x0000026c
+#define NV50_2D_COND_MODE_NEVER 0x00000000
+#define NV50_2D_COND_MODE_ALWAYS 0x00000001
+#define NV50_2D_COND_MODE_RES_NON_ZERO 0x00000002
+#define NV50_2D_COND_MODE_EQUAL 0x00000003
+#define NV50_2D_COND_MODE_NOT_EQUAL 0x00000004
+
+#define NV50_2D_CLIP_X 0x00000280
+
+#define NV50_2D_CLIP_Y 0x00000284
+
+#define NV50_2D_CLIP_W 0x00000288
+
+#define NV50_2D_CLIP_H 0x0000028c
+
+#define NV50_2D_CLIP_ENABLE 0x00000290
+
+#define NV50_2D_COLOR_KEY_FORMAT 0x00000294
+#define NV50_2D_COLOR_KEY_FORMAT_16BPP 0x00000000
+#define NV50_2D_COLOR_KEY_FORMAT_15BPP 0x00000001
+#define NV50_2D_COLOR_KEY_FORMAT_24BPP 0x00000002
+#define NV50_2D_COLOR_KEY_FORMAT_30BPP 0x00000003
+#define NV50_2D_COLOR_KEY_FORMAT_8BPP 0x00000004
+#define NV50_2D_COLOR_KEY_FORMAT_16BPP2 0x00000005
+#define NV50_2D_COLOR_KEY_FORMAT_32BPP 0x00000006
+
+#define NV50_2D_COLOR_KEY 0x00000298
+
+#define NV50_2D_COLOR_KEY_ENABLE 0x0000029c
+
+#define NV50_2D_ROP 0x000002a0
+
+#define NV50_2D_BETA1 0x000002a4
+
+#define NV50_2D_BETA4 0x000002a8
+
+#define NV50_2D_OPERATION 0x000002ac
+#define NV50_2D_OPERATION_SRCCOPY_AND 0x00000000
+#define NV50_2D_OPERATION_ROP_AND 0x00000001
+#define NV50_2D_OPERATION_BLEND_AND 0x00000002
+#define NV50_2D_OPERATION_SRCCOPY 0x00000003
+#define NV50_2D_OPERATION_UNK4 0x00000004
+#define NV50_2D_OPERATION_SRCCOPY_PREMULT 0x00000005
+#define NV50_2D_OPERATION_BLEND_PREMULT 0x00000006
+
+#define NV50_2D_UNK2B0 0x000002b0
+#define NV50_2D_UNK2B0_UNK0__MASK 0x0000003f
+#define NV50_2D_UNK2B0_UNK0__SHIFT 0
+#define NV50_2D_UNK2B0_UNK1__MASK 0x00003f00
+#define NV50_2D_UNK2B0_UNK1__SHIFT 8
+
+#define NV50_2D_PATTERN_SELECT 0x000002b4
+#define NV50_2D_PATTERN_SELECT_MONO_8X8 0x00000000
+#define NV50_2D_PATTERN_SELECT_MONO_64X1 0x00000001
+#define NV50_2D_PATTERN_SELECT_MONO_1X64 0x00000002
+#define NV50_2D_PATTERN_SELECT_COLOR 0x00000003
+
+#define NV50_2D_PATTERN_COLOR_FORMAT 0x000002e8
+#define NV50_2D_PATTERN_COLOR_FORMAT_16BPP 0x00000000
+#define NV50_2D_PATTERN_COLOR_FORMAT_15BPP 0x00000001
+#define NV50_2D_PATTERN_COLOR_FORMAT_32BPP 0x00000002
+#define NV50_2D_PATTERN_COLOR_FORMAT_8BPP 0x00000003
+#define NV50_2D_PATTERN_COLOR_FORMAT_UNK4 0x00000004
+#define NV50_2D_PATTERN_COLOR_FORMAT_UNK5 0x00000005
+
+#define NV50_2D_PATTERN_MONO_FORMAT 0x000002ec
+#define NV50_2D_PATTERN_MONO_FORMAT_CGA6 0x00000000
+#define NV50_2D_PATTERN_MONO_FORMAT_LE 0x00000001
+
+#define NV50_2D_PATTERN_COLOR(i0) (0x000002f0 + 0x4*(i0))
+#define NV50_2D_PATTERN_COLOR__ESIZE 0x00000004
+#define NV50_2D_PATTERN_COLOR__LEN 0x00000002
+
+#define NV50_2D_PATTERN_BITMAP(i0) (0x000002f8 + 0x4*(i0))
+#define NV50_2D_PATTERN_BITMAP__ESIZE 0x00000004
+#define NV50_2D_PATTERN_BITMAP__LEN 0x00000002
+
+#define NV50_2D_PATTERN_X8R8G8B8(i0) (0x00000300 + 0x4*(i0))
+#define NV50_2D_PATTERN_X8R8G8B8__ESIZE 0x00000004
+#define NV50_2D_PATTERN_X8R8G8B8__LEN 0x00000040
+#define NV50_2D_PATTERN_X8R8G8B8_B__MASK 0x000000ff
+#define NV50_2D_PATTERN_X8R8G8B8_B__SHIFT 0
+#define NV50_2D_PATTERN_X8R8G8B8_G__MASK 0x0000ff00
+#define NV50_2D_PATTERN_X8R8G8B8_G__SHIFT 8
+#define NV50_2D_PATTERN_X8R8G8B8_R__MASK 0x00ff0000
+#define NV50_2D_PATTERN_X8R8G8B8_R__SHIFT 16
+
+#define NV50_2D_PATTERN_R5G6B5(i0) (0x00000400 + 0x4*(i0))
+#define NV50_2D_PATTERN_R5G6B5__ESIZE 0x00000004
+#define NV50_2D_PATTERN_R5G6B5__LEN 0x00000020
+#define NV50_2D_PATTERN_R5G6B5_B0__MASK 0x0000001f
+#define NV50_2D_PATTERN_R5G6B5_B0__SHIFT 0
+#define NV50_2D_PATTERN_R5G6B5_G0__MASK 0x000007e0
+#define NV50_2D_PATTERN_R5G6B5_G0__SHIFT 5
+#define NV50_2D_PATTERN_R5G6B5_R0__MASK 0x0000f800
+#define NV50_2D_PATTERN_R5G6B5_R0__SHIFT 11
+#define NV50_2D_PATTERN_R5G6B5_B1__MASK 0x001f0000
+#define NV50_2D_PATTERN_R5G6B5_B1__SHIFT 16
+#define NV50_2D_PATTERN_R5G6B5_G1__MASK 0x07e00000
+#define NV50_2D_PATTERN_R5G6B5_G1__SHIFT 21
+#define NV50_2D_PATTERN_R5G6B5_R1__MASK 0xf8000000
+#define NV50_2D_PATTERN_R5G6B5_R1__SHIFT 27
+
+#define NV50_2D_PATTERN_X1R5G5B5(i0) (0x00000480 + 0x4*(i0))
+#define NV50_2D_PATTERN_X1R5G5B5__ESIZE 0x00000004
+#define NV50_2D_PATTERN_X1R5G5B5__LEN 0x00000020
+#define NV50_2D_PATTERN_X1R5G5B5_B0__MASK 0x0000001f
+#define NV50_2D_PATTERN_X1R5G5B5_B0__SHIFT 0
+#define NV50_2D_PATTERN_X1R5G5B5_G0__MASK 0x000003e0
+#define NV50_2D_PATTERN_X1R5G5B5_G0__SHIFT 5
+#define NV50_2D_PATTERN_X1R5G5B5_R0__MASK 0x00007c00
+#define NV50_2D_PATTERN_X1R5G5B5_R0__SHIFT 10
+#define NV50_2D_PATTERN_X1R5G5B5_B1__MASK 0x001f0000
+#define NV50_2D_PATTERN_X1R5G5B5_B1__SHIFT 16
+#define NV50_2D_PATTERN_X1R5G5B5_G1__MASK 0x03e00000
+#define NV50_2D_PATTERN_X1R5G5B5_G1__SHIFT 21
+#define NV50_2D_PATTERN_X1R5G5B5_R1__MASK 0x7c000000
+#define NV50_2D_PATTERN_X1R5G5B5_R1__SHIFT 26
+
+#define NV50_2D_PATTERN_Y8(i0) (0x00000500 + 0x4*(i0))
+#define NV50_2D_PATTERN_Y8__ESIZE 0x00000004
+#define NV50_2D_PATTERN_Y8__LEN 0x00000010
+#define NV50_2D_PATTERN_Y8_Y0__MASK 0x000000ff
+#define NV50_2D_PATTERN_Y8_Y0__SHIFT 0
+#define NV50_2D_PATTERN_Y8_Y1__MASK 0x0000ff00
+#define NV50_2D_PATTERN_Y8_Y1__SHIFT 8
+#define NV50_2D_PATTERN_Y8_Y2__MASK 0x00ff0000
+#define NV50_2D_PATTERN_Y8_Y2__SHIFT 16
+#define NV50_2D_PATTERN_Y8_Y3__MASK 0xff000000
+#define NV50_2D_PATTERN_Y8_Y3__SHIFT 24
+
+#define NV50_2D_DRAW_SHAPE 0x00000580
+#define NV50_2D_DRAW_SHAPE_POINTS 0x00000000
+#define NV50_2D_DRAW_SHAPE_LINES 0x00000001
+#define NV50_2D_DRAW_SHAPE_LINE_STRIP 0x00000002
+#define NV50_2D_DRAW_SHAPE_TRIANGLES 0x00000003
+#define NV50_2D_DRAW_SHAPE_RECTANGLES 0x00000004
+
+#define NV50_2D_DRAW_COLOR_FORMAT 0x00000584
+
+#define NV50_2D_DRAW_COLOR 0x00000588
+
+#define NV50_2D_UNK58C 0x0000058c
+#define NV50_2D_UNK58C_0 0x00000001
+#define NV50_2D_UNK58C_1 0x00000010
+#define NV50_2D_UNK58C_2 0x00000100
+#define NV50_2D_UNK58C_3 0x00001000
+
+#define NV50_2D_DRAW_POINT16 0x000005e0
+#define NV50_2D_DRAW_POINT16_X__MASK 0x0000ffff
+#define NV50_2D_DRAW_POINT16_X__SHIFT 0
+#define NV50_2D_DRAW_POINT16_Y__MASK 0xffff0000
+#define NV50_2D_DRAW_POINT16_Y__SHIFT 16
+
+#define NV50_2D_DRAW_POINT32_X(i0) (0x00000600 + 0x8*(i0))
+#define NV50_2D_DRAW_POINT32_X__ESIZE 0x00000008
+#define NV50_2D_DRAW_POINT32_X__LEN 0x00000040
+
+#define NV50_2D_DRAW_POINT32_Y(i0) (0x00000604 + 0x8*(i0))
+#define NV50_2D_DRAW_POINT32_Y__ESIZE 0x00000008
+#define NV50_2D_DRAW_POINT32_Y__LEN 0x00000040
+
+#define NV50_2D_SIFC_BITMAP_ENABLE 0x00000800
+
+#define NV50_2D_SIFC_FORMAT 0x00000804
+
+#define NV50_2D_SIFC_BITMAP_FORMAT 0x00000808
+#define NV50_2D_SIFC_BITMAP_FORMAT_I1 0x00000000
+#define NV50_2D_SIFC_BITMAP_FORMAT_I4 0x00000001
+#define NV50_2D_SIFC_BITMAP_FORMAT_I8 0x00000002
+
+#define NV50_2D_SIFC_BITMAP_LSB_FIRST 0x0000080c
+
+#define NV50_2D_SIFC_BITMAP_LINE_PACK_MODE 0x00000810
+#define NV50_2D_SIFC_BITMAP_LINE_PACK_MODE_PACKED 0x00000000
+#define NV50_2D_SIFC_BITMAP_LINE_PACK_MODE_ALIGN_BYTE 0x00000001
+#define NV50_2D_SIFC_BITMAP_LINE_PACK_MODE_ALIGN_WORD 0x00000002
+
+#define NV50_2D_SIFC_BITMAP_COLOR_BIT0 0x00000814
+
+#define NV50_2D_SIFC_BITMAP_COLOR_BIT1 0x00000818
+
+#define NV50_2D_SIFC_BITMAP_WRITE_BIT0_ENABLE 0x0000081c
+
+#define NV50_2D_SIFC_WIDTH 0x00000838
+
+#define NV50_2D_SIFC_HEIGHT 0x0000083c
+
+#define NV50_2D_SIFC_DX_DU_FRACT 0x00000840
+
+#define NV50_2D_SIFC_DX_DU_INT 0x00000844
+
+#define NV50_2D_SIFC_DY_DV_FRACT 0x00000848
+
+#define NV50_2D_SIFC_DY_DV_INT 0x0000084c
+
+#define NV50_2D_SIFC_DST_X_FRACT 0x00000850
+
+#define NV50_2D_SIFC_DST_X_INT 0x00000854
+
+#define NV50_2D_SIFC_DST_Y_FRACT 0x00000858
+
+#define NV50_2D_SIFC_DST_Y_INT 0x0000085c
+
+#define NV50_2D_SIFC_DATA 0x00000860
+
+#define NV50_2D_UNK0870 0x00000870
+
+#define NV50_2D_UNK0880 0x00000880
+
+#define NV50_2D_UNK0884 0x00000884
+
+#define NV50_2D_UNK0888 0x00000888
+
+#define NV50_2D_BLIT_CONTROL 0x0000088c
+#define NV50_2D_BLIT_CONTROL_ORIGIN__MASK 0x00000001
+#define NV50_2D_BLIT_CONTROL_ORIGIN__SHIFT 0
+#define NV50_2D_BLIT_CONTROL_ORIGIN_CENTER 0x00000000
+#define NV50_2D_BLIT_CONTROL_ORIGIN_CORNER 0x00000001
+#define NV50_2D_BLIT_CONTROL_FILTER__MASK 0x00000010
+#define NV50_2D_BLIT_CONTROL_FILTER__SHIFT 4
+#define NV50_2D_BLIT_CONTROL_FILTER_POINT_SAMPLE 0x00000000
+#define NV50_2D_BLIT_CONTROL_FILTER_BILINEAR 0x00000010
+
+#define NV50_2D_BLIT_DST_X 0x000008b0
+
+#define NV50_2D_BLIT_DST_Y 0x000008b4
+
+#define NV50_2D_BLIT_DST_W 0x000008b8
+
+#define NV50_2D_BLIT_DST_H 0x000008bc
+
+#define NV50_2D_BLIT_DU_DX_FRACT 0x000008c0
+
+#define NV50_2D_BLIT_DU_DX_INT 0x000008c4
+
+#define NV50_2D_BLIT_DV_DY_FRACT 0x000008c8
+
+#define NV50_2D_BLIT_DV_DY_INT 0x000008cc
+
+#define NV50_2D_BLIT_SRC_X_FRACT 0x000008d0
+
+#define NV50_2D_BLIT_SRC_X_INT 0x000008d4
+
+#define NV50_2D_BLIT_SRC_Y_FRACT 0x000008d8
+
+#define NV50_2D_BLIT_SRC_Y_INT 0x000008dc
+
+#define NVC0_2D_FIRMWARE(i0) (0x000008e0 + 0x4*(i0))
+#define NVC0_2D_FIRMWARE__ESIZE 0x00000004
+#define NVC0_2D_FIRMWARE__LEN 0x00000020
+
+
+#endif /* NV50_2D_XML */
diff --git a/src/gallium/drivers/nv50/nv50_3d.xml.h b/src/gallium/drivers/nv50/nv50_3d.xml.h
new file mode 100644
index 00000000000..9bb3211728c
--- /dev/null
+++ b/src/gallium/drivers/nv50/nv50_3d.xml.h
@@ -0,0 +1,2084 @@
+#ifndef NV50_3D_XML
+#define NV50_3D_XML
+
+/* Autogenerated file, DO NOT EDIT manually!
+
+This file was generated by the rules-ng-ng headergen tool in this git repository:
+http://0x04.net/cgit/index.cgi/rules-ng-ng
+git clone git://0x04.net/rules-ng-ng
+
+The rules-ng-ng source files this header was generated from are:
+- nv50_3d.xml ( 64479 bytes, from 2011-02-27 17:58:08)
+- copyright.xml ( 6452 bytes, from 2010-12-15 23:45:18)
+- nv_defs.xml ( 4437 bytes, from 2010-12-15 23:45:18)
+- nv50_defs.xml ( 4487 bytes, from 2010-12-15 23:45:18)
+- nv_3ddefs.xml ( 16394 bytes, from 2010-12-15 23:45:18)
+- nv_object.xml ( 12191 bytes, from 2011-02-27 17:58:08)
+- nvchipsets.xml ( 3074 bytes, from 2011-02-27 17:58:08)
+
+Copyright (C) 2006-2011 by the following authors:
+- Artur Huillet <arthur.huillet@free.fr> (ahuillet)
+- Ben Skeggs (darktama, darktama_)
+- B. R. <koala_br@users.sourceforge.net> (koala_br)
+- Carlos Martin <carlosmn@users.sf.net> (carlosmn)
+- Christoph Bumiller <e0425955@student.tuwien.ac.at> (calim, chrisbmr)
+- Dawid Gajownik <gajownik@users.sf.net> (gajownik)
+- Dmitry Baryshkov
+- Dmitry Eremin-Solenikov <lumag@users.sf.net> (lumag)
+- EdB <edb_@users.sf.net> (edb_)
+- Erik Waling <erikwailing@users.sf.net> (erikwaling)
+- Francisco Jerez <currojerez@riseup.net> (curro)
+- imirkin <imirkin@users.sf.net> (imirkin)
+- jb17bsome <jb17bsome@bellsouth.net> (jb17bsome)
+- Jeremy Kolb <kjeremy@users.sf.net> (kjeremy)
+- Laurent Carlier <lordheavym@gmail.com> (lordheavy)
+- Luca Barbieri <luca@luca-barbieri.com> (lb, lb1)
+- Maarten Maathuis <madman2003@gmail.com> (stillunknown)
+- Marcin Kościelnicki <koriakin@0x04.net> (mwk, koriakin)
+- Mark Carey <mark.carey@gmail.com> (careym)
+- Matthieu Castet <matthieu.castet@parrot.com> (mat-c)
+- nvidiaman <nvidiaman@users.sf.net> (nvidiaman)
+- Patrice Mandin <patmandin@gmail.com> (pmandin, pmdata)
+- Pekka Paalanen <pq@iki.fi> (pq, ppaalanen)
+- Peter Popov <ironpeter@users.sf.net> (ironpeter)
+- Richard Hughes <hughsient@users.sf.net> (hughsient)
+- Rudi Cilibrasi <cilibrar@users.sf.net> (cilibrar)
+- Serge Martin
+- Simon Raffeiner
+- Stephane Loeuillet <leroutier@users.sf.net> (leroutier)
+- Stephane Marchesin <stephane.marchesin@gmail.com> (marcheu)
+- sturmflut <sturmflut@users.sf.net> (sturmflut)
+- Sylvain Munaut <tnt@246tNt.com>
+- Victor Stinner <victor.stinner@haypocalc.com> (haypo)
+- Wladmir van der Laan <laanwj@gmail.com> (miathan6)
+- Younes Manton <younes.m@gmail.com> (ymanton)
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice (including the
+next paragraph) shall be included in all copies or substantial
+portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE COPYRIGHT OWNER(S) AND/OR ITS SUPPLIERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+*/
+
+#define NV50_3D_SERIALIZE 0x00000110
+
+#define NV50_3D_DMA_NOTIFY 0x00000180
+
+#define NV50_3D_DMA_ZETA 0x00000184
+
+#define NV50_3D_DMA_QUERY 0x00000188
+
+#define NV50_3D_DMA_VTXBUF 0x0000018c
+
+#define NV50_3D_DMA_LOCAL 0x00000190
+
+#define NV50_3D_DMA_STACK 0x00000194
+
+#define NV50_3D_DMA_CODE_CB 0x00000198
+
+#define NV50_3D_DMA_TSC 0x0000019c
+
+#define NV50_3D_DMA_TIC 0x000001a0
+
+#define NV50_3D_DMA_TEXTURE 0x000001a4
+
+#define NV50_3D_DMA_STRMOUT 0x000001a8
+
+#define NV50_3D_DMA_CLIPID 0x000001ac
+
+#define NV50_3D_DMA_COLOR(i0) (0x000001c0 + 0x4*(i0))
+#define NV50_3D_DMA_COLOR__ESIZE 0x00000004
+#define NV50_3D_DMA_COLOR__LEN 0x00000008
+
+#define NV50_3D_RT(i0) (0x00000200 + 0x20*(i0))
+#define NV50_3D_RT__ESIZE 0x00000020
+#define NV50_3D_RT__LEN 0x00000008
+
+#define NV50_3D_RT_ADDRESS_HIGH(i0) (0x00000200 + 0x20*(i0))
+
+#define NV50_3D_RT_ADDRESS_LOW(i0) (0x00000204 + 0x20*(i0))
+
+#define NV50_3D_RT_FORMAT(i0) (0x00000208 + 0x20*(i0))
+
+#define NV50_3D_RT_TILE_MODE(i0) (0x0000020c + 0x20*(i0))
+#define NV50_3D_RT_TILE_MODE_X__MASK 0x0000000f
+#define NV50_3D_RT_TILE_MODE_X__SHIFT 0
+#define NV50_3D_RT_TILE_MODE_Y__MASK 0x000000f0
+#define NV50_3D_RT_TILE_MODE_Y__SHIFT 4
+#define NV50_3D_RT_TILE_MODE_Z__MASK 0x00000f00
+#define NV50_3D_RT_TILE_MODE_Z__SHIFT 8
+
+#define NV50_3D_RT_LAYER_STRIDE(i0) (0x00000210 + 0x20*(i0))
+#define NV50_3D_RT_LAYER_STRIDE__SHR 2
+
+#define NV50_3D_RT_UNK14(i0) (0x00000214 + 0x20*(i0))
+
+#define NV50_3D_VTX_ATTR_1F(i0) (0x00000300 + 0x4*(i0))
+#define NV50_3D_VTX_ATTR_1F__ESIZE 0x00000004
+#define NV50_3D_VTX_ATTR_1F__LEN 0x00000010
+
+#define NV50_3D_VTX_ATTR_2H(i0) (0x00000340 + 0x4*(i0))
+#define NV50_3D_VTX_ATTR_2H__ESIZE 0x00000004
+#define NV50_3D_VTX_ATTR_2H__LEN 0x00000010
+#define NV50_3D_VTX_ATTR_2H_X__MASK 0x0000ffff
+#define NV50_3D_VTX_ATTR_2H_X__SHIFT 0
+#define NV50_3D_VTX_ATTR_2H_Y__MASK 0xffff0000
+#define NV50_3D_VTX_ATTR_2H_Y__SHIFT 16
+
+#define NV50_3D_VTX_ATTR_2F_X(i0) (0x00000380 + 0x8*(i0))
+#define NV50_3D_VTX_ATTR_2F_X__ESIZE 0x00000008
+#define NV50_3D_VTX_ATTR_2F_X__LEN 0x00000010
+
+#define NV50_3D_VTX_ATTR_2F_Y(i0) (0x00000384 + 0x8*(i0))
+#define NV50_3D_VTX_ATTR_2F_Y__ESIZE 0x00000008
+#define NV50_3D_VTX_ATTR_2F_Y__LEN 0x00000010
+
+#define NV50_3D_VTX_ATTR_3F_X(i0) (0x00000400 + 0x10*(i0))
+#define NV50_3D_VTX_ATTR_3F_X__ESIZE 0x00000010
+#define NV50_3D_VTX_ATTR_3F_X__LEN 0x00000010
+
+#define NV50_3D_VTX_ATTR_3F_Y(i0) (0x00000404 + 0x10*(i0))
+#define NV50_3D_VTX_ATTR_3F_Y__ESIZE 0x00000010
+#define NV50_3D_VTX_ATTR_3F_Y__LEN 0x00000010
+
+#define NV50_3D_VTX_ATTR_3F_Z(i0) (0x00000408 + 0x10*(i0))
+#define NV50_3D_VTX_ATTR_3F_Z__ESIZE 0x00000010
+#define NV50_3D_VTX_ATTR_3F_Z__LEN 0x00000010
+
+#define NV50_3D_VTX_ATTR_4F_X(i0) (0x00000500 + 0x10*(i0))
+#define NV50_3D_VTX_ATTR_4F_X__ESIZE 0x00000010
+#define NV50_3D_VTX_ATTR_4F_X__LEN 0x00000010
+
+#define NV50_3D_VTX_ATTR_4F_Y(i0) (0x00000504 + 0x10*(i0))
+#define NV50_3D_VTX_ATTR_4F_Y__ESIZE 0x00000010
+#define NV50_3D_VTX_ATTR_4F_Y__LEN 0x00000010
+
+#define NV50_3D_VTX_ATTR_4F_Z(i0) (0x00000508 + 0x10*(i0))
+#define NV50_3D_VTX_ATTR_4F_Z__ESIZE 0x00000010
+#define NV50_3D_VTX_ATTR_4F_Z__LEN 0x00000010
+
+#define NV50_3D_VTX_ATTR_4F_W(i0) (0x0000050c + 0x10*(i0))
+#define NV50_3D_VTX_ATTR_4F_W__ESIZE 0x00000010
+#define NV50_3D_VTX_ATTR_4F_W__LEN 0x00000010
+
+#define NV50_3D_VTX_ATTR_4H_0(i0) (0x00000600 + 0x8*(i0))
+#define NV50_3D_VTX_ATTR_4H_0__ESIZE 0x00000008
+#define NV50_3D_VTX_ATTR_4H_0__LEN 0x00000010
+#define NV50_3D_VTX_ATTR_4H_0_X__MASK 0x0000ffff
+#define NV50_3D_VTX_ATTR_4H_0_X__SHIFT 0
+#define NV50_3D_VTX_ATTR_4H_0_Y__MASK 0xffff0000
+#define NV50_3D_VTX_ATTR_4H_0_Y__SHIFT 16
+
+#define NV50_3D_VTX_ATTR_4H_1(i0) (0x00000604 + 0x8*(i0))
+#define NV50_3D_VTX_ATTR_4H_1__ESIZE 0x00000008
+#define NV50_3D_VTX_ATTR_4H_1__LEN 0x00000010
+#define NV50_3D_VTX_ATTR_4H_1_Z__MASK 0x0000ffff
+#define NV50_3D_VTX_ATTR_4H_1_Z__SHIFT 0
+#define NV50_3D_VTX_ATTR_4H_1_W__MASK 0xffff0000
+#define NV50_3D_VTX_ATTR_4H_1_W__SHIFT 16
+
+#define NV50_3D_VTX_ATTR_2I(i0) (0x00000680 + 0x4*(i0))
+#define NV50_3D_VTX_ATTR_2I__ESIZE 0x00000004
+#define NV50_3D_VTX_ATTR_2I__LEN 0x00000010
+#define NV50_3D_VTX_ATTR_2I_X__MASK 0x0000ffff
+#define NV50_3D_VTX_ATTR_2I_X__SHIFT 0
+#define NV50_3D_VTX_ATTR_2I_Y__MASK 0xffff0000
+#define NV50_3D_VTX_ATTR_2I_Y__SHIFT 16
+
+#define NV50_3D_VTX_ATTR_2NI(i0) (0x000006c0 + 0x4*(i0))
+#define NV50_3D_VTX_ATTR_2NI__ESIZE 0x00000004
+#define NV50_3D_VTX_ATTR_2NI__LEN 0x00000010
+#define NV50_3D_VTX_ATTR_2NI_X__MASK 0x0000ffff
+#define NV50_3D_VTX_ATTR_2NI_X__SHIFT 0
+#define NV50_3D_VTX_ATTR_2NI_Y__MASK 0xffff0000
+#define NV50_3D_VTX_ATTR_2NI_Y__SHIFT 16
+
+#define NV50_3D_VTX_ATTR_4I_0(i0) (0x00000700 + 0x8*(i0))
+#define NV50_3D_VTX_ATTR_4I_0__ESIZE 0x00000008
+#define NV50_3D_VTX_ATTR_4I_0__LEN 0x00000010
+#define NV50_3D_VTX_ATTR_4I_0_X__MASK 0x0000ffff
+#define NV50_3D_VTX_ATTR_4I_0_X__SHIFT 0
+#define NV50_3D_VTX_ATTR_4I_0_Y__MASK 0xffff0000
+#define NV50_3D_VTX_ATTR_4I_0_Y__SHIFT 16
+
+#define NV50_3D_VTX_ATTR_4I_1(i0) (0x00000704 + 0x8*(i0))
+#define NV50_3D_VTX_ATTR_4I_1__ESIZE 0x00000008
+#define NV50_3D_VTX_ATTR_4I_1__LEN 0x00000010
+#define NV50_3D_VTX_ATTR_4I_1_Z__MASK 0x0000ffff
+#define NV50_3D_VTX_ATTR_4I_1_Z__SHIFT 0
+#define NV50_3D_VTX_ATTR_4I_1_W__MASK 0xffff0000
+#define NV50_3D_VTX_ATTR_4I_1_W__SHIFT 16
+
+#define NV50_3D_VTX_ATTR_4NI_0(i0) (0x00000780 + 0x8*(i0))
+#define NV50_3D_VTX_ATTR_4NI_0__ESIZE 0x00000008
+#define NV50_3D_VTX_ATTR_4NI_0__LEN 0x00000010
+#define NV50_3D_VTX_ATTR_4NI_0_X__MASK 0x0000ffff
+#define NV50_3D_VTX_ATTR_4NI_0_X__SHIFT 0
+#define NV50_3D_VTX_ATTR_4NI_0_Y__MASK 0xffff0000
+#define NV50_3D_VTX_ATTR_4NI_0_Y__SHIFT 16
+
+#define NV50_3D_VTX_ATTR_4NI_1(i0) (0x00000784 + 0x8*(i0))
+#define NV50_3D_VTX_ATTR_4NI_1__ESIZE 0x00000008
+#define NV50_3D_VTX_ATTR_4NI_1__LEN 0x00000010
+#define NV50_3D_VTX_ATTR_4NI_1_Z__MASK 0x0000ffff
+#define NV50_3D_VTX_ATTR_4NI_1_Z__SHIFT 0
+#define NV50_3D_VTX_ATTR_4NI_1_W__MASK 0xffff0000
+#define NV50_3D_VTX_ATTR_4NI_1_W__SHIFT 16
+
+#define NV50_3D_VTX_ATTR_4UB(i0) (0x00000800 + 0x4*(i0))
+#define NV50_3D_VTX_ATTR_4UB__ESIZE 0x00000004
+#define NV50_3D_VTX_ATTR_4UB__LEN 0x00000010
+#define NV50_3D_VTX_ATTR_4UB_X__MASK 0x000000ff
+#define NV50_3D_VTX_ATTR_4UB_X__SHIFT 0
+#define NV50_3D_VTX_ATTR_4UB_Y__MASK 0x0000ff00
+#define NV50_3D_VTX_ATTR_4UB_Y__SHIFT 8
+#define NV50_3D_VTX_ATTR_4UB_Z__MASK 0x00ff0000
+#define NV50_3D_VTX_ATTR_4UB_Z__SHIFT 16
+#define NV50_3D_VTX_ATTR_4UB_W__MASK 0xff000000
+#define NV50_3D_VTX_ATTR_4UB_W__SHIFT 24
+
+#define NV50_3D_VTX_ATTR_4B(i0) (0x00000840 + 0x4*(i0))
+#define NV50_3D_VTX_ATTR_4B__ESIZE 0x00000004
+#define NV50_3D_VTX_ATTR_4B__LEN 0x00000010
+#define NV50_3D_VTX_ATTR_4B_X__MASK 0x000000ff
+#define NV50_3D_VTX_ATTR_4B_X__SHIFT 0
+#define NV50_3D_VTX_ATTR_4B_Y__MASK 0x0000ff00
+#define NV50_3D_VTX_ATTR_4B_Y__SHIFT 8
+#define NV50_3D_VTX_ATTR_4B_Z__MASK 0x00ff0000
+#define NV50_3D_VTX_ATTR_4B_Z__SHIFT 16
+#define NV50_3D_VTX_ATTR_4B_W__MASK 0xff000000
+#define NV50_3D_VTX_ATTR_4B_W__SHIFT 24
+
+#define NV50_3D_VTX_ATTR_4NUB(i0) (0x00000880 + 0x4*(i0))
+#define NV50_3D_VTX_ATTR_4NUB__ESIZE 0x00000004
+#define NV50_3D_VTX_ATTR_4NUB__LEN 0x00000010
+#define NV50_3D_VTX_ATTR_4NUB_X__MASK 0x000000ff
+#define NV50_3D_VTX_ATTR_4NUB_X__SHIFT 0
+#define NV50_3D_VTX_ATTR_4NUB_Y__MASK 0x0000ff00
+#define NV50_3D_VTX_ATTR_4NUB_Y__SHIFT 8
+#define NV50_3D_VTX_ATTR_4NUB_Z__MASK 0x00ff0000
+#define NV50_3D_VTX_ATTR_4NUB_Z__SHIFT 16
+#define NV50_3D_VTX_ATTR_4NUB_W__MASK 0xff000000
+#define NV50_3D_VTX_ATTR_4NUB_W__SHIFT 24
+
+#define NV50_3D_VTX_ATTR_4NB(i0) (0x000008c0 + 0x4*(i0))
+#define NV50_3D_VTX_ATTR_4NB__ESIZE 0x00000004
+#define NV50_3D_VTX_ATTR_4NB__LEN 0x00000010
+#define NV50_3D_VTX_ATTR_4NB_X__MASK 0x000000ff
+#define NV50_3D_VTX_ATTR_4NB_X__SHIFT 0
+#define NV50_3D_VTX_ATTR_4NB_Y__MASK 0x0000ff00
+#define NV50_3D_VTX_ATTR_4NB_Y__SHIFT 8
+#define NV50_3D_VTX_ATTR_4NB_Z__MASK 0x00ff0000
+#define NV50_3D_VTX_ATTR_4NB_Z__SHIFT 16
+#define NV50_3D_VTX_ATTR_4NB_W__MASK 0xff000000
+#define NV50_3D_VTX_ATTR_4NB_W__SHIFT 24
+
+#define NV50_3D_VERTEX_ARRAY_FETCH(i0) (0x00000900 + 0x10*(i0))
+#define NV50_3D_VERTEX_ARRAY_FETCH__ESIZE 0x00000010
+#define NV50_3D_VERTEX_ARRAY_FETCH__LEN 0x00000010
+#define NV50_3D_VERTEX_ARRAY_FETCH_STRIDE__MASK 0x00000fff
+#define NV50_3D_VERTEX_ARRAY_FETCH_STRIDE__SHIFT 0
+#define NV50_3D_VERTEX_ARRAY_FETCH_ENABLE 0x20000000
+
+#define NV50_3D_VERTEX_ARRAY_START_HIGH(i0) (0x00000904 + 0x10*(i0))
+#define NV50_3D_VERTEX_ARRAY_START_HIGH__ESIZE 0x00000010
+#define NV50_3D_VERTEX_ARRAY_START_HIGH__LEN 0x00000010
+
+#define NV50_3D_VERTEX_ARRAY_START_LOW(i0) (0x00000908 + 0x10*(i0))
+#define NV50_3D_VERTEX_ARRAY_START_LOW__ESIZE 0x00000010
+#define NV50_3D_VERTEX_ARRAY_START_LOW__LEN 0x00000010
+
+#define NV50_3D_VERTEX_ARRAY_DIVISOR(i0) (0x0000090c + 0x10*(i0))
+#define NV50_3D_VERTEX_ARRAY_DIVISOR__ESIZE 0x00000010
+#define NV50_3D_VERTEX_ARRAY_DIVISOR__LEN 0x00000010
+
+#define NV50_3D_VIEWPORT_SCALE_X(i0) (0x00000a00 + 0x20*(i0))
+#define NV50_3D_VIEWPORT_SCALE_X__ESIZE 0x00000020
+#define NV50_3D_VIEWPORT_SCALE_X__LEN 0x00000010
+
+#define NV50_3D_VIEWPORT_SCALE_Y(i0) (0x00000a04 + 0x20*(i0))
+#define NV50_3D_VIEWPORT_SCALE_Y__ESIZE 0x00000020
+#define NV50_3D_VIEWPORT_SCALE_Y__LEN 0x00000010
+
+#define NV50_3D_VIEWPORT_SCALE_Z(i0) (0x00000a08 + 0x20*(i0))
+#define NV50_3D_VIEWPORT_SCALE_Z__ESIZE 0x00000020
+#define NV50_3D_VIEWPORT_SCALE_Z__LEN 0x00000010
+
+#define NV50_3D_VIEWPORT_TRANSLATE_X(i0) (0x00000a0c + 0x20*(i0))
+#define NV50_3D_VIEWPORT_TRANSLATE_X__ESIZE 0x00000020
+#define NV50_3D_VIEWPORT_TRANSLATE_X__LEN 0x00000010
+
+#define NV50_3D_VIEWPORT_TRANSLATE_Y(i0) (0x00000a10 + 0x20*(i0))
+#define NV50_3D_VIEWPORT_TRANSLATE_Y__ESIZE 0x00000020
+#define NV50_3D_VIEWPORT_TRANSLATE_Y__LEN 0x00000010
+
+#define NV50_3D_VIEWPORT_TRANSLATE_Z(i0) (0x00000a14 + 0x20*(i0))
+#define NV50_3D_VIEWPORT_TRANSLATE_Z__ESIZE 0x00000020
+#define NV50_3D_VIEWPORT_TRANSLATE_Z__LEN 0x00000010
+
+#define NV50_3D_VIEWPORT_HORIZ(i0) (0x00000c00 + 0x10*(i0))
+#define NV50_3D_VIEWPORT_HORIZ__ESIZE 0x00000010
+#define NV50_3D_VIEWPORT_HORIZ__LEN 0x00000010
+#define NV50_3D_VIEWPORT_HORIZ_X__MASK 0x0000ffff
+#define NV50_3D_VIEWPORT_HORIZ_X__SHIFT 0
+#define NV50_3D_VIEWPORT_HORIZ_W__MASK 0xffff0000
+#define NV50_3D_VIEWPORT_HORIZ_W__SHIFT 16
+
+#define NV50_3D_VIEWPORT_VERT(i0) (0x00000c04 + 0x10*(i0))
+#define NV50_3D_VIEWPORT_VERT__ESIZE 0x00000010
+#define NV50_3D_VIEWPORT_VERT__LEN 0x00000010
+#define NV50_3D_VIEWPORT_VERT_Y__MASK 0x0000ffff
+#define NV50_3D_VIEWPORT_VERT_Y__SHIFT 0
+#define NV50_3D_VIEWPORT_VERT_H__MASK 0xffff0000
+#define NV50_3D_VIEWPORT_VERT_H__SHIFT 16
+
+#define NV50_3D_DEPTH_RANGE_NEAR(i0) (0x00000c08 + 0x10*(i0))
+#define NV50_3D_DEPTH_RANGE_NEAR__ESIZE 0x00000010
+#define NV50_3D_DEPTH_RANGE_NEAR__LEN 0x00000010
+
+#define NV50_3D_DEPTH_RANGE_FAR(i0) (0x00000c0c + 0x10*(i0))
+#define NV50_3D_DEPTH_RANGE_FAR__ESIZE 0x00000010
+#define NV50_3D_DEPTH_RANGE_FAR__LEN 0x00000010
+
+#define NV50_3D_CLIP_RECT_HORIZ(i0) (0x00000d00 + 0x8*(i0))
+#define NV50_3D_CLIP_RECT_HORIZ__ESIZE 0x00000008
+#define NV50_3D_CLIP_RECT_HORIZ__LEN 0x00000008
+#define NV50_3D_CLIP_RECT_HORIZ_MIN__MASK 0x0000ffff
+#define NV50_3D_CLIP_RECT_HORIZ_MIN__SHIFT 0
+#define NV50_3D_CLIP_RECT_HORIZ_MAX__MASK 0xffff0000
+#define NV50_3D_CLIP_RECT_HORIZ_MAX__SHIFT 16
+
+#define NV50_3D_CLIP_RECT_VERT(i0) (0x00000d04 + 0x8*(i0))
+#define NV50_3D_CLIP_RECT_VERT__ESIZE 0x00000008
+#define NV50_3D_CLIP_RECT_VERT__LEN 0x00000008
+#define NV50_3D_CLIP_RECT_VERT_MIN__MASK 0x0000ffff
+#define NV50_3D_CLIP_RECT_VERT_MIN__SHIFT 0
+#define NV50_3D_CLIP_RECT_VERT_MAX__MASK 0xffff0000
+#define NV50_3D_CLIP_RECT_VERT_MAX__SHIFT 16
+
+#define NV50_3D_CLIPID_REGION_HORIZ(i0) (0x00000d40 + 0x8*(i0))
+#define NV50_3D_CLIPID_REGION_HORIZ__ESIZE 0x00000008
+#define NV50_3D_CLIPID_REGION_HORIZ__LEN 0x00000004
+#define NV50_3D_CLIPID_REGION_HORIZ_X__MASK 0x0000ffff
+#define NV50_3D_CLIPID_REGION_HORIZ_X__SHIFT 0
+#define NV50_3D_CLIPID_REGION_HORIZ_W__MASK 0xffff0000
+#define NV50_3D_CLIPID_REGION_HORIZ_W__SHIFT 16
+
+#define NV50_3D_CLIPID_REGION_VERT(i0) (0x00000d44 + 0x8*(i0))
+#define NV50_3D_CLIPID_REGION_VERT__ESIZE 0x00000008
+#define NV50_3D_CLIPID_REGION_VERT__LEN 0x00000004
+#define NV50_3D_CLIPID_REGION_VERT_Y__MASK 0x0000ffff
+#define NV50_3D_CLIPID_REGION_VERT_Y__SHIFT 0
+#define NV50_3D_CLIPID_REGION_VERT_H__MASK 0xffff0000
+#define NV50_3D_CLIPID_REGION_VERT_H__SHIFT 16
+
+#define NV50_3D_UNK0D60 0x00000d60
+
+#define NV50_3D_UNK0D64 0x00000d64
+
+#define NV50_3D_COUNTER_ENABLE 0x00000d68
+#define NV50_3D_COUNTER_ENABLE_VFETCH_VERTICES 0x00000001
+#define NV50_3D_COUNTER_ENABLE_VFETCH_PRIMITIVES 0x00000002
+#define NV50_3D_COUNTER_ENABLE_VP_LAUNCHES 0x00000004
+#define NV50_3D_COUNTER_ENABLE_GP_LAUNCHES 0x00000008
+#define NV50_3D_COUNTER_ENABLE_GP_PRIMITIVES_OUT 0x00000010
+#define NV50_3D_COUNTER_ENABLE_TRANSFORM_FEEDBACK 0x00000020
+#define NV50_3D_COUNTER_ENABLE_GENERATED_PRIMITIVES 0x00000040
+#define NV50_3D_COUNTER_ENABLE_RAST_PRIMITIVES_PRECLIP 0x00000080
+#define NV50_3D_COUNTER_ENABLE_RAST_PRIMITIVES_POSTCLIP 0x00000100
+#define NV50_3D_COUNTER_ENABLE_FP_PIXELS 0x00000200
+#define NV84_3D_COUNTER_ENABLE_UNK0A 0x00000400
+
+#define NV50_3D_UNK0D6C(i0) (0x00000d6c + 0x4*(i0))
+#define NV50_3D_UNK0D6C__ESIZE 0x00000004
+#define NV50_3D_UNK0D6C__LEN 0x00000002
+#define NV50_3D_UNK0D6C_X__MASK 0x0000ffff
+#define NV50_3D_UNK0D6C_X__SHIFT 0
+#define NV50_3D_UNK0D6C_Y__MASK 0xffff0000
+#define NV50_3D_UNK0D6C_Y__SHIFT 16
+
+#define NV50_3D_VERTEX_BUFFER_FIRST 0x00000d74
+
+#define NV50_3D_VERTEX_BUFFER_COUNT 0x00000d78
+
+#define NV50_3D_UNK0D7C 0x00000d7c
+
+#define NV50_3D_CLEAR_COLOR(i0) (0x00000d80 + 0x4*(i0))
+#define NV50_3D_CLEAR_COLOR__ESIZE 0x00000004
+#define NV50_3D_CLEAR_COLOR__LEN 0x00000004
+
+#define NV50_3D_CLEAR_DEPTH 0x00000d90
+
+#define NV50_3D_STACK_ADDRESS_HIGH 0x00000d94
+
+#define NV50_3D_STACK_ADDRESS_LOW 0x00000d98
+
+#define NV50_3D_STACK_SIZE_LOG 0x00000d9c
+
+#define NV50_3D_CLEAR_STENCIL 0x00000da0
+
+#define NV50_3D_STRMOUT_PARAMS_LATCH 0x00000da4
+
+#define NV50_3D_STRMOUT_PRIMITIVE_LIMIT 0x00000da8
+
+#define NV50_3D_POLYGON_MODE_FRONT 0x00000dac
+#define NV50_3D_POLYGON_MODE_FRONT_POINT 0x00001b00
+#define NV50_3D_POLYGON_MODE_FRONT_LINE 0x00001b01
+#define NV50_3D_POLYGON_MODE_FRONT_FILL 0x00001b02
+
+#define NV50_3D_POLYGON_MODE_BACK 0x00000db0
+#define NV50_3D_POLYGON_MODE_BACK_POINT 0x00001b00
+#define NV50_3D_POLYGON_MODE_BACK_LINE 0x00001b01
+#define NV50_3D_POLYGON_MODE_BACK_FILL 0x00001b02
+
+#define NV50_3D_POLYGON_SMOOTH_ENABLE 0x00000db4
+
+#define NV50_3D_UNK0DB8 0x00000db8
+
+#define NV50_3D_ZCULL_UNK0DBC 0x00000dbc
+#define NV50_3D_ZCULL_UNK0DBC_UNK0 0x00000001
+#define NV50_3D_ZCULL_UNK0DBC_UNK16__MASK 0x00030000
+#define NV50_3D_ZCULL_UNK0DBC_UNK16__SHIFT 16
+
+#define NV50_3D_POLYGON_OFFSET_POINT_ENABLE 0x00000dc0
+
+#define NV50_3D_POLYGON_OFFSET_LINE_ENABLE 0x00000dc4
+
+#define NV50_3D_POLYGON_OFFSET_FILL_ENABLE 0x00000dc8
+
+#define NV50_3D_UNK0DCC 0x00000dcc
+
+#define NV50_3D_VTX_ATTR_MASK_UNK0DD0(i0) (0x00000dd0 + 0x4*(i0))
+#define NV50_3D_VTX_ATTR_MASK_UNK0DD0__ESIZE 0x00000004
+#define NV50_3D_VTX_ATTR_MASK_UNK0DD0__LEN 0x00000002
+
+#define NV50_3D_ZCULL_UNK0DD8 0x00000dd8
+#define NV50_3D_ZCULL_UNK0DD8_UNK0__MASK 0x00000007
+#define NV50_3D_ZCULL_UNK0DD8_UNK0__SHIFT 0
+#define NVA3_3D_ZCULL_UNK0DD8_UNK9 0x00000200
+#define NV50_3D_ZCULL_UNK0DD8_UNK16__MASK 0xffff0000
+#define NV50_3D_ZCULL_UNK0DD8_UNK16__SHIFT 16
+
+#define NV50_3D_UNK0DDC 0x00000ddc
+
+#define NV50_3D_UNK0DE0 0x00000de0
+
+#define NV50_3D_WATCHDOG_TIMER 0x00000de4
+
+#define NV50_3D_UNK0DE8 0x00000de8
+
+#define NV50_3D_UNK0DEC 0x00000dec
+
+#define NV50_3D_UNK0DF0 0x00000df0
+#define NV50_3D_UNK0DF0_UNK0 0x00000001
+#define NV50_3D_UNK0DF0_UNK1__MASK 0x00000ff0
+#define NV50_3D_UNK0DF0_UNK1__SHIFT 4
+
+#define NV50_3D_UNK0DF4 0x00000df4
+
+#define NV50_3D_WINDOW_OFFSET_X 0x00000df8
+
+#define NV50_3D_WINDOW_OFFSET_Y 0x00000dfc
+
+#define NV50_3D_SCISSOR_ENABLE(i0) (0x00000e00 + 0x10*(i0))
+#define NV50_3D_SCISSOR_ENABLE__ESIZE 0x00000010
+#define NV50_3D_SCISSOR_ENABLE__LEN 0x00000010
+
+#define NV50_3D_SCISSOR_HORIZ(i0) (0x00000e04 + 0x10*(i0))
+#define NV50_3D_SCISSOR_HORIZ__ESIZE 0x00000010
+#define NV50_3D_SCISSOR_HORIZ__LEN 0x00000010
+#define NV50_3D_SCISSOR_HORIZ_MIN__MASK 0x0000ffff
+#define NV50_3D_SCISSOR_HORIZ_MIN__SHIFT 0
+#define NV50_3D_SCISSOR_HORIZ_MAX__MASK 0xffff0000
+#define NV50_3D_SCISSOR_HORIZ_MAX__SHIFT 16
+
+#define NV50_3D_SCISSOR_VERT(i0) (0x00000e08 + 0x10*(i0))
+#define NV50_3D_SCISSOR_VERT__ESIZE 0x00000010
+#define NV50_3D_SCISSOR_VERT__LEN 0x00000010
+#define NV50_3D_SCISSOR_VERT_MIN__MASK 0x0000ffff
+#define NV50_3D_SCISSOR_VERT_MIN__SHIFT 0
+#define NV50_3D_SCISSOR_VERT_MAX__MASK 0xffff0000
+#define NV50_3D_SCISSOR_VERT_MAX__SHIFT 16
+
+#define NV50_3D_CB_ADDR 0x00000f00
+#define NV50_3D_CB_ADDR_ID__MASK 0x003fff00
+#define NV50_3D_CB_ADDR_ID__SHIFT 8
+#define NV50_3D_CB_ADDR_BUFFER__MASK 0x0000007f
+#define NV50_3D_CB_ADDR_BUFFER__SHIFT 0
+
+#define NV50_3D_CB_DATA(i0) (0x00000f04 + 0x4*(i0))
+#define NV50_3D_CB_DATA__ESIZE 0x00000004
+#define NV50_3D_CB_DATA__LEN 0x00000010
+
+#define NV50_3D_LOCAL_WARPS_LOG_ALLOC 0x00000f44
+
+#define NV50_3D_LOCAL_WARPS_NO_CLAMP 0x00000f48
+
+#define NV50_3D_STACK_WARPS_LOG_ALLOC 0x00000f4c
+
+#define NV50_3D_STACK_WARPS_NO_CLAMP 0x00000f50
+
+#define NV50_3D_STENCIL_BACK_FUNC_REF 0x00000f54
+
+#define NV50_3D_STENCIL_BACK_MASK 0x00000f58
+
+#define NV50_3D_STENCIL_BACK_FUNC_MASK 0x00000f5c
+
+#define NV50_3D_UNK0F60(i0) (0x00000f60 + 0x4*(i0))
+#define NV50_3D_UNK0F60__ESIZE 0x00000004
+#define NV50_3D_UNK0F60__LEN 0x00000004
+
+#define NV50_3D_GP_ADDRESS_HIGH 0x00000f70
+
+#define NV50_3D_GP_ADDRESS_LOW 0x00000f74
+
+#define NV50_3D_UNK0F78 0x00000f78
+
+#define NV50_3D_VP_ADDRESS_HIGH 0x00000f7c
+
+#define NV50_3D_VP_ADDRESS_LOW 0x00000f80
+
+#define NV50_3D_VERTEX_RUNOUT_ADDRESS_HIGH 0x00000f84
+
+#define NV50_3D_VERTEX_RUNOUT_ADDRESS_LOW 0x00000f88
+
+#define NV50_3D_UNK0F8C 0x00000f8c
+
+#define NV50_3D_UNK0F90 0x00000f90
+
+#define NV50_3D_UNK0F94 0x00000f94
+
+#define NV50_3D_UNK0F98 0x00000f98
+
+#define NV50_3D_DEPTH_BOUNDS(i0) (0x00000f9c + 0x4*(i0))
+#define NV50_3D_DEPTH_BOUNDS__ESIZE 0x00000004
+#define NV50_3D_DEPTH_BOUNDS__LEN 0x00000002
+
+#define NV50_3D_FP_ADDRESS_HIGH 0x00000fa4
+
+#define NV50_3D_FP_ADDRESS_LOW 0x00000fa8
+
+#define NV50_3D_UNK0FAC 0x00000fac
+#define NV50_3D_UNK0FAC_UNK0 0x00000001
+#define NVA0_3D_UNK0FAC_UNK2 0x00000002
+#define NV50_3D_UNK0FAC_UNK1__MASK 0x000ffff0
+#define NV50_3D_UNK0FAC_UNK1__SHIFT 4
+
+#define NV50_3D_UNK0FB0 0x00000fb0
+
+#define NV50_3D_UNK0FB4 0x00000fb4
+
+#define NV50_3D_UNK0FB8 0x00000fb8
+
+#define NV50_3D_MSAA_MASK(i0) (0x00000fbc + 0x4*(i0))
+#define NV50_3D_MSAA_MASK__ESIZE 0x00000004
+#define NV50_3D_MSAA_MASK__LEN 0x00000004
+
+#define NV50_3D_CLIPID_ADDRESS_HIGH 0x00000fcc
+
+#define NV50_3D_CLIPID_ADDRESS_LOW 0x00000fd0
+
+#define NV50_3D_MAP_SEMANTIC_5 0x00000fd4
+#define NV50_3D_MAP_SEMANTIC_5_VIEWPORT_ID__MASK 0x000000ff
+#define NV50_3D_MAP_SEMANTIC_5_VIEWPORT_ID__SHIFT 0
+
+#define NV50_3D_UNK0FD8 0x00000fd8
+#define NV50_3D_UNK0FD8_UNK0 0x00000001
+#define NV50_3D_UNK0FD8_UNK1 0x00000010
+
+#define NV50_3D_UNK0FDC 0x00000fdc
+
+#define NV50_3D_ZETA_ADDRESS_HIGH 0x00000fe0
+
+#define NV50_3D_ZETA_ADDRESS_LOW 0x00000fe4
+
+#define NV50_3D_ZETA_FORMAT 0x00000fe8
+
+#define NV50_3D_ZETA_TILE_MODE 0x00000fec
+
+#define NV50_3D_ZETA_LAYER_STRIDE 0x00000ff0
+#define NV50_3D_ZETA_LAYER_STRIDE__SHR 2
+
+#define NV50_3D_SCREEN_SCISSOR_HORIZ 0x00000ff4
+#define NV50_3D_SCREEN_SCISSOR_HORIZ_W__MASK 0xffff0000
+#define NV50_3D_SCREEN_SCISSOR_HORIZ_W__SHIFT 16
+#define NV50_3D_SCREEN_SCISSOR_HORIZ_X__MASK 0x0000ffff
+#define NV50_3D_SCREEN_SCISSOR_HORIZ_X__SHIFT 0
+
+#define NV50_3D_SCREEN_SCISSOR_VERT 0x00000ff8
+#define NV50_3D_SCREEN_SCISSOR_VERT_H__MASK 0xffff0000
+#define NV50_3D_SCREEN_SCISSOR_VERT_H__SHIFT 16
+#define NV50_3D_SCREEN_SCISSOR_VERT_Y__MASK 0x0000ffff
+#define NV50_3D_SCREEN_SCISSOR_VERT_Y__SHIFT 0
+
+#define NV50_3D_UNK0FFC 0x00000ffc
+
+#define NV50_3D_VERTEX_ARRAY_PER_INSTANCE(i0) (0x00001000 + 0x4*(i0))
+#define NV50_3D_VERTEX_ARRAY_PER_INSTANCE__ESIZE 0x00000004
+#define NV50_3D_VERTEX_ARRAY_PER_INSTANCE__LEN 0x00000010
+
+#define NV50_3D_UNK1040(i0) (0x00001040 + 0x4*(i0))
+#define NV50_3D_UNK1040__ESIZE 0x00000004
+#define NV50_3D_UNK1040__LEN 0x00000010
+
+#define NV50_3D_VERTEX_ARRAY_LIMIT_HIGH(i0) (0x00001080 + 0x8*(i0))
+#define NV50_3D_VERTEX_ARRAY_LIMIT_HIGH__ESIZE 0x00000008
+#define NV50_3D_VERTEX_ARRAY_LIMIT_HIGH__LEN 0x00000010
+
+#define NV50_3D_VERTEX_ARRAY_LIMIT_LOW(i0) (0x00001084 + 0x8*(i0))
+#define NV50_3D_VERTEX_ARRAY_LIMIT_LOW__ESIZE 0x00000008
+#define NV50_3D_VERTEX_ARRAY_LIMIT_LOW__LEN 0x00000010
+
+#define NV50_3D_UNK1100 0x00001100
+
+#define NV84_3D_UNK1104 0x00001104
+#define NV84_3D_UNK1104_0__MASK 0x0000ffff
+#define NV84_3D_UNK1104_0__SHIFT 0
+#define NV84_3D_UNK1104_0__MAX 0x00002000
+#define NV84_3D_UNK1104_0__ALIGN 0x00000040
+#define NV84_3D_UNK1104_1__MASK 0xffff0000
+#define NV84_3D_UNK1104_1__SHIFT 16
+#define NV84_3D_UNK1104_1__MAX 0x00002000
+#define NV84_3D_UNK1104_1__ALIGN 0x00000040
+
+#define NV84_3D_UNK1108 0x00001108
+#define NV84_3D_UNK1108_0 0x00000001
+#define NV84_3D_UNK1108_1 0x00000010
+
+#define NV84_3D_UNK110C 0x0000110c
+
+#define NV84_3D_UNK1110 0x00001110
+
+#define NV84_3D_WRCACHE_FLUSH 0x00001114
+
+#define NV84_3D_VERTEX_ID_BASE 0x00001118
+
+#define NV84_3D_PRIMITIVE_ID 0x0000111c
+
+#define NVA3_3D_VTX_ATTR_MASK_UNK0DD0_ALT(i0) (0x00001120 + 0x4*(i0))
+#define NVA3_3D_VTX_ATTR_MASK_UNK0DD0_ALT__ESIZE 0x00000004
+#define NVA3_3D_VTX_ATTR_MASK_UNK0DD0_ALT__LEN 0x00000004
+
+#define NVA3_3D_VP_ATTR_EN_ALT(i0) (0x00001130 + 0x4*(i0))
+#define NVA3_3D_VP_ATTR_EN_ALT__ESIZE 0x00000004
+#define NVA3_3D_VP_ATTR_EN_ALT__LEN 0x00000004
+#define NVA3_3D_VP_ATTR_EN_ALT_7__MASK 0xf0000000
+#define NVA3_3D_VP_ATTR_EN_ALT_7__SHIFT 28
+#define NVA3_3D_VP_ATTR_EN_ALT_7_X 0x10000000
+#define NVA3_3D_VP_ATTR_EN_ALT_7_Y 0x20000000
+#define NVA3_3D_VP_ATTR_EN_ALT_7_Z 0x40000000
+#define NVA3_3D_VP_ATTR_EN_ALT_7_W 0x80000000
+#define NVA3_3D_VP_ATTR_EN_ALT_6__MASK 0x0f000000
+#define NVA3_3D_VP_ATTR_EN_ALT_6__SHIFT 24
+#define NVA3_3D_VP_ATTR_EN_ALT_6_X 0x01000000
+#define NVA3_3D_VP_ATTR_EN_ALT_6_Y 0x02000000
+#define NVA3_3D_VP_ATTR_EN_ALT_6_Z 0x04000000
+#define NVA3_3D_VP_ATTR_EN_ALT_6_W 0x08000000
+#define NVA3_3D_VP_ATTR_EN_ALT_5__MASK 0x00f00000
+#define NVA3_3D_VP_ATTR_EN_ALT_5__SHIFT 20
+#define NVA3_3D_VP_ATTR_EN_ALT_5_X 0x00100000
+#define NVA3_3D_VP_ATTR_EN_ALT_5_Y 0x00200000
+#define NVA3_3D_VP_ATTR_EN_ALT_5_Z 0x00400000
+#define NVA3_3D_VP_ATTR_EN_ALT_5_W 0x00800000
+#define NVA3_3D_VP_ATTR_EN_ALT_4__MASK 0x000f0000
+#define NVA3_3D_VP_ATTR_EN_ALT_4__SHIFT 16
+#define NVA3_3D_VP_ATTR_EN_ALT_4_X 0x00010000
+#define NVA3_3D_VP_ATTR_EN_ALT_4_Y 0x00020000
+#define NVA3_3D_VP_ATTR_EN_ALT_4_Z 0x00040000
+#define NVA3_3D_VP_ATTR_EN_ALT_4_W 0x00080000
+#define NVA3_3D_VP_ATTR_EN_ALT_3__MASK 0x0000f000
+#define NVA3_3D_VP_ATTR_EN_ALT_3__SHIFT 12
+#define NVA3_3D_VP_ATTR_EN_ALT_3_X 0x00001000
+#define NVA3_3D_VP_ATTR_EN_ALT_3_Y 0x00002000
+#define NVA3_3D_VP_ATTR_EN_ALT_3_Z 0x00004000
+#define NVA3_3D_VP_ATTR_EN_ALT_3_W 0x00008000
+#define NVA3_3D_VP_ATTR_EN_ALT_2__MASK 0x00000f00
+#define NVA3_3D_VP_ATTR_EN_ALT_2__SHIFT 8
+#define NVA3_3D_VP_ATTR_EN_ALT_2_X 0x00000100
+#define NVA3_3D_VP_ATTR_EN_ALT_2_Y 0x00000200
+#define NVA3_3D_VP_ATTR_EN_ALT_2_Z 0x00000400
+#define NVA3_3D_VP_ATTR_EN_ALT_2_W 0x00000800
+#define NVA3_3D_VP_ATTR_EN_ALT_1__MASK 0x000000f0
+#define NVA3_3D_VP_ATTR_EN_ALT_1__SHIFT 4
+#define NVA3_3D_VP_ATTR_EN_ALT_1_X 0x00000010
+#define NVA3_3D_VP_ATTR_EN_ALT_1_Y 0x00000020
+#define NVA3_3D_VP_ATTR_EN_ALT_1_Z 0x00000040
+#define NVA3_3D_VP_ATTR_EN_ALT_1_W 0x00000080
+#define NVA3_3D_VP_ATTR_EN_ALT_0__MASK 0x0000000f
+#define NVA3_3D_VP_ATTR_EN_ALT_0__SHIFT 0
+#define NVA3_3D_VP_ATTR_EN_ALT_0_X 0x00000001
+#define NVA3_3D_VP_ATTR_EN_ALT_0_Y 0x00000002
+#define NVA3_3D_VP_ATTR_EN_ALT_0_Z 0x00000004
+#define NVA3_3D_VP_ATTR_EN_ALT_0_W 0x00000008
+
+#define NVA3_3D_UNK1140 0x00001140
+
+#define NVA0_3D_UNK1144 0x00001144
+
+#define NVA0_3D_VTX_ATTR_DEFINE 0x0000114c
+#define NVA0_3D_VTX_ATTR_DEFINE_ATTR__MASK 0x000000ff
+#define NVA0_3D_VTX_ATTR_DEFINE_ATTR__SHIFT 0
+#define NVA0_3D_VTX_ATTR_DEFINE_COMP__MASK 0x00000700
+#define NVA0_3D_VTX_ATTR_DEFINE_COMP__SHIFT 8
+#define NVA0_3D_VTX_ATTR_DEFINE_COMP__MIN 0x00000001
+#define NVA0_3D_VTX_ATTR_DEFINE_COMP__MAX 0x00000004
+#define NVA0_3D_VTX_ATTR_DEFINE_SIZE__MASK 0x00007000
+#define NVA0_3D_VTX_ATTR_DEFINE_SIZE__SHIFT 12
+#define NVA0_3D_VTX_ATTR_DEFINE_SIZE_8 0x00001000
+#define NVA0_3D_VTX_ATTR_DEFINE_SIZE_16 0x00002000
+#define NVA0_3D_VTX_ATTR_DEFINE_SIZE_32 0x00004000
+#define NVA0_3D_VTX_ATTR_DEFINE_TYPE__MASK 0x00070000
+#define NVA0_3D_VTX_ATTR_DEFINE_TYPE__SHIFT 16
+#define NVA0_3D_VTX_ATTR_DEFINE_TYPE_SNORM 0x00010000
+#define NVA0_3D_VTX_ATTR_DEFINE_TYPE_UNORM 0x00020000
+#define NVA0_3D_VTX_ATTR_DEFINE_TYPE_SINT 0x00030000
+#define NVA0_3D_VTX_ATTR_DEFINE_TYPE_UINT 0x00040000
+#define NVA0_3D_VTX_ATTR_DEFINE_TYPE_USCALED 0x00050000
+#define NVA0_3D_VTX_ATTR_DEFINE_TYPE_SSCALED 0x00060000
+#define NVA0_3D_VTX_ATTR_DEFINE_TYPE_FLOAT 0x00070000
+
+#define NVA0_3D_VTX_ATTR_DATA(i0) (0x00001150 + 0x4*(i0))
+#define NVA0_3D_VTX_ATTR_DATA__ESIZE 0x00000004
+#define NVA0_3D_VTX_ATTR_DATA__LEN 0x00000004
+
+#define NVA3_3D_VERTEX_ARRAY_ATTRIB_ALT(i0) (0x00001160 + 0x4*(i0))
+#define NVA3_3D_VERTEX_ARRAY_ATTRIB_ALT__ESIZE 0x00000004
+#define NVA3_3D_VERTEX_ARRAY_ATTRIB_ALT__LEN 0x00000020
+#define NVA3_3D_VERTEX_ARRAY_ATTRIB_ALT_BUFFER__MASK 0x0000001f
+#define NVA3_3D_VERTEX_ARRAY_ATTRIB_ALT_BUFFER__SHIFT 0
+#define NVA3_3D_VERTEX_ARRAY_ATTRIB_ALT_CONST 0x00000040
+#define NVA3_3D_VERTEX_ARRAY_ATTRIB_ALT_OFFSET__MASK 0x001fff80
+#define NVA3_3D_VERTEX_ARRAY_ATTRIB_ALT_OFFSET__SHIFT 7
+#define NVA3_3D_VERTEX_ARRAY_ATTRIB_ALT_FORMAT__MASK 0x07e00000
+#define NVA3_3D_VERTEX_ARRAY_ATTRIB_ALT_FORMAT__SHIFT 21
+#define NVA3_3D_VERTEX_ARRAY_ATTRIB_ALT_FORMAT_32_32_32_32 0x00200000
+#define NVA3_3D_VERTEX_ARRAY_ATTRIB_ALT_FORMAT_32_32_32 0x00400000
+#define NVA3_3D_VERTEX_ARRAY_ATTRIB_ALT_FORMAT_16_16_16_16 0x00600000
+#define NVA3_3D_VERTEX_ARRAY_ATTRIB_ALT_FORMAT_32_32 0x00800000
+#define NVA3_3D_VERTEX_ARRAY_ATTRIB_ALT_FORMAT_16_16_16 0x00a00000
+#define NVA3_3D_VERTEX_ARRAY_ATTRIB_ALT_FORMAT_8_8_8_8 0x01400000
+#define NVA3_3D_VERTEX_ARRAY_ATTRIB_ALT_FORMAT_16_16 0x01e00000
+#define NVA3_3D_VERTEX_ARRAY_ATTRIB_ALT_FORMAT_32 0x02400000
+#define NVA3_3D_VERTEX_ARRAY_ATTRIB_ALT_FORMAT_8_8_8 0x02600000
+#define NVA3_3D_VERTEX_ARRAY_ATTRIB_ALT_FORMAT_8_8 0x03000000
+#define NVA3_3D_VERTEX_ARRAY_ATTRIB_ALT_FORMAT_16 0x03600000
+#define NVA3_3D_VERTEX_ARRAY_ATTRIB_ALT_FORMAT_8 0x03a00000
+#define NVA3_3D_VERTEX_ARRAY_ATTRIB_ALT_FORMAT_2_10_10_10 0x06000000
+#define NVA3_3D_VERTEX_ARRAY_ATTRIB_ALT_TYPE__MASK 0x38000000
+#define NVA3_3D_VERTEX_ARRAY_ATTRIB_ALT_TYPE__SHIFT 27
+#define NVA3_3D_VERTEX_ARRAY_ATTRIB_ALT_TYPE_SNORM 0x08000000
+#define NVA3_3D_VERTEX_ARRAY_ATTRIB_ALT_TYPE_UNORM 0x10000000
+#define NVA3_3D_VERTEX_ARRAY_ATTRIB_ALT_TYPE_SINT 0x18000000
+#define NVA3_3D_VERTEX_ARRAY_ATTRIB_ALT_TYPE_UINT 0x20000000
+#define NVA3_3D_VERTEX_ARRAY_ATTRIB_ALT_TYPE_USCALED 0x28000000
+#define NVA3_3D_VERTEX_ARRAY_ATTRIB_ALT_TYPE_SSCALED 0x30000000
+#define NVA3_3D_VERTEX_ARRAY_ATTRIB_ALT_TYPE_FLOAT 0x38000000
+#define NVA3_3D_VERTEX_ARRAY_ATTRIB_ALT_BGRA 0x80000000
+
+#define NV50_3D_RT_CONTROL 0x0000121c
+#define NV50_3D_RT_CONTROL_COUNT__MASK 0x0000000f
+#define NV50_3D_RT_CONTROL_COUNT__SHIFT 0
+#define NV50_3D_RT_CONTROL_MAP0__MASK 0x00000070
+#define NV50_3D_RT_CONTROL_MAP0__SHIFT 4
+#define NV50_3D_RT_CONTROL_MAP1__MASK 0x00000380
+#define NV50_3D_RT_CONTROL_MAP1__SHIFT 7
+#define NV50_3D_RT_CONTROL_MAP2__MASK 0x00001c00
+#define NV50_3D_RT_CONTROL_MAP2__SHIFT 10
+#define NV50_3D_RT_CONTROL_MAP3__MASK 0x0000e000
+#define NV50_3D_RT_CONTROL_MAP3__SHIFT 13
+#define NV50_3D_RT_CONTROL_MAP4__MASK 0x00070000
+#define NV50_3D_RT_CONTROL_MAP4__SHIFT 16
+#define NV50_3D_RT_CONTROL_MAP5__MASK 0x00380000
+#define NV50_3D_RT_CONTROL_MAP5__SHIFT 19
+#define NV50_3D_RT_CONTROL_MAP6__MASK 0x01c00000
+#define NV50_3D_RT_CONTROL_MAP6__SHIFT 22
+#define NV50_3D_RT_CONTROL_MAP7__MASK 0x0e000000
+#define NV50_3D_RT_CONTROL_MAP7__SHIFT 25
+
+#define NV50_3D_UNK1220 0x00001220
+
+#define NV50_3D_RT_ARRAY_MODE 0x00001224
+#define NV50_3D_RT_ARRAY_MODE_LAYERS__MASK 0x0000ffff
+#define NV50_3D_RT_ARRAY_MODE_LAYERS__SHIFT 0
+#define NV50_3D_RT_ARRAY_MODE_MODE__MASK 0x00010000
+#define NV50_3D_RT_ARRAY_MODE_MODE__SHIFT 16
+#define NV50_3D_RT_ARRAY_MODE_MODE_2D_ARRAY 0x00000000
+#define NV50_3D_RT_ARRAY_MODE_MODE_3D 0x00010000
+
+#define NV50_3D_ZETA_HORIZ 0x00001228
+
+#define NV50_3D_ZETA_VERT 0x0000122c
+
+#define NV50_3D_ZETA_ARRAY_MODE 0x00001230
+#define NV50_3D_ZETA_ARRAY_MODE_LAYERS__MASK 0x0000ffff
+#define NV50_3D_ZETA_ARRAY_MODE_LAYERS__SHIFT 0
+#define NV50_3D_ZETA_ARRAY_MODE_UNK 0x00010000
+
+#define NV50_3D_LINKED_TSC 0x00001234
+
+#define NV50_3D_UNK1238 0x00001238
+
+#define NVA0_3D_DRAW_TFB_BYTES 0x0000123c
+
+#define NV50_3D_RT_HORIZ(i0) (0x00001240 + 0x8*(i0))
+#define NV50_3D_RT_HORIZ__ESIZE 0x00000008
+#define NV50_3D_RT_HORIZ__LEN 0x00000008
+#define NV50_3D_RT_HORIZ_WIDTH__MASK 0x0fffffff
+#define NV50_3D_RT_HORIZ_WIDTH__SHIFT 0
+#define NV50_3D_RT_HORIZ_LINEAR 0x80000000
+
+#define NV50_3D_RT_VERT(i0) (0x00001244 + 0x8*(i0))
+#define NV50_3D_RT_VERT__ESIZE 0x00000008
+#define NV50_3D_RT_VERT__LEN 0x00000008
+
+#define NV50_3D_CB_DEF_ADDRESS_HIGH 0x00001280
+
+#define NV50_3D_CB_DEF_ADDRESS_LOW 0x00001284
+
+#define NV50_3D_CB_DEF_SET 0x00001288
+#define NV50_3D_CB_DEF_SET_SIZE__MASK 0x0000ffff
+#define NV50_3D_CB_DEF_SET_SIZE__SHIFT 0
+#define NV50_3D_CB_DEF_SET_BUFFER__MASK 0x007f0000
+#define NV50_3D_CB_DEF_SET_BUFFER__SHIFT 16
+
+#define NV50_3D_UNK128C 0x0000128c
+#define NV50_3D_UNK128C_0__MASK 0x00000003
+#define NV50_3D_UNK128C_0__SHIFT 0
+#define NV50_3D_UNK128C_1__MASK 0x00000030
+#define NV50_3D_UNK128C_1__SHIFT 4
+#define NV50_3D_UNK128C_2__MASK 0x00000300
+#define NV50_3D_UNK128C_2__SHIFT 8
+#define NV50_3D_UNK128C_3__MASK 0x00003000
+#define NV50_3D_UNK128C_3__SHIFT 12
+
+#define NV50_3D_CALL_LIMIT_LOG 0x00001290
+#define NV50_3D_CALL_LIMIT_LOG_VP__MASK 0x0000000f
+#define NV50_3D_CALL_LIMIT_LOG_VP__SHIFT 0
+#define NV50_3D_CALL_LIMIT_LOG_GP__MASK 0x000000f0
+#define NV50_3D_CALL_LIMIT_LOG_GP__SHIFT 4
+#define NV50_3D_CALL_LIMIT_LOG_FP__MASK 0x00000f00
+#define NV50_3D_CALL_LIMIT_LOG_FP__SHIFT 8
+
+#define NV50_3D_STRMOUT_BUFFERS_CTRL 0x00001294
+#define NV50_3D_STRMOUT_BUFFERS_CTRL_INTERLEAVED 0x00000001
+#define NVA0_3D_STRMOUT_BUFFERS_CTRL_LIMIT_MODE__MASK 0x00000002
+#define NVA0_3D_STRMOUT_BUFFERS_CTRL_LIMIT_MODE__SHIFT 1
+#define NVA0_3D_STRMOUT_BUFFERS_CTRL_LIMIT_MODE_PRIMITIVES 0x00000000
+#define NVA0_3D_STRMOUT_BUFFERS_CTRL_LIMIT_MODE_OFFSET 0x00000002
+#define NV50_3D_STRMOUT_BUFFERS_CTRL_SEPARATE__MASK 0x000000f0
+#define NV50_3D_STRMOUT_BUFFERS_CTRL_SEPARATE__SHIFT 4
+#define NV50_3D_STRMOUT_BUFFERS_CTRL_STRIDE__MASK 0x000fff00
+#define NV50_3D_STRMOUT_BUFFERS_CTRL_STRIDE__SHIFT 8
+#define NV50_3D_STRMOUT_BUFFERS_CTRL_STRIDE__MAX 0x00000800
+
+#define NV50_3D_FP_RESULT_COUNT 0x00001298
+
+#define NV50_3D_VTX_UNK129C 0x0000129c
+
+#define NV50_3D_UNK12A0 0x000012a0
+
+#define NV50_3D_UNK12A8 0x000012a8
+#define NV50_3D_UNK12A8_UNK1 0x00000001
+#define NV50_3D_UNK12A8_UNK2__MASK 0x000ffff0
+#define NV50_3D_UNK12A8_UNK2__SHIFT 4
+
+#define NV50_3D_UNK12AC 0x000012ac
+
+#define NV50_3D_UNK12B0 0x000012b0
+#define NV50_3D_UNK12B0_UNK0__MASK 0x000000ff
+#define NV50_3D_UNK12B0_UNK0__SHIFT 0
+#define NV50_3D_UNK12B0_UNK1__MASK 0x0000ff00
+#define NV50_3D_UNK12B0_UNK1__SHIFT 8
+#define NV50_3D_UNK12B0_UNK2__MASK 0x00ff0000
+#define NV50_3D_UNK12B0_UNK2__SHIFT 16
+#define NV50_3D_UNK12B0_UNK3__MASK 0xff000000
+#define NV50_3D_UNK12B0_UNK3__SHIFT 24
+#define NV50_3D_UNK12B0_UNK3__MAX 0x00000080
+
+#define NV50_3D_UNK12B4 0x000012b4
+
+#define NV50_3D_UNK12B8 0x000012b8
+
+#define NV50_3D_DEPTH_TEST_ENABLE 0x000012cc
+
+#define NV50_3D_D3D_FILL_MODE 0x000012d0
+#define NV50_3D_D3D_FILL_MODE_POINT 0x00000001
+#define NV50_3D_D3D_FILL_MODE_WIREFRAME 0x00000002
+#define NV50_3D_D3D_FILL_MODE_SOLID 0x00000003
+
+#define NV50_3D_SHADE_MODEL 0x000012d4
+#define NV50_3D_SHADE_MODEL_FLAT 0x00001d00
+#define NV50_3D_SHADE_MODEL_SMOOTH 0x00001d01
+
+#define NV50_3D_LOCAL_ADDRESS_HIGH 0x000012d8
+
+#define NV50_3D_LOCAL_ADDRESS_LOW 0x000012dc
+
+#define NV50_3D_LOCAL_SIZE_LOG 0x000012e0
+
+#define NV50_3D_BLEND_INDEPENDENT 0x000012e4
+
+#define NV50_3D_DEPTH_WRITE_ENABLE 0x000012e8
+
+#define NV50_3D_ALPHA_TEST_ENABLE 0x000012ec
+
+#define NV50_3D_PM_SET(i0) (0x000012f0 + 0x4*(i0))
+#define NV50_3D_PM_SET__ESIZE 0x00000004
+#define NV50_3D_PM_SET__LEN 0x00000004
+
+#define NV50_3D_VB_ELEMENT_U8_SETUP 0x00001300
+#define NV50_3D_VB_ELEMENT_U8_SETUP_OFFSET__MASK 0xc0000000
+#define NV50_3D_VB_ELEMENT_U8_SETUP_OFFSET__SHIFT 30
+#define NV50_3D_VB_ELEMENT_U8_SETUP_COUNT__MASK 0x3fffffff
+#define NV50_3D_VB_ELEMENT_U8_SETUP_COUNT__SHIFT 0
+
+#define NV50_3D_VB_ELEMENT_U8 0x00001304
+#define NV50_3D_VB_ELEMENT_U8_I0__MASK 0x000000ff
+#define NV50_3D_VB_ELEMENT_U8_I0__SHIFT 0
+#define NV50_3D_VB_ELEMENT_U8_I1__MASK 0x0000ff00
+#define NV50_3D_VB_ELEMENT_U8_I1__SHIFT 8
+#define NV50_3D_VB_ELEMENT_U8_I2__MASK 0x00ff0000
+#define NV50_3D_VB_ELEMENT_U8_I2__SHIFT 16
+#define NV50_3D_VB_ELEMENT_U8_I3__MASK 0xff000000
+#define NV50_3D_VB_ELEMENT_U8_I3__SHIFT 24
+
+#define NV50_3D_D3D_CULL_MODE 0x00001308
+#define NV50_3D_D3D_CULL_MODE_NONE 0x00000001
+#define NV50_3D_D3D_CULL_MODE_FRONT 0x00000002
+#define NV50_3D_D3D_CULL_MODE_BACK 0x00000003
+
+#define NV50_3D_DEPTH_TEST_FUNC 0x0000130c
+#define NV50_3D_DEPTH_TEST_FUNC_NEVER 0x00000200
+#define NV50_3D_DEPTH_TEST_FUNC_LESS 0x00000201
+#define NV50_3D_DEPTH_TEST_FUNC_EQUAL 0x00000202
+#define NV50_3D_DEPTH_TEST_FUNC_LEQUAL 0x00000203
+#define NV50_3D_DEPTH_TEST_FUNC_GREATER 0x00000204
+#define NV50_3D_DEPTH_TEST_FUNC_NOTEQUAL 0x00000205
+#define NV50_3D_DEPTH_TEST_FUNC_GEQUAL 0x00000206
+#define NV50_3D_DEPTH_TEST_FUNC_ALWAYS 0x00000207
+
+#define NV50_3D_ALPHA_TEST_REF 0x00001310
+
+#define NV50_3D_ALPHA_TEST_FUNC 0x00001314
+#define NV50_3D_ALPHA_TEST_FUNC_NEVER 0x00000200
+#define NV50_3D_ALPHA_TEST_FUNC_LESS 0x00000201
+#define NV50_3D_ALPHA_TEST_FUNC_EQUAL 0x00000202
+#define NV50_3D_ALPHA_TEST_FUNC_LEQUAL 0x00000203
+#define NV50_3D_ALPHA_TEST_FUNC_GREATER 0x00000204
+#define NV50_3D_ALPHA_TEST_FUNC_NOTEQUAL 0x00000205
+#define NV50_3D_ALPHA_TEST_FUNC_GEQUAL 0x00000206
+#define NV50_3D_ALPHA_TEST_FUNC_ALWAYS 0x00000207
+
+#define NVA0_3D_DRAW_TFB_STRIDE 0x00001318
+#define NVA0_3D_DRAW_TFB_STRIDE__MIN 0x00000001
+#define NVA0_3D_DRAW_TFB_STRIDE__MAX 0x00000fff
+
+#define NV50_3D_BLEND_COLOR(i0) (0x0000131c + 0x4*(i0))
+#define NV50_3D_BLEND_COLOR__ESIZE 0x00000004
+#define NV50_3D_BLEND_COLOR__LEN 0x00000004
+
+#define NV50_3D_UNK132C 0x0000132c
+
+#define NV50_3D_TSC_FLUSH 0x00001330
+#define NV50_3D_TSC_FLUSH_SPECIFIC 0x00000001
+#define NV50_3D_TSC_FLUSH_ENTRY__MASK 0x03fffff0
+#define NV50_3D_TSC_FLUSH_ENTRY__SHIFT 4
+
+#define NV50_3D_TIC_FLUSH 0x00001334
+#define NV50_3D_TIC_FLUSH_SPECIFIC 0x00000001
+#define NV50_3D_TIC_FLUSH_ENTRY__MASK 0x03fffff0
+#define NV50_3D_TIC_FLUSH_ENTRY__SHIFT 4
+
+#define NV50_3D_TEX_CACHE_CTL 0x00001338
+#define NV50_3D_TEX_CACHE_CTL_UNK1__MASK 0x00000030
+#define NV50_3D_TEX_CACHE_CTL_UNK1__SHIFT 4
+
+#define NV50_3D_UNK133C 0x0000133c
+
+#define NV50_3D_BLEND_EQUATION_RGB 0x00001340
+#define NV50_3D_BLEND_EQUATION_RGB_FUNC_ADD 0x00008006
+#define NV50_3D_BLEND_EQUATION_RGB_MIN 0x00008007
+#define NV50_3D_BLEND_EQUATION_RGB_MAX 0x00008008
+#define NV50_3D_BLEND_EQUATION_RGB_FUNC_SUBTRACT 0x0000800a
+#define NV50_3D_BLEND_EQUATION_RGB_FUNC_REVERSE_SUBTRACT 0x0000800b
+
+#define NV50_3D_BLEND_FUNC_SRC_RGB 0x00001344
+
+#define NV50_3D_BLEND_FUNC_DST_RGB 0x00001348
+
+#define NV50_3D_BLEND_EQUATION_ALPHA 0x0000134c
+#define NV50_3D_BLEND_EQUATION_ALPHA_FUNC_ADD 0x00008006
+#define NV50_3D_BLEND_EQUATION_ALPHA_MIN 0x00008007
+#define NV50_3D_BLEND_EQUATION_ALPHA_MAX 0x00008008
+#define NV50_3D_BLEND_EQUATION_ALPHA_FUNC_SUBTRACT 0x0000800a
+#define NV50_3D_BLEND_EQUATION_ALPHA_FUNC_REVERSE_SUBTRACT 0x0000800b
+
+#define NV50_3D_BLEND_FUNC_SRC_ALPHA 0x00001350
+
+#define NV50_3D_UNK1354 0x00001354
+
+#define NV50_3D_BLEND_FUNC_DST_ALPHA 0x00001358
+
+#define NV50_3D_UNK135C 0x0000135c
+
+#define NV50_3D_BLEND_ENABLE(i0) (0x00001360 + 0x4*(i0))
+#define NV50_3D_BLEND_ENABLE__ESIZE 0x00000004
+#define NV50_3D_BLEND_ENABLE__LEN 0x00000008
+
+#define NV50_3D_STENCIL_ENABLE 0x00001380
+
+#define NV50_3D_STENCIL_FRONT_OP_FAIL 0x00001384
+#define NV50_3D_STENCIL_FRONT_OP_FAIL_ZERO 0x00000000
+#define NV50_3D_STENCIL_FRONT_OP_FAIL_INVERT 0x0000150a
+#define NV50_3D_STENCIL_FRONT_OP_FAIL_KEEP 0x00001e00
+#define NV50_3D_STENCIL_FRONT_OP_FAIL_REPLACE 0x00001e01
+#define NV50_3D_STENCIL_FRONT_OP_FAIL_INCR 0x00001e02
+#define NV50_3D_STENCIL_FRONT_OP_FAIL_DECR 0x00001e03
+#define NV50_3D_STENCIL_FRONT_OP_FAIL_INCR_WRAP 0x00008507
+#define NV50_3D_STENCIL_FRONT_OP_FAIL_DECR_WRAP 0x00008508
+
+#define NV50_3D_STENCIL_FRONT_OP_ZFAIL 0x00001388
+#define NV50_3D_STENCIL_FRONT_OP_ZFAIL_ZERO 0x00000000
+#define NV50_3D_STENCIL_FRONT_OP_ZFAIL_INVERT 0x0000150a
+#define NV50_3D_STENCIL_FRONT_OP_ZFAIL_KEEP 0x00001e00
+#define NV50_3D_STENCIL_FRONT_OP_ZFAIL_REPLACE 0x00001e01
+#define NV50_3D_STENCIL_FRONT_OP_ZFAIL_INCR 0x00001e02
+#define NV50_3D_STENCIL_FRONT_OP_ZFAIL_DECR 0x00001e03
+#define NV50_3D_STENCIL_FRONT_OP_ZFAIL_INCR_WRAP 0x00008507
+#define NV50_3D_STENCIL_FRONT_OP_ZFAIL_DECR_WRAP 0x00008508
+
+#define NV50_3D_STENCIL_FRONT_OP_ZPASS 0x0000138c
+#define NV50_3D_STENCIL_FRONT_OP_ZPASS_ZERO 0x00000000
+#define NV50_3D_STENCIL_FRONT_OP_ZPASS_INVERT 0x0000150a
+#define NV50_3D_STENCIL_FRONT_OP_ZPASS_KEEP 0x00001e00
+#define NV50_3D_STENCIL_FRONT_OP_ZPASS_REPLACE 0x00001e01
+#define NV50_3D_STENCIL_FRONT_OP_ZPASS_INCR 0x00001e02
+#define NV50_3D_STENCIL_FRONT_OP_ZPASS_DECR 0x00001e03
+#define NV50_3D_STENCIL_FRONT_OP_ZPASS_INCR_WRAP 0x00008507
+#define NV50_3D_STENCIL_FRONT_OP_ZPASS_DECR_WRAP 0x00008508
+
+#define NV50_3D_STENCIL_FRONT_FUNC_FUNC 0x00001390
+#define NV50_3D_STENCIL_FRONT_FUNC_FUNC_NEVER 0x00000200
+#define NV50_3D_STENCIL_FRONT_FUNC_FUNC_LESS 0x00000201
+#define NV50_3D_STENCIL_FRONT_FUNC_FUNC_EQUAL 0x00000202
+#define NV50_3D_STENCIL_FRONT_FUNC_FUNC_LEQUAL 0x00000203
+#define NV50_3D_STENCIL_FRONT_FUNC_FUNC_GREATER 0x00000204
+#define NV50_3D_STENCIL_FRONT_FUNC_FUNC_NOTEQUAL 0x00000205
+#define NV50_3D_STENCIL_FRONT_FUNC_FUNC_GEQUAL 0x00000206
+#define NV50_3D_STENCIL_FRONT_FUNC_FUNC_ALWAYS 0x00000207
+
+#define NV50_3D_STENCIL_FRONT_FUNC_REF 0x00001394
+
+#define NV50_3D_STENCIL_FRONT_MASK 0x00001398
+
+#define NV50_3D_STENCIL_FRONT_FUNC_MASK 0x0000139c
+
+#define NV50_3D_UNK13A0 0x000013a0
+
+#define NVA0_3D_DRAW_TFB_BASE 0x000013a4
+
+#define NV50_3D_FRAG_COLOR_CLAMP_EN 0x000013a8
+#define NV50_3D_FRAG_COLOR_CLAMP_EN_0 0x00000001
+#define NV50_3D_FRAG_COLOR_CLAMP_EN_1 0x00000010
+#define NV50_3D_FRAG_COLOR_CLAMP_EN_2 0x00000100
+#define NV50_3D_FRAG_COLOR_CLAMP_EN_3 0x00001000
+#define NV50_3D_FRAG_COLOR_CLAMP_EN_4 0x00010000
+#define NV50_3D_FRAG_COLOR_CLAMP_EN_5 0x00100000
+#define NV50_3D_FRAG_COLOR_CLAMP_EN_6 0x01000000
+#define NV50_3D_FRAG_COLOR_CLAMP_EN_7 0x10000000
+
+#define NV50_3D_SCREEN_Y_CONTROL 0x000013ac
+#define NV50_3D_SCREEN_Y_CONTROL_Y_NEGATE 0x00000001
+#define NV50_3D_SCREEN_Y_CONTROL_TRIANGLE_RAST_FLIP 0x00000010
+
+#define NV50_3D_LINE_WIDTH 0x000013b0
+
+#define NV50_3D_TEX_LIMITS(i0) (0x000013b4 + 0x4*(i0))
+#define NV50_3D_TEX_LIMITS__ESIZE 0x00000004
+#define NV50_3D_TEX_LIMITS__LEN 0x00000003
+#define NV50_3D_TEX_LIMITS_SAMPLERS_LOG2__MASK 0x0000000f
+#define NV50_3D_TEX_LIMITS_SAMPLERS_LOG2__SHIFT 0
+#define NV50_3D_TEX_LIMITS_SAMPLERS_LOG2__MIN 0x00000000
+#define NV50_3D_TEX_LIMITS_SAMPLERS_LOG2__MAX 0x00000004
+#define NV50_3D_TEX_LIMITS_TEXTURES_LOG2__MASK 0x000000f0
+#define NV50_3D_TEX_LIMITS_TEXTURES_LOG2__SHIFT 4
+#define NV50_3D_TEX_LIMITS_TEXTURES_LOG2__MIN 0x00000000
+#define NV50_3D_TEX_LIMITS_TEXTURES_LOG2__MAX 0x00000007
+
+#define NV50_3D_POINT_COORD_REPLACE_MAP(i0) (0x000013c0 + 0x4*(i0))
+#define NV50_3D_POINT_COORD_REPLACE_MAP__ESIZE 0x00000004
+#define NV50_3D_POINT_COORD_REPLACE_MAP__LEN 0x00000010
+
+#define NV50_3D_UNK1400_LANES 0x00001400
+
+#define NV50_3D_UNK1404 0x00001404
+
+#define NV50_3D_UNK1408 0x00001408
+
+#define NV50_3D_VP_START_ID 0x0000140c
+
+#define NV50_3D_GP_START_ID 0x00001410
+
+#define NV50_3D_FP_START_ID 0x00001414
+
+#define NVA3_3D_UNK1418 0x00001418
+
+#define NV50_3D_UNK141C 0x0000141c
+
+#define NV50_3D_GP_VERTEX_OUTPUT_COUNT 0x00001420
+#define NV50_3D_GP_VERTEX_OUTPUT_COUNT__MIN 0x00000001
+#define NV50_3D_GP_VERTEX_OUTPUT_COUNT__MAX 0x00000400
+
+#define NV50_3D_VERTEX_ARRAY_FLUSH 0x0000142c
+
+#define NV50_3D_UNK1430 0x00001430
+#define NV50_3D_UNK1430_UNK0 0x00000010
+#define NV50_3D_UNK1430_UNK1 0x00000100
+
+#define NV50_3D_VB_ELEMENT_BASE 0x00001434
+
+#define NV50_3D_VB_INSTANCE_BASE 0x00001438
+
+#define NV50_3D_CLEAR_FLAGS 0x0000143c
+#define NV50_3D_CLEAR_FLAGS_STENCIL_MASK 0x00000001
+#define NV50_3D_CLEAR_FLAGS_CLEAR_RECT__MASK 0x00000010
+#define NV50_3D_CLEAR_FLAGS_CLEAR_RECT__SHIFT 4
+#define NV50_3D_CLEAR_FLAGS_CLEAR_RECT_SCISSOR 0x00000000
+#define NV50_3D_CLEAR_FLAGS_CLEAR_RECT_VIEWPORT 0x00000010
+
+#define NV50_3D_CODE_CB_FLUSH 0x00001440
+
+#define NV50_3D_BIND_TSC(i0) (0x00001444 + 0x8*(i0))
+#define NV50_3D_BIND_TSC__ESIZE 0x00000008
+#define NV50_3D_BIND_TSC__LEN 0x00000003
+#define NV50_3D_BIND_TSC_VALID 0x00000001
+#define NV50_3D_BIND_TSC_SAMPLER__MASK 0x000000f0
+#define NV50_3D_BIND_TSC_SAMPLER__SHIFT 4
+#define NV50_3D_BIND_TSC_TSC__MASK 0x001ff000
+#define NV50_3D_BIND_TSC_TSC__SHIFT 12
+
+#define NV50_3D_BIND_TIC(i0) (0x00001448 + 0x8*(i0))
+#define NV50_3D_BIND_TIC__ESIZE 0x00000008
+#define NV50_3D_BIND_TIC__LEN 0x00000003
+#define NV50_3D_BIND_TIC_VALID 0x00000001
+#define NV50_3D_BIND_TIC_TEXTURE__MASK 0x000001fe
+#define NV50_3D_BIND_TIC_TEXTURE__SHIFT 1
+#define NV50_3D_BIND_TIC_TIC__MASK 0x7ffffe00
+#define NV50_3D_BIND_TIC_TIC__SHIFT 9
+
+#define NV50_3D_BIND_TSC2(i0) (0x00001468 + 0x8*(i0))
+#define NV50_3D_BIND_TSC2__ESIZE 0x00000008
+#define NV50_3D_BIND_TSC2__LEN 0x00000003
+#define NV50_3D_BIND_TSC2_VALID 0x00000001
+#define NV50_3D_BIND_TSC2_SAMPLER__MASK 0x000000f0
+#define NV50_3D_BIND_TSC2_SAMPLER__SHIFT 4
+#define NV50_3D_BIND_TSC2_TSC__MASK 0x001ff000
+#define NV50_3D_BIND_TSC2_TSC__SHIFT 12
+
+#define NV50_3D_BIND_TIC2(i0) (0x0000146c + 0x8*(i0))
+#define NV50_3D_BIND_TIC2__ESIZE 0x00000008
+#define NV50_3D_BIND_TIC2__LEN 0x00000003
+#define NV50_3D_BIND_TIC2_VALID 0x00000001
+#define NV50_3D_BIND_TIC2_TEXTURE__MASK 0x000001fe
+#define NV50_3D_BIND_TIC2_TEXTURE__SHIFT 1
+#define NV50_3D_BIND_TIC2_TIC__MASK 0x7ffffe00
+#define NV50_3D_BIND_TIC2_TIC__SHIFT 9
+
+#define NV50_3D_STRMOUT_MAP(i0) (0x00001480 + 0x4*(i0))
+#define NV50_3D_STRMOUT_MAP__ESIZE 0x00000004
+#define NV50_3D_STRMOUT_MAP__LEN 0x00000020
+
+#define NV50_3D_CLIPID_HEIGHT 0x00001504
+#define NV50_3D_CLIPID_HEIGHT__MAX 0x00002000
+
+#define NV50_3D_CLIPID_FILL_RECT_HORIZ 0x00001508
+#define NV50_3D_CLIPID_FILL_RECT_HORIZ_LOW__MASK 0x0000ffff
+#define NV50_3D_CLIPID_FILL_RECT_HORIZ_LOW__SHIFT 0
+#define NV50_3D_CLIPID_FILL_RECT_HORIZ_HIGH__MASK 0xffff0000
+#define NV50_3D_CLIPID_FILL_RECT_HORIZ_HIGH__SHIFT 16
+
+#define NV50_3D_CLIPID_FILL_RECT_VERT 0x0000150c
+#define NV50_3D_CLIPID_FILL_RECT_VERT_LOW__MASK 0x0000ffff
+#define NV50_3D_CLIPID_FILL_RECT_VERT_LOW__SHIFT 0
+#define NV50_3D_CLIPID_FILL_RECT_VERT_HIGH__MASK 0xffff0000
+#define NV50_3D_CLIPID_FILL_RECT_VERT_HIGH__SHIFT 16
+
+#define NV50_3D_VP_CLIP_DISTANCE_ENABLE 0x00001510
+#define NV50_3D_VP_CLIP_DISTANCE_ENABLE_0 0x00000001
+#define NV50_3D_VP_CLIP_DISTANCE_ENABLE_1 0x00000002
+#define NV50_3D_VP_CLIP_DISTANCE_ENABLE_2 0x00000004
+#define NV50_3D_VP_CLIP_DISTANCE_ENABLE_3 0x00000008
+#define NV50_3D_VP_CLIP_DISTANCE_ENABLE_4 0x00000010
+#define NV50_3D_VP_CLIP_DISTANCE_ENABLE_5 0x00000020
+#define NV50_3D_VP_CLIP_DISTANCE_ENABLE_6 0x00000040
+#define NV50_3D_VP_CLIP_DISTANCE_ENABLE_7 0x00000080
+
+#define NV50_3D_SAMPLECNT_ENABLE 0x00001514
+
+#define NV50_3D_POINT_SIZE 0x00001518
+
+#define NV50_3D_ZCULL_STATCTRS_ENABLE 0x0000151c
+
+#define NV50_3D_POINT_SPRITE_ENABLE 0x00001520
+
+#define NVA0_3D_UNK152C 0x0000152c
+#define NVA0_3D_UNK152C_UNK0 0x00000001
+#define NVA0_3D_UNK152C_UNK1 0x00000010
+#define NVA0_3D_UNK152C_UNK2 0x00000100
+#define NVA0_3D_UNK152C_UNK3__MASK 0x000ff000
+#define NVA0_3D_UNK152C_UNK3__SHIFT 12
+#define NVA0_3D_UNK152C_UNK3__MAX 0x00000028
+
+#define NV50_3D_COUNTER_RESET 0x00001530
+#define NV50_3D_COUNTER_RESET_SAMPLECNT 0x00000001
+#define NV50_3D_COUNTER_RESET_ZCULL_STATS 0x00000002
+#define NVA0_3D_COUNTER_RESET_STRMOUT_VERTICES 0x00000008
+#define NV50_3D_COUNTER_RESET_TRANSFORM_FEEDBACK 0x00000010
+#define NV50_3D_COUNTER_RESET_GENERATED_PRIMITIVES 0x00000011
+#define NV50_3D_COUNTER_RESET_VFETCH_VERTICES 0x00000012
+#define NV50_3D_COUNTER_RESET_VFETCH_PRIMITIVES 0x00000013
+#define NV50_3D_COUNTER_RESET_VP_LAUNCHES 0x00000015
+#define NV50_3D_COUNTER_RESET_GP_LAUNCHES 0x0000001a
+#define NV50_3D_COUNTER_RESET_GP_PRIMITIVES_OUT 0x0000001b
+#define NV50_3D_COUNTER_RESET_RAST_PRIMITIVES_PRECLIP 0x0000001c
+#define NV50_3D_COUNTER_RESET_RAST_PRIMITIVES_POSTCLIP 0x0000001d
+#define NV50_3D_COUNTER_RESET_FP_PIXELS 0x0000001e
+
+#define NV50_3D_MULTISAMPLE_ENABLE 0x00001534
+
+#define NV50_3D_ZETA_ENABLE 0x00001538
+
+#define NV50_3D_MULTISAMPLE_CTRL 0x0000153c
+#define NV50_3D_MULTISAMPLE_CTRL_ALPHA_TO_COVERAGE 0x00000001
+#define NV50_3D_MULTISAMPLE_CTRL_ALPHA_TO_ONE 0x00000010
+
+#define NV50_3D_NOPERSPECTIVE_BITMAP(i0) (0x00001540 + 0x4*(i0))
+#define NV50_3D_NOPERSPECTIVE_BITMAP__ESIZE 0x00000004
+#define NV50_3D_NOPERSPECTIVE_BITMAP__LEN 0x00000004
+
+#define NV50_3D_COND_ADDRESS_HIGH 0x00001550
+
+#define NV50_3D_COND_ADDRESS_LOW 0x00001554
+
+#define NV50_3D_COND_MODE 0x00001558
+#define NV50_3D_COND_MODE_NEVER 0x00000000
+#define NV50_3D_COND_MODE_ALWAYS 0x00000001
+#define NV50_3D_COND_MODE_RES_NON_ZERO 0x00000002
+#define NV50_3D_COND_MODE_EQUAL 0x00000003
+#define NV50_3D_COND_MODE_NOT_EQUAL 0x00000004
+
+#define NV50_3D_TSC_ADDRESS_HIGH 0x0000155c
+
+#define NV50_3D_TSC_ADDRESS_LOW 0x00001560
+#define NV50_3D_TSC_ADDRESS_LOW__ALIGN 0x00000020
+
+#define NV50_3D_TSC_LIMIT 0x00001564
+#define NV50_3D_TSC_LIMIT__MAX 0x00001fff
+
+#define NV50_3D_UNK1568 0x00001568
+
+#define NV50_3D_POLYGON_OFFSET_FACTOR 0x0000156c
+
+#define NV50_3D_LINE_SMOOTH_ENABLE 0x00001570
+
+#define NV50_3D_TIC_ADDRESS_HIGH 0x00001574
+
+#define NV50_3D_TIC_ADDRESS_LOW 0x00001578
+
+#define NV50_3D_TIC_LIMIT 0x0000157c
+
+#define NV50_3D_PM_CONTROL(i0) (0x00001580 + 0x4*(i0))
+#define NV50_3D_PM_CONTROL__ESIZE 0x00000004
+#define NV50_3D_PM_CONTROL__LEN 0x00000004
+#define NV50_3D_PM_CONTROL_UNK0 0x00000001
+#define NV50_3D_PM_CONTROL_UNK1__MASK 0x00000070
+#define NV50_3D_PM_CONTROL_UNK1__SHIFT 4
+#define NV50_3D_PM_CONTROL_UNK2__MASK 0x00ffff00
+#define NV50_3D_PM_CONTROL_UNK2__SHIFT 8
+#define NV50_3D_PM_CONTROL_UNK3__MASK 0xff000000
+#define NV50_3D_PM_CONTROL_UNK3__SHIFT 24
+
+#define NV50_3D_ZCULL_REGION 0x00001590
+
+#define NV50_3D_STENCIL_TWO_SIDE_ENABLE 0x00001594
+
+#define NV50_3D_STENCIL_BACK_OP_FAIL 0x00001598
+#define NV50_3D_STENCIL_BACK_OP_FAIL_ZERO 0x00000000
+#define NV50_3D_STENCIL_BACK_OP_FAIL_INVERT 0x0000150a
+#define NV50_3D_STENCIL_BACK_OP_FAIL_KEEP 0x00001e00
+#define NV50_3D_STENCIL_BACK_OP_FAIL_REPLACE 0x00001e01
+#define NV50_3D_STENCIL_BACK_OP_FAIL_INCR 0x00001e02
+#define NV50_3D_STENCIL_BACK_OP_FAIL_DECR 0x00001e03
+#define NV50_3D_STENCIL_BACK_OP_FAIL_INCR_WRAP 0x00008507
+#define NV50_3D_STENCIL_BACK_OP_FAIL_DECR_WRAP 0x00008508
+
+#define NV50_3D_STENCIL_BACK_OP_ZFAIL 0x0000159c
+#define NV50_3D_STENCIL_BACK_OP_ZFAIL_ZERO 0x00000000
+#define NV50_3D_STENCIL_BACK_OP_ZFAIL_INVERT 0x0000150a
+#define NV50_3D_STENCIL_BACK_OP_ZFAIL_KEEP 0x00001e00
+#define NV50_3D_STENCIL_BACK_OP_ZFAIL_REPLACE 0x00001e01
+#define NV50_3D_STENCIL_BACK_OP_ZFAIL_INCR 0x00001e02
+#define NV50_3D_STENCIL_BACK_OP_ZFAIL_DECR 0x00001e03
+#define NV50_3D_STENCIL_BACK_OP_ZFAIL_INCR_WRAP 0x00008507
+#define NV50_3D_STENCIL_BACK_OP_ZFAIL_DECR_WRAP 0x00008508
+
+#define NV50_3D_STENCIL_BACK_OP_ZPASS 0x000015a0
+#define NV50_3D_STENCIL_BACK_OP_ZPASS_ZERO 0x00000000
+#define NV50_3D_STENCIL_BACK_OP_ZPASS_INVERT 0x0000150a
+#define NV50_3D_STENCIL_BACK_OP_ZPASS_KEEP 0x00001e00
+#define NV50_3D_STENCIL_BACK_OP_ZPASS_REPLACE 0x00001e01
+#define NV50_3D_STENCIL_BACK_OP_ZPASS_INCR 0x00001e02
+#define NV50_3D_STENCIL_BACK_OP_ZPASS_DECR 0x00001e03
+#define NV50_3D_STENCIL_BACK_OP_ZPASS_INCR_WRAP 0x00008507
+#define NV50_3D_STENCIL_BACK_OP_ZPASS_DECR_WRAP 0x00008508
+
+#define NV50_3D_STENCIL_BACK_FUNC_FUNC 0x000015a4
+#define NV50_3D_STENCIL_BACK_FUNC_FUNC_NEVER 0x00000200
+#define NV50_3D_STENCIL_BACK_FUNC_FUNC_LESS 0x00000201
+#define NV50_3D_STENCIL_BACK_FUNC_FUNC_EQUAL 0x00000202
+#define NV50_3D_STENCIL_BACK_FUNC_FUNC_LEQUAL 0x00000203
+#define NV50_3D_STENCIL_BACK_FUNC_FUNC_GREATER 0x00000204
+#define NV50_3D_STENCIL_BACK_FUNC_FUNC_NOTEQUAL 0x00000205
+#define NV50_3D_STENCIL_BACK_FUNC_FUNC_GEQUAL 0x00000206
+#define NV50_3D_STENCIL_BACK_FUNC_FUNC_ALWAYS 0x00000207
+
+#define NV50_3D_UNK15A8 0x000015a8
+#define NV50_3D_UNK15A8_UNK1__MASK 0x00000007
+#define NV50_3D_UNK15A8_UNK1__SHIFT 0
+#define NV50_3D_UNK15A8_UNK2__MASK 0x00000070
+#define NV50_3D_UNK15A8_UNK2__SHIFT 4
+
+#define NV50_3D_UNK15AC 0x000015ac
+
+#define NV50_3D_UNK15B0 0x000015b0
+#define NV50_3D_UNK15B0_0 0x00000001
+#define NV50_3D_UNK15B0_1 0x00000010
+#define NV50_3D_UNK15B0_2 0x00000100
+
+#define NV50_3D_CSAA_ENABLE 0x000015b4
+
+#define NV50_3D_FRAMEBUFFER_SRGB 0x000015b8
+
+#define NV50_3D_POLYGON_OFFSET_UNITS 0x000015bc
+
+#define NVA3_3D_UNK15C4 0x000015c4
+
+#define NVA3_3D_UNK15C8 0x000015c8
+
+#define NV50_3D_LAYER 0x000015cc
+#define NV50_3D_LAYER_IDX__MASK 0x0000ffff
+#define NV50_3D_LAYER_IDX__SHIFT 0
+#define NV50_3D_LAYER_USE_GP 0x00010000
+
+#define NV50_3D_MULTISAMPLE_MODE 0x000015d0
+#define NV50_3D_MULTISAMPLE_MODE_MS1 0x00000000
+#define NV50_3D_MULTISAMPLE_MODE_MS2 0x00000001
+#define NV50_3D_MULTISAMPLE_MODE_MS4 0x00000002
+#define NV50_3D_MULTISAMPLE_MODE_MS8 0x00000003
+#define NV50_3D_MULTISAMPLE_MODE_MS8_ALT 0x00000004
+#define NV50_3D_MULTISAMPLE_MODE_MS2_ALT 0x00000005
+#define NV50_3D_MULTISAMPLE_MODE_MS4_CS4 0x00000008
+#define NV50_3D_MULTISAMPLE_MODE_MS4_CS12 0x00000009
+#define NV50_3D_MULTISAMPLE_MODE_MS8_CS8 0x0000000a
+
+#define NV50_3D_VERTEX_BEGIN_D3D 0x000015d4
+#define NV50_3D_VERTEX_BEGIN_D3D_PRIMITIVE__MASK 0x0fffffff
+#define NV50_3D_VERTEX_BEGIN_D3D_PRIMITIVE__SHIFT 0
+#define NV50_3D_VERTEX_BEGIN_D3D_PRIMITIVE_POINTS 0x00000001
+#define NV50_3D_VERTEX_BEGIN_D3D_PRIMITIVE_LINES 0x00000002
+#define NV50_3D_VERTEX_BEGIN_D3D_PRIMITIVE_LINE_STRIP 0x00000003
+#define NV50_3D_VERTEX_BEGIN_D3D_PRIMITIVE_TRIANGLES 0x00000004
+#define NV50_3D_VERTEX_BEGIN_D3D_PRIMITIVE_TRIANGLE_STRIP 0x00000005
+#define NV50_3D_VERTEX_BEGIN_D3D_PRIMITIVE_LINES_ADJACENCY 0x0000000a
+#define NV50_3D_VERTEX_BEGIN_D3D_PRIMITIVE_LINE_STRIP_ADJACENCY 0x0000000b
+#define NV50_3D_VERTEX_BEGIN_D3D_PRIMITIVE_TRIANGLES_ADJACENCY 0x0000000c
+#define NV50_3D_VERTEX_BEGIN_D3D_PRIMITIVE_TRIANGLE_STRIP_ADJACENCY 0x0000000d
+#define NV50_3D_VERTEX_BEGIN_D3D_INSTANCE_NEXT 0x10000000
+#define NV84_3D_VERTEX_BEGIN_D3D_PRIMITIVE_ID_CONT 0x20000000
+#define NVA0_3D_VERTEX_BEGIN_D3D_INSTANCE_CONT 0x40000000
+
+#define NV50_3D_VERTEX_END_D3D 0x000015d8
+#define NV50_3D_VERTEX_END_D3D_UNK0 0x00000001
+#define NVA0_3D_VERTEX_END_D3D_UNK1 0x00000002
+
+#define NV50_3D_VERTEX_BEGIN_GL 0x000015dc
+#define NV50_3D_VERTEX_BEGIN_GL_PRIMITIVE__MASK 0x0fffffff
+#define NV50_3D_VERTEX_BEGIN_GL_PRIMITIVE__SHIFT 0
+#define NV50_3D_VERTEX_BEGIN_GL_PRIMITIVE_POINTS 0x00000000
+#define NV50_3D_VERTEX_BEGIN_GL_PRIMITIVE_LINES 0x00000001
+#define NV50_3D_VERTEX_BEGIN_GL_PRIMITIVE_LINE_LOOP 0x00000002
+#define NV50_3D_VERTEX_BEGIN_GL_PRIMITIVE_LINE_STRIP 0x00000003
+#define NV50_3D_VERTEX_BEGIN_GL_PRIMITIVE_TRIANGLES 0x00000004
+#define NV50_3D_VERTEX_BEGIN_GL_PRIMITIVE_TRIANGLE_STRIP 0x00000005
+#define NV50_3D_VERTEX_BEGIN_GL_PRIMITIVE_TRIANGLE_FAN 0x00000006
+#define NV50_3D_VERTEX_BEGIN_GL_PRIMITIVE_QUADS 0x00000007
+#define NV50_3D_VERTEX_BEGIN_GL_PRIMITIVE_QUAD_STRIP 0x00000008
+#define NV50_3D_VERTEX_BEGIN_GL_PRIMITIVE_POLYGON 0x00000009
+#define NV50_3D_VERTEX_BEGIN_GL_PRIMITIVE_LINES_ADJACENCY 0x0000000a
+#define NV50_3D_VERTEX_BEGIN_GL_PRIMITIVE_LINE_STRIP_ADJACENCY 0x0000000b
+#define NV50_3D_VERTEX_BEGIN_GL_PRIMITIVE_TRIANGLES_ADJACENCY 0x0000000c
+#define NV50_3D_VERTEX_BEGIN_GL_PRIMITIVE_TRIANGLE_STRIP_ADJACENCY 0x0000000d
+#define NV50_3D_VERTEX_BEGIN_GL_INSTANCE_NEXT 0x10000000
+#define NV84_3D_VERTEX_BEGIN_GL_PRIMITIVE_ID_CONT 0x20000000
+#define NVA0_3D_VERTEX_BEGIN_GL_INSTANCE_CONT 0x40000000
+
+#define NV50_3D_VERTEX_END_GL 0x000015e0
+#define NV50_3D_VERTEX_END_GL_UNK0 0x00000001
+#define NVA0_3D_VERTEX_END_GL_UNK1 0x00000002
+
+#define NV50_3D_EDGEFLAG_ENABLE 0x000015e4
+
+#define NV50_3D_VB_ELEMENT_U32 0x000015e8
+
+#define NV50_3D_VB_ELEMENT_U16_SETUP 0x000015ec
+#define NV50_3D_VB_ELEMENT_U16_SETUP_OFFSET__MASK 0xc0000000
+#define NV50_3D_VB_ELEMENT_U16_SETUP_OFFSET__SHIFT 30
+#define NV50_3D_VB_ELEMENT_U16_SETUP_COUNT__MASK 0x3fffffff
+#define NV50_3D_VB_ELEMENT_U16_SETUP_COUNT__SHIFT 0
+
+#define NV50_3D_VB_ELEMENT_U16 0x000015f0
+#define NV50_3D_VB_ELEMENT_U16_I0__MASK 0x0000ffff
+#define NV50_3D_VB_ELEMENT_U16_I0__SHIFT 0
+#define NV50_3D_VB_ELEMENT_U16_I1__MASK 0xffff0000
+#define NV50_3D_VB_ELEMENT_U16_I1__SHIFT 16
+
+#define NV50_3D_VERTEX_BASE_HIGH 0x000015f4
+
+#define NV50_3D_VERTEX_BASE_LOW 0x000015f8
+
+#define NV50_3D_VERTEX_DATA 0x00001640
+
+#define NV50_3D_PRIM_RESTART_ENABLE 0x00001644
+
+#define NV50_3D_PRIM_RESTART_INDEX 0x00001648
+
+#define NV50_3D_VP_GP_BUILTIN_ATTR_EN 0x0000164c
+#define NV50_3D_VP_GP_BUILTIN_ATTR_EN_VERTEX_ID 0x00000001
+#define NV50_3D_VP_GP_BUILTIN_ATTR_EN_INSTANCE_ID 0x00000010
+#define NV50_3D_VP_GP_BUILTIN_ATTR_EN_PRIMITIVE_ID 0x00000100
+#define NV50_3D_VP_GP_BUILTIN_ATTR_EN_UNK12 0x00001000
+
+#define NV50_3D_VP_ATTR_EN(i0) (0x00001650 + 0x4*(i0))
+#define NV50_3D_VP_ATTR_EN__ESIZE 0x00000004
+#define NV50_3D_VP_ATTR_EN__LEN 0x00000002
+#define NV50_3D_VP_ATTR_EN_7__MASK 0xf0000000
+#define NV50_3D_VP_ATTR_EN_7__SHIFT 28
+#define NV50_3D_VP_ATTR_EN_7_X 0x10000000
+#define NV50_3D_VP_ATTR_EN_7_Y 0x20000000
+#define NV50_3D_VP_ATTR_EN_7_Z 0x40000000
+#define NV50_3D_VP_ATTR_EN_7_W 0x80000000
+#define NV50_3D_VP_ATTR_EN_6__MASK 0x0f000000
+#define NV50_3D_VP_ATTR_EN_6__SHIFT 24
+#define NV50_3D_VP_ATTR_EN_6_X 0x01000000
+#define NV50_3D_VP_ATTR_EN_6_Y 0x02000000
+#define NV50_3D_VP_ATTR_EN_6_Z 0x04000000
+#define NV50_3D_VP_ATTR_EN_6_W 0x08000000
+#define NV50_3D_VP_ATTR_EN_5__MASK 0x00f00000
+#define NV50_3D_VP_ATTR_EN_5__SHIFT 20
+#define NV50_3D_VP_ATTR_EN_5_X 0x00100000
+#define NV50_3D_VP_ATTR_EN_5_Y 0x00200000
+#define NV50_3D_VP_ATTR_EN_5_Z 0x00400000
+#define NV50_3D_VP_ATTR_EN_5_W 0x00800000
+#define NV50_3D_VP_ATTR_EN_4__MASK 0x000f0000
+#define NV50_3D_VP_ATTR_EN_4__SHIFT 16
+#define NV50_3D_VP_ATTR_EN_4_X 0x00010000
+#define NV50_3D_VP_ATTR_EN_4_Y 0x00020000
+#define NV50_3D_VP_ATTR_EN_4_Z 0x00040000
+#define NV50_3D_VP_ATTR_EN_4_W 0x00080000
+#define NV50_3D_VP_ATTR_EN_3__MASK 0x0000f000
+#define NV50_3D_VP_ATTR_EN_3__SHIFT 12
+#define NV50_3D_VP_ATTR_EN_3_X 0x00001000
+#define NV50_3D_VP_ATTR_EN_3_Y 0x00002000
+#define NV50_3D_VP_ATTR_EN_3_Z 0x00004000
+#define NV50_3D_VP_ATTR_EN_3_W 0x00008000
+#define NV50_3D_VP_ATTR_EN_2__MASK 0x00000f00
+#define NV50_3D_VP_ATTR_EN_2__SHIFT 8
+#define NV50_3D_VP_ATTR_EN_2_X 0x00000100
+#define NV50_3D_VP_ATTR_EN_2_Y 0x00000200
+#define NV50_3D_VP_ATTR_EN_2_Z 0x00000400
+#define NV50_3D_VP_ATTR_EN_2_W 0x00000800
+#define NV50_3D_VP_ATTR_EN_1__MASK 0x000000f0
+#define NV50_3D_VP_ATTR_EN_1__SHIFT 4
+#define NV50_3D_VP_ATTR_EN_1_X 0x00000010
+#define NV50_3D_VP_ATTR_EN_1_Y 0x00000020
+#define NV50_3D_VP_ATTR_EN_1_Z 0x00000040
+#define NV50_3D_VP_ATTR_EN_1_W 0x00000080
+#define NV50_3D_VP_ATTR_EN_0__MASK 0x0000000f
+#define NV50_3D_VP_ATTR_EN_0__SHIFT 0
+#define NV50_3D_VP_ATTR_EN_0_X 0x00000001
+#define NV50_3D_VP_ATTR_EN_0_Y 0x00000002
+#define NV50_3D_VP_ATTR_EN_0_Z 0x00000004
+#define NV50_3D_VP_ATTR_EN_0_W 0x00000008
+
+#define NV50_3D_POINT_SMOOTH_ENABLE 0x00001658
+
+#define NV50_3D_POINT_RASTER_RULES 0x0000165c
+#define NV50_3D_POINT_RASTER_RULES_OGL 0x00000000
+#define NV50_3D_POINT_RASTER_RULES_D3D 0x00000001
+
+#define NV50_3D_POINT_SPRITE_CTRL 0x00001660
+#define NV50_3D_POINT_SPRITE_CTRL_COORD_ORIGIN__MASK 0x00000010
+#define NV50_3D_POINT_SPRITE_CTRL_COORD_ORIGIN__SHIFT 4
+#define NV50_3D_POINT_SPRITE_CTRL_COORD_ORIGIN_LOWER_LEFT 0x00000000
+#define NV50_3D_POINT_SPRITE_CTRL_COORD_ORIGIN_UPPER_LEFT 0x00000010
+
+#define NVA0_3D_TEX_MISC 0x00001664
+#define NVA0_3D_TEX_MISC_UNK1 0x00000002
+#define NVA0_3D_TEX_MISC_SEAMLESS_CUBE_MAP 0x00000004
+
+#define NV50_3D_LINE_SMOOTH_BLUR 0x00001668
+#define NV50_3D_LINE_SMOOTH_BLUR_LOW 0x00000000
+#define NV50_3D_LINE_SMOOTH_BLUR_MEDIUM 0x00000001
+#define NV50_3D_LINE_SMOOTH_BLUR_HIGH 0x00000002
+
+#define NV50_3D_LINE_STIPPLE_ENABLE 0x0000166c
+
+#define NV50_3D_COVERAGE_LUT(i0) (0x00001670 + 0x4*(i0))
+#define NV50_3D_COVERAGE_LUT__ESIZE 0x00000004
+#define NV50_3D_COVERAGE_LUT__LEN 0x00000004
+#define NV50_3D_COVERAGE_LUT_0__MASK 0x000000ff
+#define NV50_3D_COVERAGE_LUT_0__SHIFT 0
+#define NV50_3D_COVERAGE_LUT_1__MASK 0x0000ff00
+#define NV50_3D_COVERAGE_LUT_1__SHIFT 8
+#define NV50_3D_COVERAGE_LUT_2__MASK 0x00ff0000
+#define NV50_3D_COVERAGE_LUT_2__SHIFT 16
+#define NV50_3D_COVERAGE_LUT_3__MASK 0xff000000
+#define NV50_3D_COVERAGE_LUT_3__SHIFT 24
+
+#define NV50_3D_LINE_STIPPLE 0x00001680
+#define NV50_3D_LINE_STIPPLE_FACTOR_M1__MASK 0x000000ff
+#define NV50_3D_LINE_STIPPLE_FACTOR_M1__SHIFT 0
+#define NV50_3D_LINE_STIPPLE_PATTERN__MASK 0x00ffff00
+#define NV50_3D_LINE_STIPPLE_PATTERN__SHIFT 8
+
+#define NV50_3D_PROVOKING_VERTEX_LAST 0x00001684
+
+#define NV50_3D_VERTEX_TWO_SIDE_ENABLE 0x00001688
+
+#define NV50_3D_POLYGON_STIPPLE_ENABLE 0x0000168c
+
+#define NV50_3D_UNK1690 0x00001690
+#define NV50_3D_UNK1690_ALWAYS_DERIV 0x00000001
+#define NV50_3D_UNK1690_UNK16 0x00010000
+
+#define NV50_3D_SET_PROGRAM_CB 0x00001694
+#define NV50_3D_SET_PROGRAM_CB_PROGRAM__MASK 0x000000f0
+#define NV50_3D_SET_PROGRAM_CB_PROGRAM__SHIFT 4
+#define NV50_3D_SET_PROGRAM_CB_PROGRAM_VERTEX 0x00000000
+#define NV50_3D_SET_PROGRAM_CB_PROGRAM_GEOMETRY 0x00000020
+#define NV50_3D_SET_PROGRAM_CB_PROGRAM_FRAGMENT 0x00000030
+#define NV50_3D_SET_PROGRAM_CB_INDEX__MASK 0x00000f00
+#define NV50_3D_SET_PROGRAM_CB_INDEX__SHIFT 8
+#define NV50_3D_SET_PROGRAM_CB_BUFFER__MASK 0x0007f000
+#define NV50_3D_SET_PROGRAM_CB_BUFFER__SHIFT 12
+#define NV50_3D_SET_PROGRAM_CB_VALID 0x00000001
+
+#define NV50_3D_UNK1698 0x00001698
+#define NV50_3D_UNK1698_0 0x00000001
+#define NV50_3D_UNK1698_1 0x00000010
+#define NV50_3D_UNK1698_2 0x00000100
+
+#define NVA3_3D_SAMPLE_SHADING 0x0000169c
+#define NVA3_3D_SAMPLE_SHADING_MIN_SAMPLES__MASK 0x0000000f
+#define NVA3_3D_SAMPLE_SHADING_MIN_SAMPLES__SHIFT 0
+#define NVA3_3D_SAMPLE_SHADING_ENABLE 0x00000010
+
+#define NVA3_3D_UNK16A0 0x000016a0
+
+#define NV50_3D_VP_RESULT_MAP_SIZE 0x000016ac
+
+#define NV50_3D_VP_REG_ALLOC_TEMP 0x000016b0
+
+#define NVA0_3D_UNK16B4 0x000016b4
+#define NVA0_3D_UNK16B4_UNK0 0x00000001
+#define NVA3_3D_UNK16B4_UNK1 0x00000002
+
+#define NV50_3D_VP_REG_ALLOC_RESULT 0x000016b8
+
+#define NV50_3D_VP_RESULT_MAP(i0) (0x000016bc + 0x4*(i0))
+#define NV50_3D_VP_RESULT_MAP__ESIZE 0x00000004
+#define NV50_3D_VP_RESULT_MAP__LEN 0x00000011
+#define NV50_3D_VP_RESULT_MAP_0__MASK 0x000000ff
+#define NV50_3D_VP_RESULT_MAP_0__SHIFT 0
+#define NV50_3D_VP_RESULT_MAP_1__MASK 0x0000ff00
+#define NV50_3D_VP_RESULT_MAP_1__SHIFT 8
+#define NV50_3D_VP_RESULT_MAP_2__MASK 0x00ff0000
+#define NV50_3D_VP_RESULT_MAP_2__SHIFT 16
+#define NV50_3D_VP_RESULT_MAP_3__MASK 0xff000000
+#define NV50_3D_VP_RESULT_MAP_3__SHIFT 24
+
+#define NV50_3D_POLYGON_STIPPLE_PATTERN(i0) (0x00001700 + 0x4*(i0))
+#define NV50_3D_POLYGON_STIPPLE_PATTERN__ESIZE 0x00000004
+#define NV50_3D_POLYGON_STIPPLE_PATTERN__LEN 0x00000020
+
+#define NVA0_3D_STRMOUT_OFFSET(i0) (0x00001780 + 0x4*(i0))
+#define NVA0_3D_STRMOUT_OFFSET__ESIZE 0x00000004
+#define NVA0_3D_STRMOUT_OFFSET__LEN 0x00000004
+
+#define NV50_3D_GP_ENABLE 0x00001798
+
+#define NV50_3D_GP_REG_ALLOC_TEMP 0x000017a0
+
+#define NV50_3D_GP_REG_ALLOC_RESULT 0x000017a8
+
+#define NV50_3D_GP_RESULT_MAP_SIZE 0x000017ac
+
+#define NV50_3D_GP_OUTPUT_PRIMITIVE_TYPE 0x000017b0
+#define NV50_3D_GP_OUTPUT_PRIMITIVE_TYPE_POINTS 0x00000001
+#define NV50_3D_GP_OUTPUT_PRIMITIVE_TYPE_LINE_STRIP 0x00000002
+#define NV50_3D_GP_OUTPUT_PRIMITIVE_TYPE_TRIANGLE_STRIP 0x00000003
+
+#define NV50_3D_RASTERIZE_ENABLE 0x000017b4
+
+#define NV50_3D_STRMOUT_ENABLE 0x000017b8
+
+#define NV50_3D_GP_RESULT_MAP(i0) (0x000017fc + 0x4*(i0))
+#define NV50_3D_GP_RESULT_MAP__ESIZE 0x00000004
+#define NV50_3D_GP_RESULT_MAP__LEN 0x00000021
+#define NV50_3D_GP_RESULT_MAP_0__MASK 0x000000ff
+#define NV50_3D_GP_RESULT_MAP_0__SHIFT 0
+#define NV50_3D_GP_RESULT_MAP_1__MASK 0x0000ff00
+#define NV50_3D_GP_RESULT_MAP_1__SHIFT 8
+#define NV50_3D_GP_RESULT_MAP_2__MASK 0x00ff0000
+#define NV50_3D_GP_RESULT_MAP_2__SHIFT 16
+#define NV50_3D_GP_RESULT_MAP_3__MASK 0xff000000
+#define NV50_3D_GP_RESULT_MAP_3__SHIFT 24
+
+#define NV50_3D_UNK187C 0x0000187c
+
+#define NVA3_3D_VERTEX_ARRAY_PER_INSTANCE_ALT(i0) (0x00001880 + 0x4*(i0))
+#define NVA3_3D_VERTEX_ARRAY_PER_INSTANCE_ALT__ESIZE 0x00000004
+#define NVA3_3D_VERTEX_ARRAY_PER_INSTANCE_ALT__LEN 0x00000020
+
+#define NV50_3D_GP_VIEWPORT_ID_ENABLE 0x00001900
+
+#define NV50_3D_MAP_SEMANTIC_0 0x00001904
+#define NV50_3D_MAP_SEMANTIC_0_FFC0_ID__MASK 0x000000ff
+#define NV50_3D_MAP_SEMANTIC_0_FFC0_ID__SHIFT 0
+#define NV50_3D_MAP_SEMANTIC_0_BFC0_ID__MASK 0x0000ff00
+#define NV50_3D_MAP_SEMANTIC_0_BFC0_ID__SHIFT 8
+#define NV50_3D_MAP_SEMANTIC_0_COLR_NR__MASK 0x00ff0000
+#define NV50_3D_MAP_SEMANTIC_0_COLR_NR__SHIFT 16
+#define NV50_3D_MAP_SEMANTIC_0_CLMP_EN 0xff000000
+
+#define NV50_3D_MAP_SEMANTIC_1 0x00001908
+#define NV50_3D_MAP_SEMANTIC_1_CLIP_START__MASK 0x000000ff
+#define NV50_3D_MAP_SEMANTIC_1_CLIP_START__SHIFT 0
+#define NV50_3D_MAP_SEMANTIC_1_CLIP_NUM__MASK 0x00000f00
+#define NV50_3D_MAP_SEMANTIC_1_CLIP_NUM__SHIFT 8
+
+#define NV50_3D_MAP_SEMANTIC_2 0x0000190c
+#define NV50_3D_MAP_SEMANTIC_2_LAYER_ID__MASK 0x000000ff
+#define NV50_3D_MAP_SEMANTIC_2_LAYER_ID__SHIFT 0
+
+#define NV50_3D_MAP_SEMANTIC_3 0x00001910
+#define NV50_3D_MAP_SEMANTIC_3_PTSZ_EN__MASK 0x00000001
+#define NV50_3D_MAP_SEMANTIC_3_PTSZ_EN__SHIFT 0
+#define NV50_3D_MAP_SEMANTIC_3_PTSZ_ID__MASK 0x00000ff0
+#define NV50_3D_MAP_SEMANTIC_3_PTSZ_ID__SHIFT 4
+
+#define NV50_3D_MAP_SEMANTIC_4 0x00001914
+#define NV50_3D_MAP_SEMANTIC_4_PRIM_ID__MASK 0x000000ff
+#define NV50_3D_MAP_SEMANTIC_4_PRIM_ID__SHIFT 0
+
+#define NV50_3D_CULL_FACE_ENABLE 0x00001918
+
+#define NV50_3D_FRONT_FACE 0x0000191c
+#define NV50_3D_FRONT_FACE_CW 0x00000900
+#define NV50_3D_FRONT_FACE_CCW 0x00000901
+
+#define NV50_3D_CULL_FACE 0x00001920
+#define NV50_3D_CULL_FACE_FRONT 0x00000404
+#define NV50_3D_CULL_FACE_BACK 0x00000405
+#define NV50_3D_CULL_FACE_FRONT_AND_BACK 0x00000408
+
+#define NV50_3D_UNK1924 0x00001924
+
+#define NVA3_3D_FP_MULTISAMPLE 0x00001928
+#define NVA3_3D_FP_MULTISAMPLE_EXPORT_SAMPLE_MASK 0x00000001
+#define NVA3_3D_FP_MULTISAMPLE_FORCE_PER_SAMPLE 0x00000002
+
+#define NV50_3D_VIEWPORT_TRANSFORM_EN 0x0000192c
+
+#define NV50_3D_VIEW_VOLUME_CLIP_CTRL 0x0000193c
+#define NV50_3D_VIEW_VOLUME_CLIP_CTRL_UNK0 0x00000001
+#define NVA0_3D_VIEW_VOLUME_CLIP_CTRL_UNK1 0x00000002
+#define NVA0_3D_VIEW_VOLUME_CLIP_CTRL_UNK2 0x00000004
+#define NV50_3D_VIEW_VOLUME_CLIP_CTRL_DEPTH_CLAMP_NEAR 0x00000008
+#define NV50_3D_VIEW_VOLUME_CLIP_CTRL_DEPTH_CLAMP_FAR 0x00000010
+#define NV50_3D_VIEW_VOLUME_CLIP_CTRL_UNK7 0x00000080
+#define NV50_3D_VIEW_VOLUME_CLIP_CTRL_UNK10 0x00000400
+#define NV50_3D_VIEW_VOLUME_CLIP_CTRL_UNK11 0x00000800
+#define NV50_3D_VIEW_VOLUME_CLIP_CTRL_UNK12__MASK 0x00003000
+#define NV50_3D_VIEW_VOLUME_CLIP_CTRL_UNK12__SHIFT 12
+#define NV50_3D_VIEW_VOLUME_CLIP_CTRL_UNK12_UNK0 0x00000000
+#define NV50_3D_VIEW_VOLUME_CLIP_CTRL_UNK12_UNK1 0x00001000
+#define NV84_3D_VIEW_VOLUME_CLIP_CTRL_UNK12_UNK2 0x00002000
+
+#define NV50_3D_UNK1940 0x00001940
+#define NV50_3D_UNK1940_0 0x00000001
+#define NV50_3D_UNK1940_1 0x00000010
+#define NV50_3D_UNK1940_2 0x00000100
+#define NV50_3D_UNK1940_3 0x00001000
+#define NV50_3D_UNK1940_4 0x00010000
+#define NV50_3D_UNK1940_5 0x00100000
+#define NV50_3D_UNK1940_6 0x01000000
+#define NV50_3D_UNK1940_7 0x10000000
+
+#define NVA3_3D_UNK1944 0x00001944
+
+#define NV50_3D_CLIP_RECTS_EN 0x0000194c
+
+#define NV50_3D_CLIP_RECTS_MODE 0x00001950
+#define NV50_3D_CLIP_RECTS_MODE_INSIDE_ANY 0x00000000
+#define NV50_3D_CLIP_RECTS_MODE_OUTSIDE_ALL 0x00000001
+#define NV50_3D_CLIP_RECTS_MODE_NEVER 0x00000002
+
+#define NV50_3D_ZCULL_VALIDATE 0x00001954
+#define NV50_3D_ZCULL_VALIDATE_CLEAR_UNK0 0x00000001
+#define NV50_3D_ZCULL_VALIDATE_CLEAR_UNK1 0x00000010
+
+#define NV50_3D_ZCULL_INVALIDATE 0x00001958
+
+#define NVA3_3D_UNK1960 0x00001960
+#define NVA3_3D_UNK1960_0 0x00000001
+#define NVA3_3D_UNK1960_1 0x00000010
+
+#define NV50_3D_UNK1968 0x00001968
+#define NV50_3D_UNK1968_0 0x00000001
+#define NV50_3D_UNK1968_1 0x00000010
+
+#define NV50_3D_FP_CTRL_UNK196C 0x0000196c
+#define NV50_3D_FP_CTRL_UNK196C_0 0x00000001
+#define NV50_3D_FP_CTRL_UNK196C_1 0x00000010
+
+#define NV50_3D_UNK1978 0x00001978
+
+#define NV50_3D_CLIPID_ENABLE 0x0000197c
+
+#define NV50_3D_CLIPID_WIDTH 0x00001980
+#define NV50_3D_CLIPID_WIDTH__MAX 0x00002000
+#define NV50_3D_CLIPID_WIDTH__ALIGN 0x00000040
+
+#define NV50_3D_CLIPID_ID 0x00001984
+
+#define NV50_3D_FP_INTERPOLANT_CTRL 0x00001988
+#define NV50_3D_FP_INTERPOLANT_CTRL_UMASK__MASK 0xff000000
+#define NV50_3D_FP_INTERPOLANT_CTRL_UMASK__SHIFT 24
+#define NV50_3D_FP_INTERPOLANT_CTRL_UMASK_X 0x01000000
+#define NV50_3D_FP_INTERPOLANT_CTRL_UMASK_Y 0x02000000
+#define NV50_3D_FP_INTERPOLANT_CTRL_UMASK_Z 0x04000000
+#define NV50_3D_FP_INTERPOLANT_CTRL_UMASK_W 0x08000000
+#define NV50_3D_FP_INTERPOLANT_CTRL_COUNT_NONFLAT__MASK 0x00ff0000
+#define NV50_3D_FP_INTERPOLANT_CTRL_COUNT_NONFLAT__SHIFT 16
+#define NV50_3D_FP_INTERPOLANT_CTRL_OFFSET__MASK 0x0000ff00
+#define NV50_3D_FP_INTERPOLANT_CTRL_OFFSET__SHIFT 8
+#define NV50_3D_FP_INTERPOLANT_CTRL_COUNT__MASK 0x000000ff
+#define NV50_3D_FP_INTERPOLANT_CTRL_COUNT__SHIFT 0
+
+#define NV50_3D_FP_REG_ALLOC_TEMP 0x0000198c
+
+#define NV50_3D_REG_MODE 0x000019a0
+#define NV50_3D_REG_MODE_PACKED 0x00000001
+#define NV50_3D_REG_MODE_STRIPED 0x00000002
+
+#define NV50_3D_FP_CONTROL 0x000019a8
+#define NV50_3D_FP_CONTROL_MULTIPLE_RESULTS 0x00000001
+#define NV50_3D_FP_CONTROL_EXPORTS_Z 0x00000100
+#define NV50_3D_FP_CONTROL_USES_KIL 0x00100000
+
+#define NV50_3D_DEPTH_BOUNDS_EN 0x000019bc
+
+#define NV50_3D_UNK19C0 0x000019c0
+
+#define NV50_3D_LOGIC_OP_ENABLE 0x000019c4
+
+#define NV50_3D_LOGIC_OP 0x000019c8
+#define NV50_3D_LOGIC_OP_CLEAR 0x00001500
+#define NV50_3D_LOGIC_OP_AND 0x00001501
+#define NV50_3D_LOGIC_OP_AND_REVERSE 0x00001502
+#define NV50_3D_LOGIC_OP_COPY 0x00001503
+#define NV50_3D_LOGIC_OP_AND_INVERTED 0x00001504
+#define NV50_3D_LOGIC_OP_NOOP 0x00001505
+#define NV50_3D_LOGIC_OP_XOR 0x00001506
+#define NV50_3D_LOGIC_OP_OR 0x00001507
+#define NV50_3D_LOGIC_OP_NOR 0x00001508
+#define NV50_3D_LOGIC_OP_EQUIV 0x00001509
+#define NV50_3D_LOGIC_OP_INVERT 0x0000150a
+#define NV50_3D_LOGIC_OP_OR_REVERSE 0x0000150b
+#define NV50_3D_LOGIC_OP_COPY_INVERTED 0x0000150c
+#define NV50_3D_LOGIC_OP_OR_INVERTED 0x0000150d
+#define NV50_3D_LOGIC_OP_NAND 0x0000150e
+#define NV50_3D_LOGIC_OP_SET 0x0000150f
+
+#define NV50_3D_ZETA_COMP_ENABLE 0x000019cc
+
+#define NV50_3D_CLEAR_BUFFERS 0x000019d0
+#define NV50_3D_CLEAR_BUFFERS_Z 0x00000001
+#define NV50_3D_CLEAR_BUFFERS_S 0x00000002
+#define NV50_3D_CLEAR_BUFFERS_R 0x00000004
+#define NV50_3D_CLEAR_BUFFERS_G 0x00000008
+#define NV50_3D_CLEAR_BUFFERS_B 0x00000010
+#define NV50_3D_CLEAR_BUFFERS_A 0x00000020
+#define NV50_3D_CLEAR_BUFFERS_RT__MASK 0x000003c0
+#define NV50_3D_CLEAR_BUFFERS_RT__SHIFT 6
+#define NV50_3D_CLEAR_BUFFERS_LAYER__MASK 0x001ffc00
+#define NV50_3D_CLEAR_BUFFERS_LAYER__SHIFT 10
+
+#define NV50_3D_CLIPID_FILL 0x000019d4
+
+#define NV50_3D_UNK19D8(i0) (0x000019d8 + 0x4*(i0))
+#define NV50_3D_UNK19D8__ESIZE 0x00000004
+#define NV50_3D_UNK19D8__LEN 0x00000002
+
+#define NV50_3D_RT_COMP_ENABLE(i0) (0x000019e0 + 0x4*(i0))
+#define NV50_3D_RT_COMP_ENABLE__ESIZE 0x00000004
+#define NV50_3D_RT_COMP_ENABLE__LEN 0x00000008
+
+#define NV50_3D_COLOR_MASK(i0) (0x00001a00 + 0x4*(i0))
+#define NV50_3D_COLOR_MASK__ESIZE 0x00000004
+#define NV50_3D_COLOR_MASK__LEN 0x00000008
+#define NV50_3D_COLOR_MASK_R 0x0000000f
+#define NV50_3D_COLOR_MASK_G 0x000000f0
+#define NV50_3D_COLOR_MASK_B 0x00000f00
+#define NV50_3D_COLOR_MASK_A 0x0000f000
+
+#define NV50_3D_UNK1A20 0x00001a20
+
+#define NV50_3D_DELAY 0x00001a24
+
+#define NV50_3D_UNK1A28 0x00001a28
+#define NV50_3D_UNK1A28_0__MASK 0x000000ff
+#define NV50_3D_UNK1A28_0__SHIFT 0
+#define NV50_3D_UNK1A28_1 0x00000100
+
+#define NV50_3D_UNK1A2C 0x00001a2c
+
+#define NV50_3D_UNK1A30 0x00001a30
+
+#define NV50_3D_UNK1A34 0x00001a34
+
+#define NV50_3D_UNK1A38 0x00001a38
+
+#define NV50_3D_UNK1A3C 0x00001a3c
+
+#define NV50_3D_UNK1A40(i0) (0x00001a40 + 0x4*(i0))
+#define NV50_3D_UNK1A40__ESIZE 0x00000004
+#define NV50_3D_UNK1A40__LEN 0x00000010
+#define NV50_3D_UNK1A40_0__MASK 0x00000007
+#define NV50_3D_UNK1A40_0__SHIFT 0
+#define NV50_3D_UNK1A40_1__MASK 0x00000070
+#define NV50_3D_UNK1A40_1__SHIFT 4
+#define NV50_3D_UNK1A40_2__MASK 0x00000700
+#define NV50_3D_UNK1A40_2__SHIFT 8
+#define NV50_3D_UNK1A40_3__MASK 0x00007000
+#define NV50_3D_UNK1A40_3__SHIFT 12
+#define NV50_3D_UNK1A40_4__MASK 0x00070000
+#define NV50_3D_UNK1A40_4__SHIFT 16
+#define NV50_3D_UNK1A40_5__MASK 0x00700000
+#define NV50_3D_UNK1A40_5__SHIFT 20
+#define NV50_3D_UNK1A40_6__MASK 0x07000000
+#define NV50_3D_UNK1A40_6__SHIFT 24
+#define NV50_3D_UNK1A40_7__MASK 0x70000000
+#define NV50_3D_UNK1A40_7__SHIFT 28
+
+#define NV50_3D_STRMOUT_ADDRESS_HIGH(i0) (0x00001a80 + 0x10*(i0))
+#define NV50_3D_STRMOUT_ADDRESS_HIGH__ESIZE 0x00000010
+#define NV50_3D_STRMOUT_ADDRESS_HIGH__LEN 0x00000004
+
+#define NV50_3D_STRMOUT_ADDRESS_LOW(i0) (0x00001a84 + 0x10*(i0))
+#define NV50_3D_STRMOUT_ADDRESS_LOW__ESIZE 0x00000010
+#define NV50_3D_STRMOUT_ADDRESS_LOW__LEN 0x00000004
+
+#define NV50_3D_STRMOUT_NUM_ATTRIBS(i0) (0x00001a88 + 0x10*(i0))
+#define NV50_3D_STRMOUT_NUM_ATTRIBS__ESIZE 0x00000010
+#define NV50_3D_STRMOUT_NUM_ATTRIBS__LEN 0x00000004
+#define NV50_3D_STRMOUT_NUM_ATTRIBS__MAX 0x00000040
+
+#define NVA0_3D_STRMOUT_OFFSET_LIMIT(i0) (0x00001a8c + 0x10*(i0))
+#define NVA0_3D_STRMOUT_OFFSET_LIMIT__ESIZE 0x00000010
+#define NVA0_3D_STRMOUT_OFFSET_LIMIT__LEN 0x00000004
+
+#define NV50_3D_VERTEX_ARRAY_ATTRIB(i0) (0x00001ac0 + 0x4*(i0))
+#define NV50_3D_VERTEX_ARRAY_ATTRIB__ESIZE 0x00000004
+#define NV50_3D_VERTEX_ARRAY_ATTRIB__LEN 0x00000010
+#define NV50_3D_VERTEX_ARRAY_ATTRIB_BUFFER__MASK 0x0000000f
+#define NV50_3D_VERTEX_ARRAY_ATTRIB_BUFFER__SHIFT 0
+#define NV50_3D_VERTEX_ARRAY_ATTRIB_CONST 0x00000010
+#define NV50_3D_VERTEX_ARRAY_ATTRIB_OFFSET__MASK 0x0007ffe0
+#define NV50_3D_VERTEX_ARRAY_ATTRIB_OFFSET__SHIFT 5
+#define NV50_3D_VERTEX_ARRAY_ATTRIB_FORMAT__MASK 0x01f80000
+#define NV50_3D_VERTEX_ARRAY_ATTRIB_FORMAT__SHIFT 19
+#define NV50_3D_VERTEX_ARRAY_ATTRIB_FORMAT_32_32_32_32 0x00080000
+#define NV50_3D_VERTEX_ARRAY_ATTRIB_FORMAT_32_32_32 0x00100000
+#define NV50_3D_VERTEX_ARRAY_ATTRIB_FORMAT_16_16_16_16 0x00180000
+#define NV50_3D_VERTEX_ARRAY_ATTRIB_FORMAT_32_32 0x00200000
+#define NV50_3D_VERTEX_ARRAY_ATTRIB_FORMAT_16_16_16 0x00280000
+#define NV50_3D_VERTEX_ARRAY_ATTRIB_FORMAT_8_8_8_8 0x00500000
+#define NV50_3D_VERTEX_ARRAY_ATTRIB_FORMAT_16_16 0x00780000
+#define NV50_3D_VERTEX_ARRAY_ATTRIB_FORMAT_32 0x00900000
+#define NV50_3D_VERTEX_ARRAY_ATTRIB_FORMAT_8_8_8 0x00980000
+#define NV50_3D_VERTEX_ARRAY_ATTRIB_FORMAT_8_8 0x00c00000
+#define NV50_3D_VERTEX_ARRAY_ATTRIB_FORMAT_16 0x00d80000
+#define NV50_3D_VERTEX_ARRAY_ATTRIB_FORMAT_8 0x00e80000
+#define NV50_3D_VERTEX_ARRAY_ATTRIB_FORMAT_2_10_10_10 0x01800000
+#define NV50_3D_VERTEX_ARRAY_ATTRIB_TYPE__MASK 0x7e000000
+#define NV50_3D_VERTEX_ARRAY_ATTRIB_TYPE__SHIFT 25
+#define NV50_3D_VERTEX_ARRAY_ATTRIB_TYPE_FLOAT 0x7e000000
+#define NV50_3D_VERTEX_ARRAY_ATTRIB_TYPE_UNORM 0x24000000
+#define NV50_3D_VERTEX_ARRAY_ATTRIB_TYPE_SNORM 0x12000000
+#define NV50_3D_VERTEX_ARRAY_ATTRIB_TYPE_USCALED 0x5a000000
+#define NV50_3D_VERTEX_ARRAY_ATTRIB_TYPE_SSCALED 0x6c000000
+#define NV50_3D_VERTEX_ARRAY_ATTRIB_TYPE_UINT 0x48000000
+#define NV50_3D_VERTEX_ARRAY_ATTRIB_TYPE_SINT 0x36000000
+#define NV50_3D_VERTEX_ARRAY_ATTRIB_BGRA 0x80000000
+
+#define NV50_3D_QUERY_ADDRESS_HIGH 0x00001b00
+
+#define NV50_3D_QUERY_ADDRESS_LOW 0x00001b04
+
+#define NV50_3D_QUERY_SEQUENCE 0x00001b08
+
+#define NV50_3D_QUERY_GET 0x00001b0c
+#define NV50_3D_QUERY_GET_MODE__MASK 0x00000003
+#define NV50_3D_QUERY_GET_MODE__SHIFT 0
+#define NV50_3D_QUERY_GET_MODE_WRITE_UNK0 0x00000000
+#define NV50_3D_QUERY_GET_MODE_SYNC 0x00000001
+#define NV50_3D_QUERY_GET_MODE_WRITE_UNK2 0x00000002
+#define NV50_3D_QUERY_GET_UNK4 0x00000010
+#define NVA0_3D_QUERY_GET_INDEX__MASK 0x000000e0
+#define NVA0_3D_QUERY_GET_INDEX__SHIFT 5
+#define NV50_3D_QUERY_GET_UNK8 0x00000100
+#define NV50_3D_QUERY_GET_UNIT__MASK 0x0000f000
+#define NV50_3D_QUERY_GET_UNIT__SHIFT 12
+#define NV50_3D_QUERY_GET_UNIT_UNK00 0x00000000
+#define NV50_3D_QUERY_GET_UNIT_VFETCH 0x00001000
+#define NV50_3D_QUERY_GET_UNIT_VP 0x00002000
+#define NV50_3D_QUERY_GET_UNIT_RAST 0x00004000
+#define NV50_3D_QUERY_GET_UNIT_STRMOUT 0x00005000
+#define NV50_3D_QUERY_GET_UNIT_GP 0x00006000
+#define NV50_3D_QUERY_GET_UNIT_ZCULL 0x00007000
+#define NV50_3D_QUERY_GET_UNIT_TPROP 0x0000a000
+#define NV50_3D_QUERY_GET_UNIT_UNK0C 0x0000c000
+#define NV50_3D_QUERY_GET_UNIT_CROP 0x0000f000
+#define NV50_3D_QUERY_GET_SYNC_COND__MASK 0x00010000
+#define NV50_3D_QUERY_GET_SYNC_COND__SHIFT 16
+#define NV50_3D_QUERY_GET_SYNC_COND_NEQUAL 0x00000000
+#define NV50_3D_QUERY_GET_SYNC_COND_GREATER 0x00010000
+#define NV50_3D_QUERY_GET_INTR 0x00100000
+#define NV50_3D_QUERY_GET_TYPE__MASK 0x00800000
+#define NV50_3D_QUERY_GET_TYPE__SHIFT 23
+#define NV50_3D_QUERY_GET_TYPE_QUERY 0x00000000
+#define NV50_3D_QUERY_GET_TYPE_COUNTER 0x00800000
+#define NV50_3D_QUERY_GET_QUERY_SELECT__MASK 0x0f000000
+#define NV50_3D_QUERY_GET_QUERY_SELECT__SHIFT 24
+#define NV50_3D_QUERY_GET_QUERY_SELECT_ZERO 0x00000000
+#define NV50_3D_QUERY_GET_QUERY_SELECT_SAMPLECNT 0x01000000
+#define NV50_3D_QUERY_GET_QUERY_SELECT_STRMOUT_NO_OVERFLOW 0x02000000
+#define NVA0_3D_QUERY_GET_QUERY_SELECT_STRMOUT_DROPPED_PRIMITIVES 0x03000000
+#define NVA0_3D_QUERY_GET_QUERY_SELECT_STRMOUT_VERTICES 0x04000000
+#define NV50_3D_QUERY_GET_QUERY_SELECT_ZCULL_STAT_UNK0 0x05000000
+#define NV50_3D_QUERY_GET_QUERY_SELECT_ZCULL_STAT_UNK1 0x06000000
+#define NV50_3D_QUERY_GET_QUERY_SELECT_ZCULL_STAT_UNK2 0x07000000
+#define NV50_3D_QUERY_GET_QUERY_SELECT_ZCULL_STAT_UNK3 0x08000000
+#define NVA0_3D_QUERY_GET_QUERY_SELECT_RT_UNK14 0x0c000000
+#define NVA0_3D_QUERY_GET_QUERY_SELECT_STRMOUT_OFFSET 0x0d000000
+#define NV50_3D_QUERY_GET_COUNTER_SELECT__MASK 0x0f000000
+#define NV50_3D_QUERY_GET_COUNTER_SELECT__SHIFT 24
+#define NV50_3D_QUERY_GET_COUNTER_SELECT_VFETCH_VERTICES 0x00000000
+#define NV50_3D_QUERY_GET_COUNTER_SELECT_VFETCH_PRIMITIVES 0x01000000
+#define NV50_3D_QUERY_GET_COUNTER_SELECT_VP_LAUNCHES 0x02000000
+#define NV50_3D_QUERY_GET_COUNTER_SELECT_GP_LAUNCHES 0x03000000
+#define NV50_3D_QUERY_GET_COUNTER_SELECT_GP_PRIMITIVES_OUT 0x04000000
+#define NV50_3D_QUERY_GET_COUNTER_SELECT_TRANSFORM_FEEDBACK 0x05000000
+#define NV50_3D_QUERY_GET_COUNTER_SELECT_GENERATED_PRIMITIVES 0x06000000
+#define NV50_3D_QUERY_GET_COUNTER_SELECT_RAST_PRIMITIVES_PRECLIP 0x07000000
+#define NV50_3D_QUERY_GET_COUNTER_SELECT_RAST_PRIMITIVES_POSTCLIP 0x08000000
+#define NV50_3D_QUERY_GET_COUNTER_SELECT_FP_PIXELS 0x09000000
+#define NV84_3D_QUERY_GET_COUNTER_SELECT_UNK0A 0x0a000000
+#define NVA0_3D_QUERY_GET_COUNTER_SELECT_UNK0C 0x0c000000
+#define NV50_3D_QUERY_GET_SHORT 0x10000000
+
+#define NVA3_3D_VP_RESULT_MAP_ALT(i0) (0x00001b3c + 0x4*(i0))
+#define NVA3_3D_VP_RESULT_MAP_ALT__ESIZE 0x00000004
+#define NVA3_3D_VP_RESULT_MAP_ALT__LEN 0x00000020
+#define NVA3_3D_VP_RESULT_MAP_ALT_0__MASK 0x000000ff
+#define NVA3_3D_VP_RESULT_MAP_ALT_0__SHIFT 0
+#define NVA3_3D_VP_RESULT_MAP_ALT_1__MASK 0x0000ff00
+#define NVA3_3D_VP_RESULT_MAP_ALT_1__SHIFT 8
+#define NVA3_3D_VP_RESULT_MAP_ALT_2__MASK 0x00ff0000
+#define NVA3_3D_VP_RESULT_MAP_ALT_2__SHIFT 16
+#define NVA3_3D_VP_RESULT_MAP_ALT_3__MASK 0xff000000
+#define NVA3_3D_VP_RESULT_MAP_ALT_3__SHIFT 24
+
+#define NVA3_3D_VERTEX_ARRAY_FETCH_ALT(i0) (0x00001c00 + 0x10*(i0))
+#define NVA3_3D_VERTEX_ARRAY_FETCH_ALT__ESIZE 0x00000010
+#define NVA3_3D_VERTEX_ARRAY_FETCH_ALT__LEN 0x00000020
+#define NVA3_3D_VERTEX_ARRAY_FETCH_ALT_STRIDE__MASK 0x00000fff
+#define NVA3_3D_VERTEX_ARRAY_FETCH_ALT_STRIDE__SHIFT 0
+#define NVA3_3D_VERTEX_ARRAY_FETCH_ALT_ENABLE 0x20000000
+
+#define NVA3_3D_VERTEX_ARRAY_START_HIGH_ALT(i0) (0x00001c04 + 0x10*(i0))
+#define NVA3_3D_VERTEX_ARRAY_START_HIGH_ALT__ESIZE 0x00000010
+#define NVA3_3D_VERTEX_ARRAY_START_HIGH_ALT__LEN 0x00000020
+
+#define NVA3_3D_VERTEX_ARRAY_START_LOW_ALT(i0) (0x00001c08 + 0x10*(i0))
+#define NVA3_3D_VERTEX_ARRAY_START_LOW_ALT__ESIZE 0x00000010
+#define NVA3_3D_VERTEX_ARRAY_START_LOW_ALT__LEN 0x00000020
+
+#define NVA3_3D_VERTEX_ARRAY_DIVISOR_ALT(i0) (0x00001c0c + 0x10*(i0))
+#define NVA3_3D_VERTEX_ARRAY_DIVISOR_ALT__ESIZE 0x00000010
+#define NVA3_3D_VERTEX_ARRAY_DIVISOR_ALT__LEN 0x00000020
+
+#define NVA3_3D_IBLEND(i0) (0x00001e00 + 0x20*(i0))
+#define NVA3_3D_IBLEND__ESIZE 0x00000020
+#define NVA3_3D_IBLEND__LEN 0x00000008
+
+#define NVA3_3D_IBLEND_UNK00(i0) (0x00001e00 + 0x20*(i0))
+
+#define NVA3_3D_IBLEND_EQUATION_RGB(i0) (0x00001e04 + 0x20*(i0))
+#define NVA3_3D_IBLEND_EQUATION_RGB_FUNC_ADD 0x00008006
+#define NVA3_3D_IBLEND_EQUATION_RGB_MIN 0x00008007
+#define NVA3_3D_IBLEND_EQUATION_RGB_MAX 0x00008008
+#define NVA3_3D_IBLEND_EQUATION_RGB_FUNC_SUBTRACT 0x0000800a
+#define NVA3_3D_IBLEND_EQUATION_RGB_FUNC_REVERSE_SUBTRACT 0x0000800b
+
+#define NVA3_3D_IBLEND_FUNC_SRC_RGB(i0) (0x00001e08 + 0x20*(i0))
+
+#define NVA3_3D_IBLEND_FUNC_DST_RGB(i0) (0x00001e0c + 0x20*(i0))
+
+#define NVA3_3D_IBLEND_EQUATION_ALPHA(i0) (0x00001e10 + 0x20*(i0))
+#define NVA3_3D_IBLEND_EQUATION_ALPHA_FUNC_ADD 0x00008006
+#define NVA3_3D_IBLEND_EQUATION_ALPHA_MIN 0x00008007
+#define NVA3_3D_IBLEND_EQUATION_ALPHA_MAX 0x00008008
+#define NVA3_3D_IBLEND_EQUATION_ALPHA_FUNC_SUBTRACT 0x0000800a
+#define NVA3_3D_IBLEND_EQUATION_ALPHA_FUNC_REVERSE_SUBTRACT 0x0000800b
+
+#define NVA3_3D_IBLEND_FUNC_SRC_ALPHA(i0) (0x00001e14 + 0x20*(i0))
+
+#define NVA3_3D_IBLEND_FUNC_DST_ALPHA(i0) (0x00001e18 + 0x20*(i0))
+
+#define NVA3_3D_VERTEX_ARRAY_LIMIT_HIGH_ALT(i0) (0x00001f00 + 0x8*(i0))
+#define NVA3_3D_VERTEX_ARRAY_LIMIT_HIGH_ALT__ESIZE 0x00000008
+#define NVA3_3D_VERTEX_ARRAY_LIMIT_HIGH_ALT__LEN 0x00000020
+
+#define NVA3_3D_VERTEX_ARRAY_LIMIT_LOW_ALT(i0) (0x00001f04 + 0x8*(i0))
+#define NVA3_3D_VERTEX_ARRAY_LIMIT_LOW_ALT__ESIZE 0x00000008
+#define NVA3_3D_VERTEX_ARRAY_LIMIT_LOW_ALT__LEN 0x00000020
+
+
+#endif /* NV50_3D_XML */
diff --git a/src/gallium/drivers/nv50/nv50_3ddefs.xml.h b/src/gallium/drivers/nv50/nv50_3ddefs.xml.h
new file mode 100644
index 00000000000..f26ac45da40
--- /dev/null
+++ b/src/gallium/drivers/nv50/nv50_3ddefs.xml.h
@@ -0,0 +1,98 @@
+#ifndef NV_3DDEFS_XML
+#define NV_3DDEFS_XML
+
+/* Autogenerated file, DO NOT EDIT manually!
+
+This file was generated by the rules-ng-ng headergen tool in this git repository:
+http://0x04.net/cgit/index.cgi/rules-ng-ng
+git clone git://0x04.net/rules-ng-ng
+
+The rules-ng-ng source files this header was generated from are:
+- nv50_3d.xml ( 26312 bytes, from 2010-10-08 10:10:01)
+- copyright.xml ( 6498 bytes, from 2010-10-03 13:18:37)
+- nv_defs.xml ( 4437 bytes, from 2010-07-06 07:43:58)
+- nv_3ddefs.xml ( 16397 bytes, from 2010-10-08 13:30:38)
+- nv_object.xml ( 11249 bytes, from 2010-10-07 15:31:28)
+- nvchipsets.xml ( 2824 bytes, from 2010-07-07 13:41:20)
+- nv50_defs.xml ( 4482 bytes, from 2010-10-03 13:18:37)
+
+Copyright (C) 2006-2010 by the following authors:
+- Artur Huillet <arthur.huillet@free.fr> (ahuillet)
+- Ben Skeggs (darktama, darktama_)
+- B. R. <koala_br@users.sourceforge.net> (koala_br)
+- Carlos Martin <carlosmn@users.sf.net> (carlosmn)
+- Christoph Bumiller <e0425955@student.tuwien.ac.at> (calim, chrisbmr)
+- Dawid Gajownik <gajownik@users.sf.net> (gajownik)
+- Dmitry Baryshkov
+- Dmitry Eremin-Solenikov <lumag@users.sf.net> (lumag)
+- EdB <edb_@users.sf.net> (edb_)
+- Erik Waling <erikwailing@users.sf.net> (erikwaling)
+- Francisco Jerez <currojerez@riseup.net> (curro, curro_, currojerez)
+- imirkin <imirkin@users.sf.net> (imirkin)
+- jb17bsome <jb17bsome@bellsouth.net> (jb17bsome)
+- Jeremy Kolb <kjeremy@users.sf.net> (kjeremy)
+- Laurent Carlier <lordheavym@gmail.com> (lordheavy)
+- Luca Barbieri <luca@luca-barbieri.com> (lb, lb1)
+- Maarten Maathuis <madman2003@gmail.com> (stillunknown)
+- Marcin Kościelnicki <koriakin@0x04.net> (mwk, koriakin)
+- Mark Carey <mark.carey@gmail.com> (careym)
+- Matthieu Castet <matthieu.castet@parrot.com> (mat-c)
+- nvidiaman <nvidiaman@users.sf.net> (nvidiaman)
+- Patrice Mandin <patmandin@gmail.com> (pmandin, pmdata)
+- Pekka Paalanen <pq@iki.fi> (pq, ppaalanen)
+- Peter Popov <ironpeter@users.sf.net> (ironpeter)
+- Richard Hughes <hughsient@users.sf.net> (hughsient)
+- Rudi Cilibrasi <cilibrar@users.sf.net> (cilibrar)
+- Serge Martin
+- Simon Raffeiner
+- Stephane Loeuillet <leroutier@users.sf.net> (leroutier)
+- Stephane Marchesin <stephane.marchesin@gmail.com> (marcheu)
+- sturmflut <sturmflut@users.sf.net> (sturmflut)
+- Sylvain Munaut <tnt@246tNt.com>
+- Victor Stinner <victor.stinner@haypocalc.com> (haypo)
+- Wladmir van der Laan <laanwj@gmail.com> (miathan6)
+- Younes Manton <younes.m@gmail.com> (ymanton)
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice (including the
+next paragraph) shall be included in all copies or substantial
+portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE COPYRIGHT OWNER(S) AND/OR ITS SUPPLIERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+*/
+
+
+#define NV50_3D_BLEND_FACTOR_ZERO 0x00004000
+#define NV50_3D_BLEND_FACTOR_ONE 0x00004001
+#define NV50_3D_BLEND_FACTOR_SRC_COLOR 0x00004300
+#define NV50_3D_BLEND_FACTOR_ONE_MINUS_SRC_COLOR 0x00004301
+#define NV50_3D_BLEND_FACTOR_SRC_ALPHA 0x00004302
+#define NV50_3D_BLEND_FACTOR_ONE_MINUS_SRC_ALPHA 0x00004303
+#define NV50_3D_BLEND_FACTOR_DST_ALPHA 0x00004304
+#define NV50_3D_BLEND_FACTOR_ONE_MINUS_DST_ALPHA 0x00004305
+#define NV50_3D_BLEND_FACTOR_DST_COLOR 0x00004306
+#define NV50_3D_BLEND_FACTOR_ONE_MINUS_DST_COLOR 0x00004307
+#define NV50_3D_BLEND_FACTOR_SRC_ALPHA_SATURATE 0x00004308
+#define NV50_3D_BLEND_FACTOR_CONSTANT_COLOR 0x0000c001
+#define NV50_3D_BLEND_FACTOR_ONE_MINUS_CONSTANT_COLOR 0x0000c002
+#define NV50_3D_BLEND_FACTOR_CONSTANT_ALPHA 0x0000c003
+#define NV50_3D_BLEND_FACTOR_ONE_MINUS_CONSTANT_ALPHA 0x0000c004
+#define NV50_3D_BLEND_FACTOR_SRC1_COLOR 0x0000c900
+#define NV50_3D_BLEND_FACTOR_ONE_MINUS_SRC1_COLOR 0x0000c901
+#define NV50_3D_BLEND_FACTOR_SRC1_ALPHA 0x0000c902
+#define NV50_3D_BLEND_FACTOR_ONE_MINUS_SRC1_ALPHA 0x0000c903
+
+#endif /* NV_3DDEFS_XML */
diff --git a/src/gallium/drivers/nv50/nv50_buffer.c b/src/gallium/drivers/nv50/nv50_buffer.c
deleted file mode 100644
index 45356f9f637..00000000000
--- a/src/gallium/drivers/nv50/nv50_buffer.c
+++ /dev/null
@@ -1,151 +0,0 @@
-
-#include "util/u_inlines.h"
-#include "util/u_memory.h"
-#include "util/u_math.h"
-
-#include "nouveau/nouveau_screen.h"
-#include "nouveau/nouveau_winsys.h"
-#include "nv50_resource.h"
-
-
-
-static void nv50_buffer_destroy(struct pipe_screen *pscreen,
- struct pipe_resource *presource)
-{
- struct nv50_resource *buffer = nv50_resource(presource);
-
- nouveau_screen_bo_release(pscreen, buffer->bo);
- FREE(buffer);
-}
-
-
-
-
-/* Utility functions for transfer create/destroy are hooked in and
- * just record the arguments to those functions.
- */
-static void *
-nv50_buffer_transfer_map( struct pipe_context *pipe,
- struct pipe_transfer *transfer )
-{
- struct nv50_resource *buffer = nv50_resource(transfer->resource);
- uint8_t *map;
-
- map = nouveau_screen_bo_map_range( pipe->screen,
- buffer->bo,
- transfer->box.x,
- transfer->box.width,
- nouveau_screen_transfer_flags(transfer->usage) );
- if (map == NULL)
- return NULL;
-
- return map + transfer->box.x;
-}
-
-
-
-static void nv50_buffer_transfer_flush_region( struct pipe_context *pipe,
- struct pipe_transfer *transfer,
- const struct pipe_box *box)
-{
- struct nv50_resource *buffer = nv50_resource(transfer->resource);
-
- nouveau_screen_bo_map_flush_range(pipe->screen,
- buffer->bo,
- transfer->box.x + box->x,
- box->width);
-}
-
-static void nv50_buffer_transfer_unmap( struct pipe_context *pipe,
- struct pipe_transfer *transfer )
-{
- struct nv50_resource *buffer = nv50_resource(transfer->resource);
-
- nouveau_screen_bo_unmap(pipe->screen, buffer->bo);
-}
-
-
-
-
-const struct u_resource_vtbl nv50_buffer_vtbl =
-{
- u_default_resource_get_handle, /* get_handle */
- nv50_buffer_destroy, /* resource_destroy */
- NULL, /* is_resource_referenced */
- u_default_get_transfer, /* get_transfer */
- u_default_transfer_destroy, /* transfer_destroy */
- nv50_buffer_transfer_map, /* transfer_map */
- nv50_buffer_transfer_flush_region, /* transfer_flush_region */
- nv50_buffer_transfer_unmap, /* transfer_unmap */
- u_default_transfer_inline_write /* transfer_inline_write */
-};
-
-
-
-
-struct pipe_resource *
-nv50_buffer_create(struct pipe_screen *pscreen,
- const struct pipe_resource *template)
-{
- struct nv50_resource *buffer;
-
- buffer = CALLOC_STRUCT(nv50_resource);
- if (!buffer)
- return NULL;
-
- buffer->base = *template;
- buffer->vtbl = &nv50_buffer_vtbl;
- pipe_reference_init(&buffer->base.reference, 1);
- buffer->base.screen = pscreen;
-
- buffer->bo = nouveau_screen_bo_new(pscreen,
- 16,
- buffer->base.usage,
- buffer->base.bind,
- buffer->base.width0);
-
- if (buffer->bo == NULL)
- goto fail;
-
- return &buffer->base;
-
-fail:
- FREE(buffer);
- return NULL;
-}
-
-
-struct pipe_resource *
-nv50_user_buffer_create(struct pipe_screen *pscreen,
- void *ptr,
- unsigned bytes,
- unsigned bind)
-{
- struct nv50_resource *buffer;
-
- buffer = CALLOC_STRUCT(nv50_resource);
- if (!buffer)
- return NULL;
-
- pipe_reference_init(&buffer->base.reference, 1);
- buffer->vtbl = &nv50_buffer_vtbl;
- buffer->base.screen = pscreen;
- buffer->base.format = PIPE_FORMAT_R8_UNORM;
- buffer->base.usage = PIPE_USAGE_IMMUTABLE;
- buffer->base.bind = bind;
- buffer->base.width0 = bytes;
- buffer->base.height0 = 1;
- buffer->base.depth0 = 1;
- buffer->base.array_size = 1;
-
- buffer->bo = nouveau_screen_bo_user(pscreen, ptr, bytes);
- if (!buffer->bo)
- goto fail;
-
- return &buffer->base;
-
-fail:
- FREE(buffer);
- return NULL;
-}
-
diff --git a/src/gallium/drivers/nv50/nv50_clear.c b/src/gallium/drivers/nv50/nv50_clear.c
deleted file mode 100644
index ee7cf281f4a..00000000000
--- a/src/gallium/drivers/nv50/nv50_clear.c
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * Copyright 2008 Ben Skeggs
- *
- * 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 "pipe/p_context.h"
-#include "pipe/p_defines.h"
-#include "pipe/p_state.h"
-
-#include "nv50_context.h"
-
-void
-nv50_clear(struct pipe_context *pipe, unsigned buffers,
- const float *rgba, double depth, unsigned stencil)
-{
- struct nv50_context *nv50 = nv50_context(pipe);
- struct nouveau_channel *chan = nv50->screen->base.channel;
- struct nouveau_grobj *tesla = nv50->screen->tesla;
- struct pipe_framebuffer_state *fb = &nv50->framebuffer;
- unsigned mode = 0, i;
- const unsigned dirty = nv50->dirty;
-
- /* don't need NEW_BLEND, NV50TCL_COLOR_MASK doesn't affect CLEAR_BUFFERS */
- nv50->dirty &= NV50_NEW_FRAMEBUFFER | NV50_NEW_SCISSOR;
- if (!nv50_state_validate(nv50, 64))
- return;
-
- if (buffers & PIPE_CLEAR_COLOR && fb->nr_cbufs) {
- BEGIN_RING(chan, tesla, NV50TCL_CLEAR_COLOR(0), 4);
- OUT_RING (chan, fui(rgba[0]));
- OUT_RING (chan, fui(rgba[1]));
- OUT_RING (chan, fui(rgba[2]));
- OUT_RING (chan, fui(rgba[3]));
- mode |= 0x3c;
- }
-
- if (buffers & PIPE_CLEAR_DEPTH) {
- BEGIN_RING(chan, tesla, NV50TCL_CLEAR_DEPTH, 1);
- OUT_RING (chan, fui(depth));
- mode |= NV50TCL_CLEAR_BUFFERS_Z;
- }
- if (buffers & PIPE_CLEAR_STENCIL) {
- BEGIN_RING(chan, tesla, NV50TCL_CLEAR_STENCIL, 1);
- OUT_RING (chan, stencil & 0xff);
- mode |= NV50TCL_CLEAR_BUFFERS_S;
- }
-
- BEGIN_RING(chan, tesla, NV50TCL_CLEAR_BUFFERS, 1);
- OUT_RING (chan, mode);
-
- for (i = 1; i < fb->nr_cbufs; i++) {
- BEGIN_RING(chan, tesla, NV50TCL_CLEAR_BUFFERS, 1);
- OUT_RING (chan, (i << 6) | 0x3c);
- }
- nv50->dirty = dirty;
-}
-
diff --git a/src/gallium/drivers/nv50/nv50_context.c b/src/gallium/drivers/nv50/nv50_context.c
index 0874cb5e4ea..930cee7c1e7 100644
--- a/src/gallium/drivers/nv50/nv50_context.c
+++ b/src/gallium/drivers/nv50/nv50_context.c
@@ -1,5 +1,5 @@
/*
- * Copyright 2008 Ben Skeggs
+ * Copyright 2010 Christoph Bumiller
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@@ -27,76 +27,179 @@
#include "nv50_screen.h"
#include "nv50_resource.h"
+#include "nouveau/nouveau_reloc.h"
+
static void
-nv50_flush(struct pipe_context *pipe, unsigned flags,
- struct pipe_fence_handle **fence)
+nv50_flush(struct pipe_context *pipe,
+ struct pipe_fence_handle **fence)
{
- struct nv50_context *nv50 = nv50_context(pipe);
- struct nouveau_channel *chan = nv50->screen->base.channel;
+ struct nouveau_screen *screen = &nv50_context(pipe)->screen->base;
+
+ if (fence)
+ nouveau_fence_ref(screen->fence.current, (struct nouveau_fence **)fence);
- if (flags & PIPE_FLUSH_TEXTURE_CACHE) {
- BEGIN_RING(chan, nv50->screen->tesla, 0x1338, 1);
- OUT_RING (chan, 0x20);
- }
+ /* Try to emit before firing to avoid having to flush again right after
+ * in case we have to wait on this fence.
+ */
+ nouveau_fence_emit(screen->fence.current);
- if (flags & PIPE_FLUSH_FRAME)
- FIRE_RING(chan);
+ FIRE_RING(screen->channel);
+}
+
+void
+nv50_default_flush_notify(struct nouveau_channel *chan)
+{
+ struct nv50_context *nv50 = chan->user_private;
+
+ if (!nv50)
+ return;
+
+ nouveau_fence_update(&nv50->screen->base, TRUE);
+ nouveau_fence_next(&nv50->screen->base);
}
static void
-nv50_destroy(struct pipe_context *pipe)
+nv50_context_unreference_resources(struct nv50_context *nv50)
{
- struct nv50_context *nv50 = nv50_context(pipe);
- int i;
+ unsigned s, i;
+
+ for (i = 0; i < NV50_BUFCTX_COUNT; ++i)
+ nv50_bufctx_reset(nv50, i);
- for (i = 0; i < 64; i++) {
- if (!nv50->state.hw[i])
- continue;
- so_ref(NULL, &nv50->state.hw[i]);
- }
+ for (i = 0; i < nv50->num_vtxbufs; ++i)
+ pipe_resource_reference(&nv50->vtxbuf[i].buffer, NULL);
- draw_destroy(nv50->draw);
+ pipe_resource_reference(&nv50->idxbuf.buffer, NULL);
- if (nv50->screen->cur_ctx == nv50)
- nv50->screen->cur_ctx = NULL;
+ for (s = 0; s < 3; ++s) {
+ for (i = 0; i < nv50->num_textures[s]; ++i)
+ pipe_sampler_view_reference(&nv50->textures[s][i], NULL);
- FREE(nv50);
+ for (i = 0; i < 16; ++i)
+ pipe_resource_reference(&nv50->constbuf[s][i], NULL);
+ }
}
+static void
+nv50_destroy(struct pipe_context *pipe)
+{
+ struct nv50_context *nv50 = nv50_context(pipe);
+
+ nv50_context_unreference_resources(nv50);
+
+ draw_destroy(nv50->draw);
+
+ if (nv50->screen->cur_ctx == nv50) {
+ nv50->screen->base.channel->user_private = NULL;
+ nv50->screen->cur_ctx = NULL;
+ }
+
+ FREE(nv50);
+}
struct pipe_context *
nv50_create(struct pipe_screen *pscreen, void *priv)
{
- struct pipe_winsys *pipe_winsys = pscreen->winsys;
- struct nv50_screen *screen = nv50_screen(pscreen);
- struct nv50_context *nv50;
+ struct pipe_winsys *pipe_winsys = pscreen->winsys;
+ struct nv50_screen *screen = nv50_screen(pscreen);
+ struct nv50_context *nv50;
+ struct pipe_context *pipe;
- nv50 = CALLOC_STRUCT(nv50_context);
- if (!nv50)
- return NULL;
- nv50->screen = screen;
+ nv50 = CALLOC_STRUCT(nv50_context);
+ if (!nv50)
+ return NULL;
+ pipe = &nv50->base.pipe;
- nv50->pipe.winsys = pipe_winsys;
- nv50->pipe.screen = pscreen;
- nv50->pipe.priv = priv;
+ nv50->screen = screen;
+ nv50->base.screen = &screen->base;
+ nv50->base.copy_data = nv50_m2mf_copy_linear;
+ nv50->base.push_data = nv50_sifc_linear_u8;
- nv50->pipe.destroy = nv50_destroy;
+ pipe->winsys = pipe_winsys;
+ pipe->screen = pscreen;
+ pipe->priv = priv;
- nv50->pipe.draw_vbo = nv50_draw_vbo;
- nv50->pipe.clear = nv50_clear;
+ pipe->destroy = nv50_destroy;
- nv50->pipe.flush = nv50_flush;
+ pipe->draw_vbo = nv50_draw_vbo;
+ pipe->clear = nv50_clear;
+
+ pipe->flush = nv50_flush;
+
+ if (!screen->cur_ctx)
+ screen->cur_ctx = nv50;
+ screen->base.channel->user_private = nv50;
+ screen->base.channel->flush_notify = nv50_default_flush_notify;
+
+ nv50_init_query_functions(nv50);
+ nv50_init_surface_functions(nv50);
+ nv50_init_state_functions(nv50);
+ nv50_init_resource_functions(pipe);
+
+ nv50->draw = draw_create(pipe);
+ assert(nv50->draw);
+ draw_set_rasterize_stage(nv50->draw, nv50_draw_render_stage(nv50));
+
+ return pipe;
+}
+
+struct resident {
+ struct nv04_resource *res;
+ uint32_t flags;
+};
+
+void
+nv50_bufctx_add_resident(struct nv50_context *nv50, int ctx,
+ struct nv04_resource *resource, uint32_t flags)
+{
+ struct resident rsd = { resource, flags };
+
+ if (!resource->bo)
+ return;
+
+ /* We don't need to reference the resource here, it will be referenced
+ * in the context/state, and bufctx will be reset when state changes.
+ */
+ util_dynarray_append(&nv50->residents[ctx], struct resident, rsd);
+}
+
+void
+nv50_bufctx_del_resident(struct nv50_context *nv50, int ctx,
+ struct nv04_resource *resource)
+{
+ struct resident *rsd, *top;
+ unsigned i;
+
+ for (i = 0; i < nv50->residents[ctx].size / sizeof(struct resident); ++i) {
+ rsd = util_dynarray_element(&nv50->residents[ctx], struct resident, i);
+
+ if (rsd->res == resource) {
+ top = util_dynarray_pop_ptr(&nv50->residents[ctx], struct resident);
+ if (rsd != top)
+ *rsd = *top;
+ break;
+ }
+ }
+}
+
+void
+nv50_bufctx_emit_relocs(struct nv50_context *nv50)
+{
+ struct resident *rsd;
+ struct util_dynarray *array;
+ unsigned ctx, i, n;
- screen->base.channel->user_private = nv50;
+ for (ctx = 0; ctx < NV50_BUFCTX_COUNT; ++ctx) {
+ array = &nv50->residents[ctx];
- nv50_init_surface_functions(nv50);
- nv50_init_state_functions(nv50);
- nv50_init_query_functions(nv50);
- nv50_init_resource_functions(&nv50->pipe);
+ n = array->size / sizeof(struct resident);
+ MARK_RING(nv50->screen->base.channel, n, n);
+ for (i = 0; i < n; ++i) {
+ rsd = util_dynarray_element(array, struct resident, i);
- nv50->draw = draw_create(&nv50->pipe);
- assert(nv50->draw);
- draw_set_rasterize_stage(nv50->draw, nv50_draw_render_stage(nv50));
+ nv50_resource_validate(rsd->res, rsd->flags);
+ }
+ }
- return &nv50->pipe;
+ nv50_screen_make_buffers_resident(nv50->screen);
}
diff --git a/src/gallium/drivers/nv50/nv50_context.h b/src/gallium/drivers/nv50/nv50_context.h
index b2b0b72fe26..46e6c2250af 100644
--- a/src/gallium/drivers/nv50/nv50_context.h
+++ b/src/gallium/drivers/nv50/nv50_context.h
@@ -5,265 +5,230 @@
#include "pipe/p_context.h"
#include "pipe/p_defines.h"
#include "pipe/p_state.h"
-#include "pipe/p_compiler.h"
#include "util/u_memory.h"
#include "util/u_math.h"
#include "util/u_inlines.h"
+#include "util/u_dynarray.h"
#include "draw/draw_vertex.h"
-#include "nouveau/nouveau_winsys.h"
-#include "nouveau/nouveau_gldefs.h"
-#include "nouveau/nouveau_stateobj.h"
-#include "nv50_reg.h"
-
+#include "nv50_winsys.h"
+#include "nv50_stateobj.h"
#include "nv50_screen.h"
#include "nv50_program.h"
+#include "nv50_resource.h"
-#define NOUVEAU_ERR(fmt, args...) \
- fprintf(stderr, "%s:%d - "fmt, __FUNCTION__, __LINE__, ##args);
-#define NOUVEAU_MSG(fmt, args...) \
- fprintf(stderr, "nouveau: "fmt, ##args);
-
-#define nouveau_bo_tile_layout(nvbo) \
- ((nvbo)->tile_flags & NOUVEAU_BO_TILE_LAYOUT_MASK)
-
-/* Constant buffer assignment */
-#define NV50_CB_PMISC 0
-#define NV50_CB_PVP 1
-#define NV50_CB_PFP 2
-#define NV50_CB_PGP 3
-#define NV50_CB_AUX 4
-
-#define NV50_NEW_BLEND (1 << 0)
-#define NV50_NEW_ZSA (1 << 1)
-#define NV50_NEW_BLEND_COLOUR (1 << 2)
-#define NV50_NEW_STIPPLE (1 << 3)
-#define NV50_NEW_SCISSOR (1 << 4)
-#define NV50_NEW_VIEWPORT (1 << 5)
-#define NV50_NEW_RASTERIZER (1 << 6)
-#define NV50_NEW_FRAMEBUFFER (1 << 7)
-#define NV50_NEW_VERTPROG (1 << 8)
-#define NV50_NEW_VERTPROG_CB (1 << 9)
-#define NV50_NEW_FRAGPROG (1 << 10)
-#define NV50_NEW_FRAGPROG_CB (1 << 11)
-#define NV50_NEW_GEOMPROG (1 << 12)
-#define NV50_NEW_GEOMPROG_CB (1 << 13)
-#define NV50_NEW_ARRAYS (1 << 14)
-#define NV50_NEW_SAMPLER (1 << 15)
-#define NV50_NEW_TEXTURE (1 << 16)
-#define NV50_NEW_STENCIL_REF (1 << 17)
-#define NV50_NEW_CLIP (1 << 18)
-
-struct nv50_blend_stateobj {
- struct pipe_blend_state pipe;
- struct nouveau_stateobj *so;
-};
-
-struct nv50_zsa_stateobj {
- struct pipe_depth_stencil_alpha_state pipe;
- struct nouveau_stateobj *so;
-};
+#include "nouveau/nouveau_context.h"
+#include "nouveau/nv_object.xml.h"
+#include "nouveau/nv_m2mf.xml.h"
+#include "nv50_3ddefs.xml.h"
+#include "nv50_3d.xml.h"
+#include "nv50_2d.xml.h"
-struct nv50_rasterizer_stateobj {
- struct pipe_rasterizer_state pipe;
- struct nouveau_stateobj *so;
-};
+#define NOUVEAU_ERR(fmt, args...) \
+ fprintf(stderr, "%s:%d - "fmt, __FUNCTION__, __LINE__, ##args);
-struct nv50_sampler_stateobj {
- boolean normalized;
- unsigned tsc[8];
-};
+#ifdef NOUVEAU_DEBUG
+# define NOUVEAU_DBG(args...) printf(args);
+#else
+# define NOUVEAU_DBG(args...)
+#endif
-struct nv50_sampler_view {
- struct pipe_sampler_view pipe;
- uint32_t tic[8];
-};
+#define NV50_NEW_BLEND (1 << 0)
+#define NV50_NEW_RASTERIZER (1 << 1)
+#define NV50_NEW_ZSA (1 << 2)
+#define NV50_NEW_VERTPROG (1 << 3)
+#define NV50_NEW_GMTYPROG (1 << 6)
+#define NV50_NEW_FRAGPROG (1 << 7)
+#define NV50_NEW_BLEND_COLOUR (1 << 8)
+#define NV50_NEW_STENCIL_REF (1 << 9)
+#define NV50_NEW_CLIP (1 << 10)
+#define NV50_NEW_SAMPLE_MASK (1 << 11)
+#define NV50_NEW_FRAMEBUFFER (1 << 12)
+#define NV50_NEW_STIPPLE (1 << 13)
+#define NV50_NEW_SCISSOR (1 << 14)
+#define NV50_NEW_VIEWPORT (1 << 15)
+#define NV50_NEW_ARRAYS (1 << 16)
+#define NV50_NEW_VERTEX (1 << 17)
+#define NV50_NEW_CONSTBUF (1 << 18)
+#define NV50_NEW_TEXTURES (1 << 19)
+#define NV50_NEW_SAMPLERS (1 << 20)
+
+#define NV50_BUFCTX_CONSTANT 0
+#define NV50_BUFCTX_FRAME 1
+#define NV50_BUFCTX_VERTEX 2
+#define NV50_BUFCTX_TEXTURES 3
+#define NV50_BUFCTX_COUNT 4
+
+/* fixed constant buffer binding points - low indices for user's constbufs */
+#define NV50_CB_PVP 124
+#define NV50_CB_PGP 126
+#define NV50_CB_PFP 125
+#define NV50_CB_AUX 127
-struct nv50_vtxelt_stateobj {
- struct pipe_vertex_element pipe[16];
- unsigned num_elements;
- uint32_t hw[16];
+struct nv50_context {
+ struct nouveau_context base;
+
+ struct nv50_screen *screen;
+
+ struct util_dynarray residents[NV50_BUFCTX_COUNT];
+
+ uint32_t dirty;
+
+ struct {
+ uint32_t instance_elts; /* bitmask of per-instance elements */
+ uint32_t instance_base;
+ uint32_t interpolant_ctrl;
+ int32_t index_bias;
+ boolean prim_restart;
+ boolean point_sprite;
+ uint8_t num_vtxbufs;
+ uint8_t num_vtxelts;
+ uint8_t num_textures[3];
+ uint8_t num_samplers[3];
+ uint16_t scissor;
+ } state;
+
+ struct nv50_blend_stateobj *blend;
+ struct nv50_rasterizer_stateobj *rast;
+ struct nv50_zsa_stateobj *zsa;
+ struct nv50_vertex_stateobj *vertex;
+
+ struct nv50_program *vertprog;
+ struct nv50_program *gmtyprog;
+ struct nv50_program *fragprog;
+
+ struct pipe_resource *constbuf[3][16];
+ uint16_t constbuf_dirty[3];
+
+ struct pipe_vertex_buffer vtxbuf[PIPE_MAX_ATTRIBS];
+ unsigned num_vtxbufs;
+ struct pipe_index_buffer idxbuf;
+ uint32_t vbo_fifo; /* bitmask of vertex elements to be pushed to FIFO */
+ uint32_t vbo_user; /* bitmask of vertex buffers pointing to user memory */
+ unsigned vbo_min_index; /* from pipe_draw_info, for vertex upload */
+ unsigned vbo_max_index;
+
+ struct pipe_sampler_view *textures[3][PIPE_MAX_SAMPLERS];
+ unsigned num_textures[3];
+ struct nv50_tsc_entry *samplers[3][PIPE_MAX_SAMPLERS];
+ unsigned num_samplers[3];
+
+ struct pipe_framebuffer_state framebuffer;
+ struct pipe_blend_color blend_colour;
+ struct pipe_stencil_ref stencil_ref;
+ struct pipe_poly_stipple stipple;
+ struct pipe_scissor_state scissor;
+ struct pipe_viewport_state viewport;
+ struct pipe_clip_state clip;
+
+ unsigned sample_mask;
+
+ boolean vbo_push_hint;
+
+ struct draw_context *draw;
};
-static INLINE struct nv50_sampler_view *
-nv50_sampler_view(struct pipe_sampler_view *view)
-{
- return (struct nv50_sampler_view *)view;
-}
-
-static INLINE unsigned
-get_tile_height(uint32_t tile_mode)
-{
- return 1 << ((tile_mode & 0xf) + 2);
-}
-
-static INLINE unsigned
-get_tile_depth(uint32_t tile_mode)
+static INLINE struct nv50_context *
+nv50_context(struct pipe_context *pipe)
{
- return 1 << (tile_mode >> 4);
+ return (struct nv50_context *)pipe;
}
-
struct nv50_surface {
- struct pipe_surface base;
- unsigned offset;
+ struct pipe_surface base;
+ uint32_t offset;
+ uint32_t width;
+ uint16_t height;
+ uint16_t depth;
};
static INLINE struct nv50_surface *
-nv50_surface(struct pipe_surface *pt)
+nv50_surface(struct pipe_surface *ps)
{
- return (struct nv50_surface *)pt;
+ return (struct nv50_surface *)ps;
}
-struct nv50_state {
- struct nouveau_stateobj *hw[64];
- uint64_t hw_dirty;
-
- unsigned sampler_view_nr[3];
- struct nouveau_stateobj *vtxbuf;
- struct nouveau_stateobj *vtxattr;
- unsigned vtxelt_nr;
-};
+/* nv50_context.c */
+struct pipe_context *nv50_create(struct pipe_screen *, void *);
-struct nv50_context {
- struct pipe_context pipe;
-
- struct nv50_screen *screen;
-
- struct draw_context *draw;
-
- struct nv50_state state;
-
- unsigned dirty;
- struct nv50_blend_stateobj *blend;
- struct nv50_zsa_stateobj *zsa;
- struct nv50_rasterizer_stateobj *rasterizer;
- struct pipe_blend_color blend_colour;
- struct pipe_stencil_ref stencil_ref;
- struct pipe_poly_stipple stipple;
- struct pipe_scissor_state scissor;
- struct pipe_viewport_state viewport;
- struct pipe_framebuffer_state framebuffer;
- struct pipe_clip_state clip;
- struct nv50_program *vertprog;
- struct nv50_program *fragprog;
- struct nv50_program *geomprog;
- struct pipe_resource *constbuf[PIPE_SHADER_TYPES];
- struct pipe_vertex_buffer vtxbuf[PIPE_MAX_ATTRIBS];
- unsigned vtxbuf_nr;
- struct pipe_index_buffer idxbuf;
- struct nv50_vtxelt_stateobj *vtxelt;
- struct nv50_sampler_stateobj *sampler[3][PIPE_MAX_SAMPLERS];
- unsigned sampler_nr[3];
- struct pipe_sampler_view *sampler_views[3][PIPE_MAX_SAMPLERS];
- unsigned sampler_view_nr[3];
-
- unsigned vbo_fifo;
- unsigned req_lmem;
-};
+void nv50_default_flush_notify(struct nouveau_channel *);
-static INLINE struct nv50_context *
-nv50_context(struct pipe_context *pipe)
+void nv50_bufctx_emit_relocs(struct nv50_context *);
+void nv50_bufctx_add_resident(struct nv50_context *, int ctx,
+ struct nv04_resource *, uint32_t flags);
+void nv50_bufctx_del_resident(struct nv50_context *, int ctx,
+ struct nv04_resource *);
+static INLINE void
+nv50_bufctx_reset(struct nv50_context *nv50, int ctx)
{
- return (struct nv50_context *)pipe;
+ util_dynarray_resize(&nv50->residents[ctx], 0);
}
-extern void nv50_init_surface_functions(struct nv50_context *nv50);
-extern void nv50_init_state_functions(struct nv50_context *nv50);
-extern void nv50_init_query_functions(struct nv50_context *nv50);
-extern void nv50_init_transfer_functions(struct nv50_context *nv50);
-
-extern void nv50_screen_init_miptree_functions(struct pipe_screen *pscreen);
-
-extern int
-nv50_surface_do_copy(struct nv50_screen *screen, struct pipe_surface *dst,
- int dx, int dy, struct pipe_surface *src, int sx, int sy,
- int w, int h);
-
/* nv50_draw.c */
-extern struct draw_stage *nv50_draw_render_stage(struct nv50_context *nv50);
+extern struct draw_stage *nv50_draw_render_stage(struct nv50_context *);
-/* nv50_vbo.c */
-extern void nv50_draw_vbo(struct pipe_context *pipe,
- const struct pipe_draw_info *info);
-extern void nv50_vtxelt_construct(struct nv50_vtxelt_stateobj *cso);
-extern struct nouveau_stateobj *nv50_vbo_validate(struct nv50_context *nv50);
+/* nv50_program.c */
+boolean nv50_program_translate(struct nv50_program *);
+void nv50_program_destroy(struct nv50_context *, struct nv50_program *);
-/* nv50_push.c */
-extern void
-nv50_push_elements_instanced(struct pipe_context *, struct pipe_resource *,
- unsigned idxsize, int idxbias,
- unsigned mode, unsigned start,
- unsigned count, unsigned i_start,
- unsigned i_count);
+/* nv50_query.c */
+void nv50_init_query_functions(struct nv50_context *);
-/* nv50_clear.c */
-extern void nv50_clear(struct pipe_context *pipe, unsigned buffers,
- const float *rgba, double depth, unsigned stencil);
+/* nv50_shader_state.c */
+void nv50_vertprog_validate(struct nv50_context *);
+void nv50_gmtyprog_validate(struct nv50_context *);
+void nv50_fragprog_validate(struct nv50_context *);
+void nv50_fp_linkage_validate(struct nv50_context *);
+void nv50_gp_linkage_validate(struct nv50_context *);
+void nv50_constbufs_validate(struct nv50_context *);
+void nv50_sprite_coords_validate(struct nv50_context *);
-/* nv50_program.c */
-extern struct nouveau_stateobj *
-nv50_vertprog_validate(struct nv50_context *nv50);
-extern struct nouveau_stateobj *
-nv50_fragprog_validate(struct nv50_context *nv50);
-extern struct nouveau_stateobj *
-nv50_geomprog_validate(struct nv50_context *nv50);
-extern struct nouveau_stateobj *
-nv50_fp_linkage_validate(struct nv50_context *nv50);
-extern struct nouveau_stateobj *
-nv50_gp_linkage_validate(struct nv50_context *nv50);
-extern void nv50_program_destroy(struct nv50_context *nv50,
- struct nv50_program *p);
+/* nv50_state.c */
+extern void nv50_init_state_functions(struct nv50_context *);
/* nv50_state_validate.c */
-extern boolean nv50_state_validate(struct nv50_context *nv50, unsigned dwords);
+extern boolean nv50_state_validate(struct nv50_context *);
-extern void nv50_so_init_sifc(struct nv50_context *nv50,
- struct nouveau_stateobj *so,
- struct nouveau_bo *bo, unsigned reloc,
- unsigned offset, unsigned size);
+/* nv50_surface.c */
+extern void nv50_clear(struct pipe_context *, unsigned buffers,
+ const float *rgba, double depth, unsigned stencil);
+extern void nv50_init_surface_functions(struct nv50_context *);
/* nv50_tex.c */
-extern boolean nv50_tex_construct(struct nv50_sampler_view *view);
-extern void nv50_tex_relocs(struct nv50_context *);
-extern struct nouveau_stateobj *nv50_tex_validate(struct nv50_context *);
+void nv50_validate_textures(struct nv50_context *);
+void nv50_validate_samplers(struct nv50_context *);
+
+struct pipe_sampler_view *
+nv50_create_sampler_view(struct pipe_context *,
+ struct pipe_resource *,
+ const struct pipe_sampler_view *);
+
+/* nv50_transfer.c */
+void
+nv50_sifc_linear_u8(struct nouveau_context *pipe,
+ struct nouveau_bo *dst, unsigned offset, unsigned domain,
+ unsigned size, void *data);
+void
+nv50_m2mf_copy_linear(struct nouveau_context *pipe,
+ struct nouveau_bo *dst, unsigned dstoff, unsigned dstdom,
+ struct nouveau_bo *src, unsigned srcoff, unsigned srcdom,
+ unsigned size);
+
+/* nv50_vbo.c */
+void nv50_draw_vbo(struct pipe_context *, const struct pipe_draw_info *);
+void *
+nv50_vertex_state_create(struct pipe_context *pipe,
+ unsigned num_elements,
+ const struct pipe_vertex_element *elements);
+void
+nv50_vertex_state_delete(struct pipe_context *pipe, void *hwcso);
-/* nv50_context.c */
-struct pipe_context *
-nv50_create(struct pipe_screen *pscreen, void *priv);
+void nv50_vertex_arrays_validate(struct nv50_context *nv50);
-static INLINE unsigned
-nv50_prim(unsigned mode)
-{
- switch (mode) {
- case PIPE_PRIM_POINTS: return NV50TCL_VERTEX_BEGIN_POINTS;
- case PIPE_PRIM_LINES: return NV50TCL_VERTEX_BEGIN_LINES;
- case PIPE_PRIM_LINE_LOOP: return NV50TCL_VERTEX_BEGIN_LINE_LOOP;
- case PIPE_PRIM_LINE_STRIP: return NV50TCL_VERTEX_BEGIN_LINE_STRIP;
- case PIPE_PRIM_TRIANGLES: return NV50TCL_VERTEX_BEGIN_TRIANGLES;
- case PIPE_PRIM_TRIANGLE_STRIP:
- return NV50TCL_VERTEX_BEGIN_TRIANGLE_STRIP;
- case PIPE_PRIM_TRIANGLE_FAN: return NV50TCL_VERTEX_BEGIN_TRIANGLE_FAN;
- case PIPE_PRIM_QUADS: return NV50TCL_VERTEX_BEGIN_QUADS;
- case PIPE_PRIM_QUAD_STRIP: return NV50TCL_VERTEX_BEGIN_QUAD_STRIP;
- case PIPE_PRIM_POLYGON: return NV50TCL_VERTEX_BEGIN_POLYGON;
- case PIPE_PRIM_LINES_ADJACENCY:
- return NV50TCL_VERTEX_BEGIN_LINES_ADJACENCY;
- case PIPE_PRIM_LINE_STRIP_ADJACENCY:
- return NV50TCL_VERTEX_BEGIN_LINE_STRIP_ADJACENCY;
- case PIPE_PRIM_TRIANGLES_ADJACENCY:
- return NV50TCL_VERTEX_BEGIN_TRIANGLES_ADJACENCY;
- case PIPE_PRIM_TRIANGLE_STRIP_ADJACENCY:
- return NV50TCL_VERTEX_BEGIN_TRIANGLE_STRIP_ADJACENCY;
- default:
- break;
- }
-
- NOUVEAU_ERR("invalid primitive type %d\n", mode);
- return NV50TCL_VERTEX_BEGIN_POINTS;
-}
+/* nv50_push.c */
+void nv50_push_vbo(struct nv50_context *, const struct pipe_draw_info *);
#endif
diff --git a/src/gallium/drivers/nv50/nv50_defs.xml.h b/src/gallium/drivers/nv50/nv50_defs.xml.h
new file mode 100644
index 00000000000..1bf2f802b56
--- /dev/null
+++ b/src/gallium/drivers/nv50/nv50_defs.xml.h
@@ -0,0 +1,142 @@
+#ifndef NV50_DEFS_XML
+#define NV50_DEFS_XML
+
+/* Autogenerated file, DO NOT EDIT manually!
+
+This file was generated by the rules-ng-ng headergen tool in this git repository:
+http://0x04.net/cgit/index.cgi/rules-ng-ng
+git clone git://0x04.net/rules-ng-ng
+
+The rules-ng-ng source files this header was generated from are:
+- nv50_defs.xml ( 4482 bytes, from 2010-10-03 13:18:37)
+- copyright.xml ( 6498 bytes, from 2010-10-03 13:18:37)
+
+Copyright (C) 2006-2010 by the following authors:
+- Artur Huillet <arthur.huillet@free.fr> (ahuillet)
+- Ben Skeggs (darktama, darktama_)
+- B. R. <koala_br@users.sourceforge.net> (koala_br)
+- Carlos Martin <carlosmn@users.sf.net> (carlosmn)
+- Christoph Bumiller <e0425955@student.tuwien.ac.at> (calim, chrisbmr)
+- Dawid Gajownik <gajownik@users.sf.net> (gajownik)
+- Dmitry Baryshkov
+- Dmitry Eremin-Solenikov <lumag@users.sf.net> (lumag)
+- EdB <edb_@users.sf.net> (edb_)
+- Erik Waling <erikwailing@users.sf.net> (erikwaling)
+- Francisco Jerez <currojerez@riseup.net> (curro, curro_, currojerez)
+- imirkin <imirkin@users.sf.net> (imirkin)
+- jb17bsome <jb17bsome@bellsouth.net> (jb17bsome)
+- Jeremy Kolb <kjeremy@users.sf.net> (kjeremy)
+- Laurent Carlier <lordheavym@gmail.com> (lordheavy)
+- Luca Barbieri <luca@luca-barbieri.com> (lb, lb1)
+- Maarten Maathuis <madman2003@gmail.com> (stillunknown)
+- Marcin Kościelnicki <koriakin@0x04.net> (mwk, koriakin)
+- Mark Carey <mark.carey@gmail.com> (careym)
+- Matthieu Castet <matthieu.castet@parrot.com> (mat-c)
+- nvidiaman <nvidiaman@users.sf.net> (nvidiaman)
+- Patrice Mandin <patmandin@gmail.com> (pmandin, pmdata)
+- Pekka Paalanen <pq@iki.fi> (pq, ppaalanen)
+- Peter Popov <ironpeter@users.sf.net> (ironpeter)
+- Richard Hughes <hughsient@users.sf.net> (hughsient)
+- Rudi Cilibrasi <cilibrar@users.sf.net> (cilibrar)
+- Serge Martin
+- Simon Raffeiner
+- Stephane Loeuillet <leroutier@users.sf.net> (leroutier)
+- Stephane Marchesin <stephane.marchesin@gmail.com> (marcheu)
+- sturmflut <sturmflut@users.sf.net> (sturmflut)
+- Sylvain Munaut <tnt@246tNt.com>
+- Victor Stinner <victor.stinner@haypocalc.com> (haypo)
+- Wladmir van der Laan <laanwj@gmail.com> (miathan6)
+- Younes Manton <younes.m@gmail.com> (ymanton)
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice (including the
+next paragraph) shall be included in all copies or substantial
+portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE COPYRIGHT OWNER(S) AND/OR ITS SUPPLIERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+*/
+
+
+#define NV50_SURFACE_FORMAT_R32G32B32A32_FLOAT 0x000000c0
+#define NV50_SURFACE_FORMAT_R32G32B32A32_SINT 0x000000c1
+#define NV50_SURFACE_FORMAT_R32G32B32A32_UINT 0x000000c2
+#define NV50_SURFACE_FORMAT_R32G32B32X32_FLOAT 0x000000c3
+#define NV50_SURFACE_FORMAT_R16G16B16A16_UNORM 0x000000c6
+#define NV50_SURFACE_FORMAT_R16G16B16A16_SNORM 0x000000c7
+#define NV50_SURFACE_FORMAT_R16G16B16A16_SINT 0x000000c8
+#define NV50_SURFACE_FORMAT_R16G16B16A16_UINT 0x000000c9
+#define NV50_SURFACE_FORMAT_R16G16B16A16_FLOAT 0x000000ca
+#define NV50_SURFACE_FORMAT_R32G32_FLOAT 0x000000cb
+#define NV50_SURFACE_FORMAT_R32G32_SINT 0x000000cc
+#define NV50_SURFACE_FORMAT_R32G32_UINT 0x000000cd
+#define NV50_SURFACE_FORMAT_R16G16B16X16_FLOAT 0x000000ce
+#define NV50_SURFACE_FORMAT_A8R8G8B8_UNORM 0x000000cf
+#define NV50_SURFACE_FORMAT_A8R8G8B8_SRGB 0x000000d0
+#define NV50_SURFACE_FORMAT_A2B10G10R10_UNORM 0x000000d1
+#define NV50_SURFACE_FORMAT_A2B10G10R10_UINT 0x000000d2
+#define NV50_SURFACE_FORMAT_A8B8G8R8_UNORM 0x000000d5
+#define NV50_SURFACE_FORMAT_A8B8G8R8_SRGB 0x000000d6
+#define NV50_SURFACE_FORMAT_A8B8G8R8_SNORM 0x000000d7
+#define NV50_SURFACE_FORMAT_A8B8G8R8_SINT 0x000000d8
+#define NV50_SURFACE_FORMAT_A8B8G8R8_UINT 0x000000d9
+#define NV50_SURFACE_FORMAT_R16G16_UNORM 0x000000da
+#define NV50_SURFACE_FORMAT_R16G16_SNORM 0x000000db
+#define NV50_SURFACE_FORMAT_R16G16_SINT 0x000000dc
+#define NV50_SURFACE_FORMAT_R16G16_UINT 0x000000dd
+#define NV50_SURFACE_FORMAT_R16G16_FLOAT 0x000000de
+#define NV50_SURFACE_FORMAT_A2R10G10B10_UNORM 0x000000df
+#define NV50_SURFACE_FORMAT_B10G11R11_FLOAT 0x000000e0
+#define NV50_SURFACE_FORMAT_R32_FLOAT 0x000000e5
+#define NV50_SURFACE_FORMAT_X8R8G8B8_UNORM 0x000000e6
+#define NV50_SURFACE_FORMAT_X8R8G8B8_SRGB 0x000000e7
+#define NV50_SURFACE_FORMAT_R5G6B5_UNORM 0x000000e8
+#define NV50_SURFACE_FORMAT_A1R5G5B5_UNORM 0x000000e9
+#define NV50_SURFACE_FORMAT_R8G8_UNORM 0x000000ea
+#define NV50_SURFACE_FORMAT_R8G8_SNORM 0x000000eb
+#define NV50_SURFACE_FORMAT_R8G8_SINT 0x000000ec
+#define NV50_SURFACE_FORMAT_R8G8_UINT 0x000000ed
+#define NV50_SURFACE_FORMAT_R16_UNORM 0x000000ee
+#define NV50_SURFACE_FORMAT_R16_SNORM 0x000000ef
+#define NV50_SURFACE_FORMAT_R16_SINT 0x000000f0
+#define NV50_SURFACE_FORMAT_R16_UINT 0x000000f1
+#define NV50_SURFACE_FORMAT_R16_FLOAT 0x000000f2
+#define NV50_SURFACE_FORMAT_R8_UNORM 0x000000f3
+#define NV50_SURFACE_FORMAT_R8_SNORM 0x000000f4
+#define NV50_SURFACE_FORMAT_R8_SINT 0x000000f5
+#define NV50_SURFACE_FORMAT_R8_UINT 0x000000f6
+#define NV50_SURFACE_FORMAT_A8_UNORM 0x000000f7
+#define NV50_SURFACE_FORMAT_X1R5G5B5_UNORM 0x000000f8
+#define NV50_SURFACE_FORMAT_X8B8G8R8_UNORM 0x000000f9
+#define NV50_SURFACE_FORMAT_X8B8G8R8_SRGB 0x000000fa
+#define NV50_ZETA_FORMAT_Z32_FLOAT 0x0000000a
+#define NV50_ZETA_FORMAT_Z16_UNORM 0x00000013
+#define NV50_ZETA_FORMAT_Z24S8_UNORM 0x00000014
+#define NV50_ZETA_FORMAT_X8Z24_UNORM 0x00000015
+#define NV50_ZETA_FORMAT_S8Z24_UNORM 0x00000016
+#define NV50_ZETA_FORMAT_UNK18 0x00000018
+#define NV50_ZETA_FORMAT_Z32_FLOAT_X24S8_UNORM 0x00000019
+#define NV50_ZETA_FORMAT_UNK1D 0x0000001d
+#define NV50_ZETA_FORMAT_UNK1E 0x0000001e
+#define NV50_ZETA_FORMAT_UNK1F 0x0000001f
+#define NV50_QUERY__SIZE 0x00000010
+#define NV50_QUERY_COUNTER 0x00000000
+
+#define NV50_QUERY_RES 0x00000004
+
+#define NV50_QUERY_TIME 0x00000008
+
+
+#endif /* NV50_DEFS_XML */
diff --git a/src/gallium/drivers/nv50/nv50_draw.c b/src/gallium/drivers/nv50/nv50_draw.c
index 2f6f607261e..1d8598829c5 100644
--- a/src/gallium/drivers/nv50/nv50_draw.c
+++ b/src/gallium/drivers/nv50/nv50_draw.c
@@ -25,32 +25,32 @@
#include "nv50_context.h"
struct nv50_render_stage {
- struct draw_stage stage;
- struct nv50_context *nv50;
+ struct draw_stage stage;
+ struct nv50_context *nv50;
};
static INLINE struct nv50_render_stage *
nv50_render_stage(struct draw_stage *stage)
{
- return (struct nv50_render_stage *)stage;
+ return (struct nv50_render_stage *)stage;
}
static void
nv50_render_point(struct draw_stage *stage, struct prim_header *prim)
{
- NOUVEAU_ERR("\n");
+ NOUVEAU_ERR("\n");
}
static void
nv50_render_line(struct draw_stage *stage, struct prim_header *prim)
{
- NOUVEAU_ERR("\n");
+ NOUVEAU_ERR("\n");
}
static void
nv50_render_tri(struct draw_stage *stage, struct prim_header *prim)
{
- NOUVEAU_ERR("\n");
+ NOUVEAU_ERR("\n");
}
static void
@@ -61,29 +61,28 @@ nv50_render_flush(struct draw_stage *stage, unsigned flags)
static void
nv50_render_reset_stipple_counter(struct draw_stage *stage)
{
- NOUVEAU_ERR("\n");
+ NOUVEAU_ERR("\n");
}
static void
nv50_render_destroy(struct draw_stage *stage)
{
- FREE(stage);
+ FREE(stage);
}
struct draw_stage *
nv50_draw_render_stage(struct nv50_context *nv50)
{
- struct nv50_render_stage *rs = CALLOC_STRUCT(nv50_render_stage);
+ struct nv50_render_stage *rs = CALLOC_STRUCT(nv50_render_stage);
- rs->nv50 = nv50;
- rs->stage.draw = nv50->draw;
- rs->stage.destroy = nv50_render_destroy;
- rs->stage.point = nv50_render_point;
- rs->stage.line = nv50_render_line;
- rs->stage.tri = nv50_render_tri;
- rs->stage.flush = nv50_render_flush;
- rs->stage.reset_stipple_counter = nv50_render_reset_stipple_counter;
+ rs->nv50 = nv50;
+ rs->stage.draw = nv50->draw;
+ rs->stage.destroy = nv50_render_destroy;
+ rs->stage.point = nv50_render_point;
+ rs->stage.line = nv50_render_line;
+ rs->stage.tri = nv50_render_tri;
+ rs->stage.flush = nv50_render_flush;
+ rs->stage.reset_stipple_counter = nv50_render_reset_stipple_counter;
- return &rs->stage;
+ return &rs->stage;
}
-
diff --git a/src/gallium/drivers/nv50/nv50_formats.c b/src/gallium/drivers/nv50/nv50_formats.c
index 42828094547..7946117cf30 100644
--- a/src/gallium/drivers/nv50/nv50_formats.c
+++ b/src/gallium/drivers/nv50/nv50_formats.c
@@ -21,26 +21,34 @@
*/
#include "nv50_screen.h"
-#include "nv50_texture.h"
-#include "nv50_reg.h"
+#include "nv50_texture.xml.h"
+#include "nv50_defs.xml.h"
+#include "nv50_3d.xml.h"
#include "pipe/p_defines.h"
-#define A_(cr, cg, cb, ca, t0, t1, t2, t3, sz, r) \
- NV50TIC_0_0_MAPR_##cr | NV50TIC_0_0_TYPER_##t0 | \
- NV50TIC_0_0_MAPG_##cg | NV50TIC_0_0_TYPEG_##t1 | \
- NV50TIC_0_0_MAPB_##cb | NV50TIC_0_0_TYPEB_##t2 | \
- NV50TIC_0_0_MAPA_##ca | NV50TIC_0_0_TYPEA_##t3 | \
- NV50TIC_0_0_FMT_##sz, \
- NV50TCL_VERTEX_ARRAY_ATTRIB_FORMAT_##sz | \
- NV50TCL_VERTEX_ARRAY_ATTRIB_TYPE_##t0 | \
- (NV50TCL_VERTEX_ARRAY_ATTRIB_TYPE_##t0 << 3) | (r << 31)
-
-#define B_(cr, cg, cb, ca, t0, t1, t2, t3, sz, r) \
- NV50TIC_0_0_MAPR_##cr | NV50TIC_0_0_TYPER_##t0 | \
- NV50TIC_0_0_MAPG_##cg | NV50TIC_0_0_TYPEG_##t1 | \
- NV50TIC_0_0_MAPB_##cb | NV50TIC_0_0_TYPEB_##t2 | \
- NV50TIC_0_0_MAPA_##ca | NV50TIC_0_0_TYPEA_##t3 | \
- NV50TIC_0_0_FMT_##sz, 0
+#define A_(cr, cg, cb, ca, t0, t1, t2, t3, sz, r) \
+ (NV50_TIC_MAP_##cr << NV50_TIC_0_MAPR__SHIFT) | \
+ (NV50_TIC_TYPE_##t0 << NV50_TIC_0_TYPE0__SHIFT) | \
+ (NV50_TIC_MAP_##cg << NV50_TIC_0_MAPG__SHIFT) | \
+ (NV50_TIC_TYPE_##t1 << NV50_TIC_0_TYPE1__SHIFT) | \
+ (NV50_TIC_MAP_##cb << NV50_TIC_0_MAPB__SHIFT) | \
+ (NV50_TIC_TYPE_##t2 << NV50_TIC_0_TYPE2__SHIFT) | \
+ (NV50_TIC_MAP_##ca << NV50_TIC_0_MAPA__SHIFT) | \
+ (NV50_TIC_TYPE_##t3 << NV50_TIC_0_TYPE3__SHIFT) | \
+ NV50_TIC_0_FMT_##sz, \
+ NV50_3D_VERTEX_ARRAY_ATTRIB_FORMAT_##sz | \
+ NV50_3D_VERTEX_ARRAY_ATTRIB_TYPE_##t0 | (r << 31)
+
+#define B_(cr, cg, cb, ca, t0, t1, t2, t3, sz, r) \
+ (NV50_TIC_MAP_##cr << NV50_TIC_0_MAPR__SHIFT) | \
+ (NV50_TIC_TYPE_##t0 << NV50_TIC_0_TYPE0__SHIFT) | \
+ (NV50_TIC_MAP_##cg << NV50_TIC_0_MAPG__SHIFT) | \
+ (NV50_TIC_TYPE_##t1 << NV50_TIC_0_TYPE1__SHIFT) | \
+ (NV50_TIC_MAP_##cb << NV50_TIC_0_MAPB__SHIFT) | \
+ (NV50_TIC_TYPE_##t2 << NV50_TIC_0_TYPE2__SHIFT) | \
+ (NV50_TIC_MAP_##ca << NV50_TIC_0_MAPA__SHIFT) | \
+ (NV50_TIC_TYPE_##t3 << NV50_TIC_0_TYPE3__SHIFT) | \
+ NV50_TIC_0_FMT_##sz, 0
#define VERTEX_BUFFER PIPE_BIND_VERTEX_BUFFER
#define SAMPLER_VIEW PIPE_BIND_SAMPLER_VIEW
@@ -49,98 +57,96 @@
#define SCANOUT PIPE_BIND_SCANOUT
/* for vertex buffers: */
-#define NV50TIC_0_0_FMT_8_8_8 NV50TIC_0_0_FMT_8_8_8_8
-#define NV50TIC_0_0_FMT_16_16_16 NV50TIC_0_0_FMT_16_16_16_16
-#define NV50TIC_0_0_FMT_32_32_32 NV50TIC_0_0_FMT_32_32_32_32
-
-/* NOTE: using NV50_2D_DST_FORMAT for substitute formats used with 2D engine */
+#define NV50_TIC_0_FMT_8_8_8 NV50_TIC_0_FMT_8_8_8_8
+#define NV50_TIC_0_FMT_16_16_16 NV50_TIC_0_FMT_16_16_16_16
+#define NV50_TIC_0_FMT_32_32_32 NV50_TIC_0_FMT_32_32_32_32
const struct nv50_format nv50_format_table[PIPE_FORMAT_COUNT] =
{
/* COMMON FORMATS */
- [PIPE_FORMAT_B8G8R8A8_UNORM] = { NV50TCL_RT_FORMAT_A8R8G8B8_UNORM,
+ [PIPE_FORMAT_B8G8R8A8_UNORM] = { NV50_SURFACE_FORMAT_A8R8G8B8_UNORM,
A_(C2, C1, C0, C3, UNORM, UNORM, UNORM, UNORM, 8_8_8_8, 1),
VERTEX_BUFFER | SAMPLER_VIEW | RENDER_TARGET | SCANOUT },
- [PIPE_FORMAT_B8G8R8X8_UNORM] = { NV50TCL_RT_FORMAT_X8R8G8B8_UNORM,
- A_(C2, C1, C0, ONE, UNORM, UNORM, UNORM, UNORM, 8_8_8_8, 1),
+ [PIPE_FORMAT_B8G8R8X8_UNORM] = { NV50_SURFACE_FORMAT_X8R8G8B8_UNORM,
+ A_(C2, C1, C0, ONE_FLOAT, UNORM, UNORM, UNORM, UNORM, 8_8_8_8, 1),
VERTEX_BUFFER | SAMPLER_VIEW | RENDER_TARGET | SCANOUT },
- [PIPE_FORMAT_B8G8R8A8_SRGB] = { NV50TCL_RT_FORMAT_A8R8G8B8_SRGB,
+ [PIPE_FORMAT_B8G8R8A8_SRGB] = { NV50_SURFACE_FORMAT_A8R8G8B8_SRGB,
A_(C2, C1, C0, C3, UNORM, UNORM, UNORM, UNORM, 8_8_8_8, 1),
VERTEX_BUFFER | SAMPLER_VIEW | RENDER_TARGET },
- [PIPE_FORMAT_B8G8R8X8_SRGB] = { NV50TCL_RT_FORMAT_X8R8G8B8_SRGB,
- A_(C2, C1, C0, ONE, UNORM, UNORM, UNORM, UNORM, 8_8_8_8, 1),
+ [PIPE_FORMAT_B8G8R8X8_SRGB] = { NV50_SURFACE_FORMAT_X8R8G8B8_SRGB,
+ A_(C2, C1, C0, ONE_FLOAT, UNORM, UNORM, UNORM, UNORM, 8_8_8_8, 1),
VERTEX_BUFFER | SAMPLER_VIEW | RENDER_TARGET },
- [PIPE_FORMAT_B5G6R5_UNORM] = { NV50TCL_RT_FORMAT_R5G6B5_UNORM,
- B_(C2, C1, C0, ONE, UNORM, UNORM, UNORM, UNORM, 5_6_5, 1),
+ [PIPE_FORMAT_B5G6R5_UNORM] = { NV50_SURFACE_FORMAT_R5G6B5_UNORM,
+ B_(C2, C1, C0, ONE_FLOAT, UNORM, UNORM, UNORM, UNORM, 5_6_5, 1),
SAMPLER_VIEW | RENDER_TARGET | SCANOUT },
- [PIPE_FORMAT_B5G5R5A1_UNORM] = { NV50TCL_RT_FORMAT_A1R5G5B5_UNORM,
+ [PIPE_FORMAT_B5G5R5A1_UNORM] = { NV50_SURFACE_FORMAT_A1R5G5B5_UNORM,
B_(C2, C1, C0, C3, UNORM, UNORM, UNORM, UNORM, 1_5_5_5, 1),
SAMPLER_VIEW | RENDER_TARGET | SCANOUT },
- [PIPE_FORMAT_B4G4R4A4_UNORM] = { NV50_2D_DST_FORMAT_R16_UNORM,
+ [PIPE_FORMAT_B4G4R4A4_UNORM] = { 0,
B_(C2, C1, C0, C3, UNORM, UNORM, UNORM, UNORM, 4_4_4_4, 1),
SAMPLER_VIEW },
- [PIPE_FORMAT_R10G10B10A2_UNORM] = { NV50TCL_RT_FORMAT_A2B10G10R10_UNORM,
+ [PIPE_FORMAT_R10G10B10A2_UNORM] = { NV50_SURFACE_FORMAT_A2B10G10R10_UNORM,
A_(C0, C1, C2, C3, UNORM, UNORM, UNORM, UNORM, 2_10_10_10, 0),
SAMPLER_VIEW | RENDER_TARGET | VERTEX_BUFFER | SCANOUT },
- [PIPE_FORMAT_B10G10R10A2_UNORM] = { NV50TCL_RT_FORMAT_A2R10G10B10_UNORM,
+ [PIPE_FORMAT_B10G10R10A2_UNORM] = { NV50_SURFACE_FORMAT_A2R10G10B10_UNORM,
A_(C2, C1, C0, C3, UNORM, UNORM, UNORM, UNORM, 2_10_10_10, 1),
SAMPLER_VIEW | RENDER_TARGET | VERTEX_BUFFER },
/* DEPTH/STENCIL FORMATS */
- [PIPE_FORMAT_Z16_UNORM] = { NV50TCL_ZETA_FORMAT_Z16_UNORM,
- B_(C0, C0, C0, ONE, UNORM, UINT, UINT, UINT, 16_DEPTH, 0),
+ [PIPE_FORMAT_Z16_UNORM] = { NV50_ZETA_FORMAT_Z16_UNORM,
+ B_(C0, C0, C0, ONE_FLOAT, UNORM, UINT, UINT, UINT, Z16, 0),
SAMPLER_VIEW | DEPTH_STENCIL },
- [PIPE_FORMAT_Z24_UNORM_S8_USCALED] = { NV50TCL_ZETA_FORMAT_S8Z24_UNORM,
- B_(C0, C0, C0, ONE, UNORM, UINT, UINT, UINT, 8_24, 0),
+ [PIPE_FORMAT_Z24_UNORM_S8_USCALED] = { NV50_ZETA_FORMAT_S8Z24_UNORM,
+ B_(C0, C0, C0, ONE_FLOAT, UNORM, UINT, UINT, UINT, S8Z24, 0),
SAMPLER_VIEW | DEPTH_STENCIL },
- [PIPE_FORMAT_Z24X8_UNORM] = { NV50TCL_ZETA_FORMAT_X8Z24_UNORM,
- B_(C0, C0, C0, ONE, UNORM, UINT, UINT, UINT, 8_24, 0),
+ [PIPE_FORMAT_Z24X8_UNORM] = { NV50_ZETA_FORMAT_X8Z24_UNORM,
+ B_(C0, C0, C0, ONE_FLOAT, UNORM, UINT, UINT, UINT, X8Z24, 0),
SAMPLER_VIEW | DEPTH_STENCIL },
- [PIPE_FORMAT_S8_USCALED_Z24_UNORM] = { NV50TCL_ZETA_FORMAT_S8Z24_UNORM,
- B_(C1, C1, C1, ONE, UINT, UNORM, UINT, UINT, 24_8, 0),
+ [PIPE_FORMAT_S8_USCALED_Z24_UNORM] = { NV50_ZETA_FORMAT_Z24S8_UNORM,
+ B_(C1, C1, C1, ONE_FLOAT, UINT, UNORM, UINT, UINT, Z24S8, 0),
SAMPLER_VIEW | DEPTH_STENCIL },
- [PIPE_FORMAT_Z32_FLOAT] = { NV50TCL_ZETA_FORMAT_Z32_FLOAT,
- B_(C0, C0, C0, ONE, FLOAT, UINT, UINT, UINT, 32_DEPTH, 0),
+ [PIPE_FORMAT_Z32_FLOAT] = { NV50_ZETA_FORMAT_Z32_FLOAT,
+ B_(C0, C0, C0, ONE_FLOAT, FLOAT, UINT, UINT, UINT, Z32, 0),
SAMPLER_VIEW | DEPTH_STENCIL },
[PIPE_FORMAT_Z32_FLOAT_S8X24_USCALED] = {
- NV50TCL_ZETA_FORMAT_Z32_FLOAT_X24S8_UNORM,
- B_(C0, C0, C0, ONE, FLOAT, UINT, UINT, UINT, 32_8, 0),
+ NV50_ZETA_FORMAT_Z32_FLOAT_X24S8_UNORM,
+ B_(C0, C0, C0, ONE_FLOAT, FLOAT, UINT, UINT, UINT, X24S8Z32, 0),
SAMPLER_VIEW | DEPTH_STENCIL },
/* LUMINANCE, ALPHA, INTENSITY */
- [PIPE_FORMAT_L8_UNORM] = { NV50_2D_DST_FORMAT_R8_UNORM,
- A_(C0, C0, C0, ONE, UNORM, UNORM, UNORM, UNORM, 8, 0),
- SAMPLER_VIEW },
+ [PIPE_FORMAT_L8_UNORM] = { NV50_SURFACE_FORMAT_R8_UNORM,
+ A_(C0, C0, C0, ONE_FLOAT, UNORM, UNORM, UNORM, UNORM, 8, 0),
+ SAMPLER_VIEW | RENDER_TARGET },
- [PIPE_FORMAT_L8_SRGB] = { NV50_2D_DST_FORMAT_R8_UNORM,
- A_(C0, C0, C0, ONE, UNORM, UNORM, UNORM, UNORM, 8, 0),
- SAMPLER_VIEW },
+ [PIPE_FORMAT_L8_SRGB] = { NV50_SURFACE_FORMAT_R8_UNORM,
+ A_(C0, C0, C0, ONE_FLOAT, UNORM, UNORM, UNORM, UNORM, 8, 0),
+ SAMPLER_VIEW | RENDER_TARGET },
- [PIPE_FORMAT_I8_UNORM] = { NV50_2D_DST_FORMAT_R8_UNORM,
+ [PIPE_FORMAT_I8_UNORM] = { NV50_SURFACE_FORMAT_R8_UNORM,
A_(C0, C0, C0, C0, UNORM, UNORM, UNORM, UNORM, 8, 0),
- SAMPLER_VIEW },
+ SAMPLER_VIEW | RENDER_TARGET },
- [PIPE_FORMAT_A8_UNORM] = { NV50TCL_RT_FORMAT_A8_UNORM,
+ [PIPE_FORMAT_A8_UNORM] = { NV50_SURFACE_FORMAT_A8_UNORM,
A_(ZERO, ZERO, ZERO, C0, UNORM, UNORM, UNORM, UNORM, 8, 0),
SAMPLER_VIEW | RENDER_TARGET },
- [PIPE_FORMAT_L8A8_UNORM] = { NV50_2D_DST_FORMAT_R16_UNORM,
+ [PIPE_FORMAT_L8A8_UNORM] = { 0,
A_(C0, C0, C0, C1, UNORM, UNORM, UNORM, UNORM, 8_8, 0),
SAMPLER_VIEW },
@@ -151,7 +157,7 @@ const struct nv50_format nv50_format_table[PIPE_FORMAT_COUNT] =
/* DXT, RGTC */
[PIPE_FORMAT_DXT1_RGB] = { 0,
- B_(C0, C1, C2, ONE, UNORM, UNORM, UNORM, UNORM, DXT1, 0),
+ B_(C0, C1, C2, ONE_FLOAT, UNORM, UNORM, UNORM, UNORM, DXT1, 0),
SAMPLER_VIEW },
[PIPE_FORMAT_DXT1_RGBA] = { 0,
@@ -167,65 +173,65 @@ const struct nv50_format nv50_format_table[PIPE_FORMAT_COUNT] =
SAMPLER_VIEW },
[PIPE_FORMAT_RGTC1_UNORM] = { 0,
- B_(C0, ZERO, ZERO, ONE, UNORM, UNORM, UNORM, UNORM, RGTC1, 0),
+ B_(C0, ZERO, ZERO, ONE_FLOAT, UNORM, UNORM, UNORM, UNORM, RGTC1, 0),
SAMPLER_VIEW },
[PIPE_FORMAT_RGTC1_SNORM] = { 0,
- B_(C0, ZERO, ZERO, ONE, SNORM, SNORM, SNORM, SNORM, RGTC1, 0),
+ B_(C0, ZERO, ZERO, ONE_FLOAT, SNORM, SNORM, SNORM, SNORM, RGTC1, 0),
SAMPLER_VIEW },
[PIPE_FORMAT_RGTC2_UNORM] = { 0,
- B_(C0, C1, ZERO, ONE, UNORM, UNORM, UNORM, UNORM, RGTC2, 0),
+ B_(C0, C1, ZERO, ONE_FLOAT, UNORM, UNORM, UNORM, UNORM, RGTC2, 0),
SAMPLER_VIEW },
[PIPE_FORMAT_RGTC2_SNORM] = { 0,
- B_(C0, C1, ZERO, ONE, SNORM, SNORM, SNORM, SNORM, RGTC2, 0),
+ B_(C0, C1, ZERO, ONE_FLOAT, SNORM, SNORM, SNORM, SNORM, RGTC2, 0),
SAMPLER_VIEW },
/* FLOAT 16 */
- [PIPE_FORMAT_R16G16B16A16_FLOAT] = { NV50TCL_RT_FORMAT_R16G16B16A16_FLOAT,
+ [PIPE_FORMAT_R16G16B16A16_FLOAT] = { NV50_SURFACE_FORMAT_R16G16B16A16_FLOAT,
A_(C0, C1, C2, C3, FLOAT, FLOAT, FLOAT, FLOAT, 16_16_16_16, 0),
VERTEX_BUFFER | SAMPLER_VIEW | RENDER_TARGET },
- [PIPE_FORMAT_R16G16B16_FLOAT] = { NV50TCL_RT_FORMAT_R16G16B16X16_FLOAT,
- A_(C0, C1, C2, ONE, FLOAT, FLOAT, FLOAT, FLOAT, 16_16_16, 0),
+ [PIPE_FORMAT_R16G16B16_FLOAT] = { NV50_SURFACE_FORMAT_R16G16B16X16_FLOAT,
+ A_(C0, C1, C2, ONE_FLOAT, FLOAT, FLOAT, FLOAT, FLOAT, 16_16_16, 0),
VERTEX_BUFFER | SAMPLER_VIEW | RENDER_TARGET },
- [PIPE_FORMAT_R16G16_FLOAT] = { NV50TCL_RT_FORMAT_R16G16_FLOAT,
- A_(C0, C1, ZERO, ONE, FLOAT, FLOAT, FLOAT, FLOAT, 16_16, 0),
+ [PIPE_FORMAT_R16G16_FLOAT] = { NV50_SURFACE_FORMAT_R16G16_FLOAT,
+ A_(C0, C1, ZERO, ONE_FLOAT, FLOAT, FLOAT, FLOAT, FLOAT, 16_16, 0),
VERTEX_BUFFER | SAMPLER_VIEW | RENDER_TARGET },
- [PIPE_FORMAT_R16_FLOAT] = { NV50TCL_RT_FORMAT_R16_FLOAT,
- A_(C0, ZERO, ZERO, ONE, FLOAT, FLOAT, FLOAT, FLOAT, 16, 0),
+ [PIPE_FORMAT_R16_FLOAT] = { NV50_SURFACE_FORMAT_R16_FLOAT,
+ A_(C0, ZERO, ZERO, ONE_FLOAT, FLOAT, FLOAT, FLOAT, FLOAT, 16, 0),
VERTEX_BUFFER | SAMPLER_VIEW | RENDER_TARGET },
/* FLOAT 32 */
- [PIPE_FORMAT_R32G32B32A32_FLOAT] = { NV50TCL_RT_FORMAT_R32G32B32A32_FLOAT,
+ [PIPE_FORMAT_R32G32B32A32_FLOAT] = { NV50_SURFACE_FORMAT_R32G32B32A32_FLOAT,
A_(C0, C1, C2, C3, FLOAT, FLOAT, FLOAT, FLOAT, 32_32_32_32, 0),
VERTEX_BUFFER | SAMPLER_VIEW | RENDER_TARGET },
- [PIPE_FORMAT_R32G32B32_FLOAT] = { NV50TCL_RT_FORMAT_R32G32B32X32_FLOAT,
- A_(C0, C1, C2, ONE, FLOAT, FLOAT, FLOAT, FLOAT, 32_32_32, 0),
+ [PIPE_FORMAT_R32G32B32_FLOAT] = { NV50_SURFACE_FORMAT_R32G32B32X32_FLOAT,
+ A_(C0, C1, C2, ONE_FLOAT, FLOAT, FLOAT, FLOAT, FLOAT, 32_32_32, 0),
VERTEX_BUFFER | SAMPLER_VIEW | RENDER_TARGET },
- [PIPE_FORMAT_R32G32_FLOAT] = { NV50TCL_RT_FORMAT_R32G32_FLOAT,
- A_(C0, C1, ZERO, ONE, FLOAT, FLOAT, FLOAT, FLOAT, 32_32, 0),
+ [PIPE_FORMAT_R32G32_FLOAT] = { NV50_SURFACE_FORMAT_R32G32_FLOAT,
+ A_(C0, C1, ZERO, ONE_FLOAT, FLOAT, FLOAT, FLOAT, FLOAT, 32_32, 0),
VERTEX_BUFFER | SAMPLER_VIEW | RENDER_TARGET },
- [PIPE_FORMAT_R32_FLOAT] = { NV50TCL_RT_FORMAT_R32_FLOAT,
- A_(C0, ZERO, ZERO, ONE, FLOAT, FLOAT, FLOAT, FLOAT, 32, 0),
+ [PIPE_FORMAT_R32_FLOAT] = { NV50_SURFACE_FORMAT_R32_FLOAT,
+ A_(C0, ZERO, ZERO, ONE_FLOAT, FLOAT, FLOAT, FLOAT, FLOAT, 32, 0),
VERTEX_BUFFER | SAMPLER_VIEW | RENDER_TARGET },
/* ODD FORMATS */
- [PIPE_FORMAT_R11G11B10_FLOAT] = { NV50TCL_RT_FORMAT_B10G11R11_FLOAT,
- B_(C0, C1, C2, ONE, FLOAT, FLOAT, FLOAT, FLOAT, 10_11_11, 0),
+ [PIPE_FORMAT_R11G11B10_FLOAT] = { NV50_SURFACE_FORMAT_B10G11R11_FLOAT,
+ B_(C0, C1, C2, ONE_FLOAT, FLOAT, FLOAT, FLOAT, FLOAT, 10_11_11, 0),
SAMPLER_VIEW | RENDER_TARGET },
[PIPE_FORMAT_R9G9B9E5_FLOAT] = { 0,
- B_(C0, C1, C2, ONE, FLOAT, FLOAT, FLOAT, FLOAT, 5_9_9_9, 0),
+ B_(C0, C1, C2, ONE_FLOAT, FLOAT, FLOAT, FLOAT, FLOAT, E5_9_9_9, 0),
SAMPLER_VIEW },
/* SNORM 32 */
@@ -235,15 +241,15 @@ const struct nv50_format nv50_format_table[PIPE_FORMAT_COUNT] =
VERTEX_BUFFER | SAMPLER_VIEW },
[PIPE_FORMAT_R32G32B32_SNORM] = { 0,
- A_(C0, C1, C2, ONE, SNORM, SNORM, SNORM, SNORM, 32_32_32, 0),
+ A_(C0, C1, C2, ONE_FLOAT, SNORM, SNORM, SNORM, SNORM, 32_32_32, 0),
VERTEX_BUFFER | SAMPLER_VIEW },
[PIPE_FORMAT_R32G32_SNORM] = { 0,
- A_(C0, C1, ZERO, ONE, SNORM, SNORM, SNORM, SNORM, 32_32, 0),
+ A_(C0, C1, ZERO, ONE_FLOAT, SNORM, SNORM, SNORM, SNORM, 32_32, 0),
VERTEX_BUFFER | SAMPLER_VIEW },
[PIPE_FORMAT_R32_SNORM] = { 0,
- A_(C0, ZERO, ZERO, ONE, SNORM, SNORM, SNORM, SNORM, 32, 0),
+ A_(C0, ZERO, ZERO, ONE_FLOAT, SNORM, SNORM, SNORM, SNORM, 32, 0),
VERTEX_BUFFER | SAMPLER_VIEW },
/* UNORM 32 */
@@ -253,202 +259,202 @@ const struct nv50_format nv50_format_table[PIPE_FORMAT_COUNT] =
VERTEX_BUFFER | SAMPLER_VIEW },
[PIPE_FORMAT_R32G32B32_UNORM] = { 0,
- A_(C0, C1, C2, ONE, UNORM, UNORM, UNORM, UNORM, 32_32_32, 0),
+ A_(C0, C1, C2, ONE_FLOAT, UNORM, UNORM, UNORM, UNORM, 32_32_32, 0),
VERTEX_BUFFER | SAMPLER_VIEW },
[PIPE_FORMAT_R32G32_UNORM] = { 0,
- A_(C0, C1, ZERO, ONE, UNORM, UNORM, UNORM, UNORM, 32_32, 0),
+ A_(C0, C1, ZERO, ONE_FLOAT, UNORM, UNORM, UNORM, UNORM, 32_32, 0),
VERTEX_BUFFER | SAMPLER_VIEW },
[PIPE_FORMAT_R32_UNORM] = { 0,
- A_(C0, ZERO, ZERO, ONE, UNORM, UNORM, UNORM, UNORM, 32, 0),
+ A_(C0, ZERO, ZERO, ONE_FLOAT, UNORM, UNORM, UNORM, UNORM, 32, 0),
VERTEX_BUFFER | SAMPLER_VIEW },
/* SNORM 16 */
- [PIPE_FORMAT_R16G16B16A16_SNORM] = { NV50TCL_RT_FORMAT_R16G16B16A16_SNORM,
+ [PIPE_FORMAT_R16G16B16A16_SNORM] = { NV50_SURFACE_FORMAT_R16G16B16A16_SNORM,
A_(C0, C1, C2, C3, SNORM, SNORM, SNORM, SNORM, 16_16_16_16, 0),
VERTEX_BUFFER | SAMPLER_VIEW | RENDER_TARGET },
[PIPE_FORMAT_R16G16B16_SNORM] = { 0,
- A_(C0, C1, C2, ONE, SNORM, SNORM, SNORM, SNORM, 16_16_16, 0),
+ A_(C0, C1, C2, ONE_FLOAT, SNORM, SNORM, SNORM, SNORM, 16_16_16, 0),
VERTEX_BUFFER | SAMPLER_VIEW },
- [PIPE_FORMAT_R16G16_SNORM] = { NV50TCL_RT_FORMAT_R16G16_SNORM,
+ [PIPE_FORMAT_R16G16_SNORM] = { NV50_SURFACE_FORMAT_R16G16_SNORM,
A_(C0, C1, C2, C3, SNORM, SNORM, SNORM, SNORM, 16_16, 0),
VERTEX_BUFFER | SAMPLER_VIEW | RENDER_TARGET },
- [PIPE_FORMAT_R16_SNORM] = { NV50TCL_RT_FORMAT_R16_SNORM,
- A_(C0, ZERO, ZERO, ONE, SNORM, SNORM, SNORM, SNORM, 16, 0),
+ [PIPE_FORMAT_R16_SNORM] = { NV50_SURFACE_FORMAT_R16_SNORM,
+ A_(C0, ZERO, ZERO, ONE_FLOAT, SNORM, SNORM, SNORM, SNORM, 16, 0),
VERTEX_BUFFER | SAMPLER_VIEW | RENDER_TARGET },
/* UNORM 16 */
- [PIPE_FORMAT_R16G16B16A16_UNORM] = { NV50TCL_RT_FORMAT_R16G16B16A16_UNORM,
+ [PIPE_FORMAT_R16G16B16A16_UNORM] = { NV50_SURFACE_FORMAT_R16G16B16A16_UNORM,
A_(C0, C1, C2, C3, UNORM, UNORM, UNORM, UNORM, 16_16_16_16, 0),
VERTEX_BUFFER | SAMPLER_VIEW | RENDER_TARGET },
[PIPE_FORMAT_R16G16B16_UNORM] = { 0,
- A_(C0, C1, C2, ONE, UNORM, UNORM, UNORM, UNORM, 16_16_16, 0),
+ A_(C0, C1, C2, ONE_FLOAT, UNORM, UNORM, UNORM, UNORM, 16_16_16, 0),
VERTEX_BUFFER | SAMPLER_VIEW },
- [PIPE_FORMAT_R16G16_UNORM] = { NV50TCL_RT_FORMAT_R16G16_UNORM,
+ [PIPE_FORMAT_R16G16_UNORM] = { NV50_SURFACE_FORMAT_R16G16_UNORM,
A_(C0, C1, C2, C3, UNORM, UNORM, UNORM, UNORM, 16_16, 0),
VERTEX_BUFFER | SAMPLER_VIEW | RENDER_TARGET },
- [PIPE_FORMAT_R16_UNORM] = { NV50TCL_RT_FORMAT_R16_UNORM,
- A_(C0, ZERO, ZERO, ONE, UNORM, UNORM, UNORM, UNORM, 16, 0),
+ [PIPE_FORMAT_R16_UNORM] = { NV50_SURFACE_FORMAT_R16_UNORM,
+ A_(C0, ZERO, ZERO, ONE_FLOAT, UNORM, UNORM, UNORM, UNORM, 16, 0),
VERTEX_BUFFER | SAMPLER_VIEW | RENDER_TARGET },
/* SNORM 8 */
- [PIPE_FORMAT_R8G8B8A8_SNORM] = { NV50TCL_RT_FORMAT_A8B8G8R8_SNORM,
+ [PIPE_FORMAT_R8G8B8A8_SNORM] = { NV50_SURFACE_FORMAT_A8B8G8R8_SNORM,
A_(C0, C1, C2, C3, SNORM, SNORM, SNORM, SNORM, 8_8_8_8, 0),
VERTEX_BUFFER | SAMPLER_VIEW | RENDER_TARGET },
[PIPE_FORMAT_R8G8B8_SNORM] = { 0,
- A_(C0, C1, C2, ONE, SNORM, SNORM, SNORM, SNORM, 8_8_8, 0),
+ A_(C0, C1, C2, ONE_FLOAT, SNORM, SNORM, SNORM, SNORM, 8_8_8, 0),
VERTEX_BUFFER | SAMPLER_VIEW },
- [PIPE_FORMAT_R8G8_SNORM] = { NV50TCL_RT_FORMAT_R8G8_SNORM,
- A_(C0, C1, ZERO, ONE, SNORM, SNORM, SNORM, SNORM, 8_8, 0),
+ [PIPE_FORMAT_R8G8_SNORM] = { NV50_SURFACE_FORMAT_R8G8_SNORM,
+ A_(C0, C1, ZERO, ONE_FLOAT, SNORM, SNORM, SNORM, SNORM, 8_8, 0),
VERTEX_BUFFER | SAMPLER_VIEW | RENDER_TARGET },
- [PIPE_FORMAT_R8_SNORM] = { NV50TCL_RT_FORMAT_R8_SNORM,
- A_(C0, ZERO, ZERO, ONE, SNORM, SNORM, SNORM, SNORM, 8, 0),
+ [PIPE_FORMAT_R8_SNORM] = { NV50_SURFACE_FORMAT_R8_SNORM,
+ A_(C0, ZERO, ZERO, ONE_FLOAT, SNORM, SNORM, SNORM, SNORM, 8, 0),
VERTEX_BUFFER | SAMPLER_VIEW | RENDER_TARGET },
/* UNORM 8 */
- [PIPE_FORMAT_R8G8B8A8_UNORM] = { NV50TCL_RT_FORMAT_A8B8G8R8_UNORM,
+ [PIPE_FORMAT_R8G8B8A8_UNORM] = { NV50_SURFACE_FORMAT_A8B8G8R8_UNORM,
A_(C0, C1, C2, C3, UNORM, UNORM, UNORM, UNORM, 8_8_8_8, 0),
VERTEX_BUFFER | SAMPLER_VIEW | RENDER_TARGET },
- [PIPE_FORMAT_R8G8B8A8_SRGB] = { NV50TCL_RT_FORMAT_A8B8G8R8_SRGB,
+ [PIPE_FORMAT_R8G8B8A8_SRGB] = { NV50_SURFACE_FORMAT_A8B8G8R8_SRGB,
A_(C0, C1, C2, C3, UNORM, UNORM, UNORM, UNORM, 8_8_8_8, 0),
SAMPLER_VIEW | RENDER_TARGET },
- [PIPE_FORMAT_R8G8B8_UNORM] = { NV50TCL_RT_FORMAT_X8B8G8R8_UNORM,
- A_(C0, C1, C2, ONE, UNORM, UNORM, UNORM, UNORM, 8_8_8, 0),
+ [PIPE_FORMAT_R8G8B8_UNORM] = { NV50_SURFACE_FORMAT_X8B8G8R8_UNORM,
+ A_(C0, C1, C2, ONE_FLOAT, UNORM, UNORM, UNORM, UNORM, 8_8_8, 0),
VERTEX_BUFFER | SAMPLER_VIEW | RENDER_TARGET },
- [PIPE_FORMAT_R8G8B8_SRGB] = { NV50TCL_RT_FORMAT_X8B8G8R8_SRGB,
- A_(C0, C1, C2, ONE, UNORM, UNORM, UNORM, UNORM, 8_8_8, 0),
+ [PIPE_FORMAT_R8G8B8_SRGB] = { NV50_SURFACE_FORMAT_X8B8G8R8_SRGB,
+ A_(C0, C1, C2, ONE_FLOAT, UNORM, UNORM, UNORM, UNORM, 8_8_8, 0),
SAMPLER_VIEW | RENDER_TARGET },
- [PIPE_FORMAT_R8G8_UNORM] = { NV50TCL_RT_FORMAT_R8G8_UNORM,
- A_(C0, C1, ZERO, ONE, UNORM, UNORM, UNORM, UNORM, 8_8, 0),
+ [PIPE_FORMAT_R8G8_UNORM] = { NV50_SURFACE_FORMAT_R8G8_UNORM,
+ A_(C0, C1, ZERO, ONE_FLOAT, UNORM, UNORM, UNORM, UNORM, 8_8, 0),
VERTEX_BUFFER | SAMPLER_VIEW | RENDER_TARGET },
- [PIPE_FORMAT_R8_UNORM] = { NV50TCL_RT_FORMAT_R8_UNORM,
- A_(C0, ZERO, ZERO, ONE, UNORM, UNORM, UNORM, UNORM, 8, 0),
+ [PIPE_FORMAT_R8_UNORM] = { NV50_SURFACE_FORMAT_R8_UNORM,
+ A_(C0, ZERO, ZERO, ONE_FLOAT, UNORM, UNORM, UNORM, UNORM, 8, 0),
VERTEX_BUFFER | SAMPLER_VIEW | RENDER_TARGET },
- /* SSCALED 32 */
+ /* SSCALED 32 (not integer, data is converted to float !) */
[PIPE_FORMAT_R32G32B32A32_SSCALED] = { 0,
A_(C0, C1, C2, C3, SSCALED, SSCALED, SSCALED, SSCALED, 32_32_32_32, 0),
- VERTEX_BUFFER | SAMPLER_VIEW },
+ VERTEX_BUFFER },
[PIPE_FORMAT_R32G32B32_SSCALED] = { 0,
- A_(C0, C1, C2, ONE, SSCALED, SSCALED, SSCALED, SSCALED, 32_32_32, 0),
- VERTEX_BUFFER | SAMPLER_VIEW },
+ A_(C0, C1, C2, ONE_FLOAT, SSCALED, SSCALED, SSCALED, SSCALED, 32_32_32, 0),
+ VERTEX_BUFFER },
[PIPE_FORMAT_R32G32_SSCALED] = { 0,
- A_(C0, C1, ZERO, ONE, SSCALED, SSCALED, SSCALED, SSCALED, 32_32, 0),
- VERTEX_BUFFER | SAMPLER_VIEW },
+ A_(C0, C1, ZERO, ONE_FLOAT, SSCALED, SSCALED, SSCALED, SSCALED, 32_32, 0),
+ VERTEX_BUFFER },
[PIPE_FORMAT_R32_SSCALED] = { 0,
- A_(C0, ZERO, ZERO, ONE, SSCALED, SSCALED, SSCALED, SSCALED, 32, 0),
- VERTEX_BUFFER | SAMPLER_VIEW },
+ A_(C0, ZERO, ZERO, ONE_FLOAT, SSCALED, SSCALED, SSCALED, SSCALED, 32, 0),
+ VERTEX_BUFFER },
/* USCALED 32 */
[PIPE_FORMAT_R32G32B32A32_USCALED] = { 0,
A_(C0, C1, C2, C3, USCALED, USCALED, USCALED, USCALED, 32_32_32_32, 0),
- VERTEX_BUFFER | SAMPLER_VIEW },
+ VERTEX_BUFFER },
[PIPE_FORMAT_R32G32B32_USCALED] = { 0,
- A_(C0, C1, C2, ONE, USCALED, USCALED, USCALED, USCALED, 32_32_32, 0),
- VERTEX_BUFFER | SAMPLER_VIEW },
+ A_(C0, C1, C2, ONE_FLOAT, USCALED, USCALED, USCALED, USCALED, 32_32_32, 0),
+ VERTEX_BUFFER },
[PIPE_FORMAT_R32G32_USCALED] = { 0,
- A_(C0, C1, ZERO, ONE, USCALED, USCALED, USCALED, USCALED, 32_32, 0),
- VERTEX_BUFFER | SAMPLER_VIEW },
+ A_(C0, C1, ZERO, ONE_FLOAT, USCALED, USCALED, USCALED, USCALED, 32_32, 0),
+ VERTEX_BUFFER },
[PIPE_FORMAT_R32_USCALED] = { 0,
- A_(C0, ZERO, ZERO, ONE, USCALED, USCALED, USCALED, USCALED, 32, 0),
- VERTEX_BUFFER | SAMPLER_VIEW },
+ A_(C0, ZERO, ZERO, ONE_FLOAT, USCALED, USCALED, USCALED, USCALED, 32, 0),
+ VERTEX_BUFFER },
/* SSCALED 16 */
[PIPE_FORMAT_R16G16B16A16_SSCALED] = { 0,
A_(C0, C1, C2, C3, SSCALED, SSCALED, SSCALED, SSCALED, 16_16_16_16, 0),
- VERTEX_BUFFER | SAMPLER_VIEW },
+ VERTEX_BUFFER },
[PIPE_FORMAT_R16G16B16_SSCALED] = { 0,
- A_(C0, C1, C2, ONE, SSCALED, SSCALED, SSCALED, SSCALED, 16_16_16, 0),
- VERTEX_BUFFER | SAMPLER_VIEW },
+ A_(C0, C1, C2, ONE_FLOAT, SSCALED, SSCALED, SSCALED, SSCALED, 16_16_16, 0),
+ VERTEX_BUFFER },
[PIPE_FORMAT_R16G16_SSCALED] = { 0,
- A_(C0, C1, ZERO, ONE, SSCALED, SSCALED, SSCALED, SSCALED, 16_16, 0),
- VERTEX_BUFFER | SAMPLER_VIEW },
+ A_(C0, C1, ZERO, ONE_FLOAT, SSCALED, SSCALED, SSCALED, SSCALED, 16_16, 0),
+ VERTEX_BUFFER },
[PIPE_FORMAT_R16_SSCALED] = { 0,
- A_(C0, ZERO, ZERO, ONE, SSCALED, SSCALED, SSCALED, SSCALED, 16, 0),
- VERTEX_BUFFER | SAMPLER_VIEW },
+ A_(C0, ZERO, ZERO, ONE_FLOAT, SSCALED, SSCALED, SSCALED, SSCALED, 16, 0),
+ VERTEX_BUFFER },
/* USCALED 16 */
[PIPE_FORMAT_R16G16B16A16_USCALED] = { 0,
A_(C0, C1, C2, C3, USCALED, USCALED, USCALED, USCALED, 16_16_16_16, 0),
- VERTEX_BUFFER | SAMPLER_VIEW },
+ VERTEX_BUFFER },
[PIPE_FORMAT_R16G16B16_USCALED] = { 0,
- A_(C0, C1, C2, ONE, USCALED, USCALED, USCALED, USCALED, 16_16_16, 0),
- VERTEX_BUFFER | SAMPLER_VIEW },
+ A_(C0, C1, C2, ONE_FLOAT, USCALED, USCALED, USCALED, USCALED, 16_16_16, 0),
+ VERTEX_BUFFER },
[PIPE_FORMAT_R16G16_USCALED] = { 0,
- A_(C0, C1, ZERO, ONE, USCALED, USCALED, USCALED, USCALED, 16_16, 0),
- VERTEX_BUFFER | SAMPLER_VIEW },
+ A_(C0, C1, ZERO, ONE_FLOAT, USCALED, USCALED, USCALED, USCALED, 16_16, 0),
+ VERTEX_BUFFER },
[PIPE_FORMAT_R16_USCALED] = { 0,
- A_(C0, ZERO, ZERO, ONE, USCALED, USCALED, USCALED, USCALED, 16, 0),
- VERTEX_BUFFER | SAMPLER_VIEW },
+ A_(C0, ZERO, ZERO, ONE_FLOAT, USCALED, USCALED, USCALED, USCALED, 16, 0),
+ VERTEX_BUFFER },
/* SSCALED 8 */
[PIPE_FORMAT_R8G8B8A8_SSCALED] = { 0,
A_(C0, C1, C2, C3, SSCALED, SSCALED, SSCALED, SSCALED, 8_8_8_8, 0),
- VERTEX_BUFFER | SAMPLER_VIEW },
+ VERTEX_BUFFER },
[PIPE_FORMAT_R8G8B8_SSCALED] = { 0,
- A_(C0, C1, C2, ONE, SSCALED, SSCALED, SSCALED, SSCALED, 8_8_8, 0),
- VERTEX_BUFFER | SAMPLER_VIEW },
+ A_(C0, C1, C2, ONE_FLOAT, SSCALED, SSCALED, SSCALED, SSCALED, 8_8_8, 0),
+ VERTEX_BUFFER },
[PIPE_FORMAT_R8G8_SSCALED] = { 0,
- A_(C0, C1, ZERO, ONE, SSCALED, SSCALED, SSCALED, SSCALED, 8_8, 0),
- VERTEX_BUFFER | SAMPLER_VIEW },
+ A_(C0, C1, ZERO, ONE_FLOAT, SSCALED, SSCALED, SSCALED, SSCALED, 8_8, 0),
+ VERTEX_BUFFER },
[PIPE_FORMAT_R8_SSCALED] = { 0,
- A_(C0, ZERO, ZERO, ONE, SSCALED, SSCALED, SSCALED, SSCALED, 8, 0),
- VERTEX_BUFFER | SAMPLER_VIEW },
+ A_(C0, ZERO, ZERO, ONE_FLOAT, SSCALED, SSCALED, SSCALED, SSCALED, 8, 0),
+ VERTEX_BUFFER },
/* USCALED 8 */
[PIPE_FORMAT_R8G8B8A8_USCALED] = { 0,
A_(C0, C1, C2, C3, USCALED, USCALED, USCALED, USCALED, 8_8_8_8, 0),
- VERTEX_BUFFER | SAMPLER_VIEW },
+ VERTEX_BUFFER },
[PIPE_FORMAT_R8G8B8_USCALED] = { 0,
- A_(C0, C1, C2, ONE, USCALED, USCALED, USCALED, USCALED, 8_8_8, 0),
- VERTEX_BUFFER | SAMPLER_VIEW },
+ A_(C0, C1, C2, ONE_FLOAT, USCALED, USCALED, USCALED, USCALED, 8_8_8, 0),
+ VERTEX_BUFFER },
[PIPE_FORMAT_R8G8_USCALED] = { 0,
- A_(C0, C1, ZERO, ONE, USCALED, USCALED, USCALED, USCALED, 8_8, 0),
- VERTEX_BUFFER | SAMPLER_VIEW },
+ A_(C0, C1, ZERO, ONE_FLOAT, USCALED, USCALED, USCALED, USCALED, 8_8, 0),
+ VERTEX_BUFFER },
[PIPE_FORMAT_R8_USCALED] = { 0,
- A_(C0, ZERO, ZERO, ONE, USCALED, USCALED, USCALED, USCALED, 8, 0),
- VERTEX_BUFFER | SAMPLER_VIEW },
+ A_(C0, ZERO, ZERO, ONE_FLOAT, USCALED, USCALED, USCALED, USCALED, 8, 0),
+ VERTEX_BUFFER },
};
diff --git a/src/gallium/drivers/nv50/nv50_miptree.c b/src/gallium/drivers/nv50/nv50_miptree.c
index 309b6503ca5..9eeca05ada3 100644
--- a/src/gallium/drivers/nv50/nv50_miptree.c
+++ b/src/gallium/drivers/nv50/nv50_miptree.c
@@ -29,300 +29,284 @@
#include "nv50_resource.h"
#include "nv50_transfer.h"
-/* The restrictions in tile mode selection probably aren't necessary. */
static INLINE uint32_t
-get_tile_mode(unsigned ny, unsigned d)
+get_tile_dims(unsigned nx, unsigned ny, unsigned nz)
{
- uint32_t tile_mode = 0x00;
-
- if (ny > 32) tile_mode = 0x04; /* height 64 tiles */
- else
- if (ny > 16) tile_mode = 0x03; /* height 32 tiles */
- else
- if (ny > 8) tile_mode = 0x02; /* height 16 tiles */
- else
- if (ny > 4) tile_mode = 0x01; /* height 8 tiles */
-
- if (d == 1)
- return tile_mode;
- else
- if (tile_mode > 0x02)
- tile_mode = 0x02;
-
- if (d > 16 && tile_mode < 0x02)
- return tile_mode | 0x50; /* depth 32 tiles */
- if (d > 8) return tile_mode | 0x40; /* depth 16 tiles */
- if (d > 4) return tile_mode | 0x30; /* depth 8 tiles */
- if (d > 2) return tile_mode | 0x20; /* depth 4 tiles */
-
- return tile_mode | 0x10;
+ uint32_t tile_mode = 0x00;
+
+ if (ny > 32) tile_mode = 0x04; /* height 128 tiles */
+ else
+ if (ny > 16) tile_mode = 0x03; /* height 64 tiles */
+ else
+ if (ny > 8) tile_mode = 0x02; /* height 32 tiles */
+ else
+ if (ny > 4) tile_mode = 0x01; /* height 16 tiles */
+
+ if (nz == 1)
+ return tile_mode;
+ else
+ if (tile_mode > 0x02)
+ tile_mode = 0x02;
+
+ if (nz > 16 && tile_mode < 0x02)
+ return tile_mode | 0x50; /* depth 32 tiles */
+ if (nz > 8) return tile_mode | 0x40; /* depth 16 tiles */
+ if (nz > 4) return tile_mode | 0x30; /* depth 8 tiles */
+ if (nz > 2) return tile_mode | 0x20; /* depth 4 tiles */
+
+ return tile_mode | 0x10;
}
static INLINE unsigned
-get_zslice_offset(unsigned tile_mode, unsigned z, unsigned pitch, unsigned nb_h)
+calc_zslice_offset(uint32_t tile_mode, unsigned z, unsigned pitch, unsigned nbh)
{
- unsigned tile_h = get_tile_height(tile_mode);
- unsigned tile_d = get_tile_depth(tile_mode);
+ unsigned tile_h = NV50_TILE_HEIGHT(tile_mode);
+ unsigned tile_d_shift = NV50_TILE_DIM_SHIFT(tile_mode, 1);
+ unsigned tile_d = 1 << tile_d_shift;
- /* pitch_2d == to next slice within this volume-tile */
- /* pitch_3d == size (in bytes) of a volume-tile */
- unsigned pitch_2d = tile_h * 64;
- unsigned pitch_3d = tile_d * align(nb_h, tile_h) * pitch;
+ /* stride_2d == to next slice within this volume tile */
+ /* stride_3d == size (in bytes) of a volume tile */
+ unsigned stride_2d = tile_h * NV50_TILE_PITCH(tile_mode);
+ unsigned stride_3d = tile_d * align(nbh, tile_h) * pitch;
- return (z % tile_d) * pitch_2d + (z / tile_d) * pitch_3d;
+ return (z & (tile_d - 1)) * stride_2d + (z >> tile_d_shift) * stride_3d;
}
-
-
-
static void
-nv50_miptree_destroy(struct pipe_screen *pscreen,
- struct pipe_resource *pt)
+nv50_miptree_destroy(struct pipe_screen *pscreen, struct pipe_resource *pt)
{
- struct nv50_miptree *mt = nv50_miptree(pt);
- unsigned l;
+ struct nv50_miptree *mt = nv50_miptree(pt);
- for (l = 0; l <= pt->last_level; ++l)
- FREE(mt->level[l].image_offset);
+ nouveau_screen_bo_release(pscreen, mt->base.bo);
- nouveau_screen_bo_release(pscreen, mt->base.bo);
- FREE(mt);
+ FREE(mt);
}
static boolean
nv50_miptree_get_handle(struct pipe_screen *pscreen,
- struct pipe_resource *pt,
- struct winsys_handle *whandle)
+ struct pipe_resource *pt,
+ struct winsys_handle *whandle)
{
- struct nv50_miptree *mt = nv50_miptree(pt);
- unsigned stride;
+ struct nv50_miptree *mt = nv50_miptree(pt);
+ unsigned stride;
+ if (!mt || !mt->base.bo)
+ return FALSE;
- if (!mt || !mt->base.bo)
- return FALSE;
+ stride = util_format_get_stride(mt->base.base.format,
+ mt->base.base.width0);
- stride = util_format_get_stride(mt->base.base.format,
- mt->base.base.width0);
-
- return nouveau_screen_bo_get_handle(pscreen,
- mt->base.bo,
- stride,
- whandle);
+ return nouveau_screen_bo_get_handle(pscreen,
+ mt->base.bo,
+ stride,
+ whandle);
}
-
const struct u_resource_vtbl nv50_miptree_vtbl =
{
- nv50_miptree_get_handle, /* get_handle */
- nv50_miptree_destroy, /* resource_destroy */
- NULL, /* is_resource_referenced */
- nv50_miptree_transfer_new, /* get_transfer */
- nv50_miptree_transfer_del, /* transfer_destroy */
+ nv50_miptree_get_handle, /* get_handle */
+ nv50_miptree_destroy, /* resource_destroy */
+ nv50_miptree_transfer_new, /* get_transfer */
+ nv50_miptree_transfer_del, /* transfer_destroy */
nv50_miptree_transfer_map, /* transfer_map */
- u_default_transfer_flush_region, /* transfer_flush_region */
- nv50_miptree_transfer_unmap, /* transfer_unmap */
- u_default_transfer_inline_write /* transfer_inline_write */
+ u_default_transfer_flush_region, /* transfer_flush_region */
+ nv50_miptree_transfer_unmap, /* transfer_unmap */
+ u_default_transfer_inline_write /* transfer_inline_write */
};
-
-
struct pipe_resource *
-nv50_miptree_create(struct pipe_screen *pscreen, const struct pipe_resource *tmp)
+nv50_miptree_create(struct pipe_screen *pscreen,
+ const struct pipe_resource *templ)
{
- struct nouveau_device *dev = nouveau_screen(pscreen)->device;
- struct nv50_miptree *mt = CALLOC_STRUCT(nv50_miptree);
- struct pipe_resource *pt = &mt->base.base;
- unsigned width = tmp->width0, height = tmp->height0;
- unsigned depth = tmp->depth0, image_alignment;
- uint32_t tile_flags;
- int ret, i, l;
-
- if (!mt)
- return NULL;
-
- *pt = *tmp;
- mt->base.vtbl = &nv50_miptree_vtbl;
- pipe_reference_init(&pt->reference, 1);
- pt->screen = pscreen;
-
- switch (pt->format) {
- case PIPE_FORMAT_Z32_FLOAT:
- tile_flags = 0x4800;
- break;
- case PIPE_FORMAT_S8_USCALED_Z24_UNORM:
- tile_flags = 0x1800;
- break;
- case PIPE_FORMAT_Z16_UNORM:
- tile_flags = 0x6c00;
- break;
- case PIPE_FORMAT_Z24X8_UNORM:
- case PIPE_FORMAT_Z24_UNORM_S8_USCALED:
- tile_flags = 0x2800;
- break;
- case PIPE_FORMAT_Z32_FLOAT_S8X24_USCALED:
- tile_flags = 0xe000;
- break;
- case PIPE_FORMAT_R32G32B32A32_FLOAT:
- case PIPE_FORMAT_R32G32B32_FLOAT:
- tile_flags = 0x7400;
- break;
- default:
- if ((pt->bind & PIPE_BIND_SCANOUT) &&
- util_format_get_blocksizebits(pt->format) == 32)
- tile_flags = 0x7a00;
- else
- tile_flags = 0x7000;
- break;
- }
-
- /* XXX: texture arrays */
- mt->image_nr = (pt->target == PIPE_TEXTURE_CUBE) ? 6 : 1;
-
- for (l = 0; l <= pt->last_level; l++) {
- struct nv50_miptree_level *lvl = &mt->level[l];
- unsigned nblocksy = util_format_get_nblocksy(pt->format, height);
-
- lvl->image_offset = CALLOC(mt->image_nr, sizeof(int));
- lvl->pitch = align(util_format_get_stride(pt->format, width), 64);
- lvl->tile_mode = get_tile_mode(nblocksy, depth);
-
- width = u_minify(width, 1);
- height = u_minify(height, 1);
- depth = u_minify(depth, 1);
- }
-
- image_alignment = get_tile_height(mt->level[0].tile_mode) * 64;
- image_alignment *= get_tile_depth(mt->level[0].tile_mode);
-
- /* NOTE the distinction between arrays of mip-mapped 2D textures and
- * mip-mapped 3D textures. We can't use image_nr == depth for 3D mip.
- */
- for (i = 0; i < mt->image_nr; i++) {
- for (l = 0; l <= pt->last_level; l++) {
- struct nv50_miptree_level *lvl = &mt->level[l];
- int size;
- unsigned tile_h = get_tile_height(lvl->tile_mode);
- unsigned tile_d = get_tile_depth(lvl->tile_mode);
-
- size = lvl->pitch;
- size *= align(util_format_get_nblocksy(pt->format, u_minify(pt->height0, l)), tile_h);
- size *= align(u_minify(pt->depth0, l), tile_d);
-
- lvl->image_offset[i] = mt->total_size;
-
- mt->total_size += size;
- }
- mt->total_size = align(mt->total_size, image_alignment);
- }
-
- ret = nouveau_bo_new_tile(dev, NOUVEAU_BO_VRAM, 256, mt->total_size,
- mt->level[0].tile_mode, tile_flags,
- &mt->base.bo);
- if (ret) {
- for (l = 0; l <= pt->last_level; ++l)
- FREE(mt->level[l].image_offset);
- FREE(mt);
- return NULL;
- }
-
- return pt;
+ struct nouveau_device *dev = nouveau_screen(pscreen)->device;
+ struct nv50_miptree *mt = CALLOC_STRUCT(nv50_miptree);
+ struct pipe_resource *pt = &mt->base.base;
+ int ret;
+ unsigned w, h, d, l, alloc_size;
+ uint32_t tile_flags;
+
+ if (!mt)
+ return NULL;
+
+ mt->base.vtbl = &nv50_miptree_vtbl;
+ *pt = *templ;
+ pipe_reference_init(&pt->reference, 1);
+ pt->screen = pscreen;
+
+ mt->layout_3d = pt->target == PIPE_TEXTURE_3D;
+
+ w = pt->width0;
+ h = pt->height0;
+ d = mt->layout_3d ? pt->depth0 : 1;
+
+ switch (pt->format) {
+ case PIPE_FORMAT_Z16_UNORM:
+ tile_flags = 0x6c00;
+ break;
+ case PIPE_FORMAT_S8_USCALED_Z24_UNORM:
+ tile_flags = 0x1800;
+ break;
+ case PIPE_FORMAT_Z24X8_UNORM:
+ case PIPE_FORMAT_Z24_UNORM_S8_USCALED:
+ tile_flags = 0x2800;
+ break;
+ case PIPE_FORMAT_R32G32B32A32_FLOAT:
+ case PIPE_FORMAT_R32G32B32_FLOAT:
+ tile_flags = 0x7400;
+ break;
+ case PIPE_FORMAT_Z32_FLOAT_S8X24_USCALED:
+ tile_flags = 0x6000;
+ break;
+ default:
+ if ((pt->bind & PIPE_BIND_SCANOUT) &&
+ util_format_get_blocksizebits(pt->format) == 32)
+ tile_flags = 0x7a00;
+ else
+ tile_flags = 0x7000;
+ break;
+ }
+
+ /* For 3D textures, a mipmap is spanned by all the layers, for array
+ * textures and cube maps, each layer contains its own mipmaps.
+ */
+ for (l = 0; l <= pt->last_level; ++l) {
+ struct nv50_miptree_level *lvl = &mt->level[l];
+ unsigned nbx = util_format_get_nblocksx(pt->format, w);
+ unsigned nby = util_format_get_nblocksy(pt->format, h);
+ unsigned blocksize = util_format_get_blocksize(pt->format);
+
+ lvl->offset = mt->total_size;
+ lvl->tile_mode = get_tile_dims(nbx, nby, d);
+ lvl->pitch = align(nbx * blocksize, NV50_TILE_PITCH(lvl->tile_mode));
+
+ mt->total_size += lvl->pitch *
+ align(nby, NV50_TILE_HEIGHT(lvl->tile_mode)) *
+ align(d, NV50_TILE_DEPTH(lvl->tile_mode));
+
+ w = u_minify(w, 1);
+ h = u_minify(h, 1);
+ d = u_minify(d, 1);
+ }
+
+ if (pt->array_size > 1) {
+ mt->layer_stride = align(mt->total_size,
+ NV50_TILE_SIZE(mt->level[0].tile_mode));
+ mt->total_size = mt->layer_stride * pt->array_size;
+ }
+
+ alloc_size = mt->total_size;
+
+ ret = nouveau_bo_new_tile(dev, NOUVEAU_BO_VRAM, 256, alloc_size,
+ mt->level[0].tile_mode, tile_flags,
+ &mt->base.bo);
+ if (ret) {
+ FREE(mt);
+ return NULL;
+ }
+ mt->base.domain = NOUVEAU_BO_VRAM;
+
+ return pt;
}
-
struct pipe_resource *
nv50_miptree_from_handle(struct pipe_screen *pscreen,
- const struct pipe_resource *template,
- struct winsys_handle *whandle)
+ const struct pipe_resource *templ,
+ struct winsys_handle *whandle)
{
- struct nv50_miptree *mt;
- unsigned stride;
-
- /* Only supports 2D, non-mipmapped textures for the moment */
- if ((template->target != PIPE_TEXTURE_2D &&
- template->target != PIPE_TEXTURE_RECT) ||
- template->last_level != 0 ||
- template->depth0 != 1)
- return NULL;
-
- mt = CALLOC_STRUCT(nv50_miptree);
- if (!mt)
- return NULL;
-
- mt->base.bo = nouveau_screen_bo_from_handle(pscreen, whandle, &stride);
- if (mt->base.bo == NULL) {
- FREE(mt);
- return NULL;
- }
-
-
- mt->base.base = *template;
- mt->base.vtbl = &nv50_miptree_vtbl;
- pipe_reference_init(&mt->base.base.reference, 1);
- mt->base.base.screen = pscreen;
- mt->image_nr = 1;
- mt->level[0].pitch = stride;
- mt->level[0].image_offset = CALLOC(1, sizeof(unsigned));
- mt->level[0].tile_mode = mt->base.bo->tile_mode;
-
- /* XXX: Need to adjust bo refcount??
- */
- /* nouveau_bo_ref(bo, &mt->base.bo); */
- return &mt->base.base;
+ struct nv50_miptree *mt;
+ unsigned stride;
+
+ /* only supports 2D, non-mipmapped textures for the moment */
+ if ((templ->target != PIPE_TEXTURE_2D &&
+ templ->target != PIPE_TEXTURE_RECT) ||
+ templ->last_level != 0 ||
+ templ->depth0 != 1 ||
+ templ->array_size > 1)
+ return NULL;
+
+ mt = CALLOC_STRUCT(nv50_miptree);
+ if (!mt)
+ return NULL;
+
+ mt->base.bo = nouveau_screen_bo_from_handle(pscreen, whandle, &stride);
+ if (mt->base.bo == NULL) {
+ FREE(mt);
+ return NULL;
+ }
+
+ mt->base.base = *templ;
+ mt->base.vtbl = &nv50_miptree_vtbl;
+ pipe_reference_init(&mt->base.base.reference, 1);
+ mt->base.base.screen = pscreen;
+ mt->level[0].pitch = stride;
+ mt->level[0].offset = 0;
+ mt->level[0].tile_mode = mt->base.bo->tile_mode;
+
+ /* no need to adjust bo reference count */
+ return &mt->base.base;
}
-
-/* Surface functions
+/* Surface functions.
*/
struct pipe_surface *
-nv50_miptree_surface_new(struct pipe_context *pipe, struct pipe_resource *pt,
- const struct pipe_surface *surf_tmpl)
+nv50_miptree_surface_new(struct pipe_context *pipe,
+ struct pipe_resource *pt,
+ const struct pipe_surface *templ)
{
- unsigned level = surf_tmpl->u.tex.level;
- struct nv50_miptree *mt = nv50_miptree(pt);
- struct nv50_miptree_level *lvl = &mt->level[level];
- struct nv50_surface *ns;
- unsigned img = 0, zslice = 0;
-
- assert(surf_tmpl->u.tex.first_layer == surf_tmpl->u.tex.last_layer);
-
- /* XXX can't unify these here? */
- if (pt->target == PIPE_TEXTURE_CUBE)
- img = surf_tmpl->u.tex.first_layer;
- else if (pt->target == PIPE_TEXTURE_3D)
- zslice = surf_tmpl->u.tex.first_layer;
-
- ns = CALLOC_STRUCT(nv50_surface);
- if (!ns)
- return NULL;
- pipe_resource_reference(&ns->base.texture, pt);
- ns->base.context = pipe;
- ns->base.format = pt->format;
- ns->base.width = u_minify(pt->width0, level);
- ns->base.height = u_minify(pt->height0, level);
- ns->base.usage = surf_tmpl->usage;
- pipe_reference_init(&ns->base.reference, 1);
- ns->base.u.tex.level = level;
- ns->base.u.tex.first_layer = surf_tmpl->u.tex.first_layer;
- ns->base.u.tex.last_layer = surf_tmpl->u.tex.last_layer;
- ns->offset = lvl->image_offset[img];
-
- if (pt->target == PIPE_TEXTURE_3D) {
- unsigned nb_h = util_format_get_nblocksy(pt->format, ns->base.height);
- ns->offset += get_zslice_offset(lvl->tile_mode, zslice,
- lvl->pitch, nb_h);
- }
-
- return &ns->base;
+ struct nv50_miptree *mt = nv50_miptree(pt); /* guaranteed */
+ struct nv50_surface *ns;
+ struct pipe_surface *ps;
+ struct nv50_miptree_level *lvl = &mt->level[templ->u.tex.level];
+
+ ns = CALLOC_STRUCT(nv50_surface);
+ if (!ns)
+ return NULL;
+ ps = &ns->base;
+
+ pipe_reference_init(&ps->reference, 1);
+ pipe_resource_reference(&ps->texture, pt);
+ ps->context = pipe;
+ ps->format = templ->format;
+ ps->usage = templ->usage;
+ ps->u.tex.level = templ->u.tex.level;
+ ps->u.tex.first_layer = templ->u.tex.first_layer;
+ ps->u.tex.last_layer = templ->u.tex.last_layer;
+
+ ns->width = u_minify(pt->width0, ps->u.tex.level);
+ ns->height = u_minify(pt->height0, ps->u.tex.level);
+ ns->depth = ps->u.tex.last_layer - ps->u.tex.first_layer + 1;
+ ns->offset = lvl->offset;
+
+ /* comment says there are going to be removed, but they're used by the st */
+ ps->width = ns->width;
+ ps->height = ns->height;
+
+ if (mt->layout_3d) {
+ unsigned zslice = ps->u.tex.first_layer;
+
+ /* TODO: re-layout the texture to use only depth 1 tiles in this case: */
+ if (ns->depth > 1 && (zslice & (NV50_TILE_DEPTH(lvl->tile_mode) - 1)))
+ NOUVEAU_ERR("Creating unsupported 3D surface of slices [%u:%u].\n",
+ zslice, ps->u.tex.last_layer);
+
+ ns->offset += calc_zslice_offset(lvl->tile_mode, zslice, lvl->pitch,
+ util_format_get_nblocksy(pt->format,
+ ns->height));
+ } else {
+ ns->offset += mt->layer_stride * ps->u.tex.first_layer;
+ }
+
+ return ps;
}
void
-nv50_miptree_surface_del(struct pipe_context *pipe,
- struct pipe_surface *ps)
+nv50_miptree_surface_del(struct pipe_context *pipe, struct pipe_surface *ps)
{
- struct nv50_surface *s = nv50_surface(ps);
+ struct nv50_surface *s = nv50_surface(ps);
+
+ pipe_resource_reference(&ps->texture, NULL);
- pipe_resource_reference(&s->base.texture, NULL);
- FREE(s);
+ FREE(s);
}
diff --git a/src/gallium/drivers/nv50/nv50_pc.c b/src/gallium/drivers/nv50/nv50_pc.c
index c88e7ba742e..82f1b846527 100644
--- a/src/gallium/drivers/nv50/nv50_pc.c
+++ b/src/gallium/drivers/nv50/nv50_pc.c
@@ -307,7 +307,10 @@ nv_pc_pass_in_order(struct nv_basic_block *root, nv_pc_pass_func f, void *priv)
bb[p++] = b->out[j];
break;
case CFG_EDGE_LOOP_LEAVE:
- bbb[pp++] = b->out[j];
+ if (!b->out[j]->priv) {
+ bbb[pp++] = b->out[j];
+ b->out[j]->priv = 1;
+ }
break;
default:
assert(0);
diff --git a/src/gallium/drivers/nv50/nv50_pc.h b/src/gallium/drivers/nv50/nv50_pc.h
index 2ead80430b0..e6f3815bafe 100644
--- a/src/gallium/drivers/nv50/nv50_pc.h
+++ b/src/gallium/drivers/nv50/nv50_pc.h
@@ -23,6 +23,8 @@
#ifndef __NV50_COMPILER_H__
#define __NV50_COMPILER_H__
+#define NV50PC_DEBUG
+
#ifdef NV50PC_DEBUG
# define NV50_DBGMSG(args...) debug_printf(args)
#else
diff --git a/src/gallium/drivers/nv50/nv50_pc_emit.c b/src/gallium/drivers/nv50/nv50_pc_emit.c
index f37dc51e6aa..252c58dd8ff 100644
--- a/src/gallium/drivers/nv50/nv50_pc_emit.c
+++ b/src/gallium/drivers/nv50/nv50_pc_emit.c
@@ -762,7 +762,8 @@ emit_flow(struct nv_pc *pc, struct nv_instruction *i, ubyte flow_op)
new_fixup(pc, NV50_FIXUP_CODE_RELOC, 0, pos, 0xffff << 11, 9);
new_fixup(pc, NV50_FIXUP_CODE_RELOC, 1, pos, 0x3f << 14, -4);
- pc->emit[0] |= (pos / 4) << 11;
+ pc->emit[0] |= ((pos >> 2) & 0xffff) << 11;
+ pc->emit[1] |= ((pos >> 18) & 0x003f) << 14;
}
}
diff --git a/src/gallium/drivers/nv50/nv50_pc_optimize.c b/src/gallium/drivers/nv50/nv50_pc_optimize.c
index 27eb3817bf1..281ccf7ac61 100644
--- a/src/gallium/drivers/nv50/nv50_pc_optimize.c
+++ b/src/gallium/drivers/nv50/nv50_pc_optimize.c
@@ -145,8 +145,9 @@ nv_pc_pass_pre_emission(void *priv, struct nv_basic_block *b)
int j;
uint size, n32 = 0;
+ /* find first non-empty block emitted before b */
for (j = pc->num_blocks - 1; j >= 0 && !pc->bb_list[j]->bin_size; --j);
- if (j >= 0) {
+ for (; j >= 0; --j) {
in = pc->bb_list[j];
/* check for no-op branches (BRA $PC+8) */
@@ -160,6 +161,9 @@ nv_pc_pass_pre_emission(void *priv, struct nv_basic_block *b)
nv_nvi_delete(in->exit);
}
b->bin_pos = in->bin_pos + in->bin_size;
+
+ if (in->bin_size) /* no more no-op branches to b */
+ break;
}
pc->bb_list[pc->num_blocks++] = b;
@@ -299,7 +303,7 @@ check_swap_src_0_1(struct nv_instruction *nvi)
}
if (nvi->opcode == NV_OP_SET && nvi->src[0] != src0)
- nvi->set_cond = cc_swapped[nvi->set_cond];
+ nvi->set_cond = (nvi->set_cond & ~7) | cc_swapped[nvi->set_cond & 7];
}
static int
diff --git a/src/gallium/drivers/nv50/nv50_program.c b/src/gallium/drivers/nv50/nv50_program.c
index db681764910..a63f9d8a6d5 100644
--- a/src/gallium/drivers/nv50/nv50_program.c
+++ b/src/gallium/drivers/nv50/nv50_program.c
@@ -328,10 +328,15 @@ prog_decl(struct nv50_translation_info *ti,
}
break;
case TGSI_FILE_SYSTEM_VALUE:
+ /* For VP/GP inputs, they are put in s[] after the last normal input.
+ * Let sysval_map reflect the order of the sysvals in s[] and fixup later.
+ */
switch (decl->Semantic.Name) {
case TGSI_SEMANTIC_FACE:
break;
case TGSI_SEMANTIC_INSTANCEID:
+ ti->p->vp.attrs[2] |= NV50_3D_VP_GP_BUILTIN_ATTR_EN_INSTANCE_ID;
+ ti->sysval_map[first] = 2;
break;
case TGSI_SEMANTIC_PRIMID:
break;
@@ -392,6 +397,18 @@ nv50_vertprog_prepare(struct nv50_translation_info *ti)
}
}
+ for (i = 0; i < TGSI_SEMANTIC_COUNT; ++i) {
+ switch (ti->sysval_map[i]) {
+ case 2:
+ if (!(ti->p->vp.attrs[2] & NV50_3D_VP_GP_BUILTIN_ATTR_EN_VERTEX_ID))
+ ti->sysval_map[i] = 1;
+ ti->sysval_map[i] = (ti->sysval_map[i] - 1) + num_inputs;
+ break;
+ default:
+ break;
+ }
+ }
+
if (p->vp.psiz < 0x40)
p->vp.psiz = p->out[p->vp.psiz].hw;
@@ -411,11 +428,11 @@ nv50_fragprog_prepare(struct nv50_translation_info *ti)
if (ti->scan.writes_z) {
p->fp.flags[1] = 0x11;
- p->fp.flags[0] |= NV50TCL_FP_CONTROL_EXPORTS_Z;
+ p->fp.flags[0] |= NV50_3D_FP_CONTROL_EXPORTS_Z;
}
if (ti->scan.uses_kill)
- p->fp.flags[0] |= NV50TCL_FP_CONTROL_USES_KIL;
+ p->fp.flags[0] |= NV50_3D_FP_CONTROL_USES_KIL;
/* FP inputs */
@@ -490,13 +507,13 @@ nv50_fragprog_prepare(struct nv50_translation_info *ti)
if (n < m)
nvary -= p->in[n].hw;
- p->fp.interp |= nvary << NV50TCL_FP_INTERPOLANT_CTRL_COUNT_NONFLAT_SHIFT;
- p->fp.interp |= nintp << NV50TCL_FP_INTERPOLANT_CTRL_COUNT_SHIFT;
+ p->fp.interp |= nvary << NV50_3D_FP_INTERPOLANT_CTRL_COUNT_NONFLAT__SHIFT;
+ p->fp.interp |= nintp << NV50_3D_FP_INTERPOLANT_CTRL_COUNT__SHIFT;
/* FP outputs */
if (p->out_nr > (1 + (ti->scan.writes_z ? 1 : 0)))
- p->fp.flags[0] |= NV50TCL_FP_CONTROL_MULTIPLE_RESULTS;
+ p->fp.flags[0] |= NV50_3D_FP_CONTROL_MULTIPLE_RESULTS;
depr = p->out_nr;
for (i = 0; i < p->out_nr; ++i) {
@@ -608,7 +625,7 @@ nv50_prog_scan(struct nv50_translation_info *ti)
}
boolean
-nv50_program_tx(struct nv50_program *p)
+nv50_program_translate(struct nv50_program *p)
{
struct nv50_translation_info *ti;
int ret;
@@ -646,9 +663,8 @@ out:
void
nv50_program_destroy(struct nv50_context *nv50, struct nv50_program *p)
{
- nouveau_bo_ref(NULL, &p->bo);
-
- so_ref(NULL, &p->so);
+ if (p->res)
+ nouveau_resource_free(&p->res);
if (p->code)
FREE(p->code);
diff --git a/src/gallium/drivers/nv50/nv50_program.h b/src/gallium/drivers/nv50/nv50_program.h
index 33c4c8ca6df..993e1691ab7 100644
--- a/src/gallium/drivers/nv50/nv50_program.h
+++ b/src/gallium/drivers/nv50/nv50_program.h
@@ -47,12 +47,9 @@ struct nv50_program {
boolean translated;
boolean uses_lmem;
- struct nouveau_bo *bo;
- struct nouveau_stateobj *so;
-
uint32_t *code;
unsigned code_size;
- unsigned code_start; /* offset inside bo */
+ unsigned code_base;
uint32_t *immd;
unsigned immd_size;
unsigned parm_size; /* size limit of uniform buffer */
@@ -89,6 +86,8 @@ struct nv50_program {
/* relocation records */
void *fixups;
unsigned num_fixups;
+
+ struct nouveau_resource *res;
};
#define NV50_INTERP_LINEAR (1 << 0)
@@ -112,6 +111,7 @@ struct nv50_translation_info {
ubyte output_file;
ubyte input_map[PIPE_MAX_SHADER_INPUTS][4];
ubyte output_map[PIPE_MAX_SHADER_OUTPUTS][4];
+ ubyte sysval_map[TGSI_SEMANTIC_COUNT];
ubyte interp_mode[PIPE_MAX_SHADER_INPUTS];
int input_access[PIPE_MAX_SHADER_INPUTS][4];
int output_access[PIPE_MAX_SHADER_OUTPUTS][4];
diff --git a/src/gallium/drivers/nv50/nv50_push.c b/src/gallium/drivers/nv50/nv50_push.c
index 380f69406a2..e8ad1ddd38a 100644
--- a/src/gallium/drivers/nv50/nv50_push.c
+++ b/src/gallium/drivers/nv50/nv50_push.c
@@ -1,362 +1,297 @@
+
#include "pipe/p_context.h"
#include "pipe/p_state.h"
#include "util/u_inlines.h"
#include "util/u_format.h"
-#include "util/u_split_prim.h"
+#include "translate/translate.h"
#include "nv50_context.h"
#include "nv50_resource.h"
-struct push_context {
- struct nv50_context *nv50;
+#include "nv50_3d.xml.h"
- unsigned vtx_size;
+struct push_context {
+ struct nouveau_channel *chan;
void *idxbuf;
- int32_t idxbias;
- unsigned idxsize;
float edgeflag;
int edgeflag_attr;
- struct {
- void *map;
- unsigned stride;
- unsigned divisor;
- unsigned step;
- void (*push)(struct nouveau_channel *, void *);
- } attr[16];
- unsigned attr_nr;
+ uint32_t vertex_words;
+ uint32_t packet_vertex_limit;
+
+ struct translate *translate;
+
+ boolean primitive_restart;
+ uint32_t prim;
+ uint32_t restart_index;
+ uint32_t instance_id;
};
-static void
-emit_b32_1(struct nouveau_channel *chan, void *data)
+static INLINE unsigned
+prim_restart_search_i08(uint8_t *elts, unsigned push, uint8_t index)
{
- uint32_t *v = data;
-
- OUT_RING(chan, v[0]);
+ unsigned i;
+ for (i = 0; i < push; ++i)
+ if (elts[i] == index)
+ break;
+ return i;
}
-static void
-emit_b32_2(struct nouveau_channel *chan, void *data)
+static INLINE unsigned
+prim_restart_search_i16(uint16_t *elts, unsigned push, uint16_t index)
{
- uint32_t *v = data;
-
- OUT_RING(chan, v[0]);
- OUT_RING(chan, v[1]);
+ unsigned i;
+ for (i = 0; i < push; ++i)
+ if (elts[i] == index)
+ break;
+ return i;
}
-static void
-emit_b32_3(struct nouveau_channel *chan, void *data)
+static INLINE unsigned
+prim_restart_search_i32(uint32_t *elts, unsigned push, uint32_t index)
{
- uint32_t *v = data;
-
- OUT_RING(chan, v[0]);
- OUT_RING(chan, v[1]);
- OUT_RING(chan, v[2]);
+ unsigned i;
+ for (i = 0; i < push; ++i)
+ if (elts[i] == index)
+ break;
+ return i;
}
static void
-emit_b32_4(struct nouveau_channel *chan, void *data)
+emit_vertices_i08(struct push_context *ctx, unsigned start, unsigned count)
{
- uint32_t *v = data;
+ uint8_t *elts = (uint8_t *)ctx->idxbuf + start;
- OUT_RING(chan, v[0]);
- OUT_RING(chan, v[1]);
- OUT_RING(chan, v[2]);
- OUT_RING(chan, v[3]);
-}
+ while (count) {
+ unsigned push = MIN2(count, ctx->packet_vertex_limit);
+ unsigned size, nr;
-static void
-emit_b16_1(struct nouveau_channel *chan, void *data)
-{
- uint16_t *v = data;
+ nr = push;
+ if (ctx->primitive_restart)
+ nr = prim_restart_search_i08(elts, push, ctx->restart_index);
- OUT_RING(chan, v[0]);
-}
+ size = ctx->vertex_words * nr;
-static void
-emit_b16_3(struct nouveau_channel *chan, void *data)
-{
- uint16_t *v = data;
+ BEGIN_RING_NI(ctx->chan, RING_3D(VERTEX_DATA), size);
- OUT_RING(chan, (v[1] << 16) | v[0]);
- OUT_RING(chan, v[2]);
-}
+ ctx->translate->run_elts8(ctx->translate, elts, nr, ctx->instance_id,
+ ctx->chan->cur);
-static void
-emit_b08_1(struct nouveau_channel *chan, void *data)
-{
- uint8_t *v = data;
+ ctx->chan->cur += size;
+ count -= nr;
+ elts += nr;
- OUT_RING(chan, v[0]);
+ if (nr != push) {
+ count--;
+ elts++;
+ BEGIN_RING(ctx->chan, RING_3D(VB_ELEMENT_U32), 1);
+ OUT_RING (ctx->chan, ctx->restart_index);
+ }
+ }
}
static void
-emit_b08_3(struct nouveau_channel *chan, void *data)
+emit_vertices_i16(struct push_context *ctx, unsigned start, unsigned count)
{
- uint8_t *v = data;
+ uint16_t *elts = (uint16_t *)ctx->idxbuf + start;
- OUT_RING(chan, (v[2] << 16) | (v[1] << 8) | v[0]);
-}
+ while (count) {
+ unsigned push = MIN2(count, ctx->packet_vertex_limit);
+ unsigned size, nr;
-static INLINE void
-emit_vertex(struct push_context *ctx, unsigned n)
-{
- struct nouveau_grobj *tesla = ctx->nv50->screen->tesla;
- struct nouveau_channel *chan = tesla->channel;
- int i;
-
- if (ctx->edgeflag_attr < 16) {
- float *edgeflag = (float *)
- ((uint8_t *)ctx->attr[ctx->edgeflag_attr].map +
- ctx->attr[ctx->edgeflag_attr].stride * n);
-
- if (*edgeflag != ctx->edgeflag) {
- BEGIN_RING(chan, tesla, NV50TCL_EDGEFLAG_ENABLE, 1);
- OUT_RING (chan, *edgeflag ? 1 : 0);
- ctx->edgeflag = *edgeflag;
- }
- }
+ nr = push;
+ if (ctx->primitive_restart)
+ nr = prim_restart_search_i16(elts, push, ctx->restart_index);
- BEGIN_RING_NI(chan, tesla, NV50TCL_VERTEX_DATA, ctx->vtx_size);
- for (i = 0; i < ctx->attr_nr; i++)
- ctx->attr[i].push(chan,
- (uint8_t *)ctx->attr[i].map + ctx->attr[i].stride * n);
-}
+ size = ctx->vertex_words * nr;
-static void
-emit_edgeflag(void *priv, boolean enabled)
-{
- struct push_context *ctx = priv;
- struct nouveau_grobj *tesla = ctx->nv50->screen->tesla;
- struct nouveau_channel *chan = tesla->channel;
+ BEGIN_RING_NI(ctx->chan, RING_3D(VERTEX_DATA), size);
- BEGIN_RING(chan, tesla, NV50TCL_EDGEFLAG_ENABLE, 1);
- OUT_RING (chan, enabled ? 1 : 0);
-}
+ ctx->translate->run_elts16(ctx->translate, elts, nr, ctx->instance_id,
+ ctx->chan->cur);
-static void
-emit_elt08(void *priv, unsigned start, unsigned count)
-{
- struct push_context *ctx = priv;
- uint8_t *idxbuf = ctx->idxbuf;
+ ctx->chan->cur += size;
+ count -= nr;
+ elts += nr;
- while (count--)
- emit_vertex(ctx, idxbuf[start++]);
+ if (nr != push) {
+ count--;
+ elts++;
+ BEGIN_RING(ctx->chan, RING_3D(VB_ELEMENT_U32), 1);
+ OUT_RING (ctx->chan, ctx->restart_index);
+ }
+ }
}
static void
-emit_elt08_biased(void *priv, unsigned start, unsigned count)
+emit_vertices_i32(struct push_context *ctx, unsigned start, unsigned count)
{
- struct push_context *ctx = priv;
- uint8_t *idxbuf = ctx->idxbuf;
+ uint32_t *elts = (uint32_t *)ctx->idxbuf + start;
- while (count--)
- emit_vertex(ctx, idxbuf[start++] + ctx->idxbias);
-}
+ while (count) {
+ unsigned push = MIN2(count, ctx->packet_vertex_limit);
+ unsigned size, nr;
-static void
-emit_elt16(void *priv, unsigned start, unsigned count)
-{
- struct push_context *ctx = priv;
- uint16_t *idxbuf = ctx->idxbuf;
+ nr = push;
+ if (ctx->primitive_restart)
+ nr = prim_restart_search_i32(elts, push, ctx->restart_index);
- while (count--)
- emit_vertex(ctx, idxbuf[start++]);
-}
+ size = ctx->vertex_words * nr;
-static void
-emit_elt16_biased(void *priv, unsigned start, unsigned count)
-{
- struct push_context *ctx = priv;
- uint16_t *idxbuf = ctx->idxbuf;
+ BEGIN_RING_NI(ctx->chan, RING_3D(VERTEX_DATA), size);
- while (count--)
- emit_vertex(ctx, idxbuf[start++] + ctx->idxbias);
-}
+ ctx->translate->run_elts(ctx->translate, elts, nr, ctx->instance_id,
+ ctx->chan->cur);
-static void
-emit_elt32(void *priv, unsigned start, unsigned count)
-{
- struct push_context *ctx = priv;
- uint32_t *idxbuf = ctx->idxbuf;
+ ctx->chan->cur += size;
+ count -= nr;
+ elts += nr;
- while (count--)
- emit_vertex(ctx, idxbuf[start++]);
+ if (nr != push) {
+ count--;
+ elts++;
+ BEGIN_RING(ctx->chan, RING_3D(VB_ELEMENT_U32), 1);
+ OUT_RING (ctx->chan, ctx->restart_index);
+ }
+ }
}
static void
-emit_elt32_biased(void *priv, unsigned start, unsigned count)
+emit_vertices_seq(struct push_context *ctx, unsigned start, unsigned count)
{
- struct push_context *ctx = priv;
- uint32_t *idxbuf = ctx->idxbuf;
+ while (count) {
+ unsigned push = MIN2(count, ctx->packet_vertex_limit);
+ unsigned size = ctx->vertex_words * push;
+
+ BEGIN_RING_NI(ctx->chan, RING_3D(VERTEX_DATA), size);
- while (count--)
- emit_vertex(ctx, idxbuf[start++] + ctx->idxbias);
+ ctx->translate->run(ctx->translate, start, push, ctx->instance_id,
+ ctx->chan->cur);
+ ctx->chan->cur += size;
+ count -= push;
+ start += push;
+ }
}
-static void
-emit_verts(void *priv, unsigned start, unsigned count)
+
+#define NV50_PRIM_GL_CASE(n) \
+ case PIPE_PRIM_##n: return NV50_3D_VERTEX_BEGIN_GL_PRIMITIVE_##n
+
+static INLINE unsigned
+nv50_prim_gl(unsigned prim)
{
- while (count--)
- emit_vertex(priv, start++);
+ switch (prim) {
+ NV50_PRIM_GL_CASE(POINTS);
+ NV50_PRIM_GL_CASE(LINES);
+ NV50_PRIM_GL_CASE(LINE_LOOP);
+ NV50_PRIM_GL_CASE(LINE_STRIP);
+ NV50_PRIM_GL_CASE(TRIANGLES);
+ NV50_PRIM_GL_CASE(TRIANGLE_STRIP);
+ NV50_PRIM_GL_CASE(TRIANGLE_FAN);
+ NV50_PRIM_GL_CASE(QUADS);
+ NV50_PRIM_GL_CASE(QUAD_STRIP);
+ NV50_PRIM_GL_CASE(POLYGON);
+ NV50_PRIM_GL_CASE(LINES_ADJACENCY);
+ NV50_PRIM_GL_CASE(LINE_STRIP_ADJACENCY);
+ NV50_PRIM_GL_CASE(TRIANGLES_ADJACENCY);
+ NV50_PRIM_GL_CASE(TRIANGLE_STRIP_ADJACENCY);
+ /*
+ NV50_PRIM_GL_CASE(PATCHES); */
+ default:
+ return NV50_3D_VERTEX_BEGIN_GL_PRIMITIVE_POINTS;
+ break;
+ }
}
void
-nv50_push_elements_instanced(struct pipe_context *pipe,
- struct pipe_resource *idxbuf,
- unsigned idxsize, int idxbias,
- unsigned mode, unsigned start, unsigned count,
- unsigned i_start, unsigned i_count)
+nv50_push_vbo(struct nv50_context *nv50, const struct pipe_draw_info *info)
{
- struct nv50_context *nv50 = nv50_context(pipe);
- struct nouveau_grobj *tesla = nv50->screen->tesla;
- struct nouveau_channel *chan = tesla->channel;
struct push_context ctx;
- const unsigned p_overhead = 4 + /* begin/end */
- 4; /* potential edgeflag enable/disable */
- const unsigned v_overhead = 1 + /* VERTEX_DATA packet header */
- 2; /* potential edgeflag modification */
- struct util_split_prim s;
- unsigned vtx_size;
- boolean nzi = FALSE;
- int i;
-
- ctx.nv50 = nv50;
- ctx.attr_nr = 0;
- ctx.idxbuf = NULL;
- ctx.vtx_size = 0;
- ctx.edgeflag = 0.5f;
- ctx.edgeflag_attr = nv50->vertprog->vp.edgeflag;
-
- /* map vertex buffers, determine vertex size */
- for (i = 0; i < nv50->vtxelt->num_elements; i++) {
- struct pipe_vertex_element *ve = &nv50->vtxelt->pipe[i];
- struct pipe_vertex_buffer *vb = &nv50->vtxbuf[ve->vertex_buffer_index];
- struct nouveau_bo *bo = nv50_resource(vb->buffer)->bo;
- unsigned size, nr_components, n;
-
- if (!(nv50->vbo_fifo & (1 << i)))
- continue;
- n = ctx.attr_nr++;
-
- if (nouveau_bo_map(bo, NOUVEAU_BO_RD)) {
- assert(bo->map);
+ unsigned i, index_size;
+ unsigned inst = info->instance_count;
+ boolean apply_bias = info->indexed && info->index_bias;
+
+ ctx.chan = nv50->screen->base.channel;
+ ctx.translate = nv50->vertex->translate;
+ ctx.packet_vertex_limit = nv50->vertex->packet_vertex_limit;
+ ctx.vertex_words = nv50->vertex->vertex_size;
+
+ for (i = 0; i < nv50->num_vtxbufs; ++i) {
+ uint8_t *data;
+ struct pipe_vertex_buffer *vb = &nv50->vtxbuf[i];
+ struct nv04_resource *res = nv04_resource(vb->buffer);
+
+ data = nouveau_resource_map_offset(&nv50->base, res,
+ vb->buffer_offset, NOUVEAU_BO_RD);
+
+ if (apply_bias && likely(!(nv50->vertex->instance_bufs & (1 << i))))
+ data += info->index_bias * vb->stride;
+
+ ctx.translate->set_buffer(ctx.translate, i, data, vb->stride, ~0);
+ }
+
+ if (info->indexed) {
+ ctx.idxbuf = nouveau_resource_map_offset(&nv50->base,
+ nv04_resource(nv50->idxbuf.buffer),
+ nv50->idxbuf.offset, NOUVEAU_BO_RD);
+ if (!ctx.idxbuf)
return;
- }
- ctx.attr[n].map = (uint8_t *)bo->map + vb->buffer_offset + ve->src_offset;
- nouveau_bo_unmap(bo);
-
- ctx.attr[n].stride = vb->stride;
- ctx.attr[n].divisor = ve->instance_divisor;
- if (ctx.attr[n].divisor) {
- ctx.attr[n].step = i_start % ve->instance_divisor;
- ctx.attr[n].map = (uint8_t *)ctx.attr[n].map + i_start * vb->stride;
- }
+ index_size = nv50->idxbuf.index_size;
+ ctx.primitive_restart = info->primitive_restart;
+ ctx.restart_index = info->restart_index;
+ } else {
+ ctx.idxbuf = NULL;
+ index_size = 0;
+ ctx.primitive_restart = FALSE;
+ ctx.restart_index = 0;
+ }
+
+ ctx.instance_id = info->start_instance;
+ ctx.prim = nv50_prim_gl(info->mode);
- size = util_format_get_component_bits(ve->src_format,
- UTIL_FORMAT_COLORSPACE_RGB, 0);
- nr_components = util_format_get_nr_components(ve->src_format);
- switch (size) {
- case 8:
- switch (nr_components) {
- case 1: ctx.attr[n].push = emit_b08_1; break;
- case 2: ctx.attr[n].push = emit_b16_1; break;
- case 3: ctx.attr[n].push = emit_b08_3; break;
- case 4: ctx.attr[n].push = emit_b32_1; break;
- }
- ctx.vtx_size++;
+ if (info->primitive_restart) {
+ BEGIN_RING(ctx.chan, RING_3D(PRIM_RESTART_ENABLE), 2);
+ OUT_RING (ctx.chan, 1);
+ OUT_RING (ctx.chan, info->restart_index);
+ } else
+ if (nv50->state.prim_restart) {
+ BEGIN_RING(ctx.chan, RING_3D(PRIM_RESTART_ENABLE), 1);
+ OUT_RING (ctx.chan, 0);
+ }
+ nv50->state.prim_restart = info->primitive_restart;
+
+ while (inst--) {
+ BEGIN_RING(ctx.chan, RING_3D(VERTEX_BEGIN_GL), 1);
+ OUT_RING (ctx.chan, ctx.prim);
+ switch (index_size) {
+ case 0:
+ emit_vertices_seq(&ctx, info->start, info->count);
+ break;
+ case 1:
+ emit_vertices_i08(&ctx, info->start, info->count);
break;
- case 16:
- switch (nr_components) {
- case 1: ctx.attr[n].push = emit_b16_1; break;
- case 2: ctx.attr[n].push = emit_b32_1; break;
- case 3: ctx.attr[n].push = emit_b16_3; break;
- case 4: ctx.attr[n].push = emit_b32_2; break;
- }
- ctx.vtx_size += (nr_components + 1) >> 1;
+ case 2:
+ emit_vertices_i16(&ctx, info->start, info->count);
break;
- case 32:
- switch (nr_components) {
- case 1: ctx.attr[n].push = emit_b32_1; break;
- case 2: ctx.attr[n].push = emit_b32_2; break;
- case 3: ctx.attr[n].push = emit_b32_3; break;
- case 4: ctx.attr[n].push = emit_b32_4; break;
- }
- ctx.vtx_size += nr_components;
+ case 4:
+ emit_vertices_i32(&ctx, info->start, info->count);
break;
default:
assert(0);
- return;
+ break;
}
- }
- vtx_size = ctx.vtx_size + v_overhead;
+ BEGIN_RING(ctx.chan, RING_3D(VERTEX_END_GL), 1);
+ OUT_RING (ctx.chan, 0);
- /* map index buffer, if present */
- if (idxbuf) {
- struct nouveau_bo *bo = nv50_resource(idxbuf)->bo;
-
- if (nouveau_bo_map(bo, NOUVEAU_BO_RD)) {
- assert(bo->map);
- return;
- }
- ctx.idxbuf = bo->map;
- ctx.idxbias = idxbias;
- ctx.idxsize = idxsize;
- nouveau_bo_unmap(bo);
+ ctx.instance_id++;
+ ctx.prim |= NV50_3D_VERTEX_BEGIN_GL_INSTANCE_NEXT;
}
- s.priv = &ctx;
- s.edge = emit_edgeflag;
- if (idxbuf) {
- if (idxsize == 1)
- s.emit = idxbias ? emit_elt08_biased : emit_elt08;
- else
- if (idxsize == 2)
- s.emit = idxbias ? emit_elt16_biased : emit_elt16;
- else
- s.emit = idxbias ? emit_elt32_biased : emit_elt32;
- } else
- s.emit = emit_verts;
-
- /* per-instance loop */
- BEGIN_RING(chan, tesla, NV50TCL_CB_ADDR, 2);
- OUT_RING (chan, NV50_CB_AUX | (24 << 8));
- OUT_RING (chan, i_start);
- while (i_count--) {
- unsigned max_verts;
- boolean done;
-
- for (i = 0; i < ctx.attr_nr; i++) {
- if (!ctx.attr[i].divisor ||
- ctx.attr[i].divisor != ++ctx.attr[i].step)
- continue;
- ctx.attr[i].step = 0;
- ctx.attr[i].map = (uint8_t *)ctx.attr[i].map + ctx.attr[i].stride;
- }
+ if (info->indexed)
+ nouveau_resource_unmap(nv04_resource(nv50->idxbuf.buffer));
- util_split_prim_init(&s, mode, start, count);
- do {
- if (AVAIL_RING(chan) < p_overhead + (6 * vtx_size)) {
- FIRE_RING(chan);
- if (!nv50_state_validate(nv50, p_overhead + (6 * vtx_size))) {
- assert(0);
- return;
- }
- }
-
- max_verts = AVAIL_RING(chan);
- max_verts -= p_overhead;
- max_verts /= vtx_size;
-
- BEGIN_RING(chan, tesla, NV50TCL_VERTEX_BEGIN, 1);
- OUT_RING (chan, nv50_prim(s.mode) | (nzi ? (1 << 28) : 0));
- done = util_split_prim_next(&s, max_verts);
- BEGIN_RING(chan, tesla, NV50TCL_VERTEX_END, 1);
- OUT_RING (chan, 0);
- } while (!done);
-
- nzi = TRUE;
- }
+ for (i = 0; i < nv50->num_vtxbufs; ++i)
+ nouveau_resource_unmap(nv04_resource(nv50->vtxbuf[i].buffer));
}
diff --git a/src/gallium/drivers/nv50/nv50_query.c b/src/gallium/drivers/nv50/nv50_query.c
index 53f94820ce0..2dce94a4775 100644
--- a/src/gallium/drivers/nv50/nv50_query.c
+++ b/src/gallium/drivers/nv50/nv50_query.c
@@ -1,5 +1,5 @@
/*
- * Copyright 2008 Ben Skeggs
+ * Copyright 2011 Nouveau Project
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@@ -18,150 +18,320 @@
* 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: Christoph Bumiller
*/
-#include "pipe/p_context.h"
-#include "util/u_inlines.h"
-
#include "nv50_context.h"
+#include "nouveau/nv_object.xml.h"
+
+/* XXX: Nested queries, and simultaneous queries on multiple gallium contexts
+ * (since we use only a single GPU channel per screen) will not work properly.
+ *
+ * The first is not that big of an issue because OpenGL does not allow nested
+ * queries anyway.
+ */
struct nv50_query {
- struct nouveau_bo *bo;
- unsigned type;
- boolean ready;
- uint64_t result;
+ uint32_t *data;
+ uint32_t type;
+ uint32_t sequence;
+ struct nouveau_bo *bo;
+ uint32_t base;
+ uint32_t offset; /* base + i * 16 */
+ boolean ready;
+ boolean is64bit;
+ struct nouveau_mm_allocation *mm;
};
+#define NV50_QUERY_ALLOC_SPACE 128
+
static INLINE struct nv50_query *
nv50_query(struct pipe_query *pipe)
{
- return (struct nv50_query *)pipe;
+ return (struct nv50_query *)pipe;
+}
+
+static boolean
+nv50_query_allocate(struct nv50_context *nv50, struct nv50_query *q, int size)
+{
+ struct nv50_screen *screen = nv50->screen;
+ int ret;
+
+ if (q->bo) {
+ nouveau_bo_ref(NULL, &q->bo);
+ if (q->mm) {
+ if (q->ready)
+ nouveau_mm_free(q->mm);
+ else
+ nouveau_fence_work(screen->base.fence.current, nouveau_mm_free_work, q->mm);
+ }
+ }
+ if (size) {
+ q->mm = nouveau_mm_allocate(screen->base.mm_GART, size, &q->bo, &q->base);
+ if (!q->bo)
+ return FALSE;
+ q->offset = q->base;
+
+ ret = nouveau_bo_map_range(q->bo, q->base, size, NOUVEAU_BO_RD |
+ NOUVEAU_BO_NOSYNC);
+ if (ret) {
+ nv50_query_allocate(nv50, q, 0);
+ return FALSE;
+ }
+ q->data = q->bo->map;
+ nouveau_bo_unmap(q->bo);
+ }
+ return TRUE;
+}
+
+static void
+nv50_query_destroy(struct pipe_context *pipe, struct pipe_query *pq)
+{
+ nv50_query_allocate(nv50_context(pipe), nv50_query(pq), 0);
+ FREE(nv50_query(pq));
}
static struct pipe_query *
nv50_query_create(struct pipe_context *pipe, unsigned type)
{
- struct nouveau_device *dev = nouveau_screen(pipe->screen)->device;
- struct nv50_query *q = CALLOC_STRUCT(nv50_query);
- int ret;
+ struct nv50_context *nv50 = nv50_context(pipe);
+ struct nv50_query *q;
+
+ q = CALLOC_STRUCT(nv50_query);
+ if (!q)
+ return NULL;
- assert (q->type == PIPE_QUERY_OCCLUSION_COUNTER);
- q->type = type;
+ if (!nv50_query_allocate(nv50, q, NV50_QUERY_ALLOC_SPACE)) {
+ FREE(q);
+ return NULL;
+ }
- ret = nouveau_bo_new(dev, NOUVEAU_BO_GART | NOUVEAU_BO_MAP, 256,
- 16, &q->bo);
- if (ret) {
- FREE(q);
- return NULL;
- }
+ q->is64bit = (type == PIPE_QUERY_PRIMITIVES_GENERATED ||
+ type == PIPE_QUERY_PRIMITIVES_EMITTED ||
+ type == PIPE_QUERY_SO_STATISTICS);
+ q->type = type;
- return (struct pipe_query *)q;
+ if (q->type == PIPE_QUERY_OCCLUSION_COUNTER) {
+ q->offset -= 16;
+ q->data -= 16 / sizeof(*q->data); /* we advance before query_begin ! */
+ }
+
+ return (struct pipe_query *)q;
}
static void
-nv50_query_destroy(struct pipe_context *pipe, struct pipe_query *pq)
+nv50_query_get(struct nouveau_channel *chan, struct nv50_query *q,
+ unsigned offset, uint32_t get)
{
- struct nv50_query *q = nv50_query(pq);
+ offset += q->offset;
- if (q) {
- nouveau_bo_ref(NULL, &q->bo);
- FREE(q);
- }
+ MARK_RING (chan, 5, 2);
+ BEGIN_RING(chan, RING_3D(QUERY_ADDRESS_HIGH), 4);
+ OUT_RELOCh(chan, q->bo, offset, NOUVEAU_BO_GART | NOUVEAU_BO_WR);
+ OUT_RELOCl(chan, q->bo, offset, NOUVEAU_BO_GART | NOUVEAU_BO_WR);
+ OUT_RING (chan, q->sequence);
+ OUT_RING (chan, get);
}
static void
nv50_query_begin(struct pipe_context *pipe, struct pipe_query *pq)
{
- struct nv50_context *nv50 = nv50_context(pipe);
- struct nouveau_channel *chan = nv50->screen->base.channel;
- struct nouveau_grobj *tesla = nv50->screen->tesla;
- struct nv50_query *q = nv50_query(pq);
+ struct nv50_context *nv50 = nv50_context(pipe);
+ struct nouveau_channel *chan = nv50->screen->base.channel;
+ struct nv50_query *q = nv50_query(pq);
+
+ /* For occlusion queries we have to change the storage, because a previous
+ * query might set the initial render conition to FALSE even *after* we re-
+ * initialized it to TRUE.
+ */
+ if (q->type == PIPE_QUERY_OCCLUSION_COUNTER) {
+ q->offset += 16;
+ q->data += 16 / sizeof(*q->data);
+ if (q->offset - q->base == NV50_QUERY_ALLOC_SPACE)
+ nv50_query_allocate(nv50, q, NV50_QUERY_ALLOC_SPACE);
- BEGIN_RING(chan, tesla, NV50TCL_SAMPLECNT_RESET, 1);
- OUT_RING (chan, 1);
- BEGIN_RING(chan, tesla, NV50TCL_SAMPLECNT_ENABLE, 1);
- OUT_RING (chan, 1);
+ /* XXX: can we do this with the GPU, and sync with respect to a previous
+ * query ?
+ */
+ q->data[1] = 1; /* initial render condition = TRUE */
+ }
+ if (!q->is64bit)
+ q->data[0] = q->sequence++; /* the previously used one */
- q->ready = FALSE;
+ switch (q->type) {
+ case PIPE_QUERY_OCCLUSION_COUNTER:
+ BEGIN_RING(chan, RING_3D(COUNTER_RESET), 1);
+ OUT_RING (chan, NV50_3D_COUNTER_RESET_SAMPLECNT);
+ BEGIN_RING(chan, RING_3D(SAMPLECNT_ENABLE), 1);
+ OUT_RING (chan, 1);
+ break;
+ case PIPE_QUERY_PRIMITIVES_GENERATED: /* store before & after instead ? */
+ BEGIN_RING(chan, RING_3D(COUNTER_RESET), 1);
+ OUT_RING (chan, NV50_3D_COUNTER_RESET_GENERATED_PRIMITIVES);
+ break;
+ case PIPE_QUERY_PRIMITIVES_EMITTED:
+ BEGIN_RING(chan, RING_3D(COUNTER_RESET), 1);
+ OUT_RING (chan, NV50_3D_COUNTER_RESET_TRANSFORM_FEEDBACK);
+ break;
+ case PIPE_QUERY_SO_STATISTICS:
+ BEGIN_RING_NI(chan, RING_3D(COUNTER_RESET), 2);
+ OUT_RING (chan, NV50_3D_COUNTER_RESET_TRANSFORM_FEEDBACK);
+ OUT_RING (chan, NV50_3D_COUNTER_RESET_GENERATED_PRIMITIVES);
+ break;
+ case PIPE_QUERY_TIMESTAMP_DISJOINT:
+ case PIPE_QUERY_TIME_ELAPSED:
+ nv50_query_get(chan, q, 0x10, 0x00005002);
+ break;
+ default:
+ break;
+ }
+ q->ready = FALSE;
}
static void
nv50_query_end(struct pipe_context *pipe, struct pipe_query *pq)
{
- struct nv50_context *nv50 = nv50_context(pipe);
- struct nouveau_channel *chan = nv50->screen->base.channel;
- struct nouveau_grobj *tesla = nv50->screen->tesla;
- struct nv50_query *q = nv50_query(pq);
-
- MARK_RING (chan, 5, 2); /* flush on lack of space or relocs */
- BEGIN_RING(chan, tesla, NV50TCL_QUERY_ADDRESS_HIGH, 4);
- OUT_RELOCh(chan, q->bo, 0, NOUVEAU_BO_GART | NOUVEAU_BO_WR);
- OUT_RELOCl(chan, q->bo, 0, NOUVEAU_BO_GART | NOUVEAU_BO_WR);
- OUT_RING (chan, 0x00000000);
- OUT_RING (chan, 0x0100f002);
-
- BEGIN_RING(chan, tesla, NV50TCL_SAMPLECNT_ENABLE, 1);
- OUT_RING (chan, 0);
+ struct nv50_context *nv50 = nv50_context(pipe);
+ struct nouveau_channel *chan = nv50->screen->base.channel;
+ struct nv50_query *q = nv50_query(pq);
+
+ switch (q->type) {
+ case PIPE_QUERY_OCCLUSION_COUNTER:
+ nv50_query_get(chan, q, 0, 0x0100f002);
+ BEGIN_RING(chan, RING_3D(SAMPLECNT_ENABLE), 1);
+ OUT_RING (chan, 0);
+ break;
+ case PIPE_QUERY_PRIMITIVES_GENERATED:
+ nv50_query_get(chan, q, 0, 0x06805002);
+ break;
+ case PIPE_QUERY_PRIMITIVES_EMITTED:
+ nv50_query_get(chan, q, 0, 0x05805002);
+ break;
+ case PIPE_QUERY_SO_STATISTICS:
+ nv50_query_get(chan, q, 0x00, 0x05805002);
+ nv50_query_get(chan, q, 0x10, 0x06805002);
+ break;
+ case PIPE_QUERY_TIMESTAMP_DISJOINT:
+ case PIPE_QUERY_TIME_ELAPSED:
+ nv50_query_get(chan, q, 0, 0x00005002);
+ break;
+ case PIPE_QUERY_GPU_FINISHED:
+ nv50_query_get(chan, q, 0, 0x1000f010);
+ break;
+ default:
+ assert(0);
+ break;
+ }
+}
+
+static INLINE boolean
+nv50_query_ready(struct nv50_query *q)
+{
+ return q->ready || (!q->is64bit && (q->data[0] == q->sequence));
+}
+
+static INLINE boolean
+nv50_query_wait(struct nv50_query *q)
+{
+ int ret = nouveau_bo_map(q->bo, NOUVEAU_BO_RD);
+ if (ret)
+ return FALSE;
+ nouveau_bo_unmap(q->bo);
+ return TRUE;
}
static boolean
nv50_query_result(struct pipe_context *pipe, struct pipe_query *pq,
- boolean wait, void *vresult)
+ boolean wait, void *result)
{
- uint64_t *result = (uint64_t*)vresult;
- struct nv50_query *q = nv50_query(pq);
- int ret;
-
- if (!q->ready) {
- ret = nouveau_bo_map(q->bo, NOUVEAU_BO_RD |
- (wait ? 0 : NOUVEAU_BO_NOWAIT));
- if (ret)
- return false;
- q->result = ((uint32_t *)q->bo->map)[1];
- q->ready = TRUE;
- nouveau_bo_unmap(q->bo);
- }
-
- *result = q->result;
- return q->ready;
+ struct nv50_query *q = nv50_query(pq);
+ uint64_t *res64 = result;
+ boolean *res8 = result;
+ uint64_t *data64 = (uint64_t *)q->data;
+
+ if (q->type == PIPE_QUERY_GPU_FINISHED) {
+ res8[0] = nv50_query_ready(q);
+ return TRUE;
+ }
+
+ if (!q->ready) /* update ? */
+ q->ready = nv50_query_ready(q);
+ if (!q->ready) {
+ struct nouveau_channel *chan = nv50_context(pipe)->screen->base.channel;
+ if (!wait) {
+ if (nouveau_bo_pending(q->bo) & NOUVEAU_BO_WR) /* for daft apps */
+ FIRE_RING(chan);
+ return FALSE;
+ }
+ if (!nv50_query_wait(q))
+ return FALSE;
+ }
+ q->ready = TRUE;
+
+ switch (q->type) {
+ case PIPE_QUERY_OCCLUSION_COUNTER: /* u32 sequence, u32 count, u64 time */
+ res64[0] = q->data[1];
+ break;
+ case PIPE_QUERY_PRIMITIVES_GENERATED: /* u64 count, u64 time */
+ case PIPE_QUERY_PRIMITIVES_EMITTED: /* u64 count, u64 time */
+ res64[0] = data64[0];
+ break;
+ case PIPE_QUERY_SO_STATISTICS:
+ res64[0] = data64[0];
+ res64[1] = data64[1];
+ break;
+ case PIPE_QUERY_TIMESTAMP_DISJOINT: /* u32 sequence, u32 0, u64 time */
+ res64[0] = 1000000000;
+ res8[8] = (data64[0] == data64[2]) ? FALSE : TRUE;
+ break;
+ case PIPE_QUERY_TIME_ELAPSED:
+ res64[0] = data64[1] - data64[3];
+ break;
+ default:
+ return FALSE;
+ }
+
+ return TRUE;
}
static void
nv50_render_condition(struct pipe_context *pipe,
- struct pipe_query *pq, uint mode)
+ struct pipe_query *pq, uint mode)
{
- struct nv50_context *nv50 = nv50_context(pipe);
- struct nouveau_channel *chan = nv50->screen->base.channel;
- struct nouveau_grobj *tesla = nv50->screen->tesla;
- struct nv50_query *q;
-
- if (!pq) {
- BEGIN_RING(chan, tesla, NV50TCL_COND_MODE, 1);
- OUT_RING (chan, NV50TCL_COND_MODE_ALWAYS);
- return;
- }
- q = nv50_query(pq);
-
- if (mode == PIPE_RENDER_COND_WAIT ||
- mode == PIPE_RENDER_COND_BY_REGION_WAIT) {
- /* XXX: big fence, FIFO semaphore might be better */
- BEGIN_RING(chan, tesla, 0x0110, 1);
- OUT_RING (chan, 0);
- }
-
- BEGIN_RING(chan, tesla, NV50TCL_COND_ADDRESS_HIGH, 3);
- OUT_RELOCh(chan, q->bo, 0, NOUVEAU_BO_GART | NOUVEAU_BO_RD);
- OUT_RELOCl(chan, q->bo, 0, NOUVEAU_BO_GART | NOUVEAU_BO_RD);
- OUT_RING (chan, NV50TCL_COND_MODE_RES);
+ struct nv50_context *nv50 = nv50_context(pipe);
+ struct nouveau_channel *chan = nv50->screen->base.channel;
+ struct nv50_query *q;
+
+ if (!pq) {
+ BEGIN_RING(chan, RING_3D(COND_MODE), 1);
+ OUT_RING (chan, NV50_3D_COND_MODE_ALWAYS);
+ return;
+ }
+ q = nv50_query(pq);
+
+ if (mode == PIPE_RENDER_COND_WAIT ||
+ mode == PIPE_RENDER_COND_BY_REGION_WAIT) {
+ BEGIN_RING(chan, RING_3D_(NV50_GRAPH_WAIT_FOR_IDLE), 1);
+ OUT_RING (chan, 0);
+ }
+
+ MARK_RING (chan, 4, 2);
+ BEGIN_RING(chan, RING_3D(COND_ADDRESS_HIGH), 3);
+ OUT_RELOCh(chan, q->bo, q->offset, NOUVEAU_BO_GART | NOUVEAU_BO_RD);
+ OUT_RELOCl(chan, q->bo, q->offset, NOUVEAU_BO_GART | NOUVEAU_BO_RD);
+ OUT_RING (chan, NV50_3D_COND_MODE_RES_NON_ZERO);
}
void
nv50_init_query_functions(struct nv50_context *nv50)
{
- nv50->pipe.create_query = nv50_query_create;
- nv50->pipe.destroy_query = nv50_query_destroy;
- nv50->pipe.begin_query = nv50_query_begin;
- nv50->pipe.end_query = nv50_query_end;
- nv50->pipe.get_query_result = nv50_query_result;
- nv50->pipe.render_condition = nv50_render_condition;
+ struct pipe_context *pipe = &nv50->base.pipe;
+
+ pipe->create_query = nv50_query_create;
+ pipe->destroy_query = nv50_query_destroy;
+ pipe->begin_query = nv50_query_begin;
+ pipe->end_query = nv50_query_end;
+ pipe->get_query_result = nv50_query_result;
+ pipe->render_condition = nv50_render_condition;
}
diff --git a/src/gallium/drivers/nv50/nv50_reg.h b/src/gallium/drivers/nv50/nv50_reg.h
deleted file mode 100644
index 949838b33f5..00000000000
--- a/src/gallium/drivers/nv50/nv50_reg.h
+++ /dev/null
@@ -1,1827 +0,0 @@
-/*************************************************************************
-
- Autogenerated file, do not edit !
-
- This file was generated by renouveau-gen from renouveau.xml, the
- XML database of nvidia objects and methods. renouveau-gen and
- renouveau.xml can be found in CVS module renouveau of sourceforge.net
- project nouveau:
-
-cvs -z3 -d:pserver:anonymous@nouveau.cvs.sourceforge.net:/cvsroot/nouveau co -P renouveau
-
-**************************************************************************
-
- Copyright (C) 2006-2008 :
- Dmitry Baryshkov,
- Laurent Carlier,
- Matthieu Castet,
- Dawid Gajownik,
- Jeremy Kolb,
- Stephane Loeuillet,
- Patrice Mandin,
- Stephane Marchesin,
- Serge Martin,
- Sylvain Munaut,
- Simon Raffeiner,
- Ben Skeggs,
- Erik Waling,
- koala_br,
-
-All Rights Reserved.
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice (including the
-next paragraph) shall be included in all copies or substantial
-portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-IN NO EVENT SHALL THE COPYRIGHT OWNER(S) AND/OR ITS SUPPLIERS BE
-LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-*************************************************************************/
-
-
-#ifndef NOUVEAU_REG_H
-#define NOUVEAU_REG_H 1
-
-
-#define NV04_MEMORY_TO_MEMORY_FORMAT 0x00000039
-
-#define NV04_MEMORY_TO_MEMORY_FORMAT_NOP 0x00000100
-#define NV04_MEMORY_TO_MEMORY_FORMAT_NOTIFY 0x00000104
-#define NV04_MEMORY_TO_MEMORY_FORMAT_DMA_NOTIFY 0x00000180
-#define NV04_MEMORY_TO_MEMORY_FORMAT_DMA_BUFFER_IN 0x00000184
-#define NV04_MEMORY_TO_MEMORY_FORMAT_DMA_BUFFER_OUT 0x00000188
-#define NV04_MEMORY_TO_MEMORY_FORMAT_OFFSET_IN 0x0000030c
-#define NV04_MEMORY_TO_MEMORY_FORMAT_OFFSET_OUT 0x00000310
-#define NV04_MEMORY_TO_MEMORY_FORMAT_PITCH_IN 0x00000314
-#define NV04_MEMORY_TO_MEMORY_FORMAT_PITCH_OUT 0x00000318
-#define NV04_MEMORY_TO_MEMORY_FORMAT_LINE_LENGTH_IN 0x0000031c
-#define NV04_MEMORY_TO_MEMORY_FORMAT_LINE_COUNT 0x00000320
-#define NV04_MEMORY_TO_MEMORY_FORMAT_FORMAT 0x00000324
-#define NV04_MEMORY_TO_MEMORY_FORMAT_FORMAT_INPUT_INC_SHIFT 0
-#define NV04_MEMORY_TO_MEMORY_FORMAT_FORMAT_INPUT_INC_MASK 0x000000ff
-#define NV04_MEMORY_TO_MEMORY_FORMAT_FORMAT_OUTPUT_INC_SHIFT 8
-#define NV04_MEMORY_TO_MEMORY_FORMAT_FORMAT_OUTPUT_INC_MASK 0x0000ff00
-#define NV04_MEMORY_TO_MEMORY_FORMAT_BUF_NOTIFY 0x00000328
-
-
-#define NV50_MEMORY_TO_MEMORY_FORMAT 0x00005039
-
-#define NV50_MEMORY_TO_MEMORY_FORMAT_SERIALIZE 0x00000110
-#define NV50_MEMORY_TO_MEMORY_FORMAT_LINEAR_IN 0x00000200
-#define NV50_MEMORY_TO_MEMORY_FORMAT_TILING_MODE_IN 0x00000204
-#define NV50_MEMORY_TO_MEMORY_FORMAT_TILING_PITCH_IN 0x00000208
-#define NV50_MEMORY_TO_MEMORY_FORMAT_TILING_HEIGHT_IN 0x0000020c
-#define NV50_MEMORY_TO_MEMORY_FORMAT_TILING_DEPTH_IN 0x00000210
-#define NV50_MEMORY_TO_MEMORY_FORMAT_TILING_POSITION_IN_Z 0x00000214
-#define NV50_MEMORY_TO_MEMORY_FORMAT_TILING_POSITION_IN 0x00000218
-#define NV50_MEMORY_TO_MEMORY_FORMAT_TILING_POSITION_IN_X_SHIFT 0
-#define NV50_MEMORY_TO_MEMORY_FORMAT_TILING_POSITION_IN_X_MASK 0x0000ffff
-#define NV50_MEMORY_TO_MEMORY_FORMAT_TILING_POSITION_IN_Y_SHIFT 16
-#define NV50_MEMORY_TO_MEMORY_FORMAT_TILING_POSITION_IN_Y_MASK 0xffff0000
-#define NV50_MEMORY_TO_MEMORY_FORMAT_LINEAR_OUT 0x0000021c
-#define NV50_MEMORY_TO_MEMORY_FORMAT_TILING_MODE_OUT 0x00000220
-#define NV50_MEMORY_TO_MEMORY_FORMAT_TILING_PITCH_OUT 0x00000224
-#define NV50_MEMORY_TO_MEMORY_FORMAT_TILING_HEIGHT_OUT 0x00000228
-#define NV50_MEMORY_TO_MEMORY_FORMAT_TILING_DEPTH_OUT 0x0000022c
-#define NV50_MEMORY_TO_MEMORY_FORMAT_TILING_POSITION_OUT_Z 0x00000230
-#define NV50_MEMORY_TO_MEMORY_FORMAT_TILING_POSITION_OUT 0x00000234
-#define NV50_MEMORY_TO_MEMORY_FORMAT_TILING_POSITION_OUT_X_SHIFT 0
-#define NV50_MEMORY_TO_MEMORY_FORMAT_TILING_POSITION_OUT_X_MASK 0x0000ffff
-#define NV50_MEMORY_TO_MEMORY_FORMAT_TILING_POSITION_OUT_Y_SHIFT 16
-#define NV50_MEMORY_TO_MEMORY_FORMAT_TILING_POSITION_OUT_Y_MASK 0xffff0000
-#define NV50_MEMORY_TO_MEMORY_FORMAT_OFFSET_IN_HIGH 0x00000238
-#define NV50_MEMORY_TO_MEMORY_FORMAT_OFFSET_OUT_HIGH 0x0000023c
-
-
-#define NV50_2D 0x0000502d
-
-#define NV50_2D_NOP 0x00000100
-#define NV50_2D_NOTIFY 0x00000104
-#define NV50_2D_SERIALIZE 0x00000110
-#define NV50_2D_DMA_NOTIFY 0x00000180
-#define NV50_2D_DMA_DST 0x00000184
-#define NV50_2D_DMA_SRC 0x00000188
-#define NV50_2D_DMA_COND 0x0000018c
-#define NV50_2D_DST_FORMAT 0x00000200
-#define NV50_2D_DST_FORMAT_R32G32B32A32_FLOAT 0x000000c0
-#define NV50_2D_DST_FORMAT_R32G32B32A32_SINT 0x000000c1
-#define NV50_2D_DST_FORMAT_R32G32B32A32_UINT 0x000000c2
-#define NV50_2D_DST_FORMAT_R32G32B32X32_FLOAT 0x000000c3
-#define NV50_2D_DST_FORMAT_R16G16B16A16_UNORM 0x000000c6
-#define NV50_2D_DST_FORMAT_R16G16B16A16_SNORM 0x000000c7
-#define NV50_2D_DST_FORMAT_R16G16B16A16_SINT 0x000000c8
-#define NV50_2D_DST_FORMAT_R16G16B16A16_UINT 0x000000c9
-#define NV50_2D_DST_FORMAT_R16G16B16A16_FLOAT 0x000000ca
-#define NV50_2D_DST_FORMAT_R32G32_FLOAT 0x000000cb
-#define NV50_2D_DST_FORMAT_R32G32_SINT 0x000000cc
-#define NV50_2D_DST_FORMAT_R32G32_UINT 0x000000cd
-#define NV50_2D_DST_FORMAT_R16G16B16X16_FLOAT 0x000000ce
-#define NV50_2D_DST_FORMAT_A8R8G8B8_UNORM 0x000000cf
-#define NV50_2D_DST_FORMAT_A8R8G8B8_SRGB 0x000000d0
-#define NV50_2D_DST_FORMAT_A2B10G10R10_UNORM 0x000000d1
-#define NV50_2D_DST_FORMAT_A2B10G10R10_UINT 0x000000d2
-#define NV50_2D_DST_FORMAT_A8B8G8R8_UNORM 0x000000d5
-#define NV50_2D_DST_FORMAT_A8B8G8R8_SRGB 0x000000d6
-#define NV50_2D_DST_FORMAT_A8B8G8R8_SNORM 0x000000d7
-#define NV50_2D_DST_FORMAT_A8B8G8R8_SINT 0x000000d8
-#define NV50_2D_DST_FORMAT_A8B8G8R8_UINT 0x000000d9
-#define NV50_2D_DST_FORMAT_R16G16_UNORM 0x000000da
-#define NV50_2D_DST_FORMAT_R16G16_SNORM 0x000000db
-#define NV50_2D_DST_FORMAT_R16G16_SINT 0x000000dc
-#define NV50_2D_DST_FORMAT_R16G16_UINT 0x000000dd
-#define NV50_2D_DST_FORMAT_R16G16_FLOAT 0x000000de
-#define NV50_2D_DST_FORMAT_A2R10G10B10_UNORM 0x000000df
-#define NV50_2D_DST_FORMAT_B10G11R11_FLOAT 0x000000e0
-#define NV50_2D_DST_FORMAT_R32_FLOAT 0x000000e5
-#define NV50_2D_DST_FORMAT_X8R8G8B8_UNORM 0x000000e6
-#define NV50_2D_DST_FORMAT_X8R8G8B8_SRGB 0x000000e7
-#define NV50_2D_DST_FORMAT_R5G6B5_UNORM 0x000000e8
-#define NV50_2D_DST_FORMAT_A1R5G5B5_UNORM 0x000000e9
-#define NV50_2D_DST_FORMAT_R8G8_UNORM 0x000000ea
-#define NV50_2D_DST_FORMAT_R8G8_SNORM 0x000000eb
-#define NV50_2D_DST_FORMAT_R8G8_SINT 0x000000ec
-#define NV50_2D_DST_FORMAT_R8G8_UINT 0x000000ed
-#define NV50_2D_DST_FORMAT_R16_UNORM 0x000000ee
-#define NV50_2D_DST_FORMAT_R16_SNORM 0x000000ef
-#define NV50_2D_DST_FORMAT_R16_SINT 0x000000f0
-#define NV50_2D_DST_FORMAT_R16_UINT 0x000000f1
-#define NV50_2D_DST_FORMAT_R16_FLOAT 0x000000f2
-#define NV50_2D_DST_FORMAT_R8_UNORM 0x000000f3
-#define NV50_2D_DST_FORMAT_R8_SNORM 0x000000f4
-#define NV50_2D_DST_FORMAT_R8_SINT 0x000000f5
-#define NV50_2D_DST_FORMAT_R8_UINT 0x000000f6
-#define NV50_2D_DST_FORMAT_A8_UNORM 0x000000f7
-#define NV50_2D_DST_FORMAT_X1R5G5B5_UNORM 0x000000f8
-#define NV50_2D_DST_FORMAT_X8B8G8R8_UNORM 0x000000f9
-#define NV50_2D_DST_FORMAT_X8B8G8R8_SRGB 0x000000fa
-#define NV50_2D_DST_LINEAR 0x00000204
-#define NV50_2D_DST_TILE_MODE 0x00000208
-#define NV50_2D_DST_DEPTH 0x0000020c
-#define NV50_2D_DST_LAYER 0x00000210
-#define NV50_2D_DST_PITCH 0x00000214
-#define NV50_2D_DST_WIDTH 0x00000218
-#define NV50_2D_DST_HEIGHT 0x0000021c
-#define NV50_2D_DST_ADDRESS_HIGH 0x00000220
-#define NV50_2D_DST_ADDRESS_LOW 0x00000224
-#define NV50_2D_SRC_FORMAT 0x00000230
-#define NV50_2D_SRC_FORMAT_R32G32B32A32_FLOAT 0x000000c0
-#define NV50_2D_SRC_FORMAT_R32G32B32A32_SINT 0x000000c1
-#define NV50_2D_SRC_FORMAT_R32G32B32A32_UINT 0x000000c2
-#define NV50_2D_SRC_FORMAT_R32G32B32X32_FLOAT 0x000000c3
-#define NV50_2D_SRC_FORMAT_R16G16B16A16_UNORM 0x000000c6
-#define NV50_2D_SRC_FORMAT_R16G16B16A16_SNORM 0x000000c7
-#define NV50_2D_SRC_FORMAT_R16G16B16A16_SINT 0x000000c8
-#define NV50_2D_SRC_FORMAT_R16G16B16A16_UINT 0x000000c9
-#define NV50_2D_SRC_FORMAT_R16G16B16A16_FLOAT 0x000000ca
-#define NV50_2D_SRC_FORMAT_R32G32_FLOAT 0x000000cb
-#define NV50_2D_SRC_FORMAT_R32G32_SINT 0x000000cc
-#define NV50_2D_SRC_FORMAT_R32G32_UINT 0x000000cd
-#define NV50_2D_SRC_FORMAT_R16G16B16X16_FLOAT 0x000000ce
-#define NV50_2D_SRC_FORMAT_A8R8G8B8_UNORM 0x000000cf
-#define NV50_2D_SRC_FORMAT_A8R8G8B8_SRGB 0x000000d0
-#define NV50_2D_SRC_FORMAT_A2B10G10R10_UNORM 0x000000d1
-#define NV50_2D_SRC_FORMAT_A2B10G10R10_UINT 0x000000d2
-#define NV50_2D_SRC_FORMAT_A8B8G8R8_UNORM 0x000000d5
-#define NV50_2D_SRC_FORMAT_A8B8G8R8_SRGB 0x000000d6
-#define NV50_2D_SRC_FORMAT_A8B8G8R8_SNORM 0x000000d7
-#define NV50_2D_SRC_FORMAT_A8B8G8R8_SINT 0x000000d8
-#define NV50_2D_SRC_FORMAT_A8B8G8R8_UINT 0x000000d9
-#define NV50_2D_SRC_FORMAT_R16G16_UNORM 0x000000da
-#define NV50_2D_SRC_FORMAT_R16G16_SNORM 0x000000db
-#define NV50_2D_SRC_FORMAT_R16G16_SINT 0x000000dc
-#define NV50_2D_SRC_FORMAT_R16G16_UINT 0x000000dd
-#define NV50_2D_SRC_FORMAT_R16G16_FLOAT 0x000000de
-#define NV50_2D_SRC_FORMAT_A2R10G10B10_UNORM 0x000000df
-#define NV50_2D_SRC_FORMAT_B10G11R11_FLOAT 0x000000e0
-#define NV50_2D_SRC_FORMAT_R32_FLOAT 0x000000e5
-#define NV50_2D_SRC_FORMAT_X8R8G8B8_UNORM 0x000000e6
-#define NV50_2D_SRC_FORMAT_X8R8G8B8_SRGB 0x000000e7
-#define NV50_2D_SRC_FORMAT_R5G6B5_UNORM 0x000000e8
-#define NV50_2D_SRC_FORMAT_A1R5G5B5_UNORM 0x000000e9
-#define NV50_2D_SRC_FORMAT_R8G8_UNORM 0x000000ea
-#define NV50_2D_SRC_FORMAT_R8G8_SNORM 0x000000eb
-#define NV50_2D_SRC_FORMAT_R8G8_SINT 0x000000ec
-#define NV50_2D_SRC_FORMAT_R8G8_UINT 0x000000ed
-#define NV50_2D_SRC_FORMAT_R16_UNORM 0x000000ee
-#define NV50_2D_SRC_FORMAT_R16_SNORM 0x000000ef
-#define NV50_2D_SRC_FORMAT_R16_SINT 0x000000f0
-#define NV50_2D_SRC_FORMAT_R16_UINT 0x000000f1
-#define NV50_2D_SRC_FORMAT_R16_FLOAT 0x000000f2
-#define NV50_2D_SRC_FORMAT_R8_UNORM 0x000000f3
-#define NV50_2D_SRC_FORMAT_R8_SNORM 0x000000f4
-#define NV50_2D_SRC_FORMAT_R8_SINT 0x000000f5
-#define NV50_2D_SRC_FORMAT_R8_UINT 0x000000f6
-#define NV50_2D_SRC_FORMAT_A8_UNORM 0x000000f7
-#define NV50_2D_SRC_FORMAT_X1R5G5B5_UNORM 0x000000f8
-#define NV50_2D_SRC_FORMAT_X8B8G8R8_UNORM 0x000000f9
-#define NV50_2D_SRC_FORMAT_X8B8G8R8_SRGB 0x000000fa
-#define NV50_2D_SRC_LINEAR 0x00000234
-#define NV50_2D_SRC_TILE_MODE 0x00000238
-#define NV50_2D_SRC_DEPTH 0x0000023c
-#define NV50_2D_SRC_LAYER 0x00000240
-#define NV50_2D_SRC_PITCH 0x00000244
-#define NV50_2D_SRC_WIDTH 0x00000248
-#define NV50_2D_SRC_HEIGHT 0x0000024c
-#define NV50_2D_SRC_ADDRESS_HIGH 0x00000250
-#define NV50_2D_SRC_ADDRESS_LOW 0x00000254
-#define NV50_2D_COND_ADDRESS_HIGH 0x00000264
-#define NV50_2D_COND_ADDRESS_LOW 0x00000268
-#define NV50_2D_COND_MODE 0x0000026c
-#define NV50_2D_COND_MODE_NEVER 0x00000000
-#define NV50_2D_COND_MODE_ALWAYS 0x00000001
-#define NV50_2D_COND_MODE_RES 0x00000002
-#define NV50_2D_COND_MODE_NOT_RES_AND_NOT_ID 0x00000003
-#define NV50_2D_COND_MODE_RES_OR_ID 0x00000004
-#define NV50_2D_CLIP_X 0x00000280
-#define NV50_2D_CLIP_Y 0x00000284
-#define NV50_2D_CLIP_W 0x00000288
-#define NV50_2D_CLIP_H 0x0000028c
-#define NV50_2D_CLIP_ENABLE 0x00000290
-#define NV50_2D_COLOR_KEY_FORMAT 0x00000294
-#define NV50_2D_COLOR_KEY_FORMAT_16BPP 0x00000000
-#define NV50_2D_COLOR_KEY_FORMAT_15BPP 0x00000001
-#define NV50_2D_COLOR_KEY_FORMAT_24BPP 0x00000002
-#define NV50_2D_COLOR_KEY_FORMAT_30BPP 0x00000003
-#define NV50_2D_COLOR_KEY_FORMAT_8BPP 0x00000004
-#define NV50_2D_COLOR_KEY_FORMAT_16BPP2 0x00000005
-#define NV50_2D_COLOR_KEY_FORMAT_32BPP 0x00000006
-#define NV50_2D_COLOR_KEY 0x00000298
-#define NV50_2D_COLOR_KEY_ENABLE 0x0000029c
-#define NV50_2D_ROP 0x000002a0
-#define NV50_2D_OPERATION 0x000002ac
-#define NV50_2D_OPERATION_SRCCOPY_AND 0x00000000
-#define NV50_2D_OPERATION_ROP_AND 0x00000001
-#define NV50_2D_OPERATION_BLEND_AND 0x00000002
-#define NV50_2D_OPERATION_SRCCOPY 0x00000003
-#define NV50_2D_OPERATION_SRCCOPY_PREMULT 0x00000004
-#define NV50_2D_OPERATION_BLEND_PREMULT 0x00000005
-#define NV50_2D_PATTERN_FORMAT 0x000002e8
-#define NV50_2D_PATTERN_FORMAT_16BPP 0x00000000
-#define NV50_2D_PATTERN_FORMAT_15BPP 0x00000001
-#define NV50_2D_PATTERN_FORMAT_32BPP 0x00000002
-#define NV50_2D_PATTERN_FORMAT_8BPP 0x00000003
-#define NV50_2D_PATTERN_COLOR(x) (0x000002f0+((x)*4))
-#define NV50_2D_PATTERN_COLOR__SIZE 0x00000002
-#define NV50_2D_PATTERN_BITMAP(x) (0x000002f8+((x)*4))
-#define NV50_2D_PATTERN_BITMAP__SIZE 0x00000002
-#define NV50_2D_DRAW_SHAPE 0x00000580
-#define NV50_2D_DRAW_SHAPE_POINTS 0x00000000
-#define NV50_2D_DRAW_SHAPE_LINES 0x00000001
-#define NV50_2D_DRAW_SHAPE_LINE_STRIP 0x00000002
-#define NV50_2D_DRAW_SHAPE_TRIANGLES 0x00000003
-#define NV50_2D_DRAW_SHAPE_RECTANGLES 0x00000004
-#define NV50_2D_DRAW_COLOR_FORMAT 0x00000584
-#define NV50_2D_DRAW_COLOR_FORMAT_R32G32B32A32_FLOAT 0x000000c0
-#define NV50_2D_DRAW_COLOR_FORMAT_R32G32B32A32_SINT 0x000000c1
-#define NV50_2D_DRAW_COLOR_FORMAT_R32G32B32A32_UINT 0x000000c2
-#define NV50_2D_DRAW_COLOR_FORMAT_R32G32B32X32_FLOAT 0x000000c3
-#define NV50_2D_DRAW_COLOR_FORMAT_R16G16B16A16_UNORM 0x000000c6
-#define NV50_2D_DRAW_COLOR_FORMAT_R16G16B16A16_SNORM 0x000000c7
-#define NV50_2D_DRAW_COLOR_FORMAT_R16G16B16A16_SINT 0x000000c8
-#define NV50_2D_DRAW_COLOR_FORMAT_R16G16B16A16_UINT 0x000000c9
-#define NV50_2D_DRAW_COLOR_FORMAT_R16G16B16A16_FLOAT 0x000000ca
-#define NV50_2D_DRAW_COLOR_FORMAT_R32G32_FLOAT 0x000000cb
-#define NV50_2D_DRAW_COLOR_FORMAT_R32G32_SINT 0x000000cc
-#define NV50_2D_DRAW_COLOR_FORMAT_R32G32_UINT 0x000000cd
-#define NV50_2D_DRAW_COLOR_FORMAT_R16G16B16X16_FLOAT 0x000000ce
-#define NV50_2D_DRAW_COLOR_FORMAT_A8R8G8B8_UNORM 0x000000cf
-#define NV50_2D_DRAW_COLOR_FORMAT_A8R8G8B8_SRGB 0x000000d0
-#define NV50_2D_DRAW_COLOR_FORMAT_A2B10G10R10_UNORM 0x000000d1
-#define NV50_2D_DRAW_COLOR_FORMAT_A2B10G10R10_UINT 0x000000d2
-#define NV50_2D_DRAW_COLOR_FORMAT_A8B8G8R8_UNORM 0x000000d5
-#define NV50_2D_DRAW_COLOR_FORMAT_A8B8G8R8_SRGB 0x000000d6
-#define NV50_2D_DRAW_COLOR_FORMAT_A8B8G8R8_SNORM 0x000000d7
-#define NV50_2D_DRAW_COLOR_FORMAT_A8B8G8R8_SINT 0x000000d8
-#define NV50_2D_DRAW_COLOR_FORMAT_A8B8G8R8_UINT 0x000000d9
-#define NV50_2D_DRAW_COLOR_FORMAT_R16G16_UNORM 0x000000da
-#define NV50_2D_DRAW_COLOR_FORMAT_R16G16_SNORM 0x000000db
-#define NV50_2D_DRAW_COLOR_FORMAT_R16G16_SINT 0x000000dc
-#define NV50_2D_DRAW_COLOR_FORMAT_R16G16_UINT 0x000000dd
-#define NV50_2D_DRAW_COLOR_FORMAT_R16G16_FLOAT 0x000000de
-#define NV50_2D_DRAW_COLOR_FORMAT_A2R10G10B10_UNORM 0x000000df
-#define NV50_2D_DRAW_COLOR_FORMAT_B10G11R11_FLOAT 0x000000e0
-#define NV50_2D_DRAW_COLOR_FORMAT_R32_FLOAT 0x000000e5
-#define NV50_2D_DRAW_COLOR_FORMAT_X8R8G8B8_UNORM 0x000000e6
-#define NV50_2D_DRAW_COLOR_FORMAT_X8R8G8B8_SRGB 0x000000e7
-#define NV50_2D_DRAW_COLOR_FORMAT_R5G6B5_UNORM 0x000000e8
-#define NV50_2D_DRAW_COLOR_FORMAT_A1R5G5B5_UNORM 0x000000e9
-#define NV50_2D_DRAW_COLOR_FORMAT_R8G8_UNORM 0x000000ea
-#define NV50_2D_DRAW_COLOR_FORMAT_R8G8_SNORM 0x000000eb
-#define NV50_2D_DRAW_COLOR_FORMAT_R8G8_SINT 0x000000ec
-#define NV50_2D_DRAW_COLOR_FORMAT_R8G8_UINT 0x000000ed
-#define NV50_2D_DRAW_COLOR_FORMAT_R16_UNORM 0x000000ee
-#define NV50_2D_DRAW_COLOR_FORMAT_R16_SNORM 0x000000ef
-#define NV50_2D_DRAW_COLOR_FORMAT_R16_SINT 0x000000f0
-#define NV50_2D_DRAW_COLOR_FORMAT_R16_UINT 0x000000f1
-#define NV50_2D_DRAW_COLOR_FORMAT_R16_FLOAT 0x000000f2
-#define NV50_2D_DRAW_COLOR_FORMAT_R8_UNORM 0x000000f3
-#define NV50_2D_DRAW_COLOR_FORMAT_R8_SNORM 0x000000f4
-#define NV50_2D_DRAW_COLOR_FORMAT_R8_SINT 0x000000f5
-#define NV50_2D_DRAW_COLOR_FORMAT_R8_UINT 0x000000f6
-#define NV50_2D_DRAW_COLOR_FORMAT_A8_UNORM 0x000000f7
-#define NV50_2D_DRAW_COLOR_FORMAT_X1R5G5B5_UNORM 0x000000f8
-#define NV50_2D_DRAW_COLOR_FORMAT_X8B8G8R8_UNORM 0x000000f9
-#define NV50_2D_DRAW_COLOR_FORMAT_X8B8G8R8_SRGB 0x000000fa
-#define NV50_2D_DRAW_COLOR 0x00000588
-#define NV50_2D_DRAW_POINT16 0x000005e0
-#define NV50_2D_DRAW_POINT16_X_SHIFT 0
-#define NV50_2D_DRAW_POINT16_X_MASK 0x0000ffff
-#define NV50_2D_DRAW_POINT16_Y_SHIFT 16
-#define NV50_2D_DRAW_POINT16_Y_MASK 0xffff0000
-#define NV50_2D_DRAW_POINT32_X(x) (0x00000600+((x)*8))
-#define NV50_2D_DRAW_POINT32_X__SIZE 0x00000040
-#define NV50_2D_DRAW_POINT32_Y(x) (0x00000604+((x)*8))
-#define NV50_2D_DRAW_POINT32_Y__SIZE 0x00000040
-#define NV50_2D_SIFC_BITMAP_ENABLE 0x00000800
-#define NV50_2D_SIFC_FORMAT 0x00000804
-#define NV50_2D_SIFC_FORMAT_R32G32B32A32_FLOAT 0x000000c0
-#define NV50_2D_SIFC_FORMAT_R32G32B32A32_SINT 0x000000c1
-#define NV50_2D_SIFC_FORMAT_R32G32B32A32_UINT 0x000000c2
-#define NV50_2D_SIFC_FORMAT_R32G32B32X32_FLOAT 0x000000c3
-#define NV50_2D_SIFC_FORMAT_R16G16B16A16_UNORM 0x000000c6
-#define NV50_2D_SIFC_FORMAT_R16G16B16A16_SNORM 0x000000c7
-#define NV50_2D_SIFC_FORMAT_R16G16B16A16_SINT 0x000000c8
-#define NV50_2D_SIFC_FORMAT_R16G16B16A16_UINT 0x000000c9
-#define NV50_2D_SIFC_FORMAT_R16G16B16A16_FLOAT 0x000000ca
-#define NV50_2D_SIFC_FORMAT_R32G32_FLOAT 0x000000cb
-#define NV50_2D_SIFC_FORMAT_R32G32_SINT 0x000000cc
-#define NV50_2D_SIFC_FORMAT_R32G32_UINT 0x000000cd
-#define NV50_2D_SIFC_FORMAT_R16G16B16X16_FLOAT 0x000000ce
-#define NV50_2D_SIFC_FORMAT_A8R8G8B8_UNORM 0x000000cf
-#define NV50_2D_SIFC_FORMAT_A8R8G8B8_SRGB 0x000000d0
-#define NV50_2D_SIFC_FORMAT_A2B10G10R10_UNORM 0x000000d1
-#define NV50_2D_SIFC_FORMAT_A2B10G10R10_UINT 0x000000d2
-#define NV50_2D_SIFC_FORMAT_A8B8G8R8_UNORM 0x000000d5
-#define NV50_2D_SIFC_FORMAT_A8B8G8R8_SRGB 0x000000d6
-#define NV50_2D_SIFC_FORMAT_A8B8G8R8_SNORM 0x000000d7
-#define NV50_2D_SIFC_FORMAT_A8B8G8R8_SINT 0x000000d8
-#define NV50_2D_SIFC_FORMAT_A8B8G8R8_UINT 0x000000d9
-#define NV50_2D_SIFC_FORMAT_R16G16_UNORM 0x000000da
-#define NV50_2D_SIFC_FORMAT_R16G16_SNORM 0x000000db
-#define NV50_2D_SIFC_FORMAT_R16G16_SINT 0x000000dc
-#define NV50_2D_SIFC_FORMAT_R16G16_UINT 0x000000dd
-#define NV50_2D_SIFC_FORMAT_R16G16_FLOAT 0x000000de
-#define NV50_2D_SIFC_FORMAT_A2R10G10B10_UNORM 0x000000df
-#define NV50_2D_SIFC_FORMAT_B10G11R11_FLOAT 0x000000e0
-#define NV50_2D_SIFC_FORMAT_R32_FLOAT 0x000000e5
-#define NV50_2D_SIFC_FORMAT_X8R8G8B8_UNORM 0x000000e6
-#define NV50_2D_SIFC_FORMAT_X8R8G8B8_SRGB 0x000000e7
-#define NV50_2D_SIFC_FORMAT_R5G6B5_UNORM 0x000000e8
-#define NV50_2D_SIFC_FORMAT_A1R5G5B5_UNORM 0x000000e9
-#define NV50_2D_SIFC_FORMAT_R8G8_UNORM 0x000000ea
-#define NV50_2D_SIFC_FORMAT_R8G8_SNORM 0x000000eb
-#define NV50_2D_SIFC_FORMAT_R8G8_SINT 0x000000ec
-#define NV50_2D_SIFC_FORMAT_R8G8_UINT 0x000000ed
-#define NV50_2D_SIFC_FORMAT_R16_UNORM 0x000000ee
-#define NV50_2D_SIFC_FORMAT_R16_SNORM 0x000000ef
-#define NV50_2D_SIFC_FORMAT_R16_SINT 0x000000f0
-#define NV50_2D_SIFC_FORMAT_R16_UINT 0x000000f1
-#define NV50_2D_SIFC_FORMAT_R16_FLOAT 0x000000f2
-#define NV50_2D_SIFC_FORMAT_R8_UNORM 0x000000f3
-#define NV50_2D_SIFC_FORMAT_R8_SNORM 0x000000f4
-#define NV50_2D_SIFC_FORMAT_R8_SINT 0x000000f5
-#define NV50_2D_SIFC_FORMAT_R8_UINT 0x000000f6
-#define NV50_2D_SIFC_FORMAT_A8_UNORM 0x000000f7
-#define NV50_2D_SIFC_FORMAT_X1R5G5B5_UNORM 0x000000f8
-#define NV50_2D_SIFC_FORMAT_X8B8G8R8_UNORM 0x000000f9
-#define NV50_2D_SIFC_FORMAT_X8B8G8R8_SRGB 0x000000fa
-#define NV50_2D_SIFC_BITMAP_UNK808 0x00000808
-#define NV50_2D_SIFC_BITMAP_LSB_FIRST 0x0000080c
-#define NV50_2D_SIFC_BITMAP_LINE_PACK_MODE 0x00000810
-#define NV50_2D_SIFC_BITMAP_LINE_PACK_MODE_PACKED 0x00000000
-#define NV50_2D_SIFC_BITMAP_LINE_PACK_MODE_ALIGN_BYTE 0x00000001
-#define NV50_2D_SIFC_BITMAP_LINE_PACK_MODE_ALIGN_WORD 0x00000002
-#define NV50_2D_SIFC_BITMAP_COLOR_BIT0 0x00000814
-#define NV50_2D_SIFC_BITMAP_COLOR_BIT1 0x00000818
-#define NV50_2D_SIFC_BITMAP_WRITE_BIT0_ENABLE 0x0000081c
-#define NV50_2D_SIFC_WIDTH 0x00000838
-#define NV50_2D_SIFC_HEIGHT 0x0000083c
-#define NV50_2D_SIFC_DX_DU_FRACT 0x00000840
-#define NV50_2D_SIFC_DX_DU_INT 0x00000844
-#define NV50_2D_SIFC_DY_DV_FRACT 0x00000848
-#define NV50_2D_SIFC_DY_DV_INT 0x0000084c
-#define NV50_2D_SIFC_DST_X_FRACT 0x00000850
-#define NV50_2D_SIFC_DST_X_INT 0x00000854
-#define NV50_2D_SIFC_DST_Y_FRACT 0x00000858
-#define NV50_2D_SIFC_DST_Y_INT 0x0000085c
-#define NV50_2D_SIFC_DATA 0x00000860
-#define NV50_2D_BLIT_DST_X 0x000008b0
-#define NV50_2D_BLIT_DST_Y 0x000008b4
-#define NV50_2D_BLIT_DST_W 0x000008b8
-#define NV50_2D_BLIT_DST_H 0x000008bc
-#define NV50_2D_BLIT_DU_DX_FRACT 0x000008c0
-#define NV50_2D_BLIT_DU_DX_INT 0x000008c4
-#define NV50_2D_BLIT_DV_DY_FRACT 0x000008c8
-#define NV50_2D_BLIT_DV_DY_INT 0x000008cc
-#define NV50_2D_BLIT_SRC_X_FRACT 0x000008d0
-#define NV50_2D_BLIT_SRC_X_INT 0x000008d4
-#define NV50_2D_BLIT_SRC_Y_FRACT 0x000008d8
-#define NV50_2D_BLIT_SRC_Y_INT 0x000008dc
-
-
-#define NV50TCL 0x00005097
-
-#define NV50TCL_NOP 0x00000100
-#define NV50TCL_NOTIFY 0x00000104
-#define NV50TCL_SERIALIZE 0x00000110
-#define NV50TCL_DMA_NOTIFY 0x00000180
-#define NV50TCL_DMA_ZETA 0x00000184
-#define NV50TCL_DMA_QUERY 0x00000188
-#define NV50TCL_DMA_VTXBUF0 0x0000018c
-#define NV50TCL_DMA_LOCAL 0x00000190
-#define NV50TCL_DMA_STACK 0x00000194
-#define NV50TCL_DMA_CODE_CB 0x00000198
-#define NV50TCL_DMA_TSC 0x0000019c
-#define NV50TCL_DMA_TIC 0x000001a0
-#define NV50TCL_DMA_TEXTURE 0x000001a4
-#define NV50TCL_DMA_STRMOUT 0x000001a8
-#define NV50TCL_DMA_CLIPID 0x000001ac
-#define NV50TCL_DMA_COLOR(x) (0x000001c0+((x)*4))
-#define NV50TCL_DMA_COLOR__SIZE 0x00000008
-#define NV50TCL_RT_ADDRESS_HIGH(x) (0x00000200+((x)*32))
-#define NV50TCL_RT_ADDRESS_HIGH__SIZE 0x00000008
-#define NV50TCL_RT_ADDRESS_LOW(x) (0x00000204+((x)*32))
-#define NV50TCL_RT_ADDRESS_LOW__SIZE 0x00000008
-#define NV50TCL_RT_FORMAT(x) (0x00000208+((x)*32))
-#define NV50TCL_RT_FORMAT__SIZE 0x00000008
-#define NV50TCL_RT_FORMAT_R32G32B32A32_FLOAT 0x000000c0
-#define NV50TCL_RT_FORMAT_R32G32B32A32_SINT 0x000000c1
-#define NV50TCL_RT_FORMAT_R32G32B32A32_UINT 0x000000c2
-#define NV50TCL_RT_FORMAT_R32G32B32X32_FLOAT 0x000000c3
-#define NV50TCL_RT_FORMAT_R16G16B16A16_UNORM 0x000000c6
-#define NV50TCL_RT_FORMAT_R16G16B16A16_SNORM 0x000000c7
-#define NV50TCL_RT_FORMAT_R16G16B16A16_SINT 0x000000c8
-#define NV50TCL_RT_FORMAT_R16G16B16A16_UINT 0x000000c9
-#define NV50TCL_RT_FORMAT_R16G16B16A16_FLOAT 0x000000ca
-#define NV50TCL_RT_FORMAT_R32G32_FLOAT 0x000000cb
-#define NV50TCL_RT_FORMAT_R32G32_SINT 0x000000cc
-#define NV50TCL_RT_FORMAT_R32G32_UINT 0x000000cd
-#define NV50TCL_RT_FORMAT_R16G16B16X16_FLOAT 0x000000ce
-#define NV50TCL_RT_FORMAT_A8R8G8B8_UNORM 0x000000cf
-#define NV50TCL_RT_FORMAT_A8R8G8B8_SRGB 0x000000d0
-#define NV50TCL_RT_FORMAT_A2B10G10R10_UNORM 0x000000d1
-#define NV50TCL_RT_FORMAT_A2B10G10R10_UINT 0x000000d2
-#define NV50TCL_RT_FORMAT_A8B8G8R8_UNORM 0x000000d5
-#define NV50TCL_RT_FORMAT_A8B8G8R8_SRGB 0x000000d6
-#define NV50TCL_RT_FORMAT_A8B8G8R8_SNORM 0x000000d7
-#define NV50TCL_RT_FORMAT_A8B8G8R8_SINT 0x000000d8
-#define NV50TCL_RT_FORMAT_A8B8G8R8_UINT 0x000000d9
-#define NV50TCL_RT_FORMAT_R16G16_UNORM 0x000000da
-#define NV50TCL_RT_FORMAT_R16G16_SNORM 0x000000db
-#define NV50TCL_RT_FORMAT_R16G16_SINT 0x000000dc
-#define NV50TCL_RT_FORMAT_R16G16_UINT 0x000000dd
-#define NV50TCL_RT_FORMAT_R16G16_FLOAT 0x000000de
-#define NV50TCL_RT_FORMAT_A2R10G10B10_UNORM 0x000000df
-#define NV50TCL_RT_FORMAT_B10G11R11_FLOAT 0x000000e0
-#define NV50TCL_RT_FORMAT_R32_FLOAT 0x000000e5
-#define NV50TCL_RT_FORMAT_X8R8G8B8_UNORM 0x000000e6
-#define NV50TCL_RT_FORMAT_X8R8G8B8_SRGB 0x000000e7
-#define NV50TCL_RT_FORMAT_R5G6B5_UNORM 0x000000e8
-#define NV50TCL_RT_FORMAT_A1R5G5B5_UNORM 0x000000e9
-#define NV50TCL_RT_FORMAT_R8G8_UNORM 0x000000ea
-#define NV50TCL_RT_FORMAT_R8G8_SNORM 0x000000eb
-#define NV50TCL_RT_FORMAT_R8G8_SINT 0x000000ec
-#define NV50TCL_RT_FORMAT_R8G8_UINT 0x000000ed
-#define NV50TCL_RT_FORMAT_R16_UNORM 0x000000ee
-#define NV50TCL_RT_FORMAT_R16_SNORM 0x000000ef
-#define NV50TCL_RT_FORMAT_R16_SINT 0x000000f0
-#define NV50TCL_RT_FORMAT_R16_UINT 0x000000f1
-#define NV50TCL_RT_FORMAT_R16_FLOAT 0x000000f2
-#define NV50TCL_RT_FORMAT_R8_UNORM 0x000000f3
-#define NV50TCL_RT_FORMAT_R8_SNORM 0x000000f4
-#define NV50TCL_RT_FORMAT_R8_SINT 0x000000f5
-#define NV50TCL_RT_FORMAT_R8_UINT 0x000000f6
-#define NV50TCL_RT_FORMAT_A8_UNORM 0x000000f7
-#define NV50TCL_RT_FORMAT_X1R5G5B5_UNORM 0x000000f8
-#define NV50TCL_RT_FORMAT_X8B8G8R8_UNORM 0x000000f9
-#define NV50TCL_RT_FORMAT_X8B8G8R8_SRGB 0x000000fa
-#define NV50TCL_RT_TILE_MODE(x) (0x0000020c+((x)*32))
-#define NV50TCL_RT_TILE_MODE__SIZE 0x00000008
-#define NV50TCL_RT_LAYER_STRIDE(x) (0x00000210+((x)*32))
-#define NV50TCL_RT_LAYER_STRIDE__SIZE 0x00000008
-#define NV50TCL_VTX_ATTR_1F(x) (0x00000300+((x)*4))
-#define NV50TCL_VTX_ATTR_1F__SIZE 0x00000010
-#define NV50TCL_VTX_ATTR_2H(x) (0x00000340+((x)*4))
-#define NV50TCL_VTX_ATTR_2H__SIZE 0x00000010
-#define NV50TCL_VTX_ATTR_2H_X_SHIFT 0
-#define NV50TCL_VTX_ATTR_2H_X_MASK 0x0000ffff
-#define NV50TCL_VTX_ATTR_2H_Y_SHIFT 16
-#define NV50TCL_VTX_ATTR_2H_Y_MASK 0xffff0000
-#define NV50TCL_VTX_ATTR_2F_X(x) (0x00000380+((x)*8))
-#define NV50TCL_VTX_ATTR_2F_X__SIZE 0x00000010
-#define NV50TCL_VTX_ATTR_2F_Y(x) (0x00000384+((x)*8))
-#define NV50TCL_VTX_ATTR_2F_Y__SIZE 0x00000010
-#define NV50TCL_VTX_ATTR_3F_X(x) (0x00000400+((x)*16))
-#define NV50TCL_VTX_ATTR_3F_X__SIZE 0x00000010
-#define NV50TCL_VTX_ATTR_3F_Y(x) (0x00000404+((x)*16))
-#define NV50TCL_VTX_ATTR_3F_Y__SIZE 0x00000010
-#define NV50TCL_VTX_ATTR_3F_Z(x) (0x00000408+((x)*16))
-#define NV50TCL_VTX_ATTR_3F_Z__SIZE 0x00000010
-#define NV50TCL_VTX_ATTR_4F_X(x) (0x00000500+((x)*16))
-#define NV50TCL_VTX_ATTR_4F_X__SIZE 0x00000010
-#define NV50TCL_VTX_ATTR_4F_Y(x) (0x00000504+((x)*16))
-#define NV50TCL_VTX_ATTR_4F_Y__SIZE 0x00000010
-#define NV50TCL_VTX_ATTR_4F_Z(x) (0x00000508+((x)*16))
-#define NV50TCL_VTX_ATTR_4F_Z__SIZE 0x00000010
-#define NV50TCL_VTX_ATTR_4F_W(x) (0x0000050c+((x)*16))
-#define NV50TCL_VTX_ATTR_4F_W__SIZE 0x00000010
-#define NV50TCL_VTX_ATTR_4H_0(x) (0x00000600+((x)*8))
-#define NV50TCL_VTX_ATTR_4H_0__SIZE 0x00000010
-#define NV50TCL_VTX_ATTR_4H_0_X_SHIFT 0
-#define NV50TCL_VTX_ATTR_4H_0_X_MASK 0x0000ffff
-#define NV50TCL_VTX_ATTR_4H_0_Y_SHIFT 16
-#define NV50TCL_VTX_ATTR_4H_0_Y_MASK 0xffff0000
-#define NV50TCL_VTX_ATTR_4H_1(x) (0x00000604+((x)*8))
-#define NV50TCL_VTX_ATTR_4H_1__SIZE 0x00000010
-#define NV50TCL_VTX_ATTR_4H_1_Z_SHIFT 0
-#define NV50TCL_VTX_ATTR_4H_1_Z_MASK 0x0000ffff
-#define NV50TCL_VTX_ATTR_4H_1_W_SHIFT 16
-#define NV50TCL_VTX_ATTR_4H_1_W_MASK 0xffff0000
-#define NV50TCL_VTX_ATTR_2I(x) (0x00000680+((x)*4))
-#define NV50TCL_VTX_ATTR_2I__SIZE 0x00000010
-#define NV50TCL_VTX_ATTR_2I_X_SHIFT 0
-#define NV50TCL_VTX_ATTR_2I_X_MASK 0x0000ffff
-#define NV50TCL_VTX_ATTR_2I_Y_SHIFT 16
-#define NV50TCL_VTX_ATTR_2I_Y_MASK 0xffff0000
-#define NV50TCL_VTX_ATTR_2NI(x) (0x000006c0+((x)*4))
-#define NV50TCL_VTX_ATTR_2NI__SIZE 0x00000010
-#define NV50TCL_VTX_ATTR_2NI_X_SHIFT 0
-#define NV50TCL_VTX_ATTR_2NI_X_MASK 0x0000ffff
-#define NV50TCL_VTX_ATTR_2NI_Y_SHIFT 16
-#define NV50TCL_VTX_ATTR_2NI_Y_MASK 0xffff0000
-#define NV50TCL_VTX_ATTR_4I_0(x) (0x00000700+((x)*8))
-#define NV50TCL_VTX_ATTR_4I_0__SIZE 0x00000010
-#define NV50TCL_VTX_ATTR_4I_0_X_SHIFT 0
-#define NV50TCL_VTX_ATTR_4I_0_X_MASK 0x0000ffff
-#define NV50TCL_VTX_ATTR_4I_0_Y_SHIFT 16
-#define NV50TCL_VTX_ATTR_4I_0_Y_MASK 0xffff0000
-#define NV50TCL_VTX_ATTR_4I_1(x) (0x00000704+((x)*8))
-#define NV50TCL_VTX_ATTR_4I_1__SIZE 0x00000010
-#define NV50TCL_VTX_ATTR_4I_1_Z_SHIFT 0
-#define NV50TCL_VTX_ATTR_4I_1_Z_MASK 0x0000ffff
-#define NV50TCL_VTX_ATTR_4I_1_W_SHIFT 16
-#define NV50TCL_VTX_ATTR_4I_1_W_MASK 0xffff0000
-#define NV50TCL_VTX_ATTR_4NI_0(x) (0x00000780+((x)*8))
-#define NV50TCL_VTX_ATTR_4NI_0__SIZE 0x00000010
-#define NV50TCL_VTX_ATTR_4NI_0_X_SHIFT 0
-#define NV50TCL_VTX_ATTR_4NI_0_X_MASK 0x0000ffff
-#define NV50TCL_VTX_ATTR_4NI_0_Y_SHIFT 16
-#define NV50TCL_VTX_ATTR_4NI_0_Y_MASK 0xffff0000
-#define NV50TCL_VTX_ATTR_4NI_1(x) (0x00000784+((x)*8))
-#define NV50TCL_VTX_ATTR_4NI_1__SIZE 0x00000010
-#define NV50TCL_VTX_ATTR_4NI_1_Z_SHIFT 0
-#define NV50TCL_VTX_ATTR_4NI_1_Z_MASK 0x0000ffff
-#define NV50TCL_VTX_ATTR_4NI_1_W_SHIFT 16
-#define NV50TCL_VTX_ATTR_4NI_1_W_MASK 0xffff0000
-#define NV50TCL_VTX_ATTR_4UB(x) (0x00000800+((x)*4))
-#define NV50TCL_VTX_ATTR_4UB__SIZE 0x00000010
-#define NV50TCL_VTX_ATTR_4UB_X_SHIFT 0
-#define NV50TCL_VTX_ATTR_4UB_X_MASK 0x000000ff
-#define NV50TCL_VTX_ATTR_4UB_Y_SHIFT 8
-#define NV50TCL_VTX_ATTR_4UB_Y_MASK 0x0000ff00
-#define NV50TCL_VTX_ATTR_4UB_Z_SHIFT 16
-#define NV50TCL_VTX_ATTR_4UB_Z_MASK 0x00ff0000
-#define NV50TCL_VTX_ATTR_4UB_W_SHIFT 24
-#define NV50TCL_VTX_ATTR_4UB_W_MASK 0xff000000
-#define NV50TCL_VTX_ATTR_4B(x) (0x00000840+((x)*4))
-#define NV50TCL_VTX_ATTR_4B__SIZE 0x00000010
-#define NV50TCL_VTX_ATTR_4B_X_SHIFT 0
-#define NV50TCL_VTX_ATTR_4B_X_MASK 0x000000ff
-#define NV50TCL_VTX_ATTR_4B_Y_SHIFT 8
-#define NV50TCL_VTX_ATTR_4B_Y_MASK 0x0000ff00
-#define NV50TCL_VTX_ATTR_4B_Z_SHIFT 16
-#define NV50TCL_VTX_ATTR_4B_Z_MASK 0x00ff0000
-#define NV50TCL_VTX_ATTR_4B_W_SHIFT 24
-#define NV50TCL_VTX_ATTR_4B_W_MASK 0xff000000
-#define NV50TCL_VTX_ATTR_4NUB(x) (0x00000880+((x)*4))
-#define NV50TCL_VTX_ATTR_4NUB__SIZE 0x00000010
-#define NV50TCL_VTX_ATTR_4NUB_X_SHIFT 0
-#define NV50TCL_VTX_ATTR_4NUB_X_MASK 0x000000ff
-#define NV50TCL_VTX_ATTR_4NUB_Y_SHIFT 8
-#define NV50TCL_VTX_ATTR_4NUB_Y_MASK 0x0000ff00
-#define NV50TCL_VTX_ATTR_4NUB_Z_SHIFT 16
-#define NV50TCL_VTX_ATTR_4NUB_Z_MASK 0x00ff0000
-#define NV50TCL_VTX_ATTR_4NUB_W_SHIFT 24
-#define NV50TCL_VTX_ATTR_4NUB_W_MASK 0xff000000
-#define NV50TCL_VTX_ATTR_4NB(x) (0x000008c0+((x)*4))
-#define NV50TCL_VTX_ATTR_4NB__SIZE 0x00000010
-#define NV50TCL_VTX_ATTR_4NB_X_SHIFT 0
-#define NV50TCL_VTX_ATTR_4NB_X_MASK 0x000000ff
-#define NV50TCL_VTX_ATTR_4NB_Y_SHIFT 8
-#define NV50TCL_VTX_ATTR_4NB_Y_MASK 0x0000ff00
-#define NV50TCL_VTX_ATTR_4NB_Z_SHIFT 16
-#define NV50TCL_VTX_ATTR_4NB_Z_MASK 0x00ff0000
-#define NV50TCL_VTX_ATTR_4NB_W_SHIFT 24
-#define NV50TCL_VTX_ATTR_4NB_W_MASK 0xff000000
-#define NV50TCL_VERTEX_ARRAY_FORMAT(x) (0x00000900+((x)*16))
-#define NV50TCL_VERTEX_ARRAY_FORMAT__SIZE 0x00000010
-#define NV50TCL_VERTEX_ARRAY_FORMAT_STRIDE_SHIFT 0
-#define NV50TCL_VERTEX_ARRAY_FORMAT_STRIDE_MASK 0x00000fff
-#define NV50TCL_VERTEX_ARRAY_FORMAT_ENABLE (1 << 29)
-#define NV50TCL_VERTEX_ARRAY_START_HIGH(x) (0x00000904+((x)*16))
-#define NV50TCL_VERTEX_ARRAY_START_HIGH__SIZE 0x00000010
-#define NV50TCL_VERTEX_ARRAY_START_LOW(x) (0x00000908+((x)*16))
-#define NV50TCL_VERTEX_ARRAY_START_LOW__SIZE 0x00000010
-#define NV50TCL_VIEWPORT_SCALE_X(x) (0x00000a00+((x)*32))
-#define NV50TCL_VIEWPORT_SCALE_X__SIZE 0x00000010
-#define NV50TCL_VIEWPORT_SCALE_Y(x) (0x00000a04+((x)*32))
-#define NV50TCL_VIEWPORT_SCALE_Y__SIZE 0x00000010
-#define NV50TCL_VIEWPORT_SCALE_Z(x) (0x00000a08+((x)*32))
-#define NV50TCL_VIEWPORT_SCALE_Z__SIZE 0x00000010
-#define NV50TCL_VIEWPORT_TRANSLATE_X(x) (0x00000a0c+((x)*32))
-#define NV50TCL_VIEWPORT_TRANSLATE_X__SIZE 0x00000010
-#define NV50TCL_VIEWPORT_TRANSLATE_Y(x) (0x00000a10+((x)*32))
-#define NV50TCL_VIEWPORT_TRANSLATE_Y__SIZE 0x00000010
-#define NV50TCL_VIEWPORT_TRANSLATE_Z(x) (0x00000a14+((x)*32))
-#define NV50TCL_VIEWPORT_TRANSLATE_Z__SIZE 0x00000010
-#define NV50TCL_VIEWPORT_HORIZ(x) (0x00000c00+((x)*16))
-#define NV50TCL_VIEWPORT_HORIZ__SIZE 0x00000010
-#define NV50TCL_VIEWPORT_HORIZ_X_SHIFT 0
-#define NV50TCL_VIEWPORT_HORIZ_X_MASK 0x0000ffff
-#define NV50TCL_VIEWPORT_HORIZ_W_SHIFT 16
-#define NV50TCL_VIEWPORT_HORIZ_W_MASK 0xffff0000
-#define NV50TCL_VIEWPORT_VERT(x) (0x00000c04+((x)*16))
-#define NV50TCL_VIEWPORT_VERT__SIZE 0x00000010
-#define NV50TCL_VIEWPORT_VERT_Y_SHIFT 0
-#define NV50TCL_VIEWPORT_VERT_Y_MASK 0x0000ffff
-#define NV50TCL_VIEWPORT_VERT_H_SHIFT 16
-#define NV50TCL_VIEWPORT_VERT_H_MASK 0xffff0000
-#define NV50TCL_DEPTH_RANGE_NEAR(x) (0x00000c08+((x)*16))
-#define NV50TCL_DEPTH_RANGE_NEAR__SIZE 0x00000010
-#define NV50TCL_DEPTH_RANGE_FAR(x) (0x00000c0c+((x)*16))
-#define NV50TCL_DEPTH_RANGE_FAR__SIZE 0x00000010
-#define NV50TCL_VIEWPORT_CLIP_HORIZ(x) (0x00000d00+((x)*8))
-#define NV50TCL_VIEWPORT_CLIP_HORIZ__SIZE 0x00000008
-#define NV50TCL_VIEWPORT_CLIP_HORIZ_MIN_SHIFT 0
-#define NV50TCL_VIEWPORT_CLIP_HORIZ_MIN_MASK 0x0000ffff
-#define NV50TCL_VIEWPORT_CLIP_HORIZ_MAX_SHIFT 16
-#define NV50TCL_VIEWPORT_CLIP_HORIZ_MAX_MASK 0xffff0000
-#define NV50TCL_VIEWPORT_CLIP_VERT(x) (0x00000d04+((x)*8))
-#define NV50TCL_VIEWPORT_CLIP_VERT__SIZE 0x00000008
-#define NV50TCL_VIEWPORT_CLIP_VERT_MIN_SHIFT 0
-#define NV50TCL_VIEWPORT_CLIP_VERT_MIN_MASK 0x0000ffff
-#define NV50TCL_VIEWPORT_CLIP_VERT_MAX_SHIFT 16
-#define NV50TCL_VIEWPORT_CLIP_VERT_MAX_MASK 0xffff0000
-#define NV50TCL_CLIPID_REGION_HORIZ(x) (0x00000d40+((x)*8))
-#define NV50TCL_CLIPID_REGION_HORIZ__SIZE 0x00000004
-#define NV50TCL_CLIPID_REGION_VERT(x) (0x00000d44+((x)*8))
-#define NV50TCL_CLIPID_REGION_VERT__SIZE 0x00000004
-#define NV50TCL_VERTEX_BUFFER_FIRST 0x00000d74
-#define NV50TCL_VERTEX_BUFFER_COUNT 0x00000d78
-#define NV50TCL_CLEAR_COLOR(x) (0x00000d80+((x)*4))
-#define NV50TCL_CLEAR_COLOR__SIZE 0x00000004
-#define NV50TCL_CLEAR_DEPTH 0x00000d90
-#define NV50TCL_STACK_ADDRESS_HIGH 0x00000d94
-#define NV50TCL_STACK_ADDRESS_LOW 0x00000d98
-#define NV50TCL_STACK_SIZE_LOG 0x00000d9c
-#define NV50TCL_CLEAR_STENCIL 0x00000da0
-#define NV50TCL_STRMOUT_PRIMITIVE_COUNT 0x00000da8
-#define NV50TCL_POLYGON_MODE_FRONT 0x00000dac
-#define NV50TCL_POLYGON_MODE_FRONT_POINT 0x00001b00
-#define NV50TCL_POLYGON_MODE_FRONT_LINE 0x00001b01
-#define NV50TCL_POLYGON_MODE_FRONT_FILL 0x00001b02
-#define NV50TCL_POLYGON_MODE_BACK 0x00000db0
-#define NV50TCL_POLYGON_MODE_BACK_POINT 0x00001b00
-#define NV50TCL_POLYGON_MODE_BACK_LINE 0x00001b01
-#define NV50TCL_POLYGON_MODE_BACK_FILL 0x00001b02
-#define NV50TCL_POLYGON_SMOOTH_ENABLE 0x00000db4
-#define NV50TCL_POLYGON_OFFSET_POINT_ENABLE 0x00000dc0
-#define NV50TCL_POLYGON_OFFSET_LINE_ENABLE 0x00000dc4
-#define NV50TCL_POLYGON_OFFSET_FILL_ENABLE 0x00000dc8
-#define NV50TCL_WATCHDOG_TIMER 0x00000de4
-#define NV50TCL_WINDOW_OFFSET_X 0x00000df8
-#define NV50TCL_WINDOW_OFFSET_Y 0x00000dfc
-#define NV50TCL_SCISSOR_ENABLE(x) (0x00000e00+((x)*16))
-#define NV50TCL_SCISSOR_ENABLE__SIZE 0x00000010
-#define NV50TCL_SCISSOR_HORIZ(x) (0x00000e04+((x)*16))
-#define NV50TCL_SCISSOR_HORIZ__SIZE 0x00000010
-#define NV50TCL_SCISSOR_HORIZ_MIN_SHIFT 0
-#define NV50TCL_SCISSOR_HORIZ_MIN_MASK 0x0000ffff
-#define NV50TCL_SCISSOR_HORIZ_MAX_SHIFT 16
-#define NV50TCL_SCISSOR_HORIZ_MAX_MASK 0xffff0000
-#define NV50TCL_SCISSOR_VERT(x) (0x00000e08+((x)*16))
-#define NV50TCL_SCISSOR_VERT__SIZE 0x00000010
-#define NV50TCL_SCISSOR_VERT_MIN_SHIFT 0
-#define NV50TCL_SCISSOR_VERT_MIN_MASK 0x0000ffff
-#define NV50TCL_SCISSOR_VERT_MAX_SHIFT 16
-#define NV50TCL_SCISSOR_VERT_MAX_MASK 0xffff0000
-#define NV50TCL_CB_ADDR 0x00000f00
-#define NV50TCL_CB_ADDR_ID_SHIFT 8
-#define NV50TCL_CB_ADDR_ID_MASK 0x003fff00
-#define NV50TCL_CB_ADDR_BUFFER_SHIFT 0
-#define NV50TCL_CB_ADDR_BUFFER_MASK 0x0000007f
-#define NV50TCL_CB_DATA(x) (0x00000f04+((x)*4))
-#define NV50TCL_CB_DATA__SIZE 0x00000010
-#define NV50TCL_LOCAL_WARPS_LOG_ALLOC 0x00000f44
-#define NV50TCL_LOCAL_WARPS_NO_CLAMP 0x00000f48
-#define NV50TCL_STACK_WARPS_LOG_ALLOC 0x00000f4c
-#define NV50TCL_STACK_WARPS_NO_CLAMP 0x00000f50
-#define NV50TCL_STENCIL_BACK_FUNC_REF 0x00000f54
-#define NV50TCL_STENCIL_BACK_MASK 0x00000f58
-#define NV50TCL_STENCIL_BACK_FUNC_MASK 0x00000f5c
-#define NV50TCL_GP_ADDRESS_HIGH 0x00000f70
-#define NV50TCL_GP_ADDRESS_LOW 0x00000f74
-#define NV50TCL_VP_ADDRESS_HIGH 0x00000f7c
-#define NV50TCL_VP_ADDRESS_LOW 0x00000f80
-#define NV50TCL_VERTEX_RUNOUT_HIGH 0x00000f84
-#define NV50TCL_VERTEX_RUNOUT_LOW 0x00000f88
-#define NV50TCL_DEPTH_BOUNDS(x) (0x00000f9c+((x)*4))
-#define NV50TCL_DEPTH_BOUNDS__SIZE 0x00000002
-#define NV50TCL_FP_ADDRESS_HIGH 0x00000fa4
-#define NV50TCL_FP_ADDRESS_LOW 0x00000fa8
-#define NV50TCL_MSAA_MASK(x) (0x00000fbc+((x)*4))
-#define NV50TCL_MSAA_MASK__SIZE 0x00000004
-#define NV50TCL_CLIPID_ADDRESS_HIGH 0x00000fcc
-#define NV50TCL_CLIPID_ADDRESS_LOW 0x00000fd0
-#define NV50TCL_ZETA_ADDRESS_HIGH 0x00000fe0
-#define NV50TCL_ZETA_ADDRESS_LOW 0x00000fe4
-#define NV50TCL_ZETA_FORMAT 0x00000fe8
-#define NV50TCL_ZETA_FORMAT_Z32_FLOAT 0x0000000a
-#define NV50TCL_ZETA_FORMAT_Z16_UNORM 0x00000013
-#define NV50TCL_ZETA_FORMAT_Z24S8_UNORM 0x00000014
-#define NV50TCL_ZETA_FORMAT_X8Z24_UNORM 0x00000015
-#define NV50TCL_ZETA_FORMAT_S8Z24_UNORM 0x00000016
-#define NV50TCL_ZETA_FORMAT_Z32_FLOAT_X24S8_UNORM 0x00000019
-#define NV50TCL_ZETA_TILE_MODE 0x00000fec
-#define NV50TCL_ZETA_LAYER_STRIDE 0x00000ff0
-#define NV50TCL_SCREEN_SCISSOR_HORIZ 0x00000ff4
-#define NV50TCL_SCREEN_SCISSOR_HORIZ_W_SHIFT 16
-#define NV50TCL_SCREEN_SCISSOR_HORIZ_W_MASK 0xffff0000
-#define NV50TCL_SCREEN_SCISSOR_HORIZ_X_SHIFT 0
-#define NV50TCL_SCREEN_SCISSOR_HORIZ_X_MASK 0x0000ffff
-#define NV50TCL_SCREEN_SCISSOR_VERT 0x00000ff8
-#define NV50TCL_SCREEN_SCISSOR_VERT_H_SHIFT 16
-#define NV50TCL_SCREEN_SCISSOR_VERT_H_MASK 0xffff0000
-#define NV50TCL_SCREEN_SCISSOR_VERT_Y_SHIFT 0
-#define NV50TCL_SCREEN_SCISSOR_VERT_Y_MASK 0x0000ffff
-#define NV50TCL_VERTEX_ARRAY_LIMIT_HIGH(x) (0x00001080+((x)*8))
-#define NV50TCL_VERTEX_ARRAY_LIMIT_HIGH__SIZE 0x00000010
-#define NV50TCL_VERTEX_ARRAY_LIMIT_LOW(x) (0x00001084+((x)*8))
-#define NV50TCL_VERTEX_ARRAY_LIMIT_LOW__SIZE 0x00000010
-#define NV50TCL_RT_CONTROL 0x0000121c
-#define NV50TCL_RT_CONTROL_COUNT_SHIFT 0
-#define NV50TCL_RT_CONTROL_COUNT_MASK 0x0000000f
-#define NV50TCL_RT_CONTROL_MAP0_SHIFT 4
-#define NV50TCL_RT_CONTROL_MAP0_MASK 0x00000070
-#define NV50TCL_RT_CONTROL_MAP1_SHIFT 7
-#define NV50TCL_RT_CONTROL_MAP1_MASK 0x00000380
-#define NV50TCL_RT_CONTROL_MAP2_SHIFT 10
-#define NV50TCL_RT_CONTROL_MAP2_MASK 0x00001c00
-#define NV50TCL_RT_CONTROL_MAP3_SHIFT 13
-#define NV50TCL_RT_CONTROL_MAP3_MASK 0x0000e000
-#define NV50TCL_RT_CONTROL_MAP4_SHIFT 16
-#define NV50TCL_RT_CONTROL_MAP4_MASK 0x00070000
-#define NV50TCL_RT_CONTROL_MAP5_SHIFT 19
-#define NV50TCL_RT_CONTROL_MAP5_MASK 0x00380000
-#define NV50TCL_RT_CONTROL_MAP6_SHIFT 22
-#define NV50TCL_RT_CONTROL_MAP6_MASK 0x01c00000
-#define NV50TCL_RT_CONTROL_MAP7_SHIFT 25
-#define NV50TCL_RT_CONTROL_MAP7_MASK 0x0e000000
-#define NV50TCL_RT_ARRAY_MODE 0x00001224
-#define NV50TCL_RT_ARRAY_MODE_LAYERS_SHIFT 0
-#define NV50TCL_RT_ARRAY_MODE_LAYERS_MASK 0x0000ffff
-#define NV50TCL_RT_ARRAY_MODE_VOLUME (1 << 16)
-#define NV50TCL_ZETA_HORIZ 0x00001228
-#define NV50TCL_ZETA_VERT 0x0000122c
-#define NV50TCL_ZETA_ARRAY_MODE 0x00001230
-#define NV50TCL_ZETA_ARRAY_MODE_LAYERS_SHIFT 0
-#define NV50TCL_ZETA_ARRAY_MODE_LAYERS_MASK 0x0000ffff
-#define NV50TCL_ZETA_ARRAY_MODE_UNK (1 << 16)
-#define NV50TCL_LINKED_TSC 0x00001234
-#define NV50TCL_RT_HORIZ(x) (0x00001240+((x)*8))
-#define NV50TCL_RT_HORIZ__SIZE 0x00000008
-#define NV50TCL_RT_VERT(x) (0x00001244+((x)*8))
-#define NV50TCL_RT_VERT__SIZE 0x00000008
-#define NV50TCL_CB_DEF_ADDRESS_HIGH 0x00001280
-#define NV50TCL_CB_DEF_ADDRESS_LOW 0x00001284
-#define NV50TCL_CB_DEF_SET 0x00001288
-#define NV50TCL_CB_DEF_SET_SIZE_SHIFT 0
-#define NV50TCL_CB_DEF_SET_SIZE_MASK 0x0000ffff
-#define NV50TCL_CB_DEF_SET_BUFFER_SHIFT 16
-#define NV50TCL_CB_DEF_SET_BUFFER_MASK 0x007f0000
-#define NV50TCL_STRMOUT_BUFFERS_CTRL 0x00001294
-#define NV50TCL_STRMOUT_BUFFERS_CTRL_INTERLEAVED (1 << 0)
-#define NV50TCL_STRMOUT_BUFFERS_CTRL_SEPARATE_SHIFT 4
-#define NV50TCL_STRMOUT_BUFFERS_CTRL_SEPARATE_MASK 0x000000f0
-#define NV50TCL_STRMOUT_BUFFERS_CTRL_STRIDE_SHIFT 8
-#define NV50TCL_STRMOUT_BUFFERS_CTRL_STRIDE_MASK 0x0000ff00
-#define NV50TCL_FP_RESULT_COUNT 0x00001298
-#define NV50TCL_DEPTH_TEST_ENABLE 0x000012cc
-#define NV50TCL_SHADE_MODEL 0x000012d4
-#define NV50TCL_SHADE_MODEL_FLAT 0x00001d00
-#define NV50TCL_SHADE_MODEL_SMOOTH 0x00001d01
-#define NV50TCL_LOCAL_ADDRESS_HIGH 0x000012d8
-#define NV50TCL_LOCAL_ADDRESS_LOW 0x000012dc
-#define NV50TCL_LOCAL_SIZE_LOG 0x000012e0
-#define NV50TCL_DEPTH_WRITE_ENABLE 0x000012e8
-#define NV50TCL_ALPHA_TEST_ENABLE 0x000012ec
-#define NV50TCL_PM_SET(x) (0x000012f0+((x)*4))
-#define NV50TCL_PM_SET__SIZE 0x00000004
-#define NV50TCL_VB_ELEMENT_U8_SETUP 0x00001300
-#define NV50TCL_VB_ELEMENT_U8_SETUP_OFFSET_SHIFT 30
-#define NV50TCL_VB_ELEMENT_U8_SETUP_OFFSET_MASK 0xc0000000
-#define NV50TCL_VB_ELEMENT_U8_SETUP_COUNT_SHIFT 0
-#define NV50TCL_VB_ELEMENT_U8_SETUP_COUNT_MASK 0x3fffffff
-#define NV50TCL_VB_ELEMENT_U8 0x00001304
-#define NV50TCL_VB_ELEMENT_U8_I0_SHIFT 0
-#define NV50TCL_VB_ELEMENT_U8_I0_MASK 0x000000ff
-#define NV50TCL_VB_ELEMENT_U8_I1_SHIFT 8
-#define NV50TCL_VB_ELEMENT_U8_I1_MASK 0x0000ff00
-#define NV50TCL_VB_ELEMENT_U8_I2_SHIFT 16
-#define NV50TCL_VB_ELEMENT_U8_I2_MASK 0x00ff0000
-#define NV50TCL_VB_ELEMENT_U8_I3_SHIFT 24
-#define NV50TCL_VB_ELEMENT_U8_I3_MASK 0xff000000
-#define NV50TCL_DEPTH_TEST_FUNC 0x0000130c
-#define NV50TCL_DEPTH_TEST_FUNC_NEVER 0x00000200
-#define NV50TCL_DEPTH_TEST_FUNC_LESS 0x00000201
-#define NV50TCL_DEPTH_TEST_FUNC_EQUAL 0x00000202
-#define NV50TCL_DEPTH_TEST_FUNC_LEQUAL 0x00000203
-#define NV50TCL_DEPTH_TEST_FUNC_GREATER 0x00000204
-#define NV50TCL_DEPTH_TEST_FUNC_NOTEQUAL 0x00000205
-#define NV50TCL_DEPTH_TEST_FUNC_GEQUAL 0x00000206
-#define NV50TCL_DEPTH_TEST_FUNC_ALWAYS 0x00000207
-#define NV50TCL_ALPHA_TEST_REF 0x00001310
-#define NV50TCL_ALPHA_TEST_FUNC 0x00001314
-#define NV50TCL_ALPHA_TEST_FUNC_NEVER 0x00000200
-#define NV50TCL_ALPHA_TEST_FUNC_LESS 0x00000201
-#define NV50TCL_ALPHA_TEST_FUNC_EQUAL 0x00000202
-#define NV50TCL_ALPHA_TEST_FUNC_LEQUAL 0x00000203
-#define NV50TCL_ALPHA_TEST_FUNC_GREATER 0x00000204
-#define NV50TCL_ALPHA_TEST_FUNC_NOTEQUAL 0x00000205
-#define NV50TCL_ALPHA_TEST_FUNC_GEQUAL 0x00000206
-#define NV50TCL_ALPHA_TEST_FUNC_ALWAYS 0x00000207
-#define NV50TCL_BLEND_COLOR(x) (0x0000131c+((x)*4))
-#define NV50TCL_BLEND_COLOR__SIZE 0x00000004
-#define NV50TCL_TIC_FLUSH 0x00001330
-#define NV50TCL_TSC_FLUSH 0x00001334
-#define NV50TCL_TEX_CACHE_CTL 0x00001338
-#define NV50TCL_BLEND_EQUATION_RGB 0x00001340
-#define NV50TCL_BLEND_EQUATION_RGB_FUNC_ADD 0x00008006
-#define NV50TCL_BLEND_EQUATION_RGB_MIN 0x00008007
-#define NV50TCL_BLEND_EQUATION_RGB_MAX 0x00008008
-#define NV50TCL_BLEND_EQUATION_RGB_FUNC_SUBTRACT 0x0000800a
-#define NV50TCL_BLEND_EQUATION_RGB_FUNC_REVERSE_SUBTRACT 0x0000800b
-#define NV50TCL_BLEND_FUNC_SRC_RGB 0x00001344
-#define NV50TCL_BLEND_FUNC_SRC_RGB_ZERO 0x00004000
-#define NV50TCL_BLEND_FUNC_SRC_RGB_ONE 0x00004001
-#define NV50TCL_BLEND_FUNC_SRC_RGB_SRC_COLOR 0x00004300
-#define NV50TCL_BLEND_FUNC_SRC_RGB_ONE_MINUS_SRC_COLOR 0x00004301
-#define NV50TCL_BLEND_FUNC_SRC_RGB_SRC_ALPHA 0x00004302
-#define NV50TCL_BLEND_FUNC_SRC_RGB_ONE_MINUS_SRC_ALPHA 0x00004303
-#define NV50TCL_BLEND_FUNC_SRC_RGB_DST_ALPHA 0x00004304
-#define NV50TCL_BLEND_FUNC_SRC_RGB_ONE_MINUS_DST_ALPHA 0x00004305
-#define NV50TCL_BLEND_FUNC_SRC_RGB_DST_COLOR 0x00004306
-#define NV50TCL_BLEND_FUNC_SRC_RGB_ONE_MINUS_DST_COLOR 0x00004307
-#define NV50TCL_BLEND_FUNC_SRC_RGB_SRC_ALPHA_SATURATE 0x00004308
-#define NV50TCL_BLEND_FUNC_SRC_RGB_CONSTANT_COLOR 0x0000c001
-#define NV50TCL_BLEND_FUNC_SRC_RGB_ONE_MINUS_CONSTANT_COLOR 0x0000c002
-#define NV50TCL_BLEND_FUNC_SRC_RGB_CONSTANT_ALPHA 0x0000c003
-#define NV50TCL_BLEND_FUNC_SRC_RGB_ONE_MINUS_CONSTANT_ALPHA 0x0000c004
-#define NV50TCL_BLEND_FUNC_SRC_RGB_SRC1_COLOR 0x0000c900
-#define NV50TCL_BLEND_FUNC_SRC_RGB_ONE_MINUS_SRC1_COLOR 0x0000c901
-#define NV50TCL_BLEND_FUNC_SRC_RGB_SRC1_ALPHA 0x0000c902
-#define NV50TCL_BLEND_FUNC_SRC_RGB_ONE_MINUS_SRC1_ALPHA 0x0000c903
-#define NV50TCL_BLEND_FUNC_DST_RGB 0x00001348
-#define NV50TCL_BLEND_FUNC_DST_RGB_ZERO 0x00004000
-#define NV50TCL_BLEND_FUNC_DST_RGB_ONE 0x00004001
-#define NV50TCL_BLEND_FUNC_DST_RGB_SRC_COLOR 0x00004300
-#define NV50TCL_BLEND_FUNC_DST_RGB_ONE_MINUS_SRC_COLOR 0x00004301
-#define NV50TCL_BLEND_FUNC_DST_RGB_SRC_ALPHA 0x00004302
-#define NV50TCL_BLEND_FUNC_DST_RGB_ONE_MINUS_SRC_ALPHA 0x00004303
-#define NV50TCL_BLEND_FUNC_DST_RGB_DST_ALPHA 0x00004304
-#define NV50TCL_BLEND_FUNC_DST_RGB_ONE_MINUS_DST_ALPHA 0x00004305
-#define NV50TCL_BLEND_FUNC_DST_RGB_DST_COLOR 0x00004306
-#define NV50TCL_BLEND_FUNC_DST_RGB_ONE_MINUS_DST_COLOR 0x00004307
-#define NV50TCL_BLEND_FUNC_DST_RGB_SRC_ALPHA_SATURATE 0x00004308
-#define NV50TCL_BLEND_FUNC_DST_RGB_CONSTANT_COLOR 0x0000c001
-#define NV50TCL_BLEND_FUNC_DST_RGB_ONE_MINUS_CONSTANT_COLOR 0x0000c002
-#define NV50TCL_BLEND_FUNC_DST_RGB_CONSTANT_ALPHA 0x0000c003
-#define NV50TCL_BLEND_FUNC_DST_RGB_ONE_MINUS_CONSTANT_ALPHA 0x0000c004
-#define NV50TCL_BLEND_FUNC_DST_RGB_SRC1_COLOR 0x0000c900
-#define NV50TCL_BLEND_FUNC_DST_RGB_ONE_MINUS_SRC1_COLOR 0x0000c901
-#define NV50TCL_BLEND_FUNC_DST_RGB_SRC1_ALPHA 0x0000c902
-#define NV50TCL_BLEND_FUNC_DST_RGB_ONE_MINUS_SRC1_ALPHA 0x0000c903
-#define NV50TCL_BLEND_EQUATION_ALPHA 0x0000134c
-#define NV50TCL_BLEND_EQUATION_ALPHA_FUNC_ADD 0x00008006
-#define NV50TCL_BLEND_EQUATION_ALPHA_MIN 0x00008007
-#define NV50TCL_BLEND_EQUATION_ALPHA_MAX 0x00008008
-#define NV50TCL_BLEND_EQUATION_ALPHA_FUNC_SUBTRACT 0x0000800a
-#define NV50TCL_BLEND_EQUATION_ALPHA_FUNC_REVERSE_SUBTRACT 0x0000800b
-#define NV50TCL_BLEND_FUNC_SRC_ALPHA 0x00001350
-#define NV50TCL_BLEND_FUNC_SRC_ALPHA_ZERO 0x00004000
-#define NV50TCL_BLEND_FUNC_SRC_ALPHA_ONE 0x00004001
-#define NV50TCL_BLEND_FUNC_SRC_ALPHA_SRC_COLOR 0x00004300
-#define NV50TCL_BLEND_FUNC_SRC_ALPHA_ONE_MINUS_SRC_COLOR 0x00004301
-#define NV50TCL_BLEND_FUNC_SRC_ALPHA_SRC_ALPHA 0x00004302
-#define NV50TCL_BLEND_FUNC_SRC_ALPHA_ONE_MINUS_SRC_ALPHA 0x00004303
-#define NV50TCL_BLEND_FUNC_SRC_ALPHA_DST_ALPHA 0x00004304
-#define NV50TCL_BLEND_FUNC_SRC_ALPHA_ONE_MINUS_DST_ALPHA 0x00004305
-#define NV50TCL_BLEND_FUNC_SRC_ALPHA_DST_COLOR 0x00004306
-#define NV50TCL_BLEND_FUNC_SRC_ALPHA_ONE_MINUS_DST_COLOR 0x00004307
-#define NV50TCL_BLEND_FUNC_SRC_ALPHA_SRC_ALPHA_SATURATE 0x00004308
-#define NV50TCL_BLEND_FUNC_SRC_ALPHA_CONSTANT_COLOR 0x0000c001
-#define NV50TCL_BLEND_FUNC_SRC_ALPHA_ONE_MINUS_CONSTANT_COLOR 0x0000c002
-#define NV50TCL_BLEND_FUNC_SRC_ALPHA_CONSTANT_ALPHA 0x0000c003
-#define NV50TCL_BLEND_FUNC_SRC_ALPHA_ONE_MINUS_CONSTANT_ALPHA 0x0000c004
-#define NV50TCL_BLEND_FUNC_SRC_ALPHA_SRC1_COLOR 0x0000c900
-#define NV50TCL_BLEND_FUNC_SRC_ALPHA_ONE_MINUS_SRC1_COLOR 0x0000c901
-#define NV50TCL_BLEND_FUNC_SRC_ALPHA_SRC1_ALPHA 0x0000c902
-#define NV50TCL_BLEND_FUNC_SRC_ALPHA_ONE_MINUS_SRC1_ALPHA 0x0000c903
-#define NV50TCL_BLEND_FUNC_DST_ALPHA 0x00001358
-#define NV50TCL_BLEND_FUNC_DST_ALPHA_ZERO 0x00004000
-#define NV50TCL_BLEND_FUNC_DST_ALPHA_ONE 0x00004001
-#define NV50TCL_BLEND_FUNC_DST_ALPHA_SRC_COLOR 0x00004300
-#define NV50TCL_BLEND_FUNC_DST_ALPHA_ONE_MINUS_SRC_COLOR 0x00004301
-#define NV50TCL_BLEND_FUNC_DST_ALPHA_SRC_ALPHA 0x00004302
-#define NV50TCL_BLEND_FUNC_DST_ALPHA_ONE_MINUS_SRC_ALPHA 0x00004303
-#define NV50TCL_BLEND_FUNC_DST_ALPHA_DST_ALPHA 0x00004304
-#define NV50TCL_BLEND_FUNC_DST_ALPHA_ONE_MINUS_DST_ALPHA 0x00004305
-#define NV50TCL_BLEND_FUNC_DST_ALPHA_DST_COLOR 0x00004306
-#define NV50TCL_BLEND_FUNC_DST_ALPHA_ONE_MINUS_DST_COLOR 0x00004307
-#define NV50TCL_BLEND_FUNC_DST_ALPHA_SRC_ALPHA_SATURATE 0x00004308
-#define NV50TCL_BLEND_FUNC_DST_ALPHA_CONSTANT_COLOR 0x0000c001
-#define NV50TCL_BLEND_FUNC_DST_ALPHA_ONE_MINUS_CONSTANT_COLOR 0x0000c002
-#define NV50TCL_BLEND_FUNC_DST_ALPHA_CONSTANT_ALPHA 0x0000c003
-#define NV50TCL_BLEND_FUNC_DST_ALPHA_ONE_MINUS_CONSTANT_ALPHA 0x0000c004
-#define NV50TCL_BLEND_FUNC_DST_ALPHA_SRC1_COLOR 0x0000c900
-#define NV50TCL_BLEND_FUNC_DST_ALPHA_ONE_MINUS_SRC1_COLOR 0x0000c901
-#define NV50TCL_BLEND_FUNC_DST_ALPHA_SRC1_ALPHA 0x0000c902
-#define NV50TCL_BLEND_FUNC_DST_ALPHA_ONE_MINUS_SRC1_ALPHA 0x0000c903
-#define NV50TCL_BLEND_ENABLE(x) (0x00001360+((x)*4))
-#define NV50TCL_BLEND_ENABLE__SIZE 0x00000008
-#define NV50TCL_STENCIL_FRONT_ENABLE 0x00001380
-#define NV50TCL_STENCIL_FRONT_OP_FAIL 0x00001384
-#define NV50TCL_STENCIL_FRONT_OP_FAIL_ZERO 0x00000000
-#define NV50TCL_STENCIL_FRONT_OP_FAIL_INVERT 0x0000150a
-#define NV50TCL_STENCIL_FRONT_OP_FAIL_KEEP 0x00001e00
-#define NV50TCL_STENCIL_FRONT_OP_FAIL_REPLACE 0x00001e01
-#define NV50TCL_STENCIL_FRONT_OP_FAIL_INCR 0x00001e02
-#define NV50TCL_STENCIL_FRONT_OP_FAIL_DECR 0x00001e03
-#define NV50TCL_STENCIL_FRONT_OP_FAIL_INCR_WRAP 0x00008507
-#define NV50TCL_STENCIL_FRONT_OP_FAIL_DECR_WRAP 0x00008508
-#define NV50TCL_STENCIL_FRONT_OP_ZFAIL 0x00001388
-#define NV50TCL_STENCIL_FRONT_OP_ZFAIL_ZERO 0x00000000
-#define NV50TCL_STENCIL_FRONT_OP_ZFAIL_INVERT 0x0000150a
-#define NV50TCL_STENCIL_FRONT_OP_ZFAIL_KEEP 0x00001e00
-#define NV50TCL_STENCIL_FRONT_OP_ZFAIL_REPLACE 0x00001e01
-#define NV50TCL_STENCIL_FRONT_OP_ZFAIL_INCR 0x00001e02
-#define NV50TCL_STENCIL_FRONT_OP_ZFAIL_DECR 0x00001e03
-#define NV50TCL_STENCIL_FRONT_OP_ZFAIL_INCR_WRAP 0x00008507
-#define NV50TCL_STENCIL_FRONT_OP_ZFAIL_DECR_WRAP 0x00008508
-#define NV50TCL_STENCIL_FRONT_OP_ZPASS 0x0000138c
-#define NV50TCL_STENCIL_FRONT_OP_ZPASS_ZERO 0x00000000
-#define NV50TCL_STENCIL_FRONT_OP_ZPASS_INVERT 0x0000150a
-#define NV50TCL_STENCIL_FRONT_OP_ZPASS_KEEP 0x00001e00
-#define NV50TCL_STENCIL_FRONT_OP_ZPASS_REPLACE 0x00001e01
-#define NV50TCL_STENCIL_FRONT_OP_ZPASS_INCR 0x00001e02
-#define NV50TCL_STENCIL_FRONT_OP_ZPASS_DECR 0x00001e03
-#define NV50TCL_STENCIL_FRONT_OP_ZPASS_INCR_WRAP 0x00008507
-#define NV50TCL_STENCIL_FRONT_OP_ZPASS_DECR_WRAP 0x00008508
-#define NV50TCL_STENCIL_FRONT_FUNC_FUNC 0x00001390
-#define NV50TCL_STENCIL_FRONT_FUNC_FUNC_NEVER 0x00000200
-#define NV50TCL_STENCIL_FRONT_FUNC_FUNC_LESS 0x00000201
-#define NV50TCL_STENCIL_FRONT_FUNC_FUNC_EQUAL 0x00000202
-#define NV50TCL_STENCIL_FRONT_FUNC_FUNC_LEQUAL 0x00000203
-#define NV50TCL_STENCIL_FRONT_FUNC_FUNC_GREATER 0x00000204
-#define NV50TCL_STENCIL_FRONT_FUNC_FUNC_NOTEQUAL 0x00000205
-#define NV50TCL_STENCIL_FRONT_FUNC_FUNC_GEQUAL 0x00000206
-#define NV50TCL_STENCIL_FRONT_FUNC_FUNC_ALWAYS 0x00000207
-#define NV50TCL_STENCIL_FRONT_FUNC_REF 0x00001394
-#define NV50TCL_STENCIL_FRONT_MASK 0x00001398
-#define NV50TCL_STENCIL_FRONT_FUNC_MASK 0x0000139c
-#define NV50TCL_FRAG_COLOR_CLAMP_EN 0x000013a8
-#define NV50TCL_Y_ORIGIN_BOTTOM 0x000013ac
-#define NV50TCL_LINE_WIDTH 0x000013b0
-#define NV50TCL_TEX_LIMITS(x) (0x000013b4+((x)*4))
-#define NV50TCL_TEX_LIMITS__SIZE 0x00000003
-#define NV50TCL_TEX_LIMITS_SAMPLERS_LOG2_SHIFT 0
-#define NV50TCL_TEX_LIMITS_SAMPLERS_LOG2_MASK 0x0000000f
-#define NV50TCL_TEX_LIMITS_TEXTURES_LOG2_SHIFT 4
-#define NV50TCL_TEX_LIMITS_TEXTURES_LOG2_MASK 0x000000f0
-#define NV50TCL_POINT_COORD_REPLACE_MAP(x) (0x000013c0+((x)*4))
-#define NV50TCL_POINT_COORD_REPLACE_MAP__SIZE 0x00000008
-#define NV50TCL_VP_START_ID 0x0000140c
-#define NV50TCL_GP_START_ID 0x00001410
-#define NV50TCL_FP_START_ID 0x00001414
-#define NV50TCL_GP_VERTEX_OUTPUT_COUNT 0x00001420
-#define NV50TCL_VB_ELEMENT_BASE 0x00001434
-#define NV50TCL_CLEAR_FLAGS 0x0000143c
-#define NV50TCL_CLEAR_FLAGS_OGL (1 << 0)
-#define NV50TCL_CLEAR_FLAGS_D3D (1 << 4)
-#define NV50TCL_INSTANCE_BASE 0x00001438
-#define NV50TCL_CODE_CB_FLUSH 0x00001440
-#define NV50TCL_BIND_TSC(x) (0x00001444+((x)*8))
-#define NV50TCL_BIND_TSC__SIZE 0x00000003
-#define NV50TCL_BIND_TSC_VALID (1 << 0)
-#define NV50TCL_BIND_TSC_SAMPLER_SHIFT 4
-#define NV50TCL_BIND_TSC_SAMPLER_MASK 0x000000f0
-#define NV50TCL_BIND_TSC_TSC_SHIFT 12
-#define NV50TCL_BIND_TSC_TSC_MASK 0x001ff000
-#define NV50TCL_BIND_TIC(x) (0x00001448+((x)*8))
-#define NV50TCL_BIND_TIC__SIZE 0x00000003
-#define NV50TCL_BIND_TIC_VALID (1 << 0)
-#define NV50TCL_BIND_TIC_TEXTURE_SHIFT 1
-#define NV50TCL_BIND_TIC_TEXTURE_MASK 0x000001fe
-#define NV50TCL_BIND_TIC_TIC_SHIFT 9
-#define NV50TCL_BIND_TIC_TIC_MASK 0x7ffffe00
-#define NV50TCL_STRMOUT_MAP(x) (0x00001480+((x)*4))
-#define NV50TCL_STRMOUT_MAP__SIZE 0x00000020
-#define NV50TCL_CLIPID_HEIGHT 0x00001504
-#define NV50TCL_VP_CLIP_DISTANCE_ENABLE 0x00001510
-#define NV50TCL_VP_CLIP_DISTANCE_ENABLE_0 (1 << 0)
-#define NV50TCL_VP_CLIP_DISTANCE_ENABLE_1 (1 << 1)
-#define NV50TCL_VP_CLIP_DISTANCE_ENABLE_2 (1 << 2)
-#define NV50TCL_VP_CLIP_DISTANCE_ENABLE_3 (1 << 3)
-#define NV50TCL_VP_CLIP_DISTANCE_ENABLE_4 (1 << 4)
-#define NV50TCL_VP_CLIP_DISTANCE_ENABLE_5 (1 << 5)
-#define NV50TCL_VP_CLIP_DISTANCE_ENABLE_6 (1 << 6)
-#define NV50TCL_VP_CLIP_DISTANCE_ENABLE_7 (1 << 7)
-#define NV50TCL_SAMPLECNT_ENABLE 0x00001514
-#define NV50TCL_POINT_SIZE 0x00001518
-#define NV50TCL_POINT_SPRITE_ENABLE 0x00001520
-#define NV50TCL_SAMPLECNT_RESET 0x00001530
-#define NV50TCL_ZETA_ENABLE 0x00001538
-#define NV50TCL_MULTISAMPLE_CTRL 0x0000153c
-#define NV50TCL_MULTISAMPLE_CTRL_ALPHA_TO_COVERAGE (1 << 0)
-#define NV50TCL_MULTISAMPLE_CTRL_ALPHA_TO_ONE (1 << 4)
-#define NV50TCL_NOPERSPECTIVE_BITMAP(x) (0x00001540+((x)*4))
-#define NV50TCL_NOPERSPECTIVE_BITMAP__SIZE 0x00000004
-#define NV50TCL_COND_ADDRESS_HIGH 0x00001550
-#define NV50TCL_COND_ADDRESS_LOW 0x00001554
-#define NV50TCL_COND_MODE 0x00001558
-#define NV50TCL_COND_MODE_NEVER 0x00000000
-#define NV50TCL_COND_MODE_ALWAYS 0x00000001
-#define NV50TCL_COND_MODE_RES 0x00000002
-#define NV50TCL_COND_MODE_NOT_RES_AND_NOT_ID 0x00000003
-#define NV50TCL_COND_MODE_RES_OR_ID 0x00000004
-#define NV50TCL_TSC_ADDRESS_HIGH 0x0000155c
-#define NV50TCL_TSC_ADDRESS_LOW 0x00001560
-#define NV50TCL_TSC_LIMIT 0x00001564
-#define NV50TCL_POLYGON_OFFSET_FACTOR 0x0000156c
-#define NV50TCL_LINE_SMOOTH_ENABLE 0x00001570
-#define NV50TCL_TIC_ADDRESS_HIGH 0x00001574
-#define NV50TCL_TIC_ADDRESS_LOW 0x00001578
-#define NV50TCL_TIC_LIMIT 0x0000157c
-#define NV50TCL_PM_CONTROL(x) (0x00001580+((x)*4))
-#define NV50TCL_PM_CONTROL__SIZE 0x00000004
-#define NV50TCL_PM_CONTROL_UNK0 (1 << 0)
-#define NV50TCL_PM_CONTROL_UNK1_SHIFT 4
-#define NV50TCL_PM_CONTROL_UNK1_MASK 0x00000070
-#define NV50TCL_PM_CONTROL_UNK2_SHIFT 8
-#define NV50TCL_PM_CONTROL_UNK2_MASK 0xffffff00
-#define NV50TCL_STENCIL_BACK_ENABLE 0x00001594
-#define NV50TCL_STENCIL_BACK_OP_FAIL 0x00001598
-#define NV50TCL_STENCIL_BACK_OP_FAIL_ZERO 0x00000000
-#define NV50TCL_STENCIL_BACK_OP_FAIL_INVERT 0x0000150a
-#define NV50TCL_STENCIL_BACK_OP_FAIL_KEEP 0x00001e00
-#define NV50TCL_STENCIL_BACK_OP_FAIL_REPLACE 0x00001e01
-#define NV50TCL_STENCIL_BACK_OP_FAIL_INCR 0x00001e02
-#define NV50TCL_STENCIL_BACK_OP_FAIL_DECR 0x00001e03
-#define NV50TCL_STENCIL_BACK_OP_FAIL_INCR_WRAP 0x00008507
-#define NV50TCL_STENCIL_BACK_OP_FAIL_DECR_WRAP 0x00008508
-#define NV50TCL_STENCIL_BACK_OP_ZFAIL 0x0000159c
-#define NV50TCL_STENCIL_BACK_OP_ZFAIL_ZERO 0x00000000
-#define NV50TCL_STENCIL_BACK_OP_ZFAIL_INVERT 0x0000150a
-#define NV50TCL_STENCIL_BACK_OP_ZFAIL_KEEP 0x00001e00
-#define NV50TCL_STENCIL_BACK_OP_ZFAIL_REPLACE 0x00001e01
-#define NV50TCL_STENCIL_BACK_OP_ZFAIL_INCR 0x00001e02
-#define NV50TCL_STENCIL_BACK_OP_ZFAIL_DECR 0x00001e03
-#define NV50TCL_STENCIL_BACK_OP_ZFAIL_INCR_WRAP 0x00008507
-#define NV50TCL_STENCIL_BACK_OP_ZFAIL_DECR_WRAP 0x00008508
-#define NV50TCL_STENCIL_BACK_OP_ZPASS 0x000015a0
-#define NV50TCL_STENCIL_BACK_OP_ZPASS_ZERO 0x00000000
-#define NV50TCL_STENCIL_BACK_OP_ZPASS_INVERT 0x0000150a
-#define NV50TCL_STENCIL_BACK_OP_ZPASS_KEEP 0x00001e00
-#define NV50TCL_STENCIL_BACK_OP_ZPASS_REPLACE 0x00001e01
-#define NV50TCL_STENCIL_BACK_OP_ZPASS_INCR 0x00001e02
-#define NV50TCL_STENCIL_BACK_OP_ZPASS_DECR 0x00001e03
-#define NV50TCL_STENCIL_BACK_OP_ZPASS_INCR_WRAP 0x00008507
-#define NV50TCL_STENCIL_BACK_OP_ZPASS_DECR_WRAP 0x00008508
-#define NV50TCL_STENCIL_BACK_FUNC_FUNC 0x000015a4
-#define NV50TCL_STENCIL_BACK_FUNC_FUNC_NEVER 0x00000200
-#define NV50TCL_STENCIL_BACK_FUNC_FUNC_LESS 0x00000201
-#define NV50TCL_STENCIL_BACK_FUNC_FUNC_EQUAL 0x00000202
-#define NV50TCL_STENCIL_BACK_FUNC_FUNC_LEQUAL 0x00000203
-#define NV50TCL_STENCIL_BACK_FUNC_FUNC_GREATER 0x00000204
-#define NV50TCL_STENCIL_BACK_FUNC_FUNC_NOTEQUAL 0x00000205
-#define NV50TCL_STENCIL_BACK_FUNC_FUNC_GEQUAL 0x00000206
-#define NV50TCL_STENCIL_BACK_FUNC_FUNC_ALWAYS 0x00000207
-#define NV50TCL_FRAMEBUFFER_SRGB 0x000015b8
-#define NV50TCL_POLYGON_OFFSET_UNITS 0x000015bc
-#define NV50TCL_GP_BUILTIN_RESULT_EN 0x000015cc
-#define NV50TCL_GP_BUILTIN_RESULT_EN_VPORT_IDX (1 << 0)
-#define NV50TCL_GP_BUILTIN_RESULT_EN_LAYER_IDX (1 << 16)
-#define NV50TCL_MULTISAMPLE_MODE 0x000015d0
-#define NV50TCL_MULTISAMPLE_MODE_1X 0x00000000
-#define NV50TCL_MULTISAMPLE_MODE_2XMS 0x00000001
-#define NV50TCL_MULTISAMPLE_MODE_4XMS 0x00000002
-#define NV50TCL_MULTISAMPLE_MODE_8XMS 0x00000004
-#define NV50TCL_MULTISAMPLE_MODE_4XMS_4XCS 0x00000008
-#define NV50TCL_MULTISAMPLE_MODE_4XMS_12XCS 0x00000009
-#define NV50TCL_MULTISAMPLE_MODE_8XMS_8XCS 0x0000000a
-#define NV50TCL_VERTEX_BEGIN 0x000015dc
-#define NV50TCL_VERTEX_BEGIN_POINTS 0x00000000
-#define NV50TCL_VERTEX_BEGIN_LINES 0x00000001
-#define NV50TCL_VERTEX_BEGIN_LINE_LOOP 0x00000002
-#define NV50TCL_VERTEX_BEGIN_LINE_STRIP 0x00000003
-#define NV50TCL_VERTEX_BEGIN_TRIANGLES 0x00000004
-#define NV50TCL_VERTEX_BEGIN_TRIANGLE_STRIP 0x00000005
-#define NV50TCL_VERTEX_BEGIN_TRIANGLE_FAN 0x00000006
-#define NV50TCL_VERTEX_BEGIN_QUADS 0x00000007
-#define NV50TCL_VERTEX_BEGIN_QUAD_STRIP 0x00000008
-#define NV50TCL_VERTEX_BEGIN_POLYGON 0x00000009
-#define NV50TCL_VERTEX_BEGIN_LINES_ADJACENCY 0x0000000a
-#define NV50TCL_VERTEX_BEGIN_LINE_STRIP_ADJACENCY 0x0000000b
-#define NV50TCL_VERTEX_BEGIN_TRIANGLES_ADJACENCY 0x0000000c
-#define NV50TCL_VERTEX_BEGIN_TRIANGLE_STRIP_ADJACENCY 0x0000000d
-#define NV50TCL_VERTEX_BEGIN_PATCHES 0x0000000e
-#define NV50TCL_VERTEX_END 0x000015e0
-#define NV50TCL_EDGEFLAG_ENABLE 0x000015e4
-#define NV50TCL_VB_ELEMENT_U32 0x000015e8
-#define NV50TCL_VB_ELEMENT_U16_SETUP 0x000015ec
-#define NV50TCL_VB_ELEMENT_U16_SETUP_OFFSET_SHIFT 30
-#define NV50TCL_VB_ELEMENT_U16_SETUP_OFFSET_MASK 0xc0000000
-#define NV50TCL_VB_ELEMENT_U16_SETUP_COUNT_SHIFT 0
-#define NV50TCL_VB_ELEMENT_U16_SETUP_COUNT_MASK 0x3fffffff
-#define NV50TCL_VB_ELEMENT_U16 0x000015f0
-#define NV50TCL_VB_ELEMENT_U16_I0_SHIFT 0
-#define NV50TCL_VB_ELEMENT_U16_I0_MASK 0x0000ffff
-#define NV50TCL_VB_ELEMENT_U16_I1_SHIFT 16
-#define NV50TCL_VB_ELEMENT_U16_I1_MASK 0xffff0000
-#define NV50TCL_VERTEX_BASE_HIGH 0x000015f4
-#define NV50TCL_VERTEX_BASE_LOW 0x000015f8
-#define NV50TCL_VERTEX_DATA 0x00001640
-#define NV50TCL_PRIM_RESTART_ENABLE 0x00001644
-#define NV50TCL_PRIM_RESTART_INDEX 0x00001648
-#define NV50TCL_VP_GP_BUILTIN_ATTR_EN 0x0000164c
-#define NV50TCL_VP_GP_BUILTIN_ATTR_EN_VERTEX_ID (1 << 0)
-#define NV50TCL_VP_GP_BUILTIN_ATTR_EN_INSTANCE_ID (1 << 4)
-#define NV50TCL_VP_GP_BUILTIN_ATTR_EN_PRIMITIVE_ID (1 << 8)
-#define NV50TCL_VP_GP_BUILTIN_ATTR_EN_UNK12 (1 << 12)
-#define NV50TCL_VP_ATTR_EN_0 0x00001650
-#define NV50TCL_VP_ATTR_EN_0_7_SHIFT 28
-#define NV50TCL_VP_ATTR_EN_0_7_MASK 0xf0000000
-#define NV50TCL_VP_ATTR_EN_0_7_NONE 0x00000000
-#define NV50TCL_VP_ATTR_EN_0_7_XNNN 0x10000000
-#define NV50TCL_VP_ATTR_EN_0_7_NYNN 0x20000000
-#define NV50TCL_VP_ATTR_EN_0_7_XYNN 0x30000000
-#define NV50TCL_VP_ATTR_EN_0_7_NNZN 0x40000000
-#define NV50TCL_VP_ATTR_EN_0_7_XNZN 0x50000000
-#define NV50TCL_VP_ATTR_EN_0_7_NYZN 0x60000000
-#define NV50TCL_VP_ATTR_EN_0_7_XYZN 0x70000000
-#define NV50TCL_VP_ATTR_EN_0_7_NNNW 0x80000000
-#define NV50TCL_VP_ATTR_EN_0_7_XNNW 0x90000000
-#define NV50TCL_VP_ATTR_EN_0_7_NYNW 0xa0000000
-#define NV50TCL_VP_ATTR_EN_0_7_XYNW 0xb0000000
-#define NV50TCL_VP_ATTR_EN_0_7_NNZW 0xc0000000
-#define NV50TCL_VP_ATTR_EN_0_7_XNZW 0xd0000000
-#define NV50TCL_VP_ATTR_EN_0_7_NYZW 0xe0000000
-#define NV50TCL_VP_ATTR_EN_0_7_XYZW 0xf0000000
-#define NV50TCL_VP_ATTR_EN_0_6_SHIFT 24
-#define NV50TCL_VP_ATTR_EN_0_6_MASK 0x0f000000
-#define NV50TCL_VP_ATTR_EN_0_6_NONE 0x00000000
-#define NV50TCL_VP_ATTR_EN_0_6_XNNN 0x01000000
-#define NV50TCL_VP_ATTR_EN_0_6_NYNN 0x02000000
-#define NV50TCL_VP_ATTR_EN_0_6_XYNN 0x03000000
-#define NV50TCL_VP_ATTR_EN_0_6_NNZN 0x04000000
-#define NV50TCL_VP_ATTR_EN_0_6_XNZN 0x05000000
-#define NV50TCL_VP_ATTR_EN_0_6_NYZN 0x06000000
-#define NV50TCL_VP_ATTR_EN_0_6_XYZN 0x07000000
-#define NV50TCL_VP_ATTR_EN_0_6_NNNW 0x08000000
-#define NV50TCL_VP_ATTR_EN_0_6_XNNW 0x09000000
-#define NV50TCL_VP_ATTR_EN_0_6_NYNW 0x0a000000
-#define NV50TCL_VP_ATTR_EN_0_6_XYNW 0x0b000000
-#define NV50TCL_VP_ATTR_EN_0_6_NNZW 0x0c000000
-#define NV50TCL_VP_ATTR_EN_0_6_XNZW 0x0d000000
-#define NV50TCL_VP_ATTR_EN_0_6_NYZW 0x0e000000
-#define NV50TCL_VP_ATTR_EN_0_6_XYZW 0x0f000000
-#define NV50TCL_VP_ATTR_EN_0_5_SHIFT 20
-#define NV50TCL_VP_ATTR_EN_0_5_MASK 0x00f00000
-#define NV50TCL_VP_ATTR_EN_0_5_NONE 0x00000000
-#define NV50TCL_VP_ATTR_EN_0_5_XNNN 0x00100000
-#define NV50TCL_VP_ATTR_EN_0_5_NYNN 0x00200000
-#define NV50TCL_VP_ATTR_EN_0_5_XYNN 0x00300000
-#define NV50TCL_VP_ATTR_EN_0_5_NNZN 0x00400000
-#define NV50TCL_VP_ATTR_EN_0_5_XNZN 0x00500000
-#define NV50TCL_VP_ATTR_EN_0_5_NYZN 0x00600000
-#define NV50TCL_VP_ATTR_EN_0_5_XYZN 0x00700000
-#define NV50TCL_VP_ATTR_EN_0_5_NNNW 0x00800000
-#define NV50TCL_VP_ATTR_EN_0_5_XNNW 0x00900000
-#define NV50TCL_VP_ATTR_EN_0_5_NYNW 0x00a00000
-#define NV50TCL_VP_ATTR_EN_0_5_XYNW 0x00b00000
-#define NV50TCL_VP_ATTR_EN_0_5_NNZW 0x00c00000
-#define NV50TCL_VP_ATTR_EN_0_5_XNZW 0x00d00000
-#define NV50TCL_VP_ATTR_EN_0_5_NYZW 0x00e00000
-#define NV50TCL_VP_ATTR_EN_0_5_XYZW 0x00f00000
-#define NV50TCL_VP_ATTR_EN_0_4_SHIFT 16
-#define NV50TCL_VP_ATTR_EN_0_4_MASK 0x000f0000
-#define NV50TCL_VP_ATTR_EN_0_4_NONE 0x00000000
-#define NV50TCL_VP_ATTR_EN_0_4_XNNN 0x00010000
-#define NV50TCL_VP_ATTR_EN_0_4_NYNN 0x00020000
-#define NV50TCL_VP_ATTR_EN_0_4_XYNN 0x00030000
-#define NV50TCL_VP_ATTR_EN_0_4_NNZN 0x00040000
-#define NV50TCL_VP_ATTR_EN_0_4_XNZN 0x00050000
-#define NV50TCL_VP_ATTR_EN_0_4_NYZN 0x00060000
-#define NV50TCL_VP_ATTR_EN_0_4_XYZN 0x00070000
-#define NV50TCL_VP_ATTR_EN_0_4_NNNW 0x00080000
-#define NV50TCL_VP_ATTR_EN_0_4_XNNW 0x00090000
-#define NV50TCL_VP_ATTR_EN_0_4_NYNW 0x000a0000
-#define NV50TCL_VP_ATTR_EN_0_4_XYNW 0x000b0000
-#define NV50TCL_VP_ATTR_EN_0_4_NNZW 0x000c0000
-#define NV50TCL_VP_ATTR_EN_0_4_XNZW 0x000d0000
-#define NV50TCL_VP_ATTR_EN_0_4_NYZW 0x000e0000
-#define NV50TCL_VP_ATTR_EN_0_4_XYZW 0x000f0000
-#define NV50TCL_VP_ATTR_EN_0_3_SHIFT 12
-#define NV50TCL_VP_ATTR_EN_0_3_MASK 0x0000f000
-#define NV50TCL_VP_ATTR_EN_0_3_NONE 0x00000000
-#define NV50TCL_VP_ATTR_EN_0_3_XNNN 0x00001000
-#define NV50TCL_VP_ATTR_EN_0_3_NYNN 0x00002000
-#define NV50TCL_VP_ATTR_EN_0_3_XYNN 0x00003000
-#define NV50TCL_VP_ATTR_EN_0_3_NNZN 0x00004000
-#define NV50TCL_VP_ATTR_EN_0_3_XNZN 0x00005000
-#define NV50TCL_VP_ATTR_EN_0_3_NYZN 0x00006000
-#define NV50TCL_VP_ATTR_EN_0_3_XYZN 0x00007000
-#define NV50TCL_VP_ATTR_EN_0_3_NNNW 0x00008000
-#define NV50TCL_VP_ATTR_EN_0_3_XNNW 0x00009000
-#define NV50TCL_VP_ATTR_EN_0_3_NYNW 0x0000a000
-#define NV50TCL_VP_ATTR_EN_0_3_XYNW 0x0000b000
-#define NV50TCL_VP_ATTR_EN_0_3_NNZW 0x0000c000
-#define NV50TCL_VP_ATTR_EN_0_3_XNZW 0x0000d000
-#define NV50TCL_VP_ATTR_EN_0_3_NYZW 0x0000e000
-#define NV50TCL_VP_ATTR_EN_0_3_XYZW 0x0000f000
-#define NV50TCL_VP_ATTR_EN_0_2_SHIFT 8
-#define NV50TCL_VP_ATTR_EN_0_2_MASK 0x00000f00
-#define NV50TCL_VP_ATTR_EN_0_2_NONE 0x00000000
-#define NV50TCL_VP_ATTR_EN_0_2_XNNN 0x00000100
-#define NV50TCL_VP_ATTR_EN_0_2_NYNN 0x00000200
-#define NV50TCL_VP_ATTR_EN_0_2_XYNN 0x00000300
-#define NV50TCL_VP_ATTR_EN_0_2_NNZN 0x00000400
-#define NV50TCL_VP_ATTR_EN_0_2_XNZN 0x00000500
-#define NV50TCL_VP_ATTR_EN_0_2_NYZN 0x00000600
-#define NV50TCL_VP_ATTR_EN_0_2_XYZN 0x00000700
-#define NV50TCL_VP_ATTR_EN_0_2_NNNW 0x00000800
-#define NV50TCL_VP_ATTR_EN_0_2_XNNW 0x00000900
-#define NV50TCL_VP_ATTR_EN_0_2_NYNW 0x00000a00
-#define NV50TCL_VP_ATTR_EN_0_2_XYNW 0x00000b00
-#define NV50TCL_VP_ATTR_EN_0_2_NNZW 0x00000c00
-#define NV50TCL_VP_ATTR_EN_0_2_XNZW 0x00000d00
-#define NV50TCL_VP_ATTR_EN_0_2_NYZW 0x00000e00
-#define NV50TCL_VP_ATTR_EN_0_2_XYZW 0x00000f00
-#define NV50TCL_VP_ATTR_EN_0_1_SHIFT 4
-#define NV50TCL_VP_ATTR_EN_0_1_MASK 0x000000f0
-#define NV50TCL_VP_ATTR_EN_0_1_NONE 0x00000000
-#define NV50TCL_VP_ATTR_EN_0_1_XNNN 0x00000010
-#define NV50TCL_VP_ATTR_EN_0_1_NYNN 0x00000020
-#define NV50TCL_VP_ATTR_EN_0_1_XYNN 0x00000030
-#define NV50TCL_VP_ATTR_EN_0_1_NNZN 0x00000040
-#define NV50TCL_VP_ATTR_EN_0_1_XNZN 0x00000050
-#define NV50TCL_VP_ATTR_EN_0_1_NYZN 0x00000060
-#define NV50TCL_VP_ATTR_EN_0_1_XYZN 0x00000070
-#define NV50TCL_VP_ATTR_EN_0_1_NNNW 0x00000080
-#define NV50TCL_VP_ATTR_EN_0_1_XNNW 0x00000090
-#define NV50TCL_VP_ATTR_EN_0_1_NYNW 0x000000a0
-#define NV50TCL_VP_ATTR_EN_0_1_XYNW 0x000000b0
-#define NV50TCL_VP_ATTR_EN_0_1_NNZW 0x000000c0
-#define NV50TCL_VP_ATTR_EN_0_1_XNZW 0x000000d0
-#define NV50TCL_VP_ATTR_EN_0_1_NYZW 0x000000e0
-#define NV50TCL_VP_ATTR_EN_0_1_XYZW 0x000000f0
-#define NV50TCL_VP_ATTR_EN_0_0_SHIFT 0
-#define NV50TCL_VP_ATTR_EN_0_0_MASK 0x0000000f
-#define NV50TCL_VP_ATTR_EN_0_0_NONE 0x00000000
-#define NV50TCL_VP_ATTR_EN_0_0_XNNN 0x00000001
-#define NV50TCL_VP_ATTR_EN_0_0_NYNN 0x00000002
-#define NV50TCL_VP_ATTR_EN_0_0_XYNN 0x00000003
-#define NV50TCL_VP_ATTR_EN_0_0_NNZN 0x00000004
-#define NV50TCL_VP_ATTR_EN_0_0_XNZN 0x00000005
-#define NV50TCL_VP_ATTR_EN_0_0_NYZN 0x00000006
-#define NV50TCL_VP_ATTR_EN_0_0_XYZN 0x00000007
-#define NV50TCL_VP_ATTR_EN_0_0_NNNW 0x00000008
-#define NV50TCL_VP_ATTR_EN_0_0_XNNW 0x00000009
-#define NV50TCL_VP_ATTR_EN_0_0_NYNW 0x0000000a
-#define NV50TCL_VP_ATTR_EN_0_0_XYNW 0x0000000b
-#define NV50TCL_VP_ATTR_EN_0_0_NNZW 0x0000000c
-#define NV50TCL_VP_ATTR_EN_0_0_XNZW 0x0000000d
-#define NV50TCL_VP_ATTR_EN_0_0_NYZW 0x0000000e
-#define NV50TCL_VP_ATTR_EN_0_0_XYZW 0x0000000f
-#define NV50TCL_VP_ATTR_EN_1 0x00001654
-#define NV50TCL_VP_ATTR_EN_1_15_SHIFT 28
-#define NV50TCL_VP_ATTR_EN_1_15_MASK 0xf0000000
-#define NV50TCL_VP_ATTR_EN_1_15_NONE 0x00000000
-#define NV50TCL_VP_ATTR_EN_1_15_XNNN 0x10000000
-#define NV50TCL_VP_ATTR_EN_1_15_NYNN 0x20000000
-#define NV50TCL_VP_ATTR_EN_1_15_XYNN 0x30000000
-#define NV50TCL_VP_ATTR_EN_1_15_NNZN 0x40000000
-#define NV50TCL_VP_ATTR_EN_1_15_XNZN 0x50000000
-#define NV50TCL_VP_ATTR_EN_1_15_NYZN 0x60000000
-#define NV50TCL_VP_ATTR_EN_1_15_XYZN 0x70000000
-#define NV50TCL_VP_ATTR_EN_1_15_NNNW 0x80000000
-#define NV50TCL_VP_ATTR_EN_1_15_XNNW 0x90000000
-#define NV50TCL_VP_ATTR_EN_1_15_NYNW 0xa0000000
-#define NV50TCL_VP_ATTR_EN_1_15_XYNW 0xb0000000
-#define NV50TCL_VP_ATTR_EN_1_15_NNZW 0xc0000000
-#define NV50TCL_VP_ATTR_EN_1_15_XNZW 0xd0000000
-#define NV50TCL_VP_ATTR_EN_1_15_NYZW 0xe0000000
-#define NV50TCL_VP_ATTR_EN_1_15_XYZW 0xf0000000
-#define NV50TCL_VP_ATTR_EN_1_14_SHIFT 24
-#define NV50TCL_VP_ATTR_EN_1_14_MASK 0x0f000000
-#define NV50TCL_VP_ATTR_EN_1_14_NONE 0x00000000
-#define NV50TCL_VP_ATTR_EN_1_14_XNNN 0x01000000
-#define NV50TCL_VP_ATTR_EN_1_14_NYNN 0x02000000
-#define NV50TCL_VP_ATTR_EN_1_14_XYNN 0x03000000
-#define NV50TCL_VP_ATTR_EN_1_14_NNZN 0x04000000
-#define NV50TCL_VP_ATTR_EN_1_14_XNZN 0x05000000
-#define NV50TCL_VP_ATTR_EN_1_14_NYZN 0x06000000
-#define NV50TCL_VP_ATTR_EN_1_14_XYZN 0x07000000
-#define NV50TCL_VP_ATTR_EN_1_14_NNNW 0x08000000
-#define NV50TCL_VP_ATTR_EN_1_14_XNNW 0x09000000
-#define NV50TCL_VP_ATTR_EN_1_14_NYNW 0x0a000000
-#define NV50TCL_VP_ATTR_EN_1_14_XYNW 0x0b000000
-#define NV50TCL_VP_ATTR_EN_1_14_NNZW 0x0c000000
-#define NV50TCL_VP_ATTR_EN_1_14_XNZW 0x0d000000
-#define NV50TCL_VP_ATTR_EN_1_14_NYZW 0x0e000000
-#define NV50TCL_VP_ATTR_EN_1_14_XYZW 0x0f000000
-#define NV50TCL_VP_ATTR_EN_1_13_SHIFT 20
-#define NV50TCL_VP_ATTR_EN_1_13_MASK 0x00f00000
-#define NV50TCL_VP_ATTR_EN_1_13_NONE 0x00000000
-#define NV50TCL_VP_ATTR_EN_1_13_XNNN 0x00100000
-#define NV50TCL_VP_ATTR_EN_1_13_NYNN 0x00200000
-#define NV50TCL_VP_ATTR_EN_1_13_XYNN 0x00300000
-#define NV50TCL_VP_ATTR_EN_1_13_NNZN 0x00400000
-#define NV50TCL_VP_ATTR_EN_1_13_XNZN 0x00500000
-#define NV50TCL_VP_ATTR_EN_1_13_NYZN 0x00600000
-#define NV50TCL_VP_ATTR_EN_1_13_XYZN 0x00700000
-#define NV50TCL_VP_ATTR_EN_1_13_NNNW 0x00800000
-#define NV50TCL_VP_ATTR_EN_1_13_XNNW 0x00900000
-#define NV50TCL_VP_ATTR_EN_1_13_NYNW 0x00a00000
-#define NV50TCL_VP_ATTR_EN_1_13_XYNW 0x00b00000
-#define NV50TCL_VP_ATTR_EN_1_13_NNZW 0x00c00000
-#define NV50TCL_VP_ATTR_EN_1_13_XNZW 0x00d00000
-#define NV50TCL_VP_ATTR_EN_1_13_NYZW 0x00e00000
-#define NV50TCL_VP_ATTR_EN_1_13_XYZW 0x00f00000
-#define NV50TCL_VP_ATTR_EN_1_12_SHIFT 16
-#define NV50TCL_VP_ATTR_EN_1_12_MASK 0x000f0000
-#define NV50TCL_VP_ATTR_EN_1_12_NONE 0x00000000
-#define NV50TCL_VP_ATTR_EN_1_12_XNNN 0x00010000
-#define NV50TCL_VP_ATTR_EN_1_12_NYNN 0x00020000
-#define NV50TCL_VP_ATTR_EN_1_12_XYNN 0x00030000
-#define NV50TCL_VP_ATTR_EN_1_12_NNZN 0x00040000
-#define NV50TCL_VP_ATTR_EN_1_12_XNZN 0x00050000
-#define NV50TCL_VP_ATTR_EN_1_12_NYZN 0x00060000
-#define NV50TCL_VP_ATTR_EN_1_12_XYZN 0x00070000
-#define NV50TCL_VP_ATTR_EN_1_12_NNNW 0x00080000
-#define NV50TCL_VP_ATTR_EN_1_12_XNNW 0x00090000
-#define NV50TCL_VP_ATTR_EN_1_12_NYNW 0x000a0000
-#define NV50TCL_VP_ATTR_EN_1_12_XYNW 0x000b0000
-#define NV50TCL_VP_ATTR_EN_1_12_NNZW 0x000c0000
-#define NV50TCL_VP_ATTR_EN_1_12_XNZW 0x000d0000
-#define NV50TCL_VP_ATTR_EN_1_12_NYZW 0x000e0000
-#define NV50TCL_VP_ATTR_EN_1_12_XYZW 0x000f0000
-#define NV50TCL_VP_ATTR_EN_1_11_SHIFT 12
-#define NV50TCL_VP_ATTR_EN_1_11_MASK 0x0000f000
-#define NV50TCL_VP_ATTR_EN_1_11_NONE 0x00000000
-#define NV50TCL_VP_ATTR_EN_1_11_XNNN 0x00001000
-#define NV50TCL_VP_ATTR_EN_1_11_NYNN 0x00002000
-#define NV50TCL_VP_ATTR_EN_1_11_XYNN 0x00003000
-#define NV50TCL_VP_ATTR_EN_1_11_NNZN 0x00004000
-#define NV50TCL_VP_ATTR_EN_1_11_XNZN 0x00005000
-#define NV50TCL_VP_ATTR_EN_1_11_NYZN 0x00006000
-#define NV50TCL_VP_ATTR_EN_1_11_XYZN 0x00007000
-#define NV50TCL_VP_ATTR_EN_1_11_NNNW 0x00008000
-#define NV50TCL_VP_ATTR_EN_1_11_XNNW 0x00009000
-#define NV50TCL_VP_ATTR_EN_1_11_NYNW 0x0000a000
-#define NV50TCL_VP_ATTR_EN_1_11_XYNW 0x0000b000
-#define NV50TCL_VP_ATTR_EN_1_11_NNZW 0x0000c000
-#define NV50TCL_VP_ATTR_EN_1_11_XNZW 0x0000d000
-#define NV50TCL_VP_ATTR_EN_1_11_NYZW 0x0000e000
-#define NV50TCL_VP_ATTR_EN_1_11_XYZW 0x0000f000
-#define NV50TCL_VP_ATTR_EN_1_10_SHIFT 8
-#define NV50TCL_VP_ATTR_EN_1_10_MASK 0x00000f00
-#define NV50TCL_VP_ATTR_EN_1_10_NONE 0x00000000
-#define NV50TCL_VP_ATTR_EN_1_10_XNNN 0x00000100
-#define NV50TCL_VP_ATTR_EN_1_10_NYNN 0x00000200
-#define NV50TCL_VP_ATTR_EN_1_10_XYNN 0x00000300
-#define NV50TCL_VP_ATTR_EN_1_10_NNZN 0x00000400
-#define NV50TCL_VP_ATTR_EN_1_10_XNZN 0x00000500
-#define NV50TCL_VP_ATTR_EN_1_10_NYZN 0x00000600
-#define NV50TCL_VP_ATTR_EN_1_10_XYZN 0x00000700
-#define NV50TCL_VP_ATTR_EN_1_10_NNNW 0x00000800
-#define NV50TCL_VP_ATTR_EN_1_10_XNNW 0x00000900
-#define NV50TCL_VP_ATTR_EN_1_10_NYNW 0x00000a00
-#define NV50TCL_VP_ATTR_EN_1_10_XYNW 0x00000b00
-#define NV50TCL_VP_ATTR_EN_1_10_NNZW 0x00000c00
-#define NV50TCL_VP_ATTR_EN_1_10_XNZW 0x00000d00
-#define NV50TCL_VP_ATTR_EN_1_10_NYZW 0x00000e00
-#define NV50TCL_VP_ATTR_EN_1_10_XYZW 0x00000f00
-#define NV50TCL_VP_ATTR_EN_1_9_SHIFT 4
-#define NV50TCL_VP_ATTR_EN_1_9_MASK 0x000000f0
-#define NV50TCL_VP_ATTR_EN_1_9_NONE 0x00000000
-#define NV50TCL_VP_ATTR_EN_1_9_XNNN 0x00000010
-#define NV50TCL_VP_ATTR_EN_1_9_NYNN 0x00000020
-#define NV50TCL_VP_ATTR_EN_1_9_XYNN 0x00000030
-#define NV50TCL_VP_ATTR_EN_1_9_NNZN 0x00000040
-#define NV50TCL_VP_ATTR_EN_1_9_XNZN 0x00000050
-#define NV50TCL_VP_ATTR_EN_1_9_NYZN 0x00000060
-#define NV50TCL_VP_ATTR_EN_1_9_XYZN 0x00000070
-#define NV50TCL_VP_ATTR_EN_1_9_NNNW 0x00000080
-#define NV50TCL_VP_ATTR_EN_1_9_XNNW 0x00000090
-#define NV50TCL_VP_ATTR_EN_1_9_NYNW 0x000000a0
-#define NV50TCL_VP_ATTR_EN_1_9_XYNW 0x000000b0
-#define NV50TCL_VP_ATTR_EN_1_9_NNZW 0x000000c0
-#define NV50TCL_VP_ATTR_EN_1_9_XNZW 0x000000d0
-#define NV50TCL_VP_ATTR_EN_1_9_NYZW 0x000000e0
-#define NV50TCL_VP_ATTR_EN_1_9_XYZW 0x000000f0
-#define NV50TCL_VP_ATTR_EN_1_8_SHIFT 0
-#define NV50TCL_VP_ATTR_EN_1_8_MASK 0x0000000f
-#define NV50TCL_VP_ATTR_EN_1_8_NONE 0x00000000
-#define NV50TCL_VP_ATTR_EN_1_8_XNNN 0x00000001
-#define NV50TCL_VP_ATTR_EN_1_8_NYNN 0x00000002
-#define NV50TCL_VP_ATTR_EN_1_8_XYNN 0x00000003
-#define NV50TCL_VP_ATTR_EN_1_8_NNZN 0x00000004
-#define NV50TCL_VP_ATTR_EN_1_8_XNZN 0x00000005
-#define NV50TCL_VP_ATTR_EN_1_8_NYZN 0x00000006
-#define NV50TCL_VP_ATTR_EN_1_8_XYZN 0x00000007
-#define NV50TCL_VP_ATTR_EN_1_8_NNNW 0x00000008
-#define NV50TCL_VP_ATTR_EN_1_8_XNNW 0x00000009
-#define NV50TCL_VP_ATTR_EN_1_8_NYNW 0x0000000a
-#define NV50TCL_VP_ATTR_EN_1_8_XYNW 0x0000000b
-#define NV50TCL_VP_ATTR_EN_1_8_NNZW 0x0000000c
-#define NV50TCL_VP_ATTR_EN_1_8_XNZW 0x0000000d
-#define NV50TCL_VP_ATTR_EN_1_8_NYZW 0x0000000e
-#define NV50TCL_VP_ATTR_EN_1_8_XYZW 0x0000000f
-#define NV50TCL_POINT_SPRITE_CTRL 0x00001660
-#define NV50TCL_LINE_STIPPLE_ENABLE 0x0000166c
-#define NV50TCL_LINE_STIPPLE_PATTERN 0x00001680
-#define NV50TCL_PROVOKING_VERTEX_LAST 0x00001684
-#define NV50TCL_VERTEX_TWO_SIDE_ENABLE 0x00001688
-#define NV50TCL_POLYGON_STIPPLE_ENABLE 0x0000168c
-#define NV50TCL_SET_PROGRAM_CB 0x00001694
-#define NV50TCL_SET_PROGRAM_CB_PROGRAM_SHIFT 4
-#define NV50TCL_SET_PROGRAM_CB_PROGRAM_MASK 0x000000f0
-#define NV50TCL_SET_PROGRAM_CB_PROGRAM_VERTEX 0x00000000
-#define NV50TCL_SET_PROGRAM_CB_PROGRAM_GEOMETRY 0x00000020
-#define NV50TCL_SET_PROGRAM_CB_PROGRAM_FRAGMENT 0x00000030
-#define NV50TCL_SET_PROGRAM_CB_INDEX_SHIFT 8
-#define NV50TCL_SET_PROGRAM_CB_INDEX_MASK 0x00000f00
-#define NV50TCL_SET_PROGRAM_CB_BUFFER_SHIFT 12
-#define NV50TCL_SET_PROGRAM_CB_BUFFER_MASK 0x0007f000
-#define NV50TCL_SET_PROGRAM_CB_VALID (1 << 0)
-#define NV50TCL_VP_RESULT_MAP_SIZE 0x000016ac
-#define NV50TCL_VP_REG_ALLOC_TEMP 0x000016b0
-#define NV50TCL_VP_REG_ALLOC_RESULT 0x000016b8
-#define NV50TCL_VP_RESULT_MAP(x) (0x000016bc+((x)*4))
-#define NV50TCL_VP_RESULT_MAP__SIZE 0x00000010
-#define NV50TCL_VP_RESULT_MAP_0_SHIFT 0
-#define NV50TCL_VP_RESULT_MAP_0_MASK 0x000000ff
-#define NV50TCL_VP_RESULT_MAP_1_SHIFT 8
-#define NV50TCL_VP_RESULT_MAP_1_MASK 0x0000ff00
-#define NV50TCL_VP_RESULT_MAP_2_SHIFT 16
-#define NV50TCL_VP_RESULT_MAP_2_MASK 0x00ff0000
-#define NV50TCL_VP_RESULT_MAP_3_SHIFT 24
-#define NV50TCL_VP_RESULT_MAP_3_MASK 0xff000000
-#define NV50TCL_POLYGON_STIPPLE_PATTERN(x) (0x00001700+((x)*4))
-#define NV50TCL_POLYGON_STIPPLE_PATTERN__SIZE 0x00000020
-#define NV50TCL_GP_ENABLE 0x00001798
-#define NV50TCL_GP_REG_ALLOC_TEMP 0x000017a0
-#define NV50TCL_GP_REG_ALLOC_RESULT 0x000017a8
-#define NV50TCL_GP_RESULT_MAP_SIZE 0x000017ac
-#define NV50TCL_GP_OUTPUT_PRIMITIVE_TYPE 0x000017b0
-#define NV50TCL_GP_OUTPUT_PRIMITIVE_TYPE_POINTS 0x00000001
-#define NV50TCL_GP_OUTPUT_PRIMITIVE_TYPE_LINE_STRIP 0x00000002
-#define NV50TCL_GP_OUTPUT_PRIMITIVE_TYPE_TRIANGLE_STRIP 0x00000003
-#define NV50TCL_RASTERIZE_ENABLE 0x000017b4
-#define NV50TCL_STRMOUT_ENABLE 0x000017b8
-#define NV50TCL_GP_RESULT_MAP(x) (0x000017fc+((x)*4))
-#define NV50TCL_GP_RESULT_MAP__SIZE 0x00000020
-#define NV50TCL_GP_RESULT_MAP_0_SHIFT 0
-#define NV50TCL_GP_RESULT_MAP_0_MASK 0x000000ff
-#define NV50TCL_GP_RESULT_MAP_1_SHIFT 8
-#define NV50TCL_GP_RESULT_MAP_1_MASK 0x0000ff00
-#define NV50TCL_GP_RESULT_MAP_2_SHIFT 16
-#define NV50TCL_GP_RESULT_MAP_2_MASK 0x00ff0000
-#define NV50TCL_GP_RESULT_MAP_3_SHIFT 24
-#define NV50TCL_GP_RESULT_MAP_3_MASK 0xff000000
-#define NV50TCL_MAP_SEMANTIC_0 0x00001904
-#define NV50TCL_MAP_SEMANTIC_0_FFC0_ID_SHIFT 0
-#define NV50TCL_MAP_SEMANTIC_0_FFC0_ID_MASK 0x000000ff
-#define NV50TCL_MAP_SEMANTIC_0_BFC0_ID_SHIFT 8
-#define NV50TCL_MAP_SEMANTIC_0_BFC0_ID_MASK 0x0000ff00
-#define NV50TCL_MAP_SEMANTIC_0_COLR_NR_SHIFT 16
-#define NV50TCL_MAP_SEMANTIC_0_COLR_NR_MASK 0x00ff0000
-#define NV50TCL_MAP_SEMANTIC_0_CLMP_EN_SHIFT 24
-#define NV50TCL_MAP_SEMANTIC_0_CLMP_EN_MASK 0xff000000
-#define NV50TCL_MAP_SEMANTIC_1 0x00001908
-#define NV50TCL_MAP_SEMANTIC_1_CLIP_LO_SHIFT 0
-#define NV50TCL_MAP_SEMANTIC_1_CLIP_LO_MASK 0x000000ff
-#define NV50TCL_MAP_SEMANTIC_1_CLIP_HI_SHIFT 8
-#define NV50TCL_MAP_SEMANTIC_1_CLIP_HI_MASK 0x0000ff00
-#define NV50TCL_MAP_SEMANTIC_2 0x0000190c
-#define NV50TCL_MAP_SEMANTIC_2_LAYER_ID_SHIFT 0
-#define NV50TCL_MAP_SEMANTIC_2_LAYER_ID_MASK 0x000000ff
-#define NV50TCL_MAP_SEMANTIC_3 0x00001910
-#define NV50TCL_MAP_SEMANTIC_3_PTSZ_EN (1 << 0)
-#define NV50TCL_MAP_SEMANTIC_3_PTSZ_ID_SHIFT 4
-#define NV50TCL_MAP_SEMANTIC_3_PTSZ_ID_MASK 0x00000ff0
-#define NV50TCL_MAP_SEMANTIC_4 0x00001914
-#define NV50TCL_MAP_SEMANTIC_4_PRIM_ID_SHIFT 0
-#define NV50TCL_MAP_SEMANTIC_4_PRIM_ID_MASK 0x000000ff
-#define NV50TCL_CULL_FACE_ENABLE 0x00001918
-#define NV50TCL_FRONT_FACE 0x0000191c
-#define NV50TCL_FRONT_FACE_CW 0x00000900
-#define NV50TCL_FRONT_FACE_CCW 0x00000901
-#define NV50TCL_CULL_FACE 0x00001920
-#define NV50TCL_CULL_FACE_FRONT 0x00000404
-#define NV50TCL_CULL_FACE_BACK 0x00000405
-#define NV50TCL_CULL_FACE_FRONT_AND_BACK 0x00000408
-#define NV50TCL_VIEWPORT_TRANSFORM_EN 0x0000192c
-#define NV50TCL_VIEW_VOLUME_CLIP_CTRL 0x0000193c
-#define NV50TCL_VIEWPORT_CLIP_RECTS_EN 0x0000194c
-#define NV50TCL_VIEWPORT_CLIP_MODE 0x00001950
-#define NV50TCL_VIEWPORT_CLIP_MODE_INCLUDE 0x00000000
-#define NV50TCL_VIEWPORT_CLIP_MODE_EXCLUDE 0x00000001
-#define NV50TCL_VIEWPORT_CLIP_MODE_UNKNOWN 0x00000002
-#define NV50TCL_FP_CTRL_UNK196C 0x0000196c
-#define NV50TCL_CLIPID_ENABLE 0x0000197c
-#define NV50TCL_CLIPID_WIDTH 0x00001980
-#define NV50TCL_CLIPID_ID 0x00001984
-#define NV50TCL_FP_INTERPOLANT_CTRL 0x00001988
-#define NV50TCL_FP_INTERPOLANT_CTRL_UMASK_SHIFT 24
-#define NV50TCL_FP_INTERPOLANT_CTRL_UMASK_MASK 0xff000000
-#define NV50TCL_FP_INTERPOLANT_CTRL_UMASK_NONE 0x00000000
-#define NV50TCL_FP_INTERPOLANT_CTRL_UMASK_XNNN 0x01000000
-#define NV50TCL_FP_INTERPOLANT_CTRL_UMASK_NYNN 0x02000000
-#define NV50TCL_FP_INTERPOLANT_CTRL_UMASK_XYNN 0x03000000
-#define NV50TCL_FP_INTERPOLANT_CTRL_UMASK_NNZN 0x04000000
-#define NV50TCL_FP_INTERPOLANT_CTRL_UMASK_XNZN 0x05000000
-#define NV50TCL_FP_INTERPOLANT_CTRL_UMASK_NYZN 0x06000000
-#define NV50TCL_FP_INTERPOLANT_CTRL_UMASK_XYZN 0x07000000
-#define NV50TCL_FP_INTERPOLANT_CTRL_UMASK_NNNW 0x08000000
-#define NV50TCL_FP_INTERPOLANT_CTRL_UMASK_XNNW 0x09000000
-#define NV50TCL_FP_INTERPOLANT_CTRL_UMASK_NYNW 0x0a000000
-#define NV50TCL_FP_INTERPOLANT_CTRL_UMASK_XYNW 0x0b000000
-#define NV50TCL_FP_INTERPOLANT_CTRL_UMASK_NNZW 0x0c000000
-#define NV50TCL_FP_INTERPOLANT_CTRL_UMASK_XNZW 0x0d000000
-#define NV50TCL_FP_INTERPOLANT_CTRL_UMASK_NYZW 0x0e000000
-#define NV50TCL_FP_INTERPOLANT_CTRL_UMASK_XYZW 0x0f000000
-#define NV50TCL_FP_INTERPOLANT_CTRL_COUNT_NONFLAT_SHIFT 16
-#define NV50TCL_FP_INTERPOLANT_CTRL_COUNT_NONFLAT_MASK 0x00ff0000
-#define NV50TCL_FP_INTERPOLANT_CTRL_OFFSET_SHIFT 8
-#define NV50TCL_FP_INTERPOLANT_CTRL_OFFSET_MASK 0x0000ff00
-#define NV50TCL_FP_INTERPOLANT_CTRL_COUNT_SHIFT 0
-#define NV50TCL_FP_INTERPOLANT_CTRL_COUNT_MASK 0x000000ff
-#define NV50TCL_FP_REG_ALLOC_TEMP 0x0000198c
-#define NV50TCL_REG_MODE 0x000019a0
-#define NV50TCL_REG_MODE_PACKED 0x00000001
-#define NV50TCL_REG_MODE_STRIPED 0x00000002
-#define NV50TCL_FP_CONTROL 0x000019a8
-#define NV50TCL_FP_CONTROL_MULTIPLE_RESULTS (1 << 0)
-#define NV50TCL_FP_CONTROL_EXPORTS_Z (1 << 8)
-#define NV50TCL_FP_CONTROL_USES_KIL (1 << 20)
-#define NV50TCL_DEPTH_BOUNDS_EN 0x000019bc
-#define NV50TCL_LOGIC_OP_ENABLE 0x000019c4
-#define NV50TCL_LOGIC_OP 0x000019c8
-#define NV50TCL_LOGIC_OP_CLEAR 0x00001500
-#define NV50TCL_LOGIC_OP_AND 0x00001501
-#define NV50TCL_LOGIC_OP_AND_REVERSE 0x00001502
-#define NV50TCL_LOGIC_OP_COPY 0x00001503
-#define NV50TCL_LOGIC_OP_AND_INVERTED 0x00001504
-#define NV50TCL_LOGIC_OP_NOOP 0x00001505
-#define NV50TCL_LOGIC_OP_XOR 0x00001506
-#define NV50TCL_LOGIC_OP_OR 0x00001507
-#define NV50TCL_LOGIC_OP_NOR 0x00001508
-#define NV50TCL_LOGIC_OP_EQUIV 0x00001509
-#define NV50TCL_LOGIC_OP_INVERT 0x0000150a
-#define NV50TCL_LOGIC_OP_OR_REVERSE 0x0000150b
-#define NV50TCL_LOGIC_OP_COPY_INVERTED 0x0000150c
-#define NV50TCL_LOGIC_OP_OR_INVERTED 0x0000150d
-#define NV50TCL_LOGIC_OP_NAND 0x0000150e
-#define NV50TCL_LOGIC_OP_SET 0x0000150f
-#define NV50TCL_CLEAR_BUFFERS 0x000019d0
-#define NV50TCL_CLEAR_BUFFERS_Z (1 << 0)
-#define NV50TCL_CLEAR_BUFFERS_S (1 << 1)
-#define NV50TCL_CLEAR_BUFFERS_R (1 << 2)
-#define NV50TCL_CLEAR_BUFFERS_G (1 << 3)
-#define NV50TCL_CLEAR_BUFFERS_B (1 << 4)
-#define NV50TCL_CLEAR_BUFFERS_A (1 << 5)
-#define NV50TCL_CLEAR_BUFFERS_RT_SHIFT 6
-#define NV50TCL_CLEAR_BUFFERS_RT_MASK 0x000003c0
-#define NV50TCL_CLEAR_BUFFERS_LAYER_SHIFT 10
-#define NV50TCL_CLEAR_BUFFERS_LAYER_MASK 0x0007fc00
-#define NV50TCL_COLOR_MASK(x) (0x00001a00+((x)*4))
-#define NV50TCL_COLOR_MASK__SIZE 0x00000008
-#define NV50TCL_COLOR_MASK_R_SHIFT 0
-#define NV50TCL_COLOR_MASK_R_MASK 0x0000000f
-#define NV50TCL_COLOR_MASK_G_SHIFT 4
-#define NV50TCL_COLOR_MASK_G_MASK 0x000000f0
-#define NV50TCL_COLOR_MASK_B_SHIFT 8
-#define NV50TCL_COLOR_MASK_B_MASK 0x00000f00
-#define NV50TCL_COLOR_MASK_A_SHIFT 12
-#define NV50TCL_COLOR_MASK_A_MASK 0x0000f000
-#define NV50TCL_STRMOUT_ADDRESS_HIGH(x) (0x00001a80+((x)*16))
-#define NV50TCL_STRMOUT_ADDRESS_HIGH__SIZE 0x00000004
-#define NV50TCL_STRMOUT_ADDRESS_LOW(x) (0x00001a84+((x)*16))
-#define NV50TCL_STRMOUT_ADDRESS_LOW__SIZE 0x00000004
-#define NV50TCL_STRMOUT_NUM_ATTRIBS(x) (0x00001a88+((x)*16))
-#define NV50TCL_STRMOUT_NUM_ATTRIBS__SIZE 0x00000004
-#define NV50TCL_VERTEX_ARRAY_ATTRIB(x) (0x00001ac0+((x)*4))
-#define NV50TCL_VERTEX_ARRAY_ATTRIB__SIZE 0x00000010
-#define NV50TCL_VERTEX_ARRAY_ATTRIB_BUFFER_SHIFT 0
-#define NV50TCL_VERTEX_ARRAY_ATTRIB_BUFFER_MASK 0x0000000f
-#define NV50TCL_VERTEX_ARRAY_ATTRIB_CONST (1 << 4)
-#define NV50TCL_VERTEX_ARRAY_ATTRIB_OFFSET_SHIFT 5
-#define NV50TCL_VERTEX_ARRAY_ATTRIB_OFFSET_MASK 0x0007ffe0
-#define NV50TCL_VERTEX_ARRAY_ATTRIB_FORMAT_SHIFT 19
-#define NV50TCL_VERTEX_ARRAY_ATTRIB_FORMAT_MASK 0x01f80000
-#define NV50TCL_VERTEX_ARRAY_ATTRIB_FORMAT_32_32_32_32 0x00080000
-#define NV50TCL_VERTEX_ARRAY_ATTRIB_FORMAT_32_32_32 0x00100000
-#define NV50TCL_VERTEX_ARRAY_ATTRIB_FORMAT_16_16_16_16 0x00180000
-#define NV50TCL_VERTEX_ARRAY_ATTRIB_FORMAT_32_32 0x00200000
-#define NV50TCL_VERTEX_ARRAY_ATTRIB_FORMAT_16_16_16 0x00280000
-#define NV50TCL_VERTEX_ARRAY_ATTRIB_FORMAT_8_8_8_8 0x00500000
-#define NV50TCL_VERTEX_ARRAY_ATTRIB_FORMAT_16_16 0x00780000
-#define NV50TCL_VERTEX_ARRAY_ATTRIB_FORMAT_32 0x00900000
-#define NV50TCL_VERTEX_ARRAY_ATTRIB_FORMAT_8_8_8 0x00980000
-#define NV50TCL_VERTEX_ARRAY_ATTRIB_FORMAT_8_8 0x00c00000
-#define NV50TCL_VERTEX_ARRAY_ATTRIB_FORMAT_16 0x00d80000
-#define NV50TCL_VERTEX_ARRAY_ATTRIB_FORMAT_8 0x00e80000
-#define NV50TCL_VERTEX_ARRAY_ATTRIB_FORMAT_2_10_10_10 0x01800000
-#define NV50TCL_VERTEX_ARRAY_ATTRIB_TYPE_SHIFT 25
-#define NV50TCL_VERTEX_ARRAY_ATTRIB_TYPE_MASK 0x0e000000
-#define NV50TCL_VERTEX_ARRAY_ATTRIB_TYPE_FLOAT 0x0e000000
-#define NV50TCL_VERTEX_ARRAY_ATTRIB_TYPE_SNORM 0x02000000
-#define NV50TCL_VERTEX_ARRAY_ATTRIB_TYPE_UNORM 0x04000000
-#define NV50TCL_VERTEX_ARRAY_ATTRIB_TYPE_USCALED 0x0a000000
-#define NV50TCL_VERTEX_ARRAY_ATTRIB_TYPE_SSCALED 0x0c000000
-#define NV50TCL_VERTEX_ARRAY_ATTRIB_TYPE_UINT 0x08000000
-#define NV50TCL_VERTEX_ARRAY_ATTRIB_TYPE_SINT 0x06000000
-#define NV50TCL_VERTEX_ARRAY_ATTRIB_BGRA (1 << 31)
-#define NV50TCL_QUERY_ADDRESS_HIGH 0x00001b00
-#define NV50TCL_QUERY_ADDRESS_LOW 0x00001b04
-#define NV50TCL_QUERY_SEQUENCE 0x00001b08
-#define NV50TCL_QUERY_GET 0x00001b0c
-
-
-#define NV84TCL 0x00008297
-
-
-
-#define NVA0TCL 0x00008397
-
-
-
-#define NVA8TCL 0x00008597
-
-
-
-#define NV50_COMPUTE 0x000050c0
-
-#define NV50_COMPUTE_NOP 0x00000100
-#define NV50_COMPUTE_NOTIFY 0x00000104
-#define NV50_COMPUTE_SERIALIZE 0x00000110
-#define NV50_COMPUTE_DMA_NOTIFY 0x00000180
-#define NV50_COMPUTE_DMA_GLOBAL 0x000001a0
-#define NV50_COMPUTE_DMA_QUERY 0x000001a4
-#define NV50_COMPUTE_DMA_LOCAL 0x000001b8
-#define NV50_COMPUTE_DMA_STACK 0x000001bc
-#define NV50_COMPUTE_DMA_CODE_CB 0x000001c0
-#define NV50_COMPUTE_DMA_TSC 0x000001c4
-#define NV50_COMPUTE_DMA_TIC 0x000001c8
-#define NV50_COMPUTE_DMA_TEXTURE 0x000001cc
-#define NV50_COMPUTE_CP_ADDRESS_HIGH 0x00000210
-#define NV50_COMPUTE_CP_ADDRESS_LOW 0x00000214
-#define NV50_COMPUTE_STACK_ADDRESS_HIGH 0x00000218
-#define NV50_COMPUTE_STACK_ADDRESS_LOW 0x0000021c
-#define NV50_COMPUTE_STACK_SIZE_LOG 0x00000220
-#define NV50_COMPUTE_TSC_ADDRESS_HIGH 0x0000022c
-#define NV50_COMPUTE_TSC_ADDRESS_LOW 0x00000230
-#define NV50_COMPUTE_TSC_LIMIT 0x00000234
-#define NV50_COMPUTE_CB_ADDR 0x00000238
-#define NV50_COMPUTE_CB_ADDR_ID_SHIFT 8
-#define NV50_COMPUTE_CB_ADDR_ID_MASK 0x003fff00
-#define NV50_COMPUTE_CB_ADDR_BUFFER_SHIFT 0
-#define NV50_COMPUTE_CB_ADDR_BUFFER_MASK 0x0000007f
-#define NV50_COMPUTE_CB_DATA(x) (0x0000023c+((x)*4))
-#define NV50_COMPUTE_CB_DATA__SIZE 0x00000010
-#define NV50_COMPUTE_DELAY1 0x00000284
-#define NV50_COMPUTE_WATCHDOG_TIMER 0x00000288
-#define NV50_COMPUTE_DELAY2 0x0000028c
-#define NV50_COMPUTE_LOCAL_ADDRESS_HIGH 0x00000294
-#define NV50_COMPUTE_LOCAL_ADDRESS_LOW 0x00000298
-#define NV50_COMPUTE_LOCAL_SIZE_LOG 0x0000029c
-#define NV50_COMPUTE_CB_DEF_ADDRESS_HIGH 0x000002a4
-#define NV50_COMPUTE_CB_DEF_ADDRESS_LOW 0x000002a8
-#define NV50_COMPUTE_CB_DEF_SET 0x000002ac
-#define NV50_COMPUTE_CB_DEF_SET_SIZE_SHIFT 0
-#define NV50_COMPUTE_CB_DEF_SET_SIZE_MASK 0x0000ffff
-#define NV50_COMPUTE_CB_DEF_SET_BUFFER_SHIFT 16
-#define NV50_COMPUTE_CB_DEF_SET_BUFFER_MASK 0x007f0000
-#define NV50_COMPUTE_BLOCK_ALLOC 0x000002b4
-#define NV50_COMPUTE_BLOCK_ALLOC_THREADS_SHIFT 0
-#define NV50_COMPUTE_BLOCK_ALLOC_THREADS_MASK 0x0000ffff
-#define NV50_COMPUTE_BLOCK_ALLOC_BARRIERS_SHIFT 16
-#define NV50_COMPUTE_BLOCK_ALLOC_BARRIERS_MASK 0xffff0000
-#define NV50_COMPUTE_LANES32_ENABLE 0x000002b8
-#define NV50_COMPUTE_CP_REG_ALLOC_TEMP 0x000002c0
-#define NV50_COMPUTE_TIC_ADDRESS_HIGH 0x000002c4
-#define NV50_COMPUTE_TIC_ADDRESS_LOW 0x000002c8
-#define NV50_COMPUTE_TIC_LIMIT 0x000002cc
-#define NV50_COMPUTE_PM_SET(x) (0x000002d0+((x)*4))
-#define NV50_COMPUTE_PM_SET__SIZE 0x00000004
-#define NV50_COMPUTE_PM_CONTROL(x) (0x000002e0+((x)*4))
-#define NV50_COMPUTE_PM_CONTROL__SIZE 0x00000004
-#define NV50_COMPUTE_PM_CONTROL_UNK0 (1 << 0)
-#define NV50_COMPUTE_PM_CONTROL_UNK1_SHIFT 4
-#define NV50_COMPUTE_PM_CONTROL_UNK1_MASK 0x00000070
-#define NV50_COMPUTE_PM_CONTROL_UNK2_SHIFT 8
-#define NV50_COMPUTE_PM_CONTROL_UNK2_MASK 0xffffff00
-#define NV50_COMPUTE_LOCAL_WARPS_LOG_ALLOC 0x000002fc
-#define NV50_COMPUTE_LOCAL_WARPS_NO_CLAMP 0x00000300
-#define NV50_COMPUTE_STACK_WARPS_LOG_ALLOC 0x00000304
-#define NV50_COMPUTE_STACK_WARPS_NO_CLAMP 0x00000308
-#define NV50_COMPUTE_QUERY_ADDRESS_HIGH 0x00000310
-#define NV50_COMPUTE_QUERY_ADDRESS_LOW 0x00000314
-#define NV50_COMPUTE_QUERY_COUNTER 0x00000318
-#define NV50_COMPUTE_QUERY_GET 0x0000031c
-#define NV50_COMPUTE_COND_ADDRESS_HIGH 0x00000320
-#define NV50_COMPUTE_COND_ADDRESS_LOW 0x00000324
-#define NV50_COMPUTE_COND_MODE 0x00000328
-#define NV50_COMPUTE_COND_MODE_NEVER 0x00000000
-#define NV50_COMPUTE_COND_MODE_ALWAYS 0x00000001
-#define NV50_COMPUTE_COND_MODE_RES 0x00000002
-#define NV50_COMPUTE_COND_MODE_NOT_RES_AND_NOT_ID 0x00000003
-#define NV50_COMPUTE_COND_MODE_RES_OR_ID 0x00000004
-#define NV50_COMPUTE_LAUNCH 0x00000368
-#define NV50_COMPUTE_USER_PARAM_COUNT 0x00000374
-#define NV50_COMPUTE_USER_PARAM_COUNT_COUNT_SHIFT 8
-#define NV50_COMPUTE_USER_PARAM_COUNT_COUNT_MASK 0x0000ff00
-#define NV50_COMPUTE_LINKED_TSC 0x00000378
-#define NV50_COMPUTE_CODE_CB_FLUSH 0x00000380
-#define NV50_COMPUTE_GRIDDIM 0x000003a4
-#define NV50_COMPUTE_GRIDDIM_X_SHIFT 0
-#define NV50_COMPUTE_GRIDDIM_X_MASK 0x0000ffff
-#define NV50_COMPUTE_GRIDDIM_Y_SHIFT 16
-#define NV50_COMPUTE_GRIDDIM_Y_MASK 0xffff0000
-#define NV50_COMPUTE_SHARED_SIZE 0x000003a8
-#define NV50_COMPUTE_BLOCKDIM_YX 0x000003ac
-#define NV50_COMPUTE_BLOCKDIM_YX_X_SHIFT 0
-#define NV50_COMPUTE_BLOCKDIM_YX_X_MASK 0x0000ffff
-#define NV50_COMPUTE_BLOCKDIM_YX_Y_SHIFT 16
-#define NV50_COMPUTE_BLOCKDIM_YX_Y_MASK 0xffff0000
-#define NV50_COMPUTE_BLOCKDIM_Z 0x000003b0
-#define NV50_COMPUTE_CP_START_ID 0x000003b4
-#define NV50_COMPUTE_REG_MODE 0x000003b8
-#define NV50_COMPUTE_REG_MODE_PACKED 0x00000001
-#define NV50_COMPUTE_REG_MODE_STRIPED 0x00000002
-#define NV50_COMPUTE_TEX_LIMITS 0x000003bc
-#define NV50_COMPUTE_TEX_LIMITS_SAMPLERS_LOG2_SHIFT 0
-#define NV50_COMPUTE_TEX_LIMITS_SAMPLERS_LOG2_MASK 0x0000000f
-#define NV50_COMPUTE_TEX_LIMITS_TEXTURES_LOG2_SHIFT 4
-#define NV50_COMPUTE_TEX_LIMITS_TEXTURES_LOG2_MASK 0x000000f0
-#define NV50_COMPUTE_BIND_TSC 0x000003c0
-#define NV50_COMPUTE_BIND_TSC_VALID (1 << 0)
-#define NV50_COMPUTE_BIND_TSC_SAMPLER_SHIFT 4
-#define NV50_COMPUTE_BIND_TSC_SAMPLER_MASK 0x000000f0
-#define NV50_COMPUTE_BIND_TSC_TSC_SHIFT 12
-#define NV50_COMPUTE_BIND_TSC_TSC_MASK 0x001ff000
-#define NV50_COMPUTE_BIND_TIC 0x000003c4
-#define NV50_COMPUTE_BIND_TIC_VALID (1 << 0)
-#define NV50_COMPUTE_BIND_TIC_TEXTURE_SHIFT 1
-#define NV50_COMPUTE_BIND_TIC_TEXTURE_MASK 0x000001fe
-#define NV50_COMPUTE_BIND_TIC_TIC_SHIFT 9
-#define NV50_COMPUTE_BIND_TIC_TIC_MASK 0x7ffffe00
-#define NV50_COMPUTE_SET_PROGRAM_CB 0x000003c8
-#define NV50_COMPUTE_SET_PROGRAM_CB_INDEX_SHIFT 8
-#define NV50_COMPUTE_SET_PROGRAM_CB_INDEX_MASK 0x00000f00
-#define NV50_COMPUTE_SET_PROGRAM_CB_BUFFER_SHIFT 12
-#define NV50_COMPUTE_SET_PROGRAM_CB_BUFFER_MASK 0x0007f000
-#define NV50_COMPUTE_SET_PROGRAM_CB_VALID (1 << 0)
-#define NV50_COMPUTE_GLOBAL_ADDRESS_HIGH(x) (0x00000400+((x)*32))
-#define NV50_COMPUTE_GLOBAL_ADDRESS_HIGH__SIZE 0x00000010
-#define NV50_COMPUTE_GLOBAL_ADDRESS_LOW(x) (0x00000404+((x)*32))
-#define NV50_COMPUTE_GLOBAL_ADDRESS_LOW__SIZE 0x00000010
-#define NV50_COMPUTE_GLOBAL_PITCH(x) (0x00000408+((x)*32))
-#define NV50_COMPUTE_GLOBAL_PITCH__SIZE 0x00000010
-#define NV50_COMPUTE_GLOBAL_LIMIT(x) (0x0000040c+((x)*32))
-#define NV50_COMPUTE_GLOBAL_LIMIT__SIZE 0x00000010
-#define NV50_COMPUTE_GLOBAL_MODE(x) (0x00000410+((x)*32))
-#define NV50_COMPUTE_GLOBAL_MODE__SIZE 0x00000010
-#define NV50_COMPUTE_GLOBAL_MODE_LINEAR (1 << 0)
-#define NV50_COMPUTE_GLOBAL_MODE_TILE_MODE_SHIFT 8
-#define NV50_COMPUTE_GLOBAL_MODE_TILE_MODE_MASK 0x00000f00
-#define NV50_COMPUTE_USER_PARAM(x) (0x00000600+((x)*4))
-#define NV50_COMPUTE_USER_PARAM__SIZE 0x00000040
-
-
-#endif /* NOUVEAU_REG_H */
diff --git a/src/gallium/drivers/nv50/nv50_resource.c b/src/gallium/drivers/nv50/nv50_resource.c
index 6c0a9696355..1ae4d70a845 100644
--- a/src/gallium/drivers/nv50/nv50_resource.c
+++ b/src/gallium/drivers/nv50/nv50_resource.c
@@ -4,64 +4,48 @@
#include "nouveau/nouveau_screen.h"
-/* This doesn't look quite right - this query is supposed to ask
- * whether the particular context has references to the resource in
- * any unflushed rendering command buffer, and hence requires a
- * pipe->flush() for serializing some modification to that resource.
- *
- * This seems to be answering the question of whether the resource is
- * currently on hardware.
- */
-static unsigned int
-nv50_resource_is_referenced(struct pipe_context *pipe,
- struct pipe_resource *resource,
- unsigned level, int layer)
-{
- return nouveau_reference_flags(nv50_resource(resource)->bo);
-}
-
static struct pipe_resource *
nv50_resource_create(struct pipe_screen *screen,
- const struct pipe_resource *template)
+ const struct pipe_resource *templ)
{
- if (template->target == PIPE_BUFFER)
- return nv50_buffer_create(screen, template);
- else
- return nv50_miptree_create(screen, template);
+ switch (templ->target) {
+ case PIPE_BUFFER:
+ return nouveau_buffer_create(screen, templ);
+ default:
+ return nv50_miptree_create(screen, templ);
+ }
}
static struct pipe_resource *
nv50_resource_from_handle(struct pipe_screen * screen,
- const struct pipe_resource *template,
- struct winsys_handle *whandle)
+ const struct pipe_resource *templ,
+ struct winsys_handle *whandle)
{
- if (template->target == PIPE_BUFFER)
- return NULL;
- else
- return nv50_miptree_from_handle(screen, template, whandle);
+ if (templ->target == PIPE_BUFFER)
+ return NULL;
+ else
+ return nv50_miptree_from_handle(screen, templ, whandle);
}
void
nv50_init_resource_functions(struct pipe_context *pcontext)
{
- pcontext->get_transfer = u_get_transfer_vtbl;
- pcontext->transfer_map = u_transfer_map_vtbl;
- pcontext->transfer_flush_region = u_transfer_flush_region_vtbl;
- pcontext->transfer_unmap = u_transfer_unmap_vtbl;
- pcontext->transfer_destroy = u_transfer_destroy_vtbl;
- pcontext->transfer_inline_write = u_transfer_inline_write_vtbl;
- pcontext->is_resource_referenced = nv50_resource_is_referenced;
-
- pcontext->create_surface = nv50_miptree_surface_new;
- pcontext->surface_destroy = nv50_miptree_surface_del;
+ pcontext->get_transfer = u_get_transfer_vtbl;
+ pcontext->transfer_map = u_transfer_map_vtbl;
+ pcontext->transfer_flush_region = u_transfer_flush_region_vtbl;
+ pcontext->transfer_unmap = u_transfer_unmap_vtbl;
+ pcontext->transfer_destroy = u_transfer_destroy_vtbl;
+ pcontext->transfer_inline_write = u_transfer_inline_write_vtbl;
+ pcontext->create_surface = nv50_miptree_surface_new;
+ pcontext->surface_destroy = nv50_miptree_surface_del;
}
void
nv50_screen_init_resource_functions(struct pipe_screen *pscreen)
{
- pscreen->resource_create = nv50_resource_create;
- pscreen->resource_from_handle = nv50_resource_from_handle;
- pscreen->resource_get_handle = u_resource_get_handle_vtbl;
- pscreen->resource_destroy = u_resource_destroy_vtbl;
- pscreen->user_buffer_create = nv50_user_buffer_create;
+ pscreen->resource_create = nv50_resource_create;
+ pscreen->resource_from_handle = nv50_resource_from_handle;
+ pscreen->resource_get_handle = u_resource_get_handle_vtbl;
+ pscreen->resource_destroy = u_resource_destroy_vtbl;
+ pscreen->user_buffer_create = nouveau_user_buffer_create;
}
diff --git a/src/gallium/drivers/nv50/nv50_resource.h b/src/gallium/drivers/nv50/nv50_resource.h
index 4b2a75e11ad..0e9f0a2557e 100644
--- a/src/gallium/drivers/nv50/nv50_resource.h
+++ b/src/gallium/drivers/nv50/nv50_resource.h
@@ -1,97 +1,70 @@
-#ifndef NV50_RESOURCE_H
-#define NV50_RESOURCE_H
+#ifndef __NV50_RESOURCE_H__
+#define __NV50_RESOURCE_H__
#include "util/u_transfer.h"
-
+#include "util/u_double_list.h"
+#define NOUVEAU_NVC0
#include "nouveau/nouveau_winsys.h"
+#include "nouveau/nouveau_buffer.h"
+#undef NOUVEAU_NVC0
+
+void
+nv50_init_resource_functions(struct pipe_context *pcontext);
-struct pipe_resource;
-struct nouveau_bo;
+void
+nv50_screen_init_resource_functions(struct pipe_screen *pscreen);
+#define NV50_TILE_DIM_SHIFT(m, d) (((m) >> (d * 4)) & 0xf)
-/* This gets further specialized into either buffer or texture
- * structures. In the future we'll want to remove much of that
- * distinction, but for now try to keep as close to the existing code
- * as possible and use the vtbl struct to choose between the two
- * underlying implementations.
- */
-struct nv50_resource {
- struct pipe_resource base;
- const struct u_resource_vtbl *vtbl;
- struct nouveau_bo *bo;
-};
+#define NV50_TILE_PITCH(m) (64 << 0)
+#define NV50_TILE_HEIGHT(m) ( 4 << NV50_TILE_DIM_SHIFT(m, 0))
+#define NV50_TILE_DEPTH(m) ( 1 << NV50_TILE_DIM_SHIFT(m, 1))
+
+#define NV50_TILE_SIZE_2D(m) ((64 * 4) << \
+ NV50_TILE_DIM_SHIFT(m, 0))
+
+#define NV50_TILE_SIZE(m) (NV50_TILE_SIZE_2D(m) << NV50_TILE_DIM_SHIFT(m, 1))
struct nv50_miptree_level {
- int *image_offset;
- unsigned pitch;
- unsigned tile_mode;
+ uint32_t offset;
+ uint32_t pitch;
+ uint32_t tile_mode;
};
#define NV50_MAX_TEXTURE_LEVELS 16
struct nv50_miptree {
- struct nv50_resource base;
-
- struct nv50_miptree_level level[NV50_MAX_TEXTURE_LEVELS];
- int image_nr;
- int total_size;
+ struct nv04_resource base;
+ struct nv50_miptree_level level[NV50_MAX_TEXTURE_LEVELS];
+ uint32_t total_size;
+ uint32_t layer_stride;
+ boolean layout_3d; /* TRUE if layer count varies with mip level */
};
static INLINE struct nv50_miptree *
nv50_miptree(struct pipe_resource *pt)
{
- return (struct nv50_miptree *)pt;
-}
-
-
-static INLINE
-struct nv50_resource *nv50_resource(struct pipe_resource *resource)
-{
- return (struct nv50_resource *)resource;
+ return (struct nv50_miptree *)pt;
}
-/* is resource mapped into the GPU's address space (i.e. VRAM or GART) ? */
-static INLINE boolean
-nv50_resource_mapped_by_gpu(struct pipe_resource *resource)
-{
- return nv50_resource(resource)->bo->handle;
-}
-
-void
-nv50_init_resource_functions(struct pipe_context *pcontext);
-
-void
-nv50_screen_init_resource_functions(struct pipe_screen *pscreen);
-
-/* Internal functions
+/* Internal functions:
*/
struct pipe_resource *
nv50_miptree_create(struct pipe_screen *pscreen,
- const struct pipe_resource *tmp);
+ const struct pipe_resource *tmp);
struct pipe_resource *
nv50_miptree_from_handle(struct pipe_screen *pscreen,
- const struct pipe_resource *template,
- struct winsys_handle *whandle);
-
-struct pipe_resource *
-nv50_buffer_create(struct pipe_screen *pscreen,
- const struct pipe_resource *template);
-
-struct pipe_resource *
-nv50_user_buffer_create(struct pipe_screen *screen,
- void *ptr,
- unsigned bytes,
- unsigned usage);
-
+ const struct pipe_resource *template,
+ struct winsys_handle *whandle);
struct pipe_surface *
-nv50_miptree_surface_new(struct pipe_context *pipe, struct pipe_resource *pt,
- const struct pipe_surface *surf_tmpl);
+nv50_miptree_surface_new(struct pipe_context *,
+ struct pipe_resource *,
+ const struct pipe_surface *templ);
void
-nv50_miptree_surface_del(struct pipe_context *pipe, struct pipe_surface *ps);
-
+nv50_miptree_surface_del(struct pipe_context *, struct pipe_surface *);
#endif
diff --git a/src/gallium/drivers/nv50/nv50_screen.c b/src/gallium/drivers/nv50/nv50_screen.c
index edc3d54d012..7690c80eef0 100644
--- a/src/gallium/drivers/nv50/nv50_screen.c
+++ b/src/gallium/drivers/nv50/nv50_screen.c
@@ -1,5 +1,5 @@
/*
- * Copyright 2008 Ben Skeggs
+ * Copyright 2010 Christoph Bumiller
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@@ -25,596 +25,625 @@
#include "nv50_context.h"
#include "nv50_screen.h"
-#include "nv50_resource.h"
-#include "nv50_program.h"
-#include "nouveau/nouveau_stateobj.h"
+#include "nouveau/nv_object.xml.h"
+
+#ifndef NOUVEAU_GETPARAM_GRAPH_UNITS
+# define NOUVEAU_GETPARAM_GRAPH_UNITS 13
+#endif
+
+extern int nouveau_device_get_param(struct nouveau_device *dev,
+ uint64_t param, uint64_t *value);
static boolean
nv50_screen_is_format_supported(struct pipe_screen *pscreen,
- enum pipe_format format,
- enum pipe_texture_target target,
- unsigned sample_count,
- unsigned usage, unsigned geom_flags)
+ enum pipe_format format,
+ enum pipe_texture_target target,
+ unsigned sample_count,
+ unsigned bindings)
{
- if (sample_count > 1)
- return FALSE;
-
- if (!util_format_s3tc_enabled) {
- switch (format) {
- case PIPE_FORMAT_DXT1_RGB:
- case PIPE_FORMAT_DXT1_RGBA:
- case PIPE_FORMAT_DXT3_RGBA:
- case PIPE_FORMAT_DXT5_RGBA:
- return FALSE;
- default:
- break;
- }
- }
-
- switch (format) {
- case PIPE_FORMAT_Z16_UNORM:
- if ((nouveau_screen(pscreen)->device->chipset & 0xf0) != 0xa0)
- return FALSE;
- break;
- default:
- break;
- }
-
- /* transfers & shared are always supported */
- usage &= ~(PIPE_BIND_TRANSFER_READ |
- PIPE_BIND_TRANSFER_WRITE |
- PIPE_BIND_SHARED);
-
- return (nv50_format_table[format].usage & usage) == usage;
+ if (sample_count > 1)
+ return FALSE;
+
+ if (!util_format_s3tc_enabled) {
+ switch (format) {
+ case PIPE_FORMAT_DXT1_RGB:
+ case PIPE_FORMAT_DXT1_RGBA:
+ case PIPE_FORMAT_DXT3_RGBA:
+ case PIPE_FORMAT_DXT5_RGBA:
+ return FALSE;
+ default:
+ break;
+ }
+ }
+
+ switch (format) {
+ case PIPE_FORMAT_Z16_UNORM:
+ if (nv50_screen(pscreen)->tesla->grclass < NVA0_3D)
+ return FALSE;
+ break;
+ default:
+ break;
+ }
+
+ /* transfers & shared are always supported */
+ bindings &= ~(PIPE_BIND_TRANSFER_READ |
+ PIPE_BIND_TRANSFER_WRITE |
+ PIPE_BIND_SHARED);
+
+ return (nv50_format_table[format].usage & bindings) == bindings;
}
static int
nv50_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
{
- switch (param) {
- case PIPE_CAP_MAX_TEXTURE_IMAGE_UNITS:
- return 32;
- case PIPE_CAP_MAX_VERTEX_TEXTURE_UNITS:
- return 32;
- case PIPE_CAP_MAX_COMBINED_SAMPLERS:
- return 64;
- case PIPE_CAP_NPOT_TEXTURES:
- return 1;
- case PIPE_CAP_TWO_SIDED_STENCIL:
- return 1;
- case PIPE_CAP_GLSL:
- case PIPE_CAP_SM3:
- return 1;
- case PIPE_CAP_ANISOTROPIC_FILTER:
- return 1;
- case PIPE_CAP_POINT_SPRITE:
- return 1;
- case PIPE_CAP_MAX_RENDER_TARGETS:
- return 8;
- case PIPE_CAP_OCCLUSION_QUERY:
- return 1;
- case PIPE_CAP_TIMER_QUERY:
- return 0;
- case PIPE_CAP_STREAM_OUTPUT:
- return 0;
- case PIPE_CAP_TEXTURE_SHADOW_MAP:
- return 1;
- case PIPE_CAP_MAX_TEXTURE_2D_LEVELS:
- return 13;
- case PIPE_CAP_MAX_TEXTURE_3D_LEVELS:
- return 10;
- case PIPE_CAP_MAX_TEXTURE_CUBE_LEVELS:
- return 13;
- case PIPE_CAP_TEXTURE_MIRROR_CLAMP:
- case PIPE_CAP_TEXTURE_MIRROR_REPEAT:
- return 1;
- case PIPE_CAP_TEXTURE_SWIZZLE:
- return 1;
- case PIPE_CAP_BLEND_EQUATION_SEPARATE:
- return 1;
- case PIPE_CAP_INDEP_BLEND_ENABLE:
- return 1;
- case PIPE_CAP_INDEP_BLEND_FUNC:
- return 0;
- case PIPE_CAP_DEPTHSTENCIL_CLEAR_SEPARATE:
- return 1;
- case PIPE_CAP_TGSI_FS_COORD_ORIGIN_UPPER_LEFT:
- case PIPE_CAP_TGSI_FS_COORD_PIXEL_CENTER_HALF_INTEGER:
- return 1;
- case PIPE_CAP_TGSI_FS_COORD_ORIGIN_LOWER_LEFT:
- case PIPE_CAP_TGSI_FS_COORD_PIXEL_CENTER_INTEGER:
- return 0;
- case PIPE_CAP_DEPTH_CLAMP:
- return 1;
- case PIPE_CAP_SHADER_STENCIL_EXPORT:
- return 0;
- case PIPE_CAP_PRIMITIVE_RESTART:
- return 0;
- default:
- NOUVEAU_ERR("Unknown PIPE_CAP %d\n", param);
- return 0;
- }
+ switch (param) {
+ case PIPE_CAP_MAX_TEXTURE_IMAGE_UNITS:
+ case PIPE_CAP_MAX_VERTEX_TEXTURE_UNITS:
+ return 32;
+ case PIPE_CAP_MAX_COMBINED_SAMPLERS:
+ return 64;
+ case PIPE_CAP_MAX_TEXTURE_2D_LEVELS:
+ return 13;
+ case PIPE_CAP_MAX_TEXTURE_3D_LEVELS:
+ return 10;
+ case PIPE_CAP_MAX_TEXTURE_CUBE_LEVELS:
+ return 13;
+ case PIPE_CAP_ARRAY_TEXTURES: /* shader support missing */
+ return 0;
+ case PIPE_CAP_TEXTURE_MIRROR_CLAMP:
+ case PIPE_CAP_TEXTURE_MIRROR_REPEAT:
+ case PIPE_CAP_TEXTURE_SWIZZLE:
+ case PIPE_CAP_TEXTURE_SHADOW_MAP:
+ case PIPE_CAP_NPOT_TEXTURES:
+ case PIPE_CAP_ANISOTROPIC_FILTER:
+ return 1;
+ case PIPE_CAP_TWO_SIDED_STENCIL:
+ case PIPE_CAP_DEPTH_CLAMP:
+ case PIPE_CAP_DEPTHSTENCIL_CLEAR_SEPARATE:
+ case PIPE_CAP_POINT_SPRITE:
+ return 1;
+ case PIPE_CAP_GLSL:
+ case PIPE_CAP_SM3:
+ return 1;
+ case PIPE_CAP_MAX_RENDER_TARGETS:
+ return 8;
+ case PIPE_CAP_TIMER_QUERY:
+ case PIPE_CAP_OCCLUSION_QUERY:
+ return 1;
+ case PIPE_CAP_STREAM_OUTPUT:
+ return 0;
+ case PIPE_CAP_BLEND_EQUATION_SEPARATE:
+ case PIPE_CAP_INDEP_BLEND_ENABLE:
+ return 1;
+ case PIPE_CAP_INDEP_BLEND_FUNC:
+ return nv50_screen(pscreen)->tesla->grclass >= NVA3_3D;
+ case PIPE_CAP_TGSI_FS_COORD_ORIGIN_UPPER_LEFT:
+ case PIPE_CAP_TGSI_FS_COORD_PIXEL_CENTER_HALF_INTEGER:
+ return 1;
+ case PIPE_CAP_TGSI_FS_COORD_ORIGIN_LOWER_LEFT:
+ case PIPE_CAP_TGSI_FS_COORD_PIXEL_CENTER_INTEGER:
+ return 0;
+ case PIPE_CAP_SHADER_STENCIL_EXPORT:
+ return 0;
+ case PIPE_CAP_PRIMITIVE_RESTART:
+ case PIPE_CAP_TGSI_INSTANCEID:
+ case PIPE_CAP_VERTEX_ELEMENT_INSTANCE_DIVISOR:
+ return 1;
+ default:
+ NOUVEAU_ERR("unknown PIPE_CAP %d\n", param);
+ return 0;
+ }
}
static int
nv50_screen_get_shader_param(struct pipe_screen *pscreen, unsigned shader,
- enum pipe_shader_cap param)
+ enum pipe_shader_cap param)
{
- switch(shader) {
- case PIPE_SHADER_FRAGMENT:
- case PIPE_SHADER_VERTEX:
- break;
- case PIPE_SHADER_GEOMETRY:
- default:
- return 0;
- }
-
- switch(param) {
- case PIPE_SHADER_CAP_MAX_INSTRUCTIONS:
- case PIPE_SHADER_CAP_MAX_ALU_INSTRUCTIONS:
- case PIPE_SHADER_CAP_MAX_TEX_INSTRUCTIONS:
- case PIPE_SHADER_CAP_MAX_TEX_INDIRECTIONS: /* arbitrary limit */
- return 16384;
- case PIPE_SHADER_CAP_MAX_CONTROL_FLOW_DEPTH: /* need stack bo */
- return 4;
- case PIPE_SHADER_CAP_MAX_INPUTS: /* 128 / 4 with GP */
- if (shader == PIPE_SHADER_GEOMETRY)
- return 128 / 4;
- else
- return 64 / 4;
- case PIPE_SHADER_CAP_MAX_CONSTS:
- return 65536 / 16;
- case PIPE_SHADER_CAP_MAX_CONST_BUFFERS: /* 16 - 1, but not implemented */
- return 1;
- case PIPE_SHADER_CAP_MAX_ADDRS: /* no spilling atm */
- return 1;
- case PIPE_SHADER_CAP_MAX_PREDS: /* not yet handled */
- return 0;
- case PIPE_SHADER_CAP_MAX_TEMPS: /* no spilling atm */
- return NV50_CAP_MAX_PROGRAM_TEMPS;
- case PIPE_SHADER_CAP_TGSI_CONT_SUPPORTED:
- return 1;
- case PIPE_SHADER_CAP_INDIRECT_INPUT_ADDR:
- case PIPE_SHADER_CAP_INDIRECT_OUTPUT_ADDR:
- case PIPE_SHADER_CAP_INDIRECT_TEMP_ADDR:
- case PIPE_SHADER_CAP_INDIRECT_CONST_ADDR:
- return 1;
- case PIPE_SHADER_CAP_SUBROUTINES:
- return 0;
- default:
- return 0;
- }
+ switch (shader) {
+ case PIPE_SHADER_VERTEX:
+ case PIPE_SHADER_GEOMETRY:
+ case PIPE_SHADER_FRAGMENT:
+ break;
+ default:
+ return 0;
+ }
+
+ switch (param) {
+ case PIPE_SHADER_CAP_MAX_INSTRUCTIONS:
+ case PIPE_SHADER_CAP_MAX_ALU_INSTRUCTIONS:
+ case PIPE_SHADER_CAP_MAX_TEX_INSTRUCTIONS:
+ case PIPE_SHADER_CAP_MAX_TEX_INDIRECTIONS:
+ return 16384;
+ case PIPE_SHADER_CAP_MAX_CONTROL_FLOW_DEPTH:
+ return 4;
+ case PIPE_SHADER_CAP_MAX_INPUTS:
+ if (shader == PIPE_SHADER_VERTEX)
+ return 32;
+ return 0x300 / 16;
+ case PIPE_SHADER_CAP_MAX_CONSTS:
+ return 65536 / 16;
+ case PIPE_SHADER_CAP_MAX_CONST_BUFFERS:
+ return 14;
+ case PIPE_SHADER_CAP_MAX_ADDRS:
+ return 1;
+ case PIPE_SHADER_CAP_INDIRECT_INPUT_ADDR:
+ case PIPE_SHADER_CAP_INDIRECT_OUTPUT_ADDR:
+ return shader != PIPE_SHADER_FRAGMENT;
+ case PIPE_SHADER_CAP_INDIRECT_TEMP_ADDR:
+ case PIPE_SHADER_CAP_INDIRECT_CONST_ADDR:
+ return 1;
+ case PIPE_SHADER_CAP_MAX_PREDS:
+ return 0;
+ case PIPE_SHADER_CAP_MAX_TEMPS:
+ return NV50_CAP_MAX_PROGRAM_TEMPS;
+ case PIPE_SHADER_CAP_TGSI_CONT_SUPPORTED:
+ return 1;
+ case PIPE_SHADER_CAP_SUBROUTINES:
+ return 0; /* please inline, or provide function declarations */
+ default:
+ NOUVEAU_ERR("unknown PIPE_SHADER_CAP %d\n", param);
+ return 0;
+ }
}
static float
nv50_screen_get_paramf(struct pipe_screen *pscreen, enum pipe_cap param)
{
- switch (param) {
- case PIPE_CAP_MAX_LINE_WIDTH:
- case PIPE_CAP_MAX_LINE_WIDTH_AA:
- return 10.0;
- case PIPE_CAP_MAX_POINT_WIDTH:
- case PIPE_CAP_MAX_POINT_WIDTH_AA:
- return 64.0;
- case PIPE_CAP_MAX_TEXTURE_ANISOTROPY:
- return 16.0;
- case PIPE_CAP_MAX_TEXTURE_LOD_BIAS:
- return 4.0;
- default:
- NOUVEAU_ERR("Unknown PIPE_CAP %d\n", param);
- return 0.0;
- }
+ switch (param) {
+ case PIPE_CAP_MAX_LINE_WIDTH:
+ case PIPE_CAP_MAX_LINE_WIDTH_AA:
+ return 10.0f;
+ case PIPE_CAP_MAX_POINT_WIDTH:
+ case PIPE_CAP_MAX_POINT_WIDTH_AA:
+ return 64.0f;
+ case PIPE_CAP_MAX_TEXTURE_ANISOTROPY:
+ return 16.0f;
+ case PIPE_CAP_MAX_TEXTURE_LOD_BIAS:
+ return 4.0f;
+ default:
+ NOUVEAU_ERR("unknown PIPE_CAP %d\n", param);
+ return 0.0f;
+ }
}
static void
nv50_screen_destroy(struct pipe_screen *pscreen)
{
- struct nv50_screen *screen = nv50_screen(pscreen);
- unsigned i;
-
- for (i = 0; i < 3; i++) {
- if (screen->constbuf_parm[i])
- nouveau_bo_ref(NULL, &screen->constbuf_parm[i]);
- }
-
- if (screen->constbuf_misc[0])
- nouveau_bo_ref(NULL, &screen->constbuf_misc[0]);
- if (screen->tic)
- nouveau_bo_ref(NULL, &screen->tic);
- if (screen->tsc)
- nouveau_bo_ref(NULL, &screen->tsc);
-
- nouveau_notifier_free(&screen->sync);
- nouveau_grobj_free(&screen->tesla);
- nouveau_grobj_free(&screen->eng2d);
- nouveau_grobj_free(&screen->m2mf);
- nouveau_resource_destroy(&screen->immd_heap);
- nouveau_screen_fini(&screen->base);
- FREE(screen);
-}
+ struct nv50_screen *screen = nv50_screen(pscreen);
-#define BGN_RELOC(ch, bo, gr, m, n, fl) \
- OUT_RELOC(ch, bo, (n << 18) | (gr->subc << 13) | m, fl, 0, 0)
+ if (screen->base.fence.current) {
+ nouveau_fence_wait(screen->base.fence.current);
+ nouveau_fence_ref (NULL, &screen->base.fence.current);
+ }
-void
-nv50_screen_reloc_constbuf(struct nv50_screen *screen, unsigned cbi)
+ nouveau_bo_ref(NULL, &screen->code);
+ nouveau_bo_ref(NULL, &screen->tls_bo);
+ nouveau_bo_ref(NULL, &screen->stack_bo);
+ nouveau_bo_ref(NULL, &screen->txc);
+ nouveau_bo_ref(NULL, &screen->uniforms);
+ nouveau_bo_ref(NULL, &screen->fence.bo);
+
+ nouveau_resource_destroy(&screen->vp_code_heap);
+ nouveau_resource_destroy(&screen->gp_code_heap);
+ nouveau_resource_destroy(&screen->fp_code_heap);
+
+ if (screen->tic.entries)
+ FREE(screen->tic.entries);
+
+ nouveau_mm_destroy(screen->mm_VRAM_fe0);
+
+ nouveau_grobj_free(&screen->tesla);
+ nouveau_grobj_free(&screen->eng2d);
+ nouveau_grobj_free(&screen->m2mf);
+
+ nouveau_notifier_free(&screen->sync);
+
+ nouveau_screen_fini(&screen->base);
+
+ FREE(screen);
+}
+
+static void
+nv50_screen_fence_emit(struct pipe_screen *pscreen, u32 sequence)
{
- struct nouveau_bo *bo;
- struct nouveau_channel *chan = screen->base.channel;
- struct nouveau_grobj *tesla = screen->tesla;
- unsigned size;
- const unsigned rl = NOUVEAU_BO_VRAM | NOUVEAU_BO_RD | NOUVEAU_BO_DUMMY;
-
- switch (cbi) {
- case NV50_CB_PMISC:
- bo = screen->constbuf_misc[0];
- size = 0x200;
- break;
- case NV50_CB_PVP:
- case NV50_CB_PFP:
- case NV50_CB_PGP:
- bo = screen->constbuf_parm[cbi - NV50_CB_PVP];
- size = 0;
- break;
- default:
- return;
- }
-
- BGN_RELOC (chan, bo, tesla, NV50TCL_CB_DEF_ADDRESS_HIGH, 3, rl);
- OUT_RELOCh(chan, bo, 0, rl);
- OUT_RELOCl(chan, bo, 0, rl);
- OUT_RELOC (chan, bo, (cbi << 16) | size, rl, 0, 0);
+ struct nv50_screen *screen = nv50_screen(pscreen);
+ struct nouveau_channel *chan = screen->base.channel;
+
+ MARK_RING (chan, 5, 2);
+ BEGIN_RING(chan, RING_3D(QUERY_ADDRESS_HIGH), 4);
+ OUT_RELOCh(chan, screen->fence.bo, 0, NOUVEAU_BO_WR);
+ OUT_RELOCl(chan, screen->fence.bo, 0, NOUVEAU_BO_WR);
+ OUT_RING (chan, sequence);
+ OUT_RING (chan, NV50_3D_QUERY_GET_MODE_WRITE_UNK0 |
+ NV50_3D_QUERY_GET_UNK4 |
+ NV50_3D_QUERY_GET_UNIT_CROP |
+ NV50_3D_QUERY_GET_TYPE_QUERY |
+ NV50_3D_QUERY_GET_QUERY_SELECT_ZERO |
+ NV50_3D_QUERY_GET_SHORT);
}
-void
-nv50_screen_relocs(struct nv50_screen *screen)
+static u32
+nv50_screen_fence_update(struct pipe_screen *pscreen)
{
- struct nouveau_channel *chan = screen->base.channel;
- struct nouveau_grobj *tesla = screen->tesla;
- unsigned i;
- const unsigned rl = NOUVEAU_BO_VRAM | NOUVEAU_BO_RD | NOUVEAU_BO_DUMMY;
+ struct nv50_screen *screen = nv50_screen(pscreen);
+ return screen->fence.map[0];
+}
- MARK_RING (chan, 28, 26);
+#define FAIL_SCREEN_INIT(str, err) \
+ do { \
+ NOUVEAU_ERR(str, err); \
+ nv50_screen_destroy(pscreen); \
+ return NULL; \
+ } while(0)
- /* cause grobj autobind */
- BEGIN_RING(chan, tesla, 0x0100, 1);
- OUT_RING (chan, 0);
+struct pipe_screen *
+nv50_screen_create(struct pipe_winsys *ws, struct nouveau_device *dev)
+{
+ struct nv50_screen *screen;
+ struct nouveau_channel *chan;
+ struct pipe_screen *pscreen;
+ uint64_t value;
+ uint32_t tesla_class;
+ unsigned stack_size, max_warps, tls_space;
+ int ret;
+ unsigned i, base;
+
+ screen = CALLOC_STRUCT(nv50_screen);
+ if (!screen)
+ return NULL;
+ pscreen = &screen->base.base;
+
+ screen->base.sysmem_bindings = PIPE_BIND_CONSTANT_BUFFER;
+
+ ret = nouveau_screen_init(&screen->base, dev);
+ if (ret)
+ FAIL_SCREEN_INIT("nouveau_screen_init failed: %d\n", ret);
+
+ chan = screen->base.channel;
+
+ pscreen->winsys = ws;
+ pscreen->destroy = nv50_screen_destroy;
+ pscreen->context_create = nv50_create;
+ pscreen->is_format_supported = nv50_screen_is_format_supported;
+ pscreen->get_param = nv50_screen_get_param;
+ pscreen->get_shader_param = nv50_screen_get_shader_param;
+ pscreen->get_paramf = nv50_screen_get_paramf;
+
+ nv50_screen_init_resource_functions(pscreen);
+
+ ret = nouveau_bo_new(dev, NOUVEAU_BO_GART | NOUVEAU_BO_MAP, 0, 4096,
+ &screen->fence.bo);
+ if (ret)
+ goto fail;
+ nouveau_bo_map(screen->fence.bo, NOUVEAU_BO_RDWR);
+ screen->fence.map = screen->fence.bo->map;
+ nouveau_bo_unmap(screen->fence.bo);
+ screen->base.fence.emit = nv50_screen_fence_emit;
+ screen->base.fence.update = nv50_screen_fence_update;
+
+ ret = nouveau_notifier_alloc(chan, 0xbeef0301, 1, &screen->sync);
+ if (ret)
+ FAIL_SCREEN_INIT("Error allocating notifier: %d\n", ret);
+
+ ret = nouveau_grobj_alloc(chan, 0xbeef5039, NV50_M2MF, &screen->m2mf);
+ if (ret)
+ FAIL_SCREEN_INIT("Error allocating PGRAPH context for M2MF: %d\n", ret);
+
+ BIND_RING (chan, screen->m2mf, NV50_SUBCH_MF);
+ BEGIN_RING(chan, RING_MF_(NV04_M2MF_DMA_NOTIFY), 3);
+ OUT_RING (chan, screen->sync->handle);
+ OUT_RING (chan, chan->vram->handle);
+ OUT_RING (chan, chan->vram->handle);
+
+ ret = nouveau_grobj_alloc(chan, 0xbeef502d, NV50_2D, &screen->eng2d);
+ if (ret)
+ FAIL_SCREEN_INIT("Error allocating PGRAPH context for 2D: %d\n", ret);
+
+ BIND_RING (chan, screen->eng2d, NV50_SUBCH_2D);
+ BEGIN_RING(chan, RING_2D(DMA_NOTIFY), 4);
+ OUT_RING (chan, screen->sync->handle);
+ OUT_RING (chan, chan->vram->handle);
+ OUT_RING (chan, chan->vram->handle);
+ OUT_RING (chan, chan->vram->handle);
+ BEGIN_RING(chan, RING_2D(OPERATION), 1);
+ OUT_RING (chan, NV50_2D_OPERATION_SRCCOPY);
+ BEGIN_RING(chan, RING_2D(CLIP_ENABLE), 1);
+ OUT_RING (chan, 0);
+ BEGIN_RING(chan, RING_2D(COLOR_KEY_ENABLE), 1);
+ OUT_RING (chan, 0);
+ BEGIN_RING(chan, RING_2D_(0x0888), 1);
+ OUT_RING (chan, 1);
+
+ switch (dev->chipset & 0xf0) {
+ case 0x50:
+ tesla_class = NV50_3D;
+ break;
+ case 0x80:
+ case 0x90:
+ tesla_class = NV84_3D;
+ break;
+ case 0xa0:
+ switch (dev->chipset) {
+ case 0xa0:
+ case 0xaa:
+ case 0xac:
+ tesla_class = NVA0_3D;
+ break;
+ case 0xaf:
+ tesla_class = NVAF_3D;
+ break;
+ default:
+ tesla_class = NVA3_3D;
+ break;
+ }
+ break;
+ default:
+ FAIL_SCREEN_INIT("Not a known NV50 chipset: NV%02x\n", dev->chipset);
+ break;
+ }
+
+ ret = nouveau_grobj_alloc(chan, 0xbeef5097, tesla_class, &screen->tesla);
+ if (ret)
+ FAIL_SCREEN_INIT("Error allocating PGRAPH context for 3D: %d\n", ret);
+
+ BIND_RING (chan, screen->tesla, NV50_SUBCH_3D);
+
+ BEGIN_RING(chan, RING_3D(COND_MODE), 1);
+ OUT_RING (chan, NV50_3D_COND_MODE_ALWAYS);
+
+ BEGIN_RING(chan, RING_3D(DMA_NOTIFY), 1);
+ OUT_RING (chan, screen->sync->handle);
+ BEGIN_RING(chan, RING_3D(DMA_ZETA), 11);
+ for (i = 0; i < 11; ++i)
+ OUT_RING(chan, chan->vram->handle);
+ BEGIN_RING(chan, RING_3D(DMA_COLOR(0)), NV50_3D_DMA_COLOR__LEN);
+ for (i = 0; i < NV50_3D_DMA_COLOR__LEN; ++i)
+ OUT_RING(chan, chan->vram->handle);
+
+ BEGIN_RING(chan, RING_3D(REG_MODE), 1);
+ OUT_RING (chan, NV50_3D_REG_MODE_STRIPED);
+ BEGIN_RING(chan, RING_3D(UNK1400_LANES), 1);
+ OUT_RING (chan, 0xf);
+
+ BEGIN_RING(chan, RING_3D(RT_CONTROL), 1);
+ OUT_RING (chan, 1);
+
+ BEGIN_RING(chan, RING_3D(CSAA_ENABLE), 1);
+ OUT_RING (chan, 0);
+ BEGIN_RING(chan, RING_3D(MULTISAMPLE_ENABLE), 1);
+ OUT_RING (chan, 0);
+ BEGIN_RING(chan, RING_3D(MULTISAMPLE_MODE), 1);
+ OUT_RING (chan, NV50_3D_MULTISAMPLE_MODE_MS1);
+ BEGIN_RING(chan, RING_3D(MULTISAMPLE_CTRL), 1);
+ OUT_RING (chan, 0);
+
+ BEGIN_RING(chan, RING_3D(SCREEN_Y_CONTROL), 1);
+ OUT_RING (chan, 0);
+ BEGIN_RING(chan, RING_3D(WINDOW_OFFSET_X), 2);
+ OUT_RING (chan, 0);
+ OUT_RING (chan, 0);
+ BEGIN_RING(chan, RING_3D(ZCULL_REGION), 1); /* deactivate ZCULL */
+ OUT_RING (chan, 0x3f);
+
+ ret = nouveau_bo_new(dev, NOUVEAU_BO_VRAM, 1 << 16,
+ 3 << NV50_CODE_BO_SIZE_LOG2, &screen->code);
+ if (ret)
+ goto fail;
+
+ nouveau_resource_init(&screen->vp_code_heap, 0, 1 << NV50_CODE_BO_SIZE_LOG2);
+ nouveau_resource_init(&screen->gp_code_heap, 0, 1 << NV50_CODE_BO_SIZE_LOG2);
+ nouveau_resource_init(&screen->fp_code_heap, 0, 1 << NV50_CODE_BO_SIZE_LOG2);
+
+ base = 1 << NV50_CODE_BO_SIZE_LOG2;
+
+ BEGIN_RING(chan, RING_3D(VP_ADDRESS_HIGH), 2);
+ OUT_RELOCh(chan, screen->code, base * 0, NOUVEAU_BO_VRAM | NOUVEAU_BO_RD);
+ OUT_RELOCl(chan, screen->code, base * 0, NOUVEAU_BO_VRAM | NOUVEAU_BO_RD);
+
+ BEGIN_RING(chan, RING_3D(FP_ADDRESS_HIGH), 2);
+ OUT_RELOCh(chan, screen->code, base * 1, NOUVEAU_BO_VRAM | NOUVEAU_BO_RD);
+ OUT_RELOCl(chan, screen->code, base * 1, NOUVEAU_BO_VRAM | NOUVEAU_BO_RD);
+
+ BEGIN_RING(chan, RING_3D(GP_ADDRESS_HIGH), 2);
+ OUT_RELOCh(chan, screen->code, base * 2, NOUVEAU_BO_VRAM | NOUVEAU_BO_RD);
+ OUT_RELOCl(chan, screen->code, base * 2, NOUVEAU_BO_VRAM | NOUVEAU_BO_RD);
+
+ nouveau_device_get_param(dev, NOUVEAU_GETPARAM_GRAPH_UNITS, &value);
+
+ max_warps = util_bitcount(value & 0xffff);
+ max_warps *= util_bitcount((value >> 24) & 0xf) * 32;
+
+ stack_size = max_warps * 64 * 8;
+
+ ret = nouveau_bo_new(dev, NOUVEAU_BO_VRAM, 1 << 16, stack_size,
+ &screen->stack_bo);
+ if (ret)
+ FAIL_SCREEN_INIT("Failed to allocate stack bo: %d\n", ret);
+
+ BEGIN_RING(chan, RING_3D(STACK_ADDRESS_HIGH), 3);
+ OUT_RELOCh(chan, screen->stack_bo, 0, NOUVEAU_BO_VRAM | NOUVEAU_BO_RDWR);
+ OUT_RELOCl(chan, screen->stack_bo, 0, NOUVEAU_BO_VRAM | NOUVEAU_BO_RDWR);
+ OUT_RING (chan, 4);
+
+ tls_space = NV50_CAP_MAX_PROGRAM_TEMPS * 16;
+
+ screen->tls_size = tls_space * max_warps * 32;
+
+ debug_printf("max_warps = %i, tls_size = %lu KiB\n",
+ max_warps, screen->tls_size >> 10);
+
+ ret = nouveau_bo_new(dev, NOUVEAU_BO_VRAM, 1 << 16, screen->tls_size,
+ &screen->tls_bo);
+ if (ret)
+ FAIL_SCREEN_INIT("Failed to allocate stack bo: %d\n", ret);
+
+ BEGIN_RING(chan, RING_3D(LOCAL_ADDRESS_HIGH), 3);
+ OUT_RELOCh(chan, screen->tls_bo, 0, NOUVEAU_BO_VRAM | NOUVEAU_BO_RDWR);
+ OUT_RELOCl(chan, screen->tls_bo, 0, NOUVEAU_BO_VRAM | NOUVEAU_BO_RDWR);
+ OUT_RING (chan, util_unsigned_logbase2(tls_space / 8));
+
+ ret = nouveau_bo_new(dev, NOUVEAU_BO_VRAM, 1 << 16, 4 << 16,
+ &screen->uniforms);
+ if (ret)
+ goto fail;
+
+ BEGIN_RING(chan, RING_3D(CB_DEF_ADDRESS_HIGH), 3);
+ OUT_RELOCh(chan, screen->uniforms, 0 << 16, NOUVEAU_BO_VRAM | NOUVEAU_BO_RD);
+ OUT_RELOCl(chan, screen->uniforms, 0 << 16, NOUVEAU_BO_VRAM | NOUVEAU_BO_RD);
+ OUT_RING (chan, (NV50_CB_PVP << 16) | 0x0000);
+
+ BEGIN_RING(chan, RING_3D(CB_DEF_ADDRESS_HIGH), 3);
+ OUT_RELOCh(chan, screen->uniforms, 1 << 16, NOUVEAU_BO_VRAM | NOUVEAU_BO_RD);
+ OUT_RELOCl(chan, screen->uniforms, 1 << 16, NOUVEAU_BO_VRAM | NOUVEAU_BO_RD);
+ OUT_RING (chan, (NV50_CB_PGP << 16) | 0x0000);
+
+ BEGIN_RING(chan, RING_3D(CB_DEF_ADDRESS_HIGH), 3);
+ OUT_RELOCh(chan, screen->uniforms, 2 << 16, NOUVEAU_BO_VRAM | NOUVEAU_BO_RD);
+ OUT_RELOCl(chan, screen->uniforms, 2 << 16, NOUVEAU_BO_VRAM | NOUVEAU_BO_RD);
+ OUT_RING (chan, (NV50_CB_PFP << 16) | 0x0000);
+
+ BEGIN_RING(chan, RING_3D(CB_DEF_ADDRESS_HIGH), 3);
+ OUT_RELOCh(chan, screen->uniforms, 3 << 16, NOUVEAU_BO_VRAM | NOUVEAU_BO_RD);
+ OUT_RELOCl(chan, screen->uniforms, 3 << 16, NOUVEAU_BO_VRAM | NOUVEAU_BO_RD);
+ OUT_RING (chan, (NV50_CB_AUX << 16) | 0x0200);
+
+ BEGIN_RING_NI(chan, RING_3D(SET_PROGRAM_CB), 6);
+ OUT_RING (chan, (NV50_CB_PVP << 12) | 0x001);
+ OUT_RING (chan, (NV50_CB_PGP << 12) | 0x021);
+ OUT_RING (chan, (NV50_CB_PFP << 12) | 0x031);
+ OUT_RING (chan, (NV50_CB_AUX << 12) | 0xf01);
+ OUT_RING (chan, (NV50_CB_AUX << 12) | 0xf21);
+ OUT_RING (chan, (NV50_CB_AUX << 12) | 0xf31);
+
+ ret = nouveau_bo_new(dev, NOUVEAU_BO_VRAM, 1 << 16, 3 << 16,
+ &screen->txc);
+ if (ret)
+ FAIL_SCREEN_INIT("Could not allocate TIC/TSC bo: %d\n", ret);
+
+ /* max TIC (bits 4:8) & TSC bindings, per program type */
+ for (i = 0; i < 3; ++i) {
+ BEGIN_RING(chan, RING_3D(TEX_LIMITS(i)), 1);
+ OUT_RING (chan, 0x54);
+ }
+
+ BEGIN_RING(chan, RING_3D(TIC_ADDRESS_HIGH), 3);
+ OUT_RELOCh(chan, screen->txc, 0, NOUVEAU_BO_VRAM | NOUVEAU_BO_RD);
+ OUT_RELOCl(chan, screen->txc, 0, NOUVEAU_BO_VRAM | NOUVEAU_BO_RD);
+ OUT_RING (chan, NV50_TIC_MAX_ENTRIES - 1);
+
+ BEGIN_RING(chan, RING_3D(TSC_ADDRESS_HIGH), 3);
+ OUT_RELOCh(chan, screen->txc, 65536, NOUVEAU_BO_VRAM | NOUVEAU_BO_RD);
+ OUT_RELOCl(chan, screen->txc, 65536, NOUVEAU_BO_VRAM | NOUVEAU_BO_RD);
+ OUT_RING (chan, NV50_TSC_MAX_ENTRIES - 1);
+
+ BEGIN_RING(chan, RING_3D(LINKED_TSC), 1);
+ OUT_RING (chan, 0);
+
+ BEGIN_RING(chan, RING_3D(CLIP_RECTS_EN), 1);
+ OUT_RING (chan, 0);
+ BEGIN_RING(chan, RING_3D(CLIP_RECTS_MODE), 1);
+ OUT_RING (chan, NV50_3D_CLIP_RECTS_MODE_INSIDE_ANY);
+ BEGIN_RING(chan, RING_3D(CLIP_RECT_HORIZ(0)), 8 * 2);
+ for (i = 0; i < 8 * 2; ++i)
+ OUT_RING(chan, 0);
+ BEGIN_RING(chan, RING_3D(CLIPID_ENABLE), 1);
+ OUT_RING (chan, 0);
+
+ BEGIN_RING(chan, RING_3D(VIEWPORT_TRANSFORM_EN), 1);
+ OUT_RING (chan, 1);
+ BEGIN_RING(chan, RING_3D(DEPTH_RANGE_NEAR(0)), 2);
+ OUT_RINGf (chan, 0.0f);
+ OUT_RINGf (chan, 1.0f);
+
+ BEGIN_RING(chan, RING_3D(VIEW_VOLUME_CLIP_CTRL), 1);
+#ifdef NV50_SCISSORS_CLIPPING
+ OUT_RING (chan, 0x0000);
+#else
+ OUT_RING (chan, 0x1080);
+#endif
+
+ BEGIN_RING(chan, RING_3D(CLEAR_FLAGS), 1);
+ OUT_RING (chan, NV50_3D_CLEAR_FLAGS_CLEAR_RECT_VIEWPORT);
- BGN_RELOC (chan, screen->tic, tesla, NV50TCL_TIC_ADDRESS_HIGH, 2, rl);
- OUT_RELOCh(chan, screen->tic, 0, rl);
- OUT_RELOCl(chan, screen->tic, 0, rl);
+ /* We use scissors instead of exact view volume clipping,
+ * so they're always enabled.
+ */
+ BEGIN_RING(chan, RING_3D(SCISSOR_ENABLE(0)), 3);
+ OUT_RING (chan, 1);
+ OUT_RING (chan, 8192 << 16);
+ OUT_RING (chan, 8192 << 16);
- BGN_RELOC (chan, screen->tsc, tesla, NV50TCL_TSC_ADDRESS_HIGH, 2, rl);
- OUT_RELOCh(chan, screen->tsc, 0, rl);
- OUT_RELOCl(chan, screen->tsc, 0, rl);
+ BEGIN_RING(chan, RING_3D(RASTERIZE_ENABLE), 1);
+ OUT_RING (chan, 1);
+ BEGIN_RING(chan, RING_3D(POINT_RASTER_RULES), 1);
+ OUT_RING (chan, NV50_3D_POINT_RASTER_RULES_OGL);
+ BEGIN_RING(chan, RING_3D(FRAG_COLOR_CLAMP_EN), 1);
+ OUT_RING (chan, 0x11111111);
+ BEGIN_RING(chan, RING_3D(EDGEFLAG_ENABLE), 1);
+ OUT_RING (chan, 1);
- nv50_screen_reloc_constbuf(screen, NV50_CB_PMISC);
+ FIRE_RING (chan);
- BGN_RELOC (chan, screen->constbuf_misc[0],
- tesla, NV50TCL_CB_DEF_ADDRESS_HIGH, 3, rl);
- OUT_RELOCh(chan, screen->constbuf_misc[0], 0x200, rl);
- OUT_RELOCl(chan, screen->constbuf_misc[0], 0x200, rl);
- OUT_RELOC (chan, screen->constbuf_misc[0],
- (NV50_CB_AUX << 16) | 0x0200, rl, 0, 0);
+ screen->tic.entries = CALLOC(4096, sizeof(void *));
+ screen->tsc.entries = screen->tic.entries + 2048;
- for (i = 0; i < 3; ++i)
- nv50_screen_reloc_constbuf(screen, NV50_CB_PVP + i);
+ screen->mm_VRAM_fe0 = nouveau_mm_create(dev, NOUVEAU_BO_VRAM, 0xfe0);
- BGN_RELOC (chan, screen->stack_bo,
- tesla, NV50TCL_STACK_ADDRESS_HIGH, 2, rl);
- OUT_RELOCh(chan, screen->stack_bo, 0, rl);
- OUT_RELOCl(chan, screen->stack_bo, 0, rl);
+ nouveau_fence_new(&screen->base, &screen->base.fence.current, FALSE);
- if (!screen->cur_ctx->req_lmem)
- return;
+ return pscreen;
- BGN_RELOC (chan, screen->local_bo,
- tesla, NV50TCL_LOCAL_ADDRESS_HIGH, 2, rl);
- OUT_RELOCh(chan, screen->local_bo, 0, rl);
- OUT_RELOCl(chan, screen->local_bo, 0, rl);
+fail:
+ nv50_screen_destroy(pscreen);
+ return NULL;
}
-#ifndef NOUVEAU_GETPARAM_GRAPH_UNITS
-# define NOUVEAU_GETPARAM_GRAPH_UNITS 13
-#endif
+void
+nv50_screen_make_buffers_resident(struct nv50_screen *screen)
+{
+ struct nouveau_channel *chan = screen->base.channel;
-extern int nouveau_device_get_param(struct nouveau_device *dev,
- uint64_t param, uint64_t *value);
+ const unsigned flags = NOUVEAU_BO_VRAM | NOUVEAU_BO_RD;
-struct pipe_screen *
-nv50_screen_create(struct pipe_winsys *ws, struct nouveau_device *dev)
+ MARK_RING(chan, 5, 5);
+ nouveau_bo_validate(chan, screen->code, flags);
+ nouveau_bo_validate(chan, screen->uniforms, flags);
+ nouveau_bo_validate(chan, screen->txc, flags);
+ nouveau_bo_validate(chan, screen->tls_bo, flags);
+ nouveau_bo_validate(chan, screen->stack_bo, flags);
+}
+
+int
+nv50_screen_tic_alloc(struct nv50_screen *screen, void *entry)
{
- struct nv50_screen *screen = CALLOC_STRUCT(nv50_screen);
- struct nouveau_channel *chan;
- struct pipe_screen *pscreen;
- uint64_t value;
- unsigned chipset = dev->chipset;
- unsigned tesla_class = 0;
- unsigned stack_size, local_size, max_warps;
- int ret, i;
- const unsigned rl = NOUVEAU_BO_VRAM | NOUVEAU_BO_RD;
-
- if (!screen)
- return NULL;
- pscreen = &screen->base.base;
-
- ret = nouveau_screen_init(&screen->base, dev);
- if (ret) {
- nv50_screen_destroy(pscreen);
- return NULL;
- }
- chan = screen->base.channel;
-
- pscreen->winsys = ws;
- pscreen->destroy = nv50_screen_destroy;
- pscreen->get_param = nv50_screen_get_param;
- pscreen->get_shader_param = nv50_screen_get_shader_param;
- pscreen->get_paramf = nv50_screen_get_paramf;
- pscreen->is_format_supported = nv50_screen_is_format_supported;
- pscreen->context_create = nv50_create;
-
- nv50_screen_init_resource_functions(pscreen);
-
- /* DMA engine object */
- ret = nouveau_grobj_alloc(chan, 0xbeef5039,
- NV50_MEMORY_TO_MEMORY_FORMAT, &screen->m2mf);
- if (ret) {
- NOUVEAU_ERR("Error creating M2MF object: %d\n", ret);
- nv50_screen_destroy(pscreen);
- return NULL;
- }
-
- /* 2D object */
- ret = nouveau_grobj_alloc(chan, 0xbeef502d, NV50_2D, &screen->eng2d);
- if (ret) {
- NOUVEAU_ERR("Error creating 2D object: %d\n", ret);
- nv50_screen_destroy(pscreen);
- return NULL;
- }
-
- /* 3D object */
- switch (chipset & 0xf0) {
- case 0x50:
- tesla_class = NV50TCL;
- break;
- case 0x80:
- case 0x90:
- tesla_class = NV84TCL;
- break;
- case 0xa0:
- switch (chipset) {
- case 0xa0:
- case 0xaa:
- case 0xac:
- tesla_class = NVA0TCL;
- break;
- default:
- tesla_class = NVA8TCL;
- break;
- }
- break;
- default:
- NOUVEAU_ERR("Not a known NV50 chipset: NV%02x\n", chipset);
- nv50_screen_destroy(pscreen);
- return NULL;
- }
-
- ret = nouveau_grobj_alloc(chan, 0xbeef5097, tesla_class,
- &screen->tesla);
- if (ret) {
- NOUVEAU_ERR("Error creating 3D object: %d\n", ret);
- nv50_screen_destroy(pscreen);
- return NULL;
- }
-
- /* this is necessary for the new RING_3D / statebuffer code */
- BIND_RING(chan, screen->tesla, 7);
-
- /* Sync notifier */
- ret = nouveau_notifier_alloc(chan, 0xbeef0301, 1, &screen->sync);
- if (ret) {
- NOUVEAU_ERR("Error creating notifier object: %d\n", ret);
- nv50_screen_destroy(pscreen);
- return NULL;
- }
-
- /* Static M2MF init */
- BEGIN_RING(chan, screen->m2mf,
- NV04_MEMORY_TO_MEMORY_FORMAT_DMA_NOTIFY, 3);
- OUT_RING (chan, screen->sync->handle);
- OUT_RING (chan, chan->vram->handle);
- OUT_RING (chan, chan->vram->handle);
-
- /* Static 2D init */
- BEGIN_RING(chan, screen->eng2d, NV50_2D_DMA_NOTIFY, 4);
- OUT_RING (chan, screen->sync->handle);
- OUT_RING (chan, chan->vram->handle);
- OUT_RING (chan, chan->vram->handle);
- OUT_RING (chan, chan->vram->handle);
- BEGIN_RING(chan, screen->eng2d, NV50_2D_OPERATION, 1);
- OUT_RING (chan, NV50_2D_OPERATION_SRCCOPY);
- BEGIN_RING(chan, screen->eng2d, NV50_2D_CLIP_ENABLE, 1);
- OUT_RING (chan, 0);
- BEGIN_RING(chan, screen->eng2d, 0x0888, 1);
- OUT_RING (chan, 1);
-
- /* Static tesla init */
- BEGIN_RING(chan, screen->tesla, NV50TCL_COND_MODE, 1);
- OUT_RING (chan, NV50TCL_COND_MODE_ALWAYS);
- BEGIN_RING(chan, screen->tesla, NV50TCL_DMA_NOTIFY, 1);
- OUT_RING (chan, screen->sync->handle);
- BEGIN_RING(chan, screen->tesla, NV50TCL_DMA_ZETA, 11);
- for (i = 0; i < 11; i++)
- OUT_RING (chan, chan->vram->handle);
- BEGIN_RING(chan, screen->tesla,
- NV50TCL_DMA_COLOR(0), NV50TCL_DMA_COLOR__SIZE);
- for (i = 0; i < NV50TCL_DMA_COLOR__SIZE; i++)
- OUT_RING (chan, chan->vram->handle);
-
- BEGIN_RING(chan, screen->tesla, NV50TCL_RT_CONTROL, 1);
- OUT_RING (chan, 1);
-
- /* activate all 32 lanes (threads) in a warp */
- BEGIN_RING(chan, screen->tesla, NV50TCL_REG_MODE, 1);
- OUT_RING (chan, NV50TCL_REG_MODE_STRIPED);
- BEGIN_RING(chan, screen->tesla, 0x1400, 1);
- OUT_RING (chan, 0xf);
-
- /* max TIC (bits 4:8) & TSC (ignored) bindings, per program type */
- for (i = 0; i < 3; ++i) {
- BEGIN_RING(chan, screen->tesla, NV50TCL_TEX_LIMITS(i), 1);
- OUT_RING (chan, 0x54);
- }
-
- /* origin is top left (set to 1 for bottom left) */
- BEGIN_RING(chan, screen->tesla, NV50TCL_Y_ORIGIN_BOTTOM, 1);
- OUT_RING (chan, 0);
- BEGIN_RING(chan, screen->tesla, NV50TCL_VP_REG_ALLOC_RESULT, 1);
- OUT_RING (chan, 8);
-
- BEGIN_RING(chan, screen->tesla, NV50TCL_CLEAR_FLAGS, 1);
- OUT_RING (chan, NV50TCL_CLEAR_FLAGS_D3D);
-
- /* constant buffers for immediates and VP/FP parameters */
- ret = nouveau_bo_new(dev, NOUVEAU_BO_VRAM, 0, (32 * 4) * 4,
- &screen->constbuf_misc[0]);
- if (ret) {
- nv50_screen_destroy(pscreen);
- return NULL;
- }
- BEGIN_RING(chan, screen->tesla, NV50TCL_CB_DEF_ADDRESS_HIGH, 3);
- OUT_RELOCh(chan, screen->constbuf_misc[0], 0, rl);
- OUT_RELOCl(chan, screen->constbuf_misc[0], 0, rl);
- OUT_RING (chan, (NV50_CB_PMISC << 16) | 0x0200);
- BEGIN_RING(chan, screen->tesla, NV50TCL_CB_DEF_ADDRESS_HIGH, 3);
- OUT_RELOCh(chan, screen->constbuf_misc[0], 0x200, rl);
- OUT_RELOCl(chan, screen->constbuf_misc[0], 0x200, rl);
- OUT_RING (chan, (NV50_CB_AUX << 16) | 0x0200);
-
- for (i = 0; i < 3; i++) {
- ret = nouveau_bo_new(dev, NOUVEAU_BO_VRAM, 0, (4096 * 4) * 4,
- &screen->constbuf_parm[i]);
- if (ret) {
- nv50_screen_destroy(pscreen);
- return NULL;
- }
- BEGIN_RING(chan, screen->tesla, NV50TCL_CB_DEF_ADDRESS_HIGH, 3);
- OUT_RELOCh(chan, screen->constbuf_parm[i], 0, rl);
- OUT_RELOCl(chan, screen->constbuf_parm[i], 0, rl);
- /* CB_DEF_SET_SIZE value of 0x0000 means 65536 */
- OUT_RING (chan, ((NV50_CB_PVP + i) << 16) | 0x0000);
- }
-
- if (nouveau_resource_init(&screen->immd_heap, 0, 128)) {
- NOUVEAU_ERR("Error initialising shader immediates heap.\n");
- nv50_screen_destroy(pscreen);
- return NULL;
- }
-
- ret = nouveau_bo_new(dev, NOUVEAU_BO_VRAM, 0, 3 * 32 * (8 * 4),
- &screen->tic);
- if (ret) {
- nv50_screen_destroy(pscreen);
- return NULL;
- }
- BEGIN_RING(chan, screen->tesla, NV50TCL_TIC_ADDRESS_HIGH, 3);
- OUT_RELOCh(chan, screen->tic, 0, NOUVEAU_BO_VRAM | NOUVEAU_BO_RD);
- OUT_RELOCl(chan, screen->tic, 0, NOUVEAU_BO_VRAM | NOUVEAU_BO_RD);
- OUT_RING (chan, 3 * 32 - 1);
-
- ret = nouveau_bo_new(dev, NOUVEAU_BO_VRAM, 0, 3 * 32 * (8 * 4),
- &screen->tsc);
- if (ret) {
- nv50_screen_destroy(pscreen);
- return NULL;
- }
- BEGIN_RING(chan, screen->tesla, NV50TCL_TSC_ADDRESS_HIGH, 3);
- OUT_RELOCh(chan, screen->tsc, 0, NOUVEAU_BO_VRAM | NOUVEAU_BO_RD);
- OUT_RELOCl(chan, screen->tsc, 0, NOUVEAU_BO_VRAM | NOUVEAU_BO_RD);
- OUT_RING (chan, 0); /* ignored if TSC_LINKED (0x1234) == 1 */
-
- /* map constant buffers:
- * B = buffer ID (maybe more than 1 byte)
- * N = CB index used in shader instruction
- * P = program type (0 = VP, 2 = GP, 3 = FP)
- * SET_PROGRAM_CB = 0x000BBNP1
- */
- BEGIN_RING_NI(chan, screen->tesla, NV50TCL_SET_PROGRAM_CB, 8);
- /* bind immediate buffer */
- OUT_RING (chan, 0x001 | (NV50_CB_PMISC << 12));
- OUT_RING (chan, 0x021 | (NV50_CB_PMISC << 12));
- OUT_RING (chan, 0x031 | (NV50_CB_PMISC << 12));
- /* bind auxiliary constbuf to immediate data bo */
- OUT_RING (chan, 0x201 | (NV50_CB_AUX << 12));
- OUT_RING (chan, 0x221 | (NV50_CB_AUX << 12));
- /* bind parameter buffers */
- OUT_RING (chan, 0x101 | (NV50_CB_PVP << 12));
- OUT_RING (chan, 0x121 | (NV50_CB_PGP << 12));
- OUT_RING (chan, 0x131 | (NV50_CB_PFP << 12));
-
- /* shader stack */
- nouveau_device_get_param(dev, NOUVEAU_GETPARAM_GRAPH_UNITS, &value);
-
- max_warps = util_bitcount(value & 0xffff);
- max_warps *= util_bitcount((value >> 24) & 0xf) * 32;
-
- stack_size = max_warps * 64 * 8;
-
- ret = nouveau_bo_new(dev, NOUVEAU_BO_VRAM, 1 << 16,
- stack_size, &screen->stack_bo);
- if (ret) {
- nv50_screen_destroy(pscreen);
- return NULL;
- }
- BEGIN_RING(chan, screen->tesla, NV50TCL_STACK_ADDRESS_HIGH, 3);
- OUT_RELOCh(chan, screen->stack_bo, 0, NOUVEAU_BO_VRAM | NOUVEAU_BO_WR);
- OUT_RELOCl(chan, screen->stack_bo, 0, NOUVEAU_BO_VRAM | NOUVEAU_BO_WR);
- OUT_RING (chan, 4);
-
- local_size = (NV50_CAP_MAX_PROGRAM_TEMPS * 16) * max_warps * 32;
-
- ret = nouveau_bo_new(dev, NOUVEAU_BO_VRAM, 1 << 16,
- local_size, &screen->local_bo);
- if (ret) {
- nv50_screen_destroy(pscreen);
- return NULL;
- }
-
- local_size = NV50_CAP_MAX_PROGRAM_TEMPS * 16;
-
- BEGIN_RING(chan, screen->tesla, NV50TCL_LOCAL_ADDRESS_HIGH, 3);
- OUT_RELOCh(chan, screen->local_bo, 0, NOUVEAU_BO_VRAM | NOUVEAU_BO_WR);
- OUT_RELOCl(chan, screen->local_bo, 0, NOUVEAU_BO_VRAM | NOUVEAU_BO_WR);
- OUT_RING (chan, util_unsigned_logbase2(local_size / 8));
-
- /* Vertex array limits - max them out */
- for (i = 0; i < 16; i++) {
- BEGIN_RING(chan, screen->tesla,
- NV50TCL_VERTEX_ARRAY_LIMIT_HIGH(i), 2);
- OUT_RING (chan, 0x000000ff);
- OUT_RING (chan, 0xffffffff);
- }
-
- BEGIN_RING(chan, screen->tesla, NV50TCL_DEPTH_RANGE_NEAR(0), 2);
- OUT_RINGf (chan, 0.0f);
- OUT_RINGf (chan, 1.0f);
-
- BEGIN_RING(chan, screen->tesla, NV50TCL_VIEWPORT_TRANSFORM_EN, 1);
- OUT_RING (chan, 1);
-
- /* no dynamic combination of TIC & TSC entries => only BIND_TIC used */
- BEGIN_RING(chan, screen->tesla, NV50TCL_LINKED_TSC, 1);
- OUT_RING (chan, 1);
-
- BEGIN_RING(chan, screen->tesla, NV50TCL_EDGEFLAG_ENABLE, 1);
- OUT_RING (chan, 1); /* default edgeflag to TRUE */
-
- FIRE_RING (chan);
-
- screen->force_push = debug_get_bool_option("NV50_ALWAYS_PUSH", FALSE);
- if(!screen->force_push)
- screen->base.vertex_buffer_flags = screen->base.index_buffer_flags = NOUVEAU_BO_GART;
- return pscreen;
+ int i = screen->tic.next;
+
+ while (screen->tic.lock[i / 32] & (1 << (i % 32)))
+ i = (i + 1) & (NV50_TIC_MAX_ENTRIES - 1);
+
+ screen->tic.next = (i + 1) & (NV50_TIC_MAX_ENTRIES - 1);
+
+ if (screen->tic.entries[i])
+ nv50_tic_entry(screen->tic.entries[i])->id = -1;
+
+ screen->tic.entries[i] = entry;
+ return i;
}
+int
+nv50_screen_tsc_alloc(struct nv50_screen *screen, void *entry)
+{
+ int i = screen->tsc.next;
+
+ while (screen->tsc.lock[i / 32] & (1 << (i % 32)))
+ i = (i + 1) & (NV50_TSC_MAX_ENTRIES - 1);
+
+ screen->tsc.next = (i + 1) & (NV50_TSC_MAX_ENTRIES - 1);
+
+ if (screen->tsc.entries[i])
+ nv50_tsc_entry(screen->tsc.entries[i])->id = -1;
+
+ screen->tsc.entries[i] = entry;
+ return i;
+}
diff --git a/src/gallium/drivers/nv50/nv50_screen.h b/src/gallium/drivers/nv50/nv50_screen.h
index 6e15230b486..aea434b8679 100644
--- a/src/gallium/drivers/nv50/nv50_screen.h
+++ b/src/gallium/drivers/nv50/nv50_screen.h
@@ -1,53 +1,148 @@
#ifndef __NV50_SCREEN_H__
#define __NV50_SCREEN_H__
+#define NOUVEAU_NVC0
#include "nouveau/nouveau_screen.h"
+#include "nouveau/nouveau_fence.h"
+#include "nouveau/nouveau_mm.h"
+#undef NOUVEAU_NVC0
+#include "nv50_winsys.h"
+#include "nv50_stateobj.h"
+
+#define NV50_TIC_MAX_ENTRIES 2048
+#define NV50_TSC_MAX_ENTRIES 2048
struct nv50_context;
-struct nv50_screen {
- struct nouveau_screen base;
+#define NV50_CODE_BO_SIZE_LOG2 19
- struct nouveau_winsys *nvws;
+#define NV50_SCRATCH_SIZE (2 << 20)
+#define NV50_SCRATCH_NR_BUFFERS 2
- struct nv50_context *cur_ctx;
+struct nv50_screen {
+ struct nouveau_screen base;
+ struct nouveau_winsys *nvws;
+
+ struct nv50_context *cur_ctx;
+
+ struct nouveau_bo *code;
+ struct nouveau_bo *uniforms;
+ struct nouveau_bo *txc; /* TIC (offset 0) and TSC (65536) */
+ struct nouveau_bo *stack_bo;
+ struct nouveau_bo *tls_bo;
+
+ uint64_t tls_size;
+
+ struct nouveau_resource *vp_code_heap;
+ struct nouveau_resource *gp_code_heap;
+ struct nouveau_resource *fp_code_heap;
+
+ struct {
+ void **entries;
+ int next;
+ uint32_t lock[NV50_TIC_MAX_ENTRIES / 32];
+ } tic;
+
+ struct {
+ void **entries;
+ int next;
+ uint32_t lock[NV50_TSC_MAX_ENTRIES / 32];
+ } tsc;
+
+ struct {
+ uint32_t *map;
+ struct nouveau_bo *bo;
+ } fence;
+
+ struct nouveau_notifier *sync;
+
+ struct nouveau_mman *mm_VRAM_fe0;
+
+ struct nouveau_grobj *tesla;
+ struct nouveau_grobj *eng2d;
+ struct nouveau_grobj *m2mf;
+};
- struct nouveau_grobj *tesla;
- struct nouveau_grobj *eng2d;
- struct nouveau_grobj *m2mf;
- struct nouveau_notifier *sync;
+static INLINE struct nv50_screen *
+nv50_screen(struct pipe_screen *screen)
+{
+ return (struct nv50_screen *)screen;
+}
- struct nouveau_bo *constbuf_misc[1];
- struct nouveau_bo *constbuf_parm[PIPE_SHADER_TYPES];
+void nv50_screen_make_buffers_resident(struct nv50_screen *);
- struct nouveau_resource *immd_heap;
+int nv50_screen_tic_alloc(struct nv50_screen *, void *);
+int nv50_screen_tsc_alloc(struct nv50_screen *, void *);
- struct nouveau_bo *tic;
- struct nouveau_bo *tsc;
+static INLINE void
+nv50_resource_fence(struct nv04_resource *res, uint32_t flags)
+{
+ struct nv50_screen *screen = nv50_screen(res->base.screen);
- struct nouveau_bo *stack_bo; /* control flow stack */
- struct nouveau_bo *local_bo; /* l[] memory */
+ if (res->mm) {
+ nouveau_fence_ref(screen->base.fence.current, &res->fence);
- boolean force_push;
-};
+ if (flags & NOUVEAU_BO_WR)
+ nouveau_fence_ref(screen->base.fence.current, &res->fence_wr);
+ }
+}
-static INLINE struct nv50_screen *
-nv50_screen(struct pipe_screen *screen)
+static INLINE void
+nv50_resource_validate(struct nv04_resource *res, uint32_t flags)
{
- return (struct nv50_screen *)screen;
-}
+ struct nv50_screen *screen = nv50_screen(res->base.screen);
-extern void nv50_screen_relocs(struct nv50_screen *);
+ if (likely(res->bo)) {
+ nouveau_bo_validate(screen->base.channel, res->bo, flags);
-extern void nv50_screen_reloc_constbuf(struct nv50_screen *, unsigned cbi);
+ if (flags & NOUVEAU_BO_WR)
+ res->status |= NOUVEAU_BUFFER_STATUS_GPU_WRITING;
+ if (flags & NOUVEAU_BO_RD)
+ res->status |= NOUVEAU_BUFFER_STATUS_GPU_READING;
+
+ nv50_resource_fence(res, flags);
+ }
+}
struct nv50_format {
- uint32_t rt;
- uint32_t tic;
- uint32_t vtx;
- uint32_t usage;
+ uint32_t rt;
+ uint32_t tic;
+ uint32_t vtx;
+ uint32_t usage;
};
extern const struct nv50_format nv50_format_table[];
+static INLINE void
+nv50_screen_tic_unlock(struct nv50_screen *screen, struct nv50_tic_entry *tic)
+{
+ if (tic->id >= 0)
+ screen->tic.lock[tic->id / 32] &= ~(1 << (tic->id % 32));
+}
+
+static INLINE void
+nv50_screen_tsc_unlock(struct nv50_screen *screen, struct nv50_tsc_entry *tsc)
+{
+ if (tsc->id >= 0)
+ screen->tsc.lock[tsc->id / 32] &= ~(1 << (tsc->id % 32));
+}
+
+static INLINE void
+nv50_screen_tic_free(struct nv50_screen *screen, struct nv50_tic_entry *tic)
+{
+ if (tic->id >= 0) {
+ screen->tic.entries[tic->id] = NULL;
+ screen->tic.lock[tic->id / 32] &= ~(1 << (tic->id % 32));
+ }
+}
+
+static INLINE void
+nv50_screen_tsc_free(struct nv50_screen *screen, struct nv50_tsc_entry *tsc)
+{
+ if (tsc->id >= 0) {
+ screen->tsc.entries[tsc->id] = NULL;
+ screen->tsc.lock[tsc->id / 32] &= ~(1 << (tsc->id % 32));
+ }
+}
+
#endif
diff --git a/src/gallium/drivers/nv50/nv50_shader_state.c b/src/gallium/drivers/nv50/nv50_shader_state.c
index 306aa81d985..bea9c095bb3 100644
--- a/src/gallium/drivers/nv50/nv50_shader_state.c
+++ b/src/gallium/drivers/nv50/nv50_shader_state.c
@@ -28,422 +28,266 @@
#include "nv50_context.h"
-static void
-nv50_transfer_constbuf(struct nv50_context *nv50,
- struct pipe_resource *buf, unsigned size, unsigned cbi)
+void
+nv50_constbufs_validate(struct nv50_context *nv50)
{
- struct pipe_context *pipe = &nv50->pipe;
- struct pipe_transfer *transfer;
struct nouveau_channel *chan = nv50->screen->base.channel;
- struct nouveau_grobj *tesla = nv50->screen->tesla;
- uint32_t *map;
- unsigned count, start;
+ unsigned s;
- if (buf == NULL)
- return;
+ for (s = 0; s < 3; ++s) {
+ struct nv04_resource *res;
+ int i;
+ unsigned p, b;
- map = pipe_buffer_map(pipe, buf, PIPE_TRANSFER_READ, &transfer);
- if (!map)
- return;
+ if (s == PIPE_SHADER_FRAGMENT)
+ p = NV50_3D_SET_PROGRAM_CB_PROGRAM_FRAGMENT;
+ else
+ if (s == PIPE_SHADER_GEOMETRY)
+ p = NV50_3D_SET_PROGRAM_CB_PROGRAM_GEOMETRY;
+ else
+ p = NV50_3D_SET_PROGRAM_CB_PROGRAM_VERTEX;
+
+ while (nv50->constbuf_dirty[s]) {
+ struct nouveau_bo *bo;
+ unsigned start = 0;
+ unsigned words = 0;
+
+ i = ffs(nv50->constbuf_dirty[s]) - 1;
+ nv50->constbuf_dirty[s] &= ~(1 << i);
+
+ res = nv04_resource(nv50->constbuf[s][i]);
+ if (!res) {
+ if (i != 0) {
+ BEGIN_RING(chan, RING_3D(SET_PROGRAM_CB), 1);
+ OUT_RING (chan, (i << 8) | p | 0);
+ }
+ continue;
+ }
- count = (buf->width0 + 3) / 4;
- start = 0;
+ if (i == 0) {
+ b = NV50_CB_PVP + s;
- while (count) {
- unsigned nr = AVAIL_RING(chan);
+ /* always upload GL uniforms through CB DATA */
+ bo = nv50->screen->uniforms;
+ words = res->base.width0 / 4;
+ } else {
+ b = s * 16 + i;
- if (nr < 8) {
- FIRE_RING(chan);
- continue;
- }
- nr = MIN2(count, nr - 7);
- nr = MIN2(nr, NV04_PFIFO_MAX_PACKET_LEN);
+ assert(0);
- nv50_screen_reloc_constbuf(nv50->screen, cbi);
+ if (!nouveau_resource_mapped_by_gpu(&res->base)) {
+ nouveau_buffer_migrate(&nv50->base, res, NOUVEAU_BO_VRAM);
- BEGIN_RING(chan, tesla, NV50TCL_CB_ADDR, 1);
- OUT_RING (chan, (start << 8) | cbi);
- BEGIN_RING_NI(chan, tesla, NV50TCL_CB_DATA(0), nr);
- OUT_RINGp (chan, map, nr);
+ BEGIN_RING(chan, RING_3D(CODE_CB_FLUSH), 1);
+ OUT_RING (chan, 0);
+ }
+ MARK_RING (chan, 6, 2);
+ BEGIN_RING(chan, RING_3D(CB_DEF_ADDRESS_HIGH), 3);
+ OUT_RESRCh(chan, res, 0, NOUVEAU_BO_RD);
+ OUT_RESRCl(chan, res, 0, NOUVEAU_BO_RD);
+ OUT_RING (chan, (b << 16) | (res->base.width0 & 0xffff));
+ BEGIN_RING(chan, RING_3D(SET_PROGRAM_CB), 1);
+ OUT_RING (chan, (b << 12) | (i << 8) | p | 1);
- count -= nr;
- start += nr;
- map += nr;
- }
-
- pipe_buffer_unmap(pipe, buf, transfer);
-}
+ bo = res->bo;
-static void
-nv50_program_validate_data(struct nv50_context *nv50, struct nv50_program *p)
-{
- struct nouveau_channel *chan = nv50->screen->base.channel;
- struct nouveau_grobj *tesla = nv50->screen->tesla;
- unsigned cbi;
-
- if (p->immd_size) {
- uint32_t *data = p->immd;
- unsigned count = p->immd_size / 4;
- unsigned start = 0;
+ nv50_bufctx_add_resident(nv50, NV50_BUFCTX_CONSTANT, res,
+ res->domain | NOUVEAU_BO_RD);
+ }
- while (count) {
- unsigned nr = AVAIL_RING(chan);
+ if (words) {
+ MARK_RING(chan, 8, 1);
- if (nr < 8) {
- FIRE_RING(chan);
- continue;
+ nouveau_bo_validate(chan, bo, res->domain | NOUVEAU_BO_WR);
}
- nr = MIN2(count, nr - 7);
- nr = MIN2(nr, NV04_PFIFO_MAX_PACKET_LEN);
- nv50_screen_reloc_constbuf(nv50->screen, NV50_CB_PMISC);
+ while (words) {
+ unsigned nr = AVAIL_RING(chan);
- BEGIN_RING(chan, tesla, NV50TCL_CB_ADDR, 1);
- OUT_RING (chan, (start << 8) | NV50_CB_PMISC);
- BEGIN_RING_NI(chan, tesla, NV50TCL_CB_DATA(0), nr);
- OUT_RINGp (chan, data, nr);
+ if (nr < 16) {
+ FIRE_RING(chan);
+ nouveau_bo_validate(chan, bo, res->domain | NOUVEAU_BO_WR);
+ continue;
+ }
+ nr = MIN2(MIN2(nr - 3, words), NV04_PFIFO_MAX_PACKET_LEN);
- count -= nr;
- start += nr;
- data += nr;
- }
- }
+ BEGIN_RING(chan, RING_3D(CB_ADDR), 1);
+ OUT_RING (chan, (start << 8) | b);
+ BEGIN_RING_NI(chan, RING_3D(CB_DATA(0)), nr);
+ OUT_RINGp (chan, &res->data[start * 4], nr);
- /* If the state tracker doesn't change the constbuf, and it is first
- * validated with a program that doesn't use it, this check prevents
- * it from even being uploaded. */
- /*
- if (p->parm_size == 0)
- return;
- */
-
- switch (p->type) {
- case PIPE_SHADER_VERTEX:
- cbi = NV50_CB_PVP;
- break;
- case PIPE_SHADER_FRAGMENT:
- cbi = NV50_CB_PFP;
- break;
- case PIPE_SHADER_GEOMETRY:
- cbi = NV50_CB_PGP;
- break;
- default:
- assert(0);
- return;
+ start += nr;
+ words -= nr;
+ }
+ }
}
-
- nv50_transfer_constbuf(nv50, nv50->constbuf[p->type], p->parm_size, cbi);
}
-static void
-nv50_program_validate_code(struct nv50_context *nv50, struct nv50_program *p)
+static boolean
+nv50_program_validate(struct nv50_context *nv50, struct nv50_program *prog)
{
- struct nouveau_channel *chan = nv50->screen->base.channel;
- struct nouveau_grobj *tesla = nv50->screen->tesla;
- struct nouveau_grobj *eng2d = nv50->screen->eng2d;
+ struct nouveau_resource *heap;
int ret;
- unsigned offset;
- unsigned size = p->code_size;
- uint32_t *data = p->code;
+ unsigned size;
- assert(p->translated);
+ if (prog->translated)
+ return TRUE;
- /* TODO: use a single bo (for each type) for shader code */
- if (p->bo)
- return;
- ret = nouveau_bo_new(chan->device, NOUVEAU_BO_VRAM, 0x100, size, &p->bo);
- assert(!ret);
-
- offset = p->code_start = 0;
-
- BEGIN_RING(chan, eng2d, NV50_2D_DST_FORMAT, 2);
- OUT_RING (chan, NV50_2D_DST_FORMAT_R8_UNORM);
- OUT_RING (chan, 1);
- BEGIN_RING(chan, eng2d, NV50_2D_DST_PITCH, 1);
- OUT_RING (chan, 0x40000);
- BEGIN_RING(chan, eng2d, NV50_2D_DST_WIDTH, 2);
- OUT_RING (chan, 0x10000);
- OUT_RING (chan, 1);
-
- while (size) {
- unsigned nr = size / 4;
-
- if (AVAIL_RING(chan) < 32)
- FIRE_RING(chan);
-
- nr = MIN2(nr, AVAIL_RING(chan) - 18);
- nr = MIN2(nr, 1792);
- if (nr < (size / 4))
- nr &= ~0x3f;
- assert(!(size & 3));
-
- BEGIN_RING(chan, eng2d, NV50_2D_DST_ADDRESS_HIGH, 2);
- OUT_RELOCh(chan, p->bo, offset, NOUVEAU_BO_VRAM | NOUVEAU_BO_WR);
- OUT_RELOCl(chan, p->bo, offset, NOUVEAU_BO_VRAM | NOUVEAU_BO_WR);
- BEGIN_RING(chan, eng2d, NV50_2D_SIFC_BITMAP_ENABLE, 2);
- OUT_RING (chan, 0);
- OUT_RING (chan, NV50_2D_SIFC_FORMAT_R8_UNORM);
- BEGIN_RING(chan, eng2d, NV50_2D_SIFC_WIDTH, 10);
- OUT_RING (chan, nr * 4);
- OUT_RING (chan, 1);
- OUT_RING (chan, 0);
- OUT_RING (chan, 1);
- OUT_RING (chan, 0);
- OUT_RING (chan, 1);
- OUT_RING (chan, 0);
- OUT_RING (chan, 0);
- OUT_RING (chan, 0);
- OUT_RING (chan, 0);
-
- BEGIN_RING_NI(chan, eng2d, NV50_2D_SIFC_DATA, nr);
- OUT_RINGp (chan, data, nr);
-
- data += nr;
- offset += nr * 4;
- size -= nr * 4;
- }
+ prog->translated = nv50_program_translate(prog);
+ if (!prog->translated)
+ return FALSE;
- BEGIN_RING(chan, tesla, NV50TCL_CODE_CB_FLUSH, 1);
- OUT_RING (chan, 0);
-}
+ if (prog->type == PIPE_SHADER_FRAGMENT) heap = nv50->screen->fp_code_heap;
+ else
+ if (prog->type == PIPE_SHADER_GEOMETRY) heap = nv50->screen->gp_code_heap;
+ else
+ heap = nv50->screen->vp_code_heap;
-static void
-nv50_vp_update_stateobj(struct nv50_context *nv50, struct nv50_program *p)
-{
- struct nouveau_grobj *tesla = nv50->screen->tesla;
- struct nouveau_stateobj *so = so_new(5, 7, 2);
-
- nv50_program_validate_code(nv50, p);
-
- so_method(so, tesla, NV50TCL_VP_ADDRESS_HIGH, 2);
- so_reloc (so, p->bo, 0, NOUVEAU_BO_VRAM | NOUVEAU_BO_RD |
- NOUVEAU_BO_HIGH, 0, 0);
- so_reloc (so, p->bo, 0, NOUVEAU_BO_VRAM | NOUVEAU_BO_RD |
- NOUVEAU_BO_LOW, 0, 0);
- so_method(so, tesla, NV50TCL_VP_ATTR_EN_0, 2);
- so_data (so, p->vp.attrs[0]);
- so_data (so, p->vp.attrs[1]);
- so_method(so, tesla, NV50TCL_VP_REG_ALLOC_RESULT, 1);
- so_data (so, p->max_out);
- so_method(so, tesla, NV50TCL_VP_REG_ALLOC_TEMP, 1);
- so_data (so, p->max_gpr);
- so_method(so, tesla, NV50TCL_VP_START_ID, 1);
- so_data (so, p->code_start);
-
- so_ref(so, &p->so);
- so_ref(NULL, &so);
-}
+ size = align(prog->code_size, 0x100);
-static void
-nv50_fp_update_stateobj(struct nv50_context *nv50, struct nv50_program *p)
-{
- struct nouveau_grobj *tesla = nv50->screen->tesla;
- struct nouveau_stateobj *so = so_new(6, 7, 2);
-
- nv50_program_validate_code(nv50, p);
-
- so_method(so, tesla, NV50TCL_FP_ADDRESS_HIGH, 2);
- so_reloc (so, p->bo, 0, NOUVEAU_BO_VRAM | NOUVEAU_BO_RD |
- NOUVEAU_BO_HIGH, 0, 0);
- so_reloc (so, p->bo, 0, NOUVEAU_BO_VRAM | NOUVEAU_BO_RD |
- NOUVEAU_BO_LOW, 0, 0);
- so_method(so, tesla, NV50TCL_FP_REG_ALLOC_TEMP, 1);
- so_data (so, p->max_gpr);
- so_method(so, tesla, NV50TCL_FP_RESULT_COUNT, 1);
- so_data (so, p->max_out);
- so_method(so, tesla, NV50TCL_FP_CONTROL, 1);
- so_data (so, p->fp.flags[0]);
- so_method(so, tesla, NV50TCL_FP_CTRL_UNK196C, 1);
- so_data (so, p->fp.flags[1]);
- so_method(so, tesla, NV50TCL_FP_START_ID, 1);
- so_data (so, p->code_start);
-
- so_ref(so, &p->so);
- so_ref(NULL, &so);
-}
+ ret = nouveau_resource_alloc(heap, size, prog, &prog->res);
+ if (ret) {
+ NOUVEAU_ERR("out of code space for shader type %i\n", prog->type);
+ return FALSE;
+ }
+ prog->code_base = prog->res->start;
-static void
-nv50_gp_update_stateobj(struct nv50_context *nv50, struct nv50_program *p)
-{
- struct nouveau_grobj *tesla = nv50->screen->tesla;
- struct nouveau_stateobj *so = so_new(6, 7, 2);
-
- nv50_program_validate_code(nv50, p);
-
- so_method(so, tesla, NV50TCL_GP_ADDRESS_HIGH, 2);
- so_reloc (so, p->bo, 0, NOUVEAU_BO_VRAM | NOUVEAU_BO_RD |
- NOUVEAU_BO_HIGH, 0, 0);
- so_reloc (so, p->bo, 0, NOUVEAU_BO_VRAM | NOUVEAU_BO_RD |
- NOUVEAU_BO_LOW, 0, 0);
- so_method(so, tesla, NV50TCL_GP_REG_ALLOC_TEMP, 1);
- so_data (so, p->max_gpr);
- so_method(so, tesla, NV50TCL_GP_REG_ALLOC_RESULT, 1);
- so_data (so, p->max_out);
- so_method(so, tesla, NV50TCL_GP_OUTPUT_PRIMITIVE_TYPE, 1);
- so_data (so, p->gp.prim_type);
- so_method(so, tesla, NV50TCL_GP_VERTEX_OUTPUT_COUNT, 1);
- so_data (so, p->gp.vert_count);
- so_method(so, tesla, NV50TCL_GP_START_ID, 1);
- so_data (so, p->code_start);
-
- so_ref(so, &p->so);
- so_ref(NULL, &so);
-}
+ nv50_relocate_program(prog, prog->code_base, 0);
-static boolean
-nv50_program_validate(struct nv50_program *p)
-{
- p->translated = nv50_program_tx(p);
- assert(p->translated);
- return p->translated;
-}
+ nv50_sifc_linear_u8(&nv50->base, nv50->screen->code,
+ (prog->type << NV50_CODE_BO_SIZE_LOG2) + prog->code_base,
+ NOUVEAU_BO_VRAM, prog->code_size, prog->code);
-static INLINE void
-nv50_program_validate_common(struct nv50_context *nv50, struct nv50_program *p)
-{
- nv50_program_validate_code(nv50, p);
+ BEGIN_RING(nv50->screen->base.channel, RING_3D(CODE_CB_FLUSH), 1);
+ OUT_RING (nv50->screen->base.channel, 0);
- if (p->uses_lmem)
- nv50->req_lmem |= 1 << p->type;
- else
- nv50->req_lmem &= ~(1 << p->type);
+ return TRUE;
}
-struct nouveau_stateobj *
+void
nv50_vertprog_validate(struct nv50_context *nv50)
{
- struct nv50_program *p = nv50->vertprog;
- struct nouveau_stateobj *so = NULL;
-
- if (!p->translated) {
- if (nv50_program_validate(p))
- nv50_vp_update_stateobj(nv50, p);
- else
- return NULL;
- }
-
- if (nv50->dirty & NV50_NEW_VERTPROG_CB)
- nv50_program_validate_data(nv50, p);
-
- if (!(nv50->dirty & NV50_NEW_VERTPROG))
- return NULL;
-
- nv50_program_validate_common(nv50, p);
+ struct nouveau_channel *chan = nv50->screen->base.channel;
+ struct nv50_program *vp = nv50->vertprog;
- so_ref(p->so, &so);
- return so;
+ if (!nv50_program_validate(nv50, vp))
+ return;
+
+ BEGIN_RING(chan, RING_3D(VP_ATTR_EN(0)), 2);
+ OUT_RING (chan, vp->vp.attrs[0]);
+ OUT_RING (chan, vp->vp.attrs[1]);
+ BEGIN_RING(chan, RING_3D(VP_REG_ALLOC_RESULT), 1);
+ OUT_RING (chan, vp->max_out);
+ BEGIN_RING(chan, RING_3D(VP_REG_ALLOC_TEMP), 1);
+ OUT_RING (chan, vp->max_gpr);
+ BEGIN_RING(chan, RING_3D(VP_START_ID), 1);
+ OUT_RING (chan, vp->code_base);
}
-struct nouveau_stateobj *
+void
nv50_fragprog_validate(struct nv50_context *nv50)
{
- struct nv50_program *p = nv50->fragprog;
- struct nouveau_stateobj *so = NULL;
-
- if (!p->translated) {
- if (nv50_program_validate(p))
- nv50_fp_update_stateobj(nv50, p);
- else
- return NULL;
- }
-
- if (nv50->dirty & NV50_NEW_FRAGPROG_CB)
- nv50_program_validate_data(nv50, p);
-
- if (!(nv50->dirty & NV50_NEW_FRAGPROG))
- return NULL;
-
- nv50_program_validate_common(nv50, p);
+ struct nouveau_channel *chan = nv50->screen->base.channel;
+ struct nv50_program *fp = nv50->fragprog;
- so_ref(p->so, &so);
- return so;
+ if (!nv50_program_validate(nv50, fp))
+ return;
+
+ BEGIN_RING(chan, RING_3D(FP_REG_ALLOC_TEMP), 1);
+ OUT_RING (chan, fp->max_gpr);
+ BEGIN_RING(chan, RING_3D(FP_RESULT_COUNT), 1);
+ OUT_RING (chan, fp->max_out);
+ BEGIN_RING(chan, RING_3D(FP_CONTROL), 1);
+ OUT_RING (chan, fp->fp.flags[0]);
+ BEGIN_RING(chan, RING_3D(FP_CTRL_UNK196C), 1);
+ OUT_RING (chan, fp->fp.flags[1]);
+ BEGIN_RING(chan, RING_3D(FP_START_ID), 1);
+ OUT_RING (chan, fp->code_base);
}
-struct nouveau_stateobj *
-nv50_geomprog_validate(struct nv50_context *nv50)
+void
+nv50_gmtyprog_validate(struct nv50_context *nv50)
{
- struct nv50_program *p = nv50->geomprog;
- struct nouveau_stateobj *so = NULL;
-
- /* GP may be NULL, but VP and FP may not */
- if (!p)
- return NULL; /* GP is deactivated in linkage validation */
-
- if (!p->translated) {
- if (nv50_program_validate(p))
- nv50_gp_update_stateobj(nv50, p);
- else
- return NULL;
- }
-
- if (nv50->dirty & NV50_NEW_GEOMPROG_CB)
- nv50_program_validate_data(nv50, p);
-
- if (!(nv50->dirty & NV50_NEW_GEOMPROG))
- return NULL;
-
- nv50_program_validate_common(nv50, p);
-
- so_ref(p->so, &so);
- return so;
+ struct nouveau_channel *chan = nv50->screen->base.channel;
+ struct nv50_program *gp = nv50->vertprog;
+
+ if (!nv50_program_validate(nv50, gp))
+ return;
+
+ BEGIN_RING(chan, RING_3D(GP_REG_ALLOC_TEMP), 1);
+ OUT_RING (chan, gp->max_gpr);
+ BEGIN_RING(chan, RING_3D(GP_REG_ALLOC_RESULT), 1);
+ OUT_RING (chan, gp->max_out);
+ BEGIN_RING(chan, RING_3D(GP_OUTPUT_PRIMITIVE_TYPE), 1);
+ OUT_RING (chan, gp->gp.prim_type);
+ BEGIN_RING(chan, RING_3D(GP_VERTEX_OUTPUT_COUNT), 1);
+ OUT_RING (chan, gp->gp.vert_count);
+ BEGIN_RING(chan, RING_3D(GP_START_ID), 1);
+ OUT_RING (chan, gp->code_base);
}
-/* XXX: this might not work correctly in all cases yet: we assume that
- * an FP generic input that is not written in the VP is gl_PointCoord.
- */
-static uint32_t
-nv50_pntc_replace(struct nv50_context *nv50, uint32_t pntc[8], unsigned m)
+void
+nv50_sprite_coords_validate(struct nv50_context *nv50)
{
- struct nv50_program *vp = nv50->vertprog;
+ struct nouveau_channel *chan = nv50->screen->base.channel;
+ uint32_t pntc[8], mode;
struct nv50_program *fp = nv50->fragprog;
unsigned i, c;
+ unsigned m = (nv50->state.interpolant_ctrl >> 8) & 0xff;
+
+ if (!nv50->rast->pipe.point_quad_rasterization) {
+ if (nv50->state.point_sprite) {
+ BEGIN_RING(chan, RING_3D(POINT_COORD_REPLACE_MAP(0)), 8);
+ for (i = 0; i < 8; ++i)
+ OUT_RING(chan, 0);
- memset(pntc, 0, 8 * sizeof(uint32_t));
+ nv50->state.point_sprite = FALSE;
+ }
+ return;
+ } else {
+ nv50->state.point_sprite = TRUE;
+ }
- if (nv50->geomprog)
- vp = nv50->geomprog;
+ memset(pntc, 0, sizeof(pntc));
for (i = 0; i < fp->in_nr; i++) {
- unsigned j, n = util_bitcount(fp->in[i].mask);
+ unsigned n = util_bitcount(fp->in[i].mask);
if (fp->in[i].sn != TGSI_SEMANTIC_GENERIC) {
m += n;
continue;
}
-
- for (j = 0; j < vp->out_nr; ++j)
- if (vp->out[j].sn == fp->in[i].sn && vp->out[j].si == fp->in[i].si)
- break;
-
- if (j < vp->out_nr) {
- uint32_t en = nv50->rasterizer->pipe.sprite_coord_enable;
-
- if (!(en & (1 << vp->out[j].si))) {
- m += n;
- continue;
- }
+ if (!(nv50->rast->pipe.sprite_coord_enable & (1 << fp->in[i].si))) {
+ m += n;
+ continue;
}
- /* this is either PointCoord or replaced by sprite coords */
- for (c = 0; c < 4; c++) {
- if (!(fp->in[i].mask & (1 << c)))
- continue;
- pntc[m / 8] |= (c + 1) << ((m % 8) * 4);
- ++m;
+ for (c = 0; c < 4; ++c) {
+ if (fp->in[i].mask & (1 << c)) {
+ pntc[m / 8] |= (c + 1) << ((m % 8) * 4);
+ ++m;
+ }
}
}
- if (nv50->rasterizer->pipe.sprite_coord_mode == PIPE_SPRITE_COORD_LOWER_LEFT)
- return 0;
- return (1 << 4);
+
+ if (nv50->rast->pipe.sprite_coord_mode == PIPE_SPRITE_COORD_LOWER_LEFT)
+ mode = 0x00;
+ else
+ mode = 0x10;
+
+ BEGIN_RING(chan, RING_3D(POINT_SPRITE_CTRL), 1);
+ OUT_RING (chan, mode);
+
+ BEGIN_RING(chan, RING_3D(POINT_COORD_REPLACE_MAP(0)), 8);
+ OUT_RINGp (chan, pntc, 8);
}
static int
-nv50_vec4_map(uint32_t *map32, int mid, uint32_t lin[4],
+nv50_vec4_map(uint8_t *map, int mid, uint32_t lin[4],
struct nv50_varying *in, struct nv50_varying *out)
{
int c;
uint8_t mv = out->mask, mf = in->mask, oid = out->hw;
- uint8_t *map = (uint8_t *)map32;
for (c = 0; c < 4; ++c) {
if (mf & 1) {
@@ -465,140 +309,112 @@ nv50_vec4_map(uint32_t *map32, int mid, uint32_t lin[4],
return mid;
}
-struct nouveau_stateobj *
+void
nv50_fp_linkage_validate(struct nv50_context *nv50)
{
- struct nouveau_grobj *tesla = nv50->screen->tesla;
- struct nv50_program *vp;
+ struct nouveau_channel *chan = nv50->screen->base.channel;
+ struct nv50_program *vp = nv50->gmtyprog ? nv50->gmtyprog : nv50->vertprog;
struct nv50_program *fp = nv50->fragprog;
- struct nouveau_stateobj *so;
struct nv50_varying dummy;
int i, n, c, m;
-
- uint32_t map[16], lin[4], pntc[8];
-
+ uint32_t primid = 0;
+ uint32_t psiz = 0x000;
uint32_t interp = fp->fp.interp;
uint32_t colors = fp->fp.colors;
- uint32_t clip = 0x04;
- uint32_t psiz = 0x000;
- uint32_t primid = 0;
- uint32_t sysval = 0;
+ uint32_t lin[4];
+ uint8_t map[64];
- if (nv50->geomprog) {
- vp = nv50->geomprog;
- memset(map, 0x80, sizeof(map));
- } else {
- vp = nv50->vertprog;
- memset(map, 0x40, sizeof(map));
- }
- memset(lin, 0, sizeof(lin));
+ memset(lin, 0x00, sizeof(lin));
+
+ /* XXX: in buggy-endian mode, is the first element of map (u32)0x000000xx
+ * or is it the first byte ?
+ */
+ memset(map, nv50->gmtyprog ? 0x80 : 0x40, sizeof(map));
- dummy.linear = 0;
dummy.mask = 0xf; /* map all components of HPOS */
+ dummy.linear = 0;
m = nv50_vec4_map(map, 0, lin, &dummy, &vp->out[0]);
- if (vp->vp.clpd < 0x40) {
- for (c = 0; c < vp->vp.clpd_nr; ++c) {
- map[m / 4] |= (vp->vp.clpd + c) << ((m % 4) * 8);
- ++m;
- }
- clip |= vp->vp.clpd_nr << 8;
- }
+ for (c = 0; c < vp->vp.clpd_nr; ++c)
+ map[m++] |= vp->vp.clpd + c;
colors |= m << 8; /* adjust BFC0 id */
- /* if light_twoside is active, it seems FFC0_ID == BFC0_ID is bad */
- if (nv50->rasterizer->pipe.light_twoside) {
+ /* if light_twoside is active, FFC0_ID == BFC0_ID is invalid */
+ if (nv50->rast->pipe.light_twoside) {
for (i = 0; i < 2; ++i)
m = nv50_vec4_map(map, m, lin,
- &fp->in[fp->vp.bfc[i]],
- &vp->out[vp->vp.bfc[i]]);
+ &fp->in[fp->vp.bfc[i]], &vp->out[vp->vp.bfc[i]]);
}
-
colors += m - 4; /* adjust FFC0 id */
- interp |= m << 8; /* set mid where 'normal' FP inputs start */
+ interp |= m << 8; /* set map id where 'normal' FP inputs start */
dummy.mask = 0x0;
- for (i = 0; i < fp->in_nr; i++) {
+ for (i = 0; i < fp->in_nr; ++i) {
for (n = 0; n < vp->out_nr; ++n)
if (vp->out[n].sn == fp->in[i].sn &&
vp->out[n].si == fp->in[i].si)
break;
-
m = nv50_vec4_map(map, m, lin,
&fp->in[i], (n < vp->out_nr) ? &vp->out[n] : &dummy);
- }
+ }
/* PrimitiveID either is replaced by the system value, or
* written by the geometry shader into an output register
*/
if (fp->gp.primid < 0x40) {
- i = (m % 4) * 8;
- map[m / 4] = (map[m / 4] & ~(0xff << i)) | (vp->gp.primid << i);
- primid = m++;
+ primid = m;
+ map[m++] = vp->gp.primid;
}
- if (nv50->rasterizer->pipe.point_size_per_vertex) {
- i = (m % 4) * 8;
- map[m / 4] = (map[m / 4] & ~(0xff << i)) | (vp->vp.psiz << i);
- psiz = (m++ << 4) | 1;
+ if (nv50->rast->pipe.point_size_per_vertex) {
+ psiz = (m << 4) | 1;
+ map[m++] = vp->vp.psiz;
}
- /* now fill the stateobj (at most 28 so_data) */
- so = so_new(10, 54, 0);
-
n = (m + 3) / 4;
assert(m <= 64);
- if (vp->type == PIPE_SHADER_GEOMETRY) {
- so_method(so, tesla, NV50TCL_GP_RESULT_MAP_SIZE, 1);
- so_data (so, m);
- so_method(so, tesla, NV50TCL_GP_RESULT_MAP(0), n);
- so_datap (so, map, n);
+
+ if (unlikely(nv50->gmtyprog)) {
+ BEGIN_RING(chan, RING_3D(GP_RESULT_MAP_SIZE), 1);
+ OUT_RING (chan, m);
+ BEGIN_RING(chan, RING_3D(GP_RESULT_MAP(0)), n);
+ OUT_RINGp (chan, map, n);
} else {
- so_method(so, tesla, NV50TCL_VP_GP_BUILTIN_ATTR_EN, 1);
- so_data (so, vp->vp.attrs[2]);
+ BEGIN_RING(chan, RING_3D(VP_GP_BUILTIN_ATTR_EN), 1);
+ OUT_RING (chan, vp->vp.attrs[2]);
- so_method(so, tesla, NV50TCL_MAP_SEMANTIC_4, 1);
- so_data (so, primid);
+ BEGIN_RING(chan, RING_3D(MAP_SEMANTIC_4), 1);
+ OUT_RING (chan, primid);
- so_method(so, tesla, NV50TCL_VP_RESULT_MAP_SIZE, 1);
- so_data (so, m);
- so_method(so, tesla, NV50TCL_VP_RESULT_MAP(0), n);
- so_datap (so, map, n);
+ BEGIN_RING(chan, RING_3D(VP_RESULT_MAP_SIZE), 1);
+ OUT_RING (chan, m);
+ BEGIN_RING(chan, RING_3D(VP_RESULT_MAP(0)), n);
+ OUT_RINGp (chan, map, n);
}
- so_method(so, tesla, NV50TCL_MAP_SEMANTIC_0, 4);
- so_data (so, colors);
- so_data (so, clip);
- so_data (so, sysval);
- so_data (so, psiz);
-
- so_method(so, tesla, NV50TCL_FP_INTERPOLANT_CTRL, 1);
- so_data (so, interp);
-
- so_method(so, tesla, NV50TCL_NOPERSPECTIVE_BITMAP(0), 4);
- so_datap (so, lin, 4);
+ BEGIN_RING(chan, RING_3D(MAP_SEMANTIC_0), 4);
+ OUT_RING (chan, colors);
+ OUT_RING (chan, (vp->vp.clpd_nr << 8) | 4);
+ OUT_RING (chan, 0);
+ OUT_RING (chan, psiz);
- if (nv50->rasterizer->pipe.point_quad_rasterization) {
- so_method(so, tesla, NV50TCL_POINT_SPRITE_CTRL, 1);
- so_data (so,
- nv50_pntc_replace(nv50, pntc, (interp >> 8) & 0xff));
+ BEGIN_RING(chan, RING_3D(FP_INTERPOLANT_CTRL), 1);
+ OUT_RING (chan, interp);
- so_method(so, tesla, NV50TCL_POINT_COORD_REPLACE_MAP(0), 8);
- so_datap (so, pntc, 8);
- }
+ nv50->state.interpolant_ctrl = interp;
- so_method(so, tesla, NV50TCL_GP_ENABLE, 1);
- so_data (so, (vp->type == PIPE_SHADER_GEOMETRY) ? 1 : 0);
+ BEGIN_RING(chan, RING_3D(NOPERSPECTIVE_BITMAP(0)), 4);
+ OUT_RINGp (chan, lin, 4);
- return so;
+ BEGIN_RING(chan, RING_3D(GP_ENABLE), 1);
+ OUT_RING (chan, nv50->gmtyprog ? 1 : 0);
}
static int
-nv50_vp_gp_mapping(uint32_t *map32, int m,
+nv50_vp_gp_mapping(uint8_t *map, int m,
struct nv50_program *vp, struct nv50_program *gp)
{
- uint8_t *map = (uint8_t *)map32;
int i, j, c;
for (i = 0; i < gp->in_nr; ++i) {
@@ -625,34 +441,29 @@ nv50_vp_gp_mapping(uint32_t *map32, int m,
return m;
}
-struct nouveau_stateobj *
+void
nv50_gp_linkage_validate(struct nv50_context *nv50)
{
- struct nouveau_grobj *tesla = nv50->screen->tesla;
- struct nouveau_stateobj *so;
+ struct nouveau_channel *chan = nv50->screen->base.channel;
struct nv50_program *vp = nv50->vertprog;
- struct nv50_program *gp = nv50->geomprog;
- uint32_t map[16];
+ struct nv50_program *gp = nv50->gmtyprog;
int m = 0;
+ int n;
+ uint8_t map[64];
if (!gp)
- return NULL;
+ return;
memset(map, 0, sizeof(map));
m = nv50_vp_gp_mapping(map, m, vp, gp);
- so = so_new(3, 24 - 3, 0);
-
- so_method(so, tesla, NV50TCL_VP_GP_BUILTIN_ATTR_EN, 1);
- so_data (so, vp->vp.attrs[2] | gp->vp.attrs[2]);
-
- assert(m <= 32);
- so_method(so, tesla, NV50TCL_VP_RESULT_MAP_SIZE, 1);
- so_data (so, m);
+ n = (m + 3) / 4;
- m = (m + 3) / 4;
- so_method(so, tesla, NV50TCL_VP_RESULT_MAP(0), m);
- so_datap (so, map, m);
+ BEGIN_RING(chan, RING_3D(VP_GP_BUILTIN_ATTR_EN), 1);
+ OUT_RING (chan, vp->vp.attrs[2] | gp->vp.attrs[2]);
- return so;
+ BEGIN_RING(chan, RING_3D(VP_RESULT_MAP_SIZE), 1);
+ OUT_RING (chan, m);
+ BEGIN_RING(chan, RING_3D(VP_RESULT_MAP(0)), n);
+ OUT_RINGp (chan, map, n);
}
diff --git a/src/gallium/drivers/nv50/nv50_state.c b/src/gallium/drivers/nv50/nv50_state.c
index f42fa2d4d2b..db257159698 100644
--- a/src/gallium/drivers/nv50/nv50_state.c
+++ b/src/gallium/drivers/nv50/nv50_state.c
@@ -1,5 +1,5 @@
/*
- * Copyright 2008 Ben Skeggs
+ * Copyright 2010 Christoph Bumiller
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@@ -20,871 +20,856 @@
* SOFTWARE.
*/
-#include "pipe/p_state.h"
#include "pipe/p_defines.h"
#include "util/u_inlines.h"
+#include "util/u_transfer.h"
#include "tgsi/tgsi_parse.h"
+#include "nv50_stateobj.h"
#include "nv50_context.h"
-#include "nv50_texture.h"
-#include "nouveau/nouveau_stateobj.h"
+#include "nv50_3d.xml.h"
+#include "nv50_texture.xml.h"
+
+#include "nouveau/nouveau_gldefs.h"
static INLINE uint32_t
nv50_colormask(unsigned mask)
{
- uint32_t cmask = 0;
+ uint32_t ret = 0;
- if (mask & PIPE_MASK_R)
- cmask |= 0x0001;
- if (mask & PIPE_MASK_G)
- cmask |= 0x0010;
- if (mask & PIPE_MASK_B)
- cmask |= 0x0100;
- if (mask & PIPE_MASK_A)
- cmask |= 0x1000;
+ if (mask & PIPE_MASK_R)
+ ret |= 0x0001;
+ if (mask & PIPE_MASK_G)
+ ret |= 0x0010;
+ if (mask & PIPE_MASK_B)
+ ret |= 0x0100;
+ if (mask & PIPE_MASK_A)
+ ret |= 0x1000;
- return cmask;
+ return ret;
}
+#define NV50_BLEND_FACTOR_CASE(a, b) \
+ case PIPE_BLENDFACTOR_##a: return NV50_3D_BLEND_FACTOR_##b
+
static INLINE uint32_t
-nv50_blend_func(unsigned factor)
-{
- switch (factor) {
- case PIPE_BLENDFACTOR_ZERO:
- return NV50TCL_BLEND_FUNC_SRC_RGB_ZERO;
- case PIPE_BLENDFACTOR_ONE:
- return NV50TCL_BLEND_FUNC_SRC_RGB_ONE;
- case PIPE_BLENDFACTOR_SRC_COLOR:
- return NV50TCL_BLEND_FUNC_SRC_RGB_SRC_COLOR;
- case PIPE_BLENDFACTOR_INV_SRC_COLOR:
- return NV50TCL_BLEND_FUNC_SRC_RGB_ONE_MINUS_SRC_COLOR;
- case PIPE_BLENDFACTOR_SRC_ALPHA:
- return NV50TCL_BLEND_FUNC_SRC_RGB_SRC_ALPHA;
- case PIPE_BLENDFACTOR_INV_SRC_ALPHA:
- return NV50TCL_BLEND_FUNC_SRC_RGB_ONE_MINUS_SRC_ALPHA;
- case PIPE_BLENDFACTOR_DST_ALPHA:
- return NV50TCL_BLEND_FUNC_SRC_RGB_DST_ALPHA;
- case PIPE_BLENDFACTOR_INV_DST_ALPHA:
- return NV50TCL_BLEND_FUNC_SRC_RGB_ONE_MINUS_DST_ALPHA;
- case PIPE_BLENDFACTOR_DST_COLOR:
- return NV50TCL_BLEND_FUNC_SRC_RGB_DST_COLOR;
- case PIPE_BLENDFACTOR_INV_DST_COLOR:
- return NV50TCL_BLEND_FUNC_SRC_RGB_ONE_MINUS_DST_COLOR;
- case PIPE_BLENDFACTOR_SRC_ALPHA_SATURATE:
- return NV50TCL_BLEND_FUNC_SRC_RGB_SRC_ALPHA_SATURATE;
- case PIPE_BLENDFACTOR_CONST_COLOR:
- return NV50TCL_BLEND_FUNC_SRC_RGB_CONSTANT_COLOR;
- case PIPE_BLENDFACTOR_INV_CONST_COLOR:
- return NV50TCL_BLEND_FUNC_SRC_RGB_ONE_MINUS_CONSTANT_COLOR;
- case PIPE_BLENDFACTOR_CONST_ALPHA:
- return NV50TCL_BLEND_FUNC_SRC_RGB_CONSTANT_ALPHA;
- case PIPE_BLENDFACTOR_INV_CONST_ALPHA:
- return NV50TCL_BLEND_FUNC_SRC_RGB_ONE_MINUS_CONSTANT_ALPHA;
- case PIPE_BLENDFACTOR_SRC1_COLOR:
- return NV50TCL_BLEND_FUNC_SRC_RGB_SRC1_COLOR;
- case PIPE_BLENDFACTOR_INV_SRC1_COLOR:
- return NV50TCL_BLEND_FUNC_SRC_RGB_ONE_MINUS_SRC1_COLOR;
- case PIPE_BLENDFACTOR_SRC1_ALPHA:
- return NV50TCL_BLEND_FUNC_SRC_RGB_SRC1_ALPHA;
- case PIPE_BLENDFACTOR_INV_SRC1_ALPHA:
- return NV50TCL_BLEND_FUNC_SRC_RGB_ONE_MINUS_SRC1_ALPHA;
- default:
- return NV50TCL_BLEND_FUNC_SRC_RGB_ZERO;
- }
+nv50_blend_fac(unsigned factor)
+{
+ switch (factor) {
+ NV50_BLEND_FACTOR_CASE(ONE, ONE);
+ NV50_BLEND_FACTOR_CASE(SRC_COLOR, SRC_COLOR);
+ NV50_BLEND_FACTOR_CASE(SRC_ALPHA, SRC_ALPHA);
+ NV50_BLEND_FACTOR_CASE(DST_ALPHA, DST_ALPHA);
+ NV50_BLEND_FACTOR_CASE(DST_COLOR, DST_COLOR);
+ NV50_BLEND_FACTOR_CASE(SRC_ALPHA_SATURATE, SRC_ALPHA_SATURATE);
+ NV50_BLEND_FACTOR_CASE(CONST_COLOR, CONSTANT_COLOR);
+ NV50_BLEND_FACTOR_CASE(CONST_ALPHA, CONSTANT_ALPHA);
+ NV50_BLEND_FACTOR_CASE(SRC1_COLOR, SRC1_COLOR);
+ NV50_BLEND_FACTOR_CASE(SRC1_ALPHA, SRC1_ALPHA);
+ NV50_BLEND_FACTOR_CASE(ZERO, ZERO);
+ NV50_BLEND_FACTOR_CASE(INV_SRC_COLOR, ONE_MINUS_SRC_COLOR);
+ NV50_BLEND_FACTOR_CASE(INV_SRC_ALPHA, ONE_MINUS_SRC_ALPHA);
+ NV50_BLEND_FACTOR_CASE(INV_DST_ALPHA, ONE_MINUS_DST_ALPHA);
+ NV50_BLEND_FACTOR_CASE(INV_DST_COLOR, ONE_MINUS_DST_COLOR);
+ NV50_BLEND_FACTOR_CASE(INV_CONST_COLOR, ONE_MINUS_CONSTANT_COLOR);
+ NV50_BLEND_FACTOR_CASE(INV_CONST_ALPHA, ONE_MINUS_CONSTANT_ALPHA);
+ NV50_BLEND_FACTOR_CASE(INV_SRC1_COLOR, ONE_MINUS_SRC1_COLOR);
+ NV50_BLEND_FACTOR_CASE(INV_SRC1_ALPHA, ONE_MINUS_SRC1_ALPHA);
+ default:
+ return NV50_3D_BLEND_FACTOR_ZERO;
+ }
}
static void *
nv50_blend_state_create(struct pipe_context *pipe,
- const struct pipe_blend_state *cso)
-{
- struct nouveau_stateobj *so = so_new(5, 24, 0);
- struct nouveau_grobj *tesla = nv50_context(pipe)->screen->tesla;
- struct nv50_blend_stateobj *bso = CALLOC_STRUCT(nv50_blend_stateobj);
- unsigned i, blend_enabled = 0;
-
- /*XXX ignored:
- * - dither
- */
-
- so_method(so, tesla, NV50TCL_BLEND_ENABLE(0), 8);
- if (cso->independent_blend_enable) {
- for (i = 0; i < 8; ++i) {
- so_data(so, cso->rt[i].blend_enable);
- if (cso->rt[i].blend_enable)
- blend_enabled = 1;
- }
- } else
- if (cso->rt[0].blend_enable) {
- blend_enabled = 1;
- for (i = 0; i < 8; i++)
- so_data(so, 1);
- } else {
- for (i = 0; i < 8; i++)
- so_data(so, 0);
- }
- if (blend_enabled) {
- so_method(so, tesla, NV50TCL_BLEND_EQUATION_RGB, 5);
- so_data (so, nvgl_blend_eqn(cso->rt[0].rgb_func));
- so_data (so, nv50_blend_func(cso->rt[0].rgb_src_factor));
- so_data (so, nv50_blend_func(cso->rt[0].rgb_dst_factor));
- so_data (so, nvgl_blend_eqn(cso->rt[0].alpha_func));
- so_data (so, nv50_blend_func(cso->rt[0].alpha_src_factor));
- so_method(so, tesla, NV50TCL_BLEND_FUNC_DST_ALPHA, 1);
- so_data (so, nv50_blend_func(cso->rt[0].alpha_dst_factor));
- }
-
- if (cso->logicop_enable == 0 ) {
- so_method(so, tesla, NV50TCL_LOGIC_OP_ENABLE, 1);
- so_data (so, 0);
- } else {
- so_method(so, tesla, NV50TCL_LOGIC_OP_ENABLE, 2);
- so_data (so, 1);
- so_data (so, nvgl_logicop_func(cso->logicop_func));
- }
-
- so_method(so, tesla, NV50TCL_COLOR_MASK(0), 8);
- if (cso->independent_blend_enable)
- for (i = 0; i < 8; ++i)
- so_data(so, nv50_colormask(cso->rt[i].colormask));
- else {
- uint32_t cmask = nv50_colormask(cso->rt[0].colormask);
- for (i = 0; i < 8; i++)
- so_data(so, cmask);
- }
-
- bso->pipe = *cso;
- so_ref(so, &bso->so);
- so_ref(NULL, &so);
- return (void *)bso;
+ const struct pipe_blend_state *cso)
+{
+ struct nv50_blend_stateobj *so = CALLOC_STRUCT(nv50_blend_stateobj);
+ int i;
+ boolean emit_common_func = cso->rt[0].blend_enable;
+
+ if (nv50_context(pipe)->screen->tesla->grclass >= NVA3_3D) {
+ SB_BEGIN_3D(so, BLEND_INDEPENDENT, 1);
+ SB_DATA (so, cso->independent_blend_enable);
+ }
+
+ so->pipe = *cso;
+
+ SB_BEGIN_3D(so, BLEND_ENABLE(0), 8);
+ if (cso->independent_blend_enable) {
+ for (i = 0; i < 8; ++i) {
+ SB_DATA(so, cso->rt[i].blend_enable);
+ if (cso->rt[i].blend_enable)
+ emit_common_func = TRUE;
+ }
+
+ if (nv50_context(pipe)->screen->tesla->grclass >= NVA3_3D) {
+ emit_common_func = FALSE;
+
+ for (i = 0; i < 8; ++i) {
+ if (!cso->rt[i].blend_enable)
+ continue;
+ SB_BEGIN_3D_(so, NVA3_3D_IBLEND_EQUATION_RGB(i), 6);
+ SB_DATA (so, nvgl_blend_eqn(cso->rt[i].rgb_func));
+ SB_DATA (so, nv50_blend_fac(cso->rt[i].rgb_src_factor));
+ SB_DATA (so, nv50_blend_fac(cso->rt[i].rgb_dst_factor));
+ SB_DATA (so, nvgl_blend_eqn(cso->rt[i].alpha_func));
+ SB_DATA (so, nv50_blend_fac(cso->rt[i].alpha_src_factor));
+ SB_DATA (so, nv50_blend_fac(cso->rt[i].alpha_dst_factor));
+ }
+ }
+ } else {
+ for (i = 0; i < 8; ++i)
+ SB_DATA(so, cso->rt[0].blend_enable);
+ }
+
+ if (emit_common_func) {
+ SB_BEGIN_3D(so, BLEND_EQUATION_RGB, 5);
+ SB_DATA (so, nvgl_blend_eqn(cso->rt[0].rgb_func));
+ SB_DATA (so, nv50_blend_fac(cso->rt[0].rgb_src_factor));
+ SB_DATA (so, nv50_blend_fac(cso->rt[0].rgb_dst_factor));
+ SB_DATA (so, nvgl_blend_eqn(cso->rt[0].alpha_func));
+ SB_DATA (so, nv50_blend_fac(cso->rt[0].alpha_src_factor));
+ SB_BEGIN_3D(so, BLEND_FUNC_DST_ALPHA, 1);
+ SB_DATA (so, nv50_blend_fac(cso->rt[0].alpha_dst_factor));
+ }
+
+ if (cso->logicop_enable) {
+ SB_BEGIN_3D(so, LOGIC_OP_ENABLE, 2);
+ SB_DATA (so, 1);
+ SB_DATA (so, nvgl_logicop_func(cso->logicop_func));
+ } else {
+ SB_BEGIN_3D(so, LOGIC_OP_ENABLE, 1);
+ SB_DATA (so, 0);
+ }
+
+ SB_BEGIN_3D(so, COLOR_MASK(0), 8);
+ if (cso->independent_blend_enable) {
+ for (i = 0; i < 8; ++i)
+ SB_DATA(so, nv50_colormask(cso->rt[i].colormask));
+ } else {
+ uint32_t cmask = nv50_colormask(cso->rt[0].colormask);
+ for (i = 0; i < 8; ++i)
+ SB_DATA(so, cmask);
+ }
+
+ assert(so->size < (sizeof(so->state) / sizeof(so->state[0])));
+ return so;
}
static void
nv50_blend_state_bind(struct pipe_context *pipe, void *hwcso)
{
- struct nv50_context *nv50 = nv50_context(pipe);
+ struct nv50_context *nv50 = nv50_context(pipe);
- nv50->blend = hwcso;
- nv50->dirty |= NV50_NEW_BLEND;
+ nv50->blend = hwcso;
+ nv50->dirty |= NV50_NEW_BLEND;
}
static void
nv50_blend_state_delete(struct pipe_context *pipe, void *hwcso)
{
- struct nv50_blend_stateobj *bso = hwcso;
-
- so_ref(NULL, &bso->so);
- FREE(bso);
+ FREE(hwcso);
}
-static INLINE unsigned
-wrap_mode(unsigned wrap)
-{
- switch (wrap) {
- case PIPE_TEX_WRAP_REPEAT:
- return NV50TSC_1_0_WRAPS_REPEAT;
- case PIPE_TEX_WRAP_MIRROR_REPEAT:
- return NV50TSC_1_0_WRAPS_MIRROR_REPEAT;
- case PIPE_TEX_WRAP_CLAMP_TO_EDGE:
- return NV50TSC_1_0_WRAPS_CLAMP_TO_EDGE;
- case PIPE_TEX_WRAP_CLAMP_TO_BORDER:
- return NV50TSC_1_0_WRAPS_CLAMP_TO_BORDER;
- case PIPE_TEX_WRAP_CLAMP:
- return NV50TSC_1_0_WRAPS_CLAMP;
- case PIPE_TEX_WRAP_MIRROR_CLAMP_TO_EDGE:
- return NV50TSC_1_0_WRAPS_MIRROR_CLAMP_TO_EDGE;
- case PIPE_TEX_WRAP_MIRROR_CLAMP_TO_BORDER:
- return NV50TSC_1_0_WRAPS_MIRROR_CLAMP_TO_BORDER;
- case PIPE_TEX_WRAP_MIRROR_CLAMP:
- return NV50TSC_1_0_WRAPS_MIRROR_CLAMP;
- default:
- NOUVEAU_ERR("unknown wrap mode: %d\n", wrap);
- return NV50TSC_1_0_WRAPS_REPEAT;
- }
-}
static void *
-nv50_sampler_state_create(struct pipe_context *pipe,
- const struct pipe_sampler_state *cso)
-{
- struct nv50_sampler_stateobj *sso = CALLOC(1, sizeof(*sso));
- unsigned *tsc = sso->tsc;
- float limit;
-
- tsc[0] = (0x00026000 |
- (wrap_mode(cso->wrap_s) << 0) |
- (wrap_mode(cso->wrap_t) << 3) |
- (wrap_mode(cso->wrap_r) << 6));
-
- switch (cso->mag_img_filter) {
- case PIPE_TEX_FILTER_LINEAR:
- tsc[1] |= NV50TSC_1_1_MAGF_LINEAR;
- break;
- case PIPE_TEX_FILTER_NEAREST:
- default:
- tsc[1] |= NV50TSC_1_1_MAGF_NEAREST;
- break;
- }
-
- switch (cso->min_img_filter) {
- case PIPE_TEX_FILTER_LINEAR:
- tsc[1] |= NV50TSC_1_1_MINF_LINEAR;
- break;
- case PIPE_TEX_FILTER_NEAREST:
- default:
- tsc[1] |= NV50TSC_1_1_MINF_NEAREST;
- break;
- }
-
- switch (cso->min_mip_filter) {
- case PIPE_TEX_MIPFILTER_LINEAR:
- tsc[1] |= NV50TSC_1_1_MIPF_LINEAR;
- break;
- case PIPE_TEX_MIPFILTER_NEAREST:
- tsc[1] |= NV50TSC_1_1_MIPF_NEAREST;
- break;
- case PIPE_TEX_MIPFILTER_NONE:
- default:
- tsc[1] |= NV50TSC_1_1_MIPF_NONE;
- break;
- }
-
- if (cso->max_anisotropy >= 16)
- tsc[0] |= (7 << 20);
- else
- if (cso->max_anisotropy >= 12)
- tsc[0] |= (6 << 20);
- else {
- tsc[0] |= (cso->max_anisotropy >> 1) << 20;
-
- if (cso->max_anisotropy >= 4)
- tsc[1] |= NV50TSC_1_1_UNKN_ANISO_35;
- else
- if (cso->max_anisotropy >= 2)
- tsc[1] |= NV50TSC_1_1_UNKN_ANISO_15;
- }
-
- if (cso->compare_mode == PIPE_TEX_COMPARE_R_TO_TEXTURE) {
- /* XXX: must be deactivated for non-shadow textures */
- tsc[0] |= (1 << 9);
- tsc[0] |= (nvgl_comparison_op(cso->compare_func) & 0x7) << 10;
- }
-
- limit = CLAMP(cso->lod_bias, -16.0, 15.0);
- tsc[1] |= ((int)(limit * 256.0) & 0x1fff) << 12;
-
- tsc[2] |= ((int)CLAMP(cso->max_lod, 0.0, 15.0) << 20) |
- ((int)CLAMP(cso->min_lod, 0.0, 15.0) << 8);
-
- tsc[4] = fui(cso->border_color[0]);
- tsc[5] = fui(cso->border_color[1]);
- tsc[6] = fui(cso->border_color[2]);
- tsc[7] = fui(cso->border_color[3]);
-
- sso->normalized = cso->normalized_coords;
- return (void *)sso;
-}
-
-/* type == 0 for VPs, 1 for GPs, 2 for FPs, which is how the
- * relevant tesla methods are indexed (NV50TCL_BIND_TSC etc.)
- */
-static INLINE void
-nv50_sampler_state_bind(struct pipe_context *pipe, unsigned type,
- unsigned nr, void **sampler)
+nv50_rasterizer_state_create(struct pipe_context *pipe,
+ const struct pipe_rasterizer_state *cso)
+{
+ struct nv50_rasterizer_stateobj *so;
+
+ so = CALLOC_STRUCT(nv50_rasterizer_stateobj);
+ if (!so)
+ return NULL;
+ so->pipe = *cso;
+
+#ifndef NV50_SCISSORS_CLIPPING
+ SB_BEGIN_3D(so, SCISSOR_ENABLE(0), 1);
+ SB_DATA (so, cso->scissor);
+#endif
+
+ SB_BEGIN_3D(so, SHADE_MODEL, 1);
+ SB_DATA (so, cso->flatshade ? NV50_3D_SHADE_MODEL_FLAT :
+ NV50_3D_SHADE_MODEL_SMOOTH);
+ SB_BEGIN_3D(so, PROVOKING_VERTEX_LAST, 1);
+ SB_DATA (so, !cso->flatshade_first);
+ SB_BEGIN_3D(so, VERTEX_TWO_SIDE_ENABLE, 1);
+ SB_DATA (so, cso->light_twoside);
+
+ SB_BEGIN_3D(so, LINE_WIDTH, 1);
+ SB_DATA (so, fui(cso->line_width));
+ SB_BEGIN_3D(so, LINE_SMOOTH_ENABLE, 1);
+ SB_DATA (so, cso->line_smooth);
+
+ SB_BEGIN_3D(so, LINE_STIPPLE_ENABLE, 1);
+ if (cso->line_stipple_enable) {
+ SB_DATA (so, 1);
+ SB_BEGIN_3D(so, LINE_STIPPLE, 1);
+ SB_DATA (so, (cso->line_stipple_pattern << 8) |
+ cso->line_stipple_factor);
+ } else {
+ SB_DATA (so, 0);
+ }
+
+ if (!cso->point_size_per_vertex) {
+ SB_BEGIN_3D(so, POINT_SIZE, 1);
+ SB_DATA (so, fui(cso->point_size));
+ }
+ SB_BEGIN_3D(so, POINT_SPRITE_ENABLE, 1);
+ SB_DATA (so, cso->point_quad_rasterization);
+ SB_BEGIN_3D(so, POINT_SMOOTH_ENABLE, 1);
+ SB_DATA (so, cso->point_smooth);
+
+ SB_BEGIN_3D(so, POLYGON_MODE_FRONT, 3);
+ SB_DATA (so, nvgl_polygon_mode(cso->fill_front));
+ SB_DATA (so, nvgl_polygon_mode(cso->fill_back));
+ SB_DATA (so, cso->poly_smooth);
+
+ SB_BEGIN_3D(so, CULL_FACE_ENABLE, 3);
+ SB_DATA (so, cso->cull_face != PIPE_FACE_NONE);
+ SB_DATA (so, cso->front_ccw ? NV50_3D_FRONT_FACE_CCW :
+ NV50_3D_FRONT_FACE_CW);
+ switch (cso->cull_face) {
+ case PIPE_FACE_FRONT_AND_BACK:
+ SB_DATA(so, NV50_3D_CULL_FACE_FRONT_AND_BACK);
+ break;
+ case PIPE_FACE_FRONT:
+ SB_DATA(so, NV50_3D_CULL_FACE_FRONT);
+ break;
+ case PIPE_FACE_BACK:
+ default:
+ SB_DATA(so, NV50_3D_CULL_FACE_BACK);
+ break;
+ }
+
+ SB_BEGIN_3D(so, POLYGON_STIPPLE_ENABLE, 1);
+ SB_DATA (so, cso->poly_stipple_enable);
+ SB_BEGIN_3D(so, POLYGON_OFFSET_POINT_ENABLE, 3);
+ SB_DATA (so, cso->offset_point);
+ SB_DATA (so, cso->offset_line);
+ SB_DATA (so, cso->offset_tri);
+
+ if (cso->offset_point || cso->offset_line || cso->offset_tri) {
+ SB_BEGIN_3D(so, POLYGON_OFFSET_FACTOR, 1);
+ SB_DATA (so, fui(cso->offset_scale));
+ SB_BEGIN_3D(so, POLYGON_OFFSET_UNITS, 1);
+ SB_DATA (so, fui(cso->offset_units * 2.0f));
+ }
+
+ assert(so->size < (sizeof(so->state) / sizeof(so->state[0])));
+ return (void *)so;
+}
+
+static void
+nv50_rasterizer_state_bind(struct pipe_context *pipe, void *hwcso)
{
- struct nv50_context *nv50 = nv50_context(pipe);
+ struct nv50_context *nv50 = nv50_context(pipe);
- memcpy(nv50->sampler[type], sampler, nr * sizeof(void *));
+ nv50->rast = hwcso;
+ nv50->dirty |= NV50_NEW_RASTERIZER;
+}
+
+static void
+nv50_rasterizer_state_delete(struct pipe_context *pipe, void *hwcso)
+{
+ FREE(hwcso);
+}
- nv50->sampler_nr[type] = nr;
- nv50->dirty |= NV50_NEW_SAMPLER;
+static void *
+nv50_zsa_state_create(struct pipe_context *pipe,
+ const struct pipe_depth_stencil_alpha_state *cso)
+{
+ struct nv50_zsa_stateobj *so = CALLOC_STRUCT(nv50_zsa_stateobj);
+
+ so->pipe = *cso;
+
+ SB_BEGIN_3D(so, DEPTH_WRITE_ENABLE, 1);
+ SB_DATA (so, cso->depth.writemask);
+ SB_BEGIN_3D(so, DEPTH_TEST_ENABLE, 1);
+ if (cso->depth.enabled) {
+ SB_DATA (so, 1);
+ SB_BEGIN_3D(so, DEPTH_TEST_FUNC, 1);
+ SB_DATA (so, nvgl_comparison_op(cso->depth.func));
+ } else {
+ SB_DATA (so, 0);
+ }
+
+ if (cso->stencil[0].enabled) {
+ SB_BEGIN_3D(so, STENCIL_ENABLE, 5);
+ SB_DATA (so, 1);
+ SB_DATA (so, nvgl_stencil_op(cso->stencil[0].fail_op));
+ SB_DATA (so, nvgl_stencil_op(cso->stencil[0].zfail_op));
+ SB_DATA (so, nvgl_stencil_op(cso->stencil[0].zpass_op));
+ SB_DATA (so, nvgl_comparison_op(cso->stencil[0].func));
+ SB_BEGIN_3D(so, STENCIL_FRONT_MASK, 2);
+ SB_DATA (so, cso->stencil[0].writemask);
+ SB_DATA (so, cso->stencil[0].valuemask);
+ } else {
+ SB_BEGIN_3D(so, STENCIL_ENABLE, 1);
+ SB_DATA (so, 0);
+ }
+
+ if (cso->stencil[1].enabled) {
+ assert(cso->stencil[0].enabled);
+ SB_BEGIN_3D(so, STENCIL_TWO_SIDE_ENABLE, 5);
+ SB_DATA (so, 1);
+ SB_DATA (so, nvgl_stencil_op(cso->stencil[1].fail_op));
+ SB_DATA (so, nvgl_stencil_op(cso->stencil[1].zfail_op));
+ SB_DATA (so, nvgl_stencil_op(cso->stencil[1].zpass_op));
+ SB_DATA (so, nvgl_comparison_op(cso->stencil[1].func));
+ SB_BEGIN_3D(so, STENCIL_BACK_MASK, 2);
+ SB_DATA (so, cso->stencil[1].writemask);
+ SB_DATA (so, cso->stencil[1].valuemask);
+ } else {
+ SB_BEGIN_3D(so, STENCIL_TWO_SIDE_ENABLE, 1);
+ SB_DATA (so, 0);
+ }
+
+ SB_BEGIN_3D(so, ALPHA_TEST_ENABLE, 1);
+ if (cso->alpha.enabled) {
+ SB_DATA (so, 1);
+ SB_BEGIN_3D(so, ALPHA_TEST_REF, 2);
+ SB_DATA (so, fui(cso->alpha.ref_value));
+ SB_DATA (so, nvgl_comparison_op(cso->alpha.func));
+ } else {
+ SB_DATA (so, 0);
+ }
+
+ assert(so->size < (sizeof(so->state) / sizeof(so->state[0])));
+ return (void *)so;
}
static void
-nv50_vp_sampler_state_bind(struct pipe_context *pipe, unsigned nr, void **s)
+nv50_zsa_state_bind(struct pipe_context *pipe, void *hwcso)
{
- nv50_sampler_state_bind(pipe, 0, nr, s);
+ struct nv50_context *nv50 = nv50_context(pipe);
+
+ nv50->zsa = hwcso;
+ nv50->dirty |= NV50_NEW_ZSA;
}
static void
-nv50_fp_sampler_state_bind(struct pipe_context *pipe, unsigned nr, void **s)
+nv50_zsa_state_delete(struct pipe_context *pipe, void *hwcso)
{
- nv50_sampler_state_bind(pipe, 2, nr, s);
+ FREE(hwcso);
+}
+
+/* ====================== SAMPLERS AND TEXTURES ================================
+ */
+
+#define NV50_TSC_WRAP_CASE(n) \
+ case PIPE_TEX_WRAP_##n: return NV50_TSC_WRAP_##n
+
+static INLINE unsigned
+nv50_tsc_wrap_mode(unsigned wrap)
+{
+ switch (wrap) {
+ NV50_TSC_WRAP_CASE(REPEAT);
+ NV50_TSC_WRAP_CASE(MIRROR_REPEAT);
+ NV50_TSC_WRAP_CASE(CLAMP_TO_EDGE);
+ NV50_TSC_WRAP_CASE(CLAMP_TO_BORDER);
+ NV50_TSC_WRAP_CASE(CLAMP);
+ NV50_TSC_WRAP_CASE(MIRROR_CLAMP_TO_EDGE);
+ NV50_TSC_WRAP_CASE(MIRROR_CLAMP_TO_BORDER);
+ NV50_TSC_WRAP_CASE(MIRROR_CLAMP);
+ default:
+ NOUVEAU_ERR("unknown wrap mode: %d\n", wrap);
+ return NV50_TSC_WRAP_REPEAT;
+ }
+}
+
+void *
+nv50_sampler_state_create(struct pipe_context *pipe,
+ const struct pipe_sampler_state *cso)
+{
+ struct nv50_tsc_entry *so = CALLOC_STRUCT(nv50_tsc_entry);
+ float f[2];
+
+ so->id = -1;
+
+ so->tsc[0] = (0x00026000 |
+ (nv50_tsc_wrap_mode(cso->wrap_s) << 0) |
+ (nv50_tsc_wrap_mode(cso->wrap_t) << 3) |
+ (nv50_tsc_wrap_mode(cso->wrap_r) << 6));
+
+ switch (cso->mag_img_filter) {
+ case PIPE_TEX_FILTER_LINEAR:
+ so->tsc[1] |= NV50_TSC_1_MAGF_LINEAR;
+ break;
+ case PIPE_TEX_FILTER_NEAREST:
+ default:
+ so->tsc[1] |= NV50_TSC_1_MAGF_NEAREST;
+ break;
+ }
+
+ switch (cso->min_img_filter) {
+ case PIPE_TEX_FILTER_LINEAR:
+ so->tsc[1] |= NV50_TSC_1_MINF_LINEAR;
+ break;
+ case PIPE_TEX_FILTER_NEAREST:
+ default:
+ so->tsc[1] |= NV50_TSC_1_MINF_NEAREST;
+ break;
+ }
+
+ switch (cso->min_mip_filter) {
+ case PIPE_TEX_MIPFILTER_LINEAR:
+ so->tsc[1] |= NV50_TSC_1_MIPF_LINEAR;
+ break;
+ case PIPE_TEX_MIPFILTER_NEAREST:
+ so->tsc[1] |= NV50_TSC_1_MIPF_NEAREST;
+ break;
+ case PIPE_TEX_MIPFILTER_NONE:
+ default:
+ so->tsc[1] |= NV50_TSC_1_MIPF_NONE;
+ break;
+ }
+
+ if (cso->max_anisotropy >= 16)
+ so->tsc[0] |= (7 << 20);
+ else
+ if (cso->max_anisotropy >= 12)
+ so->tsc[0] |= (6 << 20);
+ else {
+ so->tsc[0] |= (cso->max_anisotropy >> 1) << 20;
+
+ if (cso->max_anisotropy >= 4)
+ so->tsc[1] |= NV50_TSC_1_UNKN_ANISO_35;
+ else
+ if (cso->max_anisotropy >= 2)
+ so->tsc[1] |= NV50_TSC_1_UNKN_ANISO_15;
+ }
+
+ if (cso->compare_mode == PIPE_TEX_COMPARE_R_TO_TEXTURE) {
+ /* NOTE: must be deactivated for non-shadow textures */
+ so->tsc[0] |= (1 << 9);
+ so->tsc[0] |= (nvgl_comparison_op(cso->compare_func) & 0x7) << 10;
+ }
+
+ f[0] = CLAMP(cso->lod_bias, -16.0f, 15.0f);
+ so->tsc[1] |= ((int)(f[0] * 256.0f) & 0x1fff) << 12;
+
+ f[0] = CLAMP(cso->min_lod, 0.0f, 15.0f);
+ f[1] = CLAMP(cso->max_lod, 0.0f, 15.0f);
+ so->tsc[2] |=
+ (((int)(f[1] * 256.0f) & 0xfff) << 12) | ((int)(f[0] * 256.0f) & 0xfff);
+
+ so->tsc[4] = fui(cso->border_color[0]);
+ so->tsc[5] = fui(cso->border_color[1]);
+ so->tsc[6] = fui(cso->border_color[2]);
+ so->tsc[7] = fui(cso->border_color[3]);
+
+ return (void *)so;
}
static void
nv50_sampler_state_delete(struct pipe_context *pipe, void *hwcso)
{
- FREE(hwcso);
+ unsigned s, i;
+
+ for (s = 0; s < 5; ++s)
+ for (i = 0; i < nv50_context(pipe)->num_samplers[s]; ++i)
+ if (nv50_context(pipe)->samplers[s][i] == hwcso)
+ nv50_context(pipe)->samplers[s][i] = NULL;
+
+ nv50_screen_tsc_free(nv50_context(pipe)->screen, nv50_tsc_entry(hwcso));
+
+ FREE(hwcso);
}
static INLINE void
-nv50_set_sampler_views(struct pipe_context *pipe, unsigned p,
- unsigned nr,
- struct pipe_sampler_view **views)
+nv50_stage_sampler_states_bind(struct nv50_context *nv50, int s,
+ unsigned nr, void **hwcso)
{
- struct nv50_context *nv50 = nv50_context(pipe);
- unsigned i;
+ unsigned i;
- for (i = 0; i < nr; i++)
- pipe_sampler_view_reference(&nv50->sampler_views[p][i],
- views[i]);
+ for (i = 0; i < nr; ++i) {
+ struct nv50_tsc_entry *old = nv50->samplers[s][i];
- for (i = nr; i < nv50->sampler_view_nr[p]; i++)
- pipe_sampler_view_reference(&nv50->sampler_views[p][i], NULL);
+ nv50->samplers[s][i] = nv50_tsc_entry(hwcso[i]);
+ if (old)
+ nv50_screen_tsc_unlock(nv50->screen, old);
+ }
+ for (; i < nv50->num_samplers[s]; ++i)
+ if (nv50->samplers[s][i])
+ nv50_screen_tsc_unlock(nv50->screen, nv50->samplers[s][i]);
- nv50->sampler_view_nr[p] = nr;
- nv50->dirty |= NV50_NEW_TEXTURE;
+ nv50->num_samplers[s] = nr;
+
+ nv50->dirty |= NV50_NEW_SAMPLERS;
}
static void
-nv50_set_vp_sampler_views(struct pipe_context *pipe,
- unsigned nr,
- struct pipe_sampler_view **views)
+nv50_vp_sampler_states_bind(struct pipe_context *pipe, unsigned nr, void **s)
{
- nv50_set_sampler_views(pipe, 0, nr, views);
+ nv50_stage_sampler_states_bind(nv50_context(pipe), 0, nr, s);
}
static void
-nv50_set_fp_sampler_views(struct pipe_context *pipe,
- unsigned nr,
- struct pipe_sampler_view **views)
+nv50_fp_sampler_states_bind(struct pipe_context *pipe, unsigned nr, void **s)
{
- nv50_set_sampler_views(pipe, 2, nr, views);
+ nv50_stage_sampler_states_bind(nv50_context(pipe), 2, nr, s);
}
static void
-nv50_sampler_view_destroy(struct pipe_context *pipe,
- struct pipe_sampler_view *view)
+nv50_gp_sampler_states_bind(struct pipe_context *pipe, unsigned nr, void **s)
{
- pipe_resource_reference(&view->texture, NULL);
- FREE(nv50_sampler_view(view));
+ nv50_stage_sampler_states_bind(nv50_context(pipe), 1, nr, s);
}
-static struct pipe_sampler_view *
-nv50_create_sampler_view(struct pipe_context *pipe,
- struct pipe_resource *texture,
- const struct pipe_sampler_view *templ)
+/* NOTE: only called when not referenced anywhere, won't be bound */
+static void
+nv50_sampler_view_destroy(struct pipe_context *pipe,
+ struct pipe_sampler_view *view)
{
- struct nv50_sampler_view *view = CALLOC_STRUCT(nv50_sampler_view);
+ pipe_resource_reference(&view->texture, NULL);
- view->pipe = *templ;
- view->pipe.reference.count = 1;
- view->pipe.texture = NULL;
- pipe_resource_reference(&view->pipe.texture, texture);
- view->pipe.context = pipe;
+ nv50_screen_tic_free(nv50_context(pipe)->screen, nv50_tic_entry(view));
- if (!nv50_tex_construct(view)) {
- nv50_sampler_view_destroy(pipe, &view->pipe);
- return NULL;
- }
- return &view->pipe;
+ FREE(nv50_tic_entry(view));
}
+static INLINE void
+nv50_stage_set_sampler_views(struct nv50_context *nv50, int s,
+ unsigned nr,
+ struct pipe_sampler_view **views)
+{
+ unsigned i;
+
+ for (i = 0; i < nr; ++i) {
+ struct nv50_tic_entry *old = nv50_tic_entry(nv50->textures[s][i]);
+ if (old)
+ nv50_screen_tic_unlock(nv50->screen, old);
-static void *
-nv50_rasterizer_state_create(struct pipe_context *pipe,
- const struct pipe_rasterizer_state *cso)
-{
- struct nouveau_stateobj *so = so_new(16, 22, 0);
- struct nouveau_grobj *tesla = nv50_context(pipe)->screen->tesla;
- struct nv50_rasterizer_stateobj *rso =
- CALLOC_STRUCT(nv50_rasterizer_stateobj);
-
- /*XXX: ignored
- * - light_twoside
- * - point_smooth
- * - multisample
- * - point_sprite / sprite_coord_mode
- */
-
- so_method(so, tesla, NV50TCL_SCISSOR_ENABLE(0), 1);
- so_data (so, cso->scissor);
-
- so_method(so, tesla, NV50TCL_SHADE_MODEL, 1);
- so_data (so, cso->flatshade ? NV50TCL_SHADE_MODEL_FLAT :
- NV50TCL_SHADE_MODEL_SMOOTH);
- so_method(so, tesla, NV50TCL_PROVOKING_VERTEX_LAST, 1);
- so_data (so, cso->flatshade_first ? 0 : 1);
-
- so_method(so, tesla, NV50TCL_VERTEX_TWO_SIDE_ENABLE, 1);
- so_data (so, cso->light_twoside);
-
- so_method(so, tesla, NV50TCL_LINE_WIDTH, 1);
- so_data (so, fui(cso->line_width));
- so_method(so, tesla, NV50TCL_LINE_SMOOTH_ENABLE, 1);
- so_data (so, cso->line_smooth ? 1 : 0);
- if (cso->line_stipple_enable) {
- so_method(so, tesla, NV50TCL_LINE_STIPPLE_ENABLE, 1);
- so_data (so, 1);
- so_method(so, tesla, NV50TCL_LINE_STIPPLE_PATTERN, 1);
- so_data (so, (cso->line_stipple_pattern << 8) |
- cso->line_stipple_factor);
- } else {
- so_method(so, tesla, NV50TCL_LINE_STIPPLE_ENABLE, 1);
- so_data (so, 0);
- }
-
- so_method(so, tesla, NV50TCL_POINT_SIZE, 1);
- so_data (so, fui(cso->point_size));
-
- so_method(so, tesla, NV50TCL_POINT_SPRITE_ENABLE, 1);
- so_data (so, cso->point_quad_rasterization ? 1 : 0);
-
- so_method(so, tesla, NV50TCL_POLYGON_MODE_FRONT, 3);
- so_data(so, nvgl_polygon_mode(cso->fill_front));
- so_data(so, nvgl_polygon_mode(cso->fill_back));
- so_data(so, cso->poly_smooth ? 1 : 0);
-
- so_method(so, tesla, NV50TCL_CULL_FACE_ENABLE, 3);
- so_data (so, cso->cull_face != PIPE_FACE_NONE);
- if (cso->front_ccw) {
- so_data(so, NV50TCL_FRONT_FACE_CCW);
- }
- else {
- so_data(so, NV50TCL_FRONT_FACE_CW);
- }
- switch (cso->cull_face) {
- case PIPE_FACE_FRONT:
- so_data(so, NV50TCL_CULL_FACE_FRONT);
- break;
- case PIPE_FACE_BACK:
- so_data(so, NV50TCL_CULL_FACE_BACK);
- break;
- case PIPE_FACE_FRONT_AND_BACK:
- so_data(so, NV50TCL_CULL_FACE_FRONT_AND_BACK);
- break;
- default:
- so_data(so, NV50TCL_CULL_FACE_BACK);
- break;
- }
-
- so_method(so, tesla, NV50TCL_POLYGON_STIPPLE_ENABLE, 1);
- so_data (so, cso->poly_stipple_enable ? 1 : 0);
-
- so_method(so, tesla, NV50TCL_POLYGON_OFFSET_POINT_ENABLE, 3);
- so_data(so, cso->offset_point);
- so_data(so, cso->offset_line);
- so_data(so, cso->offset_tri);
-
- if (cso->offset_point ||
- cso->offset_line ||
- cso->offset_tri) {
- so_method(so, tesla, NV50TCL_POLYGON_OFFSET_FACTOR, 1);
- so_data (so, fui(cso->offset_scale));
- so_method(so, tesla, NV50TCL_POLYGON_OFFSET_UNITS, 1);
- so_data (so, fui(cso->offset_units * 2.0f));
- }
-
- rso->pipe = *cso;
- so_ref(so, &rso->so);
- so_ref(NULL, &so);
- return (void *)rso;
+ pipe_sampler_view_reference(&nv50->textures[s][i], views[i]);
+ }
+
+ for (i = nr; i < nv50->num_textures[s]; ++i) {
+ struct nv50_tic_entry *old = nv50_tic_entry(nv50->textures[s][i]);
+ if (!old)
+ continue;
+ nv50_screen_tic_unlock(nv50->screen, old);
+
+ pipe_sampler_view_reference(&nv50->textures[s][i], NULL);
+ }
+
+ nv50->num_textures[s] = nr;
+
+ nv50_bufctx_reset(nv50, NV50_BUFCTX_TEXTURES);
+
+ nv50->dirty |= NV50_NEW_TEXTURES;
}
static void
-nv50_rasterizer_state_bind(struct pipe_context *pipe, void *hwcso)
+nv50_vp_set_sampler_views(struct pipe_context *pipe,
+ unsigned nr,
+ struct pipe_sampler_view **views)
{
- struct nv50_context *nv50 = nv50_context(pipe);
-
- nv50->rasterizer = hwcso;
- nv50->dirty |= NV50_NEW_RASTERIZER;
+ nv50_stage_set_sampler_views(nv50_context(pipe), 0, nr, views);
}
static void
-nv50_rasterizer_state_delete(struct pipe_context *pipe, void *hwcso)
+nv50_fp_set_sampler_views(struct pipe_context *pipe,
+ unsigned nr,
+ struct pipe_sampler_view **views)
{
- struct nv50_rasterizer_stateobj *rso = hwcso;
-
- so_ref(NULL, &rso->so);
- FREE(rso);
+ nv50_stage_set_sampler_views(nv50_context(pipe), 2, nr, views);
}
-static void *
-nv50_depth_stencil_alpha_state_create(struct pipe_context *pipe,
- const struct pipe_depth_stencil_alpha_state *cso)
-{
- struct nouveau_grobj *tesla = nv50_context(pipe)->screen->tesla;
- struct nv50_zsa_stateobj *zsa = CALLOC_STRUCT(nv50_zsa_stateobj);
- struct nouveau_stateobj *so = so_new(9, 21, 0);
-
- so_method(so, tesla, NV50TCL_DEPTH_WRITE_ENABLE, 1);
- so_data (so, cso->depth.writemask ? 1 : 0);
- if (cso->depth.enabled) {
- so_method(so, tesla, NV50TCL_DEPTH_TEST_ENABLE, 1);
- so_data (so, 1);
- so_method(so, tesla, NV50TCL_DEPTH_TEST_FUNC, 1);
- so_data (so, nvgl_comparison_op(cso->depth.func));
- } else {
- so_method(so, tesla, NV50TCL_DEPTH_TEST_ENABLE, 1);
- so_data (so, 0);
- }
-
- if (cso->stencil[0].enabled) {
- so_method(so, tesla, NV50TCL_STENCIL_FRONT_ENABLE, 5);
- so_data (so, 1);
- so_data (so, nvgl_stencil_op(cso->stencil[0].fail_op));
- so_data (so, nvgl_stencil_op(cso->stencil[0].zfail_op));
- so_data (so, nvgl_stencil_op(cso->stencil[0].zpass_op));
- so_data (so, nvgl_comparison_op(cso->stencil[0].func));
- so_method(so, tesla, NV50TCL_STENCIL_FRONT_MASK, 2);
- so_data (so, cso->stencil[0].writemask);
- so_data (so, cso->stencil[0].valuemask);
- } else {
- so_method(so, tesla, NV50TCL_STENCIL_FRONT_ENABLE, 1);
- so_data (so, 0);
- }
-
- if (cso->stencil[1].enabled) {
- so_method(so, tesla, NV50TCL_STENCIL_BACK_ENABLE, 5);
- so_data (so, 1);
- so_data (so, nvgl_stencil_op(cso->stencil[1].fail_op));
- so_data (so, nvgl_stencil_op(cso->stencil[1].zfail_op));
- so_data (so, nvgl_stencil_op(cso->stencil[1].zpass_op));
- so_data (so, nvgl_comparison_op(cso->stencil[1].func));
- so_method(so, tesla, NV50TCL_STENCIL_BACK_MASK, 2);
- so_data (so, cso->stencil[1].writemask);
- so_data (so, cso->stencil[1].valuemask);
- } else {
- so_method(so, tesla, NV50TCL_STENCIL_BACK_ENABLE, 1);
- so_data (so, 0);
- }
-
- if (cso->alpha.enabled) {
- so_method(so, tesla, NV50TCL_ALPHA_TEST_ENABLE, 1);
- so_data (so, 1);
- so_method(so, tesla, NV50TCL_ALPHA_TEST_REF, 2);
- so_data (so, fui(cso->alpha.ref_value));
- so_data (so, nvgl_comparison_op(cso->alpha.func));
- } else {
- so_method(so, tesla, NV50TCL_ALPHA_TEST_ENABLE, 1);
- so_data (so, 0);
- }
-
- zsa->pipe = *cso;
- so_ref(so, &zsa->so);
- so_ref(NULL, &so);
- return (void *)zsa;
+static void
+nv50_gp_set_sampler_views(struct pipe_context *pipe,
+ unsigned nr,
+ struct pipe_sampler_view **views)
+{
+ nv50_stage_set_sampler_views(nv50_context(pipe), 1, nr, views);
}
-static void
-nv50_depth_stencil_alpha_state_bind(struct pipe_context *pipe, void *hwcso)
+/* ============================= SHADERS =======================================
+ */
+
+static void *
+nv50_sp_state_create(struct pipe_context *pipe,
+ const struct pipe_shader_state *cso, unsigned type)
{
- struct nv50_context *nv50 = nv50_context(pipe);
+ struct nv50_program *prog;
- nv50->zsa = hwcso;
- nv50->dirty |= NV50_NEW_ZSA;
+ prog = CALLOC_STRUCT(nv50_program);
+ if (!prog)
+ return NULL;
+
+ prog->type = type;
+ prog->pipe.tokens = tgsi_dup_tokens(cso->tokens);
+
+ return (void *)prog;
}
static void
-nv50_depth_stencil_alpha_state_delete(struct pipe_context *pipe, void *hwcso)
+nv50_sp_state_delete(struct pipe_context *pipe, void *hwcso)
{
- struct nv50_zsa_stateobj *zsa = hwcso;
+ struct nv50_program *prog = (struct nv50_program *)hwcso;
+
+ nv50_program_destroy(nv50_context(pipe), prog);
- so_ref(NULL, &zsa->so);
- FREE(zsa);
+ FREE((void *)prog->pipe.tokens);
+ FREE(prog);
}
static void *
nv50_vp_state_create(struct pipe_context *pipe,
- const struct pipe_shader_state *cso)
+ const struct pipe_shader_state *cso)
{
- struct nv50_program *p = CALLOC_STRUCT(nv50_program);
-
- p->pipe.tokens = tgsi_dup_tokens(cso->tokens);
- p->type = PIPE_SHADER_VERTEX;
- return (void *)p;
+ return nv50_sp_state_create(pipe, cso, PIPE_SHADER_VERTEX);
}
static void
nv50_vp_state_bind(struct pipe_context *pipe, void *hwcso)
{
- struct nv50_context *nv50 = nv50_context(pipe);
+ struct nv50_context *nv50 = nv50_context(pipe);
- nv50->vertprog = hwcso;
- nv50->dirty |= NV50_NEW_VERTPROG;
-}
-
-static void
-nv50_vp_state_delete(struct pipe_context *pipe, void *hwcso)
-{
- struct nv50_context *nv50 = nv50_context(pipe);
- struct nv50_program *p = hwcso;
-
- nv50_program_destroy(nv50, p);
- FREE((void *)p->pipe.tokens);
- FREE(p);
+ nv50->vertprog = hwcso;
+ nv50->dirty |= NV50_NEW_VERTPROG;
}
static void *
nv50_fp_state_create(struct pipe_context *pipe,
- const struct pipe_shader_state *cso)
+ const struct pipe_shader_state *cso)
{
- struct nv50_program *p = CALLOC_STRUCT(nv50_program);
-
- p->pipe.tokens = tgsi_dup_tokens(cso->tokens);
- p->type = PIPE_SHADER_FRAGMENT;
- return (void *)p;
+ return nv50_sp_state_create(pipe, cso, PIPE_SHADER_FRAGMENT);
}
static void
nv50_fp_state_bind(struct pipe_context *pipe, void *hwcso)
{
- struct nv50_context *nv50 = nv50_context(pipe);
-
- nv50->fragprog = hwcso;
- nv50->dirty |= NV50_NEW_FRAGPROG;
-}
-
-static void
-nv50_fp_state_delete(struct pipe_context *pipe, void *hwcso)
-{
- struct nv50_context *nv50 = nv50_context(pipe);
- struct nv50_program *p = hwcso;
+ struct nv50_context *nv50 = nv50_context(pipe);
- nv50_program_destroy(nv50, p);
- FREE((void *)p->pipe.tokens);
- FREE(p);
+ nv50->fragprog = hwcso;
+ nv50->dirty |= NV50_NEW_FRAGPROG;
}
static void *
nv50_gp_state_create(struct pipe_context *pipe,
- const struct pipe_shader_state *cso)
+ const struct pipe_shader_state *cso)
{
- struct nv50_program *p = CALLOC_STRUCT(nv50_program);
-
- p->pipe.tokens = tgsi_dup_tokens(cso->tokens);
- p->type = PIPE_SHADER_GEOMETRY;
- return (void *)p;
+ return nv50_sp_state_create(pipe, cso, PIPE_SHADER_GEOMETRY);
}
static void
nv50_gp_state_bind(struct pipe_context *pipe, void *hwcso)
{
- struct nv50_context *nv50 = nv50_context(pipe);
+ struct nv50_context *nv50 = nv50_context(pipe);
- nv50->geomprog = hwcso;
- nv50->dirty |= NV50_NEW_GEOMPROG;
+ nv50->gmtyprog = hwcso;
+ nv50->dirty |= NV50_NEW_GMTYPROG;
}
static void
-nv50_gp_state_delete(struct pipe_context *pipe, void *hwcso)
+nv50_set_constant_buffer(struct pipe_context *pipe, uint shader, uint index,
+ struct pipe_resource *res)
{
- struct nv50_context *nv50 = nv50_context(pipe);
- struct nv50_program *p = hwcso;
+ struct nv50_context *nv50 = nv50_context(pipe);
+
+ if (nv50->constbuf[shader][index])
+ nv50_bufctx_del_resident(nv50, NV50_BUFCTX_CONSTANT,
+ nv04_resource(nv50->constbuf[shader][index]));
- nv50_program_destroy(nv50, p);
- FREE((void *)p->pipe.tokens);
- FREE(p);
+ pipe_resource_reference(&nv50->constbuf[shader][index], res);
+
+ nv50->constbuf_dirty[shader] |= 1 << index;
+
+ nv50->dirty |= NV50_NEW_CONSTBUF;
}
+/* =============================================================================
+ */
+
static void
nv50_set_blend_color(struct pipe_context *pipe,
- const struct pipe_blend_color *bcol)
+ const struct pipe_blend_color *bcol)
{
- struct nv50_context *nv50 = nv50_context(pipe);
+ struct nv50_context *nv50 = nv50_context(pipe);
- nv50->blend_colour = *bcol;
- nv50->dirty |= NV50_NEW_BLEND_COLOUR;
+ nv50->blend_colour = *bcol;
+ nv50->dirty |= NV50_NEW_BLEND_COLOUR;
}
- static void
+static void
nv50_set_stencil_ref(struct pipe_context *pipe,
- const struct pipe_stencil_ref *sr)
+ const struct pipe_stencil_ref *sr)
{
- struct nv50_context *nv50 = nv50_context(pipe);
+ struct nv50_context *nv50 = nv50_context(pipe);
- nv50->stencil_ref = *sr;
- nv50->dirty |= NV50_NEW_STENCIL_REF;
+ nv50->stencil_ref = *sr;
+ nv50->dirty |= NV50_NEW_STENCIL_REF;
}
static void
nv50_set_clip_state(struct pipe_context *pipe,
- const struct pipe_clip_state *clip)
+ const struct pipe_clip_state *clip)
{
- struct nv50_context *nv50 = nv50_context(pipe);
+ struct nv50_context *nv50 = nv50_context(pipe);
+ const unsigned size = clip->nr * sizeof(clip->ucp[0]);
- nv50->clip.depth_clamp = clip->depth_clamp;
- nv50->dirty |= NV50_NEW_CLIP;
-}
+ memcpy(&nv50->clip.ucp[0][0], &clip->ucp[0][0], size);
+ nv50->clip.nr = clip->nr;
-static void
-nv50_set_sample_mask(struct pipe_context *pipe,
- unsigned sample_mask)
-{
+ nv50->clip.depth_clamp = clip->depth_clamp;
+
+ nv50->dirty |= NV50_NEW_CLIP;
}
static void
-nv50_set_constant_buffer(struct pipe_context *pipe, uint shader, uint index,
- struct pipe_resource *buf )
+nv50_set_sample_mask(struct pipe_context *pipe, unsigned sample_mask)
{
- struct nv50_context *nv50 = nv50_context(pipe);
+ struct nv50_context *nv50 = nv50_context(pipe);
- if (shader == PIPE_SHADER_VERTEX) {
- nv50->constbuf[PIPE_SHADER_VERTEX] = buf;
- nv50->dirty |= NV50_NEW_VERTPROG_CB;
- } else
- if (shader == PIPE_SHADER_FRAGMENT) {
- nv50->constbuf[PIPE_SHADER_FRAGMENT] = buf;
- nv50->dirty |= NV50_NEW_FRAGPROG_CB;
- } else
- if (shader == PIPE_SHADER_GEOMETRY) {
- nv50->constbuf[PIPE_SHADER_GEOMETRY] = buf;
- nv50->dirty |= NV50_NEW_GEOMPROG_CB;
- }
+ nv50->sample_mask = sample_mask;
+ nv50->dirty |= NV50_NEW_SAMPLE_MASK;
}
+
static void
nv50_set_framebuffer_state(struct pipe_context *pipe,
- const struct pipe_framebuffer_state *fb)
+ const struct pipe_framebuffer_state *fb)
{
- struct nv50_context *nv50 = nv50_context(pipe);
+ struct nv50_context *nv50 = nv50_context(pipe);
- nv50->framebuffer = *fb;
- nv50->dirty |= NV50_NEW_FRAMEBUFFER;
+ nv50->framebuffer = *fb;
+ nv50->dirty |= NV50_NEW_FRAMEBUFFER;
}
static void
nv50_set_polygon_stipple(struct pipe_context *pipe,
- const struct pipe_poly_stipple *stipple)
+ const struct pipe_poly_stipple *stipple)
{
- struct nv50_context *nv50 = nv50_context(pipe);
+ struct nv50_context *nv50 = nv50_context(pipe);
- nv50->stipple = *stipple;
- nv50->dirty |= NV50_NEW_STIPPLE;
+ nv50->stipple = *stipple;
+ nv50->dirty |= NV50_NEW_STIPPLE;
}
static void
nv50_set_scissor_state(struct pipe_context *pipe,
- const struct pipe_scissor_state *s)
+ const struct pipe_scissor_state *scissor)
{
- struct nv50_context *nv50 = nv50_context(pipe);
+ struct nv50_context *nv50 = nv50_context(pipe);
- nv50->scissor = *s;
- nv50->dirty |= NV50_NEW_SCISSOR;
+ nv50->scissor = *scissor;
+ nv50->dirty |= NV50_NEW_SCISSOR;
}
static void
nv50_set_viewport_state(struct pipe_context *pipe,
- const struct pipe_viewport_state *vpt)
+ const struct pipe_viewport_state *vpt)
{
- struct nv50_context *nv50 = nv50_context(pipe);
+ struct nv50_context *nv50 = nv50_context(pipe);
- nv50->viewport = *vpt;
- nv50->dirty |= NV50_NEW_VIEWPORT;
+ nv50->viewport = *vpt;
+ nv50->dirty |= NV50_NEW_VIEWPORT;
}
static void
-nv50_set_vertex_buffers(struct pipe_context *pipe, unsigned count,
- const struct pipe_vertex_buffer *vb)
+nv50_set_vertex_buffers(struct pipe_context *pipe,
+ unsigned count,
+ const struct pipe_vertex_buffer *vb)
{
- struct nv50_context *nv50 = nv50_context(pipe);
-
- memcpy(nv50->vtxbuf, vb, sizeof(*vb) * count);
- nv50->vtxbuf_nr = count;
+ struct nv50_context *nv50 = nv50_context(pipe);
+ unsigned i;
- nv50->dirty |= NV50_NEW_ARRAYS;
-}
+ for (i = 0; i < count; ++i)
+ pipe_resource_reference(&nv50->vtxbuf[i].buffer, vb[i].buffer);
+ for (; i < nv50->num_vtxbufs; ++i)
+ pipe_resource_reference(&nv50->vtxbuf[i].buffer, NULL);
-static void
-nv50_set_index_buffer(struct pipe_context *pipe,
- const struct pipe_index_buffer *ib)
-{
- struct nv50_context *nv50 = nv50_context(pipe);
+ memcpy(nv50->vtxbuf, vb, sizeof(*vb) * count);
+ nv50->num_vtxbufs = count;
- if (ib)
- memcpy(&nv50->idxbuf, ib, sizeof(nv50->idxbuf));
- else
- memset(&nv50->idxbuf, 0, sizeof(nv50->idxbuf));
+ nv50_bufctx_reset(nv50, NV50_BUFCTX_VERTEX);
- /* TODO make this more like a state */
+ nv50->dirty |= NV50_NEW_ARRAYS;
}
-static void *
-nv50_vtxelts_state_create(struct pipe_context *pipe,
- unsigned num_elements,
- const struct pipe_vertex_element *elements)
+static void
+nv50_set_index_buffer(struct pipe_context *pipe,
+ const struct pipe_index_buffer *ib)
{
- struct nv50_vtxelt_stateobj *cso = CALLOC_STRUCT(nv50_vtxelt_stateobj);
-
- assert(num_elements < 16); /* not doing fallbacks yet */
- cso->num_elements = num_elements;
- memcpy(cso->pipe, elements, num_elements * sizeof(*elements));
-
- nv50_vtxelt_construct(cso);
+ struct nv50_context *nv50 = nv50_context(pipe);
- return (void *)cso;
-}
+ if (ib) {
+ pipe_resource_reference(&nv50->idxbuf.buffer, ib->buffer);
-static void
-nv50_vtxelts_state_delete(struct pipe_context *pipe, void *hwcso)
-{
- FREE(hwcso);
+ memcpy(&nv50->idxbuf, ib, sizeof(nv50->idxbuf));
+ } else {
+ pipe_resource_reference(&nv50->idxbuf.buffer, NULL);
+ }
}
static void
-nv50_vtxelts_state_bind(struct pipe_context *pipe, void *hwcso)
+nv50_vertex_state_bind(struct pipe_context *pipe, void *hwcso)
{
- struct nv50_context *nv50 = nv50_context(pipe);
+ struct nv50_context *nv50 = nv50_context(pipe);
- nv50->vtxelt = hwcso;
- nv50->dirty |= NV50_NEW_ARRAYS;
+ nv50->vertex = hwcso;
+ nv50->dirty |= NV50_NEW_VERTEX;
}
void
nv50_init_state_functions(struct nv50_context *nv50)
{
- nv50->pipe.create_blend_state = nv50_blend_state_create;
- nv50->pipe.bind_blend_state = nv50_blend_state_bind;
- nv50->pipe.delete_blend_state = nv50_blend_state_delete;
-
- nv50->pipe.create_sampler_state = nv50_sampler_state_create;
- nv50->pipe.delete_sampler_state = nv50_sampler_state_delete;
- nv50->pipe.bind_fragment_sampler_states = nv50_fp_sampler_state_bind;
- nv50->pipe.bind_vertex_sampler_states = nv50_vp_sampler_state_bind;
- nv50->pipe.set_fragment_sampler_views = nv50_set_fp_sampler_views;
- nv50->pipe.set_vertex_sampler_views = nv50_set_vp_sampler_views;
- nv50->pipe.create_sampler_view = nv50_create_sampler_view;
- nv50->pipe.sampler_view_destroy = nv50_sampler_view_destroy;
-
- nv50->pipe.create_rasterizer_state = nv50_rasterizer_state_create;
- nv50->pipe.bind_rasterizer_state = nv50_rasterizer_state_bind;
- nv50->pipe.delete_rasterizer_state = nv50_rasterizer_state_delete;
-
- nv50->pipe.create_depth_stencil_alpha_state =
- nv50_depth_stencil_alpha_state_create;
- nv50->pipe.bind_depth_stencil_alpha_state =
- nv50_depth_stencil_alpha_state_bind;
- nv50->pipe.delete_depth_stencil_alpha_state =
- nv50_depth_stencil_alpha_state_delete;
-
- nv50->pipe.create_vs_state = nv50_vp_state_create;
- nv50->pipe.bind_vs_state = nv50_vp_state_bind;
- nv50->pipe.delete_vs_state = nv50_vp_state_delete;
-
- nv50->pipe.create_fs_state = nv50_fp_state_create;
- nv50->pipe.bind_fs_state = nv50_fp_state_bind;
- nv50->pipe.delete_fs_state = nv50_fp_state_delete;
-
- nv50->pipe.create_gs_state = nv50_gp_state_create;
- nv50->pipe.bind_gs_state = nv50_gp_state_bind;
- nv50->pipe.delete_gs_state = nv50_gp_state_delete;
-
- nv50->pipe.set_blend_color = nv50_set_blend_color;
- nv50->pipe.set_stencil_ref = nv50_set_stencil_ref;
- nv50->pipe.set_clip_state = nv50_set_clip_state;
- nv50->pipe.set_sample_mask = nv50_set_sample_mask;
- nv50->pipe.set_constant_buffer = nv50_set_constant_buffer;
- nv50->pipe.set_framebuffer_state = nv50_set_framebuffer_state;
- nv50->pipe.set_polygon_stipple = nv50_set_polygon_stipple;
- nv50->pipe.set_scissor_state = nv50_set_scissor_state;
- nv50->pipe.set_viewport_state = nv50_set_viewport_state;
-
- nv50->pipe.create_vertex_elements_state = nv50_vtxelts_state_create;
- nv50->pipe.delete_vertex_elements_state = nv50_vtxelts_state_delete;
- nv50->pipe.bind_vertex_elements_state = nv50_vtxelts_state_bind;
-
- nv50->pipe.set_vertex_buffers = nv50_set_vertex_buffers;
- nv50->pipe.set_index_buffer = nv50_set_index_buffer;
+ struct pipe_context *pipe = &nv50->base.pipe;
+
+ pipe->create_blend_state = nv50_blend_state_create;
+ pipe->bind_blend_state = nv50_blend_state_bind;
+ pipe->delete_blend_state = nv50_blend_state_delete;
+
+ pipe->create_rasterizer_state = nv50_rasterizer_state_create;
+ pipe->bind_rasterizer_state = nv50_rasterizer_state_bind;
+ pipe->delete_rasterizer_state = nv50_rasterizer_state_delete;
+
+ pipe->create_depth_stencil_alpha_state = nv50_zsa_state_create;
+ pipe->bind_depth_stencil_alpha_state = nv50_zsa_state_bind;
+ pipe->delete_depth_stencil_alpha_state = nv50_zsa_state_delete;
+
+ pipe->create_sampler_state = nv50_sampler_state_create;
+ pipe->delete_sampler_state = nv50_sampler_state_delete;
+ pipe->bind_vertex_sampler_states = nv50_vp_sampler_states_bind;
+ pipe->bind_fragment_sampler_states = nv50_fp_sampler_states_bind;
+ pipe->bind_geometry_sampler_states = nv50_gp_sampler_states_bind;
+
+ pipe->create_sampler_view = nv50_create_sampler_view;
+ pipe->sampler_view_destroy = nv50_sampler_view_destroy;
+ pipe->set_vertex_sampler_views = nv50_vp_set_sampler_views;
+ pipe->set_fragment_sampler_views = nv50_fp_set_sampler_views;
+ pipe->set_geometry_sampler_views = nv50_gp_set_sampler_views;
+
+ pipe->create_vs_state = nv50_vp_state_create;
+ pipe->create_fs_state = nv50_fp_state_create;
+ pipe->create_gs_state = nv50_gp_state_create;
+ pipe->bind_vs_state = nv50_vp_state_bind;
+ pipe->bind_fs_state = nv50_fp_state_bind;
+ pipe->bind_gs_state = nv50_gp_state_bind;
+ pipe->delete_vs_state = nv50_sp_state_delete;
+ pipe->delete_fs_state = nv50_sp_state_delete;
+ pipe->delete_gs_state = nv50_sp_state_delete;
+
+ pipe->set_blend_color = nv50_set_blend_color;
+ pipe->set_stencil_ref = nv50_set_stencil_ref;
+ pipe->set_clip_state = nv50_set_clip_state;
+ pipe->set_sample_mask = nv50_set_sample_mask;
+ pipe->set_constant_buffer = nv50_set_constant_buffer;
+ pipe->set_framebuffer_state = nv50_set_framebuffer_state;
+ pipe->set_polygon_stipple = nv50_set_polygon_stipple;
+ pipe->set_scissor_state = nv50_set_scissor_state;
+ pipe->set_viewport_state = nv50_set_viewport_state;
+
+ pipe->create_vertex_elements_state = nv50_vertex_state_create;
+ pipe->delete_vertex_elements_state = nv50_vertex_state_delete;
+ pipe->bind_vertex_elements_state = nv50_vertex_state_bind;
+
+ pipe->set_vertex_buffers = nv50_set_vertex_buffers;
+ pipe->set_index_buffer = nv50_set_index_buffer;
+
+ pipe->redefine_user_buffer = u_default_redefine_user_buffer;
}
diff --git a/src/gallium/drivers/nv50/nv50_state_validate.c b/src/gallium/drivers/nv50/nv50_state_validate.c
index ae02143e352..f3d45eb95e0 100644
--- a/src/gallium/drivers/nv50/nv50_state_validate.c
+++ b/src/gallium/drivers/nv50/nv50_state_validate.c
@@ -1,449 +1,342 @@
-/*
- * Copyright 2008 Ben Skeggs
- *
- * 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 "util/u_format.h"
#include "nv50_context.h"
-#include "nv50_resource.h"
-#include "nouveau/nouveau_stateobj.h"
+#include "os/os_time.h"
-static struct nouveau_stateobj *
-validate_fb(struct nv50_context *nv50)
+static void
+nv50_validate_fb(struct nv50_context *nv50)
{
- struct nouveau_grobj *tesla = nv50->screen->tesla;
- struct nouveau_stateobj *so = so_new(32, 79, 18);
- struct pipe_framebuffer_state *fb = &nv50->framebuffer;
- unsigned i, w = 0, h = 0, gw = 0;
-
- /* Set nr of active RTs and select RT for each colour output.
- * FP result 0 always goes to RT[0], bits 4 - 6 are ignored.
- * Ambiguous assignment results in no rendering (no DATA_ERROR).
- */
- so_method(so, tesla, NV50TCL_RT_CONTROL, 1);
- so_data (so, fb->nr_cbufs |
- (0 << 4) | (1 << 7) | (2 << 10) | (3 << 13) |
- (4 << 16) | (5 << 19) | (6 << 22) | (7 << 25));
-
- for (i = 0; i < fb->nr_cbufs; i++) {
- struct pipe_resource *pt = fb->cbufs[i]->texture;
- struct nouveau_bo *bo = nv50_miptree(pt)->base.bo;
-
- if (!gw) {
- w = fb->cbufs[i]->width;
- h = fb->cbufs[i]->height;
- gw = 1;
- } else {
- assert(w == fb->cbufs[i]->width);
- assert(h == fb->cbufs[i]->height);
- }
-
- assert(nv50_format_table[fb->cbufs[i]->format].rt);
-
- so_method(so, tesla, NV50TCL_RT_HORIZ(i), 2);
- so_data (so, fb->cbufs[i]->width);
- so_data (so, fb->cbufs[i]->height);
-
- so_method(so, tesla, NV50TCL_RT_ADDRESS_HIGH(i), 5);
- so_reloc (so, bo, ((struct nv50_surface *)fb->cbufs[i])->offset, NOUVEAU_BO_VRAM |
- NOUVEAU_BO_HIGH | NOUVEAU_BO_RDWR, 0, 0);
- so_reloc (so, bo, ((struct nv50_surface *)fb->cbufs[i])->offset, NOUVEAU_BO_VRAM |
- NOUVEAU_BO_LOW | NOUVEAU_BO_RDWR, 0, 0);
- so_data (so, nv50_format_table[fb->cbufs[i]->format].rt);
- so_data (so, nv50_miptree(pt)->
- level[fb->cbufs[i]->u.tex.level].tile_mode << 4);
- so_data(so, 0x00000000);
-
- so_method(so, tesla, NV50TCL_RT_ARRAY_MODE, 1);
- so_data (so, 1);
- }
-
- if (fb->zsbuf) {
- struct pipe_resource *pt = fb->zsbuf->texture;
- struct nouveau_bo *bo = nv50_miptree(pt)->base.bo;
-
- if (!gw) {
- w = fb->zsbuf->width;
- h = fb->zsbuf->height;
- gw = 1;
- } else {
- assert(w == fb->zsbuf->width);
- assert(h == fb->zsbuf->height);
- }
-
- assert(nv50_format_table[fb->zsbuf->format].rt);
-
- so_method(so, tesla, NV50TCL_ZETA_ADDRESS_HIGH, 5);
- so_reloc (so, bo, ((struct nv50_surface *)(fb->zsbuf))->offset, NOUVEAU_BO_VRAM |
- NOUVEAU_BO_HIGH | NOUVEAU_BO_RDWR, 0, 0);
- so_reloc (so, bo, ((struct nv50_surface *)(fb->zsbuf))->offset, NOUVEAU_BO_VRAM |
- NOUVEAU_BO_LOW | NOUVEAU_BO_RDWR, 0, 0);
- so_data (so, nv50_format_table[fb->zsbuf->format].rt);
- so_data (so, nv50_miptree(pt)->
- level[fb->zsbuf->u.tex.level].tile_mode << 4);
- so_data (so, 0x00000000);
-
- so_method(so, tesla, NV50TCL_ZETA_ENABLE, 1);
- so_data (so, 1);
- so_method(so, tesla, NV50TCL_ZETA_HORIZ, 3);
- so_data (so, fb->zsbuf->width);
- so_data (so, fb->zsbuf->height);
- so_data (so, 0x00010001);
- } else {
- so_method(so, tesla, NV50TCL_ZETA_ENABLE, 1);
- so_data (so, 0);
- }
-
- so_method(so, tesla, NV50TCL_VIEWPORT_HORIZ(0), 2);
- so_data (so, w << 16);
- so_data (so, h << 16);
- /* set window lower left corner */
- so_method(so, tesla, NV50TCL_WINDOW_OFFSET_X, 2);
- so_data (so, 0);
- so_data (so, 0);
- /* set screen scissor rectangle */
- so_method(so, tesla, NV50TCL_SCREEN_SCISSOR_HORIZ, 2);
- so_data (so, w << 16);
- so_data (so, h << 16);
-
- return so;
+ struct nouveau_channel *chan = nv50->screen->base.channel;
+ struct pipe_framebuffer_state *fb = &nv50->framebuffer;
+ unsigned i;
+ boolean serialize = FALSE;
+
+ nv50_bufctx_reset(nv50, NV50_BUFCTX_FRAME);
+
+ BEGIN_RING(chan, RING_3D(RT_CONTROL), 1);
+ OUT_RING (chan, (076543210 << 4) | fb->nr_cbufs);
+ BEGIN_RING(chan, RING_3D(SCREEN_SCISSOR_HORIZ), 2);
+ OUT_RING (chan, fb->width << 16);
+ OUT_RING (chan, fb->height << 16);
+
+ MARK_RING(chan, 9 * fb->nr_cbufs, 2 * fb->nr_cbufs);
+
+ for (i = 0; i < fb->nr_cbufs; ++i) {
+ struct nv50_miptree *mt = nv50_miptree(fb->cbufs[i]->texture);
+ struct nv50_surface *sf = nv50_surface(fb->cbufs[i]);
+ struct nouveau_bo *bo = mt->base.bo;
+ uint32_t offset = sf->offset;
+
+ BEGIN_RING(chan, RING_3D(RT_ADDRESS_HIGH(i)), 5);
+ OUT_RELOCh(chan, bo, offset, NOUVEAU_BO_VRAM | NOUVEAU_BO_RDWR);
+ OUT_RELOCl(chan, bo, offset, NOUVEAU_BO_VRAM | NOUVEAU_BO_RDWR);
+ OUT_RING (chan, nv50_format_table[sf->base.format].rt);
+ OUT_RING (chan, mt->level[sf->base.u.tex.level].tile_mode << 4);
+ OUT_RING (chan, mt->layer_stride >> 2);
+ BEGIN_RING(chan, RING_3D(RT_HORIZ(i)), 2);
+ OUT_RING (chan, sf->width);
+ OUT_RING (chan, sf->height);
+ BEGIN_RING(chan, RING_3D(RT_ARRAY_MODE), 1);
+ OUT_RING (chan, sf->depth);
+
+ if (mt->base.status & NOUVEAU_BUFFER_STATUS_GPU_READING)
+ serialize = TRUE;
+ mt->base.status |= NOUVEAU_BUFFER_STATUS_GPU_WRITING;
+ mt->base.status &= NOUVEAU_BUFFER_STATUS_GPU_READING;
+
+ /* only register for writing, otherwise we'd always serialize here */
+ nv50_bufctx_add_resident(nv50, NV50_BUFCTX_FRAME, &mt->base,
+ NOUVEAU_BO_VRAM | NOUVEAU_BO_WR);
+ }
+
+ if (fb->zsbuf) {
+ struct nv50_miptree *mt = nv50_miptree(fb->zsbuf->texture);
+ struct nv50_surface *sf = nv50_surface(fb->zsbuf);
+ struct nouveau_bo *bo = mt->base.bo;
+ int unk = mt->base.base.target == PIPE_TEXTURE_2D;
+ uint32_t offset = sf->offset;
+
+ MARK_RING (chan, 12, 2);
+ BEGIN_RING(chan, RING_3D(ZETA_ADDRESS_HIGH), 5);
+ OUT_RELOCh(chan, bo, offset, NOUVEAU_BO_VRAM | NOUVEAU_BO_RDWR);
+ OUT_RELOCl(chan, bo, offset, NOUVEAU_BO_VRAM | NOUVEAU_BO_RDWR);
+ OUT_RING (chan, nv50_format_table[fb->zsbuf->format].rt);
+ OUT_RING (chan, mt->level[sf->base.u.tex.level].tile_mode << 4);
+ OUT_RING (chan, mt->layer_stride >> 2);
+ BEGIN_RING(chan, RING_3D(ZETA_ENABLE), 1);
+ OUT_RING (chan, 1);
+ BEGIN_RING(chan, RING_3D(ZETA_HORIZ), 3);
+ OUT_RING (chan, sf->width);
+ OUT_RING (chan, sf->height);
+ OUT_RING (chan, (unk << 16) | sf->depth);
+
+ if (mt->base.status & NOUVEAU_BUFFER_STATUS_GPU_READING)
+ serialize = TRUE;
+ mt->base.status |= NOUVEAU_BUFFER_STATUS_GPU_WRITING;
+ mt->base.status &= NOUVEAU_BUFFER_STATUS_GPU_READING;
+
+ nv50_bufctx_add_resident(nv50, NV50_BUFCTX_FRAME, &mt->base,
+ NOUVEAU_BO_VRAM | NOUVEAU_BO_WR);
+ } else {
+ BEGIN_RING(chan, RING_3D(ZETA_ENABLE), 1);
+ OUT_RING (chan, 0);
+ }
+
+ BEGIN_RING(chan, RING_3D(VIEWPORT_HORIZ(0)), 2);
+ OUT_RING (chan, fb->width << 16);
+ OUT_RING (chan, fb->height << 16);
+
+ if (serialize) {
+ BEGIN_RING(chan, RING_3D(SERIALIZE), 1);
+ OUT_RING (chan, 0);
+ }
}
static void
-nv50_validate_samplers(struct nv50_context *nv50, struct nouveau_stateobj *so,
- unsigned p)
+nv50_validate_blend_colour(struct nv50_context *nv50)
{
- struct nouveau_grobj *eng2d = nv50->screen->eng2d;
- unsigned i, j, dw = nv50->sampler_nr[p] * 8;
-
- if (!dw)
- return;
- nv50_so_init_sifc(nv50, so, nv50->screen->tsc, NOUVEAU_BO_VRAM,
- p * (32 * 8 * 4), dw * 4);
-
- so_method(so, eng2d, NV50_2D_SIFC_DATA | (2 << 29), dw);
-
- for (i = 0; i < nv50->sampler_nr[p]; ++i) {
- if (nv50->sampler[p][i])
- so_datap(so, nv50->sampler[p][i]->tsc, 8);
- else {
- for (j = 0; j < 8; ++j) /* you get punished */
- so_data(so, 0); /* ... for leaving holes */
- }
- }
-}
+ struct nouveau_channel *chan = nv50->screen->base.channel;
-static struct nouveau_stateobj *
-validate_blend(struct nv50_context *nv50)
-{
- struct nouveau_stateobj *so = NULL;
- so_ref(nv50->blend->so, &so);
- return so;
+ BEGIN_RING(chan, RING_3D(BLEND_COLOR(0)), 4);
+ OUT_RINGf (chan, nv50->blend_colour.color[0]);
+ OUT_RINGf (chan, nv50->blend_colour.color[1]);
+ OUT_RINGf (chan, nv50->blend_colour.color[2]);
+ OUT_RINGf (chan, nv50->blend_colour.color[3]);
}
-static struct nouveau_stateobj *
-validate_zsa(struct nv50_context *nv50)
+static void
+nv50_validate_stencil_ref(struct nv50_context *nv50)
{
- struct nouveau_stateobj *so = NULL;
- so_ref(nv50->zsa->so, &so);
- return so;
-}
+ struct nouveau_channel *chan = nv50->screen->base.channel;
-static struct nouveau_stateobj *
-validate_rast(struct nv50_context *nv50)
-{
- struct nouveau_stateobj *so = NULL;
- so_ref(nv50->rasterizer->so, &so);
- return so;
+ BEGIN_RING(chan, RING_3D(STENCIL_FRONT_FUNC_REF), 1);
+ OUT_RING (chan, nv50->stencil_ref.ref_value[0]);
+ BEGIN_RING(chan, RING_3D(STENCIL_BACK_FUNC_REF), 1);
+ OUT_RING (chan, nv50->stencil_ref.ref_value[1]);
}
-static struct nouveau_stateobj *
-validate_blend_colour(struct nv50_context *nv50)
+static void
+nv50_validate_stipple(struct nv50_context *nv50)
{
- struct nouveau_grobj *tesla = nv50->screen->tesla;
- struct nouveau_stateobj *so = so_new(1, 4, 0);
-
- so_method(so, tesla, NV50TCL_BLEND_COLOR(0), 4);
- so_data (so, fui(nv50->blend_colour.color[0]));
- so_data (so, fui(nv50->blend_colour.color[1]));
- so_data (so, fui(nv50->blend_colour.color[2]));
- so_data (so, fui(nv50->blend_colour.color[3]));
- return so;
-}
+ struct nouveau_channel *chan = nv50->screen->base.channel;
+ unsigned i;
-static struct nouveau_stateobj *
-validate_stencil_ref(struct nv50_context *nv50)
-{
- struct nouveau_grobj *tesla = nv50->screen->tesla;
- struct nouveau_stateobj *so = so_new(2, 2, 0);
-
- so_method(so, tesla, NV50TCL_STENCIL_FRONT_FUNC_REF, 1);
- so_data (so, nv50->stencil_ref.ref_value[0]);
- so_method(so, tesla, NV50TCL_STENCIL_BACK_FUNC_REF, 1);
- so_data (so, nv50->stencil_ref.ref_value[1]);
- return so;
+ BEGIN_RING(chan, RING_3D(POLYGON_STIPPLE_PATTERN(0)), 32);
+ for (i = 0; i < 32; ++i)
+ OUT_RING(chan, util_bswap32(nv50->stipple.stipple[i]));
}
-static struct nouveau_stateobj *
-validate_stipple(struct nv50_context *nv50)
+static void
+nv50_validate_scissor(struct nv50_context *nv50)
{
- struct nouveau_grobj *tesla = nv50->screen->tesla;
- struct nouveau_stateobj *so = so_new(1, 32, 0);
- int i;
-
- so_method(so, tesla, NV50TCL_POLYGON_STIPPLE_PATTERN(0), 32);
- for (i = 0; i < 32; i++)
- so_data(so, util_bswap32(nv50->stipple.stipple[i]));
- return so;
+ struct nouveau_channel *chan = nv50->screen->base.channel;
+ struct pipe_scissor_state *s = &nv50->scissor;
+#ifdef NV50_SCISSORS_CLIPPING
+ struct pipe_viewport_state *vp = &nv50->viewport;
+ int minx, maxx, miny, maxy;
+
+ if (!(nv50->dirty &
+ (NV50_NEW_SCISSOR | NV50_NEW_VIEWPORT | NV50_NEW_FRAMEBUFFER)) &&
+ nv50->state.scissor == nv50->rast->pipe.scissor)
+ return;
+ nv50->state.scissor = nv50->rast->pipe.scissor;
+
+ if (nv50->state.scissor) {
+ minx = s->minx;
+ maxx = s->maxx;
+ miny = s->miny;
+ maxy = s->maxy;
+ } else {
+ minx = 0;
+ maxx = nv50->framebuffer.width;
+ miny = 0;
+ maxy = nv50->framebuffer.height;
+ }
+
+ minx = MAX2(minx, (int)(vp->translate[0] - fabsf(vp->scale[0])));
+ maxx = MIN2(maxx, (int)(vp->translate[0] + fabsf(vp->scale[0])));
+ miny = MAX2(miny, (int)(vp->translate[1] - fabsf(vp->scale[1])));
+ maxy = MIN2(maxy, (int)(vp->translate[1] + fabsf(vp->scale[1])));
+
+ BEGIN_RING(chan, RING_3D(SCISSOR_HORIZ(0)), 2);
+ OUT_RING (chan, (maxx << 16) | minx);
+ OUT_RING (chan, (maxy << 16) | miny);
+#else
+ BEGIN_RING(chan, RING_3D(SCISSOR_HORIZ(0)), 2);
+ OUT_RING (chan, (s->maxx << 16) | s->minx);
+ OUT_RING (chan, (s->maxy << 16) | s->miny);
+#endif
}
-static struct nouveau_stateobj *
-validate_scissor(struct nv50_context *nv50)
+static void
+nv50_validate_viewport(struct nv50_context *nv50)
{
- struct nouveau_grobj *tesla = nv50->screen->tesla;
- struct pipe_scissor_state *s = &nv50->scissor;
- struct nouveau_stateobj *so;
-
- so = so_new(1, 2, 0);
- so_method(so, tesla, NV50TCL_SCISSOR_HORIZ(0), 2);
- so_data (so, (s->maxx << 16) | s->minx);
- so_data (so, (s->maxy << 16) | s->miny);
- return so;
+ struct nouveau_channel *chan = nv50->screen->base.channel;
+ float zmin, zmax;
+
+ BEGIN_RING(chan, RING_3D(VIEWPORT_TRANSLATE_X(0)), 3);
+ OUT_RINGf (chan, nv50->viewport.translate[0]);
+ OUT_RINGf (chan, nv50->viewport.translate[1]);
+ OUT_RINGf (chan, nv50->viewport.translate[2]);
+ BEGIN_RING(chan, RING_3D(VIEWPORT_SCALE_X(0)), 3);
+ OUT_RINGf (chan, nv50->viewport.scale[0]);
+ OUT_RINGf (chan, nv50->viewport.scale[1]);
+ OUT_RINGf (chan, nv50->viewport.scale[2]);
+
+ zmin = nv50->viewport.translate[2] - fabsf(nv50->viewport.scale[2]);
+ zmax = nv50->viewport.translate[2] + fabsf(nv50->viewport.scale[2]);
+
+#ifdef NV50_SCISSORS_CLIPPING
+ BEGIN_RING(chan, RING_3D(DEPTH_RANGE_NEAR(0)), 2);
+ OUT_RINGf (chan, zmin);
+ OUT_RINGf (chan, zmax);
+#endif
}
-static struct nouveau_stateobj *
-validate_viewport(struct nv50_context *nv50)
+static void
+nv50_validate_clip(struct nv50_context *nv50)
{
- struct nouveau_grobj *tesla = nv50->screen->tesla;
- struct nouveau_stateobj *so = so_new(3, 7, 0);
-
- so_method(so, tesla, NV50TCL_VIEWPORT_TRANSLATE_X(0), 3);
- so_data (so, fui(nv50->viewport.translate[0]));
- so_data (so, fui(nv50->viewport.translate[1]));
- so_data (so, fui(nv50->viewport.translate[2]));
- so_method(so, tesla, NV50TCL_VIEWPORT_SCALE_X(0), 3);
- so_data (so, fui(nv50->viewport.scale[0]));
- so_data (so, fui(nv50->viewport.scale[1]));
- so_data (so, fui(nv50->viewport.scale[2]));
-
- /* no idea what 0f90 does */
- so_method(so, tesla, 0x0f90, 1);
- so_data (so, 0);
-
- return so;
+ struct nouveau_channel *chan = nv50->screen->base.channel;
+ uint32_t clip;
+
+ if (nv50->clip.depth_clamp) {
+ clip =
+ NV50_3D_VIEW_VOLUME_CLIP_CTRL_DEPTH_CLAMP_NEAR |
+ NV50_3D_VIEW_VOLUME_CLIP_CTRL_DEPTH_CLAMP_FAR |
+ NV50_3D_VIEW_VOLUME_CLIP_CTRL_UNK12_UNK1;
+ } else {
+ clip = 0;
+ }
+
+#ifndef NV50_SCISSORS_CLIPPING
+ clip |=
+ NV50_3D_VIEW_VOLUME_CLIP_CTRL_UNK7 |
+ NV50_3D_VIEW_VOLUME_CLIP_CTRL_UNK12_UNK1;
+#endif
+
+ BEGIN_RING(chan, RING_3D(VIEW_VOLUME_CLIP_CTRL), 1);
+ OUT_RING (chan, clip);
+
+ if (nv50->clip.nr) {
+ BEGIN_RING(chan, RING_3D(CB_ADDR), 1);
+ OUT_RING (chan, (0 << 8) | NV50_CB_AUX);
+ BEGIN_RING_NI(chan, RING_3D(CB_DATA(0)), nv50->clip.nr * 4);
+ OUT_RINGp (chan, &nv50->clip.ucp[0][0], nv50->clip.nr * 4);
+ }
+
+ BEGIN_RING(chan, RING_3D(VP_CLIP_DISTANCE_ENABLE), 1);
+ OUT_RING (chan, (1 << nv50->clip.nr) - 1);
}
-static struct nouveau_stateobj *
-validate_sampler(struct nv50_context *nv50)
+static void
+nv50_validate_blend(struct nv50_context *nv50)
{
- struct nouveau_grobj *tesla = nv50->screen->tesla;
- struct nouveau_stateobj *so;
- unsigned nr = 0, i;
-
- for (i = 0; i < 3; ++i)
- nr += nv50->sampler_nr[i];
-
- so = so_new(1 + 5 * 3, 1 + 19 * 3 + nr * 8, 3 * 2);
-
- nv50_validate_samplers(nv50, so, 0); /* VP */
- nv50_validate_samplers(nv50, so, 2); /* FP */
+ struct nouveau_channel *chan = nv50->screen->base.channel;
- so_method(so, tesla, 0x1334, 1); /* flush TSC */
- so_data (so, 0);
-
- return so;
+ WAIT_RING(chan, nv50->blend->size);
+ OUT_RINGp(chan, nv50->blend->state, nv50->blend->size);
}
-static struct nouveau_stateobj *
-validate_vtxbuf(struct nv50_context *nv50)
+static void
+nv50_validate_zsa(struct nv50_context *nv50)
{
- struct nouveau_stateobj *so = NULL;
- so_ref(nv50->state.vtxbuf, &so);
- return so;
+ struct nouveau_channel *chan = nv50->screen->base.channel;
+
+ WAIT_RING(chan, nv50->zsa->size);
+ OUT_RINGp(chan, nv50->zsa->state, nv50->zsa->size);
}
-static struct nouveau_stateobj *
-validate_vtxattr(struct nv50_context *nv50)
+static void
+nv50_validate_rasterizer(struct nv50_context *nv50)
{
- struct nouveau_stateobj *so = NULL;
- so_ref(nv50->state.vtxattr, &so);
- return so;
+ struct nouveau_channel *chan = nv50->screen->base.channel;
+
+ WAIT_RING(chan, nv50->rast->size);
+ OUT_RINGp(chan, nv50->rast->state, nv50->rast->size);
}
-static struct nouveau_stateobj *
-validate_clip(struct nv50_context *nv50)
+static void
+nv50_switch_pipe_context(struct nv50_context *ctx_to)
{
- struct nouveau_grobj *tesla = nv50->screen->tesla;
- struct nouveau_stateobj *so = so_new(1, 1, 0);
- uint32_t vvcc;
+ struct nv50_context *ctx_from = ctx_to->screen->cur_ctx;
+
+ if (ctx_from)
+ ctx_to->state = ctx_from->state;
+
+ ctx_to->dirty = ~0;
- /* 0x0000 = remove whole primitive only (xyz)
- * 0x1018 = remove whole primitive only (xy), clamp z
- * 0x1080 = clip primitive (xyz)
- * 0x1098 = clip primitive (xy), clamp z
- */
- vvcc = nv50->clip.depth_clamp ? 0x1098 : 0x1080;
+ if (!ctx_to->vertex)
+ ctx_to->dirty &= ~(NV50_NEW_VERTEX | NV50_NEW_ARRAYS);
- so_method(so, tesla, NV50TCL_VIEW_VOLUME_CLIP_CTRL, 1);
- so_data (so, vvcc);
+ if (!ctx_to->vertprog)
+ ctx_to->dirty &= ~NV50_NEW_VERTPROG;
+ if (!ctx_to->fragprog)
+ ctx_to->dirty &= ~NV50_NEW_FRAGPROG;
- return so;
+ if (!ctx_to->blend)
+ ctx_to->dirty &= ~NV50_NEW_BLEND;
+ if (!ctx_to->rast)
+ ctx_to->dirty &= ~NV50_NEW_RASTERIZER;
+ if (!ctx_to->zsa)
+ ctx_to->dirty &= ~NV50_NEW_ZSA;
+
+ ctx_to->screen->base.channel->user_private = ctx_to->screen->cur_ctx =
+ ctx_to;
}
-struct state_validate {
- struct nouveau_stateobj *(*func)(struct nv50_context *nv50);
- unsigned states;
+static struct state_validate {
+ void (*func)(struct nv50_context *);
+ uint32_t states;
} validate_list[] = {
- { validate_fb , NV50_NEW_FRAMEBUFFER },
- { validate_blend , NV50_NEW_BLEND },
- { validate_zsa , NV50_NEW_ZSA },
- { nv50_vertprog_validate , NV50_NEW_VERTPROG | NV50_NEW_VERTPROG_CB },
- { nv50_fragprog_validate , NV50_NEW_FRAGPROG | NV50_NEW_FRAGPROG_CB },
- { nv50_geomprog_validate , NV50_NEW_GEOMPROG | NV50_NEW_GEOMPROG_CB },
- { nv50_fp_linkage_validate, NV50_NEW_VERTPROG | NV50_NEW_GEOMPROG |
- NV50_NEW_FRAGPROG | NV50_NEW_RASTERIZER },
- { nv50_gp_linkage_validate, NV50_NEW_VERTPROG | NV50_NEW_GEOMPROG },
- { validate_rast , NV50_NEW_RASTERIZER },
- { validate_blend_colour , NV50_NEW_BLEND_COLOUR },
- { validate_stencil_ref , NV50_NEW_STENCIL_REF },
- { validate_stipple , NV50_NEW_STIPPLE },
- { validate_scissor , NV50_NEW_SCISSOR },
- { validate_viewport , NV50_NEW_VIEWPORT },
- { validate_sampler , NV50_NEW_SAMPLER },
- { nv50_tex_validate , NV50_NEW_TEXTURE | NV50_NEW_SAMPLER },
- { nv50_vbo_validate , NV50_NEW_ARRAYS },
- { validate_vtxbuf , NV50_NEW_ARRAYS },
- { validate_vtxattr , NV50_NEW_ARRAYS },
- { validate_clip , NV50_NEW_CLIP },
- { NULL , 0 }
+ { nv50_validate_fb, NV50_NEW_FRAMEBUFFER },
+ { nv50_validate_blend, NV50_NEW_BLEND },
+ { nv50_validate_zsa, NV50_NEW_ZSA },
+ { nv50_validate_rasterizer, NV50_NEW_RASTERIZER },
+ { nv50_validate_blend_colour, NV50_NEW_BLEND_COLOUR },
+ { nv50_validate_stencil_ref, NV50_NEW_STENCIL_REF },
+ { nv50_validate_stipple, NV50_NEW_STIPPLE },
+#ifdef NV50_SCISSORS_CLIPPING
+ { nv50_validate_scissor, NV50_NEW_SCISSOR | NV50_NEW_VIEWPORT |
+ NV50_NEW_RASTERIZER |
+ NV50_NEW_FRAMEBUFFER },
+#else
+ { nv50_validate_scissor, NV50_NEW_SCISSOR },
+#endif
+ { nv50_validate_viewport, NV50_NEW_VIEWPORT },
+ { nv50_validate_clip, NV50_NEW_CLIP },
+ { nv50_vertprog_validate, NV50_NEW_VERTPROG },
+ { nv50_gmtyprog_validate, NV50_NEW_GMTYPROG },
+ { nv50_fragprog_validate, NV50_NEW_FRAGPROG },
+ { nv50_fp_linkage_validate, NV50_NEW_FRAGPROG | NV50_NEW_VERTPROG |
+ NV50_NEW_GMTYPROG },
+ { nv50_gp_linkage_validate, NV50_NEW_GMTYPROG | NV50_NEW_VERTPROG },
+ { nv50_sprite_coords_validate, NV50_NEW_FRAGPROG | NV50_NEW_RASTERIZER |
+ NV50_NEW_VERTPROG | NV50_NEW_GMTYPROG },
+ { nv50_constbufs_validate, NV50_NEW_CONSTBUF },
+ { nv50_validate_textures, NV50_NEW_TEXTURES },
+ { nv50_validate_samplers, NV50_NEW_SAMPLERS },
+ { nv50_vertex_arrays_validate, NV50_NEW_VERTEX | NV50_NEW_ARRAYS }
};
#define validate_list_len (sizeof(validate_list) / sizeof(validate_list[0]))
boolean
-nv50_state_validate(struct nv50_context *nv50, unsigned wait_dwords)
+nv50_state_validate(struct nv50_context *nv50)
{
- struct nouveau_channel *chan = nv50->screen->base.channel;
- struct nouveau_grobj *tesla = nv50->screen->tesla;
- unsigned nr_relocs = 128, nr_dwords = wait_dwords + 128 + 4;
- int ret, i;
-
- for (i = 0; i < validate_list_len; i++) {
- struct state_validate *validate = &validate_list[i];
- struct nouveau_stateobj *so;
-
- if (!(nv50->dirty & validate->states))
- continue;
-
- so = validate->func(nv50);
- if (!so)
- continue;
-
- nr_dwords += (so->total + so->cur);
- nr_relocs += so->cur_reloc;
-
- so_ref(so, &nv50->state.hw[i]);
- so_ref(NULL, &so);
- nv50->state.hw_dirty |= (1 << i);
- }
- nv50->dirty = 0;
-
- if (nv50->screen->cur_ctx != nv50) {
- for (i = 0; i < validate_list_len; i++) {
- if (!nv50->state.hw[i] ||
- (nv50->state.hw_dirty & (1 << i)))
- continue;
-
- nr_dwords += (nv50->state.hw[i]->total +
- nv50->state.hw[i]->cur);
- nr_relocs += nv50->state.hw[i]->cur_reloc;
- nv50->state.hw_dirty |= (1 << i);
- }
-
- nv50->screen->cur_ctx = nv50;
- }
-
- ret = MARK_RING(chan, nr_dwords, nr_relocs);
- if (ret) {
- debug_printf("MARK_RING(%d, %d) failed: %d\n",
- nr_dwords, nr_relocs, ret);
- return FALSE;
- }
-
- while (nv50->state.hw_dirty) {
- i = ffs(nv50->state.hw_dirty) - 1;
- nv50->state.hw_dirty &= ~(1 << i);
-
- so_emit(chan, nv50->state.hw[i]);
- }
-
- /* Yes, really, we need to do this. If a buffer that is referenced
- * on the hardware isn't part of changed state above, without doing
- * this the kernel is given no clue that the buffer is being used
- * still. This can cause all sorts of fun issues.
- */
- nv50_tex_relocs(nv50);
- so_emit_reloc_markers(chan, nv50->state.hw[0]); /* fb */
- so_emit_reloc_markers(chan, nv50->state.hw[3]); /* vp */
- so_emit_reloc_markers(chan, nv50->state.hw[4]); /* fp */
- so_emit_reloc_markers(chan, nv50->state.hw[17]); /* vb */
- nv50_screen_relocs(nv50->screen);
-
- /* No idea.. */
- BEGIN_RING(chan, tesla, 0x142c, 1);
- OUT_RING (chan, 0);
- BEGIN_RING(chan, tesla, 0x142c, 1);
- OUT_RING (chan, 0);
- return TRUE;
-}
+ unsigned i;
-void nv50_so_init_sifc(struct nv50_context *nv50,
- struct nouveau_stateobj *so,
- struct nouveau_bo *bo, unsigned reloc,
- unsigned offset, unsigned size)
-{
- struct nouveau_grobj *eng2d = nv50->screen->eng2d;
-
- reloc |= NOUVEAU_BO_WR;
-
- so_method(so, eng2d, NV50_2D_DST_FORMAT, 2);
- so_data (so, NV50_2D_DST_FORMAT_R8_UNORM);
- so_data (so, 1);
- so_method(so, eng2d, NV50_2D_DST_PITCH, 5);
- so_data (so, 262144);
- so_data (so, 65536);
- so_data (so, 1);
- so_reloc (so, bo, offset, reloc | NOUVEAU_BO_HIGH, 0, 0);
- so_reloc (so, bo, offset, reloc | NOUVEAU_BO_LOW, 0, 0);
- so_method(so, eng2d, NV50_2D_SIFC_BITMAP_ENABLE, 2);
- so_data (so, 0);
- so_data (so, NV50_2D_SIFC_FORMAT_R8_UNORM);
- so_method(so, eng2d, NV50_2D_SIFC_WIDTH, 10);
- so_data (so, size);
- so_data (so, 1);
- so_data (so, 0);
- so_data (so, 1);
- so_data (so, 0);
- so_data (so, 1);
- so_data (so, 0);
- so_data (so, 0);
- so_data (so, 0);
- so_data (so, 0);
+ if (nv50->screen->cur_ctx != nv50)
+ nv50_switch_pipe_context(nv50);
+
+ if (nv50->dirty) {
+ for (i = 0; i < validate_list_len; ++i) {
+ struct state_validate *validate = &validate_list[i];
+
+ if (nv50->dirty & validate->states)
+ validate->func(nv50);
+ }
+ nv50->dirty = 0;
+ }
+
+ nv50_bufctx_emit_relocs(nv50);
+
+ return TRUE;
}
diff --git a/src/gallium/drivers/nv50/nv50_stateobj.h b/src/gallium/drivers/nv50/nv50_stateobj.h
new file mode 100644
index 00000000000..515e3e78d42
--- /dev/null
+++ b/src/gallium/drivers/nv50/nv50_stateobj.h
@@ -0,0 +1,55 @@
+
+#ifndef __NV50_STATEOBJ_H__
+#define __NV50_STATEOBJ_H__
+
+#include "pipe/p_state.h"
+
+#define NV50_SCISSORS_CLIPPING
+
+#define SB_BEGIN_3D(so, m, s) \
+ (so)->state[(so)->size++] = \
+ ((s) << 18) | (NV50_SUBCH_3D << 13) | NV50_3D_##m
+
+#define SB_BEGIN_3D_(so, m, s) \
+ (so)->state[(so)->size++] = \
+ ((s) << 18) | (NV50_SUBCH_3D << 13) | m
+
+#define SB_DATA(so, u) (so)->state[(so)->size++] = (u)
+
+#include "nv50_stateobj_tex.h"
+
+struct nv50_blend_stateobj {
+ struct pipe_blend_state pipe;
+ int size;
+ uint32_t state[78];
+};
+
+struct nv50_rasterizer_stateobj {
+ struct pipe_rasterizer_state pipe;
+ int size;
+ uint32_t state[40];
+};
+
+struct nv50_zsa_stateobj {
+ struct pipe_depth_stencil_alpha_state pipe;
+ int size;
+ uint32_t state[29];
+};
+
+struct nv50_vertex_element {
+ struct pipe_vertex_element pipe;
+ uint32_t state;
+};
+
+struct nv50_vertex_stateobj {
+ struct translate *translate;
+ unsigned num_elements;
+ uint32_t instance_elts;
+ uint32_t instance_bufs;
+ boolean need_conversion;
+ unsigned vertex_size;
+ unsigned packet_vertex_limit;
+ struct nv50_vertex_element element[0];
+};
+
+#endif
diff --git a/src/gallium/drivers/nv50/nv50_stateobj_tex.h b/src/gallium/drivers/nv50/nv50_stateobj_tex.h
new file mode 100644
index 00000000000..99548cbdb42
--- /dev/null
+++ b/src/gallium/drivers/nv50/nv50_stateobj_tex.h
@@ -0,0 +1,34 @@
+
+#ifndef __NV50_STATEOBJ_TEX_H__
+#define __NV50_STATEOBJ_TEX_H__
+
+#include "pipe/p_state.h"
+
+struct nv50_tsc_entry {
+ int id;
+ uint32_t tsc[8];
+};
+
+static INLINE struct nv50_tsc_entry *
+nv50_tsc_entry(void *hwcso)
+{
+ return (struct nv50_tsc_entry *)hwcso;
+}
+
+struct nv50_tic_entry {
+ struct pipe_sampler_view pipe;
+ int id;
+ uint32_t tic[8];
+};
+
+static INLINE struct nv50_tic_entry *
+nv50_tic_entry(struct pipe_sampler_view *view)
+{
+ return (struct nv50_tic_entry *)view;
+}
+
+extern void *
+nv50_sampler_state_create(struct pipe_context *,
+ const struct pipe_sampler_state *);
+
+#endif /* __NV50_STATEOBJ_TEX_H__ */
diff --git a/src/gallium/drivers/nv50/nv50_surface.c b/src/gallium/drivers/nv50/nv50_surface.c
index ce48022db4e..dc9e2880f0f 100644
--- a/src/gallium/drivers/nv50/nv50_surface.c
+++ b/src/gallium/drivers/nv50/nv50_surface.c
@@ -20,306 +20,362 @@
* SOFTWARE.
*/
-#define __NOUVEAU_PUSH_H__
#include <stdint.h>
-#include "nouveau/nouveau_pushbuf.h"
-#include "nv50_context.h"
-#include "nv50_resource.h"
+
#include "pipe/p_defines.h"
+
#include "util/u_inlines.h"
#include "util/u_pack_color.h"
-
#include "util/u_format.h"
+#include "nv50_context.h"
+#include "nv50_resource.h"
+
+#include "nv50_defs.xml.h"
+
/* return TRUE for formats that can be converted among each other by NV50_2D */
static INLINE boolean
nv50_2d_format_faithful(enum pipe_format format)
{
- switch (format) {
- case PIPE_FORMAT_B8G8R8A8_UNORM:
- case PIPE_FORMAT_B8G8R8X8_UNORM:
- case PIPE_FORMAT_B8G8R8A8_SRGB:
- case PIPE_FORMAT_B8G8R8X8_SRGB:
- case PIPE_FORMAT_B5G6R5_UNORM:
- case PIPE_FORMAT_B5G5R5A1_UNORM:
- case PIPE_FORMAT_B10G10R10A2_UNORM:
- case PIPE_FORMAT_R8_UNORM:
- case PIPE_FORMAT_R32G32B32A32_FLOAT:
- case PIPE_FORMAT_R32G32B32_FLOAT:
- return TRUE;
- default:
- return FALSE;
- }
+ switch (format) {
+ case PIPE_FORMAT_B8G8R8A8_UNORM:
+ case PIPE_FORMAT_B8G8R8X8_UNORM:
+ case PIPE_FORMAT_B8G8R8A8_SRGB:
+ case PIPE_FORMAT_B8G8R8X8_SRGB:
+ case PIPE_FORMAT_B5G6R5_UNORM:
+ case PIPE_FORMAT_B5G5R5A1_UNORM:
+ case PIPE_FORMAT_B10G10R10A2_UNORM:
+ case PIPE_FORMAT_R8_UNORM:
+ case PIPE_FORMAT_R32G32B32A32_FLOAT:
+ case PIPE_FORMAT_R32G32B32_FLOAT:
+ return TRUE;
+ default:
+ return FALSE;
+ }
}
static INLINE uint8_t
nv50_2d_format(enum pipe_format format)
{
- uint8_t id = nv50_format_table[format].rt;
-
- /* Hardware values for color formats range from 0xc0 to 0xff,
- * but the 2D engine doesn't support all of them.
- */
- if ((id >= 0xc0) && (0xff0843e080608409ULL & (1ULL << (id - 0xc0))))
- return id;
-
- switch (util_format_get_blocksize(format)) {
- case 1:
- return NV50_2D_DST_FORMAT_R8_UNORM;
- case 2:
- return NV50_2D_DST_FORMAT_R16_UNORM;
- case 4:
- return NV50_2D_DST_FORMAT_A8R8G8B8_UNORM;
- default:
- return 0;
- }
+ uint8_t id = nv50_format_table[format].rt;
+
+ /* Hardware values for color formats range from 0xc0 to 0xff,
+ * but the 2D engine doesn't support all of them.
+ */
+ if ((id >= 0xc0) && (0xff0843e080608409ULL & (1ULL << (id - 0xc0))))
+ return id;
+
+ switch (util_format_get_blocksize(format)) {
+ case 1:
+ return NV50_SURFACE_FORMAT_R8_UNORM;
+ case 2:
+ return NV50_SURFACE_FORMAT_R16_UNORM;
+ case 4:
+ return NV50_SURFACE_FORMAT_A8R8G8B8_UNORM;
+ default:
+ return 0;
+ }
}
static int
-nv50_surface_set(struct nv50_screen *screen, struct pipe_surface *ps, int dst)
+nv50_2d_texture_set(struct nouveau_channel *chan, int dst,
+ struct nv50_miptree *mt, unsigned level, unsigned layer)
{
- struct nv50_miptree *mt = nv50_miptree(ps->texture);
- struct nouveau_channel *chan = screen->eng2d->channel;
- struct nouveau_grobj *eng2d = screen->eng2d;
- struct nouveau_bo *bo = nv50_miptree(ps->texture)->base.bo;
- int format, mthd = dst ? NV50_2D_DST_FORMAT : NV50_2D_SRC_FORMAT;
- int flags = NOUVEAU_BO_VRAM | (dst ? NOUVEAU_BO_WR : NOUVEAU_BO_RD);
-
- format = nv50_2d_format(ps->format);
- if (!format) {
- NOUVEAU_ERR("invalid/unsupported surface format: %s\n",
- util_format_name(ps->format));
- return 1;
- }
-
- if (!nouveau_bo_tile_layout(bo)) {
- BEGIN_RING(chan, eng2d, mthd, 2);
- OUT_RING (chan, format);
- OUT_RING (chan, 1);
- BEGIN_RING(chan, eng2d, mthd + 0x14, 5);
- OUT_RING (chan, mt->level[ps->u.tex.level].pitch);
- OUT_RING (chan, ps->width);
- OUT_RING (chan, ps->height);
- OUT_RELOCh(chan, bo, ((struct nv50_surface *)ps)->offset, flags);
- OUT_RELOCl(chan, bo, ((struct nv50_surface *)ps)->offset, flags);
- } else {
- BEGIN_RING(chan, eng2d, mthd, 5);
- OUT_RING (chan, format);
- OUT_RING (chan, 0);
- OUT_RING (chan, mt->level[ps->u.tex.level].tile_mode << 4);
- OUT_RING (chan, 1);
- OUT_RING (chan, 0);
- BEGIN_RING(chan, eng2d, mthd + 0x18, 4);
- OUT_RING (chan, ps->width);
- OUT_RING (chan, ps->height);
- OUT_RELOCh(chan, bo, ((struct nv50_surface *)ps)->offset, flags);
- OUT_RELOCl(chan, bo, ((struct nv50_surface *)ps)->offset, flags);
- }
-
+ struct nouveau_bo *bo = mt->base.bo;
+ uint32_t width, height, depth;
+ uint32_t format;
+ uint32_t mthd = dst ? NV50_2D_DST_FORMAT : NV50_2D_SRC_FORMAT;
+ uint32_t flags = mt->base.domain | (dst ? NOUVEAU_BO_WR : NOUVEAU_BO_RD);
+ uint32_t offset = mt->level[level].offset;
+
+ format = nv50_2d_format(mt->base.base.format);
+ if (!format) {
+ NOUVEAU_ERR("invalid/unsupported surface format: %s\n",
+ util_format_name(mt->base.base.format));
+ return 1;
+ }
+
+ width = u_minify(mt->base.base.width0, level);
+ height = u_minify(mt->base.base.height0, level);
+
+ offset = mt->level[level].offset;
+ if (!mt->layout_3d) {
+ offset += mt->layer_stride * layer;
+ depth = 1;
+ layer = 0;
+ } else {
+ depth = u_minify(mt->base.base.depth0, level);
+ }
+
+ if (!(bo->tile_flags & NOUVEAU_BO_TILE_LAYOUT_MASK)) {
+ BEGIN_RING(chan, RING_2D_(mthd), 2);
+ OUT_RING (chan, format);
+ OUT_RING (chan, 1);
+ BEGIN_RING(chan, RING_2D_(mthd + 0x14), 5);
+ OUT_RING (chan, mt->level[level].pitch);
+ OUT_RING (chan, width);
+ OUT_RING (chan, height);
+ OUT_RELOCh(chan, bo, offset, flags);
+ OUT_RELOCl(chan, bo, offset, flags);
+ } else {
+ BEGIN_RING(chan, RING_2D_(mthd), 5);
+ OUT_RING (chan, format);
+ OUT_RING (chan, 0);
+ OUT_RING (chan, mt->level[level].tile_mode << 4);
+ OUT_RING (chan, depth);
+ OUT_RING (chan, layer);
+ BEGIN_RING(chan, RING_2D_(mthd + 0x18), 4);
+ OUT_RING (chan, width);
+ OUT_RING (chan, height);
+ OUT_RELOCh(chan, bo, offset, flags);
+ OUT_RELOCl(chan, bo, offset, flags);
+ }
+
#if 0
- if (dst) {
- BEGIN_RING(chan, eng2d, NV50_2D_CLIP_X, 4);
- OUT_RING (chan, 0);
- OUT_RING (chan, 0);
- OUT_RING (chan, surf->width);
- OUT_RING (chan, surf->height);
- }
+ if (dst) {
+ BEGIN_RING(chan, RING_2D_(NV50_2D_CLIP_X), 4);
+ OUT_RING (chan, 0);
+ OUT_RING (chan, 0);
+ OUT_RING (chan, width);
+ OUT_RING (chan, height);
+ }
#endif
-
- return 0;
+ return 0;
}
-int
-nv50_surface_do_copy(struct nv50_screen *screen, struct pipe_surface *dst,
- int dx, int dy, struct pipe_surface *src, int sx, int sy,
- int w, int h)
+static int
+nv50_2d_texture_do_copy(struct nouveau_channel *chan,
+ struct nv50_miptree *dst, unsigned dst_level,
+ unsigned dx, unsigned dy, unsigned dz,
+ struct nv50_miptree *src, unsigned src_level,
+ unsigned sx, unsigned sy, unsigned sz,
+ unsigned w, unsigned h)
{
- struct nouveau_channel *chan = screen->eng2d->channel;
- struct nouveau_grobj *eng2d = screen->eng2d;
- int ret;
-
- ret = MARK_RING(chan, 2*16 + 32, 4);
- if (ret)
- return ret;
-
- ret = nv50_surface_set(screen, dst, 1);
- if (ret)
- return ret;
-
- ret = nv50_surface_set(screen, src, 0);
- if (ret)
- return ret;
-
- BEGIN_RING(chan, eng2d, 0x088c, 1);
- OUT_RING (chan, 0);
- BEGIN_RING(chan, eng2d, NV50_2D_BLIT_DST_X, 4);
- OUT_RING (chan, dx);
- OUT_RING (chan, dy);
- OUT_RING (chan, w);
- OUT_RING (chan, h);
- BEGIN_RING(chan, eng2d, 0x08c0, 4);
- OUT_RING (chan, 0);
- OUT_RING (chan, 1);
- OUT_RING (chan, 0);
- OUT_RING (chan, 1);
- BEGIN_RING(chan, eng2d, 0x08d0, 4);
- OUT_RING (chan, 0);
- OUT_RING (chan, sx);
- OUT_RING (chan, 0);
- OUT_RING (chan, sy);
-
- return 0;
+ int ret;
+
+ ret = MARK_RING(chan, 2 * 16 + 32, 4);
+ if (ret)
+ return ret;
+
+ ret = nv50_2d_texture_set(chan, 1, dst, dst_level, dz);
+ if (ret)
+ return ret;
+
+ ret = nv50_2d_texture_set(chan, 0, src, src_level, sz);
+ if (ret)
+ return ret;
+
+ /* 0/1 = CENTER/CORNER, 10/00 = POINT/BILINEAR */
+ BEGIN_RING(chan, RING_2D(BLIT_CONTROL), 1);
+ OUT_RING (chan, 0);
+ BEGIN_RING(chan, RING_2D(BLIT_DST_X), 4);
+ OUT_RING (chan, dx);
+ OUT_RING (chan, dy);
+ OUT_RING (chan, w);
+ OUT_RING (chan, h);
+ BEGIN_RING(chan, RING_2D(BLIT_DU_DX_FRACT), 4);
+ OUT_RING (chan, 0);
+ OUT_RING (chan, 1);
+ OUT_RING (chan, 0);
+ OUT_RING (chan, 1);
+ BEGIN_RING(chan, RING_2D(BLIT_SRC_X_FRACT), 4);
+ OUT_RING (chan, 0);
+ OUT_RING (chan, sx);
+ OUT_RING (chan, 0);
+ OUT_RING (chan, sy);
+
+ return 0;
}
static void
-nv50_surface_copy(struct pipe_context *pipe,
- struct pipe_resource *dest, unsigned dst_level,
- unsigned destx, unsigned desty, unsigned destz,
- struct pipe_resource *src, unsigned src_level,
- const struct pipe_box *src_box)
+nv50_resource_copy_region(struct pipe_context *pipe,
+ struct pipe_resource *dst, unsigned dst_level,
+ unsigned dstx, unsigned dsty, unsigned dstz,
+ struct pipe_resource *src, unsigned src_level,
+ const struct pipe_box *src_box)
{
- struct nv50_context *nv50 = nv50_context(pipe);
- struct nv50_screen *screen = nv50->screen;
- struct pipe_surface *ps_dst, *ps_src, surf_tmpl;
-
-
- assert((src->format == dest->format) ||
- (nv50_2d_format_faithful(src->format) &&
- nv50_2d_format_faithful(dest->format)));
- assert(src_box->depth == 1);
-
- memset(&surf_tmpl, 0, sizeof(surf_tmpl));
- surf_tmpl.format = src->format;
- surf_tmpl.usage = 0; /* no bind flag - not a surface */
- surf_tmpl.u.tex.level = src_level;
- surf_tmpl.u.tex.first_layer = src_box->z;
- surf_tmpl.u.tex.last_layer = src_box->z;
- /* XXX really need surfaces here? */
- ps_src = nv50_miptree_surface_new(pipe, src, &surf_tmpl);
- surf_tmpl.format = dest->format;
- surf_tmpl.usage = 0; /* no bind flag - not a surface */
- surf_tmpl.u.tex.level = dst_level;
- surf_tmpl.u.tex.first_layer = destz;
- surf_tmpl.u.tex.last_layer = destz;
- ps_dst = nv50_miptree_surface_new(pipe, dest, &surf_tmpl);
-
- nv50_surface_do_copy(screen, ps_dst, destx, desty, ps_src, src_box->x,
- src_box->y, src_box->width, src_box->height);
-
- nv50_miptree_surface_del(pipe, ps_src);
- nv50_miptree_surface_del(pipe, ps_dst);
+ struct nv50_screen *screen = nv50_context(pipe)->screen;
+ int ret;
+ unsigned dst_layer = dstz, src_layer = src_box->z;
+
+ assert((src->format == dst->format) ||
+ (nv50_2d_format_faithful(src->format) &&
+ nv50_2d_format_faithful(dst->format)));
+
+ for (; dst_layer < dstz + src_box->depth; ++dst_layer, ++src_layer) {
+ ret = nv50_2d_texture_do_copy(screen->base.channel,
+ nv50_miptree(dst), dst_level,
+ dstx, dsty, dst_layer,
+ nv50_miptree(src), src_level,
+ src_box->x, src_box->y, src_layer,
+ src_box->width, src_box->height);
+ if (ret)
+ return;
+ }
}
static void
nv50_clear_render_target(struct pipe_context *pipe,
- struct pipe_surface *dst,
- const float *rgba,
- unsigned dstx, unsigned dsty,
- unsigned width, unsigned height)
+ struct pipe_surface *dst,
+ const float *rgba,
+ unsigned dstx, unsigned dsty,
+ unsigned width, unsigned height)
{
- struct nv50_context *nv50 = nv50_context(pipe);
- struct nv50_screen *screen = nv50->screen;
- struct nouveau_channel *chan = screen->base.channel;
- struct nouveau_grobj *tesla = screen->tesla;
- struct nv50_miptree *mt = nv50_miptree(dst->texture);
- struct nouveau_bo *bo = mt->base.bo;
-
- BEGIN_RING(chan, tesla, NV50TCL_CLEAR_COLOR(0), 4);
- OUT_RINGf (chan, rgba[0]);
- OUT_RINGf (chan, rgba[1]);
- OUT_RINGf (chan, rgba[2]);
- OUT_RINGf (chan, rgba[3]);
-
- if (MARK_RING(chan, 18, 2))
- return;
-
- BEGIN_RING(chan, tesla, NV50TCL_RT_CONTROL, 1);
- OUT_RING (chan, 1);
- BEGIN_RING(chan, tesla, NV50TCL_RT_ADDRESS_HIGH(0), 5);
- OUT_RELOCh(chan, bo, ((struct nv50_surface *)dst)->offset, NOUVEAU_BO_VRAM | NOUVEAU_BO_WR);
- OUT_RELOCl(chan, bo, ((struct nv50_surface *)dst)->offset, NOUVEAU_BO_VRAM | NOUVEAU_BO_WR);
- OUT_RING (chan, nv50_format_table[dst->format].rt);
- OUT_RING (chan, mt->level[dst->u.tex.level].tile_mode << 4);
- OUT_RING (chan, 0);
- BEGIN_RING(chan, tesla, NV50TCL_RT_HORIZ(0), 2);
- OUT_RING (chan, dst->width);
- OUT_RING (chan, dst->height);
- BEGIN_RING(chan, tesla, NV50TCL_RT_ARRAY_MODE, 1);
- OUT_RING (chan, 1);
-
- /* NOTE: only works with D3D clear flag (5097/0x143c bit 4) */
-
- BEGIN_RING(chan, tesla, NV50TCL_VIEWPORT_HORIZ(0), 2);
- OUT_RING (chan, (width << 16) | dstx);
- OUT_RING (chan, (height << 16) | dsty);
-
- BEGIN_RING(chan, tesla, NV50TCL_CLEAR_BUFFERS, 1);
- OUT_RING (chan, 0x3c);
-
- nv50->dirty |= NV50_NEW_FRAMEBUFFER;
+ struct nv50_context *nv50 = nv50_context(pipe);
+ struct nv50_screen *screen = nv50->screen;
+ struct nouveau_channel *chan = screen->base.channel;
+ struct nv50_miptree *mt = nv50_miptree(dst->texture);
+ struct nv50_surface *sf = nv50_surface(dst);
+ struct nouveau_bo *bo = mt->base.bo;
+
+ BEGIN_RING(chan, RING_3D(CLEAR_COLOR(0)), 4);
+ OUT_RINGf (chan, rgba[0]);
+ OUT_RINGf (chan, rgba[1]);
+ OUT_RINGf (chan, rgba[2]);
+ OUT_RINGf (chan, rgba[3]);
+
+ if (MARK_RING(chan, 18, 2))
+ return;
+
+ BEGIN_RING(chan, RING_3D(RT_CONTROL), 1);
+ OUT_RING (chan, 1);
+ BEGIN_RING(chan, RING_3D(RT_ADDRESS_HIGH(0)), 5);
+ OUT_RELOCh(chan, bo, sf->offset, NOUVEAU_BO_VRAM | NOUVEAU_BO_WR);
+ OUT_RELOCl(chan, bo, sf->offset, NOUVEAU_BO_VRAM | NOUVEAU_BO_WR);
+ OUT_RING (chan, nv50_format_table[dst->format].rt);
+ OUT_RING (chan, mt->level[sf->base.u.tex.level].tile_mode << 4);
+ OUT_RING (chan, 0);
+ BEGIN_RING(chan, RING_3D(RT_HORIZ(0)), 2);
+ OUT_RING (chan, sf->width);
+ OUT_RING (chan, sf->height);
+ BEGIN_RING(chan, RING_3D(RT_ARRAY_MODE), 1);
+ OUT_RING (chan, 1);
+
+ /* NOTE: only works with D3D clear flag (5097/0x143c bit 4) */
+
+ BEGIN_RING(chan, RING_3D(VIEWPORT_HORIZ(0)), 2);
+ OUT_RING (chan, (width << 16) | dstx);
+ OUT_RING (chan, (height << 16) | dsty);
+
+ BEGIN_RING(chan, RING_3D(CLEAR_BUFFERS), 1);
+ OUT_RING (chan, 0x3c);
+
+ nv50->dirty |= NV50_NEW_FRAMEBUFFER;
}
static void
nv50_clear_depth_stencil(struct pipe_context *pipe,
- struct pipe_surface *dst,
- unsigned clear_flags,
- double depth,
- unsigned stencil,
- unsigned dstx, unsigned dsty,
- unsigned width, unsigned height)
+ struct pipe_surface *dst,
+ unsigned clear_flags,
+ double depth,
+ unsigned stencil,
+ unsigned dstx, unsigned dsty,
+ unsigned width, unsigned height)
+{
+ struct nv50_context *nv50 = nv50_context(pipe);
+ struct nv50_screen *screen = nv50->screen;
+ struct nouveau_channel *chan = screen->base.channel;
+ struct nv50_miptree *mt = nv50_miptree(dst->texture);
+ struct nv50_surface *sf = nv50_surface(dst);
+ struct nouveau_bo *bo = mt->base.bo;
+ uint32_t mode = 0;
+
+ if (clear_flags & PIPE_CLEAR_DEPTH) {
+ BEGIN_RING(chan, RING_3D(CLEAR_DEPTH), 1);
+ OUT_RINGf (chan, depth);
+ mode |= NV50_3D_CLEAR_BUFFERS_Z;
+ }
+
+ if (clear_flags & PIPE_CLEAR_STENCIL) {
+ BEGIN_RING(chan, RING_3D(CLEAR_STENCIL), 1);
+ OUT_RING (chan, stencil & 0xff);
+ mode |= NV50_3D_CLEAR_BUFFERS_S;
+ }
+
+ if (MARK_RING(chan, 17, 2))
+ return;
+
+ BEGIN_RING(chan, RING_3D(ZETA_ADDRESS_HIGH), 5);
+ OUT_RELOCh(chan, bo, sf->offset, NOUVEAU_BO_VRAM | NOUVEAU_BO_WR);
+ OUT_RELOCl(chan, bo, sf->offset, NOUVEAU_BO_VRAM | NOUVEAU_BO_WR);
+ OUT_RING (chan, nv50_format_table[dst->format].rt);
+ OUT_RING (chan, mt->level[sf->base.u.tex.level].tile_mode << 4);
+ OUT_RING (chan, 0);
+ BEGIN_RING(chan, RING_3D(ZETA_ENABLE), 1);
+ OUT_RING (chan, 1);
+ BEGIN_RING(chan, RING_3D(ZETA_HORIZ), 3);
+ OUT_RING (chan, sf->width);
+ OUT_RING (chan, sf->height);
+ OUT_RING (chan, (1 << 16) | 1);
+
+ BEGIN_RING(chan, RING_3D(VIEWPORT_HORIZ(0)), 2);
+ OUT_RING (chan, (width << 16) | dstx);
+ OUT_RING (chan, (height << 16) | dsty);
+
+ BEGIN_RING(chan, RING_3D(CLEAR_BUFFERS), 1);
+ OUT_RING (chan, mode);
+
+ nv50->dirty |= NV50_NEW_FRAMEBUFFER;
+}
+
+void
+nv50_clear(struct pipe_context *pipe, unsigned buffers,
+ const float *rgba, double depth, unsigned stencil)
{
- struct nv50_context *nv50 = nv50_context(pipe);
- struct nv50_screen *screen = nv50->screen;
- struct nouveau_channel *chan = screen->base.channel;
- struct nouveau_grobj *tesla = screen->tesla;
- struct nv50_miptree *mt = nv50_miptree(dst->texture);
- struct nouveau_bo *bo = mt->base.bo;
- uint32_t mode = 0;
-
- if (clear_flags & PIPE_CLEAR_DEPTH) {
- BEGIN_RING(chan, tesla, NV50TCL_CLEAR_DEPTH, 1);
- OUT_RINGf (chan, depth);
- mode |= NV50TCL_CLEAR_BUFFERS_Z;
- }
-
- if (clear_flags & PIPE_CLEAR_STENCIL) {
- BEGIN_RING(chan, tesla, NV50TCL_CLEAR_STENCIL, 1);
- OUT_RING (chan, stencil & 0xff);
- mode |= NV50TCL_CLEAR_BUFFERS_S;
- }
-
- if (MARK_RING(chan, 17, 2))
- return;
-
- BEGIN_RING(chan, tesla, NV50TCL_ZETA_ADDRESS_HIGH, 5);
- OUT_RELOCh(chan, bo, ((struct nv50_surface *)dst)->offset, NOUVEAU_BO_VRAM | NOUVEAU_BO_WR);
- OUT_RELOCl(chan, bo, ((struct nv50_surface *)dst)->offset, NOUVEAU_BO_VRAM | NOUVEAU_BO_WR);
- OUT_RING (chan, nv50_format_table[dst->format].rt);
- OUT_RING (chan, mt->level[dst->u.tex.level].tile_mode << 4);
- OUT_RING (chan, 0);
- BEGIN_RING(chan, tesla, NV50TCL_ZETA_ENABLE, 1);
- OUT_RING (chan, 1);
- BEGIN_RING(chan, tesla, NV50TCL_ZETA_HORIZ, 3);
- OUT_RING (chan, dst->width);
- OUT_RING (chan, dst->height);
- OUT_RING (chan, (1 << 16) | 1);
-
- BEGIN_RING(chan, tesla, NV50TCL_VIEWPORT_HORIZ(0), 2);
- OUT_RING (chan, (width << 16) | dstx);
- OUT_RING (chan, (height << 16) | dsty);
-
- BEGIN_RING(chan, tesla, NV50TCL_CLEAR_BUFFERS, 1);
- OUT_RING (chan, mode);
-
- nv50->dirty |= NV50_NEW_FRAMEBUFFER;
+ struct nv50_context *nv50 = nv50_context(pipe);
+ struct nouveau_channel *chan = nv50->screen->base.channel;
+ struct pipe_framebuffer_state *fb = &nv50->framebuffer;
+ unsigned i;
+ const unsigned dirty = nv50->dirty;
+ uint32_t mode = 0;
+
+ /* don't need NEW_BLEND, COLOR_MASK doesn't affect CLEAR_BUFFERS */
+ nv50->dirty &= NV50_NEW_FRAMEBUFFER;
+ if (!nv50_state_validate(nv50))
+ return;
+
+ if (buffers & PIPE_CLEAR_COLOR && fb->nr_cbufs) {
+ BEGIN_RING(chan, RING_3D(CLEAR_COLOR(0)), 4);
+ OUT_RINGf (chan, rgba[0]);
+ OUT_RINGf (chan, rgba[1]);
+ OUT_RINGf (chan, rgba[2]);
+ OUT_RINGf (chan, rgba[3]);
+ mode =
+ NV50_3D_CLEAR_BUFFERS_R | NV50_3D_CLEAR_BUFFERS_G |
+ NV50_3D_CLEAR_BUFFERS_B | NV50_3D_CLEAR_BUFFERS_A;
+ }
+
+ if (buffers & PIPE_CLEAR_DEPTH) {
+ BEGIN_RING(chan, RING_3D(CLEAR_DEPTH), 1);
+ OUT_RING (chan, fui(depth));
+ mode |= NV50_3D_CLEAR_BUFFERS_Z;
+ }
+
+ if (buffers & PIPE_CLEAR_STENCIL) {
+ BEGIN_RING(chan, RING_3D(CLEAR_STENCIL), 1);
+ OUT_RING (chan, stencil & 0xff);
+ mode |= NV50_3D_CLEAR_BUFFERS_S;
+ }
+
+ BEGIN_RING(chan, RING_3D(CLEAR_BUFFERS), 1);
+ OUT_RING (chan, mode);
+
+ for (i = 1; i < fb->nr_cbufs; i++) {
+ BEGIN_RING(chan, RING_3D(CLEAR_BUFFERS), 1);
+ OUT_RING (chan, (i << 6) | 0x3c);
+ }
+
+ nv50->dirty = dirty & ~NV50_NEW_FRAMEBUFFER;
}
void
nv50_init_surface_functions(struct nv50_context *nv50)
{
- nv50->pipe.resource_copy_region = nv50_surface_copy;
- nv50->pipe.clear_render_target = nv50_clear_render_target;
- nv50->pipe.clear_depth_stencil = nv50_clear_depth_stencil;
+ struct pipe_context *pipe = &nv50->base.pipe;
+
+ pipe->resource_copy_region = nv50_resource_copy_region;
+ pipe->clear_render_target = nv50_clear_render_target;
+ pipe->clear_depth_stencil = nv50_clear_depth_stencil;
}
diff --git a/src/gallium/drivers/nv50/nv50_tex.c b/src/gallium/drivers/nv50/nv50_tex.c
index 9243f9edced..9192d2e2590 100644
--- a/src/gallium/drivers/nv50/nv50_tex.c
+++ b/src/gallium/drivers/nv50/nv50_tex.c
@@ -21,217 +21,298 @@
*/
#include "nv50_context.h"
-#include "nv50_texture.h"
#include "nv50_resource.h"
-
-#include "nouveau/nouveau_stateobj.h"
-#include "nouveau/nouveau_reloc.h"
+#include "nv50_texture.xml.h"
+#include "nv50_defs.xml.h"
#include "util/u_format.h"
+#define NV50_TIC_0_SWIZZLE__MASK \
+ (NV50_TIC_0_MAPA__MASK | NV50_TIC_0_MAPB__MASK | \
+ NV50_TIC_0_MAPG__MASK | NV50_TIC_0_MAPR__MASK)
+
static INLINE uint32_t
-nv50_tic_swizzle(uint32_t tc, unsigned swz)
+nv50_tic_swizzle(uint32_t tc, unsigned swz, boolean tex_int)
{
- switch (swz) {
- case PIPE_SWIZZLE_RED:
- return (tc & NV50TIC_0_0_MAPR_MASK) >> NV50TIC_0_0_MAPR_SHIFT;
- case PIPE_SWIZZLE_GREEN:
- return (tc & NV50TIC_0_0_MAPG_MASK) >> NV50TIC_0_0_MAPG_SHIFT;
- case PIPE_SWIZZLE_BLUE:
- return (tc & NV50TIC_0_0_MAPB_MASK) >> NV50TIC_0_0_MAPB_SHIFT;
- case PIPE_SWIZZLE_ALPHA:
- return (tc & NV50TIC_0_0_MAPA_MASK) >> NV50TIC_0_0_MAPA_SHIFT;
- case PIPE_SWIZZLE_ONE:
- return 7;
- case PIPE_SWIZZLE_ZERO:
- default:
- return 0;
- }
+ switch (swz) {
+ case PIPE_SWIZZLE_RED:
+ return (tc & NV50_TIC_0_MAPR__MASK) >> NV50_TIC_0_MAPR__SHIFT;
+ case PIPE_SWIZZLE_GREEN:
+ return (tc & NV50_TIC_0_MAPG__MASK) >> NV50_TIC_0_MAPG__SHIFT;
+ case PIPE_SWIZZLE_BLUE:
+ return (tc & NV50_TIC_0_MAPB__MASK) >> NV50_TIC_0_MAPB__SHIFT;
+ case PIPE_SWIZZLE_ALPHA:
+ return (tc & NV50_TIC_0_MAPA__MASK) >> NV50_TIC_0_MAPA__SHIFT;
+ case PIPE_SWIZZLE_ONE:
+ return tex_int ? NV50_TIC_MAP_ONE_INT : NV50_TIC_MAP_ONE_FLOAT;
+ case PIPE_SWIZZLE_ZERO:
+ default:
+ return NV50_TIC_MAP_ZERO;
+ }
}
-boolean
-nv50_tex_construct(struct nv50_sampler_view *view)
+struct pipe_sampler_view *
+nv50_create_sampler_view(struct pipe_context *pipe,
+ struct pipe_resource *texture,
+ const struct pipe_sampler_view *templ)
{
- const struct util_format_description *desc;
- struct nv50_miptree *mt = nv50_miptree(view->pipe.texture);
- uint32_t swz[4], *tic = view->tic;
-
- tic[0] = nv50_format_table[view->pipe.format].tic;
-
- swz[0] = nv50_tic_swizzle(tic[0], view->pipe.swizzle_r);
- swz[1] = nv50_tic_swizzle(tic[0], view->pipe.swizzle_g);
- swz[2] = nv50_tic_swizzle(tic[0], view->pipe.swizzle_b);
- swz[3] = nv50_tic_swizzle(tic[0], view->pipe.swizzle_a);
- view->tic[0] = (tic[0] & ~NV50TIC_0_0_SWIZZLE_MASK) |
- (swz[0] << NV50TIC_0_0_MAPR_SHIFT) |
- (swz[1] << NV50TIC_0_0_MAPG_SHIFT) |
- (swz[2] << NV50TIC_0_0_MAPB_SHIFT) |
- (swz[3] << NV50TIC_0_0_MAPA_SHIFT);
-
- tic[2] = 0x50001000;
- tic[2] |= ((mt->base.bo->tile_mode & 0x0f) << 22) |
- ((mt->base.bo->tile_mode & 0xf0) << 21);
-
- desc = util_format_description(mt->base.base.format);
- if (desc->colorspace == UTIL_FORMAT_COLORSPACE_SRGB)
- tic[2] |= NV50TIC_0_2_COLORSPACE_SRGB;
-
- switch (mt->base.base.target) {
- case PIPE_TEXTURE_1D:
- tic[2] |= NV50TIC_0_2_TARGET_1D;
- break;
- case PIPE_TEXTURE_2D:
- tic[2] |= NV50TIC_0_2_TARGET_2D;
- break;
- case PIPE_TEXTURE_RECT:
- tic[2] |= NV50TIC_0_2_TARGET_RECT;
- break;
- case PIPE_TEXTURE_3D:
- tic[2] |= NV50TIC_0_2_TARGET_3D;
- break;
- case PIPE_TEXTURE_CUBE:
- tic[2] |= NV50TIC_0_2_TARGET_CUBE;
- break;
- default:
- NOUVEAU_ERR("invalid texture target: %d\n",
- mt->base.base.target);
- return FALSE;
- }
-
- tic[3] = 0x00300000;
-
- tic[4] = (1 << 31) | mt->base.base.width0;
- tic[5] = (mt->base.base.last_level << 28) |
- (mt->base.base.depth0 << 16) | mt->base.base.height0;
-
- tic[6] = 0x03000000;
-
- tic[7] = (view->pipe.u.tex.last_level << 4) | view->pipe.u.tex.first_level;
-
- return TRUE;
+ const struct util_format_description *desc;
+ uint32_t *tic;
+ uint32_t swz[4];
+ uint32_t depth;
+ struct nv50_tic_entry *view;
+ struct nv50_miptree *mt = nv50_miptree(texture);
+ boolean tex_int;
+
+ view = MALLOC_STRUCT(nv50_tic_entry);
+ if (!view)
+ return NULL;
+
+ view->pipe = *templ;
+ view->pipe.reference.count = 1;
+ view->pipe.texture = NULL;
+ view->pipe.context = pipe;
+
+ view->id = -1;
+
+ pipe_resource_reference(&view->pipe.texture, texture);
+
+ tic = &view->tic[0];
+
+ desc = util_format_description(view->pipe.format);
+
+ /* TIC[0] */
+
+ tic[0] = nv50_format_table[view->pipe.format].tic;
+
+ tex_int = FALSE; /* XXX: integer textures */
+
+ swz[0] = nv50_tic_swizzle(tic[0], view->pipe.swizzle_r, tex_int);
+ swz[1] = nv50_tic_swizzle(tic[0], view->pipe.swizzle_g, tex_int);
+ swz[2] = nv50_tic_swizzle(tic[0], view->pipe.swizzle_b, tex_int);
+ swz[3] = nv50_tic_swizzle(tic[0], view->pipe.swizzle_a, tex_int);
+ tic[0] = (tic[0] & ~NV50_TIC_0_SWIZZLE__MASK) |
+ (swz[0] << NV50_TIC_0_MAPR__SHIFT) |
+ (swz[1] << NV50_TIC_0_MAPG__SHIFT) |
+ (swz[2] << NV50_TIC_0_MAPB__SHIFT) |
+ (swz[3] << NV50_TIC_0_MAPA__SHIFT);
+
+ tic[1] = /* mt->base.bo->offset; */ 0;
+ tic[2] = /* mt->base.bo->offset >> 32 */ 0;
+
+ tic[2] |= 0x10001000 | NV50_TIC_2_NO_BORDER;
+
+ if (desc->colorspace == UTIL_FORMAT_COLORSPACE_SRGB)
+ tic[2] |= NV50_TIC_2_COLORSPACE_SRGB;
+
+ if (mt->base.base.target != PIPE_TEXTURE_RECT)
+ tic[2] |= NV50_TIC_2_NORMALIZED_COORDS;
+
+ tic[2] |=
+ ((mt->base.bo->tile_mode & 0x0f) << (22 - 0)) |
+ ((mt->base.bo->tile_mode & 0xf0) << (25 - 4));
+
+ depth = MAX2(mt->base.base.array_size, mt->base.base.depth0);
+
+ if (mt->base.base.target == PIPE_TEXTURE_1D_ARRAY ||
+ mt->base.base.target == PIPE_TEXTURE_2D_ARRAY) {
+ tic[1] = view->pipe.u.tex.first_layer * mt->layer_stride;
+ depth = view->pipe.u.tex.last_layer - view->pipe.u.tex.first_layer + 1;
+ }
+
+ switch (mt->base.base.target) {
+ case PIPE_TEXTURE_1D:
+ tic[2] |= NV50_TIC_2_TARGET_1D;
+ break;
+ case PIPE_TEXTURE_2D:
+ tic[2] |= NV50_TIC_2_TARGET_2D;
+ break;
+ case PIPE_TEXTURE_RECT:
+ tic[2] |= NV50_TIC_2_TARGET_RECT;
+ break;
+ case PIPE_TEXTURE_3D:
+ tic[2] |= NV50_TIC_2_TARGET_3D;
+ break;
+ case PIPE_TEXTURE_CUBE:
+ depth /= 6;
+ if (depth > 1)
+ tic[2] |= NV50_TIC_2_TARGET_CUBE_ARRAY;
+ else
+ tic[2] |= NV50_TIC_2_TARGET_CUBE;
+ break;
+ case PIPE_TEXTURE_1D_ARRAY:
+ tic[2] |= NV50_TIC_2_TARGET_1D_ARRAY;
+ break;
+ case PIPE_TEXTURE_2D_ARRAY:
+ tic[2] |= NV50_TIC_2_TARGET_2D_ARRAY;
+ break;
+ case PIPE_BUFFER:
+ tic[2] |= NV50_TIC_2_TARGET_BUFFER | NV50_TIC_2_LINEAR;
+ break;
+ default:
+ NOUVEAU_ERR("invalid texture target: %d\n", mt->base.base.target);
+ return FALSE;
+ }
+
+ if (mt->base.base.target == PIPE_BUFFER)
+ tic[3] = mt->base.base.width0;
+ else
+ tic[3] = 0x00300000;
+
+ tic[4] = (1 << 31) | mt->base.base.width0;
+
+ tic[5] = mt->base.base.height0 & 0xffff;
+ tic[5] |= depth << 16;
+ tic[5] |= mt->base.base.last_level << 28;
+
+ tic[6] = 0x03000000;
+
+ tic[7] = (view->pipe.u.tex.last_level << 4) | view->pipe.u.tex.first_level;
+
+ return &view->pipe;
}
-static int
-nv50_validate_textures(struct nv50_context *nv50, struct nouveau_stateobj *so,
- unsigned p)
+static boolean
+nv50_validate_tic(struct nv50_context *nv50, int s)
{
- struct nouveau_grobj *eng2d = nv50->screen->eng2d;
- struct nouveau_grobj *tesla = nv50->screen->tesla;
- unsigned unit, j;
-
- const unsigned rll = NOUVEAU_BO_VRAM | NOUVEAU_BO_RD | NOUVEAU_BO_LOW;
- const unsigned rlh = NOUVEAU_BO_VRAM | NOUVEAU_BO_RD | NOUVEAU_BO_HIGH
- | NOUVEAU_BO_OR;
-
- nv50_so_init_sifc(nv50, so, nv50->screen->tic, NOUVEAU_BO_VRAM,
- p * (32 * 8 * 4), nv50->sampler_view_nr[p] * 8 * 4);
-
- for (unit = 0; unit < nv50->sampler_view_nr[p]; ++unit) {
- struct nv50_sampler_view *view =
- nv50_sampler_view(nv50->sampler_views[p][unit]);
-
- so_method(so, eng2d, NV50_2D_SIFC_DATA | (2 << 29), 8);
- if (view) {
- uint32_t tic2 = view->tic[2];
- struct nv50_miptree *mt =
- nv50_miptree(view->pipe.texture);
-
- tic2 &= ~NV50TIC_0_2_NORMALIZED_COORDS;
- if (nv50->sampler[p][unit]->normalized)
- tic2 |= NV50TIC_0_2_NORMALIZED_COORDS;
- view->tic[2] = tic2;
-
- so_data (so, view->tic[0]);
- so_reloc (so, mt->base.bo, 0, rll, 0, 0);
- so_reloc (so, mt->base.bo, 0, rlh, tic2, tic2);
- so_datap (so, &view->tic[3], 5);
-
- /* Set TEX insn $t src binding $unit in program type p
- * to TIC, TSC entry (32 * p + unit), mark valid (1).
- */
- so_method(so, tesla, NV50TCL_BIND_TIC(p), 1);
- so_data (so, ((32 * p + unit) << 9) | (unit << 1) | 1);
- } else {
- for (j = 0; j < 8; ++j)
- so_data(so, 0);
- so_method(so, tesla, NV50TCL_BIND_TIC(p), 1);
- so_data (so, (unit << 1) | 0);
- }
- }
-
- for (; unit < nv50->state.sampler_view_nr[p]; unit++) {
- /* Make other bindings invalid. */
- so_method(so, tesla, NV50TCL_BIND_TIC(p), 1);
- so_data (so, (unit << 1) | 0);
- }
-
- nv50->state.sampler_view_nr[p] = nv50->sampler_view_nr[p];
- return TRUE;
+ struct nouveau_channel *chan = nv50->screen->base.channel;
+ struct nouveau_bo *txc = nv50->screen->txc;
+ unsigned i;
+ boolean need_flush = FALSE;
+
+ for (i = 0; i < nv50->num_textures[s]; ++i) {
+ struct nv50_tic_entry *tic = nv50_tic_entry(nv50->textures[s][i]);
+ struct nv04_resource *res;
+
+ if (!tic) {
+ BEGIN_RING(chan, RING_3D(BIND_TIC(s)), 1);
+ OUT_RING (chan, (i << 1) | 0);
+ continue;
+ }
+ res = &nv50_miptree(tic->pipe.texture)->base;
+
+ if (tic->id < 0) {
+ uint32_t offset = tic->tic[1];
+
+ tic->id = nv50_screen_tic_alloc(nv50->screen, tic);
+
+ MARK_RING (chan, 24 + 8, 4);
+ BEGIN_RING(chan, RING_2D(DST_FORMAT), 2);
+ OUT_RING (chan, NV50_SURFACE_FORMAT_R8_UNORM);
+ OUT_RING (chan, 1);
+ BEGIN_RING(chan, RING_2D(DST_PITCH), 5);
+ OUT_RING (chan, 262144);
+ OUT_RING (chan, 65536);
+ OUT_RING (chan, 1);
+ OUT_RELOCh(chan, txc, 0, NOUVEAU_BO_VRAM | NOUVEAU_BO_WR);
+ OUT_RELOCl(chan, txc, 0, NOUVEAU_BO_VRAM | NOUVEAU_BO_WR);
+ BEGIN_RING(chan, RING_2D(SIFC_BITMAP_ENABLE), 2);
+ OUT_RING (chan, 0);
+ OUT_RING (chan, NV50_SURFACE_FORMAT_R8_UNORM);
+ BEGIN_RING(chan, RING_2D(SIFC_WIDTH), 10);
+ OUT_RING (chan, 32);
+ OUT_RING (chan, 1);
+ OUT_RING (chan, 0);
+ OUT_RING (chan, 1);
+ OUT_RING (chan, 0);
+ OUT_RING (chan, 1);
+ OUT_RING (chan, 0);
+ OUT_RING (chan, tic->id * 32);
+ OUT_RING (chan, 0);
+ OUT_RING (chan, 0);
+ BEGIN_RING_NI(chan, RING_2D(SIFC_DATA), 8);
+ OUT_RING (chan, tic->tic[0]);
+ OUT_RELOCl(chan, res->bo, offset, NOUVEAU_BO_VRAM | NOUVEAU_BO_RD);
+ OUT_RELOC (chan, res->bo, offset, NOUVEAU_BO_VRAM | NOUVEAU_BO_RD |
+ NOUVEAU_BO_HIGH | NOUVEAU_BO_OR, tic->tic[2], tic->tic[2]);
+ OUT_RINGp (chan, &tic->tic[3], 5);
+
+ need_flush = TRUE;
+ } else
+ if (res->status & NOUVEAU_BUFFER_STATUS_GPU_WRITING) {
+ BEGIN_RING(chan, RING_3D(TEX_CACHE_CTL), 1);
+ OUT_RING (chan, 0x20); //(tic->id << 4) | 1);
+ }
+
+ nv50->screen->tic.lock[tic->id / 32] |= 1 << (tic->id % 32);
+
+ res->status &= NOUVEAU_BUFFER_STATUS_GPU_WRITING;
+ res->status |= NOUVEAU_BUFFER_STATUS_GPU_READING;
+
+ nv50_bufctx_add_resident(nv50, NV50_BUFCTX_TEXTURES, res,
+ NOUVEAU_BO_VRAM | NOUVEAU_BO_RD);
+
+ BEGIN_RING(chan, RING_3D(BIND_TIC(s)), 1);
+ OUT_RING (chan, (tic->id << 9) | (i << 1) | 1);
+ }
+ for (; i < nv50->state.num_textures[s]; ++i) {
+ BEGIN_RING(chan, RING_3D(BIND_TIC(s)), 1);
+ OUT_RING (chan, (i << 1) | 0);
+ }
+ nv50->state.num_textures[s] = nv50->num_textures[s];
+
+ return need_flush;
}
-static void
-nv50_emit_texture_relocs(struct nv50_context *nv50, int prog)
+void nv50_validate_textures(struct nv50_context *nv50)
{
- struct nouveau_channel *chan = nv50->screen->base.channel;
- struct nouveau_bo *tic = nv50->screen->tic;
- int unit;
-
- for (unit = 0; unit < nv50->sampler_view_nr[prog]; unit++) {
- struct nv50_sampler_view *view;
- struct nv50_miptree *mt;
- const unsigned base = ((prog * 32) + unit) * 32;
-
- view = nv50_sampler_view(nv50->sampler_views[prog][unit]);
- if (!view)
- continue;
- mt = nv50_miptree(view->pipe.texture);
-
- nouveau_reloc_emit(chan, tic, base + 4, NULL, mt->base.bo, 0, 0,
- NOUVEAU_BO_VRAM | NOUVEAU_BO_RD |
- NOUVEAU_BO_LOW, 0, 0);
- nouveau_reloc_emit(chan, tic, base + 8, NULL, mt->base.bo, 0, 0,
- NOUVEAU_BO_VRAM | NOUVEAU_BO_RD |
- NOUVEAU_BO_HIGH, view->tic[2], view->tic[2]);
- }
+ boolean need_flush;
+
+ need_flush = nv50_validate_tic(nv50, 0);
+ need_flush |= nv50_validate_tic(nv50, 2);
+
+ if (need_flush) {
+ BEGIN_RING(nv50->screen->base.channel, RING_3D(TIC_FLUSH), 1);
+ OUT_RING (nv50->screen->base.channel, 0);
+ }
}
-void
-nv50_tex_relocs(struct nv50_context *nv50)
+static boolean
+nv50_validate_tsc(struct nv50_context *nv50, int s)
{
- nv50_emit_texture_relocs(nv50, 2); /* FP */
- nv50_emit_texture_relocs(nv50, 0); /* VP */
+ struct nouveau_channel *chan = nv50->screen->base.channel;
+ unsigned i;
+ boolean need_flush = FALSE;
+
+ for (i = 0; i < nv50->num_samplers[s]; ++i) {
+ struct nv50_tsc_entry *tsc = nv50_tsc_entry(nv50->samplers[s][i]);
+
+ if (!tsc) {
+ BEGIN_RING(chan, RING_3D(BIND_TSC(s)), 1);
+ OUT_RING (chan, (i << 4) | 0);
+ continue;
+ }
+ if (tsc->id < 0) {
+ tsc->id = nv50_screen_tsc_alloc(nv50->screen, tsc);
+
+ nv50_sifc_linear_u8(&nv50->base, nv50->screen->txc,
+ 65536 + tsc->id * 32,
+ NOUVEAU_BO_VRAM, 32, tsc->tsc);
+ need_flush = TRUE;
+ }
+ nv50->screen->tsc.lock[tsc->id / 32] |= 1 << (tsc->id % 32);
+
+ BEGIN_RING(chan, RING_3D(BIND_TSC(s)), 1);
+ OUT_RING (chan, (tsc->id << 12) | (i << 4) | 1);
+ }
+ for (; i < nv50->state.num_samplers[s]; ++i) {
+ BEGIN_RING(chan, RING_3D(BIND_TSC(s)), 1);
+ OUT_RING (chan, (i << 4) | 0);
+ }
+ nv50->state.num_samplers[s] = nv50->num_samplers[s];
+
+ return need_flush;
}
-struct nouveau_stateobj *
-nv50_tex_validate(struct nv50_context *nv50)
+void nv50_validate_samplers(struct nv50_context *nv50)
{
- struct nouveau_stateobj *so;
- struct nouveau_grobj *tesla = nv50->screen->tesla;
- unsigned p, m = 0, d = 0, r = 0;
-
- for (p = 0; p < 3; ++p) {
- unsigned nr = MAX2(nv50->sampler_view_nr[p],
- nv50->state.sampler_view_nr[p]);
- m += nr;
- d += nr;
- r += nv50->sampler_view_nr[p];
- }
- m = m * 2 + 3 * 4 + 1;
- d = d * 9 + 3 * 19 + 1;
- r = r * 2 + 3 * 2;
-
- so = so_new(m, d, r);
-
- if (nv50_validate_textures(nv50, so, 0) == FALSE ||
- nv50_validate_textures(nv50, so, 2) == FALSE) {
- so_ref(NULL, &so);
-
- NOUVEAU_ERR("failed tex validate\n");
- return NULL;
- }
-
- so_method(so, tesla, 0x1330, 1); /* flush TIC */
- so_data (so, 0);
-
- return so;
+ boolean need_flush;
+
+ need_flush = nv50_validate_tsc(nv50, 0);
+ need_flush |= nv50_validate_tsc(nv50, 2);
+
+ if (need_flush) {
+ BEGIN_RING(nv50->screen->base.channel, RING_3D(TSC_FLUSH), 1);
+ OUT_RING (nv50->screen->base.channel, 0);
+ }
}
diff --git a/src/gallium/drivers/nv50/nv50_texture.h b/src/gallium/drivers/nv50/nv50_texture.h
deleted file mode 100644
index b4939943e8a..00000000000
--- a/src/gallium/drivers/nv50/nv50_texture.h
+++ /dev/null
@@ -1,197 +0,0 @@
-#ifndef __NV50_TEXTURE_H__
-#define __NV50_TEXTURE_H__
-
-/* It'd be really nice to have these in nouveau_class.h generated by
- * renouveau like the rest of the object header - but not sure it can
- * handle non-object stuff nicely - need to look into it.
- */
-
-/* Texture image control block */
-#define NV50TIC_0_0_SWIZZLE_MASK 0x3ffc0000
-#define NV50TIC_0_0_MAPA_MASK 0x38000000
-#define NV50TIC_0_0_MAPA_SHIFT 27
-#define NV50TIC_0_0_MAPA_ZERO 0x00000000
-#define NV50TIC_0_0_MAPA_C0 0x10000000
-#define NV50TIC_0_0_MAPA_C1 0x18000000
-#define NV50TIC_0_0_MAPA_C2 0x20000000
-#define NV50TIC_0_0_MAPA_C3 0x28000000
-#define NV50TIC_0_0_MAPA_ONE 0x38000000
-#define NV50TIC_0_0_MAPB_MASK 0x07000000
-#define NV50TIC_0_0_MAPB_SHIFT 24
-#define NV50TIC_0_0_MAPB_ZERO 0x00000000
-#define NV50TIC_0_0_MAPB_C0 0x02000000
-#define NV50TIC_0_0_MAPB_C1 0x03000000
-#define NV50TIC_0_0_MAPB_C2 0x04000000
-#define NV50TIC_0_0_MAPB_C3 0x05000000
-#define NV50TIC_0_0_MAPB_ONE 0x07000000
-#define NV50TIC_0_0_MAPG_MASK 0x00e00000
-#define NV50TIC_0_0_MAPG_SHIFT 21
-#define NV50TIC_0_0_MAPG_ZERO 0x00000000
-#define NV50TIC_0_0_MAPG_C0 0x00400000
-#define NV50TIC_0_0_MAPG_C1 0x00600000
-#define NV50TIC_0_0_MAPG_C2 0x00800000
-#define NV50TIC_0_0_MAPG_C3 0x00a00000
-#define NV50TIC_0_0_MAPG_ONE 0x00e00000
-#define NV50TIC_0_0_MAPR_MASK 0x001c0000
-#define NV50TIC_0_0_MAPR_SHIFT 18
-#define NV50TIC_0_0_MAPR_ZERO 0x00000000
-#define NV50TIC_0_0_MAPR_C0 0x00080000
-#define NV50TIC_0_0_MAPR_C1 0x000c0000
-#define NV50TIC_0_0_MAPR_C2 0x00100000
-#define NV50TIC_0_0_MAPR_C3 0x00140000
-#define NV50TIC_0_0_MAPR_ONE 0x001c0000
-#define NV50TIC_0_0_TYPEA_MASK 0x00038000
-#define NV50TIC_0_0_TYPEA_UNORM 0x00010000
-#define NV50TIC_0_0_TYPEA_SNORM 0x00008000
-#define NV50TIC_0_0_TYPEA_SINT 0x00018000
-#define NV50TIC_0_0_TYPEA_UINT 0x00020000
-#define NV50TIC_0_0_TYPEA_SSCALED 0x00028000
-#define NV50TIC_0_0_TYPEA_USCALED 0x00030000
-#define NV50TIC_0_0_TYPEA_FLOAT 0x00038000
-#define NV50TIC_0_0_TYPEB_MASK 0x00007000
-#define NV50TIC_0_0_TYPEB_UNORM 0x00002000
-#define NV50TIC_0_0_TYPEB_SNORM 0x00001000
-#define NV50TIC_0_0_TYPEB_SINT 0x00003000
-#define NV50TIC_0_0_TYPEB_UINT 0x00004000
-#define NV50TIC_0_0_TYPEB_SSCALED 0x00005000
-#define NV50TIC_0_0_TYPEB_USCALED 0x00006000
-#define NV50TIC_0_0_TYPEB_FLOAT 0x00007000
-#define NV50TIC_0_0_TYPEG_MASK 0x00000e00
-#define NV50TIC_0_0_TYPEG_UNORM 0x00000400
-#define NV50TIC_0_0_TYPEG_SNORM 0x00000200
-#define NV50TIC_0_0_TYPEG_SINT 0x00000600
-#define NV50TIC_0_0_TYPEG_UINT 0x00000800
-#define NV50TIC_0_0_TYPEG_SSCALED 0x00000a00
-#define NV50TIC_0_0_TYPEG_USCALED 0x00000c00
-#define NV50TIC_0_0_TYPEG_FLOAT 0x00000e00
-#define NV50TIC_0_0_TYPER_MASK 0x000001c0
-#define NV50TIC_0_0_TYPER_UNORM 0x00000080
-#define NV50TIC_0_0_TYPER_SNORM 0x00000040
-#define NV50TIC_0_0_TYPER_SINT 0x000000c0
-#define NV50TIC_0_0_TYPER_UINT 0x00000100
-#define NV50TIC_0_0_TYPER_SSCALED 0x00000140
-#define NV50TIC_0_0_TYPER_USCALED 0x00000180
-#define NV50TIC_0_0_TYPER_FLOAT 0x000001c0
-#define NV50TIC_0_0_FMT_MASK 0x0000003f
-#define NV50TIC_0_0_FMT_32_32_32_32 0x00000001
-#define NV50TIC_0_0_FMT_16_16_16_16 0x00000003
-#define NV50TIC_0_0_FMT_32_32 0x00000004
-#define NV50TIC_0_0_FMT_8_8_8_8 0x00000008
-#define NV50TIC_0_0_FMT_2_10_10_10 0x00000009
-#define NV50TIC_0_0_FMT_16_16 0x0000000c
-#define NV50TIC_0_0_FMT_32 0x0000000f
-#define NV50TIC_0_0_FMT_4_4_4_4 0x00000012
-/* #define NV50TIC_0_0_FMT_1_5_5_5 0x00000013 */
-#define NV50TIC_0_0_FMT_1_5_5_5 0x00000014
-#define NV50TIC_0_0_FMT_5_6_5 0x00000015
-#define NV50TIC_0_0_FMT_8_8 0x00000018
-#define NV50TIC_0_0_FMT_16 0x0000001b
-#define NV50TIC_0_0_FMT_8 0x0000001d
-#define NV50TIC_0_0_FMT_5_9_9_9 0x00000020
-#define NV50TIC_0_0_FMT_10_11_11 0x00000021
-#define NV50TIC_0_0_FMT_DXT1 0x00000024
-#define NV50TIC_0_0_FMT_DXT3 0x00000025
-#define NV50TIC_0_0_FMT_DXT5 0x00000026
-#define NV50TIC_0_0_FMT_RGTC1 0x00000027
-#define NV50TIC_0_0_FMT_RGTC2 0x00000028
-#define NV50TIC_0_0_FMT_24_8 0x00000029
-#define NV50TIC_0_0_FMT_8_24 0x0000002a
-#define NV50TIC_0_0_FMT_32_DEPTH 0x0000002f
-#define NV50TIC_0_0_FMT_32_8 0x00000030
-#define NV50TIC_0_0_FMT_16_DEPTH 0x0000003a
-
-#define NV50TIC_0_1_OFFSET_LOW_MASK 0xffffffff
-#define NV50TIC_0_1_OFFSET_LOW_SHIFT 0
-
-#define NV50TIC_0_2_COLORSPACE_SRGB 0x00000400
-#define NV50TIC_0_2_TARGET_1D 0x00000000
-#define NV50TIC_0_2_TARGET_2D 0x00004000
-#define NV50TIC_0_2_TARGET_3D 0x00008000
-#define NV50TIC_0_2_TARGET_CUBE 0x0000c000
-#define NV50TIC_0_2_TARGET_1D_ARRAY 0x00010000
-#define NV50TIC_0_2_TARGET_2D_ARRAY 0x00014000
-#define NV50TIC_0_2_TARGET_BUFFER 0x00018000
-#define NV50TIC_0_2_TARGET_RECT 0x0001c000
-/* #define NV50TIC_0_0_TILE_MODE_LINEAR 0x00040000 */
-#define NV50TIC_0_2_TILE_MODE_Y_MASK 0x01c00000
-#define NV50TIC_0_2_TILE_MODE_Y_SHIFT 22
-#define NV50TIC_0_2_TILE_MODE_Z_MASK 0x0e000000
-#define NV50TIC_0_2_TILE_MODE_Z_SHIFT 25
-#define NV50TIC_0_2_NORMALIZED_COORDS 0x80000000
-
-#define NV50TIC_0_3_UNKNOWN_MASK 0xffffffff
-
-#define NV50TIC_0_4_WIDTH_MASK 0x0000ffff
-#define NV50TIC_0_4_WIDTH_SHIFT 0
-
-#define NV50TIC_0_5_LAST_LEVEL_MASK 0xf0000000
-#define NV50TIC_0_5_LAST_LEVEL_SHIFT 28
-#define NV50TIC_0_5_DEPTH_MASK 0x0fff0000
-#define NV50TIC_0_5_DEPTH_SHIFT 16
-#define NV50TIC_0_5_HEIGHT_MASK 0x0000ffff
-#define NV50TIC_0_5_HEIGHT_SHIFT 0
-#define NV50TIC_0_6_UNKNOWN_MASK 0xffffffff
-
-#define NV50TIC_0_7_BASE_LEVEL_MASK 0x0000000f
-#define NV50TIC_0_7_BASE_LEVEL_SHIFT 0
-#define NV50TIC_0_7_MAX_LEVEL_MASK 0x000000f0
-#define NV50TIC_0_7_MAX_LEVEL_SHIFT 4
-
-/* Texture sampler control block */
-#define NV50TSC_1_0_WRAPS_MASK 0x00000007
-#define NV50TSC_1_0_WRAPS_REPEAT 0x00000000
-#define NV50TSC_1_0_WRAPS_MIRROR_REPEAT 0x00000001
-#define NV50TSC_1_0_WRAPS_CLAMP_TO_EDGE 0x00000002
-#define NV50TSC_1_0_WRAPS_CLAMP_TO_BORDER 0x00000003
-#define NV50TSC_1_0_WRAPS_CLAMP 0x00000004
-#define NV50TSC_1_0_WRAPS_MIRROR_CLAMP_TO_EDGE 0x00000005
-#define NV50TSC_1_0_WRAPS_MIRROR_CLAMP_TO_BORDER 0x00000006
-#define NV50TSC_1_0_WRAPS_MIRROR_CLAMP 0x00000007
-#define NV50TSC_1_0_WRAPT_MASK 0x00000038
-#define NV50TSC_1_0_WRAPT_REPEAT 0x00000000
-#define NV50TSC_1_0_WRAPT_MIRROR_REPEAT 0x00000008
-#define NV50TSC_1_0_WRAPT_CLAMP_TO_EDGE 0x00000010
-#define NV50TSC_1_0_WRAPT_CLAMP_TO_BORDER 0x00000018
-#define NV50TSC_1_0_WRAPT_CLAMP 0x00000020
-#define NV50TSC_1_0_WRAPT_MIRROR_CLAMP_TO_EDGE 0x00000028
-#define NV50TSC_1_0_WRAPT_MIRROR_CLAMP_TO_BORDER 0x00000030
-#define NV50TSC_1_0_WRAPT_MIRROR_CLAMP 0x00000038
-#define NV50TSC_1_0_WRAPR_MASK 0x000001c0
-#define NV50TSC_1_0_WRAPR_REPEAT 0x00000000
-#define NV50TSC_1_0_WRAPR_MIRROR_REPEAT 0x00000040
-#define NV50TSC_1_0_WRAPR_CLAMP_TO_EDGE 0x00000080
-#define NV50TSC_1_0_WRAPR_CLAMP_TO_BORDER 0x000000c0
-#define NV50TSC_1_0_WRAPR_CLAMP 0x00000100
-#define NV50TSC_1_0_WRAPR_MIRROR_CLAMP_TO_EDGE 0x00000140
-#define NV50TSC_1_0_WRAPR_MIRROR_CLAMP_TO_BORDER 0x00000180
-#define NV50TSC_1_0_WRAPR_MIRROR_CLAMP 0x000001c0
-#define NV50TSC_1_0_MAX_ANISOTROPY_MASK 0x00700000
-
-#define NV50TSC_1_1_MAGF_MASK 0x00000003
-#define NV50TSC_1_1_MAGF_NEAREST 0x00000001
-#define NV50TSC_1_1_MAGF_LINEAR 0x00000002
-#define NV50TSC_1_1_MINF_MASK 0x00000030
-#define NV50TSC_1_1_MINF_NEAREST 0x00000010
-#define NV50TSC_1_1_MINF_LINEAR 0x00000020
-#define NV50TSC_1_1_MIPF_MASK 0x000000c0
-#define NV50TSC_1_1_MIPF_NONE 0x00000040
-#define NV50TSC_1_1_MIPF_NEAREST 0x00000080
-#define NV50TSC_1_1_MIPF_LINEAR 0x000000c0
-#define NV50TSC_1_1_LOD_BIAS_MASK 0x01fff000
-#define NV50TSC_1_1_UNKN_ANISO_15 0x10000000
-#define NV50TSC_1_1_UNKN_ANISO_35 0x18000000
-
-#define NV50TSC_1_2_MIN_LOD_MASK 0x00000f00
-#define NV50TSC_1_2_MAX_LOD_MASK 0x00f00000
-
-#define NV50TSC_1_3_UNKNOWN_MASK 0xffffffff
-
-#define NV50TSC_1_4_BORDER_COLOR_RED_MASK 0xffffffff
-
-#define NV50TSC_1_5_BORDER_COLOR_GREEN_MASK 0xffffffff
-
-#define NV50TSC_1_6_BORDER_COLOR_BLUE_MASK 0xffffffff
-
-#define NV50TSC_1_7_BORDER_COLOR_ALPHA_MASK 0xffffffff
-
-#endif
diff --git a/src/gallium/drivers/nv50/nv50_texture.xml.h b/src/gallium/drivers/nv50/nv50_texture.xml.h
new file mode 100644
index 00000000000..e0cbbdf0d7b
--- /dev/null
+++ b/src/gallium/drivers/nv50/nv50_texture.xml.h
@@ -0,0 +1,279 @@
+#ifndef NV50_TEXTURE_XML
+#define NV50_TEXTURE_XML
+
+/* Autogenerated file, DO NOT EDIT manually!
+
+This file was generated by the rules-ng-ng headergen tool in this git repository:
+http://0x04.net/cgit/index.cgi/rules-ng-ng
+git clone git://0x04.net/rules-ng-ng
+
+The rules-ng-ng source files this header was generated from are:
+- nv50_texture.xml ( 8377 bytes, from 2011-02-12 12:05:21)
+- copyright.xml ( 6452 bytes, from 2010-11-25 23:28:20)
+
+Copyright (C) 2006-2011 by the following authors:
+- Artur Huillet <arthur.huillet@free.fr> (ahuillet)
+- Ben Skeggs (darktama, darktama_)
+- B. R. <koala_br@users.sourceforge.net> (koala_br)
+- Carlos Martin <carlosmn@users.sf.net> (carlosmn)
+- Christoph Bumiller <e0425955@student.tuwien.ac.at> (calim, chrisbmr)
+- Dawid Gajownik <gajownik@users.sf.net> (gajownik)
+- Dmitry Baryshkov
+- Dmitry Eremin-Solenikov <lumag@users.sf.net> (lumag)
+- EdB <edb_@users.sf.net> (edb_)
+- Erik Waling <erikwailing@users.sf.net> (erikwaling)
+- Francisco Jerez <currojerez@riseup.net> (curro)
+- imirkin <imirkin@users.sf.net> (imirkin)
+- jb17bsome <jb17bsome@bellsouth.net> (jb17bsome)
+- Jeremy Kolb <kjeremy@users.sf.net> (kjeremy)
+- Laurent Carlier <lordheavym@gmail.com> (lordheavy)
+- Luca Barbieri <luca@luca-barbieri.com> (lb, lb1)
+- Maarten Maathuis <madman2003@gmail.com> (stillunknown)
+- Marcin Kościelnicki <koriakin@0x04.net> (mwk, koriakin)
+- Mark Carey <mark.carey@gmail.com> (careym)
+- Matthieu Castet <matthieu.castet@parrot.com> (mat-c)
+- nvidiaman <nvidiaman@users.sf.net> (nvidiaman)
+- Patrice Mandin <patmandin@gmail.com> (pmandin, pmdata)
+- Pekka Paalanen <pq@iki.fi> (pq, ppaalanen)
+- Peter Popov <ironpeter@users.sf.net> (ironpeter)
+- Richard Hughes <hughsient@users.sf.net> (hughsient)
+- Rudi Cilibrasi <cilibrar@users.sf.net> (cilibrar)
+- Serge Martin
+- Simon Raffeiner
+- Stephane Loeuillet <leroutier@users.sf.net> (leroutier)
+- Stephane Marchesin <stephane.marchesin@gmail.com> (marcheu)
+- sturmflut <sturmflut@users.sf.net> (sturmflut)
+- Sylvain Munaut <tnt@246tNt.com>
+- Victor Stinner <victor.stinner@haypocalc.com> (haypo)
+- Wladmir van der Laan <laanwj@gmail.com> (miathan6)
+- Younes Manton <younes.m@gmail.com> (ymanton)
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice (including the
+next paragraph) shall be included in all copies or substantial
+portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE COPYRIGHT OWNER(S) AND/OR ITS SUPPLIERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+*/
+
+
+#define NV50_TIC_MAP_ZERO 0x00000000
+#define NV50_TIC_MAP_C0 0x00000002
+#define NV50_TIC_MAP_C1 0x00000003
+#define NV50_TIC_MAP_C2 0x00000004
+#define NV50_TIC_MAP_C3 0x00000005
+#define NV50_TIC_MAP_ONE_INT 0x00000006
+#define NV50_TIC_MAP_ONE_FLOAT 0x00000007
+#define NV50_TIC_TYPE_SNORM 0x00000001
+#define NV50_TIC_TYPE_UNORM 0x00000002
+#define NV50_TIC_TYPE_SINT 0x00000003
+#define NV50_TIC_TYPE_UINT 0x00000004
+#define NV50_TIC_TYPE_SSCALED 0x00000005
+#define NV50_TIC_TYPE_USCALED 0x00000006
+#define NV50_TIC_TYPE_FLOAT 0x00000007
+#define NV50_TSC_WRAP_REPEAT 0x00000000
+#define NV50_TSC_WRAP_MIRROR_REPEAT 0x00000001
+#define NV50_TSC_WRAP_CLAMP_TO_EDGE 0x00000002
+#define NV50_TSC_WRAP_CLAMP_TO_BORDER 0x00000003
+#define NV50_TSC_WRAP_CLAMP 0x00000004
+#define NV50_TSC_WRAP_MIRROR_CLAMP_TO_EDGE 0x00000005
+#define NV50_TSC_WRAP_MIRROR_CLAMP_TO_BORDER 0x00000006
+#define NV50_TSC_WRAP_MIRROR_CLAMP 0x00000007
+#define NV50_TIC__SIZE 0x00000020
+#define NV50_TIC_0 0x00000000
+#define NV50_TIC_0_MAPA__MASK 0x38000000
+#define NV50_TIC_0_MAPA__SHIFT 27
+#define NV50_TIC_0_MAPB__MASK 0x07000000
+#define NV50_TIC_0_MAPB__SHIFT 24
+#define NV50_TIC_0_MAPG__MASK 0x00e00000
+#define NV50_TIC_0_MAPG__SHIFT 21
+#define NV50_TIC_0_MAPR__MASK 0x001c0000
+#define NV50_TIC_0_MAPR__SHIFT 18
+#define NV50_TIC_0_TYPE3__MASK 0x00038000
+#define NV50_TIC_0_TYPE3__SHIFT 15
+#define NV50_TIC_0_TYPE2__MASK 0x00007000
+#define NV50_TIC_0_TYPE2__SHIFT 12
+#define NV50_TIC_0_TYPE1__MASK 0x00000e00
+#define NV50_TIC_0_TYPE1__SHIFT 9
+#define NV50_TIC_0_TYPE0__MASK 0x000001c0
+#define NV50_TIC_0_TYPE0__SHIFT 6
+#define NV50_TIC_0_FMT__MASK 0x0000003f
+#define NV50_TIC_0_FMT__SHIFT 0
+#define NV50_TIC_0_FMT_32_32_32_32 0x00000001
+#define NV50_TIC_0_FMT_16_16_16_16 0x00000003
+#define NV50_TIC_0_FMT_32_32 0x00000004
+#define NV50_TIC_0_FMT_32_8 0x00000005
+#define NV50_TIC_0_FMT_8_8_8_8 0x00000008
+#define NV50_TIC_0_FMT_2_10_10_10 0x00000009
+#define NV50_TIC_0_FMT_16_16 0x0000000c
+#define NV50_TIC_0_FMT_8_24 0x0000000d
+#define NV50_TIC_0_FMT_24_8 0x0000000e
+#define NV50_TIC_0_FMT_32 0x0000000f
+#define NV50_TIC_0_FMT_BPTC_FLOAT 0x00000010
+#define NV50_TIC_0_FMT_BPTC_UFLOAT 0x00000011
+#define NV50_TIC_0_FMT_4_4_4_4 0x00000012
+#define NV50_TIC_0_FMT_5_5_5_1 0x00000013
+#define NV50_TIC_0_FMT_1_5_5_5 0x00000014
+#define NV50_TIC_0_FMT_5_6_5 0x00000015
+#define NV50_TIC_0_FMT_6_5_5 0x00000016
+#define NV50_TIC_0_FMT_BPTC 0x00000017
+#define NV50_TIC_0_FMT_8_8 0x00000018
+#define NV50_TIC_0_FMT_16 0x0000001b
+#define NV50_TIC_0_FMT_8 0x0000001d
+#define NV50_TIC_0_FMT_4_4 0x0000001e
+#define NV50_TIC_0_FMT_BITMAP_8X8 0x0000001f
+#define NV50_TIC_0_FMT_E5_9_9_9 0x00000020
+#define NV50_TIC_0_FMT_10_11_11 0x00000021
+#define NV50_TIC_0_FMT_C1_C2_C1_C0 0x00000022
+#define NV50_TIC_0_FMT_C2_C1_C0_C1 0x00000023
+#define NV50_TIC_0_FMT_DXT1 0x00000024
+#define NV50_TIC_0_FMT_DXT3 0x00000025
+#define NV50_TIC_0_FMT_DXT5 0x00000026
+#define NV50_TIC_0_FMT_RGTC1 0x00000027
+#define NV50_TIC_0_FMT_RGTC2 0x00000028
+#define NV50_TIC_0_FMT_Z24S8 0x00000029
+#define NV50_TIC_0_FMT_S8Z24 0x0000002a
+#define NV50_TIC_0_FMT_X8Z24 0x0000002b
+#define NV50_TIC_0_FMT_C8Z24_MS4_CS4 0x0000002c
+#define NV50_TIC_0_FMT_C8Z24_MS8_CS8 0x0000002d
+#define NV50_TIC_0_FMT_C8Z24_MS4_CS12 0x0000002e
+#define NV50_TIC_0_FMT_Z32 0x0000002f
+#define NV50_TIC_0_FMT_X24S8Z32 0x00000030
+#define NV50_TIC_0_FMT_X16C8S8X8Z24_MS4_CS4 0x00000031
+#define NV50_TIC_0_FMT_X16C8S8X8Z24_MS8_CS8 0x00000032
+#define NV50_TIC_0_FMT_X16C8X8Z32_MS4_CS4 0x00000033
+#define NV50_TIC_0_FMT_X16C8X8Z32_MS8_CS8 0x00000034
+#define NV50_TIC_0_FMT_X16C8S8Z32_MS4_CS4 0x00000035
+#define NV50_TIC_0_FMT_X16C8S8Z32_MS8_CS8 0x00000036
+#define NV50_TIC_0_FMT_X16C8S8X8Z24_MS4_CS12 0x00000037
+#define NV50_TIC_0_FMT_X16C8X8Z32_MS4_CS12 0x00000038
+#define NV50_TIC_0_FMT_X16C8S8Z32_MS4_CS12 0x00000039
+#define NV50_TIC_0_FMT_Z16 0x0000003a
+
+#define NV50_TIC_1 0x00000004
+#define NV50_TIC_1_OFFSET_LOW__MASK 0xffffffff
+#define NV50_TIC_1_OFFSET_LOW__SHIFT 0
+
+#define NV50_TIC_2 0x00000008
+#define NV50_TIC_2_OFFSET_HIGH__MASK 0x000000ff
+#define NV50_TIC_2_OFFSET_HIGH__SHIFT 0
+#define NV50_TIC_2_COLORSPACE_SRGB 0x00000400
+#define NV50_TIC_2_TARGET__MASK 0x0003c000
+#define NV50_TIC_2_TARGET__SHIFT 14
+#define NV50_TIC_2_TARGET_1D 0x00000000
+#define NV50_TIC_2_TARGET_2D 0x00004000
+#define NV50_TIC_2_TARGET_3D 0x00008000
+#define NV50_TIC_2_TARGET_CUBE 0x0000c000
+#define NV50_TIC_2_TARGET_1D_ARRAY 0x00010000
+#define NV50_TIC_2_TARGET_2D_ARRAY 0x00014000
+#define NV50_TIC_2_TARGET_BUFFER 0x00018000
+#define NV50_TIC_2_TARGET_RECT 0x0001c000
+#define NV50_TIC_2_TARGET_CUBE_ARRAY 0x00020000
+#define NV50_TIC_2_LINEAR 0x00040000
+#define NV50_TIC_2_TILE_MODE_X__MASK 0x00380000
+#define NV50_TIC_2_TILE_MODE_X__SHIFT 19
+#define NV50_TIC_2_TILE_MODE_Y__MASK 0x01c00000
+#define NV50_TIC_2_TILE_MODE_Y__SHIFT 22
+#define NV50_TIC_2_TILE_MODE_Z__MASK 0x0e000000
+#define NV50_TIC_2_TILE_MODE_Z__SHIFT 25
+#define NV50_TIC_2_2D_UNK0258__MASK 0x30000000
+#define NV50_TIC_2_2D_UNK0258__SHIFT 28
+#define NV50_TIC_2_NO_BORDER 0x40000000
+#define NV50_TIC_2_NORMALIZED_COORDS 0x80000000
+
+#define NV50_TIC_3 0x0000000c
+#define NV50_TIC_3_PITCH__MASK 0xffffffff
+#define NV50_TIC_3_PITCH__SHIFT 0
+
+#define NV50_TIC_4 0x00000010
+#define NV50_TIC_4_WIDTH__MASK 0xffffffff
+#define NV50_TIC_4_WIDTH__SHIFT 0
+
+#define NV50_TIC_5 0x00000014
+#define NV50_TIC_5_LAST_LEVEL__MASK 0xf0000000
+#define NV50_TIC_5_LAST_LEVEL__SHIFT 28
+#define NV50_TIC_5_DEPTH__MASK 0x0fff0000
+#define NV50_TIC_5_DEPTH__SHIFT 16
+#define NV50_TIC_5_HEIGHT__MASK 0x0000ffff
+#define NV50_TIC_5_HEIGHT__SHIFT 0
+
+#define NV50_TIC_7 0x0000001c
+#define NV50_TIC_7_BASE_LEVEL__MASK 0x0000000f
+#define NV50_TIC_7_BASE_LEVEL__SHIFT 0
+#define NV50_TIC_7_MAX_LEVEL__MASK 0x000000f0
+#define NV50_TIC_7_MAX_LEVEL__SHIFT 4
+
+#define NV50_TSC__SIZE 0x00000020
+#define NV50_TSC_0 0x00000000
+#define NV50_TSC_0_WRAPS__MASK 0x00000007
+#define NV50_TSC_0_WRAPS__SHIFT 0
+#define NV50_TSC_0_WRAPT__MASK 0x00000038
+#define NV50_TSC_0_WRAPT__SHIFT 3
+#define NV50_TSC_0_WRAPR__MASK 0x000001c0
+#define NV50_TSC_0_WRAPR__SHIFT 6
+#define NV50_TSC_0_SHADOW_COMPARE_ENABLE 0x00000200
+#define NV50_TSC_0_SHADOW_COMPARE_FUNC__MASK 0x00001c00
+#define NV50_TSC_0_SHADOW_COMPARE_FUNC__SHIFT 10
+#define NV50_TSC_0_BOX_S__MASK 0x0001c000
+#define NV50_TSC_0_BOX_S__SHIFT 14
+#define NV50_TSC_0_BOX_T__MASK 0x000e0000
+#define NV50_TSC_0_BOX_T__SHIFT 17
+#define NV50_TSC_0_ANISOTROPY_MASK__MASK 0x00700000
+#define NV50_TSC_0_ANISOTROPY_MASK__SHIFT 20
+
+#define NV50_TSC_1 0x00000004
+#define NV50_TSC_1_UNKN_ANISO_15 0x10000000
+#define NV50_TSC_1_UNKN_ANISO_35 0x18000000
+#define NV50_TSC_1_MAGF__MASK 0x00000003
+#define NV50_TSC_1_MAGF__SHIFT 0
+#define NV50_TSC_1_MAGF_NEAREST 0x00000001
+#define NV50_TSC_1_MAGF_LINEAR 0x00000002
+#define NV50_TSC_1_MINF__MASK 0x00000030
+#define NV50_TSC_1_MINF__SHIFT 4
+#define NV50_TSC_1_MINF_NEAREST 0x00000010
+#define NV50_TSC_1_MINF_LINEAR 0x00000020
+#define NV50_TSC_1_MIPF__MASK 0x000000c0
+#define NV50_TSC_1_MIPF__SHIFT 6
+#define NV50_TSC_1_MIPF_NONE 0x00000040
+#define NV50_TSC_1_MIPF_NEAREST 0x00000080
+#define NV50_TSC_1_MIPF_LINEAR 0x000000c0
+#define NV50_TSC_1_LOD_BIAS__MASK 0x01fff000
+#define NV50_TSC_1_LOD_BIAS__SHIFT 12
+
+#define NV50_TSC_2 0x00000008
+#define NV50_TSC_2_MIN_LOD__MASK 0x00000fff
+#define NV50_TSC_2_MIN_LOD__SHIFT 0
+#define NV50_TSC_2_MAX_LOD__MASK 0x00fff000
+#define NV50_TSC_2_MAX_LOD__SHIFT 12
+
+#define NV50_TSC_4 0x00000010
+#define NV50_TSC_4_BORDER_COLOR_RED__MASK 0xffffffff
+#define NV50_TSC_4_BORDER_COLOR_RED__SHIFT 0
+
+#define NV50_TSC_5 0x00000014
+#define NV50_TSC_5_BORDER_COLOR_GREEN__MASK 0xffffffff
+#define NV50_TSC_5_BORDER_COLOR_GREEN__SHIFT 0
+
+#define NV50_TSC_6 0x00000018
+#define NV50_TSC_6_BORDER_COLOR_BLUE__MASK 0xffffffff
+#define NV50_TSC_6_BORDER_COLOR_BLUE__SHIFT 0
+
+#define NV50_TSC_7 0x0000001c
+#define NV50_TSC_7_BORDER_COLOR_ALPHA__MASK 0xffffffff
+#define NV50_TSC_7_BORDER_COLOR_ALPHA__SHIFT 0
+
+
+#endif /* NV50_TEXTURE_XML */
diff --git a/src/gallium/drivers/nv50/nv50_tgsi_to_nc.c b/src/gallium/drivers/nv50/nv50_tgsi_to_nc.c
index d6b80c3ea79..1449cb04c69 100644
--- a/src/gallium/drivers/nv50/nv50_tgsi_to_nc.c
+++ b/src/gallium/drivers/nv50/nv50_tgsi_to_nc.c
@@ -476,6 +476,7 @@ bld_loop_end(struct bld_context *bld, struct nv_basic_block *bb)
stk = (struct bld_value_stack *)phi->target;
phi->target = NULL;
+ /* start with s == 1, src[0] is from outside the loop */
for (s = 1, n = 0; n < bb->num_in; ++n) {
if (bb->in_kind[n] != CFG_EDGE_BACK)
continue;
@@ -487,8 +488,11 @@ bld_loop_end(struct bld_context *bld, struct nv_basic_block *bb)
for (i = 0; i < 4; ++i)
if (phi->src[i] && phi->src[i]->value == val)
break;
- if (i == 4)
+ if (i == 4) {
+ /* skip values we do not want to replace */
+ for (; phi->src[s] && phi->src[s]->value != phi->def[0]; ++s);
nv_reference(bld->pc, &phi->src[s++], val);
+ }
}
bld->pc->current_block = save;
@@ -1102,9 +1106,8 @@ emit_fetch(struct bld_context *bld, const struct tgsi_full_instruction *insn,
switch (src->Register.File) {
case TGSI_FILE_CONSTANT:
- dim_idx = src->Dimension.Index ? src->Dimension.Index + 2 : 1;
- assert(dim_idx < 14);
- assert(dim_idx == 1); /* for now */
+ dim_idx = src->Dimension.Index;
+ assert(dim_idx < 15);
res = new_value(bld->pc, NV_FILE_MEM_C(dim_idx), type);
SET_TYPE(res, type);
@@ -1130,7 +1133,7 @@ emit_fetch(struct bld_context *bld, const struct tgsi_full_instruction *insn,
case TGSI_FILE_INPUT:
res = bld_saved_input(bld, idx, swz);
if (res && (insn->Instruction.Opcode != TGSI_OPCODE_TXP))
- return res;
+ break;
res = new_value(bld->pc, bld->ti->input_file, type);
res->reg.id = bld->ti->input_map[idx][swz];
@@ -1156,6 +1159,13 @@ emit_fetch(struct bld_context *bld, const struct tgsi_full_instruction *insn,
case TGSI_FILE_PREDICATE:
res = bld_fetch_global(bld, &bld->pvs[idx][swz]);
break;
+ case TGSI_FILE_SYSTEM_VALUE:
+ res = new_value(bld->pc, bld->ti->input_file, NV_TYPE_U32);
+ res->reg.id = bld->ti->sysval_map[idx];
+ res = bld_insn_1(bld, NV_OP_LDA, res);
+ res = bld_insn_1(bld, NV_OP_CVT, res);
+ res->reg.type = NV_TYPE_F32;
+ break;
default:
NOUVEAU_ERR("illegal/unhandled src reg file: %d\n", src->Register.File);
abort();
@@ -1468,7 +1478,7 @@ bld_tex(struct bld_context *bld, struct nv_value *dst0[4],
uint opcode = translate_opcode(insn->Instruction.Opcode);
int arg, dim, c;
const int tic = insn->Src[1].Register.Index;
- const int tsc = 0;
+ const int tsc = tic;
const int cube = (insn->Texture.Texture == TGSI_TEXTURE_CUBE) ? 1 : 0;
get_tex_dim(insn, &dim, &arg);
@@ -1717,6 +1727,10 @@ bld_instruction(struct bld_context *bld,
{
struct nv_basic_block *b = new_basic_block(bld->pc);
+ if (bld->pc->current_block->exit &&
+ !bld->pc->current_block->exit->is_terminator)
+ bld_flow(bld, NV_OP_BRA, NV_CC_TR, NULL, b, FALSE);
+
--bld->cond_lvl;
nvbb_attach_block(bld->pc->current_block, b, bld->out_kind);
nvbb_attach_block(bld->cond_bb[bld->cond_lvl], b, CFG_EDGE_FORWARD);
@@ -1923,6 +1937,7 @@ bld_instruction(struct bld_context *bld,
dst0[c] = bld_insn_2(bld, NV_OP_XOR, temp, temp);
dst0[c]->insn->cc = NV_CC_EQ;
nv_reference(bld->pc, &dst0[c]->insn->flags_src, src1);
+ dst0[c] = bld_insn_2(bld, NV_OP_SELECT, dst0[c], temp);
}
break;
case TGSI_OPCODE_SUB:
diff --git a/src/gallium/drivers/nv50/nv50_transfer.c b/src/gallium/drivers/nv50/nv50_transfer.c
index bf5af4ddc65..74869774595 100644
--- a/src/gallium/drivers/nv50/nv50_transfer.c
+++ b/src/gallium/drivers/nv50/nv50_transfer.c
@@ -1,351 +1,347 @@
-#include "pipe/p_context.h"
-#include "util/u_inlines.h"
#include "util/u_format.h"
-#include "util/u_math.h"
#include "nv50_context.h"
#include "nv50_transfer.h"
-#include "nv50_resource.h"
+
+#include "nv50_defs.xml.h"
struct nv50_transfer {
- struct pipe_transfer base;
- struct nouveau_bo *bo;
- int map_refcnt;
- unsigned level_offset;
- unsigned level_tiling;
- int level_pitch;
- int level_width;
- int level_height;
- int level_depth;
- int level_x;
- int level_y;
- int level_z;
- unsigned nblocksx;
- unsigned nblocksy;
+ struct pipe_transfer base;
+ struct nv50_m2mf_rect rect[2];
+ uint32_t nblocksx;
+ uint32_t nblocksy;
};
static void
-nv50_transfer_rect_m2mf(struct pipe_screen *pscreen,
- struct nouveau_bo *src_bo, unsigned src_offset,
- int src_pitch, unsigned src_tile_mode,
- int sx, int sy, int sz, int sw, int sh, int sd,
- struct nouveau_bo *dst_bo, unsigned dst_offset,
- int dst_pitch, unsigned dst_tile_mode,
- int dx, int dy, int dz, int dw, int dh, int dd,
- int cpp, int width, int height,
- unsigned src_reloc, unsigned dst_reloc)
+nv50_m2mf_transfer_rect(struct pipe_screen *pscreen,
+ const struct nv50_m2mf_rect *dst,
+ const struct nv50_m2mf_rect *src,
+ uint32_t nblocksx, uint32_t nblocksy)
{
- struct nv50_screen *screen = nv50_screen(pscreen);
- struct nouveau_channel *chan = screen->m2mf->channel;
- struct nouveau_grobj *m2mf = screen->m2mf;
-
- src_reloc |= NOUVEAU_BO_RD;
- dst_reloc |= NOUVEAU_BO_WR;
-
- WAIT_RING (chan, 14);
-
- if (!nouveau_bo_tile_layout(src_bo)) {
- BEGIN_RING(chan, m2mf,
- NV50_MEMORY_TO_MEMORY_FORMAT_LINEAR_IN, 1);
- OUT_RING (chan, 1);
- BEGIN_RING(chan, m2mf,
- NV04_MEMORY_TO_MEMORY_FORMAT_PITCH_IN, 1);
- OUT_RING (chan, src_pitch);
- src_offset += (sy * src_pitch) + (sx * cpp);
- } else {
- BEGIN_RING(chan, m2mf,
- NV50_MEMORY_TO_MEMORY_FORMAT_LINEAR_IN, 6);
- OUT_RING (chan, 0);
- OUT_RING (chan, src_tile_mode << 4);
- OUT_RING (chan, sw * cpp);
- OUT_RING (chan, sh);
- OUT_RING (chan, sd);
- OUT_RING (chan, sz); /* copying only 1 zslice per call */
- }
-
- if (!nouveau_bo_tile_layout(dst_bo)) {
- BEGIN_RING(chan, m2mf,
- NV50_MEMORY_TO_MEMORY_FORMAT_LINEAR_OUT, 1);
- OUT_RING (chan, 1);
- BEGIN_RING(chan, m2mf,
- NV04_MEMORY_TO_MEMORY_FORMAT_PITCH_OUT, 1);
- OUT_RING (chan, dst_pitch);
- dst_offset += (dy * dst_pitch) + (dx * cpp);
- } else {
- BEGIN_RING(chan, m2mf,
- NV50_MEMORY_TO_MEMORY_FORMAT_LINEAR_OUT, 6);
- OUT_RING (chan, 0);
- OUT_RING (chan, dst_tile_mode << 4);
- OUT_RING (chan, dw * cpp);
- OUT_RING (chan, dh);
- OUT_RING (chan, dd);
- OUT_RING (chan, dz); /* copying only 1 zslice per call */
- }
-
- while (height) {
- int line_count = height > 2047 ? 2047 : height;
-
- MARK_RING (chan, 15, 4); /* flush on lack of space or relocs */
- BEGIN_RING(chan, m2mf,
- NV50_MEMORY_TO_MEMORY_FORMAT_OFFSET_IN_HIGH, 2);
- OUT_RELOCh(chan, src_bo, src_offset, src_reloc);
- OUT_RELOCh(chan, dst_bo, dst_offset, dst_reloc);
- BEGIN_RING(chan, m2mf,
- NV04_MEMORY_TO_MEMORY_FORMAT_OFFSET_IN, 2);
- OUT_RELOCl(chan, src_bo, src_offset, src_reloc);
- OUT_RELOCl(chan, dst_bo, dst_offset, dst_reloc);
- if (nouveau_bo_tile_layout(src_bo)) {
- BEGIN_RING(chan, m2mf,
- NV50_MEMORY_TO_MEMORY_FORMAT_TILING_POSITION_IN, 1);
- OUT_RING (chan, (sy << 16) | (sx * cpp));
- } else {
- src_offset += (line_count * src_pitch);
- }
- if (nouveau_bo_tile_layout(dst_bo)) {
- BEGIN_RING(chan, m2mf,
- NV50_MEMORY_TO_MEMORY_FORMAT_TILING_POSITION_OUT, 1);
- OUT_RING (chan, (dy << 16) | (dx * cpp));
- } else {
- dst_offset += (line_count * dst_pitch);
- }
- BEGIN_RING(chan, m2mf,
- NV04_MEMORY_TO_MEMORY_FORMAT_LINE_LENGTH_IN, 4);
- OUT_RING (chan, width * cpp);
- OUT_RING (chan, line_count);
- OUT_RING (chan, 0x00000101);
- OUT_RING (chan, 0);
- FIRE_RING (chan);
-
- height -= line_count;
- sy += line_count;
- dy += line_count;
- }
+ struct nouveau_channel *chan = nouveau_screen(pscreen)->channel;
+ const int cpp = dst->cpp;
+ uint32_t src_ofst = src->base;
+ uint32_t dst_ofst = dst->base;
+ uint32_t height = nblocksy;
+ uint32_t sy = src->y;
+ uint32_t dy = dst->y;
+
+ assert(dst->cpp == src->cpp);
+
+ if (nouveau_bo_tile_layout(src->bo)) {
+ BEGIN_RING(chan, RING_MF(LINEAR_IN), 6);
+ OUT_RING (chan, 0);
+ OUT_RING (chan, src->tile_mode << 4);
+ OUT_RING (chan, src->width * cpp);
+ OUT_RING (chan, src->height);
+ OUT_RING (chan, src->depth);
+ OUT_RING (chan, src->z);
+ } else {
+ src_ofst += src->y * src->pitch + src->x * cpp;
+
+ BEGIN_RING(chan, RING_MF(LINEAR_IN), 1);
+ OUT_RING (chan, 1);
+ BEGIN_RING(chan, RING_MF_(NV04_M2MF_PITCH_IN), 1);
+ OUT_RING (chan, src->pitch);
+ }
+
+ if (nouveau_bo_tile_layout(dst->bo)) {
+ BEGIN_RING(chan, RING_MF(LINEAR_OUT), 6);
+ OUT_RING (chan, 0);
+ OUT_RING (chan, dst->tile_mode << 4);
+ OUT_RING (chan, dst->width * cpp);
+ OUT_RING (chan, dst->height);
+ OUT_RING (chan, dst->depth);
+ OUT_RING (chan, dst->z);
+ } else {
+ dst_ofst += dst->y * dst->pitch + dst->x * cpp;
+
+ BEGIN_RING(chan, RING_MF(LINEAR_OUT), 1);
+ OUT_RING (chan, 1);
+ BEGIN_RING(chan, RING_MF_(NV04_M2MF_PITCH_OUT), 1);
+ OUT_RING (chan, dst->pitch);
+ }
+
+ while (height) {
+ int line_count = height > 2047 ? 2047 : height;
+
+ MARK_RING (chan, 17, 4);
+
+ BEGIN_RING(chan, RING_MF(OFFSET_IN_HIGH), 2);
+ OUT_RELOCh(chan, src->bo, src_ofst, src->domain | NOUVEAU_BO_RD);
+ OUT_RELOCh(chan, dst->bo, dst_ofst, dst->domain | NOUVEAU_BO_WR);
+
+ BEGIN_RING(chan, RING_MF_(NV04_M2MF_OFFSET_IN), 2);
+ OUT_RELOCl(chan, src->bo, src_ofst, src->domain | NOUVEAU_BO_RD);
+ OUT_RELOCl(chan, dst->bo, dst_ofst, dst->domain | NOUVEAU_BO_WR);
+
+ if (nouveau_bo_tile_layout(src->bo)) {
+ BEGIN_RING(chan, RING_MF(TILING_POSITION_IN), 1);
+ OUT_RING (chan, (sy << 16) | (src->x * cpp));
+ } else {
+ src_ofst += line_count * src->pitch;
+ }
+ if (nouveau_bo_tile_layout(dst->bo)) {
+ BEGIN_RING(chan, RING_MF(TILING_POSITION_OUT), 1);
+ OUT_RING (chan, (dy << 16) | (dst->x * cpp));
+ } else {
+ dst_ofst += line_count * dst->pitch;
+ }
+
+ BEGIN_RING(chan, RING_MF_(NV04_M2MF_LINE_LENGTH_IN), 4);
+ OUT_RING (chan, nblocksx * cpp);
+ OUT_RING (chan, line_count);
+ OUT_RING (chan, (1 << 8) | (1 << 0));
+ OUT_RING (chan, 0);
+
+ height -= line_count;
+ sy += line_count;
+ dy += line_count;
+ }
}
-struct pipe_transfer *
-nv50_miptree_transfer_new(struct pipe_context *pcontext,
- struct pipe_resource *pt,
- unsigned level,
- unsigned usage,
- const struct pipe_box *box)
+void
+nv50_sifc_linear_u8(struct nouveau_context *nv,
+ struct nouveau_bo *dst, unsigned offset, unsigned domain,
+ unsigned size, void *data)
{
- struct pipe_screen *pscreen = pcontext->screen;
- struct nouveau_device *dev = nouveau_screen(pscreen)->device;
- struct nv50_miptree *mt = nv50_miptree(pt);
- struct nv50_miptree_level *lvl = &mt->level[level];
- struct nv50_transfer *tx;
- unsigned nx, ny, image = 0, boxz = 0;
- int ret;
-
- /* XXX can't unify these here? */
- if (pt->target == PIPE_TEXTURE_CUBE)
- image = box->z;
- else if (pt->target == PIPE_TEXTURE_3D)
- boxz = box->z;
-
- tx = CALLOC_STRUCT(nv50_transfer);
- if (!tx)
- return NULL;
-
- /* Don't handle 3D transfers yet.
- */
- assert(box->depth == 1);
-
-
- pipe_resource_reference(&tx->base.resource, pt);
- tx->base.level = level;
- tx->base.usage = usage;
- tx->base.box = *box;
- tx->nblocksx = util_format_get_nblocksx(pt->format, u_minify(pt->width0, level));
- tx->nblocksy = util_format_get_nblocksy(pt->format, u_minify(pt->height0, level));
- tx->base.stride = tx->nblocksx * util_format_get_blocksize(pt->format);
- tx->base.usage = usage;
-
- tx->level_pitch = lvl->pitch;
- tx->level_width = u_minify(mt->base.base.width0, level);
- tx->level_height = u_minify(mt->base.base.height0, level);
- tx->level_depth = u_minify(mt->base.base.depth0, level);
- tx->level_offset = lvl->image_offset[image];
- tx->level_tiling = lvl->tile_mode;
- tx->level_z = boxz;
- tx->level_x = util_format_get_nblocksx(pt->format, box->x);
- tx->level_y = util_format_get_nblocksy(pt->format, box->y);
- ret = nouveau_bo_new(dev, NOUVEAU_BO_GART | NOUVEAU_BO_MAP, 0,
- tx->nblocksy * tx->base.stride, &tx->bo);
- if (ret) {
- FREE(tx);
- return NULL;
- }
-
- if (usage & PIPE_TRANSFER_READ) {
- nx = util_format_get_nblocksx(pt->format, box->width);
- ny = util_format_get_nblocksy(pt->format, box->height);
-
- nv50_transfer_rect_m2mf(pscreen, mt->base.bo, tx->level_offset,
- tx->level_pitch, tx->level_tiling,
- box->x, box->y, boxz,
- tx->nblocksx, tx->nblocksy,
- tx->level_depth,
- tx->bo, 0,
- tx->base.stride, tx->bo->tile_mode,
- 0, 0, 0,
- tx->nblocksx, tx->nblocksy, 1,
- util_format_get_blocksize(pt->format), nx, ny,
- NOUVEAU_BO_VRAM | NOUVEAU_BO_GART,
- NOUVEAU_BO_GART);
- }
-
- return &tx->base;
+ struct nouveau_channel *chan = nv->screen->channel;
+ uint32_t *src = (uint32_t *)data;
+ unsigned count = (size + 3) / 4;
+ unsigned xcoord = offset & 0xff;
+
+ offset &= ~0xff;
+
+ MARK_RING (chan, 23, 4);
+ BEGIN_RING(chan, RING_2D(DST_FORMAT), 2);
+ OUT_RING (chan, NV50_SURFACE_FORMAT_R8_UNORM);
+ OUT_RING (chan, 1);
+ BEGIN_RING(chan, RING_2D(DST_PITCH), 5);
+ OUT_RING (chan, 262144);
+ OUT_RING (chan, 65536);
+ OUT_RING (chan, 1);
+ OUT_RELOCh(chan, dst, offset, domain | NOUVEAU_BO_WR);
+ OUT_RELOCl(chan, dst, offset, domain | NOUVEAU_BO_WR);
+ BEGIN_RING(chan, RING_2D(SIFC_BITMAP_ENABLE), 2);
+ OUT_RING (chan, 0);
+ OUT_RING (chan, NV50_SURFACE_FORMAT_R8_UNORM);
+ BEGIN_RING(chan, RING_2D(SIFC_WIDTH), 10);
+ OUT_RING (chan, size);
+ OUT_RING (chan, 1);
+ OUT_RING (chan, 0);
+ OUT_RING (chan, 1);
+ OUT_RING (chan, 0);
+ OUT_RING (chan, 1);
+ OUT_RING (chan, 0);
+ OUT_RING (chan, xcoord);
+ OUT_RING (chan, 0);
+ OUT_RING (chan, 0);
+
+ while (count) {
+ unsigned nr = AVAIL_RING(chan);
+
+ if (nr < 9) {
+ FIRE_RING(chan);
+ nouveau_bo_validate(chan, dst, NOUVEAU_BO_WR);
+ continue;
+ }
+ nr = MIN2(count, nr - 1);
+ nr = MIN2(nr, NV04_PFIFO_MAX_PACKET_LEN);
+
+ BEGIN_RING_NI(chan, RING_2D(SIFC_DATA), nr);
+ OUT_RINGp (chan, src, nr);
+
+ src += nr;
+ count -= nr;
+ }
}
void
-nv50_miptree_transfer_del(struct pipe_context *pcontext,
- struct pipe_transfer *ptx)
+nv50_m2mf_copy_linear(struct nouveau_context *nv,
+ struct nouveau_bo *dst, unsigned dstoff, unsigned dstdom,
+ struct nouveau_bo *src, unsigned srcoff, unsigned srcdom,
+ unsigned size)
{
- struct nv50_transfer *tx = (struct nv50_transfer *)ptx;
- struct nv50_miptree *mt = nv50_miptree(ptx->resource);
- struct pipe_resource *pt = ptx->resource;
-
- unsigned nx = util_format_get_nblocksx(pt->format, tx->base.box.width);
- unsigned ny = util_format_get_nblocksy(pt->format, tx->base.box.height);
-
- if (ptx->usage & PIPE_TRANSFER_WRITE) {
- struct pipe_screen *pscreen = pcontext->screen;
-
- nv50_transfer_rect_m2mf(pscreen, tx->bo, 0,
- tx->base.stride, tx->bo->tile_mode,
- 0, 0, 0,
- tx->nblocksx, tx->nblocksy, 1,
- mt->base.bo, tx->level_offset,
- tx->level_pitch, tx->level_tiling,
- tx->level_x, tx->level_y, tx->level_z,
- tx->nblocksx, tx->nblocksy,
- tx->level_depth,
- util_format_get_blocksize(pt->format), nx, ny,
- NOUVEAU_BO_GART, NOUVEAU_BO_VRAM |
- NOUVEAU_BO_GART);
- }
-
- nouveau_bo_ref(NULL, &tx->bo);
- pipe_resource_reference(&ptx->resource, NULL);
- FREE(ptx);
+ struct nouveau_channel *chan = nv->screen->channel;
+
+ BEGIN_RING(chan, RING_MF(LINEAR_IN), 1);
+ OUT_RING (chan, 1);
+ BEGIN_RING(chan, RING_MF(LINEAR_OUT), 1);
+ OUT_RING (chan, 1);
+
+ while (size) {
+ unsigned bytes = MIN2(size, 1 << 17);
+
+ MARK_RING (chan, 11, 4);
+ BEGIN_RING(chan, RING_MF(OFFSET_IN_HIGH), 2);
+ OUT_RELOCh(chan, src, srcoff, srcdom | NOUVEAU_BO_RD);
+ OUT_RELOCh(chan, dst, dstoff, dstdom | NOUVEAU_BO_WR);
+ BEGIN_RING(chan, RING_MF_(NV04_M2MF_OFFSET_IN), 2);
+ OUT_RELOCl(chan, src, srcoff, srcdom | NOUVEAU_BO_RD);
+ OUT_RELOCl(chan, dst, dstoff, dstdom | NOUVEAU_BO_WR);
+ BEGIN_RING(chan, RING_MF_(NV04_M2MF_LINE_LENGTH_IN), 4);
+ OUT_RING (chan, bytes);
+ OUT_RING (chan, 1);
+ OUT_RING (chan, (1 << 8) | (1 << 0));
+ OUT_RING (chan, 0);
+
+ srcoff += bytes;
+ dstoff += bytes;
+ size -= bytes;
+ }
}
-void *
-nv50_miptree_transfer_map(struct pipe_context *pcontext,
- struct pipe_transfer *ptx)
+struct pipe_transfer *
+nv50_miptree_transfer_new(struct pipe_context *pctx,
+ struct pipe_resource *res,
+ unsigned level,
+ unsigned usage,
+ const struct pipe_box *box)
{
- struct nv50_transfer *tx = (struct nv50_transfer *)ptx;
- unsigned flags = 0;
- int ret;
-
- if (tx->map_refcnt++)
- return tx->bo->map;
-
- if (ptx->usage & PIPE_TRANSFER_WRITE)
- flags |= NOUVEAU_BO_WR;
- if (ptx->usage & PIPE_TRANSFER_READ)
- flags |= NOUVEAU_BO_RD;
-
- ret = nouveau_bo_map(tx->bo, flags);
- if (ret) {
- tx->map_refcnt = 0;
- return NULL;
- }
- return tx->bo->map;
+ struct nv50_context *nv50 = nv50_context(pctx);
+ struct pipe_screen *pscreen = pctx->screen;
+ struct nouveau_device *dev = nv50->screen->base.device;
+ struct nv50_miptree *mt = nv50_miptree(res);
+ struct nv50_miptree_level *lvl = &mt->level[level];
+ struct nv50_transfer *tx;
+ uint32_t size;
+ uint32_t w, h, d, z, layer;
+ int ret;
+
+ if (mt->layout_3d) {
+ z = box->z;
+ d = u_minify(res->depth0, level);
+ layer = 0;
+ } else {
+ z = 0;
+ d = 1;
+ layer = box->z;
+ }
+
+ tx = CALLOC_STRUCT(nv50_transfer);
+ if (!tx)
+ return NULL;
+
+ pipe_resource_reference(&tx->base.resource, res);
+
+ tx->base.level = level;
+ tx->base.usage = usage;
+ tx->base.box = *box;
+
+ tx->nblocksx = util_format_get_nblocksx(res->format, box->width);
+ tx->nblocksy = util_format_get_nblocksy(res->format, box->height);
+
+ tx->base.stride = tx->nblocksx * util_format_get_blocksize(res->format);
+ tx->base.layer_stride = tx->nblocksy * tx->base.stride;
+
+ w = u_minify(res->width0, level);
+ h = u_minify(res->height0, level);
+
+ tx->rect[0].cpp = tx->rect[1].cpp = util_format_get_blocksize(res->format);
+
+ tx->rect[0].bo = mt->base.bo;
+ tx->rect[0].base = lvl->offset + layer * mt->layer_stride;
+ tx->rect[0].tile_mode = lvl->tile_mode;
+ tx->rect[0].x = util_format_get_nblocksx(res->format, box->x);
+ tx->rect[0].y = util_format_get_nblocksy(res->format, box->y);
+ tx->rect[0].z = z;
+ tx->rect[0].width = util_format_get_nblocksx(res->format, w);
+ tx->rect[0].height = util_format_get_nblocksy(res->format, h);
+ tx->rect[0].depth = d;
+ tx->rect[0].pitch = lvl->pitch;
+ tx->rect[0].domain = NOUVEAU_BO_VRAM;
+
+ size = tx->base.layer_stride;
+
+ ret = nouveau_bo_new(dev, NOUVEAU_BO_GART | NOUVEAU_BO_MAP, 0,
+ size * tx->base.box.depth, &tx->rect[1].bo);
+ if (ret) {
+ FREE(tx);
+ return NULL;
+ }
+
+ tx->rect[1].width = tx->nblocksx;
+ tx->rect[1].height = tx->nblocksy;
+ tx->rect[1].depth = 1;
+ tx->rect[1].pitch = tx->base.stride;
+ tx->rect[1].domain = NOUVEAU_BO_GART;
+
+ if (usage & PIPE_TRANSFER_READ) {
+ unsigned base = tx->rect[0].base;
+ unsigned i;
+ for (i = 0; i < box->depth; ++i) {
+ nv50_m2mf_transfer_rect(pscreen, &tx->rect[1], &tx->rect[0],
+ tx->nblocksx, tx->nblocksy);
+ if (mt->layout_3d)
+ tx->rect[0].z++;
+ else
+ tx->rect[0].base += mt->layer_stride;
+ tx->rect[1].base += size;
+ }
+ tx->rect[0].z = z;
+ tx->rect[0].base = base;
+ tx->rect[1].base = 0;
+ }
+
+ return &tx->base;
}
void
-nv50_miptree_transfer_unmap(struct pipe_context *pcontext,
- struct pipe_transfer *ptx)
+nv50_miptree_transfer_del(struct pipe_context *pctx,
+ struct pipe_transfer *transfer)
{
- struct nv50_transfer *tx = (struct nv50_transfer *)ptx;
-
- if (--tx->map_refcnt)
- return;
- nouveau_bo_unmap(tx->bo);
+ struct pipe_screen *pscreen = pctx->screen;
+ struct nv50_transfer *tx = (struct nv50_transfer *)transfer;
+ struct nv50_miptree *mt = nv50_miptree(tx->base.resource);
+ unsigned i;
+
+ if (tx->base.usage & PIPE_TRANSFER_WRITE) {
+ for (i = 0; i < tx->base.box.depth; ++i) {
+ nv50_m2mf_transfer_rect(pscreen, &tx->rect[0], &tx->rect[1],
+ tx->nblocksx, tx->nblocksy);
+ if (mt->layout_3d)
+ tx->rect[0].z++;
+ else
+ tx->rect[0].base += mt->layer_stride;
+ tx->rect[1].base += tx->nblocksy * tx->base.stride;
+ }
+ }
+
+ nouveau_bo_ref(NULL, &tx->rect[1].bo);
+ pipe_resource_reference(&transfer->resource, NULL);
+
+ FREE(tx);
}
+void *
+nv50_miptree_transfer_map(struct pipe_context *pctx,
+ struct pipe_transfer *transfer)
+{
+ struct nv50_transfer *tx = (struct nv50_transfer *)transfer;
+ int ret;
+ unsigned flags = 0;
+
+ if (tx->rect[1].bo->map)
+ return tx->rect[1].bo->map;
+
+ if (transfer->usage & PIPE_TRANSFER_READ)
+ flags = NOUVEAU_BO_RD;
+ if (transfer->usage & PIPE_TRANSFER_WRITE)
+ flags |= NOUVEAU_BO_WR;
+
+ ret = nouveau_bo_map(tx->rect[1].bo, flags);
+ if (ret)
+ return NULL;
+ return tx->rect[1].bo->map;
+}
void
-nv50_upload_sifc(struct nv50_context *nv50,
- struct nouveau_bo *bo, unsigned dst_offset, unsigned reloc,
- unsigned dst_format, int dst_w, int dst_h, int dst_pitch,
- void *src, unsigned src_format, int src_pitch,
- int x, int y, int w, int h, int cpp)
+nv50_miptree_transfer_unmap(struct pipe_context *pctx,
+ struct pipe_transfer *transfer)
{
- struct nouveau_channel *chan = nv50->screen->base.channel;
- struct nouveau_grobj *eng2d = nv50->screen->eng2d;
- unsigned line_dwords = (w * cpp + 3) / 4;
-
- reloc |= NOUVEAU_BO_WR;
-
- MARK_RING (chan, 32, 2); /* flush on lack of space or relocs */
-
- if (nouveau_bo_tile_layout(bo)) {
- BEGIN_RING(chan, eng2d, NV50_2D_DST_FORMAT, 5);
- OUT_RING (chan, dst_format);
- OUT_RING (chan, 0);
- OUT_RING (chan, bo->tile_mode << 4);
- OUT_RING (chan, 1);
- OUT_RING (chan, 0);
- } else {
- BEGIN_RING(chan, eng2d, NV50_2D_DST_FORMAT, 2);
- OUT_RING (chan, dst_format);
- OUT_RING (chan, 1);
- BEGIN_RING(chan, eng2d, NV50_2D_DST_PITCH, 1);
- OUT_RING (chan, dst_pitch);
- }
-
- BEGIN_RING(chan, eng2d, NV50_2D_DST_WIDTH, 4);
- OUT_RING (chan, dst_w);
- OUT_RING (chan, dst_h);
- OUT_RELOCh(chan, bo, dst_offset, reloc);
- OUT_RELOCl(chan, bo, dst_offset, reloc);
-
- /* NV50_2D_OPERATION_SRCCOPY assumed already set */
-
- BEGIN_RING(chan, eng2d, NV50_2D_SIFC_BITMAP_ENABLE, 2);
- OUT_RING (chan, 0);
- OUT_RING (chan, src_format);
- BEGIN_RING(chan, eng2d, NV50_2D_SIFC_WIDTH, 10);
- OUT_RING (chan, w);
- OUT_RING (chan, h);
- OUT_RING (chan, 0);
- OUT_RING (chan, 1);
- OUT_RING (chan, 0);
- OUT_RING (chan, 1);
- OUT_RING (chan, 0);
- OUT_RING (chan, x);
- OUT_RING (chan, 0);
- OUT_RING (chan, y);
-
- while (h--) {
- const uint32_t *p = src;
- unsigned count = line_dwords;
-
- while (count) {
- unsigned nr = MIN2(count, 1792);
-
- if (AVAIL_RING(chan) <= nr) {
- FIRE_RING (chan);
-
- BEGIN_RING(chan, eng2d,
- NV50_2D_DST_ADDRESS_HIGH, 2);
- OUT_RELOCh(chan, bo, dst_offset, reloc);
- OUT_RELOCl(chan, bo, dst_offset, reloc);
- }
- assert(AVAIL_RING(chan) > nr);
-
- BEGIN_RING(chan, eng2d,
- NV50_2D_SIFC_DATA | (2 << 29), nr);
- OUT_RINGp (chan, p, nr);
-
- p += nr;
- count -= nr;
- }
-
- src = (uint8_t *) src + src_pitch;
- }
+ struct nv50_transfer *tx = (struct nv50_transfer *)transfer;
+
+ nouveau_bo_unmap(tx->rect[1].bo);
}
+
diff --git a/src/gallium/drivers/nv50/nv50_transfer.h b/src/gallium/drivers/nv50/nv50_transfer.h
index 6699bf546ea..d3259ef4a5d 100644
--- a/src/gallium/drivers/nv50/nv50_transfer.h
+++ b/src/gallium/drivers/nv50/nv50_transfer.h
@@ -1,31 +1,38 @@
-#ifndef NV50_TRANSFER_H
-#define NV50_TRANSFER_H
+#ifndef __NV50_TRANSFER_H__
+#define __NV50_TRANSFER_H__
#include "pipe/p_state.h"
-
struct pipe_transfer *
nv50_miptree_transfer_new(struct pipe_context *pcontext,
- struct pipe_resource *pt,
- unsigned level,
- unsigned usage,
- const struct pipe_box *box);
+ struct pipe_resource *pt,
+ unsigned level,
+ unsigned usage,
+ const struct pipe_box *box);
void
nv50_miptree_transfer_del(struct pipe_context *pcontext,
- struct pipe_transfer *ptx);
+ struct pipe_transfer *ptx);
void *
nv50_miptree_transfer_map(struct pipe_context *pcontext,
- struct pipe_transfer *ptx);
+ struct pipe_transfer *ptx);
void
nv50_miptree_transfer_unmap(struct pipe_context *pcontext,
- struct pipe_transfer *ptx);
+ struct pipe_transfer *ptx);
-extern void
-nv50_upload_sifc(struct nv50_context *nv50,
- struct nouveau_bo *bo, unsigned dst_offset, unsigned reloc,
- unsigned dst_format, int dst_w, int dst_h, int dst_pitch,
- void *src, unsigned src_format, int src_pitch,
- int x, int y, int w, int h, int cpp);
+struct nv50_m2mf_rect {
+ struct nouveau_bo *bo;
+ uint32_t base;
+ unsigned domain;
+ uint32_t pitch;
+ uint32_t width;
+ uint32_t x;
+ uint32_t height;
+ uint32_t y;
+ uint16_t depth;
+ uint16_t z;
+ uint16_t tile_mode;
+ uint16_t cpp;
+};
#endif
diff --git a/src/gallium/drivers/nv50/nv50_vbo.c b/src/gallium/drivers/nv50/nv50_vbo.c
index d41a59d05db..abdb9ce2f93 100644
--- a/src/gallium/drivers/nv50/nv50_vbo.c
+++ b/src/gallium/drivers/nv50/nv50_vbo.c
@@ -1,5 +1,5 @@
/*
- * Copyright 2008 Ben Skeggs
+ * Copyright 2010 Christoph Bumiller
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@@ -24,540 +24,694 @@
#include "pipe/p_state.h"
#include "util/u_inlines.h"
#include "util/u_format.h"
-#include "util/u_split_prim.h"
+#include "translate/translate.h"
#include "nv50_context.h"
#include "nv50_resource.h"
-struct instance {
- struct nouveau_bo *bo;
- unsigned delta;
- unsigned stride;
- unsigned step;
- unsigned divisor;
-};
+#include "nv50_3d.xml.h"
-static void
-instance_init(struct nv50_context *nv50, struct instance *a, unsigned first)
+void
+nv50_vertex_state_delete(struct pipe_context *pipe,
+ void *hwcso)
{
- int i;
-
- for (i = 0; i < nv50->vtxelt->num_elements; i++) {
- struct pipe_vertex_element *ve = &nv50->vtxelt->pipe[i];
- struct pipe_vertex_buffer *vb;
-
- a[i].divisor = ve->instance_divisor;
- if (a[i].divisor) {
- vb = &nv50->vtxbuf[ve->vertex_buffer_index];
-
- a[i].bo = nv50_resource(vb->buffer)->bo;
- a[i].stride = vb->stride;
- a[i].step = first % a[i].divisor;
- a[i].delta = vb->buffer_offset + ve->src_offset +
- (first * a[i].stride);
- }
- }
+ struct nv50_vertex_stateobj *so = hwcso;
+
+ if (so->translate)
+ so->translate->release(so->translate);
+ FREE(hwcso);
}
-static void
-instance_step(struct nv50_context *nv50, struct instance *a)
+void *
+nv50_vertex_state_create(struct pipe_context *pipe,
+ unsigned num_elements,
+ const struct pipe_vertex_element *elements)
{
- struct nouveau_channel *chan = nv50->screen->tesla->channel;
- struct nouveau_grobj *tesla = nv50->screen->tesla;
- int i;
-
- for (i = 0; i < nv50->vtxelt->num_elements; i++) {
- if (!a[i].divisor)
- continue;
-
- BEGIN_RING(chan, tesla,
- NV50TCL_VERTEX_ARRAY_START_HIGH(i), 2);
- OUT_RELOCh(chan, a[i].bo, a[i].delta, NOUVEAU_BO_RD |
- NOUVEAU_BO_VRAM | NOUVEAU_BO_GART);
- OUT_RELOCl(chan, a[i].bo, a[i].delta, NOUVEAU_BO_RD |
- NOUVEAU_BO_VRAM | NOUVEAU_BO_GART);
- if (++a[i].step == a[i].divisor) {
- a[i].step = 0;
- a[i].delta += a[i].stride;
- }
- }
+ struct nv50_vertex_stateobj *so;
+ struct translate_key transkey;
+ unsigned i;
+
+ so = MALLOC(sizeof(*so) +
+ num_elements * sizeof(struct nv50_vertex_element));
+ if (!so)
+ return NULL;
+ so->num_elements = num_elements;
+ so->instance_elts = 0;
+ so->instance_bufs = 0;
+ so->need_conversion = FALSE;
+
+ transkey.nr_elements = 0;
+ transkey.output_stride = 0;
+
+ for (i = 0; i < num_elements; ++i) {
+ const struct pipe_vertex_element *ve = &elements[i];
+ const unsigned vbi = ve->vertex_buffer_index;
+ enum pipe_format fmt = ve->src_format;
+
+ so->element[i].pipe = elements[i];
+ so->element[i].state = nv50_format_table[fmt].vtx;
+
+ if (!so->element[i].state) {
+ switch (util_format_get_nr_components(fmt)) {
+ case 1: fmt = PIPE_FORMAT_R32_FLOAT; break;
+ case 2: fmt = PIPE_FORMAT_R32G32_FLOAT; break;
+ case 3: fmt = PIPE_FORMAT_R32G32B32_FLOAT; break;
+ case 4: fmt = PIPE_FORMAT_R32G32B32A32_FLOAT; break;
+ default:
+ assert(0);
+ return NULL;
+ }
+ so->element[i].state = nv50_format_table[fmt].vtx;
+ so->need_conversion = TRUE;
+ }
+ so->element[i].state |= i;
+
+ if (1) {
+ unsigned j = transkey.nr_elements++;
+
+ transkey.element[j].type = TRANSLATE_ELEMENT_NORMAL;
+ transkey.element[j].input_format = ve->src_format;
+ transkey.element[j].input_buffer = vbi;
+ transkey.element[j].input_offset = ve->src_offset;
+ transkey.element[j].instance_divisor = ve->instance_divisor;
+
+ transkey.element[j].output_format = fmt;
+ transkey.element[j].output_offset = transkey.output_stride;
+ transkey.output_stride += (util_format_get_stride(fmt, 1) + 3) & ~3;
+
+ if (unlikely(ve->instance_divisor)) {
+ so->instance_elts |= 1 << i;
+ so->instance_bufs |= 1 << vbi;
+ }
+ }
+ }
+
+ so->translate = translate_create(&transkey);
+ so->vertex_size = transkey.output_stride / 4;
+ so->packet_vertex_limit = NV04_PFIFO_MAX_PACKET_LEN /
+ MAX2(so->vertex_size, 1);
+
+ return so;
}
+#define NV50_3D_VERTEX_ATTRIB_INACTIVE \
+ NV50_3D_VERTEX_ARRAY_ATTRIB_TYPE_FLOAT | \
+ NV50_3D_VERTEX_ARRAY_ATTRIB_FORMAT_32_32_32_32 | \
+ NV50_3D_VERTEX_ARRAY_ATTRIB_CONST
+
static void
-nv50_draw_arrays_instanced(struct pipe_context *pipe,
- unsigned mode, unsigned start, unsigned count,
- unsigned startInstance, unsigned instanceCount)
+nv50_emit_vtxattr(struct nv50_context *nv50, struct pipe_vertex_buffer *vb,
+ struct pipe_vertex_element *ve, unsigned attr)
{
- struct nv50_context *nv50 = nv50_context(pipe);
- struct nouveau_channel *chan = nv50->screen->tesla->channel;
- struct nouveau_grobj *tesla = nv50->screen->tesla;
- struct instance a[16];
- unsigned prim = nv50_prim(mode);
-
- instance_init(nv50, a, startInstance);
- if (!nv50_state_validate(nv50, 10 + 16*3))
- return;
-
- if (nv50->vbo_fifo) {
- nv50_push_elements_instanced(pipe, NULL, 0, 0, mode, start,
- count, startInstance,
- instanceCount);
- return;
- }
-
- BEGIN_RING(chan, tesla, NV50TCL_CB_ADDR, 2);
- OUT_RING (chan, NV50_CB_AUX | (24 << 8));
- OUT_RING (chan, startInstance);
- while (instanceCount--) {
- if (AVAIL_RING(chan) < (7 + 16*3)) {
- FIRE_RING(chan);
- if (!nv50_state_validate(nv50, 7 + 16*3)) {
- assert(0);
- return;
- }
- }
- instance_step(nv50, a);
-
- BEGIN_RING(chan, tesla, NV50TCL_VERTEX_BEGIN, 1);
- OUT_RING (chan, prim);
- BEGIN_RING(chan, tesla, NV50TCL_VERTEX_BUFFER_FIRST, 2);
- OUT_RING (chan, start);
- OUT_RING (chan, count);
- BEGIN_RING(chan, tesla, NV50TCL_VERTEX_END, 1);
- OUT_RING (chan, 0);
-
- prim |= (1 << 28);
- }
+ const void *data;
+ struct nouveau_channel *chan = nv50->screen->base.channel;
+ struct nv04_resource *res = nv04_resource(vb->buffer);
+ float v[4];
+ const unsigned nc = util_format_get_nr_components(ve->src_format);
+
+ data = nouveau_resource_map_offset(&nv50->base, res, vb->buffer_offset +
+ ve->src_offset, NOUVEAU_BO_RD);
+
+ util_format_read_4f(ve->src_format, v, 0, data, 0, 0, 0, 1, 1);
+
+ switch (nc) {
+ case 4:
+ BEGIN_RING(chan, RING_3D(VTX_ATTR_4F_X(attr)), 4);
+ OUT_RINGf (chan, v[0]);
+ OUT_RINGf (chan, v[1]);
+ OUT_RINGf (chan, v[2]);
+ OUT_RINGf (chan, v[3]);
+ break;
+ case 3:
+ BEGIN_RING(chan, RING_3D(VTX_ATTR_3F_X(attr)), 3);
+ OUT_RINGf (chan, v[0]);
+ OUT_RINGf (chan, v[1]);
+ OUT_RINGf (chan, v[2]);
+ break;
+ case 2:
+ BEGIN_RING(chan, RING_3D(VTX_ATTR_2F_X(attr)), 2);
+ OUT_RINGf (chan, v[0]);
+ OUT_RINGf (chan, v[1]);
+ break;
+ case 1:
+ if (attr == nv50->vertprog->vp.edgeflag) {
+ BEGIN_RING(chan, RING_3D(EDGEFLAG_ENABLE), 1);
+ OUT_RING (chan, v[0] ? 1 : 0);
+ }
+ BEGIN_RING(chan, RING_3D(VTX_ATTR_1F(attr)), 1);
+ OUT_RINGf (chan, v[0]);
+ break;
+ default:
+ assert(0);
+ break;
+ }
}
-struct inline_ctx {
- struct nv50_context *nv50;
- void *map;
-};
+static INLINE void
+nv50_vbuf_range(struct nv50_context *nv50, int vbi,
+ uint32_t *base, uint32_t *size)
+{
+ if (unlikely(nv50->vertex->instance_bufs & (1 << vbi))) {
+ /* TODO: use min and max instance divisor to get a proper range */
+ *base = 0;
+ *size = nv50->vtxbuf[vbi].buffer->width0;
+ } else {
+ assert(nv50->vbo_max_index != ~0);
+ *base = nv50->vbo_min_index * nv50->vtxbuf[vbi].stride;
+ *size = (nv50->vbo_max_index -
+ nv50->vbo_min_index + 1) * nv50->vtxbuf[vbi].stride;
+ }
+}
static void
-inline_elt08(void *priv, unsigned start, unsigned count)
+nv50_prevalidate_vbufs(struct nv50_context *nv50)
{
- struct inline_ctx *ctx = priv;
- struct nouveau_grobj *tesla = ctx->nv50->screen->tesla;
- struct nouveau_channel *chan = tesla->channel;
- uint8_t *map = (uint8_t *)ctx->map + start;
-
- if (count & 1) {
- BEGIN_RING(chan, tesla, NV50TCL_VB_ELEMENT_U32, 1);
- OUT_RING (chan, map[0]);
- map++;
- count &= ~1;
- }
-
- count >>= 1;
- if (!count)
- return;
-
- BEGIN_RING_NI(chan, tesla, NV50TCL_VB_ELEMENT_U16, count);
- while (count--) {
- OUT_RING(chan, (map[1] << 16) | map[0]);
- map += 2;
- }
+ struct pipe_vertex_buffer *vb;
+ struct nv04_resource *buf;
+ int i;
+ uint32_t base, size;
+
+ nv50->vbo_fifo = nv50->vbo_user = 0;
+
+ nv50_bufctx_reset(nv50, NV50_BUFCTX_VERTEX);
+
+ for (i = 0; i < nv50->num_vtxbufs; ++i) {
+ vb = &nv50->vtxbuf[i];
+ if (!vb->stride)
+ continue;
+ buf = nv04_resource(vb->buffer);
+
+ /* NOTE: user buffers with temporary storage count as mapped by GPU */
+ if (!nouveau_resource_mapped_by_gpu(vb->buffer)) {
+ if (nv50->vbo_push_hint) {
+ nv50->vbo_fifo = ~0;
+ continue;
+ } else {
+ if (buf->status & NOUVEAU_BUFFER_STATUS_USER_MEMORY) {
+ nv50->vbo_user |= 1 << i;
+ assert(vb->stride > vb->buffer_offset);
+ nv50_vbuf_range(nv50, i, &base, &size);
+ nouveau_user_buffer_upload(buf, base, size);
+ } else {
+ nouveau_buffer_migrate(&nv50->base, buf, NOUVEAU_BO_GART);
+ }
+ nv50->base.vbo_dirty = TRUE;
+ }
+ }
+ nv50_bufctx_add_resident(nv50, NV50_BUFCTX_VERTEX, buf, NOUVEAU_BO_RD);
+ nouveau_buffer_adjust_score(&nv50->base, buf, 1);
+ }
}
static void
-inline_elt16(void *priv, unsigned start, unsigned count)
+nv50_update_user_vbufs(struct nv50_context *nv50)
{
- struct inline_ctx *ctx = priv;
- struct nouveau_grobj *tesla = ctx->nv50->screen->tesla;
- struct nouveau_channel *chan = tesla->channel;
- uint16_t *map = (uint16_t *)ctx->map + start;
-
- if (count & 1) {
- BEGIN_RING(chan, tesla, NV50TCL_VB_ELEMENT_U32, 1);
- OUT_RING (chan, map[0]);
- count &= ~1;
- map++;
- }
-
- count >>= 1;
- if (!count)
- return;
-
- BEGIN_RING_NI(chan, tesla, NV50TCL_VB_ELEMENT_U16, count);
- while (count--) {
- OUT_RING(chan, (map[1] << 16) | map[0]);
- map += 2;
- }
+ struct nouveau_channel *chan = nv50->screen->base.channel;
+ uint32_t base, offset, size;
+ int i;
+ uint32_t written = 0;
+
+ for (i = 0; i < nv50->vertex->num_elements; ++i) {
+ struct pipe_vertex_element *ve = &nv50->vertex->element[i].pipe;
+ const int b = ve->vertex_buffer_index;
+ struct pipe_vertex_buffer *vb = &nv50->vtxbuf[b];
+ struct nv04_resource *buf = nv04_resource(vb->buffer);
+
+ if (!(nv50->vbo_user & (1 << b)))
+ continue;
+
+ if (!vb->stride) {
+ nv50_emit_vtxattr(nv50, vb, ve, i);
+ continue;
+ }
+ nv50_vbuf_range(nv50, b, &base, &size);
+
+ if (!(written & (1 << b))) {
+ written |= 1 << b;
+ nouveau_user_buffer_upload(buf, base, size);
+ }
+ offset = vb->buffer_offset + ve->src_offset;
+
+ MARK_RING (chan, 6, 4);
+ BEGIN_RING(chan, RING_3D(VERTEX_ARRAY_LIMIT_HIGH(i)), 2);
+ OUT_RESRCh(chan, buf, base + size - 1, NOUVEAU_BO_RD);
+ OUT_RESRCl(chan, buf, base + size - 1, NOUVEAU_BO_RD);
+ BEGIN_RING(chan, RING_3D(VERTEX_ARRAY_START_HIGH(i)), 2);
+ OUT_RESRCh(chan, buf, offset, NOUVEAU_BO_RD);
+ OUT_RESRCl(chan, buf, offset, NOUVEAU_BO_RD);
+ }
+ nv50->base.vbo_dirty = TRUE;
}
-static void
-inline_elt32(void *priv, unsigned start, unsigned count)
+static INLINE void
+nv50_release_user_vbufs(struct nv50_context *nv50)
{
- struct inline_ctx *ctx = priv;
- struct nouveau_grobj *tesla = ctx->nv50->screen->tesla;
- struct nouveau_channel *chan = tesla->channel;
+ uint32_t vbo_user = nv50->vbo_user;
- BEGIN_RING_NI(chan, tesla, NV50TCL_VB_ELEMENT_U32, count);
- OUT_RINGp (chan, (uint32_t *)ctx->map + start, count);
+ while (vbo_user) {
+ int i = ffs(vbo_user) - 1;
+ vbo_user &= ~(1 << i);
+
+ nouveau_buffer_release_gpu_storage(nv04_resource(nv50->vtxbuf[i].buffer));
+ }
}
-static void
-inline_edgeflag(void *priv, boolean enabled)
+void
+nv50_vertex_arrays_validate(struct nv50_context *nv50)
{
- struct inline_ctx *ctx = priv;
- struct nouveau_grobj *tesla = ctx->nv50->screen->tesla;
- struct nouveau_channel *chan = tesla->channel;
+ struct nouveau_channel *chan = nv50->screen->base.channel;
+ struct nv50_vertex_stateobj *vertex = nv50->vertex;
+ struct pipe_vertex_buffer *vb;
+ struct nv50_vertex_element *ve;
+ unsigned i;
+
+ if (unlikely(vertex->need_conversion)) {
+ nv50->vbo_fifo = ~0;
+ nv50->vbo_user = 0;
+ } else {
+ nv50_prevalidate_vbufs(nv50);
+ }
+
+ BEGIN_RING(chan, RING_3D(VERTEX_ARRAY_ATTRIB(0)), vertex->num_elements);
+ for (i = 0; i < vertex->num_elements; ++i) {
+ ve = &vertex->element[i];
+ vb = &nv50->vtxbuf[ve->pipe.vertex_buffer_index];
+
+ if (likely(vb->stride) || nv50->vbo_fifo) {
+ OUT_RING(chan, ve->state);
+ } else {
+ OUT_RING(chan, ve->state | NV50_3D_VERTEX_ARRAY_ATTRIB_CONST);
+ nv50->vbo_fifo &= ~(1 << i);
+ }
+ }
+
+ for (i = 0; i < vertex->num_elements; ++i) {
+ struct nv04_resource *res;
+ unsigned size, offset;
+
+ ve = &vertex->element[i];
+ vb = &nv50->vtxbuf[ve->pipe.vertex_buffer_index];
+
+ if (unlikely(ve->pipe.instance_divisor)) {
+ if (!(nv50->state.instance_elts & (1 << i))) {
+ BEGIN_RING(chan, RING_3D(VERTEX_ARRAY_PER_INSTANCE(i)), 1);
+ OUT_RING (chan, 1);
+ }
+ BEGIN_RING(chan, RING_3D(VERTEX_ARRAY_DIVISOR(i)), 1);
+ OUT_RING (chan, ve->pipe.instance_divisor);
+ } else
+ if (unlikely(nv50->state.instance_elts & (1 << i))) {
+ BEGIN_RING(chan, RING_3D(VERTEX_ARRAY_PER_INSTANCE(i)), 1);
+ OUT_RING (chan, 0);
+ }
+
+ res = nv04_resource(vb->buffer);
+
+ if (nv50->vbo_fifo || unlikely(vb->stride == 0)) {
+ if (!nv50->vbo_fifo)
+ nv50_emit_vtxattr(nv50, vb, &ve->pipe, i);
+ BEGIN_RING(chan, RING_3D(VERTEX_ARRAY_FETCH(i)), 1);
+ OUT_RING (chan, 0);
+ continue;
+ }
+
+ size = vb->buffer->width0;
+ offset = ve->pipe.src_offset + vb->buffer_offset;
+
+ MARK_RING (chan, 8, 4);
+ BEGIN_RING(chan, RING_3D(VERTEX_ARRAY_FETCH(i)), 1);
+ OUT_RING (chan, NV50_3D_VERTEX_ARRAY_FETCH_ENABLE | vb->stride);
+ BEGIN_RING(chan, RING_3D(VERTEX_ARRAY_LIMIT_HIGH(i)), 2);
+ OUT_RESRCh(chan, res, size - 1, NOUVEAU_BO_RD);
+ OUT_RESRCl(chan, res, size - 1, NOUVEAU_BO_RD);
+ BEGIN_RING(chan, RING_3D(VERTEX_ARRAY_START_HIGH(i)), 2);
+ OUT_RESRCh(chan, res, offset, NOUVEAU_BO_RD);
+ OUT_RESRCl(chan, res, offset, NOUVEAU_BO_RD);
+ }
+ for (; i < nv50->state.num_vtxelts; ++i) {
+ BEGIN_RING(chan, RING_3D(VERTEX_ARRAY_ATTRIB(i)), 1);
+ OUT_RING (chan, NV50_3D_VERTEX_ATTRIB_INACTIVE);
+ BEGIN_RING(chan, RING_3D(VERTEX_ARRAY_FETCH(i)), 1);
+ OUT_RING (chan, 0);
+ }
+
+ nv50->state.num_vtxelts = vertex->num_elements;
+ nv50->state.instance_elts = vertex->instance_elts;
+}
+
+#define NV50_PRIM_GL_CASE(n) \
+ case PIPE_PRIM_##n: return NV50_3D_VERTEX_BEGIN_GL_PRIMITIVE_##n
- BEGIN_RING(chan, tesla, NV50TCL_EDGEFLAG_ENABLE, 1);
- OUT_RING (chan, enabled ? 1 : 0);
+static INLINE unsigned
+nv50_prim_gl(unsigned prim)
+{
+ switch (prim) {
+ NV50_PRIM_GL_CASE(POINTS);
+ NV50_PRIM_GL_CASE(LINES);
+ NV50_PRIM_GL_CASE(LINE_LOOP);
+ NV50_PRIM_GL_CASE(LINE_STRIP);
+ NV50_PRIM_GL_CASE(TRIANGLES);
+ NV50_PRIM_GL_CASE(TRIANGLE_STRIP);
+ NV50_PRIM_GL_CASE(TRIANGLE_FAN);
+ NV50_PRIM_GL_CASE(QUADS);
+ NV50_PRIM_GL_CASE(QUAD_STRIP);
+ NV50_PRIM_GL_CASE(POLYGON);
+ NV50_PRIM_GL_CASE(LINES_ADJACENCY);
+ NV50_PRIM_GL_CASE(LINE_STRIP_ADJACENCY);
+ NV50_PRIM_GL_CASE(TRIANGLES_ADJACENCY);
+ NV50_PRIM_GL_CASE(TRIANGLE_STRIP_ADJACENCY);
+ default:
+ return NV50_3D_VERTEX_BEGIN_GL_PRIMITIVE_POINTS;
+ break;
+ }
}
static void
-nv50_draw_elements_inline(struct pipe_context *pipe,
- struct pipe_resource *indexBuffer, unsigned indexSize,
- unsigned mode, unsigned start, unsigned count,
- unsigned startInstance, unsigned instanceCount)
+nv50_draw_vbo_flush_notify(struct nouveau_channel *chan)
{
- struct nv50_context *nv50 = nv50_context(pipe);
- struct nouveau_channel *chan = nv50->screen->tesla->channel;
- struct nouveau_grobj *tesla = nv50->screen->tesla;
- struct pipe_transfer *transfer;
- struct instance a[16];
- struct inline_ctx ctx;
- struct util_split_prim s;
- boolean nzi = FALSE;
- unsigned overhead;
-
- overhead = 16*3; /* potential instance adjustments */
- overhead += 4; /* Begin()/End() */
- overhead += 4; /* potential edgeflag disable/reenable */
- overhead += 3; /* potentially 3 VTX_ELT_U16/U32 packet headers */
-
- s.priv = &ctx;
- if (indexSize == 1)
- s.emit = inline_elt08;
- else
- if (indexSize == 2)
- s.emit = inline_elt16;
- else
- s.emit = inline_elt32;
- s.edge = inline_edgeflag;
-
- ctx.nv50 = nv50;
- ctx.map = pipe_buffer_map(pipe, indexBuffer, PIPE_TRANSFER_READ, &transfer);
- assert(ctx.map);
- if (!ctx.map)
- return;
-
- instance_init(nv50, a, startInstance);
- if (!nv50_state_validate(nv50, overhead + 6 + 3))
- return;
-
- BEGIN_RING(chan, tesla, NV50TCL_CB_ADDR, 2);
- OUT_RING (chan, NV50_CB_AUX | (24 << 8));
- OUT_RING (chan, startInstance);
- while (instanceCount--) {
- unsigned max_verts;
- boolean done;
-
- util_split_prim_init(&s, mode, start, count);
- do {
- if (AVAIL_RING(chan) < (overhead + 6)) {
- FIRE_RING(chan);
- if (!nv50_state_validate(nv50, (overhead + 6))) {
- assert(0);
- return;
- }
- }
-
- max_verts = AVAIL_RING(chan) - overhead;
- if (max_verts > 2047)
- max_verts = 2047;
- if (indexSize != 4)
- max_verts <<= 1;
- instance_step(nv50, a);
-
- BEGIN_RING(chan, tesla, NV50TCL_VERTEX_BEGIN, 1);
- OUT_RING (chan, nv50_prim(s.mode) | (nzi ? (1<<28) : 0));
- done = util_split_prim_next(&s, max_verts);
- BEGIN_RING(chan, tesla, NV50TCL_VERTEX_END, 1);
- OUT_RING (chan, 0);
- } while (!done);
-
- nzi = TRUE;
- }
-
- pipe_buffer_unmap(pipe, indexBuffer, transfer);
+ struct nv50_context *nv50 = chan->user_private;
+
+ nouveau_fence_update(&nv50->screen->base, TRUE);
+
+ nv50_bufctx_emit_relocs(nv50);
}
static void
-nv50_draw_elements_instanced(struct pipe_context *pipe,
- struct pipe_resource *indexBuffer,
- unsigned indexSize, int indexBias,
- unsigned mode, unsigned start, unsigned count,
- unsigned startInstance, unsigned instanceCount)
+nv50_draw_arrays(struct nv50_context *nv50,
+ unsigned mode, unsigned start, unsigned count,
+ unsigned instance_count)
{
- struct nv50_context *nv50 = nv50_context(pipe);
- struct nouveau_channel *chan = nv50->screen->tesla->channel;
- struct nouveau_grobj *tesla = nv50->screen->tesla;
- struct instance a[16];
- unsigned prim = nv50_prim(mode);
-
- instance_init(nv50, a, startInstance);
- if (!nv50_state_validate(nv50, 13 + 16*3))
- return;
-
- if (nv50->vbo_fifo) {
- nv50_push_elements_instanced(pipe, indexBuffer, indexSize,
- indexBias, mode, start, count,
- startInstance, instanceCount);
- return;
- }
-
- /* indices are uint32 internally, so large indexBias means negative */
- BEGIN_RING(chan, tesla, NV50TCL_VB_ELEMENT_BASE, 1);
- OUT_RING (chan, indexBias);
-
- if (!nv50_resource_mapped_by_gpu(indexBuffer) || indexSize == 1) {
- nv50_draw_elements_inline(pipe, indexBuffer, indexSize,
- mode, start, count, startInstance,
- instanceCount);
- return;
- }
-
- BEGIN_RING(chan, tesla, NV50TCL_CB_ADDR, 2);
- OUT_RING (chan, NV50_CB_AUX | (24 << 8));
- OUT_RING (chan, startInstance);
- while (instanceCount--) {
- if (AVAIL_RING(chan) < (7 + 16*3)) {
- FIRE_RING(chan);
- if (!nv50_state_validate(nv50, 10 + 16*3)) {
- assert(0);
- return;
- }
- }
- instance_step(nv50, a);
-
- BEGIN_RING(chan, tesla, NV50TCL_VERTEX_BEGIN, 1);
- OUT_RING (chan, prim);
- if (indexSize == 4) {
- BEGIN_RING(chan, tesla, NV50TCL_VB_ELEMENT_U32 | 0x30000, 0);
- OUT_RING (chan, count);
- nouveau_pushbuf_submit(chan,
- nv50_resource(indexBuffer)->bo,
- start << 2, count << 2);
- } else
- if (indexSize == 2) {
- unsigned vb_start = (start & ~1);
- unsigned vb_end = (start + count + 1) & ~1;
- unsigned dwords = (vb_end - vb_start) >> 1;
-
- BEGIN_RING(chan, tesla, NV50TCL_VB_ELEMENT_U16_SETUP, 1);
- OUT_RING (chan, ((start & 1) << 31) | count);
- BEGIN_RING(chan, tesla, NV50TCL_VB_ELEMENT_U16 | 0x30000, 0);
- OUT_RING (chan, dwords);
- nouveau_pushbuf_submit(chan,
- nv50_resource(indexBuffer)->bo,
- vb_start << 1, dwords << 2);
- BEGIN_RING(chan, tesla, NV50TCL_VB_ELEMENT_U16_SETUP, 1);
- OUT_RING (chan, 0);
- }
- BEGIN_RING(chan, tesla, NV50TCL_VERTEX_END, 1);
- OUT_RING (chan, 0);
-
- prim |= (1 << 28);
- }
+ struct nouveau_channel *chan = nv50->screen->base.channel;
+ unsigned prim;
+
+ chan->flush_notify = nv50_draw_vbo_flush_notify;
+ chan->user_private = nv50;
+
+ prim = nv50_prim_gl(mode);
+
+ while (instance_count--) {
+ BEGIN_RING(chan, RING_3D(VERTEX_BEGIN_GL), 1);
+ OUT_RING (chan, prim);
+ BEGIN_RING(chan, RING_3D(VERTEX_BUFFER_FIRST), 2);
+ OUT_RING (chan, start);
+ OUT_RING (chan, count);
+ BEGIN_RING(chan, RING_3D(VERTEX_END_GL), 1);
+ OUT_RING (chan, 0);
+
+ prim |= NV50_3D_VERTEX_BEGIN_GL_INSTANCE_NEXT;
+ }
+
+ chan->flush_notify = nv50_default_flush_notify;
}
-void
-nv50_draw_vbo(struct pipe_context *pipe, const struct pipe_draw_info *info)
+static void
+nv50_draw_elements_inline_u08(struct nouveau_channel *chan, uint8_t *map,
+ unsigned start, unsigned count)
{
- struct nv50_context *nv50 = nv50_context(pipe);
-
- if (info->indexed && nv50->idxbuf.buffer) {
- unsigned offset;
-
- assert(nv50->idxbuf.offset % nv50->idxbuf.index_size == 0);
- offset = nv50->idxbuf.offset / nv50->idxbuf.index_size;
-
- nv50_draw_elements_instanced(pipe,
- nv50->idxbuf.buffer,
- nv50->idxbuf.index_size,
- info->index_bias,
- info->mode,
- info->start + offset,
- info->count,
- info->start_instance,
- info->instance_count);
- }
- else {
- nv50_draw_arrays_instanced(pipe,
- info->mode,
- info->start,
- info->count,
- info->start_instance,
- info->instance_count);
- }
+ map += start;
+
+ if (count & 3) {
+ unsigned i;
+ BEGIN_RING_NI(chan, RING_3D(VB_ELEMENT_U32), count & 3);
+ for (i = 0; i < (count & 3); ++i)
+ OUT_RING(chan, *map++);
+ count &= ~3;
+ }
+ while (count) {
+ unsigned i, nr = MIN2(count, NV04_PFIFO_MAX_PACKET_LEN * 4) / 4;
+
+ BEGIN_RING_NI(chan, RING_3D(VB_ELEMENT_U8), nr);
+ for (i = 0; i < nr; ++i) {
+ OUT_RING(chan,
+ (map[3] << 24) | (map[2] << 16) | (map[1] << 8) | map[0]);
+ map += 4;
+ }
+ count -= nr * 4;
+ }
}
-static INLINE boolean
-nv50_vbo_static_attrib(struct nv50_context *nv50, unsigned attrib,
- struct nouveau_stateobj **pso,
- struct pipe_vertex_element *ve,
- struct pipe_vertex_buffer *vb)
-
+static void
+nv50_draw_elements_inline_u16(struct nouveau_channel *chan, uint16_t *map,
+ unsigned start, unsigned count)
{
- struct nouveau_stateobj *so;
- struct nouveau_grobj *tesla = nv50->screen->tesla;
- struct nouveau_bo *bo = nv50_resource(vb->buffer)->bo;
- float v[4];
- int ret;
- unsigned nr_components = util_format_get_nr_components(ve->src_format);
-
- ret = nouveau_bo_map(bo, NOUVEAU_BO_RD);
- if (ret)
- return FALSE;
-
- util_format_read_4f(ve->src_format, v, 0, (uint8_t *)bo->map +
- (vb->buffer_offset + ve->src_offset), 0,
- 0, 0, 1, 1);
- so = *pso;
- if (!so)
- *pso = so = so_new(nv50->vtxelt->num_elements,
- nv50->vtxelt->num_elements * 4, 0);
-
- switch (nr_components) {
- case 4:
- so_method(so, tesla, NV50TCL_VTX_ATTR_4F_X(attrib), 4);
- so_data (so, fui(v[0]));
- so_data (so, fui(v[1]));
- so_data (so, fui(v[2]));
- so_data (so, fui(v[3]));
- break;
- case 3:
- so_method(so, tesla, NV50TCL_VTX_ATTR_3F_X(attrib), 3);
- so_data (so, fui(v[0]));
- so_data (so, fui(v[1]));
- so_data (so, fui(v[2]));
- break;
- case 2:
- so_method(so, tesla, NV50TCL_VTX_ATTR_2F_X(attrib), 2);
- so_data (so, fui(v[0]));
- so_data (so, fui(v[1]));
- break;
- case 1:
- if (attrib == nv50->vertprog->vp.edgeflag) {
- so_method(so, tesla, NV50TCL_EDGEFLAG_ENABLE, 1);
- so_data (so, v[0] ? 1 : 0);
- }
- so_method(so, tesla, NV50TCL_VTX_ATTR_1F(attrib), 1);
- so_data (so, fui(v[0]));
- break;
- default:
- nouveau_bo_unmap(bo);
- return FALSE;
- }
-
- nouveau_bo_unmap(bo);
- return TRUE;
+ map += start;
+
+ if (count & 1) {
+ count &= ~1;
+ BEGIN_RING(chan, RING_3D(VB_ELEMENT_U32), 1);
+ OUT_RING (chan, *map++);
+ }
+ while (count) {
+ unsigned i, nr = MIN2(count, NV04_PFIFO_MAX_PACKET_LEN * 2) / 2;
+
+ BEGIN_RING_NI(chan, RING_3D(VB_ELEMENT_U16), nr);
+ for (i = 0; i < nr; ++i) {
+ OUT_RING(chan, (map[1] << 16) | map[0]);
+ map += 2;
+ }
+ count -= nr * 2;
+ }
}
-void
-nv50_vtxelt_construct(struct nv50_vtxelt_stateobj *cso)
+static void
+nv50_draw_elements_inline_u32(struct nouveau_channel *chan, uint32_t *map,
+ unsigned start, unsigned count)
{
- unsigned i;
+ map += start;
+
+ while (count) {
+ const unsigned nr = MIN2(count, NV04_PFIFO_MAX_PACKET_LEN);
- for (i = 0; i < cso->num_elements; ++i)
- cso->hw[i] = nv50_format_table[cso->pipe[i].src_format].vtx;
+ BEGIN_RING_NI(chan, RING_3D(VB_ELEMENT_U32), nr);
+ OUT_RINGp (chan, map, nr);
+
+ map += nr;
+ count -= nr;
+ }
}
-struct nouveau_stateobj *
-nv50_vbo_validate(struct nv50_context *nv50)
+static void
+nv50_draw_elements_inline_u32_short(struct nouveau_channel *chan, uint32_t *map,
+ unsigned start, unsigned count)
{
- struct nouveau_grobj *tesla = nv50->screen->tesla;
- struct nouveau_stateobj *vtxbuf, *vtxfmt, *vtxattr;
- unsigned i, n_ve;
-
- /* don't validate if Gallium took away our buffers */
- if (nv50->vtxbuf_nr == 0)
- return NULL;
-
- nv50->vbo_fifo = 0;
- if (nv50->screen->force_push ||
- nv50->vertprog->vp.edgeflag < 16)
- nv50->vbo_fifo = 0xffff;
-
- for (i = 0; i < nv50->vtxbuf_nr; i++) {
- if (nv50->vtxbuf[i].stride &&
- !nv50_resource_mapped_by_gpu(nv50->vtxbuf[i].buffer))
- nv50->vbo_fifo = 0xffff;
- }
-
- n_ve = MAX2(nv50->vtxelt->num_elements, nv50->state.vtxelt_nr);
-
- vtxattr = NULL;
- vtxbuf = so_new(n_ve * 2, n_ve * 5, nv50->vtxelt->num_elements * 4);
- vtxfmt = so_new(1, n_ve, 0);
- so_method(vtxfmt, tesla, NV50TCL_VERTEX_ARRAY_ATTRIB(0), n_ve);
-
- for (i = 0; i < nv50->vtxelt->num_elements; i++) {
- struct pipe_vertex_element *ve = &nv50->vtxelt->pipe[i];
- struct pipe_vertex_buffer *vb =
- &nv50->vtxbuf[ve->vertex_buffer_index];
- struct nouveau_bo *bo = nv50_resource(vb->buffer)->bo;
- uint32_t hw = nv50->vtxelt->hw[i];
-
- if (!vb->stride &&
- nv50_vbo_static_attrib(nv50, i, &vtxattr, ve, vb)) {
- so_data(vtxfmt, hw | (1 << 4));
-
- so_method(vtxbuf, tesla,
- NV50TCL_VERTEX_ARRAY_FORMAT(i), 1);
- so_data (vtxbuf, 0);
-
- nv50->vbo_fifo &= ~(1 << i);
- continue;
- }
-
- if (nv50->vbo_fifo) {
- so_data (vtxfmt, hw | (ve->instance_divisor ? (1 << 4) : i));
- so_method(vtxbuf, tesla,
- NV50TCL_VERTEX_ARRAY_FORMAT(i), 1);
- so_data (vtxbuf, 0);
- continue;
- }
-
- so_data(vtxfmt, hw | i);
-
- so_method(vtxbuf, tesla, NV50TCL_VERTEX_ARRAY_FORMAT(i), 3);
- so_data (vtxbuf, 0x20000000 |
- (ve->instance_divisor ? 0 : vb->stride));
- so_reloc (vtxbuf, bo, vb->buffer_offset +
- ve->src_offset, NOUVEAU_BO_VRAM | NOUVEAU_BO_GART |
- NOUVEAU_BO_RD | NOUVEAU_BO_HIGH, 0, 0);
- so_reloc (vtxbuf, bo, vb->buffer_offset +
- ve->src_offset, NOUVEAU_BO_VRAM | NOUVEAU_BO_GART |
- NOUVEAU_BO_RD | NOUVEAU_BO_LOW, 0, 0);
-
- /* vertex array limits */
- so_method(vtxbuf, tesla, NV50TCL_VERTEX_ARRAY_LIMIT_HIGH(i), 2);
- so_reloc (vtxbuf, bo, vb->buffer->width0 - 1,
- NOUVEAU_BO_VRAM | NOUVEAU_BO_GART | NOUVEAU_BO_RD |
- NOUVEAU_BO_HIGH, 0, 0);
- so_reloc (vtxbuf, bo, vb->buffer->width0 - 1,
- NOUVEAU_BO_VRAM | NOUVEAU_BO_GART | NOUVEAU_BO_RD |
- NOUVEAU_BO_LOW, 0, 0);
- }
- for (; i < n_ve; ++i) {
- so_data (vtxfmt, 0x7e080010);
-
- so_method(vtxbuf, tesla, NV50TCL_VERTEX_ARRAY_FORMAT(i), 1);
- so_data (vtxbuf, 0);
- }
- nv50->state.vtxelt_nr = nv50->vtxelt->num_elements;
-
- so_ref (vtxbuf, &nv50->state.vtxbuf);
- so_ref (vtxattr, &nv50->state.vtxattr);
- so_ref (NULL, &vtxbuf);
- so_ref (NULL, &vtxattr);
- return vtxfmt;
+ map += start;
+
+ if (count & 1) {
+ count--;
+ BEGIN_RING(chan, RING_3D(VB_ELEMENT_U32), 1);
+ OUT_RING (chan, *map++);
+ }
+ while (count) {
+ unsigned i, nr = MIN2(count, NV04_PFIFO_MAX_PACKET_LEN * 2) / 2;
+
+ BEGIN_RING_NI(chan, RING_3D(VB_ELEMENT_U16), nr);
+ for (i = 0; i < nr; ++i) {
+ OUT_RING(chan, (map[1] << 16) | map[0]);
+ map += 2;
+ }
+ count -= nr * 2;
+ }
}
+static void
+nv50_draw_elements(struct nv50_context *nv50, boolean shorten,
+ unsigned mode, unsigned start, unsigned count,
+ unsigned instance_count, int32_t index_bias)
+{
+ struct nouveau_channel *chan = nv50->screen->base.channel;
+ void *data;
+ unsigned prim;
+ const unsigned index_size = nv50->idxbuf.index_size;
+
+ chan->flush_notify = nv50_draw_vbo_flush_notify;
+ chan->user_private = nv50;
+
+ prim = nv50_prim_gl(mode);
+
+ if (index_bias != nv50->state.index_bias) {
+ BEGIN_RING(chan, RING_3D(VB_ELEMENT_BASE), 1);
+ OUT_RING (chan, index_bias);
+ nv50->state.index_bias = index_bias;
+ }
+
+ if (nouveau_resource_mapped_by_gpu(nv50->idxbuf.buffer)) {
+ struct nv04_resource *res = nv04_resource(nv50->idxbuf.buffer);
+
+ start += nv50->idxbuf.offset >> (index_size >> 1);
+
+ nouveau_buffer_adjust_score(&nv50->base, res, 1);
+
+ while (instance_count--) {
+ BEGIN_RING(chan, RING_3D(VERTEX_BEGIN_GL), 1);
+ OUT_RING (chan, mode);
+
+ switch (index_size) {
+ case 4:
+ {
+ WAIT_RING (chan, 2);
+ BEGIN_RING(chan, RING_3D(VB_ELEMENT_U32) | 0x30000, 0);
+ OUT_RING (chan, count);
+ nouveau_pushbuf_submit(chan, res->bo, res->offset + start * 4,
+ count * 4);
+ }
+ break;
+ case 2:
+ {
+ unsigned pb_start = (start & ~1);
+ unsigned pb_words = (((start + count + 1) & ~1) - pb_start) >> 1;
+
+ BEGIN_RING(chan, RING_3D(VB_ELEMENT_U16_SETUP), 1);
+ OUT_RING (chan, (start << 31) | count);
+ WAIT_RING (chan, 2);
+ BEGIN_RING(chan, RING_3D(VB_ELEMENT_U16) | 0x30000, 0);
+ OUT_RING (chan, pb_words);
+ nouveau_pushbuf_submit(chan, res->bo, res->offset + pb_start * 2,
+ pb_words * 4);
+ BEGIN_RING(chan, RING_3D(VB_ELEMENT_U16_SETUP), 1);
+ OUT_RING (chan, 0);
+ break;
+ }
+ case 1:
+ {
+ unsigned pb_start = (start & ~3);
+ unsigned pb_words = (((start + count + 3) & ~3) - pb_start) >> 1;
+
+ BEGIN_RING(chan, RING_3D(VB_ELEMENT_U8_SETUP), 1);
+ OUT_RING (chan, (start << 30) | count);
+ WAIT_RING (chan, 2);
+ BEGIN_RING(chan, RING_3D(VB_ELEMENT_U8) | 0x30000, 0);
+ OUT_RING (chan, pb_words);
+ nouveau_pushbuf_submit(chan, res->bo, res->offset + pb_start,
+ pb_words * 4);
+ BEGIN_RING(chan, RING_3D(VB_ELEMENT_U8_SETUP), 1);
+ OUT_RING (chan, 0);
+ break;
+ }
+ default:
+ assert(0);
+ return;
+ }
+ BEGIN_RING(chan, RING_3D(VERTEX_END_GL), 1);
+ OUT_RING (chan, 0);
+
+ nv50_resource_fence(res, NOUVEAU_BO_RD);
+
+ mode |= NV50_3D_VERTEX_BEGIN_GL_INSTANCE_NEXT;
+ }
+ } else {
+ data = nouveau_resource_map_offset(&nv50->base,
+ nv04_resource(nv50->idxbuf.buffer),
+ nv50->idxbuf.offset, NOUVEAU_BO_RD);
+ if (!data)
+ return;
+
+ while (instance_count--) {
+ BEGIN_RING(chan, RING_3D(VERTEX_BEGIN_GL), 1);
+ OUT_RING (chan, prim);
+ switch (index_size) {
+ case 1:
+ nv50_draw_elements_inline_u08(chan, data, start, count);
+ break;
+ case 2:
+ nv50_draw_elements_inline_u16(chan, data, start, count);
+ break;
+ case 4:
+ if (shorten)
+ nv50_draw_elements_inline_u32_short(chan, data, start, count);
+ else
+ nv50_draw_elements_inline_u32(chan, data, start, count);
+ break;
+ default:
+ assert(0);
+ return;
+ }
+ BEGIN_RING(chan, RING_3D(VERTEX_END_GL), 1);
+ OUT_RING (chan, 0);
+
+ prim |= NV50_3D_VERTEX_BEGIN_GL_INSTANCE_NEXT;
+ }
+ }
+
+ chan->flush_notify = nv50_default_flush_notify;
+}
+void
+nv50_draw_vbo(struct pipe_context *pipe, const struct pipe_draw_info *info)
+{
+ struct nv50_context *nv50 = nv50_context(pipe);
+ struct nouveau_channel *chan = nv50->screen->base.channel;
+
+ /* For picking only a few vertices from a large user buffer, push is better,
+ * if index count is larger and we expect repeated vertices, suggest upload.
+ */
+ nv50->vbo_push_hint = /* the 64 is heuristic */
+ !(info->indexed &&
+ ((info->max_index - info->min_index + 64) < info->count));
+
+ nv50->vbo_min_index = info->min_index;
+ nv50->vbo_max_index = info->max_index;
+
+ if (nv50->vbo_push_hint != !!nv50->vbo_fifo)
+ nv50->dirty |= NV50_NEW_ARRAYS;
+
+ if (nv50->vbo_user && !(nv50->dirty & (NV50_NEW_VERTEX | NV50_NEW_ARRAYS)))
+ nv50_update_user_vbufs(nv50);
+
+ nv50_state_validate(nv50);
+
+ if (nv50->vbo_fifo) {
+ nv50_push_vbo(nv50, info);
+ return;
+ }
+
+ if (nv50->state.instance_base != info->start_instance) {
+ nv50->state.instance_base = info->start_instance;
+ /* NOTE: this does not affect the shader input, should it ? */
+ BEGIN_RING(chan, RING_3D(VB_INSTANCE_BASE), 1);
+ OUT_RING (chan, info->start_instance);
+ }
+
+ if (nv50->base.vbo_dirty) {
+ BEGIN_RING(chan, RING_3D(VERTEX_ARRAY_FLUSH), 1);
+ OUT_RING (chan, 0);
+ nv50->base.vbo_dirty = FALSE;
+ }
+
+ if (!info->indexed) {
+ nv50_draw_arrays(nv50,
+ info->mode, info->start, info->count,
+ info->instance_count);
+ } else {
+ boolean shorten = info->max_index <= 65535;
+
+ assert(nv50->idxbuf.buffer);
+
+ if (info->primitive_restart != nv50->state.prim_restart) {
+ if (info->primitive_restart) {
+ BEGIN_RING(chan, RING_3D(PRIM_RESTART_ENABLE), 2);
+ OUT_RING (chan, 1);
+ OUT_RING (chan, info->restart_index);
+
+ if (info->restart_index > 65535)
+ shorten = FALSE;
+ } else {
+ BEGIN_RING(chan, RING_3D(PRIM_RESTART_ENABLE), 1);
+ OUT_RING (chan, 0);
+ }
+ nv50->state.prim_restart = info->primitive_restart;
+ } else
+ if (info->primitive_restart) {
+ BEGIN_RING(chan, RING_3D(PRIM_RESTART_INDEX), 1);
+ OUT_RING (chan, info->restart_index);
+
+ if (info->restart_index > 65535)
+ shorten = FALSE;
+ }
+
+ nv50_draw_elements(nv50, shorten,
+ info->mode, info->start, info->count,
+ info->instance_count, info->index_bias);
+ }
+
+ nv50_release_user_vbufs(nv50);
+}
diff --git a/src/gallium/drivers/nv50/nv50_winsys.h b/src/gallium/drivers/nv50/nv50_winsys.h
new file mode 100644
index 00000000000..afa2a00c7a2
--- /dev/null
+++ b/src/gallium/drivers/nv50/nv50_winsys.h
@@ -0,0 +1,106 @@
+
+#ifndef __NV50_WINSYS_H__
+#define __NV50_WINSYS_H__
+
+#include <stdint.h>
+#include <unistd.h>
+
+#include "pipe/p_defines.h"
+
+#include "nouveau/nouveau_bo.h"
+#include "nouveau/nouveau_channel.h"
+#include "nouveau/nouveau_grobj.h"
+#include "nouveau/nouveau_device.h"
+#include "nouveau/nouveau_resource.h"
+#include "nouveau/nouveau_pushbuf.h"
+#include "nouveau/nouveau_reloc.h"
+#include "nouveau/nouveau_notifier.h"
+
+#include "nouveau/nouveau_buffer.h"
+
+#ifndef NV04_PFIFO_MAX_PACKET_LEN
+#define NV04_PFIFO_MAX_PACKET_LEN 2047
+#endif
+
+#define NV50_SUBCH_3D 5
+#define NV50_SUBCH_2D 6
+#define NV50_SUBCH_MF 7
+
+#define NV50_MF_(n) NV50_M2MF_##n
+
+#define RING_3D(n) ((NV50_SUBCH_3D << 13) | NV50_3D_##n)
+#define RING_2D(n) ((NV50_SUBCH_2D << 13) | NV50_2D_##n)
+#define RING_MF(n) ((NV50_SUBCH_MF << 13) | NV50_MF_(n))
+
+#define RING_3D_(m) ((NV50_SUBCH_3D << 13) | (m))
+#define RING_2D_(m) ((NV50_SUBCH_2D << 13) | (m))
+#define RING_MF_(m) ((NV50_SUBCH_MF << 13) | (m))
+
+#define RING_GR(gr, m) (((gr)->subc << 13) | (m))
+
+int nouveau_pushbuf_flush(struct nouveau_channel *, unsigned min);
+
+static inline uint32_t
+nouveau_bo_tile_layout(struct nouveau_bo *bo)
+{
+ return bo->tile_flags & NOUVEAU_BO_TILE_LAYOUT_MASK;
+}
+
+static INLINE void
+nouveau_bo_validate(struct nouveau_channel *chan,
+ struct nouveau_bo *bo, unsigned flags)
+{
+ nouveau_reloc_emit(chan, NULL, 0, NULL, bo, 0, 0, flags, 0, 0);
+}
+
+/* incremental methods */
+static INLINE void
+BEGIN_RING(struct nouveau_channel *chan, uint32_t mthd, unsigned size)
+{
+ WAIT_RING(chan, size + 1);
+ OUT_RING (chan, (size << 18) | mthd);
+}
+
+/* non-incremental */
+static INLINE void
+BEGIN_RING_NI(struct nouveau_channel *chan, uint32_t mthd, unsigned size)
+{
+ WAIT_RING(chan, size + 1);
+ OUT_RING (chan, (0x2 << 29) | (size << 18) | mthd);
+}
+
+static INLINE int
+OUT_RESRCh(struct nouveau_channel *chan, struct nv04_resource *res,
+ unsigned delta, unsigned flags)
+{
+ return OUT_RELOCh(chan, res->bo, res->offset + delta, res->domain | flags);
+}
+
+static INLINE int
+OUT_RESRCl(struct nouveau_channel *chan, struct nv04_resource *res,
+ unsigned delta, unsigned flags)
+{
+ if (flags & NOUVEAU_BO_WR)
+ res->status |= NOUVEAU_BUFFER_STATUS_GPU_WRITING;
+ return OUT_RELOCl(chan, res->bo, res->offset + delta, res->domain | flags);
+}
+
+static INLINE void
+BIND_RING(struct nouveau_channel *chan, struct nouveau_grobj *gr, unsigned s)
+{
+ struct nouveau_subchannel *subc = &gr->channel->subc[s];
+
+ assert(s < 8);
+ if (subc->gr) {
+ assert(subc->gr->bound != NOUVEAU_GROBJ_BOUND_EXPLICIT);
+ subc->gr->bound = NOUVEAU_GROBJ_UNBOUND;
+ }
+ subc->gr = gr;
+ subc->gr->subc = s;
+ subc->gr->bound = NOUVEAU_GROBJ_BOUND_EXPLICIT;
+
+ BEGIN_RING(chan, RING_GR(gr, 0x0000), 1);
+ OUT_RING (chan, gr->handle);
+}
+
+#endif
diff --git a/src/gallium/drivers/nvc0/Makefile b/src/gallium/drivers/nvc0/Makefile
new file mode 100644
index 00000000000..e1cd188eec5
--- /dev/null
+++ b/src/gallium/drivers/nvc0/Makefile
@@ -0,0 +1,34 @@
+TOP = ../../../..
+include $(TOP)/configs/current
+
+LIBNAME = nvc0
+
+C_SOURCES = \
+ nvc0_context.c \
+ nvc0_draw.c \
+ nvc0_formats.c \
+ nvc0_miptree.c \
+ nvc0_resource.c \
+ nvc0_screen.c \
+ nvc0_state.c \
+ nvc0_state_validate.c \
+ nvc0_surface.c \
+ nvc0_tex.c \
+ nvc0_transfer.c \
+ nvc0_vbo.c \
+ nvc0_program.c \
+ nvc0_shader_state.c \
+ nvc0_pc.c \
+ nvc0_pc_print.c \
+ nvc0_pc_emit.c \
+ nvc0_tgsi_to_nc.c \
+ nvc0_pc_optimize.c \
+ nvc0_pc_regalloc.c \
+ nvc0_push.c \
+ nvc0_push2.c \
+ nvc0_query.c
+
+LIBRARY_INCLUDES = \
+ $(LIBDRM_CFLAGS)
+
+include ../../Makefile.template
diff --git a/src/gallium/drivers/nvc0/SConscript b/src/gallium/drivers/nvc0/SConscript
new file mode 100644
index 00000000000..dbbbf663b33
--- /dev/null
+++ b/src/gallium/drivers/nvc0/SConscript
@@ -0,0 +1,33 @@
+Import('*')
+
+env = env.Clone()
+
+nvc0 = env.ConvenienceLibrary(
+ target = 'nvc0',
+ source = [
+ 'nvc0_context.c',
+ 'nvc0_draw.c',
+ 'nvc0_formats.c',
+ 'nvc0_miptree.c',
+ 'nvc0_resource.c',
+ 'nvc0_screen.c',
+ 'nvc0_state.c',
+ 'nvc0_state_validate.c',
+ 'nvc0_surface.c',
+ 'nvc0_tex.c',
+ 'nvc0_transfer.c',
+ 'nvc0_vbo.c',
+ 'nvc0_program.c',
+ 'nvc0_shader_state.c',
+ 'nvc0_pc.c',
+ 'nvc0_pc_print.c',
+ 'nvc0_pc_emit.c',
+ 'nvc0_tgsi_to_nc.c',
+ 'nvc0_pc_optimize.c',
+ 'nvc0_pc_regalloc.c',
+ 'nvc0_push.c',
+ 'nvc0_push2.c',
+ 'nvc0_query.c'
+ ])
+
+Export('nvc0')
diff --git a/src/gallium/drivers/nvc0/nvc0_2d.xml.h b/src/gallium/drivers/nvc0/nvc0_2d.xml.h
new file mode 100644
index 00000000000..aebcd510e8e
--- /dev/null
+++ b/src/gallium/drivers/nvc0/nvc0_2d.xml.h
@@ -0,0 +1,380 @@
+#ifndef NVC0_2D_XML
+#define NVC0_2D_XML
+
+/* Autogenerated file, DO NOT EDIT manually!
+
+This file was generated by the rules-ng-ng headergen tool in this git repository:
+http://0x04.net/cgit/index.cgi/rules-ng-ng
+git clone git://0x04.net/rules-ng-ng
+
+The rules-ng-ng source files this header was generated from are:
+- nvc0_2d.xml ( 9454 bytes, from 2010-10-16 16:03:11)
+- copyright.xml ( 6498 bytes, from 2010-10-03 13:18:37)
+- nv_object.xml ( 11379 bytes, from 2010-10-16 11:43:24)
+- nvchipsets.xml ( 2907 bytes, from 2010-10-15 16:28:21)
+- nv_defs.xml ( 4437 bytes, from 2010-07-06 07:43:58)
+- nv50_defs.xml ( 4482 bytes, from 2010-10-03 13:18:37)
+
+Copyright (C) 2006-2010 by the following authors:
+- Artur Huillet <arthur.huillet@free.fr> (ahuillet)
+- Ben Skeggs (darktama, darktama_)
+- B. R. <koala_br@users.sourceforge.net> (koala_br)
+- Carlos Martin <carlosmn@users.sf.net> (carlosmn)
+- Christoph Bumiller <e0425955@student.tuwien.ac.at> (calim, chrisbmr)
+- Dawid Gajownik <gajownik@users.sf.net> (gajownik)
+- Dmitry Baryshkov
+- Dmitry Eremin-Solenikov <lumag@users.sf.net> (lumag)
+- EdB <edb_@users.sf.net> (edb_)
+- Erik Waling <erikwailing@users.sf.net> (erikwaling)
+- Francisco Jerez <currojerez@riseup.net> (curro, curro_, currojerez)
+- imirkin <imirkin@users.sf.net> (imirkin)
+- jb17bsome <jb17bsome@bellsouth.net> (jb17bsome)
+- Jeremy Kolb <kjeremy@users.sf.net> (kjeremy)
+- Laurent Carlier <lordheavym@gmail.com> (lordheavy)
+- Luca Barbieri <luca@luca-barbieri.com> (lb, lb1)
+- Maarten Maathuis <madman2003@gmail.com> (stillunknown)
+- Marcin Kościelnicki <koriakin@0x04.net> (mwk, koriakin)
+- Mark Carey <mark.carey@gmail.com> (careym)
+- Matthieu Castet <matthieu.castet@parrot.com> (mat-c)
+- nvidiaman <nvidiaman@users.sf.net> (nvidiaman)
+- Patrice Mandin <patmandin@gmail.com> (pmandin, pmdata)
+- Pekka Paalanen <pq@iki.fi> (pq, ppaalanen)
+- Peter Popov <ironpeter@users.sf.net> (ironpeter)
+- Richard Hughes <hughsient@users.sf.net> (hughsient)
+- Rudi Cilibrasi <cilibrar@users.sf.net> (cilibrar)
+- Serge Martin
+- Simon Raffeiner
+- Stephane Loeuillet <leroutier@users.sf.net> (leroutier)
+- Stephane Marchesin <stephane.marchesin@gmail.com> (marcheu)
+- sturmflut <sturmflut@users.sf.net> (sturmflut)
+- Sylvain Munaut <tnt@246tNt.com>
+- Victor Stinner <victor.stinner@haypocalc.com> (haypo)
+- Wladmir van der Laan <laanwj@gmail.com> (miathan6)
+- Younes Manton <younes.m@gmail.com> (ymanton)
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice (including the
+next paragraph) shall be included in all copies or substantial
+portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE COPYRIGHT OWNER(S) AND/OR ITS SUPPLIERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+*/
+
+
+
+#define NVC0_2D_DST_FORMAT 0x00000200
+
+#define NVC0_2D_DST_LINEAR 0x00000204
+
+#define NVC0_2D_DST_TILE_MODE 0x00000208
+
+#define NVC0_2D_DST_DEPTH 0x0000020c
+
+#define NVC0_2D_DST_LAYER 0x00000210
+
+#define NVC0_2D_DST_PITCH 0x00000214
+
+#define NVC0_2D_DST_WIDTH 0x00000218
+
+#define NVC0_2D_DST_HEIGHT 0x0000021c
+
+#define NVC0_2D_DST_ADDRESS_HIGH 0x00000220
+
+#define NVC0_2D_DST_ADDRESS_LOW 0x00000224
+
+#define NVC0_2D_UNK228 0x00000228
+
+#define NVC0_2D_SRC_FORMAT 0x00000230
+
+#define NVC0_2D_SRC_LINEAR 0x00000234
+
+#define NVC0_2D_SRC_TILE_MODE 0x00000238
+
+#define NVC0_2D_SRC_DEPTH 0x0000023c
+
+#define NVC0_2D_SRC_LAYER 0x00000240
+
+#define NVC0_2D_SRC_PITCH 0x00000244
+#define NVC0_2D_SRC_PITCH__MAX 0x00040000
+
+#define NVC0_2D_SRC_WIDTH 0x00000248
+#define NVC0_2D_SRC_WIDTH__MAX 0x00010000
+
+#define NVC0_2D_SRC_HEIGHT 0x0000024c
+#define NVC0_2D_SRC_HEIGHT__MAX 0x00010000
+
+#define NVC0_2D_SRC_ADDRESS_HIGH 0x00000250
+
+#define NVC0_2D_SRC_ADDRESS_LOW 0x00000254
+
+#define NVC0_2D_UNK258 0x00000258
+
+#define NVC0_2D_UNK260 0x00000260
+
+#define NVC0_2D_COND_ADDRESS_HIGH 0x00000264
+
+#define NVC0_2D_COND_ADDRESS_LOW 0x00000268
+
+#define NVC0_2D_COND_MODE 0x0000026c
+#define NVC0_2D_COND_MODE_NEVER 0x00000000
+#define NVC0_2D_COND_MODE_ALWAYS 0x00000001
+#define NVC0_2D_COND_MODE_RES_NON_ZERO 0x00000002
+#define NVC0_2D_COND_MODE_EQUAL 0x00000003
+#define NVC0_2D_COND_MODE_NOT_EQUAL 0x00000004
+
+#define NVC0_2D_CLIP_X 0x00000280
+
+#define NVC0_2D_CLIP_Y 0x00000284
+
+#define NVC0_2D_CLIP_W 0x00000288
+
+#define NVC0_2D_CLIP_H 0x0000028c
+
+#define NVC0_2D_CLIP_ENABLE 0x00000290
+
+#define NVC0_2D_COLOR_KEY_FORMAT 0x00000294
+#define NVC0_2D_COLOR_KEY_FORMAT_16BPP 0x00000000
+#define NVC0_2D_COLOR_KEY_FORMAT_15BPP 0x00000001
+#define NVC0_2D_COLOR_KEY_FORMAT_24BPP 0x00000002
+#define NVC0_2D_COLOR_KEY_FORMAT_30BPP 0x00000003
+#define NVC0_2D_COLOR_KEY_FORMAT_8BPP 0x00000004
+#define NVC0_2D_COLOR_KEY_FORMAT_16BPP2 0x00000005
+#define NVC0_2D_COLOR_KEY_FORMAT_32BPP 0x00000006
+
+#define NVC0_2D_COLOR_KEY 0x00000298
+
+#define NVC0_2D_COLOR_KEY_ENABLE 0x0000029c
+
+#define NVC0_2D_ROP 0x000002a0
+
+#define NVC0_2D_BETA1 0x000002a4
+
+#define NVC0_2D_BETA4 0x000002a8
+
+#define NVC0_2D_OPERATION 0x000002ac
+#define NVC0_2D_OPERATION_SRCCOPY_AND 0x00000000
+#define NVC0_2D_OPERATION_ROP_AND 0x00000001
+#define NVC0_2D_OPERATION_BLEND_AND 0x00000002
+#define NVC0_2D_OPERATION_SRCCOPY 0x00000003
+#define NVC0_2D_OPERATION_UNK4 0x00000004
+#define NVC0_2D_OPERATION_SRCCOPY_PREMULT 0x00000005
+#define NVC0_2D_OPERATION_BLEND_PREMULT 0x00000006
+
+#define NVC0_2D_UNK2B0 0x000002b0
+#define NVC0_2D_UNK2B0_UNK0__MASK 0x0000003f
+#define NVC0_2D_UNK2B0_UNK0__SHIFT 0
+#define NVC0_2D_UNK2B0_UNK1__MASK 0x00003f00
+#define NVC0_2D_UNK2B0_UNK1__SHIFT 8
+
+#define NVC0_2D_PATTERN_SELECT 0x000002b4
+#define NVC0_2D_PATTERN_SELECT_MONO_8X8 0x00000000
+#define NVC0_2D_PATTERN_SELECT_MONO_64X1 0x00000001
+#define NVC0_2D_PATTERN_SELECT_MONO_1X64 0x00000002
+#define NVC0_2D_PATTERN_SELECT_COLOR 0x00000003
+
+#define NVC0_2D_PATTERN_COLOR_FORMAT 0x000002e8
+#define NVC0_2D_PATTERN_COLOR_FORMAT_16BPP 0x00000000
+#define NVC0_2D_PATTERN_COLOR_FORMAT_15BPP 0x00000001
+#define NVC0_2D_PATTERN_COLOR_FORMAT_32BPP 0x00000002
+#define NVC0_2D_PATTERN_COLOR_FORMAT_8BPP 0x00000003
+#define NVC0_2D_PATTERN_COLOR_FORMAT_UNK4 0x00000004
+#define NVC0_2D_PATTERN_COLOR_FORMAT_UNK5 0x00000005
+
+#define NVC0_2D_PATTERN_MONO_FORMAT 0x000002ec
+#define NVC0_2D_PATTERN_MONO_FORMAT_CGA6 0x00000000
+#define NVC0_2D_PATTERN_MONO_FORMAT_LE 0x00000001
+
+#define NVC0_2D_PATTERN_COLOR(i0) (0x000002f0 + 0x4*(i0))
+#define NVC0_2D_PATTERN_COLOR__ESIZE 0x00000004
+#define NVC0_2D_PATTERN_COLOR__LEN 0x00000002
+
+#define NVC0_2D_PATTERN_BITMAP(i0) (0x000002f8 + 0x4*(i0))
+#define NVC0_2D_PATTERN_BITMAP__ESIZE 0x00000004
+#define NVC0_2D_PATTERN_BITMAP__LEN 0x00000002
+
+#define NVC0_2D_PATTERN_X8R8G8B8(i0) (0x00000300 + 0x4*(i0))
+#define NVC0_2D_PATTERN_X8R8G8B8__ESIZE 0x00000004
+#define NVC0_2D_PATTERN_X8R8G8B8__LEN 0x00000040
+#define NVC0_2D_PATTERN_X8R8G8B8_B__MASK 0x000000ff
+#define NVC0_2D_PATTERN_X8R8G8B8_B__SHIFT 0
+#define NVC0_2D_PATTERN_X8R8G8B8_G__MASK 0x0000ff00
+#define NVC0_2D_PATTERN_X8R8G8B8_G__SHIFT 8
+#define NVC0_2D_PATTERN_X8R8G8B8_R__MASK 0x00ff0000
+#define NVC0_2D_PATTERN_X8R8G8B8_R__SHIFT 16
+
+#define NVC0_2D_PATTERN_R5G6B5(i0) (0x00000400 + 0x4*(i0))
+#define NVC0_2D_PATTERN_R5G6B5__ESIZE 0x00000004
+#define NVC0_2D_PATTERN_R5G6B5__LEN 0x00000020
+#define NVC0_2D_PATTERN_R5G6B5_B0__MASK 0x0000001f
+#define NVC0_2D_PATTERN_R5G6B5_B0__SHIFT 0
+#define NVC0_2D_PATTERN_R5G6B5_G0__MASK 0x000007e0
+#define NVC0_2D_PATTERN_R5G6B5_G0__SHIFT 5
+#define NVC0_2D_PATTERN_R5G6B5_R0__MASK 0x0000f800
+#define NVC0_2D_PATTERN_R5G6B5_R0__SHIFT 11
+#define NVC0_2D_PATTERN_R5G6B5_B1__MASK 0x001f0000
+#define NVC0_2D_PATTERN_R5G6B5_B1__SHIFT 16
+#define NVC0_2D_PATTERN_R5G6B5_G1__MASK 0x07e00000
+#define NVC0_2D_PATTERN_R5G6B5_G1__SHIFT 21
+#define NVC0_2D_PATTERN_R5G6B5_R1__MASK 0xf8000000
+#define NVC0_2D_PATTERN_R5G6B5_R1__SHIFT 27
+
+#define NVC0_2D_PATTERN_X1R5G5B5(i0) (0x00000480 + 0x4*(i0))
+#define NVC0_2D_PATTERN_X1R5G5B5__ESIZE 0x00000004
+#define NVC0_2D_PATTERN_X1R5G5B5__LEN 0x00000020
+#define NVC0_2D_PATTERN_X1R5G5B5_B0__MASK 0x0000001f
+#define NVC0_2D_PATTERN_X1R5G5B5_B0__SHIFT 0
+#define NVC0_2D_PATTERN_X1R5G5B5_G0__MASK 0x000003e0
+#define NVC0_2D_PATTERN_X1R5G5B5_G0__SHIFT 5
+#define NVC0_2D_PATTERN_X1R5G5B5_R0__MASK 0x00007c00
+#define NVC0_2D_PATTERN_X1R5G5B5_R0__SHIFT 10
+#define NVC0_2D_PATTERN_X1R5G5B5_B1__MASK 0x001f0000
+#define NVC0_2D_PATTERN_X1R5G5B5_B1__SHIFT 16
+#define NVC0_2D_PATTERN_X1R5G5B5_G1__MASK 0x03e00000
+#define NVC0_2D_PATTERN_X1R5G5B5_G1__SHIFT 21
+#define NVC0_2D_PATTERN_X1R5G5B5_R1__MASK 0x7c000000
+#define NVC0_2D_PATTERN_X1R5G5B5_R1__SHIFT 26
+
+#define NVC0_2D_PATTERN_Y8(i0) (0x00000500 + 0x4*(i0))
+#define NVC0_2D_PATTERN_Y8__ESIZE 0x00000004
+#define NVC0_2D_PATTERN_Y8__LEN 0x00000010
+#define NVC0_2D_PATTERN_Y8_Y0__MASK 0x000000ff
+#define NVC0_2D_PATTERN_Y8_Y0__SHIFT 0
+#define NVC0_2D_PATTERN_Y8_Y1__MASK 0x0000ff00
+#define NVC0_2D_PATTERN_Y8_Y1__SHIFT 8
+#define NVC0_2D_PATTERN_Y8_Y2__MASK 0x00ff0000
+#define NVC0_2D_PATTERN_Y8_Y2__SHIFT 16
+#define NVC0_2D_PATTERN_Y8_Y3__MASK 0xff000000
+#define NVC0_2D_PATTERN_Y8_Y3__SHIFT 24
+
+#define NVC0_2D_DRAW_SHAPE 0x00000580
+#define NVC0_2D_DRAW_SHAPE_POINTS 0x00000000
+#define NVC0_2D_DRAW_SHAPE_LINES 0x00000001
+#define NVC0_2D_DRAW_SHAPE_LINE_STRIP 0x00000002
+#define NVC0_2D_DRAW_SHAPE_TRIANGLES 0x00000003
+#define NVC0_2D_DRAW_SHAPE_RECTANGLES 0x00000004
+
+#define NVC0_2D_DRAW_COLOR_FORMAT 0x00000584
+
+#define NVC0_2D_DRAW_COLOR 0x00000588
+
+#define NVC0_2D_UNK58C 0x0000058c
+#define NVC0_2D_UNK58C_0 0x00000001
+#define NVC0_2D_UNK58C_1 0x00000010
+#define NVC0_2D_UNK58C_2 0x00000100
+#define NVC0_2D_UNK58C_3 0x00001000
+
+#define NVC0_2D_DRAW_POINT16 0x000005e0
+#define NVC0_2D_DRAW_POINT16_X__MASK 0x0000ffff
+#define NVC0_2D_DRAW_POINT16_X__SHIFT 0
+#define NVC0_2D_DRAW_POINT16_Y__MASK 0xffff0000
+#define NVC0_2D_DRAW_POINT16_Y__SHIFT 16
+
+#define NVC0_2D_DRAW_POINT32_X(i0) (0x00000600 + 0x8*(i0))
+#define NVC0_2D_DRAW_POINT32_X__ESIZE 0x00000008
+#define NVC0_2D_DRAW_POINT32_X__LEN 0x00000040
+
+#define NVC0_2D_DRAW_POINT32_Y(i0) (0x00000604 + 0x8*(i0))
+#define NVC0_2D_DRAW_POINT32_Y__ESIZE 0x00000008
+#define NVC0_2D_DRAW_POINT32_Y__LEN 0x00000040
+
+#define NVC0_2D_SIFC_BITMAP_ENABLE 0x00000800
+
+#define NVC0_2D_SIFC_FORMAT 0x00000804
+
+#define NVC0_2D_SIFC_BITMAP_FORMAT 0x00000808
+#define NVC0_2D_SIFC_BITMAP_FORMAT_I1 0x00000000
+#define NVC0_2D_SIFC_BITMAP_FORMAT_I4 0x00000001
+#define NVC0_2D_SIFC_BITMAP_FORMAT_I8 0x00000002
+
+#define NVC0_2D_SIFC_BITMAP_LSB_FIRST 0x0000080c
+
+#define NVC0_2D_SIFC_BITMAP_LINE_PACK_MODE 0x00000810
+#define NVC0_2D_SIFC_BITMAP_LINE_PACK_MODE_PACKED 0x00000000
+#define NVC0_2D_SIFC_BITMAP_LINE_PACK_MODE_ALIGN_BYTE 0x00000001
+#define NVC0_2D_SIFC_BITMAP_LINE_PACK_MODE_ALIGN_WORD 0x00000002
+
+#define NVC0_2D_SIFC_BITMAP_COLOR_BIT0 0x00000814
+
+#define NVC0_2D_SIFC_BITMAP_COLOR_BIT1 0x00000818
+
+#define NVC0_2D_SIFC_BITMAP_WRITE_BIT0_ENABLE 0x0000081c
+
+#define NVC0_2D_SIFC_WIDTH 0x00000838
+
+#define NVC0_2D_SIFC_HEIGHT 0x0000083c
+
+#define NVC0_2D_SIFC_DX_DU_FRACT 0x00000840
+
+#define NVC0_2D_SIFC_DX_DU_INT 0x00000844
+
+#define NVC0_2D_SIFC_DY_DV_FRACT 0x00000848
+
+#define NVC0_2D_SIFC_DY_DV_INT 0x0000084c
+
+#define NVC0_2D_SIFC_DST_X_FRACT 0x00000850
+
+#define NVC0_2D_SIFC_DST_X_INT 0x00000854
+
+#define NVC0_2D_SIFC_DST_Y_FRACT 0x00000858
+
+#define NVC0_2D_SIFC_DST_Y_INT 0x0000085c
+
+#define NVC0_2D_SIFC_DATA 0x00000860
+
+#define NVC0_2D_UNK0870 0x00000870
+
+#define NVC0_2D_UNK0880 0x00000880
+
+#define NVC0_2D_UNK0884 0x00000884
+
+#define NVC0_2D_UNK0888 0x00000888
+
+#define NVC0_2D_BLIT_CONTROL 0x0000088c
+#define NVC0_2D_BLIT_CONTROL_ORIGIN__MASK 0x00000001
+#define NVC0_2D_BLIT_CONTROL_ORIGIN__SHIFT 0
+#define NVC0_2D_BLIT_CONTROL_ORIGIN_CENTER 0x00000000
+#define NVC0_2D_BLIT_CONTROL_ORIGIN_CORNER 0x00000001
+#define NVC0_2D_BLIT_CONTROL_FILTER__MASK 0x00000010
+#define NVC0_2D_BLIT_CONTROL_FILTER__SHIFT 4
+#define NVC0_2D_BLIT_CONTROL_FILTER_POINT_SAMPLE 0x00000000
+#define NVC0_2D_BLIT_CONTROL_FILTER_BILINEAR 0x00000010
+
+#define NVC0_2D_BLIT_DST_X 0x000008b0
+
+#define NVC0_2D_BLIT_DST_Y 0x000008b4
+
+#define NVC0_2D_BLIT_DST_W 0x000008b8
+
+#define NVC0_2D_BLIT_DST_H 0x000008bc
+
+#define NVC0_2D_BLIT_DU_DX_FRACT 0x000008c0
+
+#define NVC0_2D_BLIT_DU_DX_INT 0x000008c4
+
+#define NVC0_2D_BLIT_DV_DY_FRACT 0x000008c8
+
+#define NVC0_2D_BLIT_DV_DY_INT 0x000008cc
+
+#define NVC0_2D_BLIT_SRC_X_FRACT 0x000008d0
+
+#define NVC0_2D_BLIT_SRC_X_INT 0x000008d4
+
+#define NVC0_2D_BLIT_SRC_Y_FRACT 0x000008d8
+
+#define NVC0_2D_BLIT_SRC_Y_INT 0x000008dc
+
+
+#endif /* NVC0_2D_XML */
diff --git a/src/gallium/drivers/nvc0/nvc0_3d.xml.h b/src/gallium/drivers/nvc0/nvc0_3d.xml.h
new file mode 100644
index 00000000000..94fa081ad7e
--- /dev/null
+++ b/src/gallium/drivers/nvc0/nvc0_3d.xml.h
@@ -0,0 +1,1244 @@
+#ifndef NVC0_3D_XML
+#define NVC0_3D_XML
+
+/* Autogenerated file, DO NOT EDIT manually!
+
+This file was generated by the rules-ng-ng headergen tool in this git repository:
+http://0x04.net/cgit/index.cgi/rules-ng-ng
+git clone git://0x04.net/rules-ng-ng
+
+The rules-ng-ng source files this header was generated from are:
+- nvc0_3d.xml ( 30827 bytes, from 2011-01-13 18:23:07)
+- copyright.xml ( 6452 bytes, from 2010-11-25 23:28:20)
+- nv_defs.xml ( 4437 bytes, from 2010-07-06 07:43:58)
+- nv_3ddefs.xml ( 16394 bytes, from 2010-12-17 15:10:40)
+- nv_object.xml ( 11898 bytes, from 2010-12-23 14:14:20)
+- nvchipsets.xml ( 3074 bytes, from 2010-11-07 00:36:28)
+- nv50_defs.xml ( 4487 bytes, from 2010-12-10 00:37:17)
+
+Copyright (C) 2006-2011 by the following authors:
+- Artur Huillet <arthur.huillet@free.fr> (ahuillet)
+- Ben Skeggs (darktama, darktama_)
+- B. R. <koala_br@users.sourceforge.net> (koala_br)
+- Carlos Martin <carlosmn@users.sf.net> (carlosmn)
+- Christoph Bumiller <e0425955@student.tuwien.ac.at> (calim, chrisbmr)
+- Dawid Gajownik <gajownik@users.sf.net> (gajownik)
+- Dmitry Baryshkov
+- Dmitry Eremin-Solenikov <lumag@users.sf.net> (lumag)
+- EdB <edb_@users.sf.net> (edb_)
+- Erik Waling <erikwailing@users.sf.net> (erikwaling)
+- Francisco Jerez <currojerez@riseup.net> (curro)
+- imirkin <imirkin@users.sf.net> (imirkin)
+- jb17bsome <jb17bsome@bellsouth.net> (jb17bsome)
+- Jeremy Kolb <kjeremy@users.sf.net> (kjeremy)
+- Laurent Carlier <lordheavym@gmail.com> (lordheavy)
+- Luca Barbieri <luca@luca-barbieri.com> (lb, lb1)
+- Maarten Maathuis <madman2003@gmail.com> (stillunknown)
+- Marcin Kościelnicki <koriakin@0x04.net> (mwk, koriakin)
+- Mark Carey <mark.carey@gmail.com> (careym)
+- Matthieu Castet <matthieu.castet@parrot.com> (mat-c)
+- nvidiaman <nvidiaman@users.sf.net> (nvidiaman)
+- Patrice Mandin <patmandin@gmail.com> (pmandin, pmdata)
+- Pekka Paalanen <pq@iki.fi> (pq, ppaalanen)
+- Peter Popov <ironpeter@users.sf.net> (ironpeter)
+- Richard Hughes <hughsient@users.sf.net> (hughsient)
+- Rudi Cilibrasi <cilibrar@users.sf.net> (cilibrar)
+- Serge Martin
+- Simon Raffeiner
+- Stephane Loeuillet <leroutier@users.sf.net> (leroutier)
+- Stephane Marchesin <stephane.marchesin@gmail.com> (marcheu)
+- sturmflut <sturmflut@users.sf.net> (sturmflut)
+- Sylvain Munaut <tnt@246tNt.com>
+- Victor Stinner <victor.stinner@haypocalc.com> (haypo)
+- Wladmir van der Laan <laanwj@gmail.com> (miathan6)
+- Younes Manton <younes.m@gmail.com> (ymanton)
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice (including the
+next paragraph) shall be included in all copies or substantial
+portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE COPYRIGHT OWNER(S) AND/OR ITS SUPPLIERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+*/
+
+
+
+#define NVC0_3D_NOTIFY_ADDRESS_HIGH 0x00000104
+#define NVC0_3D_NOTIFY_ADDRESS_LOW 0x00000108
+#define NVC0_3D_NOTIFY 0x0000010c
+
+#define NVC0_3D_SERIALIZE 0x00000110
+
+#define NVC0_3D_EARLY_FRAGMENT_TESTS 0x00000210
+
+#define NVC0_3D_MEM_BARRIER 0x0000021c
+#define NVC0_3D_MEM_BARRIER_UNK0 0x00000001
+#define NVC0_3D_MEM_BARRIER_UNK1 0x00000002
+#define NVC0_3D_MEM_BARRIER_UNK2 0x00000004
+#define NVC0_3D_MEM_BARRIER_UNK4 0x00000010
+#define NVC0_3D_MEM_BARRIER_UNK8 0x00000100
+#define NVC0_3D_MEM_BARRIER_UNK12 0x00001000
+
+#define NVC0_3D_TESS_MODE 0x00000320
+#define NVC0_3D_TESS_MODE_PRIM__MASK 0x0000000f
+#define NVC0_3D_TESS_MODE_PRIM__SHIFT 0
+#define NVC0_3D_TESS_MODE_PRIM_ISOLINES 0x00000000
+#define NVC0_3D_TESS_MODE_PRIM_TRIANGLES 0x00000001
+#define NVC0_3D_TESS_MODE_PRIM_QUADS 0x00000002
+#define NVC0_3D_TESS_MODE_SPACING__MASK 0x000000f0
+#define NVC0_3D_TESS_MODE_SPACING__SHIFT 4
+#define NVC0_3D_TESS_MODE_SPACING_EQUAL 0x00000000
+#define NVC0_3D_TESS_MODE_SPACING_FRACTIONAL_ODD 0x00000010
+#define NVC0_3D_TESS_MODE_SPACING_FRACTIONAL_EVEN 0x00000020
+#define NVC0_3D_TESS_MODE_CW 0x00000100
+#define NVC0_3D_TESS_MODE_CONNECTED 0x00000200
+
+#define NVC0_3D_TESS_LEVEL_OUTER(i0) (0x00000324 + 0x4*(i0))
+#define NVC0_3D_TESS_LEVEL_OUTER__ESIZE 0x00000004
+#define NVC0_3D_TESS_LEVEL_OUTER__LEN 0x00000004
+
+#define NVC0_3D_TESS_LEVEL_INNER(i0) (0x00000334 + 0x4*(i0))
+#define NVC0_3D_TESS_LEVEL_INNER__ESIZE 0x00000004
+#define NVC0_3D_TESS_LEVEL_INNER__LEN 0x00000002
+
+#define NVC0_3D_RASTERIZE_ENABLE 0x0000037c
+
+#define NVC0_3D_TFB(i0) (0x00000380 + 0x20*(i0))
+#define NVC0_3D_TFB__ESIZE 0x00000020
+#define NVC0_3D_TFB__LEN 0x00000004
+
+#define NVC0_3D_TFB_BUFFER_ENABLE(i0) (0x00000380 + 0x20*(i0))
+
+#define NVC0_3D_TFB_ADDRESS_HIGH(i0) (0x00000384 + 0x20*(i0))
+
+#define NVC0_3D_TFB_ADDRESS_LOW(i0) (0x00000388 + 0x20*(i0))
+
+#define NVC0_3D_TFB_BUFFER_SIZE(i0) (0x0000038c + 0x20*(i0))
+
+#define NVC0_3D_TFB_PRIMITIVE_ID(i0) (0x00000390 + 0x20*(i0))
+
+#define NVC0_3D_TFB_UNK07X0(i0) (0x00000700 + 0x10*(i0))
+#define NVC0_3D_TFB_UNK07X0__ESIZE 0x00000010
+#define NVC0_3D_TFB_UNK07X0__LEN 0x00000004
+
+#define NVC0_3D_TFB_VARYING_COUNT(i0) (0x00000704 + 0x10*(i0))
+#define NVC0_3D_TFB_VARYING_COUNT__ESIZE 0x00000010
+#define NVC0_3D_TFB_VARYING_COUNT__LEN 0x00000004
+
+#define NVC0_3D_TFB_BUFFER_STRIDE(i0) (0x00000708 + 0x10*(i0))
+#define NVC0_3D_TFB_BUFFER_STRIDE__ESIZE 0x00000010
+#define NVC0_3D_TFB_BUFFER_STRIDE__LEN 0x00000004
+
+#define NVC0_3D_TFB_ENABLE 0x00000744
+
+#define NVC0_3D_LOCAL_BASE 0x0000077c
+
+#define NVC0_3D_LOCAL_ADDRESS_HIGH 0x00000790
+
+#define NVC0_3D_LOCAL_ADDRESS_LOW 0x00000794
+
+#define NVC0_3D_LOCAL_SIZE_HIGH 0x00000798
+
+#define NVC0_3D_LOCAL_SIZE_LOW 0x0000079c
+
+#define NVC0_3D_RT(i0) (0x00000800 + 0x40*(i0))
+#define NVC0_3D_RT__ESIZE 0x00000040
+#define NVC0_3D_RT__LEN 0x00000008
+
+#define NVC0_3D_RT_ADDRESS_HIGH(i0) (0x00000800 + 0x40*(i0))
+
+#define NVC0_3D_RT_ADDRESS_LOW(i0) (0x00000804 + 0x40*(i0))
+
+#define NVC0_3D_RT_HORIZ(i0) (0x00000808 + 0x40*(i0))
+
+#define NVC0_3D_RT_VERT(i0) (0x0000080c + 0x40*(i0))
+
+#define NVC0_3D_RT_FORMAT(i0) (0x00000810 + 0x40*(i0))
+
+#define NVC0_3D_RT_TILE_MODE(i0) (0x00000814 + 0x40*(i0))
+#define NVC0_3D_RT_TILE_MODE_X 0x00000001
+#define NVC0_3D_RT_TILE_MODE_Y__MASK 0x00000070
+#define NVC0_3D_RT_TILE_MODE_Y__SHIFT 4
+#define NVC0_3D_RT_TILE_MODE_Z__MASK 0x00000700
+#define NVC0_3D_RT_TILE_MODE_Z__SHIFT 8
+#define NVC0_3D_RT_TILE_MODE_LINEAR 0x00001000
+#define NVC0_3D_RT_TILE_MODE_UNK16 0x00010000
+
+#define NVC0_3D_RT_ARRAY_MODE(i0) (0x00000818 + 0x40*(i0))
+#define NVC0_3D_RT_ARRAY_MODE_LAYERS__MASK 0x0000ffff
+#define NVC0_3D_RT_ARRAY_MODE_LAYERS__SHIFT 0
+#define NVC0_3D_RT_ARRAY_MODE_VOLUME 0x00010000
+
+#define NVC0_3D_RT_LAYER_STRIDE(i0) (0x0000081c + 0x40*(i0))
+
+#define NVC0_3D_RT_BASE_LAYER(i0) (0x00000820 + 0x40*(i0))
+
+#define NVC0_3D_RT_UNK14(i0) (0x00000824 + 0x40*(i0))
+
+#define NVC0_3D_VIEWPORT_SCALE_X(i0) (0x00000a00 + 0x20*(i0))
+#define NVC0_3D_VIEWPORT_SCALE_X__ESIZE 0x00000020
+#define NVC0_3D_VIEWPORT_SCALE_X__LEN 0x00000010
+
+#define NVC0_3D_VIEWPORT_SCALE_Y(i0) (0x00000a04 + 0x20*(i0))
+#define NVC0_3D_VIEWPORT_SCALE_Y__ESIZE 0x00000020
+#define NVC0_3D_VIEWPORT_SCALE_Y__LEN 0x00000010
+
+#define NVC0_3D_VIEWPORT_SCALE_Z(i0) (0x00000a08 + 0x20*(i0))
+#define NVC0_3D_VIEWPORT_SCALE_Z__ESIZE 0x00000020
+#define NVC0_3D_VIEWPORT_SCALE_Z__LEN 0x00000010
+
+#define NVC0_3D_VIEWPORT_TRANSLATE_X(i0) (0x00000a0c + 0x20*(i0))
+#define NVC0_3D_VIEWPORT_TRANSLATE_X__ESIZE 0x00000020
+#define NVC0_3D_VIEWPORT_TRANSLATE_X__LEN 0x00000010
+
+#define NVC0_3D_VIEWPORT_TRANSLATE_Y(i0) (0x00000a10 + 0x20*(i0))
+#define NVC0_3D_VIEWPORT_TRANSLATE_Y__ESIZE 0x00000020
+#define NVC0_3D_VIEWPORT_TRANSLATE_Y__LEN 0x00000010
+
+#define NVC0_3D_VIEWPORT_TRANSLATE_Z(i0) (0x00000a14 + 0x20*(i0))
+#define NVC0_3D_VIEWPORT_TRANSLATE_Z__ESIZE 0x00000020
+#define NVC0_3D_VIEWPORT_TRANSLATE_Z__LEN 0x00000010
+
+#define NVC0_3D_VIEWPORT_HORIZ(i0) (0x00000c00 + 0x10*(i0))
+#define NVC0_3D_VIEWPORT_HORIZ__ESIZE 0x00000010
+#define NVC0_3D_VIEWPORT_HORIZ__LEN 0x00000010
+#define NVC0_3D_VIEWPORT_HORIZ_X__MASK 0x0000ffff
+#define NVC0_3D_VIEWPORT_HORIZ_X__SHIFT 0
+#define NVC0_3D_VIEWPORT_HORIZ_W__MASK 0xffff0000
+#define NVC0_3D_VIEWPORT_HORIZ_W__SHIFT 16
+
+#define NVC0_3D_VIEWPORT_VERT(i0) (0x00000c04 + 0x10*(i0))
+#define NVC0_3D_VIEWPORT_VERT__ESIZE 0x00000010
+#define NVC0_3D_VIEWPORT_VERT__LEN 0x00000010
+#define NVC0_3D_VIEWPORT_VERT_Y__MASK 0x0000ffff
+#define NVC0_3D_VIEWPORT_VERT_Y__SHIFT 0
+#define NVC0_3D_VIEWPORT_VERT_H__MASK 0xffff0000
+#define NVC0_3D_VIEWPORT_VERT_H__SHIFT 16
+
+#define NVC0_3D_DEPTH_RANGE_NEAR(i0) (0x00000c08 + 0x10*(i0))
+#define NVC0_3D_DEPTH_RANGE_NEAR__ESIZE 0x00000010
+#define NVC0_3D_DEPTH_RANGE_NEAR__LEN 0x00000010
+
+#define NVC0_3D_DEPTH_RANGE_FAR(i0) (0x00000c0c + 0x10*(i0))
+#define NVC0_3D_DEPTH_RANGE_FAR__ESIZE 0x00000010
+#define NVC0_3D_DEPTH_RANGE_FAR__LEN 0x00000010
+
+#define NVC0_3D_CLIP_RECT_HORIZ(i0) (0x00000d00 + 0x8*(i0))
+#define NVC0_3D_CLIP_RECT_HORIZ__ESIZE 0x00000008
+#define NVC0_3D_CLIP_RECT_HORIZ__LEN 0x00000008
+#define NVC0_3D_CLIP_RECT_HORIZ_MIN__MASK 0x0000ffff
+#define NVC0_3D_CLIP_RECT_HORIZ_MIN__SHIFT 0
+#define NVC0_3D_CLIP_RECT_HORIZ_MAX__MASK 0xffff0000
+#define NVC0_3D_CLIP_RECT_HORIZ_MAX__SHIFT 16
+
+#define NVC0_3D_CLIP_RECT_VERT(i0) (0x00000d04 + 0x8*(i0))
+#define NVC0_3D_CLIP_RECT_VERT__ESIZE 0x00000008
+#define NVC0_3D_CLIP_RECT_VERT__LEN 0x00000008
+#define NVC0_3D_CLIP_RECT_VERT_MIN__MASK 0x0000ffff
+#define NVC0_3D_CLIP_RECT_VERT_MIN__SHIFT 0
+#define NVC0_3D_CLIP_RECT_VERT_MAX__MASK 0xffff0000
+#define NVC0_3D_CLIP_RECT_VERT_MAX__SHIFT 16
+
+#define NVC0_3D_CLIPID_REGION_HORIZ(i0) (0x00000d40 + 0x8*(i0))
+#define NVC0_3D_CLIPID_REGION_HORIZ__ESIZE 0x00000008
+#define NVC0_3D_CLIPID_REGION_HORIZ__LEN 0x00000004
+#define NVC0_3D_CLIPID_REGION_HORIZ_X__MASK 0x0000ffff
+#define NVC0_3D_CLIPID_REGION_HORIZ_X__SHIFT 0
+#define NVC0_3D_CLIPID_REGION_HORIZ_W__MASK 0xffff0000
+#define NVC0_3D_CLIPID_REGION_HORIZ_W__SHIFT 16
+
+#define NVC0_3D_CLIPID_REGION_VERT(i0) (0x00000d44 + 0x8*(i0))
+#define NVC0_3D_CLIPID_REGION_VERT__ESIZE 0x00000008
+#define NVC0_3D_CLIPID_REGION_VERT__LEN 0x00000004
+#define NVC0_3D_CLIPID_REGION_VERT_Y__MASK 0x0000ffff
+#define NVC0_3D_CLIPID_REGION_VERT_Y__SHIFT 0
+#define NVC0_3D_CLIPID_REGION_VERT_H__MASK 0xffff0000
+#define NVC0_3D_CLIPID_REGION_VERT_H__SHIFT 16
+
+#define NVC0_3D_COUNTER_ENABLE 0x00000d68
+#define NVC0_3D_COUNTER_ENABLE_UNK00 0x00000001
+#define NVC0_3D_COUNTER_ENABLE_UNK01 0x00000002
+#define NVC0_3D_COUNTER_ENABLE_UNK02 0x00000004
+#define NVC0_3D_COUNTER_ENABLE_UNK03 0x00000008
+#define NVC0_3D_COUNTER_ENABLE_UNK04 0x00000010
+#define NVC0_3D_COUNTER_ENABLE_EMITTED_PRIMITIVES 0x00000020
+#define NVC0_3D_COUNTER_ENABLE_UNK06 0x00000040
+#define NVC0_3D_COUNTER_ENABLE_UNK07 0x00000080
+#define NVC0_3D_COUNTER_ENABLE_UNK08 0x00000100
+#define NVC0_3D_COUNTER_ENABLE_UNK09 0x00000200
+#define NVC0_3D_COUNTER_ENABLE_GENERATED_PRIMITIVES 0x00000400
+#define NVC0_3D_COUNTER_ENABLE_UNK0B 0x00000800
+#define NVC0_3D_COUNTER_ENABLE_UNK0C 0x00001000
+#define NVC0_3D_COUNTER_ENABLE_UNK0D 0x00002000
+#define NVC0_3D_COUNTER_ENABLE_UNK0E 0x00004000
+#define NVC0_3D_COUNTER_ENABLE_UNK0F 0x00008000
+
+#define NVC0_3D_VERTEX_BUFFER_FIRST 0x00000d74
+
+#define NVC0_3D_VERTEX_BUFFER_COUNT 0x00000d78
+
+#define NVC0_3D_CLEAR_COLOR(i0) (0x00000d80 + 0x4*(i0))
+#define NVC0_3D_CLEAR_COLOR__ESIZE 0x00000004
+#define NVC0_3D_CLEAR_COLOR__LEN 0x00000004
+
+#define NVC0_3D_CLEAR_DEPTH 0x00000d90
+
+#define NVC0_3D_CLEAR_STENCIL 0x00000da0
+
+#define NVC0_3D_POLYGON_SMOOTH_ENABLE 0x00000db4
+
+#define NVC0_3D_POLYGON_OFFSET_POINT_ENABLE 0x00000dc0
+
+#define NVC0_3D_POLYGON_OFFSET_LINE_ENABLE 0x00000dc4
+
+#define NVC0_3D_POLYGON_OFFSET_FILL_ENABLE 0x00000dc8
+
+#define NVC0_3D_PATCH_VERTICES 0x00000dcc
+
+#define NVC0_3D_WINDOW_OFFSET_X 0x00000df8
+
+#define NVC0_3D_WINDOW_OFFSET_Y 0x00000dfc
+
+#define NVC0_3D_SCISSOR_ENABLE(i0) (0x00000e00 + 0x10*(i0))
+#define NVC0_3D_SCISSOR_ENABLE__ESIZE 0x00000010
+#define NVC0_3D_SCISSOR_ENABLE__LEN 0x00000010
+
+#define NVC0_3D_SCISSOR_HORIZ(i0) (0x00000e04 + 0x10*(i0))
+#define NVC0_3D_SCISSOR_HORIZ__ESIZE 0x00000010
+#define NVC0_3D_SCISSOR_HORIZ__LEN 0x00000010
+#define NVC0_3D_SCISSOR_HORIZ_MIN__MASK 0x0000ffff
+#define NVC0_3D_SCISSOR_HORIZ_MIN__SHIFT 0
+#define NVC0_3D_SCISSOR_HORIZ_MAX__MASK 0xffff0000
+#define NVC0_3D_SCISSOR_HORIZ_MAX__SHIFT 16
+
+#define NVC0_3D_SCISSOR_VERT(i0) (0x00000e08 + 0x10*(i0))
+#define NVC0_3D_SCISSOR_VERT__ESIZE 0x00000010
+#define NVC0_3D_SCISSOR_VERT__LEN 0x00000010
+#define NVC0_3D_SCISSOR_VERT_MIN__MASK 0x0000ffff
+#define NVC0_3D_SCISSOR_VERT_MIN__SHIFT 0
+#define NVC0_3D_SCISSOR_VERT_MAX__MASK 0xffff0000
+#define NVC0_3D_SCISSOR_VERT_MAX__SHIFT 16
+
+#define NVC0_3D_STENCIL_BACK_FUNC_REF 0x00000f54
+
+#define NVC0_3D_STENCIL_BACK_MASK 0x00000f58
+
+#define NVC0_3D_STENCIL_BACK_FUNC_MASK 0x00000f5c
+
+#define NVC0_3D_VERTEX_RUNOUT_ADDRESS_HIGH 0x00000f84
+
+#define NVC0_3D_VERTEX_RUNOUT_ADDRESS_LOW 0x00000f88
+
+#define NVC0_3D_DEPTH_BOUNDS(i0) (0x00000f9c + 0x4*(i0))
+#define NVC0_3D_DEPTH_BOUNDS__ESIZE 0x00000004
+#define NVC0_3D_DEPTH_BOUNDS__LEN 0x00000002
+
+#define NVC0_3D_MSAA_MASK(i0) (0x00000fbc + 0x4*(i0))
+#define NVC0_3D_MSAA_MASK__ESIZE 0x00000004
+#define NVC0_3D_MSAA_MASK__LEN 0x00000004
+
+#define NVC0_3D_CLIPID_ADDRESS_HIGH 0x00000fcc
+
+#define NVC0_3D_CLIPID_ADDRESS_LOW 0x00000fd0
+
+#define NVC0_3D_ZETA_ADDRESS_HIGH 0x00000fe0
+
+#define NVC0_3D_ZETA_ADDRESS_LOW 0x00000fe4
+
+#define NVC0_3D_ZETA_FORMAT 0x00000fe8
+
+#define NVC0_3D_ZETA_TILE_MODE 0x00000fec
+
+#define NVC0_3D_ZETA_LAYER_STRIDE 0x00000ff0
+
+#define NVC0_3D_SCREEN_SCISSOR_HORIZ 0x00000ff4
+#define NVC0_3D_SCREEN_SCISSOR_HORIZ_W__MASK 0xffff0000
+#define NVC0_3D_SCREEN_SCISSOR_HORIZ_W__SHIFT 16
+#define NVC0_3D_SCREEN_SCISSOR_HORIZ_X__MASK 0x0000ffff
+#define NVC0_3D_SCREEN_SCISSOR_HORIZ_X__SHIFT 0
+
+#define NVC0_3D_SCREEN_SCISSOR_VERT 0x00000ff8
+#define NVC0_3D_SCREEN_SCISSOR_VERT_H__MASK 0xffff0000
+#define NVC0_3D_SCREEN_SCISSOR_VERT_H__SHIFT 16
+#define NVC0_3D_SCREEN_SCISSOR_VERT_Y__MASK 0x0000ffff
+#define NVC0_3D_SCREEN_SCISSOR_VERT_Y__SHIFT 0
+
+#define NVC0_3D_CLEAR_FLAGS 0x000010f8
+#define NVC0_3D_CLEAR_FLAGS_STENCIL_MASK 0x00000001
+#define NVC0_3D_CLEAR_FLAGS_UNK4 0x00000010
+#define NVC0_3D_CLEAR_FLAGS_SCISSOR 0x00000100
+#define NVC0_3D_CLEAR_FLAGS_VIEWPORT 0x00001000
+
+#define NVC0_3D_VERTEX_ID 0x00001118
+
+#define NVC0_3D_VTX_ATTR_DEFINE 0x0000114c
+#define NVC0_3D_VTX_ATTR_DEFINE_ATTR__MASK 0x000000ff
+#define NVC0_3D_VTX_ATTR_DEFINE_ATTR__SHIFT 0
+#define NVC0_3D_VTX_ATTR_DEFINE_COMP__MASK 0x00000700
+#define NVC0_3D_VTX_ATTR_DEFINE_COMP__SHIFT 8
+#define NVC0_3D_VTX_ATTR_DEFINE_COMP__MIN 0x00000001
+#define NVC0_3D_VTX_ATTR_DEFINE_COMP__MAX 0x00000004
+#define NVC0_3D_VTX_ATTR_DEFINE_SIZE__MASK 0x00007000
+#define NVC0_3D_VTX_ATTR_DEFINE_SIZE__SHIFT 12
+#define NVC0_3D_VTX_ATTR_DEFINE_SIZE_8 0x00001000
+#define NVC0_3D_VTX_ATTR_DEFINE_SIZE_16 0x00002000
+#define NVC0_3D_VTX_ATTR_DEFINE_SIZE_32 0x00004000
+#define NVC0_3D_VTX_ATTR_DEFINE_TYPE__MASK 0x00070000
+#define NVC0_3D_VTX_ATTR_DEFINE_TYPE__SHIFT 16
+#define NVC0_3D_VTX_ATTR_DEFINE_TYPE_SNORM 0x00010000
+#define NVC0_3D_VTX_ATTR_DEFINE_TYPE_UNORM 0x00020000
+#define NVC0_3D_VTX_ATTR_DEFINE_TYPE_SINT 0x00030000
+#define NVC0_3D_VTX_ATTR_DEFINE_TYPE_UINT 0x00040000
+#define NVC0_3D_VTX_ATTR_DEFINE_TYPE_USCALED 0x00050000
+#define NVC0_3D_VTX_ATTR_DEFINE_TYPE_SSCALED 0x00060000
+#define NVC0_3D_VTX_ATTR_DEFINE_TYPE_FLOAT 0x00070000
+
+#define NVC0_3D_VTX_ATTR_DATA(i0) (0x00001150 + 0x4*(i0))
+#define NVC0_3D_VTX_ATTR_DATA__ESIZE 0x00000004
+#define NVC0_3D_VTX_ATTR_DATA__LEN 0x00000004
+
+#define NVC0_3D_VERTEX_ATTRIB_FORMAT(i0) (0x00001160 + 0x4*(i0))
+#define NVC0_3D_VERTEX_ATTRIB_FORMAT__ESIZE 0x00000004
+#define NVC0_3D_VERTEX_ATTRIB_FORMAT__LEN 0x00000020
+#define NVC0_3D_VERTEX_ATTRIB_FORMAT_BUFFER__MASK 0x0000003f
+#define NVC0_3D_VERTEX_ATTRIB_FORMAT_BUFFER__SHIFT 0
+#define NVC0_3D_VERTEX_ATTRIB_FORMAT_CONST 0x00000040
+#define NVC0_3D_VERTEX_ATTRIB_FORMAT_OFFSET__MASK 0x001fff80
+#define NVC0_3D_VERTEX_ATTRIB_FORMAT_OFFSET__SHIFT 7
+#define NVC0_3D_VERTEX_ATTRIB_FORMAT_SIZE__MASK 0x07e00000
+#define NVC0_3D_VERTEX_ATTRIB_FORMAT_SIZE__SHIFT 21
+#define NVC0_3D_VERTEX_ATTRIB_FORMAT_SIZE_32_32_32_32 0x00200000
+#define NVC0_3D_VERTEX_ATTRIB_FORMAT_SIZE_32_32_32 0x00400000
+#define NVC0_3D_VERTEX_ATTRIB_FORMAT_SIZE_16_16_16_16 0x00600000
+#define NVC0_3D_VERTEX_ATTRIB_FORMAT_SIZE_32_32 0x00800000
+#define NVC0_3D_VERTEX_ATTRIB_FORMAT_SIZE_16_16_16 0x00a00000
+#define NVC0_3D_VERTEX_ATTRIB_FORMAT_SIZE_8_8_8_8 0x01400000
+#define NVC0_3D_VERTEX_ATTRIB_FORMAT_SIZE_16_16 0x01e00000
+#define NVC0_3D_VERTEX_ATTRIB_FORMAT_SIZE_32 0x02400000
+#define NVC0_3D_VERTEX_ATTRIB_FORMAT_SIZE_8_8_8 0x02600000
+#define NVC0_3D_VERTEX_ATTRIB_FORMAT_SIZE_8_8 0x03000000
+#define NVC0_3D_VERTEX_ATTRIB_FORMAT_SIZE_16 0x03600000
+#define NVC0_3D_VERTEX_ATTRIB_FORMAT_SIZE_8 0x03a00000
+#define NVC0_3D_VERTEX_ATTRIB_FORMAT_SIZE_2_10_10_10 0x06000000
+#define NVC0_3D_VERTEX_ATTRIB_FORMAT_TYPE__MASK 0x78000000
+#define NVC0_3D_VERTEX_ATTRIB_FORMAT_TYPE__SHIFT 27
+#define NVC0_3D_VERTEX_ATTRIB_FORMAT_TYPE_SNORM 0x08000000
+#define NVC0_3D_VERTEX_ATTRIB_FORMAT_TYPE_UNORM 0x10000000
+#define NVC0_3D_VERTEX_ATTRIB_FORMAT_TYPE_SINT 0x18000000
+#define NVC0_3D_VERTEX_ATTRIB_FORMAT_TYPE_UINT 0x20000000
+#define NVC0_3D_VERTEX_ATTRIB_FORMAT_TYPE_USCALED 0x28000000
+#define NVC0_3D_VERTEX_ATTRIB_FORMAT_TYPE_SSCALED 0x30000000
+#define NVC0_3D_VERTEX_ATTRIB_FORMAT_TYPE_FLOAT 0x38000000
+#define NVC0_3D_VERTEX_ATTRIB_FORMAT_BGRA 0x80000000
+
+#define NVC0_3D_RT_CONTROL 0x0000121c
+#define NVC0_3D_RT_CONTROL_COUNT__MASK 0x0000000f
+#define NVC0_3D_RT_CONTROL_COUNT__SHIFT 0
+#define NVC0_3D_RT_CONTROL_MAP0__MASK 0x00000070
+#define NVC0_3D_RT_CONTROL_MAP0__SHIFT 4
+#define NVC0_3D_RT_CONTROL_MAP1__MASK 0x00000380
+#define NVC0_3D_RT_CONTROL_MAP1__SHIFT 7
+#define NVC0_3D_RT_CONTROL_MAP2__MASK 0x00001c00
+#define NVC0_3D_RT_CONTROL_MAP2__SHIFT 10
+#define NVC0_3D_RT_CONTROL_MAP3__MASK 0x0000e000
+#define NVC0_3D_RT_CONTROL_MAP3__SHIFT 13
+#define NVC0_3D_RT_CONTROL_MAP4__MASK 0x00070000
+#define NVC0_3D_RT_CONTROL_MAP4__SHIFT 16
+#define NVC0_3D_RT_CONTROL_MAP5__MASK 0x00380000
+#define NVC0_3D_RT_CONTROL_MAP5__SHIFT 19
+#define NVC0_3D_RT_CONTROL_MAP6__MASK 0x01c00000
+#define NVC0_3D_RT_CONTROL_MAP6__SHIFT 22
+#define NVC0_3D_RT_CONTROL_MAP7__MASK 0x0e000000
+#define NVC0_3D_RT_CONTROL_MAP7__SHIFT 25
+
+#define NVC0_3D_ZETA_HORIZ 0x00001228
+
+#define NVC0_3D_ZETA_VERT 0x0000122c
+
+#define NVC0_3D_ZETA_ARRAY_MODE 0x00001230
+#define NVC0_3D_ZETA_ARRAY_MODE_LAYERS__MASK 0x0000ffff
+#define NVC0_3D_ZETA_ARRAY_MODE_LAYERS__SHIFT 0
+#define NVC0_3D_ZETA_ARRAY_MODE_UNK 0x00010000
+
+#define NVC0_3D_LINKED_TSC 0x00001234
+
+#define NVC0_3D_DRAW_TFB_BYTES 0x0000123c
+
+#define NVC0_3D_FP_RESULT_COUNT 0x00001298
+
+#define NVC0_3D_DEPTH_TEST_ENABLE 0x000012cc
+
+#define NVC0_3D_D3D_FILL_MODE 0x000012d0
+#define NVC0_3D_D3D_FILL_MODE_POINT 0x00000001
+#define NVC0_3D_D3D_FILL_MODE_WIREFRAME 0x00000002
+#define NVC0_3D_D3D_FILL_MODE_SOLID 0x00000003
+
+#define NVC0_3D_SHADE_MODEL 0x000012d4
+#define NVC0_3D_SHADE_MODEL_FLAT 0x00001d00
+#define NVC0_3D_SHADE_MODEL_SMOOTH 0x00001d01
+
+#define NVC0_3D_BLEND_INDEPENDENT 0x000012e4
+
+#define NVC0_3D_DEPTH_WRITE_ENABLE 0x000012e8
+
+#define NVC0_3D_ALPHA_TEST_ENABLE 0x000012ec
+
+#define NVC0_3D_VB_ELEMENT_U8_SETUP 0x00001300
+#define NVC0_3D_VB_ELEMENT_U8_SETUP_OFFSET__MASK 0xc0000000
+#define NVC0_3D_VB_ELEMENT_U8_SETUP_OFFSET__SHIFT 30
+#define NVC0_3D_VB_ELEMENT_U8_SETUP_COUNT__MASK 0x3fffffff
+#define NVC0_3D_VB_ELEMENT_U8_SETUP_COUNT__SHIFT 0
+
+#define NVC0_3D_VB_ELEMENT_U8 0x00001304
+#define NVC0_3D_VB_ELEMENT_U8_I0__MASK 0x000000ff
+#define NVC0_3D_VB_ELEMENT_U8_I0__SHIFT 0
+#define NVC0_3D_VB_ELEMENT_U8_I1__MASK 0x0000ff00
+#define NVC0_3D_VB_ELEMENT_U8_I1__SHIFT 8
+#define NVC0_3D_VB_ELEMENT_U8_I2__MASK 0x00ff0000
+#define NVC0_3D_VB_ELEMENT_U8_I2__SHIFT 16
+#define NVC0_3D_VB_ELEMENT_U8_I3__MASK 0xff000000
+#define NVC0_3D_VB_ELEMENT_U8_I3__SHIFT 24
+
+#define NVC0_3D_D3D_CULL_MODE 0x00001308
+#define NVC0_3D_D3D_CULL_MODE_NONE 0x00000001
+#define NVC0_3D_D3D_CULL_MODE_FRONT 0x00000002
+#define NVC0_3D_D3D_CULL_MODE_BACK 0x00000003
+
+#define NVC0_3D_DEPTH_TEST_FUNC 0x0000130c
+#define NVC0_3D_DEPTH_TEST_FUNC_NEVER 0x00000200
+#define NVC0_3D_DEPTH_TEST_FUNC_LESS 0x00000201
+#define NVC0_3D_DEPTH_TEST_FUNC_EQUAL 0x00000202
+#define NVC0_3D_DEPTH_TEST_FUNC_LEQUAL 0x00000203
+#define NVC0_3D_DEPTH_TEST_FUNC_GREATER 0x00000204
+#define NVC0_3D_DEPTH_TEST_FUNC_NOTEQUAL 0x00000205
+#define NVC0_3D_DEPTH_TEST_FUNC_GEQUAL 0x00000206
+#define NVC0_3D_DEPTH_TEST_FUNC_ALWAYS 0x00000207
+
+#define NVC0_3D_ALPHA_TEST_REF 0x00001310
+
+#define NVC0_3D_ALPHA_TEST_FUNC 0x00001314
+#define NVC0_3D_ALPHA_TEST_FUNC_NEVER 0x00000200
+#define NVC0_3D_ALPHA_TEST_FUNC_LESS 0x00000201
+#define NVC0_3D_ALPHA_TEST_FUNC_EQUAL 0x00000202
+#define NVC0_3D_ALPHA_TEST_FUNC_LEQUAL 0x00000203
+#define NVC0_3D_ALPHA_TEST_FUNC_GREATER 0x00000204
+#define NVC0_3D_ALPHA_TEST_FUNC_NOTEQUAL 0x00000205
+#define NVC0_3D_ALPHA_TEST_FUNC_GEQUAL 0x00000206
+#define NVC0_3D_ALPHA_TEST_FUNC_ALWAYS 0x00000207
+
+#define NVC0_3D_DRAW_TFB_STRIDE 0x00001318
+#define NVC0_3D_DRAW_TFB_STRIDE__MIN 0x00000001
+#define NVC0_3D_DRAW_TFB_STRIDE__MAX 0x00000fff
+
+#define NVC0_3D_BLEND_COLOR(i0) (0x0000131c + 0x4*(i0))
+#define NVC0_3D_BLEND_COLOR__ESIZE 0x00000004
+#define NVC0_3D_BLEND_COLOR__LEN 0x00000004
+
+#define NVC0_3D_TSC_FLUSH 0x00001330
+#define NVC0_3D_TSC_FLUSH_SPECIFIC 0x00000001
+#define NVC0_3D_TSC_FLUSH_ENTRY__MASK 0x03fffff0
+#define NVC0_3D_TSC_FLUSH_ENTRY__SHIFT 4
+
+#define NVC0_3D_TIC_FLUSH 0x00001334
+#define NVC0_3D_TIC_FLUSH_SPECIFIC 0x00000001
+#define NVC0_3D_TIC_FLUSH_ENTRY__MASK 0x03fffff0
+#define NVC0_3D_TIC_FLUSH_ENTRY__SHIFT 4
+
+#define NVC0_3D_TEX_CACHE_CTL 0x00001338
+#define NVC0_3D_TEX_CACHE_CTL_UNK1__MASK 0x00000030
+#define NVC0_3D_TEX_CACHE_CTL_UNK1__SHIFT 4
+
+#define NVC0_3D_BLEND_EQUATION_RGB 0x00001340
+#define NVC0_3D_BLEND_EQUATION_RGB_FUNC_ADD 0x00008006
+#define NVC0_3D_BLEND_EQUATION_RGB_MIN 0x00008007
+#define NVC0_3D_BLEND_EQUATION_RGB_MAX 0x00008008
+#define NVC0_3D_BLEND_EQUATION_RGB_FUNC_SUBTRACT 0x0000800a
+#define NVC0_3D_BLEND_EQUATION_RGB_FUNC_REVERSE_SUBTRACT 0x0000800b
+
+#define NVC0_3D_BLEND_FUNC_SRC_RGB 0x00001344
+
+#define NVC0_3D_BLEND_FUNC_DST_RGB 0x00001348
+
+#define NVC0_3D_BLEND_EQUATION_ALPHA 0x0000134c
+#define NVC0_3D_BLEND_EQUATION_ALPHA_FUNC_ADD 0x00008006
+#define NVC0_3D_BLEND_EQUATION_ALPHA_MIN 0x00008007
+#define NVC0_3D_BLEND_EQUATION_ALPHA_MAX 0x00008008
+#define NVC0_3D_BLEND_EQUATION_ALPHA_FUNC_SUBTRACT 0x0000800a
+#define NVC0_3D_BLEND_EQUATION_ALPHA_FUNC_REVERSE_SUBTRACT 0x0000800b
+
+#define NVC0_3D_BLEND_FUNC_SRC_ALPHA 0x00001350
+
+#define NVC0_3D_BLEND_FUNC_DST_ALPHA 0x00001358
+
+#define NVC0_3D_BLEND_ENABLE(i0) (0x00001360 + 0x4*(i0))
+#define NVC0_3D_BLEND_ENABLE__ESIZE 0x00000004
+#define NVC0_3D_BLEND_ENABLE__LEN 0x00000008
+
+#define NVC0_3D_STENCIL_ENABLE 0x00001380
+
+#define NVC0_3D_STENCIL_FRONT_OP_FAIL 0x00001384
+#define NVC0_3D_STENCIL_FRONT_OP_FAIL_ZERO 0x00000000
+#define NVC0_3D_STENCIL_FRONT_OP_FAIL_INVERT 0x0000150a
+#define NVC0_3D_STENCIL_FRONT_OP_FAIL_KEEP 0x00001e00
+#define NVC0_3D_STENCIL_FRONT_OP_FAIL_REPLACE 0x00001e01
+#define NVC0_3D_STENCIL_FRONT_OP_FAIL_INCR 0x00001e02
+#define NVC0_3D_STENCIL_FRONT_OP_FAIL_DECR 0x00001e03
+#define NVC0_3D_STENCIL_FRONT_OP_FAIL_INCR_WRAP 0x00008507
+#define NVC0_3D_STENCIL_FRONT_OP_FAIL_DECR_WRAP 0x00008508
+
+#define NVC0_3D_STENCIL_FRONT_OP_ZFAIL 0x00001388
+#define NVC0_3D_STENCIL_FRONT_OP_ZFAIL_ZERO 0x00000000
+#define NVC0_3D_STENCIL_FRONT_OP_ZFAIL_INVERT 0x0000150a
+#define NVC0_3D_STENCIL_FRONT_OP_ZFAIL_KEEP 0x00001e00
+#define NVC0_3D_STENCIL_FRONT_OP_ZFAIL_REPLACE 0x00001e01
+#define NVC0_3D_STENCIL_FRONT_OP_ZFAIL_INCR 0x00001e02
+#define NVC0_3D_STENCIL_FRONT_OP_ZFAIL_DECR 0x00001e03
+#define NVC0_3D_STENCIL_FRONT_OP_ZFAIL_INCR_WRAP 0x00008507
+#define NVC0_3D_STENCIL_FRONT_OP_ZFAIL_DECR_WRAP 0x00008508
+
+#define NVC0_3D_STENCIL_FRONT_OP_ZPASS 0x0000138c
+#define NVC0_3D_STENCIL_FRONT_OP_ZPASS_ZERO 0x00000000
+#define NVC0_3D_STENCIL_FRONT_OP_ZPASS_INVERT 0x0000150a
+#define NVC0_3D_STENCIL_FRONT_OP_ZPASS_KEEP 0x00001e00
+#define NVC0_3D_STENCIL_FRONT_OP_ZPASS_REPLACE 0x00001e01
+#define NVC0_3D_STENCIL_FRONT_OP_ZPASS_INCR 0x00001e02
+#define NVC0_3D_STENCIL_FRONT_OP_ZPASS_DECR 0x00001e03
+#define NVC0_3D_STENCIL_FRONT_OP_ZPASS_INCR_WRAP 0x00008507
+#define NVC0_3D_STENCIL_FRONT_OP_ZPASS_DECR_WRAP 0x00008508
+
+#define NVC0_3D_STENCIL_FRONT_FUNC_FUNC 0x00001390
+#define NVC0_3D_STENCIL_FRONT_FUNC_FUNC_NEVER 0x00000200
+#define NVC0_3D_STENCIL_FRONT_FUNC_FUNC_LESS 0x00000201
+#define NVC0_3D_STENCIL_FRONT_FUNC_FUNC_EQUAL 0x00000202
+#define NVC0_3D_STENCIL_FRONT_FUNC_FUNC_LEQUAL 0x00000203
+#define NVC0_3D_STENCIL_FRONT_FUNC_FUNC_GREATER 0x00000204
+#define NVC0_3D_STENCIL_FRONT_FUNC_FUNC_NOTEQUAL 0x00000205
+#define NVC0_3D_STENCIL_FRONT_FUNC_FUNC_GEQUAL 0x00000206
+#define NVC0_3D_STENCIL_FRONT_FUNC_FUNC_ALWAYS 0x00000207
+
+#define NVC0_3D_STENCIL_FRONT_FUNC_REF 0x00001394
+
+#define NVC0_3D_STENCIL_FRONT_FUNC_MASK 0x00001398
+
+#define NVC0_3D_STENCIL_FRONT_MASK 0x0000139c
+
+#define NVC0_3D_DRAW_TFB_BASE 0x000013a4
+
+#define NVC0_3D_FRAG_COLOR_CLAMP_EN 0x000013a8
+#define NVC0_3D_FRAG_COLOR_CLAMP_EN_0 0x00000001
+#define NVC0_3D_FRAG_COLOR_CLAMP_EN_1 0x00000010
+#define NVC0_3D_FRAG_COLOR_CLAMP_EN_2 0x00000100
+#define NVC0_3D_FRAG_COLOR_CLAMP_EN_3 0x00001000
+#define NVC0_3D_FRAG_COLOR_CLAMP_EN_4 0x00010000
+#define NVC0_3D_FRAG_COLOR_CLAMP_EN_5 0x00100000
+#define NVC0_3D_FRAG_COLOR_CLAMP_EN_6 0x01000000
+#define NVC0_3D_FRAG_COLOR_CLAMP_EN_7 0x10000000
+
+#define NVC0_3D_SCREEN_Y_CONTROL 0x000013ac
+#define NVC0_3D_SCREEN_Y_CONTROL_Y_NEGATE 0x00000001
+#define NVC0_3D_SCREEN_Y_CONTROL_TRIANGLE_RAST_FLIP 0x00000010
+
+#define NVC0_3D_LINE_WIDTH 0x000013b0
+
+#define NVC0_3D_GP_VERTEX_OUTPUT_COUNT 0x00001420
+#define NVC0_3D_GP_VERTEX_OUTPUT_COUNT__MIN 0x00000001
+#define NVC0_3D_GP_VERTEX_OUTPUT_COUNT__MAX 0x00000400
+
+#define NVC0_3D_VERTEX_ARRAY_FLUSH 0x0000142c
+
+#define NVC0_3D_VB_ELEMENT_BASE 0x00001434
+
+#define NVC0_3D_VB_INSTANCE_BASE 0x00001438
+
+#define NVC0_3D_CODE_CB_FLUSH 0x00001440
+
+#define NVC0_3D_CLIPID_HEIGHT 0x00001504
+#define NVC0_3D_CLIPID_HEIGHT__MAX 0x00002000
+
+#define NVC0_3D_CLIPID_FILL_RECT_HORIZ 0x00001508
+#define NVC0_3D_CLIPID_FILL_RECT_HORIZ_LOW__MASK 0x0000ffff
+#define NVC0_3D_CLIPID_FILL_RECT_HORIZ_LOW__SHIFT 0
+#define NVC0_3D_CLIPID_FILL_RECT_HORIZ_HIGH__MASK 0xffff0000
+#define NVC0_3D_CLIPID_FILL_RECT_HORIZ_HIGH__SHIFT 16
+
+#define NVC0_3D_CLIPID_FILL_RECT_VERT 0x0000150c
+#define NVC0_3D_CLIPID_FILL_RECT_VERT_LOW__MASK 0x0000ffff
+#define NVC0_3D_CLIPID_FILL_RECT_VERT_LOW__SHIFT 0
+#define NVC0_3D_CLIPID_FILL_RECT_VERT_HIGH__MASK 0xffff0000
+#define NVC0_3D_CLIPID_FILL_RECT_VERT_HIGH__SHIFT 16
+
+#define NVC0_3D_VP_CLIP_DISTANCE_ENABLE 0x00001510
+#define NVC0_3D_VP_CLIP_DISTANCE_ENABLE_0 0x00000001
+#define NVC0_3D_VP_CLIP_DISTANCE_ENABLE_1 0x00000002
+#define NVC0_3D_VP_CLIP_DISTANCE_ENABLE_2 0x00000004
+#define NVC0_3D_VP_CLIP_DISTANCE_ENABLE_3 0x00000008
+#define NVC0_3D_VP_CLIP_DISTANCE_ENABLE_4 0x00000010
+#define NVC0_3D_VP_CLIP_DISTANCE_ENABLE_5 0x00000020
+#define NVC0_3D_VP_CLIP_DISTANCE_ENABLE_6 0x00000040
+#define NVC0_3D_VP_CLIP_DISTANCE_ENABLE_7 0x00000080
+
+#define NVC0_3D_SAMPLECNT_ENABLE 0x00001514
+
+#define NVC0_3D_POINT_SIZE 0x00001518
+
+#define NVC0_3D_POINT_SPRITE_ENABLE 0x00001520
+
+#define NVC0_3D_COUNTER_RESET 0x00001530
+#define NVC0_3D_COUNTER_RESET_SAMPLECNT 0x00000001
+#define NVC0_3D_COUNTER_RESET_UNK02 0x00000002
+#define NVC0_3D_COUNTER_RESET_UNK03 0x00000003
+#define NVC0_3D_COUNTER_RESET_UNK04 0x00000004
+#define NVC0_3D_COUNTER_RESET_EMITTED_PRIMITIVES 0x00000010
+#define NVC0_3D_COUNTER_RESET_UNK11 0x00000011
+#define NVC0_3D_COUNTER_RESET_UNK12 0x00000012
+#define NVC0_3D_COUNTER_RESET_UNK13 0x00000013
+#define NVC0_3D_COUNTER_RESET_UNK15 0x00000015
+#define NVC0_3D_COUNTER_RESET_UNK16 0x00000016
+#define NVC0_3D_COUNTER_RESET_UNK17 0x00000017
+#define NVC0_3D_COUNTER_RESET_UNK18 0x00000018
+#define NVC0_3D_COUNTER_RESET_UNK1A 0x0000001a
+#define NVC0_3D_COUNTER_RESET_UNK1B 0x0000001b
+#define NVC0_3D_COUNTER_RESET_UNK1C 0x0000001c
+#define NVC0_3D_COUNTER_RESET_UNK1D 0x0000001d
+#define NVC0_3D_COUNTER_RESET_UNK1E 0x0000001e
+#define NVC0_3D_COUNTER_RESET_GENERATED_PRIMITIVES 0x0000001f
+
+#define NVC0_3D_MULTISAMPLE_ENABLE 0x00001534
+
+#define NVC0_3D_ZETA_ENABLE 0x00001538
+
+#define NVC0_3D_MULTISAMPLE_CTRL 0x0000153c
+#define NVC0_3D_MULTISAMPLE_CTRL_ALPHA_TO_COVERAGE 0x00000001
+#define NVC0_3D_MULTISAMPLE_CTRL_ALPHA_TO_ONE 0x00000010
+
+#define NVC0_3D_COND_ADDRESS_HIGH 0x00001550
+
+#define NVC0_3D_COND_ADDRESS_LOW 0x00001554
+
+#define NVC0_3D_COND_MODE 0x00001558
+#define NVC0_3D_COND_MODE_NEVER 0x00000000
+#define NVC0_3D_COND_MODE_ALWAYS 0x00000001
+#define NVC0_3D_COND_MODE_RES_NON_ZERO 0x00000002
+#define NVC0_3D_COND_MODE_EQUAL 0x00000003
+#define NVC0_3D_COND_MODE_NOT_EQUAL 0x00000004
+
+#define NVC0_3D_TSC_ADDRESS_HIGH 0x0000155c
+
+#define NVC0_3D_TSC_ADDRESS_LOW 0x00001560
+#define NVC0_3D_TSC_ADDRESS_LOW__ALIGN 0x00000020
+
+#define NVC0_3D_TSC_LIMIT 0x00001564
+#define NVC0_3D_TSC_LIMIT__MAX 0x00001fff
+
+#define NVC0_3D_POLYGON_OFFSET_FACTOR 0x0000156c
+
+#define NVC0_3D_LINE_SMOOTH_ENABLE 0x00001570
+
+#define NVC0_3D_TIC_ADDRESS_HIGH 0x00001574
+
+#define NVC0_3D_TIC_ADDRESS_LOW 0x00001578
+
+#define NVC0_3D_TIC_LIMIT 0x0000157c
+
+#define NVC0_3D_STENCIL_TWO_SIDE_ENABLE 0x00001594
+
+#define NVC0_3D_STENCIL_BACK_OP_FAIL 0x00001598
+#define NVC0_3D_STENCIL_BACK_OP_FAIL_ZERO 0x00000000
+#define NVC0_3D_STENCIL_BACK_OP_FAIL_INVERT 0x0000150a
+#define NVC0_3D_STENCIL_BACK_OP_FAIL_KEEP 0x00001e00
+#define NVC0_3D_STENCIL_BACK_OP_FAIL_REPLACE 0x00001e01
+#define NVC0_3D_STENCIL_BACK_OP_FAIL_INCR 0x00001e02
+#define NVC0_3D_STENCIL_BACK_OP_FAIL_DECR 0x00001e03
+#define NVC0_3D_STENCIL_BACK_OP_FAIL_INCR_WRAP 0x00008507
+#define NVC0_3D_STENCIL_BACK_OP_FAIL_DECR_WRAP 0x00008508
+
+#define NVC0_3D_STENCIL_BACK_OP_ZFAIL 0x0000159c
+#define NVC0_3D_STENCIL_BACK_OP_ZFAIL_ZERO 0x00000000
+#define NVC0_3D_STENCIL_BACK_OP_ZFAIL_INVERT 0x0000150a
+#define NVC0_3D_STENCIL_BACK_OP_ZFAIL_KEEP 0x00001e00
+#define NVC0_3D_STENCIL_BACK_OP_ZFAIL_REPLACE 0x00001e01
+#define NVC0_3D_STENCIL_BACK_OP_ZFAIL_INCR 0x00001e02
+#define NVC0_3D_STENCIL_BACK_OP_ZFAIL_DECR 0x00001e03
+#define NVC0_3D_STENCIL_BACK_OP_ZFAIL_INCR_WRAP 0x00008507
+#define NVC0_3D_STENCIL_BACK_OP_ZFAIL_DECR_WRAP 0x00008508
+
+#define NVC0_3D_STENCIL_BACK_OP_ZPASS 0x000015a0
+#define NVC0_3D_STENCIL_BACK_OP_ZPASS_ZERO 0x00000000
+#define NVC0_3D_STENCIL_BACK_OP_ZPASS_INVERT 0x0000150a
+#define NVC0_3D_STENCIL_BACK_OP_ZPASS_KEEP 0x00001e00
+#define NVC0_3D_STENCIL_BACK_OP_ZPASS_REPLACE 0x00001e01
+#define NVC0_3D_STENCIL_BACK_OP_ZPASS_INCR 0x00001e02
+#define NVC0_3D_STENCIL_BACK_OP_ZPASS_DECR 0x00001e03
+#define NVC0_3D_STENCIL_BACK_OP_ZPASS_INCR_WRAP 0x00008507
+#define NVC0_3D_STENCIL_BACK_OP_ZPASS_DECR_WRAP 0x00008508
+
+#define NVC0_3D_STENCIL_BACK_FUNC_FUNC 0x000015a4
+#define NVC0_3D_STENCIL_BACK_FUNC_FUNC_NEVER 0x00000200
+#define NVC0_3D_STENCIL_BACK_FUNC_FUNC_LESS 0x00000201
+#define NVC0_3D_STENCIL_BACK_FUNC_FUNC_EQUAL 0x00000202
+#define NVC0_3D_STENCIL_BACK_FUNC_FUNC_LEQUAL 0x00000203
+#define NVC0_3D_STENCIL_BACK_FUNC_FUNC_GREATER 0x00000204
+#define NVC0_3D_STENCIL_BACK_FUNC_FUNC_NOTEQUAL 0x00000205
+#define NVC0_3D_STENCIL_BACK_FUNC_FUNC_GEQUAL 0x00000206
+#define NVC0_3D_STENCIL_BACK_FUNC_FUNC_ALWAYS 0x00000207
+
+#define NVC0_3D_CSAA_ENABLE 0x000015b4
+
+#define NVC0_3D_FRAMEBUFFER_SRGB 0x000015b8
+
+#define NVC0_3D_POLYGON_OFFSET_UNITS 0x000015bc
+
+#define NVC0_3D_LAYER 0x000015cc
+#define NVC0_3D_LAYER_IDX__MASK 0x0000ffff
+#define NVC0_3D_LAYER_IDX__SHIFT 0
+#define NVC0_3D_LAYER_USE_GP 0x00010000
+
+#define NVC0_3D_MULTISAMPLE_MODE 0x000015d0
+#define NVC0_3D_MULTISAMPLE_MODE_1X 0x00000000
+#define NVC0_3D_MULTISAMPLE_MODE_2XMS 0x00000001
+#define NVC0_3D_MULTISAMPLE_MODE_4XMS 0x00000002
+#define NVC0_3D_MULTISAMPLE_MODE_8XMS 0x00000003
+#define NVC0_3D_MULTISAMPLE_MODE_4XMS_4XCS 0x00000008
+#define NVC0_3D_MULTISAMPLE_MODE_4XMS_12XCS 0x00000009
+#define NVC0_3D_MULTISAMPLE_MODE_8XMS_8XCS 0x0000000a
+
+#define NVC0_3D_VERTEX_BEGIN_D3D 0x000015d4
+#define NVC0_3D_VERTEX_BEGIN_D3D_PRIMITIVE__MASK 0x0fffffff
+#define NVC0_3D_VERTEX_BEGIN_D3D_PRIMITIVE__SHIFT 0
+#define NVC0_3D_VERTEX_BEGIN_D3D_PRIMITIVE_POINTS 0x00000001
+#define NVC0_3D_VERTEX_BEGIN_D3D_PRIMITIVE_LINES 0x00000002
+#define NVC0_3D_VERTEX_BEGIN_D3D_PRIMITIVE_LINE_STRIP 0x00000003
+#define NVC0_3D_VERTEX_BEGIN_D3D_PRIMITIVE_TRIANGLES 0x00000004
+#define NVC0_3D_VERTEX_BEGIN_D3D_PRIMITIVE_TRIANGLE_STRIP 0x00000005
+#define NVC0_3D_VERTEX_BEGIN_D3D_PRIMITIVE_LINES_ADJACENCY 0x0000000a
+#define NVC0_3D_VERTEX_BEGIN_D3D_PRIMITIVE_LINE_STRIP_ADJACENCY 0x0000000b
+#define NVC0_3D_VERTEX_BEGIN_D3D_PRIMITIVE_TRIANGLES_ADJACENCY 0x0000000c
+#define NVC0_3D_VERTEX_BEGIN_D3D_PRIMITIVE_TRIANGLE_STRIP_ADJACENCY 0x0000000d
+#define NVC0_3D_VERTEX_BEGIN_D3D_INSTANCE_NEXT 0x10000000
+
+#define NVC0_3D_VERTEX_END_D3D 0x000015d8
+#define NVC0_3D_VERTEX_END_D3D_UNK0 0x00000001
+#define NVC0_3D_VERTEX_END_D3D_UNK1 0x00000002
+
+#define NVC0_3D_EDGEFLAG_ENABLE 0x000015e4
+
+#define NVC0_3D_VB_ELEMENT_U32 0x000015e8
+
+#define NVC0_3D_VB_ELEMENT_U16_SETUP 0x000015ec
+#define NVC0_3D_VB_ELEMENT_U16_SETUP_OFFSET__MASK 0xc0000000
+#define NVC0_3D_VB_ELEMENT_U16_SETUP_OFFSET__SHIFT 30
+#define NVC0_3D_VB_ELEMENT_U16_SETUP_COUNT__MASK 0x3fffffff
+#define NVC0_3D_VB_ELEMENT_U16_SETUP_COUNT__SHIFT 0
+
+#define NVC0_3D_VB_ELEMENT_U16 0x000015f0
+#define NVC0_3D_VB_ELEMENT_U16_I0__MASK 0x0000ffff
+#define NVC0_3D_VB_ELEMENT_U16_I0__SHIFT 0
+#define NVC0_3D_VB_ELEMENT_U16_I1__MASK 0xffff0000
+#define NVC0_3D_VB_ELEMENT_U16_I1__SHIFT 16
+
+#define NVC0_3D_VERTEX_BASE_HIGH 0x000015f4
+
+#define NVC0_3D_VERTEX_BASE_LOW 0x000015f8
+
+#define NVC0_3D_POINT_COORD_REPLACE 0x00001604
+#define NVC0_3D_POINT_COORD_REPLACE_COORD_ORIGIN__MASK 0x00000004
+#define NVC0_3D_POINT_COORD_REPLACE_COORD_ORIGIN__SHIFT 2
+#define NVC0_3D_POINT_COORD_REPLACE_COORD_ORIGIN_LOWER_LEFT 0x00000000
+#define NVC0_3D_POINT_COORD_REPLACE_COORD_ORIGIN_UPPER_LEFT 0x00000004
+#define NVC0_3D_POINT_COORD_REPLACE_ENABLE__MASK 0x000007f8
+#define NVC0_3D_POINT_COORD_REPLACE_ENABLE__SHIFT 3
+
+#define NVC0_3D_CODE_ADDRESS_HIGH 0x00001608
+
+#define NVC0_3D_CODE_ADDRESS_LOW 0x0000160c
+
+#define NVC0_3D_VERTEX_END_GL 0x00001614
+#define NVC0_3D_VERTEX_END_GL_UNK0 0x00000001
+#define NVC0_3D_VERTEX_END_GL_UNK1 0x00000002
+
+#define NVC0_3D_VERTEX_BEGIN_GL 0x00001618
+#define NVC0_3D_VERTEX_BEGIN_GL_PRIMITIVE__MASK 0x0fffffff
+#define NVC0_3D_VERTEX_BEGIN_GL_PRIMITIVE__SHIFT 0
+#define NVC0_3D_VERTEX_BEGIN_GL_PRIMITIVE_POINTS 0x00000000
+#define NVC0_3D_VERTEX_BEGIN_GL_PRIMITIVE_LINES 0x00000001
+#define NVC0_3D_VERTEX_BEGIN_GL_PRIMITIVE_LINE_LOOP 0x00000002
+#define NVC0_3D_VERTEX_BEGIN_GL_PRIMITIVE_LINE_STRIP 0x00000003
+#define NVC0_3D_VERTEX_BEGIN_GL_PRIMITIVE_TRIANGLES 0x00000004
+#define NVC0_3D_VERTEX_BEGIN_GL_PRIMITIVE_TRIANGLE_STRIP 0x00000005
+#define NVC0_3D_VERTEX_BEGIN_GL_PRIMITIVE_TRIANGLE_FAN 0x00000006
+#define NVC0_3D_VERTEX_BEGIN_GL_PRIMITIVE_QUADS 0x00000007
+#define NVC0_3D_VERTEX_BEGIN_GL_PRIMITIVE_QUAD_STRIP 0x00000008
+#define NVC0_3D_VERTEX_BEGIN_GL_PRIMITIVE_POLYGON 0x00000009
+#define NVC0_3D_VERTEX_BEGIN_GL_PRIMITIVE_LINES_ADJACENCY 0x0000000a
+#define NVC0_3D_VERTEX_BEGIN_GL_PRIMITIVE_LINE_STRIP_ADJACENCY 0x0000000b
+#define NVC0_3D_VERTEX_BEGIN_GL_PRIMITIVE_TRIANGLES_ADJACENCY 0x0000000c
+#define NVC0_3D_VERTEX_BEGIN_GL_PRIMITIVE_TRIANGLE_STRIP_ADJACENCY 0x0000000d
+#define NVC0_3D_VERTEX_BEGIN_GL_PRIMITIVE_PATCHES 0x0000000e
+#define NVC0_3D_VERTEX_BEGIN_GL_INSTANCE_NEXT 0x04000000
+#define NVC0_3D_VERTEX_BEGIN_GL_INSTANCE_CONT 0x08000000
+
+#define NVC0_3D_VERTEX_DATA 0x00001640
+
+#define NVC0_3D_PRIM_RESTART_ENABLE 0x00001644
+
+#define NVC0_3D_PRIM_RESTART_INDEX 0x00001648
+
+#define NVC0_3D_VP_GP_BUILTIN_ATTR_EN 0x0000164c
+#define NVC0_3D_VP_GP_BUILTIN_ATTR_EN_VERTEX_ID 0x00000001
+#define NVC0_3D_VP_GP_BUILTIN_ATTR_EN_INSTANCE_ID 0x00000010
+#define NVC0_3D_VP_GP_BUILTIN_ATTR_EN_PRIMITIVE_ID 0x00000100
+#define NVC0_3D_VP_GP_BUILTIN_ATTR_EN_UNK12 0x00001000
+
+#define NVC0_3D_POINT_SMOOTH_ENABLE 0x00001658
+
+#define NVC0_3D_POINT_RASTER_RULES 0x0000165c
+#define NVC0_3D_POINT_RASTER_RULES_OGL 0x00000000
+#define NVC0_3D_POINT_RASTER_RULES_D3D 0x00000001
+
+#define NVC0_3D_TEX_MISC 0x00001664
+#define NVC0_3D_TEX_MISC_SEAMLESS_CUBE_MAP 0x00000004
+
+#define NVC0_3D_LINE_STIPPLE_ENABLE 0x0000166c
+
+#define NVC0_3D_LINE_STIPPLE_PATTERN 0x00001680
+
+#define NVC0_3D_PROVOKING_VERTEX_LAST 0x00001684
+
+#define NVC0_3D_VERTEX_TWO_SIDE_ENABLE 0x00001688
+
+#define NVC0_3D_POLYGON_STIPPLE_ENABLE 0x0000168c
+
+#define NVC0_3D_POLYGON_STIPPLE_PATTERN(i0) (0x00001700 + 0x4*(i0))
+#define NVC0_3D_POLYGON_STIPPLE_PATTERN__ESIZE 0x00000004
+#define NVC0_3D_POLYGON_STIPPLE_PATTERN__LEN 0x00000020
+
+#define NVC0_3D_ZETA_BASE_LAYER 0x0000179c
+
+#define NVC0_3D_VERTEX_QUARANTINE_ADDRESS_HIGH 0x000017bc
+
+#define NVC0_3D_VERTEX_QUARANTINE_ADDRESS_LOW 0x000017c0
+
+#define NVC0_3D_VERTEX_QUARANTINE_SIZE 0x000017c4
+#define NVC0_3D_VERTEX_QUARANTINE_SIZE_16K 0x00000001
+#define NVC0_3D_VERTEX_QUARANTINE_SIZE_32K 0x00000002
+#define NVC0_3D_VERTEX_QUARANTINE_SIZE_64K 0x00000003
+
+#define NVC0_3D_STRMOUT_UNK1780(i0) (0x00001780 + 0x4*(i0))
+#define NVC0_3D_STRMOUT_UNK1780__ESIZE 0x00000004
+#define NVC0_3D_STRMOUT_UNK1780__LEN 0x00000004
+
+#define NVC0_3D_UNK17BC_ADDRESS_HIGH 0x000017bc
+
+#define NVC0_3D_UNK17BC_ADDRESS_LOW 0x000017c0
+
+#define NVC0_3D_UNK17BC_LIMIT 0x000017c4
+
+#define NVC0_3D_INDEX_ARRAY_START_HIGH 0x000017c8
+
+#define NVC0_3D_INDEX_ARRAY_START_LOW 0x000017cc
+
+#define NVC0_3D_INDEX_ARRAY_LIMIT_HIGH 0x000017d0
+
+#define NVC0_3D_INDEX_ARRAY_LIMIT_LOW 0x000017d4
+
+#define NVC0_3D_INDEX_LOG2_SIZE 0x000017d8
+
+#define NVC0_3D_INDEX_BATCH_FIRST 0x000017dc
+
+#define NVC0_3D_INDEX_BATCH_COUNT 0x000017e0
+
+#define NVC0_3D_VERTEX_ARRAY_PER_INSTANCE(i0) (0x00001880 + 0x4*(i0))
+#define NVC0_3D_VERTEX_ARRAY_PER_INSTANCE__ESIZE 0x00000004
+#define NVC0_3D_VERTEX_ARRAY_PER_INSTANCE__LEN 0x00000020
+
+#define NVC0_3D_VP_POINT_SIZE_EN 0x00001910
+
+#define NVC0_3D_CULL_FACE_ENABLE 0x00001918
+
+#define NVC0_3D_FRONT_FACE 0x0000191c
+#define NVC0_3D_FRONT_FACE_CW 0x00000900
+#define NVC0_3D_FRONT_FACE_CCW 0x00000901
+
+#define NVC0_3D_CULL_FACE 0x00001920
+#define NVC0_3D_CULL_FACE_FRONT 0x00000404
+#define NVC0_3D_CULL_FACE_BACK 0x00000405
+#define NVC0_3D_CULL_FACE_FRONT_AND_BACK 0x00000408
+
+#define NVC0_3D_VIEWPORT_TRANSFORM_EN 0x0000192c
+
+#define NVC0_3D_VIEW_VOLUME_CLIP_CTRL 0x0000193c
+#define NVC0_3D_VIEW_VOLUME_CLIP_CTRL_UNK0 0x00000001
+#define NVC0_3D_VIEW_VOLUME_CLIP_CTRL_UNK1__MASK 0x00000006
+#define NVC0_3D_VIEW_VOLUME_CLIP_CTRL_UNK1__SHIFT 1
+#define NVC0_3D_VIEW_VOLUME_CLIP_CTRL_UNK1_UNK0 0x00000000
+#define NVC0_3D_VIEW_VOLUME_CLIP_CTRL_UNK1_UNK1 0x00000002
+#define NVC0_3D_VIEW_VOLUME_CLIP_CTRL_UNK1_UNK2 0x00000004
+#define NVC0_3D_VIEW_VOLUME_CLIP_CTRL_DEPTH_CLAMP_NEAR 0x00000008
+#define NVC0_3D_VIEW_VOLUME_CLIP_CTRL_DEPTH_CLAMP_FAR 0x00000010
+#define NVC0_3D_VIEW_VOLUME_CLIP_CTRL_UNK7 0x00000080
+#define NVC0_3D_VIEW_VOLUME_CLIP_CTRL_UNK10 0x00000400
+#define NVC0_3D_VIEW_VOLUME_CLIP_CTRL_UNK11 0x00000800
+#define NVC0_3D_VIEW_VOLUME_CLIP_CTRL_UNK12__MASK 0x00003000
+#define NVC0_3D_VIEW_VOLUME_CLIP_CTRL_UNK12__SHIFT 12
+#define NVC0_3D_VIEW_VOLUME_CLIP_CTRL_UNK12_UNK0 0x00000000
+#define NVC0_3D_VIEW_VOLUME_CLIP_CTRL_UNK12_UNK1 0x00001000
+#define NVC0_3D_VIEW_VOLUME_CLIP_CTRL_UNK12_UNK2 0x00002000
+
+#define NVC0_3D_CLIP_RECTS_EN 0x0000194c
+
+#define NVC0_3D_CLIP_RECTS_MODE 0x00001950
+#define NVC0_3D_CLIP_RECTS_MODE_INSIDE_ANY 0x00000000
+#define NVC0_3D_CLIP_RECTS_MODE_OUTSIDE_ALL 0x00000001
+#define NVC0_3D_CLIP_RECTS_MODE_NEVER 0x00000002
+
+#define NVC0_3D_FP_ZORDER_CTRL 0x0000196c
+#define NVC0_3D_FP_ZORDER_CTRL_0 0x00000001
+#define NVC0_3D_FP_ZORDER_CTRL_1 0x00000010
+
+#define NVC0_3D_CLIPID_ENABLE 0x0000197c
+
+#define NVC0_3D_CLIPID_WIDTH 0x00001980
+#define NVC0_3D_CLIPID_WIDTH__MAX 0x00002000
+#define NVC0_3D_CLIPID_WIDTH__ALIGN 0x00000040
+
+#define NVC0_3D_CLIPID_ID 0x00001984
+
+#define NVC0_3D_FP_CONTROL 0x000019a8
+#define NVC0_3D_FP_CONTROL_MULTIPLE_RESULTS 0x00000001
+#define NVC0_3D_FP_CONTROL_EXPORTS_Z 0x00000100
+#define NVC0_3D_FP_CONTROL_USES_KIL 0x00100000
+
+#define NVC0_3D_DEPTH_BOUNDS_EN 0x000019bc
+
+#define NVC0_3D_LOGIC_OP_ENABLE 0x000019c4
+
+#define NVC0_3D_LOGIC_OP 0x000019c8
+#define NVC0_3D_LOGIC_OP_CLEAR 0x00001500
+#define NVC0_3D_LOGIC_OP_AND 0x00001501
+#define NVC0_3D_LOGIC_OP_AND_REVERSE 0x00001502
+#define NVC0_3D_LOGIC_OP_COPY 0x00001503
+#define NVC0_3D_LOGIC_OP_AND_INVERTED 0x00001504
+#define NVC0_3D_LOGIC_OP_NOOP 0x00001505
+#define NVC0_3D_LOGIC_OP_XOR 0x00001506
+#define NVC0_3D_LOGIC_OP_OR 0x00001507
+#define NVC0_3D_LOGIC_OP_NOR 0x00001508
+#define NVC0_3D_LOGIC_OP_EQUIV 0x00001509
+#define NVC0_3D_LOGIC_OP_INVERT 0x0000150a
+#define NVC0_3D_LOGIC_OP_OR_REVERSE 0x0000150b
+#define NVC0_3D_LOGIC_OP_COPY_INVERTED 0x0000150c
+#define NVC0_3D_LOGIC_OP_OR_INVERTED 0x0000150d
+#define NVC0_3D_LOGIC_OP_NAND 0x0000150e
+#define NVC0_3D_LOGIC_OP_SET 0x0000150f
+
+#define NVC0_3D_CLEAR_BUFFERS 0x000019d0
+#define NVC0_3D_CLEAR_BUFFERS_Z 0x00000001
+#define NVC0_3D_CLEAR_BUFFERS_S 0x00000002
+#define NVC0_3D_CLEAR_BUFFERS_R 0x00000004
+#define NVC0_3D_CLEAR_BUFFERS_G 0x00000008
+#define NVC0_3D_CLEAR_BUFFERS_B 0x00000010
+#define NVC0_3D_CLEAR_BUFFERS_A 0x00000020
+#define NVC0_3D_CLEAR_BUFFERS_RT__MASK 0x000003c0
+#define NVC0_3D_CLEAR_BUFFERS_RT__SHIFT 6
+#define NVC0_3D_CLEAR_BUFFERS_LAYER__MASK 0x001ffc00
+#define NVC0_3D_CLEAR_BUFFERS_LAYER__SHIFT 10
+
+#define NVC0_3D_CLIPID_FILL 0x000019d4
+
+#define NVC0_3D_COLOR_MASK(i0) (0x00001a00 + 0x4*(i0))
+#define NVC0_3D_COLOR_MASK__ESIZE 0x00000004
+#define NVC0_3D_COLOR_MASK__LEN 0x00000008
+#define NVC0_3D_COLOR_MASK_R 0x0000000f
+#define NVC0_3D_COLOR_MASK_G 0x000000f0
+#define NVC0_3D_COLOR_MASK_B 0x00000f00
+#define NVC0_3D_COLOR_MASK_A 0x0000f000
+
+#define NVC0_3D_QUERY_ADDRESS_HIGH 0x00001b00
+
+#define NVC0_3D_QUERY_ADDRESS_LOW 0x00001b04
+
+#define NVC0_3D_QUERY_SEQUENCE 0x00001b08
+
+#define NVC0_3D_QUERY_GET 0x00001b0c
+#define NVC0_3D_QUERY_GET_MODE__MASK 0x00000003
+#define NVC0_3D_QUERY_GET_MODE__SHIFT 0
+#define NVC0_3D_QUERY_GET_MODE_WRITE_UNK0 0x00000000
+#define NVC0_3D_QUERY_GET_MODE_SYNC 0x00000001
+#define NVC0_3D_QUERY_GET_MODE_WRITE_UNK2 0x00000002
+#define NVC0_3D_QUERY_GET_FENCE 0x00000010
+#define NVC0_3D_QUERY_GET_STREAM__MASK 0x000000e0
+#define NVC0_3D_QUERY_GET_STREAM__SHIFT 5
+#define NVC0_3D_QUERY_GET_UNK8 0x00000100
+#define NVC0_3D_QUERY_GET_UNIT__MASK 0x0000f000
+#define NVC0_3D_QUERY_GET_UNIT__SHIFT 12
+#define NVC0_3D_QUERY_GET_SYNC_COND__MASK 0x00010000
+#define NVC0_3D_QUERY_GET_SYNC_COND__SHIFT 16
+#define NVC0_3D_QUERY_GET_SYNC_COND_NEQUAL 0x00000000
+#define NVC0_3D_QUERY_GET_SYNC_COND_GREATER 0x00010000
+#define NVC0_3D_QUERY_GET_INTR 0x00100000
+#define NVC0_3D_QUERY_GET_UNK21 0x00200000
+#define NVC0_3D_QUERY_GET_SELECT__MASK 0x0f800000
+#define NVC0_3D_QUERY_GET_SELECT__SHIFT 23
+#define NVC0_3D_QUERY_GET_SELECT_ZERO 0x00000000
+#define NVC0_3D_QUERY_GET_SELECT_SAMPLECNT 0x01000000
+#define NVC0_3D_QUERY_GET_SELECT_EMITTED_PRIMS 0x05800000
+#define NVC0_3D_QUERY_GET_SELECT_GENERATED_PRIMS 0x09000000
+#define NVC0_3D_QUERY_GET_SHORT 0x10000000
+
+#define NVC0_3D_VERTEX_ARRAY_FETCH(i0) (0x00001c00 + 0x10*(i0))
+#define NVC0_3D_VERTEX_ARRAY_FETCH__ESIZE 0x00000010
+#define NVC0_3D_VERTEX_ARRAY_FETCH__LEN 0x00000020
+#define NVC0_3D_VERTEX_ARRAY_FETCH_STRIDE__MASK 0x00000fff
+#define NVC0_3D_VERTEX_ARRAY_FETCH_STRIDE__SHIFT 0
+#define NVC0_3D_VERTEX_ARRAY_FETCH_ENABLE 0x00001000
+
+#define NVC0_3D_VERTEX_ARRAY_START_HIGH(i0) (0x00001c04 + 0x10*(i0))
+#define NVC0_3D_VERTEX_ARRAY_START_HIGH__ESIZE 0x00000010
+#define NVC0_3D_VERTEX_ARRAY_START_HIGH__LEN 0x00000020
+
+#define NVC0_3D_VERTEX_ARRAY_START_LOW(i0) (0x00001c08 + 0x10*(i0))
+#define NVC0_3D_VERTEX_ARRAY_START_LOW__ESIZE 0x00000010
+#define NVC0_3D_VERTEX_ARRAY_START_LOW__LEN 0x00000020
+
+#define NVC0_3D_VERTEX_ARRAY_DIVISOR(i0) (0x00001c0c + 0x10*(i0))
+#define NVC0_3D_VERTEX_ARRAY_DIVISOR__ESIZE 0x00000010
+#define NVC0_3D_VERTEX_ARRAY_DIVISOR__LEN 0x00000020
+
+#define NVC0_3D_IBLEND(i0) (0x00001e00 + 0x20*(i0))
+#define NVC0_3D_IBLEND__ESIZE 0x00000020
+#define NVC0_3D_IBLEND__LEN 0x00000008
+
+#define NVC0_3D_IBLEND_EQUATION_RGB(i0) (0x00001e04 + 0x20*(i0))
+#define NVC0_3D_IBLEND_EQUATION_RGB_FUNC_ADD 0x00008006
+#define NVC0_3D_IBLEND_EQUATION_RGB_MIN 0x00008007
+#define NVC0_3D_IBLEND_EQUATION_RGB_MAX 0x00008008
+#define NVC0_3D_IBLEND_EQUATION_RGB_FUNC_SUBTRACT 0x0000800a
+#define NVC0_3D_IBLEND_EQUATION_RGB_FUNC_REVERSE_SUBTRACT 0x0000800b
+
+#define NVC0_3D_IBLEND_FUNC_SRC_RGB(i0) (0x00001e08 + 0x20*(i0))
+
+#define NVC0_3D_IBLEND_FUNC_DST_RGB(i0) (0x00001e0c + 0x20*(i0))
+
+#define NVC0_3D_IBLEND_EQUATION_ALPHA(i0) (0x00001e10 + 0x20*(i0))
+#define NVC0_3D_IBLEND_EQUATION_ALPHA_FUNC_ADD 0x00008006
+#define NVC0_3D_IBLEND_EQUATION_ALPHA_MIN 0x00008007
+#define NVC0_3D_IBLEND_EQUATION_ALPHA_MAX 0x00008008
+#define NVC0_3D_IBLEND_EQUATION_ALPHA_FUNC_SUBTRACT 0x0000800a
+#define NVC0_3D_IBLEND_EQUATION_ALPHA_FUNC_REVERSE_SUBTRACT 0x0000800b
+
+#define NVC0_3D_IBLEND_FUNC_SRC_ALPHA(i0) (0x00001e14 + 0x20*(i0))
+
+#define NVC0_3D_IBLEND_FUNC_DST_ALPHA(i0) (0x00001e18 + 0x20*(i0))
+
+#define NVC0_3D_VERTEX_ARRAY_LIMIT_HIGH(i0) (0x00001f00 + 0x8*(i0))
+#define NVC0_3D_VERTEX_ARRAY_LIMIT_HIGH__ESIZE 0x00000008
+#define NVC0_3D_VERTEX_ARRAY_LIMIT_HIGH__LEN 0x00000020
+
+#define NVC0_3D_VERTEX_ARRAY_LIMIT_LOW(i0) (0x00001f04 + 0x8*(i0))
+#define NVC0_3D_VERTEX_ARRAY_LIMIT_LOW__ESIZE 0x00000008
+#define NVC0_3D_VERTEX_ARRAY_LIMIT_LOW__LEN 0x00000020
+
+#define NVC0_3D_SP(i0) (0x00002000 + 0x40*(i0))
+#define NVC0_3D_SP__ESIZE 0x00000040
+#define NVC0_3D_SP__LEN 0x00000006
+
+#define NVC0_3D_SP_SELECT(i0) (0x00002000 + 0x40*(i0))
+#define NVC0_3D_SP_SELECT_ENABLE 0x00000001
+#define NVC0_3D_SP_SELECT_PROGRAM__MASK 0x00000070
+#define NVC0_3D_SP_SELECT_PROGRAM__SHIFT 4
+#define NVC0_3D_SP_SELECT_PROGRAM_VP_A 0x00000000
+#define NVC0_3D_SP_SELECT_PROGRAM_VP_B 0x00000010
+#define NVC0_3D_SP_SELECT_PROGRAM_TCP 0x00000020
+#define NVC0_3D_SP_SELECT_PROGRAM_TEP 0x00000030
+#define NVC0_3D_SP_SELECT_PROGRAM_GP 0x00000040
+#define NVC0_3D_SP_SELECT_PROGRAM_FP 0x00000050
+
+#define NVC0_3D_SP_START_ID(i0) (0x00002004 + 0x40*(i0))
+
+#define NVC0_3D_SP_GPR_ALLOC(i0) (0x0000200c + 0x40*(i0))
+
+#define NVC0_3D_TEX_LIMITS(i0) (0x00002200 + 0x10*(i0))
+#define NVC0_3D_TEX_LIMITS__ESIZE 0x00000010
+#define NVC0_3D_TEX_LIMITS__LEN 0x00000005
+
+#define NVC0_3D_FIRMWARE(i0) (0x00002300 + 0x4*(i0))
+#define NVC0_3D_FIRMWARE__ESIZE 0x00000004
+#define NVC0_3D_FIRMWARE__LEN 0x00000020
+
+#define NVC0_3D_CB_SIZE 0x00002380
+
+#define NVC0_3D_CB_ADDRESS_HIGH 0x00002384
+
+#define NVC0_3D_CB_ADDRESS_LOW 0x00002388
+
+#define NVC0_3D_CB_POS 0x0000238c
+
+#define NVC0_3D_CB_DATA(i0) (0x00002390 + 0x4*(i0))
+#define NVC0_3D_CB_DATA__ESIZE 0x00000004
+#define NVC0_3D_CB_DATA__LEN 0x00000010
+
+#define NVC0_3D_BIND_TSC(i0) (0x00002400 + 0x20*(i0))
+#define NVC0_3D_BIND_TSC__ESIZE 0x00000020
+#define NVC0_3D_BIND_TSC__LEN 0x00000005
+#define NVC0_3D_BIND_TSC_ACTIVE 0x00000001
+#define NVC0_3D_BIND_TSC_SAMPLER__MASK 0x00000ff0
+#define NVC0_3D_BIND_TSC_SAMPLER__SHIFT 4
+#define NVC0_3D_BIND_TSC_TSC__MASK 0x01fff000
+#define NVC0_3D_BIND_TSC_TSC__SHIFT 12
+
+#define NVC0_3D_BIND_TIC(i0) (0x00002404 + 0x20*(i0))
+#define NVC0_3D_BIND_TIC__ESIZE 0x00000020
+#define NVC0_3D_BIND_TIC__LEN 0x00000005
+#define NVC0_3D_BIND_TIC_ACTIVE 0x00000001
+#define NVC0_3D_BIND_TIC_TEXTURE__MASK 0x000001fe
+#define NVC0_3D_BIND_TIC_TEXTURE__SHIFT 1
+#define NVC0_3D_BIND_TIC_TIC__MASK 0x7ffffe00
+#define NVC0_3D_BIND_TIC_TIC__SHIFT 9
+
+#define NVC0_3D_CB_BIND(i0) (0x00002410 + 0x20*(i0))
+#define NVC0_3D_CB_BIND__ESIZE 0x00000020
+#define NVC0_3D_CB_BIND__LEN 0x00000005
+#define NVC0_3D_CB_BIND_VALID 0x00000001
+#define NVC0_3D_CB_BIND_INDEX__MASK 0x000000f0
+#define NVC0_3D_CB_BIND_INDEX__SHIFT 4
+
+#define NVC0_3D_VERT_COLOR_CLAMP_EN 0x00002600
+
+#define NVC0_3D_TFB_VARYING_LOCS(i0, i1) (0x00002800 + 0x80*(i0) + 0x4*(i1))
+#define NVC0_3D_TFB_VARYING_LOCS__ESIZE 0x00000004
+#define NVC0_3D_TFB_VARYING_LOCS__LEN 0x00000020
+
+#define NVC0_3D_COLOR_MASK_BROADCAST 0x00003808
+
+#define NVC0_3D_VERTEX_ARRAY_SELECT 0x00003820
+
+#define NVC0_3D_BLEND_ENABLES 0x00003858
+
+#define NVC0_3D_POLYGON_MODE_FRONT 0x00003868
+#define NVC0_3D_POLYGON_MODE_FRONT_POINT 0x00001b00
+#define NVC0_3D_POLYGON_MODE_FRONT_LINE 0x00001b01
+#define NVC0_3D_POLYGON_MODE_FRONT_FILL 0x00001b02
+
+#define NVC0_3D_POLYGON_MODE_BACK 0x00003870
+#define NVC0_3D_POLYGON_MODE_BACK_POINT 0x00001b00
+#define NVC0_3D_POLYGON_MODE_BACK_LINE 0x00001b01
+#define NVC0_3D_POLYGON_MODE_BACK_FILL 0x00001b02
+
+#define NVC0_3D_GP_SELECT 0x00003878
+
+#define NVC0_3D_TEP_SELECT 0x00003880
+
+
+#endif /* NVC0_3D_XML */
diff --git a/src/gallium/drivers/nvc0/nvc0_3ddefs.xml.h b/src/gallium/drivers/nvc0/nvc0_3ddefs.xml.h
new file mode 100644
index 00000000000..84b152213a2
--- /dev/null
+++ b/src/gallium/drivers/nvc0/nvc0_3ddefs.xml.h
@@ -0,0 +1,98 @@
+#ifndef NV_3DDEFS_XML
+#define NV_3DDEFS_XML
+
+/* Autogenerated file, DO NOT EDIT manually!
+
+This file was generated by the rules-ng-ng headergen tool in this git repository:
+http://0x04.net/cgit/index.cgi/rules-ng-ng
+git clone git://0x04.net/rules-ng-ng
+
+The rules-ng-ng source files this header was generated from are:
+- nvc0_3d.xml ( 26312 bytes, from 2010-10-08 10:10:01)
+- copyright.xml ( 6498 bytes, from 2010-10-03 13:18:37)
+- nv_defs.xml ( 4437 bytes, from 2010-07-06 07:43:58)
+- nv_3ddefs.xml ( 16397 bytes, from 2010-10-08 13:30:38)
+- nv_object.xml ( 11249 bytes, from 2010-10-07 15:31:28)
+- nvchipsets.xml ( 2824 bytes, from 2010-07-07 13:41:20)
+- nv50_defs.xml ( 4482 bytes, from 2010-10-03 13:18:37)
+
+Copyright (C) 2006-2010 by the following authors:
+- Artur Huillet <arthur.huillet@free.fr> (ahuillet)
+- Ben Skeggs (darktama, darktama_)
+- B. R. <koala_br@users.sourceforge.net> (koala_br)
+- Carlos Martin <carlosmn@users.sf.net> (carlosmn)
+- Christoph Bumiller <e0425955@student.tuwien.ac.at> (calim, chrisbmr)
+- Dawid Gajownik <gajownik@users.sf.net> (gajownik)
+- Dmitry Baryshkov
+- Dmitry Eremin-Solenikov <lumag@users.sf.net> (lumag)
+- EdB <edb_@users.sf.net> (edb_)
+- Erik Waling <erikwailing@users.sf.net> (erikwaling)
+- Francisco Jerez <currojerez@riseup.net> (curro, curro_, currojerez)
+- imirkin <imirkin@users.sf.net> (imirkin)
+- jb17bsome <jb17bsome@bellsouth.net> (jb17bsome)
+- Jeremy Kolb <kjeremy@users.sf.net> (kjeremy)
+- Laurent Carlier <lordheavym@gmail.com> (lordheavy)
+- Luca Barbieri <luca@luca-barbieri.com> (lb, lb1)
+- Maarten Maathuis <madman2003@gmail.com> (stillunknown)
+- Marcin Kościelnicki <koriakin@0x04.net> (mwk, koriakin)
+- Mark Carey <mark.carey@gmail.com> (careym)
+- Matthieu Castet <matthieu.castet@parrot.com> (mat-c)
+- nvidiaman <nvidiaman@users.sf.net> (nvidiaman)
+- Patrice Mandin <patmandin@gmail.com> (pmandin, pmdata)
+- Pekka Paalanen <pq@iki.fi> (pq, ppaalanen)
+- Peter Popov <ironpeter@users.sf.net> (ironpeter)
+- Richard Hughes <hughsient@users.sf.net> (hughsient)
+- Rudi Cilibrasi <cilibrar@users.sf.net> (cilibrar)
+- Serge Martin
+- Simon Raffeiner
+- Stephane Loeuillet <leroutier@users.sf.net> (leroutier)
+- Stephane Marchesin <stephane.marchesin@gmail.com> (marcheu)
+- sturmflut <sturmflut@users.sf.net> (sturmflut)
+- Sylvain Munaut <tnt@246tNt.com>
+- Victor Stinner <victor.stinner@haypocalc.com> (haypo)
+- Wladmir van der Laan <laanwj@gmail.com> (miathan6)
+- Younes Manton <younes.m@gmail.com> (ymanton)
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice (including the
+next paragraph) shall be included in all copies or substantial
+portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE COPYRIGHT OWNER(S) AND/OR ITS SUPPLIERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+*/
+
+
+#define NV50_3D_BLEND_FACTOR_ZERO 0x00004000
+#define NV50_3D_BLEND_FACTOR_ONE 0x00004001
+#define NV50_3D_BLEND_FACTOR_SRC_COLOR 0x00004300
+#define NV50_3D_BLEND_FACTOR_ONE_MINUS_SRC_COLOR 0x00004301
+#define NV50_3D_BLEND_FACTOR_SRC_ALPHA 0x00004302
+#define NV50_3D_BLEND_FACTOR_ONE_MINUS_SRC_ALPHA 0x00004303
+#define NV50_3D_BLEND_FACTOR_DST_ALPHA 0x00004304
+#define NV50_3D_BLEND_FACTOR_ONE_MINUS_DST_ALPHA 0x00004305
+#define NV50_3D_BLEND_FACTOR_DST_COLOR 0x00004306
+#define NV50_3D_BLEND_FACTOR_ONE_MINUS_DST_COLOR 0x00004307
+#define NV50_3D_BLEND_FACTOR_SRC_ALPHA_SATURATE 0x00004308
+#define NV50_3D_BLEND_FACTOR_CONSTANT_COLOR 0x0000c001
+#define NV50_3D_BLEND_FACTOR_ONE_MINUS_CONSTANT_COLOR 0x0000c002
+#define NV50_3D_BLEND_FACTOR_CONSTANT_ALPHA 0x0000c003
+#define NV50_3D_BLEND_FACTOR_ONE_MINUS_CONSTANT_ALPHA 0x0000c004
+#define NV50_3D_BLEND_FACTOR_SRC1_COLOR 0x0000c900
+#define NV50_3D_BLEND_FACTOR_ONE_MINUS_SRC1_COLOR 0x0000c901
+#define NV50_3D_BLEND_FACTOR_SRC1_ALPHA 0x0000c902
+#define NV50_3D_BLEND_FACTOR_ONE_MINUS_SRC1_ALPHA 0x0000c903
+
+#endif /* NV_3DDEFS_XML */
diff --git a/src/gallium/drivers/nvc0/nvc0_context.c b/src/gallium/drivers/nvc0/nvc0_context.c
new file mode 100644
index 00000000000..5d2168e600b
--- /dev/null
+++ b/src/gallium/drivers/nvc0/nvc0_context.c
@@ -0,0 +1,208 @@
+/*
+ * Copyright 2010 Christoph Bumiller
+ *
+ * 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 "draw/draw_context.h"
+#include "pipe/p_defines.h"
+
+#include "nvc0_context.h"
+#include "nvc0_screen.h"
+#include "nvc0_resource.h"
+
+#include "nouveau/nouveau_reloc.h"
+
+static void
+nvc0_flush(struct pipe_context *pipe,
+ struct pipe_fence_handle **fence)
+{
+ struct nouveau_screen *screen = &nvc0_context(pipe)->screen->base;
+
+ if (fence)
+ nouveau_fence_ref(screen->fence.current, (struct nouveau_fence **)fence);
+
+ /* Try to emit before firing to avoid having to flush again right after
+ * in case we have to wait on this fence.
+ */
+ nouveau_fence_emit(screen->fence.current);
+
+ FIRE_RING(screen->channel);
+}
+
+static void
+nvc0_context_unreference_resources(struct nvc0_context *nvc0)
+{
+ unsigned s, i;
+
+ for (i = 0; i < NVC0_BUFCTX_COUNT; ++i)
+ nvc0_bufctx_reset(nvc0, i);
+
+ for (i = 0; i < nvc0->num_vtxbufs; ++i)
+ pipe_resource_reference(&nvc0->vtxbuf[i].buffer, NULL);
+
+ pipe_resource_reference(&nvc0->idxbuf.buffer, NULL);
+
+ for (s = 0; s < 5; ++s) {
+ for (i = 0; i < nvc0->num_textures[s]; ++i)
+ pipe_sampler_view_reference(&nvc0->textures[s][i], NULL);
+
+ for (i = 0; i < 16; ++i)
+ pipe_resource_reference(&nvc0->constbuf[s][i], NULL);
+ }
+
+ for (i = 0; i < nvc0->num_tfbbufs; ++i)
+ pipe_resource_reference(&nvc0->tfbbuf[i], NULL);
+}
+
+static void
+nvc0_destroy(struct pipe_context *pipe)
+{
+ struct nvc0_context *nvc0 = nvc0_context(pipe);
+
+ nvc0_context_unreference_resources(nvc0);
+
+ draw_destroy(nvc0->draw);
+
+ if (nvc0->screen->cur_ctx == nvc0) {
+ nvc0->screen->base.channel->user_private = NULL;
+ nvc0->screen->cur_ctx = NULL;
+ }
+
+ FREE(nvc0);
+}
+
+void
+nvc0_default_flush_notify(struct nouveau_channel *chan)
+{
+ struct nvc0_context *nvc0 = chan->user_private;
+
+ if (!nvc0)
+ return;
+
+ nouveau_fence_update(&nvc0->screen->base, TRUE);
+ nouveau_fence_next(&nvc0->screen->base);
+}
+
+struct pipe_context *
+nvc0_create(struct pipe_screen *pscreen, void *priv)
+{
+ struct pipe_winsys *pipe_winsys = pscreen->winsys;
+ struct nvc0_screen *screen = nvc0_screen(pscreen);
+ struct nvc0_context *nvc0;
+ struct pipe_context *pipe;
+
+ nvc0 = CALLOC_STRUCT(nvc0_context);
+ if (!nvc0)
+ return NULL;
+ pipe = &nvc0->base.pipe;
+
+ nvc0->screen = screen;
+ nvc0->base.screen = &screen->base;
+ nvc0->base.copy_data = nvc0_m2mf_copy_linear;
+ nvc0->base.push_data = nvc0_m2mf_push_linear;
+
+ pipe->winsys = pipe_winsys;
+ pipe->screen = pscreen;
+ pipe->priv = priv;
+
+ pipe->destroy = nvc0_destroy;
+
+ pipe->draw_vbo = nvc0_draw_vbo;
+ pipe->clear = nvc0_clear;
+
+ pipe->flush = nvc0_flush;
+
+ if (!screen->cur_ctx)
+ screen->cur_ctx = nvc0;
+ screen->base.channel->user_private = nvc0;
+ screen->base.channel->flush_notify = nvc0_default_flush_notify;
+
+ nvc0_init_query_functions(nvc0);
+ nvc0_init_surface_functions(nvc0);
+ nvc0_init_state_functions(nvc0);
+ nvc0_init_resource_functions(pipe);
+
+ nvc0->draw = draw_create(pipe);
+ assert(nvc0->draw);
+ draw_set_rasterize_stage(nvc0->draw, nvc0_draw_render_stage(nvc0));
+
+ return pipe;
+}
+
+struct resident {
+ struct nv04_resource *res;
+ uint32_t flags;
+};
+
+void
+nvc0_bufctx_add_resident(struct nvc0_context *nvc0, int ctx,
+ struct nv04_resource *resource, uint32_t flags)
+{
+ struct resident rsd = { resource, flags };
+
+ if (!resource->bo)
+ return;
+
+ /* We don't need to reference the resource here, it will be referenced
+ * in the context/state, and bufctx will be reset when state changes.
+ */
+ util_dynarray_append(&nvc0->residents[ctx], struct resident, rsd);
+}
+
+void
+nvc0_bufctx_del_resident(struct nvc0_context *nvc0, int ctx,
+ struct nv04_resource *resource)
+{
+ struct resident *rsd, *top;
+ unsigned i;
+
+ for (i = 0; i < nvc0->residents[ctx].size / sizeof(struct resident); ++i) {
+ rsd = util_dynarray_element(&nvc0->residents[ctx], struct resident, i);
+
+ if (rsd->res == resource) {
+ top = util_dynarray_pop_ptr(&nvc0->residents[ctx], struct resident);
+ if (rsd != top)
+ *rsd = *top;
+ break;
+ }
+ }
+}
+
+void
+nvc0_bufctx_emit_relocs(struct nvc0_context *nvc0)
+{
+ struct resident *rsd;
+ struct util_dynarray *array;
+ unsigned ctx, i, n;
+
+ for (ctx = 0; ctx < NVC0_BUFCTX_COUNT; ++ctx) {
+ array = &nvc0->residents[ctx];
+
+ n = array->size / sizeof(struct resident);
+ MARK_RING(nvc0->screen->base.channel, n, n);
+ for (i = 0; i < n; ++i) {
+ rsd = util_dynarray_element(array, struct resident, i);
+
+ nvc0_resource_validate(rsd->res, rsd->flags);
+ }
+ }
+
+ nvc0_screen_make_buffers_resident(nvc0->screen);
+}
diff --git a/src/gallium/drivers/nvc0/nvc0_context.h b/src/gallium/drivers/nvc0/nvc0_context.h
new file mode 100644
index 00000000000..102997e4fcb
--- /dev/null
+++ b/src/gallium/drivers/nvc0/nvc0_context.h
@@ -0,0 +1,244 @@
+#ifndef __NVC0_CONTEXT_H__
+#define __NVC0_CONTEXT_H__
+
+#include <stdio.h>
+#include "pipe/p_context.h"
+#include "pipe/p_defines.h"
+#include "pipe/p_state.h"
+
+#include "util/u_memory.h"
+#include "util/u_math.h"
+#include "util/u_inlines.h"
+#include "util/u_dynarray.h"
+
+#include "draw/draw_vertex.h"
+
+#include "nvc0_winsys.h"
+#include "nvc0_stateobj.h"
+#include "nvc0_screen.h"
+#include "nvc0_program.h"
+#include "nvc0_resource.h"
+
+#include "nouveau/nouveau_context.h"
+
+#include "nvc0_3ddefs.xml.h"
+#include "nvc0_3d.xml.h"
+#include "nvc0_2d.xml.h"
+#include "nvc0_m2mf.xml.h"
+
+#define NOUVEAU_ERR(fmt, args...) \
+ fprintf(stderr, "%s:%d - "fmt, __FUNCTION__, __LINE__, ##args);
+
+#ifdef NOUVEAU_DEBUG
+# define NOUVEAU_DBG(args...) printf(args);
+#else
+# define NOUVEAU_DBG(args...)
+#endif
+
+#define NVC0_NEW_BLEND (1 << 0)
+#define NVC0_NEW_RASTERIZER (1 << 1)
+#define NVC0_NEW_ZSA (1 << 2)
+#define NVC0_NEW_VERTPROG (1 << 3)
+#define NVC0_NEW_TCTLPROG (1 << 4)
+#define NVC0_NEW_TEVLPROG (1 << 5)
+#define NVC0_NEW_GMTYPROG (1 << 6)
+#define NVC0_NEW_FRAGPROG (1 << 7)
+#define NVC0_NEW_BLEND_COLOUR (1 << 8)
+#define NVC0_NEW_STENCIL_REF (1 << 9)
+#define NVC0_NEW_CLIP (1 << 10)
+#define NVC0_NEW_SAMPLE_MASK (1 << 11)
+#define NVC0_NEW_FRAMEBUFFER (1 << 12)
+#define NVC0_NEW_STIPPLE (1 << 13)
+#define NVC0_NEW_SCISSOR (1 << 14)
+#define NVC0_NEW_VIEWPORT (1 << 15)
+#define NVC0_NEW_ARRAYS (1 << 16)
+#define NVC0_NEW_VERTEX (1 << 17)
+#define NVC0_NEW_CONSTBUF (1 << 18)
+#define NVC0_NEW_TEXTURES (1 << 19)
+#define NVC0_NEW_SAMPLERS (1 << 20)
+#define NVC0_NEW_TFB (1 << 21)
+#define NVC0_NEW_TFB_BUFFERS (1 << 22)
+
+#define NVC0_BUFCTX_CONSTANT 0
+#define NVC0_BUFCTX_FRAME 1
+#define NVC0_BUFCTX_VERTEX 2
+#define NVC0_BUFCTX_TEXTURES 3
+#define NVC0_BUFCTX_COUNT 4
+
+struct nvc0_context {
+ struct nouveau_context base;
+
+ struct nvc0_screen *screen;
+
+ struct util_dynarray residents[NVC0_BUFCTX_COUNT];
+
+ uint32_t dirty;
+
+ struct {
+ uint32_t instance_elts; /* bitmask of per-instance elements */
+ uint32_t instance_base;
+ int32_t index_bias;
+ boolean prim_restart;
+ boolean early_z;
+ uint8_t num_vtxbufs;
+ uint8_t num_vtxelts;
+ uint8_t num_textures[5];
+ uint8_t num_samplers[5];
+ uint8_t tls_required; /* bitmask of shader types using l[] */
+ uint16_t scissor;
+ uint32_t uniform_buffer_bound[5];
+ } state;
+
+ struct nvc0_blend_stateobj *blend;
+ struct nvc0_rasterizer_stateobj *rast;
+ struct nvc0_zsa_stateobj *zsa;
+ struct nvc0_vertex_stateobj *vertex;
+
+ struct nvc0_program *vertprog;
+ struct nvc0_program *tctlprog;
+ struct nvc0_program *tevlprog;
+ struct nvc0_program *gmtyprog;
+ struct nvc0_program *fragprog;
+
+ struct pipe_resource *constbuf[5][16];
+ uint16_t constbuf_dirty[5];
+
+ struct pipe_vertex_buffer vtxbuf[PIPE_MAX_ATTRIBS];
+ unsigned num_vtxbufs;
+ struct pipe_index_buffer idxbuf;
+ uint32_t vbo_fifo; /* bitmask of vertex elements to be pushed to FIFO */
+ uint32_t vbo_user; /* bitmask of vertex buffers pointing to user memory */
+ unsigned vbo_min_index; /* from pipe_draw_info, for vertex upload */
+ unsigned vbo_max_index;
+
+ struct pipe_sampler_view *textures[5][PIPE_MAX_SAMPLERS];
+ unsigned num_textures[5];
+ struct nv50_tsc_entry *samplers[5][PIPE_MAX_SAMPLERS];
+ unsigned num_samplers[5];
+
+ struct pipe_framebuffer_state framebuffer;
+ struct pipe_blend_color blend_colour;
+ struct pipe_stencil_ref stencil_ref;
+ struct pipe_poly_stipple stipple;
+ struct pipe_scissor_state scissor;
+ struct pipe_viewport_state viewport;
+ struct pipe_clip_state clip;
+
+ unsigned sample_mask;
+
+ boolean vbo_push_hint;
+
+ struct nvc0_transform_feedback_state *tfb;
+ struct pipe_resource *tfbbuf[4];
+ unsigned num_tfbbufs;
+ unsigned tfb_offset[4];
+
+ struct draw_context *draw;
+};
+
+#define NVC0_USING_EDGEFLAG(ctx) \
+ ((ctx)->vertprog->vp.edgeflag < PIPE_MAX_ATTRIBS)
+
+static INLINE struct nvc0_context *
+nvc0_context(struct pipe_context *pipe)
+{
+ return (struct nvc0_context *)pipe;
+}
+
+struct nvc0_surface {
+ struct pipe_surface base;
+ uint32_t offset;
+ uint32_t width;
+ uint16_t height;
+ uint16_t depth;
+};
+
+static INLINE struct nvc0_surface *
+nvc0_surface(struct pipe_surface *ps)
+{
+ return (struct nvc0_surface *)ps;
+}
+
+/* nvc0_context.c */
+struct pipe_context *nvc0_create(struct pipe_screen *, void *);
+
+void nvc0_default_flush_notify(struct nouveau_channel *);
+
+void nvc0_bufctx_emit_relocs(struct nvc0_context *);
+void nvc0_bufctx_add_resident(struct nvc0_context *, int ctx,
+ struct nv04_resource *, uint32_t flags);
+void nvc0_bufctx_del_resident(struct nvc0_context *, int ctx,
+ struct nv04_resource *);
+static INLINE void
+nvc0_bufctx_reset(struct nvc0_context *nvc0, int ctx)
+{
+ util_dynarray_resize(&nvc0->residents[ctx], 0);
+}
+
+/* nvc0_draw.c */
+extern struct draw_stage *nvc0_draw_render_stage(struct nvc0_context *);
+
+/* nvc0_program.c */
+boolean nvc0_program_translate(struct nvc0_program *);
+void nvc0_program_destroy(struct nvc0_context *, struct nvc0_program *);
+
+/* nvc0_query.c */
+void nvc0_init_query_functions(struct nvc0_context *);
+
+/* nvc0_shader_state.c */
+void nvc0_vertprog_validate(struct nvc0_context *);
+void nvc0_tctlprog_validate(struct nvc0_context *);
+void nvc0_tevlprog_validate(struct nvc0_context *);
+void nvc0_gmtyprog_validate(struct nvc0_context *);
+void nvc0_fragprog_validate(struct nvc0_context *);
+
+void nvc0_tfb_validate(struct nvc0_context *);
+
+/* nvc0_state.c */
+extern void nvc0_init_state_functions(struct nvc0_context *);
+
+/* nvc0_state_validate.c */
+extern boolean nvc0_state_validate(struct nvc0_context *);
+
+/* nvc0_surface.c */
+extern void nvc0_clear(struct pipe_context *, unsigned buffers,
+ const float *rgba, double depth, unsigned stencil);
+extern void nvc0_init_surface_functions(struct nvc0_context *);
+
+/* nvc0_tex.c */
+void nvc0_validate_textures(struct nvc0_context *);
+void nvc0_validate_samplers(struct nvc0_context *);
+
+struct pipe_sampler_view *
+nvc0_create_sampler_view(struct pipe_context *,
+ struct pipe_resource *,
+ const struct pipe_sampler_view *);
+
+/* nvc0_transfer.c */
+void
+nvc0_m2mf_push_linear(struct nouveau_context *nv,
+ struct nouveau_bo *dst, unsigned offset, unsigned domain,
+ unsigned size, void *data);
+void
+nvc0_m2mf_copy_linear(struct nouveau_context *nv,
+ struct nouveau_bo *dst, unsigned dstoff, unsigned dstdom,
+ struct nouveau_bo *src, unsigned srcoff, unsigned srcdom,
+ unsigned size);
+
+/* nvc0_vbo.c */
+void nvc0_draw_vbo(struct pipe_context *, const struct pipe_draw_info *);
+
+void *
+nvc0_vertex_state_create(struct pipe_context *pipe,
+ unsigned num_elements,
+ const struct pipe_vertex_element *elements);
+void
+nvc0_vertex_state_delete(struct pipe_context *pipe, void *hwcso);
+
+void nvc0_vertex_arrays_validate(struct nvc0_context *nvc0);
+
+/* nvc0_push.c */
+void nvc0_push_vbo(struct nvc0_context *, const struct pipe_draw_info *);
+void nvc0_push_vbo2(struct nvc0_context *, const struct pipe_draw_info *);
+
+#endif
diff --git a/src/gallium/drivers/nvc0/nvc0_draw.c b/src/gallium/drivers/nvc0/nvc0_draw.c
new file mode 100644
index 00000000000..ac7e9f66a11
--- /dev/null
+++ b/src/gallium/drivers/nvc0/nvc0_draw.c
@@ -0,0 +1,88 @@
+/*
+ * Copyright 2008 Ben Skeggs
+ *
+ * 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 "draw/draw_pipe.h"
+
+#include "nvc0_context.h"
+
+struct nvc0_render_stage {
+ struct draw_stage stage;
+ struct nvc0_context *nvc0;
+};
+
+static INLINE struct nvc0_render_stage *
+nvc0_render_stage(struct draw_stage *stage)
+{
+ return (struct nvc0_render_stage *)stage;
+}
+
+static void
+nvc0_render_point(struct draw_stage *stage, struct prim_header *prim)
+{
+ NOUVEAU_ERR("\n");
+}
+
+static void
+nvc0_render_line(struct draw_stage *stage, struct prim_header *prim)
+{
+ NOUVEAU_ERR("\n");
+}
+
+static void
+nvc0_render_tri(struct draw_stage *stage, struct prim_header *prim)
+{
+ NOUVEAU_ERR("\n");
+}
+
+static void
+nvc0_render_flush(struct draw_stage *stage, unsigned flags)
+{
+}
+
+static void
+nvc0_render_reset_stipple_counter(struct draw_stage *stage)
+{
+ NOUVEAU_ERR("\n");
+}
+
+static void
+nvc0_render_destroy(struct draw_stage *stage)
+{
+ FREE(stage);
+}
+
+struct draw_stage *
+nvc0_draw_render_stage(struct nvc0_context *nvc0)
+{
+ struct nvc0_render_stage *rs = CALLOC_STRUCT(nvc0_render_stage);
+
+ rs->nvc0 = nvc0;
+ rs->stage.draw = nvc0->draw;
+ rs->stage.destroy = nvc0_render_destroy;
+ rs->stage.point = nvc0_render_point;
+ rs->stage.line = nvc0_render_line;
+ rs->stage.tri = nvc0_render_tri;
+ rs->stage.flush = nvc0_render_flush;
+ rs->stage.reset_stipple_counter = nvc0_render_reset_stipple_counter;
+
+ return &rs->stage;
+}
diff --git a/src/gallium/drivers/nvc0/nvc0_formats.c b/src/gallium/drivers/nvc0/nvc0_formats.c
new file mode 100644
index 00000000000..454c7440631
--- /dev/null
+++ b/src/gallium/drivers/nvc0/nvc0_formats.c
@@ -0,0 +1,523 @@
+/*
+ * Copyright 2010 Christoph Bumiller
+ *
+ * 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 "nvc0_screen.h"
+#include "nvc0_3d.xml.h"
+#include "nv50/nv50_defs.xml.h"
+#include "nv50/nv50_texture.xml.h"
+#include "pipe/p_defines.h"
+
+#define A_(cr, cg, cb, ca, t0, t1, t2, t3, sz, r) \
+ (NV50_TIC_MAP_##cr << NV50_TIC_0_MAPR__SHIFT) | \
+ (NV50_TIC_TYPE_##t0 << NV50_TIC_0_TYPE0__SHIFT) | \
+ (NV50_TIC_MAP_##cg << NV50_TIC_0_MAPG__SHIFT) | \
+ (NV50_TIC_TYPE_##t1 << NV50_TIC_0_TYPE1__SHIFT) | \
+ (NV50_TIC_MAP_##cb << NV50_TIC_0_MAPB__SHIFT) | \
+ (NV50_TIC_TYPE_##t2 << NV50_TIC_0_TYPE2__SHIFT) | \
+ (NV50_TIC_MAP_##ca << NV50_TIC_0_MAPA__SHIFT) | \
+ (NV50_TIC_TYPE_##t3 << NV50_TIC_0_TYPE3__SHIFT) | \
+ NV50_TIC_0_FMT_##sz, \
+ NVC0_3D_VERTEX_ATTRIB_FORMAT_SIZE_##sz | \
+ NVC0_3D_VERTEX_ATTRIB_FORMAT_TYPE_##t0 | \
+ (r << 31)
+
+#define B_(cr, cg, cb, ca, t0, t1, t2, t3, sz, r) \
+ (NV50_TIC_MAP_##cr << NV50_TIC_0_MAPR__SHIFT) | \
+ (NV50_TIC_TYPE_##t0 << NV50_TIC_0_TYPE0__SHIFT) | \
+ (NV50_TIC_MAP_##cg << NV50_TIC_0_MAPG__SHIFT) | \
+ (NV50_TIC_TYPE_##t1 << NV50_TIC_0_TYPE1__SHIFT) | \
+ (NV50_TIC_MAP_##cb << NV50_TIC_0_MAPB__SHIFT) | \
+ (NV50_TIC_TYPE_##t2 << NV50_TIC_0_TYPE2__SHIFT) | \
+ (NV50_TIC_MAP_##ca << NV50_TIC_0_MAPA__SHIFT) | \
+ (NV50_TIC_TYPE_##t3 << NV50_TIC_0_TYPE3__SHIFT) | \
+ NV50_TIC_0_FMT_##sz, 0
+
+#define VERTEX_BUFFER PIPE_BIND_VERTEX_BUFFER
+#define SAMPLER_VIEW PIPE_BIND_SAMPLER_VIEW
+#define RENDER_TARGET PIPE_BIND_RENDER_TARGET
+#define DEPTH_STENCIL PIPE_BIND_DEPTH_STENCIL
+#define SCANOUT PIPE_BIND_SCANOUT
+
+/* for vertex buffers: */
+#define NV50_TIC_0_FMT_8_8_8 NV50_TIC_0_FMT_8_8_8_8
+#define NV50_TIC_0_FMT_16_16_16 NV50_TIC_0_FMT_16_16_16_16
+#define NV50_TIC_0_FMT_32_32_32 NV50_TIC_0_FMT_32_32_32_32
+
+const struct nvc0_format nvc0_format_table[PIPE_FORMAT_COUNT] =
+{
+ /* COMMON FORMATS */
+
+ [PIPE_FORMAT_B8G8R8A8_UNORM] = { NV50_SURFACE_FORMAT_A8R8G8B8_UNORM,
+ A_(C2, C1, C0, C3, UNORM, UNORM, UNORM, UNORM, 8_8_8_8, 1),
+ VERTEX_BUFFER | SAMPLER_VIEW | RENDER_TARGET | SCANOUT },
+
+ [PIPE_FORMAT_B8G8R8X8_UNORM] = { NV50_SURFACE_FORMAT_X8R8G8B8_UNORM,
+ A_(C2, C1, C0, ONE_FLOAT, UNORM, UNORM, UNORM, UNORM, 8_8_8_8, 1),
+ VERTEX_BUFFER | SAMPLER_VIEW | RENDER_TARGET | SCANOUT },
+
+ [PIPE_FORMAT_B8G8R8A8_SRGB] = { NV50_SURFACE_FORMAT_A8R8G8B8_SRGB,
+ A_(C2, C1, C0, C3, UNORM, UNORM, UNORM, UNORM, 8_8_8_8, 1),
+ VERTEX_BUFFER | SAMPLER_VIEW | RENDER_TARGET },
+
+ [PIPE_FORMAT_B8G8R8X8_SRGB] = { NV50_SURFACE_FORMAT_X8R8G8B8_SRGB,
+ A_(C2, C1, C0, ONE_FLOAT, UNORM, UNORM, UNORM, UNORM, 8_8_8_8, 1),
+ VERTEX_BUFFER | SAMPLER_VIEW | RENDER_TARGET },
+
+ [PIPE_FORMAT_B5G6R5_UNORM] = { NV50_SURFACE_FORMAT_R5G6B5_UNORM,
+ B_(C2, C1, C0, ONE_FLOAT, UNORM, UNORM, UNORM, UNORM, 5_6_5, 1),
+ SAMPLER_VIEW | RENDER_TARGET | SCANOUT },
+
+ [PIPE_FORMAT_B5G5R5A1_UNORM] = { NV50_SURFACE_FORMAT_A1R5G5B5_UNORM,
+ B_(C2, C1, C0, C3, UNORM, UNORM, UNORM, UNORM, 1_5_5_5, 1),
+ SAMPLER_VIEW | RENDER_TARGET | SCANOUT },
+
+ [PIPE_FORMAT_B5G5R5X1_UNORM] = { 0,
+ B_(C2, C1, C0, ONE_FLOAT, UNORM, UNORM, UNORM, UNORM, 1_5_5_5, 1),
+ SAMPLER_VIEW | SCANOUT },
+
+ [PIPE_FORMAT_B4G4R4A4_UNORM] = { 0,
+ B_(C2, C1, C0, C3, UNORM, UNORM, UNORM, UNORM, 4_4_4_4, 1),
+ SAMPLER_VIEW },
+
+ [PIPE_FORMAT_B4G4R4X4_UNORM] = { 0,
+ B_(C2, C1, C0, ONE_FLOAT, UNORM, UNORM, UNORM, UNORM, 4_4_4_4, 1),
+ SAMPLER_VIEW },
+
+ [PIPE_FORMAT_R10G10B10A2_UNORM] = { NV50_SURFACE_FORMAT_A2B10G10R10_UNORM,
+ A_(C0, C1, C2, C3, UNORM, UNORM, UNORM, UNORM, 2_10_10_10, 0),
+ SAMPLER_VIEW | RENDER_TARGET | VERTEX_BUFFER | SCANOUT },
+
+ [PIPE_FORMAT_B10G10R10A2_UNORM] = { NV50_SURFACE_FORMAT_A2R10G10B10_UNORM,
+ A_(C2, C1, C0, C3, UNORM, UNORM, UNORM, UNORM, 2_10_10_10, 1),
+ SAMPLER_VIEW | RENDER_TARGET | VERTEX_BUFFER },
+
+ /* DEPTH/STENCIL FORMATS */
+
+ [PIPE_FORMAT_Z16_UNORM] = { NV50_ZETA_FORMAT_Z16_UNORM,
+ B_(C0, C0, C0, ONE_FLOAT, UNORM, UINT, UINT, UINT, Z16, 0),
+ SAMPLER_VIEW | DEPTH_STENCIL },
+
+ [PIPE_FORMAT_Z24_UNORM_S8_USCALED] = { NV50_ZETA_FORMAT_S8Z24_UNORM,
+ B_(C0, C0, C0, ONE_FLOAT, UNORM, UINT, UINT, UINT, S8Z24, 0),
+ SAMPLER_VIEW | DEPTH_STENCIL },
+
+ [PIPE_FORMAT_Z24X8_UNORM] = { NV50_ZETA_FORMAT_X8Z24_UNORM,
+ B_(C0, C0, C0, ONE_FLOAT, UNORM, UINT, UINT, UINT, X8Z24, 0),
+ SAMPLER_VIEW | DEPTH_STENCIL },
+
+ [PIPE_FORMAT_S8_USCALED_Z24_UNORM] = { NV50_ZETA_FORMAT_Z24S8_UNORM,
+ B_(C1, C1, C1, ONE_FLOAT, UINT, UNORM, UINT, UINT, Z24S8, 0),
+ SAMPLER_VIEW | DEPTH_STENCIL },
+
+ [PIPE_FORMAT_Z32_FLOAT] = { NV50_ZETA_FORMAT_Z32_FLOAT,
+ B_(C0, C0, C0, ONE_FLOAT, FLOAT, UINT, UINT, UINT, Z32, 0),
+ SAMPLER_VIEW | DEPTH_STENCIL },
+
+ [PIPE_FORMAT_Z32_FLOAT_S8X24_USCALED] = {
+ NV50_ZETA_FORMAT_Z32_FLOAT_X24S8_UNORM,
+ B_(C0, C0, C0, ONE_FLOAT, FLOAT, UINT, UINT, UINT, X24S8Z32, 0),
+ SAMPLER_VIEW | DEPTH_STENCIL },
+
+ /* LUMINANCE, ALPHA, INTENSITY */
+
+ [PIPE_FORMAT_L8_UNORM] = { NV50_SURFACE_FORMAT_R8_UNORM,
+ A_(C0, C0, C0, ONE_FLOAT, UNORM, UNORM, UNORM, UNORM, 8, 0),
+ SAMPLER_VIEW | RENDER_TARGET },
+
+ [PIPE_FORMAT_L8_SRGB] = { NV50_SURFACE_FORMAT_R8_UNORM,
+ A_(C0, C0, C0, ONE_FLOAT, UNORM, UNORM, UNORM, UNORM, 8, 0),
+ SAMPLER_VIEW },
+
+ [PIPE_FORMAT_I8_UNORM] = { NV50_SURFACE_FORMAT_R8_UNORM,
+ A_(C0, C0, C0, C0, UNORM, UNORM, UNORM, UNORM, 8, 0),
+ SAMPLER_VIEW | RENDER_TARGET },
+
+ [PIPE_FORMAT_I16_UNORM] = { NV50_SURFACE_FORMAT_R16_UNORM,
+ A_(C0, C0, C0, C0, UNORM, UNORM, UNORM, UNORM, 16, 0),
+ SAMPLER_VIEW | RENDER_TARGET },
+
+ [PIPE_FORMAT_A8_UNORM] = { NV50_SURFACE_FORMAT_A8_UNORM,
+ A_(ZERO, ZERO, ZERO, C0, UNORM, UNORM, UNORM, UNORM, 8, 0),
+ SAMPLER_VIEW | RENDER_TARGET },
+
+ [PIPE_FORMAT_A16_UNORM] = { 0,
+ A_(ZERO, ZERO, ZERO, C0, UNORM, UNORM, UNORM, UNORM, 16, 0),
+ SAMPLER_VIEW },
+
+ [PIPE_FORMAT_L8A8_UNORM] = { 0,
+ A_(C0, C0, C0, C1, UNORM, UNORM, UNORM, UNORM, 8_8, 0),
+ SAMPLER_VIEW },
+
+ [PIPE_FORMAT_L8A8_SRGB] = { 0,
+ A_(C0, C0, C0, C1, UNORM, UNORM, UNORM, UNORM, 8_8, 0),
+ SAMPLER_VIEW },
+
+ [PIPE_FORMAT_L16A16_UNORM] = { 0,
+ A_(C0, C0, C0, C1, UNORM, UNORM, UNORM, UNORM, 16_16, 0),
+ SAMPLER_VIEW },
+
+ [PIPE_FORMAT_L4A4_UNORM] = { 0,
+ B_(C0, C0, C0, C1, UNORM, UNORM, UNORM, UNORM, 4_4, 0),
+ SAMPLER_VIEW },
+
+ /* DXT, RGTC */
+
+ [PIPE_FORMAT_DXT1_RGB] = { 0,
+ B_(C0, C1, C2, ONE_FLOAT, UNORM, UNORM, UNORM, UNORM, DXT1, 0),
+ SAMPLER_VIEW },
+
+ [PIPE_FORMAT_DXT1_RGBA] = { 0,
+ B_(C0, C1, C2, C3, UNORM, UNORM, UNORM, UNORM, DXT1, 0),
+ SAMPLER_VIEW },
+
+ [PIPE_FORMAT_DXT3_RGBA] = { 0,
+ B_(C0, C1, C2, C3, UNORM, UNORM, UNORM, UNORM, DXT3, 0),
+ SAMPLER_VIEW },
+
+ [PIPE_FORMAT_DXT5_RGBA] = { 0,
+ B_(C0, C1, C2, C3, UNORM, UNORM, UNORM, UNORM, DXT5, 0),
+ SAMPLER_VIEW },
+
+ [PIPE_FORMAT_DXT1_SRGB] = { 0,
+ B_(C0, C1, C2, ONE_FLOAT, UNORM, UNORM, UNORM, UNORM, DXT1, 0),
+ SAMPLER_VIEW },
+
+ [PIPE_FORMAT_DXT1_SRGBA] = { 0,
+ B_(C0, C1, C2, C3, UNORM, UNORM, UNORM, UNORM, DXT1, 0),
+ SAMPLER_VIEW },
+
+ [PIPE_FORMAT_DXT3_SRGBA] = { 0,
+ B_(C0, C1, C2, C3, UNORM, UNORM, UNORM, UNORM, DXT3, 0),
+ SAMPLER_VIEW },
+
+ [PIPE_FORMAT_DXT5_SRGBA] = { 0,
+ B_(C0, C1, C2, C3, UNORM, UNORM, UNORM, UNORM, DXT5, 0),
+ SAMPLER_VIEW },
+
+ [PIPE_FORMAT_RGTC1_UNORM] = { 0,
+ B_(C0, ZERO, ZERO, ONE_FLOAT, UNORM, UNORM, UNORM, UNORM, RGTC1, 0),
+ SAMPLER_VIEW },
+
+ [PIPE_FORMAT_RGTC1_SNORM] = { 0,
+ B_(C0, ZERO, ZERO, ONE_FLOAT, SNORM, SNORM, SNORM, SNORM, RGTC1, 0),
+ SAMPLER_VIEW },
+
+ [PIPE_FORMAT_RGTC2_UNORM] = { 0,
+ B_(C0, C1, ZERO, ONE_FLOAT, UNORM, UNORM, UNORM, UNORM, RGTC2, 0),
+ SAMPLER_VIEW },
+
+ [PIPE_FORMAT_RGTC2_SNORM] = { 0,
+ B_(C0, C1, ZERO, ONE_FLOAT, SNORM, SNORM, SNORM, SNORM, RGTC2, 0),
+ SAMPLER_VIEW },
+
+ /* FLOAT 16 */
+
+ [PIPE_FORMAT_R16G16B16A16_FLOAT] = { NV50_SURFACE_FORMAT_R16G16B16A16_FLOAT,
+ A_(C0, C1, C2, C3, FLOAT, FLOAT, FLOAT, FLOAT, 16_16_16_16, 0),
+ VERTEX_BUFFER | SAMPLER_VIEW | RENDER_TARGET },
+
+ [PIPE_FORMAT_R16G16B16_FLOAT] = { NV50_SURFACE_FORMAT_R16G16B16X16_FLOAT,
+ A_(C0, C1, C2, ONE_FLOAT, FLOAT, FLOAT, FLOAT, FLOAT, 16_16_16, 0),
+ VERTEX_BUFFER | SAMPLER_VIEW | RENDER_TARGET },
+
+ [PIPE_FORMAT_R16G16_FLOAT] = { NV50_SURFACE_FORMAT_R16G16_FLOAT,
+ A_(C0, C1, ZERO, ONE_FLOAT, FLOAT, FLOAT, FLOAT, FLOAT, 16_16, 0),
+ VERTEX_BUFFER | SAMPLER_VIEW | RENDER_TARGET },
+
+ [PIPE_FORMAT_R16_FLOAT] = { NV50_SURFACE_FORMAT_R16_FLOAT,
+ A_(C0, ZERO, ZERO, ONE_FLOAT, FLOAT, FLOAT, FLOAT, FLOAT, 16, 0),
+ VERTEX_BUFFER | SAMPLER_VIEW | RENDER_TARGET },
+
+ /* FLOAT 32 */
+
+ [PIPE_FORMAT_R32G32B32A32_FLOAT] = { NV50_SURFACE_FORMAT_R32G32B32A32_FLOAT,
+ A_(C0, C1, C2, C3, FLOAT, FLOAT, FLOAT, FLOAT, 32_32_32_32, 0),
+ VERTEX_BUFFER | SAMPLER_VIEW | RENDER_TARGET },
+
+ [PIPE_FORMAT_R32G32B32_FLOAT] = { NV50_SURFACE_FORMAT_R32G32B32X32_FLOAT,
+ A_(C0, C1, C2, ONE_FLOAT, FLOAT, FLOAT, FLOAT, FLOAT, 32_32_32, 0),
+ VERTEX_BUFFER | SAMPLER_VIEW | RENDER_TARGET },
+
+ [PIPE_FORMAT_R32G32_FLOAT] = { NV50_SURFACE_FORMAT_R32G32_FLOAT,
+ A_(C0, C1, ZERO, ONE_FLOAT, FLOAT, FLOAT, FLOAT, FLOAT, 32_32, 0),
+ VERTEX_BUFFER | SAMPLER_VIEW | RENDER_TARGET },
+
+ [PIPE_FORMAT_R32_FLOAT] = { NV50_SURFACE_FORMAT_R32_FLOAT,
+ A_(C0, ZERO, ZERO, ONE_FLOAT, FLOAT, FLOAT, FLOAT, FLOAT, 32, 0),
+ VERTEX_BUFFER | SAMPLER_VIEW | RENDER_TARGET },
+
+ /* ODD FORMATS */
+
+ [PIPE_FORMAT_R11G11B10_FLOAT] = { NV50_SURFACE_FORMAT_B10G11R11_FLOAT,
+ B_(C0, C1, C2, ONE_FLOAT, FLOAT, FLOAT, FLOAT, FLOAT, 10_11_11, 0),
+ SAMPLER_VIEW | RENDER_TARGET | VERTEX_BUFFER },
+
+ [PIPE_FORMAT_R9G9B9E5_FLOAT] = { 0,
+ B_(C0, C1, C2, ONE_FLOAT, FLOAT, FLOAT, FLOAT, FLOAT, E5_9_9_9, 0),
+ SAMPLER_VIEW },
+
+ /* SNORM 32 */
+
+ [PIPE_FORMAT_R32G32B32A32_SNORM] = { 0,
+ A_(C0, C1, C2, C3, SNORM, SNORM, SNORM, SNORM, 32_32_32_32, 0),
+ VERTEX_BUFFER | SAMPLER_VIEW },
+
+ [PIPE_FORMAT_R32G32B32_SNORM] = { 0,
+ A_(C0, C1, C2, ONE_FLOAT, SNORM, SNORM, SNORM, SNORM, 32_32_32, 0),
+ VERTEX_BUFFER | SAMPLER_VIEW },
+
+ [PIPE_FORMAT_R32G32_SNORM] = { 0,
+ A_(C0, C1, ZERO, ONE_FLOAT, SNORM, SNORM, SNORM, SNORM, 32_32, 0),
+ VERTEX_BUFFER | SAMPLER_VIEW },
+
+ [PIPE_FORMAT_R32_SNORM] = { 0,
+ A_(C0, ZERO, ZERO, ONE_FLOAT, SNORM, SNORM, SNORM, SNORM, 32, 0),
+ VERTEX_BUFFER | SAMPLER_VIEW },
+
+ /* UNORM 32 */
+
+ [PIPE_FORMAT_R32G32B32A32_UNORM] = { 0,
+ A_(C0, C1, C2, C3, UNORM, UNORM, UNORM, UNORM, 32_32_32_32, 0),
+ VERTEX_BUFFER | SAMPLER_VIEW },
+
+ [PIPE_FORMAT_R32G32B32_UNORM] = { 0,
+ A_(C0, C1, C2, ONE_FLOAT, UNORM, UNORM, UNORM, UNORM, 32_32_32, 0),
+ VERTEX_BUFFER | SAMPLER_VIEW },
+
+ [PIPE_FORMAT_R32G32_UNORM] = { 0,
+ A_(C0, C1, ZERO, ONE_FLOAT, UNORM, UNORM, UNORM, UNORM, 32_32, 0),
+ VERTEX_BUFFER | SAMPLER_VIEW },
+
+ [PIPE_FORMAT_R32_UNORM] = { 0,
+ A_(C0, ZERO, ZERO, ONE_FLOAT, UNORM, UNORM, UNORM, UNORM, 32, 0),
+ VERTEX_BUFFER | SAMPLER_VIEW },
+
+ /* SNORM 16 */
+
+ [PIPE_FORMAT_R16G16B16A16_SNORM] = { NV50_SURFACE_FORMAT_R16G16B16A16_SNORM,
+ A_(C0, C1, C2, C3, SNORM, SNORM, SNORM, SNORM, 16_16_16_16, 0),
+ VERTEX_BUFFER | SAMPLER_VIEW | RENDER_TARGET },
+
+ [PIPE_FORMAT_R16G16B16_SNORM] = { 0,
+ A_(C0, C1, C2, ONE_FLOAT, SNORM, SNORM, SNORM, SNORM, 16_16_16, 0),
+ VERTEX_BUFFER | SAMPLER_VIEW },
+
+ [PIPE_FORMAT_R16G16_SNORM] = { NV50_SURFACE_FORMAT_R16G16_SNORM,
+ A_(C0, C1, C2, C3, SNORM, SNORM, SNORM, SNORM, 16_16, 0),
+ VERTEX_BUFFER | SAMPLER_VIEW | RENDER_TARGET },
+
+ [PIPE_FORMAT_R16_SNORM] = { NV50_SURFACE_FORMAT_R16_SNORM,
+ A_(C0, ZERO, ZERO, ONE_FLOAT, SNORM, SNORM, SNORM, SNORM, 16, 0),
+ VERTEX_BUFFER | SAMPLER_VIEW | RENDER_TARGET },
+
+ /* UNORM 16 */
+
+ [PIPE_FORMAT_R16G16B16A16_UNORM] = { NV50_SURFACE_FORMAT_R16G16B16A16_UNORM,
+ A_(C0, C1, C2, C3, UNORM, UNORM, UNORM, UNORM, 16_16_16_16, 0),
+ VERTEX_BUFFER | SAMPLER_VIEW | RENDER_TARGET },
+
+ [PIPE_FORMAT_R16G16B16_UNORM] = { 0,
+ A_(C0, C1, C2, ONE_FLOAT, UNORM, UNORM, UNORM, UNORM, 16_16_16, 0),
+ VERTEX_BUFFER | SAMPLER_VIEW },
+
+ [PIPE_FORMAT_R16G16_UNORM] = { NV50_SURFACE_FORMAT_R16G16_UNORM,
+ A_(C0, C1, C2, C3, UNORM, UNORM, UNORM, UNORM, 16_16, 0),
+ VERTEX_BUFFER | SAMPLER_VIEW | RENDER_TARGET },
+
+ [PIPE_FORMAT_R16_UNORM] = { NV50_SURFACE_FORMAT_R16_UNORM,
+ A_(C0, ZERO, ZERO, ONE_FLOAT, UNORM, UNORM, UNORM, UNORM, 16, 0),
+ VERTEX_BUFFER | SAMPLER_VIEW | RENDER_TARGET },
+
+ /* SNORM 8 */
+
+ [PIPE_FORMAT_R8G8B8A8_SNORM] = { NV50_SURFACE_FORMAT_A8B8G8R8_SNORM,
+ A_(C0, C1, C2, C3, SNORM, SNORM, SNORM, SNORM, 8_8_8_8, 0),
+ VERTEX_BUFFER | SAMPLER_VIEW | RENDER_TARGET },
+
+ [PIPE_FORMAT_R8G8B8_SNORM] = { 0,
+ A_(C0, C1, C2, ONE_FLOAT, SNORM, SNORM, SNORM, SNORM, 8_8_8, 0),
+ VERTEX_BUFFER | SAMPLER_VIEW },
+
+ [PIPE_FORMAT_R8G8_SNORM] = { NV50_SURFACE_FORMAT_R8G8_SNORM,
+ A_(C0, C1, ZERO, ONE_FLOAT, SNORM, SNORM, SNORM, SNORM, 8_8, 0),
+ VERTEX_BUFFER | SAMPLER_VIEW | RENDER_TARGET },
+
+ [PIPE_FORMAT_R8_SNORM] = { NV50_SURFACE_FORMAT_R8_SNORM,
+ A_(C0, ZERO, ZERO, ONE_FLOAT, SNORM, SNORM, SNORM, SNORM, 8, 0),
+ VERTEX_BUFFER | SAMPLER_VIEW | RENDER_TARGET },
+
+ /* UNORM 8 */
+
+ [PIPE_FORMAT_R8G8B8A8_UNORM] = { NV50_SURFACE_FORMAT_A8B8G8R8_UNORM,
+ A_(C0, C1, C2, C3, UNORM, UNORM, UNORM, UNORM, 8_8_8_8, 0),
+ VERTEX_BUFFER | SAMPLER_VIEW | RENDER_TARGET },
+
+ [PIPE_FORMAT_R8G8B8A8_SRGB] = { NV50_SURFACE_FORMAT_A8B8G8R8_SRGB,
+ A_(C0, C1, C2, C3, UNORM, UNORM, UNORM, UNORM, 8_8_8_8, 0),
+ SAMPLER_VIEW | RENDER_TARGET },
+
+ [PIPE_FORMAT_R8G8B8_UNORM] = { NV50_SURFACE_FORMAT_X8B8G8R8_UNORM,
+ A_(C0, C1, C2, ONE_FLOAT, UNORM, UNORM, UNORM, UNORM, 8_8_8, 0),
+ VERTEX_BUFFER | SAMPLER_VIEW | RENDER_TARGET },
+
+ [PIPE_FORMAT_R8G8B8_SRGB] = { NV50_SURFACE_FORMAT_X8B8G8R8_SRGB,
+ A_(C0, C1, C2, ONE_FLOAT, UNORM, UNORM, UNORM, UNORM, 8_8_8, 0),
+ SAMPLER_VIEW | RENDER_TARGET },
+
+ [PIPE_FORMAT_R8G8_UNORM] = { NV50_SURFACE_FORMAT_R8G8_UNORM,
+ A_(C0, C1, ZERO, ONE_FLOAT, UNORM, UNORM, UNORM, UNORM, 8_8, 0),
+ VERTEX_BUFFER | SAMPLER_VIEW | RENDER_TARGET },
+
+ [PIPE_FORMAT_R8_UNORM] = { NV50_SURFACE_FORMAT_R8_UNORM,
+ A_(C0, ZERO, ZERO, ONE_FLOAT, UNORM, UNORM, UNORM, UNORM, 8, 0),
+ VERTEX_BUFFER | SAMPLER_VIEW | RENDER_TARGET },
+
+ /* SSCALED 32 (not integer, converted to float on fetch !) */
+
+ [PIPE_FORMAT_R32G32B32A32_SSCALED] = { 0,
+ A_(C0, C1, C2, C3, SSCALED, SSCALED, SSCALED, SSCALED, 32_32_32_32, 0),
+ VERTEX_BUFFER },
+
+ [PIPE_FORMAT_R32G32B32_SSCALED] = { 0,
+ A_(C0, C1, C2, ONE_FLOAT, SSCALED, SSCALED, SSCALED, SSCALED, 32_32_32, 0),
+ VERTEX_BUFFER },
+
+ [PIPE_FORMAT_R32G32_SSCALED] = { 0,
+ A_(C0, C1, ZERO, ONE_FLOAT, SSCALED, SSCALED, SSCALED, SSCALED, 32_32, 0),
+ VERTEX_BUFFER },
+
+ [PIPE_FORMAT_R32_SSCALED] = { 0,
+ A_(C0, ZERO, ZERO, ONE_FLOAT, SSCALED, SSCALED, SSCALED, SSCALED, 32, 0),
+ VERTEX_BUFFER },
+
+ /* USCALED 32 */
+
+ [PIPE_FORMAT_R32G32B32A32_USCALED] = { 0,
+ A_(C0, C1, C2, C3, USCALED, USCALED, USCALED, USCALED, 32_32_32_32, 0),
+ VERTEX_BUFFER },
+
+ [PIPE_FORMAT_R32G32B32_USCALED] = { 0,
+ A_(C0, C1, C2, ONE_FLOAT, USCALED, USCALED, USCALED, USCALED, 32_32_32, 0),
+ VERTEX_BUFFER },
+
+ [PIPE_FORMAT_R32G32_USCALED] = { 0,
+ A_(C0, C1, ZERO, ONE_FLOAT, USCALED, USCALED, USCALED, USCALED, 32_32, 0),
+ VERTEX_BUFFER },
+
+ [PIPE_FORMAT_R32_USCALED] = { 0,
+ A_(C0, ZERO, ZERO, ONE_FLOAT, USCALED, USCALED, USCALED, USCALED, 32, 0),
+ VERTEX_BUFFER },
+
+ /* SSCALED 16 */
+
+ [PIPE_FORMAT_R16G16B16A16_SSCALED] = { 0,
+ A_(C0, C1, C2, C3, SSCALED, SSCALED, SSCALED, SSCALED, 16_16_16_16, 0),
+ VERTEX_BUFFER },
+
+ [PIPE_FORMAT_R16G16B16_SSCALED] = { 0,
+ A_(C0, C1, C2, ONE_FLOAT, SSCALED, SSCALED, SSCALED, SSCALED, 16_16_16, 0),
+ VERTEX_BUFFER },
+
+ [PIPE_FORMAT_R16G16_SSCALED] = { 0,
+ A_(C0, C1, ZERO, ONE_FLOAT, SSCALED, SSCALED, SSCALED, SSCALED, 16_16, 0),
+ VERTEX_BUFFER },
+
+ [PIPE_FORMAT_R16_SSCALED] = { 0,
+ A_(C0, ZERO, ZERO, ONE_FLOAT, SSCALED, SSCALED, SSCALED, SSCALED, 16, 0),
+ VERTEX_BUFFER },
+
+ /* USCALED 16 */
+
+ [PIPE_FORMAT_R16G16B16A16_USCALED] = { 0,
+ A_(C0, C1, C2, C3, USCALED, USCALED, USCALED, USCALED, 16_16_16_16, 0),
+ VERTEX_BUFFER },
+
+ [PIPE_FORMAT_R16G16B16_USCALED] = { 0,
+ A_(C0, C1, C2, ONE_FLOAT, USCALED, USCALED, USCALED, USCALED, 16_16_16, 0),
+ VERTEX_BUFFER },
+
+ [PIPE_FORMAT_R16G16_USCALED] = { 0,
+ A_(C0, C1, ZERO, ONE_FLOAT, USCALED, USCALED, USCALED, USCALED, 16_16, 0),
+ VERTEX_BUFFER },
+
+ [PIPE_FORMAT_R16_USCALED] = { 0,
+ A_(C0, ZERO, ZERO, ONE_FLOAT, USCALED, USCALED, USCALED, USCALED, 16, 0),
+ VERTEX_BUFFER },
+
+ /* SSCALED 8 */
+
+ [PIPE_FORMAT_R8G8B8A8_SSCALED] = { 0,
+ A_(C0, C1, C2, C3, SSCALED, SSCALED, SSCALED, SSCALED, 8_8_8_8, 0),
+ VERTEX_BUFFER },
+
+ [PIPE_FORMAT_R8G8B8_SSCALED] = { 0,
+ A_(C0, C1, C2, ONE_FLOAT, SSCALED, SSCALED, SSCALED, SSCALED, 8_8_8, 0),
+ VERTEX_BUFFER },
+
+ [PIPE_FORMAT_R8G8_SSCALED] = { 0,
+ A_(C0, C1, ZERO, ONE_FLOAT, SSCALED, SSCALED, SSCALED, SSCALED, 8_8, 0),
+ VERTEX_BUFFER },
+
+ [PIPE_FORMAT_R8_SSCALED] = { 0,
+ A_(C0, ZERO, ZERO, ONE_FLOAT, SSCALED, SSCALED, SSCALED, SSCALED, 8, 0),
+ VERTEX_BUFFER },
+
+ /* USCALED 8 */
+
+ [PIPE_FORMAT_R8G8B8A8_USCALED] = { 0,
+ A_(C0, C1, C2, C3, USCALED, USCALED, USCALED, USCALED, 8_8_8_8, 0),
+ VERTEX_BUFFER },
+
+ [PIPE_FORMAT_R8G8B8_USCALED] = { 0,
+ A_(C0, C1, C2, ONE_FLOAT, USCALED, USCALED, USCALED, USCALED, 8_8_8, 0),
+ VERTEX_BUFFER },
+
+ [PIPE_FORMAT_R8G8_USCALED] = { 0,
+ A_(C0, C1, ZERO, ONE_FLOAT, USCALED, USCALED, USCALED, USCALED, 8_8, 0),
+ VERTEX_BUFFER },
+
+ [PIPE_FORMAT_R8_USCALED] = { 0,
+ A_(C0, ZERO, ZERO, ONE_FLOAT, USCALED, USCALED, USCALED, USCALED, 8, 0),
+ VERTEX_BUFFER },
+
+ /* OTHER FORMATS */
+
+ [PIPE_FORMAT_R8G8_B8G8_UNORM] = { 0,
+ B_(C0, C1, C2, ONE_FLOAT, UNORM, UNORM, UNORM, UNORM, C1_C2_C1_C0, 0),
+ SAMPLER_VIEW },
+
+ [PIPE_FORMAT_G8R8_G8B8_UNORM] = { 0,
+ B_(C0, C1, C2, ONE_FLOAT, UNORM, UNORM, UNORM, UNORM, C2_C1_C0_C1, 0),
+ SAMPLER_VIEW },
+
+ [PIPE_FORMAT_R8SG8SB8UX8U_NORM] = { 0,
+ B_(C0, C1, C2, ONE_FLOAT, SNORM, SNORM, UNORM, UNORM, 8_8_8_8, 0),
+ SAMPLER_VIEW },
+
+ [PIPE_FORMAT_R5SG5SB6U_NORM] = { 0,
+ B_(C0, C1, C2, ONE_FLOAT, SNORM, SNORM, UNORM, UNORM, 6_5_5, 0),
+ SAMPLER_VIEW },
+
+ [PIPE_FORMAT_R1_UNORM] = { 0,
+ B_(C0, ZERO, ZERO, ONE_FLOAT, UNORM, UNORM, UNORM, UNORM, BITMAP_8X8, 0),
+ SAMPLER_VIEW },
+};
diff --git a/src/gallium/drivers/nvc0/nvc0_graph_macros.h b/src/gallium/drivers/nvc0/nvc0_graph_macros.h
new file mode 100644
index 00000000000..b7d0d3eafa4
--- /dev/null
+++ b/src/gallium/drivers/nvc0/nvc0_graph_macros.h
@@ -0,0 +1,235 @@
+
+#ifndef __NVC0_PGRAPH_MACROS_H__
+#define __NVC0_PGRAPH_MACROS_H__
+
+/* extrinsrt r1, r2, src, size, dst: replace bits [dst:dst+size) in r1
+ * with bits [src:src+size) in r2
+ *
+ * bra(n)z annul: no delay slot
+ */
+
+/* The comments above the macros describe what they *should* be doing,
+ * but we use less functionality for now.
+ */
+
+/*
+ * for (i = 0; i < 8; ++i)
+ * [NVC0_3D_BLEND_ENABLE(i)] = BIT(i of arg);
+ *
+ * [3428] = arg;
+ *
+ * if (arg == 0 || [NVC0_3D_MULTISAMPLE_ENABLE] == 0)
+ * [0d9c] = 0;
+ * else
+ * [0d9c] = [342c];
+ */
+static const uint32_t nvc0_9097_blend_enables[] =
+{
+ 0x05360021, /* 0x00: maddr [NVC0_3D_BLEND_ENABLE(0), increment = 4] */
+ 0x00404042, /* 0x01: send extrinsrt 0 $r1 0 0x1 0 */
+ 0x00424042, /* 0x02: send extrinsrt 0 $r1 0x1 0x1 0 */
+ 0x00444042, /* 0x03: send extrinsrt 0 $r1 0x2 0x1 0 */
+ 0x00464042, /* 0x04: send extrinsrt 0 $r1 0x3 0x1 0 */
+ 0x00484042, /* 0x05: send extrinsrt 0 $r1 0x4 0x1 0 */
+ 0x004a4042, /* 0x06: send extrinsrt 0 $r1 0x5 0x1 0 */
+ 0x004c40c2, /* 0x07: exit send extrinsrt 0 $r1 0x6 0x1 0 */
+ 0x004e4042, /* 0x08: send extrinsrt 0 $r1 0x7 0x1 0 */
+};
+
+/*
+ * uint64 limit = (parm(0) << 32) | parm(1);
+ * uint64 start = (parm(2) << 32);
+ *
+ * if (limit) {
+ * start |= parm(3);
+ * --limit;
+ * } else {
+ * start |= 1;
+ * }
+ *
+ * [0x1c04 + (arg & 0xf) * 16 + 0] = (start >> 32) & 0xff;
+ * [0x1c04 + (arg & 0xf) * 16 + 4] = start & 0xffffffff;
+ * [0x1f00 + (arg & 0xf) * 8 + 0] = (limit >> 32) & 0xff;
+ * [0x1f00 + (arg & 0xf) * 8 + 4] = limit & 0xffffffff;
+ */
+static const uint32_t nvc0_9097_vertex_array_select[] =
+{
+ 0x00000201, /* 0x00: parm $r2 */
+ 0x00000301, /* 0x01: parm $r3 */
+ 0x00000401, /* 0x02: parm $r4 */
+ 0x00000501, /* 0x03: parm $r5 */
+ 0x11004612, /* 0x04: mov $r6 extrinsrt 0 $r1 0 4 2 */
+ 0x09004712, /* 0x05: mov $r7 extrinsrt 0 $r1 0 4 1 */
+ 0x05c07621, /* 0x06: maddr $r6 add $6 0x1701 */
+ 0x00002041, /* 0x07: send $r4 */
+ 0x00002841, /* 0x08: send $r5 */
+ 0x05f03f21, /* 0x09: maddr $r7 add $7 0x17c0 */
+ 0x000010c1, /* 0x0a: exit send $r2 */
+ 0x00001841, /* 0x0b: send $r3 */
+};
+
+static const uint32_t nvc0_9097_color_mask_brdc[] =
+{
+ 0x05a00021, /* maddr [NVC0_3D_COLOR_MASK(0), increment = 4] */
+ 0x00000841, /* send $r1 */
+ 0x00000841, /* send $r1 */
+ 0x00000841, /* send $r1 */
+ 0x00000841, /* send $r1 */
+ 0x00000841, /* send $r1 */
+ 0x00000841, /* send $r1 */
+ 0x000008c1, /* exit send $r1 */
+ 0x00000841, /* send $r1 */
+};
+
+/*
+ * [GL_POLYGON_MODE_FRONT] = arg;
+ *
+ * if (BIT(31 of [0x3410]))
+ * [1a24] = 0x7353;
+ *
+ * if ([NVC0_3D_SP_SELECT(3)] == 0x31 || [NVC0_3D_SP_SELECT(4)] == 0x41)
+ * [02ec] = 0;
+ * else
+ * if ([GL_POLYGON_MODE_BACK] == GL_LINE || arg == GL_LINE)
+ * [02ec] = BYTE(1 of [0x3410]) << 4;
+ * else
+ * [02ec] = BYTE(0 of [0x3410]) << 4;
+ */
+static const uint32_t nvc0_9097_poly_mode_front[] =
+{
+ 0x00db0215, /* 0x00: read $r2 [NVC0_3D_POLYGON_MODE_BACK] */
+ 0x020c0315, /* 0x01: read $r3 [NVC0_3D_SP_SELECT(3)] */
+ 0x00128f10, /* 0x02: mov $r7 or $r1 $r2 */
+ 0x02100415, /* 0x03: read $r4 [NVC0_3D_SP_SELECT(4)] */
+ 0x00004211, /* 0x04: mov $r2 0x1 */
+ 0x00180611, /* 0x05: mov $r6 0x60 */
+ 0x0014bf10, /* 0x06: mov $r7 and $r7 $r2 */
+ 0x0000f807, /* 0x07: braz $r7 0xa */
+ 0x00dac021, /* 0x08: maddr 0x36b */
+ 0x00800611, /* 0x09: mov $r6 0x200 */
+ 0x00131f10, /* 0x0a: mov $r7 or $r3 $r4 */
+ 0x0014bf10, /* 0x0b: mov $r7 and $r7 $r2 */
+ 0x0000f807, /* 0x0c: braz $r7 0xf */
+ 0x00000841, /* 0x0d: send $r1 */
+ 0x00000611, /* 0x0e: mov $r6 0 */
+ 0x002ec0a1, /* 0x0f: exit maddr [02ec] */
+ 0x00003041 /* 0x10: send $r6 */
+};
+
+/*
+ * [GL_POLYGON_MODE_BACK] = arg;
+ *
+ * if (BIT(31 of [0x3410]))
+ * [1a24] = 0x7353;
+ *
+ * if ([NVC0_3D_SP_SELECT(3)] == 0x31 || [NVC0_3D_SP_SELECT(4)] == 0x41)
+ * [02ec] = 0;
+ * else
+ * if ([GL_POLYGON_MODE_FRONT] == GL_LINE || arg == GL_LINE)
+ * [02ec] = BYTE(1 of [0x3410]) << 4;
+ * else
+ * [02ec] = BYTE(0 of [0x3410]) << 4;
+ */
+/* NOTE: 0x3410 = 0x80002006 by default,
+ * POLYGON_MODE == GL_LINE check replaced by (MODE & 1)
+ * SP_SELECT(i) == (i << 4) | 1 check replaced by SP_SELECT(i) & 1
+ */
+static const uint32_t nvc0_9097_poly_mode_back[] =
+{
+ 0x00dac215, /* 0x00: read $r2 [NVC0_3D_POLYGON_MODE_FRONT] */
+ 0x020c0315, /* 0x01: read $r3 [NVC0_3D_SP_SELECT(3)] */
+ 0x00128f10, /* 0x02: mov $r7 or $r1 $r2 */
+ 0x02100415, /* 0x03: read $r4 [NVC0_3D_SP_SELECT(4)] */
+ 0x00004211, /* 0x04: mov $r2 0x1 */
+ 0x00180611, /* 0x05: mov $r6 0x60 */
+ 0x0014bf10, /* 0x06: mov $r7 and $r7 $r2 */
+ 0x0000f807, /* 0x07: braz $r7 0xa */
+ 0x00db0021, /* 0x08: maddr 0x36c */
+ 0x00800611, /* 0x09: mov $r6 0x200 */
+ 0x00131f10, /* 0x0a: mov $r7 or $r3 $r4 */
+ 0x0014bf10, /* 0x0b: mov $r7 and $r7 $r2 */
+ 0x0000f807, /* 0x0c: braz $r7 0xf */
+ 0x00000841, /* 0x0d: send $r1 */
+ 0x00000611, /* 0x0e: mov $r6 0 */
+ 0x002ec0a1, /* 0x0f: exit maddr [02ec] */
+ 0x00003041 /* 0x10: send $r6 */
+};
+
+/*
+ * [NVC0_3D_SP_SELECT(4)] = arg
+ *
+ * if BIT(31 of [0x3410]) == 0
+ * [1a24] = 0x7353;
+ *
+ * if ([NVC0_3D_SP_SELECT(3)] == 0x31 || arg == 0x41)
+ * [02ec] = 0
+ * else
+ * if (any POLYGON MODE == LINE)
+ * [02ec] = BYTE(1 of [3410]) << 4;
+ * else
+ * [02ec] = BYTE(0 of [3410]) << 4; // 02ec valid bits are 0xff1
+ */
+static const uint32_t nvc0_9097_gp_select[] = /* 0x0f */
+{
+ 0x00dac215, /* 0x00: read $r2 0x36b */
+ 0x00db0315, /* 0x01: read $r3 0x36c */
+ 0x0012d710, /* 0x02: mov $r7 or $r2 $r3 */
+ 0x020c0415, /* 0x03: read $r4 0x830 */
+ 0x00004211, /* 0x04: mov $r2 0x1 */
+ 0x00180611, /* 0x05: mov $r6 0x60 */
+ 0x0014bf10, /* 0x06: mov $r7 and $r7 $r2 */
+ 0x0000f807, /* 0x07: braz $r7 0xa */
+ 0x02100021, /* 0x08: maddr 0x840 */
+ 0x00800611, /* 0x09: mov $r6 0x200 */
+ 0x00130f10, /* 0x0a: mov $r7 or $r1 $r4 */
+ 0x0014bf10, /* 0x0b: mov $r7 and $r7 $r2 */
+ 0x0000f807, /* 0x0c: braz $r7 0xf */
+ 0x00000841, /* 0x0d: send $r1 */
+ 0x00000611, /* 0x0e: mov $r6 0 */
+ 0x002ec0a1, /* 0x0f: exit maddr 0xbb */
+ 0x00003041, /* 0x10: send $r6 */
+};
+
+/*
+ * [NVC0_3D_SP_SELECT(3)] = arg
+ *
+ * if BIT(31 of [0x3410]) == 0
+ * [1a24] = 0x7353;
+ *
+ * if (arg == 0x31) {
+ * if (BIT(2 of [0x3430])) {
+ * int i = 15; do { --i; } while(i);
+ * [0x1a2c] = 0;
+ * }
+ * }
+ *
+ * if ([NVC0_3D_SP_SELECT(4)] == 0x41 || arg == 0x31)
+ * [02ec] = 0
+ * else
+ * if ([any POLYGON_MODE] == GL_LINE)
+ * [02ec] = BYTE(1 of [3410]) << 4;
+ * else
+ * [02ec] = BYTE(0 of [3410]) << 4;
+ */
+static const uint32_t nvc0_9097_tep_select[] = /* 0x10 */
+{
+ 0x00dac215, /* 0x00: read $r2 0x36b */
+ 0x00db0315, /* 0x01: read $r3 0x36c */
+ 0x0012d710, /* 0x02: mov $r7 or $r2 $r3 */
+ 0x02100415, /* 0x03: read $r4 0x840 */
+ 0x00004211, /* 0x04: mov $r2 0x1 */
+ 0x00180611, /* 0x05: mov $r6 0x60 */
+ 0x0014bf10, /* 0x06: mov $r7 and $r7 $r2 */
+ 0x0000f807, /* 0x07: braz $r7 0xa */
+ 0x020c0021, /* 0x08: maddr 0x830 */
+ 0x00800611, /* 0x09: mov $r6 0x200 */
+ 0x00130f10, /* 0x0a: mov $r7 or $r1 $r4 */
+ 0x0014bf10, /* 0x0b: mov $r7 and $r7 $r2 */
+ 0x0000f807, /* 0x0c: braz $r7 0xf */
+ 0x00000841, /* 0x0d: send $r1 */
+ 0x00000611, /* 0x0e: mov $r6 0 */
+ 0x002ec0a1, /* 0x0f: exit maddr 0xbb */
+ 0x00003041, /* 0x10: send $r6 */
+};
+
+#endif
diff --git a/src/gallium/drivers/nvc0/nvc0_m2mf.xml.h b/src/gallium/drivers/nvc0/nvc0_m2mf.xml.h
new file mode 100644
index 00000000000..3bf628d425e
--- /dev/null
+++ b/src/gallium/drivers/nvc0/nvc0_m2mf.xml.h
@@ -0,0 +1,138 @@
+#ifndef NVC0_M2MF_XML
+#define NVC0_M2MF_XML
+
+/* Autogenerated file, DO NOT EDIT manually!
+
+This file was generated by the rules-ng-ng headergen tool in this git repository:
+http://0x04.net/cgit/index.cgi/rules-ng-ng
+git clone git://0x04.net/rules-ng-ng
+
+The rules-ng-ng source files this header was generated from are:
+- nvc0_m2mf.xml ( 2227 bytes, from 2010-10-16 16:10:29)
+- copyright.xml ( 6498 bytes, from 2010-10-03 13:18:37)
+- nv_object.xml ( 11379 bytes, from 2010-10-16 11:43:24)
+- nvchipsets.xml ( 2907 bytes, from 2010-10-15 16:28:21)
+- nv_defs.xml ( 4437 bytes, from 2010-07-06 07:43:58)
+
+Copyright (C) 2006-2010 by the following authors:
+- Artur Huillet <arthur.huillet@free.fr> (ahuillet)
+- Ben Skeggs (darktama, darktama_)
+- B. R. <koala_br@users.sourceforge.net> (koala_br)
+- Carlos Martin <carlosmn@users.sf.net> (carlosmn)
+- Christoph Bumiller <e0425955@student.tuwien.ac.at> (calim, chrisbmr)
+- Dawid Gajownik <gajownik@users.sf.net> (gajownik)
+- Dmitry Baryshkov
+- Dmitry Eremin-Solenikov <lumag@users.sf.net> (lumag)
+- EdB <edb_@users.sf.net> (edb_)
+- Erik Waling <erikwailing@users.sf.net> (erikwaling)
+- Francisco Jerez <currojerez@riseup.net> (curro, curro_, currojerez)
+- imirkin <imirkin@users.sf.net> (imirkin)
+- jb17bsome <jb17bsome@bellsouth.net> (jb17bsome)
+- Jeremy Kolb <kjeremy@users.sf.net> (kjeremy)
+- Laurent Carlier <lordheavym@gmail.com> (lordheavy)
+- Luca Barbieri <luca@luca-barbieri.com> (lb, lb1)
+- Maarten Maathuis <madman2003@gmail.com> (stillunknown)
+- Marcin Kościelnicki <koriakin@0x04.net> (mwk, koriakin)
+- Mark Carey <mark.carey@gmail.com> (careym)
+- Matthieu Castet <matthieu.castet@parrot.com> (mat-c)
+- nvidiaman <nvidiaman@users.sf.net> (nvidiaman)
+- Patrice Mandin <patmandin@gmail.com> (pmandin, pmdata)
+- Pekka Paalanen <pq@iki.fi> (pq, ppaalanen)
+- Peter Popov <ironpeter@users.sf.net> (ironpeter)
+- Richard Hughes <hughsient@users.sf.net> (hughsient)
+- Rudi Cilibrasi <cilibrar@users.sf.net> (cilibrar)
+- Serge Martin
+- Simon Raffeiner
+- Stephane Loeuillet <leroutier@users.sf.net> (leroutier)
+- Stephane Marchesin <stephane.marchesin@gmail.com> (marcheu)
+- sturmflut <sturmflut@users.sf.net> (sturmflut)
+- Sylvain Munaut <tnt@246tNt.com>
+- Victor Stinner <victor.stinner@haypocalc.com> (haypo)
+- Wladmir van der Laan <laanwj@gmail.com> (miathan6)
+- Younes Manton <younes.m@gmail.com> (ymanton)
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice (including the
+next paragraph) shall be included in all copies or substantial
+portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE COPYRIGHT OWNER(S) AND/OR ITS SUPPLIERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+*/
+
+
+
+#define NVC0_M2MF_TILING_MODE_IN 0x00000204
+
+#define NVC0_M2MF_TILING_PITCH_IN 0x00000208
+
+#define NVC0_M2MF_TILING_HEIGHT_IN 0x0000020c
+
+#define NVC0_M2MF_TILING_DEPTH_IN 0x00000210
+
+#define NVC0_M2MF_TILING_POSITION_IN_Z 0x00000214
+
+#define NVC0_M2MF_TILING_MODE_OUT 0x00000220
+
+#define NVC0_M2MF_TILING_PITCH_OUT 0x00000224
+
+#define NVC0_M2MF_TILING_HEIGHT_OUT 0x00000228
+
+#define NVC0_M2MF_TILING_DEPTH_OUT 0x0000022c
+
+#define NVC0_M2MF_TILING_POSITION_OUT_Z 0x00000230
+
+#define NVC0_M2MF_OFFSET_OUT_HIGH 0x00000238
+
+#define NVC0_M2MF_OFFSET_OUT_LOW 0x0000023c
+
+#define NVC0_M2MF_EXEC 0x00000300
+#define NVC0_M2MF_EXEC_PUSH 0x00000001
+#define NVC0_M2MF_EXEC_LINEAR_IN 0x00000010
+#define NVC0_M2MF_EXEC_LINEAR_OUT 0x00000100
+#define NVC0_M2MF_EXEC_NOTIFY 0x00002000
+#define NVC0_M2MF_EXEC_INC__MASK 0x00f00000
+#define NVC0_M2MF_EXEC_INC__SHIFT 20
+
+#define NVC0_M2MF_DATA 0x00000304
+
+#define NVC0_M2MF_OFFSET_IN_HIGH 0x0000030c
+
+#define NVC0_M2MF_OFFSET_IN_LOW 0x00000310
+
+#define NVC0_M2MF_PITCH_IN 0x00000314
+
+#define NVC0_M2MF_PITCH_OUT 0x00000318
+
+#define NVC0_M2MF_LINE_LENGTH_IN 0x0000031c
+
+#define NVC0_M2MF_LINE_COUNT 0x00000320
+
+#define NVC0_M2MF_NOTIFY_ADDRESS_HIGH 0x0000032c
+
+#define NVC0_M2MF_NOTIFY_ADDRESS_LOW 0x00000330
+
+#define NVC0_M2MF_NOTIFY 0x00000334
+
+#define NVC0_M2MF_TILING_POSITION_IN_X 0x00000344
+
+#define NVC0_M2MF_TILING_POSITION_IN_Y 0x00000348
+
+#define NVC0_M2MF_TILING_POSITION_OUT_X 0x0000034c
+
+#define NVC0_M2MF_TILING_POSITION_OUT_Y 0x00000350
+
+
+#endif /* NVC0_M2MF_XML */
diff --git a/src/gallium/drivers/nvc0/nvc0_miptree.c b/src/gallium/drivers/nvc0/nvc0_miptree.c
new file mode 100644
index 00000000000..bced3245524
--- /dev/null
+++ b/src/gallium/drivers/nvc0/nvc0_miptree.c
@@ -0,0 +1,319 @@
+/*
+ * Copyright 2008 Ben Skeggs
+ *
+ * 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 "pipe/p_state.h"
+#include "pipe/p_defines.h"
+#include "util/u_inlines.h"
+#include "util/u_format.h"
+
+#include "nvc0_context.h"
+#include "nvc0_resource.h"
+#include "nvc0_transfer.h"
+
+static INLINE uint32_t
+get_tile_dims(unsigned nx, unsigned ny, unsigned nz)
+{
+ uint32_t tile_mode = 0x000;
+
+ if (ny > 64) tile_mode = 0x040; /* height 128 tiles */
+ else
+ if (ny > 32) tile_mode = 0x030; /* height 64 tiles */
+ else
+ if (ny > 16) tile_mode = 0x020; /* height 32 tiles */
+ else
+ if (ny > 8) tile_mode = 0x010; /* height 16 tiles */
+
+ if (nz == 1)
+ return tile_mode;
+ else
+ if (tile_mode > 0x020)
+ tile_mode = 0x020;
+
+ if (nz > 16 && tile_mode < 0x020)
+ return tile_mode | 0x500; /* depth 32 tiles */
+ if (nz > 8) return tile_mode | 0x400; /* depth 16 tiles */
+ if (nz > 4) return tile_mode | 0x300; /* depth 8 tiles */
+ if (nz > 2) return tile_mode | 0x200; /* depth 4 tiles */
+
+ return tile_mode | 0x100;
+}
+
+uint32_t
+nvc0_miptree_zslice_offset(struct nvc0_miptree *mt, unsigned l, unsigned z)
+{
+ unsigned nblocksy; /* height of texture level aligned to tile height */
+
+ unsigned stride_2d; /* to next slice within a 3D tile */
+ unsigned stride_3d; /* to slice in the next (in z direction !) 3D tile */
+
+ unsigned tile_d_shift = NVC0_TILE_DIM_SHIFT(mt->level[l].tile_mode, 2);
+ unsigned tile_d = 1 << tile_d_shift;
+
+ nblocksy = util_format_get_nblocksy(mt->base.base.format,
+ u_minify(mt->base.base.height0, l));
+
+ nblocksy = align(nblocksy, NVC0_TILE_HEIGHT(mt->level[l].tile_mode));
+
+ stride_2d = NVC0_TILE_SIZE_2D(mt->level[l].tile_mode);
+
+ stride_3d = (nblocksy * mt->level[l].pitch) << tile_d_shift;
+
+ return (z & (tile_d - 1)) * stride_2d + (z >> tile_d_shift) * stride_3d;
+}
+
+static void
+nvc0_miptree_destroy(struct pipe_screen *pscreen, struct pipe_resource *pt)
+{
+ struct nvc0_miptree *mt = nvc0_miptree(pt);
+
+ nouveau_screen_bo_release(pscreen, mt->base.bo);
+
+ FREE(mt);
+}
+
+static boolean
+nvc0_miptree_get_handle(struct pipe_screen *pscreen,
+ struct pipe_resource *pt,
+ struct winsys_handle *whandle)
+{
+ struct nvc0_miptree *mt = nvc0_miptree(pt);
+ unsigned stride;
+
+ if (!mt || !mt->base.bo)
+ return FALSE;
+
+ stride = util_format_get_stride(mt->base.base.format,
+ mt->base.base.width0);
+
+ return nouveau_screen_bo_get_handle(pscreen,
+ mt->base.bo,
+ stride,
+ whandle);
+}
+
+const struct u_resource_vtbl nvc0_miptree_vtbl =
+{
+ nvc0_miptree_get_handle, /* get_handle */
+ nvc0_miptree_destroy, /* resource_destroy */
+ nvc0_miptree_transfer_new, /* get_transfer */
+ nvc0_miptree_transfer_del, /* transfer_destroy */
+ nvc0_miptree_transfer_map, /* transfer_map */
+ u_default_transfer_flush_region, /* transfer_flush_region */
+ nvc0_miptree_transfer_unmap, /* transfer_unmap */
+ u_default_transfer_inline_write /* transfer_inline_write */
+};
+
+struct pipe_resource *
+nvc0_miptree_create(struct pipe_screen *pscreen,
+ const struct pipe_resource *templ)
+{
+ struct nouveau_device *dev = nouveau_screen(pscreen)->device;
+ struct nvc0_miptree *mt = CALLOC_STRUCT(nvc0_miptree);
+ struct pipe_resource *pt = &mt->base.base;
+ int ret;
+ unsigned w, h, d, l, alloc_size;
+ uint32_t tile_flags;
+
+ if (!mt)
+ return NULL;
+
+ mt->base.vtbl = &nvc0_miptree_vtbl;
+ *pt = *templ;
+ pipe_reference_init(&pt->reference, 1);
+ pt->screen = pscreen;
+
+ mt->layout_3d = pt->target == PIPE_TEXTURE_3D;
+
+ w = pt->width0;
+ h = pt->height0;
+ d = mt->layout_3d ? pt->depth0 : 1;
+
+ switch (pt->format) {
+ case PIPE_FORMAT_Z16_UNORM:
+ tile_flags = 0x0700; /* COMPRESSED */
+ tile_flags = 0x0100; /* NORMAL */
+ break;
+ case PIPE_FORMAT_S8_USCALED_Z24_UNORM:
+ tile_flags = 0x5300; /* MSAA 4, COMPRESSED */
+ tile_flags = 0x4600; /* NORMAL */
+ break;
+ case PIPE_FORMAT_Z24X8_UNORM:
+ case PIPE_FORMAT_Z24_UNORM_S8_USCALED:
+ tile_flags = 0x1100; /* NORMAL */
+ if (w * h >= 128 * 128 && 0)
+ tile_flags = 0x1700; /* COMPRESSED, requires magic */
+ break;
+ case PIPE_FORMAT_R32G32B32A32_FLOAT:
+ tile_flags = 0xf500; /* COMPRESSED */
+ tile_flags = 0xf700; /* MSAA 2 */
+ tile_flags = 0xf900; /* MSAA 4 */
+ tile_flags = 0xfe00; /* NORMAL */
+ break;
+ case PIPE_FORMAT_Z32_FLOAT_S8X24_USCALED:
+ tile_flags = 0xce00; /* COMPRESSED */
+ tile_flags = 0xcf00; /* MSAA 2, COMPRESSED */
+ tile_flags = 0xd000; /* MSAA 4, COMPRESSED */
+ tile_flags = 0xc300; /* NORMAL */
+ break;
+ case PIPE_FORMAT_R16G16B16A16_UNORM:
+ tile_flags = 0xe900; /* COMPRESSED */
+ tile_flags = 0xfe00; /* NORMAL */
+ break;
+ default:
+ tile_flags = 0xe000; /* MSAA 4, COMPRESSED 32 BIT */
+ tile_flags = 0xfe00; /* NORMAL 32 BIT */
+ if (w * h >= 128 * 128 && 0)
+ tile_flags = 0xdb00; /* COMPRESSED 32 BIT, requires magic */
+ break;
+ }
+
+ /* For 3D textures, a mipmap is spanned by all the layers, for array
+ * textures and cube maps, each layer contains its own mipmaps.
+ */
+ for (l = 0; l <= pt->last_level; ++l) {
+ struct nvc0_miptree_level *lvl = &mt->level[l];
+ unsigned nbx = util_format_get_nblocksx(pt->format, w);
+ unsigned nby = util_format_get_nblocksy(pt->format, h);
+ unsigned blocksize = util_format_get_blocksize(pt->format);
+
+ lvl->offset = mt->total_size;
+ lvl->tile_mode = get_tile_dims(nbx, nby, d);
+ lvl->pitch = align(nbx * blocksize, NVC0_TILE_PITCH(lvl->tile_mode));
+
+ mt->total_size += lvl->pitch *
+ align(nby, NVC0_TILE_HEIGHT(lvl->tile_mode)) *
+ align(d, NVC0_TILE_DEPTH(lvl->tile_mode));
+
+ w = u_minify(w, 1);
+ h = u_minify(h, 1);
+ d = u_minify(d, 1);
+ }
+
+ if (pt->array_size > 1) {
+ mt->layer_stride = align(mt->total_size,
+ NVC0_TILE_SIZE(mt->level[0].tile_mode));
+ mt->total_size = mt->layer_stride * pt->array_size;
+ }
+
+ alloc_size = mt->total_size;
+ if (tile_flags == 0x1700)
+ alloc_size *= 3; /* HiZ, XXX: correct size */
+
+ ret = nouveau_bo_new_tile(dev, NOUVEAU_BO_VRAM, 256, alloc_size,
+ mt->level[0].tile_mode, tile_flags,
+ &mt->base.bo);
+ if (ret) {
+ FREE(mt);
+ return NULL;
+ }
+ mt->base.domain = NOUVEAU_BO_VRAM;
+
+ return pt;
+}
+
+struct pipe_resource *
+nvc0_miptree_from_handle(struct pipe_screen *pscreen,
+ const struct pipe_resource *templ,
+ struct winsys_handle *whandle)
+{
+ struct nvc0_miptree *mt;
+ unsigned stride;
+
+ /* only supports 2D, non-mipmapped textures for the moment */
+ if ((templ->target != PIPE_TEXTURE_2D &&
+ templ->target != PIPE_TEXTURE_RECT) ||
+ templ->last_level != 0 ||
+ templ->depth0 != 1 ||
+ templ->array_size > 1)
+ return NULL;
+
+ mt = CALLOC_STRUCT(nvc0_miptree);
+ if (!mt)
+ return NULL;
+
+ mt->base.bo = nouveau_screen_bo_from_handle(pscreen, whandle, &stride);
+ if (mt->base.bo == NULL) {
+ FREE(mt);
+ return NULL;
+ }
+
+ mt->base.base = *templ;
+ mt->base.vtbl = &nvc0_miptree_vtbl;
+ pipe_reference_init(&mt->base.base.reference, 1);
+ mt->base.base.screen = pscreen;
+ mt->level[0].pitch = stride;
+ mt->level[0].offset = 0;
+ mt->level[0].tile_mode = mt->base.bo->tile_mode;
+
+ /* no need to adjust bo reference count */
+ return &mt->base.base;
+}
+
+
+/* Surface functions.
+ */
+
+struct pipe_surface *
+nvc0_miptree_surface_new(struct pipe_context *pipe,
+ struct pipe_resource *pt,
+ const struct pipe_surface *templ)
+{
+ struct nvc0_miptree *mt = nvc0_miptree(pt); /* guaranteed */
+ struct nvc0_surface *ns;
+ struct pipe_surface *ps;
+ struct nvc0_miptree_level *lvl = &mt->level[templ->u.tex.level];
+
+ ns = CALLOC_STRUCT(nvc0_surface);
+ if (!ns)
+ return NULL;
+ ps = &ns->base;
+
+ pipe_reference_init(&ps->reference, 1);
+ pipe_resource_reference(&ps->texture, pt);
+ ps->context = pipe;
+ ps->format = templ->format;
+ ps->usage = templ->usage;
+ ps->u.tex.level = templ->u.tex.level;
+ ps->u.tex.first_layer = templ->u.tex.first_layer;
+ ps->u.tex.last_layer = templ->u.tex.last_layer;
+
+ ns->width = u_minify(pt->width0, ps->u.tex.level);
+ ns->height = u_minify(pt->height0, ps->u.tex.level);
+ ns->depth = ps->u.tex.last_layer - ps->u.tex.first_layer + 1;
+ ns->offset = lvl->offset;
+
+ /* comment says there are going to be removed, but they're used by the st */
+ ps->width = ns->width;
+ ps->height = ns->height;
+
+ return ps;
+}
+
+void
+nvc0_miptree_surface_del(struct pipe_context *pipe, struct pipe_surface *ps)
+{
+ struct nvc0_surface *s = nvc0_surface(ps);
+
+ pipe_resource_reference(&ps->texture, NULL);
+
+ FREE(s);
+}
diff --git a/src/gallium/drivers/nvc0/nvc0_pc.c b/src/gallium/drivers/nvc0/nvc0_pc.c
new file mode 100644
index 00000000000..bd85a7f1ffd
--- /dev/null
+++ b/src/gallium/drivers/nvc0/nvc0_pc.c
@@ -0,0 +1,716 @@
+/*
+ * Copyright 2010 Christoph Bumiller
+ *
+ * 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.
+ */
+
+#define NOUVEAU_DEBUG 1
+
+#include "nvc0_pc.h"
+#include "nvc0_program.h"
+
+uint8_t
+nvc0_ir_reverse_cc(uint8_t cc)
+{
+ static const uint8_t cc_swapped[8] = { 0, 4, 2, 6, 1, 5, 3, 7 };
+
+ return cc_swapped[cc & 7] | (cc & ~7);
+}
+
+boolean
+nvc0_insn_can_load(struct nv_instruction *nvi, int s,
+ struct nv_instruction *ld)
+{
+ int i;
+
+ if (ld->opcode == NV_OP_MOV && ld->src[0]->value->reg.file == NV_FILE_IMM) {
+ if (s > 1 || !(nvc0_op_info_table[nvi->opcode].immediate & (1 << s)))
+ return FALSE;
+ if (!(nvc0_op_info_table[nvi->opcode].immediate & 4))
+ if (ld->src[0]->value->reg.imm.u32 & 0xfff)
+ return FALSE;
+ } else
+ if (!(nvc0_op_info_table[nvi->opcode].memory & (1 << s)))
+ return FALSE;
+
+ if (ld->indirect >= 0)
+ return FALSE;
+
+ /* a few ops can use g[] sources directly, but we don't support g[] yet */
+ if (ld->src[0]->value->reg.file == NV_FILE_MEM_L ||
+ ld->src[0]->value->reg.file == NV_FILE_MEM_G)
+ return FALSE;
+
+ for (i = 0; i < 3 && nvi->src[i]; ++i)
+ if (nvi->src[i]->value->reg.file == NV_FILE_IMM)
+ return FALSE;
+
+ return TRUE;
+}
+
+/* Return whether this instruction can be executed conditionally. */
+boolean
+nvc0_insn_is_predicateable(struct nv_instruction *nvi)
+{
+ if (nvi->predicate >= 0) /* already predicated */
+ return FALSE;
+ if (!nvc0_op_info_table[nvi->opcode].predicate &&
+ !nvc0_op_info_table[nvi->opcode].pseudo)
+ return FALSE;
+ return TRUE;
+}
+
+int
+nvc0_insn_refcount(struct nv_instruction *nvi)
+{
+ int rc = 0;
+ int i;
+ for (i = 0; i < 5 && nvi->def[i]; ++i) {
+ if (!nvi->def[i])
+ return rc;
+ rc += nvi->def[i]->refc;
+ }
+ return rc;
+}
+
+int
+nvc0_pc_replace_value(struct nv_pc *pc,
+ struct nv_value *old_val,
+ struct nv_value *new_val)
+{
+ int i, n, s;
+
+ if (old_val == new_val)
+ return old_val->refc;
+
+ for (i = 0, n = 0; i < pc->num_refs; ++i) {
+ if (pc->refs[i]->value == old_val) {
+ ++n;
+ for (s = 0; s < 6 && pc->refs[i]->insn->src[s]; ++s)
+ if (pc->refs[i]->insn->src[s] == pc->refs[i])
+ break;
+ assert(s < 6);
+ nv_reference(pc, pc->refs[i]->insn, s, new_val);
+ }
+ }
+ return n;
+}
+
+static INLINE boolean
+is_gpr63(struct nv_value *val)
+{
+ return (val->reg.file == NV_FILE_GPR && val->reg.id == 63);
+}
+
+struct nv_value *
+nvc0_pc_find_constant(struct nv_ref *ref)
+{
+ struct nv_value *src;
+
+ if (!ref)
+ return NULL;
+
+ src = ref->value;
+ while (src->insn && src->insn->opcode == NV_OP_MOV) {
+ assert(!src->insn->src[0]->mod);
+ src = src->insn->src[0]->value;
+ }
+ if ((src->reg.file == NV_FILE_IMM) || is_gpr63(src) ||
+ (src->insn &&
+ src->insn->opcode == NV_OP_LD &&
+ src->insn->src[0]->value->reg.file >= NV_FILE_MEM_C(0) &&
+ src->insn->src[0]->value->reg.file <= NV_FILE_MEM_C(15)))
+ return src;
+ return NULL;
+}
+
+struct nv_value *
+nvc0_pc_find_immediate(struct nv_ref *ref)
+{
+ struct nv_value *src = nvc0_pc_find_constant(ref);
+
+ return (src && (src->reg.file == NV_FILE_IMM || is_gpr63(src))) ? src : NULL;
+}
+
+static void
+nv_pc_free_refs(struct nv_pc *pc)
+{
+ int i;
+ for (i = 0; i < pc->num_refs; i += 64)
+ FREE(pc->refs[i]);
+ FREE(pc->refs);
+}
+
+static const char *
+edge_name(ubyte type)
+{
+ switch (type) {
+ case CFG_EDGE_FORWARD: return "forward";
+ case CFG_EDGE_BACK: return "back";
+ case CFG_EDGE_LOOP_ENTER: return "loop";
+ case CFG_EDGE_LOOP_LEAVE: return "break";
+ case CFG_EDGE_FAKE: return "fake";
+ default:
+ return "?";
+ }
+}
+
+void
+nvc0_pc_pass_in_order(struct nv_basic_block *root, nv_pc_pass_func f,
+ void *priv)
+{
+ struct nv_basic_block *bb[64], *bbb[16], *b;
+ int j, p, pp;
+
+ bb[0] = root;
+ p = 1;
+ pp = 0;
+
+ while (p > 0) {
+ b = bb[--p];
+ b->priv = 0;
+
+ for (j = 1; j >= 0; --j) {
+ if (!b->out[j])
+ continue;
+
+ switch (b->out_kind[j]) {
+ case CFG_EDGE_BACK:
+ continue;
+ case CFG_EDGE_FORWARD:
+ case CFG_EDGE_FAKE:
+ if (++b->out[j]->priv == b->out[j]->num_in)
+ bb[p++] = b->out[j];
+ break;
+ case CFG_EDGE_LOOP_ENTER:
+ bb[p++] = b->out[j];
+ break;
+ case CFG_EDGE_LOOP_LEAVE:
+ if (!b->out[j]->priv) {
+ bbb[pp++] = b->out[j];
+ b->out[j]->priv = 1;
+ }
+ break;
+ default:
+ assert(0);
+ break;
+ }
+ }
+
+ f(priv, b);
+
+ if (!p) {
+ p = pp;
+ for (; pp > 0; --pp)
+ bb[pp - 1] = bbb[pp - 1];
+ }
+ }
+}
+
+static void
+nv_do_print_function(void *priv, struct nv_basic_block *b)
+{
+ struct nv_instruction *i;
+
+ debug_printf("=== BB %i ", b->id);
+ if (b->out[0])
+ debug_printf("[%s -> %i] ", edge_name(b->out_kind[0]), b->out[0]->id);
+ if (b->out[1])
+ debug_printf("[%s -> %i] ", edge_name(b->out_kind[1]), b->out[1]->id);
+ debug_printf("===\n");
+
+ i = b->phi;
+ if (!i)
+ i = b->entry;
+ for (; i; i = i->next)
+ nvc0_print_instruction(i);
+}
+
+void
+nvc0_print_function(struct nv_basic_block *root)
+{
+ if (root->subroutine)
+ debug_printf("SUBROUTINE %i\n", root->subroutine);
+ else
+ debug_printf("MAIN\n");
+
+ nvc0_pc_pass_in_order(root, nv_do_print_function, root);
+}
+
+void
+nvc0_print_program(struct nv_pc *pc)
+{
+ int i;
+ for (i = 0; i < pc->num_subroutines + 1; ++i)
+ if (pc->root[i])
+ nvc0_print_function(pc->root[i]);
+}
+
+#if NOUVEAU_DEBUG > 1
+static void
+nv_do_print_cfgraph(struct nv_pc *pc, FILE *f, struct nv_basic_block *b)
+{
+ int i;
+
+ b->pass_seq = pc->pass_seq;
+
+ fprintf(f, "\t%i [shape=box]\n", b->id);
+
+ for (i = 0; i < 2; ++i) {
+ if (!b->out[i])
+ continue;
+ switch (b->out_kind[i]) {
+ case CFG_EDGE_FORWARD:
+ fprintf(f, "\t%i -> %i;\n", b->id, b->out[i]->id);
+ break;
+ case CFG_EDGE_LOOP_ENTER:
+ fprintf(f, "\t%i -> %i [color=green];\n", b->id, b->out[i]->id);
+ break;
+ case CFG_EDGE_LOOP_LEAVE:
+ fprintf(f, "\t%i -> %i [color=red];\n", b->id, b->out[i]->id);
+ break;
+ case CFG_EDGE_BACK:
+ fprintf(f, "\t%i -> %i;\n", b->id, b->out[i]->id);
+ continue;
+ case CFG_EDGE_FAKE:
+ fprintf(f, "\t%i -> %i [style=dotted];\n", b->id, b->out[i]->id);
+ break;
+ default:
+ assert(0);
+ break;
+ }
+ if (b->out[i]->pass_seq < pc->pass_seq)
+ nv_do_print_cfgraph(pc, f, b->out[i]);
+ }
+}
+
+/* Print the control flow graph of subroutine @subr (0 == MAIN) to a file. */
+static void
+nv_print_cfgraph(struct nv_pc *pc, const char *filepath, int subr)
+{
+ FILE *f;
+
+ f = fopen(filepath, "a");
+ if (!f)
+ return;
+
+ fprintf(f, "digraph G {\n");
+
+ ++pc->pass_seq;
+
+ nv_do_print_cfgraph(pc, f, pc->root[subr]);
+
+ fprintf(f, "}\n");
+
+ fclose(f);
+}
+#endif
+
+static INLINE void
+nvc0_pc_print_binary(struct nv_pc *pc)
+{
+ unsigned i;
+
+ NOUVEAU_DBG("nvc0_pc_print_binary(%u ops)\n", pc->emit_size / 8);
+
+ for (i = 0; i < pc->emit_size / 4; i += 2) {
+ debug_printf("0x%08x ", pc->emit[i + 0]);
+ debug_printf("0x%08x ", pc->emit[i + 1]);
+ if ((i % 16) == 15)
+ debug_printf("\n");
+ }
+ debug_printf("\n");
+}
+
+static int
+nvc0_emit_program(struct nv_pc *pc)
+{
+ uint32_t *code = pc->emit;
+ int n;
+
+ NOUVEAU_DBG("emitting program: size = %u\n", pc->emit_size);
+
+ pc->emit_pos = 0;
+ for (n = 0; n < pc->num_blocks; ++n) {
+ struct nv_instruction *i;
+ struct nv_basic_block *b = pc->bb_list[n];
+
+ for (i = b->entry; i; i = i->next) {
+ nvc0_emit_instruction(pc, i);
+ pc->emit += 2;
+ pc->emit_pos += 8;
+ }
+ }
+ assert(pc->emit == &code[pc->emit_size / 4]);
+
+ pc->emit[0] = 0x00001de7;
+ pc->emit[1] = 0x80000000;
+ pc->emit_size += 8;
+
+ pc->emit = code;
+
+#ifdef NOUVEAU_DEBUG
+ nvc0_pc_print_binary(pc);
+#else
+ debug_printf("not printing binary\n");
+#endif
+ return 0;
+}
+
+int
+nvc0_generate_code(struct nvc0_translation_info *ti)
+{
+ struct nv_pc *pc;
+ int ret;
+ int i;
+
+ pc = CALLOC_STRUCT(nv_pc);
+ if (!pc)
+ return 1;
+
+ pc->is_fragprog = ti->prog->type == PIPE_SHADER_FRAGMENT;
+
+ pc->root = CALLOC(ti->num_subrs + 1, sizeof(pc->root[0]));
+ if (!pc->root) {
+ FREE(pc);
+ return 1;
+ }
+ pc->num_subroutines = ti->num_subrs;
+
+ ret = nvc0_tgsi_to_nc(pc, ti);
+ if (ret)
+ goto out;
+#if NOUVEAU_DEBUG > 1
+ nvc0_print_program(pc);
+#endif
+
+ pc->opt_reload_elim = ti->require_stores ? FALSE : TRUE;
+
+ /* optimization */
+ ret = nvc0_pc_exec_pass0(pc);
+ if (ret)
+ goto out;
+#ifdef NOUVEAU_DEBUG
+ nvc0_print_program(pc);
+#endif
+
+ /* register allocation */
+ ret = nvc0_pc_exec_pass1(pc);
+ if (ret)
+ goto out;
+#if NOUVEAU_DEBUG > 1
+ nvc0_print_program(pc);
+ nv_print_cfgraph(pc, "nvc0_shader_cfgraph.dot", 0);
+#endif
+
+ /* prepare for emission */
+ ret = nvc0_pc_exec_pass2(pc);
+ if (ret)
+ goto out;
+ assert(!(pc->emit_size % 8));
+
+ pc->emit = CALLOC(pc->emit_size / 4 + 2, 4);
+ if (!pc->emit) {
+ ret = 3;
+ goto out;
+ }
+ ret = nvc0_emit_program(pc);
+ if (ret)
+ goto out;
+
+ ti->prog->code = pc->emit;
+ ti->prog->code_base = 0;
+ ti->prog->code_size = pc->emit_size;
+ ti->prog->parm_size = 0;
+
+ ti->prog->max_gpr = MAX2(4, pc->max_reg[NV_FILE_GPR] + 1);
+
+ ti->prog->relocs = pc->reloc_entries;
+ ti->prog->num_relocs = pc->num_relocs;
+
+ NOUVEAU_DBG("SHADER TRANSLATION - %s\n", ret ? "failure" : "success");
+
+out:
+ nv_pc_free_refs(pc);
+
+ for (i = 0; i < pc->num_blocks; ++i)
+ FREE(pc->bb_list[i]);
+ if (pc->root)
+ FREE(pc->root);
+ if (ret) {
+ /* on success, these will be referenced by struct nvc0_program */
+ if (pc->emit)
+ FREE(pc->emit);
+ if (pc->immd_buf)
+ FREE(pc->immd_buf);
+ if (pc->reloc_entries)
+ FREE(pc->reloc_entries);
+ }
+ FREE(pc);
+ return ret;
+}
+
+static void
+nvbb_insert_phi(struct nv_basic_block *b, struct nv_instruction *i)
+{
+ if (!b->phi) {
+ i->prev = NULL;
+ b->phi = i;
+ i->next = b->entry;
+ if (b->entry) {
+ assert(!b->entry->prev && b->exit);
+ b->entry->prev = i;
+ } else {
+ b->entry = i;
+ b->exit = i;
+ }
+ } else {
+ assert(b->entry);
+ if (b->entry->opcode == NV_OP_PHI) { /* insert after entry */
+ assert(b->entry == b->exit);
+ b->entry->next = i;
+ i->prev = b->entry;
+ b->entry = i;
+ b->exit = i;
+ } else { /* insert before entry */
+ assert(b->entry->prev && b->exit);
+ i->next = b->entry;
+ i->prev = b->entry->prev;
+ b->entry->prev = i;
+ i->prev->next = i;
+ }
+ }
+}
+
+void
+nvc0_insn_append(struct nv_basic_block *b, struct nv_instruction *i)
+{
+ if (i->opcode == NV_OP_PHI) {
+ nvbb_insert_phi(b, i);
+ } else {
+ i->prev = b->exit;
+ if (b->exit)
+ b->exit->next = i;
+ b->exit = i;
+ if (!b->entry)
+ b->entry = i;
+ else
+ if (i->prev && i->prev->opcode == NV_OP_PHI)
+ b->entry = i;
+ }
+
+ i->bb = b;
+ b->num_instructions++;
+
+ if (i->prev && i->prev->terminator)
+ nvc0_insns_permute(i->prev, i);
+}
+
+void
+nvc0_insn_insert_after(struct nv_instruction *at, struct nv_instruction *ni)
+{
+ if (!at->next) {
+ nvc0_insn_append(at->bb, ni);
+ return;
+ }
+ ni->next = at->next;
+ ni->prev = at;
+ ni->next->prev = ni;
+ ni->prev->next = ni;
+ ni->bb = at->bb;
+ ni->bb->num_instructions++;
+}
+
+void
+nvc0_insn_insert_before(struct nv_instruction *at, struct nv_instruction *ni)
+{
+ nvc0_insn_insert_after(at, ni);
+ nvc0_insns_permute(at, ni);
+}
+
+void
+nvc0_insn_delete(struct nv_instruction *nvi)
+{
+ struct nv_basic_block *b = nvi->bb;
+ int s;
+
+ /* debug_printf("REM: "); nv_print_instruction(nvi); */
+
+ for (s = 0; s < 6 && nvi->src[s]; ++s)
+ nv_reference(NULL, nvi, s, NULL);
+
+ if (nvi->next)
+ nvi->next->prev = nvi->prev;
+ else {
+ assert(nvi == b->exit);
+ b->exit = nvi->prev;
+ }
+
+ if (nvi->prev)
+ nvi->prev->next = nvi->next;
+
+ if (nvi == b->entry) {
+ /* PHIs don't get hooked to b->entry */
+ b->entry = nvi->next;
+ assert(!nvi->prev || nvi->prev->opcode == NV_OP_PHI);
+ }
+
+ if (nvi == b->phi) {
+ if (nvi->opcode != NV_OP_PHI)
+ NOUVEAU_DBG("NOTE: b->phi points to non-PHI instruction\n");
+
+ assert(!nvi->prev);
+ if (!nvi->next || nvi->next->opcode != NV_OP_PHI)
+ b->phi = NULL;
+ else
+ b->phi = nvi->next;
+ }
+}
+
+void
+nvc0_insns_permute(struct nv_instruction *i1, struct nv_instruction *i2)
+{
+ struct nv_basic_block *b = i1->bb;
+
+ assert(i1->opcode != NV_OP_PHI &&
+ i2->opcode != NV_OP_PHI);
+ assert(i1->next == i2);
+
+ if (b->exit == i2)
+ b->exit = i1;
+
+ if (b->entry == i1)
+ b->entry = i2;
+
+ i2->prev = i1->prev;
+ i1->next = i2->next;
+ i2->next = i1;
+ i1->prev = i2;
+
+ if (i2->prev)
+ i2->prev->next = i2;
+ if (i1->next)
+ i1->next->prev = i1;
+}
+
+void
+nvc0_bblock_attach(struct nv_basic_block *parent,
+ struct nv_basic_block *b, ubyte edge_kind)
+{
+ assert(b->num_in < 8);
+
+ if (parent->out[0]) {
+ assert(!parent->out[1]);
+ parent->out[1] = b;
+ parent->out_kind[1] = edge_kind;
+ } else {
+ parent->out[0] = b;
+ parent->out_kind[0] = edge_kind;
+ }
+
+ b->in[b->num_in] = parent;
+ b->in_kind[b->num_in++] = edge_kind;
+}
+
+/* NOTE: all BRKs are treated as conditional, so there are 2 outgoing BBs */
+
+boolean
+nvc0_bblock_dominated_by(struct nv_basic_block *b, struct nv_basic_block *d)
+{
+ int j;
+
+ if (b == d)
+ return TRUE;
+
+ for (j = 0; j < b->num_in; ++j)
+ if ((b->in_kind[j] != CFG_EDGE_BACK) &&
+ !nvc0_bblock_dominated_by(b->in[j], d))
+ return FALSE;
+
+ return j ? TRUE : FALSE;
+}
+
+/* check if @bf (future) can be reached from @bp (past), stop at @bt */
+boolean
+nvc0_bblock_reachable_by(struct nv_basic_block *bf, struct nv_basic_block *bp,
+ struct nv_basic_block *bt)
+{
+ struct nv_basic_block *q[NV_PC_MAX_BASIC_BLOCKS], *b;
+ int i, p, n;
+
+ p = 0;
+ n = 1;
+ q[0] = bp;
+
+ while (p < n) {
+ b = q[p++];
+
+ if (b == bf)
+ break;
+ if (b == bt)
+ continue;
+ assert(n <= (1024 - 2));
+
+ for (i = 0; i < 2; ++i) {
+ if (b->out[i] && !IS_WALL_EDGE(b->out_kind[i]) && !b->out[i]->priv) {
+ q[n] = b->out[i];
+ q[n++]->priv = 1;
+ }
+ }
+ }
+ for (--n; n >= 0; --n)
+ q[n]->priv = 0;
+
+ return (b == bf);
+}
+
+static struct nv_basic_block *
+nvbb_find_dom_frontier(struct nv_basic_block *b, struct nv_basic_block *df)
+{
+ struct nv_basic_block *out;
+ int i;
+
+ if (!nvc0_bblock_dominated_by(df, b)) {
+ for (i = 0; i < df->num_in; ++i) {
+ if (df->in_kind[i] == CFG_EDGE_BACK)
+ continue;
+ if (nvc0_bblock_dominated_by(df->in[i], b))
+ return df;
+ }
+ }
+ for (i = 0; i < 2 && df->out[i]; ++i) {
+ if (df->out_kind[i] == CFG_EDGE_BACK)
+ continue;
+ if ((out = nvbb_find_dom_frontier(b, df->out[i])))
+ return out;
+ }
+ return NULL;
+}
+
+struct nv_basic_block *
+nvc0_bblock_dom_frontier(struct nv_basic_block *b)
+{
+ struct nv_basic_block *df;
+ int i;
+
+ for (i = 0; i < 2 && b->out[i]; ++i)
+ if ((df = nvbb_find_dom_frontier(b, b->out[i])))
+ return df;
+ return NULL;
+}
diff --git a/src/gallium/drivers/nvc0/nvc0_pc.h b/src/gallium/drivers/nvc0/nvc0_pc.h
new file mode 100644
index 00000000000..3a5612a5fac
--- /dev/null
+++ b/src/gallium/drivers/nvc0/nvc0_pc.h
@@ -0,0 +1,650 @@
+/*
+ * Copyright 2010 Christoph Bumiller
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
+ * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
+#ifndef __NVC0_COMPILER_H__
+#define __NVC0_COMPILER_H__
+
+#include <stdio.h>
+
+#ifndef NOUVEAU_DBG
+#ifdef NOUVEAU_DEBUG
+# define NOUVEAU_DBG(args...) debug_printf(args);
+#else
+# define NOUVEAU_DBG(args...)
+#endif
+#endif
+
+#ifndef NOUVEAU_ERR
+#define NOUVEAU_ERR(fmt, args...) \
+ fprintf(stderr, "%s:%d - "fmt, __FUNCTION__, __LINE__, ##args);
+#endif
+
+#include "pipe/p_defines.h"
+#include "util/u_inlines.h"
+#include "util/u_memory.h"
+#include "util/u_double_list.h"
+
+/* pseudo opcodes */
+#define NV_OP_UNDEF 0
+#define NV_OP_BIND 1
+#define NV_OP_MERGE 2
+#define NV_OP_PHI 3
+#define NV_OP_SELECT 4
+#define NV_OP_NOP 5
+
+/**
+ * BIND forces source operand i into the same register as destination operand i,
+ * and the operands will be assigned consecutive registers (needed for TEX).
+ * Beware conflicts !
+ * SELECT forces its multiple source operands and its destination operand into
+ * one and the same register.
+ */
+
+/* base opcodes */
+#define NV_OP_LD 6
+#define NV_OP_ST 7
+#define NV_OP_MOV 8
+#define NV_OP_AND 9
+#define NV_OP_OR 10
+#define NV_OP_XOR 11
+#define NV_OP_SHL 12
+#define NV_OP_SHR 13
+#define NV_OP_NOT 14
+#define NV_OP_SET 15
+#define NV_OP_ADD 16
+#define NV_OP_SUB 17
+#define NV_OP_MUL 18
+#define NV_OP_MAD 19
+#define NV_OP_ABS 20
+#define NV_OP_NEG 21
+#define NV_OP_MAX 22
+#define NV_OP_MIN 23
+#define NV_OP_CVT 24
+#define NV_OP_CEIL 25
+#define NV_OP_FLOOR 26
+#define NV_OP_TRUNC 27
+#define NV_OP_SAD 28
+
+/* shader opcodes */
+#define NV_OP_VFETCH 29
+#define NV_OP_PFETCH 30
+#define NV_OP_EXPORT 31
+#define NV_OP_LINTERP 32
+#define NV_OP_PINTERP 33
+#define NV_OP_EMIT 34
+#define NV_OP_RESTART 35
+#define NV_OP_TEX 36
+#define NV_OP_TXB 37
+#define NV_OP_TXL 38
+#define NV_OP_TXF 39
+#define NV_OP_TXQ 40
+#define NV_OP_QUADOP 41
+#define NV_OP_DFDX 42
+#define NV_OP_DFDY 43
+#define NV_OP_KIL 44
+
+/* control flow opcodes */
+#define NV_OP_BRA 45
+#define NV_OP_CALL 46
+#define NV_OP_RET 47
+#define NV_OP_EXIT 48
+#define NV_OP_BREAK 49
+#define NV_OP_BREAKADDR 50
+#define NV_OP_JOINAT 51
+#define NV_OP_JOIN 52
+
+/* typed opcodes */
+#define NV_OP_ADD_F32 NV_OP_ADD
+#define NV_OP_ADD_B32 53
+#define NV_OP_MUL_F32 NV_OP_MUL
+#define NV_OP_MUL_B32 54
+#define NV_OP_ABS_F32 NV_OP_ABS
+#define NV_OP_ABS_S32 55
+#define NV_OP_NEG_F32 NV_OP_NEG
+#define NV_OP_NEG_S32 56
+#define NV_OP_MAX_F32 NV_OP_MAX
+#define NV_OP_MAX_S32 57
+#define NV_OP_MAX_U32 58
+#define NV_OP_MIN_F32 NV_OP_MIN
+#define NV_OP_MIN_S32 59
+#define NV_OP_MIN_U32 60
+#define NV_OP_SET_F32 61
+#define NV_OP_SET_S32 62
+#define NV_OP_SET_U32 63
+#define NV_OP_SAR 64
+#define NV_OP_RCP 65
+#define NV_OP_RSQ 66
+#define NV_OP_LG2 67
+#define NV_OP_SIN 68
+#define NV_OP_COS 69
+#define NV_OP_EX2 70
+#define NV_OP_PRESIN 71
+#define NV_OP_PREEX2 72
+#define NV_OP_SAT 73
+
+/* newly added opcodes */
+#define NV_OP_SET_F32_AND 74
+#define NV_OP_SET_F32_OR 75
+#define NV_OP_SET_F32_XOR 76
+#define NV_OP_SELP 77
+#define NV_OP_SLCT 78
+#define NV_OP_SLCT_F32 NV_OP_SLCT
+#define NV_OP_SLCT_S32 79
+#define NV_OP_SLCT_U32 80
+#define NV_OP_SUB_F32 NV_OP_SUB
+#define NV_OP_SUB_S32 81
+#define NV_OP_MAD_F32 NV_OP_MAD
+#define NV_OP_FSET_F32 82
+#define NV_OP_TXG 83
+
+#define NV_OP_COUNT 84
+
+/* nv50 files omitted */
+#define NV_FILE_GPR 0
+#define NV_FILE_COND 1
+#define NV_FILE_PRED 2
+#define NV_FILE_IMM 16
+#define NV_FILE_MEM_S 32
+#define NV_FILE_MEM_V 34
+#define NV_FILE_MEM_A 35
+#define NV_FILE_MEM_L 48
+#define NV_FILE_MEM_G 64
+#define NV_FILE_MEM_C(i) (80 + i)
+
+#define NV_IS_MEMORY_FILE(f) ((f) >= NV_FILE_MEM_S)
+
+#define NV_MOD_NEG 1
+#define NV_MOD_ABS 2
+#define NV_MOD_NOT 4
+#define NV_MOD_SAT 8
+
+#define NV_TYPE_U8 0x00
+#define NV_TYPE_S8 0x01
+#define NV_TYPE_U16 0x02
+#define NV_TYPE_S16 0x03
+#define NV_TYPE_U32 0x04
+#define NV_TYPE_S32 0x05
+#define NV_TYPE_P32 0x07
+#define NV_TYPE_F32 0x09
+#define NV_TYPE_F64 0x0b
+#define NV_TYPE_VEC(x, n) (NV_TYPE_##x | (n << 4))
+#define NV_TYPE_ANY 0xff
+
+#define NV_TYPE_ISINT(t) ((t) < 7)
+#define NV_TYPE_ISSGD(t) ((t) & 1)
+
+#define NV_CC_FL 0x0
+#define NV_CC_LT 0x1
+#define NV_CC_EQ 0x2
+#define NV_CC_LE 0x3
+#define NV_CC_GT 0x4
+#define NV_CC_NE 0x5
+#define NV_CC_GE 0x6
+#define NV_CC_U 0x8
+#define NV_CC_TR 0xf
+#define NV_CC_O 0x10
+#define NV_CC_C 0x11
+#define NV_CC_A 0x12
+#define NV_CC_S 0x13
+#define NV_CC_INVERSE(cc) ((cc) ^ 0x7)
+/* for 1 bit predicates: */
+#define NV_CC_P 0
+#define NV_CC_NOT_P 1
+
+uint8_t nvc0_ir_reverse_cc(uint8_t cc);
+
+#define NV_PC_MAX_INSTRUCTIONS 2048
+#define NV_PC_MAX_VALUES (NV_PC_MAX_INSTRUCTIONS * 4)
+
+#define NV_PC_MAX_BASIC_BLOCKS 1024
+
+struct nv_op_info {
+ uint base; /* e.g. ADD_S32 -> ADD */
+ char name[12];
+ uint8_t type;
+ uint16_t mods;
+ unsigned flow : 1;
+ unsigned commutative : 1;
+ unsigned vector : 1;
+ unsigned predicate : 1;
+ unsigned pseudo : 1;
+ unsigned immediate : 3;
+ unsigned memory : 3;
+};
+
+extern struct nv_op_info nvc0_op_info_table[];
+
+#define NV_BASEOP(op) (nvc0_op_info_table[op].base)
+#define NV_OPTYPE(op) (nvc0_op_info_table[op].type)
+
+static INLINE boolean
+nv_is_texture_op(uint opcode)
+{
+ return (opcode >= NV_OP_TEX && opcode <= NV_OP_TXQ);
+}
+
+static INLINE boolean
+nv_is_vector_op(uint opcode)
+{
+ return nvc0_op_info_table[opcode].vector ? TRUE : FALSE;
+}
+
+static INLINE boolean
+nv_op_commutative(uint opcode)
+{
+ return nvc0_op_info_table[opcode].commutative ? TRUE : FALSE;
+}
+
+static INLINE uint8_t
+nv_op_supported_src_mods(uint opcode, int s)
+{
+ return (nvc0_op_info_table[opcode].mods >> (s * 4)) & 0xf;
+}
+
+static INLINE uint
+nv_type_order(ubyte type)
+{
+ switch (type & 0xf) {
+ case NV_TYPE_U8:
+ case NV_TYPE_S8:
+ return 0;
+ case NV_TYPE_U16:
+ case NV_TYPE_S16:
+ return 1;
+ case NV_TYPE_U32:
+ case NV_TYPE_F32:
+ case NV_TYPE_S32:
+ case NV_TYPE_P32:
+ return 2;
+ case NV_TYPE_F64:
+ return 3;
+ }
+ assert(0);
+ return 0;
+}
+
+static INLINE uint
+nv_type_sizeof(ubyte type)
+{
+ if (type & 0xf0)
+ return (1 << nv_type_order(type)) * (type >> 4);
+ return 1 << nv_type_order(type);
+}
+
+static INLINE uint
+nv_type_sizeof_base(ubyte type)
+{
+ return 1 << nv_type_order(type);
+}
+
+struct nv_reg {
+ uint32_t address; /* for memory locations */
+ int id; /* for registers */
+ ubyte file;
+ ubyte size;
+ union {
+ int32_t s32;
+ int64_t s64;
+ uint64_t u64;
+ uint32_t u32; /* expected to be 0 for $r63 */
+ float f32;
+ double f64;
+ } imm;
+};
+
+struct nv_range {
+ struct nv_range *next;
+ int bgn;
+ int end;
+};
+
+struct nv_ref;
+
+struct nv_value {
+ struct nv_reg reg;
+ struct nv_instruction *insn;
+ struct nv_value *join;
+ struct nv_ref *last_use;
+ int n;
+ struct nv_range *livei;
+ int refc;
+ struct nv_value *next;
+ struct nv_value *prev;
+};
+
+struct nv_ref {
+ struct nv_value *value;
+ struct nv_instruction *insn;
+ struct list_head list; /* connects uses of the same value */
+ uint8_t mod;
+ uint8_t flags;
+};
+
+#define NV_REF_FLAG_REGALLOC_PRIV (1 << 0)
+
+struct nv_basic_block;
+
+struct nv_instruction {
+ struct nv_instruction *next;
+ struct nv_instruction *prev;
+ uint opcode;
+ uint serial;
+
+ struct nv_value *def[5];
+ struct nv_ref *src[6];
+
+ int8_t predicate; /* index of predicate src */
+ int8_t indirect; /* index of pointer src */
+
+ union {
+ struct {
+ uint8_t t; /* TIC binding */
+ uint8_t s; /* TSC binding */
+ } tex;
+ struct {
+ uint8_t d; /* output type */
+ uint8_t s; /* input type */
+ } cvt;
+ } ext;
+
+ struct nv_basic_block *bb;
+ struct nv_basic_block *target; /* target block of control flow insn */
+
+ unsigned cc : 5; /* condition code */
+ unsigned fixed : 1; /* don't optimize away (prematurely) */
+ unsigned terminator : 1;
+ unsigned join : 1;
+ unsigned set_cond : 4; /* 2nd byte */
+ unsigned saturate : 1;
+ unsigned centroid : 1;
+ unsigned flat : 1;
+ unsigned patch : 1;
+ unsigned lanes : 4; /* 3rd byte */
+ unsigned tex_dim : 2;
+ unsigned tex_array : 1;
+ unsigned tex_cube : 1;
+ unsigned tex_shadow : 1; /* 4th byte */
+ unsigned tex_live : 1;
+ unsigned tex_mask : 4;
+
+ uint8_t quadop;
+};
+
+static INLINE int
+nvi_vector_size(struct nv_instruction *nvi)
+{
+ int i;
+ assert(nvi);
+ for (i = 0; i < 5 && nvi->def[i]; ++i);
+ return i;
+}
+
+#define CFG_EDGE_FORWARD 0
+#define CFG_EDGE_BACK 1
+#define CFG_EDGE_LOOP_ENTER 2
+#define CFG_EDGE_LOOP_LEAVE 4
+#define CFG_EDGE_FAKE 8
+
+/* 'WALL' edge means where reachability check doesn't follow */
+/* 'LOOP' edge means just having to do with loops */
+#define IS_LOOP_EDGE(k) ((k) & 7)
+#define IS_WALL_EDGE(k) ((k) & 9)
+
+struct nv_basic_block {
+ struct nv_instruction *entry; /* first non-phi instruction */
+ struct nv_instruction *exit;
+ struct nv_instruction *phi; /* very first instruction */
+ int num_instructions;
+
+ struct nv_basic_block *out[2]; /* no indirect branches -> 2 */
+ struct nv_basic_block *in[8]; /* hope that suffices */
+ uint num_in;
+ ubyte out_kind[2];
+ ubyte in_kind[8];
+
+ int id;
+ int subroutine;
+ uint priv; /* reset to 0 after you're done */
+ uint pass_seq;
+
+ uint32_t emit_pos; /* position, size in emitted code (in bytes) */
+ uint32_t emit_size;
+
+ uint32_t live_set[NV_PC_MAX_VALUES / 32];
+};
+
+struct nvc0_translation_info;
+
+struct nv_pc {
+ struct nv_basic_block **root;
+ struct nv_basic_block *current_block;
+ struct nv_basic_block *parent_block;
+
+ int loop_nesting_bound;
+ uint pass_seq;
+
+ struct nv_value values[NV_PC_MAX_VALUES];
+ struct nv_instruction instructions[NV_PC_MAX_INSTRUCTIONS];
+ struct nv_ref **refs;
+ struct nv_basic_block *bb_list[NV_PC_MAX_BASIC_BLOCKS];
+ int num_values;
+ int num_instructions;
+ int num_refs;
+ int num_blocks;
+ int num_subroutines;
+
+ int max_reg[4];
+
+ uint32_t *immd_buf; /* populated on emit */
+ unsigned immd_count;
+
+ uint32_t *emit;
+ uint32_t emit_size;
+ uint32_t emit_pos;
+
+ void *reloc_entries;
+ unsigned num_relocs;
+
+ /* optimization enables */
+ boolean opt_reload_elim;
+ boolean is_fragprog;
+};
+
+void nvc0_insn_append(struct nv_basic_block *, struct nv_instruction *);
+void nvc0_insn_insert_before(struct nv_instruction *, struct nv_instruction *);
+void nvc0_insn_insert_after(struct nv_instruction *, struct nv_instruction *);
+
+static INLINE struct nv_instruction *
+nv_alloc_instruction(struct nv_pc *pc, uint opcode)
+{
+ struct nv_instruction *insn;
+
+ insn = &pc->instructions[pc->num_instructions++];
+ assert(pc->num_instructions < NV_PC_MAX_INSTRUCTIONS);
+
+ insn->opcode = opcode;
+ insn->cc = NV_CC_P;
+ insn->indirect = -1;
+ insn->predicate = -1;
+
+ return insn;
+}
+
+static INLINE struct nv_instruction *
+new_instruction(struct nv_pc *pc, uint opcode)
+{
+ struct nv_instruction *insn = nv_alloc_instruction(pc, opcode);
+
+ nvc0_insn_append(pc->current_block, insn);
+ return insn;
+}
+
+static INLINE struct nv_instruction *
+new_instruction_at(struct nv_pc *pc, struct nv_instruction *at, uint opcode)
+{
+ struct nv_instruction *insn = nv_alloc_instruction(pc, opcode);
+
+ nvc0_insn_insert_after(at, insn);
+ return insn;
+}
+
+static INLINE struct nv_value *
+new_value(struct nv_pc *pc, ubyte file, ubyte size)
+{
+ struct nv_value *value = &pc->values[pc->num_values];
+
+ assert(pc->num_values < NV_PC_MAX_VALUES - 1);
+
+ value->n = pc->num_values++;
+ value->join = value;
+ value->reg.id = -1;
+ value->reg.file = file;
+ value->reg.size = size;
+ return value;
+}
+
+static INLINE struct nv_value *
+new_value_like(struct nv_pc *pc, struct nv_value *like)
+{
+ return new_value(pc, like->reg.file, like->reg.size);
+}
+
+static INLINE struct nv_ref *
+new_ref(struct nv_pc *pc, struct nv_value *val)
+{
+ int i;
+ struct nv_ref *ref;
+
+ if ((pc->num_refs % 64) == 0) {
+ const unsigned old_size = pc->num_refs * sizeof(struct nv_ref *);
+ const unsigned new_size = (pc->num_refs + 64) * sizeof(struct nv_ref *);
+
+ pc->refs = REALLOC(pc->refs, old_size, new_size);
+
+ ref = CALLOC(64, sizeof(struct nv_ref));
+ for (i = 0; i < 64; ++i)
+ pc->refs[pc->num_refs + i] = &ref[i];
+ }
+
+ ref = pc->refs[pc->num_refs++];
+ ref->value = val;
+
+ LIST_INITHEAD(&ref->list);
+
+ ++val->refc;
+ return ref;
+}
+
+static INLINE struct nv_basic_block *
+new_basic_block(struct nv_pc *pc)
+{
+ struct nv_basic_block *bb;
+
+ if (pc->num_blocks >= NV_PC_MAX_BASIC_BLOCKS)
+ return NULL;
+
+ bb = CALLOC_STRUCT(nv_basic_block);
+
+ bb->id = pc->num_blocks;
+ pc->bb_list[pc->num_blocks++] = bb;
+ return bb;
+}
+
+static INLINE void
+nv_reference(struct nv_pc *pc,
+ struct nv_instruction *nvi, int c, struct nv_value *s)
+{
+ struct nv_ref **d = &nvi->src[c];
+ assert(c < 6);
+
+ if (*d) {
+ --(*d)->value->refc;
+ LIST_DEL(&(*d)->list);
+ }
+
+ if (s) {
+ if (!*d) {
+ *d = new_ref(pc, s);
+ (*d)->insn = nvi;
+ } else {
+ LIST_DEL(&(*d)->list);
+ (*d)->value = s;
+ ++(s->refc);
+ }
+ if (!s->last_use)
+ s->last_use = *d;
+ else
+ LIST_ADDTAIL(&s->last_use->list, &(*d)->list);
+
+ s->last_use = *d;
+ (*d)->insn = nvi;
+ } else {
+ *d = NULL;
+ }
+}
+
+/* nvc0_emit.c */
+void nvc0_emit_instruction(struct nv_pc *, struct nv_instruction *);
+
+/* nvc0_print.c */
+const char *nvc0_opcode_name(uint opcode);
+void nvc0_print_instruction(struct nv_instruction *);
+
+/* nvc0_pc.c */
+void nvc0_print_function(struct nv_basic_block *root);
+void nvc0_print_program(struct nv_pc *);
+
+boolean nvc0_insn_can_load(struct nv_instruction *, int s,
+ struct nv_instruction *);
+boolean nvc0_insn_is_predicateable(struct nv_instruction *);
+
+int nvc0_insn_refcount(struct nv_instruction *);
+void nvc0_insn_delete(struct nv_instruction *);
+void nvc0_insns_permute(struct nv_instruction *prev, struct nv_instruction *);
+
+void nvc0_bblock_attach(struct nv_basic_block *parent,
+ struct nv_basic_block *child, ubyte edge_kind);
+boolean nvc0_bblock_dominated_by(struct nv_basic_block *,
+ struct nv_basic_block *);
+boolean nvc0_bblock_reachable_by(struct nv_basic_block *future,
+ struct nv_basic_block *past,
+ struct nv_basic_block *final);
+struct nv_basic_block *nvc0_bblock_dom_frontier(struct nv_basic_block *);
+
+int nvc0_pc_replace_value(struct nv_pc *pc,
+ struct nv_value *old_val,
+ struct nv_value *new_val);
+
+struct nv_value *nvc0_pc_find_immediate(struct nv_ref *);
+struct nv_value *nvc0_pc_find_constant(struct nv_ref *);
+
+typedef void (*nv_pc_pass_func)(void *priv, struct nv_basic_block *b);
+
+void nvc0_pc_pass_in_order(struct nv_basic_block *, nv_pc_pass_func, void *);
+
+int nvc0_pc_exec_pass0(struct nv_pc *pc);
+int nvc0_pc_exec_pass1(struct nv_pc *pc);
+int nvc0_pc_exec_pass2(struct nv_pc *pc);
+
+int nvc0_tgsi_to_nc(struct nv_pc *, struct nvc0_translation_info *);
+
+#endif // NV50_COMPILER_H
diff --git a/src/gallium/drivers/nvc0/nvc0_pc_emit.c b/src/gallium/drivers/nvc0/nvc0_pc_emit.c
new file mode 100644
index 00000000000..76ad40dbcf8
--- /dev/null
+++ b/src/gallium/drivers/nvc0/nvc0_pc_emit.c
@@ -0,0 +1,1020 @@
+/*
+ * Copyright 2010 Christoph Bumiller
+ *
+ * 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 "nvc0_pc.h"
+#include "nvc0_program.h"
+
+#define NVC0_FIXUP_CODE_RELOC 0
+#define NVC0_FIXUP_DATA_RELOC 1
+
+struct nvc0_fixup {
+ uint8_t type;
+ int8_t shift;
+ uint32_t mask;
+ uint32_t data;
+ uint32_t ofst;
+};
+
+void
+nvc0_relocate_program(struct nvc0_program *prog,
+ uint32_t code_base,
+ uint32_t data_base)
+{
+ struct nvc0_fixup *f = (struct nvc0_fixup *)prog->relocs;
+ unsigned i;
+
+ for (i = 0; i < prog->num_relocs; ++i) {
+ uint32_t data;
+
+ switch (f[i].type) {
+ case NVC0_FIXUP_CODE_RELOC: data = code_base + f[i].data; break;
+ case NVC0_FIXUP_DATA_RELOC: data = data_base + f[i].data; break;
+ default:
+ data = f[i].data;
+ break;
+ }
+ data = (f[i].shift < 0) ? (data >> -f[i].shift) : (data << f[i].shift);
+
+ prog->code[f[i].ofst / 4] &= ~f[i].mask;
+ prog->code[f[i].ofst / 4] |= data & f[i].mask;
+ }
+}
+
+static void
+create_fixup(struct nv_pc *pc, uint8_t ty,
+ int w, uint32_t data, uint32_t m, int s)
+{
+ struct nvc0_fixup *f;
+
+ const unsigned size = sizeof(struct nvc0_fixup);
+ const unsigned n = pc->num_relocs;
+
+ if (!(n % 8))
+ pc->reloc_entries = REALLOC(pc->reloc_entries, n * size, (n + 8) * size);
+
+ f = (struct nvc0_fixup *)pc->reloc_entries;
+
+ f[n].ofst = pc->emit_pos + w * 4;
+ f[n].type = ty;
+ f[n].data = data;
+ f[n].mask = m;
+ f[n].shift = s;
+
+ ++pc->num_relocs;
+}
+
+static INLINE ubyte
+SSIZE(struct nv_instruction *nvi, int s)
+{
+ return nvi->src[s]->value->reg.size;
+}
+
+static INLINE ubyte
+DSIZE(struct nv_instruction *nvi, int d)
+{
+ return nvi->def[d]->reg.size;
+}
+
+static INLINE struct nv_reg *
+SREG(struct nv_ref *ref)
+{
+ if (!ref)
+ return NULL;
+ return &ref->value->join->reg;
+}
+
+static INLINE struct nv_reg *
+DREG(struct nv_value *val)
+{
+ if (!val)
+ return NULL;
+ return &val->join->reg;
+}
+
+static INLINE ubyte
+SFILE(struct nv_instruction *nvi, int s)
+{
+ return nvi->src[s]->value->reg.file;
+}
+
+static INLINE ubyte
+DFILE(struct nv_instruction *nvi, int d)
+{
+ return nvi->def[0]->reg.file;
+}
+
+static INLINE void
+SID(struct nv_pc *pc, struct nv_ref *ref, int pos)
+{
+ pc->emit[pos / 32] |= (SREG(ref) ? SREG(ref)->id : 63) << (pos % 32);
+}
+
+static INLINE void
+DID(struct nv_pc *pc, struct nv_value *val, int pos)
+{
+ pc->emit[pos / 32] |= (DREG(val) ? DREG(val)->id : 63) << (pos % 32);
+}
+
+static INLINE uint32_t
+get_immd_u32(struct nv_ref *ref) /* XXX: dependent on [0]:2 */
+{
+ assert(ref->value->reg.file == NV_FILE_IMM);
+ return ref->value->reg.imm.u32;
+}
+
+static INLINE void
+set_immd_u32_l(struct nv_pc *pc, uint32_t u32)
+{
+ pc->emit[0] |= (u32 & 0x3f) << 26;
+ pc->emit[1] |= u32 >> 6;
+}
+
+static INLINE void
+set_immd_u32(struct nv_pc *pc, uint32_t u32)
+{
+ if ((pc->emit[0] & 0xf) == 0x2) {
+ set_immd_u32_l(pc, u32);
+ } else
+ if ((pc->emit[0] & 0xf) == 0x3) {
+ assert(!(pc->emit[1] & 0xc000));
+ pc->emit[1] |= 0xc000;
+ assert(!(u32 & 0xfff00000));
+ set_immd_u32_l(pc, u32);
+ } else {
+ assert(!(pc->emit[1] & 0xc000));
+ pc->emit[1] |= 0xc000;
+ assert(!(u32 & 0xfff));
+ set_immd_u32_l(pc, u32 >> 12);
+ }
+}
+
+static INLINE void
+set_immd(struct nv_pc *pc, struct nv_instruction *i, int s)
+{
+ set_immd_u32(pc, get_immd_u32(i->src[s]));
+}
+
+static INLINE void
+DVS(struct nv_pc *pc, struct nv_instruction *i)
+{
+ uint s = i->def[0]->reg.size;
+ int n;
+ for (n = 1; n < 4 && i->def[n]; ++n)
+ s += i->def[n]->reg.size;
+ pc->emit[0] |= ((s / 4) - 1) << 5;
+}
+
+static INLINE void
+SVS(struct nv_pc *pc, struct nv_ref *src)
+{
+ pc->emit[0] |= (SREG(src)->size / 4 - 1) << 5;
+}
+
+static void
+set_pred(struct nv_pc *pc, struct nv_instruction *i)
+{
+ if (i->predicate >= 0) {
+ SID(pc, i->src[i->predicate], 6);
+ if (i->cc)
+ pc->emit[0] |= 0x2000; /* negate */
+ } else {
+ pc->emit[0] |= 0x1c00;
+ }
+}
+
+static INLINE void
+set_address_16(struct nv_pc *pc, struct nv_ref *src)
+{
+ pc->emit[0] |= (src->value->reg.address & 0x003f) << 26;
+ pc->emit[1] |= (src->value->reg.address & 0xffc0) >> 6;
+}
+
+static INLINE unsigned
+const_space_index(struct nv_instruction *i, int s)
+{
+ return SFILE(i, s) - NV_FILE_MEM_C(0);
+}
+
+static void
+emit_flow(struct nv_pc *pc, struct nv_instruction *i, uint8_t op)
+{
+ pc->emit[0] = 0x00000007;
+ pc->emit[1] = op << 24;
+
+ if (op == 0x40 || (op >= 0x80 && op <= 0x98)) {
+ /* bra, exit, ret or kil */
+ pc->emit[0] |= 0x1e0;
+ set_pred(pc, i);
+ }
+
+ if (i->target) {
+ int32_t pcrel = i->target->emit_pos - (pc->emit_pos + 8);
+
+ /* we will need relocations only for global functions */
+ /*
+ create_fixup(pc, NVC0_FIXUP_CODE_RELOC, 0, pos, 26, 0xfc000000);
+ create_fixup(pc, NVC0_FIXUP_CODE_RELOC, 1, pos, -6, 0x0001ffff);
+ */
+
+ pc->emit[0] |= (pcrel & 0x3f) << 26;
+ pc->emit[1] |= (pcrel >> 6) & 0x3ffff;
+ }
+}
+
+/* doesn't work for vfetch, export, ld, st, mov ... */
+static void
+emit_form_0(struct nv_pc *pc, struct nv_instruction *i)
+{
+ int s;
+
+ set_pred(pc, i);
+
+ DID(pc, i->def[0], 14);
+
+ for (s = 0; s < 3 && i->src[s]; ++s) {
+ if (SFILE(i, s) >= NV_FILE_MEM_C(0) &&
+ SFILE(i, s) <= NV_FILE_MEM_C(15)) {
+ assert(!(pc->emit[1] & 0xc000));
+ assert(s <= 1);
+ pc->emit[1] |= 0x4000 | (const_space_index(i, s) << 10);
+ set_address_16(pc, i->src[s]);
+ } else
+ if (SFILE(i, s) == NV_FILE_GPR) {
+ SID(pc, i->src[s], s ? ((s == 2) ? 49 : 26) : 20);
+ } else
+ if (SFILE(i, s) == NV_FILE_IMM) {
+ assert(!(pc->emit[1] & 0xc000));
+ assert(s == 1 || i->opcode == NV_OP_MOV);
+ set_immd(pc, i, s);
+ }
+ }
+}
+
+static void
+emit_form_1(struct nv_pc *pc, struct nv_instruction *i)
+{
+ int s;
+
+ set_pred(pc, i);
+
+ DID(pc, i->def[0], 14);
+
+ for (s = 0; s < 1 && i->src[s]; ++s) {
+ if (SFILE(i, s) >= NV_FILE_MEM_C(0) &&
+ SFILE(i, s) <= NV_FILE_MEM_C(15)) {
+ assert(!(pc->emit[1] & 0xc000));
+ assert(s <= 1);
+ pc->emit[1] |= 0x4000 | (const_space_index(i, s) << 10);
+ set_address_16(pc, i->src[s]);
+ } else
+ if (SFILE(i, s) == NV_FILE_GPR) {
+ SID(pc, i->src[s], 26);
+ } else
+ if (SFILE(i, s) == NV_FILE_IMM) {
+ assert(!(pc->emit[1] & 0xc000));
+ assert(s == 1 || i->opcode == NV_OP_MOV);
+ set_immd(pc, i, s);
+ }
+ }
+}
+
+static void
+emit_neg_abs_1_2(struct nv_pc *pc, struct nv_instruction *i)
+{
+ if (i->src[0]->mod & NV_MOD_ABS)
+ pc->emit[0] |= 1 << 7;
+ if (i->src[0]->mod & NV_MOD_NEG)
+ pc->emit[0] |= 1 << 9;
+ if (i->src[1]->mod & NV_MOD_ABS)
+ pc->emit[0] |= 1 << 6;
+ if (i->src[1]->mod & NV_MOD_NEG)
+ pc->emit[0] |= 1 << 8;
+}
+
+static void
+emit_add_f32(struct nv_pc *pc, struct nv_instruction *i)
+{
+ pc->emit[0] = 0x00000000;
+ pc->emit[1] = 0x50000000;
+
+ emit_form_0(pc, i);
+
+ emit_neg_abs_1_2(pc, i);
+
+ if (i->saturate)
+ pc->emit[1] |= 1 << 17;
+}
+
+static void
+emit_mul_f32(struct nv_pc *pc, struct nv_instruction *i)
+{
+ pc->emit[0] = 0x00000000;
+ pc->emit[1] = 0x58000000;
+
+ emit_form_0(pc, i);
+
+ if ((i->src[0]->mod ^ i->src[1]->mod) & NV_MOD_NEG)
+ pc->emit[1] |= 1 << 25;
+
+ if (i->saturate)
+ pc->emit[0] |= 1 << 5;
+}
+
+static void
+emit_mad_f32(struct nv_pc *pc, struct nv_instruction *i)
+{
+ pc->emit[0] = 0x00000000;
+ pc->emit[1] = 0x30000000;
+
+ emit_form_0(pc, i);
+
+ if ((i->src[0]->mod ^ i->src[1]->mod) & NV_MOD_NEG)
+ pc->emit[0] |= 1 << 9;
+
+ if (i->src[2]->mod & NV_MOD_NEG)
+ pc->emit[0] |= 1 << 8;
+
+ if (i->saturate)
+ pc->emit[0] |= 1 << 5;
+}
+
+static void
+emit_minmax(struct nv_pc *pc, struct nv_instruction *i)
+{
+ pc->emit[0] = 0x00000000;
+ pc->emit[1] = 0x08000000;
+
+ if (NV_BASEOP(i->opcode) == NV_OP_MAX)
+ pc->emit[1] |= 0x001e0000;
+ else
+ pc->emit[1] |= 0x000e0000; /* predicate ? */
+
+ emit_form_0(pc, i);
+
+ emit_neg_abs_1_2(pc, i);
+
+ switch (i->opcode) {
+ case NV_OP_MIN_U32:
+ case NV_OP_MAX_U32:
+ pc->emit[0] |= 3;
+ break;
+ case NV_OP_MIN_S32:
+ case NV_OP_MAX_S32:
+ pc->emit[0] |= 3 | (1 << 5);
+ break;
+ case NV_OP_MIN_F32:
+ case NV_OP_MAX_F32:
+ default:
+ break;
+ }
+}
+
+static void
+emit_tex(struct nv_pc *pc, struct nv_instruction *i)
+{
+ int src1 = i->tex_array + i->tex_dim + i->tex_cube;
+
+ assert(src1 < 6);
+
+ pc->emit[0] = 0x00000086;
+ pc->emit[1] = 0x80000000;
+
+ switch (i->opcode) {
+ case NV_OP_TEX: pc->emit[1] = 0x80000000; break;
+ case NV_OP_TXB: pc->emit[1] = 0x84000000; break;
+ case NV_OP_TXL: pc->emit[1] = 0x86000000; break;
+ case NV_OP_TXF: pc->emit[1] = 0x90000000; break;
+ case NV_OP_TXG: pc->emit[1] = 0xe0000000; break;
+ default:
+ assert(0);
+ break;
+ }
+
+ if (i->tex_array)
+ pc->emit[1] |= 0x00080000; /* layer index is u16, first value of SRC0 */
+ if (i->tex_shadow)
+ pc->emit[1] |= 0x01000000; /* shadow is part of SRC1, after bias/lod */
+
+ set_pred(pc, i);
+
+ DID(pc, i->def[0], 14);
+ SID(pc, i->src[0], 20);
+ SID(pc, i->src[src1], 26); /* may be NULL -> $r63 */
+
+ pc->emit[1] |= i->tex_mask << 14;
+ pc->emit[1] |= (i->tex_dim - 1) << 20;
+ if (i->tex_cube)
+ pc->emit[1] |= 3 << 20;
+
+ assert(i->ext.tex.s < 16);
+
+ pc->emit[1] |= i->ext.tex.t;
+ pc->emit[1] |= i->ext.tex.s << 8;
+
+ if (i->tex_live)
+ pc->emit[0] |= 1 << 9;
+}
+
+/* 0: cos, 1: sin, 2: ex2, 3: lg2, 4: rcp, 5: rsqrt */
+static void
+emit_flop(struct nv_pc *pc, struct nv_instruction *i, ubyte op)
+{
+ pc->emit[0] = 0x00000000;
+ pc->emit[1] = 0xc8000000;
+
+ set_pred(pc, i);
+
+ DID(pc, i->def[0], 14);
+ SID(pc, i->src[0], 20);
+
+ pc->emit[0] |= op << 26;
+
+ if (op >= 3) {
+ if (i->src[0]->mod & NV_MOD_NEG) pc->emit[0] |= 1 << 9;
+ if (i->src[0]->mod & NV_MOD_ABS) pc->emit[0] |= 1 << 7;
+ } else {
+ assert(!i->src[0]->mod);
+ }
+}
+
+static void
+emit_quadop(struct nv_pc *pc, struct nv_instruction *i)
+{
+ pc->emit[0] = 0x00000000;
+ pc->emit[1] = 0x48000000;
+
+ set_pred(pc, i);
+
+ assert(SFILE(i, 0) == NV_FILE_GPR && SFILE(i, 1) == NV_FILE_GPR);
+
+ DID(pc, i->def[0], 14);
+ SID(pc, i->src[0], 20);
+ SID(pc, i->src[0], 26);
+
+ pc->emit[0] |= i->lanes << 6; /* l0, l1, l2, l3, dx, dy */
+ pc->emit[1] |= i->quadop;
+}
+
+static void
+emit_ddx(struct nv_pc *pc, struct nv_instruction *i)
+{
+ i->quadop = 0x99;
+ i->lanes = 4;
+ i->src[1] = i->src[0];
+ emit_quadop(pc, i);
+}
+
+static void
+emit_ddy(struct nv_pc *pc, struct nv_instruction *i)
+{
+ i->quadop = 0xa5;
+ i->lanes = 5;
+ i->src[1] = i->src[0];
+ emit_quadop(pc, i);
+}
+
+/* preparation op (preex2, presin / convert to fixed point) */
+static void
+emit_preop(struct nv_pc *pc, struct nv_instruction *i)
+{
+ pc->emit[0] = 0x00000000;
+ pc->emit[1] = 0x60000000;
+
+ if (i->opcode == NV_OP_PREEX2)
+ pc->emit[0] |= 0x20;
+
+ emit_form_1(pc, i);
+
+ if (i->src[0]->mod & NV_MOD_NEG) pc->emit[0] |= 1 << 8;
+ if (i->src[0]->mod & NV_MOD_ABS) pc->emit[0] |= 1 << 6;
+}
+
+static void
+emit_shift(struct nv_pc *pc, struct nv_instruction *i)
+{
+ pc->emit[0] = 0x00000003;
+
+ switch (i->opcode) {
+ case NV_OP_SAR:
+ pc->emit[0] |= 0x20; /* fall through */
+ case NV_OP_SHR:
+ pc->emit[1] = 0x58000000;
+ break;
+ case NV_OP_SHL:
+ default:
+ pc->emit[1] = 0x60000000;
+ break;
+ }
+
+ emit_form_0(pc, i);
+}
+
+static void
+emit_bitop(struct nv_pc *pc, struct nv_instruction *i)
+{
+ if (SFILE(i, 1) == NV_FILE_IMM) {
+ pc->emit[0] = 0x00000002;
+ pc->emit[1] = 0x38000000;
+ } else {
+ pc->emit[0] = 0x00000003;
+ pc->emit[1] = 0x68000000;
+ }
+
+ switch (i->opcode) {
+ case NV_OP_OR:
+ pc->emit[0] |= 0x40;
+ break;
+ case NV_OP_XOR:
+ pc->emit[0] |= 0x80;
+ break;
+ case NV_OP_AND:
+ default:
+ break;
+ }
+
+ emit_form_0(pc, i);
+}
+
+static void
+emit_set(struct nv_pc *pc, struct nv_instruction *i)
+{
+ pc->emit[0] = 0x00000000;
+
+ switch (i->opcode) {
+ case NV_OP_SET_S32:
+ pc->emit[0] |= 0x20; /* fall through */
+ case NV_OP_SET_U32:
+ pc->emit[0] |= 0x3;
+ pc->emit[1] = 0x100e0000;
+ break;
+ case NV_OP_SET_F32_AND:
+ pc->emit[1] = 0x18000000;
+ break;
+ case NV_OP_SET_F32_OR:
+ pc->emit[1] = 0x18200000;
+ break;
+ case NV_OP_SET_F32_XOR:
+ pc->emit[1] = 0x18400000;
+ break;
+ case NV_OP_FSET_F32:
+ pc->emit[0] |= 0x20; /* fall through */
+ case NV_OP_SET_F32:
+ default:
+ pc->emit[1] = 0x180e0000;
+ break;
+ }
+
+ if (DFILE(i, 0) == NV_FILE_PRED) {
+ pc->emit[0] |= 0x1c000;
+ pc->emit[1] += 0x08000000;
+ }
+
+ pc->emit[1] |= i->set_cond << 23;
+
+ emit_form_0(pc, i);
+
+ emit_neg_abs_1_2(pc, i); /* maybe assert that U/S32 don't use mods */
+}
+
+static void
+emit_selp(struct nv_pc *pc, struct nv_instruction *i)
+{
+ pc->emit[0] = 0x00000004;
+ pc->emit[1] = 0x20000000;
+
+ emit_form_0(pc, i);
+
+ if (i->cc || (i->src[2]->mod & NV_MOD_NOT))
+ pc->emit[1] |= 1 << 20;
+}
+
+static void
+emit_slct(struct nv_pc *pc, struct nv_instruction *i)
+{
+ uint8_t cc = i->set_cond;
+
+ pc->emit[0] = 0x00000000;
+
+ switch (i->opcode) {
+ case NV_OP_SLCT_S32:
+ pc->emit[0] |= 0x20; /* fall through */
+ case NV_OP_SLCT_U32:
+ pc->emit[0] |= 0x3;
+ pc->emit[1] = 0x30000000;
+ break;
+ case NV_OP_SLCT_F32:
+ default:
+ pc->emit[1] = 0x38000000;
+ break;
+ }
+
+ emit_form_0(pc, i);
+
+ if (i->src[2]->mod & NV_MOD_NEG)
+ cc = nvc0_ir_reverse_cc(cc);
+
+ pc->emit[1] |= cc << 23;
+}
+
+static void
+emit_cvt(struct nv_pc *pc, struct nv_instruction *i)
+{
+ uint32_t rint;
+
+ pc->emit[0] = 0x00000004;
+ pc->emit[1] = 0x10000000;
+
+ /* if no type conversion specified, get type from opcode */
+ if (i->opcode != NV_OP_CVT && i->ext.cvt.d == i->ext.cvt.s)
+ i->ext.cvt.d = i->ext.cvt.s = NV_OPTYPE(i->opcode);
+
+ switch (i->ext.cvt.d) {
+ case NV_TYPE_F32:
+ switch (i->ext.cvt.s) {
+ case NV_TYPE_F32: pc->emit[1] = 0x10000000; break;
+ case NV_TYPE_S32: pc->emit[0] |= 0x200; /* fall through */
+ case NV_TYPE_U32: pc->emit[1] = 0x18000000; break;
+ }
+ break;
+ case NV_TYPE_S32: pc->emit[0] |= 0x80; /* fall through */
+ case NV_TYPE_U32:
+ switch (i->ext.cvt.s) {
+ case NV_TYPE_F32: pc->emit[1] = 0x14000000; break;
+ case NV_TYPE_S32: pc->emit[0] |= 0x200; /* fall through */
+ case NV_TYPE_U32: pc->emit[1] = 0x1c000000; break;
+ }
+ break;
+ default:
+ assert(!"cvt: unknown type");
+ break;
+ }
+
+ rint = (i->ext.cvt.d == NV_TYPE_F32) ? 1 << 7 : 0;
+
+ if (i->opcode == NV_OP_FLOOR) {
+ pc->emit[0] |= rint;
+ pc->emit[1] |= 2 << 16;
+ } else
+ if (i->opcode == NV_OP_CEIL) {
+ pc->emit[0] |= rint;
+ pc->emit[1] |= 4 << 16;
+ } else
+ if (i->opcode == NV_OP_TRUNC) {
+ pc->emit[0] |= rint;
+ pc->emit[1] |= 6 << 16;
+ }
+
+ if (i->saturate || i->opcode == NV_OP_SAT)
+ pc->emit[0] |= 0x20;
+
+ if (NV_BASEOP(i->opcode) == NV_OP_ABS || i->src[0]->mod & NV_MOD_ABS)
+ pc->emit[0] |= 1 << 6;
+ if (NV_BASEOP(i->opcode) == NV_OP_NEG || i->src[0]->mod & NV_MOD_NEG)
+ pc->emit[0] |= 1 << 8;
+
+ pc->emit[0] |= util_logbase2(DREG(i->def[0])->size) << 20;
+ pc->emit[0] |= util_logbase2(SREG(i->src[0])->size) << 23;
+
+ emit_form_1(pc, i);
+}
+
+static void
+emit_interp(struct nv_pc *pc, struct nv_instruction *i)
+{
+ pc->emit[0] = 0x00000000;
+ pc->emit[1] = 0xc07e0000;
+
+ DID(pc, i->def[0], 14);
+
+ set_pred(pc, i);
+
+ if (i->indirect)
+ SID(pc, i->src[i->indirect], 20);
+ else
+ SID(pc, NULL, 20);
+
+ if (i->opcode == NV_OP_PINTERP) {
+ pc->emit[0] |= 0x040;
+ SID(pc, i->src[1], 26);
+ } else {
+ SID(pc, NULL, 26);
+ }
+
+ pc->emit[1] |= i->src[0]->value->reg.address & 0xffff;
+
+ if (i->centroid)
+ pc->emit[0] |= 0x100;
+ else
+ if (i->flat)
+ pc->emit[0] |= 0x080;
+}
+
+static void
+emit_vfetch(struct nv_pc *pc, struct nv_instruction *i)
+{
+ pc->emit[0] = 0x03f00006;
+ pc->emit[1] = 0x06000000 | i->src[0]->value->reg.address;
+ if (i->patch)
+ pc->emit[0] |= 0x100;
+
+ set_pred(pc, i);
+
+ DVS(pc, i);
+ DID(pc, i->def[0], 14);
+
+ SID(pc, (i->indirect >= 0) ? i->src[i->indirect] : NULL, 26);
+}
+
+static void
+emit_export(struct nv_pc *pc, struct nv_instruction *i)
+{
+ pc->emit[0] = 0x00000006;
+ pc->emit[1] = 0x0a000000;
+ if (i->patch)
+ pc->emit[0] |= 0x100;
+
+ set_pred(pc, i);
+
+ assert(SFILE(i, 0) == NV_FILE_MEM_V);
+ assert(SFILE(i, 1) == NV_FILE_GPR);
+
+ SID(pc, i->src[1], 26); /* register source */
+ SVS(pc, i->src[0]);
+
+ pc->emit[1] |= i->src[0]->value->reg.address & 0xfff;
+
+ SID(pc, (i->indirect >= 0) ? i->src[i->indirect] : NULL, 20);
+}
+
+static void
+emit_mov(struct nv_pc *pc, struct nv_instruction *i)
+{
+ if (i->opcode == NV_OP_MOV)
+ i->lanes = 0xf;
+
+ if (SFILE(i, 0) == NV_FILE_IMM) {
+ pc->emit[0] = 0x000001e2;
+ pc->emit[1] = 0x18000000;
+ } else
+ if (SFILE(i, 0) == NV_FILE_PRED) {
+ pc->emit[0] = 0x1c000004;
+ pc->emit[1] = 0x080e0000;
+ } else {
+ pc->emit[0] = 0x00000004 | (i->lanes << 5);
+ pc->emit[1] = 0x28000000;
+ }
+
+ emit_form_1(pc, i);
+}
+
+static void
+emit_ldst_size(struct nv_pc *pc, struct nv_instruction *i)
+{
+ assert(NV_IS_MEMORY_FILE(SFILE(i, 0)));
+
+ switch (SSIZE(i, 0)) {
+ case 1:
+ if (NV_TYPE_ISSGD(i->ext.cvt.s))
+ pc->emit[0] |= 0x20;
+ break;
+ case 2:
+ pc->emit[0] |= 0x40;
+ if (NV_TYPE_ISSGD(i->ext.cvt.s))
+ pc->emit[0] |= 0x20;
+ break;
+ case 4: pc->emit[0] |= 0x80; break;
+ case 8: pc->emit[0] |= 0xa0; break;
+ case 16: pc->emit[0] |= 0xc0; break;
+ default:
+ NOUVEAU_ERR("invalid load/store size %u\n", SSIZE(i, 0));
+ break;
+ }
+}
+
+static void
+emit_ld_common(struct nv_pc *pc, struct nv_instruction *i)
+{
+ emit_ldst_size(pc, i);
+
+ set_pred(pc, i);
+ set_address_16(pc, i->src[0]);
+
+ SID(pc, (i->indirect >= 0) ? i->src[i->indirect] : NULL, 20);
+ DID(pc, i->def[0], 14);
+}
+
+static void
+emit_ld_const(struct nv_pc *pc, struct nv_instruction *i)
+{
+ pc->emit[0] = 0x00000006;
+ pc->emit[1] = 0x14000000 | (const_space_index(i, 0) << 10);
+
+ emit_ld_common(pc, i);
+}
+
+static void
+emit_ld(struct nv_pc *pc, struct nv_instruction *i)
+{
+ if (SFILE(i, 0) >= NV_FILE_MEM_C(0) &&
+ SFILE(i, 0) <= NV_FILE_MEM_C(15)) {
+ if (SSIZE(i, 0) == 4 && i->indirect < 0) {
+ i->lanes = 0xf;
+ emit_mov(pc, i);
+ } else {
+ emit_ld_const(pc, i);
+ }
+ } else
+ if (SFILE(i, 0) == NV_FILE_MEM_L) {
+ pc->emit[0] = 0x00000005;
+ pc->emit[1] = 0xc0000000;
+
+ emit_ld_common(pc, i);
+ } else {
+ NOUVEAU_ERR("emit_ld(%u): not handled yet\n", SFILE(i, 0));
+ abort();
+ }
+}
+
+static void
+emit_st(struct nv_pc *pc, struct nv_instruction *i)
+{
+ if (SFILE(i, 0) != NV_FILE_MEM_L)
+ NOUVEAU_ERR("emit_st(%u): file not handled yet\n", SFILE(i, 0));
+
+ pc->emit[0] = 0x00000005 | (0 << 8); /* write-back caching */
+ pc->emit[1] = 0xc8000000;
+
+ emit_ldst_size(pc, i);
+
+ set_pred(pc, i);
+ set_address_16(pc, i->src[0]);
+
+ SID(pc, (i->indirect >= 0) ? i->src[i->indirect] : NULL, 20);
+ DID(pc, i->src[1]->value, 14);
+}
+
+void
+nvc0_emit_instruction(struct nv_pc *pc, struct nv_instruction *i)
+{
+ debug_printf("EMIT: "); nvc0_print_instruction(i);
+
+ switch (i->opcode) {
+ case NV_OP_VFETCH:
+ emit_vfetch(pc, i);
+ break;
+ case NV_OP_EXPORT:
+ if (!pc->is_fragprog)
+ emit_export(pc, i);
+ break;
+ case NV_OP_MOV:
+ emit_mov(pc, i);
+ break;
+ case NV_OP_LD:
+ emit_ld(pc, i);
+ break;
+ case NV_OP_ST:
+ emit_st(pc, i);
+ break;
+ case NV_OP_LINTERP:
+ case NV_OP_PINTERP:
+ emit_interp(pc, i);
+ break;
+ case NV_OP_ADD_F32:
+ emit_add_f32(pc, i);
+ break;
+ case NV_OP_AND:
+ case NV_OP_OR:
+ case NV_OP_XOR:
+ emit_bitop(pc, i);
+ break;
+ case NV_OP_CVT:
+ case NV_OP_ABS_F32:
+ case NV_OP_ABS_S32:
+ case NV_OP_NEG_F32:
+ case NV_OP_NEG_S32:
+ case NV_OP_SAT:
+ case NV_OP_CEIL:
+ case NV_OP_FLOOR:
+ case NV_OP_TRUNC:
+ emit_cvt(pc, i);
+ break;
+ case NV_OP_DFDX:
+ emit_ddx(pc, i);
+ break;
+ case NV_OP_DFDY:
+ emit_ddy(pc, i);
+ break;
+ case NV_OP_COS:
+ emit_flop(pc, i, 0);
+ break;
+ case NV_OP_SIN:
+ emit_flop(pc, i, 1);
+ break;
+ case NV_OP_EX2:
+ emit_flop(pc, i, 2);
+ break;
+ case NV_OP_LG2:
+ emit_flop(pc, i, 3);
+ break;
+ case NV_OP_RCP:
+ emit_flop(pc, i, 4);
+ break;
+ case NV_OP_RSQ:
+ emit_flop(pc, i, 5);
+ break;
+ case NV_OP_PRESIN:
+ case NV_OP_PREEX2:
+ emit_preop(pc, i);
+ break;
+ case NV_OP_MAD_F32:
+ emit_mad_f32(pc, i);
+ break;
+ case NV_OP_MAX_F32:
+ case NV_OP_MAX_S32:
+ case NV_OP_MAX_U32:
+ case NV_OP_MIN_F32:
+ case NV_OP_MIN_S32:
+ case NV_OP_MIN_U32:
+ emit_minmax(pc, i);
+ break;
+ case NV_OP_MUL_F32:
+ emit_mul_f32(pc, i);
+ break;
+ case NV_OP_SET_F32:
+ case NV_OP_SET_F32_AND:
+ case NV_OP_SET_F32_OR:
+ case NV_OP_SET_F32_XOR:
+ case NV_OP_SET_S32:
+ case NV_OP_SET_U32:
+ case NV_OP_FSET_F32:
+ emit_set(pc, i);
+ break;
+ case NV_OP_SHL:
+ case NV_OP_SHR:
+ case NV_OP_SAR:
+ emit_shift(pc, i);
+ break;
+ case NV_OP_TEX:
+ case NV_OP_TXB:
+ case NV_OP_TXL:
+ emit_tex(pc, i);
+ break;
+ case NV_OP_BRA:
+ emit_flow(pc, i, 0x40);
+ break;
+ case NV_OP_CALL:
+ emit_flow(pc, i, 0x50);
+ break;
+ case NV_OP_JOINAT:
+ emit_flow(pc, i, 0x60);
+ break;
+ case NV_OP_EXIT:
+ emit_flow(pc, i, 0x80);
+ break;
+ case NV_OP_RET:
+ emit_flow(pc, i, 0x90);
+ break;
+ case NV_OP_KIL:
+ emit_flow(pc, i, 0x98);
+ break;
+ case NV_OP_JOIN:
+ case NV_OP_NOP:
+ pc->emit[0] = 0x00003de4;
+ pc->emit[1] = 0x40000000;
+ break;
+ case NV_OP_SELP:
+ emit_selp(pc, i);
+ break;
+ case NV_OP_SLCT_F32:
+ case NV_OP_SLCT_S32:
+ case NV_OP_SLCT_U32:
+ emit_slct(pc, i);
+ break;
+ default:
+ NOUVEAU_ERR("unhandled NV_OP: %d\n", i->opcode);
+ abort();
+ break;
+ }
+
+ if (i->join)
+ pc->emit[0] |= 0x10;
+}
diff --git a/src/gallium/drivers/nvc0/nvc0_pc_optimize.c b/src/gallium/drivers/nvc0/nvc0_pc_optimize.c
new file mode 100644
index 00000000000..f7bf1680d09
--- /dev/null
+++ b/src/gallium/drivers/nvc0/nvc0_pc_optimize.c
@@ -0,0 +1,1420 @@
+/*
+ * Copyright 2010 Christoph Bumiller
+ *
+ * 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 "nvc0_pc.h"
+#include "nvc0_program.h"
+
+#define DESCEND_ARBITRARY(j, f) \
+do { \
+ b->pass_seq = ctx->pc->pass_seq; \
+ \
+ for (j = 0; j < 2; ++j) \
+ if (b->out[j] && b->out[j]->pass_seq < ctx->pc->pass_seq) \
+ f(ctx, b->out[j]); \
+} while (0)
+
+static INLINE boolean
+registers_interfere(struct nv_value *a, struct nv_value *b)
+{
+ if (a->reg.file != b->reg.file)
+ return FALSE;
+ if (NV_IS_MEMORY_FILE(a->reg.file) || NV_IS_MEMORY_FILE(b->reg.file))
+ return FALSE;
+
+ assert(a->join->reg.id >= 0 && b->join->reg.id >= 0);
+
+ if (a->join->reg.id < b->join->reg.id) {
+ return (a->join->reg.id + a->reg.size >= b->join->reg.id);
+ } else
+ if (a->join->reg.id > b->join->reg.id) {
+ return (b->join->reg.id + b->reg.size >= a->join->reg.id);
+ }
+
+ return FALSE;
+}
+
+static INLINE boolean
+values_equal(struct nv_value *a, struct nv_value *b)
+{
+ if (a->reg.file != b->reg.file || a->reg.size != b->reg.size)
+ return FALSE;
+ if (NV_IS_MEMORY_FILE(a->reg.file))
+ return a->reg.address == b->reg.address;
+ else
+ return a->join->reg.id == b->join->reg.id;
+}
+
+#if 0
+static INLINE boolean
+inst_commutation_check(struct nv_instruction *a, struct nv_instruction *b)
+{
+ int si, di;
+
+ for (di = 0; di < 4 && a->def[di]; ++di)
+ for (si = 0; si < 5 && b->src[si]; ++si)
+ if (registers_interfere(a->def[di], b->src[si]->value))
+ return FALSE;
+
+ return TRUE;
+}
+
+/* Check whether we can swap the order of the instructions,
+ * where a & b may be either the earlier or the later one.
+ */
+static boolean
+inst_commutation_legal(struct nv_instruction *a, struct nv_instruction *b)
+{
+ return inst_commutation_check(a, b) && inst_commutation_check(b, a);
+}
+#endif
+
+static INLINE boolean
+inst_removable(struct nv_instruction *nvi)
+{
+ if (nvi->opcode == NV_OP_ST)
+ return FALSE;
+ return (!(nvi->terminator ||
+ nvi->join ||
+ nvi->target ||
+ nvi->fixed ||
+ nvc0_insn_refcount(nvi)));
+}
+
+/* Check if we do not actually have to emit this instruction. */
+static INLINE boolean
+inst_is_noop(struct nv_instruction *nvi)
+{
+ if (nvi->opcode == NV_OP_UNDEF || nvi->opcode == NV_OP_BIND)
+ return TRUE;
+ if (nvi->terminator || nvi->join)
+ return FALSE;
+ if (nvi->def[0] && nvi->def[0]->join->reg.id < 0)
+ return TRUE;
+ if (nvi->opcode != NV_OP_MOV && nvi->opcode != NV_OP_SELECT)
+ return FALSE;
+ if (nvi->def[0]->reg.file != nvi->src[0]->value->reg.file)
+ return FALSE;
+
+ if (nvi->src[0]->value->join->reg.id < 0) {
+ NOUVEAU_DBG("inst_is_noop: orphaned value detected\n");
+ return TRUE;
+ }
+
+ if (nvi->opcode == NV_OP_SELECT)
+ if (!values_equal(nvi->def[0], nvi->src[1]->value))
+ return FALSE;
+ return values_equal(nvi->def[0], nvi->src[0]->value);
+}
+
+struct nv_pass {
+ struct nv_pc *pc;
+ int n;
+ void *priv;
+};
+
+static int
+nv_pass_flatten(struct nv_pass *ctx, struct nv_basic_block *b);
+
+static void
+nv_pc_pass_pre_emission(void *priv, struct nv_basic_block *b)
+{
+ struct nv_pc *pc = (struct nv_pc *)priv;
+ struct nv_basic_block *in;
+ struct nv_instruction *nvi, *next;
+ int j;
+
+ /* find first non-empty block emitted before b */
+ for (j = pc->num_blocks - 1; j >= 0 && !pc->bb_list[j]->emit_size; --j);
+
+ for (; j >= 0; --j) {
+ in = pc->bb_list[j];
+
+ /* check for no-op branches (BRA $PC+8) */
+ if (in->exit && in->exit->opcode == NV_OP_BRA && in->exit->target == b) {
+ in->emit_size -= 8;
+ pc->emit_size -= 8;
+
+ for (++j; j < pc->num_blocks; ++j)
+ pc->bb_list[j]->emit_pos -= 8;
+
+ nvc0_insn_delete(in->exit);
+ }
+ b->emit_pos = in->emit_pos + in->emit_size;
+
+ if (in->emit_size) /* no more no-op branches to b */
+ break;
+ }
+
+ pc->bb_list[pc->num_blocks++] = b;
+
+ /* visit node */
+
+ for (nvi = b->entry; nvi; nvi = next) {
+ next = nvi->next;
+ if (inst_is_noop(nvi) ||
+ (pc->is_fragprog && nvi->opcode == NV_OP_EXPORT)) {
+ nvc0_insn_delete(nvi);
+ } else
+ b->emit_size += 8;
+ }
+ pc->emit_size += b->emit_size;
+
+#ifdef NOUVEAU_DEBUG
+ if (!b->entry)
+ debug_printf("BB:%i is now empty\n", b->id);
+ else
+ debug_printf("BB:%i size = %u\n", b->id, b->emit_size);
+#endif
+}
+
+static int
+nv_pc_pass2(struct nv_pc *pc, struct nv_basic_block *root)
+{
+ struct nv_pass pass;
+
+ pass.pc = pc;
+
+ pc->pass_seq++;
+ nv_pass_flatten(&pass, root);
+
+ nvc0_pc_pass_in_order(root, nv_pc_pass_pre_emission, pc);
+
+ return 0;
+}
+
+int
+nvc0_pc_exec_pass2(struct nv_pc *pc)
+{
+ int i, ret;
+
+ NOUVEAU_DBG("preparing %u blocks for emission\n", pc->num_blocks);
+
+ pc->num_blocks = 0; /* will reorder bb_list */
+
+ for (i = 0; i < pc->num_subroutines + 1; ++i)
+ if (pc->root[i] && (ret = nv_pc_pass2(pc, pc->root[i])))
+ return ret;
+ return 0;
+}
+
+static INLINE boolean
+is_cspace_load(struct nv_instruction *nvi)
+{
+ if (!nvi)
+ return FALSE;
+ assert(nvi->indirect != 0);
+ return (nvi->opcode == NV_OP_LD &&
+ nvi->src[0]->value->reg.file >= NV_FILE_MEM_C(0) &&
+ nvi->src[0]->value->reg.file <= NV_FILE_MEM_C(15));
+}
+
+static INLINE boolean
+is_immd32_load(struct nv_instruction *nvi)
+{
+ if (!nvi)
+ return FALSE;
+ return (nvi->opcode == NV_OP_MOV &&
+ nvi->src[0]->value->reg.file == NV_FILE_IMM &&
+ nvi->src[0]->value->reg.size == 4);
+}
+
+static INLINE void
+check_swap_src_0_1(struct nv_instruction *nvi)
+{
+ struct nv_ref *src0 = nvi->src[0];
+ struct nv_ref *src1 = nvi->src[1];
+
+ if (!nv_op_commutative(nvi->opcode) &&
+ NV_BASEOP(nvi->opcode) != NV_OP_SET &&
+ NV_BASEOP(nvi->opcode) != NV_OP_SLCT)
+ return;
+ assert(src0 && src1 && src0->value && src1->value);
+
+ if (src1->value->reg.file != NV_FILE_GPR)
+ return;
+
+ if (is_cspace_load(src0->value->insn)) {
+ if (!is_cspace_load(src1->value->insn)) {
+ nvi->src[0] = src1;
+ nvi->src[1] = src0;
+ }
+ } else
+ if (is_immd32_load(src0->value->insn)) {
+ if (!is_cspace_load(src1->value->insn) &&
+ !is_immd32_load(src1->value->insn)) {
+ nvi->src[0] = src1;
+ nvi->src[1] = src0;
+ }
+ }
+
+ if (nvi->src[0] != src0) {
+ if (NV_BASEOP(nvi->opcode) == NV_OP_SET)
+ nvi->set_cond = nvc0_ir_reverse_cc(nvi->set_cond);
+ else
+ if (NV_BASEOP(nvi->opcode) == NV_OP_SLCT)
+ nvi->set_cond = NV_CC_INVERSE(nvi->set_cond);
+ }
+}
+
+static void
+nvi_set_indirect_load(struct nv_pc *pc,
+ struct nv_instruction *nvi, struct nv_value *val)
+{
+ for (nvi->indirect = 0; nvi->indirect < 6 && nvi->src[nvi->indirect];
+ ++nvi->indirect);
+ assert(nvi->indirect < 6);
+ nv_reference(pc, nvi, nvi->indirect, val);
+}
+
+static int
+nvc0_pass_fold_loads(struct nv_pass *ctx, struct nv_basic_block *b)
+{
+ struct nv_instruction *nvi, *ld;
+ int s;
+
+ for (nvi = b->entry; nvi; nvi = nvi->next) {
+ check_swap_src_0_1(nvi);
+
+ for (s = 0; s < 3 && nvi->src[s]; ++s) {
+ ld = nvi->src[s]->value->insn;
+ if (!ld || (ld->opcode != NV_OP_LD && ld->opcode != NV_OP_MOV))
+ continue;
+ if (!nvc0_insn_can_load(nvi, s, ld))
+ continue;
+
+ /* fold it ! */
+ nv_reference(ctx->pc, nvi, s, ld->src[0]->value);
+ if (ld->indirect >= 0)
+ nvi_set_indirect_load(ctx->pc, nvi, ld->src[ld->indirect]->value);
+
+ if (!nvc0_insn_refcount(ld))
+ nvc0_insn_delete(ld);
+ }
+ }
+ DESCEND_ARBITRARY(s, nvc0_pass_fold_loads);
+
+ return 0;
+}
+
+/* NOTE: Assumes loads have not yet been folded. */
+static int
+nv_pass_lower_mods(struct nv_pass *ctx, struct nv_basic_block *b)
+{
+ struct nv_instruction *nvi, *mi, *next;
+ int j;
+ uint8_t mod;
+
+ for (nvi = b->entry; nvi; nvi = next) {
+ next = nvi->next;
+ if (nvi->opcode == NV_OP_SUB) {
+ nvi->src[1]->mod ^= NV_MOD_NEG;
+ nvi->opcode = NV_OP_ADD;
+ }
+
+ for (j = 0; j < 3 && nvi->src[j]; ++j) {
+ mi = nvi->src[j]->value->insn;
+ if (!mi)
+ continue;
+ if (mi->def[0]->refc > 1 || mi->predicate >= 0)
+ continue;
+
+ if (NV_BASEOP(mi->opcode) == NV_OP_NEG) mod = NV_MOD_NEG;
+ else
+ if (NV_BASEOP(mi->opcode) == NV_OP_ABS) mod = NV_MOD_ABS;
+ else
+ continue;
+ assert(!(mod & mi->src[0]->mod & NV_MOD_NEG));
+
+ mod |= mi->src[0]->mod;
+
+ if ((nvi->opcode == NV_OP_ABS) || (nvi->src[j]->mod & NV_MOD_ABS)) {
+ /* abs neg [abs] = abs */
+ mod &= ~(NV_MOD_NEG | NV_MOD_ABS);
+ } else
+ if ((nvi->opcode == NV_OP_NEG) && (mod & NV_MOD_NEG)) {
+ /* neg as opcode and modifier on same insn cannot occur */
+ /* neg neg abs = abs, neg neg = identity */
+ assert(j == 0);
+ if (mod & NV_MOD_ABS)
+ nvi->opcode = NV_OP_ABS;
+ else
+ nvi->opcode = NV_OP_MOV;
+ mod = 0;
+ }
+
+ if ((nv_op_supported_src_mods(nvi->opcode, j) & mod) != mod)
+ continue;
+
+ nv_reference(ctx->pc, nvi, j, mi->src[0]->value);
+
+ nvi->src[j]->mod ^= mod;
+ }
+
+ if (nvi->opcode == NV_OP_SAT) {
+ mi = nvi->src[0]->value->insn;
+
+ if (mi->def[0]->refc > 1 ||
+ (mi->opcode != NV_OP_ADD &&
+ mi->opcode != NV_OP_MUL &&
+ mi->opcode != NV_OP_MAD))
+ continue;
+ mi->saturate = 1;
+ mi->def[0] = nvi->def[0];
+ mi->def[0]->insn = mi;
+ nvc0_insn_delete(nvi);
+ }
+ }
+ DESCEND_ARBITRARY(j, nv_pass_lower_mods);
+
+ return 0;
+}
+
+#define SRC_IS_MUL(s) ((s)->insn && (s)->insn->opcode == NV_OP_MUL)
+
+static void
+apply_modifiers(uint32_t *val, uint8_t type, uint8_t mod)
+{
+ if (mod & NV_MOD_ABS) {
+ if (type == NV_TYPE_F32)
+ *val &= 0x7fffffff;
+ else
+ if ((*val) & (1 << 31))
+ *val = ~(*val) + 1;
+ }
+ if (mod & NV_MOD_NEG) {
+ if (type == NV_TYPE_F32)
+ *val ^= 0x80000000;
+ else
+ *val = ~(*val) + 1;
+ }
+ if (mod & NV_MOD_SAT) {
+ union {
+ float f;
+ uint32_t u;
+ int32_t i;
+ } u;
+ u.u = *val;
+ if (type == NV_TYPE_F32) {
+ u.f = CLAMP(u.f, -1.0f, 1.0f);
+ } else
+ if (type == NV_TYPE_U16) {
+ u.u = MIN2(u.u, 0xffff);
+ } else
+ if (type == NV_TYPE_S16) {
+ u.i = CLAMP(u.i, -32768, 32767);
+ }
+ *val = u.u;
+ }
+ if (mod & NV_MOD_NOT)
+ *val = ~*val;
+}
+
+static void
+constant_expression(struct nv_pc *pc, struct nv_instruction *nvi,
+ struct nv_value *src0, struct nv_value *src1)
+{
+ struct nv_value *val;
+ union {
+ float f32;
+ uint32_t u32;
+ int32_t s32;
+ } u0, u1, u;
+ ubyte type;
+
+ if (!nvi->def[0])
+ return;
+ type = NV_OPTYPE(nvi->opcode);
+
+ u.u32 = 0;
+ u0.u32 = src0->reg.imm.u32;
+ u1.u32 = src1->reg.imm.u32;
+
+ apply_modifiers(&u0.u32, type, nvi->src[0]->mod);
+ apply_modifiers(&u1.u32, type, nvi->src[1]->mod);
+
+ switch (nvi->opcode) {
+ case NV_OP_MAD_F32:
+ if (nvi->src[2]->value->reg.file != NV_FILE_GPR)
+ return;
+ /* fall through */
+ case NV_OP_MUL_F32:
+ u.f32 = u0.f32 * u1.f32;
+ break;
+ case NV_OP_MUL_B32:
+ u.u32 = u0.u32 * u1.u32;
+ break;
+ case NV_OP_ADD_F32:
+ u.f32 = u0.f32 + u1.f32;
+ break;
+ case NV_OP_ADD_B32:
+ u.u32 = u0.u32 + u1.u32;
+ break;
+ case NV_OP_SUB_F32:
+ u.f32 = u0.f32 - u1.f32;
+ break;
+ /*
+ case NV_OP_SUB_B32:
+ u.u32 = u0.u32 - u1.u32;
+ break;
+ */
+ default:
+ return;
+ }
+
+ val = new_value(pc, NV_FILE_IMM, nv_type_sizeof(type));
+ val->reg.imm.u32 = u.u32;
+
+ nv_reference(pc, nvi, 1, NULL);
+ nv_reference(pc, nvi, 0, val);
+
+ if (nvi->opcode == NV_OP_MAD_F32) {
+ nvi->src[1] = nvi->src[0];
+ nvi->src[0] = nvi->src[2];
+ nvi->src[2] = NULL;
+ nvi->opcode = NV_OP_ADD_F32;
+
+ if (val->reg.imm.u32 == 0) {
+ nvi->src[1] = NULL;
+ nvi->opcode = NV_OP_MOV;
+ }
+ } else {
+ nvi->opcode = NV_OP_MOV;
+ }
+}
+
+static void
+constant_operand(struct nv_pc *pc,
+ struct nv_instruction *nvi, struct nv_value *val, int s)
+{
+ union {
+ float f32;
+ uint32_t u32;
+ int32_t s32;
+ } u;
+ int shift;
+ int t = s ? 0 : 1;
+ uint op;
+ ubyte type;
+
+ if (!nvi->def[0])
+ return;
+ type = NV_OPTYPE(nvi->opcode);
+
+ u.u32 = val->reg.imm.u32;
+ apply_modifiers(&u.u32, type, nvi->src[s]->mod);
+
+ if (u.u32 == 0 && NV_BASEOP(nvi->opcode) == NV_OP_MUL) {
+ nvi->opcode = NV_OP_MOV;
+ nv_reference(pc, nvi, t, NULL);
+ if (s) {
+ nvi->src[0] = nvi->src[1];
+ nvi->src[1] = NULL;
+ }
+ return;
+ }
+
+ switch (nvi->opcode) {
+ case NV_OP_MUL_F32:
+ if (u.f32 == 1.0f || u.f32 == -1.0f) {
+ if (u.f32 == -1.0f)
+ nvi->src[t]->mod ^= NV_MOD_NEG;
+ switch (nvi->src[t]->mod) {
+ case 0: op = nvi->saturate ? NV_OP_SAT : NV_OP_MOV; break;
+ case NV_MOD_NEG: op = NV_OP_NEG_F32; break;
+ case NV_MOD_ABS: op = NV_OP_ABS_F32; break;
+ default:
+ return;
+ }
+ nvi->opcode = op;
+ nv_reference(pc, nvi, 0, nvi->src[t]->value);
+ nv_reference(pc, nvi, 1, NULL);
+ nvi->src[0]->mod = 0;
+ } else
+ if (u.f32 == 2.0f || u.f32 == -2.0f) {
+ if (u.f32 == -2.0f)
+ nvi->src[t]->mod ^= NV_MOD_NEG;
+ nvi->opcode = NV_OP_ADD_F32;
+ nv_reference(pc, nvi, s, nvi->src[t]->value);
+ nvi->src[s]->mod = nvi->src[t]->mod;
+ }
+ break;
+ case NV_OP_ADD_F32:
+ if (u.u32 == 0) {
+ switch (nvi->src[t]->mod) {
+ case 0: op = nvi->saturate ? NV_OP_SAT : NV_OP_MOV; break;
+ case NV_MOD_NEG: op = NV_OP_NEG_F32; break;
+ case NV_MOD_ABS: op = NV_OP_ABS_F32; break;
+ case NV_MOD_NEG | NV_MOD_ABS:
+ op = NV_OP_CVT;
+ nvi->ext.cvt.s = nvi->ext.cvt.d = type;
+ break;
+ default:
+ return;
+ }
+ nvi->opcode = op;
+ nv_reference(pc, nvi, 0, nvi->src[t]->value);
+ nv_reference(pc, nvi, 1, NULL);
+ if (nvi->opcode != NV_OP_CVT)
+ nvi->src[0]->mod = 0;
+ }
+ break;
+ case NV_OP_ADD_B32:
+ if (u.u32 == 0) {
+ assert(nvi->src[t]->mod == 0);
+ nvi->opcode = nvi->saturate ? NV_OP_CVT : NV_OP_MOV;
+ nvi->ext.cvt.s = nvi->ext.cvt.d = type;
+ nv_reference(pc, nvi, 0, nvi->src[t]->value);
+ nv_reference(pc, nvi, 1, NULL);
+ }
+ break;
+ case NV_OP_MUL_B32:
+ /* multiplication by 0 already handled above */
+ assert(nvi->src[s]->mod == 0);
+ shift = ffs(u.s32) - 1;
+ if (shift == 0) {
+ nvi->opcode = NV_OP_MOV;
+ nv_reference(pc, nvi, 0, nvi->src[t]->value);
+ nv_reference(pc, nvi, 1, NULL);
+ } else
+ if (u.s32 > 0 && u.s32 == (1 << shift)) {
+ nvi->opcode = NV_OP_SHL;
+ (val = new_value(pc, NV_FILE_IMM, 4))->reg.imm.s32 = shift;
+ nv_reference(pc, nvi, 0, nvi->src[t]->value);
+ nv_reference(pc, nvi, 1, val);
+ break;
+ }
+ break;
+ case NV_OP_RCP:
+ u.f32 = 1.0f / u.f32;
+ (val = new_value(pc, NV_FILE_IMM, 4))->reg.imm.f32 = u.f32;
+ nvi->opcode = NV_OP_MOV;
+ assert(s == 0);
+ nv_reference(pc, nvi, 0, val);
+ break;
+ case NV_OP_RSQ:
+ u.f32 = 1.0f / sqrtf(u.f32);
+ (val = new_value(pc, NV_FILE_IMM, 4))->reg.imm.f32 = u.f32;
+ nvi->opcode = NV_OP_MOV;
+ assert(s == 0);
+ nv_reference(pc, nvi, 0, val);
+ break;
+ default:
+ break;
+ }
+}
+
+static void
+handle_min_max(struct nv_pass *ctx, struct nv_instruction *nvi)
+{
+ struct nv_value *src0 = nvi->src[0]->value;
+ struct nv_value *src1 = nvi->src[1]->value;
+
+ if (src0 != src1 || (nvi->src[0]->mod | nvi->src[1]->mod))
+ return;
+ if (src0->reg.file != NV_FILE_GPR)
+ return;
+ nvc0_pc_replace_value(ctx->pc, nvi->def[0], src0);
+ nvc0_insn_delete(nvi);
+}
+
+/* check if we can MUL + ADD -> MAD/FMA */
+static void
+handle_add_mul(struct nv_pass *ctx, struct nv_instruction *nvi)
+{
+ struct nv_value *src0 = nvi->src[0]->value;
+ struct nv_value *src1 = nvi->src[1]->value;
+ struct nv_value *src;
+ int s;
+ uint8_t mod[4];
+
+ if (SRC_IS_MUL(src0) && src0->refc == 1) s = 0;
+ else
+ if (SRC_IS_MUL(src1) && src1->refc == 1) s = 1;
+ else
+ return;
+
+ if ((src0->insn && src0->insn->bb != nvi->bb) ||
+ (src1->insn && src1->insn->bb != nvi->bb))
+ return;
+
+ /* check for immediates from prior constant folding */
+ if (src0->reg.file != NV_FILE_GPR || src1->reg.file != NV_FILE_GPR)
+ return;
+ src = nvi->src[s]->value;
+
+ mod[0] = nvi->src[0]->mod;
+ mod[1] = nvi->src[1]->mod;
+ mod[2] = src->insn->src[0]->mod;
+ mod[3] = src->insn->src[1]->mod;
+
+ if ((mod[0] | mod[1] | mod[2] | mod[3]) & ~NV_MOD_NEG)
+ return;
+
+ nvi->opcode = NV_OP_MAD_F32;
+
+ nv_reference(ctx->pc, nvi, s, NULL);
+ nvi->src[2] = nvi->src[!s];
+ nvi->src[!s] = NULL;
+
+ nv_reference(ctx->pc, nvi, 0, src->insn->src[0]->value);
+ nvi->src[0]->mod = mod[2] ^ mod[s];
+ nv_reference(ctx->pc, nvi, 1, src->insn->src[1]->value);
+ nvi->src[1]->mod = mod[3];
+}
+
+static int
+nv_pass_algebraic_opt(struct nv_pass *ctx, struct nv_basic_block *b)
+{
+ struct nv_instruction *nvi, *next;
+ int j;
+
+ for (nvi = b->entry; nvi; nvi = next) {
+ struct nv_value *src0, *src1;
+ uint baseop = NV_BASEOP(nvi->opcode);
+
+ next = nvi->next;
+
+ src0 = nvc0_pc_find_immediate(nvi->src[0]);
+ src1 = nvc0_pc_find_immediate(nvi->src[1]);
+
+ if (src0 && src1) {
+ constant_expression(ctx->pc, nvi, src0, src1);
+ } else {
+ if (src0)
+ constant_operand(ctx->pc, nvi, src0, 0);
+ else
+ if (src1)
+ constant_operand(ctx->pc, nvi, src1, 1);
+ }
+
+ if (baseop == NV_OP_MIN || baseop == NV_OP_MAX)
+ handle_min_max(ctx, nvi);
+ else
+ if (nvi->opcode == NV_OP_ADD_F32)
+ handle_add_mul(ctx, nvi);
+ }
+ DESCEND_ARBITRARY(j, nv_pass_algebraic_opt);
+
+ return 0;
+}
+
+/* TODO: redundant store elimination */
+
+struct mem_record {
+ struct mem_record *next;
+ struct nv_instruction *insn;
+ uint32_t ofst;
+ uint32_t base;
+ uint32_t size;
+};
+
+#define MEM_RECORD_POOL_SIZE 1024
+
+struct pass_reld_elim {
+ struct nv_pc *pc;
+
+ struct mem_record *imm;
+ struct mem_record *mem_v;
+ struct mem_record *mem_a;
+ struct mem_record *mem_c[16];
+ struct mem_record *mem_l;
+
+ struct mem_record pool[MEM_RECORD_POOL_SIZE];
+ int alloc;
+};
+
+/* Extend the load operation in @rec to also cover the data loaded by @ld.
+ * The two loads may not overlap but reference adjacent memory locations.
+ */
+static void
+combine_load(struct nv_pc *pc, struct mem_record *rec,
+ struct nv_instruction *ld)
+{
+ struct nv_instruction *fv = rec->insn;
+ struct nv_value *mem = ld->src[0]->value;
+ uint32_t size = rec->size + mem->reg.size;
+ int j;
+ int d = rec->size / 4;
+
+ assert(rec->size < 16);
+ if (rec->ofst > mem->reg.address) {
+ if ((size == 8 && mem->reg.address & 3) ||
+ (size > 8 && mem->reg.address & 7))
+ return;
+ rec->ofst = mem->reg.address;
+ for (j = 0; j < d; ++j)
+ fv->def[mem->reg.size / 4 + j] = fv->def[j];
+ d = 0;
+ } else
+ if ((size == 8 && rec->ofst & 3) ||
+ (size > 8 && rec->ofst & 7)) {
+ return;
+ }
+
+ for (j = 0; j < mem->reg.size / 4; ++j) {
+ fv->def[d] = ld->def[j];
+ fv->def[d++]->insn = fv;
+ }
+
+ if (fv->src[0]->value->refc > 1)
+ nv_reference(pc, fv, 0, new_value_like(pc, fv->src[0]->value));
+ fv->src[0]->value->reg.address = rec->ofst;
+ fv->src[0]->value->reg.size = rec->size = size;
+
+ nvc0_insn_delete(ld);
+}
+
+static void
+combine_export(struct mem_record *rec, struct nv_instruction *ex)
+{
+
+}
+
+static INLINE void
+add_mem_record(struct pass_reld_elim *ctx, struct mem_record **rec,
+ uint32_t base, uint32_t ofst, struct nv_instruction *nvi)
+{
+ struct mem_record *it = &ctx->pool[ctx->alloc++];
+
+ it->next = *rec;
+ *rec = it;
+ it->base = base;
+ it->ofst = ofst;
+ it->insn = nvi;
+ it->size = nvi->src[0]->value->reg.size;
+}
+
+/* vectorize and reuse loads from memory or of immediates */
+static int
+nv_pass_mem_opt(struct pass_reld_elim *ctx, struct nv_basic_block *b)
+{
+ struct mem_record **rec, *it;
+ struct nv_instruction *ld, *next;
+ struct nv_value *mem;
+ uint32_t base, ofst;
+ int s;
+
+ for (ld = b->entry; ld; ld = next) {
+ next = ld->next;
+
+ if (is_cspace_load(ld)) {
+ mem = ld->src[0]->value;
+ rec = &ctx->mem_c[ld->src[0]->value->reg.file - NV_FILE_MEM_C(0)];
+ } else
+ if (ld->opcode == NV_OP_VFETCH) {
+ mem = ld->src[0]->value;
+ rec = &ctx->mem_a;
+ } else
+ if (ld->opcode == NV_OP_EXPORT) {
+ mem = ld->src[0]->value;
+ if (mem->reg.file != NV_FILE_MEM_V)
+ continue;
+ rec = &ctx->mem_v;
+ } else {
+ continue;
+ }
+ if (ld->def[0] && ld->def[0]->refc == 0)
+ continue;
+ ofst = mem->reg.address;
+ base = (ld->indirect >= 0) ? ld->src[ld->indirect]->value->n : 0;
+
+ for (it = *rec; it; it = it->next) {
+ if (it->base == base &&
+ ((it->ofst >> 4) == (ofst >> 4)) &&
+ ((it->ofst + it->size == ofst) ||
+ (it->ofst - mem->reg.size == ofst))) {
+ /* only NV_OP_VFETCH can load exactly 12 bytes */
+ if (ld->opcode == NV_OP_LD && it->size + mem->reg.size == 12)
+ continue;
+ if (it->ofst < ofst) {
+ if ((it->ofst & 0xf) == 4)
+ continue;
+ } else
+ if ((ofst & 0xf) == 4)
+ continue;
+ break;
+ }
+ }
+ if (it) {
+ switch (ld->opcode) {
+ case NV_OP_EXPORT: combine_export(it, ld); break;
+ default:
+ combine_load(ctx->pc, it, ld);
+ break;
+ }
+ } else
+ if (ctx->alloc < MEM_RECORD_POOL_SIZE) {
+ add_mem_record(ctx, rec, base, ofst, ld);
+ }
+ }
+
+ ctx->alloc = 0;
+ ctx->mem_a = ctx->mem_v = ctx->mem_l = NULL;
+ for (s = 0; s < 16; ++s)
+ ctx->mem_c[s] = NULL;
+
+ DESCEND_ARBITRARY(s, nv_pass_mem_opt);
+ return 0;
+}
+
+static void
+eliminate_store(struct mem_record *rec, struct nv_instruction *st)
+{
+}
+
+/* elimination of redundant stores */
+static int
+pass_store_elim(struct pass_reld_elim *ctx, struct nv_basic_block *b)
+{
+ struct mem_record **rec, *it;
+ struct nv_instruction *st, *next;
+ struct nv_value *mem;
+ uint32_t base, ofst, size;
+ int s;
+
+ for (st = b->entry; st; st = next) {
+ next = st->next;
+
+ if (st->opcode == NV_OP_ST) {
+ mem = st->src[0]->value;
+ rec = &ctx->mem_l;
+ } else
+ if (st->opcode == NV_OP_EXPORT) {
+ mem = st->src[0]->value;
+ if (mem->reg.file != NV_FILE_MEM_V)
+ continue;
+ rec = &ctx->mem_v;
+ } else
+ if (st->opcode == NV_OP_ST) {
+ /* TODO: purge */
+ }
+ ofst = mem->reg.address;
+ base = (st->indirect >= 0) ? st->src[st->indirect]->value->n : 0;
+ size = mem->reg.size;
+
+ for (it = *rec; it; it = it->next) {
+ if (it->base == base &&
+ (it->ofst <= ofst && (it->ofst + size) > ofst))
+ break;
+ }
+ if (it)
+ eliminate_store(it, st);
+ else
+ add_mem_record(ctx, rec, base, ofst, st);
+ }
+
+ DESCEND_ARBITRARY(s, nv_pass_mem_opt);
+ return 0;
+}
+
+/* TODO: properly handle loads from l[] memory in the presence of stores */
+static int
+nv_pass_reload_elim(struct pass_reld_elim *ctx, struct nv_basic_block *b)
+{
+#if 0
+ struct load_record **rec, *it;
+ struct nv_instruction *ld, *next;
+ uint64_t data[2];
+ struct nv_value *val;
+ int j;
+
+ for (ld = b->entry; ld; ld = next) {
+ next = ld->next;
+ if (!ld->src[0])
+ continue;
+ val = ld->src[0]->value;
+ rec = NULL;
+
+ if (ld->opcode == NV_OP_LINTERP || ld->opcode == NV_OP_PINTERP) {
+ data[0] = val->reg.id;
+ data[1] = 0;
+ rec = &ctx->mem_v;
+ } else
+ if (ld->opcode == NV_OP_LDA) {
+ data[0] = val->reg.id;
+ data[1] = ld->src[4] ? ld->src[4]->value->n : ~0ULL;
+ if (val->reg.file >= NV_FILE_MEM_C(0) &&
+ val->reg.file <= NV_FILE_MEM_C(15))
+ rec = &ctx->mem_c[val->reg.file - NV_FILE_MEM_C(0)];
+ else
+ if (val->reg.file == NV_FILE_MEM_S)
+ rec = &ctx->mem_s;
+ else
+ if (val->reg.file == NV_FILE_MEM_L)
+ rec = &ctx->mem_l;
+ } else
+ if ((ld->opcode == NV_OP_MOV) && (val->reg.file == NV_FILE_IMM)) {
+ data[0] = val->reg.imm.u32;
+ data[1] = 0;
+ rec = &ctx->imm;
+ }
+
+ if (!rec || !ld->def[0]->refc)
+ continue;
+
+ for (it = *rec; it; it = it->next)
+ if (it->data[0] == data[0] && it->data[1] == data[1])
+ break;
+
+ if (it) {
+ if (ld->def[0]->reg.id >= 0)
+ it->value = ld->def[0];
+ else
+ if (!ld->fixed)
+ nvc0_pc_replace_value(ctx->pc, ld->def[0], it->value);
+ } else {
+ if (ctx->alloc == LOAD_RECORD_POOL_SIZE)
+ continue;
+ it = &ctx->pool[ctx->alloc++];
+ it->next = *rec;
+ it->data[0] = data[0];
+ it->data[1] = data[1];
+ it->value = ld->def[0];
+ *rec = it;
+ }
+ }
+
+ ctx->imm = NULL;
+ ctx->mem_s = NULL;
+ ctx->mem_v = NULL;
+ for (j = 0; j < 16; ++j)
+ ctx->mem_c[j] = NULL;
+ ctx->mem_l = NULL;
+ ctx->alloc = 0;
+
+ DESCEND_ARBITRARY(j, nv_pass_reload_elim);
+#endif
+ return 0;
+}
+
+static int
+nv_pass_tex_mask(struct nv_pass *ctx, struct nv_basic_block *b)
+{
+ int i, c, j;
+
+ for (i = 0; i < ctx->pc->num_instructions; ++i) {
+ struct nv_instruction *nvi = &ctx->pc->instructions[i];
+ struct nv_value *def[4];
+
+ if (!nv_is_texture_op(nvi->opcode))
+ continue;
+ nvi->tex_mask = 0;
+
+ for (c = 0; c < 4; ++c) {
+ if (nvi->def[c]->refc)
+ nvi->tex_mask |= 1 << c;
+ def[c] = nvi->def[c];
+ }
+
+ j = 0;
+ for (c = 0; c < 4; ++c)
+ if (nvi->tex_mask & (1 << c))
+ nvi->def[j++] = def[c];
+ for (c = 0; c < 4; ++c)
+ if (!(nvi->tex_mask & (1 << c)))
+ nvi->def[j++] = def[c];
+ assert(j == 4);
+ }
+ return 0;
+}
+
+struct nv_pass_dce {
+ struct nv_pc *pc;
+ uint removed;
+};
+
+static int
+nv_pass_dce(struct nv_pass_dce *ctx, struct nv_basic_block *b)
+{
+ int j;
+ struct nv_instruction *nvi, *next;
+
+ for (nvi = b->phi ? b->phi : b->entry; nvi; nvi = next) {
+ next = nvi->next;
+
+ if (inst_removable(nvi)) {
+ nvc0_insn_delete(nvi);
+ ++ctx->removed;
+ }
+ }
+ DESCEND_ARBITRARY(j, nv_pass_dce);
+
+ return 0;
+}
+
+/* Register allocation inserted ELSE blocks for all IF/ENDIF without ELSE.
+ * Returns TRUE if @bb initiates an IF/ELSE/ENDIF clause, or is an IF with
+ * BREAK and dummy ELSE block.
+ */
+static INLINE boolean
+bb_is_if_else_endif(struct nv_basic_block *bb)
+{
+ if (!bb->out[0] || !bb->out[1])
+ return FALSE;
+
+ if (bb->out[0]->out_kind[0] == CFG_EDGE_LOOP_LEAVE) {
+ return (bb->out[0]->out[1] == bb->out[1]->out[0] &&
+ !bb->out[1]->out[1]);
+ } else {
+ return (bb->out[0]->out[0] == bb->out[1]->out[0] &&
+ !bb->out[0]->out[1] &&
+ !bb->out[1]->out[1]);
+ }
+}
+
+/* Predicate instructions and delete any branch at the end if it is
+ * not a break from a loop.
+ */
+static void
+predicate_instructions(struct nv_pc *pc, struct nv_basic_block *b,
+ struct nv_value *pred, uint8_t cc)
+{
+ struct nv_instruction *nvi, *prev;
+ int s;
+
+ if (!b->entry)
+ return;
+ for (nvi = b->entry; nvi; nvi = nvi->next) {
+ prev = nvi;
+ if (inst_is_noop(nvi))
+ continue;
+ for (s = 0; nvi->src[s]; ++s);
+ assert(s < 6);
+ nvi->predicate = s;
+ nvi->cc = cc;
+ nv_reference(pc, nvi, nvi->predicate, pred);
+ }
+ if (prev->opcode == NV_OP_BRA &&
+ b->out_kind[0] != CFG_EDGE_LOOP_LEAVE &&
+ b->out_kind[1] != CFG_EDGE_LOOP_LEAVE)
+ nvc0_insn_delete(prev);
+}
+
+static INLINE boolean
+may_predicate_insn(struct nv_instruction *nvi, struct nv_value *pred)
+{
+ if (nvi->def[0] && values_equal(nvi->def[0], pred))
+ return FALSE;
+ return nvc0_insn_is_predicateable(nvi);
+}
+
+/* Transform IF/ELSE/ENDIF constructs into predicated instructions
+ * where feasible.
+ */
+static int
+nv_pass_flatten(struct nv_pass *ctx, struct nv_basic_block *b)
+{
+ struct nv_instruction *nvi;
+ struct nv_value *pred;
+ int k;
+ int n0, n1; /* instruction counts of outgoing blocks */
+
+ if (bb_is_if_else_endif(b)) {
+ assert(b->exit && b->exit->opcode == NV_OP_BRA);
+
+ assert(b->exit->predicate >= 0);
+ pred = b->exit->src[b->exit->predicate]->value;
+
+ n1 = n0 = 0;
+ for (nvi = b->out[0]->entry; nvi; nvi = nvi->next, ++n0)
+ if (!may_predicate_insn(nvi, pred))
+ break;
+ if (!nvi) {
+ /* we're after register allocation, so there always is an ELSE block */
+ for (nvi = b->out[1]->entry; nvi; nvi = nvi->next, ++n1)
+ if (!may_predicate_insn(nvi, pred))
+ break;
+ }
+
+ /* 12 is an arbitrary limit */
+ if (!nvi && n0 < 12 && n1 < 12) {
+ predicate_instructions(ctx->pc, b->out[0], pred, !b->exit->cc);
+ predicate_instructions(ctx->pc, b->out[1], pred, b->exit->cc);
+
+ nvc0_insn_delete(b->exit); /* delete the branch */
+
+ /* and a potential joinat before it */
+ if (b->exit && b->exit->opcode == NV_OP_JOINAT)
+ nvc0_insn_delete(b->exit);
+
+ /* remove join operations at the end of the conditional */
+ k = (b->out[0]->out_kind[0] == CFG_EDGE_LOOP_LEAVE) ? 1 : 0;
+ if ((nvi = b->out[0]->out[k]->entry)) {
+ nvi->join = 0;
+ if (nvi->opcode == NV_OP_JOIN)
+ nvc0_insn_delete(nvi);
+ }
+ }
+ }
+ DESCEND_ARBITRARY(k, nv_pass_flatten);
+
+ return 0;
+}
+
+/* Tests instructions for equality, but independently of sources. */
+static boolean
+is_operation_equal(struct nv_instruction *a, struct nv_instruction *b)
+{
+ if (a->opcode != b->opcode)
+ return FALSE;
+ if (nv_is_texture_op(a->opcode)) {
+ if (a->ext.tex.t != b->ext.tex.t ||
+ a->ext.tex.s != b->ext.tex.s)
+ return FALSE;
+ if (a->tex_dim != b->tex_dim ||
+ a->tex_array != b->tex_array ||
+ a->tex_cube != b->tex_cube ||
+ a->tex_shadow != b->tex_shadow ||
+ a->tex_live != b->tex_live)
+ return FALSE;
+ } else
+ if (a->opcode == NV_OP_CVT) {
+ if (a->ext.cvt.s != b->ext.cvt.s ||
+ a->ext.cvt.d != b->ext.cvt.d)
+ return FALSE;
+ } else
+ if (NV_BASEOP(a->opcode) == NV_OP_SET ||
+ NV_BASEOP(a->opcode) == NV_OP_SLCT) {
+ if (a->set_cond != b->set_cond)
+ return FALSE;
+ } else
+ if (a->opcode == NV_OP_LINTERP ||
+ a->opcode == NV_OP_PINTERP) {
+ if (a->centroid != b->centroid ||
+ a->flat != b->flat)
+ return FALSE;
+ }
+ if (a->cc != b->cc)
+ return FALSE;
+ if (a->lanes != b->lanes ||
+ a->patch != b->patch ||
+ a->saturate != b->saturate)
+ return FALSE;
+ if (a->opcode == NV_OP_QUADOP) /* beware quadon ! */
+ return FALSE;
+ return TRUE;
+}
+
+/* local common subexpression elimination, stupid O(n^2) implementation */
+static int
+nv_pass_cse(struct nv_pass *ctx, struct nv_basic_block *b)
+{
+ struct nv_instruction *ir, *ik, *next;
+ struct nv_instruction *entry = b->phi ? b->phi : b->entry;
+ int s, d;
+ unsigned int reps;
+
+ do {
+ reps = 0;
+ for (ir = entry; ir; ir = next) {
+ next = ir->next;
+ if (ir->fixed)
+ continue;
+ for (ik = entry; ik != ir; ik = ik->next) {
+ if (!is_operation_equal(ir, ik))
+ continue;
+ if (!ir->def[0] || !ik->def[0])
+ continue;
+
+ if (ik->indirect != ir->indirect || ik->predicate != ir->predicate)
+ continue;
+
+ for (d = 0; d < 4; ++d) {
+ if ((ir->def[d] ? 1 : 0) != (ik->def[d] ? 1 : 0))
+ break;
+ if (ir->def[d]) {
+ if (!values_equal(ik->def[0], ir->def[0]))
+ break;
+ } else {
+ d = 4;
+ break;
+ }
+ }
+ if (d != 4)
+ continue;
+
+ for (s = 0; s < 5; ++s) {
+ struct nv_value *a, *b;
+
+ if ((ir->src[s] ? 1 : 0) != (ik->src[s] ? 1 : 0))
+ break;
+ if (!ir->src[s]) {
+ s = 5;
+ break;
+ }
+
+ if (ik->src[s]->mod != ir->src[s]->mod)
+ break;
+ a = ik->src[s]->value;
+ b = ir->src[s]->value;
+ if (a == b)
+ continue;
+ if (a->reg.file != b->reg.file ||
+ a->reg.id < 0 || /* this excludes memory loads/stores */
+ a->reg.id != b->reg.id)
+ break;
+ }
+ if (s == 5) {
+ nvc0_insn_delete(ir);
+ for (d = 0; d < 4 && ir->def[d]; ++d)
+ nvc0_pc_replace_value(ctx->pc, ir->def[d], ik->def[d]);
+ ++reps;
+ break;
+ }
+ }
+ }
+ } while(reps);
+
+ DESCEND_ARBITRARY(s, nv_pass_cse);
+
+ return 0;
+}
+
+/* Make sure all sources of an NV_OP_BIND are distinct, they need to occupy
+ * neighbouring registers. CSE might have messed this up.
+ * Just generate a MOV for each source to avoid conflicts if they're used in
+ * multiple NV_OP_BIND at different positions.
+ */
+static int
+nv_pass_fix_bind(struct nv_pass *ctx, struct nv_basic_block *b)
+{
+ struct nv_value *val;
+ struct nv_instruction *bnd, *nvi, *next;
+ int s;
+
+ for (bnd = b->entry; bnd; bnd = next) {
+ next = bnd->next;
+ if (bnd->opcode != NV_OP_BIND)
+ continue;
+ for (s = 0; s < 4 && bnd->src[s]; ++s) {
+ val = bnd->src[s]->value;
+
+ nvi = nv_alloc_instruction(ctx->pc, NV_OP_MOV);
+ nvi->def[0] = new_value_like(ctx->pc, val);
+ nvi->def[0]->insn = nvi;
+ nv_reference(ctx->pc, nvi, 0, val);
+ nv_reference(ctx->pc, bnd, s, nvi->def[0]);
+
+ nvc0_insn_insert_before(bnd, nvi);
+ }
+ }
+ DESCEND_ARBITRARY(s, nv_pass_fix_bind);
+
+ return 0;
+}
+
+static int
+nv_pc_pass0(struct nv_pc *pc, struct nv_basic_block *root)
+{
+ struct pass_reld_elim *reldelim;
+ struct nv_pass pass;
+ struct nv_pass_dce dce;
+ int ret;
+
+ pass.n = 0;
+ pass.pc = pc;
+
+ /* Do CSE so we can just compare values by pointer in subsequent passes. */
+ pc->pass_seq++;
+ ret = nv_pass_cse(&pass, root);
+ if (ret)
+ return ret;
+
+ /* Do this first, so we don't have to pay attention
+ * to whether sources are supported memory loads.
+ */
+ pc->pass_seq++;
+ ret = nv_pass_algebraic_opt(&pass, root);
+ if (ret)
+ return ret;
+
+ pc->pass_seq++;
+ ret = nv_pass_lower_mods(&pass, root);
+ if (ret)
+ return ret;
+
+ pc->pass_seq++;
+ ret = nvc0_pass_fold_loads(&pass, root);
+ if (ret)
+ return ret;
+
+ if (pc->opt_reload_elim) {
+ reldelim = CALLOC_STRUCT(pass_reld_elim);
+ reldelim->pc = pc;
+
+ pc->pass_seq++;
+ ret = nv_pass_reload_elim(reldelim, root);
+ if (ret) {
+ FREE(reldelim);
+ return ret;
+ }
+ memset(reldelim, 0, sizeof(struct pass_reld_elim));
+ reldelim->pc = pc;
+ }
+
+ /* May run DCE before load-combining since that pass will clean up
+ * after itself.
+ */
+ dce.pc = pc;
+ do {
+ dce.removed = 0;
+ pc->pass_seq++;
+ ret = nv_pass_dce(&dce, root);
+ if (ret)
+ return ret;
+ } while (dce.removed);
+
+ if (pc->opt_reload_elim) {
+ pc->pass_seq++;
+ ret = nv_pass_mem_opt(reldelim, root);
+ if (!ret) {
+ memset(reldelim, 0, sizeof(struct pass_reld_elim));
+ reldelim->pc = pc;
+
+ pc->pass_seq++;
+ ret = nv_pass_mem_opt(reldelim, root);
+ }
+ FREE(reldelim);
+ if (ret)
+ return ret;
+ }
+
+ ret = nv_pass_tex_mask(&pass, root);
+ if (ret)
+ return ret;
+
+ pc->pass_seq++;
+ ret = nv_pass_fix_bind(&pass, root);
+
+ return ret;
+}
+
+int
+nvc0_pc_exec_pass0(struct nv_pc *pc)
+{
+ int i, ret;
+
+ for (i = 0; i < pc->num_subroutines + 1; ++i)
+ if (pc->root[i] && (ret = nv_pc_pass0(pc, pc->root[i])))
+ return ret;
+ return 0;
+}
diff --git a/src/gallium/drivers/nvc0/nvc0_pc_print.c b/src/gallium/drivers/nvc0/nvc0_pc_print.c
new file mode 100644
index 00000000000..1f37cb802d7
--- /dev/null
+++ b/src/gallium/drivers/nvc0/nvc0_pc_print.c
@@ -0,0 +1,381 @@
+/*
+ * Copyright 2010 Christoph Bumiller
+ *
+ * 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 "nvc0_pc.h"
+
+#define PRINT(args...) debug_printf(args)
+
+#ifndef ARRAY_SIZE
+#define ARRAY_SIZE(a) (sizeof(a) / sizeof(a[0]))
+#endif
+
+static const char *norm = "\x1b[00m";
+static const char *gree = "\x1b[32m";
+static const char *blue = "\x1b[34m";
+static const char *cyan = "\x1b[36m";
+static const char *yllw = "\x1b[33m";
+static const char *mgta = "\x1b[35m";
+
+static const char *nv_cond_names[] =
+{
+ "never", "lt" , "eq" , "le" , "gt" , "ne" , "ge" , "",
+ "never", "ltu", "equ", "leu", "gtu", "neu", "geu", "",
+ "o", "c", "a", "s"
+};
+
+static const char *nv_modifier_strings[] =
+{
+ "",
+ "neg",
+ "abs",
+ "neg abs",
+ "not",
+ "not neg"
+ "not abs",
+ "not neg abs",
+ "sat",
+ "BAD_MOD"
+};
+
+const char *
+nvc0_opcode_name(uint opcode)
+{
+ return nvc0_op_info_table[MIN2(opcode, NV_OP_COUNT)].name;
+}
+
+static INLINE const char *
+nv_type_name(ubyte type, ubyte size)
+{
+ switch (type) {
+ case NV_TYPE_U16: return "u16";
+ case NV_TYPE_S16: return "s16";
+ case NV_TYPE_F32: return "f32";
+ case NV_TYPE_U32: return "u32";
+ case NV_TYPE_S32: return "s32";
+ case NV_TYPE_P32: return "p32";
+ case NV_TYPE_F64: return "f64";
+ case NV_TYPE_ANY:
+ {
+ switch (size) {
+ case 1: return "b8";
+ case 2: return "b16";
+ case 4: return "b32";
+ case 8: return "b64";
+ case 12: return "b96";
+ case 16: return "b128";
+ default:
+ return "BAD_SIZE";
+ }
+ }
+ default:
+ return "BAD_TYPE";
+ }
+}
+
+static INLINE const char *
+nv_cond_name(ubyte cc)
+{
+ return nv_cond_names[MIN2(cc, 19)];
+}
+
+static INLINE const char *
+nv_modifier_string(ubyte mod)
+{
+ return nv_modifier_strings[MIN2(mod, 9)];
+}
+
+static INLINE int
+nv_value_id(struct nv_value *value)
+{
+ if (value->join->reg.id >= 0)
+ return value->join->reg.id;
+ return value->n;
+}
+
+static INLINE boolean
+nv_value_allocated(struct nv_value *value)
+{
+ return (value->reg.id >= 0) ? TRUE : FALSE;
+}
+
+static INLINE void
+nv_print_address(const char c, int buf, struct nv_value *a, int offset)
+{
+ const char ac = (a && nv_value_allocated(a)) ? '$' : '%';
+ char sg;
+
+ if (offset < 0) {
+ sg = '-';
+ offset = -offset;
+ } else {
+ sg = '+';
+ }
+
+ if (buf >= 0)
+ PRINT(" %s%c%i[", cyan, c, buf);
+ else
+ PRINT(" %s%c[", cyan, c);
+ if (a)
+ PRINT("%s%ca%i%s%c", mgta, ac, nv_value_id(a), cyan, sg);
+ PRINT("%s0x%x%s]", yllw, offset, cyan);
+}
+
+static INLINE void
+nv_print_value(struct nv_value *value, struct nv_value *indir, ubyte type)
+{
+ char reg_pfx = nv_value_allocated(value->join) ? '$' : '%';
+
+ if (value->reg.file != NV_FILE_PRED)
+ PRINT(" %s%s", gree, nv_type_name(type, value->reg.size));
+
+ switch (value->reg.file) {
+ case NV_FILE_GPR:
+ PRINT(" %s%cr%i", blue, reg_pfx, nv_value_id(value));
+ if (value->reg.size == 8)
+ PRINT("d");
+ if (value->reg.size == 16)
+ PRINT("q");
+ break;
+ case NV_FILE_PRED:
+ PRINT(" %s%cp%i", mgta, reg_pfx, nv_value_id(value));
+ break;
+ case NV_FILE_COND:
+ PRINT(" %s%cc%i", mgta, reg_pfx, nv_value_id(value));
+ break;
+ case NV_FILE_MEM_L:
+ nv_print_address('l', -1, indir, value->reg.address);
+ break;
+ case NV_FILE_MEM_G:
+ nv_print_address('g', -1, indir, value->reg.address);
+ break;
+ case NV_FILE_MEM_A:
+ nv_print_address('a', -1, indir, value->reg.address);
+ break;
+ case NV_FILE_MEM_V:
+ nv_print_address('v', -1, indir, value->reg.address);
+ break;
+ case NV_FILE_IMM:
+ switch (type) {
+ case NV_TYPE_U16:
+ case NV_TYPE_S16:
+ PRINT(" %s0x%04x", yllw, value->reg.imm.u32);
+ break;
+ case NV_TYPE_F32:
+ PRINT(" %s%f", yllw, value->reg.imm.f32);
+ break;
+ case NV_TYPE_F64:
+ PRINT(" %s%f", yllw, value->reg.imm.f64);
+ break;
+ case NV_TYPE_U32:
+ case NV_TYPE_S32:
+ case NV_TYPE_P32:
+ case NV_TYPE_ANY:
+ PRINT(" %s0x%08x", yllw, value->reg.imm.u32);
+ break;
+ }
+ break;
+ default:
+ if (value->reg.file >= NV_FILE_MEM_C(0) &&
+ value->reg.file <= NV_FILE_MEM_C(15))
+ nv_print_address('c', value->reg.file - NV_FILE_MEM_C(0), indir,
+ value->reg.address);
+ else
+ NOUVEAU_ERR(" BAD_FILE[%i]", nv_value_id(value));
+ break;
+ }
+}
+
+static INLINE void
+nv_print_ref(struct nv_ref *ref, struct nv_value *indir, ubyte type)
+{
+ nv_print_value(ref->value, indir, type);
+}
+
+void
+nvc0_print_instruction(struct nv_instruction *i)
+{
+ int s;
+
+ PRINT("%i: ", i->serial);
+
+ if (i->predicate >= 0) {
+ PRINT("%s%s", gree, i->cc ? "fl" : "tr");
+ nv_print_ref(i->src[i->predicate], NULL, NV_TYPE_U8);
+ PRINT(" ");
+ }
+
+ PRINT("%s", gree);
+ if (NV_BASEOP(i->opcode) == NV_OP_SET)
+ PRINT("%s %s", nvc0_opcode_name(i->opcode), nv_cond_name(i->set_cond));
+ else
+ if (i->saturate)
+ PRINT("sat %s", nvc0_opcode_name(i->opcode));
+ else
+ PRINT("%s", nvc0_opcode_name(i->opcode));
+
+ if (i->opcode == NV_OP_CVT)
+ nv_print_value(i->def[0], NULL, i->ext.cvt.d);
+ else
+ if (i->def[0])
+ nv_print_value(i->def[0], NULL, NV_OPTYPE(i->opcode));
+ else
+ if (i->target)
+ PRINT(" %s(BB:%i)", yllw, i->target->id);
+ else
+ PRINT(" #");
+
+ for (s = 1; s < 4 && i->def[s]; ++s)
+ nv_print_value(i->def[s], NULL, NV_OPTYPE(i->opcode));
+ if (s > 1)
+ PRINT("%s ,", norm);
+
+ for (s = 0; s < 6 && i->src[s]; ++s) {
+ ubyte type;
+ if (s == i->indirect || s == i->predicate)
+ continue;
+ if (i->opcode == NV_OP_CVT)
+ type = i->ext.cvt.s;
+ else
+ type = NV_OPTYPE(i->opcode);
+
+ if (i->src[s]->mod)
+ PRINT(" %s%s", gree, nv_modifier_string(i->src[s]->mod));
+
+ if (i->indirect >= 0 &&
+ NV_IS_MEMORY_FILE(i->src[s]->value->reg.file))
+ nv_print_ref(i->src[s], i->src[i->indirect]->value, type);
+ else
+ nv_print_ref(i->src[s], NULL, type);
+ }
+ PRINT(" %s\n", norm);
+}
+
+#define NV_MOD_SGN_12 ((NV_MOD_ABS | NV_MOD_NEG) | ((NV_MOD_ABS | NV_MOD_NEG) << 4))
+#define NV_MOD_NEG_123 (NV_MOD_NEG | (NV_MOD_NEG << 4) | (NV_MOD_NEG << 8))
+#define NV_MOD_NEG_3 (NV_MOD_NEG << 8)
+
+#define NV_MOD_SGN NV_MOD_SGN_12
+
+struct nv_op_info nvc0_op_info_table[NV_OP_COUNT + 1] =
+{
+ { NV_OP_UNDEF, "undef", NV_TYPE_ANY, 0, /* fcvpoi */ 0, 0, 0, 0, 1, 0, 0 },
+ { NV_OP_BIND, "bind", NV_TYPE_ANY, 0, /* fcvpoi */ 0, 0, 1, 0, 1, 0, 0 },
+ { NV_OP_MERGE, "merge", NV_TYPE_ANY, 0, /* fcvpoi */ 0, 0, 1, 0, 1, 0, 0 },
+ { NV_OP_PHI, "phi", NV_TYPE_ANY, 0, /* fcvpoi */ 0, 0, 0, 0, 1, 0, 0 },
+ { NV_OP_SELECT, "select", NV_TYPE_ANY, 0, /* fcvpoi */ 0, 0, 0, 0, 1, 0, 0 },
+ { NV_OP_NOP, "nop", NV_TYPE_ANY, 0, /* fcvpoi */ 0, 0, 0, 1, 0, 0, 0 },
+
+ { NV_OP_LD, "ld", NV_TYPE_ANY, 0, 0, 0, 0, 1, 0, 0, 0 },
+ { NV_OP_ST, "st", NV_TYPE_ANY, 0, 0, 0, 0, 1, 0, 0, 0 },
+ { NV_OP_MOV, "mov", NV_TYPE_ANY, 0, 0, 0, 0, 1, 0, 1, 0 },
+ { NV_OP_AND, "and", NV_TYPE_U32, NV_MOD_NOT, 0, 1, 0, 1, 0, 6, 0 },
+ { NV_OP_OR, "or", NV_TYPE_U32, NV_MOD_NOT, 0, 1, 0, 1, 0, 6, 0 },
+ { NV_OP_XOR, "xor", NV_TYPE_U32, NV_MOD_NOT, 0, 1, 0, 1, 0, 6, 0 },
+ { NV_OP_SHL, "shl", NV_TYPE_U32, 0, 0, 0, 0, 1, 0, 1, 0 },
+ { NV_OP_SHR, "shr", NV_TYPE_U32, 0, 0, 0, 0, 1, 0, 1, 0 },
+ { NV_OP_NOT, "not", NV_TYPE_U32, 0, 0, 0, 0, 1, 0, 0, 0 },
+ { NV_OP_SET, "set", NV_TYPE_ANY, NV_MOD_SGN, 0, 0, 0, 1, 0, 0, 0 },
+ { NV_OP_ADD, "add", NV_TYPE_F32, NV_MOD_SGN, 0, 1, 0, 1, 0, 2, 2 },
+ { NV_OP_SUB, "sub", NV_TYPE_F32, NV_MOD_SGN, 0, 0, 0, 1, 0, 2, 2 },
+ { NV_OP_MUL, "mul", NV_TYPE_F32, NV_MOD_NEG_123, 0, 1, 0, 1, 0, 2, 2 },
+ { NV_OP_MAD, "mad", NV_TYPE_F32, NV_MOD_NEG_123, 0, 1, 0, 1, 0, 2, 2 },
+ { NV_OP_ABS, "abs", NV_TYPE_F32, 0, 0, 0, 0, 1, 0, 0, 0 },
+ { NV_OP_NEG, "neg", NV_TYPE_F32, NV_MOD_ABS, 0, 0, 0, 1, 0, 0, 0 },
+ { NV_OP_MAX, "max", NV_TYPE_F32, NV_MOD_SGN, 0, 1, 0, 1, 0, 2, 2 },
+ { NV_OP_MIN, "min", NV_TYPE_F32, NV_MOD_SGN, 0, 1, 0, 1, 0, 2, 2 },
+ { NV_OP_CVT, "cvt", NV_TYPE_ANY, NV_MOD_SGN, 0, 0, 0, 1, 0, 0, 0 },
+
+ { NV_OP_CEIL, "ceil", NV_TYPE_F32, NV_MOD_SGN, 0, 0, 0, 1, 0, 0, 0 },
+ { NV_OP_FLOOR, "floor", NV_TYPE_F32, NV_MOD_SGN, 0, 0, 0, 1, 0, 0, 0 },
+ { NV_OP_TRUNC, "trunc", NV_TYPE_F32, NV_MOD_SGN, 0, 0, 0, 1, 0, 0, 0 },
+
+ { NV_OP_SAD, "sad", NV_TYPE_S32, 0, 0, 1, 0, 1, 0, 0, 0 },
+
+ { NV_OP_VFETCH, "vfetch", NV_TYPE_ANY, 0, 0, 0, 1, 1, 0, 0, 0 },
+ { NV_OP_PFETCH, "pfetch", NV_TYPE_U32, 0, 0, 0, 0, 1, 0, 0, 0 },
+ { NV_OP_EXPORT, "export", NV_TYPE_ANY, 0, 0, 0, 1, 1, 0, 0, 0 },
+ { NV_OP_LINTERP, "linterp", NV_TYPE_F32, 0, 0, 0, 0, 1, 0, 0, 0 },
+ { NV_OP_PINTERP, "pinterp", NV_TYPE_F32, 0, 0, 0, 0, 1, 0, 0, 0 },
+ { NV_OP_EMIT, "emit", NV_TYPE_ANY, 0, 0, 0, 0, 1, 0, 0, 0 },
+ { NV_OP_RESTART, "restart", NV_TYPE_ANY, 0, 0, 0, 0, 1, 0, 0, 0 },
+
+ { NV_OP_TEX, "tex", NV_TYPE_F32, 0, 0, 0, 1, 1, 0, 0, 0 },
+ { NV_OP_TXB, "texbias", NV_TYPE_F32, 0, 0, 0, 1, 1, 0, 0, 0 },
+ { NV_OP_TXL, "texlod", NV_TYPE_F32, 0, 0, 0, 1, 1, 0, 0, 0 },
+ { NV_OP_TXF, "texfetch", NV_TYPE_U32, 0, 0, 0, 1, 1, 0, 0, 0 },
+ { NV_OP_TXQ, "texquery", NV_TYPE_U32, 0, 0, 0, 1, 1, 0, 0, 0 },
+
+ { NV_OP_QUADOP, "quadop", NV_TYPE_F32, 0, 0, 0, 0, 1, 0, 0, 0 },
+ { NV_OP_DFDX, "dfdx", NV_TYPE_F32, 0, 0, 0, 0, 1, 0, 0, 0 },
+ { NV_OP_DFDY, "dfdy", NV_TYPE_F32, 0, 0, 0, 0, 1, 0, 0, 0 },
+
+ { NV_OP_KIL, "kil", NV_TYPE_ANY, 0, 0, 0, 0, 1, 0, 0, 0 },
+ { NV_OP_BRA, "bra", NV_TYPE_ANY, 0, 1, 0, 0, 1, 0, 0, 0 },
+ { NV_OP_CALL, "call", NV_TYPE_ANY, 0, 1, 0, 0, 1, 0, 0, 0 },
+ { NV_OP_RET, "ret", NV_TYPE_ANY, 0, 1, 0, 0, 1, 0, 0, 0 },
+ { NV_OP_RET, "exit", NV_TYPE_ANY, 0, 1, 0, 0, 1, 0, 0, 0 },
+ { NV_OP_NOP, "ud", NV_TYPE_ANY, 0, 1, 0, 0, 1, 0, 0, 0 },
+ { NV_OP_NOP, "ud", NV_TYPE_ANY, 0, 1, 0, 0, 1, 0, 0, 0 },
+
+ { NV_OP_JOINAT, "joinat", NV_TYPE_ANY, 0, 1, 0, 0, 1, 0, 0, 0 },
+ { NV_OP_JOIN, "join", NV_TYPE_ANY, 0, 1, 0, 0, 1, 0, 0, 0 },
+
+ { NV_OP_ADD, "add", NV_TYPE_S32, 0, 0, 1, 0, 1, 0, 1, 0 },
+ { NV_OP_MUL, "mul", NV_TYPE_S32, 0, 0, 1, 0, 1, 0, 1, 0 },
+ { NV_OP_ABS, "abs", NV_TYPE_S32, 0, 0, 0, 0, 1, 0, 0, 0 },
+ { NV_OP_NEG, "neg", NV_TYPE_S32, 0, 0, 0, 0, 1, 0, 0, 0 },
+ { NV_OP_MAX, "max", NV_TYPE_S32, 0, 0, 1, 0, 1, 0, 0, 0 },
+ { NV_OP_MIN, "max", NV_TYPE_U32, 0, 0, 1, 0, 1, 0, 0, 0 },
+ { NV_OP_MAX, "min", NV_TYPE_S32, 0, 0, 1, 0, 1, 0, 0, 0 },
+ { NV_OP_MIN, "min", NV_TYPE_U32, 0, 0, 1, 0, 1, 0, 0, 0 },
+ { NV_OP_SET, "set", NV_TYPE_F32, NV_MOD_SGN, 0, 0, 0, 1, 0, 2, 2 },
+ { NV_OP_SET, "set", NV_TYPE_S32, 0, 0, 0, 0, 1, 0, 2, 2 },
+ { NV_OP_SET, "set", NV_TYPE_U32, 0, 0, 0, 0, 1, 0, 2, 2 },
+ { NV_OP_SHR, "sar", NV_TYPE_S32, 0, 0, 0, 0, 1, 0, 1, 0 },
+ { NV_OP_RCP, "rcp", NV_TYPE_F32, NV_MOD_SGN, 0, 0, 0, 1, 0, 0, 0 },
+ { NV_OP_RSQ, "rsqrt", NV_TYPE_F32, NV_MOD_SGN, 0, 0, 0, 1, 0, 0, 0 },
+ { NV_OP_LG2, "lg2", NV_TYPE_F32, NV_MOD_SGN, 0, 0, 0, 1, 0, 0, 0 },
+ { NV_OP_SIN, "sin", NV_TYPE_F32, 0, 0, 0, 0, 1, 0, 0, 0 },
+ { NV_OP_COS, "cos", NV_TYPE_F32, 0, 0, 0, 0, 1, 0, 0, 0 },
+ { NV_OP_EX2, "ex2", NV_TYPE_F32, 0, 0, 0, 0, 1, 0, 0, 0 },
+ { NV_OP_PRESIN, "presin", NV_TYPE_F32, NV_MOD_SGN, 0, 0, 0, 1, 0, 0, 1 },
+ { NV_OP_PREEX2, "preex2", NV_TYPE_F32, NV_MOD_SGN, 0, 0, 0, 1, 0, 0, 1 },
+ { NV_OP_SAT, "sat", NV_TYPE_F32, 0, 0, 0, 0, 1, 0, 0, 0 },
+
+ { NV_OP_SET_F32_AND, "and set", NV_TYPE_F32, 0, 0, 0, 0, 1, 0, 0, 0 },
+ { NV_OP_SET_F32_OR, "or set", NV_TYPE_F32, 0, 0, 0, 0, 1, 0, 0, 0 },
+ { NV_OP_SET_F32_XOR, "xor set", NV_TYPE_F32, 0, 0, 0, 0, 1, 0, 0, 0 },
+
+ { NV_OP_SELP, "selp", NV_TYPE_U32, 0, 0, 0, 0, 1, 0, 0, 0 },
+
+ { NV_OP_SLCT, "slct", NV_TYPE_F32, NV_MOD_NEG_3, 0, 0, 0, 1, 0, 2, 2 },
+ { NV_OP_SLCT, "slct", NV_TYPE_S32, NV_MOD_NEG_3, 0, 0, 0, 1, 0, 2, 2 },
+ { NV_OP_SLCT, "slct", NV_TYPE_U32, NV_MOD_NEG_3, 0, 0, 0, 1, 0, 2, 2 },
+
+ { NV_OP_ADD, "sub", NV_TYPE_F32, 0, 0, 0, 0, 1, 0, 1, 0 },
+
+ { NV_OP_SET, "fset", NV_TYPE_F32, NV_MOD_SGN, 0, 0, 0, 1, 0, 2, 2 },
+
+ { NV_OP_TXG, "texgrad", NV_TYPE_F32, 0, 0, 0, 1, 1, 0, 0, 0 },
+
+ { NV_OP_UNDEF, "BAD_OP", NV_TYPE_ANY, 0, 0, 0, 0, 0, 0, 0, 0 }
+};
diff --git a/src/gallium/drivers/nvc0/nvc0_pc_regalloc.c b/src/gallium/drivers/nvc0/nvc0_pc_regalloc.c
new file mode 100644
index 00000000000..f4afe083e2d
--- /dev/null
+++ b/src/gallium/drivers/nvc0/nvc0_pc_regalloc.c
@@ -0,0 +1,1051 @@
+/*
+ * Copyright 2010 Christoph Bumiller
+ *
+ * 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.
+ */
+
+#define NOUVEAU_DEBUG 1
+
+/* #define NVC0_RA_DEBUG_LIVEI */
+/* #define NVC0_RA_DEBUG_LIVE_SETS */
+/* #define NVC0_RA_DEBUG_JOIN */
+
+#include "nvc0_pc.h"
+#include "util/u_simple_list.h"
+
+#define NVC0_NUM_REGISTER_FILES 3
+
+/* @unit_shift: log2 of min allocation unit for register */
+struct register_set {
+ uint32_t bits[NVC0_NUM_REGISTER_FILES][2];
+ uint32_t last[NVC0_NUM_REGISTER_FILES];
+ int log2_unit[NVC0_NUM_REGISTER_FILES];
+ struct nv_pc *pc;
+};
+
+/* aliasing is allowed */
+static void
+intersect_register_sets(struct register_set *dst,
+ struct register_set *src1, struct register_set *src2)
+{
+ int i;
+
+ for (i = 0; i < NVC0_NUM_REGISTER_FILES; ++i) {
+ dst->bits[i][0] = src1->bits[i][0] | src2->bits[i][0];
+ dst->bits[i][1] = src1->bits[i][1] | src2->bits[i][1];
+ }
+}
+
+static void
+mask_register_set(struct register_set *set, uint32_t mask, uint32_t umask)
+{
+ int i;
+
+ for (i = 0; i < NVC0_NUM_REGISTER_FILES; ++i) {
+ set->bits[i][0] = (set->bits[i][0] | mask) & umask;
+ set->bits[i][1] = (set->bits[i][1] | mask) & umask;
+ }
+}
+
+struct nv_pc_pass {
+ struct nv_pc *pc;
+ struct nv_instruction **insns;
+ uint num_insns;
+ uint pass_seq;
+};
+
+static void
+ranges_coalesce(struct nv_range *range)
+{
+ while (range->next && range->end >= range->next->bgn) {
+ struct nv_range *rnn = range->next->next;
+ assert(range->bgn <= range->next->bgn);
+ range->end = MAX2(range->end, range->next->end);
+ FREE(range->next);
+ range->next = rnn;
+ }
+}
+
+static boolean
+add_range_ex(struct nv_value *val, int bgn, int end, struct nv_range *new_range)
+{
+ struct nv_range *range, **nextp = &val->livei;
+
+ if (bgn == end) /* [a, a) is invalid / empty */
+ return TRUE;
+
+ for (range = val->livei; range; range = range->next) {
+ if (end < range->bgn)
+ break; /* insert before */
+
+ if (bgn > range->end) {
+ nextp = &range->next;
+ continue; /* insert after */
+ }
+
+ /* overlap */
+ if (bgn < range->bgn) {
+ range->bgn = bgn;
+ if (end > range->end)
+ range->end = end;
+ ranges_coalesce(range);
+ return TRUE;
+ }
+ if (end > range->end) {
+ range->end = end;
+ ranges_coalesce(range);
+ return TRUE;
+ }
+ assert(bgn >= range->bgn);
+ assert(end <= range->end);
+ return TRUE;
+ }
+
+ if (!new_range)
+ new_range = CALLOC_STRUCT(nv_range);
+
+ new_range->bgn = bgn;
+ new_range->end = end;
+ new_range->next = range;
+ *(nextp) = new_range;
+ return FALSE;
+}
+
+static void
+add_range(struct nv_value *val, struct nv_basic_block *b, int end)
+{
+ int bgn;
+
+ if (!val->insn) /* ignore non-def values */
+ return;
+ assert(b->entry->serial <= b->exit->serial);
+ assert(b->phi->serial <= end);
+ assert(b->exit->serial + 1 >= end);
+
+ bgn = val->insn->serial;
+ if (bgn < b->entry->serial || bgn > b->exit->serial)
+ bgn = b->entry->serial;
+
+ assert(bgn <= end);
+
+ add_range_ex(val, bgn, end, NULL);
+}
+
+#if defined(NVC0_RA_DEBUG_JOIN) || defined(NVC0_RA_DEBUG_LIVEI)
+static void
+livei_print(struct nv_value *a)
+{
+ struct nv_range *r = a->livei;
+
+ debug_printf("livei %i: ", a->n);
+ while (r) {
+ debug_printf("[%i, %i) ", r->bgn, r->end);
+ r = r->next;
+ }
+ debug_printf("\n");
+}
+#endif
+
+static void
+livei_unify(struct nv_value *dst, struct nv_value *src)
+{
+ struct nv_range *range, *next;
+
+ for (range = src->livei; range; range = next) {
+ next = range->next;
+ if (add_range_ex(dst, range->bgn, range->end, range))
+ FREE(range);
+ }
+ src->livei = NULL;
+}
+
+static void
+livei_release(struct nv_value *val)
+{
+ struct nv_range *range, *next;
+
+ for (range = val->livei; range; range = next) {
+ next = range->next;
+ FREE(range);
+ }
+}
+
+static boolean
+livei_have_overlap(struct nv_value *a, struct nv_value *b)
+{
+ struct nv_range *r_a, *r_b;
+
+ for (r_a = a->livei; r_a; r_a = r_a->next) {
+ for (r_b = b->livei; r_b; r_b = r_b->next) {
+ if (r_b->bgn < r_a->end &&
+ r_b->end > r_a->bgn)
+ return TRUE;
+ }
+ }
+ return FALSE;
+}
+
+static int
+livei_end(struct nv_value *a)
+{
+ struct nv_range *r = a->livei;
+
+ assert(r);
+ while (r->next)
+ r = r->next;
+ return r->end;
+}
+
+static boolean
+livei_contains(struct nv_value *a, int pos)
+{
+ struct nv_range *r;
+
+ for (r = a->livei; r && r->bgn <= pos; r = r->next)
+ if (r->end > pos)
+ return TRUE;
+ return FALSE;
+}
+
+static boolean
+reg_assign(struct register_set *set, struct nv_value **def, int n)
+{
+ int i, id, s, k;
+ uint32_t m;
+ int f = def[0]->reg.file;
+
+ k = n;
+ if (k == 3)
+ k = 4;
+ s = (k * def[0]->reg.size) >> set->log2_unit[f];
+ m = (1 << s) - 1;
+
+ id = set->last[f];
+
+ for (i = 0; i * 32 < set->last[f]; ++i) {
+ if (set->bits[f][i] == 0xffffffff)
+ continue;
+
+ for (id = 0; id < 32; id += s)
+ if (!(set->bits[f][i] & (m << id)))
+ break;
+ if (id < 32)
+ break;
+ }
+ if (i * 32 + id > set->last[f])
+ return FALSE;
+
+ set->bits[f][i] |= m << id;
+
+ id += i * 32;
+
+ set->pc->max_reg[f] = MAX2(set->pc->max_reg[f], id + s - 1);
+
+ for (i = 0; i < n; ++i)
+ if (def[i]->livei)
+ def[i]->reg.id = id++;
+
+ return TRUE;
+}
+
+static INLINE void
+reg_occupy(struct register_set *set, struct nv_value *val)
+{
+ int id = val->reg.id, f = val->reg.file;
+ uint32_t m;
+
+ if (id < 0)
+ return;
+ m = (1 << (val->reg.size >> set->log2_unit[f])) - 1;
+
+ set->bits[f][id / 32] |= m << (id % 32);
+
+ if (set->pc->max_reg[f] < id)
+ set->pc->max_reg[f] = id;
+}
+
+static INLINE void
+reg_release(struct register_set *set, struct nv_value *val)
+{
+ int id = val->reg.id, f = val->reg.file;
+ uint32_t m;
+
+ if (id < 0)
+ return;
+ m = (1 << (val->reg.size >> set->log2_unit[f])) - 1;
+
+ set->bits[f][id / 32] &= ~(m << (id % 32));
+}
+
+static INLINE boolean
+join_allowed(struct nv_pc_pass *ctx, struct nv_value *a, struct nv_value *b)
+{
+ int i;
+ struct nv_value *val;
+
+ if (a->reg.file != b->reg.file || a->reg.size != b->reg.size)
+ return FALSE;
+
+ if (a->join->reg.id == b->join->reg.id)
+ return TRUE;
+
+ /* either a or b or both have been assigned */
+
+ if (a->join->reg.id >= 0 && b->join->reg.id >= 0)
+ return FALSE;
+ else
+ if (b->join->reg.id >= 0) {
+ if (b->join->reg.id == 63)
+ return FALSE;
+ val = a;
+ a = b;
+ b = val;
+ } else
+ if (a->join->reg.id == 63)
+ return FALSE;
+
+ for (i = 0; i < ctx->pc->num_values; ++i) {
+ val = &ctx->pc->values[i];
+
+ if (val->join->reg.id != a->join->reg.id)
+ continue;
+ if (val->join != a->join && livei_have_overlap(val->join, b->join))
+ return FALSE;
+ }
+ return TRUE;
+}
+
+static INLINE void
+do_join_values(struct nv_pc_pass *ctx, struct nv_value *a, struct nv_value *b)
+{
+ int j;
+ struct nv_value *bjoin = b->join;
+
+ if (b->join->reg.id >= 0)
+ a->join->reg.id = b->join->reg.id;
+
+ livei_unify(a->join, b->join);
+
+#ifdef NVC0_RA_DEBUG_JOIN
+ debug_printf("joining %i to %i\n", b->n, a->n);
+#endif
+
+ /* make a->join the new representative */
+ for (j = 0; j < ctx->pc->num_values; ++j)
+ if (ctx->pc->values[j].join == bjoin)
+ ctx->pc->values[j].join = a->join;
+
+ assert(b->join == a->join);
+}
+
+static INLINE boolean
+try_join_values(struct nv_pc_pass *ctx, struct nv_value *a, struct nv_value *b)
+{
+ if (!join_allowed(ctx, a, b)) {
+#ifdef NVC0_RA_DEBUG_JOIN
+ debug_printf("cannot join %i to %i: not allowed\n", b->n, a->n);
+#endif
+ return FALSE;
+ }
+ if (livei_have_overlap(a->join, b->join)) {
+#ifdef NVC0_RA_DEBUG_JOIN
+ debug_printf("cannot join %i to %i: livei overlap\n", b->n, a->n);
+ livei_print(a);
+ livei_print(b);
+#endif
+ return FALSE;
+ }
+
+ do_join_values(ctx, a, b);
+
+ return TRUE;
+}
+
+static void
+join_values_nofail(struct nv_pc_pass *ctx,
+ struct nv_value *a, struct nv_value *b, boolean type_only)
+{
+ if (type_only) {
+ assert(join_allowed(ctx, a, b));
+ do_join_values(ctx, a, b);
+ } else {
+ boolean ok = try_join_values(ctx, a, b);
+ if (!ok) {
+ NOUVEAU_ERR("failed to coalesce values\n");
+ }
+ }
+}
+
+static INLINE boolean
+need_new_else_block(struct nv_basic_block *b, struct nv_basic_block *p)
+{
+ int i = 0, n = 0;
+
+ for (; i < 2; ++i)
+ if (p->out[i] && !IS_LOOP_EDGE(p->out_kind[i]))
+ ++n;
+
+ return (b->num_in > 1) && (n == 2);
+}
+
+/* Look for the @phi's operand whose definition reaches @b. */
+static int
+phi_opnd_for_bb(struct nv_instruction *phi, struct nv_basic_block *b,
+ struct nv_basic_block *tb)
+{
+ struct nv_ref *srci, *srcj;
+ int i, j;
+
+ for (j = -1, i = 0; i < 6 && phi->src[i]; ++i) {
+ srci = phi->src[i];
+ /* if already replaced, check with original source first */
+ if (srci->flags & NV_REF_FLAG_REGALLOC_PRIV)
+ srci = srci->value->insn->src[0];
+ if (!nvc0_bblock_reachable_by(b, srci->value->insn->bb, NULL))
+ continue;
+ /* NOTE: back-edges are ignored by the reachable-by check */
+ if (j < 0 || !nvc0_bblock_reachable_by(srcj->value->insn->bb,
+ srci->value->insn->bb, NULL)) {
+ j = i;
+ srcj = srci;
+ }
+ }
+ if (j >= 0 && nvc0_bblock_reachable_by(b, phi->def[0]->insn->bb, NULL))
+ if (!nvc0_bblock_reachable_by(srcj->value->insn->bb,
+ phi->def[0]->insn->bb, NULL))
+ j = -1;
+ return j;
+}
+
+/* For each operand of each PHI in b, generate a new value by inserting a MOV
+ * at the end of the block it is coming from and replace the operand with its
+ * result. This eliminates liveness conflicts and enables us to let values be
+ * copied to the right register if such a conflict exists nonetheless.
+ *
+ * These MOVs are also crucial in making sure the live intervals of phi srces
+ * are extended until the end of the loop, since they are not included in the
+ * live-in sets.
+ */
+static int
+pass_generate_phi_movs(struct nv_pc_pass *ctx, struct nv_basic_block *b)
+{
+ struct nv_instruction *i, *ni;
+ struct nv_value *val;
+ struct nv_basic_block *p, *pn;
+ int n, j;
+
+ b->pass_seq = ctx->pc->pass_seq;
+
+ for (n = 0; n < b->num_in; ++n) {
+ p = pn = b->in[n];
+ assert(p);
+
+ if (need_new_else_block(b, p)) {
+ pn = new_basic_block(ctx->pc);
+
+ if (p->out[0] == b)
+ p->out[0] = pn;
+ else
+ p->out[1] = pn;
+
+ if (p->exit->target == b) /* target to new else-block */
+ p->exit->target = pn;
+
+ b->in[n] = pn;
+
+ pn->out[0] = b;
+ pn->in[0] = p;
+ pn->num_in = 1;
+ }
+ ctx->pc->current_block = pn;
+
+ for (i = b->phi; i && i->opcode == NV_OP_PHI; i = i->next) {
+ j = phi_opnd_for_bb(i, p, b);
+
+ if (j < 0) {
+ val = i->def[0];
+ } else {
+ val = i->src[j]->value;
+ if (i->src[j]->flags & NV_REF_FLAG_REGALLOC_PRIV) {
+ j = -1;
+ /* use original value, we already encountered & replaced it */
+ val = val->insn->src[0]->value;
+ }
+ }
+ if (j < 0) /* need an additional source ? */
+ for (j = 0; j < 6 && i->src[j] && i->src[j]->value != val; ++j);
+ assert(j < 6); /* XXX: really ugly shaders */
+
+ ni = new_instruction(ctx->pc, NV_OP_MOV);
+ if (ni->prev && ni->prev->target)
+ nvc0_insns_permute(ni->prev, ni);
+
+ ni->def[0] = new_value_like(ctx->pc, val);
+ ni->def[0]->insn = ni;
+ nv_reference(ctx->pc, ni, 0, val);
+ nv_reference(ctx->pc, i, j, ni->def[0]); /* new phi source = MOV def */
+ i->src[j]->flags |= NV_REF_FLAG_REGALLOC_PRIV;
+ }
+
+ if (pn != p && pn->exit) {
+ ctx->pc->current_block = b->in[n ? 0 : 1];
+ ni = new_instruction(ctx->pc, NV_OP_BRA);
+ ni->target = b;
+ ni->terminator = 1;
+ }
+ }
+
+ for (j = 0; j < 2; ++j)
+ if (b->out[j] && b->out[j]->pass_seq < ctx->pc->pass_seq)
+ pass_generate_phi_movs(ctx, b->out[j]);
+
+ return 0;
+}
+
+#define JOIN_MASK_PHI (1 << 0)
+#define JOIN_MASK_SELECT (1 << 1)
+#define JOIN_MASK_MOV (1 << 2)
+#define JOIN_MASK_BIND (1 << 3)
+
+static int
+pass_join_values(struct nv_pc_pass *ctx, unsigned mask)
+{
+ int c, n;
+
+ for (n = 0; n < ctx->num_insns; ++n) {
+ struct nv_instruction *i = ctx->insns[n];
+
+ switch (i->opcode) {
+ case NV_OP_PHI:
+ if (!(mask & JOIN_MASK_PHI))
+ break;
+ for (c = 0; c < 6 && i->src[c]; ++c)
+ join_values_nofail(ctx, i->def[0], i->src[c]->value, FALSE);
+ break;
+ case NV_OP_MOV:
+ if (!(mask & JOIN_MASK_MOV))
+ break;
+ if (i->src[0]->value->insn && !i->src[0]->value->insn->def[1])
+ try_join_values(ctx, i->def[0], i->src[0]->value);
+ break;
+ case NV_OP_SELECT:
+ if (!(mask & JOIN_MASK_SELECT))
+ break;
+ for (c = 0; c < 6 && i->src[c]; ++c)
+ join_values_nofail(ctx, i->def[0], i->src[c]->value, TRUE);
+ break;
+ case NV_OP_BIND:
+ if (!(mask & JOIN_MASK_BIND))
+ break;
+ for (c = 0; c < 4 && i->src[c]; ++c)
+ join_values_nofail(ctx, i->def[c], i->src[c]->value, TRUE);
+ break;
+ case NV_OP_TEX:
+ case NV_OP_TXB:
+ case NV_OP_TXL:
+ case NV_OP_TXQ: /* on nvc0, TEX src and dst can differ */
+ default:
+ break;
+ }
+ }
+ return 0;
+}
+
+/* Order the instructions so that live intervals can be expressed in numbers. */
+static void
+pass_order_instructions(void *priv, struct nv_basic_block *b)
+{
+ struct nv_pc_pass *ctx = (struct nv_pc_pass *)priv;
+ struct nv_instruction *i;
+
+ b->pass_seq = ctx->pc->pass_seq;
+
+ assert(!b->exit || !b->exit->next);
+ for (i = b->phi; i; i = i->next) {
+ i->serial = ctx->num_insns;
+ ctx->insns[ctx->num_insns++] = i;
+ }
+}
+
+static void
+bb_live_set_print(struct nv_pc *pc, struct nv_basic_block *b)
+{
+#ifdef NVC0_RA_DEBUG_LIVE_SETS
+ struct nv_value *val;
+ int j;
+
+ debug_printf("LIVE-INs of BB:%i: ", b->id);
+
+ for (j = 0; j < pc->num_values; ++j) {
+ if (!(b->live_set[j / 32] & (1 << (j % 32))))
+ continue;
+ val = &pc->values[j];
+ if (!val->insn)
+ continue;
+ debug_printf("%i ", val->n);
+ }
+ debug_printf("\n");
+#endif
+}
+
+static INLINE void
+live_set_add(struct nv_basic_block *b, struct nv_value *val)
+{
+ if (!val->insn) /* don't add non-def values */
+ return;
+ b->live_set[val->n / 32] |= 1 << (val->n % 32);
+}
+
+static INLINE void
+live_set_rem(struct nv_basic_block *b, struct nv_value *val)
+{
+ b->live_set[val->n / 32] &= ~(1 << (val->n % 32));
+}
+
+static INLINE boolean
+live_set_test(struct nv_basic_block *b, struct nv_ref *ref)
+{
+ int n = ref->value->n;
+ return b->live_set[n / 32] & (1 << (n % 32));
+}
+
+/* The live set of a block contains those values that are live immediately
+ * before the beginning of the block, so do a backwards scan.
+ */
+static int
+pass_build_live_sets(struct nv_pc_pass *ctx, struct nv_basic_block *b)
+{
+ struct nv_instruction *i;
+ int j, n, ret = 0;
+
+ if (b->pass_seq >= ctx->pc->pass_seq)
+ return 0;
+ b->pass_seq = ctx->pc->pass_seq;
+
+ /* slight hack for undecidedness: set phi = entry if it's undefined */
+ if (!b->phi)
+ b->phi = b->entry;
+
+ for (n = 0; n < 2; ++n) {
+ if (!b->out[n] || b->out[n] == b)
+ continue;
+ ret = pass_build_live_sets(ctx, b->out[n]);
+ if (ret)
+ return ret;
+
+ if (n == 0) {
+ for (j = 0; j < (ctx->pc->num_values + 31) / 32; ++j)
+ b->live_set[j] = b->out[n]->live_set[j];
+ } else {
+ for (j = 0; j < (ctx->pc->num_values + 31) / 32; ++j)
+ b->live_set[j] |= b->out[n]->live_set[j];
+ }
+ }
+
+ if (!b->entry)
+ return 0;
+
+ bb_live_set_print(ctx->pc, b);
+
+ for (i = b->exit; i != b->entry->prev; i = i->prev) {
+ for (j = 0; j < 5 && i->def[j]; j++)
+ live_set_rem(b, i->def[j]);
+ for (j = 0; j < 6 && i->src[j]; j++)
+ live_set_add(b, i->src[j]->value);
+ }
+ for (i = b->phi; i && i->opcode == NV_OP_PHI; i = i->next)
+ live_set_rem(b, i->def[0]);
+
+ bb_live_set_print(ctx->pc, b);
+
+ return 0;
+}
+
+static void collect_live_values(struct nv_basic_block *b, const int n)
+{
+ int i;
+
+ /* XXX: what to do about back/fake-edges (used to include both here) ? */
+ if (b->out[0] && b->out_kind[0] != CFG_EDGE_FAKE) {
+ if (b->out[1] && b->out_kind[1] != CFG_EDGE_FAKE) {
+ for (i = 0; i < n; ++i)
+ b->live_set[i] = b->out[0]->live_set[i] | b->out[1]->live_set[i];
+ } else {
+ memcpy(b->live_set, b->out[0]->live_set, n * sizeof(uint32_t));
+ }
+ } else
+ if (b->out[1] && b->out_kind[1] != CFG_EDGE_FAKE) {
+ memcpy(b->live_set, b->out[1]->live_set, n * sizeof(uint32_t));
+ } else {
+ memset(b->live_set, 0, n * sizeof(uint32_t));
+ }
+}
+
+/* NOTE: the live intervals of phi functions start at the first non-phi insn. */
+static int
+pass_build_intervals(struct nv_pc_pass *ctx, struct nv_basic_block *b)
+{
+ struct nv_instruction *i, *i_stop;
+ int j, s;
+ const int n = (ctx->pc->num_values + 31) / 32;
+
+ /* verify that first block does not have live-in values */
+ if (b->num_in == 0)
+ for (j = 0; j < n; ++j)
+ assert(b->live_set[j] == 0);
+
+ collect_live_values(b, n);
+
+ /* remove live-outs def'd in a parallel block, hopefully they're all phi'd */
+ for (j = 0; j < 2; ++j) {
+ if (!b->out[j] || !b->out[j]->phi)
+ continue;
+ for (i = b->out[j]->phi; i->opcode == NV_OP_PHI; i = i->next) {
+ live_set_rem(b, i->def[0]);
+
+ for (s = 0; s < 6 && i->src[s]; ++s) {
+ assert(i->src[s]->value->insn);
+ if (nvc0_bblock_reachable_by(b, i->src[s]->value->insn->bb,
+ b->out[j]))
+ live_set_add(b, i->src[s]->value);
+ else
+ live_set_rem(b, i->src[s]->value);
+ }
+ }
+ }
+
+ /* remaining live-outs are live until the end */
+ if (b->exit) {
+ for (j = 0; j < ctx->pc->num_values; ++j) {
+ if (!(b->live_set[j / 32] & (1 << (j % 32))))
+ continue;
+ add_range(&ctx->pc->values[j], b, b->exit->serial + 1);
+#ifdef NVC0_RA_DEBUG_LIVEI
+ debug_printf("adding range for live value %i: ", j);
+ livei_print(&ctx->pc->values[j]);
+#endif
+ }
+ }
+
+ i_stop = b->entry ? b->entry->prev : NULL;
+
+ /* don't have to include phi functions here (will have 0 live range) */
+ for (i = b->exit; i != i_stop; i = i->prev) {
+ assert(i->serial >= b->phi->serial && i->serial <= b->exit->serial);
+ for (j = 0; j < 4 && i->def[j]; ++j)
+ live_set_rem(b, i->def[j]);
+
+ for (j = 0; j < 6 && i->src[j]; ++j) {
+ if (!live_set_test(b, i->src[j])) {
+ live_set_add(b, i->src[j]->value);
+ add_range(i->src[j]->value, b, i->serial);
+#ifdef NVC0_RA_DEBUG_LIVEI
+ debug_printf("adding range for source %i (ends living): ",
+ i->src[j]->value->n);
+ livei_print(i->src[j]->value);
+#endif
+ }
+ }
+ }
+
+ b->pass_seq = ctx->pc->pass_seq;
+
+ if (b->out[0] && b->out[0]->pass_seq < ctx->pc->pass_seq)
+ pass_build_intervals(ctx, b->out[0]);
+
+ if (b->out[1] && b->out[1]->pass_seq < ctx->pc->pass_seq)
+ pass_build_intervals(ctx, b->out[1]);
+
+ return 0;
+}
+
+static INLINE void
+nvc0_ctor_register_set(struct nv_pc *pc, struct register_set *set)
+{
+ memset(set, 0, sizeof(*set));
+
+ set->last[NV_FILE_GPR] = 62;
+ set->last[NV_FILE_PRED] = 6;
+ set->last[NV_FILE_COND] = 1;
+
+ set->log2_unit[NV_FILE_GPR] = 2;
+ set->log2_unit[NV_FILE_COND] = 0;
+ set->log2_unit[NV_FILE_PRED] = 0;
+
+ set->pc = pc;
+}
+
+static void
+insert_ordered_tail(struct nv_value *list, struct nv_value *nval)
+{
+ struct nv_value *elem;
+
+ for (elem = list->prev;
+ elem != list && elem->livei->bgn > nval->livei->bgn;
+ elem = elem->prev);
+ /* now elem begins before or at the same time as val */
+
+ nval->prev = elem;
+ nval->next = elem->next;
+ elem->next->prev = nval;
+ elem->next = nval;
+}
+
+static void
+collect_register_values(struct nv_pc_pass *ctx, struct nv_value *head,
+ boolean assigned_only)
+{
+ struct nv_value *val;
+ int k, n;
+
+ make_empty_list(head);
+
+ for (n = 0; n < ctx->num_insns; ++n) {
+ struct nv_instruction *i = ctx->insns[n];
+
+ /* for joined values, only the representative will have livei != NULL */
+ for (k = 0; k < 5; ++k) {
+ if (i->def[k] && i->def[k]->livei)
+ if (!assigned_only || i->def[k]->reg.id >= 0)
+ insert_ordered_tail(head, i->def[k]);
+ }
+ }
+
+ for (val = head->next; val != head->prev; val = val->next) {
+ assert(val->join == val);
+ assert(val->livei->bgn <= val->next->livei->bgn);
+ }
+}
+
+static int
+pass_linear_scan(struct nv_pc_pass *ctx)
+{
+ struct register_set f, free;
+ struct nv_value *cur, *val, *tmp[2];
+ struct nv_value active, inactive, handled, unhandled;
+
+ make_empty_list(&active);
+ make_empty_list(&inactive);
+ make_empty_list(&handled);
+
+ nvc0_ctor_register_set(ctx->pc, &free);
+
+ collect_register_values(ctx, &unhandled, FALSE);
+
+ foreach_s(cur, tmp[0], &unhandled) {
+ remove_from_list(cur);
+
+ foreach_s(val, tmp[1], &active) {
+ if (livei_end(val) <= cur->livei->bgn) {
+ reg_release(&free, val);
+ move_to_head(&handled, val);
+ } else
+ if (!livei_contains(val, cur->livei->bgn)) {
+ reg_release(&free, val);
+ move_to_head(&inactive, val);
+ }
+ }
+
+ foreach_s(val, tmp[1], &inactive) {
+ if (livei_end(val) <= cur->livei->bgn)
+ move_to_head(&handled, val);
+ else
+ if (livei_contains(val, cur->livei->bgn)) {
+ reg_occupy(&free, val);
+ move_to_head(&active, val);
+ }
+ }
+
+ f = free;
+
+ foreach(val, &inactive)
+ if (livei_have_overlap(val, cur))
+ reg_occupy(&f, val);
+
+ foreach(val, &unhandled)
+ if (val->reg.id >= 0 && livei_have_overlap(val, cur))
+ reg_occupy(&f, val);
+
+ if (cur->reg.id < 0) {
+ boolean mem = !reg_assign(&f, &cur, 1);
+
+ if (mem) {
+ NOUVEAU_ERR("out of registers\n");
+ abort();
+ }
+ }
+ insert_at_head(&active, cur);
+ reg_occupy(&free, cur);
+ }
+
+ return 0;
+}
+
+/* Allocate values defined by instructions such as TEX, which have to be
+ * assigned to consecutive registers.
+ * Linear scan doesn't really work here since the values can have different
+ * live intervals.
+ */
+static int
+pass_allocate_constrained_values(struct nv_pc_pass *ctx)
+{
+ struct nv_value regvals, *val;
+ struct nv_instruction *i;
+ struct nv_value *defs[4];
+ struct register_set regs[4];
+ int n, vsize, c;
+ uint32_t mask;
+ boolean mem;
+
+ collect_register_values(ctx, &regvals, TRUE);
+
+ for (n = 0; n < ctx->num_insns; ++n) {
+ i = ctx->insns[n];
+ vsize = nvi_vector_size(i);
+ if (!(vsize > 1))
+ continue;
+ assert(vsize <= 4);
+
+ for (c = 0; c < vsize; ++c)
+ defs[c] = i->def[c]->join;
+
+ if (defs[0]->reg.id >= 0) {
+ for (c = 1; c < vsize; ++c)
+ assert(defs[c]->reg.id >= 0);
+ continue;
+ }
+
+ for (c = 0; c < vsize; ++c) {
+ nvc0_ctor_register_set(ctx->pc, &regs[c]);
+
+ foreach(val, &regvals) {
+ if (val->reg.id >= 0 && livei_have_overlap(val, defs[c]))
+ reg_occupy(&regs[c], val);
+ }
+ mask = 0x11111111;
+ if (vsize == 2) /* granularity is 2 and not 4 */
+ mask |= 0x11111111 << 2;
+ mask_register_set(&regs[c], 0, mask << c);
+
+ if (defs[c]->livei)
+ insert_ordered_tail(&regvals, defs[c]);
+ }
+ for (c = 1; c < vsize; ++c)
+ intersect_register_sets(&regs[0], &regs[0], &regs[c]);
+
+ mem = !reg_assign(&regs[0], &defs[0], vsize);
+
+ if (mem) {
+ NOUVEAU_ERR("out of registers\n");
+ abort();
+ }
+ }
+ return 0;
+}
+
+static int
+nv_pc_pass1(struct nv_pc *pc, struct nv_basic_block *root)
+{
+ struct nv_pc_pass *ctx;
+ int i, ret;
+
+ NOUVEAU_DBG("REGISTER ALLOCATION - entering\n");
+
+ ctx = CALLOC_STRUCT(nv_pc_pass);
+ if (!ctx)
+ return -1;
+ ctx->pc = pc;
+
+ ctx->insns = CALLOC(NV_PC_MAX_INSTRUCTIONS, sizeof(struct nv_instruction *));
+ if (!ctx->insns) {
+ FREE(ctx);
+ return -1;
+ }
+
+ pc->pass_seq++;
+ ret = pass_generate_phi_movs(ctx, root);
+ assert(!ret);
+
+#ifdef NVC0_RA_DEBUG_LIVEI
+ nvc0_print_function(root);
+#endif
+
+ for (i = 0; i < pc->loop_nesting_bound; ++i) {
+ pc->pass_seq++;
+ ret = pass_build_live_sets(ctx, root);
+ assert(!ret && "live sets");
+ if (ret) {
+ NOUVEAU_ERR("failed to build live sets (iteration %d)\n", i);
+ goto out;
+ }
+ }
+
+ pc->pass_seq++;
+ nvc0_pc_pass_in_order(root, pass_order_instructions, ctx);
+
+ pc->pass_seq++;
+ ret = pass_build_intervals(ctx, root);
+ assert(!ret && "build intervals");
+ if (ret) {
+ NOUVEAU_ERR("failed to build live intervals\n");
+ goto out;
+ }
+
+#ifdef NVC0_RA_DEBUG_LIVEI
+ for (i = 0; i < pc->num_values; ++i)
+ livei_print(&pc->values[i]);
+#endif
+
+ ret = pass_join_values(ctx, JOIN_MASK_PHI);
+ if (ret)
+ goto out;
+ ret = pass_join_values(ctx, JOIN_MASK_SELECT | JOIN_MASK_BIND);
+ if (ret)
+ goto out;
+ ret = pass_join_values(ctx, JOIN_MASK_MOV);
+ if (ret)
+ goto out;
+ ret = pass_allocate_constrained_values(ctx);
+ if (ret)
+ goto out;
+ ret = pass_linear_scan(ctx);
+ if (ret)
+ goto out;
+
+ for (i = 0; i < pc->num_values; ++i)
+ livei_release(&pc->values[i]);
+
+ NOUVEAU_DBG("REGISTER ALLOCATION - leaving\n");
+
+out:
+ FREE(ctx->insns);
+ FREE(ctx);
+ return ret;
+}
+
+int
+nvc0_pc_exec_pass1(struct nv_pc *pc)
+{
+ int i, ret;
+
+ for (i = 0; i < pc->num_subroutines + 1; ++i)
+ if (pc->root[i] && (ret = nv_pc_pass1(pc, pc->root[i])))
+ return ret;
+ return 0;
+}
diff --git a/src/gallium/drivers/nvc0/nvc0_program.c b/src/gallium/drivers/nvc0/nvc0_program.c
new file mode 100644
index 00000000000..3c59213176e
--- /dev/null
+++ b/src/gallium/drivers/nvc0/nvc0_program.c
@@ -0,0 +1,728 @@
+/*
+ * Copyright 2010 Christoph Bumiller
+ *
+ * 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 "pipe/p_shader_tokens.h"
+#include "pipe/p_defines.h"
+
+#define NOUVEAU_DEBUG
+
+#include "tgsi/tgsi_parse.h"
+#include "tgsi/tgsi_util.h"
+#include "tgsi/tgsi_dump.h"
+
+#include "nvc0_context.h"
+#include "nvc0_pc.h"
+
+static unsigned
+nvc0_tgsi_src_mask(const struct tgsi_full_instruction *inst, int c)
+{
+ unsigned mask = inst->Dst[0].Register.WriteMask;
+
+ switch (inst->Instruction.Opcode) {
+ case TGSI_OPCODE_COS:
+ case TGSI_OPCODE_SIN:
+ return (mask & 0x8) | ((mask & 0x7) ? 0x1 : 0x0);
+ case TGSI_OPCODE_DP3:
+ return 0x7;
+ case TGSI_OPCODE_DP4:
+ case TGSI_OPCODE_DPH:
+ case TGSI_OPCODE_KIL: /* WriteMask ignored */
+ return 0xf;
+ case TGSI_OPCODE_DST:
+ return mask & (c ? 0xa : 0x6);
+ case TGSI_OPCODE_EX2:
+ case TGSI_OPCODE_EXP:
+ case TGSI_OPCODE_LG2:
+ case TGSI_OPCODE_LOG:
+ case TGSI_OPCODE_POW:
+ case TGSI_OPCODE_RCP:
+ case TGSI_OPCODE_RSQ:
+ case TGSI_OPCODE_SCS:
+ return 0x1;
+ case TGSI_OPCODE_IF:
+ return 0x1;
+ case TGSI_OPCODE_LIT:
+ return 0xb;
+ case TGSI_OPCODE_TEX:
+ case TGSI_OPCODE_TXB:
+ case TGSI_OPCODE_TXL:
+ case TGSI_OPCODE_TXP:
+ {
+ const struct tgsi_instruction_texture *tex;
+
+ assert(inst->Instruction.Texture);
+ tex = &inst->Texture;
+
+ mask = 0x7;
+ if (inst->Instruction.Opcode != TGSI_OPCODE_TEX &&
+ inst->Instruction.Opcode != TGSI_OPCODE_TXD)
+ mask |= 0x8; /* bias, lod or proj */
+
+ switch (tex->Texture) {
+ case TGSI_TEXTURE_1D:
+ mask &= 0x9;
+ break;
+ case TGSI_TEXTURE_SHADOW1D:
+ mask &= 0x5;
+ break;
+ case TGSI_TEXTURE_2D:
+ mask &= 0xb;
+ break;
+ default:
+ break;
+ }
+ }
+ return mask;
+ case TGSI_OPCODE_XPD:
+ {
+ unsigned x = 0;
+ if (mask & 1) x |= 0x6;
+ if (mask & 2) x |= 0x5;
+ if (mask & 4) x |= 0x3;
+ return x;
+ }
+ default:
+ break;
+ }
+
+ return mask;
+}
+
+static void
+nvc0_indirect_inputs(struct nvc0_translation_info *ti, int id)
+{
+ int i, c;
+
+ for (i = 0; i < PIPE_MAX_SHADER_INPUTS; ++i)
+ for (c = 0; c < 4; ++c)
+ ti->input_access[i][c] = id;
+
+ ti->indirect_inputs = TRUE;
+}
+
+static void
+nvc0_indirect_outputs(struct nvc0_translation_info *ti, int id)
+{
+ int i, c;
+
+ for (i = 0; i < PIPE_MAX_SHADER_OUTPUTS; ++i)
+ for (c = 0; c < 4; ++c)
+ ti->output_access[i][c] = id;
+
+ ti->indirect_outputs = TRUE;
+}
+
+static INLINE unsigned
+nvc0_system_value_location(unsigned sn, unsigned si, boolean *is_input)
+{
+ /* NOTE: locations 0xfxx indicate special regs */
+ switch (sn) {
+ /*
+ case TGSI_SEMANTIC_VERTEXID:
+ *is_input = TRUE;
+ return 0x2fc;
+ */
+ case TGSI_SEMANTIC_PRIMID:
+ *is_input = TRUE;
+ return 0x60;
+ /*
+ case TGSI_SEMANTIC_LAYER_INDEX:
+ return 0x64;
+ case TGSI_SEMANTIC_VIEWPORT_INDEX:
+ return 0x68;
+ */
+ case TGSI_SEMANTIC_INSTANCEID:
+ *is_input = TRUE;
+ return 0x2f8;
+ case TGSI_SEMANTIC_FACE:
+ *is_input = TRUE;
+ return 0x3fc;
+ /*
+ case TGSI_SEMANTIC_INVOCATIONID:
+ return 0xf11;
+ */
+ default:
+ assert(0);
+ return 0x000;
+ }
+}
+
+static INLINE unsigned
+nvc0_varying_location(unsigned sn, unsigned si)
+{
+ switch (sn) {
+ case TGSI_SEMANTIC_POSITION:
+ return 0x70;
+ case TGSI_SEMANTIC_COLOR:
+ return 0x280 + (si * 16); /* are these hard-wired ? */
+ case TGSI_SEMANTIC_BCOLOR:
+ return 0x2a0 + (si * 16);
+ case TGSI_SEMANTIC_FOG:
+ return 0x270;
+ case TGSI_SEMANTIC_PSIZE:
+ return 0x6c;
+ /*
+ case TGSI_SEMANTIC_PNTC:
+ return 0x2e0;
+ */
+ case TGSI_SEMANTIC_GENERIC:
+ /* We'd really like to distinguish between TEXCOORD and GENERIC here,
+ * since only 0x300 to 0x37c can be replaced by sprite coordinates.
+ * Also, gl_PointCoord should be a system value and must be assigned to
+ * address 0x2e0. For now, let's cheat:
+ */
+ assert(si < 31);
+ if (si <= 7)
+ return 0x300 + si * 16;
+ if (si == 9)
+ return 0x2e0;
+ return 0x80 + ((si - 8) * 16);
+ case TGSI_SEMANTIC_NORMAL:
+ return 0x360;
+ case TGSI_SEMANTIC_PRIMID:
+ return 0x40;
+ case TGSI_SEMANTIC_FACE:
+ return 0x3fc;
+ case TGSI_SEMANTIC_EDGEFLAG: /* doesn't exist, set value like for an sreg */
+ return 0xf00;
+ /*
+ case TGSI_SEMANTIC_CLIP_DISTANCE:
+ return 0x2c0 + (si * 4);
+ */
+ default:
+ assert(0);
+ return 0x000;
+ }
+}
+
+static INLINE unsigned
+nvc0_interp_mode(const struct tgsi_full_declaration *decl)
+{
+ unsigned mode;
+
+ if (decl->Declaration.Interpolate == TGSI_INTERPOLATE_CONSTANT)
+ mode = NVC0_INTERP_FLAT;
+ else
+ if (decl->Declaration.Interpolate == TGSI_INTERPOLATE_PERSPECTIVE)
+ mode = NVC0_INTERP_PERSPECTIVE;
+ else
+ mode = NVC0_INTERP_LINEAR;
+
+ if (decl->Declaration.Centroid)
+ mode |= NVC0_INTERP_CENTROID;
+
+ return mode;
+}
+
+static void
+prog_immediate(struct nvc0_translation_info *ti,
+ const struct tgsi_full_immediate *imm)
+{
+ int c;
+ unsigned n = ti->immd32_nr++;
+
+ assert(ti->immd32_nr <= ti->scan.immediate_count);
+
+ for (c = 0; c < 4; ++c)
+ ti->immd32[n * 4 + c] = imm->u[c].Uint;
+
+ ti->immd32_ty[n] = imm->Immediate.DataType;
+}
+
+static boolean
+prog_decl(struct nvc0_translation_info *ti,
+ const struct tgsi_full_declaration *decl)
+{
+ unsigned i, c;
+ unsigned sn = TGSI_SEMANTIC_GENERIC;
+ unsigned si = 0;
+ const unsigned first = decl->Range.First;
+ const unsigned last = decl->Range.Last;
+
+ if (decl->Declaration.Semantic) {
+ sn = decl->Semantic.Name;
+ si = decl->Semantic.Index;
+ }
+
+ switch (decl->Declaration.File) {
+ case TGSI_FILE_INPUT:
+ for (i = first; i <= last; ++i) {
+ if (ti->prog->type == PIPE_SHADER_VERTEX) {
+ for (c = 0; c < 4; ++c)
+ ti->input_loc[i][c] = 0x80 + i * 16 + c * 4;
+ } else {
+ for (c = 0; c < 4; ++c)
+ ti->input_loc[i][c] = nvc0_varying_location(sn, si) + c * 4;
+ /* for sprite coordinates: */
+ ti->prog->fp.in_pos[i] = ti->input_loc[i][0] / 4;
+ }
+ if (ti->prog->type == PIPE_SHADER_FRAGMENT)
+ ti->interp_mode[i] = nvc0_interp_mode(decl);
+ }
+ break;
+ case TGSI_FILE_OUTPUT:
+ for (i = first; i <= last; ++i, ++si) {
+ if (ti->prog->type == PIPE_SHADER_FRAGMENT) {
+ si = i;
+ if (i == ti->fp_depth_output) {
+ ti->output_loc[i][2] = (ti->scan.num_outputs - 1) * 4;
+ } else {
+ if (i > ti->fp_depth_output)
+ si -= 1;
+ for (c = 0; c < 4; ++c)
+ ti->output_loc[i][c] = si * 4 + c;
+ }
+ } else {
+ if (sn == TGSI_SEMANTIC_EDGEFLAG)
+ ti->edgeflag_out = i;
+ for (c = 0; c < 4; ++c)
+ ti->output_loc[i][c] = nvc0_varying_location(sn, si) + c * 4;
+ /* for TFB_VARYING_LOCS: */
+ ti->prog->vp.out_pos[i] = ti->output_loc[i][0] / 4;
+ }
+ }
+ break;
+ case TGSI_FILE_SYSTEM_VALUE:
+ i = first;
+ ti->sysval_loc[i] = nvc0_system_value_location(sn, si, &ti->sysval_in[i]);
+ assert(first == last);
+ break;
+ case TGSI_FILE_TEMPORARY:
+ ti->temp128_nr = MAX2(ti->temp128_nr, last + 1);
+ break;
+ case TGSI_FILE_NULL:
+ case TGSI_FILE_CONSTANT:
+ case TGSI_FILE_SAMPLER:
+ case TGSI_FILE_ADDRESS:
+ case TGSI_FILE_IMMEDIATE:
+ case TGSI_FILE_PREDICATE:
+ break;
+ default:
+ NOUVEAU_ERR("unhandled TGSI_FILE %d\n", decl->Declaration.File);
+ return FALSE;
+ }
+ return TRUE;
+}
+
+static void
+prog_inst(struct nvc0_translation_info *ti,
+ const struct tgsi_full_instruction *inst, int id)
+{
+ const struct tgsi_dst_register *dst;
+ const struct tgsi_src_register *src;
+ int s, c, k;
+ unsigned mask;
+
+ if (inst->Instruction.Opcode == TGSI_OPCODE_BGNSUB) {
+ ti->subr[ti->num_subrs].first_insn = id - 1;
+ ti->subr[ti->num_subrs].id = ti->num_subrs + 1; /* id 0 is main program */
+ ++ti->num_subrs;
+ }
+
+ if (inst->Dst[0].Register.File == TGSI_FILE_OUTPUT) {
+ dst = &inst->Dst[0].Register;
+
+ for (c = 0; c < 4; ++c) {
+ if (dst->Indirect)
+ nvc0_indirect_outputs(ti, id);
+ if (!(dst->WriteMask & (1 << c)))
+ continue;
+ ti->output_access[dst->Index][c] = id;
+ }
+
+ if (inst->Instruction.Opcode == TGSI_OPCODE_MOV &&
+ inst->Src[0].Register.File == TGSI_FILE_INPUT &&
+ dst->Index == ti->edgeflag_out)
+ ti->prog->vp.edgeflag = inst->Src[0].Register.Index;
+ } else
+ if (inst->Dst[0].Register.File == TGSI_FILE_TEMPORARY) {
+ if (inst->Dst[0].Register.Indirect)
+ ti->require_stores = TRUE;
+ }
+
+ for (s = 0; s < inst->Instruction.NumSrcRegs; ++s) {
+ src = &inst->Src[s].Register;
+ if (src->File == TGSI_FILE_TEMPORARY)
+ if (inst->Src[s].Register.Indirect)
+ ti->require_stores = TRUE;
+ if (src->File != TGSI_FILE_INPUT)
+ continue;
+ mask = nvc0_tgsi_src_mask(inst, s);
+
+ if (inst->Src[s].Register.Indirect)
+ nvc0_indirect_inputs(ti, id);
+
+ for (c = 0; c < 4; ++c) {
+ if (!(mask & (1 << c)))
+ continue;
+ k = tgsi_util_get_full_src_register_swizzle(&inst->Src[s], c);
+ if (k <= TGSI_SWIZZLE_W)
+ ti->input_access[src->Index][k] = id;
+ }
+ }
+}
+
+/* Probably should introduce something like struct tgsi_function_declaration
+ * instead of trying to guess inputs/outputs.
+ */
+static void
+prog_subroutine_inst(struct nvc0_subroutine *subr,
+ const struct tgsi_full_instruction *inst)
+{
+ const struct tgsi_dst_register *dst;
+ const struct tgsi_src_register *src;
+ int s, c, k;
+ unsigned mask;
+
+ for (s = 0; s < inst->Instruction.NumSrcRegs; ++s) {
+ src = &inst->Src[s].Register;
+ if (src->File != TGSI_FILE_TEMPORARY)
+ continue;
+ mask = nvc0_tgsi_src_mask(inst, s);
+
+ for (c = 0; c < 4; ++c) {
+ k = tgsi_util_get_full_src_register_swizzle(&inst->Src[s], c);
+
+ if ((mask & (1 << c)) && k < TGSI_SWIZZLE_W)
+ if (!(subr->retv[src->Index / 32][k] & (1 << (src->Index % 32))))
+ subr->argv[src->Index / 32][k] |= 1 << (src->Index % 32);
+ }
+ }
+
+ if (inst->Dst[0].Register.File == TGSI_FILE_TEMPORARY) {
+ dst = &inst->Dst[0].Register;
+
+ for (c = 0; c < 4; ++c)
+ if (dst->WriteMask & (1 << c))
+ subr->retv[dst->Index / 32][c] |= 1 << (dst->Index % 32);
+ }
+}
+
+static int
+nvc0_vp_gp_gen_header(struct nvc0_program *vp, struct nvc0_translation_info *ti)
+{
+ int i, c;
+ unsigned a;
+
+ for (a = 0x80/4, i = 0; i <= ti->scan.file_max[TGSI_FILE_INPUT]; ++i) {
+ for (c = 0; c < 4; ++c, ++a)
+ if (ti->input_access[i][c])
+ vp->hdr[5 + a / 32] |= 1 << (a % 32); /* VP_ATTR_EN */
+ }
+
+ for (i = 0; i <= ti->scan.file_max[TGSI_FILE_OUTPUT]; ++i) {
+ a = (ti->output_loc[i][0] - 0x40) / 4;
+ if (ti->output_loc[i][0] >= 0xf00)
+ continue;
+ for (c = 0; c < 4; ++c, ++a) {
+ if (!ti->output_access[i][c])
+ continue;
+ vp->hdr[13 + a / 32] |= 1 << (a % 32); /* VP_EXPORT_EN */
+ }
+ }
+
+ for (i = 0; i < TGSI_SEMANTIC_COUNT; ++i) {
+ a = ti->sysval_loc[i] / 4;
+ if (a > 0 && a < (0xf00 / 4))
+ vp->hdr[(ti->sysval_in[i] ? 5 : 13) + a / 32] |= 1 << (a % 32);
+ }
+
+ return 0;
+}
+
+static int
+nvc0_vp_gen_header(struct nvc0_program *vp, struct nvc0_translation_info *ti)
+{
+ vp->hdr[0] = 0x20461;
+ vp->hdr[4] = 0xff000;
+
+ vp->hdr[18] = (1 << vp->vp.num_ucps) - 1;
+
+ return nvc0_vp_gp_gen_header(vp, ti);
+}
+
+static int
+nvc0_gp_gen_header(struct nvc0_program *gp, struct nvc0_translation_info *ti)
+{
+ unsigned invocations = 1;
+ unsigned max_output_verts, output_prim;
+ unsigned i;
+
+ gp->hdr[0] = 0x21061;
+
+ for (i = 0; i < ti->scan.num_properties; ++i) {
+ switch (ti->scan.properties[i].name) {
+ case TGSI_PROPERTY_GS_OUTPUT_PRIM:
+ output_prim = ti->scan.properties[i].data[0];
+ break;
+ case TGSI_PROPERTY_GS_MAX_OUTPUT_VERTICES:
+ max_output_verts = ti->scan.properties[i].data[0];
+ assert(max_output_verts < 512);
+ break;
+ /*
+ case TGSI_PROPERTY_GS_INVOCATIONS:
+ invocations = ti->scan.properties[i].data[0];
+ assert(invocations <= 32);
+ break;
+ */
+ default:
+ break;
+ }
+ }
+
+ gp->hdr[2] = MIN2(invocations, 32) << 24;
+
+ switch (output_prim) {
+ case PIPE_PRIM_POINTS:
+ gp->hdr[3] = 0x01000000;
+ gp->hdr[0] |= 0xf0000000;
+ break;
+ case PIPE_PRIM_LINE_STRIP:
+ gp->hdr[3] = 0x06000000;
+ gp->hdr[0] |= 0x10000000;
+ break;
+ case PIPE_PRIM_TRIANGLE_STRIP:
+ gp->hdr[3] = 0x07000000;
+ gp->hdr[0] |= 0x10000000;
+ break;
+ default:
+ assert(0);
+ break;
+ }
+
+ gp->hdr[4] = max_output_verts & 0x1ff;
+
+ return nvc0_vp_gp_gen_header(gp, ti);
+}
+
+static int
+nvc0_fp_gen_header(struct nvc0_program *fp, struct nvc0_translation_info *ti)
+{
+ int i, c;
+ unsigned a, m;
+
+ fp->hdr[0] = 0x21462;
+ fp->hdr[5] = 0x80000000; /* getting a trap if FRAG_COORD_UMASK.w = 0 */
+
+ if (ti->scan.uses_kill)
+ fp->hdr[0] |= 0x8000;
+ if (ti->scan.writes_z) {
+ fp->hdr[19] |= 0x2;
+ if (ti->scan.num_outputs > 2)
+ fp->hdr[0] |= 0x4000; /* FP_MULTIPLE_COLOR_OUTPUTS */
+ } else {
+ if (ti->scan.num_outputs > 1)
+ fp->hdr[0] |= 0x4000; /* FP_MULTIPLE_COLOR_OUTPUTS */
+ }
+
+ for (i = 0; i <= ti->scan.file_max[TGSI_FILE_INPUT]; ++i) {
+ m = ti->interp_mode[i] & 3;
+ for (c = 0; c < 4; ++c) {
+ if (!ti->input_access[i][c])
+ continue;
+ a = ti->input_loc[i][c] / 2;
+ if (ti->input_loc[i][c] >= 0x2c0)
+ a -= 32;
+ if (ti->input_loc[i][0] == 0x70)
+ fp->hdr[5] |= 1 << (28 + c); /* FRAG_COORD_UMASK */
+ else
+ if (ti->input_loc[i][0] == 0x2e0)
+ fp->hdr[14] |= 1 << (24 + c); /* POINT_COORD */
+ else
+ fp->hdr[4 + a / 32] |= m << (a % 32);
+ }
+ }
+
+ for (i = 0; i <= ti->scan.file_max[TGSI_FILE_OUTPUT]; ++i) {
+ if (i != ti->fp_depth_output)
+ fp->hdr[18] |= 0xf << ti->output_loc[i][0];
+ }
+
+ for (i = 0; i < TGSI_SEMANTIC_COUNT; ++i) {
+ a = ti->sysval_loc[i] / 2;
+ if ((a > 0) && (a < 0xf00 / 2))
+ fp->hdr[4 + a / 32] |= NVC0_INTERP_FLAT << (a % 32);
+ }
+
+ return 0;
+}
+
+static boolean
+nvc0_prog_scan(struct nvc0_translation_info *ti)
+{
+ struct nvc0_program *prog = ti->prog;
+ struct tgsi_parse_context parse;
+ int ret;
+ unsigned i;
+
+#ifdef NOUVEAU_DEBUG
+ tgsi_dump(prog->pipe.tokens, 0);
+#endif
+
+ tgsi_scan_shader(prog->pipe.tokens, &ti->scan);
+
+ if (ti->prog->type == PIPE_SHADER_FRAGMENT) {
+ ti->fp_depth_output = 255;
+ for (i = 0; i < ti->scan.num_outputs; ++i)
+ if (ti->scan.output_semantic_name[i] == TGSI_SEMANTIC_POSITION)
+ ti->fp_depth_output = i;
+ }
+
+ ti->subr =
+ CALLOC(ti->scan.opcode_count[TGSI_OPCODE_BGNSUB], sizeof(ti->subr[0]));
+
+ ti->immd32 = (uint32_t *)MALLOC(ti->scan.immediate_count * 16);
+ ti->immd32_ty = (ubyte *)MALLOC(ti->scan.immediate_count * sizeof(ubyte));
+
+ ti->insns = MALLOC(ti->scan.num_instructions * sizeof(ti->insns[0]));
+
+ tgsi_parse_init(&parse, prog->pipe.tokens);
+ while (!tgsi_parse_end_of_tokens(&parse)) {
+ tgsi_parse_token(&parse);
+
+ switch (parse.FullToken.Token.Type) {
+ case TGSI_TOKEN_TYPE_IMMEDIATE:
+ prog_immediate(ti, &parse.FullToken.FullImmediate);
+ break;
+ case TGSI_TOKEN_TYPE_DECLARATION:
+ prog_decl(ti, &parse.FullToken.FullDeclaration);
+ break;
+ case TGSI_TOKEN_TYPE_INSTRUCTION:
+ ti->insns[ti->num_insns] = parse.FullToken.FullInstruction;
+ prog_inst(ti, &parse.FullToken.FullInstruction, ++ti->num_insns);
+ break;
+ default:
+ break;
+ }
+ }
+
+ for (i = 0; i < ti->num_subrs; ++i) {
+ unsigned pc = ti->subr[i].id;
+ while (ti->insns[pc].Instruction.Opcode != TGSI_OPCODE_ENDSUB)
+ prog_subroutine_inst(&ti->subr[i], &ti->insns[pc++]);
+ }
+
+ switch (prog->type) {
+ case PIPE_SHADER_VERTEX:
+ ti->input_file = NV_FILE_MEM_A;
+ ti->output_file = NV_FILE_MEM_V;
+ ret = nvc0_vp_gen_header(prog, ti);
+ break;
+ /*
+ case PIPE_SHADER_TESSELLATION_CONTROL:
+ ret = nvc0_tcp_gen_header(ti);
+ break;
+ case PIPE_SHADER_TESSELLATION_EVALUATION:
+ ret = nvc0_tep_gen_header(ti);
+ break;
+ case PIPE_SHADER_GEOMETRY:
+ ret = nvc0_gp_gen_header(ti);
+ break;
+ */
+ case PIPE_SHADER_FRAGMENT:
+ ti->input_file = NV_FILE_MEM_V;
+ ti->output_file = NV_FILE_GPR;
+
+ if (ti->scan.writes_z)
+ prog->flags[0] = 0x11; /* ? */
+ else
+ if (!ti->scan.uses_kill && !ti->global_stores)
+ prog->fp.early_z = 1;
+
+ ret = nvc0_fp_gen_header(prog, ti);
+ break;
+ default:
+ assert(!"unsupported program type");
+ ret = -1;
+ break;
+ }
+
+ if (ti->require_stores) {
+ prog->hdr[0] |= 1 << 26;
+ prog->hdr[1] |= ti->temp128_nr * 16; /* l[] size */
+ }
+
+ assert(!ret);
+ return ret;
+}
+
+boolean
+nvc0_program_translate(struct nvc0_program *prog)
+{
+ struct nvc0_translation_info *ti;
+ int ret;
+
+ ti = CALLOC_STRUCT(nvc0_translation_info);
+ ti->prog = prog;
+
+ ti->edgeflag_out = PIPE_MAX_SHADER_OUTPUTS;
+
+ prog->vp.edgeflag = PIPE_MAX_ATTRIBS;
+
+ if (prog->type == PIPE_SHADER_VERTEX && prog->vp.num_ucps)
+ ti->append_ucp = TRUE;
+
+ ret = nvc0_prog_scan(ti);
+ if (ret) {
+ NOUVEAU_ERR("unsupported shader program\n");
+ goto out;
+ }
+
+ ret = nvc0_generate_code(ti);
+ if (ret)
+ NOUVEAU_ERR("shader translation failed\n");
+
+ {
+ unsigned i;
+ for (i = 0; i < sizeof(prog->hdr) / sizeof(prog->hdr[0]); ++i)
+ debug_printf("HDR[%02lx] = 0x%08x\n",
+ i * sizeof(prog->hdr[0]), prog->hdr[i]);
+ }
+
+out:
+ if (ti->immd32)
+ FREE(ti->immd32);
+ if (ti->immd32_ty)
+ FREE(ti->immd32_ty);
+ if (ti->insns)
+ FREE(ti->insns);
+ if (ti->subr)
+ FREE(ti->subr);
+ FREE(ti);
+ return ret ? FALSE : TRUE;
+}
+
+void
+nvc0_program_destroy(struct nvc0_context *nvc0, struct nvc0_program *prog)
+{
+ if (prog->res)
+ nouveau_resource_free(&prog->res);
+
+ if (prog->code)
+ FREE(prog->code);
+ if (prog->relocs)
+ FREE(prog->relocs);
+
+ memset(prog->hdr, 0, sizeof(prog->hdr));
+
+ prog->translated = FALSE;
+}
diff --git a/src/gallium/drivers/nvc0/nvc0_program.h b/src/gallium/drivers/nvc0/nvc0_program.h
new file mode 100644
index 00000000000..f6fea29780b
--- /dev/null
+++ b/src/gallium/drivers/nvc0/nvc0_program.h
@@ -0,0 +1,92 @@
+
+#ifndef __NVC0_PROGRAM_H__
+#define __NVC0_PROGRAM_H__
+
+#include "pipe/p_state.h"
+#include "tgsi/tgsi_scan.h"
+
+#define NVC0_CAP_MAX_PROGRAM_TEMPS 64
+
+#define NVC0_SHADER_HEADER_SIZE (20 * 4)
+
+struct nvc0_program {
+ struct pipe_shader_state pipe;
+
+ ubyte type;
+ boolean translated;
+ ubyte max_gpr;
+
+ uint32_t *code;
+ unsigned code_base;
+ unsigned code_size;
+ unsigned parm_size;
+
+ uint32_t hdr[20]; /* TODO: move this into code to save space */
+
+ uint32_t flags[2];
+
+ struct {
+ uint8_t edgeflag;
+ uint8_t num_ucps;
+ uint8_t out_pos[PIPE_MAX_SHADER_OUTPUTS];
+ } vp;
+ struct {
+ uint8_t early_z;
+ uint8_t in_pos[PIPE_MAX_SHADER_INPUTS];
+ } fp;
+
+ void *relocs;
+ unsigned num_relocs;
+
+ struct nouveau_resource *res;
+};
+
+/* first 2 bits are written into the program header, for each input */
+#define NVC0_INTERP_FLAT (1 << 0)
+#define NVC0_INTERP_PERSPECTIVE (2 << 0)
+#define NVC0_INTERP_LINEAR (3 << 0)
+#define NVC0_INTERP_CENTROID (1 << 2)
+
+/* analyze TGSI and see which TEMP[] are used as subroutine inputs/outputs */
+struct nvc0_subroutine {
+ unsigned id;
+ unsigned first_insn;
+ uint32_t argv[NVC0_CAP_MAX_PROGRAM_TEMPS][4];
+ uint32_t retv[NVC0_CAP_MAX_PROGRAM_TEMPS][4];
+};
+
+struct nvc0_translation_info {
+ struct nvc0_program *prog;
+ struct tgsi_full_instruction *insns;
+ unsigned num_insns;
+ ubyte input_file;
+ ubyte output_file;
+ ubyte fp_depth_output;
+ uint16_t input_loc[PIPE_MAX_SHADER_INPUTS][4];
+ uint16_t output_loc[PIPE_MAX_SHADER_OUTPUTS][4];
+ uint16_t sysval_loc[TGSI_SEMANTIC_COUNT];
+ boolean sysval_in[TGSI_SEMANTIC_COUNT];
+ int input_access[PIPE_MAX_SHADER_INPUTS][4];
+ int output_access[PIPE_MAX_SHADER_OUTPUTS][4];
+ ubyte interp_mode[PIPE_MAX_SHADER_INPUTS];
+ boolean indirect_inputs;
+ boolean indirect_outputs;
+ boolean require_stores;
+ boolean global_stores;
+ uint32_t *immd32;
+ ubyte *immd32_ty;
+ unsigned immd32_nr;
+ unsigned temp128_nr;
+ ubyte edgeflag_out;
+ struct nvc0_subroutine *subr;
+ unsigned num_subrs;
+ boolean append_ucp;
+ struct tgsi_shader_info scan;
+};
+
+int nvc0_generate_code(struct nvc0_translation_info *);
+
+void nvc0_relocate_program(struct nvc0_program *,
+ uint32_t code_base, uint32_t data_base);
+
+#endif
diff --git a/src/gallium/drivers/nvc0/nvc0_push.c b/src/gallium/drivers/nvc0/nvc0_push.c
new file mode 100644
index 00000000000..2e9f4c10928
--- /dev/null
+++ b/src/gallium/drivers/nvc0/nvc0_push.c
@@ -0,0 +1,354 @@
+
+#include "pipe/p_context.h"
+#include "pipe/p_state.h"
+#include "util/u_inlines.h"
+#include "util/u_format.h"
+#include "translate/translate.h"
+
+#include "nvc0_context.h"
+#include "nvc0_resource.h"
+
+#include "nvc0_3d.xml.h"
+
+struct push_context {
+ struct nouveau_channel *chan;
+
+ void *idxbuf;
+
+ uint32_t vertex_words;
+ uint32_t packet_vertex_limit;
+
+ struct translate *translate;
+
+ boolean primitive_restart;
+ uint32_t prim;
+ uint32_t restart_index;
+ uint32_t instance_id;
+
+ struct {
+ int buffer;
+ float value;
+ uint8_t *data;
+ unsigned offset;
+ unsigned stride;
+ } edgeflag;
+};
+
+static void
+init_push_context(struct nvc0_context *nvc0, struct push_context *ctx)
+{
+ struct pipe_vertex_element *ve;
+
+ ctx->chan = nvc0->screen->base.channel;
+ ctx->translate = nvc0->vertex->translate;
+
+ ctx->edgeflag.value = 0.5f;
+
+ if (NVC0_USING_EDGEFLAG(nvc0)) {
+ ve = &nvc0->vertex->element[nvc0->vertprog->vp.edgeflag].pipe;
+
+ ctx->edgeflag.buffer = ve->vertex_buffer_index;
+ ctx->edgeflag.offset = ve->src_offset;
+
+ ctx->packet_vertex_limit = 1;
+ } else {
+ ctx->edgeflag.buffer = -1;
+ ctx->edgeflag.offset = 0;
+ ctx->edgeflag.stride = 0;
+ ctx->edgeflag.data = NULL;
+
+ ctx->packet_vertex_limit = nvc0->vertex->vtx_per_packet_max;
+ }
+
+ ctx->vertex_words = nvc0->vertex->vtx_size;
+}
+
+static INLINE void
+set_edgeflag(struct push_context *ctx, unsigned vtx_id)
+{
+ float f = *(float *)(ctx->edgeflag.data + vtx_id * ctx->edgeflag.stride);
+
+ if (ctx->edgeflag.value != f) {
+ ctx->edgeflag.value = f;
+ IMMED_RING(ctx->chan, RING_3D(EDGEFLAG_ENABLE), f ? 1 : 0);
+ }
+}
+
+static INLINE unsigned
+prim_restart_search_i08(uint8_t *elts, unsigned push, uint8_t index)
+{
+ unsigned i;
+ for (i = 0; i < push; ++i)
+ if (elts[i] == index)
+ break;
+ return i;
+}
+
+static INLINE unsigned
+prim_restart_search_i16(uint16_t *elts, unsigned push, uint16_t index)
+{
+ unsigned i;
+ for (i = 0; i < push; ++i)
+ if (elts[i] == index)
+ break;
+ return i;
+}
+
+static INLINE unsigned
+prim_restart_search_i32(uint32_t *elts, unsigned push, uint32_t index)
+{
+ unsigned i;
+ for (i = 0; i < push; ++i)
+ if (elts[i] == index)
+ break;
+ return i;
+}
+
+static void
+emit_vertices_i08(struct push_context *ctx, unsigned start, unsigned count)
+{
+ uint8_t *restrict elts = (uint8_t *)ctx->idxbuf + start;
+
+ while (count) {
+ unsigned push = MIN2(count, ctx->packet_vertex_limit);
+ unsigned size, nr;
+
+ nr = push;
+ if (ctx->primitive_restart)
+ nr = prim_restart_search_i08(elts, push, ctx->restart_index);
+
+ if (unlikely(ctx->edgeflag.buffer >= 0) && nr)
+ set_edgeflag(ctx, elts[0]);
+
+ size = ctx->vertex_words * nr;
+
+ BEGIN_RING_NI(ctx->chan, RING_3D(VERTEX_DATA), size);
+
+ ctx->translate->run_elts8(ctx->translate, elts, nr, ctx->instance_id,
+ ctx->chan->cur);
+
+ ctx->chan->cur += size;
+ count -= nr;
+ elts += nr;
+
+ if (nr != push) {
+ count--;
+ elts++;
+ BEGIN_RING(ctx->chan, RING_3D(VERTEX_END_GL), 2);
+ OUT_RING (ctx->chan, 0);
+ OUT_RING (ctx->chan, NVC0_3D_VERTEX_BEGIN_GL_INSTANCE_CONT |
+ (ctx->prim & ~NVC0_3D_VERTEX_BEGIN_GL_INSTANCE_NEXT));
+ }
+ }
+}
+
+static void
+emit_vertices_i16(struct push_context *ctx, unsigned start, unsigned count)
+{
+ uint16_t *restrict elts = (uint16_t *)ctx->idxbuf + start;
+
+ while (count) {
+ unsigned push = MIN2(count, ctx->packet_vertex_limit);
+ unsigned size, nr;
+
+ nr = push;
+ if (ctx->primitive_restart)
+ nr = prim_restart_search_i16(elts, push, ctx->restart_index);
+
+ if (unlikely(ctx->edgeflag.buffer >= 0) && nr)
+ set_edgeflag(ctx, elts[0]);
+
+ size = ctx->vertex_words * nr;
+
+ BEGIN_RING_NI(ctx->chan, RING_3D(VERTEX_DATA), size);
+
+ ctx->translate->run_elts16(ctx->translate, elts, nr, ctx->instance_id,
+ ctx->chan->cur);
+
+ ctx->chan->cur += size;
+ count -= nr;
+ elts += nr;
+
+ if (nr != push) {
+ count--;
+ elts++;
+ BEGIN_RING(ctx->chan, RING_3D(VERTEX_END_GL), 2);
+ OUT_RING (ctx->chan, 0);
+ OUT_RING (ctx->chan, NVC0_3D_VERTEX_BEGIN_GL_INSTANCE_CONT |
+ (ctx->prim & ~NVC0_3D_VERTEX_BEGIN_GL_INSTANCE_NEXT));
+ }
+ }
+}
+
+static void
+emit_vertices_i32(struct push_context *ctx, unsigned start, unsigned count)
+{
+ uint32_t *restrict elts = (uint32_t *)ctx->idxbuf + start;
+
+ while (count) {
+ unsigned push = MIN2(count, ctx->packet_vertex_limit);
+ unsigned size, nr;
+
+ nr = push;
+ if (ctx->primitive_restart)
+ nr = prim_restart_search_i32(elts, push, ctx->restart_index);
+
+ if (unlikely(ctx->edgeflag.buffer >= 0) && nr)
+ set_edgeflag(ctx, elts[0]);
+
+ size = ctx->vertex_words * nr;
+
+ BEGIN_RING_NI(ctx->chan, RING_3D(VERTEX_DATA), size);
+
+ ctx->translate->run_elts(ctx->translate, elts, nr, ctx->instance_id,
+ ctx->chan->cur);
+
+ ctx->chan->cur += size;
+ count -= nr;
+ elts += nr;
+
+ if (nr != push) {
+ count--;
+ elts++;
+ BEGIN_RING(ctx->chan, RING_3D(VERTEX_END_GL), 2);
+ OUT_RING (ctx->chan, 0);
+ OUT_RING (ctx->chan, NVC0_3D_VERTEX_BEGIN_GL_INSTANCE_CONT |
+ (ctx->prim & ~NVC0_3D_VERTEX_BEGIN_GL_INSTANCE_NEXT));
+ }
+ }
+}
+
+static void
+emit_vertices_seq(struct push_context *ctx, unsigned start, unsigned count)
+{
+ while (count) {
+ unsigned push = MIN2(count, ctx->packet_vertex_limit);
+ unsigned size = ctx->vertex_words * push;
+
+ if (unlikely(ctx->edgeflag.buffer >= 0))
+ set_edgeflag(ctx, start);
+
+ BEGIN_RING_NI(ctx->chan, RING_3D(VERTEX_DATA), size);
+
+ ctx->translate->run(ctx->translate, start, push, ctx->instance_id,
+ ctx->chan->cur);
+ ctx->chan->cur += size;
+ count -= push;
+ start += push;
+ }
+}
+
+
+#define NVC0_PRIM_GL_CASE(n) \
+ case PIPE_PRIM_##n: return NVC0_3D_VERTEX_BEGIN_GL_PRIMITIVE_##n
+
+static INLINE unsigned
+nvc0_prim_gl(unsigned prim)
+{
+ switch (prim) {
+ NVC0_PRIM_GL_CASE(POINTS);
+ NVC0_PRIM_GL_CASE(LINES);
+ NVC0_PRIM_GL_CASE(LINE_LOOP);
+ NVC0_PRIM_GL_CASE(LINE_STRIP);
+ NVC0_PRIM_GL_CASE(TRIANGLES);
+ NVC0_PRIM_GL_CASE(TRIANGLE_STRIP);
+ NVC0_PRIM_GL_CASE(TRIANGLE_FAN);
+ NVC0_PRIM_GL_CASE(QUADS);
+ NVC0_PRIM_GL_CASE(QUAD_STRIP);
+ NVC0_PRIM_GL_CASE(POLYGON);
+ NVC0_PRIM_GL_CASE(LINES_ADJACENCY);
+ NVC0_PRIM_GL_CASE(LINE_STRIP_ADJACENCY);
+ NVC0_PRIM_GL_CASE(TRIANGLES_ADJACENCY);
+ NVC0_PRIM_GL_CASE(TRIANGLE_STRIP_ADJACENCY);
+ /*
+ NVC0_PRIM_GL_CASE(PATCHES); */
+ default:
+ return NVC0_3D_VERTEX_BEGIN_GL_PRIMITIVE_POINTS;
+ break;
+ }
+}
+
+void
+nvc0_push_vbo(struct nvc0_context *nvc0, const struct pipe_draw_info *info)
+{
+ struct push_context ctx;
+ unsigned i, index_size;
+ unsigned inst = info->instance_count;
+ boolean apply_bias = info->indexed && info->index_bias;
+
+ init_push_context(nvc0, &ctx);
+
+ for (i = 0; i < nvc0->num_vtxbufs; ++i) {
+ uint8_t *data;
+ struct pipe_vertex_buffer *vb = &nvc0->vtxbuf[i];
+ struct nv04_resource *res = nv04_resource(vb->buffer);
+
+ data = nouveau_resource_map_offset(&nvc0->base, res,
+ vb->buffer_offset, NOUVEAU_BO_RD);
+
+ if (apply_bias && likely(!(nvc0->vertex->instance_bufs & (1 << i))))
+ data += info->index_bias * vb->stride;
+
+ ctx.translate->set_buffer(ctx.translate, i, data, vb->stride, ~0);
+
+ if (unlikely(i == ctx.edgeflag.buffer)) {
+ ctx.edgeflag.data = data + ctx.edgeflag.offset;
+ ctx.edgeflag.stride = vb->stride;
+ }
+ }
+
+ if (info->indexed) {
+ ctx.idxbuf =
+ nouveau_resource_map_offset(&nvc0->base,
+ nv04_resource(nvc0->idxbuf.buffer),
+ nvc0->idxbuf.offset, NOUVEAU_BO_RD);
+ if (!ctx.idxbuf)
+ return;
+ index_size = nvc0->idxbuf.index_size;
+ ctx.primitive_restart = info->primitive_restart;
+ ctx.restart_index = info->restart_index;
+ } else {
+ ctx.idxbuf = NULL;
+ index_size = 0;
+ ctx.primitive_restart = FALSE;
+ ctx.restart_index = 0;
+ }
+
+ ctx.instance_id = info->start_instance;
+ ctx.prim = nvc0_prim_gl(info->mode);
+
+ while (inst--) {
+ BEGIN_RING(ctx.chan, RING_3D(VERTEX_BEGIN_GL), 1);
+ OUT_RING (ctx.chan, ctx.prim);
+ switch (index_size) {
+ case 0:
+ emit_vertices_seq(&ctx, info->start, info->count);
+ break;
+ case 1:
+ emit_vertices_i08(&ctx, info->start, info->count);
+ break;
+ case 2:
+ emit_vertices_i16(&ctx, info->start, info->count);
+ break;
+ case 4:
+ emit_vertices_i32(&ctx, info->start, info->count);
+ break;
+ default:
+ assert(0);
+ break;
+ }
+ IMMED_RING(ctx.chan, RING_3D(VERTEX_END_GL), 0);
+
+ ctx.instance_id++;
+ ctx.prim |= NVC0_3D_VERTEX_BEGIN_GL_INSTANCE_NEXT;
+ }
+
+ if (unlikely(ctx.edgeflag.value == 0.0f))
+ IMMED_RING(ctx.chan, RING_3D(EDGEFLAG_ENABLE), 1);
+
+ if (info->indexed)
+ nouveau_resource_unmap(nv04_resource(nvc0->idxbuf.buffer));
+
+ for (i = 0; i < nvc0->num_vtxbufs; ++i)
+ nouveau_resource_unmap(nv04_resource(nvc0->vtxbuf[i].buffer));
+}
diff --git a/src/gallium/drivers/nvc0/nvc0_push2.c b/src/gallium/drivers/nvc0/nvc0_push2.c
new file mode 100644
index 00000000000..6f51600558a
--- /dev/null
+++ b/src/gallium/drivers/nvc0/nvc0_push2.c
@@ -0,0 +1,333 @@
+
+#if 0 /* not used, kept for now to compare with util/translate */
+
+#include "pipe/p_context.h"
+#include "pipe/p_state.h"
+#include "util/u_inlines.h"
+#include "util/u_format.h"
+#include "translate/translate.h"
+
+#include "nvc0_context.h"
+#include "nvc0_resource.h"
+
+#include "nvc0_3d.xml.h"
+
+struct push_context {
+ struct nvc0_context *nvc0;
+
+ uint vertex_size;
+
+ void *idxbuf;
+ uint idxsize;
+
+ float edgeflag;
+ int edgeflag_input;
+
+ struct {
+ void *map;
+ void (*push)(struct nouveau_channel *, void *);
+ uint32_t stride;
+ uint32_t divisor;
+ uint32_t step;
+ } attr[32];
+ int num_attrs;
+};
+
+static void
+emit_b32_1(struct nouveau_channel *chan, void *data)
+{
+ uint32_t *v = data;
+
+ OUT_RING(chan, v[0]);
+}
+
+static void
+emit_b32_2(struct nouveau_channel *chan, void *data)
+{
+ uint32_t *v = data;
+
+ OUT_RING(chan, v[0]);
+ OUT_RING(chan, v[1]);
+}
+
+static void
+emit_b32_3(struct nouveau_channel *chan, void *data)
+{
+ uint32_t *v = data;
+
+ OUT_RING(chan, v[0]);
+ OUT_RING(chan, v[1]);
+ OUT_RING(chan, v[2]);
+}
+
+static void
+emit_b32_4(struct nouveau_channel *chan, void *data)
+{
+ uint32_t *v = data;
+
+ OUT_RING(chan, v[0]);
+ OUT_RING(chan, v[1]);
+ OUT_RING(chan, v[2]);
+ OUT_RING(chan, v[3]);
+}
+
+static void
+emit_b16_1(struct nouveau_channel *chan, void *data)
+{
+ uint16_t *v = data;
+
+ OUT_RING(chan, v[0]);
+}
+
+static void
+emit_b16_3(struct nouveau_channel *chan, void *data)
+{
+ uint16_t *v = data;
+
+ OUT_RING(chan, (v[1] << 16) | v[0]);
+ OUT_RING(chan, v[2]);
+}
+
+static void
+emit_b08_1(struct nouveau_channel *chan, void *data)
+{
+ uint8_t *v = data;
+
+ OUT_RING(chan, v[0]);
+}
+
+static void
+emit_b08_3(struct nouveau_channel *chan, void *data)
+{
+ uint8_t *v = data;
+
+ OUT_RING(chan, (v[2] << 16) | (v[1] << 8) | v[0]);
+}
+
+static void
+emit_b64_1(struct nouveau_channel *chan, void *data)
+{
+ double *v = data;
+
+ OUT_RINGf(chan, v[0]);
+}
+
+static void
+emit_b64_2(struct nouveau_channel *chan, void *data)
+{
+ double *v = data;
+
+ OUT_RINGf(chan, v[0]);
+ OUT_RINGf(chan, v[1]);
+}
+
+static void
+emit_b64_3(struct nouveau_channel *chan, void *data)
+{
+ double *v = data;
+
+ OUT_RINGf(chan, v[0]);
+ OUT_RINGf(chan, v[1]);
+ OUT_RINGf(chan, v[2]);
+}
+
+static void
+emit_b64_4(struct nouveau_channel *chan, void *data)
+{
+ double *v = data;
+
+ OUT_RINGf(chan, v[0]);
+ OUT_RINGf(chan, v[1]);
+ OUT_RINGf(chan, v[2]);
+ OUT_RINGf(chan, v[3]);
+}
+
+static INLINE void
+emit_vertex(struct push_context *ctx, unsigned n)
+{
+ struct nouveau_channel *chan = ctx->nvc0->screen->base.channel;
+ int i;
+
+ if (ctx->edgeflag_input < 32) {
+ /* TODO */
+ }
+
+ BEGIN_RING_NI(chan, RING_3D(VERTEX_DATA), ctx->vertex_size);
+ for (i = 0; i < ctx->num_attrs; ++i)
+ ctx->attr[i].push(chan,
+ (uint8_t *)ctx->attr[i].map + n * ctx->attr[i].stride);
+}
+
+static void
+emit_edgeflag(struct push_context *ctx, boolean enabled)
+{
+ struct nouveau_channel *chan = ctx->nvc0->screen->base.channel;
+
+ IMMED_RING(chan, RING_3D(EDGEFLAG_ENABLE), enabled);
+}
+
+static void
+emit_elt08(struct push_context *ctx, unsigned start, unsigned count)
+{
+ uint8_t *idxbuf = ctx->idxbuf;
+
+ while (count--)
+ emit_vertex(ctx, idxbuf[start++]);
+}
+
+static void
+emit_elt16(struct push_context *ctx, unsigned start, unsigned count)
+{
+ uint16_t *idxbuf = ctx->idxbuf;
+
+ while (count--)
+ emit_vertex(ctx, idxbuf[start++]);
+}
+
+static void
+emit_elt32(struct push_context *ctx, unsigned start, unsigned count)
+{
+ uint32_t *idxbuf = ctx->idxbuf;
+
+ while (count--)
+ emit_vertex(ctx, idxbuf[start++]);
+}
+
+static void
+emit_seq(struct push_context *ctx, unsigned start, unsigned count)
+{
+ while (count--)
+ emit_vertex(ctx, start++);
+}
+
+#define NVC0_PRIM_GL_CASE(n) \
+ case PIPE_PRIM_##n: return NVC0_3D_VERTEX_BEGIN_GL_PRIMITIVE_##n
+
+static INLINE unsigned
+nvc0_prim_gl(unsigned prim)
+{
+ switch (prim) {
+ NVC0_PRIM_GL_CASE(POINTS);
+ NVC0_PRIM_GL_CASE(LINES);
+ NVC0_PRIM_GL_CASE(LINE_LOOP);
+ NVC0_PRIM_GL_CASE(LINE_STRIP);
+ NVC0_PRIM_GL_CASE(TRIANGLES);
+ NVC0_PRIM_GL_CASE(TRIANGLE_STRIP);
+ NVC0_PRIM_GL_CASE(TRIANGLE_FAN);
+ NVC0_PRIM_GL_CASE(QUADS);
+ NVC0_PRIM_GL_CASE(QUAD_STRIP);
+ NVC0_PRIM_GL_CASE(POLYGON);
+ NVC0_PRIM_GL_CASE(LINES_ADJACENCY);
+ NVC0_PRIM_GL_CASE(LINE_STRIP_ADJACENCY);
+ NVC0_PRIM_GL_CASE(TRIANGLES_ADJACENCY);
+ NVC0_PRIM_GL_CASE(TRIANGLE_STRIP_ADJACENCY);
+ /*
+ NVC0_PRIM_GL_CASE(PATCHES); */
+ default:
+ return NVC0_3D_VERTEX_BEGIN_GL_PRIMITIVE_POINTS;
+ break;
+ }
+}
+
+void
+nvc0_push_vbo2(struct nvc0_context *nvc0, const struct pipe_draw_info *info)
+{
+ struct push_context ctx;
+ unsigned i, n;
+ unsigned inst = info->instance_count;
+ unsigned prim = nvc0_prim_gl(info->mode);
+
+ ctx.nvc0 = nvc0;
+ ctx.vertex_size = nvc0->vertex->vtx_size;
+ ctx.idxbuf = NULL;
+ ctx.num_attrs = 0;
+ ctx.edgeflag = 0.5f;
+ ctx.edgeflag_input = 32;
+
+ for (i = 0; i < nvc0->vertex->num_elements; ++i) {
+ struct pipe_vertex_element *ve = &nvc0->vertex->element[i].pipe;
+ struct pipe_vertex_buffer *vb = &nvc0->vtxbuf[ve->vertex_buffer_index];
+ struct nouveau_bo *bo = nvc0_resource(vb->buffer)->bo;
+ unsigned nr_components;
+
+ if (!(nvc0->vbo_fifo & (1 << i)))
+ continue;
+ n = ctx.num_attrs++;
+
+ if (nouveau_bo_map(bo, NOUVEAU_BO_RD))
+ return;
+ ctx.attr[n].map = (uint8_t *)bo->map + vb->buffer_offset + ve->src_offset;
+
+ nouveau_bo_unmap(bo);
+
+ ctx.attr[n].stride = vb->stride;
+ ctx.attr[n].divisor = ve->instance_divisor;
+
+ nr_components = util_format_get_nr_components(ve->src_format);
+ switch (util_format_get_component_bits(ve->src_format,
+ UTIL_FORMAT_COLORSPACE_RGB, 0)) {
+ case 8:
+ switch (nr_components) {
+ case 1: ctx.attr[n].push = emit_b08_1; break;
+ case 2: ctx.attr[n].push = emit_b16_1; break;
+ case 3: ctx.attr[n].push = emit_b08_3; break;
+ case 4: ctx.attr[n].push = emit_b32_1; break;
+ }
+ break;
+ case 16:
+ switch (nr_components) {
+ case 1: ctx.attr[n].push = emit_b16_1; break;
+ case 2: ctx.attr[n].push = emit_b32_1; break;
+ case 3: ctx.attr[n].push = emit_b16_3; break;
+ case 4: ctx.attr[n].push = emit_b32_2; break;
+ }
+ break;
+ case 32:
+ switch (nr_components) {
+ case 1: ctx.attr[n].push = emit_b32_1; break;
+ case 2: ctx.attr[n].push = emit_b32_2; break;
+ case 3: ctx.attr[n].push = emit_b32_3; break;
+ case 4: ctx.attr[n].push = emit_b32_4; break;
+ }
+ break;
+ default:
+ assert(0);
+ break;
+ }
+ }
+
+ if (info->indexed) {
+ struct nvc0_resource *res = nvc0_resource(nvc0->idxbuf.buffer);
+ if (!res || nouveau_bo_map(res->bo, NOUVEAU_BO_RD))
+ return;
+ ctx.idxbuf = (uint8_t *)res->bo->map + nvc0->idxbuf.offset + res->offset;
+ nouveau_bo_unmap(res->bo);
+ ctx.idxsize = nvc0->idxbuf.index_size;
+ } else {
+ ctx.idxsize = 0;
+ }
+
+ while (inst--) {
+ BEGIN_RING(nvc0->screen->base.channel, RING_3D(VERTEX_BEGIN_GL), 1);
+ OUT_RING (nvc0->screen->base.channel, prim);
+ switch (ctx.idxsize) {
+ case 0:
+ emit_seq(&ctx, info->start, info->count);
+ break;
+ case 1:
+ emit_elt08(&ctx, info->start, info->count);
+ break;
+ case 2:
+ emit_elt16(&ctx, info->start, info->count);
+ break;
+ case 4:
+ emit_elt32(&ctx, info->start, info->count);
+ break;
+ }
+ IMMED_RING(nvc0->screen->base.channel, RING_3D(VERTEX_END_GL), 0);
+
+ prim |= NVC0_3D_VERTEX_BEGIN_GL_INSTANCE_NEXT;
+ }
+}
+
+#endif
diff --git a/src/gallium/drivers/nvc0/nvc0_query.c b/src/gallium/drivers/nvc0/nvc0_query.c
new file mode 100644
index 00000000000..ead015b6b84
--- /dev/null
+++ b/src/gallium/drivers/nvc0/nvc0_query.c
@@ -0,0 +1,341 @@
+/*
+ * Copyright 2011 Nouveau Project
+ *
+ * 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.
+ *
+ * Authors: Christoph Bumiller
+ */
+
+#include "nvc0_context.h"
+#include "nouveau/nv_object.xml.h"
+
+/* XXX: Nested queries, and simultaneous queries on multiple gallium contexts
+ * (since we use only a single GPU channel per screen) will not work properly.
+ *
+ * The first is not that big of an issue because OpenGL does not allow nested
+ * queries anyway.
+ */
+
+struct nvc0_query {
+ uint32_t *data;
+ uint32_t type;
+ uint32_t sequence;
+ struct nouveau_bo *bo;
+ uint32_t base;
+ uint32_t offset; /* base + i * 16 */
+ boolean ready;
+ boolean is64bit;
+ struct nouveau_mm_allocation *mm;
+};
+
+#define NVC0_QUERY_ALLOC_SPACE 128
+
+static INLINE struct nvc0_query *
+nvc0_query(struct pipe_query *pipe)
+{
+ return (struct nvc0_query *)pipe;
+}
+
+static boolean
+nvc0_query_allocate(struct nvc0_context *nvc0, struct nvc0_query *q, int size)
+{
+ struct nvc0_screen *screen = nvc0->screen;
+ int ret;
+
+ if (q->bo) {
+ nouveau_bo_ref(NULL, &q->bo);
+ if (q->mm) {
+ if (q->ready)
+ nouveau_mm_free(q->mm);
+ else
+ nouveau_fence_work(screen->base.fence.current, nouveau_mm_free_work, q->mm);
+ }
+ }
+ if (size) {
+ q->mm = nouveau_mm_allocate(screen->base.mm_GART, size, &q->bo, &q->base);
+ if (!q->bo)
+ return FALSE;
+ q->offset = q->base;
+
+ ret = nouveau_bo_map_range(q->bo, q->base, size, NOUVEAU_BO_RD |
+ NOUVEAU_BO_NOSYNC);
+ if (ret) {
+ nvc0_query_allocate(nvc0, q, 0);
+ return FALSE;
+ }
+ q->data = q->bo->map;
+ nouveau_bo_unmap(q->bo);
+ }
+ return TRUE;
+}
+
+static void
+nvc0_query_destroy(struct pipe_context *pipe, struct pipe_query *pq)
+{
+ nvc0_query_allocate(nvc0_context(pipe), nvc0_query(pq), 0);
+ FREE(nvc0_query(pq));
+}
+
+static struct pipe_query *
+nvc0_query_create(struct pipe_context *pipe, unsigned type)
+{
+ struct nvc0_context *nvc0 = nvc0_context(pipe);
+ struct nvc0_query *q;
+
+ q = CALLOC_STRUCT(nvc0_query);
+ if (!q)
+ return NULL;
+
+ if (!nvc0_query_allocate(nvc0, q, NVC0_QUERY_ALLOC_SPACE)) {
+ FREE(q);
+ return NULL;
+ }
+
+ q->is64bit = (type == PIPE_QUERY_PRIMITIVES_GENERATED ||
+ type == PIPE_QUERY_PRIMITIVES_EMITTED ||
+ type == PIPE_QUERY_SO_STATISTICS);
+ q->type = type;
+
+ if (q->type == PIPE_QUERY_OCCLUSION_COUNTER) {
+ q->offset -= 16;
+ q->data -= 16 / sizeof(*q->data); /* we advance before query_begin ! */
+ }
+
+ return (struct pipe_query *)q;
+}
+
+static void
+nvc0_query_get(struct nouveau_channel *chan, struct nvc0_query *q,
+ unsigned offset, uint32_t get)
+{
+ offset += q->offset;
+
+ MARK_RING (chan, 5, 2);
+ BEGIN_RING(chan, RING_3D(QUERY_ADDRESS_HIGH), 4);
+ OUT_RELOCh(chan, q->bo, offset, NOUVEAU_BO_GART | NOUVEAU_BO_WR);
+ OUT_RELOCl(chan, q->bo, offset, NOUVEAU_BO_GART | NOUVEAU_BO_WR);
+ OUT_RING (chan, q->sequence);
+ OUT_RING (chan, get);
+}
+
+static void
+nvc0_query_begin(struct pipe_context *pipe, struct pipe_query *pq)
+{
+ struct nvc0_context *nvc0 = nvc0_context(pipe);
+ struct nouveau_channel *chan = nvc0->screen->base.channel;
+ struct nvc0_query *q = nvc0_query(pq);
+
+ /* For occlusion queries we have to change the storage, because a previous
+ * query might set the initial render conition to FALSE even *after* we re-
+ * initialized it to TRUE.
+ */
+ if (q->type == PIPE_QUERY_OCCLUSION_COUNTER) {
+ q->offset += 16;
+ q->data += 16 / sizeof(*q->data);
+ if (q->offset - q->base == NVC0_QUERY_ALLOC_SPACE)
+ nvc0_query_allocate(nvc0, q, NVC0_QUERY_ALLOC_SPACE);
+
+ /* XXX: can we do this with the GPU, and sync with respect to a previous
+ * query ?
+ */
+ q->data[1] = 1; /* initial render condition = TRUE */
+ }
+ if (!q->is64bit)
+ q->data[0] = q->sequence++; /* the previously used one */
+
+ switch (q->type) {
+ case PIPE_QUERY_OCCLUSION_COUNTER:
+ IMMED_RING(chan, RING_3D(COUNTER_RESET), NVC0_3D_COUNTER_RESET_SAMPLECNT);
+ IMMED_RING(chan, RING_3D(SAMPLECNT_ENABLE), 1);
+ break;
+ case PIPE_QUERY_PRIMITIVES_GENERATED: /* store before & after instead ? */
+ IMMED_RING(chan, RING_3D(COUNTER_RESET),
+ NVC0_3D_COUNTER_RESET_GENERATED_PRIMITIVES);
+ break;
+ case PIPE_QUERY_PRIMITIVES_EMITTED:
+ IMMED_RING(chan, RING_3D(COUNTER_RESET),
+ NVC0_3D_COUNTER_RESET_EMITTED_PRIMITIVES);
+ break;
+ case PIPE_QUERY_SO_STATISTICS:
+ BEGIN_RING_NI(chan, RING_3D(COUNTER_RESET), 2);
+ OUT_RING (chan, NVC0_3D_COUNTER_RESET_EMITTED_PRIMITIVES);
+ OUT_RING (chan, NVC0_3D_COUNTER_RESET_GENERATED_PRIMITIVES);
+ break;
+ case PIPE_QUERY_TIMESTAMP_DISJOINT:
+ case PIPE_QUERY_TIME_ELAPSED:
+ nvc0_query_get(chan, q, 0x10, 0x00005002);
+ break;
+ default:
+ break;
+ }
+ q->ready = FALSE;
+}
+
+static void
+nvc0_query_end(struct pipe_context *pipe, struct pipe_query *pq)
+{
+ struct nvc0_context *nvc0 = nvc0_context(pipe);
+ struct nouveau_channel *chan = nvc0->screen->base.channel;
+ struct nvc0_query *q = nvc0_query(pq);
+
+ const int index = 0; /* for multiple vertex streams */
+
+ switch (q->type) {
+ case PIPE_QUERY_OCCLUSION_COUNTER:
+ nvc0_query_get(chan, q, 0, 0x0100f002);
+ BEGIN_RING(chan, RING_3D(SAMPLECNT_ENABLE), 1);
+ OUT_RING (chan, 0);
+ break;
+ case PIPE_QUERY_PRIMITIVES_GENERATED:
+ nvc0_query_get(chan, q, 0, 0x09005002 | (index << 5));
+ break;
+ case PIPE_QUERY_PRIMITIVES_EMITTED:
+ nvc0_query_get(chan, q, 0, 0x05805002 | (index << 5));
+ break;
+ case PIPE_QUERY_SO_STATISTICS:
+ nvc0_query_get(chan, q, 0x00, 0x05805002 | (index << 5));
+ nvc0_query_get(chan, q, 0x10, 0x09005002 | (index << 5));
+ break;
+ case PIPE_QUERY_TIMESTAMP_DISJOINT:
+ case PIPE_QUERY_TIME_ELAPSED:
+ nvc0_query_get(chan, q, 0, 0x00005002);
+ break;
+ case PIPE_QUERY_GPU_FINISHED:
+ nvc0_query_get(chan, q, 0, 0x1000f010);
+ break;
+ default:
+ assert(0);
+ break;
+ }
+}
+
+static INLINE boolean
+nvc0_query_ready(struct nvc0_query *q)
+{
+ return q->ready || (!q->is64bit && (q->data[0] == q->sequence));
+}
+
+static INLINE boolean
+nvc0_query_wait(struct nvc0_query *q)
+{
+ int ret = nouveau_bo_map(q->bo, NOUVEAU_BO_RD);
+ if (ret)
+ return FALSE;
+ nouveau_bo_unmap(q->bo);
+ return TRUE;
+}
+
+static boolean
+nvc0_query_result(struct pipe_context *pipe, struct pipe_query *pq,
+ boolean wait, void *result)
+{
+ struct nvc0_query *q = nvc0_query(pq);
+ uint64_t *res64 = result;
+ uint32_t *res32 = result;
+ boolean *res8 = result;
+ uint64_t *data64 = (uint64_t *)q->data;
+
+ if (q->type == PIPE_QUERY_GPU_FINISHED) {
+ res8[0] = nvc0_query_ready(q);
+ return TRUE;
+ }
+
+ if (!q->ready) /* update ? */
+ q->ready = nvc0_query_ready(q);
+ if (!q->ready) {
+ struct nouveau_channel *chan = nvc0_context(pipe)->screen->base.channel;
+ if (!wait) {
+ if (nouveau_bo_pending(q->bo) & NOUVEAU_BO_WR) /* for daft apps */
+ FIRE_RING(chan);
+ return FALSE;
+ }
+ if (!nvc0_query_wait(q))
+ return FALSE;
+ }
+ q->ready = TRUE;
+
+ switch (q->type) {
+ case PIPE_QUERY_OCCLUSION_COUNTER: /* u32 sequence, u32 count, u64 time */
+ res32[0] = q->data[1];
+ break;
+ case PIPE_QUERY_PRIMITIVES_GENERATED: /* u64 count, u64 time */
+ case PIPE_QUERY_PRIMITIVES_EMITTED: /* u64 count, u64 time */
+ res64[0] = data64[0];
+ break;
+ case PIPE_QUERY_SO_STATISTICS:
+ res64[0] = data64[0];
+ res64[1] = data64[1];
+ break;
+ case PIPE_QUERY_TIMESTAMP_DISJOINT: /* u32 sequence, u32 0, u64 time */
+ res64[0] = 1000000000;
+ res8[8] = (data64[0] == data64[2]) ? FALSE : TRUE;
+ break;
+ case PIPE_QUERY_TIME_ELAPSED:
+ res64[0] = data64[1] - data64[3];
+ break;
+ default:
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
+static void
+nvc0_render_condition(struct pipe_context *pipe,
+ struct pipe_query *pq, uint mode)
+{
+ struct nvc0_context *nvc0 = nvc0_context(pipe);
+ struct nouveau_channel *chan = nvc0->screen->base.channel;
+ struct nvc0_query *q;
+
+ if (!pq) {
+ IMMED_RING(chan, RING_3D(COND_MODE), NVC0_3D_COND_MODE_ALWAYS);
+ return;
+ }
+ q = nvc0_query(pq);
+
+ if (mode == PIPE_RENDER_COND_WAIT ||
+ mode == PIPE_RENDER_COND_BY_REGION_WAIT) {
+ MARK_RING (chan, 5, 2);
+ BEGIN_RING(chan, RING_3D_(NV84_SUBCHAN_QUERY_ADDRESS_HIGH), 4);
+ OUT_RELOCh(chan, q->bo, q->offset, NOUVEAU_BO_GART | NOUVEAU_BO_RD);
+ OUT_RELOCl(chan, q->bo, q->offset, NOUVEAU_BO_GART | NOUVEAU_BO_RD);
+ OUT_RING (chan, q->sequence);
+ OUT_RING (chan, 0x00001001);
+ }
+
+ MARK_RING (chan, 4, 2);
+ BEGIN_RING(chan, RING_3D(COND_ADDRESS_HIGH), 3);
+ OUT_RELOCh(chan, q->bo, q->offset, NOUVEAU_BO_GART | NOUVEAU_BO_RD);
+ OUT_RELOCl(chan, q->bo, q->offset, NOUVEAU_BO_GART | NOUVEAU_BO_RD);
+ OUT_RING (chan, NVC0_3D_COND_MODE_RES_NON_ZERO);
+}
+
+void
+nvc0_init_query_functions(struct nvc0_context *nvc0)
+{
+ struct pipe_context *pipe = &nvc0->base.pipe;
+
+ pipe->create_query = nvc0_query_create;
+ pipe->destroy_query = nvc0_query_destroy;
+ pipe->begin_query = nvc0_query_begin;
+ pipe->end_query = nvc0_query_end;
+ pipe->get_query_result = nvc0_query_result;
+ pipe->render_condition = nvc0_render_condition;
+}
diff --git a/src/gallium/drivers/nvc0/nvc0_resource.c b/src/gallium/drivers/nvc0/nvc0_resource.c
new file mode 100644
index 00000000000..44e66314e7e
--- /dev/null
+++ b/src/gallium/drivers/nvc0/nvc0_resource.c
@@ -0,0 +1,51 @@
+
+#include "pipe/p_context.h"
+#include "nvc0_resource.h"
+#include "nouveau/nouveau_screen.h"
+
+
+static struct pipe_resource *
+nvc0_resource_create(struct pipe_screen *screen,
+ const struct pipe_resource *templ)
+{
+ switch (templ->target) {
+ case PIPE_BUFFER:
+ return nouveau_buffer_create(screen, templ);
+ default:
+ return nvc0_miptree_create(screen, templ);
+ }
+}
+
+static struct pipe_resource *
+nvc0_resource_from_handle(struct pipe_screen * screen,
+ const struct pipe_resource *templ,
+ struct winsys_handle *whandle)
+{
+ if (templ->target == PIPE_BUFFER)
+ return NULL;
+ else
+ return nvc0_miptree_from_handle(screen, templ, whandle);
+}
+
+void
+nvc0_init_resource_functions(struct pipe_context *pcontext)
+{
+ pcontext->get_transfer = u_get_transfer_vtbl;
+ pcontext->transfer_map = u_transfer_map_vtbl;
+ pcontext->transfer_flush_region = u_transfer_flush_region_vtbl;
+ pcontext->transfer_unmap = u_transfer_unmap_vtbl;
+ pcontext->transfer_destroy = u_transfer_destroy_vtbl;
+ pcontext->transfer_inline_write = u_transfer_inline_write_vtbl;
+ pcontext->create_surface = nvc0_miptree_surface_new;
+ pcontext->surface_destroy = nvc0_miptree_surface_del;
+}
+
+void
+nvc0_screen_init_resource_functions(struct pipe_screen *pscreen)
+{
+ pscreen->resource_create = nvc0_resource_create;
+ pscreen->resource_from_handle = nvc0_resource_from_handle;
+ pscreen->resource_get_handle = u_resource_get_handle_vtbl;
+ pscreen->resource_destroy = u_resource_destroy_vtbl;
+ pscreen->user_buffer_create = nouveau_user_buffer_create;
+}
diff --git a/src/gallium/drivers/nvc0/nvc0_resource.h b/src/gallium/drivers/nvc0/nvc0_resource.h
new file mode 100644
index 00000000000..f1c445b5152
--- /dev/null
+++ b/src/gallium/drivers/nvc0/nvc0_resource.h
@@ -0,0 +1,75 @@
+
+#ifndef __NVC0_RESOURCE_H__
+#define __NVC0_RESOURCE_H__
+
+#include "util/u_transfer.h"
+#include "util/u_double_list.h"
+#define NOUVEAU_NVC0
+#include "nouveau/nouveau_winsys.h"
+#include "nouveau/nouveau_fence.h"
+#include "nouveau/nouveau_buffer.h"
+#undef NOUVEAU_NVC0
+
+void
+nvc0_init_resource_functions(struct pipe_context *pcontext);
+
+void
+nvc0_screen_init_resource_functions(struct pipe_screen *pscreen);
+
+#define NVC0_TILE_DIM_SHIFT(m, d) (((m) >> (d * 4)) & 0xf)
+
+#define NVC0_TILE_PITCH(m) (64 << NVC0_TILE_DIM_SHIFT(m, 0))
+#define NVC0_TILE_HEIGHT(m) ( 8 << NVC0_TILE_DIM_SHIFT(m, 1))
+#define NVC0_TILE_DEPTH(m) ( 1 << NVC0_TILE_DIM_SHIFT(m, 2))
+
+#define NVC0_TILE_SIZE_2D(m) (((64 * 8) << \
+ NVC0_TILE_DIM_SHIFT(m, 0)) << \
+ NVC0_TILE_DIM_SHIFT(m, 1))
+
+#define NVC0_TILE_SIZE(m) (NVC0_TILE_SIZE_2D(m) << NVC0_TILE_DIM_SHIFT(m, 2))
+
+struct nvc0_miptree_level {
+ uint32_t offset;
+ uint32_t pitch;
+ uint32_t tile_mode;
+};
+
+#define NVC0_MAX_TEXTURE_LEVELS 16
+
+struct nvc0_miptree {
+ struct nv04_resource base;
+ struct nvc0_miptree_level level[NVC0_MAX_TEXTURE_LEVELS];
+ uint32_t total_size;
+ uint32_t layer_stride;
+ boolean layout_3d; /* TRUE if layer count varies with mip level */
+};
+
+static INLINE struct nvc0_miptree *
+nvc0_miptree(struct pipe_resource *pt)
+{
+ return (struct nvc0_miptree *)pt;
+}
+
+/* Internal functions:
+ */
+struct pipe_resource *
+nvc0_miptree_create(struct pipe_screen *pscreen,
+ const struct pipe_resource *tmp);
+
+struct pipe_resource *
+nvc0_miptree_from_handle(struct pipe_screen *pscreen,
+ const struct pipe_resource *template,
+ struct winsys_handle *whandle);
+
+struct pipe_surface *
+nvc0_miptree_surface_new(struct pipe_context *,
+ struct pipe_resource *,
+ const struct pipe_surface *templ);
+
+void
+nvc0_miptree_surface_del(struct pipe_context *, struct pipe_surface *);
+
+uint32_t
+nvc0_miptree_zslice_offset(struct nvc0_miptree *, unsigned l, unsigned z);
+
+#endif
diff --git a/src/gallium/drivers/nvc0/nvc0_screen.c b/src/gallium/drivers/nvc0/nvc0_screen.c
new file mode 100644
index 00000000000..1047ba3c337
--- /dev/null
+++ b/src/gallium/drivers/nvc0/nvc0_screen.c
@@ -0,0 +1,676 @@
+/*
+ * Copyright 2010 Christoph Bumiller
+ *
+ * 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 "util/u_format_s3tc.h"
+#include "pipe/p_screen.h"
+
+#include "nvc0_context.h"
+#include "nvc0_screen.h"
+
+#include "nouveau/nv_object.xml.h"
+#include "nvc0_graph_macros.h"
+
+static boolean
+nvc0_screen_is_format_supported(struct pipe_screen *pscreen,
+ enum pipe_format format,
+ enum pipe_texture_target target,
+ unsigned sample_count,
+ unsigned bindings)
+{
+ if (sample_count > 1)
+ return FALSE;
+
+ if (!util_format_s3tc_enabled) {
+ switch (format) {
+ case PIPE_FORMAT_DXT1_RGB:
+ case PIPE_FORMAT_DXT1_RGBA:
+ case PIPE_FORMAT_DXT3_RGBA:
+ case PIPE_FORMAT_DXT5_RGBA:
+ return FALSE;
+ default:
+ break;
+ }
+ }
+
+ /* transfers & shared are always supported */
+ bindings &= ~(PIPE_BIND_TRANSFER_READ |
+ PIPE_BIND_TRANSFER_WRITE |
+ PIPE_BIND_SHARED);
+
+ return (nvc0_format_table[format].usage & bindings) == bindings;
+}
+
+static int
+nvc0_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
+{
+ switch (param) {
+ case PIPE_CAP_MAX_TEXTURE_IMAGE_UNITS:
+ case PIPE_CAP_MAX_VERTEX_TEXTURE_UNITS:
+ return 32;
+ case PIPE_CAP_MAX_COMBINED_SAMPLERS:
+ return 64;
+ case PIPE_CAP_MAX_TEXTURE_2D_LEVELS:
+ return 13;
+ case PIPE_CAP_MAX_TEXTURE_3D_LEVELS:
+ return 10;
+ case PIPE_CAP_MAX_TEXTURE_CUBE_LEVELS:
+ return 13;
+ case PIPE_CAP_ARRAY_TEXTURES:
+ return 1;
+ case PIPE_CAP_TEXTURE_MIRROR_CLAMP:
+ case PIPE_CAP_TEXTURE_MIRROR_REPEAT:
+ case PIPE_CAP_TEXTURE_SWIZZLE:
+ case PIPE_CAP_TEXTURE_SHADOW_MAP:
+ case PIPE_CAP_NPOT_TEXTURES:
+ case PIPE_CAP_ANISOTROPIC_FILTER:
+ return 1;
+ case PIPE_CAP_TWO_SIDED_STENCIL:
+ case PIPE_CAP_DEPTH_CLAMP:
+ case PIPE_CAP_DEPTHSTENCIL_CLEAR_SEPARATE:
+ case PIPE_CAP_POINT_SPRITE:
+ return 1;
+ case PIPE_CAP_GLSL:
+ case PIPE_CAP_SM3:
+ return 1;
+ case PIPE_CAP_MAX_RENDER_TARGETS:
+ return 8;
+ case PIPE_CAP_TIMER_QUERY:
+ case PIPE_CAP_OCCLUSION_QUERY:
+ return 1;
+ case PIPE_CAP_STREAM_OUTPUT:
+ return 0;
+ case PIPE_CAP_BLEND_EQUATION_SEPARATE:
+ case PIPE_CAP_INDEP_BLEND_ENABLE:
+ case PIPE_CAP_INDEP_BLEND_FUNC:
+ return 1;
+ case PIPE_CAP_TGSI_FS_COORD_ORIGIN_UPPER_LEFT:
+ case PIPE_CAP_TGSI_FS_COORD_PIXEL_CENTER_HALF_INTEGER:
+ return 1;
+ case PIPE_CAP_TGSI_FS_COORD_ORIGIN_LOWER_LEFT:
+ case PIPE_CAP_TGSI_FS_COORD_PIXEL_CENTER_INTEGER:
+ return 0;
+ case PIPE_CAP_SHADER_STENCIL_EXPORT:
+ return 0;
+ case PIPE_CAP_PRIMITIVE_RESTART:
+ case PIPE_CAP_TGSI_INSTANCEID:
+ case PIPE_CAP_VERTEX_ELEMENT_INSTANCE_DIVISOR:
+ return 1;
+ default:
+ NOUVEAU_ERR("unknown PIPE_CAP %d\n", param);
+ return 0;
+ }
+}
+
+static int
+nvc0_screen_get_shader_param(struct pipe_screen *pscreen, unsigned shader,
+ enum pipe_shader_cap param)
+{
+ switch (shader) {
+ case PIPE_SHADER_VERTEX:
+ /*
+ case PIPE_SHADER_TESSELLATION_CONTROL:
+ case PIPE_SHADER_TESSELLATION_EVALUATION:
+ */
+ case PIPE_SHADER_GEOMETRY:
+ case PIPE_SHADER_FRAGMENT:
+ break;
+ default:
+ return 0;
+ }
+
+ switch (param) {
+ case PIPE_SHADER_CAP_MAX_INSTRUCTIONS:
+ case PIPE_SHADER_CAP_MAX_ALU_INSTRUCTIONS:
+ case PIPE_SHADER_CAP_MAX_TEX_INSTRUCTIONS:
+ case PIPE_SHADER_CAP_MAX_TEX_INDIRECTIONS:
+ return 16384;
+ case PIPE_SHADER_CAP_MAX_CONTROL_FLOW_DEPTH:
+ return 4;
+ case PIPE_SHADER_CAP_MAX_INPUTS:
+ if (shader == PIPE_SHADER_VERTEX)
+ return 32;
+ return 0x300 / 16;
+ case PIPE_SHADER_CAP_MAX_CONSTS:
+ return 65536 / 16;
+ case PIPE_SHADER_CAP_MAX_CONST_BUFFERS:
+ return 14;
+ case PIPE_SHADER_CAP_MAX_ADDRS:
+ return 1;
+ case PIPE_SHADER_CAP_INDIRECT_INPUT_ADDR:
+ case PIPE_SHADER_CAP_INDIRECT_OUTPUT_ADDR:
+ return shader != PIPE_SHADER_FRAGMENT;
+ case PIPE_SHADER_CAP_INDIRECT_TEMP_ADDR:
+ case PIPE_SHADER_CAP_INDIRECT_CONST_ADDR:
+ return 1;
+ case PIPE_SHADER_CAP_MAX_PREDS:
+ return 0;
+ case PIPE_SHADER_CAP_MAX_TEMPS:
+ return NVC0_CAP_MAX_PROGRAM_TEMPS;
+ case PIPE_SHADER_CAP_TGSI_CONT_SUPPORTED:
+ return 1;
+ case PIPE_SHADER_CAP_SUBROUTINES:
+ return 0; /* please inline, or provide function declarations */
+ default:
+ NOUVEAU_ERR("unknown PIPE_SHADER_CAP %d\n", param);
+ return 0;
+ }
+}
+
+static float
+nvc0_screen_get_paramf(struct pipe_screen *pscreen, enum pipe_cap param)
+{
+ switch (param) {
+ case PIPE_CAP_MAX_LINE_WIDTH:
+ case PIPE_CAP_MAX_LINE_WIDTH_AA:
+ return 10.0f;
+ case PIPE_CAP_MAX_POINT_WIDTH:
+ case PIPE_CAP_MAX_POINT_WIDTH_AA:
+ return 64.0f;
+ case PIPE_CAP_MAX_TEXTURE_ANISOTROPY:
+ return 16.0f;
+ case PIPE_CAP_MAX_TEXTURE_LOD_BIAS:
+ return 4.0f;
+ default:
+ NOUVEAU_ERR("unknown PIPE_CAP %d\n", param);
+ return 0.0f;
+ }
+}
+
+static void
+nvc0_screen_destroy(struct pipe_screen *pscreen)
+{
+ struct nvc0_screen *screen = nvc0_screen(pscreen);
+
+ nouveau_fence_wait(screen->base.fence.current);
+ nouveau_fence_ref(NULL, &screen->base.fence.current);
+
+ nouveau_bo_ref(NULL, &screen->text);
+ nouveau_bo_ref(NULL, &screen->tls);
+ nouveau_bo_ref(NULL, &screen->txc);
+ nouveau_bo_ref(NULL, &screen->fence.bo);
+ nouveau_bo_ref(NULL, &screen->vfetch_cache);
+
+ nouveau_resource_destroy(&screen->text_heap);
+
+ if (screen->tic.entries)
+ FREE(screen->tic.entries);
+
+ nouveau_mm_destroy(screen->mm_VRAM_fe0);
+
+ nouveau_grobj_free(&screen->fermi);
+ nouveau_grobj_free(&screen->eng2d);
+ nouveau_grobj_free(&screen->m2mf);
+
+ nouveau_screen_fini(&screen->base);
+
+ FREE(screen);
+}
+
+static int
+nvc0_graph_set_macro(struct nvc0_screen *screen, uint32_t m, unsigned pos,
+ unsigned size, const uint32_t *data)
+{
+ struct nouveau_channel *chan = screen->base.channel;
+
+ size /= 4;
+
+ BEGIN_RING(chan, RING_3D_(NVC0_GRAPH_MACRO_ID), 2);
+ OUT_RING (chan, (m - 0x3800) / 8);
+ OUT_RING (chan, pos);
+ BEGIN_RING_1I(chan, RING_3D_(NVC0_GRAPH_MACRO_UPLOAD_POS), size + 1);
+ OUT_RING (chan, pos);
+ OUT_RINGp (chan, data, size);
+
+ return pos + size;
+}
+
+static void
+nvc0_magic_3d_init(struct nouveau_channel *chan)
+{
+ BEGIN_RING(chan, RING_3D_(0x10cc), 1);
+ OUT_RING (chan, 0xff);
+ BEGIN_RING(chan, RING_3D_(0x10e0), 2);
+ OUT_RING(chan, 0xff);
+ OUT_RING(chan, 0xff);
+ BEGIN_RING(chan, RING_3D_(0x10ec), 2);
+ OUT_RING(chan, 0xff);
+ OUT_RING(chan, 0xff);
+ BEGIN_RING(chan, RING_3D_(0x074c), 1);
+ OUT_RING (chan, 0x3f);
+
+ BEGIN_RING(chan, RING_3D_(0x16a8), 1);
+ OUT_RING (chan, (3 << 16) | 3);
+ BEGIN_RING(chan, RING_3D_(0x1794), 1);
+ OUT_RING (chan, (2 << 16) | 2);
+ BEGIN_RING(chan, RING_3D_(0x0de8), 1);
+ OUT_RING (chan, 1);
+
+#if 0 /* software method */
+ BEGIN_RING(chan, RING_3D_(0x1528), 1); /* MP poke */
+ OUT_RING (chan, 0);
+#endif
+
+ BEGIN_RING(chan, RING_3D_(0x12ac), 1);
+ OUT_RING (chan, 0);
+ BEGIN_RING(chan, RING_3D_(0x0218), 1);
+ OUT_RING (chan, 0x10);
+ BEGIN_RING(chan, RING_3D_(0x10fc), 1);
+ OUT_RING (chan, 0x10);
+ BEGIN_RING(chan, RING_3D_(0x1290), 1);
+ OUT_RING (chan, 0x10);
+ BEGIN_RING(chan, RING_3D_(0x12d8), 2);
+ OUT_RING (chan, 0x10);
+ OUT_RING (chan, 0x10);
+ BEGIN_RING(chan, RING_3D_(0x06d4), 1);
+ OUT_RING (chan, 8);
+ BEGIN_RING(chan, RING_3D_(0x1140), 1);
+ OUT_RING (chan, 0x10);
+ BEGIN_RING(chan, RING_3D_(0x1610), 1);
+ OUT_RING (chan, 0xe);
+
+ BEGIN_RING(chan, RING_3D_(0x164c), 1);
+ OUT_RING (chan, 1 << 12);
+ BEGIN_RING(chan, RING_3D_(0x151c), 1);
+ OUT_RING (chan, 1);
+ BEGIN_RING(chan, RING_3D_(0x020c), 1);
+ OUT_RING (chan, 1);
+ BEGIN_RING(chan, RING_3D_(0x030c), 1);
+ OUT_RING (chan, 0);
+ BEGIN_RING(chan, RING_3D_(0x0300), 1);
+ OUT_RING (chan, 3);
+#if 0 /* software method */
+ BEGIN_RING(chan, RING_3D_(0x1280), 1); /* PGRAPH poke */
+ OUT_RING (chan, 0);
+#endif
+ BEGIN_RING(chan, RING_3D_(0x02d0), 1);
+ OUT_RING (chan, 0x1f40);
+ BEGIN_RING(chan, RING_3D_(0x00fdc), 1);
+ OUT_RING (chan, 1);
+ BEGIN_RING(chan, RING_3D_(0x19c0), 1);
+ OUT_RING (chan, 1);
+ BEGIN_RING(chan, RING_3D_(0x075c), 1);
+ OUT_RING (chan, 3);
+
+ BEGIN_RING(chan, RING_3D_(0x0fac), 1);
+ OUT_RING (chan, 0);
+ BEGIN_RING(chan, RING_3D_(0x0f90), 1);
+ OUT_RING (chan, 0);
+}
+
+static void
+nvc0_screen_fence_emit(struct pipe_screen *pscreen, u32 sequence)
+{
+ struct nvc0_screen *screen = nvc0_screen(pscreen);
+ struct nouveau_channel *chan = screen->base.channel;
+
+ MARK_RING (chan, 5, 2);
+ BEGIN_RING(chan, RING_3D(QUERY_ADDRESS_HIGH), 4);
+ OUT_RELOCh(chan, screen->fence.bo, 0, NOUVEAU_BO_WR);
+ OUT_RELOCl(chan, screen->fence.bo, 0, NOUVEAU_BO_WR);
+ OUT_RING (chan, sequence);
+ OUT_RING (chan, NVC0_3D_QUERY_GET_FENCE | NVC0_3D_QUERY_GET_SHORT |
+ (0xf << NVC0_3D_QUERY_GET_UNIT__SHIFT));
+}
+
+static u32
+nvc0_screen_fence_update(struct pipe_screen *pscreen)
+{
+ struct nvc0_screen *screen = nvc0_screen(pscreen);
+ return screen->fence.map[0];
+}
+
+#define FAIL_SCREEN_INIT(str, err) \
+ do { \
+ NOUVEAU_ERR(str, err); \
+ nvc0_screen_destroy(pscreen); \
+ return NULL; \
+ } while(0)
+
+struct pipe_screen *
+nvc0_screen_create(struct pipe_winsys *ws, struct nouveau_device *dev)
+{
+ struct nvc0_screen *screen;
+ struct nouveau_channel *chan;
+ struct pipe_screen *pscreen;
+ int ret;
+ unsigned i;
+
+ screen = CALLOC_STRUCT(nvc0_screen);
+ if (!screen)
+ return NULL;
+ pscreen = &screen->base.base;
+
+ screen->base.sysmem_bindings = PIPE_BIND_CONSTANT_BUFFER;
+
+ ret = nouveau_screen_init(&screen->base, dev);
+ if (ret) {
+ nvc0_screen_destroy(pscreen);
+ return NULL;
+ }
+ chan = screen->base.channel;
+
+ pscreen->winsys = ws;
+ pscreen->destroy = nvc0_screen_destroy;
+ pscreen->context_create = nvc0_create;
+ pscreen->is_format_supported = nvc0_screen_is_format_supported;
+ pscreen->get_param = nvc0_screen_get_param;
+ pscreen->get_shader_param = nvc0_screen_get_shader_param;
+ pscreen->get_paramf = nvc0_screen_get_paramf;
+
+ nvc0_screen_init_resource_functions(pscreen);
+
+ ret = nouveau_bo_new(dev, NOUVEAU_BO_GART | NOUVEAU_BO_MAP, 0, 4096,
+ &screen->fence.bo);
+ if (ret)
+ goto fail;
+ nouveau_bo_map(screen->fence.bo, NOUVEAU_BO_RDWR);
+ screen->fence.map = screen->fence.bo->map;
+ nouveau_bo_unmap(screen->fence.bo);
+ screen->base.fence.emit = nvc0_screen_fence_emit;
+ screen->base.fence.update = nvc0_screen_fence_update;
+
+ for (i = 0; i < NVC0_SCRATCH_NR_BUFFERS; ++i) {
+ ret = nouveau_bo_new(dev, NOUVEAU_BO_GART, 0, NVC0_SCRATCH_SIZE,
+ &screen->scratch.bo[i]);
+ if (ret)
+ goto fail;
+ }
+
+ ret = nouveau_grobj_alloc(chan, 0xbeef9039, NVC0_M2MF, &screen->m2mf);
+ if (ret)
+ FAIL_SCREEN_INIT("Error allocating PGRAPH context for M2MF: %d\n", ret);
+
+ BIND_RING (chan, screen->m2mf, NVC0_SUBCH_MF);
+ BEGIN_RING(chan, RING_MF(NOTIFY_ADDRESS_HIGH), 3);
+ OUT_RELOCh(chan, screen->fence.bo, 16, NOUVEAU_BO_GART | NOUVEAU_BO_RDWR);
+ OUT_RELOCl(chan, screen->fence.bo, 16, NOUVEAU_BO_GART | NOUVEAU_BO_RDWR);
+ OUT_RING (chan, 0);
+
+ ret = nouveau_grobj_alloc(chan, 0xbeef902d, NVC0_2D, &screen->eng2d);
+ if (ret)
+ FAIL_SCREEN_INIT("Error allocating PGRAPH context for 2D: %d\n", ret);
+
+ BIND_RING (chan, screen->eng2d, NVC0_SUBCH_2D);
+ BEGIN_RING(chan, RING_2D(OPERATION), 1);
+ OUT_RING (chan, NVC0_2D_OPERATION_SRCCOPY);
+ BEGIN_RING(chan, RING_2D(CLIP_ENABLE), 1);
+ OUT_RING (chan, 0);
+ BEGIN_RING(chan, RING_2D(COLOR_KEY_ENABLE), 1);
+ OUT_RING (chan, 0);
+ BEGIN_RING(chan, RING_2D_(0x0884), 1);
+ OUT_RING (chan, 0x3f);
+ BEGIN_RING(chan, RING_2D_(0x0888), 1);
+ OUT_RING (chan, 1);
+
+ ret = nouveau_grobj_alloc(chan, 0xbeef9097, NVC0_3D, &screen->fermi);
+ if (ret)
+ FAIL_SCREEN_INIT("Error allocating PGRAPH context for 3D: %d\n", ret);
+
+ BIND_RING (chan, screen->fermi, NVC0_SUBCH_3D);
+ BEGIN_RING(chan, RING_3D(NOTIFY_ADDRESS_HIGH), 3);
+ OUT_RELOCh(chan, screen->fence.bo, 32, NOUVEAU_BO_GART | NOUVEAU_BO_RDWR);
+ OUT_RELOCl(chan, screen->fence.bo, 32, NOUVEAU_BO_GART | NOUVEAU_BO_RDWR);
+ OUT_RING (chan, 0);
+
+ BEGIN_RING(chan, RING_3D(COND_MODE), 1);
+ OUT_RING (chan, NVC0_3D_COND_MODE_ALWAYS);
+
+ BEGIN_RING(chan, RING_3D(RT_CONTROL), 1);
+ OUT_RING (chan, 1);
+
+ BEGIN_RING(chan, RING_3D(CSAA_ENABLE), 1);
+ OUT_RING (chan, 0);
+ BEGIN_RING(chan, RING_3D(MULTISAMPLE_ENABLE), 1);
+ OUT_RING (chan, 0);
+ BEGIN_RING(chan, RING_3D(MULTISAMPLE_MODE), 1);
+ OUT_RING (chan, NVC0_3D_MULTISAMPLE_MODE_1X);
+ BEGIN_RING(chan, RING_3D(MULTISAMPLE_CTRL), 1);
+ OUT_RING (chan, 0);
+
+ nvc0_magic_3d_init(chan);
+
+ ret = nouveau_bo_new(dev, NOUVEAU_BO_VRAM, 1 << 17, 1 << 20, &screen->text);
+ if (ret)
+ goto fail;
+
+ nouveau_resource_init(&screen->text_heap, 0, 1 << 20);
+
+ ret = nouveau_bo_new(dev, NOUVEAU_BO_VRAM, 1 << 12, 6 << 16,
+ &screen->uniforms);
+ if (ret)
+ goto fail;
+
+ /* auxiliary constants (6 user clip planes, base instance id) */
+ BEGIN_RING(chan, RING_3D(CB_SIZE), 3);
+ OUT_RING (chan, 256);
+ OUT_RELOCh(chan, screen->uniforms, 5 << 16, NOUVEAU_BO_VRAM | NOUVEAU_BO_RD);
+ OUT_RELOCl(chan, screen->uniforms, 5 << 16, NOUVEAU_BO_VRAM | NOUVEAU_BO_RD);
+ for (i = 0; i < 5; ++i) {
+ BEGIN_RING(chan, RING_3D(CB_BIND(i)), 1);
+ OUT_RING (chan, (15 << 4) | 1);
+ }
+
+ screen->tls_size = (16 * 32) * (NVC0_CAP_MAX_PROGRAM_TEMPS * 16);
+ ret = nouveau_bo_new(dev, NOUVEAU_BO_VRAM, 1 << 17,
+ screen->tls_size, &screen->tls);
+ if (ret)
+ goto fail;
+
+ BEGIN_RING(chan, RING_3D(CODE_ADDRESS_HIGH), 2);
+ OUT_RELOCh(chan, screen->text, 0, NOUVEAU_BO_VRAM | NOUVEAU_BO_RD);
+ OUT_RELOCl(chan, screen->text, 0, NOUVEAU_BO_VRAM | NOUVEAU_BO_RD);
+ BEGIN_RING(chan, RING_3D(LOCAL_ADDRESS_HIGH), 4);
+ OUT_RELOCh(chan, screen->tls, 0, NOUVEAU_BO_VRAM | NOUVEAU_BO_RDWR);
+ OUT_RELOCl(chan, screen->tls, 0, NOUVEAU_BO_VRAM | NOUVEAU_BO_RDWR);
+ OUT_RING (chan, screen->tls_size >> 32);
+ OUT_RING (chan, screen->tls_size);
+ BEGIN_RING(chan, RING_3D_(0x07a0), 1);
+ OUT_RING (chan, 0);
+ BEGIN_RING(chan, RING_3D(LOCAL_BASE), 1);
+ OUT_RING (chan, 0);
+
+ for (i = 0; i < 5; ++i) {
+ BEGIN_RING(chan, RING_3D(TEX_LIMITS(i)), 1);
+ OUT_RING (chan, 0x54);
+ }
+ BEGIN_RING(chan, RING_3D(LINKED_TSC), 1);
+ OUT_RING (chan, 0);
+
+ ret = nouveau_bo_new(dev, NOUVEAU_BO_VRAM, 1 << 17, 1 << 20,
+ &screen->vfetch_cache);
+ if (ret)
+ goto fail;
+
+ BEGIN_RING(chan, RING_3D(VERTEX_QUARANTINE_ADDRESS_HIGH), 3);
+ OUT_RELOCh(chan, screen->vfetch_cache, 0, NOUVEAU_BO_VRAM | NOUVEAU_BO_RDWR);
+ OUT_RELOCl(chan, screen->vfetch_cache, 0, NOUVEAU_BO_VRAM | NOUVEAU_BO_RDWR);
+ OUT_RING (chan, 3);
+
+ ret = nouveau_bo_new(dev, NOUVEAU_BO_VRAM, 1 << 17, 1 << 17, &screen->txc);
+ if (ret)
+ goto fail;
+
+ BEGIN_RING(chan, RING_3D(TIC_ADDRESS_HIGH), 3);
+ OUT_RELOCh(chan, screen->txc, 0, NOUVEAU_BO_VRAM | NOUVEAU_BO_RD);
+ OUT_RELOCl(chan, screen->txc, 0, NOUVEAU_BO_VRAM | NOUVEAU_BO_RD);
+ OUT_RING (chan, NVC0_TIC_MAX_ENTRIES - 1);
+
+ BEGIN_RING(chan, RING_3D(TSC_ADDRESS_HIGH), 3);
+ OUT_RELOCh(chan, screen->txc, 65536, NOUVEAU_BO_VRAM | NOUVEAU_BO_RD);
+ OUT_RELOCl(chan, screen->txc, 65536, NOUVEAU_BO_VRAM | NOUVEAU_BO_RD);
+ OUT_RING (chan, NVC0_TSC_MAX_ENTRIES - 1);
+
+ BEGIN_RING(chan, RING_3D(SCREEN_Y_CONTROL), 1);
+ OUT_RING (chan, 0);
+ BEGIN_RING(chan, RING_3D(WINDOW_OFFSET_X), 2);
+ OUT_RING (chan, 0);
+ OUT_RING (chan, 0);
+ BEGIN_RING(chan, RING_3D_(0x1590), 1); /* deactivate ZCULL */
+ OUT_RING (chan, 0x3f);
+
+ BEGIN_RING(chan, RING_3D(CLIP_RECTS_MODE), 1);
+ OUT_RING (chan, NVC0_3D_CLIP_RECTS_MODE_INSIDE_ANY);
+ BEGIN_RING(chan, RING_3D(CLIP_RECT_HORIZ(0)), 8 * 2);
+ for (i = 0; i < 8 * 2; ++i)
+ OUT_RING(chan, 0);
+ BEGIN_RING(chan, RING_3D(CLIP_RECTS_EN), 1);
+ OUT_RING (chan, 0);
+ BEGIN_RING(chan, RING_3D(CLIPID_ENABLE), 1);
+ OUT_RING (chan, 0);
+
+ /* neither scissors, viewport nor stencil mask should affect clears */
+ BEGIN_RING(chan, RING_3D(CLEAR_FLAGS), 1);
+ OUT_RING (chan, 0);
+
+ BEGIN_RING(chan, RING_3D(VIEWPORT_TRANSFORM_EN), 1);
+ OUT_RING (chan, 1);
+ BEGIN_RING(chan, RING_3D(DEPTH_RANGE_NEAR(0)), 2);
+ OUT_RINGf (chan, 0.0f);
+ OUT_RINGf (chan, 1.0f);
+ BEGIN_RING(chan, RING_3D(VIEW_VOLUME_CLIP_CTRL), 1);
+ OUT_RING (chan, NVC0_3D_VIEW_VOLUME_CLIP_CTRL_UNK1_UNK1);
+
+ /* We use scissors instead of exact view volume clipping,
+ * so they're always enabled.
+ */
+ BEGIN_RING(chan, RING_3D(SCISSOR_ENABLE(0)), 3);
+ OUT_RING (chan, 1);
+ OUT_RING (chan, 8192 << 16);
+ OUT_RING (chan, 8192 << 16);
+
+ BEGIN_RING(chan, RING_3D_(0x0fac), 1);
+ OUT_RING (chan, 0);
+ BEGIN_RING(chan, RING_3D_(0x3484), 1);
+ OUT_RING (chan, 0);
+ BEGIN_RING(chan, RING_3D_(0x0dbc), 1);
+ OUT_RING (chan, 0x00010000);
+ BEGIN_RING(chan, RING_3D_(0x0dd8), 1);
+ OUT_RING (chan, 0xff800006);
+ BEGIN_RING(chan, RING_3D_(0x3488), 1);
+ OUT_RING (chan, 0);
+
+#define MK_MACRO(m, n) i = nvc0_graph_set_macro(screen, m, i, sizeof(n), n);
+
+ i = 0;
+ MK_MACRO(NVC0_3D_BLEND_ENABLES, nvc0_9097_blend_enables);
+ MK_MACRO(NVC0_3D_VERTEX_ARRAY_SELECT, nvc0_9097_vertex_array_select);
+ MK_MACRO(NVC0_3D_TEP_SELECT, nvc0_9097_tep_select);
+ MK_MACRO(NVC0_3D_GP_SELECT, nvc0_9097_gp_select);
+ MK_MACRO(NVC0_3D_POLYGON_MODE_FRONT, nvc0_9097_poly_mode_front);
+ MK_MACRO(NVC0_3D_POLYGON_MODE_BACK, nvc0_9097_poly_mode_back);
+ MK_MACRO(NVC0_3D_COLOR_MASK_BROADCAST, nvc0_9097_color_mask_brdc);
+
+ BEGIN_RING(chan, RING_3D(RASTERIZE_ENABLE), 1);
+ OUT_RING (chan, 1);
+ BEGIN_RING(chan, RING_3D(GP_SELECT), 1);
+ OUT_RING (chan, 0x40);
+ BEGIN_RING(chan, RING_3D(LAYER), 1);
+ OUT_RING (chan, 0);
+ BEGIN_RING(chan, RING_3D(TEP_SELECT), 1);
+ OUT_RING (chan, 0x30);
+ BEGIN_RING(chan, RING_3D(PATCH_VERTICES), 1);
+ OUT_RING (chan, 3);
+ BEGIN_RING(chan, RING_3D(SP_SELECT(2)), 1);
+ OUT_RING (chan, 0x20);
+ BEGIN_RING(chan, RING_3D(SP_SELECT(0)), 1);
+ OUT_RING (chan, 0x00);
+
+ BEGIN_RING(chan, RING_3D(POINT_COORD_REPLACE), 1);
+ OUT_RING (chan, 0);
+ BEGIN_RING(chan, RING_3D(POINT_RASTER_RULES), 1);
+ OUT_RING (chan, NVC0_3D_POINT_RASTER_RULES_OGL);
+
+ BEGIN_RING(chan, RING_3D(FRAG_COLOR_CLAMP_EN), 1);
+ OUT_RING (chan, 0x11111111);
+ BEGIN_RING(chan, RING_3D(EDGEFLAG_ENABLE), 1);
+ OUT_RING (chan, 1);
+
+ BEGIN_RING(chan, RING_3D(VERTEX_RUNOUT_ADDRESS_HIGH), 2);
+ OUT_RING (chan, 0xab);
+ OUT_RING (chan, 0x00000000);
+
+ FIRE_RING (chan);
+
+ screen->tic.entries = CALLOC(4096, sizeof(void *));
+ screen->tsc.entries = screen->tic.entries + 2048;
+
+ screen->mm_VRAM_fe0 = nouveau_mm_create(dev, NOUVEAU_BO_VRAM, 0xfe0);
+
+ nouveau_fence_new(&screen->base, &screen->base.fence.current, FALSE);
+
+ return pscreen;
+
+fail:
+ nvc0_screen_destroy(pscreen);
+ return NULL;
+}
+
+void
+nvc0_screen_make_buffers_resident(struct nvc0_screen *screen)
+{
+ struct nouveau_channel *chan = screen->base.channel;
+
+ const unsigned flags = NOUVEAU_BO_VRAM | NOUVEAU_BO_RD;
+
+ MARK_RING(chan, 5, 5);
+ nouveau_bo_validate(chan, screen->text, flags);
+ nouveau_bo_validate(chan, screen->uniforms, flags);
+ nouveau_bo_validate(chan, screen->txc, flags);
+ nouveau_bo_validate(chan, screen->vfetch_cache, flags);
+
+ if (screen->cur_ctx && screen->cur_ctx->state.tls_required)
+ nouveau_bo_validate(chan, screen->tls, flags);
+}
+
+int
+nvc0_screen_tic_alloc(struct nvc0_screen *screen, void *entry)
+{
+ int i = screen->tic.next;
+
+ while (screen->tic.lock[i / 32] & (1 << (i % 32)))
+ i = (i + 1) & (NVC0_TIC_MAX_ENTRIES - 1);
+
+ screen->tic.next = (i + 1) & (NVC0_TIC_MAX_ENTRIES - 1);
+
+ if (screen->tic.entries[i])
+ nv50_tic_entry(screen->tic.entries[i])->id = -1;
+
+ screen->tic.entries[i] = entry;
+ return i;
+}
+
+int
+nvc0_screen_tsc_alloc(struct nvc0_screen *screen, void *entry)
+{
+ int i = screen->tsc.next;
+
+ while (screen->tsc.lock[i / 32] & (1 << (i % 32)))
+ i = (i + 1) & (NVC0_TSC_MAX_ENTRIES - 1);
+
+ screen->tsc.next = (i + 1) & (NVC0_TSC_MAX_ENTRIES - 1);
+
+ if (screen->tsc.entries[i])
+ nv50_tsc_entry(screen->tsc.entries[i])->id = -1;
+
+ screen->tsc.entries[i] = entry;
+ return i;
+}
diff --git a/src/gallium/drivers/nvc0/nvc0_screen.h b/src/gallium/drivers/nvc0/nvc0_screen.h
new file mode 100644
index 00000000000..94bf0cf3481
--- /dev/null
+++ b/src/gallium/drivers/nvc0/nvc0_screen.h
@@ -0,0 +1,148 @@
+#ifndef __NVC0_SCREEN_H__
+#define __NVC0_SCREEN_H__
+
+#define NOUVEAU_NVC0
+#include "nouveau/nouveau_screen.h"
+#include "nouveau/nouveau_mm.h"
+#undef NOUVEAU_NVC0
+#include "nvc0_winsys.h"
+#include "nvc0_stateobj.h"
+
+#define NVC0_TIC_MAX_ENTRIES 2048
+#define NVC0_TSC_MAX_ENTRIES 2048
+
+struct nvc0_context;
+
+#define NVC0_SCRATCH_SIZE (2 << 20)
+#define NVC0_SCRATCH_NR_BUFFERS 2
+
+struct nvc0_screen {
+ struct nouveau_screen base;
+ struct nouveau_winsys *nvws;
+
+ struct nvc0_context *cur_ctx;
+
+ struct nouveau_bo *text;
+ struct nouveau_bo *uniforms;
+ struct nouveau_bo *tls;
+ struct nouveau_bo *txc; /* TIC (offset 0) and TSC (65536) */
+ struct nouveau_bo *vfetch_cache;
+
+ uint64_t tls_size;
+
+ struct nouveau_resource *text_heap;
+
+ struct {
+ struct nouveau_bo *bo[NVC0_SCRATCH_NR_BUFFERS];
+ uint8_t *buf;
+ int index;
+ uint32_t offset;
+ } scratch;
+
+ struct {
+ void **entries;
+ int next;
+ uint32_t lock[NVC0_TIC_MAX_ENTRIES / 32];
+ } tic;
+
+ struct {
+ void **entries;
+ int next;
+ uint32_t lock[NVC0_TSC_MAX_ENTRIES / 32];
+ } tsc;
+
+ struct {
+ struct nouveau_bo *bo;
+ uint32_t *map;
+ } fence;
+
+ struct nouveau_mman *mm_VRAM_fe0;
+
+ struct nouveau_grobj *fermi;
+ struct nouveau_grobj *eng2d;
+ struct nouveau_grobj *m2mf;
+};
+
+static INLINE struct nvc0_screen *
+nvc0_screen(struct pipe_screen *screen)
+{
+ return (struct nvc0_screen *)screen;
+}
+
+void nvc0_screen_make_buffers_resident(struct nvc0_screen *);
+
+int nvc0_screen_tic_alloc(struct nvc0_screen *, void *);
+int nvc0_screen_tsc_alloc(struct nvc0_screen *, void *);
+
+static INLINE void
+nvc0_resource_fence(struct nv04_resource *res, uint32_t flags)
+{
+ struct nvc0_screen *screen = nvc0_screen(res->base.screen);
+
+ if (res->mm) {
+ nouveau_fence_ref(screen->base.fence.current, &res->fence);
+
+ if (flags & NOUVEAU_BO_WR)
+ nouveau_fence_ref(screen->base.fence.current, &res->fence_wr);
+ }
+}
+
+static INLINE void
+nvc0_resource_validate(struct nv04_resource *res, uint32_t flags)
+{
+ struct nvc0_screen *screen = nvc0_screen(res->base.screen);
+
+ if (likely(res->bo)) {
+ nouveau_bo_validate(screen->base.channel, res->bo, flags);
+
+ if (flags & NOUVEAU_BO_WR)
+ res->status |= NOUVEAU_BUFFER_STATUS_GPU_WRITING;
+ if (flags & NOUVEAU_BO_RD)
+ res->status |= NOUVEAU_BUFFER_STATUS_GPU_READING;
+
+ nvc0_resource_fence(res, flags);
+ }
+}
+
+struct nvc0_format {
+ uint32_t rt;
+ uint32_t tic;
+ uint32_t vtx;
+ uint32_t usage;
+};
+
+extern const struct nvc0_format nvc0_format_table[];
+
+static INLINE void
+nvc0_screen_tic_unlock(struct nvc0_screen *screen, struct nv50_tic_entry *tic)
+{
+ if (tic->id >= 0)
+ screen->tic.lock[tic->id / 32] &= ~(1 << (tic->id % 32));
+}
+
+static INLINE void
+nvc0_screen_tsc_unlock(struct nvc0_screen *screen, struct nv50_tsc_entry *tsc)
+{
+ if (tsc->id >= 0)
+ screen->tsc.lock[tsc->id / 32] &= ~(1 << (tsc->id % 32));
+}
+
+static INLINE void
+nvc0_screen_tic_free(struct nvc0_screen *screen, struct nv50_tic_entry *tic)
+{
+ if (tic->id >= 0) {
+ screen->tic.entries[tic->id] = NULL;
+ screen->tic.lock[tic->id / 32] &= ~(1 << (tic->id % 32));
+ }
+}
+
+static INLINE void
+nvc0_screen_tsc_free(struct nvc0_screen *screen, struct nv50_tsc_entry *tsc)
+{
+ if (tsc->id >= 0) {
+ screen->tsc.entries[tsc->id] = NULL;
+ screen->tsc.lock[tsc->id / 32] &= ~(1 << (tsc->id % 32));
+ }
+}
+
+#endif
diff --git a/src/gallium/drivers/nvc0/nvc0_shader_state.c b/src/gallium/drivers/nvc0/nvc0_shader_state.c
new file mode 100644
index 00000000000..7294eaa222e
--- /dev/null
+++ b/src/gallium/drivers/nvc0/nvc0_shader_state.c
@@ -0,0 +1,249 @@
+/*
+ * Copyright 2010 Christoph Bumiller
+ *
+ * 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 "pipe/p_context.h"
+#include "pipe/p_defines.h"
+#include "pipe/p_state.h"
+#include "util/u_inlines.h"
+
+#include "nvc0_context.h"
+
+static INLINE void
+nvc0_program_update_context_state(struct nvc0_context *nvc0,
+ struct nvc0_program *prog, int stage)
+{
+ if (prog->hdr[1])
+ nvc0->state.tls_required |= 1 << stage;
+ else
+ nvc0->state.tls_required &= ~(1 << stage);
+}
+
+static boolean
+nvc0_program_validate(struct nvc0_context *nvc0, struct nvc0_program *prog)
+{
+ int ret;
+ unsigned size;
+
+ if (prog->translated)
+ return TRUE;
+
+ prog->translated = nvc0_program_translate(prog);
+ if (!prog->translated)
+ return FALSE;
+
+ size = align(prog->code_size + NVC0_SHADER_HEADER_SIZE, 0x100);
+
+ ret = nouveau_resource_alloc(nvc0->screen->text_heap, size, prog,
+ &prog->res);
+ if (ret)
+ return FALSE;
+
+ prog->code_base = prog->res->start;
+
+ nvc0_m2mf_push_linear(&nvc0->base, nvc0->screen->text, prog->code_base,
+ NOUVEAU_BO_VRAM, NVC0_SHADER_HEADER_SIZE, prog->hdr);
+ nvc0_m2mf_push_linear(&nvc0->base, nvc0->screen->text,
+ prog->code_base + NVC0_SHADER_HEADER_SIZE,
+ NOUVEAU_BO_VRAM, prog->code_size, prog->code);
+
+ BEGIN_RING(nvc0->screen->base.channel, RING_3D(MEM_BARRIER), 1);
+ OUT_RING (nvc0->screen->base.channel, 0x1111);
+
+ return TRUE;
+}
+
+void
+nvc0_vertprog_validate(struct nvc0_context *nvc0)
+{
+ struct nouveau_channel *chan = nvc0->screen->base.channel;
+ struct nvc0_program *vp = nvc0->vertprog;
+
+ if (nvc0->clip.nr > vp->vp.num_ucps) {
+ assert(nvc0->clip.nr <= 6);
+ vp->vp.num_ucps = 6;
+
+ if (vp->translated)
+ nvc0_program_destroy(nvc0, vp);
+ }
+
+ if (!nvc0_program_validate(nvc0, vp))
+ return;
+ nvc0_program_update_context_state(nvc0, vp, 0);
+
+ BEGIN_RING(chan, RING_3D(SP_SELECT(1)), 2);
+ OUT_RING (chan, 0x11);
+ OUT_RING (chan, vp->code_base);
+ BEGIN_RING(chan, RING_3D(SP_GPR_ALLOC(1)), 1);
+ OUT_RING (chan, vp->max_gpr);
+
+ // BEGIN_RING(chan, RING_3D_(0x163c), 1);
+ // OUT_RING (chan, 0);
+ BEGIN_RING(chan, RING_3D(VERT_COLOR_CLAMP_EN), 1);
+ OUT_RING (chan, 1);
+}
+
+void
+nvc0_fragprog_validate(struct nvc0_context *nvc0)
+{
+ struct nouveau_channel *chan = nvc0->screen->base.channel;
+ struct nvc0_program *fp = nvc0->fragprog;
+
+ if (!nvc0_program_validate(nvc0, fp))
+ return;
+ nvc0_program_update_context_state(nvc0, fp, 4);
+
+ BEGIN_RING(chan, RING_3D(SP_SELECT(5)), 2);
+ OUT_RING (chan, 0x51);
+ OUT_RING (chan, fp->code_base);
+ BEGIN_RING(chan, RING_3D(SP_GPR_ALLOC(5)), 1);
+ OUT_RING (chan, fp->max_gpr);
+
+ BEGIN_RING(chan, RING_3D_(0x0360), 2);
+ OUT_RING (chan, 0x20164010);
+ OUT_RING (chan, 0x20);
+ BEGIN_RING(chan, RING_3D_(0x196c), 1);
+ OUT_RING (chan, fp->flags[0]);
+}
+
+void
+nvc0_tctlprog_validate(struct nvc0_context *nvc0)
+{
+ struct nouveau_channel *chan = nvc0->screen->base.channel;
+ struct nvc0_program *tp = nvc0->tctlprog;
+
+ if (!tp) {
+ BEGIN_RING(chan, RING_3D(SP_SELECT(2)), 1);
+ OUT_RING (chan, 0x20);
+ return;
+ }
+ if (!nvc0_program_validate(nvc0, tp))
+ return;
+ nvc0_program_update_context_state(nvc0, tp, 1);
+
+ BEGIN_RING(chan, RING_3D(SP_SELECT(2)), 2);
+ OUT_RING (chan, 0x21);
+ OUT_RING (chan, tp->code_base);
+ BEGIN_RING(chan, RING_3D(SP_GPR_ALLOC(2)), 1);
+ OUT_RING (chan, tp->max_gpr);
+}
+
+void
+nvc0_tevlprog_validate(struct nvc0_context *nvc0)
+{
+ struct nouveau_channel *chan = nvc0->screen->base.channel;
+ struct nvc0_program *tp = nvc0->tevlprog;
+
+ if (!tp) {
+ BEGIN_RING(chan, RING_3D(TEP_SELECT), 1);
+ OUT_RING (chan, 0x30);
+ return;
+ }
+ if (!nvc0_program_validate(nvc0, tp))
+ return;
+ nvc0_program_update_context_state(nvc0, tp, 2);
+
+ BEGIN_RING(chan, RING_3D(TEP_SELECT), 1);
+ OUT_RING (chan, 0x31);
+ BEGIN_RING(chan, RING_3D(SP_START_ID(3)), 1);
+ OUT_RING (chan, tp->code_base);
+ BEGIN_RING(chan, RING_3D(SP_GPR_ALLOC(3)), 1);
+ OUT_RING (chan, tp->max_gpr);
+}
+
+void
+nvc0_gmtyprog_validate(struct nvc0_context *nvc0)
+{
+ struct nouveau_channel *chan = nvc0->screen->base.channel;
+ struct nvc0_program *gp = nvc0->gmtyprog;
+
+ if (!gp) {
+ BEGIN_RING(chan, RING_3D(GP_SELECT), 1);
+ OUT_RING (chan, 0x40);
+ return;
+ }
+ if (!nvc0_program_validate(nvc0, gp))
+ return;
+ nvc0_program_update_context_state(nvc0, gp, 3);
+
+ BEGIN_RING(chan, RING_3D(GP_SELECT), 1);
+ OUT_RING (chan, 0x41);
+ BEGIN_RING(chan, RING_3D(SP_START_ID(4)), 1);
+ OUT_RING (chan, gp->code_base);
+ BEGIN_RING(chan, RING_3D(SP_GPR_ALLOC(4)), 1);
+ OUT_RING (chan, gp->max_gpr);
+}
+
+/* It's *is* kind of shader related. We need to inspect the program
+ * to get the output locations right.
+ */
+void
+nvc0_tfb_validate(struct nvc0_context *nvc0)
+{
+ struct nouveau_channel *chan = nvc0->screen->base.channel;
+ struct nvc0_program *vp;
+ struct nvc0_transform_feedback_state *tfb = nvc0->tfb;
+ int b;
+
+ BEGIN_RING(chan, RING_3D(TFB_ENABLE), 1);
+ if (!tfb) {
+ OUT_RING(chan, 0);
+ return;
+ }
+ OUT_RING(chan, 1);
+
+ vp = nvc0->vertprog ? nvc0->vertprog : nvc0->gmtyprog;
+
+ for (b = 0; b < nvc0->num_tfbbufs; ++b) {
+ uint8_t idx, var[128];
+ int i, n;
+ struct nv04_resource *buf = nv04_resource(nvc0->tfbbuf[b]);
+
+ BEGIN_RING(chan, RING_3D(TFB_BUFFER_ENABLE(b)), 5);
+ OUT_RING (chan, 1);
+ OUT_RESRCh(chan, buf, nvc0->tfb_offset[b], NOUVEAU_BO_WR);
+ OUT_RESRCl(chan, buf, nvc0->tfb_offset[b], NOUVEAU_BO_WR);
+ OUT_RING (chan, buf->base.width0 - nvc0->tfb_offset[b]);
+ OUT_RING (chan, 0); /* TFB_PRIMITIVE_ID <- offset ? */
+
+ if (!(nvc0->dirty & NVC0_NEW_TFB))
+ continue;
+
+ BEGIN_RING(chan, RING_3D(TFB_UNK07X0(b)), 3);
+ OUT_RING (chan, 0);
+ OUT_RING (chan, tfb->varying_count[b]);
+ OUT_RING (chan, tfb->stride[b]);
+
+ n = b ? tfb->varying_count[b - 1] : 0;
+ i = 0;
+ for (; i < tfb->varying_count[b]; ++i) {
+ idx = tfb->varying_index[n + i];
+ var[i] = vp->vp.out_pos[idx >> 2] + (idx & 3);
+ }
+ for (; i & 3; ++i)
+ var[i] = 0;
+
+ BEGIN_RING(chan, RING_3D(TFB_VARYING_LOCS(b, 0)), i / 4);
+ OUT_RINGp (chan, var, i / 4);
+ }
+ for (; b < 4; ++b)
+ IMMED_RING(chan, RING_3D(TFB_BUFFER_ENABLE(b)), 0);
+}
diff --git a/src/gallium/drivers/nvc0/nvc0_state.c b/src/gallium/drivers/nvc0/nvc0_state.c
new file mode 100644
index 00000000000..ab68abcfb5a
--- /dev/null
+++ b/src/gallium/drivers/nvc0/nvc0_state.c
@@ -0,0 +1,860 @@
+/*
+ * Copyright 2010 Christoph Bumiller
+ *
+ * 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 "pipe/p_defines.h"
+#include "util/u_inlines.h"
+#include "util/u_transfer.h"
+
+#include "tgsi/tgsi_parse.h"
+
+#include "nvc0_stateobj.h"
+#include "nvc0_context.h"
+
+#include "nvc0_3d.xml.h"
+#include "nv50/nv50_texture.xml.h"
+
+#include "nouveau/nouveau_gldefs.h"
+
+static INLINE uint32_t
+nvc0_colormask(unsigned mask)
+{
+ uint32_t ret = 0;
+
+ if (mask & PIPE_MASK_R)
+ ret |= 0x0001;
+ if (mask & PIPE_MASK_G)
+ ret |= 0x0010;
+ if (mask & PIPE_MASK_B)
+ ret |= 0x0100;
+ if (mask & PIPE_MASK_A)
+ ret |= 0x1000;
+
+ return ret;
+}
+
+#define NVC0_BLEND_FACTOR_CASE(a, b) \
+ case PIPE_BLENDFACTOR_##a: return NV50_3D_BLEND_FACTOR_##b
+
+static INLINE uint32_t
+nvc0_blend_fac(unsigned factor)
+{
+ switch (factor) {
+ NVC0_BLEND_FACTOR_CASE(ONE, ONE);
+ NVC0_BLEND_FACTOR_CASE(SRC_COLOR, SRC_COLOR);
+ NVC0_BLEND_FACTOR_CASE(SRC_ALPHA, SRC_ALPHA);
+ NVC0_BLEND_FACTOR_CASE(DST_ALPHA, DST_ALPHA);
+ NVC0_BLEND_FACTOR_CASE(DST_COLOR, DST_COLOR);
+ NVC0_BLEND_FACTOR_CASE(SRC_ALPHA_SATURATE, SRC_ALPHA_SATURATE);
+ NVC0_BLEND_FACTOR_CASE(CONST_COLOR, CONSTANT_COLOR);
+ NVC0_BLEND_FACTOR_CASE(CONST_ALPHA, CONSTANT_ALPHA);
+ NVC0_BLEND_FACTOR_CASE(SRC1_COLOR, SRC1_COLOR);
+ NVC0_BLEND_FACTOR_CASE(SRC1_ALPHA, SRC1_ALPHA);
+ NVC0_BLEND_FACTOR_CASE(ZERO, ZERO);
+ NVC0_BLEND_FACTOR_CASE(INV_SRC_COLOR, ONE_MINUS_SRC_COLOR);
+ NVC0_BLEND_FACTOR_CASE(INV_SRC_ALPHA, ONE_MINUS_SRC_ALPHA);
+ NVC0_BLEND_FACTOR_CASE(INV_DST_ALPHA, ONE_MINUS_DST_ALPHA);
+ NVC0_BLEND_FACTOR_CASE(INV_DST_COLOR, ONE_MINUS_DST_COLOR);
+ NVC0_BLEND_FACTOR_CASE(INV_CONST_COLOR, ONE_MINUS_CONSTANT_COLOR);
+ NVC0_BLEND_FACTOR_CASE(INV_CONST_ALPHA, ONE_MINUS_CONSTANT_ALPHA);
+ NVC0_BLEND_FACTOR_CASE(INV_SRC1_COLOR, ONE_MINUS_SRC1_COLOR);
+ NVC0_BLEND_FACTOR_CASE(INV_SRC1_ALPHA, ONE_MINUS_SRC1_ALPHA);
+ default:
+ return NV50_3D_BLEND_FACTOR_ZERO;
+ }
+}
+
+static void *
+nvc0_blend_state_create(struct pipe_context *pipe,
+ const struct pipe_blend_state *cso)
+{
+ struct nvc0_blend_stateobj *so = CALLOC_STRUCT(nvc0_blend_stateobj);
+ int i;
+
+ so->pipe = *cso;
+
+ SB_IMMED_3D(so, BLEND_INDEPENDENT, cso->independent_blend_enable);
+
+ if (!cso->independent_blend_enable) {
+ SB_BEGIN_3D(so, BLEND_ENABLES, 1);
+ SB_DATA (so, cso->rt[0].blend_enable ? 0xff : 0);
+
+ if (cso->rt[0].blend_enable) {
+ SB_BEGIN_3D(so, BLEND_EQUATION_RGB, 5);
+ SB_DATA (so, nvgl_blend_eqn(cso->rt[0].rgb_func));
+ SB_DATA (so, nvc0_blend_fac(cso->rt[0].rgb_src_factor));
+ SB_DATA (so, nvc0_blend_fac(cso->rt[0].rgb_dst_factor));
+ SB_DATA (so, nvgl_blend_eqn(cso->rt[0].alpha_func));
+ SB_DATA (so, nvc0_blend_fac(cso->rt[0].alpha_src_factor));
+ SB_BEGIN_3D(so, BLEND_FUNC_DST_ALPHA, 1);
+ SB_DATA (so, nvc0_blend_fac(cso->rt[0].alpha_dst_factor));
+ }
+
+ SB_BEGIN_3D(so, COLOR_MASK_BROADCAST, 1);
+ SB_DATA (so, nvc0_colormask(cso->rt[0].colormask));
+ } else {
+ uint8_t en = 0;
+
+ for (i = 0; i < 8; ++i) {
+ if (!cso->rt[i].blend_enable)
+ continue;
+ en |= 1 << i;
+
+ SB_BEGIN_3D(so, IBLEND_EQUATION_RGB(i), 6);
+ SB_DATA (so, nvgl_blend_eqn(cso->rt[i].rgb_func));
+ SB_DATA (so, nvc0_blend_fac(cso->rt[i].rgb_src_factor));
+ SB_DATA (so, nvc0_blend_fac(cso->rt[i].rgb_dst_factor));
+ SB_DATA (so, nvgl_blend_eqn(cso->rt[i].alpha_func));
+ SB_DATA (so, nvc0_blend_fac(cso->rt[i].alpha_src_factor));
+ SB_DATA (so, nvc0_blend_fac(cso->rt[i].alpha_dst_factor));
+ }
+ SB_BEGIN_3D(so, BLEND_ENABLES, 1);
+ SB_DATA (so, en);
+
+ SB_BEGIN_3D(so, COLOR_MASK(0), 8);
+ for (i = 0; i < 8; ++i)
+ SB_DATA(so, nvc0_colormask(cso->rt[i].colormask));
+ }
+
+ if (cso->logicop_enable) {
+ SB_BEGIN_3D(so, LOGIC_OP_ENABLE, 2);
+ SB_DATA (so, 1);
+ SB_DATA (so, nvgl_logicop_func(cso->logicop_func));
+ } else {
+ SB_IMMED_3D(so, LOGIC_OP_ENABLE, 0);
+ }
+
+ assert(so->size < (sizeof(so->state) / sizeof(so->state[0])));
+ return so;
+}
+
+static void
+nvc0_blend_state_bind(struct pipe_context *pipe, void *hwcso)
+{
+ struct nvc0_context *nvc0 = nvc0_context(pipe);
+
+ nvc0->blend = hwcso;
+ nvc0->dirty |= NVC0_NEW_BLEND;
+}
+
+static void
+nvc0_blend_state_delete(struct pipe_context *pipe, void *hwcso)
+{
+ FREE(hwcso);
+}
+
+static void *
+nvc0_rasterizer_state_create(struct pipe_context *pipe,
+ const struct pipe_rasterizer_state *cso)
+{
+ struct nvc0_rasterizer_stateobj *so;
+ uint32_t reg;
+
+ so = CALLOC_STRUCT(nvc0_rasterizer_stateobj);
+ if (!so)
+ return NULL;
+ so->pipe = *cso;
+
+ /* Scissor enables are handled in scissor state, we will not want to
+ * always emit 16 commands, one for each scissor rectangle, here.
+ */
+
+ SB_BEGIN_3D(so, SHADE_MODEL, 1);
+ SB_DATA (so, cso->flatshade ? NVC0_3D_SHADE_MODEL_FLAT :
+ NVC0_3D_SHADE_MODEL_SMOOTH);
+ SB_IMMED_3D(so, PROVOKING_VERTEX_LAST, !cso->flatshade_first);
+ SB_IMMED_3D(so, VERTEX_TWO_SIDE_ENABLE, cso->light_twoside);
+
+ SB_BEGIN_3D(so, LINE_WIDTH, 1);
+ SB_DATA (so, fui(cso->line_width));
+ SB_IMMED_3D(so, LINE_SMOOTH_ENABLE, cso->line_smooth);
+
+ SB_BEGIN_3D(so, LINE_STIPPLE_ENABLE, 1);
+ if (cso->line_stipple_enable) {
+ SB_DATA (so, 1);
+ SB_BEGIN_3D(so, LINE_STIPPLE_PATTERN, 1);
+ SB_DATA (so, (cso->line_stipple_pattern << 8) |
+ cso->line_stipple_factor);
+
+ } else {
+ SB_DATA (so, 0);
+ }
+
+ SB_IMMED_3D(so, VP_POINT_SIZE_EN, cso->point_size_per_vertex);
+ if (!cso->point_size_per_vertex) {
+ SB_BEGIN_3D(so, POINT_SIZE, 1);
+ SB_DATA (so, fui(cso->point_size));
+ }
+
+ reg = (cso->sprite_coord_mode == PIPE_SPRITE_COORD_UPPER_LEFT) ?
+ NVC0_3D_POINT_COORD_REPLACE_COORD_ORIGIN_UPPER_LEFT :
+ NVC0_3D_POINT_COORD_REPLACE_COORD_ORIGIN_LOWER_LEFT;
+
+ SB_BEGIN_3D(so, POINT_COORD_REPLACE, 1);
+ SB_DATA (so, ((cso->sprite_coord_enable & 0xff) << 3) | reg);
+ SB_IMMED_3D(so, POINT_SPRITE_ENABLE, cso->point_quad_rasterization);
+ SB_IMMED_3D(so, POINT_SMOOTH_ENABLE, cso->point_smooth);
+
+ SB_BEGIN_3D(so, POLYGON_MODE_FRONT, 1);
+ SB_DATA (so, nvgl_polygon_mode(cso->fill_front));
+ SB_BEGIN_3D(so, POLYGON_MODE_BACK, 1);
+ SB_DATA (so, nvgl_polygon_mode(cso->fill_back));
+ SB_IMMED_3D(so, POLYGON_SMOOTH_ENABLE, cso->poly_smooth);
+
+ SB_BEGIN_3D(so, CULL_FACE_ENABLE, 3);
+ SB_DATA (so, cso->cull_face != PIPE_FACE_NONE);
+ SB_DATA (so, cso->front_ccw ? NVC0_3D_FRONT_FACE_CCW :
+ NVC0_3D_FRONT_FACE_CW);
+ switch (cso->cull_face) {
+ case PIPE_FACE_FRONT_AND_BACK:
+ SB_DATA(so, NVC0_3D_CULL_FACE_FRONT_AND_BACK);
+ break;
+ case PIPE_FACE_FRONT:
+ SB_DATA(so, NVC0_3D_CULL_FACE_FRONT);
+ break;
+ case PIPE_FACE_BACK:
+ default:
+ SB_DATA(so, NVC0_3D_CULL_FACE_BACK);
+ break;
+ }
+
+ SB_IMMED_3D(so, POLYGON_STIPPLE_ENABLE, cso->poly_stipple_enable);
+ SB_BEGIN_3D(so, POLYGON_OFFSET_POINT_ENABLE, 3);
+ SB_DATA (so, cso->offset_point);
+ SB_DATA (so, cso->offset_line);
+ SB_DATA (so, cso->offset_tri);
+
+ if (cso->offset_point || cso->offset_line || cso->offset_tri) {
+ SB_BEGIN_3D(so, POLYGON_OFFSET_FACTOR, 1);
+ SB_DATA (so, fui(cso->offset_scale));
+ SB_BEGIN_3D(so, POLYGON_OFFSET_UNITS, 1);
+ SB_DATA (so, fui(cso->offset_units * 2.0f));
+ }
+
+ assert(so->size < (sizeof(so->state) / sizeof(so->state[0])));
+ return (void *)so;
+}
+
+static void
+nvc0_rasterizer_state_bind(struct pipe_context *pipe, void *hwcso)
+{
+ struct nvc0_context *nvc0 = nvc0_context(pipe);
+
+ nvc0->rast = hwcso;
+ nvc0->dirty |= NVC0_NEW_RASTERIZER;
+}
+
+static void
+nvc0_rasterizer_state_delete(struct pipe_context *pipe, void *hwcso)
+{
+ FREE(hwcso);
+}
+
+static void *
+nvc0_zsa_state_create(struct pipe_context *pipe,
+ const struct pipe_depth_stencil_alpha_state *cso)
+{
+ struct nvc0_zsa_stateobj *so = CALLOC_STRUCT(nvc0_zsa_stateobj);
+
+ so->pipe = *cso;
+
+ SB_IMMED_3D(so, DEPTH_TEST_ENABLE, cso->depth.enabled);
+ if (cso->depth.enabled) {
+ SB_IMMED_3D(so, DEPTH_WRITE_ENABLE, cso->depth.writemask);
+ SB_BEGIN_3D(so, DEPTH_TEST_FUNC, 1);
+ SB_DATA (so, nvgl_comparison_op(cso->depth.func));
+ }
+
+ if (cso->stencil[0].enabled) {
+ SB_BEGIN_3D(so, STENCIL_ENABLE, 5);
+ SB_DATA (so, 1);
+ SB_DATA (so, nvgl_stencil_op(cso->stencil[0].fail_op));
+ SB_DATA (so, nvgl_stencil_op(cso->stencil[0].zfail_op));
+ SB_DATA (so, nvgl_stencil_op(cso->stencil[0].zpass_op));
+ SB_DATA (so, nvgl_comparison_op(cso->stencil[0].func));
+ SB_BEGIN_3D(so, STENCIL_FRONT_FUNC_MASK, 2);
+ SB_DATA (so, cso->stencil[0].valuemask);
+ SB_DATA (so, cso->stencil[0].writemask);
+ } else {
+ SB_IMMED_3D(so, STENCIL_ENABLE, 0);
+ }
+
+ if (cso->stencil[1].enabled) {
+ assert(cso->stencil[0].enabled);
+ SB_BEGIN_3D(so, STENCIL_TWO_SIDE_ENABLE, 5);
+ SB_DATA (so, 1);
+ SB_DATA (so, nvgl_stencil_op(cso->stencil[1].fail_op));
+ SB_DATA (so, nvgl_stencil_op(cso->stencil[1].zfail_op));
+ SB_DATA (so, nvgl_stencil_op(cso->stencil[1].zpass_op));
+ SB_DATA (so, nvgl_comparison_op(cso->stencil[1].func));
+ SB_BEGIN_3D(so, STENCIL_BACK_MASK, 2);
+ SB_DATA (so, cso->stencil[1].writemask);
+ SB_DATA (so, cso->stencil[1].valuemask);
+ } else
+ if (cso->stencil[0].enabled) {
+ SB_IMMED_3D(so, STENCIL_TWO_SIDE_ENABLE, 0);
+ }
+
+ SB_IMMED_3D(so, ALPHA_TEST_ENABLE, cso->alpha.enabled);
+ if (cso->alpha.enabled) {
+ SB_BEGIN_3D(so, ALPHA_TEST_REF, 2);
+ SB_DATA (so, fui(cso->alpha.ref_value));
+ SB_DATA (so, nvgl_comparison_op(cso->alpha.func));
+ }
+
+ assert(so->size < (sizeof(so->state) / sizeof(so->state[0])));
+ return (void *)so;
+}
+
+static void
+nvc0_zsa_state_bind(struct pipe_context *pipe, void *hwcso)
+{
+ struct nvc0_context *nvc0 = nvc0_context(pipe);
+
+ nvc0->zsa = hwcso;
+ nvc0->dirty |= NVC0_NEW_ZSA;
+}
+
+static void
+nvc0_zsa_state_delete(struct pipe_context *pipe, void *hwcso)
+{
+ FREE(hwcso);
+}
+
+/* ====================== SAMPLERS AND TEXTURES ================================
+ */
+
+#define NV50_TSC_WRAP_CASE(n) \
+ case PIPE_TEX_WRAP_##n: return NV50_TSC_WRAP_##n
+
+static INLINE unsigned
+nv50_tsc_wrap_mode(unsigned wrap)
+{
+ switch (wrap) {
+ NV50_TSC_WRAP_CASE(REPEAT);
+ NV50_TSC_WRAP_CASE(MIRROR_REPEAT);
+ NV50_TSC_WRAP_CASE(CLAMP_TO_EDGE);
+ NV50_TSC_WRAP_CASE(CLAMP_TO_BORDER);
+ NV50_TSC_WRAP_CASE(CLAMP);
+ NV50_TSC_WRAP_CASE(MIRROR_CLAMP_TO_EDGE);
+ NV50_TSC_WRAP_CASE(MIRROR_CLAMP_TO_BORDER);
+ NV50_TSC_WRAP_CASE(MIRROR_CLAMP);
+ default:
+ NOUVEAU_ERR("unknown wrap mode: %d\n", wrap);
+ return NV50_TSC_WRAP_REPEAT;
+ }
+}
+
+static void
+nvc0_sampler_state_delete(struct pipe_context *pipe, void *hwcso)
+{
+ unsigned s, i;
+
+ for (s = 0; s < 5; ++s)
+ for (i = 0; i < nvc0_context(pipe)->num_samplers[s]; ++i)
+ if (nvc0_context(pipe)->samplers[s][i] == hwcso)
+ nvc0_context(pipe)->samplers[s][i] = NULL;
+
+ nvc0_screen_tsc_free(nvc0_context(pipe)->screen, nv50_tsc_entry(hwcso));
+
+ FREE(hwcso);
+}
+
+static INLINE void
+nvc0_stage_sampler_states_bind(struct nvc0_context *nvc0, int s,
+ unsigned nr, void **hwcso)
+{
+ unsigned i;
+
+ for (i = 0; i < nr; ++i) {
+ struct nv50_tsc_entry *old = nvc0->samplers[s][i];
+
+ nvc0->samplers[s][i] = nv50_tsc_entry(hwcso[i]);
+ if (old)
+ nvc0_screen_tsc_unlock(nvc0->screen, old);
+ }
+ for (; i < nvc0->num_samplers[s]; ++i)
+ if (nvc0->samplers[s][i])
+ nvc0_screen_tsc_unlock(nvc0->screen, nvc0->samplers[s][i]);
+
+ nvc0->num_samplers[s] = nr;
+
+ nvc0->dirty |= NVC0_NEW_SAMPLERS;
+}
+
+static void
+nvc0_vp_sampler_states_bind(struct pipe_context *pipe, unsigned nr, void **s)
+{
+ nvc0_stage_sampler_states_bind(nvc0_context(pipe), 0, nr, s);
+}
+
+static void
+nvc0_fp_sampler_states_bind(struct pipe_context *pipe, unsigned nr, void **s)
+{
+ nvc0_stage_sampler_states_bind(nvc0_context(pipe), 4, nr, s);
+}
+
+static void
+nvc0_gp_sampler_states_bind(struct pipe_context *pipe, unsigned nr, void **s)
+{
+ nvc0_stage_sampler_states_bind(nvc0_context(pipe), 3, nr, s);
+}
+
+/* NOTE: only called when not referenced anywhere, won't be bound */
+static void
+nvc0_sampler_view_destroy(struct pipe_context *pipe,
+ struct pipe_sampler_view *view)
+{
+ pipe_resource_reference(&view->texture, NULL);
+
+ nvc0_screen_tic_free(nvc0_context(pipe)->screen, nv50_tic_entry(view));
+
+ FREE(nv50_tic_entry(view));
+}
+
+static INLINE void
+nvc0_stage_set_sampler_views(struct nvc0_context *nvc0, int s,
+ unsigned nr,
+ struct pipe_sampler_view **views)
+{
+ unsigned i;
+
+ for (i = 0; i < nr; ++i) {
+ struct nv50_tic_entry *old = nv50_tic_entry(nvc0->textures[s][i]);
+ if (old)
+ nvc0_screen_tic_unlock(nvc0->screen, old);
+
+ pipe_sampler_view_reference(&nvc0->textures[s][i], views[i]);
+ }
+
+ for (i = nr; i < nvc0->num_textures[s]; ++i) {
+ struct nv50_tic_entry *old = nv50_tic_entry(nvc0->textures[s][i]);
+ if (!old)
+ continue;
+ nvc0_screen_tic_unlock(nvc0->screen, old);
+
+ pipe_sampler_view_reference(&nvc0->textures[s][i], NULL);
+ }
+
+ nvc0->num_textures[s] = nr;
+
+ nvc0_bufctx_reset(nvc0, NVC0_BUFCTX_TEXTURES);
+
+ nvc0->dirty |= NVC0_NEW_TEXTURES;
+}
+
+static void
+nvc0_vp_set_sampler_views(struct pipe_context *pipe,
+ unsigned nr,
+ struct pipe_sampler_view **views)
+{
+ nvc0_stage_set_sampler_views(nvc0_context(pipe), 0, nr, views);
+}
+
+static void
+nvc0_fp_set_sampler_views(struct pipe_context *pipe,
+ unsigned nr,
+ struct pipe_sampler_view **views)
+{
+ nvc0_stage_set_sampler_views(nvc0_context(pipe), 4, nr, views);
+}
+
+static void
+nvc0_gp_set_sampler_views(struct pipe_context *pipe,
+ unsigned nr,
+ struct pipe_sampler_view **views)
+{
+ nvc0_stage_set_sampler_views(nvc0_context(pipe), 3, nr, views);
+}
+
+/* ============================= SHADERS =======================================
+ */
+
+static void *
+nvc0_sp_state_create(struct pipe_context *pipe,
+ const struct pipe_shader_state *cso, unsigned type)
+{
+ struct nvc0_program *prog;
+
+ prog = CALLOC_STRUCT(nvc0_program);
+ if (!prog)
+ return NULL;
+
+ prog->type = type;
+ prog->pipe.tokens = tgsi_dup_tokens(cso->tokens);
+
+ return (void *)prog;
+}
+
+static void
+nvc0_sp_state_delete(struct pipe_context *pipe, void *hwcso)
+{
+ struct nvc0_program *prog = (struct nvc0_program *)hwcso;
+
+ nvc0_program_destroy(nvc0_context(pipe), prog);
+
+ FREE((void *)prog->pipe.tokens);
+ FREE(prog);
+}
+
+static void *
+nvc0_vp_state_create(struct pipe_context *pipe,
+ const struct pipe_shader_state *cso)
+{
+ return nvc0_sp_state_create(pipe, cso, PIPE_SHADER_VERTEX);
+}
+
+static void
+nvc0_vp_state_bind(struct pipe_context *pipe, void *hwcso)
+{
+ struct nvc0_context *nvc0 = nvc0_context(pipe);
+
+ nvc0->vertprog = hwcso;
+ nvc0->dirty |= NVC0_NEW_VERTPROG;
+}
+
+static void *
+nvc0_fp_state_create(struct pipe_context *pipe,
+ const struct pipe_shader_state *cso)
+{
+ return nvc0_sp_state_create(pipe, cso, PIPE_SHADER_FRAGMENT);
+}
+
+static void
+nvc0_fp_state_bind(struct pipe_context *pipe, void *hwcso)
+{
+ struct nvc0_context *nvc0 = nvc0_context(pipe);
+
+ nvc0->fragprog = hwcso;
+ nvc0->dirty |= NVC0_NEW_FRAGPROG;
+}
+
+static void *
+nvc0_gp_state_create(struct pipe_context *pipe,
+ const struct pipe_shader_state *cso)
+{
+ return nvc0_sp_state_create(pipe, cso, PIPE_SHADER_GEOMETRY);
+}
+
+static void
+nvc0_gp_state_bind(struct pipe_context *pipe, void *hwcso)
+{
+ struct nvc0_context *nvc0 = nvc0_context(pipe);
+
+ nvc0->gmtyprog = hwcso;
+ nvc0->dirty |= NVC0_NEW_GMTYPROG;
+}
+
+static void
+nvc0_set_constant_buffer(struct pipe_context *pipe, uint shader, uint index,
+ struct pipe_resource *res)
+{
+ struct nvc0_context *nvc0 = nvc0_context(pipe);
+
+ switch (shader) {
+ case PIPE_SHADER_VERTEX: shader = 0; break;
+ /*
+ case PIPE_SHADER_TESSELLATION_CONTROL: shader = 1; break;
+ case PIPE_SHADER_TESSELLATION_EVALUATION: shader = 2; break;
+ */
+ case PIPE_SHADER_GEOMETRY: shader = 3; break;
+ case PIPE_SHADER_FRAGMENT: shader = 4; break;
+ default:
+ assert(0);
+ break;
+ }
+
+ if (nvc0->constbuf[shader][index])
+ nvc0_bufctx_del_resident(nvc0, NVC0_BUFCTX_CONSTANT,
+ nv04_resource(nvc0->constbuf[shader][index]));
+
+ pipe_resource_reference(&nvc0->constbuf[shader][index], res);
+
+ nvc0->constbuf_dirty[shader] |= 1 << index;
+
+ nvc0->dirty |= NVC0_NEW_CONSTBUF;
+}
+
+/* =============================================================================
+ */
+
+static void
+nvc0_set_blend_color(struct pipe_context *pipe,
+ const struct pipe_blend_color *bcol)
+{
+ struct nvc0_context *nvc0 = nvc0_context(pipe);
+
+ nvc0->blend_colour = *bcol;
+ nvc0->dirty |= NVC0_NEW_BLEND_COLOUR;
+}
+
+static void
+nvc0_set_stencil_ref(struct pipe_context *pipe,
+ const struct pipe_stencil_ref *sr)
+{
+ struct nvc0_context *nvc0 = nvc0_context(pipe);
+
+ nvc0->stencil_ref = *sr;
+ nvc0->dirty |= NVC0_NEW_STENCIL_REF;
+}
+
+static void
+nvc0_set_clip_state(struct pipe_context *pipe,
+ const struct pipe_clip_state *clip)
+{
+ struct nvc0_context *nvc0 = nvc0_context(pipe);
+ const unsigned size = clip->nr * sizeof(clip->ucp[0]);
+
+ memcpy(&nvc0->clip.ucp[0][0], &clip->ucp[0][0], size);
+ nvc0->clip.nr = clip->nr;
+
+ nvc0->clip.depth_clamp = clip->depth_clamp;
+
+ nvc0->dirty |= NVC0_NEW_CLIP;
+}
+
+static void
+nvc0_set_sample_mask(struct pipe_context *pipe, unsigned sample_mask)
+{
+ struct nvc0_context *nvc0 = nvc0_context(pipe);
+
+ nvc0->sample_mask = sample_mask;
+ nvc0->dirty |= NVC0_NEW_SAMPLE_MASK;
+}
+
+
+static void
+nvc0_set_framebuffer_state(struct pipe_context *pipe,
+ const struct pipe_framebuffer_state *fb)
+{
+ struct nvc0_context *nvc0 = nvc0_context(pipe);
+
+ nvc0->framebuffer = *fb;
+ nvc0->dirty |= NVC0_NEW_FRAMEBUFFER;
+}
+
+static void
+nvc0_set_polygon_stipple(struct pipe_context *pipe,
+ const struct pipe_poly_stipple *stipple)
+{
+ struct nvc0_context *nvc0 = nvc0_context(pipe);
+
+ nvc0->stipple = *stipple;
+ nvc0->dirty |= NVC0_NEW_STIPPLE;
+}
+
+static void
+nvc0_set_scissor_state(struct pipe_context *pipe,
+ const struct pipe_scissor_state *scissor)
+{
+ struct nvc0_context *nvc0 = nvc0_context(pipe);
+
+ nvc0->scissor = *scissor;
+ nvc0->dirty |= NVC0_NEW_SCISSOR;
+}
+
+static void
+nvc0_set_viewport_state(struct pipe_context *pipe,
+ const struct pipe_viewport_state *vpt)
+{
+ struct nvc0_context *nvc0 = nvc0_context(pipe);
+
+ nvc0->viewport = *vpt;
+ nvc0->dirty |= NVC0_NEW_VIEWPORT;
+}
+
+static void
+nvc0_set_vertex_buffers(struct pipe_context *pipe,
+ unsigned count,
+ const struct pipe_vertex_buffer *vb)
+{
+ struct nvc0_context *nvc0 = nvc0_context(pipe);
+ unsigned i;
+
+ for (i = 0; i < count; ++i)
+ pipe_resource_reference(&nvc0->vtxbuf[i].buffer, vb[i].buffer);
+ for (; i < nvc0->num_vtxbufs; ++i)
+ pipe_resource_reference(&nvc0->vtxbuf[i].buffer, NULL);
+
+ memcpy(nvc0->vtxbuf, vb, sizeof(*vb) * count);
+ nvc0->num_vtxbufs = count;
+
+ nvc0_bufctx_reset(nvc0, NVC0_BUFCTX_VERTEX);
+
+ nvc0->dirty |= NVC0_NEW_ARRAYS;
+}
+
+static void
+nvc0_set_index_buffer(struct pipe_context *pipe,
+ const struct pipe_index_buffer *ib)
+{
+ struct nvc0_context *nvc0 = nvc0_context(pipe);
+
+ if (ib) {
+ pipe_resource_reference(&nvc0->idxbuf.buffer, ib->buffer);
+
+ memcpy(&nvc0->idxbuf, ib, sizeof(nvc0->idxbuf));
+ } else {
+ pipe_resource_reference(&nvc0->idxbuf.buffer, NULL);
+ }
+}
+
+static void
+nvc0_vertex_state_bind(struct pipe_context *pipe, void *hwcso)
+{
+ struct nvc0_context *nvc0 = nvc0_context(pipe);
+
+ nvc0->vertex = hwcso;
+ nvc0->dirty |= NVC0_NEW_VERTEX;
+}
+
+static void *
+nvc0_tfb_state_create(struct pipe_context *pipe,
+ const struct pipe_stream_output_state *pso)
+{
+ struct nvc0_transform_feedback_state *so;
+ int n = 0;
+ int i, c, b;
+
+ so = MALLOC(sizeof(*so) + pso->num_outputs * 4 * sizeof(uint8_t));
+ if (!so)
+ return NULL;
+
+ for (b = 0; b < 4; ++b) {
+ for (i = 0; i < pso->num_outputs; ++i) {
+ if (pso->output_buffer[i] != b)
+ continue;
+ for (c = 0; c < 4; ++c) {
+ if (!(pso->register_mask[i] & (1 << c)))
+ continue;
+ so->varying_count[b]++;
+ so->varying_index[n++] = (pso->register_index[i] << 2) | c;
+ }
+ }
+ so->stride[b] = so->varying_count[b] * 4;
+ }
+ if (pso->stride)
+ so->stride[0] = pso->stride;
+
+ return so;
+}
+
+static void
+nvc0_tfb_state_delete(struct pipe_context *pipe, void *hwcso)
+{
+ FREE(hwcso);
+}
+
+static void
+nvc0_tfb_state_bind(struct pipe_context *pipe, void *hwcso)
+{
+ nvc0_context(pipe)->tfb = hwcso;
+ nvc0_context(pipe)->dirty |= NVC0_NEW_TFB;
+}
+
+static void
+nvc0_set_transform_feedback_buffers(struct pipe_context *pipe,
+ struct pipe_resource **buffers,
+ int *offsets,
+ int num_buffers)
+{
+ struct nvc0_context *nvc0 = nvc0_context(pipe);
+ int i;
+
+ assert(num_buffers >= 0 && num_buffers <= 4); /* why signed ? */
+
+ for (i = 0; i < num_buffers; ++i) {
+ assert(offsets[i] >= 0);
+ nvc0->tfb_offset[i] = offsets[i];
+ pipe_resource_reference(&nvc0->tfbbuf[i], buffers[i]);
+ }
+ for (; i < nvc0->num_tfbbufs; ++i)
+ pipe_resource_reference(&nvc0->tfbbuf[i], NULL);
+
+ nvc0->num_tfbbufs = num_buffers;
+
+ nvc0->dirty |= NVC0_NEW_TFB_BUFFERS;
+}
+
+void
+nvc0_init_state_functions(struct nvc0_context *nvc0)
+{
+ struct pipe_context *pipe = &nvc0->base.pipe;
+
+ pipe->create_blend_state = nvc0_blend_state_create;
+ pipe->bind_blend_state = nvc0_blend_state_bind;
+ pipe->delete_blend_state = nvc0_blend_state_delete;
+
+ pipe->create_rasterizer_state = nvc0_rasterizer_state_create;
+ pipe->bind_rasterizer_state = nvc0_rasterizer_state_bind;
+ pipe->delete_rasterizer_state = nvc0_rasterizer_state_delete;
+
+ pipe->create_depth_stencil_alpha_state = nvc0_zsa_state_create;
+ pipe->bind_depth_stencil_alpha_state = nvc0_zsa_state_bind;
+ pipe->delete_depth_stencil_alpha_state = nvc0_zsa_state_delete;
+
+ pipe->create_sampler_state = nv50_sampler_state_create;
+ pipe->delete_sampler_state = nvc0_sampler_state_delete;
+ pipe->bind_vertex_sampler_states = nvc0_vp_sampler_states_bind;
+ pipe->bind_fragment_sampler_states = nvc0_fp_sampler_states_bind;
+ pipe->bind_geometry_sampler_states = nvc0_gp_sampler_states_bind;
+
+ pipe->create_sampler_view = nvc0_create_sampler_view;
+ pipe->sampler_view_destroy = nvc0_sampler_view_destroy;
+ pipe->set_vertex_sampler_views = nvc0_vp_set_sampler_views;
+ pipe->set_fragment_sampler_views = nvc0_fp_set_sampler_views;
+ pipe->set_geometry_sampler_views = nvc0_gp_set_sampler_views;
+
+ pipe->create_vs_state = nvc0_vp_state_create;
+ pipe->create_fs_state = nvc0_fp_state_create;
+ pipe->create_gs_state = nvc0_gp_state_create;
+ pipe->bind_vs_state = nvc0_vp_state_bind;
+ pipe->bind_fs_state = nvc0_fp_state_bind;
+ pipe->bind_gs_state = nvc0_gp_state_bind;
+ pipe->delete_vs_state = nvc0_sp_state_delete;
+ pipe->delete_fs_state = nvc0_sp_state_delete;
+ pipe->delete_gs_state = nvc0_sp_state_delete;
+
+ pipe->set_blend_color = nvc0_set_blend_color;
+ pipe->set_stencil_ref = nvc0_set_stencil_ref;
+ pipe->set_clip_state = nvc0_set_clip_state;
+ pipe->set_sample_mask = nvc0_set_sample_mask;
+ pipe->set_constant_buffer = nvc0_set_constant_buffer;
+ pipe->set_framebuffer_state = nvc0_set_framebuffer_state;
+ pipe->set_polygon_stipple = nvc0_set_polygon_stipple;
+ pipe->set_scissor_state = nvc0_set_scissor_state;
+ pipe->set_viewport_state = nvc0_set_viewport_state;
+
+ pipe->create_vertex_elements_state = nvc0_vertex_state_create;
+ pipe->delete_vertex_elements_state = nvc0_vertex_state_delete;
+ pipe->bind_vertex_elements_state = nvc0_vertex_state_bind;
+
+ pipe->set_vertex_buffers = nvc0_set_vertex_buffers;
+ pipe->set_index_buffer = nvc0_set_index_buffer;
+
+ pipe->create_stream_output_state = nvc0_tfb_state_create;
+ pipe->delete_stream_output_state = nvc0_tfb_state_delete;
+ pipe->bind_stream_output_state = nvc0_tfb_state_bind;
+ pipe->set_stream_output_buffers = nvc0_set_transform_feedback_buffers;
+
+ pipe->redefine_user_buffer = u_default_redefine_user_buffer;
+}
+
diff --git a/src/gallium/drivers/nvc0/nvc0_state_validate.c b/src/gallium/drivers/nvc0/nvc0_state_validate.c
new file mode 100644
index 00000000000..bb81480bab9
--- /dev/null
+++ b/src/gallium/drivers/nvc0/nvc0_state_validate.c
@@ -0,0 +1,483 @@
+
+#include "nvc0_context.h"
+#include "os/os_time.h"
+
+static void
+nvc0_validate_zcull(struct nvc0_context *nvc0)
+{
+ struct nouveau_channel *chan = nvc0->screen->base.channel;
+ struct pipe_framebuffer_state *fb = &nvc0->framebuffer;
+ struct nvc0_surface *sf = nvc0_surface(fb->zsbuf);
+ struct nvc0_miptree *mt = nvc0_miptree(sf->base.texture);
+ struct nouveau_bo *bo = mt->base.bo;
+ uint32_t size;
+ uint32_t offset = align(mt->total_size, 1 << 17);
+ unsigned width, height;
+
+ assert(mt->base.base.depth0 == 1 && mt->base.base.array_size < 2);
+
+ size = mt->total_size * 2;
+
+ height = align(fb->height, 32);
+ width = fb->width % 224;
+ if (width)
+ width = fb->width + (224 - width);
+ else
+ width = fb->width;
+
+ MARK_RING (chan, 23, 4);
+ BEGIN_RING(chan, RING_3D_(0x1590), 1); /* ZCULL_REGION_INDEX (bits 0x3f) */
+ OUT_RING (chan, 0);
+ BEGIN_RING(chan, RING_3D_(0x07e8), 2); /* ZCULL_ADDRESS_A_HIGH */
+ OUT_RELOCh(chan, bo, offset, NOUVEAU_BO_VRAM | NOUVEAU_BO_RDWR);
+ OUT_RELOCl(chan, bo, offset, NOUVEAU_BO_VRAM | NOUVEAU_BO_RDWR);
+ offset += 1 << 17;
+ BEGIN_RING(chan, RING_3D_(0x07f0), 2); /* ZCULL_ADDRESS_B_HIGH */
+ OUT_RELOCh(chan, bo, offset, NOUVEAU_BO_VRAM | NOUVEAU_BO_RDWR);
+ OUT_RELOCl(chan, bo, offset, NOUVEAU_BO_VRAM | NOUVEAU_BO_RDWR);
+ BEGIN_RING(chan, RING_3D_(0x07e0), 2);
+ OUT_RING (chan, size);
+ OUT_RING (chan, size >> 16);
+ BEGIN_RING(chan, RING_3D_(0x15c8), 1); /* bits 0x3 */
+ OUT_RING (chan, 2);
+ BEGIN_RING(chan, RING_3D_(0x07c0), 4); /* ZCULL dimensions */
+ OUT_RING (chan, width);
+ OUT_RING (chan, height);
+ OUT_RING (chan, 1);
+ OUT_RING (chan, 0);
+ BEGIN_RING(chan, RING_3D_(0x15fc), 2);
+ OUT_RING (chan, 0); /* bits 0xffff */
+ OUT_RING (chan, 0); /* bits 0xffff */
+ BEGIN_RING(chan, RING_3D_(0x1958), 1);
+ OUT_RING (chan, 0); /* bits ~0 */
+}
+
+static void
+nvc0_validate_fb(struct nvc0_context *nvc0)
+{
+ struct nouveau_channel *chan = nvc0->screen->base.channel;
+ struct pipe_framebuffer_state *fb = &nvc0->framebuffer;
+ unsigned i;
+ boolean serialize = FALSE;
+
+ nvc0_bufctx_reset(nvc0, NVC0_BUFCTX_FRAME);
+
+ BEGIN_RING(chan, RING_3D(RT_CONTROL), 1);
+ OUT_RING (chan, (076543210 << 4) | fb->nr_cbufs);
+ BEGIN_RING(chan, RING_3D(SCREEN_SCISSOR_HORIZ), 2);
+ OUT_RING (chan, fb->width << 16);
+ OUT_RING (chan, fb->height << 16);
+
+ MARK_RING(chan, 9 * fb->nr_cbufs, 2 * fb->nr_cbufs);
+
+ for (i = 0; i < fb->nr_cbufs; ++i) {
+ struct nvc0_miptree *mt = nvc0_miptree(fb->cbufs[i]->texture);
+ struct nvc0_surface *sf = nvc0_surface(fb->cbufs[i]);
+ struct nouveau_bo *bo = mt->base.bo;
+ uint32_t offset = sf->offset;
+
+ BEGIN_RING(chan, RING_3D(RT_ADDRESS_HIGH(i)), 9);
+ OUT_RELOCh(chan, bo, offset, NOUVEAU_BO_VRAM | NOUVEAU_BO_RDWR);
+ OUT_RELOCl(chan, bo, offset, NOUVEAU_BO_VRAM | NOUVEAU_BO_RDWR);
+ OUT_RING (chan, sf->width);
+ OUT_RING (chan, sf->height);
+ OUT_RING (chan, nvc0_format_table[sf->base.format].rt);
+ OUT_RING (chan, (mt->layout_3d << 16) |
+ mt->level[sf->base.u.tex.level].tile_mode);
+ OUT_RING (chan, sf->base.u.tex.first_layer + sf->depth);
+ OUT_RING (chan, mt->layer_stride >> 2);
+ OUT_RING (chan, sf->base.u.tex.first_layer);
+
+ if (mt->base.status & NOUVEAU_BUFFER_STATUS_GPU_READING)
+ serialize = TRUE;
+ mt->base.status |= NOUVEAU_BUFFER_STATUS_GPU_WRITING;
+ mt->base.status &= ~NOUVEAU_BUFFER_STATUS_GPU_READING;
+
+ /* only register for writing, otherwise we'd always serialize here */
+ nvc0_bufctx_add_resident(nvc0, NVC0_BUFCTX_FRAME, &mt->base,
+ NOUVEAU_BO_VRAM | NOUVEAU_BO_WR);
+ }
+
+ if (fb->zsbuf) {
+ struct nvc0_miptree *mt = nvc0_miptree(fb->zsbuf->texture);
+ struct nvc0_surface *sf = nvc0_surface(fb->zsbuf);
+ struct nouveau_bo *bo = mt->base.bo;
+ int unk = mt->base.base.target == PIPE_TEXTURE_2D;
+ uint32_t offset = sf->offset;
+
+ MARK_RING (chan, 12, 2);
+ BEGIN_RING(chan, RING_3D(ZETA_ADDRESS_HIGH), 5);
+ OUT_RELOCh(chan, bo, offset, NOUVEAU_BO_VRAM | NOUVEAU_BO_RDWR);
+ OUT_RELOCl(chan, bo, offset, NOUVEAU_BO_VRAM | NOUVEAU_BO_RDWR);
+ OUT_RING (chan, nvc0_format_table[fb->zsbuf->format].rt);
+ OUT_RING (chan, mt->level[sf->base.u.tex.level].tile_mode);
+ OUT_RING (chan, mt->layer_stride >> 2);
+ BEGIN_RING(chan, RING_3D(ZETA_ENABLE), 1);
+ OUT_RING (chan, 1);
+ BEGIN_RING(chan, RING_3D(ZETA_HORIZ), 3);
+ OUT_RING (chan, sf->width);
+ OUT_RING (chan, sf->height);
+ OUT_RING (chan, (unk << 16) |
+ (sf->base.u.tex.first_layer + sf->depth));
+ BEGIN_RING(chan, RING_3D(ZETA_BASE_LAYER), 1);
+ OUT_RING (chan, sf->base.u.tex.first_layer);
+
+ if (mt->base.status & NOUVEAU_BUFFER_STATUS_GPU_READING)
+ serialize = TRUE;
+ mt->base.status |= NOUVEAU_BUFFER_STATUS_GPU_WRITING;
+ mt->base.status &= ~NOUVEAU_BUFFER_STATUS_GPU_READING;
+
+ nvc0_bufctx_add_resident(nvc0, NVC0_BUFCTX_FRAME, &mt->base,
+ NOUVEAU_BO_VRAM | NOUVEAU_BO_WR);
+ } else {
+ BEGIN_RING(chan, RING_3D(ZETA_ENABLE), 1);
+ OUT_RING (chan, 0);
+ }
+
+ if (serialize) {
+ BEGIN_RING(chan, RING_3D(SERIALIZE), 1);
+ OUT_RING (chan, 0);
+ }
+}
+
+static void
+nvc0_validate_blend_colour(struct nvc0_context *nvc0)
+{
+ struct nouveau_channel *chan = nvc0->screen->base.channel;
+
+ BEGIN_RING(chan, RING_3D(BLEND_COLOR(0)), 4);
+ OUT_RINGf (chan, nvc0->blend_colour.color[0]);
+ OUT_RINGf (chan, nvc0->blend_colour.color[1]);
+ OUT_RINGf (chan, nvc0->blend_colour.color[2]);
+ OUT_RINGf (chan, nvc0->blend_colour.color[3]);
+}
+
+static void
+nvc0_validate_stencil_ref(struct nvc0_context *nvc0)
+{
+ struct nouveau_channel *chan = nvc0->screen->base.channel;
+
+ BEGIN_RING(chan, RING_3D(STENCIL_FRONT_FUNC_REF), 1);
+ OUT_RING (chan, nvc0->stencil_ref.ref_value[0]);
+ BEGIN_RING(chan, RING_3D(STENCIL_BACK_FUNC_REF), 1);
+ OUT_RING (chan, nvc0->stencil_ref.ref_value[1]);
+}
+
+static void
+nvc0_validate_stipple(struct nvc0_context *nvc0)
+{
+ struct nouveau_channel *chan = nvc0->screen->base.channel;
+ unsigned i;
+
+ BEGIN_RING(chan, RING_3D(POLYGON_STIPPLE_PATTERN(0)), 32);
+ for (i = 0; i < 32; ++i)
+ OUT_RING(chan, util_bswap32(nvc0->stipple.stipple[i]));
+}
+
+static void
+nvc0_validate_scissor(struct nvc0_context *nvc0)
+{
+ struct nouveau_channel *chan = nvc0->screen->base.channel;
+ struct pipe_scissor_state *s = &nvc0->scissor;
+
+ if (!(nvc0->dirty & NVC0_NEW_SCISSOR) &&
+ nvc0->rast->pipe.scissor == nvc0->state.scissor)
+ return;
+ nvc0->state.scissor = nvc0->rast->pipe.scissor;
+
+ BEGIN_RING(chan, RING_3D(SCISSOR_HORIZ(0)), 2);
+ if (nvc0->rast->pipe.scissor) {
+ OUT_RING(chan, (s->maxx << 16) | s->minx);
+ OUT_RING(chan, (s->maxy << 16) | s->miny);
+ } else {
+ OUT_RING(chan, (0xffff << 16) | 0);
+ OUT_RING(chan, (0xffff << 16) | 0);
+ }
+}
+
+static void
+nvc0_validate_viewport(struct nvc0_context *nvc0)
+{
+ struct nouveau_channel *chan = nvc0->screen->base.channel;
+ struct pipe_viewport_state *vp = &nvc0->viewport;
+ int x, y, w, h;
+ float zmin, zmax;
+
+ BEGIN_RING(chan, RING_3D(VIEWPORT_TRANSLATE_X(0)), 3);
+ OUT_RINGf (chan, vp->translate[0]);
+ OUT_RINGf (chan, vp->translate[1]);
+ OUT_RINGf (chan, vp->translate[2]);
+ BEGIN_RING(chan, RING_3D(VIEWPORT_SCALE_X(0)), 3);
+ OUT_RINGf (chan, vp->scale[0]);
+ OUT_RINGf (chan, vp->scale[1]);
+ OUT_RINGf (chan, vp->scale[2]);
+
+ /* now set the viewport rectangle to viewport dimensions for clipping */
+
+ x = (int)(vp->translate[0] - fabsf(vp->scale[0]));
+ y = (int)(vp->translate[1] - fabsf(vp->scale[1]));
+ w = (int)fabsf(2.0f * vp->scale[0]);
+ h = (int)fabsf(2.0f * vp->scale[1]);
+ zmin = vp->translate[2] - fabsf(vp->scale[2]);
+ zmax = vp->translate[2] + fabsf(vp->scale[2]);
+
+ BEGIN_RING(chan, RING_3D(VIEWPORT_HORIZ(0)), 2);
+ OUT_RING (chan, (w << 16) | x);
+ OUT_RING (chan, (h << 16) | y);
+ BEGIN_RING(chan, RING_3D(DEPTH_RANGE_NEAR(0)), 2);
+ OUT_RINGf (chan, zmin);
+ OUT_RINGf (chan, zmax);
+}
+
+static void
+nvc0_validate_clip(struct nvc0_context *nvc0)
+{
+ struct nouveau_channel *chan = nvc0->screen->base.channel;
+ uint32_t clip;
+
+ if (nvc0->clip.depth_clamp) {
+ clip =
+ NVC0_3D_VIEW_VOLUME_CLIP_CTRL_UNK1_UNK1 |
+ NVC0_3D_VIEW_VOLUME_CLIP_CTRL_DEPTH_CLAMP_NEAR |
+ NVC0_3D_VIEW_VOLUME_CLIP_CTRL_DEPTH_CLAMP_FAR |
+ NVC0_3D_VIEW_VOLUME_CLIP_CTRL_UNK12_UNK2;
+ } else {
+ clip = NVC0_3D_VIEW_VOLUME_CLIP_CTRL_UNK1_UNK1;
+ }
+
+ BEGIN_RING(chan, RING_3D(VIEW_VOLUME_CLIP_CTRL), 1);
+ OUT_RING (chan, clip);
+
+ if (nvc0->clip.nr) {
+ struct nouveau_bo *bo = nvc0->screen->uniforms;
+
+ MARK_RING (chan, 6 + nvc0->clip.nr * 4, 2);
+ BEGIN_RING(chan, RING_3D(CB_SIZE), 3);
+ OUT_RING (chan, 256);
+ OUT_RELOCh(chan, bo, 5 << 16, NOUVEAU_BO_VRAM | NOUVEAU_BO_RD);
+ OUT_RELOCl(chan, bo, 5 << 16, NOUVEAU_BO_VRAM | NOUVEAU_BO_RD);
+ BEGIN_RING_1I(chan, RING_3D(CB_POS), nvc0->clip.nr * 4 + 1);
+ OUT_RING (chan, 0);
+ OUT_RINGp (chan, &nvc0->clip.ucp[0][0], nvc0->clip.nr * 4);
+
+ BEGIN_RING(chan, RING_3D(VP_CLIP_DISTANCE_ENABLE), 1);
+ OUT_RING (chan, (1 << nvc0->clip.nr) - 1);
+ } else {
+ IMMED_RING(chan, RING_3D(VP_CLIP_DISTANCE_ENABLE), 0);
+ }
+}
+
+static void
+nvc0_validate_blend(struct nvc0_context *nvc0)
+{
+ struct nouveau_channel *chan = nvc0->screen->base.channel;
+
+ WAIT_RING(chan, nvc0->blend->size);
+ OUT_RINGp(chan, nvc0->blend->state, nvc0->blend->size);
+}
+
+static void
+nvc0_validate_zsa(struct nvc0_context *nvc0)
+{
+ struct nouveau_channel *chan = nvc0->screen->base.channel;
+
+ WAIT_RING(chan, nvc0->zsa->size);
+ OUT_RINGp(chan, nvc0->zsa->state, nvc0->zsa->size);
+}
+
+static void
+nvc0_validate_rasterizer(struct nvc0_context *nvc0)
+{
+ struct nouveau_channel *chan = nvc0->screen->base.channel;
+
+ WAIT_RING(chan, nvc0->rast->size);
+ OUT_RINGp(chan, nvc0->rast->state, nvc0->rast->size);
+}
+
+static void
+nvc0_constbufs_validate(struct nvc0_context *nvc0)
+{
+ struct nouveau_channel *chan = nvc0->screen->base.channel;
+ struct nouveau_bo *bo;
+ unsigned s;
+
+ for (s = 0; s < 5; ++s) {
+ struct nv04_resource *res;
+ int i;
+
+ while (nvc0->constbuf_dirty[s]) {
+ unsigned base = 0;
+ unsigned offset = 0, words = 0;
+ boolean rebind = TRUE;
+
+ i = ffs(nvc0->constbuf_dirty[s]) - 1;
+ nvc0->constbuf_dirty[s] &= ~(1 << i);
+
+ res = nv04_resource(nvc0->constbuf[s][i]);
+ if (!res) {
+ BEGIN_RING(chan, RING_3D(CB_BIND(s)), 1);
+ OUT_RING (chan, (i << 4) | 0);
+ if (i == 0)
+ nvc0->state.uniform_buffer_bound[s] = 0;
+ continue;
+ }
+
+ if (!nouveau_resource_mapped_by_gpu(&res->base)) {
+ if (i == 0) {
+ base = s << 16;
+ bo = nvc0->screen->uniforms;
+
+ if (nvc0->state.uniform_buffer_bound[s] >= res->base.width0)
+ rebind = FALSE;
+ else
+ nvc0->state.uniform_buffer_bound[s] =
+ align(res->base.width0, 0x100);
+ } else {
+ bo = res->bo;
+ }
+#if 0
+ nvc0_m2mf_push_linear(nvc0, bo, NOUVEAU_BO_VRAM,
+ base, res->base.width0, res->data);
+ BEGIN_RING(chan, RING_3D_(0x021c), 1);
+ OUT_RING (chan, 0x1111);
+#else
+ words = res->base.width0 / 4;
+#endif
+ } else {
+ bo = res->bo;
+ if (i == 0)
+ nvc0->state.uniform_buffer_bound[s] = 0;
+ }
+
+ if (bo != nvc0->screen->uniforms)
+ nvc0_bufctx_add_resident(nvc0, NVC0_BUFCTX_CONSTANT, res,
+ NOUVEAU_BO_VRAM | NOUVEAU_BO_RD);
+
+ if (rebind) {
+ MARK_RING (chan, 4, 2);
+ BEGIN_RING(chan, RING_3D(CB_SIZE), 3);
+ OUT_RING (chan, align(res->base.width0, 0x100));
+ OUT_RELOCh(chan, bo, base, NOUVEAU_BO_VRAM | NOUVEAU_BO_RD);
+ OUT_RELOCl(chan, bo, base, NOUVEAU_BO_VRAM | NOUVEAU_BO_RD);
+ BEGIN_RING(chan, RING_3D(CB_BIND(s)), 1);
+ OUT_RING (chan, (i << 4) | 1);
+ }
+
+ while (words) {
+ unsigned nr = AVAIL_RING(chan);
+
+ if (nr < 16) {
+ FIRE_RING(chan);
+ continue;
+ }
+ nr = MIN2(MIN2(nr - 6, words), NV04_PFIFO_MAX_PACKET_LEN - 1);
+
+ MARK_RING (chan, nr + 5, 2);
+ BEGIN_RING(chan, RING_3D(CB_SIZE), 3);
+ OUT_RING (chan, align(res->base.width0, 0x100));
+ OUT_RELOCh(chan, bo, base, NOUVEAU_BO_VRAM | NOUVEAU_BO_RD);
+ OUT_RELOCl(chan, bo, base, NOUVEAU_BO_VRAM | NOUVEAU_BO_RD);
+ BEGIN_RING_1I(chan, RING_3D(CB_POS), nr + 1);
+ OUT_RING (chan, offset);
+ OUT_RINGp (chan, &res->data[offset], nr);
+
+ offset += nr * 4;
+ words -= nr;
+ }
+ }
+ }
+}
+
+static void
+nvc0_validate_derived_1(struct nvc0_context *nvc0)
+{
+ struct nouveau_channel *chan = nvc0->screen->base.channel;
+ boolean early_z;
+
+ early_z = nvc0->fragprog->fp.early_z && !nvc0->zsa->pipe.alpha.enabled;
+
+ if (early_z != nvc0->state.early_z) {
+ nvc0->state.early_z = early_z;
+ IMMED_RING(chan, RING_3D(EARLY_FRAGMENT_TESTS), early_z);
+ }
+}
+
+static void
+nvc0_switch_pipe_context(struct nvc0_context *ctx_to)
+{
+ struct nvc0_context *ctx_from = ctx_to->screen->cur_ctx;
+
+ if (ctx_from)
+ ctx_to->state = ctx_from->state;
+
+ ctx_to->dirty = ~0;
+
+ if (!ctx_to->vertex)
+ ctx_to->dirty &= ~(NVC0_NEW_VERTEX | NVC0_NEW_ARRAYS);
+
+ if (!ctx_to->vertprog)
+ ctx_to->dirty &= ~NVC0_NEW_VERTPROG;
+ if (!ctx_to->fragprog)
+ ctx_to->dirty &= ~NVC0_NEW_FRAGPROG;
+
+ if (!ctx_to->blend)
+ ctx_to->dirty &= ~NVC0_NEW_BLEND;
+ if (!ctx_to->rast)
+ ctx_to->dirty &= ~NVC0_NEW_RASTERIZER;
+ if (!ctx_to->zsa)
+ ctx_to->dirty &= ~NVC0_NEW_ZSA;
+
+ ctx_to->screen->base.channel->user_private = ctx_to->screen->cur_ctx =
+ ctx_to;
+}
+
+static struct state_validate {
+ void (*func)(struct nvc0_context *);
+ uint32_t states;
+} validate_list[] = {
+ { nvc0_validate_fb, NVC0_NEW_FRAMEBUFFER },
+ { nvc0_validate_blend, NVC0_NEW_BLEND },
+ { nvc0_validate_zsa, NVC0_NEW_ZSA },
+ { nvc0_validate_rasterizer, NVC0_NEW_RASTERIZER },
+ { nvc0_validate_blend_colour, NVC0_NEW_BLEND_COLOUR },
+ { nvc0_validate_stencil_ref, NVC0_NEW_STENCIL_REF },
+ { nvc0_validate_stipple, NVC0_NEW_STIPPLE },
+ { nvc0_validate_scissor, NVC0_NEW_SCISSOR | NVC0_NEW_RASTERIZER },
+ { nvc0_validate_viewport, NVC0_NEW_VIEWPORT },
+ { nvc0_validate_clip, NVC0_NEW_CLIP },
+ { nvc0_vertprog_validate, NVC0_NEW_VERTPROG },
+ { nvc0_tctlprog_validate, NVC0_NEW_TCTLPROG },
+ { nvc0_tevlprog_validate, NVC0_NEW_TEVLPROG },
+ { nvc0_gmtyprog_validate, NVC0_NEW_GMTYPROG },
+ { nvc0_fragprog_validate, NVC0_NEW_FRAGPROG },
+ { nvc0_validate_derived_1, NVC0_NEW_FRAGPROG | NVC0_NEW_ZSA },
+ { nvc0_constbufs_validate, NVC0_NEW_CONSTBUF },
+ { nvc0_validate_textures, NVC0_NEW_TEXTURES },
+ { nvc0_validate_samplers, NVC0_NEW_SAMPLERS },
+ { nvc0_vertex_arrays_validate, NVC0_NEW_VERTEX | NVC0_NEW_ARRAYS },
+ { nvc0_tfb_validate, NVC0_NEW_TFB | NVC0_NEW_TFB_BUFFERS }
+};
+#define validate_list_len (sizeof(validate_list) / sizeof(validate_list[0]))
+
+boolean
+nvc0_state_validate(struct nvc0_context *nvc0)
+{
+ unsigned i;
+
+ if (nvc0->screen->cur_ctx != nvc0)
+ nvc0_switch_pipe_context(nvc0);
+
+ if (nvc0->dirty) {
+ for (i = 0; i < validate_list_len; ++i) {
+ struct state_validate *validate = &validate_list[i];
+
+ if (nvc0->dirty & validate->states)
+ validate->func(nvc0);
+ }
+ nvc0->dirty = 0;
+ }
+
+ nvc0_bufctx_emit_relocs(nvc0);
+
+ return TRUE;
+}
diff --git a/src/gallium/drivers/nvc0/nvc0_stateobj.h b/src/gallium/drivers/nvc0/nvc0_stateobj.h
new file mode 100644
index 00000000000..8222f9375ee
--- /dev/null
+++ b/src/gallium/drivers/nvc0/nvc0_stateobj.h
@@ -0,0 +1,60 @@
+
+#ifndef __NVC0_STATEOBJ_H__
+#define __NVC0_STATEOBJ_H__
+
+#include "pipe/p_state.h"
+
+#define SB_BEGIN_3D(so, m, s) \
+ (so)->state[(so)->size++] = \
+ (0x2 << 28) | ((s) << 16) | (NVC0_SUBCH_3D << 13) | ((NVC0_3D_##m) >> 2)
+
+#define SB_IMMED_3D(so, m, d) \
+ (so)->state[(so)->size++] = \
+ (0x8 << 28) | ((d) << 16) | (NVC0_SUBCH_3D << 13) | ((NVC0_3D_##m) >> 2)
+
+#define SB_DATA(so, u) (so)->state[(so)->size++] = (u)
+
+#include "nv50/nv50_stateobj_tex.h"
+
+struct nvc0_blend_stateobj {
+ struct pipe_blend_state pipe;
+ int size;
+ uint32_t state[72];
+};
+
+struct nvc0_rasterizer_stateobj {
+ struct pipe_rasterizer_state pipe;
+ int size;
+ uint32_t state[36];
+};
+
+struct nvc0_zsa_stateobj {
+ struct pipe_depth_stencil_alpha_state pipe;
+ int size;
+ uint32_t state[29];
+};
+
+struct nvc0_vertex_element {
+ struct pipe_vertex_element pipe;
+ uint32_t state;
+};
+
+struct nvc0_vertex_stateobj {
+ struct translate *translate;
+ unsigned num_elements;
+ uint32_t instance_elts;
+ uint32_t instance_bufs;
+ boolean need_conversion; /* e.g. VFETCH cannot convert f64 to f32 */
+ unsigned vtx_size;
+ unsigned vtx_per_packet_max;
+ struct nvc0_vertex_element element[0];
+};
+
+/* will have to lookup index -> location qualifier from nvc0_program */
+struct nvc0_transform_feedback_state {
+ uint32_t stride[4];
+ uint8_t varying_count[4];
+ uint8_t varying_index[0];
+};
+
+#endif
diff --git a/src/gallium/drivers/nvc0/nvc0_surface.c b/src/gallium/drivers/nvc0/nvc0_surface.c
new file mode 100644
index 00000000000..fc5f45ea25d
--- /dev/null
+++ b/src/gallium/drivers/nvc0/nvc0_surface.c
@@ -0,0 +1,451 @@
+/*
+ * Copyright 2008 Ben Skeggs
+ *
+ * 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 <stdint.h>
+
+#include "pipe/p_defines.h"
+
+#include "util/u_inlines.h"
+#include "util/u_pack_color.h"
+#include "util/u_format.h"
+
+#include "nvc0_context.h"
+#include "nvc0_resource.h"
+#include "nvc0_transfer.h"
+
+#include "nv50/nv50_defs.xml.h"
+
+#define NVC0_ENG2D_SUPPORTED_FORMATS 0xff9ccfe1cce3ccc9ULL
+
+/* return TRUE for formats that can be converted among each other by NVC0_2D */
+static INLINE boolean
+nvc0_2d_format_faithful(enum pipe_format format)
+{
+ uint8_t id = nvc0_format_table[format].rt;
+
+ return (id >= 0xc0) && (NVC0_ENG2D_SUPPORTED_FORMATS & (1ULL << (id - 0xc0)));
+}
+
+static INLINE uint8_t
+nvc0_2d_format(enum pipe_format format)
+{
+ uint8_t id = nvc0_format_table[format].rt;
+
+ /* Hardware values for color formats range from 0xc0 to 0xff,
+ * but the 2D engine doesn't support all of them.
+ */
+ if (nvc0_2d_format_faithful(format))
+ return id;
+
+ switch (util_format_get_blocksize(format)) {
+ case 1:
+ return NV50_SURFACE_FORMAT_R8_UNORM;
+ case 2:
+ return NV50_SURFACE_FORMAT_R16_UNORM;
+ case 4:
+ return NV50_SURFACE_FORMAT_A8R8G8B8_UNORM;
+ case 8:
+ return NV50_SURFACE_FORMAT_R16G16B16A16_UNORM;
+ case 16:
+ return NV50_SURFACE_FORMAT_R32G32B32A32_FLOAT;
+ default:
+ return 0;
+ }
+}
+
+static int
+nvc0_2d_texture_set(struct nouveau_channel *chan, int dst,
+ struct nvc0_miptree *mt, unsigned level, unsigned layer)
+{
+ struct nouveau_bo *bo = mt->base.bo;
+ uint32_t width, height, depth;
+ uint32_t format;
+ uint32_t mthd = dst ? NVC0_2D_DST_FORMAT : NVC0_2D_SRC_FORMAT;
+ uint32_t flags = mt->base.domain | (dst ? NOUVEAU_BO_WR : NOUVEAU_BO_RD);
+ uint32_t offset = mt->level[level].offset;
+
+ format = nvc0_2d_format(mt->base.base.format);
+ if (!format) {
+ NOUVEAU_ERR("invalid/unsupported surface format: %s\n",
+ util_format_name(mt->base.base.format));
+ return 1;
+ }
+
+ width = u_minify(mt->base.base.width0, level);
+ height = u_minify(mt->base.base.height0, level);
+ depth = u_minify(mt->base.base.depth0, level);
+
+ /* layer has to be < depth, and depth > tile depth / 2 */
+
+ if (!mt->layout_3d) {
+ offset += mt->layer_stride * layer;
+ layer = 0;
+ depth = 1;
+ } else
+ if (!dst) {
+ offset += nvc0_miptree_zslice_offset(mt, level, layer);
+ layer = 0;
+ }
+
+ if (!(bo->tile_flags & NOUVEAU_BO_TILE_LAYOUT_MASK)) {
+ BEGIN_RING(chan, RING_2D_(mthd), 2);
+ OUT_RING (chan, format);
+ OUT_RING (chan, 1);
+ BEGIN_RING(chan, RING_2D_(mthd + 0x14), 5);
+ OUT_RING (chan, mt->level[level].pitch);
+ OUT_RING (chan, width);
+ OUT_RING (chan, height);
+ OUT_RELOCh(chan, bo, offset, flags);
+ OUT_RELOCl(chan, bo, offset, flags);
+ } else {
+ BEGIN_RING(chan, RING_2D_(mthd), 5);
+ OUT_RING (chan, format);
+ OUT_RING (chan, 0);
+ OUT_RING (chan, mt->level[level].tile_mode);
+ OUT_RING (chan, depth);
+ OUT_RING (chan, layer);
+ BEGIN_RING(chan, RING_2D_(mthd + 0x18), 4);
+ OUT_RING (chan, width);
+ OUT_RING (chan, height);
+ OUT_RELOCh(chan, bo, offset, flags);
+ OUT_RELOCl(chan, bo, offset, flags);
+ }
+
+#if 0
+ if (dst) {
+ BEGIN_RING(chan, RING_2D_(NVC0_2D_CLIP_X), 4);
+ OUT_RING (chan, 0);
+ OUT_RING (chan, 0);
+ OUT_RING (chan, width);
+ OUT_RING (chan, height);
+ }
+#endif
+ return 0;
+}
+
+static int
+nvc0_2d_texture_do_copy(struct nouveau_channel *chan,
+ struct nvc0_miptree *dst, unsigned dst_level,
+ unsigned dx, unsigned dy, unsigned dz,
+ struct nvc0_miptree *src, unsigned src_level,
+ unsigned sx, unsigned sy, unsigned sz,
+ unsigned w, unsigned h)
+{
+ int ret;
+
+ ret = MARK_RING(chan, 2 * 16 + 32, 4);
+ if (ret)
+ return ret;
+
+ ret = nvc0_2d_texture_set(chan, 1, dst, dst_level, dz);
+ if (ret)
+ return ret;
+
+ ret = nvc0_2d_texture_set(chan, 0, src, src_level, sz);
+ if (ret)
+ return ret;
+
+ /* 0/1 = CENTER/CORNER, 10/00 = POINT/BILINEAR */
+ BEGIN_RING(chan, RING_2D(BLIT_CONTROL), 1);
+ OUT_RING (chan, 0);
+ BEGIN_RING(chan, RING_2D(BLIT_DST_X), 4);
+ OUT_RING (chan, dx);
+ OUT_RING (chan, dy);
+ OUT_RING (chan, w);
+ OUT_RING (chan, h);
+ BEGIN_RING(chan, RING_2D(BLIT_DU_DX_FRACT), 4);
+ OUT_RING (chan, 0);
+ OUT_RING (chan, 1);
+ OUT_RING (chan, 0);
+ OUT_RING (chan, 1);
+ BEGIN_RING(chan, RING_2D(BLIT_SRC_X_FRACT), 4);
+ OUT_RING (chan, 0);
+ OUT_RING (chan, sx);
+ OUT_RING (chan, 0);
+ OUT_RING (chan, sy);
+
+ return 0;
+}
+
+static void
+nvc0_setup_m2mf_rect(struct nvc0_m2mf_rect *rect,
+ struct pipe_resource *restrict res, unsigned l,
+ unsigned x, unsigned y, unsigned z)
+{
+ struct nvc0_miptree *mt = nvc0_miptree(res);
+ const unsigned w = u_minify(res->width0, l);
+ const unsigned h = u_minify(res->height0, l);
+
+ rect->bo = mt->base.bo;
+ rect->domain = mt->base.domain;
+ rect->base = mt->level[l].offset;
+ rect->pitch = mt->level[l].pitch;
+ if (util_format_is_plain(res->format)) {
+ rect->width = w;
+ rect->height = h;
+ rect->x = x;
+ rect->y = y;
+ } else {
+ rect->width = util_format_get_nblocksx(res->format, w);
+ rect->height = util_format_get_nblocksy(res->format, h);
+ rect->x = util_format_get_nblocksx(res->format, x);
+ rect->y = util_format_get_nblocksy(res->format, y);
+ }
+ rect->tile_mode = mt->level[l].tile_mode;
+ rect->cpp = util_format_get_blocksize(res->format);
+
+ if (mt->layout_3d) {
+ rect->z = z;
+ rect->depth = u_minify(res->depth0, l);
+ } else {
+ rect->base += z * mt->layer_stride;
+ rect->z = 0;
+ rect->depth = 1;
+ }
+}
+
+static void
+nvc0_resource_copy_region(struct pipe_context *pipe,
+ struct pipe_resource *dst, unsigned dst_level,
+ unsigned dstx, unsigned dsty, unsigned dstz,
+ struct pipe_resource *src, unsigned src_level,
+ const struct pipe_box *src_box)
+{
+ struct nvc0_screen *screen = nvc0_context(pipe)->screen;
+ int ret;
+ unsigned dst_layer = dstz, src_layer = src_box->z;
+
+ nv04_resource(dst)->status |= NOUVEAU_BUFFER_STATUS_GPU_WRITING;
+
+ if (src->format == dst->format) {
+ struct nvc0_m2mf_rect drect, srect;
+ unsigned i;
+ unsigned nx = util_format_get_nblocksx(src->format, src_box->width);
+ unsigned ny = util_format_get_nblocksy(src->format, src_box->height);
+
+ nvc0_setup_m2mf_rect(&drect, dst, dst_level, dstx, dsty, dstz);
+ nvc0_setup_m2mf_rect(&srect, src, src_level,
+ src_box->x, src_box->y, src_box->z);
+
+ for (i = 0; i < src_box->depth; ++i) {
+ nvc0_m2mf_transfer_rect(&screen->base.base, &drect, &srect, nx, ny);
+
+ if (nvc0_miptree(dst)->layout_3d)
+ drect.z++;
+ else
+ drect.base += nvc0_miptree(dst)->layer_stride;
+
+ if (nvc0_miptree(src)->layout_3d)
+ srect.z++;
+ else
+ srect.base += nvc0_miptree(src)->layer_stride;
+ }
+ return;
+ }
+
+ assert(nvc0_2d_format_faithful(src->format));
+ assert(nvc0_2d_format_faithful(dst->format));
+
+ for (; dst_layer < dstz + src_box->depth; ++dst_layer, ++src_layer) {
+ ret = nvc0_2d_texture_do_copy(screen->base.channel,
+ nvc0_miptree(dst), dst_level,
+ dstx, dsty, dst_layer,
+ nvc0_miptree(src), src_level,
+ src_box->x, src_box->y, src_layer,
+ src_box->width, src_box->height);
+ if (ret)
+ return;
+ }
+}
+
+static void
+nvc0_clear_render_target(struct pipe_context *pipe,
+ struct pipe_surface *dst,
+ const float *rgba,
+ unsigned dstx, unsigned dsty,
+ unsigned width, unsigned height)
+{
+ struct nvc0_context *nv50 = nvc0_context(pipe);
+ struct nvc0_screen *screen = nv50->screen;
+ struct nouveau_channel *chan = screen->base.channel;
+ struct nvc0_miptree *mt = nvc0_miptree(dst->texture);
+ struct nvc0_surface *sf = nvc0_surface(dst);
+ struct nouveau_bo *bo = mt->base.bo;
+
+ BEGIN_RING(chan, RING_3D(CLEAR_COLOR(0)), 4);
+ OUT_RINGf (chan, rgba[0]);
+ OUT_RINGf (chan, rgba[1]);
+ OUT_RINGf (chan, rgba[2]);
+ OUT_RINGf (chan, rgba[3]);
+
+ if (MARK_RING(chan, 18, 2))
+ return;
+
+ BEGIN_RING(chan, RING_3D(RT_CONTROL), 1);
+ OUT_RING (chan, 1);
+ BEGIN_RING(chan, RING_3D(RT_ADDRESS_HIGH(0)), 9);
+ OUT_RELOCh(chan, bo, sf->offset, NOUVEAU_BO_VRAM | NOUVEAU_BO_WR);
+ OUT_RELOCl(chan, bo, sf->offset, NOUVEAU_BO_VRAM | NOUVEAU_BO_WR);
+ OUT_RING (chan, sf->width);
+ OUT_RING (chan, sf->height);
+ OUT_RING (chan, nvc0_format_table[dst->format].rt);
+ OUT_RING (chan, (mt->layout_3d << 16) |
+ mt->level[sf->base.u.tex.level].tile_mode);
+ OUT_RING (chan, dst->u.tex.first_layer + sf->depth);
+ OUT_RING (chan, mt->layer_stride >> 2);
+ OUT_RING (chan, dst->u.tex.first_layer);
+
+ BEGIN_RING(chan, RING_3D(CLIP_RECT_HORIZ(0)), 2);
+ OUT_RING (chan, ((dstx + width) << 16) | dstx);
+ OUT_RING (chan, ((dsty + height) << 16) | dsty);
+ IMMED_RING(chan, RING_3D(CLIP_RECTS_EN), 1);
+
+ BEGIN_RING(chan, RING_3D(CLEAR_BUFFERS), 1);
+ OUT_RING (chan, 0x3c);
+
+ IMMED_RING(chan, RING_3D(CLIP_RECTS_EN), 0);
+
+ nv50->dirty |= NVC0_NEW_FRAMEBUFFER;
+}
+
+static void
+nvc0_clear_depth_stencil(struct pipe_context *pipe,
+ struct pipe_surface *dst,
+ unsigned clear_flags,
+ double depth,
+ unsigned stencil,
+ unsigned dstx, unsigned dsty,
+ unsigned width, unsigned height)
+{
+ struct nvc0_context *nv50 = nvc0_context(pipe);
+ struct nvc0_screen *screen = nv50->screen;
+ struct nouveau_channel *chan = screen->base.channel;
+ struct nvc0_miptree *mt = nvc0_miptree(dst->texture);
+ struct nvc0_surface *sf = nvc0_surface(dst);
+ struct nouveau_bo *bo = mt->base.bo;
+ uint32_t mode = 0;
+ int unk = mt->base.base.target == PIPE_TEXTURE_2D;
+
+ if (clear_flags & PIPE_CLEAR_DEPTH) {
+ BEGIN_RING(chan, RING_3D(CLEAR_DEPTH), 1);
+ OUT_RINGf (chan, depth);
+ mode |= NVC0_3D_CLEAR_BUFFERS_Z;
+ }
+
+ if (clear_flags & PIPE_CLEAR_STENCIL) {
+ BEGIN_RING(chan, RING_3D(CLEAR_STENCIL), 1);
+ OUT_RING (chan, stencil & 0xff);
+ mode |= NVC0_3D_CLEAR_BUFFERS_S;
+ }
+
+ if (MARK_RING(chan, 17, 2))
+ return;
+
+ BEGIN_RING(chan, RING_3D(ZETA_ADDRESS_HIGH), 5);
+ OUT_RELOCh(chan, bo, sf->offset, NOUVEAU_BO_VRAM | NOUVEAU_BO_WR);
+ OUT_RELOCl(chan, bo, sf->offset, NOUVEAU_BO_VRAM | NOUVEAU_BO_WR);
+ OUT_RING (chan, nvc0_format_table[dst->format].rt);
+ OUT_RING (chan, mt->level[sf->base.u.tex.level].tile_mode);
+ OUT_RING (chan, mt->layer_stride >> 2);
+ BEGIN_RING(chan, RING_3D(ZETA_ENABLE), 1);
+ OUT_RING (chan, 1);
+ BEGIN_RING(chan, RING_3D(ZETA_HORIZ), 3);
+ OUT_RING (chan, sf->width);
+ OUT_RING (chan, sf->height);
+ OUT_RING (chan, (unk << 16) | (dst->u.tex.first_layer + sf->depth));
+ BEGIN_RING(chan, RING_3D(ZETA_BASE_LAYER), 1);
+ OUT_RING (chan, dst->u.tex.first_layer);
+
+ BEGIN_RING(chan, RING_3D(CLIP_RECT_HORIZ(0)), 2);
+ OUT_RING (chan, ((dstx + width) << 16) | dstx);
+ OUT_RING (chan, ((dsty + height) << 16) | dsty);
+ IMMED_RING(chan, RING_3D(CLIP_RECTS_EN), 1);
+
+ BEGIN_RING(chan, RING_3D(CLEAR_BUFFERS), 1);
+ OUT_RING (chan, mode);
+
+ IMMED_RING(chan, RING_3D(CLIP_RECTS_EN), 0);
+
+ nv50->dirty |= NVC0_NEW_FRAMEBUFFER;
+}
+
+void
+nvc0_clear(struct pipe_context *pipe, unsigned buffers,
+ const float *rgba, double depth, unsigned stencil)
+{
+ struct nvc0_context *nvc0 = nvc0_context(pipe);
+ struct nouveau_channel *chan = nvc0->screen->base.channel;
+ struct pipe_framebuffer_state *fb = &nvc0->framebuffer;
+ unsigned i;
+ const unsigned dirty = nvc0->dirty;
+ uint32_t mode = 0;
+
+ /* don't need NEW_BLEND, COLOR_MASK doesn't affect CLEAR_BUFFERS */
+ nvc0->dirty &= NVC0_NEW_FRAMEBUFFER;
+ if (!nvc0_state_validate(nvc0))
+ return;
+
+ if (buffers & PIPE_CLEAR_COLOR && fb->nr_cbufs) {
+ BEGIN_RING(chan, RING_3D(CLEAR_COLOR(0)), 4);
+ OUT_RINGf (chan, rgba[0]);
+ OUT_RINGf (chan, rgba[1]);
+ OUT_RINGf (chan, rgba[2]);
+ OUT_RINGf (chan, rgba[3]);
+ mode =
+ NVC0_3D_CLEAR_BUFFERS_R | NVC0_3D_CLEAR_BUFFERS_G |
+ NVC0_3D_CLEAR_BUFFERS_B | NVC0_3D_CLEAR_BUFFERS_A;
+ }
+
+ if (buffers & PIPE_CLEAR_DEPTH) {
+ BEGIN_RING(chan, RING_3D(CLEAR_DEPTH), 1);
+ OUT_RING (chan, fui(depth));
+ mode |= NVC0_3D_CLEAR_BUFFERS_Z;
+ }
+
+ if (buffers & PIPE_CLEAR_STENCIL) {
+ BEGIN_RING(chan, RING_3D(CLEAR_STENCIL), 1);
+ OUT_RING (chan, stencil & 0xff);
+ mode |= NVC0_3D_CLEAR_BUFFERS_S;
+ }
+
+ BEGIN_RING(chan, RING_3D(CLEAR_BUFFERS), 1);
+ OUT_RING (chan, mode);
+
+ for (i = 1; i < fb->nr_cbufs; i++) {
+ BEGIN_RING(chan, RING_3D(CLEAR_BUFFERS), 1);
+ OUT_RING (chan, (i << 6) | 0x3c);
+ }
+
+ nvc0->dirty = dirty & ~NVC0_NEW_FRAMEBUFFER;
+}
+
+void
+nvc0_init_surface_functions(struct nvc0_context *nvc0)
+{
+ struct pipe_context *pipe = &nvc0->base.pipe;
+
+ pipe->resource_copy_region = nvc0_resource_copy_region;
+ pipe->clear_render_target = nvc0_clear_render_target;
+ pipe->clear_depth_stencil = nvc0_clear_depth_stencil;
+}
+
+
diff --git a/src/gallium/drivers/nvc0/nvc0_tex.c b/src/gallium/drivers/nvc0/nvc0_tex.c
new file mode 100644
index 00000000000..24850b19986
--- /dev/null
+++ b/src/gallium/drivers/nvc0/nvc0_tex.c
@@ -0,0 +1,302 @@
+/*
+ * Copyright 2008 Ben Skeggs
+ *
+ * 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 "nvc0_context.h"
+#include "nvc0_resource.h"
+#include "nv50/nv50_texture.xml.h"
+
+#include "util/u_format.h"
+
+#define NV50_TIC_0_SWIZZLE__MASK \
+ (NV50_TIC_0_MAPA__MASK | NV50_TIC_0_MAPB__MASK | \
+ NV50_TIC_0_MAPG__MASK | NV50_TIC_0_MAPR__MASK)
+
+static INLINE uint32_t
+nv50_tic_swizzle(uint32_t tc, unsigned swz, boolean tex_int)
+{
+ switch (swz) {
+ case PIPE_SWIZZLE_RED:
+ return (tc & NV50_TIC_0_MAPR__MASK) >> NV50_TIC_0_MAPR__SHIFT;
+ case PIPE_SWIZZLE_GREEN:
+ return (tc & NV50_TIC_0_MAPG__MASK) >> NV50_TIC_0_MAPG__SHIFT;
+ case PIPE_SWIZZLE_BLUE:
+ return (tc & NV50_TIC_0_MAPB__MASK) >> NV50_TIC_0_MAPB__SHIFT;
+ case PIPE_SWIZZLE_ALPHA:
+ return (tc & NV50_TIC_0_MAPA__MASK) >> NV50_TIC_0_MAPA__SHIFT;
+ case PIPE_SWIZZLE_ONE:
+ return tex_int ? NV50_TIC_MAP_ONE_INT : NV50_TIC_MAP_ONE_FLOAT;
+ case PIPE_SWIZZLE_ZERO:
+ default:
+ return NV50_TIC_MAP_ZERO;
+ }
+}
+
+struct pipe_sampler_view *
+nvc0_create_sampler_view(struct pipe_context *pipe,
+ struct pipe_resource *texture,
+ const struct pipe_sampler_view *templ)
+{
+ const struct util_format_description *desc;
+ uint32_t *tic;
+ uint32_t swz[4];
+ uint32_t depth;
+ struct nv50_tic_entry *view;
+ struct nvc0_miptree *mt = nvc0_miptree(texture);
+ boolean tex_int;
+
+ view = MALLOC_STRUCT(nv50_tic_entry);
+ if (!view)
+ return NULL;
+
+ view->pipe = *templ;
+ view->pipe.reference.count = 1;
+ view->pipe.texture = NULL;
+ view->pipe.context = pipe;
+
+ view->id = -1;
+
+ pipe_resource_reference(&view->pipe.texture, texture);
+
+ tic = &view->tic[0];
+
+ desc = util_format_description(view->pipe.format);
+
+ /* TIC[0] */
+
+ tic[0] = nvc0_format_table[view->pipe.format].tic;
+
+ tex_int = FALSE; /* XXX: integer textures */
+
+ swz[0] = nv50_tic_swizzle(tic[0], view->pipe.swizzle_r, tex_int);
+ swz[1] = nv50_tic_swizzle(tic[0], view->pipe.swizzle_g, tex_int);
+ swz[2] = nv50_tic_swizzle(tic[0], view->pipe.swizzle_b, tex_int);
+ swz[3] = nv50_tic_swizzle(tic[0], view->pipe.swizzle_a, tex_int);
+ tic[0] = (tic[0] & ~NV50_TIC_0_SWIZZLE__MASK) |
+ (swz[0] << NV50_TIC_0_MAPR__SHIFT) |
+ (swz[1] << NV50_TIC_0_MAPG__SHIFT) |
+ (swz[2] << NV50_TIC_0_MAPB__SHIFT) |
+ (swz[3] << NV50_TIC_0_MAPA__SHIFT);
+
+ tic[1] = /* mt->base.bo->offset; */ 0;
+ tic[2] = /* mt->base.bo->offset >> 32 */ 0;
+
+ tic[2] |= 0x10001000 | NV50_TIC_2_NO_BORDER;
+
+ if (desc->colorspace == UTIL_FORMAT_COLORSPACE_SRGB)
+ tic[2] |= NV50_TIC_2_COLORSPACE_SRGB;
+
+ if (mt->base.base.target != PIPE_TEXTURE_RECT)
+ tic[2] |= NV50_TIC_2_NORMALIZED_COORDS;
+
+ tic[2] |=
+ ((mt->base.bo->tile_mode & 0x0f0) << (22 - 4)) |
+ ((mt->base.bo->tile_mode & 0xf00) << (25 - 8));
+
+ depth = MAX2(mt->base.base.array_size, mt->base.base.depth0);
+
+ if (mt->base.base.target == PIPE_TEXTURE_1D_ARRAY ||
+ mt->base.base.target == PIPE_TEXTURE_2D_ARRAY) {
+ /* there doesn't seem to be a base layer field in TIC */
+ tic[1] = view->pipe.u.tex.first_layer * mt->layer_stride;
+ depth = view->pipe.u.tex.last_layer - view->pipe.u.tex.first_layer + 1;
+ }
+
+ switch (mt->base.base.target) {
+ case PIPE_TEXTURE_1D:
+ tic[2] |= NV50_TIC_2_TARGET_1D;
+ break;
+ case PIPE_TEXTURE_2D:
+ tic[2] |= NV50_TIC_2_TARGET_2D;
+ break;
+ case PIPE_TEXTURE_RECT:
+ tic[2] |= NV50_TIC_2_TARGET_RECT;
+ break;
+ case PIPE_TEXTURE_3D:
+ tic[2] |= NV50_TIC_2_TARGET_3D;
+ break;
+ case PIPE_TEXTURE_CUBE:
+ depth /= 6;
+ if (depth > 1)
+ tic[2] |= NV50_TIC_2_TARGET_CUBE_ARRAY;
+ else
+ tic[2] |= NV50_TIC_2_TARGET_CUBE;
+ break;
+ case PIPE_TEXTURE_1D_ARRAY:
+ tic[2] |= NV50_TIC_2_TARGET_1D_ARRAY;
+ break;
+ case PIPE_TEXTURE_2D_ARRAY:
+ tic[2] |= NV50_TIC_2_TARGET_2D_ARRAY;
+ break;
+ case PIPE_BUFFER:
+ tic[2] |= NV50_TIC_2_TARGET_BUFFER | NV50_TIC_2_LINEAR;
+ break;
+ default:
+ NOUVEAU_ERR("invalid texture target: %d\n", mt->base.base.target);
+ return FALSE;
+ }
+
+ if (mt->base.base.target == PIPE_BUFFER)
+ tic[3] = mt->base.base.width0;
+ else
+ tic[3] = 0x00300000;
+
+ tic[4] = (1 << 31) | mt->base.base.width0;
+
+ tic[5] = mt->base.base.height0 & 0xffff;
+ tic[5] |= depth << 16;
+ tic[5] |= mt->base.base.last_level << 28;
+
+ tic[6] = 0x03000000;
+
+ tic[7] = (view->pipe.u.tex.last_level << 4) | view->pipe.u.tex.first_level;
+
+ return &view->pipe;
+}
+
+static boolean
+nvc0_validate_tic(struct nvc0_context *nvc0, int s)
+{
+ struct nouveau_channel *chan = nvc0->screen->base.channel;
+ struct nouveau_bo *txc = nvc0->screen->txc;
+ unsigned i;
+ boolean need_flush = FALSE;
+
+ for (i = 0; i < nvc0->num_textures[s]; ++i) {
+ struct nv50_tic_entry *tic = nv50_tic_entry(nvc0->textures[s][i]);
+ struct nv04_resource *res;
+
+ if (!tic) {
+ BEGIN_RING(chan, RING_3D(BIND_TIC(s)), 1);
+ OUT_RING (chan, (i << 1) | 0);
+ continue;
+ }
+ res = &nvc0_miptree(tic->pipe.texture)->base;
+
+ if (tic->id < 0) {
+ uint32_t offset = tic->tic[1];
+
+ tic->id = nvc0_screen_tic_alloc(nvc0->screen, tic);
+
+ MARK_RING (chan, 9 + 8, 4);
+ BEGIN_RING(chan, RING_MF(OFFSET_OUT_HIGH), 2);
+ OUT_RELOCh(chan, txc, tic->id * 32, NOUVEAU_BO_VRAM | NOUVEAU_BO_WR);
+ OUT_RELOCl(chan, txc, tic->id * 32, NOUVEAU_BO_VRAM | NOUVEAU_BO_WR);
+ BEGIN_RING(chan, RING_MF(LINE_LENGTH_IN), 2);
+ OUT_RING (chan, 32);
+ OUT_RING (chan, 1);
+ BEGIN_RING(chan, RING_MF(EXEC), 1);
+ OUT_RING (chan, 0x100111);
+ BEGIN_RING_NI(chan, RING_MF(DATA), 8);
+ OUT_RING (chan, tic->tic[0]);
+ OUT_RELOCl(chan, res->bo, offset, NOUVEAU_BO_VRAM | NOUVEAU_BO_RD);
+ OUT_RELOC (chan, res->bo, offset, NOUVEAU_BO_VRAM | NOUVEAU_BO_RD |
+ NOUVEAU_BO_HIGH | NOUVEAU_BO_OR, tic->tic[2], tic->tic[2]);
+ OUT_RINGp (chan, &tic->tic[3], 5);
+
+ need_flush = TRUE;
+ } else
+ if (res->status & NOUVEAU_BUFFER_STATUS_GPU_WRITING) {
+ BEGIN_RING(chan, RING_3D(TEX_CACHE_CTL), 1);
+ OUT_RING (chan, (tic->id << 4) | 1);
+ }
+ nvc0->screen->tic.lock[tic->id / 32] |= 1 << (tic->id % 32);
+
+ res->status &= ~NOUVEAU_BUFFER_STATUS_GPU_WRITING;
+ res->status |= NOUVEAU_BUFFER_STATUS_GPU_READING;
+
+ nvc0_bufctx_add_resident(nvc0, NVC0_BUFCTX_TEXTURES, res,
+ NOUVEAU_BO_VRAM | NOUVEAU_BO_RD);
+
+ BEGIN_RING(chan, RING_3D(BIND_TIC(s)), 1);
+ OUT_RING (chan, (tic->id << 9) | (i << 1) | 1);
+ }
+ for (; i < nvc0->state.num_textures[s]; ++i) {
+ BEGIN_RING(chan, RING_3D(BIND_TIC(s)), 1);
+ OUT_RING (chan, (i << 1) | 0);
+ }
+ nvc0->state.num_textures[s] = nvc0->num_textures[s];
+
+ return need_flush;
+}
+
+void nvc0_validate_textures(struct nvc0_context *nvc0)
+{
+ boolean need_flush;
+
+ need_flush = nvc0_validate_tic(nvc0, 0);
+ need_flush |= nvc0_validate_tic(nvc0, 4);
+
+ if (need_flush) {
+ BEGIN_RING(nvc0->screen->base.channel, RING_3D(TIC_FLUSH), 1);
+ OUT_RING (nvc0->screen->base.channel, 0);
+ }
+}
+
+static boolean
+nvc0_validate_tsc(struct nvc0_context *nvc0, int s)
+{
+ struct nouveau_channel *chan = nvc0->screen->base.channel;
+ unsigned i;
+ boolean need_flush = FALSE;
+
+ for (i = 0; i < nvc0->num_samplers[s]; ++i) {
+ struct nv50_tsc_entry *tsc = nv50_tsc_entry(nvc0->samplers[s][i]);
+
+ if (!tsc) {
+ BEGIN_RING(chan, RING_3D(BIND_TSC(s)), 1);
+ OUT_RING (chan, (i << 4) | 0);
+ continue;
+ }
+ if (tsc->id < 0) {
+ tsc->id = nvc0_screen_tsc_alloc(nvc0->screen, tsc);
+
+ nvc0_m2mf_push_linear(&nvc0->base, nvc0->screen->txc,
+ 65536 + tsc->id * 32, NOUVEAU_BO_VRAM,
+ 32, tsc->tsc);
+ need_flush = TRUE;
+ }
+ nvc0->screen->tsc.lock[tsc->id / 32] |= 1 << (tsc->id % 32);
+
+ BEGIN_RING(chan, RING_3D(BIND_TSC(s)), 1);
+ OUT_RING (chan, (tsc->id << 12) | (i << 4) | 1);
+ }
+ for (; i < nvc0->state.num_samplers[s]; ++i) {
+ BEGIN_RING(chan, RING_3D(BIND_TSC(s)), 1);
+ OUT_RING (chan, (i << 4) | 0);
+ }
+ nvc0->state.num_samplers[s] = nvc0->num_samplers[s];
+
+ return need_flush;
+}
+
+void nvc0_validate_samplers(struct nvc0_context *nvc0)
+{
+ boolean need_flush;
+
+ need_flush = nvc0_validate_tsc(nvc0, 0);
+ need_flush |= nvc0_validate_tsc(nvc0, 4);
+
+ if (need_flush) {
+ BEGIN_RING(nvc0->screen->base.channel, RING_3D(TSC_FLUSH), 1);
+ OUT_RING (nvc0->screen->base.channel, 0);
+ }
+}
diff --git a/src/gallium/drivers/nvc0/nvc0_tgsi_to_nc.c b/src/gallium/drivers/nvc0/nvc0_tgsi_to_nc.c
new file mode 100644
index 00000000000..a44d330c731
--- /dev/null
+++ b/src/gallium/drivers/nvc0/nvc0_tgsi_to_nc.c
@@ -0,0 +1,2023 @@
+/*
+ * Copyright 2010 Christoph Bumiller
+ *
+ * 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 <unistd.h>
+
+#define NOUVEAU_DEBUG 1
+
+#include "pipe/p_shader_tokens.h"
+#include "tgsi/tgsi_parse.h"
+#include "tgsi/tgsi_util.h"
+#include "tgsi/tgsi_dump.h"
+#include "util/u_dynarray.h"
+
+#include "nvc0_pc.h"
+#include "nvc0_program.h"
+
+/* Arbitrary internal limits. */
+#define BLD_MAX_TEMPS 64
+#define BLD_MAX_ADDRS 4
+#define BLD_MAX_PREDS 4
+#define BLD_MAX_IMMDS 128
+#define BLD_MAX_OUTPS PIPE_MAX_SHADER_OUTPUTS
+
+#define BLD_MAX_COND_NESTING 8
+#define BLD_MAX_LOOP_NESTING 4
+#define BLD_MAX_CALL_NESTING 2
+
+/* This structure represents a TGSI register. */
+struct bld_register {
+ struct nv_value *current;
+ /* collect all SSA values assigned to it */
+ struct util_dynarray vals;
+ /* 1 bit per loop level, indicates if used/defd, reset when loop ends */
+ uint16_t loop_use;
+ uint16_t loop_def;
+};
+
+static INLINE struct nv_value **
+bld_register_access(struct bld_register *reg, unsigned i)
+{
+ return util_dynarray_element(&reg->vals, struct nv_value *, i);
+}
+
+static INLINE void
+bld_register_add_val(struct bld_register *reg, struct nv_value *val)
+{
+ struct nv_basic_block *bb = val->insn->bb;
+
+ if (reg->vals.size &&
+ (util_dynarray_top(&reg->vals, struct nv_value *))->insn->bb == bb)
+ *(util_dynarray_top_ptr(&reg->vals, struct nv_value *)) = val;
+ else
+ util_dynarray_append(&reg->vals, struct nv_value *, val);
+}
+
+static INLINE boolean
+bld_register_del_val(struct bld_register *reg, struct nv_value *val)
+{
+ unsigned i;
+
+ for (i = reg->vals.size / sizeof(struct nv_value *); i > 0; --i)
+ if (*bld_register_access(reg, i - 1) == val)
+ break;
+ if (!i)
+ return FALSE;
+
+ if (i != reg->vals.size / sizeof(struct nv_value *))
+ *bld_register_access(reg, i - 1) = util_dynarray_pop(&reg->vals,
+ struct nv_value *);
+ else
+ reg->vals.size -= sizeof(struct nv_value *);
+
+ return TRUE;
+}
+
+struct bld_context {
+ struct nvc0_translation_info *ti;
+
+ struct nv_pc *pc;
+ struct nv_basic_block *b;
+
+ struct tgsi_parse_context parse[BLD_MAX_CALL_NESTING];
+ int call_lvl;
+
+ struct nv_basic_block *cond_bb[BLD_MAX_COND_NESTING];
+ struct nv_basic_block *join_bb[BLD_MAX_COND_NESTING];
+ struct nv_basic_block *else_bb[BLD_MAX_COND_NESTING];
+ int cond_lvl;
+ struct nv_basic_block *loop_bb[BLD_MAX_LOOP_NESTING];
+ struct nv_basic_block *brkt_bb[BLD_MAX_LOOP_NESTING];
+ int loop_lvl;
+
+ ubyte out_kind; /* CFG_EDGE_FORWARD, or FAKE in case of BREAK/CONT */
+
+ struct bld_register tvs[BLD_MAX_TEMPS][4]; /* TGSI_FILE_TEMPORARY */
+ struct bld_register avs[BLD_MAX_ADDRS][4]; /* TGSI_FILE_ADDRESS */
+ struct bld_register pvs[BLD_MAX_PREDS][4]; /* TGSI_FILE_PREDICATE */
+ struct bld_register ovs[BLD_MAX_OUTPS][4]; /* TGSI_FILE_OUTPUT, FP only */
+
+ uint32_t outputs_written[(PIPE_MAX_SHADER_OUTPUTS + 7) / 8];
+ int hpos_index;
+
+ struct nv_value *zero;
+ struct nv_value *frag_coord[4];
+
+ /* wipe on new BB */
+ struct nv_value *saved_sysvals[4];
+ struct nv_value *saved_addr[4][2];
+ struct nv_value *saved_inputs[PIPE_MAX_SHADER_INPUTS][4];
+ struct nv_value *saved_immd[BLD_MAX_IMMDS];
+ uint num_immds;
+};
+
+static INLINE ubyte
+bld_register_file(struct bld_context *bld, struct bld_register *reg)
+{
+ if (reg >= &bld->pvs[0][0] &&
+ reg < &bld->ovs[0][0])
+ return NV_FILE_PRED;
+ return NV_FILE_GPR;
+}
+
+static INLINE struct nv_value *
+bld_fetch(struct bld_context *bld, struct bld_register *regs, int i, int c)
+{
+ regs[i * 4 + c].loop_use |= 1 << bld->loop_lvl;
+ return regs[i * 4 + c].current;
+}
+
+static struct nv_value *
+bld_loop_phi(struct bld_context *, struct bld_register *, struct nv_value *);
+
+/* If a variable is defined in a loop without prior use, we don't need
+ * a phi in the loop header to account for backwards flow.
+ *
+ * However, if this variable is then also used outside the loop, we do
+ * need a phi after all. But we must not use this phi's def inside the
+ * loop, so we can eliminate the phi if it is unused later.
+ */
+static INLINE void
+bld_store(struct bld_context *bld,
+ struct bld_register *regs, int i, int c, struct nv_value *val)
+{
+ const uint16_t m = 1 << bld->loop_lvl;
+ struct bld_register *reg = &regs[i * 4 + c];
+
+ if (bld->loop_lvl && !(m & (reg->loop_def | reg->loop_use)))
+ bld_loop_phi(bld, reg, val);
+
+ reg->current = val;
+ bld_register_add_val(reg, reg->current);
+
+ reg->loop_def |= 1 << bld->loop_lvl;
+}
+
+#define FETCH_TEMP(i, c) bld_fetch(bld, &bld->tvs[0][0], i, c)
+#define STORE_TEMP(i, c, v) bld_store(bld, &bld->tvs[0][0], i, c, (v))
+#define FETCH_ADDR(i, c) bld_fetch(bld, &bld->avs[0][0], i, c)
+#define STORE_ADDR(i, c, v) bld_store(bld, &bld->avs[0][0], i, c, (v))
+#define FETCH_PRED(i, c) bld_fetch(bld, &bld->pvs[0][0], i, c)
+#define STORE_PRED(i, c, v) bld_store(bld, &bld->pvs[0][0], i, c, (v))
+#define STORE_OUTP(i, c, v) \
+ do { \
+ bld_store(bld, &bld->ovs[0][0], i, c, (v)); \
+ bld->outputs_written[(i) / 8] |= 1 << (((i) * 4 + (c)) % 32); \
+ } while (0)
+
+static INLINE void
+bld_clear_def_use(struct bld_register *regs, int n, int lvl)
+{
+ int i;
+ const uint16_t mask = ~(1 << lvl);
+
+ for (i = 0; i < n * 4; ++i) {
+ regs[i].loop_def &= mask;
+ regs[i].loop_use &= mask;
+ }
+}
+
+static INLINE void
+bld_warn_uninitialized(struct bld_context *bld, int kind,
+ struct bld_register *reg, struct nv_basic_block *b)
+{
+#ifdef NOUVEAU_DEBUG
+ long i = (reg - &bld->tvs[0][0]) / 4;
+ long c = (reg - &bld->tvs[0][0]) & 3;
+
+ if (c == 3)
+ c = -1;
+ debug_printf("WARNING: TEMP[%li].%c %s used uninitialized in BB:%i\n",
+ i, (int)('x' + c), kind ? "may be" : "is", b->id);
+#endif
+}
+
+static INLINE struct nv_value *
+bld_def(struct nv_instruction *i, int c, struct nv_value *value)
+{
+ i->def[c] = value;
+ value->insn = i;
+ return value;
+}
+
+static INLINE struct nv_value *
+find_by_bb(struct bld_register *reg, struct nv_basic_block *b)
+{
+ int i;
+
+ if (reg->current && reg->current->insn->bb == b)
+ return reg->current;
+
+ for (i = 0; i < reg->vals.size / sizeof(struct nv_value *); ++i)
+ if ((*bld_register_access(reg, i))->insn->bb == b)
+ return *bld_register_access(reg, i);
+ return NULL;
+}
+
+/* Fetch value from register that was defined in the specified BB,
+ * or search for first definitions in all of its predecessors.
+ */
+static void
+fetch_by_bb(struct bld_register *reg,
+ struct nv_value **vals, int *n,
+ struct nv_basic_block *b)
+{
+ int i;
+ struct nv_value *val;
+
+ assert(*n < 16); /* MAX_COND_NESTING */
+
+ val = find_by_bb(reg, b);
+ if (val) {
+ for (i = 0; i < *n; ++i)
+ if (vals[i] == val)
+ return;
+ vals[(*n)++] = val;
+ return;
+ }
+ for (i = 0; i < b->num_in; ++i)
+ if (!IS_WALL_EDGE(b->in_kind[i]))
+ fetch_by_bb(reg, vals, n, b->in[i]);
+}
+
+static INLINE struct nv_value *
+bld_load_imm_u32(struct bld_context *bld, uint32_t u);
+
+static INLINE struct nv_value *
+bld_undef(struct bld_context *bld, ubyte file)
+{
+ struct nv_instruction *nvi = new_instruction(bld->pc, NV_OP_UNDEF);
+
+ return bld_def(nvi, 0, new_value(bld->pc, file, 4));
+}
+
+static struct nv_value *
+bld_phi(struct bld_context *bld, struct nv_basic_block *b,
+ struct bld_register *reg)
+{
+ struct nv_basic_block *in;
+ struct nv_value *vals[16] = { NULL };
+ struct nv_value *val;
+ struct nv_instruction *phi;
+ int i, j, n;
+
+ do {
+ i = n = 0;
+ fetch_by_bb(reg, vals, &n, b);
+
+ if (!n) {
+ bld_warn_uninitialized(bld, 0, reg, b);
+ return NULL;
+ }
+
+ if (n == 1) {
+ if (nvc0_bblock_dominated_by(b, vals[0]->insn->bb))
+ break;
+
+ bld_warn_uninitialized(bld, 1, reg, b);
+
+ /* back-tracking to insert missing value of other path */
+ in = b;
+ while (in->in[0]) {
+ if (in->num_in == 1) {
+ in = in->in[0];
+ } else {
+ if (!nvc0_bblock_reachable_by(in->in[0], vals[0]->insn->bb, b))
+ in = in->in[0];
+ else
+ if (!nvc0_bblock_reachable_by(in->in[1], vals[0]->insn->bb, b))
+ in = in->in[1];
+ else
+ in = in->in[0];
+ }
+ }
+ bld->pc->current_block = in;
+
+ /* should make this a no-op */
+ bld_register_add_val(reg, bld_undef(bld, vals[0]->reg.file));
+ continue;
+ }
+
+ for (i = 0; i < n; ++i) {
+ /* if value dominates b, continue to the redefinitions */
+ if (nvc0_bblock_dominated_by(b, vals[i]->insn->bb))
+ continue;
+
+ /* if value dominates any in-block, b should be the dom frontier */
+ for (j = 0; j < b->num_in; ++j)
+ if (nvc0_bblock_dominated_by(b->in[j], vals[i]->insn->bb))
+ break;
+ /* otherwise, find the dominance frontier and put the phi there */
+ if (j == b->num_in) {
+ in = nvc0_bblock_dom_frontier(vals[i]->insn->bb);
+ val = bld_phi(bld, in, reg);
+ bld_register_add_val(reg, val);
+ break;
+ }
+ }
+ } while(i < n);
+
+ bld->pc->current_block = b;
+
+ if (n == 1)
+ return vals[0];
+
+ phi = new_instruction(bld->pc, NV_OP_PHI);
+
+ bld_def(phi, 0, new_value(bld->pc, vals[0]->reg.file, vals[0]->reg.size));
+ for (i = 0; i < n; ++i)
+ nv_reference(bld->pc, phi, i, vals[i]);
+
+ return phi->def[0];
+}
+
+/* Insert a phi function in the loop header.
+ * For nested loops, we need to insert phi functions in all the outer
+ * loop headers if they don't have one yet.
+ *
+ * @def: redefinition from inside loop, or NULL if to be replaced later
+ */
+static struct nv_value *
+bld_loop_phi(struct bld_context *bld, struct bld_register *reg,
+ struct nv_value *def)
+{
+ struct nv_instruction *phi;
+ struct nv_basic_block *bb = bld->pc->current_block;
+ struct nv_value *val = NULL;
+
+ if (bld->ti->require_stores) /* XXX: actually only for INDEXABLE_TEMP */
+ return NULL;
+
+ if (bld->loop_lvl > 1) {
+ --bld->loop_lvl;
+ if (!((reg->loop_def | reg->loop_use) & (1 << bld->loop_lvl)))
+ val = bld_loop_phi(bld, reg, NULL);
+ ++bld->loop_lvl;
+ }
+
+ if (!val)
+ val = bld_phi(bld, bld->pc->current_block, reg); /* old definition */
+ if (!val) {
+ bld->pc->current_block = bld->loop_bb[bld->loop_lvl - 1]->in[0];
+ val = bld_undef(bld, bld_register_file(bld, reg));
+ }
+
+ bld->pc->current_block = bld->loop_bb[bld->loop_lvl - 1];
+
+ phi = new_instruction(bld->pc, NV_OP_PHI);
+
+ bld_def(phi, 0, new_value_like(bld->pc, val));
+ if (!def)
+ def = phi->def[0];
+
+ bld_register_add_val(reg, phi->def[0]);
+
+ phi->target = (struct nv_basic_block *)reg; /* cheat */
+
+ nv_reference(bld->pc, phi, 0, val);
+ nv_reference(bld->pc, phi, 1, def);
+
+ bld->pc->current_block = bb;
+
+ return phi->def[0];
+}
+
+static INLINE struct nv_value *
+bld_fetch_global(struct bld_context *bld, struct bld_register *reg)
+{
+ const uint16_t m = 1 << bld->loop_lvl;
+ const uint16_t use = reg->loop_use;
+
+ reg->loop_use |= m;
+
+ /* If neither used nor def'd inside the loop, build a phi in foresight,
+ * so we don't have to replace stuff later on, which requires tracking.
+ */
+ if (bld->loop_lvl && !((use | reg->loop_def) & m))
+ return bld_loop_phi(bld, reg, NULL);
+
+ return bld_phi(bld, bld->pc->current_block, reg);
+}
+
+static INLINE struct nv_value *
+bld_imm_u32(struct bld_context *bld, uint32_t u)
+{
+ int i;
+ unsigned n = bld->num_immds;
+
+ for (i = 0; i < n; ++i)
+ if (bld->saved_immd[i]->reg.imm.u32 == u)
+ return bld->saved_immd[i];
+
+ assert(n < BLD_MAX_IMMDS);
+ bld->num_immds++;
+
+ bld->saved_immd[n] = new_value(bld->pc, NV_FILE_IMM, 4);
+ bld->saved_immd[n]->reg.imm.u32 = u;
+ return bld->saved_immd[n];
+}
+
+static void
+bld_replace_value(struct nv_pc *, struct nv_basic_block *, struct nv_value *,
+ struct nv_value *);
+
+/* Replace the source of the phi in the loop header by the last assignment,
+ * or eliminate the phi function if there is no assignment inside the loop.
+ *
+ * Redundancy situation 1 - (used) but (not redefined) value:
+ * %3 = phi %0, %3 = %3 is used
+ * %3 = phi %0, %4 = is new definition
+ *
+ * Redundancy situation 2 - (not used) but (redefined) value:
+ * %3 = phi %0, %2 = %2 is used, %3 could be used outside, deleted by DCE
+ */
+static void
+bld_loop_end(struct bld_context *bld, struct nv_basic_block *bb)
+{
+ struct nv_basic_block *save = bld->pc->current_block;
+ struct nv_instruction *phi, *next;
+ struct nv_value *val;
+ struct bld_register *reg;
+ int i, s, n;
+
+ for (phi = bb->phi; phi && phi->opcode == NV_OP_PHI; phi = next) {
+ next = phi->next;
+
+ reg = (struct bld_register *)phi->target;
+ phi->target = NULL;
+
+ /* start with s == 1, src[0] is from outside the loop */
+ for (s = 1, n = 0; n < bb->num_in; ++n) {
+ if (bb->in_kind[n] != CFG_EDGE_BACK)
+ continue;
+
+ assert(s < 4);
+ bld->pc->current_block = bb->in[n];
+ val = bld_fetch_global(bld, reg);
+
+ for (i = 0; i < 4; ++i)
+ if (phi->src[i] && phi->src[i]->value == val)
+ break;
+ if (i == 4) {
+ /* skip values we do not want to replace */
+ for (; phi->src[s] && phi->src[s]->value != phi->def[0]; ++s);
+ nv_reference(bld->pc, phi, s++, val);
+ }
+ }
+ bld->pc->current_block = save;
+
+ if (phi->src[0]->value == phi->def[0] ||
+ phi->src[0]->value == phi->src[1]->value)
+ s = 1;
+ else
+ if (phi->src[1]->value == phi->def[0])
+ s = 0;
+ else
+ continue;
+
+ if (s >= 0) {
+ /* eliminate the phi */
+ bld_register_del_val(reg, phi->def[0]);
+
+ ++bld->pc->pass_seq;
+ bld_replace_value(bld->pc, bb, phi->def[0], phi->src[s]->value);
+
+ nvc0_insn_delete(phi);
+ }
+ }
+}
+
+static INLINE struct nv_value *
+bld_imm_f32(struct bld_context *bld, float f)
+{
+ return bld_imm_u32(bld, fui(f));
+}
+
+static struct nv_value *
+bld_insn_1(struct bld_context *bld, uint opcode, struct nv_value *src0)
+{
+ struct nv_instruction *insn = new_instruction(bld->pc, opcode);
+
+ nv_reference(bld->pc, insn, 0, src0);
+
+ return bld_def(insn, 0, new_value(bld->pc, NV_FILE_GPR, src0->reg.size));
+}
+
+static struct nv_value *
+bld_insn_2(struct bld_context *bld, uint opcode,
+ struct nv_value *src0, struct nv_value *src1)
+{
+ struct nv_instruction *insn = new_instruction(bld->pc, opcode);
+
+ nv_reference(bld->pc, insn, 0, src0);
+ nv_reference(bld->pc, insn, 1, src1);
+
+ return bld_def(insn, 0, new_value(bld->pc, NV_FILE_GPR, src0->reg.size));
+}
+
+static struct nv_value *
+bld_insn_3(struct bld_context *bld, uint opcode,
+ struct nv_value *src0, struct nv_value *src1,
+ struct nv_value *src2)
+{
+ struct nv_instruction *insn = new_instruction(bld->pc, opcode);
+
+ nv_reference(bld->pc, insn, 0, src0);
+ nv_reference(bld->pc, insn, 1, src1);
+ nv_reference(bld->pc, insn, 2, src2);
+
+ return bld_def(insn, 0, new_value(bld->pc, NV_FILE_GPR, src0->reg.size));
+}
+
+static INLINE void
+bld_src_predicate(struct bld_context *bld,
+ struct nv_instruction *nvi, int s, struct nv_value *val)
+{
+ nvi->predicate = s;
+ nv_reference(bld->pc, nvi, s, val);
+}
+
+static INLINE void
+bld_src_pointer(struct bld_context *bld,
+ struct nv_instruction *nvi, int s, struct nv_value *val)
+{
+ nvi->indirect = s;
+ nv_reference(bld->pc, nvi, s, val);
+}
+
+static void
+bld_lmem_store(struct bld_context *bld, struct nv_value *ptr, int ofst,
+ struct nv_value *val)
+{
+ struct nv_instruction *insn = new_instruction(bld->pc, NV_OP_ST);
+ struct nv_value *loc;
+
+ loc = new_value(bld->pc, NV_FILE_MEM_L, nv_type_sizeof(NV_TYPE_U32));
+
+ loc->reg.address = ofst * 4;
+
+ nv_reference(bld->pc, insn, 0, loc);
+ nv_reference(bld->pc, insn, 1, val);
+ if (ptr)
+ bld_src_pointer(bld, insn, 2, ptr);
+}
+
+static struct nv_value *
+bld_lmem_load(struct bld_context *bld, struct nv_value *ptr, int ofst)
+{
+ struct nv_value *loc, *val;
+
+ loc = new_value(bld->pc, NV_FILE_MEM_L, nv_type_sizeof(NV_TYPE_U32));
+
+ loc->reg.address = ofst * 4;
+
+ val = bld_insn_1(bld, NV_OP_LD, loc);
+ if (ptr)
+ bld_src_pointer(bld, val->insn, 1, ptr);
+
+ return val;
+}
+
+static struct nv_value *
+bld_pow(struct bld_context *bld, struct nv_value *x, struct nv_value *e)
+{
+ struct nv_value *val;
+
+ val = bld_insn_1(bld, NV_OP_LG2, x);
+ val = bld_insn_2(bld, NV_OP_MUL_F32, e, val);
+
+ val = bld_insn_1(bld, NV_OP_PREEX2, val);
+ val = bld_insn_1(bld, NV_OP_EX2, val);
+
+ return val;
+}
+
+static INLINE struct nv_value *
+bld_load_imm_f32(struct bld_context *bld, float f)
+{
+ if (f == 0.0f)
+ return bld->zero;
+ return bld_insn_1(bld, NV_OP_MOV, bld_imm_f32(bld, f));
+}
+
+static INLINE struct nv_value *
+bld_load_imm_u32(struct bld_context *bld, uint32_t u)
+{
+ if (u == 0)
+ return bld->zero;
+ return bld_insn_1(bld, NV_OP_MOV, bld_imm_u32(bld, u));
+}
+
+static INLINE struct nv_value *
+bld_setp(struct bld_context *bld, uint op, uint8_t cc,
+ struct nv_value *src0, struct nv_value *src1)
+{
+ struct nv_value *val = bld_insn_2(bld, op, src0, src1);
+
+ val->reg.file = NV_FILE_PRED;
+ val->reg.size = 1;
+ val->insn->set_cond = cc & 0xf;
+ return val;
+}
+
+static INLINE struct nv_value *
+bld_cvt(struct bld_context *bld, uint8_t dt, uint8_t st, struct nv_value *src)
+{
+ struct nv_value *val = bld_insn_1(bld, NV_OP_CVT, src);
+ val->insn->ext.cvt.d = dt;
+ val->insn->ext.cvt.s = st;
+ return val;
+}
+
+static void
+bld_kil(struct bld_context *bld, struct nv_value *src)
+{
+ struct nv_instruction *nvi;
+
+ src = bld_setp(bld, NV_OP_SET_F32, NV_CC_LT, src, bld->zero);
+
+ nvi = new_instruction(bld->pc, NV_OP_KIL);
+ nvi->fixed = 1;
+
+ bld_src_predicate(bld, nvi, 0, src);
+}
+
+static void
+bld_flow(struct bld_context *bld, uint opcode,
+ struct nv_value *pred, uint8_t cc, struct nv_basic_block *target,
+ boolean reconverge)
+{
+ struct nv_instruction *nvi;
+
+ if (reconverge)
+ new_instruction(bld->pc, NV_OP_JOINAT)->fixed = 1;
+
+ nvi = new_instruction(bld->pc, opcode);
+ nvi->target = target;
+ nvi->terminator = 1;
+ if (pred) {
+ nvi->cc = cc;
+ bld_src_predicate(bld, nvi, 0, pred);
+ }
+}
+
+static ubyte
+translate_setcc(unsigned opcode)
+{
+ switch (opcode) {
+ case TGSI_OPCODE_SLT: return NV_CC_LT;
+ case TGSI_OPCODE_SGE: return NV_CC_GE;
+ case TGSI_OPCODE_SEQ: return NV_CC_EQ;
+ case TGSI_OPCODE_SGT: return NV_CC_GT;
+ case TGSI_OPCODE_SLE: return NV_CC_LE;
+ case TGSI_OPCODE_SNE: return NV_CC_NE | NV_CC_U;
+ case TGSI_OPCODE_STR: return NV_CC_TR;
+ case TGSI_OPCODE_SFL: return NV_CC_FL;
+
+ case TGSI_OPCODE_ISLT: return NV_CC_LT;
+ case TGSI_OPCODE_ISGE: return NV_CC_GE;
+ case TGSI_OPCODE_USEQ: return NV_CC_EQ;
+ case TGSI_OPCODE_USGE: return NV_CC_GE;
+ case TGSI_OPCODE_USLT: return NV_CC_LT;
+ case TGSI_OPCODE_USNE: return NV_CC_NE;
+ default:
+ assert(0);
+ return NV_CC_FL;
+ }
+}
+
+static uint
+translate_opcode(uint opcode)
+{
+ switch (opcode) {
+ case TGSI_OPCODE_ABS: return NV_OP_ABS_F32;
+ case TGSI_OPCODE_ADD: return NV_OP_ADD_F32;
+ case TGSI_OPCODE_SUB: return NV_OP_SUB_F32;
+ case TGSI_OPCODE_UADD: return NV_OP_ADD_B32;
+ case TGSI_OPCODE_AND: return NV_OP_AND;
+ case TGSI_OPCODE_EX2: return NV_OP_EX2;
+ case TGSI_OPCODE_CEIL: return NV_OP_CEIL;
+ case TGSI_OPCODE_FLR: return NV_OP_FLOOR;
+ case TGSI_OPCODE_TRUNC: return NV_OP_TRUNC;
+ case TGSI_OPCODE_COS: return NV_OP_COS;
+ case TGSI_OPCODE_SIN: return NV_OP_SIN;
+ case TGSI_OPCODE_DDX: return NV_OP_DFDX;
+ case TGSI_OPCODE_DDY: return NV_OP_DFDY;
+ case TGSI_OPCODE_F2I:
+ case TGSI_OPCODE_F2U:
+ case TGSI_OPCODE_I2F:
+ case TGSI_OPCODE_U2F: return NV_OP_CVT;
+ case TGSI_OPCODE_INEG: return NV_OP_NEG_S32;
+ case TGSI_OPCODE_LG2: return NV_OP_LG2;
+ case TGSI_OPCODE_ISHR: return NV_OP_SAR;
+ case TGSI_OPCODE_USHR: return NV_OP_SHR;
+ case TGSI_OPCODE_MAD: return NV_OP_MAD_F32;
+ case TGSI_OPCODE_MAX: return NV_OP_MAX_F32;
+ case TGSI_OPCODE_IMAX: return NV_OP_MAX_S32;
+ case TGSI_OPCODE_UMAX: return NV_OP_MAX_U32;
+ case TGSI_OPCODE_MIN: return NV_OP_MIN_F32;
+ case TGSI_OPCODE_IMIN: return NV_OP_MIN_S32;
+ case TGSI_OPCODE_UMIN: return NV_OP_MIN_U32;
+ case TGSI_OPCODE_MUL: return NV_OP_MUL_F32;
+ case TGSI_OPCODE_UMUL: return NV_OP_MUL_B32;
+ case TGSI_OPCODE_OR: return NV_OP_OR;
+ case TGSI_OPCODE_RCP: return NV_OP_RCP;
+ case TGSI_OPCODE_RSQ: return NV_OP_RSQ;
+ case TGSI_OPCODE_SAD: return NV_OP_SAD;
+ case TGSI_OPCODE_SHL: return NV_OP_SHL;
+ case TGSI_OPCODE_SLT:
+ case TGSI_OPCODE_SGE:
+ case TGSI_OPCODE_SEQ:
+ case TGSI_OPCODE_SGT:
+ case TGSI_OPCODE_SLE:
+ case TGSI_OPCODE_SNE: return NV_OP_FSET_F32;
+ case TGSI_OPCODE_ISLT:
+ case TGSI_OPCODE_ISGE: return NV_OP_SET_S32;
+ case TGSI_OPCODE_USEQ:
+ case TGSI_OPCODE_USGE:
+ case TGSI_OPCODE_USLT:
+ case TGSI_OPCODE_USNE: return NV_OP_SET_U32;
+ case TGSI_OPCODE_TEX: return NV_OP_TEX;
+ case TGSI_OPCODE_TXP: return NV_OP_TEX;
+ case TGSI_OPCODE_TXB: return NV_OP_TXB;
+ case TGSI_OPCODE_TXL: return NV_OP_TXL;
+ case TGSI_OPCODE_XOR: return NV_OP_XOR;
+ default:
+ return NV_OP_NOP;
+ }
+}
+
+#if 0
+static ubyte
+infer_src_type(unsigned opcode)
+{
+ switch (opcode) {
+ case TGSI_OPCODE_MOV:
+ case TGSI_OPCODE_AND:
+ case TGSI_OPCODE_OR:
+ case TGSI_OPCODE_XOR:
+ case TGSI_OPCODE_SAD:
+ case TGSI_OPCODE_U2F:
+ case TGSI_OPCODE_UADD:
+ case TGSI_OPCODE_UDIV:
+ case TGSI_OPCODE_UMOD:
+ case TGSI_OPCODE_UMAD:
+ case TGSI_OPCODE_UMUL:
+ case TGSI_OPCODE_UMAX:
+ case TGSI_OPCODE_UMIN:
+ case TGSI_OPCODE_USEQ:
+ case TGSI_OPCODE_USGE:
+ case TGSI_OPCODE_USLT:
+ case TGSI_OPCODE_USNE:
+ case TGSI_OPCODE_USHR:
+ return NV_TYPE_U32;
+ case TGSI_OPCODE_I2F:
+ case TGSI_OPCODE_IDIV:
+ case TGSI_OPCODE_IMAX:
+ case TGSI_OPCODE_IMIN:
+ case TGSI_OPCODE_INEG:
+ case TGSI_OPCODE_ISGE:
+ case TGSI_OPCODE_ISHR:
+ case TGSI_OPCODE_ISLT:
+ return NV_TYPE_S32;
+ default:
+ return NV_TYPE_F32;
+ }
+}
+
+static ubyte
+infer_dst_type(unsigned opcode)
+{
+ switch (opcode) {
+ case TGSI_OPCODE_MOV:
+ case TGSI_OPCODE_F2U:
+ case TGSI_OPCODE_AND:
+ case TGSI_OPCODE_OR:
+ case TGSI_OPCODE_XOR:
+ case TGSI_OPCODE_SAD:
+ case TGSI_OPCODE_UADD:
+ case TGSI_OPCODE_UDIV:
+ case TGSI_OPCODE_UMOD:
+ case TGSI_OPCODE_UMAD:
+ case TGSI_OPCODE_UMUL:
+ case TGSI_OPCODE_UMAX:
+ case TGSI_OPCODE_UMIN:
+ case TGSI_OPCODE_USEQ:
+ case TGSI_OPCODE_USGE:
+ case TGSI_OPCODE_USLT:
+ case TGSI_OPCODE_USNE:
+ case TGSI_OPCODE_USHR:
+ return NV_TYPE_U32;
+ case TGSI_OPCODE_F2I:
+ case TGSI_OPCODE_IDIV:
+ case TGSI_OPCODE_IMAX:
+ case TGSI_OPCODE_IMIN:
+ case TGSI_OPCODE_INEG:
+ case TGSI_OPCODE_ISGE:
+ case TGSI_OPCODE_ISHR:
+ case TGSI_OPCODE_ISLT:
+ return NV_TYPE_S32;
+ default:
+ return NV_TYPE_F32;
+ }
+}
+#endif
+
+static void
+emit_store(struct bld_context *bld, const struct tgsi_full_instruction *inst,
+ unsigned chan, struct nv_value *res)
+{
+ const struct tgsi_full_dst_register *reg = &inst->Dst[0];
+ struct nv_instruction *nvi;
+ struct nv_value *mem;
+ struct nv_value *ptr = NULL;
+ int idx;
+
+ idx = reg->Register.Index;
+ assert(chan < 4);
+
+ if (reg->Register.Indirect)
+ ptr = FETCH_ADDR(reg->Indirect.Index,
+ tgsi_util_get_src_register_swizzle(&reg->Indirect, 0));
+
+ switch (inst->Instruction.Saturate) {
+ case TGSI_SAT_NONE:
+ break;
+ case TGSI_SAT_ZERO_ONE:
+ res = bld_insn_1(bld, NV_OP_SAT, res);
+ break;
+ case TGSI_SAT_MINUS_PLUS_ONE:
+ res = bld_insn_2(bld, NV_OP_MAX_F32, res, bld_load_imm_f32(bld, -1.0f));
+ res = bld_insn_2(bld, NV_OP_MIN_F32, res, bld_load_imm_f32(bld, 1.0f));
+ break;
+ }
+
+ switch (reg->Register.File) {
+ case TGSI_FILE_OUTPUT:
+ if (!res->insn)
+ res = bld_insn_1(bld, NV_OP_MOV, res);
+
+ if (bld->pc->is_fragprog) {
+ assert(!ptr);
+ STORE_OUTP(idx, chan, res);
+ } else {
+ nvi = new_instruction(bld->pc, NV_OP_EXPORT);
+ mem = new_value(bld->pc, bld->ti->output_file, res->reg.size);
+ nv_reference(bld->pc, nvi, 0, mem);
+ nv_reference(bld->pc, nvi, 1, res);
+ if (!ptr)
+ mem->reg.address = bld->ti->output_loc[idx][chan];
+ else
+ mem->reg.address = 0x80 + idx * 16 + chan * 4;
+ nvi->fixed = 1;
+ }
+ break;
+ case TGSI_FILE_TEMPORARY:
+ assert(idx < BLD_MAX_TEMPS);
+ if (!res->insn || res->insn->bb != bld->pc->current_block)
+ res = bld_insn_1(bld, NV_OP_MOV, res);
+
+ assert(res->reg.file == NV_FILE_GPR);
+
+ if (bld->ti->require_stores)
+ bld_lmem_store(bld, ptr, idx * 4 + chan, res);
+ else
+ STORE_TEMP(idx, chan, res);
+ break;
+ case TGSI_FILE_ADDRESS:
+ assert(idx < BLD_MAX_ADDRS);
+ STORE_ADDR(idx, chan, res);
+ break;
+ }
+}
+
+static INLINE uint32_t
+bld_is_output_written(struct bld_context *bld, int i, int c)
+{
+ if (c < 0)
+ return bld->outputs_written[i / 8] & (0xf << ((i * 4) % 32));
+ return bld->outputs_written[i / 8] & (1 << ((i * 4 + c) % 32));
+}
+
+static void
+bld_append_vp_ucp(struct bld_context *bld)
+{
+ struct nv_value *res[6];
+ struct nv_value *ucp, *vtx, *out;
+ struct nv_instruction *insn;
+ int i, c;
+
+ assert(bld->ti->prog->vp.num_ucps <= 6);
+
+ for (c = 0; c < 4; ++c) {
+ vtx = bld_fetch_global(bld, &bld->ovs[bld->hpos_index][c]);
+
+ for (i = 0; i < bld->ti->prog->vp.num_ucps; ++i) {
+ ucp = new_value(bld->pc, NV_FILE_MEM_C(15), 4);
+ ucp->reg.address = i * 16 + c * 4;
+
+ if (c == 0)
+ res[i] = bld_insn_2(bld, NV_OP_MUL_F32, vtx, ucp);
+ else
+ res[i] = bld_insn_3(bld, NV_OP_MAD_F32, vtx, ucp, res[i]);
+ }
+ }
+
+ for (i = 0; i < bld->ti->prog->vp.num_ucps; ++i) {
+ (out = new_value(bld->pc, NV_FILE_MEM_V, 4))->reg.address = 0x2c0 + i * 4;
+ (insn = new_instruction(bld->pc, NV_OP_EXPORT))->fixed = 1;
+ nv_reference(bld->pc, insn, 0, out);
+ nv_reference(bld->pc, insn, 1, res[i]);
+ }
+}
+
+static void
+bld_export_fp_outputs(struct bld_context *bld)
+{
+ struct nv_value *vals[4];
+ struct nv_instruction *nvi;
+ int i, c, n;
+
+ for (i = 0; i < PIPE_MAX_SHADER_OUTPUTS; ++i) {
+ if (!bld_is_output_written(bld, i, -1))
+ continue;
+ for (n = 0, c = 0; c < 4; ++c) {
+ if (!bld_is_output_written(bld, i, c))
+ continue;
+ vals[n] = bld_fetch_global(bld, &bld->ovs[i][c]);
+ assert(vals[n]);
+ vals[n] = bld_insn_1(bld, NV_OP_MOV, vals[n]);
+ vals[n++]->reg.id = bld->ti->output_loc[i][c];
+ }
+ assert(n);
+
+ (nvi = new_instruction(bld->pc, NV_OP_EXPORT))->fixed = 1;
+ for (c = 0; c < n; ++c)
+ nv_reference(bld->pc, nvi, c, vals[c]);
+ }
+}
+
+static void
+bld_new_block(struct bld_context *bld, struct nv_basic_block *b)
+{
+ int i, c;
+
+ bld->pc->current_block = b;
+
+ for (i = 0; i < 4; ++i)
+ bld->saved_addr[i][0] = NULL;
+ for (i = 0; i < PIPE_MAX_SHADER_INPUTS; ++i)
+ for (c = 0; c < 4; ++c)
+ bld->saved_inputs[i][c] = NULL;
+
+ bld->out_kind = CFG_EDGE_FORWARD;
+}
+
+static struct nv_value *
+bld_interp(struct bld_context *bld, unsigned mode, struct nv_value *val)
+{
+ unsigned cent = mode & NVC0_INTERP_CENTROID;
+
+ mode &= ~NVC0_INTERP_CENTROID;
+
+ if (val->reg.address == 0x3fc) {
+ /* gl_FrontFacing: 0/~0 to -1.0/+1.0 */
+ val = bld_insn_1(bld, NV_OP_LINTERP, val);
+ val->insn->flat = 1;
+ val = bld_insn_2(bld, NV_OP_SHL, val, bld_imm_u32(bld, 31));
+ val = bld_insn_2(bld, NV_OP_XOR, val, bld_imm_f32(bld, -1.0f));
+ return val;
+ } else
+ if (mode == NVC0_INTERP_PERSPECTIVE) {
+ val = bld_insn_2(bld, NV_OP_PINTERP, val, bld->frag_coord[3]);
+ } else {
+ val = bld_insn_1(bld, NV_OP_LINTERP, val);
+ }
+
+ val->insn->flat = mode == NVC0_INTERP_FLAT ? 1 : 0;
+ val->insn->centroid = cent ? 1 : 0;
+ return val;
+}
+
+static struct nv_value *
+emit_fetch(struct bld_context *bld, const struct tgsi_full_instruction *insn,
+ const unsigned s, const unsigned chan)
+{
+ const struct tgsi_full_src_register *src = &insn->Src[s];
+ struct nv_value *res = NULL;
+ struct nv_value *ptr = NULL;
+ int idx, ind_idx, dim_idx;
+ unsigned swz, ind_swz, sgn;
+
+ idx = src->Register.Index;
+ swz = tgsi_util_get_full_src_register_swizzle(src, chan);
+
+ if (src->Register.Indirect) {
+ ind_idx = src->Indirect.Index;
+ ind_swz = tgsi_util_get_src_register_swizzle(&src->Indirect, 0);
+
+ ptr = FETCH_ADDR(ind_idx, ind_swz);
+ }
+
+ if (src->Register.Dimension)
+ dim_idx = src->Dimension.Index;
+ else
+ dim_idx = 0;
+
+ switch (src->Register.File) {
+ case TGSI_FILE_CONSTANT:
+ assert(dim_idx < 14);
+ res = new_value(bld->pc, NV_FILE_MEM_C(dim_idx), 4);
+ res->reg.address = idx * 16 + swz * 4;
+ res = bld_insn_1(bld, NV_OP_LD, res);
+ if (ptr)
+ bld_src_pointer(bld, res->insn, 1, ptr);
+ break;
+ case TGSI_FILE_IMMEDIATE: /* XXX: type for MOV TEMP[0], -IMM[0] */
+ assert(idx < bld->ti->immd32_nr);
+ res = bld_load_imm_u32(bld, bld->ti->immd32[idx * 4 + swz]);
+ break;
+ case TGSI_FILE_INPUT:
+ assert(!src->Register.Dimension);
+ if (!ptr) {
+ res = bld->saved_inputs[idx][swz];
+ if (res)
+ break;
+ }
+ res = new_value(bld->pc, bld->ti->input_file, 4);
+ if (ptr)
+ res->reg.address = 0x80 + idx * 16 + swz * 4;
+ else
+ res->reg.address = bld->ti->input_loc[idx][swz];
+
+ if (bld->pc->is_fragprog)
+ res = bld_interp(bld, bld->ti->interp_mode[idx], res);
+ else
+ res = bld_insn_1(bld, NV_OP_VFETCH, res);
+
+ if (ptr)
+ bld_src_pointer(bld, res->insn, res->insn->src[1] ? 2 : 1, ptr);
+ else
+ bld->saved_inputs[idx][swz] = res;
+ break;
+ case TGSI_FILE_TEMPORARY:
+ if (bld->ti->require_stores)
+ res = bld_lmem_load(bld, ptr, idx * 4 + swz);
+ else
+ res = bld_fetch_global(bld, &bld->tvs[idx][swz]);
+ break;
+ case TGSI_FILE_ADDRESS:
+ res = bld_fetch_global(bld, &bld->avs[idx][swz]);
+ break;
+ case TGSI_FILE_PREDICATE:
+ res = bld_fetch_global(bld, &bld->pvs[idx][swz]);
+ break;
+ case TGSI_FILE_SYSTEM_VALUE:
+ assert(bld->ti->sysval_loc[idx] < 0xf00); /* >= would mean special reg */
+ res = new_value(bld->pc,
+ bld->pc->is_fragprog ? NV_FILE_MEM_V : NV_FILE_MEM_A, 4);
+ res->reg.address = bld->ti->sysval_loc[idx];
+
+ if (res->reg.file == NV_FILE_MEM_A)
+ res = bld_insn_1(bld, NV_OP_VFETCH, res);
+ else
+ res = bld_interp(bld, NVC0_INTERP_FLAT, res);
+
+ /* mesa doesn't do real integers yet :-(and in GL this should be S32) */
+ res = bld_cvt(bld, NV_TYPE_F32, NV_TYPE_U32, res);
+ break;
+ default:
+ NOUVEAU_ERR("illegal/unhandled src reg file: %d\n", src->Register.File);
+ abort();
+ break;
+ }
+ if (!res)
+ return bld_undef(bld, NV_FILE_GPR);
+
+ sgn = tgsi_util_get_full_src_register_sign_mode(src, chan);
+
+ switch (sgn) {
+ case TGSI_UTIL_SIGN_KEEP:
+ break;
+ case TGSI_UTIL_SIGN_CLEAR:
+ res = bld_insn_1(bld, NV_OP_ABS_F32, res);
+ break;
+ case TGSI_UTIL_SIGN_TOGGLE:
+ res = bld_insn_1(bld, NV_OP_NEG_F32, res);
+ break;
+ case TGSI_UTIL_SIGN_SET:
+ res = bld_insn_1(bld, NV_OP_ABS_F32, res);
+ res = bld_insn_1(bld, NV_OP_NEG_F32, res);
+ break;
+ default:
+ NOUVEAU_ERR("illegal/unhandled src reg sign mode\n");
+ abort();
+ break;
+ }
+
+ return res;
+}
+
+static void
+bld_lit(struct bld_context *bld, struct nv_value *dst0[4],
+ const struct tgsi_full_instruction *insn)
+{
+ struct nv_value *val0 = NULL;
+ unsigned mask = insn->Dst[0].Register.WriteMask;
+
+ if (mask & ((1 << 0) | (1 << 3)))
+ dst0[3] = dst0[0] = bld_load_imm_f32(bld, 1.0f);
+
+ if (mask & (3 << 1)) {
+ val0 = bld_insn_2(bld, NV_OP_MAX, emit_fetch(bld, insn, 0, 0), bld->zero);
+ if (mask & (1 << 1))
+ dst0[1] = val0;
+ }
+
+ if (mask & (1 << 2)) {
+ struct nv_value *val1, *val3, *src1, *src3, *pred;
+ struct nv_value *pos128 = bld_load_imm_f32(bld, 127.999999f);
+ struct nv_value *neg128 = bld_load_imm_f32(bld, -127.999999f);
+
+ src1 = emit_fetch(bld, insn, 0, 1);
+ src3 = emit_fetch(bld, insn, 0, 3);
+
+ pred = bld_setp(bld, NV_OP_SET_F32, NV_CC_LE, val0, bld->zero);
+
+ val1 = bld_insn_2(bld, NV_OP_MAX_F32, src1, bld->zero);
+ val3 = bld_insn_2(bld, NV_OP_MAX_F32, src3, neg128);
+ val3 = bld_insn_2(bld, NV_OP_MIN_F32, val3, pos128);
+ val3 = bld_pow(bld, val1, val3);
+
+ dst0[2] = bld_insn_1(bld, NV_OP_MOV, bld->zero);
+ bld_src_predicate(bld, dst0[2]->insn, 1, pred);
+
+ dst0[2] = bld_insn_2(bld, NV_OP_SELECT, val3, dst0[2]);
+ }
+}
+
+static INLINE void
+describe_texture_target(unsigned target, int *dim,
+ int *array, int *cube, int *shadow)
+{
+ *dim = *array = *cube = *shadow = 0;
+
+ switch (target) {
+ case TGSI_TEXTURE_1D:
+ *dim = 1;
+ break;
+ case TGSI_TEXTURE_SHADOW1D:
+ *dim = *shadow = 1;
+ break;
+ case TGSI_TEXTURE_UNKNOWN:
+ case TGSI_TEXTURE_2D:
+ case TGSI_TEXTURE_RECT:
+ *dim = 2;
+ break;
+ case TGSI_TEXTURE_SHADOW2D:
+ case TGSI_TEXTURE_SHADOWRECT:
+ *dim = 2;
+ *shadow = 1;
+ break;
+ case TGSI_TEXTURE_3D:
+ *dim = 3;
+ break;
+ case TGSI_TEXTURE_CUBE:
+ *dim = 2;
+ *cube = 1;
+ break;
+ case TGSI_TEXTURE_1D_ARRAY:
+ *dim = *array = 1;
+ break;
+ case TGSI_TEXTURE_2D_ARRAY:
+ *dim = 2;
+ *array = 1;
+ break;
+ /*
+ case TGSI_TEXTURE_SHADOW1D_ARRAY:
+ *dim = *array = *shadow = 1;
+ break;
+ case TGSI_TEXTURE_SHADOW2D_ARRAY:
+ *dim = 2;
+ *array = *shadow = 1;
+ break;
+ case TGSI_TEXTURE_CUBE_ARRAY:
+ *dim = 2;
+ *cube = *array = 1;
+ break;
+ */
+ default:
+ assert(0);
+ break;
+ }
+}
+
+static struct nv_value *
+bld_clone(struct bld_context *bld, struct nv_instruction *nvi)
+{
+ struct nv_instruction *dupi = new_instruction(bld->pc, nvi->opcode);
+ struct nv_instruction *next, *prev;
+ int c;
+
+ next = dupi->next;
+ prev = dupi->prev;
+
+ *dupi = *nvi;
+
+ dupi->next = next;
+ dupi->prev = prev;
+
+ for (c = 0; c < 5 && nvi->def[c]; ++c)
+ bld_def(dupi, c, new_value_like(bld->pc, nvi->def[c]));
+
+ for (c = 0; c < 6 && nvi->src[c]; ++c) {
+ dupi->src[c] = NULL;
+ nv_reference(bld->pc, dupi, c, nvi->src[c]->value);
+ }
+
+ return dupi->def[0];
+}
+
+/* NOTE: proj(t0) = (t0 / w) / (tc3 / w) = tc0 / tc2 handled by optimizer */
+static void
+load_proj_tex_coords(struct bld_context *bld,
+ struct nv_value *t[4], int dim, int shadow,
+ const struct tgsi_full_instruction *insn)
+{
+ int c;
+ unsigned mask = (1 << dim) - 1;
+
+ if (shadow)
+ mask |= 4; /* depth comparison value */
+
+ t[3] = emit_fetch(bld, insn, 0, 3);
+ if (t[3]->insn->opcode == NV_OP_PINTERP) {
+ t[3] = bld_clone(bld, t[3]->insn);
+ t[3]->insn->opcode = NV_OP_LINTERP;
+ nv_reference(bld->pc, t[3]->insn, 1, NULL);
+ }
+ t[3] = bld_insn_1(bld, NV_OP_RCP, t[3]);
+
+ for (c = 0; c < 4; ++c) {
+ if (!(mask & (1 << c)))
+ continue;
+ t[c] = emit_fetch(bld, insn, 0, c);
+
+ if (t[c]->insn->opcode != NV_OP_PINTERP)
+ continue;
+ mask &= ~(1 << c);
+
+ t[c] = bld_clone(bld, t[c]->insn);
+ nv_reference(bld->pc, t[c]->insn, 1, t[3]);
+ }
+ if (mask == 0)
+ return;
+
+ t[3] = emit_fetch(bld, insn, 0, 3);
+ t[3] = bld_insn_1(bld, NV_OP_RCP, t[3]);
+
+ for (c = 0; c < 4; ++c)
+ if (mask & (1 << c))
+ t[c] = bld_insn_2(bld, NV_OP_MUL_F32, t[c], t[3]);
+}
+
+/* For a quad of threads / top left, top right, bottom left, bottom right
+ * pixels, do a different operation, and take src0 from a specific thread.
+ */
+#define QOP_ADD 0
+#define QOP_SUBR 1
+#define QOP_SUB 2
+#define QOP_MOV1 3
+
+#define QOP(a, b, c, d) \
+ ((QOP_##a << 0) | (QOP_##b << 2) | (QOP_##c << 4) | (QOP_##d << 6))
+
+static INLINE struct nv_value *
+bld_quadop(struct bld_context *bld, ubyte qop, struct nv_value *src0, int lane,
+ struct nv_value *src1, boolean wp)
+{
+ struct nv_value *val = bld_insn_2(bld, NV_OP_QUADOP, src0, src1);
+ val->insn->lanes = lane;
+ val->insn->quadop = qop;
+ if (wp) {
+ assert(!"quadop predicate write");
+ }
+ return val;
+}
+
+/* order of TGSI operands: x y z layer shadow lod/bias */
+/* order of native operands: layer x y z | lod/bias shadow */
+static struct nv_instruction *
+emit_tex(struct bld_context *bld, uint opcode, int tic, int tsc,
+ struct nv_value *dst[4], struct nv_value *arg[4],
+ int dim, int array, int cube, int shadow)
+{
+ struct nv_value *src[4];
+ struct nv_instruction *nvi, *bnd;
+ int c;
+ int s = 0;
+ boolean lodbias = opcode == NV_OP_TXB || opcode == NV_OP_TXL;
+
+ if (array)
+ arg[dim] = bld_cvt(bld, NV_TYPE_U32, NV_TYPE_F32, arg[dim]);
+
+ /* bind { layer x y z } and { lod/bias shadow } to adjacent regs */
+
+ bnd = new_instruction(bld->pc, NV_OP_BIND);
+ if (array) {
+ src[s] = new_value(bld->pc, NV_FILE_GPR, 4);
+ bld_def(bnd, s, src[s]);
+ nv_reference(bld->pc, bnd, s++, arg[dim + cube]);
+ }
+ for (c = 0; c < dim + cube; ++c, ++s) {
+ src[s] = bld_def(bnd, s, new_value(bld->pc, NV_FILE_GPR, 4));
+ nv_reference(bld->pc, bnd, s, arg[c]);
+ }
+
+ if (shadow || lodbias) {
+ bnd = new_instruction(bld->pc, NV_OP_BIND);
+
+ if (lodbias) {
+ src[s] = new_value(bld->pc, NV_FILE_GPR, 4);
+ bld_def(bnd, 0, src[s++]);
+ nv_reference(bld->pc, bnd, 0, arg[dim + cube + array + shadow]);
+ }
+ if (shadow) {
+ src[s] = new_value(bld->pc, NV_FILE_GPR, 4);
+ bld_def(bnd, lodbias, src[s++]);
+ nv_reference(bld->pc, bnd, lodbias, arg[dim + cube + array]);
+ }
+ }
+
+ nvi = new_instruction(bld->pc, opcode);
+ for (c = 0; c < 4; ++c)
+ dst[c] = bld_def(nvi, c, new_value(bld->pc, NV_FILE_GPR, 4));
+ for (c = 0; c < s; ++c)
+ nv_reference(bld->pc, nvi, c, src[c]);
+
+ nvi->ext.tex.t = tic;
+ nvi->ext.tex.s = tsc;
+ nvi->tex_mask = 0xf;
+ nvi->tex_cube = cube;
+ nvi->tex_dim = dim;
+ nvi->tex_cube = cube;
+ nvi->tex_shadow = shadow;
+ nvi->tex_array = array;
+ nvi->tex_live = 0;
+
+ return nvi;
+}
+
+static void
+bld_tex(struct bld_context *bld, struct nv_value *dst0[4],
+ const struct tgsi_full_instruction *insn)
+{
+ struct nv_value *t[4], *s[3];
+ uint opcode = translate_opcode(insn->Instruction.Opcode);
+ int c, dim, array, cube, shadow;
+ const int lodbias = opcode == NV_OP_TXB || opcode == NV_OP_TXL;
+ const int tic = insn->Src[1].Register.Index;
+ const int tsc = tic;
+
+ describe_texture_target(insn->Texture.Texture, &dim, &array, &cube, &shadow);
+
+ assert(dim + array + shadow + lodbias <= 5);
+
+ if (!cube && !array && insn->Instruction.Opcode == TGSI_OPCODE_TXP)
+ load_proj_tex_coords(bld, t, dim, shadow, insn);
+ else {
+ for (c = 0; c < dim + cube + array; ++c)
+ t[c] = emit_fetch(bld, insn, 0, c);
+ if (shadow)
+ t[c] = emit_fetch(bld, insn, 0, MAX2(c, 2));
+ }
+
+ if (cube) {
+ for (c = 0; c < 3; ++c)
+ s[c] = bld_insn_1(bld, NV_OP_ABS_F32, t[c]);
+
+ s[0] = bld_insn_2(bld, NV_OP_MAX_F32, s[0], s[1]);
+ s[0] = bld_insn_2(bld, NV_OP_MAX_F32, s[0], s[2]);
+ s[0] = bld_insn_1(bld, NV_OP_RCP, s[0]);
+
+ for (c = 0; c < 3; ++c)
+ t[c] = bld_insn_2(bld, NV_OP_MUL_F32, t[c], s[0]);
+ }
+
+ if (lodbias)
+ t[dim + cube + array + shadow] = emit_fetch(bld, insn, 0, 3);
+
+ emit_tex(bld, opcode, tic, tsc, dst0, t, dim, array, cube, shadow);
+}
+
+static INLINE struct nv_value *
+bld_dot(struct bld_context *bld, const struct tgsi_full_instruction *insn,
+ int n)
+{
+ struct nv_value *dotp, *src0, *src1;
+ int c;
+
+ src0 = emit_fetch(bld, insn, 0, 0);
+ src1 = emit_fetch(bld, insn, 1, 0);
+ dotp = bld_insn_2(bld, NV_OP_MUL_F32, src0, src1);
+
+ for (c = 1; c < n; ++c) {
+ src0 = emit_fetch(bld, insn, 0, c);
+ src1 = emit_fetch(bld, insn, 1, c);
+ dotp = bld_insn_3(bld, NV_OP_MAD_F32, src0, src1, dotp);
+ }
+ return dotp;
+}
+
+#define FOR_EACH_DST0_ENABLED_CHANNEL(chan, inst) \
+ for (chan = 0; chan < 4; ++chan) \
+ if ((inst)->Dst[0].Register.WriteMask & (1 << chan))
+
+static void
+bld_instruction(struct bld_context *bld,
+ const struct tgsi_full_instruction *insn)
+{
+ struct nv_value *src0;
+ struct nv_value *src1;
+ struct nv_value *src2;
+ struct nv_value *dst0[4] = { NULL };
+ struct nv_value *temp;
+ int c;
+ uint opcode = translate_opcode(insn->Instruction.Opcode);
+ uint8_t mask = insn->Dst[0].Register.WriteMask;
+
+#ifdef NOUVEAU_DEBUG
+ debug_printf("bld_instruction:"); tgsi_dump_instruction(insn, 1);
+#endif
+
+ switch (insn->Instruction.Opcode) {
+ case TGSI_OPCODE_ADD:
+ case TGSI_OPCODE_MAX:
+ case TGSI_OPCODE_MIN:
+ case TGSI_OPCODE_MUL:
+ FOR_EACH_DST0_ENABLED_CHANNEL(c, insn) {
+ src0 = emit_fetch(bld, insn, 0, c);
+ src1 = emit_fetch(bld, insn, 1, c);
+ dst0[c] = bld_insn_2(bld, opcode, src0, src1);
+ }
+ break;
+ case TGSI_OPCODE_ARL:
+ src1 = bld_imm_u32(bld, 4);
+ FOR_EACH_DST0_ENABLED_CHANNEL(c, insn) {
+ src0 = emit_fetch(bld, insn, 0, c);
+ src0 = bld_insn_1(bld, NV_OP_FLOOR, src0);
+ src0->insn->ext.cvt.d = NV_TYPE_S32;
+ src0->insn->ext.cvt.s = NV_TYPE_F32;
+ dst0[c] = bld_insn_2(bld, NV_OP_SHL, src0, src1);
+ }
+ break;
+ case TGSI_OPCODE_CMP:
+ FOR_EACH_DST0_ENABLED_CHANNEL(c, insn) {
+ src0 = emit_fetch(bld, insn, 0, c);
+ src1 = emit_fetch(bld, insn, 1, c);
+ src2 = emit_fetch(bld, insn, 2, c);
+ dst0[c] = bld_insn_3(bld, NV_OP_SLCT_F32, src1, src2, src0);
+ dst0[c]->insn->set_cond = NV_CC_LT;
+ }
+ break;
+ case TGSI_OPCODE_COS:
+ case TGSI_OPCODE_SIN:
+ src0 = emit_fetch(bld, insn, 0, 0);
+ temp = bld_insn_1(bld, NV_OP_PRESIN, src0);
+ if (insn->Dst[0].Register.WriteMask & 7)
+ temp = bld_insn_1(bld, opcode, temp);
+ for (c = 0; c < 3; ++c)
+ if (insn->Dst[0].Register.WriteMask & (1 << c))
+ dst0[c] = temp;
+ if (!(insn->Dst[0].Register.WriteMask & (1 << 3)))
+ break;
+ src0 = emit_fetch(bld, insn, 0, 3);
+ temp = bld_insn_1(bld, NV_OP_PRESIN, src0);
+ dst0[3] = bld_insn_1(bld, opcode, temp);
+ break;
+ case TGSI_OPCODE_DP2:
+ temp = bld_dot(bld, insn, 2);
+ FOR_EACH_DST0_ENABLED_CHANNEL(c, insn)
+ dst0[c] = temp;
+ break;
+ case TGSI_OPCODE_DP3:
+ temp = bld_dot(bld, insn, 3);
+ FOR_EACH_DST0_ENABLED_CHANNEL(c, insn)
+ dst0[c] = temp;
+ break;
+ case TGSI_OPCODE_DP4:
+ temp = bld_dot(bld, insn, 4);
+ FOR_EACH_DST0_ENABLED_CHANNEL(c, insn)
+ dst0[c] = temp;
+ break;
+ case TGSI_OPCODE_DPH:
+ src0 = bld_dot(bld, insn, 3);
+ src1 = emit_fetch(bld, insn, 1, 3);
+ temp = bld_insn_2(bld, NV_OP_ADD_F32, src0, src1);
+ FOR_EACH_DST0_ENABLED_CHANNEL(c, insn)
+ dst0[c] = temp;
+ break;
+ case TGSI_OPCODE_DST:
+ if (insn->Dst[0].Register.WriteMask & 1)
+ dst0[0] = bld_imm_f32(bld, 1.0f);
+ if (insn->Dst[0].Register.WriteMask & 2) {
+ src0 = emit_fetch(bld, insn, 0, 1);
+ src1 = emit_fetch(bld, insn, 1, 1);
+ dst0[1] = bld_insn_2(bld, NV_OP_MUL_F32, src0, src1);
+ }
+ if (insn->Dst[0].Register.WriteMask & 4)
+ dst0[2] = emit_fetch(bld, insn, 0, 2);
+ if (insn->Dst[0].Register.WriteMask & 8)
+ dst0[3] = emit_fetch(bld, insn, 1, 3);
+ break;
+ case TGSI_OPCODE_EXP:
+ src0 = emit_fetch(bld, insn, 0, 0);
+ temp = bld_insn_1(bld, NV_OP_FLOOR, src0);
+
+ if (insn->Dst[0].Register.WriteMask & 2)
+ dst0[1] = bld_insn_2(bld, NV_OP_SUB_F32, src0, temp);
+ if (insn->Dst[0].Register.WriteMask & 1) {
+ temp = bld_insn_1(bld, NV_OP_PREEX2, temp);
+ dst0[0] = bld_insn_1(bld, NV_OP_EX2, temp);
+ }
+ if (insn->Dst[0].Register.WriteMask & 4) {
+ temp = bld_insn_1(bld, NV_OP_PREEX2, src0);
+ dst0[2] = bld_insn_1(bld, NV_OP_EX2, temp);
+ }
+ if (insn->Dst[0].Register.WriteMask & 8)
+ dst0[3] = bld_imm_f32(bld, 1.0f);
+ break;
+ case TGSI_OPCODE_EX2:
+ src0 = emit_fetch(bld, insn, 0, 0);
+ temp = bld_insn_1(bld, NV_OP_PREEX2, src0);
+ temp = bld_insn_1(bld, NV_OP_EX2, temp);
+ FOR_EACH_DST0_ENABLED_CHANNEL(c, insn)
+ dst0[c] = temp;
+ break;
+ case TGSI_OPCODE_FRC:
+ FOR_EACH_DST0_ENABLED_CHANNEL(c, insn) {
+ src0 = emit_fetch(bld, insn, 0, c);
+ dst0[c] = bld_insn_1(bld, NV_OP_FLOOR, src0);
+ dst0[c] = bld_insn_2(bld, NV_OP_SUB_F32, src0, dst0[c]);
+ }
+ break;
+ case TGSI_OPCODE_KIL:
+ for (c = 0; c < 4; ++c)
+ bld_kil(bld, emit_fetch(bld, insn, 0, c));
+ break;
+ case TGSI_OPCODE_KILP:
+ (new_instruction(bld->pc, NV_OP_KIL))->fixed = 1;
+ break;
+ case TGSI_OPCODE_IF:
+ {
+ struct nv_basic_block *b = new_basic_block(bld->pc);
+ struct nv_value *pred = emit_fetch(bld, insn, 0, 0);
+
+ assert(bld->cond_lvl < BLD_MAX_COND_NESTING);
+
+ nvc0_bblock_attach(bld->pc->current_block, b, CFG_EDGE_FORWARD);
+
+ bld->join_bb[bld->cond_lvl] = bld->pc->current_block;
+ bld->cond_bb[bld->cond_lvl] = bld->pc->current_block;
+
+ if (pred->insn && NV_BASEOP(pred->insn->opcode) == NV_OP_SET) {
+ pred = bld_clone(bld, pred->insn);
+ pred->reg.size = 1;
+ pred->reg.file = NV_FILE_PRED;
+ if (pred->insn->opcode == NV_OP_FSET_F32)
+ pred->insn->opcode = NV_OP_SET_F32;
+ } else {
+ pred = bld_setp(bld, NV_OP_SET_U32, NV_CC_NE | NV_CC_U,
+ pred, bld->zero);
+ }
+ assert(!mask);
+
+ bld_flow(bld, NV_OP_BRA, pred, NV_CC_NOT_P, NULL, (bld->cond_lvl == 0));
+
+ ++bld->cond_lvl;
+ bld_new_block(bld, b);
+ }
+ break;
+ case TGSI_OPCODE_ELSE:
+ {
+ struct nv_basic_block *b = new_basic_block(bld->pc);
+
+ --bld->cond_lvl;
+ nvc0_bblock_attach(bld->join_bb[bld->cond_lvl], b, CFG_EDGE_FORWARD);
+
+ bld->cond_bb[bld->cond_lvl]->exit->target = b;
+ bld->cond_bb[bld->cond_lvl] = bld->pc->current_block;
+
+ new_instruction(bld->pc, NV_OP_BRA)->terminator = 1;
+
+ ++bld->cond_lvl;
+ bld_new_block(bld, b);
+ }
+ break;
+ case TGSI_OPCODE_ENDIF:
+ {
+ struct nv_basic_block *b = new_basic_block(bld->pc);
+
+ if (bld->pc->current_block->exit &&
+ !bld->pc->current_block->exit->terminator)
+ bld_flow(bld, NV_OP_BRA, NULL, NV_CC_P, b, FALSE);
+
+ --bld->cond_lvl;
+ nvc0_bblock_attach(bld->pc->current_block, b, bld->out_kind);
+ nvc0_bblock_attach(bld->cond_bb[bld->cond_lvl], b, CFG_EDGE_FORWARD);
+
+ bld->cond_bb[bld->cond_lvl]->exit->target = b;
+
+ bld_new_block(bld, b);
+
+ if (!bld->cond_lvl && bld->join_bb[bld->cond_lvl]) {
+ bld->join_bb[bld->cond_lvl]->exit->prev->target = b;
+ new_instruction(bld->pc, NV_OP_JOIN)->join = 1;
+ }
+ }
+ break;
+ case TGSI_OPCODE_BGNLOOP:
+ {
+ struct nv_basic_block *bl = new_basic_block(bld->pc);
+ struct nv_basic_block *bb = new_basic_block(bld->pc);
+
+ assert(bld->loop_lvl < BLD_MAX_LOOP_NESTING);
+
+ bld->loop_bb[bld->loop_lvl] = bl;
+ bld->brkt_bb[bld->loop_lvl] = bb;
+
+ nvc0_bblock_attach(bld->pc->current_block, bl, CFG_EDGE_LOOP_ENTER);
+
+ bld_new_block(bld, bld->loop_bb[bld->loop_lvl++]);
+
+ if (bld->loop_lvl == bld->pc->loop_nesting_bound)
+ bld->pc->loop_nesting_bound++;
+
+ bld_clear_def_use(&bld->tvs[0][0], BLD_MAX_TEMPS, bld->loop_lvl);
+ bld_clear_def_use(&bld->avs[0][0], BLD_MAX_ADDRS, bld->loop_lvl);
+ bld_clear_def_use(&bld->pvs[0][0], BLD_MAX_PREDS, bld->loop_lvl);
+ }
+ break;
+ case TGSI_OPCODE_BRK:
+ {
+ struct nv_basic_block *bb = bld->brkt_bb[bld->loop_lvl - 1];
+
+ bld_flow(bld, NV_OP_BRA, NULL, NV_CC_P, bb, FALSE);
+
+ if (bld->out_kind == CFG_EDGE_FORWARD) /* else we already had BRK/CONT */
+ nvc0_bblock_attach(bld->pc->current_block, bb, CFG_EDGE_LOOP_LEAVE);
+
+ bld->out_kind = CFG_EDGE_FAKE;
+ }
+ break;
+ case TGSI_OPCODE_CONT:
+ {
+ struct nv_basic_block *bb = bld->loop_bb[bld->loop_lvl - 1];
+
+ bld_flow(bld, NV_OP_BRA, NULL, NV_CC_P, bb, FALSE);
+
+ nvc0_bblock_attach(bld->pc->current_block, bb, CFG_EDGE_BACK);
+
+ if ((bb = bld->join_bb[bld->cond_lvl - 1])) {
+ bld->join_bb[bld->cond_lvl - 1] = NULL;
+ nvc0_insn_delete(bb->exit->prev);
+ }
+ bld->out_kind = CFG_EDGE_FAKE;
+ }
+ break;
+ case TGSI_OPCODE_ENDLOOP:
+ {
+ struct nv_basic_block *bb = bld->loop_bb[bld->loop_lvl - 1];
+
+ if (bld->out_kind != CFG_EDGE_FAKE) { /* else we already had BRK/CONT */
+ bld_flow(bld, NV_OP_BRA, NULL, NV_CC_P, bb, FALSE);
+
+ nvc0_bblock_attach(bld->pc->current_block, bb, CFG_EDGE_BACK);
+ }
+
+ bld_loop_end(bld, bb); /* replace loop-side operand of the phis */
+
+ bld_new_block(bld, bld->brkt_bb[--bld->loop_lvl]);
+ }
+ break;
+ case TGSI_OPCODE_ABS:
+ case TGSI_OPCODE_CEIL:
+ case TGSI_OPCODE_FLR:
+ case TGSI_OPCODE_TRUNC:
+ case TGSI_OPCODE_DDX:
+ case TGSI_OPCODE_DDY:
+ FOR_EACH_DST0_ENABLED_CHANNEL(c, insn) {
+ src0 = emit_fetch(bld, insn, 0, c);
+ dst0[c] = bld_insn_1(bld, opcode, src0);
+ }
+ break;
+ case TGSI_OPCODE_LIT:
+ bld_lit(bld, dst0, insn);
+ break;
+ case TGSI_OPCODE_LRP:
+ FOR_EACH_DST0_ENABLED_CHANNEL(c, insn) {
+ src0 = emit_fetch(bld, insn, 0, c);
+ src1 = emit_fetch(bld, insn, 1, c);
+ src2 = emit_fetch(bld, insn, 2, c);
+ dst0[c] = bld_insn_2(bld, NV_OP_SUB_F32, src1, src2);
+ dst0[c] = bld_insn_3(bld, NV_OP_MAD_F32, dst0[c], src0, src2);
+ }
+ break;
+ case TGSI_OPCODE_MOV:
+ FOR_EACH_DST0_ENABLED_CHANNEL(c, insn)
+ dst0[c] = emit_fetch(bld, insn, 0, c);
+ break;
+ case TGSI_OPCODE_MAD:
+ FOR_EACH_DST0_ENABLED_CHANNEL(c, insn) {
+ src0 = emit_fetch(bld, insn, 0, c);
+ src1 = emit_fetch(bld, insn, 1, c);
+ src2 = emit_fetch(bld, insn, 2, c);
+ dst0[c] = bld_insn_3(bld, opcode, src0, src1, src2);
+ }
+ break;
+ case TGSI_OPCODE_POW:
+ src0 = emit_fetch(bld, insn, 0, 0);
+ src1 = emit_fetch(bld, insn, 1, 0);
+ temp = bld_pow(bld, src0, src1);
+ FOR_EACH_DST0_ENABLED_CHANNEL(c, insn)
+ dst0[c] = temp;
+ break;
+ case TGSI_OPCODE_LOG:
+ src0 = emit_fetch(bld, insn, 0, 0);
+ src0 = bld_insn_1(bld, NV_OP_ABS_F32, src0);
+ temp = bld_insn_1(bld, NV_OP_LG2, src0);
+ dst0[2] = temp;
+ if (insn->Dst[0].Register.WriteMask & 3) {
+ temp = bld_insn_1(bld, NV_OP_FLOOR, temp);
+ dst0[0] = temp;
+ }
+ if (insn->Dst[0].Register.WriteMask & 2) {
+ temp = bld_insn_1(bld, NV_OP_PREEX2, temp);
+ temp = bld_insn_1(bld, NV_OP_EX2, temp);
+ temp = bld_insn_1(bld, NV_OP_RCP, temp);
+ dst0[1] = bld_insn_2(bld, NV_OP_MUL_F32, src0, temp);
+ }
+ if (insn->Dst[0].Register.WriteMask & 8)
+ dst0[3] = bld_imm_f32(bld, 1.0f);
+ break;
+ case TGSI_OPCODE_RCP:
+ case TGSI_OPCODE_LG2:
+ src0 = emit_fetch(bld, insn, 0, 0);
+ temp = bld_insn_1(bld, opcode, src0);
+ FOR_EACH_DST0_ENABLED_CHANNEL(c, insn)
+ dst0[c] = temp;
+ break;
+ case TGSI_OPCODE_RSQ:
+ src0 = emit_fetch(bld, insn, 0, 0);
+ temp = bld_insn_1(bld, NV_OP_ABS_F32, src0);
+ temp = bld_insn_1(bld, NV_OP_RSQ, temp);
+ FOR_EACH_DST0_ENABLED_CHANNEL(c, insn)
+ dst0[c] = temp;
+ break;
+ case TGSI_OPCODE_SLT:
+ case TGSI_OPCODE_SGE:
+ case TGSI_OPCODE_SEQ:
+ case TGSI_OPCODE_SGT:
+ case TGSI_OPCODE_SLE:
+ case TGSI_OPCODE_SNE:
+ case TGSI_OPCODE_ISLT:
+ case TGSI_OPCODE_ISGE:
+ case TGSI_OPCODE_USEQ:
+ case TGSI_OPCODE_USGE:
+ case TGSI_OPCODE_USLT:
+ case TGSI_OPCODE_USNE:
+ FOR_EACH_DST0_ENABLED_CHANNEL(c, insn) {
+ src0 = emit_fetch(bld, insn, 0, c);
+ src1 = emit_fetch(bld, insn, 1, c);
+ dst0[c] = bld_insn_2(bld, opcode, src0, src1);
+ dst0[c]->insn->set_cond = translate_setcc(insn->Instruction.Opcode);
+ }
+ break;
+ case TGSI_OPCODE_SCS:
+ if (insn->Dst[0].Register.WriteMask & 0x3) {
+ src0 = emit_fetch(bld, insn, 0, 0);
+ temp = bld_insn_1(bld, NV_OP_PRESIN, src0);
+ if (insn->Dst[0].Register.WriteMask & 0x1)
+ dst0[0] = bld_insn_1(bld, NV_OP_COS, temp);
+ if (insn->Dst[0].Register.WriteMask & 0x2)
+ dst0[1] = bld_insn_1(bld, NV_OP_SIN, temp);
+ }
+ if (insn->Dst[0].Register.WriteMask & 0x4)
+ dst0[2] = bld_imm_f32(bld, 0.0f);
+ if (insn->Dst[0].Register.WriteMask & 0x8)
+ dst0[3] = bld_imm_f32(bld, 1.0f);
+ break;
+ case TGSI_OPCODE_SSG:
+ FOR_EACH_DST0_ENABLED_CHANNEL(c, insn) { /* XXX: set lt, set gt, sub */
+ src0 = emit_fetch(bld, insn, 0, c);
+ src1 = bld_insn_2(bld, NV_OP_FSET_F32, src0, bld->zero);
+ src2 = bld_insn_2(bld, NV_OP_FSET_F32, src0, bld->zero);
+ src1->insn->set_cond = NV_CC_GT;
+ src2->insn->set_cond = NV_CC_LT;
+ dst0[c] = bld_insn_2(bld, NV_OP_SUB_F32, src1, src2);
+ }
+ break;
+ case TGSI_OPCODE_SUB:
+ FOR_EACH_DST0_ENABLED_CHANNEL(c, insn) {
+ src0 = emit_fetch(bld, insn, 0, c);
+ src1 = emit_fetch(bld, insn, 1, c);
+ dst0[c] = bld_insn_2(bld, NV_OP_SUB_F32, src0, src1);
+ }
+ break;
+ case TGSI_OPCODE_TEX:
+ case TGSI_OPCODE_TXB:
+ case TGSI_OPCODE_TXL:
+ case TGSI_OPCODE_TXP:
+ bld_tex(bld, dst0, insn);
+ break;
+ case TGSI_OPCODE_XPD:
+ FOR_EACH_DST0_ENABLED_CHANNEL(c, insn) {
+ if (c == 3) {
+ dst0[3] = bld_imm_f32(bld, 1.0f);
+ break;
+ }
+ src0 = emit_fetch(bld, insn, 1, (c + 1) % 3);
+ src1 = emit_fetch(bld, insn, 0, (c + 2) % 3);
+ dst0[c] = bld_insn_2(bld, NV_OP_MUL_F32, src0, src1);
+
+ src0 = emit_fetch(bld, insn, 0, (c + 1) % 3);
+ src1 = emit_fetch(bld, insn, 1, (c + 2) % 3);
+ dst0[c] = bld_insn_3(bld, NV_OP_MAD_F32, src0, src1, dst0[c]);
+
+ dst0[c]->insn->src[2]->mod ^= NV_MOD_NEG;
+ }
+ break;
+ case TGSI_OPCODE_RET:
+ (new_instruction(bld->pc, NV_OP_RET))->fixed = 1;
+ break;
+ case TGSI_OPCODE_END:
+ /* VP outputs are exported in-place as scalars, optimization later */
+ if (bld->pc->is_fragprog)
+ bld_export_fp_outputs(bld);
+ if (bld->ti->append_ucp)
+ bld_append_vp_ucp(bld);
+ return;
+ default:
+ NOUVEAU_ERR("unhandled opcode %u\n", insn->Instruction.Opcode);
+ abort();
+ return;
+ }
+
+ if (insn->Dst[0].Register.File == TGSI_FILE_OUTPUT &&
+ !bld->pc->is_fragprog) {
+ struct nv_instruction *mi = NULL;
+ uint size;
+
+ if (bld->ti->append_ucp) {
+ if (bld->ti->output_loc[insn->Dst[0].Register.Index][0] == 0x70) {
+ bld->hpos_index = insn->Dst[0].Register.Index;
+ for (c = 0; c < 4; ++c)
+ if (mask & (1 << c))
+ STORE_OUTP(insn->Dst[0].Register.Index, c, dst0[c]);
+ }
+ }
+
+ for (c = 0; c < 4; ++c)
+ if (mask & (1 << c))
+ if ((dst0[c]->reg.file == NV_FILE_IMM) ||
+ (dst0[c]->reg.file == NV_FILE_GPR && dst0[c]->reg.id == 63))
+ dst0[c] = bld_insn_1(bld, NV_OP_MOV, dst0[c]);
+
+ c = 0;
+ if ((mask & 0x3) == 0x3) {
+ mask &= ~0x3;
+ size = 8;
+ mi = bld_insn_2(bld, NV_OP_BIND, dst0[0], dst0[1])->insn;
+ }
+ if ((mask & 0xc) == 0xc) {
+ mask &= ~0xc;
+ if (mi) {
+ size = 16;
+ nv_reference(bld->pc, mi, 2, dst0[2]);
+ nv_reference(bld->pc, mi, 3, dst0[3]);
+ } else {
+ c = 2;
+ size = 8;
+ mi = bld_insn_2(bld, NV_OP_BIND, dst0[2], dst0[3])->insn;
+ }
+ } else
+ if (mi && (mask & 0x4)) {
+ size = 12;
+ mask &= ~0x4;
+ nv_reference(bld->pc, mi, 2, dst0[2]);
+ }
+
+ if (mi) {
+ struct nv_instruction *ex = new_instruction(bld->pc, NV_OP_EXPORT);
+ int s;
+
+ nv_reference(bld->pc, ex, 0, new_value(bld->pc, NV_FILE_MEM_V, 4));
+ nv_reference(bld->pc, ex, 1, mi->def[0]);
+
+ for (s = 1; s < size / 4; ++s) {
+ bld_def(mi, s, new_value(bld->pc, NV_FILE_GPR, 4));
+ nv_reference(bld->pc, ex, s + 1, mi->def[s]);
+ }
+
+ ex->fixed = 1;
+ ex->src[0]->value->reg.size = size;
+ ex->src[0]->value->reg.address =
+ bld->ti->output_loc[insn->Dst[0].Register.Index][c];
+ }
+ }
+
+ for (c = 0; c < 4; ++c)
+ if (mask & (1 << c))
+ emit_store(bld, insn, c, dst0[c]);
+}
+
+static INLINE void
+bld_free_registers(struct bld_register *base, int n)
+{
+ int i, c;
+
+ for (i = 0; i < n; ++i)
+ for (c = 0; c < 4; ++c)
+ util_dynarray_fini(&base[i * 4 + c].vals);
+}
+
+int
+nvc0_tgsi_to_nc(struct nv_pc *pc, struct nvc0_translation_info *ti)
+{
+ struct bld_context *bld = CALLOC_STRUCT(bld_context);
+ unsigned ip;
+
+ pc->root[0] = pc->current_block = new_basic_block(pc);
+
+ bld->pc = pc;
+ bld->ti = ti;
+
+ pc->loop_nesting_bound = 1;
+
+ bld->zero = new_value(pc, NV_FILE_GPR, 4);
+ bld->zero->reg.id = 63;
+
+ if (pc->is_fragprog) {
+ struct nv_value *mem = new_value(pc, NV_FILE_MEM_V, 4);
+ mem->reg.address = 0x7c;
+
+ bld->frag_coord[3] = bld_insn_1(bld, NV_OP_LINTERP, mem);
+ bld->frag_coord[3] = bld_insn_1(bld, NV_OP_RCP, bld->frag_coord[3]);
+ }
+
+ for (ip = 0; ip < ti->num_insns; ++ip)
+ bld_instruction(bld, &ti->insns[ip]);
+
+ bld_free_registers(&bld->tvs[0][0], BLD_MAX_TEMPS);
+ bld_free_registers(&bld->avs[0][0], BLD_MAX_ADDRS);
+ bld_free_registers(&bld->pvs[0][0], BLD_MAX_PREDS);
+ bld_free_registers(&bld->ovs[0][0], PIPE_MAX_SHADER_OUTPUTS);
+
+ FREE(bld);
+ return 0;
+}
+
+/* If a variable is assigned in a loop, replace all references to the value
+ * from outside the loop with a phi value.
+ */
+static void
+bld_replace_value(struct nv_pc *pc, struct nv_basic_block *b,
+ struct nv_value *old_val,
+ struct nv_value *new_val)
+{
+ struct nv_instruction *nvi;
+
+ for (nvi = b->phi ? b->phi : b->entry; nvi; nvi = nvi->next) {
+ int s;
+ for (s = 0; s < 6 && nvi->src[s]; ++s)
+ if (nvi->src[s]->value == old_val)
+ nv_reference(pc, nvi, s, new_val);
+ }
+
+ b->pass_seq = pc->pass_seq;
+
+ if (b->out[0] && b->out[0]->pass_seq < pc->pass_seq)
+ bld_replace_value(pc, b->out[0], old_val, new_val);
+
+ if (b->out[1] && b->out[1]->pass_seq < pc->pass_seq)
+ bld_replace_value(pc, b->out[1], old_val, new_val);
+}
diff --git a/src/gallium/drivers/nvc0/nvc0_transfer.c b/src/gallium/drivers/nvc0/nvc0_transfer.c
new file mode 100644
index 00000000000..7bbfe057e58
--- /dev/null
+++ b/src/gallium/drivers/nvc0/nvc0_transfer.c
@@ -0,0 +1,385 @@
+
+#include "util/u_format.h"
+
+#include "nvc0_context.h"
+#include "nvc0_transfer.h"
+
+#include "nv50/nv50_defs.xml.h"
+
+struct nvc0_transfer {
+ struct pipe_transfer base;
+ struct nvc0_m2mf_rect rect[2];
+ uint32_t nblocksx;
+ uint16_t nblocksy;
+ uint16_t nlayers;
+};
+
+void
+nvc0_m2mf_transfer_rect(struct pipe_screen *pscreen,
+ const struct nvc0_m2mf_rect *dst,
+ const struct nvc0_m2mf_rect *src,
+ uint32_t nblocksx, uint32_t nblocksy)
+{
+ struct nouveau_channel *chan = nouveau_screen(pscreen)->channel;
+ const int cpp = dst->cpp;
+ uint32_t src_ofst = src->base;
+ uint32_t dst_ofst = dst->base;
+ uint32_t height = nblocksy;
+ uint32_t sy = src->y;
+ uint32_t dy = dst->y;
+ uint32_t exec = (1 << 20);
+
+ assert(dst->cpp == src->cpp);
+
+ if (nouveau_bo_tile_layout(src->bo)) {
+ BEGIN_RING(chan, RING_MF(TILING_MODE_IN), 5);
+ OUT_RING (chan, src->tile_mode);
+ OUT_RING (chan, src->width * cpp);
+ OUT_RING (chan, src->height);
+ OUT_RING (chan, src->depth);
+ OUT_RING (chan, src->z);
+ } else {
+ src_ofst += src->y * src->pitch + src->x * cpp;
+
+ BEGIN_RING(chan, RING_MF(PITCH_IN), 1);
+ OUT_RING (chan, src->width * cpp);
+
+ exec |= NVC0_M2MF_EXEC_LINEAR_IN;
+ }
+
+ if (nouveau_bo_tile_layout(dst->bo)) {
+ BEGIN_RING(chan, RING_MF(TILING_MODE_OUT), 5);
+ OUT_RING (chan, dst->tile_mode);
+ OUT_RING (chan, dst->width * cpp);
+ OUT_RING (chan, dst->height);
+ OUT_RING (chan, dst->depth);
+ OUT_RING (chan, dst->z);
+ } else {
+ dst_ofst += dst->y * dst->pitch + dst->x * cpp;
+
+ BEGIN_RING(chan, RING_MF(PITCH_OUT), 1);
+ OUT_RING (chan, dst->width * cpp);
+
+ exec |= NVC0_M2MF_EXEC_LINEAR_OUT;
+ }
+
+ while (height) {
+ int line_count = height > 2047 ? 2047 : height;
+
+ MARK_RING (chan, 17, 4);
+
+ BEGIN_RING(chan, RING_MF(OFFSET_IN_HIGH), 2);
+ OUT_RELOCh(chan, src->bo, src_ofst, src->domain | NOUVEAU_BO_RD);
+ OUT_RELOCl(chan, src->bo, src_ofst, src->domain | NOUVEAU_BO_RD);
+
+ BEGIN_RING(chan, RING_MF(OFFSET_OUT_HIGH), 2);
+ OUT_RELOCh(chan, dst->bo, dst_ofst, dst->domain | NOUVEAU_BO_WR);
+ OUT_RELOCl(chan, dst->bo, dst_ofst, dst->domain | NOUVEAU_BO_WR);
+
+ if (!(exec & NVC0_M2MF_EXEC_LINEAR_IN)) {
+ BEGIN_RING(chan, RING_MF(TILING_POSITION_IN_X), 2);
+ OUT_RING (chan, src->x * cpp);
+ OUT_RING (chan, sy);
+ } else {
+ src_ofst += line_count * src->pitch;
+ }
+ if (!(exec & NVC0_M2MF_EXEC_LINEAR_OUT)) {
+ BEGIN_RING(chan, RING_MF(TILING_POSITION_OUT_X), 2);
+ OUT_RING (chan, dst->x * cpp);
+ OUT_RING (chan, dy);
+ } else {
+ dst_ofst += line_count * dst->pitch;
+ }
+
+ BEGIN_RING(chan, RING_MF(LINE_LENGTH_IN), 2);
+ OUT_RING (chan, nblocksx * cpp);
+ OUT_RING (chan, line_count);
+ BEGIN_RING(chan, RING_MF(EXEC), 1);
+ OUT_RING (chan, exec);
+
+ height -= line_count;
+ sy += line_count;
+ dy += line_count;
+ }
+}
+
+void
+nvc0_m2mf_push_linear(struct nouveau_context *nv,
+ struct nouveau_bo *dst, unsigned offset, unsigned domain,
+ unsigned size, void *data)
+{
+ struct nouveau_channel *chan = nv->screen->channel;
+ uint32_t *src = (uint32_t *)data;
+ unsigned count = (size + 3) / 4;
+
+ MARK_RING (chan, 8, 2);
+
+ BEGIN_RING(chan, RING_MF(OFFSET_OUT_HIGH), 2);
+ OUT_RELOCh(chan, dst, offset, domain | NOUVEAU_BO_WR);
+ OUT_RELOCl(chan, dst, offset, domain | NOUVEAU_BO_WR);
+ BEGIN_RING(chan, RING_MF(LINE_LENGTH_IN), 2);
+ OUT_RING (chan, size);
+ OUT_RING (chan, 1);
+ BEGIN_RING(chan, RING_MF(EXEC), 1);
+ OUT_RING (chan, 0x100111);
+
+ while (count) {
+ unsigned nr = AVAIL_RING(chan);
+
+ if (nr < 9) {
+ FIRE_RING(chan);
+ nouveau_bo_validate(chan, dst, NOUVEAU_BO_WR);
+ continue;
+ }
+ nr = MIN2(count, nr - 1);
+ nr = MIN2(nr, NV04_PFIFO_MAX_PACKET_LEN);
+
+ BEGIN_RING_NI(chan, RING_MF(DATA), nr);
+ OUT_RINGp (chan, src, nr);
+
+ src += nr;
+ count -= nr;
+ }
+}
+
+void
+nvc0_m2mf_copy_linear(struct nouveau_context *nv,
+ struct nouveau_bo *dst, unsigned dstoff, unsigned dstdom,
+ struct nouveau_bo *src, unsigned srcoff, unsigned srcdom,
+ unsigned size)
+{
+ struct nouveau_channel *chan = nv->screen->channel;
+
+ while (size) {
+ unsigned bytes = MIN2(size, 1 << 17);
+
+ MARK_RING (chan, 11, 4);
+
+ BEGIN_RING(chan, RING_MF(OFFSET_OUT_HIGH), 2);
+ OUT_RELOCh(chan, dst, dstoff, dstdom | NOUVEAU_BO_WR);
+ OUT_RELOCl(chan, dst, dstoff, dstdom | NOUVEAU_BO_WR);
+ BEGIN_RING(chan, RING_MF(OFFSET_IN_HIGH), 2);
+ OUT_RELOCh(chan, src, srcoff, srcdom | NOUVEAU_BO_RD);
+ OUT_RELOCl(chan, src, srcoff, srcdom | NOUVEAU_BO_RD);
+ BEGIN_RING(chan, RING_MF(LINE_LENGTH_IN), 2);
+ OUT_RING (chan, bytes);
+ OUT_RING (chan, 1);
+ BEGIN_RING(chan, RING_MF(EXEC), 1);
+ OUT_RING (chan, (1 << NVC0_M2MF_EXEC_INC__SHIFT) |
+ NVC0_M2MF_EXEC_LINEAR_IN | NVC0_M2MF_EXEC_LINEAR_OUT);
+
+ srcoff += bytes;
+ dstoff += bytes;
+ size -= bytes;
+ }
+}
+
+static void
+nvc0_m2mf_push_rect(struct pipe_screen *pscreen,
+ const struct nvc0_m2mf_rect *dst,
+ const void *data,
+ unsigned nblocksx, unsigned nblocksy)
+{
+ struct nouveau_channel *chan;
+ const uint8_t *src = (const uint8_t *)data;
+ const int cpp = dst->cpp;
+ const int line_len = nblocksx * cpp;
+ int dy = dst->y;
+
+ assert(nouveau_bo_tile_layout(dst->bo));
+
+ BEGIN_RING(chan, RING_MF(TILING_MODE_OUT), 5);
+ OUT_RING (chan, dst->tile_mode);
+ OUT_RING (chan, dst->width * cpp);
+ OUT_RING (chan, dst->height);
+ OUT_RING (chan, dst->depth);
+ OUT_RING (chan, dst->z);
+
+ while (nblocksy) {
+ int line_count, words;
+ int size = MIN2(AVAIL_RING(chan), NV04_PFIFO_MAX_PACKET_LEN);
+
+ if (size < (12 + words)) {
+ FIRE_RING(chan);
+ continue;
+ }
+ line_count = (size * 4) / line_len;
+ words = (line_count * line_len + 3) / 4;
+
+ BEGIN_RING(chan, RING_MF(OFFSET_OUT_HIGH), 2);
+ OUT_RELOCh(chan, dst->bo, dst->base, dst->domain | NOUVEAU_BO_WR);
+ OUT_RELOCl(chan, dst->bo, dst->base, dst->domain | NOUVEAU_BO_WR);
+
+ BEGIN_RING(chan, RING_MF(TILING_POSITION_OUT_X), 2);
+ OUT_RING (chan, dst->x * cpp);
+ OUT_RING (chan, dy);
+ BEGIN_RING(chan, RING_MF(LINE_LENGTH_IN), 2);
+ OUT_RING (chan, line_len);
+ OUT_RING (chan, line_count);
+ BEGIN_RING(chan, RING_MF(EXEC), 1);
+ OUT_RING (chan, (1 << NVC0_M2MF_EXEC_INC__SHIFT) |
+ NVC0_M2MF_EXEC_PUSH | NVC0_M2MF_EXEC_LINEAR_IN);
+
+ BEGIN_RING_NI(chan, RING_MF(DATA), words);
+ OUT_RINGp (chan, src, words);
+
+ dy += line_count;
+ src += line_len * line_count;
+ nblocksy -= line_count;
+ }
+}
+
+struct pipe_transfer *
+nvc0_miptree_transfer_new(struct pipe_context *pctx,
+ struct pipe_resource *res,
+ unsigned level,
+ unsigned usage,
+ const struct pipe_box *box)
+{
+ struct nvc0_context *nvc0 = nvc0_context(pctx);
+ struct pipe_screen *pscreen = pctx->screen;
+ struct nouveau_device *dev = nvc0->screen->base.device;
+ struct nvc0_miptree *mt = nvc0_miptree(res);
+ struct nvc0_miptree_level *lvl = &mt->level[level];
+ struct nvc0_transfer *tx;
+ uint32_t size;
+ uint32_t w, h, d, z, layer;
+ int ret;
+
+ tx = CALLOC_STRUCT(nvc0_transfer);
+ if (!tx)
+ return NULL;
+
+ if (mt->layout_3d) {
+ z = box->z;
+ d = u_minify(res->depth0, level);
+ layer = 0;
+ } else {
+ z = 0;
+ d = 1;
+ layer = box->z;
+ }
+ tx->nlayers = box->depth;
+
+ pipe_resource_reference(&tx->base.resource, res);
+
+ tx->base.level = level;
+ tx->base.usage = usage;
+ tx->base.box = *box;
+
+ tx->nblocksx = util_format_get_nblocksx(res->format, box->width);
+ tx->nblocksy = util_format_get_nblocksy(res->format, box->height);
+
+ tx->base.stride = tx->nblocksx * util_format_get_blocksize(res->format);
+ tx->base.layer_stride = tx->nblocksy * tx->base.stride;
+
+ w = u_minify(res->width0, level);
+ h = u_minify(res->height0, level);
+
+ tx->rect[0].cpp = tx->rect[1].cpp = util_format_get_blocksize(res->format);
+
+ tx->rect[0].bo = mt->base.bo;
+ tx->rect[0].base = lvl->offset + layer * mt->layer_stride;
+ tx->rect[0].tile_mode = lvl->tile_mode;
+ tx->rect[0].x = util_format_get_nblocksx(res->format, box->x);
+ tx->rect[0].y = util_format_get_nblocksy(res->format, box->y);
+ tx->rect[0].z = z;
+ tx->rect[0].width = util_format_get_nblocksx(res->format, w);
+ tx->rect[0].height = util_format_get_nblocksy(res->format, h);
+ tx->rect[0].depth = d;
+ tx->rect[0].pitch = lvl->pitch;
+ tx->rect[0].domain = NOUVEAU_BO_VRAM;
+
+ size = tx->base.layer_stride;
+
+ ret = nouveau_bo_new(dev, NOUVEAU_BO_GART | NOUVEAU_BO_MAP, 0,
+ size * tx->nlayers, &tx->rect[1].bo);
+ if (ret) {
+ FREE(tx);
+ return NULL;
+ }
+
+ tx->rect[1].width = tx->nblocksx;
+ tx->rect[1].height = tx->nblocksy;
+ tx->rect[1].depth = 1;
+ tx->rect[1].pitch = tx->base.stride;
+ tx->rect[1].domain = NOUVEAU_BO_GART;
+
+ if (usage & PIPE_TRANSFER_READ) {
+ unsigned base = tx->rect[0].base;
+ unsigned i;
+ for (i = 0; i < tx->nlayers; ++i) {
+ nvc0_m2mf_transfer_rect(pscreen, &tx->rect[1], &tx->rect[0],
+ tx->nblocksx, tx->nblocksy);
+ if (mt->layout_3d)
+ tx->rect[0].z++;
+ else
+ tx->rect[0].base += mt->layer_stride;
+ tx->rect[1].base += size;
+ }
+ tx->rect[0].z = z;
+ tx->rect[0].base = base;
+ tx->rect[1].base = 0;
+ }
+
+ return &tx->base;
+}
+
+void
+nvc0_miptree_transfer_del(struct pipe_context *pctx,
+ struct pipe_transfer *transfer)
+{
+ struct pipe_screen *pscreen = pctx->screen;
+ struct nvc0_transfer *tx = (struct nvc0_transfer *)transfer;
+ struct nvc0_miptree *mt = nvc0_miptree(tx->base.resource);
+ unsigned i;
+
+ if (tx->base.usage & PIPE_TRANSFER_WRITE) {
+ for (i = 0; i < tx->nlayers; ++i) {
+ nvc0_m2mf_transfer_rect(pscreen, &tx->rect[0], &tx->rect[1],
+ tx->nblocksx, tx->nblocksy);
+ if (mt->layout_3d)
+ tx->rect[0].z++;
+ else
+ tx->rect[0].base += mt->layer_stride;
+ tx->rect[1].base += tx->nblocksy * tx->base.stride;
+ }
+ }
+
+ nouveau_bo_ref(NULL, &tx->rect[1].bo);
+ pipe_resource_reference(&transfer->resource, NULL);
+
+ FREE(tx);
+}
+
+void *
+nvc0_miptree_transfer_map(struct pipe_context *pctx,
+ struct pipe_transfer *transfer)
+{
+ struct nvc0_transfer *tx = (struct nvc0_transfer *)transfer;
+ int ret;
+ unsigned flags = 0;
+
+ if (tx->rect[1].bo->map)
+ return tx->rect[1].bo->map;
+
+ if (transfer->usage & PIPE_TRANSFER_READ)
+ flags = NOUVEAU_BO_RD;
+ if (transfer->usage & PIPE_TRANSFER_WRITE)
+ flags |= NOUVEAU_BO_WR;
+
+ ret = nouveau_bo_map(tx->rect[1].bo, flags);
+ if (ret)
+ return NULL;
+ return tx->rect[1].bo->map;
+}
+
+void
+nvc0_miptree_transfer_unmap(struct pipe_context *pctx,
+ struct pipe_transfer *transfer)
+{
+ struct nvc0_transfer *tx = (struct nvc0_transfer *)transfer;
+
+ nouveau_bo_unmap(tx->rect[1].bo);
+}
+
diff --git a/src/gallium/drivers/nvc0/nvc0_transfer.h b/src/gallium/drivers/nvc0/nvc0_transfer.h
new file mode 100644
index 00000000000..803ee3463ec
--- /dev/null
+++ b/src/gallium/drivers/nvc0/nvc0_transfer.h
@@ -0,0 +1,44 @@
+
+#ifndef __NVC0_TRANSFER_H__
+#define __NVC0_TRANSFER_H__
+
+#include "pipe/p_state.h"
+
+struct pipe_transfer *
+nvc0_miptree_transfer_new(struct pipe_context *pcontext,
+ struct pipe_resource *pt,
+ unsigned level,
+ unsigned usage,
+ const struct pipe_box *box);
+void
+nvc0_miptree_transfer_del(struct pipe_context *pcontext,
+ struct pipe_transfer *ptx);
+void *
+nvc0_miptree_transfer_map(struct pipe_context *pcontext,
+ struct pipe_transfer *ptx);
+void
+nvc0_miptree_transfer_unmap(struct pipe_context *pcontext,
+ struct pipe_transfer *ptx);
+
+struct nvc0_m2mf_rect {
+ struct nouveau_bo *bo;
+ uint32_t base;
+ unsigned domain;
+ uint32_t pitch;
+ uint32_t width;
+ uint32_t x;
+ uint32_t height;
+ uint32_t y;
+ uint16_t depth;
+ uint16_t z;
+ uint16_t tile_mode;
+ uint16_t cpp;
+};
+
+void
+nvc0_m2mf_transfer_rect(struct pipe_screen *pscreen,
+ const struct nvc0_m2mf_rect *dst,
+ const struct nvc0_m2mf_rect *src,
+ uint32_t nblocksx, uint32_t nblocksy);
+
+#endif
diff --git a/src/gallium/drivers/nvc0/nvc0_vbo.c b/src/gallium/drivers/nvc0/nvc0_vbo.c
new file mode 100644
index 00000000000..6bbcf2447ec
--- /dev/null
+++ b/src/gallium/drivers/nvc0/nvc0_vbo.c
@@ -0,0 +1,653 @@
+/*
+ * Copyright 2010 Christoph Bumiller
+ *
+ * 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 "pipe/p_context.h"
+#include "pipe/p_state.h"
+#include "util/u_inlines.h"
+#include "util/u_format.h"
+#include "translate/translate.h"
+
+#include "nvc0_context.h"
+#include "nvc0_resource.h"
+
+#include "nvc0_3d.xml.h"
+
+void
+nvc0_vertex_state_delete(struct pipe_context *pipe,
+ void *hwcso)
+{
+ struct nvc0_vertex_stateobj *so = hwcso;
+
+ if (so->translate)
+ so->translate->release(so->translate);
+ FREE(hwcso);
+}
+
+void *
+nvc0_vertex_state_create(struct pipe_context *pipe,
+ unsigned num_elements,
+ const struct pipe_vertex_element *elements)
+{
+ struct nvc0_vertex_stateobj *so;
+ struct translate_key transkey;
+ unsigned i;
+
+ so = MALLOC(sizeof(*so) +
+ num_elements * sizeof(struct nvc0_vertex_element));
+ if (!so)
+ return NULL;
+ so->num_elements = num_elements;
+ so->instance_elts = 0;
+ so->instance_bufs = 0;
+ so->need_conversion = FALSE;
+
+ transkey.nr_elements = 0;
+ transkey.output_stride = 0;
+
+ for (i = 0; i < num_elements; ++i) {
+ const struct pipe_vertex_element *ve = &elements[i];
+ const unsigned vbi = ve->vertex_buffer_index;
+ enum pipe_format fmt = ve->src_format;
+
+ so->element[i].pipe = elements[i];
+ so->element[i].state = nvc0_format_table[fmt].vtx;
+
+ if (!so->element[i].state) {
+ switch (util_format_get_nr_components(fmt)) {
+ case 1: fmt = PIPE_FORMAT_R32_FLOAT; break;
+ case 2: fmt = PIPE_FORMAT_R32G32_FLOAT; break;
+ case 3: fmt = PIPE_FORMAT_R32G32B32_FLOAT; break;
+ case 4: fmt = PIPE_FORMAT_R32G32B32A32_FLOAT; break;
+ default:
+ assert(0);
+ return NULL;
+ }
+ so->element[i].state = nvc0_format_table[fmt].vtx;
+ so->need_conversion = TRUE;
+ }
+ so->element[i].state |= i;
+
+ if (1) {
+ unsigned j = transkey.nr_elements++;
+
+ transkey.element[j].type = TRANSLATE_ELEMENT_NORMAL;
+ transkey.element[j].input_format = ve->src_format;
+ transkey.element[j].input_buffer = vbi;
+ transkey.element[j].input_offset = ve->src_offset;
+ transkey.element[j].instance_divisor = ve->instance_divisor;
+
+ transkey.element[j].output_format = fmt;
+ transkey.element[j].output_offset = transkey.output_stride;
+ transkey.output_stride += (util_format_get_stride(fmt, 1) + 3) & ~3;
+
+ if (unlikely(ve->instance_divisor)) {
+ so->instance_elts |= 1 << i;
+ so->instance_bufs |= 1 << vbi;
+ }
+ }
+ }
+
+ so->translate = translate_create(&transkey);
+ so->vtx_size = transkey.output_stride / 4;
+ so->vtx_per_packet_max = NV04_PFIFO_MAX_PACKET_LEN / MAX2(so->vtx_size, 1);
+
+ return so;
+}
+
+#define NVC0_3D_VERTEX_ATTRIB_INACTIVE \
+ NVC0_3D_VERTEX_ATTRIB_FORMAT_TYPE_FLOAT | \
+ NVC0_3D_VERTEX_ATTRIB_FORMAT_SIZE_32 | NVC0_3D_VERTEX_ATTRIB_FORMAT_CONST
+
+#define VTX_ATTR(a, c, t, s) \
+ ((NVC0_3D_VTX_ATTR_DEFINE_TYPE_##t) | \
+ (NVC0_3D_VTX_ATTR_DEFINE_SIZE_##s) | \
+ ((a) << NVC0_3D_VTX_ATTR_DEFINE_ATTR__SHIFT) | \
+ ((c) << NVC0_3D_VTX_ATTR_DEFINE_COMP__SHIFT))
+
+static void
+nvc0_emit_vtxattr(struct nvc0_context *nvc0, struct pipe_vertex_buffer *vb,
+ struct pipe_vertex_element *ve, unsigned attr)
+{
+ const void *data;
+ struct nouveau_channel *chan = nvc0->screen->base.channel;
+ struct nv04_resource *res = nv04_resource(vb->buffer);
+ float v[4];
+ int i;
+ const unsigned nc = util_format_get_nr_components(ve->src_format);
+
+ data = nouveau_resource_map_offset(&nvc0->base, res, vb->buffer_offset +
+ ve->src_offset, NOUVEAU_BO_RD);
+
+ util_format_read_4f(ve->src_format, v, 0, data, 0, 0, 0, 1, 1);
+
+ BEGIN_RING(chan, RING_3D(VTX_ATTR_DEFINE), nc + 1);
+ OUT_RING (chan, VTX_ATTR(attr, nc, FLOAT, 32));
+ for (i = 0; i < nc; ++i)
+ OUT_RINGf(chan, v[i]);
+}
+
+static INLINE void
+nvc0_vbuf_range(struct nvc0_context *nvc0, int vbi,
+ uint32_t *base, uint32_t *size)
+{
+ if (unlikely(nvc0->vertex->instance_bufs & (1 << vbi))) {
+ /* TODO: use min and max instance divisor to get a proper range */
+ *base = 0;
+ *size = nvc0->vtxbuf[vbi].buffer->width0;
+ } else {
+ assert(nvc0->vbo_max_index != ~0);
+ *base = nvc0->vbo_min_index * nvc0->vtxbuf[vbi].stride;
+ *size = (nvc0->vbo_max_index -
+ nvc0->vbo_min_index + 1) * nvc0->vtxbuf[vbi].stride;
+ }
+}
+
+static void
+nvc0_prevalidate_vbufs(struct nvc0_context *nvc0)
+{
+ struct pipe_vertex_buffer *vb;
+ struct nv04_resource *buf;
+ int i;
+ uint32_t base, size;
+
+ nvc0->vbo_fifo = nvc0->vbo_user = 0;
+
+ nvc0_bufctx_reset(nvc0, NVC0_BUFCTX_VERTEX);
+
+ for (i = 0; i < nvc0->num_vtxbufs; ++i) {
+ vb = &nvc0->vtxbuf[i];
+ if (!vb->stride)
+ continue;
+ buf = nv04_resource(vb->buffer);
+
+ /* NOTE: user buffers with temporary storage count as mapped by GPU */
+ if (!nouveau_resource_mapped_by_gpu(vb->buffer)) {
+ if (nvc0->vbo_push_hint) {
+ nvc0->vbo_fifo = ~0;
+ continue;
+ } else {
+ if (buf->status & NOUVEAU_BUFFER_STATUS_USER_MEMORY) {
+ nvc0->vbo_user |= 1 << i;
+ assert(vb->stride > vb->buffer_offset);
+ nvc0_vbuf_range(nvc0, i, &base, &size);
+ nouveau_user_buffer_upload(buf, base, size);
+ } else {
+ nouveau_buffer_migrate(&nvc0->base, buf, NOUVEAU_BO_GART);
+ }
+ nvc0->base.vbo_dirty = TRUE;
+ }
+ }
+ nvc0_bufctx_add_resident(nvc0, NVC0_BUFCTX_VERTEX, buf, NOUVEAU_BO_RD);
+ nouveau_buffer_adjust_score(&nvc0->base, buf, 1);
+ }
+}
+
+static void
+nvc0_update_user_vbufs(struct nvc0_context *nvc0)
+{
+ struct nouveau_channel *chan = nvc0->screen->base.channel;
+ uint32_t base, offset, size;
+ int i;
+ uint32_t written = 0;
+
+ for (i = 0; i < nvc0->vertex->num_elements; ++i) {
+ struct pipe_vertex_element *ve = &nvc0->vertex->element[i].pipe;
+ const int b = ve->vertex_buffer_index;
+ struct pipe_vertex_buffer *vb = &nvc0->vtxbuf[b];
+ struct nv04_resource *buf = nv04_resource(vb->buffer);
+
+ if (!(nvc0->vbo_user & (1 << b)))
+ continue;
+
+ if (!vb->stride) {
+ nvc0_emit_vtxattr(nvc0, vb, ve, i);
+ continue;
+ }
+ nvc0_vbuf_range(nvc0, b, &base, &size);
+
+ if (!(written & (1 << b))) {
+ written |= 1 << b;
+ nouveau_user_buffer_upload(buf, base, size);
+ }
+ offset = vb->buffer_offset + ve->src_offset;
+
+ MARK_RING (chan, 6, 4);
+ BEGIN_RING_1I(chan, RING_3D(VERTEX_ARRAY_SELECT), 5);
+ OUT_RING (chan, i);
+ OUT_RESRCh(chan, buf, base + size - 1, NOUVEAU_BO_RD);
+ OUT_RESRCl(chan, buf, base + size - 1, NOUVEAU_BO_RD);
+ OUT_RESRCh(chan, buf, offset, NOUVEAU_BO_RD);
+ OUT_RESRCl(chan, buf, offset, NOUVEAU_BO_RD);
+ }
+ nvc0->base.vbo_dirty = TRUE;
+}
+
+static INLINE void
+nvc0_release_user_vbufs(struct nvc0_context *nvc0)
+{
+ uint32_t vbo_user = nvc0->vbo_user;
+
+ while (vbo_user) {
+ int i = ffs(vbo_user) - 1;
+ vbo_user &= ~(1 << i);
+
+ nouveau_buffer_release_gpu_storage(nv04_resource(nvc0->vtxbuf[i].buffer));
+ }
+}
+
+void
+nvc0_vertex_arrays_validate(struct nvc0_context *nvc0)
+{
+ struct nouveau_channel *chan = nvc0->screen->base.channel;
+ struct nvc0_vertex_stateobj *vertex = nvc0->vertex;
+ struct pipe_vertex_buffer *vb;
+ struct nvc0_vertex_element *ve;
+ unsigned i;
+
+ if (unlikely(vertex->need_conversion || NVC0_USING_EDGEFLAG(nvc0))) {
+ nvc0->vbo_fifo = ~0;
+ nvc0->vbo_user = 0;
+ } else {
+ nvc0_prevalidate_vbufs(nvc0);
+ }
+
+ BEGIN_RING(chan, RING_3D(VERTEX_ATTRIB_FORMAT(0)), vertex->num_elements);
+ for (i = 0; i < vertex->num_elements; ++i) {
+ ve = &vertex->element[i];
+ vb = &nvc0->vtxbuf[ve->pipe.vertex_buffer_index];
+
+ if (likely(vb->stride) || nvc0->vbo_fifo) {
+ OUT_RING(chan, ve->state);
+ } else {
+ OUT_RING(chan, ve->state | NVC0_3D_VERTEX_ATTRIB_FORMAT_CONST);
+ nvc0->vbo_fifo &= ~(1 << i);
+ }
+ }
+
+ for (i = 0; i < vertex->num_elements; ++i) {
+ struct nv04_resource *res;
+ unsigned size, offset;
+
+ ve = &vertex->element[i];
+ vb = &nvc0->vtxbuf[ve->pipe.vertex_buffer_index];
+
+ if (unlikely(ve->pipe.instance_divisor)) {
+ if (!(nvc0->state.instance_elts & (1 << i))) {
+ IMMED_RING(chan, RING_3D(VERTEX_ARRAY_PER_INSTANCE(i)), 1);
+ }
+ BEGIN_RING(chan, RING_3D(VERTEX_ARRAY_DIVISOR(i)), 1);
+ OUT_RING (chan, ve->pipe.instance_divisor);
+ } else
+ if (unlikely(nvc0->state.instance_elts & (1 << i))) {
+ IMMED_RING(chan, RING_3D(VERTEX_ARRAY_PER_INSTANCE(i)), 0);
+ }
+
+ res = nv04_resource(vb->buffer);
+
+ if (nvc0->vbo_fifo || unlikely(vb->stride == 0)) {
+ if (!nvc0->vbo_fifo)
+ nvc0_emit_vtxattr(nvc0, vb, &ve->pipe, i);
+ BEGIN_RING(chan, RING_3D(VERTEX_ARRAY_FETCH(i)), 1);
+ OUT_RING (chan, 0);
+ continue;
+ }
+
+ size = vb->buffer->width0;
+ offset = ve->pipe.src_offset + vb->buffer_offset;
+
+ MARK_RING (chan, 8, 4);
+ BEGIN_RING(chan, RING_3D(VERTEX_ARRAY_FETCH(i)), 1);
+ OUT_RING (chan, (1 << 12) | vb->stride);
+ BEGIN_RING_1I(chan, RING_3D(VERTEX_ARRAY_SELECT), 5);
+ OUT_RING (chan, i);
+ OUT_RESRCh(chan, res, size - 1, NOUVEAU_BO_RD);
+ OUT_RESRCl(chan, res, size - 1, NOUVEAU_BO_RD);
+ OUT_RESRCh(chan, res, offset, NOUVEAU_BO_RD);
+ OUT_RESRCl(chan, res, offset, NOUVEAU_BO_RD);
+ }
+ for (; i < nvc0->state.num_vtxelts; ++i) {
+ BEGIN_RING(chan, RING_3D(VERTEX_ATTRIB_FORMAT(i)), 1);
+ OUT_RING (chan, NVC0_3D_VERTEX_ATTRIB_INACTIVE);
+ BEGIN_RING(chan, RING_3D(VERTEX_ARRAY_FETCH(i)), 1);
+ OUT_RING (chan, 0);
+ }
+
+ nvc0->state.num_vtxelts = vertex->num_elements;
+ nvc0->state.instance_elts = vertex->instance_elts;
+}
+
+#define NVC0_PRIM_GL_CASE(n) \
+ case PIPE_PRIM_##n: return NVC0_3D_VERTEX_BEGIN_GL_PRIMITIVE_##n
+
+static INLINE unsigned
+nvc0_prim_gl(unsigned prim)
+{
+ switch (prim) {
+ NVC0_PRIM_GL_CASE(POINTS);
+ NVC0_PRIM_GL_CASE(LINES);
+ NVC0_PRIM_GL_CASE(LINE_LOOP);
+ NVC0_PRIM_GL_CASE(LINE_STRIP);
+ NVC0_PRIM_GL_CASE(TRIANGLES);
+ NVC0_PRIM_GL_CASE(TRIANGLE_STRIP);
+ NVC0_PRIM_GL_CASE(TRIANGLE_FAN);
+ NVC0_PRIM_GL_CASE(QUADS);
+ NVC0_PRIM_GL_CASE(QUAD_STRIP);
+ NVC0_PRIM_GL_CASE(POLYGON);
+ NVC0_PRIM_GL_CASE(LINES_ADJACENCY);
+ NVC0_PRIM_GL_CASE(LINE_STRIP_ADJACENCY);
+ NVC0_PRIM_GL_CASE(TRIANGLES_ADJACENCY);
+ NVC0_PRIM_GL_CASE(TRIANGLE_STRIP_ADJACENCY);
+ /*
+ NVC0_PRIM_GL_CASE(PATCHES); */
+ default:
+ return NVC0_3D_VERTEX_BEGIN_GL_PRIMITIVE_POINTS;
+ break;
+ }
+}
+
+static void
+nvc0_draw_vbo_flush_notify(struct nouveau_channel *chan)
+{
+ struct nvc0_context *nvc0 = chan->user_private;
+
+ nouveau_fence_update(&nvc0->screen->base, TRUE);
+
+ nvc0_bufctx_emit_relocs(nvc0);
+}
+
+static void
+nvc0_draw_arrays(struct nvc0_context *nvc0,
+ unsigned mode, unsigned start, unsigned count,
+ unsigned instance_count)
+{
+ struct nouveau_channel *chan = nvc0->screen->base.channel;
+ unsigned prim;
+
+ chan->flush_notify = nvc0_draw_vbo_flush_notify;
+ chan->user_private = nvc0;
+
+ prim = nvc0_prim_gl(mode);
+
+ while (instance_count--) {
+ BEGIN_RING(chan, RING_3D(VERTEX_BEGIN_GL), 1);
+ OUT_RING (chan, prim);
+ BEGIN_RING(chan, RING_3D(VERTEX_BUFFER_FIRST), 2);
+ OUT_RING (chan, start);
+ OUT_RING (chan, count);
+ IMMED_RING(chan, RING_3D(VERTEX_END_GL), 0);
+
+ prim |= NVC0_3D_VERTEX_BEGIN_GL_INSTANCE_NEXT;
+ }
+
+ chan->flush_notify = nvc0_default_flush_notify;
+}
+
+static void
+nvc0_draw_elements_inline_u08(struct nouveau_channel *chan, uint8_t *map,
+ unsigned start, unsigned count)
+{
+ map += start;
+
+ if (count & 3) {
+ unsigned i;
+ BEGIN_RING_NI(chan, RING_3D(VB_ELEMENT_U32), count & 3);
+ for (i = 0; i < (count & 3); ++i)
+ OUT_RING(chan, *map++);
+ count &= ~3;
+ }
+ while (count) {
+ unsigned i, nr = MIN2(count, NV04_PFIFO_MAX_PACKET_LEN * 4) / 4;
+
+ BEGIN_RING_NI(chan, RING_3D(VB_ELEMENT_U8), nr);
+ for (i = 0; i < nr; ++i) {
+ OUT_RING(chan,
+ (map[3] << 24) | (map[2] << 16) | (map[1] << 8) | map[0]);
+ map += 4;
+ }
+ count -= nr * 4;
+ }
+}
+
+static void
+nvc0_draw_elements_inline_u16(struct nouveau_channel *chan, uint16_t *map,
+ unsigned start, unsigned count)
+{
+ map += start;
+
+ if (count & 1) {
+ count &= ~1;
+ BEGIN_RING(chan, RING_3D(VB_ELEMENT_U32), 1);
+ OUT_RING (chan, *map++);
+ }
+ while (count) {
+ unsigned i, nr = MIN2(count, NV04_PFIFO_MAX_PACKET_LEN * 2) / 2;
+
+ BEGIN_RING_NI(chan, RING_3D(VB_ELEMENT_U16), nr);
+ for (i = 0; i < nr; ++i) {
+ OUT_RING(chan, (map[1] << 16) | map[0]);
+ map += 2;
+ }
+ count -= nr * 2;
+ }
+}
+
+static void
+nvc0_draw_elements_inline_u32(struct nouveau_channel *chan, uint32_t *map,
+ unsigned start, unsigned count)
+{
+ map += start;
+
+ while (count) {
+ const unsigned nr = MIN2(count, NV04_PFIFO_MAX_PACKET_LEN);
+
+ BEGIN_RING_NI(chan, RING_3D(VB_ELEMENT_U32), nr);
+ OUT_RINGp (chan, map, nr);
+
+ map += nr;
+ count -= nr;
+ }
+}
+
+static void
+nvc0_draw_elements_inline_u32_short(struct nouveau_channel *chan, uint32_t *map,
+ unsigned start, unsigned count)
+{
+ map += start;
+
+ if (count & 1) {
+ count--;
+ BEGIN_RING(chan, RING_3D(VB_ELEMENT_U32), 1);
+ OUT_RING (chan, *map++);
+ }
+ while (count) {
+ unsigned i, nr = MIN2(count, NV04_PFIFO_MAX_PACKET_LEN * 2) / 2;
+
+ BEGIN_RING_NI(chan, RING_3D(VB_ELEMENT_U16), nr);
+ for (i = 0; i < nr; ++i) {
+ OUT_RING(chan, (map[1] << 16) | map[0]);
+ map += 2;
+ }
+ count -= nr * 2;
+ }
+}
+
+static void
+nvc0_draw_elements(struct nvc0_context *nvc0, boolean shorten,
+ unsigned mode, unsigned start, unsigned count,
+ unsigned instance_count, int32_t index_bias)
+{
+ struct nouveau_channel *chan = nvc0->screen->base.channel;
+ void *data;
+ unsigned prim;
+ const unsigned index_size = nvc0->idxbuf.index_size;
+
+ chan->flush_notify = nvc0_draw_vbo_flush_notify;
+ chan->user_private = nvc0;
+
+ prim = nvc0_prim_gl(mode);
+
+ if (index_bias != nvc0->state.index_bias) {
+ BEGIN_RING(chan, RING_3D(VB_ELEMENT_BASE), 1);
+ OUT_RING (chan, index_bias);
+ nvc0->state.index_bias = index_bias;
+ }
+
+ if (nouveau_resource_mapped_by_gpu(nvc0->idxbuf.buffer)) {
+ struct nv04_resource *res = nv04_resource(nvc0->idxbuf.buffer);
+ unsigned offset = nvc0->idxbuf.offset;
+ unsigned limit = nvc0->idxbuf.buffer->width0 - 1;
+
+ nouveau_buffer_adjust_score(&nvc0->base, res, 1);
+
+ while (instance_count--) {
+ MARK_RING (chan, 11, 4);
+ BEGIN_RING(chan, RING_3D(VERTEX_BEGIN_GL), 1);
+ OUT_RING (chan, mode);
+ BEGIN_RING(chan, RING_3D(INDEX_ARRAY_START_HIGH), 7);
+ OUT_RESRCh(chan, res, offset, NOUVEAU_BO_RD);
+ OUT_RESRCl(chan, res, offset, NOUVEAU_BO_RD);
+ OUT_RESRCh(chan, res, limit, NOUVEAU_BO_RD);
+ OUT_RESRCl(chan, res, limit, NOUVEAU_BO_RD);
+ OUT_RING (chan, index_size >> 1);
+ OUT_RING (chan, start);
+ OUT_RING (chan, count);
+ IMMED_RING(chan, RING_3D(VERTEX_END_GL), 0);
+
+ nvc0_resource_fence(res, NOUVEAU_BO_RD);
+
+ mode |= NVC0_3D_VERTEX_BEGIN_GL_INSTANCE_NEXT;
+ }
+ } else {
+ data = nouveau_resource_map_offset(&nvc0->base,
+ nv04_resource(nvc0->idxbuf.buffer),
+ nvc0->idxbuf.offset, NOUVEAU_BO_RD);
+ if (!data)
+ return;
+
+ while (instance_count--) {
+ BEGIN_RING(chan, RING_3D(VERTEX_BEGIN_GL), 1);
+ OUT_RING (chan, prim);
+ switch (index_size) {
+ case 1:
+ nvc0_draw_elements_inline_u08(chan, data, start, count);
+ break;
+ case 2:
+ nvc0_draw_elements_inline_u16(chan, data, start, count);
+ break;
+ case 4:
+ if (shorten)
+ nvc0_draw_elements_inline_u32_short(chan, data, start, count);
+ else
+ nvc0_draw_elements_inline_u32(chan, data, start, count);
+ break;
+ default:
+ assert(0);
+ return;
+ }
+ IMMED_RING(chan, RING_3D(VERTEX_END_GL), 0);
+
+ prim |= NVC0_3D_VERTEX_BEGIN_GL_INSTANCE_NEXT;
+ }
+ }
+
+ chan->flush_notify = nvc0_default_flush_notify;
+}
+
+void
+nvc0_draw_vbo(struct pipe_context *pipe, const struct pipe_draw_info *info)
+{
+ struct nvc0_context *nvc0 = nvc0_context(pipe);
+ struct nouveau_channel *chan = nvc0->screen->base.channel;
+
+ /* For picking only a few vertices from a large user buffer, push is better,
+ * if index count is larger and we expect repeated vertices, suggest upload.
+ */
+ nvc0->vbo_push_hint = /* the 64 is heuristic */
+ !(info->indexed &&
+ ((info->max_index - info->min_index + 64) < info->count));
+
+ nvc0->vbo_min_index = info->min_index;
+ nvc0->vbo_max_index = info->max_index;
+
+ if (nvc0->vbo_push_hint != !!nvc0->vbo_fifo)
+ nvc0->dirty |= NVC0_NEW_ARRAYS;
+
+ if (nvc0->vbo_user && !(nvc0->dirty & (NVC0_NEW_VERTEX | NVC0_NEW_ARRAYS)))
+ nvc0_update_user_vbufs(nvc0);
+
+ nvc0_state_validate(nvc0);
+
+ if (nvc0->vbo_fifo) {
+ nvc0_push_vbo(nvc0, info);
+ return;
+ }
+
+ if (nvc0->state.instance_base != info->start_instance) {
+ nvc0->state.instance_base = info->start_instance;
+ /* NOTE: this does not affect the shader input, should it ? */
+ BEGIN_RING(chan, RING_3D(VB_INSTANCE_BASE), 1);
+ OUT_RING (chan, info->start_instance);
+ }
+
+ if (nvc0->base.vbo_dirty) {
+ BEGIN_RING(chan, RING_3D(VERTEX_ARRAY_FLUSH), 1);
+ OUT_RING (chan, 0);
+ nvc0->base.vbo_dirty = FALSE;
+ }
+
+ if (!info->indexed) {
+ nvc0_draw_arrays(nvc0,
+ info->mode, info->start, info->count,
+ info->instance_count);
+ } else {
+ boolean shorten = info->max_index <= 65535;
+
+ assert(nvc0->idxbuf.buffer);
+
+ if (info->primitive_restart != nvc0->state.prim_restart) {
+ if (info->primitive_restart) {
+ BEGIN_RING(chan, RING_3D(PRIM_RESTART_ENABLE), 2);
+ OUT_RING (chan, 1);
+ OUT_RING (chan, info->restart_index);
+
+ if (info->restart_index > 65535)
+ shorten = FALSE;
+ } else {
+ IMMED_RING(chan, RING_3D(PRIM_RESTART_ENABLE), 0);
+ }
+ nvc0->state.prim_restart = info->primitive_restart;
+ } else
+ if (info->primitive_restart) {
+ BEGIN_RING(chan, RING_3D(PRIM_RESTART_INDEX), 1);
+ OUT_RING (chan, info->restart_index);
+
+ if (info->restart_index > 65535)
+ shorten = FALSE;
+ }
+
+ nvc0_draw_elements(nvc0, shorten,
+ info->mode, info->start, info->count,
+ info->instance_count, info->index_bias);
+ }
+
+ nvc0_release_user_vbufs(nvc0);
+}
diff --git a/src/gallium/drivers/nvc0/nvc0_winsys.h b/src/gallium/drivers/nvc0/nvc0_winsys.h
new file mode 100644
index 00000000000..6519ce8e19f
--- /dev/null
+++ b/src/gallium/drivers/nvc0/nvc0_winsys.h
@@ -0,0 +1,120 @@
+
+#ifndef __NVC0_WINSYS_H__
+#define __NVC0_WINSYS_H__
+
+#include <stdint.h>
+#include <unistd.h>
+#include "pipe/p_defines.h"
+
+#include "nouveau/nouveau_bo.h"
+#include "nouveau/nouveau_channel.h"
+#include "nouveau/nouveau_grobj.h"
+#include "nouveau/nouveau_device.h"
+#include "nouveau/nouveau_resource.h"
+#include "nouveau/nouveau_pushbuf.h"
+#include "nouveau/nouveau_reloc.h"
+
+#include "nvc0_resource.h" /* OUT_RESRC */
+
+#ifndef NV04_PFIFO_MAX_PACKET_LEN
+#define NV04_PFIFO_MAX_PACKET_LEN 2047
+#endif
+
+#define NVC0_SUBCH_3D 1
+#define NVC0_SUBCH_2D 2
+#define NVC0_SUBCH_MF 3
+
+#define NVC0_MF_(n) NVC0_M2MF_##n
+
+#define RING_3D(n) ((NVC0_SUBCH_3D << 13) | (NVC0_3D_##n >> 2))
+#define RING_2D(n) ((NVC0_SUBCH_2D << 13) | (NVC0_2D_##n >> 2))
+#define RING_MF(n) ((NVC0_SUBCH_MF << 13) | (NVC0_MF_(n) >> 2))
+
+#define RING_3D_(m) ((NVC0_SUBCH_3D << 13) | ((m) >> 2))
+#define RING_2D_(m) ((NVC0_SUBCH_2D << 13) | ((m) >> 2))
+#define RING_MF_(m) ((NVC0_SUBCH_MF << 13) | ((m) >> 2))
+
+#define RING_GR(gr, m) (((gr)->subc << 13) | ((m) >> 2))
+
+int nouveau_pushbuf_flush(struct nouveau_channel *, unsigned min);
+
+static inline uint32_t
+nouveau_bo_tile_layout(struct nouveau_bo *bo)
+{
+ return bo->tile_flags & NOUVEAU_BO_TILE_LAYOUT_MASK;
+}
+
+static INLINE void
+nouveau_bo_validate(struct nouveau_channel *chan,
+ struct nouveau_bo *bo, unsigned flags)
+{
+ nouveau_reloc_emit(chan, NULL, 0, NULL, bo, 0, 0, flags, 0, 0);
+}
+
+/* incremental methods */
+static INLINE void
+BEGIN_RING(struct nouveau_channel *chan, uint32_t mthd, unsigned size)
+{
+ WAIT_RING(chan, size + 1);
+ OUT_RING (chan, (0x2 << 28) | (size << 16) | mthd);
+}
+
+/* non-incremental */
+static INLINE void
+BEGIN_RING_NI(struct nouveau_channel *chan, uint32_t mthd, unsigned size)
+{
+ WAIT_RING(chan, size + 1);
+ OUT_RING (chan, (0x6 << 28) | (size << 16) | mthd);
+}
+
+/* increment-once */
+static INLINE void
+BEGIN_RING_1I(struct nouveau_channel *chan, uint32_t mthd, unsigned size)
+{
+ WAIT_RING(chan, size + 1);
+ OUT_RING (chan, (0xa << 28) | (size << 16) | mthd);
+}
+
+/* inline-data */
+static INLINE void
+IMMED_RING(struct nouveau_channel *chan, uint32_t mthd, unsigned data)
+{
+ WAIT_RING(chan, 1);
+ OUT_RING (chan, (0x8 << 28) | (data << 16) | mthd);
+}
+
+static INLINE int
+OUT_RESRCh(struct nouveau_channel *chan, struct nv04_resource *res,
+ unsigned delta, unsigned flags)
+{
+ return OUT_RELOCh(chan, res->bo, res->offset + delta, res->domain | flags);
+}
+
+static INLINE int
+OUT_RESRCl(struct nouveau_channel *chan, struct nv04_resource *res,
+ unsigned delta, unsigned flags)
+{
+ if (flags & NOUVEAU_BO_WR)
+ res->status |= NOUVEAU_BUFFER_STATUS_GPU_WRITING;
+ return OUT_RELOCl(chan, res->bo, res->offset + delta, res->domain | flags);
+}
+
+static INLINE void
+BIND_RING(struct nouveau_channel *chan, struct nouveau_grobj *gr, unsigned s)
+{
+ struct nouveau_subchannel *subc = &gr->channel->subc[s];
+
+ assert(s < 8);
+ if (subc->gr) {
+ assert(subc->gr->bound != NOUVEAU_GROBJ_BOUND_EXPLICIT);
+ subc->gr->bound = NOUVEAU_GROBJ_UNBOUND;
+ }
+ subc->gr = gr;
+ subc->gr->subc = s;
+ subc->gr->bound = NOUVEAU_GROBJ_BOUND_EXPLICIT;
+
+ BEGIN_RING(chan, RING_GR(gr, 0x0000), 1);
+ OUT_RING (chan, gr->grclass);
+}
+
+#endif
diff --git a/src/gallium/drivers/nvfx/Makefile b/src/gallium/drivers/nvfx/Makefile
index 46bb0823881..a3b76ac61b1 100644
--- a/src/gallium/drivers/nvfx/Makefile
+++ b/src/gallium/drivers/nvfx/Makefile
@@ -27,6 +27,7 @@ C_SOURCES = \
nvfx_vertprog.c
LIBRARY_INCLUDES = \
+ $(LIBDRM_CFLAGS) \
-I$(TOP)/src/gallium/drivers/nouveau/include
include ../../Makefile.template
diff --git a/src/gallium/drivers/nvfx/nv04_2d.c b/src/gallium/drivers/nvfx/nv04_2d.c
index e0e65e7a87f..e2fadd33e1c 100644
--- a/src/gallium/drivers/nvfx/nv04_2d.c
+++ b/src/gallium/drivers/nvfx/nv04_2d.c
@@ -34,11 +34,11 @@
#include <stdio.h>
#include <stdint.h>
#include <nouveau/nouveau_device.h>
-#include <nouveau/nouveau_pushbuf.h>
#include <nouveau/nouveau_channel.h>
#include <nouveau/nouveau_bo.h>
#include <nouveau/nouveau_notifier.h>
#include <nouveau/nouveau_grobj.h>
+#include <nouveau/nv04_pushbuf.h>
#include "nv04_2d.h"
#include "nouveau/nv_object.xml.h"
diff --git a/src/gallium/drivers/nvfx/nv30_fragtex.c b/src/gallium/drivers/nvfx/nv30_fragtex.c
index 951fb202ed4..b609891d316 100644
--- a/src/gallium/drivers/nvfx/nv30_fragtex.c
+++ b/src/gallium/drivers/nvfx/nv30_fragtex.c
@@ -71,6 +71,7 @@ nv30_fragtex_set(struct nvfx_context *nvfx, int unit)
struct nvfx_sampler_view* sv = (struct nvfx_sampler_view*)nvfx->fragment_sampler_views[unit];
struct nouveau_bo *bo = ((struct nvfx_miptree *)sv->base.texture)->base.bo;
struct nouveau_channel* chan = nvfx->screen->base.channel;
+ struct nouveau_grobj *eng3d = nvfx->screen->eng3d;
unsigned txf;
unsigned tex_flags = NOUVEAU_BO_VRAM | NOUVEAU_BO_GART | NOUVEAU_BO_RD;
unsigned use_rect;
@@ -102,7 +103,7 @@ nv30_fragtex_set(struct nvfx_context *nvfx, int unit)
txf = sv->u.nv30.fmt[ps->compare + (use_rect ? 2 : 0)];
MARK_RING(chan, 9, 2);
- OUT_RING(chan, RING_3D(NV30_3D_TEX_OFFSET(unit), 8));
+ BEGIN_RING(chan, eng3d, NV30_3D_TEX_OFFSET(unit), 8);
OUT_RELOC(chan, bo, sv->offset, tex_flags | NOUVEAU_BO_LOW, 0, 0);
OUT_RELOC(chan, bo, txf,
tex_flags | NOUVEAU_BO_OR,
diff --git a/src/gallium/drivers/nvfx/nv40_fragtex.c b/src/gallium/drivers/nvfx/nv40_fragtex.c
index e8ab403f722..563183d9d0c 100644
--- a/src/gallium/drivers/nvfx/nv40_fragtex.c
+++ b/src/gallium/drivers/nvfx/nv40_fragtex.c
@@ -76,6 +76,7 @@ void
nv40_fragtex_set(struct nvfx_context *nvfx, int unit)
{
struct nouveau_channel* chan = nvfx->screen->base.channel;
+ struct nouveau_grobj *eng3d = nvfx->screen->eng3d;
struct nvfx_sampler_state *ps = nvfx->tex_sampler[unit];
struct nvfx_sampler_view* sv = (struct nvfx_sampler_view*)nvfx->fragment_sampler_views[unit];
struct nouveau_bo *bo = ((struct nvfx_miptree *)sv->base.texture)->base.bo;
@@ -87,7 +88,7 @@ nv40_fragtex_set(struct nvfx_context *nvfx, int unit)
txf = sv->u.nv40.fmt[ps->compare] | ps->fmt;
MARK_RING(chan, 11, 2);
- OUT_RING(chan, RING_3D(NV30_3D_TEX_OFFSET(unit), 8));
+ BEGIN_RING(chan, eng3d, NV30_3D_TEX_OFFSET(unit), 8);
OUT_RELOC(chan, bo, sv->offset, tex_flags | NOUVEAU_BO_LOW, 0, 0);
OUT_RELOC(chan, bo, txf, tex_flags | NOUVEAU_BO_OR,
NV30_3D_TEX_FORMAT_DMA0, NV30_3D_TEX_FORMAT_DMA1);
@@ -97,7 +98,7 @@ nv40_fragtex_set(struct nvfx_context *nvfx, int unit)
OUT_RING(chan, ps->filt | sv->filt);
OUT_RING(chan, sv->npot_size);
OUT_RING(chan, ps->bcol);
- OUT_RING(chan, RING_3D(NV40_3D_TEX_SIZE1(unit), 1));
+ BEGIN_RING(chan, eng3d, NV40_3D_TEX_SIZE1(unit), 1);
OUT_RING(chan, sv->u.nv40.npot_size2);
nvfx->hw_txf[unit] = txf;
diff --git a/src/gallium/drivers/nvfx/nvfx_context.c b/src/gallium/drivers/nvfx/nvfx_context.c
index 95834d23273..2bcb93d93e3 100644
--- a/src/gallium/drivers/nvfx/nvfx_context.c
+++ b/src/gallium/drivers/nvfx/nvfx_context.c
@@ -7,21 +7,22 @@
#include "nvfx_resource.h"
static void
-nvfx_flush(struct pipe_context *pipe, unsigned flags,
+nvfx_flush(struct pipe_context *pipe,
struct pipe_fence_handle **fence)
{
struct nvfx_context *nvfx = nvfx_context(pipe);
struct nvfx_screen *screen = nvfx->screen;
struct nouveau_channel *chan = screen->base.channel;
+ struct nouveau_grobj *eng3d = screen->eng3d;
/* XXX: we need to actually be intelligent here */
- if (flags & PIPE_FLUSH_TEXTURE_CACHE) {
- WAIT_RING(chan, 4);
- OUT_RING(chan, RING_3D(0x1fd8, 1));
+ /* XXX This flag wasn't set by the state tracker anyway. */
+ /*if (flags & PIPE_FLUSH_TEXTURE_CACHE) {
+ BEGIN_RING(chan, eng3d, 0x1fd8, 1);
OUT_RING(chan, 2);
- OUT_RING(chan, RING_3D(0x1fd8, 1));
+ BEGIN_RING(chan, eng3d, 0x1fd8, 1);
OUT_RING(chan, 1);
- }
+ }*/
FIRE_RING(chan);
if (fence)
diff --git a/src/gallium/drivers/nvfx/nvfx_context.h b/src/gallium/drivers/nvfx/nvfx_context.h
index 6ef2a6945d7..dad912b2aee 100644
--- a/src/gallium/drivers/nvfx/nvfx_context.h
+++ b/src/gallium/drivers/nvfx/nvfx_context.h
@@ -18,6 +18,7 @@
#include "nouveau/nouveau_winsys.h"
#include "nouveau/nouveau_gldefs.h"
+#include "nouveau/nouveau_resource.h"
#include "nv30-40_3d.xml.h"
#include "nvfx_state.h"
@@ -339,30 +340,31 @@ extern void nvfx_init_vertprog_functions(struct nvfx_context *nvfx);
/* nvfx_push.c */
extern void nvfx_push_vbo(struct pipe_context *pipe, const struct pipe_draw_info *info);
-/* must WAIT_RING(chan, ncomp + 1) or equivalent beforehand! */
-static inline void nvfx_emit_vtx_attr(struct nouveau_channel* chan, unsigned attrib, const float* v, unsigned ncomp)
+static inline void nvfx_emit_vtx_attr(struct nouveau_channel* chan,
+ struct nouveau_grobj *eng3d, unsigned attrib, const float* v,
+ unsigned ncomp)
{
switch (ncomp) {
case 4:
- OUT_RING(chan, RING_3D(NV30_3D_VTX_ATTR_4F_X(attrib), 4));
+ BEGIN_RING(chan, eng3d, NV30_3D_VTX_ATTR_4F_X(attrib), 4);
OUT_RING(chan, fui(v[0]));
OUT_RING(chan, fui(v[1]));
OUT_RING(chan, fui(v[2]));
OUT_RING(chan, fui(v[3]));
break;
case 3:
- OUT_RING(chan, RING_3D(NV30_3D_VTX_ATTR_3F_X(attrib), 3));
+ BEGIN_RING(chan, eng3d, NV30_3D_VTX_ATTR_3F_X(attrib), 3);
OUT_RING(chan, fui(v[0]));
OUT_RING(chan, fui(v[1]));
OUT_RING(chan, fui(v[2]));
break;
case 2:
- OUT_RING(chan, RING_3D(NV30_3D_VTX_ATTR_2F_X(attrib), 2));
+ BEGIN_RING(chan, eng3d, NV30_3D_VTX_ATTR_2F_X(attrib), 2);
OUT_RING(chan, fui(v[0]));
OUT_RING(chan, fui(v[1]));
break;
case 1:
- OUT_RING(chan, RING_3D(NV30_3D_VTX_ATTR_1F(attrib), 1));
+ BEGIN_RING(chan, eng3d, NV30_3D_VTX_ATTR_1F(attrib), 1);
OUT_RING(chan, fui(v[0]));
break;
}
diff --git a/src/gallium/drivers/nvfx/nvfx_draw.c b/src/gallium/drivers/nvfx/nvfx_draw.c
index 61f888a8ea2..81f1ec485d3 100644
--- a/src/gallium/drivers/nvfx/nvfx_draw.c
+++ b/src/gallium/drivers/nvfx/nvfx_draw.c
@@ -28,10 +28,10 @@ nvfx_render_flush(struct draw_stage *stage, unsigned flags)
struct nvfx_render_stage *rs = nvfx_render_stage(stage);
struct nvfx_context *nvfx = rs->nvfx;
struct nouveau_channel *chan = nvfx->screen->base.channel;
+ struct nouveau_grobj *eng3d = nvfx->screen->eng3d;
if (rs->prim != NV30_3D_VERTEX_BEGIN_END_STOP) {
- assert(AVAIL_RING(chan) >= 2);
- OUT_RING(chan, RING_3D(NV30_3D_VERTEX_BEGIN_END, 1));
+ BEGIN_RING(chan, eng3d, NV30_3D_VERTEX_BEGIN_END, 1);
OUT_RING(chan, NV30_3D_VERTEX_BEGIN_END_STOP);
rs->prim = NV30_3D_VERTEX_BEGIN_END_STOP;
}
@@ -46,6 +46,7 @@ nvfx_render_prim(struct draw_stage *stage, struct prim_header *prim,
struct nvfx_screen *screen = nvfx->screen;
struct nouveau_channel *chan = screen->base.channel;
+ struct nouveau_grobj *eng3d = screen->eng3d;
boolean no_elements = nvfx->vertprog->draw_no_elements;
unsigned num_attribs = nvfx->vertprog->draw_elements;
@@ -63,7 +64,7 @@ nvfx_render_prim(struct draw_stage *stage, struct prim_header *prim,
/* Switch primitive modes if necessary */
if (rs->prim != mode) {
if (rs->prim != NV30_3D_VERTEX_BEGIN_END_STOP) {
- OUT_RING(chan, RING_3D(NV30_3D_VERTEX_BEGIN_END, 1));
+ BEGIN_RING(chan, eng3d, NV30_3D_VERTEX_BEGIN_END, 1);
OUT_RING(chan, NV30_3D_VERTEX_BEGIN_END_STOP);
}
@@ -74,23 +75,24 @@ nvfx_render_prim(struct draw_stage *stage, struct prim_header *prim,
int i;
for(i = 0; i < 32; ++i)
{
- OUT_RING(chan, RING_3D(0x1dac, 1));
+ BEGIN_RING(chan, eng3d, 0x1dac, 1);
OUT_RING(chan, 0);
}
}
- OUT_RING(chan, RING_3D(NV30_3D_VERTEX_BEGIN_END, 1));
+ BEGIN_RING(chan, eng3d, NV30_3D_VERTEX_BEGIN_END, 1);
OUT_RING (chan, mode);
rs->prim = mode;
}
- OUT_RING(chan, RING_3D_NI(NV30_3D_VERTEX_DATA, num_attribs * 4 * count));
if(no_elements) {
+ BEGIN_RING_NI(chan, eng3d, NV30_3D_VERTEX_DATA, 4);
OUT_RING(chan, 0);
OUT_RING(chan, 0);
OUT_RING(chan, 0);
OUT_RING(chan, 0);
} else {
+ BEGIN_RING_NI(chan, eng3d, NV30_3D_VERTEX_DATA, num_attribs * 4 * count);
for (unsigned i = 0; i < count; ++i)
{
struct vertex_header* v = prim->v[i];
diff --git a/src/gallium/drivers/nvfx/nvfx_fragprog.c b/src/gallium/drivers/nvfx/nvfx_fragprog.c
index 13e8beed479..dbd7c773465 100644
--- a/src/gallium/drivers/nvfx/nvfx_fragprog.c
+++ b/src/gallium/drivers/nvfx/nvfx_fragprog.c
@@ -1189,12 +1189,12 @@ out_err:
static inline void
nvfx_fp_memcpy(void* dst, const void* src, size_t len)
{
-#ifndef WORDS_BIGENDIAN
+#ifndef PIPE_ARCH_BIG_ENDIAN
memcpy(dst, src, len);
#else
size_t i;
for(i = 0; i < len; i += 4) {
- uint32_t v = (uint32_t*)((char*)src + i);
+ uint32_t v = *(uint32_t*)((char*)src + i);
*(uint32_t*)((char*)dst + i) = (v >> 16) | (v << 16);
}
#endif
@@ -1233,6 +1233,7 @@ void
nvfx_fragprog_validate(struct nvfx_context *nvfx)
{
struct nouveau_channel* chan = nvfx->screen->base.channel;
+ struct nouveau_grobj *eng3d = nvfx->screen->eng3d;
struct nvfx_pipe_fragment_program *pfp = nvfx->fragprog;
struct nvfx_vertex_program* vp;
@@ -1499,17 +1500,17 @@ update:
nvfx->hw_fragprog = fp;
MARK_RING(chan, 8, 1);
- OUT_RING(chan, RING_3D(NV30_3D_FP_ACTIVE_PROGRAM, 1));
+ BEGIN_RING(chan, eng3d, NV30_3D_FP_ACTIVE_PROGRAM, 1);
OUT_RELOC(chan, fp->fpbo->bo, offset, NOUVEAU_BO_VRAM |
NOUVEAU_BO_GART | NOUVEAU_BO_RD | NOUVEAU_BO_LOW |
NOUVEAU_BO_OR, NV30_3D_FP_ACTIVE_PROGRAM_DMA0,
NV30_3D_FP_ACTIVE_PROGRAM_DMA1);
- OUT_RING(chan, RING_3D(NV30_3D_FP_CONTROL, 1));
+ BEGIN_RING(chan, eng3d, NV30_3D_FP_CONTROL, 1);
OUT_RING(chan, fp->fp_control);
if(!nvfx->is_nv4x) {
- OUT_RING(chan, RING_3D(NV30_3D_FP_REG_CONTROL, 1));
+ BEGIN_RING(chan, eng3d, NV30_3D_FP_REG_CONTROL, 1);
OUT_RING(chan, (1<<16)|0x4);
- OUT_RING(chan, RING_3D(NV30_3D_TEX_UNITS_ENABLE, 1));
+ BEGIN_RING(chan, eng3d, NV30_3D_TEX_UNITS_ENABLE, 1);
OUT_RING(chan, fp->samplers);
}
}
@@ -1518,8 +1519,7 @@ update:
unsigned pointsprite_control = fp->point_sprite_control | nvfx->rasterizer->pipe.point_quad_rasterization;
if(pointsprite_control != nvfx->hw_pointsprite_control)
{
- WAIT_RING(chan, 2);
- OUT_RING(chan, RING_3D(NV30_3D_POINT_SPRITE, 1));
+ BEGIN_RING(chan, eng3d, NV30_3D_POINT_SPRITE, 1);
OUT_RING(chan, pointsprite_control);
nvfx->hw_pointsprite_control = pointsprite_control;
}
diff --git a/src/gallium/drivers/nvfx/nvfx_fragtex.c b/src/gallium/drivers/nvfx/nvfx_fragtex.c
index fd0aff6a1a0..1c4901df0e2 100644
--- a/src/gallium/drivers/nvfx/nvfx_fragtex.c
+++ b/src/gallium/drivers/nvfx/nvfx_fragtex.c
@@ -177,6 +177,7 @@ void
nvfx_fragtex_validate(struct nvfx_context *nvfx)
{
struct nouveau_channel* chan = nvfx->screen->base.channel;
+ struct nouveau_grobj *eng3d = nvfx->screen->eng3d;
unsigned samplers, unit;
samplers = nvfx->dirty_samplers;
@@ -197,9 +198,8 @@ nvfx_fragtex_validate(struct nvfx_context *nvfx)
else
nv40_fragtex_set(nvfx, unit);
} else {
- WAIT_RING(chan, 2);
/* this is OK for nv40 too */
- OUT_RING(chan, RING_3D(NV30_3D_TEX_ENABLE(unit), 1));
+ BEGIN_RING(chan, eng3d, NV30_3D_TEX_ENABLE(unit), 1);
OUT_RING(chan, 0);
nvfx->hw_samplers &= ~(1 << unit);
}
diff --git a/src/gallium/drivers/nvfx/nvfx_miptree.c b/src/gallium/drivers/nvfx/nvfx_miptree.c
index 8c043b867ba..1be84b90a90 100644
--- a/src/gallium/drivers/nvfx/nvfx_miptree.c
+++ b/src/gallium/drivers/nvfx/nvfx_miptree.c
@@ -138,11 +138,11 @@ nvfx_miptree_create_skeleton(struct pipe_screen *pscreen, const struct pipe_reso
// on our current driver (and the driver too), format support does not depend on geometry, so don't bother computing it
// TODO: may want to revisit this
- if(!pscreen->is_format_supported(pscreen, pt->format, pt->target, 0, PIPE_BIND_RENDER_TARGET, 0))
+ if(!pscreen->is_format_supported(pscreen, pt->format, pt->target, 0, PIPE_BIND_RENDER_TARGET))
mt->base.base.bind &=~ PIPE_BIND_RENDER_TARGET;
- if(!pscreen->is_format_supported(pscreen, pt->format, pt->target, 0, PIPE_BIND_SAMPLER_VIEW, 0))
+ if(!pscreen->is_format_supported(pscreen, pt->format, pt->target, 0, PIPE_BIND_SAMPLER_VIEW))
mt->base.base.bind &=~ PIPE_BIND_SAMPLER_VIEW;
- if(!pscreen->is_format_supported(pscreen, pt->format, pt->target, 0, PIPE_BIND_DEPTH_STENCIL, 0))
+ if(!pscreen->is_format_supported(pscreen, pt->format, pt->target, 0, PIPE_BIND_DEPTH_STENCIL))
mt->base.base.bind &=~ PIPE_BIND_DEPTH_STENCIL;
return mt;
diff --git a/src/gallium/drivers/nvfx/nvfx_push.c b/src/gallium/drivers/nvfx/nvfx_push.c
index ebf47e6ed30..6391741a2e5 100644
--- a/src/gallium/drivers/nvfx/nvfx_push.c
+++ b/src/gallium/drivers/nvfx/nvfx_push.c
@@ -10,6 +10,7 @@
struct push_context {
struct nouveau_channel* chan;
+ struct nouveau_grobj *eng3d;
void *idxbuf;
int32_t idxbias;
@@ -27,9 +28,10 @@ static void
emit_edgeflag(void *priv, boolean enabled)
{
struct push_context* ctx = priv;
+ struct nouveau_grobj *eng3d = ctx->eng3d;
struct nouveau_channel *chan = ctx->chan;
- OUT_RING(chan, RING_3D(NV30_3D_EDGEFLAG, 1));
+ BEGIN_RING(chan, eng3d, NV30_3D_EDGEFLAG, 1);
OUT_RING(chan, enabled ? 1 : 0);
}
@@ -37,6 +39,7 @@ static void
emit_vertices_lookup8(void *priv, unsigned start, unsigned count)
{
struct push_context *ctx = priv;
+ struct nouveau_grobj *eng3d = ctx->eng3d;
uint8_t* elts = (uint8_t*)ctx->idxbuf + start;
while(count)
@@ -44,7 +47,7 @@ emit_vertices_lookup8(void *priv, unsigned start, unsigned count)
unsigned push = MIN2(count, ctx->max_vertices_per_packet);
unsigned length = push * ctx->vertex_length;
- OUT_RING(ctx->chan, RING_3D_NI(NV30_3D_VERTEX_DATA, length));
+ BEGIN_RING_NI(ctx->chan, eng3d, NV30_3D_VERTEX_DATA, length);
ctx->translate->run_elts8(ctx->translate, elts, push, 0, ctx->chan->cur);
ctx->chan->cur += length;
@@ -57,6 +60,7 @@ static void
emit_vertices_lookup16(void *priv, unsigned start, unsigned count)
{
struct push_context *ctx = priv;
+ struct nouveau_grobj *eng3d = ctx->eng3d;
uint16_t* elts = (uint16_t*)ctx->idxbuf + start;
while(count)
@@ -64,7 +68,7 @@ emit_vertices_lookup16(void *priv, unsigned start, unsigned count)
unsigned push = MIN2(count, ctx->max_vertices_per_packet);
unsigned length = push * ctx->vertex_length;
- OUT_RING(ctx->chan, RING_3D_NI(NV30_3D_VERTEX_DATA, length));
+ BEGIN_RING_NI(ctx->chan, eng3d, NV30_3D_VERTEX_DATA, length);
ctx->translate->run_elts16(ctx->translate, elts, push, 0, ctx->chan->cur);
ctx->chan->cur += length;
@@ -77,6 +81,7 @@ static void
emit_vertices_lookup32(void *priv, unsigned start, unsigned count)
{
struct push_context *ctx = priv;
+ struct nouveau_grobj *eng3d = ctx->eng3d;
uint32_t* elts = (uint32_t*)ctx->idxbuf + start;
while(count)
@@ -84,7 +89,7 @@ emit_vertices_lookup32(void *priv, unsigned start, unsigned count)
unsigned push = MIN2(count, ctx->max_vertices_per_packet);
unsigned length = push * ctx->vertex_length;
- OUT_RING(ctx->chan, RING_3D_NI(NV30_3D_VERTEX_DATA, length));
+ BEGIN_RING_NI(ctx->chan, eng3d, NV30_3D_VERTEX_DATA, length);
ctx->translate->run_elts(ctx->translate, elts, push, 0, ctx->chan->cur);
ctx->chan->cur += length;
@@ -97,13 +102,14 @@ static void
emit_vertices(void *priv, unsigned start, unsigned count)
{
struct push_context *ctx = priv;
+ struct nouveau_grobj *eng3d = ctx->eng3d;
while(count)
{
unsigned push = MIN2(count, ctx->max_vertices_per_packet);
unsigned length = push * ctx->vertex_length;
- OUT_RING(ctx->chan, RING_3D_NI(NV30_3D_VERTEX_DATA, length));
+ BEGIN_RING_NI(ctx->chan, eng3d, NV30_3D_VERTEX_DATA, length);
ctx->translate->run(ctx->translate, start, push, 0, ctx->chan->cur);
ctx->chan->cur += length;
@@ -116,10 +122,11 @@ static void
emit_ranges(void* priv, unsigned start, unsigned vc, unsigned reg)
{
struct push_context* ctx = priv;
+ struct nouveau_grobj *eng3d = ctx->eng3d;
struct nouveau_channel *chan = ctx->chan;
unsigned nr = (vc & 0xff);
if (nr) {
- OUT_RING(chan, RING_3D(reg, 1));
+ BEGIN_RING(chan, eng3d, reg, 1);
OUT_RING (chan, ((nr - 1) << 24) | start);
start += nr;
}
@@ -130,7 +137,7 @@ emit_ranges(void* priv, unsigned start, unsigned vc, unsigned reg)
nr -= push;
- OUT_RING(chan, RING_3D_NI(reg, push));
+ BEGIN_RING_NI(chan, eng3d, reg, push);
while (push--) {
OUT_RING(chan, ((0x100 - 1) << 24) | start);
start += 0x100;
@@ -154,12 +161,13 @@ static INLINE void
emit_elt8(void* priv, unsigned start, unsigned vc)
{
struct push_context* ctx = priv;
+ struct nouveau_grobj *eng3d = ctx->eng3d;
struct nouveau_channel *chan = ctx->chan;
uint8_t *elts = (uint8_t *)ctx->idxbuf + start;
int idxbias = ctx->idxbias;
if (vc & 1) {
- OUT_RING(chan, RING_3D(NV30_3D_VB_ELEMENT_U32, 1));
+ BEGIN_RING(chan, eng3d, NV30_3D_VB_ELEMENT_U32, 1);
OUT_RING (chan, elts[0]);
elts++; vc--;
}
@@ -168,7 +176,7 @@ emit_elt8(void* priv, unsigned start, unsigned vc)
unsigned i;
unsigned push = MIN2(vc, 2047 * 2);
- OUT_RING(chan, RING_3D_NI(NV30_3D_VB_ELEMENT_U16, push >> 1));
+ BEGIN_RING_NI(chan, eng3d, NV30_3D_VB_ELEMENT_U16, push >> 1);
for (i = 0; i < push; i+=2)
OUT_RING(chan, ((elts[i+1] + idxbias) << 16) | (elts[i] + idxbias));
@@ -181,12 +189,13 @@ static INLINE void
emit_elt16(void* priv, unsigned start, unsigned vc)
{
struct push_context* ctx = priv;
+ struct nouveau_grobj *eng3d = ctx->eng3d;
struct nouveau_channel *chan = ctx->chan;
uint16_t *elts = (uint16_t *)ctx->idxbuf + start;
int idxbias = ctx->idxbias;
if (vc & 1) {
- OUT_RING(chan, RING_3D(NV30_3D_VB_ELEMENT_U32, 1));
+ BEGIN_RING(chan, eng3d, NV30_3D_VB_ELEMENT_U32, 1);
OUT_RING (chan, elts[0]);
elts++; vc--;
}
@@ -195,7 +204,7 @@ emit_elt16(void* priv, unsigned start, unsigned vc)
unsigned i;
unsigned push = MIN2(vc, 2047 * 2);
- OUT_RING(chan, RING_3D_NI(NV30_3D_VB_ELEMENT_U16, push >> 1));
+ BEGIN_RING_NI(chan, eng3d, NV30_3D_VB_ELEMENT_U16, push >> 1);
for (i = 0; i < push; i+=2)
OUT_RING(chan, ((elts[i+1] + idxbias) << 16) | (elts[i] + idxbias));
@@ -208,6 +217,7 @@ static INLINE void
emit_elt32(void* priv, unsigned start, unsigned vc)
{
struct push_context* ctx = priv;
+ struct nouveau_grobj *eng3d = ctx->eng3d;
struct nouveau_channel *chan = ctx->chan;
uint32_t *elts = (uint32_t *)ctx->idxbuf + start;
int idxbias = ctx->idxbias;
@@ -215,8 +225,7 @@ emit_elt32(void* priv, unsigned start, unsigned vc)
while (vc) {
unsigned push = MIN2(vc, 2047);
- OUT_RING(chan, RING_3D_NI(NV30_3D_VB_ELEMENT_U32, push));
- assert(AVAIL_RING(chan) >= push);
+ BEGIN_RING_NI(chan, eng3d, NV30_3D_VB_ELEMENT_U32, push);
if(idxbias)
{
for(unsigned i = 0; i < push; ++i)
@@ -235,6 +244,7 @@ nvfx_push_vbo(struct pipe_context *pipe, const struct pipe_draw_info *info)
{
struct nvfx_context *nvfx = nvfx_context(pipe);
struct nouveau_channel *chan = nvfx->screen->base.channel;
+ struct nouveau_grobj *eng3d = nvfx->screen->eng3d;
struct push_context ctx;
struct util_split_prim s;
unsigned instances_left = info->instance_count;
@@ -251,6 +261,7 @@ nvfx_push_vbo(struct pipe_context *pipe, const struct pipe_draw_info *info)
+ 4; /* potential edgeflag enable/disable */
ctx.chan = nvfx->screen->base.channel;
+ ctx.eng3d = nvfx->screen->eng3d;
ctx.translate = nvfx->vtxelt->translate;
ctx.idxbuf = NULL;
ctx.vertex_length = nvfx->vtxelt->vertex_length;
@@ -333,8 +344,9 @@ nvfx_push_vbo(struct pipe_context *pipe, const struct pipe_draw_info *info)
nvfx->vtxelt->per_instance[i].base.fetch_rgba_float(v, per_instance[i].map, 0, 0);
- WAIT_RING(chan, 5);
- nvfx_emit_vtx_attr(chan, nvfx->vtxelt->per_instance[i].base.idx, v, nvfx->vtxelt->per_instance[i].base.ncomp);
+ nvfx_emit_vtx_attr(chan, eng3d,
+ nvfx->vtxelt->per_instance[i].base.idx, v,
+ nvfx->vtxelt->per_instance[i].base.ncomp);
}
/* per-instance loop */
@@ -374,15 +386,18 @@ nvfx_push_vbo(struct pipe_context *pipe, const struct pipe_draw_info *info)
int i;
for(i = 0; i < 32; ++i)
{
- OUT_RING(chan, RING_3D(0x1dac, 1));
+ BEGIN_RING(chan, eng3d,
+ 0x1dac, 1);
OUT_RING(chan, 0);
}
}
- OUT_RING(chan, RING_3D(NV30_3D_VERTEX_BEGIN_END, 1));
+ BEGIN_RING(chan, eng3d,
+ NV30_3D_VERTEX_BEGIN_END, 1);
OUT_RING(chan, hw_mode);
done = util_split_prim_next(&s, max_verts);
- OUT_RING(chan, RING_3D(NV30_3D_VERTEX_BEGIN_END, 1));
+ BEGIN_RING(chan, eng3d,
+ NV30_3D_VERTEX_BEGIN_END, 1);
OUT_RING(chan, 0);
if(done)
@@ -406,8 +421,10 @@ nvfx_push_vbo(struct pipe_context *pipe, const struct pipe_draw_info *info)
per_instance[i].step = 0;
nvfx->vtxelt->per_instance[i].base.fetch_rgba_float(v, per_instance[i].map, 0, 0);
- WAIT_RING(chan, 5);
- nvfx_emit_vtx_attr(chan, nvfx->vtxelt->per_instance[i].base.idx, v, nvfx->vtxelt->per_instance[i].base.ncomp);
+ nvfx_emit_vtx_attr(chan, eng3d,
+ nvfx->vtxelt->per_instance[i].base.idx,
+ v,
+ nvfx->vtxelt->per_instance[i].base.ncomp);
}
}
}
diff --git a/src/gallium/drivers/nvfx/nvfx_query.c b/src/gallium/drivers/nvfx/nvfx_query.c
index 3935ffd7f92..3cd6bf1e477 100644
--- a/src/gallium/drivers/nvfx/nvfx_query.c
+++ b/src/gallium/drivers/nvfx/nvfx_query.c
@@ -49,6 +49,7 @@ nvfx_query_begin(struct pipe_context *pipe, struct pipe_query *pq)
struct nvfx_query *q = nvfx_query(pq);
struct nvfx_screen *screen = nvfx->screen;
struct nouveau_channel *chan = screen->base.channel;
+ struct nouveau_grobj *eng3d = screen->eng3d;
uint64_t tmp;
assert(!nvfx->query);
@@ -72,10 +73,9 @@ nvfx_query_begin(struct pipe_context *pipe, struct pipe_query *pq)
nouveau_notifier_reset(nvfx->screen->query, q->object->start);
- WAIT_RING(chan, 4);
- OUT_RING(chan, RING_3D(NV30_3D_QUERY_RESET, 1));
+ BEGIN_RING(chan, eng3d, NV30_3D_QUERY_RESET, 1);
OUT_RING(chan, 1);
- OUT_RING(chan, RING_3D(NV30_3D_QUERY_ENABLE, 1));
+ BEGIN_RING(chan, eng3d, NV30_3D_QUERY_ENABLE, 1);
OUT_RING(chan, 1);
q->ready = FALSE;
@@ -88,15 +88,15 @@ nvfx_query_end(struct pipe_context *pipe, struct pipe_query *pq)
{
struct nvfx_context *nvfx = nvfx_context(pipe);
struct nouveau_channel *chan = nvfx->screen->base.channel;
+ struct nouveau_grobj *eng3d = nvfx->screen->eng3d;
struct nvfx_query *q = nvfx_query(pq);
assert(nvfx->query == pq);
- WAIT_RING(chan, 4);
- OUT_RING(chan, RING_3D(NV30_3D_QUERY_GET, 1));
+ BEGIN_RING(chan, eng3d, NV30_3D_QUERY_GET, 1);
OUT_RING (chan, (0x01 << NV30_3D_QUERY_GET_UNK24__SHIFT) |
((q->object->start * 32) << NV30_3D_QUERY_GET_OFFSET__SHIFT));
- OUT_RING(chan, RING_3D(NV30_3D_QUERY_ENABLE, 1));
+ BEGIN_RING(chan, eng3d, NV30_3D_QUERY_ENABLE, 1);
OUT_RING(chan, 0);
FIRE_RING(chan);
diff --git a/src/gallium/drivers/nvfx/nvfx_resource.c b/src/gallium/drivers/nvfx/nvfx_resource.c
index c60a7bb8b93..42e77c53621 100644
--- a/src/gallium/drivers/nvfx/nvfx_resource.c
+++ b/src/gallium/drivers/nvfx/nvfx_resource.c
@@ -4,13 +4,6 @@
#include "nvfx_resource.h"
#include "nouveau/nouveau_screen.h"
-static unsigned int
-nvfx_resource_is_referenced(struct pipe_context *pipe,
- struct pipe_resource *pr,
- unsigned level, int layer)
-{
- return !!nouveau_reference_flags(nvfx_resource(pr)->bo);
-}
static struct pipe_resource *
nvfx_resource_create(struct pipe_screen *screen,
@@ -58,8 +51,6 @@ nvfx_resource_get_handle(struct pipe_screen *pscreen,
void
nvfx_init_resource_functions(struct pipe_context *pipe)
{
- pipe->is_resource_referenced = nvfx_resource_is_referenced;
-
pipe->create_surface = nvfx_miptree_surface_new;
pipe->surface_destroy = nvfx_miptree_surface_del;
}
diff --git a/src/gallium/drivers/nvfx/nvfx_screen.c b/src/gallium/drivers/nvfx/nvfx_screen.c
index 92e1d330907..9e6b9d6ef8f 100644
--- a/src/gallium/drivers/nvfx/nvfx_screen.c
+++ b/src/gallium/drivers/nvfx/nvfx_screen.c
@@ -202,7 +202,7 @@ nvfx_screen_is_format_supported(struct pipe_screen *pscreen,
enum pipe_format format,
enum pipe_texture_target target,
unsigned sample_count,
- unsigned bind, unsigned geom_flags)
+ unsigned bind)
{
struct nvfx_screen *screen = nvfx_screen(pscreen);
@@ -301,98 +301,100 @@ nvfx_screen_destroy(struct pipe_screen *pscreen)
static void nv30_screen_init(struct nvfx_screen *screen)
{
struct nouveau_channel *chan = screen->base.channel;
+ struct nouveau_grobj *eng3d = screen->eng3d;
int i;
/* TODO: perhaps we should do some of this on nv40 too? */
for (i=1; i<8; i++) {
- OUT_RING(chan, RING_3D(NV30_3D_VIEWPORT_CLIP_HORIZ(i), 1));
+ BEGIN_RING(chan, eng3d, NV30_3D_VIEWPORT_CLIP_HORIZ(i), 1);
OUT_RING(chan, 0);
- OUT_RING(chan, RING_3D(NV30_3D_VIEWPORT_CLIP_VERT(i), 1));
+ BEGIN_RING(chan, eng3d, NV30_3D_VIEWPORT_CLIP_VERT(i), 1);
OUT_RING(chan, 0);
}
- OUT_RING(chan, RING_3D(0x220, 1));
+ BEGIN_RING(chan, eng3d, 0x220, 1);
OUT_RING(chan, 1);
- OUT_RING(chan, RING_3D(0x03b0, 1));
+ BEGIN_RING(chan, eng3d, 0x03b0, 1);
OUT_RING(chan, 0x00100000);
- OUT_RING(chan, RING_3D(0x1454, 1));
+ BEGIN_RING(chan, eng3d, 0x1454, 1);
OUT_RING(chan, 0);
- OUT_RING(chan, RING_3D(0x1d80, 1));
+ BEGIN_RING(chan, eng3d, 0x1d80, 1);
OUT_RING(chan, 3);
- OUT_RING(chan, RING_3D(0x1450, 1));
+ BEGIN_RING(chan, eng3d, 0x1450, 1);
OUT_RING(chan, 0x00030004);
/* NEW */
- OUT_RING(chan, RING_3D(0x1e98, 1));
+ BEGIN_RING(chan, eng3d, 0x1e98, 1);
OUT_RING(chan, 0);
- OUT_RING(chan, RING_3D(0x17e0, 3));
+ BEGIN_RING(chan, eng3d, 0x17e0, 3);
OUT_RING(chan, fui(0.0));
OUT_RING(chan, fui(0.0));
OUT_RING(chan, fui(1.0));
- OUT_RING(chan, RING_3D(0x1f80, 16));
+ BEGIN_RING(chan, eng3d, 0x1f80, 16);
for (i=0; i<16; i++) {
OUT_RING(chan, (i==8) ? 0x0000ffff : 0);
}
- OUT_RING(chan, RING_3D(0x120, 3));
+ BEGIN_RING(chan, eng3d, 0x120, 3);
OUT_RING(chan, 0);
OUT_RING(chan, 1);
OUT_RING(chan, 2);
- OUT_RING(chan, RING_3D(0x1d88, 1));
+ BEGIN_RING(chan, eng3d, 0x1d88, 1);
OUT_RING(chan, 0x00001200);
- OUT_RING(chan, RING_3D(NV30_3D_RC_ENABLE, 1));
+ BEGIN_RING(chan, eng3d, NV30_3D_RC_ENABLE, 1);
OUT_RING(chan, 0);
- OUT_RING(chan, RING_3D(NV30_3D_DEPTH_RANGE_NEAR, 2));
+ BEGIN_RING(chan, eng3d, NV30_3D_DEPTH_RANGE_NEAR, 2);
OUT_RING(chan, fui(0.0));
OUT_RING(chan, fui(1.0));
- OUT_RING(chan, RING_3D(NV30_3D_MULTISAMPLE_CONTROL, 1));
+ BEGIN_RING(chan, eng3d, NV30_3D_MULTISAMPLE_CONTROL, 1);
OUT_RING(chan, 0xffff0000);
/* enables use of vp rather than fixed-function somehow */
- OUT_RING(chan, RING_3D(0x1e94, 1));
+ BEGIN_RING(chan, eng3d, 0x1e94, 1);
OUT_RING(chan, 0x13);
}
static void nv40_screen_init(struct nvfx_screen *screen)
{
struct nouveau_channel *chan = screen->base.channel;
+ struct nouveau_grobj *eng3d = screen->eng3d;
- OUT_RING(chan, RING_3D(NV40_3D_DMA_COLOR2, 2));
+ BEGIN_RING(chan, eng3d, NV40_3D_DMA_COLOR2, 2);
OUT_RING(chan, screen->base.channel->vram->handle);
OUT_RING(chan, screen->base.channel->vram->handle);
- OUT_RING(chan, RING_3D(0x1450, 1));
+ BEGIN_RING(chan, eng3d, 0x1450, 1);
OUT_RING(chan, 0x00000004);
- OUT_RING(chan, RING_3D(0x1ea4, 3));
+ BEGIN_RING(chan, eng3d, 0x1ea4, 3);
OUT_RING(chan, 0x00000010);
OUT_RING(chan, 0x01000100);
OUT_RING(chan, 0xff800006);
/* vtxprog output routing */
- OUT_RING(chan, RING_3D(0x1fc4, 1));
+ BEGIN_RING(chan, eng3d, 0x1fc4, 1);
OUT_RING(chan, 0x06144321);
- OUT_RING(chan, RING_3D(0x1fc8, 2));
+ BEGIN_RING(chan, eng3d, 0x1fc8, 2);
OUT_RING(chan, 0xedcba987);
OUT_RING(chan, 0x0000006f);
- OUT_RING(chan, RING_3D(0x1fd0, 1));
+ BEGIN_RING(chan, eng3d, 0x1fd0, 1);
OUT_RING(chan, 0x00171615);
- OUT_RING(chan, RING_3D(0x1fd4, 1));
+ BEGIN_RING(chan, eng3d, 0x1fd4, 1);
OUT_RING(chan, 0x001b1a19);
- OUT_RING(chan, RING_3D(0x1ef8, 1));
+ BEGIN_RING(chan, eng3d, 0x1ef8, 1);
OUT_RING(chan, 0x0020ffff);
- OUT_RING(chan, RING_3D(0x1d64, 1));
+ BEGIN_RING(chan, eng3d, 0x1d64, 1);
OUT_RING(chan, 0x01d300d4);
- OUT_RING(chan, RING_3D(0x1e94, 1));
+ BEGIN_RING(chan, eng3d, 0x1e94, 1);
OUT_RING(chan, 0x00000001);
- OUT_RING(chan, RING_3D(NV40_3D_MIPMAP_ROUNDING, 1));
+ BEGIN_RING(chan, eng3d, NV40_3D_MIPMAP_ROUNDING, 1);
OUT_RING(chan, NV40_3D_MIPMAP_ROUNDING_MODE_DOWN);
}
@@ -571,25 +573,25 @@ nvfx_screen_create(struct pipe_winsys *ws, struct nouveau_device *dev)
/* Static eng3d initialisation */
/* note that we just started using the channel, so we must have space in the pushbuffer */
- OUT_RING(chan, RING_3D(NV30_3D_DMA_NOTIFY, 1));
+ BEGIN_RING(chan, screen->eng3d, NV30_3D_DMA_NOTIFY, 1);
OUT_RING(chan, screen->sync->handle);
- OUT_RING(chan, RING_3D(NV30_3D_DMA_TEXTURE0, 2));
+ BEGIN_RING(chan, screen->eng3d, NV30_3D_DMA_TEXTURE0, 2);
OUT_RING(chan, chan->vram->handle);
OUT_RING(chan, chan->gart->handle);
- OUT_RING(chan, RING_3D(NV30_3D_DMA_COLOR1, 1));
+ BEGIN_RING(chan, screen->eng3d, NV30_3D_DMA_COLOR1, 1);
OUT_RING(chan, chan->vram->handle);
- OUT_RING(chan, RING_3D(NV30_3D_DMA_COLOR0, 2));
+ BEGIN_RING(chan, screen->eng3d, NV30_3D_DMA_COLOR0, 2);
OUT_RING(chan, chan->vram->handle);
OUT_RING(chan, chan->vram->handle);
- OUT_RING(chan, RING_3D(NV30_3D_DMA_VTXBUF0, 2));
+ BEGIN_RING(chan, screen->eng3d, NV30_3D_DMA_VTXBUF0, 2);
OUT_RING(chan, chan->vram->handle);
OUT_RING(chan, chan->gart->handle);
- OUT_RING(chan, RING_3D(NV30_3D_DMA_FENCE, 2));
+ BEGIN_RING(chan, screen->eng3d, NV30_3D_DMA_FENCE, 2);
OUT_RING(chan, 0);
OUT_RING(chan, screen->query->handle);
- OUT_RING(chan, RING_3D(NV30_3D_DMA_UNK1AC, 2));
+ BEGIN_RING(chan, screen->eng3d, NV30_3D_DMA_UNK1AC, 2);
OUT_RING(chan, chan->vram->handle);
OUT_RING(chan, chan->vram->handle);
diff --git a/src/gallium/drivers/nvfx/nvfx_state.c b/src/gallium/drivers/nvfx/nvfx_state.c
index 54619037d82..f3dcb205c61 100644
--- a/src/gallium/drivers/nvfx/nvfx_state.c
+++ b/src/gallium/drivers/nvfx/nvfx_state.c
@@ -304,7 +304,7 @@ nvfx_set_constant_buffer(struct pipe_context *pipe, uint shader, uint index,
{
struct nvfx_context *nvfx = nvfx_context(pipe);
- nvfx->constbuf[shader] = buf;
+ pipe_resource_reference(&nvfx->constbuf[shader], buf);
nvfx->constbuf_nr[shader] = buf ? (buf->width0 / (4 * sizeof(float))) : 0;
if (shader == PIPE_SHADER_VERTEX) {
diff --git a/src/gallium/drivers/nvfx/nvfx_state_emit.c b/src/gallium/drivers/nvfx/nvfx_state_emit.c
index 501fdd4430c..ae9c31418c3 100644
--- a/src/gallium/drivers/nvfx/nvfx_state_emit.c
+++ b/src/gallium/drivers/nvfx/nvfx_state_emit.c
@@ -7,11 +7,11 @@ void
nvfx_state_viewport_validate(struct nvfx_context *nvfx)
{
struct nouveau_channel *chan = nvfx->screen->base.channel;
+ struct nouveau_grobj *eng3d = nvfx->screen->eng3d;
struct pipe_viewport_state *vpt = &nvfx->viewport;
- WAIT_RING(chan, 11);
if(nvfx->render_mode == HW) {
- OUT_RING(chan, RING_3D(NV30_3D_VIEWPORT_TRANSLATE_X, 8));
+ BEGIN_RING(chan, eng3d, NV30_3D_VIEWPORT_TRANSLATE_X, 8);
OUT_RINGf(chan, vpt->translate[0]);
OUT_RINGf(chan, vpt->translate[1]);
OUT_RINGf(chan, vpt->translate[2]);
@@ -20,10 +20,10 @@ nvfx_state_viewport_validate(struct nvfx_context *nvfx)
OUT_RINGf(chan, vpt->scale[1]);
OUT_RINGf(chan, vpt->scale[2]);
OUT_RINGf(chan, vpt->scale[3]);
- OUT_RING(chan, RING_3D(0x1d78, 1));
+ BEGIN_RING(chan, eng3d, 0x1d78, 1);
OUT_RING(chan, 1);
} else {
- OUT_RING(chan, RING_3D(NV30_3D_VIEWPORT_TRANSLATE_X, 8));
+ BEGIN_RING(chan, eng3d, NV30_3D_VIEWPORT_TRANSLATE_X, 8);
OUT_RINGf(chan, 0.0f);
OUT_RINGf(chan, 0.0f);
OUT_RINGf(chan, 0.0f);
@@ -32,7 +32,7 @@ nvfx_state_viewport_validate(struct nvfx_context *nvfx)
OUT_RINGf(chan, 1.0f);
OUT_RINGf(chan, 1.0f);
OUT_RINGf(chan, 1.0f);
- OUT_RING(chan, RING_3D(0x1d78, 1));
+ BEGIN_RING(chan, eng3d, 0x1d78, 1);
OUT_RING(chan, nvfx->is_nv4x ? 0x110 : 1);
}
}
@@ -41,6 +41,7 @@ void
nvfx_state_scissor_validate(struct nvfx_context *nvfx)
{
struct nouveau_channel *chan = nvfx->screen->base.channel;
+ struct nouveau_grobj *eng3d = nvfx->screen->eng3d;
struct pipe_rasterizer_state *rast = &nvfx->rasterizer->pipe;
struct pipe_scissor_state *s = &nvfx->scissor;
@@ -48,8 +49,7 @@ nvfx_state_scissor_validate(struct nvfx_context *nvfx)
return;
nvfx->state.scissor_enabled = rast->scissor;
- WAIT_RING(chan, 3);
- OUT_RING(chan, RING_3D(NV30_3D_SCISSOR_HORIZ, 2));
+ BEGIN_RING(chan, eng3d, NV30_3D_SCISSOR_HORIZ, 2);
if (nvfx->state.scissor_enabled) {
OUT_RING(chan, ((s->maxx - s->minx) << 16) | s->minx);
OUT_RING(chan, ((s->maxy - s->miny) << 16) | s->miny);
@@ -63,12 +63,12 @@ void
nvfx_state_sr_validate(struct nvfx_context *nvfx)
{
struct nouveau_channel* chan = nvfx->screen->base.channel;
+ struct nouveau_grobj *eng3d = nvfx->screen->eng3d;
struct pipe_stencil_ref *sr = &nvfx->stencil_ref;
- WAIT_RING(chan, 4);
- OUT_RING(chan, RING_3D(NV30_3D_STENCIL_FUNC_REF(0), 1));
+ BEGIN_RING(chan, eng3d, NV30_3D_STENCIL_FUNC_REF(0), 1);
OUT_RING(chan, sr->ref_value[0]);
- OUT_RING(chan, RING_3D(NV30_3D_STENCIL_FUNC_REF(1), 1));
+ BEGIN_RING(chan, eng3d, NV30_3D_STENCIL_FUNC_REF(1), 1);
OUT_RING(chan, sr->ref_value[1]);
}
@@ -76,10 +76,10 @@ void
nvfx_state_blend_colour_validate(struct nvfx_context *nvfx)
{
struct nouveau_channel* chan = nvfx->screen->base.channel;
+ struct nouveau_grobj *eng3d = nvfx->screen->eng3d;
struct pipe_blend_color *bcol = &nvfx->blend_colour;
- WAIT_RING(chan, 2);
- OUT_RING(chan, RING_3D(NV30_3D_BLEND_COLOR, 1));
+ BEGIN_RING(chan, eng3d, NV30_3D_BLEND_COLOR, 1);
OUT_RING(chan, ((float_to_ubyte(bcol->color[3]) << 24) |
(float_to_ubyte(bcol->color[0]) << 16) |
(float_to_ubyte(bcol->color[1]) << 8) |
@@ -90,9 +90,9 @@ void
nvfx_state_stipple_validate(struct nvfx_context *nvfx)
{
struct nouveau_channel *chan = nvfx->screen->base.channel;
+ struct nouveau_grobj *eng3d = nvfx->screen->eng3d;
- WAIT_RING(chan, 33);
- OUT_RING(chan, RING_3D(NV30_3D_POLYGON_STIPPLE_PATTERN(0), 32));
+ BEGIN_RING(chan, eng3d, NV30_3D_POLYGON_STIPPLE_PATTERN(0), 32);
OUT_RINGp(chan, nvfx->stipple, 32);
}
@@ -100,12 +100,12 @@ static void
nvfx_coord_conventions_validate(struct nvfx_context* nvfx)
{
struct nouveau_channel* chan = nvfx->screen->base.channel;
+ struct nouveau_grobj *eng3d = nvfx->screen->eng3d;
unsigned value = nvfx->hw_fragprog->coord_conventions;
if(value & NV30_3D_COORD_CONVENTIONS_ORIGIN_INVERTED)
value |= nvfx->framebuffer.height << NV30_3D_COORD_CONVENTIONS_HEIGHT__SHIFT;
- WAIT_RING(chan, 2);
- OUT_RING(chan, RING_3D(NV30_3D_COORD_CONVENTIONS, 1));
+ BEGIN_RING(chan, eng3d, NV30_3D_COORD_CONVENTIONS, 1);
OUT_RING(chan, value);
}
@@ -113,6 +113,7 @@ static void
nvfx_ucp_validate(struct nvfx_context* nvfx)
{
struct nouveau_channel* chan = nvfx->screen->base.channel;
+ struct nouveau_grobj *eng3d = nvfx->screen->eng3d;
unsigned enables[7] =
{
0,
@@ -126,17 +127,15 @@ nvfx_ucp_validate(struct nvfx_context* nvfx)
if(!nvfx->use_vp_clipping)
{
- WAIT_RING(chan, 2);
- OUT_RING(chan, RING_3D(NV30_3D_VP_CLIP_PLANES_ENABLE, 1));
+ BEGIN_RING(chan, eng3d, NV30_3D_VP_CLIP_PLANES_ENABLE, 1);
OUT_RING(chan, 0);
- WAIT_RING(chan, 6 * 4 + 1);
- OUT_RING(chan, RING_3D(NV30_3D_VP_CLIP_PLANE(0, 0), nvfx->clip.nr * 4));
+ BEGIN_RING(chan, eng3d, NV30_3D_VP_CLIP_PLANE(0, 0),
+ nvfx->clip.nr * 4);
OUT_RINGp(chan, &nvfx->clip.ucp[0][0], nvfx->clip.nr * 4);
}
- WAIT_RING(chan, 2);
- OUT_RING(chan, RING_3D(NV30_3D_VP_CLIP_PLANES_ENABLE, 1));
+ BEGIN_RING(chan, eng3d, NV30_3D_VP_CLIP_PLANES_ENABLE, 1);
OUT_RING(chan, enables[nvfx->clip.nr]);
}
@@ -144,38 +143,37 @@ static void
nvfx_vertprog_ucp_validate(struct nvfx_context* nvfx)
{
struct nouveau_channel* chan = nvfx->screen->base.channel;
+ struct nouveau_grobj *eng3d = nvfx->screen->eng3d;
unsigned i;
struct nvfx_vertex_program* vp = nvfx->hw_vertprog;
if(nvfx->clip.nr != vp->clip_nr)
{
unsigned idx;
- WAIT_RING(chan, 14);
/* remove last instruction bit */
if(vp->clip_nr >= 0)
{
idx = vp->nr_insns - 7 + vp->clip_nr;
- OUT_RING(chan, RING_3D(NV30_3D_VP_UPLOAD_FROM_ID, 1));
+ BEGIN_RING(chan, eng3d, NV30_3D_VP_UPLOAD_FROM_ID, 1);
OUT_RING(chan, vp->exec->start + idx);
- OUT_RING(chan, RING_3D(NV30_3D_VP_UPLOAD_INST(0), 4));
+ BEGIN_RING(chan, eng3d, NV30_3D_VP_UPLOAD_INST(0), 4);
OUT_RINGp (chan, vp->insns[idx].data, 4);
}
/* set last instruction bit */
idx = vp->nr_insns - 7 + nvfx->clip.nr;
- OUT_RING(chan, RING_3D(NV30_3D_VP_UPLOAD_FROM_ID, 1));
+ BEGIN_RING(chan, eng3d, NV30_3D_VP_UPLOAD_FROM_ID, 1);
OUT_RING(chan, vp->exec->start + idx);
- OUT_RING(chan, RING_3D(NV30_3D_VP_UPLOAD_INST(0), 4));
+ BEGIN_RING(chan, eng3d, NV30_3D_VP_UPLOAD_INST(0), 4);
OUT_RINGp(chan, vp->insns[idx].data, 3);
OUT_RING(chan, vp->insns[idx].data[3] | 1);
vp->clip_nr = nvfx->clip.nr;
}
// TODO: only do this for the ones changed
- WAIT_RING(chan, 6 * 6);
for(i = 0; i < nvfx->clip.nr; ++i)
{
- OUT_RING(chan, RING_3D(NV30_3D_VP_UPLOAD_CONST_ID, 5));
+ BEGIN_RING(chan, eng3d, NV30_3D_VP_UPLOAD_CONST_ID, 5);
OUT_RING(chan, vp->data->start + i);
OUT_RINGp (chan, nvfx->clip.ucp[i], 4);
}
@@ -185,6 +183,7 @@ static boolean
nvfx_state_validate_common(struct nvfx_context *nvfx)
{
struct nouveau_channel* chan = nvfx->screen->base.channel;
+ struct nouveau_grobj *eng3d = nvfx->screen->eng3d;
unsigned dirty;
unsigned still_dirty = 0;
int new_fb_mode = -1; /* 1 = all swizzled, 0 = make all linear */
@@ -287,8 +286,7 @@ nvfx_state_validate_common(struct nvfx_context *nvfx)
if(vp_output != nvfx->hw_vp_output)
{
- WAIT_RING(chan, 2);
- OUT_RING(chan, RING_3D(NV40_3D_VP_RESULT_EN, 1));
+ BEGIN_RING(chan, eng3d, NV40_3D_VP_RESULT_EN, 1);
OUT_RING(chan, vp_output);
nvfx->hw_vp_output = vp_output;
}
@@ -320,8 +318,7 @@ nvfx_state_validate_common(struct nvfx_context *nvfx)
if(dirty & NVFX_NEW_ZSA || (new_fb_mode >= 0))
{
- WAIT_RING(chan, 3);
- OUT_RING(chan, RING_3D(NV30_3D_DEPTH_WRITE_ENABLE, 2));
+ BEGIN_RING(chan, eng3d, NV30_3D_DEPTH_WRITE_ENABLE, 2);
OUT_RING(chan, nvfx->framebuffer.zsbuf && nvfx->zsa->pipe.depth.writemask);
OUT_RING(chan, nvfx->framebuffer.zsbuf && nvfx->zsa->pipe.depth.enabled);
}
@@ -334,10 +331,9 @@ nvfx_state_validate_common(struct nvfx_context *nvfx)
// TODO: what about nv30?
if(nvfx->is_nv4x)
{
- WAIT_RING(chan, 4);
- OUT_RING(chan, RING_3D(NV40_3D_TEX_CACHE_CTL, 1));
+ BEGIN_RING(chan, eng3d, NV40_3D_TEX_CACHE_CTL, 1);
OUT_RING(chan, 2);
- OUT_RING(chan, RING_3D(NV40_3D_TEX_CACHE_CTL, 1));
+ BEGIN_RING(chan, eng3d, NV40_3D_TEX_CACHE_CTL, 1);
OUT_RING(chan, 1);
}
}
@@ -430,7 +426,7 @@ nvfx_state_validate_swtnl(struct nvfx_context *nvfx)
NOUVEAU_ERR("hw->swtnl 0x%08x\n", nvfx->fallback_swtnl);
warned = TRUE;
}
- nvfx->pipe.flush(&nvfx->pipe, 0, NULL);
+ nvfx->pipe.flush(&nvfx->pipe, NULL);
nvfx->dirty |= (NVFX_NEW_VIEWPORT |
NVFX_NEW_VERTPROG |
NVFX_NEW_ARRAYS);
diff --git a/src/gallium/drivers/nvfx/nvfx_state_fb.c b/src/gallium/drivers/nvfx/nvfx_state_fb.c
index 816bb89f2c6..f9fed94044a 100644
--- a/src/gallium/drivers/nvfx/nvfx_state_fb.c
+++ b/src/gallium/drivers/nvfx/nvfx_state_fb.c
@@ -96,6 +96,7 @@ nvfx_framebuffer_validate(struct nvfx_context *nvfx, unsigned prepare_result)
{
struct pipe_framebuffer_state *fb = &nvfx->framebuffer;
struct nouveau_channel *chan = nvfx->screen->base.channel;
+ struct nouveau_grobj *eng3d = nvfx->screen->eng3d;
uint32_t rt_enable, rt_format;
int i;
unsigned rt_flags = NOUVEAU_BO_RDWR | NOUVEAU_BO_VRAM;
@@ -204,11 +205,11 @@ nvfx_framebuffer_validate(struct nvfx_context *nvfx, unsigned prepare_result)
//printf("rendering to bo %p [%i] at offset %i with pitch %i\n", rt0->bo, rt0->bo->handle, rt0->offset, pitch);
- OUT_RING(chan, RING_3D(NV30_3D_DMA_COLOR0, 1));
+ BEGIN_RING(chan, eng3d, NV30_3D_DMA_COLOR0, 1);
OUT_RELOC(chan, rt0->bo, 0,
rt_flags | NOUVEAU_BO_OR,
chan->vram->handle, chan->gart->handle);
- OUT_RING(chan, RING_3D(NV30_3D_COLOR0_PITCH, 2));
+ BEGIN_RING(chan, eng3d, NV30_3D_COLOR0_PITCH, 2);
OUT_RING(chan, pitch);
OUT_RELOC(chan, rt0->bo,
rt0->offset, rt_flags | NOUVEAU_BO_LOW,
@@ -216,11 +217,11 @@ nvfx_framebuffer_validate(struct nvfx_context *nvfx, unsigned prepare_result)
}
if (rt_enable & NV30_3D_RT_ENABLE_COLOR1) {
- OUT_RING(chan, RING_3D(NV30_3D_DMA_COLOR1, 1));
+ BEGIN_RING(chan, eng3d, NV30_3D_DMA_COLOR1, 1);
OUT_RELOC(chan, nvfx->hw_rt[1].bo, 0,
rt_flags | NOUVEAU_BO_OR,
chan->vram->handle, chan->gart->handle);
- OUT_RING(chan, RING_3D(NV30_3D_COLOR1_OFFSET, 2));
+ BEGIN_RING(chan, eng3d, NV30_3D_COLOR1_OFFSET, 2);
OUT_RELOC(chan, nvfx->hw_rt[1].bo,
nvfx->hw_rt[1].offset, rt_flags | NOUVEAU_BO_LOW,
0, 0);
@@ -230,68 +231,68 @@ nvfx_framebuffer_validate(struct nvfx_context *nvfx, unsigned prepare_result)
if(nvfx->is_nv4x)
{
if (rt_enable & NV40_3D_RT_ENABLE_COLOR2) {
- OUT_RING(chan, RING_3D(NV40_3D_DMA_COLOR2, 1));
+ BEGIN_RING(chan, eng3d, NV40_3D_DMA_COLOR2, 1);
OUT_RELOC(chan, nvfx->hw_rt[2].bo, 0,
rt_flags | NOUVEAU_BO_OR,
chan->vram->handle, chan->gart->handle);
- OUT_RING(chan, RING_3D(NV40_3D_COLOR2_OFFSET, 1));
+ BEGIN_RING(chan, eng3d, NV40_3D_COLOR2_OFFSET, 1);
OUT_RELOC(chan, nvfx->hw_rt[2].bo,
nvfx->hw_rt[2].offset, rt_flags | NOUVEAU_BO_LOW,
0, 0);
- OUT_RING(chan, RING_3D(NV40_3D_COLOR2_PITCH, 1));
+ BEGIN_RING(chan, eng3d, NV40_3D_COLOR2_PITCH, 1);
OUT_RING(chan, nvfx->hw_rt[2].pitch);
}
if (rt_enable & NV40_3D_RT_ENABLE_COLOR3) {
- OUT_RING(chan, RING_3D(NV40_3D_DMA_COLOR3, 1));
+ BEGIN_RING(chan, eng3d, NV40_3D_DMA_COLOR3, 1);
OUT_RELOC(chan, nvfx->hw_rt[3].bo, 0,
rt_flags | NOUVEAU_BO_OR,
chan->vram->handle, chan->gart->handle);
- OUT_RING(chan, RING_3D(NV40_3D_COLOR3_OFFSET, 1));
+ BEGIN_RING(chan, eng3d, NV40_3D_COLOR3_OFFSET, 1);
OUT_RELOC(chan, nvfx->hw_rt[3].bo,
nvfx->hw_rt[3].offset, rt_flags | NOUVEAU_BO_LOW,
0, 0);
- OUT_RING(chan, RING_3D(NV40_3D_COLOR3_PITCH, 1));
+ BEGIN_RING(chan, eng3d, NV40_3D_COLOR3_PITCH, 1);
OUT_RING(chan, nvfx->hw_rt[3].pitch);
}
}
if (fb->zsbuf) {
- OUT_RING(chan, RING_3D(NV30_3D_DMA_ZETA, 1));
+ BEGIN_RING(chan, eng3d, NV30_3D_DMA_ZETA, 1);
OUT_RELOC(chan, nvfx->hw_zeta.bo, 0,
rt_flags | NOUVEAU_BO_OR,
chan->vram->handle, chan->gart->handle);
- OUT_RING(chan, RING_3D(NV30_3D_ZETA_OFFSET, 1));
+ BEGIN_RING(chan, eng3d, NV30_3D_ZETA_OFFSET, 1);
/* TODO: reverse engineer LMA */
OUT_RELOC(chan, nvfx->hw_zeta.bo,
nvfx->hw_zeta.offset, rt_flags | NOUVEAU_BO_LOW, 0, 0);
if(nvfx->is_nv4x) {
- OUT_RING(chan, RING_3D(NV40_3D_ZETA_PITCH, 1));
+ BEGIN_RING(chan, eng3d, NV40_3D_ZETA_PITCH, 1);
OUT_RING(chan, nvfx->hw_zeta.pitch);
}
}
else if(nvfx->is_nv4x) {
- OUT_RING(chan, RING_3D(NV40_3D_ZETA_PITCH, 1));
+ BEGIN_RING(chan, eng3d, NV40_3D_ZETA_PITCH, 1);
OUT_RING(chan, 64);
}
- OUT_RING(chan, RING_3D(NV30_3D_RT_ENABLE, 1));
+ BEGIN_RING(chan, eng3d, NV30_3D_RT_ENABLE, 1);
OUT_RING(chan, rt_enable);
- OUT_RING(chan, RING_3D(NV30_3D_RT_HORIZ, 3));
+ BEGIN_RING(chan, eng3d, NV30_3D_RT_HORIZ, 3);
OUT_RING(chan, (w << 16) | 0);
OUT_RING(chan, (h << 16) | 0);
OUT_RING(chan, rt_format);
- OUT_RING(chan, RING_3D(NV30_3D_VIEWPORT_HORIZ, 2));
+ BEGIN_RING(chan, eng3d, NV30_3D_VIEWPORT_HORIZ, 2);
OUT_RING(chan, (w << 16) | 0);
OUT_RING(chan, (h << 16) | 0);
- OUT_RING(chan, RING_3D(NV30_3D_VIEWPORT_CLIP_HORIZ(0), 2));
+ BEGIN_RING(chan, eng3d, NV30_3D_VIEWPORT_CLIP_HORIZ(0), 2);
OUT_RING(chan, ((w - 1) << 16) | 0);
OUT_RING(chan, ((h - 1) << 16) | 0);
if(!nvfx->is_nv4x) {
/* Wonder why this is needed, context should all be set to zero on init */
/* TODO: we can most likely remove this, after putting it in context init */
- OUT_RING(chan, RING_3D(NV30_3D_VIEWPORT_TX_ORIGIN, 1));
+ BEGIN_RING(chan, eng3d, NV30_3D_VIEWPORT_TX_ORIGIN, 1);
OUT_RING(chan, 0);
}
nvfx->relocs_needed &=~ NVFX_RELOCATE_FRAMEBUFFER;
diff --git a/src/gallium/drivers/nvfx/nvfx_surface.c b/src/gallium/drivers/nvfx/nvfx_surface.c
index 6fd6c47081b..be31853d717 100644
--- a/src/gallium/drivers/nvfx/nvfx_surface.c
+++ b/src/gallium/drivers/nvfx/nvfx_surface.c
@@ -168,8 +168,8 @@ nvfx_get_blitter(struct pipe_context* pipe, int copy)
if(nvfx->query && !nvfx->blitters_in_use)
{
struct nouveau_channel* chan = nvfx->screen->base.channel;
- WAIT_RING(chan, 2);
- OUT_RING(chan, RING_3D(NV30_3D_QUERY_ENABLE, 1));
+ struct nouveau_grobj *eng3d = nvfx->screen->eng3d;
+ BEGIN_RING(chan, eng3d, NV30_3D_QUERY_ENABLE, 1);
OUT_RING(chan, 0);
}
@@ -209,8 +209,8 @@ nvfx_put_blitter(struct pipe_context* pipe, struct blitter_context* blitter)
if(nvfx->query && !nvfx->blitters_in_use)
{
struct nouveau_channel* chan = nvfx->screen->base.channel;
- WAIT_RING(chan, 2);
- OUT_RING(chan, RING_3D(NV30_3D_QUERY_ENABLE, 1));
+ struct nouveau_grobj *eng3d = nvfx->screen->eng3d;
+ BEGIN_RING(chan, eng3d, NV30_3D_QUERY_ENABLE, 1);
OUT_RING(chan, 1);
}
}
diff --git a/src/gallium/drivers/nvfx/nvfx_vbo.c b/src/gallium/drivers/nvfx/nvfx_vbo.c
index 597664e7716..b72379d6536 100644
--- a/src/gallium/drivers/nvfx/nvfx_vbo.c
+++ b/src/gallium/drivers/nvfx/nvfx_vbo.c
@@ -2,6 +2,7 @@
#include "pipe/p_state.h"
#include "util/u_inlines.h"
#include "util/u_format.h"
+#include "util/u_transfer.h"
#include "translate/translate.h"
#include "nvfx_context.h"
@@ -9,8 +10,7 @@
#include "nvfx_resource.h"
#include "nouveau/nouveau_channel.h"
-
-#include "nouveau/nouveau_pushbuf.h"
+#include "nouveau/nv04_pushbuf.h"
static inline unsigned
util_guess_unique_indices_count(unsigned mode, unsigned indices)
@@ -247,6 +247,7 @@ boolean
nvfx_vbo_validate(struct nvfx_context *nvfx)
{
struct nouveau_channel* chan = nvfx->screen->base.channel;
+ struct nouveau_grobj *eng3d = nvfx->screen->eng3d;
int i;
int elements = MAX2(nvfx->vtxelt->num_elements, nvfx->hw_vtxelt_nr);
unsigned vb_flags = nvfx->screen->vertex_buffer_reloc_flags | NOUVEAU_BO_RD;
@@ -262,11 +263,11 @@ nvfx_vbo_validate(struct nvfx_context *nvfx)
struct nvfx_buffer* buffer = nvfx_buffer(vb->buffer);
float v[4];
ve->fetch_rgba_float(v, buffer->data + vb->buffer_offset + ve->src_offset, 0, 0);
- nvfx_emit_vtx_attr(chan, ve->idx, v, ve->ncomp);
+ nvfx_emit_vtx_attr(chan, eng3d, ve->idx, v, ve->ncomp);
}
- OUT_RING(chan, RING_3D(NV30_3D_VTXFMT(0), elements));
+ BEGIN_RING(chan, eng3d, NV30_3D_VTXFMT(0), elements);
if(nvfx->use_vertex_buffers)
{
unsigned idx = 0;
@@ -297,12 +298,12 @@ nvfx_vbo_validate(struct nvfx_context *nvfx)
unsigned i;
/* seems to be some kind of cache flushing */
for(i = 0; i < 3; ++i) {
- OUT_RING(chan, RING_3D(0x1718, 1));
+ BEGIN_RING(chan, eng3d, 0x1718, 1);
OUT_RING(chan, 0);
}
}
- OUT_RING(chan, RING_3D(NV30_3D_VTXBUF(0), elements));
+ BEGIN_RING(chan, eng3d, NV30_3D_VTXBUF(0), elements);
if(nvfx->use_vertex_buffers)
{
unsigned idx = 0;
@@ -330,7 +331,7 @@ nvfx_vbo_validate(struct nvfx_context *nvfx)
OUT_RING(chan, 0);
}
- OUT_RING(chan, RING_3D(0x1710, 1));
+ BEGIN_RING(chan, eng3d, 0x1710, 1);
OUT_RING(chan, 0);
nvfx->hw_vtxelt_nr = nvfx->vtxelt->num_elements;
@@ -342,15 +343,14 @@ void
nvfx_vbo_swtnl_validate(struct nvfx_context *nvfx)
{
struct nouveau_channel* chan = nvfx->screen->base.channel;
+ struct nouveau_grobj *eng3d = nvfx->screen->eng3d;
unsigned num_outputs = nvfx->vertprog->draw_elements;
int elements = MAX2(num_outputs, nvfx->hw_vtxelt_nr);
if (!elements)
return;
- WAIT_RING(chan, (1 + 6 + 1 + 2) + elements * 2);
-
- OUT_RING(chan, RING_3D(NV30_3D_VTXFMT(0), elements));
+ BEGIN_RING(chan, eng3d, NV30_3D_VTXFMT(0), elements);
for(unsigned i = 0; i < num_outputs; ++i)
OUT_RING(chan, (4 << NV30_3D_VTXFMT_SIZE__SHIFT) | NV30_3D_VTXFMT_TYPE_V32_FLOAT);
for(unsigned i = num_outputs; i < elements; ++i)
@@ -360,16 +360,16 @@ nvfx_vbo_swtnl_validate(struct nvfx_context *nvfx)
unsigned i;
/* seems to be some kind of cache flushing */
for(i = 0; i < 3; ++i) {
- OUT_RING(chan, RING_3D(0x1718, 1));
+ BEGIN_RING(chan, eng3d, 0x1718, 1);
OUT_RING(chan, 0);
}
}
- OUT_RING(chan, RING_3D(NV30_3D_VTXBUF(0), elements));
+ BEGIN_RING(chan, eng3d, NV30_3D_VTXBUF(0), elements);
for (unsigned i = 0; i < elements; i++)
OUT_RING(chan, 0);
- OUT_RING(chan, RING_3D(0x1710, 1));
+ BEGIN_RING(chan, eng3d, 0x1710, 1);
OUT_RING(chan, 0);
nvfx->hw_vtxelt_nr = num_outputs;
@@ -592,18 +592,10 @@ nvfx_set_vertex_buffers(struct pipe_context *pipe, unsigned count,
{
struct nvfx_context *nvfx = nvfx_context(pipe);
- for(unsigned i = 0; i < count; ++i)
- {
- pipe_resource_reference(&nvfx->vtxbuf[i].buffer, vb[i].buffer);
- nvfx->vtxbuf[i].buffer_offset = vb[i].buffer_offset;
- nvfx->vtxbuf[i].max_index = vb[i].max_index;
- nvfx->vtxbuf[i].stride = vb[i].stride;
- }
-
- for(unsigned i = count; i < nvfx->vtxbuf_nr; ++i)
- pipe_resource_reference(&nvfx->vtxbuf[i].buffer, 0);
+ util_copy_vertex_buffers(nvfx->vtxbuf,
+ &nvfx->vtxbuf_nr,
+ vb, count);
- nvfx->vtxbuf_nr = count;
nvfx->use_vertex_buffers = -1;
nvfx->draw_dirty |= NVFX_NEW_ARRAYS;
}
@@ -640,4 +632,6 @@ nvfx_init_vbo_functions(struct nvfx_context *nvfx)
nvfx->pipe.create_vertex_elements_state = nvfx_vtxelts_state_create;
nvfx->pipe.delete_vertex_elements_state = nvfx_vtxelts_state_delete;
nvfx->pipe.bind_vertex_elements_state = nvfx_vtxelts_state_bind;
+
+ nvfx->pipe.redefine_user_buffer = u_default_redefine_user_buffer;
}
diff --git a/src/gallium/drivers/nvfx/nvfx_vertprog.c b/src/gallium/drivers/nvfx/nvfx_vertprog.c
index e543fda50ef..a11941f3d51 100644
--- a/src/gallium/drivers/nvfx/nvfx_vertprog.c
+++ b/src/gallium/drivers/nvfx/nvfx_vertprog.c
@@ -1182,6 +1182,7 @@ nvfx_vertprog_validate(struct nvfx_context *nvfx)
{
struct nvfx_screen *screen = nvfx->screen;
struct nouveau_channel *chan = screen->base.channel;
+ struct nouveau_grobj *eng3d = screen->eng3d;
struct nvfx_pipe_vertex_program *pvp = nvfx->vertprog;
struct nvfx_vertex_program* vp;
struct pipe_resource *constbuf;
@@ -1341,7 +1342,6 @@ nvfx_vertprog_validate(struct nvfx_context *nvfx)
}
*/
- WAIT_RING(chan, 6 * vp->nr_consts);
for (i = nvfx->use_vp_clipping ? 6 : 0; i < vp->nr_consts; i++) {
struct nvfx_vertex_program_data *vpd = &vp->consts[i];
@@ -1356,7 +1356,7 @@ nvfx_vertprog_validate(struct nvfx_context *nvfx)
//printf("upload into %i + %i: %f %f %f %f\n", vp->data->start, i, vpd->value[0], vpd->value[1], vpd->value[2], vpd->value[3]);
- OUT_RING(chan, RING_3D(NV30_3D_VP_UPLOAD_CONST_ID, 5));
+ BEGIN_RING(chan, eng3d, NV30_3D_VP_UPLOAD_CONST_ID, 5);
OUT_RING(chan, i + vp->data->start);
OUT_RINGp(chan, (uint32_t *)vpd->value, 4);
}
@@ -1364,11 +1364,10 @@ nvfx_vertprog_validate(struct nvfx_context *nvfx)
/* Upload vtxprog */
if (upload_code) {
- WAIT_RING(chan, 2 + 5 * vp->nr_insns);
- OUT_RING(chan, RING_3D(NV30_3D_VP_UPLOAD_FROM_ID, 1));
+ BEGIN_RING(chan, eng3d, NV30_3D_VP_UPLOAD_FROM_ID, 1);
OUT_RING(chan, vp->exec->start);
for (i = 0; i < vp->nr_insns; i++) {
- OUT_RING(chan, RING_3D(NV30_3D_VP_UPLOAD_INST(0), 4));
+ BEGIN_RING(chan, eng3d, NV30_3D_VP_UPLOAD_INST(0), 4);
//printf("%08x %08x %08x %08x\n", vp->insns[i].data[0], vp->insns[i].data[1], vp->insns[i].data[2], vp->insns[i].data[3]);
OUT_RINGp(chan, vp->insns[i].data, 4);
}
@@ -1377,11 +1376,10 @@ nvfx_vertprog_validate(struct nvfx_context *nvfx)
if(nvfx->dirty & (NVFX_NEW_VERTPROG))
{
- WAIT_RING(chan, 6);
- OUT_RING(chan, RING_3D(NV30_3D_VP_START_FROM_ID, 1));
+ BEGIN_RING(chan, eng3d, NV30_3D_VP_START_FROM_ID, 1);
OUT_RING(chan, vp->exec->start);
if(nvfx->is_nv4x) {
- OUT_RING(chan, RING_3D(NV40_3D_VP_ATTRIB_EN, 1));
+ BEGIN_RING(chan, eng3d, NV40_3D_VP_ATTRIB_EN, 1);
OUT_RING(chan, vp->ir);
}
}
diff --git a/src/gallium/drivers/r300/r300_blit.c b/src/gallium/drivers/r300/r300_blit.c
index 6e886433bc5..37b635fd120 100644
--- a/src/gallium/drivers/r300/r300_blit.c
+++ b/src/gallium/drivers/r300/r300_blit.c
@@ -22,7 +22,6 @@
#include "r300_context.h"
#include "r300_emit.h"
-#include "r300_hyperz.h"
#include "r300_texture.h"
#include "r300_winsys.h"
@@ -55,11 +54,12 @@ static void r300_blitter_begin(struct r300_context* r300, enum r300_blitter_op o
util_blitter_save_viewport(r300->blitter, &r300->viewport);
util_blitter_save_clip(r300->blitter, (struct pipe_clip_state*)r300->clip_state.state);
util_blitter_save_vertex_elements(r300->blitter, r300->velems);
- util_blitter_save_vertex_buffers(r300->blitter, r300->vertex_buffer_count,
- r300->vertex_buffer);
+ util_blitter_save_vertex_buffers(r300->blitter, r300->vbuf_mgr->nr_vertex_buffers,
+ r300->vbuf_mgr->vertex_buffer);
- if (op & (R300_CLEAR_SURFACE | R300_COPY))
+ if (op & (R300_CLEAR_SURFACE | R300_COPY)) {
util_blitter_save_framebuffer(r300->blitter, r300->fb_state.state);
+ }
if (op & R300_COPY) {
struct r300_textures_state* state =
@@ -108,6 +108,22 @@ static boolean r300_cbzb_clear_allowed(struct r300_context *r300,
return r300_surface(fb->cbufs[0])->cbzb_allowed;
}
+static boolean r300_fast_zclear_allowed(struct r300_context *r300)
+{
+ struct pipe_framebuffer_state *fb =
+ (struct pipe_framebuffer_state*)r300->fb_state.state;
+
+ return r300_resource(fb->zsbuf->texture)->tex.zmask_dwords[fb->zsbuf->u.tex.level];
+}
+
+static boolean r300_hiz_clear_allowed(struct r300_context *r300)
+{
+ struct pipe_framebuffer_state *fb =
+ (struct pipe_framebuffer_state*)r300->fb_state.state;
+
+ return r300_resource(fb->zsbuf->texture)->tex.hiz_dwords[fb->zsbuf->u.tex.level];
+}
+
static uint32_t r300_depth_clear_value(enum pipe_format format,
double depth, unsigned stencil)
{
@@ -125,6 +141,13 @@ static uint32_t r300_depth_clear_value(enum pipe_format format,
}
}
+static uint32_t r300_hiz_clear_value(double depth)
+{
+ uint32_t r = (uint32_t)(CLAMP(depth, 0, 1) * 255.5);
+ assert(r <= 255);
+ return r | (r << 8) | (r << 16) | (r << 24);
+}
+
/* Clear currently bound buffers. */
static void r300_clear(struct pipe_context* pipe,
unsigned buffers,
@@ -132,37 +155,46 @@ static void r300_clear(struct pipe_context* pipe,
double depth,
unsigned stencil)
{
- /* My notes about fastfill:
+ /* My notes about Zbuffer compression:
*
- * 1) Only the zbuffer is cleared.
+ * 1) The zbuffer must be micro-tiled and whole microtiles must be
+ * written if compression is enabled. If microtiling is disabled,
+ * it locks up.
*
- * 2) The zbuffer must be micro-tiled and whole microtiles must be
- * written. If microtiling is disabled, it locks up.
+ * 2) There is ZMASK RAM which contains a compressed zbuffer.
+ * Each dword of the Z Mask contains compression information
+ * for 16 4x4 pixel tiles, that is 2 bits for each tile.
+ * On chips with 2 Z pipes, every other dword maps to a different
+ * pipe. On newer chipsets, there is a new compression mode
+ * with 8x8 pixel tiles per 2 bits.
*
- * 3) There is Z Mask RAM which contains a compressed zbuffer and
- * it interacts with fastfill. We should figure out how to use it
- * to get more performance.
- * This is what we know about the Z Mask:
+ * 3) The FASTFILL bit has nothing to do with filling. It only tells hw
+ * it should look in the ZMASK RAM first before fetching from a real
+ * zbuffer.
*
- * Each dword of the Z Mask contains compression information
- * for 16 4x4 pixel blocks, that is 2 bits for each block.
- * On chips with 2 Z pipes, every other dword maps to a different
- * pipe.
+ * 4) If a pixel is in a cleared state, ZB_DEPTHCLEARVALUE is returned
+ * during zbuffer reads instead of the value that is actually stored
+ * in the zbuffer memory. A pixel is in a cleared state when its ZMASK
+ * is equal to 0. Therefore, if you clear ZMASK with zeros, you may
+ * leave the zbuffer memory uninitialized, but then you must enable
+ * compression, so that the ZMASK RAM is actually used.
*
- * 4) ZB_DEPTHCLEARVALUE is used to clear the zbuffer and the Z Mask must
- * be equal to 0. (clear the Z Mask RAM with zeros)
+ * 5) Each 4x4 (or 8x8) tile is automatically decompressed and recompressed
+ * during zbuffer updates. A special decompressing operation should be
+ * used to fully decompress a zbuffer, which basically just stores all
+ * compressed tiles in ZMASK to the zbuffer memory.
*
- * 5) For 16-bit zbuffer, compression causes a hung with one or
+ * 6) For a 16-bit zbuffer, compression causes a hung with one or
* two samples and should not be used.
*
- * 6) FORCE_COMPRESSED_STENCIL_VALUE should be enabled for stencil clears
+ * 7) FORCE_COMPRESSED_STENCIL_VALUE should be enabled for stencil clears
* to avoid needless decompression.
*
- * 7) Fastfill must not be used if reading of compressed Z data is disabled
+ * 8) Fastfill must not be used if reading of compressed Z data is disabled
* and writing of compressed Z data is enabled (RD/WR_COMP_ENABLE),
* i.e. it cannot be used to compress the zbuffer.
*
- * 8) ZB_CB_CLEAR does not interact with fastfill in any way.
+ * 9) ZB_CB_CLEAR does not interact with zbuffer compression in any way.
*
* - Marek
*/
@@ -172,8 +204,6 @@ static void r300_clear(struct pipe_context* pipe,
(struct pipe_framebuffer_state*)r300->fb_state.state;
struct r300_hyperz_state *hyperz =
(struct r300_hyperz_state*)r300->hyperz_state.state;
- struct r300_texture *zstex =
- fb->zsbuf ? r300_texture(fb->zsbuf->texture) : NULL;
uint32_t width = fb->width;
uint32_t height = fb->height;
boolean can_hyperz = r300->rws->get_value(r300->rws, R300_CAN_HYPERZ);
@@ -182,16 +212,18 @@ static void r300_clear(struct pipe_context* pipe,
/* Enable fast Z clear.
* The zbuffer must be in micro-tiled mode, otherwise it locks up. */
if ((buffers & PIPE_CLEAR_DEPTHSTENCIL) && can_hyperz) {
- hyperz_dcv = hyperz->zb_depthclearvalue =
- r300_depth_clear_value(fb->zsbuf->format, depth, stencil);
+ if (r300_fast_zclear_allowed(r300)) {
+ hyperz_dcv = hyperz->zb_depthclearvalue =
+ r300_depth_clear_value(fb->zsbuf->format, depth, stencil);
- r300_mark_fb_state_dirty(r300, R300_CHANGED_ZCLEAR_FLAG);
- if (zstex->zmask_mem[fb->zsbuf->u.tex.level]) {
r300_mark_atom_dirty(r300, &r300->zmask_clear);
buffers &= ~PIPE_CLEAR_DEPTHSTENCIL;
}
- if (zstex->hiz_mem[fb->zsbuf->u.tex.level])
+
+ if (r300_hiz_clear_allowed(r300)) {
+ r300->hiz_clear_value = r300_hiz_clear_value(depth);
r300_mark_atom_dirty(r300, &r300->hiz_clear);
+ }
}
/* Enable CBZB clear. */
@@ -205,7 +237,7 @@ static void r300_clear(struct pipe_context* pipe,
height = surf->cbzb_height;
r300->cbzb_clear = TRUE;
- r300_mark_fb_state_dirty(r300, R300_CHANGED_CBZB_FLAG);
+ r300_mark_fb_state_dirty(r300, R300_CHANGED_HYPERZ_FLAG);
}
/* Clear. */
@@ -218,26 +250,28 @@ static void r300_clear(struct pipe_context* pipe,
fb->nr_cbufs,
buffers, rgba, depth, stencil);
r300_blitter_end(r300);
- } else if (r300->zmask_clear.dirty) {
- /* Just clear zmask and hiz now, this does not use a standard draw
+ } else if (r300->zmask_clear.dirty || r300->hiz_clear.dirty) {
+ /* Just clear zmask and hiz now, this does not use the standard draw
* procedure. */
unsigned dwords;
/* Calculate zmask_clear and hiz_clear atom sizes. */
r300_update_hyperz_state(r300);
- dwords = r300->zmask_clear.size +
+ dwords = (r300->zmask_clear.dirty ? r300->zmask_clear.size : 0) +
(r300->hiz_clear.dirty ? r300->hiz_clear.size : 0) +
r300_get_num_cs_end_dwords(r300);
/* Reserve CS space. */
if (dwords > (R300_MAX_CMDBUF_DWORDS - r300->cs->cdw)) {
- r300->context.flush(&r300->context, 0, NULL);
+ r300_flush(&r300->context, R300_FLUSH_ASYNC, NULL);
}
/* Emit clear packets. */
- r300_emit_zmask_clear(r300, r300->zmask_clear.size,
- r300->zmask_clear.state);
- r300->zmask_clear.dirty = FALSE;
+ if (r300->zmask_clear.dirty) {
+ r300_emit_zmask_clear(r300, r300->zmask_clear.size,
+ r300->zmask_clear.state);
+ r300->zmask_clear.dirty = FALSE;
+ }
if (r300->hiz_clear.dirty) {
r300_emit_hiz_clear(r300, r300->hiz_clear.size,
r300->hiz_clear.state);
@@ -251,16 +285,14 @@ static void r300_clear(struct pipe_context* pipe,
if (r300->cbzb_clear) {
r300->cbzb_clear = FALSE;
hyperz->zb_depthclearvalue = hyperz_dcv;
- r300_mark_fb_state_dirty(r300, R300_CHANGED_CBZB_FLAG);
+ r300_mark_fb_state_dirty(r300, R300_CHANGED_HYPERZ_FLAG);
}
/* Enable fastfill and/or hiz.
*
* If we cleared zmask/hiz, it's in use now. The Hyper-Z state update
- * looks if zmask/hiz is in use and enables fastfill accordingly. */
- if (zstex &&
- (zstex->zmask_in_use[fb->zsbuf->u.tex.level] ||
- zstex->hiz_in_use[fb->zsbuf->u.tex.level])) {
+ * looks if zmask/hiz is in use and programs hardware accordingly. */
+ if (r300->zmask_in_use || r300->hiz_in_use) {
r300_mark_atom_dirty(r300, &r300->hyperz_state);
}
}
@@ -274,10 +306,16 @@ static void r300_clear_render_target(struct pipe_context *pipe,
{
struct r300_context *r300 = r300_context(pipe);
+ r300->hyperz_locked = TRUE;
+ r300_mark_atom_dirty(r300, &r300->hyperz_state);
+
r300_blitter_begin(r300, R300_CLEAR_SURFACE);
util_blitter_clear_render_target(r300->blitter, dst, rgba,
dstx, dsty, width, height);
r300_blitter_end(r300);
+
+ r300->hyperz_locked = FALSE;
+ r300_mark_atom_dirty(r300, &r300->hyperz_state);
}
/* Clear a region of a depth stencil surface. */
@@ -290,42 +328,70 @@ static void r300_clear_depth_stencil(struct pipe_context *pipe,
unsigned width, unsigned height)
{
struct r300_context *r300 = r300_context(pipe);
+ struct pipe_framebuffer_state *fb =
+ (struct pipe_framebuffer_state*)r300->fb_state.state;
+
+ if (r300->zmask_in_use && !r300->hyperz_locked) {
+ if (fb->zsbuf->texture == dst->texture) {
+ r300_decompress_zmask(r300);
+ } else {
+ r300->hyperz_locked = TRUE;
+ r300_mark_atom_dirty(r300, &r300->hyperz_state);
+ }
+ }
r300_blitter_begin(r300, R300_CLEAR_SURFACE);
util_blitter_clear_depth_stencil(r300->blitter, dst, clear_flags, depth, stencil,
dstx, dsty, width, height);
r300_blitter_end(r300);
+
+ if (r300->hyperz_locked) {
+ r300->hyperz_locked = FALSE;
+ r300_mark_atom_dirty(r300, &r300->hyperz_state);
+ }
}
-/* Flush a depth stencil buffer. */
-void r300_flush_depth_stencil(struct pipe_context *pipe,
- struct pipe_resource *dst,
- unsigned level,
- unsigned layer)
+void r300_decompress_zmask(struct r300_context *r300)
{
- struct r300_context *r300 = r300_context(pipe);
- struct pipe_surface *dstsurf, surf_tmpl;
- struct r300_texture *tex = r300_texture(dst);
+ struct pipe_framebuffer_state *fb =
+ (struct pipe_framebuffer_state*)r300->fb_state.state;
- if (!tex->zmask_mem[level])
- return;
- if (!tex->zmask_in_use[level])
+ if (!r300->zmask_in_use || r300->hyperz_locked)
return;
- surf_tmpl.format = dst->format;
- surf_tmpl.usage = PIPE_BIND_DEPTH_STENCIL;
- surf_tmpl.u.tex.level = level;
- surf_tmpl.u.tex.first_layer = layer;
- surf_tmpl.u.tex.last_layer = layer;
- dstsurf = pipe->create_surface(pipe, dst, &surf_tmpl);
+ r300->zmask_decompress = TRUE;
+ r300_mark_atom_dirty(r300, &r300->hyperz_state);
- r300->z_decomp_rd = TRUE;
- r300_blitter_begin(r300, R300_CLEAR_SURFACE);
- util_blitter_flush_depth_stencil(r300->blitter, dstsurf);
+ r300_blitter_begin(r300, R300_CLEAR);
+ util_blitter_clear_depth_custom(r300->blitter, fb->width, fb->height, 0,
+ r300->dsa_decompress_zmask);
r300_blitter_end(r300);
- r300->z_decomp_rd = FALSE;
- tex->zmask_in_use[level] = FALSE;
+ r300->zmask_decompress = FALSE;
+ r300->zmask_in_use = FALSE;
+ r300_mark_atom_dirty(r300, &r300->hyperz_state);
+}
+
+void r300_decompress_zmask_locked_unsafe(struct r300_context *r300)
+{
+ struct pipe_framebuffer_state fb = {0};
+ fb.width = r300->locked_zbuffer->width;
+ fb.height = r300->locked_zbuffer->height;
+ fb.nr_cbufs = 0;
+ fb.zsbuf = r300->locked_zbuffer;
+
+ r300->context.set_framebuffer_state(&r300->context, &fb);
+ r300_decompress_zmask(r300);
+}
+
+void r300_decompress_zmask_locked(struct r300_context *r300)
+{
+ struct pipe_framebuffer_state saved_fb = {0};
+
+ util_copy_framebuffer_state(&saved_fb, r300->fb_state.state);
+ r300_decompress_zmask_locked_unsafe(r300);
+ r300->context.set_framebuffer_state(&r300->context, &saved_fb);
+ util_unreference_framebuffer_state(&saved_fb);
}
/* Copy a block of pixels from one surface to another using HW. */
@@ -340,8 +406,6 @@ static void r300_hw_copy_region(struct pipe_context* pipe,
struct r300_context* r300 = r300_context(pipe);
r300_blitter_begin(r300, R300_COPY);
-
- /* Do a copy */
util_blitter_copy_region(r300->blitter, dst, dst_level, dstx, dsty, dstz,
src, src_level, src_box, TRUE);
r300_blitter_end(r300);
@@ -356,54 +420,103 @@ static void r300_resource_copy_region(struct pipe_context *pipe,
unsigned src_level,
const struct pipe_box *src_box)
{
- enum pipe_format old_format = dst->format;
- enum pipe_format new_format = old_format;
- boolean is_depth;
- if (!pipe->screen->is_format_supported(pipe->screen,
- old_format, src->target,
- src->nr_samples,
- PIPE_BIND_RENDER_TARGET |
- PIPE_BIND_SAMPLER_VIEW, 0) &&
- util_format_is_plain(old_format)) {
- switch (util_format_get_blocksize(old_format)) {
+ struct r300_context *r300 = r300_context(pipe);
+ struct pipe_framebuffer_state *fb =
+ (struct pipe_framebuffer_state*)r300->fb_state.state;
+ struct pipe_resource old_src = *src;
+ struct pipe_resource old_dst = *dst;
+ struct pipe_resource new_src = old_src;
+ struct pipe_resource new_dst = old_dst;
+ const struct util_format_description *desc =
+ util_format_description(dst->format);
+ struct pipe_box box;
+
+ if (r300->zmask_in_use && !r300->hyperz_locked) {
+ if (fb->zsbuf->texture == src ||
+ fb->zsbuf->texture == dst) {
+ r300_decompress_zmask(r300);
+ } else {
+ r300->hyperz_locked = TRUE;
+ r300_mark_atom_dirty(r300, &r300->hyperz_state);
+ }
+ }
+
+ /* Handle non-renderable plain formats. */
+ if (desc->layout == UTIL_FORMAT_LAYOUT_PLAIN &&
+ (desc->colorspace == UTIL_FORMAT_COLORSPACE_SRGB ||
+ !pipe->screen->is_format_supported(pipe->screen,
+ src->format, src->target,
+ src->nr_samples,
+ PIPE_BIND_SAMPLER_VIEW) ||
+ !pipe->screen->is_format_supported(pipe->screen,
+ dst->format, dst->target,
+ dst->nr_samples,
+ PIPE_BIND_RENDER_TARGET))) {
+ switch (util_format_get_blocksize(old_dst.format)) {
case 1:
- new_format = PIPE_FORMAT_I8_UNORM;
+ new_dst.format = PIPE_FORMAT_I8_UNORM;
break;
case 2:
- new_format = PIPE_FORMAT_B4G4R4A4_UNORM;
+ new_dst.format = PIPE_FORMAT_B4G4R4A4_UNORM;
break;
case 4:
- new_format = PIPE_FORMAT_B8G8R8A8_UNORM;
+ new_dst.format = PIPE_FORMAT_B8G8R8A8_UNORM;
break;
case 8:
- new_format = PIPE_FORMAT_R16G16B16A16_UNORM;
+ new_dst.format = PIPE_FORMAT_R16G16B16A16_UNORM;
break;
default:
debug_printf("r300: surface_copy: Unhandled format: %s. Falling back to software.\n"
"r300: surface_copy: Software fallback doesn't work for tiled textures.\n",
- util_format_short_name(old_format));
+ util_format_short_name(dst->format));
}
+ new_src.format = new_dst.format;
}
- is_depth = util_format_get_component_bits(src->format, UTIL_FORMAT_COLORSPACE_ZS, 0) != 0;
- if (is_depth) {
- r300_flush_depth_stencil(pipe, src, src_level, src_box->z);
- }
- if (old_format != new_format) {
- r300_texture_reinterpret_format(pipe->screen,
- dst, new_format);
- r300_texture_reinterpret_format(pipe->screen,
- src, new_format);
+ /* Handle compressed formats. */
+ if (desc->layout == UTIL_FORMAT_LAYOUT_S3TC ||
+ desc->layout == UTIL_FORMAT_LAYOUT_RGTC) {
+ switch (util_format_get_blocksize(old_dst.format)) {
+ case 8:
+ /* 1 pixel = 4 bits,
+ * we set 1 pixel = 2 bytes ===> 4 times larger pixels. */
+ new_dst.format = PIPE_FORMAT_B4G4R4A4_UNORM;
+ break;
+ case 16:
+ /* 1 pixel = 8 bits,
+ * we set 1 pixel = 4 bytes ===> 4 times larger pixels. */
+ new_dst.format = PIPE_FORMAT_B8G8R8A8_UNORM;
+ break;
+ }
+
+ /* Since the pixels are 4 times larger, we must decrease
+ * the image size and the coordinates 4 times. */
+ new_src.format = new_dst.format;
+ new_dst.height0 = (new_dst.height0 + 3) / 4;
+ new_src.height0 = (new_src.height0 + 3) / 4;
+ dsty /= 4;
+ box = *src_box;
+ box.y /= 4;
+ box.height = (box.height + 3) / 4;
+ src_box = &box;
}
+ if (old_src.format != new_src.format)
+ r300_resource_set_properties(pipe->screen, src, 0, &new_src);
+ if (old_dst.format != new_dst.format)
+ r300_resource_set_properties(pipe->screen, dst, 0, &new_dst);
+
r300_hw_copy_region(pipe, dst, dst_level, dstx, dsty, dstz,
src, src_level, src_box);
- if (old_format != new_format) {
- r300_texture_reinterpret_format(pipe->screen,
- dst, old_format);
- r300_texture_reinterpret_format(pipe->screen,
- src, old_format);
+ if (old_src.format != new_src.format)
+ r300_resource_set_properties(pipe->screen, src, 0, &old_src);
+ if (old_dst.format != new_dst.format)
+ r300_resource_set_properties(pipe->screen, dst, 0, &old_dst);
+
+ if (r300->hyperz_locked) {
+ r300->hyperz_locked = FALSE;
+ r300_mark_atom_dirty(r300, &r300->hyperz_state);
}
}
diff --git a/src/gallium/drivers/r300/r300_cb.h b/src/gallium/drivers/r300/r300_cb.h
index 9d3d4fc1b19..b373937a1f9 100644
--- a/src/gallium/drivers/r300/r300_cb.h
+++ b/src/gallium/drivers/r300/r300_cb.h
@@ -61,40 +61,52 @@
* that they neatly hide away, and don't have the cost of function setup, so
* we're going to use them. */
-#ifdef DEBUG
-#define CB_DEBUG(x) x
-#else
-#define CB_DEBUG(x)
-#endif
-
-
/**
* Command buffer setup.
*/
+#ifdef DEBUG
+
#define CB_LOCALS \
- CB_DEBUG(int cs_count = 0;) \
+ int cs_count = 0; \
uint32_t *cs_ptr = NULL; \
- CB_DEBUG((void) cs_count;) (void) cs_ptr;
+ (void) cs_count; (void) cs_ptr
-#define NEW_CB(ptr, size) do { \
- assert(sizeof(*ptr) == sizeof(uint32_t)); \
- cs_ptr = (ptr) = (uint32_t*)malloc((size) * sizeof(uint32_t)); \
- CB_DEBUG(cs_count = size;) \
+#define BEGIN_CB(ptr, size) do { \
+ assert(sizeof(*(ptr)) == sizeof(uint32_t)); \
+ cs_count = (size); \
+ cs_ptr = (ptr); \
} while (0)
-#define BEGIN_CB(ptr, size) do { \
- assert(sizeof(*ptr) == sizeof(uint32_t)); \
- cs_ptr = ptr; \
- CB_DEBUG(cs_count = size;) \
+#define NEW_CB(ptr, size) \
+ do { \
+ assert(sizeof(*(ptr)) == sizeof(uint32_t)); \
+ cs_count = (size); \
+ cs_ptr = (ptr) = (uint32_t*)malloc((size) * sizeof(uint32_t)); \
} while (0)
#define END_CB do { \
- CB_DEBUG(if (cs_count != 0) \
+ if (cs_count != 0) \
debug_printf("r300: Warning: cs_count off by %d at (%s, %s:%i)\n", \
- cs_count, __FUNCTION__, __FILE__, __LINE__);) \
+ cs_count, __FUNCTION__, __FILE__, __LINE__); \
} while (0)
+#define CB_USED_DW(x) cs_count -= x
+
+#else
+
+#define CB_LOCALS \
+ uint32_t *cs_ptr = NULL; (void) cs_ptr
+
+#define NEW_CB(ptr, size) \
+ cs_ptr = (ptr) = (uint32_t*)malloc((size) * sizeof(uint32_t))
+
+#define BEGIN_CB(ptr, size) cs_ptr = (ptr)
+#define END_CB
+#define CB_USED_DW(x)
+
+#endif
+
/**
* Storing pure DWORDs.
@@ -103,13 +115,13 @@
#define OUT_CB(value) do { \
*cs_ptr = (value); \
cs_ptr++; \
- CB_DEBUG(cs_count--;) \
+ CB_USED_DW(1); \
} while (0)
#define OUT_CB_TABLE(values, count) do { \
memcpy(cs_ptr, values, count * sizeof(uint32_t)); \
cs_ptr += count; \
- CB_DEBUG(cs_count -= count;) \
+ CB_USED_DW(count); \
} while (0)
#define OUT_CB_32F(value) \
diff --git a/src/gallium/drivers/r300/r300_chipset.c b/src/gallium/drivers/r300/r300_chipset.c
index 583e981a4d2..990acea9f44 100644
--- a/src/gallium/drivers/r300/r300_chipset.c
+++ b/src/gallium/drivers/r300/r300_chipset.c
@@ -241,7 +241,6 @@ void r300_parse_chipset(struct r300_capabilities* caps)
case 0x5A42:
caps->family = CHIP_FAMILY_RS400;
caps->has_tcl = FALSE;
- caps->zmask_ram = RV3xx_ZMASK_SIZE;
break;
case 0x5A61:
@@ -256,8 +255,6 @@ void r300_parse_chipset(struct r300_capabilities* caps)
caps->family = CHIP_FAMILY_RS690;
caps->has_tcl = FALSE;
caps->is_r400 = TRUE;
- caps->hiz_ram = R300_HIZ_LIMIT;
- caps->zmask_ram = PIPE_ZMASK_SIZE;
break;
case 0x793F:
@@ -266,8 +263,6 @@ void r300_parse_chipset(struct r300_capabilities* caps)
caps->family = CHIP_FAMILY_RS600;
caps->has_tcl = FALSE;
caps->is_r400 = TRUE;
- caps->hiz_ram = R300_HIZ_LIMIT;
- caps->zmask_ram = PIPE_ZMASK_SIZE;
break;
case 0x796C:
@@ -277,8 +272,6 @@ void r300_parse_chipset(struct r300_capabilities* caps)
caps->family = CHIP_FAMILY_RS740;
caps->has_tcl = FALSE;
caps->is_r400 = TRUE;
- caps->hiz_ram = R300_HIZ_LIMIT;
- caps->zmask_ram = PIPE_ZMASK_SIZE;
break;
case 0x7100:
@@ -366,7 +359,7 @@ void r300_parse_chipset(struct r300_capabilities* caps)
caps->family = CHIP_FAMILY_RV530;
caps->num_vert_fpus = 5;
caps->is_r500 = TRUE;
- /*caps->hiz_ram = RV530_HIZ_LIMIT;*/
+ caps->hiz_ram = RV530_HIZ_LIMIT;
caps->zmask_ram = PIPE_ZMASK_SIZE;
break;
@@ -424,5 +417,6 @@ void r300_parse_chipset(struct r300_capabilities* caps)
}
caps->is_rv350 = caps->family >= CHIP_FAMILY_RV350;
+ caps->z_compress = caps->is_rv350 ? R300_ZCOMP_8X8 : R300_ZCOMP_4X4;
caps->dxtc_swizzle = caps->is_r400 || caps->is_r500;
}
diff --git a/src/gallium/drivers/r300/r300_chipset.h b/src/gallium/drivers/r300/r300_chipset.h
index f2035d20092..68943d561ba 100644
--- a/src/gallium/drivers/r300/r300_chipset.h
+++ b/src/gallium/drivers/r300/r300_chipset.h
@@ -33,6 +33,13 @@
#define PIPE_ZMASK_SIZE 4096
#define RV3xx_ZMASK_SIZE 5120
+/* The size of a compressed tile. Each compressed tile takes 2 bits
+ * in the ZMASK RAM, so there is always 16 tiles per one dword. */
+enum r300_zmask_compression {
+ R300_ZCOMP_4X4 = 4,
+ R300_ZCOMP_8X8 = 8
+};
+
/* Structure containing all the possible information about a specific Radeon
* in the R3xx, R4xx, and R5xx families. */
struct r300_capabilities {
@@ -50,10 +57,12 @@ struct r300_capabilities {
unsigned num_tex_units;
/* Whether or not TCL is physically present */
boolean has_tcl;
- /* Some chipsets do not have HiZ RAM - other have varying amounts . */
+ /* Some chipsets do not have HiZ RAM - other have varying amounts. */
int hiz_ram;
- /* some chipsets have zmask ram per pipe some don't */
+ /* Some chipsets have zmask ram per pipe some don't. */
int zmask_ram;
+ /* Compression mode for ZMASK. */
+ enum r300_zmask_compression z_compress;
/* Whether or not this is RV350 or newer, including all r400 and r500
* chipsets. The differences compared to the oldest r300 chips are:
* - Blend LTE/GTE thresholds
@@ -81,8 +90,6 @@ struct r300_capabilities {
boolean high_second_pipe;
/* DXTC texture swizzling. */
boolean dxtc_swizzle;
- /* Index bias (AKA index offset). */
- boolean index_bias_supported;
};
/* Enumerations for legibility and telling which card we're running on. */
diff --git a/src/gallium/drivers/r300/r300_context.c b/src/gallium/drivers/r300/r300_context.c
index 67b011a145c..720d666d98c 100644
--- a/src/gallium/drivers/r300/r300_context.c
+++ b/src/gallium/drivers/r300/r300_context.c
@@ -30,29 +30,28 @@
#include "r300_cb.h"
#include "r300_context.h"
#include "r300_emit.h"
-#include "r300_hyperz.h"
#include "r300_screen.h"
#include "r300_screen_buffer.h"
#include "r300_winsys.h"
-#include <inttypes.h>
-
static void r300_update_num_contexts(struct r300_screen *r300screen,
int diff)
{
+ pipe_mutex_lock(r300screen->num_contexts_mutex);
if (diff > 0) {
- p_atomic_inc(&r300screen->num_contexts);
+ r300screen->num_contexts++;
if (r300screen->num_contexts > 1)
util_slab_set_thread_safety(&r300screen->pool_buffers,
UTIL_SLAB_MULTITHREADED);
} else {
- p_atomic_dec(&r300screen->num_contexts);
+ r300screen->num_contexts--;
if (r300screen->num_contexts <= 1)
util_slab_set_thread_safety(&r300screen->pool_buffers,
UTIL_SLAB_SINGLETHREADED);
}
+ pipe_mutex_unlock(r300screen->num_contexts_mutex);
}
static void r300_release_referenced_objects(struct r300_context *r300)
@@ -79,22 +78,18 @@ static void r300_release_referenced_objects(struct r300_context *r300)
NULL);
}
- /* The dummy VBO. */
+ /* Manually-created vertex buffers. */
pipe_resource_reference(&r300->dummy_vb, NULL);
-
- /* The SWTCL VBO. */
pipe_resource_reference(&r300->vbo, NULL);
- /* Vertex buffers. */
- for (i = 0; i < r300->vertex_buffer_count; i++) {
- pipe_resource_reference(&r300->vertex_buffer[i].buffer, NULL);
- }
-
/* If there are any queries pending or not destroyed, remove them now. */
foreach_s(query, temp, &r300->query_list) {
remove_from_list(query);
FREE(query);
}
+
+ r300->context.delete_depth_stencil_alpha_state(&r300->context,
+ r300->dsa_decompress_zmask);
}
static void r300_destroy_context(struct pipe_context* context)
@@ -106,20 +101,12 @@ static void r300_destroy_context(struct pipe_context* context)
if (r300->draw)
draw_destroy(r300->draw);
- if (r300->upload_vb)
- u_upload_destroy(r300->upload_vb);
- if (r300->upload_ib)
- u_upload_destroy(r300->upload_ib);
-
- if (r300->tran.translate_cache)
- translate_cache_destroy(r300->tran.translate_cache);
+ if (r300->vbuf_mgr)
+ u_vbuf_mgr_destroy(r300->vbuf_mgr);
/* XXX: This function assumes r300->query_list was initialized */
r300_release_referenced_objects(r300);
- if (r300->zmask_mm)
- r300_hyperz_destroy_mm(r300);
-
if (r300->cs)
r300->rws->cs_destroy(r300->cs);
@@ -152,11 +139,11 @@ static void r300_destroy_context(struct pipe_context* context)
FREE(r300);
}
-void r300_flush_cb(void *data)
+static void r300_flush_callback(void *data, unsigned flags)
{
struct r300_context* const cs_context_copy = data;
- cs_context_copy->context.flush(&cs_context_copy->context, 0, NULL);
+ r300_flush(&cs_context_copy->context, flags, NULL);
}
#define R300_INIT_ATOM(atomname, atomsize) \
@@ -180,7 +167,6 @@ static boolean r300_setup_atoms(struct r300_context* r300)
boolean is_rv350 = r300->screen->caps.is_rv350;
boolean is_r500 = r300->screen->caps.is_r500;
boolean has_tcl = r300->screen->caps.has_tcl;
- boolean drm_2_3_0 = r300->rws->get_value(r300->rws, R300_VID_DRM_2_3_0);
boolean drm_2_6_0 = r300->rws->get_value(r300->rws, R300_VID_DRM_2_6_0);
boolean can_hyperz = r300->rws->get_value(r300->rws, R300_CAN_HYPERZ);
boolean has_hiz_ram = r300->screen->caps.hiz_ram > 0;
@@ -206,18 +192,18 @@ static boolean r300_setup_atoms(struct r300_context* r300)
/* ZB (unpipelined), SC. */
R300_INIT_ATOM(ztop_state, 2);
/* ZB, FG. */
- R300_INIT_ATOM(dsa_state, is_r500 ? 8 : 6);
+ R300_INIT_ATOM(dsa_state, is_r500 ? (drm_2_6_0 ? 10 : 8) : 6);
/* RB3D. */
R300_INIT_ATOM(blend_state, 8);
R300_INIT_ATOM(blend_color_state, is_r500 ? 3 : 2);
/* SC. */
R300_INIT_ATOM(scissor_state, 3);
/* GB, FG, GA, SU, SC, RB3D. */
- R300_INIT_ATOM(invariant_state, 16 + (is_rv350 ? 4 : 0));
+ R300_INIT_ATOM(invariant_state, 16 + (is_rv350 ? 4 : 0) + (is_r500 ? 4 : 0));
/* VAP. */
R300_INIT_ATOM(viewport_state, 9);
R300_INIT_ATOM(pvs_flush, 2);
- R300_INIT_ATOM(vap_invariant_state, 9);
+ R300_INIT_ATOM(vap_invariant_state, is_r500 ? 11 : 9);
R300_INIT_ATOM(vertex_stream_state, 0);
R300_INIT_ATOM(vs_state, 0);
R300_INIT_ATOM(vs_constants, 0);
@@ -226,7 +212,7 @@ static boolean r300_setup_atoms(struct r300_context* r300)
R300_INIT_ATOM(rs_block_state, 0);
R300_INIT_ATOM(rs_state, 0);
/* SC, US. */
- R300_INIT_ATOM(fb_state_pipelined, 5 + (drm_2_3_0 ? 3 : 0));
+ R300_INIT_ATOM(fb_state_pipelined, 8);
/* US. */
R300_INIT_ATOM(fs, 0);
R300_INIT_ATOM(fs_rc_constant_state, 0);
@@ -237,9 +223,9 @@ static boolean r300_setup_atoms(struct r300_context* r300)
if (can_hyperz) {
/* HiZ Clear */
if (has_hiz_ram)
- R300_INIT_ATOM(hiz_clear, 0);
+ R300_INIT_ATOM(hiz_clear, 4);
/* zmask clear */
- R300_INIT_ATOM(zmask_clear, 0);
+ R300_INIT_ATOM(zmask_clear, 4);
}
/* ZB (unpipelined), SU. */
R300_INIT_ATOM(query_start, 4);
@@ -341,7 +327,7 @@ static void r300_init_states(struct pipe_context *pipe)
/* Initialize the VAP invariant state. */
{
- BEGIN_CB(vap_invariant->cb, 9);
+ BEGIN_CB(vap_invariant->cb, r300->vap_invariant_state.size);
OUT_CB_REG(VAP_PVS_VTX_TIMEOUT_REG, 0xffff);
OUT_CB_REG_SEQ(R300_VAP_GB_VERT_CLIP_ADJ, 4);
OUT_CB_32F(1.0);
@@ -349,6 +335,10 @@ static void r300_init_states(struct pipe_context *pipe)
OUT_CB_32F(1.0);
OUT_CB_32F(1.0);
OUT_CB_REG(R300_VAP_PSC_SGN_NORM_CNTL, R300_SGN_NORM_NO_ZERO);
+
+ if (r300->screen->caps.is_r500) {
+ OUT_CB_REG(R500_VAP_TEX_TO_COLOR_CNTL, 0);
+ }
END_CB;
}
@@ -357,17 +347,22 @@ static void r300_init_states(struct pipe_context *pipe)
BEGIN_CB(invariant->cb, r300->invariant_state.size);
OUT_CB_REG(R300_GB_SELECT, 0);
OUT_CB_REG(R300_FG_FOG_BLEND, 0);
- OUT_CB_REG(R300_GA_ROUND_MODE, 1);
OUT_CB_REG(R300_GA_OFFSET, 0);
OUT_CB_REG(R300_SU_TEX_WRAP, 0);
OUT_CB_REG(R300_SU_DEPTH_SCALE, 0x4B7FFFFF);
OUT_CB_REG(R300_SU_DEPTH_OFFSET, 0);
OUT_CB_REG(R300_SC_EDGERULE, 0x2DA49525);
+ OUT_CB_REG(R300_SC_SCREENDOOR, 0xffffff);
if (r300->screen->caps.is_rv350) {
OUT_CB_REG(R500_RB3D_DISCARD_SRC_PIXEL_LTE_THRESHOLD, 0x01010101);
OUT_CB_REG(R500_RB3D_DISCARD_SRC_PIXEL_GTE_THRESHOLD, 0xFEFEFEFE);
}
+
+ if (r300->screen->caps.is_r500) {
+ OUT_CB_REG(R500_GA_COLOR_CONTROL_PS3, 0);
+ OUT_CB_REG(R500_SU_TEX_WRAP_PS3, 0);
+ }
END_CB;
}
@@ -443,39 +438,23 @@ struct pipe_context* r300_create_context(struct pipe_screen* screen,
r300_init_state_functions(r300);
r300_init_resource_functions(r300);
+ r300->vbuf_mgr = u_vbuf_mgr_create(&r300->context, 1024 * 1024, 16,
+ PIPE_BIND_VERTEX_BUFFER |
+ PIPE_BIND_INDEX_BUFFER,
+ U_VERTEX_FETCH_DWORD_ALIGNED);
+ if (!r300->vbuf_mgr)
+ goto fail;
+
r300->blitter = util_blitter_create(&r300->context);
if (r300->blitter == NULL)
goto fail;
/* Render functions must be initialized after blitter. */
r300_init_render_functions(r300);
-
- rws->cs_set_flush(r300->cs, r300_flush_cb, r300);
-
- /* setup hyper-z mm */
- if (r300->rws->get_value(r300->rws, R300_CAN_HYPERZ))
- if (!r300_hyperz_init_mm(r300))
- goto fail;
-
- r300->upload_ib = u_upload_create(&r300->context,
- 32 * 1024, 16,
- PIPE_BIND_INDEX_BUFFER);
-
- if (r300->upload_ib == NULL)
- goto fail;
-
- r300->upload_vb = u_upload_create(&r300->context,
- 128 * 1024, 16,
- PIPE_BIND_VERTEX_BUFFER);
- if (r300->upload_vb == NULL)
- goto fail;
-
- r300->tran.translate_cache = translate_cache_create();
- if (r300->tran.translate_cache == NULL)
- goto fail;
-
r300_init_states(&r300->context);
+ rws->cs_set_flush(r300->cs, r300_flush_callback, r300);
+
/* The KIL opcode needs the first texture unit to be enabled
* on r3xx-r4xx. In order to calm down the CS checker, we bind this
* dummy texture there. */
@@ -502,7 +481,8 @@ struct pipe_context* r300_create_context(struct pipe_screen* screen,
}
{
- struct pipe_resource vb = {};
+ struct pipe_resource vb;
+ memset(&vb, 0, sizeof(vb));
vb.target = PIPE_BUFFER;
vb.format = PIPE_FORMAT_R8_UNORM;
vb.bind = PIPE_BIND_VERTEX_BUFFER;
@@ -514,36 +494,45 @@ struct pipe_context* r300_create_context(struct pipe_screen* screen,
r300->dummy_vb = screen->resource_create(screen, &vb);
}
+ {
+ struct pipe_depth_stencil_alpha_state dsa;
+ memset(&dsa, 0, sizeof(dsa));
+ dsa.depth.writemask = 1;
+
+ r300->dsa_decompress_zmask =
+ r300->context.create_depth_stencil_alpha_state(&r300->context,
+ &dsa);
+ }
+
+ /* Print driver info. */
+#ifdef DEBUG
+ {
+#else
+ if (DBG_ON(r300, DBG_INFO)) {
+#endif
+ fprintf(stderr,
+ "r300: DRM version: %d.%d.%d, Name: %s, ID: 0x%04x, GB: %d, Z: %d\n"
+ "r300: GART size: %d MB, VRAM size: %d MB\n"
+ "r300: AA compression: %s, Z compression: %s, HiZ: %s\n",
+ rws->get_value(rws, R300_VID_DRM_MAJOR),
+ rws->get_value(rws, R300_VID_DRM_MINOR),
+ rws->get_value(rws, R300_VID_DRM_PATCHLEVEL),
+ screen->get_name(screen),
+ rws->get_value(rws, R300_VID_PCI_ID),
+ rws->get_value(rws, R300_VID_GB_PIPES),
+ rws->get_value(rws, R300_VID_Z_PIPES),
+ rws->get_value(rws, R300_VID_GART_SIZE) >> 20,
+ rws->get_value(rws, R300_VID_VRAM_SIZE) >> 20,
+ rws->get_value(rws, R300_CAN_AACOMPRESS) ? "YES" : "NO",
+ rws->get_value(rws, R300_CAN_HYPERZ) &&
+ r300->screen->caps.zmask_ram ? "YES" : "NO",
+ rws->get_value(rws, R300_CAN_HYPERZ) &&
+ r300->screen->caps.hiz_ram ? "YES" : "NO");
+ }
+
return &r300->context;
- fail:
+fail:
r300_destroy_context(&r300->context);
return NULL;
}
-
-void r300_finish(struct r300_context *r300)
-{
- struct pipe_framebuffer_state *fb;
- unsigned i;
-
- /* This is a preliminary implementation of glFinish.
- *
- * The ideal implementation should use something like EmitIrqLocked and
- * WaitIrq, or better, real fences.
- */
- if (r300->fb_state.state) {
- fb = r300->fb_state.state;
-
- for (i = 0; i < fb->nr_cbufs; i++) {
- if (fb->cbufs[i]->texture) {
- r300->rws->buffer_wait(r300->rws,
- r300_texture(fb->cbufs[i]->texture)->buffer);
- return;
- }
- }
- if (fb->zsbuf && fb->zsbuf->texture) {
- r300->rws->buffer_wait(r300->rws,
- r300_texture(fb->zsbuf->texture)->buffer);
- }
- }
-}
diff --git a/src/gallium/drivers/r300/r300_context.h b/src/gallium/drivers/r300/r300_context.h
index 39dcde06106..e395f41290e 100644
--- a/src/gallium/drivers/r300/r300_context.h
+++ b/src/gallium/drivers/r300/r300_context.h
@@ -30,11 +30,11 @@
#include "pipe/p_context.h"
#include "util/u_inlines.h"
#include "util/u_transfer.h"
-
-#include "translate/translate_cache.h"
+#include "util/u_vbuf_mgr.h"
#include "r300_defines.h"
#include "r300_screen.h"
+#include "r300_winsys.h"
struct u_upload_mgr;
struct r300_context;
@@ -65,11 +65,15 @@ struct r300_aa_state {
};
struct r300_blend_state {
- uint32_t cb[8];
+ struct pipe_blend_state state;
+
+ uint32_t cb_clamp[8];
+ uint32_t cb_noclamp[8];
uint32_t cb_no_readwrite[8];
};
struct r300_blend_color_state {
+ struct pipe_blend_color state;
uint32_t cb[3];
};
@@ -91,9 +95,24 @@ struct r300_dsa_state {
uint32_t stencil_ref_mask; /* R300_ZB_STENCILREFMASK: 0x4f08 */
uint32_t cb_reg;
uint32_t stencil_ref_bf; /* R500_ZB_STENCILREFMASK_BF: 0x4fd4 */
+ uint32_t cb_reg1;
+ uint32_t alpha_value; /* R500_FG_ALPHA_VALUE: 0x4be0 */
+
+ /* The same, but for FP16 alpha test. */
+ uint32_t cb_begin_fp16;
+ uint32_t alpha_function_fp16; /* R300_FG_ALPHA_FUNC: 0x4bd4 */
+ uint32_t cb_reg_seq_fp16;
+ uint32_t z_buffer_control_fp16; /* R300_ZB_CNTL: 0x4f00 */
+ uint32_t z_stencil_control_fp16; /* R300_ZB_ZSTENCILCNTL: 0x4f04 */
+ uint32_t stencil_ref_mask_fp16; /* R300_ZB_STENCILREFMASK: 0x4f08 */
+ uint32_t cb_reg_fp16;
+ uint32_t stencil_ref_bf_fp16; /* R500_ZB_STENCILREFMASK_BF: 0x4fd4 */
+ uint32_t cb_reg1_fp16;
+ uint32_t alpha_value_fp16; /* R500_FG_ALPHA_VALUE: 0x4be0 */
/* The second command buffer disables zbuffer reads and writes. */
- uint32_t cb_no_readwrite[8];
+ uint32_t cb_zb_no_readwrite[10];
+ uint32_t cb_fp16_zb_no_readwrite[10];
/* Whether a two-sided stencil is enabled. */
boolean two_sided;
@@ -102,7 +121,6 @@ struct r300_dsa_state {
};
struct r300_hyperz_state {
- int current_func; /* -1 after a clear before first op */
int flush;
/* This is actually a command buffer with named dwords. */
uint32_t cb_flush_begin;
@@ -121,7 +139,7 @@ struct r300_gpu_flush {
uint32_t cb_flush_clean[6];
};
-#define RS_STATE_MAIN_SIZE 23
+#define RS_STATE_MAIN_SIZE 25
struct r300_rs_state {
/* Original rasterizer state. */
@@ -189,11 +207,6 @@ struct r300_sampler_view {
uint32_t texcache_region;
};
-struct r300_texture_fb_state {
- uint32_t pitch[R300_MAX_TEXTURE_LEVELS]; /* COLORPITCH or DEPTHPITCH. */
- uint32_t format; /* US_OUT_FMT or R300_ZB_FORMAT */
-};
-
struct r300_texture_sampler_state {
struct r300_texture_format_state format;
uint32_t filter0; /* R300_TX_FILTER0: 0x4400 */
@@ -225,11 +238,11 @@ struct r300_vertex_stream_state {
};
struct r300_invariant_state {
- uint32_t cb[20];
+ uint32_t cb[24];
};
struct r300_vap_invariant_state {
- uint32_t cb[9];
+ uint32_t cb[11];
};
struct r300_viewport_state {
@@ -273,14 +286,12 @@ struct r300_query {
/* How many results have been written, in dwords. It's incremented
* after end_query and flush. */
unsigned num_results;
- /* if we've flushed the query */
- boolean flushed;
/* if begin has been emitted */
boolean begin_emitted;
/* The buffer where query results are stored. */
- struct r300_winsys_buffer *buffer;
- struct r300_winsys_cs_buffer *cs_buffer;
+ struct r300_winsys_bo *buf;
+ struct r300_winsys_cs_handle *cs_buf;
/* The size of the buffer. */
unsigned buffer_size;
/* The domain of the buffer. */
@@ -291,33 +302,19 @@ struct r300_query {
struct r300_query* next;
};
-/* Fence object.
- *
- * This is a fake fence. Instead of syncing with the fence, we sync
- * with the context, which is inefficient but compliant.
- *
- * This is not a subclass of pipe_fence_handle because pipe_fence_handle is
- * never actually fully defined. So, rather than have it as a member, and do
- * subclass-style casting, we treat pipe_fence_handle as an opaque, and just
- * trust that our state tracker does not ever mess up fence objects.
- */
-struct r300_fence {
- struct pipe_reference reference;
- struct r300_context *ctx;
- boolean signalled;
-};
-
struct r300_surface {
struct pipe_surface base;
/* Winsys buffer backing the texture. */
- struct r300_winsys_buffer *buffer;
- struct r300_winsys_cs_buffer *cs_buffer;
+ struct r300_winsys_bo *buf;
+ struct r300_winsys_cs_handle *cs_buf;
enum r300_buffer_domain domain;
uint32_t offset; /* COLOROFFSET or DEPTHOFFSET. */
uint32_t pitch; /* COLORPITCH or DEPTHPITCH. */
+ uint32_t pitch_zmask; /* ZMASK_PITCH */
+ uint32_t pitch_hiz; /* HIZ_PITCH */
uint32_t format; /* US_OUT_FMT or ZB_FORMAT. */
/* Parameters dedicated to the CBZB clear. */
@@ -329,13 +326,9 @@ struct r300_surface {
/* Whether the CBZB clear is allowed on the surface. */
boolean cbzb_allowed;
-
};
struct r300_texture_desc {
- /* Parent class. */
- struct u_resource b;
-
/* Width, height, and depth.
* Most of the time, these are equal to pipe_texture::width0, height0,
* and depth0. However, NPOT 3D textures must have dimensions aligned
@@ -387,28 +380,39 @@ struct r300_texture_desc {
/* Whether CBZB fast color clear is allowed on the miplevel. */
boolean cbzb_allowed[R300_MAX_TEXTURE_LEVELS];
+
+ /* Zbuffer compression info for each miplevel. */
+ boolean zcomp8x8[R300_MAX_TEXTURE_LEVELS];
+ /* If zero, then disable Z compression/HiZ. */
+ unsigned zmask_dwords[R300_MAX_TEXTURE_LEVELS];
+ unsigned hiz_dwords[R300_MAX_TEXTURE_LEVELS];
+ /* Zmask/HiZ strides for each miplevel. */
+ unsigned zmask_stride_in_pixels[R300_MAX_TEXTURE_LEVELS];
+ unsigned hiz_stride_in_pixels[R300_MAX_TEXTURE_LEVELS];
};
-struct r300_texture {
- struct r300_texture_desc desc;
+struct r300_resource
+{
+ struct u_vbuf_resource b;
+ /* Winsys buffer backing this resource. */
+ struct r300_winsys_bo *buf;
+ struct r300_winsys_cs_handle *cs_buf;
enum r300_buffer_domain domain;
+ unsigned buf_size;
+
+ /* Constant buffers are in user memory. */
+ uint8_t *constant_buffer;
- /* Pipe buffer backing this texture. */
- struct r300_winsys_buffer *buffer;
- struct r300_winsys_cs_buffer *cs_buffer;
+ /* Texture description (addressing, layout, special features). */
+ struct r300_texture_desc tex;
/* Registers carrying texture format data. */
/* Only format-independent bits should be filled in. */
struct r300_texture_format_state tx_format;
- /* All bits should be filled in. */
- struct r300_texture_fb_state fb_state;
- /* hyper-z memory allocs */
- struct mem_block *hiz_mem[R300_MAX_TEXTURE_LEVELS];
- struct mem_block *zmask_mem[R300_MAX_TEXTURE_LEVELS];
- boolean zmask_in_use[R300_MAX_TEXTURE_LEVELS];
- boolean hiz_in_use[R300_MAX_TEXTURE_LEVELS];
+ /* Where the texture starts in the buffer. */
+ unsigned tex_offset;
/* This is the level tiling flags were last time set for.
* It's used to prevent redundant tiling-flags changes from happening.*/
@@ -418,33 +422,29 @@ struct r300_texture {
struct r300_vertex_element_state {
unsigned count;
struct pipe_vertex_element velem[PIPE_MAX_ATTRIBS];
+ unsigned format_size[PIPE_MAX_ATTRIBS];
- /* If (velem[i].src_format != hw_format[i]), the vertex buffer
- * referenced by this vertex element cannot be used for rendering and
- * its vertex data must be translated to hw_format[i]. */
- enum pipe_format hw_format[PIPE_MAX_ATTRIBS];
- unsigned hw_format_size[PIPE_MAX_ATTRIBS];
+ struct u_vbuf_mgr_elements *vmgr_elements;
/* The size of the vertex, in dwords. */
unsigned vertex_size_dwords;
- /* This might mean two things:
- * - src_format != hw_format, as discussed above.
- * - src_offset % 4 != 0. */
- boolean incompatible_layout;
-
struct r300_vertex_stream_state vertex_stream;
};
-struct r300_translate_context {
- /* Translate cache for incompatible vertex offset/stride/format fallback. */
- struct translate_cache *translate_cache;
+enum r300_hiz_func {
+ HIZ_FUNC_NONE,
+
+ /* The function, when determined, is set in stone
+ * until the next HiZ clear. */
- /* The vertex buffer slot containing the translated buffer. */
- unsigned vb_slot;
+ /* MAX is written to the HiZ buffer.
+ * Used for LESS, LEQUAL. */
+ HIZ_FUNC_MAX,
- /* Saved and new vertex element state. */
- void *saved_velems, *new_velems;
+ /* MIN is written to the HiZ buffer.
+ * Used for GREATER, GEQUAL. */
+ HIZ_FUNC_MIN,
};
struct r300_context {
@@ -473,8 +473,6 @@ struct r300_context {
struct blitter_context* blitter;
/* Stencil two-sided reference value fallback. */
struct r300_stencilref_context *stencilref_fallback;
- /* For translating vertex buffers having incompatible vertex layout. */
- struct r300_translate_context tran;
/* The KIL opcode needs the first texture unit to be enabled
* on r3xx-r4xx. In order to calm down the CS checker, we bind this
@@ -556,13 +554,8 @@ struct r300_context {
/* The pointers to the first and the last atom. */
struct r300_atom *first_dirty, *last_dirty;
- /* Vertex buffers for Gallium. */
- struct pipe_vertex_buffer vertex_buffer[PIPE_MAX_ATTRIBS];
- int vertex_buffer_count;
- int vertex_buffer_max_index;
/* Vertex elements for Gallium. */
struct r300_vertex_element_state *velems;
- bool any_user_vbs;
struct pipe_index_buffer index_buffer;
@@ -587,21 +580,26 @@ struct r300_context {
int sprite_coord_enable;
/* Whether two-sided color selection is enabled (AKA light_twoside). */
boolean two_sided_color;
- /* Incompatible vertex buffer layout? (misaligned stride or buffer_offset) */
- boolean incompatible_vb_layout;
-#define R300_Z_COMPRESS_44 1
-#define RV350_Z_COMPRESS_88 2
- int z_compression;
+ /* Whether fast color clear is enabled. */
boolean cbzb_clear;
- boolean z_decomp_rd;
-
- /* two mem block managers for hiz/zmask ram space */
- struct mem_block *hiz_mm;
- struct mem_block *zmask_mm;
-
- /* upload managers */
- struct u_upload_mgr *upload_vb;
- struct u_upload_mgr *upload_ib;
+ /* Whether ZMASK is enabled. */
+ boolean zmask_in_use;
+ /* Whether ZMASK is being decompressed. */
+ boolean zmask_decompress;
+ /* Whether ZMASK/HIZ is locked, i.e. should be disabled and cannot be taken over. */
+ boolean hyperz_locked;
+ /* The zbuffer the ZMASK of which is locked. */
+ struct pipe_surface *locked_zbuffer;
+ /* Whether HIZ is enabled. */
+ boolean hiz_in_use;
+ /* HiZ function. Can be either MIN or MAX. */
+ enum r300_hiz_func hiz_func;
+ /* HiZ clear value. */
+ uint32_t hiz_clear_value;
+
+ void *dsa_decompress_zmask;
+
+ struct u_vbuf_mgr *vbuf_mgr;
struct util_slab_mempool pool_transfers;
@@ -611,13 +609,12 @@ struct r300_context {
/* const tracking for VS */
int vs_const_base;
- /* AOS (PACKET3_3D_LOAD_VBPNTR) command buffer for the case offset=0. */
- uint32_t aos_cb[(16 * 3 + 1) / 2];
- boolean aos_dirty;
-
- /* Whether any buffer (FB, textures, VBOs) has been set, but buffers
- * haven't been validated yet. */
- boolean validate_buffers;
+ /* Vertex array state info */
+ boolean vertex_arrays_dirty;
+ boolean vertex_arrays_indexed;
+ int vertex_arrays_offset;
+ int vertex_arrays_instance_id;
+ boolean instancing_enabled;
};
#define foreach_atom(r300, atom) \
@@ -637,9 +634,9 @@ static INLINE struct r300_surface* r300_surface(struct pipe_surface* surf)
return (struct r300_surface*)surf;
}
-static INLINE struct r300_texture* r300_texture(struct pipe_resource* tex)
+static INLINE struct r300_resource* r300_resource(struct pipe_resource* tex)
{
- return (struct r300_texture*)tex;
+ return (struct r300_resource*)tex;
}
static INLINE struct r300_context* r300_context(struct pipe_context* context)
@@ -652,12 +649,25 @@ static INLINE struct r300_fragment_shader *r300_fs(struct r300_context *r300)
return (struct r300_fragment_shader*)r300->fs.state;
}
+static INLINE void r300_mark_atom_dirty(struct r300_context *r300,
+ struct r300_atom *atom)
+{
+ atom->dirty = TRUE;
+
+ if (!r300->first_dirty) {
+ r300->first_dirty = atom;
+ r300->last_dirty = atom+1;
+ } else {
+ if (atom < r300->first_dirty)
+ r300->first_dirty = atom;
+ else if (atom+1 > r300->last_dirty)
+ r300->last_dirty = atom+1;
+ }
+}
+
struct pipe_context* r300_create_context(struct pipe_screen* screen,
void *priv);
-void r300_finish(struct r300_context *r300);
-void r300_flush_cb(void *data);
-
/* Context initialization. */
struct draw_stage* r300_draw_stage(struct r300_context* r300);
void r300_init_blit_functions(struct r300_context *r300);
@@ -668,10 +678,17 @@ void r300_init_state_functions(struct r300_context* r300);
void r300_init_resource_functions(struct r300_context* r300);
/* r300_blit.c */
-void r300_flush_depth_stencil(struct pipe_context *pipe,
- struct pipe_resource *dst,
- unsigned level,
- unsigned layer);
+void r300_decompress_zmask(struct r300_context *r300);
+void r300_decompress_zmask_locked_unsafe(struct r300_context *r300);
+void r300_decompress_zmask_locked(struct r300_context *r300);
+
+/* r300_flush.c */
+void r300_flush(struct pipe_context *pipe,
+ unsigned flags,
+ struct pipe_fence_handle **fence);
+
+/* r300_hyperz.c */
+void r300_update_hyperz_state(struct r300_context* r300);
/* r300_query.c */
void r300_resume_query(struct r300_context *r300,
@@ -679,8 +696,6 @@ void r300_resume_query(struct r300_context *r300,
void r300_stop_query(struct r300_context *r300);
/* r300_render_translate.c */
-void r300_begin_vertex_translate(struct r300_context *r300);
-void r300_end_vertex_translate(struct r300_context *r300);
void r300_translate_index_buffer(struct r300_context *r300,
struct pipe_resource **index_buffer,
unsigned *index_size, unsigned index_offset,
@@ -696,29 +711,16 @@ void r500_emit_index_bias(struct r300_context *r300, int index_bias);
/* r300_state.c */
enum r300_fb_state_change {
R300_CHANGED_FB_STATE = 0,
- R300_CHANGED_CBZB_FLAG,
- R300_CHANGED_ZCLEAR_FLAG
+ R300_CHANGED_HYPERZ_FLAG,
+ R300_CHANGED_MULTIWRITE
};
void r300_mark_fb_state_dirty(struct r300_context *r300,
enum r300_fb_state_change change);
void r300_mark_fs_code_dirty(struct r300_context *r300);
-static INLINE void r300_mark_atom_dirty(struct r300_context *r300,
- struct r300_atom *atom)
-{
- atom->dirty = TRUE;
-
- if (!r300->first_dirty) {
- r300->first_dirty = atom;
- r300->last_dirty = atom+1;
- } else {
- if (atom < r300->first_dirty)
- r300->first_dirty = atom;
- if (atom+1 > r300->last_dirty)
- r300->last_dirty = atom+1;
- }
-}
+/* r300_state_derived.c */
+void r300_update_derived_state(struct r300_context* r300);
/* r300_debug.c */
void r500_dump_rs_block(struct r300_rs_block *rs);
diff --git a/src/gallium/drivers/r300/r300_cs.h b/src/gallium/drivers/r300/r300_cs.h
index 67fb0096a8c..2e52dfa43c6 100644
--- a/src/gallium/drivers/r300/r300_cs.h
+++ b/src/gallium/drivers/r300/r300_cs.h
@@ -35,12 +35,6 @@
* that they neatly hide away, and don't have the cost of function setup,so
* we're going to use them. */
-#ifdef DEBUG
-#define CS_DEBUG(x) x
-#else
-#define CS_DEBUG(x)
-#endif
-
/**
* Command submission setup.
*/
@@ -50,22 +44,29 @@
struct r300_winsys_screen *cs_winsys = (context)->rws; \
int cs_count = 0; (void) cs_count; (void) cs_winsys;
+#ifdef DEBUG
+
#define BEGIN_CS(size) do { \
assert(size <= (R300_MAX_CMDBUF_DWORDS - cs_copy->cdw)); \
- CS_DEBUG(cs_count = size;) \
+ cs_count = size; \
} while (0)
-#ifdef DEBUG
#define END_CS do { \
if (cs_count != 0) \
debug_printf("r300: Warning: cs_count off by %d at (%s, %s:%i)\n", \
cs_count, __FUNCTION__, __FILE__, __LINE__); \
cs_count = 0; \
} while (0)
+
+#define CS_USED_DW(x) cs_count -= (x)
+
#else
+
+#define BEGIN_CS(size)
#define END_CS
-#endif
+#define CS_USED_DW(x)
+#endif
/**
* Writing pure DWORDs.
@@ -73,7 +74,7 @@
#define OUT_CS(value) do { \
cs_copy->buf[cs_copy->cdw++] = (value); \
- CS_DEBUG(cs_count--;) \
+ CS_USED_DW(1); \
} while (0)
#define OUT_CS_32F(value) \
@@ -98,7 +99,7 @@
#define OUT_CS_TABLE(values, count) do { \
memcpy(cs_copy->buf + cs_copy->cdw, values, count * 4); \
cs_copy->cdw += count; \
- CS_DEBUG(cs_count -= count;) \
+ CS_USED_DW(count); \
} while (0)
@@ -106,27 +107,11 @@
* Writing relocations.
*/
-#define OUT_CS_RELOC(bo, offset, rd, wd) do { \
- assert(bo); \
- OUT_CS(offset); \
- cs_winsys->cs_write_reloc(cs_copy, bo, rd, wd); \
- CS_DEBUG(cs_count -= 2;) \
-} while (0)
-
-#define OUT_CS_BUF_RELOC(bo, offset, rd, wd) do { \
- assert(bo); \
- OUT_CS_RELOC(r300_buffer(bo)->cs_buf, offset, rd, wd); \
-} while (0)
-
-#define OUT_CS_TEX_RELOC(tex, offset, rd, wd) do { \
- assert(tex); \
- OUT_CS_RELOC(tex->cs_buffer, offset, rd, wd); \
-} while (0)
-
-#define OUT_CS_BUF_RELOC_NO_OFFSET(bo, rd, wd) do { \
- assert(bo); \
- cs_winsys->cs_write_reloc(cs_copy, r300_buffer(bo)->cs_buf, rd, wd); \
- CS_DEBUG(cs_count -= 2;) \
+#define OUT_CS_RELOC(r) do { \
+ assert((r)); \
+ assert((r)->cs_buf); \
+ cs_winsys->cs_write_reloc(cs_copy, (r)->cs_buf); \
+ CS_USED_DW(2); \
} while (0)
@@ -135,7 +120,7 @@
*/
#define WRITE_CS_TABLE(values, count) do { \
- CS_DEBUG(assert(cs_count == 0);) \
+ assert(cs_count == 0); \
memcpy(cs_copy->buf + cs_copy->cdw, (values), (count) * 4); \
cs_copy->cdw += (count); \
} while (0)
diff --git a/src/gallium/drivers/r300/r300_debug.c b/src/gallium/drivers/r300/r300_debug.c
index 52031dd97b5..b60cfd1f248 100644
--- a/src/gallium/drivers/r300/r300_debug.c
+++ b/src/gallium/drivers/r300/r300_debug.c
@@ -27,6 +27,7 @@
#include <stdio.h>
static const struct debug_named_value debug_options[] = {
+ { "info", DBG_INFO, "Print hardware info"},
{ "fp", DBG_FP, "Log fragment program compilation" },
{ "vp", DBG_VP, "Log vertex program compilation" },
{ "pstat", DBG_P_STAT, "Log vertex/fragment program stats" },
@@ -41,6 +42,7 @@ static const struct debug_named_value debug_options[] = {
{ "fb", DBG_FB, "Log framebuffer" },
{ "cbzb", DBG_CBZB, "Log fast color clear info" },
{ "hyperz", DBG_HYPERZ, "Log HyperZ info" },
+ { "upload", DBG_UPLOAD, "Log user buffer upload info" },
{ "scissor", DBG_SCISSOR, "Log scissor info" },
{ "fakeocc", DBG_FAKE_OCC, "Use fake occlusion queries" },
{ "anisohq", DBG_ANISOHQ, "Use high quality anisotropic filtering" },
@@ -48,6 +50,8 @@ static const struct debug_named_value debug_options[] = {
{ "noimmd", DBG_NO_IMMD, "Disable immediate mode" },
{ "noopt", DBG_NO_OPT, "Disable shader optimizations" },
{ "nocbzb", DBG_NO_CBZB, "Disable fast color clear" },
+ { "nozmask", DBG_NO_ZMASK, "Disable zbuffer compression" },
+ { "nohiz", DBG_NO_HIZ, "Disable hierarchical zbuffer" },
/* must be last */
DEBUG_NAMED_VALUE_END
diff --git a/src/gallium/drivers/r300/r300_emit.c b/src/gallium/drivers/r300/r300_emit.c
index 04a5bd92d12..e17a907e77e 100644
--- a/src/gallium/drivers/r300/r300_emit.c
+++ b/src/gallium/drivers/r300/r300_emit.c
@@ -26,7 +26,6 @@
#include "util/u_format.h"
#include "util/u_math.h"
#include "util/u_mm.h"
-#include "util/u_simple_list.h"
#include "r300_context.h"
#include "r300_cb.h"
@@ -46,7 +45,10 @@ void r300_emit_blend_state(struct r300_context* r300,
CS_LOCALS(r300);
if (fb->nr_cbufs) {
- WRITE_CS_TABLE(blend->cb, size);
+ if (fb->cbufs[0]->format == PIPE_FORMAT_R16G16B16A16_FLOAT)
+ WRITE_CS_TABLE(blend->cb_noclamp, size);
+ else
+ WRITE_CS_TABLE(blend->cb_clamp, size);
} else {
WRITE_CS_TABLE(blend->cb_no_readwrite, size);
}
@@ -78,9 +80,15 @@ void r300_emit_dsa_state(struct r300_context* r300, unsigned size, void* state)
CS_LOCALS(r300);
if (fb->zsbuf) {
- WRITE_CS_TABLE(&dsa->cb_begin, size);
+ if (fb->nr_cbufs && fb->cbufs[0]->format == PIPE_FORMAT_R16G16B16A16_FLOAT)
+ WRITE_CS_TABLE(&dsa->cb_begin_fp16, size);
+ else
+ WRITE_CS_TABLE(&dsa->cb_begin, size);
} else {
- WRITE_CS_TABLE(dsa->cb_no_readwrite, size);
+ if (fb->nr_cbufs && fb->cbufs[0]->format == PIPE_FORMAT_R16G16B16A16_FLOAT)
+ WRITE_CS_TABLE(dsa->cb_fp16_zb_no_readwrite, size);
+ else
+ WRITE_CS_TABLE(dsa->cb_zb_no_readwrite, size);
}
}
@@ -90,7 +98,7 @@ static void get_rc_constant_state(
struct rc_constant * constant)
{
struct r300_textures_state* texstate = r300->textures_state.state;
- struct r300_texture *tex;
+ struct r300_resource *tex;
assert(constant->Type == RC_CONSTANT_STATE);
@@ -102,19 +110,19 @@ static void get_rc_constant_state(
/* Factor for converting rectangle coords to
* normalized coords. Should only show up on non-r500. */
case RC_STATE_R300_TEXRECT_FACTOR:
- tex = r300_texture(texstate->sampler_views[constant->u.State[1]]->base.texture);
- vec[0] = 1.0 / tex->desc.width0;
- vec[1] = 1.0 / tex->desc.height0;
+ tex = r300_resource(texstate->sampler_views[constant->u.State[1]]->base.texture);
+ vec[0] = 1.0 / tex->tex.width0;
+ vec[1] = 1.0 / tex->tex.height0;
vec[2] = 0;
vec[3] = 1;
break;
case RC_STATE_R300_TEXSCALE_FACTOR:
- tex = r300_texture(texstate->sampler_views[constant->u.State[1]]->base.texture);
+ tex = r300_resource(texstate->sampler_views[constant->u.State[1]]->base.texture);
/* Add a small number to the texture size to work around rounding errors in hw. */
- vec[0] = tex->desc.b.b.width0 / (tex->desc.width0 + 0.001f);
- vec[1] = tex->desc.b.b.height0 / (tex->desc.height0 + 0.001f);
- vec[2] = tex->desc.b.b.depth0 / (tex->desc.depth0 + 0.001f);
+ vec[0] = tex->b.b.b.width0 / (tex->tex.width0 + 0.001f);
+ vec[1] = tex->b.b.b.height0 / (tex->tex.height0 + 0.001f);
+ vec[2] = tex->b.b.b.depth0 / (tex->tex.depth0 + 0.001f);
vec[3] = 1;
break;
@@ -353,11 +361,9 @@ void r300_emit_aa_state(struct r300_context *r300, unsigned size, void *state)
OUT_CS_REG(R300_GB_AA_CONFIG, aa->aa_config);
if (aa->dest) {
- OUT_CS_REG_SEQ(R300_RB3D_AARESOLVE_OFFSET, 1);
- OUT_CS_RELOC(aa->dest->cs_buffer, aa->dest->offset, 0, aa->dest->domain);
-
- OUT_CS_REG_SEQ(R300_RB3D_AARESOLVE_PITCH, 1);
- OUT_CS_RELOC(aa->dest->cs_buffer, aa->dest->pitch, 0, aa->dest->domain);
+ OUT_CS_REG(R300_RB3D_AARESOLVE_OFFSET, aa->dest->offset);
+ OUT_CS_RELOC(aa->dest);
+ OUT_CS_REG(R300_RB3D_AARESOLVE_PITCH, aa->dest->pitch);
}
OUT_CS_REG(R300_RB3D_AARESOLVE_CTL, aa->aaresolve_ctl);
@@ -370,6 +376,8 @@ void r300_emit_fb_state(struct r300_context* r300, unsigned size, void* state)
struct r300_surface* surf;
unsigned i;
boolean can_hyperz = r300->rws->get_value(r300->rws, R300_CAN_HYPERZ);
+ uint32_t rb3d_cctl = 0;
+
CS_LOCALS(r300);
BEGIN_CS(size);
@@ -377,21 +385,24 @@ void r300_emit_fb_state(struct r300_context* r300, unsigned size, void* state)
/* NUM_MULTIWRITES replicates COLOR[0] to all colorbuffers, which is not
* what we usually want. */
if (r300->screen->caps.is_r500) {
- OUT_CS_REG(R300_RB3D_CCTL,
- R300_RB3D_CCTL_INDEPENDENT_COLORFORMAT_ENABLE_ENABLE);
- } else {
- OUT_CS_REG(R300_RB3D_CCTL, 0);
+ rb3d_cctl = R300_RB3D_CCTL_INDEPENDENT_COLORFORMAT_ENABLE_ENABLE;
}
+ if (fb->nr_cbufs &&
+ r300_fragment_shader_writes_all(r300_fs(r300))) {
+ rb3d_cctl |= R300_RB3D_CCTL_NUM_MULTIWRITES(fb->nr_cbufs);
+ }
+
+ OUT_CS_REG(R300_RB3D_CCTL, rb3d_cctl);
/* Set up colorbuffers. */
for (i = 0; i < fb->nr_cbufs; i++) {
surf = r300_surface(fb->cbufs[i]);
- OUT_CS_REG_SEQ(R300_RB3D_COLOROFFSET0 + (4 * i), 1);
- OUT_CS_RELOC(surf->cs_buffer, surf->offset, 0, surf->domain);
+ OUT_CS_REG(R300_RB3D_COLOROFFSET0 + (4 * i), surf->offset);
+ OUT_CS_RELOC(surf);
- OUT_CS_REG_SEQ(R300_RB3D_COLORPITCH0 + (4 * i), 1);
- OUT_CS_RELOC(surf->cs_buffer, surf->pitch, 0, surf->domain);
+ OUT_CS_REG(R300_RB3D_COLORPITCH0 + (4 * i), surf->pitch);
+ OUT_CS_RELOC(surf);
}
/* Set up the ZB part of the CBZB clear. */
@@ -400,11 +411,11 @@ void r300_emit_fb_state(struct r300_context* r300, unsigned size, void* state)
OUT_CS_REG(R300_ZB_FORMAT, surf->cbzb_format);
- OUT_CS_REG_SEQ(R300_ZB_DEPTHOFFSET, 1);
- OUT_CS_RELOC(surf->cs_buffer, surf->cbzb_midpoint_offset, 0, surf->domain);
+ OUT_CS_REG(R300_ZB_DEPTHOFFSET, surf->cbzb_midpoint_offset);
+ OUT_CS_RELOC(surf);
- OUT_CS_REG_SEQ(R300_ZB_DEPTHPITCH, 1);
- OUT_CS_RELOC(surf->cs_buffer, surf->cbzb_pitch, 0, surf->domain);
+ OUT_CS_REG(R300_ZB_DEPTHPITCH, surf->cbzb_pitch);
+ OUT_CS_RELOC(surf);
DBG(r300, DBG_CBZB,
"CBZB clearing cbuf %08x %08x\n", surf->cbzb_format,
@@ -416,37 +427,19 @@ void r300_emit_fb_state(struct r300_context* r300, unsigned size, void* state)
OUT_CS_REG(R300_ZB_FORMAT, surf->format);
- OUT_CS_REG_SEQ(R300_ZB_DEPTHOFFSET, 1);
- OUT_CS_RELOC(surf->cs_buffer, surf->offset, 0, surf->domain);
+ OUT_CS_REG(R300_ZB_DEPTHOFFSET, surf->offset);
+ OUT_CS_RELOC(surf);
- OUT_CS_REG_SEQ(R300_ZB_DEPTHPITCH, 1);
- OUT_CS_RELOC(surf->cs_buffer, surf->pitch, 0, surf->domain);
+ OUT_CS_REG(R300_ZB_DEPTHPITCH, surf->pitch);
+ OUT_CS_RELOC(surf);
if (can_hyperz) {
- uint32_t surf_pitch;
- struct r300_texture *tex;
- int level = surf->base.u.tex.level;
- tex = r300_texture(surf->base.texture);
-
- surf_pitch = surf->pitch & R300_DEPTHPITCH_MASK;
/* HiZ RAM. */
- if (r300->screen->caps.hiz_ram) {
- if (tex->hiz_mem[level]) {
- OUT_CS_REG(R300_ZB_HIZ_OFFSET, tex->hiz_mem[level]->ofs << 2);
- OUT_CS_REG(R300_ZB_HIZ_PITCH, surf_pitch);
- } else {
- OUT_CS_REG(R300_ZB_HIZ_OFFSET, 0);
- OUT_CS_REG(R300_ZB_HIZ_PITCH, 0);
- }
- }
+ OUT_CS_REG(R300_ZB_HIZ_OFFSET, 0);
+ OUT_CS_REG(R300_ZB_HIZ_PITCH, surf->pitch_hiz);
/* Z Mask RAM. (compressed zbuffer) */
- if (tex->zmask_mem[level]) {
- OUT_CS_REG(R300_ZB_ZMASK_OFFSET, tex->zmask_mem[level]->ofs << 2);
- OUT_CS_REG(R300_ZB_ZMASK_PITCH, surf_pitch);
- } else {
- OUT_CS_REG(R300_ZB_ZMASK_OFFSET, 0);
- OUT_CS_REG(R300_ZB_ZMASK_PITCH, 0);
- }
+ OUT_CS_REG(R300_ZB_ZMASK_OFFSET, 0);
+ OUT_CS_REG(R300_ZB_ZMASK_PITCH, surf->pitch_zmask);
}
}
@@ -458,6 +451,7 @@ void r300_emit_hyperz_state(struct r300_context *r300,
{
struct r300_hyperz_state *z = state;
CS_LOCALS(r300);
+
if (z->flush)
WRITE_CS_TABLE(&z->cb_flush_begin, size);
else
@@ -483,15 +477,22 @@ void r300_emit_fb_state_pipelined(struct r300_context *r300,
{
struct pipe_framebuffer_state* fb =
(struct pipe_framebuffer_state*)r300->fb_state.state;
- unsigned i;
+ unsigned i, num_cbufs = fb->nr_cbufs;
+ unsigned mspos0, mspos1;
CS_LOCALS(r300);
+ /* If we use the multiwrite feature, the colorbuffers 2,3,4 must be
+ * marked as UNUSED in the US block. */
+ if (r300_fragment_shader_writes_all(r300_fs(r300))) {
+ num_cbufs = MIN2(num_cbufs, 1);
+ }
+
BEGIN_CS(size);
/* Colorbuffer format in the US block.
* (must be written after unpipelined regs) */
OUT_CS_REG_SEQ(R300_US_OUT_FMT_0, 4);
- for (i = 0; i < fb->nr_cbufs; i++) {
+ for (i = 0; i < num_cbufs; i++) {
OUT_CS(r300_surface(fb->cbufs[i])->format);
}
for (; i < 4; i++) {
@@ -501,38 +502,36 @@ void r300_emit_fb_state_pipelined(struct r300_context *r300,
/* Multisampling. Depends on framebuffer sample count.
* These are pipelined regs and as such cannot be moved
* to the AA state. */
- if (r300->rws->get_value(r300->rws, R300_VID_DRM_2_3_0)) {
- unsigned mspos0 = 0x66666666;
- unsigned mspos1 = 0x6666666;
-
- if (fb->nr_cbufs && fb->cbufs[0]->texture->nr_samples > 1) {
- /* Subsample placement. These may not be optimal. */
- switch (fb->cbufs[0]->texture->nr_samples) {
- case 2:
- mspos0 = 0x33996633;
- mspos1 = 0x6666663;
- break;
- case 3:
- mspos0 = 0x33936933;
- mspos1 = 0x6666663;
- break;
- case 4:
- mspos0 = 0x33939933;
- mspos1 = 0x3966663;
- break;
- case 6:
- mspos0 = 0x22a2aa22;
- mspos1 = 0x2a65672;
- break;
- default:
- debug_printf("r300: Bad number of multisamples!\n");
- }
- }
+ mspos0 = 0x66666666;
+ mspos1 = 0x6666666;
- OUT_CS_REG_SEQ(R300_GB_MSPOS0, 2);
- OUT_CS(mspos0);
- OUT_CS(mspos1);
+ if (fb->nr_cbufs && fb->cbufs[0]->texture->nr_samples > 1) {
+ /* Subsample placement. These may not be optimal. */
+ switch (fb->cbufs[0]->texture->nr_samples) {
+ case 2:
+ mspos0 = 0x33996633;
+ mspos1 = 0x6666663;
+ break;
+ case 3:
+ mspos0 = 0x33936933;
+ mspos1 = 0x6666663;
+ break;
+ case 4:
+ mspos0 = 0x33939933;
+ mspos1 = 0x3966663;
+ break;
+ case 6:
+ mspos0 = 0x22a2aa22;
+ mspos1 = 0x2a65672;
+ break;
+ default:
+ debug_printf("r300: Bad number of multisamples!\n");
+ }
}
+
+ OUT_CS_REG_SEQ(R300_GB_MSPOS0, 2);
+ OUT_CS(mspos0);
+ OUT_CS(mspos1);
END_CS;
}
@@ -553,14 +552,12 @@ void r300_emit_query_start(struct r300_context *r300, unsigned size, void*state)
OUT_CS_REG(R300_ZB_ZPASS_DATA, 0);
END_CS;
query->begin_emitted = TRUE;
- query->flushed = FALSE;
}
static void r300_emit_query_end_frag_pipes(struct r300_context *r300,
struct r300_query *query)
{
struct r300_capabilities* caps = &r300->screen->caps;
- struct r300_winsys_cs_buffer *buf = r300->query_current->cs_buffer;
CS_LOCALS(r300);
assert(caps->num_frag_pipes);
@@ -578,29 +575,25 @@ static void r300_emit_query_end_frag_pipes(struct r300_context *r300,
case 4:
/* pipe 3 only */
OUT_CS_REG(R300_SU_REG_DEST, 1 << 3);
- OUT_CS_REG_SEQ(R300_ZB_ZPASS_ADDR, 1);
- OUT_CS_RELOC(buf, (query->num_results + 3) * 4,
- 0, query->domain);
+ OUT_CS_REG(R300_ZB_ZPASS_ADDR, (query->num_results + 3) * 4);
+ OUT_CS_RELOC(r300->query_current);
case 3:
/* pipe 2 only */
OUT_CS_REG(R300_SU_REG_DEST, 1 << 2);
- OUT_CS_REG_SEQ(R300_ZB_ZPASS_ADDR, 1);
- OUT_CS_RELOC(buf, (query->num_results + 2) * 4,
- 0, query->domain);
+ OUT_CS_REG(R300_ZB_ZPASS_ADDR, (query->num_results + 2) * 4);
+ OUT_CS_RELOC(r300->query_current);
case 2:
/* pipe 1 only */
/* As mentioned above, accomodate RV380 and older. */
OUT_CS_REG(R300_SU_REG_DEST,
1 << (caps->high_second_pipe ? 3 : 1));
- OUT_CS_REG_SEQ(R300_ZB_ZPASS_ADDR, 1);
- OUT_CS_RELOC(buf, (query->num_results + 1) * 4,
- 0, query->domain);
+ OUT_CS_REG(R300_ZB_ZPASS_ADDR, (query->num_results + 1) * 4);
+ OUT_CS_RELOC(r300->query_current);
case 1:
/* pipe 0 only */
OUT_CS_REG(R300_SU_REG_DEST, 1 << 0);
- OUT_CS_REG_SEQ(R300_ZB_ZPASS_ADDR, 1);
- OUT_CS_RELOC(buf, (query->num_results + 0) * 4,
- 0, query->domain);
+ OUT_CS_REG(R300_ZB_ZPASS_ADDR, (query->num_results + 0) * 4);
+ OUT_CS_RELOC(r300->query_current);
break;
default:
fprintf(stderr, "r300: Implementation error: Chipset reports %d"
@@ -616,13 +609,12 @@ static void r300_emit_query_end_frag_pipes(struct r300_context *r300,
static void rv530_emit_query_end_single_z(struct r300_context *r300,
struct r300_query *query)
{
- struct r300_winsys_cs_buffer *buf = r300->query_current->cs_buffer;
CS_LOCALS(r300);
BEGIN_CS(8);
OUT_CS_REG(RV530_FG_ZBREG_DEST, RV530_FG_ZBREG_DEST_PIPE_SELECT_0);
- OUT_CS_REG_SEQ(R300_ZB_ZPASS_ADDR, 1);
- OUT_CS_RELOC(buf, query->num_results * 4, 0, query->domain);
+ OUT_CS_REG(R300_ZB_ZPASS_ADDR, query->num_results * 4);
+ OUT_CS_RELOC(r300->query_current);
OUT_CS_REG(RV530_FG_ZBREG_DEST, RV530_FG_ZBREG_DEST_PIPE_SELECT_ALL);
END_CS;
}
@@ -630,16 +622,15 @@ static void rv530_emit_query_end_single_z(struct r300_context *r300,
static void rv530_emit_query_end_double_z(struct r300_context *r300,
struct r300_query *query)
{
- struct r300_winsys_cs_buffer *buf = r300->query_current->cs_buffer;
CS_LOCALS(r300);
BEGIN_CS(14);
OUT_CS_REG(RV530_FG_ZBREG_DEST, RV530_FG_ZBREG_DEST_PIPE_SELECT_0);
- OUT_CS_REG_SEQ(R300_ZB_ZPASS_ADDR, 1);
- OUT_CS_RELOC(buf, (query->num_results + 0) * 4, 0, query->domain);
+ OUT_CS_REG(R300_ZB_ZPASS_ADDR, (query->num_results + 0) * 4);
+ OUT_CS_RELOC(r300->query_current);
OUT_CS_REG(RV530_FG_ZBREG_DEST, RV530_FG_ZBREG_DEST_PIPE_SELECT_1);
- OUT_CS_REG_SEQ(R300_ZB_ZPASS_ADDR, 1);
- OUT_CS_RELOC(buf, (query->num_results + 1) * 4, 0, query->domain);
+ OUT_CS_REG(R300_ZB_ZPASS_ADDR, (query->num_results + 1) * 4);
+ OUT_CS_RELOC(r300->query_current);
OUT_CS_REG(RV530_FG_ZBREG_DEST, RV530_FG_ZBREG_DEST_PIPE_SELECT_ALL);
END_CS;
}
@@ -778,7 +769,7 @@ void r300_emit_textures_state(struct r300_context *r300,
{
struct r300_textures_state *allstate = (struct r300_textures_state*)state;
struct r300_texture_sampler_state *texstate;
- struct r300_texture *tex;
+ struct r300_resource *tex;
unsigned i;
CS_LOCALS(r300);
@@ -788,7 +779,7 @@ void r300_emit_textures_state(struct r300_context *r300,
for (i = 0; i < allstate->count; i++) {
if ((1 << i) & allstate->tx_enable) {
texstate = &allstate->regs[i];
- tex = r300_texture(allstate->sampler_views[i]->base.texture);
+ tex = r300_resource(allstate->sampler_views[i]->base.texture);
OUT_CS_REG(R300_TX_FILTER0_0 + (i * 4), texstate->filter0);
OUT_CS_REG(R300_TX_FILTER1_0 + (i * 4), texstate->filter1);
@@ -799,73 +790,35 @@ void r300_emit_textures_state(struct r300_context *r300,
OUT_CS_REG(R300_TX_FORMAT1_0 + (i * 4), texstate->format.format1);
OUT_CS_REG(R300_TX_FORMAT2_0 + (i * 4), texstate->format.format2);
- OUT_CS_REG_SEQ(R300_TX_OFFSET_0 + (i * 4), 1);
- OUT_CS_TEX_RELOC(tex, texstate->format.tile_config, tex->domain,
- 0);
+ OUT_CS_REG(R300_TX_OFFSET_0 + (i * 4), texstate->format.tile_config);
+ OUT_CS_RELOC(tex);
}
}
END_CS;
}
-static void r300_update_aos_cb(struct r300_context *r300, unsigned packet_size)
+void r300_emit_vertex_arrays(struct r300_context* r300, int offset,
+ boolean indexed, int instance_id)
{
- struct pipe_vertex_buffer *vb1, *vb2, *vbuf = r300->vertex_buffer;
+ struct pipe_vertex_buffer *vbuf = r300->vbuf_mgr->vertex_buffer;
+ struct pipe_resource **valid_vbuf = r300->vbuf_mgr->real_vertex_buffer;
struct pipe_vertex_element *velem = r300->velems->velem;
- unsigned *hw_format_size = r300->velems->hw_format_size;
- unsigned size1, size2, aos_count = r300->velems->count;
+ struct r300_resource *buf;
int i;
- CB_LOCALS;
-
- BEGIN_CB(r300->aos_cb, packet_size);
- for (i = 0; i < aos_count - 1; i += 2) {
- vb1 = &vbuf[velem[i].vertex_buffer_index];
- vb2 = &vbuf[velem[i+1].vertex_buffer_index];
- size1 = hw_format_size[i];
- size2 = hw_format_size[i+1];
-
- OUT_CB(R300_VBPNTR_SIZE0(size1) | R300_VBPNTR_STRIDE0(vb1->stride) |
- R300_VBPNTR_SIZE1(size2) | R300_VBPNTR_STRIDE1(vb2->stride));
- OUT_CB(vb1->buffer_offset + velem[i].src_offset);
- OUT_CB(vb2->buffer_offset + velem[i+1].src_offset);
- }
-
- if (aos_count & 1) {
- vb1 = &vbuf[velem[i].vertex_buffer_index];
- size1 = hw_format_size[i];
-
- OUT_CB(R300_VBPNTR_SIZE0(size1) | R300_VBPNTR_STRIDE0(vb1->stride));
- OUT_CB(vb1->buffer_offset + velem[i].src_offset);
- }
- END_CB;
-
- r300->aos_dirty = FALSE;
-}
-
-void r300_emit_aos(struct r300_context* r300, int offset, boolean indexed)
-{
- struct pipe_vertex_buffer *vbuf = r300->vertex_buffer;
- struct pipe_vertex_element *velem = r300->velems->velem;
- struct r300_buffer *buf;
- int i;
- unsigned aos_count = r300->velems->count;
- unsigned packet_size = (aos_count * 3 + 1) / 2;
+ unsigned vertex_array_count = r300->velems->count;
+ unsigned packet_size = (vertex_array_count * 3 + 1) / 2;
+ struct pipe_vertex_buffer *vb1, *vb2;
+ unsigned *hw_format_size = r300->velems->format_size;
+ unsigned size1, size2, offset1, offset2, stride1, stride2;
CS_LOCALS(r300);
- BEGIN_CS(2 + packet_size + aos_count * 2);
+ BEGIN_CS(2 + packet_size + vertex_array_count * 2);
OUT_CS_PKT3(R300_PACKET3_3D_LOAD_VBPNTR, packet_size);
- OUT_CS(aos_count | (!indexed ? R300_VC_FORCE_PREFETCH : 0));
-
- if (!offset) {
- if (r300->aos_dirty) {
- r300_update_aos_cb(r300, packet_size);
- }
- OUT_CS_TABLE(r300->aos_cb, packet_size);
- } else {
- struct pipe_vertex_buffer *vb1, *vb2;
- unsigned *hw_format_size = r300->velems->hw_format_size;
- unsigned size1, size2;
+ OUT_CS(vertex_array_count | (!indexed ? R300_VC_FORCE_PREFETCH : 0));
- for (i = 0; i < aos_count - 1; i += 2) {
+ if (instance_id == -1) {
+ /* Non-instanced arrays. This ignores instance_divisor and instance_id. */
+ for (i = 0; i < vertex_array_count - 1; i += 2) {
vb1 = &vbuf[velem[i].vertex_buffer_index];
vb2 = &vbuf[velem[i+1].vertex_buffer_index];
size1 = hw_format_size[i];
@@ -877,23 +830,75 @@ void r300_emit_aos(struct r300_context* r300, int offset, boolean indexed)
OUT_CS(vb2->buffer_offset + velem[i+1].src_offset + offset * vb2->stride);
}
- if (aos_count & 1) {
+ if (vertex_array_count & 1) {
vb1 = &vbuf[velem[i].vertex_buffer_index];
size1 = hw_format_size[i];
OUT_CS(R300_VBPNTR_SIZE0(size1) | R300_VBPNTR_STRIDE0(vb1->stride));
OUT_CS(vb1->buffer_offset + velem[i].src_offset + offset * vb1->stride);
}
- }
- for (i = 0; i < aos_count; i++) {
- buf = r300_buffer(vbuf[velem[i].vertex_buffer_index].buffer);
- OUT_CS_BUF_RELOC_NO_OFFSET(&buf->b.b, buf->domain, 0);
+ for (i = 0; i < vertex_array_count; i++) {
+ buf = r300_resource(valid_vbuf[velem[i].vertex_buffer_index]);
+ OUT_CS_RELOC(buf);
+ }
+ } else {
+ /* Instanced arrays. */
+ for (i = 0; i < vertex_array_count - 1; i += 2) {
+ vb1 = &vbuf[velem[i].vertex_buffer_index];
+ vb2 = &vbuf[velem[i+1].vertex_buffer_index];
+ size1 = hw_format_size[i];
+ size2 = hw_format_size[i+1];
+
+ if (velem[i].instance_divisor) {
+ stride1 = 0;
+ offset1 = vb1->buffer_offset + velem[i].src_offset +
+ (instance_id / velem[i].instance_divisor) * vb1->stride;
+ } else {
+ stride1 = vb1->stride;
+ offset1 = vb1->buffer_offset + velem[i].src_offset + offset * vb1->stride;
+ }
+ if (velem[i+1].instance_divisor) {
+ stride2 = 0;
+ offset2 = vb2->buffer_offset + velem[i+1].src_offset +
+ (instance_id / velem[i+1].instance_divisor) * vb2->stride;
+ } else {
+ stride2 = vb2->stride;
+ offset2 = vb2->buffer_offset + velem[i+1].src_offset + offset * vb2->stride;
+ }
+
+ OUT_CS(R300_VBPNTR_SIZE0(size1) | R300_VBPNTR_STRIDE0(stride1) |
+ R300_VBPNTR_SIZE1(size2) | R300_VBPNTR_STRIDE1(stride2));
+ OUT_CS(offset1);
+ OUT_CS(offset2);
+ }
+
+ if (vertex_array_count & 1) {
+ vb1 = &vbuf[velem[i].vertex_buffer_index];
+ size1 = hw_format_size[i];
+
+ if (velem[i].instance_divisor) {
+ stride1 = 0;
+ offset1 = vb1->buffer_offset + velem[i].src_offset +
+ (instance_id / velem[i].instance_divisor) * vb1->stride;
+ } else {
+ stride1 = vb1->stride;
+ offset1 = vb1->buffer_offset + velem[i].src_offset + offset * vb1->stride;
+ }
+
+ OUT_CS(R300_VBPNTR_SIZE0(size1) | R300_VBPNTR_STRIDE0(stride1));
+ OUT_CS(offset1);
+ }
+
+ for (i = 0; i < vertex_array_count; i++) {
+ buf = r300_resource(valid_vbuf[velem[i].vertex_buffer_index]);
+ OUT_CS_RELOC(buf);
+ }
}
END_CS;
}
-void r300_emit_aos_swtcl(struct r300_context *r300, boolean indexed)
+void r300_emit_vertex_arrays_swtcl(struct r300_context *r300, boolean indexed)
{
CS_LOCALS(r300);
@@ -913,7 +918,8 @@ void r300_emit_aos_swtcl(struct r300_context *r300, boolean indexed)
OUT_CS(r300->vertex_info.size |
(r300->vertex_info.size << 8));
OUT_CS(r300->draw_vbo_offset);
- OUT_CS_BUF_RELOC(r300->vbo, 0, r300_buffer(r300->vbo)->domain, 0);
+ OUT_CS(0);
+ OUT_CS_RELOC(r300_resource(r300->vbo));
END_CS;
}
@@ -1080,109 +1086,47 @@ void r300_emit_viewport_state(struct r300_context* r300,
END_CS;
}
-static void r300_emit_hiz_line_clear(struct r300_context *r300, int start, uint16_t count, uint32_t val)
-{
- CS_LOCALS(r300);
- BEGIN_CS(4);
- OUT_CS_PKT3(R300_PACKET3_3D_CLEAR_HIZ, 2);
- OUT_CS(start);
- OUT_CS(count);
- OUT_CS(val);
- END_CS;
-}
-
-static void r300_emit_zmask_line_clear(struct r300_context *r300, int start, uint16_t count, uint32_t val)
-{
- CS_LOCALS(r300);
- BEGIN_CS(4);
- OUT_CS_PKT3(R300_PACKET3_3D_CLEAR_ZMASK, 2);
- OUT_CS(start);
- OUT_CS(count);
- OUT_CS(val);
- END_CS;
-}
-
-#define ALIGN_DIVUP(x, y) (((x) + (y) - 1) / (y))
-
void r300_emit_hiz_clear(struct r300_context *r300, unsigned size, void *state)
{
struct pipe_framebuffer_state *fb =
(struct pipe_framebuffer_state*)r300->fb_state.state;
- struct r300_hyperz_state *z =
- (struct r300_hyperz_state*)r300->hyperz_state.state;
- struct r300_screen* r300screen = r300->screen;
- uint32_t stride, offset = 0, height, offset_shift;
- struct r300_texture* tex;
- int i;
-
- tex = r300_texture(fb->zsbuf->texture);
-
- offset = tex->hiz_mem[fb->zsbuf->u.tex.level]->ofs;
- stride = tex->desc.stride_in_pixels[fb->zsbuf->u.tex.level];
-
- /* convert from pixels to 4x4 blocks */
- stride = ALIGN_DIVUP(stride, 4);
-
- stride = ALIGN_DIVUP(stride, r300screen->caps.num_frag_pipes);
- /* there are 4 blocks per dwords */
- stride = ALIGN_DIVUP(stride, 4);
-
- height = ALIGN_DIVUP(fb->zsbuf->height, 4);
+ struct r300_resource* tex;
+ CS_LOCALS(r300);
- offset_shift = 2;
- offset_shift += (r300screen->caps.num_frag_pipes / 2);
+ tex = r300_resource(fb->zsbuf->texture);
- for (i = 0; i < height; i++) {
- offset = i * stride;
- offset <<= offset_shift;
- r300_emit_hiz_line_clear(r300, offset, stride, 0xffffffff);
- }
- z->current_func = -1;
+ BEGIN_CS(size);
+ OUT_CS_PKT3(R300_PACKET3_3D_CLEAR_HIZ, 2);
+ OUT_CS(0);
+ OUT_CS(tex->tex.hiz_dwords[fb->zsbuf->u.tex.level]);
+ OUT_CS(r300->hiz_clear_value);
+ END_CS;
/* Mark the current zbuffer's hiz ram as in use. */
- tex->hiz_in_use[fb->zsbuf->u.tex.level] = TRUE;
+ r300->hiz_in_use = TRUE;
+ r300->hiz_func = HIZ_FUNC_NONE;
+ r300_mark_atom_dirty(r300, &r300->hyperz_state);
}
void r300_emit_zmask_clear(struct r300_context *r300, unsigned size, void *state)
{
struct pipe_framebuffer_state *fb =
(struct pipe_framebuffer_state*)r300->fb_state.state;
- struct r300_screen* r300screen = r300->screen;
- uint32_t stride, offset = 0;
- struct r300_texture* tex;
- uint32_t i, height;
- int mult, offset_shift;
-
- tex = r300_texture(fb->zsbuf->texture);
- stride = tex->desc.stride_in_pixels[fb->zsbuf->u.tex.level];
-
- offset = tex->zmask_mem[fb->zsbuf->u.tex.level]->ofs;
-
- if (r300->z_compression == RV350_Z_COMPRESS_88)
- mult = 8;
- else
- mult = 4;
-
- height = ALIGN_DIVUP(fb->zsbuf->height, mult);
-
- offset_shift = 4;
- offset_shift += (r300screen->caps.num_frag_pipes / 2);
- stride = ALIGN_DIVUP(stride, r300screen->caps.num_frag_pipes);
+ struct r300_resource *tex;
+ CS_LOCALS(r300);
- /* okay have width in pixels - divide by block width */
- stride = ALIGN_DIVUP(stride, mult);
- /* have width in blocks - divide by number of fragment pipes screen width */
- /* 16 blocks per dword */
- stride = ALIGN_DIVUP(stride, 16);
+ tex = r300_resource(fb->zsbuf->texture);
- for (i = 0; i < height; i++) {
- offset = i * stride;
- offset <<= offset_shift;
- r300_emit_zmask_line_clear(r300, offset, stride, 0x0);//0xffffffff);
- }
+ BEGIN_CS(size);
+ OUT_CS_PKT3(R300_PACKET3_3D_CLEAR_ZMASK, 2);
+ OUT_CS(0);
+ OUT_CS(tex->tex.zmask_dwords[fb->zsbuf->u.tex.level]);
+ OUT_CS(0);
+ END_CS;
/* Mark the current zbuffer's zmask as in use. */
- tex->zmask_in_use[fb->zsbuf->u.tex.level] = TRUE;
+ r300->zmask_in_use = TRUE;
+ r300_mark_atom_dirty(r300, &r300->hyperz_state);
}
void r300_emit_ztop_state(struct r300_context* r300,
@@ -1209,68 +1153,77 @@ boolean r300_emit_buffer_validate(struct r300_context *r300,
boolean do_validate_vertex_buffers,
struct pipe_resource *index_buffer)
{
- struct pipe_framebuffer_state* fb =
+ struct pipe_framebuffer_state *fb =
(struct pipe_framebuffer_state*)r300->fb_state.state;
struct r300_textures_state *texstate =
(struct r300_textures_state*)r300->textures_state.state;
- struct r300_texture* tex;
- struct pipe_vertex_buffer *vbuf = r300->vertex_buffer;
- struct pipe_vertex_element *velem = r300->velems->velem;
- struct pipe_resource *pbuf;
+ struct r300_resource *tex;
unsigned i;
-
- /* Clean out BOs. */
- r300->rws->cs_reset_buffers(r300->cs);
-
- /* Color buffers... */
- for (i = 0; i < fb->nr_cbufs; i++) {
- tex = r300_texture(fb->cbufs[i]->texture);
- assert(tex && tex->buffer && "cbuf is marked, but NULL!");
- r300->rws->cs_add_buffer(r300->cs, tex->cs_buffer, 0,
- r300_surface(fb->cbufs[i])->domain);
- }
- /* ...depth buffer... */
- if (fb->zsbuf) {
- tex = r300_texture(fb->zsbuf->texture);
- assert(tex && tex->buffer && "zsbuf is marked, but NULL!");
- r300->rws->cs_add_buffer(r300->cs, tex->cs_buffer, 0,
- r300_surface(fb->zsbuf)->domain);
- }
- /* ...textures... */
- for (i = 0; i < texstate->count; i++) {
- if (!(texstate->tx_enable & (1 << i))) {
- continue;
+ boolean flushed = FALSE;
+
+validate:
+ if (r300->fb_state.dirty) {
+ /* Color buffers... */
+ for (i = 0; i < fb->nr_cbufs; i++) {
+ tex = r300_resource(fb->cbufs[i]->texture);
+ assert(tex && tex->buf && "cbuf is marked, but NULL!");
+ r300->rws->cs_add_reloc(r300->cs, tex->cs_buf, 0,
+ r300_surface(fb->cbufs[i])->domain);
+ }
+ /* ...depth buffer... */
+ if (fb->zsbuf) {
+ tex = r300_resource(fb->zsbuf->texture);
+ assert(tex && tex->buf && "zsbuf is marked, but NULL!");
+ r300->rws->cs_add_reloc(r300->cs, tex->cs_buf, 0,
+ r300_surface(fb->zsbuf)->domain);
}
+ }
+ if (r300->textures_state.dirty) {
+ /* ...textures... */
+ for (i = 0; i < texstate->count; i++) {
+ if (!(texstate->tx_enable & (1 << i))) {
+ continue;
+ }
- tex = r300_texture(texstate->sampler_views[i]->base.texture);
- r300->rws->cs_add_buffer(r300->cs, tex->cs_buffer, tex->domain, 0);
+ tex = r300_resource(texstate->sampler_views[i]->base.texture);
+ r300->rws->cs_add_reloc(r300->cs, tex->cs_buf, tex->domain, 0);
+ }
}
/* ...occlusion query buffer... */
if (r300->query_current)
- r300->rws->cs_add_buffer(r300->cs, r300->query_current->cs_buffer,
- 0, r300->query_current->domain);
+ r300->rws->cs_add_reloc(r300->cs, r300->query_current->cs_buf,
+ 0, r300->query_current->domain);
/* ...vertex buffer for SWTCL path... */
if (r300->vbo)
- r300->rws->cs_add_buffer(r300->cs, r300_buffer(r300->vbo)->cs_buf,
- r300_buffer(r300->vbo)->domain, 0);
+ r300->rws->cs_add_reloc(r300->cs, r300_resource(r300->vbo)->cs_buf,
+ r300_resource(r300->vbo)->domain, 0);
/* ...vertex buffers for HWTCL path... */
- if (do_validate_vertex_buffers) {
- for (i = 0; i < r300->velems->count; i++) {
- pbuf = vbuf[velem[i].vertex_buffer_index].buffer;
- if (!pbuf)
+ if (do_validate_vertex_buffers && r300->vertex_arrays_dirty) {
+ struct pipe_resource **buf = r300->vbuf_mgr->real_vertex_buffer;
+ struct pipe_resource **last = r300->vbuf_mgr->real_vertex_buffer +
+ r300->vbuf_mgr->nr_real_vertex_buffers;
+ for (; buf != last; buf++) {
+ if (!*buf)
continue;
- r300->rws->cs_add_buffer(r300->cs, r300_buffer(pbuf)->cs_buf,
- r300_buffer(pbuf)->domain, 0);
+ r300->rws->cs_add_reloc(r300->cs, r300_resource(*buf)->cs_buf,
+ r300_resource(*buf)->domain, 0);
}
}
/* ...and index buffer for HWTCL path. */
if (index_buffer)
- r300->rws->cs_add_buffer(r300->cs, r300_buffer(index_buffer)->cs_buf,
- r300_buffer(index_buffer)->domain, 0);
+ r300->rws->cs_add_reloc(r300->cs, r300_resource(index_buffer)->cs_buf,
+ r300_resource(index_buffer)->domain, 0);
+ /* Now do the validation. */
if (!r300->rws->cs_validate(r300->cs)) {
- return FALSE;
+ /* Ooops, an infinite loop, give up. */
+ if (flushed)
+ return FALSE;
+
+ r300_flush(&r300->context, R300_FLUSH_ASYNC, NULL);
+ flushed = TRUE;
+ goto validate;
}
return TRUE;
@@ -1300,7 +1253,7 @@ unsigned r300_get_num_cs_end_dwords(struct r300_context *r300)
/* Emitted in flush. */
dwords += 26; /* emit_query_end */
dwords += r300->hyperz_state.size + 2; /* emit_hyperz_end + zcache flush */
- if (r300->screen->caps.index_bias_supported)
+ if (r300->screen->caps.is_r500)
dwords += 2;
return dwords;
diff --git a/src/gallium/drivers/r300/r300_emit.h b/src/gallium/drivers/r300/r300_emit.h
index 278dbcb4c7c..6c1c9d2fb13 100644
--- a/src/gallium/drivers/r300/r300_emit.h
+++ b/src/gallium/drivers/r300/r300_emit.h
@@ -31,7 +31,8 @@ struct r300_vertex_program_code;
uint32_t pack_float24(float f);
-void r300_emit_aos(struct r300_context* r300, int offset, boolean indexed);
+void r300_emit_vertex_arrays(struct r300_context* r300, int offset,
+ boolean indexed, int instance_id);
void r300_emit_blend_state(struct r300_context* r300,
unsigned size, void* state);
@@ -86,7 +87,7 @@ void r300_emit_scissor_state(struct r300_context* r300,
void r300_emit_textures_state(struct r300_context *r300,
unsigned size, void *state);
-void r300_emit_aos_swtcl(struct r300_context *r300, boolean indexed);
+void r300_emit_vertex_arrays_swtcl(struct r300_context *r300, boolean indexed);
void r300_emit_vap_invariant_state(struct r300_context *r300,
unsigned size, void *state);
diff --git a/src/gallium/drivers/r300/r300_flush.c b/src/gallium/drivers/r300/r300_flush.c
index 451fe525b40..b3d0d344ec4 100644
--- a/src/gallium/drivers/r300/r300_flush.c
+++ b/src/gallium/drivers/r300/r300_flush.c
@@ -31,29 +31,38 @@
#include "r300_cs.h"
#include "r300_emit.h"
-static void r300_flush(struct pipe_context* pipe,
- unsigned flags,
- struct pipe_fence_handle** fence)
+
+void r300_flush(struct pipe_context *pipe,
+ unsigned flags,
+ struct pipe_fence_handle **fence)
{
struct r300_context *r300 = r300_context(pipe);
- struct r300_query *query;
struct r300_atom *atom;
- struct r300_fence **rfence = (struct r300_fence**)fence;
-
- u_upload_flush(r300->upload_vb);
- u_upload_flush(r300->upload_ib);
+ struct r300_winsys_bo **rfence = (struct r300_winsys_bo**)fence;
if (r300->draw && !r300->draw_vbo_locked)
r300_draw_flush_vbuf(r300);
+ if (rfence) {
+ /* Create a fence, which is a dummy BO. */
+ *rfence = r300->rws->buffer_create(r300->rws, 1, 1,
+ PIPE_BIND_VERTEX_BUFFER,
+ PIPE_USAGE_STATIC,
+ R300_DOMAIN_GTT);
+ /* Add the fence as a dummy relocation. */
+ r300->rws->cs_add_reloc(r300->cs,
+ r300->rws->buffer_get_cs_handle(*rfence),
+ R300_DOMAIN_GTT, R300_DOMAIN_GTT);
+ }
+
if (r300->dirty_hw) {
r300_emit_hyperz_end(r300);
r300_emit_query_end(r300);
- if (r300->screen->caps.index_bias_supported)
+ if (r300->screen->caps.is_r500)
r500_emit_index_bias(r300, 0);
r300->flush_counter++;
- r300->rws->cs_flush(r300->cs);
+ r300->rws->cs_flush(r300->cs, flags);
r300->dirty_hw = 0;
/* New kitchen sink, baby. */
@@ -62,30 +71,35 @@ static void r300_flush(struct pipe_context* pipe,
r300_mark_atom_dirty(r300, atom);
}
}
+ r300->vertex_arrays_dirty = TRUE;
/* Unmark HWTCL state for SWTCL. */
if (!r300->screen->caps.has_tcl) {
r300->vs_state.dirty = FALSE;
r300->vs_constants.dirty = FALSE;
}
-
- r300->validate_buffers = TRUE;
- }
-
- /* reset flushed query */
- foreach(query, &r300->query_list) {
- query->flushed = TRUE;
+ } else {
+ if (rfence) {
+ /* We have to create a fence object, but the command stream is empty
+ * and we cannot emit an empty CS. We must write some regs then. */
+ CS_LOCALS(r300);
+ OUT_CS_REG(RB3D_COLOR_CHANNEL_MASK, 0);
+ r300->rws->cs_flush(r300->cs, flags);
+ } else {
+ /* Even if hw is not dirty, we should at least reset the CS in case
+ * the space checking failed for the first draw operation. */
+ r300->rws->cs_flush(r300->cs, flags);
+ }
}
+}
- /* Create a new fence. */
- if (rfence) {
- *rfence = CALLOC_STRUCT(r300_fence);
- pipe_reference_init(&(*rfence)->reference, 1);
- (*rfence)->ctx = r300;
- }
+static void r300_flush_wrapped(struct pipe_context *pipe,
+ struct pipe_fence_handle **fence)
+{
+ r300_flush(pipe, 0, fence);
}
void r300_init_flush_functions(struct r300_context* r300)
{
- r300->context.flush = r300_flush;
+ r300->context.flush = r300_flush_wrapped;
}
diff --git a/src/gallium/drivers/r300/r300_fs.c b/src/gallium/drivers/r300/r300_fs.c
index 2936c3486e2..4c502fefb3f 100644
--- a/src/gallium/drivers/r300/r300_fs.c
+++ b/src/gallium/drivers/r300/r300_fs.c
@@ -149,16 +149,18 @@ static void get_external_state(
unsigned i;
unsigned char *swizzle;
+ state->frag_clamp = 0;
+
for (i = 0; i < texstate->sampler_state_count; i++) {
struct r300_sampler_state *s = texstate->sampler_states[i];
struct r300_sampler_view *v = texstate->sampler_views[i];
- struct r300_texture *t;
+ struct r300_resource *t;
if (!s || !v) {
continue;
}
- t = r300_texture(texstate->sampler_views[i]->base.texture);
+ t = r300_resource(texstate->sampler_views[i]->base.texture);
if (s->state.compare_mode == PIPE_TEX_COMPARE_R_TO_TEXTURE) {
state->unit[i].compare_mode_enabled = 1;
@@ -181,7 +183,7 @@ static void get_external_state(
state->unit[i].non_normalized_coords = !s->state.normalized_coords;
/* XXX this should probably take into account STR, not just S. */
- if (t->desc.is_npot) {
+ if (t->tex.is_npot) {
switch (s->state.wrap_s) {
case PIPE_TEX_WRAP_REPEAT:
state->unit[i].wrap_mode = RC_WRAP_REPEAT;
@@ -201,7 +203,7 @@ static void get_external_state(
state->unit[i].wrap_mode = RC_WRAP_NONE;
}
- if (t->desc.b.b.target == PIPE_TEXTURE_3D)
+ if (t->b.b.b.target == PIPE_TEXTURE_3D)
state->unit[i].clamp_and_scale_before_fetch = TRUE;
}
}
@@ -298,44 +300,98 @@ static void r300_emit_fs_code_to_buffer(
}
} else { /* r300 */
struct r300_fragment_program_code *code = &generic_code->code.r300;
-
- shader->cb_code_size = 19 +
- (r300->screen->caps.is_r400 ? 2 : 0) +
- code->alu.length * 4 +
- (code->tex.length ? (1 + code->tex.length) : 0) +
- imm_count * 5;
+ unsigned int alu_length = code->alu.length;
+ unsigned int alu_iterations = ((alu_length - 1) / 64) + 1;
+ unsigned int tex_length = code->tex.length;
+ unsigned int tex_iterations =
+ tex_length > 0 ? ((tex_length - 1) / 32) + 1 : 0;
+ unsigned int iterations =
+ alu_iterations > tex_iterations ? alu_iterations : tex_iterations;
+ unsigned int bank = 0;
+
+ shader->cb_code_size = 15 +
+ /* R400_US_CODE_BANK */
+ (r300->screen->caps.is_r400 ? 2 * (iterations + 1): 0) +
+ /* R400_US_CODE_EXT */
+ (r300->screen->caps.is_r400 ? 2 : 0) +
+ /* R300_US_ALU_{RGB,ALPHA}_{INST,ADDR}_0, R400_US_ALU_EXT_ADDR_0 */
+ (code->r390_mode ? (5 * alu_iterations) : 4) +
+ /* R400_US_ALU_EXT_ADDR_[0-63] */
+ (code->r390_mode ? (code->alu.length) : 0) +
+ /* R300_US_ALU_{RGB,ALPHA}_{INST,ADDR}_0 */
+ code->alu.length * 4 +
+ /* R300_US_TEX_INST_0, R300_US_TEX_INST_[0-31] */
+ (code->tex.length > 0 ? code->tex.length + tex_iterations : 0) +
+ imm_count * 5;
NEW_CB(shader->cb_code, shader->cb_code_size);
- if (r300->screen->caps.is_r400)
- OUT_CB_REG(R400_US_CODE_BANK, 0);
-
OUT_CB_REG(R300_US_CONFIG, code->config);
OUT_CB_REG(R300_US_PIXSIZE, code->pixsize);
OUT_CB_REG(R300_US_CODE_OFFSET, code->code_offset);
+ if (code->r390_mode) {
+ OUT_CB_REG(R400_US_CODE_EXT, code->r400_code_offset_ext);
+ } else if (r300->screen->caps.is_r400) {
+ /* This register appears to affect shaders even if r390_mode is
+ * disabled, so it needs to be set to 0 for shaders that
+ * don't use r390_mode. */
+ OUT_CB_REG(R400_US_CODE_EXT, 0);
+ }
+
OUT_CB_REG_SEQ(R300_US_CODE_ADDR_0, 4);
OUT_CB_TABLE(code->code_addr, 4);
- OUT_CB_REG_SEQ(R300_US_ALU_RGB_INST_0, code->alu.length);
- for (i = 0; i < code->alu.length; i++)
- OUT_CB(code->alu.inst[i].rgb_inst);
+ do {
+ unsigned int bank_alu_length = (alu_length < 64 ? alu_length : 64);
+ unsigned int bank_alu_offset = bank * 64;
+ unsigned int bank_tex_length = (tex_length < 32 ? tex_length : 32);
+ unsigned int bank_tex_offset = bank * 32;
+
+ if (r300->screen->caps.is_r400) {
+ OUT_CB_REG(R400_US_CODE_BANK, code->r390_mode ?
+ (bank << R400_BANK_SHIFT) | R400_R390_MODE_ENABLE : 0);//2
+ }
+
+ if (bank_alu_length > 0) {
+ OUT_CB_REG_SEQ(R300_US_ALU_RGB_INST_0, bank_alu_length);
+ for (i = 0; i < bank_alu_length; i++)
+ OUT_CB(code->alu.inst[i + bank_alu_offset].rgb_inst);
+
+ OUT_CB_REG_SEQ(R300_US_ALU_RGB_ADDR_0, bank_alu_length);
+ for (i = 0; i < bank_alu_length; i++)
+ OUT_CB(code->alu.inst[i + bank_alu_offset].rgb_addr);
+
+ OUT_CB_REG_SEQ(R300_US_ALU_ALPHA_INST_0, bank_alu_length);
+ for (i = 0; i < bank_alu_length; i++)
+ OUT_CB(code->alu.inst[i + bank_alu_offset].alpha_inst);
- OUT_CB_REG_SEQ(R300_US_ALU_RGB_ADDR_0, code->alu.length);
- for (i = 0; i < code->alu.length; i++)
- OUT_CB(code->alu.inst[i].rgb_addr);
+ OUT_CB_REG_SEQ(R300_US_ALU_ALPHA_ADDR_0, bank_alu_length);
+ for (i = 0; i < bank_alu_length; i++)
+ OUT_CB(code->alu.inst[i + bank_alu_offset].alpha_addr);
- OUT_CB_REG_SEQ(R300_US_ALU_ALPHA_INST_0, code->alu.length);
- for (i = 0; i < code->alu.length; i++)
- OUT_CB(code->alu.inst[i].alpha_inst);
+ if (code->r390_mode) {
+ OUT_CB_REG_SEQ(R400_US_ALU_EXT_ADDR_0, bank_alu_length);
+ for (i = 0; i < bank_alu_length; i++)
+ OUT_CB(code->alu.inst[i + bank_alu_offset].r400_ext_addr);
+ }
+ }
+
+ if (bank_tex_length > 0) {
+ OUT_CB_REG_SEQ(R300_US_TEX_INST_0, bank_tex_length);
+ OUT_CB_TABLE(code->tex.inst + bank_tex_offset, bank_tex_length);
+ }
- OUT_CB_REG_SEQ(R300_US_ALU_ALPHA_ADDR_0, code->alu.length);
- for (i = 0; i < code->alu.length; i++)
- OUT_CB(code->alu.inst[i].alpha_addr);
+ alu_length -= bank_alu_length;
+ tex_length -= bank_tex_length;
+ bank++;
+ } while(code->r390_mode && (alu_length > 0 || tex_length > 0));
- if (code->tex.length) {
- OUT_CB_REG_SEQ(R300_US_TEX_INST_0, code->tex.length);
- OUT_CB_TABLE(code->tex.inst, code->tex.length);
+ /* R400_US_CODE_BANK needs to be reset to 0, otherwise some shaders
+ * will be rendered incorrectly. */
+ if (r300->screen->caps.is_r400) {
+ OUT_CB_REG(R400_US_CODE_BANK,
+ code->r390_mode ? R400_R390_MODE_ENABLE : 0);
}
/* Emit immediates. */
@@ -384,17 +440,29 @@ static void r300_translate_fragment_shader(
compiler.code = &shader->code;
compiler.state = shader->compare_state;
compiler.Base.is_r500 = r300->screen->caps.is_r500;
+ compiler.Base.is_r400 = r300->screen->caps.is_r400;
compiler.Base.disable_optimizations = DBG_ON(r300, DBG_NO_OPT);
compiler.Base.has_half_swizzles = TRUE;
compiler.Base.has_presub = TRUE;
- compiler.Base.max_temp_regs = compiler.Base.is_r500 ? 128 : 32;
+ compiler.Base.max_temp_regs =
+ compiler.Base.is_r500 ? 128 : (compiler.Base.is_r400 ? 64 : 32);
compiler.Base.max_constants = compiler.Base.is_r500 ? 256 : 32;
- compiler.Base.max_alu_insts = compiler.Base.is_r500 ? 512 : 64;
+ compiler.Base.max_alu_insts =
+ (compiler.Base.is_r500 || compiler.Base.is_r400) ? 512 : 64;
+ compiler.Base.max_tex_insts =
+ (compiler.Base.is_r500 || compiler.Base.is_r400) ? 512 : 32;
compiler.AllocateHwInputs = &allocate_hardware_inputs;
compiler.UserData = &shader->inputs;
find_output_registers(&compiler, shader);
+ shader->write_all = FALSE;
+ for (i = 0; i < shader->info.num_properties; i++) {
+ if (shader->info.properties[i].name == TGSI_PROPERTY_FS_COLOR0_WRITES_ALL_CBUFS) {
+ shader->write_all = TRUE;
+ }
+ }
+
if (compiler.Base.Debug & RC_DBG_LOG) {
DBG(r300, DBG_FP, "r300: Initial fragment program\n");
tgsi_dump(tokens, 0);
@@ -407,6 +475,13 @@ static void r300_translate_fragment_shader(
r300_tgsi_to_rc(&ttr, tokens);
+ if (ttr.error) {
+ fprintf(stderr, "r300 FP: Cannot translate a shader. "
+ "Using a dummy shader instead.\n");
+ r300_dummy_fragment_shader(r300, shader);
+ return;
+ }
+
if (!r300->screen->caps.is_r500 ||
compiler.Base.Program.Constants.Count > 200) {
compiler.Base.remove_unused_constants = TRUE;
diff --git a/src/gallium/drivers/r300/r300_fs.h b/src/gallium/drivers/r300/r300_fs.h
index 51bfa88c5ef..c86a90b85ae 100644
--- a/src/gallium/drivers/r300/r300_fs.h
+++ b/src/gallium/drivers/r300/r300_fs.h
@@ -54,6 +54,9 @@ struct r300_fragment_shader_code {
uint32_t *cb_code;
struct r300_fragment_shader_code* next;
+
+ boolean write_all;
+
};
struct r300_fragment_shader {
@@ -81,4 +84,10 @@ static INLINE boolean r300_fragment_shader_writes_depth(struct r300_fragment_sha
return (fs->shader->code.writes_depth) ? TRUE : FALSE;
}
+static INLINE boolean r300_fragment_shader_writes_all(struct r300_fragment_shader *fs)
+{
+ if (!fs)
+ return FALSE;
+ return (fs->shader->write_all) ? TRUE : FALSE;
+}
#endif /* R300_FS_H */
diff --git a/src/gallium/drivers/r300/r300_hyperz.c b/src/gallium/drivers/r300/r300_hyperz.c
index c22e307c679..ecaadf4af8e 100644
--- a/src/gallium/drivers/r300/r300_hyperz.c
+++ b/src/gallium/drivers/r300/r300_hyperz.c
@@ -22,7 +22,6 @@
* USE OR OTHER DEALINGS IN THE SOFTWARE. */
#include "r300_context.h"
-#include "r300_hyperz.h"
#include "r300_reg.h"
#include "r300_fs.h"
#include "r300_winsys.h"
@@ -41,58 +40,74 @@
/* The HyperZ setup */
/*****************************************************************************/
-static bool r300_get_sc_hz_max(struct r300_context *r300)
+static enum r300_hiz_func r300_get_hiz_func(struct r300_context *r300)
{
- struct r300_dsa_state *dsa_state = r300->dsa_state.state;
- int func = dsa_state->z_stencil_control & R300_ZS_MASK;
- int ret = R300_SC_HYPERZ_MIN;
+ struct r300_dsa_state *dsa = r300->dsa_state.state;
- if (func >= R300_ZS_GEQUAL && func <= R300_ZS_ALWAYS)
- ret = R300_SC_HYPERZ_MAX;
- return ret;
+ if (!dsa->dsa.depth.enabled || !dsa->dsa.depth.writemask)
+ return HIZ_FUNC_NONE;
+
+ switch (dsa->dsa.depth.func) {
+ case PIPE_FUNC_NEVER:
+ case PIPE_FUNC_EQUAL:
+ case PIPE_FUNC_NOTEQUAL:
+ case PIPE_FUNC_ALWAYS:
+ return HIZ_FUNC_NONE;
+
+ case PIPE_FUNC_LESS:
+ case PIPE_FUNC_LEQUAL:
+ return HIZ_FUNC_MAX;
+
+ case PIPE_FUNC_GREATER:
+ case PIPE_FUNC_GEQUAL:
+ return HIZ_FUNC_MIN;
+
+ default:
+ assert(0);
+ return HIZ_FUNC_NONE;
+ }
}
-static bool r300_zfunc_same_direction(int func1, int func2)
+/* Return what's used for the depth test (either minimum or maximum). */
+static unsigned r300_get_sc_hz_max(struct r300_context *r300)
{
- /* func1 is less/lessthan */
- if ((func1 == R300_ZS_LESS || func1 == R300_ZS_LEQUAL) &&
- (func2 == R300_ZS_EQUAL || func2 == R300_ZS_GEQUAL ||
- func2 == R300_ZS_GREATER))
- return FALSE;
-
- /* func1 is greater/greaterthan */
- if ((func1 == R300_ZS_GEQUAL || func1 == R300_ZS_GREATER) &&
- (func2 == R300_ZS_LESS || func2 == R300_ZS_LEQUAL))
- return FALSE;
+ struct r300_dsa_state *dsa = r300->dsa_state.state;
+ unsigned func = dsa->dsa.depth.func;
- return TRUE;
+ return func >= PIPE_FUNC_GREATER ? R300_SC_HYPERZ_MAX : R300_SC_HYPERZ_MIN;
}
-static int r300_get_hiz_min(struct r300_context *r300)
+static boolean r300_is_hiz_func_valid(struct r300_context *r300)
{
- struct r300_dsa_state *dsa_state = r300->dsa_state.state;
- int func = dsa_state->z_stencil_control & R300_ZS_MASK;
- int ret = R300_HIZ_MIN;
+ struct r300_dsa_state *dsa = r300->dsa_state.state;
+ unsigned func = dsa->dsa.depth.func;
- if (func == R300_ZS_LESS || func == R300_ZS_LEQUAL)
- ret = R300_HIZ_MAX;
- return ret;
+ if (r300->hiz_func == HIZ_FUNC_NONE)
+ return TRUE;
+
+ /* func1 is less/lessthan */
+ if (r300->hiz_func == HIZ_FUNC_MAX &&
+ (func == PIPE_FUNC_GEQUAL || func == PIPE_FUNC_GREATER))
+ return FALSE;
+
+ /* func1 is greater/greaterthan */
+ if (r300->hiz_func == HIZ_FUNC_MIN &&
+ (func == PIPE_FUNC_LESS || func == PIPE_FUNC_LEQUAL))
+ return FALSE;
+
+ return TRUE;
}
static boolean r300_dsa_stencil_op_not_keep(struct pipe_stencil_state *s)
{
- if (s->enabled && (s->fail_op != PIPE_STENCIL_OP_KEEP ||
- s->zfail_op != PIPE_STENCIL_OP_KEEP))
- return TRUE;
- return FALSE;
+ return s->enabled && (s->fail_op != PIPE_STENCIL_OP_KEEP ||
+ s->zfail_op != PIPE_STENCIL_OP_KEEP);
}
static boolean r300_can_hiz(struct r300_context *r300)
{
- struct r300_dsa_state *dsa_state = r300->dsa_state.state;
- struct pipe_depth_stencil_alpha_state *dsa = &dsa_state->dsa;
- struct r300_screen* r300screen = r300->screen;
- struct r300_hyperz_state *z = r300->hyperz_state.state;
+ struct r300_dsa_state *dsa = r300->dsa_state.state;
+ struct r300_screen *r300screen = r300->screen;
/* shader writes depth - no HiZ */
if (r300_fragment_shader_writes_depth(r300_fs(r300))) /* (5) */
@@ -100,34 +115,21 @@ static boolean r300_can_hiz(struct r300_context *r300)
if (r300->query_current)
return FALSE;
+
/* if stencil fail/zfail op is not KEEP */
- if (r300_dsa_stencil_op_not_keep(&dsa->stencil[0]) ||
- r300_dsa_stencil_op_not_keep(&dsa->stencil[1]))
+ if (r300_dsa_stencil_op_not_keep(&dsa->dsa.stencil[0]) ||
+ r300_dsa_stencil_op_not_keep(&dsa->dsa.stencil[1]))
return FALSE;
- if (dsa->depth.enabled) {
+ if (dsa->dsa.depth.enabled) {
/* if depth func is EQUAL pre-r500 */
- if (dsa->depth.func == PIPE_FUNC_EQUAL && !r300screen->caps.is_r500)
+ if (dsa->dsa.depth.func == PIPE_FUNC_EQUAL && !r300screen->caps.is_r500)
return FALSE;
+
/* if depth func is NOTEQUAL */
- if (dsa->depth.func == PIPE_FUNC_NOTEQUAL)
+ if (dsa->dsa.depth.func == PIPE_FUNC_NOTEQUAL)
return FALSE;
}
- /* depth comparison function - if just cleared save and return okay */
- if (z->current_func == -1) {
- int func = dsa_state->z_stencil_control & R300_ZS_MASK;
- if (func != 0 && func != 7)
- z->current_func = dsa_state->z_stencil_control & R300_ZS_MASK;
- } else {
- /* simple don't change */
- if (!r300_zfunc_same_direction(z->current_func,
- (dsa_state->z_stencil_control & R300_ZS_MASK))) {
- DBG(r300, DBG_HYPERZ,
- "z func changed direction - disabling hyper-z %d -> %d\n",
- z->current_func, dsa_state->z_stencil_control);
- return FALSE;
- }
- }
return TRUE;
}
@@ -137,10 +139,8 @@ static void r300_update_hyperz(struct r300_context* r300)
(struct r300_hyperz_state*)r300->hyperz_state.state;
struct pipe_framebuffer_state *fb =
(struct pipe_framebuffer_state*)r300->fb_state.state;
- struct r300_texture *zstex =
- fb->zsbuf ? r300_texture(fb->zsbuf->texture) : NULL;
- boolean zmask_in_use = FALSE;
- boolean hiz_in_use = FALSE;
+ struct r300_resource *zstex =
+ fb->zsbuf ? r300_resource(fb->zsbuf->texture) : NULL;
z->gb_z_peq_config = 0;
z->zb_bw_cntl = 0;
@@ -152,48 +152,54 @@ static void r300_update_hyperz(struct r300_context* r300)
return;
}
- if (!zstex)
- return;
-
- if (!r300->rws->get_value(r300->rws, R300_CAN_HYPERZ))
+ if (!zstex ||
+ !r300->rws->get_value(r300->rws, R300_CAN_HYPERZ))
return;
- zmask_in_use = zstex->zmask_in_use[fb->zsbuf->u.tex.level];
- hiz_in_use = zstex->hiz_in_use[fb->zsbuf->u.tex.level];
-
- /* Z fastfill. */
- if (zmask_in_use) {
- z->zb_bw_cntl |= R300_FAST_FILL_ENABLE; /* | R300_FORCE_COMPRESSED_STENCIL_VALUE_ENABLE;*/
- }
-
/* Zbuffer compression. */
- if (zmask_in_use && r300->z_compression) {
- z->zb_bw_cntl |= R300_RD_COMP_ENABLE;
- if (r300->z_decomp_rd == false)
+ if (r300->zmask_in_use && !r300->hyperz_locked) {
+ z->zb_bw_cntl |= R300_FAST_FILL_ENABLE |
+ /*R300_FORCE_COMPRESSED_STENCIL_VALUE_ENABLE |*/
+ R300_RD_COMP_ENABLE;
+
+ if (!r300->zmask_decompress) {
z->zb_bw_cntl |= R300_WR_COMP_ENABLE;
+ }
}
- /* RV350 and up optimizations. */
- /* The section 10.4.9 in the docs is a lie. */
- if (r300->z_compression == RV350_Z_COMPRESS_88)
+
+ if (zstex->tex.zcomp8x8[fb->zsbuf->u.tex.level]) {
z->gb_z_peq_config |= R300_GB_Z_PEQ_CONFIG_Z_PEQ_SIZE_8_8;
+ }
+
+ /* HiZ. */
+ if (r300->hiz_in_use && !r300->hyperz_locked) {
+ /* Set the HiZ function if needed. */
+ if (r300->hiz_func == HIZ_FUNC_NONE) {
+ r300->hiz_func = r300_get_hiz_func(r300);
+ }
- if (hiz_in_use) {
- bool can_hiz = r300_can_hiz(r300);
- if (can_hiz) {
- z->zb_bw_cntl |= R300_HIZ_ENABLE;
- z->sc_hyperz |= R300_SC_HYPERZ_ENABLE;
- z->sc_hyperz |= r300_get_sc_hz_max(r300);
- z->zb_bw_cntl |= r300_get_hiz_min(r300);
+ /* If the depth function is inverted, HiZ must be disabled. */
+ if (!r300_is_hiz_func_valid(r300)) {
+ r300->hiz_in_use = FALSE;
+ } else if (r300_can_hiz(r300)) {
+ /* Setup the HiZ bits. */
+ z->zb_bw_cntl |=
+ R300_HIZ_ENABLE |
+ (r300->hiz_func == HIZ_FUNC_MIN ? R300_HIZ_MIN : R300_HIZ_MAX);
+
+ z->sc_hyperz |= R300_SC_HYPERZ_ENABLE |
+ r300_get_sc_hz_max(r300);
+
+ if (r300->screen->caps.is_r500) {
+ z->zb_bw_cntl |= R500_HIZ_EQUAL_REJECT_ENABLE;
+ }
}
}
/* R500-specific features and optimizations. */
if (r300->screen->caps.is_r500) {
- z->zb_bw_cntl |= R500_HIZ_FP_EXP_BITS_3;
- z->zb_bw_cntl |=
- R500_HIZ_EQUAL_REJECT_ENABLE |
- R500_PEQ_PACKING_ENABLE |
- R500_COVERED_PTR_MASKING_ENABLE;
+ z->zb_bw_cntl |= R500_PEQ_PACKING_ENABLE |
+ R500_COVERED_PTR_MASKING_ENABLE;
}
}
@@ -285,135 +291,11 @@ static void r300_update_ztop(struct r300_context* r300)
r300_mark_atom_dirty(r300, &r300->ztop_state);
}
-#define ALIGN_DIVUP(x, y) (((x) + (y) - 1) / (y))
-
-static void r300_update_hiz_clear(struct r300_context *r300)
-{
- struct pipe_framebuffer_state *fb =
- (struct pipe_framebuffer_state*)r300->fb_state.state;
- uint32_t height;
-
- height = ALIGN_DIVUP(fb->zsbuf->height, 4);
- r300->hiz_clear.size = height * 4;
-}
-
-static void r300_update_zmask_clear(struct r300_context *r300)
-{
- struct pipe_framebuffer_state *fb =
- (struct pipe_framebuffer_state*)r300->fb_state.state;
- uint32_t height;
- int mult;
-
- if (r300->z_compression == RV350_Z_COMPRESS_88)
- mult = 8;
- else
- mult = 4;
-
- height = ALIGN_DIVUP(fb->zsbuf->height, mult);
-
- r300->zmask_clear.size = height * 4;
-}
-
void r300_update_hyperz_state(struct r300_context* r300)
{
r300_update_ztop(r300);
+
if (r300->hyperz_state.dirty) {
r300_update_hyperz(r300);
}
-
- if (r300->hiz_clear.dirty) {
- r300_update_hiz_clear(r300);
- }
- if (r300->zmask_clear.dirty) {
- r300_update_zmask_clear(r300);
- }
-}
-
-void r300_hiz_alloc_block(struct r300_context *r300, struct r300_surface *surf)
-{
- struct r300_texture *tex;
- uint32_t zsize, ndw;
- int level = surf->base.u.tex.level;
-
- tex = r300_texture(surf->base.texture);
-
- if (tex->hiz_mem[level])
- return;
-
- zsize = tex->desc.layer_size_in_bytes[level];
- zsize /= util_format_get_blocksize(tex->desc.b.b.format);
- ndw = ALIGN_DIVUP(zsize, 64);
-
- tex->hiz_mem[level] = u_mmAllocMem(r300->hiz_mm, ndw, 0, 0);
- return;
-}
-
-void r300_zmask_alloc_block(struct r300_context *r300, struct r300_surface *surf, int compress)
-{
- int bsize = 256;
- uint32_t zsize, ndw;
- int level = surf->base.u.tex.level;
- struct r300_texture *tex;
-
- tex = r300_texture(surf->base.texture);
-
- /* We currently don't handle decompression for 3D textures and cubemaps
- * correctly. */
- if (tex->desc.b.b.target != PIPE_TEXTURE_1D &&
- tex->desc.b.b.target != PIPE_TEXTURE_2D &&
- tex->desc.b.b.target != PIPE_TEXTURE_RECT)
- return;
-
- /* Cannot flush zmask of 16-bit zbuffers. */
- if (util_format_get_blocksizebits(tex->desc.b.b.format) == 16)
- return;
-
- if (tex->zmask_mem[level])
- return;
-
- zsize = tex->desc.layer_size_in_bytes[level];
- zsize /= util_format_get_blocksize(tex->desc.b.b.format);
-
- /* each zmask dword represents 16 4x4 blocks - which is 256 pixels
- or 16 8x8 depending on the gb peq flag = 1024 pixels */
- if (compress == RV350_Z_COMPRESS_88)
- bsize = 1024;
-
- ndw = ALIGN_DIVUP(zsize, bsize);
- tex->zmask_mem[level] = u_mmAllocMem(r300->zmask_mm, ndw, 0, 0);
- return;
-}
-
-boolean r300_hyperz_init_mm(struct r300_context *r300)
-{
- struct r300_screen* r300screen = r300->screen;
- int frag_pipes = r300screen->caps.num_frag_pipes;
-
- r300->zmask_mm = u_mmInit(0, r300screen->caps.zmask_ram * frag_pipes);
- if (!r300->zmask_mm)
- return FALSE;
-
- if (r300screen->caps.hiz_ram) {
- r300->hiz_mm = u_mmInit(0, r300screen->caps.hiz_ram * frag_pipes);
- if (!r300->hiz_mm) {
- u_mmDestroy(r300->zmask_mm);
- r300->zmask_mm = NULL;
- return FALSE;
- }
- }
-
- return TRUE;
-}
-
-void r300_hyperz_destroy_mm(struct r300_context *r300)
-{
- struct r300_screen* r300screen = r300->screen;
-
- if (r300screen->caps.hiz_ram) {
- u_mmDestroy(r300->hiz_mm);
- r300->hiz_mm = NULL;
- }
-
- u_mmDestroy(r300->zmask_mm);
- r300->zmask_mm = NULL;
}
diff --git a/src/gallium/drivers/r300/r300_hyperz.h b/src/gallium/drivers/r300/r300_hyperz.h
deleted file mode 100644
index 30a23ec6493..00000000000
--- a/src/gallium/drivers/r300/r300_hyperz.h
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright 2010 Marek Olšák <maraeo@gmail.com>
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * on the rights to use, copy, modify, merge, publish, distribute, sub
- * license, and/or sell copies of the Software, and to permit persons to whom
- * the Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
- * THE AUTHOR(S) AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM,
- * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
- * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
- * USE OR OTHER DEALINGS IN THE SOFTWARE. */
-
-#ifndef R300_HYPERZ_H
-#define R300_HYPERZ_H
-
-struct r300_context;
-
-void r300_update_hyperz_state(struct r300_context* r300);
-
-void r300_hiz_alloc_block(struct r300_context *r300, struct r300_surface *surf);
-void r300_zmask_alloc_block(struct r300_context *r300, struct r300_surface *surf, int compress);
-
-boolean r300_hyperz_init_mm(struct r300_context *r300);
-void r300_hyperz_destroy_mm(struct r300_context *r300);
-#endif
diff --git a/src/gallium/drivers/r300/r300_query.c b/src/gallium/drivers/r300/r300_query.c
index 6223e043210..717485f43cb 100644
--- a/src/gallium/drivers/r300/r300_query.c
+++ b/src/gallium/drivers/r300/r300_query.c
@@ -57,10 +57,10 @@ static struct pipe_query *r300_create_query(struct pipe_context *pipe,
insert_at_tail(&r300->query_list, q);
/* Open up the occlusion query buffer. */
- q->buffer = r300->rws->buffer_create(r300->rws, q->buffer_size, 4096,
+ q->buf = r300->rws->buffer_create(r300->rws, q->buffer_size, 4096,
PIPE_BIND_CUSTOM, PIPE_USAGE_STREAM,
q->domain);
- q->cs_buffer = r300->rws->buffer_get_cs_handle(r300->rws, q->buffer);
+ q->cs_buf = r300->rws->buffer_get_cs_handle(q->buf);
return (struct pipe_query*)q;
}
@@ -68,10 +68,9 @@ static struct pipe_query *r300_create_query(struct pipe_context *pipe,
static void r300_destroy_query(struct pipe_context* pipe,
struct pipe_query* query)
{
- struct r300_context *r300 = r300_context(pipe);
struct r300_query* q = r300_query(query);
- r300->rws->buffer_reference(r300->rws, &q->buffer, NULL);
+ r300_winsys_bo_reference(&q->buf, NULL);
remove_from_list(q);
FREE(query);
}
@@ -128,16 +127,12 @@ static boolean r300_get_query_result(struct pipe_context* pipe,
{
struct r300_context* r300 = r300_context(pipe);
struct r300_query *q = r300_query(query);
- unsigned flags, i;
+ unsigned i;
uint32_t temp, *map;
- uint64_t *result = (uint64_t*)vresult;
-
- if (!q->flushed)
- pipe->flush(pipe, 0, NULL);
-
- flags = PIPE_TRANSFER_READ | (!wait ? PIPE_TRANSFER_DONTBLOCK : 0);
- map = r300->rws->buffer_map(r300->rws, q->buffer, r300->cs, flags);
+ map = r300->rws->buffer_map(q->buf, r300->cs,
+ PIPE_TRANSFER_READ |
+ (!wait ? PIPE_TRANSFER_DONTBLOCK : 0));
if (!map)
return FALSE;
@@ -148,9 +143,9 @@ static boolean r300_get_query_result(struct pipe_context* pipe,
map++;
}
- r300->rws->buffer_unmap(r300->rws, q->buffer);
+ r300->rws->buffer_unmap(q->buf);
- *result = temp;
+ *((uint64_t*)vresult) = temp;
return TRUE;
}
diff --git a/src/gallium/drivers/r300/r300_reg.h b/src/gallium/drivers/r300/r300_reg.h
index 613186e8156..bb30b1ab0be 100644
--- a/src/gallium/drivers/r300/r300_reg.h
+++ b/src/gallium/drivers/r300/r300_reg.h
@@ -467,6 +467,8 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
*
* See bug #9871. http://bugs.freedesktop.org/attachment.cgi?id=10672&action=view
*/
+#define R500_VAP_TEX_TO_COLOR_CNTL 0x2218
+
#define R300_VAP_CLIP_CNTL 0x221C
# define R300_VAP_UCP_ENABLE_0 (1 << 0)
# define R300_VAP_UCP_ENABLE_1 (1 << 1)
@@ -857,6 +859,8 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
# define R500_TX_DIRECTION_HORIZONTAL (0<<27)
# define R500_TX_DIRECTION_VERITCAL (1<<27)
+#define R500_SU_TEX_WRAP_PS3 0x4114
+
/* S Texture Coordinate of Vertex 0 for Point texture stuffing (LLC) */
#define R300_GA_POINT_S0 0x4200
@@ -2162,14 +2166,11 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
/* R4xx extended fragment shader registers. */
#define R400_US_ALU_EXT_ADDR_0 0x4ac0 /* up to 63 (0x4bbc) */
-# define R400_ADDR0_EXT_RGB_MSB_BIT 0x01
-# define R400_ADDR1_EXT_RGB_MSB_BIT 0x02
-# define R400_ADDR2_EXT_RGB_MSB_BIT 0x04
+# define R400_ADDR_EXT_RGB_MSB_BIT(x) (1 << (x))
# define R400_ADDRD_EXT_RGB_MSB_BIT 0x08
-# define R400_ADDR0_EXT_A_MSB_BIT 0x10
-# define R400_ADDR1_EXT_A_MSB_BIT 0x20
-# define R400_ADDR2_EXT_A_MSB_BIT 0x40
+# define R400_ADDR_EXT_A_MSB_BIT(x) (1 << ((x) + 4))
# define R400_ADDRD_EXT_A_MSB_BIT 0x80
+
#define R400_US_CODE_BANK 0x46b8
# define R400_BANK_SHIFT 0
# define R400_BANK_MASK 0xf
@@ -2631,8 +2632,8 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
#define R300_ZB_BW_CNTL 0x4f1c
# define R300_HIZ_DISABLE (0 << 0)
# define R300_HIZ_ENABLE (1 << 0)
-# define R300_HIZ_MIN (0 << 1)
-# define R300_HIZ_MAX (1 << 1)
+# define R300_HIZ_MAX (0 << 1)
+# define R300_HIZ_MIN (1 << 1)
# define R300_FAST_FILL_DISABLE (0 << 2)
# define R300_FAST_FILL_ENABLE (1 << 2)
# define R300_RD_COMP_DISABLE (0 << 3)
diff --git a/src/gallium/drivers/r300/r300_render.c b/src/gallium/drivers/r300/r300_render.c
index b4197e03520..26594dabe42 100644
--- a/src/gallium/drivers/r300/r300_render.c
+++ b/src/gallium/drivers/r300/r300_render.c
@@ -39,7 +39,6 @@
#include "r300_screen_buffer.h"
#include "r300_emit.h"
#include "r300_reg.h"
-#include "r300_state_derived.h"
#include <limits.h>
@@ -128,16 +127,30 @@ void r500_emit_index_bias(struct r300_context *r300, int index_bias)
END_CS;
}
+static void r300_emit_draw_init(struct r300_context *r300, unsigned mode,
+ unsigned min_index, unsigned max_index)
+{
+ CS_LOCALS(r300);
+
+ BEGIN_CS(5);
+ OUT_CS_REG(R300_GA_COLOR_CONTROL,
+ r300_provoking_vertex_fixes(r300, mode));
+ OUT_CS_REG_SEQ(R300_VAP_VF_MAX_VTX_INDX, 2);
+ OUT_CS(max_index);
+ OUT_CS(min_index);
+ END_CS;
+}
+
/* This function splits the index bias value into two parts:
* - buffer_offset: the value that can be safely added to buffer offsets
- * in r300_emit_aos (it must yield a positive offset when added to
+ * in r300_emit_vertex_arrays (it must yield a positive offset when added to
* a vertex buffer offset)
* - index_offset: the value that must be manually subtracted from indices
* in an index buffer to achieve negative offsets. */
static void r300_split_index_bias(struct r300_context *r300, int index_bias,
int *buffer_offset, int *index_offset)
{
- struct pipe_vertex_buffer *vb, *vbufs = r300->vertex_buffer;
+ struct pipe_vertex_buffer *vb, *vbufs = r300->vbuf_mgr->vertex_buffer;
struct pipe_vertex_element *velem = r300->velems->velem;
unsigned i, size;
int max_neg_bias;
@@ -164,10 +177,10 @@ static void r300_split_index_bias(struct r300_context *r300, int index_bias,
}
enum r300_prepare_flags {
- PREP_FIRST_DRAW = (1 << 0), /* call emit_dirty_state and friends? */
+ PREP_EMIT_STATES = (1 << 0), /* call emit_dirty_state and friends? */
PREP_VALIDATE_VBOS = (1 << 1), /* validate VBOs? */
- PREP_EMIT_AOS = (1 << 2), /* call emit_aos? */
- PREP_EMIT_AOS_SWTCL = (1 << 3), /* call emit_aos_swtcl? */
+ PREP_EMIT_AOS = (1 << 2), /* call emit_vertex_arrays? */
+ PREP_EMIT_AOS_SWTCL = (1 << 3), /* call emit_vertex_arrays_swtcl? */
PREP_INDEXED = (1 << 4) /* is this draw_elements? */
};
@@ -180,33 +193,33 @@ enum r300_prepare_flags {
* \return TRUE if the CS was flushed
*/
static boolean r300_reserve_cs_dwords(struct r300_context *r300,
- enum r300_prepare_flags flags,
- unsigned cs_dwords)
+ enum r300_prepare_flags flags,
+ unsigned cs_dwords)
{
boolean flushed = FALSE;
- boolean first_draw = flags & PREP_FIRST_DRAW;
- boolean emit_aos = flags & PREP_EMIT_AOS;
- boolean emit_aos_swtcl = flags & PREP_EMIT_AOS_SWTCL;
+ boolean first_draw = flags & PREP_EMIT_STATES;
+ boolean emit_vertex_arrays = flags & PREP_EMIT_AOS;
+ boolean emit_vertex_arrays_swtcl = flags & PREP_EMIT_AOS_SWTCL;
/* Add dirty state, index offset, and AOS. */
if (first_draw) {
cs_dwords += r300_get_num_dirty_dwords(r300);
- if (r300->screen->caps.index_bias_supported)
+ if (r300->screen->caps.is_r500)
cs_dwords += 2; /* emit_index_offset */
- if (emit_aos)
- cs_dwords += 55; /* emit_aos */
+ if (emit_vertex_arrays)
+ cs_dwords += 55; /* emit_vertex_arrays */
- if (emit_aos_swtcl)
- cs_dwords += 7; /* emit_aos_swtcl */
+ if (emit_vertex_arrays_swtcl)
+ cs_dwords += 7; /* emit_vertex_arrays_swtcl */
}
cs_dwords += r300_get_num_cs_end_dwords(r300);
/* Reserve requested CS space. */
if (cs_dwords > (R300_MAX_CMDBUF_DWORDS - r300->cs->cdw)) {
- r300->context.flush(&r300->context, 0, NULL);
+ r300_flush(&r300->context, R300_FLUSH_ASYNC, NULL);
flushed = TRUE;
}
@@ -218,57 +231,55 @@ static boolean r300_reserve_cs_dwords(struct r300_context *r300,
* \param r300 The context.
* \param flags See r300_prepare_flags.
* \param index_buffer The index buffer to validate. The parameter may be NULL.
- * \param aos_offset The offset passed to emit_aos.
+ * \param buffer_offset The offset passed to emit_vertex_arrays.
* \param index_bias The index bias to emit.
+ * \param instance_id Index of instance to render
* \return TRUE if rendering should be skipped
*/
static boolean r300_emit_states(struct r300_context *r300,
enum r300_prepare_flags flags,
struct pipe_resource *index_buffer,
- int aos_offset,
- int index_bias)
+ int buffer_offset,
+ int index_bias, int instance_id)
{
- boolean first_draw = flags & PREP_FIRST_DRAW;
- boolean emit_aos = flags & PREP_EMIT_AOS;
- boolean emit_aos_swtcl = flags & PREP_EMIT_AOS_SWTCL;
+ boolean first_draw = flags & PREP_EMIT_STATES;
+ boolean emit_vertex_arrays = flags & PREP_EMIT_AOS;
+ boolean emit_vertex_arrays_swtcl = flags & PREP_EMIT_AOS_SWTCL;
boolean indexed = flags & PREP_INDEXED;
boolean validate_vbos = flags & PREP_VALIDATE_VBOS;
/* Validate buffers and emit dirty state if needed. */
if (first_draw) {
- /* upload buffers first */
- if (r300->screen->caps.has_tcl && r300->any_user_vbs) {
- r300_upload_user_buffers(r300);
- r300->any_user_vbs = false;
- }
-
- if (r300->validate_buffers) {
- if (!r300_emit_buffer_validate(r300, validate_vbos,
- index_buffer)) {
- fprintf(stderr, "r300: CS space validation failed. "
- "(not enough memory?) Skipping rendering.\n");
- return FALSE;
- }
-
- /* Consider the validation done only if everything was validated. */
- if (validate_vbos) {
- r300->validate_buffers = FALSE;
- }
+ if (!r300_emit_buffer_validate(r300, validate_vbos,
+ index_buffer)) {
+ fprintf(stderr, "r300: CS space validation failed. "
+ "(not enough memory?) Skipping rendering.\n");
+ return FALSE;
}
r300_emit_dirty_state(r300);
- if (r300->screen->caps.index_bias_supported) {
+ if (r300->screen->caps.is_r500) {
if (r300->screen->caps.has_tcl)
r500_emit_index_bias(r300, index_bias);
else
r500_emit_index_bias(r300, 0);
}
- if (emit_aos)
- r300_emit_aos(r300, aos_offset, indexed);
+ if (emit_vertex_arrays &&
+ (r300->vertex_arrays_dirty ||
+ r300->vertex_arrays_indexed != indexed ||
+ r300->vertex_arrays_offset != buffer_offset ||
+ r300->vertex_arrays_instance_id != instance_id)) {
+ r300_emit_vertex_arrays(r300, buffer_offset, indexed, instance_id);
+
+ r300->vertex_arrays_dirty = FALSE;
+ r300->vertex_arrays_indexed = indexed;
+ r300->vertex_arrays_offset = buffer_offset;
+ r300->vertex_arrays_instance_id = instance_id;
+ }
- if (emit_aos_swtcl)
- r300_emit_aos_swtcl(r300, indexed);
+ if (emit_vertex_arrays_swtcl)
+ r300_emit_vertex_arrays_swtcl(r300, indexed);
}
return TRUE;
@@ -281,28 +292,32 @@ static boolean r300_emit_states(struct r300_context *r300,
* \param flags See r300_prepare_flags.
* \param index_buffer The index buffer to validate. The parameter may be NULL.
* \param cs_dwords The number of dwords to reserve in CS.
- * \param aos_offset The offset passed to emit_aos.
+ * \param buffer_offset The offset passed to emit_vertex_arrays.
* \param index_bias The index bias to emit.
+ * \param instance_id The instance to render.
* \return TRUE if rendering should be skipped
*/
static boolean r300_prepare_for_rendering(struct r300_context *r300,
enum r300_prepare_flags flags,
struct pipe_resource *index_buffer,
unsigned cs_dwords,
- int aos_offset,
- int index_bias)
+ int buffer_offset,
+ int index_bias,
+ int instance_id)
{
+ /* Make sure there is enough space in the command stream and emit states. */
if (r300_reserve_cs_dwords(r300, flags, cs_dwords))
- flags |= PREP_FIRST_DRAW;
+ flags |= PREP_EMIT_STATES;
- return r300_emit_states(r300, flags, index_buffer, aos_offset, index_bias);
+ return r300_emit_states(r300, flags, index_buffer, buffer_offset,
+ index_bias, instance_id);
}
static boolean immd_is_good_idea(struct r300_context *r300,
unsigned count)
{
struct pipe_vertex_element* velem;
- struct pipe_vertex_buffer* vbuf;
+ struct pipe_resource *buf;
boolean checked[PIPE_MAX_ATTRIBS] = {0};
unsigned vertex_element_count = r300->velems->count;
unsigned i, vbi;
@@ -326,18 +341,12 @@ static boolean immd_is_good_idea(struct r300_context *r300,
vbi = velem->vertex_buffer_index;
if (!checked[vbi]) {
- vbuf = &r300->vertex_buffer[vbi];
+ buf = r300->vbuf_mgr->real_vertex_buffer[vbi];
- if (!(r300_buffer(vbuf->buffer)->domain & R300_DOMAIN_GTT)) {
+ if ((r300_resource(buf)->domain != R300_DOMAIN_GTT)) {
return FALSE;
}
- if (r300_buffer_is_referenced(&r300->context,
- vbuf->buffer,
- R300_REF_CS | R300_REF_HW)) {
- /* It's a very bad idea to map it... */
- return FALSE;
- }
checked[vbi] = TRUE;
}
}
@@ -348,10 +357,8 @@ static boolean immd_is_good_idea(struct r300_context *r300,
* The HWTCL draw functions. *
****************************************************************************/
-static void r300_emit_draw_arrays_immediate(struct r300_context *r300,
- unsigned mode,
- unsigned start,
- unsigned count)
+static void r300_draw_arrays_immediate(struct r300_context *r300,
+ const struct pipe_draw_info *info)
{
struct pipe_vertex_element* velem;
struct pipe_vertex_buffer* vbuf;
@@ -362,7 +369,7 @@ static void r300_emit_draw_arrays_immediate(struct r300_context *r300,
unsigned vertex_size = r300->velems->vertex_size_dwords;
/* The number of dwords for this draw operation. */
- unsigned dwords = 9 + count * vertex_size;
+ unsigned dwords = 4 + info->count * vertex_size;
/* Size of the vertex element, in dwords. */
unsigned size[PIPE_MAX_ATTRIBS];
@@ -372,47 +379,42 @@ static void r300_emit_draw_arrays_immediate(struct r300_context *r300,
unsigned stride[PIPE_MAX_ATTRIBS];
/* Mapped vertex buffers. */
- uint32_t* map[PIPE_MAX_ATTRIBS];
+ uint32_t* map[PIPE_MAX_ATTRIBS] = {0};
uint32_t* mapelem[PIPE_MAX_ATTRIBS];
- struct pipe_transfer* transfer[PIPE_MAX_ATTRIBS] = {0};
CS_LOCALS(r300);
- if (!r300_prepare_for_rendering(r300, PREP_FIRST_DRAW, NULL, dwords, 0, 0))
+ if (!r300_prepare_for_rendering(r300, PREP_EMIT_STATES, NULL, dwords, 0, 0, -1))
return;
/* Calculate the vertex size, offsets, strides etc. and map the buffers. */
for (i = 0; i < vertex_element_count; i++) {
velem = &r300->velems->velem[i];
- size[i] = r300->velems->hw_format_size[i] / 4;
+ size[i] = r300->velems->format_size[i] / 4;
vbi = velem->vertex_buffer_index;
- vbuf = &r300->vertex_buffer[vbi];
+ vbuf = &r300->vbuf_mgr->vertex_buffer[vbi];
stride[i] = vbuf->stride / 4;
/* Map the buffer. */
- if (!transfer[vbi]) {
- map[vbi] = (uint32_t*)pipe_buffer_map(&r300->context,
- vbuf->buffer,
- PIPE_TRANSFER_READ,
- &transfer[vbi]);
- map[vbi] += (vbuf->buffer_offset / 4) + stride[i] * start;
+ if (!map[vbi]) {
+ map[vbi] = (uint32_t*)r300->rws->buffer_map(
+ r300_resource(r300->vbuf_mgr->real_vertex_buffer[vbi])->buf,
+ r300->cs, PIPE_TRANSFER_READ | PIPE_TRANSFER_UNSYNCHRONIZED);
+ map[vbi] += (vbuf->buffer_offset / 4) + stride[i] * info->start;
}
mapelem[i] = map[vbi] + (velem->src_offset / 4);
}
+ r300_emit_draw_init(r300, info->mode, 0, info->count-1);
+
BEGIN_CS(dwords);
- OUT_CS_REG(R300_GA_COLOR_CONTROL,
- r300_provoking_vertex_fixes(r300, mode));
OUT_CS_REG(R300_VAP_VTX_SIZE, vertex_size);
- OUT_CS_REG_SEQ(R300_VAP_VF_MAX_VTX_INDX, 2);
- OUT_CS(count - 1);
- OUT_CS(0);
- OUT_CS_PKT3(R300_PACKET3_3D_DRAW_IMMD_2, count * vertex_size);
- OUT_CS(R300_VAP_VF_CNTL__PRIM_WALK_VERTEX_EMBEDDED | (count << 16) |
- r300_translate_primitive(mode));
+ OUT_CS_PKT3(R300_PACKET3_3D_DRAW_IMMD_2, info->count * vertex_size);
+ OUT_CS(R300_VAP_VF_CNTL__PRIM_WALK_VERTEX_EMBEDDED | (info->count << 16) |
+ r300_translate_primitive(info->mode));
/* Emit vertices. */
- for (v = 0; v < count; v++) {
+ for (v = 0; v < info->count; v++) {
for (i = 0; i < vertex_element_count; i++) {
OUT_CS_TABLE(&mapelem[i][stride[i] * v], size[i]);
}
@@ -423,10 +425,9 @@ static void r300_emit_draw_arrays_immediate(struct r300_context *r300,
for (i = 0; i < vertex_element_count; i++) {
vbi = r300->velems->velem[i].vertex_buffer_index;
- if (transfer[vbi]) {
- vbuf = &r300->vertex_buffer[vbi];
- pipe_buffer_unmap(&r300->context, vbuf->buffer, transfer[vbi]);
- transfer[vbi] = NULL;
+ if (map[vbi]) {
+ r300->rws->buffer_unmap(r300_resource(r300->vbuf_mgr->real_vertex_buffer[vbi])->buf);
+ map[vbi] = NULL;
}
}
}
@@ -444,15 +445,12 @@ static void r300_emit_draw_arrays(struct r300_context *r300,
return;
}
- BEGIN_CS(7 + (alt_num_verts ? 2 : 0));
+ r300_emit_draw_init(r300, mode, 0, count-1);
+
+ BEGIN_CS(2 + (alt_num_verts ? 2 : 0));
if (alt_num_verts) {
OUT_CS_REG(R500_VAP_ALT_NUM_VERTICES, count);
}
- OUT_CS_REG(R300_GA_COLOR_CONTROL,
- r300_provoking_vertex_fixes(r300, mode));
- OUT_CS_REG_SEQ(R300_VAP_VF_MAX_VTX_INDX, 2);
- OUT_CS(count - 1);
- OUT_CS(0);
OUT_CS_PKT3(R300_PACKET3_3D_DRAW_VBUF_2, 0);
OUT_CS(R300_VAP_VF_CNTL__PRIM_WALK_VERTEX_LIST | (count << 16) |
r300_translate_primitive(mode) |
@@ -463,37 +461,53 @@ static void r300_emit_draw_arrays(struct r300_context *r300,
static void r300_emit_draw_elements(struct r300_context *r300,
struct pipe_resource* indexBuffer,
unsigned indexSize,
- unsigned minIndex,
- unsigned maxIndex,
+ unsigned min_index,
+ unsigned max_index,
unsigned mode,
unsigned start,
- unsigned count)
+ unsigned count,
+ uint16_t *imm_indices3)
{
- uint32_t count_dwords;
- uint32_t offset_dwords = indexSize * start / sizeof(uint32_t);
+ uint32_t count_dwords, offset_dwords;
boolean alt_num_verts = count > 65535;
CS_LOCALS(r300);
- if (count >= (1 << 24)) {
+ if (count >= (1 << 24) || max_index >= (1 << 24)) {
fprintf(stderr, "r300: Got a huge number of vertices: %i, "
- "refusing to render.\n", count);
+ "refusing to render (max_index: %i).\n", count, max_index);
return;
}
- maxIndex = MIN2(maxIndex, r300->vertex_buffer_max_index);
-
DBG(r300, DBG_DRAW, "r300: Indexbuf of %u indices, min %u max %u\n",
- count, minIndex, maxIndex);
+ count, min_index, max_index);
+
+ r300_emit_draw_init(r300, mode, min_index, max_index);
+
+ /* If start is odd, render the first triangle with indices embedded
+ * in the command stream. This will increase start by 3 and make it
+ * even. We can then proceed without a fallback. */
+ if (indexSize == 2 && (start & 1) &&
+ mode == PIPE_PRIM_TRIANGLES) {
+ BEGIN_CS(4);
+ OUT_CS_PKT3(R300_PACKET3_3D_DRAW_INDX_2, 2);
+ OUT_CS(R300_VAP_VF_CNTL__PRIM_WALK_INDICES | (3 << 16) |
+ R300_VAP_VF_CNTL__PRIM_TRIANGLES);
+ OUT_CS(imm_indices3[1] << 16 | imm_indices3[0]);
+ OUT_CS(imm_indices3[2]);
+ END_CS;
- BEGIN_CS(13 + (alt_num_verts ? 2 : 0));
+ start += 3;
+ count -= 3;
+ if (!count)
+ return;
+ }
+
+ offset_dwords = indexSize * start / sizeof(uint32_t);
+
+ BEGIN_CS(8 + (alt_num_verts ? 2 : 0));
if (alt_num_verts) {
OUT_CS_REG(R500_VAP_ALT_NUM_VERTICES, count);
}
- OUT_CS_REG(R300_GA_COLOR_CONTROL,
- r300_provoking_vertex_fixes(r300, mode));
- OUT_CS_REG_SEQ(R300_VAP_VF_MAX_VTX_INDX, 2);
- OUT_CS(maxIndex);
- OUT_CS(minIndex);
OUT_CS_PKT3(R300_PACKET3_3D_DRAW_INDX_2, 0);
if (indexSize == 4) {
count_dwords = count;
@@ -508,68 +522,169 @@ static void r300_emit_draw_elements(struct r300_context *r300,
(alt_num_verts ? R500_VAP_VF_CNTL__USE_ALT_NUM_VERTS : 0));
}
- /* INDX_BUFFER is a truly special packet3.
- * Unlike most other packet3, where the offset is after the count,
- * the order is reversed, so the relocation ends up carrying the
- * size of the indexbuf instead of the offset.
- */
OUT_CS_PKT3(R300_PACKET3_INDX_BUFFER, 2);
OUT_CS(R300_INDX_BUFFER_ONE_REG_WR | (R300_VAP_PORT_IDX0 >> 2) |
(0 << R300_INDX_BUFFER_SKIP_SHIFT));
OUT_CS(offset_dwords << 2);
- OUT_CS_BUF_RELOC(indexBuffer, count_dwords,
- r300_buffer(indexBuffer)->domain, 0);
+ OUT_CS(count_dwords);
+ OUT_CS_RELOC(r300_resource(indexBuffer));
+ END_CS;
+}
+
+static void r300_draw_elements_immediate(struct r300_context *r300,
+ const struct pipe_draw_info *info)
+{
+ uint8_t *ptr1;
+ uint16_t *ptr2;
+ uint32_t *ptr4;
+ unsigned index_size = r300->index_buffer.index_size;
+ unsigned i, count_dwords = index_size == 4 ? info->count :
+ (info->count + 1) / 2;
+ CS_LOCALS(r300);
+
+ /* 19 dwords for r300_draw_elements_immediate. Give up if the function fails. */
+ if (!r300_prepare_for_rendering(r300,
+ PREP_EMIT_STATES | PREP_VALIDATE_VBOS | PREP_EMIT_AOS |
+ PREP_INDEXED, NULL, 2+count_dwords, 0, info->index_bias, -1))
+ return;
+
+ r300_emit_draw_init(r300, info->mode, info->min_index, info->max_index);
+
+ BEGIN_CS(2 + count_dwords);
+ OUT_CS_PKT3(R300_PACKET3_3D_DRAW_INDX_2, count_dwords);
+ switch (index_size) {
+ case 1:
+ ptr1 = r300_resource(r300->index_buffer.buffer)->b.user_ptr;
+ ptr1 += info->start;
+
+ OUT_CS(R300_VAP_VF_CNTL__PRIM_WALK_INDICES | (info->count << 16) |
+ r300_translate_primitive(info->mode));
+
+ if (info->index_bias && !r300->screen->caps.is_r500) {
+ for (i = 0; i < info->count-1; i += 2)
+ OUT_CS(((ptr1[i+1] + info->index_bias) << 16) |
+ (ptr1[i] + info->index_bias));
+
+ if (info->count & 1)
+ OUT_CS(ptr1[i] + info->index_bias);
+ } else {
+ for (i = 0; i < info->count-1; i += 2)
+ OUT_CS(((ptr1[i+1]) << 16) |
+ (ptr1[i] ));
+
+ if (info->count & 1)
+ OUT_CS(ptr1[i]);
+ }
+ break;
+
+ case 2:
+ ptr2 = (uint16_t*)r300_resource(r300->index_buffer.buffer)->b.user_ptr;
+ ptr2 += info->start;
+
+ OUT_CS(R300_VAP_VF_CNTL__PRIM_WALK_INDICES | (info->count << 16) |
+ r300_translate_primitive(info->mode));
+
+ if (info->index_bias && !r300->screen->caps.is_r500) {
+ for (i = 0; i < info->count-1; i += 2)
+ OUT_CS(((ptr2[i+1] + info->index_bias) << 16) |
+ (ptr2[i] + info->index_bias));
+
+ if (info->count & 1)
+ OUT_CS(ptr2[i] + info->index_bias);
+ } else {
+ OUT_CS_TABLE(ptr2, count_dwords);
+ }
+ break;
+
+ case 4:
+ ptr4 = (uint32_t*)r300_resource(r300->index_buffer.buffer)->b.user_ptr;
+ ptr4 += info->start;
+
+ OUT_CS(R300_VAP_VF_CNTL__PRIM_WALK_INDICES | (info->count << 16) |
+ R300_VAP_VF_CNTL__INDEX_SIZE_32bit |
+ r300_translate_primitive(info->mode));
+
+ if (info->index_bias && !r300->screen->caps.is_r500) {
+ for (i = 0; i < info->count; i++)
+ OUT_CS(ptr4[i] + info->index_bias);
+ } else {
+ OUT_CS_TABLE(ptr4, count_dwords);
+ }
+ break;
+ }
END_CS;
}
-/* This is the fast-path drawing & emission for HW TCL. */
-static void r300_draw_range_elements(struct pipe_context* pipe,
- struct pipe_resource* indexBuffer,
- unsigned indexSize,
- int indexBias,
- unsigned minIndex,
- unsigned maxIndex,
- unsigned mode,
- unsigned start,
- unsigned count)
+static void r300_draw_elements(struct r300_context *r300,
+ const struct pipe_draw_info *info,
+ int instance_id)
{
- struct r300_context* r300 = r300_context(pipe);
+ struct pipe_resource *indexBuffer = r300->index_buffer.buffer;
+ unsigned indexSize = r300->index_buffer.index_size;
struct pipe_resource* orgIndexBuffer = indexBuffer;
+ unsigned start = info->start;
+ unsigned count = info->count;
boolean alt_num_verts = r300->screen->caps.is_r500 &&
- count > 65536 &&
- r300->rws->get_value(r300->rws, R300_VID_DRM_2_3_0);
+ count > 65536;
unsigned short_count;
int buffer_offset = 0, index_offset = 0; /* for index bias emulation */
- unsigned new_offset;
+ uint16_t indices3[3];
- if (indexBias && !r300->screen->caps.index_bias_supported) {
- r300_split_index_bias(r300, indexBias, &buffer_offset, &index_offset);
+ if (info->index_bias && !r300->screen->caps.is_r500) {
+ r300_split_index_bias(r300, info->index_bias, &buffer_offset, &index_offset);
}
r300_translate_index_buffer(r300, &indexBuffer, &indexSize, index_offset,
&start, count);
- r300_update_derived_state(r300);
- r300_upload_index_buffer(r300, &indexBuffer, indexSize, start, count, &new_offset);
-
- start = new_offset;
+ /* Fallback for misaligned ushort indices. */
+ if (indexSize == 2 && (start & 1) &&
+ !r300_resource(indexBuffer)->b.user_ptr) {
+ /* If we got here, then orgIndexBuffer == indexBuffer. */
+ uint16_t *ptr = r300->rws->buffer_map(r300_resource(orgIndexBuffer)->buf,
+ r300->cs,
+ PIPE_TRANSFER_READ |
+ PIPE_TRANSFER_UNSYNCHRONIZED);
+
+ if (info->mode == PIPE_PRIM_TRIANGLES) {
+ memcpy(indices3, ptr + start, 6);
+ } else {
+ /* Copy the mapped index buffer directly to the upload buffer.
+ * The start index will be aligned simply from the fact that
+ * every sub-buffer in the upload buffer is aligned. */
+ r300_upload_index_buffer(r300, &indexBuffer, indexSize, &start,
+ count, (uint8_t*)ptr);
+ }
+ r300->rws->buffer_unmap(r300_resource(orgIndexBuffer)->buf);
+ } else {
+ if (r300_resource(indexBuffer)->b.user_ptr)
+ r300_upload_index_buffer(r300, &indexBuffer, indexSize,
+ &start, count,
+ r300_resource(indexBuffer)->b.user_ptr);
+ }
- /* 15 dwords for emit_draw_elements. Give up if the function fails. */
+ /* 19 dwords for emit_draw_elements. Give up if the function fails. */
if (!r300_prepare_for_rendering(r300,
- PREP_FIRST_DRAW | PREP_VALIDATE_VBOS | PREP_EMIT_AOS |
- PREP_INDEXED, indexBuffer, 15, buffer_offset, indexBias))
+ PREP_EMIT_STATES | PREP_VALIDATE_VBOS | PREP_EMIT_AOS |
+ PREP_INDEXED, indexBuffer, 19, buffer_offset, info->index_bias,
+ instance_id))
goto done;
if (alt_num_verts || count <= 65535) {
- r300_emit_draw_elements(r300, indexBuffer, indexSize,
- minIndex, maxIndex, mode, start, count);
+ r300_emit_draw_elements(r300, indexBuffer, indexSize, info->min_index,
+ info->max_index, info->mode, start, count,
+ indices3);
} else {
do {
- short_count = MIN2(count, 65534);
+ if (indexSize == 2 && (start & 1))
+ short_count = MIN2(count, 65535);
+ else
+ short_count = MIN2(count, 65534);
+
r300_emit_draw_elements(r300, indexBuffer, indexSize,
- minIndex, maxIndex,
- mode, start, short_count);
+ info->min_index, info->max_index,
+ info->mode, start, short_count, indices3);
start += short_count;
count -= short_count;
@@ -578,7 +693,8 @@ static void r300_draw_range_elements(struct pipe_context* pipe,
if (count) {
if (!r300_prepare_for_rendering(r300,
PREP_VALIDATE_VBOS | PREP_EMIT_AOS | PREP_INDEXED,
- indexBuffer, 15, buffer_offset, indexBias))
+ indexBuffer, 19, buffer_offset, info->index_bias,
+ instance_id))
goto done;
}
} while (count);
@@ -590,107 +706,112 @@ done:
}
}
-static void r300_draw_arrays(struct pipe_context* pipe, unsigned mode,
- unsigned start, unsigned count)
+static void r300_draw_arrays(struct r300_context *r300,
+ const struct pipe_draw_info *info,
+ int instance_id)
{
- struct r300_context* r300 = r300_context(pipe);
boolean alt_num_verts = r300->screen->caps.is_r500 &&
- count > 65536 &&
- r300->rws->get_value(r300->rws, R300_VID_DRM_2_3_0);
+ info->count > 65536;
+ unsigned start = info->start;
+ unsigned count = info->count;
unsigned short_count;
- r300_update_derived_state(r300);
+ /* 9 spare dwords for emit_draw_arrays. Give up if the function fails. */
+ if (!r300_prepare_for_rendering(r300,
+ PREP_EMIT_STATES | PREP_VALIDATE_VBOS | PREP_EMIT_AOS,
+ NULL, 9, start, 0, instance_id))
+ return;
- if (immd_is_good_idea(r300, count)) {
- r300_emit_draw_arrays_immediate(r300, mode, start, count);
+ if (alt_num_verts || count <= 65535) {
+ r300_emit_draw_arrays(r300, info->mode, count);
} else {
- /* 9 spare dwords for emit_draw_arrays. Give up if the function fails. */
- if (!r300_prepare_for_rendering(r300,
- PREP_FIRST_DRAW | PREP_VALIDATE_VBOS | PREP_EMIT_AOS,
- NULL, 9, start, 0))
- return;
+ do {
+ short_count = MIN2(count, 65535);
+ r300_emit_draw_arrays(r300, info->mode, short_count);
- if (alt_num_verts || count <= 65535) {
- r300_emit_draw_arrays(r300, mode, count);
- } else {
- do {
- short_count = MIN2(count, 65535);
- r300_emit_draw_arrays(r300, mode, short_count);
-
- start += short_count;
- count -= short_count;
-
- /* 9 spare dwords for emit_draw_arrays. Give up if the function fails. */
- if (count) {
- if (!r300_prepare_for_rendering(r300,
- PREP_VALIDATE_VBOS | PREP_EMIT_AOS, NULL, 9,
- start, 0))
- return;
- }
- } while (count);
- }
+ start += short_count;
+ count -= short_count;
+
+ /* 9 spare dwords for emit_draw_arrays. Give up if the function fails. */
+ if (count) {
+ if (!r300_prepare_for_rendering(r300,
+ PREP_VALIDATE_VBOS | PREP_EMIT_AOS, NULL, 9,
+ start, 0, instance_id))
+ return;
+ }
+ } while (count);
}
}
+static void r300_draw_arrays_instanced(struct r300_context *r300,
+ const struct pipe_draw_info *info)
+{
+ int i;
+
+ for (i = 0; i < info->instance_count; i++)
+ r300_draw_arrays(r300, info, i);
+}
+
+static void r300_draw_elements_instanced(struct r300_context *r300,
+ const struct pipe_draw_info *info)
+{
+ int i;
+
+ for (i = 0; i < info->instance_count; i++)
+ r300_draw_elements(r300, info, i);
+}
+
static void r300_draw_vbo(struct pipe_context* pipe,
- const struct pipe_draw_info *info)
+ const struct pipe_draw_info *dinfo)
{
struct r300_context* r300 = r300_context(pipe);
- unsigned count = info->count;
- boolean translate = FALSE;
- boolean indexed = info->indexed && r300->index_buffer.buffer;
- unsigned start_indexed = 0;
+ struct pipe_draw_info info = *dinfo;
+ boolean buffers_updated, uploader_flushed;
- if (r300->skip_rendering) {
- return;
- }
+ info.indexed = info.indexed && r300->index_buffer.buffer;
- if (!u_trim_pipe_prim(info->mode, &count)) {
+ if (r300->skip_rendering ||
+ !u_trim_pipe_prim(info.mode, &info.count)) {
return;
}
- /* Index buffer range checking. */
- if (indexed) {
- assert(r300->index_buffer.offset % r300->index_buffer.index_size == 0);
-
- /* Compute start for draw_elements, taking the offset into account. */
- start_indexed =
- info->start +
- (r300->index_buffer.offset / r300->index_buffer.index_size);
-
- if ((start_indexed + count) * r300->index_buffer.index_size >
- r300->index_buffer.buffer->width0) {
- fprintf(stderr, "r300: Invalid index buffer range. Skipping rendering.\n");
- return;
- }
- }
+ r300_update_derived_state(r300);
- /* Set up fallback for incompatible vertex layout if needed. */
- if (r300->incompatible_vb_layout || r300->velems->incompatible_layout) {
- r300_begin_vertex_translate(r300);
- translate = TRUE;
+ /* Start the vbuf manager and update buffers if needed. */
+ u_vbuf_mgr_draw_begin(r300->vbuf_mgr, &info,
+ &buffers_updated, &uploader_flushed);
+ if (buffers_updated) {
+ r300->vertex_arrays_dirty = TRUE;
}
- if (indexed) {
- r300_draw_range_elements(pipe,
- r300->index_buffer.buffer,
- r300->index_buffer.index_size,
- info->index_bias,
- info->min_index,
- info->max_index,
- info->mode,
- start_indexed,
- count);
+ /* Draw. */
+ if (info.indexed) {
+ info.start += r300->index_buffer.offset;
+ info.max_index = MIN2(r300->vbuf_mgr->max_index, info.max_index);
+
+ if (info.instance_count <= 1) {
+ if (info.count <= 8 &&
+ r300_resource(r300->index_buffer.buffer)->b.user_ptr) {
+ r300_draw_elements_immediate(r300, &info);
+ } else {
+ r300_draw_elements(r300, &info, -1);
+ }
+ } else {
+ r300_draw_elements_instanced(r300, &info);
+ }
} else {
- r300_draw_arrays(pipe,
- info->mode,
- info->start,
- count);
+ if (info.instance_count <= 1) {
+ if (immd_is_good_idea(r300, info.count)) {
+ r300_draw_arrays_immediate(r300, &info);
+ } else {
+ r300_draw_arrays(r300, &info, -1);
+ }
+ } else {
+ r300_draw_arrays_instanced(r300, &info);
+ }
}
- if (translate) {
- r300_end_vertex_translate(r300);
- }
+ u_vbuf_mgr_draw_end(r300->vbuf_mgr);
}
/****************************************************************************
@@ -721,15 +842,16 @@ static void r300_swtcl_draw_vbo(struct pipe_context* pipe,
r300_update_derived_state(r300);
r300_reserve_cs_dwords(r300,
- PREP_FIRST_DRAW | PREP_EMIT_AOS_SWTCL |
+ PREP_EMIT_STATES | PREP_EMIT_AOS_SWTCL |
(indexed ? PREP_INDEXED : 0),
indexed ? 256 : 6);
- for (i = 0; i < r300->vertex_buffer_count; i++) {
- if (r300->vertex_buffer[i].buffer) {
+ for (i = 0; i < r300->vbuf_mgr->nr_vertex_buffers; i++) {
+ if (r300->vbuf_mgr->vertex_buffer[i].buffer) {
void *buf = pipe_buffer_map(pipe,
- r300->vertex_buffer[i].buffer,
- PIPE_TRANSFER_READ,
+ r300->vbuf_mgr->vertex_buffer[i].buffer,
+ PIPE_TRANSFER_READ |
+ PIPE_TRANSFER_UNSYNCHRONIZED,
&vb_transfer[i]);
draw_set_mapped_vertex_buffer(r300->draw, i, buf);
}
@@ -737,7 +859,8 @@ static void r300_swtcl_draw_vbo(struct pipe_context* pipe,
if (indexed) {
indices = pipe_buffer_map(pipe, r300->index_buffer.buffer,
- PIPE_TRANSFER_READ, &ib_transfer);
+ PIPE_TRANSFER_READ |
+ PIPE_TRANSFER_UNSYNCHRONIZED, &ib_transfer);
}
draw_set_mapped_index_buffer(r300->draw, indices);
@@ -748,16 +871,15 @@ static void r300_swtcl_draw_vbo(struct pipe_context* pipe,
draw_flush(r300->draw);
r300->draw_vbo_locked = FALSE;
- for (i = 0; i < r300->vertex_buffer_count; i++) {
- if (r300->vertex_buffer[i].buffer) {
- pipe_buffer_unmap(pipe, r300->vertex_buffer[i].buffer,
- vb_transfer[i]);
+ for (i = 0; i < r300->vbuf_mgr->nr_vertex_buffers; i++) {
+ if (r300->vbuf_mgr->vertex_buffer[i].buffer) {
+ pipe_buffer_unmap(pipe, vb_transfer[i]);
draw_set_mapped_vertex_buffer(r300->draw, i, NULL);
}
}
if (indexed) {
- pipe_buffer_unmap(pipe, r300->index_buffer.buffer, ib_transfer);
+ pipe_buffer_unmap(pipe, ib_transfer);
draw_set_mapped_index_buffer(r300->draw, NULL);
}
}
@@ -813,10 +935,10 @@ static boolean r300_render_allocate_vertices(struct vbuf_render* render,
pipe_resource_reference(&r300->vbo, NULL);
r300->vbo = pipe_buffer_create(screen,
PIPE_BIND_VERTEX_BUFFER,
+ PIPE_USAGE_STREAM,
R300_MAX_DRAW_VBO_SIZE);
r300->draw_vbo_offset = 0;
r300->draw_vbo_size = R300_MAX_DRAW_VBO_SIZE;
- r300->validate_buffers = TRUE;
}
r300render->vertex_size = vertex_size;
@@ -835,7 +957,8 @@ static void* r300_render_map_vertices(struct vbuf_render* render)
r300render->vbo_ptr = pipe_buffer_map(&r300render->r300->context,
r300->vbo,
- PIPE_TRANSFER_WRITE,
+ PIPE_TRANSFER_WRITE |
+ PIPE_TRANSFER_UNSYNCHRONIZED,
&r300render->vbo_transfer);
assert(r300render->vbo_ptr);
@@ -857,7 +980,7 @@ static void r300_render_unmap_vertices(struct vbuf_render* render,
r300render->vbo_max_used = MAX2(r300render->vbo_max_used,
r300render->vertex_size * (max + 1));
- pipe_buffer_unmap(context, r300->vbo, r300render->vbo_transfer);
+ pipe_buffer_unmap(context, r300render->vbo_transfer);
r300render->vbo_transfer = NULL;
}
@@ -901,33 +1024,16 @@ static void r300_render_draw_arrays(struct vbuf_render* render,
if (r300->draw_first_emitted) {
if (!r300_prepare_for_rendering(r300,
- PREP_FIRST_DRAW | PREP_EMIT_AOS_SWTCL,
- NULL, 6, 0, 0))
+ PREP_EMIT_STATES | PREP_EMIT_AOS_SWTCL,
+ NULL, dwords, 0, 0, -1))
return;
} else {
if (!r300_emit_states(r300,
- PREP_FIRST_DRAW | PREP_EMIT_AOS_SWTCL,
- NULL, 0, 0))
+ PREP_EMIT_STATES | PREP_EMIT_AOS_SWTCL,
+ NULL, 0, 0, -1))
return;
}
- /* Uncomment to dump all VBOs rendered through this interface.
- * Slow and noisy!
- ptr = pipe_buffer_map(&r300render->r300->context,
- r300render->vbo, PIPE_TRANSFER_READ,
- &r300render->vbo_transfer);
-
- for (i = 0; i < count; i++) {
- printf("r300: Vertex %d\n", i);
- draw_dump_emitted_vertex(&r300->vertex_info, ptr);
- ptr += r300->vertex_info.size * 4;
- printf("\n");
- }
-
- pipe_buffer_unmap(&r300render->r300->context, r300render->vbo,
- r300render->vbo_transfer);
- */
-
BEGIN_CS(dwords);
OUT_CS_REG(R300_GA_COLOR_CONTROL,
r300_provoking_vertex_fixes(r300, r300render->prim));
@@ -958,13 +1064,13 @@ static void r300_render_draw_elements(struct vbuf_render* render,
if (r300->draw_first_emitted) {
if (!r300_prepare_for_rendering(r300,
- PREP_FIRST_DRAW | PREP_EMIT_AOS_SWTCL | PREP_INDEXED,
- NULL, 256, 0, 0))
+ PREP_EMIT_STATES | PREP_EMIT_AOS_SWTCL | PREP_INDEXED,
+ NULL, 256, 0, 0, -1))
return;
} else {
if (!r300_emit_states(r300,
- PREP_FIRST_DRAW | PREP_EMIT_AOS_SWTCL | PREP_INDEXED,
- NULL, 0, 0))
+ PREP_EMIT_STATES | PREP_EMIT_AOS_SWTCL | PREP_INDEXED,
+ NULL, 0, 0, -1))
return;
}
@@ -1001,7 +1107,7 @@ static void r300_render_draw_elements(struct vbuf_render* render,
if (count) {
if (!r300_prepare_for_rendering(r300,
PREP_EMIT_AOS_SWTCL | PREP_INDEXED,
- NULL, 256, 0, 0))
+ NULL, 256, 0, 0, -1))
return;
end_cs_dwords = r300_get_num_cs_end_dwords(r300);
@@ -1022,8 +1128,7 @@ static struct vbuf_render* r300_render_create(struct r300_context* r300)
r300render->r300 = r300;
- /* XXX find real numbers plz */
- r300render->base.max_vertex_buffer_bytes = 128 * 1024;
+ r300render->base.max_vertex_buffer_bytes = 1024 * 1024;
r300render->base.max_indices = 16 * 1024;
r300render->base.get_vertex_info = r300_render_get_vertex_info;
@@ -1106,7 +1211,7 @@ static void r300_blitter_draw_rectangle(struct blitter_context *blitter,
r300->clip_state.dirty = FALSE;
r300->viewport_state.dirty = FALSE;
- if (!r300_prepare_for_rendering(r300, PREP_FIRST_DRAW, NULL, dwords, 0, 0))
+ if (!r300_prepare_for_rendering(r300, PREP_EMIT_STATES, NULL, dwords, 0, 0, -1))
goto done;
DBG(r300, DBG_DRAW, "r300: draw_rectangle\n");
@@ -1190,7 +1295,7 @@ static void r300_resource_resolve(struct pipe_context* pipe,
aa->aaresolve_ctl =
R300_RB3D_AARESOLVE_CTL_AARESOLVE_MODE_RESOLVE |
R300_RB3D_AARESOLVE_CTL_AARESOLVE_ALPHA_AVERAGE;
- r300->aa_state.size = 12;
+ r300->aa_state.size = 10;
r300_mark_atom_dirty(r300, &r300->aa_state);
/* Resolve the surface. */
diff --git a/src/gallium/drivers/r300/r300_render_translate.c b/src/gallium/drivers/r300/r300_render_translate.c
index 41a43b04de7..f8c7558f4b4 100644
--- a/src/gallium/drivers/r300/r300_render_translate.c
+++ b/src/gallium/drivers/r300/r300_render_translate.c
@@ -20,203 +20,64 @@
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
* USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/**
- * The functions below translate vertex and index buffers to the layout
- * compatible with the hardware, so that all vertex and index fetches are
- * DWORD-aligned and all used vertex and index formats are supported.
- * For indices, an optional index offset is added to each index.
- */
-
#include "r300_context.h"
-#include "translate/translate.h"
#include "util/u_index_modify.h"
+#include "util/u_upload_mgr.h"
-void r300_begin_vertex_translate(struct r300_context *r300)
-{
- struct pipe_context *pipe = &r300->context;
- struct translate_key key = {0};
- struct translate_element *te;
- unsigned tr_elem_index[PIPE_MAX_ATTRIBS] = {0};
- struct translate *tr;
- struct r300_vertex_element_state *ve = r300->velems;
- boolean vb_translated[PIPE_MAX_ATTRIBS] = {0};
- void *vb_map[PIPE_MAX_ATTRIBS] = {0}, *out_map;
- struct pipe_transfer *vb_transfer[PIPE_MAX_ATTRIBS] = {0}, *out_transfer;
- struct pipe_resource *out_buffer;
- unsigned i, num_verts;
-
- /* Initialize the translate key, i.e. the recipe how vertices should be
- * translated. */
- for (i = 0; i < ve->count; i++) {
- struct pipe_vertex_buffer *vb =
- &r300->vertex_buffer[ve->velem[i].vertex_buffer_index];
- enum pipe_format output_format = ve->hw_format[i];
- unsigned output_format_size = ve->hw_format_size[i];
-
- /* Check for support. */
- if (ve->velem[i].src_format == ve->hw_format[i] &&
- (vb->buffer_offset + ve->velem[i].src_offset) % 4 == 0 &&
- vb->stride % 4 == 0) {
- continue;
- }
-
- /* Workaround for translate: output floats instead of halfs. */
- switch (output_format) {
- case PIPE_FORMAT_R16_FLOAT:
- output_format = PIPE_FORMAT_R32_FLOAT;
- output_format_size = 4;
- break;
- case PIPE_FORMAT_R16G16_FLOAT:
- output_format = PIPE_FORMAT_R32G32_FLOAT;
- output_format_size = 8;
- break;
- case PIPE_FORMAT_R16G16B16_FLOAT:
- output_format = PIPE_FORMAT_R32G32B32_FLOAT;
- output_format_size = 12;
- break;
- case PIPE_FORMAT_R16G16B16A16_FLOAT:
- output_format = PIPE_FORMAT_R32G32B32A32_FLOAT;
- output_format_size = 16;
- break;
- default:;
- }
-
- /* Add this vertex element. */
- te = &key.element[key.nr_elements];
- /*te->type;
- te->instance_divisor;*/
- te->input_buffer = ve->velem[i].vertex_buffer_index;
- te->input_format = ve->velem[i].src_format;
- te->input_offset = vb->buffer_offset + ve->velem[i].src_offset;
- te->output_format = output_format;
- te->output_offset = key.output_stride;
-
- key.output_stride += output_format_size;
- vb_translated[ve->velem[i].vertex_buffer_index] = TRUE;
- tr_elem_index[i] = key.nr_elements;
- key.nr_elements++;
- }
-
- /* Get a translate object. */
- tr = translate_cache_find(r300->tran.translate_cache, &key);
-
- /* Map buffers we want to translate. */
- for (i = 0; i < r300->vertex_buffer_count; i++) {
- if (vb_translated[i]) {
- struct pipe_vertex_buffer *vb = &r300->vertex_buffer[i];
-
- vb_map[i] = pipe_buffer_map(pipe, vb->buffer,
- PIPE_TRANSFER_READ, &vb_transfer[i]);
-
- tr->set_buffer(tr, i, vb_map[i], vb->stride, vb->max_index);
- }
- }
-
- /* Create and map the output buffer. */
- num_verts = r300->vertex_buffer_max_index + 1;
-
- out_buffer = pipe_buffer_create(&r300->screen->screen,
- PIPE_BIND_VERTEX_BUFFER,
- key.output_stride * num_verts);
-
- out_map = pipe_buffer_map(pipe, out_buffer, PIPE_TRANSFER_WRITE,
- &out_transfer);
-
- /* Translate. */
- tr->run(tr, 0, num_verts, 0, out_map);
-
- /* Unmap all buffers. */
- for (i = 0; i < r300->vertex_buffer_count; i++) {
- if (vb_translated[i]) {
- pipe_buffer_unmap(pipe, r300->vertex_buffer[i].buffer,
- vb_transfer[i]);
- }
- }
-
- pipe_buffer_unmap(pipe, out_buffer, out_transfer);
-
- /* Setup the new vertex buffer in the first free slot. */
- for (i = 0; i < PIPE_MAX_ATTRIBS; i++) {
- struct pipe_vertex_buffer *vb = &r300->vertex_buffer[i];
-
- if (!vb->buffer) {
- pipe_resource_reference(&vb->buffer, out_buffer);
- vb->buffer_offset = 0;
- vb->max_index = num_verts - 1;
- vb->stride = key.output_stride;
- r300->tran.vb_slot = i;
- r300->validate_buffers = TRUE;
- break;
- }
- }
-
- /* Save and replace vertex elements. */
- {
- struct pipe_vertex_element new_velems[PIPE_MAX_ATTRIBS];
-
- r300->tran.saved_velems = r300->velems;
-
- for (i = 0; i < ve->count; i++) {
- if (vb_translated[ve->velem[i].vertex_buffer_index]) {
- te = &key.element[tr_elem_index[i]];
- new_velems[i].instance_divisor = ve->velem[i].instance_divisor;
- new_velems[i].src_format = te->output_format;
- new_velems[i].src_offset = te->output_offset;
- new_velems[i].vertex_buffer_index = r300->tran.vb_slot;
- } else {
- memcpy(&new_velems[i], &ve->velem[i],
- sizeof(struct pipe_vertex_element));
- }
- }
-
- r300->tran.new_velems =
- pipe->create_vertex_elements_state(pipe, ve->count, new_velems);
- pipe->bind_vertex_elements_state(pipe, r300->tran.new_velems);
- }
-
- pipe_resource_reference(&out_buffer, NULL);
-}
-
-void r300_end_vertex_translate(struct r300_context *r300)
-{
- struct pipe_context *pipe = &r300->context;
-
- /* Restore vertex elements. */
- pipe->bind_vertex_elements_state(pipe, r300->tran.saved_velems);
- pipe->delete_vertex_elements_state(pipe, r300->tran.new_velems);
-
- /* Delete the now-unused VBO. */
- pipe_resource_reference(&r300->vertex_buffer[r300->tran.vb_slot].buffer,
- NULL);
-}
void r300_translate_index_buffer(struct r300_context *r300,
struct pipe_resource **index_buffer,
unsigned *index_size, unsigned index_offset,
unsigned *start, unsigned count)
{
+ struct pipe_resource *out_buffer = NULL;
+ unsigned out_offset;
+ void *ptr;
+ boolean flushed;
+
switch (*index_size) {
- case 1:
- util_shorten_ubyte_elts(&r300->context, index_buffer, index_offset, *start, count);
- *index_size = 2;
- *start = 0;
- r300->validate_buffers = TRUE;
- break;
+ case 1:
+ u_upload_alloc(r300->vbuf_mgr->uploader, 0, count * 2,
+ &out_offset, &out_buffer, &flushed, &ptr);
+
+ util_shorten_ubyte_elts_to_userptr(
+ &r300->context, *index_buffer, index_offset,
+ *start, count, ptr);
+
+ *index_buffer = NULL;
+ pipe_resource_reference(index_buffer, out_buffer);
+ *index_size = 2;
+ *start = out_offset / 2;
+ break;
+
+ case 2:
+ if (index_offset) {
+ u_upload_alloc(r300->vbuf_mgr->uploader, 0, count * 2,
+ &out_offset, &out_buffer, &flushed, &ptr);
+
+ util_rebuild_ushort_elts_to_userptr(&r300->context, *index_buffer,
+ index_offset, *start,
+ count, ptr);
+
+ *index_buffer = NULL;
+ pipe_resource_reference(index_buffer, out_buffer);
+ *start = out_offset / 2;
+ }
+ break;
- case 2:
- if (*start % 2 != 0 || index_offset) {
- util_rebuild_ushort_elts(&r300->context, index_buffer, index_offset, *start, count);
- *start = 0;
- r300->validate_buffers = TRUE;
- }
- break;
+ case 4:
+ if (index_offset) {
+ u_upload_alloc(r300->vbuf_mgr->uploader, 0, count * 4,
+ &out_offset, &out_buffer, &flushed, &ptr);
- case 4:
- if (index_offset) {
- util_rebuild_uint_elts(&r300->context, index_buffer, index_offset, *start, count);
- *start = 0;
- r300->validate_buffers = TRUE;
- }
- break;
+ util_rebuild_uint_elts_to_userptr(&r300->context, *index_buffer,
+ index_offset, *start,
+ count, ptr);
+
+ *index_buffer = NULL;
+ pipe_resource_reference(index_buffer, out_buffer);
+ *start = out_offset / 4;
+ }
+ break;
}
}
diff --git a/src/gallium/drivers/r300/r300_resource.c b/src/gallium/drivers/r300/r300_resource.c
index dd1df970594..6593474b1f0 100644
--- a/src/gallium/drivers/r300/r300_resource.c
+++ b/src/gallium/drivers/r300/r300_resource.c
@@ -38,26 +38,14 @@ r300_resource_create(struct pipe_screen *screen,
}
-static struct pipe_resource *
-r300_resource_from_handle(struct pipe_screen * screen,
- const struct pipe_resource *templ,
- struct winsys_handle *whandle)
-{
- if (templ->target == PIPE_BUFFER)
- return NULL;
- else
- return r300_texture_from_handle(screen, templ, whandle);
-}
-
void r300_init_resource_functions(struct r300_context *r300)
{
r300->context.get_transfer = u_get_transfer_vtbl;
r300->context.transfer_map = u_transfer_map_vtbl;
- r300->context.transfer_flush_region = u_transfer_flush_region_vtbl;
+ r300->context.transfer_flush_region = u_default_transfer_flush_region;
r300->context.transfer_unmap = u_transfer_unmap_vtbl;
r300->context.transfer_destroy = u_transfer_destroy_vtbl;
r300->context.transfer_inline_write = u_transfer_inline_write_vtbl;
- r300->context.is_resource_referenced = u_is_resource_referenced_vtbl;
r300->context.create_surface = r300_create_surface;
r300->context.surface_destroy = r300_surface_destroy;
}
@@ -65,8 +53,8 @@ void r300_init_resource_functions(struct r300_context *r300)
void r300_init_screen_resource_functions(struct r300_screen *r300screen)
{
r300screen->screen.resource_create = r300_resource_create;
- r300screen->screen.resource_from_handle = r300_resource_from_handle;
- r300screen->screen.resource_get_handle = u_resource_get_handle_vtbl;
+ r300screen->screen.resource_from_handle = r300_texture_from_handle;
+ r300screen->screen.resource_get_handle = r300_resource_get_handle;
r300screen->screen.resource_destroy = u_resource_destroy_vtbl;
r300screen->screen.user_buffer_create = r300_user_buffer_create;
}
diff --git a/src/gallium/drivers/r300/r300_screen.c b/src/gallium/drivers/r300/r300_screen.c
index 921d6f1e676..8a69628c53e 100644
--- a/src/gallium/drivers/r300/r300_screen.c
+++ b/src/gallium/drivers/r300/r300_screen.c
@@ -24,6 +24,7 @@
#include "util/u_format.h"
#include "util/u_format_s3tc.h"
#include "util/u_memory.h"
+#include "os/os_time.h"
#include "r300_context.h"
#include "r300_texture.h"
@@ -83,12 +84,8 @@ static const char* r300_get_name(struct pipe_screen* pscreen)
static int r300_get_param(struct pipe_screen* pscreen, enum pipe_cap param)
{
struct r300_screen* r300screen = r300_screen(pscreen);
- boolean is_r400 = r300screen->caps.is_r400;
boolean is_r500 = r300screen->caps.is_r500;
- /* XXX extended shader capabilities of r400 unimplemented */
- is_r400 = FALSE;
-
switch (param) {
/* Supported features (boolean caps). */
case PIPE_CAP_NPOT_TEXTURES:
@@ -116,6 +113,7 @@ static int r300_get_param(struct pipe_screen* pscreen, enum pipe_cap param)
case PIPE_CAP_TEXTURE_MIRROR_CLAMP:
case PIPE_CAP_TEXTURE_MIRROR_REPEAT:
case PIPE_CAP_BLEND_EQUATION_SEPARATE:
+ case PIPE_CAP_VERTEX_ELEMENT_INSTANCE_DIVISOR:
return 1;
case PIPE_CAP_TEXTURE_SWIZZLE:
return util_format_s3tc_enabled ? r300screen->caps.dxtc_swizzle : 1;
@@ -125,12 +123,17 @@ static int r300_get_param(struct pipe_screen* pscreen, enum pipe_cap param)
case PIPE_CAP_DUAL_SOURCE_BLEND:
case PIPE_CAP_INDEP_BLEND_ENABLE:
case PIPE_CAP_INDEP_BLEND_FUNC:
- case PIPE_CAP_DEPTH_CLAMP: /* XXX implemented, but breaks Regnum Online */
+ case PIPE_CAP_DEPTH_CLAMP:
case PIPE_CAP_DEPTHSTENCIL_CLEAR_SEPARATE:
case PIPE_CAP_SHADER_STENCIL_EXPORT:
+ case PIPE_CAP_ARRAY_TEXTURES:
+ return 0;
+
+ /* SWTCL-only features. */
case PIPE_CAP_STREAM_OUTPUT:
case PIPE_CAP_PRIMITIVE_RESTART:
- return 0;
+ case PIPE_CAP_TGSI_INSTANCEID:
+ return !r300screen->caps.has_tcl;
/* Texturing. */
case PIPE_CAP_MAX_TEXTURE_IMAGE_UNITS:
@@ -171,9 +174,6 @@ static int r300_get_shader_param(struct pipe_screen *pscreen, unsigned shader, e
boolean is_r400 = r300screen->caps.is_r400;
boolean is_r500 = r300screen->caps.is_r500;
- /* XXX extended shader capabilities of r400 unimplemented */
- is_r400 = FALSE;
-
switch (shader)
{
case PIPE_SHADER_FRAGMENT:
@@ -306,10 +306,11 @@ static boolean r300_is_format_supported(struct pipe_screen* screen,
enum pipe_format format,
enum pipe_texture_target target,
unsigned sample_count,
- unsigned usage,
- unsigned geom_flags)
+ unsigned usage)
{
+ struct r300_winsys_screen *rws = r300_screen(screen)->rws;
uint32_t retval = 0;
+ boolean drm_2_8_0 = rws->get_value(rws, R300_VID_DRM_2_8_0);
boolean is_r500 = r300_screen(screen)->caps.is_r500;
boolean is_r400 = r300_screen(screen)->caps.is_r400;
boolean is_color2101010 = format == PIPE_FORMAT_R10G10B10A2_UNORM ||
@@ -317,9 +318,13 @@ static boolean r300_is_format_supported(struct pipe_screen* screen,
format == PIPE_FORMAT_B10G10R10A2_UNORM ||
format == PIPE_FORMAT_R10SG10SB10SA2U_NORM;
boolean is_ati1n = format == PIPE_FORMAT_RGTC1_UNORM ||
- format == PIPE_FORMAT_RGTC1_SNORM;
+ format == PIPE_FORMAT_RGTC1_SNORM ||
+ format == PIPE_FORMAT_LATC1_UNORM ||
+ format == PIPE_FORMAT_LATC1_SNORM;
boolean is_ati2n = format == PIPE_FORMAT_RGTC2_UNORM ||
- format == PIPE_FORMAT_RGTC2_SNORM;
+ format == PIPE_FORMAT_RGTC2_SNORM ||
+ format == PIPE_FORMAT_LATC2_UNORM ||
+ format == PIPE_FORMAT_LATC2_SNORM;
boolean is_half_float = format == PIPE_FORMAT_R16_FLOAT ||
format == PIPE_FORMAT_R16G16_FLOAT ||
format == PIPE_FORMAT_R16G16B16_FLOAT ||
@@ -363,7 +368,7 @@ static boolean r300_is_format_supported(struct pipe_screen* screen,
PIPE_BIND_SCANOUT |
PIPE_BIND_SHARED)) &&
/* 2101010 cannot be rendered to on non-r5xx. */
- (is_r500 || !is_color2101010) &&
+ (!is_color2101010 || (is_r500 && drm_2_8_0)) &&
r300_is_colorbuffer_format_supported(format)) {
retval |= usage &
(PIPE_BIND_RENDER_TARGET |
@@ -401,6 +406,7 @@ static void r300_destroy_screen(struct pipe_screen* pscreen)
struct r300_winsys_screen *rws = r300_winsys_screen(pscreen);
util_slab_destroy(&r300screen->pool_buffers);
+ pipe_mutex_destroy(r300screen->num_contexts_mutex);
if (rws)
rws->destroy(rws);
@@ -412,33 +418,44 @@ static void r300_fence_reference(struct pipe_screen *screen,
struct pipe_fence_handle **ptr,
struct pipe_fence_handle *fence)
{
- struct r300_fence **oldf = (struct r300_fence**)ptr;
- struct r300_fence *newf = (struct r300_fence*)fence;
-
- if (pipe_reference(&(*oldf)->reference, &newf->reference))
- FREE(*oldf);
-
- *ptr = fence;
+ r300_winsys_bo_reference((struct r300_winsys_bo**)ptr,
+ (struct r300_winsys_bo*)fence);
}
-static int r300_fence_signalled(struct pipe_screen *screen,
- struct pipe_fence_handle *fence,
- unsigned flags)
+static boolean r300_fence_signalled(struct pipe_screen *screen,
+ struct pipe_fence_handle *fence)
{
- struct r300_fence *rfence = (struct r300_fence*)fence;
+ struct r300_winsys_screen *rws = r300_screen(screen)->rws;
+ struct r300_winsys_bo *rfence = (struct r300_winsys_bo*)fence;
- return rfence->signalled ? 0 : 1; /* 0 == success */
+ return !rws->buffer_is_busy(rfence);
}
-static int r300_fence_finish(struct pipe_screen *screen,
- struct pipe_fence_handle *fence,
- unsigned flags)
+static boolean r300_fence_finish(struct pipe_screen *screen,
+ struct pipe_fence_handle *fence,
+ uint64_t timeout)
{
- struct r300_fence *rfence = (struct r300_fence*)fence;
+ struct r300_winsys_screen *rws = r300_screen(screen)->rws;
+ struct r300_winsys_bo *rfence = (struct r300_winsys_bo*)fence;
+
+ if (timeout != PIPE_TIMEOUT_INFINITE) {
+ int64_t start_time = os_time_get();
- r300_finish(rfence->ctx);
- rfence->signalled = TRUE;
- return 0; /* 0 == success */
+ /* Convert to microseconds. */
+ timeout /= 1000;
+
+ /* Wait in a loop. */
+ while (rws->buffer_is_busy(rfence)) {
+ if (os_time_get() - start_time >= timeout) {
+ return FALSE;
+ }
+ os_time_sleep(10);
+ }
+ return TRUE;
+ }
+
+ rws->buffer_wait(rfence);
+ return TRUE;
}
struct pipe_screen* r300_screen_create(struct r300_winsys_screen *rws)
@@ -457,12 +474,15 @@ struct pipe_screen* r300_screen_create(struct r300_winsys_screen *rws)
r300_init_debug(r300screen);
r300_parse_chipset(&r300screen->caps);
- r300screen->caps.index_bias_supported =
- r300screen->caps.is_r500 &&
- rws->get_value(rws, R300_VID_DRM_2_3_0);
+ if (SCREEN_DBG_ON(r300screen, DBG_NO_ZMASK))
+ r300screen->caps.zmask_ram = 0;
+ if (SCREEN_DBG_ON(r300screen, DBG_NO_HIZ))
+ r300screen->caps.hiz_ram = 0;
+
+ pipe_mutex_init(r300screen->num_contexts_mutex);
util_slab_create(&r300screen->pool_buffers,
- sizeof(struct r300_buffer), 64,
+ sizeof(struct r300_resource), 64,
UTIL_SLAB_SINGLETHREADED);
r300screen->rws = rws;
diff --git a/src/gallium/drivers/r300/r300_screen.h b/src/gallium/drivers/r300/r300_screen.h
index 5847fe1ffc8..576f9c1f4a9 100644
--- a/src/gallium/drivers/r300/r300_screen.h
+++ b/src/gallium/drivers/r300/r300_screen.h
@@ -52,6 +52,7 @@ struct r300_screen {
/* The number of created contexts to know whether we have multiple
* contexts or not. */
int num_contexts;
+ pipe_mutex num_contexts_mutex;
};
@@ -93,6 +94,8 @@ r300_winsys_screen(struct pipe_screen *screen) {
#define DBG_CBZB (1 << 11)
#define DBG_HYPERZ (1 << 12)
#define DBG_SCISSOR (1 << 13)
+#define DBG_UPLOAD (1 << 14)
+#define DBG_INFO (1 << 15)
/* Features. */
#define DBG_ANISOHQ (1 << 16)
#define DBG_NO_TILING (1 << 17)
@@ -100,6 +103,8 @@ r300_winsys_screen(struct pipe_screen *screen) {
#define DBG_FAKE_OCC (1 << 19)
#define DBG_NO_OPT (1 << 20)
#define DBG_NO_CBZB (1 << 21)
+#define DBG_NO_ZMASK (1 << 22)
+#define DBG_NO_HIZ (1 << 23)
/* Statistics. */
#define DBG_P_STAT (1 << 25)
/*@}*/
diff --git a/src/gallium/drivers/r300/r300_screen_buffer.c b/src/gallium/drivers/r300/r300_screen_buffer.c
index 44364435221..986ae384fbf 100644
--- a/src/gallium/drivers/r300/r300_screen_buffer.c
+++ b/src/gallium/drivers/r300/r300_screen_buffer.c
@@ -33,109 +33,36 @@
#include "r300_screen_buffer.h"
#include "r300_winsys.h"
-unsigned r300_buffer_is_referenced(struct pipe_context *context,
- struct pipe_resource *buf,
- enum r300_reference_domain domain)
+void r300_upload_index_buffer(struct r300_context *r300,
+ struct pipe_resource **index_buffer,
+ unsigned index_size, unsigned *start,
+ unsigned count, uint8_t *ptr)
{
- struct r300_context *r300 = r300_context(context);
- struct r300_buffer *rbuf = r300_buffer(buf);
+ unsigned index_offset;
+ boolean flushed;
- if (r300_buffer_is_user_buffer(buf))
- return PIPE_UNREFERENCED;
+ *index_buffer = NULL;
- if (r300->rws->cs_is_buffer_referenced(r300->cs, rbuf->cs_buf, domain))
- return PIPE_REFERENCED_FOR_READ | PIPE_REFERENCED_FOR_WRITE;
+ u_upload_data(r300->vbuf_mgr->uploader,
+ 0, count * index_size,
+ ptr + (*start * index_size),
+ &index_offset,
+ index_buffer, &flushed);
- return PIPE_UNREFERENCED;
-}
-
-static unsigned r300_buffer_is_referenced_by_cs(struct pipe_context *context,
- struct pipe_resource *buf,
- unsigned level, int layer)
-{
- return r300_buffer_is_referenced(context, buf, R300_REF_CS);
-}
-
-/* External helper, not required to implent u_resource_vtbl:
- */
-int r300_upload_index_buffer(struct r300_context *r300,
- struct pipe_resource **index_buffer,
- unsigned index_size,
- unsigned start,
- unsigned count,
- unsigned *out_offset)
-{
- struct pipe_resource *upload_buffer = NULL;
- unsigned index_offset = start * index_size;
- int ret = 0;
-
- if (r300_buffer_is_user_buffer(*index_buffer)) {
- ret = u_upload_buffer(r300->upload_ib,
- index_offset,
- count * index_size,
- *index_buffer,
- &index_offset,
- &upload_buffer);
- if (ret) {
- goto done;
- }
- *index_buffer = upload_buffer;
- *out_offset = index_offset / index_size;
- } else
- *out_offset = start;
-
- done:
- // if (upload_buffer)
- // pipe_resource_reference(&upload_buffer, NULL);
- return ret;
-}
-
-/* External helper, not required to implement u_resource_vtbl:
- */
-int r300_upload_user_buffers(struct r300_context *r300)
-{
- enum pipe_error ret = PIPE_OK;
- int i, nr;
-
- nr = r300->velems->count;
-
- for (i = 0; i < nr; i++) {
- struct pipe_vertex_buffer *vb =
- &r300->vertex_buffer[r300->velems->velem[i].vertex_buffer_index];
-
- if (r300_buffer_is_user_buffer(vb->buffer)) {
- struct pipe_resource *upload_buffer = NULL;
- unsigned offset = 0; /*vb->buffer_offset * 4;*/
- unsigned size = vb->buffer->width0;
- unsigned upload_offset;
- ret = u_upload_buffer(r300->upload_vb,
- offset, size,
- vb->buffer,
- &upload_offset, &upload_buffer);
- if (ret)
- return ret;
-
- pipe_resource_reference(&vb->buffer, NULL);
- vb->buffer = upload_buffer;
- vb->buffer_offset = upload_offset;
- r300->validate_buffers = TRUE;
- }
- }
- return ret;
+ *start = index_offset / index_size;
}
static void r300_buffer_destroy(struct pipe_screen *screen,
struct pipe_resource *buf)
{
struct r300_screen *r300screen = r300_screen(screen);
- struct r300_buffer *rbuf = r300_buffer(buf);
- struct r300_winsys_screen *rws = r300screen->rws;
+ struct r300_resource *rbuf = r300_resource(buf);
if (rbuf->constant_buffer)
FREE(rbuf->constant_buffer);
if (rbuf->buf)
- rws->buffer_reference(rws, &rbuf->buf, NULL);
+ r300_winsys_bo_reference(&rbuf->buf, NULL);
util_slab_free(&r300screen->pool_buffers, rbuf);
}
@@ -179,93 +106,31 @@ r300_buffer_transfer_map( struct pipe_context *pipe,
struct r300_context *r300 = r300_context(pipe);
struct r300_screen *r300screen = r300_screen(pipe->screen);
struct r300_winsys_screen *rws = r300screen->rws;
- struct r300_buffer *rbuf = r300_buffer(transfer->resource);
+ struct r300_resource *rbuf = r300_resource(transfer->resource);
uint8_t *map;
- boolean flush = FALSE;
- unsigned i;
- if (rbuf->user_buffer)
- return (uint8_t *) rbuf->user_buffer + transfer->box.x;
+ if (rbuf->b.user_ptr)
+ return (uint8_t *) rbuf->b.user_ptr + transfer->box.x;
if (rbuf->constant_buffer)
return (uint8_t *) rbuf->constant_buffer + transfer->box.x;
- /* check if the mapping is to a range we already flushed */
- if (transfer->usage & PIPE_TRANSFER_DISCARD) {
- for (i = 0; i < rbuf->num_ranges; i++) {
- if ((transfer->box.x >= rbuf->ranges[i].start) &&
- (transfer->box.x < rbuf->ranges[i].end))
- flush = TRUE;
-
- if (flush) {
- /* unreference this hw buffer and allocate a new one */
- rws->buffer_reference(rws, &rbuf->buf, NULL);
-
- rbuf->num_ranges = 0;
- rbuf->buf =
- r300screen->rws->buffer_create(r300screen->rws,
- rbuf->b.b.width0, 16,
- rbuf->b.b.bind,
- rbuf->b.b.usage,
- rbuf->domain);
- rbuf->cs_buf =
- r300screen->rws->buffer_get_cs_handle(r300screen->rws,
- rbuf->buf);
- break;
- }
- }
- }
-
- map = rws->buffer_map(rws, rbuf->buf, r300->cs, transfer->usage);
+ map = rws->buffer_map(rbuf->buf, r300->cs, transfer->usage);
if (map == NULL)
return NULL;
- /* map_buffer() returned a pointer to the beginning of the buffer,
- * but transfers are expected to return a pointer to just the
- * region specified in the box.
- */
return map + transfer->box.x;
}
-static void r300_buffer_transfer_flush_region( struct pipe_context *pipe,
- struct pipe_transfer *transfer,
- const struct pipe_box *box)
-{
- struct r300_buffer *rbuf = r300_buffer(transfer->resource);
- unsigned i;
- unsigned offset = transfer->box.x + box->x;
- unsigned length = box->width;
-
- assert(box->x + box->width <= transfer->box.width);
-
- if (rbuf->user_buffer)
- return;
- if (rbuf->constant_buffer)
- return;
-
- /* mark the range as used */
- for(i = 0; i < rbuf->num_ranges; ++i) {
- if(offset <= rbuf->ranges[i].end && rbuf->ranges[i].start <= (offset+box->width)) {
- rbuf->ranges[i].start = MIN2(rbuf->ranges[i].start, offset);
- rbuf->ranges[i].end = MAX2(rbuf->ranges[i].end, (offset+length));
- return;
- }
- }
-
- rbuf->ranges[rbuf->num_ranges].start = offset;
- rbuf->ranges[rbuf->num_ranges].end = offset+length;
- rbuf->num_ranges++;
-}
-
static void r300_buffer_transfer_unmap( struct pipe_context *pipe,
struct pipe_transfer *transfer )
{
struct r300_screen *r300screen = r300_screen(pipe->screen);
struct r300_winsys_screen *rws = r300screen->rws;
- struct r300_buffer *rbuf = r300_buffer(transfer->resource);
+ struct r300_resource *rbuf = r300_resource(transfer->resource);
if (rbuf->buf) {
- rws->buffer_unmap(rws, rbuf->buf);
+ rws->buffer_unmap(rbuf->buf);
}
}
@@ -278,34 +143,33 @@ static void r300_buffer_transfer_inline_write(struct pipe_context *pipe,
unsigned stride,
unsigned layer_stride)
{
- struct r300_buffer *rbuf = r300_buffer(resource);
- struct pipe_transfer *transfer = NULL;
+ struct r300_context *r300 = r300_context(pipe);
+ struct r300_winsys_screen *rws = r300->screen->rws;
+ struct r300_resource *rbuf = r300_resource(resource);
uint8_t *map = NULL;
if (rbuf->constant_buffer) {
memcpy(rbuf->constant_buffer + box->x, data, box->width);
return;
}
+ assert(rbuf->b.user_ptr == NULL);
- transfer = r300_buffer_get_transfer(pipe, resource, 0,
- PIPE_TRANSFER_WRITE | PIPE_TRANSFER_DISCARD, box);
- map = r300_buffer_transfer_map(pipe, transfer);
+ map = rws->buffer_map(rbuf->buf, r300->cs,
+ PIPE_TRANSFER_WRITE | PIPE_TRANSFER_DISCARD | usage);
- memcpy(map, data, box->width);
+ memcpy(map + box->x, data, box->width);
- r300_buffer_transfer_unmap(pipe, transfer);
- r300_buffer_transfer_destroy(pipe, transfer);
+ rws->buffer_unmap(rbuf->buf);
}
-struct u_resource_vtbl r300_buffer_vtbl =
+static const struct u_resource_vtbl r300_buffer_vtbl =
{
- u_default_resource_get_handle, /* get_handle */
+ NULL, /* get_handle */
r300_buffer_destroy, /* resource_destroy */
- r300_buffer_is_referenced_by_cs, /* is_buffer_referenced */
r300_buffer_get_transfer, /* get_transfer */
r300_buffer_transfer_destroy, /* transfer_destroy */
r300_buffer_transfer_map, /* transfer_map */
- r300_buffer_transfer_flush_region, /* transfer_flush_region */
+ NULL, /* transfer_flush_region */
r300_buffer_transfer_unmap, /* transfer_unmap */
r300_buffer_transfer_inline_write /* transfer_inline_write */
};
@@ -314,73 +178,68 @@ struct pipe_resource *r300_buffer_create(struct pipe_screen *screen,
const struct pipe_resource *templ)
{
struct r300_screen *r300screen = r300_screen(screen);
- struct r300_buffer *rbuf;
+ struct r300_resource *rbuf;
unsigned alignment = 16;
rbuf = util_slab_alloc(&r300screen->pool_buffers);
- rbuf->magic = R300_BUFFER_MAGIC;
-
- rbuf->b.b = *templ;
- rbuf->b.vtbl = &r300_buffer_vtbl;
- pipe_reference_init(&rbuf->b.b.reference, 1);
- rbuf->b.b.screen = screen;
+ rbuf->b.b.b = *templ;
+ rbuf->b.b.vtbl = &r300_buffer_vtbl;
+ pipe_reference_init(&rbuf->b.b.b.reference, 1);
+ rbuf->b.b.b.screen = screen;
+ rbuf->b.user_ptr = NULL;
rbuf->domain = R300_DOMAIN_GTT;
- rbuf->num_ranges = 0;
rbuf->buf = NULL;
+ rbuf->buf_size = templ->width0;
rbuf->constant_buffer = NULL;
- rbuf->user_buffer = NULL;
/* Alloc constant buffers in RAM. */
if (templ->bind & PIPE_BIND_CONSTANT_BUFFER) {
rbuf->constant_buffer = MALLOC(templ->width0);
- return &rbuf->b.b;
+ return &rbuf->b.b.b;
}
rbuf->buf =
r300screen->rws->buffer_create(r300screen->rws,
- rbuf->b.b.width0, alignment,
- rbuf->b.b.bind, rbuf->b.b.usage,
+ rbuf->b.b.b.width0, alignment,
+ rbuf->b.b.b.bind, rbuf->b.b.b.usage,
rbuf->domain);
- rbuf->cs_buf =
- r300screen->rws->buffer_get_cs_handle(r300screen->rws, rbuf->buf);
-
if (!rbuf->buf) {
util_slab_free(&r300screen->pool_buffers, rbuf);
return NULL;
}
- return &rbuf->b.b;
+ rbuf->cs_buf =
+ r300screen->rws->buffer_get_cs_handle(rbuf->buf);
+
+ return &rbuf->b.b.b;
}
struct pipe_resource *r300_user_buffer_create(struct pipe_screen *screen,
- void *ptr,
- unsigned bytes,
+ void *ptr, unsigned size,
unsigned bind)
{
struct r300_screen *r300screen = r300_screen(screen);
- struct r300_buffer *rbuf;
+ struct r300_resource *rbuf;
rbuf = util_slab_alloc(&r300screen->pool_buffers);
- rbuf->magic = R300_BUFFER_MAGIC;
-
- pipe_reference_init(&rbuf->b.b.reference, 1);
- rbuf->b.vtbl = &r300_buffer_vtbl;
- rbuf->b.b.screen = screen;
- rbuf->b.b.target = PIPE_BUFFER;
- rbuf->b.b.format = PIPE_FORMAT_R8_UNORM;
- rbuf->b.b.usage = PIPE_USAGE_IMMUTABLE;
- rbuf->b.b.bind = bind;
- rbuf->b.b.width0 = bytes;
- rbuf->b.b.height0 = 1;
- rbuf->b.b.depth0 = 1;
- rbuf->b.b.array_size = 1;
- rbuf->b.b.flags = 0;
+ pipe_reference_init(&rbuf->b.b.b.reference, 1);
+ rbuf->b.b.b.screen = screen;
+ rbuf->b.b.b.target = PIPE_BUFFER;
+ rbuf->b.b.b.format = PIPE_FORMAT_R8_UNORM;
+ rbuf->b.b.b.usage = PIPE_USAGE_IMMUTABLE;
+ rbuf->b.b.b.bind = bind;
+ rbuf->b.b.b.width0 = ~0;
+ rbuf->b.b.b.height0 = 1;
+ rbuf->b.b.b.depth0 = 1;
+ rbuf->b.b.b.array_size = 1;
+ rbuf->b.b.b.flags = 0;
+ rbuf->b.b.vtbl = &r300_buffer_vtbl;
+ rbuf->b.user_ptr = ptr;
rbuf->domain = R300_DOMAIN_GTT;
- rbuf->num_ranges = 0;
rbuf->buf = NULL;
+ rbuf->buf_size = size;
rbuf->constant_buffer = NULL;
- rbuf->user_buffer = ptr;
- return &rbuf->b.b;
+ return &rbuf->b.b.b;
}
diff --git a/src/gallium/drivers/r300/r300_screen_buffer.h b/src/gallium/drivers/r300/r300_screen_buffer.h
index 0b3555dd813..cdbc4425fcb 100644
--- a/src/gallium/drivers/r300/r300_screen_buffer.h
+++ b/src/gallium/drivers/r300/r300_screen_buffer.h
@@ -35,53 +35,19 @@
#include "r300_winsys.h"
#include "r300_context.h"
-#define R300_BUFFER_MAGIC 0xabcd1234
-#define R300_BUFFER_MAX_RANGES 32
-
-struct r300_buffer_range {
- uint32_t start;
- uint32_t end;
-};
-
-/* Vertex buffer. */
-struct r300_buffer
-{
- struct u_resource b;
-
- uint32_t magic;
-
- struct r300_winsys_buffer *buf;
- struct r300_winsys_cs_buffer *cs_buf;
-
- enum r300_buffer_domain domain;
-
- uint8_t *user_buffer;
- uint8_t *constant_buffer;
- struct r300_buffer_range ranges[R300_BUFFER_MAX_RANGES];
- unsigned num_ranges;
-};
-
/* Functions. */
-int r300_upload_user_buffers(struct r300_context *r300);
-
-int r300_upload_index_buffer(struct r300_context *r300,
- struct pipe_resource **index_buffer,
- unsigned index_size,
- unsigned start,
- unsigned count, unsigned *out_offset);
+void r300_upload_index_buffer(struct r300_context *r300,
+ struct pipe_resource **index_buffer,
+ unsigned index_size, unsigned *start,
+ unsigned count, uint8_t *ptr);
struct pipe_resource *r300_buffer_create(struct pipe_screen *screen,
const struct pipe_resource *templ);
struct pipe_resource *r300_user_buffer_create(struct pipe_screen *screen,
- void *ptr,
- unsigned bytes,
- unsigned usage);
-
-unsigned r300_buffer_is_referenced(struct pipe_context *context,
- struct pipe_resource *buf,
- enum r300_reference_domain domain);
+ void *ptr, unsigned size,
+ unsigned bind);
/* Inline functions. */
@@ -90,9 +56,4 @@ static INLINE struct r300_buffer *r300_buffer(struct pipe_resource *buffer)
return (struct r300_buffer *)buffer;
}
-static INLINE boolean r300_buffer_is_user_buffer(struct pipe_resource *buffer)
-{
- return r300_buffer(buffer)->user_buffer ? true : false;
-}
-
#endif
diff --git a/src/gallium/drivers/r300/r300_state.c b/src/gallium/drivers/r300/r300_state.c
index 75292532405..ecb4fc691cc 100644
--- a/src/gallium/drivers/r300/r300_state.c
+++ b/src/gallium/drivers/r300/r300_state.c
@@ -24,10 +24,12 @@
#include "draw/draw_context.h"
#include "util/u_framebuffer.h"
+#include "util/u_half.h"
#include "util/u_math.h"
#include "util/u_mm.h"
#include "util/u_memory.h"
#include "util/u_pack_color.h"
+#include "util/u_transfer.h"
#include "tgsi/tgsi_parse.h"
@@ -44,7 +46,6 @@
#include "r300_texture.h"
#include "r300_vs.h"
#include "r300_winsys.h"
-#include "r300_hyperz.h"
/* r300_state: Functions used to intialize state context by translating
* Gallium state objects into semi-native r300 state objects. */
@@ -187,12 +188,16 @@ static void* r300_create_blend_state(struct pipe_context* pipe,
struct r300_screen* r300screen = r300_screen(pipe->screen);
struct r300_blend_state* blend = CALLOC_STRUCT(r300_blend_state);
uint32_t blend_control = 0; /* R300_RB3D_CBLEND: 0x4e04 */
+ uint32_t blend_control_noclamp = 0; /* R300_RB3D_CBLEND: 0x4e04 */
uint32_t alpha_blend_control = 0; /* R300_RB3D_ABLEND: 0x4e08 */
+ uint32_t alpha_blend_control_noclamp = 0; /* R300_RB3D_ABLEND: 0x4e08 */
uint32_t color_channel_mask = 0; /* R300_RB3D_COLOR_CHANNEL_MASK: 0x4e0c */
uint32_t rop = 0; /* R300_RB3D_ROPCNTL: 0x4e18 */
uint32_t dither = 0; /* R300_RB3D_DITHER_CTL: 0x4e50 */
CB_LOCALS;
+ blend->state = *state;
+
if (state->rt[0].blend_enable)
{
unsigned eqRGB = state->rt[0].rgb_func;
@@ -205,10 +210,14 @@ static void* r300_create_blend_state(struct pipe_context* pipe,
/* despite the name, ALPHA_BLEND_ENABLE has nothing to do with alpha,
* this is just the crappy D3D naming */
- blend_control = R300_ALPHA_BLEND_ENABLE |
- r300_translate_blend_function(eqRGB) |
+ blend_control = blend_control_noclamp =
+ R300_ALPHA_BLEND_ENABLE |
( r300_translate_blend_factor(srcRGB) << R300_SRC_BLEND_SHIFT) |
( r300_translate_blend_factor(dstRGB) << R300_DST_BLEND_SHIFT);
+ blend_control |=
+ r300_translate_blend_function(eqRGB, TRUE);
+ blend_control_noclamp |=
+ r300_translate_blend_function(eqRGB, FALSE);
/* Optimization: some operations do not require the destination color.
*
@@ -230,6 +239,7 @@ static void* r300_create_blend_state(struct pipe_context* pipe,
srcRGB == PIPE_BLENDFACTOR_SRC_ALPHA_SATURATE) {
/* Enable reading from the colorbuffer. */
blend_control |= R300_READ_ENABLE;
+ blend_control_noclamp |= R300_READ_ENABLE;
if (r300screen->caps.is_r500) {
/* Optimization: Depending on incoming pixels, we can
@@ -305,10 +315,14 @@ static void* r300_create_blend_state(struct pipe_context* pipe,
/* separate alpha */
if (srcA != srcRGB || dstA != dstRGB || eqA != eqRGB) {
blend_control |= R300_SEPARATE_ALPHA_ENABLE;
- alpha_blend_control =
- r300_translate_blend_function(eqA) |
+ blend_control_noclamp |= R300_SEPARATE_ALPHA_ENABLE;
+ alpha_blend_control = alpha_blend_control_noclamp =
(r300_translate_blend_factor(srcA) << R300_SRC_BLEND_SHIFT) |
(r300_translate_blend_factor(dstA) << R300_DST_BLEND_SHIFT);
+ alpha_blend_control |=
+ r300_translate_blend_function(eqA, TRUE);
+ alpha_blend_control_noclamp |=
+ r300_translate_blend_function(eqA, FALSE);
}
}
@@ -345,7 +359,7 @@ static void* r300_create_blend_state(struct pipe_context* pipe,
*/
/* Build a command buffer. */
- BEGIN_CB(blend->cb, 8);
+ BEGIN_CB(blend->cb_clamp, 8);
OUT_CB_REG(R300_RB3D_ROPCNTL, rop);
OUT_CB_REG_SEQ(R300_RB3D_CBLEND, 3);
OUT_CB(blend_control);
@@ -354,6 +368,16 @@ static void* r300_create_blend_state(struct pipe_context* pipe,
OUT_CB_REG(R300_RB3D_DITHER_CTL, dither);
END_CB;
+ /* Build a command buffer. */
+ BEGIN_CB(blend->cb_noclamp, 8);
+ OUT_CB_REG(R300_RB3D_ROPCNTL, rop);
+ OUT_CB_REG_SEQ(R300_RB3D_CBLEND, 3);
+ OUT_CB(blend_control_noclamp);
+ OUT_CB(alpha_blend_control_noclamp);
+ OUT_CB(color_channel_mask);
+ OUT_CB_REG(R300_RB3D_DITHER_CTL, dither);
+ END_CB;
+
/* The same as above, but with no colorbuffer reads and writes. */
BEGIN_CB(blend->cb_no_readwrite, 8);
OUT_CB_REG(R300_RB3D_ROPCNTL, rop);
@@ -374,6 +398,10 @@ static void r300_bind_blend_state(struct pipe_context* pipe,
struct r300_context* r300 = r300_context(pipe);
UPDATE_STATE(state, r300->blend_state);
+
+ if (r300->fs.state && r300_pick_fragment_shader(r300)) {
+ r300_mark_fs_code_dirty(r300);
+ }
}
/* Free blend state. */
@@ -395,22 +423,64 @@ static void r300_set_blend_color(struct pipe_context* pipe,
const struct pipe_blend_color* color)
{
struct r300_context* r300 = r300_context(pipe);
- struct r300_blend_color_state* state =
+ struct pipe_framebuffer_state *fb = r300->fb_state.state;
+ struct r300_blend_color_state *state =
(struct r300_blend_color_state*)r300->blend_color_state.state;
+ struct pipe_blend_color c;
+ enum pipe_format format = fb->nr_cbufs ? fb->cbufs[0]->format : 0;
CB_LOCALS;
+ state->state = *color; /* Save it, so that we can reuse it in set_fb_state */
+ c = *color;
+
+ /* The blend color is dependent on the colorbuffer format. */
+ if (fb->nr_cbufs) {
+ switch (format) {
+ case PIPE_FORMAT_R8_UNORM:
+ case PIPE_FORMAT_L8_UNORM:
+ case PIPE_FORMAT_I8_UNORM:
+ c.color[1] = c.color[0];
+ break;
+
+ case PIPE_FORMAT_A8_UNORM:
+ c.color[1] = c.color[3];
+ break;
+
+ case PIPE_FORMAT_R8G8_UNORM:
+ c.color[2] = c.color[1];
+ break;
+
+ case PIPE_FORMAT_L8A8_UNORM:
+ c.color[2] = c.color[3];
+ break;
+
+ default:;
+ }
+ }
+
if (r300->screen->caps.is_r500) {
- /* XXX if FP16 blending is enabled, we should use the FP16 format */
BEGIN_CB(state->cb, 3);
OUT_CB_REG_SEQ(R500_RB3D_CONSTANT_COLOR_AR, 2);
- OUT_CB(float_to_fixed10(color->color[0]) |
- (float_to_fixed10(color->color[3]) << 16));
- OUT_CB(float_to_fixed10(color->color[2]) |
- (float_to_fixed10(color->color[1]) << 16));
+
+ switch (format) {
+ case PIPE_FORMAT_R16G16B16A16_FLOAT:
+ OUT_CB(util_float_to_half(c.color[2]) |
+ (util_float_to_half(c.color[3]) << 16));
+ OUT_CB(util_float_to_half(c.color[0]) |
+ (util_float_to_half(c.color[1]) << 16));
+ break;
+
+ default:
+ OUT_CB(float_to_fixed10(c.color[0]) |
+ (float_to_fixed10(c.color[3]) << 16));
+ OUT_CB(float_to_fixed10(c.color[2]) |
+ (float_to_fixed10(c.color[1]) << 16));
+ }
+
END_CB;
} else {
union util_color uc;
- util_pack_color(color->color, PIPE_FORMAT_B8G8R8A8_UNORM, &uc);
+ util_pack_color(c.color, PIPE_FORMAT_B8G8R8A8_UNORM, &uc);
BEGIN_CB(state->cb, 2);
OUT_CB_REG(R300_RB3D_BLEND_COLOR, uc.ui);
@@ -442,8 +512,7 @@ static void r300_set_clip_state(struct pipe_context* pipe,
OUT_CB_TABLE(state->ucp, state->nr * 4);
}
OUT_CB_REG(R300_VAP_CLIP_CNTL, ((1 << state->nr) - 1) |
- R300_PS_UCP_MODE_CLIP_AS_TRIFAN |
- (state->depth_clamp ? R300_CLIP_DISABLE : 0));
+ R300_PS_UCP_MODE_CLIP_AS_TRIFAN);
END_CB;
r300_mark_atom_dirty(r300, &r300->clip_state);
@@ -538,29 +607,54 @@ static void*
r300_translate_alpha_function(state->alpha.func) |
R300_FG_ALPHA_FUNC_ENABLE;
- /* We could use 10bit alpha ref but who needs that? */
dsa->alpha_function |= float_to_ubyte(state->alpha.ref_value);
+ dsa->alpha_value = util_float_to_half(state->alpha.ref_value);
- if (caps->is_r500)
+ if (caps->is_r500) {
+ dsa->alpha_function_fp16 = dsa->alpha_function |
+ R500_FG_ALPHA_FUNC_FP16_ENABLE;
dsa->alpha_function |= R500_FG_ALPHA_FUNC_8BIT;
+ }
}
- BEGIN_CB(&dsa->cb_begin, 8);
+ BEGIN_CB(&dsa->cb_begin, 10);
OUT_CB_REG(R300_FG_ALPHA_FUNC, dsa->alpha_function);
OUT_CB_REG_SEQ(R300_ZB_CNTL, 3);
OUT_CB(dsa->z_buffer_control);
OUT_CB(dsa->z_stencil_control);
OUT_CB(dsa->stencil_ref_mask);
OUT_CB_REG(R500_ZB_STENCILREFMASK_BF, dsa->stencil_ref_bf);
+ OUT_CB_REG(R500_FG_ALPHA_VALUE, dsa->alpha_value);
END_CB;
- BEGIN_CB(dsa->cb_no_readwrite, 8);
+ BEGIN_CB(&dsa->cb_begin_fp16, 10);
+ OUT_CB_REG(R300_FG_ALPHA_FUNC, dsa->alpha_function_fp16);
+ OUT_CB_REG_SEQ(R300_ZB_CNTL, 3);
+ OUT_CB(dsa->z_buffer_control);
+ OUT_CB(dsa->z_stencil_control);
+ OUT_CB(dsa->stencil_ref_mask);
+ OUT_CB_REG(R500_ZB_STENCILREFMASK_BF, dsa->stencil_ref_bf);
+ OUT_CB_REG(R500_FG_ALPHA_VALUE, dsa->alpha_value);
+ END_CB;
+
+ BEGIN_CB(dsa->cb_zb_no_readwrite, 10);
OUT_CB_REG(R300_FG_ALPHA_FUNC, dsa->alpha_function);
OUT_CB_REG_SEQ(R300_ZB_CNTL, 3);
OUT_CB(0);
OUT_CB(0);
OUT_CB(0);
OUT_CB_REG(R500_ZB_STENCILREFMASK_BF, 0);
+ OUT_CB_REG(R500_FG_ALPHA_VALUE, dsa->alpha_value);
+ END_CB;
+
+ BEGIN_CB(dsa->cb_fp16_zb_no_readwrite, 10);
+ OUT_CB_REG(R300_FG_ALPHA_FUNC, dsa->alpha_function_fp16);
+ OUT_CB_REG_SEQ(R300_ZB_CNTL, 3);
+ OUT_CB(0);
+ OUT_CB(0);
+ OUT_CB(0);
+ OUT_CB_REG(R500_ZB_STENCILREFMASK_BF, 0);
+ OUT_CB_REG(R500_FG_ALPHA_VALUE, dsa->alpha_value);
END_CB;
return (void*)dsa;
@@ -617,21 +711,16 @@ static void r300_set_stencil_ref(struct pipe_context* pipe,
}
static void r300_tex_set_tiling_flags(struct r300_context *r300,
- struct r300_texture *tex, unsigned level)
+ struct r300_resource *tex,
+ unsigned level)
{
/* Check if the macrotile flag needs to be changed.
* Skip changing the flags otherwise. */
- if (tex->desc.macrotile[tex->surface_level] !=
- tex->desc.macrotile[level]) {
- /* Tiling determines how DRM treats the buffer data.
- * We must flush CS when changing it if the buffer is referenced. */
- if (r300->rws->cs_is_buffer_referenced(r300->cs,
- tex->cs_buffer, R300_REF_CS))
- r300->context.flush(&r300->context, 0, NULL);
-
- r300->rws->buffer_set_tiling(r300->rws, tex->buffer,
- tex->desc.microtile, tex->desc.macrotile[level],
- tex->desc.stride_in_bytes[0]);
+ if (tex->tex.macrotile[tex->surface_level] !=
+ tex->tex.macrotile[level]) {
+ r300->rws->buffer_set_tiling(tex->buf, r300->cs,
+ tex->tex.microtile, tex->tex.macrotile[level],
+ tex->tex.stride_in_bytes[0]);
tex->surface_level = level;
}
@@ -646,12 +735,12 @@ static void r300_fb_set_tiling_flags(struct r300_context *r300,
/* Set tiling flags for new surfaces. */
for (i = 0; i < state->nr_cbufs; i++) {
r300_tex_set_tiling_flags(r300,
- r300_texture(state->cbufs[i]->texture),
+ r300_resource(state->cbufs[i]->texture),
state->cbufs[i]->u.tex.level);
}
if (state->zsbuf) {
r300_tex_set_tiling_flags(r300,
- r300_texture(state->zsbuf->texture),
+ r300_resource(state->zsbuf->texture),
state->zsbuf->u.tex.level);
}
}
@@ -660,7 +749,7 @@ static void r300_print_fb_surf_info(struct pipe_surface *surf, unsigned index,
const char *binding)
{
struct pipe_resource *tex = surf->texture;
- struct r300_texture *rtex = r300_texture(tex);
+ struct r300_resource *rtex = r300_resource(tex);
fprintf(stderr,
"r300: %s[%i] Dim: %ix%i, Firstlayer: %i, "
@@ -673,9 +762,9 @@ static void r300_print_fb_surf_info(struct pipe_surface *surf, unsigned index,
surf->u.tex.first_layer, surf->u.tex.last_layer, surf->u.tex.level,
util_format_short_name(surf->format),
- rtex->desc.macrotile[0] ? "YES" : " NO",
- rtex->desc.microtile ? "YES" : " NO",
- rtex->desc.stride_in_pixels[0],
+ rtex->tex.macrotile[0] ? "YES" : " NO",
+ rtex->tex.microtile ? "YES" : " NO",
+ rtex->tex.stride_in_pixels[0],
tex->width0, tex->height0, tex->depth0,
tex->last_level, util_format_short_name(tex->format));
}
@@ -686,13 +775,23 @@ void r300_mark_fb_state_dirty(struct r300_context *r300,
struct pipe_framebuffer_state *state = r300->fb_state.state;
boolean can_hyperz = r300->rws->get_value(r300->rws, R300_CAN_HYPERZ);
- /* What is marked as dirty depends on the enum r300_fb_state_change. */
r300_mark_atom_dirty(r300, &r300->gpu_flush);
r300_mark_atom_dirty(r300, &r300->fb_state);
- r300_mark_atom_dirty(r300, &r300->hyperz_state);
+ /* What is marked as dirty depends on the enum r300_fb_state_change. */
if (change == R300_CHANGED_FB_STATE) {
r300_mark_atom_dirty(r300, &r300->aa_state);
+ r300_mark_atom_dirty(r300, &r300->dsa_state); /* for AlphaRef */
+ r300_set_blend_color(&r300->context, r300->blend_color_state.state);
+ }
+
+ if (change == R300_CHANGED_FB_STATE ||
+ change == R300_CHANGED_HYPERZ_FLAG) {
+ r300_mark_atom_dirty(r300, &r300->hyperz_state);
+ }
+
+ if (change == R300_CHANGED_FB_STATE ||
+ change == R300_CHANGED_MULTIWRITE) {
r300_mark_atom_dirty(r300, &r300->fb_state_pipelined);
}
@@ -704,23 +803,21 @@ void r300_mark_fb_state_dirty(struct r300_context *r300,
else if (state->zsbuf) {
r300->fb_state.size += 10;
if (can_hyperz)
- r300->fb_state.size += r300->screen->caps.hiz_ram ? 8 : 4;
+ r300->fb_state.size += 8;
}
/* The size of the rest of atoms stays the same. */
}
static void
- r300_set_framebuffer_state(struct pipe_context* pipe,
- const struct pipe_framebuffer_state* state)
+r300_set_framebuffer_state(struct pipe_context* pipe,
+ const struct pipe_framebuffer_state* state)
{
struct r300_context* r300 = r300_context(pipe);
struct r300_aa_state *aa = (struct r300_aa_state*)r300->aa_state.state;
struct pipe_framebuffer_state *old_state = r300->fb_state.state;
- boolean can_hyperz = r300->rws->get_value(r300->rws, R300_CAN_HYPERZ);
unsigned max_width, max_height, i;
uint32_t zbuffer_bpp = 0;
- int blocksize;
if (r300->screen->caps.is_r500) {
max_width = max_height = 4096;
@@ -736,10 +833,37 @@ static void
return;
}
- /* If nr_cbufs is changed from zero to non-zero or vice versa... */
- if (!!old_state->nr_cbufs != !!state->nr_cbufs) {
- r300_mark_atom_dirty(r300, &r300->blend_state);
+ if (old_state->zsbuf && r300->zmask_in_use && !r300->hyperz_locked) {
+ /* There is a zmask in use, what are we gonna do? */
+ if (state->zsbuf) {
+ if (!pipe_surface_equal(old_state->zsbuf, state->zsbuf)) {
+ /* Decompress the currently bound zbuffer before we bind another one. */
+ r300_decompress_zmask(r300);
+ r300->hiz_in_use = FALSE;
+ }
+ } else {
+ /* We don't bind another zbuffer, so lock the current one. */
+ r300->hyperz_locked = TRUE;
+ pipe_surface_reference(&r300->locked_zbuffer, old_state->zsbuf);
+ }
+ } else if (r300->hyperz_locked && r300->locked_zbuffer) {
+ /* We have a locked zbuffer now, what are we gonna do? */
+ if (state->zsbuf) {
+ if (!pipe_surface_equal(r300->locked_zbuffer, state->zsbuf)) {
+ /* We are binding some other zbuffer, so decompress the locked one,
+ * it gets unlocked automatically. */
+ r300_decompress_zmask_locked_unsafe(r300);
+ r300->hiz_in_use = FALSE;
+ } else {
+ /* We are binding the locked zbuffer again, so unlock it. */
+ r300->hyperz_locked = FALSE;
+ }
+ }
}
+
+ /* Need to reset clamping or colormask. */
+ r300_mark_atom_dirty(r300, &r300->blend_state);
+
/* If zsbuf is set from NULL to non-NULL or vice versa.. */
if (!!old_state->zsbuf != !!state->zsbuf) {
r300_mark_atom_dirty(r300, &r300->dsa_state);
@@ -750,14 +874,14 @@ static void
util_copy_framebuffer_state(r300->fb_state.state, state);
+ if (!r300->hyperz_locked) {
+ pipe_surface_reference(&r300->locked_zbuffer, NULL);
+ }
+
r300_mark_fb_state_dirty(r300, R300_CHANGED_FB_STATE);
- r300->validate_buffers = TRUE;
- r300->z_compression = false;
-
if (state->zsbuf) {
- blocksize = util_format_get_blocksize(state->zsbuf->texture->format);
- switch (blocksize) {
+ switch (util_format_get_blocksize(state->zsbuf->texture->format)) {
case 2:
zbuffer_bpp = 16;
break;
@@ -765,31 +889,6 @@ static void
zbuffer_bpp = 24;
break;
}
- if (can_hyperz) {
- struct r300_surface *zs_surf = r300_surface(state->zsbuf);
- struct r300_texture *tex;
- int compress = r300->screen->caps.is_rv350 ? RV350_Z_COMPRESS_88 : R300_Z_COMPRESS_44;
- int level = zs_surf->base.u.tex.level;
-
- tex = r300_texture(zs_surf->base.texture);
-
- /* work out whether we can support hiz on this buffer */
- r300_hiz_alloc_block(r300, zs_surf);
-
- /* work out whether we can support zmask features on this buffer */
- r300_zmask_alloc_block(r300, zs_surf, compress);
-
- if (tex->zmask_mem[level]) {
- /* compression causes hangs on 16-bit */
- if (zbuffer_bpp == 24)
- r300->z_compression = compress;
- }
- DBG(r300, DBG_HYPERZ,
- "hyper-z features: hiz: %d @ %08x z-compression: %d z-fastfill: %d @ %08x\n", tex->hiz_mem[level] ? 1 : 0,
- tex->hiz_mem[level] ? tex->hiz_mem[level]->ofs : 0xdeadbeef,
- r300->z_compression, tex->zmask_mem[level] ? 1 : 0,
- tex->zmask_mem[level] ? tex->zmask_mem[level]->ofs : 0xdeadbeef);
- }
/* Polygon offset depends on the zbuffer bit depth. */
if (r300->zbuffer_bpp != zbuffer_bpp) {
@@ -801,27 +900,25 @@ static void
}
/* Set up AA config. */
- if (r300->rws->get_value(r300->rws, R300_VID_DRM_2_3_0)) {
- if (state->nr_cbufs && state->cbufs[0]->texture->nr_samples > 1) {
- aa->aa_config = R300_GB_AA_CONFIG_AA_ENABLE;
-
- switch (state->cbufs[0]->texture->nr_samples) {
- case 2:
- aa->aa_config |= R300_GB_AA_CONFIG_NUM_AA_SUBSAMPLES_2;
- break;
- case 3:
- aa->aa_config |= R300_GB_AA_CONFIG_NUM_AA_SUBSAMPLES_3;
- break;
- case 4:
- aa->aa_config |= R300_GB_AA_CONFIG_NUM_AA_SUBSAMPLES_4;
- break;
- case 6:
- aa->aa_config |= R300_GB_AA_CONFIG_NUM_AA_SUBSAMPLES_6;
- break;
- }
- } else {
- aa->aa_config = 0;
+ if (state->nr_cbufs && state->cbufs[0]->texture->nr_samples > 1) {
+ aa->aa_config = R300_GB_AA_CONFIG_AA_ENABLE;
+
+ switch (state->cbufs[0]->texture->nr_samples) {
+ case 2:
+ aa->aa_config |= R300_GB_AA_CONFIG_NUM_AA_SUBSAMPLES_2;
+ break;
+ case 3:
+ aa->aa_config |= R300_GB_AA_CONFIG_NUM_AA_SUBSAMPLES_3;
+ break;
+ case 4:
+ aa->aa_config |= R300_GB_AA_CONFIG_NUM_AA_SUBSAMPLES_4;
+ break;
+ case 6:
+ aa->aa_config |= R300_GB_AA_CONFIG_NUM_AA_SUBSAMPLES_6;
+ break;
}
+ } else {
+ aa->aa_config = 0;
}
if (DBG_ON(r300, DBG_FB)) {
@@ -876,16 +973,25 @@ static void r300_bind_fs_state(struct pipe_context* pipe, void* shader)
{
struct r300_context* r300 = r300_context(pipe);
struct r300_fragment_shader* fs = (struct r300_fragment_shader*)shader;
+ struct pipe_framebuffer_state *fb = r300->fb_state.state;
+ boolean last_multi_write;
if (fs == NULL) {
r300->fs.state = NULL;
return;
}
+ last_multi_write = r300_fragment_shader_writes_all(r300_fs(r300));
+
r300->fs.state = fs;
r300_pick_fragment_shader(r300);
r300_mark_fs_code_dirty(r300);
+ if (fb->nr_cbufs > 1 &&
+ last_multi_write != r300_fragment_shader_writes_all(fs)) {
+ r300_mark_fb_state_dirty(r300, R300_CHANGED_MULTIWRITE);
+ }
+
r300_mark_atom_dirty(r300, &r300->rs_block_state); /* Will be updated before the emission. */
}
@@ -934,12 +1040,14 @@ static void* r300_create_rs_state(struct pipe_context* pipe,
uint32_t line_stipple_value; /* R300_GA_LINE_STIPPLE_VALUE: 0x4260 */
uint32_t polygon_mode; /* R300_GA_POLY_MODE: 0x4288 */
uint32_t clip_rule; /* R300_SC_CLIP_RULE: 0x43D0 */
+ uint32_t round_mode; /* R300_GA_ROUND_MODE: 0x428c */
/* Point sprites texture coordinates, 0: lower left, 1: upper right */
float point_texcoord_left = 0; /* R300_GA_POINT_S0: 0x4200 */
float point_texcoord_bottom = 0;/* R300_GA_POINT_T0: 0x4204 */
float point_texcoord_right = 1; /* R300_GA_POINT_S1: 0x4208 */
float point_texcoord_top = 0; /* R300_GA_POINT_T1: 0x420c */
+ boolean vclamp = TRUE;
CB_LOCALS;
/* Copy rasterizer state. */
@@ -1062,6 +1170,12 @@ static void* r300_create_rs_state(struct pipe_context* pipe,
}
}
+ /* Vertex color clamping. FP20 means no clamping. */
+ round_mode =
+ R300_GA_ROUND_MODE_GEOMETRY_ROUND_NEAREST |
+ (!vclamp ? (R300_GA_ROUND_MODE_RGB_CLAMP_FP20 |
+ R300_GA_ROUND_MODE_ALPHA_CLAMP_FP20) : 0);
+
/* Build the main command buffer. */
BEGIN_CB(rs->cb_main, RS_STATE_MAIN_SIZE);
OUT_CB_REG(R300_VAP_CNTL_STATUS, vap_control_status);
@@ -1076,6 +1190,7 @@ static void* r300_create_rs_state(struct pipe_context* pipe,
OUT_CB_REG(R300_GA_LINE_STIPPLE_CONFIG, line_stipple_config);
OUT_CB_REG(R300_GA_LINE_STIPPLE_VALUE, line_stipple_value);
OUT_CB_REG(R300_GA_POLY_MODE, polygon_mode);
+ OUT_CB_REG(R300_GA_ROUND_MODE, round_mode);
OUT_CB_REG(R300_SC_CLIP_RULE, clip_rule);
OUT_CB_REG_SEQ(R300_GA_POINT_S0, 4);
OUT_CB_32F(point_texcoord_left);
@@ -1282,7 +1397,7 @@ static void r300_set_fragment_sampler_views(struct pipe_context* pipe,
struct r300_context* r300 = r300_context(pipe);
struct r300_textures_state* state =
(struct r300_textures_state*)r300->textures_state.state;
- struct r300_texture *texture;
+ struct r300_resource *texture;
unsigned i, real_num_views = 0, view_index = 0;
unsigned tex_units = r300->screen->caps.num_tex_units;
boolean dirty_tex = FALSE;
@@ -1298,29 +1413,27 @@ static void r300_set_fragment_sampler_views(struct pipe_context* pipe,
}
for (i = 0; i < count; i++) {
- if (&state->sampler_views[i]->base != views[i]) {
- pipe_sampler_view_reference(
- (struct pipe_sampler_view**)&state->sampler_views[i],
- views[i]);
+ pipe_sampler_view_reference(
+ (struct pipe_sampler_view**)&state->sampler_views[i],
+ views[i]);
- if (!views[i]) {
- continue;
- }
+ if (!views[i]) {
+ continue;
+ }
- /* A new sampler view (= texture)... */
- dirty_tex = TRUE;
+ /* A new sampler view (= texture)... */
+ dirty_tex = TRUE;
- /* Set the texrect factor in the fragment shader.
+ /* Set the texrect factor in the fragment shader.
* Needed for RECT and NPOT fallback. */
- texture = r300_texture(views[i]->texture);
- if (texture->desc.is_npot) {
- r300_mark_atom_dirty(r300, &r300->fs_rc_constant_state);
- }
+ texture = r300_resource(views[i]->texture);
+ if (texture->tex.is_npot) {
+ r300_mark_atom_dirty(r300, &r300->fs_rc_constant_state);
+ }
- state->sampler_views[i]->texcache_region =
+ state->sampler_views[i]->texcache_region =
r300_assign_texture_cache_region(view_index, real_num_views);
- view_index++;
- }
+ view_index++;
}
for (i = count; i < tex_units; i++) {
@@ -1334,7 +1447,6 @@ static void r300_set_fragment_sampler_views(struct pipe_context* pipe,
state->sampler_view_count = count;
r300_mark_atom_dirty(r300, &r300->textures_state);
- r300->validate_buffers = TRUE;
if (dirty_tex) {
r300_mark_atom_dirty(r300, &r300->texture_cache_inval);
@@ -1347,7 +1459,7 @@ r300_create_sampler_view(struct pipe_context *pipe,
const struct pipe_sampler_view *templ)
{
struct r300_sampler_view *view = CALLOC_STRUCT(r300_sampler_view);
- struct r300_texture *tex = r300_texture(texture);
+ struct r300_resource *tex = r300_resource(texture);
boolean is_r500 = r300_screen(pipe->screen)->caps.is_r500;
boolean dxtc_swizzle = r300_screen(pipe->screen)->caps.dxtc_swizzle;
@@ -1449,88 +1561,30 @@ static void r300_set_vertex_buffers(struct pipe_context* pipe,
const struct pipe_vertex_buffer* buffers)
{
struct r300_context* r300 = r300_context(pipe);
- struct pipe_vertex_buffer *vbo;
- unsigned i, max_index = (1 << 24) - 1;
- boolean any_user_buffer = FALSE;
+ unsigned i;
struct pipe_vertex_buffer dummy_vb = {0};
/* There must be at least one vertex buffer set, otherwise it locks up. */
if (!count) {
dummy_vb.buffer = r300->dummy_vb;
- dummy_vb.max_index = r300->dummy_vb->width0 / 4;
buffers = &dummy_vb;
count = 1;
}
- if (count == r300->vertex_buffer_count &&
- memcmp(r300->vertex_buffer, buffers,
- sizeof(struct pipe_vertex_buffer) * count) == 0) {
- return;
- }
+ u_vbuf_mgr_set_vertex_buffers(r300->vbuf_mgr, count, buffers);
if (r300->screen->caps.has_tcl) {
/* HW TCL. */
- r300->incompatible_vb_layout = FALSE;
-
- /* Check if the strides and offsets are aligned to the size of DWORD. */
for (i = 0; i < count; i++) {
- if (buffers[i].buffer) {
- if (buffers[i].stride % 4 != 0 ||
- buffers[i].buffer_offset % 4 != 0) {
- r300->incompatible_vb_layout = TRUE;
- break;
- }
+ if (buffers[i].buffer &&
+ !r300_resource(buffers[i].buffer)->b.user_ptr) {
}
}
-
- for (i = 0; i < count; i++) {
- /* Why, yes, I AM casting away constness. How did you know? */
- vbo = (struct pipe_vertex_buffer*)&buffers[i];
-
- /* Skip NULL buffers */
- if (!buffers[i].buffer) {
- continue;
- }
-
- if (r300_buffer_is_user_buffer(vbo->buffer)) {
- any_user_buffer = TRUE;
- }
-
- if (vbo->max_index == ~0) {
- /* if no VBO stride then only one vertex value so max index is 1 */
- /* should think about converting to VS constants like svga does */
- if (!vbo->stride)
- vbo->max_index = 1;
- else
- vbo->max_index =
- (vbo->buffer->width0 - vbo->buffer_offset) / vbo->stride;
- }
-
- max_index = MIN2(vbo->max_index, max_index);
- }
-
- r300->any_user_vbs = any_user_buffer;
- r300->vertex_buffer_max_index = max_index;
- r300->aos_dirty = TRUE;
- r300->validate_buffers = TRUE;
+ r300->vertex_arrays_dirty = TRUE;
} else {
/* SW TCL. */
draw_set_vertex_buffers(r300->draw, count, buffers);
}
-
- /* Common code. */
- for (i = 0; i < count; i++) {
- /* Reference our buffer. */
- pipe_resource_reference(&r300->vertex_buffer[i].buffer, buffers[i].buffer);
- }
- for (; i < r300->vertex_buffer_count; i++) {
- /* Dereference any old buffers. */
- pipe_resource_reference(&r300->vertex_buffer[i].buffer, NULL);
- }
-
- memcpy(r300->vertex_buffer, buffers,
- sizeof(struct pipe_vertex_buffer) * count);
- r300->vertex_buffer_count = count;
}
static void r300_set_index_buffer(struct pipe_context* pipe,
@@ -1538,19 +1592,19 @@ static void r300_set_index_buffer(struct pipe_context* pipe,
{
struct r300_context* r300 = r300_context(pipe);
- if (ib) {
+ if (ib && ib->buffer) {
+ assert(ib->offset % ib->index_size == 0);
+
pipe_resource_reference(&r300->index_buffer.buffer, ib->buffer);
memcpy(&r300->index_buffer, ib, sizeof(r300->index_buffer));
+ r300->index_buffer.offset /= r300->index_buffer.index_size;
}
else {
pipe_resource_reference(&r300->index_buffer.buffer, NULL);
memset(&r300->index_buffer, 0, sizeof(r300->index_buffer));
}
- if (r300->screen->caps.has_tcl) {
- r300->validate_buffers = TRUE;
- }
- else {
+ if (!r300->screen->caps.has_tcl) {
draw_set_index_buffer(r300->draw, ib);
}
}
@@ -1563,17 +1617,11 @@ static void r300_vertex_psc(struct r300_vertex_element_state *velems)
enum pipe_format format;
unsigned i;
- if (velems->count > 16) {
- fprintf(stderr, "r300: More than 16 vertex elements are not supported,"
- " requested %i, using 16.\n", velems->count);
- velems->count = 16;
- }
-
/* Vertex shaders have no semantics on their inputs,
* so PSC should just route stuff based on the vertex elements,
* and not on attrib information. */
for (i = 0; i < velems->count; i++) {
- format = velems->hw_format[i];
+ format = velems->velem[i].src_format;
type = r300_translate_vertex_data_type(format);
if (type == R300_INVALID_FORMAT) {
@@ -1605,16 +1653,13 @@ static void r300_vertex_psc(struct r300_vertex_element_state *velems)
vstream->count = (i >> 1) + 1;
}
-#define FORMAT_REPLACE(what, withwhat) \
- case PIPE_FORMAT_##what: *format = PIPE_FORMAT_##withwhat; break
-
static void* r300_create_vertex_elements_state(struct pipe_context* pipe,
unsigned count,
const struct pipe_vertex_element* attribs)
{
+ struct r300_context *r300 = r300_context(pipe);
struct r300_vertex_element_state *velems;
unsigned i;
- enum pipe_format *format;
struct pipe_vertex_element dummy_attrib = {0};
/* R300 Programmable Stream Control (PSC) doesn't support 0 vertex elements. */
@@ -1622,81 +1667,33 @@ static void* r300_create_vertex_elements_state(struct pipe_context* pipe,
dummy_attrib.src_format = PIPE_FORMAT_R8G8B8A8_UNORM;
attribs = &dummy_attrib;
count = 1;
+ } else if (count > 16) {
+ fprintf(stderr, "r300: More than 16 vertex elements are not supported,"
+ " requested %i, using 16.\n", count);
+ count = 16;
}
- assert(count <= PIPE_MAX_ATTRIBS);
velems = CALLOC_STRUCT(r300_vertex_element_state);
- if (velems != NULL) {
- velems->count = count;
- memcpy(velems->velem, attribs, sizeof(struct pipe_vertex_element) * count);
-
- if (r300_screen(pipe->screen)->caps.has_tcl) {
- /* Set the best hw format in case the original format is not
- * supported by hw. */
- for (i = 0; i < count; i++) {
- velems->hw_format[i] = velems->velem[i].src_format;
- format = &velems->hw_format[i];
-
- /* This is basically the list of unsupported formats.
- * For now we don't care about the alignment, that's going to
- * be sorted out after the PSC setup. */
- switch (*format) {
- FORMAT_REPLACE(R64_FLOAT, R32_FLOAT);
- FORMAT_REPLACE(R64G64_FLOAT, R32G32_FLOAT);
- FORMAT_REPLACE(R64G64B64_FLOAT, R32G32B32_FLOAT);
- FORMAT_REPLACE(R64G64B64A64_FLOAT, R32G32B32A32_FLOAT);
-
- FORMAT_REPLACE(R32_UNORM, R32_FLOAT);
- FORMAT_REPLACE(R32G32_UNORM, R32G32_FLOAT);
- FORMAT_REPLACE(R32G32B32_UNORM, R32G32B32_FLOAT);
- FORMAT_REPLACE(R32G32B32A32_UNORM, R32G32B32A32_FLOAT);
-
- FORMAT_REPLACE(R32_USCALED, R32_FLOAT);
- FORMAT_REPLACE(R32G32_USCALED, R32G32_FLOAT);
- FORMAT_REPLACE(R32G32B32_USCALED, R32G32B32_FLOAT);
- FORMAT_REPLACE(R32G32B32A32_USCALED,R32G32B32A32_FLOAT);
-
- FORMAT_REPLACE(R32_SNORM, R32_FLOAT);
- FORMAT_REPLACE(R32G32_SNORM, R32G32_FLOAT);
- FORMAT_REPLACE(R32G32B32_SNORM, R32G32B32_FLOAT);
- FORMAT_REPLACE(R32G32B32A32_SNORM, R32G32B32A32_FLOAT);
-
- FORMAT_REPLACE(R32_SSCALED, R32_FLOAT);
- FORMAT_REPLACE(R32G32_SSCALED, R32G32_FLOAT);
- FORMAT_REPLACE(R32G32B32_SSCALED, R32G32B32_FLOAT);
- FORMAT_REPLACE(R32G32B32A32_SSCALED,R32G32B32A32_FLOAT);
-
- FORMAT_REPLACE(R32_FIXED, R32_FLOAT);
- FORMAT_REPLACE(R32G32_FIXED, R32G32_FLOAT);
- FORMAT_REPLACE(R32G32B32_FIXED, R32G32B32_FLOAT);
- FORMAT_REPLACE(R32G32B32A32_FIXED, R32G32B32A32_FLOAT);
-
- default:;
- }
+ if (!velems)
+ return NULL;
- velems->incompatible_layout =
- velems->incompatible_layout ||
- velems->velem[i].src_format != velems->hw_format[i] ||
- velems->velem[i].src_offset % 4 != 0;
- }
+ velems->count = count;
+ velems->vmgr_elements =
+ u_vbuf_mgr_create_vertex_elements(r300->vbuf_mgr, count, attribs,
+ velems->velem);
- /* Now setup PSC.
- * The unused components will be replaced by (..., 0, 1). */
- r300_vertex_psc(velems);
-
- /* Align the formats to the size of DWORD.
- * We only care about the blocksizes of the formats since
- * swizzles are already set up.
- * Also compute the vertex size. */
- for (i = 0; i < count; i++) {
- /* This is OK because we check for aligned strides too
- * elsewhere. */
- velems->hw_format_size[i] =
- align(util_format_get_blocksize(velems->hw_format[i]), 4);
- velems->vertex_size_dwords += velems->hw_format_size[i] / 4;
- }
+ if (r300_screen(pipe->screen)->caps.has_tcl) {
+ /* Setup PSC.
+ * The unused components will be replaced by (..., 0, 1). */
+ r300_vertex_psc(velems);
+
+ for (i = 0; i < count; i++) {
+ velems->format_size[i] =
+ align(util_format_get_blocksize(velems->velem[i].src_format), 4);
+ velems->vertex_size_dwords += velems->format_size[i] / 4;
}
}
+
return velems;
}
@@ -1712,6 +1709,8 @@ static void r300_bind_vertex_elements_state(struct pipe_context *pipe,
r300->velems = velems;
+ u_vbuf_mgr_bind_vertex_elements(r300->vbuf_mgr, state, velems->vmgr_elements);
+
if (r300->draw) {
draw_set_vertex_elements(r300->draw, velems->count, velems->velem);
return;
@@ -1719,12 +1718,16 @@ static void r300_bind_vertex_elements_state(struct pipe_context *pipe,
UPDATE_STATE(&velems->vertex_stream, r300->vertex_stream_state);
r300->vertex_stream_state.size = (1 + velems->vertex_stream.count) * 2;
- r300->aos_dirty = TRUE;
+ r300->vertex_arrays_dirty = TRUE;
}
static void r300_delete_vertex_elements_state(struct pipe_context *pipe, void *state)
{
- FREE(state);
+ struct r300_context *r300 = r300_context(pipe);
+ struct r300_vertex_element_state *velems = state;
+
+ u_vbuf_mgr_destroy_vertex_elements(r300->vbuf_mgr, velems->vmgr_elements);
+ FREE(state);
}
static void* r300_create_vs_state(struct pipe_context* pipe,
@@ -1811,6 +1814,7 @@ static void r300_set_constant_buffer(struct pipe_context *pipe,
{
struct r300_context* r300 = r300_context(pipe);
struct r300_constant_buffer *cbuf;
+ struct r300_resource *rbuf = r300_resource(buf);
uint32_t *mapped;
switch (shader) {
@@ -1824,14 +1828,18 @@ static void r300_set_constant_buffer(struct pipe_context *pipe,
return;
}
- if (buf == NULL || buf->width0 == 0 ||
- (mapped = (uint32_t*)r300_buffer(buf)->constant_buffer) == NULL) {
+ if (buf == NULL || buf->width0 == 0)
+ return;
+
+ if (rbuf->b.user_ptr)
+ mapped = (uint32_t*)rbuf->b.user_ptr;
+ else if (rbuf->constant_buffer)
+ mapped = (uint32_t*)rbuf->constant_buffer;
+ else
return;
- }
if (shader == PIPE_SHADER_FRAGMENT ||
(shader == PIPE_SHADER_VERTEX && r300->screen->caps.has_tcl)) {
- assert((buf->width0 % (4 * sizeof(float))) == 0);
cbuf->ptr = mapped;
}
@@ -1862,6 +1870,14 @@ static void r300_set_constant_buffer(struct pipe_context *pipe,
}
}
+static void r300_texture_barrier(struct pipe_context *pipe)
+{
+ struct r300_context *r300 = r300_context(pipe);
+
+ r300_mark_atom_dirty(r300, &r300->gpu_flush);
+ r300_mark_atom_dirty(r300, &r300->texture_cache_inval);
+}
+
void r300_init_state_functions(struct r300_context* r300)
{
r300->context.create_blend_state = r300_create_blend_state;
@@ -1908,6 +1924,7 @@ void r300_init_state_functions(struct r300_context* r300)
r300->context.set_vertex_buffers = r300_set_vertex_buffers;
r300->context.set_index_buffer = r300_set_index_buffer;
+ r300->context.redefine_user_buffer = u_default_redefine_user_buffer;
r300->context.create_vertex_elements_state = r300_create_vertex_elements_state;
r300->context.bind_vertex_elements_state = r300_bind_vertex_elements_state;
@@ -1916,4 +1933,6 @@ void r300_init_state_functions(struct r300_context* r300)
r300->context.create_vs_state = r300_create_vs_state;
r300->context.bind_vs_state = r300_bind_vs_state;
r300->context.delete_vs_state = r300_delete_vs_state;
+
+ r300->context.texture_barrier = r300_texture_barrier;
}
diff --git a/src/gallium/drivers/r300/r300_state_derived.c b/src/gallium/drivers/r300/r300_state_derived.c
index d5fc8ece252..ec00e2552ca 100644
--- a/src/gallium/drivers/r300/r300_state_derived.c
+++ b/src/gallium/drivers/r300/r300_state_derived.c
@@ -29,10 +29,8 @@
#include "r300_context.h"
#include "r300_fs.h"
-#include "r300_hyperz.h"
#include "r300_screen.h"
#include "r300_shader_semantics.h"
-#include "r300_state_derived.h"
#include "r300_state_inlines.h"
#include "r300_texture.h"
#include "r300_vs.h"
@@ -490,7 +488,8 @@ static void r300_update_rs_block(struct r300_context *r300)
for (; i < ATTR_GENERIC_COUNT; i++) {
if (fs_inputs->generic[i] != ATTR_UNUSED) {
fprintf(stderr, "r300: ERROR: FS input generic %i unassigned, "
- "not enough hardware slots.\n", i);
+ "not enough hardware slots (it's not a bug, do not "
+ "report it).\n", i);
}
}
@@ -525,7 +524,8 @@ static void r300_update_rs_block(struct r300_context *r300)
DBG(r300, DBG_RS, "r300: FS input fog unassigned.\n");
} else {
fprintf(stderr, "r300: ERROR: FS input fog unassigned, "
- "not enough hardware slots.\n");
+ "not enough hardware slots. (it's not a bug, "
+ "do not report it)\n");
}
}
}
@@ -552,7 +552,8 @@ static void r300_update_rs_block(struct r300_context *r300)
} else {
if (fs_inputs->wpos != ATTR_UNUSED && tex_count >= 8) {
fprintf(stderr, "r300: ERROR: FS input WPOS unassigned, "
- "not enough hardware slots.\n");
+ "not enough hardware slots. (it's not a bug, do not "
+ "report it)\n");
}
}
@@ -640,11 +641,36 @@ static uint32_t r300_get_border_color(enum pipe_format format,
/* Compressed formats. */
if (util_format_is_compressed(format)) {
- util_pack_color(border_swizzled, PIPE_FORMAT_R8G8B8A8_UNORM, &uc);
- return uc.ui;
+ switch (format) {
+ case PIPE_FORMAT_RGTC1_SNORM:
+ case PIPE_FORMAT_RGTC1_UNORM:
+ case PIPE_FORMAT_LATC1_SNORM:
+ case PIPE_FORMAT_LATC1_UNORM:
+ /* Add 1/32 to round the border color instead of truncating. */
+ /* The Y component is used for the border color. */
+ border_swizzled[1] = border_swizzled[2] + 1.0f/32;
+ util_pack_color(border_swizzled, PIPE_FORMAT_B4G4R4A4_UNORM, &uc);
+ return uc.ui;
+ case PIPE_FORMAT_RGTC2_SNORM:
+ case PIPE_FORMAT_LATC2_SNORM:
+ border_swizzled[0] = border_swizzled[2];
+ util_pack_color(border_swizzled, PIPE_FORMAT_R8G8B8A8_SNORM, &uc);
+ return uc.ui;
+ case PIPE_FORMAT_RGTC2_UNORM:
+ case PIPE_FORMAT_LATC2_UNORM:
+ util_pack_color(border_swizzled, PIPE_FORMAT_B8G8R8A8_UNORM, &uc);
+ return uc.ui;
+ default:
+ util_pack_color(border_swizzled, PIPE_FORMAT_R8G8B8A8_UNORM, &uc);
+ return uc.ui;
+ }
}
switch (desc->channel[0].size) {
+ case 2:
+ util_pack_color(border_swizzled, PIPE_FORMAT_B2G3R3_UNORM, &uc);
+ break;
+
case 4:
util_pack_color(border_swizzled, PIPE_FORMAT_B4G4R4A4_UNORM, &uc);
break;
@@ -671,7 +697,20 @@ static uint32_t r300_get_border_color(enum pipe_format format,
case 16:
if (desc->nr_channels <= 2) {
border_swizzled[0] = border_swizzled[2];
- util_pack_color(border_swizzled, PIPE_FORMAT_R16G16_UNORM, &uc);
+ if (desc->channel[0].type == UTIL_FORMAT_TYPE_FLOAT) {
+ util_pack_color(border_swizzled, PIPE_FORMAT_R16G16_FLOAT, &uc);
+ } else {
+ util_pack_color(border_swizzled, PIPE_FORMAT_R16G16_UNORM, &uc);
+ }
+ } else {
+ util_pack_color(border_swizzled, PIPE_FORMAT_B8G8R8A8_UNORM, &uc);
+ }
+ break;
+
+ case 32:
+ if (desc->nr_channels == 1) {
+ border_swizzled[0] = border_swizzled[2];
+ util_pack_color(border_swizzled, PIPE_FORMAT_R32_FLOAT, &uc);
} else {
util_pack_color(border_swizzled, PIPE_FORMAT_B8G8R8A8_UNORM, &uc);
}
@@ -681,6 +720,25 @@ static uint32_t r300_get_border_color(enum pipe_format format,
return uc.ui;
}
+static boolean util_format_is_float(enum pipe_format format)
+{
+ const struct util_format_description *desc = util_format_description(format);
+ unsigned i;
+
+ if (!format)
+ return FALSE;
+
+ /* Find the first non-void channel. */
+ for (i = 0; i < 4; i++)
+ if (desc->channel[i].type != UTIL_FORMAT_TYPE_VOID)
+ break;
+
+ if (i == 4)
+ return FALSE;
+
+ return desc->channel[i].type == UTIL_FORMAT_TYPE_FLOAT ? TRUE : FALSE;
+}
+
static void r300_merge_textures_and_samplers(struct r300_context* r300)
{
struct r300_textures_state *state =
@@ -688,7 +746,7 @@ static void r300_merge_textures_and_samplers(struct r300_context* r300)
struct r300_texture_sampler_state *texstate;
struct r300_sampler_state *sampler;
struct r300_sampler_view *view;
- struct r300_texture *tex;
+ struct r300_resource *tex;
unsigned min_level, max_level, i, j, size;
unsigned count = MIN2(state->sampler_view_count,
state->sampler_state_count);
@@ -706,7 +764,7 @@ static void r300_merge_textures_and_samplers(struct r300_context* r300)
state->tx_enable |= 1 << i;
view = state->sampler_views[i];
- tex = r300_texture(view->base.texture);
+ tex = r300_resource(view->base.texture);
sampler = state->sampler_states[i];
texstate = &state->regs[i];
@@ -722,32 +780,37 @@ static void r300_merge_textures_and_samplers(struct r300_context* r300)
/* determine min/max levels */
max_level = MIN3(sampler->max_lod + view->base.u.tex.first_level,
- tex->desc.b.b.last_level, view->base.u.tex.last_level);
+ tex->b.b.b.last_level, view->base.u.tex.last_level);
min_level = MIN2(sampler->min_lod + view->base.u.tex.first_level,
max_level);
- if (tex->desc.is_npot && min_level > 0) {
+ if (tex->tex.is_npot && min_level > 0) {
/* Even though we do not implement mipmapping for NPOT
* textures, we should at least honor the minimum level
* which is allowed to be displayed. We do this by setting up
- * an i-th mipmap level as the zero level. */
- r300_texture_setup_format_state(r300->screen, &tex->desc,
+ * the i-th mipmap level as the zero level. */
+ unsigned offset = tex->tex_offset +
+ tex->tex.offset_in_bytes[min_level];
+
+ r300_texture_setup_format_state(r300->screen, tex,
min_level,
&texstate->format);
- texstate->format.tile_config |=
- tex->desc.offset_in_bytes[min_level] & 0xffffffe0;
- assert((tex->desc.offset_in_bytes[min_level] & 0x1f) == 0);
+ texstate->format.tile_config |= offset & 0xffffffe0;
+ assert((offset & 0x1f) == 0);
+ } else {
+ texstate->format.tile_config |= tex->tex_offset & 0xffffffe0;
+ assert((tex->tex_offset & 0x1f) == 0);
}
/* Assign a texture cache region. */
texstate->format.format1 |= view->texcache_region;
/* Depth textures are kinda special. */
- if (util_format_is_depth_or_stencil(tex->desc.b.b.format)) {
+ if (util_format_is_depth_or_stencil(tex->b.b.b.format)) {
unsigned char depth_swizzle[4];
if (!r300->screen->caps.is_r500 &&
- util_format_get_blocksizebits(tex->desc.b.b.format) == 32) {
+ util_format_get_blocksizebits(tex->b.b.b.format) == 32) {
/* X24x8 is sampled as Y16X16 on r3xx-r4xx.
* The depth here is at the Y component. */
for (j = 0; j < 4; j++)
@@ -772,17 +835,17 @@ static void r300_merge_textures_and_samplers(struct r300_context* r300)
}
if (r300->screen->caps.dxtc_swizzle &&
- util_format_is_compressed(tex->desc.b.b.format)) {
+ util_format_is_compressed(tex->b.b.b.format)) {
texstate->filter1 |= R400_DXTC_SWIZZLE_ENABLE;
}
/* to emulate 1D textures through 2D ones correctly */
- if (tex->desc.b.b.target == PIPE_TEXTURE_1D) {
+ if (tex->b.b.b.target == PIPE_TEXTURE_1D) {
texstate->filter0 &= ~R300_TX_WRAP_T_MASK;
texstate->filter0 |= R300_TX_WRAP_T(R300_TX_CLAMP_TO_EDGE);
}
- if (tex->desc.is_npot) {
+ if (tex->tex.is_npot) {
/* NPOT textures don't support mip filter, unfortunately.
* This prevents incorrect rendering. */
texstate->filter0 &= ~R300_TX_MIN_FILTER_MIP_MASK;
@@ -811,6 +874,32 @@ static void r300_merge_textures_and_samplers(struct r300_context* r300)
texstate->filter0 |= R300_TX_MAX_MIP_LEVEL(min_level);
}
+ /* Float textures only support nearest and mip-nearest filtering. */
+ if (util_format_is_float(tex->b.b.b.format)) {
+ /* No MAG linear filtering. */
+ if ((texstate->filter0 & R300_TX_MAG_FILTER_MASK) ==
+ R300_TX_MAG_FILTER_LINEAR) {
+ texstate->filter0 &= ~R300_TX_MAG_FILTER_MASK;
+ texstate->filter0 |= R300_TX_MAG_FILTER_NEAREST;
+ }
+ /* No MIN linear filtering. */
+ if ((texstate->filter0 & R300_TX_MIN_FILTER_MASK) ==
+ R300_TX_MIN_FILTER_LINEAR) {
+ texstate->filter0 &= ~R300_TX_MIN_FILTER_MASK;
+ texstate->filter0 |= R300_TX_MIN_FILTER_NEAREST;
+ }
+ /* No mipmap linear filtering. */
+ if ((texstate->filter0 & R300_TX_MIN_FILTER_MIP_MASK) ==
+ R300_TX_MIN_FILTER_MIP_LINEAR) {
+ texstate->filter0 &= ~R300_TX_MIN_FILTER_MIP_MASK;
+ texstate->filter0 |= R300_TX_MIN_FILTER_MIP_NEAREST;
+ }
+ /* No anisotropic filtering. */
+ texstate->filter0 &= ~R300_TX_MAX_ANISO_MASK;
+ texstate->filter1 &= ~R500_TX_MAX_ANISO_MASK;
+ texstate->filter1 &= ~R500_TX_ANISO_HIGH_QUALITY;
+ }
+
texstate->filter0 |= i << 28;
size += 16;
@@ -859,44 +948,35 @@ static void r300_merge_textures_and_samplers(struct r300_context* r300)
}
}
-/* We can't use compressed zbuffers as samplers. */
-static void r300_flush_depth_textures(struct r300_context *r300)
+static void r300_decompress_depth_textures(struct r300_context *r300)
{
struct r300_textures_state *state =
(struct r300_textures_state*)r300->textures_state.state;
- unsigned i, level;
+ struct pipe_resource *tex;
unsigned count = MIN2(state->sampler_view_count,
state->sampler_state_count);
+ unsigned i;
- if (r300->z_decomp_rd)
+ if (!r300->hyperz_locked || !r300->locked_zbuffer) {
return;
+ }
- for (i = 0; i < count; i++)
+ for (i = 0; i < count; i++) {
if (state->sampler_views[i] && state->sampler_states[i]) {
- struct pipe_resource *tex = state->sampler_views[i]->base.texture;
-
- if (tex->target == PIPE_TEXTURE_3D ||
- tex->target == PIPE_TEXTURE_CUBE)
- continue;
-
- /* Ignore non-depth textures.
- * Also ignore reinterpreted depth textures, e.g. resource_copy. */
- if (!util_format_is_depth_or_stencil(tex->format))
- continue;
-
- for (level = 0; level <= tex->last_level; level++)
- if (r300_texture(tex)->zmask_in_use[level]) {
- /* We don't handle 3D textures and cubemaps yet. */
- r300_flush_depth_stencil(&r300->context, tex, level, 0);
- }
+ tex = state->sampler_views[i]->base.texture;
+
+ if (tex == r300->locked_zbuffer->texture) {
+ r300_decompress_zmask_locked(r300);
+ return;
+ }
}
+ }
}
void r300_update_derived_state(struct r300_context* r300)
{
- r300_flush_depth_textures(r300);
-
if (r300->textures_state.dirty) {
+ r300_decompress_depth_textures(r300);
r300_merge_textures_and_samplers(r300);
}
diff --git a/src/gallium/drivers/r300/r300_state_derived.h b/src/gallium/drivers/r300/r300_state_derived.h
deleted file mode 100644
index 71a4a47b003..00000000000
--- a/src/gallium/drivers/r300/r300_state_derived.h
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Copyright 2008 Corbin Simpson <MostAwesomeDude@gmail.com>
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * on the rights to use, copy, modify, merge, publish, distribute, sub
- * license, and/or sell copies of the Software, and to permit persons to whom
- * the Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
- * THE AUTHOR(S) AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM,
- * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
- * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
- * USE OR OTHER DEALINGS IN THE SOFTWARE. */
-
-#ifndef R300_STATE_DERIVED_H
-#define R300_STATE_DERIVED_H
-
-struct r300_context;
-
-void r300_update_derived_state(struct r300_context* r300);
-
-#endif /* R300_STATE_DERIVED_H */
diff --git a/src/gallium/drivers/r300/r300_state_inlines.h b/src/gallium/drivers/r300/r300_state_inlines.h
index 7e501221b1f..54dae1acd98 100644
--- a/src/gallium/drivers/r300/r300_state_inlines.h
+++ b/src/gallium/drivers/r300/r300_state_inlines.h
@@ -25,13 +25,9 @@
#define R300_STATE_INLINES_H
#include "draw/draw_vertex.h"
-
#include "pipe/p_format.h"
-
#include "util/u_format.h"
-
#include "r300_reg.h"
-
#include <stdio.h>
/* Some maths. These should probably find their way to u_math, if needed. */
@@ -42,23 +38,24 @@ static INLINE int pack_float_16_6x(float f) {
/* Blend state. */
-static INLINE uint32_t r300_translate_blend_function(int blend_func)
+static INLINE uint32_t r300_translate_blend_function(int blend_func,
+ boolean clamp)
{
switch (blend_func) {
- case PIPE_BLEND_ADD:
- return R300_COMB_FCN_ADD_CLAMP;
- case PIPE_BLEND_SUBTRACT:
- return R300_COMB_FCN_SUB_CLAMP;
- case PIPE_BLEND_REVERSE_SUBTRACT:
- return R300_COMB_FCN_RSUB_CLAMP;
- case PIPE_BLEND_MIN:
- return R300_COMB_FCN_MIN;
- case PIPE_BLEND_MAX:
- return R300_COMB_FCN_MAX;
- default:
- fprintf(stderr, "r300: Unknown blend function %d\n", blend_func);
- assert(0);
- break;
+ case PIPE_BLEND_ADD:
+ return clamp ? R300_COMB_FCN_ADD_CLAMP : R300_COMB_FCN_ADD_NOCLAMP;
+ case PIPE_BLEND_SUBTRACT:
+ return clamp ? R300_COMB_FCN_SUB_CLAMP : R300_COMB_FCN_SUB_NOCLAMP;
+ case PIPE_BLEND_REVERSE_SUBTRACT:
+ return clamp ? R300_COMB_FCN_RSUB_CLAMP : R300_COMB_FCN_RSUB_NOCLAMP;
+ case PIPE_BLEND_MIN:
+ return R300_COMB_FCN_MIN;
+ case PIPE_BLEND_MAX:
+ return R300_COMB_FCN_MAX;
+ default:
+ fprintf(stderr, "r300: Unknown blend function %d\n", blend_func);
+ assert(0);
+ break;
}
return 0;
}
@@ -341,24 +338,6 @@ static INLINE uint32_t r500_anisotropy(unsigned max_aniso)
R500_TX_ANISO_HIGH_QUALITY;
}
-/* Non-CSO state. (For now.) */
-
-static INLINE uint32_t r300_translate_gb_pipes(int pipe_count)
-{
- switch (pipe_count) {
- case 1:
- return R300_GB_TILE_PIPE_COUNT_RV300;
- case 2:
- return R300_GB_TILE_PIPE_COUNT_R300;
- case 3:
- return R300_GB_TILE_PIPE_COUNT_R420_3P;
- case 4:
- return R300_GB_TILE_PIPE_COUNT_R420;
- }
- return 0;
-}
-
-
/* Translate pipe_formats into PSC vertex types. */
static INLINE uint16_t
r300_translate_vertex_data_type(enum pipe_format format) {
diff --git a/src/gallium/drivers/r300/r300_texture.c b/src/gallium/drivers/r300/r300_texture.c
index 70fc5d96d83..c650fb7ed37 100644
--- a/src/gallium/drivers/r300/r300_texture.c
+++ b/src/gallium/drivers/r300/r300_texture.c
@@ -171,8 +171,18 @@ uint32_t r300_translate_texformat(enum pipe_format format,
}
}
- result |= r300_get_swizzle_combined(desc->swizzle, swizzle_view,
- util_format_is_compressed(format) && dxtc_swizzle);
+ if (util_format_is_compressed(format) &&
+ dxtc_swizzle &&
+ format != PIPE_FORMAT_RGTC2_UNORM &&
+ format != PIPE_FORMAT_RGTC2_SNORM &&
+ format != PIPE_FORMAT_LATC2_UNORM &&
+ format != PIPE_FORMAT_LATC2_SNORM) {
+ result |= r300_get_swizzle_combined(desc->swizzle, swizzle_view,
+ TRUE);
+ } else {
+ result |= r300_get_swizzle_combined(desc->swizzle, swizzle_view,
+ FALSE);
+ }
/* S3TC formats. */
if (desc->layout == UTIL_FORMAT_LAYOUT_S3TC) {
@@ -197,10 +207,25 @@ uint32_t r300_translate_texformat(enum pipe_format format,
}
}
- /* Add sign. */
- for (i = 0; i < desc->nr_channels; i++) {
- if (desc->channel[i].type == UTIL_FORMAT_TYPE_SIGNED) {
- result |= sign_bit[i];
+ /* RGTC formats. */
+ if (desc->layout == UTIL_FORMAT_LAYOUT_RGTC) {
+ switch (format) {
+ case PIPE_FORMAT_RGTC1_SNORM:
+ case PIPE_FORMAT_LATC1_SNORM:
+ result |= sign_bit[1];
+ case PIPE_FORMAT_LATC1_UNORM:
+ case PIPE_FORMAT_RGTC1_UNORM:
+ return R500_TX_FORMAT_ATI1N | result;
+
+ case PIPE_FORMAT_RGTC2_SNORM:
+ case PIPE_FORMAT_LATC2_SNORM:
+ result |= sign_bit[2] | sign_bit[3];
+ case PIPE_FORMAT_RGTC2_UNORM:
+ case PIPE_FORMAT_LATC2_UNORM:
+ return R400_TX_FORMAT_ATI2N | result;
+
+ default:
+ return ~0; /* Unsupported/unknown. */
}
}
@@ -211,17 +236,10 @@ uint32_t r300_translate_texformat(enum pipe_format format,
return R300_TX_FORMAT_CxV8U8 | result;
}
- /* RGTC formats. */
- if (desc->layout == UTIL_FORMAT_LAYOUT_RGTC) {
- switch (format) {
- case PIPE_FORMAT_RGTC1_UNORM:
- case PIPE_FORMAT_RGTC1_SNORM:
- return R500_TX_FORMAT_ATI1N | result;
- case PIPE_FORMAT_RGTC2_UNORM:
- case PIPE_FORMAT_RGTC2_SNORM:
- return R400_TX_FORMAT_ATI2N | result;
- default:
- return ~0; /* Unsupported/unknown. */
+ /* Add sign. */
+ for (i = 0; i < desc->nr_channels; i++) {
+ if (desc->channel[i].type == UTIL_FORMAT_TYPE_SIGNED) {
+ result |= sign_bit[i];
}
}
@@ -244,6 +262,11 @@ uint32_t r300_translate_texformat(enum pipe_format format,
desc->channel[2].size == 6) {
return R300_TX_FORMAT_Z6Y5X5 | result;
}
+ if (desc->channel[0].size == 2 &&
+ desc->channel[1].size == 3 &&
+ desc->channel[2].size == 3) {
+ return R300_TX_FORMAT_Z3Y3X2 | result;
+ }
return ~0; /* Unsupported/unknown. */
case 4:
@@ -348,6 +371,8 @@ uint32_t r500_tx_format_msb_bit(enum pipe_format format)
switch (format) {
case PIPE_FORMAT_RGTC1_UNORM:
case PIPE_FORMAT_RGTC1_SNORM:
+ case PIPE_FORMAT_LATC1_UNORM:
+ case PIPE_FORMAT_LATC1_SNORM:
case PIPE_FORMAT_X8Z24_UNORM:
case PIPE_FORMAT_S8_USCALED_Z24_UNORM:
return R500_TXFORMAT_MSB;
@@ -365,14 +390,18 @@ static uint32_t r300_translate_colorformat(enum pipe_format format)
switch (format) {
/* 8-bit buffers. */
case PIPE_FORMAT_A8_UNORM:
+ /*case PIPE_FORMAT_A8_SNORM:*/
case PIPE_FORMAT_I8_UNORM:
+ /*case PIPE_FORMAT_I8_SNORM:*/
case PIPE_FORMAT_L8_UNORM:
+ /*case PIPE_FORMAT_L8_SNORM:*/
case PIPE_FORMAT_R8_UNORM:
case PIPE_FORMAT_R8_SNORM:
return R300_COLOR_FORMAT_I8;
/* 16-bit buffers. */
case PIPE_FORMAT_L8A8_UNORM:
+ /*case PIPE_FORMAT_L8A8_SNORM:*/
case PIPE_FORMAT_R8G8_UNORM:
case PIPE_FORMAT_R8G8_SNORM:
return R300_COLOR_FORMAT_UV88;
@@ -390,13 +419,21 @@ static uint32_t r300_translate_colorformat(enum pipe_format format)
/* 32-bit buffers. */
case PIPE_FORMAT_B8G8R8A8_UNORM:
+ /*case PIPE_FORMAT_B8G8R8A8_SNORM:*/
case PIPE_FORMAT_B8G8R8X8_UNORM:
+ /*case PIPE_FORMAT_B8G8R8X8_SNORM:*/
case PIPE_FORMAT_A8R8G8B8_UNORM:
+ /*case PIPE_FORMAT_A8R8G8B8_SNORM:*/
case PIPE_FORMAT_X8R8G8B8_UNORM:
+ /*case PIPE_FORMAT_X8R8G8B8_SNORM:*/
case PIPE_FORMAT_A8B8G8R8_UNORM:
+ /*case PIPE_FORMAT_A8B8G8R8_SNORM:*/
+ case PIPE_FORMAT_R8G8B8A8_UNORM:
case PIPE_FORMAT_R8G8B8A8_SNORM:
case PIPE_FORMAT_X8B8G8R8_UNORM:
+ /*case PIPE_FORMAT_X8B8G8R8_SNORM:*/
case PIPE_FORMAT_R8G8B8X8_UNORM:
+ /*case PIPE_FORMAT_R8G8B8X8_SNORM:*/
case PIPE_FORMAT_R8SG8SB8UX8U_NORM:
return R300_COLOR_FORMAT_ARGB8888;
@@ -481,6 +518,8 @@ static uint32_t r300_translate_out_fmt(enum pipe_format format)
} else {
if (desc->channel[i].size == 16) {
modifier |= R300_US_OUT_FMT_C4_16;
+ } else if (desc->channel[i].size == 10) {
+ modifier |= R300_US_OUT_FMT_C4_10;
} else {
/* C4_8 seems to be used for the formats whose pixel size
* is <= 32 bits. */
@@ -499,9 +538,12 @@ static uint32_t r300_translate_out_fmt(enum pipe_format format)
/* 8-bit outputs, one channel.
* COLORFORMAT_I8 stores the C2 component. */
case PIPE_FORMAT_A8_UNORM:
+ /*case PIPE_FORMAT_A8_SNORM:*/
return modifier | R300_C2_SEL_A;
case PIPE_FORMAT_I8_UNORM:
+ /*case PIPE_FORMAT_I8_SNORM:*/
case PIPE_FORMAT_L8_UNORM:
+ /*case PIPE_FORMAT_L8_SNORM:*/
case PIPE_FORMAT_R8_UNORM:
case PIPE_FORMAT_R8_SNORM:
return modifier | R300_C2_SEL_R;
@@ -509,6 +551,7 @@ static uint32_t r300_translate_out_fmt(enum pipe_format format)
/* 16-bit outputs, two channels.
* COLORFORMAT_UV88 stores C2 and C0. */
case PIPE_FORMAT_L8A8_UNORM:
+ /*case PIPE_FORMAT_L8A8_SNORM:*/
return modifier | R300_C0_SEL_A | R300_C2_SEL_R;
case PIPE_FORMAT_R8G8_UNORM:
case PIPE_FORMAT_R8G8_SNORM:
@@ -521,7 +564,9 @@ static uint32_t r300_translate_out_fmt(enum pipe_format format)
case PIPE_FORMAT_B4G4R4A4_UNORM:
case PIPE_FORMAT_B4G4R4X4_UNORM:
case PIPE_FORMAT_B8G8R8A8_UNORM:
+ /*case PIPE_FORMAT_B8G8R8A8_SNORM:*/
case PIPE_FORMAT_B8G8R8X8_UNORM:
+ /*case PIPE_FORMAT_B8G8R8X8_SNORM:*/
case PIPE_FORMAT_B10G10R10A2_UNORM:
return modifier |
R300_C0_SEL_B | R300_C1_SEL_G |
@@ -529,20 +574,26 @@ static uint32_t r300_translate_out_fmt(enum pipe_format format)
/* ARGB outputs. */
case PIPE_FORMAT_A8R8G8B8_UNORM:
+ /*case PIPE_FORMAT_A8R8G8B8_SNORM:*/
case PIPE_FORMAT_X8R8G8B8_UNORM:
+ /*case PIPE_FORMAT_X8R8G8B8_SNORM:*/
return modifier |
R300_C0_SEL_A | R300_C1_SEL_R |
R300_C2_SEL_G | R300_C3_SEL_B;
/* ABGR outputs. */
case PIPE_FORMAT_A8B8G8R8_UNORM:
+ /*case PIPE_FORMAT_A8B8G8R8_SNORM:*/
case PIPE_FORMAT_X8B8G8R8_UNORM:
+ /*case PIPE_FORMAT_X8B8G8R8_SNORM:*/
return modifier |
R300_C0_SEL_A | R300_C1_SEL_B |
R300_C2_SEL_G | R300_C3_SEL_R;
/* RGBA outputs. */
case PIPE_FORMAT_R8G8B8X8_UNORM:
+ /*case PIPE_FORMAT_R8G8B8X8_SNORM:*/
+ case PIPE_FORMAT_R8G8B8A8_UNORM:
case PIPE_FORMAT_R8G8B8A8_SNORM:
case PIPE_FORMAT_R8SG8SB8UX8U_NORM:
case PIPE_FORMAT_R10G10B10A2_UNORM:
@@ -578,11 +629,12 @@ boolean r300_is_sampler_format_supported(enum pipe_format format)
}
void r300_texture_setup_format_state(struct r300_screen *screen,
- struct r300_texture_desc *desc,
+ struct r300_resource *tex,
unsigned level,
struct r300_texture_format_state *out)
{
- struct pipe_resource *pt = &desc->b.b;
+ struct pipe_resource *pt = &tex->b.b.b;
+ struct r300_texture_desc *desc = &tex->tex;
boolean is_r500 = screen->caps.is_r500;
/* Mask out all the fields we change. */
@@ -625,163 +677,147 @@ void r300_texture_setup_format_state(struct r300_screen *screen,
R300_TXO_MICRO_TILE(desc->microtile);
}
-static void r300_texture_setup_fb_state(struct r300_screen* screen,
- struct r300_texture* tex)
+static void r300_texture_setup_fb_state(struct r300_surface *surf)
{
- unsigned i;
+ struct r300_resource *tex = r300_resource(surf->base.texture);
+ unsigned level = surf->base.u.tex.level;
/* Set framebuffer state. */
- if (util_format_is_depth_or_stencil(tex->desc.b.b.format)) {
- for (i = 0; i <= tex->desc.b.b.last_level; i++) {
- tex->fb_state.pitch[i] =
- tex->desc.stride_in_pixels[i] |
- R300_DEPTHMACROTILE(tex->desc.macrotile[i]) |
- R300_DEPTHMICROTILE(tex->desc.microtile);
- }
- tex->fb_state.format = r300_translate_zsformat(tex->desc.b.b.format);
+ if (util_format_is_depth_or_stencil(surf->base.format)) {
+ surf->pitch =
+ tex->tex.stride_in_pixels[level] |
+ R300_DEPTHMACROTILE(tex->tex.macrotile[level]) |
+ R300_DEPTHMICROTILE(tex->tex.microtile);
+ surf->format = r300_translate_zsformat(surf->base.format);
+ surf->pitch_zmask = tex->tex.zmask_stride_in_pixels[level];
+ surf->pitch_hiz = tex->tex.hiz_stride_in_pixels[level];
} else {
- for (i = 0; i <= tex->desc.b.b.last_level; i++) {
- tex->fb_state.pitch[i] =
- tex->desc.stride_in_pixels[i] |
- r300_translate_colorformat(tex->desc.b.b.format) |
- R300_COLOR_TILE(tex->desc.macrotile[i]) |
- R300_COLOR_MICROTILE(tex->desc.microtile);
- }
- tex->fb_state.format = r300_translate_out_fmt(tex->desc.b.b.format);
+ surf->pitch =
+ tex->tex.stride_in_pixels[level] |
+ r300_translate_colorformat(surf->base.format) |
+ R300_COLOR_TILE(tex->tex.macrotile[level]) |
+ R300_COLOR_MICROTILE(tex->tex.microtile);
+ surf->format = r300_translate_out_fmt(surf->base.format);
}
}
-void r300_texture_reinterpret_format(struct pipe_screen *screen,
+boolean r300_resource_set_properties(struct pipe_screen *screen,
struct pipe_resource *tex,
- enum pipe_format new_format)
+ unsigned offset,
+ const struct pipe_resource *new_properties)
{
- struct r300_screen *r300screen = r300_screen(screen);
+ struct r300_screen *rscreen = r300_screen(screen);
+ struct r300_resource *res = r300_resource(tex);
- SCREEN_DBG(r300screen, DBG_TEX,
- "r300: texture_reinterpret_format: %s -> %s\n",
+ SCREEN_DBG(rscreen, DBG_TEX,
+ "r300: texture_set_properties: %s -> %s\n",
util_format_short_name(tex->format),
- util_format_short_name(new_format));
-
- tex->format = new_format;
-
- r300_texture_setup_fb_state(r300_screen(screen), r300_texture(tex));
-}
-
-static unsigned r300_texture_is_referenced(struct pipe_context *context,
- struct pipe_resource *texture,
- unsigned level, int layer)
-{
- struct r300_context *r300 = r300_context(context);
- struct r300_texture *rtex = (struct r300_texture *)texture;
+ util_format_short_name(new_properties->format));
- if (r300->rws->cs_is_buffer_referenced(r300->cs,
- rtex->cs_buffer, R300_REF_CS))
- return PIPE_REFERENCED_FOR_READ | PIPE_REFERENCED_FOR_WRITE;
+ if (!r300_texture_desc_init(rscreen, res, new_properties)) {
+ fprintf(stderr, "r300: ERROR: Cannot set texture properties.\n");
+ return FALSE;
+ }
+ res->tex_offset = offset;
+ r300_texture_setup_format_state(rscreen, res, 0, &res->tx_format);
- return PIPE_UNREFERENCED;
+ return TRUE;
}
static void r300_texture_destroy(struct pipe_screen *screen,
struct pipe_resource* texture)
{
- struct r300_texture* tex = (struct r300_texture*)texture;
- struct r300_winsys_screen *rws = (struct r300_winsys_screen *)texture->screen->winsys;
- int i;
-
- rws->buffer_reference(rws, &tex->buffer, NULL);
- for (i = 0; i < R300_MAX_TEXTURE_LEVELS; i++) {
- if (tex->hiz_mem[i])
- u_mmFreeMem(tex->hiz_mem[i]);
- if (tex->zmask_mem[i])
- u_mmFreeMem(tex->zmask_mem[i]);
- }
+ struct r300_resource* tex = (struct r300_resource*)texture;
+ r300_winsys_bo_reference(&tex->buf, NULL);
FREE(tex);
}
-static boolean r300_texture_get_handle(struct pipe_screen* screen,
- struct pipe_resource *texture,
- struct winsys_handle *whandle)
+boolean r300_resource_get_handle(struct pipe_screen* screen,
+ struct pipe_resource *texture,
+ struct winsys_handle *whandle)
{
struct r300_winsys_screen *rws = (struct r300_winsys_screen *)screen->winsys;
- struct r300_texture* tex = (struct r300_texture*)texture;
+ struct r300_resource* tex = (struct r300_resource*)texture;
if (!tex) {
return FALSE;
}
- return rws->buffer_get_handle(rws, tex->buffer,
- tex->desc.stride_in_bytes[0], whandle);
+ return rws->buffer_get_handle(tex->buf,
+ tex->tex.stride_in_bytes[0], whandle);
}
-struct u_resource_vtbl r300_texture_vtbl =
+static const struct u_resource_vtbl r300_texture_vtbl =
{
- r300_texture_get_handle, /* get_handle */
- r300_texture_destroy, /* resource_destroy */
- r300_texture_is_referenced, /* is_resource_referenced */
- r300_texture_get_transfer, /* get_transfer */
- r300_texture_transfer_destroy, /* transfer_destroy */
- r300_texture_transfer_map, /* transfer_map */
- u_default_transfer_flush_region, /* transfer_flush_region */
- r300_texture_transfer_unmap, /* transfer_unmap */
- u_default_transfer_inline_write /* transfer_inline_write */
+ NULL, /* get_handle */
+ r300_texture_destroy, /* resource_destroy */
+ r300_texture_get_transfer, /* get_transfer */
+ r300_texture_transfer_destroy, /* transfer_destroy */
+ r300_texture_transfer_map, /* transfer_map */
+ NULL, /* transfer_flush_region */
+ r300_texture_transfer_unmap, /* transfer_unmap */
+ u_default_transfer_inline_write /* transfer_inline_write */
};
/* The common texture constructor. */
-static struct r300_texture*
+static struct r300_resource*
r300_texture_create_object(struct r300_screen *rscreen,
const struct pipe_resource *base,
enum r300_buffer_tiling microtile,
enum r300_buffer_tiling macrotile,
unsigned stride_in_bytes_override,
unsigned max_buffer_size,
- struct r300_winsys_buffer *buffer)
+ struct r300_winsys_bo *buffer)
{
struct r300_winsys_screen *rws = rscreen->rws;
- struct r300_texture *tex = CALLOC_STRUCT(r300_texture);
+ struct r300_resource *tex = CALLOC_STRUCT(r300_resource);
if (!tex) {
if (buffer)
- rws->buffer_reference(rws, &buffer, NULL);
+ r300_winsys_bo_reference(&buffer, NULL);
return NULL;
}
- /* Initialize the descriptor. */
- if (!r300_texture_desc_init(rscreen, &tex->desc, base,
- microtile, macrotile,
- stride_in_bytes_override,
- max_buffer_size)) {
+ pipe_reference_init(&tex->b.b.b.reference, 1);
+ tex->b.b.b.screen = &rscreen->screen;
+ tex->b.b.b.usage = base->usage;
+ tex->b.b.b.bind = base->bind;
+ tex->b.b.b.flags = base->flags;
+ tex->b.b.vtbl = &r300_texture_vtbl;
+ tex->tex.microtile = microtile;
+ tex->tex.macrotile[0] = macrotile;
+ tex->tex.stride_in_bytes_override = stride_in_bytes_override;
+ tex->domain = base->flags & R300_RESOURCE_FLAG_TRANSFER ?
+ R300_DOMAIN_GTT :
+ R300_DOMAIN_VRAM | R300_DOMAIN_GTT;
+ tex->buf_size = max_buffer_size;
+
+ if (!r300_resource_set_properties(&rscreen->screen, &tex->b.b.b, 0, base)) {
if (buffer)
- rws->buffer_reference(rws, &buffer, NULL);
+ r300_winsys_bo_reference(&buffer, NULL);
FREE(tex);
return NULL;
}
- /* Initialize the hardware state. */
- r300_texture_setup_format_state(rscreen, &tex->desc, 0, &tex->tx_format);
- r300_texture_setup_fb_state(rscreen, tex);
-
- tex->desc.b.vtbl = &r300_texture_vtbl;
- pipe_reference_init(&tex->desc.b.b.reference, 1);
- tex->domain = base->flags & R300_RESOURCE_FLAG_TRANSFER ?
- R300_DOMAIN_GTT :
- R300_DOMAIN_VRAM | R300_DOMAIN_GTT;
- tex->buffer = buffer;
/* Create the backing buffer if needed. */
- if (!tex->buffer) {
- tex->buffer = rws->buffer_create(rws, tex->desc.size_in_bytes, 2048,
+ if (!buffer) {
+ tex->buf_size = tex->tex.size_in_bytes;
+ tex->buf = rws->buffer_create(rws, tex->tex.size_in_bytes, 2048,
base->bind, base->usage, tex->domain);
- if (!tex->buffer) {
+ if (!tex->buf) {
FREE(tex);
return NULL;
}
+ } else {
+ tex->buf = buffer;
}
- tex->cs_buffer = rws->buffer_get_cs_handle(rws, tex->buffer);
+ tex->cs_buf = rws->buffer_get_cs_handle(tex->buf);
- rws->buffer_set_tiling(rws, tex->buffer,
- tex->desc.microtile, tex->desc.macrotile[0],
- tex->desc.stride_in_bytes[0]);
+ rws->buffer_set_tiling(tex->buf, NULL,
+ tex->tex.microtile, tex->tex.macrotile[0],
+ tex->tex.stride_in_bytes[0]);
return tex;
}
@@ -813,7 +849,7 @@ struct pipe_resource *r300_texture_from_handle(struct pipe_screen *screen,
{
struct r300_winsys_screen *rws = (struct r300_winsys_screen*)screen->winsys;
struct r300_screen *rscreen = r300_screen(screen);
- struct r300_winsys_buffer *buffer;
+ struct r300_winsys_bo *buffer;
enum r300_buffer_tiling microtile, macrotile;
unsigned stride, size;
@@ -829,7 +865,7 @@ struct pipe_resource *r300_texture_from_handle(struct pipe_screen *screen,
if (!buffer)
return NULL;
- rws->buffer_get_tiling(rws, buffer, &microtile, &macrotile);
+ rws->buffer_get_tiling(buffer, &microtile, &macrotile);
/* Enforce a microtiled zbuffer. */
if (util_format_is_depth_or_stencil(base->format) &&
@@ -840,8 +876,7 @@ struct pipe_resource *r300_texture_from_handle(struct pipe_screen *screen,
break;
case 2:
- if (rws->get_value(rws, R300_VID_SQUARE_TILING_SUPPORT))
- microtile = R300_BUFFER_SQUARETILED;
+ microtile = R300_BUFFER_SQUARETILED;
break;
}
}
@@ -857,7 +892,7 @@ struct pipe_surface* r300_create_surface(struct pipe_context * ctx,
struct pipe_resource* texture,
const struct pipe_surface *surf_tmpl)
{
- struct r300_texture* tex = r300_texture(texture);
+ struct r300_resource* tex = r300_resource(texture);
struct r300_surface* surface = CALLOC_STRUCT(r300_surface);
unsigned level = surf_tmpl->u.tex.level;
@@ -877,29 +912,28 @@ struct pipe_surface* r300_create_surface(struct pipe_context * ctx,
surface->base.u.tex.first_layer = surf_tmpl->u.tex.first_layer;
surface->base.u.tex.last_layer = surf_tmpl->u.tex.last_layer;
- surface->buffer = tex->buffer;
- surface->cs_buffer = tex->cs_buffer;
+ surface->buf = tex->buf;
+ surface->cs_buf = tex->cs_buf;
/* Prefer VRAM if there are multiple domains to choose from. */
surface->domain = tex->domain;
if (surface->domain & R300_DOMAIN_VRAM)
surface->domain &= ~R300_DOMAIN_GTT;
- surface->offset = r300_texture_get_offset(&tex->desc, level,
+ surface->offset = r300_texture_get_offset(tex, level,
surf_tmpl->u.tex.first_layer);
- surface->pitch = tex->fb_state.pitch[level];
- surface->format = tex->fb_state.format;
+ r300_texture_setup_fb_state(surface);
/* Parameters for the CBZB clear. */
- surface->cbzb_allowed = tex->desc.cbzb_allowed[level];
+ surface->cbzb_allowed = tex->tex.cbzb_allowed[level];
surface->cbzb_width = align(surface->base.width, 64);
/* Height must be aligned to the size of a tile. */
- tile_height = r300_get_pixel_alignment(tex->desc.b.b.format,
- tex->desc.b.b.nr_samples,
- tex->desc.microtile,
- tex->desc.macrotile[level],
- DIM_HEIGHT);
+ tile_height = r300_get_pixel_alignment(tex->b.b.b.format,
+ tex->b.b.b.nr_samples,
+ tex->tex.microtile,
+ tex->tex.macrotile[level],
+ DIM_HEIGHT, 0);
surface->cbzb_height = align((surface->base.height + 1) / 2,
tile_height);
@@ -907,7 +941,7 @@ struct pipe_surface* r300_create_surface(struct pipe_context * ctx,
/* Offset must be aligned to 2K and must point at the beginning
* of a scanline. */
offset = surface->offset +
- tex->desc.stride_in_bytes[level] * surface->cbzb_height;
+ tex->tex.stride_in_bytes[level] * surface->cbzb_height;
surface->cbzb_midpoint_offset = offset & ~2047;
surface->cbzb_pitch = surface->pitch & 0x1ffffc;
@@ -922,8 +956,8 @@ struct pipe_surface* r300_create_surface(struct pipe_context * ctx,
surface->cbzb_allowed ? "YES" : " NO",
surface->cbzb_width, surface->cbzb_height,
offset & 2047,
- tex->desc.microtile ? "YES" : " NO",
- tex->desc.macrotile[level] ? "YES" : " NO");
+ tex->tex.microtile ? "YES" : " NO",
+ tex->tex.macrotile[level] ? "YES" : " NO");
}
return &surface->base;
diff --git a/src/gallium/drivers/r300/r300_texture.h b/src/gallium/drivers/r300/r300_texture.h
index 0ab22f747e4..158a387478f 100644
--- a/src/gallium/drivers/r300/r300_texture.h
+++ b/src/gallium/drivers/r300/r300_texture.h
@@ -32,7 +32,7 @@ struct pipe_resource;
struct winsys_handle;
struct r300_texture_format_state;
struct r300_texture_desc;
-struct r300_texture;
+struct r300_resource;
struct r300_screen;
unsigned r300_get_swizzle_combined(const unsigned char *swizzle_format,
@@ -46,9 +46,10 @@ uint32_t r300_translate_texformat(enum pipe_format format,
uint32_t r500_tx_format_msb_bit(enum pipe_format format);
-void r300_texture_reinterpret_format(struct pipe_screen *screen,
+boolean r300_resource_set_properties(struct pipe_screen *screen,
struct pipe_resource *tex,
- enum pipe_format new_format);
+ unsigned offset,
+ const struct pipe_resource *new_properties);
boolean r300_is_colorbuffer_format_supported(enum pipe_format format);
@@ -57,10 +58,14 @@ boolean r300_is_zs_format_supported(enum pipe_format format);
boolean r300_is_sampler_format_supported(enum pipe_format format);
void r300_texture_setup_format_state(struct r300_screen *screen,
- struct r300_texture_desc *desc,
+ struct r300_resource *tex,
unsigned level,
struct r300_texture_format_state *out);
+boolean r300_resource_get_handle(struct pipe_screen* screen,
+ struct pipe_resource *texture,
+ struct winsys_handle *whandle);
+
struct pipe_resource*
r300_texture_from_handle(struct pipe_screen* screen,
const struct pipe_resource* base,
diff --git a/src/gallium/drivers/r300/r300_texture_desc.c b/src/gallium/drivers/r300/r300_texture_desc.c
index aa82c47151a..2910666dd51 100644
--- a/src/gallium/drivers/r300/r300_texture_desc.c
+++ b/src/gallium/drivers/r300/r300_texture_desc.c
@@ -34,7 +34,7 @@ unsigned r300_get_pixel_alignment(enum pipe_format format,
unsigned num_samples,
enum r300_buffer_tiling microtile,
enum r300_buffer_tiling macrotile,
- enum r300_dim dim)
+ enum r300_dim dim, boolean is_rs690)
{
static const unsigned table[2][5][3][2] =
{
@@ -57,6 +57,7 @@ unsigned r300_get_pixel_alignment(enum pipe_format format,
{{ 16, 8}, { 0, 0}, { 0, 0}} /* 128 bits per pixel */
}
};
+
static const unsigned aa_block[2] = {4, 8};
unsigned tile = 0;
unsigned pixsize = util_format_get_blocksize(format);
@@ -74,6 +75,14 @@ unsigned r300_get_pixel_alignment(enum pipe_format format,
} else {
/* Standard alignment. */
tile = table[macrotile][util_logbase2(pixsize)][microtile][dim];
+ if (macrotile == 0 && is_rs690 && dim == DIM_WIDTH) {
+ int align;
+ int h_tile;
+ h_tile = table[macrotile][util_logbase2(pixsize)][microtile][DIM_HEIGHT];
+ align = 64 / (pixsize * h_tile);
+ if (tile < align)
+ tile = align;
+ }
}
assert(tile);
@@ -81,19 +90,19 @@ unsigned r300_get_pixel_alignment(enum pipe_format format,
}
/* Return true if macrotiling should be enabled on the miplevel. */
-static boolean r300_texture_macro_switch(struct r300_texture_desc *desc,
+static boolean r300_texture_macro_switch(struct r300_resource *tex,
unsigned level,
boolean rv350_mode,
enum r300_dim dim)
{
unsigned tile, texdim;
- tile = r300_get_pixel_alignment(desc->b.b.format, desc->b.b.nr_samples,
- desc->microtile, R300_BUFFER_TILED, dim);
+ tile = r300_get_pixel_alignment(tex->b.b.b.format, tex->b.b.b.nr_samples,
+ tex->tex.microtile, R300_BUFFER_TILED, dim, 0);
if (dim == DIM_WIDTH) {
- texdim = u_minify(desc->width0, level);
+ texdim = u_minify(tex->tex.width0, level);
} else {
- texdim = u_minify(desc->height0, level);
+ texdim = u_minify(tex->tex.height0, level);
}
/* See TX_FILTER1_n.MACRO_SWITCH. */
@@ -109,91 +118,70 @@ static boolean r300_texture_macro_switch(struct r300_texture_desc *desc,
* at the given level.
*/
static unsigned r300_texture_get_stride(struct r300_screen *screen,
- struct r300_texture_desc *desc,
+ struct r300_resource *tex,
unsigned level)
{
unsigned tile_width, width, stride;
+ boolean is_rs690 = (screen->caps.family == CHIP_FAMILY_RS600 ||
+ screen->caps.family == CHIP_FAMILY_RS690 ||
+ screen->caps.family == CHIP_FAMILY_RS740);
- if (desc->stride_in_bytes_override)
- return desc->stride_in_bytes_override;
+ if (tex->tex.stride_in_bytes_override)
+ return tex->tex.stride_in_bytes_override;
/* Check the level. */
- if (level > desc->b.b.last_level) {
+ if (level > tex->b.b.b.last_level) {
SCREEN_DBG(screen, DBG_TEX, "%s: level (%u) > last_level (%u)\n",
- __FUNCTION__, level, desc->b.b.last_level);
+ __FUNCTION__, level, tex->b.b.b.last_level);
return 0;
}
- width = u_minify(desc->width0, level);
+ width = u_minify(tex->tex.width0, level);
- if (util_format_is_plain(desc->b.b.format)) {
- tile_width = r300_get_pixel_alignment(desc->b.b.format,
- desc->b.b.nr_samples,
- desc->microtile,
- desc->macrotile[level],
- DIM_WIDTH);
+ if (util_format_is_plain(tex->b.b.b.format)) {
+ tile_width = r300_get_pixel_alignment(tex->b.b.b.format,
+ tex->b.b.b.nr_samples,
+ tex->tex.microtile,
+ tex->tex.macrotile[level],
+ DIM_WIDTH, is_rs690);
width = align(width, tile_width);
- stride = util_format_get_stride(desc->b.b.format, width);
-
- /* Some IGPs need a minimum stride of 64 bytes, hmm... */
- if (!desc->macrotile[level] &&
- (screen->caps.family == CHIP_FAMILY_RS600 ||
- screen->caps.family == CHIP_FAMILY_RS690 ||
- screen->caps.family == CHIP_FAMILY_RS740)) {
- unsigned min_stride;
-
- if (desc->microtile) {
- unsigned tile_height =
- r300_get_pixel_alignment(desc->b.b.format,
- desc->b.b.nr_samples,
- desc->microtile,
- desc->macrotile[level],
- DIM_HEIGHT);
-
- min_stride = 64 / tile_height;
- } else {
- min_stride = 64;
- }
-
- return stride < min_stride ? min_stride : stride;
- }
-
+ stride = util_format_get_stride(tex->b.b.b.format, width);
/* The alignment to 32 bytes is sort of implied by the layout... */
return stride;
} else {
- return align(util_format_get_stride(desc->b.b.format, width), 32);
+ return align(util_format_get_stride(tex->b.b.b.format, width), is_rs690 ? 64 : 32);
}
}
-static unsigned r300_texture_get_nblocksy(struct r300_texture_desc *desc,
+static unsigned r300_texture_get_nblocksy(struct r300_resource *tex,
unsigned level,
boolean *out_aligned_for_cbzb)
{
unsigned height, tile_height;
- height = u_minify(desc->height0, level);
+ height = u_minify(tex->tex.height0, level);
- if (util_format_is_plain(desc->b.b.format)) {
- tile_height = r300_get_pixel_alignment(desc->b.b.format,
- desc->b.b.nr_samples,
- desc->microtile,
- desc->macrotile[level],
- DIM_HEIGHT);
- height = align(height, tile_height);
+ /* Mipmapped and 3D textures must have their height aligned to POT. */
+ if ((tex->b.b.b.target != PIPE_TEXTURE_1D &&
+ tex->b.b.b.target != PIPE_TEXTURE_2D &&
+ tex->b.b.b.target != PIPE_TEXTURE_RECT) ||
+ tex->b.b.b.last_level != 0) {
+ height = util_next_power_of_two(height);
+ }
- /* This is needed for the kernel checker, unfortunately. */
- if ((desc->b.b.target != PIPE_TEXTURE_1D &&
- desc->b.b.target != PIPE_TEXTURE_2D &&
- desc->b.b.target != PIPE_TEXTURE_RECT) ||
- desc->b.b.last_level != 0) {
- height = util_next_power_of_two(height);
- }
+ if (util_format_is_plain(tex->b.b.b.format)) {
+ tile_height = r300_get_pixel_alignment(tex->b.b.b.format,
+ tex->b.b.b.nr_samples,
+ tex->tex.microtile,
+ tex->tex.macrotile[level],
+ DIM_HEIGHT, 0);
+ height = align(height, tile_height);
/* See if the CBZB clear can be used on the buffer,
* taking the texture size into account. */
if (out_aligned_for_cbzb) {
- if (desc->macrotile[level]) {
+ if (tex->tex.macrotile[level]) {
/* When clearing, the layer (width*height) is horizontally split
* into two, and the upper and lower halves are cleared by the CB
* and ZB units, respectively. Therefore, the number of macrotiles
@@ -201,10 +189,10 @@ static unsigned r300_texture_get_nblocksy(struct r300_texture_desc *desc,
/* Align the height so that there is an even number of macrotiles.
* Do so for 3 or more macrotiles in the Y direction. */
- if (level == 0 && desc->b.b.last_level == 0 &&
- (desc->b.b.target == PIPE_TEXTURE_1D ||
- desc->b.b.target == PIPE_TEXTURE_2D ||
- desc->b.b.target == PIPE_TEXTURE_RECT) &&
+ if (level == 0 && tex->b.b.b.last_level == 0 &&
+ (tex->b.b.b.target == PIPE_TEXTURE_1D ||
+ tex->b.b.b.target == PIPE_TEXTURE_2D ||
+ tex->b.b.b.target == PIPE_TEXTURE_RECT) &&
height >= tile_height * 3) {
height = align(height, tile_height * 2);
}
@@ -216,30 +204,7 @@ static unsigned r300_texture_get_nblocksy(struct r300_texture_desc *desc,
}
}
- return util_format_get_nblocksy(desc->b.b.format, height);
-}
-
-static void r300_texture_3d_fix_mipmapping(struct r300_screen *screen,
- struct r300_texture_desc *desc)
-{
- /* The kernels <= 2.6.34-rc4 compute the size of mipmapped 3D textures
- * incorrectly. This is a workaround to prevent CS from being rejected. */
-
- unsigned i, size;
-
- if (!screen->rws->get_value(screen->rws, R300_VID_DRM_2_3_0) &&
- desc->b.b.target == PIPE_TEXTURE_3D &&
- desc->b.b.last_level > 0) {
- size = 0;
-
- for (i = 0; i <= desc->b.b.last_level; i++) {
- size += desc->stride_in_bytes[i] *
- r300_texture_get_nblocksy(desc, i, FALSE);
- }
-
- size *= desc->depth0;
- desc->size_in_bytes = size;
- }
+ return util_format_get_nblocksy(tex->b.b.b.format, height);
}
/* Get a width in pixels from a stride in bytes. */
@@ -251,15 +216,15 @@ static unsigned stride_to_width(enum pipe_format format,
}
static void r300_setup_miptree(struct r300_screen *screen,
- struct r300_texture_desc *desc,
+ struct r300_resource *tex,
boolean align_for_cbzb)
{
- struct pipe_resource *base = &desc->b.b;
+ struct pipe_resource *base = &tex->b.b.b;
unsigned stride, size, layer_size, nblocksy, i;
boolean rv350_mode = screen->caps.family >= CHIP_FAMILY_R350;
boolean aligned_for_cbzb;
- desc->size_in_bytes = 0;
+ tex->tex.size_in_bytes = 0;
SCREEN_DBG(screen, DBG_TEXALLOC,
"r300: Making miptree for texture, format %s\n",
@@ -267,21 +232,21 @@ static void r300_setup_miptree(struct r300_screen *screen,
for (i = 0; i <= base->last_level; i++) {
/* Let's see if this miplevel can be macrotiled. */
- desc->macrotile[i] =
- (desc->macrotile[0] == R300_BUFFER_TILED &&
- r300_texture_macro_switch(desc, i, rv350_mode, DIM_WIDTH) &&
- r300_texture_macro_switch(desc, i, rv350_mode, DIM_HEIGHT)) ?
+ tex->tex.macrotile[i] =
+ (tex->tex.macrotile[0] == R300_BUFFER_TILED &&
+ r300_texture_macro_switch(tex, i, rv350_mode, DIM_WIDTH) &&
+ r300_texture_macro_switch(tex, i, rv350_mode, DIM_HEIGHT)) ?
R300_BUFFER_TILED : R300_BUFFER_LINEAR;
- stride = r300_texture_get_stride(screen, desc, i);
+ stride = r300_texture_get_stride(screen, tex, i);
/* Compute the number of blocks in Y, see if the CBZB clear can be
* used on the texture. */
aligned_for_cbzb = FALSE;
- if (align_for_cbzb && desc->cbzb_allowed[i])
- nblocksy = r300_texture_get_nblocksy(desc, i, &aligned_for_cbzb);
+ if (align_for_cbzb && tex->tex.cbzb_allowed[i])
+ nblocksy = r300_texture_get_nblocksy(tex, i, &aligned_for_cbzb);
else
- nblocksy = r300_texture_get_nblocksy(desc, i, NULL);
+ nblocksy = r300_texture_get_nblocksy(tex, i, NULL);
layer_size = stride * nblocksy;
@@ -292,75 +257,182 @@ static void r300_setup_miptree(struct r300_screen *screen,
if (base->target == PIPE_TEXTURE_CUBE)
size = layer_size * 6;
else
- size = layer_size * u_minify(desc->depth0, i);
+ size = layer_size * u_minify(tex->tex.depth0, i);
- desc->offset_in_bytes[i] = desc->size_in_bytes;
- desc->size_in_bytes = desc->offset_in_bytes[i] + size;
- desc->layer_size_in_bytes[i] = layer_size;
- desc->stride_in_bytes[i] = stride;
- desc->stride_in_pixels[i] = stride_to_width(desc->b.b.format, stride);
- desc->cbzb_allowed[i] = desc->cbzb_allowed[i] && aligned_for_cbzb;
+ tex->tex.offset_in_bytes[i] = tex->tex.size_in_bytes;
+ tex->tex.size_in_bytes = tex->tex.offset_in_bytes[i] + size;
+ tex->tex.layer_size_in_bytes[i] = layer_size;
+ tex->tex.stride_in_bytes[i] = stride;
+ tex->tex.stride_in_pixels[i] = stride_to_width(tex->b.b.b.format, stride);
+ tex->tex.cbzb_allowed[i] = tex->tex.cbzb_allowed[i] && aligned_for_cbzb;
SCREEN_DBG(screen, DBG_TEXALLOC, "r300: Texture miptree: Level %d "
"(%dx%dx%d px, pitch %d bytes) %d bytes total, macrotiled %s\n",
- i, u_minify(desc->width0, i), u_minify(desc->height0, i),
- u_minify(desc->depth0, i), stride, desc->size_in_bytes,
- desc->macrotile[i] ? "TRUE" : "FALSE");
+ i, u_minify(tex->tex.width0, i), u_minify(tex->tex.height0, i),
+ u_minify(tex->tex.depth0, i), stride, tex->tex.size_in_bytes,
+ tex->tex.macrotile[i] ? "TRUE" : "FALSE");
}
}
-static void r300_setup_flags(struct r300_texture_desc *desc)
+static void r300_setup_flags(struct r300_resource *tex)
{
- desc->uses_stride_addressing =
- !util_is_power_of_two(desc->b.b.width0) ||
- (desc->stride_in_bytes_override &&
- stride_to_width(desc->b.b.format,
- desc->stride_in_bytes_override) != desc->b.b.width0);
-
- desc->is_npot =
- desc->uses_stride_addressing ||
- !util_is_power_of_two(desc->b.b.height0) ||
- !util_is_power_of_two(desc->b.b.depth0);
+ tex->tex.uses_stride_addressing =
+ !util_is_power_of_two(tex->b.b.b.width0) ||
+ (tex->tex.stride_in_bytes_override &&
+ stride_to_width(tex->b.b.b.format,
+ tex->tex.stride_in_bytes_override) != tex->b.b.b.width0);
+
+ tex->tex.is_npot =
+ tex->tex.uses_stride_addressing ||
+ !util_is_power_of_two(tex->b.b.b.height0) ||
+ !util_is_power_of_two(tex->b.b.b.depth0);
}
static void r300_setup_cbzb_flags(struct r300_screen *rscreen,
- struct r300_texture_desc *desc)
+ struct r300_resource *tex)
{
unsigned i, bpp;
boolean first_level_valid;
- bpp = util_format_get_blocksizebits(desc->b.b.format);
+ bpp = util_format_get_blocksizebits(tex->b.b.b.format);
/* 1) The texture must be point-sampled,
* 2) The depth must be 16 or 32 bits.
* 3) If the midpoint ZB offset is not aligned to 2048, it returns garbage
* with certain texture sizes. Macrotiling ensures the alignment. */
- first_level_valid = desc->b.b.nr_samples <= 1 &&
+ first_level_valid = tex->b.b.b.nr_samples <= 1 &&
(bpp == 16 || bpp == 32) &&
- desc->macrotile[0];
+ tex->tex.macrotile[0];
if (SCREEN_DBG_ON(rscreen, DBG_NO_CBZB))
first_level_valid = FALSE;
- for (i = 0; i <= desc->b.b.last_level; i++)
- desc->cbzb_allowed[i] = first_level_valid && desc->macrotile[i];
+ for (i = 0; i <= tex->b.b.b.last_level; i++)
+ tex->tex.cbzb_allowed[i] = first_level_valid && tex->tex.macrotile[i];
+}
+
+static unsigned r300_pixels_to_dwords(unsigned stride,
+ unsigned height,
+ unsigned xblock, unsigned yblock)
+{
+ return (util_align_npot(stride, xblock) * align(height, yblock)) / (xblock * yblock);
+}
+
+static void r300_setup_hyperz_properties(struct r300_screen *screen,
+ struct r300_resource *tex)
+{
+ /* The tile size of 1 DWORD in ZMASK RAM is:
+ *
+ * GPU Pipes 4x4 mode 8x8 mode
+ * ------------------------------------------
+ * R580 4P/1Z 32x32 64x64
+ * RV570 3P/1Z 48x16 96x32
+ * RV530 1P/2Z 32x16 64x32
+ * 1P/1Z 16x16 32x32
+ */
+ static unsigned zmask_blocks_x_per_dw[4] = {4, 8, 12, 8};
+ static unsigned zmask_blocks_y_per_dw[4] = {4, 4, 4, 8};
+
+ /* In HIZ RAM, one dword is always 8x8 pixels (each byte is 4x4 pixels),
+ * but the blocks have very weird ordering.
+ *
+ * With 2 pipes and an image of size 8xY, where Y >= 1,
+ * clearing 4 dwords clears blocks like this:
+ *
+ * 01012323
+ *
+ * where numbers correspond to dword indices. The blocks are interleaved
+ * in the X direction, so the alignment must be 4x1 blocks (32x8 pixels).
+ *
+ * With 4 pipes and an image of size 8xY, where Y >= 4,
+ * clearing 8 dwords clears blocks like this:
+ * 01012323
+ * 45456767
+ * 01012323
+ * 45456767
+ * where numbers correspond to dword indices. The blocks are interleaved
+ * in both directions, so the alignment must be 4x4 blocks (32x32 pixels)
+ */
+ static unsigned hiz_align_x[4] = {8, 32, 48, 32};
+ static unsigned hiz_align_y[4] = {8, 8, 8, 32};
+
+ if (util_format_is_depth_or_stencil(tex->b.b.b.format) &&
+ util_format_get_blocksizebits(tex->b.b.b.format) == 32 &&
+ tex->tex.microtile) {
+ unsigned i, pipes;
+
+ if (screen->caps.family == CHIP_FAMILY_RV530) {
+ pipes = screen->caps.num_z_pipes;
+ } else {
+ pipes = screen->caps.num_frag_pipes;
+ }
+
+ for (i = 0; i <= tex->b.b.b.last_level; i++) {
+ unsigned zcomp_numdw, zcompsize, hiz_numdw, stride, height;
+
+ stride = align(tex->tex.stride_in_pixels[i], 16);
+ height = u_minify(tex->b.b.b.height0, i);
+
+ /* The 8x8 compression mode needs macrotiling. */
+ zcompsize = screen->caps.z_compress == R300_ZCOMP_8X8 &&
+ tex->tex.macrotile[i] &&
+ tex->b.b.b.nr_samples <= 1 ? 8 : 4;
+
+ /* Get the ZMASK buffer size in dwords. */
+ zcomp_numdw = r300_pixels_to_dwords(stride, height,
+ zmask_blocks_x_per_dw[pipes-1] * zcompsize,
+ zmask_blocks_y_per_dw[pipes-1] * zcompsize);
+
+ /* Check whether we have enough ZMASK memory. */
+ if (util_format_get_blocksizebits(tex->b.b.b.format) == 32 &&
+ zcomp_numdw <= screen->caps.zmask_ram * pipes) {
+ tex->tex.zmask_dwords[i] = zcomp_numdw;
+ tex->tex.zcomp8x8[i] = zcompsize == 8;
+
+ tex->tex.zmask_stride_in_pixels[i] =
+ util_align_npot(stride, zmask_blocks_x_per_dw[pipes-1] * zcompsize);
+ } else {
+ tex->tex.zmask_dwords[i] = 0;
+ tex->tex.zcomp8x8[i] = FALSE;
+ tex->tex.zmask_stride_in_pixels[i] = 0;
+ }
+
+ /* Now setup HIZ. */
+ stride = util_align_npot(stride, hiz_align_x[pipes-1]);
+ height = align(height, hiz_align_y[pipes-1]);
+
+ /* Get the HIZ buffer size in dwords. */
+ hiz_numdw = (stride * height) / (8*8 * pipes);
+
+ /* Check whether we have enough HIZ memory. */
+ if (hiz_numdw <= screen->caps.hiz_ram * pipes) {
+ tex->tex.hiz_dwords[i] = hiz_numdw;
+ tex->tex.hiz_stride_in_pixels[i] = stride;
+ } else {
+ tex->tex.hiz_dwords[i] = 0;
+ tex->tex.hiz_stride_in_pixels[i] = 0;
+ }
+ }
+ }
}
static void r300_setup_tiling(struct r300_screen *screen,
- struct r300_texture_desc *desc)
+ struct r300_resource *tex)
{
- struct r300_winsys_screen *rws = screen->rws;
- enum pipe_format format = desc->b.b.format;
+ enum pipe_format format = tex->b.b.b.format;
boolean rv350_mode = screen->caps.family >= CHIP_FAMILY_R350;
boolean is_zb = util_format_is_depth_or_stencil(format);
boolean dbg_no_tiling = SCREEN_DBG_ON(screen, DBG_NO_TILING);
+ tex->tex.microtile = R300_BUFFER_LINEAR;
+ tex->tex.macrotile[0] = R300_BUFFER_LINEAR;
+
if (!util_format_is_plain(format)) {
return;
}
/* If height == 1, disable microtiling except for zbuffer. */
- if (!is_zb && (desc->b.b.height0 == 1 || dbg_no_tiling)) {
+ if (!is_zb && (tex->b.b.b.height0 == 1 || dbg_no_tiling)) {
return;
}
@@ -369,13 +441,11 @@ static void r300_setup_tiling(struct r300_screen *screen,
case 1:
case 4:
case 8:
- desc->microtile = R300_BUFFER_TILED;
+ tex->tex.microtile = R300_BUFFER_TILED;
break;
case 2:
- if (rws->get_value(rws, R300_VID_SQUARE_TILING_SUPPORT)) {
- desc->microtile = R300_BUFFER_SQUARETILED;
- }
+ tex->tex.microtile = R300_BUFFER_SQUARETILED;
break;
}
@@ -384,104 +454,99 @@ static void r300_setup_tiling(struct r300_screen *screen,
}
/* Set macrotiling. */
- if (r300_texture_macro_switch(desc, 0, rv350_mode, DIM_WIDTH) &&
- r300_texture_macro_switch(desc, 0, rv350_mode, DIM_HEIGHT)) {
- desc->macrotile[0] = R300_BUFFER_TILED;
+ if (r300_texture_macro_switch(tex, 0, rv350_mode, DIM_WIDTH) &&
+ r300_texture_macro_switch(tex, 0, rv350_mode, DIM_HEIGHT)) {
+ tex->tex.macrotile[0] = R300_BUFFER_TILED;
}
}
-static void r300_tex_print_info(struct r300_screen *rscreen,
- struct r300_texture_desc *desc,
+static void r300_tex_print_info(struct r300_resource *tex,
const char *func)
{
fprintf(stderr,
"r300: %s: Macro: %s, Micro: %s, Pitch: %i, Dim: %ix%ix%i, "
"LastLevel: %i, Size: %i, Format: %s\n",
func,
- desc->macrotile[0] ? "YES" : " NO",
- desc->microtile ? "YES" : " NO",
- desc->stride_in_pixels[0],
- desc->b.b.width0, desc->b.b.height0, desc->b.b.depth0,
- desc->b.b.last_level, desc->size_in_bytes,
- util_format_short_name(desc->b.b.format));
+ tex->tex.macrotile[0] ? "YES" : " NO",
+ tex->tex.microtile ? "YES" : " NO",
+ tex->tex.stride_in_pixels[0],
+ tex->b.b.b.width0, tex->b.b.b.height0, tex->b.b.b.depth0,
+ tex->b.b.b.last_level, tex->tex.size_in_bytes,
+ util_format_short_name(tex->b.b.b.format));
}
boolean r300_texture_desc_init(struct r300_screen *rscreen,
- struct r300_texture_desc *desc,
- const struct pipe_resource *base,
- enum r300_buffer_tiling microtile,
- enum r300_buffer_tiling macrotile,
- unsigned stride_in_bytes_override,
- unsigned max_buffer_size)
+ struct r300_resource *tex,
+ const struct pipe_resource *base)
{
- desc->b.b = *base;
- desc->b.b.screen = &rscreen->screen;
- desc->stride_in_bytes_override = stride_in_bytes_override;
- desc->width0 = base->width0;
- desc->height0 = base->height0;
- desc->depth0 = base->depth0;
-
- r300_setup_flags(desc);
+ tex->b.b.b.target = base->target;
+ tex->b.b.b.format = base->format;
+ tex->b.b.b.width0 = base->width0;
+ tex->b.b.b.height0 = base->height0;
+ tex->b.b.b.depth0 = base->depth0;
+ tex->b.b.b.array_size = base->array_size;
+ tex->b.b.b.last_level = base->last_level;
+ tex->b.b.b.nr_samples = base->nr_samples;
+ tex->tex.width0 = base->width0;
+ tex->tex.height0 = base->height0;
+ tex->tex.depth0 = base->depth0;
+
+ r300_setup_flags(tex);
/* Align a 3D NPOT texture to POT. */
- if (base->target == PIPE_TEXTURE_3D && desc->is_npot) {
- desc->width0 = util_next_power_of_two(desc->width0);
- desc->height0 = util_next_power_of_two(desc->height0);
- desc->depth0 = util_next_power_of_two(desc->depth0);
+ if (base->target == PIPE_TEXTURE_3D && tex->tex.is_npot) {
+ tex->tex.width0 = util_next_power_of_two(tex->tex.width0);
+ tex->tex.height0 = util_next_power_of_two(tex->tex.height0);
+ tex->tex.depth0 = util_next_power_of_two(tex->tex.depth0);
}
/* Setup tiling. */
- if (microtile == R300_BUFFER_SELECT_LAYOUT ||
- macrotile == R300_BUFFER_SELECT_LAYOUT) {
- r300_setup_tiling(rscreen, desc);
- } else {
- desc->microtile = microtile;
- desc->macrotile[0] = macrotile;
- assert(desc->b.b.last_level == 0);
+ if (tex->tex.microtile == R300_BUFFER_SELECT_LAYOUT) {
+ r300_setup_tiling(rscreen, tex);
}
- r300_setup_cbzb_flags(rscreen, desc);
+ r300_setup_cbzb_flags(rscreen, tex);
/* Setup the miptree description. */
- r300_setup_miptree(rscreen, desc, TRUE);
+ r300_setup_miptree(rscreen, tex, TRUE);
/* If the required buffer size is larger the given max size,
* try again without the alignment for the CBZB clear. */
- if (max_buffer_size && desc->size_in_bytes > max_buffer_size) {
- r300_setup_miptree(rscreen, desc, FALSE);
+ if (tex->buf_size && tex->tex.size_in_bytes > tex->buf_size) {
+ r300_setup_miptree(rscreen, tex, FALSE);
}
- r300_texture_3d_fix_mipmapping(rscreen, desc);
+ r300_setup_hyperz_properties(rscreen, tex);
- if (max_buffer_size) {
+ if (tex->buf_size) {
/* Make sure the buffer we got is large enough. */
- if (desc->size_in_bytes > max_buffer_size) {
+ if (tex->tex.size_in_bytes > tex->buf_size) {
fprintf(stderr, "r300: texture_desc_init: The buffer is not "
"large enough. Got: %i, Need: %i, Info:\n",
- max_buffer_size, desc->size_in_bytes);
- r300_tex_print_info(rscreen, desc, "texture_desc_init");
+ tex->buf_size, tex->tex.size_in_bytes);
+ r300_tex_print_info(tex, "texture_desc_init");
return FALSE;
}
- desc->buffer_size_in_bytes = max_buffer_size;
+ tex->tex.buffer_size_in_bytes = tex->buf_size;
} else {
- desc->buffer_size_in_bytes = desc->size_in_bytes;
+ tex->tex.buffer_size_in_bytes = tex->tex.size_in_bytes;
}
if (SCREEN_DBG_ON(rscreen, DBG_TEX))
- r300_tex_print_info(rscreen, desc, "texture_desc_init");
+ r300_tex_print_info(tex, "texture_desc_init");
return TRUE;
}
-unsigned r300_texture_get_offset(struct r300_texture_desc *desc,
+unsigned r300_texture_get_offset(struct r300_resource *tex,
unsigned level, unsigned layer)
{
- unsigned offset = desc->offset_in_bytes[level];
+ unsigned offset = tex->tex.offset_in_bytes[level];
- switch (desc->b.b.target) {
+ switch (tex->b.b.b.target) {
case PIPE_TEXTURE_3D:
case PIPE_TEXTURE_CUBE:
- return offset + layer * desc->layer_size_in_bytes[level];
+ return offset + layer * tex->tex.layer_size_in_bytes[level];
default:
assert(layer == 0);
diff --git a/src/gallium/drivers/r300/r300_texture_desc.h b/src/gallium/drivers/r300/r300_texture_desc.h
index 44d88794a12..ce6e9643ec6 100644
--- a/src/gallium/drivers/r300/r300_texture_desc.h
+++ b/src/gallium/drivers/r300/r300_texture_desc.h
@@ -30,7 +30,7 @@
struct pipe_resource;
struct r300_screen;
struct r300_texture_desc;
-struct r300_texture;
+struct r300_resource;
enum r300_dim {
DIM_WIDTH = 0,
@@ -41,17 +41,13 @@ unsigned r300_get_pixel_alignment(enum pipe_format format,
unsigned num_samples,
enum r300_buffer_tiling microtile,
enum r300_buffer_tiling macrotile,
- enum r300_dim dim);
+ enum r300_dim dim, boolean is_rs690);
boolean r300_texture_desc_init(struct r300_screen *rscreen,
- struct r300_texture_desc *desc,
- const struct pipe_resource *base,
- enum r300_buffer_tiling microtile,
- enum r300_buffer_tiling macrotile,
- unsigned stride_in_bytes_override,
- unsigned max_buffer_size);
-
-unsigned r300_texture_get_offset(struct r300_texture_desc *desc,
+ struct r300_resource *tex,
+ const struct pipe_resource *base);
+
+unsigned r300_texture_get_offset(struct r300_resource *tex,
unsigned level, unsigned layer);
#endif
diff --git a/src/gallium/drivers/r300/r300_tgsi_to_rc.c b/src/gallium/drivers/r300/r300_tgsi_to_rc.c
index 15a323989b2..97ec0a1a1f2 100644
--- a/src/gallium/drivers/r300/r300_tgsi_to_rc.c
+++ b/src/gallium/drivers/r300/r300_tgsi_to_rc.c
@@ -191,7 +191,12 @@ static void transform_dstreg(
dst->File = translate_register_file(src->Register.File);
dst->Index = translate_register_index(ttr, src->Register.File, src->Register.Index);
dst->WriteMask = src->Register.WriteMask;
- dst->RelAddr = src->Register.Indirect;
+
+ if (src->Register.Indirect) {
+ ttr->error = TRUE;
+ fprintf(stderr, "r300: Relative addressing of destination operands "
+ "is unsupported.\n");
+ }
}
static void transform_srcreg(
@@ -332,6 +337,8 @@ void r300_tgsi_to_rc(struct tgsi_to_rc * ttr,
unsigned imm_index = 0;
int i;
+ ttr->error = FALSE;
+
/* Allocate constants placeholders.
*
* Note: What if declared constants are not contiguous? */
diff --git a/src/gallium/drivers/r300/r300_tgsi_to_rc.h b/src/gallium/drivers/r300/r300_tgsi_to_rc.h
index 97641a954b9..adb044cfe56 100644
--- a/src/gallium/drivers/r300/r300_tgsi_to_rc.h
+++ b/src/gallium/drivers/r300/r300_tgsi_to_rc.h
@@ -47,6 +47,9 @@ struct tgsi_to_rc {
/* Vertex shaders have no half swizzles, and no way to handle them, so
* until rc grows proper support, indicate if they're safe to use. */
boolean use_half_swizzles;
+
+ /* If an error occured. */
+ boolean error;
};
void r300_tgsi_to_rc(struct tgsi_to_rc * ttr, const struct tgsi_token * tokens);
diff --git a/src/gallium/drivers/r300/r300_transfer.c b/src/gallium/drivers/r300/r300_transfer.c
index 3b95af79bcf..65c5095be6a 100644
--- a/src/gallium/drivers/r300/r300_transfer.c
+++ b/src/gallium/drivers/r300/r300_transfer.c
@@ -37,7 +37,7 @@ struct r300_transfer {
unsigned offset;
/* Linear texture. */
- struct r300_texture *linear_texture;
+ struct r300_resource *linear_texture;
};
/* Convenience cast wrapper. */
@@ -54,7 +54,7 @@ static void r300_copy_from_tiled_texture(struct pipe_context *ctx,
struct pipe_transfer *transfer = (struct pipe_transfer*)r300transfer;
struct pipe_resource *tex = transfer->resource;
- ctx->resource_copy_region(ctx, &r300transfer->linear_texture->desc.b.b, 0,
+ ctx->resource_copy_region(ctx, &r300transfer->linear_texture->b.b.b, 0,
0, 0, 0,
tex, transfer->level, &transfer->box);
}
@@ -70,9 +70,10 @@ static void r300_copy_into_tiled_texture(struct pipe_context *ctx,
ctx->resource_copy_region(ctx, tex, transfer->level,
transfer->box.x, transfer->box.y, transfer->box.z,
- &r300transfer->linear_texture->desc.b.b, 0, &src_box);
+ &r300transfer->linear_texture->b.b.b, 0, &src_box);
- ctx->flush(ctx, 0, NULL);
+ /* XXX remove this. */
+ r300_flush(ctx, 0, NULL);
}
struct pipe_transfer*
@@ -83,25 +84,25 @@ r300_texture_get_transfer(struct pipe_context *ctx,
const struct pipe_box *box)
{
struct r300_context *r300 = r300_context(ctx);
- struct r300_texture *tex = r300_texture(texture);
+ struct r300_resource *tex = r300_resource(texture);
struct r300_transfer *trans;
struct pipe_resource base;
boolean referenced_cs, referenced_hw, blittable;
+ const struct util_format_description *desc =
+ util_format_description(texture->format);
referenced_cs =
- r300->rws->cs_is_buffer_referenced(r300->cs,
- tex->cs_buffer, R300_REF_CS);
+ r300->rws->cs_is_buffer_referenced(r300->cs, tex->cs_buf);
if (referenced_cs) {
referenced_hw = TRUE;
} else {
referenced_hw =
- r300->rws->cs_is_buffer_referenced(r300->cs,
- tex->cs_buffer, R300_REF_HW);
+ r300->rws->buffer_is_busy(tex->buf);
}
- blittable = ctx->screen->is_format_supported(
- ctx->screen, texture->format, texture->target, 0,
- PIPE_BIND_SAMPLER_VIEW | PIPE_BIND_RENDER_TARGET, 0);
+ blittable = desc->layout == UTIL_FORMAT_LAYOUT_PLAIN ||
+ desc->layout == UTIL_FORMAT_LAYOUT_S3TC ||
+ desc->layout == UTIL_FORMAT_LAYOUT_RGTC;
trans = CALLOC_STRUCT(r300_transfer);
if (trans) {
@@ -114,13 +115,17 @@ r300_texture_get_transfer(struct pipe_context *ctx,
/* If the texture is tiled, we must create a temporary detiled texture
* for this transfer.
* Also make write transfers pipelined. */
- if (tex->desc.microtile || tex->desc.macrotile[level] ||
- ((referenced_hw & !(usage & PIPE_TRANSFER_READ)) && blittable)) {
+ if (tex->tex.microtile || tex->tex.macrotile[level] ||
+ (referenced_hw && blittable && !(usage & PIPE_TRANSFER_READ))) {
+ if (r300->blitter->running) {
+ fprintf(stderr, "r300: ERROR: Blitter recursion in texture_get_transfer.\n");
+ os_break();
+ }
+
base.target = PIPE_TEXTURE_2D;
base.format = texture->format;
base.width0 = box->width;
base.height0 = box->height;
- /* XXX: was depth0 = 0 */
base.depth0 = 1;
base.array_size = 1;
base.last_level = 0;
@@ -141,23 +146,23 @@ r300_texture_get_transfer(struct pipe_context *ctx,
}
/* Create the temporary texture. */
- trans->linear_texture = r300_texture(
+ trans->linear_texture = r300_resource(
ctx->screen->resource_create(ctx->screen,
&base));
if (!trans->linear_texture) {
/* Oh crap, the thing can't create the texture.
* Let's flush and try again. */
- ctx->flush(ctx, 0, NULL);
+ r300_flush(ctx, 0, NULL);
- trans->linear_texture = r300_texture(
+ trans->linear_texture = r300_resource(
ctx->screen->resource_create(ctx->screen,
&base));
if (!trans->linear_texture) {
/* For linear textures, it's safe to fallback to
* an unpipelined transfer. */
- if (!tex->desc.microtile && !tex->desc.macrotile[level]) {
+ if (!tex->tex.microtile && !tex->tex.macrotile[level]) {
goto unpipelined;
}
@@ -169,18 +174,12 @@ r300_texture_get_transfer(struct pipe_context *ctx,
}
}
- assert(!trans->linear_texture->desc.microtile &&
- !trans->linear_texture->desc.macrotile[0]);
+ assert(!trans->linear_texture->tex.microtile &&
+ !trans->linear_texture->tex.macrotile[0]);
- /* Set the stride.
- *
- * Even though we are using an internal texture for this,
- * the transfer level, box and usage parameters still reflect
- * the arguments received to get_transfer. We just do the
- * right thing internally.
- */
+ /* Set the stride. */
trans->transfer.stride =
- trans->linear_texture->desc.stride_in_bytes[0];
+ trans->linear_texture->tex.stride_in_bytes[0];
if (usage & PIPE_TRANSFER_READ) {
/* We cannot map a tiled texture directly because the data is
@@ -188,18 +187,19 @@ r300_texture_get_transfer(struct pipe_context *ctx,
r300_copy_from_tiled_texture(ctx, trans);
/* Always referenced in the blit. */
- ctx->flush(ctx, 0, NULL);
+ r300_flush(ctx, 0, NULL);
}
return &trans->transfer;
}
unpipelined:
/* Unpipelined transfer. */
- trans->transfer.stride = tex->desc.stride_in_bytes[level];
- trans->offset = r300_texture_get_offset(&tex->desc, level, box->z);
+ trans->transfer.stride = tex->tex.stride_in_bytes[level];
+ trans->offset = r300_texture_get_offset(tex, level, box->z);
- if (referenced_cs)
- ctx->flush(ctx, PIPE_FLUSH_RENDER_CACHE, NULL);
+ if (referenced_cs &&
+ !(usage & PIPE_TRANSFER_UNSYNCHRONIZED))
+ r300_flush(ctx, 0, NULL);
return &trans->transfer;
}
return NULL;
@@ -228,20 +228,19 @@ void* r300_texture_transfer_map(struct pipe_context *ctx,
struct r300_context *r300 = r300_context(ctx);
struct r300_winsys_screen *rws = (struct r300_winsys_screen *)ctx->winsys;
struct r300_transfer *r300transfer = r300_transfer(transfer);
- struct r300_texture *tex = r300_texture(transfer->resource);
+ struct r300_resource *tex = r300_resource(transfer->resource);
char *map;
- enum pipe_format format = tex->desc.b.b.format;
+ enum pipe_format format = tex->b.b.b.format;
if (r300transfer->linear_texture) {
/* The detiled texture is of the same size as the region being mapped
* (no offset needed). */
- return rws->buffer_map(rws,
- r300transfer->linear_texture->buffer,
+ return rws->buffer_map(r300transfer->linear_texture->buf,
r300->cs,
transfer->usage);
} else {
/* Tiling is disabled. */
- map = rws->buffer_map(rws, tex->buffer, r300->cs,
+ map = rws->buffer_map(tex->buf, r300->cs,
transfer->usage);
if (!map) {
@@ -259,11 +258,11 @@ void r300_texture_transfer_unmap(struct pipe_context *ctx,
{
struct r300_winsys_screen *rws = (struct r300_winsys_screen *)ctx->winsys;
struct r300_transfer *r300transfer = r300_transfer(transfer);
- struct r300_texture *tex = r300_texture(transfer->resource);
+ struct r300_resource *tex = r300_resource(transfer->resource);
if (r300transfer->linear_texture) {
- rws->buffer_unmap(rws, r300transfer->linear_texture->buffer);
+ rws->buffer_unmap(r300transfer->linear_texture->buf);
} else {
- rws->buffer_unmap(rws, tex->buffer);
+ rws->buffer_unmap(tex->buf);
}
}
diff --git a/src/gallium/drivers/r300/r300_vs.c b/src/gallium/drivers/r300/r300_vs.c
index 78021e2c5d4..b319890157f 100644
--- a/src/gallium/drivers/r300/r300_vs.c
+++ b/src/gallium/drivers/r300/r300_vs.c
@@ -226,6 +226,13 @@ void r300_translate_vertex_shader(struct r300_context *r300,
r300_tgsi_to_rc(&ttr, vs->state.tokens);
+ if (ttr.error) {
+ fprintf(stderr, "r300 VP: Cannot translate a shader. "
+ "Using a dummy shader instead.\n");
+ r300_dummy_vertex_shader(r300, vs);
+ return;
+ }
+
if (compiler.Base.Program.Constants.Count > 200) {
compiler.Base.remove_unused_constants = TRUE;
}
diff --git a/src/gallium/drivers/r300/r300_winsys.h b/src/gallium/drivers/r300/r300_winsys.h
index 0dd330d101f..3a6798a5423 100644
--- a/src/gallium/drivers/r300/r300_winsys.h
+++ b/src/gallium/drivers/r300/r300_winsys.h
@@ -28,37 +28,44 @@
* Any winsys hosting this pipe needs to implement r300_winsys_screen and then
* call r300_screen_create to start things. */
+#include "r300_defines.h"
+
+#include "pipebuffer/pb_bufmgr.h"
#include "pipe/p_defines.h"
#include "pipe/p_state.h"
-#include "r300_defines.h"
-
#define R300_MAX_CMDBUF_DWORDS (16 * 1024)
+#define R300_FLUSH_ASYNC (1 << 0)
struct winsys_handle;
struct r300_winsys_screen;
-struct r300_winsys_buffer; /* for map/unmap etc. */
-struct r300_winsys_cs_buffer; /* for write_reloc etc. */
+#define r300_winsys_bo pb_buffer
+#define r300_winsys_bo_reference(pdst, src) pb_reference(pdst, src)
+
+struct r300_winsys_cs_handle; /* for write_reloc etc. */
struct r300_winsys_cs {
- unsigned cdw; /* Number of used dwords. */
- uint32_t *buf; /* The command buffer. */
+ unsigned cdw; /* Number of used dwords. */
+ uint32_t *buf; /* The command buffer. */
};
enum r300_value_id {
R300_VID_PCI_ID,
R300_VID_GB_PIPES,
R300_VID_Z_PIPES,
- R300_VID_SQUARE_TILING_SUPPORT,
- R300_VID_DRM_2_3_0,
- R300_VID_DRM_2_6_0,
- R300_CAN_HYPERZ,
-};
-
-enum r300_reference_domain { /* bitfield */
- R300_REF_CS = 1,
- R300_REF_HW = 2
+ R300_VID_GART_SIZE,
+ R300_VID_VRAM_SIZE,
+ R300_VID_DRM_MAJOR,
+ R300_VID_DRM_MINOR,
+ R300_VID_DRM_PATCHLEVEL,
+
+ /* These should probably go away: */
+ R300_VID_DRM_2_6_0, /* Hyper-Z, GB_Z_PEQ_CONFIG on rv350->r4xx, R500 FG_ALPHA_VALUE */
+ R300_VID_DRM_2_8_0, /* R500 US_FORMAT regs, R500 ARGB2101010 colorbuffer, CMask, R16F/RG16F */
+
+ R300_CAN_HYPERZ, /* ZMask + HiZ */
+ R300_CAN_AACOMPRESS, /* CMask */
};
struct r300_winsys_screen {
@@ -97,91 +104,78 @@ struct r300_winsys_screen {
* \param domain A bitmask of the R300_DOMAIN_* flags.
* \return The created buffer object.
*/
- struct r300_winsys_buffer *(*buffer_create)(struct r300_winsys_screen *ws,
+ struct r300_winsys_bo *(*buffer_create)(struct r300_winsys_screen *ws,
unsigned size,
unsigned alignment,
unsigned bind,
unsigned usage,
enum r300_buffer_domain domain);
- struct r300_winsys_cs_buffer *(*buffer_get_cs_handle)(
- struct r300_winsys_screen *ws,
- struct r300_winsys_buffer *buf);
-
- /**
- * Reference a buffer object (assign with reference counting).
- *
- * \param ws The winsys this function is called from.
- * \param pdst A destination pointer to set the source buffer to.
- * \param src A source buffer object.
- */
- void (*buffer_reference)(struct r300_winsys_screen *ws,
- struct r300_winsys_buffer **pdst,
- struct r300_winsys_buffer *src);
+ struct r300_winsys_cs_handle *(*buffer_get_cs_handle)(
+ struct r300_winsys_bo *buf);
/**
* Map the entire data store of a buffer object into the client's address
* space.
*
- * \param ws The winsys this function is called from.
* \param buf A winsys buffer object to map.
* \param cs A command stream to flush if the buffer is referenced by it.
* \param usage A bitmask of the PIPE_TRANSFER_* flags.
* \return The pointer at the beginning of the buffer.
*/
- void *(*buffer_map)(struct r300_winsys_screen *ws,
- struct r300_winsys_buffer *buf,
+ void *(*buffer_map)(struct r300_winsys_bo *buf,
struct r300_winsys_cs *cs,
enum pipe_transfer_usage usage);
/**
* Unmap a buffer object from the client's address space.
*
- * \param ws The winsys this function is called from.
* \param buf A winsys buffer object to unmap.
*/
- void (*buffer_unmap)(struct r300_winsys_screen *ws,
- struct r300_winsys_buffer *buf);
+ void (*buffer_unmap)(struct r300_winsys_bo *buf);
+
+ /**
+ * Return TRUE if a buffer object is being used by the GPU.
+ *
+ * \param buf A winsys buffer object.
+ */
+ boolean (*buffer_is_busy)(struct r300_winsys_bo *buf);
/**
* Wait for a buffer object until it is not used by a GPU. This is
* equivalent to a fence placed after the last command using the buffer,
* and synchronizing to the fence.
*
- * \param ws The winsys this function is called from.
* \param buf A winsys buffer object to wait for.
*/
- void (*buffer_wait)(struct r300_winsys_screen *ws,
- struct r300_winsys_buffer *buf);
+ void (*buffer_wait)(struct r300_winsys_bo *buf);
/**
* Return tiling flags describing a memory layout of a buffer object.
*
- * \param ws The winsys this function is called from.
* \param buf A winsys buffer object to get the flags from.
* \param macrotile A pointer to the return value of the microtile flag.
* \param microtile A pointer to the return value of the macrotile flag.
*
* \note microtile and macrotile are not bitmasks!
*/
- void (*buffer_get_tiling)(struct r300_winsys_screen *ws,
- struct r300_winsys_buffer *buf,
+ void (*buffer_get_tiling)(struct r300_winsys_bo *buf,
enum r300_buffer_tiling *microtile,
enum r300_buffer_tiling *macrotile);
/**
* Set tiling flags describing a memory layout of a buffer object.
*
- * \param ws The winsys this function is called from.
* \param buf A winsys buffer object to set the flags for.
+ * \param cs A command stream to flush if the buffer is referenced by it.
* \param macrotile A macrotile flag.
* \param microtile A microtile flag.
* \param stride A stride of the buffer in bytes, for texturing.
*
* \note microtile and macrotile are not bitmasks!
*/
- void (*buffer_set_tiling)(struct r300_winsys_screen *ws,
- struct r300_winsys_buffer *buf,
+ void (*buffer_set_tiling)(struct r300_winsys_bo *buf,
+ struct r300_winsys_cs *cs,
enum r300_buffer_tiling microtile,
enum r300_buffer_tiling macrotile,
unsigned stride);
@@ -196,7 +190,7 @@ struct r300_winsys_screen {
* \param stride The returned buffer stride in bytes.
* \param size The returned buffer size.
*/
- struct r300_winsys_buffer *(*buffer_from_handle)(struct r300_winsys_screen *ws,
+ struct r300_winsys_bo *(*buffer_from_handle)(struct r300_winsys_screen *ws,
struct winsys_handle *whandle,
unsigned *stride,
unsigned *size);
@@ -205,14 +199,12 @@ struct r300_winsys_screen {
* Get a winsys handle from a winsys buffer. The internal structure
* of the handle is platform-specific and only a winsys should access it.
*
- * \param ws The winsys this function is called from.
* \param buf A winsys buffer object to get the handle from.
* \param whandle A winsys handle pointer.
* \param stride A stride of the buffer in bytes, for texturing.
* \return TRUE on success.
*/
- boolean (*buffer_get_handle)(struct r300_winsys_screen *ws,
- struct r300_winsys_buffer *buf,
+ boolean (*buffer_get_handle)(struct r300_winsys_bo *buf,
unsigned stride,
struct winsys_handle *whandle);
@@ -238,23 +230,22 @@ struct r300_winsys_screen {
void (*cs_destroy)(struct r300_winsys_cs *cs);
/**
- * Add a buffer object to the list of buffers to validate.
+ * Add a new buffer relocation. Every relocation must first be added
+ * before it can be written.
*
- * \param cs A command stream to add buffer for validation against.
- * \param buf A winsys buffer to validate.
- * \param rd A read domain containing a bitmask
- * of the R300_DOMAIN_* flags.
- * \param wd A write domain containing a bitmask
- * of the R300_DOMAIN_* flags.
+ * \param cs A command stream to add buffer for validation against.
+ * \param buf A winsys buffer to validate.
+ * \param rd A read domain containing a bitmask of the R300_DOMAIN_* flags.
+ * \param wd A write domain containing a bitmask of the R300_DOMAIN_* flags.
*/
- void (*cs_add_buffer)(struct r300_winsys_cs *cs,
- struct r300_winsys_cs_buffer *buf,
- enum r300_buffer_domain rd,
- enum r300_buffer_domain wd);
+ void (*cs_add_reloc)(struct r300_winsys_cs *cs,
+ struct r300_winsys_cs_handle *buf,
+ enum r300_buffer_domain rd,
+ enum r300_buffer_domain wd);
/**
- * Revalidate all currently set up winsys buffers.
- * Returns TRUE if a flush is required.
+ * Return TRUE if there is enough memory in VRAM and GTT for the relocs
+ * added so far.
*
* \param cs A command stream to validate.
*/
@@ -269,16 +260,15 @@ struct r300_winsys_screen {
* \param wd A write domain containing a bitmask of the R300_DOMAIN_* flags.
*/
void (*cs_write_reloc)(struct r300_winsys_cs *cs,
- struct r300_winsys_cs_buffer *buf,
- enum r300_buffer_domain rd,
- enum r300_buffer_domain wd);
+ struct r300_winsys_cs_handle *buf);
/**
* Flush a command stream.
*
* \param cs A command stream to flush.
+ * \param flags, R300_FLUSH_ASYNC or 0.
*/
- void (*cs_flush)(struct r300_winsys_cs *cs);
+ void (*cs_flush)(struct r300_winsys_cs *cs, unsigned flags);
/**
* Set a flush callback which is called from winsys when flush is
@@ -289,28 +279,17 @@ struct r300_winsys_screen {
* \param user A user pointer that will be passed to the flush callback.
*/
void (*cs_set_flush)(struct r300_winsys_cs *cs,
- void (*flush)(void *),
+ void (*flush)(void *ctx, unsigned flags),
void *user);
/**
- * Reset the list of buffer objects to validate, usually called
- * prior to adding buffer objects for validation.
- *
- * \param cs A command stream to reset buffers for.
- */
- void (*cs_reset_buffers)(struct r300_winsys_cs *cs);
-
- /**
- * Return TRUE if a buffer is referenced by a command stream or by hardware
- * (i.e. is busy), based on the domain parameter.
+ * Return TRUE if a buffer is referenced by a command stream.
*
* \param cs A command stream.
* \param buf A winsys buffer.
- * \param domain A bitmask of the R300_REF_* enums.
*/
boolean (*cs_is_buffer_referenced)(struct r300_winsys_cs *cs,
- struct r300_winsys_cs_buffer *buf,
- enum r300_reference_domain domain);
+ struct r300_winsys_cs_handle *buf);
};
#endif /* R300_WINSYS_H */
diff --git a/src/gallium/drivers/r600/Android.mk b/src/gallium/drivers/r600/Android.mk
new file mode 100644
index 00000000000..b76a78810f6
--- /dev/null
+++ b/src/gallium/drivers/r600/Android.mk
@@ -0,0 +1,43 @@
+ifeq ($(strip $(MESA_BUILD_R600G)),true)
+
+LOCAL_PATH := $(call my-dir)
+
+# from Makefile
+C_SOURCES = \
+ r600_asm.c \
+ r600_blit.c \
+ r600_buffer.c \
+ r600_helper.c \
+ r600_pipe.c \
+ r600_query.c \
+ r600_resource.c \
+ r600_shader.c \
+ r600_state.c \
+ r600_texture.c \
+ r700_asm.c \
+ evergreen_state.c \
+ eg_asm.c \
+ r600_translate.c \
+ r600_state_common.c
+
+include $(CLEAR_VARS)
+
+LOCAL_SRC_FILES := \
+ $(C_SOURCES)
+
+LOCAL_CFLAGS := \
+ -std=c99 \
+ -fvisibility=hidden \
+ -Wno-sign-compare
+
+LOCAL_C_INCLUDES := \
+ external/mesa/src/gallium/include \
+ external/mesa/src/gallium/auxiliary \
+ external/drm \
+ external/drm/include/drm
+
+LOCAL_MODULE := libmesa_pipe_r600
+
+include $(BUILD_STATIC_LIBRARY)
+
+endif # MESA_BUILD_R600G
diff --git a/src/gallium/drivers/r600/SConscript b/src/gallium/drivers/r600/SConscript
index 3fc1fa94c27..5a5fa6d65fd 100644
--- a/src/gallium/drivers/r600/SConscript
+++ b/src/gallium/drivers/r600/SConscript
@@ -9,7 +9,7 @@ except OSError:
Return()
env.Append(CPPPATH = [
- '#/include',
+ '#/include',
'#/src/mesa',
])
diff --git a/src/gallium/drivers/r600/eg_asm.c b/src/gallium/drivers/r600/eg_asm.c
index b79875c7c75..3793b919dde 100644
--- a/src/gallium/drivers/r600/eg_asm.c
+++ b/src/gallium/drivers/r600/eg_asm.c
@@ -35,15 +35,17 @@ int eg_bc_cf_build(struct r600_bc *bc, struct r600_bc_cf *cf)
switch (cf->inst) {
case (EG_V_SQ_CF_ALU_WORD1_SQ_CF_INST_ALU << 3):
+ case (EG_V_SQ_CF_ALU_WORD1_SQ_CF_INST_ALU_POP_AFTER << 3):
+ case (EG_V_SQ_CF_ALU_WORD1_SQ_CF_INST_ALU_POP2_AFTER << 3):
case (EG_V_SQ_CF_ALU_WORD1_SQ_CF_INST_ALU_PUSH_BEFORE << 3):
bc->bytecode[id++] = S_SQ_CF_ALU_WORD0_ADDR(cf->addr >> 1) |
- S_SQ_CF_ALU_WORD0_KCACHE_MODE0(cf->kcache0_mode) |
- S_SQ_CF_ALU_WORD0_KCACHE_BANK0(cf->kcache0_bank) |
- S_SQ_CF_ALU_WORD0_KCACHE_BANK1(cf->kcache1_bank);
+ S_SQ_CF_ALU_WORD0_KCACHE_MODE0(cf->kcache[0].mode) |
+ S_SQ_CF_ALU_WORD0_KCACHE_BANK0(cf->kcache[0].bank) |
+ S_SQ_CF_ALU_WORD0_KCACHE_BANK1(cf->kcache[1].bank);
bc->bytecode[id++] = S_SQ_CF_ALU_WORD1_CF_INST(cf->inst >> 3) |
- S_SQ_CF_ALU_WORD1_KCACHE_MODE1(cf->kcache1_mode) |
- S_SQ_CF_ALU_WORD1_KCACHE_ADDR0(cf->kcache0_addr) |
- S_SQ_CF_ALU_WORD1_KCACHE_ADDR1(cf->kcache1_addr) |
+ S_SQ_CF_ALU_WORD1_KCACHE_MODE1(cf->kcache[1].mode) |
+ S_SQ_CF_ALU_WORD1_KCACHE_ADDR0(cf->kcache[0].addr) |
+ S_SQ_CF_ALU_WORD1_KCACHE_ADDR1(cf->kcache[1].addr) |
S_SQ_CF_ALU_WORD1_BARRIER(1) |
S_SQ_CF_ALU_WORD1_COUNT((cf->ndw / 2) - 1);
break;
@@ -60,7 +62,8 @@ int eg_bc_cf_build(struct r600_bc *bc, struct r600_bc_cf *cf)
S_SQ_CF_ALLOC_EXPORT_WORD0_ELEM_SIZE(cf->output.elem_size) |
S_SQ_CF_ALLOC_EXPORT_WORD0_ARRAY_BASE(cf->output.array_base) |
S_SQ_CF_ALLOC_EXPORT_WORD0_TYPE(cf->output.type);
- bc->bytecode[id++] = S_SQ_CF_ALLOC_EXPORT_WORD1_SWIZ_SEL_X(cf->output.swizzle_x) |
+ bc->bytecode[id++] = S_SQ_CF_ALLOC_EXPORT_WORD1_BURST_COUNT(cf->output.burst_count - 1) |
+ S_SQ_CF_ALLOC_EXPORT_WORD1_SWIZ_SEL_X(cf->output.swizzle_x) |
S_SQ_CF_ALLOC_EXPORT_WORD1_SWIZ_SEL_Y(cf->output.swizzle_y) |
S_SQ_CF_ALLOC_EXPORT_WORD1_SWIZ_SEL_Z(cf->output.swizzle_z) |
S_SQ_CF_ALLOC_EXPORT_WORD1_SWIZ_SEL_W(cf->output.swizzle_w) |
@@ -90,37 +93,3 @@ int eg_bc_cf_build(struct r600_bc *bc, struct r600_bc_cf *cf)
}
return 0;
}
-
-void eg_cf_vtx(struct r600_vertex_element *ve, u32 *bytecode, unsigned count)
-{
- struct r600_pipe_state *rstate;
- unsigned i = 0;
-
- if (count > 8) {
- bytecode[i++] = S_SQ_CF_WORD0_ADDR(8 >> 1);
- bytecode[i++] = S_SQ_CF_WORD1_CF_INST(EG_V_SQ_CF_WORD1_SQ_CF_INST_VTX) |
- S_SQ_CF_WORD1_BARRIER(1) |
- S_SQ_CF_WORD1_COUNT(8 - 1);
- bytecode[i++] = S_SQ_CF_WORD0_ADDR(40 >> 1);
- bytecode[i++] = S_SQ_CF_WORD1_CF_INST(EG_V_SQ_CF_WORD1_SQ_CF_INST_VTX) |
- S_SQ_CF_WORD1_BARRIER(1) |
- S_SQ_CF_WORD1_COUNT(count - 8 - 1);
- } else {
- bytecode[i++] = S_SQ_CF_WORD0_ADDR(8 >> 1);
- bytecode[i++] = S_SQ_CF_WORD1_CF_INST(EG_V_SQ_CF_WORD1_SQ_CF_INST_VTX) |
- S_SQ_CF_WORD1_BARRIER(1) |
- S_SQ_CF_WORD1_COUNT(count - 1);
- }
- bytecode[i++] = S_SQ_CF_WORD0_ADDR(0);
- bytecode[i++] = S_SQ_CF_WORD1_CF_INST(EG_V_SQ_CF_WORD1_SQ_CF_INST_RETURN) |
- S_SQ_CF_WORD1_BARRIER(1);
-
- rstate = &ve->rstate;
- rstate->id = R600_PIPE_STATE_FETCH_SHADER;
- rstate->nregs = 0;
- r600_pipe_state_add_reg(rstate, R_0288A8_SQ_PGM_RESOURCES_FS,
- 0x00000000, 0xFFFFFFFF, NULL);
- r600_pipe_state_add_reg(rstate, R_0288A4_SQ_PGM_START_FS,
- (r600_bo_offset(ve->fetch_shader)) >> 8,
- 0xFFFFFFFF, ve->fetch_shader);
-}
diff --git a/src/gallium/drivers/r600/eg_state_inlines.h b/src/gallium/drivers/r600/eg_state_inlines.h
index ecea1db4f15..cae3888051b 100644
--- a/src/gallium/drivers/r600/eg_state_inlines.h
+++ b/src/gallium/drivers/r600/eg_state_inlines.h
@@ -253,9 +253,13 @@ static inline unsigned r600_tex_dim(unsigned dim)
default:
case PIPE_TEXTURE_1D:
return V_030000_SQ_TEX_DIM_1D;
+ case PIPE_TEXTURE_1D_ARRAY:
+ return V_030000_SQ_TEX_DIM_1D_ARRAY;
case PIPE_TEXTURE_2D:
case PIPE_TEXTURE_RECT:
return V_030000_SQ_TEX_DIM_2D;
+ case PIPE_TEXTURE_2D_ARRAY:
+ return V_030000_SQ_TEX_DIM_2D_ARRAY;
case PIPE_TEXTURE_3D:
return V_030000_SQ_TEX_DIM_3D;
case PIPE_TEXTURE_CUBE:
@@ -289,10 +293,14 @@ static inline uint32_t r600_translate_colorswap(enum pipe_format format)
{
switch (format) {
/* 8-bit buffers. */
+ case PIPE_FORMAT_L4A4_UNORM:
+ return V_028C70_SWAP_ALT;
+
case PIPE_FORMAT_A8_UNORM:
return V_028C70_SWAP_ALT_REV;
case PIPE_FORMAT_I8_UNORM:
case PIPE_FORMAT_L8_UNORM:
+ case PIPE_FORMAT_L8_SRGB:
case PIPE_FORMAT_R8_UNORM:
case PIPE_FORMAT_R8_SNORM:
return V_028C70_SWAP_STD;
@@ -313,6 +321,7 @@ static inline uint32_t r600_translate_colorswap(enum pipe_format format)
return V_028C70_SWAP_STD;
case PIPE_FORMAT_L8A8_UNORM:
+ case PIPE_FORMAT_L8A8_SRGB:
return V_028C70_SWAP_ALT;
case PIPE_FORMAT_R8G8_UNORM:
return V_028C70_SWAP_STD;
@@ -352,9 +361,11 @@ static inline uint32_t r600_translate_colorswap(enum pipe_format format)
case PIPE_FORMAT_R10G10B10A2_UNORM:
case PIPE_FORMAT_R10G10B10X2_SNORM:
- case PIPE_FORMAT_B10G10R10A2_UNORM:
case PIPE_FORMAT_R10SG10SB10SA2U_NORM:
- return V_028C70_SWAP_STD_REV;
+ return V_028C70_SWAP_STD;
+
+ case PIPE_FORMAT_B10G10R10A2_UNORM:
+ return V_028C70_SWAP_ALT;
case PIPE_FORMAT_R16G16_UNORM:
return V_028C70_SWAP_STD;
@@ -362,14 +373,13 @@ static inline uint32_t r600_translate_colorswap(enum pipe_format format)
/* 64-bit buffers. */
case PIPE_FORMAT_R16G16B16A16_UNORM:
case PIPE_FORMAT_R16G16B16A16_SNORM:
- // return V_028C70_COLOR_16_16_16_16;
case PIPE_FORMAT_R16G16B16A16_FLOAT:
- // return V_028C70_COLOR_16_16_16_16_FLOAT;
/* 128-bit buffers. */
case PIPE_FORMAT_R32G32B32A32_FLOAT:
- // return V_028C70_COLOR_32_32_32_32_FLOAT;
- return 0;
+ case PIPE_FORMAT_R32G32B32A32_SNORM:
+ case PIPE_FORMAT_R32G32B32A32_UNORM:
+ return V_028C70_SWAP_STD;
default:
R600_ERR("unsupported colorswap format %d\n", format);
return ~0;
@@ -381,9 +391,13 @@ static INLINE uint32_t r600_translate_colorformat(enum pipe_format format)
{
switch (format) {
/* 8-bit buffers. */
+ case PIPE_FORMAT_L4A4_UNORM:
+ return V_028C70_COLOR_4_4;
+
case PIPE_FORMAT_A8_UNORM:
case PIPE_FORMAT_I8_UNORM:
case PIPE_FORMAT_L8_UNORM:
+ case PIPE_FORMAT_L8_SRGB:
case PIPE_FORMAT_R8_UNORM:
case PIPE_FORMAT_R8_SNORM:
return V_028C70_COLOR_8;
@@ -404,6 +418,7 @@ static INLINE uint32_t r600_translate_colorformat(enum pipe_format format)
return V_028C70_COLOR_16;
case PIPE_FORMAT_L8A8_UNORM:
+ case PIPE_FORMAT_L8A8_SRGB:
case PIPE_FORMAT_R8G8_UNORM:
return V_028C70_COLOR_8_8;
@@ -430,7 +445,7 @@ static INLINE uint32_t r600_translate_colorformat(enum pipe_format format)
case PIPE_FORMAT_R10G10B10X2_SNORM:
case PIPE_FORMAT_B10G10R10A2_UNORM:
case PIPE_FORMAT_R10SG10SB10SA2U_NORM:
- return V_028C70_COLOR_10_10_10_2;
+ return V_028C70_COLOR_2_10_10_10;
case PIPE_FORMAT_Z24X8_UNORM:
case PIPE_FORMAT_Z24_UNORM_S8_USCALED:
@@ -471,6 +486,9 @@ static INLINE uint32_t r600_translate_colorformat(enum pipe_format format)
return V_028C70_COLOR_32_32;
/* 128-bit buffers. */
+ case PIPE_FORMAT_R32G32B32A32_SNORM:
+ case PIPE_FORMAT_R32G32B32A32_UNORM:
+ return V_028C70_COLOR_32_32_32_32;
case PIPE_FORMAT_R32G32B32_FLOAT:
return V_028C70_COLOR_32_32_32_FLOAT;
case PIPE_FORMAT_R32G32B32A32_FLOAT:
@@ -485,9 +503,9 @@ static INLINE uint32_t r600_translate_colorformat(enum pipe_format format)
}
}
-static INLINE boolean r600_is_sampler_format_supported(enum pipe_format format)
+static INLINE boolean r600_is_sampler_format_supported(struct pipe_screen *screen, enum pipe_format format)
{
- return r600_translate_texformat(format, NULL, NULL, NULL) != ~0;
+ return r600_translate_texformat(screen, format, NULL, NULL, NULL) != ~0;
}
static INLINE boolean r600_is_colorbuffer_format_supported(enum pipe_format format)
@@ -501,144 +519,4 @@ static INLINE boolean r600_is_zs_format_supported(enum pipe_format format)
return r600_translate_dbformat(format) != ~0;
}
-static INLINE boolean r600_is_vertex_format_supported(enum pipe_format format)
-{
- return r600_translate_colorformat(format) != ~0;
-}
-
-static INLINE uint32_t r600_translate_vertex_data_type(enum pipe_format format)
-{
- uint32_t result = 0;
- const struct util_format_description *desc;
- unsigned i;
-
- desc = util_format_description(format);
- if (desc->layout != UTIL_FORMAT_LAYOUT_PLAIN) {
- goto out_unknown;
- }
-
- /* Find the first non-VOID channel. */
- for (i = 0; i < 4; i++) {
- if (desc->channel[i].type != UTIL_FORMAT_TYPE_VOID) {
- break;
- }
- }
-
- switch (desc->channel[i].type) {
- /* Half-floats, floats, doubles */
- case UTIL_FORMAT_TYPE_FLOAT:
- switch (desc->channel[i].size) {
- case 16:
- switch (desc->nr_channels) {
- case 1:
- result = FMT_16_FLOAT;
- break;
- case 2:
- result = FMT_16_16_FLOAT;
- break;
- case 3:
- result = FMT_16_16_16_FLOAT;
- break;
- case 4:
- result = FMT_16_16_16_16_FLOAT;
- break;
- }
- break;
- case 32:
- switch (desc->nr_channels) {
- case 1:
- result = FMT_32_FLOAT;
- break;
- case 2:
- result = FMT_32_32_FLOAT;
- break;
- case 3:
- result = FMT_32_32_32_FLOAT;
- break;
- case 4:
- result = FMT_32_32_32_32_FLOAT;
- break;
- }
- break;
- default:
- goto out_unknown;
- }
- break;
- /* Unsigned ints */
- case UTIL_FORMAT_TYPE_UNSIGNED:
- /* Signed ints */
- case UTIL_FORMAT_TYPE_SIGNED:
- switch (desc->channel[i].size) {
- case 8:
- switch (desc->nr_channels) {
- case 1:
- result = FMT_8;
- break;
- case 2:
- result = FMT_8_8;
- break;
- case 3:
-// result = V_038008_FMT_8_8_8; /* fails piglit draw-vertices test */
-// break;
- case 4:
- result = FMT_8_8_8_8;
- break;
- }
- break;
- case 16:
- switch (desc->nr_channels) {
- case 1:
- result = FMT_16;
- break;
- case 2:
- result = FMT_16_16;
- break;
- case 3:
-// result = V_038008_FMT_16_16_16; /* fails piglit draw-vertices test */
-// break;
- case 4:
- result = FMT_16_16_16_16;
- break;
- }
- break;
- case 32:
- switch (desc->nr_channels) {
- case 1:
- result = FMT_32;
- break;
- case 2:
- result = FMT_32_32;
- break;
- case 3:
- result = FMT_32_32_32;
- break;
- case 4:
- result = FMT_32_32_32_32;
- break;
- }
- break;
- default:
- goto out_unknown;
- }
- break;
- default:
- goto out_unknown;
- }
-
- result = S_030008_DATA_FORMAT(result);
-
- if (desc->channel[i].type == UTIL_FORMAT_TYPE_SIGNED) {
- result |= S_030008_FORMAT_COMP_ALL(1);
- }
- if (desc->channel[i].normalized) {
- result |= S_030008_NUM_FORMAT_ALL(0);
- } else {
- result |= S_030008_NUM_FORMAT_ALL(2);
- }
- return result;
-out_unknown:
- R600_ERR("unsupported vertex format %s\n", util_format_name(format));
- return ~0;
-}
-
#endif
diff --git a/src/gallium/drivers/r600/eg_states_inc.h b/src/gallium/drivers/r600/eg_states_inc.h
deleted file mode 100644
index 1379c11291f..00000000000
--- a/src/gallium/drivers/r600/eg_states_inc.h
+++ /dev/null
@@ -1,458 +0,0 @@
-/* This file is autogenerated from eg_states.h - do not edit directly */
-/* autogenerating script is gen_eg_states.py */
-
-/* EG_CONFIG */
-#define EG_CONFIG__SQ_CONFIG 0
-#define EG_CONFIG__SPI_CONFIG_CNTL 1
-#define EG_CONFIG__SPI_CONFIG_CNTL_1 2
-#define EG_CONFIG__SQ_GPR_RESOURCE_MGMT_1 3
-#define EG_CONFIG__SQ_GPR_RESOURCE_MGMT_2 4
-#define EG_CONFIG__SQ_GPR_RESOURCE_MGMT_3 5
-#define EG_CONFIG__SQ_THREAD_RESOURCE_MGMT_1 6
-#define EG_CONFIG__SQ_THREAD_RESOURCE_MGMT_2 7
-#define EG_CONFIG__SQ_STACK_RESOURCE_MGMT_1 8
-#define EG_CONFIG__SQ_STACK_RESOURCE_MGMT_2 9
-#define EG_CONFIG__SQ_STACK_RESOURCE_MGMT_3 10
-#define EG_CONFIG__SQ_DYN_GPR_CNTL_PS_FLUSH_REQ 11
-#define EG_CONFIG__PA_CL_ENHANCE 12
-#define EG_CONFIG__SQ_DYN_GPR_RESOURCE_LIMIT_1 13
-#define EG_CONFIG__SQ_LDS_ALLOC_PS 14
-#define EG_CONFIG__SX_MISC 15
-#define EG_CONFIG__SQ_ESGS_RING_ITEMSIZE 16
-#define EG_CONFIG__SQ_GSVS_RING_ITEMSIZE 17
-#define EG_CONFIG__SQ_ESTMP_RING_ITEMSIZE 18
-#define EG_CONFIG__SQ_GSTMP_RING_ITEMSIZE 19
-#define EG_CONFIG__SQ_VSTMP_RING_ITEMSIZE 20
-#define EG_CONFIG__SQ_PSTMP_RING_ITEMSIZE 21
-#define EG_CONFIG__SQ_GS_VERT_ITEMSIZE 22
-#define EG_CONFIG__SQ_GS_VERT_ITEMSIZE_1 23
-#define EG_CONFIG__SQ_GS_VERT_ITEMSIZE_2 24
-#define EG_CONFIG__SQ_GS_VERT_ITEMSIZE_3 25
-#define EG_CONFIG__VGT_OUTPUT_PATH_CNTL 26
-#define EG_CONFIG__VGT_HOS_CNTL 27
-#define EG_CONFIG__VGT_HOS_MAX_TESS_LEVEL 28
-#define EG_CONFIG__VGT_HOS_MIN_TESS_LEVEL 29
-#define EG_CONFIG__VGT_HOS_REUSE_DEPTH 30
-#define EG_CONFIG__VGT_GROUP_PRIM_TYPE 31
-#define EG_CONFIG__VGT_GROUP_FIRST_DECR 32
-#define EG_CONFIG__VGT_GROUP_DECR 33
-#define EG_CONFIG__VGT_GROUP_VECT_0_CNTL 34
-#define EG_CONFIG__VGT_GROUP_VECT_1_CNTL 35
-#define EG_CONFIG__VGT_GROUP_VECT_0_FMT_CNTL 36
-#define EG_CONFIG__VGT_GROUP_VECT_1_FMT_CNTL 37
-#define EG_CONFIG__VGT_GS_MODE 38
-#define EG_CONFIG__PA_SC_MODE_CNTL_0 39
-#define EG_CONFIG__PA_SC_MODE_CNTL_1 40
-#define EG_CONFIG__VGT_REUSE_OFF 41
-#define EG_CONFIG__VGT_VTX_CNT_EN 42
-#define EG_CONFIG__VGT_SHADER_STAGES_EN 43
-#define EG_CONFIG__VGT_STRMOUT_CONFIG 44
-#define EG_CONFIG__VGT_STRMOUT_BUFFER_CONFIG 45
-#define EG_CONFIG_SIZE 46
-#define EG_CONFIG_PM4 128
-
-/* EG_CB_CNTL */
-#define EG_CB_CNTL__CB_TARGET_MASK 0
-#define EG_CB_CNTL__CB_SHADER_MASK 1
-#define EG_CB_CNTL__CB_COLOR_CONTROL 2
-#define EG_CB_CNTL__PA_SC_AA_CONFIG 3
-#define EG_CB_CNTL__PA_SC_AA_SAMPLE_LOCS_MCTX 4
-#define EG_CB_CNTL__PA_SC_AA_MASK 5
-#define EG_CB_CNTL_SIZE 6
-#define EG_CB_CNTL_PM4 128
-
-/* EG_RASTERIZER */
-#define EG_RASTERIZER__SPI_INTERP_CONTROL_0 0
-#define EG_RASTERIZER__PA_CL_CLIP_CNTL 1
-#define EG_RASTERIZER__PA_SU_SC_MODE_CNTL 2
-#define EG_RASTERIZER__PA_CL_VS_OUT_CNTL 3
-#define EG_RASTERIZER__PA_CL_NANINF_CNTL 4
-#define EG_RASTERIZER__PA_SU_POINT_SIZE 5
-#define EG_RASTERIZER__PA_SU_POINT_MINMAX 6
-#define EG_RASTERIZER__PA_SU_LINE_CNTL 7
-#define EG_RASTERIZER__PA_SC_MPASS_PS_CNTL 8
-#define EG_RASTERIZER__PA_SC_LINE_CNTL 9
-#define EG_RASTERIZER__PA_SU_VTX_CNTL 10
-#define EG_RASTERIZER__PA_CL_GB_VERT_CLIP_ADJ 11
-#define EG_RASTERIZER__PA_CL_GB_VERT_DISC_ADJ 12
-#define EG_RASTERIZER__PA_CL_GB_HORZ_CLIP_ADJ 13
-#define EG_RASTERIZER__PA_CL_GB_HORZ_DISC_ADJ 14
-#define EG_RASTERIZER__PA_SU_POLY_OFFSET_DB_FMT_CNTL 15
-#define EG_RASTERIZER__PA_SU_POLY_OFFSET_CLAMP 16
-#define EG_RASTERIZER__PA_SU_POLY_OFFSET_FRONT_SCALE 17
-#define EG_RASTERIZER__PA_SU_POLY_OFFSET_FRONT_OFFSET 18
-#define EG_RASTERIZER__PA_SU_POLY_OFFSET_BACK_SCALE 19
-#define EG_RASTERIZER__PA_SU_POLY_OFFSET_BACK_OFFSET 20
-#define EG_RASTERIZER_SIZE 21
-#define EG_RASTERIZER_PM4 128
-
-/* EG_VIEWPORT */
-#define EG_VIEWPORT__PA_SC_VPORT_ZMIN_0 0
-#define EG_VIEWPORT__PA_SC_VPORT_ZMAX_0 1
-#define EG_VIEWPORT__PA_CL_VPORT_XSCALE_0 2
-#define EG_VIEWPORT__PA_CL_VPORT_YSCALE_0 3
-#define EG_VIEWPORT__PA_CL_VPORT_ZSCALE_0 4
-#define EG_VIEWPORT__PA_CL_VPORT_XOFFSET_0 5
-#define EG_VIEWPORT__PA_CL_VPORT_YOFFSET_0 6
-#define EG_VIEWPORT__PA_CL_VPORT_ZOFFSET_0 7
-#define EG_VIEWPORT__PA_CL_VTE_CNTL 8
-#define EG_VIEWPORT_SIZE 9
-#define EG_VIEWPORT_PM4 128
-
-/* EG_SCISSOR */
-#define EG_SCISSOR__PA_SC_SCREEN_SCISSOR_TL 0
-#define EG_SCISSOR__PA_SC_SCREEN_SCISSOR_BR 1
-#define EG_SCISSOR__PA_SC_WINDOW_OFFSET 2
-#define EG_SCISSOR__PA_SC_WINDOW_SCISSOR_TL 3
-#define EG_SCISSOR__PA_SC_WINDOW_SCISSOR_BR 4
-#define EG_SCISSOR__PA_SC_CLIPRECT_RULE 5
-#define EG_SCISSOR__PA_SC_CLIPRECT_0_TL 6
-#define EG_SCISSOR__PA_SC_CLIPRECT_0_BR 7
-#define EG_SCISSOR__PA_SC_CLIPRECT_1_TL 8
-#define EG_SCISSOR__PA_SC_CLIPRECT_1_BR 9
-#define EG_SCISSOR__PA_SC_CLIPRECT_2_TL 10
-#define EG_SCISSOR__PA_SC_CLIPRECT_2_BR 11
-#define EG_SCISSOR__PA_SC_CLIPRECT_3_TL 12
-#define EG_SCISSOR__PA_SC_CLIPRECT_3_BR 13
-#define EG_SCISSOR__PA_SC_EDGERULE 14
-#define EG_SCISSOR__PA_SC_GENERIC_SCISSOR_TL 15
-#define EG_SCISSOR__PA_SC_GENERIC_SCISSOR_BR 16
-#define EG_SCISSOR__PA_SC_VPORT_SCISSOR_0_TL 17
-#define EG_SCISSOR__PA_SC_VPORT_SCISSOR_0_BR 18
-#define EG_SCISSOR__PA_SU_HARDWARE_SCREEN_OFFSET 19
-#define EG_SCISSOR_SIZE 20
-#define EG_SCISSOR_PM4 128
-
-/* EG_BLEND */
-#define EG_BLEND__CB_BLEND_RED 0
-#define EG_BLEND__CB_BLEND_GREEN 1
-#define EG_BLEND__CB_BLEND_BLUE 2
-#define EG_BLEND__CB_BLEND_ALPHA 3
-#define EG_BLEND__CB_BLEND0_CONTROL 4
-#define EG_BLEND__CB_BLEND1_CONTROL 5
-#define EG_BLEND__CB_BLEND2_CONTROL 6
-#define EG_BLEND__CB_BLEND3_CONTROL 7
-#define EG_BLEND__CB_BLEND4_CONTROL 8
-#define EG_BLEND__CB_BLEND5_CONTROL 9
-#define EG_BLEND__CB_BLEND6_CONTROL 10
-#define EG_BLEND__CB_BLEND7_CONTROL 11
-#define EG_BLEND_SIZE 12
-#define EG_BLEND_PM4 128
-
-/* EG_DSA */
-#define EG_DSA__DB_STENCIL_CLEAR 0
-#define EG_DSA__DB_DEPTH_CLEAR 1
-#define EG_DSA__SX_ALPHA_TEST_CONTROL 2
-#define EG_DSA__DB_STENCILREFMASK 3
-#define EG_DSA__DB_STENCILREFMASK_BF 4
-#define EG_DSA__SX_ALPHA_REF 5
-#define EG_DSA__SPI_FOG_CNTL 6
-#define EG_DSA__DB_DEPTH_CONTROL 7
-#define EG_DSA__DB_SHADER_CONTROL 8
-#define EG_DSA__DB_RENDER_CONTROL 9
-#define EG_DSA__DB_COUNT_CONTROL 10
-#define EG_DSA__DB_RENDER_OVERRIDE 11
-#define EG_DSA__DB_RENDER_OVERRIDE2 12
-#define EG_DSA__DB_SRESULTS_COMPARE_STATE0 13
-#define EG_DSA__DB_SRESULTS_COMPARE_STATE1 14
-#define EG_DSA__DB_PRELOAD_CONTROL 15
-#define EG_DSA__DB_ALPHA_TO_MASK 16
-#define EG_DSA_SIZE 17
-#define EG_DSA_PM4 128
-
-/* EG_VS_SHADER */
-#define EG_VS_SHADER__SQ_VTX_SEMANTIC_0 0
-#define EG_VS_SHADER__SQ_VTX_SEMANTIC_1 1
-#define EG_VS_SHADER__SQ_VTX_SEMANTIC_2 2
-#define EG_VS_SHADER__SQ_VTX_SEMANTIC_3 3
-#define EG_VS_SHADER__SQ_VTX_SEMANTIC_4 4
-#define EG_VS_SHADER__SQ_VTX_SEMANTIC_5 5
-#define EG_VS_SHADER__SQ_VTX_SEMANTIC_6 6
-#define EG_VS_SHADER__SQ_VTX_SEMANTIC_7 7
-#define EG_VS_SHADER__SQ_VTX_SEMANTIC_8 8
-#define EG_VS_SHADER__SQ_VTX_SEMANTIC_9 9
-#define EG_VS_SHADER__SQ_VTX_SEMANTIC_10 10
-#define EG_VS_SHADER__SQ_VTX_SEMANTIC_11 11
-#define EG_VS_SHADER__SQ_VTX_SEMANTIC_12 12
-#define EG_VS_SHADER__SQ_VTX_SEMANTIC_13 13
-#define EG_VS_SHADER__SQ_VTX_SEMANTIC_14 14
-#define EG_VS_SHADER__SQ_VTX_SEMANTIC_15 15
-#define EG_VS_SHADER__SQ_VTX_SEMANTIC_16 16
-#define EG_VS_SHADER__SQ_VTX_SEMANTIC_17 17
-#define EG_VS_SHADER__SQ_VTX_SEMANTIC_18 18
-#define EG_VS_SHADER__SQ_VTX_SEMANTIC_19 19
-#define EG_VS_SHADER__SQ_VTX_SEMANTIC_20 20
-#define EG_VS_SHADER__SQ_VTX_SEMANTIC_21 21
-#define EG_VS_SHADER__SQ_VTX_SEMANTIC_22 22
-#define EG_VS_SHADER__SQ_VTX_SEMANTIC_23 23
-#define EG_VS_SHADER__SQ_VTX_SEMANTIC_24 24
-#define EG_VS_SHADER__SQ_VTX_SEMANTIC_25 25
-#define EG_VS_SHADER__SQ_VTX_SEMANTIC_26 26
-#define EG_VS_SHADER__SQ_VTX_SEMANTIC_27 27
-#define EG_VS_SHADER__SQ_VTX_SEMANTIC_28 28
-#define EG_VS_SHADER__SQ_VTX_SEMANTIC_29 29
-#define EG_VS_SHADER__SQ_VTX_SEMANTIC_30 30
-#define EG_VS_SHADER__SQ_VTX_SEMANTIC_31 31
-#define EG_VS_SHADER__SPI_VS_OUT_ID_0 32
-#define EG_VS_SHADER__SPI_VS_OUT_ID_1 33
-#define EG_VS_SHADER__SPI_VS_OUT_ID_2 34
-#define EG_VS_SHADER__SPI_VS_OUT_ID_3 35
-#define EG_VS_SHADER__SPI_VS_OUT_ID_4 36
-#define EG_VS_SHADER__SPI_VS_OUT_ID_5 37
-#define EG_VS_SHADER__SPI_VS_OUT_ID_6 38
-#define EG_VS_SHADER__SPI_VS_OUT_ID_7 39
-#define EG_VS_SHADER__SPI_VS_OUT_ID_8 40
-#define EG_VS_SHADER__SPI_VS_OUT_ID_9 41
-#define EG_VS_SHADER__SPI_VS_OUT_CONFIG 42
-#define EG_VS_SHADER__SQ_PGM_START_VS 43
-#define EG_VS_SHADER__SQ_PGM_RESOURCES_VS 44
-#define EG_VS_SHADER__SQ_PGM_RESOURCES_2_VS 45
-#define EG_VS_SHADER__SQ_PGM_START_FS 46
-#define EG_VS_SHADER__SQ_PGM_RESOURCES_FS 47
-#define EG_VS_SHADER_SIZE 48
-#define EG_VS_SHADER_PM4 128
-
-/* EG_PS_SHADER */
-#define EG_PS_SHADER__SPI_PS_INPUT_CNTL_0 0
-#define EG_PS_SHADER__SPI_PS_INPUT_CNTL_1 1
-#define EG_PS_SHADER__SPI_PS_INPUT_CNTL_2 2
-#define EG_PS_SHADER__SPI_PS_INPUT_CNTL_3 3
-#define EG_PS_SHADER__SPI_PS_INPUT_CNTL_4 4
-#define EG_PS_SHADER__SPI_PS_INPUT_CNTL_5 5
-#define EG_PS_SHADER__SPI_PS_INPUT_CNTL_6 6
-#define EG_PS_SHADER__SPI_PS_INPUT_CNTL_7 7
-#define EG_PS_SHADER__SPI_PS_INPUT_CNTL_8 8
-#define EG_PS_SHADER__SPI_PS_INPUT_CNTL_9 9
-#define EG_PS_SHADER__SPI_PS_INPUT_CNTL_10 10
-#define EG_PS_SHADER__SPI_PS_INPUT_CNTL_11 11
-#define EG_PS_SHADER__SPI_PS_INPUT_CNTL_12 12
-#define EG_PS_SHADER__SPI_PS_INPUT_CNTL_13 13
-#define EG_PS_SHADER__SPI_PS_INPUT_CNTL_14 14
-#define EG_PS_SHADER__SPI_PS_INPUT_CNTL_15 15
-#define EG_PS_SHADER__SPI_PS_INPUT_CNTL_16 16
-#define EG_PS_SHADER__SPI_PS_INPUT_CNTL_17 17
-#define EG_PS_SHADER__SPI_PS_INPUT_CNTL_18 18
-#define EG_PS_SHADER__SPI_PS_INPUT_CNTL_19 19
-#define EG_PS_SHADER__SPI_PS_INPUT_CNTL_20 20
-#define EG_PS_SHADER__SPI_PS_INPUT_CNTL_21 21
-#define EG_PS_SHADER__SPI_PS_INPUT_CNTL_22 22
-#define EG_PS_SHADER__SPI_PS_INPUT_CNTL_23 23
-#define EG_PS_SHADER__SPI_PS_INPUT_CNTL_24 24
-#define EG_PS_SHADER__SPI_PS_INPUT_CNTL_25 25
-#define EG_PS_SHADER__SPI_PS_INPUT_CNTL_26 26
-#define EG_PS_SHADER__SPI_PS_INPUT_CNTL_27 27
-#define EG_PS_SHADER__SPI_PS_INPUT_CNTL_28 28
-#define EG_PS_SHADER__SPI_PS_INPUT_CNTL_29 29
-#define EG_PS_SHADER__SPI_PS_INPUT_CNTL_30 30
-#define EG_PS_SHADER__SPI_PS_INPUT_CNTL_31 31
-#define EG_PS_SHADER__SPI_THREAD_GROUPING 32
-#define EG_PS_SHADER__SPI_PS_IN_CONTROL_0 33
-#define EG_PS_SHADER__SPI_PS_IN_CONTROL_1 34
-#define EG_PS_SHADER__SPI_INPUT_Z 35
-#define EG_PS_SHADER__SPI_BARYC_CNTL 36
-#define EG_PS_SHADER__SPI_PS_IN_CONTROL_2 37
-#define EG_PS_SHADER__SPI_COMPUTE_INPUT_CNTL 38
-#define EG_PS_SHADER__SQ_PGM_START_PS 39
-#define EG_PS_SHADER__SQ_PGM_RESOURCES_PS 40
-#define EG_PS_SHADER__SQ_PGM_RESOURCES_2_PS 41
-#define EG_PS_SHADER__SQ_PGM_EXPORTS_PS 42
-#define EG_PS_SHADER_SIZE 43
-#define EG_PS_SHADER_PM4 128
-
-/* EG_UCP */
-#define EG_UCP__PA_CL_UCP0_X 0
-#define EG_UCP__PA_CL_UCP0_Y 1
-#define EG_UCP__PA_CL_UCP0_Z 2
-#define EG_UCP__PA_CL_UCP0_W 3
-#define EG_UCP__PA_CL_UCP1_X 4
-#define EG_UCP__PA_CL_UCP1_Y 5
-#define EG_UCP__PA_CL_UCP1_Z 6
-#define EG_UCP__PA_CL_UCP1_W 7
-#define EG_UCP__PA_CL_UCP2_X 8
-#define EG_UCP__PA_CL_UCP2_Y 9
-#define EG_UCP__PA_CL_UCP2_Z 10
-#define EG_UCP__PA_CL_UCP2_W 11
-#define EG_UCP__PA_CL_UCP3_X 12
-#define EG_UCP__PA_CL_UCP3_Y 13
-#define EG_UCP__PA_CL_UCP3_Z 14
-#define EG_UCP__PA_CL_UCP3_W 15
-#define EG_UCP__PA_CL_UCP4_X 16
-#define EG_UCP__PA_CL_UCP4_Y 17
-#define EG_UCP__PA_CL_UCP4_Z 18
-#define EG_UCP__PA_CL_UCP4_W 19
-#define EG_UCP__PA_CL_UCP5_X 20
-#define EG_UCP__PA_CL_UCP5_Y 21
-#define EG_UCP__PA_CL_UCP5_Z 22
-#define EG_UCP__PA_CL_UCP5_W 23
-#define EG_UCP_SIZE 24
-#define EG_UCP_PM4 128
-
-/* EG_VS_CBUF */
-#define EG_VS_CBUF__ALU_CONST_BUFFER_SIZE_VS_0 0
-#define EG_VS_CBUF__ALU_CONST_CACHE_VS_0 1
-#define EG_VS_CBUF_SIZE 2
-#define EG_VS_CBUF_PM4 128
-
-/* EG_PS_CBUF */
-#define EG_PS_CBUF__ALU_CONST_BUFFER_SIZE_PS_0 0
-#define EG_PS_CBUF__ALU_CONST_CACHE_PS_0 1
-#define EG_PS_CBUF_SIZE 2
-#define EG_PS_CBUF_PM4 128
-
-/* EG_PS_RESOURCE */
-#define EG_PS_RESOURCE__RESOURCE0_WORD0 0
-#define EG_PS_RESOURCE__RESOURCE0_WORD1 1
-#define EG_PS_RESOURCE__RESOURCE0_WORD2 2
-#define EG_PS_RESOURCE__RESOURCE0_WORD3 3
-#define EG_PS_RESOURCE__RESOURCE0_WORD4 4
-#define EG_PS_RESOURCE__RESOURCE0_WORD5 5
-#define EG_PS_RESOURCE__RESOURCE0_WORD6 6
-#define EG_PS_RESOURCE__RESOURCE0_WORD7 7
-#define EG_PS_RESOURCE_SIZE 8
-#define EG_PS_RESOURCE_PM4 128
-
-/* EG_VS_RESOURCE */
-#define EG_VS_RESOURCE__RESOURCE160_WORD0 0
-#define EG_VS_RESOURCE__RESOURCE160_WORD1 1
-#define EG_VS_RESOURCE__RESOURCE160_WORD2 2
-#define EG_VS_RESOURCE__RESOURCE160_WORD3 3
-#define EG_VS_RESOURCE__RESOURCE160_WORD4 4
-#define EG_VS_RESOURCE__RESOURCE160_WORD5 5
-#define EG_VS_RESOURCE__RESOURCE160_WORD6 6
-#define EG_VS_RESOURCE__RESOURCE160_WORD7 7
-#define EG_VS_RESOURCE_SIZE 8
-#define EG_VS_RESOURCE_PM4 128
-
-/* EG_FS_RESOURCE */
-#define EG_FS_RESOURCE__RESOURCE320_WORD0 0
-#define EG_FS_RESOURCE__RESOURCE320_WORD1 1
-#define EG_FS_RESOURCE__RESOURCE320_WORD2 2
-#define EG_FS_RESOURCE__RESOURCE320_WORD3 3
-#define EG_FS_RESOURCE__RESOURCE320_WORD4 4
-#define EG_FS_RESOURCE__RESOURCE320_WORD5 5
-#define EG_FS_RESOURCE__RESOURCE320_WORD6 6
-#define EG_FS_RESOURCE__RESOURCE320_WORD7 7
-#define EG_FS_RESOURCE_SIZE 8
-#define EG_FS_RESOURCE_PM4 128
-
-/* EG_GS_RESOURCE */
-#define EG_GS_RESOURCE__RESOURCE336_WORD0 0
-#define EG_GS_RESOURCE__RESOURCE336_WORD1 1
-#define EG_GS_RESOURCE__RESOURCE336_WORD2 2
-#define EG_GS_RESOURCE__RESOURCE336_WORD3 3
-#define EG_GS_RESOURCE__RESOURCE336_WORD4 4
-#define EG_GS_RESOURCE__RESOURCE336_WORD5 5
-#define EG_GS_RESOURCE__RESOURCE336_WORD6 6
-#define EG_GS_RESOURCE__RESOURCE336_WORD7 7
-#define EG_GS_RESOURCE_SIZE 8
-#define EG_GS_RESOURCE_PM4 128
-
-/* EG_PS_SAMPLER */
-#define EG_PS_SAMPLER__SQ_TEX_SAMPLER_WORD0_0 0
-#define EG_PS_SAMPLER__SQ_TEX_SAMPLER_WORD1_0 1
-#define EG_PS_SAMPLER__SQ_TEX_SAMPLER_WORD2_0 2
-#define EG_PS_SAMPLER_SIZE 3
-#define EG_PS_SAMPLER_PM4 128
-
-/* EG_VS_SAMPLER */
-#define EG_VS_SAMPLER__SQ_TEX_SAMPLER_WORD0_18 0
-#define EG_VS_SAMPLER__SQ_TEX_SAMPLER_WORD1_18 1
-#define EG_VS_SAMPLER__SQ_TEX_SAMPLER_WORD2_18 2
-#define EG_VS_SAMPLER_SIZE 3
-#define EG_VS_SAMPLER_PM4 128
-
-/* EG_GS_SAMPLER */
-#define EG_GS_SAMPLER__SQ_TEX_SAMPLER_WORD0_36 0
-#define EG_GS_SAMPLER__SQ_TEX_SAMPLER_WORD1_36 1
-#define EG_GS_SAMPLER__SQ_TEX_SAMPLER_WORD2_36 2
-#define EG_GS_SAMPLER_SIZE 3
-#define EG_GS_SAMPLER_PM4 128
-
-/* EG_PS_SAMPLER_BORDER */
-#define EG_PS_SAMPLER_BORDER__TD_PS_SAMPLER0_BORDER_INDEX 0
-#define EG_PS_SAMPLER_BORDER__TD_PS_SAMPLER0_BORDER_RED 1
-#define EG_PS_SAMPLER_BORDER__TD_PS_SAMPLER0_BORDER_GREEN 2
-#define EG_PS_SAMPLER_BORDER__TD_PS_SAMPLER0_BORDER_BLUE 3
-#define EG_PS_SAMPLER_BORDER__TD_PS_SAMPLER0_BORDER_ALPHA 4
-#define EG_PS_SAMPLER_BORDER_SIZE 5
-#define EG_PS_SAMPLER_BORDER_PM4 128
-
-/* EG_VS_SAMPLER_BORDER */
-#define EG_VS_SAMPLER_BORDER__TD_VS_SAMPLER0_BORDER_INDEX 0
-#define EG_VS_SAMPLER_BORDER__TD_VS_SAMPLER0_BORDER_RED 1
-#define EG_VS_SAMPLER_BORDER__TD_VS_SAMPLER0_BORDER_GREEN 2
-#define EG_VS_SAMPLER_BORDER__TD_VS_SAMPLER0_BORDER_BLUE 3
-#define EG_VS_SAMPLER_BORDER__TD_VS_SAMPLER0_BORDER_ALPHA 4
-#define EG_VS_SAMPLER_BORDER_SIZE 5
-#define EG_VS_SAMPLER_BORDER_PM4 128
-
-/* EG_GS_SAMPLER_BORDER */
-#define EG_GS_SAMPLER_BORDER__TD_GS_SAMPLER0_BORDER_INDEX 0
-#define EG_GS_SAMPLER_BORDER__TD_GS_SAMPLER0_BORDER_RED 1
-#define EG_GS_SAMPLER_BORDER__TD_GS_SAMPLER0_BORDER_GREEN 2
-#define EG_GS_SAMPLER_BORDER__TD_GS_SAMPLER0_BORDER_BLUE 3
-#define EG_GS_SAMPLER_BORDER__TD_GS_SAMPLER0_BORDER_ALPHA 4
-#define EG_GS_SAMPLER_BORDER_SIZE 5
-#define EG_GS_SAMPLER_BORDER_PM4 128
-
-/* EG_CB */
-#define EG_CB__CB_COLOR0_BASE 0
-#define EG_CB__CB_COLOR0_PITCH 1
-#define EG_CB__CB_COLOR0_SLICE 2
-#define EG_CB__CB_COLOR0_VIEW 3
-#define EG_CB__CB_COLOR0_INFO 4
-#define EG_CB__CB_COLOR0_ATTRIB 5
-#define EG_CB__CB_COLOR0_DIM 6
-#define EG_CB_SIZE 7
-#define EG_CB_PM4 128
-
-/* EG_DB */
-#define EG_DB__DB_HTILE_DATA_BASE 0
-#define EG_DB__DB_Z_INFO 1
-#define EG_DB__DB_STENCIL_INFO 2
-#define EG_DB__DB_DEPTH_SIZE 3
-#define EG_DB__DB_DEPTH_SLICE 4
-#define EG_DB__DB_DEPTH_VIEW 5
-#define EG_DB__DB_HTILE_SURFACE 6
-#define EG_DB__DB_Z_READ_BASE 7
-#define EG_DB__DB_STENCIL_READ_BASE 8
-#define EG_DB__DB_Z_WRITE_BASE 9
-#define EG_DB__DB_STENCIL_WRITE_BASE 10
-#define EG_DB_SIZE 11
-#define EG_DB_PM4 128
-
-/* EG_VGT */
-#define EG_VGT__VGT_PRIMITIVE_TYPE 0
-#define EG_VGT__VGT_MAX_VTX_INDX 1
-#define EG_VGT__VGT_MIN_VTX_INDX 2
-#define EG_VGT__VGT_INDX_OFFSET 3
-#define EG_VGT__VGT_DMA_INDEX_TYPE 4
-#define EG_VGT__VGT_PRIMITIVEID_EN 5
-#define EG_VGT__VGT_DMA_NUM_INSTANCES 6
-#define EG_VGT__VGT_MULTI_PRIM_IB_RESET_EN 7
-#define EG_VGT__VGT_INSTANCE_STEP_RATE_0 8
-#define EG_VGT__VGT_INSTANCE_STEP_RATE_1 9
-#define EG_VGT_SIZE 10
-#define EG_VGT_PM4 128
-
-/* EG_DRAW */
-#define EG_DRAW__VGT_NUM_INDICES 0
-#define EG_DRAW__VGT_DMA_BASE_HI 1
-#define EG_DRAW__VGT_DMA_BASE 2
-#define EG_DRAW__VGT_DRAW_INITIATOR 3
-#define EG_DRAW_SIZE 4
-#define EG_DRAW_PM4 128
-
-/* EG_VGT_EVENT */
-#define EG_VGT_EVENT__VGT_EVENT_INITIATOR 0
-#define EG_VGT_EVENT_SIZE 1
-#define EG_VGT_EVENT_PM4 128
-
-/* EG_CB_FLUSH */
-#define EG_CB_FLUSH_SIZE 0
-#define EG_CB_FLUSH_PM4 128
-
-/* EG_DB_FLUSH */
-#define EG_DB_FLUSH_SIZE 0
-#define EG_DB_FLUSH_PM4 128
-
diff --git a/src/gallium/drivers/r600/evergreen_state.c b/src/gallium/drivers/r600/evergreen_state.c
index 9e1a5e1f988..77432661b64 100644
--- a/src/gallium/drivers/r600/evergreen_state.c
+++ b/src/gallium/drivers/r600/evergreen_state.c
@@ -103,7 +103,7 @@ static void *evergreen_create_blend_state(struct pipe_context *ctx,
}
blend->cb_target_mask = target_mask;
r600_pipe_state_add_reg(rstate, R_028808_CB_COLOR_CONTROL,
- color_control, 0xFFFFFFFF, NULL);
+ color_control, 0xFFFFFFFD, NULL);
r600_pipe_state_add_reg(rstate, R_028C3C_PA_SC_AA_MASK, 0xFFFFFFFF, 0xFFFFFFFF, NULL);
for (int i = 0; i < 8; i++) {
@@ -150,10 +150,6 @@ static void *evergreen_create_dsa_state(struct pipe_context *ctx,
rstate->id = R600_PIPE_STATE_DSA;
/* depth TODO some of those db_shader_control field depend on shader adjust mask & add it to shader */
- /* db_shader_control is 0xFFFFFFBE as Z_EXPORT_ENABLE (bit 0) will be
- * set by fragment shader if it export Z and KILL_ENABLE (bit 6) will
- * be set if shader use texkill instruction
- */
db_shader_control = S_02880C_Z_ORDER(V_02880C_EARLY_Z_THEN_LATE_Z);
stencil_ref_mask = 0;
stencil_ref_mask_bf = 0;
@@ -210,7 +206,10 @@ static void *evergreen_create_dsa_state(struct pipe_context *ctx,
r600_pipe_state_add_reg(rstate, R_028438_SX_ALPHA_REF, alpha_ref, 0xFFFFFFFF, NULL);
r600_pipe_state_add_reg(rstate, R_0286DC_SPI_FOG_CNTL, 0x00000000, 0xFFFFFFFF, NULL);
r600_pipe_state_add_reg(rstate, R_028800_DB_DEPTH_CONTROL, db_depth_control, 0xFFFFFFFF, NULL);
- r600_pipe_state_add_reg(rstate, R_02880C_DB_SHADER_CONTROL, db_shader_control, 0xFFFFFFBE, NULL);
+ /* The DB_SHADER_CONTROL mask is 0xFFFFFFBC since Z_EXPORT_ENABLE,
+ * STENCIL_EXPORT_ENABLE and KILL_ENABLE are controlled by
+ * evergreen_pipe_shader_ps().*/
+ r600_pipe_state_add_reg(rstate, R_02880C_DB_SHADER_CONTROL, db_shader_control, 0xFFFFFFBC, NULL);
r600_pipe_state_add_reg(rstate, R_028000_DB_RENDER_CONTROL, db_render_control, 0xFFFFFFFF, NULL);
r600_pipe_state_add_reg(rstate, R_02800C_DB_RENDER_OVERRIDE, db_render_override, 0xFFFFFFFF, NULL);
r600_pipe_state_add_reg(rstate, R_028AC0_DB_SRESULTS_COMPARE_STATE0, 0x0, 0xFFFFFFFF, NULL);
@@ -305,11 +304,16 @@ static void *evergreen_create_sampler_state(struct pipe_context *ctx,
{
struct r600_pipe_state *rstate = CALLOC_STRUCT(r600_pipe_state);
union util_color uc;
+ uint32_t coord_trunc = 0;
if (rstate == NULL) {
return NULL;
}
+ if ((state->mag_img_filter == PIPE_TEX_FILTER_NEAREST) ||
+ (state->min_img_filter == PIPE_TEX_FILTER_NEAREST))
+ coord_trunc = 1;
+
rstate->id = R600_PIPE_STATE_SAMPLER;
util_pack_color(state->border_color, PIPE_FORMAT_B8G8R8A8_UNORM, &uc);
r600_pipe_state_add_reg(rstate, R_03C000_SQ_TEX_SAMPLER_WORD0_0,
@@ -328,6 +332,7 @@ static void *evergreen_create_sampler_state(struct pipe_context *ctx,
0xFFFFFFFF, NULL);
r600_pipe_state_add_reg(rstate, R_03C008_SQ_TEX_SAMPLER_WORD2_0,
S_03C008_LOD_BIAS(S_FIXED(CLAMP(state->lod_bias, -16, 16), 8)) |
+ S_03C008_MC_COORD_TRUNCATE(coord_trunc) |
S_03C008_TYPE(1),
0xFFFFFFFF, NULL);
@@ -351,7 +356,7 @@ static struct pipe_sampler_view *evergreen_create_sampler_view(struct pipe_conte
struct r600_resource *rbuffer;
unsigned format;
uint32_t word4 = 0, yuv_format = 0, pitch = 0;
- unsigned char swizzle[4];
+ unsigned char swizzle[4], array_mode = 0, tile_type = 0;
struct r600_bo *bo[2];
if (resource == NULL)
@@ -370,7 +375,7 @@ static struct pipe_sampler_view *evergreen_create_sampler_view(struct pipe_conte
swizzle[1] = state->swizzle_g;
swizzle[2] = state->swizzle_b;
swizzle[3] = state->swizzle_a;
- format = r600_translate_texformat(state->format,
+ format = r600_translate_texformat(ctx->screen, state->format,
swizzle,
&word4, &yuv_format);
if (format == ~0) {
@@ -380,36 +385,43 @@ static struct pipe_sampler_view *evergreen_create_sampler_view(struct pipe_conte
if (desc == NULL) {
R600_ERR("unknow format %d\n", state->format);
}
- tmp = (struct r600_resource_texture*)texture;
+ tmp = (struct r600_resource_texture *)texture;
+ if (tmp->depth && !tmp->is_flushing_texture) {
+ r600_texture_depth_flush(ctx, texture, TRUE);
+ tmp = tmp->flushed_depth_texture;
+ }
+
+ if (tmp->force_int_type) {
+ word4 &= C_030010_NUM_FORMAT_ALL;
+ word4 |= S_030010_NUM_FORMAT_ALL(V_030010_SQ_NUM_FORMAT_INT);
+ }
+
rbuffer = &tmp->resource;
bo[0] = rbuffer->bo;
bo[1] = rbuffer->bo;
- /* FIXME depth texture decompression */
- if (tmp->depth) {
- r600_texture_depth_flush(ctx, texture);
- tmp = (struct r600_resource_texture*)texture;
- rbuffer = &tmp->flushed_depth_texture->resource;
- bo[0] = rbuffer->bo;
- bo[1] = rbuffer->bo;
- }
- pitch = align(tmp->pitch_in_pixels[0], 8);
+
+ pitch = align(tmp->pitch_in_blocks[0] * util_format_get_blockwidth(state->format), 8);
+ array_mode = tmp->array_mode[0];
+ tile_type = tmp->tile_type;
/* FIXME properly handle first level != 0 */
r600_pipe_state_add_reg(rstate, R_030000_RESOURCE0_WORD0,
S_030000_DIM(r600_tex_dim(texture->target)) |
S_030000_PITCH((pitch / 8) - 1) |
+ S_030000_NON_DISP_TILING_ORDER(tile_type) |
S_030000_TEX_WIDTH(texture->width0 - 1), 0xFFFFFFFF, NULL);
r600_pipe_state_add_reg(rstate, R_030004_RESOURCE0_WORD1,
S_030004_TEX_HEIGHT(texture->height0 - 1) |
- S_030004_TEX_DEPTH(texture->depth0 - 1),
+ S_030004_TEX_DEPTH(texture->depth0 - 1) |
+ S_030004_ARRAY_MODE(array_mode),
0xFFFFFFFF, NULL);
r600_pipe_state_add_reg(rstate, R_030008_RESOURCE0_WORD2,
(tmp->offset[0] + r600_bo_offset(bo[0])) >> 8, 0xFFFFFFFF, bo[0]);
r600_pipe_state_add_reg(rstate, R_03000C_RESOURCE0_WORD3,
(tmp->offset[1] + r600_bo_offset(bo[1])) >> 8, 0xFFFFFFFF, bo[1]);
r600_pipe_state_add_reg(rstate, R_030010_RESOURCE0_WORD4,
- word4 | S_030010_NUM_FORMAT_ALL(V_030010_SQ_NUM_FORMAT_NORM) |
- S_030010_SRF_MODE_ALL(V_030010_SFR_MODE_NO_ZERO) |
+ word4 |
+ S_030010_SRF_MODE_ALL(V_030010_SRF_MODE_NO_ZERO) |
S_030010_BASE_LEVEL(state->u.tex.first_level), 0xFFFFFFFF, NULL);
r600_pipe_state_add_reg(rstate, R_030014_RESOURCE0_WORD5,
S_030014_LAST_LEVEL(state->u.tex.last_level) |
@@ -431,7 +443,8 @@ static void evergreen_set_vs_sampler_view(struct pipe_context *ctx, unsigned cou
for (int i = 0; i < count; i++) {
if (resource[i]) {
- evergreen_context_pipe_state_set_vs_resource(&rctx->ctx, &resource[i]->state, i);
+ evergreen_context_pipe_state_set_vs_resource(&rctx->ctx, &resource[i]->state,
+ i + R600_MAX_CONST_BUFFERS);
}
}
}
@@ -446,9 +459,11 @@ static void evergreen_set_ps_sampler_view(struct pipe_context *ctx, unsigned cou
for (i = 0; i < count; i++) {
if (&rctx->ps_samplers.views[i]->base != views[i]) {
if (resource[i])
- evergreen_context_pipe_state_set_ps_resource(&rctx->ctx, &resource[i]->state, i);
+ evergreen_context_pipe_state_set_ps_resource(&rctx->ctx, &resource[i]->state,
+ i + R600_MAX_CONST_BUFFERS);
else
- evergreen_context_pipe_state_set_ps_resource(&rctx->ctx, NULL, i);
+ evergreen_context_pipe_state_set_ps_resource(&rctx->ctx, NULL,
+ i + R600_MAX_CONST_BUFFERS);
pipe_sampler_view_reference(
(struct pipe_sampler_view **)&rctx->ps_samplers.views[i],
@@ -457,7 +472,8 @@ static void evergreen_set_ps_sampler_view(struct pipe_context *ctx, unsigned cou
}
for (i = count; i < NUM_TEX_UNITS; i++) {
if (rctx->ps_samplers.views[i]) {
- evergreen_context_pipe_state_set_ps_resource(&rctx->ctx, NULL, i);
+ evergreen_context_pipe_state_set_ps_resource(&rctx->ctx, NULL,
+ i + R600_MAX_CONST_BUFFERS);
pipe_sampler_view_reference((struct pipe_sampler_view **)&rctx->ps_samplers.views[i], NULL);
}
}
@@ -638,11 +654,19 @@ static void evergreen_cb(struct r600_pipe_context *rctx, struct r600_pipe_state
unsigned color_info;
unsigned format, swap, ntype;
unsigned offset;
+ unsigned tile_type;
const struct util_format_description *desc;
struct r600_bo *bo[3];
+ int i;
surf = (struct r600_surface *)state->cbufs[cb];
rtex = (struct r600_resource_texture*)state->cbufs[cb]->texture;
+
+ if (rtex->depth && !rtex->is_flushing_texture) {
+ r600_texture_depth_flush(&rctx->context, state->cbufs[cb]->texture, TRUE);
+ rtex = rtex->flushed_depth_texture;
+ }
+
rbuffer = &rtex->resource;
bo[0] = rbuffer->bo;
bo[1] = rbuffer->bo;
@@ -651,21 +675,43 @@ static void evergreen_cb(struct r600_pipe_context *rctx, struct r600_pipe_state
/* XXX quite sure for dx10+ hw don't need any offset hacks */
offset = r600_texture_get_offset((struct r600_resource_texture *)state->cbufs[cb]->texture,
level, state->cbufs[cb]->u.tex.first_layer);
- pitch = rtex->pitch_in_pixels[level] / 8 - 1;
- slice = rtex->pitch_in_pixels[level] * surf->aligned_height / 64 - 1;
+ pitch = rtex->pitch_in_blocks[level] / 8 - 1;
+ slice = rtex->pitch_in_blocks[level] * surf->aligned_height / 64 - 1;
ntype = 0;
- desc = util_format_description(rtex->resource.base.b.format);
+ desc = util_format_description(surf->base.format);
if (desc->colorspace == UTIL_FORMAT_COLORSPACE_SRGB)
ntype = V_028C70_NUMBER_SRGB;
- format = r600_translate_colorformat(rtex->resource.base.b.format);
- swap = r600_translate_colorswap(rtex->resource.base.b.format);
+ format = r600_translate_colorformat(surf->base.format);
+ swap = r600_translate_colorswap(surf->base.format);
+
+ /* disable when gallium grows int textures */
+ if ((format == FMT_32_32_32_32 || format == FMT_16_16_16_16) && rtex->force_int_type)
+ ntype = 4;
+
color_info = S_028C70_FORMAT(format) |
S_028C70_COMP_SWAP(swap) |
+ S_028C70_ARRAY_MODE(rtex->array_mode[level]) |
S_028C70_BLEND_CLAMP(1) |
S_028C70_NUMBER_TYPE(ntype);
- if (desc->colorspace != UTIL_FORMAT_COLORSPACE_ZS)
- color_info |= S_028C70_SOURCE_FORMAT(1);
+
+ for (i = 0; i < 4; i++) {
+ if (desc->channel[i].type != UTIL_FORMAT_TYPE_VOID) {
+ break;
+ }
+ }
+
+ /* we can only set the export size if any thing is snorm/unorm component is > 11 bits,
+ if we aren't a float, sint or uint */
+ if (desc->colorspace != UTIL_FORMAT_COLORSPACE_ZS &&
+ desc->channel[i].size < 12 && desc->channel[i].type != UTIL_FORMAT_TYPE_FLOAT &&
+ ntype != 4 && ntype != 5)
+ color_info |= S_028C70_SOURCE_FORMAT(V_028C70_EXPORT_4C_16BPC);
+
+ if (rtex->array_mode[level] > V_028C70_ARRAY_LINEAR_ALIGNED) {
+ tile_type = rtex->tile_type;
+ } else /* workaround for linear buffers */
+ tile_type = 1;
/* FIXME handle enabling of CB beyond BASE8 which has different offset */
r600_pipe_state_add_reg(rstate,
@@ -690,7 +736,7 @@ static void evergreen_cb(struct r600_pipe_context *rctx, struct r600_pipe_state
0x00000000, 0xFFFFFFFF, NULL);
r600_pipe_state_add_reg(rstate,
R_028C74_CB_COLOR0_ATTRIB + cb * 0x3C,
- S_028C74_NON_DISP_TILING_ORDER(1),
+ S_028C74_NON_DISP_TILING_ORDER(tile_type),
0xFFFFFFFF, bo[0]);
}
@@ -711,17 +757,14 @@ static void evergreen_db(struct r600_pipe_context *rctx, struct r600_pipe_state
surf = (struct r600_surface *)state->zsbuf;
rtex = (struct r600_resource_texture*)state->zsbuf->texture;
- rtex->tiled = 1;
- rtex->array_mode[level] = 2;
- rtex->tile_type = 1;
- rtex->depth = 1;
+
rbuffer = &rtex->resource;
/* XXX quite sure for dx10+ hw don't need any offset hacks */
offset = r600_texture_get_offset((struct r600_resource_texture *)state->zsbuf->texture,
level, state->zsbuf->u.tex.first_layer);
- pitch = rtex->pitch_in_pixels[level] / 8 - 1;
- slice = rtex->pitch_in_pixels[level] * surf->aligned_height / 64 - 1;
+ pitch = rtex->pitch_in_blocks[level] / 8 - 1;
+ slice = rtex->pitch_in_blocks[level] * surf->aligned_height / 64 - 1;
format = r600_translate_dbformat(state->zsbuf->texture->format);
stencil_format = r600_translate_stencilformat(state->zsbuf->texture->format);
@@ -770,8 +813,6 @@ static void evergreen_set_framebuffer_state(struct pipe_context *ctx,
util_copy_framebuffer_state(&rctx->framebuffer, state);
- rctx->pframebuffer = &rctx->framebuffer;
-
/* build states */
for (int i = 0; i < state->nr_cbufs; i++) {
evergreen_cb(rctx, rstate, state, i);
@@ -839,48 +880,6 @@ static void evergreen_set_framebuffer_state(struct pipe_context *ctx,
}
}
-static void evergreen_set_constant_buffer(struct pipe_context *ctx, uint shader, uint index,
- struct pipe_resource *buffer)
-{
- struct r600_pipe_context *rctx = (struct r600_pipe_context *)ctx;
- struct r600_resource *rbuffer = (struct r600_resource*)buffer;
-
- /* Note that the state tracker can unbind constant buffers by
- * passing NULL here.
- */
- if (buffer == NULL) {
- return;
- }
-
- switch (shader) {
- case PIPE_SHADER_VERTEX:
- rctx->vs_const_buffer.nregs = 0;
- r600_pipe_state_add_reg(&rctx->vs_const_buffer,
- R_028180_ALU_CONST_BUFFER_SIZE_VS_0,
- ALIGN_DIVUP(buffer->width0 >> 4, 16),
- 0xFFFFFFFF, NULL);
- r600_pipe_state_add_reg(&rctx->vs_const_buffer,
- R_028980_ALU_CONST_CACHE_VS_0,
- (r600_bo_offset(rbuffer->bo)) >> 8, 0xFFFFFFFF, rbuffer->bo);
- r600_context_pipe_state_set(&rctx->ctx, &rctx->vs_const_buffer);
- break;
- case PIPE_SHADER_FRAGMENT:
- rctx->ps_const_buffer.nregs = 0;
- r600_pipe_state_add_reg(&rctx->ps_const_buffer,
- R_028140_ALU_CONST_BUFFER_SIZE_PS_0,
- ALIGN_DIVUP(buffer->width0 >> 4, 16),
- 0xFFFFFFFF, NULL);
- r600_pipe_state_add_reg(&rctx->ps_const_buffer,
- R_028940_ALU_CONST_CACHE_PS_0,
- (r600_bo_offset(rbuffer->bo)) >> 8, 0xFFFFFFFF, rbuffer->bo);
- r600_context_pipe_state_set(&rctx->ctx, &rctx->ps_const_buffer);
- break;
- default:
- R600_ERR("unsupported %d\n", shader);
- return;
- }
-}
-
void evergreen_init_state_functions(struct r600_pipe_context *rctx)
{
rctx->context.create_blend_state = evergreen_create_blend_state;
@@ -908,7 +907,7 @@ void evergreen_init_state_functions(struct r600_pipe_context *rctx)
rctx->context.delete_vs_state = r600_delete_vs_shader;
rctx->context.set_blend_color = evergreen_set_blend_color;
rctx->context.set_clip_state = evergreen_set_clip_state;
- rctx->context.set_constant_buffer = evergreen_set_constant_buffer;
+ rctx->context.set_constant_buffer = r600_set_constant_buffer;
rctx->context.set_fragment_sampler_views = evergreen_set_ps_sampler_view;
rctx->context.set_framebuffer_state = evergreen_set_framebuffer_state;
rctx->context.set_polygon_stipple = evergreen_set_polygon_stipple;
@@ -920,6 +919,7 @@ void evergreen_init_state_functions(struct r600_pipe_context *rctx)
rctx->context.set_vertex_sampler_views = evergreen_set_vs_sampler_view;
rctx->context.set_viewport_state = evergreen_set_viewport_state;
rctx->context.sampler_view_destroy = r600_sampler_view_destroy;
+ rctx->context.redefine_user_buffer = u_default_redefine_user_buffer;
}
void evergreen_init_config(struct r600_pipe_context *rctx)
@@ -1069,12 +1069,76 @@ void evergreen_init_config(struct r600_pipe_context *rctx)
num_hs_stack_entries = 42;
num_ls_stack_entries = 42;
break;
+ case CHIP_BARTS:
+ num_ps_gprs = 93;
+ num_vs_gprs = 46;
+ num_temp_gprs = 4;
+ num_gs_gprs = 31;
+ num_es_gprs = 31;
+ num_hs_gprs = 23;
+ num_ls_gprs = 23;
+ num_ps_threads = 128;
+ num_vs_threads = 20;
+ num_gs_threads = 20;
+ num_es_threads = 20;
+ num_hs_threads = 20;
+ num_ls_threads = 20;
+ num_ps_stack_entries = 85;
+ num_vs_stack_entries = 85;
+ num_gs_stack_entries = 85;
+ num_es_stack_entries = 85;
+ num_hs_stack_entries = 85;
+ num_ls_stack_entries = 85;
+ break;
+ case CHIP_TURKS:
+ num_ps_gprs = 93;
+ num_vs_gprs = 46;
+ num_temp_gprs = 4;
+ num_gs_gprs = 31;
+ num_es_gprs = 31;
+ num_hs_gprs = 23;
+ num_ls_gprs = 23;
+ num_ps_threads = 128;
+ num_vs_threads = 20;
+ num_gs_threads = 20;
+ num_es_threads = 20;
+ num_hs_threads = 20;
+ num_ls_threads = 20;
+ num_ps_stack_entries = 42;
+ num_vs_stack_entries = 42;
+ num_gs_stack_entries = 42;
+ num_es_stack_entries = 42;
+ num_hs_stack_entries = 42;
+ num_ls_stack_entries = 42;
+ break;
+ case CHIP_CAICOS:
+ num_ps_gprs = 93;
+ num_vs_gprs = 46;
+ num_temp_gprs = 4;
+ num_gs_gprs = 31;
+ num_es_gprs = 31;
+ num_hs_gprs = 23;
+ num_ls_gprs = 23;
+ num_ps_threads = 128;
+ num_vs_threads = 10;
+ num_gs_threads = 10;
+ num_es_threads = 10;
+ num_hs_threads = 10;
+ num_ls_threads = 10;
+ num_ps_stack_entries = 42;
+ num_vs_stack_entries = 42;
+ num_gs_stack_entries = 42;
+ num_es_stack_entries = 42;
+ num_hs_stack_entries = 42;
+ num_ls_stack_entries = 42;
+ break;
}
tmp = 0x00000000;
switch (family) {
case CHIP_CEDAR:
case CHIP_PALM:
+ case CHIP_CAICOS:
break;
default:
tmp |= S_008C00_VC_ENABLE(1);
@@ -1260,226 +1324,11 @@ void evergreen_polygon_offset_update(struct r600_pipe_context *rctx)
}
}
-static void evergreen_spi_update(struct r600_pipe_context *rctx)
-{
- struct r600_pipe_shader *shader = rctx->ps_shader;
- struct r600_pipe_state rstate;
- struct r600_shader *rshader = &shader->shader;
- unsigned i, tmp;
-
- rstate.nregs = 0;
- for (i = 0; i < rshader->ninput; i++) {
- tmp = S_028644_SEMANTIC(r600_find_vs_semantic_index(&rctx->vs_shader->shader, rshader, i));
- if (rshader->input[i].name == TGSI_SEMANTIC_COLOR ||
- rshader->input[i].name == TGSI_SEMANTIC_BCOLOR ||
- rshader->input[i].name == TGSI_SEMANTIC_POSITION) {
- tmp |= S_028644_FLAT_SHADE(rctx->flatshade);
- }
- if (rshader->input[i].name == TGSI_SEMANTIC_GENERIC &&
- rctx->sprite_coord_enable & (1 << rshader->input[i].sid)) {
- tmp |= S_028644_PT_SPRITE_TEX(1);
- }
- r600_pipe_state_add_reg(&rstate, R_028644_SPI_PS_INPUT_CNTL_0 + i * 4, tmp, 0xFFFFFFFF, NULL);
- }
- r600_context_pipe_state_set(&rctx->ctx, &rstate);
-}
-
-void evergreen_vertex_buffer_update(struct r600_pipe_context *rctx)
-{
- struct r600_pipe_state *rstate;
- struct r600_resource *rbuffer;
- struct pipe_vertex_buffer *vertex_buffer;
- unsigned i, offset;
-
- /* we don't update until we know vertex elements */
- if (rctx->vertex_elements == NULL || !rctx->nvertex_buffer)
- return;
-
- /* delete previous translated vertex elements */
- if (rctx->tran.new_velems) {
- r600_end_vertex_translate(rctx);
- }
-
- if (rctx->vertex_elements->incompatible_layout) {
- /* translate rebind new vertex elements so
- * return once translated
- */
- r600_begin_vertex_translate(rctx);
- return;
- }
-
- if (rctx->any_user_vbs) {
- r600_upload_user_buffers(rctx);
- rctx->any_user_vbs = FALSE;
- }
-
- if (rctx->vertex_elements->vbuffer_need_offset) {
- /* one resource per vertex elements */
- rctx->nvs_resource = rctx->vertex_elements->count;
- } else {
- /* bind vertex buffer once */
- rctx->nvs_resource = rctx->nvertex_buffer;
- }
-
- for (i = 0 ; i < rctx->nvs_resource; i++) {
- rstate = &rctx->vs_resource[i];
- rstate->id = R600_PIPE_STATE_RESOURCE;
- rstate->nregs = 0;
-
- if (rctx->vertex_elements->vbuffer_need_offset) {
- /* one resource per vertex elements */
- unsigned vbuffer_index;
- vbuffer_index = rctx->vertex_elements->elements[i].vertex_buffer_index;
- vertex_buffer = &rctx->vertex_buffer[vbuffer_index];
- rbuffer = (struct r600_resource*)vertex_buffer->buffer;
- offset = rctx->vertex_elements->vbuffer_offset[i] +
- vertex_buffer->buffer_offset +
- r600_bo_offset(rbuffer->bo);
- } else {
- /* bind vertex buffer once */
- vertex_buffer = &rctx->vertex_buffer[i];
- rbuffer = (struct r600_resource*)vertex_buffer->buffer;
- offset = vertex_buffer->buffer_offset +
- r600_bo_offset(rbuffer->bo);
- }
-
- r600_pipe_state_add_reg(rstate, R_030000_RESOURCE0_WORD0,
- offset, 0xFFFFFFFF, rbuffer->bo);
- r600_pipe_state_add_reg(rstate, R_030004_RESOURCE0_WORD1,
- rbuffer->size - offset - 1, 0xFFFFFFFF, NULL);
- r600_pipe_state_add_reg(rstate, R_030008_RESOURCE0_WORD2,
- S_030008_STRIDE(vertex_buffer->stride),
- 0xFFFFFFFF, NULL);
- r600_pipe_state_add_reg(rstate, R_03000C_RESOURCE0_WORD3,
- S_03000C_DST_SEL_X(V_03000C_SQ_SEL_X) |
- S_03000C_DST_SEL_Y(V_03000C_SQ_SEL_Y) |
- S_03000C_DST_SEL_Z(V_03000C_SQ_SEL_Z) |
- S_03000C_DST_SEL_W(V_03000C_SQ_SEL_W),
- 0xFFFFFFFF, NULL);
- r600_pipe_state_add_reg(rstate, R_030010_RESOURCE0_WORD4,
- 0x00000000, 0xFFFFFFFF, NULL);
- r600_pipe_state_add_reg(rstate, R_030014_RESOURCE0_WORD5,
- 0x00000000, 0xFFFFFFFF, NULL);
- r600_pipe_state_add_reg(rstate, R_030018_RESOURCE0_WORD6,
- 0x00000000, 0xFFFFFFFF, NULL);
- r600_pipe_state_add_reg(rstate, R_03001C_RESOURCE0_WORD7,
- 0xC0000000, 0xFFFFFFFF, NULL);
- evergreen_fs_resource_set(&rctx->ctx, rstate, i);
- }
-}
-
-int r600_conv_pipe_prim(unsigned pprim, unsigned *prim);
-void evergreen_draw(struct pipe_context *ctx, const struct pipe_draw_info *info)
-{
- struct r600_pipe_context *rctx = (struct r600_pipe_context *)ctx;
- struct r600_resource *rbuffer;
- u32 vgt_dma_index_type, vgt_draw_initiator, mask;
- struct r600_draw rdraw;
- struct r600_pipe_state vgt;
- struct r600_drawl draw;
- unsigned prim;
-
- memset(&draw, 0, sizeof(struct r600_drawl));
- draw.ctx = ctx;
- draw.mode = info->mode;
- draw.start = info->start;
- draw.count = info->count;
- if (info->indexed && rctx->index_buffer.buffer) {
- draw.start += rctx->index_buffer.offset / rctx->index_buffer.index_size;
- draw.min_index = info->min_index;
- draw.max_index = info->max_index;
- draw.index_bias = info->index_bias;
-
- r600_translate_index_buffer(rctx, &rctx->index_buffer.buffer,
- &rctx->index_buffer.index_size,
- &draw.start,
- info->count);
-
- draw.index_size = rctx->index_buffer.index_size;
- pipe_resource_reference(&draw.index_buffer, rctx->index_buffer.buffer);
- draw.index_buffer_offset = draw.start * draw.index_size;
- draw.start = 0;
- r600_upload_index_buffer(rctx, &draw);
- } else {
- draw.index_size = 0;
- draw.index_buffer = NULL;
- draw.min_index = info->min_index;
- draw.max_index = info->max_index;
- draw.index_bias = info->start;
- }
-
- switch (draw.index_size) {
- case 2:
- vgt_draw_initiator = 0;
- vgt_dma_index_type = 0;
- break;
- case 4:
- vgt_draw_initiator = 0;
- vgt_dma_index_type = 1;
- break;
- case 0:
- vgt_draw_initiator = 2;
- vgt_dma_index_type = 0;
- break;
- default:
- R600_ERR("unsupported index size %d\n", draw.index_size);
- return;
- }
- if (r600_conv_pipe_prim(draw.mode, &prim))
- return;
- if (unlikely(rctx->ps_shader == NULL)) {
- R600_ERR("missing vertex shader\n");
- return;
- }
- if (unlikely(rctx->vs_shader == NULL)) {
- R600_ERR("missing vertex shader\n");
- return;
- }
- /* there should be enough input */
- if (rctx->vertex_elements->count < rctx->vs_shader->shader.bc.nresource) {
- R600_ERR("%d resources provided, expecting %d\n",
- rctx->vertex_elements->count, rctx->vs_shader->shader.bc.nresource);
- return;
- }
-
- evergreen_spi_update(rctx);
-
- mask = 0;
- for (int i = 0; i < rctx->framebuffer.nr_cbufs; i++) {
- mask |= (0xF << (i * 4));
- }
-
- vgt.id = R600_PIPE_STATE_VGT;
- vgt.nregs = 0;
- r600_pipe_state_add_reg(&vgt, R_008958_VGT_PRIMITIVE_TYPE, prim, 0xFFFFFFFF, NULL);
- r600_pipe_state_add_reg(&vgt, R_028408_VGT_INDX_OFFSET, draw.index_bias, 0xFFFFFFFF, NULL);
- r600_pipe_state_add_reg(&vgt, R_028238_CB_TARGET_MASK, rctx->cb_target_mask & mask, 0xFFFFFFFF, NULL);
- r600_pipe_state_add_reg(&vgt, R_028400_VGT_MAX_VTX_INDX, draw.max_index, 0xFFFFFFFF, NULL);
- r600_pipe_state_add_reg(&vgt, R_028404_VGT_MIN_VTX_INDX, draw.min_index, 0xFFFFFFFF, NULL);
- r600_pipe_state_add_reg(&vgt, R_03CFF0_SQ_VTX_BASE_VTX_LOC, 0, 0xFFFFFFFF, NULL);
- r600_pipe_state_add_reg(&vgt, R_03CFF4_SQ_VTX_START_INST_LOC, 0, 0xFFFFFFFF, NULL);
- r600_context_pipe_state_set(&rctx->ctx, &vgt);
-
- rdraw.vgt_num_indices = draw.count;
- rdraw.vgt_num_instances = 1;
- rdraw.vgt_index_type = vgt_dma_index_type;
- rdraw.vgt_draw_initiator = vgt_draw_initiator;
- rdraw.indices = NULL;
- if (draw.index_buffer) {
- rbuffer = (struct r600_resource*)draw.index_buffer;
- rdraw.indices = rbuffer->bo;
- rdraw.indices_bo_offset = draw.index_buffer_offset;
- }
- evergreen_context_draw(&rctx->ctx, &rdraw);
-
- pipe_resource_reference(&draw.index_buffer, NULL);
-}
-
void evergreen_pipe_shader_ps(struct pipe_context *ctx, struct r600_pipe_shader *shader)
{
struct r600_pipe_state *rstate = &shader->rstate;
struct r600_shader *rshader = &shader->shader;
- unsigned i, exports_ps, num_cout, spi_ps_in_control_0, spi_input_z, spi_ps_in_control_1;
+ unsigned i, exports_ps, num_cout, spi_ps_in_control_0, spi_input_z, spi_ps_in_control_1, db_shader_control;
int pos_index = -1, face_index = -1;
int ninterp = 0;
boolean have_linear = FALSE, have_centroid = FALSE, have_perspective = FALSE;
@@ -1487,6 +1336,7 @@ void evergreen_pipe_shader_ps(struct pipe_context *ctx, struct r600_pipe_shader
rstate->nregs = 0;
+ db_shader_control = 0;
for (i = 0; i < rshader->ninput; i++) {
/* evergreen NUM_INTERP only contains values interpolated into the LDS,
POSITION goes via GPRs from the SC so isn't counted */
@@ -1508,16 +1358,12 @@ void evergreen_pipe_shader_ps(struct pipe_context *ctx, struct r600_pipe_shader
}
for (i = 0; i < rshader->noutput; i++) {
if (rshader->output[i].name == TGSI_SEMANTIC_POSITION)
- r600_pipe_state_add_reg(rstate,
- R_02880C_DB_SHADER_CONTROL,
- S_02880C_Z_EXPORT_ENABLE(1),
- S_02880C_Z_EXPORT_ENABLE(1), NULL);
+ db_shader_control |= S_02880C_Z_EXPORT_ENABLE(1);
if (rshader->output[i].name == TGSI_SEMANTIC_STENCIL)
- r600_pipe_state_add_reg(rstate,
- R_02880C_DB_SHADER_CONTROL,
- S_02880C_STENCIL_EXPORT_ENABLE(1),
- S_02880C_STENCIL_EXPORT_ENABLE(1), NULL);
+ db_shader_control |= S_02880C_STENCIL_EXPORT_ENABLE(1);
}
+ if (rshader->uses_kill)
+ db_shader_control |= S_02880C_KILL_ENABLE(1);
exports_ps = 0;
num_cout = 0;
@@ -1592,15 +1438,15 @@ void evergreen_pipe_shader_ps(struct pipe_context *ctx, struct r600_pipe_shader
r600_pipe_state_add_reg(rstate,
R_02884C_SQ_PGM_EXPORTS_PS,
exports_ps, 0xFFFFFFFF, NULL);
-
- if (rshader->uses_kill) {
- /* only set some bits here, the other bits are set in the dsa state */
- r600_pipe_state_add_reg(rstate,
- R_02880C_DB_SHADER_CONTROL,
- S_02880C_KILL_ENABLE(1),
- S_02880C_KILL_ENABLE(1), NULL);
- }
-
+ /* FIXME: Evergreen doesn't seem to support MULTIWRITE_ENABLE. */
+ /* only set some bits here, the other bits are set in the dsa state */
+ r600_pipe_state_add_reg(rstate,
+ R_02880C_DB_SHADER_CONTROL,
+ db_shader_control,
+ S_02880C_Z_EXPORT_ENABLE(1) |
+ S_02880C_STENCIL_EXPORT_ENABLE(1) |
+ S_02880C_KILL_ENABLE(1),
+ NULL);
r600_pipe_state_add_reg(rstate,
R_03A200_SQ_LOOP_CONST_0, 0x01000FFF,
0xFFFFFFFF, NULL);
@@ -1651,6 +1497,18 @@ void evergreen_pipe_shader_vs(struct pipe_context *ctx, struct r600_pipe_shader
0xFFFFFFFF, NULL);
}
+void evergreen_fetch_shader(struct r600_vertex_element *ve)
+{
+ struct r600_pipe_state *rstate = &ve->rstate;
+ rstate->id = R600_PIPE_STATE_FETCH_SHADER;
+ rstate->nregs = 0;
+ r600_pipe_state_add_reg(rstate, R_0288A8_SQ_PGM_RESOURCES_FS,
+ 0x00000000, 0xFFFFFFFF, NULL);
+ r600_pipe_state_add_reg(rstate, R_0288A4_SQ_PGM_START_FS,
+ (r600_bo_offset(ve->fetch_shader)) >> 8,
+ 0xFFFFFFFF, ve->fetch_shader);
+}
+
void *evergreen_create_db_flush_dsa(struct r600_pipe_context *rctx)
{
struct pipe_depth_stencil_alpha_state dsa;
@@ -1673,3 +1531,31 @@ void *evergreen_create_db_flush_dsa(struct r600_pipe_context *rctx)
S_028000_COPY_CENTROID(1), NULL);
return rstate;
}
+
+void evergreen_pipe_set_buffer_resource(struct r600_pipe_context *rctx,
+ struct r600_pipe_state *rstate,
+ struct r600_resource *rbuffer,
+ unsigned offset, unsigned stride)
+{
+ r600_pipe_state_add_reg(rstate, R_030000_RESOURCE0_WORD0,
+ offset, 0xFFFFFFFF, rbuffer->bo);
+ r600_pipe_state_add_reg(rstate, R_030004_RESOURCE0_WORD1,
+ rbuffer->bo_size - offset - 1, 0xFFFFFFFF, NULL);
+ r600_pipe_state_add_reg(rstate, R_030008_RESOURCE0_WORD2,
+ S_030008_STRIDE(stride),
+ 0xFFFFFFFF, NULL);
+ r600_pipe_state_add_reg(rstate, R_03000C_RESOURCE0_WORD3,
+ S_03000C_DST_SEL_X(V_03000C_SQ_SEL_X) |
+ S_03000C_DST_SEL_Y(V_03000C_SQ_SEL_Y) |
+ S_03000C_DST_SEL_Z(V_03000C_SQ_SEL_Z) |
+ S_03000C_DST_SEL_W(V_03000C_SQ_SEL_W),
+ 0xFFFFFFFF, NULL);
+ r600_pipe_state_add_reg(rstate, R_030010_RESOURCE0_WORD4,
+ 0x00000000, 0xFFFFFFFF, NULL);
+ r600_pipe_state_add_reg(rstate, R_030014_RESOURCE0_WORD5,
+ 0x00000000, 0xFFFFFFFF, NULL);
+ r600_pipe_state_add_reg(rstate, R_030018_RESOURCE0_WORD6,
+ 0x00000000, 0xFFFFFFFF, NULL);
+ r600_pipe_state_add_reg(rstate, R_03001C_RESOURCE0_WORD7,
+ 0xC0000000, 0xFFFFFFFF, NULL);
+}
diff --git a/src/gallium/drivers/r600/evergreend.h b/src/gallium/drivers/r600/evergreend.h
index e67254b2560..c51a163bd06 100644
--- a/src/gallium/drivers/r600/evergreend.h
+++ b/src/gallium/drivers/r600/evergreend.h
@@ -108,8 +108,9 @@
#define PKT3_IT_OPCODE_S(x) (((x) & 0xFF) << 8)
#define PKT3_IT_OPCODE_G(x) (((x) >> 8) & 0xFF)
#define PKT3_IT_OPCODE_C 0xFFFF00FF
+#define PKT3_PREDICATE(x) (((x) >> 0) & 0x1)
#define PKT0(index, count) (PKT_TYPE_S(0) | PKT0_BASE_INDEX_S(index) | PKT_COUNT_S(count))
-#define PKT3(op, count) (PKT_TYPE_S(3) | PKT3_IT_OPCODE_S(op) | PKT_COUNT_S(count))
+#define PKT3(op, count, predicate) (PKT_TYPE_S(3) | PKT3_IT_OPCODE_S(op) | PKT_COUNT_S(count) | PKT3_PREDICATE(predicate))
/* Registers */
#define R_008C00_SQ_CONFIG 0x00008C00
@@ -327,6 +328,9 @@
#define S_028C70_SOURCE_FORMAT(x) (((x) & 0x3) << 24)
#define G_028C70_SOURCE_FORMAT(x) (((x) >> 24) & 0x3)
#define C_028C70_SOURCE_FORMAT 0xFCFFFFFF
+#define V_028C70_EXPORT_4C_32BPC 0x0
+#define V_028C70_EXPORT_4C_16BPC 0x1
+#define V_028C70_EXPORT_2C_32BPC 0x2 /* Do not use */
#define S_028C70_RAT(x) (((x) & 0x1) << 26)
#define G_028C70_RAT(x) (((x) >> 26) & 0x1)
#define C_028C70_RAT 0xFBFFFFFF
@@ -427,15 +431,6 @@
#define C_028800_STENCILZFAIL_BF 0x1FFFFFFF
#define R_028808_CB_COLOR_CONTROL 0x028808
-#define S_028808_FOG_ENABLE(x) (((x) & 0x1) << 0)
-#define G_028808_FOG_ENABLE(x) (((x) >> 0) & 0x1)
-#define C_028808_FOG_ENABLE 0xFFFFFFFE
-#define S_028808_MULTIWRITE_ENABLE(x) (((x) & 0x1) << 1)
-#define G_028808_MULTIWRITE_ENABLE(x) (((x) >> 1) & 0x1)
-#define C_028808_MULTIWRITE_ENABLE 0xFFFFFFFD
-#define S_028808_DITHER_ENABLE(x) (((x) & 0x1) << 2)
-#define G_028808_DITHER_ENABLE(x) (((x) >> 2) & 0x1)
-#define C_028808_DITHER_ENABLE 0xFFFFFFFB
#define S_028808_DEGAMMA_ENABLE(x) (((x) & 0x1) << 3)
#define G_028808_DEGAMMA_ENABLE(x) (((x) >> 3) & 0x1)
#define C_028808_DEGAMMA_ENABLE 0xFFFFFFF7
@@ -939,6 +934,9 @@
#define V_030000_SQ_TEX_DIM_2D_ARRAY 0x00000005
#define V_030000_SQ_TEX_DIM_2D_MSAA 0x00000006
#define V_030000_SQ_TEX_DIM_2D_ARRAY_MSAA 0x00000007
+#define S_030000_NON_DISP_TILING_ORDER(x) (((x) & 0x1) << 5)
+#define G_030000_NON_DISP_TILING_ORDER(x) (((x) >> 5) & 0x1)
+#define C_030000_NON_DISP_TILING_ORDER 0xFFFFFFDF
#define S_030000_PITCH(x) (((x) & 0xFFF) << 6)
#define G_030000_PITCH(x) (((x) >> 6) & 0xFFF)
#define C_030000_PITCH 0xFFFC003F
@@ -988,8 +986,8 @@
#define S_030010_SRF_MODE_ALL(x) (((x) & 0x1) << 10)
#define G_030010_SRF_MODE_ALL(x) (((x) >> 10) & 0x1)
#define C_030010_SRF_MODE_ALL 0xFFFFFBFF
-#define V_030010_SFR_MODE_ZERO_CLAMP_MINUS_ONE 0x00000000
-#define V_030010_SFR_MODE_NO_ZERO 0x00000001
+#define V_030010_SRF_MODE_ZERO_CLAMP_MINUS_ONE 0x00000000
+#define V_030010_SRF_MODE_NO_ZERO 0x00000001
#define S_030010_FORCE_DEGAMMA(x) (((x) & 0x1) << 11)
#define G_030010_FORCE_DEGAMMA(x) (((x) >> 11) & 0x1)
#define C_030010_FORCE_DEGAMMA 0xFFFFF7FF
diff --git a/src/gallium/drivers/r600/r600.h b/src/gallium/drivers/r600/r600.h
index aa456d493f7..0b7d6f70968 100644
--- a/src/gallium/drivers/r600/r600.h
+++ b/src/gallium/drivers/r600/r600.h
@@ -35,7 +35,7 @@
#define RADEON_CTX_MAX_PM4 (64 * 1024 / 4)
#define R600_ERR(fmt, args...) \
- fprintf(stderr, "EE %s/%s:%d - "fmt, __FILE__, __func__, __LINE__, ##args)
+ fprintf(stderr, "EE %s:%d %s - "fmt, __FILE__, __LINE__, __func__, ##args)
typedef uint64_t u64;
typedef uint32_t u32;
@@ -92,6 +92,9 @@ enum radeon_family {
CHIP_CYPRESS,
CHIP_HEMLOCK,
CHIP_PALM,
+ CHIP_BARTS,
+ CHIP_TURKS,
+ CHIP_CAICOS,
CHIP_LAST,
};
@@ -110,14 +113,17 @@ struct r600_tiling_info {
enum radeon_family r600_get_family(struct radeon *rw);
enum chip_class r600_get_family_class(struct radeon *radeon);
struct r600_tiling_info *r600_get_tiling_info(struct radeon *radeon);
+unsigned r600_get_clock_crystal_freq(struct radeon *radeon);
+unsigned r600_get_minor_version(struct radeon *radeon);
+unsigned r600_get_num_backends(struct radeon *radeon);
/* r600_bo.c */
struct r600_bo;
struct r600_bo *r600_bo(struct radeon *radeon,
- unsigned size, unsigned alignment,
- unsigned binding, unsigned usage);
+ unsigned size, unsigned alignment,
+ unsigned binding, unsigned usage);
struct r600_bo *r600_bo_handle(struct radeon *radeon,
- unsigned handle, unsigned *array_mode);
+ unsigned handle, unsigned *array_mode);
void *r600_bo_map(struct radeon *radeon, struct r600_bo *bo, unsigned usage, void *ctx);
void r600_bo_unmap(struct radeon *radeon, struct r600_bo *bo);
void r600_bo_reference(struct radeon *radeon, struct r600_bo **dst,
@@ -245,10 +251,9 @@ struct r600_context {
u32 *pm4;
struct list_head query_list;
unsigned num_query_running;
- unsigned fence;
struct list_head fenced_bo;
- unsigned *cfence;
- struct r600_bo *fence_bo;
+ unsigned max_db; /* for OQ */
+ boolean predicate_drawing;
};
struct r600_draw {
@@ -281,13 +286,11 @@ void r600_query_begin(struct r600_context *ctx, struct r600_query *query);
void r600_query_end(struct r600_context *ctx, struct r600_query *query);
void r600_context_queries_suspend(struct r600_context *ctx);
void r600_context_queries_resume(struct r600_context *ctx);
+void r600_query_predication(struct r600_context *ctx, struct r600_query *query, int operation,
+ int flag_wait);
int evergreen_context_init(struct r600_context *ctx, struct radeon *radeon);
void evergreen_context_draw(struct r600_context *ctx, const struct r600_draw *draw);
-void evergreen_ps_resource_set(struct r600_context *ctx, struct r600_pipe_state *state, unsigned rid);
-void evergreen_vs_resource_set(struct r600_context *ctx, struct r600_pipe_state *state, unsigned rid);
-void evergreen_fs_resource_set(struct r600_context *ctx, struct r600_pipe_state *state, unsigned rid);
-
void evergreen_context_pipe_state_set_ps_resource(struct r600_context *ctx, struct r600_pipe_state *state, unsigned rid);
void evergreen_context_pipe_state_set_vs_resource(struct r600_context *ctx, struct r600_pipe_state *state, unsigned rid);
void evergreen_context_pipe_state_set_fs_resource(struct r600_context *ctx, struct r600_pipe_state *state, unsigned rid);
diff --git a/src/gallium/drivers/r600/r600_asm.c b/src/gallium/drivers/r600/r600_asm.c
index 1f41269534a..240093f9b9d 100644
--- a/src/gallium/drivers/r600/r600_asm.c
+++ b/src/gallium/drivers/r600/r600_asm.c
@@ -32,52 +32,118 @@
#include "r600_formats.h"
#include "r600d.h"
-static inline unsigned int r600_bc_get_num_operands(struct r600_bc_alu *alu)
+#define NUM_OF_CYCLES 3
+#define NUM_OF_COMPONENTS 4
+
+static inline unsigned int r600_bc_get_num_operands(struct r600_bc *bc, struct r600_bc_alu *alu)
{
if(alu->is_op3)
return 3;
- switch (alu->inst) {
- case V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_NOP:
- return 0;
- case V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_ADD:
- case V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_KILLE:
- case V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_KILLGT:
- case V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_KILLGE:
- case V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_KILLNE:
- case V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MUL:
- case V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MAX:
- case V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MIN:
- case V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_SETE:
- case V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_SETNE:
- case V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_SETGT:
- case V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_SETGE:
- case V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_PRED_SETE:
- case V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_PRED_SETGT:
- case V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_PRED_SETGE:
- case V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_PRED_SETNE:
- case V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_DOT4:
- case V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_DOT4_IEEE:
- case V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_CUBE:
- return 2;
-
- case V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MOV:
- case V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MOVA_FLOOR:
- case V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_FRACT:
- case V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_FLOOR:
- case V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_TRUNC:
- case V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_EXP_IEEE:
- case V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_LOG_CLAMPED:
- case V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_LOG_IEEE:
- case V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_RECIP_IEEE:
- case V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_RECIPSQRT_IEEE:
- case V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_FLT_TO_INT:
- case V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_SIN:
- case V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_COS:
- return 1;
- default: R600_ERR(
- "Need instruction operand number for 0x%x.\n", alu->inst);
- };
+ switch (bc->chiprev) {
+ case CHIPREV_R600:
+ case CHIPREV_R700:
+ switch (alu->inst) {
+ case V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_NOP:
+ return 0;
+ case V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_ADD:
+ case V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_ADD_INT:
+ case V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_KILLE:
+ case V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_KILLGT:
+ case V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_KILLGE:
+ case V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_KILLNE:
+ case V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MUL:
+ case V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MULHI_UINT:
+ case V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MAX:
+ case V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MIN:
+ case V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_SETE:
+ case V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_SETNE:
+ case V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_SETGT:
+ case V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_SETGE:
+ case V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_PRED_SETE:
+ case V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_PRED_SETGT:
+ case V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_PRED_SETGE:
+ case V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_PRED_SETNE:
+ case V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_DOT4:
+ case V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_DOT4_IEEE:
+ case V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_CUBE:
+ return 2;
+
+ case V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MOV:
+ case V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MOVA:
+ case V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MOVA_FLOOR:
+ case V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MOVA_INT:
+ case V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_FRACT:
+ case V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_FLOOR:
+ case V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_TRUNC:
+ case V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_EXP_IEEE:
+ case V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_LOG_CLAMPED:
+ case V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_LOG_IEEE:
+ case V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_RECIP_CLAMPED:
+ case V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_RECIP_IEEE:
+ case V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_RECIPSQRT_CLAMPED:
+ case V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_RECIPSQRT_IEEE:
+ case V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_FLT_TO_INT:
+ case V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_INT_TO_FLT:
+ case V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_SIN:
+ case V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_COS:
+ return 1;
+ default: R600_ERR(
+ "Need instruction operand number for 0x%x.\n", alu->inst);
+ }
+ break;
+ case CHIPREV_EVERGREEN:
+ switch (alu->inst) {
+ case EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_NOP:
+ return 0;
+ case EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_ADD:
+ case EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_ADD_INT:
+ case EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_KILLE:
+ case EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_KILLGT:
+ case EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_KILLGE:
+ case EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_KILLNE:
+ case EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MUL:
+ case EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MULHI_UINT:
+ case EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MAX:
+ case EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MIN:
+ case EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_SETE:
+ case EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_SETNE:
+ case EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_SETGT:
+ case EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_SETGE:
+ case EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_PRED_SETE:
+ case EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_PRED_SETGT:
+ case EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_PRED_SETGE:
+ case EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_PRED_SETNE:
+ case EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_DOT4:
+ case EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_DOT4_IEEE:
+ case EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_CUBE:
+ case EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INTERP_XY:
+ case EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INTERP_ZW:
+ return 2;
+
+ case EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MOV:
+ case EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MOVA_INT:
+ case EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_FRACT:
+ case EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_FLOOR:
+ case EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_TRUNC:
+ case EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_EXP_IEEE:
+ case EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_LOG_CLAMPED:
+ case EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_LOG_IEEE:
+ case EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_RECIP_CLAMPED:
+ case EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_RECIP_IEEE:
+ case EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_RECIPSQRT_CLAMPED:
+ case EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_RECIPSQRT_IEEE:
+ case EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_FLT_TO_INT:
+ case EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_FLT_TO_INT_FLOOR:
+ case EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_INT_TO_FLT:
+ case EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_SIN:
+ case EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_COS:
+ return 1;
+ default: R600_ERR(
+ "Need instruction operand number for 0x%x.\n", alu->inst);
+ }
+ break;
+ }
return 3;
}
@@ -104,7 +170,6 @@ static struct r600_bc_alu *r600_bc_alu(void)
if (alu == NULL)
return NULL;
LIST_INITHEAD(&alu->list);
- LIST_INITHEAD(&alu->bs_list);
return alu;
}
@@ -155,6 +220,9 @@ int r600_bc_init(struct r600_bc *bc, enum radeon_family family)
case CHIP_CYPRESS:
case CHIP_HEMLOCK:
case CHIP_PALM:
+ case CHIP_BARTS:
+ case CHIP_TURKS:
+ case CHIP_CAICOS:
bc->chiprev = CHIPREV_EVERGREEN;
break;
default:
@@ -184,6 +252,37 @@ int r600_bc_add_output(struct r600_bc *bc, const struct r600_bc_output *output)
{
int r;
+ if (bc->cf_last && (bc->cf_last->inst == output->inst ||
+ (bc->cf_last->inst == BC_INST(bc, V_SQ_CF_ALLOC_EXPORT_WORD1_SQ_CF_INST_EXPORT) &&
+ output->inst == BC_INST(bc, V_SQ_CF_ALLOC_EXPORT_WORD1_SQ_CF_INST_EXPORT_DONE))) &&
+ output->type == bc->cf_last->output.type &&
+ output->elem_size == bc->cf_last->output.elem_size &&
+ output->swizzle_x == bc->cf_last->output.swizzle_x &&
+ output->swizzle_y == bc->cf_last->output.swizzle_y &&
+ output->swizzle_z == bc->cf_last->output.swizzle_z &&
+ output->swizzle_w == bc->cf_last->output.swizzle_w &&
+ (output->burst_count + bc->cf_last->output.burst_count) <= 16) {
+
+ if ((output->gpr + output->burst_count) == bc->cf_last->output.gpr &&
+ (output->array_base + output->burst_count) == bc->cf_last->output.array_base) {
+
+ bc->cf_last->output.end_of_program |= output->end_of_program;
+ bc->cf_last->output.inst = output->inst;
+ bc->cf_last->output.gpr = output->gpr;
+ bc->cf_last->output.array_base = output->array_base;
+ bc->cf_last->output.burst_count += output->burst_count;
+ return 0;
+
+ } else if (output->gpr == (bc->cf_last->output.gpr + bc->cf_last->output.burst_count) &&
+ output->array_base == (bc->cf_last->output.array_base + bc->cf_last->output.burst_count)) {
+
+ bc->cf_last->output.end_of_program |= output->end_of_program;
+ bc->cf_last->output.inst = output->inst;
+ bc->cf_last->output.burst_count += output->burst_count;
+ return 0;
+ }
+ }
+
r = r600_bc_add_cf(bc);
if (r)
return r;
@@ -192,221 +291,849 @@ int r600_bc_add_output(struct r600_bc *bc, const struct r600_bc_output *output)
return 0;
}
-const unsigned bank_swizzle_vec[8] = {SQ_ALU_VEC_210, //000
- SQ_ALU_VEC_120, //001
- SQ_ALU_VEC_102, //010
+/* alu instructions that can ony exits once per group */
+static int is_alu_once_inst(struct r600_bc *bc, struct r600_bc_alu *alu)
+{
+ switch (bc->chiprev) {
+ case CHIPREV_R600:
+ case CHIPREV_R700:
+ return !alu->is_op3 && (
+ alu->inst == V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_KILLE ||
+ alu->inst == V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_KILLGT ||
+ alu->inst == V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_KILLGE ||
+ alu->inst == V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_KILLNE ||
+ alu->inst == V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_KILLGT_UINT ||
+ alu->inst == V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_KILLGE_UINT ||
+ alu->inst == V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_KILLE_INT ||
+ alu->inst == V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_KILLGT_INT ||
+ alu->inst == V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_KILLGE_INT ||
+ alu->inst == V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_KILLNE_INT ||
+ alu->inst == V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_PRED_SETGT_UINT ||
+ alu->inst == V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_PRED_SETGE_UINT ||
+ alu->inst == V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_PRED_SETE ||
+ alu->inst == V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_PRED_SETGT ||
+ alu->inst == V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_PRED_SETGE ||
+ alu->inst == V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_PRED_SETNE ||
+ alu->inst == V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_PRED_SET_INV ||
+ alu->inst == V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_PRED_SET_POP ||
+ alu->inst == V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_PRED_SET_CLR ||
+ alu->inst == V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_PRED_SET_RESTORE ||
+ alu->inst == V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_PRED_SETE_PUSH ||
+ alu->inst == V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_PRED_SETGT_PUSH ||
+ alu->inst == V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_PRED_SETGE_PUSH ||
+ alu->inst == V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_PRED_SETNE_PUSH ||
+ alu->inst == V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_PRED_SETE_INT ||
+ alu->inst == V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_PRED_SETGT_INT ||
+ alu->inst == V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_PRED_SETGE_INT ||
+ alu->inst == V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_PRED_SETNE_INT ||
+ alu->inst == V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_PRED_SETE_PUSH_INT ||
+ alu->inst == V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_PRED_SETGT_PUSH_INT ||
+ alu->inst == V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_PRED_SETGE_PUSH_INT ||
+ alu->inst == V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_PRED_SETNE_PUSH_INT ||
+ alu->inst == V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_PRED_SETLT_PUSH_INT ||
+ alu->inst == V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_PRED_SETLE_PUSH_INT);
+ case CHIPREV_EVERGREEN:
+ default:
+ return !alu->is_op3 && (
+ alu->inst == EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_KILLE ||
+ alu->inst == EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_KILLGT ||
+ alu->inst == EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_KILLGE ||
+ alu->inst == EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_KILLNE ||
+ alu->inst == EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_KILLGT_UINT ||
+ alu->inst == EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_KILLGE_UINT ||
+ alu->inst == EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_KILLE_INT ||
+ alu->inst == EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_KILLGT_INT ||
+ alu->inst == EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_KILLGE_INT ||
+ alu->inst == EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_KILLNE_INT ||
+ alu->inst == EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_PRED_SETGT_UINT ||
+ alu->inst == EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_PRED_SETGE_UINT ||
+ alu->inst == EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_PRED_SETE ||
+ alu->inst == EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_PRED_SETGT ||
+ alu->inst == EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_PRED_SETGE ||
+ alu->inst == EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_PRED_SETNE ||
+ alu->inst == EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_PRED_SET_INV ||
+ alu->inst == EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_PRED_SET_POP ||
+ alu->inst == EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_PRED_SET_CLR ||
+ alu->inst == EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_PRED_SET_RESTORE ||
+ alu->inst == EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_PRED_SETE_PUSH ||
+ alu->inst == EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_PRED_SETGT_PUSH ||
+ alu->inst == EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_PRED_SETGE_PUSH ||
+ alu->inst == EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_PRED_SETNE_PUSH ||
+ alu->inst == EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_PRED_SETE_INT ||
+ alu->inst == EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_PRED_SETGT_INT ||
+ alu->inst == EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_PRED_SETGE_INT ||
+ alu->inst == EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_PRED_SETNE_INT ||
+ alu->inst == EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_PRED_SETE_PUSH_INT ||
+ alu->inst == EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_PRED_SETGT_PUSH_INT ||
+ alu->inst == EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_PRED_SETGE_PUSH_INT ||
+ alu->inst == EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_PRED_SETNE_PUSH_INT ||
+ alu->inst == EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_PRED_SETLT_PUSH_INT ||
+ alu->inst == EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_PRED_SETLE_PUSH_INT);
+ }
+}
+
+static int is_alu_reduction_inst(struct r600_bc *bc, struct r600_bc_alu *alu)
+{
+ switch (bc->chiprev) {
+ case CHIPREV_R600:
+ case CHIPREV_R700:
+ return !alu->is_op3 && (
+ alu->inst == V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_CUBE ||
+ alu->inst == V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_DOT4 ||
+ alu->inst == V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_DOT4_IEEE ||
+ alu->inst == V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MAX4);
+ case CHIPREV_EVERGREEN:
+ default:
+ return !alu->is_op3 && (
+ alu->inst == EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_CUBE ||
+ alu->inst == EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_DOT4 ||
+ alu->inst == EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_DOT4_IEEE ||
+ alu->inst == EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MAX4);
+ }
+}
- SQ_ALU_VEC_201, //011
- SQ_ALU_VEC_012, //100
- SQ_ALU_VEC_021, //101
+static int is_alu_cube_inst(struct r600_bc *bc, struct r600_bc_alu *alu)
+{
+ switch (bc->chiprev) {
+ case CHIPREV_R600:
+ case CHIPREV_R700:
+ return !alu->is_op3 &&
+ alu->inst == V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_CUBE;
+ case CHIPREV_EVERGREEN:
+ default:
+ return !alu->is_op3 &&
+ alu->inst == EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_CUBE;
+ }
+}
- SQ_ALU_VEC_012, //110
- SQ_ALU_VEC_012}; //111
+static int is_alu_mova_inst(struct r600_bc *bc, struct r600_bc_alu *alu)
+{
+ switch (bc->chiprev) {
+ case CHIPREV_R600:
+ case CHIPREV_R700:
+ return !alu->is_op3 && (
+ alu->inst == V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MOVA ||
+ alu->inst == V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MOVA_FLOOR ||
+ alu->inst == V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MOVA_INT);
+ case CHIPREV_EVERGREEN:
+ default:
+ return !alu->is_op3 && (
+ alu->inst == EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MOVA_INT);
+ }
+}
-const unsigned bank_swizzle_scl[8] = {SQ_ALU_SCL_210, //000
- SQ_ALU_SCL_122, //001
- SQ_ALU_SCL_122, //010
+/* alu instructions that can only execute on the vector unit */
+static int is_alu_vec_unit_inst(struct r600_bc *bc, struct r600_bc_alu *alu)
+{
+ return is_alu_reduction_inst(bc, alu) ||
+ is_alu_mova_inst(bc, alu) ||
+ (bc->chiprev == CHIPREV_EVERGREEN &&
+ alu->inst == EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_FLT_TO_INT_FLOOR);
+}
- SQ_ALU_SCL_221, //011
- SQ_ALU_SCL_212, //100
- SQ_ALU_SCL_122, //101
+/* alu instructions that can only execute on the trans unit */
+static int is_alu_trans_unit_inst(struct r600_bc *bc, struct r600_bc_alu *alu)
+{
+ switch (bc->chiprev) {
+ case CHIPREV_R600:
+ case CHIPREV_R700:
+ if (!alu->is_op3)
+ return alu->inst == V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_ASHR_INT ||
+ alu->inst == V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_FLT_TO_INT ||
+ alu->inst == V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_INT_TO_FLT ||
+ alu->inst == V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_LSHL_INT ||
+ alu->inst == V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_LSHR_INT ||
+ alu->inst == V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MULHI_INT ||
+ alu->inst == V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MULHI_UINT ||
+ alu->inst == V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MULLO_INT ||
+ alu->inst == V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MULLO_UINT ||
+ alu->inst == V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_RECIP_INT ||
+ alu->inst == V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_RECIP_UINT ||
+ alu->inst == V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_UINT_TO_FLT ||
+ alu->inst == V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_COS ||
+ alu->inst == V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_EXP_IEEE ||
+ alu->inst == V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_LOG_CLAMPED ||
+ alu->inst == V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_LOG_IEEE ||
+ alu->inst == V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_RECIP_CLAMPED ||
+ alu->inst == V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_RECIP_FF ||
+ alu->inst == V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_RECIP_IEEE ||
+ alu->inst == V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_RECIPSQRT_CLAMPED ||
+ alu->inst == V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_RECIPSQRT_FF ||
+ alu->inst == V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_RECIPSQRT_IEEE ||
+ alu->inst == V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_SIN ||
+ alu->inst == V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_SQRT_IEEE;
+ else
+ return alu->inst == V_SQ_ALU_WORD1_OP3_SQ_OP3_INST_MUL_LIT ||
+ alu->inst == V_SQ_ALU_WORD1_OP3_SQ_OP3_INST_MUL_LIT_D2 ||
+ alu->inst == V_SQ_ALU_WORD1_OP3_SQ_OP3_INST_MUL_LIT_M2 ||
+ alu->inst == V_SQ_ALU_WORD1_OP3_SQ_OP3_INST_MUL_LIT_M4;
+ case CHIPREV_EVERGREEN:
+ default:
+ if (!alu->is_op3)
+ /* Note that FLT_TO_INT_* instructions are vector-only instructions
+ * on Evergreen, despite what the documentation says. FLT_TO_INT
+ * can do both vector and scalar. */
+ return alu->inst == EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_ASHR_INT ||
+ alu->inst == EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_INT_TO_FLT ||
+ alu->inst == EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_LSHL_INT ||
+ alu->inst == EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_LSHR_INT ||
+ alu->inst == EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MULHI_INT ||
+ alu->inst == EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MULHI_UINT ||
+ alu->inst == EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MULLO_INT ||
+ alu->inst == EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MULLO_UINT ||
+ alu->inst == EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_RECIP_INT ||
+ alu->inst == EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_RECIP_UINT ||
+ alu->inst == EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_UINT_TO_FLT ||
+ alu->inst == EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_COS ||
+ alu->inst == EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_EXP_IEEE ||
+ alu->inst == EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_LOG_CLAMPED ||
+ alu->inst == EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_LOG_IEEE ||
+ alu->inst == EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_RECIP_CLAMPED ||
+ alu->inst == EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_RECIP_FF ||
+ alu->inst == EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_RECIP_IEEE ||
+ alu->inst == EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_RECIPSQRT_CLAMPED ||
+ alu->inst == EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_RECIPSQRT_FF ||
+ alu->inst == EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_RECIPSQRT_IEEE ||
+ alu->inst == EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_SIN ||
+ alu->inst == EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_SQRT_IEEE;
+ else
+ return alu->inst == EG_V_SQ_ALU_WORD1_OP3_SQ_OP3_INST_MUL_LIT;
+ }
+}
- SQ_ALU_SCL_122, //110
- SQ_ALU_SCL_122}; //111
+/* alu instructions that can execute on any unit */
+static int is_alu_any_unit_inst(struct r600_bc *bc, struct r600_bc_alu *alu)
+{
+ return !is_alu_vec_unit_inst(bc, alu) &&
+ !is_alu_trans_unit_inst(bc, alu);
+}
-static int init_gpr(struct r600_bc_alu *alu)
+static int assign_alu_units(struct r600_bc *bc, struct r600_bc_alu *alu_first,
+ struct r600_bc_alu *assignment[5])
{
- int cycle, component;
+ struct r600_bc_alu *alu;
+ unsigned i, chan, trans;
+
+ for (i = 0; i < 5; i++)
+ assignment[i] = NULL;
+
+ for (alu = alu_first; alu; alu = LIST_ENTRY(struct r600_bc_alu, alu->list.next, list)) {
+ chan = alu->dst.chan;
+ if (is_alu_trans_unit_inst(bc, alu))
+ trans = 1;
+ else if (is_alu_vec_unit_inst(bc, alu))
+ trans = 0;
+ else if (assignment[chan])
+ trans = 1; // assume ALU_INST_PREFER_VECTOR
+ else
+ trans = 0;
+
+ if (trans) {
+ if (assignment[4]) {
+ assert(0); //ALU.Trans has already been allocated
+ return -1;
+ }
+ assignment[4] = alu;
+ } else {
+ if (assignment[chan]) {
+ assert(0); //ALU.chan has already been allocated
+ return -1;
+ }
+ assignment[chan] = alu;
+ }
+
+ if (alu->last)
+ break;
+ }
+ return 0;
+}
+
+struct alu_bank_swizzle {
+ int hw_gpr[NUM_OF_CYCLES][NUM_OF_COMPONENTS];
+ int hw_cfile_addr[4];
+ int hw_cfile_elem[4];
+};
+
+static const unsigned cycle_for_bank_swizzle_vec[][3] = {
+ [SQ_ALU_VEC_012] = { 0, 1, 2 },
+ [SQ_ALU_VEC_021] = { 0, 2, 1 },
+ [SQ_ALU_VEC_120] = { 1, 2, 0 },
+ [SQ_ALU_VEC_102] = { 1, 0, 2 },
+ [SQ_ALU_VEC_201] = { 2, 0, 1 },
+ [SQ_ALU_VEC_210] = { 2, 1, 0 }
+};
+
+static const unsigned cycle_for_bank_swizzle_scl[][3] = {
+ [SQ_ALU_SCL_210] = { 2, 1, 0 },
+ [SQ_ALU_SCL_122] = { 1, 2, 2 },
+ [SQ_ALU_SCL_212] = { 2, 1, 2 },
+ [SQ_ALU_SCL_221] = { 2, 2, 1 }
+};
+
+static void init_bank_swizzle(struct alu_bank_swizzle *bs)
+{
+ int i, cycle, component;
/* set up gpr use */
for (cycle = 0; cycle < NUM_OF_CYCLES; cycle++)
for (component = 0; component < NUM_OF_COMPONENTS; component++)
- alu->hw_gpr[cycle][component] = -1;
- return 0;
+ bs->hw_gpr[cycle][component] = -1;
+ for (i = 0; i < 4; i++)
+ bs->hw_cfile_addr[i] = -1;
+ for (i = 0; i < 4; i++)
+ bs->hw_cfile_elem[i] = -1;
}
-#if 0
-static int reserve_gpr(struct r600_bc_alu *alu, unsigned sel, unsigned chan, unsigned cycle)
+static int reserve_gpr(struct alu_bank_swizzle *bs, unsigned sel, unsigned chan, unsigned cycle)
{
- if (alu->hw_gpr[cycle][chan] < 0)
- alu->hw_gpr[cycle][chan] = sel;
- else if (alu->hw_gpr[cycle][chan] != (int)sel) {
- R600_ERR("Another scalar operation has already used GPR read port for channel\n");
+ if (bs->hw_gpr[cycle][chan] == -1)
+ bs->hw_gpr[cycle][chan] = sel;
+ else if (bs->hw_gpr[cycle][chan] != (int)sel) {
+ // Another scalar operation has already used GPR read port for channel
return -1;
}
return 0;
}
-static int cycle_for_scalar_bank_swizzle(const int swiz, const int sel, unsigned *p_cycle)
+static int reserve_cfile(struct r600_bc *bc, struct alu_bank_swizzle *bs, unsigned sel, unsigned chan)
{
- int table[3];
- int ret = 0;
- switch (swiz) {
- case SQ_ALU_SCL_210:
- table[0] = 2; table[1] = 1; table[2] = 0;
- *p_cycle = table[sel];
- break;
- case SQ_ALU_SCL_122:
- table[0] = 1; table[1] = 2; table[2] = 2;
- *p_cycle = table[sel];
- break;
- case SQ_ALU_SCL_212:
- table[0] = 2; table[1] = 1; table[2] = 2;
- *p_cycle = table[sel];
- break;
- case SQ_ALU_SCL_221:
- table[0] = 2; table[1] = 2; table[2] = 1;
- *p_cycle = table[sel];
- break;
- break;
- default:
- R600_ERR("bad scalar bank swizzle value\n");
- ret = -1;
- break;
+ int res, num_res = 4;
+ if (bc->chiprev >= CHIPREV_R700) {
+ num_res = 2;
+ chan /= 2;
+ }
+ for (res = 0; res < num_res; ++res) {
+ if (bs->hw_cfile_addr[res] == -1) {
+ bs->hw_cfile_addr[res] = sel;
+ bs->hw_cfile_elem[res] = chan;
+ return 0;
+ } else if (bs->hw_cfile_addr[res] == sel &&
+ bs->hw_cfile_elem[res] == chan)
+ return 0; // Read for this scalar element already reserved, nothing to do here.
}
- return ret;
+ // All cfile read ports are used, cannot reference vector element
+ return -1;
}
-static int cycle_for_vector_bank_swizzle(const int swiz, const int sel, unsigned *p_cycle)
+static int is_gpr(unsigned sel)
{
- int table[3];
- int ret;
-
- switch (swiz) {
- case SQ_ALU_VEC_012:
- table[0] = 0; table[1] = 1; table[2] = 2;
- *p_cycle = table[sel];
- break;
- case SQ_ALU_VEC_021:
- table[0] = 0; table[1] = 2; table[2] = 1;
- *p_cycle = table[sel];
- break;
- case SQ_ALU_VEC_120:
- table[0] = 1; table[1] = 2; table[2] = 0;
- *p_cycle = table[sel];
- break;
- case SQ_ALU_VEC_102:
- table[0] = 1; table[1] = 0; table[2] = 2;
- *p_cycle = table[sel];
- break;
- case SQ_ALU_VEC_201:
- table[0] = 2; table[1] = 0; table[2] = 1;
- *p_cycle = table[sel];
- break;
- case SQ_ALU_VEC_210:
- table[0] = 2; table[1] = 1; table[2] = 0;
- *p_cycle = table[sel];
- break;
- default:
- R600_ERR("bad vector bank swizzle value\n");
- ret = -1;
- break;
- }
- return ret;
+ return (sel >= 0 && sel <= 127);
}
+/* CB constants start at 512, and get translated to a kcache index when ALU
+ * clauses are constructed. Note that we handle kcache constants the same way
+ * as (the now gone) cfile constants, is that really required? */
+static int is_cfile(unsigned sel)
+{
+ return (sel > 255 && sel < 512) ||
+ (sel > 511 && sel < 4607) || // Kcache before translate
+ (sel > 127 && sel < 192); // Kcache after translate
+}
+static int is_const(int sel)
+{
+ return is_cfile(sel) ||
+ (sel >= V_SQ_ALU_SRC_0 &&
+ sel <= V_SQ_ALU_SRC_LITERAL);
+}
-static void update_chan_counter(struct r600_bc_alu *alu, int *chan_counter)
+static int check_vector(struct r600_bc *bc, struct r600_bc_alu *alu,
+ struct alu_bank_swizzle *bs, int bank_swizzle)
{
- int num_src;
- int i;
- int channel_swizzle;
+ int r, src, num_src, sel, elem, cycle;
+
+ num_src = r600_bc_get_num_operands(bc, alu);
+ for (src = 0; src < num_src; src++) {
+ sel = alu->src[src].sel;
+ elem = alu->src[src].chan;
+ if (is_gpr(sel)) {
+ cycle = cycle_for_bank_swizzle_vec[bank_swizzle][src];
+ if (src == 1 && sel == alu->src[0].sel && elem == alu->src[0].chan)
+ // Nothing to do; special-case optimization,
+ // second source uses first source’s reservation
+ continue;
+ else {
+ r = reserve_gpr(bs, sel, elem, cycle);
+ if (r)
+ return r;
+ }
+ } else if (is_cfile(sel)) {
+ r = reserve_cfile(bc, bs, sel, elem);
+ if (r)
+ return r;
+ }
+ // No restrictions on PV, PS, literal or special constants
+ }
+ return 0;
+}
- num_src = r600_bc_get_num_operands(alu);
+static int check_scalar(struct r600_bc *bc, struct r600_bc_alu *alu,
+ struct alu_bank_swizzle *bs, int bank_swizzle)
+{
+ int r, src, num_src, const_count, sel, elem, cycle;
+
+ num_src = r600_bc_get_num_operands(bc, alu);
+ for (const_count = 0, src = 0; src < num_src; ++src) {
+ sel = alu->src[src].sel;
+ elem = alu->src[src].chan;
+ if (is_const(sel)) { // Any constant, including literal and inline constants
+ if (const_count >= 2)
+ // More than two references to a constant in
+ // transcendental operation.
+ return -1;
+ else
+ const_count++;
+ }
+ if (is_cfile(sel)) {
+ r = reserve_cfile(bc, bs, sel, elem);
+ if (r)
+ return r;
+ }
+ }
+ for (src = 0; src < num_src; ++src) {
+ sel = alu->src[src].sel;
+ elem = alu->src[src].chan;
+ if (is_gpr(sel)) {
+ cycle = cycle_for_bank_swizzle_scl[bank_swizzle][src];
+ if (cycle < const_count)
+ // Cycle for GPR load conflicts with
+ // constant load in transcendental operation.
+ return -1;
+ r = reserve_gpr(bs, sel, elem, cycle);
+ if (r)
+ return r;
+ }
+ // Constants already processed
+ // No restrictions on PV, PS
+ }
+ return 0;
+}
- for (i = 0; i < num_src; i++) {
- channel_swizzle = alu->src[i].chan;
- if ((alu->src[i].sel > 0 && alu->src[i].sel < 128) && channel_swizzle <= 3)
- chan_counter[channel_swizzle]++;
+static int check_and_set_bank_swizzle(struct r600_bc *bc,
+ struct r600_bc_alu *slots[5])
+{
+ struct alu_bank_swizzle bs;
+ int bank_swizzle[5];
+ int i, r = 0, forced = 0;
+
+ for (i = 0; i < 5; i++)
+ if (slots[i] && slots[i]->bank_swizzle_force) {
+ slots[i]->bank_swizzle = slots[i]->bank_swizzle_force;
+ forced = 1;
+ }
+
+ if (forced)
+ return 0;
+
+ // just check every possible combination of bank swizzle
+ // not very efficent, but works on the first try in most of the cases
+ for (i = 0; i < 4; i++)
+ bank_swizzle[i] = SQ_ALU_VEC_012;
+ bank_swizzle[4] = SQ_ALU_SCL_210;
+ while(bank_swizzle[4] <= SQ_ALU_SCL_221) {
+ init_bank_swizzle(&bs);
+ for (i = 0; i < 4; i++) {
+ if (slots[i]) {
+ r = check_vector(bc, slots[i], &bs, bank_swizzle[i]);
+ if (r)
+ break;
+ }
+ }
+ if (!r && slots[4]) {
+ r = check_scalar(bc, slots[4], &bs, bank_swizzle[4]);
+ }
+ if (!r) {
+ for (i = 0; i < 5; i++) {
+ if (slots[i])
+ slots[i]->bank_swizzle = bank_swizzle[i];
+ }
+ return 0;
+ }
+
+ for (i = 0; i < 5; i++) {
+ bank_swizzle[i]++;
+ if (bank_swizzle[i] <= SQ_ALU_VEC_210)
+ break;
+ else
+ bank_swizzle[i] = SQ_ALU_VEC_012;
+ }
}
+
+ // couldn't find a working swizzle
+ return -1;
}
-/* we need something like this I think - but this is bogus */
-int check_read_slots(struct r600_bc *bc, struct r600_bc_alu *alu_first)
+static int replace_gpr_with_pv_ps(struct r600_bc *bc,
+ struct r600_bc_alu *slots[5], struct r600_bc_alu *alu_prev)
{
- struct r600_bc_alu *alu;
- int chan_counter[4] = { 0 };
+ struct r600_bc_alu *prev[5];
+ int gpr[5], chan[5];
+ int i, j, r, src, num_src;
- update_chan_counter(alu_first, chan_counter);
+ r = assign_alu_units(bc, alu_prev, prev);
+ if (r)
+ return r;
- LIST_FOR_EACH_ENTRY(alu, &alu_first->bs_list, bs_list) {
- update_chan_counter(alu, chan_counter);
+ for (i = 0; i < 5; ++i) {
+ if(prev[i] && prev[i]->dst.write && !prev[i]->dst.rel) {
+ gpr[i] = prev[i]->dst.sel;
+ /* cube writes more than PV.X */
+ if (!is_alu_cube_inst(bc, prev[i]) && is_alu_reduction_inst(bc, prev[i]))
+ chan[i] = 0;
+ else
+ chan[i] = prev[i]->dst.chan;
+ } else
+ gpr[i] = -1;
}
- if (chan_counter[0] > 3 ||
- chan_counter[1] > 3 ||
- chan_counter[2] > 3 ||
- chan_counter[3] > 3) {
- R600_ERR("needed to split instruction for input ran out of banks %x %d %d %d %d\n",
- alu_first->inst, chan_counter[0], chan_counter[1], chan_counter[2], chan_counter[3]);
- return -1;
+ for (i = 0; i < 5; ++i) {
+ struct r600_bc_alu *alu = slots[i];
+ if(!alu)
+ continue;
+
+ num_src = r600_bc_get_num_operands(bc, alu);
+ for (src = 0; src < num_src; ++src) {
+ if (!is_gpr(alu->src[src].sel) || alu->src[src].rel)
+ continue;
+
+ if (alu->src[src].sel == gpr[4] &&
+ alu->src[src].chan == chan[4]) {
+ alu->src[src].sel = V_SQ_ALU_SRC_PS;
+ alu->src[src].chan = 0;
+ continue;
+ }
+
+ for (j = 0; j < 4; ++j) {
+ if (alu->src[src].sel == gpr[j] &&
+ alu->src[src].chan == j) {
+ alu->src[src].sel = V_SQ_ALU_SRC_PV;
+ alu->src[src].chan = chan[j];
+ break;
+ }
+ }
+ }
}
+
return 0;
}
-#endif
-static int is_const(int sel)
+void r600_bc_special_constants(u32 value, unsigned *sel, unsigned *neg)
{
- if (sel > 255 && sel < 512)
- return 1;
- if (sel >= V_SQ_ALU_SRC_0 && sel <= V_SQ_ALU_SRC_LITERAL)
- return 1;
- return 0;
+ switch(value) {
+ case 0:
+ *sel = V_SQ_ALU_SRC_0;
+ break;
+ case 1:
+ *sel = V_SQ_ALU_SRC_1_INT;
+ break;
+ case -1:
+ *sel = V_SQ_ALU_SRC_M_1_INT;
+ break;
+ case 0x3F800000: // 1.0f
+ *sel = V_SQ_ALU_SRC_1;
+ break;
+ case 0x3F000000: // 0.5f
+ *sel = V_SQ_ALU_SRC_0_5;
+ break;
+ case 0xBF800000: // -1.0f
+ *sel = V_SQ_ALU_SRC_1;
+ *neg ^= 1;
+ break;
+ case 0xBF000000: // -0.5f
+ *sel = V_SQ_ALU_SRC_0_5;
+ *neg ^= 1;
+ break;
+ default:
+ *sel = V_SQ_ALU_SRC_LITERAL;
+ break;
+ }
}
-static int check_scalar(struct r600_bc *bc, struct r600_bc_alu *alu)
+/* compute how many literal are needed */
+static int r600_bc_alu_nliterals(struct r600_bc *bc, struct r600_bc_alu *alu,
+ uint32_t literal[4], unsigned *nliteral)
{
- unsigned swizzle_key;
-
- if (alu->bank_swizzle_force) {
- alu->bank_swizzle = alu->bank_swizzle_force;
- return 0;
+ unsigned num_src = r600_bc_get_num_operands(bc, alu);
+ unsigned i, j;
+
+ for (i = 0; i < num_src; ++i) {
+ if (alu->src[i].sel == V_SQ_ALU_SRC_LITERAL) {
+ uint32_t value = alu->src[i].value;
+ unsigned found = 0;
+ for (j = 0; j < *nliteral; ++j) {
+ if (literal[j] == value) {
+ found = 1;
+ break;
+ }
+ }
+ if (!found) {
+ if (*nliteral >= 4)
+ return -EINVAL;
+ literal[(*nliteral)++] = value;
+ }
+ }
}
- swizzle_key = (is_const(alu->src[0].sel) ? 4 : 0 ) +
- (is_const(alu->src[1].sel) ? 2 : 0 ) +
- (is_const(alu->src[2].sel) ? 1 : 0 );
-
- alu->bank_swizzle = bank_swizzle_scl[swizzle_key];
return 0;
}
-static int check_vector(struct r600_bc *bc, struct r600_bc_alu *alu)
+static void r600_bc_alu_adjust_literals(struct r600_bc *bc,
+ struct r600_bc_alu *alu,
+ uint32_t literal[4], unsigned nliteral)
+{
+ unsigned num_src = r600_bc_get_num_operands(bc, alu);
+ unsigned i, j;
+
+ for (i = 0; i < num_src; ++i) {
+ if (alu->src[i].sel == V_SQ_ALU_SRC_LITERAL) {
+ uint32_t value = alu->src[i].value;
+ for (j = 0; j < nliteral; ++j) {
+ if (literal[j] == value) {
+ alu->src[i].chan = j;
+ break;
+ }
+ }
+ }
+ }
+}
+
+static int merge_inst_groups(struct r600_bc *bc, struct r600_bc_alu *slots[5],
+ struct r600_bc_alu *alu_prev)
{
- unsigned swizzle_key;
+ struct r600_bc_alu *prev[5];
+ struct r600_bc_alu *result[5] = { NULL };
+
+ uint32_t literal[4], prev_literal[4];
+ unsigned nliteral = 0, prev_nliteral = 0;
- if (alu->bank_swizzle_force) {
- alu->bank_swizzle = alu->bank_swizzle_force;
+ int i, j, r, src, num_src;
+ int num_once_inst = 0;
+ int have_mova = 0, have_rel = 0;
+
+ r = assign_alu_units(bc, alu_prev, prev);
+ if (r)
+ return r;
+
+ for (i = 0; i < 5; ++i) {
+ struct r600_bc_alu *alu;
+
+ /* check number of literals */
+ if (prev[i]) {
+ if (r600_bc_alu_nliterals(bc, prev[i], literal, &nliteral))
+ return 0;
+ if (r600_bc_alu_nliterals(bc, prev[i], prev_literal, &prev_nliteral))
+ return 0;
+ if (is_alu_mova_inst(bc, prev[i])) {
+ if (have_rel)
+ return 0;
+ have_mova = 1;
+ }
+ num_once_inst += is_alu_once_inst(bc, prev[i]);
+ }
+ if (slots[i] && r600_bc_alu_nliterals(bc, slots[i], literal, &nliteral))
+ return 0;
+
+ // let's check used slots
+ if (prev[i] && !slots[i]) {
+ result[i] = prev[i];
+ continue;
+ } else if (prev[i] && slots[i]) {
+ if (result[4] == NULL && prev[4] == NULL && slots[4] == NULL) {
+ // trans unit is still free try to use it
+ if (is_alu_any_unit_inst(bc, slots[i])) {
+ result[i] = prev[i];
+ result[4] = slots[i];
+ } else if (is_alu_any_unit_inst(bc, prev[i])) {
+ result[i] = slots[i];
+ result[4] = prev[i];
+ } else
+ return 0;
+ } else
+ return 0;
+ } else if(!slots[i]) {
+ continue;
+ } else
+ result[i] = slots[i];
+
+ // let's check source gprs
+ alu = slots[i];
+ num_once_inst += is_alu_once_inst(bc, alu);
+
+ num_src = r600_bc_get_num_operands(bc, alu);
+ for (src = 0; src < num_src; ++src) {
+ if (alu->src[src].rel) {
+ if (have_mova)
+ return 0;
+ have_rel = 1;
+ }
+
+ // constants doesn't matter
+ if (!is_gpr(alu->src[src].sel))
+ continue;
+
+ for (j = 0; j < 5; ++j) {
+ if (!prev[j] || !prev[j]->dst.write)
+ continue;
+
+ // if it's relative then we can't determin which gpr is really used
+ if (prev[j]->dst.chan == alu->src[src].chan &&
+ (prev[j]->dst.sel == alu->src[src].sel ||
+ prev[j]->dst.rel || alu->src[src].rel))
+ return 0;
+ }
+ }
+ }
+
+ /* more than one PRED_ or KILL_ ? */
+ if (num_once_inst > 1)
return 0;
+
+ /* check if the result can still be swizzlet */
+ r = check_and_set_bank_swizzle(bc, result);
+ if (r)
+ return 0;
+
+ /* looks like everything worked out right, apply the changes */
+
+ /* undo adding previus literals */
+ bc->cf_last->ndw -= align(prev_nliteral, 2);
+
+ /* sort instructions */
+ for (i = 0; i < 5; ++i) {
+ slots[i] = result[i];
+ if (result[i]) {
+ LIST_DEL(&result[i]->list);
+ result[i]->last = 0;
+ LIST_ADDTAIL(&result[i]->list, &bc->cf_last->alu);
+ }
+ }
+
+ /* determine new last instruction */
+ LIST_ENTRY(struct r600_bc_alu, bc->cf_last->alu.prev, list)->last = 1;
+
+ /* determine new first instruction */
+ for (i = 0; i < 5; ++i) {
+ if (result[i]) {
+ bc->cf_last->curr_bs_head = result[i];
+ break;
+ }
}
- swizzle_key = (is_const(alu->src[0].sel) ? 4 : 0 ) +
- (is_const(alu->src[1].sel) ? 2 : 0 ) +
- (is_const(alu->src[2].sel) ? 1 : 0 );
- alu->bank_swizzle = bank_swizzle_vec[swizzle_key];
+ bc->cf_last->prev_bs_head = bc->cf_last->prev2_bs_head;
+ bc->cf_last->prev2_bs_head = NULL;
+
return 0;
}
-static int check_and_set_bank_swizzle(struct r600_bc *bc, struct r600_bc_alu *alu_first)
+/* This code handles kcache lines as single blocks of 32 constants. We could
+ * probably do slightly better by recognizing that we actually have two
+ * consecutive lines of 16 constants, but the resulting code would also be
+ * somewhat more complicated. */
+static int r600_bc_alloc_kcache_lines(struct r600_bc *bc, struct r600_bc_alu *alu, int type)
{
- struct r600_bc_alu *alu = NULL;
- int num_instr = 1;
+ struct r600_bc_kcache *kcache = bc->cf_last->kcache;
+ unsigned int required_lines;
+ unsigned int free_lines = 0;
+ unsigned int cache_line[3];
+ unsigned int count = 0;
+ unsigned int i, j;
+ int r;
+
+ /* Collect required cache lines. */
+ for (i = 0; i < 3; ++i) {
+ bool found = false;
+ unsigned int line;
+
+ if (alu->src[i].sel < 512)
+ continue;
- init_gpr(alu_first);
+ line = ((alu->src[i].sel - 512) / 32) * 2;
- LIST_FOR_EACH_ENTRY(alu, &alu_first->bs_list, bs_list) {
- num_instr++;
+ for (j = 0; j < count; ++j) {
+ if (cache_line[j] == line) {
+ found = true;
+ break;
+ }
+ }
+
+ if (!found)
+ cache_line[count++] = line;
}
- if (num_instr == 1) {
- check_scalar(bc, alu_first);
-
- } else {
-/* check_read_slots(bc, bc->cf_last->curr_bs_head);*/
- check_vector(bc, alu_first);
- LIST_FOR_EACH_ENTRY(alu, &alu_first->bs_list, bs_list) {
- check_vector(bc, alu);
+ /* This should never actually happen. */
+ if (count >= 3) return -ENOMEM;
+
+ for (i = 0; i < 2; ++i) {
+ if (kcache[i].mode == V_SQ_CF_KCACHE_NOP) {
+ ++free_lines;
+ }
+ }
+
+ /* Filter lines pulled in by previous intructions. Note that this is
+ * only for the required_lines count, we can't remove these from the
+ * cache_line array since we may have to start a new ALU clause. */
+ for (i = 0, required_lines = count; i < count; ++i) {
+ for (j = 0; j < 2; ++j) {
+ if (kcache[j].mode == V_SQ_CF_KCACHE_LOCK_2 &&
+ kcache[j].addr == cache_line[i]) {
+ --required_lines;
+ break;
+ }
+ }
+ }
+
+ /* Start a new ALU clause if needed. */
+ if (required_lines > free_lines) {
+ if ((r = r600_bc_add_cf(bc))) {
+ return r;
+ }
+ bc->cf_last->inst = (type << 3);
+ kcache = bc->cf_last->kcache;
+ }
+
+ /* Setup the kcache lines. */
+ for (i = 0; i < count; ++i) {
+ bool found = false;
+
+ for (j = 0; j < 2; ++j) {
+ if (kcache[j].mode == V_SQ_CF_KCACHE_LOCK_2 &&
+ kcache[j].addr == cache_line[i]) {
+ found = true;
+ break;
+ }
+ }
+
+ if (found) continue;
+
+ for (j = 0; j < 2; ++j) {
+ if (kcache[j].mode == V_SQ_CF_KCACHE_NOP) {
+ kcache[j].bank = 0;
+ kcache[j].addr = cache_line[i];
+ kcache[j].mode = V_SQ_CF_KCACHE_LOCK_2;
+ break;
+ }
+ }
+ }
+
+ /* Alter the src operands to refer to the kcache. */
+ for (i = 0; i < 3; ++i) {
+ static const unsigned int base[] = {128, 160, 256, 288};
+ unsigned int line;
+
+ if (alu->src[i].sel < 512)
+ continue;
+
+ alu->src[i].sel -= 512;
+ line = (alu->src[i].sel / 32) * 2;
+
+ for (j = 0; j < 2; ++j) {
+ if (kcache[j].mode == V_SQ_CF_KCACHE_LOCK_2 &&
+ kcache[j].addr == line) {
+ alu->src[i].sel &= 0x1f;
+ alu->src[i].sel += base[j];
+ break;
+ }
}
}
+
return 0;
}
@@ -419,62 +1146,100 @@ int r600_bc_add_alu_type(struct r600_bc *bc, const struct r600_bc_alu *alu, int
if (nalu == NULL)
return -ENOMEM;
memcpy(nalu, alu, sizeof(struct r600_bc_alu));
- nalu->nliteral = 0;
+
+ if (bc->cf_last != NULL && bc->cf_last->inst != (type << 3)) {
+ /* check if we could add it anyway */
+ if (bc->cf_last->inst == (V_SQ_CF_ALU_WORD1_SQ_CF_INST_ALU << 3) &&
+ type == V_SQ_CF_ALU_WORD1_SQ_CF_INST_ALU_PUSH_BEFORE) {
+ LIST_FOR_EACH_ENTRY(lalu, &bc->cf_last->alu, list) {
+ if (lalu->predicate) {
+ bc->force_add_cf = 1;
+ break;
+ }
+ }
+ } else
+ bc->force_add_cf = 1;
+ }
/* cf can contains only alu or only vtx or only tex */
- if (bc->cf_last == NULL || bc->cf_last->inst != (type << 3) ||
- bc->force_add_cf) {
+ if (bc->cf_last == NULL || bc->force_add_cf) {
r = r600_bc_add_cf(bc);
if (r) {
free(nalu);
return r;
}
- bc->cf_last->inst = (type << 3);
}
+ bc->cf_last->inst = (type << 3);
+
+ /* Setup the kcache for this ALU instruction. This will start a new
+ * ALU clause if needed. */
+ if ((r = r600_bc_alloc_kcache_lines(bc, nalu, type))) {
+ free(nalu);
+ return r;
+ }
+
if (!bc->cf_last->curr_bs_head) {
bc->cf_last->curr_bs_head = nalu;
- LIST_INITHEAD(&nalu->bs_list);
- } else {
- LIST_ADDTAIL(&nalu->bs_list, &bc->cf_last->curr_bs_head->bs_list);
- }
- /* at most 128 slots, one add alu can add 4 slots + 4 constants(2 slots)
- * worst case */
- if (alu->last && (bc->cf_last->ndw >> 1) >= 120) {
- bc->force_add_cf = 1;
}
/* number of gpr == the last gpr used in any alu */
for (i = 0; i < 3; i++) {
- if (alu->src[i].sel >= bc->ngpr && alu->src[i].sel < 128) {
- bc->ngpr = alu->src[i].sel + 1;
- }
- /* compute how many literal are needed
- * either 2 or 4 literals
- */
- if (alu->src[i].sel == 253) {
- if (((alu->src[i].chan + 2) & 0x6) > nalu->nliteral) {
- nalu->nliteral = (alu->src[i].chan + 2) & 0x6;
- }
+ if (nalu->src[i].sel >= bc->ngpr && nalu->src[i].sel < 128) {
+ bc->ngpr = nalu->src[i].sel + 1;
}
+ if (nalu->src[i].sel == V_SQ_ALU_SRC_LITERAL)
+ r600_bc_special_constants(nalu->src[i].value,
+ &nalu->src[i].sel, &nalu->src[i].neg);
}
- if (!LIST_IS_EMPTY(&bc->cf_last->alu)) {
- lalu = LIST_ENTRY(struct r600_bc_alu, bc->cf_last->alu.prev, list);
- if (!lalu->last && lalu->nliteral > nalu->nliteral) {
- nalu->nliteral = lalu->nliteral;
- }
- }
- if (alu->dst.sel >= bc->ngpr) {
- bc->ngpr = alu->dst.sel + 1;
+ if (nalu->dst.sel >= bc->ngpr) {
+ bc->ngpr = nalu->dst.sel + 1;
}
LIST_ADDTAIL(&nalu->list, &bc->cf_last->alu);
/* each alu use 2 dwords */
bc->cf_last->ndw += 2;
bc->ndw += 2;
- bc->cf_last->kcache0_mode = 2;
-
/* process cur ALU instructions for bank swizzle */
- if (alu->last) {
- check_and_set_bank_swizzle(bc, bc->cf_last->curr_bs_head);
+ if (nalu->last) {
+ uint32_t literal[4];
+ unsigned nliteral;
+ struct r600_bc_alu *slots[5];
+ r = assign_alu_units(bc, bc->cf_last->curr_bs_head, slots);
+ if (r)
+ return r;
+
+ if (bc->cf_last->prev_bs_head) {
+ r = merge_inst_groups(bc, slots, bc->cf_last->prev_bs_head);
+ if (r)
+ return r;
+ }
+
+ if (bc->cf_last->prev_bs_head) {
+ r = replace_gpr_with_pv_ps(bc, slots, bc->cf_last->prev_bs_head);
+ if (r)
+ return r;
+ }
+
+ r = check_and_set_bank_swizzle(bc, slots);
+ if (r)
+ return r;
+
+ for (i = 0, nliteral = 0; i < 5; i++) {
+ if (slots[i]) {
+ r = r600_bc_alu_nliterals(bc, slots[i], literal, &nliteral);
+ if (r)
+ return r;
+ }
+ }
+ bc->cf_last->ndw += align(nliteral, 2);
+
+ /* at most 128 slots, one add alu can add 5 slots + 4 constants(2 slots)
+ * worst case */
+ if ((bc->cf_last->ndw >> 1) >= 120) {
+ bc->force_add_cf = 1;
+ }
+
+ bc->cf_last->prev2_bs_head = bc->cf_last->prev_bs_head;
+ bc->cf_last->prev_bs_head = bc->cf_last->curr_bs_head;
bc->cf_last->curr_bs_head = NULL;
}
return 0;
@@ -485,42 +1250,22 @@ int r600_bc_add_alu(struct r600_bc *bc, const struct r600_bc_alu *alu)
return r600_bc_add_alu_type(bc, alu, BC_INST(bc, V_SQ_CF_ALU_WORD1_SQ_CF_INST_ALU));
}
-int r600_bc_add_literal(struct r600_bc *bc, const u32 *value)
+static unsigned r600_bc_num_tex_and_vtx_instructions(const struct r600_bc *bc)
{
- struct r600_bc_alu *alu;
+ switch (bc->chiprev) {
+ case CHIPREV_R600:
+ return 8;
- if (bc->cf_last == NULL) {
- return 0;
- }
- if (bc->cf_last->inst == V_SQ_CF_WORD1_SQ_CF_INST_TEX) {
- return 0;
- }
- /* all same on EG */
- if (bc->cf_last->inst == V_SQ_CF_WORD1_SQ_CF_INST_JUMP ||
- bc->cf_last->inst == V_SQ_CF_WORD1_SQ_CF_INST_ELSE ||
- bc->cf_last->inst == V_SQ_CF_WORD1_SQ_CF_INST_LOOP_START_NO_AL ||
- bc->cf_last->inst == V_SQ_CF_WORD1_SQ_CF_INST_LOOP_BREAK ||
- bc->cf_last->inst == V_SQ_CF_WORD1_SQ_CF_INST_LOOP_CONTINUE ||
- bc->cf_last->inst == V_SQ_CF_WORD1_SQ_CF_INST_LOOP_END ||
- bc->cf_last->inst == V_SQ_CF_WORD1_SQ_CF_INST_POP) {
- return 0;
- }
- /* same on EG */
- if (((bc->cf_last->inst != (V_SQ_CF_ALU_WORD1_SQ_CF_INST_ALU << 3)) &&
- (bc->cf_last->inst != (V_SQ_CF_ALU_WORD1_SQ_CF_INST_ALU_PUSH_BEFORE << 3))) ||
- LIST_IS_EMPTY(&bc->cf_last->alu)) {
- R600_ERR("last CF is not ALU (%p)\n", bc->cf_last);
- return -EINVAL;
- }
- alu = LIST_ENTRY(struct r600_bc_alu, bc->cf_last->alu.prev, list);
- if (!alu->last || !alu->nliteral || alu->literal_added) {
- return 0;
+ case CHIPREV_R700:
+ return 16;
+
+ case CHIPREV_EVERGREEN:
+ return 64;
+
+ default:
+ R600_ERR("Unknown chiprev %d.\n", bc->chiprev);
+ return 8;
}
- memcpy(alu->value, value, 4 * 4);
- bc->cf_last->ndw += alu->nliteral;
- bc->ndw += alu->nliteral;
- alu->literal_added = 1;
- return 0;
}
int r600_bc_add_vtx(struct r600_bc *bc, const struct r600_bc_vtx *vtx)
@@ -548,7 +1293,7 @@ int r600_bc_add_vtx(struct r600_bc *bc, const struct r600_bc_vtx *vtx)
/* each fetch use 4 dwords */
bc->cf_last->ndw += 4;
bc->ndw += 4;
- if ((bc->ndw / 4) > 7)
+ if ((bc->cf_last->ndw / 4) >= r600_bc_num_tex_and_vtx_instructions(bc))
bc->force_add_cf = 1;
return 0;
}
@@ -562,6 +1307,18 @@ int r600_bc_add_tex(struct r600_bc *bc, const struct r600_bc_tex *tex)
return -ENOMEM;
memcpy(ntex, tex, sizeof(struct r600_bc_tex));
+ /* we can't fetch data und use it as texture lookup address in the same TEX clause */
+ if (bc->cf_last != NULL &&
+ bc->cf_last->inst == V_SQ_CF_WORD1_SQ_CF_INST_TEX) {
+ struct r600_bc_tex *ttex;
+ LIST_FOR_EACH_ENTRY(ttex, &bc->cf_last->tex, list) {
+ if (ttex->dst_gpr == ntex->src_gpr) {
+ bc->force_add_cf = 1;
+ break;
+ }
+ }
+ }
+
/* cf can contains only alu or only vtx or only tex */
if (bc->cf_last == NULL ||
bc->cf_last->inst != V_SQ_CF_WORD1_SQ_CF_INST_TEX ||
@@ -573,11 +1330,17 @@ int r600_bc_add_tex(struct r600_bc *bc, const struct r600_bc_tex *tex)
}
bc->cf_last->inst = V_SQ_CF_WORD1_SQ_CF_INST_TEX;
}
+ if (ntex->src_gpr >= bc->ngpr) {
+ bc->ngpr = ntex->src_gpr + 1;
+ }
+ if (ntex->dst_gpr >= bc->ngpr) {
+ bc->ngpr = ntex->dst_gpr + 1;
+ }
LIST_ADDTAIL(&ntex->list, &bc->cf_last->tex);
/* each texture fetch use 4 dwords */
bc->cf_last->ndw += 4;
bc->ndw += 4;
- if ((bc->ndw / 4) > 7)
+ if ((bc->cf_last->ndw / 4) >= r600_bc_num_tex_and_vtx_instructions(bc))
bc->force_add_cf = 1;
return 0;
}
@@ -597,31 +1360,8 @@ int r600_bc_add_cfinst(struct r600_bc *bc, int inst)
/* common to all 3 families */
static int r600_bc_vtx_build(struct r600_bc *bc, struct r600_bc_vtx *vtx, unsigned id)
{
- unsigned fetch_resource_start = 0;
-
- /* check if we are fetch shader */
- /* fetch shader can also access vertex resource,
- * first fetch shader resource is at 160
- */
- if (bc->type == -1) {
- switch (bc->chiprev) {
- /* r600 */
- case CHIPREV_R600:
- /* r700 */
- case CHIPREV_R700:
- fetch_resource_start = 160;
- break;
- /* evergreen */
- case CHIPREV_EVERGREEN:
- fetch_resource_start = 0;
- break;
- default:
- fprintf(stderr, "%s:%s:%d unknown chiprev %d\n",
- __FILE__, __func__, __LINE__, bc->chiprev);
- break;
- }
- }
- bc->bytecode[id++] = S_SQ_VTX_WORD0_BUFFER_ID(vtx->buffer_id + fetch_resource_start) |
+ bc->bytecode[id++] = S_SQ_VTX_WORD0_BUFFER_ID(vtx->buffer_id) |
+ S_SQ_VTX_WORD0_FETCH_TYPE(vtx->fetch_type) |
S_SQ_VTX_WORD0_SRC_GPR(vtx->src_gpr) |
S_SQ_VTX_WORD0_SRC_SEL_X(vtx->src_sel_x) |
S_SQ_VTX_WORD0_MEGA_FETCH_COUNT(vtx->mega_fetch_count);
@@ -635,7 +1375,8 @@ static int r600_bc_vtx_build(struct r600_bc *bc, struct r600_bc_vtx *vtx, unsign
S_SQ_VTX_WORD1_FORMAT_COMP_ALL(vtx->format_comp_all) |
S_SQ_VTX_WORD1_SRF_MODE_ALL(vtx->srf_mode_all) |
S_SQ_VTX_WORD1_GPR_DST_GPR(vtx->dst_gpr);
- bc->bytecode[id++] = S_SQ_VTX_WORD2_MEGA_FETCH(1);
+ bc->bytecode[id++] = S_SQ_VTX_WORD2_OFFSET(vtx->offset) |
+ S_SQ_VTX_WORD2_MEGA_FETCH(1);
bc->bytecode[id++] = 0;
return 0;
}
@@ -673,8 +1414,6 @@ static int r600_bc_tex_build(struct r600_bc *bc, struct r600_bc_tex *tex, unsign
/* r600 only, r700/eg bits in r700_asm.c */
static int r600_bc_alu_build(struct r600_bc *bc, struct r600_bc_alu *alu, unsigned id)
{
- unsigned i;
-
/* don't replace gpr by pv or ps for destination register */
bc->bytecode[id++] = S_SQ_ALU_WORD0_SRC0_SEL(alu->src[0].sel) |
S_SQ_ALU_WORD0_SRC0_REL(alu->src[0].rel) |
@@ -705,22 +1444,23 @@ static int r600_bc_alu_build(struct r600_bc *bc, struct r600_bc_alu *alu, unsign
S_SQ_ALU_WORD1_OP2_SRC0_ABS(alu->src[0].abs) |
S_SQ_ALU_WORD1_OP2_SRC1_ABS(alu->src[1].abs) |
S_SQ_ALU_WORD1_OP2_WRITE_MASK(alu->dst.write) |
+ S_SQ_ALU_WORD1_OP2_OMOD(alu->omod) |
S_SQ_ALU_WORD1_OP2_ALU_INST(alu->inst) |
S_SQ_ALU_WORD1_BANK_SWIZZLE(alu->bank_swizzle) |
S_SQ_ALU_WORD1_OP2_UPDATE_EXECUTE_MASK(alu->predicate) |
S_SQ_ALU_WORD1_OP2_UPDATE_PRED(alu->predicate);
}
- if (alu->last) {
- if (alu->nliteral && !alu->literal_added) {
- R600_ERR("Bug in ALU processing for instruction 0x%08x, literal not added correctly\n", alu->inst);
- }
- for (i = 0; i < alu->nliteral; i++) {
- bc->bytecode[id++] = alu->value[i];
- }
- }
return 0;
}
+static void r600_bc_cf_vtx_build(uint32_t *bytecode, const struct r600_bc_cf *cf)
+{
+ *bytecode++ = S_SQ_CF_WORD0_ADDR(cf->addr >> 1);
+ *bytecode++ = S_SQ_CF_WORD1_CF_INST(cf->inst) |
+ S_SQ_CF_WORD1_BARRIER(1) |
+ S_SQ_CF_WORD1_COUNT((cf->ndw / 4) - 1);
+}
+
/* common for r600/r700 - eg in eg_asm.c */
static int r600_bc_cf_build(struct r600_bc *bc, struct r600_bc_cf *cf)
{
@@ -729,15 +1469,17 @@ static int r600_bc_cf_build(struct r600_bc *bc, struct r600_bc_cf *cf)
switch (cf->inst) {
case (V_SQ_CF_ALU_WORD1_SQ_CF_INST_ALU << 3):
case (V_SQ_CF_ALU_WORD1_SQ_CF_INST_ALU_PUSH_BEFORE << 3):
+ case (V_SQ_CF_ALU_WORD1_SQ_CF_INST_ALU_POP_AFTER << 3):
+ case (V_SQ_CF_ALU_WORD1_SQ_CF_INST_ALU_POP2_AFTER << 3):
bc->bytecode[id++] = S_SQ_CF_ALU_WORD0_ADDR(cf->addr >> 1) |
- S_SQ_CF_ALU_WORD0_KCACHE_MODE0(cf->kcache0_mode) |
- S_SQ_CF_ALU_WORD0_KCACHE_BANK0(cf->kcache0_bank) |
- S_SQ_CF_ALU_WORD0_KCACHE_BANK1(cf->kcache1_bank);
+ S_SQ_CF_ALU_WORD0_KCACHE_MODE0(cf->kcache[0].mode) |
+ S_SQ_CF_ALU_WORD0_KCACHE_BANK0(cf->kcache[0].bank) |
+ S_SQ_CF_ALU_WORD0_KCACHE_BANK1(cf->kcache[1].bank);
bc->bytecode[id++] = S_SQ_CF_ALU_WORD1_CF_INST(cf->inst >> 3) |
- S_SQ_CF_ALU_WORD1_KCACHE_MODE1(cf->kcache1_mode) |
- S_SQ_CF_ALU_WORD1_KCACHE_ADDR0(cf->kcache0_addr) |
- S_SQ_CF_ALU_WORD1_KCACHE_ADDR1(cf->kcache1_addr) |
+ S_SQ_CF_ALU_WORD1_KCACHE_MODE1(cf->kcache[1].mode) |
+ S_SQ_CF_ALU_WORD1_KCACHE_ADDR0(cf->kcache[0].addr) |
+ S_SQ_CF_ALU_WORD1_KCACHE_ADDR1(cf->kcache[1].addr) |
S_SQ_CF_ALU_WORD1_BARRIER(1) |
S_SQ_CF_ALU_WORD1_USES_WATERFALL(bc->chiprev == CHIPREV_R600 ? cf->r6xx_uses_waterfall : 0) |
S_SQ_CF_ALU_WORD1_COUNT((cf->ndw / 2) - 1);
@@ -745,10 +1487,10 @@ static int r600_bc_cf_build(struct r600_bc *bc, struct r600_bc_cf *cf)
case V_SQ_CF_WORD1_SQ_CF_INST_TEX:
case V_SQ_CF_WORD1_SQ_CF_INST_VTX:
case V_SQ_CF_WORD1_SQ_CF_INST_VTX_TC:
- bc->bytecode[id++] = S_SQ_CF_WORD0_ADDR(cf->addr >> 1);
- bc->bytecode[id++] = S_SQ_CF_WORD1_CF_INST(cf->inst) |
- S_SQ_CF_WORD1_BARRIER(1) |
- S_SQ_CF_WORD1_COUNT((cf->ndw / 4) - 1);
+ if (bc->chiprev == CHIPREV_R700)
+ r700_bc_cf_vtx_build(&bc->bytecode[id], cf);
+ else
+ r600_bc_cf_vtx_build(&bc->bytecode[id], cf);
break;
case V_SQ_CF_ALLOC_EXPORT_WORD1_SQ_CF_INST_EXPORT:
case V_SQ_CF_ALLOC_EXPORT_WORD1_SQ_CF_INST_EXPORT_DONE:
@@ -756,7 +1498,8 @@ static int r600_bc_cf_build(struct r600_bc *bc, struct r600_bc_cf *cf)
S_SQ_CF_ALLOC_EXPORT_WORD0_ELEM_SIZE(cf->output.elem_size) |
S_SQ_CF_ALLOC_EXPORT_WORD0_ARRAY_BASE(cf->output.array_base) |
S_SQ_CF_ALLOC_EXPORT_WORD0_TYPE(cf->output.type);
- bc->bytecode[id++] = S_SQ_CF_ALLOC_EXPORT_WORD1_SWIZ_SEL_X(cf->output.swizzle_x) |
+ bc->bytecode[id++] = S_SQ_CF_ALLOC_EXPORT_WORD1_BURST_COUNT(cf->output.burst_count - 1) |
+ S_SQ_CF_ALLOC_EXPORT_WORD1_SWIZ_SEL_X(cf->output.swizzle_x) |
S_SQ_CF_ALLOC_EXPORT_WORD1_SWIZ_SEL_Y(cf->output.swizzle_y) |
S_SQ_CF_ALLOC_EXPORT_WORD1_SWIZ_SEL_Z(cf->output.swizzle_z) |
S_SQ_CF_ALLOC_EXPORT_WORD1_SWIZ_SEL_W(cf->output.swizzle_w) |
@@ -793,8 +1536,10 @@ int r600_bc_build(struct r600_bc *bc)
struct r600_bc_alu *alu;
struct r600_bc_vtx *vtx;
struct r600_bc_tex *tex;
+ uint32_t literal[4];
+ unsigned nliteral;
unsigned addr;
- int r;
+ int i, r;
if (bc->callstack[0].max > 0)
bc->nstack = ((bc->callstack[0].max + 3) >> 2) + 2;
@@ -808,6 +1553,8 @@ int r600_bc_build(struct r600_bc *bc)
LIST_FOR_EACH_ENTRY(cf, &bc->cf, list) {
switch (cf->inst) {
case (V_SQ_CF_ALU_WORD1_SQ_CF_INST_ALU << 3):
+ case (V_SQ_CF_ALU_WORD1_SQ_CF_INST_ALU_POP_AFTER << 3):
+ case (V_SQ_CF_ALU_WORD1_SQ_CF_INST_ALU_POP2_AFTER << 3):
case (V_SQ_CF_ALU_WORD1_SQ_CF_INST_ALU_PUSH_BEFORE << 3):
break;
case V_SQ_CF_WORD1_SQ_CF_INST_TEX:
@@ -854,8 +1601,16 @@ int r600_bc_build(struct r600_bc *bc)
return r;
switch (cf->inst) {
case (V_SQ_CF_ALU_WORD1_SQ_CF_INST_ALU << 3):
+ case (V_SQ_CF_ALU_WORD1_SQ_CF_INST_ALU_POP_AFTER << 3):
+ case (V_SQ_CF_ALU_WORD1_SQ_CF_INST_ALU_POP2_AFTER << 3):
case (V_SQ_CF_ALU_WORD1_SQ_CF_INST_ALU_PUSH_BEFORE << 3):
+ nliteral = 0;
+ memset(literal, 0, sizeof(literal));
LIST_FOR_EACH_ENTRY(alu, &cf->alu, list) {
+ r = r600_bc_alu_nliterals(bc, alu, literal, &nliteral);
+ if (r)
+ return r;
+ r600_bc_alu_adjust_literals(bc, alu, literal, nliteral);
switch(bc->chiprev) {
case CHIPREV_R600:
r = r600_bc_alu_build(bc, alu, addr);
@@ -872,7 +1627,11 @@ int r600_bc_build(struct r600_bc *bc)
return r;
addr += 2;
if (alu->last) {
- addr += alu->nliteral;
+ for (i = 0; i < align(nliteral, 2); ++i) {
+ bc->bytecode[addr++] = literal[i];
+ }
+ nliteral = 0;
+ memset(literal, 0, sizeof(literal));
}
}
break;
@@ -953,7 +1712,14 @@ void r600_bc_clear(struct r600_bc *bc)
void r600_bc_dump(struct r600_bc *bc)
{
- unsigned i;
+ struct r600_bc_cf *cf = NULL;
+ struct r600_bc_alu *alu = NULL;
+ struct r600_bc_vtx *vtx = NULL;
+ struct r600_bc_tex *tex = NULL;
+
+ unsigned i, id;
+ uint32_t literal[4];
+ unsigned nliteral;
char chip = '6';
switch (bc->chiprev) {
@@ -968,84 +1734,191 @@ void r600_bc_dump(struct r600_bc *bc)
chip = '6';
break;
}
- fprintf(stderr, "bytecode %d dw -----------------------\n", bc->ndw);
+ fprintf(stderr, "bytecode %d dw -- %d gprs ---------------------\n", bc->ndw, bc->ngpr);
fprintf(stderr, " %c\n", chip);
- for (i = 0; i < bc->ndw; i++) {
- fprintf(stderr, "0x%08X\n", bc->bytecode[i]);
- }
- fprintf(stderr, "--------------------------------------\n");
-}
-void r600_cf_vtx(struct r600_vertex_element *ve, u32 *bytecode, unsigned count)
-{
- struct r600_pipe_state *rstate;
- unsigned i = 0;
-
- if (count > 8) {
- bytecode[i++] = S_SQ_CF_WORD0_ADDR(8 >> 1);
- bytecode[i++] = S_SQ_CF_WORD1_CF_INST(V_SQ_CF_WORD1_SQ_CF_INST_VTX) |
- S_SQ_CF_WORD1_BARRIER(1) |
- S_SQ_CF_WORD1_COUNT(8 - 1);
- bytecode[i++] = S_SQ_CF_WORD0_ADDR(40 >> 1);
- bytecode[i++] = S_SQ_CF_WORD1_CF_INST(V_SQ_CF_WORD1_SQ_CF_INST_VTX) |
- S_SQ_CF_WORD1_BARRIER(1) |
- S_SQ_CF_WORD1_COUNT(count - 8 - 1);
- } else {
- bytecode[i++] = S_SQ_CF_WORD0_ADDR(8 >> 1);
- bytecode[i++] = S_SQ_CF_WORD1_CF_INST(V_SQ_CF_WORD1_SQ_CF_INST_VTX) |
- S_SQ_CF_WORD1_BARRIER(1) |
- S_SQ_CF_WORD1_COUNT(count - 1);
- }
- bytecode[i++] = S_SQ_CF_WORD0_ADDR(0);
- bytecode[i++] = S_SQ_CF_WORD1_CF_INST(V_SQ_CF_WORD1_SQ_CF_INST_RETURN) |
- S_SQ_CF_WORD1_BARRIER(1);
-
- rstate = &ve->rstate;
- rstate->id = R600_PIPE_STATE_FETCH_SHADER;
- rstate->nregs = 0;
- r600_pipe_state_add_reg(rstate, R_0288A4_SQ_PGM_RESOURCES_FS,
- 0x00000000, 0xFFFFFFFF, NULL);
- r600_pipe_state_add_reg(rstate, R_0288DC_SQ_PGM_CF_OFFSET_FS,
- 0x00000000, 0xFFFFFFFF, NULL);
- r600_pipe_state_add_reg(rstate, R_028894_SQ_PGM_START_FS,
- r600_bo_offset(ve->fetch_shader) >> 8,
- 0xFFFFFFFF, ve->fetch_shader);
-}
+ LIST_FOR_EACH_ENTRY(cf, &bc->cf, list) {
+ id = cf->id;
-void r600_cf_vtx_tc(struct r600_vertex_element *ve, u32 *bytecode, unsigned count)
-{
- struct r600_pipe_state *rstate;
- unsigned i = 0;
-
- if (count > 8) {
- bytecode[i++] = S_SQ_CF_WORD0_ADDR(8 >> 1);
- bytecode[i++] = S_SQ_CF_WORD1_CF_INST(V_SQ_CF_WORD1_SQ_CF_INST_VTX_TC) |
- S_SQ_CF_WORD1_BARRIER(1) |
- S_SQ_CF_WORD1_COUNT(8 - 1);
- bytecode[i++] = S_SQ_CF_WORD0_ADDR(40 >> 1);
- bytecode[i++] = S_SQ_CF_WORD1_CF_INST(V_SQ_CF_WORD1_SQ_CF_INST_VTX_TC) |
- S_SQ_CF_WORD1_BARRIER(1) |
- S_SQ_CF_WORD1_COUNT((count - 8) - 1);
- } else {
- bytecode[i++] = S_SQ_CF_WORD0_ADDR(8 >> 1);
- bytecode[i++] = S_SQ_CF_WORD1_CF_INST(V_SQ_CF_WORD1_SQ_CF_INST_VTX_TC) |
- S_SQ_CF_WORD1_BARRIER(1) |
- S_SQ_CF_WORD1_COUNT(count - 1);
+ switch (cf->inst) {
+ case (V_SQ_CF_ALU_WORD1_SQ_CF_INST_ALU << 3):
+ case (V_SQ_CF_ALU_WORD1_SQ_CF_INST_ALU_POP_AFTER << 3):
+ case (V_SQ_CF_ALU_WORD1_SQ_CF_INST_ALU_POP2_AFTER << 3):
+ case (V_SQ_CF_ALU_WORD1_SQ_CF_INST_ALU_PUSH_BEFORE << 3):
+ fprintf(stderr, "%04d %08X ALU ", id, bc->bytecode[id]);
+ fprintf(stderr, "ADDR:%d ", cf->addr);
+ fprintf(stderr, "KCACHE_MODE0:%X ", cf->kcache[0].mode);
+ fprintf(stderr, "KCACHE_BANK0:%X ", cf->kcache[0].bank);
+ fprintf(stderr, "KCACHE_BANK1:%X\n", cf->kcache[1].bank);
+ id++;
+ fprintf(stderr, "%04d %08X ALU ", id, bc->bytecode[id]);
+ fprintf(stderr, "INST:%d ", cf->inst);
+ fprintf(stderr, "KCACHE_MODE1:%X ", cf->kcache[1].mode);
+ fprintf(stderr, "KCACHE_ADDR0:%X ", cf->kcache[0].addr);
+ fprintf(stderr, "KCACHE_ADDR1:%X ", cf->kcache[1].addr);
+ fprintf(stderr, "COUNT:%d\n", cf->ndw / 2);
+ break;
+ case V_SQ_CF_WORD1_SQ_CF_INST_TEX:
+ case V_SQ_CF_WORD1_SQ_CF_INST_VTX:
+ case V_SQ_CF_WORD1_SQ_CF_INST_VTX_TC:
+ fprintf(stderr, "%04d %08X TEX/VTX ", id, bc->bytecode[id]);
+ fprintf(stderr, "ADDR:%d\n", cf->addr);
+ id++;
+ fprintf(stderr, "%04d %08X TEX/VTX ", id, bc->bytecode[id]);
+ fprintf(stderr, "INST:%d ", cf->inst);
+ fprintf(stderr, "COUNT:%d\n", cf->ndw / 4);
+ break;
+ case V_SQ_CF_ALLOC_EXPORT_WORD1_SQ_CF_INST_EXPORT:
+ case V_SQ_CF_ALLOC_EXPORT_WORD1_SQ_CF_INST_EXPORT_DONE:
+ fprintf(stderr, "%04d %08X EXPORT ", id, bc->bytecode[id]);
+ fprintf(stderr, "GPR:%X ", cf->output.gpr);
+ fprintf(stderr, "ELEM_SIZE:%X ", cf->output.elem_size);
+ fprintf(stderr, "ARRAY_BASE:%X ", cf->output.array_base);
+ fprintf(stderr, "TYPE:%X\n", cf->output.type);
+ id++;
+ fprintf(stderr, "%04d %08X EXPORT ", id, bc->bytecode[id]);
+ fprintf(stderr, "SWIZ_X:%X ", cf->output.swizzle_x);
+ fprintf(stderr, "SWIZ_Y:%X ", cf->output.swizzle_y);
+ fprintf(stderr, "SWIZ_Z:%X ", cf->output.swizzle_z);
+ fprintf(stderr, "SWIZ_W:%X ", cf->output.swizzle_w);
+ fprintf(stderr, "BARRIER:%X ", cf->output.barrier);
+ fprintf(stderr, "INST:%d ", cf->output.inst);
+ fprintf(stderr, "BURST_COUNT:%d ", cf->output.burst_count);
+ fprintf(stderr, "EOP:%X\n", cf->output.end_of_program);
+ break;
+ case V_SQ_CF_WORD1_SQ_CF_INST_JUMP:
+ case V_SQ_CF_WORD1_SQ_CF_INST_ELSE:
+ case V_SQ_CF_WORD1_SQ_CF_INST_POP:
+ case V_SQ_CF_WORD1_SQ_CF_INST_LOOP_START_NO_AL:
+ case V_SQ_CF_WORD1_SQ_CF_INST_LOOP_END:
+ case V_SQ_CF_WORD1_SQ_CF_INST_LOOP_CONTINUE:
+ case V_SQ_CF_WORD1_SQ_CF_INST_LOOP_BREAK:
+ case V_SQ_CF_WORD1_SQ_CF_INST_CALL_FS:
+ case V_SQ_CF_WORD1_SQ_CF_INST_RETURN:
+ fprintf(stderr, "%04d %08X CF ", id, bc->bytecode[id]);
+ fprintf(stderr, "ADDR:%d\n", cf->cf_addr);
+ id++;
+ fprintf(stderr, "%04d %08X CF ", id, bc->bytecode[id]);
+ fprintf(stderr, "INST:%d ", cf->inst);
+ fprintf(stderr, "COND:%X ", cf->cond);
+ fprintf(stderr, "POP_COUNT:%X\n", cf->pop_count);
+ break;
+ }
+
+ id = cf->addr;
+ nliteral = 0;
+ LIST_FOR_EACH_ENTRY(alu, &cf->alu, list) {
+ r600_bc_alu_nliterals(bc, alu, literal, &nliteral);
+
+ fprintf(stderr, "%04d %08X ", id, bc->bytecode[id]);
+ fprintf(stderr, "SRC0(SEL:%d ", alu->src[0].sel);
+ fprintf(stderr, "REL:%d ", alu->src[0].rel);
+ fprintf(stderr, "CHAN:%d ", alu->src[0].chan);
+ fprintf(stderr, "NEG:%d) ", alu->src[0].neg);
+ fprintf(stderr, "SRC1(SEL:%d ", alu->src[1].sel);
+ fprintf(stderr, "REL:%d ", alu->src[1].rel);
+ fprintf(stderr, "CHAN:%d ", alu->src[1].chan);
+ fprintf(stderr, "NEG:%d) ", alu->src[1].neg);
+ fprintf(stderr, "LAST:%d)\n", alu->last);
+ id++;
+ fprintf(stderr, "%04d %08X %c ", id, bc->bytecode[id], alu->last ? '*' : ' ');
+ fprintf(stderr, "INST:%d ", alu->inst);
+ fprintf(stderr, "DST(SEL:%d ", alu->dst.sel);
+ fprintf(stderr, "CHAN:%d ", alu->dst.chan);
+ fprintf(stderr, "REL:%d ", alu->dst.rel);
+ fprintf(stderr, "CLAMP:%d) ", alu->dst.clamp);
+ fprintf(stderr, "BANK_SWIZZLE:%d ", alu->bank_swizzle);
+ if (alu->is_op3) {
+ fprintf(stderr, "SRC2(SEL:%d ", alu->src[2].sel);
+ fprintf(stderr, "REL:%d ", alu->src[2].rel);
+ fprintf(stderr, "CHAN:%d ", alu->src[2].chan);
+ fprintf(stderr, "NEG:%d)\n", alu->src[2].neg);
+ } else {
+ fprintf(stderr, "SRC0_ABS:%d ", alu->src[0].abs);
+ fprintf(stderr, "SRC1_ABS:%d ", alu->src[1].abs);
+ fprintf(stderr, "WRITE_MASK:%d ", alu->dst.write);
+ fprintf(stderr, "OMOD:%d ", alu->omod);
+ fprintf(stderr, "EXECUTE_MASK:%d ", alu->predicate);
+ fprintf(stderr, "UPDATE_PRED:%d\n", alu->predicate);
+ }
+
+ id++;
+ if (alu->last) {
+ for (i = 0; i < nliteral; i++, id++) {
+ float *f = (float*)(bc->bytecode + id);
+ fprintf(stderr, "%04d %08X\t%f\n", id, bc->bytecode[id], *f);
+ }
+ id += nliteral & 1;
+ nliteral = 0;
+ }
+ }
+
+ LIST_FOR_EACH_ENTRY(tex, &cf->tex, list) {
+ fprintf(stderr, "%04d %08X ", id, bc->bytecode[id]);
+ fprintf(stderr, "INST:%d ", tex->inst);
+ fprintf(stderr, "RESOURCE_ID:%d ", tex->resource_id);
+ fprintf(stderr, "SRC(GPR:%d ", tex->src_gpr);
+ fprintf(stderr, "REL:%d)\n", tex->src_rel);
+ id++;
+ fprintf(stderr, "%04d %08X ", id, bc->bytecode[id]);
+ fprintf(stderr, "DST(GPR:%d ", tex->dst_gpr);
+ fprintf(stderr, "REL:%d ", tex->dst_rel);
+ fprintf(stderr, "SEL_X:%d ", tex->dst_sel_x);
+ fprintf(stderr, "SEL_Y:%d ", tex->dst_sel_y);
+ fprintf(stderr, "SEL_Z:%d ", tex->dst_sel_z);
+ fprintf(stderr, "SEL_W:%d) ", tex->dst_sel_w);
+ fprintf(stderr, "LOD_BIAS:%d ", tex->lod_bias);
+ fprintf(stderr, "COORD_TYPE_X:%d ", tex->coord_type_x);
+ fprintf(stderr, "COORD_TYPE_Y:%d ", tex->coord_type_y);
+ fprintf(stderr, "COORD_TYPE_Z:%d ", tex->coord_type_z);
+ fprintf(stderr, "COORD_TYPE_W:%d\n", tex->coord_type_w);
+ id++;
+ fprintf(stderr, "%04d %08X ", id, bc->bytecode[id]);
+ fprintf(stderr, "OFFSET_X:%d ", tex->offset_x);
+ fprintf(stderr, "OFFSET_Y:%d ", tex->offset_y);
+ fprintf(stderr, "OFFSET_Z:%d ", tex->offset_z);
+ fprintf(stderr, "SAMPLER_ID:%d ", tex->sampler_id);
+ fprintf(stderr, "SRC(SEL_X:%d ", tex->src_sel_x);
+ fprintf(stderr, "SEL_Y:%d ", tex->src_sel_y);
+ fprintf(stderr, "SEL_Z:%d ", tex->src_sel_z);
+ fprintf(stderr, "SEL_W:%d)\n", tex->src_sel_w);
+ id++;
+ fprintf(stderr, "%04d %08X \n", id, bc->bytecode[id]);
+ id++;
+ }
+
+ LIST_FOR_EACH_ENTRY(vtx, &cf->vtx, list) {
+ fprintf(stderr, "%04d %08X ", id, bc->bytecode[id]);
+ fprintf(stderr, "INST:%d ", vtx->inst);
+ fprintf(stderr, "FETCH_TYPE:%d ", vtx->fetch_type);
+ fprintf(stderr, "BUFFER_ID:%d\n", vtx->buffer_id);
+ id++;
+ /* This assumes that no semantic fetches exist */
+ fprintf(stderr, "%04d %08X ", id, bc->bytecode[id]);
+ fprintf(stderr, "SRC(GPR:%d ", vtx->src_gpr);
+ fprintf(stderr, "SEL_X:%d) ", vtx->src_sel_x);
+ fprintf(stderr, "MEGA_FETCH_COUNT:%d ", vtx->mega_fetch_count);
+ fprintf(stderr, "DST(GPR:%d ", vtx->dst_gpr);
+ fprintf(stderr, "SEL_X:%d ", vtx->dst_sel_x);
+ fprintf(stderr, "SEL_Y:%d ", vtx->dst_sel_y);
+ fprintf(stderr, "SEL_Z:%d ", vtx->dst_sel_z);
+ fprintf(stderr, "SEL_W:%d) ", vtx->dst_sel_w);
+ fprintf(stderr, "USE_CONST_FIELDS:%d ", vtx->use_const_fields);
+ fprintf(stderr, "FORMAT(DATA:%d ", vtx->data_format);
+ fprintf(stderr, "NUM:%d ", vtx->num_format_all);
+ fprintf(stderr, "COMP:%d ", vtx->format_comp_all);
+ fprintf(stderr, "MODE:%d)\n", vtx->srf_mode_all);
+ id++;
+ fprintf(stderr, "%04d %08X ", id, bc->bytecode[id]);
+ fprintf(stderr, "OFFSET:%d\n", vtx->offset);
+ //TODO
+ id++;
+ fprintf(stderr, "%04d %08X \n", id, bc->bytecode[id]);
+ id++;
+ }
}
- bytecode[i++] = S_SQ_CF_WORD0_ADDR(0);
- bytecode[i++] = S_SQ_CF_WORD1_CF_INST(V_SQ_CF_WORD1_SQ_CF_INST_RETURN) |
- S_SQ_CF_WORD1_BARRIER(1);
-
- rstate = &ve->rstate;
- rstate->id = R600_PIPE_STATE_FETCH_SHADER;
- rstate->nregs = 0;
- r600_pipe_state_add_reg(rstate, R_0288A4_SQ_PGM_RESOURCES_FS,
- 0x00000000, 0xFFFFFFFF, NULL);
- r600_pipe_state_add_reg(rstate, R_0288DC_SQ_PGM_CF_OFFSET_FS,
- 0x00000000, 0xFFFFFFFF, NULL);
- r600_pipe_state_add_reg(rstate, R_028894_SQ_PGM_START_FS,
- r600_bo_offset(ve->fetch_shader) >> 8,
- 0xFFFFFFFF, ve->fetch_shader);
+
+ fprintf(stderr, "--------------------------------------\n");
}
static void r600_vertex_data_type(enum pipe_format pformat, unsigned *format,
@@ -1071,7 +1944,7 @@ static void r600_vertex_data_type(enum pipe_format pformat, unsigned *format,
}
switch (desc->channel[i].type) {
- /* Half-floats, floats, doubles */
+ /* Half-floats, floats, ints */
case UTIL_FORMAT_TYPE_FLOAT:
switch (desc->channel[i].size) {
case 16:
@@ -1083,8 +1956,6 @@ static void r600_vertex_data_type(enum pipe_format pformat, unsigned *format,
*format = FMT_16_16_FLOAT;
break;
case 3:
- *format = FMT_16_16_16_FLOAT;
- break;
case 4:
*format = FMT_16_16_16_16_FLOAT;
break;
@@ -1124,8 +1995,6 @@ static void r600_vertex_data_type(enum pipe_format pformat, unsigned *format,
*format = FMT_8_8;
break;
case 3:
- // *format = FMT_8_8_8; /* fails piglit draw-vertices test */
- // break;
case 4:
*format = FMT_8_8_8_8;
break;
@@ -1140,8 +2009,6 @@ static void r600_vertex_data_type(enum pipe_format pformat, unsigned *format,
*format = FMT_16_16;
break;
case 3:
- // *format = FMT_16_16_16; /* fails piglit draw-vertices test */
- // break;
case 4:
*format = FMT_16_16_16_16;
break;
@@ -1184,64 +2051,21 @@ out_unknown:
R600_ERR("unsupported vertex format %s\n", util_format_name(pformat));
}
-static void r600_bc(unsigned ndw, unsigned chiprev, u32 *bytecode)
-{
- unsigned i;
- char chip = '6';
-
- switch (chiprev) {
- case 1:
- chip = '7';
- break;
- case 2:
- chip = 'E';
- break;
- case 0:
- default:
- chip = '6';
- break;
- }
- fprintf(stderr, "bytecode %d dw -----------------------\n", ndw);
- fprintf(stderr, " %c\n", chip);
- for (i = 0; i < ndw; i++) {
- fprintf(stderr, "0x%08X\n", bytecode[i]);
- }
- fprintf(stderr, "--------------------------------------\n");
-}
-
int r600_vertex_elements_build_fetch_shader(struct r600_pipe_context *rctx, struct r600_vertex_element *ve)
{
- unsigned ndw, i;
- u32 *bytecode;
- unsigned fetch_resource_start = 0, format, num_format, format_comp;
+ static int dump_shaders = -1;
+
+ struct r600_bc bc;
+ struct r600_bc_vtx vtx;
struct pipe_vertex_element *elements = ve->elements;
const struct util_format_description *desc;
-
- /* 2 dwords for cf aligned to 4 + 4 dwords per input */
- ndw = 8 + ve->count * 4;
- ve->fs_size = ndw * 4;
-
- /* use PIPE_BIND_VERTEX_BUFFER so we use the cache buffer manager */
- ve->fetch_shader = r600_bo(rctx->radeon, ndw*4, 256, PIPE_BIND_VERTEX_BUFFER, 0);
- if (ve->fetch_shader == NULL) {
- return -ENOMEM;
- }
-
- bytecode = r600_bo_map(rctx->radeon, ve->fetch_shader, 0, NULL);
- if (bytecode == NULL) {
- r600_bo_reference(rctx->radeon, &ve->fetch_shader, NULL);
- return -ENOMEM;
- }
-
- if (rctx->family >= CHIP_CEDAR) {
- eg_cf_vtx(ve, &bytecode[0], (ndw - 8) / 4);
- } else {
- r600_cf_vtx(ve, &bytecode[0], (ndw - 8) / 4);
- fetch_resource_start = 160;
- }
+ unsigned fetch_resource_start = rctx->family >= CHIP_CEDAR ? 0 : 160;
+ unsigned format, num_format, format_comp;
+ u32 *bytecode;
+ int i, r;
/* vertex elements offset need special handling, if offset is bigger
- * than what we can put in fetch instruction then we need to alterate
+ + * than what we can put in fetch instruction then we need to alterate
* the vertex resource offset. In such case in order to simplify code
* we will bound one resource per elements. It's a worst case scenario.
*/
@@ -1252,40 +2076,111 @@ int r600_vertex_elements_build_fetch_shader(struct r600_pipe_context *rctx, stru
}
}
+ memset(&bc, 0, sizeof(bc));
+ r = r600_bc_init(&bc, r600_get_family(rctx->radeon));
+ if (r)
+ return r;
+
+ for (i = 0; i < ve->count; i++) {
+ if (elements[i].instance_divisor > 1) {
+ struct r600_bc_alu alu;
+
+ memset(&alu, 0, sizeof(alu));
+ alu.inst = BC_INST(&bc, V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MULHI_UINT);
+ alu.src[0].sel = 0;
+ alu.src[0].chan = 3;
+
+ alu.src[1].sel = V_SQ_ALU_SRC_LITERAL;
+ alu.src[1].value = (1ll << 32) / elements[i].instance_divisor + 1;
+
+ alu.dst.sel = i + 1;
+ alu.dst.chan = 3;
+ alu.dst.write = 1;
+ alu.last = 1;
+
+ if ((r = r600_bc_add_alu(&bc, &alu))) {
+ r600_bc_clear(&bc);
+ return r;
+ }
+ }
+ }
+
for (i = 0; i < ve->count; i++) {
unsigned vbuffer_index;
- r600_vertex_data_type(ve->hw_format[i], &format, &num_format, &format_comp);
- desc = util_format_description(ve->hw_format[i]);
+ r600_vertex_data_type(ve->elements[i].src_format, &format, &num_format, &format_comp);
+ desc = util_format_description(ve->elements[i].src_format);
if (desc == NULL) {
- R600_ERR("unknown format %d\n", ve->hw_format[i]);
- r600_bo_reference(rctx->radeon, &ve->fetch_shader, NULL);
+ r600_bc_clear(&bc);
+ R600_ERR("unknown format %d\n", ve->elements[i].src_format);
return -EINVAL;
}
/* see above for vbuffer_need_offset explanation */
vbuffer_index = elements[i].vertex_buffer_index;
- if (ve->vbuffer_need_offset) {
- bytecode[8 + i * 4 + 0] = S_SQ_VTX_WORD0_BUFFER_ID(i + fetch_resource_start);
- } else {
- bytecode[8 + i * 4 + 0] = S_SQ_VTX_WORD0_BUFFER_ID(vbuffer_index + fetch_resource_start);
+ memset(&vtx, 0, sizeof(vtx));
+ vtx.buffer_id = (ve->vbuffer_need_offset ? i : vbuffer_index) + fetch_resource_start;
+ vtx.fetch_type = elements[i].instance_divisor ? 1 : 0;
+ vtx.src_gpr = elements[i].instance_divisor > 1 ? i + 1 : 0;
+ vtx.src_sel_x = elements[i].instance_divisor ? 3 : 0;
+ vtx.mega_fetch_count = 0x1F;
+ vtx.dst_gpr = i + 1;
+ vtx.dst_sel_x = desc->swizzle[0];
+ vtx.dst_sel_y = desc->swizzle[1];
+ vtx.dst_sel_z = desc->swizzle[2];
+ vtx.dst_sel_w = desc->swizzle[3];
+ vtx.data_format = format;
+ vtx.num_format_all = num_format;
+ vtx.format_comp_all = format_comp;
+ vtx.srf_mode_all = 1;
+ vtx.offset = elements[i].src_offset;
+
+ if ((r = r600_bc_add_vtx(&bc, &vtx))) {
+ r600_bc_clear(&bc);
+ return r;
}
- bytecode[8 + i * 4 + 0] |= S_SQ_VTX_WORD0_SRC_GPR(0) |
- S_SQ_VTX_WORD0_SRC_SEL_X(0) |
- S_SQ_VTX_WORD0_MEGA_FETCH_COUNT(0x1F);
- bytecode[8 + i * 4 + 1] = S_SQ_VTX_WORD1_DST_SEL_X(desc->swizzle[0]) |
- S_SQ_VTX_WORD1_DST_SEL_Y(desc->swizzle[1]) |
- S_SQ_VTX_WORD1_DST_SEL_Z(desc->swizzle[2]) |
- S_SQ_VTX_WORD1_DST_SEL_W(desc->swizzle[3]) |
- S_SQ_VTX_WORD1_USE_CONST_FIELDS(0) |
- S_SQ_VTX_WORD1_DATA_FORMAT(format) |
- S_SQ_VTX_WORD1_NUM_FORMAT_ALL(num_format) |
- S_SQ_VTX_WORD1_FORMAT_COMP_ALL(format_comp) |
- S_SQ_VTX_WORD1_SRF_MODE_ALL(1) |
- S_SQ_VTX_WORD1_GPR_DST_GPR(i + 1);
- bytecode[8 + i * 4 + 2] = S_SQ_VTX_WORD2_OFFSET(elements[i].src_offset) |
- S_SQ_VTX_WORD2_MEGA_FETCH(1);
- bytecode[8 + i * 4 + 3] = 0;
}
+
+ r600_bc_add_cfinst(&bc, BC_INST(&bc, V_SQ_CF_WORD1_SQ_CF_INST_RETURN));
+
+ if ((r = r600_bc_build(&bc))) {
+ r600_bc_clear(&bc);
+ return r;
+ }
+
+ if (dump_shaders == -1)
+ dump_shaders = debug_get_bool_option("R600_DUMP_SHADERS", FALSE);
+
+ if (dump_shaders) {
+ fprintf(stderr, "--------------------------------------------------------------\n");
+ r600_bc_dump(&bc);
+ fprintf(stderr, "______________________________________________________________\n");
+ }
+
+ ve->fs_size = bc.ndw*4;
+
+ /* use PIPE_BIND_VERTEX_BUFFER so we use the cache buffer manager */
+ ve->fetch_shader = r600_bo(rctx->radeon, ve->fs_size, 256, PIPE_BIND_VERTEX_BUFFER, 0);
+ if (ve->fetch_shader == NULL) {
+ r600_bc_clear(&bc);
+ return -ENOMEM;
+ }
+
+ bytecode = r600_bo_map(rctx->radeon, ve->fetch_shader, 0, NULL);
+ if (bytecode == NULL) {
+ r600_bc_clear(&bc);
+ r600_bo_reference(rctx->radeon, &ve->fetch_shader, NULL);
+ return -ENOMEM;
+ }
+
+ memcpy(bytecode, bc.bytecode, ve->fs_size);
+
r600_bo_unmap(rctx->radeon, ve->fetch_shader);
+ r600_bc_clear(&bc);
+
+ if (rctx->family >= CHIP_CEDAR)
+ evergreen_fetch_shader(ve);
+ else
+ r600_fetch_shader(ve);
+
return 0;
}
diff --git a/src/gallium/drivers/r600/r600_asm.h b/src/gallium/drivers/r600/r600_asm.h
index b147f0f5c88..27ea293ebe5 100644
--- a/src/gallium/drivers/r600/r600_asm.h
+++ b/src/gallium/drivers/r600/r600_asm.h
@@ -25,9 +25,6 @@
#include "util/u_double_list.h"
-#define NUM_OF_CYCLES 3
-#define NUM_OF_COMPONENTS 4
-
struct r600_vertex_element;
struct r600_pipe_context;
@@ -37,6 +34,7 @@ struct r600_bc_alu_src {
unsigned neg;
unsigned abs;
unsigned rel;
+ uint32_t value;
};
struct r600_bc_alu_dst {
@@ -49,19 +47,15 @@ struct r600_bc_alu_dst {
struct r600_bc_alu {
struct list_head list;
- struct list_head bs_list; /* bank swizzle list */
struct r600_bc_alu_src src[3];
struct r600_bc_alu_dst dst;
unsigned inst;
unsigned last;
unsigned is_op3;
unsigned predicate;
- unsigned nliteral;
- unsigned literal_added;
unsigned bank_swizzle;
unsigned bank_swizzle_force;
- u32 value[4];
- int hw_gpr[NUM_OF_CYCLES][NUM_OF_COMPONENTS];
+ unsigned omod;
};
struct r600_bc_tex {
@@ -109,6 +103,7 @@ struct r600_bc_vtx {
unsigned num_format_all;
unsigned format_comp_all;
unsigned srf_mode_all;
+ unsigned offset;
};
struct r600_bc_output {
@@ -122,9 +117,16 @@ struct r600_bc_output {
unsigned swizzle_y;
unsigned swizzle_z;
unsigned swizzle_w;
+ unsigned burst_count;
unsigned barrier;
};
+struct r600_bc_kcache {
+ unsigned bank;
+ unsigned mode;
+ unsigned addr;
+};
+
struct r600_bc_cf {
struct list_head list;
unsigned inst;
@@ -134,18 +136,15 @@ struct r600_bc_cf {
unsigned cond;
unsigned pop_count;
unsigned cf_addr; /* control flow addr */
- unsigned kcache0_mode;
- unsigned kcache1_mode;
- unsigned kcache0_addr;
- unsigned kcache1_addr;
- unsigned kcache0_bank;
- unsigned kcache1_bank;
+ struct r600_bc_kcache kcache[2];
unsigned r6xx_uses_waterfall;
struct list_head alu;
struct list_head tex;
struct list_head vtx;
struct r600_bc_output output;
struct r600_bc_alu *curr_bs_head;
+ struct r600_bc_alu *prev_bs_head;
+ struct r600_bc_alu *prev2_bs_head;
};
#define FC_NONE 0
@@ -191,26 +190,24 @@ struct r600_bc {
/* eg_asm.c */
int eg_bc_cf_build(struct r600_bc *bc, struct r600_bc_cf *cf);
-void eg_cf_vtx(struct r600_vertex_element *ve, u32 *bytecode, unsigned count);
/* r600_asm.c */
int r600_bc_init(struct r600_bc *bc, enum radeon_family family);
void r600_bc_clear(struct r600_bc *bc);
int r600_bc_add_alu(struct r600_bc *bc, const struct r600_bc_alu *alu);
-int r600_bc_add_literal(struct r600_bc *bc, const u32 *value);
int r600_bc_add_vtx(struct r600_bc *bc, const struct r600_bc_vtx *vtx);
int r600_bc_add_tex(struct r600_bc *bc, const struct r600_bc_tex *tex);
int r600_bc_add_output(struct r600_bc *bc, const struct r600_bc_output *output);
int r600_bc_build(struct r600_bc *bc);
int r600_bc_add_cfinst(struct r600_bc *bc, int inst);
int r600_bc_add_alu_type(struct r600_bc *bc, const struct r600_bc_alu *alu, int type);
+void r600_bc_special_constants(u32 value, unsigned *sel, unsigned *neg);
void r600_bc_dump(struct r600_bc *bc);
-void r600_cf_vtx(struct r600_vertex_element *ve, u32 *bytecode, unsigned count);
-void r600_cf_vtx_tc(struct r600_vertex_element *ve, u32 *bytecode, unsigned count);
int r600_vertex_elements_build_fetch_shader(struct r600_pipe_context *rctx, struct r600_vertex_element *ve);
/* r700_asm.c */
+void r700_bc_cf_vtx_build(uint32_t *bytecode, const struct r600_bc_cf *cf);
int r700_bc_alu_build(struct r600_bc *bc, struct r600_bc_alu *alu, unsigned id);
#endif
diff --git a/src/gallium/drivers/r600/r600_blit.c b/src/gallium/drivers/r600/r600_blit.c
index 0f04136fb2a..04408a5cc8e 100644
--- a/src/gallium/drivers/r600/r600_blit.c
+++ b/src/gallium/drivers/r600/r600_blit.c
@@ -36,6 +36,7 @@ static void r600_blitter_begin(struct pipe_context *ctx, enum r600_blitter_op op
{
struct r600_pipe_context *rctx = (struct r600_pipe_context *)ctx;
+ rctx->blit = true;
r600_context_queries_suspend(&rctx->ctx);
util_blitter_save_blend(rctx->blitter, rctx->states[R600_PIPE_STATE_BLEND]);
@@ -53,9 +54,9 @@ static void r600_blitter_begin(struct pipe_context *ctx, enum r600_blitter_op op
if (rctx->states[R600_PIPE_STATE_CLIP]) {
util_blitter_save_clip(rctx->blitter, &rctx->clip);
}
- util_blitter_save_vertex_buffers(rctx->blitter, rctx->nvertex_buffer, rctx->vertex_buffer);
-
- rctx->vertex_elements = NULL;
+ util_blitter_save_vertex_buffers(rctx->blitter,
+ rctx->vbuf_mgr->nr_vertex_buffers,
+ rctx->vbuf_mgr->vertex_buffer);
if (op & (R600_CLEAR_SURFACE | R600_COPY))
util_blitter_save_framebuffer(rctx->blitter, &rctx->framebuffer);
@@ -76,21 +77,26 @@ static void r600_blitter_end(struct pipe_context *ctx)
{
struct r600_pipe_context *rctx = (struct r600_pipe_context *)ctx;
r600_context_queries_resume(&rctx->ctx);
+ rctx->blit = false;
}
-int r600_blit_uncompress_depth(struct pipe_context *ctx, struct r600_resource_texture *texture)
+void r600_blit_uncompress_depth(struct pipe_context *ctx, struct r600_resource_texture *texture)
{
struct r600_pipe_context *rctx = (struct r600_pipe_context *)ctx;
struct pipe_surface *zsurf, *cbsurf, surf_tmpl;
int level = 0;
float depth = 1.0f;
- surf_tmpl.format = texture->resource.base.b.format;
+
+ if (!texture->dirty_db)
+ return;
+
+ surf_tmpl.format = texture->resource.b.b.b.format;
surf_tmpl.u.tex.level = level;
surf_tmpl.u.tex.first_layer = 0;
surf_tmpl.u.tex.last_layer = 0;
surf_tmpl.usage = PIPE_BIND_DEPTH_STENCIL;
- zsurf = ctx->create_surface(ctx, &texture->resource.base.b, &surf_tmpl);
+ zsurf = ctx->create_surface(ctx, &texture->resource.b.b.b, &surf_tmpl);
surf_tmpl.format = ((struct pipe_resource*)texture->flushed_depth_texture)->format;
surf_tmpl.usage = PIPE_BIND_RENDER_TARGET;
@@ -108,8 +114,47 @@ int r600_blit_uncompress_depth(struct pipe_context *ctx, struct r600_resource_te
pipe_surface_reference(&zsurf, NULL);
pipe_surface_reference(&cbsurf, NULL);
+ texture->dirty_db = FALSE;
+}
+
+void r600_flush_depth_textures(struct r600_pipe_context *rctx)
+{
+ unsigned int i;
+
+ if (rctx->blit) return;
+
+ /* FIXME: This handles fragment shader textures only. */
+
+ for (i = 0; i < rctx->ps_samplers.n_views; ++i) {
+ struct r600_pipe_sampler_view *view;
+ struct r600_resource_texture *tex;
+
+ view = rctx->ps_samplers.views[i];
+ if (!view) continue;
+
+ tex = (struct r600_resource_texture *)view->base.texture;
+ if (!tex->depth)
+ continue;
+
+ if (tex->is_flushing_texture)
+ continue;
- return 0;
+ r600_blit_uncompress_depth(&rctx->context, tex);
+ }
+
+ /* also check CB here */
+ for (i = 0; i < rctx->framebuffer.nr_cbufs; i++) {
+ struct r600_resource_texture *tex;
+ tex = (struct r600_resource_texture *)rctx->framebuffer.cbufs[i]->texture;
+
+ if (!tex->depth)
+ continue;
+
+ if (tex->is_flushing_texture)
+ continue;
+
+ r600_blit_uncompress_depth(&rctx->context, tex);
+ }
}
static void r600_clear(struct pipe_context *ctx, unsigned buffers,
@@ -174,6 +219,52 @@ static void r600_hw_copy_region(struct pipe_context *ctx,
r600_blitter_end(ctx);
}
+struct texture_orig_info {
+ unsigned format;
+ unsigned width0;
+ unsigned height0;
+};
+
+static void r600_compressed_to_blittable(struct pipe_resource *tex,
+ unsigned level,
+ struct texture_orig_info *orig)
+{
+ struct r600_resource_texture *rtex = (struct r600_resource_texture*)tex;
+ unsigned pixsize = util_format_get_blocksize(tex->format);
+ int new_format;
+ int new_height, new_width;
+
+ orig->format = tex->format;
+ orig->width0 = tex->width0;
+ orig->height0 = tex->height0;
+
+ if (pixsize == 8)
+ new_format = PIPE_FORMAT_R16G16B16A16_UNORM; /* 64-bit block */
+ else
+ new_format = PIPE_FORMAT_R32G32B32A32_UNORM; /* 128-bit block */
+
+ new_width = util_format_get_nblocksx(tex->format, orig->width0);
+ new_height = util_format_get_nblocksy(tex->format, orig->height0);
+
+ rtex->force_int_type = true;
+ tex->width0 = new_width;
+ tex->height0 = new_height;
+ tex->format = new_format;
+
+}
+
+static void r600_reset_blittable_to_compressed(struct pipe_resource *tex,
+ unsigned level,
+ struct texture_orig_info *orig)
+{
+ struct r600_resource_texture *rtex = (struct r600_resource_texture*)tex;
+ rtex->force_int_type = false;
+
+ tex->format = orig->format;
+ tex->width0 = orig->width0;
+ tex->height0 = orig->height0;
+}
+
static void r600_resource_copy_region(struct pipe_context *ctx,
struct pipe_resource *dst,
unsigned dst_level,
@@ -182,15 +273,36 @@ static void r600_resource_copy_region(struct pipe_context *ctx,
unsigned src_level,
const struct pipe_box *src_box)
{
- boolean is_depth;
- /* there is something wrong with depth resource copies at the moment so avoid them for now */
- is_depth = util_format_get_component_bits(src->format, UTIL_FORMAT_COLORSPACE_ZS, 0) != 0;
- if (is_depth)
- util_resource_copy_region(ctx, dst, dst_level, dstx, dsty, dstz,
- src, src_level, src_box);
- else
- r600_hw_copy_region(ctx, dst, dst_level, dstx, dsty, dstz,
- src, src_level, src_box);
+ struct r600_resource_texture *rsrc = (struct r600_resource_texture*)src;
+ struct texture_orig_info orig_info[2];
+ boolean restore_orig[2];
+
+ if (rsrc->depth && !rsrc->is_flushing_texture)
+ r600_texture_depth_flush(ctx, src, FALSE);
+
+ restore_orig[0] = restore_orig[1] = FALSE;
+
+ if (util_format_is_compressed(src->format)) {
+ r600_compressed_to_blittable(src, src_level, &orig_info[0]);
+ restore_orig[0] = TRUE;
+ }
+
+ if (util_format_is_compressed(dst->format)) {
+ r600_compressed_to_blittable(dst, dst_level, &orig_info[1]);
+ restore_orig[1] = TRUE;
+ /* translate the dst box as well */
+ dstx = util_format_get_nblocksx(orig_info[1].format, dstx);
+ dsty = util_format_get_nblocksy(orig_info[1].format, dsty);
+ }
+
+ r600_hw_copy_region(ctx, dst, dst_level, dstx, dsty, dstz,
+ src, src_level, src_box);
+
+ if (restore_orig[0])
+ r600_reset_blittable_to_compressed(src, src_level, &orig_info[0]);
+
+ if (restore_orig[1])
+ r600_reset_blittable_to_compressed(dst, dst_level, &orig_info[1]);
}
void r600_init_blit_functions(struct r600_pipe_context *rctx)
@@ -200,3 +312,19 @@ void r600_init_blit_functions(struct r600_pipe_context *rctx)
rctx->context.clear_depth_stencil = r600_clear_depth_stencil;
rctx->context.resource_copy_region = r600_resource_copy_region;
}
+
+void r600_blit_push_depth(struct pipe_context *ctx, struct r600_resource_texture *texture)
+{
+ struct pipe_box sbox;
+
+ sbox.x = sbox.y = sbox.z = 0;
+ sbox.width = texture->resource.b.b.b.width0;
+ sbox.height = texture->resource.b.b.b.height0;
+ /* XXX that might be wrong */
+ sbox.depth = 1;
+
+ r600_hw_copy_region(ctx, (struct pipe_resource *)texture, 0,
+ 0, 0, 0,
+ (struct pipe_resource *)texture->flushed_depth_texture, 0,
+ &sbox);
+}
diff --git a/src/gallium/drivers/r600/r600_buffer.c b/src/gallium/drivers/r600/r600_buffer.c
index 03a61a3213c..6ced719c8f0 100644
--- a/src/gallium/drivers/r600/r600_buffer.c
+++ b/src/gallium/drivers/r600/r600_buffer.c
@@ -29,83 +29,50 @@
#include <util/u_math.h>
#include <util/u_inlines.h>
#include <util/u_memory.h>
-#include <util/u_upload_mgr.h>
+#include "util/u_upload_mgr.h"
+
#include "state_tracker/drm_driver.h"
+
#include <xf86drm.h>
#include "radeon_drm.h"
+
#include "r600.h"
#include "r600_pipe.h"
-extern struct u_resource_vtbl r600_buffer_vtbl;
-
-
-struct pipe_resource *r600_buffer_create(struct pipe_screen *screen,
- const struct pipe_resource *templ)
-{
- struct r600_resource_buffer *rbuffer;
- struct r600_bo *bo;
- /* XXX We probably want a different alignment for buffers and textures. */
- unsigned alignment = 4096;
-
- rbuffer = CALLOC_STRUCT(r600_resource_buffer);
- if (rbuffer == NULL)
- return NULL;
-
- rbuffer->magic = R600_BUFFER_MAGIC;
- rbuffer->user_buffer = NULL;
- rbuffer->num_ranges = 0;
- rbuffer->r.base.b = *templ;
- pipe_reference_init(&rbuffer->r.base.b.reference, 1);
- rbuffer->r.base.b.screen = screen;
- rbuffer->r.base.vtbl = &r600_buffer_vtbl;
- rbuffer->r.size = rbuffer->r.base.b.width0;
- bo = r600_bo((struct radeon*)screen->winsys, rbuffer->r.base.b.width0, alignment, rbuffer->r.base.b.bind, rbuffer->r.base.b.usage);
- if (bo == NULL) {
- FREE(rbuffer);
- return NULL;
- }
- rbuffer->r.bo = bo;
- return &rbuffer->r.base.b;
-}
-
-struct pipe_resource *r600_user_buffer_create(struct pipe_screen *screen,
- void *ptr, unsigned bytes,
- unsigned bind)
-{
- struct r600_resource_buffer *rbuffer;
-
- rbuffer = CALLOC_STRUCT(r600_resource_buffer);
- if (rbuffer == NULL)
- return NULL;
-
- rbuffer->magic = R600_BUFFER_MAGIC;
- pipe_reference_init(&rbuffer->r.base.b.reference, 1);
- rbuffer->r.base.vtbl = &r600_buffer_vtbl;
- rbuffer->r.base.b.screen = screen;
- rbuffer->r.base.b.target = PIPE_BUFFER;
- rbuffer->r.base.b.format = PIPE_FORMAT_R8_UNORM;
- rbuffer->r.base.b.usage = PIPE_USAGE_IMMUTABLE;
- rbuffer->r.base.b.bind = bind;
- rbuffer->r.base.b.width0 = bytes;
- rbuffer->r.base.b.height0 = 1;
- rbuffer->r.base.b.depth0 = 1;
- rbuffer->r.base.b.array_size = 1;
- rbuffer->r.base.b.flags = 0;
- rbuffer->num_ranges = 0;
- rbuffer->r.bo = NULL;
- rbuffer->user_buffer = ptr;
- return &rbuffer->r.base.b;
-}
-
static void r600_buffer_destroy(struct pipe_screen *screen,
struct pipe_resource *buf)
{
+ struct r600_screen *rscreen = (struct r600_screen*)screen;
struct r600_resource_buffer *rbuffer = r600_buffer(buf);
if (rbuffer->r.bo) {
r600_bo_reference((struct radeon*)screen->winsys, &rbuffer->r.bo, NULL);
}
- FREE(rbuffer);
+ rbuffer->r.bo = NULL;
+ util_slab_free(&rscreen->pool_buffers, rbuffer);
+}
+
+static struct pipe_transfer *r600_get_transfer(struct pipe_context *ctx,
+ struct pipe_resource *resource,
+ unsigned level,
+ unsigned usage,
+ const struct pipe_box *box)
+{
+ struct r600_pipe_context *rctx = (struct r600_pipe_context*)ctx;
+ struct pipe_transfer *transfer = util_slab_alloc(&rctx->pool_transfers);
+
+ transfer->resource = resource;
+ transfer->level = level;
+ transfer->usage = usage;
+ transfer->box = *box;
+ transfer->stride = 0;
+ transfer->layer_stride = 0;
+ transfer->data = NULL;
+
+ /* Note strides are zero, this is ok for buffers, but not for
+ * textures 2d & higher at least.
+ */
+ return transfer;
}
static void *r600_buffer_transfer_map(struct pipe_context *pipe,
@@ -114,29 +81,10 @@ static void *r600_buffer_transfer_map(struct pipe_context *pipe,
struct r600_resource_buffer *rbuffer = r600_buffer(transfer->resource);
int write = 0;
uint8_t *data;
- int i;
- boolean flush = FALSE;
-
- if (rbuffer->user_buffer)
- return (uint8_t*)rbuffer->user_buffer + transfer->box.x;
-
- if (transfer->usage & PIPE_TRANSFER_DISCARD) {
- for (i = 0; i < rbuffer->num_ranges; i++) {
- if ((transfer->box.x >= rbuffer->ranges[i].start) &&
- (transfer->box.x < rbuffer->ranges[i].end))
- flush = TRUE;
-
- if (flush) {
- r600_bo_reference((struct radeon*)pipe->winsys, &rbuffer->r.bo, NULL);
- rbuffer->num_ranges = 0;
- rbuffer->r.bo = r600_bo((struct radeon*)pipe->winsys,
- rbuffer->r.base.b.width0, 0,
- rbuffer->r.base.b.bind,
- rbuffer->r.base.b.usage);
- break;
- }
- }
- }
+
+ if (rbuffer->r.b.user_ptr)
+ return (uint8_t*)rbuffer->r.b.user_ptr + transfer->box.x;
+
if (transfer->usage & PIPE_TRANSFER_DONTBLOCK) {
/* FIXME */
}
@@ -155,44 +103,122 @@ static void r600_buffer_transfer_unmap(struct pipe_context *pipe,
{
struct r600_resource_buffer *rbuffer = r600_buffer(transfer->resource);
+ if (rbuffer->r.b.user_ptr)
+ return;
+
if (rbuffer->r.bo)
r600_bo_unmap((struct radeon*)pipe->winsys, rbuffer->r.bo);
}
static void r600_buffer_transfer_flush_region(struct pipe_context *pipe,
- struct pipe_transfer *transfer,
- const struct pipe_box *box)
+ struct pipe_transfer *transfer,
+ const struct pipe_box *box)
{
- struct r600_resource_buffer *rbuffer = r600_buffer(transfer->resource);
- unsigned i;
- unsigned offset = transfer->box.x + box->x;
- unsigned length = box->width;
+}
- assert(box->x + box->width <= transfer->box.width);
+static void r600_transfer_destroy(struct pipe_context *ctx,
+ struct pipe_transfer *transfer)
+{
+ struct r600_pipe_context *rctx = (struct r600_pipe_context*)ctx;
+ util_slab_free(&rctx->pool_transfers, transfer);
+}
- if (rbuffer->user_buffer)
- return;
+static void r600_buffer_transfer_inline_write(struct pipe_context *pipe,
+ struct pipe_resource *resource,
+ unsigned level,
+ unsigned usage,
+ const struct pipe_box *box,
+ const void *data,
+ unsigned stride,
+ unsigned layer_stride)
+{
+ struct radeon *ws = (struct radeon*)pipe->winsys;
+ struct r600_resource_buffer *rbuffer = r600_buffer(resource);
+ uint8_t *map = NULL;
- /* mark the range as used */
- for(i = 0; i < rbuffer->num_ranges; ++i) {
- if(offset <= rbuffer->ranges[i].end && rbuffer->ranges[i].start <= (offset+box->width)) {
- rbuffer->ranges[i].start = MIN2(rbuffer->ranges[i].start, offset);
- rbuffer->ranges[i].end = MAX2(rbuffer->ranges[i].end, (offset+length));
- return;
- }
- }
+ assert(rbuffer->r.b.user_ptr == NULL);
+
+ map = r600_bo_map(ws, rbuffer->r.bo,
+ PIPE_TRANSFER_WRITE | PIPE_TRANSFER_DISCARD | usage,
+ pipe);
+
+ memcpy(map + box->x, data, box->width);
- rbuffer->ranges[rbuffer->num_ranges].start = offset;
- rbuffer->ranges[rbuffer->num_ranges].end = offset+length;
- rbuffer->num_ranges++;
+ if (rbuffer->r.bo)
+ r600_bo_unmap(ws, rbuffer->r.bo);
}
-unsigned r600_buffer_is_referenced_by_cs(struct pipe_context *context,
- struct pipe_resource *buf,
- unsigned level, int layer)
+static const struct u_resource_vtbl r600_buffer_vtbl =
{
- /* FIXME */
- return PIPE_REFERENCED_FOR_READ | PIPE_REFERENCED_FOR_WRITE;
+ u_default_resource_get_handle, /* get_handle */
+ r600_buffer_destroy, /* resource_destroy */
+ r600_get_transfer, /* get_transfer */
+ r600_transfer_destroy, /* transfer_destroy */
+ r600_buffer_transfer_map, /* transfer_map */
+ r600_buffer_transfer_flush_region, /* transfer_flush_region */
+ r600_buffer_transfer_unmap, /* transfer_unmap */
+ r600_buffer_transfer_inline_write /* transfer_inline_write */
+};
+
+struct pipe_resource *r600_buffer_create(struct pipe_screen *screen,
+ const struct pipe_resource *templ)
+{
+ struct r600_screen *rscreen = (struct r600_screen*)screen;
+ struct r600_resource_buffer *rbuffer;
+ struct r600_bo *bo;
+ /* XXX We probably want a different alignment for buffers and textures. */
+ unsigned alignment = 4096;
+
+ rbuffer = util_slab_alloc(&rscreen->pool_buffers);
+
+ rbuffer->magic = R600_BUFFER_MAGIC;
+ rbuffer->r.b.b.b = *templ;
+ pipe_reference_init(&rbuffer->r.b.b.b.reference, 1);
+ rbuffer->r.b.b.b.screen = screen;
+ rbuffer->r.b.b.vtbl = &r600_buffer_vtbl;
+ rbuffer->r.b.user_ptr = NULL;
+ rbuffer->r.size = rbuffer->r.b.b.b.width0;
+ rbuffer->r.bo_size = rbuffer->r.size;
+
+ bo = r600_bo((struct radeon*)screen->winsys,
+ rbuffer->r.b.b.b.width0,
+ alignment, rbuffer->r.b.b.b.bind,
+ rbuffer->r.b.b.b.usage);
+
+ if (bo == NULL) {
+ FREE(rbuffer);
+ return NULL;
+ }
+ rbuffer->r.bo = bo;
+ return &rbuffer->r.b.b.b;
+}
+
+struct pipe_resource *r600_user_buffer_create(struct pipe_screen *screen,
+ void *ptr, unsigned bytes,
+ unsigned bind)
+{
+ struct r600_screen *rscreen = (struct r600_screen*)screen;
+ struct r600_resource_buffer *rbuffer;
+
+ rbuffer = util_slab_alloc(&rscreen->pool_buffers);
+
+ rbuffer->magic = R600_BUFFER_MAGIC;
+ pipe_reference_init(&rbuffer->r.b.b.b.reference, 1);
+ rbuffer->r.b.b.vtbl = &r600_buffer_vtbl;
+ rbuffer->r.b.b.b.screen = screen;
+ rbuffer->r.b.b.b.target = PIPE_BUFFER;
+ rbuffer->r.b.b.b.format = PIPE_FORMAT_R8_UNORM;
+ rbuffer->r.b.b.b.usage = PIPE_USAGE_IMMUTABLE;
+ rbuffer->r.b.b.b.bind = bind;
+ rbuffer->r.b.b.b.width0 = bytes;
+ rbuffer->r.b.b.b.height0 = 1;
+ rbuffer->r.b.b.b.depth0 = 1;
+ rbuffer->r.b.b.b.array_size = 1;
+ rbuffer->r.b.b.b.flags = 0;
+ rbuffer->r.b.user_ptr = ptr;
+ rbuffer->r.bo = NULL;
+ rbuffer->r.bo_size = 0;
+ return &rbuffer->r.b.b.b;
}
struct pipe_resource *r600_buffer_from_handle(struct pipe_screen *screen,
@@ -213,82 +239,39 @@ struct pipe_resource *r600_buffer_from_handle(struct pipe_screen *screen,
return NULL;
}
- pipe_reference_init(&rbuffer->base.b.reference, 1);
- rbuffer->base.b.target = PIPE_BUFFER;
- rbuffer->base.b.screen = screen;
- rbuffer->base.vtbl = &r600_buffer_vtbl;
+ pipe_reference_init(&rbuffer->b.b.b.reference, 1);
+ rbuffer->b.b.b.target = PIPE_BUFFER;
+ rbuffer->b.b.b.screen = screen;
+ rbuffer->b.b.vtbl = &r600_buffer_vtbl;
rbuffer->bo = bo;
- return &rbuffer->base.b;
+ return &rbuffer->b.b.b;
}
-struct u_resource_vtbl r600_buffer_vtbl =
+void r600_upload_index_buffer(struct r600_pipe_context *rctx, struct r600_drawl *draw)
{
- u_default_resource_get_handle, /* get_handle */
- r600_buffer_destroy, /* resource_destroy */
- r600_buffer_is_referenced_by_cs, /* is_buffer_referenced */
- u_default_get_transfer, /* get_transfer */
- u_default_transfer_destroy, /* transfer_destroy */
- r600_buffer_transfer_map, /* transfer_map */
- r600_buffer_transfer_flush_region, /* transfer_flush_region */
- r600_buffer_transfer_unmap, /* transfer_unmap */
- u_default_transfer_inline_write /* transfer_inline_write */
-};
+ struct r600_resource_buffer *rbuffer = r600_buffer(draw->index_buffer);
+ boolean flushed;
+
+ u_upload_data(rctx->vbuf_mgr->uploader, 0,
+ draw->info.count * draw->index_size,
+ rbuffer->r.b.user_ptr,
+ &draw->index_buffer_offset,
+ &draw->index_buffer, &flushed);
+}
-int r600_upload_index_buffer(struct r600_pipe_context *rctx, struct r600_drawl *draw)
+void r600_upload_const_buffer(struct r600_pipe_context *rctx, struct r600_resource_buffer **rbuffer,
+ uint32_t *const_offset)
{
- struct pipe_resource *upload_buffer = NULL;
- unsigned index_offset = draw->index_buffer_offset;
- int ret = 0;
-
- if (r600_buffer_is_user_buffer(draw->index_buffer)) {
- ret = u_upload_buffer(rctx->upload_ib,
- index_offset,
- draw->count * draw->index_size,
- draw->index_buffer,
- &index_offset,
- &upload_buffer);
- if (ret) {
- goto done;
- }
- draw->index_buffer_offset = index_offset;
-
- /* Transfer ownership. */
- pipe_resource_reference(&draw->index_buffer, upload_buffer);
- pipe_resource_reference(&upload_buffer, NULL);
- }
+ if ((*rbuffer)->r.b.user_ptr) {
+ uint8_t *ptr = (*rbuffer)->r.b.user_ptr;
+ unsigned size = (*rbuffer)->r.b.b.b.width0;
+ boolean flushed;
-done:
- return ret;
-}
+ *rbuffer = NULL;
-int r600_upload_user_buffers(struct r600_pipe_context *rctx)
-{
- enum pipe_error ret = PIPE_OK;
- int i, nr;
-
- nr = rctx->vertex_elements->count;
- nr = rctx->nvertex_buffer;
-
- for (i = 0; i < nr; i++) {
-// struct pipe_vertex_buffer *vb = &rctx->vertex_buffer[rctx->vertex_elements->elements[i].vertex_buffer_index];
- struct pipe_vertex_buffer *vb = &rctx->vertex_buffer[i];
-
- if (r600_buffer_is_user_buffer(vb->buffer)) {
- struct pipe_resource *upload_buffer = NULL;
- unsigned offset = 0; /*vb->buffer_offset * 4;*/
- unsigned size = vb->buffer->width0;
- unsigned upload_offset;
- ret = u_upload_buffer(rctx->upload_vb,
- offset, size,
- vb->buffer,
- &upload_offset, &upload_buffer);
- if (ret)
- return ret;
-
- pipe_resource_reference(&vb->buffer, NULL);
- vb->buffer = upload_buffer;
- vb->buffer_offset = upload_offset;
- }
+ u_upload_data(rctx->vbuf_mgr->uploader, 0, size, ptr, const_offset,
+ (struct pipe_resource**)rbuffer, &flushed);
+ } else {
+ *const_offset = 0;
}
- return ret;
}
diff --git a/src/gallium/drivers/r600/r600_opcodes.h b/src/gallium/drivers/r600/r600_opcodes.h
index 2ee0c83e5d3..a85d0bbf1e1 100644
--- a/src/gallium/drivers/r600/r600_opcodes.h
+++ b/src/gallium/drivers/r600/r600_opcodes.h
@@ -330,10 +330,14 @@
#define EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_RECIPSQRT_CLAMPED_64 0x00000098
#define EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_SQRT_64 0x00000099
/* TODO Fill in more ALU */
+#define EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_INT_TO_FLT 0x0000009B
+#define EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_UINT_TO_FLT 0x0000009C
+/* TODO Fill in more ALU */
#define EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_FLT_TO_INT_FLOOR 0x000000B1
#define EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_DOT4 0x000000BE
#define EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_DOT4_IEEE 0x000000BF
#define EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_CUBE 0x000000C0
+#define EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MAX4 0x000000C1
#define EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MOVA_INT 0x000000CC
#define EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INTERP_XY 0x000000D6
diff --git a/src/gallium/drivers/r600/r600_pipe.c b/src/gallium/drivers/r600/r600_pipe.c
index 6842571044d..0e28bda6eb6 100644
--- a/src/gallium/drivers/r600/r600_pipe.c
+++ b/src/gallium/drivers/r600/r600_pipe.c
@@ -30,12 +30,13 @@
#include <tgsi/tgsi_util.h>
#include <util/u_blitter.h>
#include <util/u_double_list.h>
+#include <util/u_format_s3tc.h>
#include <util/u_transfer.h>
#include <util/u_surface.h>
#include <util/u_pack_color.h>
#include <util/u_memory.h>
#include <util/u_inlines.h>
-#include <util/u_upload_mgr.h>
+#include "util/u_upload_mgr.h"
#include <pipebuffer/pb_buffer.h>
#include "r600.h"
#include "r600d.h"
@@ -47,7 +48,7 @@
/*
* pipe_context
*/
-static void r600_flush(struct pipe_context *ctx, unsigned flags,
+static void r600_flush(struct pipe_context *ctx,
struct pipe_fence_handle **fence)
{
struct r600_pipe_context *rctx = (struct r600_pipe_context *)ctx;
@@ -59,9 +60,6 @@ static void r600_flush(struct pipe_context *ctx, unsigned flags,
if (!rctx->ctx.pm4_cdwords)
return;
- u_upload_flush(rctx->upload_vb);
- u_upload_flush(rctx->upload_ib);
-
#if 0
sprintf(dname, "gallium-%08d.bof", dc);
if (dc < 20) {
@@ -71,6 +69,30 @@ static void r600_flush(struct pipe_context *ctx, unsigned flags,
dc++;
#endif
r600_context_flush(&rctx->ctx);
+
+ /* XXX This shouldn't be really necessary, but removing it breaks some tests.
+ * Needless buffer reallocations may significantly increase memory consumption,
+ * so getting rid of this call is important. */
+ u_upload_flush(rctx->vbuf_mgr->uploader);
+}
+
+static void r600_update_num_contexts(struct r600_screen *rscreen, int diff)
+{
+ pipe_mutex_lock(rscreen->mutex_num_contexts);
+ if (diff > 0) {
+ rscreen->num_contexts++;
+
+ if (rscreen->num_contexts > 1)
+ util_slab_set_thread_safety(&rscreen->pool_buffers,
+ UTIL_SLAB_MULTITHREADED);
+ } else {
+ rscreen->num_contexts--;
+
+ if (rscreen->num_contexts <= 1)
+ util_slab_set_thread_safety(&rscreen->pool_buffers,
+ UTIL_SLAB_SINGLETHREADED);
+ }
+ pipe_mutex_unlock(rscreen->mutex_num_contexts);
}
static void r600_destroy_context(struct pipe_context *context)
@@ -79,8 +101,6 @@ static void r600_destroy_context(struct pipe_context *context)
rctx->context.delete_depth_stencil_alpha_state(&rctx->context, rctx->custom_dsa_flush);
- r600_end_vertex_translate(rctx);
-
r600_context_fini(&rctx->ctx);
util_blitter_destroy(rctx->blitter);
@@ -89,14 +109,11 @@ static void r600_destroy_context(struct pipe_context *context)
free(rctx->states[i]);
}
- u_upload_destroy(rctx->upload_vb);
- u_upload_destroy(rctx->upload_ib);
+ u_vbuf_mgr_destroy(rctx->vbuf_mgr);
+ util_slab_destroy(&rctx->pool_transfers);
- if (rctx->tran.translate_cache)
- translate_cache_destroy(rctx->tran.translate_cache);
+ r600_update_num_contexts(rctx->screen, -1);
- FREE(rctx->ps_resource);
- FREE(rctx->vs_resource);
FREE(rctx);
}
@@ -108,6 +125,9 @@ static struct pipe_context *r600_create_context(struct pipe_screen *screen, void
if (rctx == NULL)
return NULL;
+
+ r600_update_num_contexts(rscreen, 1);
+
rctx->context.winsys = rscreen->screen.winsys;
rctx->context.screen = screen;
rctx->context.priv = priv;
@@ -123,6 +143,7 @@ static struct pipe_context *r600_create_context(struct pipe_screen *screen, void
r600_init_query_functions(rctx);
r600_init_context_resource_functions(rctx);
r600_init_surface_functions(rctx);
+ rctx->context.draw_vbo = r600_draw_vbo;
switch (r600_get_family(rctx->radeon)) {
case CHIP_R600:
@@ -137,7 +158,6 @@ static struct pipe_context *r600_create_context(struct pipe_screen *screen, void
case CHIP_RV730:
case CHIP_RV710:
case CHIP_RV740:
- rctx->context.draw_vbo = r600_draw_vbo;
r600_init_state_functions(rctx);
if (r600_context_init(&rctx->ctx, rctx->radeon)) {
r600_destroy_context(&rctx->context);
@@ -151,7 +171,9 @@ static struct pipe_context *r600_create_context(struct pipe_screen *screen, void
case CHIP_CYPRESS:
case CHIP_HEMLOCK:
case CHIP_PALM:
- rctx->context.draw_vbo = evergreen_draw;
+ case CHIP_BARTS:
+ case CHIP_TURKS:
+ case CHIP_CAICOS:
evergreen_init_state_functions(rctx);
if (evergreen_context_init(&rctx->ctx, rctx->radeon)) {
r600_destroy_context(&rctx->context);
@@ -165,41 +187,23 @@ static struct pipe_context *r600_create_context(struct pipe_screen *screen, void
return NULL;
}
- rctx->upload_ib = u_upload_create(&rctx->context, 32 * 1024, 16,
- PIPE_BIND_INDEX_BUFFER);
- if (rctx->upload_ib == NULL) {
- r600_destroy_context(&rctx->context);
- return NULL;
- }
+ util_slab_create(&rctx->pool_transfers,
+ sizeof(struct pipe_transfer), 64,
+ UTIL_SLAB_SINGLETHREADED);
- rctx->upload_vb = u_upload_create(&rctx->context, 128 * 1024, 16,
- PIPE_BIND_VERTEX_BUFFER);
- if (rctx->upload_vb == NULL) {
+ rctx->vbuf_mgr = u_vbuf_mgr_create(&rctx->context, 1024 * 1024, 256,
+ PIPE_BIND_VERTEX_BUFFER |
+ PIPE_BIND_INDEX_BUFFER |
+ PIPE_BIND_CONSTANT_BUFFER,
+ U_VERTEX_FETCH_DWORD_ALIGNED);
+ if (!rctx->vbuf_mgr) {
r600_destroy_context(&rctx->context);
return NULL;
}
rctx->blitter = util_blitter_create(&rctx->context);
if (rctx->blitter == NULL) {
- FREE(rctx);
- return NULL;
- }
-
- rctx->tran.translate_cache = translate_cache_create();
- if (rctx->tran.translate_cache == NULL) {
- FREE(rctx);
- return NULL;
- }
-
- rctx->vs_resource = CALLOC(R600_RESOURCE_ARRAY_SIZE, sizeof(struct r600_pipe_state));
- if (!rctx->vs_resource) {
- FREE(rctx);
- return NULL;
- }
-
- rctx->ps_resource = CALLOC(R600_RESOURCE_ARRAY_SIZE, sizeof(struct r600_pipe_state));
- if (!rctx->ps_resource) {
- FREE(rctx);
+ r600_destroy_context(&rctx->context);
return NULL;
}
@@ -209,8 +213,6 @@ static struct pipe_context *r600_create_context(struct pipe_screen *screen, void
else
rctx->custom_dsa_flush = evergreen_create_db_flush_dsa(rctx);
- r600_blit_uncompress_depth_ptr = r600_blit_uncompress_depth;
-
return &rctx->context;
}
@@ -243,6 +245,9 @@ static const char *r600_get_family_name(enum radeon_family family)
case CHIP_CYPRESS: return "AMD CYPRESS";
case CHIP_HEMLOCK: return "AMD HEMLOCK";
case CHIP_PALM: return "AMD PALM";
+ case CHIP_BARTS: return "AMD BARTS";
+ case CHIP_TURKS: return "AMD TURKS";
+ case CHIP_CAICOS: return "AMD CAICOS";
default: return "AMD unknown";
}
}
@@ -275,18 +280,32 @@ static int r600_get_param(struct pipe_screen* pscreen, enum pipe_cap param)
case PIPE_CAP_BLEND_EQUATION_SEPARATE:
case PIPE_CAP_SM3:
case PIPE_CAP_TEXTURE_SWIZZLE:
- case PIPE_CAP_INDEP_BLEND_ENABLE:
case PIPE_CAP_DEPTHSTENCIL_CLEAR_SEPARATE:
case PIPE_CAP_DEPTH_CLAMP:
case PIPE_CAP_SHADER_STENCIL_EXPORT:
+ case PIPE_CAP_TGSI_INSTANCEID:
+ case PIPE_CAP_VERTEX_ELEMENT_INSTANCE_DIVISOR:
return 1;
+ case PIPE_CAP_INDEP_BLEND_ENABLE:
+ /* R600 doesn't support per-MRT blends */
+ if (family == CHIP_R600)
+ return 0;
+ else
+ return 1;
/* Unsupported features (boolean caps). */
- case PIPE_CAP_TIMER_QUERY:
case PIPE_CAP_STREAM_OUTPUT:
case PIPE_CAP_PRIMITIVE_RESTART:
case PIPE_CAP_INDEP_BLEND_FUNC: /* FIXME allow this */
- return 0;
+ /* R600 doesn't support per-MRT blends */
+ if (family == CHIP_R600)
+ return 0;
+ else
+ return 0;
+
+ case PIPE_CAP_ARRAY_TEXTURES:
+ /* fix once the CS checker upstream is fixed */
+ return debug_get_bool_option("R600_ARRAY_TEXTURE", FALSE);
/* Texturing. */
case PIPE_CAP_MAX_TEXTURE_2D_LEVELS:
@@ -316,6 +335,10 @@ static int r600_get_param(struct pipe_screen* pscreen, enum pipe_cap param)
case PIPE_CAP_TGSI_FS_COORD_PIXEL_CENTER_INTEGER:
return 0;
+ /* Timer queries, present when the clock frequency is non zero. */
+ case PIPE_CAP_TIMER_QUERY:
+ return r600_get_clock_crystal_freq(rscreen->radeon) != 0;
+
default:
R600_ERR("r600: unknown param %d\n", param);
return 0;
@@ -380,9 +403,9 @@ static int r600_get_shader_param(struct pipe_screen* pscreen, unsigned shader, e
case PIPE_SHADER_CAP_MAX_ADDRS:
return 1; //max native address registers/* FIXME Isn't this equal to TEMPS? */
case PIPE_SHADER_CAP_MAX_CONSTS:
- return 256; //max native parameters
+ return R600_MAX_CONST_BUFFER_SIZE;
case PIPE_SHADER_CAP_MAX_CONST_BUFFERS:
- return 1;
+ return R600_MAX_CONST_BUFFERS;
case PIPE_SHADER_CAP_MAX_PREDS:
return 0; /* FIXME */
case PIPE_SHADER_CAP_TGSI_CONT_SUPPORTED:
@@ -403,8 +426,7 @@ static boolean r600_is_format_supported(struct pipe_screen* screen,
enum pipe_format format,
enum pipe_texture_target target,
unsigned sample_count,
- unsigned usage,
- unsigned geom_flags)
+ unsigned usage)
{
unsigned retval = 0;
if (target >= PIPE_MAX_TEXTURE_TYPES) {
@@ -417,7 +439,7 @@ static boolean r600_is_format_supported(struct pipe_screen* screen,
return FALSE;
if ((usage & PIPE_BIND_SAMPLER_VIEW) &&
- r600_is_sampler_format_supported(format)) {
+ r600_is_sampler_format_supported(screen, format)) {
retval |= PIPE_BIND_SAMPLER_VIEW;
}
@@ -438,9 +460,14 @@ static boolean r600_is_format_supported(struct pipe_screen* screen,
retval |= PIPE_BIND_DEPTH_STENCIL;
}
- if ((usage & PIPE_BIND_VERTEX_BUFFER) &&
- r600_is_vertex_format_supported(format))
- retval |= PIPE_BIND_VERTEX_BUFFER;
+ if (usage & PIPE_BIND_VERTEX_BUFFER) {
+ struct r600_screen *rscreen = (struct r600_screen *)screen;
+ enum radeon_family family = r600_get_family(rscreen->radeon);
+
+ if (r600_is_vertex_format_supported(format, family)) {
+ retval |= PIPE_BIND_VERTEX_BUFFER;
+ }
+ }
if (usage & PIPE_BIND_TRANSFER_READ)
retval |= PIPE_BIND_TRANSFER_READ;
@@ -459,6 +486,8 @@ static void r600_destroy_screen(struct pipe_screen* pscreen)
radeon_decref(rscreen->radeon);
+ util_slab_destroy(&rscreen->pool_buffers);
+ pipe_mutex_destroy(rscreen->mutex_num_contexts);
FREE(rscreen);
}
@@ -485,6 +514,13 @@ struct pipe_screen *r600_screen_create(struct radeon *radeon)
r600_init_screen_resource_functions(&rscreen->screen);
rscreen->tiling_info = r600_get_tiling_info(radeon);
+ util_format_s3tc_init();
+
+ util_slab_create(&rscreen->pool_buffers,
+ sizeof(struct r600_resource_buffer), 64,
+ UTIL_SLAB_SINGLETHREADED);
+
+ pipe_mutex_init(rscreen->mutex_num_contexts);
return &rscreen->screen;
}
diff --git a/src/gallium/drivers/r600/r600_pipe.h b/src/gallium/drivers/r600/r600_pipe.h
index 485f42166d0..396801e4a41 100644
--- a/src/gallium/drivers/r600/r600_pipe.h
+++ b/src/gallium/drivers/r600/r600_pipe.h
@@ -30,12 +30,16 @@
#include <pipe/p_screen.h>
#include <pipe/p_context.h>
#include <util/u_math.h>
-#include "translate/translate_cache.h"
+#include "util/u_slab.h"
+#include "util/u_vbuf_mgr.h"
#include "r600.h"
#include "r600_public.h"
#include "r600_shader.h"
#include "r600_resource.h"
+#define R600_MAX_CONST_BUFFERS 1
+#define R600_MAX_CONST_BUFFER_SIZE 4096
+
enum r600_pipe_state_id {
R600_PIPE_STATE_BLEND = 0,
R600_PIPE_STATE_BLEND_COLOR,
@@ -62,6 +66,11 @@ struct r600_screen {
struct pipe_screen screen;
struct radeon *radeon;
struct r600_tiling_info *tiling_info;
+ struct util_slab_mempool pool_buffers;
+ unsigned num_contexts;
+
+ /* for thread-safe write accessing to num_contexts */
+ pipe_mutex mutex_num_contexts;
};
struct r600_pipe_sampler_view {
@@ -86,9 +95,7 @@ struct r600_vertex_element
{
unsigned count;
struct pipe_vertex_element elements[PIPE_MAX_ATTRIBS];
- enum pipe_format hw_format[PIPE_MAX_ATTRIBS];
- unsigned hw_format_size[PIPE_MAX_ATTRIBS];
- boolean incompatible_layout;
+ struct u_vbuf_mgr_elements *vmgr_elements;
struct r600_bo *fetch_shader;
unsigned fs_size;
struct r600_pipe_state rstate;
@@ -111,30 +118,18 @@ struct r600_pipe_shader {
#define NUM_TEX_UNITS 16
struct r600_textures_info {
- struct r600_pipe_sampler_view *views[NUM_TEX_UNITS];
+ struct r600_pipe_sampler_view *views[NUM_TEX_UNITS];
unsigned n_views;
void *samplers[NUM_TEX_UNITS];
unsigned n_samplers;
};
-/* vertex buffer translation context, used to translate vertex input that
- * hw doesn't natively support, so far only FLOAT64 is unsupported.
- */
-struct r600_translate_context {
- /* Translate cache for incompatible vertex offset/stride/format fallback. */
- struct translate_cache *translate_cache;
- /* The vertex buffer slot containing the translated buffer. */
- unsigned vb_slot;
- void *new_velems;
-};
-
#define R600_CONSTANT_ARRAY_SIZE 256
#define R600_RESOURCE_ARRAY_SIZE 160
struct r600_pipe_context {
struct pipe_context context;
struct blitter_context *blitter;
- struct pipe_framebuffer_state *pframebuffer;
unsigned family;
void *custom_dsa_flush;
struct r600_screen *screen;
@@ -142,43 +137,35 @@ struct r600_pipe_context {
struct r600_pipe_state *states[R600_PIPE_NSTATES];
struct r600_context ctx;
struct r600_vertex_element *vertex_elements;
+ struct r600_pipe_state fs_resource[PIPE_MAX_ATTRIBS];
struct pipe_framebuffer_state framebuffer;
struct pipe_index_buffer index_buffer;
- struct pipe_vertex_buffer vertex_buffer[PIPE_MAX_ATTRIBS];
- unsigned nvertex_buffer;
unsigned cb_target_mask;
/* for saving when using blitter */
struct pipe_stencil_ref stencil_ref;
struct pipe_viewport_state viewport;
struct pipe_clip_state clip;
- unsigned nvs_resource;
- struct r600_pipe_state *vs_resource;
- struct r600_pipe_state *ps_resource;
struct r600_pipe_state config;
struct r600_pipe_shader *ps_shader;
struct r600_pipe_shader *vs_shader;
struct r600_pipe_state vs_const_buffer;
+ struct r600_pipe_state vs_const_buffer_resource[R600_MAX_CONST_BUFFERS];
struct r600_pipe_state ps_const_buffer;
+ struct r600_pipe_state ps_const_buffer_resource[R600_MAX_CONST_BUFFERS];
struct r600_pipe_rasterizer *rasterizer;
/* shader information */
unsigned sprite_coord_enable;
bool flatshade;
- struct u_upload_mgr *upload_vb;
- struct u_upload_mgr *upload_ib;
- unsigned any_user_vbs;
struct r600_textures_info ps_samplers;
- unsigned vb_max_index;
- struct r600_translate_context tran;
+
+ struct u_vbuf_mgr *vbuf_mgr;
+ struct util_slab_mempool pool_transfers;
+ bool blit;
};
struct r600_drawl {
+ struct pipe_draw_info info;
struct pipe_context *ctx;
- unsigned mode;
- unsigned min_index;
- unsigned max_index;
- unsigned index_bias;
- unsigned start;
- unsigned count;
unsigned index_size;
unsigned index_buffer_offset;
struct pipe_resource *index_buffer;
@@ -187,16 +174,21 @@ struct r600_drawl {
/* evergreen_state.c */
void evergreen_init_state_functions(struct r600_pipe_context *rctx);
void evergreen_init_config(struct r600_pipe_context *rctx);
-void evergreen_draw(struct pipe_context *ctx, const struct pipe_draw_info *info);
void evergreen_pipe_shader_ps(struct pipe_context *ctx, struct r600_pipe_shader *shader);
void evergreen_pipe_shader_vs(struct pipe_context *ctx, struct r600_pipe_shader *shader);
+void evergreen_fetch_shader(struct r600_vertex_element *ve);
void *evergreen_create_db_flush_dsa(struct r600_pipe_context *rctx);
void evergreen_polygon_offset_update(struct r600_pipe_context *rctx);
-void evergreen_vertex_buffer_update(struct r600_pipe_context *rctx);
+void evergreen_pipe_set_buffer_resource(struct r600_pipe_context *rctx,
+ struct r600_pipe_state *rstate,
+ struct r600_resource *rbuffer,
+ unsigned offset, unsigned stride);
/* r600_blit.c */
void r600_init_blit_functions(struct r600_pipe_context *rctx);
-int r600_blit_uncompress_depth(struct pipe_context *ctx, struct r600_resource_texture *texture);
+void r600_blit_uncompress_depth(struct pipe_context *ctx, struct r600_resource_texture *texture);
+void r600_blit_push_depth(struct pipe_context *ctx, struct r600_resource_texture *texture);
+void r600_flush_depth_textures(struct r600_pipe_context *rctx);
/* r600_buffer.c */
struct pipe_resource *r600_buffer_create(struct pipe_screen *screen,
@@ -204,13 +196,9 @@ struct pipe_resource *r600_buffer_create(struct pipe_screen *screen,
struct pipe_resource *r600_user_buffer_create(struct pipe_screen *screen,
void *ptr, unsigned bytes,
unsigned bind);
-unsigned r600_buffer_is_referenced_by_cs(struct pipe_context *context,
- struct pipe_resource *buf,
- unsigned level, int layer);
struct pipe_resource *r600_buffer_from_handle(struct pipe_screen *screen,
struct winsys_handle *whandle);
-int r600_upload_index_buffer(struct r600_pipe_context *rctx, struct r600_drawl *draw);
-int r600_upload_user_buffers(struct r600_pipe_context *rctx);
+void r600_upload_index_buffer(struct r600_pipe_context *rctx, struct r600_drawl *draw);
/* r600_query.c */
void r600_init_query_functions(struct r600_pipe_context *rctx);
@@ -219,7 +207,6 @@ void r600_init_query_functions(struct r600_pipe_context *rctx);
void r600_init_context_resource_functions(struct r600_pipe_context *r600);
/* r600_shader.c */
-int r600_pipe_shader(struct pipe_context *ctx, struct r600_pipe_shader *shader);
int r600_pipe_shader_create(struct pipe_context *ctx, struct r600_pipe_shader *shader, const struct tgsi_token *tokens);
void r600_pipe_shader_destroy(struct pipe_context *ctx, struct r600_pipe_shader *shader);
int r600_find_vs_semantic_index(struct r600_shader *vs,
@@ -227,11 +214,17 @@ int r600_find_vs_semantic_index(struct r600_shader *vs,
/* r600_state.c */
void r600_init_state_functions(struct r600_pipe_context *rctx);
-void r600_draw_vbo(struct pipe_context *ctx, const struct pipe_draw_info *info);
+void r600_spi_update(struct r600_pipe_context *rctx);
void r600_init_config(struct r600_pipe_context *rctx);
+void r600_pipe_shader_ps(struct pipe_context *ctx, struct r600_pipe_shader *shader);
+void r600_pipe_shader_vs(struct pipe_context *ctx, struct r600_pipe_shader *shader);
+void r600_fetch_shader(struct r600_vertex_element *ve);
void *r600_create_db_flush_dsa(struct r600_pipe_context *rctx);
void r600_polygon_offset_update(struct r600_pipe_context *rctx);
-void r600_vertex_buffer_update(struct r600_pipe_context *rctx);
+void r600_pipe_set_buffer_resource(struct r600_pipe_context *rctx,
+ struct r600_pipe_state *rstate,
+ struct r600_resource *rbuffer,
+ unsigned offset, unsigned stride);
/* r600_helper.h */
int r600_conv_pipe_prim(unsigned pprim, unsigned *prim);
@@ -239,15 +232,13 @@ int r600_conv_pipe_prim(unsigned pprim, unsigned *prim);
/* r600_texture.c */
void r600_init_screen_texture_functions(struct pipe_screen *screen);
void r600_init_surface_functions(struct r600_pipe_context *r600);
-uint32_t r600_translate_texformat(enum pipe_format format,
- const unsigned char *swizzle_view,
+uint32_t r600_translate_texformat(struct pipe_screen *screen, enum pipe_format format,
+ const unsigned char *swizzle_view,
uint32_t *word4_p, uint32_t *yuv_format_p);
unsigned r600_texture_get_offset(struct r600_resource_texture *rtex,
unsigned level, unsigned layer);
/* r600_translate.c */
-void r600_begin_vertex_translate(struct r600_pipe_context *rctx);
-void r600_end_vertex_translate(struct r600_pipe_context *rctx);
void r600_translate_index_buffer(struct r600_pipe_context *r600,
struct pipe_resource **index_buffer,
unsigned *index_size,
@@ -270,13 +261,16 @@ void r600_sampler_view_destroy(struct pipe_context *ctx,
void r600_bind_state(struct pipe_context *ctx, void *state);
void r600_delete_state(struct pipe_context *ctx, void *state);
void r600_bind_vertex_elements(struct pipe_context *ctx, void *state);
-
void *r600_create_shader_state(struct pipe_context *ctx,
const struct pipe_shader_state *state);
void r600_bind_ps_shader(struct pipe_context *ctx, void *state);
void r600_bind_vs_shader(struct pipe_context *ctx, void *state);
void r600_delete_ps_shader(struct pipe_context *ctx, void *state);
void r600_delete_vs_shader(struct pipe_context *ctx, void *state);
+void r600_set_constant_buffer(struct pipe_context *ctx, uint shader, uint index,
+ struct pipe_resource *buffer);
+void r600_draw_vbo(struct pipe_context *ctx, const struct pipe_draw_info *info);
+
/*
* common helpers
*/
diff --git a/src/gallium/drivers/r600/r600_query.c b/src/gallium/drivers/r600/r600_query.c
index 726668260cc..181ea3f9e49 100644
--- a/src/gallium/drivers/r600/r600_query.c
+++ b/src/gallium/drivers/r600/r600_query.c
@@ -21,6 +21,7 @@
* USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#include "r600_pipe.h"
+#include "r600d.h"
static struct pipe_query *r600_create_query(struct pipe_context *ctx, unsigned query_type)
{
@@ -61,11 +62,35 @@ static boolean r600_get_query_result(struct pipe_context *ctx,
struct r600_query *rquery = (struct r600_query *)query;
if (rquery->num_results) {
- ctx->flush(ctx, 0, NULL);
+ ctx->flush(ctx, NULL);
}
return r600_context_query_result(&rctx->ctx, (struct r600_query *)query, wait, vresult);
}
+static void r600_render_condition(struct pipe_context *ctx,
+ struct pipe_query *query,
+ uint mode)
+{
+ struct r600_pipe_context *rctx = (struct r600_pipe_context *)ctx;
+ struct r600_query *rquery = (struct r600_query *)query;
+ int wait_flag = 0;
+
+ if (!query) {
+ rctx->ctx.predicate_drawing = false;
+ r600_query_predication(&rctx->ctx, NULL, PREDICATION_OP_CLEAR, 1);
+ return;
+ }
+
+ if (mode == PIPE_RENDER_COND_WAIT ||
+ mode == PIPE_RENDER_COND_BY_REGION_WAIT) {
+ wait_flag = 1;
+ }
+
+ rctx->ctx.predicate_drawing = true;
+ r600_query_predication(&rctx->ctx, rquery, PREDICATION_OP_ZPASS, wait_flag);
+
+}
+
void r600_init_query_functions(struct r600_pipe_context *rctx)
{
rctx->context.create_query = r600_create_query;
@@ -73,4 +98,7 @@ void r600_init_query_functions(struct r600_pipe_context *rctx)
rctx->context.begin_query = r600_begin_query;
rctx->context.end_query = r600_end_query;
rctx->context.get_query_result = r600_get_query_result;
+
+ if (r600_get_num_backends(rctx->screen->radeon) > 0)
+ rctx->context.render_condition = r600_render_condition;
}
diff --git a/src/gallium/drivers/r600/r600_resource.c b/src/gallium/drivers/r600/r600_resource.c
index 207642ccfa9..f3ab3613c84 100644
--- a/src/gallium/drivers/r600/r600_resource.c
+++ b/src/gallium/drivers/r600/r600_resource.c
@@ -61,5 +61,4 @@ void r600_init_context_resource_functions(struct r600_pipe_context *r600)
r600->context.transfer_unmap = u_transfer_unmap_vtbl;
r600->context.transfer_destroy = u_transfer_destroy_vtbl;
r600->context.transfer_inline_write = u_transfer_inline_write_vtbl;
- r600->context.is_resource_referenced = u_is_resource_referenced_vtbl;
}
diff --git a/src/gallium/drivers/r600/r600_resource.h b/src/gallium/drivers/r600/r600_resource.h
index 25aa84682c5..836e7491f1f 100644
--- a/src/gallium/drivers/r600/r600_resource.h
+++ b/src/gallium/drivers/r600/r600_resource.h
@@ -24,6 +24,7 @@
#define R600_RESOURCE_H
#include "util/u_transfer.h"
+#include "util/u_vbuf_mgr.h"
/* flag to indicate a resource is to be used as a transfer so should not be tiled */
#define R600_RESOURCE_FLAG_TRANSFER PIPE_RESOURCE_FLAG_DRV_PRIV
@@ -43,25 +44,45 @@ struct r600_transfer {
* underlying implementations.
*/
struct r600_resource {
- struct u_resource base;
+ struct u_vbuf_resource b;
struct r600_bo *bo;
u32 size;
+ unsigned bo_size;
};
struct r600_resource_texture {
struct r600_resource resource;
unsigned offset[PIPE_MAX_TEXTURE_LEVELS];
- unsigned pitch_in_bytes[PIPE_MAX_TEXTURE_LEVELS];
- unsigned pitch_in_pixels[PIPE_MAX_TEXTURE_LEVELS];
+ unsigned pitch_in_bytes[PIPE_MAX_TEXTURE_LEVELS]; /* transfer */
+ unsigned pitch_in_blocks[PIPE_MAX_TEXTURE_LEVELS]; /* texture resource */
unsigned layer_size[PIPE_MAX_TEXTURE_LEVELS];
unsigned array_mode[PIPE_MAX_TEXTURE_LEVELS];
unsigned pitch_override;
unsigned size;
- unsigned tiled;
unsigned tile_type;
unsigned depth;
- unsigned dirty;
- struct r600_resource_texture *flushed_depth_texture;
+ unsigned dirty_db;
+ struct r600_resource_texture *flushed_depth_texture;
+ boolean is_flushing_texture;
+
+ /* on some cards we have to use integer 64/128-bit types
+ for s3tc blits, do this until gallium grows int formats */
+ boolean force_int_type;
+};
+
+#define R600_TEX_IS_TILED(tex, level) ((tex)->array_mode[level] != V_038000_ARRAY_LINEAR_GENERAL && (tex)->array_mode[level] != V_038000_ARRAY_LINEAR_ALIGNED)
+
+#define R600_BUFFER_MAGIC 0xabcd1600
+
+/* XXX this could be removed */
+struct r600_resource_buffer {
+ struct r600_resource r;
+ uint32_t magic;
+};
+
+struct r600_surface {
+ struct pipe_surface base;
+ unsigned aligned_height;
};
void r600_init_screen_resource_functions(struct pipe_screen *screen);
@@ -73,41 +94,17 @@ struct pipe_resource *r600_texture_from_handle(struct pipe_screen *screen,
const struct pipe_resource *base,
struct winsys_handle *whandle);
-#define R600_BUFFER_MAGIC 0xabcd1600
-#define R600_BUFFER_MAX_RANGES 32
-
-struct r600_buffer_range {
- uint32_t start;
- uint32_t end;
-};
-
-struct r600_resource_buffer {
- struct r600_resource r;
- uint32_t magic;
- void *user_buffer;
- struct r600_buffer_range ranges[R600_BUFFER_MAX_RANGES];
- unsigned num_ranges;
-};
-
/* r600_buffer */
static INLINE struct r600_resource_buffer *r600_buffer(struct pipe_resource *buffer)
{
if (buffer) {
assert(((struct r600_resource_buffer *)buffer)->magic == R600_BUFFER_MAGIC);
return (struct r600_resource_buffer *)buffer;
- }
- return NULL;
-}
-
-static INLINE boolean r600_buffer_is_user_buffer(struct pipe_resource *buffer)
-{
- return r600_buffer(buffer)->user_buffer ? TRUE : FALSE;
+ }
+ return NULL;
}
-int r600_texture_depth_flush(struct pipe_context *ctx,
- struct pipe_resource *texture);
-
-extern int (*r600_blit_uncompress_depth_ptr)(struct pipe_context *ctx, struct r600_resource_texture *texture);
+int r600_texture_depth_flush(struct pipe_context *ctx, struct pipe_resource *texture, boolean just_create);
/* r600_texture.c texture transfer functions. */
struct pipe_transfer* r600_texture_get_transfer(struct pipe_context *ctx,
@@ -122,9 +119,8 @@ void* r600_texture_transfer_map(struct pipe_context *ctx,
void r600_texture_transfer_unmap(struct pipe_context *ctx,
struct pipe_transfer* transfer);
-struct r600_surface {
- struct pipe_surface base;
- unsigned aligned_height;
-};
+struct r600_pipe_context;
+
+void r600_upload_const_buffer(struct r600_pipe_context *rctx, struct r600_resource_buffer **rbuffer, uint32_t *offset);
#endif
diff --git a/src/gallium/drivers/r600/r600_shader.c b/src/gallium/drivers/r600/r600_shader.c
index d6455023a3a..e7285d624e3 100644
--- a/src/gallium/drivers/r600/r600_shader.c
+++ b/src/gallium/drivers/r600/r600_shader.c
@@ -28,60 +28,12 @@
#include "r600_pipe.h"
#include "r600_asm.h"
#include "r600_sq.h"
+#include "r600_formats.h"
#include "r600_opcodes.h"
#include "r600d.h"
#include <stdio.h>
#include <errno.h>
-static void r600_pipe_shader_vs(struct pipe_context *ctx, struct r600_pipe_shader *shader)
-{
- struct r600_pipe_state *rstate = &shader->rstate;
- struct r600_shader *rshader = &shader->shader;
- unsigned spi_vs_out_id[10];
- unsigned i, tmp;
-
- /* clear previous register */
- rstate->nregs = 0;
-
- /* so far never got proper semantic id from tgsi */
- /* FIXME better to move this in config things so they get emited
- * only one time per cs
- */
- for (i = 0; i < 10; i++) {
- spi_vs_out_id[i] = 0;
- }
- for (i = 0; i < 32; i++) {
- tmp = i << ((i & 3) * 8);
- spi_vs_out_id[i / 4] |= tmp;
- }
- for (i = 0; i < 10; i++) {
- r600_pipe_state_add_reg(rstate,
- R_028614_SPI_VS_OUT_ID_0 + i * 4,
- spi_vs_out_id[i], 0xFFFFFFFF, NULL);
- }
-
- r600_pipe_state_add_reg(rstate,
- R_0286C4_SPI_VS_OUT_CONFIG,
- S_0286C4_VS_EXPORT_COUNT(rshader->noutput - 2),
- 0xFFFFFFFF, NULL);
- r600_pipe_state_add_reg(rstate,
- R_028868_SQ_PGM_RESOURCES_VS,
- S_028868_NUM_GPRS(rshader->bc.ngpr) |
- S_028868_STACK_SIZE(rshader->bc.nstack),
- 0xFFFFFFFF, NULL);
- r600_pipe_state_add_reg(rstate,
- R_0288D0_SQ_PGM_CF_OFFSET_VS,
- 0x00000000, 0xFFFFFFFF, NULL);
- r600_pipe_state_add_reg(rstate,
- R_028858_SQ_PGM_START_VS,
- r600_bo_offset(shader->bo) >> 8, 0xFFFFFFFF, shader->bo);
-
- r600_pipe_state_add_reg(rstate,
- R_03E200_SQ_LOOP_CONST_0 + (32 * 4), 0x01000FFF,
- 0xFFFFFFFF, NULL);
-
-}
-
int r600_find_vs_semantic_index(struct r600_shader *vs,
struct r600_shader *ps, int id)
{
@@ -96,98 +48,7 @@ int r600_find_vs_semantic_index(struct r600_shader *vs,
return 0;
}
-static void r600_pipe_shader_ps(struct pipe_context *ctx, struct r600_pipe_shader *shader)
-{
- struct r600_pipe_state *rstate = &shader->rstate;
- struct r600_shader *rshader = &shader->shader;
- unsigned i, exports_ps, num_cout, spi_ps_in_control_0, spi_input_z, spi_ps_in_control_1;
- int pos_index = -1, face_index = -1;
-
- rstate->nregs = 0;
-
- for (i = 0; i < rshader->ninput; i++) {
- if (rshader->input[i].name == TGSI_SEMANTIC_POSITION)
- pos_index = i;
- if (rshader->input[i].name == TGSI_SEMANTIC_FACE)
- face_index = i;
- }
-
- for (i = 0; i < rshader->noutput; i++) {
- if (rshader->output[i].name == TGSI_SEMANTIC_POSITION)
- r600_pipe_state_add_reg(rstate,
- R_02880C_DB_SHADER_CONTROL,
- S_02880C_Z_EXPORT_ENABLE(1),
- S_02880C_Z_EXPORT_ENABLE(1), NULL);
- if (rshader->output[i].name == TGSI_SEMANTIC_STENCIL)
- r600_pipe_state_add_reg(rstate,
- R_02880C_DB_SHADER_CONTROL,
- S_02880C_STENCIL_REF_EXPORT_ENABLE(1),
- S_02880C_STENCIL_REF_EXPORT_ENABLE(1), NULL);
- }
-
- exports_ps = 0;
- num_cout = 0;
- for (i = 0; i < rshader->noutput; i++) {
- if (rshader->output[i].name == TGSI_SEMANTIC_POSITION || rshader->output[i].name == TGSI_SEMANTIC_STENCIL)
- exports_ps |= 1;
- else if (rshader->output[i].name == TGSI_SEMANTIC_COLOR) {
- num_cout++;
- }
- }
- exports_ps |= S_028854_EXPORT_COLORS(num_cout);
- if (!exports_ps) {
- /* always at least export 1 component per pixel */
- exports_ps = 2;
- }
-
- spi_ps_in_control_0 = S_0286CC_NUM_INTERP(rshader->ninput) |
- S_0286CC_PERSP_GRADIENT_ENA(1);
- spi_input_z = 0;
- if (pos_index != -1) {
- spi_ps_in_control_0 |= (S_0286CC_POSITION_ENA(1) |
- S_0286CC_POSITION_CENTROID(rshader->input[pos_index].centroid) |
- S_0286CC_POSITION_ADDR(rshader->input[pos_index].gpr) |
- S_0286CC_BARYC_SAMPLE_CNTL(1));
- spi_input_z |= 1;
- }
-
- spi_ps_in_control_1 = 0;
- if (face_index != -1) {
- spi_ps_in_control_1 |= S_0286D0_FRONT_FACE_ENA(1) |
- S_0286D0_FRONT_FACE_ADDR(rshader->input[face_index].gpr);
- }
-
- r600_pipe_state_add_reg(rstate, R_0286CC_SPI_PS_IN_CONTROL_0, spi_ps_in_control_0, 0xFFFFFFFF, NULL);
- r600_pipe_state_add_reg(rstate, R_0286D0_SPI_PS_IN_CONTROL_1, spi_ps_in_control_1, 0xFFFFFFFF, NULL);
- r600_pipe_state_add_reg(rstate, R_0286D8_SPI_INPUT_Z, spi_input_z, 0xFFFFFFFF, NULL);
- r600_pipe_state_add_reg(rstate,
- R_028840_SQ_PGM_START_PS,
- r600_bo_offset(shader->bo) >> 8, 0xFFFFFFFF, shader->bo);
- r600_pipe_state_add_reg(rstate,
- R_028850_SQ_PGM_RESOURCES_PS,
- S_028868_NUM_GPRS(rshader->bc.ngpr) |
- S_028868_STACK_SIZE(rshader->bc.nstack),
- 0xFFFFFFFF, NULL);
- r600_pipe_state_add_reg(rstate,
- R_028854_SQ_PGM_EXPORTS_PS,
- exports_ps, 0xFFFFFFFF, NULL);
- r600_pipe_state_add_reg(rstate,
- R_0288CC_SQ_PGM_CF_OFFSET_PS,
- 0x00000000, 0xFFFFFFFF, NULL);
-
- if (rshader->uses_kill) {
- /* only set some bits here, the other bits are set in the dsa state */
- r600_pipe_state_add_reg(rstate,
- R_02880C_DB_SHADER_CONTROL,
- S_02880C_KILL_ENABLE(1),
- S_02880C_KILL_ENABLE(1), NULL);
- }
- r600_pipe_state_add_reg(rstate,
- R_03E200_SQ_LOOP_CONST_0, 0x01000FFF,
- 0xFFFFFFFF, NULL);
-}
-
-int r600_pipe_shader(struct pipe_context *ctx, struct r600_pipe_shader *shader)
+static int r600_pipe_shader(struct pipe_context *ctx, struct r600_pipe_shader *shader)
{
struct r600_pipe_context *rctx = (struct r600_pipe_context *)ctx;
struct r600_shader *rshader = &shader->shader;
@@ -225,14 +86,23 @@ int r600_pipe_shader(struct pipe_context *ctx, struct r600_pipe_shader *shader)
return 0;
}
-int r600_shader_from_tgsi(const struct tgsi_token *tokens, struct r600_shader *shader);
+static int r600_shader_from_tgsi(const struct tgsi_token *tokens, struct r600_shader *shader);
+
int r600_pipe_shader_create(struct pipe_context *ctx, struct r600_pipe_shader *shader, const struct tgsi_token *tokens)
{
+ static int dump_shaders = -1;
struct r600_pipe_context *rctx = (struct r600_pipe_context *)ctx;
int r;
-//fprintf(stderr, "--------------------------------------------------------------\n");
-//tgsi_dump(tokens, 0);
+ /* Would like some magic "get_bool_option_once" routine.
+ */
+ if (dump_shaders == -1)
+ dump_shaders = debug_get_bool_option("R600_DUMP_SHADERS", FALSE);
+
+ if (dump_shaders) {
+ fprintf(stderr, "--------------------------------------------------------------\n");
+ tgsi_dump(tokens, 0);
+ }
shader->shader.family = r600_get_family(rctx->radeon);
r = r600_shader_from_tgsi(tokens, &shader->shader);
if (r) {
@@ -244,8 +114,10 @@ int r600_pipe_shader_create(struct pipe_context *ctx, struct r600_pipe_shader *s
R600_ERR("building bytecode failed !\n");
return r;
}
-//r600_bc_dump(&shader->shader.bc);
-//fprintf(stderr, "______________________________________________________________\n");
+ if (dump_shaders) {
+ r600_bc_dump(&shader->shader.bc);
+ fprintf(stderr, "______________________________________________________________\n");
+ }
return r600_pipe_shader(ctx, shader);
}
@@ -262,6 +134,15 @@ void r600_pipe_shader_destroy(struct pipe_context *ctx, struct r600_pipe_shader
*/
struct r600_shader_tgsi_instruction;
+struct r600_shader_src {
+ unsigned sel;
+ unsigned swizzle[4];
+ unsigned neg;
+ unsigned abs;
+ unsigned rel;
+ uint32_t value[4];
+};
+
struct r600_shader_ctx {
struct tgsi_shader_info info;
struct tgsi_parse_context parse;
@@ -269,10 +150,11 @@ struct r600_shader_ctx {
unsigned type;
unsigned file_offset[TGSI_FILE_COUNT];
unsigned temp_reg;
+ unsigned ar_reg;
struct r600_shader_tgsi_instruction *inst_info;
struct r600_bc *bc;
struct r600_shader *shader;
- u32 value[4];
+ struct r600_shader_src src[3];
u32 *literals;
u32 nliterals;
u32 max_driver_temp_used;
@@ -391,6 +273,7 @@ static int tgsi_declaration(struct r600_shader_ctx *ctx)
{
struct tgsi_full_declaration *d = &ctx->parse.FullToken.FullDeclaration;
unsigned i;
+ int r;
switch (d->Declaration.File) {
case TGSI_FILE_INPUT:
@@ -422,6 +305,26 @@ static int tgsi_declaration(struct r600_shader_ctx *ctx)
case TGSI_FILE_SAMPLER:
case TGSI_FILE_ADDRESS:
break;
+
+ case TGSI_FILE_SYSTEM_VALUE:
+ if (d->Semantic.Name == TGSI_SEMANTIC_INSTANCEID) {
+ struct r600_bc_alu alu;
+ memset(&alu, 0, sizeof(struct r600_bc_alu));
+
+ alu.inst = CTX_INST(V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_INT_TO_FLT);
+ alu.src[0].sel = 0;
+ alu.src[0].chan = 3;
+
+ alu.dst.sel = 0;
+ alu.dst.chan = 3;
+ alu.dst.write = 1;
+ alu.last = 1;
+
+ if ((r = r600_bc_add_alu(ctx->bc, &alu)))
+ return r;
+ break;
+ }
+
default:
R600_ERR("unsupported file %d declaration\n", d->Declaration.File);
return -EINVAL;
@@ -481,9 +384,187 @@ static int evergreen_gpr_count(struct r600_shader_ctx *ctx)
return ctx->num_interp_gpr;
}
-int r600_shader_from_tgsi(const struct tgsi_token *tokens, struct r600_shader *shader)
+static void tgsi_src(struct r600_shader_ctx *ctx,
+ const struct tgsi_full_src_register *tgsi_src,
+ struct r600_shader_src *r600_src)
+{
+ memset(r600_src, 0, sizeof(*r600_src));
+ r600_src->swizzle[0] = tgsi_src->Register.SwizzleX;
+ r600_src->swizzle[1] = tgsi_src->Register.SwizzleY;
+ r600_src->swizzle[2] = tgsi_src->Register.SwizzleZ;
+ r600_src->swizzle[3] = tgsi_src->Register.SwizzleW;
+ r600_src->neg = tgsi_src->Register.Negate;
+ r600_src->abs = tgsi_src->Register.Absolute;
+
+ if (tgsi_src->Register.File == TGSI_FILE_IMMEDIATE) {
+ int index;
+ if ((tgsi_src->Register.SwizzleX == tgsi_src->Register.SwizzleY) &&
+ (tgsi_src->Register.SwizzleX == tgsi_src->Register.SwizzleZ) &&
+ (tgsi_src->Register.SwizzleX == tgsi_src->Register.SwizzleW)) {
+
+ index = tgsi_src->Register.Index * 4 + tgsi_src->Register.SwizzleX;
+ r600_bc_special_constants(ctx->literals[index], &r600_src->sel, &r600_src->neg);
+ if (r600_src->sel != V_SQ_ALU_SRC_LITERAL)
+ return;
+ }
+ index = tgsi_src->Register.Index;
+ r600_src->sel = V_SQ_ALU_SRC_LITERAL;
+ memcpy(r600_src->value, ctx->literals + index * 4, sizeof(r600_src->value));
+ } else if (tgsi_src->Register.File == TGSI_FILE_SYSTEM_VALUE) {
+ /* assume we wan't TGSI_SEMANTIC_INSTANCEID here */
+ r600_src->swizzle[0] = 3;
+ r600_src->swizzle[1] = 3;
+ r600_src->swizzle[2] = 3;
+ r600_src->swizzle[3] = 3;
+ r600_src->sel = 0;
+ } else {
+ if (tgsi_src->Register.Indirect)
+ r600_src->rel = V_SQ_REL_RELATIVE;
+ r600_src->sel = tgsi_src->Register.Index;
+ r600_src->sel += ctx->file_offset[tgsi_src->Register.File];
+ }
+}
+
+static int tgsi_fetch_rel_const(struct r600_shader_ctx *ctx, unsigned int offset, unsigned int dst_reg)
+{
+ struct r600_bc_vtx vtx;
+ unsigned int ar_reg;
+ int r;
+
+ if (offset) {
+ struct r600_bc_alu alu;
+
+ memset(&alu, 0, sizeof(alu));
+
+ alu.inst = CTX_INST(V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_ADD_INT);
+ alu.src[0].sel = ctx->ar_reg;
+
+ alu.src[1].sel = V_SQ_ALU_SRC_LITERAL;
+ alu.src[1].value = offset;
+
+ alu.dst.sel = dst_reg;
+ alu.dst.write = 1;
+ alu.last = 1;
+
+ if ((r = r600_bc_add_alu(ctx->bc, &alu)))
+ return r;
+
+ ar_reg = dst_reg;
+ } else {
+ ar_reg = ctx->ar_reg;
+ }
+
+ memset(&vtx, 0, sizeof(vtx));
+ vtx.fetch_type = 2; /* VTX_FETCH_NO_INDEX_OFFSET */
+ vtx.src_gpr = ar_reg;
+ vtx.mega_fetch_count = 16;
+ vtx.dst_gpr = dst_reg;
+ vtx.dst_sel_x = 0; /* SEL_X */
+ vtx.dst_sel_y = 1; /* SEL_Y */
+ vtx.dst_sel_z = 2; /* SEL_Z */
+ vtx.dst_sel_w = 3; /* SEL_W */
+ vtx.data_format = FMT_32_32_32_32_FLOAT;
+ vtx.num_format_all = 2; /* NUM_FORMAT_SCALED */
+ vtx.format_comp_all = 1; /* FORMAT_COMP_SIGNED */
+ vtx.srf_mode_all = 1; /* SRF_MODE_NO_ZERO */
+
+ if ((r = r600_bc_add_vtx(ctx->bc, &vtx)))
+ return r;
+
+ return 0;
+}
+
+static int tgsi_split_constant(struct r600_shader_ctx *ctx)
+{
+ struct tgsi_full_instruction *inst = &ctx->parse.FullToken.FullInstruction;
+ struct r600_bc_alu alu;
+ int i, j, k, nconst, r;
+
+ for (i = 0, nconst = 0; i < inst->Instruction.NumSrcRegs; i++) {
+ if (inst->Src[i].Register.File == TGSI_FILE_CONSTANT) {
+ nconst++;
+ }
+ tgsi_src(ctx, &inst->Src[i], &ctx->src[i]);
+ }
+ for (i = 0, j = nconst - 1; i < inst->Instruction.NumSrcRegs; i++) {
+ if (inst->Src[i].Register.File != TGSI_FILE_CONSTANT) {
+ continue;
+ }
+
+ if (ctx->src[i].rel) {
+ int treg = r600_get_temp(ctx);
+ if ((r = tgsi_fetch_rel_const(ctx, ctx->src[i].sel - 512, treg)))
+ return r;
+
+ ctx->src[i].sel = treg;
+ ctx->src[i].rel = 0;
+ j--;
+ } else if (j > 0) {
+ int treg = r600_get_temp(ctx);
+ for (k = 0; k < 4; k++) {
+ memset(&alu, 0, sizeof(struct r600_bc_alu));
+ alu.inst = CTX_INST(V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MOV);
+ alu.src[0].sel = ctx->src[i].sel;
+ alu.src[0].chan = k;
+ alu.src[0].rel = ctx->src[i].rel;
+ alu.dst.sel = treg;
+ alu.dst.chan = k;
+ alu.dst.write = 1;
+ if (k == 3)
+ alu.last = 1;
+ r = r600_bc_add_alu(ctx->bc, &alu);
+ if (r)
+ return r;
+ }
+ ctx->src[i].sel = treg;
+ ctx->src[i].rel =0;
+ j--;
+ }
+ }
+ return 0;
+}
+
+/* need to move any immediate into a temp - for trig functions which use literal for PI stuff */
+static int tgsi_split_literal_constant(struct r600_shader_ctx *ctx)
+{
+ struct tgsi_full_instruction *inst = &ctx->parse.FullToken.FullInstruction;
+ struct r600_bc_alu alu;
+ int i, j, k, nliteral, r;
+
+ for (i = 0, nliteral = 0; i < inst->Instruction.NumSrcRegs; i++) {
+ if (ctx->src[i].sel == V_SQ_ALU_SRC_LITERAL) {
+ nliteral++;
+ }
+ }
+ for (i = 0, j = nliteral - 1; i < inst->Instruction.NumSrcRegs; i++) {
+ if (j > 0 && ctx->src[i].sel == V_SQ_ALU_SRC_LITERAL) {
+ int treg = r600_get_temp(ctx);
+ for (k = 0; k < 4; k++) {
+ memset(&alu, 0, sizeof(struct r600_bc_alu));
+ alu.inst = CTX_INST(V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MOV);
+ alu.src[0].sel = ctx->src[i].sel;
+ alu.src[0].chan = k;
+ alu.src[0].value = ctx->src[i].value[k];
+ alu.dst.sel = treg;
+ alu.dst.chan = k;
+ alu.dst.write = 1;
+ if (k == 3)
+ alu.last = 1;
+ r = r600_bc_add_alu(ctx->bc, &alu);
+ if (r)
+ return r;
+ }
+ ctx->src[i].sel = treg;
+ j--;
+ }
+ }
+ return 0;
+}
+
+static int r600_shader_from_tgsi(const struct tgsi_token *tokens, struct r600_shader *shader)
{
struct tgsi_full_immediate *immediate;
+ struct tgsi_full_property *property;
struct r600_shader_ctx ctx;
struct r600_bc_output output[32];
unsigned output_done, noutput;
@@ -506,7 +587,9 @@ int r600_shader_from_tgsi(const struct tgsi_token *tokens, struct r600_shader *s
/* Values [0,127] correspond to GPR[0..127].
* Values [128,159] correspond to constant buffer bank 0
* Values [160,191] correspond to constant buffer bank 1
- * Values [256,511] correspond to cfile constants c[0..255].
+ * Values [256,511] correspond to cfile constants c[0..255]. (Gone on EG)
+ * Values [256,287] correspond to constant buffer bank 2 (EG)
+ * Values [288,319] correspond to constant buffer bank 3 (EG)
* Other special values are shown in the list below.
* 244 ALU_SRC_1_DBL_L: special constant 1.0 double-float, LSW. (RV670+)
* 245 ALU_SRC_1_DBL_M: special constant 1.0 double-float, MSW. (RV670+)
@@ -540,15 +623,18 @@ int r600_shader_from_tgsi(const struct tgsi_token *tokens, struct r600_shader *s
ctx.file_offset[TGSI_FILE_TEMPORARY] = ctx.file_offset[TGSI_FILE_OUTPUT] +
ctx.info.file_count[TGSI_FILE_OUTPUT];
- ctx.file_offset[TGSI_FILE_CONSTANT] = 128;
+ /* Outside the GPR range. This will be translated to one of the
+ * kcache banks later. */
+ ctx.file_offset[TGSI_FILE_CONSTANT] = 512;
- ctx.file_offset[TGSI_FILE_IMMEDIATE] = 253;
- ctx.temp_reg = ctx.file_offset[TGSI_FILE_TEMPORARY] +
+ ctx.file_offset[TGSI_FILE_IMMEDIATE] = V_SQ_ALU_SRC_LITERAL;
+ ctx.ar_reg = ctx.file_offset[TGSI_FILE_TEMPORARY] +
ctx.info.file_count[TGSI_FILE_TEMPORARY];
+ ctx.temp_reg = ctx.ar_reg + 1;
ctx.nliterals = 0;
ctx.literals = NULL;
-
+ shader->fs_write_all = FALSE;
while (!tgsi_parse_end_of_tokens(&ctx.parse)) {
tgsi_parse_token(&ctx.parse);
switch (ctx.parse.FullToken.Token.Type) {
@@ -577,7 +663,12 @@ int r600_shader_from_tgsi(const struct tgsi_token *tokens, struct r600_shader *s
ctx.max_driver_temp_used = 0;
/* reserve first tmp for everyone */
r600_get_temp(&ctx);
+
opcode = ctx.parse.FullToken.FullInstruction.Instruction.Opcode;
+ if ((r = tgsi_split_constant(&ctx)))
+ goto out_err;
+ if ((r = tgsi_split_literal_constant(&ctx)))
+ goto out_err;
if (ctx.bc->chiprev == CHIPREV_EVERGREEN)
ctx.inst_info = &eg_shader_tgsi_instruction[opcode];
else
@@ -585,9 +676,13 @@ int r600_shader_from_tgsi(const struct tgsi_token *tokens, struct r600_shader *s
r = ctx.inst_info->process(&ctx);
if (r)
goto out_err;
- r = r600_bc_add_literal(ctx.bc, ctx.value);
- if (r)
- goto out_err;
+ break;
+ case TGSI_TOKEN_TYPE_PROPERTY:
+ property = &ctx.parse.FullToken.FullProperty;
+ if (property->Property.PropertyName == TGSI_PROPERTY_FS_COLOR0_WRITES_ALL_CBUFS) {
+ if (property->u[0].Data == 1)
+ shader->fs_write_all = TRUE;
+ }
break;
default:
R600_ERR("unsupported token type %d\n", ctx.parse.FullToken.Token.Type);
@@ -605,6 +700,7 @@ int r600_shader_from_tgsi(const struct tgsi_token *tokens, struct r600_shader *s
output[i].swizzle_y = 1;
output[i].swizzle_z = 2;
output[i].swizzle_w = 3;
+ output[i].burst_count = 1;
output[i].barrier = 1;
output[i].type = V_SQ_CF_ALLOC_EXPORT_WORD0_SQ_EXPORT_PARAM;
output[i].array_base = i - pos0;
@@ -668,6 +764,7 @@ int r600_shader_from_tgsi(const struct tgsi_token *tokens, struct r600_shader *s
output[i].swizzle_y = 1;
output[i].swizzle_z = 2;
output[i].swizzle_w = 3;
+ output[i].burst_count = 1;
output[i].barrier = 1;
output[i].type = V_SQ_CF_ALLOC_EXPORT_WORD0_SQ_EXPORT_PARAM;
output[i].array_base = 0;
@@ -684,6 +781,7 @@ int r600_shader_from_tgsi(const struct tgsi_token *tokens, struct r600_shader *s
output[0].swizzle_y = 7;
output[0].swizzle_z = 7;
output[0].swizzle_w = 7;
+ output[0].burst_count = 1;
output[0].barrier = 1;
output[0].type = V_SQ_CF_ALLOC_EXPORT_WORD0_SQ_EXPORT_PIXEL;
output[0].array_base = 0;
@@ -726,33 +824,22 @@ static int tgsi_end(struct r600_shader_ctx *ctx)
return 0;
}
-static int tgsi_src(struct r600_shader_ctx *ctx,
- const struct tgsi_full_src_register *tgsi_src,
- struct r600_bc_alu_src *r600_src)
+static void r600_bc_src(struct r600_bc_alu_src *bc_src,
+ const struct r600_shader_src *shader_src,
+ unsigned chan)
{
- int index;
- memset(r600_src, 0, sizeof(struct r600_bc_alu_src));
- r600_src->sel = tgsi_src->Register.Index;
- if (tgsi_src->Register.File == TGSI_FILE_IMMEDIATE) {
- r600_src->sel = 0;
- index = tgsi_src->Register.Index;
- ctx->value[0] = ctx->literals[index * 4 + 0];
- ctx->value[1] = ctx->literals[index * 4 + 1];
- ctx->value[2] = ctx->literals[index * 4 + 2];
- ctx->value[3] = ctx->literals[index * 4 + 3];
- }
- if (tgsi_src->Register.Indirect)
- r600_src->rel = V_SQ_REL_RELATIVE;
- r600_src->neg = tgsi_src->Register.Negate;
- r600_src->abs = tgsi_src->Register.Absolute;
- r600_src->sel += ctx->file_offset[tgsi_src->Register.File];
- return 0;
+ bc_src->sel = shader_src->sel;
+ bc_src->chan = shader_src->swizzle[chan];
+ bc_src->neg = shader_src->neg;
+ bc_src->abs = shader_src->abs;
+ bc_src->rel = shader_src->rel;
+ bc_src->value = shader_src->value[bc_src->chan];
}
-static int tgsi_dst(struct r600_shader_ctx *ctx,
- const struct tgsi_full_dst_register *tgsi_dst,
- unsigned swizzle,
- struct r600_bc_alu_dst *r600_dst)
+static void tgsi_dst(struct r600_shader_ctx *ctx,
+ const struct tgsi_full_dst_register *tgsi_dst,
+ unsigned swizzle,
+ struct r600_bc_alu_dst *r600_dst)
{
struct tgsi_full_instruction *inst = &ctx->parse.FullToken.FullInstruction;
@@ -765,146 +852,42 @@ static int tgsi_dst(struct r600_shader_ctx *ctx,
if (inst->Instruction.Saturate) {
r600_dst->clamp = 1;
}
- return 0;
}
-static unsigned tgsi_chan(const struct tgsi_full_src_register *tgsi_src, unsigned swizzle)
+static int tgsi_last_instruction(unsigned writemask)
{
- switch (swizzle) {
- case 0:
- return tgsi_src->Register.SwizzleX;
- case 1:
- return tgsi_src->Register.SwizzleY;
- case 2:
- return tgsi_src->Register.SwizzleZ;
- case 3:
- return tgsi_src->Register.SwizzleW;
- default:
- return 0;
- }
-}
+ int i, lasti = 0;
-static int tgsi_split_constant(struct r600_shader_ctx *ctx, struct r600_bc_alu_src r600_src[3])
-{
- struct tgsi_full_instruction *inst = &ctx->parse.FullToken.FullInstruction;
- struct r600_bc_alu alu;
- int i, j, k, nconst, r;
-
- for (i = 0, nconst = 0; i < inst->Instruction.NumSrcRegs; i++) {
- if (inst->Src[i].Register.File == TGSI_FILE_CONSTANT) {
- nconst++;
- }
- r = tgsi_src(ctx, &inst->Src[i], &r600_src[i]);
- if (r) {
- return r;
- }
- }
- for (i = 0, j = nconst - 1; i < inst->Instruction.NumSrcRegs; i++) {
- if (j > 0 && inst->Src[i].Register.File == TGSI_FILE_CONSTANT) {
- int treg = r600_get_temp(ctx);
- for (k = 0; k < 4; k++) {
- memset(&alu, 0, sizeof(struct r600_bc_alu));
- alu.inst = CTX_INST(V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MOV);
- alu.src[0].sel = r600_src[i].sel;
- alu.src[0].chan = k;
- alu.src[0].rel = r600_src[i].rel;
- alu.dst.sel = treg;
- alu.dst.chan = k;
- alu.dst.write = 1;
- if (k == 3)
- alu.last = 1;
- r = r600_bc_add_alu(ctx->bc, &alu);
- if (r)
- return r;
- }
- r600_src[i].sel = treg;
- r600_src[i].rel =0;
- j--;
- }
- }
- return 0;
-}
-
-/* need to move any immediate into a temp - for trig functions which use literal for PI stuff */
-static int tgsi_split_literal_constant(struct r600_shader_ctx *ctx, struct r600_bc_alu_src r600_src[3])
-{
- struct tgsi_full_instruction *inst = &ctx->parse.FullToken.FullInstruction;
- struct r600_bc_alu alu;
- int i, j, k, nliteral, r;
-
- for (i = 0, nliteral = 0; i < inst->Instruction.NumSrcRegs; i++) {
- if (inst->Src[i].Register.File == TGSI_FILE_IMMEDIATE) {
- nliteral++;
- }
- }
- for (i = 0, j = nliteral - 1; i < inst->Instruction.NumSrcRegs; i++) {
- if (j > 0 && inst->Src[i].Register.File == TGSI_FILE_IMMEDIATE) {
- int treg = r600_get_temp(ctx);
- for (k = 0; k < 4; k++) {
- memset(&alu, 0, sizeof(struct r600_bc_alu));
- alu.inst = CTX_INST(V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MOV);
- alu.src[0].sel = r600_src[i].sel;
- alu.src[0].chan = k;
- alu.dst.sel = treg;
- alu.dst.chan = k;
- alu.dst.write = 1;
- if (k == 3)
- alu.last = 1;
- r = r600_bc_add_alu(ctx->bc, &alu);
- if (r)
- return r;
- }
- r = r600_bc_add_literal(ctx->bc, &ctx->literals[inst->Src[i].Register.Index * 4]);
- if (r)
- return r;
- r600_src[i].sel = treg;
- j--;
+ for (i = 0; i < 4; i++) {
+ if (writemask & (1 << i)) {
+ lasti = i;
}
}
- return 0;
+ return lasti;
}
static int tgsi_op2_s(struct r600_shader_ctx *ctx, int swap)
{
struct tgsi_full_instruction *inst = &ctx->parse.FullToken.FullInstruction;
- struct r600_bc_alu_src r600_src[3];
struct r600_bc_alu alu;
int i, j, r;
- int lasti = 0;
+ int lasti = tgsi_last_instruction(inst->Dst[0].Register.WriteMask);
- for (i = 0; i < 4; i++) {
- if (inst->Dst[0].Register.WriteMask & (1 << i)) {
- lasti = i;
- }
- }
-
- r = tgsi_split_constant(ctx, r600_src);
- if (r)
- return r;
- r = tgsi_split_literal_constant(ctx, r600_src);
- if (r)
- return r;
for (i = 0; i < lasti + 1; i++) {
if (!(inst->Dst[0].Register.WriteMask & (1 << i)))
continue;
memset(&alu, 0, sizeof(struct r600_bc_alu));
- r = tgsi_dst(ctx, &inst->Dst[0], i, &alu.dst);
- if (r)
- return r;
+ tgsi_dst(ctx, &inst->Dst[0], i, &alu.dst);
alu.inst = ctx->inst_info->r600_opcode;
if (!swap) {
for (j = 0; j < inst->Instruction.NumSrcRegs; j++) {
- alu.src[j] = r600_src[j];
- alu.src[j].chan = tgsi_chan(&inst->Src[j], i);
+ r600_bc_src(&alu.src[j], &ctx->src[j], i);
}
} else {
- alu.src[0] = r600_src[1];
- alu.src[0].chan = tgsi_chan(&inst->Src[1], i);
-
- alu.src[1] = r600_src[0];
- alu.src[1].chan = tgsi_chan(&inst->Src[0], i);
+ r600_bc_src(&alu.src[0], &ctx->src[1], i);
+ r600_bc_src(&alu.src[1], &ctx->src[0], i);
}
/* handle some special cases */
switch (ctx->inst_info->tgsi_opcode) {
@@ -942,25 +925,15 @@ static int tgsi_op2_swap(struct r600_shader_ctx *ctx)
* r700 - normalize by dividing by 2PI
* see fdo bug 27901
*/
-static int tgsi_setup_trig(struct r600_shader_ctx *ctx,
- struct r600_bc_alu_src r600_src[3])
+static int tgsi_setup_trig(struct r600_shader_ctx *ctx)
{
- struct tgsi_full_instruction *inst = &ctx->parse.FullToken.FullInstruction;
+ static float half_inv_pi = 1.0 /(3.1415926535 * 2);
+ static float double_pi = 3.1415926535 * 2;
+ static float neg_pi = -3.1415926535;
+
int r;
- uint32_t lit_vals[4];
struct r600_bc_alu alu;
- memset(lit_vals, 0, 4*4);
- r = tgsi_split_constant(ctx, r600_src);
- if (r)
- return r;
- r = tgsi_split_literal_constant(ctx, r600_src);
- if (r)
- return r;
-
- lit_vals[0] = fui(1.0 /(3.1415926535 * 2));
- lit_vals[1] = fui(0.5f);
-
memset(&alu, 0, sizeof(struct r600_bc_alu));
alu.inst = CTX_INST(V_SQ_ALU_WORD1_OP3_SQ_OP3_INST_MULADD);
alu.is_op3 = 1;
@@ -969,20 +942,17 @@ static int tgsi_setup_trig(struct r600_shader_ctx *ctx,
alu.dst.sel = ctx->temp_reg;
alu.dst.write = 1;
- alu.src[0] = r600_src[0];
- alu.src[0].chan = tgsi_chan(&inst->Src[0], 0);
+ r600_bc_src(&alu.src[0], &ctx->src[0], 0);
alu.src[1].sel = V_SQ_ALU_SRC_LITERAL;
alu.src[1].chan = 0;
- alu.src[2].sel = V_SQ_ALU_SRC_LITERAL;
- alu.src[2].chan = 1;
+ alu.src[1].value = *(uint32_t *)&half_inv_pi;
+ alu.src[2].sel = V_SQ_ALU_SRC_0_5;
+ alu.src[2].chan = 0;
alu.last = 1;
r = r600_bc_add_alu(ctx->bc, &alu);
if (r)
return r;
- r = r600_bc_add_literal(ctx->bc, lit_vals);
- if (r)
- return r;
memset(&alu, 0, sizeof(struct r600_bc_alu));
alu.inst = CTX_INST(V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_FRACT);
@@ -998,14 +968,6 @@ static int tgsi_setup_trig(struct r600_shader_ctx *ctx,
if (r)
return r;
- if (ctx->bc->chiprev == CHIPREV_R600) {
- lit_vals[0] = fui(3.1415926535897f * 2.0f);
- lit_vals[1] = fui(-3.1415926535897f);
- } else {
- lit_vals[0] = fui(1.0f);
- lit_vals[1] = fui(-0.5f);
- }
-
memset(&alu, 0, sizeof(struct r600_bc_alu));
alu.inst = CTX_INST(V_SQ_ALU_WORD1_OP3_SQ_OP3_INST_MULADD);
alu.is_op3 = 1;
@@ -1020,26 +982,32 @@ static int tgsi_setup_trig(struct r600_shader_ctx *ctx,
alu.src[1].sel = V_SQ_ALU_SRC_LITERAL;
alu.src[1].chan = 0;
alu.src[2].sel = V_SQ_ALU_SRC_LITERAL;
- alu.src[2].chan = 1;
+ alu.src[2].chan = 0;
+
+ if (ctx->bc->chiprev == CHIPREV_R600) {
+ alu.src[1].value = *(uint32_t *)&double_pi;
+ alu.src[2].value = *(uint32_t *)&neg_pi;
+ } else {
+ alu.src[1].sel = V_SQ_ALU_SRC_1;
+ alu.src[2].sel = V_SQ_ALU_SRC_0_5;
+ alu.src[2].neg = 1;
+ }
+
alu.last = 1;
r = r600_bc_add_alu(ctx->bc, &alu);
if (r)
return r;
- r = r600_bc_add_literal(ctx->bc, lit_vals);
- if (r)
- return r;
return 0;
}
static int tgsi_trig(struct r600_shader_ctx *ctx)
{
struct tgsi_full_instruction *inst = &ctx->parse.FullToken.FullInstruction;
- struct r600_bc_alu_src r600_src[3];
struct r600_bc_alu alu;
int i, r;
- int lasti = 0;
+ int lasti = tgsi_last_instruction(inst->Dst[0].Register.WriteMask);
- r = tgsi_setup_trig(ctx, r600_src);
+ r = tgsi_setup_trig(ctx);
if (r)
return r;
@@ -1057,10 +1025,6 @@ static int tgsi_trig(struct r600_shader_ctx *ctx)
return r;
/* replicate result */
- for (i = 0; i < 4; i++) {
- if (inst->Dst[0].Register.WriteMask & (1 << i))
- lasti = i;
- }
for (i = 0; i < lasti + 1; i++) {
if (!(inst->Dst[0].Register.WriteMask & (1 << i)))
continue;
@@ -1069,9 +1033,7 @@ static int tgsi_trig(struct r600_shader_ctx *ctx)
alu.inst = CTX_INST(V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MOV);
alu.src[0].sel = ctx->temp_reg;
- r = tgsi_dst(ctx, &inst->Dst[0], i, &alu.dst);
- if (r)
- return r;
+ tgsi_dst(ctx, &inst->Dst[0], i, &alu.dst);
if (i == lasti)
alu.last = 1;
r = r600_bc_add_alu(ctx->bc, &alu);
@@ -1084,7 +1046,6 @@ static int tgsi_trig(struct r600_shader_ctx *ctx)
static int tgsi_scs(struct r600_shader_ctx *ctx)
{
struct tgsi_full_instruction *inst = &ctx->parse.FullToken.FullInstruction;
- struct r600_bc_alu_src r600_src[3];
struct r600_bc_alu alu;
int r;
@@ -1092,7 +1053,7 @@ static int tgsi_scs(struct r600_shader_ctx *ctx)
* X or Y components of the destination vector.
*/
if (likely(inst->Dst[0].Register.WriteMask & TGSI_WRITEMASK_XY)) {
- r = tgsi_setup_trig(ctx, r600_src);
+ r = tgsi_setup_trig(ctx);
if (r)
return r;
}
@@ -1101,9 +1062,7 @@ static int tgsi_scs(struct r600_shader_ctx *ctx)
if (inst->Dst[0].Register.WriteMask & TGSI_WRITEMASK_X) {
memset(&alu, 0, sizeof(struct r600_bc_alu));
alu.inst = CTX_INST(V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_COS);
- r = tgsi_dst(ctx, &inst->Dst[0], 0, &alu.dst);
- if (r)
- return r;
+ tgsi_dst(ctx, &inst->Dst[0], 0, &alu.dst);
alu.src[0].sel = ctx->temp_reg;
alu.src[0].chan = 0;
@@ -1117,9 +1076,7 @@ static int tgsi_scs(struct r600_shader_ctx *ctx)
if (inst->Dst[0].Register.WriteMask & TGSI_WRITEMASK_Y) {
memset(&alu, 0, sizeof(struct r600_bc_alu));
alu.inst = CTX_INST(V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_SIN);
- r = tgsi_dst(ctx, &inst->Dst[0], 1, &alu.dst);
- if (r)
- return r;
+ tgsi_dst(ctx, &inst->Dst[0], 1, &alu.dst);
alu.src[0].sel = ctx->temp_reg;
alu.src[0].chan = 0;
@@ -1135,9 +1092,7 @@ static int tgsi_scs(struct r600_shader_ctx *ctx)
alu.inst = CTX_INST(V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MOV);
- r = tgsi_dst(ctx, &inst->Dst[0], 2, &alu.dst);
- if (r)
- return r;
+ tgsi_dst(ctx, &inst->Dst[0], 2, &alu.dst);
alu.src[0].sel = V_SQ_ALU_SRC_0;
alu.src[0].chan = 0;
@@ -1147,10 +1102,6 @@ static int tgsi_scs(struct r600_shader_ctx *ctx)
r = r600_bc_add_alu(ctx->bc, &alu);
if (r)
return r;
-
- r = r600_bc_add_literal(ctx->bc, ctx->value);
- if (r)
- return r;
}
/* dst.w = 1.0; */
@@ -1159,9 +1110,7 @@ static int tgsi_scs(struct r600_shader_ctx *ctx)
alu.inst = CTX_INST(V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MOV);
- r = tgsi_dst(ctx, &inst->Dst[0], 3, &alu.dst);
- if (r)
- return r;
+ tgsi_dst(ctx, &inst->Dst[0], 3, &alu.dst);
alu.src[0].sel = V_SQ_ALU_SRC_1;
alu.src[0].chan = 0;
@@ -1171,10 +1120,6 @@ static int tgsi_scs(struct r600_shader_ctx *ctx)
r = r600_bc_add_alu(ctx->bc, &alu);
if (r)
return r;
-
- r = r600_bc_add_literal(ctx->bc, ctx->value);
- if (r)
- return r;
}
return 0;
@@ -1182,7 +1127,6 @@ static int tgsi_scs(struct r600_shader_ctx *ctx)
static int tgsi_kill(struct r600_shader_ctx *ctx)
{
- struct tgsi_full_instruction *inst = &ctx->parse.FullToken.FullInstruction;
struct r600_bc_alu alu;
int i, r;
@@ -1198,10 +1142,7 @@ static int tgsi_kill(struct r600_shader_ctx *ctx)
alu.src[1].sel = V_SQ_ALU_SRC_1;
alu.src[1].neg = 1;
} else {
- r = tgsi_src(ctx, &inst->Src[0], &alu.src[1]);
- if (r)
- return r;
- alu.src[1].chan = tgsi_chan(&inst->Src[0], i);
+ r600_bc_src(&alu.src[1], &ctx->src[0], i);
}
if (i == 3) {
alu.last = 1;
@@ -1210,9 +1151,6 @@ static int tgsi_kill(struct r600_shader_ctx *ctx)
if (r)
return r;
}
- r = r600_bc_add_literal(ctx->bc, ctx->value);
- if (r)
- return r;
/* kill must be last in ALU */
ctx->bc->force_add_cf = 1;
@@ -1224,24 +1162,14 @@ static int tgsi_lit(struct r600_shader_ctx *ctx)
{
struct tgsi_full_instruction *inst = &ctx->parse.FullToken.FullInstruction;
struct r600_bc_alu alu;
- struct r600_bc_alu_src r600_src[3];
int r;
- r = tgsi_split_constant(ctx, r600_src);
- if (r)
- return r;
- r = tgsi_split_literal_constant(ctx, r600_src);
- if (r)
- return r;
-
/* dst.x, <- 1.0 */
memset(&alu, 0, sizeof(struct r600_bc_alu));
alu.inst = CTX_INST(V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MOV);
alu.src[0].sel = V_SQ_ALU_SRC_1; /*1.0*/
alu.src[0].chan = 0;
- r = tgsi_dst(ctx, &inst->Dst[0], 0, &alu.dst);
- if (r)
- return r;
+ tgsi_dst(ctx, &inst->Dst[0], 0, &alu.dst);
alu.dst.write = (inst->Dst[0].Register.WriteMask >> 0) & 1;
r = r600_bc_add_alu(ctx->bc, &alu);
if (r)
@@ -1250,12 +1178,10 @@ static int tgsi_lit(struct r600_shader_ctx *ctx)
/* dst.y = max(src.x, 0.0) */
memset(&alu, 0, sizeof(struct r600_bc_alu));
alu.inst = CTX_INST(V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MAX);
- alu.src[0] = r600_src[0];
+ r600_bc_src(&alu.src[0], &ctx->src[0], 0);
alu.src[1].sel = V_SQ_ALU_SRC_0; /*0.0*/
alu.src[1].chan = 0;
- r = tgsi_dst(ctx, &inst->Dst[0], 1, &alu.dst);
- if (r)
- return r;
+ tgsi_dst(ctx, &inst->Dst[0], 1, &alu.dst);
alu.dst.write = (inst->Dst[0].Register.WriteMask >> 1) & 1;
r = r600_bc_add_alu(ctx->bc, &alu);
if (r)
@@ -1266,19 +1192,13 @@ static int tgsi_lit(struct r600_shader_ctx *ctx)
alu.inst = CTX_INST(V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MOV);
alu.src[0].sel = V_SQ_ALU_SRC_1;
alu.src[0].chan = 0;
- r = tgsi_dst(ctx, &inst->Dst[0], 3, &alu.dst);
- if (r)
- return r;
+ tgsi_dst(ctx, &inst->Dst[0], 3, &alu.dst);
alu.dst.write = (inst->Dst[0].Register.WriteMask >> 3) & 1;
alu.last = 1;
r = r600_bc_add_alu(ctx->bc, &alu);
if (r)
return r;
- r = r600_bc_add_literal(ctx->bc, ctx->value);
- if (r)
- return r;
-
if (inst->Dst[0].Register.WriteMask & (1 << 2))
{
int chan;
@@ -1287,33 +1207,24 @@ static int tgsi_lit(struct r600_shader_ctx *ctx)
/* dst.z = log(src.y) */
memset(&alu, 0, sizeof(struct r600_bc_alu));
alu.inst = CTX_INST(V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_LOG_CLAMPED);
- alu.src[0] = r600_src[0];
- alu.src[0].chan = tgsi_chan(&inst->Src[0], 1);
- r = tgsi_dst(ctx, &inst->Dst[0], 2, &alu.dst);
- if (r)
- return r;
+ r600_bc_src(&alu.src[0], &ctx->src[0], 1);
+ tgsi_dst(ctx, &inst->Dst[0], 2, &alu.dst);
alu.last = 1;
r = r600_bc_add_alu(ctx->bc, &alu);
if (r)
return r;
- r = r600_bc_add_literal(ctx->bc, ctx->value);
- if (r)
- return r;
-
chan = alu.dst.chan;
sel = alu.dst.sel;
/* tmp.x = amd MUL_LIT(src.w, dst.z, src.x ) */
memset(&alu, 0, sizeof(struct r600_bc_alu));
alu.inst = CTX_INST(V_SQ_ALU_WORD1_OP3_SQ_OP3_INST_MUL_LIT);
- alu.src[0] = r600_src[0];
- alu.src[0].chan = tgsi_chan(&inst->Src[0], 3);
+ r600_bc_src(&alu.src[0], &ctx->src[0], 3);
alu.src[1].sel = sel;
alu.src[1].chan = chan;
- alu.src[2] = r600_src[0];
- alu.src[2].chan = tgsi_chan(&inst->Src[0], 0);
+ r600_bc_src(&alu.src[2], &ctx->src[0], 0);
alu.dst.sel = ctx->temp_reg;
alu.dst.chan = 0;
alu.dst.write = 1;
@@ -1323,17 +1234,12 @@ static int tgsi_lit(struct r600_shader_ctx *ctx)
if (r)
return r;
- r = r600_bc_add_literal(ctx->bc, ctx->value);
- if (r)
- return r;
/* dst.z = exp(tmp.x) */
memset(&alu, 0, sizeof(struct r600_bc_alu));
alu.inst = CTX_INST(V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_EXP_IEEE);
alu.src[0].sel = ctx->temp_reg;
alu.src[0].chan = 0;
- r = tgsi_dst(ctx, &inst->Dst[0], 2, &alu.dst);
- if (r)
- return r;
+ tgsi_dst(ctx, &inst->Dst[0], 2, &alu.dst);
alu.last = 1;
r = r600_bc_add_alu(ctx->bc, &alu);
if (r)
@@ -1357,10 +1263,7 @@ static int tgsi_rsq(struct r600_shader_ctx *ctx)
alu.inst = CTX_INST(V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_RECIPSQRT_CLAMPED);
for (i = 0; i < inst->Instruction.NumSrcRegs; i++) {
- r = tgsi_src(ctx, &inst->Src[i], &alu.src[i]);
- if (r)
- return r;
- alu.src[i].chan = tgsi_chan(&inst->Src[i], 0);
+ r600_bc_src(&alu.src[i], &ctx->src[i], 0);
alu.src[i].abs = 1;
}
alu.dst.sel = ctx->temp_reg;
@@ -1369,9 +1272,6 @@ static int tgsi_rsq(struct r600_shader_ctx *ctx)
r = r600_bc_add_alu(ctx->bc, &alu);
if (r)
return r;
- r = r600_bc_add_literal(ctx->bc, ctx->value);
- if (r)
- return r;
/* replicate result */
return tgsi_helper_tempx_replicate(ctx);
}
@@ -1387,9 +1287,7 @@ static int tgsi_helper_tempx_replicate(struct r600_shader_ctx *ctx)
alu.src[0].sel = ctx->temp_reg;
alu.inst = CTX_INST(V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MOV);
alu.dst.chan = i;
- r = tgsi_dst(ctx, &inst->Dst[0], i, &alu.dst);
- if (r)
- return r;
+ tgsi_dst(ctx, &inst->Dst[0], i, &alu.dst);
alu.dst.write = (inst->Dst[0].Register.WriteMask >> i) & 1;
if (i == 3)
alu.last = 1;
@@ -1409,10 +1307,7 @@ static int tgsi_trans_srcx_replicate(struct r600_shader_ctx *ctx)
memset(&alu, 0, sizeof(struct r600_bc_alu));
alu.inst = ctx->inst_info->r600_opcode;
for (i = 0; i < inst->Instruction.NumSrcRegs; i++) {
- r = tgsi_src(ctx, &inst->Src[i], &alu.src[i]);
- if (r)
- return r;
- alu.src[i].chan = tgsi_chan(&inst->Src[i], 0);
+ r600_bc_src(&alu.src[i], &ctx->src[i], 0);
}
alu.dst.sel = ctx->temp_reg;
alu.dst.write = 1;
@@ -1420,42 +1315,29 @@ static int tgsi_trans_srcx_replicate(struct r600_shader_ctx *ctx)
r = r600_bc_add_alu(ctx->bc, &alu);
if (r)
return r;
- r = r600_bc_add_literal(ctx->bc, ctx->value);
- if (r)
- return r;
/* replicate result */
return tgsi_helper_tempx_replicate(ctx);
}
static int tgsi_pow(struct r600_shader_ctx *ctx)
{
- struct tgsi_full_instruction *inst = &ctx->parse.FullToken.FullInstruction;
struct r600_bc_alu alu;
int r;
/* LOG2(a) */
memset(&alu, 0, sizeof(struct r600_bc_alu));
alu.inst = CTX_INST(V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_LOG_IEEE);
- r = tgsi_src(ctx, &inst->Src[0], &alu.src[0]);
- if (r)
- return r;
- alu.src[0].chan = tgsi_chan(&inst->Src[0], 0);
+ r600_bc_src(&alu.src[0], &ctx->src[0], 0);
alu.dst.sel = ctx->temp_reg;
alu.dst.write = 1;
alu.last = 1;
r = r600_bc_add_alu(ctx->bc, &alu);
if (r)
return r;
- r = r600_bc_add_literal(ctx->bc,ctx->value);
- if (r)
- return r;
/* b * LOG2(a) */
memset(&alu, 0, sizeof(struct r600_bc_alu));
- alu.inst = CTX_INST(V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MUL_IEEE);
- r = tgsi_src(ctx, &inst->Src[1], &alu.src[0]);
- if (r)
- return r;
- alu.src[0].chan = tgsi_chan(&inst->Src[1], 0);
+ alu.inst = CTX_INST(V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MUL);
+ r600_bc_src(&alu.src[0], &ctx->src[1], 0);
alu.src[1].sel = ctx->temp_reg;
alu.dst.sel = ctx->temp_reg;
alu.dst.write = 1;
@@ -1463,9 +1345,6 @@ static int tgsi_pow(struct r600_shader_ctx *ctx)
r = r600_bc_add_alu(ctx->bc, &alu);
if (r)
return r;
- r = r600_bc_add_literal(ctx->bc,ctx->value);
- if (r)
- return r;
/* POW(a,b) = EXP2(b * LOG2(a))*/
memset(&alu, 0, sizeof(struct r600_bc_alu));
alu.inst = CTX_INST(V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_EXP_IEEE);
@@ -1476,9 +1355,6 @@ static int tgsi_pow(struct r600_shader_ctx *ctx)
r = r600_bc_add_alu(ctx->bc, &alu);
if (r)
return r;
- r = r600_bc_add_literal(ctx->bc,ctx->value);
- if (r)
- return r;
return tgsi_helper_tempx_replicate(ctx);
}
@@ -1486,16 +1362,8 @@ static int tgsi_ssg(struct r600_shader_ctx *ctx)
{
struct tgsi_full_instruction *inst = &ctx->parse.FullToken.FullInstruction;
struct r600_bc_alu alu;
- struct r600_bc_alu_src r600_src[3];
int i, r;
- r = tgsi_split_constant(ctx, r600_src);
- if (r)
- return r;
- r = tgsi_split_literal_constant(ctx, r600_src);
- if (r)
- return r;
-
/* tmp = (src > 0 ? 1 : src) */
for (i = 0; i < 4; i++) {
memset(&alu, 0, sizeof(struct r600_bc_alu));
@@ -1505,31 +1373,23 @@ static int tgsi_ssg(struct r600_shader_ctx *ctx)
alu.dst.sel = ctx->temp_reg;
alu.dst.chan = i;
- alu.src[0] = r600_src[0];
- alu.src[0].chan = tgsi_chan(&inst->Src[0], i);
-
+ r600_bc_src(&alu.src[0], &ctx->src[0], i);
alu.src[1].sel = V_SQ_ALU_SRC_1;
+ r600_bc_src(&alu.src[2], &ctx->src[0], i);
- alu.src[2] = r600_src[0];
- alu.src[2].chan = tgsi_chan(&inst->Src[0], i);
if (i == 3)
alu.last = 1;
r = r600_bc_add_alu(ctx->bc, &alu);
if (r)
return r;
}
- r = r600_bc_add_literal(ctx->bc, ctx->value);
- if (r)
- return r;
/* dst = (-tmp > 0 ? -1 : tmp) */
for (i = 0; i < 4; i++) {
memset(&alu, 0, sizeof(struct r600_bc_alu));
alu.inst = CTX_INST(V_SQ_ALU_WORD1_OP3_SQ_OP3_INST_CNDGT);
alu.is_op3 = 1;
- r = tgsi_dst(ctx, &inst->Dst[0], i, &alu.dst);
- if (r)
- return r;
+ tgsi_dst(ctx, &inst->Dst[0], i, &alu.dst);
alu.src[0].sel = ctx->temp_reg;
alu.src[0].chan = i;
@@ -1555,9 +1415,6 @@ static int tgsi_helper_copy(struct r600_shader_ctx *ctx, struct tgsi_full_instru
struct r600_bc_alu alu;
int i, r;
- r = r600_bc_add_literal(ctx->bc, ctx->value);
- if (r)
- return r;
for (i = 0; i < 4; i++) {
memset(&alu, 0, sizeof(struct r600_bc_alu));
if (!(inst->Dst[0].Register.WriteMask & (1 << i))) {
@@ -1565,9 +1422,7 @@ static int tgsi_helper_copy(struct r600_shader_ctx *ctx, struct tgsi_full_instru
alu.dst.chan = i;
} else {
alu.inst = CTX_INST(V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MOV);
- r = tgsi_dst(ctx, &inst->Dst[0], i, &alu.dst);
- if (r)
- return r;
+ tgsi_dst(ctx, &inst->Dst[0], i, &alu.dst);
alu.src[0].sel = ctx->temp_reg;
alu.src[0].chan = i;
}
@@ -1584,61 +1439,50 @@ static int tgsi_helper_copy(struct r600_shader_ctx *ctx, struct tgsi_full_instru
static int tgsi_op3(struct r600_shader_ctx *ctx)
{
struct tgsi_full_instruction *inst = &ctx->parse.FullToken.FullInstruction;
- struct r600_bc_alu_src r600_src[3];
struct r600_bc_alu alu;
int i, j, r;
+ int lasti = tgsi_last_instruction(inst->Dst[0].Register.WriteMask);
+
+ for (i = 0; i < lasti + 1; i++) {
+ if (!(inst->Dst[0].Register.WriteMask & (1 << i)))
+ continue;
- r = tgsi_split_constant(ctx, r600_src);
- if (r)
- return r;
- r = tgsi_split_literal_constant(ctx, r600_src);
- if (r)
- return r;
- /* do it in 2 step as op3 doesn't support writemask */
- for (i = 0; i < 4; i++) {
memset(&alu, 0, sizeof(struct r600_bc_alu));
alu.inst = ctx->inst_info->r600_opcode;
for (j = 0; j < inst->Instruction.NumSrcRegs; j++) {
- alu.src[j] = r600_src[j];
- alu.src[j].chan = tgsi_chan(&inst->Src[j], i);
+ r600_bc_src(&alu.src[j], &ctx->src[j], i);
}
- alu.dst.sel = ctx->temp_reg;
+
+ tgsi_dst(ctx, &inst->Dst[0], i, &alu.dst);
alu.dst.chan = i;
alu.dst.write = 1;
alu.is_op3 = 1;
- if (i == 3) {
+ if (i == lasti) {
alu.last = 1;
}
r = r600_bc_add_alu(ctx->bc, &alu);
if (r)
return r;
}
- return tgsi_helper_copy(ctx, inst);
+ return 0;
}
static int tgsi_dp(struct r600_shader_ctx *ctx)
{
struct tgsi_full_instruction *inst = &ctx->parse.FullToken.FullInstruction;
- struct r600_bc_alu_src r600_src[3];
struct r600_bc_alu alu;
int i, j, r;
- r = tgsi_split_constant(ctx, r600_src);
- if (r)
- return r;
- r = tgsi_split_literal_constant(ctx, r600_src);
- if (r)
- return r;
for (i = 0; i < 4; i++) {
memset(&alu, 0, sizeof(struct r600_bc_alu));
alu.inst = ctx->inst_info->r600_opcode;
for (j = 0; j < inst->Instruction.NumSrcRegs; j++) {
- alu.src[j] = r600_src[j];
- alu.src[j].chan = tgsi_chan(&inst->Src[j], i);
+ r600_bc_src(&alu.src[j], &ctx->src[j], i);
}
- alu.dst.sel = ctx->temp_reg;
+
+ tgsi_dst(ctx, &inst->Dst[0], i, &alu.dst);
alu.dst.chan = i;
- alu.dst.write = 1;
+ alu.dst.write = (inst->Dst[0].Register.WriteMask >> i) & 1;
/* handle some special cases */
switch (ctx->inst_info->tgsi_opcode) {
case TGSI_OPCODE_DP2:
@@ -1670,19 +1514,21 @@ static int tgsi_dp(struct r600_shader_ctx *ctx)
if (r)
return r;
}
- return tgsi_helper_copy(ctx, inst);
+ return 0;
}
static int tgsi_tex(struct r600_shader_ctx *ctx)
{
+ static float one_point_five = 1.5f;
struct tgsi_full_instruction *inst = &ctx->parse.FullToken.FullInstruction;
struct r600_bc_tex tex;
struct r600_bc_alu alu;
unsigned src_gpr;
int r, i;
int opcode;
- boolean src_not_temp = inst->Src[0].Register.File != TGSI_FILE_TEMPORARY;
- uint32_t lit_vals[4];
+ boolean src_not_temp =
+ inst->Src[0].Register.File != TGSI_FILE_TEMPORARY &&
+ inst->Src[0].Register.File != TGSI_FILE_INPUT;
src_gpr = ctx->file_offset[inst->Src[0].Register.File] + inst->Src[0].Register.Index;
@@ -1690,11 +1536,8 @@ static int tgsi_tex(struct r600_shader_ctx *ctx)
/* Add perspective divide */
memset(&alu, 0, sizeof(struct r600_bc_alu));
alu.inst = CTX_INST(V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_RECIP_IEEE);
- r = tgsi_src(ctx, &inst->Src[0], &alu.src[0]);
- if (r)
- return r;
+ r600_bc_src(&alu.src[0], &ctx->src[0], 3);
- alu.src[0].chan = tgsi_chan(&inst->Src[0], 3);
alu.dst.sel = ctx->temp_reg;
alu.dst.chan = 3;
alu.last = 1;
@@ -1708,10 +1551,7 @@ static int tgsi_tex(struct r600_shader_ctx *ctx)
alu.inst = CTX_INST(V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MUL);
alu.src[0].sel = ctx->temp_reg;
alu.src[0].chan = 3;
- r = tgsi_src(ctx, &inst->Src[0], &alu.src[1]);
- if (r)
- return r;
- alu.src[1].chan = tgsi_chan(&inst->Src[0], i);
+ r600_bc_src(&alu.src[1], &ctx->src[0], i);
alu.dst.sel = ctx->temp_reg;
alu.dst.chan = i;
alu.dst.write = 1;
@@ -1735,43 +1575,15 @@ static int tgsi_tex(struct r600_shader_ctx *ctx)
}
if (inst->Texture.Texture == TGSI_TEXTURE_CUBE) {
- int src_chan, src2_chan;
+ static const unsigned src0_swizzle[] = {2, 2, 0, 1};
+ static const unsigned src1_swizzle[] = {1, 0, 2, 2};
/* tmp1.xyzw = CUBE(R0.zzxy, R0.yxzz) */
for (i = 0; i < 4; i++) {
memset(&alu, 0, sizeof(struct r600_bc_alu));
alu.inst = CTX_INST(V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_CUBE);
- switch (i) {
- case 0:
- src_chan = 2;
- src2_chan = 1;
- break;
- case 1:
- src_chan = 2;
- src2_chan = 0;
- break;
- case 2:
- src_chan = 0;
- src2_chan = 2;
- break;
- case 3:
- src_chan = 1;
- src2_chan = 2;
- break;
- default:
- assert(0);
- src_chan = 0;
- src2_chan = 0;
- break;
- }
- r = tgsi_src(ctx, &inst->Src[0], &alu.src[0]);
- if (r)
- return r;
- alu.src[0].chan = tgsi_chan(&inst->Src[0], src_chan);
- r = tgsi_src(ctx, &inst->Src[0], &alu.src[1]);
- if (r)
- return r;
- alu.src[1].chan = tgsi_chan(&inst->Src[0], src2_chan);
+ r600_bc_src(&alu.src[0], &ctx->src[0], src0_swizzle[i]);
+ r600_bc_src(&alu.src[1], &ctx->src[0], src1_swizzle[i]);
alu.dst.sel = ctx->temp_reg;
alu.dst.chan = i;
if (i == 3)
@@ -1811,6 +1623,7 @@ static int tgsi_tex(struct r600_shader_ctx *ctx)
alu.src[2].sel = V_SQ_ALU_SRC_LITERAL;
alu.src[2].chan = 0;
+ alu.src[2].value = *(uint32_t *)&one_point_five;
alu.dst.sel = ctx->temp_reg;
alu.dst.chan = 0;
@@ -1831,6 +1644,7 @@ static int tgsi_tex(struct r600_shader_ctx *ctx)
alu.src[2].sel = V_SQ_ALU_SRC_LITERAL;
alu.src[2].chan = 0;
+ alu.src[2].value = *(uint32_t *)&one_point_five;
alu.dst.sel = ctx->temp_reg;
alu.dst.chan = 1;
@@ -1841,11 +1655,6 @@ static int tgsi_tex(struct r600_shader_ctx *ctx)
if (r)
return r;
- lit_vals[0] = fui(1.5f);
-
- r = r600_bc_add_literal(ctx->bc, lit_vals);
- if (r)
- return r;
src_not_temp = FALSE;
src_gpr = ctx->temp_reg;
}
@@ -1854,8 +1663,7 @@ static int tgsi_tex(struct r600_shader_ctx *ctx)
for (i = 0; i < 4; i++) {
memset(&alu, 0, sizeof(struct r600_bc_alu));
alu.inst = CTX_INST(V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MOV);
- alu.src[0].sel = src_gpr;
- alu.src[0].chan = tgsi_chan(&inst->Src[0], i);
+ r600_bc_src(&alu.src[0], &ctx->src[0], i);
alu.dst.sel = ctx->temp_reg;
alu.dst.chan = i;
if (i == 3)
@@ -1876,7 +1684,7 @@ static int tgsi_tex(struct r600_shader_ctx *ctx)
memset(&tex, 0, sizeof(struct r600_bc_tex));
tex.inst = opcode;
tex.sampler_id = ctx->file_offset[inst->Src[1].Register.File] + inst->Src[1].Register.Index;
- tex.resource_id = tex.sampler_id;
+ tex.resource_id = tex.sampler_id + R600_MAX_CONST_BUFFERS;
tex.src_gpr = src_gpr;
tex.dst_gpr = ctx->file_offset[inst->Dst[0].Register.File] + inst->Dst[0].Register.Index;
tex.dst_sel_x = (inst->Dst[0].Register.WriteMask & 1) ? 0 : 7;
@@ -1902,6 +1710,12 @@ static int tgsi_tex(struct r600_shader_ctx *ctx)
tex.coord_type_w = 1;
}
+ if (inst->Texture.Texture == TGSI_TEXTURE_1D_ARRAY) {
+ tex.coord_type_z = 0;
+ tex.src_sel_z = 1;
+ } else if (inst->Texture.Texture == TGSI_TEXTURE_2D_ARRAY)
+ tex.coord_type_z = 0;
+
if (inst->Texture.Texture == TGSI_TEXTURE_SHADOW1D || inst->Texture.Texture == TGSI_TEXTURE_SHADOW2D)
tex.src_sel_w = 2;
@@ -1916,29 +1730,48 @@ static int tgsi_tex(struct r600_shader_ctx *ctx)
static int tgsi_lrp(struct r600_shader_ctx *ctx)
{
struct tgsi_full_instruction *inst = &ctx->parse.FullToken.FullInstruction;
- struct r600_bc_alu_src r600_src[3];
struct r600_bc_alu alu;
+ int lasti = tgsi_last_instruction(inst->Dst[0].Register.WriteMask);
unsigned i;
int r;
- r = tgsi_split_constant(ctx, r600_src);
- if (r)
- return r;
- r = tgsi_split_literal_constant(ctx, r600_src);
- if (r)
- return r;
+ /* optimize if it's just an equal balance */
+ if (ctx->src[0].sel == V_SQ_ALU_SRC_0_5) {
+ for (i = 0; i < lasti + 1; i++) {
+ if (!(inst->Dst[0].Register.WriteMask & (1 << i)))
+ continue;
+
+ memset(&alu, 0, sizeof(struct r600_bc_alu));
+ alu.inst = CTX_INST(V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_ADD);
+ r600_bc_src(&alu.src[0], &ctx->src[1], i);
+ r600_bc_src(&alu.src[1], &ctx->src[2], i);
+ alu.omod = 3;
+ tgsi_dst(ctx, &inst->Dst[0], i, &alu.dst);
+ alu.dst.chan = i;
+ if (i == lasti) {
+ alu.last = 1;
+ }
+ r = r600_bc_add_alu(ctx->bc, &alu);
+ if (r)
+ return r;
+ }
+ return 0;
+ }
+
/* 1 - src0 */
- for (i = 0; i < 4; i++) {
+ for (i = 0; i < lasti + 1; i++) {
+ if (!(inst->Dst[0].Register.WriteMask & (1 << i)))
+ continue;
+
memset(&alu, 0, sizeof(struct r600_bc_alu));
alu.inst = CTX_INST(V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_ADD);
alu.src[0].sel = V_SQ_ALU_SRC_1;
alu.src[0].chan = 0;
- alu.src[1] = r600_src[0];
- alu.src[1].chan = tgsi_chan(&inst->Src[0], i);
+ r600_bc_src(&alu.src[1], &ctx->src[0], i);
alu.src[1].neg = 1;
alu.dst.sel = ctx->temp_reg;
alu.dst.chan = i;
- if (i == 3) {
+ if (i == lasti) {
alu.last = 1;
}
alu.dst.write = 1;
@@ -1946,21 +1779,20 @@ static int tgsi_lrp(struct r600_shader_ctx *ctx)
if (r)
return r;
}
- r = r600_bc_add_literal(ctx->bc, ctx->value);
- if (r)
- return r;
/* (1 - src0) * src2 */
- for (i = 0; i < 4; i++) {
+ for (i = 0; i < lasti + 1; i++) {
+ if (!(inst->Dst[0].Register.WriteMask & (1 << i)))
+ continue;
+
memset(&alu, 0, sizeof(struct r600_bc_alu));
alu.inst = CTX_INST(V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MUL);
alu.src[0].sel = ctx->temp_reg;
alu.src[0].chan = i;
- alu.src[1] = r600_src[2];
- alu.src[1].chan = tgsi_chan(&inst->Src[2], i);
+ r600_bc_src(&alu.src[1], &ctx->src[2], i);
alu.dst.sel = ctx->temp_reg;
alu.dst.chan = i;
- if (i == 3) {
+ if (i == lasti) {
alu.last = 1;
}
alu.dst.write = 1;
@@ -1968,88 +1800,66 @@ static int tgsi_lrp(struct r600_shader_ctx *ctx)
if (r)
return r;
}
- r = r600_bc_add_literal(ctx->bc, ctx->value);
- if (r)
- return r;
/* src0 * src1 + (1 - src0) * src2 */
- for (i = 0; i < 4; i++) {
+ for (i = 0; i < lasti + 1; i++) {
+ if (!(inst->Dst[0].Register.WriteMask & (1 << i)))
+ continue;
+
memset(&alu, 0, sizeof(struct r600_bc_alu));
alu.inst = CTX_INST(V_SQ_ALU_WORD1_OP3_SQ_OP3_INST_MULADD);
alu.is_op3 = 1;
- alu.src[0] = r600_src[0];
- alu.src[0].chan = tgsi_chan(&inst->Src[0], i);
- alu.src[1] = r600_src[1];
- alu.src[1].chan = tgsi_chan(&inst->Src[1], i);
+ r600_bc_src(&alu.src[0], &ctx->src[0], i);
+ r600_bc_src(&alu.src[1], &ctx->src[1], i);
alu.src[2].sel = ctx->temp_reg;
alu.src[2].chan = i;
- alu.dst.sel = ctx->temp_reg;
+
+ tgsi_dst(ctx, &inst->Dst[0], i, &alu.dst);
alu.dst.chan = i;
- if (i == 3) {
+ if (i == lasti) {
alu.last = 1;
}
r = r600_bc_add_alu(ctx->bc, &alu);
if (r)
return r;
}
- return tgsi_helper_copy(ctx, inst);
+ return 0;
}
static int tgsi_cmp(struct r600_shader_ctx *ctx)
{
struct tgsi_full_instruction *inst = &ctx->parse.FullToken.FullInstruction;
- struct r600_bc_alu_src r600_src[3];
struct r600_bc_alu alu;
- int use_temp = 0;
int i, r;
+ int lasti = tgsi_last_instruction(inst->Dst[0].Register.WriteMask);
- r = tgsi_split_constant(ctx, r600_src);
- if (r)
- return r;
- r = tgsi_split_literal_constant(ctx, r600_src);
- if (r)
- return r;
-
- if (inst->Dst[0].Register.WriteMask != 0xf)
- use_temp = 1;
+ for (i = 0; i < lasti + 1; i++) {
+ if (!(inst->Dst[0].Register.WriteMask & (1 << i)))
+ continue;
- for (i = 0; i < 4; i++) {
memset(&alu, 0, sizeof(struct r600_bc_alu));
alu.inst = CTX_INST(V_SQ_ALU_WORD1_OP3_SQ_OP3_INST_CNDGE);
- alu.src[0] = r600_src[0];
- alu.src[0].chan = tgsi_chan(&inst->Src[0], i);
-
- alu.src[1] = r600_src[2];
- alu.src[1].chan = tgsi_chan(&inst->Src[2], i);
-
- alu.src[2] = r600_src[1];
- alu.src[2].chan = tgsi_chan(&inst->Src[1], i);
-
- if (use_temp)
- alu.dst.sel = ctx->temp_reg;
- else {
- r = tgsi_dst(ctx, &inst->Dst[0], i, &alu.dst);
- if (r)
- return r;
- }
+ r600_bc_src(&alu.src[0], &ctx->src[0], i);
+ r600_bc_src(&alu.src[1], &ctx->src[2], i);
+ r600_bc_src(&alu.src[2], &ctx->src[1], i);
+ tgsi_dst(ctx, &inst->Dst[0], i, &alu.dst);
alu.dst.chan = i;
alu.dst.write = 1;
alu.is_op3 = 1;
- if (i == 3)
+ if (i == lasti)
alu.last = 1;
r = r600_bc_add_alu(ctx->bc, &alu);
if (r)
return r;
}
- if (use_temp)
- return tgsi_helper_copy(ctx, inst);
return 0;
}
static int tgsi_xpd(struct r600_shader_ctx *ctx)
{
struct tgsi_full_instruction *inst = &ctx->parse.FullToken.FullInstruction;
- struct r600_bc_alu_src r600_src[3];
+ static const unsigned int src0_swizzle[] = {2, 0, 1};
+ static const unsigned int src1_swizzle[] = {1, 2, 0};
struct r600_bc_alu alu;
uint32_t use_temp = 0;
int i, r;
@@ -2057,45 +1867,15 @@ static int tgsi_xpd(struct r600_shader_ctx *ctx)
if (inst->Dst[0].Register.WriteMask != 0xf)
use_temp = 1;
- r = tgsi_split_constant(ctx, r600_src);
- if (r)
- return r;
- r = tgsi_split_literal_constant(ctx, r600_src);
- if (r)
- return r;
-
for (i = 0; i < 4; i++) {
memset(&alu, 0, sizeof(struct r600_bc_alu));
alu.inst = CTX_INST(V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MUL);
-
- alu.src[0] = r600_src[0];
- switch (i) {
- case 0:
- alu.src[0].chan = tgsi_chan(&inst->Src[0], 2);
- break;
- case 1:
- alu.src[0].chan = tgsi_chan(&inst->Src[0], 0);
- break;
- case 2:
- alu.src[0].chan = tgsi_chan(&inst->Src[0], 1);
- break;
- case 3:
+ if (i < 3) {
+ r600_bc_src(&alu.src[0], &ctx->src[0], src0_swizzle[i]);
+ r600_bc_src(&alu.src[1], &ctx->src[1], src1_swizzle[i]);
+ } else {
alu.src[0].sel = V_SQ_ALU_SRC_0;
alu.src[0].chan = i;
- }
-
- alu.src[1] = r600_src[1];
- switch (i) {
- case 0:
- alu.src[1].chan = tgsi_chan(&inst->Src[1], 1);
- break;
- case 1:
- alu.src[1].chan = tgsi_chan(&inst->Src[1], 2);
- break;
- case 2:
- alu.src[1].chan = tgsi_chan(&inst->Src[1], 0);
- break;
- case 3:
alu.src[1].sel = V_SQ_ALU_SRC_0;
alu.src[1].chan = i;
}
@@ -2109,44 +1889,18 @@ static int tgsi_xpd(struct r600_shader_ctx *ctx)
r = r600_bc_add_alu(ctx->bc, &alu);
if (r)
return r;
-
- r = r600_bc_add_literal(ctx->bc, ctx->value);
- if (r)
- return r;
}
for (i = 0; i < 4; i++) {
memset(&alu, 0, sizeof(struct r600_bc_alu));
alu.inst = CTX_INST(V_SQ_ALU_WORD1_OP3_SQ_OP3_INST_MULADD);
- alu.src[0] = r600_src[0];
- switch (i) {
- case 0:
- alu.src[0].chan = tgsi_chan(&inst->Src[0], 1);
- break;
- case 1:
- alu.src[0].chan = tgsi_chan(&inst->Src[0], 2);
- break;
- case 2:
- alu.src[0].chan = tgsi_chan(&inst->Src[0], 0);
- break;
- case 3:
+ if (i < 3) {
+ r600_bc_src(&alu.src[0], &ctx->src[0], src1_swizzle[i]);
+ r600_bc_src(&alu.src[1], &ctx->src[1], src0_swizzle[i]);
+ } else {
alu.src[0].sel = V_SQ_ALU_SRC_0;
alu.src[0].chan = i;
- }
-
- alu.src[1] = r600_src[1];
- switch (i) {
- case 0:
- alu.src[1].chan = tgsi_chan(&inst->Src[1], 2);
- break;
- case 1:
- alu.src[1].chan = tgsi_chan(&inst->Src[1], 0);
- break;
- case 2:
- alu.src[1].chan = tgsi_chan(&inst->Src[1], 1);
- break;
- case 3:
alu.src[1].sel = V_SQ_ALU_SRC_0;
alu.src[1].chan = i;
}
@@ -2157,11 +1911,8 @@ static int tgsi_xpd(struct r600_shader_ctx *ctx)
if (use_temp)
alu.dst.sel = ctx->temp_reg;
- else {
- r = tgsi_dst(ctx, &inst->Dst[0], i, &alu.dst);
- if (r)
- return r;
- }
+ else
+ tgsi_dst(ctx, &inst->Dst[0], i, &alu.dst);
alu.dst.chan = i;
alu.dst.write = 1;
alu.is_op3 = 1;
@@ -2170,10 +1921,6 @@ static int tgsi_xpd(struct r600_shader_ctx *ctx)
r = r600_bc_add_alu(ctx->bc, &alu);
if (r)
return r;
-
- r = r600_bc_add_literal(ctx->bc, ctx->value);
- if (r)
- return r;
}
if (use_temp)
return tgsi_helper_copy(ctx, inst);
@@ -2183,7 +1930,6 @@ static int tgsi_xpd(struct r600_shader_ctx *ctx)
static int tgsi_exp(struct r600_shader_ctx *ctx)
{
struct tgsi_full_instruction *inst = &ctx->parse.FullToken.FullInstruction;
- struct r600_bc_alu_src r600_src[3] = { { 0 } };
struct r600_bc_alu alu;
int r;
@@ -2192,11 +1938,7 @@ static int tgsi_exp(struct r600_shader_ctx *ctx)
memset(&alu, 0, sizeof(struct r600_bc_alu));
alu.inst = CTX_INST(V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_FLOOR);
- r = tgsi_src(ctx, &inst->Src[0], &alu.src[0]);
- if (r)
- return r;
-
- alu.src[0].chan = tgsi_chan(&inst->Src[0], 0);
+ r600_bc_src(&alu.src[0], &ctx->src[0], 0);
alu.dst.sel = ctx->temp_reg;
alu.dst.chan = 0;
@@ -2206,10 +1948,6 @@ static int tgsi_exp(struct r600_shader_ctx *ctx)
if (r)
return r;
- r = r600_bc_add_literal(ctx->bc, ctx->value);
- if (r)
- return r;
-
alu.inst = CTX_INST(V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_EXP_IEEE);
alu.src[0].sel = ctx->temp_reg;
alu.src[0].chan = 0;
@@ -2221,10 +1959,6 @@ static int tgsi_exp(struct r600_shader_ctx *ctx)
r = r600_bc_add_alu(ctx->bc, &alu);
if (r)
return r;
-
- r = r600_bc_add_literal(ctx->bc, ctx->value);
- if (r)
- return r;
}
/* result.y = tmp - floor(tmp); */
@@ -2232,11 +1966,7 @@ static int tgsi_exp(struct r600_shader_ctx *ctx)
memset(&alu, 0, sizeof(struct r600_bc_alu));
alu.inst = CTX_INST(V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_FRACT);
- alu.src[0] = r600_src[0];
- r = tgsi_src(ctx, &inst->Src[0], &alu.src[0]);
- if (r)
- return r;
- alu.src[0].chan = tgsi_chan(&inst->Src[0], 0);
+ r600_bc_src(&alu.src[0], &ctx->src[0], 0);
alu.dst.sel = ctx->temp_reg;
// r = tgsi_dst(ctx, &inst->Dst[0], i, &alu.dst);
@@ -2250,19 +1980,13 @@ static int tgsi_exp(struct r600_shader_ctx *ctx)
r = r600_bc_add_alu(ctx->bc, &alu);
if (r)
return r;
- r = r600_bc_add_literal(ctx->bc, ctx->value);
- if (r)
- return r;
}
/* result.z = RoughApprox2ToX(tmp);*/
if ((inst->Dst[0].Register.WriteMask >> 2) & 0x1) {
memset(&alu, 0, sizeof(struct r600_bc_alu));
alu.inst = CTX_INST(V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_EXP_IEEE);
- r = tgsi_src(ctx, &inst->Src[0], &alu.src[0]);
- if (r)
- return r;
- alu.src[0].chan = tgsi_chan(&inst->Src[0], 0);
+ r600_bc_src(&alu.src[0], &ctx->src[0], 0);
alu.dst.sel = ctx->temp_reg;
alu.dst.write = 1;
@@ -2273,9 +1997,6 @@ static int tgsi_exp(struct r600_shader_ctx *ctx)
r = r600_bc_add_alu(ctx->bc, &alu);
if (r)
return r;
- r = r600_bc_add_literal(ctx->bc, ctx->value);
- if (r)
- return r;
}
/* result.w = 1.0;*/
@@ -2293,9 +2014,6 @@ static int tgsi_exp(struct r600_shader_ctx *ctx)
r = r600_bc_add_alu(ctx->bc, &alu);
if (r)
return r;
- r = r600_bc_add_literal(ctx->bc, ctx->value);
- if (r)
- return r;
}
return tgsi_helper_copy(ctx, inst);
}
@@ -2311,11 +2029,7 @@ static int tgsi_log(struct r600_shader_ctx *ctx)
memset(&alu, 0, sizeof(struct r600_bc_alu));
alu.inst = CTX_INST(V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_LOG_IEEE);
- r = tgsi_src(ctx, &inst->Src[0], &alu.src[0]);
- if (r)
- return r;
-
- alu.src[0].chan = tgsi_chan(&inst->Src[0], 0);
+ r600_bc_src(&alu.src[0], &ctx->src[0], 0);
alu.dst.sel = ctx->temp_reg;
alu.dst.chan = 0;
@@ -2325,10 +2039,6 @@ static int tgsi_log(struct r600_shader_ctx *ctx)
if (r)
return r;
- r = r600_bc_add_literal(ctx->bc, ctx->value);
- if (r)
- return r;
-
alu.inst = CTX_INST(V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_FLOOR);
alu.src[0].sel = ctx->temp_reg;
alu.src[0].chan = 0;
@@ -2341,10 +2051,6 @@ static int tgsi_log(struct r600_shader_ctx *ctx)
r = r600_bc_add_alu(ctx->bc, &alu);
if (r)
return r;
-
- r = r600_bc_add_literal(ctx->bc, ctx->value);
- if (r)
- return r;
}
/* result.y = src.x / (2 ^ floor(log2(src.x))); */
@@ -2352,11 +2058,7 @@ static int tgsi_log(struct r600_shader_ctx *ctx)
memset(&alu, 0, sizeof(struct r600_bc_alu));
alu.inst = CTX_INST(V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_LOG_IEEE);
- r = tgsi_src(ctx, &inst->Src[0], &alu.src[0]);
- if (r)
- return r;
-
- alu.src[0].chan = tgsi_chan(&inst->Src[0], 0);
+ r600_bc_src(&alu.src[0], &ctx->src[0], 0);
alu.dst.sel = ctx->temp_reg;
alu.dst.chan = 1;
@@ -2367,10 +2069,6 @@ static int tgsi_log(struct r600_shader_ctx *ctx)
if (r)
return r;
- r = r600_bc_add_literal(ctx->bc, ctx->value);
- if (r)
- return r;
-
memset(&alu, 0, sizeof(struct r600_bc_alu));
alu.inst = CTX_INST(V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_FLOOR);
@@ -2386,10 +2084,6 @@ static int tgsi_log(struct r600_shader_ctx *ctx)
if (r)
return r;
- r = r600_bc_add_literal(ctx->bc, ctx->value);
- if (r)
- return r;
-
memset(&alu, 0, sizeof(struct r600_bc_alu));
alu.inst = CTX_INST(V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_EXP_IEEE);
@@ -2405,10 +2099,6 @@ static int tgsi_log(struct r600_shader_ctx *ctx)
if (r)
return r;
- r = r600_bc_add_literal(ctx->bc, ctx->value);
- if (r)
- return r;
-
memset(&alu, 0, sizeof(struct r600_bc_alu));
alu.inst = CTX_INST(V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_RECIP_IEEE);
@@ -2424,19 +2114,11 @@ static int tgsi_log(struct r600_shader_ctx *ctx)
if (r)
return r;
- r = r600_bc_add_literal(ctx->bc, ctx->value);
- if (r)
- return r;
-
memset(&alu, 0, sizeof(struct r600_bc_alu));
alu.inst = CTX_INST(V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MUL);
- r = tgsi_src(ctx, &inst->Src[0], &alu.src[0]);
- if (r)
- return r;
-
- alu.src[0].chan = tgsi_chan(&inst->Src[0], 0);
+ r600_bc_src(&alu.src[0], &ctx->src[0], 0);
alu.src[1].sel = ctx->temp_reg;
alu.src[1].chan = 1;
@@ -2449,10 +2131,6 @@ static int tgsi_log(struct r600_shader_ctx *ctx)
r = r600_bc_add_alu(ctx->bc, &alu);
if (r)
return r;
-
- r = r600_bc_add_literal(ctx->bc, ctx->value);
- if (r)
- return r;
}
/* result.z = log2(src);*/
@@ -2460,11 +2138,7 @@ static int tgsi_log(struct r600_shader_ctx *ctx)
memset(&alu, 0, sizeof(struct r600_bc_alu));
alu.inst = CTX_INST(V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_LOG_IEEE);
- r = tgsi_src(ctx, &inst->Src[0], &alu.src[0]);
- if (r)
- return r;
-
- alu.src[0].chan = tgsi_chan(&inst->Src[0], 0);
+ r600_bc_src(&alu.src[0], &ctx->src[0], 0);
alu.dst.sel = ctx->temp_reg;
alu.dst.write = 1;
@@ -2474,10 +2148,6 @@ static int tgsi_log(struct r600_shader_ctx *ctx)
r = r600_bc_add_alu(ctx->bc, &alu);
if (r)
return r;
-
- r = r600_bc_add_literal(ctx->bc, ctx->value);
- if (r)
- return r;
}
/* result.w = 1.0; */
@@ -2496,10 +2166,6 @@ static int tgsi_log(struct r600_shader_ctx *ctx)
r = r600_bc_add_alu(ctx->bc, &alu);
if (r)
return r;
-
- r = r600_bc_add_literal(ctx->bc, ctx->value);
- if (r)
- return r;
}
return tgsi_helper_copy(ctx, inst);
@@ -2510,6 +2176,7 @@ static int tgsi_eg_arl(struct r600_shader_ctx *ctx)
struct tgsi_full_instruction *inst = &ctx->parse.FullToken.FullInstruction;
struct r600_bc_alu alu;
int r;
+
memset(&alu, 0, sizeof(struct r600_bc_alu));
switch (inst->Instruction.Opcode) {
@@ -2524,26 +2191,26 @@ static int tgsi_eg_arl(struct r600_shader_ctx *ctx)
return -1;
}
- r = tgsi_src(ctx, &inst->Src[0], &alu.src[0]);
- if (r)
- return r;
- alu.src[0].chan = tgsi_chan(&inst->Src[0], 0);
+ r600_bc_src(&alu.src[0], &ctx->src[0], 0);
alu.last = 1;
- alu.dst.chan = 0;
- alu.dst.sel = ctx->temp_reg;
+ alu.dst.sel = ctx->ar_reg;
alu.dst.write = 1;
- r = r600_bc_add_alu_type(ctx->bc, &alu, CTX_INST(V_SQ_CF_ALU_WORD1_SQ_CF_INST_ALU));
+ r = r600_bc_add_alu(ctx->bc, &alu);
if (r)
return r;
+
+ /* TODO: Note that the MOVA can be avoided if we never use AR for
+ * indexing non-CB registers in the current ALU clause. Similarly, we
+ * need to load AR from ar_reg again if we started a new clause
+ * between ARL and AR usage. The easy way to do that is to remove
+ * the MOVA here, and load it for the first AR access after ar_reg
+ * has been modified in each clause. */
memset(&alu, 0, sizeof(struct r600_bc_alu));
alu.inst = EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MOVA_INT;
- r = tgsi_src(ctx, &inst->Src[0], &alu.src[0]);
- if (r)
- return r;
- alu.src[0].sel = ctx->temp_reg;
+ alu.src[0].sel = ctx->ar_reg;
alu.src[0].chan = 0;
alu.last = 1;
- r = r600_bc_add_alu_type(ctx->bc, &alu, CTX_INST(V_SQ_CF_ALU_WORD1_SQ_CF_INST_ALU));
+ r = r600_bc_add_alu(ctx->bc, &alu);
if (r)
return r;
return 0;
@@ -2554,29 +2221,51 @@ static int tgsi_r600_arl(struct r600_shader_ctx *ctx)
struct tgsi_full_instruction *inst = &ctx->parse.FullToken.FullInstruction;
struct r600_bc_alu alu;
int r;
- memset(&alu, 0, sizeof(struct r600_bc_alu));
switch (inst->Instruction.Opcode) {
case TGSI_OPCODE_ARL:
- alu.inst = V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MOVA_FLOOR;
+ memset(&alu, 0, sizeof(alu));
+ alu.inst = V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_FLOOR;
+ r600_bc_src(&alu.src[0], &ctx->src[0], 0);
+ alu.dst.sel = ctx->ar_reg;
+ alu.dst.write = 1;
+ alu.last = 1;
+
+ if ((r = r600_bc_add_alu(ctx->bc, &alu)))
+ return r;
+
+ memset(&alu, 0, sizeof(alu));
+ alu.inst = V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_FLT_TO_INT;
+ alu.src[0].sel = ctx->ar_reg;
+ alu.dst.sel = ctx->ar_reg;
+ alu.dst.write = 1;
+ alu.last = 1;
+
+ if ((r = r600_bc_add_alu(ctx->bc, &alu)))
+ return r;
break;
case TGSI_OPCODE_ARR:
- alu.inst = V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MOVA;
+ memset(&alu, 0, sizeof(alu));
+ alu.inst = V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_FLT_TO_INT;
+ r600_bc_src(&alu.src[0], &ctx->src[0], 0);
+ alu.dst.sel = ctx->ar_reg;
+ alu.dst.write = 1;
+ alu.last = 1;
+
+ if ((r = r600_bc_add_alu(ctx->bc, &alu)))
+ return r;
break;
default:
assert(0);
return -1;
}
-
- r = tgsi_src(ctx, &inst->Src[0], &alu.src[0]);
- if (r)
- return r;
- alu.src[0].chan = tgsi_chan(&inst->Src[0], 0);
-
+ memset(&alu, 0, sizeof(alu));
+ alu.inst = V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MOVA_INT;
+ alu.src[0].sel = ctx->ar_reg;
alu.last = 1;
- r = r600_bc_add_alu_type(ctx->bc, &alu, CTX_INST(V_SQ_CF_ALU_WORD1_SQ_CF_INST_ALU));
+ r = r600_bc_add_alu(ctx->bc, &alu);
if (r)
return r;
ctx->bc->cf_last->r6xx_uses_waterfall = 1;
@@ -2593,26 +2282,18 @@ static int tgsi_opdst(struct r600_shader_ctx *ctx)
memset(&alu, 0, sizeof(struct r600_bc_alu));
alu.inst = CTX_INST(V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MUL);
- r = tgsi_dst(ctx, &inst->Dst[0], i, &alu.dst);
- if (r)
- return r;
+ tgsi_dst(ctx, &inst->Dst[0], i, &alu.dst);
if (i == 0 || i == 3) {
alu.src[0].sel = V_SQ_ALU_SRC_1;
} else {
- r = tgsi_src(ctx, &inst->Src[0], &alu.src[0]);
- if (r)
- return r;
- alu.src[0].chan = tgsi_chan(&inst->Src[0], i);
+ r600_bc_src(&alu.src[0], &ctx->src[0], i);
}
- if (i == 0 || i == 2) {
+ if (i == 0 || i == 2) {
alu.src[1].sel = V_SQ_ALU_SRC_1;
} else {
- r = tgsi_src(ctx, &inst->Src[1], &alu.src[1]);
- if (r)
- return r;
- alu.src[1].chan = tgsi_chan(&inst->Src[1], i);
+ r600_bc_src(&alu.src[1], &ctx->src[1], i);
}
if (i == 3)
alu.last = 1;
@@ -2625,7 +2306,6 @@ static int tgsi_opdst(struct r600_shader_ctx *ctx)
static int emit_logic_pred(struct r600_shader_ctx *ctx, int opcode)
{
- struct tgsi_full_instruction *inst = &ctx->parse.FullToken.FullInstruction;
struct r600_bc_alu alu;
int r;
@@ -2637,10 +2317,7 @@ static int emit_logic_pred(struct r600_shader_ctx *ctx, int opcode)
alu.dst.write = 1;
alu.dst.chan = 0;
- r = tgsi_src(ctx, &inst->Src[0], &alu.src[0]);
- if (r)
- return r;
- alu.src[0].chan = tgsi_chan(&inst->Src[0], 0);
+ r600_bc_src(&alu.src[0], &ctx->src[0], 0);
alu.src[1].sel = V_SQ_ALU_SRC_0;
alu.src[1].chan = 0;
@@ -2654,9 +2331,25 @@ static int emit_logic_pred(struct r600_shader_ctx *ctx, int opcode)
static int pops(struct r600_shader_ctx *ctx, int pops)
{
- r600_bc_add_cfinst(ctx->bc, CTX_INST(V_SQ_CF_WORD1_SQ_CF_INST_POP));
- ctx->bc->cf_last->pop_count = pops;
- ctx->bc->cf_last->cf_addr = ctx->bc->cf_last->id + 2;
+ int alu_pop = 3;
+ if (ctx->bc->cf_last) {
+ if (ctx->bc->cf_last->inst == CTX_INST(V_SQ_CF_ALU_WORD1_SQ_CF_INST_ALU) << 3)
+ alu_pop = 0;
+ else if (ctx->bc->cf_last->inst == CTX_INST(V_SQ_CF_ALU_WORD1_SQ_CF_INST_ALU_POP_AFTER) << 3)
+ alu_pop = 1;
+ }
+ alu_pop += pops;
+ if (alu_pop == 1) {
+ ctx->bc->cf_last->inst = CTX_INST(V_SQ_CF_ALU_WORD1_SQ_CF_INST_ALU_POP_AFTER) << 3;
+ ctx->bc->force_add_cf = 1;
+ } else if (alu_pop == 2) {
+ ctx->bc->cf_last->inst = CTX_INST(V_SQ_CF_ALU_WORD1_SQ_CF_INST_ALU_POP2_AFTER) << 3;
+ ctx->bc->force_add_cf = 1;
+ } else {
+ r600_bc_add_cfinst(ctx->bc, CTX_INST(V_SQ_CF_WORD1_SQ_CF_INST_POP));
+ ctx->bc->cf_last->pop_count = pops;
+ ctx->bc->cf_last->cf_addr = ctx->bc->cf_last->id + 2;
+ }
return 0;
}
@@ -3002,7 +2695,7 @@ static struct r600_shader_tgsi_instruction r600_shader_tgsi_instruction[] = {
{TGSI_OPCODE_CEIL, 0, V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_NOP, tgsi_unsupported},
{TGSI_OPCODE_I2F, 0, V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_NOP, tgsi_unsupported},
{TGSI_OPCODE_NOT, 0, V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_NOP, tgsi_unsupported},
- {TGSI_OPCODE_TRUNC, 0, V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_TRUNC, tgsi_trans_srcx_replicate},
+ {TGSI_OPCODE_TRUNC, 0, V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_TRUNC, tgsi_op2},
{TGSI_OPCODE_SHL, 0, V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_NOP, tgsi_unsupported},
/* gap */
{88, 0, V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_NOP, tgsi_unsupported},
@@ -3075,7 +2768,7 @@ static struct r600_shader_tgsi_instruction eg_shader_tgsi_instruction[] = {
{TGSI_OPCODE_RCP, 0, EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_RECIP_IEEE, tgsi_trans_srcx_replicate},
{TGSI_OPCODE_RSQ, 0, EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_RECIPSQRT_IEEE, tgsi_trans_srcx_replicate},
{TGSI_OPCODE_EXP, 0, EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_NOP, tgsi_exp},
- {TGSI_OPCODE_LOG, 0, EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_NOP, tgsi_unsupported},
+ {TGSI_OPCODE_LOG, 0, EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_NOP, tgsi_log},
{TGSI_OPCODE_MUL, 0, EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MUL, tgsi_op2},
{TGSI_OPCODE_ADD, 0, EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_ADD, tgsi_op2},
{TGSI_OPCODE_DP3, 0, EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_DOT4, tgsi_dp},
@@ -3160,7 +2853,7 @@ static struct r600_shader_tgsi_instruction eg_shader_tgsi_instruction[] = {
{TGSI_OPCODE_CEIL, 0, EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_NOP, tgsi_unsupported},
{TGSI_OPCODE_I2F, 0, EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_NOP, tgsi_unsupported},
{TGSI_OPCODE_NOT, 0, EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_NOP, tgsi_unsupported},
- {TGSI_OPCODE_TRUNC, 0, EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_TRUNC, tgsi_trans_srcx_replicate},
+ {TGSI_OPCODE_TRUNC, 0, EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_TRUNC, tgsi_op2},
{TGSI_OPCODE_SHL, 0, EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_NOP, tgsi_unsupported},
/* gap */
{88, 0, EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_NOP, tgsi_unsupported},
diff --git a/src/gallium/drivers/r600/r600_shader.h b/src/gallium/drivers/r600/r600_shader.h
index 35b0331525a..8f96ce5085c 100644
--- a/src/gallium/drivers/r600/r600_shader.h
+++ b/src/gallium/drivers/r600/r600_shader.h
@@ -45,8 +45,7 @@ struct r600_shader {
struct r600_shader_io output[32];
enum radeon_family family;
boolean uses_kill;
+ boolean fs_write_all;
};
-int r600_shader_from_tgsi(const struct tgsi_token *tokens, struct r600_shader *shader);
-
#endif
diff --git a/src/gallium/drivers/r600/r600_sq.h b/src/gallium/drivers/r600/r600_sq.h
index 0573e63dc82..56ed35e8b32 100644
--- a/src/gallium/drivers/r600/r600_sq.h
+++ b/src/gallium/drivers/r600/r600_sq.h
@@ -74,6 +74,10 @@
#define S_SQ_CF_ALU_WORD0_KCACHE_MODE0(x) (((x) & 0x3) << 30)
#define G_SQ_CF_ALU_WORD0_KCACHE_MODE0(x) (((x) >> 30) & 0x3)
#define C_SQ_CF_ALU_WORD0_KCACHE_MODE0 0x3FFFFFFF
+#define V_SQ_CF_KCACHE_NOP 0x00000000
+#define V_SQ_CF_KCACHE_LOCK_1 0x00000001
+#define V_SQ_CF_KCACHE_LOCK_2 0x00000002
+#define V_SQ_CF_KCACHE_LOCK_LOOP_INDEX 0x00000003
#define P_SQ_CF_ALU_WORD1
#define S_SQ_CF_ALU_WORD1_KCACHE_MODE1(x) (((x) & 0x3) << 0)
#define G_SQ_CF_ALU_WORD1_KCACHE_MODE1(x) (((x) >> 0) & 0x3)
@@ -187,6 +191,8 @@
#define V_SQ_ALU_SRC_M_1_INT 0x000000FB
#define V_SQ_ALU_SRC_0_5 0x000000FC
#define V_SQ_ALU_SRC_LITERAL 0x000000FD
+#define V_SQ_ALU_SRC_PV 0x000000FE
+#define V_SQ_ALU_SRC_PS 0x000000FF
#define V_SQ_ALU_SRC_PARAM_BASE 0x000001C0
#define S_SQ_ALU_WORD0_SRC0_REL(x) (((x) & 0x1) << 9)
#define G_SQ_ALU_WORD0_SRC0_REL(x) (((x) >> 9) & 0x1)
diff --git a/src/gallium/drivers/r600/r600_state.c b/src/gallium/drivers/r600/r600_state.c
index 553d786d655..d3adf0393c1 100644
--- a/src/gallium/drivers/r600/r600_state.c
+++ b/src/gallium/drivers/r600/r600_state.c
@@ -36,8 +36,8 @@
#include <util/u_pack_color.h>
#include <util/u_memory.h>
#include <util/u_inlines.h>
-#include <util/u_upload_mgr.h>
#include <util/u_framebuffer.h>
+#include "util/u_transfer.h"
#include <pipebuffer/pb_buffer.h>
#include "r600.h"
#include "r600d.h"
@@ -95,230 +95,6 @@ void r600_polygon_offset_update(struct r600_pipe_context *rctx)
}
}
-/* FIXME optimize away spi update when it's not needed */
-static void r600_spi_update(struct r600_pipe_context *rctx)
-{
- struct r600_pipe_shader *shader = rctx->ps_shader;
- struct r600_pipe_state rstate;
- struct r600_shader *rshader = &shader->shader;
- unsigned i, tmp;
-
- rstate.nregs = 0;
- for (i = 0; i < rshader->ninput; i++) {
- tmp = S_028644_SEMANTIC(r600_find_vs_semantic_index(&rctx->vs_shader->shader, rshader, i));
- if (rshader->input[i].centroid)
- tmp |= S_028644_SEL_CENTROID(1);
- if (rshader->input[i].interpolate == TGSI_INTERPOLATE_LINEAR)
- tmp |= S_028644_SEL_LINEAR(1);
-
- if (rshader->input[i].name == TGSI_SEMANTIC_COLOR ||
- rshader->input[i].name == TGSI_SEMANTIC_BCOLOR ||
- rshader->input[i].name == TGSI_SEMANTIC_POSITION) {
- tmp |= S_028644_FLAT_SHADE(rctx->flatshade);
- }
- if (rshader->input[i].name == TGSI_SEMANTIC_GENERIC &&
- rctx->sprite_coord_enable & (1 << rshader->input[i].sid)) {
- tmp |= S_028644_PT_SPRITE_TEX(1);
- }
- r600_pipe_state_add_reg(&rstate, R_028644_SPI_PS_INPUT_CNTL_0 + i * 4, tmp, 0xFFFFFFFF, NULL);
- }
- r600_context_pipe_state_set(&rctx->ctx, &rstate);
-}
-
-void r600_vertex_buffer_update(struct r600_pipe_context *rctx)
-{
- struct r600_pipe_state *rstate;
- struct r600_resource *rbuffer;
- struct pipe_vertex_buffer *vertex_buffer;
- unsigned i, offset;
-
- /* we don't update until we know vertex elements */
- if (rctx->vertex_elements == NULL || !rctx->nvertex_buffer)
- return;
-
- /* delete previous translated vertex elements */
- if (rctx->tran.new_velems) {
- r600_end_vertex_translate(rctx);
- }
-
- if (rctx->vertex_elements->incompatible_layout) {
- /* translate rebind new vertex elements so
- * return once translated
- */
- r600_begin_vertex_translate(rctx);
- return;
- }
-
- if (rctx->any_user_vbs) {
- r600_upload_user_buffers(rctx);
- rctx->any_user_vbs = FALSE;
- }
-
- if (rctx->vertex_elements->vbuffer_need_offset) {
- /* one resource per vertex elements */
- rctx->nvs_resource = rctx->vertex_elements->count;
- } else {
- /* bind vertex buffer once */
- rctx->nvs_resource = rctx->nvertex_buffer;
- }
-
- for (i = 0 ; i < rctx->nvs_resource; i++) {
- rstate = &rctx->vs_resource[i];
- rstate->id = R600_PIPE_STATE_RESOURCE;
- rstate->nregs = 0;
-
- if (rctx->vertex_elements->vbuffer_need_offset) {
- /* one resource per vertex elements */
- unsigned vbuffer_index;
- vbuffer_index = rctx->vertex_elements->elements[i].vertex_buffer_index;
- vertex_buffer = &rctx->vertex_buffer[vbuffer_index];
- rbuffer = (struct r600_resource*)vertex_buffer->buffer;
- offset = rctx->vertex_elements->vbuffer_offset[i] +
- vertex_buffer->buffer_offset +
- r600_bo_offset(rbuffer->bo);
- } else {
- /* bind vertex buffer once */
- vertex_buffer = &rctx->vertex_buffer[i];
- rbuffer = (struct r600_resource*)vertex_buffer->buffer;
- offset = vertex_buffer->buffer_offset +
- r600_bo_offset(rbuffer->bo);
- }
-
- r600_pipe_state_add_reg(rstate, R_038000_RESOURCE0_WORD0,
- offset, 0xFFFFFFFF, rbuffer->bo);
- r600_pipe_state_add_reg(rstate, R_038004_RESOURCE0_WORD1,
- rbuffer->size - offset - 1, 0xFFFFFFFF, NULL);
- r600_pipe_state_add_reg(rstate, R_038008_RESOURCE0_WORD2,
- S_038008_STRIDE(vertex_buffer->stride),
- 0xFFFFFFFF, NULL);
- r600_pipe_state_add_reg(rstate, R_03800C_RESOURCE0_WORD3,
- 0x00000000, 0xFFFFFFFF, NULL);
- r600_pipe_state_add_reg(rstate, R_038010_RESOURCE0_WORD4,
- 0x00000000, 0xFFFFFFFF, NULL);
- r600_pipe_state_add_reg(rstate, R_038014_RESOURCE0_WORD5,
- 0x00000000, 0xFFFFFFFF, NULL);
- r600_pipe_state_add_reg(rstate, R_038018_RESOURCE0_WORD6,
- 0xC0000000, 0xFFFFFFFF, NULL);
- r600_context_pipe_state_set_fs_resource(&rctx->ctx, rstate, i);
- }
-}
-
-static void r600_draw_common(struct r600_drawl *draw)
-{
- struct r600_pipe_context *rctx = (struct r600_pipe_context *)draw->ctx;
- struct r600_resource *rbuffer;
- unsigned prim;
- u32 vgt_dma_index_type, vgt_draw_initiator, mask;
- struct r600_draw rdraw;
- struct r600_pipe_state vgt;
-
- switch (draw->index_size) {
- case 2:
- vgt_draw_initiator = 0;
- vgt_dma_index_type = 0;
- break;
- case 4:
- vgt_draw_initiator = 0;
- vgt_dma_index_type = 1;
- break;
- case 0:
- vgt_draw_initiator = 2;
- vgt_dma_index_type = 0;
- break;
- default:
- R600_ERR("unsupported index size %d\n", draw->index_size);
- return;
- }
- if (r600_conv_pipe_prim(draw->mode, &prim))
- return;
- if (unlikely(rctx->ps_shader == NULL)) {
- R600_ERR("missing vertex shader\n");
- return;
- }
- if (unlikely(rctx->vs_shader == NULL)) {
- R600_ERR("missing vertex shader\n");
- return;
- }
- /* there should be enough input */
- if (rctx->vertex_elements->count < rctx->vs_shader->shader.bc.nresource) {
- R600_ERR("%d resources provided, expecting %d\n",
- rctx->vertex_elements->count, rctx->vs_shader->shader.bc.nresource);
- return;
- }
-
- r600_spi_update(rctx);
-
- mask = 0;
- for (int i = 0; i < rctx->framebuffer.nr_cbufs; i++) {
- mask |= (0xF << (i * 4));
- }
-
- vgt.id = R600_PIPE_STATE_VGT;
- vgt.nregs = 0;
- r600_pipe_state_add_reg(&vgt, R_008958_VGT_PRIMITIVE_TYPE, prim, 0xFFFFFFFF, NULL);
- r600_pipe_state_add_reg(&vgt, R_028408_VGT_INDX_OFFSET, draw->index_bias, 0xFFFFFFFF, NULL);
- r600_pipe_state_add_reg(&vgt, R_028400_VGT_MAX_VTX_INDX, draw->max_index, 0xFFFFFFFF, NULL);
- r600_pipe_state_add_reg(&vgt, R_028404_VGT_MIN_VTX_INDX, draw->min_index, 0xFFFFFFFF, NULL);
- r600_pipe_state_add_reg(&vgt, R_028238_CB_TARGET_MASK, rctx->cb_target_mask & mask, 0xFFFFFFFF, NULL);
- r600_pipe_state_add_reg(&vgt, R_03CFF0_SQ_VTX_BASE_VTX_LOC, 0, 0xFFFFFFFF, NULL);
- r600_pipe_state_add_reg(&vgt, R_03CFF4_SQ_VTX_START_INST_LOC, 0, 0xFFFFFFFF, NULL);
- r600_context_pipe_state_set(&rctx->ctx, &vgt);
-
- rdraw.vgt_num_indices = draw->count;
- rdraw.vgt_num_instances = 1;
- rdraw.vgt_index_type = vgt_dma_index_type;
- rdraw.vgt_draw_initiator = vgt_draw_initiator;
- rdraw.indices = NULL;
- if (draw->index_buffer) {
- rbuffer = (struct r600_resource*)draw->index_buffer;
- rdraw.indices = rbuffer->bo;
- rdraw.indices_bo_offset = draw->index_buffer_offset;
- }
- r600_context_draw(&rctx->ctx, &rdraw);
-}
-
-void r600_draw_vbo(struct pipe_context *ctx, const struct pipe_draw_info *info)
-{
- struct r600_pipe_context *rctx = (struct r600_pipe_context *)ctx;
- struct r600_drawl draw;
- boolean translate = FALSE;
-
- memset(&draw, 0, sizeof(struct r600_drawl));
- draw.ctx = ctx;
- draw.mode = info->mode;
- draw.start = info->start;
- draw.count = info->count;
- if (info->indexed && rctx->index_buffer.buffer) {
- draw.start += rctx->index_buffer.offset / rctx->index_buffer.index_size;
- draw.min_index = info->min_index;
- draw.max_index = info->max_index;
- draw.index_bias = info->index_bias;
-
- r600_translate_index_buffer(rctx, &rctx->index_buffer.buffer,
- &rctx->index_buffer.index_size,
- &draw.start,
- info->count);
-
- draw.index_size = rctx->index_buffer.index_size;
- pipe_resource_reference(&draw.index_buffer, rctx->index_buffer.buffer);
- draw.index_buffer_offset = draw.start * draw.index_size;
- draw.start = 0;
- r600_upload_index_buffer(rctx, &draw);
- } else {
- draw.index_size = 0;
- draw.index_buffer = NULL;
- draw.min_index = info->min_index;
- draw.max_index = info->max_index;
- draw.index_bias = info->start;
- }
- r600_draw_common(&draw);
-
- if (translate)
- r600_end_vertex_translate(rctx);
-
- pipe_resource_reference(&draw.index_buffer, NULL);
-}
-
static void r600_set_blend_color(struct pipe_context *ctx,
const struct pipe_blend_color *state)
{
@@ -341,9 +117,10 @@ static void r600_set_blend_color(struct pipe_context *ctx,
static void *r600_create_blend_state(struct pipe_context *ctx,
const struct pipe_blend_state *state)
{
+ struct r600_pipe_context *rctx = (struct r600_pipe_context *)ctx;
struct r600_pipe_blend *blend = CALLOC_STRUCT(r600_pipe_blend);
struct r600_pipe_state *rstate;
- u32 color_control, target_mask;
+ u32 color_control = 0, target_mask;
if (blend == NULL) {
return NULL;
@@ -353,7 +130,10 @@ static void *r600_create_blend_state(struct pipe_context *ctx,
rstate->id = R600_PIPE_STATE_BLEND;
target_mask = 0;
- color_control = S_028808_PER_MRT_BLEND(1);
+
+ /* R600 does not support per-MRT blends */
+ if (rctx->family > CHIP_R600)
+ color_control |= S_028808_PER_MRT_BLEND(1);
if (state->logicop_enable) {
color_control |= (state->logicop_func << 16) | (state->logicop_func << 20);
} else {
@@ -376,8 +156,9 @@ static void *r600_create_blend_state(struct pipe_context *ctx,
}
}
blend->cb_target_mask = target_mask;
+ /* MULTIWRITE_ENABLE is controlled by r600_pipe_shader_ps(). */
r600_pipe_state_add_reg(rstate, R_028808_CB_COLOR_CONTROL,
- color_control, 0xFFFFFFFF, NULL);
+ color_control, 0xFFFFFFFD, NULL);
for (int i = 0; i < 8; i++) {
unsigned eqRGB = state->rt[i].rgb_func;
@@ -403,10 +184,11 @@ static void *r600_create_blend_state(struct pipe_context *ctx,
bc |= S_028804_ALPHA_DESTBLEND(r600_translate_blend_factor(dstA));
}
- r600_pipe_state_add_reg(rstate, R_028780_CB_BLEND0_CONTROL + i * 4, bc, 0xFFFFFFFF, NULL);
- if (i == 0) {
+ /* R600 does not support per-MRT blends */
+ if (rctx->family > CHIP_R600)
+ r600_pipe_state_add_reg(rstate, R_028780_CB_BLEND0_CONTROL + i * 4, bc, 0xFFFFFFFF, NULL);
+ if (i == 0)
r600_pipe_state_add_reg(rstate, R_028804_CB_BLEND_CONTROL, bc, 0xFFFFFFFF, NULL);
- }
}
return rstate;
}
@@ -424,10 +206,6 @@ static void *r600_create_dsa_state(struct pipe_context *ctx,
rstate->id = R600_PIPE_STATE_DSA;
/* depth TODO some of those db_shader_control field depend on shader adjust mask & add it to shader */
- /* db_shader_control is 0xFFFFFFBE as Z_EXPORT_ENABLE (bit 0) will be
- * set by fragment shader if it export Z and KILL_ENABLE (bit 6) will
- * be set if shader use texkill instruction
- */
db_shader_control = S_02880C_Z_ORDER(V_02880C_EARLY_Z_THEN_LATE_Z);
stencil_ref_mask = 0;
stencil_ref_mask_bf = 0;
@@ -486,7 +264,10 @@ static void *r600_create_dsa_state(struct pipe_context *ctx,
r600_pipe_state_add_reg(rstate, R_0286E4_SPI_FOG_FUNC_BIAS, 0x00000000, 0xFFFFFFFF, NULL);
r600_pipe_state_add_reg(rstate, R_0286DC_SPI_FOG_CNTL, 0x00000000, 0xFFFFFFFF, NULL);
r600_pipe_state_add_reg(rstate, R_028800_DB_DEPTH_CONTROL, db_depth_control, 0xFFFFFFFF, NULL);
- r600_pipe_state_add_reg(rstate, R_02880C_DB_SHADER_CONTROL, db_shader_control, 0xFFFFFFBE, NULL);
+ /* The DB_SHADER_CONTROL mask is 0xFFFFFFBC since Z_EXPORT_ENABLE,
+ * STENCIL_EXPORT_ENABLE and KILL_ENABLE are controlled by
+ * r600_pipe_shader_ps().*/
+ r600_pipe_state_add_reg(rstate, R_02880C_DB_SHADER_CONTROL, db_shader_control, 0xFFFFFFBC, NULL);
r600_pipe_state_add_reg(rstate, R_028D0C_DB_RENDER_CONTROL, db_render_control, 0xFFFFFFFF, NULL);
r600_pipe_state_add_reg(rstate, R_028D10_DB_RENDER_OVERRIDE, db_render_override, 0xFFFFFFFF, NULL);
r600_pipe_state_add_reg(rstate, R_028D2C_DB_SRESULTS_COMPARE_STATE1, 0x00000000, 0xFFFFFFFF, NULL);
@@ -582,11 +363,16 @@ static void *r600_create_sampler_state(struct pipe_context *ctx,
{
struct r600_pipe_state *rstate = CALLOC_STRUCT(r600_pipe_state);
union util_color uc;
+ uint32_t coord_trunc = 0;
if (rstate == NULL) {
return NULL;
}
+ if ((state->mag_img_filter == PIPE_TEX_FILTER_NEAREST) ||
+ (state->min_img_filter == PIPE_TEX_FILTER_NEAREST))
+ coord_trunc = 1;
+
rstate->id = R600_PIPE_STATE_SAMPLER;
util_pack_color(state->border_color, PIPE_FORMAT_B8G8R8A8_UNORM, &uc);
r600_pipe_state_add_reg(rstate, R_03C000_SQ_TEX_SAMPLER_WORD0_0,
@@ -603,7 +389,9 @@ static void *r600_create_sampler_state(struct pipe_context *ctx,
S_03C004_MIN_LOD(S_FIXED(CLAMP(state->min_lod, 0, 15), 6)) |
S_03C004_MAX_LOD(S_FIXED(CLAMP(state->max_lod, 0, 15), 6)) |
S_03C004_LOD_BIAS(S_FIXED(CLAMP(state->lod_bias, -16, 16), 6)), 0xFFFFFFFF, NULL);
- r600_pipe_state_add_reg(rstate, R_03C008_SQ_TEX_SAMPLER_WORD2_0, S_03C008_TYPE(1), 0xFFFFFFFF, NULL);
+ r600_pipe_state_add_reg(rstate, R_03C008_SQ_TEX_SAMPLER_WORD2_0,
+ S_03C008_MC_COORD_TRUNCATE(coord_trunc) |
+ S_03C008_TYPE(1), 0xFFFFFFFF, NULL);
if (uc.ui) {
r600_pipe_state_add_reg(rstate, R_00A400_TD_PS_SAMPLER0_BORDER_RED, fui(state->border_color[0]), 0xFFFFFFFF, NULL);
r600_pipe_state_add_reg(rstate, R_00A404_TD_PS_SAMPLER0_BORDER_GREEN, fui(state->border_color[1]), 0xFFFFFFFF, NULL);
@@ -626,6 +414,7 @@ static struct pipe_sampler_view *r600_create_sampler_view(struct pipe_context *c
uint32_t word4 = 0, yuv_format = 0, pitch = 0;
unsigned char swizzle[4], array_mode = 0, tile_type = 0;
struct r600_bo *bo[2];
+ unsigned height, depth;
if (resource == NULL)
return NULL;
@@ -643,7 +432,7 @@ static struct pipe_sampler_view *r600_create_sampler_view(struct pipe_context *c
swizzle[1] = state->swizzle_g;
swizzle[2] = state->swizzle_b;
swizzle[3] = state->swizzle_a;
- format = r600_translate_texformat(state->format,
+ format = r600_translate_texformat(ctx->screen, state->format,
swizzle,
&word4, &yuv_format);
if (format == ~0) {
@@ -653,22 +442,30 @@ static struct pipe_sampler_view *r600_create_sampler_view(struct pipe_context *c
if (desc == NULL) {
R600_ERR("unknow format %d\n", state->format);
}
- tmp = (struct r600_resource_texture*)texture;
+ tmp = (struct r600_resource_texture *)texture;
+ if (tmp->depth && !tmp->is_flushing_texture) {
+ r600_texture_depth_flush(ctx, texture, TRUE);
+ tmp = tmp->flushed_depth_texture;
+ }
+
+ if (tmp->force_int_type) {
+ word4 &= C_038010_NUM_FORMAT_ALL;
+ word4 |= S_038010_NUM_FORMAT_ALL(V_038010_SQ_NUM_FORMAT_INT);
+ }
rbuffer = &tmp->resource;
bo[0] = rbuffer->bo;
bo[1] = rbuffer->bo;
- /* FIXME depth texture decompression */
- if (tmp->depth) {
- r600_texture_depth_flush(ctx, texture);
- tmp = (struct r600_resource_texture*)texture;
- rbuffer = &tmp->flushed_depth_texture->resource;
- bo[0] = rbuffer->bo;
- bo[1] = rbuffer->bo;
- }
- pitch = align(tmp->pitch_in_pixels[0], 8);
- if (tmp->tiled) {
- array_mode = tmp->array_mode[0];
- tile_type = tmp->tile_type;
+ pitch = align(tmp->pitch_in_blocks[0] * util_format_get_blockwidth(state->format), 8);
+ array_mode = tmp->array_mode[0];
+ tile_type = tmp->tile_type;
+
+ height = texture->height0;
+ depth = texture->depth0;
+ if (texture->target == PIPE_TEXTURE_1D_ARRAY) {
+ height = 1;
+ depth = texture->array_size;
+ } else if (texture->target == PIPE_TEXTURE_2D_ARRAY) {
+ depth = texture->array_size;
}
/* FIXME properly handle first level != 0 */
@@ -679,22 +476,22 @@ static struct pipe_sampler_view *r600_create_sampler_view(struct pipe_context *c
S_038000_PITCH((pitch / 8) - 1) |
S_038000_TEX_WIDTH(texture->width0 - 1), 0xFFFFFFFF, NULL);
r600_pipe_state_add_reg(rstate, R_038004_RESOURCE0_WORD1,
- S_038004_TEX_HEIGHT(texture->height0 - 1) |
- S_038004_TEX_DEPTH(texture->depth0 - 1) |
+ S_038004_TEX_HEIGHT(height - 1) |
+ S_038004_TEX_DEPTH(depth - 1) |
S_038004_DATA_FORMAT(format), 0xFFFFFFFF, NULL);
r600_pipe_state_add_reg(rstate, R_038008_RESOURCE0_WORD2,
(tmp->offset[0] + r600_bo_offset(bo[0])) >> 8, 0xFFFFFFFF, bo[0]);
r600_pipe_state_add_reg(rstate, R_03800C_RESOURCE0_WORD3,
(tmp->offset[1] + r600_bo_offset(bo[1])) >> 8, 0xFFFFFFFF, bo[1]);
r600_pipe_state_add_reg(rstate, R_038010_RESOURCE0_WORD4,
- word4 | S_038010_NUM_FORMAT_ALL(V_038010_SQ_NUM_FORMAT_NORM) |
- S_038010_SRF_MODE_ALL(V_038010_SFR_MODE_NO_ZERO) |
+ word4 |
+ S_038010_SRF_MODE_ALL(V_038010_SRF_MODE_NO_ZERO) |
S_038010_REQUEST_SIZE(1) |
S_038010_BASE_LEVEL(state->u.tex.first_level), 0xFFFFFFFF, NULL);
r600_pipe_state_add_reg(rstate, R_038014_RESOURCE0_WORD5,
S_038014_LAST_LEVEL(state->u.tex.last_level) |
- S_038014_BASE_ARRAY(0) |
- S_038014_LAST_ARRAY(0), 0xFFFFFFFF, NULL);
+ S_038014_BASE_ARRAY(state->u.tex.first_layer) |
+ S_038014_LAST_ARRAY(state->u.tex.last_layer), 0xFFFFFFFF, NULL);
r600_pipe_state_add_reg(rstate, R_038018_RESOURCE0_WORD6,
S_038018_TYPE(V_038010_SQ_TEX_VTX_VALID_TEXTURE), 0xFFFFFFFF, NULL);
@@ -709,7 +506,8 @@ static void r600_set_vs_sampler_view(struct pipe_context *ctx, unsigned count,
for (int i = 0; i < count; i++) {
if (resource[i]) {
- r600_context_pipe_state_set_vs_resource(&rctx->ctx, &resource[i]->state, i);
+ r600_context_pipe_state_set_vs_resource(&rctx->ctx, &resource[i]->state,
+ i + R600_MAX_CONST_BUFFERS);
}
}
}
@@ -724,9 +522,11 @@ static void r600_set_ps_sampler_view(struct pipe_context *ctx, unsigned count,
for (i = 0; i < count; i++) {
if (&rctx->ps_samplers.views[i]->base != views[i]) {
if (resource[i])
- r600_context_pipe_state_set_ps_resource(&rctx->ctx, &resource[i]->state, i);
+ r600_context_pipe_state_set_ps_resource(&rctx->ctx, &resource[i]->state,
+ i + R600_MAX_CONST_BUFFERS);
else
- r600_context_pipe_state_set_ps_resource(&rctx->ctx, NULL, i);
+ r600_context_pipe_state_set_ps_resource(&rctx->ctx, NULL,
+ i + R600_MAX_CONST_BUFFERS);
pipe_sampler_view_reference(
(struct pipe_sampler_view **)&rctx->ps_samplers.views[i],
@@ -736,7 +536,8 @@ static void r600_set_ps_sampler_view(struct pipe_context *ctx, unsigned count,
}
for (i = count; i < NUM_TEX_UNITS; i++) {
if (rctx->ps_samplers.views[i]) {
- r600_context_pipe_state_set_ps_resource(&rctx->ctx, NULL, i);
+ r600_context_pipe_state_set_ps_resource(&rctx->ctx, NULL,
+ i + R600_MAX_CONST_BUFFERS);
pipe_sampler_view_reference((struct pipe_sampler_view **)&rctx->ps_samplers.views[i], NULL);
}
}
@@ -918,33 +719,55 @@ static void r600_cb(struct r600_pipe_context *rctx, struct r600_pipe_state *rsta
unsigned offset;
const struct util_format_description *desc;
struct r600_bo *bo[3];
+ int i;
surf = (struct r600_surface *)state->cbufs[cb];
rtex = (struct r600_resource_texture*)state->cbufs[cb]->texture;
+
+ if (rtex->depth && !rtex->is_flushing_texture) {
+ r600_texture_depth_flush(&rctx->context, state->cbufs[cb]->texture, TRUE);
+ rtex = rtex->flushed_depth_texture;
+ }
+
rbuffer = &rtex->resource;
bo[0] = rbuffer->bo;
bo[1] = rbuffer->bo;
bo[2] = rbuffer->bo;
/* XXX quite sure for dx10+ hw don't need any offset hacks */
- offset = r600_texture_get_offset((struct r600_resource_texture *)state->cbufs[cb]->texture,
+ offset = r600_texture_get_offset(rtex,
level, state->cbufs[cb]->u.tex.first_layer);
- pitch = rtex->pitch_in_pixels[level] / 8 - 1;
- slice = rtex->pitch_in_pixels[level] * surf->aligned_height / 64 - 1;
+ pitch = rtex->pitch_in_blocks[level] / 8 - 1;
+ slice = rtex->pitch_in_blocks[level] * surf->aligned_height / 64 - 1;
ntype = 0;
- desc = util_format_description(rtex->resource.base.b.format);
+ desc = util_format_description(surf->base.format);
if (desc->colorspace == UTIL_FORMAT_COLORSPACE_SRGB)
ntype = V_0280A0_NUMBER_SRGB;
- format = r600_translate_colorformat(rtex->resource.base.b.format);
- swap = r600_translate_colorswap(rtex->resource.base.b.format);
+ for (i = 0; i < 4; i++) {
+ if (desc->channel[i].type != UTIL_FORMAT_TYPE_VOID) {
+ break;
+ }
+ }
+
+ format = r600_translate_colorformat(surf->base.format);
+ swap = r600_translate_colorswap(surf->base.format);
+
+ /* disable when gallium grows int textures */
+ if ((format == FMT_32_32_32_32 || format == FMT_16_16_16_16) && rtex->force_int_type)
+ ntype = 4;
+
color_info = S_0280A0_FORMAT(format) |
S_0280A0_COMP_SWAP(swap) |
S_0280A0_ARRAY_MODE(rtex->array_mode[level]) |
S_0280A0_BLEND_CLAMP(1) |
S_0280A0_NUMBER_TYPE(ntype);
- if (desc->colorspace != UTIL_FORMAT_COLORSPACE_ZS)
- color_info |= S_0280A0_SOURCE_FORMAT(1);
+
+ /* on R600 this can't be set if BLEND_CLAMP isn't set,
+ if BLEND_FLOAT32 is set of > 11 bits in a UNORM or SNORM */
+ if (desc->colorspace != UTIL_FORMAT_COLORSPACE_ZS &&
+ desc->channel[i].size < 12)
+ color_info |= S_0280A0_SOURCE_FORMAT(V_0280A0_EXPORT_NORM);
r600_pipe_state_add_reg(rstate,
R_028040_CB_COLOR0_BASE + cb * 4,
@@ -988,17 +811,14 @@ static void r600_db(struct r600_pipe_context *rctx, struct r600_pipe_state *rsta
surf = (struct r600_surface *)state->zsbuf;
rtex = (struct r600_resource_texture*)state->zsbuf->texture;
- rtex->tiled = 1;
- rtex->array_mode[level] = 2;
- rtex->tile_type = 1;
- rtex->depth = 1;
+
rbuffer = &rtex->resource;
/* XXX quite sure for dx10+ hw don't need any offset hacks */
offset = r600_texture_get_offset((struct r600_resource_texture *)state->zsbuf->texture,
level, state->zsbuf->u.tex.first_layer);
- pitch = rtex->pitch_in_pixels[level] / 8 - 1;
- slice = rtex->pitch_in_pixels[level] * surf->aligned_height / 64 - 1;
+ pitch = rtex->pitch_in_blocks[level] / 8 - 1;
+ slice = rtex->pitch_in_blocks[level] * surf->aligned_height / 64 - 1;
format = r600_translate_dbformat(state->zsbuf->texture->format);
r600_pipe_state_add_reg(rstate, R_02800C_DB_DEPTH_BASE,
@@ -1029,8 +849,6 @@ static void r600_set_framebuffer_state(struct pipe_context *ctx,
util_copy_framebuffer_state(&rctx->framebuffer, state);
- rctx->pframebuffer = &rctx->framebuffer;
-
/* build states */
for (int i = 0; i < state->nr_cbufs; i++) {
r600_cb(rctx, rstate, state, i);
@@ -1116,48 +934,6 @@ static void r600_set_framebuffer_state(struct pipe_context *ctx,
}
}
-static void r600_set_constant_buffer(struct pipe_context *ctx, uint shader, uint index,
- struct pipe_resource *buffer)
-{
- struct r600_pipe_context *rctx = (struct r600_pipe_context *)ctx;
- struct r600_resource *rbuffer = (struct r600_resource*)buffer;
-
- /* Note that the state tracker can unbind constant buffers by
- * passing NULL here.
- */
- if (buffer == NULL) {
- return;
- }
-
- switch (shader) {
- case PIPE_SHADER_VERTEX:
- rctx->vs_const_buffer.nregs = 0;
- r600_pipe_state_add_reg(&rctx->vs_const_buffer,
- R_028180_ALU_CONST_BUFFER_SIZE_VS_0,
- ALIGN_DIVUP(buffer->width0 >> 4, 16),
- 0xFFFFFFFF, NULL);
- r600_pipe_state_add_reg(&rctx->vs_const_buffer,
- R_028980_ALU_CONST_CACHE_VS_0,
- r600_bo_offset(rbuffer->bo) >> 8, 0xFFFFFFFF, rbuffer->bo);
- r600_context_pipe_state_set(&rctx->ctx, &rctx->vs_const_buffer);
- break;
- case PIPE_SHADER_FRAGMENT:
- rctx->ps_const_buffer.nregs = 0;
- r600_pipe_state_add_reg(&rctx->ps_const_buffer,
- R_028140_ALU_CONST_BUFFER_SIZE_PS_0,
- ALIGN_DIVUP(buffer->width0 >> 4, 16),
- 0xFFFFFFFF, NULL);
- r600_pipe_state_add_reg(&rctx->ps_const_buffer,
- R_028940_ALU_CONST_CACHE_PS_0,
- r600_bo_offset(rbuffer->bo) >> 8, 0xFFFFFFFF, rbuffer->bo);
- r600_context_pipe_state_set(&rctx->ctx, &rctx->ps_const_buffer);
- break;
- default:
- R600_ERR("unsupported %d\n", shader);
- return;
- }
-}
-
void r600_init_state_functions(struct r600_pipe_context *rctx)
{
rctx->context.create_blend_state = r600_create_blend_state;
@@ -1197,6 +973,7 @@ void r600_init_state_functions(struct r600_pipe_context *rctx)
rctx->context.set_vertex_sampler_views = r600_set_vs_sampler_view;
rctx->context.set_viewport_state = r600_set_viewport_state;
rctx->context.sampler_view_destroy = r600_sampler_view_destroy;
+ rctx->context.redefine_user_buffer = u_default_redefine_user_buffer;
}
void r600_init_config(struct r600_pipe_context *rctx)
@@ -1450,6 +1227,163 @@ void r600_init_config(struct r600_pipe_context *rctx)
r600_context_pipe_state_set(&rctx->ctx, rstate);
}
+void r600_pipe_shader_ps(struct pipe_context *ctx, struct r600_pipe_shader *shader)
+{
+ struct r600_pipe_state *rstate = &shader->rstate;
+ struct r600_shader *rshader = &shader->shader;
+ unsigned i, exports_ps, num_cout, spi_ps_in_control_0, spi_input_z, spi_ps_in_control_1, db_shader_control;
+ int pos_index = -1, face_index = -1;
+
+ rstate->nregs = 0;
+
+ for (i = 0; i < rshader->ninput; i++) {
+ if (rshader->input[i].name == TGSI_SEMANTIC_POSITION)
+ pos_index = i;
+ if (rshader->input[i].name == TGSI_SEMANTIC_FACE)
+ face_index = i;
+ }
+
+ db_shader_control = 0;
+ for (i = 0; i < rshader->noutput; i++) {
+ if (rshader->output[i].name == TGSI_SEMANTIC_POSITION)
+ db_shader_control |= S_02880C_Z_EXPORT_ENABLE(1);
+ if (rshader->output[i].name == TGSI_SEMANTIC_STENCIL)
+ db_shader_control |= S_02880C_STENCIL_REF_EXPORT_ENABLE(1);
+ }
+ if (rshader->uses_kill)
+ db_shader_control |= S_02880C_KILL_ENABLE(1);
+
+ exports_ps = 0;
+ num_cout = 0;
+ for (i = 0; i < rshader->noutput; i++) {
+ if (rshader->output[i].name == TGSI_SEMANTIC_POSITION ||
+ rshader->output[i].name == TGSI_SEMANTIC_STENCIL)
+ exports_ps |= 1;
+ else if (rshader->output[i].name == TGSI_SEMANTIC_COLOR) {
+ num_cout++;
+ }
+ }
+ exports_ps |= S_028854_EXPORT_COLORS(num_cout);
+ if (!exports_ps) {
+ /* always at least export 1 component per pixel */
+ exports_ps = 2;
+ }
+
+ spi_ps_in_control_0 = S_0286CC_NUM_INTERP(rshader->ninput) |
+ S_0286CC_PERSP_GRADIENT_ENA(1);
+ spi_input_z = 0;
+ if (pos_index != -1) {
+ spi_ps_in_control_0 |= (S_0286CC_POSITION_ENA(1) |
+ S_0286CC_POSITION_CENTROID(rshader->input[pos_index].centroid) |
+ S_0286CC_POSITION_ADDR(rshader->input[pos_index].gpr) |
+ S_0286CC_BARYC_SAMPLE_CNTL(1));
+ spi_input_z |= 1;
+ }
+
+ spi_ps_in_control_1 = 0;
+ if (face_index != -1) {
+ spi_ps_in_control_1 |= S_0286D0_FRONT_FACE_ENA(1) |
+ S_0286D0_FRONT_FACE_ADDR(rshader->input[face_index].gpr);
+ }
+
+ r600_pipe_state_add_reg(rstate, R_0286CC_SPI_PS_IN_CONTROL_0, spi_ps_in_control_0, 0xFFFFFFFF, NULL);
+ r600_pipe_state_add_reg(rstate, R_0286D0_SPI_PS_IN_CONTROL_1, spi_ps_in_control_1, 0xFFFFFFFF, NULL);
+ r600_pipe_state_add_reg(rstate, R_0286D8_SPI_INPUT_Z, spi_input_z, 0xFFFFFFFF, NULL);
+ r600_pipe_state_add_reg(rstate,
+ R_028840_SQ_PGM_START_PS,
+ r600_bo_offset(shader->bo) >> 8, 0xFFFFFFFF, shader->bo);
+ r600_pipe_state_add_reg(rstate,
+ R_028850_SQ_PGM_RESOURCES_PS,
+ S_028868_NUM_GPRS(rshader->bc.ngpr) |
+ S_028868_STACK_SIZE(rshader->bc.nstack),
+ 0xFFFFFFFF, NULL);
+ r600_pipe_state_add_reg(rstate,
+ R_028854_SQ_PGM_EXPORTS_PS,
+ exports_ps, 0xFFFFFFFF, NULL);
+ r600_pipe_state_add_reg(rstate,
+ R_0288CC_SQ_PGM_CF_OFFSET_PS,
+ 0x00000000, 0xFFFFFFFF, NULL);
+ r600_pipe_state_add_reg(rstate, R_028808_CB_COLOR_CONTROL,
+ S_028808_MULTIWRITE_ENABLE(!!rshader->fs_write_all),
+ S_028808_MULTIWRITE_ENABLE(1),
+ NULL);
+ /* only set some bits here, the other bits are set in the dsa state */
+ r600_pipe_state_add_reg(rstate, R_02880C_DB_SHADER_CONTROL,
+ db_shader_control,
+ S_02880C_Z_EXPORT_ENABLE(1) |
+ S_02880C_STENCIL_REF_EXPORT_ENABLE(1) |
+ S_02880C_KILL_ENABLE(1),
+ NULL);
+
+ r600_pipe_state_add_reg(rstate,
+ R_03E200_SQ_LOOP_CONST_0, 0x01000FFF,
+ 0xFFFFFFFF, NULL);
+}
+
+void r600_pipe_shader_vs(struct pipe_context *ctx, struct r600_pipe_shader *shader)
+{
+ struct r600_pipe_state *rstate = &shader->rstate;
+ struct r600_shader *rshader = &shader->shader;
+ unsigned spi_vs_out_id[10];
+ unsigned i, tmp;
+
+ /* clear previous register */
+ rstate->nregs = 0;
+
+ /* so far never got proper semantic id from tgsi */
+ /* FIXME better to move this in config things so they get emited
+ * only one time per cs
+ */
+ for (i = 0; i < 10; i++) {
+ spi_vs_out_id[i] = 0;
+ }
+ for (i = 0; i < 32; i++) {
+ tmp = i << ((i & 3) * 8);
+ spi_vs_out_id[i / 4] |= tmp;
+ }
+ for (i = 0; i < 10; i++) {
+ r600_pipe_state_add_reg(rstate,
+ R_028614_SPI_VS_OUT_ID_0 + i * 4,
+ spi_vs_out_id[i], 0xFFFFFFFF, NULL);
+ }
+
+ r600_pipe_state_add_reg(rstate,
+ R_0286C4_SPI_VS_OUT_CONFIG,
+ S_0286C4_VS_EXPORT_COUNT(rshader->noutput - 2),
+ 0xFFFFFFFF, NULL);
+ r600_pipe_state_add_reg(rstate,
+ R_028868_SQ_PGM_RESOURCES_VS,
+ S_028868_NUM_GPRS(rshader->bc.ngpr) |
+ S_028868_STACK_SIZE(rshader->bc.nstack),
+ 0xFFFFFFFF, NULL);
+ r600_pipe_state_add_reg(rstate,
+ R_0288D0_SQ_PGM_CF_OFFSET_VS,
+ 0x00000000, 0xFFFFFFFF, NULL);
+ r600_pipe_state_add_reg(rstate,
+ R_028858_SQ_PGM_START_VS,
+ r600_bo_offset(shader->bo) >> 8, 0xFFFFFFFF, shader->bo);
+
+ r600_pipe_state_add_reg(rstate,
+ R_03E200_SQ_LOOP_CONST_0 + (32 * 4), 0x01000FFF,
+ 0xFFFFFFFF, NULL);
+}
+
+void r600_fetch_shader(struct r600_vertex_element *ve)
+{
+ struct r600_pipe_state *rstate;
+
+ rstate = &ve->rstate;
+ rstate->id = R600_PIPE_STATE_FETCH_SHADER;
+ rstate->nregs = 0;
+ r600_pipe_state_add_reg(rstate, R_0288A4_SQ_PGM_RESOURCES_FS,
+ 0x00000000, 0xFFFFFFFF, NULL);
+ r600_pipe_state_add_reg(rstate, R_0288DC_SQ_PGM_CF_OFFSET_FS,
+ 0x00000000, 0xFFFFFFFF, NULL);
+ r600_pipe_state_add_reg(rstate, R_028894_SQ_PGM_START_FS,
+ r600_bo_offset(ve->fetch_shader) >> 8,
+ 0xFFFFFFFF, ve->fetch_shader);
+}
+
void *r600_create_db_flush_dsa(struct r600_pipe_context *rctx)
{
struct pipe_depth_stencil_alpha_state dsa;
@@ -1487,3 +1421,25 @@ void *r600_create_db_flush_dsa(struct r600_pipe_context *rctx)
S_028D0C_COPY_CENTROID(1), NULL);
return rstate;
}
+
+void r600_pipe_set_buffer_resource(struct r600_pipe_context *rctx,
+ struct r600_pipe_state *rstate,
+ struct r600_resource *rbuffer,
+ unsigned offset, unsigned stride)
+{
+ r600_pipe_state_add_reg(rstate, R_038000_RESOURCE0_WORD0,
+ offset, 0xFFFFFFFF, rbuffer->bo);
+ r600_pipe_state_add_reg(rstate, R_038004_RESOURCE0_WORD1,
+ rbuffer->bo_size - offset - 1, 0xFFFFFFFF, NULL);
+ r600_pipe_state_add_reg(rstate, R_038008_RESOURCE0_WORD2,
+ S_038008_STRIDE(stride),
+ 0xFFFFFFFF, NULL);
+ r600_pipe_state_add_reg(rstate, R_03800C_RESOURCE0_WORD3,
+ 0x00000000, 0xFFFFFFFF, NULL);
+ r600_pipe_state_add_reg(rstate, R_038010_RESOURCE0_WORD4,
+ 0x00000000, 0xFFFFFFFF, NULL);
+ r600_pipe_state_add_reg(rstate, R_038014_RESOURCE0_WORD5,
+ 0x00000000, 0xFFFFFFFF, NULL);
+ r600_pipe_state_add_reg(rstate, R_038018_RESOURCE0_WORD6,
+ 0xC0000000, 0xFFFFFFFF, NULL);
+}
diff --git a/src/gallium/drivers/r600/r600_state_common.c b/src/gallium/drivers/r600/r600_state_common.c
index c647e77b373..43dad0c8023 100644
--- a/src/gallium/drivers/r600/r600_state_common.c
+++ b/src/gallium/drivers/r600/r600_state_common.c
@@ -27,7 +27,9 @@
#include <util/u_memory.h>
#include <util/u_format.h>
#include <pipebuffer/pb_buffer.h>
+#include "pipe/p_shader_tokens.h"
#include "r600_pipe.h"
+#include "r600d.h"
/* common state between evergreen and r600 */
void r600_bind_blend_state(struct pipe_context *ctx, void *state)
@@ -121,17 +123,11 @@ void r600_bind_vertex_elements(struct pipe_context *ctx, void *state)
rctx->vertex_elements = v;
if (v) {
+ u_vbuf_mgr_bind_vertex_elements(rctx->vbuf_mgr, state,
+ v->vmgr_elements);
+
rctx->states[v->rstate.id] = &v->rstate;
r600_context_pipe_state_set(&rctx->ctx, &v->rstate);
- if (rctx->family >= CHIP_CEDAR) {
- evergreen_vertex_buffer_update(rctx);
- } else {
- r600_vertex_buffer_update(rctx);
- }
- }
-
- if (v) {
-// rctx->vs_rebuild = TRUE;
}
}
@@ -147,6 +143,7 @@ void r600_delete_vertex_element(struct pipe_context *ctx, void *state)
rctx->vertex_elements = NULL;
r600_bo_reference(rctx->radeon, &v->fetch_shader, NULL);
+ u_vbuf_mgr_destroy_vertex_elements(rctx->vbuf_mgr, v->vmgr_elements);
FREE(state);
}
@@ -171,42 +168,28 @@ void r600_set_vertex_buffers(struct pipe_context *ctx, unsigned count,
const struct pipe_vertex_buffer *buffers)
{
struct r600_pipe_context *rctx = (struct r600_pipe_context *)ctx;
- struct pipe_vertex_buffer *vbo;
- unsigned max_index = (unsigned)-1;
-
- for (int i = 0; i < rctx->nvertex_buffer; i++) {
- pipe_resource_reference(&rctx->vertex_buffer[i].buffer, NULL);
- }
- memcpy(rctx->vertex_buffer, buffers, sizeof(struct pipe_vertex_buffer) * count);
-
- for (int i = 0; i < count; i++) {
- vbo = (struct pipe_vertex_buffer*)&buffers[i];
-
- rctx->vertex_buffer[i].buffer = NULL;
- if (r600_buffer_is_user_buffer(buffers[i].buffer))
- rctx->any_user_vbs = TRUE;
- pipe_resource_reference(&rctx->vertex_buffer[i].buffer, buffers[i].buffer);
+ int i;
- if (vbo->max_index == ~0) {
- if (!vbo->stride)
- vbo->max_index = 1;
- else
- vbo->max_index = (vbo->buffer->width0 - vbo->buffer_offset) / vbo->stride;
+ /* Zero states. */
+ for (i = 0; i < count; i++) {
+ if (!buffers[i].buffer) {
+ if (rctx->family >= CHIP_CEDAR) {
+ evergreen_context_pipe_state_set_fs_resource(&rctx->ctx, NULL, i);
+ } else {
+ r600_context_pipe_state_set_fs_resource(&rctx->ctx, NULL, i);
+ }
}
- max_index = MIN2(vbo->max_index, max_index);
}
- rctx->nvertex_buffer = count;
- rctx->vb_max_index = max_index;
- if (rctx->family >= CHIP_CEDAR) {
- evergreen_vertex_buffer_update(rctx);
- } else {
- r600_vertex_buffer_update(rctx);
+ for (; i < rctx->vbuf_mgr->nr_real_vertex_buffers; i++) {
+ if (rctx->family >= CHIP_CEDAR) {
+ evergreen_context_pipe_state_set_fs_resource(&rctx->ctx, NULL, i);
+ } else {
+ r600_context_pipe_state_set_fs_resource(&rctx->ctx, NULL, i);
+ }
}
-}
-
-#define FORMAT_REPLACE(what, withwhat) \
- case PIPE_FORMAT_##what: *format = PIPE_FORMAT_##withwhat; break
+ u_vbuf_mgr_set_vertex_buffers(rctx->vbuf_mgr, count, buffers);
+}
void *r600_create_vertex_elements(struct pipe_context *ctx,
unsigned count,
@@ -214,33 +197,15 @@ void *r600_create_vertex_elements(struct pipe_context *ctx,
{
struct r600_pipe_context *rctx = (struct r600_pipe_context *)ctx;
struct r600_vertex_element *v = CALLOC_STRUCT(r600_vertex_element);
- enum pipe_format *format;
- int i;
assert(count < 32);
if (!v)
return NULL;
v->count = count;
- memcpy(v->elements, elements, count * sizeof(struct pipe_vertex_element));
-
- for (i = 0; i < count; i++) {
- v->hw_format[i] = v->elements[i].src_format;
- format = &v->hw_format[i];
-
- switch (*format) {
- FORMAT_REPLACE(R64_FLOAT, R32_FLOAT);
- FORMAT_REPLACE(R64G64_FLOAT, R32G32_FLOAT);
- FORMAT_REPLACE(R64G64B64_FLOAT, R32G32B32_FLOAT);
- FORMAT_REPLACE(R64G64B64A64_FLOAT, R32G32B32A32_FLOAT);
- default:;
- }
- v->incompatible_layout =
- v->incompatible_layout ||
- v->elements[i].src_format != v->hw_format[i];
-
- v->hw_format_size[i] = align(util_format_get_blocksize(v->hw_format[i]), 4);
- }
+ v->vmgr_elements =
+ u_vbuf_mgr_create_vertex_elements(rctx->vbuf_mgr, count,
+ elements, v->elements);
if (r600_vertex_elements_build_fetch_shader(rctx, v)) {
FREE(v);
@@ -310,3 +275,274 @@ void r600_delete_vs_shader(struct pipe_context *ctx, void *state)
r600_pipe_shader_destroy(ctx, shader);
free(shader);
}
+
+/* FIXME optimize away spi update when it's not needed */
+void r600_spi_update(struct r600_pipe_context *rctx)
+{
+ struct r600_pipe_shader *shader = rctx->ps_shader;
+ struct r600_pipe_state rstate;
+ struct r600_shader *rshader = &shader->shader;
+ unsigned i, tmp;
+
+ rstate.nregs = 0;
+ for (i = 0; i < rshader->ninput; i++) {
+ tmp = S_028644_SEMANTIC(r600_find_vs_semantic_index(&rctx->vs_shader->shader, rshader, i));
+
+ if (rshader->input[i].name == TGSI_SEMANTIC_COLOR ||
+ rshader->input[i].name == TGSI_SEMANTIC_BCOLOR ||
+ rshader->input[i].name == TGSI_SEMANTIC_POSITION) {
+ tmp |= S_028644_FLAT_SHADE(rctx->flatshade);
+ }
+
+ if (rshader->input[i].name == TGSI_SEMANTIC_GENERIC &&
+ rctx->sprite_coord_enable & (1 << rshader->input[i].sid)) {
+ tmp |= S_028644_PT_SPRITE_TEX(1);
+ }
+
+ if (rctx->family < CHIP_CEDAR) {
+ if (rshader->input[i].centroid)
+ tmp |= S_028644_SEL_CENTROID(1);
+
+ if (rshader->input[i].interpolate == TGSI_INTERPOLATE_LINEAR)
+ tmp |= S_028644_SEL_LINEAR(1);
+ }
+
+ r600_pipe_state_add_reg(&rstate, R_028644_SPI_PS_INPUT_CNTL_0 + i * 4, tmp, 0xFFFFFFFF, NULL);
+ }
+ r600_context_pipe_state_set(&rctx->ctx, &rstate);
+}
+
+void r600_set_constant_buffer(struct pipe_context *ctx, uint shader, uint index,
+ struct pipe_resource *buffer)
+{
+ struct r600_pipe_context *rctx = (struct r600_pipe_context *)ctx;
+ struct r600_resource_buffer *rbuffer = r600_buffer(buffer);
+ struct r600_pipe_state *rstate;
+ uint32_t offset;
+
+ /* Note that the state tracker can unbind constant buffers by
+ * passing NULL here.
+ */
+ if (buffer == NULL) {
+ return;
+ }
+
+ r600_upload_const_buffer(rctx, &rbuffer, &offset);
+ offset += r600_bo_offset(rbuffer->r.bo);
+
+ switch (shader) {
+ case PIPE_SHADER_VERTEX:
+ rctx->vs_const_buffer.nregs = 0;
+ r600_pipe_state_add_reg(&rctx->vs_const_buffer,
+ R_028180_ALU_CONST_BUFFER_SIZE_VS_0,
+ ALIGN_DIVUP(buffer->width0 >> 4, 16),
+ 0xFFFFFFFF, NULL);
+ r600_pipe_state_add_reg(&rctx->vs_const_buffer,
+ R_028980_ALU_CONST_CACHE_VS_0,
+ offset >> 8, 0xFFFFFFFF, rbuffer->r.bo);
+ r600_context_pipe_state_set(&rctx->ctx, &rctx->vs_const_buffer);
+
+ rstate = &rctx->vs_const_buffer_resource[index];
+ rstate->id = R600_PIPE_STATE_RESOURCE;
+ rstate->nregs = 0;
+ if (rctx->family >= CHIP_CEDAR) {
+ evergreen_pipe_set_buffer_resource(rctx, rstate, &rbuffer->r, offset, 16);
+ evergreen_context_pipe_state_set_vs_resource(&rctx->ctx, rstate, index);
+ } else {
+ r600_pipe_set_buffer_resource(rctx, rstate, &rbuffer->r, offset, 16);
+ r600_context_pipe_state_set_vs_resource(&rctx->ctx, rstate, index);
+ }
+ break;
+ case PIPE_SHADER_FRAGMENT:
+ rctx->ps_const_buffer.nregs = 0;
+ r600_pipe_state_add_reg(&rctx->ps_const_buffer,
+ R_028140_ALU_CONST_BUFFER_SIZE_PS_0,
+ ALIGN_DIVUP(buffer->width0 >> 4, 16),
+ 0xFFFFFFFF, NULL);
+ r600_pipe_state_add_reg(&rctx->ps_const_buffer,
+ R_028940_ALU_CONST_CACHE_PS_0,
+ offset >> 8, 0xFFFFFFFF, rbuffer->r.bo);
+ r600_context_pipe_state_set(&rctx->ctx, &rctx->ps_const_buffer);
+
+ rstate = &rctx->ps_const_buffer_resource[index];
+ rstate->id = R600_PIPE_STATE_RESOURCE;
+ rstate->nregs = 0;
+ if (rctx->family >= CHIP_CEDAR) {
+ evergreen_pipe_set_buffer_resource(rctx, rstate, &rbuffer->r, offset, 16);
+ evergreen_context_pipe_state_set_ps_resource(&rctx->ctx, rstate, index);
+ } else {
+ r600_pipe_set_buffer_resource(rctx, rstate, &rbuffer->r, offset, 16);
+ r600_context_pipe_state_set_ps_resource(&rctx->ctx, rstate, index);
+ }
+ break;
+ default:
+ R600_ERR("unsupported %d\n", shader);
+ return;
+ }
+
+ if (buffer != &rbuffer->r.b.b.b)
+ pipe_resource_reference((struct pipe_resource**)&rbuffer, NULL);
+}
+
+static void r600_vertex_buffer_update(struct r600_pipe_context *rctx)
+{
+ struct r600_pipe_state *rstate;
+ struct r600_resource *rbuffer;
+ struct pipe_vertex_buffer *vertex_buffer;
+ unsigned i, count, offset;
+
+ if (rctx->vertex_elements->vbuffer_need_offset) {
+ /* one resource per vertex elements */
+ count = rctx->vertex_elements->count;
+ } else {
+ /* bind vertex buffer once */
+ count = rctx->vbuf_mgr->nr_real_vertex_buffers;
+ }
+
+ for (i = 0 ; i < count; i++) {
+ rstate = &rctx->fs_resource[i];
+ rstate->id = R600_PIPE_STATE_RESOURCE;
+ rstate->nregs = 0;
+
+ if (rctx->vertex_elements->vbuffer_need_offset) {
+ /* one resource per vertex elements */
+ unsigned vbuffer_index;
+ vbuffer_index = rctx->vertex_elements->elements[i].vertex_buffer_index;
+ vertex_buffer = &rctx->vbuf_mgr->vertex_buffer[vbuffer_index];
+ rbuffer = (struct r600_resource*)rctx->vbuf_mgr->real_vertex_buffer[vbuffer_index];
+ offset = rctx->vertex_elements->vbuffer_offset[i];
+ } else {
+ /* bind vertex buffer once */
+ vertex_buffer = &rctx->vbuf_mgr->vertex_buffer[i];
+ rbuffer = (struct r600_resource*)rctx->vbuf_mgr->real_vertex_buffer[i];
+ offset = 0;
+ }
+ if (vertex_buffer == NULL || rbuffer == NULL)
+ continue;
+ offset += vertex_buffer->buffer_offset + r600_bo_offset(rbuffer->bo);
+
+ if (rctx->family >= CHIP_CEDAR) {
+ evergreen_pipe_set_buffer_resource(rctx, rstate, rbuffer, offset, vertex_buffer->stride);
+ evergreen_context_pipe_state_set_fs_resource(&rctx->ctx, rstate, i);
+ } else {
+ r600_pipe_set_buffer_resource(rctx, rstate, rbuffer, offset, vertex_buffer->stride);
+ r600_context_pipe_state_set_fs_resource(&rctx->ctx, rstate, i);
+ }
+ }
+}
+
+void r600_draw_vbo(struct pipe_context *ctx, const struct pipe_draw_info *info)
+{
+ struct r600_pipe_context *rctx = (struct r600_pipe_context *)ctx;
+ struct r600_resource *rbuffer;
+ u32 vgt_dma_index_type, vgt_draw_initiator, mask;
+ struct r600_draw rdraw;
+ struct r600_pipe_state vgt;
+ struct r600_drawl draw = {};
+ unsigned prim;
+
+ r600_flush_depth_textures(rctx);
+ u_vbuf_mgr_draw_begin(rctx->vbuf_mgr, info, NULL, NULL);
+ r600_vertex_buffer_update(rctx);
+
+ draw.info = *info;
+ draw.ctx = ctx;
+ if (info->indexed && rctx->index_buffer.buffer) {
+ draw.info.start += rctx->index_buffer.offset / rctx->index_buffer.index_size;
+ pipe_resource_reference(&draw.index_buffer, rctx->index_buffer.buffer);
+
+ r600_translate_index_buffer(rctx, &draw.index_buffer,
+ &rctx->index_buffer.index_size,
+ &draw.info.start,
+ info->count);
+
+ draw.index_size = rctx->index_buffer.index_size;
+ draw.index_buffer_offset = draw.info.start * draw.index_size;
+ draw.info.start = 0;
+
+ if (u_vbuf_resource(draw.index_buffer)->user_ptr) {
+ r600_upload_index_buffer(rctx, &draw);
+ }
+ } else {
+ draw.info.index_bias = info->start;
+ }
+
+ switch (draw.index_size) {
+ case 2:
+ vgt_draw_initiator = 0;
+ vgt_dma_index_type = 0;
+ break;
+ case 4:
+ vgt_draw_initiator = 0;
+ vgt_dma_index_type = 1;
+ break;
+ case 0:
+ vgt_draw_initiator = 2;
+ vgt_dma_index_type = 0;
+ break;
+ default:
+ R600_ERR("unsupported index size %d\n", draw.index_size);
+ return;
+ }
+ if (r600_conv_pipe_prim(draw.info.mode, &prim))
+ return;
+ if (unlikely(rctx->ps_shader == NULL)) {
+ R600_ERR("missing vertex shader\n");
+ return;
+ }
+ if (unlikely(rctx->vs_shader == NULL)) {
+ R600_ERR("missing vertex shader\n");
+ return;
+ }
+ /* there should be enough input */
+ if (rctx->vertex_elements->count < rctx->vs_shader->shader.bc.nresource) {
+ R600_ERR("%d resources provided, expecting %d\n",
+ rctx->vertex_elements->count, rctx->vs_shader->shader.bc.nresource);
+ return;
+ }
+
+ r600_spi_update(rctx);
+
+ mask = 0;
+ for (int i = 0; i < rctx->framebuffer.nr_cbufs; i++) {
+ mask |= (0xF << (i * 4));
+ }
+
+ vgt.id = R600_PIPE_STATE_VGT;
+ vgt.nregs = 0;
+ r600_pipe_state_add_reg(&vgt, R_008958_VGT_PRIMITIVE_TYPE, prim, 0xFFFFFFFF, NULL);
+ r600_pipe_state_add_reg(&vgt, R_028408_VGT_INDX_OFFSET, draw.info.index_bias, 0xFFFFFFFF, NULL);
+ r600_pipe_state_add_reg(&vgt, R_028400_VGT_MAX_VTX_INDX, draw.info.max_index, 0xFFFFFFFF, NULL);
+ r600_pipe_state_add_reg(&vgt, R_028404_VGT_MIN_VTX_INDX, draw.info.min_index, 0xFFFFFFFF, NULL);
+ r600_pipe_state_add_reg(&vgt, R_028238_CB_TARGET_MASK, rctx->cb_target_mask & mask, 0xFFFFFFFF, NULL);
+ r600_pipe_state_add_reg(&vgt, R_03CFF0_SQ_VTX_BASE_VTX_LOC, 0, 0xFFFFFFFF, NULL);
+ r600_pipe_state_add_reg(&vgt, R_03CFF4_SQ_VTX_START_INST_LOC, draw.info.start_instance, 0xFFFFFFFF, NULL);
+ r600_context_pipe_state_set(&rctx->ctx, &vgt);
+
+ rdraw.vgt_num_indices = draw.info.count;
+ rdraw.vgt_num_instances = draw.info.instance_count;
+ rdraw.vgt_index_type = vgt_dma_index_type;
+ rdraw.vgt_draw_initiator = vgt_draw_initiator;
+ rdraw.indices = NULL;
+ if (draw.index_buffer) {
+ rbuffer = (struct r600_resource*)draw.index_buffer;
+ rdraw.indices = rbuffer->bo;
+ rdraw.indices_bo_offset = draw.index_buffer_offset;
+ }
+
+ if (rctx->family >= CHIP_CEDAR) {
+ evergreen_context_draw(&rctx->ctx, &rdraw);
+ } else {
+ r600_context_draw(&rctx->ctx, &rdraw);
+ }
+
+ if (rctx->framebuffer.zsbuf)
+ {
+ struct pipe_resource *tex = rctx->framebuffer.zsbuf->texture;
+ ((struct r600_resource_texture *)tex)->dirty_db = TRUE;
+ }
+
+ pipe_resource_reference(&draw.index_buffer, NULL);
+
+ u_vbuf_mgr_draw_end(rctx->vbuf_mgr);
+}
diff --git a/src/gallium/drivers/r600/r600_state_inlines.h b/src/gallium/drivers/r600/r600_state_inlines.h
index d994196e19d..3d0360485aa 100644
--- a/src/gallium/drivers/r600/r600_state_inlines.h
+++ b/src/gallium/drivers/r600/r600_state_inlines.h
@@ -253,9 +253,13 @@ static inline unsigned r600_tex_dim(unsigned dim)
default:
case PIPE_TEXTURE_1D:
return V_038000_SQ_TEX_DIM_1D;
+ case PIPE_TEXTURE_1D_ARRAY:
+ return V_038000_SQ_TEX_DIM_1D_ARRAY;
case PIPE_TEXTURE_2D:
case PIPE_TEXTURE_RECT:
return V_038000_SQ_TEX_DIM_2D;
+ case PIPE_TEXTURE_2D_ARRAY:
+ return V_038000_SQ_TEX_DIM_2D_ARRAY;
case PIPE_TEXTURE_3D:
return V_038000_SQ_TEX_DIM_3D;
case PIPE_TEXTURE_CUBE:
@@ -285,10 +289,14 @@ static inline uint32_t r600_translate_colorswap(enum pipe_format format)
return V_0280A0_SWAP_ALT_REV;
case PIPE_FORMAT_I8_UNORM:
case PIPE_FORMAT_L8_UNORM:
+ case PIPE_FORMAT_L8_SRGB:
case PIPE_FORMAT_R8_UNORM:
case PIPE_FORMAT_R8_SNORM:
return V_0280A0_SWAP_STD;
+ case PIPE_FORMAT_L4A4_UNORM:
+ return V_0280A0_SWAP_ALT;
+
/* 16-bit buffers. */
case PIPE_FORMAT_B5G6R5_UNORM:
return V_0280A0_SWAP_STD_REV;
@@ -305,6 +313,7 @@ static inline uint32_t r600_translate_colorswap(enum pipe_format format)
return V_0280A0_SWAP_STD;
case PIPE_FORMAT_L8A8_UNORM:
+ case PIPE_FORMAT_L8A8_SRGB:
return V_0280A0_SWAP_ALT;
case PIPE_FORMAT_R8G8_UNORM:
return V_0280A0_SWAP_STD;
@@ -327,6 +336,7 @@ static inline uint32_t r600_translate_colorswap(enum pipe_format format)
case PIPE_FORMAT_X8R8G8B8_UNORM:
return V_0280A0_SWAP_ALT_REV;
case PIPE_FORMAT_R8G8B8A8_SNORM:
+ case PIPE_FORMAT_R8G8B8A8_UNORM:
case PIPE_FORMAT_R8G8B8X8_UNORM:
return V_0280A0_SWAP_STD;
@@ -345,9 +355,11 @@ static inline uint32_t r600_translate_colorswap(enum pipe_format format)
case PIPE_FORMAT_R10G10B10A2_UNORM:
case PIPE_FORMAT_R10G10B10X2_SNORM:
- case PIPE_FORMAT_B10G10R10A2_UNORM:
case PIPE_FORMAT_R10SG10SB10SA2U_NORM:
- return V_0280A0_SWAP_STD_REV;
+ return V_0280A0_SWAP_STD;
+
+ case PIPE_FORMAT_B10G10R10A2_UNORM:
+ return V_0280A0_SWAP_ALT;
case PIPE_FORMAT_R16G16_UNORM:
return V_0280A0_SWAP_STD;
@@ -355,14 +367,13 @@ static inline uint32_t r600_translate_colorswap(enum pipe_format format)
/* 64-bit buffers. */
case PIPE_FORMAT_R16G16B16A16_UNORM:
case PIPE_FORMAT_R16G16B16A16_SNORM:
- // return FMT_16_16_16_16;
case PIPE_FORMAT_R16G16B16A16_FLOAT:
- // return FMT_16_16_16_16_FLOAT;
/* 128-bit buffers. */
case PIPE_FORMAT_R32G32B32A32_FLOAT:
- // return FMT_32_32_32_32_FLOAT;
- return 0;
+ case PIPE_FORMAT_R32G32B32A32_SNORM:
+ case PIPE_FORMAT_R32G32B32A32_UNORM:
+ return V_0280A0_SWAP_STD;
default:
R600_ERR("unsupported colorswap format %d\n", format);
return ~0;
@@ -373,10 +384,14 @@ static inline uint32_t r600_translate_colorswap(enum pipe_format format)
static INLINE uint32_t r600_translate_colorformat(enum pipe_format format)
{
switch (format) {
+ case PIPE_FORMAT_L4A4_UNORM:
+ return V_0280A0_COLOR_4_4;
+
/* 8-bit buffers. */
case PIPE_FORMAT_A8_UNORM:
case PIPE_FORMAT_I8_UNORM:
case PIPE_FORMAT_L8_UNORM:
+ case PIPE_FORMAT_L8_SRGB:
case PIPE_FORMAT_R8_UNORM:
case PIPE_FORMAT_R8_SNORM:
return V_0280A0_COLOR_8;
@@ -397,6 +412,7 @@ static INLINE uint32_t r600_translate_colorformat(enum pipe_format format)
return V_0280A0_COLOR_16;
case PIPE_FORMAT_L8A8_UNORM:
+ case PIPE_FORMAT_L8A8_SRGB:
case PIPE_FORMAT_R8G8_UNORM:
return V_0280A0_COLOR_8_8;
@@ -423,7 +439,7 @@ static INLINE uint32_t r600_translate_colorformat(enum pipe_format format)
case PIPE_FORMAT_R10G10B10X2_SNORM:
case PIPE_FORMAT_B10G10R10A2_UNORM:
case PIPE_FORMAT_R10SG10SB10SA2U_NORM:
- return V_0280A0_COLOR_10_10_10_2;
+ return V_0280A0_COLOR_2_10_10_10;
case PIPE_FORMAT_Z24X8_UNORM:
case PIPE_FORMAT_Z24_UNORM_S8_USCALED:
@@ -469,6 +485,9 @@ static INLINE uint32_t r600_translate_colorformat(enum pipe_format format)
return V_0280A0_COLOR_32_32_32_FLOAT;
case PIPE_FORMAT_R32G32B32A32_FLOAT:
return V_0280A0_COLOR_32_32_32_32_FLOAT;
+ case PIPE_FORMAT_R32G32B32A32_SNORM:
+ case PIPE_FORMAT_R32G32B32A32_UNORM:
+ return V_0280A0_COLOR_32_32_32_32;
/* YUV buffers. */
case PIPE_FORMAT_UYVY:
@@ -479,9 +498,9 @@ static INLINE uint32_t r600_translate_colorformat(enum pipe_format format)
}
}
-static INLINE boolean r600_is_sampler_format_supported(enum pipe_format format)
+static INLINE boolean r600_is_sampler_format_supported(struct pipe_screen *screen, enum pipe_format format)
{
- return r600_translate_texformat(format, NULL, NULL, NULL) != ~0;
+ return r600_translate_texformat(screen, format, NULL, NULL, NULL) != ~0;
}
static INLINE boolean r600_is_colorbuffer_format_supported(enum pipe_format format)
@@ -495,21 +514,13 @@ static INLINE boolean r600_is_zs_format_supported(enum pipe_format format)
return r600_translate_dbformat(format) != ~0;
}
-static INLINE boolean r600_is_vertex_format_supported(enum pipe_format format)
+static INLINE boolean r600_is_vertex_format_supported(enum pipe_format format,
+ enum radeon_family family)
{
- return r600_translate_colorformat(format) != ~0;
-}
-
-static INLINE uint32_t r600_translate_vertex_data_type(enum pipe_format format)
-{
- uint32_t result = 0;
- const struct util_format_description *desc;
unsigned i;
-
- desc = util_format_description(format);
- if (desc->layout != UTIL_FORMAT_LAYOUT_PLAIN) {
- goto out_unknown;
- }
+ const struct util_format_description *desc = util_format_description(format);
+ if (!desc)
+ return FALSE;
/* Find the first non-VOID channel. */
for (i = 0; i < 4; i++) {
@@ -517,122 +528,23 @@ static INLINE uint32_t r600_translate_vertex_data_type(enum pipe_format format)
break;
}
}
-
- switch (desc->channel[i].type) {
- /* Half-floats, floats, doubles */
- case UTIL_FORMAT_TYPE_FLOAT:
- switch (desc->channel[i].size) {
- case 16:
- switch (desc->nr_channels) {
- case 1:
- result = FMT_16_FLOAT;
- break;
- case 2:
- result = FMT_16_16_FLOAT;
- break;
- case 3:
- result = FMT_16_16_16_FLOAT;
- break;
- case 4:
- result = FMT_16_16_16_16_FLOAT;
- break;
- }
- break;
- case 32:
- switch (desc->nr_channels) {
- case 1:
- result = FMT_32_FLOAT;
- break;
- case 2:
- result = FMT_32_32_FLOAT;
- break;
- case 3:
- result = FMT_32_32_32_FLOAT;
- break;
- case 4:
- result = FMT_32_32_32_32_FLOAT;
- break;
- }
- break;
- default:
- goto out_unknown;
- }
- break;
- /* Unsigned ints */
- case UTIL_FORMAT_TYPE_UNSIGNED:
- /* Signed ints */
- case UTIL_FORMAT_TYPE_SIGNED:
- switch (desc->channel[i].size) {
- case 8:
- switch (desc->nr_channels) {
- case 1:
- result = FMT_8;
- break;
- case 2:
- result = FMT_8_8;
- break;
- case 3:
- // result = FMT_8_8_8; /* fails piglit draw-vertices test */
- // break;
- case 4:
- result = FMT_8_8_8_8;
- break;
- }
- break;
- case 16:
- switch (desc->nr_channels) {
- case 1:
- result = FMT_16;
- break;
- case 2:
- result = FMT_16_16;
- break;
- case 3:
- // result = FMT_16_16_16; /* fails piglit draw-vertices test */
- // break;
- case 4:
- result = FMT_16_16_16_16;
- break;
- }
- break;
- case 32:
- switch (desc->nr_channels) {
- case 1:
- result = FMT_32;
- break;
- case 2:
- result = FMT_32_32;
- break;
- case 3:
- result = FMT_32_32_32;
- break;
- case 4:
- result = FMT_32_32_32_32;
- break;
- }
- break;
- default:
- goto out_unknown;
- }
- break;
- default:
- goto out_unknown;
- }
-
- result = S_038008_DATA_FORMAT(result);
-
- if (desc->channel[i].type == UTIL_FORMAT_TYPE_SIGNED) {
- result |= S_038008_FORMAT_COMP_ALL(1);
- }
- if (desc->channel[i].normalized) {
- result |= S_038008_NUM_FORMAT_ALL(0);
- } else {
- result |= S_038008_NUM_FORMAT_ALL(2);
- }
- return result;
-out_unknown:
- R600_ERR("unsupported vertex format %s\n", util_format_name(format));
- return ~0;
+ if (i == 4)
+ return FALSE;
+
+ /* No fixed, no double. */
+ if (desc->layout != UTIL_FORMAT_LAYOUT_PLAIN ||
+ desc->channel[i].type == UTIL_FORMAT_TYPE_FIXED ||
+ (desc->channel[i].size == 64 &&
+ desc->channel[i].type == UTIL_FORMAT_TYPE_FLOAT))
+ return FALSE;
+
+ /* No scaled/norm formats with 32 bits per channel. */
+ if (desc->channel[i].size == 32 &&
+ (desc->channel[i].type == UTIL_FORMAT_TYPE_SIGNED ||
+ desc->channel[i].type == UTIL_FORMAT_TYPE_UNSIGNED))
+ return FALSE;
+
+ return TRUE;
}
#endif
diff --git a/src/gallium/drivers/r600/r600_states_inc.h b/src/gallium/drivers/r600/r600_states_inc.h
deleted file mode 100644
index 1c8075ebdb5..00000000000
--- a/src/gallium/drivers/r600/r600_states_inc.h
+++ /dev/null
@@ -1,543 +0,0 @@
-/* This file is autogenerated from r600_states.h - do not edit directly */
-/* autogenerating script is gen_r600_states.py */
-
-/* R600_CONFIG */
-#define R600_CONFIG__SQ_CONFIG 0
-#define R600_CONFIG__SQ_GPR_RESOURCE_MGMT_1 1
-#define R600_CONFIG__SQ_GPR_RESOURCE_MGMT_2 2
-#define R600_CONFIG__SQ_THREAD_RESOURCE_MGMT 3
-#define R600_CONFIG__SQ_STACK_RESOURCE_MGMT_1 4
-#define R600_CONFIG__SQ_STACK_RESOURCE_MGMT_2 5
-#define R600_CONFIG__SQ_DYN_GPR_CNTL_PS_FLUSH_REQ 6
-#define R600_CONFIG__TA_CNTL_AUX 7
-#define R600_CONFIG__VC_ENHANCE 8
-#define R600_CONFIG__DB_DEBUG 9
-#define R600_CONFIG__DB_WATERMARKS 10
-#define R600_CONFIG__SX_MISC 11
-#define R600_CONFIG__SPI_THREAD_GROUPING 12
-#define R600_CONFIG__SQ_ESGS_RING_ITEMSIZE 13
-#define R600_CONFIG__SQ_GSVS_RING_ITEMSIZE 14
-#define R600_CONFIG__SQ_ESTMP_RING_ITEMSIZE 15
-#define R600_CONFIG__SQ_GSTMP_RING_ITEMSIZE 16
-#define R600_CONFIG__SQ_VSTMP_RING_ITEMSIZE 17
-#define R600_CONFIG__SQ_PSTMP_RING_ITEMSIZE 18
-#define R600_CONFIG__SQ_FBUF_RING_ITEMSIZE 19
-#define R600_CONFIG__SQ_REDUC_RING_ITEMSIZE 20
-#define R600_CONFIG__SQ_GS_VERT_ITEMSIZE 21
-#define R600_CONFIG__VGT_OUTPUT_PATH_CNTL 22
-#define R600_CONFIG__VGT_HOS_CNTL 23
-#define R600_CONFIG__VGT_HOS_MAX_TESS_LEVEL 24
-#define R600_CONFIG__VGT_HOS_MIN_TESS_LEVEL 25
-#define R600_CONFIG__VGT_HOS_REUSE_DEPTH 26
-#define R600_CONFIG__VGT_GROUP_PRIM_TYPE 27
-#define R600_CONFIG__VGT_GROUP_FIRST_DECR 28
-#define R600_CONFIG__VGT_GROUP_DECR 29
-#define R600_CONFIG__VGT_GROUP_VECT_0_CNTL 30
-#define R600_CONFIG__VGT_GROUP_VECT_1_CNTL 31
-#define R600_CONFIG__VGT_GROUP_VECT_0_FMT_CNTL 32
-#define R600_CONFIG__VGT_GROUP_VECT_1_FMT_CNTL 33
-#define R600_CONFIG__VGT_GS_MODE 34
-#define R600_CONFIG__PA_SC_MODE_CNTL 35
-#define R600_CONFIG__VGT_STRMOUT_EN 36
-#define R600_CONFIG__VGT_REUSE_OFF 37
-#define R600_CONFIG__VGT_VTX_CNT_EN 38
-#define R600_CONFIG__VGT_STRMOUT_BUFFER_EN 39
-#define R600_CONFIG_SIZE 40
-#define R600_CONFIG_PM4 128
-
-/* R600_CB_CNTL */
-#define R600_CB_CNTL__CB_CLEAR_RED 0
-#define R600_CB_CNTL__CB_CLEAR_GREEN 1
-#define R600_CB_CNTL__CB_CLEAR_BLUE 2
-#define R600_CB_CNTL__CB_CLEAR_ALPHA 3
-#define R600_CB_CNTL__CB_SHADER_MASK 4
-#define R600_CB_CNTL__CB_TARGET_MASK 5
-#define R600_CB_CNTL__CB_FOG_RED 6
-#define R600_CB_CNTL__CB_FOG_GREEN 7
-#define R600_CB_CNTL__CB_FOG_BLUE 8
-#define R600_CB_CNTL__CB_COLOR_CONTROL 9
-#define R600_CB_CNTL__PA_SC_AA_CONFIG 10
-#define R600_CB_CNTL__PA_SC_AA_SAMPLE_LOCS_MCTX 11
-#define R600_CB_CNTL__PA_SC_AA_SAMPLE_LOCS_8S_WD1_MCTX 12
-#define R600_CB_CNTL__CB_CLRCMP_CONTROL 13
-#define R600_CB_CNTL__CB_CLRCMP_SRC 14
-#define R600_CB_CNTL__CB_CLRCMP_DST 15
-#define R600_CB_CNTL__CB_CLRCMP_MSK 16
-#define R600_CB_CNTL__PA_SC_AA_MASK 17
-#define R600_CB_CNTL__CB_SHADER_CONTROL 18
-#define R600_CB_CNTL_SIZE 19
-#define R600_CB_CNTL_PM4 128
-
-/* R600_RASTERIZER */
-#define R600_RASTERIZER__SPI_INTERP_CONTROL_0 0
-#define R600_RASTERIZER__PA_CL_CLIP_CNTL 1
-#define R600_RASTERIZER__PA_SU_SC_MODE_CNTL 2
-#define R600_RASTERIZER__PA_CL_VS_OUT_CNTL 3
-#define R600_RASTERIZER__PA_CL_NANINF_CNTL 4
-#define R600_RASTERIZER__PA_SU_POINT_SIZE 5
-#define R600_RASTERIZER__PA_SU_POINT_MINMAX 6
-#define R600_RASTERIZER__PA_SU_LINE_CNTL 7
-#define R600_RASTERIZER__PA_SC_LINE_STIPPLE 8
-#define R600_RASTERIZER__PA_SC_MPASS_PS_CNTL 9
-#define R600_RASTERIZER__PA_SC_LINE_CNTL 10
-#define R600_RASTERIZER__PA_CL_GB_VERT_CLIP_ADJ 11
-#define R600_RASTERIZER__PA_CL_GB_VERT_DISC_ADJ 12
-#define R600_RASTERIZER__PA_CL_GB_HORZ_CLIP_ADJ 13
-#define R600_RASTERIZER__PA_CL_GB_HORZ_DISC_ADJ 14
-#define R600_RASTERIZER__PA_SU_POLY_OFFSET_DB_FMT_CNTL 15
-#define R600_RASTERIZER__PA_SU_POLY_OFFSET_CLAMP 16
-#define R600_RASTERIZER__PA_SU_POLY_OFFSET_FRONT_SCALE 17
-#define R600_RASTERIZER__PA_SU_POLY_OFFSET_FRONT_OFFSET 18
-#define R600_RASTERIZER__PA_SU_POLY_OFFSET_BACK_SCALE 19
-#define R600_RASTERIZER__PA_SU_POLY_OFFSET_BACK_OFFSET 20
-#define R600_RASTERIZER_SIZE 21
-#define R600_RASTERIZER_PM4 128
-
-/* R600_VIEWPORT */
-#define R600_VIEWPORT__PA_SC_VPORT_ZMIN_0 0
-#define R600_VIEWPORT__PA_SC_VPORT_ZMAX_0 1
-#define R600_VIEWPORT__PA_CL_VPORT_XSCALE_0 2
-#define R600_VIEWPORT__PA_CL_VPORT_YSCALE_0 3
-#define R600_VIEWPORT__PA_CL_VPORT_ZSCALE_0 4
-#define R600_VIEWPORT__PA_CL_VPORT_XOFFSET_0 5
-#define R600_VIEWPORT__PA_CL_VPORT_YOFFSET_0 6
-#define R600_VIEWPORT__PA_CL_VPORT_ZOFFSET_0 7
-#define R600_VIEWPORT__PA_CL_VTE_CNTL 8
-#define R600_VIEWPORT_SIZE 9
-#define R600_VIEWPORT_PM4 128
-
-/* R600_SCISSOR */
-#define R600_SCISSOR__PA_SC_SCREEN_SCISSOR_TL 0
-#define R600_SCISSOR__PA_SC_SCREEN_SCISSOR_BR 1
-#define R600_SCISSOR__PA_SC_WINDOW_OFFSET 2
-#define R600_SCISSOR__PA_SC_WINDOW_SCISSOR_TL 3
-#define R600_SCISSOR__PA_SC_WINDOW_SCISSOR_BR 4
-#define R600_SCISSOR__PA_SC_CLIPRECT_RULE 5
-#define R600_SCISSOR__PA_SC_CLIPRECT_0_TL 6
-#define R600_SCISSOR__PA_SC_CLIPRECT_0_BR 7
-#define R600_SCISSOR__PA_SC_CLIPRECT_1_TL 8
-#define R600_SCISSOR__PA_SC_CLIPRECT_1_BR 9
-#define R600_SCISSOR__PA_SC_CLIPRECT_2_TL 10
-#define R600_SCISSOR__PA_SC_CLIPRECT_2_BR 11
-#define R600_SCISSOR__PA_SC_CLIPRECT_3_TL 12
-#define R600_SCISSOR__PA_SC_CLIPRECT_3_BR 13
-#define R600_SCISSOR__PA_SC_EDGERULE 14
-#define R600_SCISSOR__PA_SC_GENERIC_SCISSOR_TL 15
-#define R600_SCISSOR__PA_SC_GENERIC_SCISSOR_BR 16
-#define R600_SCISSOR__PA_SC_VPORT_SCISSOR_0_TL 17
-#define R600_SCISSOR__PA_SC_VPORT_SCISSOR_0_BR 18
-#define R600_SCISSOR_SIZE 19
-#define R600_SCISSOR_PM4 128
-
-/* R600_BLEND */
-#define R600_BLEND__CB_BLEND_RED 0
-#define R600_BLEND__CB_BLEND_GREEN 1
-#define R600_BLEND__CB_BLEND_BLUE 2
-#define R600_BLEND__CB_BLEND_ALPHA 3
-#define R600_BLEND__CB_BLEND0_CONTROL 4
-#define R600_BLEND__CB_BLEND1_CONTROL 5
-#define R600_BLEND__CB_BLEND2_CONTROL 6
-#define R600_BLEND__CB_BLEND3_CONTROL 7
-#define R600_BLEND__CB_BLEND4_CONTROL 8
-#define R600_BLEND__CB_BLEND5_CONTROL 9
-#define R600_BLEND__CB_BLEND6_CONTROL 10
-#define R600_BLEND__CB_BLEND7_CONTROL 11
-#define R600_BLEND__CB_BLEND_CONTROL 12
-#define R600_BLEND_SIZE 13
-#define R600_BLEND_PM4 128
-
-/* R600_DSA */
-#define R600_DSA__DB_STENCIL_CLEAR 0
-#define R600_DSA__DB_DEPTH_CLEAR 1
-#define R600_DSA__SX_ALPHA_TEST_CONTROL 2
-#define R600_DSA__DB_STENCILREFMASK 3
-#define R600_DSA__DB_STENCILREFMASK_BF 4
-#define R600_DSA__SX_ALPHA_REF 5
-#define R600_DSA__SPI_FOG_FUNC_SCALE 6
-#define R600_DSA__SPI_FOG_FUNC_BIAS 7
-#define R600_DSA__SPI_FOG_CNTL 8
-#define R600_DSA__DB_DEPTH_CONTROL 9
-#define R600_DSA__DB_SHADER_CONTROL 10
-#define R600_DSA__DB_RENDER_CONTROL 11
-#define R600_DSA__DB_RENDER_OVERRIDE 12
-#define R600_DSA__DB_SRESULTS_COMPARE_STATE1 13
-#define R600_DSA__DB_PRELOAD_CONTROL 14
-#define R600_DSA__DB_ALPHA_TO_MASK 15
-#define R600_DSA_SIZE 16
-#define R600_DSA_PM4 128
-
-/* R600_VS_SHADER */
-#define R600_VS_SHADER__SQ_VTX_SEMANTIC_0 0
-#define R600_VS_SHADER__SQ_VTX_SEMANTIC_1 1
-#define R600_VS_SHADER__SQ_VTX_SEMANTIC_2 2
-#define R600_VS_SHADER__SQ_VTX_SEMANTIC_3 3
-#define R600_VS_SHADER__SQ_VTX_SEMANTIC_4 4
-#define R600_VS_SHADER__SQ_VTX_SEMANTIC_5 5
-#define R600_VS_SHADER__SQ_VTX_SEMANTIC_6 6
-#define R600_VS_SHADER__SQ_VTX_SEMANTIC_7 7
-#define R600_VS_SHADER__SQ_VTX_SEMANTIC_8 8
-#define R600_VS_SHADER__SQ_VTX_SEMANTIC_9 9
-#define R600_VS_SHADER__SQ_VTX_SEMANTIC_10 10
-#define R600_VS_SHADER__SQ_VTX_SEMANTIC_11 11
-#define R600_VS_SHADER__SQ_VTX_SEMANTIC_12 12
-#define R600_VS_SHADER__SQ_VTX_SEMANTIC_13 13
-#define R600_VS_SHADER__SQ_VTX_SEMANTIC_14 14
-#define R600_VS_SHADER__SQ_VTX_SEMANTIC_15 15
-#define R600_VS_SHADER__SQ_VTX_SEMANTIC_16 16
-#define R600_VS_SHADER__SQ_VTX_SEMANTIC_17 17
-#define R600_VS_SHADER__SQ_VTX_SEMANTIC_18 18
-#define R600_VS_SHADER__SQ_VTX_SEMANTIC_19 19
-#define R600_VS_SHADER__SQ_VTX_SEMANTIC_20 20
-#define R600_VS_SHADER__SQ_VTX_SEMANTIC_21 21
-#define R600_VS_SHADER__SQ_VTX_SEMANTIC_22 22
-#define R600_VS_SHADER__SQ_VTX_SEMANTIC_23 23
-#define R600_VS_SHADER__SQ_VTX_SEMANTIC_24 24
-#define R600_VS_SHADER__SQ_VTX_SEMANTIC_25 25
-#define R600_VS_SHADER__SQ_VTX_SEMANTIC_26 26
-#define R600_VS_SHADER__SQ_VTX_SEMANTIC_27 27
-#define R600_VS_SHADER__SQ_VTX_SEMANTIC_28 28
-#define R600_VS_SHADER__SQ_VTX_SEMANTIC_29 29
-#define R600_VS_SHADER__SQ_VTX_SEMANTIC_30 30
-#define R600_VS_SHADER__SQ_VTX_SEMANTIC_31 31
-#define R600_VS_SHADER__SPI_VS_OUT_ID_0 32
-#define R600_VS_SHADER__SPI_VS_OUT_ID_1 33
-#define R600_VS_SHADER__SPI_VS_OUT_ID_2 34
-#define R600_VS_SHADER__SPI_VS_OUT_ID_3 35
-#define R600_VS_SHADER__SPI_VS_OUT_ID_4 36
-#define R600_VS_SHADER__SPI_VS_OUT_ID_5 37
-#define R600_VS_SHADER__SPI_VS_OUT_ID_6 38
-#define R600_VS_SHADER__SPI_VS_OUT_ID_7 39
-#define R600_VS_SHADER__SPI_VS_OUT_ID_8 40
-#define R600_VS_SHADER__SPI_VS_OUT_ID_9 41
-#define R600_VS_SHADER__SPI_VS_OUT_CONFIG 42
-#define R600_VS_SHADER__SQ_PGM_START_VS 43
-#define R600_VS_SHADER__SQ_PGM_RESOURCES_VS 44
-#define R600_VS_SHADER__SQ_PGM_START_FS 45
-#define R600_VS_SHADER__SQ_PGM_RESOURCES_FS 46
-#define R600_VS_SHADER__SQ_PGM_CF_OFFSET_VS 47
-#define R600_VS_SHADER__SQ_PGM_CF_OFFSET_FS 48
-#define R600_VS_SHADER_SIZE 49
-#define R600_VS_SHADER_PM4 128
-
-/* R600_PS_SHADER */
-#define R600_PS_SHADER__SPI_PS_INPUT_CNTL_0 0
-#define R600_PS_SHADER__SPI_PS_INPUT_CNTL_1 1
-#define R600_PS_SHADER__SPI_PS_INPUT_CNTL_2 2
-#define R600_PS_SHADER__SPI_PS_INPUT_CNTL_3 3
-#define R600_PS_SHADER__SPI_PS_INPUT_CNTL_4 4
-#define R600_PS_SHADER__SPI_PS_INPUT_CNTL_5 5
-#define R600_PS_SHADER__SPI_PS_INPUT_CNTL_6 6
-#define R600_PS_SHADER__SPI_PS_INPUT_CNTL_7 7
-#define R600_PS_SHADER__SPI_PS_INPUT_CNTL_8 8
-#define R600_PS_SHADER__SPI_PS_INPUT_CNTL_9 9
-#define R600_PS_SHADER__SPI_PS_INPUT_CNTL_10 10
-#define R600_PS_SHADER__SPI_PS_INPUT_CNTL_11 11
-#define R600_PS_SHADER__SPI_PS_INPUT_CNTL_12 12
-#define R600_PS_SHADER__SPI_PS_INPUT_CNTL_13 13
-#define R600_PS_SHADER__SPI_PS_INPUT_CNTL_14 14
-#define R600_PS_SHADER__SPI_PS_INPUT_CNTL_15 15
-#define R600_PS_SHADER__SPI_PS_INPUT_CNTL_16 16
-#define R600_PS_SHADER__SPI_PS_INPUT_CNTL_17 17
-#define R600_PS_SHADER__SPI_PS_INPUT_CNTL_18 18
-#define R600_PS_SHADER__SPI_PS_INPUT_CNTL_19 19
-#define R600_PS_SHADER__SPI_PS_INPUT_CNTL_20 20
-#define R600_PS_SHADER__SPI_PS_INPUT_CNTL_21 21
-#define R600_PS_SHADER__SPI_PS_INPUT_CNTL_22 22
-#define R600_PS_SHADER__SPI_PS_INPUT_CNTL_23 23
-#define R600_PS_SHADER__SPI_PS_INPUT_CNTL_24 24
-#define R600_PS_SHADER__SPI_PS_INPUT_CNTL_25 25
-#define R600_PS_SHADER__SPI_PS_INPUT_CNTL_26 26
-#define R600_PS_SHADER__SPI_PS_INPUT_CNTL_27 27
-#define R600_PS_SHADER__SPI_PS_INPUT_CNTL_28 28
-#define R600_PS_SHADER__SPI_PS_INPUT_CNTL_29 29
-#define R600_PS_SHADER__SPI_PS_INPUT_CNTL_30 30
-#define R600_PS_SHADER__SPI_PS_INPUT_CNTL_31 31
-#define R600_PS_SHADER__SPI_PS_IN_CONTROL_0 32
-#define R600_PS_SHADER__SPI_PS_IN_CONTROL_1 33
-#define R600_PS_SHADER__SPI_INPUT_Z 34
-#define R600_PS_SHADER__SQ_PGM_START_PS 35
-#define R600_PS_SHADER__SQ_PGM_RESOURCES_PS 36
-#define R600_PS_SHADER__SQ_PGM_EXPORTS_PS 37
-#define R600_PS_SHADER__SQ_PGM_CF_OFFSET_PS 38
-#define R600_PS_SHADER_SIZE 39
-#define R600_PS_SHADER_PM4 128
-
-/* R600_VS_CBUF */
-#define R600_VS_CBUF__ALU_CONST_BUFFER_SIZE_VS_0 0
-#define R600_VS_CBUF__ALU_CONST_CACHE_VS_0 1
-#define R600_VS_CBUF_SIZE 2
-#define R600_VS_CBUF_PM4 128
-
-/* R600_PS_CBUF */
-#define R600_PS_CBUF__ALU_CONST_BUFFER_SIZE_PS_0 0
-#define R600_PS_CBUF__ALU_CONST_CACHE_PS_0 1
-#define R600_PS_CBUF_SIZE 2
-#define R600_PS_CBUF_PM4 128
-
-/* R600_PS_CONSTANT */
-#define R600_PS_CONSTANT__SQ_ALU_CONSTANT0_0 0
-#define R600_PS_CONSTANT__SQ_ALU_CONSTANT1_0 1
-#define R600_PS_CONSTANT__SQ_ALU_CONSTANT2_0 2
-#define R600_PS_CONSTANT__SQ_ALU_CONSTANT3_0 3
-#define R600_PS_CONSTANT_SIZE 4
-#define R600_PS_CONSTANT_PM4 128
-
-/* R600_VS_CONSTANT */
-#define R600_VS_CONSTANT__SQ_ALU_CONSTANT0_256 0
-#define R600_VS_CONSTANT__SQ_ALU_CONSTANT1_256 1
-#define R600_VS_CONSTANT__SQ_ALU_CONSTANT2_256 2
-#define R600_VS_CONSTANT__SQ_ALU_CONSTANT3_256 3
-#define R600_VS_CONSTANT_SIZE 4
-#define R600_VS_CONSTANT_PM4 128
-
-/* R600_UCP */
-#define R600_UCP__PA_CL_UCP0_X 0
-#define R600_UCP__PA_CL_UCP0_Y 1
-#define R600_UCP__PA_CL_UCP0_Z 2
-#define R600_UCP__PA_CL_UCP0_W 3
-#define R600_UCP__PA_CL_UCP1_X 4
-#define R600_UCP__PA_CL_UCP1_Y 5
-#define R600_UCP__PA_CL_UCP1_Z 6
-#define R600_UCP__PA_CL_UCP1_W 7
-#define R600_UCP__PA_CL_UCP2_X 8
-#define R600_UCP__PA_CL_UCP2_Y 9
-#define R600_UCP__PA_CL_UCP2_Z 10
-#define R600_UCP__PA_CL_UCP2_W 11
-#define R600_UCP__PA_CL_UCP3_X 12
-#define R600_UCP__PA_CL_UCP3_Y 13
-#define R600_UCP__PA_CL_UCP3_Z 14
-#define R600_UCP__PA_CL_UCP3_W 15
-#define R600_UCP__PA_CL_UCP4_X 16
-#define R600_UCP__PA_CL_UCP4_Y 17
-#define R600_UCP__PA_CL_UCP4_Z 18
-#define R600_UCP__PA_CL_UCP4_W 19
-#define R600_UCP__PA_CL_UCP5_X 20
-#define R600_UCP__PA_CL_UCP5_Y 21
-#define R600_UCP__PA_CL_UCP5_Z 22
-#define R600_UCP__PA_CL_UCP5_W 23
-#define R600_UCP_SIZE 24
-#define R600_UCP_PM4 128
-
-/* R600_PS_RESOURCE */
-#define R600_PS_RESOURCE__RESOURCE0_WORD0 0
-#define R600_PS_RESOURCE__RESOURCE0_WORD1 1
-#define R600_PS_RESOURCE__RESOURCE0_WORD2 2
-#define R600_PS_RESOURCE__RESOURCE0_WORD3 3
-#define R600_PS_RESOURCE__RESOURCE0_WORD4 4
-#define R600_PS_RESOURCE__RESOURCE0_WORD5 5
-#define R600_PS_RESOURCE__RESOURCE0_WORD6 6
-#define R600_PS_RESOURCE_SIZE 7
-#define R600_PS_RESOURCE_PM4 128
-
-/* R600_VS_RESOURCE */
-#define R600_VS_RESOURCE__RESOURCE160_WORD0 0
-#define R600_VS_RESOURCE__RESOURCE160_WORD1 1
-#define R600_VS_RESOURCE__RESOURCE160_WORD2 2
-#define R600_VS_RESOURCE__RESOURCE160_WORD3 3
-#define R600_VS_RESOURCE__RESOURCE160_WORD4 4
-#define R600_VS_RESOURCE__RESOURCE160_WORD5 5
-#define R600_VS_RESOURCE__RESOURCE160_WORD6 6
-#define R600_VS_RESOURCE_SIZE 7
-#define R600_VS_RESOURCE_PM4 128
-
-/* R600_FS_RESOURCE */
-#define R600_FS_RESOURCE__RESOURCE320_WORD0 0
-#define R600_FS_RESOURCE__RESOURCE320_WORD1 1
-#define R600_FS_RESOURCE__RESOURCE320_WORD2 2
-#define R600_FS_RESOURCE__RESOURCE320_WORD3 3
-#define R600_FS_RESOURCE__RESOURCE320_WORD4 4
-#define R600_FS_RESOURCE__RESOURCE320_WORD5 5
-#define R600_FS_RESOURCE__RESOURCE320_WORD6 6
-#define R600_FS_RESOURCE_SIZE 7
-#define R600_FS_RESOURCE_PM4 128
-
-/* R600_GS_RESOURCE */
-#define R600_GS_RESOURCE__RESOURCE336_WORD0 0
-#define R600_GS_RESOURCE__RESOURCE336_WORD1 1
-#define R600_GS_RESOURCE__RESOURCE336_WORD2 2
-#define R600_GS_RESOURCE__RESOURCE336_WORD3 3
-#define R600_GS_RESOURCE__RESOURCE336_WORD4 4
-#define R600_GS_RESOURCE__RESOURCE336_WORD5 5
-#define R600_GS_RESOURCE__RESOURCE336_WORD6 6
-#define R600_GS_RESOURCE_SIZE 7
-#define R600_GS_RESOURCE_PM4 128
-
-/* R600_PS_SAMPLER */
-#define R600_PS_SAMPLER__SQ_TEX_SAMPLER_WORD0_0 0
-#define R600_PS_SAMPLER__SQ_TEX_SAMPLER_WORD1_0 1
-#define R600_PS_SAMPLER__SQ_TEX_SAMPLER_WORD2_0 2
-#define R600_PS_SAMPLER_SIZE 3
-#define R600_PS_SAMPLER_PM4 128
-
-/* R600_VS_SAMPLER */
-#define R600_VS_SAMPLER__SQ_TEX_SAMPLER_WORD0_18 0
-#define R600_VS_SAMPLER__SQ_TEX_SAMPLER_WORD1_18 1
-#define R600_VS_SAMPLER__SQ_TEX_SAMPLER_WORD2_18 2
-#define R600_VS_SAMPLER_SIZE 3
-#define R600_VS_SAMPLER_PM4 128
-
-/* R600_GS_SAMPLER */
-#define R600_GS_SAMPLER__SQ_TEX_SAMPLER_WORD0_36 0
-#define R600_GS_SAMPLER__SQ_TEX_SAMPLER_WORD1_36 1
-#define R600_GS_SAMPLER__SQ_TEX_SAMPLER_WORD2_36 2
-#define R600_GS_SAMPLER_SIZE 3
-#define R600_GS_SAMPLER_PM4 128
-
-/* R600_PS_SAMPLER_BORDER */
-#define R600_PS_SAMPLER_BORDER__TD_PS_SAMPLER0_BORDER_RED 0
-#define R600_PS_SAMPLER_BORDER__TD_PS_SAMPLER0_BORDER_GREEN 1
-#define R600_PS_SAMPLER_BORDER__TD_PS_SAMPLER0_BORDER_BLUE 2
-#define R600_PS_SAMPLER_BORDER__TD_PS_SAMPLER0_BORDER_ALPHA 3
-#define R600_PS_SAMPLER_BORDER_SIZE 4
-#define R600_PS_SAMPLER_BORDER_PM4 128
-
-/* R600_VS_SAMPLER_BORDER */
-#define R600_VS_SAMPLER_BORDER__TD_VS_SAMPLER0_BORDER_RED 0
-#define R600_VS_SAMPLER_BORDER__TD_VS_SAMPLER0_BORDER_GREEN 1
-#define R600_VS_SAMPLER_BORDER__TD_VS_SAMPLER0_BORDER_BLUE 2
-#define R600_VS_SAMPLER_BORDER__TD_VS_SAMPLER0_BORDER_ALPHA 3
-#define R600_VS_SAMPLER_BORDER_SIZE 4
-#define R600_VS_SAMPLER_BORDER_PM4 128
-
-/* R600_GS_SAMPLER_BORDER */
-#define R600_GS_SAMPLER_BORDER__TD_GS_SAMPLER0_BORDER_RED 0
-#define R600_GS_SAMPLER_BORDER__TD_GS_SAMPLER0_BORDER_GREEN 1
-#define R600_GS_SAMPLER_BORDER__TD_GS_SAMPLER0_BORDER_BLUE 2
-#define R600_GS_SAMPLER_BORDER__TD_GS_SAMPLER0_BORDER_ALPHA 3
-#define R600_GS_SAMPLER_BORDER_SIZE 4
-#define R600_GS_SAMPLER_BORDER_PM4 128
-
-/* R600_CB0 */
-#define R600_CB0__CB_COLOR0_BASE 0
-#define R600_CB0__CB_COLOR0_INFO 1
-#define R600_CB0__CB_COLOR0_SIZE 2
-#define R600_CB0__CB_COLOR0_VIEW 3
-#define R600_CB0__CB_COLOR0_FRAG 4
-#define R600_CB0__CB_COLOR0_TILE 5
-#define R600_CB0__CB_COLOR0_MASK 6
-#define R600_CB0_SIZE 7
-#define R600_CB0_PM4 128
-
-/* R600_CB1 */
-#define R600_CB1__CB_COLOR1_BASE 0
-#define R600_CB1__CB_COLOR1_INFO 1
-#define R600_CB1__CB_COLOR1_SIZE 2
-#define R600_CB1__CB_COLOR1_VIEW 3
-#define R600_CB1__CB_COLOR1_FRAG 4
-#define R600_CB1__CB_COLOR1_TILE 5
-#define R600_CB1__CB_COLOR1_MASK 6
-#define R600_CB1_SIZE 7
-#define R600_CB1_PM4 128
-
-/* R600_CB2 */
-#define R600_CB2__CB_COLOR2_BASE 0
-#define R600_CB2__CB_COLOR2_INFO 1
-#define R600_CB2__CB_COLOR2_SIZE 2
-#define R600_CB2__CB_COLOR2_VIEW 3
-#define R600_CB2__CB_COLOR2_FRAG 4
-#define R600_CB2__CB_COLOR2_TILE 5
-#define R600_CB2__CB_COLOR2_MASK 6
-#define R600_CB2_SIZE 7
-#define R600_CB2_PM4 128
-
-/* R600_CB3 */
-#define R600_CB3__CB_COLOR3_BASE 0
-#define R600_CB3__CB_COLOR3_INFO 1
-#define R600_CB3__CB_COLOR3_SIZE 2
-#define R600_CB3__CB_COLOR3_VIEW 3
-#define R600_CB3__CB_COLOR3_FRAG 4
-#define R600_CB3__CB_COLOR3_TILE 5
-#define R600_CB3__CB_COLOR3_MASK 6
-#define R600_CB3_SIZE 7
-#define R600_CB3_PM4 128
-
-/* R600_CB4 */
-#define R600_CB4__CB_COLOR4_BASE 0
-#define R600_CB4__CB_COLOR4_INFO 1
-#define R600_CB4__CB_COLOR4_SIZE 2
-#define R600_CB4__CB_COLOR4_VIEW 3
-#define R600_CB4__CB_COLOR4_FRAG 4
-#define R600_CB4__CB_COLOR4_TILE 5
-#define R600_CB4__CB_COLOR4_MASK 6
-#define R600_CB4_SIZE 7
-#define R600_CB4_PM4 128
-
-/* R600_CB5 */
-#define R600_CB5__CB_COLOR5_BASE 0
-#define R600_CB5__CB_COLOR5_INFO 1
-#define R600_CB5__CB_COLOR5_SIZE 2
-#define R600_CB5__CB_COLOR5_VIEW 3
-#define R600_CB5__CB_COLOR5_FRAG 4
-#define R600_CB5__CB_COLOR5_TILE 5
-#define R600_CB5__CB_COLOR5_MASK 6
-#define R600_CB5_SIZE 7
-#define R600_CB5_PM4 128
-
-/* R600_CB6 */
-#define R600_CB6__CB_COLOR6_BASE 0
-#define R600_CB6__CB_COLOR6_INFO 1
-#define R600_CB6__CB_COLOR6_SIZE 2
-#define R600_CB6__CB_COLOR6_VIEW 3
-#define R600_CB6__CB_COLOR6_FRAG 4
-#define R600_CB6__CB_COLOR6_TILE 5
-#define R600_CB6__CB_COLOR6_MASK 6
-#define R600_CB6_SIZE 7
-#define R600_CB6_PM4 128
-
-/* R600_CB7 */
-#define R600_CB7__CB_COLOR7_BASE 0
-#define R600_CB7__CB_COLOR7_INFO 1
-#define R600_CB7__CB_COLOR7_SIZE 2
-#define R600_CB7__CB_COLOR7_VIEW 3
-#define R600_CB7__CB_COLOR7_FRAG 4
-#define R600_CB7__CB_COLOR7_TILE 5
-#define R600_CB7__CB_COLOR7_MASK 6
-#define R600_CB7_SIZE 7
-#define R600_CB7_PM4 128
-
-/* R600_DB */
-#define R600_DB__DB_DEPTH_BASE 0
-#define R600_DB__DB_DEPTH_SIZE 1
-#define R600_DB__DB_DEPTH_VIEW 2
-#define R600_DB__DB_DEPTH_INFO 3
-#define R600_DB__DB_HTILE_SURFACE 4
-#define R600_DB__DB_PREFETCH_LIMIT 5
-#define R600_DB_SIZE 6
-#define R600_DB_PM4 128
-
-/* R600_VGT */
-#define R600_VGT__VGT_PRIMITIVE_TYPE 0
-#define R600_VGT__VGT_MAX_VTX_INDX 1
-#define R600_VGT__VGT_MIN_VTX_INDX 2
-#define R600_VGT__VGT_INDX_OFFSET 3
-#define R600_VGT__VGT_MULTI_PRIM_IB_RESET_INDX 4
-#define R600_VGT__VGT_DMA_INDEX_TYPE 5
-#define R600_VGT__VGT_PRIMITIVEID_EN 6
-#define R600_VGT__VGT_DMA_NUM_INSTANCES 7
-#define R600_VGT__VGT_MULTI_PRIM_IB_RESET_EN 8
-#define R600_VGT__VGT_INSTANCE_STEP_RATE_0 9
-#define R600_VGT__VGT_INSTANCE_STEP_RATE_1 10
-#define R600_VGT_SIZE 11
-#define R600_VGT_PM4 128
-
-/* R600_DRAW */
-#define R600_DRAW__VGT_NUM_INDICES 0
-#define R600_DRAW__VGT_DMA_BASE_HI 1
-#define R600_DRAW__VGT_DMA_BASE 2
-#define R600_DRAW__VGT_DRAW_INITIATOR 3
-#define R600_DRAW_SIZE 4
-#define R600_DRAW_PM4 128
-
-/* R600_VGT_EVENT */
-#define R600_VGT_EVENT__VGT_EVENT_INITIATOR 0
-#define R600_VGT_EVENT_SIZE 1
-#define R600_VGT_EVENT_PM4 128
-
-/* R600_CB_FLUSH */
-#define R600_CB_FLUSH_SIZE 0
-#define R600_CB_FLUSH_PM4 128
-
-/* R600_DB_FLUSH */
-#define R600_DB_FLUSH_SIZE 0
-#define R600_DB_FLUSH_PM4 128
-
diff --git a/src/gallium/drivers/r600/r600_texture.c b/src/gallium/drivers/r600/r600_texture.c
index d4d9b07c0e8..dc351bfb62d 100644
--- a/src/gallium/drivers/r600/r600_texture.c
+++ b/src/gallium/drivers/r600/r600_texture.c
@@ -27,6 +27,7 @@
#include <errno.h>
#include <pipe/p_screen.h>
#include <util/u_format.h>
+#include <util/u_format_s3tc.h>
#include <util/u_math.h>
#include <util/u_inlines.h>
#include <util/u_memory.h>
@@ -38,8 +39,6 @@
#include "r600d.h"
#include "r600_formats.h"
-extern struct u_resource_vtbl r600_texture_vtbl;
-
/* Copy from a full GPU texture to a transfer's staging one. */
static void r600_copy_to_staging_texture(struct pipe_context *ctx, struct r600_transfer *rtransfer)
{
@@ -69,7 +68,7 @@ static void r600_copy_from_staging_texture(struct pipe_context *ctx, struct r600
rtransfer->staging_texture,
0, &sbox);
- ctx->flush(ctx, 0, NULL);
+ ctx->flush(ctx, NULL);
}
unsigned r600_texture_get_offset(struct r600_resource_texture *rtex,
@@ -77,17 +76,15 @@ unsigned r600_texture_get_offset(struct r600_resource_texture *rtex,
{
unsigned offset = rtex->offset[level];
- switch (rtex->resource.base.b.target) {
+ switch (rtex->resource.b.b.b.target) {
case PIPE_TEXTURE_3D:
case PIPE_TEXTURE_CUBE:
- return offset + layer * rtex->layer_size[level];
default:
- assert(layer == 0);
- return offset;
+ return offset + layer * rtex->layer_size[level];
}
}
-static unsigned r600_get_pixel_alignment(struct pipe_screen *screen,
+static unsigned r600_get_block_alignment(struct pipe_screen *screen,
enum pipe_format format,
unsigned array_mode)
{
@@ -105,6 +102,9 @@ static unsigned r600_get_pixel_alignment(struct pipe_screen *screen,
(((rscreen->tiling_info->group_bytes / 8 / pixsize)) *
rscreen->tiling_info->num_banks)) * 8;
break;
+ case V_038000_ARRAY_LINEAR_ALIGNED:
+ p_align = MAX2(64, rscreen->tiling_info->group_bytes / pixsize);
+ break;
case V_038000_ARRAY_LINEAR_GENERAL:
default:
p_align = rscreen->tiling_info->group_bytes / pixsize;
@@ -124,8 +124,10 @@ static unsigned r600_get_height_alignment(struct pipe_screen *screen,
h_align = rscreen->tiling_info->num_channels * 8;
break;
case V_038000_ARRAY_1D_TILED_THIN1:
+ case V_038000_ARRAY_LINEAR_ALIGNED:
h_align = 8;
break;
+ case V_038000_ARRAY_LINEAR_GENERAL:
default:
h_align = 1;
break;
@@ -139,7 +141,7 @@ static unsigned r600_get_base_alignment(struct pipe_screen *screen,
{
struct r600_screen* rscreen = (struct r600_screen *)screen;
unsigned pixsize = util_format_get_blocksize(format);
- int p_align = r600_get_pixel_alignment(screen, format, array_mode);
+ int p_align = r600_get_block_alignment(screen, format, array_mode);
int h_align = r600_get_height_alignment(screen, array_mode);
int b_align;
@@ -149,6 +151,8 @@ static unsigned r600_get_base_alignment(struct pipe_screen *screen,
p_align * pixsize * h_align);
break;
case V_038000_ARRAY_1D_TILED_THIN1:
+ case V_038000_ARRAY_LINEAR_ALIGNED:
+ case V_038000_ARRAY_LINEAR_GENERAL:
default:
b_align = rscreen->tiling_info->group_bytes;
break;
@@ -165,55 +169,46 @@ static unsigned mip_minify(unsigned size, unsigned level)
return val;
}
-static unsigned r600_texture_get_stride(struct pipe_screen *screen,
- struct r600_resource_texture *rtex,
- unsigned level)
+static unsigned r600_texture_get_nblocksx(struct pipe_screen *screen,
+ struct r600_resource_texture *rtex,
+ unsigned level)
{
- struct pipe_resource *ptex = &rtex->resource.base.b;
- unsigned width, stride, tile_width;
+ struct pipe_resource *ptex = &rtex->resource.b.b.b;
+ unsigned nblocksx, block_align, width;
+ unsigned blocksize = util_format_get_blocksize(ptex->format);
if (rtex->pitch_override)
- return rtex->pitch_override;
+ return rtex->pitch_override / blocksize;
width = mip_minify(ptex->width0, level);
- if (util_format_is_plain(ptex->format)) {
- tile_width = r600_get_pixel_alignment(screen, ptex->format,
- rtex->array_mode[level]);
- width = align(width, tile_width);
- }
- stride = util_format_get_stride(ptex->format, width);
+ nblocksx = util_format_get_nblocksx(ptex->format, width);
- return stride;
+ block_align = r600_get_block_alignment(screen, ptex->format,
+ rtex->array_mode[level]);
+ nblocksx = align(nblocksx, block_align);
+ return nblocksx;
}
static unsigned r600_texture_get_nblocksy(struct pipe_screen *screen,
struct r600_resource_texture *rtex,
unsigned level)
{
- struct pipe_resource *ptex = &rtex->resource.base.b;
+ struct pipe_resource *ptex = &rtex->resource.b.b.b;
unsigned height, tile_height;
height = mip_minify(ptex->height0, level);
- if (util_format_is_plain(ptex->format)) {
- tile_height = r600_get_height_alignment(screen,
- rtex->array_mode[level]);
- height = align(height, tile_height);
- }
- return util_format_get_nblocksy(ptex->format, height);
-}
-
-/* Get a width in pixels from a stride in bytes. */
-static unsigned pitch_to_width(enum pipe_format format, unsigned pitch_in_bytes)
-{
- return (pitch_in_bytes / util_format_get_blocksize(format)) *
- util_format_get_blockwidth(format);
+ height = util_format_get_nblocksy(ptex->format, height);
+ tile_height = r600_get_height_alignment(screen,
+ rtex->array_mode[level]);
+ height = align(height, tile_height);
+ return height;
}
static void r600_texture_set_array_mode(struct pipe_screen *screen,
struct r600_resource_texture *rtex,
unsigned level, unsigned array_mode)
{
- struct pipe_resource *ptex = &rtex->resource.base.b;
+ struct pipe_resource *ptex = &rtex->resource.b.b.b;
switch (array_mode) {
case V_0280A0_ARRAY_LINEAR_GENERAL:
@@ -227,11 +222,11 @@ static void r600_texture_set_array_mode(struct pipe_screen *screen,
unsigned w, h, tile_height, tile_width;
tile_height = r600_get_height_alignment(screen, array_mode);
- tile_width = r600_get_pixel_alignment(screen, ptex->format, array_mode);
+ tile_width = r600_get_block_alignment(screen, ptex->format, array_mode);
w = mip_minify(ptex->width0, level);
h = mip_minify(ptex->height0, level);
- if (w < tile_width || h < tile_height)
+ if (w <= tile_width || h <= tile_height)
rtex->array_mode[level] = V_0280A0_ARRAY_1D_TILED_THIN1;
else
rtex->array_mode[level] = array_mode;
@@ -244,40 +239,119 @@ static void r600_setup_miptree(struct pipe_screen *screen,
struct r600_resource_texture *rtex,
unsigned array_mode)
{
- struct pipe_resource *ptex = &rtex->resource.base.b;
+ struct pipe_resource *ptex = &rtex->resource.b.b.b;
struct radeon *radeon = (struct radeon *)screen->winsys;
enum chip_class chipc = r600_get_family_class(radeon);
- unsigned pitch, size, layer_size, i, offset;
- unsigned nblocksy;
+ unsigned size, layer_size, i, offset;
+ unsigned nblocksx, nblocksy;
for (i = 0, offset = 0; i <= ptex->last_level; i++) {
+ unsigned blocksize = util_format_get_blocksize(ptex->format);
+
r600_texture_set_array_mode(screen, rtex, i, array_mode);
- pitch = r600_texture_get_stride(screen, rtex, i);
+ nblocksx = r600_texture_get_nblocksx(screen, rtex, i);
nblocksy = r600_texture_get_nblocksy(screen, rtex, i);
- layer_size = pitch * nblocksy;
-
+ layer_size = nblocksx * nblocksy * blocksize;
if (ptex->target == PIPE_TEXTURE_CUBE) {
if (chipc >= R700)
size = layer_size * 8;
else
size = layer_size * 6;
}
- else
+ else if (ptex->target == PIPE_TEXTURE_3D)
size = layer_size * u_minify(ptex->depth0, i);
+ else
+ size = layer_size * ptex->array_size;
+
/* align base image and start of miptree */
if ((i == 0) || (i == 1))
offset = align(offset, r600_get_base_alignment(screen, ptex->format, array_mode));
rtex->offset[i] = offset;
rtex->layer_size[i] = layer_size;
- rtex->pitch_in_bytes[i] = pitch;
- rtex->pitch_in_pixels[i] = pitch_to_width(ptex->format, pitch);
+ rtex->pitch_in_blocks[i] = nblocksx; /* CB talks in elements */
+ rtex->pitch_in_bytes[i] = nblocksx * blocksize;
+
offset += size;
}
rtex->size = offset;
}
+/* Figure out whether u_blitter will fallback to a transfer operation.
+ * If so, don't use a staging resource.
+ */
+static boolean permit_hardware_blit(struct pipe_screen *screen,
+ const struct pipe_resource *res)
+{
+ unsigned bind;
+
+ if (util_format_is_depth_or_stencil(res->format))
+ bind = PIPE_BIND_DEPTH_STENCIL;
+ else
+ bind = PIPE_BIND_RENDER_TARGET;
+
+ /* hackaround for S3TC */
+ if (util_format_is_compressed(res->format))
+ return TRUE;
+
+ if (!screen->is_format_supported(screen,
+ res->format,
+ res->target,
+ res->nr_samples,
+ bind))
+ return FALSE;
+
+ if (!screen->is_format_supported(screen,
+ res->format,
+ res->target,
+ res->nr_samples,
+ PIPE_BIND_SAMPLER_VIEW))
+ return FALSE;
+
+ return TRUE;
+}
+
+static boolean r600_texture_get_handle(struct pipe_screen* screen,
+ struct pipe_resource *ptex,
+ struct winsys_handle *whandle)
+{
+ struct r600_resource_texture *rtex = (struct r600_resource_texture*)ptex;
+ struct r600_resource *resource = &rtex->resource;
+ struct radeon *radeon = (struct radeon *)screen->winsys;
+
+ return r600_bo_get_winsys_handle(radeon, resource->bo,
+ rtex->pitch_in_bytes[0], whandle);
+}
+
+static void r600_texture_destroy(struct pipe_screen *screen,
+ struct pipe_resource *ptex)
+{
+ struct r600_resource_texture *rtex = (struct r600_resource_texture*)ptex;
+ struct r600_resource *resource = &rtex->resource;
+ struct radeon *radeon = (struct radeon *)screen->winsys;
+
+ if (rtex->flushed_depth_texture)
+ pipe_resource_reference((struct pipe_resource **)&rtex->flushed_depth_texture, NULL);
+
+ if (resource->bo) {
+ r600_bo_reference(radeon, &resource->bo, NULL);
+ }
+ FREE(rtex);
+}
+
+static const struct u_resource_vtbl r600_texture_vtbl =
+{
+ r600_texture_get_handle, /* get_handle */
+ r600_texture_destroy, /* resource_destroy */
+ r600_texture_get_transfer, /* get_transfer */
+ r600_texture_transfer_destroy, /* transfer_destroy */
+ r600_texture_transfer_map, /* transfer_map */
+ u_default_transfer_flush_region,/* transfer_flush_region */
+ r600_texture_transfer_unmap, /* transfer_unmap */
+ u_default_transfer_inline_write /* transfer_inline_write */
+};
+
static struct r600_resource_texture *
r600_texture_create_object(struct pipe_screen *screen,
const struct pipe_resource *base,
@@ -295,21 +369,22 @@ r600_texture_create_object(struct pipe_screen *screen,
return NULL;
resource = &rtex->resource;
- resource->base.b = *base;
- resource->base.vtbl = &r600_texture_vtbl;
- pipe_reference_init(&resource->base.b.reference, 1);
- resource->base.b.screen = screen;
+ resource->b.b.b = *base;
+ resource->b.b.vtbl = &r600_texture_vtbl;
+ pipe_reference_init(&resource->b.b.b.reference, 1);
+ resource->b.b.b.screen = screen;
resource->bo = bo;
rtex->pitch_override = pitch_in_bytes_override;
+ /* only mark depth textures the HW can hit as depth textures */
+ if (util_format_is_depth_or_stencil(base->format) && permit_hardware_blit(screen, base))
+ rtex->depth = 1;
- if (array_mode)
- rtex->tiled = 1;
r600_setup_miptree(screen, rtex, array_mode);
resource->size = rtex->size;
if (!resource->bo) {
- struct pipe_resource *ptex = &rtex->resource.base.b;
+ struct pipe_resource *ptex = &rtex->resource.b.b.b;
int base_align = r600_get_base_alignment(screen, ptex->format, array_mode);
resource->bo = r600_bo(radeon, rtex->size, base_align, base->bind, base->usage);
@@ -329,56 +404,38 @@ struct pipe_resource *r600_texture_create(struct pipe_screen *screen,
/* Would like some magic "get_bool_option_once" routine.
*/
- if (force_tiling == -1)
- force_tiling = debug_get_bool_option("R600_FORCE_TILING", FALSE);
+ if (force_tiling == -1) {
+#if 0
+ /* reenable when 2D tiling is fixed better */
+ struct r600_screen *rscreen = (struct r600_screen *)screen;
+ if (r600_get_minor_version(rscreen->radeon) >= 9)
+ force_tiling = debug_get_bool_option("R600_TILING", TRUE);
+#endif
+ force_tiling = debug_get_bool_option("R600_TILING", FALSE);
+ }
- if (force_tiling) {
+ if (force_tiling && permit_hardware_blit(screen, templ)) {
if (!(templ->flags & R600_RESOURCE_FLAG_TRANSFER) &&
!(templ->bind & PIPE_BIND_SCANOUT)) {
array_mode = V_038000_ARRAY_2D_TILED_THIN1;
}
}
+ if (!(templ->flags & R600_RESOURCE_FLAG_TRANSFER) &&
+ util_format_is_compressed(templ->format))
+ array_mode = V_038000_ARRAY_1D_TILED_THIN1;
+
return (struct pipe_resource *)r600_texture_create_object(screen, templ, array_mode,
0, 0, NULL);
}
-static void r600_texture_destroy(struct pipe_screen *screen,
- struct pipe_resource *ptex)
-{
- struct r600_resource_texture *rtex = (struct r600_resource_texture*)ptex;
- struct r600_resource *resource = &rtex->resource;
- struct radeon *radeon = (struct radeon *)screen->winsys;
-
- if (rtex->flushed_depth_texture)
- pipe_resource_reference((struct pipe_resource **)&rtex->flushed_depth_texture, NULL);
-
- if (resource->bo) {
- r600_bo_reference(radeon, &resource->bo, NULL);
- }
- FREE(rtex);
-}
-
-static boolean r600_texture_get_handle(struct pipe_screen* screen,
- struct pipe_resource *ptex,
- struct winsys_handle *whandle)
-{
- struct r600_resource_texture *rtex = (struct r600_resource_texture*)ptex;
- struct r600_resource *resource = &rtex->resource;
- struct radeon *radeon = (struct radeon *)screen->winsys;
-
- return r600_bo_get_winsys_handle(radeon, resource->bo,
- rtex->pitch_in_bytes[0], whandle);
-}
-
static struct pipe_surface *r600_create_surface(struct pipe_context *pipe,
struct pipe_resource *texture,
const struct pipe_surface *surf_tmpl)
{
struct r600_resource_texture *rtex = (struct r600_resource_texture*)texture;
struct r600_surface *surface = CALLOC_STRUCT(r600_surface);
- unsigned tile_height;
unsigned level = surf_tmpl->u.tex.level;
assert(surf_tmpl->u.tex.first_layer == surf_tmpl->u.tex.last_layer);
@@ -398,8 +455,8 @@ static struct pipe_surface *r600_create_surface(struct pipe_context *pipe,
surface->base.u.tex.last_layer = surf_tmpl->u.tex.last_layer;
surface->base.u.tex.level = level;
- tile_height = r600_get_height_alignment(pipe->screen, rtex->array_mode[level]);
- surface->aligned_height = align(surface->base.height, tile_height);
+ surface->aligned_height = r600_texture_get_nblocksy(pipe->screen,
+ rtex, level);
return &surface->base;
}
@@ -435,18 +492,8 @@ struct pipe_resource *r600_texture_from_handle(struct pipe_screen *screen,
bo);
}
-static unsigned int r600_texture_is_referenced(struct pipe_context *context,
- struct pipe_resource *texture,
- unsigned level, int layer)
-{
- /* FIXME */
- return PIPE_REFERENCED_FOR_READ | PIPE_REFERENCED_FOR_WRITE;
-}
-
-int (*r600_blit_uncompress_depth_ptr)(struct pipe_context *ctx, struct r600_resource_texture *texture);
-
int r600_texture_depth_flush(struct pipe_context *ctx,
- struct pipe_resource *texture)
+ struct pipe_resource *texture, boolean just_create)
{
struct r600_resource_texture *rtex = (struct r600_resource_texture*)texture;
struct pipe_resource resource;
@@ -459,7 +506,8 @@ int r600_texture_depth_flush(struct pipe_context *ctx,
resource.width0 = texture->width0;
resource.height0 = texture->height0;
resource.depth0 = 1;
- resource.last_level = 0;
+ resource.array_size = 1;
+ resource.last_level = texture->last_level;
resource.nr_samples = 0;
resource.usage = PIPE_USAGE_DYNAMIC;
resource.bind = 0;
@@ -473,10 +521,14 @@ int r600_texture_depth_flush(struct pipe_context *ctx,
return -ENOMEM;
}
+ ((struct r600_resource_texture *)rtex->flushed_depth_texture)->is_flushing_texture = TRUE;
out:
+ if (just_create)
+ return 0;
+
/* XXX: only do this if the depth texture has actually changed:
*/
- r600_blit_uncompress_depth_ptr(ctx, rtex);
+ r600_blit_uncompress_depth(ctx, rtex);
return 0;
}
@@ -487,46 +539,6 @@ static INLINE unsigned u_box_volume( const struct pipe_box *box )
return box->width * box->depth * box->height;
};
-
-/* Figure out whether u_blitter will fallback to a transfer operation.
- * If so, don't use a staging resource.
- */
-static boolean permit_hardware_blit(struct pipe_screen *screen,
- struct pipe_resource *res)
-{
- unsigned bind;
-
- if (util_format_is_depth_or_stencil(res->format))
- bind = PIPE_BIND_DEPTH_STENCIL;
- else
- bind = PIPE_BIND_RENDER_TARGET;
-
- /* See r600_resource_copy_region: there is something wrong
- * with depth resource copies at the moment so avoid them for
- * now.
- */
- if (util_format_get_component_bits(res->format,
- UTIL_FORMAT_COLORSPACE_ZS,
- 0) != 0)
- return FALSE;
-
- if (!screen->is_format_supported(screen,
- res->format,
- res->target,
- res->nr_samples,
- bind, 0))
- return FALSE;
-
- if (!screen->is_format_supported(screen,
- res->format,
- res->target,
- res->nr_samples,
- PIPE_BIND_SAMPLER_VIEW, 0))
- return FALSE;
-
- return TRUE;
-}
-
struct pipe_transfer* r600_texture_get_transfer(struct pipe_context *ctx,
struct pipe_resource *texture,
unsigned level,
@@ -546,7 +558,7 @@ struct pipe_transfer* r600_texture_get_transfer(struct pipe_context *ctx,
* the CPU is much happier reading out of cached system memory
* than uncached VRAM.
*/
- if (rtex->tiled)
+ if (R600_TEX_IS_TILED(rtex, level))
use_staging_texture = TRUE;
if ((usage & PIPE_TRANSFER_READ) && u_box_volume(box) > 1024)
@@ -579,13 +591,16 @@ struct pipe_transfer* r600_texture_get_transfer(struct pipe_context *ctx,
*/
/* XXX: when discard is true, no need to read back from depth texture
*/
- r = r600_texture_depth_flush(ctx, texture);
+ r = r600_texture_depth_flush(ctx, texture, FALSE);
if (r < 0) {
R600_ERR("failed to create temporary texture to hold untiled copy\n");
pipe_resource_reference(&trans->transfer.resource, NULL);
FREE(trans);
return NULL;
}
+ trans->transfer.stride = rtex->flushed_depth_texture->pitch_in_bytes[level];
+ trans->offset = r600_texture_get_offset(rtex->flushed_depth_texture, level, box->z);
+ return &trans->transfer;
} else if (use_staging_texture) {
resource.target = PIPE_TEXTURE_2D;
resource.format = texture->format;
@@ -622,11 +637,12 @@ struct pipe_transfer* r600_texture_get_transfer(struct pipe_context *ctx,
if (usage & PIPE_TRANSFER_READ) {
r600_copy_to_staging_texture(ctx, trans);
/* Always referenced in the blit. */
- ctx->flush(ctx, 0, NULL);
+ ctx->flush(ctx, NULL);
}
return &trans->transfer;
}
trans->transfer.stride = rtex->pitch_in_bytes[level];
+ trans->transfer.layer_stride = rtex->layer_size[level];
trans->offset = r600_texture_get_offset(rtex, level, box->z);
return &trans->transfer;
}
@@ -635,7 +651,8 @@ void r600_texture_transfer_destroy(struct pipe_context *ctx,
struct pipe_transfer *transfer)
{
struct r600_transfer *rtransfer = (struct r600_transfer*)transfer;
- struct r600_resource_texture *rtex = (struct r600_resource_texture*)transfer->resource;
+ struct pipe_resource *texture = transfer->resource;
+ struct r600_resource_texture *rtex = (struct r600_resource_texture*)texture;
if (rtransfer->staging_texture) {
if (transfer->usage & PIPE_TRANSFER_WRITE) {
@@ -643,9 +660,12 @@ void r600_texture_transfer_destroy(struct pipe_context *ctx,
}
pipe_resource_reference(&rtransfer->staging_texture, NULL);
}
- if (rtex->flushed_depth_texture) {
- pipe_resource_reference((struct pipe_resource **)&rtex->flushed_depth_texture, NULL);
+
+ if (rtex->depth && !rtex->is_flushing_texture) {
+ if ((transfer->usage & PIPE_TRANSFER_WRITE) && rtex->flushed_depth_texture)
+ r600_blit_push_depth(ctx, rtex);
}
+
pipe_resource_reference(&transfer->resource, NULL);
FREE(transfer);
}
@@ -727,19 +747,6 @@ void r600_texture_transfer_unmap(struct pipe_context *ctx,
r600_bo_unmap(radeon, bo);
}
-struct u_resource_vtbl r600_texture_vtbl =
-{
- r600_texture_get_handle, /* get_handle */
- r600_texture_destroy, /* resource_destroy */
- r600_texture_is_referenced, /* is_resource_referenced */
- r600_texture_get_transfer, /* get_transfer */
- r600_texture_transfer_destroy, /* transfer_destroy */
- r600_texture_transfer_map, /* transfer_map */
- u_default_transfer_flush_region,/* transfer_flush_region */
- r600_texture_transfer_unmap, /* transfer_unmap */
- u_default_transfer_inline_write /* transfer_inline_write */
-};
-
void r600_init_surface_functions(struct r600_pipe_context *r600)
{
r600->context.create_surface = r600_create_surface;
@@ -795,13 +802,16 @@ static unsigned r600_get_swizzle_combined(const unsigned char *swizzle_format,
}
/* texture format translate */
-uint32_t r600_translate_texformat(enum pipe_format format,
- const unsigned char *swizzle_view,
+uint32_t r600_translate_texformat(struct pipe_screen *screen,
+ enum pipe_format format,
+ const unsigned char *swizzle_view,
uint32_t *word4_p, uint32_t *yuv_format_p)
{
uint32_t result = 0, word4 = 0, yuv_format = 0;
const struct util_format_description *desc;
boolean uniform = TRUE;
+ static int r600_enable_s3tc = -1;
+
int i;
const uint32_t sign_bit[4] = {
S_038010_FORMAT_COMP_X(V_038010_SQ_FORMAT_COMP_SIGNED),
@@ -850,37 +860,65 @@ uint32_t r600_translate_texformat(enum pipe_format format,
break;
}
goto out_unknown; /* TODO */
-
+
case UTIL_FORMAT_COLORSPACE_SRGB:
word4 |= S_038010_FORCE_DEGAMMA(1);
- if (format == PIPE_FORMAT_L8A8_SRGB || format == PIPE_FORMAT_L8_SRGB)
- goto out_unknown; /* fails for some reason - TODO */
break;
default:
break;
}
- /* S3TC formats. TODO */
- if (desc->layout == UTIL_FORMAT_LAYOUT_S3TC) {
- static int r600_enable_s3tc = -1;
+ if (r600_enable_s3tc == -1) {
+ struct r600_screen *rscreen = (struct r600_screen *)screen;
+ if (r600_get_minor_version(rscreen->radeon) >= 9)
+ r600_enable_s3tc = 1;
+ else
+ r600_enable_s3tc = debug_get_bool_option("R600_ENABLE_S3TC", FALSE);
+ }
+
+ if (desc->layout == UTIL_FORMAT_LAYOUT_RGTC) {
+ if (!r600_enable_s3tc)
+ goto out_unknown;
- if (r600_enable_s3tc == -1)
- r600_enable_s3tc =
- debug_get_bool_option("R600_ENABLE_S3TC", FALSE);
+ switch (format) {
+ case PIPE_FORMAT_RGTC1_SNORM:
+ word4 |= sign_bit[0];
+ case PIPE_FORMAT_RGTC1_UNORM:
+ result = FMT_BC4;
+ goto out_word4;
+ case PIPE_FORMAT_RGTC2_SNORM:
+ word4 |= sign_bit[0] | sign_bit[1];
+ case PIPE_FORMAT_RGTC2_UNORM:
+ result = FMT_BC5;
+ goto out_word4;
+ default:
+ goto out_unknown;
+ }
+ }
+
+ if (desc->layout == UTIL_FORMAT_LAYOUT_S3TC) {
if (!r600_enable_s3tc)
goto out_unknown;
+ if (!util_format_s3tc_enabled) {
+ goto out_unknown;
+ }
+
switch (format) {
case PIPE_FORMAT_DXT1_RGB:
case PIPE_FORMAT_DXT1_RGBA:
+ case PIPE_FORMAT_DXT1_SRGB:
+ case PIPE_FORMAT_DXT1_SRGBA:
result = FMT_BC1;
goto out_word4;
case PIPE_FORMAT_DXT3_RGBA:
+ case PIPE_FORMAT_DXT3_SRGBA:
result = FMT_BC2;
goto out_word4;
case PIPE_FORMAT_DXT5_RGBA:
+ case PIPE_FORMAT_DXT5_SRGBA:
result = FMT_BC3;
goto out_word4;
default:
@@ -889,7 +927,7 @@ uint32_t r600_translate_texformat(enum pipe_format format,
}
- for (i = 0; i < desc->nr_channels; i++) {
+ for (i = 0; i < desc->nr_channels; i++) {
if (desc->channel[i].type == UTIL_FORMAT_TYPE_SIGNED) {
word4 |= sign_bit[i];
}
@@ -897,13 +935,11 @@ uint32_t r600_translate_texformat(enum pipe_format format,
/* R8G8Bx_SNORM - TODO CxV8U8 */
- /* RGTC - TODO */
-
/* See whether the components are of the same size. */
for (i = 1; i < desc->nr_channels; i++) {
uniform = uniform && desc->channel[0].size == desc->channel[i].size;
}
-
+
/* Non-uniform formats. */
if (!uniform) {
switch(desc->nr_channels) {
@@ -927,7 +963,7 @@ uint32_t r600_translate_texformat(enum pipe_format format,
desc->channel[1].size == 10 &&
desc->channel[2].size == 10 &&
desc->channel[3].size == 2) {
- result = FMT_10_10_10_2;
+ result = FMT_2_10_10_10;
goto out_word4;
}
goto out_unknown;
@@ -990,6 +1026,19 @@ uint32_t r600_translate_texformat(enum pipe_format format,
result = FMT_16_16_16_16;
goto out_word4;
}
+ goto out_unknown;
+ case 32:
+ switch (desc->nr_channels) {
+ case 1:
+ result = FMT_32;
+ goto out_word4;
+ case 2:
+ result = FMT_32_32;
+ goto out_word4;
+ case 4:
+ result = FMT_32_32_32_32;
+ goto out_word4;
+ }
}
goto out_unknown;
@@ -1021,7 +1070,7 @@ uint32_t r600_translate_texformat(enum pipe_format format,
goto out_word4;
}
}
-
+
}
out_word4:
if (word4_p)
diff --git a/src/gallium/drivers/r600/r600_translate.c b/src/gallium/drivers/r600/r600_translate.c
index 1c227d32151..7482d15e12f 100644
--- a/src/gallium/drivers/r600/r600_translate.c
+++ b/src/gallium/drivers/r600/r600_translate.c
@@ -22,181 +22,34 @@
*
* Authors: Dave Airlie <airlied@redhat.com>
*/
-#include "translate/translate_cache.h"
-#include "translate/translate.h"
-#include <pipebuffer/pb_buffer.h>
+
#include <util/u_index_modify.h>
+#include "util/u_inlines.h"
+#include "util/u_upload_mgr.h"
#include "r600_pipe.h"
-void r600_begin_vertex_translate(struct r600_pipe_context *rctx)
-{
- struct pipe_context *pipe = &rctx->context;
- struct translate_key key = {0};
- struct translate_element *te;
- unsigned tr_elem_index[PIPE_MAX_ATTRIBS] = {0};
- struct translate *tr;
- struct r600_vertex_element *ve = rctx->vertex_elements;
- boolean vb_translated[PIPE_MAX_ATTRIBS] = {0};
- void *vb_map[PIPE_MAX_ATTRIBS] = {0}, *out_map;
- struct pipe_transfer *vb_transfer[PIPE_MAX_ATTRIBS] = {0}, *out_transfer;
- struct pipe_resource *out_buffer;
- unsigned i, num_verts;
- struct pipe_vertex_element new_velems[PIPE_MAX_ATTRIBS];
-
- /* Initialize the translate key, i.e. the recipe how vertices should be
- * translated. */
- for (i = 0; i < ve->count; i++) {
- struct pipe_vertex_buffer *vb =
- &rctx->vertex_buffer[ve->elements[i].vertex_buffer_index];
- enum pipe_format output_format = ve->hw_format[i];
- unsigned output_format_size = ve->hw_format_size[i];
-
- /* Check for support. */
- if (ve->elements[i].src_format == ve->hw_format[i]) {
- continue;
- }
-
- /* Workaround for translate: output floats instead of halfs. */
- switch (output_format) {
- case PIPE_FORMAT_R16_FLOAT:
- output_format = PIPE_FORMAT_R32_FLOAT;
- output_format_size = 4;
- break;
- case PIPE_FORMAT_R16G16_FLOAT:
- output_format = PIPE_FORMAT_R32G32_FLOAT;
- output_format_size = 8;
- break;
- case PIPE_FORMAT_R16G16B16_FLOAT:
- output_format = PIPE_FORMAT_R32G32B32_FLOAT;
- output_format_size = 12;
- break;
- case PIPE_FORMAT_R16G16B16A16_FLOAT:
- output_format = PIPE_FORMAT_R32G32B32A32_FLOAT;
- output_format_size = 16;
- break;
- default:;
- }
-
- /* Add this vertex element. */
- te = &key.element[key.nr_elements];
- /*te->type;
- te->instance_divisor;*/
- te->input_buffer = ve->elements[i].vertex_buffer_index;
- te->input_format = ve->elements[i].src_format;
- te->input_offset = vb->buffer_offset + ve->elements[i].src_offset;
- te->output_format = output_format;
- te->output_offset = key.output_stride;
-
- key.output_stride += output_format_size;
- vb_translated[ve->elements[i].vertex_buffer_index] = TRUE;
- tr_elem_index[i] = key.nr_elements;
- key.nr_elements++;
- }
-
- /* Get a translate object. */
- tr = translate_cache_find(rctx->tran.translate_cache, &key);
-
- /* Map buffers we want to translate. */
- for (i = 0; i < rctx->nvertex_buffer; i++) {
- if (vb_translated[i]) {
- struct pipe_vertex_buffer *vb = &rctx->vertex_buffer[i];
-
- vb_map[i] = pipe_buffer_map(pipe, vb->buffer,
- PIPE_TRANSFER_READ, &vb_transfer[i]);
-
- tr->set_buffer(tr, i, vb_map[i], vb->stride, vb->max_index);
- }
- }
-
- /* Create and map the output buffer. */
- num_verts = rctx->vb_max_index + 1;
-
- out_buffer = pipe_buffer_create(&rctx->screen->screen,
- PIPE_BIND_VERTEX_BUFFER,
- key.output_stride * num_verts);
-
- out_map = pipe_buffer_map(pipe, out_buffer, PIPE_TRANSFER_WRITE,
- &out_transfer);
-
- /* Translate. */
- tr->run(tr, 0, num_verts, 0, out_map);
-
- /* Unmap all buffers. */
- for (i = 0; i < rctx->nvertex_buffer; i++) {
- if (vb_translated[i]) {
- pipe_buffer_unmap(pipe, rctx->vertex_buffer[i].buffer,
- vb_transfer[i]);
- }
- }
-
- pipe_buffer_unmap(pipe, out_buffer, out_transfer);
-
- /* Setup the new vertex buffer in the first free slot. */
- for (i = 0; i < PIPE_MAX_ATTRIBS; i++) {
- struct pipe_vertex_buffer *vb = &rctx->vertex_buffer[i];
-
- if (!vb->buffer) {
- pipe_resource_reference(&vb->buffer, out_buffer);
- vb->buffer_offset = 0;
- vb->max_index = num_verts - 1;
- vb->stride = key.output_stride;
- rctx->tran.vb_slot = i;
- break;
- }
- }
-
- /* Save and replace vertex elements. */
- for (i = 0; i < ve->count; i++) {
- if (vb_translated[ve->elements[i].vertex_buffer_index]) {
- te = &key.element[tr_elem_index[i]];
- new_velems[i].instance_divisor = ve->elements[i].instance_divisor;
- new_velems[i].src_format = te->output_format;
- new_velems[i].src_offset = te->output_offset;
- new_velems[i].vertex_buffer_index = rctx->tran.vb_slot;
- } else {
- memcpy(&new_velems[i], &ve->elements[i],
- sizeof(struct pipe_vertex_element));
- }
- }
-
- rctx->tran.new_velems = pipe->create_vertex_elements_state(pipe, ve->count, new_velems);
- pipe->bind_vertex_elements_state(pipe, rctx->tran.new_velems);
-
- pipe_resource_reference(&out_buffer, NULL);
-}
-
-void r600_end_vertex_translate(struct r600_pipe_context *rctx)
-{
- struct pipe_context *pipe = &rctx->context;
-
- if (rctx->tran.new_velems == NULL) {
- return;
- }
- /* Restore vertex elements. */
- if (rctx->vertex_elements == rctx->tran.new_velems) {
- pipe->bind_vertex_elements_state(pipe, NULL);
- }
- pipe->delete_vertex_elements_state(pipe, rctx->tran.new_velems);
- rctx->tran.new_velems = NULL;
-
- /* Delete the now-unused VBO. */
- pipe_resource_reference(&rctx->vertex_buffer[rctx->tran.vb_slot].buffer,
- NULL);
-}
void r600_translate_index_buffer(struct r600_pipe_context *r600,
- struct pipe_resource **index_buffer,
- unsigned *index_size,
- unsigned *start, unsigned count)
+ struct pipe_resource **index_buffer,
+ unsigned *index_size,
+ unsigned *start, unsigned count)
{
+ struct pipe_resource *out_buffer = NULL;
+ unsigned out_offset;
+ void *ptr;
+ boolean flushed;
+
switch (*index_size) {
case 1:
- util_shorten_ubyte_elts(&r600->context, index_buffer, 0, *start, count);
+ u_upload_alloc(r600->vbuf_mgr->uploader, 0, count * 2,
+ &out_offset, &out_buffer, &flushed, &ptr);
+
+ util_shorten_ubyte_elts_to_userptr(
+ &r600->context, *index_buffer, 0, *start, count, ptr);
+
+ pipe_resource_reference(index_buffer, out_buffer);
*index_size = 2;
- *start = 0;
- break;
- case 2:
- case 4:
+ *start = out_offset / 2;
break;
}
}
diff --git a/src/gallium/drivers/r600/r600d.h b/src/gallium/drivers/r600/r600d.h
index ae19bfb8285..df70e2889e2 100644
--- a/src/gallium/drivers/r600/r600d.h
+++ b/src/gallium/drivers/r600/r600d.h
@@ -67,6 +67,10 @@
#define PKT3_SET_CTL_CONST 0x6F
#define PKT3_SURFACE_BASE_UPDATE 0x73
+#define PREDICATION_OP_CLEAR 0x0
+#define PREDICATION_OP_ZPASS 0x1
+#define PREDICATION_OP_PRIMCOUNT 0x2
+
#define PKT_TYPE_S(x) (((x) & 0x3) << 30)
#define PKT_TYPE_G(x) (((x) >> 30) & 0x3)
#define PKT_TYPE_C 0x3FFFFFFF
@@ -248,6 +252,8 @@
#define S_0280A0_SOURCE_FORMAT(x) (((x) & 0x1) << 27)
#define G_0280A0_SOURCE_FORMAT(x) (((x) >> 27) & 0x1)
#define C_0280A0_SOURCE_FORMAT 0xF7FFFFFF
+#define V_0280A0_EXPORT_FULL 0
+#define V_0280A0_EXPORT_NORM 1
#define R_028060_CB_COLOR0_SIZE 0x028060
#define S_028060_PITCH_TILE_MAX(x) (((x) & 0x3FF) << 0)
#define G_028060_PITCH_TILE_MAX(x) (((x) >> 0) & 0x3FF)
@@ -960,8 +966,8 @@
#define S_038010_SRF_MODE_ALL(x) (((x) & 0x1) << 10)
#define G_038010_SRF_MODE_ALL(x) (((x) >> 10) & 0x1)
#define C_038010_SRF_MODE_ALL 0xFFFFFBFF
-#define V_038010_SFR_MODE_ZERO_CLAMP_MINUS_ONE 0x00000000
-#define V_038010_SFR_MODE_NO_ZERO 0x00000001
+#define V_038010_SRF_MODE_ZERO_CLAMP_MINUS_ONE 0x00000000
+#define V_038010_SRF_MODE_NO_ZERO 0x00000001
#define S_038010_FORCE_DEGAMMA(x) (((x) & 0x1) << 11)
#define G_038010_FORCE_DEGAMMA(x) (((x) >> 11) & 0x1)
#define C_038010_FORCE_DEGAMMA 0xFFFFF7FF
@@ -2332,31 +2338,6 @@
#define R_0280D4_CB_COLOR5_TILE 0x0280D4
#define R_0280D8_CB_COLOR6_TILE 0x0280D8
#define R_0280DC_CB_COLOR7_TILE 0x0280DC
-#define R_028808_CB_COLOR_CONTROL 0x028808
-#define S_028808_FOG_ENABLE(x) (((x) & 0x1) << 0)
-#define G_028808_FOG_ENABLE(x) (((x) >> 0) & 0x1)
-#define C_028808_FOG_ENABLE 0xFFFFFFFE
-#define S_028808_MULTIWRITE_ENABLE(x) (((x) & 0x1) << 1)
-#define G_028808_MULTIWRITE_ENABLE(x) (((x) >> 1) & 0x1)
-#define C_028808_MULTIWRITE_ENABLE 0xFFFFFFFD
-#define S_028808_DITHER_ENABLE(x) (((x) & 0x1) << 2)
-#define G_028808_DITHER_ENABLE(x) (((x) >> 2) & 0x1)
-#define C_028808_DITHER_ENABLE 0xFFFFFFFB
-#define S_028808_DEGAMMA_ENABLE(x) (((x) & 0x1) << 3)
-#define G_028808_DEGAMMA_ENABLE(x) (((x) >> 3) & 0x1)
-#define C_028808_DEGAMMA_ENABLE 0xFFFFFFF7
-#define S_028808_SPECIAL_OP(x) (((x) & 0x7) << 4)
-#define G_028808_SPECIAL_OP(x) (((x) >> 4) & 0x7)
-#define C_028808_SPECIAL_OP 0xFFFFFF8F
-#define S_028808_PER_MRT_BLEND(x) (((x) & 0x1) << 7)
-#define G_028808_PER_MRT_BLEND(x) (((x) >> 7) & 0x1)
-#define C_028808_PER_MRT_BLEND 0xFFFFFF7F
-#define S_028808_TARGET_BLEND_ENABLE(x) (((x) & 0xFF) << 8)
-#define G_028808_TARGET_BLEND_ENABLE(x) (((x) >> 8) & 0xFF)
-#define C_028808_TARGET_BLEND_ENABLE 0xFFFF00FF
-#define S_028808_ROP3(x) (((x) & 0xFF) << 16)
-#define G_028808_ROP3(x) (((x) >> 16) & 0xFF)
-#define C_028808_ROP3 0xFF00FFFF
#define R_028614_SPI_VS_OUT_ID_0 0x028614
#define S_028614_SEMANTIC_0(x) (((x) & 0xFF) << 0)
#define G_028614_SEMANTIC_0(x) (((x) >> 0) & 0xFF)
diff --git a/src/gallium/drivers/r600/r700_asm.c b/src/gallium/drivers/r600/r700_asm.c
index 892dee86baf..b3c7d1494fc 100644
--- a/src/gallium/drivers/r600/r700_asm.c
+++ b/src/gallium/drivers/r600/r700_asm.c
@@ -26,11 +26,18 @@
#include "r600_asm.h"
#include "r700_sq.h"
+void r700_bc_cf_vtx_build(uint32_t *bytecode, const struct r600_bc_cf *cf)
+{
+ unsigned count = (cf->ndw / 4) - 1;
+ *bytecode++ = S_SQ_CF_WORD0_ADDR(cf->addr >> 1);
+ *bytecode++ = S_SQ_CF_WORD1_CF_INST(cf->inst) |
+ S_SQ_CF_WORD1_BARRIER(1) |
+ S_SQ_CF_WORD1_COUNT(count) |
+ S_SQ_CF_WORD1_COUNT_3(count >> 3);
+}
int r700_bc_alu_build(struct r600_bc *bc, struct r600_bc_alu *alu, unsigned id)
{
- unsigned i;
-
bc->bytecode[id++] = S_SQ_ALU_WORD0_SRC0_SEL(alu->src[0].sel) |
S_SQ_ALU_WORD0_SRC0_REL(alu->src[0].rel) |
S_SQ_ALU_WORD0_SRC0_CHAN(alu->src[0].chan) |
@@ -61,18 +68,11 @@ int r700_bc_alu_build(struct r600_bc *bc, struct r600_bc_alu *alu, unsigned id)
S_SQ_ALU_WORD1_OP2_SRC0_ABS(alu->src[0].abs) |
S_SQ_ALU_WORD1_OP2_SRC1_ABS(alu->src[1].abs) |
S_SQ_ALU_WORD1_OP2_WRITE_MASK(alu->dst.write) |
+ S_SQ_ALU_WORD1_OP2_OMOD(alu->omod) |
S_SQ_ALU_WORD1_OP2_ALU_INST(alu->inst) |
S_SQ_ALU_WORD1_BANK_SWIZZLE(alu->bank_swizzle) |
S_SQ_ALU_WORD1_OP2_UPDATE_EXECUTE_MASK(alu->predicate) |
S_SQ_ALU_WORD1_OP2_UPDATE_PRED(alu->predicate);
}
- if (alu->last) {
- if (alu->nliteral && !alu->literal_added) {
- R600_ERR("Bug in ALU processing for instruction 0x%08x, literal not added correctly\n", alu->inst);
- }
- for (i = 0; i < alu->nliteral; i++) {
- bc->bytecode[id++] = alu->value[i];
- }
- }
return 0;
}
diff --git a/src/gallium/drivers/rbug/rbug_context.c b/src/gallium/drivers/rbug/rbug_context.c
index 94e57e40f86..6e2d6ba1efa 100644
--- a/src/gallium/drivers/rbug/rbug_context.c
+++ b/src/gallium/drivers/rbug/rbug_context.c
@@ -44,7 +44,10 @@ rbug_destroy(struct pipe_context *_pipe)
struct pipe_context *pipe = rb_pipe->pipe;
remove_from_list(&rb_pipe->list);
+ pipe_mutex_lock(rb_pipe->call_mutex);
pipe->destroy(pipe);
+ rb_pipe->pipe = NULL;
+ pipe_mutex_unlock(rb_pipe->call_mutex);
FREE(rb_pipe);
}
@@ -112,7 +115,12 @@ rbug_draw_vbo(struct pipe_context *_pipe, const struct pipe_draw_info *info)
pipe_mutex_lock(rb_pipe->draw_mutex);
rbug_draw_block_locked(rb_pipe, RBUG_BLOCK_BEFORE);
- pipe->draw_vbo(pipe, info);
+ pipe_mutex_lock(rb_pipe->call_mutex);
+ if (!(rb_pipe->curr.fs && rb_pipe->curr.fs->disabled) &&
+ !(rb_pipe->curr.gs && rb_pipe->curr.gs->disabled) &&
+ !(rb_pipe->curr.vs && rb_pipe->curr.vs->disabled))
+ pipe->draw_vbo(pipe, info);
+ pipe_mutex_unlock(rb_pipe->call_mutex);
rbug_draw_block_locked(rb_pipe, RBUG_BLOCK_AFTER);
pipe_mutex_unlock(rb_pipe->draw_mutex);
@@ -125,8 +133,10 @@ rbug_create_query(struct pipe_context *_pipe,
struct rbug_context *rb_pipe = rbug_context(_pipe);
struct pipe_context *pipe = rb_pipe->pipe;
+ pipe_mutex_lock(rb_pipe->call_mutex);
return pipe->create_query(pipe,
query_type);
+ pipe_mutex_unlock(rb_pipe->call_mutex);
}
static void
@@ -136,8 +146,10 @@ rbug_destroy_query(struct pipe_context *_pipe,
struct rbug_context *rb_pipe = rbug_context(_pipe);
struct pipe_context *pipe = rb_pipe->pipe;
+ pipe_mutex_lock(rb_pipe->call_mutex);
pipe->destroy_query(pipe,
query);
+ pipe_mutex_unlock(rb_pipe->call_mutex);
}
static void
@@ -147,8 +159,10 @@ rbug_begin_query(struct pipe_context *_pipe,
struct rbug_context *rb_pipe = rbug_context(_pipe);
struct pipe_context *pipe = rb_pipe->pipe;
+ pipe_mutex_lock(rb_pipe->call_mutex);
pipe->begin_query(pipe,
query);
+ pipe_mutex_unlock(rb_pipe->call_mutex);
}
static void
@@ -158,8 +172,10 @@ rbug_end_query(struct pipe_context *_pipe,
struct rbug_context *rb_pipe = rbug_context(_pipe);
struct pipe_context *pipe = rb_pipe->pipe;
+ pipe_mutex_lock(rb_pipe->call_mutex);
pipe->end_query(pipe,
query);
+ pipe_mutex_unlock(rb_pipe->call_mutex);
}
static boolean
@@ -170,11 +186,16 @@ rbug_get_query_result(struct pipe_context *_pipe,
{
struct rbug_context *rb_pipe = rbug_context(_pipe);
struct pipe_context *pipe = rb_pipe->pipe;
+ boolean ret;
- return pipe->get_query_result(pipe,
- query,
- wait,
- result);
+ pipe_mutex_lock(rb_pipe->call_mutex);
+ ret = pipe->get_query_result(pipe,
+ query,
+ wait,
+ result);
+ pipe_mutex_unlock(rb_pipe->call_mutex);
+
+ return ret;
}
static void *
@@ -183,9 +204,14 @@ rbug_create_blend_state(struct pipe_context *_pipe,
{
struct rbug_context *rb_pipe = rbug_context(_pipe);
struct pipe_context *pipe = rb_pipe->pipe;
+ void *ret;
+
+ pipe_mutex_lock(rb_pipe->call_mutex);
+ ret = pipe->create_blend_state(pipe,
+ blend);
+ pipe_mutex_unlock(rb_pipe->call_mutex);
- return pipe->create_blend_state(pipe,
- blend);
+ return ret;
}
static void
@@ -195,8 +221,10 @@ rbug_bind_blend_state(struct pipe_context *_pipe,
struct rbug_context *rb_pipe = rbug_context(_pipe);
struct pipe_context *pipe = rb_pipe->pipe;
+ pipe_mutex_lock(rb_pipe->call_mutex);
pipe->bind_blend_state(pipe,
- blend);
+ blend);
+ pipe_mutex_unlock(rb_pipe->call_mutex);
}
static void
@@ -206,8 +234,10 @@ rbug_delete_blend_state(struct pipe_context *_pipe,
struct rbug_context *rb_pipe = rbug_context(_pipe);
struct pipe_context *pipe = rb_pipe->pipe;
+ pipe_mutex_lock(rb_pipe->call_mutex);
pipe->delete_blend_state(pipe,
blend);
+ pipe_mutex_unlock(rb_pipe->call_mutex);
}
static void *
@@ -216,9 +246,14 @@ rbug_create_sampler_state(struct pipe_context *_pipe,
{
struct rbug_context *rb_pipe = rbug_context(_pipe);
struct pipe_context *pipe = rb_pipe->pipe;
+ void *ret;
+
+ pipe_mutex_lock(rb_pipe->call_mutex);
+ ret = pipe->create_sampler_state(pipe,
+ sampler);
+ pipe_mutex_unlock(rb_pipe->call_mutex);
- return pipe->create_sampler_state(pipe,
- sampler);
+ return ret;
}
static void
@@ -229,9 +264,11 @@ rbug_bind_fragment_sampler_states(struct pipe_context *_pipe,
struct rbug_context *rb_pipe = rbug_context(_pipe);
struct pipe_context *pipe = rb_pipe->pipe;
+ pipe_mutex_lock(rb_pipe->call_mutex);
pipe->bind_fragment_sampler_states(pipe,
num_samplers,
samplers);
+ pipe_mutex_unlock(rb_pipe->call_mutex);
}
static void
@@ -242,9 +279,11 @@ rbug_bind_vertex_sampler_states(struct pipe_context *_pipe,
struct rbug_context *rb_pipe = rbug_context(_pipe);
struct pipe_context *pipe = rb_pipe->pipe;
+ pipe_mutex_lock(rb_pipe->call_mutex);
pipe->bind_vertex_sampler_states(pipe,
num_samplers,
samplers);
+ pipe_mutex_unlock(rb_pipe->call_mutex);
}
static void
@@ -254,8 +293,10 @@ rbug_delete_sampler_state(struct pipe_context *_pipe,
struct rbug_context *rb_pipe = rbug_context(_pipe);
struct pipe_context *pipe = rb_pipe->pipe;
+ pipe_mutex_lock(rb_pipe->call_mutex);
pipe->delete_sampler_state(pipe,
sampler);
+ pipe_mutex_unlock(rb_pipe->call_mutex);
}
static void *
@@ -264,9 +305,14 @@ rbug_create_rasterizer_state(struct pipe_context *_pipe,
{
struct rbug_context *rb_pipe = rbug_context(_pipe);
struct pipe_context *pipe = rb_pipe->pipe;
+ void *ret;
- return pipe->create_rasterizer_state(pipe,
- rasterizer);
+ pipe_mutex_lock(rb_pipe->call_mutex);
+ ret = pipe->create_rasterizer_state(pipe,
+ rasterizer);
+ pipe_mutex_unlock(rb_pipe->call_mutex);
+
+ return ret;
}
static void
@@ -276,8 +322,10 @@ rbug_bind_rasterizer_state(struct pipe_context *_pipe,
struct rbug_context *rb_pipe = rbug_context(_pipe);
struct pipe_context *pipe = rb_pipe->pipe;
+ pipe_mutex_lock(rb_pipe->call_mutex);
pipe->bind_rasterizer_state(pipe,
rasterizer);
+ pipe_mutex_unlock(rb_pipe->call_mutex);
}
static void
@@ -287,8 +335,10 @@ rbug_delete_rasterizer_state(struct pipe_context *_pipe,
struct rbug_context *rb_pipe = rbug_context(_pipe);
struct pipe_context *pipe = rb_pipe->pipe;
+ pipe_mutex_lock(rb_pipe->call_mutex);
pipe->delete_rasterizer_state(pipe,
rasterizer);
+ pipe_mutex_unlock(rb_pipe->call_mutex);
}
static void *
@@ -297,9 +347,14 @@ rbug_create_depth_stencil_alpha_state(struct pipe_context *_pipe,
{
struct rbug_context *rb_pipe = rbug_context(_pipe);
struct pipe_context *pipe = rb_pipe->pipe;
+ void *ret;
+
+ pipe_mutex_lock(rb_pipe->call_mutex);
+ ret = pipe->create_depth_stencil_alpha_state(pipe,
+ depth_stencil_alpha);
+ pipe_mutex_unlock(rb_pipe->call_mutex);
- return pipe->create_depth_stencil_alpha_state(pipe,
- depth_stencil_alpha);
+ return ret;
}
static void
@@ -309,8 +364,10 @@ rbug_bind_depth_stencil_alpha_state(struct pipe_context *_pipe,
struct rbug_context *rb_pipe = rbug_context(_pipe);
struct pipe_context *pipe = rb_pipe->pipe;
+ pipe_mutex_lock(rb_pipe->call_mutex);
pipe->bind_depth_stencil_alpha_state(pipe,
depth_stencil_alpha);
+ pipe_mutex_unlock(rb_pipe->call_mutex);
}
static void
@@ -320,8 +377,10 @@ rbug_delete_depth_stencil_alpha_state(struct pipe_context *_pipe,
struct rbug_context *rb_pipe = rbug_context(_pipe);
struct pipe_context *pipe = rb_pipe->pipe;
+ pipe_mutex_lock(rb_pipe->call_mutex);
pipe->delete_depth_stencil_alpha_state(pipe,
depth_stencil_alpha);
+ pipe_mutex_unlock(rb_pipe->call_mutex);
}
static void *
@@ -332,7 +391,10 @@ rbug_create_fs_state(struct pipe_context *_pipe,
struct pipe_context *pipe = rb_pipe->pipe;
void *result;
+ pipe_mutex_lock(rb_pipe->call_mutex);
result = pipe->create_fs_state(pipe, state);
+ pipe_mutex_unlock(rb_pipe->call_mutex);
+
if (!result)
return NULL;
@@ -347,10 +409,14 @@ rbug_bind_fs_state(struct pipe_context *_pipe,
struct pipe_context *pipe = rb_pipe->pipe;
void *fs;
+ pipe_mutex_lock(rb_pipe->call_mutex);
+
fs = rbug_shader_unwrap(_fs);
rb_pipe->curr.fs = rbug_shader(_fs);
pipe->bind_fs_state(pipe,
fs);
+
+ pipe_mutex_unlock(rb_pipe->call_mutex);
}
static void
@@ -360,7 +426,9 @@ rbug_delete_fs_state(struct pipe_context *_pipe,
struct rbug_context *rb_pipe = rbug_context(_pipe);
struct rbug_shader *rb_shader = rbug_shader(_fs);
+ pipe_mutex_lock(rb_pipe->call_mutex);
rbug_shader_destroy(rb_pipe, rb_shader);
+ pipe_mutex_unlock(rb_pipe->call_mutex);
}
static void *
@@ -371,7 +439,10 @@ rbug_create_vs_state(struct pipe_context *_pipe,
struct pipe_context *pipe = rb_pipe->pipe;
void *result;
+ pipe_mutex_lock(rb_pipe->call_mutex);
result = pipe->create_vs_state(pipe, state);
+ pipe_mutex_unlock(rb_pipe->call_mutex);
+
if (!result)
return NULL;
@@ -386,10 +457,14 @@ rbug_bind_vs_state(struct pipe_context *_pipe,
struct pipe_context *pipe = rb_pipe->pipe;
void *vs;
+ pipe_mutex_lock(rb_pipe->call_mutex);
+
vs = rbug_shader_unwrap(_vs);
rb_pipe->curr.vs = rbug_shader(_vs);
pipe->bind_vs_state(pipe,
vs);
+
+ pipe_mutex_unlock(rb_pipe->call_mutex);
}
static void
@@ -399,7 +474,9 @@ rbug_delete_vs_state(struct pipe_context *_pipe,
struct rbug_context *rb_pipe = rbug_context(_pipe);
struct rbug_shader *rb_shader = rbug_shader(_vs);
+ pipe_mutex_unlock(rb_pipe->call_mutex);
rbug_shader_destroy(rb_pipe, rb_shader);
+ pipe_mutex_unlock(rb_pipe->call_mutex);
}
static void *
@@ -410,7 +487,10 @@ rbug_create_gs_state(struct pipe_context *_pipe,
struct pipe_context *pipe = rb_pipe->pipe;
void *result;
+ pipe_mutex_lock(rb_pipe->call_mutex);
result = pipe->create_gs_state(pipe, state);
+ pipe_mutex_unlock(rb_pipe->call_mutex);
+
if (!result)
return NULL;
@@ -425,10 +505,14 @@ rbug_bind_gs_state(struct pipe_context *_pipe,
struct pipe_context *pipe = rb_pipe->pipe;
void *gs;
+ pipe_mutex_lock(rb_pipe->call_mutex);
+
gs = rbug_shader_unwrap(_gs);
rb_pipe->curr.gs = rbug_shader(_gs);
pipe->bind_gs_state(pipe,
gs);
+
+ pipe_mutex_unlock(rb_pipe->call_mutex);
}
static void
@@ -438,7 +522,9 @@ rbug_delete_gs_state(struct pipe_context *_pipe,
struct rbug_context *rb_pipe = rbug_context(_pipe);
struct rbug_shader *rb_shader = rbug_shader(_gs);
+ pipe_mutex_lock(rb_pipe->call_mutex);
rbug_shader_destroy(rb_pipe, rb_shader);
+ pipe_mutex_unlock(rb_pipe->call_mutex);
}
static void *
@@ -448,10 +534,15 @@ rbug_create_vertex_elements_state(struct pipe_context *_pipe,
{
struct rbug_context *rb_pipe = rbug_context(_pipe);
struct pipe_context *pipe = rb_pipe->pipe;
+ void *ret;
- return pipe->create_vertex_elements_state(pipe,
+ pipe_mutex_lock(rb_pipe->call_mutex);
+ ret = pipe->create_vertex_elements_state(pipe,
num_elements,
vertex_elements);
+ pipe_mutex_unlock(rb_pipe->call_mutex);
+
+ return ret;
}
static void
@@ -461,8 +552,10 @@ rbug_bind_vertex_elements_state(struct pipe_context *_pipe,
struct rbug_context *rb_pipe = rbug_context(_pipe);
struct pipe_context *pipe = rb_pipe->pipe;
+ pipe_mutex_lock(rb_pipe->call_mutex);
pipe->bind_vertex_elements_state(pipe,
velems);
+ pipe_mutex_unlock(rb_pipe->call_mutex);
}
static void
@@ -472,8 +565,10 @@ rbug_delete_vertex_elements_state(struct pipe_context *_pipe,
struct rbug_context *rb_pipe = rbug_context(_pipe);
struct pipe_context *pipe = rb_pipe->pipe;
+ pipe_mutex_lock(rb_pipe->call_mutex);
pipe->delete_vertex_elements_state(pipe,
velems);
+ pipe_mutex_unlock(rb_pipe->call_mutex);
}
static void
@@ -483,8 +578,10 @@ rbug_set_blend_color(struct pipe_context *_pipe,
struct rbug_context *rb_pipe = rbug_context(_pipe);
struct pipe_context *pipe = rb_pipe->pipe;
+ pipe_mutex_lock(rb_pipe->call_mutex);
pipe->set_blend_color(pipe,
blend_color);
+ pipe_mutex_unlock(rb_pipe->call_mutex);
}
static void
@@ -494,8 +591,10 @@ rbug_set_stencil_ref(struct pipe_context *_pipe,
struct rbug_context *rb_pipe = rbug_context(_pipe);
struct pipe_context *pipe = rb_pipe->pipe;
+ pipe_mutex_lock(rb_pipe->call_mutex);
pipe->set_stencil_ref(pipe,
stencil_ref);
+ pipe_mutex_unlock(rb_pipe->call_mutex);
}
static void
@@ -505,8 +604,10 @@ rbug_set_clip_state(struct pipe_context *_pipe,
struct rbug_context *rb_pipe = rbug_context(_pipe);
struct pipe_context *pipe = rb_pipe->pipe;
+ pipe_mutex_lock(rb_pipe->call_mutex);
pipe->set_clip_state(pipe,
clip);
+ pipe_mutex_unlock(rb_pipe->call_mutex);
}
static void
@@ -526,10 +627,12 @@ rbug_set_constant_buffer(struct pipe_context *_pipe,
resource = unwrapped_resource;
}
+ pipe_mutex_lock(rb_pipe->call_mutex);
pipe->set_constant_buffer(pipe,
shader,
index,
resource);
+ pipe_mutex_unlock(rb_pipe->call_mutex);
}
static void
@@ -542,8 +645,12 @@ rbug_set_framebuffer_state(struct pipe_context *_pipe,
struct pipe_framebuffer_state *state = NULL;
unsigned i;
+ /* must protect curr status */
+ pipe_mutex_lock(rb_pipe->call_mutex);
+
rb_pipe->curr.nr_cbufs = 0;
memset(rb_pipe->curr.cbufs, 0, sizeof(rb_pipe->curr.cbufs));
+ rb_pipe->curr.zsbuf = NULL;
/* unwrap the input state */
if (_state) {
@@ -556,11 +663,15 @@ rbug_set_framebuffer_state(struct pipe_context *_pipe,
rb_pipe->curr.cbufs[i] = rbug_resource(_state->cbufs[i]->texture);
}
unwrapped_state.zsbuf = rbug_surface_unwrap(_state->zsbuf);
+ if (_state->zsbuf)
+ rb_pipe->curr.zsbuf = rbug_resource(_state->zsbuf->texture);
state = &unwrapped_state;
}
pipe->set_framebuffer_state(pipe,
state);
+
+ pipe_mutex_unlock(rb_pipe->call_mutex);
}
static void
@@ -570,8 +681,10 @@ rbug_set_polygon_stipple(struct pipe_context *_pipe,
struct rbug_context *rb_pipe = rbug_context(_pipe);
struct pipe_context *pipe = rb_pipe->pipe;
+ pipe_mutex_lock(rb_pipe->call_mutex);
pipe->set_polygon_stipple(pipe,
poly_stipple);
+ pipe_mutex_unlock(rb_pipe->call_mutex);
}
static void
@@ -581,8 +694,10 @@ rbug_set_scissor_state(struct pipe_context *_pipe,
struct rbug_context *rb_pipe = rbug_context(_pipe);
struct pipe_context *pipe = rb_pipe->pipe;
+ pipe_mutex_lock(rb_pipe->call_mutex);
pipe->set_scissor_state(pipe,
scissor);
+ pipe_mutex_unlock(rb_pipe->call_mutex);
}
static void
@@ -592,8 +707,10 @@ rbug_set_viewport_state(struct pipe_context *_pipe,
struct rbug_context *rb_pipe = rbug_context(_pipe);
struct pipe_context *pipe = rb_pipe->pipe;
+ pipe_mutex_lock(rb_pipe->call_mutex);
pipe->set_viewport_state(pipe,
viewport);
+ pipe_mutex_unlock(rb_pipe->call_mutex);
}
static void
@@ -607,6 +724,9 @@ rbug_set_fragment_sampler_views(struct pipe_context *_pipe,
struct pipe_sampler_view **views = NULL;
unsigned i;
+ /* must protect curr status */
+ pipe_mutex_lock(rb_pipe->call_mutex);
+
rb_pipe->curr.num_fs_views = 0;
memset(rb_pipe->curr.fs_views, 0, sizeof(rb_pipe->curr.fs_views));
memset(rb_pipe->curr.fs_texs, 0, sizeof(rb_pipe->curr.fs_texs));
@@ -623,6 +743,8 @@ rbug_set_fragment_sampler_views(struct pipe_context *_pipe,
}
pipe->set_fragment_sampler_views(pipe, num, views);
+
+ pipe_mutex_unlock(rb_pipe->call_mutex);
}
static void
@@ -636,6 +758,9 @@ rbug_set_vertex_sampler_views(struct pipe_context *_pipe,
struct pipe_sampler_view **views = NULL;
unsigned i;
+ /* must protect curr status */
+ pipe_mutex_lock(rb_pipe->call_mutex);
+
rb_pipe->curr.num_vs_views = 0;
memset(rb_pipe->curr.vs_views, 0, sizeof(rb_pipe->curr.vs_views));
memset(rb_pipe->curr.vs_texs, 0, sizeof(rb_pipe->curr.vs_texs));
@@ -652,6 +777,8 @@ rbug_set_vertex_sampler_views(struct pipe_context *_pipe,
}
pipe->set_vertex_sampler_views(pipe, num, views);
+
+ pipe_mutex_unlock(rb_pipe->call_mutex);
}
static void
@@ -665,6 +792,8 @@ rbug_set_vertex_buffers(struct pipe_context *_pipe,
struct pipe_vertex_buffer *buffers = NULL;
unsigned i;
+ pipe_mutex_lock(rb_pipe->call_mutex);
+
if (num_buffers) {
memcpy(unwrapped_buffers, _buffers, num_buffers * sizeof(*_buffers));
for (i = 0; i < num_buffers; i++)
@@ -675,6 +804,8 @@ rbug_set_vertex_buffers(struct pipe_context *_pipe,
pipe->set_vertex_buffers(pipe,
num_buffers,
buffers);
+
+ pipe_mutex_unlock(rb_pipe->call_mutex);
}
static void
@@ -691,7 +822,9 @@ rbug_set_index_buffer(struct pipe_context *_pipe,
ib = &unwrapped_ib;
}
+ pipe_mutex_lock(rb_pipe->call_mutex);
pipe->set_index_buffer(pipe, ib);
+ pipe_mutex_unlock(rb_pipe->call_mutex);
}
static void
@@ -701,7 +834,9 @@ rbug_set_sample_mask(struct pipe_context *_pipe,
struct rbug_context *rb_pipe = rbug_context(_pipe);
struct pipe_context *pipe = rb_pipe->pipe;
+ pipe_mutex_lock(rb_pipe->call_mutex);
pipe->set_sample_mask(pipe, sample_mask);
+ pipe_mutex_unlock(rb_pipe->call_mutex);
}
static void
@@ -722,6 +857,7 @@ rbug_resource_copy_region(struct pipe_context *_pipe,
struct pipe_resource *dst = rb_resource_dst->resource;
struct pipe_resource *src = rb_resource_src->resource;
+ pipe_mutex_lock(rb_pipe->call_mutex);
pipe->resource_copy_region(pipe,
dst,
dst_level,
@@ -731,6 +867,7 @@ rbug_resource_copy_region(struct pipe_context *_pipe,
src,
src_level,
src_box);
+ pipe_mutex_unlock(rb_pipe->call_mutex);
}
static void
@@ -743,11 +880,13 @@ rbug_clear(struct pipe_context *_pipe,
struct rbug_context *rb_pipe = rbug_context(_pipe);
struct pipe_context *pipe = rb_pipe->pipe;
+ pipe_mutex_lock(rb_pipe->call_mutex);
pipe->clear(pipe,
buffers,
rgba,
depth,
stencil);
+ pipe_mutex_unlock(rb_pipe->call_mutex);
}
static void
@@ -762,6 +901,7 @@ rbug_clear_render_target(struct pipe_context *_pipe,
struct pipe_context *pipe = rb_pipe->pipe;
struct pipe_surface *dst = rb_surface_dst->surface;
+ pipe_mutex_lock(rb_pipe->call_mutex);
pipe->clear_render_target(pipe,
dst,
rgba,
@@ -769,6 +909,7 @@ rbug_clear_render_target(struct pipe_context *_pipe,
dsty,
width,
height);
+ pipe_mutex_unlock(rb_pipe->call_mutex);
}
static void
@@ -785,6 +926,7 @@ rbug_clear_depth_stencil(struct pipe_context *_pipe,
struct pipe_context *pipe = rb_pipe->pipe;
struct pipe_surface *dst = rb_surface_dst->surface;
+ pipe_mutex_lock(rb_pipe->call_mutex);
pipe->clear_depth_stencil(pipe,
dst,
clear_flags,
@@ -794,36 +936,20 @@ rbug_clear_depth_stencil(struct pipe_context *_pipe,
dsty,
width,
height);
+ pipe_mutex_unlock(rb_pipe->call_mutex);
}
static void
rbug_flush(struct pipe_context *_pipe,
- unsigned flags,
struct pipe_fence_handle **fence)
{
struct rbug_context *rb_pipe = rbug_context(_pipe);
struct pipe_context *pipe = rb_pipe->pipe;
+ pipe_mutex_lock(rb_pipe->call_mutex);
pipe->flush(pipe,
- flags,
fence);
-}
-
-static unsigned int
-rbug_is_resource_referenced(struct pipe_context *_pipe,
- struct pipe_resource *_resource,
- unsigned level,
- int layer)
-{
- struct rbug_context *rb_pipe = rbug_context(_pipe);
- struct rbug_resource *rb_resource = rbug_resource(_resource);
- struct pipe_context *pipe = rb_pipe->pipe;
- struct pipe_resource *resource = rb_resource->resource;
-
- return pipe->is_resource_referenced(pipe,
- resource,
- level,
- layer);
+ pipe_mutex_unlock(rb_pipe->call_mutex);
}
static struct pipe_sampler_view *
@@ -837,9 +963,11 @@ rbug_context_create_sampler_view(struct pipe_context *_pipe,
struct pipe_resource *resource = rb_resource->resource;
struct pipe_sampler_view *result;
+ pipe_mutex_lock(rb_pipe->call_mutex);
result = pipe->create_sampler_view(pipe,
resource,
templ);
+ pipe_mutex_unlock(rb_pipe->call_mutex);
if (result)
return rbug_sampler_view_create(rb_pipe, rb_resource, result);
@@ -865,9 +993,11 @@ rbug_context_create_surface(struct pipe_context *_pipe,
struct pipe_resource *resource = rb_resource->resource;
struct pipe_surface *result;
+ pipe_mutex_lock(rb_pipe->call_mutex);
result = pipe->create_surface(pipe,
resource,
surf_tmpl);
+ pipe_mutex_unlock(rb_pipe->call_mutex);
if (result)
return rbug_surface_create(rb_pipe, rb_resource, result);
@@ -878,8 +1008,13 @@ static void
rbug_context_surface_destroy(struct pipe_context *_pipe,
struct pipe_surface *_surface)
{
- rbug_surface_destroy(rbug_context(_pipe),
- rbug_surface(_surface));
+ struct rbug_context *rb_pipe = rbug_context(_pipe);
+ struct rbug_surface *rb_surface = rbug_surface(_surface);
+
+ pipe_mutex_lock(rb_pipe->call_mutex);
+ rbug_surface_destroy(rb_pipe,
+ rb_surface);
+ pipe_mutex_unlock(rb_pipe->call_mutex);
}
@@ -897,11 +1032,13 @@ rbug_context_get_transfer(struct pipe_context *_context,
struct pipe_resource *resource = rb_resource->resource;
struct pipe_transfer *result;
+ pipe_mutex_lock(rb_pipe->call_mutex);
result = context->get_transfer(context,
resource,
level,
usage,
box);
+ pipe_mutex_unlock(rb_pipe->call_mutex);
if (result)
return rbug_transfer_create(rb_pipe, rb_resource, result);
@@ -912,8 +1049,13 @@ static void
rbug_context_transfer_destroy(struct pipe_context *_pipe,
struct pipe_transfer *_transfer)
{
- rbug_transfer_destroy(rbug_context(_pipe),
- rbug_transfer(_transfer));
+ struct rbug_context *rb_pipe = rbug_context(_pipe);
+ struct rbug_transfer *rb_transfer =rbug_transfer(_transfer);
+
+ pipe_mutex_lock(rb_pipe->call_mutex);
+ rbug_transfer_destroy(rb_pipe,
+ rb_transfer);
+ pipe_mutex_unlock(rb_pipe->call_mutex);
}
static void *
@@ -924,9 +1066,14 @@ rbug_context_transfer_map(struct pipe_context *_context,
struct rbug_transfer *rb_transfer = rbug_transfer(_transfer);
struct pipe_context *context = rb_pipe->pipe;
struct pipe_transfer *transfer = rb_transfer->transfer;
+ void *ret;
- return context->transfer_map(context,
+ pipe_mutex_lock(rb_pipe->call_mutex);
+ ret = context->transfer_map(context,
transfer);
+ pipe_mutex_unlock(rb_pipe->call_mutex);
+
+ return ret;
}
@@ -941,9 +1088,11 @@ rbug_context_transfer_flush_region(struct pipe_context *_context,
struct pipe_context *context = rb_pipe->pipe;
struct pipe_transfer *transfer = rb_transfer->transfer;
+ pipe_mutex_lock(rb_pipe->call_mutex);
context->transfer_flush_region(context,
transfer,
box);
+ pipe_mutex_unlock(rb_pipe->call_mutex);
}
@@ -956,8 +1105,10 @@ rbug_context_transfer_unmap(struct pipe_context *_context,
struct pipe_context *context = rb_pipe->pipe;
struct pipe_transfer *transfer = rb_transfer->transfer;
+ pipe_mutex_lock(rb_pipe->call_mutex);
context->transfer_unmap(context,
transfer);
+ pipe_mutex_unlock(rb_pipe->call_mutex);
}
@@ -976,6 +1127,7 @@ rbug_context_transfer_inline_write(struct pipe_context *_context,
struct pipe_context *context = rb_pipe->pipe;
struct pipe_resource *resource = rb_resource->resource;
+ pipe_mutex_lock(rb_pipe->call_mutex);
context->transfer_inline_write(context,
resource,
level,
@@ -984,6 +1136,22 @@ rbug_context_transfer_inline_write(struct pipe_context *_context,
data,
stride,
layer_stride);
+ pipe_mutex_unlock(rb_pipe->call_mutex);
+}
+
+
+static void rbug_redefine_user_buffer(struct pipe_context *_context,
+ struct pipe_resource *_resource,
+ unsigned offset, unsigned size)
+{
+ struct rbug_context *rb_pipe = rbug_context(_context);
+ struct rbug_resource *rb_resource = rbug_resource(_resource);
+ struct pipe_context *context = rb_pipe->pipe;
+ struct pipe_resource *resource = rb_resource->resource;
+
+ pipe_mutex_lock(rb_pipe->call_mutex);
+ context->redefine_user_buffer(context, resource, offset, size);
+ pipe_mutex_unlock(rb_pipe->call_mutex);
}
@@ -1061,7 +1229,6 @@ rbug_context_create(struct pipe_screen *_screen, struct pipe_context *pipe)
rb_pipe->base.clear_render_target = rbug_clear_render_target;
rb_pipe->base.clear_depth_stencil = rbug_clear_depth_stencil;
rb_pipe->base.flush = rbug_flush;
- rb_pipe->base.is_resource_referenced = rbug_is_resource_referenced;
rb_pipe->base.create_sampler_view = rbug_context_create_sampler_view;
rb_pipe->base.sampler_view_destroy = rbug_context_sampler_view_destroy;
rb_pipe->base.create_surface = rbug_context_create_surface;
@@ -1072,6 +1239,7 @@ rbug_context_create(struct pipe_screen *_screen, struct pipe_context *pipe)
rb_pipe->base.transfer_unmap = rbug_context_transfer_unmap;
rb_pipe->base.transfer_flush_region = rbug_context_transfer_flush_region;
rb_pipe->base.transfer_inline_write = rbug_context_transfer_inline_write;
+ rb_pipe->base.redefine_user_buffer = rbug_redefine_user_buffer;
rb_pipe->pipe = pipe;
diff --git a/src/gallium/drivers/rbug/rbug_core.c b/src/gallium/drivers/rbug/rbug_core.c
index eb772d19d05..b80bcd4228f 100644
--- a/src/gallium/drivers/rbug/rbug_core.c
+++ b/src/gallium/drivers/rbug/rbug_core.c
@@ -498,7 +498,7 @@ rbug_context_flush(struct rbug_rbug *tr_rbug, struct rbug_header *header, uint32
/* protect the pipe context */
pipe_mutex_lock(rb_context->call_mutex);
- rb_context->pipe->flush(rb_context->pipe, flush->flags, NULL);
+ rb_context->pipe->flush(rb_context->pipe, NULL);
pipe_mutex_unlock(rb_context->call_mutex);
pipe_mutex_unlock(rb_screen->list_mutex);
diff --git a/src/gallium/drivers/rbug/rbug_objects.c b/src/gallium/drivers/rbug/rbug_objects.c
index 7d7cc482ae6..15f5db40093 100644
--- a/src/gallium/drivers/rbug/rbug_objects.c
+++ b/src/gallium/drivers/rbug/rbug_objects.c
@@ -98,8 +98,9 @@ rbug_surface_create(struct rbug_context *rb_context,
pipe_reference_init(&rb_surface->base.reference, 1);
rb_surface->base.texture = NULL;
+ rb_surface->base.context = &rb_context->base;
+ rb_surface->surface = surface; /* we own the surface already */
pipe_resource_reference(&rb_surface->base.texture, &rb_resource->base);
- rb_surface->surface = surface;
return &rb_surface->base;
@@ -113,8 +114,7 @@ rbug_surface_destroy(struct rbug_context *rb_context,
struct rbug_surface *rb_surface)
{
pipe_resource_reference(&rb_surface->base.texture, NULL);
- rb_context->pipe->surface_destroy(rb_context->pipe,
- rb_surface->surface);
+ pipe_surface_reference(&rb_surface->surface, NULL);
FREE(rb_surface);
}
diff --git a/src/gallium/drivers/rbug/rbug_screen.c b/src/gallium/drivers/rbug/rbug_screen.c
index d635ce575c0..7c8dfdcc12a 100644
--- a/src/gallium/drivers/rbug/rbug_screen.c
+++ b/src/gallium/drivers/rbug/rbug_screen.c
@@ -106,8 +106,7 @@ rbug_screen_is_format_supported(struct pipe_screen *_screen,
enum pipe_format format,
enum pipe_texture_target target,
unsigned sample_count,
- unsigned tex_usage,
- unsigned geom_flags)
+ unsigned tex_usage)
{
struct rbug_screen *rb_screen = rbug_screen(_screen);
struct pipe_screen *screen = rb_screen->screen;
@@ -116,8 +115,7 @@ rbug_screen_is_format_supported(struct pipe_screen *_screen,
format,
target,
sample_count,
- tex_usage,
- geom_flags);
+ tex_usage);
}
static struct pipe_context *
@@ -240,30 +238,28 @@ rbug_screen_fence_reference(struct pipe_screen *_screen,
fence);
}
-static int
+static boolean
rbug_screen_fence_signalled(struct pipe_screen *_screen,
- struct pipe_fence_handle *fence,
- unsigned flags)
+ struct pipe_fence_handle *fence)
{
struct rbug_screen *rb_screen = rbug_screen(_screen);
struct pipe_screen *screen = rb_screen->screen;
return screen->fence_signalled(screen,
- fence,
- flags);
+ fence);
}
-static int
+static boolean
rbug_screen_fence_finish(struct pipe_screen *_screen,
struct pipe_fence_handle *fence,
- unsigned flags)
+ uint64_t timeout)
{
struct rbug_screen *rb_screen = rbug_screen(_screen);
struct pipe_screen *screen = rb_screen->screen;
return screen->fence_finish(screen,
fence,
- flags);
+ timeout);
}
boolean
diff --git a/src/gallium/drivers/softpipe/sp_context.c b/src/gallium/drivers/softpipe/sp_context.c
index e935ce6d21b..ce22f646228 100644
--- a/src/gallium/drivers/softpipe/sp_context.c
+++ b/src/gallium/drivers/softpipe/sp_context.c
@@ -91,10 +91,17 @@ softpipe_destroy( struct pipe_context *pipe )
if (softpipe->draw)
draw_destroy( softpipe->draw );
- softpipe->quad.shade->destroy( softpipe->quad.shade );
- softpipe->quad.depth_test->destroy( softpipe->quad.depth_test );
- softpipe->quad.blend->destroy( softpipe->quad.blend );
- softpipe->quad.pstipple->destroy( softpipe->quad.pstipple );
+ if (softpipe->quad.shade)
+ softpipe->quad.shade->destroy( softpipe->quad.shade );
+
+ if (softpipe->quad.depth_test)
+ softpipe->quad.depth_test->destroy( softpipe->quad.depth_test );
+
+ if (softpipe->quad.blend)
+ softpipe->quad.blend->destroy( softpipe->quad.blend );
+
+ if (softpipe->quad.pstipple)
+ softpipe->quad.pstipple->destroy( softpipe->quad.pstipple );
for (i = 0; i < PIPE_MAX_COLOR_BUFS; i++) {
sp_destroy_tile_cache(softpipe->cbuf_cache[i]);
@@ -105,8 +112,8 @@ softpipe_destroy( struct pipe_context *pipe )
pipe_surface_reference(&softpipe->framebuffer.zsbuf, NULL);
for (i = 0; i < PIPE_MAX_SAMPLERS; i++) {
- sp_destroy_tex_tile_cache(softpipe->tex_cache[i]);
- pipe_sampler_view_reference(&softpipe->sampler_views[i], NULL);
+ sp_destroy_tex_tile_cache(softpipe->fragment_tex_cache[i]);
+ pipe_sampler_view_reference(&softpipe->fragment_sampler_views[i], NULL);
}
for (i = 0; i < PIPE_MAX_VERTEX_SAMPLERS; i++) {
@@ -129,6 +136,10 @@ softpipe_destroy( struct pipe_context *pipe )
}
}
+ for (i = 0; i < softpipe->num_vertex_buffers; i++) {
+ pipe_resource_reference(&softpipe->vertex_buffer[i].buffer, NULL);
+ }
+
tgsi_exec_machine_destroy(softpipe->fs_machine);
FREE( softpipe );
@@ -137,13 +148,13 @@ softpipe_destroy( struct pipe_context *pipe )
/**
* if (the texture is being used as a framebuffer surface)
- * return PIPE_REFERENCED_FOR_WRITE
+ * return SP_REFERENCED_FOR_WRITE
* else if (the texture is a bound texture source)
- * return PIPE_REFERENCED_FOR_READ
+ * return SP_REFERENCED_FOR_READ
* else
- * return PIPE_UNREFERENCED
+ * return SP_UNREFERENCED
*/
-static unsigned int
+unsigned int
softpipe_is_resource_referenced( struct pipe_context *pipe,
struct pipe_resource *texture,
unsigned level, int layer)
@@ -152,40 +163,40 @@ softpipe_is_resource_referenced( struct pipe_context *pipe,
unsigned i;
if (texture->target == PIPE_BUFFER)
- return PIPE_UNREFERENCED;
+ return SP_UNREFERENCED;
/* check if any of the bound drawing surfaces are this texture */
if (softpipe->dirty_render_cache) {
for (i = 0; i < softpipe->framebuffer.nr_cbufs; i++) {
if (softpipe->framebuffer.cbufs[i] &&
softpipe->framebuffer.cbufs[i]->texture == texture) {
- return PIPE_REFERENCED_FOR_WRITE;
+ return SP_REFERENCED_FOR_WRITE;
}
}
if (softpipe->framebuffer.zsbuf &&
softpipe->framebuffer.zsbuf->texture == texture) {
- return PIPE_REFERENCED_FOR_WRITE;
+ return SP_REFERENCED_FOR_WRITE;
}
}
/* check if any of the tex_cache textures are this texture */
for (i = 0; i < PIPE_MAX_SAMPLERS; i++) {
- if (softpipe->tex_cache[i] &&
- softpipe->tex_cache[i]->texture == texture)
- return PIPE_REFERENCED_FOR_READ;
+ if (softpipe->fragment_tex_cache[i] &&
+ softpipe->fragment_tex_cache[i]->texture == texture)
+ return SP_REFERENCED_FOR_READ;
}
for (i = 0; i < PIPE_MAX_VERTEX_SAMPLERS; i++) {
if (softpipe->vertex_tex_cache[i] &&
softpipe->vertex_tex_cache[i]->texture == texture)
- return PIPE_REFERENCED_FOR_READ;
+ return SP_REFERENCED_FOR_READ;
}
for (i = 0; i < PIPE_MAX_GEOMETRY_SAMPLERS; i++) {
if (softpipe->geometry_tex_cache[i] &&
softpipe->geometry_tex_cache[i]->texture == texture)
- return PIPE_REFERENCED_FOR_READ;
+ return SP_REFERENCED_FOR_READ;
}
- return PIPE_UNREFERENCED;
+ return SP_UNREFERENCED;
}
@@ -219,7 +230,7 @@ softpipe_create_context( struct pipe_screen *screen,
softpipe->use_sse = FALSE;
#endif
- softpipe->dump_fs = debug_get_bool_option( "GALLIUM_DUMP_FS", FALSE );
+ softpipe->dump_fs = debug_get_bool_option( "SOFTPIPE_DUMP_FS", FALSE );
softpipe->dump_gs = debug_get_bool_option( "SOFTPIPE_DUMP_GS", FALSE );
softpipe->pipe.winsys = NULL;
@@ -244,9 +255,7 @@ softpipe_create_context( struct pipe_screen *screen,
softpipe->pipe.draw_stream_output = softpipe_draw_stream_output;
softpipe->pipe.clear = softpipe_clear;
- softpipe->pipe.flush = softpipe_flush;
-
- softpipe->pipe.is_resource_referenced = softpipe_is_resource_referenced;
+ softpipe->pipe.flush = softpipe_flush_wrapped;
softpipe->pipe.render_condition = softpipe_render_condition;
@@ -258,13 +267,22 @@ softpipe_create_context( struct pipe_screen *screen,
softpipe->cbuf_cache[i] = sp_create_tile_cache( &softpipe->pipe );
softpipe->zsbuf_cache = sp_create_tile_cache( &softpipe->pipe );
- for (i = 0; i < PIPE_MAX_SAMPLERS; i++)
- softpipe->tex_cache[i] = sp_create_tex_tile_cache( &softpipe->pipe );
+ for (i = 0; i < PIPE_MAX_SAMPLERS; i++) {
+ softpipe->fragment_tex_cache[i] = sp_create_tex_tile_cache( &softpipe->pipe );
+ if (!softpipe->fragment_tex_cache[i])
+ goto fail;
+ }
+
for (i = 0; i < PIPE_MAX_VERTEX_SAMPLERS; i++) {
softpipe->vertex_tex_cache[i] = sp_create_tex_tile_cache( &softpipe->pipe );
+ if (!softpipe->vertex_tex_cache[i])
+ goto fail;
}
+
for (i = 0; i < PIPE_MAX_GEOMETRY_SAMPLERS; i++) {
softpipe->geometry_tex_cache[i] = sp_create_tex_tile_cache( &softpipe->pipe );
+ if (!softpipe->geometry_tex_cache[i])
+ goto fail;
}
softpipe->fs_machine = tgsi_exec_machine_create();
@@ -295,7 +313,7 @@ softpipe_create_context( struct pipe_screen *screen,
(struct tgsi_sampler **)
softpipe->tgsi.geom_samplers_list);
- if (debug_get_bool_option( "SP_NO_RAST", FALSE ))
+ if (debug_get_bool_option( "SOFTPIPE_NO_RAST", FALSE ))
softpipe->no_rast = TRUE;
softpipe->vbuf_backend = sp_create_vbuf_backend(softpipe);
diff --git a/src/gallium/drivers/softpipe/sp_context.h b/src/gallium/drivers/softpipe/sp_context.h
index 9361a3df09e..a572ee8cf00 100644
--- a/src/gallium/drivers/softpipe/sp_context.h
+++ b/src/gallium/drivers/softpipe/sp_context.h
@@ -58,7 +58,7 @@ struct softpipe_context {
/** Constant state objects */
struct pipe_blend_state *blend;
- struct pipe_sampler_state *sampler[PIPE_MAX_SAMPLERS];
+ struct pipe_sampler_state *fragment_samplers[PIPE_MAX_SAMPLERS];
struct pipe_sampler_state *vertex_samplers[PIPE_MAX_VERTEX_SAMPLERS];
struct pipe_sampler_state *geometry_samplers[PIPE_MAX_GEOMETRY_SAMPLERS];
struct pipe_depth_stencil_alpha_state *depth_stencil;
@@ -77,7 +77,7 @@ struct softpipe_context {
struct pipe_framebuffer_state framebuffer;
struct pipe_poly_stipple poly_stipple;
struct pipe_scissor_state scissor;
- struct pipe_sampler_view *sampler_views[PIPE_MAX_SAMPLERS];
+ struct pipe_sampler_view *fragment_sampler_views[PIPE_MAX_SAMPLERS];
struct pipe_sampler_view *vertex_sampler_views[PIPE_MAX_VERTEX_SAMPLERS];
struct pipe_sampler_view *geometry_sampler_views[PIPE_MAX_GEOMETRY_SAMPLERS];
struct pipe_viewport_state viewport;
@@ -91,8 +91,8 @@ struct softpipe_context {
} so_target;
struct pipe_query_data_so_statistics so_stats;
- unsigned num_samplers;
- unsigned num_sampler_views;
+ unsigned num_fragment_samplers;
+ unsigned num_fragment_sampler_views;
unsigned num_vertex_samplers;
unsigned num_vertex_sampler_views;
unsigned num_geometry_samplers;
@@ -154,9 +154,9 @@ struct softpipe_context {
/** TGSI exec things */
struct {
- struct sp_sampler_varient *geom_samplers_list[PIPE_MAX_GEOMETRY_SAMPLERS];
- struct sp_sampler_varient *vert_samplers_list[PIPE_MAX_VERTEX_SAMPLERS];
- struct sp_sampler_varient *frag_samplers_list[PIPE_MAX_SAMPLERS];
+ struct sp_sampler_variant *geom_samplers_list[PIPE_MAX_GEOMETRY_SAMPLERS];
+ struct sp_sampler_variant *vert_samplers_list[PIPE_MAX_VERTEX_SAMPLERS];
+ struct sp_sampler_variant *frag_samplers_list[PIPE_MAX_SAMPLERS];
} tgsi;
struct tgsi_exec_machine *fs_machine;
@@ -174,7 +174,7 @@ struct softpipe_context {
struct softpipe_tile_cache *zsbuf_cache;
unsigned tex_timestamp;
- struct softpipe_tex_tile_cache *tex_cache[PIPE_MAX_SAMPLERS];
+ struct softpipe_tex_tile_cache *fragment_tex_cache[PIPE_MAX_SAMPLERS];
struct softpipe_tex_tile_cache *vertex_tex_cache[PIPE_MAX_VERTEX_SAMPLERS];
struct softpipe_tex_tile_cache *geometry_tex_cache[PIPE_MAX_GEOMETRY_SAMPLERS];
@@ -192,10 +192,19 @@ softpipe_context( struct pipe_context *pipe )
}
void
-softpipe_reset_sampler_varients(struct softpipe_context *softpipe);
+softpipe_reset_sampler_variants(struct softpipe_context *softpipe);
struct pipe_context *
softpipe_create_context( struct pipe_screen *, void *priv );
+#define SP_UNREFERENCED 0
+#define SP_REFERENCED_FOR_READ (1 << 0)
+#define SP_REFERENCED_FOR_WRITE (1 << 1)
+
+unsigned int
+softpipe_is_resource_referenced( struct pipe_context *pipe,
+ struct pipe_resource *texture,
+ unsigned level, int layer);
+
#endif /* SP_CONTEXT_H */
diff --git a/src/gallium/drivers/softpipe/sp_fence.c b/src/gallium/drivers/softpipe/sp_fence.c
index 66c52141132..7b79a0df4ea 100644
--- a/src/gallium/drivers/softpipe/sp_fence.c
+++ b/src/gallium/drivers/softpipe/sp_fence.c
@@ -41,23 +41,22 @@ softpipe_fence_reference(struct pipe_screen *screen,
}
-static int
+static boolean
softpipe_fence_signalled(struct pipe_screen *screen,
- struct pipe_fence_handle *fence,
- unsigned flags)
+ struct pipe_fence_handle *fence)
{
assert(!fence);
- return 0;
+ return TRUE;
}
-static int
+static boolean
softpipe_fence_finish(struct pipe_screen *screen,
struct pipe_fence_handle *fence,
- unsigned flags)
+ uint64_t timeout)
{
assert(!fence);
- return 0;
+ return TRUE;
}
diff --git a/src/gallium/drivers/softpipe/sp_flush.c b/src/gallium/drivers/softpipe/sp_flush.c
index 3a09ee8b4f7..b7f283bf274 100644
--- a/src/gallium/drivers/softpipe/sp_flush.c
+++ b/src/gallium/drivers/softpipe/sp_flush.c
@@ -42,7 +42,7 @@
void
softpipe_flush( struct pipe_context *pipe,
- unsigned flags,
+ unsigned flags,
struct pipe_fence_handle **fence )
{
struct softpipe_context *softpipe = softpipe_context(pipe);
@@ -50,9 +50,9 @@ softpipe_flush( struct pipe_context *pipe,
draw_flush(softpipe->draw);
- if (1 || (flags & PIPE_FLUSH_TEXTURE_CACHE)) {
- for (i = 0; i < softpipe->num_sampler_views; i++) {
- sp_flush_tex_tile_cache(softpipe->tex_cache[i]);
+ if (1 || (flags & SP_FLUSH_TEXTURE_CACHE)) {
+ for (i = 0; i < softpipe->num_fragment_sampler_views; i++) {
+ sp_flush_tex_tile_cache(softpipe->fragment_tex_cache[i]);
}
for (i = 0; i < softpipe->num_vertex_sampler_views; i++) {
sp_flush_tex_tile_cache(softpipe->vertex_tex_cache[i]);
@@ -62,34 +62,27 @@ softpipe_flush( struct pipe_context *pipe,
}
}
- if (flags & PIPE_FLUSH_SWAPBUFFERS) {
- /* If this is a swapbuffers, just flush color buffers.
- *
- * The zbuffer changes are not discarded, but held in the cache
- * in the hope that a later clear will wipe them out.
- */
- for (i = 0; i < softpipe->framebuffer.nr_cbufs; i++)
- if (softpipe->cbuf_cache[i])
- sp_flush_tile_cache(softpipe->cbuf_cache[i]);
-
- /* Need this call for hardware buffers before swapbuffers.
- *
- * there should probably be another/different flush-type function
- * that's called before swapbuffers because we don't always want
- * to unmap surfaces when flushing.
- */
- softpipe_unmap_transfers(softpipe);
- }
- else if (flags & PIPE_FLUSH_RENDER_CACHE) {
- for (i = 0; i < softpipe->framebuffer.nr_cbufs; i++)
- if (softpipe->cbuf_cache[i])
- sp_flush_tile_cache(softpipe->cbuf_cache[i]);
-
- if (softpipe->zsbuf_cache)
- sp_flush_tile_cache(softpipe->zsbuf_cache);
-
- softpipe->dirty_render_cache = FALSE;
- }
+ /* If this is a swapbuffers, just flush color buffers.
+ *
+ * The zbuffer changes are not discarded, but held in the cache
+ * in the hope that a later clear will wipe them out.
+ */
+ for (i = 0; i < softpipe->framebuffer.nr_cbufs; i++)
+ if (softpipe->cbuf_cache[i])
+ sp_flush_tile_cache(softpipe->cbuf_cache[i]);
+
+ if (softpipe->zsbuf_cache)
+ sp_flush_tile_cache(softpipe->zsbuf_cache);
+
+ softpipe->dirty_render_cache = FALSE;
+
+ /* Need this call for hardware buffers before swapbuffers.
+ *
+ * there should probably be another/different flush-type function
+ * that's called before swapbuffers because we don't always want
+ * to unmap surfaces when flushing.
+ */
+ softpipe_unmap_transfers(softpipe);
/* Enable to dump BMPs of the color/depth buffers each frame */
#if 0
@@ -108,6 +101,13 @@ softpipe_flush( struct pipe_context *pipe,
*fence = NULL;
}
+void
+softpipe_flush_wrapped( struct pipe_context *pipe,
+ struct pipe_fence_handle **fence )
+{
+ softpipe_flush(pipe, SP_FLUSH_TEXTURE_CACHE, fence);
+}
+
/**
* Flush context if necessary.
@@ -129,21 +129,18 @@ softpipe_flush_resource(struct pipe_context *pipe,
{
unsigned referenced;
- referenced = pipe->is_resource_referenced(pipe, texture, level, layer);
+ referenced = softpipe_is_resource_referenced(pipe, texture, level, layer);
- if ((referenced & PIPE_REFERENCED_FOR_WRITE) ||
- ((referenced & PIPE_REFERENCED_FOR_READ) && !read_only)) {
+ if ((referenced & SP_REFERENCED_FOR_WRITE) ||
+ ((referenced & SP_REFERENCED_FOR_READ) && !read_only)) {
/*
* TODO: The semantics of these flush flags are too obtuse. They should
* disappear and the pipe driver should just ensure that all visible
* side-effects happen when they need to happen.
*/
- if (referenced & PIPE_REFERENCED_FOR_WRITE)
- flush_flags |= PIPE_FLUSH_RENDER_CACHE;
-
- if (referenced & PIPE_REFERENCED_FOR_READ)
- flush_flags |= PIPE_FLUSH_TEXTURE_CACHE;
+ if (referenced & SP_REFERENCED_FOR_READ)
+ flush_flags |= SP_FLUSH_TEXTURE_CACHE;
if (cpu_access) {
/*
@@ -155,14 +152,15 @@ softpipe_flush_resource(struct pipe_context *pipe,
if (do_not_block)
return FALSE;
- pipe->flush(pipe, flush_flags, &fence);
+ softpipe_flush(pipe, flush_flags, &fence);
if (fence) {
/*
* This is for illustrative purposes only, as softpipe does not
* have fences.
*/
- pipe->screen->fence_finish(pipe->screen, fence, 0);
+ pipe->screen->fence_finish(pipe->screen, fence,
+ PIPE_TIMEOUT_INFINITE);
pipe->screen->fence_reference(pipe->screen, &fence, NULL);
}
} else {
@@ -170,7 +168,7 @@ softpipe_flush_resource(struct pipe_context *pipe,
* Just flush.
*/
- pipe->flush(pipe, flush_flags, NULL);
+ softpipe_flush(pipe, flush_flags, NULL);
}
}
diff --git a/src/gallium/drivers/softpipe/sp_flush.h b/src/gallium/drivers/softpipe/sp_flush.h
index 22a5ceeb9ec..ab01c249abe 100644
--- a/src/gallium/drivers/softpipe/sp_flush.h
+++ b/src/gallium/drivers/softpipe/sp_flush.h
@@ -33,10 +33,17 @@
struct pipe_context;
struct pipe_fence_handle;
+#define SP_FLUSH_TEXTURE_CACHE 0x2
+
void
-softpipe_flush(struct pipe_context *pipe, unsigned flags,
+softpipe_flush(struct pipe_context *pipe,
+ unsigned flags,
struct pipe_fence_handle **fence);
+void
+softpipe_flush_wrapped( struct pipe_context *pipe,
+ struct pipe_fence_handle **fence );
+
boolean
softpipe_flush_resource(struct pipe_context *pipe,
struct pipe_resource *texture,
diff --git a/src/gallium/drivers/softpipe/sp_quad_blend.c b/src/gallium/drivers/softpipe/sp_quad_blend.c
index 6af1b2d0618..76cfc0bf51c 100644
--- a/src/gallium/drivers/softpipe/sp_quad_blend.c
+++ b/src/gallium/drivers/softpipe/sp_quad_blend.c
@@ -35,6 +35,7 @@
#include "util/u_memory.h"
#include "util/u_format.h"
#include "sp_context.h"
+#include "sp_state.h"
#include "sp_quad.h"
#include "sp_tile_cache.h"
#include "sp_quad_pipe.h"
@@ -794,6 +795,9 @@ blend_fallback(struct quad_stage *qs,
struct softpipe_context *softpipe = qs->softpipe;
const struct pipe_blend_state *blend = softpipe->blend;
unsigned cbuf;
+ boolean write_all;
+
+ write_all = softpipe->fs->color0_writes_all_cbufs;
for (cbuf = 0; cbuf < softpipe->framebuffer.nr_cbufs; cbuf++)
{
@@ -806,15 +810,19 @@ blend_fallback(struct quad_stage *qs,
quads[0]->input.y0);
boolean has_dst_alpha
= util_format_has_alpha(softpipe->framebuffer.cbufs[cbuf]->format);
- uint q, i, j;
+ uint q, i, j, qbuf;
+
+ qbuf = write_all ? 0 : cbuf;
for (q = 0; q < nr; q++) {
struct quad_header *quad = quads[q];
- float (*quadColor)[4] = quad->output.color[cbuf];
+ float (*quadColor)[4];
const int itx = (quad->input.x0 & (TILE_SIZE-1));
const int ity = (quad->input.y0 & (TILE_SIZE-1));
- /* get/swizzle dest colors
+ quadColor = quad->output.color[qbuf];
+
+ /* get/swizzle dest colors
*/
for (j = 0; j < QUAD_SIZE; j++) {
int x = itx + (j & 1);
diff --git a/src/gallium/drivers/softpipe/sp_screen.c b/src/gallium/drivers/softpipe/sp_screen.c
index cbdea19af43..48aabc18da3 100644
--- a/src/gallium/drivers/softpipe/sp_screen.c
+++ b/src/gallium/drivers/softpipe/sp_screen.c
@@ -123,6 +123,11 @@ softpipe_get_param(struct pipe_screen *screen, enum pipe_cap param)
return 0;
case PIPE_CAP_SHADER_STENCIL_EXPORT:
return 1;
+ case PIPE_CAP_TGSI_INSTANCEID:
+ case PIPE_CAP_VERTEX_ELEMENT_INSTANCE_DIVISOR:
+ return 1;
+ case PIPE_CAP_ARRAY_TEXTURES:
+ return 1;
default:
return 0;
}
@@ -175,15 +180,16 @@ softpipe_is_format_supported( struct pipe_screen *screen,
enum pipe_format format,
enum pipe_texture_target target,
unsigned sample_count,
- unsigned bind,
- unsigned geom_flags )
+ unsigned bind)
{
struct sw_winsys *winsys = softpipe_screen(screen)->winsys;
const struct util_format_description *format_desc;
assert(target == PIPE_BUFFER ||
target == PIPE_TEXTURE_1D ||
+ target == PIPE_TEXTURE_1D_ARRAY ||
target == PIPE_TEXTURE_2D ||
+ target == PIPE_TEXTURE_2D_ARRAY ||
target == PIPE_TEXTURE_RECT ||
target == PIPE_TEXTURE_3D ||
target == PIPE_TEXTURE_CUBE);
diff --git a/src/gallium/drivers/softpipe/sp_setup.c b/src/gallium/drivers/softpipe/sp_setup.c
index 5d727dc00df..0ce28f4c6ee 100644
--- a/src/gallium/drivers/softpipe/sp_setup.c
+++ b/src/gallium/drivers/softpipe/sp_setup.c
@@ -575,7 +575,7 @@ setup_fragcoord_coeff(struct setup_context *setup, uint slot)
setup->coef[slot].dady[0] = 0.0;
/*Y*/
setup->coef[slot].a0[1] =
- (spfs->origin_lower_left ? setup->softpipe->framebuffer.height : 0)
+ (spfs->origin_lower_left ? setup->softpipe->framebuffer.height-1 : 0)
+ (spfs->pixel_center_integer ? 0.0 : 0.5);
setup->coef[slot].dadx[1] = 0.0;
setup->coef[slot].dady[1] = spfs->origin_lower_left ? -1.0 : 1.0;
diff --git a/src/gallium/drivers/softpipe/sp_state.h b/src/gallium/drivers/softpipe/sp_state.h
index 525bf23734a..bb19f8cff20 100644
--- a/src/gallium/drivers/softpipe/sp_state.h
+++ b/src/gallium/drivers/softpipe/sp_state.h
@@ -74,7 +74,7 @@ struct sp_fragment_shader {
boolean origin_lower_left; /**< fragment shader uses lower left position origin? */
boolean pixel_center_integer; /**< fragment shader uses integer pixel center? */
-
+ boolean color0_writes_all_cbufs; /**< fragment shader writes color0 to all bound cbufs */
void (*prepare)( const struct sp_fragment_shader *shader,
struct tgsi_exec_machine *machine,
struct tgsi_sampler **samplers);
diff --git a/src/gallium/drivers/softpipe/sp_state_derived.c b/src/gallium/drivers/softpipe/sp_state_derived.c
index 3ba4d934fd2..f9590eb0b24 100644
--- a/src/gallium/drivers/softpipe/sp_state_derived.c
+++ b/src/gallium/drivers/softpipe/sp_state_derived.c
@@ -197,11 +197,11 @@ update_tgsi_samplers( struct softpipe_context *softpipe )
{
unsigned i;
- softpipe_reset_sampler_varients( softpipe );
+ softpipe_reset_sampler_variants( softpipe );
for (i = 0; i < PIPE_MAX_SAMPLERS; i++) {
- struct softpipe_tex_tile_cache *tc = softpipe->tex_cache[i];
- if (tc->texture) {
+ struct softpipe_tex_tile_cache *tc = softpipe->fragment_tex_cache[i];
+ if (tc && tc->texture) {
struct softpipe_resource *spt = softpipe_resource(tc->texture);
if (spt->timestamp != tc->timestamp) {
sp_tex_tile_cache_validate_texture( tc );
@@ -216,7 +216,7 @@ update_tgsi_samplers( struct softpipe_context *softpipe )
for (i = 0; i < PIPE_MAX_VERTEX_SAMPLERS; i++) {
struct softpipe_tex_tile_cache *tc = softpipe->vertex_tex_cache[i];
- if (tc->texture) {
+ if (tc && tc->texture) {
struct softpipe_resource *spt = softpipe_resource(tc->texture);
if (spt->timestamp != tc->timestamp) {
@@ -229,7 +229,7 @@ update_tgsi_samplers( struct softpipe_context *softpipe )
for (i = 0; i < PIPE_MAX_GEOMETRY_SAMPLERS; i++) {
struct softpipe_tex_tile_cache *tc = softpipe->geometry_tex_cache[i];
- if (tc->texture) {
+ if (tc && tc->texture) {
struct softpipe_resource *spt = softpipe_resource(tc->texture);
if (spt->timestamp != tc->timestamp) {
diff --git a/src/gallium/drivers/softpipe/sp_state_sampler.c b/src/gallium/drivers/softpipe/sp_state_sampler.c
index b59fbc33ed6..60331bc4976 100644
--- a/src/gallium/drivers/softpipe/sp_state_sampler.c
+++ b/src/gallium/drivers/softpipe/sp_state_sampler.c
@@ -43,8 +43,8 @@
struct sp_sampler {
struct pipe_sampler_state base;
- struct sp_sampler_varient *varients;
- struct sp_sampler_varient *current;
+ struct sp_sampler_variant *variants;
+ struct sp_sampler_variant *current;
};
static struct sp_sampler *sp_sampler( struct pipe_sampler_state *sampler )
@@ -60,15 +60,15 @@ softpipe_create_sampler_state(struct pipe_context *pipe,
struct sp_sampler *sp_sampler = CALLOC_STRUCT(sp_sampler);
sp_sampler->base = *sampler;
- sp_sampler->varients = NULL;
+ sp_sampler->variants = NULL;
return (void *)sp_sampler;
}
static void
-softpipe_bind_sampler_states(struct pipe_context *pipe,
- unsigned num, void **sampler)
+softpipe_bind_fragment_sampler_states(struct pipe_context *pipe,
+ unsigned num, void **sampler)
{
struct softpipe_context *softpipe = softpipe_context(pipe);
unsigned i;
@@ -76,18 +76,18 @@ softpipe_bind_sampler_states(struct pipe_context *pipe,
assert(num <= PIPE_MAX_SAMPLERS);
/* Check for no-op */
- if (num == softpipe->num_samplers &&
- !memcmp(softpipe->sampler, sampler, num * sizeof(void *)))
+ if (num == softpipe->num_fragment_samplers &&
+ !memcmp(softpipe->fragment_samplers, sampler, num * sizeof(void *)))
return;
draw_flush(softpipe->draw);
for (i = 0; i < num; ++i)
- softpipe->sampler[i] = sampler[i];
+ softpipe->fragment_samplers[i] = sampler[i];
for (i = num; i < PIPE_MAX_SAMPLERS; ++i)
- softpipe->sampler[i] = NULL;
+ softpipe->fragment_samplers[i] = NULL;
- softpipe->num_samplers = num;
+ softpipe->num_fragment_samplers = num;
softpipe->dirty |= SP_NEW_SAMPLER;
}
@@ -181,9 +181,9 @@ softpipe_sampler_view_destroy(struct pipe_context *pipe,
static void
-softpipe_set_sampler_views(struct pipe_context *pipe,
- unsigned num,
- struct pipe_sampler_view **views)
+softpipe_set_fragment_sampler_views(struct pipe_context *pipe,
+ unsigned num,
+ struct pipe_sampler_view **views)
{
struct softpipe_context *softpipe = softpipe_context(pipe);
uint i;
@@ -191,8 +191,9 @@ softpipe_set_sampler_views(struct pipe_context *pipe,
assert(num <= PIPE_MAX_SAMPLERS);
/* Check for no-op */
- if (num == softpipe->num_sampler_views &&
- !memcmp(softpipe->sampler_views, views, num * sizeof(struct pipe_sampler_view *)))
+ if (num == softpipe->num_fragment_sampler_views &&
+ !memcmp(softpipe->fragment_sampler_views, views,
+ num * sizeof(struct pipe_sampler_view *)))
return;
draw_flush(softpipe->draw);
@@ -200,11 +201,11 @@ softpipe_set_sampler_views(struct pipe_context *pipe,
for (i = 0; i < PIPE_MAX_SAMPLERS; i++) {
struct pipe_sampler_view *view = i < num ? views[i] : NULL;
- pipe_sampler_view_reference(&softpipe->sampler_views[i], view);
- sp_tex_tile_cache_set_sampler_view(softpipe->tex_cache[i], view);
+ pipe_sampler_view_reference(&softpipe->fragment_sampler_views[i], view);
+ sp_tex_tile_cache_set_sampler_view(softpipe->fragment_tex_cache[i], view);
}
- softpipe->num_sampler_views = num;
+ softpipe->num_fragment_sampler_views = num;
softpipe->dirty |= SP_NEW_TEXTURE;
}
@@ -277,23 +278,23 @@ softpipe_set_geometry_sampler_views(struct pipe_context *pipe,
/**
- * Find/create an sp_sampler_varient object for sampling the given texture,
+ * Find/create an sp_sampler_variant object for sampling the given texture,
* sampler and tex unit.
*
* Note that the tex unit is significant. We can't re-use a sampler
- * varient for multiple texture units because the sampler varient contains
+ * variant for multiple texture units because the sampler variant contains
* the texture object pointer. If the texture object pointer were stored
- * somewhere outside the sampler varient, we could re-use samplers for
+ * somewhere outside the sampler variant, we could re-use samplers for
* multiple texture units.
*/
-static struct sp_sampler_varient *
-get_sampler_varient( unsigned unit,
+static struct sp_sampler_variant *
+get_sampler_variant( unsigned unit,
struct sp_sampler *sampler,
- struct pipe_resource *resource,
+ struct pipe_sampler_view *view,
unsigned processor )
{
- struct softpipe_resource *sp_texture = softpipe_resource(resource);
- struct sp_sampler_varient *v = NULL;
+ struct softpipe_resource *sp_texture = softpipe_resource(view->texture);
+ struct sp_sampler_variant *v = NULL;
union sp_sampler_key key;
/* if this fails, widen the key.unit field and update this assertion */
@@ -303,6 +304,10 @@ get_sampler_varient( unsigned unit,
key.bits.is_pot = sp_texture->pot;
key.bits.processor = processor;
key.bits.unit = unit;
+ key.bits.swizzle_r = view->swizzle_r;
+ key.bits.swizzle_g = view->swizzle_g;
+ key.bits.swizzle_b = view->swizzle_b;
+ key.bits.swizzle_a = view->swizzle_a;
key.bits.pad = 0;
if (sampler->current &&
@@ -311,14 +316,14 @@ get_sampler_varient( unsigned unit,
}
if (v == NULL) {
- for (v = sampler->varients; v; v = v->next)
+ for (v = sampler->variants; v; v = v->next)
if (v->key.value == key.value)
break;
if (v == NULL) {
- v = sp_create_sampler_varient( &sampler->base, key );
- v->next = sampler->varients;
- sampler->varients = v;
+ v = sp_create_sampler_variant( &sampler->base, key );
+ v->next = sampler->variants;
+ sampler->variants = v;
}
}
@@ -328,7 +333,7 @@ get_sampler_varient( unsigned unit,
void
-softpipe_reset_sampler_varients(struct softpipe_context *softpipe)
+softpipe_reset_sampler_variants(struct softpipe_context *softpipe)
{
int i;
@@ -338,65 +343,47 @@ softpipe_reset_sampler_varients(struct softpipe_context *softpipe)
*/
for (i = 0; i <= softpipe->vs->max_sampler; i++) {
if (softpipe->vertex_samplers[i]) {
- struct pipe_resource *texture = NULL;
-
- if (softpipe->vertex_sampler_views[i]) {
- texture = softpipe->vertex_sampler_views[i]->texture;
- }
-
softpipe->tgsi.vert_samplers_list[i] =
- get_sampler_varient( i,
+ get_sampler_variant( i,
sp_sampler(softpipe->vertex_samplers[i]),
- texture,
+ softpipe->vertex_sampler_views[i],
TGSI_PROCESSOR_VERTEX );
- sp_sampler_varient_bind_texture( softpipe->tgsi.vert_samplers_list[i],
- softpipe->vertex_tex_cache[i],
- texture );
+ sp_sampler_variant_bind_view( softpipe->tgsi.vert_samplers_list[i],
+ softpipe->vertex_tex_cache[i],
+ softpipe->vertex_sampler_views[i] );
}
}
if (softpipe->gs) {
for (i = 0; i <= softpipe->gs->max_sampler; i++) {
if (softpipe->geometry_samplers[i]) {
- struct pipe_resource *texture = NULL;
-
- if (softpipe->geometry_sampler_views[i]) {
- texture = softpipe->geometry_sampler_views[i]->texture;
- }
-
softpipe->tgsi.geom_samplers_list[i] =
- get_sampler_varient(
+ get_sampler_variant(
i,
sp_sampler(softpipe->geometry_samplers[i]),
- texture,
+ softpipe->geometry_sampler_views[i],
TGSI_PROCESSOR_GEOMETRY );
- sp_sampler_varient_bind_texture(
+ sp_sampler_variant_bind_view(
softpipe->tgsi.geom_samplers_list[i],
softpipe->geometry_tex_cache[i],
- texture );
+ softpipe->geometry_sampler_views[i] );
}
}
}
for (i = 0; i <= softpipe->fs->info.file_max[TGSI_FILE_SAMPLER]; i++) {
- if (softpipe->sampler[i]) {
- struct pipe_resource *texture = NULL;
-
- if (softpipe->sampler_views[i]) {
- texture = softpipe->sampler_views[i]->texture;
- }
-
+ if (softpipe->fragment_samplers[i]) {
softpipe->tgsi.frag_samplers_list[i] =
- get_sampler_varient( i,
- sp_sampler(softpipe->sampler[i]),
- texture,
+ get_sampler_variant( i,
+ sp_sampler(softpipe->fragment_samplers[i]),
+ softpipe->fragment_sampler_views[i],
TGSI_PROCESSOR_FRAGMENT );
- sp_sampler_varient_bind_texture( softpipe->tgsi.frag_samplers_list[i],
- softpipe->tex_cache[i],
- texture );
+ sp_sampler_variant_bind_view( softpipe->tgsi.frag_samplers_list[i],
+ softpipe->fragment_tex_cache[i],
+ softpipe->fragment_sampler_views[i] );
}
}
}
@@ -406,11 +393,11 @@ softpipe_delete_sampler_state(struct pipe_context *pipe,
void *sampler)
{
struct sp_sampler *sp_sampler = (struct sp_sampler *)sampler;
- struct sp_sampler_varient *v, *tmp;
+ struct sp_sampler_variant *v, *tmp;
- for (v = sp_sampler->varients; v; v = tmp) {
+ for (v = sp_sampler->variants; v; v = tmp) {
tmp = v->next;
- sp_sampler_varient_destroy(v);
+ sp_sampler_variant_destroy(v);
}
FREE( sampler );
@@ -421,12 +408,12 @@ void
softpipe_init_sampler_funcs(struct pipe_context *pipe)
{
pipe->create_sampler_state = softpipe_create_sampler_state;
- pipe->bind_fragment_sampler_states = softpipe_bind_sampler_states;
+ pipe->bind_fragment_sampler_states = softpipe_bind_fragment_sampler_states;
pipe->bind_vertex_sampler_states = softpipe_bind_vertex_sampler_states;
pipe->bind_geometry_sampler_states = softpipe_bind_geometry_sampler_states;
pipe->delete_sampler_state = softpipe_delete_sampler_state;
- pipe->set_fragment_sampler_views = softpipe_set_sampler_views;
+ pipe->set_fragment_sampler_views = softpipe_set_fragment_sampler_views;
pipe->set_vertex_sampler_views = softpipe_set_vertex_sampler_views;
pipe->set_geometry_sampler_views = softpipe_set_geometry_sampler_views;
diff --git a/src/gallium/drivers/softpipe/sp_state_shader.c b/src/gallium/drivers/softpipe/sp_state_shader.c
index 7fff338ccea..3dec5de3cc4 100644
--- a/src/gallium/drivers/softpipe/sp_state_shader.c
+++ b/src/gallium/drivers/softpipe/sp_state_shader.c
@@ -78,6 +78,8 @@ softpipe_create_fs_state(struct pipe_context *pipe,
state->origin_lower_left = state->info.properties[i].data[0];
else if (state->info.properties[i].name == TGSI_PROPERTY_FS_COORD_PIXEL_CENTER)
state->pixel_center_integer = state->info.properties[i].data[0];
+ else if (state->info.properties[i].name == TGSI_PROPERTY_FS_COLOR0_WRITES_ALL_CBUFS)
+ state->color0_writes_all_cbufs = state->info.properties[i].data[0];
}
return state;
@@ -89,8 +91,6 @@ softpipe_bind_fs_state(struct pipe_context *pipe, void *fs)
{
struct softpipe_context *softpipe = softpipe_context(pipe);
- draw_flush(softpipe->draw);
-
if (softpipe->fs == fs)
return;
diff --git a/src/gallium/drivers/softpipe/sp_state_vertex.c b/src/gallium/drivers/softpipe/sp_state_vertex.c
index 7d8055f2baf..aa0b333c7a9 100644
--- a/src/gallium/drivers/softpipe/sp_state_vertex.c
+++ b/src/gallium/drivers/softpipe/sp_state_vertex.c
@@ -33,6 +33,8 @@
#include "sp_state.h"
#include "util/u_memory.h"
+#include "util/u_inlines.h"
+#include "util/u_transfer.h"
#include "draw/draw_context.h"
@@ -84,8 +86,9 @@ softpipe_set_vertex_buffers(struct pipe_context *pipe,
assert(count <= PIPE_MAX_ATTRIBS);
- memcpy(softpipe->vertex_buffer, buffers, count * sizeof(buffers[0]));
- softpipe->num_vertex_buffers = count;
+ util_copy_vertex_buffers(softpipe->vertex_buffer,
+ &softpipe->num_vertex_buffers,
+ buffers, count);
softpipe->dirty |= SP_NEW_VERTEX;
@@ -117,4 +120,5 @@ softpipe_init_vertex_funcs(struct pipe_context *pipe)
pipe->set_vertex_buffers = softpipe_set_vertex_buffers;
pipe->set_index_buffer = softpipe_set_index_buffer;
+ pipe->redefine_user_buffer = u_default_redefine_user_buffer;
}
diff --git a/src/gallium/drivers/softpipe/sp_tex_sample.c b/src/gallium/drivers/softpipe/sp_tex_sample.c
index 2eac4c7a82b..c09ce19559c 100644
--- a/src/gallium/drivers/softpipe/sp_tex_sample.c
+++ b/src/gallium/drivers/softpipe/sp_tex_sample.c
@@ -539,18 +539,31 @@ wrap_linear_unorm_clamp_to_edge(const float s[4], unsigned size,
}
+/**
+ * Do coordinate to array index conversion. For array textures.
+ */
+static INLINE void
+wrap_array_layer(const float coord[4], unsigned size, int layer[4])
+{
+ uint ch;
+ for (ch = 0; ch < 4; ch++) {
+ int c = util_ifloor(coord[ch] + 0.5F);
+ layer[ch] = CLAMP(c, 0, size - 1);
+ }
+}
+
/**
* Examine the quad's texture coordinates to compute the partial
* derivatives w.r.t X and Y, then compute lambda (level of detail).
*/
static float
-compute_lambda_1d(const struct sp_sampler_varient *samp,
+compute_lambda_1d(const struct sp_sampler_variant *samp,
const float s[QUAD_SIZE],
const float t[QUAD_SIZE],
const float p[QUAD_SIZE])
{
- const struct pipe_resource *texture = samp->texture;
+ const struct pipe_resource *texture = samp->view->texture;
float dsdx = fabsf(s[QUAD_BOTTOM_RIGHT] - s[QUAD_BOTTOM_LEFT]);
float dsdy = fabsf(s[QUAD_TOP_LEFT] - s[QUAD_BOTTOM_LEFT]);
float rho = MAX2(dsdx, dsdy) * texture->width0;
@@ -560,12 +573,12 @@ compute_lambda_1d(const struct sp_sampler_varient *samp,
static float
-compute_lambda_2d(const struct sp_sampler_varient *samp,
+compute_lambda_2d(const struct sp_sampler_variant *samp,
const float s[QUAD_SIZE],
const float t[QUAD_SIZE],
const float p[QUAD_SIZE])
{
- const struct pipe_resource *texture = samp->texture;
+ const struct pipe_resource *texture = samp->view->texture;
float dsdx = fabsf(s[QUAD_BOTTOM_RIGHT] - s[QUAD_BOTTOM_LEFT]);
float dsdy = fabsf(s[QUAD_TOP_LEFT] - s[QUAD_BOTTOM_LEFT]);
float dtdx = fabsf(t[QUAD_BOTTOM_RIGHT] - t[QUAD_BOTTOM_LEFT]);
@@ -579,12 +592,12 @@ compute_lambda_2d(const struct sp_sampler_varient *samp,
static float
-compute_lambda_3d(const struct sp_sampler_varient *samp,
+compute_lambda_3d(const struct sp_sampler_variant *samp,
const float s[QUAD_SIZE],
const float t[QUAD_SIZE],
const float p[QUAD_SIZE])
{
- const struct pipe_resource *texture = samp->texture;
+ const struct pipe_resource *texture = samp->view->texture;
float dsdx = fabsf(s[QUAD_BOTTOM_RIGHT] - s[QUAD_BOTTOM_LEFT]);
float dsdy = fabsf(s[QUAD_TOP_LEFT] - s[QUAD_BOTTOM_LEFT]);
float dtdx = fabsf(t[QUAD_BOTTOM_RIGHT] - t[QUAD_BOTTOM_LEFT]);
@@ -608,7 +621,7 @@ compute_lambda_3d(const struct sp_sampler_varient *samp,
* Since there aren't derivatives to use, just return 0.
*/
static float
-compute_lambda_vert(const struct sp_sampler_varient *samp,
+compute_lambda_vert(const struct sp_sampler_variant *samp,
const float s[QUAD_SIZE],
const float t[QUAD_SIZE],
const float p[QUAD_SIZE])
@@ -634,7 +647,7 @@ compute_lambda_vert(const struct sp_sampler_varient *samp,
static INLINE const float *
-get_texel_2d_no_border(const struct sp_sampler_varient *samp,
+get_texel_2d_no_border(const struct sp_sampler_variant *samp,
union tex_tile_address addr, int x, int y)
{
const struct softpipe_tex_cached_tile *tile;
@@ -651,16 +664,15 @@ get_texel_2d_no_border(const struct sp_sampler_varient *samp,
static INLINE const float *
-get_texel_2d(const struct sp_sampler_varient *samp,
+get_texel_2d(const struct sp_sampler_variant *samp,
union tex_tile_address addr, int x, int y)
{
- const struct pipe_resource *texture = samp->texture;
+ const struct pipe_resource *texture = samp->view->texture;
unsigned level = addr.bits.level;
if (x < 0 || x >= (int) u_minify(texture->width0, level) ||
y < 0 || y >= (int) u_minify(texture->height0, level)) {
- return sp_tex_tile_cache_border_color(samp->cache,
- samp->sampler->border_color);
+ return samp->sampler->border_color;
}
else {
return get_texel_2d_no_border( samp, addr, x, y );
@@ -671,7 +683,7 @@ get_texel_2d(const struct sp_sampler_varient *samp,
/* Gather a quad of adjacent texels within a tile:
*/
static INLINE void
-get_texel_quad_2d_no_border_single_tile(const struct sp_sampler_varient *samp,
+get_texel_quad_2d_no_border_single_tile(const struct sp_sampler_variant *samp,
union tex_tile_address addr,
unsigned x, unsigned y,
const float *out[4])
@@ -695,7 +707,7 @@ get_texel_quad_2d_no_border_single_tile(const struct sp_sampler_varient *samp,
/* Gather a quad of potentially non-adjacent texels:
*/
static INLINE void
-get_texel_quad_2d_no_border(const struct sp_sampler_varient *samp,
+get_texel_quad_2d_no_border(const struct sp_sampler_variant *samp,
union tex_tile_address addr,
int x0, int y0,
int x1, int y1,
@@ -710,7 +722,7 @@ get_texel_quad_2d_no_border(const struct sp_sampler_varient *samp,
/* Can involve a lot of unnecessary checks for border color:
*/
static INLINE void
-get_texel_quad_2d(const struct sp_sampler_varient *samp,
+get_texel_quad_2d(const struct sp_sampler_variant *samp,
union tex_tile_address addr,
int x0, int y0,
int x1, int y1,
@@ -724,10 +736,10 @@ get_texel_quad_2d(const struct sp_sampler_varient *samp,
-/* 3d varients:
+/* 3d variants:
*/
static INLINE const float *
-get_texel_3d_no_border(const struct sp_sampler_varient *samp,
+get_texel_3d_no_border(const struct sp_sampler_variant *samp,
union tex_tile_address addr, int x, int y, int z)
{
const struct softpipe_tex_cached_tile *tile;
@@ -745,17 +757,16 @@ get_texel_3d_no_border(const struct sp_sampler_varient *samp,
static INLINE const float *
-get_texel_3d(const struct sp_sampler_varient *samp,
+get_texel_3d(const struct sp_sampler_variant *samp,
union tex_tile_address addr, int x, int y, int z)
{
- const struct pipe_resource *texture = samp->texture;
+ const struct pipe_resource *texture = samp->view->texture;
unsigned level = addr.bits.level;
if (x < 0 || x >= (int) u_minify(texture->width0, level) ||
y < 0 || y >= (int) u_minify(texture->height0, level) ||
z < 0 || z >= (int) u_minify(texture->depth0, level)) {
- return sp_tex_tile_cache_border_color(samp->cache,
- samp->sampler->border_color);
+ return samp->sampler->border_color;
}
else {
return get_texel_3d_no_border( samp, addr, x, y, z );
@@ -763,6 +774,43 @@ get_texel_3d(const struct sp_sampler_varient *samp,
}
+/* Get texel pointer for 1D array texture */
+static INLINE const float *
+get_texel_1d_array(const struct sp_sampler_variant *samp,
+ union tex_tile_address addr, int x, int y)
+{
+ const struct pipe_resource *texture = samp->view->texture;
+ unsigned level = addr.bits.level;
+
+ if (x < 0 || x >= (int) u_minify(texture->width0, level)) {
+ return samp->sampler->border_color;
+ }
+ else {
+ return get_texel_2d_no_border(samp, addr, x, y);
+ }
+}
+
+
+/* Get texel pointer for 2D array texture */
+static INLINE const float *
+get_texel_2d_array(const struct sp_sampler_variant *samp,
+ union tex_tile_address addr, int x, int y, int layer)
+{
+ const struct pipe_resource *texture = samp->view->texture;
+ unsigned level = addr.bits.level;
+
+ assert(layer < texture->array_size);
+
+ if (x < 0 || x >= (int) u_minify(texture->width0, level) ||
+ y < 0 || y >= (int) u_minify(texture->height0, level)) {
+ return samp->sampler->border_color;
+ }
+ else {
+ return get_texel_3d_no_border(samp, addr, x, y, layer);
+ }
+}
+
+
/**
* Given the logbase2 of a mipmap's base level size and a mipmap level,
* return the size (in texels) of that mipmap level.
@@ -800,7 +848,7 @@ img_filter_2d_linear_repeat_POT(struct tgsi_sampler *tgsi_sampler,
enum tgsi_sampler_control control,
float rgba[NUM_CHANNELS][QUAD_SIZE])
{
- const struct sp_sampler_varient *samp = sp_sampler_varient(tgsi_sampler);
+ const struct sp_sampler_variant *samp = sp_sampler_variant(tgsi_sampler);
unsigned j;
unsigned level = samp->level;
unsigned xpot = pot_level_size(samp->xpot, level);
@@ -863,7 +911,7 @@ img_filter_2d_nearest_repeat_POT(struct tgsi_sampler *tgsi_sampler,
enum tgsi_sampler_control control,
float rgba[NUM_CHANNELS][QUAD_SIZE])
{
- const struct sp_sampler_varient *samp = sp_sampler_varient(tgsi_sampler);
+ const struct sp_sampler_variant *samp = sp_sampler_variant(tgsi_sampler);
unsigned j;
unsigned level = samp->level;
unsigned xpot = pot_level_size(samp->xpot, level);
@@ -907,7 +955,7 @@ img_filter_2d_nearest_clamp_POT(struct tgsi_sampler *tgsi_sampler,
enum tgsi_sampler_control control,
float rgba[NUM_CHANNELS][QUAD_SIZE])
{
- const struct sp_sampler_varient *samp = sp_sampler_varient(tgsi_sampler);
+ const struct sp_sampler_variant *samp = sp_sampler_variant(tgsi_sampler);
unsigned j;
unsigned level = samp->level;
unsigned xpot = pot_level_size(samp->xpot, level);
@@ -960,8 +1008,8 @@ img_filter_1d_nearest(struct tgsi_sampler *tgsi_sampler,
enum tgsi_sampler_control control,
float rgba[NUM_CHANNELS][QUAD_SIZE])
{
- const struct sp_sampler_varient *samp = sp_sampler_varient(tgsi_sampler);
- const struct pipe_resource *texture = samp->texture;
+ const struct sp_sampler_variant *samp = sp_sampler_variant(tgsi_sampler);
+ const struct pipe_resource *texture = samp->view->texture;
unsigned level0, j;
int width;
int x[4];
@@ -992,6 +1040,47 @@ img_filter_1d_nearest(struct tgsi_sampler *tgsi_sampler,
static void
+img_filter_1d_array_nearest(struct tgsi_sampler *tgsi_sampler,
+ const float s[QUAD_SIZE],
+ const float t[QUAD_SIZE],
+ const float p[QUAD_SIZE],
+ const float c0[QUAD_SIZE],
+ enum tgsi_sampler_control control,
+ float rgba[NUM_CHANNELS][QUAD_SIZE])
+{
+ const struct sp_sampler_variant *samp = sp_sampler_variant(tgsi_sampler);
+ const struct pipe_resource *texture = samp->view->texture;
+ unsigned level0, j;
+ int width;
+ int x[4], layer[4];
+ union tex_tile_address addr;
+
+ level0 = samp->level;
+ width = u_minify(texture->width0, level0);
+
+ assert(width > 0);
+
+ addr.value = 0;
+ addr.bits.level = samp->level;
+
+ samp->nearest_texcoord_s(s, width, x);
+ wrap_array_layer(t, texture->array_size, layer);
+
+ for (j = 0; j < QUAD_SIZE; j++) {
+ const float *out = get_texel_1d_array(samp, addr, x[j], layer[j]);
+ int c;
+ for (c = 0; c < 4; c++) {
+ rgba[c][j] = out[c];
+ }
+ }
+
+ if (DEBUG_TEX) {
+ print_sample(__FUNCTION__, rgba);
+ }
+}
+
+
+static void
img_filter_2d_nearest(struct tgsi_sampler *tgsi_sampler,
const float s[QUAD_SIZE],
const float t[QUAD_SIZE],
@@ -1000,8 +1089,8 @@ img_filter_2d_nearest(struct tgsi_sampler *tgsi_sampler,
enum tgsi_sampler_control control,
float rgba[NUM_CHANNELS][QUAD_SIZE])
{
- const struct sp_sampler_varient *samp = sp_sampler_varient(tgsi_sampler);
- const struct pipe_resource *texture = samp->texture;
+ const struct sp_sampler_variant *samp = sp_sampler_variant(tgsi_sampler);
+ const struct pipe_resource *texture = samp->view->texture;
unsigned level0, j;
int width, height;
int x[4], y[4];
@@ -1035,6 +1124,50 @@ img_filter_2d_nearest(struct tgsi_sampler *tgsi_sampler,
}
+static void
+img_filter_2d_array_nearest(struct tgsi_sampler *tgsi_sampler,
+ const float s[QUAD_SIZE],
+ const float t[QUAD_SIZE],
+ const float p[QUAD_SIZE],
+ const float c0[QUAD_SIZE],
+ enum tgsi_sampler_control control,
+ float rgba[NUM_CHANNELS][QUAD_SIZE])
+{
+ const struct sp_sampler_variant *samp = sp_sampler_variant(tgsi_sampler);
+ const struct pipe_resource *texture = samp->view->texture;
+ unsigned level0, j;
+ int width, height;
+ int x[4], y[4], layer[4];
+ union tex_tile_address addr;
+
+ level0 = samp->level;
+ width = u_minify(texture->width0, level0);
+ height = u_minify(texture->height0, level0);
+
+ assert(width > 0);
+ assert(height > 0);
+
+ addr.value = 0;
+ addr.bits.level = samp->level;
+
+ samp->nearest_texcoord_s(s, width, x);
+ samp->nearest_texcoord_t(t, height, y);
+ wrap_array_layer(p, texture->array_size, layer);
+
+ for (j = 0; j < QUAD_SIZE; j++) {
+ const float *out = get_texel_2d_array(samp, addr, x[j], y[j], layer[j]);
+ int c;
+ for (c = 0; c < 4; c++) {
+ rgba[c][j] = out[c];
+ }
+ }
+
+ if (DEBUG_TEX) {
+ print_sample(__FUNCTION__, rgba);
+ }
+}
+
+
static INLINE union tex_tile_address
face(union tex_tile_address addr, unsigned face )
{
@@ -1052,8 +1185,8 @@ img_filter_cube_nearest(struct tgsi_sampler *tgsi_sampler,
enum tgsi_sampler_control control,
float rgba[NUM_CHANNELS][QUAD_SIZE])
{
- const struct sp_sampler_varient *samp = sp_sampler_varient(tgsi_sampler);
- const struct pipe_resource *texture = samp->texture;
+ const struct sp_sampler_variant *samp = sp_sampler_variant(tgsi_sampler);
+ const struct pipe_resource *texture = samp->view->texture;
const unsigned *faces = samp->faces; /* zero when not cube-mapping */
unsigned level0, j;
int width, height;
@@ -1096,8 +1229,8 @@ img_filter_3d_nearest(struct tgsi_sampler *tgsi_sampler,
enum tgsi_sampler_control control,
float rgba[NUM_CHANNELS][QUAD_SIZE])
{
- const struct sp_sampler_varient *samp = sp_sampler_varient(tgsi_sampler);
- const struct pipe_resource *texture = samp->texture;
+ const struct sp_sampler_variant *samp = sp_sampler_variant(tgsi_sampler);
+ const struct pipe_resource *texture = samp->view->texture;
unsigned level0, j;
int width, height, depth;
int x[4], y[4], z[4];
@@ -1138,8 +1271,8 @@ img_filter_1d_linear(struct tgsi_sampler *tgsi_sampler,
enum tgsi_sampler_control control,
float rgba[NUM_CHANNELS][QUAD_SIZE])
{
- const struct sp_sampler_varient *samp = sp_sampler_varient(tgsi_sampler);
- const struct pipe_resource *texture = samp->texture;
+ const struct sp_sampler_variant *samp = sp_sampler_variant(tgsi_sampler);
+ const struct pipe_resource *texture = samp->view->texture;
unsigned level0, j;
int width;
int x0[4], x1[4];
@@ -1170,6 +1303,47 @@ img_filter_1d_linear(struct tgsi_sampler *tgsi_sampler,
static void
+img_filter_1d_array_linear(struct tgsi_sampler *tgsi_sampler,
+ const float s[QUAD_SIZE],
+ const float t[QUAD_SIZE],
+ const float p[QUAD_SIZE],
+ const float c0[QUAD_SIZE],
+ enum tgsi_sampler_control control,
+ float rgba[NUM_CHANNELS][QUAD_SIZE])
+{
+ const struct sp_sampler_variant *samp = sp_sampler_variant(tgsi_sampler);
+ const struct pipe_resource *texture = samp->view->texture;
+ unsigned level0, j;
+ int width;
+ int x0[4], x1[4], layer[4];
+ float xw[4]; /* weights */
+ union tex_tile_address addr;
+
+ level0 = samp->level;
+ width = u_minify(texture->width0, level0);
+
+ assert(width > 0);
+
+ addr.value = 0;
+ addr.bits.level = samp->level;
+
+ samp->linear_texcoord_s(s, width, x0, x1, xw);
+ wrap_array_layer(t, texture->array_size, layer);
+
+ for (j = 0; j < QUAD_SIZE; j++) {
+ const float *tx0 = get_texel_1d_array(samp, addr, x0[j], layer[j]);
+ const float *tx1 = get_texel_1d_array(samp, addr, x1[j], layer[j]);
+ int c;
+
+ /* interpolate R, G, B, A */
+ for (c = 0; c < 4; c++) {
+ rgba[c][j] = lerp(xw[j], tx0[c], tx1[c]);
+ }
+ }
+}
+
+
+static void
img_filter_2d_linear(struct tgsi_sampler *tgsi_sampler,
const float s[QUAD_SIZE],
const float t[QUAD_SIZE],
@@ -1178,8 +1352,8 @@ img_filter_2d_linear(struct tgsi_sampler *tgsi_sampler,
enum tgsi_sampler_control control,
float rgba[NUM_CHANNELS][QUAD_SIZE])
{
- const struct sp_sampler_varient *samp = sp_sampler_varient(tgsi_sampler);
- const struct pipe_resource *texture = samp->texture;
+ const struct sp_sampler_variant *samp = sp_sampler_variant(tgsi_sampler);
+ const struct pipe_resource *texture = samp->view->texture;
unsigned level0, j;
int width, height;
int x0[4], y0[4], x1[4], y1[4];
@@ -1217,6 +1391,54 @@ img_filter_2d_linear(struct tgsi_sampler *tgsi_sampler,
static void
+img_filter_2d_array_linear(struct tgsi_sampler *tgsi_sampler,
+ const float s[QUAD_SIZE],
+ const float t[QUAD_SIZE],
+ const float p[QUAD_SIZE],
+ const float c0[QUAD_SIZE],
+ enum tgsi_sampler_control control,
+ float rgba[NUM_CHANNELS][QUAD_SIZE])
+{
+ const struct sp_sampler_variant *samp = sp_sampler_variant(tgsi_sampler);
+ const struct pipe_resource *texture = samp->view->texture;
+ unsigned level0, j;
+ int width, height;
+ int x0[4], y0[4], x1[4], y1[4], layer[4];
+ float xw[4], yw[4]; /* weights */
+ union tex_tile_address addr;
+
+ level0 = samp->level;
+ width = u_minify(texture->width0, level0);
+ height = u_minify(texture->height0, level0);
+
+ assert(width > 0);
+ assert(height > 0);
+
+ addr.value = 0;
+ addr.bits.level = samp->level;
+
+ samp->linear_texcoord_s(s, width, x0, x1, xw);
+ samp->linear_texcoord_t(t, height, y0, y1, yw);
+ wrap_array_layer(p, texture->array_size, layer);
+
+ for (j = 0; j < QUAD_SIZE; j++) {
+ const float *tx0 = get_texel_2d_array(samp, addr, x0[j], y0[j], layer[j]);
+ const float *tx1 = get_texel_2d_array(samp, addr, x1[j], y0[j], layer[j]);
+ const float *tx2 = get_texel_2d_array(samp, addr, x0[j], y1[j], layer[j]);
+ const float *tx3 = get_texel_2d_array(samp, addr, x1[j], y1[j], layer[j]);
+ int c;
+
+ /* interpolate R, G, B, A */
+ for (c = 0; c < 4; c++) {
+ rgba[c][j] = lerp_2d(xw[j], yw[j],
+ tx0[c], tx1[c],
+ tx2[c], tx3[c]);
+ }
+ }
+}
+
+
+static void
img_filter_cube_linear(struct tgsi_sampler *tgsi_sampler,
const float s[QUAD_SIZE],
const float t[QUAD_SIZE],
@@ -1225,8 +1447,8 @@ img_filter_cube_linear(struct tgsi_sampler *tgsi_sampler,
enum tgsi_sampler_control control,
float rgba[NUM_CHANNELS][QUAD_SIZE])
{
- const struct sp_sampler_varient *samp = sp_sampler_varient(tgsi_sampler);
- const struct pipe_resource *texture = samp->texture;
+ const struct sp_sampler_variant *samp = sp_sampler_variant(tgsi_sampler);
+ const struct pipe_resource *texture = samp->view->texture;
const unsigned *faces = samp->faces; /* zero when not cube-mapping */
unsigned level0, j;
int width, height;
@@ -1274,8 +1496,8 @@ img_filter_3d_linear(struct tgsi_sampler *tgsi_sampler,
enum tgsi_sampler_control control,
float rgba[NUM_CHANNELS][QUAD_SIZE])
{
- const struct sp_sampler_varient *samp = sp_sampler_varient(tgsi_sampler);
- const struct pipe_resource *texture = samp->texture;
+ const struct sp_sampler_variant *samp = sp_sampler_variant(tgsi_sampler);
+ const struct pipe_resource *texture = samp->view->texture;
unsigned level0, j;
int width, height, depth;
int x0[4], x1[4], y0[4], y1[4], z0[4], z1[4];
@@ -1350,8 +1572,8 @@ mip_filter_linear(struct tgsi_sampler *tgsi_sampler,
enum tgsi_sampler_control control,
float rgba[NUM_CHANNELS][QUAD_SIZE])
{
- struct sp_sampler_varient *samp = sp_sampler_varient(tgsi_sampler);
- const struct pipe_resource *texture = samp->texture;
+ struct sp_sampler_variant *samp = sp_sampler_variant(tgsi_sampler);
+ const struct pipe_resource *texture = samp->view->texture;
int level0;
float lambda;
float lod[QUAD_SIZE];
@@ -1417,8 +1639,8 @@ mip_filter_nearest(struct tgsi_sampler *tgsi_sampler,
enum tgsi_sampler_control control,
float rgba[NUM_CHANNELS][QUAD_SIZE])
{
- struct sp_sampler_varient *samp = sp_sampler_varient(tgsi_sampler);
- const struct pipe_resource *texture = samp->texture;
+ struct sp_sampler_variant *samp = sp_sampler_variant(tgsi_sampler);
+ const struct pipe_resource *texture = samp->view->texture;
float lambda;
float lod[QUAD_SIZE];
@@ -1460,7 +1682,7 @@ mip_filter_none(struct tgsi_sampler *tgsi_sampler,
enum tgsi_sampler_control control,
float rgba[NUM_CHANNELS][QUAD_SIZE])
{
- struct sp_sampler_varient *samp = sp_sampler_varient(tgsi_sampler);
+ struct sp_sampler_variant *samp = sp_sampler_variant(tgsi_sampler);
float lambda;
float lod[QUAD_SIZE];
@@ -1501,8 +1723,8 @@ mip_filter_linear_2d_linear_repeat_POT(
enum tgsi_sampler_control control,
float rgba[NUM_CHANNELS][QUAD_SIZE])
{
- struct sp_sampler_varient *samp = sp_sampler_varient(tgsi_sampler);
- const struct pipe_resource *texture = samp->texture;
+ struct sp_sampler_variant *samp = sp_sampler_variant(tgsi_sampler);
+ const struct pipe_resource *texture = samp->view->texture;
int level0;
float lambda;
float lod[QUAD_SIZE];
@@ -1569,10 +1791,11 @@ sample_compare(struct tgsi_sampler *tgsi_sampler,
enum tgsi_sampler_control control,
float rgba[NUM_CHANNELS][QUAD_SIZE])
{
- struct sp_sampler_varient *samp = sp_sampler_varient(tgsi_sampler);
+ struct sp_sampler_variant *samp = sp_sampler_variant(tgsi_sampler);
const struct pipe_sampler_state *sampler = samp->sampler;
int j, k0, k1, k2, k3;
float val;
+ float pc0, pc1, pc2, pc3;
samp->mip_filter(tgsi_sampler, s, t, p, c0, control, rgba);
@@ -1582,43 +1805,48 @@ sample_compare(struct tgsi_sampler *tgsi_sampler,
* RGBA channels. We look at the red channel here.
*/
+ pc0 = CLAMP(p[0], 0.0F, 1.0F);
+ pc1 = CLAMP(p[1], 0.0F, 1.0F);
+ pc2 = CLAMP(p[2], 0.0F, 1.0F);
+ pc3 = CLAMP(p[3], 0.0F, 1.0F);
+
/* compare four texcoords vs. four texture samples */
switch (sampler->compare_func) {
case PIPE_FUNC_LESS:
- k0 = p[0] < rgba[0][0];
- k1 = p[1] < rgba[0][1];
- k2 = p[2] < rgba[0][2];
- k3 = p[3] < rgba[0][3];
+ k0 = pc0 < rgba[0][0];
+ k1 = pc1 < rgba[0][1];
+ k2 = pc2 < rgba[0][2];
+ k3 = pc3 < rgba[0][3];
break;
case PIPE_FUNC_LEQUAL:
- k0 = p[0] <= rgba[0][0];
- k1 = p[1] <= rgba[0][1];
- k2 = p[2] <= rgba[0][2];
- k3 = p[3] <= rgba[0][3];
+ k0 = pc0 <= rgba[0][0];
+ k1 = pc1 <= rgba[0][1];
+ k2 = pc2 <= rgba[0][2];
+ k3 = pc3 <= rgba[0][3];
break;
case PIPE_FUNC_GREATER:
- k0 = p[0] > rgba[0][0];
- k1 = p[1] > rgba[0][1];
- k2 = p[2] > rgba[0][2];
- k3 = p[3] > rgba[0][3];
+ k0 = pc0 > rgba[0][0];
+ k1 = pc1 > rgba[0][1];
+ k2 = pc2 > rgba[0][2];
+ k3 = pc3 > rgba[0][3];
break;
case PIPE_FUNC_GEQUAL:
- k0 = p[0] >= rgba[0][0];
- k1 = p[1] >= rgba[0][1];
- k2 = p[2] >= rgba[0][2];
- k3 = p[3] >= rgba[0][3];
+ k0 = pc0 >= rgba[0][0];
+ k1 = pc1 >= rgba[0][1];
+ k2 = pc2 >= rgba[0][2];
+ k3 = pc3 >= rgba[0][3];
break;
case PIPE_FUNC_EQUAL:
- k0 = p[0] == rgba[0][0];
- k1 = p[1] == rgba[0][1];
- k2 = p[2] == rgba[0][2];
- k3 = p[3] == rgba[0][3];
+ k0 = pc0 == rgba[0][0];
+ k1 = pc1 == rgba[0][1];
+ k2 = pc2 == rgba[0][2];
+ k3 = pc3 == rgba[0][3];
break;
case PIPE_FUNC_NOTEQUAL:
- k0 = p[0] != rgba[0][0];
- k1 = p[1] != rgba[0][1];
- k2 = p[2] != rgba[0][2];
- k3 = p[3] != rgba[0][3];
+ k0 = pc0 != rgba[0][0];
+ k1 = pc1 != rgba[0][1];
+ k2 = pc2 != rgba[0][2];
+ k3 = pc3 != rgba[0][3];
break;
case PIPE_FUNC_ALWAYS:
k0 = k1 = k2 = k3 = 1;
@@ -1656,7 +1884,7 @@ sample_cube(struct tgsi_sampler *tgsi_sampler,
enum tgsi_sampler_control control,
float rgba[NUM_CHANNELS][QUAD_SIZE])
{
- struct sp_sampler_varient *samp = sp_sampler_varient(tgsi_sampler);
+ struct sp_sampler_variant *samp = sp_sampler_variant(tgsi_sampler);
unsigned j;
float ssss[4], tttt[4];
@@ -1731,6 +1959,86 @@ sample_cube(struct tgsi_sampler *tgsi_sampler,
}
+static void
+sample_swizzle(struct tgsi_sampler *tgsi_sampler,
+ const float s[QUAD_SIZE],
+ const float t[QUAD_SIZE],
+ const float p[QUAD_SIZE],
+ const float c0[QUAD_SIZE],
+ enum tgsi_sampler_control control,
+ float rgba[NUM_CHANNELS][QUAD_SIZE])
+{
+ struct sp_sampler_variant *samp = sp_sampler_variant(tgsi_sampler);
+ float rgba_temp[NUM_CHANNELS][QUAD_SIZE];
+ const unsigned swizzle_r = samp->key.bits.swizzle_r;
+ const unsigned swizzle_g = samp->key.bits.swizzle_g;
+ const unsigned swizzle_b = samp->key.bits.swizzle_b;
+ const unsigned swizzle_a = samp->key.bits.swizzle_a;
+ unsigned j;
+
+ samp->sample_target(tgsi_sampler, s, t, p, c0, control, rgba_temp);
+
+ switch (swizzle_r) {
+ case PIPE_SWIZZLE_ZERO:
+ for (j = 0; j < 4; j++)
+ rgba[0][j] = 0.0f;
+ break;
+ case PIPE_SWIZZLE_ONE:
+ for (j = 0; j < 4; j++)
+ rgba[0][j] = 1.0f;
+ break;
+ default:
+ assert(swizzle_r < 4);
+ for (j = 0; j < 4; j++)
+ rgba[0][j] = rgba_temp[swizzle_r][j];
+ }
+
+ switch (swizzle_g) {
+ case PIPE_SWIZZLE_ZERO:
+ for (j = 0; j < 4; j++)
+ rgba[1][j] = 0.0f;
+ break;
+ case PIPE_SWIZZLE_ONE:
+ for (j = 0; j < 4; j++)
+ rgba[1][j] = 1.0f;
+ break;
+ default:
+ assert(swizzle_g < 4);
+ for (j = 0; j < 4; j++)
+ rgba[1][j] = rgba_temp[swizzle_g][j];
+ }
+
+ switch (swizzle_b) {
+ case PIPE_SWIZZLE_ZERO:
+ for (j = 0; j < 4; j++)
+ rgba[2][j] = 0.0f;
+ break;
+ case PIPE_SWIZZLE_ONE:
+ for (j = 0; j < 4; j++)
+ rgba[2][j] = 1.0f;
+ break;
+ default:
+ assert(swizzle_b < 4);
+ for (j = 0; j < 4; j++)
+ rgba[2][j] = rgba_temp[swizzle_b][j];
+ }
+
+ switch (swizzle_a) {
+ case PIPE_SWIZZLE_ZERO:
+ for (j = 0; j < 4; j++)
+ rgba[3][j] = 0.0f;
+ break;
+ case PIPE_SWIZZLE_ONE:
+ for (j = 0; j < 4; j++)
+ rgba[3][j] = 1.0f;
+ break;
+ default:
+ assert(swizzle_a < 4);
+ for (j = 0; j < 4; j++)
+ rgba[3][j] = rgba_temp[swizzle_a][j];
+ }
+}
+
static wrap_nearest_func
get_nearest_unorm_wrap(unsigned mode)
@@ -1828,8 +2136,10 @@ get_lambda_func(const union sp_sampler_key key)
switch (key.bits.target) {
case PIPE_TEXTURE_1D:
+ case PIPE_TEXTURE_1D_ARRAY:
return compute_lambda_1d;
case PIPE_TEXTURE_2D:
+ case PIPE_TEXTURE_2D_ARRAY:
case PIPE_TEXTURE_RECT:
case PIPE_TEXTURE_CUBE:
return compute_lambda_2d;
@@ -1854,6 +2164,12 @@ get_img_filter(const union sp_sampler_key key,
else
return img_filter_1d_linear;
break;
+ case PIPE_TEXTURE_1D_ARRAY:
+ if (filter == PIPE_TEX_FILTER_NEAREST)
+ return img_filter_1d_array_nearest;
+ else
+ return img_filter_1d_array_linear;
+ break;
case PIPE_TEXTURE_2D:
case PIPE_TEXTURE_RECT:
/* Try for fast path:
@@ -1889,6 +2205,12 @@ get_img_filter(const union sp_sampler_key key,
else
return img_filter_2d_linear;
break;
+ case PIPE_TEXTURE_2D_ARRAY:
+ if (filter == PIPE_TEX_FILTER_NEAREST)
+ return img_filter_2d_array_nearest;
+ else
+ return img_filter_2d_array_linear;
+ break;
case PIPE_TEXTURE_CUBE:
if (filter == PIPE_TEX_FILTER_NEAREST)
return img_filter_cube_nearest;
@@ -1909,16 +2231,17 @@ get_img_filter(const union sp_sampler_key key,
/**
- * Bind the given texture object and texture cache to the sampler varient.
+ * Bind the given texture object and texture cache to the sampler variant.
*/
void
-sp_sampler_varient_bind_texture( struct sp_sampler_varient *samp,
- struct softpipe_tex_tile_cache *tex_cache,
- const struct pipe_resource *texture )
+sp_sampler_variant_bind_view( struct sp_sampler_variant *samp,
+ struct softpipe_tex_tile_cache *tex_cache,
+ const struct pipe_sampler_view *view )
{
const struct pipe_sampler_state *sampler = samp->sampler;
+ const struct pipe_resource *texture = view->texture;
- samp->texture = texture;
+ samp->view = view;
samp->cache = tex_cache;
samp->xpot = util_unsigned_logbase2( texture->width0 );
samp->ypot = util_unsigned_logbase2( texture->height0 );
@@ -1927,20 +2250,20 @@ sp_sampler_varient_bind_texture( struct sp_sampler_varient *samp,
void
-sp_sampler_varient_destroy( struct sp_sampler_varient *samp )
+sp_sampler_variant_destroy( struct sp_sampler_variant *samp )
{
FREE(samp);
}
/**
- * Create a sampler varient for a given set of non-orthogonal state.
+ * Create a sampler variant for a given set of non-orthogonal state.
*/
-struct sp_sampler_varient *
-sp_create_sampler_varient( const struct pipe_sampler_state *sampler,
+struct sp_sampler_variant *
+sp_create_sampler_variant( const struct pipe_sampler_state *sampler,
const union sp_sampler_key key )
{
- struct sp_sampler_varient *samp = CALLOC_STRUCT(sp_sampler_varient);
+ struct sp_sampler_variant *samp = CALLOC_STRUCT(sp_sampler_variant);
if (!samp)
return NULL;
@@ -2015,7 +2338,7 @@ sp_create_sampler_varient( const struct pipe_sampler_state *sampler,
}
if (key.bits.target == PIPE_TEXTURE_CUBE) {
- samp->base.get_samples = sample_cube;
+ samp->sample_target = sample_cube;
}
else {
samp->faces[0] = 0;
@@ -2026,7 +2349,17 @@ sp_create_sampler_varient( const struct pipe_sampler_state *sampler,
/* Skip cube face determination by promoting the compare
* function pointer:
*/
- samp->base.get_samples = samp->compare;
+ samp->sample_target = samp->compare;
+ }
+
+ if (key.bits.swizzle_r != PIPE_SWIZZLE_RED ||
+ key.bits.swizzle_g != PIPE_SWIZZLE_GREEN ||
+ key.bits.swizzle_b != PIPE_SWIZZLE_BLUE ||
+ key.bits.swizzle_a != PIPE_SWIZZLE_ALPHA) {
+ samp->base.get_samples = sample_swizzle;
+ }
+ else {
+ samp->base.get_samples = samp->sample_target;
}
return samp;
diff --git a/src/gallium/drivers/softpipe/sp_tex_sample.h b/src/gallium/drivers/softpipe/sp_tex_sample.h
index 6114acf7371..f0b867edc6e 100644
--- a/src/gallium/drivers/softpipe/sp_tex_sample.h
+++ b/src/gallium/drivers/softpipe/sp_tex_sample.h
@@ -32,7 +32,7 @@
#include "tgsi/tgsi_exec.h"
-struct sp_sampler_varient;
+struct sp_sampler_variant;
typedef void (*wrap_nearest_func)(const float s[4],
unsigned size,
@@ -44,7 +44,7 @@ typedef void (*wrap_linear_func)(const float s[4],
int icoord1[4],
float w[4]);
-typedef float (*compute_lambda_func)(const struct sp_sampler_varient *sampler,
+typedef float (*compute_lambda_func)(const struct sp_sampler_variant *sampler,
const float s[QUAD_SIZE],
const float t[QUAD_SIZE],
const float p[QUAD_SIZE]);
@@ -64,7 +64,11 @@ union sp_sampler_key {
unsigned is_pot:1;
unsigned processor:2;
unsigned unit:4;
- unsigned pad:22;
+ unsigned swizzle_r:3;
+ unsigned swizzle_g:3;
+ unsigned swizzle_b:3;
+ unsigned swizzle_a:3;
+ unsigned pad:10;
} bits;
unsigned value;
};
@@ -72,7 +76,7 @@ union sp_sampler_key {
/**
* Subclass of tgsi_sampler
*/
-struct sp_sampler_varient
+struct sp_sampler_variant
{
struct tgsi_sampler base; /**< base class */
@@ -85,7 +89,7 @@ struct sp_sampler_varient
/* Currently bound texture:
*/
- const struct pipe_resource *texture;
+ const struct pipe_sampler_view *view;
struct softpipe_tex_tile_cache *cache;
unsigned processor;
@@ -113,32 +117,33 @@ struct sp_sampler_varient
filter_func mip_filter;
filter_func compare;
+ filter_func sample_target;
/* Linked list:
*/
- struct sp_sampler_varient *next;
+ struct sp_sampler_variant *next;
};
struct sp_sampler;
-/* Create a sampler varient for a given set of non-orthogonal state. Currently the
+/* Create a sampler variant for a given set of non-orthogonal state. Currently the
*/
-struct sp_sampler_varient *
-sp_create_sampler_varient( const struct pipe_sampler_state *sampler,
+struct sp_sampler_variant *
+sp_create_sampler_variant( const struct pipe_sampler_state *sampler,
const union sp_sampler_key key );
-void sp_sampler_varient_bind_texture( struct sp_sampler_varient *varient,
- struct softpipe_tex_tile_cache *tex_cache,
- const struct pipe_resource *tex );
+void sp_sampler_variant_bind_view( struct sp_sampler_variant *variant,
+ struct softpipe_tex_tile_cache *tex_cache,
+ const struct pipe_sampler_view *view );
-void sp_sampler_varient_destroy( struct sp_sampler_varient * );
+void sp_sampler_variant_destroy( struct sp_sampler_variant * );
-static INLINE struct sp_sampler_varient *
-sp_sampler_varient(const struct tgsi_sampler *sampler)
+static INLINE struct sp_sampler_variant *
+sp_sampler_variant(const struct tgsi_sampler *sampler)
{
- return (struct sp_sampler_varient *) sampler;
+ return (struct sp_sampler_variant *) sampler;
}
extern void
diff --git a/src/gallium/drivers/softpipe/sp_tex_tile_cache.c b/src/gallium/drivers/softpipe/sp_tex_tile_cache.c
index 1393164150e..e589ee7c841 100644
--- a/src/gallium/drivers/softpipe/sp_tex_tile_cache.c
+++ b/src/gallium/drivers/softpipe/sp_tex_tile_cache.c
@@ -251,6 +251,7 @@ sp_find_cached_tile_tex(struct softpipe_tex_tile_cache *tc,
tc->tex_level != addr.bits.level ||
tc->tex_z != addr.bits.z) {
/* get new transfer (view into texture) */
+ unsigned width, height, layer;
if (tc->tex_trans) {
if (tc->tex_trans_map) {
@@ -262,14 +263,22 @@ sp_find_cached_tile_tex(struct softpipe_tex_tile_cache *tc,
tc->tex_trans = NULL;
}
+ width = u_minify(tc->texture->width0, addr.bits.level);
+ if (tc->texture->target == PIPE_TEXTURE_1D_ARRAY) {
+ height = tc->texture->array_size;
+ layer = 0;
+ }
+ else {
+ height = u_minify(tc->texture->height0, addr.bits.level);
+ layer = addr.bits.face + addr.bits.z;
+ }
+
tc->tex_trans =
pipe_get_transfer(tc->pipe, tc->texture,
addr.bits.level,
- addr.bits.face + addr.bits.z,
+ layer,
PIPE_TRANSFER_READ | PIPE_TRANSFER_UNSYNCHRONIZED,
- 0, 0,
- u_minify(tc->texture->width0, addr.bits.level),
- u_minify(tc->texture->height0, addr.bits.level));
+ 0, 0, width, height);
tc->tex_trans_map = tc->pipe->transfer_map(tc->pipe, tc->tex_trans);
@@ -278,45 +287,21 @@ sp_find_cached_tile_tex(struct softpipe_tex_tile_cache *tc,
tc->tex_z = addr.bits.z;
}
- /* get tile from the transfer (view into texture) */
- pipe_get_tile_swizzle(tc->pipe,
- tc->tex_trans,
- addr.bits.x * TILE_SIZE,
- addr.bits.y * TILE_SIZE,
- TILE_SIZE,
- TILE_SIZE,
- tc->swizzle_r,
- tc->swizzle_g,
- tc->swizzle_b,
- tc->swizzle_a,
- tc->format,
- (float *) tile->data.color);
+ /* Get tile from the transfer (view into texture), explicitly passing
+ * the image format.
+ */
+ pipe_get_tile_rgba_format(tc->pipe,
+ tc->tex_trans,
+ addr.bits.x * TILE_SIZE,
+ addr.bits.y * TILE_SIZE,
+ TILE_SIZE,
+ TILE_SIZE,
+ tc->format,
+ (float *) tile->data.color);
+
tile->addr = addr;
}
tc->last_tile = tile;
return tile;
}
-
-
-
-/**
- * Return the swizzled border color.
- */
-const float *
-sp_tex_tile_cache_border_color(struct softpipe_tex_tile_cache *tc,
- const float border_color[4])
-{
- float rgba01[6];
-
- COPY_4V(rgba01, border_color);
- rgba01[PIPE_SWIZZLE_ZERO] = 0.0f;
- rgba01[PIPE_SWIZZLE_ONE] = 1.0f;
-
- tc->swz_border_color[0] = rgba01[tc->swizzle_r];
- tc->swz_border_color[1] = rgba01[tc->swizzle_g];
- tc->swz_border_color[2] = rgba01[tc->swizzle_b];
- tc->swz_border_color[3] = rgba01[tc->swizzle_a];
-
- return tc->swz_border_color;
-}
diff --git a/src/gallium/drivers/softpipe/sp_tex_tile_cache.h b/src/gallium/drivers/softpipe/sp_tex_tile_cache.h
index e0b66bf3f7c..9bced37990a 100644
--- a/src/gallium/drivers/softpipe/sp_tex_tile_cache.h
+++ b/src/gallium/drivers/softpipe/sp_tex_tile_cache.h
@@ -92,11 +92,9 @@ struct softpipe_tex_tile_cache
unsigned swizzle_g;
unsigned swizzle_b;
unsigned swizzle_a;
- unsigned format;
+ enum pipe_format format;
struct softpipe_tex_cached_tile *last_tile; /**< most recently retrieved tile */
-
- float swz_border_color[4]; /**< swizzled border color */
};
@@ -161,10 +159,5 @@ sp_get_cached_tile_tex(struct softpipe_tex_tile_cache *tc,
}
-const float *
-sp_tex_tile_cache_border_color(struct softpipe_tex_tile_cache *tc,
- const float border_color[4]);
-
-
#endif /* SP_TEX_TILE_CACHE_H */
diff --git a/src/gallium/drivers/softpipe/sp_texture.c b/src/gallium/drivers/softpipe/sp_texture.c
index 509d9982b17..95374c34ec3 100644
--- a/src/gallium/drivers/softpipe/sp_texture.c
+++ b/src/gallium/drivers/softpipe/sp_texture.c
@@ -62,13 +62,21 @@ softpipe_resource_layout(struct pipe_screen *screen,
unsigned buffer_size = 0;
for (level = 0; level <= pt->last_level; level++) {
+ unsigned slices;
+
+ if (pt->target == PIPE_TEXTURE_CUBE)
+ slices = 6;
+ else if (pt->target == PIPE_TEXTURE_3D)
+ slices = depth;
+ else
+ slices = pt->array_size;
+
spr->stride[level] = util_format_get_stride(pt->format, width);
spr->level_offset[level] = buffer_size;
buffer_size += (util_format_get_nblocksy(pt->format, height) *
- ((pt->target == PIPE_TEXTURE_CUBE) ? 6 : depth) *
- spr->stride[level]);
+ slices * spr->stride[level]);
width = u_minify(width, 1);
height = u_minify(height, 1);
@@ -227,9 +235,13 @@ sp_get_tex_image_offset(const struct softpipe_resource *spr,
unsigned offset = spr->level_offset[level];
if (spr->base.target == PIPE_TEXTURE_CUBE ||
- spr->base.target == PIPE_TEXTURE_3D) {
+ spr->base.target == PIPE_TEXTURE_3D ||
+ spr->base.target == PIPE_TEXTURE_2D_ARRAY) {
offset += layer * nblocksy * spr->stride[level];
}
+ else if (spr->base.target == PIPE_TEXTURE_1D_ARRAY) {
+ offset += layer * spr->stride[level];
+ }
else {
assert(layer == 0);
}
@@ -292,7 +304,7 @@ softpipe_surface_destroy(struct pipe_context *pipe,
* a resource object.
* \param pipe rendering context
* \param resource the resource to transfer in/out of
- * \param sr indicates cube face or 3D texture slice
+ * \param level which mipmap level
* \param usage bitmask of PIPE_TRANSFER_x flags
* \param box the 1D/2D/3D region of interest
*/
@@ -311,8 +323,21 @@ softpipe_get_transfer(struct pipe_context *pipe,
/* make sure the requested region is in the image bounds */
assert(box->x + box->width <= u_minify(resource->width0, level));
- assert(box->y + box->height <= u_minify(resource->height0, level));
- assert(box->z + box->depth <= (u_minify(resource->depth0, level) + resource->array_size - 1));
+ if (resource->target == PIPE_TEXTURE_1D_ARRAY) {
+ assert(box->y + box->height <= resource->array_size);
+ }
+ else {
+ assert(box->y + box->height <= u_minify(resource->height0, level));
+ if (resource->target == PIPE_TEXTURE_2D_ARRAY) {
+ assert(box->z + box->depth <= resource->array_size);
+ }
+ else if (resource->target == PIPE_TEXTURE_CUBE) {
+ assert(box->z < 6);
+ }
+ else {
+ assert(box->z + box->depth <= (u_minify(resource->depth0, level)));
+ }
+ }
/*
* Transfers, like other pipe operations, must happen in order, so flush the
diff --git a/src/gallium/drivers/softpipe/sp_tile_cache.c b/src/gallium/drivers/softpipe/sp_tile_cache.c
index 480860af63b..60870b8bee5 100644
--- a/src/gallium/drivers/softpipe/sp_tile_cache.c
+++ b/src/gallium/drivers/softpipe/sp_tile_cache.c
@@ -357,11 +357,12 @@ sp_flush_tile(struct softpipe_tile_cache* tc, unsigned pos)
tc->entries[pos]->data.depth32, 0/*STRIDE*/);
}
else {
- pipe_put_tile_rgba(tc->pipe, tc->transfer,
- tc->tile_addrs[pos].bits.x * TILE_SIZE,
- tc->tile_addrs[pos].bits.y * TILE_SIZE,
- TILE_SIZE, TILE_SIZE,
- (float *) tc->entries[pos]->data.color);
+ pipe_put_tile_rgba_format(tc->pipe, tc->transfer,
+ tc->tile_addrs[pos].bits.x * TILE_SIZE,
+ tc->tile_addrs[pos].bits.y * TILE_SIZE,
+ TILE_SIZE, TILE_SIZE,
+ tc->surface->format,
+ (float *) tc->entries[pos]->data.color);
}
tc->tile_addrs[pos].bits.invalid = 1; /* mark as empty */
}
@@ -468,11 +469,12 @@ sp_find_cached_tile(struct softpipe_tile_cache *tc,
tile->data.depth32, 0/*STRIDE*/);
}
else {
- pipe_put_tile_rgba(tc->pipe, pt,
- tc->tile_addrs[pos].bits.x * TILE_SIZE,
- tc->tile_addrs[pos].bits.y * TILE_SIZE,
- TILE_SIZE, TILE_SIZE,
- (float *) tile->data.color);
+ pipe_put_tile_rgba_format(tc->pipe, pt,
+ tc->tile_addrs[pos].bits.x * TILE_SIZE,
+ tc->tile_addrs[pos].bits.y * TILE_SIZE,
+ TILE_SIZE, TILE_SIZE,
+ tc->surface->format,
+ (float *) tile->data.color);
}
}
diff --git a/src/gallium/drivers/svga/svga_cmd.c b/src/gallium/drivers/svga/svga_cmd.c
index 05eab8a517d..1ed1d5d25bb 100644
--- a/src/gallium/drivers/svga/svga_cmd.c
+++ b/src/gallium/drivers/svga/svga_cmd.c
@@ -422,7 +422,8 @@ SVGA3D_SurfaceDMA(struct svga_winsys_context *swc,
struct svga_transfer *st, // IN
SVGA3dTransferType transfer, // IN
const SVGA3dCopyBox *boxes, // IN
- uint32 numBoxes) // IN
+ uint32 numBoxes, // IN
+ SVGA3dSurfaceDMAFlags flags) // IN
{
struct svga_texture *texture = svga_texture(st->base.resource);
SVGA3dCmdSurfaceDMA *cmd;
@@ -465,7 +466,7 @@ SVGA3D_SurfaceDMA(struct svga_winsys_context *swc,
pSuffix = (SVGA3dCmdSurfaceDMASuffix *)((uint8_t*)cmd + sizeof *cmd + boxesSize);
pSuffix->suffixSize = sizeof *pSuffix;
pSuffix->maximumOffset = st->hw_nblocksy*st->base.stride;
- memset(&pSuffix->flags, 0, sizeof pSuffix->flags);
+ pSuffix->flags = flags;
swc->commit(swc);
diff --git a/src/gallium/drivers/svga/svga_cmd.h b/src/gallium/drivers/svga/svga_cmd.h
index 0e568d78e65..223ab17df81 100644
--- a/src/gallium/drivers/svga/svga_cmd.h
+++ b/src/gallium/drivers/svga/svga_cmd.h
@@ -102,7 +102,8 @@ SVGA3D_SurfaceDMA(struct svga_winsys_context *swc,
struct svga_transfer *st,
SVGA3dTransferType transfer,
const SVGA3dCopyBox *boxes,
- uint32 numBoxes);
+ uint32 numBoxes,
+ SVGA3dSurfaceDMAFlags flags);
enum pipe_error
SVGA3D_BufferDMA(struct svga_winsys_context *swc,
diff --git a/src/gallium/drivers/svga/svga_context.c b/src/gallium/drivers/svga/svga_context.c
index 1e513f1039f..4782b4bf70e 100644
--- a/src/gallium/drivers/svga/svga_context.c
+++ b/src/gallium/drivers/svga/svga_context.c
@@ -34,6 +34,7 @@
#include "svga_context.h"
#include "svga_screen.h"
+#include "svga_surface.h"
#include "svga_resource_texture.h"
#include "svga_resource_buffer.h"
#include "svga_resource.h"
@@ -43,6 +44,12 @@
#include "svga_debug.h"
#include "svga_state.h"
+DEBUG_GET_ONCE_BOOL_OPTION(no_swtnl, "SVGA_NO_SWTNL", FALSE)
+DEBUG_GET_ONCE_BOOL_OPTION(force_swtnl, "SVGA_FORCE_SWTNL", FALSE);
+DEBUG_GET_ONCE_BOOL_OPTION(use_min_mipmap, "SVGA_USE_MIN_MIPMAP", FALSE);
+DEBUG_GET_ONCE_NUM_OPTION(disable_shader, "SVGA_DISABLE_SHADER", ~0);
+DEBUG_GET_ONCE_BOOL_OPTION(no_line_width, "SVGA_NO_LINE_WIDTH", FALSE);
+DEBUG_GET_ONCE_BOOL_OPTION(force_hw_line_stipple, "SVGA_FORCE_HW_LINE_STIPPLE", FALSE);
static void svga_destroy( struct pipe_context *pipe )
{
@@ -113,13 +120,12 @@ struct pipe_context *svga_context_create( struct pipe_screen *screen,
/* debug */
- svga->debug.no_swtnl = debug_get_bool_option("SVGA_NO_SWTNL", FALSE);
- svga->debug.force_swtnl = debug_get_bool_option("SVGA_FORCE_SWTNL", FALSE);
- svga->debug.use_min_mipmap = debug_get_bool_option("SVGA_USE_MIN_MIPMAP", FALSE);
- svga->debug.disable_shader = debug_get_num_option("SVGA_DISABLE_SHADER", ~0);
-
- if (!svga_init_swtnl(svga))
- goto no_swtnl;
+ svga->debug.no_swtnl = debug_get_option_no_swtnl();
+ svga->debug.force_swtnl = debug_get_option_force_swtnl();
+ svga->debug.use_min_mipmap = debug_get_option_use_min_mipmap();
+ svga->debug.disable_shader = debug_get_option_disable_shader();
+ svga->debug.no_line_width = debug_get_option_no_line_width();
+ svga->debug.force_hw_line_stipple = debug_get_option_force_hw_line_stipple();
svga->fs_bm = util_bitmask_create();
if (svga->fs_bm == NULL)
@@ -149,6 +155,8 @@ struct pipe_context *svga_context_create( struct pipe_screen *screen,
if (svga->hwtnl == NULL)
goto no_hwtnl;
+ if (!svga_init_swtnl(svga))
+ goto no_swtnl;
ret = svga_emit_initial_state( svga );
if (ret)
@@ -171,6 +179,8 @@ struct pipe_context *svga_context_create( struct pipe_screen *screen,
return &svga->pipe;
no_state:
+ svga_destroy_swtnl(svga);
+no_swtnl:
svga_hwtnl_destroy( svga->hwtnl );
no_hwtnl:
u_upload_destroy( svga->upload_vb );
@@ -181,8 +191,6 @@ no_upload_ib:
no_vs_bm:
util_bitmask_destroy( svga->fs_bm );
no_fs_bm:
- svga_destroy_swtnl(svga);
-no_swtnl:
svga->swc->destroy(svga->swc);
no_swc:
FREE(svga);
@@ -196,14 +204,10 @@ void svga_context_flush( struct svga_context *svga,
{
struct svga_screen *svgascreen = svga_screen(svga->pipe.screen);
struct pipe_fence_handle *fence = NULL;
+ enum pipe_error ret;
svga->curr.nr_fbs = 0;
- /* Unmap upload manager buffers:
- */
- u_upload_flush(svga->upload_vb);
- u_upload_flush(svga->upload_ib);
-
/* Ensure that texture dma uploads are processed
* before submitting commands.
*/
@@ -220,9 +224,25 @@ void svga_context_flush( struct svga_context *svga,
*/
svga->dirty |= SVGA_NEW_COMMAND_BUFFER;
+ /*
+ * We must reemit the surface bindings here, because svga_update_state
+ * will always flush the primitives before processing the
+ * SVGA_NEW_COMMAND_BUFFER state change.
+ *
+ * TODO: Refactor this.
+ */
+ ret = svga_reemit_framebuffer_bindings(svga);
+ assert(ret == PIPE_OK);
+
+ ret = svga_reemit_tss_bindings(svga);
+ assert(ret == PIPE_OK);
+
+ svga->dirty &= ~SVGA_NEW_COMMAND_BUFFER;
+
if (SVGA_DEBUG & DEBUG_SYNC) {
if (fence)
- svga->pipe.screen->fence_finish( svga->pipe.screen, fence, 0);
+ svga->pipe.screen->fence_finish( svga->pipe.screen, fence,
+ PIPE_TIMEOUT_INFINITE);
}
if(pfence)
@@ -245,6 +265,30 @@ void svga_hwtnl_flush_retry( struct svga_context *svga )
assert(ret == 0);
}
+
+/* Emit all operations pending on host surfaces.
+ */
+void svga_surfaces_flush(struct svga_context *svga)
+{
+ unsigned i;
+
+ /* Emit buffered drawing commands.
+ */
+ svga_hwtnl_flush_retry( svga );
+
+ /* Emit back-copy from render target view to texture.
+ */
+ for (i = 0; i < PIPE_MAX_COLOR_BUFS; i++) {
+ if (svga->curr.framebuffer.cbufs[i])
+ svga_propagate_surface(svga, svga->curr.framebuffer.cbufs[i]);
+ }
+
+ if (svga->curr.framebuffer.zsbuf)
+ svga_propagate_surface(svga, svga->curr.framebuffer.zsbuf);
+
+}
+
+
struct svga_winsys_context *
svga_winsys_context( struct pipe_context *pipe )
{
diff --git a/src/gallium/drivers/svga/svga_context.h b/src/gallium/drivers/svga/svga_context.h
index 04e281a506d..7b36a3606e0 100644
--- a/src/gallium/drivers/svga/svga_context.h
+++ b/src/gallium/drivers/svga/svga_context.h
@@ -35,6 +35,8 @@
#include "tgsi/tgsi_scan.h"
+#include "svga_state.h"
+
#define SVGA_TEX_UNITS 8
#define SVGA_MAX_POINTSIZE 80.0
@@ -147,7 +149,14 @@ struct svga_rasterizer_state {
float pointsize;
unsigned hw_unfilled:16; /* PIPE_POLYGON_MODE_x */
- unsigned need_pipeline:16; /* which prims do we need help for? */
+
+ /** Which prims do we need help for? Bitmask of (1 << PIPE_PRIM_x) flags */
+ unsigned need_pipeline:16;
+
+ /** For debugging: */
+ const char* need_pipeline_tris_str;
+ const char* need_pipeline_lines_str;
+ const char* need_pipeline_points_str;
};
struct svga_sampler_state {
@@ -237,7 +246,7 @@ struct svga_prescale {
};
-/* Updated by calling svga_update_state( SVGA_STATE_HW_VIEWPORT )
+/* Updated by calling svga_update_state( SVGA_STATE_HW_CLEAR )
*/
struct svga_hw_clear_state
{
@@ -288,6 +297,11 @@ struct svga_sw_state
boolean need_swvfetch;
boolean need_pipeline;
boolean need_swtnl;
+
+ /* Flag to make sure that need sw is on while
+ * updating state within a swtnl call.
+ */
+ boolean in_swtnl_draw;
};
@@ -312,6 +326,9 @@ struct svga_context
unsigned shader_id;
unsigned disable_shader;
+
+ boolean no_line_width;
+ boolean force_hw_line_stipple;
} debug;
struct {
@@ -327,7 +344,7 @@ struct svga_context
struct util_bitmask *vs_bm;
struct {
- unsigned dirty[4];
+ unsigned dirty[SVGA_STATE_MAX];
unsigned texture_timestamp;
@@ -350,6 +367,9 @@ struct svga_context
/** List of buffers with queued transfers */
struct list_head dirty_buffers;
+
+ /** Was the previous draw done with the SW path? */
+ boolean prev_draw_swtnl;
};
/* A flag for each state_tracker state object:
@@ -433,6 +453,8 @@ void svga_context_flush( struct svga_context *svga,
void svga_hwtnl_flush_retry( struct svga_context *svga );
+void svga_surfaces_flush(struct svga_context *svga);
+
struct pipe_context *
svga_context_create(struct pipe_screen *screen,
void *priv);
diff --git a/src/gallium/drivers/svga/svga_draw.c b/src/gallium/drivers/svga/svga_draw.c
index 81dd4778d0a..2c873a0f7ac 100644
--- a/src/gallium/drivers/svga/svga_draw.c
+++ b/src/gallium/drivers/svga/svga_draw.c
@@ -28,6 +28,7 @@
#include "pipe/p_defines.h"
#include "util/u_memory.h"
#include "util/u_math.h"
+#include "util/u_upload_mgr.h"
#include "svga_context.h"
#include "svga_draw.h"
@@ -143,6 +144,9 @@ svga_hwtnl_flush( struct svga_hwtnl *hwtnl )
SVGA3dPrimitiveRange *prim;
unsigned i;
+ /* Unmap upload manager vertex buffers */
+ u_upload_flush(svga->upload_vb);
+
for (i = 0; i < hwtnl->cmd.vdecl_count; i++) {
handle = svga_buffer_handle(svga, hwtnl->cmd.vdecl_vb[i]);
if (handle == NULL)
@@ -151,6 +155,9 @@ svga_hwtnl_flush( struct svga_hwtnl *hwtnl )
vb_handle[i] = handle;
}
+ /* Unmap upload manager index buffers */
+ u_upload_flush(svga->upload_ib);
+
for (i = 0; i < hwtnl->cmd.prim_count; i++) {
if (hwtnl->cmd.prim_ib[i]) {
handle = svga_buffer_handle(svga, hwtnl->cmd.prim_ib[i]);
@@ -315,7 +322,6 @@ enum pipe_error svga_hwtnl_prim( struct svga_hwtnl *hwtnl,
break;
}
- assert(!stride || width <= stride);
if (max_index != ~0) {
assert(offset + (index_bias + max_index) * stride + width <= size);
}
diff --git a/src/gallium/drivers/svga/svga_draw_arrays.c b/src/gallium/drivers/svga/svga_draw_arrays.c
index da33fae62f1..a6518042eb9 100644
--- a/src/gallium/drivers/svga/svga_draw_arrays.c
+++ b/src/gallium/drivers/svga/svga_draw_arrays.c
@@ -53,6 +53,7 @@ static enum pipe_error generate_indices( struct svga_hwtnl *hwtnl,
dst = pipe_buffer_create( pipe->screen,
PIPE_BIND_INDEX_BUFFER,
+ PIPE_USAGE_STATIC,
size );
if (dst == NULL)
goto fail;
@@ -65,14 +66,14 @@ static enum pipe_error generate_indices( struct svga_hwtnl *hwtnl,
generate( nr,
dst_map );
- pipe_buffer_unmap( pipe, dst, transfer );
+ pipe_buffer_unmap( pipe, transfer );
*out_buf = dst;
return PIPE_OK;
fail:
if (dst_map)
- pipe_buffer_unmap( pipe, dst, transfer );
+ pipe_buffer_unmap( pipe, transfer );
if (dst)
pipe->screen->resource_destroy( pipe->screen, dst );
diff --git a/src/gallium/drivers/svga/svga_draw_elements.c b/src/gallium/drivers/svga/svga_draw_elements.c
index c4579177b77..7d420c6b295 100644
--- a/src/gallium/drivers/svga/svga_draw_elements.c
+++ b/src/gallium/drivers/svga/svga_draw_elements.c
@@ -56,6 +56,7 @@ translate_indices( struct svga_hwtnl *hwtnl,
dst = pipe_buffer_create( pipe->screen,
PIPE_BIND_INDEX_BUFFER,
+ PIPE_USAGE_STATIC,
size );
if (dst == NULL)
goto fail;
@@ -72,18 +73,18 @@ translate_indices( struct svga_hwtnl *hwtnl,
nr,
dst_map );
- pipe_buffer_unmap( pipe, src, src_transfer );
- pipe_buffer_unmap( pipe, dst, dst_transfer );
+ pipe_buffer_unmap( pipe, src_transfer );
+ pipe_buffer_unmap( pipe, dst_transfer );
*out_buf = dst;
return PIPE_OK;
fail:
if (src_map)
- pipe_buffer_unmap( pipe, src, src_transfer );
+ pipe_buffer_unmap( pipe, src_transfer );
if (dst_map)
- pipe_buffer_unmap( pipe, dst, dst_transfer );
+ pipe_buffer_unmap( pipe, dst_transfer );
if (dst)
pipe->screen->resource_destroy( pipe->screen, dst );
@@ -120,14 +121,17 @@ svga_hwtnl_simple_draw_range_elements( struct svga_hwtnl *hwtnl,
if (index_buffer &&
svga_buffer_is_user_buffer(index_buffer))
{
+ boolean flushed;
assert( index_buffer->width0 >= index_offset + count * index_size );
ret = u_upload_buffer( hwtnl->upload_ib,
+ 0,
index_offset,
count * index_size,
index_buffer,
&index_offset,
- &upload_buffer );
+ &upload_buffer,
+ &flushed );
if (ret)
goto done;
diff --git a/src/gallium/drivers/svga/svga_pipe_blit.c b/src/gallium/drivers/svga/svga_pipe_blit.c
index 426698806c8..c87afb6946c 100644
--- a/src/gallium/drivers/svga/svga_pipe_blit.c
+++ b/src/gallium/drivers/svga/svga_pipe_blit.c
@@ -50,7 +50,9 @@ static void svga_surface_copy(struct pipe_context *pipe,
struct pipe_surface *srcsurf, *dstsurf;*/
unsigned dst_face, dst_z, src_face, src_z;
- svga_hwtnl_flush_retry( svga );
+ /* Emit buffered drawing commands, and any back copies.
+ */
+ svga_surfaces_flush( svga );
#if 0
srcsurf = screen->get_tex_surface(screen, src_tex,
diff --git a/src/gallium/drivers/svga/svga_pipe_draw.c b/src/gallium/drivers/svga/svga_pipe_draw.c
index 001ec3616c4..fda5c28433c 100644
--- a/src/gallium/drivers/svga/svga_pipe_draw.c
+++ b/src/gallium/drivers/svga/svga_pipe_draw.c
@@ -157,6 +157,14 @@ svga_draw_vbo(struct pipe_context *pipe, const struct pipe_draw_info *info)
if (!u_trim_pipe_prim( info->mode, &count ))
return;
+ if (svga->state.sw.need_swtnl != svga->prev_draw_swtnl) {
+ /* We're switching between SW and HW drawing. Do a flush to avoid
+ * mixing HW and SW rendering with the same vertex buffer.
+ */
+ pipe->flush(pipe, NULL);
+ svga->prev_draw_swtnl = svga->state.sw.need_swtnl;
+ }
+
/*
* Mark currently bound target surfaces as dirty
* doesn't really matter if it is done before drawing.
diff --git a/src/gallium/drivers/svga/svga_pipe_flush.c b/src/gallium/drivers/svga/svga_pipe_flush.c
index ab243aa6ec5..4578c136cb8 100644
--- a/src/gallium/drivers/svga/svga_pipe_flush.c
+++ b/src/gallium/drivers/svga/svga_pipe_flush.c
@@ -24,6 +24,7 @@
**********************************************************/
#include "pipe/p_defines.h"
+#include "util/u_string.h"
#include "svga_screen.h"
#include "svga_surface.h"
#include "svga_context.h"
@@ -31,31 +32,40 @@
static void svga_flush( struct pipe_context *pipe,
- unsigned flags,
struct pipe_fence_handle **fence )
{
struct svga_context *svga = svga_context(pipe);
- int i;
- /* Emit buffered drawing commands.
+ /* Emit buffered drawing commands, and any back copies.
*/
- svga_hwtnl_flush_retry( svga );
-
- /* Emit back-copy from render target view to texture.
- */
- for (i = 0; i < PIPE_MAX_COLOR_BUFS; i++) {
- if (svga->curr.framebuffer.cbufs[i])
- svga_propagate_surface(pipe, svga->curr.framebuffer.cbufs[i]);
- }
- if (svga->curr.framebuffer.zsbuf)
- svga_propagate_surface(pipe, svga->curr.framebuffer.zsbuf);
+ svga_surfaces_flush( svga );
/* Flush command queue.
*/
svga_context_flush(svga, fence);
- SVGA_DBG(DEBUG_DMA|DEBUG_PERF, "%s flags %x fence_ptr %p\n",
- __FUNCTION__, flags, fence ? *fence : 0x0);
+ SVGA_DBG(DEBUG_DMA|DEBUG_PERF, "%s fence_ptr %p\n",
+ __FUNCTION__, fence ? *fence : 0x0);
+
+ /* Enable to dump BMPs of the color/depth buffers each frame */
+ if (0) {
+ struct pipe_framebuffer_state *fb = &svga->curr.framebuffer;
+ static unsigned frame_no = 1;
+ char filename[256];
+ unsigned i;
+
+ for (i = 0; i < fb->nr_cbufs; i++) {
+ util_snprintf(filename, sizeof(filename), "cbuf%u_%04u", i, frame_no);
+ debug_dump_surface_bmp(&svga->pipe, filename, fb->cbufs[i]);
+ }
+
+ if (0 && fb->zsbuf) {
+ util_snprintf(filename, sizeof(filename), "zsbuf_%04u", frame_no);
+ debug_dump_surface_bmp(&svga->pipe, filename, fb->zsbuf);
+ }
+
+ ++frame_no;
+ }
}
diff --git a/src/gallium/drivers/svga/svga_pipe_misc.c b/src/gallium/drivers/svga/svga_pipe_misc.c
index 8c24fb302f7..440919c6262 100644
--- a/src/gallium/drivers/svga/svga_pipe_misc.c
+++ b/src/gallium/drivers/svga/svga_pipe_misc.c
@@ -94,7 +94,7 @@ static void svga_set_framebuffer_state(struct pipe_context *pipe,
for (i = 0; i < PIPE_MAX_COLOR_BUFS; i++)
if (dst->cbufs[i] && dst->cbufs[i] != fb->cbufs[i])
- svga_propagate_surface(pipe, dst->cbufs[i]);
+ svga_propagate_surface(svga, dst->cbufs[i]);
}
/* XXX: Actually the virtual hardware may support rendertargets with
diff --git a/src/gallium/drivers/svga/svga_pipe_rasterizer.c b/src/gallium/drivers/svga/svga_pipe_rasterizer.c
index 660eb0757a6..4a1a37f1765 100644
--- a/src/gallium/drivers/svga/svga_pipe_rasterizer.c
+++ b/src/gallium/drivers/svga/svga_pipe_rasterizer.c
@@ -64,18 +64,19 @@ static void *
svga_create_rasterizer_state(struct pipe_context *pipe,
const struct pipe_rasterizer_state *templ)
{
+ struct svga_context *svga = svga_context(pipe);
struct svga_rasterizer_state *rast = CALLOC_STRUCT( svga_rasterizer_state );
+
/* need this for draw module. */
rast->templ = *templ;
- /* light_twoside - XXX: need fragment shader varient */
+ /* light_twoside - XXX: need fragment shader variant */
/* poly_smooth - XXX: no fallback available */
/* poly_stipple_enable - draw module */
/* sprite_coord_enable - ? */
/* point_quad_rasterization - ? */
/* point_size_per_vertex - ? */
/* sprite_coord_mode - ??? */
- /* bypass_vs_viewport_and_clip - handled by viewport setup */
/* flatshade_first - handled by index translation */
/* gl_rasterization_rules - XXX - viewport code */
/* line_width - draw module */
@@ -93,17 +94,22 @@ svga_create_rasterizer_state(struct pipe_context *pipe,
/* Use swtnl + decomposition implement these:
*/
- if (templ->poly_stipple_enable)
+ if (templ->poly_stipple_enable) {
rast->need_pipeline |= SVGA_PIPELINE_FLAG_TRIS;
+ rast->need_pipeline_tris_str = "poly stipple";
+ }
- if (templ->line_width != 1.0 &&
- templ->line_width != 0.0)
+ if (templ->line_width >= 1.5f &&
+ !svga->debug.no_line_width) {
rast->need_pipeline |= SVGA_PIPELINE_FLAG_LINES;
+ rast->need_pipeline_lines_str = "line width";
+ }
if (templ->line_stipple_enable) {
- /* LinePattern not implemented on all backends.
+ /* XXX: LinePattern not implemented on all backends, and there is no
+ * mechanism to query it.
*/
- if (0) {
+ if (!svga->debug.force_hw_line_stipple) {
SVGA3dLinePattern lp;
lp.repeat = templ->line_stipple_factor + 1;
lp.pattern = templ->line_stipple_pattern;
@@ -111,11 +117,19 @@ svga_create_rasterizer_state(struct pipe_context *pipe,
}
else {
rast->need_pipeline |= SVGA_PIPELINE_FLAG_LINES;
+ rast->need_pipeline_lines_str = "line stipple";
}
}
- if (templ->point_smooth)
+ if (templ->point_smooth) {
rast->need_pipeline |= SVGA_PIPELINE_FLAG_POINTS;
+ rast->need_pipeline_points_str = "smooth points";
+ }
+
+ if (templ->line_smooth) {
+ rast->need_pipeline |= SVGA_PIPELINE_FLAG_LINES;
+ rast->need_pipeline_lines_str = "smooth lines";
+ }
{
int fill_front = templ->fill_front;
@@ -148,6 +162,7 @@ svga_create_rasterizer_state(struct pipe_context *pipe,
* front/back fill modes:
*/
rast->need_pipeline |= SVGA_PIPELINE_FLAG_TRIS;
+ rast->need_pipeline_tris_str = "different front/back fillmodes";
}
else {
offset = offset_front;
@@ -172,6 +187,7 @@ svga_create_rasterizer_state(struct pipe_context *pipe,
{
fill = PIPE_POLYGON_MODE_FILL;
rast->need_pipeline |= SVGA_PIPELINE_FLAG_TRIS;
+ rast->need_pipeline_tris_str = "unfilled primitives with no index manipulation";
}
/* If we are decomposing to lines, and lines need the pipeline,
@@ -182,6 +198,7 @@ svga_create_rasterizer_state(struct pipe_context *pipe,
{
fill = PIPE_POLYGON_MODE_FILL;
rast->need_pipeline |= SVGA_PIPELINE_FLAG_TRIS;
+ rast->need_pipeline_tris_str = "decomposing lines";
}
/* Similarly for points:
@@ -191,6 +208,7 @@ svga_create_rasterizer_state(struct pipe_context *pipe,
{
fill = PIPE_POLYGON_MODE_FILL;
rast->need_pipeline |= SVGA_PIPELINE_FLAG_TRIS;
+ rast->need_pipeline_tris_str = "decomposing points";
}
if (offset) {
@@ -201,9 +219,6 @@ svga_create_rasterizer_state(struct pipe_context *pipe,
rast->hw_unfilled = fill;
}
-
-
-
if (rast->need_pipeline & SVGA_PIPELINE_FLAG_TRIS) {
/* Turn off stuff which will get done in the draw module:
*/
diff --git a/src/gallium/drivers/svga/svga_pipe_sampler.c b/src/gallium/drivers/svga/svga_pipe_sampler.c
index f44a0e1325a..446fcc44078 100644
--- a/src/gallium/drivers/svga/svga_pipe_sampler.c
+++ b/src/gallium/drivers/svga/svga_pipe_sampler.c
@@ -144,8 +144,9 @@ svga_create_sampler_state(struct pipe_context *pipe,
return cso;
}
-static void svga_bind_sampler_states(struct pipe_context *pipe,
- unsigned num, void **sampler)
+static void
+svga_bind_fragment_sampler_states(struct pipe_context *pipe,
+ unsigned num, void **sampler)
{
struct svga_context *svga = svga_context(pipe);
unsigned i;
@@ -203,9 +204,10 @@ svga_sampler_view_destroy(struct pipe_context *pipe,
FREE(view);
}
-static void svga_set_sampler_views(struct pipe_context *pipe,
- unsigned num,
- struct pipe_sampler_view **views)
+static void
+svga_set_fragment_sampler_views(struct pipe_context *pipe,
+ unsigned num,
+ struct pipe_sampler_view **views)
{
struct svga_context *svga = svga_context(pipe);
unsigned flag_1d = 0;
@@ -256,9 +258,9 @@ static void svga_set_sampler_views(struct pipe_context *pipe,
void svga_init_sampler_functions( struct svga_context *svga )
{
svga->pipe.create_sampler_state = svga_create_sampler_state;
- svga->pipe.bind_fragment_sampler_states = svga_bind_sampler_states;
+ svga->pipe.bind_fragment_sampler_states = svga_bind_fragment_sampler_states;
svga->pipe.delete_sampler_state = svga_delete_sampler_state;
- svga->pipe.set_fragment_sampler_views = svga_set_sampler_views;
+ svga->pipe.set_fragment_sampler_views = svga_set_fragment_sampler_views;
svga->pipe.create_sampler_view = svga_create_sampler_view;
svga->pipe.sampler_view_destroy = svga_sampler_view_destroy;
}
diff --git a/src/gallium/drivers/svga/svga_pipe_vertex.c b/src/gallium/drivers/svga/svga_pipe_vertex.c
index 86c79459f3e..58469910732 100644
--- a/src/gallium/drivers/svga/svga_pipe_vertex.c
+++ b/src/gallium/drivers/svga/svga_pipe_vertex.c
@@ -27,6 +27,7 @@
#include "pipe/p_defines.h"
#include "util/u_math.h"
#include "util/u_memory.h"
+#include "util/u_transfer.h"
#include "tgsi/tgsi_parse.h"
#include "svga_screen.h"
diff --git a/src/gallium/drivers/svga/svga_resource.c b/src/gallium/drivers/svga/svga_resource.c
index ef2a0c40f03..6e0622a312b 100644
--- a/src/gallium/drivers/svga/svga_resource.c
+++ b/src/gallium/drivers/svga/svga_resource.c
@@ -33,13 +33,13 @@ svga_resource_from_handle(struct pipe_screen * screen,
void
svga_init_resource_functions(struct svga_context *svga)
{
- svga->pipe.is_resource_referenced = u_is_resource_referenced_vtbl;
svga->pipe.get_transfer = u_get_transfer_vtbl;
svga->pipe.transfer_map = u_transfer_map_vtbl;
svga->pipe.transfer_flush_region = u_transfer_flush_region_vtbl;
svga->pipe.transfer_unmap = u_transfer_unmap_vtbl;
svga->pipe.transfer_destroy = u_transfer_destroy_vtbl;
svga->pipe.transfer_inline_write = u_transfer_inline_write_vtbl;
+ svga->pipe.redefine_user_buffer = svga_redefine_user_buffer;
}
void
diff --git a/src/gallium/drivers/svga/svga_resource_buffer.c b/src/gallium/drivers/svga/svga_resource_buffer.c
index f12e2b68627..2d7c524d869 100644
--- a/src/gallium/drivers/svga/svga_resource_buffer.c
+++ b/src/gallium/drivers/svga/svga_resource_buffer.c
@@ -51,53 +51,104 @@ svga_buffer_needs_hw_storage(unsigned usage)
}
-static unsigned int
-svga_buffer_is_referenced( struct pipe_context *pipe,
- struct pipe_resource *buf,
- unsigned level, int layer)
+/**
+ * Map a range of a buffer.
+ *
+ * Unlike texture DMAs (which are written immediately to the command buffer and
+ * therefore inherently serialized with other context operations), for buffers
+ * we try to coalesce multiple range mappings (i.e, multiple calls to this
+ * function) into a single DMA command, for better efficiency in command
+ * processing. This means we need to exercise extra care here to ensure that
+ * the end result is exactly the same as if one DMA was used for every mapped
+ * range.
+ */
+static void *
+svga_buffer_map_range( struct pipe_context *pipe,
+ struct pipe_resource *buf,
+ unsigned offset,
+ unsigned length,
+ unsigned usage )
{
+ struct svga_context *svga = svga_context(pipe);
struct svga_screen *ss = svga_screen(pipe->screen);
- struct svga_buffer *sbuf = svga_buffer(buf);
-
- /**
- * XXX: Check this.
- * The screen may cache buffer writes, but when we map, we map out
- * of those cached writes, so we don't need to set a
- * PIPE_REFERENCED_FOR_WRITE flag for cached buffers.
- */
-
- if (!sbuf->handle || ss->sws->surface_is_flushed(ss->sws, sbuf->handle))
- return PIPE_UNREFERENCED;
-
- /**
- * sws->surface_is_flushed() does not distinguish between read references
- * and write references. So assume a reference is both,
- * however, we make an exception for index- and vertex buffers, to avoid
- * a flush in st_bufferobj_get_subdata, during display list replay.
- */
+ struct svga_winsys_screen *sws = ss->sws;
+ struct svga_buffer *sbuf = svga_buffer( buf );
+ void *map;
- if (sbuf->b.b.bind & (PIPE_BIND_VERTEX_BUFFER | PIPE_BIND_INDEX_BUFFER))
- return PIPE_REFERENCED_FOR_READ;
+ if (usage & PIPE_TRANSFER_WRITE) {
+ if (usage & PIPE_TRANSFER_DISCARD_WHOLE_RESOURCE) {
+ /*
+ * Finish writing any pending DMA commands, and tell the host to discard
+ * the buffer contents on the next DMA operation.
+ */
- return PIPE_REFERENCED_FOR_READ | PIPE_REFERENCED_FOR_WRITE;
-}
+ if (sbuf->dma.pending) {
+ svga_buffer_upload_flush(svga, sbuf);
+ /*
+ * Instead of flushing the context command buffer, simply discard
+ * the current hwbuf, and start a new one.
+ */
+ svga_buffer_destroy_hw_storage(ss, sbuf);
+ }
+ sbuf->map.num_ranges = 0;
+ sbuf->dma.flags.discard = TRUE;
+ }
+ if (usage & PIPE_TRANSFER_UNSYNCHRONIZED) {
+ if (!sbuf->map.num_ranges) {
+ /*
+ * No pending ranges to upload so far, so we can tell the host to
+ * not synchronize on the next DMA command.
+ */
+ sbuf->dma.flags.unsynchronized = TRUE;
+ }
+ } else {
+ /*
+ * Synchronizing, so finish writing any pending DMA command, and
+ * ensure the next DMA will be done in order.
+ */
-static void *
-svga_buffer_map_range( struct pipe_screen *screen,
- struct pipe_resource *buf,
- unsigned offset,
- unsigned length,
- unsigned usage )
-{
- struct svga_screen *ss = svga_screen(screen);
- struct svga_winsys_screen *sws = ss->sws;
- struct svga_buffer *sbuf = svga_buffer( buf );
- void *map;
+ if (sbuf->dma.pending) {
+ svga_buffer_upload_flush(svga, sbuf);
+
+ if (sbuf->hwbuf) {
+ /*
+ * We have a pending DMA upload from a hardware buffer, therefore
+ * we need to ensure that the host finishes processing that DMA
+ * command before the state tracker can start overwriting the
+ * hardware buffer.
+ *
+ * XXX: This could be avoided by tying the hardware buffer to
+ * the transfer (just as done with textures), which would allow
+ * overlapping DMAs commands to be queued on the same context
+ * buffer. However, due to the likelihood of software vertex
+ * processing, it is more convenient to hold on to the hardware
+ * buffer, allowing to quickly access the contents from the CPU
+ * without having to do a DMA download from the host.
+ */
+
+ if (usage & PIPE_TRANSFER_DONTBLOCK) {
+ /*
+ * Flushing the command buffer here will most likely cause
+ * the map of the hwbuf below to block, so preemptively
+ * return NULL here if DONTBLOCK is set to prevent unnecessary
+ * command buffer flushes.
+ */
+
+ return NULL;
+ }
+
+ svga_context_flush(svga, NULL);
+ }
+ }
+
+ sbuf->dma.flags.unsynchronized = FALSE;
+ }
+ }
if (!sbuf->swbuf && !sbuf->hwbuf) {
if (svga_buffer_create_hw_storage(ss, sbuf) != PIPE_OK) {
@@ -105,9 +156,12 @@ svga_buffer_map_range( struct pipe_screen *screen,
* We can't create a hardware buffer big enough, so create a malloc
* buffer instead.
*/
- debug_printf("%s: failed to allocate %u KB of DMA, splitting DMA transfers\n",
- __FUNCTION__,
- (sbuf->b.b.width0 + 1023)/1024);
+ if (0) {
+ debug_printf("%s: failed to allocate %u KB of DMA, "
+ "splitting DMA transfers\n",
+ __FUNCTION__,
+ (sbuf->b.b.width0 + 1023)/1024);
+ }
sbuf->swbuf = align_malloc(sbuf->b.b.width0, 16);
}
@@ -141,12 +195,12 @@ svga_buffer_map_range( struct pipe_screen *screen,
static void
-svga_buffer_flush_mapped_range( struct pipe_screen *screen,
+svga_buffer_flush_mapped_range( struct pipe_context *pipe,
struct pipe_resource *buf,
unsigned offset, unsigned length)
{
struct svga_buffer *sbuf = svga_buffer( buf );
- struct svga_screen *ss = svga_screen(screen);
+ struct svga_screen *ss = svga_screen(pipe->screen);
pipe_mutex_lock(ss->swc_mutex);
assert(sbuf->map.writing);
@@ -158,10 +212,10 @@ svga_buffer_flush_mapped_range( struct pipe_screen *screen,
}
static void
-svga_buffer_unmap( struct pipe_screen *screen,
+svga_buffer_unmap( struct pipe_context *pipe,
struct pipe_resource *buf)
{
- struct svga_screen *ss = svga_screen(screen);
+ struct svga_screen *ss = svga_screen(pipe->screen);
struct svga_winsys_screen *sws = ss->sws;
struct svga_buffer *sbuf = svga_buffer( buf );
@@ -174,11 +228,18 @@ svga_buffer_unmap( struct pipe_screen *screen,
if(sbuf->hwbuf)
sws->buffer_unmap(sws, sbuf->hwbuf);
- if(sbuf->map.writing) {
- if(!sbuf->map.flush_explicit) {
- /* No mapped range was flushed -- flush the whole buffer */
+ if (sbuf->map.writing) {
+ if (!sbuf->map.flush_explicit) {
+ /*
+ * Mapped range not flushed explicitly, so flush the whole buffer,
+ * and tell the host to discard the contents when processing the DMA
+ * command.
+ */
+
SVGA_DBG(DEBUG_DMA, "flushing the whole buffer\n");
+ sbuf->dma.flags.discard = TRUE;
+
svga_buffer_add_range(sbuf, 0, sbuf->b.b.width0);
}
@@ -225,7 +286,7 @@ static void *
svga_buffer_transfer_map( struct pipe_context *pipe,
struct pipe_transfer *transfer )
{
- uint8_t *map = svga_buffer_map_range( pipe->screen,
+ uint8_t *map = svga_buffer_map_range( pipe,
transfer->resource,
transfer->box.x,
transfer->box.width,
@@ -248,7 +309,7 @@ static void svga_buffer_transfer_flush_region( struct pipe_context *pipe,
{
assert(box->x + box->width <= transfer->box.width);
- svga_buffer_flush_mapped_range(pipe->screen,
+ svga_buffer_flush_mapped_range(pipe,
transfer->resource,
transfer->box.x + box->x,
box->width);
@@ -257,7 +318,7 @@ static void svga_buffer_transfer_flush_region( struct pipe_context *pipe,
static void svga_buffer_transfer_unmap( struct pipe_context *pipe,
struct pipe_transfer *transfer )
{
- svga_buffer_unmap(pipe->screen,
+ svga_buffer_unmap(pipe,
transfer->resource);
}
@@ -271,7 +332,6 @@ struct u_resource_vtbl svga_buffer_vtbl =
{
u_default_resource_get_handle, /* get_handle */
svga_buffer_destroy, /* resource_destroy */
- svga_buffer_is_referenced, /* is_resource_referenced */
u_default_get_transfer, /* get_transfer */
u_default_transfer_destroy, /* transfer_destroy */
svga_buffer_transfer_map, /* transfer_map */
@@ -308,6 +368,9 @@ svga_buffer_create(struct pipe_screen *screen,
goto error2;
}
+ debug_reference(&sbuf->b.b.reference,
+ (debug_reference_descriptor)debug_describe_resource, 0);
+
return &sbuf->b.b;
error2:
@@ -341,6 +404,9 @@ svga_user_buffer_create(struct pipe_screen *screen,
sbuf->swbuf = ptr;
sbuf->user = TRUE;
+
+ debug_reference(&sbuf->b.b.reference,
+ (debug_reference_descriptor)debug_describe_resource, 0);
return &sbuf->b.b;
diff --git a/src/gallium/drivers/svga/svga_resource_buffer.h b/src/gallium/drivers/svga/svga_resource_buffer.h
index d3ec11bfd52..c559f70ec12 100644
--- a/src/gallium/drivers/svga/svga_resource_buffer.h
+++ b/src/gallium/drivers/svga/svga_resource_buffer.h
@@ -243,4 +243,10 @@ svga_winsys_buffer_create(struct svga_context *svga,
unsigned usage,
unsigned size);
+void
+svga_redefine_user_buffer(struct pipe_context *ctx,
+ struct pipe_resource *resource,
+ unsigned offset,
+ unsigned size);
+
#endif /* SVGA_BUFFER_H */
diff --git a/src/gallium/drivers/svga/svga_resource_buffer_upload.c b/src/gallium/drivers/svga/svga_resource_buffer_upload.c
index 3de5216a949..0bfa8a14a6f 100644
--- a/src/gallium/drivers/svga/svga_resource_buffer_upload.c
+++ b/src/gallium/drivers/svga/svga_resource_buffer_upload.c
@@ -40,6 +40,9 @@
#include "svga_debug.h"
+#define MAX_DMA_SIZE (4 * 1024 * 1024)
+
+
/**
* Allocate a winsys_buffer (ie. DMA, aka GMR memory).
*
@@ -57,6 +60,13 @@ svga_winsys_buffer_create( struct svga_context *svga,
struct svga_winsys_screen *sws = svgascreen->sws;
struct svga_winsys_buffer *buf;
+ /* XXX this shouldn't be a hard-coded number; it should be queried
+ * somehow.
+ */
+ if (size > MAX_DMA_SIZE) {
+ return NULL;
+ }
+
/* Just try */
buf = sws->buffer_create(sws, alignment, usage, size);
if(!buf) {
@@ -242,12 +252,17 @@ svga_buffer_upload_command(struct svga_context *svga,
* Patch up the upload DMA command reserved by svga_buffer_upload_command
* with the final ranges.
*/
-static void
+void
svga_buffer_upload_flush(struct svga_context *svga,
struct svga_buffer *sbuf)
{
SVGA3dCopyBox *boxes;
unsigned i;
+ struct pipe_resource *dummy;
+
+ if (!sbuf->dma.pending) {
+ return;
+ }
assert(sbuf->handle);
assert(sbuf->hwbuf);
@@ -285,17 +300,18 @@ svga_buffer_upload_flush(struct svga_context *svga,
sbuf->head.next = sbuf->head.prev = NULL;
#endif
sbuf->dma.pending = FALSE;
+ sbuf->dma.flags.discard = FALSE;
+ sbuf->dma.flags.unsynchronized = FALSE;
sbuf->dma.svga = NULL;
sbuf->dma.boxes = NULL;
- /* Decrement reference count */
- pipe_reference(&(sbuf->b.b.reference), NULL);
- sbuf = NULL;
+ /* Decrement reference count (and potentially destroy) */
+ dummy = &sbuf->b.b;
+ pipe_resource_reference(&dummy, NULL);
}
-
/**
* Note a dirty range.
*
@@ -326,12 +342,6 @@ svga_buffer_add_range(struct svga_buffer *sbuf,
/*
* Try to grow one of the ranges.
- *
- * Note that it is not this function task to care about overlapping ranges,
- * as the GMR was already given so it is too late to do anything. Situations
- * where overlapping ranges may pose a problem should be detected via
- * pipe_context::is_resource_referenced and the context that refers to the
- * buffer should be flushed.
*/
for(i = 0; i < sbuf->map.num_ranges; ++i) {
@@ -346,6 +356,11 @@ svga_buffer_add_range(struct svga_buffer *sbuf,
if (dist <= 0) {
/*
* Ranges are contiguous or overlapping -- extend this one and return.
+ *
+ * Note that it is not this function's task to prevent overlapping
+ * ranges, as the GMR was already given so it is too late to do
+ * anything. If the ranges overlap here it must surely be because
+ * PIPE_TRANSFER_UNSYNCHRONIZED was set.
*/
sbuf->map.ranges[i].start = MIN2(sbuf->map.ranges[i].start, start);
@@ -369,8 +384,7 @@ svga_buffer_add_range(struct svga_buffer *sbuf,
* pending DMA upload and start clean.
*/
- if(sbuf->dma.pending)
- svga_buffer_upload_flush(sbuf->dma.svga, sbuf);
+ svga_buffer_upload_flush(sbuf->dma.svga, sbuf);
assert(!sbuf->dma.pending);
assert(!sbuf->dma.svga);
@@ -638,3 +652,54 @@ svga_context_flush_buffers(struct svga_context *svga)
next = curr->next;
}
}
+
+
+void
+svga_redefine_user_buffer(struct pipe_context *pipe,
+ struct pipe_resource *resource,
+ unsigned offset,
+ unsigned size)
+{
+ struct svga_screen *ss = svga_screen(pipe->screen);
+ struct svga_context *svga = svga_context(pipe);
+ struct svga_buffer *sbuf = svga_buffer(resource);
+
+ assert(sbuf->user);
+
+ /*
+ * Release any uploaded user buffer.
+ *
+ * TODO: As an optimization, we could try to update the uploaded buffer
+ * instead.
+ */
+
+ pipe_resource_reference(&sbuf->uploaded.buffer, NULL);
+
+ pipe_mutex_lock(ss->swc_mutex);
+
+ if (offset + size > resource->width0) {
+ /*
+ * User buffers shouldn't have DMA directly, unless
+ * SVGA_COMBINE_USERBUFFERS is not set.
+ */
+
+ if (sbuf->dma.pending) {
+ svga_buffer_upload_flush(svga, sbuf);
+ }
+
+ if (sbuf->handle) {
+ svga_buffer_destroy_host_surface(ss, sbuf);
+ }
+
+ if (sbuf->hwbuf) {
+ svga_buffer_destroy_hw_storage(ss, sbuf);
+ }
+
+ sbuf->key.size.width = sbuf->b.b.width0 = offset + size;
+ }
+
+ pipe_mutex_unlock(ss->swc_mutex);
+
+ svga->curr.any_user_vertex_buffers = TRUE;
+ svga->dirty |= SVGA_NEW_VBUFFER | SVGA_NEW_VELEMENT;
+}
diff --git a/src/gallium/drivers/svga/svga_resource_buffer_upload.h b/src/gallium/drivers/svga/svga_resource_buffer_upload.h
index 11df3065263..13d8f3e299b 100644
--- a/src/gallium/drivers/svga/svga_resource_buffer_upload.h
+++ b/src/gallium/drivers/svga/svga_resource_buffer_upload.h
@@ -28,6 +28,10 @@
void
+svga_buffer_upload_flush(struct svga_context *svga,
+ struct svga_buffer *sbuf);
+
+void
svga_buffer_add_range(struct svga_buffer *sbuf,
unsigned start,
unsigned end);
diff --git a/src/gallium/drivers/svga/svga_resource_texture.c b/src/gallium/drivers/svga/svga_resource_texture.c
index 7c9e600b9f4..b61f85955a2 100644
--- a/src/gallium/drivers/svga/svga_resource_texture.c
+++ b/src/gallium/drivers/svga/svga_resource_texture.c
@@ -48,31 +48,6 @@
#define SVGA3D_SURFACE_HINT_SCANOUT (1 << 9)
-static unsigned int
-svga_texture_is_referenced( struct pipe_context *pipe,
- struct pipe_resource *texture,
- unsigned level, int layer)
-{
- struct svga_texture *tex = svga_texture(texture);
- struct svga_screen *ss = svga_screen(pipe->screen);
-
- /**
- * The screen does not cache texture writes.
- */
-
- if (!tex->handle || ss->sws->surface_is_flushed(ss->sws, tex->handle))
- return PIPE_UNREFERENCED;
-
- /**
- * sws->surface_is_flushed() does not distinguish between read references
- * and write references. So assume a reference is both.
- */
-
- return PIPE_REFERENCED_FOR_READ | PIPE_REFERENCED_FOR_WRITE;
-}
-
-
-
/*
* Helper function and arrays
*/
@@ -146,16 +121,6 @@ svga_translate_format_render(enum pipe_format format)
case PIPE_FORMAT_L8_UNORM:
return svga_translate_format(format);
-#if 1
- /* For on host conversion */
- case PIPE_FORMAT_DXT1_RGB:
- return SVGA3D_X8R8G8B8;
- case PIPE_FORMAT_DXT1_RGBA:
- case PIPE_FORMAT_DXT3_RGBA:
- case PIPE_FORMAT_DXT5_RGBA:
- return SVGA3D_A8R8G8B8;
-#endif
-
default:
return SVGA3D_FORMAT_INVALID;
}
@@ -166,7 +131,8 @@ static INLINE void
svga_transfer_dma_band(struct svga_context *svga,
struct svga_transfer *st,
SVGA3dTransferType transfer,
- unsigned y, unsigned h, unsigned srcy)
+ unsigned y, unsigned h, unsigned srcy,
+ SVGA3dSurfaceDMAFlags flags)
{
struct svga_texture *texture = svga_texture(st->base.resource);
SVGA3dCopyBox box;
@@ -202,10 +168,10 @@ svga_transfer_dma_band(struct svga_context *svga,
util_format_get_blocksize(texture->b.b.format) * 8 /
(util_format_get_blockwidth(texture->b.b.format)*util_format_get_blockheight(texture->b.b.format)));
- ret = SVGA3D_SurfaceDMA(svga->swc, st, transfer, &box, 1);
+ ret = SVGA3D_SurfaceDMA(svga->swc, st, transfer, &box, 1, flags);
if(ret != PIPE_OK) {
- svga->swc->flush(svga->swc, NULL);
- ret = SVGA3D_SurfaceDMA(svga->swc, st, transfer, &box, 1);
+ svga_context_flush(svga, NULL);
+ ret = SVGA3D_SurfaceDMA(svga->swc, st, transfer, &box, 1, flags);
assert(ret == PIPE_OK);
}
}
@@ -214,7 +180,8 @@ svga_transfer_dma_band(struct svga_context *svga,
static INLINE void
svga_transfer_dma(struct svga_context *svga,
struct svga_transfer *st,
- SVGA3dTransferType transfer)
+ SVGA3dTransferType transfer,
+ SVGA3dSurfaceDMAFlags flags)
{
struct svga_texture *texture = svga_texture(st->base.resource);
struct svga_screen *screen = svga_screen(texture->b.b.screen);
@@ -225,11 +192,17 @@ svga_transfer_dma(struct svga_context *svga,
SVGA_DBG(DEBUG_PERF, "%s: readback transfer\n", __FUNCTION__);
}
+ /* Ensure any pending operations on host surfaces are queued on the command
+ * buffer first.
+ */
+ svga_surfaces_flush( svga );
if(!st->swbuf) {
/* Do the DMA transfer in a single go */
- svga_transfer_dma_band(svga, st, transfer, st->base.box.y, st->base.box.height, 0);
+ svga_transfer_dma_band(svga, st, transfer,
+ st->base.box.y, st->base.box.height, 0,
+ flags);
if(transfer == SVGA3D_READ_HOST_VRAM) {
svga_context_flush(svga, &fence);
@@ -275,7 +248,14 @@ svga_transfer_dma(struct svga_context *svga,
}
}
- svga_transfer_dma_band(svga, st, transfer, y, h, srcy);
+ svga_transfer_dma_band(svga, st, transfer, y, h, srcy, flags);
+
+ /*
+ * Prevent the texture contents to be discarded on the next band
+ * upload.
+ */
+
+ flags.discard = FALSE;
if(transfer == SVGA3D_READ_HOST_VRAM) {
svga_context_flush(svga, &fence);
@@ -390,18 +370,25 @@ svga_texture_get_transfer(struct pipe_context *pipe,
if(st->hw_nblocksy < nblocksy) {
/* We couldn't allocate a hardware buffer big enough for the transfer,
* so allocate regular malloc memory instead */
- debug_printf("%s: failed to allocate %u KB of DMA, splitting into %u x %u KB DMA transfers\n",
- __FUNCTION__,
- (nblocksy*st->base.stride + 1023)/1024,
- (nblocksy + st->hw_nblocksy - 1)/st->hw_nblocksy,
- (st->hw_nblocksy*st->base.stride + 1023)/1024);
+ if (0) {
+ debug_printf("%s: failed to allocate %u KB of DMA, "
+ "splitting into %u x %u KB DMA transfers\n",
+ __FUNCTION__,
+ (nblocksy*st->base.stride + 1023)/1024,
+ (nblocksy + st->hw_nblocksy - 1)/st->hw_nblocksy,
+ (st->hw_nblocksy*st->base.stride + 1023)/1024);
+ }
+
st->swbuf = MALLOC(nblocksy*st->base.stride);
if(!st->swbuf)
goto no_swbuf;
}
- if (usage & PIPE_TRANSFER_READ)
- svga_transfer_dma(svga, st, SVGA3D_READ_HOST_VRAM);
+ if (usage & PIPE_TRANSFER_READ) {
+ SVGA3dSurfaceDMAFlags flags;
+ memset(&flags, 0, sizeof flags);
+ svga_transfer_dma(svga, st, SVGA3D_READ_HOST_VRAM, flags);
+ }
return &st->base;
@@ -460,7 +447,17 @@ svga_texture_transfer_destroy(struct pipe_context *pipe,
struct svga_transfer *st = svga_transfer(transfer);
if (st->base.usage & PIPE_TRANSFER_WRITE) {
- svga_transfer_dma(svga, st, SVGA3D_WRITE_HOST_VRAM);
+ SVGA3dSurfaceDMAFlags flags;
+
+ memset(&flags, 0, sizeof flags);
+ if (transfer->usage & PIPE_TRANSFER_DISCARD_WHOLE_RESOURCE) {
+ flags.discard = TRUE;
+ }
+ if (transfer->usage & PIPE_TRANSFER_UNSYNCHRONIZED) {
+ flags.unsynchronized = TRUE;
+ }
+
+ svga_transfer_dma(svga, st, SVGA3D_WRITE_HOST_VRAM, flags);
ss->texture_timestamp++;
tex->view_age[transfer->level] = ++(tex->age);
if (transfer->resource->target == PIPE_TEXTURE_CUBE)
@@ -483,7 +480,6 @@ struct u_resource_vtbl svga_texture_vtbl =
{
svga_texture_get_handle, /* get_handle */
svga_texture_destroy, /* resource_destroy */
- svga_texture_is_referenced, /* is_resource_referenced */
svga_texture_get_transfer, /* get_transfer */
svga_texture_transfer_destroy, /* transfer_destroy */
svga_texture_transfer_map, /* transfer_map */
@@ -527,7 +523,8 @@ svga_texture_create(struct pipe_screen *screen,
tex->key.numFaces = 1;
}
- tex->key.cachable = 1;
+ /* XXX: Disabled for now */
+ tex->key.cachable = 0;
if (template->bind & PIPE_BIND_SAMPLER_VIEW)
tex->key.flags |= SVGA3D_SURFACE_HINT_TEXTURE;
@@ -571,6 +568,9 @@ svga_texture_create(struct pipe_screen *screen,
if (tex->handle)
SVGA_DBG(DEBUG_DMA, " --> got sid %p (texture)\n", tex->handle);
+ debug_reference(&tex->b.b.reference,
+ (debug_reference_descriptor)debug_describe_resource, 0);
+
return &tex->b.b;
error2:
diff --git a/src/gallium/drivers/svga/svga_sampler_view.c b/src/gallium/drivers/svga/svga_sampler_view.c
index 6911f13f778..4f1f4b597e8 100644
--- a/src/gallium/drivers/svga/svga_sampler_view.c
+++ b/src/gallium/drivers/svga/svga_sampler_view.c
@@ -32,6 +32,7 @@
#include "util/u_format.h"
#include "util/u_math.h"
#include "util/u_memory.h"
+#include "util/u_string.h"
#include "svga_screen.h"
#include "svga_context.h"
@@ -41,14 +42,24 @@
#include "svga_surface.h"
+void
+svga_debug_describe_sampler_view(char *buf, const struct svga_sampler_view *sv)
+{
+ char res[128];
+ debug_describe_resource(res, sv->texture);
+ util_sprintf(buf, "svga_sampler_view<%s,[%u,%u]>", res, sv->min_lod, sv->max_lod);
+}
+
struct svga_sampler_view *
svga_get_tex_sampler_view(struct pipe_context *pipe,
struct pipe_resource *pt,
unsigned min_lod, unsigned max_lod)
{
- struct svga_screen *ss = svga_screen(pt->screen);
+ struct svga_context *svga = svga_context(pipe);
+ struct svga_screen *ss = svga_screen(pipe->screen);
struct svga_texture *tex = svga_texture(pt);
struct svga_sampler_view *sv = NULL;
+ SVGA3dSurfaceFlags flags = SVGA3D_SURFACE_HINT_TEXTURE;
SVGA3dSurfaceFormat format = svga_translate_format(pt->format);
boolean view = TRUE;
@@ -68,10 +79,6 @@ svga_get_tex_sampler_view(struct pipe_context *pipe,
if (min_lod == 0 && max_lod >= pt->last_level)
view = FALSE;
- if (util_format_is_s3tc(pt->format) && view) {
- format = svga_translate_format_render(pt->format);
- }
-
if (ss->debug.no_sampler_view)
view = FALSE;
@@ -113,6 +120,8 @@ svga_get_tex_sampler_view(struct pipe_context *pipe,
pt->last_level);
sv->key.cachable = 0;
sv->handle = tex->handle;
+ debug_reference(&sv->reference,
+ (debug_reference_descriptor)svga_debug_describe_sampler_view, 0);
return sv;
}
@@ -126,7 +135,7 @@ svga_get_tex_sampler_view(struct pipe_context *pipe,
pt->last_level);
sv->age = tex->age;
- sv->handle = svga_texture_view_surface(pipe, tex, format,
+ sv->handle = svga_texture_view_surface(svga, tex, flags, format,
min_lod,
max_lod - min_lod + 1,
-1, -1,
@@ -136,6 +145,8 @@ svga_get_tex_sampler_view(struct pipe_context *pipe,
assert(0);
sv->key.cachable = 0;
sv->handle = tex->handle;
+ debug_reference(&sv->reference,
+ (debug_reference_descriptor)svga_debug_describe_sampler_view, 0);
return sv;
}
@@ -143,6 +154,9 @@ svga_get_tex_sampler_view(struct pipe_context *pipe,
svga_sampler_view_reference(&tex->cached_view, sv);
pipe_mutex_unlock(ss->tex_mutex);
+ debug_reference(&sv->reference,
+ (debug_reference_descriptor)svga_debug_describe_sampler_view, 0);
+
return sv;
}
diff --git a/src/gallium/drivers/svga/svga_sampler_view.h b/src/gallium/drivers/svga/svga_sampler_view.h
index e64665f2e58..2087c1be85e 100644
--- a/src/gallium/drivers/svga/svga_sampler_view.h
+++ b/src/gallium/drivers/svga/svga_sampler_view.h
@@ -83,12 +83,16 @@ svga_validate_sampler_view(struct svga_context *svga, struct svga_sampler_view *
void
svga_destroy_sampler_view_priv(struct svga_sampler_view *v);
+void
+svga_debug_describe_sampler_view(char *buf, const struct svga_sampler_view *sv);
+
static INLINE void
svga_sampler_view_reference(struct svga_sampler_view **ptr, struct svga_sampler_view *v)
{
struct svga_sampler_view *old = *ptr;
- if (pipe_reference(&(*ptr)->reference, &v->reference))
+ if (pipe_reference_described(&(*ptr)->reference, &v->reference,
+ (debug_reference_descriptor)svga_debug_describe_sampler_view))
svga_destroy_sampler_view_priv(old);
*ptr = v;
}
diff --git a/src/gallium/drivers/svga/svga_screen.c b/src/gallium/drivers/svga/svga_screen.c
index 078190342a1..6c987abe056 100644
--- a/src/gallium/drivers/svga/svga_screen.c
+++ b/src/gallium/drivers/svga/svga_screen.c
@@ -35,7 +35,6 @@
#include "svga_resource_texture.h"
#include "svga_resource.h"
#include "svga_debug.h"
-#include "svga_surface.h"
#include "svga3d_shaderdefs.h"
@@ -226,13 +225,18 @@ static int svga_get_shader_param(struct pipe_screen *screen, unsigned shader, en
return svgascreen->use_ps30 ? 32 : 12;
return result.u;
case PIPE_SHADER_CAP_MAX_ADDRS:
- return svgascreen->use_ps30 ? 1 : 0;
+ case PIPE_SHADER_CAP_INDIRECT_INPUT_ADDR:
+ /*
+ * Although PS 3.0 has some addressing abilities it can only represent
+ * loops that can be statically determined and unrolled. Given we can
+ * only handle a subset of the cases that the state tracker already
+ * does it is better to defer loop unrolling to the state tracker.
+ */
+ return 0;
case PIPE_SHADER_CAP_MAX_PREDS:
return svgascreen->use_ps30 ? 1 : 0;
case PIPE_SHADER_CAP_TGSI_CONT_SUPPORTED:
return 1;
- case PIPE_SHADER_CAP_INDIRECT_INPUT_ADDR:
- return svgascreen->use_ps30 ? 1 : 0;
case PIPE_SHADER_CAP_INDIRECT_OUTPUT_ADDR:
case PIPE_SHADER_CAP_INDIRECT_TEMP_ADDR:
case PIPE_SHADER_CAP_INDIRECT_CONST_ADDR:
@@ -338,8 +342,7 @@ svga_is_format_supported( struct pipe_screen *screen,
enum pipe_format format,
enum pipe_texture_target target,
unsigned sample_count,
- unsigned tex_usage,
- unsigned geom_flags )
+ unsigned tex_usage)
{
struct svga_winsys_screen *sws = svga_screen(screen)->sws;
SVGA3dDevCapIndex index;
@@ -361,13 +364,6 @@ svga_is_format_supported( struct pipe_screen *screen,
case PIPE_FORMAT_B5G5R5A1_UNORM:
return FALSE;
- /* Simulate ability to render into compressed textures */
- case PIPE_FORMAT_DXT1_RGB:
- case PIPE_FORMAT_DXT1_RGBA:
- case PIPE_FORMAT_DXT3_RGBA:
- case PIPE_FORMAT_DXT5_RGBA:
- return TRUE;
-
default:
break;
}
@@ -415,27 +411,26 @@ svga_fence_reference(struct pipe_screen *screen,
}
-static int
+static boolean
svga_fence_signalled(struct pipe_screen *screen,
- struct pipe_fence_handle *fence,
- unsigned flag)
+ struct pipe_fence_handle *fence)
{
struct svga_winsys_screen *sws = svga_screen(screen)->sws;
- return sws->fence_signalled(sws, fence, flag);
+ return sws->fence_signalled(sws, fence, 0) == 0;
}
-static int
+static boolean
svga_fence_finish(struct pipe_screen *screen,
struct pipe_fence_handle *fence,
- unsigned flag)
+ uint64_t timeout)
{
struct svga_winsys_screen *sws = svga_screen(screen)->sws;
SVGA_DBG(DEBUG_DMA|DEBUG_PERF, "%s fence_ptr %p\n",
__FUNCTION__, fence);
- return sws->fence_finish(sws, fence, flag);
+ return sws->fence_finish(sws, fence, 0) == 0;
}
@@ -501,6 +496,12 @@ svga_screen_create(struct svga_winsys_screen *sws)
svga_init_screen_resource_functions(svgascreen);
+ if (sws->get_hw_version) {
+ svgascreen->hw_version = sws->get_hw_version(sws);
+ } else {
+ svgascreen->hw_version = SVGA3D_HWVERSION_WS65_B1;
+ }
+
svgascreen->use_ps30 =
sws->get_cap(sws, SVGA3D_DEVCAP_FRAGMENT_SHADER_VERSION, &result) &&
result.u >= SVGA3DPSVERSION_30 ? TRUE : FALSE;
diff --git a/src/gallium/drivers/svga/svga_screen.h b/src/gallium/drivers/svga/svga_screen.h
index 86ec89d88c1..7ef627f928d 100644
--- a/src/gallium/drivers/svga/svga_screen.h
+++ b/src/gallium/drivers/svga/svga_screen.h
@@ -49,6 +49,8 @@ struct svga_screen
struct pipe_screen screen;
struct svga_winsys_screen *sws;
+ SVGA3dHardwareVersion hw_version;
+
unsigned use_ps30;
unsigned use_vs30;
diff --git a/src/gallium/drivers/svga/svga_state.h b/src/gallium/drivers/svga/svga_state.h
index 22d5a6d552a..7f239e7a322 100644
--- a/src/gallium/drivers/svga/svga_state.h
+++ b/src/gallium/drivers/svga/svga_state.h
@@ -92,4 +92,8 @@ void svga_update_state_retry( struct svga_context *svga,
enum pipe_error svga_emit_initial_state( struct svga_context *svga );
+enum pipe_error svga_reemit_framebuffer_bindings( struct svga_context *svga );
+
+enum pipe_error svga_reemit_tss_bindings( struct svga_context *svga );
+
#endif
diff --git a/src/gallium/drivers/svga/svga_state_constants.c b/src/gallium/drivers/svga/svga_state_constants.c
index 97c818cd379..6c3275e74c0 100644
--- a/src/gallium/drivers/svga/svga_state_constants.c
+++ b/src/gallium/drivers/svga/svga_state_constants.c
@@ -40,9 +40,12 @@
/* Convert from PIPE_SHADER_* to SVGA3D_SHADERTYPE_*
*/
-static int svga_shader_type( int unit )
+static int svga_shader_type( int shader )
{
- return unit + 1;
+ assert(PIPE_SHADER_VERTEX + 1 == SVGA3D_SHADERTYPE_VS);
+ assert(PIPE_SHADER_FRAGMENT + 1 == SVGA3D_SHADERTYPE_PS);
+ assert(shader <= PIPE_SHADER_FRAGMENT);
+ return shader + 1;
}
@@ -110,7 +113,7 @@ static int emit_consts( struct svga_context *svga,
done:
if (data)
- pipe_buffer_unmap(&svga->pipe, svga->curr.cb[unit], transfer);
+ pipe_buffer_unmap(&svga->pipe, transfer);
return ret;
}
diff --git a/src/gallium/drivers/svga/svga_state_framebuffer.c b/src/gallium/drivers/svga/svga_state_framebuffer.c
index fcbb35e7972..cdadb20c178 100644
--- a/src/gallium/drivers/svga/svga_state_framebuffer.c
+++ b/src/gallium/drivers/svga/svga_state_framebuffer.c
@@ -93,6 +93,55 @@ static int emit_framebuffer( struct svga_context *svga,
}
+/*
+ * Rebind rendertargets.
+ *
+ * Similar to emit_framebuffer, but without any state checking/update.
+ *
+ * Called at the beginning of every new command buffer to ensure that
+ * non-dirty rendertargets are properly paged-in.
+ */
+enum pipe_error
+svga_reemit_framebuffer_bindings(struct svga_context *svga)
+{
+ struct pipe_framebuffer_state *hw = &svga->state.hw_clear.framebuffer;
+ unsigned i;
+ enum pipe_error ret;
+
+ for (i = 0; i < MIN2(PIPE_MAX_COLOR_BUFS, 8); ++i) {
+ if (hw->cbufs[i]) {
+ ret = SVGA3D_SetRenderTarget(svga->swc, SVGA3D_RT_COLOR0 + i, hw->cbufs[i]);
+ if (ret != PIPE_OK) {
+ return ret;
+ }
+ }
+ }
+
+ if (hw->zsbuf) {
+ ret = SVGA3D_SetRenderTarget(svga->swc, SVGA3D_RT_DEPTH, hw->zsbuf);
+ if (ret != PIPE_OK) {
+ return ret;
+ }
+
+ if (hw->zsbuf &&
+ hw->zsbuf->format == PIPE_FORMAT_S8_USCALED_Z24_UNORM) {
+ ret = SVGA3D_SetRenderTarget(svga->swc, SVGA3D_RT_STENCIL, hw->zsbuf);
+ if (ret != PIPE_OK) {
+ return ret;
+ }
+ }
+ else {
+ ret = SVGA3D_SetRenderTarget(svga->swc, SVGA3D_RT_STENCIL, NULL);
+ if (ret != PIPE_OK) {
+ return ret;
+ }
+ }
+ }
+
+ return PIPE_OK;
+}
+
+
struct svga_tracked_state svga_hw_framebuffer =
{
"hw framebuffer state",
diff --git a/src/gallium/drivers/svga/svga_state_fs.c b/src/gallium/drivers/svga/svga_state_fs.c
index ad6f2947137..9c04adec8ee 100644
--- a/src/gallium/drivers/svga/svga_state_fs.c
+++ b/src/gallium/drivers/svga/svga_state_fs.c
@@ -136,7 +136,7 @@ static int make_fs_key( const struct svga_context *svga,
/* The blend workaround for simulating logicop xor behaviour
* requires that the incoming fragment color be white. This change
- * achieves that by creating a varient of the current fragment
+ * achieves that by creating a variant of the current fragment
* shader that overrides all output colors with 1,1,1,1
*
* This will work for most shaders, including those containing
diff --git a/src/gallium/drivers/svga/svga_state_need_swtnl.c b/src/gallium/drivers/svga/svga_state_need_swtnl.c
index 66fea02a4be..68c02578789 100644
--- a/src/gallium/drivers/svga/svga_state_need_swtnl.c
+++ b/src/gallium/drivers/svga/svga_state_need_swtnl.c
@@ -35,6 +35,11 @@
/***********************************************************************
*/
+
+/**
+ * Given a gallium vertex element format, return the corresponding SVGA3D
+ * format. Return SVGA3D_DECLTYPE_MAX for unsupported gallium formats.
+ */
static INLINE SVGA3dDeclType
svga_translate_vertex_format(enum pipe_format format)
{
@@ -80,6 +85,7 @@ static int update_need_swvfetch( struct svga_context *svga,
for (i = 0; i < svga->curr.velems->count; i++) {
svga->state.sw.ve_format[i] = svga_translate_vertex_format(svga->curr.velems->velem[i].src_format);
if (svga->state.sw.ve_format[i] == SVGA3D_DECLTYPE_MAX) {
+ /* Unsupported format - use software fetch */
need_swvfetch = TRUE;
break;
}
@@ -118,6 +124,11 @@ static int update_need_pipeline( struct svga_context *svga,
__FUNCTION__,
svga->curr.rast->need_pipeline,
(1 << svga->curr.reduced_prim) );
+ SVGA_DBG(DEBUG_SWTNL, "%s: rast need_pipeline tris (%s), lines (%s), points (%s)\n",
+ __FUNCTION__,
+ svga->curr.rast->need_pipeline_tris_str,
+ svga->curr.rast->need_pipeline_lines_str,
+ svga->curr.rast->need_pipeline_points_str);
need_pipeline = TRUE;
}
@@ -140,6 +151,10 @@ static int update_need_pipeline( struct svga_context *svga,
svga->dirty |= SVGA_NEW_NEED_PIPELINE;
}
+ /* DEBUG */
+ if (0 && svga->state.sw.need_pipeline)
+ debug_printf("sw.need_pipeline = %d\n", svga->state.sw.need_pipeline);
+
return 0;
}
@@ -164,20 +179,28 @@ static int update_need_swtnl( struct svga_context *svga,
boolean need_swtnl;
if (svga->debug.no_swtnl) {
- svga->state.sw.need_swvfetch = 0;
- svga->state.sw.need_pipeline = 0;
+ svga->state.sw.need_swvfetch = FALSE;
+ svga->state.sw.need_pipeline = FALSE;
}
need_swtnl = (svga->state.sw.need_swvfetch ||
svga->state.sw.need_pipeline);
if (svga->debug.force_swtnl) {
- need_swtnl = 1;
+ need_swtnl = TRUE;
}
+ /*
+ * Some state changes the draw module does makes us belive we
+ * we don't need swtnl. This causes the vdecl code to pickup
+ * the wrong buffers and vertex formats. Try trivial/line-wide.
+ */
+ if (svga->state.sw.in_swtnl_draw)
+ need_swtnl = TRUE;
+
if (need_swtnl != svga->state.sw.need_swtnl) {
SVGA_DBG(DEBUG_SWTNL|DEBUG_PERF,
- "%s need_swvfetch: %s, need_pipeline %s\n",
+ "%s: need_swvfetch %s, need_pipeline %s\n",
__FUNCTION__,
svga->state.sw.need_swvfetch ? "true" : "false",
svga->state.sw.need_pipeline ? "true" : "false");
diff --git a/src/gallium/drivers/svga/svga_state_tss.c b/src/gallium/drivers/svga/svga_state_tss.c
index f8b269a101e..c502506b93b 100644
--- a/src/gallium/drivers/svga/svga_state_tss.c
+++ b/src/gallium/drivers/svga/svga_state_tss.c
@@ -52,6 +52,16 @@ void svga_cleanup_tss_binding(struct svga_context *svga)
}
+struct bind_queue {
+ struct {
+ unsigned unit;
+ struct svga_hw_view_state *view;
+ } bind[PIPE_MAX_SAMPLERS];
+
+ unsigned bind_count;
+};
+
+
static int
update_tss_binding(struct svga_context *svga,
unsigned dirty )
@@ -63,15 +73,7 @@ update_tss_binding(struct svga_context *svga,
unsigned min_lod;
unsigned max_lod;
-
- struct {
- struct {
- unsigned unit;
- struct svga_hw_view_state *view;
- } bind[PIPE_MAX_SAMPLERS];
-
- unsigned bind_count;
- } queue;
+ struct bind_queue queue;
queue.bind_count = 0;
@@ -164,6 +166,64 @@ fail:
}
+/*
+ * Rebind textures.
+ *
+ * Similar to update_tss_binding, but without any state checking/update.
+ *
+ * Called at the beginning of every new command buffer to ensure that
+ * non-dirty textures are properly paged-in.
+ */
+enum pipe_error
+svga_reemit_tss_bindings(struct svga_context *svga)
+{
+ unsigned i;
+ enum pipe_error ret;
+ struct bind_queue queue;
+
+ queue.bind_count = 0;
+
+ for (i = 0; i < svga->state.hw_draw.num_views; i++) {
+ struct svga_hw_view_state *view = &svga->state.hw_draw.views[i];
+
+ if (view->v) {
+ queue.bind[queue.bind_count].unit = i;
+ queue.bind[queue.bind_count].view = view;
+ queue.bind_count++;
+ }
+ }
+
+ if (queue.bind_count) {
+ SVGA3dTextureState *ts;
+
+ ret = SVGA3D_BeginSetTextureState(svga->swc,
+ &ts,
+ queue.bind_count);
+ if (ret != PIPE_OK) {
+ return ret;
+ }
+
+ for (i = 0; i < queue.bind_count; i++) {
+ struct svga_winsys_surface *handle;
+
+ ts[i].stage = queue.bind[i].unit;
+ ts[i].name = SVGA3D_TS_BIND_TEXTURE;
+
+ assert(queue.bind[i].view->v);
+ handle = queue.bind[i].view->v->handle;
+ svga->swc->surface_relocation(svga->swc,
+ &ts[i].value,
+ handle,
+ SVGA_RELOC_READ);
+ }
+
+ SVGA_FIFOCommitAll(svga->swc);
+ }
+
+ return PIPE_OK;
+}
+
+
struct svga_tracked_state svga_hw_tss_binding = {
"texture binding emit",
SVGA_NEW_TEXTURE_BINDING |
diff --git a/src/gallium/drivers/svga/svga_state_vdecl.c b/src/gallium/drivers/svga/svga_state_vdecl.c
index 3af7bf2b358..2f85f9488f9 100644
--- a/src/gallium/drivers/svga/svga_state_vdecl.c
+++ b/src/gallium/drivers/svga/svga_state_vdecl.c
@@ -57,12 +57,14 @@ upload_user_buffers( struct svga_context *svga )
struct svga_buffer *buffer = svga_buffer(svga->curr.vb[i].buffer);
if (!buffer->uploaded.buffer) {
+ boolean flushed;
ret = u_upload_buffer( svga->upload_vb,
- 0,
+ 0, 0,
buffer->b.b.width0,
&buffer->b.b,
&buffer->uploaded.offset,
- &buffer->uploaded.buffer );
+ &buffer->uploaded.buffer,
+ &flushed);
if (ret)
return ret;
@@ -76,7 +78,6 @@ upload_user_buffers( struct svga_context *svga )
buffer->b.b.width0);
}
- pipe_resource_reference( &svga->curr.vb[i].buffer, buffer->uploaded.buffer );
svga->curr.vb[i].buffer_offset = buffer->uploaded.offset;
}
}
@@ -108,6 +109,7 @@ static int emit_hw_vs_vdecl( struct svga_context *svga,
for (i = 0; i < svga->curr.velems->count; i++) {
const struct pipe_vertex_buffer *vb = &svga->curr.vb[ve[i].vertex_buffer_index];
unsigned usage, index;
+ struct svga_buffer *buffer = svga_buffer(vb->buffer);
svga_generate_vdecl_semantics( i, &usage, &index );
@@ -125,6 +127,7 @@ static int emit_hw_vs_vdecl( struct svga_context *svga,
svga_hwtnl_vdecl( svga->hwtnl,
i,
&decl,
+ buffer->uploaded.buffer ? buffer->uploaded.buffer :
vb->buffer );
}
diff --git a/src/gallium/drivers/svga/svga_state_vs.c b/src/gallium/drivers/svga/svga_state_vs.c
index 5133c70593c..ae9a20ebb81 100644
--- a/src/gallium/drivers/svga/svga_state_vs.c
+++ b/src/gallium/drivers/svga/svga_state_vs.c
@@ -229,13 +229,11 @@ static int update_zero_stride( struct svga_context *svga,
translate->set_buffer(translate, vel->vertex_buffer_index,
mapped_buffer,
- vbuffer->stride, vbuffer->max_index);
+ vbuffer->stride, ~0);
translate->run(translate, 0, 1, 0,
svga->curr.zero_stride_constants);
- pipe_buffer_unmap(&svga->pipe,
- vbuffer->buffer,
- transfer);
+ pipe_buffer_unmap(&svga->pipe, transfer);
translate->release(translate);
}
diff --git a/src/gallium/drivers/svga/svga_surface.c b/src/gallium/drivers/svga/svga_surface.c
index 3e4bed76c05..3e8fb5f0271 100644
--- a/src/gallium/drivers/svga/svga_surface.c
+++ b/src/gallium/drivers/svga/svga_surface.c
@@ -100,8 +100,9 @@ svga_texture_copy_handle(struct svga_context *svga,
struct svga_winsys_surface *
-svga_texture_view_surface(struct pipe_context *pipe,
+svga_texture_view_surface(struct svga_context *svga,
struct svga_texture *tex,
+ SVGA3dSurfaceFlags flags,
SVGA3dSurfaceFormat format,
unsigned start_mip,
unsigned num_mip,
@@ -109,7 +110,7 @@ svga_texture_view_surface(struct pipe_context *pipe,
int zslice_pick,
struct svga_host_surface_cache_key *key) /* OUT */
{
- struct svga_screen *ss = svga_screen(pipe->screen);
+ struct svga_screen *ss = svga_screen(svga->pipe.screen);
struct svga_winsys_surface *handle;
uint32_t i, j;
unsigned z_offset = 0;
@@ -118,7 +119,7 @@ svga_texture_view_surface(struct pipe_context *pipe,
"svga: Create surface view: face %d zslice %d mips %d..%d\n",
face_pick, zslice_pick, start_mip, start_mip+num_mip-1);
- key->flags = 0;
+ key->flags = flags;
key->format = format;
key->numMipLevels = num_mip;
key->size.width = u_minify(tex->b.b.width0, start_mip);
@@ -161,7 +162,7 @@ svga_texture_view_surface(struct pipe_context *pipe,
u_minify(tex->b.b.depth0, i + start_mip) :
1);
- svga_texture_copy_handle(svga_context(pipe),
+ svga_texture_copy_handle(svga,
tex->handle,
0, 0, z_offset,
i + start_mip,
@@ -183,6 +184,7 @@ svga_create_surface(struct pipe_context *pipe,
struct pipe_resource *pt,
const struct pipe_surface *surf_tmpl)
{
+ struct svga_context *svga = svga_context(pipe);
struct svga_texture *tex = svga_texture(pt);
struct pipe_screen *screen = pipe->screen;
struct svga_surface *s;
@@ -191,6 +193,7 @@ svga_create_surface(struct pipe_context *pipe,
boolean render = (surf_tmpl->usage & (PIPE_BIND_RENDER_TARGET |
PIPE_BIND_DEPTH_STENCIL)) ? TRUE : FALSE;
boolean view = FALSE;
+ SVGA3dSurfaceFlags flags;
SVGA3dSurfaceFormat format;
assert(surf_tmpl->u.tex.first_layer == surf_tmpl->u.tex.last_layer);
@@ -219,10 +222,18 @@ svga_create_surface(struct pipe_context *pipe,
s->base.u.tex.first_layer = surf_tmpl->u.tex.first_layer;
s->base.u.tex.last_layer = surf_tmpl->u.tex.last_layer;
- if (!render)
+ if (!render) {
+ flags = SVGA3D_SURFACE_HINT_TEXTURE;
format = svga_translate_format(surf_tmpl->format);
- else
+ } else {
+ if (surf_tmpl->usage & PIPE_BIND_RENDER_TARGET) {
+ flags = SVGA3D_SURFACE_HINT_RENDERTARGET;
+ }
+ if (surf_tmpl->usage & PIPE_BIND_DEPTH_STENCIL) {
+ flags = SVGA3D_SURFACE_HINT_DEPTHSTENCIL;
+ }
format = svga_translate_format_render(surf_tmpl->format);
+ }
assert(format != SVGA3D_FORMAT_INVALID);
@@ -249,7 +260,8 @@ svga_create_surface(struct pipe_context *pipe,
SVGA_DBG(DEBUG_VIEWS, "svga: Surface view: yes %p, level %u face %u z %u, %p\n",
pt, surf_tmpl->u.tex.level, face, zslice, s);
- s->handle = svga_texture_view_surface(NULL, tex, format, surf_tmpl->u.tex.level,
+ s->handle = svga_texture_view_surface(svga, tex, flags, format,
+ surf_tmpl->u.tex.level,
1, face, zslice, &s->key);
s->real_face = 0;
s->real_level = 0;
@@ -329,7 +341,7 @@ void svga_mark_surfaces_dirty(struct svga_context *svga)
* pipe is optional context to inline the blit command in.
*/
void
-svga_propagate_surface(struct pipe_context *pipe, struct pipe_surface *surf)
+svga_propagate_surface(struct svga_context *svga, struct pipe_surface *surf)
{
struct svga_surface *s = svga_surface(surf);
struct svga_texture *tex = svga_texture(surf->texture);
@@ -354,7 +366,7 @@ svga_propagate_surface(struct pipe_context *pipe, struct pipe_surface *surf)
if (s->handle != tex->handle) {
SVGA_DBG(DEBUG_VIEWS, "svga: Surface propagate: tex %p, level %u, from %p\n", tex, surf->u.tex.level, surf);
- svga_texture_copy_handle(svga_context(pipe),
+ svga_texture_copy_handle(svga,
s->handle, 0, 0, 0, s->real_level, s->real_face,
tex->handle, 0, 0, zslice, surf->u.tex.level, face,
u_minify(tex->b.b.width0, surf->u.tex.level),
diff --git a/src/gallium/drivers/svga/svga_surface.h b/src/gallium/drivers/svga/svga_surface.h
index afb8326e1f3..bffc8c22c60 100644
--- a/src/gallium/drivers/svga/svga_surface.h
+++ b/src/gallium/drivers/svga/svga_surface.h
@@ -56,14 +56,15 @@ struct svga_surface
extern void
-svga_propagate_surface(struct pipe_context *pipe, struct pipe_surface *surf);
+svga_propagate_surface(struct svga_context *svga, struct pipe_surface *surf);
extern boolean
svga_surface_needs_propagation(struct pipe_surface *surf);
struct svga_winsys_surface *
-svga_texture_view_surface(struct pipe_context *pipe,
+svga_texture_view_surface(struct svga_context *svga,
struct svga_texture *tex,
+ SVGA3dSurfaceFlags flags,
SVGA3dSurfaceFormat format,
unsigned start_mip,
unsigned num_mip,
diff --git a/src/gallium/drivers/svga/svga_swtnl_backend.c b/src/gallium/drivers/svga/svga_swtnl_backend.c
index ff3da842729..ac9d637f8cb 100644
--- a/src/gallium/drivers/svga/svga_swtnl_backend.c
+++ b/src/gallium/drivers/svga/svga_swtnl_backend.c
@@ -87,11 +87,14 @@ svga_vbuf_render_allocate_vertices( struct vbuf_render *render,
svga_render->vbuf_size = MAX2(size, svga_render->vbuf_alloc_size);
svga_render->vbuf = pipe_buffer_create(screen,
PIPE_BIND_VERTEX_BUFFER,
+ PIPE_USAGE_STREAM,
svga_render->vbuf_size);
if(!svga_render->vbuf) {
svga_context_flush(svga, NULL);
+ assert(!svga_render->vbuf);
svga_render->vbuf = pipe_buffer_create(screen,
PIPE_BIND_VERTEX_BUFFER,
+ PIPE_USAGE_STREAM,
svga_render->vbuf_size);
assert(svga_render->vbuf);
}
@@ -141,7 +144,7 @@ svga_vbuf_render_unmap_vertices( struct vbuf_render *render,
pipe_buffer_flush_mapped_range(&svga->pipe,
svga_render->vbuf_transfer,
offset, length);
- pipe_buffer_unmap(&svga->pipe, svga_render->vbuf, svga_render->vbuf_transfer);
+ pipe_buffer_unmap(&svga->pipe, svga_render->vbuf_transfer);
svga_render->min_index = min_index;
svga_render->max_index = max_index;
svga_render->vbuf_used = MAX2(svga_render->vbuf_used, used);
@@ -158,7 +161,7 @@ svga_vbuf_render_set_primitive( struct vbuf_render *render,
}
static void
-svga_vbuf_sumbit_state( struct svga_vbuf_render *svga_render )
+svga_vbuf_submit_state( struct svga_vbuf_render *svga_render )
{
struct svga_context *svga = svga_render->svga;
SVGA3dVertexDecl vdecl[PIPE_MAX_ATTRIBS];
@@ -221,7 +224,8 @@ svga_vbuf_render_draw_arrays( struct vbuf_render *render,
unsigned bias = (svga_render->vbuf_offset - svga_render->vdecl_offset) / svga_render->vertex_size;
enum pipe_error ret = 0;
- svga_vbuf_sumbit_state(svga_render);
+ /* off to hardware */
+ svga_vbuf_submit_state(svga_render);
/* Need to call update_state() again as the draw module may have
* altered some of our state behind our backs. Testcase:
@@ -260,6 +264,7 @@ svga_vbuf_render_draw_elements( struct vbuf_render *render,
svga_render->ibuf_size = MAX2(size, svga_render->ibuf_alloc_size);
svga_render->ibuf = pipe_buffer_create(screen,
PIPE_BIND_INDEX_BUFFER,
+ PIPE_USAGE_STREAM,
svga_render->ibuf_size);
svga_render->ibuf_offset = 0;
}
@@ -267,9 +272,8 @@ svga_vbuf_render_draw_elements( struct vbuf_render *render,
pipe_buffer_write_nooverlap(&svga->pipe, svga_render->ibuf,
svga_render->ibuf_offset, 2 * nr_indices, indices);
-
/* off to hardware */
- svga_vbuf_sumbit_state(svga_render);
+ svga_vbuf_submit_state(svga_render);
/* Need to call update_state() again as the draw module may have
* altered some of our state behind our backs. Testcase:
diff --git a/src/gallium/drivers/svga/svga_swtnl_draw.c b/src/gallium/drivers/svga/svga_swtnl_draw.c
index 814e8edd70f..ad29c1b6425 100644
--- a/src/gallium/drivers/svga/svga_swtnl_draw.c
+++ b/src/gallium/drivers/svga/svga_swtnl_draw.c
@@ -51,6 +51,9 @@ svga_swtnl_draw_vbo(struct svga_context *svga,
assert(svga->state.sw.need_swtnl);
assert(draw);
+ /* Make sure that the need_swtnl flag does not go away */
+ svga->state.sw.in_swtnl_draw = TRUE;
+
ret = svga_update_state(svga, SVGA_STATE_SWTNL_DRAW);
if (ret) {
svga_context_flush(svga, NULL);
@@ -106,22 +109,23 @@ svga_swtnl_draw_vbo(struct svga_context *svga,
* unmap vertex/index buffers
*/
for (i = 0; i < svga->curr.num_vertex_buffers; i++) {
- pipe_buffer_unmap(&svga->pipe, svga->curr.vb[i].buffer,
- vb_transfer[i]);
+ pipe_buffer_unmap(&svga->pipe, vb_transfer[i]);
draw_set_mapped_vertex_buffer(draw, i, NULL);
}
if (ib_transfer) {
- pipe_buffer_unmap(&svga->pipe, svga->curr.ib.buffer, ib_transfer);
+ pipe_buffer_unmap(&svga->pipe, ib_transfer);
draw_set_mapped_index_buffer(draw, NULL);
}
if (svga->curr.cb[PIPE_SHADER_VERTEX]) {
- pipe_buffer_unmap(&svga->pipe,
- svga->curr.cb[PIPE_SHADER_VERTEX],
- cb_transfer);
+ pipe_buffer_unmap(&svga->pipe, cb_transfer);
}
+ /* Now safe to remove the need_swtnl flag in any update_state call */
+ svga->state.sw.in_swtnl_draw = FALSE;
+ svga->dirty |= SVGA_NEW_NEED_PIPELINE | SVGA_NEW_NEED_SWVFETCH;
+
return ret;
}
diff --git a/src/gallium/drivers/svga/svga_swtnl_state.c b/src/gallium/drivers/svga/svga_swtnl_state.c
index a7592382936..efda2f605b9 100644
--- a/src/gallium/drivers/svga/svga_swtnl_state.c
+++ b/src/gallium/drivers/svga/svga_swtnl_state.c
@@ -61,7 +61,7 @@ static void set_draw_viewport( struct svga_context *svga )
* going to be drawn with triangles, but we're not catching all
* cases where that will happen.
*/
- if (svga->curr.rast->templ.line_width > 1.0)
+ if (svga->curr.rast->need_pipeline & SVGA_PIPELINE_FLAG_LINES)
{
adjx = SVGA_LINE_ADJ_X + 0.175;
adjy = SVGA_LINE_ADJ_Y - 0.175;
diff --git a/src/gallium/drivers/svga/svga_tgsi_insn.c b/src/gallium/drivers/svga/svga_tgsi_insn.c
index f2591c5721a..99600cf5c00 100644
--- a/src/gallium/drivers/svga/svga_tgsi_insn.c
+++ b/src/gallium/drivers/svga/svga_tgsi_insn.c
@@ -57,7 +57,6 @@ translate_opcode(
case TGSI_OPCODE_MUL: return SVGA3DOP_MUL;
case TGSI_OPCODE_NOP: return SVGA3DOP_NOP;
case TGSI_OPCODE_NRM4: return SVGA3DOP_NRM;
- case TGSI_OPCODE_SSG: return SVGA3DOP_SGN;
default:
debug_printf("Unkown opcode %u\n", opcode);
assert( 0 );
@@ -285,6 +284,41 @@ static void reset_temp_regs( struct svga_shader_emitter *emit )
}
+/* Replace the src with the temporary specified in the dst, but copying
+ * only the necessary channels, and preserving the original swizzle (which is
+ * important given that several opcodes have constraints in the allowed
+ * swizzles).
+ */
+static boolean emit_repl( struct svga_shader_emitter *emit,
+ SVGA3dShaderDestToken dst,
+ struct src_register *src0)
+{
+ unsigned src0_swizzle;
+ unsigned chan;
+
+ assert(SVGA3dShaderGetRegType(dst.value) == SVGA3DREG_TEMP);
+
+ src0_swizzle = src0->base.swizzle;
+
+ dst.mask = 0;
+ for (chan = 0; chan < 4; ++chan) {
+ unsigned swizzle = (src0_swizzle >> (chan *2)) & 0x3;
+ dst.mask |= 1 << swizzle;
+ }
+ assert(dst.mask);
+
+ src0->base.swizzle = SVGA3DSWIZZLE_NONE;
+
+ if (!emit_op1( emit, inst_token( SVGA3DOP_MOV ), dst, *src0 ))
+ return FALSE;
+
+ *src0 = src( dst );
+ src0->base.swizzle = src0_swizzle;
+
+ return TRUE;
+}
+
+
static boolean submit_op0( struct svga_shader_emitter *emit,
SVGA3dShaderInstToken inst,
SVGA3dShaderDestToken dest )
@@ -333,14 +367,11 @@ static boolean submit_op2( struct svga_shader_emitter *emit,
src0.base.num != src1.base.num)
need_temp = TRUE;
- if (need_temp)
- {
+ if (need_temp) {
temp = get_temp( emit );
- if (!emit_op1( emit, inst_token( SVGA3DOP_MOV ), temp, src0 ))
+ if (!emit_repl( emit, temp, &src0 ))
return FALSE;
-
- src0 = src( temp );
}
if (!emit_op2( emit, inst, dest, src0, src1 ))
@@ -396,24 +427,18 @@ static boolean submit_op3( struct svga_shader_emitter *emit,
(type2 == SVGA3DREG_INPUT && src1.base.num != src2.base.num))
need_temp1 = TRUE;
- if (need_temp0)
- {
+ if (need_temp0) {
temp0 = get_temp( emit );
- if (!emit_op1( emit, inst_token( SVGA3DOP_MOV ), temp0, src0 ))
+ if (!emit_repl( emit, temp0, &src0 ))
return FALSE;
-
- src0 = src( temp0 );
}
- if (need_temp1)
- {
+ if (need_temp1) {
temp1 = get_temp( emit );
- if (!emit_op1( emit, inst_token( SVGA3DOP_MOV ), temp1, src1 ))
+ if (!emit_repl( emit, temp1, &src1 ))
return FALSE;
-
- src1 = src( temp1 );
}
if (!emit_op3( emit, inst, dest, src0, src1, src2 ))
@@ -478,24 +503,18 @@ static boolean submit_op4( struct svga_shader_emitter *emit,
(type2 == SVGA3DREG_INPUT && src3.base.num != src2.base.num))
need_temp3 = TRUE;
- if (need_temp0)
- {
+ if (need_temp0) {
temp0 = get_temp( emit );
- if (!emit_op1( emit, inst_token( SVGA3DOP_MOV ), temp0, src0 ))
+ if (!emit_repl( emit, temp0, &src0 ))
return FALSE;
-
- src0 = src( temp0 );
}
- if (need_temp3)
- {
+ if (need_temp3) {
temp3 = get_temp( emit );
- if (!emit_op1( emit, inst_token( SVGA3DOP_MOV ), temp3, src3 ))
+ if (!emit_repl( emit, temp3, &src3 ))
return FALSE;
-
- src3 = src( temp3 );
}
if (!emit_op4( emit, inst, dest, src0, src1, src2, src3 ))
@@ -509,6 +528,55 @@ static boolean submit_op4( struct svga_shader_emitter *emit,
}
+static boolean alias_src_dst( struct src_register src,
+ SVGA3dShaderDestToken dst )
+{
+ if (src.base.num != dst.num)
+ return FALSE;
+
+ if (SVGA3dShaderGetRegType(dst.value) !=
+ SVGA3dShaderGetRegType(src.base.value))
+ return FALSE;
+
+ return TRUE;
+}
+
+
+static boolean submit_lrp(struct svga_shader_emitter *emit,
+ SVGA3dShaderDestToken dst,
+ struct src_register src0,
+ struct src_register src1,
+ struct src_register src2)
+{
+ SVGA3dShaderDestToken tmp;
+ boolean need_dst_tmp = FALSE;
+
+ /* The dst reg must be a temporary, and not be the same as src0 or src2 */
+ if (SVGA3dShaderGetRegType(dst.value) != SVGA3DREG_TEMP ||
+ alias_src_dst(src0, dst) ||
+ alias_src_dst(src2, dst))
+ need_dst_tmp = TRUE;
+
+ if (need_dst_tmp) {
+ tmp = get_temp( emit );
+ tmp.mask = dst.mask;
+ }
+ else {
+ tmp = dst;
+ }
+
+ if (!submit_op3(emit, inst_token( SVGA3DOP_LRP ), tmp, src0, src1, src2))
+ return FALSE;
+
+ if (need_dst_tmp) {
+ if (!submit_op1(emit, inst_token( SVGA3DOP_MOV ), dst, src( tmp )))
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
+
static boolean emit_def_const( struct svga_shader_emitter *emit,
SVGA3dShaderConstType type,
unsigned idx,
@@ -747,7 +815,7 @@ static boolean emit_fake_arl(struct svga_shader_emitter *emit,
static boolean emit_if(struct svga_shader_emitter *emit,
const struct tgsi_full_instruction *insn)
{
- const struct src_register src = translate_src_register(
+ struct src_register src0 = translate_src_register(
emit, &insn->Src[0] );
struct src_register zero = get_zero_immediate( emit );
SVGA3dShaderInstToken if_token = inst_token( SVGA3DOP_IFC );
@@ -755,10 +823,23 @@ static boolean emit_if(struct svga_shader_emitter *emit,
if_token.control = SVGA3DOPCOMPC_NE;
zero = scalar(zero, TGSI_SWIZZLE_X);
+ if (SVGA3dShaderGetRegType(src0.base.value) == SVGA3DREG_CONST) {
+ /*
+ * Max different constant registers readable per IFC instruction is 1.
+ */
+
+ SVGA3dShaderDestToken tmp = get_temp( emit );
+
+ if (!submit_op1(emit, inst_token( SVGA3DOP_MOV ), tmp, src0))
+ return FALSE;
+
+ src0 = scalar(src( tmp ), TGSI_SWIZZLE_X);
+ }
+
emit->dynamic_branching_level++;
return (emit_instruction( emit, if_token ) &&
- emit_src( emit, src ) &&
+ emit_src( emit, src0 ) &&
emit_src( emit, zero ) );
}
@@ -832,7 +913,7 @@ static boolean emit_cmp(struct svga_shader_emitter *emit,
*/
if (!submit_op2(emit, inst_token(SVGA3DOP_SLT), temp, src0, zero))
return FALSE;
- return submit_op3(emit, inst_token(SVGA3DOP_LRP), dst, src(temp), src1, src2);
+ return submit_lrp(emit, dst, src(temp), src1, src2);
}
/* CMP DST, SRC0, SRC2, SRC1 */
@@ -1066,6 +1147,41 @@ static boolean emit_cos(struct svga_shader_emitter *emit,
return TRUE;
}
+static boolean emit_ssg(struct svga_shader_emitter *emit,
+ const struct tgsi_full_instruction *insn )
+{
+ SVGA3dShaderDestToken dst = translate_dst_register( emit, insn, 0 );
+ struct src_register src0 = translate_src_register(
+ emit, &insn->Src[0] );
+ SVGA3dShaderDestToken temp0 = get_temp( emit );
+ SVGA3dShaderDestToken temp1 = get_temp( emit );
+ struct src_register zero, one;
+
+ if (emit->unit == PIPE_SHADER_VERTEX) {
+ /* SGN DST, SRC0, TMP0, TMP1 */
+ return submit_op3( emit, inst_token( SVGA3DOP_SGN ), dst, src0,
+ src( temp0 ), src( temp1 ) );
+ }
+
+ zero = get_zero_immediate( emit );
+ one = scalar( zero, TGSI_SWIZZLE_W );
+ zero = scalar( zero, TGSI_SWIZZLE_X );
+
+ /* CMP TMP0, SRC0, one, zero */
+ if (!submit_op3( emit, inst_token( SVGA3DOP_CMP ),
+ writemask( temp0, dst.mask ), src0, one, zero ))
+ return FALSE;
+
+ /* CMP TMP1, negate(SRC0), negate(one), zero */
+ if (!submit_op3( emit, inst_token( SVGA3DOP_CMP ),
+ writemask( temp1, dst.mask ), negate( src0 ), negate( one ),
+ zero ))
+ return FALSE;
+
+ /* ADD DST, TMP0, TMP1 */
+ return submit_op2( emit, inst_token( SVGA3DOP_ADD ), dst, src( temp0 ),
+ src( temp1 ) );
+}
/*
* ADD DST SRC0, negate(SRC0)
@@ -1588,6 +1704,10 @@ static boolean emit_deriv(struct svga_shader_emitter *emit,
}
else {
unsigned opcode;
+ const struct tgsi_full_src_register *reg = &insn->Src[0];
+ SVGA3dShaderInstToken inst;
+ SVGA3dShaderDestToken dst;
+ struct src_register src0;
switch (insn->Instruction.Opcode) {
case TGSI_OPCODE_DDX:
@@ -1600,7 +1720,21 @@ static boolean emit_deriv(struct svga_shader_emitter *emit,
return FALSE;
}
- return emit_simple_instruction( emit, opcode, insn );
+ inst = inst_token( opcode );
+ dst = translate_dst_register( emit, insn, 0 );
+ src0 = translate_src_register( emit, reg );
+
+ /* We cannot use negate or abs on source to dsx/dsy instruction.
+ */
+ if (reg->Register.Absolute ||
+ reg->Register.Negate) {
+ SVGA3dShaderDestToken temp = get_temp( emit );
+
+ if (!emit_repl( emit, temp, &src0 ))
+ return FALSE;
+ }
+
+ return submit_op1( emit, inst, dst, src0 );
}
}
@@ -1624,19 +1758,6 @@ static boolean emit_arl(struct svga_shader_emitter *emit,
}
}
-static boolean alias_src_dst( struct src_register src,
- SVGA3dShaderDestToken dst )
-{
- if (src.base.num != dst.num)
- return FALSE;
-
- if (SVGA3dShaderGetRegType(dst.value) !=
- SVGA3dShaderGetRegType(src.base.value))
- return FALSE;
-
- return TRUE;
-}
-
static boolean emit_pow(struct svga_shader_emitter *emit,
const struct tgsi_full_instruction *insn)
{
@@ -1729,37 +1850,14 @@ static boolean emit_lrp(struct svga_shader_emitter *emit,
const struct tgsi_full_instruction *insn)
{
SVGA3dShaderDestToken dst = translate_dst_register( emit, insn, 0 );
- SVGA3dShaderDestToken tmp;
const struct src_register src0 = translate_src_register(
emit, &insn->Src[0] );
const struct src_register src1 = translate_src_register(
emit, &insn->Src[1] );
const struct src_register src2 = translate_src_register(
emit, &insn->Src[2] );
- boolean need_dst_tmp = FALSE;
-
- /* The dst reg must not be the same as src0 or src2 */
- if (alias_src_dst(src0, dst) ||
- alias_src_dst(src2, dst))
- need_dst_tmp = TRUE;
- if (need_dst_tmp) {
- tmp = get_temp( emit );
- tmp.mask = dst.mask;
- }
- else {
- tmp = dst;
- }
-
- if (!submit_op3(emit, inst_token( SVGA3DOP_LRP ), tmp, src0, src1, src2))
- return FALSE;
-
- if (need_dst_tmp) {
- if (!submit_op1(emit, inst_token( SVGA3DOP_MOV ), dst, src( tmp )))
- return FALSE;
- }
-
- return TRUE;
+ return submit_lrp(emit, dst, src0, src1, src2);
}
@@ -2366,6 +2464,9 @@ static boolean svga_emit_instruction( struct svga_shader_emitter *emit,
case TGSI_OPCODE_LRP:
return emit_lrp( emit, insn );
+ case TGSI_OPCODE_SSG:
+ return emit_ssg( emit, insn );
+
default: {
unsigned opcode = translate_opcode(insn->Instruction.Opcode);
@@ -2715,6 +2816,7 @@ needs_to_create_zero( struct svga_shader_emitter *emit )
return TRUE;
if (emit->info.opcode_count[TGSI_OPCODE_DST] >= 1 ||
+ emit->info.opcode_count[TGSI_OPCODE_SSG] >= 1 ||
emit->info.opcode_count[TGSI_OPCODE_LIT] >= 1)
return TRUE;
}
diff --git a/src/gallium/drivers/svga/svga_winsys.h b/src/gallium/drivers/svga/svga_winsys.h
index 5e4bdeff2ee..ae61cea083f 100644
--- a/src/gallium/drivers/svga/svga_winsys.h
+++ b/src/gallium/drivers/svga/svga_winsys.h
@@ -136,6 +136,9 @@ struct svga_winsys_screen
void
(*destroy)(struct svga_winsys_screen *sws);
+ SVGA3dHardwareVersion
+ (*get_hw_version)(struct svga_winsys_screen *sws);
+
boolean
(*get_cap)(struct svga_winsys_screen *sws,
SVGA3dDevCapIndex index,
@@ -243,12 +246,12 @@ struct svga_winsys_screen
/**
* Map the entire data store of a buffer object into the client's address.
- * flags is a bitmaks of PIPE_TRANSFER_*
+ * usage is a bitmask of PIPE_TRANSFER_*
*/
void *
(*buffer_map)( struct svga_winsys_screen *sws,
struct svga_winsys_buffer *buf,
- unsigned flags );
+ unsigned usage );
void
(*buffer_unmap)( struct svga_winsys_screen *sws,
diff --git a/src/gallium/drivers/svga/svgadump/svga_shader_op.c b/src/gallium/drivers/svga/svgadump/svga_shader_op.c
index 95612a80063..ad1549d9f81 100644
--- a/src/gallium/drivers/svga/svgadump/svga_shader_op.c
+++ b/src/gallium/drivers/svga/svgadump/svga_shader_op.c
@@ -136,7 +136,7 @@ static struct sh_opcode_info opcode_info[] =
{ "dsy", 1, 1, 0, 0, SVGA3DOP_INVALID, },
{ "texldd", 1, 4, 0, 0, SVGA3DOP_INVALID, },
{ "setp", 1, 2, 0, 0, SVGA3DOP_SETP, },
- { "texldl", 1, 2, 0, 0, SVGA3DOP_INVALID, },
+ { "texldl", 1, 2, 0, 0, SVGA3DOP_TEXLDL, },
{ "breakp", 0, 1, 0, 0, SVGA3DOP_INVALID, },
};
@@ -156,6 +156,8 @@ const struct sh_opcode_info *svga_opcode_info( uint op )
if (info->svga_opcode == SVGA3DOP_INVALID) {
/* No valid information. Please provide number of dst/src registers.
*/
+ _debug_printf("Missing information for opcode %u, '%s'\n", op,
+ opcode_info[op].mnemonic);
assert( 0 );
return NULL;
}
diff --git a/src/gallium/drivers/trace/tr_context.c b/src/gallium/drivers/trace/tr_context.c
index eaabae8ce42..4db7619c424 100644
--- a/src/gallium/drivers/trace/tr_context.c
+++ b/src/gallium/drivers/trace/tr_context.c
@@ -1184,7 +1184,6 @@ trace_context_clear_depth_stencil(struct pipe_context *_pipe,
static INLINE void
trace_context_flush(struct pipe_context *_pipe,
- unsigned flags,
struct pipe_fence_handle **fence)
{
struct trace_context *tr_ctx = trace_context(_pipe);
@@ -1193,9 +1192,8 @@ trace_context_flush(struct pipe_context *_pipe,
trace_dump_call_begin("pipe_context", "flush");
trace_dump_arg(ptr, pipe);
- trace_dump_arg(uint, flags);
- pipe->flush(pipe, flags, fence);
+ pipe->flush(pipe, fence);
if(fence)
trace_dump_ret(ptr, *fence);
@@ -1219,31 +1217,6 @@ trace_context_destroy(struct pipe_context *_pipe)
FREE(tr_ctx);
}
-static unsigned int
-trace_is_resource_referenced( struct pipe_context *_pipe,
- struct pipe_resource *_resource,
- unsigned level, int layer)
-{
- struct trace_context *tr_ctx = trace_context(_pipe);
- struct trace_resource *tr_tex = trace_resource(_resource);
- struct pipe_context *pipe = tr_ctx->pipe;
- struct pipe_resource *texture = tr_tex->resource;
- unsigned int referenced;
-
- trace_dump_call_begin("pipe_context", "is_resource_referenced");
- trace_dump_arg(ptr, pipe);
- trace_dump_arg(ptr, texture);
- trace_dump_arg(uint, level);
- trace_dump_arg(int, layer);
-
- referenced = pipe->is_resource_referenced(pipe, texture, level, layer);
-
- trace_dump_ret(uint, referenced);
- trace_dump_call_end();
-
- return referenced;
-}
-
/********************************************************************
* transfer
@@ -1419,6 +1392,28 @@ trace_context_transfer_inline_write(struct pipe_context *_context,
}
+static void trace_redefine_user_buffer(struct pipe_context *_context,
+ struct pipe_resource *_resource,
+ unsigned offset, unsigned size)
+{
+ struct trace_context *tr_context = trace_context(_context);
+ struct trace_resource *tr_tex = trace_resource(_resource);
+ struct pipe_context *context = tr_context->pipe;
+ struct pipe_resource *resource = tr_tex->resource;
+
+ assert(resource->screen == context->screen);
+
+ trace_dump_call_begin("pipe_context", "redefine_user_buffer");
+
+ trace_dump_arg(ptr, context);
+ trace_dump_arg(ptr, resource);
+ trace_dump_arg(uint, offset);
+ trace_dump_arg(uint, size);
+
+ trace_dump_call_end();
+
+ context->redefine_user_buffer(context, resource, offset, size);
+}
static const struct debug_named_value rbug_blocker_flags[] = {
@@ -1498,7 +1493,6 @@ trace_context_create(struct trace_screen *tr_scr,
tr_ctx->base.clear_render_target = trace_context_clear_render_target;
tr_ctx->base.clear_depth_stencil = trace_context_clear_depth_stencil;
tr_ctx->base.flush = trace_context_flush;
- tr_ctx->base.is_resource_referenced = trace_is_resource_referenced;
tr_ctx->base.get_transfer = trace_context_get_transfer;
tr_ctx->base.transfer_destroy = trace_context_transfer_destroy;
@@ -1506,6 +1500,7 @@ trace_context_create(struct trace_screen *tr_scr,
tr_ctx->base.transfer_unmap = trace_context_transfer_unmap;
tr_ctx->base.transfer_flush_region = trace_context_transfer_flush_region;
tr_ctx->base.transfer_inline_write = trace_context_transfer_inline_write;
+ tr_ctx->base.redefine_user_buffer = trace_redefine_user_buffer;
tr_ctx->pipe = pipe;
diff --git a/src/gallium/drivers/trace/tr_dump.c b/src/gallium/drivers/trace/tr_dump.c
index 51a4ea96335..8a4ec20fb84 100644
--- a/src/gallium/drivers/trace/tr_dump.c
+++ b/src/gallium/drivers/trace/tr_dump.c
@@ -60,10 +60,9 @@
static struct os_stream *stream = NULL;
static unsigned refcount = 0;
-static pipe_mutex call_mutex;
+pipe_static_mutex(call_mutex);
static long unsigned call_no = 0;
static boolean dumping = FALSE;
-static boolean initialized = FALSE;
static INLINE void
@@ -225,26 +224,13 @@ trace_dump_trace_close(void)
stream = NULL;
refcount = 0;
call_no = 0;
- pipe_mutex_destroy(call_mutex);
}
}
-void trace_dump_init()
-{
- if (initialized)
- return;
-
- pipe_mutex_init(call_mutex);
- dumping = FALSE;
- initialized = TRUE;
-}
-
boolean trace_dump_trace_begin()
{
const char *filename;
- assert(initialized);
-
filename = debug_get_option("GALLIUM_TRACE", NULL);
if(!filename)
return FALSE;
diff --git a/src/gallium/drivers/trace/tr_dump.h b/src/gallium/drivers/trace/tr_dump.h
index 74c5e83e9e1..62b4fe429b1 100644
--- a/src/gallium/drivers/trace/tr_dump.h
+++ b/src/gallium/drivers/trace/tr_dump.h
@@ -43,11 +43,6 @@ struct pipe_transfer;
struct pipe_box;
/*
- * Call before use.
- */
-void trace_dump_init(void);
-
-/*
* Low level dumping controls.
*
* Opening the trace file and checking if that is opened.
diff --git a/src/gallium/drivers/trace/tr_dump_state.c b/src/gallium/drivers/trace/tr_dump_state.c
index 155c869fbd9..18805655bd7 100644
--- a/src/gallium/drivers/trace/tr_dump_state.c
+++ b/src/gallium/drivers/trace/tr_dump_state.c
@@ -517,7 +517,6 @@ void trace_dump_vertex_buffer(const struct pipe_vertex_buffer *state)
trace_dump_struct_begin("pipe_vertex_buffer");
trace_dump_member(uint, state, stride);
- trace_dump_member(uint, state, max_index);
trace_dump_member(uint, state, buffer_offset);
trace_dump_member(resource_ptr, state, buffer);
diff --git a/src/gallium/drivers/trace/tr_screen.c b/src/gallium/drivers/trace/tr_screen.c
index c2de2daa883..42180c4f19e 100644
--- a/src/gallium/drivers/trace/tr_screen.c
+++ b/src/gallium/drivers/trace/tr_screen.c
@@ -158,8 +158,7 @@ trace_screen_is_format_supported(struct pipe_screen *_screen,
enum pipe_format format,
enum pipe_texture_target target,
unsigned sample_count,
- unsigned tex_usage,
- unsigned geom_flags)
+ unsigned tex_usage)
{
struct trace_screen *tr_scr = trace_screen(_screen);
struct pipe_screen *screen = tr_scr->screen;
@@ -172,10 +171,9 @@ trace_screen_is_format_supported(struct pipe_screen *_screen,
trace_dump_arg(int, target);
trace_dump_arg(uint, sample_count);
trace_dump_arg(uint, tex_usage);
- trace_dump_arg(uint, geom_flags);
result = screen->is_format_supported(screen, format, target, sample_count,
- tex_usage, geom_flags);
+ tex_usage);
trace_dump_ret(bool, result);
@@ -393,10 +391,9 @@ trace_screen_fence_reference(struct pipe_screen *_screen,
}
-static int
+static boolean
trace_screen_fence_signalled(struct pipe_screen *_screen,
- struct pipe_fence_handle *fence,
- unsigned flags)
+ struct pipe_fence_handle *fence)
{
struct trace_screen *tr_scr = trace_screen(_screen);
struct pipe_screen *screen = tr_scr->screen;
@@ -406,11 +403,10 @@ trace_screen_fence_signalled(struct pipe_screen *_screen,
trace_dump_arg(ptr, screen);
trace_dump_arg(ptr, fence);
- trace_dump_arg(uint, flags);
- result = screen->fence_signalled(screen, fence, flags);
+ result = screen->fence_signalled(screen, fence);
- trace_dump_ret(int, result);
+ trace_dump_ret(bool, result);
trace_dump_call_end();
@@ -418,10 +414,10 @@ trace_screen_fence_signalled(struct pipe_screen *_screen,
}
-static int
+static boolean
trace_screen_fence_finish(struct pipe_screen *_screen,
struct pipe_fence_handle *fence,
- unsigned flags)
+ uint64_t timeout)
{
struct trace_screen *tr_scr = trace_screen(_screen);
struct pipe_screen *screen = tr_scr->screen;
@@ -431,11 +427,11 @@ trace_screen_fence_finish(struct pipe_screen *_screen,
trace_dump_arg(ptr, screen);
trace_dump_arg(ptr, fence);
- trace_dump_arg(uint, flags);
+ trace_dump_arg(uint, timeout);
- result = screen->fence_finish(screen, fence, flags);
+ result = screen->fence_finish(screen, fence, timeout);
- trace_dump_ret(int, result);
+ trace_dump_ret(bool, result);
trace_dump_call_end();
@@ -472,8 +468,6 @@ trace_enabled(void)
return trace;
firstrun = FALSE;
- trace_dump_init();
-
if(trace_dump_trace_begin()) {
trace_dumping_start();
trace = TRUE;
diff --git a/src/gallium/include/pipe/p_compiler.h b/src/gallium/include/pipe/p_compiler.h
index a842d541eb2..ec9f1058974 100644
--- a/src/gallium/include/pipe/p_compiler.h
+++ b/src/gallium/include/pipe/p_compiler.h
@@ -173,6 +173,18 @@ typedef unsigned char boolean;
# define __FUNCTION__ "<unknown>"
# endif
#endif
+#ifndef __func__
+# if (__STDC_VERSION__ >= 199901L) || \
+ (defined(__SUNPRO_C) && defined(__C99FEATURES__))
+ /* __func__ is part of C99 */
+# elif defined(_MSC_VER)
+# if _MSC_VER >= 1300
+# define __func__ __FUNCTION__
+# else
+# define __func__ "<unknown>"
+# endif
+# endif
+#endif
diff --git a/src/gallium/include/pipe/p_context.h b/src/gallium/include/pipe/p_context.h
index 589cac2ddd3..d8de3bac0ec 100644
--- a/src/gallium/include/pipe/p_context.h
+++ b/src/gallium/include/pipe/p_context.h
@@ -312,29 +312,12 @@ struct pipe_context {
unsigned dstx, unsigned dsty,
unsigned width, unsigned height);
- /** Flush rendering
- * \param flags bitmask of PIPE_FLUSH_x tokens)
+ /** Flush draw commands
*/
void (*flush)( struct pipe_context *pipe,
- unsigned flags,
struct pipe_fence_handle **fence );
/**
- * Check whether a texture is referenced by an unflushed hw command.
- * The state-tracker uses this function to avoid unnecessary flushes.
- * It is safe (but wasteful) to always return
- * PIPE_REFERENCED_FOR_READ | PIPE_REFERENCED_FOR_WRITE.
- * \param pipe context whose unflushed hw commands will be checked.
- * \param texture texture to check.
- * \param level mipmap level.
- * \param layer cubemap face, 2d array or 3d slice, 0 otherwise. Use -1 for any layer.
- * \return mask of PIPE_REFERENCED_FOR_READ/WRITE or PIPE_UNREFERENCED
- */
- unsigned int (*is_resource_referenced)(struct pipe_context *pipe,
- struct pipe_resource *texture,
- unsigned level, int layer);
-
- /**
* Create a view on a texture to be used by a shader stage.
*/
struct pipe_sampler_view * (*create_sampler_view)(struct pipe_context *ctx,
@@ -399,6 +382,19 @@ struct pipe_context {
unsigned stride,
unsigned layer_stride);
+
+ /* Notify a driver that a content of a user buffer has been changed.
+ * The changed range is [offset, offset+size-1].
+ * The new width0 of the buffer is offset+size. */
+ void (*redefine_user_buffer)(struct pipe_context *,
+ struct pipe_resource *,
+ unsigned offset,
+ unsigned size);
+
+ /**
+ * Flush any pending framebuffer writes and invalidate texture caches.
+ */
+ void (*texture_barrier)(struct pipe_context *);
};
diff --git a/src/gallium/include/pipe/p_defines.h b/src/gallium/include/pipe/p_defines.h
index f5af15ff9ff..bac3300df3c 100644
--- a/src/gallium/include/pipe/p_defines.h
+++ b/src/gallium/include/pipe/p_defines.h
@@ -225,13 +225,13 @@ enum pipe_transfer_usage {
/**
* Discards the memory within the mapped region.
*
- * It should not be used with PIPE_TRANSFER_CPU_READ.
+ * It should not be used with PIPE_TRANSFER_READ.
*
* See also:
* - OpenGL's ARB_map_buffer_range extension, MAP_INVALIDATE_RANGE_BIT flag.
- * - Direct3D's D3DLOCK_DISCARD flag.
*/
- PIPE_TRANSFER_DISCARD = (1 << 8),
+ PIPE_TRANSFER_DISCARD = (1 << 8), /* DEPRECATED */
+ PIPE_TRANSFER_DISCARD_RANGE = (1 << 8),
/**
* Fail if the resource cannot be mapped immediately.
@@ -246,7 +246,7 @@ enum pipe_transfer_usage {
/**
* Do not attempt to synchronize pending operations on the resource when mapping.
*
- * It should not be used with PIPE_TRANSFER_CPU_READ.
+ * It should not be used with PIPE_TRANSFER_READ.
*
* See also:
* - OpenGL's ARB_map_buffer_range extension, MAP_UNSYNCHRONIZED_BIT flag.
@@ -260,13 +260,28 @@ enum pipe_transfer_usage {
* Written ranges will be notified later with
* pipe_context::transfer_flush_region.
*
- * It should not be used with PIPE_TRANSFER_CPU_READ.
+ * It should not be used with PIPE_TRANSFER_READ.
*
* See also:
* - pipe_context::transfer_flush_region
* - OpenGL's ARB_map_buffer_range extension, MAP_FLUSH_EXPLICIT_BIT flag.
*/
- PIPE_TRANSFER_FLUSH_EXPLICIT = (1 << 11)
+ PIPE_TRANSFER_FLUSH_EXPLICIT = (1 << 11),
+
+ /**
+ * Discards all memory backing the resource.
+ *
+ * It should not be used with PIPE_TRANSFER_READ.
+ *
+ * This is equivalent to:
+ * - OpenGL's ARB_map_buffer_range extension, MAP_INVALIDATE_BUFFER_BIT
+ * - BufferData(NULL) on a GL buffer
+ * - Direct3D's D3DLOCK_DISCARD flag.
+ * - WDDM's D3DDDICB_LOCKFLAGS.Discard flag.
+ * - D3D10 DDI's D3D10_DDI_MAP_WRITE_DISCARD flag
+ * - D3D10's D3D10_MAP_WRITE_DISCARD flag.
+ */
+ PIPE_TRANSFER_DISCARD_WHOLE_RESOURCE = (1 << 12)
};
@@ -322,25 +337,6 @@ enum pipe_transfer_usage {
#define PIPE_USAGE_STAGING 5 /* supports data transfers from the GPU to the CPU */
-/* These are intended to be used in calls to is_format_supported, but
- * no driver actually uses these flags, and only the glx/xlib state
- * tracker issues them.
- *
- * Deprecate?
- */
-#define PIPE_TEXTURE_GEOM_NON_SQUARE 0x1
-#define PIPE_TEXTURE_GEOM_NON_POWER_OF_TWO 0x2
-
-
-/**
- * Flush types:
- */
-#define PIPE_FLUSH_RENDER_CACHE 0x1
-#define PIPE_FLUSH_TEXTURE_CACHE 0x2
-#define PIPE_FLUSH_SWAPBUFFERS 0x4
-#define PIPE_FLUSH_FRAME 0x8 /**< Mark the end of a frame */
-
-
/**
* Shaders
*/
@@ -380,7 +376,8 @@ enum pipe_transfer_usage {
#define PIPE_QUERY_SO_STATISTICS 5
#define PIPE_QUERY_GPU_FINISHED 6
#define PIPE_QUERY_TIMESTAMP_DISJOINT 7
-#define PIPE_QUERY_TYPES 8
+#define PIPE_QUERY_OCCLUSION_PREDICATE 8
+#define PIPE_QUERY_TYPES 9
/**
@@ -410,6 +407,8 @@ enum pipe_transfer_usage {
#define PIPE_SWIZZLE_ONE 5
+#define PIPE_TIMEOUT_INFINITE 0xffffffffffffffffull
+
/**
* Implementation capabilities/limits which are queried through
* pipe_screen::get_param() and pipe_screen::get_paramf().
@@ -462,6 +461,8 @@ enum pipe_cap {
PIPE_CAP_TGSI_FS_COORD_PIXEL_CENTER_INTEGER,
PIPE_CAP_DEPTH_CLAMP,
PIPE_CAP_SHADER_STENCIL_EXPORT,
+ PIPE_CAP_TGSI_INSTANCEID,
+ PIPE_CAP_VERTEX_ELEMENT_INSTANCE_DIVISOR,
};
/* Shader caps not specific to any single stage */
@@ -487,13 +488,6 @@ enum pipe_shader_cap
PIPE_SHADER_CAP_SUBROUTINES, /* BGNSUB, ENDSUB, CAL, RET */
};
-/**
- * Referenced query flags.
- */
-
-#define PIPE_UNREFERENCED 0
-#define PIPE_REFERENCED_FOR_READ (1 << 0)
-#define PIPE_REFERENCED_FOR_WRITE (1 << 1)
/**
* Composite query types
diff --git a/src/gallium/include/pipe/p_format.h b/src/gallium/include/pipe/p_format.h
index 22cc7aa18a2..d53af598e75 100644
--- a/src/gallium/include/pipe/p_format.h
+++ b/src/gallium/include/pipe/p_format.h
@@ -33,6 +33,16 @@
extern "C" {
#endif
+
+enum pipe_type {
+ PIPE_TYPE_UNORM = 0,
+ PIPE_TYPE_SNORM,
+ PIPE_TYPE_SINT,
+ PIPE_TYPE_UINT,
+ PIPE_TYPE_FLOAT,
+ PIPE_TYPE_COUNT
+};
+
/**
* Texture/surface image formats (preliminary)
*/
@@ -190,6 +200,17 @@ enum pipe_format {
PIPE_FORMAT_X24S8_USCALED = 136,
PIPE_FORMAT_S8X24_USCALED = 137,
PIPE_FORMAT_X32_S8X24_USCALED = 138,
+
+ PIPE_FORMAT_B2G3R3_UNORM = 139,
+ PIPE_FORMAT_L16A16_UNORM = 140,
+ PIPE_FORMAT_A16_UNORM = 141,
+ PIPE_FORMAT_I16_UNORM = 142,
+
+ PIPE_FORMAT_LATC1_UNORM = 143,
+ PIPE_FORMAT_LATC1_SNORM = 144,
+ PIPE_FORMAT_LATC2_UNORM = 145,
+ PIPE_FORMAT_LATC2_SNORM = 146,
+
PIPE_FORMAT_COUNT
};
diff --git a/src/gallium/include/pipe/p_screen.h b/src/gallium/include/pipe/p_screen.h
index 850eb84a3c8..a7845dd24d9 100644
--- a/src/gallium/include/pipe/p_screen.h
+++ b/src/gallium/include/pipe/p_screen.h
@@ -99,14 +99,12 @@ struct pipe_screen {
* Check if the given pipe_format is supported as a texture or
* drawing surface.
* \param bindings bitmask of PIPE_BIND_*
- * \param geom_flags bitmask of PIPE_TEXTURE_GEOM_*
*/
boolean (*is_format_supported)( struct pipe_screen *,
enum pipe_format format,
enum pipe_texture_target target,
unsigned sample_count,
- unsigned bindings,
- unsigned geom_flags );
+ unsigned bindings );
/**
* Create a new texture object, using the given template info.
@@ -183,21 +181,17 @@ struct pipe_screen {
/**
* Checks whether the fence has been signalled.
- * \param flags driver-specific meaning
- * \return zero on success.
*/
- int (*fence_signalled)( struct pipe_screen *screen,
- struct pipe_fence_handle *fence,
- unsigned flags );
+ boolean (*fence_signalled)( struct pipe_screen *screen,
+ struct pipe_fence_handle *fence );
/**
* Wait for the fence to finish.
- * \param flags driver-specific meaning
- * \return zero on success.
+ * \param timeout in nanoseconds
*/
- int (*fence_finish)( struct pipe_screen *screen,
- struct pipe_fence_handle *fence,
- unsigned flags );
+ boolean (*fence_finish)( struct pipe_screen *screen,
+ struct pipe_fence_handle *fence,
+ uint64_t timeout );
};
diff --git a/src/gallium/include/pipe/p_shader_tokens.h b/src/gallium/include/pipe/p_shader_tokens.h
index ba433b2bd2a..d3a3632654c 100644
--- a/src/gallium/include/pipe/p_shader_tokens.h
+++ b/src/gallium/include/pipe/p_shader_tokens.h
@@ -75,6 +75,7 @@ enum tgsi_file_type {
TGSI_FILE_SYSTEM_VALUE =9,
TGSI_FILE_IMMEDIATE_ARRAY =10,
TGSI_FILE_TEMPORARY_ARRAY =11,
+ TGSI_FILE_RESOURCE =12,
TGSI_FILE_COUNT /**< how many TGSI_FILE_ types */
};
@@ -153,6 +154,14 @@ struct tgsi_declaration_semantic
unsigned Padding : 8;
};
+struct tgsi_declaration_resource {
+ unsigned Resource : 8; /**< one of TGSI_TEXTURE_ */
+ unsigned ReturnTypeX : 6; /**< one of enum pipe_type */
+ unsigned ReturnTypeY : 6; /**< one of enum pipe_type */
+ unsigned ReturnTypeZ : 6; /**< one of enum pipe_type */
+ unsigned ReturnTypeW : 6; /**< one of enum pipe_type */
+};
+
#define TGSI_IMM_FLOAT32 0
#define TGSI_IMM_UINT32 1
#define TGSI_IMM_INT32 2
@@ -177,7 +186,8 @@ union tgsi_immediate_data
#define TGSI_PROPERTY_GS_MAX_OUTPUT_VERTICES 2
#define TGSI_PROPERTY_FS_COORD_ORIGIN 3
#define TGSI_PROPERTY_FS_COORD_PIXEL_CENTER 4
-#define TGSI_PROPERTY_COUNT 5
+#define TGSI_PROPERTY_FS_COLOR0_WRITES_ALL_CBUFS 5
+#define TGSI_PROPERTY_COUNT 6
struct tgsi_property {
unsigned Type : 4; /**< TGSI_TOKEN_TYPE_PROPERTY */
@@ -338,7 +348,22 @@ struct tgsi_property_data {
#define TGSI_OPCODE_CASE 142
#define TGSI_OPCODE_DEFAULT 143
#define TGSI_OPCODE_ENDSWITCH 144
-#define TGSI_OPCODE_LAST 145
+
+/* resource related opcodes */
+#define TGSI_OPCODE_LOAD 145
+#define TGSI_OPCODE_LOAD_MS 146
+#define TGSI_OPCODE_SAMPLE 147
+#define TGSI_OPCODE_SAMPLE_B 148
+#define TGSI_OPCODE_SAMPLE_C 149
+#define TGSI_OPCODE_SAMPLE_C_LZ 150
+#define TGSI_OPCODE_SAMPLE_D 151
+#define TGSI_OPCODE_SAMPLE_L 152
+#define TGSI_OPCODE_GATHER4 153
+#define TGSI_OPCODE_RESINFO 154
+#define TGSI_OPCODE_SAMPLE_POS 155
+#define TGSI_OPCODE_SAMPLE_INFO 156
+
+#define TGSI_OPCODE_LAST 157
#define TGSI_SAT_NONE 0 /* do not saturate */
#define TGSI_SAT_ZERO_ONE 1 /* clamp to [0,1] */
@@ -405,7 +430,9 @@ struct tgsi_instruction_label
#define TGSI_TEXTURE_SHADOW1D 6
#define TGSI_TEXTURE_SHADOW2D 7
#define TGSI_TEXTURE_SHADOWRECT 8
-#define TGSI_TEXTURE_COUNT 9
+#define TGSI_TEXTURE_1D_ARRAY 9
+#define TGSI_TEXTURE_2D_ARRAY 10
+#define TGSI_TEXTURE_COUNT 11
struct tgsi_instruction_texture
{
diff --git a/src/gallium/include/pipe/p_state.h b/src/gallium/include/pipe/p_state.h
index 226ae8667b7..cf6c5b50268 100644
--- a/src/gallium/include/pipe/p_state.h
+++ b/src/gallium/include/pipe/p_state.h
@@ -62,6 +62,7 @@ extern "C" {
#define PIPE_MAX_GEOMETRY_SAMPLERS 16
#define PIPE_MAX_SHADER_INPUTS 32
#define PIPE_MAX_SHADER_OUTPUTS 32
+#define PIPE_MAX_SHADER_RESOURCES 32
#define PIPE_MAX_TEXTURE_LEVELS 16
#define PIPE_MAX_SO_BUFFERS 4
@@ -389,11 +390,11 @@ struct pipe_stream_output_state
struct pipe_transfer
{
struct pipe_resource *resource; /**< resource to transfer to/from */
- unsigned level;
+ unsigned level; /**< texture mipmap level */
enum pipe_transfer_usage usage;
- struct pipe_box box;
- unsigned stride;
- unsigned layer_stride;
+ struct pipe_box box; /**< region of the resource to access */
+ unsigned stride; /**< row stride in bytes */
+ unsigned layer_stride; /**< image/layer stride in bytes */
void *data;
};
@@ -407,7 +408,6 @@ struct pipe_transfer
struct pipe_vertex_buffer
{
unsigned stride; /**< stride to same attrib in next vertex, in bytes */
- unsigned max_index; /**< number of vertices in this buffer */
unsigned buffer_offset; /**< offset to start of data in buffer, in bytes */
struct pipe_resource *buffer; /**< the actual buffer */
};
diff --git a/src/gallium/include/state_tracker/st_api.h b/src/gallium/include/state_tracker/st_api.h
index 1c2148b78f2..d4973a10cc7 100644
--- a/src/gallium/include/state_tracker/st_api.h
+++ b/src/gallium/include/state_tracker/st_api.h
@@ -121,6 +121,11 @@ enum st_context_resource_type {
};
/**
+ * Flush flags.
+ */
+#define ST_FLUSH_FRONT (1 << 0)
+
+/**
* Value to st_manager->get_param function.
*/
enum st_manager_param {
diff --git a/src/gallium/state_trackers/Android.mk b/src/gallium/state_trackers/Android.mk
index e0ae5375059..65588694d67 100644
--- a/src/gallium/state_trackers/Android.mk
+++ b/src/gallium/state_trackers/Android.mk
@@ -28,6 +28,7 @@ LOCAL_C_INCLUDES := \
external/mesa/src/gallium/auxiliary \
external/mesa/src/egl/main \
external/mesa/src/gallium/state_trackers/egl \
+ external/mesa/src/gallium/winsys \
external/mesa/src/gallium/winsys/sw \
external/mesa/src/gralloc \
external/drm \
diff --git a/src/gallium/state_trackers/d3d1x/dxgi/src/dxgi_native.cpp b/src/gallium/state_trackers/d3d1x/dxgi/src/dxgi_native.cpp
index a54324a04f2..741a97f897d 100644
--- a/src/gallium/state_trackers/d3d1x/dxgi/src/dxgi_native.cpp
+++ b/src/gallium/state_trackers/d3d1x/dxgi/src/dxgi_native.cpp
@@ -256,11 +256,16 @@ struct GalliumDXGIAdapter
{
this->parent = factory;
+ /* FIXME handler should be static */
handler.invalid_surface = handle_invalid_surface;
handler.new_drm_screen = dxgi_loader_create_drm_screen;
handler.new_sw_screen = dxgi_loader_create_sw_screen;
- display = platform->create_display(dpy, &handler, this);
+ platform->set_event_handler(&handler);
+
+ display = platform->create_display(dpy, FALSE, this);
if(!display)
+ display = platform->create_display(dpy, TRUE, this);
+ if(!display)
throw E_FAIL;
memset(&desc, 0, sizeof(desc));
std::string s = std::string("GalliumD3D on ") + display->screen->get_name(display->screen) + " by " + display->screen->get_vendor(display->screen);
@@ -789,9 +794,9 @@ struct dxgi_blitter
const unsigned semantic_indices[] = { 0, 0 };
vs = util_make_vertex_passthrough_shader(pipe, 2, semantic_names, semantic_indices);
- vbuf.buffer = pipe_buffer_create(pipe->screen, PIPE_BIND_VERTEX_BUFFER, sizeof(quad_data));
+ vbuf.buffer = pipe_buffer_create(pipe->screen, PIPE_BIND_VERTEX_BUFFER,
+ PIPE_USAGE_STREAM, sizeof(quad_data));
vbuf.buffer_offset = 0;
- vbuf.max_index = ~0;
vbuf.stride = 4 * sizeof(float);
pipe_buffer_write(pipe, vbuf.buffer, 0, sizeof(quad_data), quad_data);
@@ -1229,7 +1234,7 @@ struct GalliumDXGISwapChain : public GalliumDXGIObject<IDXGISwapChain, GalliumDX
if(dst_surface)
pipe->surface_destroy(pipe, dst_surface);
- pipe->flush(pipe, PIPE_FLUSH_RENDER_CACHE | PIPE_FLUSH_FRAME, 0);
+ pipe->flush(pipe, 0);
att = (db) ? NATIVE_ATTACHMENT_BACK_LEFT : NATIVE_ATTACHMENT_FRONT_LEFT;
if(!surface->present(surface, att, FALSE, 0))
diff --git a/src/gallium/state_trackers/d3d1x/gd3d11/d3d11_context.h b/src/gallium/state_trackers/d3d1x/gd3d11/d3d11_context.h
index e1ba6c184fd..12f2aaddc91 100644
--- a/src/gallium/state_trackers/d3d1x/gd3d11/d3d11_context.h
+++ b/src/gallium/state_trackers/d3d1x/gd3d11/d3d11_context.h
@@ -623,7 +623,6 @@ struct GalliumD3D10Device : public GalliumD3D10ScreenImpl<threadsafe>
vertex_buffers[start + i].buffer = buffer ? ((GalliumD3D11Buffer*)buffer)->resource : 0;
vertex_buffers[start + i].buffer_offset = new_offsets[i];
vertex_buffers[start + i].stride = new_strides[i];
- vertex_buffers[start + i].max_index = ~0;
last_different = i;
}
}
@@ -1824,7 +1823,7 @@ changed:
virtual void STDMETHODCALLTYPE Flush(void)
{
SYNCHRONIZED;
- pipe->flush(pipe, PIPE_FLUSH_FRAME, 0);
+ pipe->flush(pipe, 0);
}
/* In Direct3D 10, if the reference count of an object drops to 0, it is automatically
diff --git a/src/gallium/state_trackers/d3d1x/gd3d11/d3d11_screen.h b/src/gallium/state_trackers/d3d1x/gd3d11/d3d11_screen.h
index 9cfdc837d8e..f678ac7f733 100644
--- a/src/gallium/state_trackers/d3d1x/gd3d11/d3d11_screen.h
+++ b/src/gallium/state_trackers/d3d1x/gd3d11/d3d11_screen.h
@@ -299,25 +299,25 @@ struct GalliumD3D11ScreenImpl : public GalliumD3D11Screen
sampler_view |= D3D11_FORMAT_SUPPORT_SHADER_SAMPLE_COMPARISON;
/* TODO: do this properly when Gallium drivers actually support index/vertex format queries */
- if(screen->is_format_supported(screen, format, PIPE_BUFFER, 0, PIPE_BIND_VERTEX_BUFFER, 0)
- || (screen->is_format_supported(screen, format, PIPE_BUFFER, 0, PIPE_BIND_INDEX_BUFFER, 0)
+ if(screen->is_format_supported(screen, format, PIPE_BUFFER, 0, PIPE_BIND_VERTEX_BUFFER)
+ || (screen->is_format_supported(screen, format, PIPE_BUFFER, 0, PIPE_BIND_INDEX_BUFFER)
|| format == PIPE_FORMAT_R8_UNORM))
support |= buffer;
- if(screen->is_format_supported(screen, format, PIPE_BUFFER, 0, PIPE_BIND_STREAM_OUTPUT, 0))
+ if(screen->is_format_supported(screen, format, PIPE_BUFFER, 0, PIPE_BIND_STREAM_OUTPUT))
support |= buffer | D3D11_FORMAT_SUPPORT_SO_BUFFER;
- if(screen->is_format_supported(screen, format, PIPE_TEXTURE_1D, 0, PIPE_BIND_SAMPLER_VIEW, 0))
+ if(screen->is_format_supported(screen, format, PIPE_TEXTURE_1D, 0, PIPE_BIND_SAMPLER_VIEW))
support |= D3D11_FORMAT_SUPPORT_TEXTURE1D | sampler_view;
- if(screen->is_format_supported(screen, format, PIPE_TEXTURE_2D, 0, PIPE_BIND_SAMPLER_VIEW, 0))
+ if(screen->is_format_supported(screen, format, PIPE_TEXTURE_2D, 0, PIPE_BIND_SAMPLER_VIEW))
support |= D3D11_FORMAT_SUPPORT_TEXTURE2D | sampler_view;
- if(screen->is_format_supported(screen, format, PIPE_TEXTURE_CUBE, 0, PIPE_BIND_SAMPLER_VIEW, 0))
+ if(screen->is_format_supported(screen, format, PIPE_TEXTURE_CUBE, 0, PIPE_BIND_SAMPLER_VIEW))
support |= D3D11_FORMAT_SUPPORT_TEXTURE2D | sampler_view;
- if(screen->is_format_supported(screen, format, PIPE_TEXTURE_3D, 0, PIPE_BIND_SAMPLER_VIEW, 0))
+ if(screen->is_format_supported(screen, format, PIPE_TEXTURE_3D, 0, PIPE_BIND_SAMPLER_VIEW))
support |= D3D11_FORMAT_SUPPORT_TEXTURE3D | sampler_view;
- if(screen->is_format_supported(screen, format, PIPE_TEXTURE_2D, 0, PIPE_BIND_RENDER_TARGET, 0))
+ if(screen->is_format_supported(screen, format, PIPE_TEXTURE_2D, 0, PIPE_BIND_RENDER_TARGET))
support |= D3D11_FORMAT_SUPPORT_TEXTURE2D | D3D11_FORMAT_SUPPORT_RENDER_TARGET | D3D11_FORMAT_SUPPORT_BLENDABLE;
- if(screen->is_format_supported(screen, format, PIPE_TEXTURE_2D, 0, PIPE_BIND_DEPTH_STENCIL, 0))
+ if(screen->is_format_supported(screen, format, PIPE_TEXTURE_2D, 0, PIPE_BIND_DEPTH_STENCIL))
support |= D3D11_FORMAT_SUPPORT_TEXTURE2D | D3D11_FORMAT_SUPPORT_DEPTH_STENCIL;
- if(screen->is_format_supported(screen, format, PIPE_TEXTURE_2D, 0, PIPE_BIND_DISPLAY_TARGET, 0))
+ if(screen->is_format_supported(screen, format, PIPE_TEXTURE_2D, 0, PIPE_BIND_DISPLAY_TARGET))
support |= D3D11_FORMAT_SUPPORT_DISPLAY;
format_support[format] = support;
}
diff --git a/src/gallium/state_trackers/d3d1x/progs/bin/d3d10tri.exe b/src/gallium/state_trackers/d3d1x/progs/bin/d3d10tri.exe
deleted file mode 100755
index 77ab03fcce0..00000000000
--- a/src/gallium/state_trackers/d3d1x/progs/bin/d3d10tri.exe
+++ /dev/null
Binary files differ
diff --git a/src/gallium/state_trackers/d3d1x/progs/bin/d3d11gears.exe b/src/gallium/state_trackers/d3d1x/progs/bin/d3d11gears.exe
deleted file mode 100755
index c2cd296a40f..00000000000
--- a/src/gallium/state_trackers/d3d1x/progs/bin/d3d11gears.exe
+++ /dev/null
Binary files differ
diff --git a/src/gallium/state_trackers/d3d1x/progs/bin/d3d11spikysphere.exe b/src/gallium/state_trackers/d3d1x/progs/bin/d3d11spikysphere.exe
deleted file mode 100755
index c3bc667fb31..00000000000
--- a/src/gallium/state_trackers/d3d1x/progs/bin/d3d11spikysphere.exe
+++ /dev/null
Binary files differ
diff --git a/src/gallium/state_trackers/d3d1x/progs/bin/d3d11tex.exe b/src/gallium/state_trackers/d3d1x/progs/bin/d3d11tex.exe
deleted file mode 100755
index 0be5cb8dd72..00000000000
--- a/src/gallium/state_trackers/d3d1x/progs/bin/d3d11tex.exe
+++ /dev/null
Binary files differ
diff --git a/src/gallium/state_trackers/d3d1x/progs/bin/d3d11tri.exe b/src/gallium/state_trackers/d3d1x/progs/bin/d3d11tri.exe
deleted file mode 100755
index abada5484bd..00000000000
--- a/src/gallium/state_trackers/d3d1x/progs/bin/d3d11tri.exe
+++ /dev/null
Binary files differ
diff --git a/src/gallium/state_trackers/dri/common/dri_context.c b/src/gallium/state_trackers/dri/common/dri_context.c
index 3d5d24e692c..e23c1bcafaf 100644
--- a/src/gallium/state_trackers/dri/common/dri_context.c
+++ b/src/gallium/state_trackers/dri/common/dri_context.c
@@ -141,12 +141,18 @@ GLboolean
dri_unbind_context(__DRIcontext * cPriv)
{
/* dri_util.c ensures cPriv is not null */
+ struct dri_screen *screen = dri_screen(cPriv->driScreenPriv);
struct dri_context *ctx = dri_context(cPriv);
+ struct dri_drawable *draw = dri_drawable(ctx->dPriv);
+ struct dri_drawable *read = dri_drawable(ctx->rPriv);
+ struct st_api *stapi = screen->st_api;
if (--ctx->bind_count == 0) {
if (ctx->st == ctx->stapi->get_current(ctx->stapi)) {
- ctx->st->flush(ctx->st, PIPE_FLUSH_RENDER_CACHE, NULL);
- ctx->stapi->make_current(ctx->stapi, NULL, NULL, NULL);
+ ctx->st->flush(ctx->st, ST_FLUSH_FRONT, NULL);
+ stapi->make_current(stapi, NULL, NULL, NULL);
+ draw->context = NULL;
+ read->context = NULL;
}
}
@@ -165,21 +171,27 @@ dri_make_current(__DRIcontext * cPriv,
struct st_context_iface *old_st = ctx->stapi->get_current(ctx->stapi);
if (old_st && old_st != ctx->st)
- old_st->flush(old_st, PIPE_FLUSH_RENDER_CACHE, NULL);
+ old_st->flush(old_st, ST_FLUSH_FRONT, NULL);
++ctx->bind_count;
+ if (!driDrawPriv && !driReadPriv)
+ return ctx->stapi->make_current(ctx->stapi, ctx->st, NULL, NULL);
+ else if (!driDrawPriv || !driReadPriv)
+ return GL_FALSE;
+
+ draw->context = ctx;
if (ctx->dPriv != driDrawPriv) {
ctx->dPriv = driDrawPriv;
draw->texture_stamp = driDrawPriv->lastStamp - 1;
}
+ read->context = ctx;
if (ctx->rPriv != driReadPriv) {
ctx->rPriv = driReadPriv;
read->texture_stamp = driReadPriv->lastStamp - 1;
}
- ctx->stapi->make_current(ctx->stapi, ctx->st,
- (draw) ? &draw->base : NULL, (read) ? &read->base : NULL);
+ ctx->stapi->make_current(ctx->stapi, ctx->st, &draw->base, &read->base);
return GL_TRUE;
}
diff --git a/src/gallium/state_trackers/dri/common/dri_drawable.c b/src/gallium/state_trackers/dri/common/dri_drawable.c
index 5fd6e7863c0..28a33ac7d07 100644
--- a/src/gallium/state_trackers/dri/common/dri_drawable.c
+++ b/src/gallium/state_trackers/dri/common/dri_drawable.c
@@ -132,6 +132,7 @@ dri_create_buffer(__DRIscreen * sPriv,
drawable->base.validate = dri_st_framebuffer_validate;
drawable->base.st_manager_private = (void *) drawable;
+ drawable->screen = screen;
drawable->sPriv = sPriv;
drawable->dPriv = dPriv;
dPriv->driverPrivate = (void *)drawable;
@@ -233,6 +234,7 @@ const __DRItexBufferExtension driTexBufferExtension = {
{ __DRI_TEX_BUFFER, __DRI_TEX_BUFFER_VERSION },
dri_set_tex_buffer,
dri_set_tex_buffer2,
+ NULL,
};
/**
diff --git a/src/gallium/state_trackers/dri/common/dri_drawable.h b/src/gallium/state_trackers/dri/common/dri_drawable.h
index 2ff6b713293..7f1aa512ca1 100644
--- a/src/gallium/state_trackers/dri/common/dri_drawable.h
+++ b/src/gallium/state_trackers/dri/common/dri_drawable.h
@@ -41,6 +41,9 @@ struct dri_drawable
struct st_framebuffer_iface base;
struct st_visual stvis;
+ struct dri_screen *screen;
+ struct dri_context *context;
+
/* dri */
__DRIdrawable *dPriv;
__DRIscreen *sPriv;
diff --git a/src/gallium/state_trackers/dri/common/dri_screen.c b/src/gallium/state_trackers/dri/common/dri_screen.c
index f6e22c74b4e..5931df993b0 100644
--- a/src/gallium/state_trackers/dri/common/dri_screen.c
+++ b/src/gallium/state_trackers/dri/common/dri_screen.c
@@ -81,34 +81,34 @@ dri_fill_in_modes(struct dri_screen *screen,
pf_x8z24 = p_screen->is_format_supported(p_screen, PIPE_FORMAT_Z24X8_UNORM,
PIPE_TEXTURE_2D, 0,
- PIPE_BIND_DEPTH_STENCIL, 0);
+ PIPE_BIND_DEPTH_STENCIL);
pf_z24x8 = p_screen->is_format_supported(p_screen, PIPE_FORMAT_X8Z24_UNORM,
PIPE_TEXTURE_2D, 0,
- PIPE_BIND_DEPTH_STENCIL, 0);
+ PIPE_BIND_DEPTH_STENCIL);
pf_s8z24 = p_screen->is_format_supported(p_screen, PIPE_FORMAT_Z24_UNORM_S8_USCALED,
PIPE_TEXTURE_2D, 0,
- PIPE_BIND_DEPTH_STENCIL, 0);
+ PIPE_BIND_DEPTH_STENCIL);
pf_z24s8 = p_screen->is_format_supported(p_screen, PIPE_FORMAT_S8_USCALED_Z24_UNORM,
PIPE_TEXTURE_2D, 0,
- PIPE_BIND_DEPTH_STENCIL, 0);
+ PIPE_BIND_DEPTH_STENCIL);
pf_a8r8g8b8 = p_screen->is_format_supported(p_screen, PIPE_FORMAT_B8G8R8A8_UNORM,
PIPE_TEXTURE_2D, 0,
- PIPE_BIND_RENDER_TARGET, 0);
+ PIPE_BIND_RENDER_TARGET);
pf_x8r8g8b8 = p_screen->is_format_supported(p_screen, PIPE_FORMAT_B8G8R8X8_UNORM,
PIPE_TEXTURE_2D, 0,
- PIPE_BIND_RENDER_TARGET, 0);
+ PIPE_BIND_RENDER_TARGET);
pf_r5g6b5 = p_screen->is_format_supported(p_screen, PIPE_FORMAT_B5G6R5_UNORM,
PIPE_TEXTURE_2D, 0,
- PIPE_BIND_RENDER_TARGET, 0);
+ PIPE_BIND_RENDER_TARGET);
/* We can only get a 16 or 32 bit depth buffer with getBuffersWithFormat */
if (dri_with_format(screen->sPriv)) {
pf_z16 = p_screen->is_format_supported(p_screen, PIPE_FORMAT_Z16_UNORM,
PIPE_TEXTURE_2D, 0,
- PIPE_BIND_DEPTH_STENCIL, 0);
+ PIPE_BIND_DEPTH_STENCIL);
pf_z32 = p_screen->is_format_supported(p_screen, PIPE_FORMAT_Z32_UNORM,
PIPE_TEXTURE_2D, 0,
- PIPE_BIND_DEPTH_STENCIL, 0);
+ PIPE_BIND_DEPTH_STENCIL);
} else {
pf_z16 = FALSE;
pf_z32 = FALSE;
@@ -142,7 +142,7 @@ dri_fill_in_modes(struct dri_screen *screen,
for (i = 1; i < 5; i++) {
if (p_screen->is_format_supported(p_screen, PIPE_FORMAT_B5G6R5_UNORM,
PIPE_TEXTURE_2D, i*2,
- PIPE_BIND_RENDER_TARGET, 0)) {
+ PIPE_BIND_RENDER_TARGET)) {
msaa_samples_array[msaa_samples_factor] = i * 2;
msaa_samples_factor++;
}
@@ -161,7 +161,7 @@ dri_fill_in_modes(struct dri_screen *screen,
for (i = 1; i < 5; i++) {
if (p_screen->is_format_supported(p_screen, PIPE_FORMAT_B8G8R8A8_UNORM,
PIPE_TEXTURE_2D, i*2,
- PIPE_BIND_RENDER_TARGET, 0)) {
+ PIPE_BIND_RENDER_TARGET)) {
msaa_samples_array[msaa_samples_factor] = i * 2;
msaa_samples_factor++;
}
@@ -183,7 +183,7 @@ dri_fill_in_modes(struct dri_screen *screen,
for (i = 1; i < 5; i++) {
if (p_screen->is_format_supported(p_screen, PIPE_FORMAT_B8G8R8X8_UNORM,
PIPE_TEXTURE_2D, i*2,
- PIPE_BIND_RENDER_TARGET, 0)) {
+ PIPE_BIND_RENDER_TARGET)) {
msaa_samples_array[msaa_samples_factor] = i * 2;
msaa_samples_factor++;
}
@@ -235,7 +235,6 @@ dri_fill_st_visual(struct st_visual *stvis, struct dri_screen *screen,
return;
stvis->samples = mode->samples;
- stvis->render_buffer = ST_ATTACHMENT_INVALID;
if (mode->redBits == 8) {
if (mode->alphaBits == 8)
@@ -274,8 +273,11 @@ dri_fill_st_visual(struct st_visual *stvis, struct dri_screen *screen,
PIPE_FORMAT_R16G16B16A16_SNORM : PIPE_FORMAT_NONE;
stvis->buffer_mask |= ST_ATTACHMENT_FRONT_LEFT_MASK;
- if (mode->doubleBufferMode)
+ stvis->render_buffer = ST_ATTACHMENT_FRONT_LEFT;
+ if (mode->doubleBufferMode) {
stvis->buffer_mask |= ST_ATTACHMENT_BACK_LEFT_MASK;
+ stvis->render_buffer = ST_ATTACHMENT_BACK_LEFT;
+ }
if (mode->stereoMode) {
stvis->buffer_mask |= ST_ATTACHMENT_FRONT_RIGHT_MASK;
if (mode->doubleBufferMode)
diff --git a/src/gallium/state_trackers/dri/drm/dri2.c b/src/gallium/state_trackers/dri/drm/dri2.c
index a9d05a80fbd..30326a23d6c 100644
--- a/src/gallium/state_trackers/dri/drm/dri2.c
+++ b/src/gallium/state_trackers/dri/drm/dri2.c
@@ -38,6 +38,7 @@
#include "dri_screen.h"
#include "dri_context.h"
#include "dri_drawable.h"
+#include "dri2_buffer.h"
/**
* DRI2 flush extension.
@@ -51,7 +52,7 @@ static void
dri2_invalidate_drawable(__DRIdrawable *dPriv)
{
struct dri_drawable *drawable = dri_drawable(dPriv);
- struct dri_context *ctx = dri_context(dPriv->driContextPriv);
+ struct dri_context *ctx = drawable->context;
dri2InvalidateDrawable(dPriv);
drawable->dPriv->lastStamp = *drawable->dPriv->pStamp;
@@ -259,6 +260,92 @@ dri2_drawable_process_buffers(struct dri_drawable *drawable,
memcpy(drawable->old, buffers, sizeof(__DRIbuffer) * count);
}
+static __DRIbuffer *
+dri2_allocate_buffer(__DRIscreen *sPriv,
+ unsigned attachment, unsigned format,
+ int width, int height)
+{
+ struct dri_screen *screen = dri_screen(sPriv);
+ struct dri2_buffer *buffer;
+ struct pipe_resource templ;
+ enum st_attachment_type statt;
+ enum pipe_format pf;
+ unsigned bind = 0;
+ struct winsys_handle whandle;
+
+ switch (attachment) {
+ case __DRI_BUFFER_FRONT_LEFT:
+ case __DRI_BUFFER_FAKE_FRONT_LEFT:
+ statt = ST_ATTACHMENT_FRONT_LEFT;
+ bind = PIPE_BIND_RENDER_TARGET | PIPE_BIND_SAMPLER_VIEW;
+ break;
+ case __DRI_BUFFER_BACK_LEFT:
+ statt = ST_ATTACHMENT_BACK_LEFT;
+ bind = PIPE_BIND_RENDER_TARGET | PIPE_BIND_SAMPLER_VIEW;
+ break;
+ case __DRI_BUFFER_DEPTH:
+ case __DRI_BUFFER_DEPTH_STENCIL:
+ case __DRI_BUFFER_STENCIL:
+ statt = ST_ATTACHMENT_DEPTH_STENCIL;
+ bind = PIPE_BIND_DEPTH_STENCIL; /* XXX sampler? */
+ break;
+ default:
+ statt = ST_ATTACHMENT_INVALID;
+ break;
+ }
+
+ switch (format) {
+ case 32:
+ pf = PIPE_FORMAT_B8G8R8X8_UNORM;
+ break;
+ case 16:
+ pf = PIPE_FORMAT_Z16_UNORM;
+ break;
+ default:
+ return NULL;
+ }
+
+ buffer = CALLOC_STRUCT(dri2_buffer);
+ if (!buffer)
+ return NULL;
+
+ memset(&templ, 0, sizeof(templ));
+ templ.bind = bind;
+ templ.format = pf;
+ templ.target = PIPE_TEXTURE_2D;
+ templ.last_level = 0;
+ templ.width0 = width;
+ templ.height0 = height;
+ templ.depth0 = 1;
+ templ.array_size = 1;
+
+ buffer->resource =
+ screen->base.screen->resource_create(screen->base.screen, &templ);
+ if (!buffer->resource)
+ return NULL;
+
+ memset(&whandle, 0, sizeof(whandle));
+ whandle.type = DRM_API_HANDLE_TYPE_SHARED;
+ screen->base.screen->resource_get_handle(screen->base.screen,
+ buffer->resource, &whandle);
+
+ buffer->base.attachment = attachment;
+ buffer->base.name = whandle.handle;
+ buffer->base.cpp = util_format_get_blocksize(pf);
+ buffer->base.pitch = whandle.stride;
+
+ return &buffer->base;
+}
+
+static void
+dri2_release_buffer(__DRIscreen *sPriv, __DRIbuffer *bPriv)
+{
+ struct dri2_buffer *buffer = dri2_buffer(bPriv);
+
+ pipe_resource_reference(&buffer->resource, NULL);
+ FREE(buffer);
+}
+
/*
* Backend functions for st_framebuffer interface.
*/
@@ -373,7 +460,7 @@ static __DRIimage *
dri2_create_image_from_renderbuffer(__DRIcontext *context,
int renderbuffer, void *loaderPrivate)
{
- struct dri_context *ctx = dri_context(context->driverPrivate);
+ struct dri_context *ctx = dri_context(context);
if (!ctx->st->get_resource_for_egl_image)
return NULL;
@@ -424,6 +511,7 @@ dri2_create_image(__DRIscreen *_screen,
templ.width0 = width;
templ.height0 = height;
templ.depth0 = 1;
+ templ.array_size = 1;
img->texture = screen->base.screen->resource_create(screen->base.screen, &templ);
if (!img->texture) {
@@ -601,6 +689,9 @@ const struct __DriverAPIRec driDriverAPI = {
.SwapBuffers = NULL,
.CopySubBuffer = NULL,
+
+ .AllocateBuffer = dri2_allocate_buffer,
+ .ReleaseBuffer = dri2_release_buffer,
};
/* This is the table of extensions that the loader will dlsym() for. */
diff --git a/src/gallium/state_trackers/dri/drm/dri2_buffer.h b/src/gallium/state_trackers/dri/drm/dri2_buffer.h
new file mode 100644
index 00000000000..1cd8dbbda22
--- /dev/null
+++ b/src/gallium/state_trackers/dri/drm/dri2_buffer.h
@@ -0,0 +1,22 @@
+#ifndef DRI2_BUFFER_H
+#define DRI2_BUFFER_H
+
+#include "dri_wrapper.h"
+
+struct pipe_surface;
+
+struct dri2_buffer
+{
+ __DRIbuffer base;
+ struct pipe_resource *resource;
+};
+
+static INLINE struct dri2_buffer *
+dri2_buffer(__DRIbuffer * driBufferPriv)
+{
+ return (struct dri2_buffer *) driBufferPriv;
+}
+
+#endif
+
+/* vim: set sw=3 ts=8 sts=3 expandtab: */
diff --git a/src/gallium/state_trackers/dri/sw/drisw.c b/src/gallium/state_trackers/dri/sw/drisw.c
index 30088b09685..ac11f7c47f6 100644
--- a/src/gallium/state_trackers/dri/sw/drisw.c
+++ b/src/gallium/state_trackers/dri/sw/drisw.c
@@ -139,7 +139,7 @@ drisw_swap_buffers(__DRIdrawable *dPriv)
ptex = drawable->textures[ST_ATTACHMENT_BACK_LEFT];
if (ptex) {
- ctx->st->flush(ctx->st, PIPE_FLUSH_RENDER_CACHE, NULL);
+ ctx->st->flush(ctx->st, ST_FLUSH_FRONT, NULL);
drisw_copy_to_front(dPriv, ptex);
}
@@ -233,6 +233,7 @@ drisw_allocate_textures(struct dri_drawable *drawable,
*/
static const __DRIextension *drisw_screen_extensions[] = {
+ &driTexBufferExtension.base,
NULL
};
diff --git a/src/gallium/state_trackers/egl/Makefile b/src/gallium/state_trackers/egl/Makefile
index 8cfcef968ed..53673a78a94 100644
--- a/src/gallium/state_trackers/egl/Makefile
+++ b/src/gallium/state_trackers/egl/Makefile
@@ -23,6 +23,14 @@ x11_SOURCES = $(wildcard x11/*.c) \
$(TOP)/src/glx/dri2.c
x11_OBJECTS = $(x11_SOURCES:.c=.o)
+wayland_INCLUDES = \
+ -I$(TOP)/src/gallium/winsys \
+ -I$(TOP)/src/egl/wayland/wayland-egl \
+ -I$(TOP)/src/egl/wayland/wayland-drm \
+ $(shell pkg-config --cflags-only-I libdrm wayland-client)
+
+wayland_SOURCES = $(wildcard wayland/*.c)
+wayland_OBJECTS = $(wayland_SOURCES:.c=.o)
drm_INCLUDES = -I$(TOP)/src/gallium/winsys $(shell pkg-config --cflags-only-I libdrm)
drm_SOURCES = $(wildcard drm/*.c)
@@ -45,6 +53,10 @@ ifneq ($(findstring x11, $(EGL_PLATFORMS)),)
EGL_OBJECTS += $(x11_OBJECTS)
EGL_CPPFLAGS += -DHAVE_X11_BACKEND
endif
+ifneq ($(findstring wayland, $(EGL_PLATFORMS)),)
+EGL_OBJECTS += $(wayland_OBJECTS)
+EGL_CPPFLAGS += -DHAVE_WAYLAND_BACKEND
+endif
ifneq ($(findstring drm, $(EGL_PLATFORMS)),)
EGL_OBJECTS += $(drm_OBJECTS)
EGL_CPPFLAGS += -DHAVE_DRM_BACKEND
@@ -87,6 +99,9 @@ $(common_OBJECTS): %.o: %.c
$(x11_OBJECTS): %.o: %.c
$(call egl-cc,x11)
+$(wayland_OBJECTS): %.o: %.c
+ $(call egl-cc,wayland)
+
$(drm_OBJECTS): %.o: %.c
$(call egl-cc,drm)
diff --git a/src/gallium/state_trackers/egl/SConscript b/src/gallium/state_trackers/egl/SConscript
index 50c76819954..9ade76ecbb2 100644
--- a/src/gallium/state_trackers/egl/SConscript
+++ b/src/gallium/state_trackers/egl/SConscript
@@ -10,11 +10,8 @@ env.Append(CPPPATH = [
'#/src/gallium/winsys/sw',
'.',
])
-env.Append(CPPDEFINES = [
- 'HAVE_GDI_BACKEND',
-])
-common_sources = [
+sources = [
'common/egl_g3d.c',
'common/egl_g3d_api.c',
'common/egl_g3d_image.c',
@@ -23,12 +20,31 @@ common_sources = [
'common/native_helper.c',
]
-gdi_sources = common_sources + [
- 'gdi/native_gdi.c',
-]
+if env['platform'] == 'windows':
+ env.Append(CPPDEFINES = ['HAVE_GDI_BACKEND'])
+ sources.append('gdi/native_gdi.c')
+else:
+ if env['x11']:
+ env.Append(CPPDEFINES = ['HAVE_X11_BACKEND'])
+ env.Prepend(CPPPATH = [
+ '#/src/glx',
+ '#/src/mapi',
+ ])
+ sources.append([
+ 'x11/native_x11.c',
+ 'x11/native_dri2.c',
+ 'x11/native_ximage.c',
+ 'x11/x11_screen.c',
+ 'x11/glxinit.c'])
+ if env['dri']:
+ env.Append(CPPDEFINES = ['GLX_DIRECT_RENDERING'])
+ sources.append(['#/src/glx/dri2.c'])
+ if env['drm']:
+ env.Append(CPPDEFINES = ['HAVE_DRM_BACKEND'])
+ sources.append(['drm/native_drm.c', 'drm/modeset.c'])
-st_egl_gdi = env.ConvenienceLibrary(
- target = 'st_egl_gdi',
- source = gdi_sources,
+st_egl = env.ConvenienceLibrary(
+ target = 'st_egl',
+ source = sources,
)
-Export('st_egl_gdi')
+Export('st_egl')
diff --git a/src/gallium/state_trackers/egl/android/native_android.cpp b/src/gallium/state_trackers/egl/android/native_android.cpp
index 450eae3868c..a584d54db49 100644
--- a/src/gallium/state_trackers/egl/android/native_android.cpp
+++ b/src/gallium/state_trackers/egl/android/native_android.cpp
@@ -34,7 +34,13 @@
extern "C" {
#include "egllog.h"
+
+/* see get_drm_screen_name */
+#include <xf86drm.h>
+#include <radeon_drm.h>
+#include "radeon/drm/radeon_drm_public.h"
}
+
#include "util/u_memory.h"
#include "util/u_inlines.h"
#include "util/u_format.h"
@@ -157,12 +163,12 @@ import_buffer(struct android_display *adpy, const struct pipe_resource *templ,
if (templ->bind & PIPE_BIND_RENDER_TARGET) {
if (!screen->is_format_supported(screen, templ->format,
- templ->target, 0, PIPE_BIND_RENDER_TARGET, 0))
+ templ->target, 0, PIPE_BIND_RENDER_TARGET))
LOGW("importing unsupported buffer as render target");
}
if (templ->bind & PIPE_BIND_SAMPLER_VIEW) {
if (!screen->is_format_supported(screen, templ->format,
- templ->target, 0, PIPE_BIND_SAMPLER_VIEW, 0))
+ templ->target, 0, PIPE_BIND_SAMPLER_VIEW))
LOGW("importing unsupported buffer as sampler view");
}
@@ -399,7 +405,7 @@ android_display_create_window_surface(struct native_display *ndpy,
LOGW("native window format 0x%x != config format 0x%x",
format, nconf->color_format);
if (!adpy->base.screen->is_format_supported(adpy->base.screen,
- format, PIPE_TEXTURE_2D, 0, PIPE_BIND_RENDER_TARGET, 0)) {
+ format, PIPE_TEXTURE_2D, 0, PIPE_BIND_RENDER_TARGET)) {
LOGE("and the native window cannot be used as a render target");
return NULL;
}
@@ -452,7 +458,7 @@ android_display_init_configs(struct native_display *ndpy)
color_format = get_pipe_format(native_formats[i]);
if (color_format == PIPE_FORMAT_NONE ||
!adpy->base.screen->is_format_supported(adpy->base.screen,
- color_format, PIPE_TEXTURE_2D, 0, PIPE_BIND_RENDER_TARGET, 0)) {
+ color_format, PIPE_TEXTURE_2D, 0, PIPE_BIND_RENDER_TARGET)) {
LOGI("skip unsupported native format 0x%x", native_formats[i]);
continue;
}
@@ -461,8 +467,6 @@ android_display_init_configs(struct native_display *ndpy)
aconf->base.buffer_mask = 1 << NATIVE_ATTACHMENT_BACK_LEFT;
aconf->base.color_format = color_format;
aconf->base.window_bit = TRUE;
- if (!adpy->use_drm)
- aconf->base.slow_config = TRUE;
aconf->base.native_visual_type = native_formats[i];
}
@@ -470,66 +474,94 @@ android_display_init_configs(struct native_display *ndpy)
return TRUE;
}
+static const char *
+get_drm_screen_name(int fd, drmVersionPtr version)
+{
+ const char *name = version->name;
+
+ if (name && !strcmp(name, "radeon")) {
+ int chip_id;
+ struct drm_radeon_info info;
+
+ memset(&info, 0, sizeof(info));
+ info.request = RADEON_INFO_DEVICE_ID;
+ info.value = pointer_to_intptr(&chip_id);
+ if (drmCommandWriteRead(fd, DRM_RADEON_INFO, &info, sizeof(info)) != 0)
+ return NULL;
+
+ name = is_r3xx(chip_id) ? "r300" : "r600";
+ }
+
+ return name;
+}
+
static boolean
-android_display_init(struct native_display *ndpy)
+android_display_init_drm(struct native_display *ndpy)
{
struct android_display *adpy = android_display(ndpy);
const hw_module_t *mod;
int fd, err;
- boolean force_sw;
- char value[PROPERTY_VALUE_MAX];
-
- if (property_get("debug.mesa.software", value, NULL))
- force_sw = (atoi(value) != 0);
- else
- force_sw = debug_get_bool_option("EGL_SOFTWARE", FALSE);
- /* try DRM first */
- if (!force_sw) {
- err = hw_get_module(GRALLOC_HARDWARE_MODULE_ID, &mod);
- if (!err) {
- const gralloc_module_t *gr = (gralloc_module_t *) mod;
+ err = hw_get_module(GRALLOC_HARDWARE_MODULE_ID, &mod);
+ if (!err) {
+ const gralloc_module_t *gr = (gralloc_module_t *) mod;
- err = -EINVAL;
- if (gr->perform)
- err = gr->perform(gr, GRALLOC_MODULE_PERFORM_GET_DRM_FD, &fd);
+ err = -EINVAL;
+ if (gr->perform)
+ err = gr->perform(gr, GRALLOC_MODULE_PERFORM_GET_DRM_FD, &fd);
+ }
+ if (!err && fd >= 0) {
+ drmVersionPtr version;
+ const char *name;
+
+ version = drmGetVersion(fd);
+ if (version) {
+ name = get_drm_screen_name(fd, version);
+ if (name) {
+ adpy->base.screen =
+ adpy->event_handler->new_drm_screen(&adpy->base, name, fd);
+ }
+ drmFreeVersion(version);
}
- if (!err && fd >= 0) {
- adpy->base.screen =
- adpy->event_handler->new_drm_screen(&adpy->base, "i915", fd);
- if (adpy->base.screen)
- adpy->use_drm = TRUE;
+ else {
+ _eglLog(_EGL_WARNING, "invalid fd %d", fd);
+ err = -EINVAL;
}
if (adpy->base.screen)
- LOGI("using DRM screen");
- else
- LOGE("failed to create DRM screen");
+ adpy->use_drm = TRUE;
}
- /* try SW screen */
- if (!adpy->base.screen) {
- struct sw_winsys *ws = android_create_sw_winsys();
+ if (adpy->base.screen) {
+ LOGI("using DRM screen");
+ return TRUE;
+ }
+ else {
+ LOGE("failed to create DRM screen");
+ return FALSE;
+ }
+}
- if (ws) {
- adpy->base.screen =
- adpy->event_handler->new_sw_screen(&adpy->base, ws);
- }
+static boolean
+android_display_init_sw(struct native_display *ndpy)
+{
+ struct android_display *adpy = android_display(ndpy);
+ struct sw_winsys *ws;
- if (adpy->base.screen)
- LOGI("using SW screen");
- else
- LOGE("failed to create SW screen");
+ ws = android_create_sw_winsys();
+ if (ws) {
+ adpy->base.screen =
+ adpy->event_handler->new_sw_screen(&adpy->base, ws);
}
if (adpy->base.screen) {
- if (!android_display_init_configs(&adpy->base)) {
- adpy->base.screen->destroy(adpy->base.screen);
- adpy->base.screen = NULL;
- }
+ LOGI("using SW screen");
+ return TRUE;
+ }
+ else {
+ LOGE("failed to create SW screen");
+ return FALSE;
}
-
- return (adpy->base.screen != NULL);
}
static void
@@ -603,9 +635,11 @@ static struct native_display_buffer android_display_buffer = {
static struct android_display *
android_display_create(struct native_event_handler *event_handler,
- void *user_data)
+ boolean use_sw, void *user_data)
{
struct android_display *adpy;
+ char value[PROPERTY_VALUE_MAX];
+ boolean force_sw;
adpy = CALLOC_STRUCT(android_display);
if (!adpy)
@@ -614,7 +648,23 @@ android_display_create(struct native_event_handler *event_handler,
adpy->event_handler = event_handler;
adpy->base.user_data = user_data;
- if (!android_display_init(&adpy->base)) {
+ if (property_get("debug.mesa.software", value, NULL))
+ force_sw = (atoi(value) != 0);
+ else
+ force_sw = debug_get_bool_option("EGL_SOFTWARE", FALSE);
+
+ if (force_sw || use_sw)
+ android_display_init_sw(&adpy->base);
+ else
+ android_display_init_drm(&adpy->base);
+
+ if (!adpy->base.screen) {
+ FREE(adpy);
+ return NULL;
+ }
+
+ if (!android_display_init_configs(&adpy->base)) {
+ adpy->base.screen->destroy(adpy->base.screen);
FREE(adpy);
return NULL;
}
@@ -629,19 +679,27 @@ android_display_create(struct native_event_handler *event_handler,
return adpy;
}
+static struct native_event_handler *android_event_handler;
+
+static void
+native_set_event_handler(struct native_event_handler *event_handler)
+{
+ android_event_handler = event_handler;
+}
+
static struct native_display *
-native_create_display(void *dpy, struct native_event_handler *event_handler,
- void *user_data)
+native_create_display(void *dpy, boolean use_sw, void *user_data)
{
struct android_display *adpy;
- adpy = android_display_create(event_handler, user_data);
+ adpy = android_display_create(android_event_handler, use_sw, user_data);
return (adpy) ? &adpy->base : NULL;
}
static const struct native_platform android_platform = {
"Android", /* name */
+ native_set_event_handler,
native_create_display
};
diff --git a/src/gallium/state_trackers/egl/common/egl_g3d.c b/src/gallium/state_trackers/egl/common/egl_g3d.c
index 604091aac0b..e4551674739 100644
--- a/src/gallium/state_trackers/egl/common/egl_g3d.c
+++ b/src/gallium/state_trackers/egl/common/egl_g3d.c
@@ -38,6 +38,46 @@
#include "egl_g3d_loader.h"
#include "native.h"
+static void
+egl_g3d_invalid_surface(struct native_display *ndpy,
+ struct native_surface *nsurf,
+ unsigned int seq_num)
+{
+ /* XXX not thread safe? */
+ struct egl_g3d_surface *gsurf = egl_g3d_surface(nsurf->user_data);
+ struct egl_g3d_context *gctx;
+
+ /*
+ * Some functions such as egl_g3d_copy_buffers create a temporary native
+ * surface. There is no gsurf associated with it.
+ */
+ gctx = (gsurf) ? egl_g3d_context(gsurf->base.CurrentContext) : NULL;
+ if (gctx)
+ gctx->stctxi->notify_invalid_framebuffer(gctx->stctxi, gsurf->stfbi);
+}
+
+static struct pipe_screen *
+egl_g3d_new_drm_screen(struct native_display *ndpy, const char *name, int fd)
+{
+ _EGLDisplay *dpy = (_EGLDisplay *) ndpy->user_data;
+ struct egl_g3d_display *gdpy = egl_g3d_display(dpy);
+ return gdpy->loader->create_drm_screen(name, fd);
+}
+
+static struct pipe_screen *
+egl_g3d_new_sw_screen(struct native_display *ndpy, struct sw_winsys *ws)
+{
+ _EGLDisplay *dpy = (_EGLDisplay *) ndpy->user_data;
+ struct egl_g3d_display *gdpy = egl_g3d_display(dpy);
+ return gdpy->loader->create_sw_screen(ws);
+}
+
+static struct native_event_handler egl_g3d_native_event_handler = {
+ egl_g3d_invalid_surface,
+ egl_g3d_new_drm_screen,
+ egl_g3d_new_sw_screen
+};
+
/**
* Get the native platform.
*/
@@ -62,6 +102,12 @@ egl_g3d_get_platform(_EGLDriver *drv, _EGLPlatformType plat)
#ifdef HAVE_X11_BACKEND
nplat = native_get_x11_platform();
#endif
+ break;
+ case _EGL_PLATFORM_WAYLAND:
+ plat_name = "wayland";
+#ifdef HAVE_WAYLAND_BACKEND
+ nplat = native_get_wayland_platform();
+#endif
break;
case _EGL_PLATFORM_DRM:
plat_name = "DRM";
@@ -85,7 +131,9 @@ egl_g3d_get_platform(_EGLDriver *drv, _EGLPlatformType plat)
break;
}
- if (!nplat)
+ if (nplat)
+ nplat->set_event_handler(&egl_g3d_native_event_handler);
+ else
_eglLog(_EGL_WARNING, "unsupported platform %s", plat_name);
gdrv->platforms[plat] = nplat;
@@ -189,17 +237,21 @@ init_config_attributes(_EGLConfig *conf, const struct native_config *nconf,
}
surface_type = 0x0;
- if (nconf->window_bit)
- surface_type |= EGL_WINDOW_BIT;
- if (nconf->pixmap_bit)
- surface_type |= EGL_PIXMAP_BIT;
+ /* pixmap surfaces should be EGL_SINGLE_BUFFER */
+ if (nconf->buffer_mask & (1 << NATIVE_ATTACHMENT_FRONT_LEFT)) {
+ if (nconf->pixmap_bit)
+ surface_type |= EGL_PIXMAP_BIT;
+ }
+ /* the others surfaces should be EGL_BACK_BUFFER (or settable) */
+ if (nconf->buffer_mask & (1 << NATIVE_ATTACHMENT_BACK_LEFT)) {
+ if (nconf->window_bit)
+ surface_type |= EGL_WINDOW_BIT;
#ifdef EGL_MESA_screen_surface
- if (nconf->scanout_bit)
- surface_type |= EGL_SCREEN_BIT_MESA;
+ if (nconf->scanout_bit)
+ surface_type |= EGL_SCREEN_BIT_MESA;
#endif
-
- if (nconf->buffer_mask & (1 << NATIVE_ATTACHMENT_BACK_LEFT))
surface_type |= EGL_PBUFFER_BIT;
+ }
conf->Conformant = api_mask;
conf->RenderableType = api_mask;
@@ -232,11 +284,6 @@ init_config_attributes(_EGLConfig *conf, const struct native_config *nconf,
}
conf->Level = nconf->level;
- conf->Samples = nconf->samples;
- conf->SampleBuffers = 0;
-
- if (nconf->slow_config)
- conf->ConfigCaveat = EGL_SLOW_CONFIG;
if (nconf->transparent_rgb) {
conf->TransparentType = EGL_TRANSPARENT_RGB;
@@ -263,13 +310,9 @@ egl_g3d_init_config(_EGLDriver *drv, _EGLDisplay *dpy,
int preserve_buffer, int max_swap_interval)
{
struct egl_g3d_config *gconf = egl_g3d_config(conf);
- EGLint buffer_mask, api_mask;
+ EGLint buffer_mask;
EGLBoolean valid;
- /* skip single-buffered configs */
- if (!(nconf->buffer_mask & (1 << NATIVE_ATTACHMENT_BACK_LEFT)))
- return EGL_FALSE;
-
buffer_mask = 0x0;
if (nconf->buffer_mask & (1 << NATIVE_ATTACHMENT_FRONT_LEFT))
buffer_mask |= ST_ATTACHMENT_FRONT_LEFT_MASK;
@@ -284,24 +327,14 @@ egl_g3d_init_config(_EGLDriver *drv, _EGLDisplay *dpy,
gconf->stvis.color_format = nconf->color_format;
gconf->stvis.depth_stencil_format = depth_stencil_format;
gconf->stvis.accum_format = PIPE_FORMAT_NONE;
- gconf->stvis.samples = nconf->samples;
+ gconf->stvis.samples = 0;
+ /* will be overridden per surface */
gconf->stvis.render_buffer = (buffer_mask & ST_ATTACHMENT_BACK_LEFT_MASK) ?
ST_ATTACHMENT_BACK_LEFT : ST_ATTACHMENT_FRONT_LEFT;
- api_mask = dpy->ClientAPIsMask;
- /* this is required by EGL, not by OpenGL ES */
- if (nconf->window_bit &&
- gconf->stvis.render_buffer != ST_ATTACHMENT_BACK_LEFT)
- api_mask &= ~(EGL_OPENGL_ES_BIT | EGL_OPENGL_ES2_BIT);
-
- if (!api_mask) {
- _eglLog(_EGL_DEBUG, "no state tracker supports config 0x%x",
- nconf->native_visual_id);
- }
-
valid = init_config_attributes(&gconf->base,
- nconf, api_mask, depth_stencil_format,
+ nconf, dpy->ClientAPIs, depth_stencil_format,
preserve_buffer, max_swap_interval);
if (!valid) {
_eglLog(_EGL_DEBUG, "skip invalid config 0x%x", nconf->native_visual_id);
@@ -341,7 +374,7 @@ egl_g3d_fill_depth_stencil_formats(_EGLDisplay *dpy,
/* pick the first supported format */
for (i = 0; i < n; i++) {
if (screen->is_format_supported(screen, fmt[i],
- PIPE_TEXTURE_2D, 0, PIPE_BIND_DEPTH_STENCIL, 0)) {
+ PIPE_TEXTURE_2D, 0, PIPE_BIND_DEPTH_STENCIL)) {
formats[count++] = fmt[i];
break;
}
@@ -405,46 +438,6 @@ egl_g3d_add_configs(_EGLDriver *drv, _EGLDisplay *dpy, EGLint id)
}
static void
-egl_g3d_invalid_surface(struct native_display *ndpy,
- struct native_surface *nsurf,
- unsigned int seq_num)
-{
- /* XXX not thread safe? */
- struct egl_g3d_surface *gsurf = egl_g3d_surface(nsurf->user_data);
- struct egl_g3d_context *gctx;
-
- /*
- * Some functions such as egl_g3d_copy_buffers create a temporary native
- * surface. There is no gsurf associated with it.
- */
- gctx = (gsurf) ? egl_g3d_context(gsurf->base.CurrentContext) : NULL;
- if (gctx)
- gctx->stctxi->notify_invalid_framebuffer(gctx->stctxi, gsurf->stfbi);
-}
-
-static struct pipe_screen *
-egl_g3d_new_drm_screen(struct native_display *ndpy, const char *name, int fd)
-{
- _EGLDisplay *dpy = (_EGLDisplay *) ndpy->user_data;
- struct egl_g3d_display *gdpy = egl_g3d_display(dpy);
- return gdpy->loader->create_drm_screen(name, fd);
-}
-
-static struct pipe_screen *
-egl_g3d_new_sw_screen(struct native_display *ndpy, struct sw_winsys *ws)
-{
- _EGLDisplay *dpy = (_EGLDisplay *) ndpy->user_data;
- struct egl_g3d_display *gdpy = egl_g3d_display(dpy);
- return gdpy->loader->create_sw_screen(ws);
-}
-
-static struct native_event_handler egl_g3d_native_event_handler = {
- egl_g3d_invalid_surface,
- egl_g3d_new_drm_screen,
- egl_g3d_new_sw_screen
-};
-
-static void
egl_g3d_free_config(void *conf)
{
struct egl_g3d_config *gconf = egl_g3d_config((_EGLConfig *) conf);
@@ -468,9 +461,6 @@ egl_g3d_terminate(_EGLDriver *drv, _EGLDisplay *dpy)
_eglReleaseDisplayResources(drv, dpy);
- if (gdpy->pipe)
- gdpy->pipe->destroy(gdpy->pipe);
-
if (dpy->Configs) {
_eglDestroyArray(dpy->Configs, egl_g3d_free_config);
dpy->Configs = NULL;
@@ -495,8 +485,7 @@ egl_g3d_terminate(_EGLDriver *drv, _EGLDisplay *dpy)
}
static EGLBoolean
-egl_g3d_initialize(_EGLDriver *drv, _EGLDisplay *dpy,
- EGLint *major, EGLint *minor)
+egl_g3d_initialize(_EGLDriver *drv, _EGLDisplay *dpy)
{
struct egl_g3d_driver *gdrv = egl_g3d_driver(drv);
struct egl_g3d_display *gdpy;
@@ -506,6 +495,9 @@ egl_g3d_initialize(_EGLDriver *drv, _EGLDisplay *dpy,
if (!nplat)
return EGL_FALSE;
+ if (dpy->Options.TestOnly)
+ return EGL_TRUE;
+
gdpy = CALLOC_STRUCT(egl_g3d_display);
if (!gdpy) {
_eglError(EGL_BAD_ALLOC, "eglInitialize");
@@ -516,20 +508,20 @@ egl_g3d_initialize(_EGLDriver *drv, _EGLDisplay *dpy,
_eglLog(_EGL_INFO, "use %s for display %p", nplat->name, dpy->PlatformDisplay);
gdpy->native = nplat->create_display(dpy->PlatformDisplay,
- &egl_g3d_native_event_handler, (void *) dpy);
+ dpy->Options.UseFallback, (void *) dpy);
if (!gdpy->native) {
_eglError(EGL_NOT_INITIALIZED, "eglInitialize(no usable display)");
goto fail;
}
if (gdpy->loader->profile_masks[ST_API_OPENGL] & ST_PROFILE_DEFAULT_MASK)
- dpy->ClientAPIsMask |= EGL_OPENGL_BIT;
+ dpy->ClientAPIs |= EGL_OPENGL_BIT;
if (gdpy->loader->profile_masks[ST_API_OPENGL] & ST_PROFILE_OPENGL_ES1_MASK)
- dpy->ClientAPIsMask |= EGL_OPENGL_ES_BIT;
+ dpy->ClientAPIs |= EGL_OPENGL_ES_BIT;
if (gdpy->loader->profile_masks[ST_API_OPENGL] & ST_PROFILE_OPENGL_ES2_MASK)
- dpy->ClientAPIsMask |= EGL_OPENGL_ES2_BIT;
+ dpy->ClientAPIs |= EGL_OPENGL_ES2_BIT;
if (gdpy->loader->profile_masks[ST_API_OPENVG] & ST_PROFILE_DEFAULT_MASK)
- dpy->ClientAPIsMask |= EGL_OPENVG_BIT;
+ dpy->ClientAPIs |= EGL_OPENVG_BIT;
gdpy->smapi = egl_g3d_create_st_manager(dpy);
if (!gdpy->smapi) {
@@ -563,6 +555,9 @@ egl_g3d_initialize(_EGLDriver *drv, _EGLDisplay *dpy,
dpy->Extensions.MESA_drm_image = EGL_TRUE;
}
+ if (dpy->Platform == _EGL_PLATFORM_WAYLAND && gdpy->native->buffer)
+ dpy->Extensions.MESA_drm_image = EGL_TRUE;
+
#ifdef EGL_ANDROID_image_native_buffer
if (dpy->Platform == _EGL_PLATFORM_ANDROID && gdpy->native->buffer)
dpy->Extensions.ANDROID_image_native_buffer = EGL_TRUE;
@@ -573,8 +568,8 @@ egl_g3d_initialize(_EGLDriver *drv, _EGLDisplay *dpy,
goto fail;
}
- *major = 1;
- *minor = 4;
+ dpy->VersionMajor = 1;
+ dpy->VersionMinor = 4;
return EGL_TRUE;
@@ -599,12 +594,6 @@ egl_g3d_get_proc_address(_EGLDriver *drv, const char *procname)
stapi->get_proc_address(stapi, procname) : NULL);
}
-static EGLint
-egl_g3d_probe(_EGLDriver *drv, _EGLDisplay *dpy)
-{
- return (egl_g3d_get_platform(drv, dpy->Platform)) ? 90 : 0;
-}
-
_EGLDriver *
egl_g3d_create_driver(const struct egl_g3d_loader *loader)
{
@@ -621,8 +610,6 @@ egl_g3d_create_driver(const struct egl_g3d_loader *loader)
gdrv->base.API.Terminate = egl_g3d_terminate;
gdrv->base.API.GetProcAddress = egl_g3d_get_proc_address;
- gdrv->base.Probe = egl_g3d_probe;
-
/* to be filled by the caller */
gdrv->base.Name = NULL;
gdrv->base.Unload = NULL;
diff --git a/src/gallium/state_trackers/egl/common/egl_g3d.h b/src/gallium/state_trackers/egl/common/egl_g3d.h
index a5850635b20..2292d611fcd 100644
--- a/src/gallium/state_trackers/egl/common/egl_g3d.h
+++ b/src/gallium/state_trackers/egl/common/egl_g3d.h
@@ -56,7 +56,6 @@ struct egl_g3d_display {
const struct egl_g3d_loader *loader;
struct st_manager *smapi;
- struct pipe_context *pipe;
};
struct egl_g3d_context {
diff --git a/src/gallium/state_trackers/egl/common/egl_g3d_api.c b/src/gallium/state_trackers/egl/common/egl_g3d_api.c
index 8e53e1dccba..f1568329ecf 100644
--- a/src/gallium/state_trackers/egl/common/egl_g3d_api.c
+++ b/src/gallium/state_trackers/egl/common/egl_g3d_api.c
@@ -158,17 +158,17 @@ egl_g3d_choose_config(_EGLDriver *drv, _EGLDisplay *dpy, const EGLint *attribs,
(_EGLArrayForEach) egl_g3d_match_config, (void *) &criteria);
/* perform sorting of configs */
- if (tmp_configs && tmp_size) {
+ if (configs && tmp_size) {
_eglSortConfigs((const _EGLConfig **) tmp_configs, tmp_size,
egl_g3d_compare_config, (void *) &criteria);
- size = MIN2(tmp_size, size);
- for (i = 0; i < size; i++)
+ tmp_size = MIN2(tmp_size, size);
+ for (i = 0; i < tmp_size; i++)
configs[i] = _eglGetConfigHandle(tmp_configs[i]);
}
FREE(tmp_configs);
- *num_configs = size;
+ *num_configs = tmp_size;
return EGL_TRUE;
}
@@ -324,7 +324,8 @@ egl_g3d_create_surface(_EGLDriver *drv, _EGLDisplay *dpy, _EGLConfig *conf,
}
gsurf->stvis = gconf->stvis;
- if (gsurf->base.RenderBuffer == EGL_SINGLE_BUFFER)
+ if (gsurf->base.RenderBuffer == EGL_SINGLE_BUFFER &&
+ gconf->stvis.buffer_mask & ST_ATTACHMENT_FRONT_LEFT_MASK)
gsurf->stvis.render_buffer = ST_ATTACHMENT_FRONT_LEFT;
gsurf->stfbi = egl_g3d_create_st_framebuffer(&gsurf->base);
@@ -402,7 +403,6 @@ egl_g3d_create_pbuffer_surface(_EGLDriver *drv, _EGLDisplay *dpy,
_EGLConfig *conf, const EGLint *attribs)
{
struct egl_g3d_surface *gsurf;
- struct pipe_resource *ptex = NULL;
gsurf = create_pbuffer_surface(dpy, conf, attribs,
"eglCreatePbufferSurface");
@@ -411,13 +411,6 @@ egl_g3d_create_pbuffer_surface(_EGLDriver *drv, _EGLDisplay *dpy,
gsurf->client_buffer_type = EGL_NONE;
- if (!gsurf->stfbi->validate(gsurf->stfbi,
- &gsurf->stvis.render_buffer, 1, &ptex)) {
- egl_g3d_destroy_st_framebuffer(gsurf->stfbi);
- FREE(gsurf);
- return NULL;
- }
-
return &gsurf->base;
}
@@ -477,12 +470,14 @@ egl_g3d_create_pbuffer_from_client_buffer(_EGLDriver *drv, _EGLDisplay *dpy,
gsurf->client_buffer_type = buftype;
gsurf->client_buffer = buffer;
+ /* validate now so that it fails if the client buffer is invalid */
if (!gsurf->stfbi->validate(gsurf->stfbi,
&gsurf->stvis.render_buffer, 1, &ptex)) {
egl_g3d_destroy_st_framebuffer(gsurf->stfbi);
FREE(gsurf);
return NULL;
}
+ pipe_resource_reference(&ptex, NULL);
return &gsurf->base;
}
@@ -533,8 +528,7 @@ egl_g3d_make_current(_EGLDriver *drv, _EGLDisplay *dpy,
old_gctx = egl_g3d_context(old_ctx);
if (old_gctx) {
/* flush old context */
- old_gctx->stctxi->flush(old_gctx->stctxi,
- PIPE_FLUSH_RENDER_CACHE | PIPE_FLUSH_FRAME, NULL);
+ old_gctx->stctxi->flush(old_gctx->stctxi, ST_FLUSH_FRONT, NULL);
}
if (gctx) {
@@ -611,8 +605,7 @@ egl_g3d_swap_buffers(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSurface *surf)
/* flush if the surface is current */
if (gctx) {
- gctx->stctxi->flush(gctx->stctxi,
- PIPE_FLUSH_RENDER_CACHE | PIPE_FLUSH_FRAME, NULL);
+ gctx->stctxi->flush(gctx->stctxi, ST_FLUSH_FRONT, NULL);
}
return gsurf->native->present(gsurf->native,
@@ -643,47 +636,36 @@ egl_g3d_copy_buffers(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSurface *surf,
struct egl_g3d_display *gdpy = egl_g3d_display(dpy);
struct egl_g3d_surface *gsurf = egl_g3d_surface(surf);
_EGLContext *ctx = _eglGetCurrentContext();
- struct egl_g3d_config *gconf;
struct native_surface *nsurf;
struct pipe_resource *ptex;
+ struct pipe_context *pipe;
if (!gsurf->render_texture)
return EGL_TRUE;
- gconf = egl_g3d_config(egl_g3d_find_pixmap_config(dpy, target));
- if (!gconf)
- return _eglError(EGL_BAD_NATIVE_PIXMAP, "eglCopyBuffers");
-
- nsurf = gdpy->native->create_pixmap_surface(gdpy->native,
- target, gconf->native);
+ nsurf = gdpy->native->create_pixmap_surface(gdpy->native, target, NULL);
if (!nsurf)
return _eglError(EGL_BAD_NATIVE_PIXMAP, "eglCopyBuffers");
/* flush if the surface is current */
if (ctx && ctx->DrawSurface == &gsurf->base) {
struct egl_g3d_context *gctx = egl_g3d_context(ctx);
- gctx->stctxi->flush(gctx->stctxi,
- PIPE_FLUSH_RENDER_CACHE | PIPE_FLUSH_FRAME, NULL);
+ gctx->stctxi->flush(gctx->stctxi, ST_FLUSH_FRONT, NULL);
}
- /* create a pipe context to copy surfaces */
- if (!gdpy->pipe) {
- gdpy->pipe =
- gdpy->native->screen->context_create(gdpy->native->screen, NULL);
- if (!gdpy->pipe)
- return EGL_FALSE;
- }
+ pipe = ndpy_get_copy_context(gdpy->native);
+ if (!pipe)
+ return EGL_FALSE;
ptex = get_pipe_resource(gdpy->native, nsurf, NATIVE_ATTACHMENT_FRONT_LEFT);
if (ptex) {
- struct pipe_resource *psrc = gsurf->render_texture;
struct pipe_box src_box;
+
u_box_origin_2d(ptex->width0, ptex->height0, &src_box);
- if (psrc) {
- gdpy->pipe->resource_copy_region(gdpy->pipe, ptex, 0, 0, 0, 0,
- gsurf->render_texture, 0, &src_box);
- nsurf->present(nsurf, NATIVE_ATTACHMENT_FRONT_LEFT, FALSE, 0);
- }
+ pipe->resource_copy_region(pipe, ptex, 0, 0, 0, 0,
+ gsurf->render_texture, 0, &src_box);
+ pipe->flush(pipe, NULL);
+ nsurf->present(nsurf, NATIVE_ATTACHMENT_FRONT_LEFT, FALSE, 0);
pipe_resource_reference(&ptex, NULL);
}
@@ -701,10 +683,9 @@ egl_g3d_wait_client(_EGLDriver *drv, _EGLDisplay *dpy, _EGLContext *ctx)
struct pipe_screen *screen = gdpy->native->screen;
struct pipe_fence_handle *fence = NULL;
- gctx->stctxi->flush(gctx->stctxi,
- PIPE_FLUSH_RENDER_CACHE | PIPE_FLUSH_FRAME, &fence);
+ gctx->stctxi->flush(gctx->stctxi, ST_FLUSH_FRONT, &fence);
if (fence) {
- screen->fence_finish(screen, fence, 0);
+ screen->fence_finish(screen, fence, PIPE_TIMEOUT_INFINITE);
screen->fence_reference(screen, &fence, NULL);
}
@@ -773,8 +754,7 @@ egl_g3d_bind_tex_image(_EGLDriver *drv, _EGLDisplay *dpy,
/* flush properly if the surface is bound */
if (gsurf->base.CurrentContext) {
gctx = egl_g3d_context(gsurf->base.CurrentContext);
- gctx->stctxi->flush(gctx->stctxi,
- PIPE_FLUSH_RENDER_CACHE | PIPE_FLUSH_FRAME, NULL);
+ gctx->stctxi->flush(gctx->stctxi, ST_FLUSH_FRONT, NULL);
}
gctx = egl_g3d_context(es1);
@@ -888,25 +868,6 @@ egl_g3d_show_screen_surface(_EGLDriver *drv, _EGLDisplay *dpy,
#endif /* EGL_MESA_screen_surface */
-/**
- * Find a config that supports the pixmap.
- */
-_EGLConfig *
-egl_g3d_find_pixmap_config(_EGLDisplay *dpy, EGLNativePixmapType pix)
-{
- struct egl_g3d_display *gdpy = egl_g3d_display(dpy);
- struct egl_g3d_config *gconf;
- EGLint i;
-
- for (i = 0; i < dpy->Configs->Size; i++) {
- gconf = egl_g3d_config((_EGLConfig *) dpy->Configs->Elements[i]);
- if (gdpy->native->is_pixmap_supported(gdpy->native, pix, gconf->native))
- break;
- }
-
- return (i < dpy->Configs->Size) ? &gconf->base : NULL;
-}
-
void
egl_g3d_init_driver_api(_EGLDriver *drv)
{
diff --git a/src/gallium/state_trackers/egl/common/egl_g3d_api.h b/src/gallium/state_trackers/egl/common/egl_g3d_api.h
index d5196c12fe9..17fd7958aa6 100644
--- a/src/gallium/state_trackers/egl/common/egl_g3d_api.h
+++ b/src/gallium/state_trackers/egl/common/egl_g3d_api.h
@@ -31,7 +31,4 @@
void
egl_g3d_init_driver_api(_EGLDriver *drv);
-_EGLConfig *
-egl_g3d_find_pixmap_config(_EGLDisplay *dpy, EGLNativePixmapType pix);
-
#endif /* _EGL_G3D_API_H_ */
diff --git a/src/gallium/state_trackers/egl/common/egl_g3d_image.c b/src/gallium/state_trackers/egl/common/egl_g3d_image.c
index b53b121005b..1d23305402f 100644
--- a/src/gallium/state_trackers/egl/common/egl_g3d_image.c
+++ b/src/gallium/state_trackers/egl/common/egl_g3d_image.c
@@ -35,7 +35,6 @@
#include "native.h"
#include "egl_g3d.h"
-#include "egl_g3d_api.h"
#include "egl_g3d_image.h"
/* for struct winsys_handle */
@@ -53,17 +52,11 @@ static struct pipe_resource *
egl_g3d_reference_native_pixmap(_EGLDisplay *dpy, EGLNativePixmapType pix)
{
struct egl_g3d_display *gdpy = egl_g3d_display(dpy);
- struct egl_g3d_config *gconf;
struct native_surface *nsurf;
struct pipe_resource *textures[NUM_NATIVE_ATTACHMENTS];
enum native_attachment natt;
- gconf = egl_g3d_config(egl_g3d_find_pixmap_config(dpy, pix));
- if (!gconf)
- return NULL;
-
- nsurf = gdpy->native->create_pixmap_surface(gdpy->native,
- pix, gconf->native);
+ nsurf = gdpy->native->create_pixmap_surface(gdpy->native, pix, NULL);
if (!nsurf)
return NULL;
@@ -123,6 +116,7 @@ egl_g3d_create_drm_buffer(_EGLDisplay *dpy, _EGLImage *img,
templ.width0 = attrs.Width;
templ.height0 = attrs.Height;
templ.depth0 = 1;
+ templ.array_size = 1;
/*
* XXX fix apps (e.g. wayland) and pipe drivers (e.g. i915) and remove the
@@ -147,7 +141,7 @@ egl_g3d_reference_drm_buffer(_EGLDisplay *dpy, EGLint name,
_EGLImageAttribs attrs;
EGLint format;
- if (dpy->Platform != _EGL_PLATFORM_DRM)
+ if (!dpy->Extensions.MESA_drm_image)
return NULL;
if (_eglParseImageAttribList(&attrs, dpy, attribs) != EGL_SUCCESS)
@@ -236,10 +230,12 @@ egl_g3d_reference_android_native_buffer(_EGLDisplay *dpy,
memset(&templ, 0, sizeof(templ));
templ.target = PIPE_TEXTURE_2D;
templ.format = format;
- templ.bind = PIPE_BIND_RENDER_TARGET | PIPE_BIND_SAMPLER_VIEW;
+ /* assume for texturing only */
+ templ.bind = PIPE_BIND_SAMPLER_VIEW;
templ.width0 = buf->width;
templ.height0 = buf->height;
templ.depth0 = 1;
+ templ.array_size = 1;
res = gdpy->native->buffer->import_buffer(gdpy->native,
&templ, (void *) buf);
@@ -385,7 +381,7 @@ egl_g3d_export_drm_image(_EGLDriver *drv, _EGLDisplay *dpy, _EGLImage *img,
struct egl_g3d_image *gimg = egl_g3d_image(img);
struct winsys_handle wsh;
- if (dpy->Platform != _EGL_PLATFORM_DRM)
+ if (!dpy->Extensions.MESA_drm_image)
return EGL_FALSE;
/* get shared handle */
diff --git a/src/gallium/state_trackers/egl/common/egl_g3d_sync.c b/src/gallium/state_trackers/egl/common/egl_g3d_sync.c
index 4e6d944c151..dd07af140a7 100644
--- a/src/gallium/state_trackers/egl/common/egl_g3d_sync.c
+++ b/src/gallium/state_trackers/egl/common/egl_g3d_sync.c
@@ -109,7 +109,7 @@ egl_g3d_wait_fence_sync(struct egl_g3d_sync *gsync, EGLTimeKHR timeout)
_eglUnlockMutex(&dpy->Mutex);
/* no timed finish? */
- screen->fence_finish(screen, fence, 0x0);
+ screen->fence_finish(screen, fence, PIPE_TIMEOUT_INFINITE);
ret = EGL_CONDITION_SATISFIED_KHR;
_eglLockMutex(&dpy->Mutex);
@@ -234,7 +234,7 @@ egl_g3d_client_wait_sync(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSync *sync,
struct egl_g3d_context *gctx = egl_g3d_context(ctx);
if (gctx)
- gctx->stctxi->flush(gctx->stctxi, PIPE_FLUSH_RENDER_CACHE , NULL);
+ gctx->stctxi->flush(gctx->stctxi, ST_FLUSH_FRONT, NULL);
}
if (timeout) {
diff --git a/src/gallium/state_trackers/egl/common/native.h b/src/gallium/state_trackers/egl/common/native.h
index ca8cb97f713..9e9cd3fd052 100644
--- a/src/gallium/state_trackers/egl/common/native.h
+++ b/src/gallium/state_trackers/egl/common/native.h
@@ -126,8 +126,6 @@ struct native_config {
int native_visual_id;
int native_visual_type;
int level;
- int samples;
- boolean slow_config;
boolean transparent_rgb;
int transparent_rgb_values[3];
};
@@ -144,6 +142,11 @@ struct native_display {
struct pipe_screen *screen;
/**
+ * Context used for copy operations.
+ */
+ struct pipe_context *pipe;
+
+ /**
* Available for caller's use.
*/
void *user_data;
@@ -185,7 +188,9 @@ struct native_display {
const struct native_config *nconf);
/**
- * Create a pixmap surface. Required unless no config has pixmap_bit set.
+ * Create a pixmap surface. The native config may be NULL. In that case, a
+ * "best config" will be picked. Required unless no config has pixmap_bit
+ * set.
*/
struct native_surface *(*create_pixmap_surface)(struct native_display *ndpy,
EGLNativePixmapType pix,
@@ -223,11 +228,35 @@ native_attachment_mask_test(uint mask, enum native_attachment att)
return !!(mask & (1 << att));
}
+/**
+ * Get the display copy context
+ */
+static INLINE struct pipe_context *
+ndpy_get_copy_context(struct native_display *ndpy)
+{
+ if (!ndpy->pipe)
+ ndpy->pipe = ndpy->screen->context_create(ndpy->screen, NULL);
+ return ndpy->pipe;
+}
+
+/**
+ * Free display screen and context resources
+ */
+static INLINE void
+ndpy_uninit(struct native_display *ndpy)
+{
+ if (ndpy->pipe)
+ ndpy->pipe->destroy(ndpy->pipe);
+ if (ndpy->screen)
+ ndpy->screen->destroy(ndpy->screen);
+}
+
struct native_platform {
const char *name;
+ void (*set_event_handler)(struct native_event_handler *handler);
struct native_display *(*create_display)(void *dpy,
- struct native_event_handler *handler,
+ boolean use_sw,
void *user_data);
};
@@ -238,6 +267,9 @@ const struct native_platform *
native_get_x11_platform(void);
const struct native_platform *
+native_get_wayland_platform(void);
+
+const struct native_platform *
native_get_drm_platform(void);
const struct native_platform *
diff --git a/src/gallium/state_trackers/egl/common/native_helper.c b/src/gallium/state_trackers/egl/common/native_helper.c
index 0f2d02032b5..ee18cb2025b 100644
--- a/src/gallium/state_trackers/egl/common/native_helper.c
+++ b/src/gallium/state_trackers/egl/common/native_helper.c
@@ -3,6 +3,7 @@
* Version: 7.9
*
* Copyright (C) 2010 LunarG Inc.
+ * Copyright (C) 2011 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"),
@@ -24,6 +25,7 @@
*
* Authors:
* Chia-I Wu <olv@lunarg.com>
+ * Thomas Hellstrom <thellstrom@vmware.com>
*/
#include "util/u_inlines.h"
@@ -34,6 +36,14 @@
#include "native_helper.h"
+/**
+ * Number of swap fences and mask
+ */
+
+#define EGL_SWAP_FENCES_MAX 4
+#define EGL_SWAP_FENCES_MASK 3
+#define EGL_SWAP_FENCES_DEFAULT 1
+
struct resource_surface {
struct pipe_screen *screen;
enum pipe_format format;
@@ -42,6 +52,15 @@ struct resource_surface {
struct pipe_resource *resources[NUM_NATIVE_ATTACHMENTS];
uint resource_mask;
uint width, height;
+
+ /**
+ * Swap fences.
+ */
+ struct pipe_fence_handle *swap_fences[EGL_SWAP_FENCES_MAX];
+ unsigned int cur_fences;
+ unsigned int head;
+ unsigned int tail;
+ unsigned int desired_fences;
};
struct resource_surface *
@@ -49,11 +68,16 @@ resource_surface_create(struct pipe_screen *screen,
enum pipe_format format, uint bind)
{
struct resource_surface *rsurf = CALLOC_STRUCT(resource_surface);
+ char *swap_fences = getenv("EGL_THROTTLE_FENCES");
if (rsurf) {
rsurf->screen = screen;
rsurf->format = format;
rsurf->bind = bind;
+ rsurf->desired_fences = (swap_fences) ? atoi(swap_fences) :
+ EGL_SWAP_FENCES_DEFAULT;
+ if (rsurf->desired_fences > EGL_SWAP_FENCES_MAX)
+ rsurf->desired_fences = EGL_SWAP_FENCES_MAX;
}
return rsurf;
@@ -143,6 +167,14 @@ resource_surface_add_resources(struct resource_surface *rsurf,
return ((rsurf->resource_mask & resource_mask) == resource_mask);
}
+void
+resource_surface_import_resource(struct resource_surface *rsurf,
+ enum native_attachment which,
+ struct pipe_resource *pres)
+{
+ pipe_resource_reference(&rsurf->resources[which], pres);
+ rsurf->resource_mask |= 1 << which;
+}
void
resource_surface_get_resources(struct resource_surface *rsurf,
@@ -217,3 +249,121 @@ resource_surface_present(struct resource_surface *rsurf,
return TRUE;
}
+
+/**
+ * Schedule a copy swap from the back to the front buffer using the
+ * native display's copy context.
+ */
+boolean
+resource_surface_copy_swap(struct resource_surface *rsurf,
+ struct native_display *ndpy)
+{
+ struct pipe_resource *ftex;
+ struct pipe_resource *btex;
+ struct pipe_context *pipe;
+ struct pipe_box src_box;
+ boolean ret = FALSE;
+
+ pipe = ndpy_get_copy_context(ndpy);
+ if (!pipe)
+ return FALSE;
+
+ ftex = resource_surface_get_single_resource(rsurf,
+ NATIVE_ATTACHMENT_FRONT_LEFT);
+ if (!ftex)
+ goto out_no_ftex;
+ btex = resource_surface_get_single_resource(rsurf,
+ NATIVE_ATTACHMENT_BACK_LEFT);
+ if (!btex)
+ goto out_no_btex;
+
+ u_box_origin_2d(ftex->width0, ftex->height0, &src_box);
+ pipe->resource_copy_region(pipe, ftex, 0, 0, 0, 0,
+ btex, 0, &src_box);
+ ret = TRUE;
+
+ out_no_ftex:
+ pipe_resource_reference(&btex, NULL);
+ out_no_btex:
+ pipe_resource_reference(&ftex, NULL);
+
+ return ret;
+}
+
+static struct pipe_fence_handle *
+swap_fences_pop_front(struct resource_surface *rsurf)
+{
+ struct pipe_screen *screen = rsurf->screen;
+ struct pipe_fence_handle *fence = NULL;
+
+ if (rsurf->desired_fences == 0)
+ return NULL;
+
+ if (rsurf->cur_fences >= rsurf->desired_fences) {
+ screen->fence_reference(screen, &fence, rsurf->swap_fences[rsurf->tail]);
+ screen->fence_reference(screen, &rsurf->swap_fences[rsurf->tail++], NULL);
+ rsurf->tail &= EGL_SWAP_FENCES_MASK;
+ --rsurf->cur_fences;
+ }
+ return fence;
+}
+
+static void
+swap_fences_push_back(struct resource_surface *rsurf,
+ struct pipe_fence_handle *fence)
+{
+ struct pipe_screen *screen = rsurf->screen;
+
+ if (!fence || rsurf->desired_fences == 0)
+ return;
+
+ while(rsurf->cur_fences == rsurf->desired_fences)
+ swap_fences_pop_front(rsurf);
+
+ rsurf->cur_fences++;
+ screen->fence_reference(screen, &rsurf->swap_fences[rsurf->head++],
+ fence);
+ rsurf->head &= EGL_SWAP_FENCES_MASK;
+}
+
+boolean
+resource_surface_throttle(struct resource_surface *rsurf)
+{
+ struct pipe_screen *screen = rsurf->screen;
+ struct pipe_fence_handle *fence = swap_fences_pop_front(rsurf);
+
+ if (fence) {
+ (void) screen->fence_finish(screen, fence, PIPE_TIMEOUT_INFINITE);
+ screen->fence_reference(screen, &fence, NULL);
+ return TRUE;
+ }
+
+ return FALSE;
+}
+
+boolean
+resource_surface_flush(struct resource_surface *rsurf,
+ struct native_display *ndpy)
+{
+ struct pipe_fence_handle *fence = NULL;
+ struct pipe_screen *screen = rsurf->screen;
+ struct pipe_context *pipe= ndpy_get_copy_context(ndpy);
+
+ if (!pipe)
+ return FALSE;
+
+ pipe->flush(pipe, &fence);
+ if (fence == NULL)
+ return FALSE;
+
+ swap_fences_push_back(rsurf, fence);
+ screen->fence_reference(screen, &fence, NULL);
+
+ return TRUE;
+}
+
+void
+resource_surface_wait(struct resource_surface *rsurf)
+{
+ while (resource_surface_throttle(rsurf));
+}
diff --git a/src/gallium/state_trackers/egl/common/native_helper.h b/src/gallium/state_trackers/egl/common/native_helper.h
index d1569ac3ea6..39564a04365 100644
--- a/src/gallium/state_trackers/egl/common/native_helper.h
+++ b/src/gallium/state_trackers/egl/common/native_helper.h
@@ -3,6 +3,7 @@
* Version: 7.9
*
* Copyright (C) 2010 LunarG Inc.
+ * Copyright (C) 2011 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"),
@@ -24,6 +25,7 @@
*
* Authors:
* Chia-I Wu <olv@lunarg.com>
+ * Thomas Hellstrom <thellstrom@vmware.com>
*/
#include "native.h"
@@ -51,6 +53,11 @@ resource_surface_add_resources(struct resource_surface *rsurf,
uint resource_mask);
void
+resource_surface_import_resource(struct resource_surface *rsurf,
+ enum native_attachment which,
+ struct pipe_resource *pres);
+
+void
resource_surface_get_resources(struct resource_surface *rsurf,
struct pipe_resource **resources,
uint resource_mask);
@@ -69,3 +76,32 @@ boolean
resource_surface_present(struct resource_surface *rsurf,
enum native_attachment which,
void *winsys_drawable_handle);
+
+/**
+ * Perform a gallium copy blit between the back left and front left
+ * surfaces. Needs to be followed by a call to resource_surface_flush.
+ */
+boolean
+resource_surface_copy_swap(struct resource_surface *rsurf,
+ struct native_display *ndpy);
+
+/**
+ * Throttle on outstanding rendering using the copy context. For example
+ * copy swaps.
+ */
+boolean
+resource_surface_throttle(struct resource_surface *rsurf);
+
+/**
+ * Flush pending rendering using the copy context. This function saves a
+ * marker for upcoming throttles.
+ */
+boolean
+resource_surface_flush(struct resource_surface *rsurf,
+ struct native_display *ndpy);
+/**
+ * Wait for all rendering using the copy context to be complete. Frees all
+ * throttle markers saved using resource_surface_flush.
+ */
+void
+resource_surface_wait(struct resource_surface *rsurf);
diff --git a/src/gallium/state_trackers/egl/drm/modeset.c b/src/gallium/state_trackers/egl/drm/modeset.c
index 0cc06caa2a1..3fff9540905 100644
--- a/src/gallium/state_trackers/egl/drm/modeset.c
+++ b/src/gallium/state_trackers/egl/drm/modeset.c
@@ -3,6 +3,7 @@
* Version: 7.9
*
* Copyright (C) 2010 LunarG Inc.
+ * Copyright (C) 2011 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"),
@@ -24,6 +25,7 @@
*
* Authors:
* Chia-I Wu <olv@lunarg.com>
+ * Thomas Hellstrom <thellstrom@vmware.com>
*/
#include "util/u_memory.h"
@@ -131,6 +133,25 @@ drm_surface_flush_frontbuffer(struct native_surface *nsurf)
}
static boolean
+drm_surface_copy_swap(struct native_surface *nsurf)
+{
+ struct drm_surface *drmsurf = drm_surface(nsurf);
+ struct drm_display *drmdpy = drmsurf->drmdpy;
+
+ (void) resource_surface_throttle(drmsurf->rsurf);
+ if (!resource_surface_copy_swap(drmsurf->rsurf, &drmdpy->base))
+ return FALSE;
+
+ (void) resource_surface_flush(drmsurf->rsurf, &drmdpy->base);
+ if (!drm_surface_flush_frontbuffer(nsurf))
+ return FALSE;
+
+ drmsurf->sequence_number++;
+
+ return TRUE;
+}
+
+static boolean
drm_surface_swap_buffers(struct native_surface *nsurf)
{
struct drm_surface *drmsurf = drm_surface(nsurf);
@@ -139,17 +160,21 @@ drm_surface_swap_buffers(struct native_surface *nsurf)
struct drm_framebuffer tmp_fb;
int err;
+ if (!drmsurf->have_pageflip)
+ return drm_surface_copy_swap(nsurf);
+
if (!drmsurf->back_fb.buffer_id) {
if (!drm_surface_init_framebuffers(&drmsurf->base, TRUE))
return FALSE;
}
if (drmsurf->is_shown && drmcrtc->crtc) {
- err = drmModeSetCrtc(drmdpy->fd, drmcrtc->crtc->crtc_id,
- drmsurf->back_fb.buffer_id, drmcrtc->crtc->x, drmcrtc->crtc->y,
- drmcrtc->connectors, drmcrtc->num_connectors, &drmcrtc->crtc->mode);
- if (err)
- return FALSE;
+ err = drmModePageFlip(drmdpy->fd, drmcrtc->crtc->crtc_id,
+ drmsurf->back_fb.buffer_id, 0, NULL);
+ if (err) {
+ drmsurf->have_pageflip = FALSE;
+ return drm_surface_copy_swap(nsurf);
+ }
}
/* swap the buffers */
@@ -175,7 +200,7 @@ drm_surface_present(struct native_surface *nsurf,
{
boolean ret;
- if (preserve || swap_interval)
+ if (swap_interval)
return FALSE;
switch (natt) {
@@ -183,7 +208,10 @@ drm_surface_present(struct native_surface *nsurf,
ret = drm_surface_flush_frontbuffer(nsurf);
break;
case NATIVE_ATTACHMENT_BACK_LEFT:
- ret = drm_surface_swap_buffers(nsurf);
+ if (preserve)
+ ret = drm_surface_copy_swap(nsurf);
+ else
+ ret = drm_surface_swap_buffers(nsurf);
break;
default:
ret = FALSE;
@@ -196,7 +224,9 @@ drm_surface_present(struct native_surface *nsurf,
static void
drm_surface_wait(struct native_surface *nsurf)
{
- /* no-op */
+ struct drm_surface *drmsurf = drm_surface(nsurf);
+
+ resource_surface_wait(drmsurf->rsurf);
}
static void
@@ -204,6 +234,7 @@ drm_surface_destroy(struct native_surface *nsurf)
{
struct drm_surface *drmsurf = drm_surface(nsurf);
+ resource_surface_wait(drmsurf->rsurf);
if (drmsurf->current_crtc.crtc)
drmModeFreeCrtc(drmsurf->current_crtc.crtc);
@@ -236,6 +267,7 @@ drm_display_create_surface(struct native_display *ndpy,
drmsurf->color_format = drmconf->base.color_format;
drmsurf->width = width;
drmsurf->height = height;
+ drmsurf->have_pageflip = TRUE;
drmsurf->rsurf = resource_surface_create(drmdpy->base.screen,
drmsurf->color_format,
diff --git a/src/gallium/state_trackers/egl/drm/native_drm.c b/src/gallium/state_trackers/egl/drm/native_drm.c
index 2441b43fd8e..9863329ff40 100644
--- a/src/gallium/state_trackers/egl/drm/native_drm.c
+++ b/src/gallium/state_trackers/egl/drm/native_drm.c
@@ -43,7 +43,7 @@ drm_display_is_format_supported(struct native_display *ndpy,
return ndpy->screen->is_format_supported(ndpy->screen,
fmt, PIPE_TEXTURE_2D, 0,
(is_color) ? PIPE_BIND_RENDER_TARGET :
- PIPE_BIND_DEPTH_STENCIL, 0);
+ PIPE_BIND_DEPTH_STENCIL);
}
static const struct native_config **
@@ -124,8 +124,7 @@ drm_display_destroy(struct native_display *ndpy)
drm_display_fini_modeset(&drmdpy->base);
- if (drmdpy->base.screen)
- drmdpy->base.screen->destroy(drmdpy->base.screen);
+ ndpy_uninit(ndpy);
if (drmdpy->fd >= 0)
close(drmdpy->fd);
@@ -178,7 +177,7 @@ drm_display_init_screen(struct native_display *ndpy)
drmFreeVersion(version);
if (!drmdpy->base.screen) {
- _eglLog(_EGL_WARNING, "failed to create DRM screen");
+ _eglLog(_EGL_DEBUG, "failed to create DRM screen");
return FALSE;
}
@@ -237,9 +236,16 @@ drm_create_display(int fd, struct native_event_handler *event_handler,
return &drmdpy->base;
}
+static struct native_event_handler *drm_event_handler;
+
+static void
+native_set_event_handler(struct native_event_handler *event_handler)
+{
+ drm_event_handler = event_handler;
+}
+
static struct native_display *
-native_create_display(void *dpy, struct native_event_handler *event_handler,
- void *user_data)
+native_create_display(void *dpy, boolean use_sw, void *user_data)
{
int fd;
@@ -252,11 +258,12 @@ native_create_display(void *dpy, struct native_event_handler *event_handler,
if (fd < 0)
return NULL;
- return drm_create_display(fd, event_handler, user_data);
+ return drm_create_display(fd, drm_event_handler, user_data);
}
static const struct native_platform drm_platform = {
"DRM", /* name */
+ native_set_event_handler,
native_create_display
};
diff --git a/src/gallium/state_trackers/egl/drm/native_drm.h b/src/gallium/state_trackers/egl/drm/native_drm.h
index 03c4fe01dc1..7da9b45f23e 100644
--- a/src/gallium/state_trackers/egl/drm/native_drm.h
+++ b/src/gallium/state_trackers/egl/drm/native_drm.h
@@ -91,6 +91,8 @@ struct drm_surface {
boolean is_shown;
struct drm_crtc current_crtc;
+
+ boolean have_pageflip;
};
struct drm_connector {
diff --git a/src/gallium/state_trackers/egl/fbdev/native_fbdev.c b/src/gallium/state_trackers/egl/fbdev/native_fbdev.c
index 1b5ea8bf9d5..e2fde00e975 100644
--- a/src/gallium/state_trackers/egl/fbdev/native_fbdev.c
+++ b/src/gallium/state_trackers/egl/fbdev/native_fbdev.c
@@ -320,7 +320,7 @@ fbdev_display_destroy(struct native_display *ndpy)
{
struct fbdev_display *fbdpy = fbdev_display(ndpy);
- fbdpy->base.screen->destroy(fbdpy->base.screen);
+ ndpy_uninit(&fbdpy->base);
close(fbdpy->fd);
FREE(fbdpy);
}
@@ -422,7 +422,7 @@ fbdev_display_init(struct native_display *ndpy)
if (fbdpy->base.screen) {
if (!fbdpy->base.screen->is_format_supported(fbdpy->base.screen,
fbdpy->config.color_format, PIPE_TEXTURE_2D, 0,
- PIPE_BIND_RENDER_TARGET, 0)) {
+ PIPE_BIND_RENDER_TARGET)) {
fbdpy->base.screen->destroy(fbdpy->base.screen);
fbdpy->base.screen = NULL;
}
@@ -459,9 +459,16 @@ fbdev_display_create(int fd, struct native_event_handler *event_handler,
return &fbdpy->base;
}
+static struct native_event_handler *fbdev_event_handler;
+
+static void
+native_set_event_handler(struct native_event_handler *event_handler)
+{
+ fbdev_event_handler = event_handler;
+}
+
static struct native_display *
-native_create_display(void *dpy, struct native_event_handler *event_handler,
- void *user_data)
+native_create_display(void *dpy, boolean use_sw, void *user_data)
{
struct native_display *ndpy;
int fd;
@@ -476,7 +483,7 @@ native_create_display(void *dpy, struct native_event_handler *event_handler,
if (fd < 0)
return NULL;
- ndpy = fbdev_display_create(fd, event_handler, user_data);
+ ndpy = fbdev_display_create(fd, fbdev_event_handler, user_data);
if (!ndpy)
close(fd);
@@ -485,6 +492,7 @@ native_create_display(void *dpy, struct native_event_handler *event_handler,
static const struct native_platform fbdev_platform = {
"FBDEV", /* name */
+ native_set_event_handler,
native_create_display
};
diff --git a/src/gallium/state_trackers/egl/gdi/native_gdi.c b/src/gallium/state_trackers/egl/gdi/native_gdi.c
index d259e6edc89..5d0045f92ee 100644
--- a/src/gallium/state_trackers/egl/gdi/native_gdi.c
+++ b/src/gallium/state_trackers/egl/gdi/native_gdi.c
@@ -285,7 +285,7 @@ fill_color_formats(struct native_display *ndpy, enum pipe_format formats[8])
for (i = 0; i < Elements(candidates); i++) {
if (screen->is_format_supported(screen, candidates[i],
- PIPE_TEXTURE_2D, 0, PIPE_BIND_RENDER_TARGET, 0))
+ PIPE_TEXTURE_2D, 0, PIPE_BIND_RENDER_TARGET))
formats[count++] = candidates[i];
}
@@ -319,7 +319,6 @@ gdi_display_get_configs(struct native_display *ndpy, int *num_configs)
nconf->color_format = formats[i];
nconf->window_bit = TRUE;
- nconf->slow_config = TRUE;
}
gdpy->num_configs = count;
@@ -364,7 +363,7 @@ gdi_display_destroy(struct native_display *ndpy)
if (gdpy->configs)
FREE(gdpy->configs);
- gdpy->base.screen->destroy(gdpy->base.screen);
+ ndpy_uninit(ndpy);
FREE(gdpy);
}
@@ -407,15 +406,23 @@ gdi_create_display(HDC hDC, struct native_event_handler *event_handler,
return &gdpy->base;
}
+static struct native_event_handler *gdi_event_handler;
+
+static void
+native_set_event_handler(struct native_event_handler *event_handler)
+{
+ gdi_event_handler = event_handler;
+}
+
static struct native_display *
-native_create_display(void *dpy, struct native_event_handler *event_handler,
- void *user_data)
+native_create_display(void *dpy, boolean use_sw, void *user_data)
{
- return gdi_create_display((HDC) dpy, event_handler, user_data);
+ return gdi_create_display((HDC) dpy, gdi_event_handler, user_data);
}
static const struct native_platform gdi_platform = {
"GDI", /* name */
+ native_set_event_handler,
native_create_display
};
diff --git a/src/gallium/state_trackers/egl/wayland/native_wayland.c b/src/gallium/state_trackers/egl/wayland/native_wayland.c
new file mode 100644
index 00000000000..068c3cd7c8e
--- /dev/null
+++ b/src/gallium/state_trackers/egl/wayland/native_wayland.c
@@ -0,0 +1,626 @@
+/*
+ * Mesa 3-D graphics library
+ * Version: 7.11
+ *
+ * Copyright (C) 2011 Benjamin Franzke <benjaminfranzke@googlemail.com>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * 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 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 "util/u_memory.h"
+#include "util/u_inlines.h"
+
+#include "pipe/p_compiler.h"
+#include "pipe/p_screen.h"
+#include "pipe/p_context.h"
+#include "pipe/p_state.h"
+#include "state_tracker/drm_driver.h"
+
+#include "egllog.h"
+
+#include "native_wayland.h"
+
+/* see get_drm_screen_name */
+#include <radeon_drm.h>
+#include "radeon/drm/radeon_drm_public.h"
+
+#include <wayland-client.h>
+#include "wayland-drm-client-protocol.h"
+#include "wayland-egl-priv.h"
+
+#include <xf86drm.h>
+
+static struct native_event_handler *wayland_event_handler;
+
+static void
+sync_callback(void *data)
+{
+ int *done = data;
+
+ *done = 1;
+}
+
+static void
+force_roundtrip(struct wl_display *display)
+{
+ int done = 0;
+
+ wl_display_sync_callback(display, sync_callback, &done);
+ wl_display_iterate(display, WL_DISPLAY_WRITABLE);
+ while (!done)
+ wl_display_iterate(display, WL_DISPLAY_READABLE);
+}
+
+static const struct native_config **
+wayland_display_get_configs (struct native_display *ndpy, int *num_configs)
+{
+ struct wayland_display *display = wayland_display(ndpy);
+ const struct native_config **configs;
+
+ if (!display->config) {
+ struct native_config *nconf;
+ enum pipe_format format;
+ display->config = CALLOC(1, sizeof(*display->config));
+ if (!display->config)
+ return NULL;
+ nconf = &display->config->base;
+
+ nconf->buffer_mask =
+ (1 << NATIVE_ATTACHMENT_FRONT_LEFT) |
+ (1 << NATIVE_ATTACHMENT_BACK_LEFT);
+
+ format = PIPE_FORMAT_B8G8R8A8_UNORM;
+
+ nconf->color_format = format;
+ nconf->window_bit = TRUE;
+ nconf->pixmap_bit = TRUE;
+ }
+
+ configs = MALLOC(sizeof(*configs));
+ if (configs) {
+ configs[0] = &display->config->base;
+ if (num_configs)
+ *num_configs = 1;
+ }
+
+ return configs;
+}
+
+static int
+wayland_display_get_param(struct native_display *ndpy,
+ enum native_param_type param)
+{
+ int val;
+
+ switch (param) {
+ case NATIVE_PARAM_USE_NATIVE_BUFFER:
+ case NATIVE_PARAM_PRESERVE_BUFFER:
+ case NATIVE_PARAM_MAX_SWAP_INTERVAL:
+ default:
+ val = 0;
+ break;
+ }
+
+ return val;
+}
+
+static boolean
+wayland_display_is_pixmap_supported(struct native_display *ndpy,
+ EGLNativePixmapType pix,
+ const struct native_config *nconf)
+{
+ /* all wl_egl_pixmaps are supported */
+
+ return TRUE;
+}
+
+static void
+wayland_display_destroy(struct native_display *ndpy)
+{
+ struct wayland_display *display = wayland_display(ndpy);
+
+ if (display->config)
+ FREE(display->config);
+
+ ndpy_uninit(ndpy);
+
+ FREE(display);
+}
+
+
+static struct wl_buffer *
+wayland_create_buffer(struct wayland_surface *surface,
+ enum native_attachment attachment)
+{
+ struct wayland_display *display = surface->display;
+ struct pipe_resource *resource;
+ struct winsys_handle wsh;
+ uint width, height;
+
+ resource = resource_surface_get_single_resource(surface->rsurf, attachment);
+ resource_surface_get_size(surface->rsurf, &width, &height);
+
+ wsh.type = DRM_API_HANDLE_TYPE_SHARED;
+ display->base.screen->resource_get_handle(display->base.screen, resource, &wsh);
+
+ pipe_resource_reference(&resource, NULL);
+
+ return wl_drm_create_buffer(display->dpy->drm, wsh.handle,
+ width, height,
+ wsh.stride, surface->win->visual);
+}
+
+static void
+wayland_pixmap_destroy(struct wl_egl_pixmap *egl_pixmap)
+{
+ struct pipe_resource *resource = egl_pixmap->driver_private;
+
+ assert(resource);
+
+ pipe_resource_reference(&resource, NULL);
+
+ egl_pixmap->driver_private = NULL;
+ egl_pixmap->destroy = NULL;
+ egl_pixmap->name = 0;
+}
+
+static void
+wayland_pixmap_surface_intialize(struct wayland_surface *surface)
+{
+ struct native_display *ndpy = &surface->display->base;
+ struct pipe_resource *resource;
+ struct winsys_handle wsh;
+ const enum native_attachment front_natt = NATIVE_ATTACHMENT_FRONT_LEFT;
+
+ if (surface->pix->name > 0)
+ return;
+
+ resource = resource_surface_get_single_resource(surface->rsurf, front_natt);
+
+ wsh.type = DRM_API_HANDLE_TYPE_SHARED;
+ ndpy->screen->resource_get_handle(ndpy->screen, resource, &wsh);
+
+ surface->pix->name = wsh.handle;
+ surface->pix->stride = wsh.stride;
+ surface->pix->destroy = wayland_pixmap_destroy;
+ surface->pix->driver_private = resource;
+}
+
+static void
+wayland_release_pending_resource(void *data)
+{
+ struct wayland_surface *surface = data;
+
+ /* FIXME: print internal error */
+ if (!surface->pending_resource)
+ return;
+
+ pipe_resource_reference(&surface->pending_resource, NULL);
+}
+
+static void
+wayland_window_surface_handle_resize(struct wayland_surface *surface)
+{
+ struct wayland_display *display = surface->display;
+ struct pipe_resource *front_resource;
+ const enum native_attachment front_natt = NATIVE_ATTACHMENT_FRONT_LEFT;
+ int i;
+
+ front_resource = resource_surface_get_single_resource(surface->rsurf,
+ front_natt);
+ if (resource_surface_set_size(surface->rsurf,
+ surface->win->width, surface->win->height)) {
+
+ if (surface->pending_resource)
+ force_roundtrip(display->dpy->display);
+
+ if (front_resource) {
+ surface->pending_resource = front_resource;
+ front_resource = NULL;
+ wl_display_sync_callback(display->dpy->display,
+ wayland_release_pending_resource, surface);
+ }
+
+ for (i = 0; i < WL_BUFFER_COUNT; ++i) {
+ if (surface->buffer[i])
+ wl_buffer_destroy(surface->buffer[i]);
+ surface->buffer[i] = NULL;
+ }
+ }
+ pipe_resource_reference(&front_resource, NULL);
+
+ surface->dx = surface->win->dx;
+ surface->dy = surface->win->dy;
+ surface->win->dx = 0;
+ surface->win->dy = 0;
+}
+
+static boolean
+wayland_surface_validate(struct native_surface *nsurf, uint attachment_mask,
+ unsigned int *seq_num, struct pipe_resource **textures,
+ int *width, int *height)
+{
+ struct wayland_surface *surface = wayland_surface(nsurf);
+
+ if (surface->type == WL_WINDOW_SURFACE)
+ wayland_window_surface_handle_resize(surface);
+
+ if (!resource_surface_add_resources(surface->rsurf, attachment_mask |
+ surface->attachment_mask))
+ return FALSE;
+
+ if (textures)
+ resource_surface_get_resources(surface->rsurf, textures, attachment_mask);
+
+ if (seq_num)
+ *seq_num = surface->sequence_number;
+
+ resource_surface_get_size(surface->rsurf, (uint *) width, (uint *) height);
+
+ if (surface->type == WL_PIXMAP_SURFACE)
+ wayland_pixmap_surface_intialize(surface);
+
+ return TRUE;
+}
+
+static void
+wayland_frame_callback(void *data, uint32_t time)
+{
+ struct wayland_surface *surface = data;
+
+ surface->block_swap_buffers = FALSE;
+}
+
+static INLINE void
+wayland_buffers_swap(struct wl_buffer **buffer,
+ enum wayland_buffer_type buf1,
+ enum wayland_buffer_type buf2)
+{
+ struct wl_buffer *tmp = buffer[buf1];
+ buffer[buf1] = buffer[buf2];
+ buffer[buf2] = tmp;
+}
+
+static boolean
+wayland_surface_swap_buffers(struct native_surface *nsurf)
+{
+ struct wayland_surface *surface = wayland_surface(nsurf);
+ struct wayland_display *display = surface->display;
+
+ while (surface->block_swap_buffers)
+ wl_display_iterate(display->dpy->display, WL_DISPLAY_READABLE);
+
+ surface->block_swap_buffers = TRUE;
+ wl_display_frame_callback(display->dpy->display, wayland_frame_callback,
+ surface);
+
+ if (surface->type == WL_WINDOW_SURFACE) {
+ resource_surface_swap_buffers(surface->rsurf,
+ NATIVE_ATTACHMENT_FRONT_LEFT, NATIVE_ATTACHMENT_BACK_LEFT, FALSE);
+
+ wayland_buffers_swap(surface->buffer, WL_BUFFER_FRONT, WL_BUFFER_BACK);
+
+ if (surface->buffer[WL_BUFFER_FRONT] == NULL)
+ surface->buffer[WL_BUFFER_FRONT] =
+ wayland_create_buffer(surface, NATIVE_ATTACHMENT_FRONT_LEFT);
+
+ wl_surface_attach(surface->win->surface, surface->buffer[WL_BUFFER_FRONT],
+ surface->dx, surface->dy);
+
+ resource_surface_get_size(surface->rsurf,
+ (uint *) &surface->win->attached_width,
+ (uint *) &surface->win->attached_height);
+ surface->dx = 0;
+ surface->dy = 0;
+ }
+
+ surface->sequence_number++;
+ wayland_event_handler->invalid_surface(&display->base,
+ &surface->base, surface->sequence_number);
+
+ return TRUE;
+}
+
+static boolean
+wayland_surface_present(struct native_surface *nsurf,
+ enum native_attachment natt,
+ boolean preserve,
+ uint swap_interval)
+{
+ struct wayland_surface *surface = wayland_surface(nsurf);
+ uint width, height;
+ boolean ret;
+
+ if (preserve || swap_interval)
+ return FALSE;
+
+ switch (natt) {
+ case NATIVE_ATTACHMENT_FRONT_LEFT:
+ ret = TRUE;
+ break;
+ case NATIVE_ATTACHMENT_BACK_LEFT:
+ ret = wayland_surface_swap_buffers(nsurf);
+ break;
+ default:
+ ret = FALSE;
+ break;
+ }
+
+ if (surface->type == WL_WINDOW_SURFACE) {
+ resource_surface_get_size(surface->rsurf, &width, &height);
+ wl_surface_damage(surface->win->surface, 0, 0, width, height);
+ }
+
+ return ret;
+}
+
+static void
+wayland_surface_wait(struct native_surface *nsurf)
+{
+ /* no-op */
+}
+
+static void
+wayland_surface_destroy(struct native_surface *nsurf)
+{
+ struct wayland_surface *surface = wayland_surface(nsurf);
+ enum wayland_buffer_type buffer;
+
+ for (buffer = 0; buffer < WL_BUFFER_COUNT; ++buffer) {
+ if (surface->buffer[buffer])
+ wl_buffer_destroy(surface->buffer[buffer]);
+ }
+
+ resource_surface_destroy(surface->rsurf);
+ FREE(surface);
+}
+
+static struct native_surface *
+wayland_create_pixmap_surface(struct native_display *ndpy,
+ EGLNativePixmapType pix,
+ const struct native_config *nconf)
+{
+ struct wayland_display *display = wayland_display(ndpy);
+ struct wayland_config *config = wayland_config(nconf);
+ struct wayland_surface *surface;
+ struct wl_egl_pixmap *egl_pixmap = (struct wl_egl_pixmap *) pix;
+ enum native_attachment natt = NATIVE_ATTACHMENT_FRONT_LEFT;
+
+ surface = CALLOC_STRUCT(wayland_surface);
+ if (!surface)
+ return NULL;
+
+ surface->display = display;
+
+ surface->pending_resource = NULL;
+ surface->type = WL_PIXMAP_SURFACE;
+ surface->pix = egl_pixmap;
+
+ if (surface->pix->visual == wl_display_get_rgb_visual(display->dpy->display))
+ surface->color_format = PIPE_FORMAT_B8G8R8X8_UNORM;
+ else
+ surface->color_format = PIPE_FORMAT_B8G8R8A8_UNORM;
+
+ surface->attachment_mask = (1 << NATIVE_ATTACHMENT_FRONT_LEFT);
+
+ surface->rsurf = resource_surface_create(display->base.screen,
+ surface->color_format,
+ PIPE_BIND_RENDER_TARGET | PIPE_BIND_SAMPLER_VIEW |
+ PIPE_BIND_DISPLAY_TARGET | PIPE_BIND_SCANOUT);
+
+ if (!surface->rsurf) {
+ FREE(surface);
+ return NULL;
+ }
+
+ resource_surface_set_size(surface->rsurf,
+ egl_pixmap->width, egl_pixmap->height);
+
+ /* the pixmap is already allocated, so import it */
+ if (surface->pix->name > 0)
+ resource_surface_import_resource(surface->rsurf, natt,
+ surface->pix->driver_private);
+
+ surface->base.destroy = wayland_surface_destroy;
+ surface->base.present = wayland_surface_present;
+ surface->base.validate = wayland_surface_validate;
+ surface->base.wait = wayland_surface_wait;
+
+ return &surface->base;
+}
+
+static struct native_surface *
+wayland_create_window_surface(struct native_display *ndpy,
+ EGLNativeWindowType win,
+ const struct native_config *nconf)
+{
+ struct wayland_display *display = wayland_display(ndpy);
+ struct wayland_config *config = wayland_config(nconf);
+ struct wayland_surface *surface;
+
+ surface = CALLOC_STRUCT(wayland_surface);
+ if (!surface)
+ return NULL;
+
+ surface->display = display;
+ surface->color_format = config->base.color_format;
+
+ surface->win = (struct wl_egl_window *) win;
+
+ surface->pending_resource = NULL;
+ surface->block_swap_buffers = FALSE;
+ surface->type = WL_WINDOW_SURFACE;
+
+ surface->buffer[WL_BUFFER_FRONT] = NULL;
+ surface->buffer[WL_BUFFER_BACK] = NULL;
+ surface->attachment_mask = (1 << NATIVE_ATTACHMENT_FRONT_LEFT) |
+ (1 << NATIVE_ATTACHMENT_BACK_LEFT);
+
+ surface->rsurf = resource_surface_create(display->base.screen,
+ surface->color_format,
+ PIPE_BIND_RENDER_TARGET | PIPE_BIND_SAMPLER_VIEW |
+ PIPE_BIND_DISPLAY_TARGET | PIPE_BIND_SCANOUT);
+
+ if (!surface->rsurf) {
+ FREE(surface);
+ return NULL;
+ }
+
+ surface->base.destroy = wayland_surface_destroy;
+ surface->base.present = wayland_surface_present;
+ surface->base.validate = wayland_surface_validate;
+ surface->base.wait = wayland_surface_wait;
+
+ return &surface->base;
+}
+
+static const char *
+get_drm_screen_name(int fd, drmVersionPtr version)
+{
+ const char *name = version->name;
+
+ if (name && !strcmp(name, "radeon")) {
+ int chip_id;
+ struct drm_radeon_info info;
+
+ memset(&info, 0, sizeof(info));
+ info.request = RADEON_INFO_DEVICE_ID;
+ info.value = pointer_to_intptr(&chip_id);
+ if (drmCommandWriteRead(fd, DRM_RADEON_INFO, &info, sizeof(info)) != 0)
+ return NULL;
+
+ name = is_r3xx(chip_id) ? "r300" : "r600";
+ }
+
+ return name;
+}
+
+static boolean
+wayland_display_init_screen(struct native_display *ndpy)
+{
+ struct wayland_display *display = wayland_display(ndpy);
+ drmVersionPtr version;
+ const char *driver_name;
+
+ if (display->dpy->fd == -1)
+ force_roundtrip(display->dpy->display);
+ if (display->dpy->fd == -1)
+ return FALSE;
+
+ if (!display->dpy->authenticated)
+ force_roundtrip(display->dpy->display);
+ if (!display->dpy->authenticated)
+ return FALSE;
+
+ version = drmGetVersion(display->dpy->fd);
+ if (!version) {
+ _eglLog(_EGL_WARNING, "invalid fd %d", display->dpy->fd);
+ return FALSE;
+ }
+
+ /* FIXME: share this with native_drm or egl_dri2 */
+ driver_name = get_drm_screen_name(display->dpy->fd, version);
+
+ display->base.screen =
+ wayland_event_handler->new_drm_screen(&display->base,
+ driver_name, display->dpy->fd);
+ drmFreeVersion(version);
+
+ if (!display->base.screen) {
+ _eglLog(_EGL_WARNING, "failed to create DRM screen");
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
+
+static void
+wayland_set_event_handler(struct native_event_handler *event_handler)
+{
+ wayland_event_handler = event_handler;
+}
+
+static struct pipe_resource *
+wayland_display_import_buffer(struct native_display *ndpy,
+ const struct pipe_resource *templ,
+ void *buf)
+{
+ return ndpy->screen->resource_from_handle(ndpy->screen,
+ templ, (struct winsys_handle *) buf);
+}
+
+static boolean
+wayland_display_export_buffer(struct native_display *ndpy,
+ struct pipe_resource *res,
+ void *buf)
+{
+ return ndpy->screen->resource_get_handle(ndpy->screen,
+ res, (struct winsys_handle *) buf);
+}
+
+static struct native_display_buffer wayland_display_buffer = {
+ wayland_display_import_buffer,
+ wayland_display_export_buffer
+};
+
+static struct native_display *
+wayland_display_create(void *dpy, boolean use_sw, void *user_data)
+{
+ struct wayland_display *display;
+
+ display = CALLOC_STRUCT(wayland_display);
+ if (!display)
+ return NULL;
+
+ display->base.user_data = user_data;
+
+ display->dpy = dpy;
+ if (!display->dpy->display) {
+ wayland_display_destroy(&display->base);
+ return NULL;
+ }
+
+ if (!wayland_display_init_screen(&display->base)) {
+ wayland_display_destroy(&display->base);
+ return NULL;
+ }
+
+ display->base.destroy = wayland_display_destroy;
+ display->base.get_param = wayland_display_get_param;
+ display->base.get_configs = wayland_display_get_configs;
+ display->base.is_pixmap_supported = wayland_display_is_pixmap_supported;
+ display->base.create_window_surface = wayland_create_window_surface;
+ display->base.create_pixmap_surface = wayland_create_pixmap_surface;
+ display->base.buffer = &wayland_display_buffer;
+
+ return &display->base;
+}
+
+static const struct native_platform wayland_platform = {
+ "wayland", /* name */
+ wayland_set_event_handler,
+ wayland_display_create
+};
+
+const struct native_platform *
+native_get_wayland_platform(void)
+{
+ return &wayland_platform;
+}
diff --git a/src/gallium/state_trackers/egl/wayland/native_wayland.h b/src/gallium/state_trackers/egl/wayland/native_wayland.h
new file mode 100644
index 00000000000..271c10dc113
--- /dev/null
+++ b/src/gallium/state_trackers/egl/wayland/native_wayland.h
@@ -0,0 +1,97 @@
+/*
+ * Mesa 3-D graphics library
+ * Version: 7.11
+ *
+ * Copyright (C) 2011 Benjamin Franzke <benjaminfranzke@googlemail.com>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * 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 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 _NATIVE_WAYLAND_H_
+#define _NATIVE_WAYLAND_H_
+
+#include "pipe/p_compiler.h"
+#include "pipe/p_format.h"
+
+#include "common/native.h"
+#include "common/native_helper.h"
+
+#include "wayland-egl-priv.h"
+
+struct wayland_display {
+ struct native_display base;
+
+ struct wayland_config *config;
+ struct wl_egl_display *dpy;
+};
+
+enum wayland_buffer_type {
+ WL_BUFFER_FRONT,
+ WL_BUFFER_BACK,
+ WL_BUFFER_COUNT
+};
+
+enum wayland_surface_type {
+ WL_WINDOW_SURFACE,
+ WL_PIXMAP_SURFACE,
+ WL_PBUFFER_SURFACE
+};
+
+struct wayland_surface {
+ struct native_surface base;
+ struct wayland_display *display;
+
+ struct wl_egl_window *win;
+ struct wl_egl_pixmap *pix;
+ enum wayland_surface_type type;
+ int dx, dy;
+ struct resource_surface *rsurf;
+ struct pipe_resource *pending_resource;
+ enum pipe_format color_format;
+
+ unsigned int sequence_number;
+ struct wl_buffer *buffer[WL_BUFFER_COUNT];
+ unsigned int attachment_mask;
+
+ boolean block_swap_buffers;
+};
+
+struct wayland_config {
+ struct native_config base;
+};
+
+static INLINE struct wayland_display *
+wayland_display(const struct native_display *ndpy)
+{
+ return (struct wayland_display *) ndpy;
+}
+
+static INLINE struct wayland_surface *
+wayland_surface(const struct native_surface *nsurf)
+{
+ return (struct wayland_surface *) nsurf;
+}
+
+static INLINE struct wayland_config *
+wayland_config(const struct native_config *nconf)
+{
+ return (struct wayland_config *) nconf;
+}
+
+#endif /* _NATIVE_WAYLAND_H_ */
diff --git a/src/gallium/state_trackers/egl/x11/native_dri2.c b/src/gallium/state_trackers/egl/x11/native_dri2.c
index 8108ce45865..5afca67a4d4 100644
--- a/src/gallium/state_trackers/egl/x11/native_dri2.c
+++ b/src/gallium/state_trackers/egl/x11/native_dri2.c
@@ -40,11 +40,6 @@
#ifdef GLX_DIRECT_RENDERING
-enum dri2_surface_type {
- DRI2_SURFACE_TYPE_WINDOW,
- DRI2_SURFACE_TYPE_PIXMAP,
-};
-
struct dri2_display {
struct native_display base;
Display *dpy;
@@ -66,7 +61,6 @@ struct dri2_display {
struct dri2_surface {
struct native_surface base;
Drawable drawable;
- enum dri2_surface_type type;
enum pipe_format color_format;
struct dri2_display *dri2dpy;
@@ -439,12 +433,10 @@ dri2_surface_destroy(struct native_surface *nsurf)
static struct dri2_surface *
dri2_display_create_surface(struct native_display *ndpy,
- enum dri2_surface_type type,
Drawable drawable,
- const struct native_config *nconf)
+ enum pipe_format color_format)
{
struct dri2_display *dri2dpy = dri2_display(ndpy);
- struct dri2_config *dri2conf = dri2_config(nconf);
struct dri2_surface *dri2surf;
dri2surf = CALLOC_STRUCT(dri2_surface);
@@ -452,9 +444,8 @@ dri2_display_create_surface(struct native_display *ndpy,
return NULL;
dri2surf->dri2dpy = dri2dpy;
- dri2surf->type = type;
dri2surf->drawable = drawable;
- dri2surf->color_format = dri2conf->base.color_format;
+ dri2surf->color_format = color_format;
dri2surf->base.destroy = dri2_surface_destroy;
dri2surf->base.present = dri2_surface_present;
@@ -480,8 +471,8 @@ dri2_display_create_window_surface(struct native_display *ndpy,
{
struct dri2_surface *dri2surf;
- dri2surf = dri2_display_create_surface(ndpy, DRI2_SURFACE_TYPE_WINDOW,
- (Drawable) win, nconf);
+ dri2surf = dri2_display_create_surface(ndpy,
+ (Drawable) win, nconf->color_format);
return (dri2surf) ? &dri2surf->base : NULL;
}
@@ -492,8 +483,29 @@ dri2_display_create_pixmap_surface(struct native_display *ndpy,
{
struct dri2_surface *dri2surf;
- dri2surf = dri2_display_create_surface(ndpy, DRI2_SURFACE_TYPE_PIXMAP,
- (Drawable) pix, nconf);
+ if (!nconf) {
+ struct dri2_display *dri2dpy = dri2_display(ndpy);
+ uint depth, nconf_depth;
+ int i;
+
+ depth = x11_drawable_get_depth(dri2dpy->xscr, (Drawable) pix);
+ for (i = 0; i < dri2dpy->num_configs; i++) {
+ nconf_depth = util_format_get_blocksizebits(
+ dri2dpy->configs[i].base.color_format);
+ /* simple depth match for now */
+ if (depth == nconf_depth ||
+ (depth == 24 && depth + 8 == nconf_depth)) {
+ nconf = &dri2dpy->configs[i].base;
+ break;
+ }
+ }
+
+ if (!nconf)
+ return NULL;
+ }
+
+ dri2surf = dri2_display_create_surface(ndpy,
+ (Drawable) pix, nconf->color_format);
return (dri2surf) ? &dri2surf->base : NULL;
}
@@ -529,7 +541,7 @@ is_format_supported(struct pipe_screen *screen,
{
return screen->is_format_supported(screen, fmt, PIPE_TEXTURE_2D, sample_count,
(is_color) ? PIPE_BIND_RENDER_TARGET :
- PIPE_BIND_DEPTH_STENCIL, 0);
+ PIPE_BIND_DEPTH_STENCIL);
}
static boolean
@@ -548,6 +560,10 @@ dri2_display_convert_config(struct native_display *ndpy,
if (!mode->xRenderable || !mode->drawableType)
return FALSE;
+ /* fast/slow configs are probably not relevant */
+ if (mode->visualRating == GLX_SLOW_CONFIG)
+ return FALSE;
+
nconf->buffer_mask = 1 << NATIVE_ATTACHMENT_FRONT_LEFT;
if (mode->doubleBufferMode)
nconf->buffer_mask |= 1 << NATIVE_ATTACHMENT_BACK_LEFT;
@@ -568,17 +584,33 @@ dri2_display_convert_config(struct native_display *ndpy,
if (nconf->color_format == PIPE_FORMAT_NONE)
return FALSE;
- if (mode->drawableType & GLX_WINDOW_BIT)
+ if ((mode->drawableType & GLX_WINDOW_BIT) && mode->visualID)
nconf->window_bit = TRUE;
if (mode->drawableType & GLX_PIXMAP_BIT)
nconf->pixmap_bit = TRUE;
nconf->native_visual_id = mode->visualID;
- nconf->native_visual_type = mode->visualType;
+ switch (mode->visualType) {
+ case GLX_TRUE_COLOR:
+ nconf->native_visual_type = TrueColor;
+ break;
+ case GLX_DIRECT_COLOR:
+ nconf->native_visual_type = DirectColor;
+ break;
+ case GLX_PSEUDO_COLOR:
+ nconf->native_visual_type = PseudoColor;
+ break;
+ case GLX_STATIC_COLOR:
+ nconf->native_visual_type = StaticColor;
+ break;
+ case GLX_GRAY_SCALE:
+ nconf->native_visual_type = GrayScale;
+ break;
+ case GLX_STATIC_GRAY:
+ nconf->native_visual_type = StaticGray;
+ break;
+ }
nconf->level = mode->level;
- nconf->samples = mode->samples;
-
- nconf->slow_config = (mode->visualRating == GLX_SLOW_CONFIG);
if (mode->transparentPixel == GLX_TRANSPARENT_RGB) {
nconf->transparent_rgb = TRUE;
@@ -614,8 +646,17 @@ dri2_display_get_configs(struct native_display *ndpy, int *num_configs)
count = 0;
for (i = 0; i < num_modes; i++) {
struct native_config *nconf = &dri2dpy->configs[count].base;
- if (dri2_display_convert_config(&dri2dpy->base, modes, nconf))
- count++;
+
+ if (dri2_display_convert_config(&dri2dpy->base, modes, nconf)) {
+ int j;
+ /* look for duplicates */
+ for (j = 0; j < count; j++) {
+ if (memcmp(&dri2dpy->configs[j], nconf, sizeof(*nconf)) == 0)
+ break;
+ }
+ if (j == count)
+ count++;
+ }
modes = modes->next;
}
@@ -741,7 +782,7 @@ dri2_display_init_screen(struct native_display *ndpy)
dri2dpy->event_handler->new_drm_screen(&dri2dpy->base,
dri2dpy->dri_driver, fd);
if (!dri2dpy->base.screen) {
- _eglLog(_EGL_WARNING, "failed to create DRM screen");
+ _eglLog(_EGL_DEBUG, "failed to create DRM screen");
return FALSE;
}
@@ -758,7 +799,7 @@ dri2_display_hash_table_hash(void *key)
static int
dri2_display_hash_table_compare(void *key1, void *key2)
{
- return (key1 - key2);
+ return ((char *) key1 - (char *) key2);
}
struct native_display *
diff --git a/src/gallium/state_trackers/egl/x11/native_x11.c b/src/gallium/state_trackers/egl/x11/native_x11.c
index 37c8b01541f..a0bcad4c734 100644
--- a/src/gallium/state_trackers/egl/x11/native_x11.c
+++ b/src/gallium/state_trackers/egl/x11/native_x11.c
@@ -30,25 +30,30 @@
#include "native_x11.h"
+static struct native_event_handler *x11_event_handler;
+
+static void
+native_set_event_handler(struct native_event_handler *event_handler)
+{
+ x11_event_handler = event_handler;
+}
+
static struct native_display *
-native_create_display(void *dpy, struct native_event_handler *event_handler,
- void *user_data)
+native_create_display(void *dpy, boolean use_sw, void *user_data)
{
struct native_display *ndpy = NULL;
boolean force_sw;
force_sw = debug_get_bool_option("EGL_SOFTWARE", FALSE);
- if (!force_sw) {
- ndpy = x11_create_dri2_display((Display *) dpy,
- event_handler, user_data);
- }
-
- if (!ndpy) {
- EGLint level = (force_sw) ? _EGL_INFO : _EGL_WARNING;
- _eglLog(level, "use software fallback");
+ if (force_sw || use_sw) {
+ _eglLog(_EGL_INFO, "use software fallback");
ndpy = x11_create_ximage_display((Display *) dpy,
- event_handler, user_data);
+ x11_event_handler, user_data);
+ }
+ else {
+ ndpy = x11_create_dri2_display((Display *) dpy,
+ x11_event_handler, user_data);
}
return ndpy;
@@ -56,6 +61,7 @@ native_create_display(void *dpy, struct native_event_handler *event_handler,
static const struct native_platform x11_platform = {
"X11", /* name */
+ native_set_event_handler,
native_create_display
};
diff --git a/src/gallium/state_trackers/egl/x11/native_ximage.c b/src/gallium/state_trackers/egl/x11/native_ximage.c
index 84811fb6e14..8e32c6ff0c4 100644
--- a/src/gallium/state_trackers/egl/x11/native_ximage.c
+++ b/src/gallium/state_trackers/egl/x11/native_ximage.c
@@ -38,11 +38,6 @@
#include "native_x11.h"
#include "x11_screen.h"
-enum ximage_surface_type {
- XIMAGE_SURFACE_TYPE_WINDOW,
- XIMAGE_SURFACE_TYPE_PIXMAP,
-};
-
struct ximage_display {
struct native_display base;
Display *dpy;
@@ -60,7 +55,6 @@ struct ximage_display {
struct ximage_surface {
struct native_surface base;
Drawable drawable;
- enum ximage_surface_type type;
enum pipe_format color_format;
XVisualInfo visual;
struct ximage_display *xdpy;
@@ -245,7 +239,6 @@ ximage_surface_destroy(struct native_surface *nsurf)
static struct ximage_surface *
ximage_display_create_surface(struct native_display *ndpy,
- enum ximage_surface_type type,
Drawable drawable,
const struct native_config *nconf)
{
@@ -258,7 +251,6 @@ ximage_display_create_surface(struct native_display *ndpy,
return NULL;
xsurf->xdpy = xdpy;
- xsurf->type = type;
xsurf->color_format = xconf->base.color_format;
xsurf->drawable = drawable;
@@ -297,11 +289,37 @@ ximage_display_create_window_surface(struct native_display *ndpy,
{
struct ximage_surface *xsurf;
- xsurf = ximage_display_create_surface(ndpy, XIMAGE_SURFACE_TYPE_WINDOW,
- (Drawable) win, nconf);
+ xsurf = ximage_display_create_surface(ndpy, (Drawable) win, nconf);
return (xsurf) ? &xsurf->base : NULL;
}
+static enum pipe_format
+get_pixmap_format(struct native_display *ndpy, EGLNativePixmapType pix)
+{
+ struct ximage_display *xdpy = ximage_display(ndpy);
+ enum pipe_format fmt;
+ uint depth;
+
+ depth = x11_drawable_get_depth(xdpy->xscr, (Drawable) pix);
+
+ switch (depth) {
+ case 32:
+ fmt = PIPE_FORMAT_B8G8R8A8_UNORM;
+ break;
+ case 24:
+ fmt = PIPE_FORMAT_B8G8R8X8_UNORM;
+ break;
+ case 16:
+ fmt = PIPE_FORMAT_B5G6R5_UNORM;
+ break;
+ default:
+ fmt = PIPE_FORMAT_NONE;
+ break;
+ }
+
+ return fmt;
+}
+
static struct native_surface *
ximage_display_create_pixmap_surface(struct native_display *ndpy,
EGLNativePixmapType pix,
@@ -309,8 +327,26 @@ ximage_display_create_pixmap_surface(struct native_display *ndpy,
{
struct ximage_surface *xsurf;
- xsurf = ximage_display_create_surface(ndpy, XIMAGE_SURFACE_TYPE_PIXMAP,
- (Drawable) pix, nconf);
+ /* find the config */
+ if (!nconf) {
+ struct ximage_display *xdpy = ximage_display(ndpy);
+ enum pipe_format fmt = get_pixmap_format(&xdpy->base, pix);
+ int i;
+
+ if (fmt != PIPE_FORMAT_NONE) {
+ for (i = 0; i < xdpy->num_configs; i++) {
+ if (xdpy->configs[i].base.color_format == fmt) {
+ nconf = &xdpy->configs[i].base;
+ break;
+ }
+ }
+ }
+
+ if (!nconf)
+ return NULL;
+ }
+
+ xsurf = ximage_display_create_surface(ndpy, (Drawable) pix, nconf);
return (xsurf) ? &xsurf->base : NULL;
}
@@ -384,8 +420,6 @@ ximage_display_get_configs(struct native_display *ndpy, int *num_configs)
xconf->base.native_visual_type = xconf->visual->class;
#endif
- xconf->base.slow_config = TRUE;
-
count++;
}
@@ -408,24 +442,7 @@ ximage_display_is_pixmap_supported(struct native_display *ndpy,
const struct native_config *nconf)
{
struct ximage_display *xdpy = ximage_display(ndpy);
- enum pipe_format fmt;
- uint depth;
-
- depth = x11_drawable_get_depth(xdpy->xscr, (Drawable) pix);
- switch (depth) {
- case 32:
- fmt = PIPE_FORMAT_B8G8R8A8_UNORM;
- break;
- case 24:
- fmt = PIPE_FORMAT_B8G8R8X8_UNORM;
- break;
- case 16:
- fmt = PIPE_FORMAT_B5G6R5_UNORM;
- break;
- default:
- fmt = PIPE_FORMAT_NONE;
- break;
- }
+ enum pipe_format fmt = get_pixmap_format(&xdpy->base, pix);
return (fmt == nconf->color_format);
}
@@ -459,7 +476,7 @@ ximage_display_destroy(struct native_display *ndpy)
if (xdpy->configs)
FREE(xdpy->configs);
- xdpy->base.screen->destroy(xdpy->base.screen);
+ ndpy_uninit(ndpy);
x11_screen_destroy(xdpy->xscr);
if (xdpy->own_dpy)
diff --git a/src/gallium/state_trackers/glx/xlib/glx_api.c b/src/gallium/state_trackers/glx/xlib/glx_api.c
index 205a7e3c19a..351267bae4d 100644
--- a/src/gallium/state_trackers/glx/xlib/glx_api.c
+++ b/src/gallium/state_trackers/glx/xlib/glx_api.c
@@ -1367,8 +1367,8 @@ glXSwapBuffers( Display *dpy, GLXDrawable drawable )
/*** GLX_MESA_copy_sub_buffer ***/
PUBLIC void
-glXCopySubBufferMESA( Display *dpy, GLXDrawable drawable,
- int x, int y, int width, int height )
+glXCopySubBufferMESA(Display *dpy, GLXDrawable drawable,
+ int x, int y, int width, int height)
{
XMesaBuffer buffer = XMesaFindBuffer( dpy, drawable );
if (buffer) {
@@ -1718,8 +1718,8 @@ glXGetClientString( Display *dpy, int name )
PUBLIC int
-glXGetFBConfigAttrib( Display *dpy, GLXFBConfig config,
- int attribute, int *value )
+glXGetFBConfigAttrib(Display *dpy, GLXFBConfig config,
+ int attribute, int *value)
{
XMesaVisual v = (XMesaVisual) config;
(void) dpy;
@@ -1763,8 +1763,8 @@ glXGetFBConfigs( Display *dpy, int screen, int *nelements )
PUBLIC GLXFBConfig *
-glXChooseFBConfig( Display *dpy, int screen,
- const int *attribList, int *nitems )
+glXChooseFBConfig(Display *dpy, int screen,
+ const int *attribList, int *nitems)
{
XMesaVisual xmvis;
@@ -1814,8 +1814,8 @@ glXGetVisualFromFBConfig( Display *dpy, GLXFBConfig config )
PUBLIC GLXWindow
-glXCreateWindow( Display *dpy, GLXFBConfig config, Window win,
- const int *attribList )
+glXCreateWindow(Display *dpy, GLXFBConfig config, Window win,
+ const int *attribList)
{
XMesaVisual xmvis = (XMesaVisual) config;
XMesaBuffer xmbuf;
@@ -1845,8 +1845,8 @@ glXDestroyWindow( Display *dpy, GLXWindow window )
/* XXX untested */
PUBLIC GLXPixmap
-glXCreatePixmap( Display *dpy, GLXFBConfig config, Pixmap pixmap,
- const int *attribList )
+glXCreatePixmap(Display *dpy, GLXFBConfig config, Pixmap pixmap,
+ const int *attribList)
{
XMesaVisual v = (XMesaVisual) config;
XMesaBuffer b;
@@ -1965,8 +1965,7 @@ glXDestroyPixmap( Display *dpy, GLXPixmap pixmap )
PUBLIC GLXPbuffer
-glXCreatePbuffer( Display *dpy, GLXFBConfig config,
- const int *attribList )
+glXCreatePbuffer(Display *dpy, GLXFBConfig config, const int *attribList)
{
XMesaVisual xmvis = (XMesaVisual) config;
XMesaBuffer xmbuf;
@@ -2038,8 +2037,8 @@ glXDestroyPbuffer( Display *dpy, GLXPbuffer pbuf )
PUBLIC void
-glXQueryDrawable( Display *dpy, GLXDrawable draw, int attribute,
- unsigned int *value )
+glXQueryDrawable(Display *dpy, GLXDrawable draw, int attribute,
+ unsigned int *value)
{
GLuint width, height;
XMesaBuffer xmbuf = XMesaFindBuffer(dpy, draw);
@@ -2085,7 +2084,7 @@ glXQueryDrawable( Display *dpy, GLXDrawable draw, int attribute,
PUBLIC GLXContext
glXCreateNewContext( Display *dpy, GLXFBConfig config,
- int renderType, GLXContext shareList, Bool direct )
+ int renderType, GLXContext shareList, Bool direct )
{
GLXContext glxCtx;
GLXContext shareCtx = shareList;
@@ -2156,8 +2155,7 @@ glXSelectEvent( Display *dpy, GLXDrawable drawable, unsigned long mask )
PUBLIC void
-glXGetSelectedEvent( Display *dpy, GLXDrawable drawable,
- unsigned long *mask )
+glXGetSelectedEvent(Display *dpy, GLXDrawable drawable, unsigned long *mask)
{
XMesaBuffer xmbuf = XMesaFindBuffer(dpy, drawable);
if (xmbuf)
@@ -2209,7 +2207,8 @@ glXWaitVideoSyncSGI(int divisor, int remainder, unsigned int *count)
/*** GLX_SGI_make_current_read ***/
PUBLIC Bool
-glXMakeCurrentReadSGI(Display *dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx)
+glXMakeCurrentReadSGI(Display *dpy, GLXDrawable draw, GLXDrawable read,
+ GLXContext ctx)
{
return glXMakeContextCurrent( dpy, draw, read, ctx );
}
@@ -2227,7 +2226,8 @@ glXGetCurrentReadDrawableSGI(void)
#if defined(_VL_H)
PUBLIC GLXVideoSourceSGIX
-glXCreateGLXVideoSourceSGIX(Display *dpy, int screen, VLServer server, VLPath path, int nodeClass, VLNode drainNode)
+glXCreateGLXVideoSourceSGIX(Display *dpy, int screen, VLServer server,
+ VLPath path, int nodeClass, VLNode drainNode)
{
(void) dpy;
(void) screen;
@@ -2273,7 +2273,8 @@ glXImportContextEXT(Display *dpy, GLXContextID contextID)
}
PUBLIC int
-glXQueryContextInfoEXT(Display *dpy, GLXContext context, int attribute, int *value)
+glXQueryContextInfoEXT(Display *dpy, GLXContext context, int attribute,
+ int *value)
{
(void) dpy;
(void) context;
@@ -2287,20 +2288,24 @@ glXQueryContextInfoEXT(Display *dpy, GLXContext context, int attribute, int *val
/*** GLX_SGIX_fbconfig ***/
PUBLIC int
-glXGetFBConfigAttribSGIX(Display *dpy, GLXFBConfigSGIX config, int attribute, int *value)
+glXGetFBConfigAttribSGIX(Display *dpy, GLXFBConfigSGIX config,
+ int attribute, int *value)
{
return glXGetFBConfigAttrib(dpy, config, attribute, value);
}
PUBLIC GLXFBConfigSGIX *
-glXChooseFBConfigSGIX(Display *dpy, int screen, int *attrib_list, int *nelements)
+glXChooseFBConfigSGIX(Display *dpy, int screen, int *attrib_list,
+ int *nelements)
{
- return (GLXFBConfig *) glXChooseFBConfig(dpy, screen, attrib_list, nelements);
+ return (GLXFBConfig *) glXChooseFBConfig(dpy, screen,
+ attrib_list, nelements);
}
PUBLIC GLXPixmap
-glXCreateGLXPixmapWithConfigSGIX(Display *dpy, GLXFBConfigSGIX config, Pixmap pixmap)
+glXCreateGLXPixmapWithConfigSGIX(Display *dpy, GLXFBConfigSGIX config,
+ Pixmap pixmap)
{
XMesaVisual xmvis = (XMesaVisual) config;
XMesaBuffer xmbuf = XMesaCreatePixmapBuffer(xmvis, pixmap, 0);
@@ -2309,7 +2314,9 @@ glXCreateGLXPixmapWithConfigSGIX(Display *dpy, GLXFBConfigSGIX config, Pixmap pi
PUBLIC GLXContext
-glXCreateContextWithConfigSGIX(Display *dpy, GLXFBConfigSGIX config, int render_type, GLXContext share_list, Bool direct)
+glXCreateContextWithConfigSGIX(Display *dpy, GLXFBConfigSGIX config,
+ int render_type, GLXContext share_list,
+ Bool direct)
{
XMesaVisual xmvis = (XMesaVisual) config;
GLXContext glxCtx;
@@ -2362,8 +2369,8 @@ glXGetFBConfigFromVisualSGIX(Display *dpy, XVisualInfo *vis)
PUBLIC GLXPbufferSGIX
glXCreateGLXPbufferSGIX(Display *dpy, GLXFBConfigSGIX config,
- unsigned int width, unsigned int height,
- int *attribList)
+ unsigned int width, unsigned int height,
+ int *attribList)
{
XMesaVisual xmvis = (XMesaVisual) config;
XMesaBuffer xmbuf;
@@ -2410,7 +2417,8 @@ glXDestroyGLXPbufferSGIX(Display *dpy, GLXPbufferSGIX pbuf)
PUBLIC int
-glXQueryGLXPbufferSGIX(Display *dpy, GLXPbufferSGIX pbuf, int attribute, unsigned int *value)
+glXQueryGLXPbufferSGIX(Display *dpy, GLXPbufferSGIX pbuf, int attribute,
+ unsigned int *value)
{
const XMesaBuffer xmbuf = XMesaFindBuffer(dpy, pbuf);
@@ -2454,7 +2462,8 @@ glXSelectEventSGIX(Display *dpy, GLXDrawable drawable, unsigned long mask)
PUBLIC void
-glXGetSelectedEventSGIX(Display *dpy, GLXDrawable drawable, unsigned long *mask)
+glXGetSelectedEventSGIX(Display *dpy, GLXDrawable drawable,
+ unsigned long *mask)
{
XMesaBuffer xmbuf = XMesaFindBuffer(dpy, drawable);
if (xmbuf) {
@@ -2482,7 +2491,8 @@ glXCushionSGI(Display *dpy, Window win, float cushion)
/*** GLX_SGIX_video_resize ***/
PUBLIC int
-glXBindChannelToWindowSGIX(Display *dpy, int screen, int channel , Window window)
+glXBindChannelToWindowSGIX(Display *dpy, int screen, int channel,
+ Window window)
{
(void) dpy;
(void) screen;
@@ -2492,7 +2502,8 @@ glXBindChannelToWindowSGIX(Display *dpy, int screen, int channel , Window window
}
PUBLIC int
-glXChannelRectSGIX(Display *dpy, int screen, int channel, int x, int y, int w, int h)
+glXChannelRectSGIX(Display *dpy, int screen, int channel,
+ int x, int y, int w, int h)
{
(void) dpy;
(void) screen;
@@ -2505,7 +2516,8 @@ glXChannelRectSGIX(Display *dpy, int screen, int channel, int x, int y, int w, i
}
PUBLIC int
-glXQueryChannelRectSGIX(Display *dpy, int screen, int channel, int *x, int *y, int *w, int *h)
+glXQueryChannelRectSGIX(Display *dpy, int screen, int channel,
+ int *x, int *y, int *w, int *h)
{
(void) dpy;
(void) screen;
@@ -2518,7 +2530,8 @@ glXQueryChannelRectSGIX(Display *dpy, int screen, int channel, int *x, int *y, i
}
PUBLIC int
-glXQueryChannelDeltasSGIX(Display *dpy, int screen, int channel, int *dx, int *dy, int *dw, int *dh)
+glXQueryChannelDeltasSGIX(Display *dpy, int screen, int channel,
+ int *dx, int *dy, int *dw, int *dh)
{
(void) dpy;
(void) screen;
@@ -2546,7 +2559,8 @@ glXChannelRectSyncSGIX(Display *dpy, int screen, int channel, GLenum synctype)
#if defined(_DM_BUFFER_H_)
PUBLIC Bool
-glXAssociateDMPbufferSGIX(Display *dpy, GLXPbufferSGIX pbuffer, DMparams *params, DMbuffer dmbuffer)
+glXAssociateDMPbufferSGIX(Display *dpy, GLXPbufferSGIX pbuffer,
+ DMparams *params, DMbuffer dmbuffer)
{
(void) dpy;
(void) pbuffer;
@@ -2593,7 +2607,8 @@ glXQueryMaxSwapBarriersSGIX(Display *dpy, int screen, int *max)
/*** GLX_SUN_get_transparent_index ***/
PUBLIC Status
-glXGetTransparentIndexSUN(Display *dpy, Window overlay, Window underlay, long *pTransparent)
+glXGetTransparentIndexSUN(Display *dpy, Window overlay, Window underlay,
+ long *pTransparent)
{
(void) dpy;
(void) overlay;
diff --git a/src/gallium/state_trackers/glx/xlib/xm_api.c b/src/gallium/state_trackers/glx/xlib/xm_api.c
index 7c47a25ceba..3b35cbc890c 100644
--- a/src/gallium/state_trackers/glx/xlib/xm_api.c
+++ b/src/gallium/state_trackers/glx/xlib/xm_api.c
@@ -376,8 +376,6 @@ choose_depth_stencil_format(XMesaDisplay xmdpy, int depth, int stencil)
{
const enum pipe_texture_target target = PIPE_TEXTURE_2D;
const unsigned tex_usage = PIPE_BIND_DEPTH_STENCIL;
- const unsigned geom_flags = (PIPE_TEXTURE_GEOM_NON_SQUARE |
- PIPE_TEXTURE_GEOM_NON_POWER_OF_TWO);
const unsigned sample_count = 0;
enum pipe_format formats[8], fmt;
int count, i;
@@ -403,7 +401,7 @@ choose_depth_stencil_format(XMesaDisplay xmdpy, int depth, int stencil)
for (i = 0; i < count; i++) {
if (xmdpy->screen->is_format_supported(xmdpy->screen, formats[i],
target, sample_count,
- tex_usage, geom_flags)) {
+ tex_usage)) {
fmt = formats[i];
break;
}
@@ -1195,11 +1193,7 @@ void XMesaSwapBuffers( XMesaBuffer b )
XMesaContext xmctx = XMesaGetCurrentContext();
if (xmctx && xmctx->xm_buffer == b) {
- xmctx->st->flush( xmctx->st,
- PIPE_FLUSH_RENDER_CACHE |
- PIPE_FLUSH_SWAPBUFFERS |
- PIPE_FLUSH_FRAME,
- NULL);
+ xmctx->st->flush( xmctx->st, ST_FLUSH_FRONT, NULL);
}
xmesa_swap_st_framebuffer(b->stfb);
@@ -1225,9 +1219,10 @@ void XMesaFlush( XMesaContext c )
XMesaDisplay xmdpy = xmesa_init_display(c->xm_visual->display);
struct pipe_fence_handle *fence = NULL;
- c->st->flush(c->st, PIPE_FLUSH_RENDER_CACHE | PIPE_FLUSH_FRAME, &fence);
+ c->st->flush(c->st, ST_FLUSH_FRONT, &fence);
if (fence) {
- xmdpy->screen->fence_finish(xmdpy->screen, fence, 0);
+ xmdpy->screen->fence_finish(xmdpy->screen, fence,
+ PIPE_TIMEOUT_INFINITE);
xmdpy->screen->fence_reference(xmdpy->screen, &fence, NULL);
}
XFlush( c->xm_visual->display );
diff --git a/src/gallium/state_trackers/python/p_context.i b/src/gallium/state_trackers/python/p_context.i
index 5bdeaa8e4ea..17d25ad0aa6 100644
--- a/src/gallium/state_trackers/python/p_context.i
+++ b/src/gallium/state_trackers/python/p_context.i
@@ -268,7 +268,6 @@ struct st_context {
void set_vertex_buffer(unsigned index,
unsigned stride,
- unsigned max_index,
unsigned buffer_offset,
struct pipe_resource *buffer)
{
@@ -277,7 +276,6 @@ struct st_context {
memset(&state, 0, sizeof(state));
state.stride = stride;
- state.max_index = max_index;
state.buffer_offset = buffer_offset;
state.buffer = buffer;
@@ -352,6 +350,7 @@ struct st_context {
vbuf = pipe_buffer_create(screen,
PIPE_BIND_VERTEX_BUFFER,
+ PIPE_USAGE_STATIC,
size);
if(!vbuf)
goto error1;
@@ -360,7 +359,7 @@ struct st_context {
if (!map)
goto error2;
memcpy(map, vertices, size);
- pipe_buffer_unmap(pipe, vbuf, transfer);
+ pipe_buffer_unmap(pipe, transfer);
cso_save_vertex_elements($self->cso);
@@ -378,7 +377,6 @@ struct st_context {
vbuffer.buffer = vbuf;
vbuffer.stride = num_attribs * 4 * sizeof(float); /* vertex size */
vbuffer.buffer_offset = 0;
- vbuffer.max_index = num_verts - 1;
pipe->set_vertex_buffers(pipe, 1, &vbuffer);
/* draw */
@@ -402,10 +400,10 @@ error1:
void
flush(unsigned flags = 0) {
struct pipe_fence_handle *fence = NULL;
- $self->pipe->flush($self->pipe, flags | PIPE_FLUSH_RENDER_CACHE, &fence);
+ $self->pipe->flush($self->pipe, &fence);
if(fence) {
/* TODO: allow asynchronous operation */
- $self->pipe->screen->fence_finish( $self->pipe->screen, fence, 0 );
+ $self->pipe->screen->fence_finish( $self->pipe->screen, fence, PIPE_TIMEOUT_INFINITE );
$self->pipe->screen->fence_reference( $self->pipe->screen, &fence, NULL );
}
}
diff --git a/src/gallium/state_trackers/python/p_device.i b/src/gallium/state_trackers/python/p_device.i
index d55086fefd5..61f6b3bb739 100644
--- a/src/gallium/state_trackers/python/p_device.i
+++ b/src/gallium/state_trackers/python/p_device.i
@@ -86,8 +86,7 @@ struct st_device {
int is_format_supported( enum pipe_format format,
enum pipe_texture_target target,
unsigned sample_count,
- unsigned bind,
- unsigned geom_flags ) {
+ unsigned bind ) {
/* We can't really display surfaces with the python statetracker so mask
* out that usage */
bind &= ~PIPE_BIND_DISPLAY_TARGET;
@@ -96,8 +95,7 @@ struct st_device {
format,
target,
sample_count,
- bind,
- geom_flags );
+ bind );
}
struct st_context *
@@ -134,7 +132,7 @@ struct st_device {
}
struct pipe_resource *
- buffer_create(unsigned size, unsigned bind = 0) {
- return pipe_buffer_create($self->screen, bind, size);
+ buffer_create(unsigned size, unsigned usage, unsigned bind = 0) {
+ return pipe_buffer_create($self->screen, bind, usage, size);
}
};
diff --git a/src/gallium/state_trackers/vega/Makefile b/src/gallium/state_trackers/vega/Makefile
index 7342c124c28..3e8ad49b767 100644
--- a/src/gallium/state_trackers/vega/Makefile
+++ b/src/gallium/state_trackers/vega/Makefile
@@ -24,23 +24,25 @@ C_SOURCES = \
api_path.c \
api_text.c \
api_transform.c \
- vgu.c \
- vg_context.c \
- vg_manager.c \
- vg_state.c \
- vg_translate.c \
- polygon.c \
- bezier.c \
- path.c \
- paint.c \
arc.c \
+ bezier.c \
+ handle.c \
image.c \
+ mask.c \
+ paint.c \
+ path.c \
+ polygon.c \
renderer.c \
+ shader.c \
+ shaders_cache.c \
stroker.c \
- mask.c \
text.c \
- shader.c \
- shaders_cache.c
+ vg_context.c \
+ vg_manager.c \
+ vg_state.c \
+ vg_translate.c \
+ vgu.c
+
GENERATED_SOURCES := api_tmp.h
diff --git a/src/gallium/state_trackers/vega/SConscript b/src/gallium/state_trackers/vega/SConscript
index 4900135a1c5..f3732aa1577 100644
--- a/src/gallium/state_trackers/vega/SConscript
+++ b/src/gallium/state_trackers/vega/SConscript
@@ -26,23 +26,24 @@ vega_sources = [
'api_path.c',
'api_text.c',
'api_transform.c',
- 'vgu.c',
- 'vg_context.c',
- 'vg_manager.c',
- 'vg_state.c',
- 'vg_translate.c',
- 'polygon.c',
- 'bezier.c',
- 'path.c',
- 'paint.c',
'arc.c',
+ 'bezier.c',
+ 'handle.c',
'image.c',
- 'renderer.c',
- 'stroker.c',
'mask.c',
+ 'paint.c',
+ 'path.c',
+ 'polygon.c',
+ 'renderer.c',
'shader.c',
'shaders_cache.c',
+ 'stroker.c',
'text.c',
+ 'vg_context.c',
+ 'vg_manager.c',
+ 'vg_state.c',
+ 'vg_translate.c',
+ 'vgu.c'
]
api_tmp = env.CodeGenerate(
diff --git a/src/gallium/state_trackers/vega/api_context.c b/src/gallium/state_trackers/vega/api_context.c
index d6bbda5e075..19e42dd1562 100644
--- a/src/gallium/state_trackers/vega/api_context.c
+++ b/src/gallium/state_trackers/vega/api_context.c
@@ -56,7 +56,7 @@ void vegaFlush(void)
return;
pipe = ctx->pipe;
- pipe->flush(pipe, PIPE_FLUSH_RENDER_CACHE, NULL);
+ pipe->flush(pipe, NULL);
vg_manager_flush_frontbuffer(ctx);
}
@@ -72,9 +72,10 @@ void vegaFinish(void)
pipe = ctx->pipe;
- pipe->flush(pipe, PIPE_FLUSH_RENDER_CACHE | PIPE_FLUSH_FRAME, &fence);
+ pipe->flush(pipe, &fence);
if (fence) {
- pipe->screen->fence_finish(pipe->screen, fence, 0);
+ pipe->screen->fence_finish(pipe->screen, fence,
+ PIPE_TIMEOUT_INFINITE);
pipe->screen->fence_reference(pipe->screen, &fence, NULL);
}
}
diff --git a/src/gallium/state_trackers/vega/api_filters.c b/src/gallium/state_trackers/vega/api_filters.c
index 724e38241b5..6be460c495c 100644
--- a/src/gallium/state_trackers/vega/api_filters.c
+++ b/src/gallium/state_trackers/vega/api_filters.c
@@ -29,6 +29,7 @@
#include "vg_context.h"
#include "image.h"
#include "api.h"
+#include "handle.h"
#include "renderer.h"
#include "shaders_cache.h"
@@ -251,8 +252,8 @@ void vegaColorMatrix(VGImage dst, VGImage src,
return;
}
- d = (struct vg_image*)dst;
- s = (struct vg_image*)src;
+ d = handle_to_image(dst);
+ s = handle_to_image(src);
if (vg_image_overlaps(d, s)) {
vg_set_error(ctx, VG_ILLEGAL_ARGUMENT_ERROR);
@@ -293,7 +294,7 @@ void vegaConvolve(VGImage dst, VGImage src,
struct vg_image *d, *s;
VGint kernel_size = kernelWidth * kernelHeight;
struct filter_info info;
- const VGint max_kernel_size = vgGeti(VG_MAX_KERNEL_SIZE);
+ const VGint max_kernel_size = vegaGeti(VG_MAX_KERNEL_SIZE);
if (dst == VG_INVALID_HANDLE || src == VG_INVALID_HANDLE) {
vg_set_error(ctx, VG_BAD_HANDLE_ERROR);
@@ -317,8 +318,8 @@ void vegaConvolve(VGImage dst, VGImage src,
return;
}
- d = (struct vg_image*)dst;
- s = (struct vg_image*)src;
+ d = handle_to_image(dst);
+ s = handle_to_image(src);
if (vg_image_overlaps(d, s)) {
vg_set_error(ctx, VG_ILLEGAL_ARGUMENT_ERROR);
@@ -395,7 +396,7 @@ void vegaSeparableConvolve(VGImage dst, VGImage src,
struct vg_context *ctx = vg_current_context();
VGshort *kernel;
VGint i, j, idx = 0;
- const VGint max_kernel_size = vgGeti(VG_MAX_SEPARABLE_KERNEL_SIZE);
+ const VGint max_kernel_size = vegaGeti(VG_MAX_SEPARABLE_KERNEL_SIZE);
if (dst == VG_INVALID_HANDLE || src == VG_INVALID_HANDLE) {
vg_set_error(ctx, VG_BAD_HANDLE_ERROR);
@@ -425,8 +426,8 @@ void vegaSeparableConvolve(VGImage dst, VGImage src,
++idx;
}
}
- vgConvolve(dst, src, kernelWidth, kernelHeight, shiftX, shiftY,
- kernel, scale, bias, tilingMode);
+ vegaConvolve(dst, src, kernelWidth, kernelHeight, shiftX, shiftY,
+ kernel, scale, bias, tilingMode);
free(kernel);
}
@@ -502,8 +503,8 @@ void vegaGaussianBlur(VGImage dst, VGImage src,
return;
}
- d = (struct vg_image*)dst;
- s = (struct vg_image*)src;
+ d = handle_to_image(dst);
+ s = handle_to_image(src);
if (vg_image_overlaps(d, s)) {
vg_set_error(ctx, VG_ILLEGAL_ARGUMENT_ERROR);
@@ -599,8 +600,8 @@ void vegaLookup(VGImage dst, VGImage src,
return;
}
- d = (struct vg_image*)dst;
- s = (struct vg_image*)src;
+ d = handle_to_image(dst);
+ s = handle_to_image(src);
if (vg_image_overlaps(d, s)) {
vg_set_error(ctx, VG_ILLEGAL_ARGUMENT_ERROR);
@@ -662,8 +663,8 @@ void vegaLookupSingle(VGImage dst, VGImage src,
return;
}
- d = (struct vg_image*)dst;
- s = (struct vg_image*)src;
+ d = handle_to_image(dst);
+ s = handle_to_image(src);
if (vg_image_overlaps(d, s)) {
vg_set_error(ctx, VG_ILLEGAL_ARGUMENT_ERROR);
diff --git a/src/gallium/state_trackers/vega/api_images.c b/src/gallium/state_trackers/vega/api_images.c
index ad95409cd00..2cb5622f817 100644
--- a/src/gallium/state_trackers/vega/api_images.c
+++ b/src/gallium/state_trackers/vega/api_images.c
@@ -32,6 +32,7 @@
#include "vg_translate.h"
#include "api_consts.h"
#include "api.h"
+#include "handle.h"
#include "pipe/p_context.h"
#include "pipe/p_screen.h"
@@ -105,12 +106,12 @@ VGImage vegaCreateImage(VGImageFormat format,
vg_set_error(ctx, VG_ILLEGAL_ARGUMENT_ERROR);
return VG_INVALID_HANDLE;
}
- if (width > vgGeti(VG_MAX_IMAGE_WIDTH) ||
- height > vgGeti(VG_MAX_IMAGE_HEIGHT)) {
+ if (width > vegaGeti(VG_MAX_IMAGE_WIDTH) ||
+ height > vegaGeti(VG_MAX_IMAGE_HEIGHT)) {
vg_set_error(ctx, VG_ILLEGAL_ARGUMENT_ERROR);
return VG_INVALID_HANDLE;
}
- if (width * height > vgGeti(VG_MAX_IMAGE_PIXELS)) {
+ if (width * height > vegaGeti(VG_MAX_IMAGE_PIXELS)) {
vg_set_error(ctx, VG_ILLEGAL_ARGUMENT_ERROR);
return VG_INVALID_HANDLE;
}
@@ -122,19 +123,19 @@ VGImage vegaCreateImage(VGImageFormat format,
return VG_INVALID_HANDLE;
}
- return (VGImage)image_create(format, width, height);
+ return image_to_handle(image_create(format, width, height));
}
void vegaDestroyImage(VGImage image)
{
struct vg_context *ctx = vg_current_context();
- struct vg_image *img = (struct vg_image *)image;
+ struct vg_image *img = handle_to_image(image);
if (image == VG_INVALID_HANDLE) {
vg_set_error(ctx, VG_BAD_HANDLE_ERROR);
return;
}
- if (!vg_object_is_valid((void*)image, VG_OBJECT_IMAGE)) {
+ if (!vg_object_is_valid(image, VG_OBJECT_IMAGE)) {
vg_set_error(ctx, VG_BAD_HANDLE_ERROR);
return;
}
@@ -157,7 +158,7 @@ void vegaClearImage(VGImage image,
return;
}
- img = (struct vg_image*)image;
+ img = handle_to_image(image);
if (x + width < 0 || y + height < 0)
return;
@@ -189,7 +190,7 @@ void vegaImageSubData(VGImage image,
return;
}
- img = (struct vg_image*)(image);
+ img = handle_to_image(image);
image_sub_data(img, data, dataStride, dataFormat,
x, y, width, height);
}
@@ -216,7 +217,7 @@ void vegaGetImageSubData(VGImage image,
vg_set_error(ctx, VG_ILLEGAL_ARGUMENT_ERROR);
return;
}
- img = (struct vg_image*)image;
+ img = handle_to_image(image);
image_get_sub_data(img, data, dataStride, dataFormat,
x, y, width, height);
}
@@ -229,8 +230,8 @@ VGImage vegaChildImage(VGImage parent,
struct vg_image *p;
if (parent == VG_INVALID_HANDLE ||
- !vg_context_is_object_valid(ctx, VG_OBJECT_IMAGE, (void*)parent) ||
- !vg_object_is_valid((void*)parent, VG_OBJECT_IMAGE)) {
+ !vg_context_is_object_valid(ctx, VG_OBJECT_IMAGE, parent) ||
+ !vg_object_is_valid(parent, VG_OBJECT_IMAGE)) {
vg_set_error(ctx, VG_BAD_HANDLE_ERROR);
return VG_INVALID_HANDLE;
}
@@ -238,7 +239,7 @@ VGImage vegaChildImage(VGImage parent,
vg_set_error(ctx, VG_ILLEGAL_ARGUMENT_ERROR);
return VG_INVALID_HANDLE;
}
- p = (struct vg_image *)parent;
+ p = handle_to_image(parent);
if (x > p->width || y > p->height) {
vg_set_error(ctx, VG_ILLEGAL_ARGUMENT_ERROR);
return VG_INVALID_HANDLE;
@@ -248,7 +249,7 @@ VGImage vegaChildImage(VGImage parent,
return VG_INVALID_HANDLE;
}
- return (VGImage)image_child_image(p, x, y, width, height);
+ return image_to_handle(image_child_image(p, x, y, width, height));
}
VGImage vegaGetParent(VGImage image)
@@ -261,9 +262,9 @@ VGImage vegaGetParent(VGImage image)
return VG_INVALID_HANDLE;
}
- img = (struct vg_image*)image;
+ img = handle_to_image(image);
if (img->parent)
- return (VGImage)img->parent;
+ return image_to_handle(img->parent);
else
return image;
}
@@ -285,8 +286,8 @@ void vegaCopyImage(VGImage dst, VGint dx, VGint dy,
return;
}
vg_validate_state(ctx);
- image_copy((struct vg_image*)dst, dx, dy,
- (struct vg_image*)src, sx, sy,
+ image_copy(handle_to_image(dst), dx, dy,
+ handle_to_image(src), sx, sy,
width, height, dither);
}
@@ -303,7 +304,7 @@ void vegaDrawImage(VGImage image)
}
vg_validate_state(ctx);
- image_draw((struct vg_image*)image,
+ image_draw(handle_to_image(image),
&ctx->state.vg.image_user_to_surface_matrix);
}
@@ -323,7 +324,7 @@ void vegaSetPixels(VGint dx, VGint dy,
vg_set_error(ctx, VG_ILLEGAL_ARGUMENT_ERROR);
return;
}
- image_set_pixels(dx, dy, (struct vg_image*)src, sx, sy, width,
+ image_set_pixels(dx, dy, handle_to_image(src), sx, sy, width,
height);
}
@@ -343,7 +344,7 @@ void vegaGetPixels(VGImage dst, VGint dx, VGint dy,
return;
}
- img = (struct vg_image*)dst;
+ img = handle_to_image(dst);
image_get_pixels(img, dx, dy,
sx, sy, width, height);
@@ -355,7 +356,6 @@ void vegaWritePixels(const void * data, VGint dataStride,
VGint width, VGint height)
{
struct vg_context *ctx = vg_current_context();
- struct pipe_context *pipe = ctx->pipe;
if (!supported_image_format(dataFormat)) {
vg_set_error(ctx, VG_UNSUPPORTED_IMAGE_FORMAT_ERROR);
@@ -386,8 +386,6 @@ void vegaWritePixels(const void * data, VGint dataStride,
#endif
image_destroy(img);
}
- /* make sure rendering has completed */
- pipe->flush(pipe, PIPE_FLUSH_RENDER_CACHE, NULL);
}
void vegaReadPixels(void * data, VGint dataStride,
@@ -420,8 +418,6 @@ void vegaReadPixels(void * data, VGint dataStride,
return;
}
- /* make sure rendering has completed */
- pipe->flush(pipe, PIPE_FLUSH_RENDER_CACHE, NULL);
if (sx < 0) {
xoffset = -sx;
xoffset *= _vega_size_for_format(dataFormat);
@@ -487,7 +483,7 @@ void vegaCopyPixels(VGint dx, VGint dy,
vg_validate_state(ctx);
/* make sure rendering has completed */
- vgFinish();
+ vegaFinish();
vg_copy_surface(ctx, strb->surface, dx, dy,
strb->surface, sx, sy, width, height);
diff --git a/src/gallium/state_trackers/vega/api_masks.c b/src/gallium/state_trackers/vega/api_masks.c
index beb15c33a59..cdbf0026e89 100644
--- a/src/gallium/state_trackers/vega/api_masks.c
+++ b/src/gallium/state_trackers/vega/api_masks.c
@@ -28,14 +28,11 @@
#include "mask.h"
#include "api.h"
+#include "handle.h"
#include "renderer.h"
#include "vg_context.h"
#include "pipe/p_context.h"
-#include "util/u_inlines.h"
-
-#include "util/u_pack_color.h"
-#include "util/u_draw_quad.h"
void vegaMask(VGHandle mask, VGMaskOperation operation,
VGint x, VGint y,
@@ -60,11 +57,11 @@ void vegaMask(VGHandle mask, VGMaskOperation operation,
mask_fill(x, y, width, height, 0.f);
} else if (operation == VG_FILL_MASK) {
mask_fill(x, y, width, height, 1.f);
- } else if (vg_object_is_valid((void*)mask, VG_OBJECT_IMAGE)) {
- struct vg_image *image = (struct vg_image *)mask;
+ } else if (vg_object_is_valid(mask, VG_OBJECT_IMAGE)) {
+ struct vg_image *image = handle_to_image(mask);
mask_using_image(image, operation, x, y, width, height);
- } else if (vg_object_is_valid((void*)mask, VG_OBJECT_MASK)) {
- struct vg_mask_layer *layer = (struct vg_mask_layer *)mask;
+ } else if (vg_object_is_valid(mask, VG_OBJECT_MASK)) {
+ struct vg_mask_layer *layer = handle_to_masklayer(mask);
mask_using_layer(layer, operation, x, y, width, height);
} else {
vg_set_error(ctx, VG_BAD_HANDLE_ERROR);
@@ -127,14 +124,14 @@ void vegaRenderToMask(VGPath path,
vg_set_error(ctx, VG_ILLEGAL_ARGUMENT_ERROR);
return;
}
- if (!vg_object_is_valid((void*)path, VG_OBJECT_PATH)) {
+ if (!vg_object_is_valid(path, VG_OBJECT_PATH)) {
vg_set_error(ctx, VG_BAD_HANDLE_ERROR);
return;
}
vg_validate_state(ctx);
- mask_render_to((struct path *)path, paintModes, operation);
+ mask_render_to(handle_to_path(path), paintModes, operation);
}
VGMaskLayer vegaCreateMaskLayer(VGint width, VGint height)
@@ -142,13 +139,13 @@ VGMaskLayer vegaCreateMaskLayer(VGint width, VGint height)
struct vg_context *ctx = vg_current_context();
if (width <= 0 || height <= 0 ||
- width > vgGeti(VG_MAX_IMAGE_WIDTH) ||
- height > vgGeti(VG_MAX_IMAGE_HEIGHT)) {
+ width > vegaGeti(VG_MAX_IMAGE_WIDTH) ||
+ height > vegaGeti(VG_MAX_IMAGE_HEIGHT)) {
vg_set_error(ctx, VG_ILLEGAL_ARGUMENT_ERROR);
return VG_INVALID_HANDLE;
}
- return (VGMaskLayer)mask_layer_create(width, height);
+ return masklayer_to_handle(mask_layer_create(width, height));
}
void vegaDestroyMaskLayer(VGMaskLayer maskLayer)
@@ -160,12 +157,12 @@ void vegaDestroyMaskLayer(VGMaskLayer maskLayer)
vg_set_error(ctx, VG_BAD_HANDLE_ERROR);
return;
}
- if (!vg_object_is_valid((void*)maskLayer, VG_OBJECT_MASK)) {
+ if (!vg_object_is_valid(maskLayer, VG_OBJECT_MASK)) {
vg_set_error(ctx, VG_BAD_HANDLE_ERROR);
return;
}
- mask = (struct vg_mask_layer *)maskLayer;
+ mask = handle_to_masklayer(maskLayer);
mask_layer_destroy(mask);
}
@@ -196,12 +193,12 @@ void vegaFillMaskLayer(VGMaskLayer maskLayer,
return;
}
- if (!vg_object_is_valid((void*)maskLayer, VG_OBJECT_MASK)) {
+ if (!vg_object_is_valid(maskLayer, VG_OBJECT_MASK)) {
vg_set_error(ctx, VG_BAD_HANDLE_ERROR);
return;
}
- mask = (struct vg_mask_layer*)maskLayer;
+ mask = handle_to_masklayer(maskLayer);
if (x + width > mask_layer_width(mask) ||
y + height > mask_layer_height(mask)) {
@@ -230,14 +227,14 @@ void vegaCopyMask(VGMaskLayer maskLayer,
vg_set_error(ctx, VG_ILLEGAL_ARGUMENT_ERROR);
return;
}
- if (!vg_object_is_valid((void*)maskLayer, VG_OBJECT_MASK)) {
+ if (!vg_object_is_valid(maskLayer, VG_OBJECT_MASK)) {
vg_set_error(ctx, VG_BAD_HANDLE_ERROR);
return;
}
vg_validate_state(ctx);
- mask = (struct vg_mask_layer*)maskLayer;
+ mask = handle_to_masklayer(maskLayer);
mask_copy(mask, sx, sy, dx, dy, width, height);
}
diff --git a/src/gallium/state_trackers/vega/api_paint.c b/src/gallium/state_trackers/vega/api_paint.c
index 1411806455c..2610ebe0576 100644
--- a/src/gallium/state_trackers/vega/api_paint.c
+++ b/src/gallium/state_trackers/vega/api_paint.c
@@ -29,24 +29,24 @@
#include "vg_context.h"
#include "paint.h"
#include "api.h"
+#include "handle.h"
+
VGPaint vegaCreatePaint(void)
{
- return (VGPaint) paint_create(vg_current_context());
+ return paint_to_handle(paint_create(vg_current_context()));
}
void vegaDestroyPaint(VGPaint p)
{
struct vg_context *ctx = vg_current_context();
- struct vg_paint *paint;
if (p == VG_INVALID_HANDLE) {
vg_set_error(ctx, VG_BAD_HANDLE_ERROR);
return;
}
- paint = (struct vg_paint *)p;
- paint_destroy(paint);
+ paint_destroy(handle_to_paint(p));
}
void vegaSetPaint(VGPaint paint, VGbitfield paintModes)
@@ -55,8 +55,8 @@ void vegaSetPaint(VGPaint paint, VGbitfield paintModes)
if (paint == VG_INVALID_HANDLE) {
/* restore the default */
- paint = (VGPaint)ctx->default_paint;
- } else if (!vg_object_is_valid((void*)paint, VG_OBJECT_PAINT)) {
+ paint = paint_to_handle(ctx->default_paint);
+ } else if (!vg_object_is_valid(paint, VG_OBJECT_PAINT)) {
vg_set_error(ctx, VG_BAD_HANDLE_ERROR);
return;
}
@@ -67,11 +67,13 @@ void vegaSetPaint(VGPaint paint, VGbitfield paintModes)
}
if (paintModes & VG_FILL_PATH) {
- ctx->state.vg.fill_paint = (struct vg_paint *)paint;
+ ctx->state.vg.fill_paint = handle_to_paint(paint);
}
if (paintModes & VG_STROKE_PATH) {
- ctx->state.vg.stroke_paint = (struct vg_paint *)paint;
+ ctx->state.vg.stroke_paint = handle_to_paint(paint);
}
+
+ ctx->state.dirty |= PAINT_DIRTY;
}
VGPaint vegaGetPaint(VGPaintMode paintMode)
@@ -85,11 +87,11 @@ VGPaint vegaGetPaint(VGPaintMode paintMode)
}
if (paintMode == VG_FILL_PATH)
- paint = (VGPaint)ctx->state.vg.fill_paint;
+ paint = paint_to_handle(ctx->state.vg.fill_paint);
else if (paintMode == VG_STROKE_PATH)
- paint = (VGPaint)ctx->state.vg.stroke_paint;
+ paint = paint_to_handle(ctx->state.vg.stroke_paint);
- if (paint == (VGPaint)ctx->default_paint)
+ if (paint == paint_to_handle(ctx->default_paint))
paint = VG_INVALID_HANDLE;
return paint;
@@ -98,20 +100,24 @@ VGPaint vegaGetPaint(VGPaintMode paintMode)
void vegaSetColor(VGPaint paint, VGuint rgba)
{
struct vg_context *ctx = vg_current_context();
+ struct vg_paint *p;
if (paint == VG_INVALID_HANDLE) {
vg_set_error(ctx, VG_BAD_HANDLE_ERROR);
return;
}
- if (!vg_object_is_valid((void*)paint, VG_OBJECT_PAINT)) {
+ if (!vg_object_is_valid(paint, VG_OBJECT_PAINT)) {
vg_set_error(ctx, VG_BAD_HANDLE_ERROR);
return;
}
- {
- struct vg_paint *p = (struct vg_paint *)paint;
- paint_set_colori(p, rgba);
- }
+
+ p = handle_to_paint(paint);
+ paint_set_colori(p, rgba);
+
+ if (ctx->state.vg.fill_paint == p ||
+ ctx->state.vg.stroke_paint == p)
+ ctx->state.dirty |= PAINT_DIRTY;
}
VGuint vegaGetColor(VGPaint paint)
@@ -125,11 +131,11 @@ VGuint vegaGetColor(VGPaint paint)
return rgba;
}
- if (!vg_object_is_valid((void*)paint, VG_OBJECT_PAINT)) {
+ if (!vg_object_is_valid(paint, VG_OBJECT_PAINT)) {
vg_set_error(ctx, VG_BAD_HANDLE_ERROR);
return rgba;
}
- p = (struct vg_paint *)paint;
+ p = handle_to_paint(paint);
return paint_colori(p);
}
@@ -139,28 +145,28 @@ void vegaPaintPattern(VGPaint paint, VGImage pattern)
struct vg_context *ctx = vg_current_context();
if (paint == VG_INVALID_HANDLE ||
- !vg_context_is_object_valid(ctx, VG_OBJECT_PAINT, (void *)paint)) {
+ !vg_context_is_object_valid(ctx, VG_OBJECT_PAINT, paint)) {
vg_set_error(ctx, VG_BAD_HANDLE_ERROR);
return;
}
if (pattern == VG_INVALID_HANDLE) {
- paint_set_type((struct vg_paint*)paint, VG_PAINT_TYPE_COLOR);
+ paint_set_type(handle_to_paint(paint), VG_PAINT_TYPE_COLOR);
return;
}
- if (!vg_context_is_object_valid(ctx, VG_OBJECT_IMAGE, (void *)pattern)) {
+ if (!vg_context_is_object_valid(ctx, VG_OBJECT_IMAGE, pattern)) {
vg_set_error(ctx, VG_BAD_HANDLE_ERROR);
return;
}
- if (!vg_object_is_valid((void*)paint, VG_OBJECT_PAINT) ||
- !vg_object_is_valid((void*)pattern, VG_OBJECT_IMAGE)) {
+ if (!vg_object_is_valid(paint, VG_OBJECT_PAINT) ||
+ !vg_object_is_valid(pattern, VG_OBJECT_IMAGE)) {
vg_set_error(ctx, VG_BAD_HANDLE_ERROR);
return;
}
- paint_set_pattern((struct vg_paint*)paint,
- (struct vg_image*)pattern);
+ paint_set_pattern(handle_to_paint(paint),
+ handle_to_image(pattern));
}
diff --git a/src/gallium/state_trackers/vega/api_params.c b/src/gallium/state_trackers/vega/api_params.c
index a73b6c3effe..aa1e5dd280a 100644
--- a/src/gallium/state_trackers/vega/api_params.c
+++ b/src/gallium/state_trackers/vega/api_params.c
@@ -29,6 +29,7 @@
#include "vg_context.h"
#include "paint.h"
#include "path.h"
+#include "handle.h"
#include "image.h"
#include "text.h"
#include "matrix.h"
@@ -60,7 +61,7 @@ static INLINE VGboolean count_in_bounds(VGParamType type, VGint count)
else if (type == VG_STROKE_DASH_PATTERN) {
return count <= VEGA_MAX_DASH_COUNT;
} else {
- VGint real_count = vgGetVectorSize(type);
+ VGint real_count = vegaGetVectorSize(type);
return count == real_count;
}
}
@@ -103,7 +104,7 @@ void vegaSetf (VGParamType type, VGfloat value)
case VG_MAX_IMAGE_BYTES:
case VG_MAX_GAUSSIAN_STD_DEVIATION:
case VG_MAX_FLOAT:
- vgSeti(type, floor(value));
+ vegaSeti(type, floor(value));
return;
break;
case VG_STROKE_LINE_WIDTH:
@@ -289,7 +290,7 @@ void vegaSetfv(VGParamType type, VGint count,
case VG_FILTER_FORMAT_LINEAR:
case VG_FILTER_FORMAT_PREMULTIPLIED:
case VG_FILTER_CHANNEL_MASK:
- vgSeti(type, floor(values[0]));
+ vegaSeti(type, floor(values[0]));
return;
break;
case VG_SCISSOR_RECTS: {
@@ -416,7 +417,7 @@ void vegaSetiv(VGParamType type, VGint count,
case VG_FILTER_FORMAT_LINEAR:
case VG_FILTER_FORMAT_PREMULTIPLIED:
case VG_FILTER_CHANNEL_MASK:
- vgSeti(type, values[0]);
+ vegaSeti(type, values[0]);
return;
break;
case VG_SCISSOR_RECTS: {
@@ -536,7 +537,7 @@ VGfloat vegaGetf(VGParamType type)
case VG_FILTER_FORMAT_LINEAR:
case VG_FILTER_FORMAT_PREMULTIPLIED:
case VG_FILTER_CHANNEL_MASK:
- return vgGeti(type);
+ return vegaGeti(type);
break;
case VG_STROKE_LINE_WIDTH:
value = state->stroke.line_width.f;
@@ -558,7 +559,7 @@ VGfloat vegaGetf(VGParamType type)
case VG_MAX_IMAGE_PIXELS:
case VG_MAX_IMAGE_BYTES:
case VG_MAX_GAUSSIAN_STD_DEVIATION:
- return vgGeti(type);
+ return vegaGeti(type);
break;
case VG_MAX_FLOAT:
value = 1e+10;/*must be at least 1e+10*/
@@ -674,7 +675,7 @@ VGint vegaGeti(VGParamType type)
break;
case VG_MAX_FLOAT: {
- VGfloat val = vgGetf(type);
+ VGfloat val = vegaGetf(type);
value = float_to_int_floor(*((VGuint*)&val));
}
break;
@@ -765,7 +766,7 @@ void vegaGetfv(VGParamType type, VGint count,
{
const struct vg_state *state = current_state();
struct vg_context *ctx = vg_current_context();
- VGint real_count = vgGetVectorSize(type);
+ VGint real_count = vegaGetVectorSize(type);
if (!values || count <= 0 || count > real_count || !is_aligned(values)) {
vg_set_error(ctx, VG_ILLEGAL_ARGUMENT_ERROR);
@@ -802,10 +803,10 @@ void vegaGetfv(VGParamType type, VGint count,
case VG_MAX_IMAGE_PIXELS:
case VG_MAX_IMAGE_BYTES:
case VG_MAX_GAUSSIAN_STD_DEVIATION:
- values[0] = vgGeti(type);
+ values[0] = vegaGeti(type);
break;
case VG_MAX_FLOAT:
- values[0] = vgGetf(type);
+ values[0] = vegaGetf(type);
break;
case VG_SCISSOR_RECTS: {
VGint i;
@@ -866,7 +867,7 @@ void vegaGetiv(VGParamType type, VGint count,
{
const struct vg_state *state = current_state();
struct vg_context *ctx = vg_current_context();
- VGint real_count = vgGetVectorSize(type);
+ VGint real_count = vegaGetVectorSize(type);
if (!values || count <= 0 || count > real_count || !is_aligned(values)) {
vg_set_error(ctx, VG_ILLEGAL_ARGUMENT_ERROR);
@@ -903,10 +904,10 @@ void vegaGetiv(VGParamType type, VGint count,
case VG_MAX_IMAGE_PIXELS:
case VG_MAX_IMAGE_BYTES:
case VG_MAX_GAUSSIAN_STD_DEVIATION:
- values[0] = vgGeti(type);
+ values[0] = vegaGeti(type);
break;
case VG_MAX_FLOAT: {
- VGfloat val = vgGetf(type);
+ VGfloat val = vegaGetf(type);
values[0] = float_to_int_floor(*((VGuint*)&val));
}
break;
@@ -972,9 +973,9 @@ void vegaSetParameterf(VGHandle object,
VGfloat value)
{
struct vg_context *ctx = vg_current_context();
- void *ptr = (void*)object;
+ void *ptr = handle_to_pointer(object);
- if (!object || object == VG_INVALID_HANDLE || !is_aligned(ptr)) {
+ if (object == VG_INVALID_HANDLE || !is_aligned(ptr)) {
vg_set_error(ctx, VG_BAD_HANDLE_ERROR);
return;
}
@@ -983,7 +984,7 @@ void vegaSetParameterf(VGHandle object,
case VG_PAINT_TYPE:
case VG_PAINT_COLOR_RAMP_SPREAD_MODE:
case VG_PAINT_PATTERN_TILING_MODE:
- vgSetParameteri(object, paramType, floor(value));
+ vegaSetParameteri(object, paramType, floor(value));
return;
break;
case VG_PAINT_COLOR:
@@ -994,7 +995,7 @@ void vegaSetParameterf(VGHandle object,
vg_set_error(ctx, VG_ILLEGAL_ARGUMENT_ERROR);
break;
case VG_PAINT_COLOR_RAMP_PREMULTIPLIED: {
- struct vg_paint *p = (struct vg_paint *)object;
+ struct vg_paint *p = handle_to_paint(object);
paint_set_color_ramp_premultiplied(p, value);
}
break;
@@ -1026,9 +1027,9 @@ void vegaSetParameteri(VGHandle object,
VGint value)
{
struct vg_context *ctx = vg_current_context();
- void *ptr = (void*)object;
+ void *ptr = handle_to_pointer(object);
- if (!object || object == VG_INVALID_HANDLE || !is_aligned(ptr)) {
+ if (object == VG_INVALID_HANDLE || !is_aligned(ptr)) {
vg_set_error(ctx, VG_BAD_HANDLE_ERROR);
return;
}
@@ -1039,7 +1040,7 @@ void vegaSetParameteri(VGHandle object,
value > VG_PAINT_TYPE_PATTERN)
vg_set_error(ctx, VG_ILLEGAL_ARGUMENT_ERROR);
else {
- struct vg_paint *paint = (struct vg_paint *)ptr;
+ struct vg_paint *paint = handle_to_paint(object);
paint_set_type(paint, value);
}
break;
@@ -1055,12 +1056,12 @@ void vegaSetParameteri(VGHandle object,
value > VG_COLOR_RAMP_SPREAD_REFLECT)
vg_set_error(ctx, VG_ILLEGAL_ARGUMENT_ERROR);
else {
- struct vg_paint *paint = (struct vg_paint *)ptr;
+ struct vg_paint *paint = handle_to_paint(object);
paint_set_spread_mode(paint, value);
}
break;
case VG_PAINT_COLOR_RAMP_PREMULTIPLIED: {
- struct vg_paint *p = (struct vg_paint *)object;
+ struct vg_paint *p = handle_to_paint(object);
paint_set_color_ramp_premultiplied(p, value);
}
break;
@@ -1069,7 +1070,7 @@ void vegaSetParameteri(VGHandle object,
value > VG_TILE_REFLECT)
vg_set_error(ctx, VG_ILLEGAL_ARGUMENT_ERROR);
else {
- struct vg_paint *paint = (struct vg_paint *)ptr;
+ struct vg_paint *paint = handle_to_paint(object);
paint_set_pattern_tiling(paint, value);
}
break;
@@ -1102,10 +1103,10 @@ void vegaSetParameterfv(VGHandle object,
const VGfloat * values)
{
struct vg_context *ctx = vg_current_context();
- void *ptr = (void*)object;
- VGint real_count = vgGetParameterVectorSize(object, paramType);
+ void *ptr = handle_to_pointer(object);
+ VGint real_count = vegaGetParameterVectorSize(object, paramType);
- if (!object || object == VG_INVALID_HANDLE || !is_aligned(ptr)) {
+ if (object == VG_INVALID_HANDLE || !is_aligned(ptr)) {
vg_set_error(ctx, VG_BAD_HANDLE_ERROR);
return;
}
@@ -1125,15 +1126,18 @@ void vegaSetParameterfv(VGHandle object,
if (count != 1)
vg_set_error(ctx, VG_ILLEGAL_ARGUMENT_ERROR);
else
- vgSetParameterf(object, paramType, values[0]);
+ vegaSetParameterf(object, paramType, values[0]);
return;
break;
case VG_PAINT_COLOR: {
if (count != 4)
vg_set_error(ctx, VG_ILLEGAL_ARGUMENT_ERROR);
else {
- struct vg_paint *paint = (struct vg_paint *)object;
+ struct vg_paint *paint = handle_to_paint(object);
paint_set_color(paint, values);
+ if (ctx->state.vg.fill_paint == paint ||
+ ctx->state.vg.stroke_paint == paint)
+ ctx->state.dirty |= PAINT_DIRTY;
}
}
break;
@@ -1141,7 +1145,7 @@ void vegaSetParameterfv(VGHandle object,
if (count && count < 4)
vg_set_error(ctx, VG_ILLEGAL_ARGUMENT_ERROR);
else {
- struct vg_paint *paint = (struct vg_paint *)object;
+ struct vg_paint *paint = handle_to_paint(object);
count = MIN2(count, VEGA_MAX_COLOR_RAMP_STOPS);
paint_set_ramp_stops(paint, values, count);
{
@@ -1159,7 +1163,7 @@ void vegaSetParameterfv(VGHandle object,
if (count != 4)
vg_set_error(ctx, VG_ILLEGAL_ARGUMENT_ERROR);
else {
- struct vg_paint *paint = (struct vg_paint *)object;
+ struct vg_paint *paint = handle_to_paint(object);
paint_set_linear_gradient(paint, values);
{
VGint vals[4];
@@ -1176,7 +1180,7 @@ void vegaSetParameterfv(VGHandle object,
if (count != 5)
vg_set_error(ctx, VG_ILLEGAL_ARGUMENT_ERROR);
else {
- struct vg_paint *paint = (struct vg_paint *)object;
+ struct vg_paint *paint = handle_to_paint(object);
paint_set_radial_gradient(paint, values);
{
VGint vals[5];
@@ -1215,10 +1219,10 @@ void vegaSetParameteriv(VGHandle object,
const VGint * values)
{
struct vg_context *ctx = vg_current_context();
- void *ptr = (void*)object;
- VGint real_count = vgGetParameterVectorSize(object, paramType);
+ void *ptr = handle_to_pointer(object);
+ VGint real_count = vegaGetParameterVectorSize(object, paramType);
- if (!object || object == VG_INVALID_HANDLE || !is_aligned(ptr)) {
+ if (object == VG_INVALID_HANDLE || !is_aligned(ptr)) {
vg_set_error(ctx, VG_BAD_HANDLE_ERROR);
return;
}
@@ -1238,15 +1242,18 @@ void vegaSetParameteriv(VGHandle object,
if (count != 1)
vg_set_error(ctx, VG_ILLEGAL_ARGUMENT_ERROR);
else
- vgSetParameteri(object, paramType, values[0]);
+ vegaSetParameteri(object, paramType, values[0]);
return;
break;
case VG_PAINT_COLOR: {
if (count != 4)
vg_set_error(ctx, VG_ILLEGAL_ARGUMENT_ERROR);
else {
- struct vg_paint *paint = (struct vg_paint *)object;
+ struct vg_paint *paint = handle_to_paint(object);
paint_set_coloriv(paint, values);
+ if (ctx->state.vg.fill_paint == paint ||
+ ctx->state.vg.stroke_paint == paint)
+ ctx->state.dirty |= PAINT_DIRTY;
}
}
break;
@@ -1256,7 +1263,7 @@ void vegaSetParameteriv(VGHandle object,
else {
VGfloat *vals = 0;
int i;
- struct vg_paint *paint = (struct vg_paint *)object;
+ struct vg_paint *paint = handle_to_paint(object);
if (count) {
vals = malloc(sizeof(VGfloat)*count);
for (i = 0; i < count; ++i)
@@ -1274,7 +1281,7 @@ void vegaSetParameteriv(VGHandle object,
vg_set_error(ctx, VG_ILLEGAL_ARGUMENT_ERROR);
else {
VGfloat vals[4];
- struct vg_paint *paint = (struct vg_paint *)object;
+ struct vg_paint *paint = handle_to_paint(object);
vals[0] = values[0];
vals[1] = values[1];
vals[2] = values[2];
@@ -1289,7 +1296,7 @@ void vegaSetParameteriv(VGHandle object,
vg_set_error(ctx, VG_ILLEGAL_ARGUMENT_ERROR);
else {
VGfloat vals[5];
- struct vg_paint *paint = (struct vg_paint *)object;
+ struct vg_paint *paint = handle_to_paint(object);
vals[0] = values[0];
vals[1] = values[1];
vals[2] = values[2];
@@ -1318,9 +1325,8 @@ VGint vegaGetParameterVectorSize(VGHandle object,
VGint paramType)
{
struct vg_context *ctx = vg_current_context();
- void *ptr = (void*)object;
- if (!ptr || object == VG_INVALID_HANDLE) {
+ if (object == VG_INVALID_HANDLE) {
vg_set_error(ctx, VG_BAD_HANDLE_ERROR);
return 0;
}
@@ -1334,7 +1340,7 @@ VGint vegaGetParameterVectorSize(VGHandle object,
case VG_PAINT_COLOR:
return 4;
case VG_PAINT_COLOR_RAMP_STOPS: {
- struct vg_paint *p = (struct vg_paint *)object;
+ struct vg_paint *p = handle_to_paint(object);
return paint_num_ramp_stops(p);
}
break;
@@ -1374,9 +1380,8 @@ VGfloat vegaGetParameterf(VGHandle object,
VGint paramType)
{
struct vg_context *ctx = vg_current_context();
- void *ptr = (void*)object;
- if (!ptr || object == VG_INVALID_HANDLE) {
+ if (object == VG_INVALID_HANDLE) {
vg_set_error(ctx, VG_BAD_HANDLE_ERROR);
return 0;
}
@@ -1386,7 +1391,7 @@ VGfloat vegaGetParameterf(VGHandle object,
case VG_PAINT_COLOR_RAMP_SPREAD_MODE:
case VG_PAINT_COLOR_RAMP_PREMULTIPLIED:
case VG_PAINT_PATTERN_TILING_MODE:
- return vgGetParameteri(object, paramType);
+ return vegaGetParameteri(object, paramType);
break;
case VG_PAINT_COLOR:
case VG_PAINT_COLOR_RAMP_STOPS:
@@ -1398,17 +1403,17 @@ VGfloat vegaGetParameterf(VGHandle object,
case VG_PATH_FORMAT:
return VG_PATH_FORMAT_STANDARD;
case VG_PATH_SCALE: {
- struct path *p = (struct path*)object;
+ struct path *p = handle_to_path(object);
return path_scale(p);
}
case VG_PATH_BIAS: {
- struct path *p = (struct path*)object;
+ struct path *p = handle_to_path(object);
return path_bias(p);
}
case VG_PATH_DATATYPE:
case VG_PATH_NUM_SEGMENTS:
case VG_PATH_NUM_COORDS:
- return vgGetParameteri(object, paramType);
+ return vegaGetParameteri(object, paramType);
break;
case VG_IMAGE_FORMAT:
@@ -1416,7 +1421,7 @@ VGfloat vegaGetParameterf(VGHandle object,
case VG_IMAGE_HEIGHT:
#ifdef OPENVG_VERSION_1_1
case VG_FONT_NUM_GLYPHS:
- return vgGetParameteri(object, paramType);
+ return vegaGetParameteri(object, paramType);
break;
#endif
@@ -1431,30 +1436,29 @@ VGint vegaGetParameteri(VGHandle object,
VGint paramType)
{
struct vg_context *ctx = vg_current_context();
- void *ptr = (void*)object;
- if (!ptr || object == VG_INVALID_HANDLE) {
+ if (object == VG_INVALID_HANDLE) {
vg_set_error(ctx, VG_BAD_HANDLE_ERROR);
return 0;
}
switch(paramType) {
case VG_PAINT_TYPE: {
- struct vg_paint *paint = (struct vg_paint *)ptr;
+ struct vg_paint *paint = handle_to_paint(object);
return paint_type(paint);
}
break;
case VG_PAINT_COLOR_RAMP_SPREAD_MODE: {
- struct vg_paint *p = (struct vg_paint *)object;
+ struct vg_paint *p = handle_to_paint(object);
return paint_spread_mode(p);
}
case VG_PAINT_COLOR_RAMP_PREMULTIPLIED: {
- struct vg_paint *p = (struct vg_paint *)object;
+ struct vg_paint *p = handle_to_paint(object);
return paint_color_ramp_premultiplied(p);
}
break;
case VG_PAINT_PATTERN_TILING_MODE: {
- struct vg_paint *p = (struct vg_paint *)object;
+ struct vg_paint *p = handle_to_paint(object);
return paint_pattern_tiling(p);
}
break;
@@ -1469,40 +1473,40 @@ VGint vegaGetParameteri(VGHandle object,
return VG_PATH_FORMAT_STANDARD;
case VG_PATH_SCALE:
case VG_PATH_BIAS:
- return vgGetParameterf(object, paramType);
+ return vegaGetParameterf(object, paramType);
case VG_PATH_DATATYPE: {
- struct path *p = (struct path*)object;
+ struct path *p = handle_to_path(object);
return path_datatype(p);
}
case VG_PATH_NUM_SEGMENTS: {
- struct path *p = (struct path*)object;
+ struct path *p = handle_to_path(object);
return path_num_segments(p);
}
case VG_PATH_NUM_COORDS: {
- struct path *p = (struct path*)object;
+ struct path *p = handle_to_path(object);
return path_num_coords(p);
}
break;
case VG_IMAGE_FORMAT: {
- struct vg_image *img = (struct vg_image*)object;
+ struct vg_image *img = handle_to_image(object);
return img->format;
}
break;
case VG_IMAGE_WIDTH: {
- struct vg_image *img = (struct vg_image*)object;
+ struct vg_image *img = handle_to_image(object);
return img->width;
}
break;
case VG_IMAGE_HEIGHT: {
- struct vg_image *img = (struct vg_image*)object;
+ struct vg_image *img = handle_to_image(object);
return img->height;
}
break;
#ifdef OPENVG_VERSION_1_1
case VG_FONT_NUM_GLYPHS: {
- struct vg_font *font = (struct vg_font*)object;
+ struct vg_font *font = handle_to_font(object);
return font_num_glyphs(font);
}
break;
@@ -1521,10 +1525,9 @@ void vegaGetParameterfv(VGHandle object,
VGfloat * values)
{
struct vg_context *ctx = vg_current_context();
- void *ptr = (void*)object;
- VGint real_count = vgGetParameterVectorSize(object, paramType);
+ VGint real_count = vegaGetParameterVectorSize(object, paramType);
- if (!ptr || object == VG_INVALID_HANDLE) {
+ if (object == VG_INVALID_HANDLE) {
vg_set_error(ctx, VG_BAD_HANDLE_ERROR);
return;
}
@@ -1537,41 +1540,41 @@ void vegaGetParameterfv(VGHandle object,
switch(paramType) {
case VG_PAINT_TYPE: {
- struct vg_paint *p = (struct vg_paint *)object;
+ struct vg_paint *p = handle_to_paint(object);
values[0] = paint_type(p);
}
break;
case VG_PAINT_COLOR_RAMP_SPREAD_MODE: {
- struct vg_paint *p = (struct vg_paint *)object;
+ struct vg_paint *p = handle_to_paint(object);
values[0] = paint_spread_mode(p);
}
break;
case VG_PAINT_COLOR_RAMP_PREMULTIPLIED: {
- struct vg_paint *p = (struct vg_paint *)object;
+ struct vg_paint *p = handle_to_paint(object);
values[0] = paint_color_ramp_premultiplied(p);
}
break;
case VG_PAINT_PATTERN_TILING_MODE: {
- values[0] = vgGetParameterf(object, paramType);
+ values[0] = vegaGetParameterf(object, paramType);
}
break;
case VG_PAINT_COLOR: {
- struct vg_paint *paint = (struct vg_paint *)object;
+ struct vg_paint *paint = handle_to_paint(object);
paint_get_color(paint, values);
}
break;
case VG_PAINT_COLOR_RAMP_STOPS: {
- struct vg_paint *paint = (struct vg_paint *)object;
+ struct vg_paint *paint = handle_to_paint(object);
paint_ramp_stops(paint, values, count);
}
break;
case VG_PAINT_LINEAR_GRADIENT: {
- struct vg_paint *paint = (struct vg_paint *)object;
+ struct vg_paint *paint = handle_to_paint(object);
paint_linear_gradient(paint, values);
}
break;
case VG_PAINT_RADIAL_GRADIENT: {
- struct vg_paint *paint = (struct vg_paint *)object;
+ struct vg_paint *paint = handle_to_paint(object);
paint_radial_gradient(paint, values);
}
break;
@@ -1580,11 +1583,11 @@ void vegaGetParameterfv(VGHandle object,
case VG_PATH_DATATYPE:
case VG_PATH_NUM_SEGMENTS:
case VG_PATH_NUM_COORDS:
- values[0] = vgGetParameteri(object, paramType);
+ values[0] = vegaGetParameteri(object, paramType);
break;
case VG_PATH_SCALE:
case VG_PATH_BIAS:
- values[0] = vgGetParameterf(object, paramType);
+ values[0] = vegaGetParameterf(object, paramType);
break;
case VG_IMAGE_FORMAT:
@@ -1592,7 +1595,7 @@ void vegaGetParameterfv(VGHandle object,
case VG_IMAGE_HEIGHT:
#ifdef OPENVG_VERSION_1_1
case VG_FONT_NUM_GLYPHS:
- values[0] = vgGetParameteri(object, paramType);
+ values[0] = vegaGetParameteri(object, paramType);
break;
#endif
@@ -1608,10 +1611,9 @@ void vegaGetParameteriv(VGHandle object,
VGint * values)
{
struct vg_context *ctx = vg_current_context();
- void *ptr = (void*)object;
- VGint real_count = vgGetParameterVectorSize(object, paramType);
+ VGint real_count = vegaGetParameterVectorSize(object, paramType);
- if (!ptr || object == VG_INVALID_HANDLE) {
+ if (object || object == VG_INVALID_HANDLE) {
vg_set_error(ctx, VG_BAD_HANDLE_ERROR);
return;
}
@@ -1629,45 +1631,45 @@ void vegaGetParameteriv(VGHandle object,
case VG_PAINT_PATTERN_TILING_MODE:
#ifdef OPENVG_VERSION_1_1
case VG_FONT_NUM_GLYPHS:
- values[0] = vgGetParameteri(object, paramType);
+ values[0] = vegaGetParameteri(object, paramType);
break;
#endif
case VG_PAINT_COLOR: {
- struct vg_paint *paint = (struct vg_paint *)object;
+ struct vg_paint *paint = handle_to_paint(object);
paint_get_coloriv(paint, values);
}
break;
case VG_PAINT_COLOR_RAMP_STOPS: {
- struct vg_paint *paint = (struct vg_paint *)object;
+ struct vg_paint *paint = handle_to_paint(object);
paint_ramp_stopsi(paint, values, count);
}
break;
case VG_PAINT_LINEAR_GRADIENT: {
- struct vg_paint *paint = (struct vg_paint *)object;
+ struct vg_paint *paint = handle_to_paint(object);
paint_linear_gradienti(paint, values);
}
break;
case VG_PAINT_RADIAL_GRADIENT: {
- struct vg_paint *paint = (struct vg_paint *)object;
+ struct vg_paint *paint = handle_to_paint(object);
paint_radial_gradienti(paint, values);
}
break;
case VG_PATH_SCALE:
case VG_PATH_BIAS:
- values[0] = vgGetParameterf(object, paramType);
+ values[0] = vegaGetParameterf(object, paramType);
break;
case VG_PATH_FORMAT:
case VG_PATH_DATATYPE:
case VG_PATH_NUM_SEGMENTS:
case VG_PATH_NUM_COORDS:
- values[0] = vgGetParameteri(object, paramType);
+ values[0] = vegaGetParameteri(object, paramType);
break;
case VG_IMAGE_FORMAT:
case VG_IMAGE_WIDTH:
case VG_IMAGE_HEIGHT:
- values[0] = vgGetParameteri(object, paramType);
+ values[0] = vegaGetParameteri(object, paramType);
break;
default:
diff --git a/src/gallium/state_trackers/vega/api_path.c b/src/gallium/state_trackers/vega/api_path.c
index fe57b7671d9..ab6ce958945 100644
--- a/src/gallium/state_trackers/vega/api_path.c
+++ b/src/gallium/state_trackers/vega/api_path.c
@@ -27,6 +27,7 @@
#include "VG/openvg.h"
#include "vg_context.h"
+#include "handle.h"
#include "path.h"
#include "api.h"
@@ -55,9 +56,9 @@ VGPath vegaCreatePath(VGint pathFormat,
return VG_INVALID_HANDLE;
}
- return (VGPath)path_create(datatype, scale, bias,
- segmentCapacityHint, coordCapacityHint,
- capabilities);
+ return path_to_handle(path_create(datatype, scale, bias,
+ segmentCapacityHint, coordCapacityHint,
+ capabilities));
}
void vegaClearPath(VGPath path, VGbitfield capabilities)
@@ -70,7 +71,7 @@ void vegaClearPath(VGPath path, VGbitfield capabilities)
return;
}
- p = (struct path *)path;
+ p = handle_to_path(path);
path_clear(p, capabilities);
}
@@ -84,7 +85,7 @@ void vegaDestroyPath(VGPath p)
return;
}
- path = (struct path *)p;
+ path = handle_to_path(p);
path_destroy(path);
}
@@ -100,7 +101,7 @@ void vegaRemovePathCapabilities(VGPath path,
return;
}
- p = (struct path*)path;
+ p = handle_to_path(path);
current = path_capabilities(p);
path_set_capabilities(p, (current &
(~(capabilities & VG_PATH_CAPABILITY_ALL))));
@@ -115,7 +116,7 @@ VGbitfield vegaGetPathCapabilities(VGPath path)
vg_set_error(ctx, VG_BAD_HANDLE_ERROR);
return 0;
}
- p = (struct path*)path;
+ p = handle_to_path(path);
return path_capabilities(p);
}
@@ -128,8 +129,8 @@ void vegaAppendPath(VGPath dstPath, VGPath srcPath)
vg_set_error(ctx, VG_BAD_HANDLE_ERROR);
return;
}
- src = (struct path *)srcPath;
- dst = (struct path *)dstPath;
+ src = handle_to_path(srcPath);
+ dst = handle_to_path(dstPath);
if (!(path_capabilities(src) & VG_PATH_CAPABILITY_APPEND_FROM) ||
!(path_capabilities(dst) & VG_PATH_CAPABILITY_APPEND_TO)) {
@@ -167,9 +168,9 @@ void vegaAppendPathData(VGPath dstPath,
}
}
- p = (struct path*)dstPath;
+ p = handle_to_path(dstPath);
- if (!pathData || !is_aligned_to(pathData, path_datatype_size(p))) {
+ if (!p || !is_aligned_to(p, path_datatype_size(p))) {
vg_set_error(ctx, VG_ILLEGAL_ARGUMENT_ERROR);
return;
}
@@ -199,7 +200,7 @@ void vegaModifyPathCoords(VGPath dstPath,
return;
}
- p = (struct path *)dstPath;
+ p = handle_to_path(dstPath);
if (!pathData || !is_aligned_to(pathData, path_datatype_size(p))) {
vg_set_error(ctx, VG_ILLEGAL_ARGUMENT_ERROR);
@@ -226,8 +227,8 @@ void vegaTransformPath(VGPath dstPath, VGPath srcPath)
vg_set_error(ctx, VG_BAD_HANDLE_ERROR);
return;
}
- src = (struct path *)srcPath;
- dst = (struct path *)dstPath;
+ src = handle_to_path(srcPath);
+ dst = handle_to_path(dstPath);
if (!(path_capabilities(src) & VG_PATH_CAPABILITY_TRANSFORM_FROM) ||
!(path_capabilities(dst) & VG_PATH_CAPABILITY_TRANSFORM_TO)) {
@@ -251,9 +252,9 @@ VGboolean vegaInterpolatePath(VGPath dstPath,
vg_set_error(ctx, VG_BAD_HANDLE_ERROR);
return VG_FALSE;
}
- dst = (struct path *)dstPath;
- start = (struct path *)startPath;
- end = (struct path *)endPath;
+ dst = handle_to_path(dstPath);
+ start = handle_to_path(startPath);
+ end = handle_to_path(endPath);
if (!(path_capabilities(dst) & VG_PATH_CAPABILITY_INTERPOLATE_TO) ||
!(path_capabilities(start) & VG_PATH_CAPABILITY_INTERPOLATE_FROM) ||
@@ -285,7 +286,7 @@ VGfloat vegaPathLength(VGPath path,
vg_set_error(ctx, VG_ILLEGAL_ARGUMENT_ERROR);
return -1;
}
- p = (struct path*)path;
+ p = handle_to_path(path);
if (!(path_capabilities(p) & VG_PATH_CAPABILITY_PATH_LENGTH)) {
vg_set_error(ctx, VG_PATH_CAPABILITY_ERROR);
@@ -330,7 +331,7 @@ void vegaPointAlongPath(VGPath path,
return;
}
- p = (struct path*)path;
+ p = handle_to_path(path);
caps = path_capabilities(p);
if (!(caps & VG_PATH_CAPABILITY_POINT_ALONG_PATH) ||
@@ -385,7 +386,7 @@ void vegaPathBounds(VGPath path,
return;
}
- p = (struct path*)path;
+ p = handle_to_path(path);
caps = path_capabilities(p);
if (!(caps & VG_PATH_CAPABILITY_PATH_BOUNDS)) {
@@ -422,7 +423,7 @@ void vegaPathTransformedBounds(VGPath path,
return;
}
- p = (struct path*)path;
+ p = handle_to_path(path);
caps = path_capabilities(p);
if (!(caps & VG_PATH_CAPABILITY_PATH_TRANSFORMED_BOUNDS)) {
@@ -466,6 +467,7 @@ void vegaPathTransformedBounds(VGPath path,
void vegaDrawPath(VGPath path, VGbitfield paintModes)
{
struct vg_context *ctx = vg_current_context();
+ struct path *p = handle_to_path(path);
if (path == VG_INVALID_HANDLE) {
vg_set_error(ctx, VG_BAD_HANDLE_ERROR);
@@ -477,9 +479,9 @@ void vegaDrawPath(VGPath path, VGbitfield paintModes)
return;
}
- if (path_is_empty((struct path*)path))
+ if (path_is_empty(p))
return;
- path_render((struct path*)path, paintModes,
+ path_render(p, paintModes,
&ctx->state.vg.path_user_to_surface_matrix);
}
diff --git a/src/gallium/state_trackers/vega/api_text.c b/src/gallium/state_trackers/vega/api_text.c
index 7c6b4794099..824c7630403 100644
--- a/src/gallium/state_trackers/vega/api_text.c
+++ b/src/gallium/state_trackers/vega/api_text.c
@@ -29,6 +29,7 @@
#include "vg_context.h"
#include "text.h"
#include "api.h"
+#include "handle.h"
#include "util/u_memory.h"
@@ -43,19 +44,19 @@ VGFont vegaCreateFont(VGint glyphCapacityHint)
return VG_INVALID_HANDLE;
}
- return (VGFont) font_create(glyphCapacityHint);
+ return font_to_handle(font_create(glyphCapacityHint));
}
void vegaDestroyFont(VGFont f)
{
- struct vg_font *font = (struct vg_font *)f;
+ struct vg_font *font = handle_to_font(f);
struct vg_context *ctx = vg_current_context();
if (f == VG_INVALID_HANDLE) {
vg_set_error(ctx, VG_BAD_HANDLE_ERROR);
return;
}
- if (!vg_object_is_valid((void *) font, VG_OBJECT_FONT)) {
+ if (!vg_object_is_valid(f, VG_OBJECT_FONT)) {
vg_set_error(ctx, VG_BAD_HANDLE_ERROR);
return;
}
@@ -75,7 +76,7 @@ void vegaSetGlyphToPath(VGFont font,
struct vg_font *f;
if (font == VG_INVALID_HANDLE ||
- !vg_context_is_object_valid(ctx, VG_OBJECT_FONT, (void *)font)) {
+ !vg_context_is_object_valid(ctx, VG_OBJECT_FONT, font)) {
vg_set_error(ctx, VG_BAD_HANDLE_ERROR);
return;
}
@@ -85,13 +86,13 @@ void vegaSetGlyphToPath(VGFont font,
return;
}
if (path != VG_INVALID_HANDLE &&
- !vg_context_is_object_valid(ctx, VG_OBJECT_PATH, (void *)path)) {
+ !vg_context_is_object_valid(ctx, VG_OBJECT_PATH, path)) {
vg_set_error(ctx, VG_BAD_HANDLE_ERROR);
return;
}
- pathObj = (struct path*) path;
- f = (struct vg_font*) font;
+ pathObj = handle_to_path(path);
+ f = handle_to_font(font);
font_set_glyph_to_path(f, glyphIndex, pathObj,
isHinted, glyphOrigin, escapement);
@@ -108,7 +109,7 @@ void vegaSetGlyphToImage(VGFont font,
struct vg_font *f;
if (font == VG_INVALID_HANDLE ||
- !vg_context_is_object_valid(ctx, VG_OBJECT_FONT, (void *)font)) {
+ !vg_context_is_object_valid(ctx, VG_OBJECT_FONT, font)) {
vg_set_error(ctx, VG_BAD_HANDLE_ERROR);
return;
}
@@ -118,13 +119,13 @@ void vegaSetGlyphToImage(VGFont font,
return;
}
if (image != VG_INVALID_HANDLE &&
- !vg_context_is_object_valid(ctx, VG_OBJECT_IMAGE, (void *)image)) {
+ !vg_context_is_object_valid(ctx, VG_OBJECT_IMAGE, image)) {
vg_set_error(ctx, VG_BAD_HANDLE_ERROR);
return;
}
- img_obj = (struct vg_image*)image;
- f = (struct vg_font*)font;
+ img_obj = handle_to_image(image);
+ f = handle_to_font(font);
font_set_glyph_to_image(f, glyphIndex, img_obj, glyphOrigin, escapement);
}
@@ -140,7 +141,7 @@ void vegaClearGlyph(VGFont font,
return;
}
- f = (struct vg_font*) font;
+ f = handle_to_font(font);
font_clear_glyph(f, glyphIndex);
}
@@ -161,7 +162,7 @@ void vegaDrawGlyph(VGFont font,
vg_set_error(ctx, VG_ILLEGAL_ARGUMENT_ERROR);
return;
}
- f = (struct vg_font*)font;
+ f = handle_to_font(font);
font_draw_glyph(f, glyphIndex, paintModes, allowAutoHinting);
}
@@ -199,7 +200,7 @@ void vegaDrawGlyphs(VGFont font,
return;
}
- f = (struct vg_font*)font;
+ f = handle_to_font(font);
font_draw_glyphs(f, glyphCount, glyphIndices,
adjustments_x, adjustments_y, paintModes, allowAutoHinting);
diff --git a/src/gallium/state_trackers/vega/handle.c b/src/gallium/state_trackers/vega/handle.c
new file mode 100644
index 00000000000..11eedd923ed
--- /dev/null
+++ b/src/gallium/state_trackers/vega/handle.c
@@ -0,0 +1,93 @@
+/**************************************************************************
+ *
+ * Copyright 2010 VMware, Inc. All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+
+#include "handle.h"
+#include "util/u_hash.h"
+#include "util/u_hash_table.h"
+
+
+/**
+ * Hash keys are 32-bit VGHandles
+ */
+
+struct util_hash_table *handle_hash = NULL;
+
+
+static unsigned next_handle = 1;
+
+
+static unsigned
+hash_func(void *key)
+{
+ /* XXX this kind of ugly */
+ intptr_t ip = pointer_to_intptr(key);
+ return (unsigned) (ip & 0xffffffff);
+}
+
+
+static int
+compare(void *key1, void *key2)
+{
+ if (key1 < key2)
+ return -1;
+ else if (key1 > key2)
+ return +1;
+ else
+ return 0;
+}
+
+
+void
+init_handles(void)
+{
+ if (!handle_hash)
+ handle_hash = util_hash_table_create(hash_func, compare);
+}
+
+
+void
+free_handles(void)
+{
+ /* XXX destroy */
+}
+
+
+VGHandle
+create_handle(void *object)
+{
+ VGHandle h = next_handle++;
+ util_hash_table_set(handle_hash, intptr_to_pointer(h), object);
+ return h;
+}
+
+
+void
+destroy_handle(VGHandle h)
+{
+ util_hash_table_remove(handle_hash, intptr_to_pointer(h));
+}
+
diff --git a/src/gallium/state_trackers/vega/handle.h b/src/gallium/state_trackers/vega/handle.h
new file mode 100644
index 00000000000..9ed326d5098
--- /dev/null
+++ b/src/gallium/state_trackers/vega/handle.h
@@ -0,0 +1,171 @@
+/**************************************************************************
+ *
+ * Copyright 2010 VMware, Inc. All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+
+/**
+ * Convert opaque VG object handles into pointers and vice versa.
+ * XXX This is not yet 64-bit safe! All VG handles are 32 bits in size.
+ */
+
+
+#ifndef HANDLE_H
+#define HANDLE_H
+
+#include "pipe/p_compiler.h"
+#include "util/u_hash_table.h"
+#include "util/u_pointer.h"
+
+#include "VG/openvg.h"
+#include "vg_context.h"
+
+
+extern struct util_hash_table *handle_hash;
+
+
+struct vg_mask_layer;
+struct vg_font;
+struct vg_image;
+struct vg_paint;
+struct path;
+
+
+extern void
+init_handles(void);
+
+
+extern void
+free_handles(void);
+
+
+extern VGHandle
+create_handle(void *object);
+
+
+extern void
+destroy_handle(VGHandle h);
+
+
+static INLINE VGHandle
+object_to_handle(struct vg_object *obj)
+{
+ return obj ? obj->handle : VG_INVALID_HANDLE;
+}
+
+
+static INLINE VGHandle
+image_to_handle(struct vg_image *img)
+{
+ /* vg_image is derived from vg_object */
+ return object_to_handle((struct vg_object *) img);
+}
+
+
+static INLINE VGHandle
+masklayer_to_handle(struct vg_mask_layer *mask)
+{
+ /* vg_object is derived from vg_object */
+ return object_to_handle((struct vg_object *) mask);
+}
+
+
+static INLINE VGHandle
+font_to_handle(struct vg_font *font)
+{
+ return object_to_handle((struct vg_object *) font);
+}
+
+
+static INLINE VGHandle
+paint_to_handle(struct vg_paint *paint)
+{
+ return object_to_handle((struct vg_object *) paint);
+}
+
+
+static INLINE VGHandle
+path_to_handle(struct path *path)
+{
+ return object_to_handle((struct vg_object *) path);
+}
+
+
+static INLINE void *
+handle_to_pointer(VGHandle h)
+{
+ void *v = util_hash_table_get(handle_hash, intptr_to_pointer(h));
+#ifdef DEBUG
+ if (v) {
+ struct vg_object *obj = (struct vg_object *) v;
+ assert(obj->handle == h);
+ }
+#endif
+ return v;
+}
+
+
+static INLINE struct vg_font *
+handle_to_font(VGHandle h)
+{
+ return (struct vg_font *) handle_to_pointer(h);
+}
+
+
+static INLINE struct vg_image *
+handle_to_image(VGHandle h)
+{
+ return (struct vg_image *) handle_to_pointer(h);
+}
+
+
+static INLINE struct vg_mask_layer *
+handle_to_masklayer(VGHandle h)
+{
+ return (struct vg_mask_layer *) handle_to_pointer(h);
+}
+
+
+static INLINE struct vg_object *
+handle_to_object(VGHandle h)
+{
+ return (struct vg_object *) handle_to_pointer(h);
+}
+
+
+static INLINE struct vg_paint *
+handle_to_paint(VGHandle h)
+{
+ return (struct vg_paint *) handle_to_pointer(h);
+}
+
+
+static INLINE struct path *
+handle_to_path(VGHandle h)
+{
+ return (struct path *) handle_to_pointer(h);
+}
+
+
+#endif /* HANDLE_H */
diff --git a/src/gallium/state_trackers/vega/image.c b/src/gallium/state_trackers/vega/image.c
index 318ea94bdfb..44480876b6e 100644
--- a/src/gallium/state_trackers/vega/image.c
+++ b/src/gallium/state_trackers/vega/image.c
@@ -257,7 +257,7 @@ struct vg_image * image_create(VGImageFormat format,
image->sampler.normalized_coords = 1;
assert(screen->is_format_supported(screen, pformat, PIPE_TEXTURE_2D,
- 0, PIPE_BIND_SAMPLER_VIEW, 0));
+ 0, PIPE_BIND_SAMPLER_VIEW));
memset(&pt, 0, sizeof(pt));
pt.target = PIPE_TEXTURE_2D;
@@ -349,6 +349,8 @@ void image_destroy(struct vg_image *img)
array_destroy(img->children_array);
}
+ vg_free_object(&img->base);
+
pipe_sampler_view_reference(&img->sampler_view, NULL);
FREE(img);
}
@@ -516,8 +518,6 @@ void image_copy(struct vg_image *dst, VGint dx, VGint dy,
vg_set_error(ctx, VG_ILLEGAL_ARGUMENT_ERROR);
return;
}
- /* make sure rendering has completed */
- ctx->pipe->flush(ctx->pipe, PIPE_FLUSH_RENDER_CACHE, NULL);
vg_copy_texture(ctx, dst->sampler_view->texture, dst->x + dx, dst->y + dy,
src->sampler_view, src->x + sx, src->y + sy, width, height);
}
@@ -567,9 +567,6 @@ void image_set_pixels(VGint dx, VGint dy,
struct pipe_surface *surf, surf_tmpl;
struct st_renderbuffer *strb = ctx->draw_buffer->strb;
- /* make sure rendering has completed */
- pipe->flush(pipe, PIPE_FLUSH_RENDER_CACHE, NULL);
-
memset(&surf_tmpl, 0, sizeof(surf_tmpl));
u_surface_default_template(&surf_tmpl, image_texture(src),
0 /* no bind flag - not a surface*/);
@@ -593,9 +590,6 @@ void image_get_pixels(struct vg_image *dst, VGint dx, VGint dy,
/* flip the y coordinates */
/*dy = dst->height - dy - height;*/
- /* make sure rendering has completed */
- pipe->flush(pipe, PIPE_FLUSH_RENDER_CACHE, NULL);
-
memset(&surf_tmpl, 0, sizeof(surf_tmpl));
u_surface_default_template(&surf_tmpl, image_texture(dst),
PIPE_BIND_RENDER_TARGET);
diff --git a/src/gallium/state_trackers/vega/mask.c b/src/gallium/state_trackers/vega/mask.c
index dfd0600e444..10590e29cd2 100644
--- a/src/gallium/state_trackers/vega/mask.c
+++ b/src/gallium/state_trackers/vega/mask.c
@@ -111,8 +111,6 @@ static void read_alpha_mask(void * data, VGint dataStride,
VGubyte *dst = (VGubyte *)data;
VGint xoffset = 0, yoffset = 0;
- /* make sure rendering has completed */
- pipe->flush(pipe, PIPE_FLUSH_RENDER_CACHE, NULL);
if (sx < 0) {
xoffset = -sx;
xoffset *= _vega_size_for_format(dataFormat);
diff --git a/src/gallium/state_trackers/vega/paint.c b/src/gallium/state_trackers/vega/paint.c
index 2db8cbcf7c8..6e5348a1ff2 100644
--- a/src/gallium/state_trackers/vega/paint.c
+++ b/src/gallium/state_trackers/vega/paint.c
@@ -748,3 +748,10 @@ void paint_fill_constant_buffer(struct vg_paint *paint,
abort();
}
}
+
+VGboolean paint_is_opaque(struct vg_paint *paint)
+{
+ /* TODO add other paint types and make sure PAINT_DIRTY gets set */
+ return (paint->type == VG_PAINT_TYPE_COLOR &&
+ floatsEqual(paint->solid.color[3], 1.0f));
+}
diff --git a/src/gallium/state_trackers/vega/paint.h b/src/gallium/state_trackers/vega/paint.h
index 3de3bbe12ed..e5357763b89 100644
--- a/src/gallium/state_trackers/vega/paint.h
+++ b/src/gallium/state_trackers/vega/paint.h
@@ -118,5 +118,6 @@ void paint_fill_constant_buffer(struct vg_paint *paint,
const struct matrix *mat,
void *buffer);
+VGboolean paint_is_opaque(struct vg_paint *paint);
#endif
diff --git a/src/gallium/state_trackers/vega/polygon.c b/src/gallium/state_trackers/vega/polygon.c
index a491de27fa6..bcc5cb272ca 100644
--- a/src/gallium/state_trackers/vega/polygon.c
+++ b/src/gallium/state_trackers/vega/polygon.c
@@ -303,7 +303,6 @@ void polygon_fill(struct polygon *poly, struct vg_context *ctx)
vbuffer.buffer = poly->vbuf;
vbuffer.stride = COMPONENTS * sizeof(float); /* vertex size */
vbuffer.buffer_offset = 0;
- vbuffer.max_index = poly->num_verts - 1;
renderer_polygon_stencil_begin(ctx->renderer,
&velement, ctx->state.vg.fill_rule, VG_FALSE);
@@ -354,7 +353,6 @@ void polygon_array_fill(struct polygon_array *polyarray, struct vg_context *ctx)
polygon_prepare_buffer(ctx, poly);
vbuffer.buffer = poly->vbuf;
- vbuffer.max_index = poly->num_verts - 1;
renderer_polygon_stencil(ctx->renderer, &vbuffer,
PIPE_PRIM_TRIANGLE_FAN, 0, (VGuint) poly->num_verts);
diff --git a/src/gallium/state_trackers/vega/renderer.c b/src/gallium/state_trackers/vega/renderer.c
index 7871c516c41..5715073e2d9 100644
--- a/src/gallium/state_trackers/vega/renderer.c
+++ b/src/gallium/state_trackers/vega/renderer.c
@@ -28,7 +28,7 @@
#include "renderer.h"
#include "vg_context.h"
-#include "image.h"
+#include "paint.h" /* for paint_is_opaque */
#include "pipe/p_context.h"
#include "pipe/p_state.h"
@@ -140,7 +140,7 @@ static VGboolean renderer_can_support(struct renderer *renderer,
struct pipe_screen *screen = renderer->pipe->screen;
return screen->is_format_supported(screen,
- res->format, res->target, 0, bindings, 0);
+ res->format, res->target, 0, bindings);
}
/**
@@ -174,6 +174,7 @@ static void renderer_set_mvp(struct renderer *renderer,
pipe_resource_reference(&cbuf, NULL);
cbuf = pipe_buffer_create(renderer->pipe->screen,
PIPE_BIND_CONSTANT_BUFFER,
+ PIPE_USAGE_STATIC,
sizeof(consts));
if (cbuf) {
pipe_buffer_write(renderer->pipe, cbuf,
@@ -474,7 +475,8 @@ static void renderer_set_custom_fs(struct renderer *renderer,
pipe_resource_reference(&cbuf, NULL);
cbuf = pipe_buffer_create(renderer->pipe->screen,
- PIPE_BIND_CONSTANT_BUFFER, const_buffer_len);
+ PIPE_BIND_CONSTANT_BUFFER, PIPE_USAGE_STATIC,
+ const_buffer_len);
pipe_buffer_write(renderer->pipe, cbuf, 0,
const_buffer_len, const_buffer);
renderer->pipe->set_constant_buffer(renderer->pipe,
@@ -572,7 +574,7 @@ static void renderer_quad_draw(struct renderer *r)
sizeof(r->vertices),
PIPE_BIND_VERTEX_BUFFER);
if (buf) {
- util_draw_vertex_buffer(r->pipe, buf, 0,
+ util_draw_vertex_buffer(r->pipe, r->cso, buf, 0,
PIPE_PRIM_TRIANGLE_FAN,
Elements(r->vertices), /* verts */
Elements(r->vertices[0])); /* attribs/vert */
@@ -1050,7 +1052,7 @@ void renderer_polygon_stencil(struct renderer *renderer,
{
assert(renderer->state == RENDERER_STATE_POLYGON_STENCIL);
- renderer->pipe->set_vertex_buffers(renderer->pipe, 1, vbuf);
+ cso_set_vertex_buffers(renderer->cso, 1, vbuf);
if (!renderer->u.polygon_stencil.manual_two_sides) {
util_draw_arrays(renderer->pipe, mode, start, count);
@@ -1290,7 +1292,11 @@ static void renderer_validate_blend(struct renderer *renderer,
blend.rt[0].alpha_dst_factor = PIPE_BLENDFACTOR_ZERO;
break;
case VG_BLEND_SRC_OVER:
- if (!util_format_has_alpha(fb_format)) {
+ if (paint_is_opaque(state->fill_paint) &&
+ paint_is_opaque(state->stroke_paint)) {
+ /* no blending */
+ }
+ else if (!util_format_has_alpha(fb_format)) {
blend.rt[0].rgb_src_factor = PIPE_BLENDFACTOR_SRC_ALPHA;
blend.rt[0].alpha_src_factor = PIPE_BLENDFACTOR_ONE;
blend.rt[0].rgb_dst_factor = PIPE_BLENDFACTOR_INV_SRC_ALPHA;
@@ -1457,11 +1463,11 @@ void renderer_copy_surface(struct renderer *ctx,
}
assert(screen->is_format_supported(screen, src->format, PIPE_TEXTURE_2D,
- 0, PIPE_BIND_SAMPLER_VIEW, 0));
+ 0, PIPE_BIND_SAMPLER_VIEW));
assert(screen->is_format_supported(screen, dst->format, PIPE_TEXTURE_2D,
- 0, PIPE_BIND_SAMPLER_VIEW, 0));
+ 0, PIPE_BIND_SAMPLER_VIEW));
assert(screen->is_format_supported(screen, dst->format, PIPE_TEXTURE_2D,
- 0, PIPE_BIND_RENDER_TARGET, 0));
+ 0, PIPE_BIND_RENDER_TARGET));
/*
* XXX for now we're always creating a temporary texture.
diff --git a/src/gallium/state_trackers/vega/shader.c b/src/gallium/state_trackers/vega/shader.c
index 0ed721376cf..bee6d84001d 100644
--- a/src/gallium/state_trackers/vega/shader.c
+++ b/src/gallium/state_trackers/vega/shader.c
@@ -34,9 +34,7 @@
#include "renderer.h"
#include "pipe/p_context.h"
-#include "pipe/p_screen.h"
#include "pipe/p_state.h"
-#include "util/u_inlines.h"
#include "util/u_memory.h"
#include "util/u_math.h"
#include "util/u_format.h"
@@ -136,6 +134,8 @@ static VGboolean blend_use_shader(struct vg_context *ctx)
switch (ctx->state.vg.blend_mode) {
case VG_BLEND_SRC_OVER:
advanced_blending =
+ (!paint_is_opaque(ctx->state.vg.fill_paint) ||
+ !paint_is_opaque(ctx->state.vg.stroke_paint)) &&
util_format_has_alpha(ctx->draw_buffer->strb->format);
break;
case VG_BLEND_DST_OVER:
diff --git a/src/gallium/state_trackers/vega/text.c b/src/gallium/state_trackers/vega/text.c
index 01ff602f58a..6714ee9ad35 100644
--- a/src/gallium/state_trackers/vega/text.c
+++ b/src/gallium/state_trackers/vega/text.c
@@ -30,7 +30,6 @@
#include "text.h"
#include "image.h"
#include "path.h"
-#include "api.h"
#ifdef OPENVG_VERSION_1_1
diff --git a/src/gallium/state_trackers/vega/vg_context.c b/src/gallium/state_trackers/vega/vg_context.c
index 0844012cc3b..c2ab56455b1 100644
--- a/src/gallium/state_trackers/vega/vg_context.c
+++ b/src/gallium/state_trackers/vega/vg_context.c
@@ -30,17 +30,16 @@
#include "renderer.h"
#include "shaders_cache.h"
#include "shader.h"
-#include "asm_util.h"
#include "vg_manager.h"
#include "api.h"
#include "mask.h"
+#include "handle.h"
#include "pipe/p_context.h"
#include "util/u_inlines.h"
#include "cso_cache/cso_context.h"
-#include "util/u_simple_shaders.h"
#include "util/u_memory.h"
#include "util/u_blit.h"
#include "util/u_sampler.h"
@@ -70,7 +69,7 @@ choose_depth_stencil_format(struct vg_context *ctx)
for (fmt = formats; *fmt != PIPE_FORMAT_NONE; fmt++) {
if (screen->is_format_supported(screen, *fmt,
- PIPE_TEXTURE_2D, 0, PIPE_BIND_DEPTH_STENCIL, 0))
+ PIPE_TEXTURE_2D, 0, PIPE_BIND_DEPTH_STENCIL))
break;
}
@@ -184,17 +183,26 @@ void vg_init_object(struct vg_object *obj, struct vg_context *ctx, enum vg_objec
{
obj->type = type;
obj->ctx = ctx;
+ obj->handle = create_handle(obj);
+}
+
+/** free object resources, but not the object itself */
+void vg_free_object(struct vg_object *obj)
+{
+ obj->type = 0;
+ obj->ctx = NULL;
+ destroy_handle(obj->handle);
}
VGboolean vg_context_is_object_valid(struct vg_context *ctx,
enum vg_object_type type,
- void *ptr)
+ VGHandle object)
{
if (ctx) {
struct cso_hash *hash = ctx->owned_objects[type];
if (!hash)
return VG_FALSE;
- return cso_hash_contains(hash, (unsigned)(long)ptr);
+ return cso_hash_contains(hash, (unsigned)(long)object);
}
return VG_FALSE;
}
@@ -400,8 +408,9 @@ void vg_validate_state(struct vg_context *ctx)
if (vg_context_update_depth_stencil_rb(ctx, stfb->width, stfb->height))
ctx->state.dirty |= DEPTH_STENCIL_DIRTY;
- /* blend state depends on fb format */
- if (ctx->state.dirty & FRAMEBUFFER_DIRTY)
+ /* blend state depends on fb format and paint color */
+ if ((ctx->state.dirty & FRAMEBUFFER_DIRTY) ||
+ (ctx->state.dirty & PAINT_DIRTY))
ctx->state.dirty |= BLEND_DIRTY;
renderer_validate(ctx->renderer, ctx->state.dirty,
@@ -414,10 +423,10 @@ void vg_validate_state(struct vg_context *ctx)
shader_set_color_transform(ctx->shader, ctx->state.vg.color_transform);
}
-VGboolean vg_object_is_valid(void *ptr, enum vg_object_type type)
+VGboolean vg_object_is_valid(VGHandle object, enum vg_object_type type)
{
- struct vg_object *obj = ptr;
- if (ptr && is_aligned(obj) && obj->type == type)
+ struct vg_object *obj = handle_to_object(object);
+ if (obj && is_aligned(obj) && obj->type == type)
return VG_TRUE;
else
return VG_FALSE;
diff --git a/src/gallium/state_trackers/vega/vg_context.h b/src/gallium/state_trackers/vega/vg_context.h
index d616a20a3d9..71491a5aa22 100644
--- a/src/gallium/state_trackers/vega/vg_context.h
+++ b/src/gallium/state_trackers/vega/vg_context.h
@@ -81,10 +81,12 @@ enum dirty_state {
BLEND_DIRTY = 1 << 0,
FRAMEBUFFER_DIRTY = 1 << 1,
DEPTH_STENCIL_DIRTY = 1 << 2,
+ PAINT_DIRTY = 1 << 3,
ALL_DIRTY = BLEND_DIRTY |
FRAMEBUFFER_DIRTY |
- DEPTH_STENCIL_DIRTY
+ DEPTH_STENCIL_DIRTY |
+ PAINT_DIRTY
};
struct vg_context
@@ -129,12 +131,21 @@ struct vg_context
struct blit_state *blit;
};
+
+/**
+ * Base class for VG objects like paths, images, fonts.
+ */
struct vg_object {
enum vg_object_type type;
+ VGHandle handle;
struct vg_context *ctx;
};
+
+
void vg_init_object(struct vg_object *obj, struct vg_context *ctx, enum vg_object_type type);
-VGboolean vg_object_is_valid(void *ptr, enum vg_object_type type);
+void vg_free_object(struct vg_object *obj);
+
+VGboolean vg_object_is_valid(VGHandle object, enum vg_object_type type);
struct vg_context *vg_create_context(struct pipe_context *pipe,
const void *visual,
@@ -145,7 +156,7 @@ void vg_set_current_context(struct vg_context *ctx);
VGboolean vg_context_is_object_valid(struct vg_context *ctx,
enum vg_object_type type,
- void *ptr);
+ VGHandle object);
void vg_context_add_object(struct vg_context *ctx,
enum vg_object_type type,
void *ptr);
diff --git a/src/gallium/state_trackers/vega/vg_manager.c b/src/gallium/state_trackers/vega/vg_manager.c
index de935768b22..eeea68677de 100644
--- a/src/gallium/state_trackers/vega/vg_manager.c
+++ b/src/gallium/state_trackers/vega/vg_manager.c
@@ -33,15 +33,14 @@
#include "pipe/p_screen.h"
#include "util/u_memory.h"
#include "util/u_inlines.h"
-#include "util/u_sampler.h"
#include "util/u_box.h"
#include "util/u_surface.h"
#include "vg_api.h"
#include "vg_manager.h"
#include "vg_context.h"
-#include "image.h"
#include "api.h"
+#include "handle.h"
static boolean
vg_context_update_color_rb(struct vg_context *ctx, struct pipe_resource *pt)
@@ -143,8 +142,8 @@ vg_context_flush(struct st_context_iface *stctxi, unsigned flags,
struct pipe_fence_handle **fence)
{
struct vg_context *ctx = (struct vg_context *) stctxi;
- ctx->pipe->flush(ctx->pipe, flags, fence);
- if (flags & PIPE_FLUSH_RENDER_CACHE)
+ ctx->pipe->flush(ctx->pipe, fence);
+ if (flags & ST_FLUSH_FRONT)
vg_manager_flush_frontbuffer(ctx);
}
@@ -174,6 +173,9 @@ vg_api_create_context(struct st_api *stapi, struct st_manager *smapi,
if (attribs->major > 1 || (attribs->major == 1 && attribs->minor > 0))
return NULL;
+ /* for VGHandle / pointer lookups */
+ init_handles();
+
pipe = smapi->screen->context_create(smapi->screen, NULL);
if (!pipe)
return NULL;
diff --git a/src/gallium/state_trackers/vega/vgu.c b/src/gallium/state_trackers/vega/vgu.c
index 7dc51c5599c..4206a91e006 100644
--- a/src/gallium/state_trackers/vega/vgu.c
+++ b/src/gallium/state_trackers/vega/vgu.c
@@ -29,6 +29,7 @@
#include "matrix.h"
#include "path.h"
+#include "handle.h"
#include "util/u_debug.h"
#include "util/u_pointer.h"
@@ -36,16 +37,6 @@
#include <math.h>
#include <assert.h>
-static VGboolean is_aligned_to(const void *ptr, VGbyte alignment)
-{
- void *aligned = align_pointer(ptr, alignment);
- return (ptr == aligned) ? VG_TRUE : VG_FALSE;
-}
-
-static VGboolean is_aligned(const void *ptr)
-{
- return is_aligned_to(ptr, 4);
-}
static void vgu_append_float_coords(VGPath path,
const VGubyte *cmds,
@@ -54,7 +45,7 @@ static void vgu_append_float_coords(VGPath path,
VGint num_coords)
{
VGubyte common_data[40 * sizeof(VGfloat)];
- struct path *p = (struct path *)path;
+ struct path *p = handle_to_path(path);
vg_float_to_datatype(path_datatype(p), common_data, coords, num_coords);
vgAppendPathData(path, num_cmds, cmds, common_data);
diff --git a/src/gallium/state_trackers/wgl/SConscript b/src/gallium/state_trackers/wgl/SConscript
index 1b7597de440..7cb953ba742 100644
--- a/src/gallium/state_trackers/wgl/SConscript
+++ b/src/gallium/state_trackers/wgl/SConscript
@@ -15,6 +15,9 @@ env.AppendUnique(CPPDEFINES = [
'BUILD_GL32', # declare gl* as __declspec(dllexport) in Mesa headers
'WIN32_LEAN_AND_MEAN', # http://msdn2.microsoft.com/en-us/library/6dwk3a1z.aspx
])
+if not env['gles']:
+ # prevent _glapi_* from being declared __declspec(dllimport)
+ env.Append(CPPDEFINES = ['_GLAPI_NO_EXPORTS'])
sources = [
'stw_context.c',
diff --git a/src/gallium/state_trackers/wgl/stw_context.c b/src/gallium/state_trackers/wgl/stw_context.c
index cd4f3c8b3e2..5608d4f4ce7 100644
--- a/src/gallium/state_trackers/wgl/stw_context.c
+++ b/src/gallium/state_trackers/wgl/stw_context.c
@@ -277,7 +277,7 @@ stw_make_current(
return TRUE;
}
} else {
- curctx->st->flush(curctx->st, PIPE_FLUSH_RENDER_CACHE, NULL);
+ curctx->st->flush(curctx->st, ST_FLUSH_FRONT, NULL);
}
}
@@ -351,11 +351,7 @@ stw_flush_current_locked( struct stw_framebuffer *fb )
struct stw_context *ctx = stw_current_context();
if (ctx && ctx->current_framebuffer == fb) {
- ctx->st->flush(ctx->st,
- PIPE_FLUSH_RENDER_CACHE |
- PIPE_FLUSH_SWAPBUFFERS |
- PIPE_FLUSH_FRAME,
- NULL);
+ ctx->st->flush(ctx->st, ST_FLUSH_FRONT, NULL);
}
}
diff --git a/src/gallium/state_trackers/wgl/stw_device.c b/src/gallium/state_trackers/wgl/stw_device.c
index c4822d4d8aa..e65e71dc15f 100644
--- a/src/gallium/state_trackers/wgl/stw_device.c
+++ b/src/gallium/state_trackers/wgl/stw_device.c
@@ -41,8 +41,6 @@
#include "stw_framebuffer.h"
#include "stw_st.h"
-extern _glthread_Mutex OneTimeLock;
-
struct stw_device *stw_dev = NULL;
@@ -50,7 +48,19 @@ static int
stw_get_param(struct st_manager *smapi,
enum st_manager_param param)
{
- return 0;
+ switch (param) {
+ case ST_MANAGER_BROKEN_INVALIDATE:
+ /*
+ * Force framebuffer validation on glViewport.
+ *
+ * Certain applications, like Rhinoceros 4, uses glReadPixels
+ * exclusively (never uses SwapBuffers), so framebuffers never get
+ * resized unless we check on glViewport.
+ */
+ return 1;
+ default:
+ return 0;
+ }
}
boolean
@@ -74,8 +84,6 @@ stw_init(const struct stw_winsys *stw_winsys)
stw_dev->stw_winsys = stw_winsys;
- _glthread_INIT_MUTEX(OneTimeLock);
-
stw_dev->stapi = stw_st_create_api();
stw_dev->smapi = CALLOC_STRUCT(st_manager);
if (!stw_dev->stapi || !stw_dev->smapi)
@@ -168,9 +176,10 @@ stw_cleanup(void)
stw_dev->screen->destroy(stw_dev->screen);
- _glthread_DESTROY_MUTEX(OneTimeLock);
-
+ /* glapi is statically linked: we can call the local destroy function. */
+#ifdef _GLAPI_NO_EXPORTS
_glapi_destroy_multithread();
+#endif
#ifdef DEBUG
debug_memory_end(stw_dev->memdbg_no);
diff --git a/src/gallium/state_trackers/wgl/stw_pixelformat.c b/src/gallium/state_trackers/wgl/stw_pixelformat.c
index 5ede1d43220..333f50c25f6 100644
--- a/src/gallium/state_trackers/wgl/stw_pixelformat.c
+++ b/src/gallium/state_trackers/wgl/stw_pixelformat.c
@@ -225,7 +225,7 @@ stw_pixelformat_init( void )
if(!screen->is_format_supported(screen, color->format, PIPE_TEXTURE_2D,
0, PIPE_BIND_RENDER_TARGET |
- PIPE_BIND_DISPLAY_TARGET, 0))
+ PIPE_BIND_DISPLAY_TARGET))
continue;
for(k = 0; k < Elements(stw_pf_doublebuffer); ++k) {
@@ -235,7 +235,7 @@ stw_pixelformat_init( void )
const struct stw_pf_depth_info *depth = &stw_pf_depth_stencil[l];
if(!screen->is_format_supported(screen, depth->format, PIPE_TEXTURE_2D,
- 0, PIPE_BIND_DEPTH_STENCIL, 0))
+ 0, PIPE_BIND_DEPTH_STENCIL))
continue;
stw_pixelformat_add( stw_dev, color, depth, 0, doublebuffer, samples );
diff --git a/src/gallium/state_trackers/xorg/xorg_crtc.c b/src/gallium/state_trackers/xorg/xorg_crtc.c
index 28e30e09ff3..d751ac18704 100644
--- a/src/gallium/state_trackers/xorg/xorg_crtc.c
+++ b/src/gallium/state_trackers/xorg/xorg_crtc.c
@@ -133,6 +133,14 @@ crtc_set_mode_major(xf86CrtcPtr crtc, DisplayModePtr mode,
if (ret)
return FALSE;
+ /* Only set gamma when needed, to avoid unneeded delays. */
+#if defined(XF86_CRTC_VERSION) && XF86_CRTC_VERSION >= 3
+ if (!crtc->active && crtc->version >= 3)
+ crtc->funcs->gamma_set(crtc, crtc->gamma_red, crtc->gamma_green,
+ crtc->gamma_blue, crtc->gamma_size);
+ crtc->active = TRUE;
+#endif
+
crtc->x = x;
crtc->y = y;
crtc->mode = *mode;
@@ -145,7 +153,10 @@ static void
crtc_gamma_set(xf86CrtcPtr crtc, CARD16 * red, CARD16 * green, CARD16 * blue,
int size)
{
- /* XXX: hockup */
+ modesettingPtr ms = modesettingPTR(crtc->scrn);
+ struct crtc_private *crtcp = crtc->driver_private;
+
+ drmModeCrtcSetGamma(ms->fd, crtcp->drm_crtc->crtc_id, size, red, green, blue);
}
#if 0 /* Implement and enable to enable rotation and reflection. */
diff --git a/src/gallium/state_trackers/xorg/xorg_dri2.c b/src/gallium/state_trackers/xorg/xorg_dri2.c
index 17c34b7eac8..6f2c52eabb6 100644
--- a/src/gallium/state_trackers/xorg/xorg_dri2.c
+++ b/src/gallium/state_trackers/xorg/xorg_dri2.c
@@ -336,7 +336,7 @@ dri2_copy_region(DrawablePtr pDraw, RegionPtr pRegion,
/* pixmap glXWaitX */
if (pSrcBuffer->attachment == DRI2BufferFrontLeft &&
pDestBuffer->attachment == DRI2BufferFakeFrontLeft) {
- ms->ctx->flush(ms->ctx, PIPE_FLUSH_SWAPBUFFERS, NULL);
+ ms->ctx->flush(ms->ctx, NULL);
return;
}
/* pixmap glXWaitGL */
@@ -362,7 +362,8 @@ dri2_copy_region(DrawablePtr pDraw, RegionPtr pRegion,
if (extents->x1 == 0 && extents->y1 == 0 &&
extents->x2 == pDraw->width && extents->y2 == pDraw->height) {
- ms->screen->fence_finish(ms->screen, dst_priv->fence, 0);
+ ms->screen->fence_finish(ms->screen, dst_priv->fence,
+ PIPE_TIMEOUT_INFINITE);
ms->screen->fence_reference(ms->screen, &dst_priv->fence, NULL);
}
}
@@ -388,7 +389,7 @@ dri2_copy_region(DrawablePtr pDraw, RegionPtr pRegion,
FreeScratchGC(gc);
- ms->ctx->flush(ms->ctx, PIPE_FLUSH_SWAPBUFFERS,
+ ms->ctx->flush(ms->ctx,
(pDestBuffer->attachment == DRI2BufferFrontLeft
&& ms->swapThrottling) ?
&dst_priv->fence : NULL);
@@ -451,12 +452,12 @@ xorg_dri2_init(ScreenPtr pScreen)
ms->screen->is_format_supported(ms->screen, PIPE_FORMAT_Z24X8_UNORM,
PIPE_TEXTURE_2D,
0,
- PIPE_BIND_DEPTH_STENCIL, 0);
+ PIPE_BIND_DEPTH_STENCIL);
ms->ds_depth_bits_last =
ms->screen->is_format_supported(ms->screen, PIPE_FORMAT_Z24_UNORM_S8_USCALED,
PIPE_TEXTURE_2D,
0,
- PIPE_BIND_DEPTH_STENCIL, 0);
+ PIPE_BIND_DEPTH_STENCIL);
return DRI2ScreenInit(pScreen, &dri2info);
}
diff --git a/src/gallium/state_trackers/xorg/xorg_driver.c b/src/gallium/state_trackers/xorg/xorg_driver.c
index 66685ecec64..19e9bf84656 100644
--- a/src/gallium/state_trackers/xorg/xorg_driver.c
+++ b/src/gallium/state_trackers/xorg/xorg_driver.c
@@ -44,6 +44,7 @@
#include "xf86Crtc.h"
#include "miscstruct.h"
#include "dixstruct.h"
+#include "xf86cmap.h"
#include "xf86xv.h"
#include "xorgVersion.h"
#ifndef XSERVER_LIBPCIACCESS
@@ -333,7 +334,8 @@ drv_cleanup_fences(ScrnInfoPtr pScrn)
for (i = 0; i < XORG_NR_FENCES; i++) {
if (ms->fence[i]) {
- ms->screen->fence_finish(ms->screen, ms->fence[i], 0);
+ ms->screen->fence_finish(ms->screen, ms->fence[i],
+ PIPE_TIMEOUT_INFINITE);
ms->screen->fence_reference(ms->screen, &ms->fence[i], NULL);
}
}
@@ -414,6 +416,7 @@ drv_pre_init(ScrnInfoPtr pScrn, int flags)
return FALSE;
switch (pScrn->depth) {
+ case 8:
case 15:
case 16:
case 24:
@@ -545,7 +548,7 @@ void xorg_flush(ScreenPtr pScreen)
if (ms->ctx) {
int j;
- ms->ctx->flush(ms->ctx, PIPE_FLUSH_RENDER_CACHE,
+ ms->ctx->flush(ms->ctx,
ms->dirtyThrottling ?
&ms->fence[XORG_NR_FENCES-1] :
NULL);
@@ -553,7 +556,8 @@ void xorg_flush(ScreenPtr pScreen)
if (ms->dirtyThrottling) {
if (ms->fence[0])
ms->ctx->screen->fence_finish(ms->ctx->screen,
- ms->fence[0], 0);
+ ms->fence[0],
+ PIPE_TIMEOUT_INFINITE);
/* The amount of rendering generated by a block handler can be
* quite small. Let us get a fair way ahead of hardware before
@@ -677,6 +681,65 @@ drv_set_master(ScrnInfoPtr pScrn)
}
+static void drv_load_palette(ScrnInfoPtr pScrn, int numColors,
+ int *indices, LOCO *colors, VisualPtr pVisual)
+{
+ xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(pScrn);
+ modesettingPtr ms = modesettingPTR(pScrn);
+ int index, j, i;
+ int c;
+
+ switch(pScrn->depth) {
+ case 15:
+ for (i = 0; i < numColors; i++) {
+ index = indices[i];
+ for (j = 0; j < 8; j++) {
+ ms->lut_r[index * 8 + j] = colors[index].red << 8;
+ ms->lut_g[index * 8 + j] = colors[index].green << 8;
+ ms->lut_b[index * 8 + j] = colors[index].blue << 8;
+ }
+ }
+ break;
+ case 16:
+ for (i = 0; i < numColors; i++) {
+ index = indices[i];
+
+ if (index < 32) {
+ for (j = 0; j < 8; j++) {
+ ms->lut_r[index * 8 + j] = colors[index].red << 8;
+ ms->lut_b[index * 8 + j] = colors[index].blue << 8;
+ }
+ }
+
+ for (j = 0; j < 4; j++) {
+ ms->lut_g[index * 4 + j] = colors[index].green << 8;
+ }
+ }
+ break;
+ default:
+ for (i = 0; i < numColors; i++) {
+ index = indices[i];
+ ms->lut_r[index] = colors[index].red << 8;
+ ms->lut_g[index] = colors[index].green << 8;
+ ms->lut_b[index] = colors[index].blue << 8;
+ }
+ break;
+ }
+
+ for (c = 0; c < xf86_config->num_crtc; c++) {
+ xf86CrtcPtr crtc = xf86_config->crtc[c];
+
+ /* Make the change through RandR */
+#ifdef RANDR_12_INTERFACE
+ if (crtc->randr_crtc)
+ RRCrtcGammaSet(crtc->randr_crtc, ms->lut_r, ms->lut_g, ms->lut_b);
+ else
+#endif
+ crtc->funcs->gamma_set(crtc, ms->lut_r, ms->lut_g, ms->lut_b, 256);
+ }
+}
+
+
static Bool
drv_screen_init(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
{
@@ -816,6 +879,10 @@ drv_screen_init(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
if (!miCreateDefColormap(pScreen))
return FALSE;
+ if (!xf86HandleColormaps(pScreen, 256, 8, drv_load_palette, NULL,
+ CMAP_PALETTED_TRUECOLOR |
+ CMAP_RELOAD_ON_MODE_SWITCH))
+ return FALSE;
xf86DPMSInit(pScreen, xf86DPMSSet, 0);
diff --git a/src/gallium/state_trackers/xorg/xorg_exa.c b/src/gallium/state_trackers/xorg/xorg_exa.c
index 718a3453939..e7d6a93e5ca 100644
--- a/src/gallium/state_trackers/xorg/xorg_exa.c
+++ b/src/gallium/state_trackers/xorg/xorg_exa.c
@@ -349,7 +349,7 @@ ExaPrepareSolid(PixmapPtr pPixmap, int alu, Pixel planeMask, Pixel fg)
if (!exa->scrn->is_format_supported(exa->scrn, priv->tex->format,
priv->tex->target, 0,
- PIPE_BIND_RENDER_TARGET, 0)) {
+ PIPE_BIND_RENDER_TARGET)) {
XORG_FALLBACK("format %s", util_format_name(priv->tex->format));
}
@@ -430,12 +430,12 @@ ExaPrepareCopy(PixmapPtr pSrcPixmap, PixmapPtr pDstPixmap, int xdir,
if (!exa->scrn->is_format_supported(exa->scrn, priv->tex->format,
priv->tex->target, 0,
- PIPE_BIND_RENDER_TARGET, 0))
+ PIPE_BIND_RENDER_TARGET))
XORG_FALLBACK("pDst format %s", util_format_name(priv->tex->format));
if (!exa->scrn->is_format_supported(exa->scrn, src_priv->tex->format,
src_priv->tex->target, 0,
- PIPE_BIND_SAMPLER_VIEW, 0))
+ PIPE_BIND_SAMPLER_VIEW))
XORG_FALLBACK("pSrc format %s", util_format_name(src_priv->tex->format));
exa->copy.src = src_priv;
@@ -630,7 +630,7 @@ ExaPrepareComposite(int op, PicturePtr pSrcPicture,
if (!exa->scrn->is_format_supported(exa->scrn, priv->tex->format,
priv->tex->target, 0,
- PIPE_BIND_RENDER_TARGET, 0))
+ PIPE_BIND_RENDER_TARGET))
XORG_FALLBACK("pDst format: %s", util_format_name(priv->tex->format));
if (priv->picture_format != pDstPicture->format)
@@ -645,7 +645,7 @@ ExaPrepareComposite(int op, PicturePtr pSrcPicture,
if (!exa->scrn->is_format_supported(exa->scrn, priv->tex->format,
priv->tex->target, 0,
- PIPE_BIND_SAMPLER_VIEW, 0))
+ PIPE_BIND_SAMPLER_VIEW))
XORG_FALLBACK("pSrc format: %s", util_format_name(priv->tex->format));
if (!picture_check_formats(priv, pSrcPicture))
@@ -662,7 +662,7 @@ ExaPrepareComposite(int op, PicturePtr pSrcPicture,
if (!exa->scrn->is_format_supported(exa->scrn, priv->tex->format,
priv->tex->target, 0,
- PIPE_BIND_SAMPLER_VIEW, 0))
+ PIPE_BIND_SAMPLER_VIEW))
XORG_FALLBACK("pMask format: %s", util_format_name(priv->tex->format));
if (!picture_check_formats(priv, pMaskPicture))
@@ -1072,19 +1072,20 @@ xorg_gpu_surface(struct pipe_context *pipe, struct exa_pixmap_priv *priv)
}
-void xorg_exa_flush(struct exa_context *exa, uint pipeFlushFlags,
+void xorg_exa_flush(struct exa_context *exa,
struct pipe_fence_handle **fence)
{
- exa->pipe->flush(exa->pipe, pipeFlushFlags, fence);
+ exa->pipe->flush(exa->pipe, fence);
}
void xorg_exa_finish(struct exa_context *exa)
{
struct pipe_fence_handle *fence = NULL;
- xorg_exa_flush(exa, PIPE_FLUSH_RENDER_CACHE, &fence);
+ xorg_exa_flush(exa, &fence);
- exa->pipe->screen->fence_finish(exa->pipe->screen, fence, 0);
+ exa->pipe->screen->fence_finish(exa->pipe->screen, fence,
+ PIPE_TIMEOUT_INFINITE);
exa->pipe->screen->fence_reference(exa->pipe->screen, &fence, NULL);
}
diff --git a/src/gallium/state_trackers/xorg/xorg_exa.h b/src/gallium/state_trackers/xorg/xorg_exa.h
index 1f78f60be74..30b6f0ce460 100644
--- a/src/gallium/state_trackers/xorg/xorg_exa.h
+++ b/src/gallium/state_trackers/xorg/xorg_exa.h
@@ -74,7 +74,7 @@ do { \
struct pipe_surface *
xorg_gpu_surface(struct pipe_context *pipe, struct exa_pixmap_priv *priv);
-void xorg_exa_flush(struct exa_context *exa, uint pipeFlushFlags,
+void xorg_exa_flush(struct exa_context *exa,
struct pipe_fence_handle **fence);
void xorg_exa_finish(struct exa_context *exa);
diff --git a/src/gallium/state_trackers/xorg/xorg_renderer.c b/src/gallium/state_trackers/xorg/xorg_renderer.c
index a3d7c5a70e2..6b799af90c8 100644
--- a/src/gallium/state_trackers/xorg/xorg_renderer.c
+++ b/src/gallium/state_trackers/xorg/xorg_renderer.c
@@ -73,7 +73,7 @@ renderer_draw(struct xorg_renderer *r)
if (buf) {
cso_set_vertex_elements(r->cso, r->attrs_per_vertex, r->velems);
- util_draw_vertex_buffer(pipe, buf, 0,
+ util_draw_vertex_buffer(pipe, r->cso, buf, 0,
PIPE_PRIM_QUADS,
num_verts, /* verts */
r->attrs_per_vertex); /* attribs/vert */
@@ -429,6 +429,7 @@ void renderer_set_constants(struct xorg_renderer *r,
pipe_resource_reference(cbuf, NULL);
*cbuf = pipe_buffer_create(r->pipe->screen,
PIPE_BIND_CONSTANT_BUFFER,
+ PIPE_USAGE_STATIC,
param_bytes);
if (*cbuf) {
@@ -449,8 +450,7 @@ void renderer_copy_prepare(struct xorg_renderer *r,
assert(screen->is_format_supported(screen, dst_surface->format,
PIPE_TEXTURE_2D, 0,
- PIPE_BIND_RENDER_TARGET,
- 0));
+ PIPE_BIND_RENDER_TARGET));
(void) screen;
@@ -518,14 +518,10 @@ renderer_clone_texture(struct xorg_renderer *r,
struct pipe_resource *pt;
struct pipe_resource templ;
- if (pipe->is_resource_referenced(pipe, src, 0, 0) &
- PIPE_REFERENCED_FOR_WRITE)
- pipe->flush(pipe, PIPE_FLUSH_RENDER_CACHE, NULL);
-
/* the coming in texture should already have that invariance */
debug_assert(screen->is_format_supported(screen, src->format,
PIPE_TEXTURE_2D, 0,
- PIPE_BIND_SAMPLER_VIEW, 0));
+ PIPE_BIND_SAMPLER_VIEW));
format = src->format;
@@ -616,7 +612,7 @@ void renderer_draw_yuv(struct xorg_renderer *r,
cso_set_vertex_elements(r->cso, num_attribs, r->velems);
- util_draw_vertex_buffer(pipe, buf, 0,
+ util_draw_vertex_buffer(pipe, r->cso, buf, 0,
PIPE_PRIM_QUADS,
4, /* verts */
num_attribs); /* attribs/vert */
diff --git a/src/gallium/state_trackers/xorg/xorg_tracker.h b/src/gallium/state_trackers/xorg/xorg_tracker.h
index 56397b8fea8..664e8c75730 100644
--- a/src/gallium/state_trackers/xorg/xorg_tracker.h
+++ b/src/gallium/state_trackers/xorg/xorg_tracker.h
@@ -129,6 +129,7 @@ typedef struct _modesettingRec
/* kms */
struct kms_driver *kms;
struct kms_bo *root_bo;
+ uint16_t lut_r[256], lut_g[256], lut_b[256];
/* gallium */
struct pipe_screen *screen;
diff --git a/src/gallium/state_trackers/xorg/xorg_xv.c b/src/gallium/state_trackers/xorg/xorg_xv.c
index c72ba9ef8db..234574b968e 100644
--- a/src/gallium/state_trackers/xorg/xorg_xv.c
+++ b/src/gallium/state_trackers/xorg/xorg_xv.c
@@ -461,20 +461,6 @@ bind_shaders(struct xorg_xv_port_priv *port)
cso_set_fragment_shader_handle(port->r->cso, shader.fs);
}
-static INLINE void
-conditional_flush(struct pipe_context *pipe, struct pipe_resource **tex,
- int num)
-{
- int i;
- for (i = 0; i < num; ++i) {
- if (tex[i] && pipe->is_resource_referenced(pipe, tex[i], 0, 0) &
- PIPE_REFERENCED_FOR_WRITE) {
- pipe->flush(pipe, PIPE_FLUSH_RENDER_CACHE, NULL);
- return;
- }
- }
-}
-
static void
bind_samplers(struct xorg_xv_port_priv *port)
{
@@ -485,8 +471,6 @@ bind_samplers(struct xorg_xv_port_priv *port)
memset(&sampler, 0, sizeof(struct pipe_sampler_state));
- conditional_flush(port->r->pipe, dst, 3);
-
sampler.wrap_s = PIPE_TEX_WRAP_CLAMP;
sampler.wrap_t = PIPE_TEX_WRAP_CLAMP;
sampler.min_img_filter = PIPE_TEX_FILTER_LINEAR;
diff --git a/src/gallium/targets/Android.mk b/src/gallium/targets/Android.mk
index 110284c3c96..2101cd34951 100644
--- a/src/gallium/targets/Android.mk
+++ b/src/gallium/targets/Android.mk
@@ -1,16 +1,24 @@
+# Android.mk for Gallium EGL and gralloc
+
LOCAL_PATH := $(call my-dir)
-gles_SRC_FILES := \
- egl-gdi/egl-static.c
+# EGL
+include $(CLEAR_VARS)
-gles_CFLAGS := \
+LOCAL_SRC_FILES := \
+ egl-static/egl.c \
+ egl-static/egl_pipe.c \
+ egl-static/egl_st.c
+
+LOCAL_CFLAGS := \
-DFEATURE_ES1=1 \
-DFEATURE_ES2=1 \
-DGALLIUM_SOFTPIPE \
+ -D_EGL_MAIN=_eglBuiltInDriverGALLIUM \
-fvisibility=hidden \
-Wno-sign-compare
-gles_C_INCLUDES := \
+LOCAL_C_INCLUDES := \
external/mesa/include \
external/mesa/src/gallium/include \
external/mesa/src/gallium/auxiliary \
@@ -21,136 +29,92 @@ gles_C_INCLUDES := \
external/mesa/src/egl/main \
external/mesa/src/mesa
-gles_STATIC_LIBRARIES := \
+LOCAL_STATIC_LIBRARIES := \
libmesa_st_egl \
libmesa_winsys_sw \
libmesa_pipe_softpipe \
libmesa_st_mesa \
libmesa_glsl \
libmesa_st_mesa \
- libmesa_talloc \
libmesa_gallium
-gles_WHOLE_STATIC_LIBRARIES := \
- libmesa_egl \
- libmesa_glapi
+LOCAL_WHOLE_STATIC_LIBRARIES := \
+ libmesa_egl
-gles_SHARED_LIBRARIES := \
+LOCAL_SHARED_LIBRARIES := \
+ libglapi \
libdl \
libhardware \
liblog \
libcutils
-gralloc_SRC_FILES :=
-
-gralloc_CFLAGS := \
- -fvisibility=hidden \
- -Wno-sign-compare
-
-gralloc_C_INCLUDES := \
- external/mesa/src/gallium/include \
- external/mesa/src/gallium/auxiliary \
- external/mesa/src/gallium/drivers \
- external/mesa/src/gallium/winsys
-
-gralloc_STATIC_LIBRARIES := \
- libmesa_gallium
-
-gralloc_WHOLE_STATIC_LIBRARIES := \
- libmesa_st_gralloc
-
-gralloc_SHARED_LIBRARIES := \
- libdl \
- liblog \
- libcutils \
- libdrm \
- libEGL
-
-ifeq ($(strip $(MESA_BUILD_SWRAST)),true)
-include $(CLEAR_VARS)
-
-LOCAL_SRC_FILES := \
- $(gles_SRC_FILES)
-
-LOCAL_CFLAGS := \
- $(gles_CFLAGS)
-
-LOCAL_C_INCLUDES := \
- $(gles_C_INCLUDES)
-
-LOCAL_STATIC_LIBRARIES := \
- $(gles_STATIC_LIBRARIES)
-
-LOCAL_WHOLE_STATIC_LIBRARIES := \
- $(gles_WHOLE_STATIC_LIBRARIES)
-
-LOCAL_SHARED_LIBRARIES := \
- $(gles_SHARED_LIBRARIES)
-
-LOCAL_MODULE := libGLES_swrast
-LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)/egl
-
-include $(BUILD_SHARED_LIBRARY)
-endif # MESA_BUILD_SWRAST
+ifeq ($(strip $(MESA_BUILD_CLASSIC)),true)
+LOCAL_STATIC_LIBRARIES := \
+ libmesa_classic_egl \
+ $(LOCAL_STATIC_LIBRARIES)
+LOCAL_SHARED_LIBRARIES += libdrm
+endif # MESA_BUILD_CLASSIC
ifeq ($(strip $(MESA_BUILD_I915G)),true)
-include $(CLEAR_VARS)
-
-LOCAL_SRC_FILES := \
- $(gles_SRC_FILES) \
- egl/pipe_i915.c
-
-LOCAL_CFLAGS := \
- $(gles_CFLAGS) \
- -DFEATURE_DRM=1
-
-LOCAL_C_INCLUDES := \
- $(gles_C_INCLUDES)
-
+LOCAL_CFLAGS += -D_EGL_PIPE_I915
LOCAL_STATIC_LIBRARIES := \
libmesa_winsys_i915 \
libmesa_pipe_i915 \
- $(gles_STATIC_LIBRARIES)
-
-LOCAL_WHOLE_STATIC_LIBRARIES := \
- $(gles_WHOLE_STATIC_LIBRARIES)
-
-LOCAL_SHARED_LIBRARIES := \
- $(gles_SHARED_LIBRARIES) \
+ $(LOCAL_STATIC_LIBRARIES)
+LOCAL_SHARED_LIBRARIES += \
libdrm \
libdrm_intel
+endif # MESA_BUILD_I915G
-LOCAL_MODULE := libGLES_i915g
+ifeq ($(strip $(MESA_BUILD_R600G)),true)
+LOCAL_CFLAGS += -D_EGL_PIPE_R600
+LOCAL_STATIC_LIBRARIES := \
+ libmesa_pipe_r600 \
+ libmesa_winsys_r600 \
+ $(LOCAL_STATIC_LIBRARIES)
+LOCAL_SHARED_LIBRARIES += \
+ libdrm \
+ libdrm_radeon
+endif # MESA_BUILD_R600G
+
+LOCAL_MODULE := libGLES_mesa
LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)/egl
include $(BUILD_SHARED_LIBRARY)
-endif # MESA_BUILD_I915G
+# gralloc (broken!)
ifeq ($(strip $(MESA_BUILD_VMWGFX)),true)
include $(CLEAR_VARS)
-LOCAL_SRC_FILES := \
- egl/pipe_vmwgfx.c \
- $(gralloc_SRC_FILES)
+LOCAL_SRC_FILES := egl/egl_pipe.c
LOCAL_CFLAGS := \
- $(gralloc_CFLAGS)
+ -D_EGL_PIPE_VMWGFX=1 \
+ -fvisibility=hidden \
+ -Wno-sign-compare
LOCAL_C_INCLUDES := \
- $(gralloc_C_INCLUDES)
+ external/mesa/src/gallium/include \
+ external/mesa/src/gallium/auxiliary \
+ external/mesa/src/gallium/drivers \
+ external/mesa/src/gallium/winsys
LOCAL_STATIC_LIBRARIES := \
libmesa_pipe_svga \
libmesa_winsys_svga \
- $(gralloc_STATIC_LIBRARIES)
+ libmesa_gallium
LOCAL_WHOLE_STATIC_LIBRARIES := \
- $(gralloc_WHOLE_STATIC_LIBRARIES)
+ libmesa_st_gralloc
LOCAL_SHARED_LIBRARIES := \
- $(gralloc_SHARED_LIBRARIES)
+ libdl \
+ liblog \
+ libcutils \
+ libdrm \
+ libEGL
-LOCAL_MODULE := gralloc.vmwgfx
+LOCAL_MODULE := gralloc.mesa
LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)/hw
include $(BUILD_SHARED_LIBRARY)
diff --git a/src/gallium/targets/SConscript.dri b/src/gallium/targets/SConscript.dri
index bc3671a256b..101863a6848 100644
--- a/src/gallium/targets/SConscript.dri
+++ b/src/gallium/targets/SConscript.dri
@@ -72,7 +72,6 @@ COMMON_DRI_DRM_OBJECTS = [
drienv.AppendUnique(LIBS = [
'expat',
- 'talloc',
])
Export([
diff --git a/src/gallium/targets/dri-noop/Makefile b/src/gallium/targets/dri-noop/Makefile
deleted file mode 100644
index 21c5f4f9f2a..00000000000
--- a/src/gallium/targets/dri-noop/Makefile
+++ /dev/null
@@ -1,34 +0,0 @@
-TOP = ../../../..
-include $(TOP)/configs/current
-
-LIBNAME = noop_dri.so
-
-DRIVER_DEFINES = \
- -D__NOT_HAVE_DRM_H
-
-PIPE_DRIVERS = \
- $(TOP)/src/gallium/state_trackers/dri/sw/libdrisw.a \
- $(TOP)/src/gallium/winsys/sw/dri/libswdri.a \
- $(TOP)/src/gallium/drivers/softpipe/libsoftpipe.a \
- $(TOP)/src/gallium/drivers/trace/libtrace.a \
- $(TOP)/src/gallium/drivers/rbug/librbug.a \
- $(TOP)/src/gallium/drivers/noop/libnoop.a
-
-SWRAST_COMMON_GALLIUM_SOURCES = \
- $(TOP)/src/mesa/drivers/dri/common/utils.c \
- $(TOP)/src/mesa/drivers/dri/common/drisw_util.c \
- $(TOP)/src/mesa/drivers/dri/common/xmlconfig.c
-
-C_SOURCES = \
- swrast_drm_api.c \
- $(SWRAST_COMMON_GALLIUM_SOURCES) \
- $(DRIVER_SOURCES)
-
-ASM_SOURCES =
-
-include ../Makefile.dri
-
-INCLUDES += \
- -I$(TOP)/src/gallium/winsys/sw/dri
-
-symlinks:
diff --git a/src/gallium/targets/dri-noop/SConscript b/src/gallium/targets/dri-noop/SConscript
deleted file mode 100644
index 9c04ee66318..00000000000
--- a/src/gallium/targets/dri-noop/SConscript
+++ /dev/null
@@ -1,31 +0,0 @@
-Import('*')
-
-env = drienv.Clone()
-
-env.Append(CPPPATH = [
- '#/src/gallium/winsys/sw/dri',
-])
-
-env.Prepend(LIBS = [
- st_drisw,
- ws_dri,
- noop,
- mesa,
- glsl,
- gallium,
- COMMON_DRI_SW_OBJECTS
-])
-
-env.Prepend(LIBS = [noop])
-
-swrastg_sources = [
- 'swrast_drm_api.c'
-]
-
-module = env.LoadableModule(
- target ='noop_dri.so',
- source = swrastg_sources,
- SHLIBPREFIX = '',
-)
-
-env.Alias('dri-noop', module)
diff --git a/src/gallium/targets/dri-nouveau/Makefile b/src/gallium/targets/dri-nouveau/Makefile
index 2f64f312b84..eb1ee859a00 100644
--- a/src/gallium/targets/dri-nouveau/Makefile
+++ b/src/gallium/targets/dri-nouveau/Makefile
@@ -10,6 +10,7 @@ PIPE_DRIVERS = \
$(TOP)/src/gallium/drivers/rbug/librbug.a \
$(TOP)/src/gallium/drivers/nvfx/libnvfx.a \
$(TOP)/src/gallium/drivers/nv50/libnv50.a \
+ $(TOP)/src/gallium/drivers/nvc0/libnvc0.a \
$(TOP)/src/gallium/drivers/nouveau/libnouveau.a
C_SOURCES = \
diff --git a/src/gallium/targets/dri-r300/Makefile b/src/gallium/targets/dri-r300/Makefile
index 9afbb13276d..cc77a4bc20d 100644
--- a/src/gallium/targets/dri-r300/Makefile
+++ b/src/gallium/targets/dri-r300/Makefile
@@ -22,6 +22,4 @@ DRIVER_DEFINES = \
include ../Makefile.dri
-DRI_LIB_DEPS += -ldrm_radeon
-
symlinks:
diff --git a/src/gallium/targets/dri-r300/SConscript b/src/gallium/targets/dri-r300/SConscript
index 005b4bbf7f1..683b6c6972d 100644
--- a/src/gallium/targets/dri-r300/SConscript
+++ b/src/gallium/targets/dri-r300/SConscript
@@ -2,8 +2,6 @@ Import('*')
env = drienv.Clone()
-env.ParseConfig('pkg-config --cflags --libs libdrm_radeon')
-
env.Append(CPPDEFINES = ['GALLIUM_RBUG', 'GALLIUM_TRACE', 'GALLIUM_GALAHAD'])
env.Prepend(LIBS = [
diff --git a/src/gallium/targets/dri-r600/Makefile b/src/gallium/targets/dri-r600/Makefile
index 661283de6a8..c8fae2d8585 100644
--- a/src/gallium/targets/dri-r600/Makefile
+++ b/src/gallium/targets/dri-r600/Makefile
@@ -9,7 +9,8 @@ PIPE_DRIVERS = \
$(TOP)/src/gallium/winsys/r600/drm/libr600winsys.a \
$(TOP)/src/gallium/drivers/softpipe/libsoftpipe.a \
$(TOP)/src/gallium/drivers/trace/libtrace.a \
- $(TOP)/src/gallium/drivers/rbug/librbug.a
+ $(TOP)/src/gallium/drivers/rbug/librbug.a \
+ $(TOP)/src/gallium/drivers/noop/libnoop.a
C_SOURCES = \
target.c \
@@ -17,7 +18,7 @@ C_SOURCES = \
$(DRIVER_SOURCES)
DRIVER_DEFINES = \
- -DGALLIUM_RBUG -DGALLIUM_TRACE
+ -DGALLIUM_RBUG -DGALLIUM_TRACE -DGALLIUM_NOOP
include ../Makefile.dri
diff --git a/src/gallium/targets/dri-r600/SConscript b/src/gallium/targets/dri-r600/SConscript
index aa771db2d1a..1df11a8747b 100644
--- a/src/gallium/targets/dri-r600/SConscript
+++ b/src/gallium/targets/dri-r600/SConscript
@@ -2,8 +2,6 @@ Import('*')
env = drienv.Clone()
-env.ParseConfig('pkg-config --cflags --libs libdrm_radeon')
-
env.Append(CPPDEFINES = ['GALLIUM_RBUG', 'GALLIUM_TRACE'])
env.Prepend(LIBS = [
diff --git a/src/gallium/targets/dri-r600/target.c b/src/gallium/targets/dri-r600/target.c
index 8753e2bab17..2fe345402de 100644
--- a/src/gallium/targets/dri-r600/target.c
+++ b/src/gallium/targets/dri-r600/target.c
@@ -1,5 +1,5 @@
#include "state_tracker/drm_driver.h"
-#include "target-helpers/inline_debug_helper.h"
+#include "target-helpers/inline_noop_helper.h"
#include "r600/drm/r600_drm_public.h"
#include "r600/r600_public.h"
diff --git a/src/gallium/targets/dri-vmwgfx/Makefile b/src/gallium/targets/dri-vmwgfx/Makefile
index 38f78932e13..8c716f42fe2 100644
--- a/src/gallium/targets/dri-vmwgfx/Makefile
+++ b/src/gallium/targets/dri-vmwgfx/Makefile
@@ -6,6 +6,7 @@ LIBNAME = vmwgfx_dri.so
PIPE_DRIVERS = \
$(TOP)/src/gallium/state_trackers/dri/drm/libdridrm.a \
$(TOP)/src/gallium/winsys/svga/drm/libsvgadrm.a \
+ $(TOP)/src/gallium/winsys/sw/wrapper/libwsw.a \
$(TOP)/src/gallium/drivers/trace/libtrace.a \
$(TOP)/src/gallium/drivers/rbug/librbug.a \
$(TOP)/src/gallium/drivers/svga/libsvga.a
diff --git a/src/gallium/targets/dri-vmwgfx/SConscript b/src/gallium/targets/dri-vmwgfx/SConscript
index 7888e4f2c8b..17dd0210512 100644
--- a/src/gallium/targets/dri-vmwgfx/SConscript
+++ b/src/gallium/targets/dri-vmwgfx/SConscript
@@ -2,14 +2,14 @@ Import('*')
env = drienv.Clone()
-env.Append(CPPDEFINES = ['GALLIUM_RBUG', 'GALLIUM_TRACE'])
+if True:
+ env.Append(CPPDEFINES = ['GALLIUM_TRACE', 'GALLIUM_RBUG', 'GALLIUM_GALAHAD', 'GALLIUM_SOFTPIPE'])
+ env.Prepend(LIBS = [trace, rbug, galahad, softpipe, ws_wrapper])
env.Prepend(LIBS = [
st_dri,
svgadrm,
svga,
- trace,
- rbug,
mesa,
glsl,
gallium,
@@ -22,4 +22,4 @@ module = env.LoadableModule(
SHLIBPREFIX = '',
)
-env.Alias('dri-vmwgfx', module) \ No newline at end of file
+env.Alias('dri-vmwgfx', module)
diff --git a/src/gallium/targets/dri-vmwgfx/target.c b/src/gallium/targets/dri-vmwgfx/target.c
index 15089d6db26..1362851d6be 100644
--- a/src/gallium/targets/dri-vmwgfx/target.c
+++ b/src/gallium/targets/dri-vmwgfx/target.c
@@ -1,4 +1,5 @@
+#include "target-helpers/inline_wrapper_sw_helper.h"
#include "target-helpers/inline_debug_helper.h"
#include "state_tracker/drm_driver.h"
#include "svga/drm/svga_drm_public.h"
@@ -18,6 +19,8 @@ create_screen(int fd)
if (!screen)
return NULL;
+ screen = sw_screen_wrap(screen);
+
screen = debug_screen_wrap(screen);
return screen;
diff --git a/src/gallium/targets/egl-gdi/SConscript b/src/gallium/targets/egl-gdi/SConscript
deleted file mode 100644
index d52eeb70fd5..00000000000
--- a/src/gallium/targets/egl-gdi/SConscript
+++ /dev/null
@@ -1,55 +0,0 @@
-#######################################################################
-# SConscript for egl-gdi target
-
-Import('*')
-
-env = env.Clone()
-
-env.Append(CPPPATH = [
- '#/src/gallium/state_trackers/egl',
- '#/src/gallium/state_trackers/vega',
- '#/src/egl/main',
- '#/src/mesa',
-])
-
-env.Append(CPPDEFINES = [
- 'FEATURE_VG=1',
- 'GALLIUM_SOFTPIPE',
- 'GALLIUM_RBUG',
- 'GALLIUM_TRACE',
-])
-
-env.Append(LIBS = [
- 'gdi32',
- 'user32',
- 'kernel32',
- 'ws2_32',
-])
-
-env.Prepend(LIBS = [
- st_egl_gdi,
- ws_gdi,
- identity,
- trace,
- rbug,
- softpipe,
- vgapi,
- st_vega,
- gallium,
- egl,
-])
-
-if env['llvm']:
- env.Append(CPPDEFINES = 'GALLIUM_LLVMPIPE')
- env.Prepend(LIBS = [llvmpipe])
-
-egl_gallium = env.SharedLibrary(
- target ='egl_gallium',
- source = 'egl-static.c',
-)
-
-env['no_import_lib'] = 1
-
-egl_gdi = env.InstallSharedLibrary(egl_gallium)
-
-env.Alias('egl-gdi', egl_gdi)
diff --git a/src/gallium/targets/egl-static/SConscript b/src/gallium/targets/egl-static/SConscript
new file mode 100644
index 00000000000..cbd98cc416a
--- /dev/null
+++ b/src/gallium/targets/egl-static/SConscript
@@ -0,0 +1,134 @@
+#######################################################################
+# SConscript for egl-static target
+
+Import('*')
+
+env = env.Clone()
+
+env.Append(CPPPATH = [
+ '#/include',
+ '#/src/egl/main',
+ '#/src/gallium/auxiliary',
+ '#/src/gallium/drivers',
+ '#/src/gallium/include',
+ '#/src/gallium/winsys',
+ '#/src/gallium/state_trackers/egl',
+ '#/src/gallium/state_trackers/vega',
+ '#/src/mesa',
+])
+
+env.Append(CPPDEFINES = [
+ 'GALLIUM_SOFTPIPE',
+ 'GALLIUM_RBUG',
+ 'GALLIUM_TRACE',
+ 'GALLIUM_GALAHAD',
+ '_EGL_MAIN=_eglBuiltInDriverGALLIUM',
+])
+
+env.Prepend(LIBS = [
+ softpipe,
+ rbug,
+ trace,
+ galahad,
+ gallium,
+ egl,
+ st_egl,
+])
+
+if env['llvm']:
+ env.Append(CPPDEFINES = ['GALLIUM_LLVMPIPE'])
+ env.Prepend(LIBS = [llvmpipe])
+
+sources = [
+ 'egl.c',
+ 'egl_pipe.c',
+ 'egl_st.c',
+]
+
+if env['platform'] == 'windows':
+ sources.append('#src/egl/main/egl.def')
+
+ env.Append(LIBS = [
+ 'gdi32',
+ 'user32',
+ 'kernel32',
+ 'ws2_32',
+ ])
+
+ env.Prepend(LIBS = [
+ ws_gdi,
+ ])
+
+# OpenGL ES and OpenGL
+if env['gles']:
+ env.Append(CPPDEFINES = [
+ 'FEATURE_GL=1',
+ 'FEATURE_ES1=1',
+ 'FEATURE_ES2=1'
+ ])
+ env.Prepend(LIBPATH = [shared_glapi.dir])
+ # manually add LIBPREFIX on windows
+ glapi_name = 'glapi' if env['platform'] != 'windows' else 'libglapi'
+ env.Prepend(LIBS = [glapi_name, glsl, mesa])
+
+# OpenVG
+if True:
+ env.Append(CPPDEFINES = ['FEATURE_VG=1'])
+ env.Prepend(LIBPATH = [openvg.dir])
+ # manually add LIBPREFIX on windows
+ openvg_name = 'OpenVG' if env['platform'] != 'windows' else 'libOpenVG'
+ env.Prepend(LIBS = [openvg_name, st_vega])
+
+if env['x11']:
+ env.Prepend(LIBS = [
+ ws_xlib,
+ env['X11_LIBS'],
+ ])
+
+if env['dri']:
+ env.ParseConfig('pkg-config --cflags --libs xfixes')
+
+# pipe drivers
+if env['drm']:
+ env.ParseConfig('pkg-config --cflags --libs libdrm')
+
+ if env['drm_intel']:
+ env.ParseConfig('pkg-config --cflags --libs libdrm_intel')
+ env.Append(CPPDEFINES = ['_EGL_PIPE_I915', '_EGL_PIPE_I965'])
+ env.Prepend(LIBS = [
+ i915drm,
+ i915,
+ i965drm,
+ i965,
+ ws_wrapper,
+ ])
+
+ if env['drm_radeon']:
+ env.Append(CPPDEFINES = ['_EGL_PIPE_R300', '_EGL_PIPE_R600'])
+ env.Prepend(LIBS = [
+ radeonwinsys,
+ r300,
+ r600winsys,
+ r600,
+ ])
+
+ env.Append(CPPDEFINES = ['_EGL_PIPE_VMWGFX'])
+ env.Prepend(LIBS = [
+ svgadrm,
+ svga,
+ ])
+
+# libEGL.dll
+env['LIBPREFIX'] = 'lib'
+env['SHLIBPREFIX'] = 'lib'
+
+egl_gallium = env.SharedLibrary(
+ target ='EGL',
+ source = sources,
+)
+
+env.Depends(egl_gallium, [openvg])
+
+egl_gallium = env.InstallSharedLibrary(egl_gallium, version=(1, 4, 0))
+
+env.Alias('egl-gallium', egl_gallium)
diff --git a/src/gallium/targets/egl-gdi/egl-static.c b/src/gallium/targets/egl-static/egl.c
index ff9735c29b2..e617ff50208 100644
--- a/src/gallium/targets/egl-gdi/egl-static.c
+++ b/src/gallium/targets/egl-static/egl.c
@@ -1,8 +1,8 @@
/*
* Mesa 3-D graphics library
- * Version: 7.9
+ * Version: 7.10
*
- * Copyright (C) 2010 LunarG Inc.
+ * Copyright (C) 2010-2011 LunarG Inc.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@@ -27,42 +27,29 @@
*/
#include "common/egl_g3d_loader.h"
-#include "state_tracker/st_gl_api.h"
-#include "state_tracker/drm_driver.h"
-#include "vg_api.h"
-#include "target-helpers/inline_sw_helper.h"
-#include "target-helpers/inline_debug_helper.h"
#include "egldriver.h"
-static struct st_api *stapis[ST_API_COUNT];
+#include "egl_pipe.h"
+#include "egl_st.h"
+
+static struct egl_g3d_loader egl_g3d_loader;
+
+static struct st_module {
+ boolean initialized;
+ struct st_api *stapi;
+} st_modules[ST_API_COUNT];
static struct st_api *
get_st_api(enum st_api_type api)
{
- struct st_api *stapi;
+ struct st_module *stmod = &st_modules[api];
- stapi = stapis[api];
- if (stapi)
- return stapi;
-
- switch (api) {
-#if FEATURE_GL || FEATURE_ES1 || FEATURE_ES2
- case ST_API_OPENGL:
- stapi = st_gl_api_create();
- break;
-#endif
-#if FEATURE_VG
- case ST_API_OPENVG:
- stapi = (struct st_api *) vg_api_get();
- break;
-#endif
- default:
- break;
+ if (!stmod->initialized) {
+ stmod->stapi = egl_st_create_api(api);
+ stmod->initialized = TRUE;
}
- stapis[api] = stapi;
-
- return stapi;
+ return stmod->stapi;
}
static struct st_api *
@@ -74,75 +61,69 @@ guess_gl_api(enum st_profile_type profile)
static struct pipe_screen *
create_drm_screen(const char *name, int fd)
{
-#if FEATURE_DRM
- return driver_descriptor.create_screen(fd);
-#else
- return NULL;
-#endif
+ return egl_pipe_create_drm_screen(name, fd);
}
static struct pipe_screen *
create_sw_screen(struct sw_winsys *ws)
{
- struct pipe_screen *screen;
-
- screen = sw_screen_create(ws);
- if (screen)
- screen = debug_screen_wrap(screen);
-
- return screen;
+ return egl_pipe_create_swrast_screen(ws);
}
-static void
-init_loader(struct egl_g3d_loader *loader)
+static const struct egl_g3d_loader *
+loader_init(void)
{
-#if FEATURE_GL
- loader->profile_masks[ST_API_OPENGL] |= ST_PROFILE_DEFAULT_MASK;
-#endif
-#if FEATURE_ES1
- loader->profile_masks[ST_API_OPENGL] |= ST_PROFILE_OPENGL_ES1_MASK;
-#endif
-#if FEATURE_ES2
- loader->profile_masks[ST_API_OPENGL] |= ST_PROFILE_OPENGL_ES2_MASK;
-#endif
-#if FEATURE_VG
- loader->profile_masks[ST_API_OPENVG] |= ST_PROFILE_DEFAULT_MASK;
-#endif
-
- loader->get_st_api = get_st_api;
- loader->guess_gl_api = guess_gl_api;
- loader->create_drm_screen = create_drm_screen;
- loader->create_sw_screen = create_sw_screen;
+ int i;
+
+ for (i = 0; i < ST_API_COUNT; i++)
+ egl_g3d_loader.profile_masks[i] = egl_st_get_profile_mask(i);
+
+ egl_g3d_loader.get_st_api = get_st_api;
+ egl_g3d_loader.guess_gl_api = guess_gl_api;
+ egl_g3d_loader.create_drm_screen = create_drm_screen;
+ egl_g3d_loader.create_sw_screen = create_sw_screen;
+
+ return &egl_g3d_loader;
}
static void
-egl_g3d_unload(_EGLDriver *drv)
+loader_fini(void)
{
int i;
- egl_g3d_destroy_driver(drv);
-
for (i = 0; i < ST_API_COUNT; i++) {
- if (stapis[i]) {
- stapis[i]->destroy(stapis[i]);
- stapis[i] = NULL;
+ struct st_module *stmod = &st_modules[i];
+
+ if (stmod->stapi) {
+ stmod->stapi->destroy(stmod->stapi);
+ stmod->stapi = NULL;
}
+ stmod->initialized = FALSE;
}
}
-static struct egl_g3d_loader loader;
+static void
+egl_g3d_unload(_EGLDriver *drv)
+{
+ egl_g3d_destroy_driver(drv);
+ loader_fini();
+}
_EGLDriver *
-_eglMain(const char *args)
+_EGL_MAIN(const char *args)
{
+ const struct egl_g3d_loader *loader;
_EGLDriver *drv;
- init_loader(&loader);
- drv = egl_g3d_create_driver(&loader);
- if (drv) {
- drv->Name = "Gallium";
- drv->Unload = egl_g3d_unload;
+ loader = loader_init();
+ drv = egl_g3d_create_driver(loader);
+ if (!drv) {
+ loader_fini();
+ return NULL;
}
+ drv->Name = "Gallium";
+ drv->Unload = egl_g3d_unload;
+
return drv;
}
diff --git a/src/gallium/targets/egl-static/egl_pipe.c b/src/gallium/targets/egl-static/egl_pipe.c
new file mode 100644
index 00000000000..a33d419e0aa
--- /dev/null
+++ b/src/gallium/targets/egl-static/egl_pipe.c
@@ -0,0 +1,215 @@
+/*
+ * Mesa 3-D graphics library
+ * Version: 7.10
+ *
+ * Copyright (C) 2011 LunarG Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ * Authors:
+ * Chia-I Wu <olv@lunarg.com>
+ */
+#include "target-helpers/inline_debug_helper.h"
+#include "target-helpers/inline_sw_helper.h"
+#include "egl_pipe.h"
+
+/* for i915 */
+#include "i915/drm/i915_drm_public.h"
+#include "i915/i915_public.h"
+/* for i965 */
+#include "target-helpers/inline_wrapper_sw_helper.h"
+#include "i965/drm/i965_drm_public.h"
+#include "i965/brw_public.h"
+/* for nouveau */
+#include "nouveau/drm/nouveau_drm_public.h"
+/* for r300 */
+#include "radeon/drm/radeon_drm_public.h"
+#include "r300/r300_public.h"
+/* for r600 */
+#include "r600/drm/r600_drm_public.h"
+#include "r600/r600_public.h"
+/* for vmwgfx */
+#include "svga/drm/svga_drm_public.h"
+#include "svga/svga_public.h"
+
+static struct pipe_screen *
+pipe_i915_create_screen(int fd)
+{
+#if _EGL_PIPE_I915
+ struct i915_winsys *iws;
+ struct pipe_screen *screen;
+
+ iws = i915_drm_winsys_create(fd);
+ if (!iws)
+ return NULL;
+
+ screen = i915_screen_create(iws);
+ if (!screen)
+ return NULL;
+
+ screen = debug_screen_wrap(screen);
+
+ return screen;
+#else
+ return NULL;
+#endif
+}
+
+static struct pipe_screen *
+pipe_i965_create_screen(int fd)
+{
+#if _EGL_PIPE_I965
+ struct brw_winsys_screen *bws;
+ struct pipe_screen *screen;
+
+ bws = i965_drm_winsys_screen_create(fd);
+ if (!bws)
+ return NULL;
+
+ screen = brw_screen_create(bws);
+ if (!screen)
+ return NULL;
+
+ screen = sw_screen_wrap(screen);
+
+ screen = debug_screen_wrap(screen);
+
+ return screen;
+#else
+ return NULL;
+#endif
+}
+
+static struct pipe_screen *
+pipe_nouveau_create_screen(int fd)
+{
+#if _EGL_PIPE_NOUVEAU
+ struct pipe_screen *screen;
+
+ screen = nouveau_drm_screen_create(fd);
+ if (!screen)
+ return NULL;
+
+ screen = debug_screen_wrap(screen);
+
+ return screen;
+#else
+ return NULL;
+#endif
+}
+
+static struct pipe_screen *
+pipe_r300_create_screen(int fd)
+{
+#if _EGL_PIPE_R300
+ struct r300_winsys_screen *sws;
+ struct pipe_screen *screen;
+
+ sws = r300_drm_winsys_screen_create(fd);
+ if (!sws)
+ return NULL;
+
+ screen = r300_screen_create(sws);
+ if (!screen)
+ return NULL;
+
+ screen = debug_screen_wrap(screen);
+
+ return screen;
+#else
+ return NULL;
+#endif
+}
+
+static struct pipe_screen *
+pipe_r600_create_screen(int fd)
+{
+#if _EGL_PIPE_R600
+ struct radeon *rw;
+ struct pipe_screen *screen;
+
+ rw = r600_drm_winsys_create(fd);
+ if (!rw)
+ return NULL;
+
+ screen = r600_screen_create(rw);
+ if (!screen)
+ return NULL;
+
+ screen = debug_screen_wrap(screen);
+
+ return screen;
+#else
+ return NULL;
+#endif
+}
+
+static struct pipe_screen *
+pipe_vmwgfx_create_screen(int fd)
+{
+#if _EGL_PIPE_VMWGFX
+ struct svga_winsys_screen *sws;
+ struct pipe_screen *screen;
+
+ sws = svga_drm_winsys_screen_create(fd);
+ if (!sws)
+ return NULL;
+
+ screen = svga_screen_create(sws);
+ if (!screen)
+ return NULL;
+
+ screen = debug_screen_wrap(screen);
+
+ return screen;
+#else
+ return NULL;
+#endif
+}
+
+struct pipe_screen *
+egl_pipe_create_drm_screen(const char *name, int fd)
+{
+ if (strcmp(name, "i915") == 0)
+ return pipe_i915_create_screen(fd);
+ else if (strcmp(name, "i965") == 0)
+ return pipe_i965_create_screen(fd);
+ else if (strcmp(name, "nouveau") == 0)
+ return pipe_nouveau_create_screen(fd);
+ else if (strcmp(name, "r300") == 0)
+ return pipe_r300_create_screen(fd);
+ else if (strcmp(name, "r600") == 0)
+ return pipe_r600_create_screen(fd);
+ else if (strcmp(name, "vmwgfx") == 0)
+ return pipe_vmwgfx_create_screen(fd);
+ else
+ return NULL;
+}
+
+struct pipe_screen *
+egl_pipe_create_swrast_screen(struct sw_winsys *ws)
+{
+ struct pipe_screen *screen;
+
+ screen = sw_screen_create(ws);
+ if (screen)
+ screen = debug_screen_wrap(screen);
+
+ return screen;
+}
diff --git a/src/gallium/targets/egl-static/egl_pipe.h b/src/gallium/targets/egl-static/egl_pipe.h
new file mode 100644
index 00000000000..569b2d067c4
--- /dev/null
+++ b/src/gallium/targets/egl-static/egl_pipe.h
@@ -0,0 +1,40 @@
+/*
+ * Mesa 3-D graphics library
+ * Version: 7.10
+ *
+ * Copyright (C) 2011 LunarG Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ * Authors:
+ * Chia-I Wu <olv@lunarg.com>
+ */
+#ifndef _EGL_PIPE_H_
+#define _EGL_PIPE_H_
+
+struct pipe_screen;
+struct sw_winsys;
+
+struct pipe_screen *
+egl_pipe_create_drm_screen(const char *name, int fd);
+
+struct pipe_screen *
+egl_pipe_create_swrast_screen(struct sw_winsys *ws);
+
+#endif /* _EGL_PIPE_H_ */
diff --git a/src/gallium/targets/egl-static/egl_st.c b/src/gallium/targets/egl-static/egl_st.c
new file mode 100644
index 00000000000..3db52621def
--- /dev/null
+++ b/src/gallium/targets/egl-static/egl_st.c
@@ -0,0 +1,105 @@
+/*
+ * Mesa 3-D graphics library
+ * Version: 7.10
+ *
+ * Copyright (C) 2011 LunarG Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ * Authors:
+ * Chia-I Wu <olv@lunarg.com>
+ */
+#include "util/u_debug.h"
+#include "state_tracker/st_api.h"
+#include "egl_st.h"
+
+/* for st/mesa */
+#include "state_tracker/st_gl_api.h"
+/* for st/vega */
+#include "vg_api.h"
+
+static struct st_api *
+st_GL_create_api(void)
+{
+#if FEATURE_GL || FEATURE_ES1 || FEATURE_ES2
+ return st_gl_api_create();
+#else
+ return NULL;
+#endif
+}
+
+static struct st_api *
+st_OpenVG_create_api(void)
+{
+#if FEATURE_VG
+ return (struct st_api *) vg_api_get();
+#else
+ return NULL;
+#endif
+}
+
+struct st_api *
+egl_st_create_api(enum st_api_type api)
+{
+ struct st_api *stapi;
+
+ switch (api) {
+ case ST_API_OPENGL:
+ stapi = st_GL_create_api();
+ break;
+ case ST_API_OPENVG:
+ stapi = st_OpenVG_create_api();
+ break;
+ default:
+ assert(!"Unknown API Type\n");
+ stapi = NULL;
+ break;
+ }
+
+ return stapi;
+}
+
+uint
+egl_st_get_profile_mask(enum st_api_type api)
+{
+ uint mask = 0x0;
+
+ switch (api) {
+ case ST_API_OPENGL:
+#if FEATURE_GL
+ mask |= ST_PROFILE_DEFAULT_MASK;
+#endif
+#if FEATURE_ES1
+ mask |= ST_PROFILE_OPENGL_ES1_MASK;
+#endif
+#if FEATURE_ES2
+ mask |= ST_PROFILE_OPENGL_ES2_MASK;
+#endif
+ break;
+ case ST_API_OPENVG:
+#if FEATURE_VG
+ mask |= ST_PROFILE_DEFAULT_MASK;
+#endif
+ break;
+ default:
+ break;
+ }
+
+ return mask;
+}
diff --git a/src/mesa/swrast/s_trispan.h b/src/gallium/targets/egl-static/egl_st.h
index 15207e863e3..ba82faf0b0e 100644
--- a/src/mesa/swrast/s_trispan.h
+++ b/src/gallium/targets/egl-static/egl_st.h
@@ -1,9 +1,8 @@
-
/*
* Mesa 3-D graphics library
- * Version: 3.5
+ * Version: 7.10
*
- * Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
+ * Copyright (C) 2011 LunarG Inc.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@@ -15,17 +14,27 @@
* 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,
+ * 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.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ * Authors:
+ * Chia-I Wu <olv@lunarg.com>
*/
+#ifndef _EGL_ST_H_
+#define _EGL_ST_H_
+#include "pipe/p_compiler.h"
+#include "state_tracker/st_api.h"
-#ifndef S_TRISPAN_H
-#define S_TRISPAN_H
+struct st_api *
+egl_st_create_api(enum st_api_type api);
+uint
+egl_st_get_profile_mask(enum st_api_type api);
-#endif /* S_TRISPAN_H */
+#endif /* _EGL_ST_H_ */
diff --git a/src/gallium/targets/egl/Makefile b/src/gallium/targets/egl/Makefile
index 63e9352144e..de01939e5f1 100644
--- a/src/gallium/targets/egl/Makefile
+++ b/src/gallium/targets/egl/Makefile
@@ -46,6 +46,9 @@ ifneq ($(findstring x11, $(EGL_PLATFORMS)),)
egl_SYS += -lX11 -lXext -lXfixes $(LIBDRM_LIB)
egl_LIBS += $(TOP)/src/gallium/winsys/sw/xlib/libws_xlib.a
endif
+ifneq ($(findstring wayland, $(EGL_PLATFORMS)),)
+egl_SYS += $(WAYLAND_LIBS) $(LIBDRM_LIB)
+endif
ifneq ($(findstring drm, $(EGL_PLATFORMS)),)
egl_SYS += $(LIBDRM_LIB)
endif
@@ -57,12 +60,6 @@ endif
ifneq ($(filter $(GL_LIB), $(EGL_CLIENT_APIS)),)
egl_CPPFLAGS += $(API_DEFINES)
endif
-ifneq ($(filter $(GLESv1_CM_LIB), $(EGL_CLIENT_APIS)),)
-egl_CPPFLAGS += -DFEATURE_ES1=1
-endif
-ifneq ($(filter $(GLESv2_LIB), $(EGL_CLIENT_APIS)),)
-egl_CPPFLAGS += -DFEATURE_ES2=1
-endif
ifneq ($(filter $(VG_LIB), $(EGL_CLIENT_APIS)),)
egl_CPPFLAGS += -DFEATURE_VG=1
endif
@@ -80,7 +77,8 @@ i965_CPPFLAGS :=
i965_SYS := -ldrm_intel
i965_LIBS := \
$(TOP)/src/gallium/winsys/i965/drm/libi965drm.a \
- $(TOP)/src/gallium/drivers/i965/libi965.a
+ $(TOP)/src/gallium/drivers/i965/libi965.a \
+ $(TOP)/src/gallium/winsys/sw/wrapper/libwsw.a
# nouveau pipe driver
nouveau_CPPFLAGS :=
@@ -89,11 +87,12 @@ nouveau_LIBS := \
$(TOP)/src/gallium/winsys/nouveau/drm/libnouveaudrm.a \
$(TOP)/src/gallium/drivers/nvfx/libnvfx.a \
$(TOP)/src/gallium/drivers/nv50/libnv50.a \
+ $(TOP)/src/gallium/drivers/nvc0/libnvc0.a \
$(TOP)/src/gallium/drivers/nouveau/libnouveau.a
# r300 pipe driver
r300_CPPFLAGS :=
-r300_SYS := -ldrm -ldrm_radeon
+r300_SYS := -ldrm
r300_LIBS := \
$(TOP)/src/gallium/winsys/radeon/drm/libradeonwinsys.a \
$(TOP)/src/gallium/drivers/r300/libr300.a
@@ -127,20 +126,14 @@ endif
# OpenGL state tracker
GL_CPPFLAGS := -I$(TOP)/src/mesa $(API_DEFINES)
-# do not link to $(GL_LIB) as the it supports GLES too
+ifeq ($(SHARED_GLAPI),1)
+GL_SYS := $(DRI_LIB_DEPS) -l$(GLAPI_LIB)
+else
+# cannot link to $(GL_LIB) as the app might want GL or GLES
GL_SYS := $(DRI_LIB_DEPS)
+endif
GL_LIBS := $(TOP)/src/mesa/libmesagallium.a
-# OpenGL ES 1.x state tracker
-GLESv1_CM_CPPFLAGS := -I$(TOP)/src/mesa
-GLESv1_CM_SYS := $(DRI_LIB_DEPS) -l$(GLESv1_CM_LIB)
-GLESv1_CM_LIBS := $(TOP)/src/mesa/libes1gallium.a
-
-# OpenGL ES 2.x state tracker
-GLESv2_CPPFLAGS := -I$(TOP)/src/mesa
-GLESv2_SYS := $(DRI_LIB_DEPS) -l$(GLESv2_LIB)
-GLESv2_LIBS := $(TOP)/src/mesa/libes2gallium.a
-
# OpenVG state tracker
OpenVG_CPPFLAGS := -I$(TOP)/src/gallium/state_trackers/vega
OpenVG_SYS := -lm -l$(VG_LIB)
@@ -225,12 +218,6 @@ $(OUTPUT_PATH)/$(PIPE_PREFIX)swrast.so: pipe_swrast.o $(swrast_LIBS)
$(OUTPUT_PATH)/$(ST_PREFIX)$(GL_LIB).so: st_GL.o $(GL_LIBS)
$(call mklib-cxx,GL)
-$(OUTPUT_PATH)/$(ST_PREFIX)$(GLESv1_CM_LIB).so: st_GLESv1_CM.o $(GLESv1_CM_LIBS)
- $(call mklib-cxx,GLESv1_CM)
-
-$(OUTPUT_PATH)/$(ST_PREFIX)$(GLESv2_LIB).so: st_GLESv2.o $(GLESv2_LIBS)
- $(call mklib-cxx,GLESv2)
-
$(OUTPUT_PATH)/$(ST_PREFIX)$(VG_LIB).so: st_OpenVG.o $(OpenVG_LIBS)
$(call mklib,OpenVG)
diff --git a/src/gallium/targets/egl/egl.c b/src/gallium/targets/egl/egl.c
index 786d5d1105e..61fe5069e91 100644
--- a/src/gallium/targets/egl/egl.c
+++ b/src/gallium/targets/egl/egl.c
@@ -100,9 +100,14 @@ load_st_module(struct st_module *stmod,
{
struct st_api *(*create_api)(void);
- _eglLog(_EGL_DEBUG, "searching for st module %s", name);
+ if (name) {
+ _eglLog(_EGL_DEBUG, "searching for st module %s", name);
+ stmod->name = loader_strdup(name);
+ }
+ else {
+ stmod->name = NULL;
+ }
- stmod->name = loader_strdup(name);
if (stmod->name)
_eglSearchPathForEach(dlopen_st_module_cb, (void *) stmod);
else
@@ -200,19 +205,7 @@ get_st_api_full(enum st_api_type api, enum st_profile_type profile)
switch (api) {
case ST_API_OPENGL:
symbol = ST_CREATE_OPENGL_SYMBOL;
- switch (profile) {
- case ST_PROFILE_OPENGL_ES1:
- names[count++] = "GLESv1_CM";
- names[count++] = "GL";
- break;
- case ST_PROFILE_OPENGL_ES2:
- names[count++] = "GLESv2";
- names[count++] = "GL";
- break;
- default:
- names[count++] = "GL";
- break;
- }
+ names[count++] = "GL";
break;
case ST_API_OPENVG:
symbol = ST_CREATE_OPENVG_SYMBOL;
@@ -232,6 +225,21 @@ get_st_api_full(enum st_api_type api, enum st_profile_type profile)
break;
}
+ /* try again with libGL.so loaded */
+ if (!stmod->stapi && api == ST_API_OPENGL) {
+ struct util_dl_library *glapi = util_dl_open("libGL" UTIL_DL_EXT);
+
+ if (glapi) {
+ _eglLog(_EGL_DEBUG, "retry with libGL" UTIL_DL_EXT " loaded");
+ /* skip the last name (which is NULL) */
+ for (i = 0; i < count - 1; i++) {
+ if (load_st_module(stmod, names[i], symbol))
+ break;
+ }
+ util_dl_close(glapi);
+ }
+ }
+
if (!stmod->stapi) {
EGLint level = (egl_g3d_loader.profile_masks[api]) ?
_EGL_WARNING : _EGL_DEBUG;
diff --git a/src/gallium/targets/egl/st_GLESv1_CM.c b/src/gallium/targets/egl/st_GLESv1_CM.c
deleted file mode 100644
index c1df844aa43..00000000000
--- a/src/gallium/targets/egl/st_GLESv1_CM.c
+++ /dev/null
@@ -1,8 +0,0 @@
-#include "state_tracker/st_gl_api.h"
-#include "egl.h"
-
-PUBLIC struct st_api *
-st_api_create_OpenGL(void)
-{
- return st_gl_api_create();
-}
diff --git a/src/gallium/targets/egl/st_GLESv2.c b/src/gallium/targets/egl/st_GLESv2.c
deleted file mode 100644
index c1df844aa43..00000000000
--- a/src/gallium/targets/egl/st_GLESv2.c
+++ /dev/null
@@ -1,8 +0,0 @@
-#include "state_tracker/st_gl_api.h"
-#include "egl.h"
-
-PUBLIC struct st_api *
-st_api_create_OpenGL(void)
-{
- return st_gl_api_create();
-}
diff --git a/src/gallium/targets/graw-gdi/graw_gdi.c b/src/gallium/targets/graw-gdi/graw_gdi.c
index 17ca2a761ca..99d8641d6b1 100644
--- a/src/gallium/targets/graw-gdi/graw_gdi.c
+++ b/src/gallium/targets/graw-gdi/graw_gdi.c
@@ -66,7 +66,7 @@ graw_create_window_and_screen(int x,
{
struct sw_winsys *winsys = NULL;
struct pipe_screen *screen = NULL;
- WNDCLASSEX wc = {sizeof(wc)};
+ WNDCLASSEX wc;
UINT style = WS_VISIBLE | WS_TILEDWINDOW;
RECT rect;
HWND hWnd = NULL;
@@ -83,6 +83,8 @@ graw_create_window_and_screen(int x,
if (screen == NULL)
goto fail;
+ memset(&wc, 0, sizeof wc);
+ wc.cbSize = sizeof wc;
wc.style = CS_OWNDC | CS_HREDRAW | CS_VREDRAW;
wc.lpfnWndProc = window_proc;
wc.lpszClassName = "graw-gdi";
diff --git a/src/gallium/targets/graw-null/graw_util.c b/src/gallium/targets/graw-null/graw_util.c
index e5cf526d33a..09cba895d2a 100644
--- a/src/gallium/targets/graw-null/graw_util.c
+++ b/src/gallium/targets/graw-null/graw_util.c
@@ -1,6 +1,7 @@
#include "pipe/p_compiler.h"
#include "pipe/p_context.h"
+#include "pipe/p_shader_tokens.h"
#include "pipe/p_state.h"
#include "tgsi/tgsi_text.h"
#include "util/u_debug.h"
diff --git a/src/gallium/targets/graw-xlib/graw_xlib.c b/src/gallium/targets/graw-xlib/graw_xlib.c
index 578086f8f9a..b6d798e577c 100644
--- a/src/gallium/targets/graw-xlib/graw_xlib.c
+++ b/src/gallium/targets/graw-xlib/graw_xlib.c
@@ -66,9 +66,6 @@ graw_create_window_and_screen( int x,
root = RootWindow( graw.display, scrnum );
- if (format != PIPE_FORMAT_R8G8B8A8_UNORM)
- goto fail;
-
if (graw.display == NULL)
goto fail;
@@ -88,6 +85,23 @@ graw_create_window_and_screen( int x,
exit(1);
}
+ /* See if the requirested pixel format matches the visual */
+ if (visinfo->red_mask == 0xff0000 &&
+ visinfo->green_mask == 0xff00 &&
+ visinfo->blue_mask == 0xff) {
+ if (format != PIPE_FORMAT_B8G8R8A8_UNORM)
+ goto fail;
+ }
+ else if (visinfo->red_mask == 0xff &&
+ visinfo->green_mask == 0xff00 &&
+ visinfo->blue_mask == 0xff0000) {
+ if (format != PIPE_FORMAT_R8G8B8A8_UNORM)
+ goto fail;
+ }
+ else {
+ goto fail;
+ }
+
/* window attributes */
attr.background_pixel = 0;
attr.border_pixel = 0;
diff --git a/src/gallium/targets/libgl-gdi/SConscript b/src/gallium/targets/libgl-gdi/SConscript
index 6fa0851a1ab..49462a8e309 100644
--- a/src/gallium/targets/libgl-gdi/SConscript
+++ b/src/gallium/targets/libgl-gdi/SConscript
@@ -15,7 +15,6 @@ env.Append(LIBS = [
'user32',
'kernel32',
'ws2_32',
- talloc,
])
sources = ['libgl_gdi.c']
@@ -37,6 +36,12 @@ drivers += [trace, rbug]
env['no_import_lib'] = 1
+# when GLES is enabled, gl* and _glapi_* belong to bridge_glapi and
+# shared_glapi respectively
+if env['gles']:
+ env.Prepend(LIBPATH = [shared_glapi.dir])
+ glapi = [bridge_glapi, 'libglapi']
+
opengl32 = env.SharedLibrary(
target ='opengl32',
source = sources,
diff --git a/src/gallium/targets/libgl-xlib/Makefile b/src/gallium/targets/libgl-xlib/Makefile
index fb537c31556..53a6c33ed82 100644
--- a/src/gallium/targets/libgl-xlib/Makefile
+++ b/src/gallium/targets/libgl-xlib/Makefile
@@ -60,6 +60,10 @@ GL_LIB_DEPS += $(LLVM_LIBS)
LDFLAGS += $(LLVM_LDFLAGS)
endif
+ifeq ($(SHARED_GLAPI),1)
+GL_LIB_DEPS := -L$(TOP)/$(LIB_DIR) -l$(GLAPI_LIB) $(GL_LIB_DEPS)
+endif
+
.SUFFIXES : .cpp
diff --git a/src/gallium/targets/libgl-xlib/SConscript b/src/gallium/targets/libgl-xlib/SConscript
index d932736be78..ca15372f1d9 100644
--- a/src/gallium/targets/libgl-xlib/SConscript
+++ b/src/gallium/targets/libgl-xlib/SConscript
@@ -16,6 +16,12 @@ env.Append(CPPDEFINES = ['USE_XSHM'])
env.Prepend(LIBS = env['X11_LIBS'])
+# when GLES is enabled, gl* and _glapi_* belong to bridge_glapi and
+# shared_glapi respectively
+if env['gles']:
+ env.Prepend(LIBPATH = [shared_glapi.dir])
+ glapi = [bridge_glapi, 'glapi']
+
env.Prepend(LIBS = [
st_xlib,
ws_xlib,
@@ -23,7 +29,6 @@ env.Prepend(LIBS = [
mesa,
glsl,
gallium,
- 'talloc'
])
sources = [
diff --git a/src/gallium/targets/libgl-xlib/xlib.c b/src/gallium/targets/libgl-xlib/xlib.c
index 9a3e0e07b0d..1a5892b94a0 100644
--- a/src/gallium/targets/libgl-xlib/xlib.c
+++ b/src/gallium/targets/libgl-xlib/xlib.c
@@ -35,7 +35,6 @@
#include "state_tracker/xlib_sw_winsys.h"
#include "xm_public.h"
-#include "state_tracker/st_api.h"
#include "state_tracker/st_gl_api.h"
#include "target-helpers/inline_sw_helper.h"
#include "target-helpers/inline_debug_helper.h"
diff --git a/src/gallium/targets/xorg-radeon/Makefile b/src/gallium/targets/xorg-radeon/Makefile
index d3bc3569929..6d5f2c3d16e 100644
--- a/src/gallium/targets/xorg-radeon/Makefile
+++ b/src/gallium/targets/xorg-radeon/Makefile
@@ -19,6 +19,6 @@ DRIVER_PIPES = \
$(TOP)/src/gallium/drivers/rbug/librbug.a
DRIVER_LINKS = \
- $(shell pkg-config --libs libdrm libdrm_radeon)
+ $(shell pkg-config --libs libdrm)
include ../Makefile.xorg
diff --git a/src/gallium/tests/graw/SConscript b/src/gallium/tests/graw/SConscript
index 3341b884985..ad44d54c855 100644
--- a/src/gallium/tests/graw/SConscript
+++ b/src/gallium/tests/graw/SConscript
@@ -8,7 +8,7 @@ env.Prepend(LIBPATH = [graw.dir])
env.Prepend(LIBS = ['graw'])
-if env['platform'] in ('freebsd8', 'sunos5'):
+if env['platform'] in ('freebsd8', 'sunos'):
env.Append(LIBS = ['m'])
if env['platform'] == 'freebsd8':
@@ -24,6 +24,7 @@ progs = [
'gs-test',
'shader-leak',
'tri-gs',
+ 'quad-sample',
]
for name in progs:
diff --git a/src/gallium/tests/graw/clear.c b/src/gallium/tests/graw/clear.c
index 1ff80cadeec..392d1503f19 100644
--- a/src/gallium/tests/graw/clear.c
+++ b/src/gallium/tests/graw/clear.c
@@ -2,6 +2,7 @@
* any utility code, just the graw interface and gallium.
*/
+#include <stdio.h>
#include "state_tracker/graw.h"
#include "pipe/p_screen.h"
#include "pipe/p_context.h"
@@ -28,7 +29,7 @@ static void draw( void )
float clear_color[4] = {1,0,1,1};
ctx->clear(ctx, PIPE_CLEAR_COLOR, clear_color, 0, 0);
- ctx->flush(ctx, PIPE_FLUSH_RENDER_CACHE, NULL);
+ ctx->flush(ctx, NULL);
graw_save_surface_to_file(ctx, surf, NULL);
@@ -48,16 +49,17 @@ static void init( void )
* Also, no easy way of querying supported formats if the screen
* cannot be created first.
*/
- for (i = 0;
- window == NULL && formats[i] != PIPE_FORMAT_NONE;
- i++) {
-
- screen = graw_create_window_and_screen(0,0,300,300,
+ for (i = 0; formats[i] != PIPE_FORMAT_NONE; i++) {
+ screen = graw_create_window_and_screen(0, 0, 300, 300,
formats[i],
&window);
+ if (window && screen)
+ break;
+ }
+ if (!screen || !window) {
+ fprintf(stderr, "Unable to create window\n");
+ exit(1);
}
- if (window == NULL)
- exit(2);
ctx = screen->context_create(screen, NULL);
if (ctx == NULL)
diff --git a/src/gallium/tests/graw/fs-test.c b/src/gallium/tests/graw/fs-test.c
index 37be2d0830c..fda23bd7c9f 100644
--- a/src/gallium/tests/graw/fs-test.c
+++ b/src/gallium/tests/graw/fs-test.c
@@ -215,7 +215,6 @@ static void set_vertices( void )
vbuf.stride = sizeof( struct vertex );
- vbuf.max_index = sizeof(vertices) / vbuf.stride;
vbuf.buffer_offset = 0;
vbuf.buffer = screen->user_buffer_create(screen,
vertices,
@@ -277,7 +276,7 @@ static void draw( void )
ctx->clear(ctx, PIPE_CLEAR_COLOR, clear_color, 0, 0);
util_draw_arrays(ctx, PIPE_PRIM_TRIANGLES, 0, 3);
- ctx->flush(ctx, PIPE_FLUSH_RENDER_CACHE, NULL);
+ ctx->flush(ctx, NULL);
graw_save_surface_to_file(ctx, surf, NULL);
@@ -433,15 +432,18 @@ static void init( void )
* Also, no easy way of querying supported formats if the screen
* cannot be created first.
*/
- for (i = 0;
- window == NULL && formats[i] != PIPE_FORMAT_NONE;
- i++) {
-
- screen = graw_create_window_and_screen(0,0,WIDTH,HEIGHT,
+ for (i = 0; formats[i] != PIPE_FORMAT_NONE; i++) {
+ screen = graw_create_window_and_screen(0, 0, 300, 300,
formats[i],
&window);
+ if (window && screen)
+ break;
}
-
+ if (!screen || !window) {
+ fprintf(stderr, "Unable to create window\n");
+ exit(1);
+ }
+
ctx = screen->context_create(screen, NULL);
if (ctx == NULL)
exit(3);
diff --git a/src/gallium/tests/graw/gs-test.c b/src/gallium/tests/graw/gs-test.c
index 812666a8c84..ebb26d2f3f4 100644
--- a/src/gallium/tests/graw/gs-test.c
+++ b/src/gallium/tests/graw/gs-test.c
@@ -251,13 +251,11 @@ static void set_vertices( void )
vbuf.stride = sizeof( struct vertex );
vbuf.buffer_offset = 0;
if (draw_strip) {
- vbuf.max_index = sizeof(vertices_strip) / vbuf.stride;
vbuf.buffer = screen->user_buffer_create(screen,
vertices_strip,
sizeof(vertices_strip),
PIPE_BIND_VERTEX_BUFFER);
} else {
- vbuf.max_index = sizeof(vertices) / vbuf.stride;
vbuf.buffer = screen->user_buffer_create(screen,
vertices,
sizeof(vertices),
@@ -341,7 +339,7 @@ static void draw( void )
else
util_draw_arrays(ctx, PIPE_PRIM_TRIANGLES, 0, 3);
- ctx->flush(ctx, PIPE_FLUSH_RENDER_CACHE, NULL);
+ ctx->flush(ctx, NULL);
graw_save_surface_to_file(ctx, surf, NULL);
@@ -497,15 +495,18 @@ static void init( void )
* Also, no easy way of querying supported formats if the screen
* cannot be created first.
*/
- for (i = 0;
- window == NULL && formats[i] != PIPE_FORMAT_NONE;
- i++) {
-
- screen = graw_create_window_and_screen(0,0,WIDTH,HEIGHT,
+ for (i = 0; formats[i] != PIPE_FORMAT_NONE; i++) {
+ screen = graw_create_window_and_screen(0, 0, 300, 300,
formats[i],
&window);
+ if (window && screen)
+ break;
}
-
+ if (!screen || !window) {
+ fprintf(stderr, "Unable to create window\n");
+ exit(1);
+ }
+
ctx = screen->context_create(screen, NULL);
if (ctx == NULL)
exit(3);
diff --git a/src/gallium/tests/graw/quad-sample.c b/src/gallium/tests/graw/quad-sample.c
new file mode 100644
index 00000000000..6903046cf0e
--- /dev/null
+++ b/src/gallium/tests/graw/quad-sample.c
@@ -0,0 +1,414 @@
+/* Display a cleared blue window. This demo has no dependencies on
+ * any utility code, just the graw interface and gallium.
+ */
+
+#include "state_tracker/graw.h"
+#include "pipe/p_screen.h"
+#include "pipe/p_context.h"
+#include "pipe/p_shader_tokens.h"
+#include "pipe/p_state.h"
+#include "pipe/p_defines.h"
+
+#include "util/u_debug.h" /* debug_dump_surface_bmp() */
+#include "util/u_inlines.h"
+#include "util/u_memory.h" /* Offset() */
+#include "util/u_draw_quad.h"
+#include "util/u_box.h"
+
+#include <stdio.h>
+
+enum pipe_format formats[] = {
+ PIPE_FORMAT_R8G8B8A8_UNORM,
+ PIPE_FORMAT_B8G8R8A8_UNORM,
+ PIPE_FORMAT_NONE
+};
+
+static const int WIDTH = 300;
+static const int HEIGHT = 300;
+
+static struct pipe_screen *screen = NULL;
+static struct pipe_context *ctx = NULL;
+static struct pipe_resource *rttex = NULL;
+static struct pipe_resource *samptex = NULL;
+static struct pipe_surface *surf = NULL;
+static struct pipe_sampler_view *sv = NULL;
+static void *sampler = NULL;
+static void *window = NULL;
+
+struct vertex {
+ float position[4];
+ float color[4];
+};
+
+static struct vertex vertices[] =
+{
+ { { 0.9, -0.9, 0.0, 1.0 },
+ { 1, 0, 0, 1 } },
+
+ { { 0.9, 0.9, 0.0, 1.0 },
+ { 1, 1, 0, 1 } },
+
+ { {-0.9, 0.9, 0.0, 1.0 },
+ { 0, 1, 0, 1 } },
+
+ { {-0.9, -0.9, 0.0, 1.0 },
+ { 0, 0, 0, 1 } },
+};
+
+
+
+
+static void set_viewport( float x, float y,
+ float width, float height,
+ float near, float far)
+{
+ float z = far;
+ float half_width = (float)width / 2.0f;
+ float half_height = (float)height / 2.0f;
+ float half_depth = ((float)far - (float)near) / 2.0f;
+ struct pipe_viewport_state vp;
+
+ vp.scale[0] = half_width;
+ vp.scale[1] = half_height;
+ vp.scale[2] = half_depth;
+ vp.scale[3] = 1.0f;
+
+ vp.translate[0] = half_width + x;
+ vp.translate[1] = half_height + y;
+ vp.translate[2] = half_depth + z;
+ vp.translate[3] = 0.0f;
+
+ ctx->set_viewport_state( ctx, &vp );
+}
+
+static void set_vertices( void )
+{
+ struct pipe_vertex_element ve[2];
+ struct pipe_vertex_buffer vbuf;
+ void *handle;
+
+ memset(ve, 0, sizeof ve);
+
+ ve[0].src_offset = Offset(struct vertex, position);
+ ve[0].src_format = PIPE_FORMAT_R32G32B32A32_FLOAT;
+ ve[1].src_offset = Offset(struct vertex, color);
+ ve[1].src_format = PIPE_FORMAT_R32G32B32A32_FLOAT;
+
+ handle = ctx->create_vertex_elements_state(ctx, 2, ve);
+ ctx->bind_vertex_elements_state(ctx, handle);
+
+
+ vbuf.stride = sizeof( struct vertex );
+ vbuf.buffer_offset = 0;
+ vbuf.buffer = screen->user_buffer_create(screen,
+ vertices,
+ sizeof(vertices),
+ PIPE_BIND_VERTEX_BUFFER);
+
+ ctx->set_vertex_buffers(ctx, 1, &vbuf);
+}
+
+static void set_vertex_shader( void )
+{
+ void *handle;
+ const char *text =
+ "VERT\n"
+ "DCL IN[0]\n"
+ "DCL IN[1]\n"
+ "DCL OUT[0], POSITION\n"
+ "DCL OUT[1], GENERIC[0]\n"
+ " 0: MOV OUT[1], IN[1]\n"
+ " 1: MOV OUT[0], IN[0]\n"
+ " 2: END\n";
+
+ handle = graw_parse_vertex_shader(ctx, text);
+ ctx->bind_vs_state(ctx, handle);
+}
+
+static void set_fragment_shader( void )
+{
+ void *handle;
+ const char *text =
+ "FRAG\n"
+ "DCL IN[0], GENERIC[0], PERSPECTIVE\n"
+ "DCL OUT[0], COLOR\n"
+ "DCL TEMP[0]\n"
+ "DCL SAMP[0]\n"
+ "DCL RES[0], 2D, FLOAT\n"
+ " 0: SAMPLE TEMP[0], IN[0], RES[0], SAMP[0]\n"
+ " 1: MOV OUT[0], TEMP[0]\n"
+ " 2: END\n";
+
+ handle = graw_parse_fragment_shader(ctx, text);
+ ctx->bind_fs_state(ctx, handle);
+}
+
+
+static void draw( void )
+{
+ float clear_color[4] = {.5,.5,.5,1};
+
+ ctx->clear(ctx, PIPE_CLEAR_COLOR, clear_color, 0, 0);
+ util_draw_arrays(ctx, PIPE_PRIM_QUADS, 0, 4);
+ ctx->flush(ctx, NULL);
+
+ graw_save_surface_to_file(ctx, surf, NULL);
+
+ screen->flush_frontbuffer(screen, rttex, 0, 0, window);
+}
+
+#define SIZE 16
+
+static void init_tex( void )
+{
+ struct pipe_sampler_view sv_template;
+ struct pipe_sampler_state sampler_desc;
+ struct pipe_resource templat;
+ struct pipe_box box;
+ ubyte tex2d[SIZE][SIZE][4];
+ int s, t;
+
+#if (SIZE != 2)
+ for (s = 0; s < SIZE; s++) {
+ for (t = 0; t < SIZE; t++) {
+ if (0) {
+ int x = (s ^ t) & 1;
+ tex2d[t][s][0] = (x) ? 0 : 63;
+ tex2d[t][s][1] = (x) ? 0 : 128;
+ tex2d[t][s][2] = 0;
+ tex2d[t][s][3] = 0xff;
+ }
+ else {
+ int x = ((s ^ t) >> 2) & 1;
+ tex2d[t][s][0] = s*255/(SIZE-1);
+ tex2d[t][s][1] = t*255/(SIZE-1);
+ tex2d[t][s][2] = (x) ? 0 : 128;
+ tex2d[t][s][3] = 0xff;
+ }
+ }
+ }
+#else
+ tex2d[0][0][0] = 0;
+ tex2d[0][0][1] = 255;
+ tex2d[0][0][2] = 255;
+ tex2d[0][0][3] = 0;
+
+ tex2d[0][1][0] = 0;
+ tex2d[0][1][1] = 0;
+ tex2d[0][1][2] = 255;
+ tex2d[0][1][3] = 255;
+
+ tex2d[1][0][0] = 255;
+ tex2d[1][0][1] = 255;
+ tex2d[1][0][2] = 0;
+ tex2d[1][0][3] = 255;
+
+ tex2d[1][1][0] = 255;
+ tex2d[1][1][1] = 0;
+ tex2d[1][1][2] = 0;
+ tex2d[1][1][3] = 255;
+#endif
+
+ templat.target = PIPE_TEXTURE_2D;
+ templat.format = PIPE_FORMAT_B8G8R8A8_UNORM;
+ templat.width0 = SIZE;
+ templat.height0 = SIZE;
+ templat.depth0 = 1;
+ templat.last_level = 0;
+ templat.nr_samples = 1;
+ templat.bind = PIPE_BIND_SAMPLER_VIEW;
+
+
+ samptex = screen->resource_create(screen,
+ &templat);
+ if (samptex == NULL)
+ exit(4);
+
+ u_box_2d(0,0,SIZE,SIZE, &box);
+
+ ctx->transfer_inline_write(ctx,
+ samptex,
+ 0,
+ PIPE_TRANSFER_WRITE,
+ &box,
+ tex2d,
+ sizeof tex2d[0],
+ sizeof tex2d);
+
+ /* Possibly read back & compare against original data:
+ */
+ if (0)
+ {
+ struct pipe_transfer *t;
+ uint32_t *ptr;
+ t = pipe_get_transfer(ctx, samptex,
+ 0, 0, /* level, layer */
+ PIPE_TRANSFER_READ,
+ 0, 0, SIZE, SIZE); /* x, y, width, height */
+
+ ptr = ctx->transfer_map(ctx, t);
+
+ if (memcmp(ptr, tex2d, sizeof tex2d) != 0) {
+ assert(0);
+ exit(9);
+ }
+
+ ctx->transfer_unmap(ctx, t);
+
+ ctx->transfer_destroy(ctx, t);
+ }
+
+ memset(&sv_template, 0, sizeof sv_template);
+ sv_template.format = samptex->format;
+ sv_template.texture = samptex;
+ sv_template.swizzle_r = 0;
+ sv_template.swizzle_g = 1;
+ sv_template.swizzle_b = 2;
+ sv_template.swizzle_a = 3;
+ sv = ctx->create_sampler_view(ctx, samptex, &sv_template);
+ if (sv == NULL)
+ exit(5);
+
+ ctx->set_fragment_sampler_views(ctx, 1, &sv);
+
+
+ memset(&sampler_desc, 0, sizeof sampler_desc);
+ sampler_desc.wrap_s = PIPE_TEX_WRAP_REPEAT;
+ sampler_desc.wrap_t = PIPE_TEX_WRAP_REPEAT;
+ sampler_desc.wrap_r = PIPE_TEX_WRAP_REPEAT;
+ sampler_desc.min_img_filter = PIPE_TEX_FILTER_NEAREST;
+ sampler_desc.min_mip_filter = PIPE_TEX_MIPFILTER_NONE;
+ sampler_desc.mag_img_filter = PIPE_TEX_FILTER_NEAREST;
+ sampler_desc.compare_mode = PIPE_TEX_COMPARE_NONE;
+ sampler_desc.compare_func = 0;
+ sampler_desc.normalized_coords = 1;
+ sampler_desc.max_anisotropy = 0;
+
+ sampler = ctx->create_sampler_state(ctx, &sampler_desc);
+ if (sampler == NULL)
+ exit(6);
+
+ ctx->bind_fragment_sampler_states(ctx, 1, &sampler);
+
+}
+
+static void init( void )
+{
+ struct pipe_framebuffer_state fb;
+ struct pipe_resource templat;
+ struct pipe_surface surf_tmpl;
+ int i;
+
+ /* It's hard to say whether window or screen should be created
+ * first. Different environments would prefer one or the other.
+ *
+ * Also, no easy way of querying supported formats if the screen
+ * cannot be created first.
+ */
+ for (i = 0; formats[i] != PIPE_FORMAT_NONE; i++) {
+ screen = graw_create_window_and_screen(0, 0, 300, 300,
+ formats[i],
+ &window);
+ if (window && screen)
+ break;
+ }
+ if (!screen || !window) {
+ fprintf(stderr, "Unable to create window\n");
+ exit(1);
+ }
+
+ ctx = screen->context_create(screen, NULL);
+ if (ctx == NULL)
+ exit(3);
+
+ templat.target = PIPE_TEXTURE_2D;
+ templat.format = formats[i];
+ templat.width0 = WIDTH;
+ templat.height0 = HEIGHT;
+ templat.depth0 = 1;
+ templat.array_size = 1;
+ templat.last_level = 0;
+ templat.nr_samples = 1;
+ templat.bind = (PIPE_BIND_RENDER_TARGET |
+ PIPE_BIND_DISPLAY_TARGET);
+
+ rttex = screen->resource_create(screen,
+ &templat);
+ if (rttex == NULL)
+ exit(4);
+
+ surf_tmpl.format = templat.format;
+ surf_tmpl.usage = PIPE_BIND_RENDER_TARGET;
+ surf_tmpl.u.tex.level = 0;
+ surf_tmpl.u.tex.first_layer = 0;
+ surf_tmpl.u.tex.last_layer = 0;
+ surf = ctx->create_surface(ctx, rttex, &surf_tmpl);
+ if (surf == NULL)
+ exit(5);
+
+ memset(&fb, 0, sizeof fb);
+ fb.nr_cbufs = 1;
+ fb.width = WIDTH;
+ fb.height = HEIGHT;
+ fb.cbufs[0] = surf;
+
+ ctx->set_framebuffer_state(ctx, &fb);
+
+ {
+ struct pipe_blend_state blend;
+ void *handle;
+ memset(&blend, 0, sizeof blend);
+ blend.rt[0].colormask = PIPE_MASK_RGBA;
+ handle = ctx->create_blend_state(ctx, &blend);
+ ctx->bind_blend_state(ctx, handle);
+ }
+
+ {
+ struct pipe_depth_stencil_alpha_state depthstencil;
+ void *handle;
+ memset(&depthstencil, 0, sizeof depthstencil);
+ handle = ctx->create_depth_stencil_alpha_state(ctx, &depthstencil);
+ ctx->bind_depth_stencil_alpha_state(ctx, handle);
+ }
+
+ {
+ struct pipe_rasterizer_state rasterizer;
+ void *handle;
+ memset(&rasterizer, 0, sizeof rasterizer);
+ rasterizer.cull_face = PIPE_FACE_NONE;
+ rasterizer.gl_rasterization_rules = 1;
+ handle = ctx->create_rasterizer_state(ctx, &rasterizer);
+ ctx->bind_rasterizer_state(ctx, handle);
+ }
+
+ set_viewport(0, 0, WIDTH, HEIGHT, 30, 1000);
+
+ init_tex();
+
+ set_vertices();
+ set_vertex_shader();
+ set_fragment_shader();
+}
+
+static void args(int argc, char *argv[])
+{
+ int i;
+
+ for (i = 1; i < argc;) {
+ if (graw_parse_args(&i, argc, argv)) {
+ continue;
+ }
+ exit(1);
+ }
+}
+
+
+int main( int argc, char *argv[] )
+{
+ args(argc, argv);
+ init();
+
+ graw_set_display_func( draw );
+ graw_main_loop();
+ return 0;
+}
diff --git a/src/gallium/tests/graw/quad-tex.c b/src/gallium/tests/graw/quad-tex.c
index 952131d765b..fd01cb3f84f 100644
--- a/src/gallium/tests/graw/quad-tex.c
+++ b/src/gallium/tests/graw/quad-tex.c
@@ -2,6 +2,7 @@
* any utility code, just the graw interface and gallium.
*/
+#include <stdio.h>
#include "state_tracker/graw.h"
#include "pipe/p_screen.h"
#include "pipe/p_context.h"
@@ -96,7 +97,6 @@ static void set_vertices( void )
vbuf.stride = sizeof( struct vertex );
- vbuf.max_index = sizeof(vertices) / vbuf.stride;
vbuf.buffer_offset = 0;
vbuf.buffer = screen->user_buffer_create(screen,
vertices,
@@ -147,7 +147,7 @@ static void draw( void )
ctx->clear(ctx, PIPE_CLEAR_COLOR, clear_color, 0, 0);
util_draw_arrays(ctx, PIPE_PRIM_QUADS, 0, 4);
- ctx->flush(ctx, PIPE_FLUSH_RENDER_CACHE, NULL);
+ ctx->flush(ctx, NULL);
graw_save_surface_to_file(ctx, surf, NULL);
@@ -303,15 +303,18 @@ static void init( void )
* Also, no easy way of querying supported formats if the screen
* cannot be created first.
*/
- for (i = 0;
- window == NULL && formats[i] != PIPE_FORMAT_NONE;
- i++) {
-
- screen = graw_create_window_and_screen(0,0,300,300,
+ for (i = 0; formats[i] != PIPE_FORMAT_NONE; i++) {
+ screen = graw_create_window_and_screen(0, 0, 300, 300,
formats[i],
&window);
+ if (window && screen)
+ break;
}
-
+ if (!screen || !window) {
+ fprintf(stderr, "Unable to create window\n");
+ exit(1);
+ }
+
ctx = screen->context_create(screen, NULL);
if (ctx == NULL)
exit(3);
diff --git a/src/gallium/tests/graw/shader-leak.c b/src/gallium/tests/graw/shader-leak.c
index b53f0a046ca..004b1691b6b 100644
--- a/src/gallium/tests/graw/shader-leak.c
+++ b/src/gallium/tests/graw/shader-leak.c
@@ -88,7 +88,6 @@ static void set_vertices( void )
vbuf.stride = sizeof(struct vertex);
- vbuf.max_index = sizeof(vertices) / vbuf.stride;
vbuf.buffer_offset = 0;
vbuf.buffer = screen->user_buffer_create(screen,
vertices,
@@ -150,7 +149,7 @@ static void draw( void )
ctx->clear(ctx, PIPE_CLEAR_COLOR, clear_color, 0, 0);
util_draw_arrays(ctx, PIPE_PRIM_POINTS, 0, 1);
- ctx->flush(ctx, PIPE_FLUSH_RENDER_CACHE, NULL);
+ ctx->flush(ctx, NULL);
ctx->bind_fs_state(ctx, NULL);
ctx->delete_fs_state(ctx, fs);
@@ -176,15 +175,18 @@ static void init( void )
* Also, no easy way of querying supported formats if the screen
* cannot be created first.
*/
- for (i = 0;
- window == NULL && formats[i] != PIPE_FORMAT_NONE;
- i++) {
-
- screen = graw_create_window_and_screen(0,0,300,300,
+ for (i = 0; formats[i] != PIPE_FORMAT_NONE; i++) {
+ screen = graw_create_window_and_screen(0, 0, 300, 300,
formats[i],
&window);
+ if (window && screen)
+ break;
}
-
+ if (!screen || !window) {
+ fprintf(stderr, "Unable to create window\n");
+ exit(1);
+ }
+
ctx = screen->context_create(screen, NULL);
if (ctx == NULL)
exit(3);
diff --git a/src/gallium/tests/graw/tri-gs.c b/src/gallium/tests/graw/tri-gs.c
index 84ff3e67735..ab0116bed73 100644
--- a/src/gallium/tests/graw/tri-gs.c
+++ b/src/gallium/tests/graw/tri-gs.c
@@ -2,6 +2,7 @@
* any utility code, just the graw interface and gallium.
*/
+#include <stdio.h>
#include "state_tracker/graw.h"
#include "pipe/p_screen.h"
#include "pipe/p_context.h"
@@ -88,7 +89,6 @@ static void set_vertices( void )
vbuf.stride = sizeof( struct vertex );
- vbuf.max_index = sizeof(vertices) / vbuf.stride;
vbuf.buffer_offset = 0;
vbuf.buffer = screen->user_buffer_create(screen,
vertices,
@@ -163,7 +163,7 @@ static void draw( void )
ctx->clear(ctx, PIPE_CLEAR_COLOR, clear_color, 0, 0);
util_draw_arrays(ctx, PIPE_PRIM_TRIANGLES, 0, 3);
- ctx->flush(ctx, PIPE_FLUSH_RENDER_CACHE, NULL);
+ ctx->flush(ctx, NULL);
screen->flush_frontbuffer(screen, tex, 0, 0, window);
}
@@ -182,13 +182,16 @@ static void init( void )
* Also, no easy way of querying supported formats if the screen
* cannot be created first.
*/
- for (i = 0;
- window == NULL && formats[i] != PIPE_FORMAT_NONE;
- i++) {
-
- screen = graw_create_window_and_screen(0,0,300,300,
+ for (i = 0; formats[i] != PIPE_FORMAT_NONE; i++) {
+ screen = graw_create_window_and_screen(0, 0, 300, 300,
formats[i],
&window);
+ if (window && screen)
+ break;
+ }
+ if (!screen || !window) {
+ fprintf(stderr, "Unable to create window\n");
+ exit(1);
}
ctx = screen->context_create(screen, NULL);
diff --git a/src/gallium/tests/graw/tri-instanced.c b/src/gallium/tests/graw/tri-instanced.c
index f33c061b22b..bed34374666 100644
--- a/src/gallium/tests/graw/tri-instanced.c
+++ b/src/gallium/tests/graw/tri-instanced.c
@@ -132,7 +132,6 @@ static void set_vertices( void )
/* vertex data */
vbuf[0].stride = sizeof( struct vertex );
- vbuf[0].max_index = sizeof(vertices) / vbuf[0].stride;
vbuf[0].buffer_offset = 0;
vbuf[0].buffer = screen->user_buffer_create(screen,
vertices,
@@ -141,7 +140,6 @@ static void set_vertices( void )
/* instance data */
vbuf[1].stride = sizeof( inst_data[0] );
- vbuf[1].max_index = sizeof(inst_data) / vbuf[1].stride;
vbuf[1].buffer_offset = 0;
vbuf[1].buffer = screen->user_buffer_create(screen,
inst_data,
@@ -213,7 +211,7 @@ static void draw( void )
ctx->draw_vbo(ctx, &info);
- ctx->flush(ctx, PIPE_FLUSH_RENDER_CACHE, NULL);
+ ctx->flush(ctx, NULL);
graw_save_surface_to_file(ctx, surf, NULL);
@@ -234,13 +232,16 @@ static void init( void )
* Also, no easy way of querying supported formats if the screen
* cannot be created first.
*/
- for (i = 0;
- window == NULL && formats[i] != PIPE_FORMAT_NONE;
- i++) {
-
- screen = graw_create_window_and_screen(0,0,300,300,
+ for (i = 0; formats[i] != PIPE_FORMAT_NONE; i++) {
+ screen = graw_create_window_and_screen(0, 0, 300, 300,
formats[i],
&window);
+ if (window && screen)
+ break;
+ }
+ if (!screen || !window) {
+ fprintf(stderr, "Unable to create window\n");
+ exit(1);
}
ctx = screen->context_create(screen, NULL);
diff --git a/src/gallium/tests/graw/tri.c b/src/gallium/tests/graw/tri.c
index 2742c7c99e0..30ead999a47 100644
--- a/src/gallium/tests/graw/tri.c
+++ b/src/gallium/tests/graw/tri.c
@@ -93,7 +93,6 @@ static void set_vertices( void )
vbuf.stride = sizeof( struct vertex );
- vbuf.max_index = sizeof(vertices) / vbuf.stride;
vbuf.buffer_offset = 0;
vbuf.buffer = screen->user_buffer_create(screen,
vertices,
@@ -141,7 +140,7 @@ static void draw( void )
ctx->clear(ctx, PIPE_CLEAR_COLOR, clear_color, 0, 0);
util_draw_arrays(ctx, PIPE_PRIM_TRIANGLES, 0, 3);
- ctx->flush(ctx, PIPE_FLUSH_RENDER_CACHE, NULL);
+ ctx->flush(ctx, NULL);
graw_save_surface_to_file(ctx, surf, NULL);
@@ -162,13 +161,16 @@ static void init( void )
* Also, no easy way of querying supported formats if the screen
* cannot be created first.
*/
- for (i = 0;
- window == NULL && formats[i] != PIPE_FORMAT_NONE;
- i++) {
-
- screen = graw_create_window_and_screen(0,0,300,300,
+ for (i = 0; formats[i] != PIPE_FORMAT_NONE; i++) {
+ screen = graw_create_window_and_screen(0, 0, 300, 300,
formats[i],
&window);
+ if (window && screen)
+ break;
+ }
+ if (!screen || !window) {
+ fprintf(stderr, "Unable to create window\n");
+ exit(1);
}
ctx = screen->context_create(screen, NULL);
diff --git a/src/gallium/tests/graw/vs-test.c b/src/gallium/tests/graw/vs-test.c
index 58908f38a23..18e056dcb35 100644
--- a/src/gallium/tests/graw/vs-test.c
+++ b/src/gallium/tests/graw/vs-test.c
@@ -171,7 +171,6 @@ static void set_vertices( void )
}
vbuf.stride = sizeof( struct vertex );
- vbuf.max_index = sizeof(vertices) / vbuf.stride;
vbuf.buffer_offset = 0;
vbuf.buffer = screen->user_buffer_create(screen,
vertices,
@@ -228,7 +227,7 @@ static void draw( void )
ctx->clear(ctx, PIPE_CLEAR_COLOR, clear_color, 0, 0);
util_draw_arrays(ctx, PIPE_PRIM_POINTS, 0, Elements(vertices));
- ctx->flush(ctx, PIPE_FLUSH_RENDER_CACHE, NULL);
+ ctx->flush(ctx, NULL);
graw_save_surface_to_file(ctx, surf, NULL);
@@ -384,13 +383,16 @@ static void init( void )
* Also, no easy way of querying supported formats if the screen
* cannot be created first.
*/
- for (i = 0;
- window == NULL && formats[i] != PIPE_FORMAT_NONE;
- i++) {
-
- screen = graw_create_window_and_screen(0,0,WIDTH,HEIGHT,
+ for (i = 0; formats[i] != PIPE_FORMAT_NONE; i++) {
+ screen = graw_create_window_and_screen(0, 0, 300, 300,
formats[i],
&window);
+ if (window && screen)
+ break;
+ }
+ if (!screen || !window) {
+ fprintf(stderr, "Unable to create window\n");
+ exit(1);
}
ctx = screen->context_create(screen, NULL);
diff --git a/src/gallium/tests/trivial/quad-tex.c b/src/gallium/tests/trivial/quad-tex.c
index 92c5b4dbb18..3a64b1c8d96 100644
--- a/src/gallium/tests/trivial/quad-tex.c
+++ b/src/gallium/tests/trivial/quad-tex.c
@@ -129,7 +129,8 @@ static void init_prog(struct program *p)
}
};
- p->vbuf = pipe_buffer_create(p->screen, PIPE_BIND_VERTEX_BUFFER, sizeof(vertices));
+ p->vbuf = pipe_buffer_create(p->screen, PIPE_BIND_VERTEX_BUFFER,
+ PIPE_USAGE_STATIC, sizeof(vertices));
pipe_buffer_write(p->pipe, p->vbuf, 0, sizeof(vertices), vertices);
}
@@ -334,7 +335,7 @@ static void draw(struct program *p)
4, /* verts */
2); /* attribs/vert */
- p->pipe->flush(p->pipe, PIPE_FLUSH_RENDER_CACHE, NULL);
+ p->pipe->flush(p->pipe, NULL);
debug_dump_surface_bmp(p->pipe, "result.bmp", p->framebuffer.cbufs[0]);
}
diff --git a/src/gallium/tests/trivial/tri.c b/src/gallium/tests/trivial/tri.c
index 37c1573051f..bfd2f3ca9a3 100644
--- a/src/gallium/tests/trivial/tri.c
+++ b/src/gallium/tests/trivial/tri.c
@@ -120,7 +120,8 @@ static void init_prog(struct program *p)
}
};
- p->vbuf = pipe_buffer_create(p->screen, PIPE_BIND_VERTEX_BUFFER, sizeof(vertices));
+ p->vbuf = pipe_buffer_create(p->screen, PIPE_BIND_VERTEX_BUFFER,
+ PIPE_USAGE_STATIC, sizeof(vertices));
pipe_buffer_write(p->pipe, p->vbuf, 0, sizeof(vertices), vertices);
}
@@ -263,7 +264,7 @@ static void draw(struct program *p)
3, /* verts */
2); /* attribs/vert */
- p->pipe->flush(p->pipe, PIPE_FLUSH_RENDER_CACHE, NULL);
+ p->pipe->flush(p->pipe, NULL);
debug_dump_surface_bmp(p->pipe, "result.bmp", p->framebuffer.cbufs[0]);
}
diff --git a/src/gallium/tests/unit/SConscript b/src/gallium/tests/unit/SConscript
index 655e8a9b41c..49f28c03691 100644
--- a/src/gallium/tests/unit/SConscript
+++ b/src/gallium/tests/unit/SConscript
@@ -4,7 +4,7 @@ env = env.Clone()
env.Prepend(LIBS = [gallium])
-if env['platform'] in ('freebsd8', 'sunos5'):
+if env['platform'] in ('freebsd8', 'sunos'):
env.Append(LIBS = ['m'])
if env['platform'] == 'freebsd8':
diff --git a/src/gallium/winsys/SConscript b/src/gallium/winsys/SConscript
index d74f8a2e989..9f36d225e10 100644
--- a/src/gallium/winsys/SConscript
+++ b/src/gallium/winsys/SConscript
@@ -13,6 +13,10 @@ SConscript([
'sw/gdi/SConscript',
])
+SConscript([
+ 'i915/sw/SConscript',
+])
+
if env['dri']:
SConscript([
'sw/dri/SConscript',
diff --git a/src/gallium/winsys/i915/drm/i915_drm_batchbuffer.c b/src/gallium/winsys/i915/drm/i915_drm_batchbuffer.c
index ebe86dcf196..03aa1b1537a 100644
--- a/src/gallium/winsys/i915/drm/i915_drm_batchbuffer.c
+++ b/src/gallium/winsys/i915/drm/i915_drm_batchbuffer.c
@@ -4,6 +4,8 @@
#include "i915_drm.h"
#include "i915/i915_debug.h"
+#include <xf86drm.h>
+#include <stdio.h>
#define BATCH_RESERVED 16
@@ -34,7 +36,6 @@ static void
i915_drm_batchbuffer_reset(struct i915_drm_batchbuffer *batch)
{
struct i915_drm_winsys *idws = i915_drm_winsys(batch->base.iws);
- int ret;
if (batch->bo)
drm_intel_bo_unreference(batch->bo);
@@ -43,18 +44,6 @@ i915_drm_batchbuffer_reset(struct i915_drm_batchbuffer *batch)
batch->actual_size,
4096);
-#ifdef INTEL_MAP_BATCHBUFFER
-#ifdef INTEL_MAP_GTT
- ret = drm_intel_gem_bo_map_gtt(batch->bo);
-#else
- ret = drm_intel_bo_map(batch->bo, TRUE);
-#endif
- assert(ret == 0);
- batch->base.map = batch->bo->virtual;
-#else
- (void)ret;
-#endif
-
memset(batch->base.map, 0, batch->actual_size);
batch->base.ptr = batch->base.map;
batch->base.size = batch->actual_size - BATCH_RESERVED;
@@ -74,7 +63,6 @@ i915_drm_batchbuffer_create(struct i915_winsys *iws)
batch->base.size = 0;
batch->base.relocs = 0;
- batch->base.max_relocs = 300;/*INTEL_DEFAULT_RELOCS;*/
batch->base.iws = iws;
@@ -83,11 +71,31 @@ i915_drm_batchbuffer_create(struct i915_winsys *iws)
return &batch->base;
}
+static boolean
+i915_drm_batchbuffer_validate_buffers(struct i915_winsys_batchbuffer *batch,
+ struct i915_winsys_buffer **buffer,
+ int num_of_buffers)
+{
+ struct i915_drm_batchbuffer *drm_batch = i915_drm_batchbuffer(batch);
+ drm_intel_bo *bos[num_of_buffers + 1];
+ int i, ret;
+
+ bos[0] = drm_batch->bo;
+ for (i = 0; i < num_of_buffers; i++)
+ bos[i+1] = intel_bo(buffer[i]);
+
+ ret = drm_intel_bufmgr_check_aperture_space(bos, num_of_buffers);
+ if (ret != 0)
+ return FALSE;
+
+ return TRUE;
+}
+
static int
i915_drm_batchbuffer_reloc(struct i915_winsys_batchbuffer *ibatch,
struct i915_winsys_buffer *buffer,
enum i915_winsys_buffer_usage usage,
- unsigned pre_add, bool fenced)
+ unsigned pre_add, boolean fenced)
{
struct i915_drm_batchbuffer *batch = i915_drm_batchbuffer(ibatch);
unsigned write_domain = 0;
@@ -95,8 +103,6 @@ i915_drm_batchbuffer_reloc(struct i915_winsys_batchbuffer *ibatch,
unsigned offset;
int ret = 0;
- assert(batch->base.relocs < batch->base.max_relocs);
-
switch (usage) {
case I915_USAGE_SAMPLER:
write_domain = 0;
@@ -145,6 +151,12 @@ i915_drm_batchbuffer_reloc(struct i915_winsys_batchbuffer *ibatch,
return ret;
}
+static void
+i915_drm_throttle(struct i915_drm_winsys *idws)
+{
+ drmIoctl(idws->fd, DRM_IOCTL_I915_GEM_THROTTLE, NULL);
+}
+
static void
i915_drm_batchbuffer_flush(struct i915_winsys_batchbuffer *ibatch,
struct pipe_fence_handle **fence)
@@ -168,11 +180,21 @@ i915_drm_batchbuffer_flush(struct i915_winsys_batchbuffer *ibatch,
if (ret == 0 && i915_drm_winsys(ibatch->iws)->send_cmd)
ret = drm_intel_bo_exec(batch->bo, used, NULL, 0, 0);
+ i915_drm_throttle(i915_drm_winsys(ibatch->iws));
+
if (ret != 0 || i915_drm_winsys(ibatch->iws)->dump_cmd) {
i915_dump_batchbuffer(ibatch);
assert(ret == 0);
}
+ if (i915_drm_winsys(ibatch->iws)->dump_raw_file) {
+ FILE *file = fopen(i915_drm_winsys(ibatch->iws)->dump_raw_file, "a");
+ if (file) {
+ fwrite(batch->base.map, used, 1, file);
+ fclose(file);
+ }
+ }
+
#ifdef INTEL_RUN_SYNC
drm_intel_bo_wait_rendering(batch->bo);
#endif
@@ -206,6 +228,7 @@ i915_drm_batchbuffer_destroy(struct i915_winsys_batchbuffer *ibatch)
void i915_drm_winsys_init_batchbuffer_functions(struct i915_drm_winsys *idws)
{
idws->base.batchbuffer_create = i915_drm_batchbuffer_create;
+ idws->base.validate_buffers = i915_drm_batchbuffer_validate_buffers;
idws->base.batchbuffer_reloc = i915_drm_batchbuffer_reloc;
idws->base.batchbuffer_flush = i915_drm_batchbuffer_flush;
idws->base.batchbuffer_destroy = i915_drm_batchbuffer_destroy;
diff --git a/src/gallium/winsys/i915/drm/i915_drm_winsys.c b/src/gallium/winsys/i915/drm/i915_drm_winsys.c
index 2288b48b2bd..2c3b508d056 100644
--- a/src/gallium/winsys/i915/drm/i915_drm_winsys.c
+++ b/src/gallium/winsys/i915/drm/i915_drm_winsys.c
@@ -72,6 +72,7 @@ i915_drm_winsys_create(int drmFD)
drm_intel_bufmgr_gem_enable_fenced_relocs(idws->gem_manager);
idws->dump_cmd = debug_get_bool_option("I915_DUMP_CMD", FALSE);
+ idws->dump_raw_file = debug_get_option("I915_DUMP_RAW_FILE", NULL);
idws->send_cmd = !debug_get_bool_option("I915_NO_HW", FALSE);
return &idws->base;
diff --git a/src/gallium/winsys/i915/drm/i915_drm_winsys.h b/src/gallium/winsys/i915/drm/i915_drm_winsys.h
index 0d74d0270c7..dae53c3e801 100644
--- a/src/gallium/winsys/i915/drm/i915_drm_winsys.h
+++ b/src/gallium/winsys/i915/drm/i915_drm_winsys.h
@@ -18,6 +18,7 @@ struct i915_drm_winsys
struct i915_winsys base;
boolean dump_cmd;
+ char *dump_raw_file;
boolean send_cmd;
int fd; /**< Drm file discriptor */
diff --git a/src/gallium/winsys/i915/sw/i915_sw_batchbuffer.c b/src/gallium/winsys/i915/sw/i915_sw_batchbuffer.c
index 44773ae30e7..3bf54011d9e 100644
--- a/src/gallium/winsys/i915/sw/i915_sw_batchbuffer.c
+++ b/src/gallium/winsys/i915/sw/i915_sw_batchbuffer.c
@@ -1,6 +1,7 @@
#include "i915_sw_winsys.h"
#include "i915/i915_batchbuffer.h"
+#include "i915/i915_debug.h"
#include "util/u_memory.h"
#define BATCH_RESERVED 16
@@ -48,7 +49,6 @@ i915_sw_batchbuffer_create(struct i915_winsys *iws)
batch->base.size = 0;
batch->base.relocs = 0;
- batch->base.max_relocs = 300;/*INTEL_DEFAULT_RELOCS;*/
batch->base.iws = iws;
@@ -57,17 +57,23 @@ i915_sw_batchbuffer_create(struct i915_winsys *iws)
return &batch->base;
}
+static boolean
+i915_sw_batchbuffer_validate_buffers(struct i915_winsys_batchbuffer *batch,
+ struct i915_winsys_buffer **buffer,
+ int num_of_buffers)
+{
+ return TRUE;
+}
+
static int
i915_sw_batchbuffer_reloc(struct i915_winsys_batchbuffer *ibatch,
struct i915_winsys_buffer *buffer,
enum i915_winsys_buffer_usage usage,
- unsigned pre_add, bool fenced)
+ unsigned pre_add, boolean fenced)
{
struct i915_sw_batchbuffer *batch = i915_sw_batchbuffer(ibatch);
int ret = 0;
- assert(batch->base.relocs < batch->base.max_relocs);
-
if (usage == I915_USAGE_SAMPLER) {
} else if (usage == I915_USAGE_RENDER) {
@@ -98,7 +104,6 @@ i915_sw_batchbuffer_flush(struct i915_winsys_batchbuffer *ibatch,
{
struct i915_sw_batchbuffer *batch = i915_sw_batchbuffer(ibatch);
unsigned used = 0;
- int i;
assert(i915_winsys_batchbuffer_space(ibatch) >= 0);
@@ -107,27 +112,22 @@ i915_sw_batchbuffer_flush(struct i915_winsys_batchbuffer *ibatch,
#ifdef INTEL_ALWAYS_FLUSH
/* MI_FLUSH | FLUSH_MAP_CACHE */
- i915_winsys_batchbuffer_dword(ibatch, (0x4<<23)|(1<<0));
+ i915_winsys_batchbuffer_dword_unchecked(ibatch, (0x4<<23)|(1<<0));
used += 4;
#endif
if ((used & 4) == 0) {
/* MI_NOOP */
- i915_winsys_batchbuffer_dword(ibatch, 0);
+ i915_winsys_batchbuffer_dword_unchecked(ibatch, 0);
}
/* MI_BATCH_BUFFER_END */
- i915_winsys_batchbuffer_dword(ibatch, (0xA<<23));
+ i915_winsys_batchbuffer_dword_unchecked(ibatch, (0xA<<23));
used = batch->base.ptr - batch->base.map;
assert((used & 4) == 0);
if (i915_sw_winsys(ibatch->iws)->dump_cmd) {
- unsigned *ptr = (unsigned *)batch->base.map;
-
- debug_printf("%s:\n", __func__);
- for (i = 0; i < used / 4; i++, ptr++) {
- debug_printf("\t%08x: %08x\n", i*4, *ptr);
- }
+ i915_dump_batchbuffer(ibatch);
}
if (fence) {
@@ -151,6 +151,7 @@ i915_sw_batchbuffer_destroy(struct i915_winsys_batchbuffer *ibatch)
void i915_sw_winsys_init_batchbuffer_functions(struct i915_sw_winsys *isws)
{
isws->base.batchbuffer_create = i915_sw_batchbuffer_create;
+ isws->base.validate_buffers = i915_sw_batchbuffer_validate_buffers;
isws->base.batchbuffer_reloc = i915_sw_batchbuffer_reloc;
isws->base.batchbuffer_flush = i915_sw_batchbuffer_flush;
isws->base.batchbuffer_destroy = i915_sw_batchbuffer_destroy;
diff --git a/src/gallium/winsys/i915/sw/i915_sw_buffer.c b/src/gallium/winsys/i915/sw/i915_sw_buffer.c
index 834805e621d..9a7e90e2173 100644
--- a/src/gallium/winsys/i915/sw/i915_sw_buffer.c
+++ b/src/gallium/winsys/i915/sw/i915_sw_buffer.c
@@ -84,7 +84,7 @@ i915_sw_buffer_write(struct i915_winsys *iws,
{
struct i915_sw_buffer *buf = i915_sw_buffer(buffer);
- memcpy(buf->ptr + offset, data, size);
+ memcpy((char*)buf->ptr + offset, data, size);
return 0;
}
diff --git a/src/gallium/winsys/i915/sw/i915_sw_winsys.c b/src/gallium/winsys/i915/sw/i915_sw_winsys.c
index 058ddc44aaf..fc48da6fb92 100644
--- a/src/gallium/winsys/i915/sw/i915_sw_winsys.c
+++ b/src/gallium/winsys/i915/sw/i915_sw_winsys.c
@@ -50,7 +50,7 @@ i915_sw_winsys_create()
isws->base.pci_id = deviceID;
isws->max_batch_size = 16 * 4096;
- isws->dump_cmd = debug_get_bool_option("INTEL_DUMP_CMD", FALSE);
+ isws->dump_cmd = debug_get_bool_option("I915_DUMP_CMD", FALSE);
return &isws->base;
}
diff --git a/src/gallium/winsys/i965/drm/i965_drm_buffer.c b/src/gallium/winsys/i965/drm/i965_drm_buffer.c
index ed62db60bbb..a904179eeb9 100644
--- a/src/gallium/winsys/i965/drm/i965_drm_buffer.c
+++ b/src/gallium/winsys/i965/drm/i965_drm_buffer.c
@@ -325,7 +325,7 @@ i965_libdrm_bo_subdata(struct brw_winsys_buffer *buffer,
brw_dump_data( idws->base.pci_id,
data_type,
buf->bo->offset + offset,
- data, size );
+ data, size, buffer->sws->gen );
/* XXX: use bo_map_gtt/memcpy/unmap_gtt under some circumstances???
*/
@@ -464,7 +464,7 @@ i965_libdrm_bo_flush_range(struct brw_winsys_buffer *buffer,
buf->data_type,
buf->bo->offset + offset,
(char*)buf->bo->virtual + offset,
- length );
+ length, buffer->sws->gen );
}
static void
diff --git a/src/gallium/winsys/nouveau/drm/nouveau_drm_winsys.c b/src/gallium/winsys/nouveau/drm/nouveau_drm_winsys.c
index d4bf124ce6f..648d6c8a8e2 100644
--- a/src/gallium/winsys/nouveau/drm/nouveau_drm_winsys.c
+++ b/src/gallium/winsys/nouveau/drm/nouveau_drm_winsys.c
@@ -50,6 +50,9 @@ nouveau_drm_screen_create(int fd)
case 0xa0:
init = nv50_screen_create;
break;
+ case 0xc0:
+ init = nvc0_screen_create;
+ break;
default:
debug_printf("%s: unknown chipset nv%02x\n", __func__,
dev->chipset);
diff --git a/src/gallium/winsys/r600/Android.mk b/src/gallium/winsys/r600/Android.mk
new file mode 100644
index 00000000000..643a59dc42e
--- /dev/null
+++ b/src/gallium/winsys/r600/Android.mk
@@ -0,0 +1,38 @@
+ifeq ($(strip $(MESA_BUILD_R600G)),true)
+
+LOCAL_PATH := $(call my-dir)
+
+# from drm/Makefile
+C_SOURCES = \
+ bof.c \
+ evergreen_hw_context.c \
+ radeon_bo.c \
+ radeon_pciid.c \
+ r600_bo.c \
+ r600_drm.c \
+ r600_hw_context.c \
+ r600_bomgr.c
+
+include $(CLEAR_VARS)
+
+LOCAL_SRC_FILES := \
+ $(addprefix drm/, $(C_SOURCES))
+
+LOCAL_CFLAGS := \
+ -std=c99 \
+ -fvisibility=hidden \
+ -Wno-sign-compare
+
+LOCAL_C_INCLUDES := \
+ external/mesa/include \
+ external/mesa/src/gallium/include \
+ external/mesa/src/gallium/auxiliary \
+ external/mesa/src/gallium/drivers/r600 \
+ external/drm \
+ external/drm/include/drm
+
+LOCAL_MODULE := libmesa_winsys_r600
+
+include $(BUILD_STATIC_LIBRARY)
+
+endif # MESA_BUILD_R600G
diff --git a/src/gallium/winsys/r600/drm/Makefile b/src/gallium/winsys/r600/drm/Makefile
index a396205f897..7310734f051 100644
--- a/src/gallium/winsys/r600/drm/Makefile
+++ b/src/gallium/winsys/r600/drm/Makefile
@@ -8,12 +8,11 @@ C_SOURCES = \
bof.c \
evergreen_hw_context.c \
radeon_bo.c \
- radeon_bo_pb.c \
radeon_pciid.c \
- r600.c \
r600_bo.c \
r600_drm.c \
- r600_hw_context.c
+ r600_hw_context.c \
+ r600_bomgr.c
LIBRARY_INCLUDES = -I$(TOP)/src/gallium/drivers/r600 \
$(shell pkg-config libdrm --cflags-only-I)
diff --git a/src/gallium/winsys/r600/drm/SConscript b/src/gallium/winsys/r600/drm/SConscript
index cc053c06dd0..cc9a06a2393 100644
--- a/src/gallium/winsys/r600/drm/SConscript
+++ b/src/gallium/winsys/r600/drm/SConscript
@@ -6,15 +6,19 @@ r600_sources = [
'bof.c',
'evergreen_hw_context.c',
'radeon_bo.c',
- 'radeon_bo_pb.c',
'radeon_pciid.c',
- 'r600.c',
'r600_bo.c',
'r600_drm.c',
'r600_hw_context.c',
+ 'r600_bomgr.c',
]
-env.ParseConfig('pkg-config --cflags libdrm_radeon')
+try:
+ env.ParseConfig('pkg-config --cflags libdrm_radeon')
+except OSError:
+ print 'warning: not building r600g'
+ Return()
+
env.Append(CPPPATH = '#/src/gallium/drivers/r600')
r600winsys = env.ConvenienceLibrary(
diff --git a/src/gallium/winsys/r600/drm/bof.c b/src/gallium/winsys/r600/drm/bof.c
index 0598cc6bc0f..5c923ad38d6 100644
--- a/src/gallium/winsys/r600/drm/bof.c
+++ b/src/gallium/winsys/r600/drm/bof.c
@@ -46,7 +46,7 @@ static int bof_entry_grow(bof_t *bof)
}
/*
- * object
+ * object
*/
bof_t *bof_object(void)
{
diff --git a/src/gallium/winsys/r600/drm/evergreen_hw_context.c b/src/gallium/winsys/r600/drm/evergreen_hw_context.c
index e1f163eab62..66398afa698 100644
--- a/src/gallium/winsys/r600/drm/evergreen_hw_context.c
+++ b/src/gallium/winsys/r600/drm/evergreen_hw_context.c
@@ -36,7 +36,6 @@
#include "pipe/p_compiler.h"
#include "util/u_inlines.h"
#include "util/u_memory.h"
-#include <pipebuffer/pb_bufmgr.h>
#include "r600_priv.h"
#define GROUP_FORCE_NEW_BLOCK 0
@@ -622,10 +621,9 @@ int evergreen_context_init(struct r600_context *ctx, struct radeon *radeon)
/* save 16dwords space for fence mecanism */
ctx->pm4_ndwords -= 16;
- r = r600_context_init_fence(ctx);
- if (r) {
- goto out_err;
- }
+ ctx->max_db = 8;
+
+ LIST_INITHEAD(&ctx->fenced_bo);
/* init dirty list */
LIST_INITHEAD(&ctx->dirty);
@@ -836,25 +834,25 @@ void evergreen_context_draw(struct r600_context *ctx, const struct r600_draw *dr
}
/* draw packet */
- ctx->pm4[ctx->pm4_cdwords++] = PKT3(PKT3_INDEX_TYPE, 0);
+ ctx->pm4[ctx->pm4_cdwords++] = PKT3(PKT3_INDEX_TYPE, 0, ctx->predicate_drawing);
ctx->pm4[ctx->pm4_cdwords++] = draw->vgt_index_type;
- ctx->pm4[ctx->pm4_cdwords++] = PKT3(PKT3_NUM_INSTANCES, 0);
+ ctx->pm4[ctx->pm4_cdwords++] = PKT3(PKT3_NUM_INSTANCES, 0, ctx->predicate_drawing);
ctx->pm4[ctx->pm4_cdwords++] = draw->vgt_num_instances;
if (draw->indices) {
- ctx->pm4[ctx->pm4_cdwords++] = PKT3(PKT3_DRAW_INDEX, 3);
+ ctx->pm4[ctx->pm4_cdwords++] = PKT3(PKT3_DRAW_INDEX, 3, ctx->predicate_drawing);
ctx->pm4[ctx->pm4_cdwords++] = draw->indices_bo_offset + r600_bo_offset(draw->indices);
ctx->pm4[ctx->pm4_cdwords++] = 0;
ctx->pm4[ctx->pm4_cdwords++] = draw->vgt_num_indices;
ctx->pm4[ctx->pm4_cdwords++] = draw->vgt_draw_initiator;
- ctx->pm4[ctx->pm4_cdwords++] = PKT3(PKT3_NOP, 0);
+ ctx->pm4[ctx->pm4_cdwords++] = PKT3(PKT3_NOP, 0, ctx->predicate_drawing);
ctx->pm4[ctx->pm4_cdwords++] = 0;
r600_context_bo_reloc(ctx, &ctx->pm4[ctx->pm4_cdwords - 1], draw->indices);
} else {
- ctx->pm4[ctx->pm4_cdwords++] = PKT3(PKT3_DRAW_INDEX_AUTO, 1);
+ ctx->pm4[ctx->pm4_cdwords++] = PKT3(PKT3_DRAW_INDEX_AUTO, 1, ctx->predicate_drawing);
ctx->pm4[ctx->pm4_cdwords++] = draw->vgt_num_indices;
ctx->pm4[ctx->pm4_cdwords++] = draw->vgt_draw_initiator;
}
- ctx->pm4[ctx->pm4_cdwords++] = PKT3(PKT3_EVENT_WRITE, 0);
+ ctx->pm4[ctx->pm4_cdwords++] = PKT3(PKT3_EVENT_WRITE, 0, ctx->predicate_drawing);
ctx->pm4[ctx->pm4_cdwords++] = EVENT_TYPE(EVENT_TYPE_CACHE_FLUSH_AND_INV_EVENT) | EVENT_INDEX(0);
/* flush color buffer */
@@ -881,59 +879,3 @@ void evergreen_context_draw(struct r600_context *ctx, const struct r600_draw *dr
ctx->pm4_dirty_cdwords = 0;
}
-static inline void evergreen_resource_set(struct r600_context *ctx, struct r600_pipe_state *state, unsigned offset)
-{
- struct r600_range *range;
- struct r600_block *block;
-
- range = &ctx->range[CTX_RANGE_ID(ctx, offset)];
- block = range->blocks[CTX_BLOCK_ID(ctx, offset)];
- block->reg[0] = state->regs[0].value;
- block->reg[1] = state->regs[1].value;
- block->reg[2] = state->regs[2].value;
- block->reg[3] = state->regs[3].value;
- block->reg[4] = state->regs[4].value;
- block->reg[5] = state->regs[5].value;
- block->reg[6] = state->regs[6].value;
- block->reg[7] = state->regs[7].value;
- r600_bo_reference(ctx->radeon, &block->reloc[1].bo, NULL);
- r600_bo_reference(ctx->radeon , &block->reloc[2].bo, NULL);
- if (state->regs[0].bo) {
- /* VERTEX RESOURCE, we preted there is 2 bo to relocate so
- * we have single case btw VERTEX & TEXTURE resource
- */
- r600_bo_reference(ctx->radeon, &block->reloc[1].bo, state->regs[0].bo);
- r600_bo_reference(ctx->radeon, &block->reloc[2].bo, state->regs[0].bo);
- } else {
- /* TEXTURE RESOURCE */
- r600_bo_reference(ctx->radeon, &block->reloc[1].bo, state->regs[2].bo);
- r600_bo_reference(ctx->radeon, &block->reloc[2].bo, state->regs[3].bo);
- }
- if (!(block->status & R600_BLOCK_STATUS_DIRTY)) {
- block->status |= R600_BLOCK_STATUS_ENABLED;
- block->status |= R600_BLOCK_STATUS_DIRTY;
- ctx->pm4_dirty_cdwords += block->pm4_ndwords + block->pm4_flush_ndwords;
- LIST_ADDTAIL(&block->list,&ctx->dirty);
- }
-}
-
-void evergreen_ps_resource_set(struct r600_context *ctx, struct r600_pipe_state *state, unsigned rid)
-{
- unsigned offset = R_030000_RESOURCE0_WORD0 + 0x20 * rid;
-
- evergreen_resource_set(ctx, state, offset);
-}
-
-void evergreen_vs_resource_set(struct r600_context *ctx, struct r600_pipe_state *state, unsigned rid)
-{
- unsigned offset = R_030000_RESOURCE0_WORD0 + 0x1600 + 0x20 * rid;
-
- evergreen_resource_set(ctx, state, offset);
-}
-
-void evergreen_fs_resource_set(struct r600_context *ctx, struct r600_pipe_state *state, unsigned rid)
-{
- unsigned offset = R_030000_RESOURCE0_WORD0 + 0x7C00 + 0x20 * rid;
-
- evergreen_resource_set(ctx, state, offset);
-}
diff --git a/src/gallium/winsys/r600/drm/r600.c b/src/gallium/winsys/r600/drm/r600.c
deleted file mode 100644
index f5e53e21f51..00000000000
--- a/src/gallium/winsys/r600/drm/r600.c
+++ /dev/null
@@ -1,175 +0,0 @@
-/*
- * Copyright 2010 Jerome Glisse <glisse@freedesktop.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
- * THE AUTHOR(S) AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM,
- * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
- * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
- * USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- * Authors:
- * Jerome Glisse
- */
-#include "xf86drm.h"
-#include "radeon_drm.h"
-#include "pipe/p_compiler.h"
-#include "util/u_inlines.h"
-#include <pipebuffer/pb_bufmgr.h>
-#include "r600_priv.h"
-
-enum radeon_family r600_get_family(struct radeon *r600)
-{
- return r600->family;
-}
-
-enum chip_class r600_get_family_class(struct radeon *radeon)
-{
- return radeon->chip_class;
-}
-
-struct r600_tiling_info *r600_get_tiling_info(struct radeon *radeon)
-{
- return &radeon->tiling_info;
-}
-
-static int r600_get_device(struct radeon *r600)
-{
- struct drm_radeon_info info;
-
- r600->device = 0;
- info.request = RADEON_INFO_DEVICE_ID;
- info.value = (uintptr_t)&r600->device;
- return drmCommandWriteRead(r600->fd, DRM_RADEON_INFO, &info, sizeof(struct drm_radeon_info));
-}
-
-struct radeon *r600_new(int fd, unsigned device)
-{
- struct radeon *r600;
- int r;
-
- r600 = calloc(1, sizeof(*r600));
- if (r600 == NULL) {
- return NULL;
- }
- r600->fd = fd;
- r600->device = device;
- if (fd >= 0) {
- r = r600_get_device(r600);
- if (r) {
- R600_ERR("Failed to get device id\n");
- r600_delete(r600);
- return NULL;
- }
- }
- r600->family = radeon_family_from_device(r600->device);
- if (r600->family == CHIP_UNKNOWN) {
- R600_ERR("Unknown chipset 0x%04X\n", r600->device);
- r600_delete(r600);
- return NULL;
- }
- switch (r600->family) {
- case CHIP_R600:
- case CHIP_RV610:
- case CHIP_RV630:
- case CHIP_RV670:
- case CHIP_RV620:
- case CHIP_RV635:
- case CHIP_RS780:
- case CHIP_RS880:
- case CHIP_RV770:
- case CHIP_RV730:
- case CHIP_RV710:
- case CHIP_RV740:
- case CHIP_CEDAR:
- case CHIP_REDWOOD:
- case CHIP_JUNIPER:
- case CHIP_CYPRESS:
- case CHIP_HEMLOCK:
- case CHIP_PALM:
- break;
- case CHIP_R100:
- case CHIP_RV100:
- case CHIP_RS100:
- case CHIP_RV200:
- case CHIP_RS200:
- case CHIP_R200:
- case CHIP_RV250:
- case CHIP_RS300:
- case CHIP_RV280:
- case CHIP_R300:
- case CHIP_R350:
- case CHIP_RV350:
- case CHIP_RV380:
- case CHIP_R420:
- case CHIP_R423:
- case CHIP_RV410:
- case CHIP_RS400:
- case CHIP_RS480:
- case CHIP_RS600:
- case CHIP_RS690:
- case CHIP_RS740:
- case CHIP_RV515:
- case CHIP_R520:
- case CHIP_RV530:
- case CHIP_RV560:
- case CHIP_RV570:
- case CHIP_R580:
- default:
- R600_ERR("unknown or unsupported chipset 0x%04X\n", r600->device);
- break;
- }
-
- /* setup class */
- switch (r600->family) {
- case CHIP_R600:
- case CHIP_RV610:
- case CHIP_RV630:
- case CHIP_RV670:
- case CHIP_RV620:
- case CHIP_RV635:
- case CHIP_RS780:
- case CHIP_RS880:
- r600->chip_class = R600;
- break;
- case CHIP_RV770:
- case CHIP_RV730:
- case CHIP_RV710:
- case CHIP_RV740:
- r600->chip_class = R700;
- break;
- case CHIP_CEDAR:
- case CHIP_REDWOOD:
- case CHIP_JUNIPER:
- case CHIP_CYPRESS:
- case CHIP_HEMLOCK:
- case CHIP_PALM:
- r600->chip_class = EVERGREEN;
- break;
- default:
- R600_ERR("unknown or unsupported chipset 0x%04X\n", r600->device);
- break;
- }
-
- return r600;
-}
-
-void r600_delete(struct radeon *r600)
-{
- if (r600 == NULL)
- return;
- drmClose(r600->fd);
- free(r600);
-}
diff --git a/src/gallium/winsys/r600/drm/r600_bo.c b/src/gallium/winsys/r600/drm/r600_bo.c
index 251f009a6b0..122a68884b4 100644
--- a/src/gallium/winsys/r600/drm/r600_bo.c
+++ b/src/gallium/winsys/r600/drm/r600_bo.c
@@ -36,142 +36,152 @@ struct r600_bo *r600_bo(struct radeon *radeon,
unsigned size, unsigned alignment,
unsigned binding, unsigned usage)
{
- struct r600_bo *ws_bo = calloc(1, sizeof(struct r600_bo));
- struct pb_desc desc;
- struct pb_manager *man;
+ struct r600_bo *bo;
+ struct radeon_bo *rbo;
- desc.alignment = alignment;
- desc.usage = (PB_USAGE_CPU_READ_WRITE | PB_USAGE_GPU_READ_WRITE);
- ws_bo->size = size;
+ if (binding & (PIPE_BIND_CONSTANT_BUFFER | PIPE_BIND_VERTEX_BUFFER | PIPE_BIND_INDEX_BUFFER)) {
+ bo = r600_bomgr_bo_create(radeon->bomgr, size, alignment, *radeon->cfence);
+ if (bo) {
+ return bo;
+ }
+ }
- if (binding & (PIPE_BIND_CONSTANT_BUFFER | PIPE_BIND_VERTEX_BUFFER | PIPE_BIND_INDEX_BUFFER))
- man = radeon->cman;
- else
- man = radeon->kman;
+ rbo = radeon_bo(radeon, 0, size, alignment);
+ if (rbo == NULL) {
+ return NULL;
+ }
+
+ bo = calloc(1, sizeof(struct r600_bo));
+ bo->size = size;
+ bo->alignment = alignment;
+ bo->bo = rbo;
+ if (binding & (PIPE_BIND_CONSTANT_BUFFER | PIPE_BIND_VERTEX_BUFFER | PIPE_BIND_INDEX_BUFFER)) {
+ r600_bomgr_bo_init(radeon->bomgr, bo);
+ }
/* Staging resources particpate in transfers and blits only
* and are used for uploads and downloads from regular
* resources. We generate them internally for some transfers.
*/
if (usage == PIPE_USAGE_STAGING)
- ws_bo->domains = RADEON_GEM_DOMAIN_CPU | RADEON_GEM_DOMAIN_GTT;
- else
- ws_bo->domains = (RADEON_GEM_DOMAIN_CPU |
- RADEON_GEM_DOMAIN_GTT |
- RADEON_GEM_DOMAIN_VRAM);
-
-
- ws_bo->pb = man->create_buffer(man, size, &desc);
- if (ws_bo->pb == NULL) {
- free(ws_bo);
- return NULL;
- }
+ bo->domains = RADEON_GEM_DOMAIN_CPU | RADEON_GEM_DOMAIN_GTT;
+ else
+ bo->domains = (RADEON_GEM_DOMAIN_CPU |
+ RADEON_GEM_DOMAIN_GTT |
+ RADEON_GEM_DOMAIN_VRAM);
- pipe_reference_init(&ws_bo->reference, 1);
- return ws_bo;
+ pipe_reference_init(&bo->reference, 1);
+ return bo;
}
struct r600_bo *r600_bo_handle(struct radeon *radeon,
unsigned handle, unsigned *array_mode)
{
- struct r600_bo *ws_bo = calloc(1, sizeof(struct r600_bo));
- struct radeon_bo *bo;
+ struct r600_bo *bo = calloc(1, sizeof(struct r600_bo));
+ struct radeon_bo *rbo;
- ws_bo->pb = radeon_bo_pb_create_buffer_from_handle(radeon->kman, handle);
- if (!ws_bo->pb) {
- free(ws_bo);
+ rbo = bo->bo = radeon_bo(radeon, handle, 0, 0);
+ if (rbo == NULL) {
+ free(bo);
return NULL;
}
- bo = radeon_bo_pb_get_bo(ws_bo->pb);
- ws_bo->size = bo->size;
- ws_bo->domains = (RADEON_GEM_DOMAIN_CPU |
- RADEON_GEM_DOMAIN_GTT |
- RADEON_GEM_DOMAIN_VRAM);
+ bo->size = rbo->size;
+ bo->domains = (RADEON_GEM_DOMAIN_CPU |
+ RADEON_GEM_DOMAIN_GTT |
+ RADEON_GEM_DOMAIN_VRAM);
- pipe_reference_init(&ws_bo->reference, 1);
+ pipe_reference_init(&bo->reference, 1);
- radeon_bo_get_tiling_flags(radeon, bo, &ws_bo->tiling_flags,
- &ws_bo->kernel_pitch);
+ radeon_bo_get_tiling_flags(radeon, rbo, &bo->tiling_flags, &bo->kernel_pitch);
if (array_mode) {
- if (ws_bo->tiling_flags) {
- if (ws_bo->tiling_flags & RADEON_TILING_MICRO)
- *array_mode = V_0280A0_ARRAY_1D_TILED_THIN1;
- if ((ws_bo->tiling_flags & (RADEON_TILING_MICRO | RADEON_TILING_MACRO)) ==
- (RADEON_TILING_MICRO | RADEON_TILING_MACRO))
+ if (bo->tiling_flags) {
+ if (bo->tiling_flags & RADEON_TILING_MACRO)
*array_mode = V_0280A0_ARRAY_2D_TILED_THIN1;
+ else if (bo->tiling_flags & RADEON_TILING_MICRO)
+ *array_mode = V_0280A0_ARRAY_1D_TILED_THIN1;
} else {
*array_mode = 0;
}
}
- return ws_bo;
+ return bo;
}
void *r600_bo_map(struct radeon *radeon, struct r600_bo *bo, unsigned usage, void *ctx)
{
- return pb_map(bo->pb, usage, ctx);
+ struct pipe_context *pctx = ctx;
+
+ if (usage & PB_USAGE_UNSYNCHRONIZED) {
+ radeon_bo_map(radeon, bo->bo);
+ return (uint8_t *) bo->bo->data + bo->offset;
+ }
+
+ if (p_atomic_read(&bo->bo->reference.count) > 1) {
+ if (usage & PB_USAGE_DONTBLOCK) {
+ return NULL;
+ }
+ if (ctx) {
+ pctx->flush(pctx, NULL);
+ }
+ }
+
+ if (usage & PB_USAGE_DONTBLOCK) {
+ uint32_t domain;
+
+ if (radeon_bo_busy(radeon, bo->bo, &domain))
+ return NULL;
+ if (radeon_bo_map(radeon, bo->bo)) {
+ return NULL;
+ }
+ goto out;
+ }
+
+ radeon_bo_map(radeon, bo->bo);
+ if (radeon_bo_wait(radeon, bo->bo)) {
+ radeon_bo_unmap(radeon, bo->bo);
+ return NULL;
+ }
+
+out:
+ return (uint8_t *) bo->bo->data + bo->offset;
}
void r600_bo_unmap(struct radeon *radeon, struct r600_bo *bo)
{
- pb_unmap(bo->pb);
+ radeon_bo_unmap(radeon, bo->bo);
}
-static void r600_bo_destroy(struct radeon *radeon, struct r600_bo *bo)
+void r600_bo_destroy(struct radeon *radeon, struct r600_bo *bo)
{
- if (bo->pb)
- pb_reference(&bo->pb, NULL);
+ if (bo->manager_id) {
+ if (!r600_bomgr_bo_destroy(radeon->bomgr, bo)) {
+ /* destroy is delayed by buffer manager */
+ return;
+ }
+ }
+ radeon_bo_reference(radeon, &bo->bo, NULL);
free(bo);
}
-void r600_bo_reference(struct radeon *radeon, struct r600_bo **dst,
- struct r600_bo *src)
+void r600_bo_reference(struct radeon *radeon, struct r600_bo **dst, struct r600_bo *src)
{
struct r600_bo *old = *dst;
-
+
if (pipe_reference(&(*dst)->reference, &src->reference)) {
r600_bo_destroy(radeon, old);
}
*dst = src;
}
-unsigned r600_bo_get_handle(struct r600_bo *pb_bo)
-{
- struct radeon_bo *bo;
-
- bo = radeon_bo_pb_get_bo(pb_bo->pb);
- if (!bo)
- return 0;
-
- return bo->handle;
-}
-
-unsigned r600_bo_get_size(struct r600_bo *pb_bo)
-{
- struct radeon_bo *bo;
-
- bo = radeon_bo_pb_get_bo(pb_bo->pb);
- if (!bo)
- return 0;
-
- return bo->size;
-}
-
-boolean r600_bo_get_winsys_handle(struct radeon *radeon, struct r600_bo *pb_bo,
+boolean r600_bo_get_winsys_handle(struct radeon *radeon, struct r600_bo *bo,
unsigned stride, struct winsys_handle *whandle)
{
- struct radeon_bo *bo;
-
- bo = radeon_bo_pb_get_bo(pb_bo->pb);
- if (!bo)
- return FALSE;
-
whandle->stride = stride;
switch(whandle->type) {
case DRM_API_HANDLE_TYPE_KMS:
- whandle->handle = r600_bo_get_handle(pb_bo);
+ whandle->handle = r600_bo_get_handle(bo);
break;
case DRM_API_HANDLE_TYPE_SHARED:
- if (radeon_bo_get_name(radeon, bo, &whandle->handle))
+ if (radeon_bo_get_name(radeon, bo->bo, &whandle->handle))
return FALSE;
break;
default:
diff --git a/src/gallium/winsys/r600/drm/r600_bomgr.c b/src/gallium/winsys/r600/drm/r600_bomgr.c
new file mode 100644
index 00000000000..446ef0f9cfc
--- /dev/null
+++ b/src/gallium/winsys/r600/drm/r600_bomgr.c
@@ -0,0 +1,161 @@
+/*
+ * Copyright 2010 VMWare.
+ * Copyright 2010 Red Hat Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * on the rights to use, copy, modify, merge, publish, distribute, sub
+ * license, and/or sell copies of the Software, and to permit persons to whom
+ * the Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHOR(S) AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM,
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
+ * USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * Authors:
+ * Jose Fonseca <jrfonseca-at-vmware-dot-com>
+ * Thomas Hellström <thomas-at-vmware-dot-com>
+ * Jerome Glisse <jglisse@redhat.com>
+ */
+#include <util/u_memory.h>
+#include <util/u_double_list.h>
+#include <util/u_time.h>
+#include <pipebuffer/pb_bufmgr.h>
+#include "r600_priv.h"
+
+static void r600_bomgr_timeout_flush(struct r600_bomgr *mgr)
+{
+ struct r600_bo *bo, *tmp;
+ int64_t now;
+
+ now = os_time_get();
+ LIST_FOR_EACH_ENTRY_SAFE(bo, tmp, &mgr->delayed, list) {
+ if(!os_time_timeout(bo->start, bo->end, now))
+ break;
+
+ mgr->num_delayed--;
+ bo->manager_id = 0;
+ LIST_DEL(&bo->list);
+ r600_bo_destroy(mgr->radeon, bo);
+ }
+}
+
+static INLINE int r600_bo_is_compat(struct r600_bomgr *mgr,
+ struct r600_bo *bo,
+ unsigned size,
+ unsigned alignment,
+ unsigned cfence)
+{
+ if(bo->size < size) {
+ return 0;
+ }
+
+ /* be lenient with size */
+ if(bo->size >= 2*size) {
+ return 0;
+ }
+
+ if(!pb_check_alignment(alignment, bo->alignment)) {
+ return 0;
+ }
+
+ if (!fence_is_after(cfence, bo->fence)) {
+ return 0;
+ }
+
+ return 1;
+}
+
+struct r600_bo *r600_bomgr_bo_create(struct r600_bomgr *mgr,
+ unsigned size,
+ unsigned alignment,
+ unsigned cfence)
+{
+ struct r600_bo *bo, *tmp;
+ int64_t now;
+
+
+ pipe_mutex_lock(mgr->mutex);
+
+ now = os_time_get();
+ LIST_FOR_EACH_ENTRY_SAFE(bo, tmp, &mgr->delayed, list) {
+ if(r600_bo_is_compat(mgr, bo, size, alignment, cfence)) {
+ LIST_DEL(&bo->list);
+ --mgr->num_delayed;
+ r600_bomgr_timeout_flush(mgr);
+ pipe_mutex_unlock(mgr->mutex);
+ LIST_INITHEAD(&bo->list);
+ pipe_reference_init(&bo->reference, 1);
+ return bo;
+ }
+
+ if(os_time_timeout(bo->start, bo->end, now)) {
+ mgr->num_delayed--;
+ bo->manager_id = 0;
+ LIST_DEL(&bo->list);
+ r600_bo_destroy(mgr->radeon, bo);
+ }
+ }
+
+ pipe_mutex_unlock(mgr->mutex);
+ return NULL;
+}
+
+void r600_bomgr_bo_init(struct r600_bomgr *mgr, struct r600_bo *bo)
+{
+ LIST_INITHEAD(&bo->list);
+ bo->manager_id = 1;
+}
+
+bool r600_bomgr_bo_destroy(struct r600_bomgr *mgr, struct r600_bo *bo)
+{
+ bo->start = os_time_get();
+ bo->end = bo->start + mgr->usecs;
+ pipe_mutex_lock(mgr->mutex);
+ LIST_ADDTAIL(&bo->list, &mgr->delayed);
+ ++mgr->num_delayed;
+ pipe_mutex_unlock(mgr->mutex);
+ return FALSE;
+}
+
+void r600_bomgr_destroy(struct r600_bomgr *mgr)
+{
+ struct r600_bo *bo, *tmp;
+
+ pipe_mutex_lock(mgr->mutex);
+ LIST_FOR_EACH_ENTRY_SAFE(bo, tmp, &mgr->delayed, list) {
+ mgr->num_delayed--;
+ bo->manager_id = 0;
+ LIST_DEL(&bo->list);
+ r600_bo_destroy(mgr->radeon, bo);
+ }
+ pipe_mutex_unlock(mgr->mutex);
+
+ FREE(mgr);
+}
+
+struct r600_bomgr *r600_bomgr_create(struct radeon *radeon, unsigned usecs)
+{
+ struct r600_bomgr *mgr;
+
+ mgr = CALLOC_STRUCT(r600_bomgr);
+ if (mgr == NULL)
+ return NULL;
+
+ mgr->radeon = radeon;
+ mgr->usecs = usecs;
+ LIST_INITHEAD(&mgr->delayed);
+ mgr->num_delayed = 0;
+ pipe_mutex_init(mgr->mutex);
+
+ return mgr;
+}
diff --git a/src/gallium/winsys/r600/drm/r600_drm.c b/src/gallium/winsys/r600/drm/r600_drm.c
index 8c847122f84..c081abb4dcd 100644
--- a/src/gallium/winsys/r600/drm/r600_drm.c
+++ b/src/gallium/winsys/r600/drm/r600_drm.c
@@ -41,11 +41,48 @@
#define RADEON_INFO_TILING_CONFIG 0x6
#endif
-static struct radeon *radeon_new(int fd, unsigned device);
+#ifndef RADEON_INFO_CLOCK_CRYSTAL_FREQ
+#define RADEON_INFO_CLOCK_CRYSTAL_FREQ 0x9
+#endif
+
+#ifndef RADEON_INFO_NUM_BACKENDS
+#define RADEON_INFO_NUM_BACKENDS 0xa
+#endif
+
+enum radeon_family r600_get_family(struct radeon *r600)
+{
+ return r600->family;
+}
+
+enum chip_class r600_get_family_class(struct radeon *radeon)
+{
+ return radeon->chip_class;
+}
+
+struct r600_tiling_info *r600_get_tiling_info(struct radeon *radeon)
+{
+ return &radeon->tiling_info;
+}
+
+unsigned r600_get_clock_crystal_freq(struct radeon *radeon)
+{
+ return radeon->clock_crystal_freq;
+}
+
+unsigned r600_get_num_backends(struct radeon *radeon)
+{
+ return radeon->num_backends;
+}
+
+unsigned r600_get_minor_version(struct radeon *radeon)
+{
+ return radeon->minor_version;
+}
+
static int radeon_get_device(struct radeon *radeon)
{
- struct drm_radeon_info info;
+ struct drm_radeon_info info = {};
int r;
radeon->device = 0;
@@ -56,20 +93,8 @@ static int radeon_get_device(struct radeon *radeon)
return r;
}
-static int radeon_drm_get_tiling(struct radeon *radeon)
+static int r600_interpret_tiling(struct radeon *radeon, uint32_t tiling_config)
{
- struct drm_radeon_info info;
- int r;
- uint32_t tiling_config;
-
- info.request = RADEON_INFO_TILING_CONFIG;
- info.value = (uintptr_t)&tiling_config;
- r = drmCommandWriteRead(radeon->fd, DRM_RADEON_INFO, &info,
- sizeof(struct drm_radeon_info));
-
- if (r)
- return 0;
-
switch ((tiling_config & 0xe) >> 1) {
case 0:
radeon->tiling_info.num_channels = 1;
@@ -111,10 +136,117 @@ static int radeon_drm_get_tiling(struct radeon *radeon)
return 0;
}
+static int eg_interpret_tiling(struct radeon *radeon, uint32_t tiling_config)
+{
+ switch (tiling_config & 0xf) {
+ case 0:
+ radeon->tiling_info.num_channels = 1;
+ break;
+ case 1:
+ radeon->tiling_info.num_channels = 2;
+ break;
+ case 2:
+ radeon->tiling_info.num_channels = 4;
+ break;
+ case 3:
+ radeon->tiling_info.num_channels = 8;
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ radeon->tiling_info.num_banks = (tiling_config & 0xf0) >> 4;
+
+ switch ((tiling_config & 0xf00) >> 8) {
+ case 0:
+ radeon->tiling_info.group_bytes = 256;
+ break;
+ case 1:
+ radeon->tiling_info.group_bytes = 512;
+ break;
+ default:
+ return -EINVAL;
+ }
+ return 0;
+}
+
+static int radeon_drm_get_tiling(struct radeon *radeon)
+{
+ struct drm_radeon_info info;
+ int r;
+ uint32_t tiling_config = 0;
+
+ info.request = RADEON_INFO_TILING_CONFIG;
+ info.value = (uintptr_t)&tiling_config;
+ r = drmCommandWriteRead(radeon->fd, DRM_RADEON_INFO, &info,
+ sizeof(struct drm_radeon_info));
+
+ if (r)
+ return 0;
+
+ if (radeon->chip_class == R600 || radeon->chip_class == R700) {
+ r = r600_interpret_tiling(radeon, tiling_config);
+ } else {
+ r = eg_interpret_tiling(radeon, tiling_config);
+ }
+ return r;
+}
+
+static int radeon_get_clock_crystal_freq(struct radeon *radeon)
+{
+ struct drm_radeon_info info;
+ uint32_t clock_crystal_freq;
+ int r;
+
+ radeon->device = 0;
+ info.request = RADEON_INFO_CLOCK_CRYSTAL_FREQ;
+ info.value = (uintptr_t)&clock_crystal_freq;
+ r = drmCommandWriteRead(radeon->fd, DRM_RADEON_INFO, &info,
+ sizeof(struct drm_radeon_info));
+ if (r)
+ return r;
+
+ radeon->clock_crystal_freq = clock_crystal_freq;
+ return 0;
+}
+
+
+static int radeon_get_num_backends(struct radeon *radeon)
+{
+ struct drm_radeon_info info;
+ uint32_t num_backends;
+ int r;
+
+ radeon->device = 0;
+ info.request = RADEON_INFO_NUM_BACKENDS;
+ info.value = (uintptr_t)&num_backends;
+ r = drmCommandWriteRead(radeon->fd, DRM_RADEON_INFO, &info,
+ sizeof(struct drm_radeon_info));
+ if (r)
+ return r;
+
+ radeon->num_backends = num_backends;
+ return 0;
+}
+
+
+static int radeon_init_fence(struct radeon *radeon)
+{
+ radeon->fence = 1;
+ radeon->fence_bo = r600_bo(radeon, 4096, 0, 0, 0);
+ if (radeon->fence_bo == NULL) {
+ return -ENOMEM;
+ }
+ radeon->cfence = r600_bo_map(radeon, radeon->fence_bo, PB_USAGE_UNSYNCHRONIZED, NULL);
+ *radeon->cfence = 0;
+ return 0;
+}
+
static struct radeon *radeon_new(int fd, unsigned device)
{
struct radeon *radeon;
int r;
+ drmVersionPtr version;
radeon = calloc(1, sizeof(*radeon));
if (radeon == NULL) {
@@ -123,71 +255,32 @@ static struct radeon *radeon_new(int fd, unsigned device)
radeon->fd = fd;
radeon->device = device;
radeon->refcount = 1;
- if (fd >= 0) {
- r = radeon_get_device(radeon);
- if (r) {
- fprintf(stderr, "Failed to get device id\n");
- return radeon_decref(radeon);
- }
+
+ version = drmGetVersion(radeon->fd);
+ if (version->version_major != 2) {
+ fprintf(stderr, "%s: DRM version is %d.%d.%d but this driver is "
+ "only compatible with 2.x.x\n", __FUNCTION__,
+ version->version_major, version->version_minor,
+ version->version_patchlevel);
+ drmFreeVersion(version);
+ exit(1);
+ }
+
+ radeon->minor_version = version->version_minor;
+
+ drmFreeVersion(version);
+
+ r = radeon_get_device(radeon);
+ if (r) {
+ fprintf(stderr, "Failed to get device id\n");
+ return radeon_decref(radeon);
}
+
radeon->family = radeon_family_from_device(radeon->device);
if (radeon->family == CHIP_UNKNOWN) {
fprintf(stderr, "Unknown chipset 0x%04X\n", radeon->device);
return radeon_decref(radeon);
}
- switch (radeon->family) {
- case CHIP_R600:
- case CHIP_RV610:
- case CHIP_RV630:
- case CHIP_RV670:
- case CHIP_RV620:
- case CHIP_RV635:
- case CHIP_RS780:
- case CHIP_RS880:
- case CHIP_RV770:
- case CHIP_RV730:
- case CHIP_RV710:
- case CHIP_RV740:
- case CHIP_CEDAR:
- case CHIP_REDWOOD:
- case CHIP_JUNIPER:
- case CHIP_CYPRESS:
- case CHIP_HEMLOCK:
- case CHIP_PALM:
- break;
- case CHIP_R100:
- case CHIP_RV100:
- case CHIP_RS100:
- case CHIP_RV200:
- case CHIP_RS200:
- case CHIP_R200:
- case CHIP_RV250:
- case CHIP_RS300:
- case CHIP_RV280:
- case CHIP_R300:
- case CHIP_R350:
- case CHIP_RV350:
- case CHIP_RV380:
- case CHIP_R420:
- case CHIP_R423:
- case CHIP_RV410:
- case CHIP_RS400:
- case CHIP_RS480:
- case CHIP_RS600:
- case CHIP_RS690:
- case CHIP_RS740:
- case CHIP_RV515:
- case CHIP_R520:
- case CHIP_RV530:
- case CHIP_RV560:
- case CHIP_RV570:
- case CHIP_R580:
- default:
- fprintf(stderr, "%s unknown or unsupported chipset 0x%04X\n",
- __func__, radeon->device);
- break;
- }
-
/* setup class */
switch (radeon->family) {
case CHIP_R600:
@@ -216,6 +309,9 @@ static struct radeon *radeon_new(int fd, unsigned device)
case CHIP_CYPRESS:
case CHIP_HEMLOCK:
case CHIP_PALM:
+ case CHIP_BARTS:
+ case CHIP_TURKS:
+ case CHIP_CAICOS:
radeon->chip_class = EVERGREEN;
/* set default group bytes, overridden by tiling info ioctl */
radeon->tiling_info.group_bytes = 512;
@@ -226,16 +322,24 @@ static struct radeon *radeon_new(int fd, unsigned device)
break;
}
- if (radeon->chip_class == R600 || radeon->chip_class == R700) {
- if (radeon_drm_get_tiling(radeon))
- return NULL;
- }
- radeon->kman = radeon_bo_pbmgr_create(radeon);
- if (!radeon->kman)
+ if (radeon_drm_get_tiling(radeon))
return NULL;
- radeon->cman = pb_cache_manager_create(radeon->kman, 1000000);
- if (!radeon->cman)
+
+ /* get the GPU counter frequency, failure is non fatal */
+ radeon_get_clock_crystal_freq(radeon);
+
+ if (radeon->minor_version >= 9)
+ radeon_get_num_backends(radeon);
+
+ radeon->bomgr = r600_bomgr_create(radeon, 1000000);
+ if (radeon->bomgr == NULL) {
return NULL;
+ }
+ r = radeon_init_fence(radeon);
+ if (r) {
+ radeon_decref(radeon);
+ return NULL;
+ }
return radeon;
}
@@ -252,14 +356,12 @@ struct radeon *radeon_decref(struct radeon *radeon)
return NULL;
}
- if (radeon->cman)
- radeon->cman->destroy(radeon->cman);
-
- if (radeon->kman)
- radeon->kman->destroy(radeon->kman);
+ if (radeon->fence_bo) {
+ r600_bo_reference(radeon, &radeon->fence_bo, NULL);
+ }
- if (radeon->fd >= 0)
- drmClose(radeon->fd);
+ if (radeon->bomgr)
+ r600_bomgr_destroy(radeon->bomgr);
free(radeon);
return NULL;
diff --git a/src/gallium/winsys/r600/drm/r600_hw_context.c b/src/gallium/winsys/r600/drm/r600_hw_context.c
index 0f2724f61ce..a7c21784e51 100644
--- a/src/gallium/winsys/r600/drm/r600_hw_context.c
+++ b/src/gallium/winsys/r600/drm/r600_hw_context.c
@@ -28,39 +28,25 @@
#include <string.h>
#include <stdlib.h>
#include <assert.h>
+#include <pipe/p_compiler.h>
+#include <util/u_inlines.h>
+#include <util/u_memory.h>
+#include <pipebuffer/pb_bufmgr.h>
#include "xf86drm.h"
-#include "r600.h"
-#include "r600d.h"
#include "radeon_drm.h"
-#include "bof.h"
-#include "pipe/p_compiler.h"
-#include "util/u_inlines.h"
-#include "util/u_memory.h"
-#include <pipebuffer/pb_bufmgr.h>
#include "r600_priv.h"
+#include "bof.h"
+#include "r600d.h"
#define GROUP_FORCE_NEW_BLOCK 0
-int r600_context_init_fence(struct r600_context *ctx)
-{
- ctx->fence = 1;
- ctx->fence_bo = r600_bo(ctx->radeon, 4096, 0, 0, 0);
- if (ctx->fence_bo == NULL) {
- return -ENOMEM;
- }
- ctx->cfence = r600_bo_map(ctx->radeon, ctx->fence_bo, PB_USAGE_UNSYNCHRONIZED, NULL);
- *ctx->cfence = 0;
- LIST_INITHEAD(&ctx->fenced_bo);
- return 0;
-}
-
static void INLINE r600_context_update_fenced_list(struct r600_context *ctx)
{
for (int i = 0; i < ctx->creloc; i++) {
if (!LIST_IS_EMPTY(&ctx->bo[i]->fencedlist))
LIST_DELINIT(&ctx->bo[i]->fencedlist);
LIST_ADDTAIL(&ctx->bo[i]->fencedlist, &ctx->fenced_bo);
- ctx->bo[i]->fence = ctx->fence;
+ ctx->bo[i]->fence = ctx->radeon->fence;
ctx->bo[i]->ctx = ctx;
}
}
@@ -71,7 +57,7 @@ static void INLINE r600_context_fence_wraparound(struct r600_context *ctx, unsig
struct radeon_bo *tmp;
LIST_FOR_EACH_ENTRY_SAFE(bo, tmp, &ctx->fenced_bo, fencedlist) {
- if (bo->fence <= *ctx->cfence) {
+ if (bo->fence <= *ctx->radeon->cfence) {
LIST_DELINIT(&bo->fencedlist);
bo->fence = 0;
} else {
@@ -121,7 +107,7 @@ int r600_context_add_block(struct r600_context *ctx, const struct r600_reg *reg,
/* initialize block */
block->start_offset = reg[i].offset;
- block->pm4[block->pm4_ndwords++] = PKT3(reg[i].opcode, n);
+ block->pm4[block->pm4_ndwords++] = PKT3(reg[i].opcode, n, 0);
block->pm4[block->pm4_ndwords++] = (block->start_offset - reg[i].offset_base) >> 2;
block->reg = &block->pm4[block->pm4_ndwords];
block->pm4_ndwords += n;
@@ -133,7 +119,7 @@ int r600_context_add_block(struct r600_context *ctx, const struct r600_reg *reg,
block->nbo++;
assert(block->nbo < R600_BLOCK_MAX_BO);
block->pm4_bo_index[j] = block->nbo;
- block->pm4[block->pm4_ndwords++] = PKT3(PKT3_NOP, 0);
+ block->pm4[block->pm4_ndwords++] = PKT3(PKT3_NOP, 0, 0);
block->pm4[block->pm4_ndwords++] = 0x00000000;
block->reloc[block->nbo].flush_flags = reg[i+j].flush_flags;
block->reloc[block->nbo].flush_mask = reg[i+j].flush_mask;
@@ -632,9 +618,6 @@ void r600_context_fini(struct r600_context *ctx)
free(ctx->pm4);
r600_context_clear_fenced_bo(ctx);
- if (ctx->fence_bo) {
- r600_bo_reference(ctx->radeon, &ctx->fence_bo, NULL);
- }
memset(ctx, 0, sizeof(struct r600_context));
}
@@ -654,7 +637,8 @@ int r600_context_init(struct r600_context *ctx, struct radeon *radeon)
ctx->range[i].end_offset = ((i + 1) << ctx->hash_shift) - 1;
ctx->range[i].blocks = calloc(1 << ctx->hash_shift, sizeof(void*));
if (ctx->range[i].blocks == NULL) {
- return -ENOMEM;
+ r = -ENOMEM;
+ goto out_err;
}
}
@@ -763,19 +747,30 @@ int r600_context_init(struct r600_context *ctx, struct radeon *radeon)
/* save 16dwords space for fence mecanism */
ctx->pm4_ndwords -= 16;
- r = r600_context_init_fence(ctx);
- if (r) {
- goto out_err;
- }
+ LIST_INITHEAD(&ctx->fenced_bo);
/* init dirty list */
LIST_INITHEAD(&ctx->dirty);
+
+ ctx->max_db = 4;
+
return 0;
out_err:
r600_context_fini(ctx);
return r;
}
+static void rv6xx_context_surface_base_update(struct r600_context *ctx,
+ unsigned base_update_flags)
+{
+ /* need to emit surface base update on rv6xx */
+ if ((ctx->radeon->family > CHIP_R600) &&
+ (ctx->radeon->family < CHIP_RV770)) {
+ ctx->pm4[ctx->pm4_cdwords++] = PKT3(PKT3_SURFACE_BASE_UPDATE, 0, 0);
+ ctx->pm4[ctx->pm4_cdwords++] = base_update_flags;
+ }
+}
+
void r600_context_bo_flush(struct r600_context *ctx, unsigned flush_flags,
unsigned flush_mask, struct r600_bo *rbo)
{
@@ -787,12 +782,12 @@ void r600_context_bo_flush(struct r600_context *ctx, unsigned flush_flags,
bo->last_flush &= flush_mask;
return;
}
- ctx->pm4[ctx->pm4_cdwords++] = PKT3(PKT3_SURFACE_SYNC, 3);
+ ctx->pm4[ctx->pm4_cdwords++] = PKT3(PKT3_SURFACE_SYNC, 3, ctx->predicate_drawing);
ctx->pm4[ctx->pm4_cdwords++] = flush_flags;
ctx->pm4[ctx->pm4_cdwords++] = (bo->size + 255) >> 8;
ctx->pm4[ctx->pm4_cdwords++] = 0x00000000;
ctx->pm4[ctx->pm4_cdwords++] = 0x0000000A;
- ctx->pm4[ctx->pm4_cdwords++] = PKT3(PKT3_NOP, 0);
+ ctx->pm4[ctx->pm4_cdwords++] = PKT3(PKT3_NOP, 0, ctx->predicate_drawing);
ctx->pm4[ctx->pm4_cdwords++] = bo->reloc_id;
bo->last_flush = (bo->last_flush | flush_flags) & flush_mask;
}
@@ -814,6 +809,7 @@ void r600_context_bo_reloc(struct r600_context *ctx, u32 *pm4, struct r600_bo *r
ctx->reloc[ctx->creloc].write_domain = rbo->domains & (RADEON_GEM_DOMAIN_GTT | RADEON_GEM_DOMAIN_VRAM);
ctx->reloc[ctx->creloc].flags = 0;
radeon_bo_reference(ctx->radeon, &ctx->bo[ctx->creloc], bo);
+ rbo->fence = ctx->radeon->fence;
ctx->creloc++;
/* set PKT3 to point to proper reloc */
*pm4 = bo->reloc_id;
@@ -836,6 +832,7 @@ void r600_context_pipe_state_set(struct r600_context *ctx, struct r600_pipe_stat
/* find relocation */
id = block->pm4_bo_index[id];
r600_bo_reference(ctx->radeon, &block->reloc[id].bo, state->regs[i].bo);
+ state->regs[i].bo->fence = ctx->radeon->fence;
}
if (!(block->status & R600_BLOCK_STATUS_DIRTY)) {
block->status |= R600_BLOCK_STATUS_ENABLED;
@@ -875,10 +872,13 @@ static inline void r600_context_pipe_state_set_resource(struct r600_context *ctx
*/
r600_bo_reference(ctx->radeon, &block->reloc[1].bo, state->regs[0].bo);
r600_bo_reference(ctx->radeon, &block->reloc[2].bo, state->regs[0].bo);
+ state->regs[0].bo->fence = ctx->radeon->fence;
} else {
/* TEXTURE RESOURCE */
r600_bo_reference(ctx->radeon, &block->reloc[1].bo, state->regs[2].bo);
r600_bo_reference(ctx->radeon, &block->reloc[2].bo, state->regs[3].bo);
+ state->regs[2].bo->fence = ctx->radeon->fence;
+ state->regs[3].bo->fence = ctx->radeon->fence;
}
if (!(block->status & R600_BLOCK_STATUS_DIRTY)) {
block->status |= R600_BLOCK_STATUS_ENABLED;
@@ -1002,6 +1002,7 @@ void r600_context_draw(struct r600_context *ctx, const struct r600_draw *draw)
unsigned ndwords = 9;
struct r600_block *dirty_block = NULL;
struct r600_block *next_block;
+ unsigned rv6xx_surface_base_update = 0;
if (draw->indices) {
ndwords = 13;
@@ -1024,10 +1025,14 @@ void r600_context_draw(struct r600_context *ctx, const struct r600_draw *draw)
for (int i = 0; i < 8; i++) {
if (cb[i]) {
ndwords += 7;
+ rv6xx_surface_base_update |= SURFACE_BASE_UPDATE_COLOR(i);
}
}
- if (db)
+ if (db) {
ndwords += 7;
+ rv6xx_surface_base_update |= SURFACE_BASE_UPDATE_DEPTH;
+ }
+ /* XXX also need to update SURFACE_BASE_UPDATE_STRMOUT when we support it */
/* queries need some special values */
if (ctx->num_query_running) {
@@ -1054,30 +1059,34 @@ void r600_context_draw(struct r600_context *ctx, const struct r600_draw *draw)
}
/* enough room to copy packet */
- LIST_FOR_EACH_ENTRY_SAFE(dirty_block, next_block, &ctx->dirty,list) {
+ LIST_FOR_EACH_ENTRY_SAFE(dirty_block, next_block, &ctx->dirty, list) {
r600_context_block_emit_dirty(ctx, dirty_block);
}
+ /* rv6xx surface base udpate */
+ if (rv6xx_surface_base_update)
+ rv6xx_context_surface_base_update(ctx, rv6xx_surface_base_update);
+
/* draw packet */
- ctx->pm4[ctx->pm4_cdwords++] = PKT3(PKT3_INDEX_TYPE, 0);
+ ctx->pm4[ctx->pm4_cdwords++] = PKT3(PKT3_INDEX_TYPE, 0, ctx->predicate_drawing);
ctx->pm4[ctx->pm4_cdwords++] = draw->vgt_index_type;
- ctx->pm4[ctx->pm4_cdwords++] = PKT3(PKT3_NUM_INSTANCES, 0);
+ ctx->pm4[ctx->pm4_cdwords++] = PKT3(PKT3_NUM_INSTANCES, 0, ctx->predicate_drawing);
ctx->pm4[ctx->pm4_cdwords++] = draw->vgt_num_instances;
if (draw->indices) {
- ctx->pm4[ctx->pm4_cdwords++] = PKT3(PKT3_DRAW_INDEX, 3);
+ ctx->pm4[ctx->pm4_cdwords++] = PKT3(PKT3_DRAW_INDEX, 3, ctx->predicate_drawing);
ctx->pm4[ctx->pm4_cdwords++] = draw->indices_bo_offset + r600_bo_offset(draw->indices);
ctx->pm4[ctx->pm4_cdwords++] = 0;
ctx->pm4[ctx->pm4_cdwords++] = draw->vgt_num_indices;
ctx->pm4[ctx->pm4_cdwords++] = draw->vgt_draw_initiator;
- ctx->pm4[ctx->pm4_cdwords++] = PKT3(PKT3_NOP, 0);
+ ctx->pm4[ctx->pm4_cdwords++] = PKT3(PKT3_NOP, 0, ctx->predicate_drawing);
ctx->pm4[ctx->pm4_cdwords++] = 0;
r600_context_bo_reloc(ctx, &ctx->pm4[ctx->pm4_cdwords - 1], draw->indices);
} else {
- ctx->pm4[ctx->pm4_cdwords++] = PKT3(PKT3_DRAW_INDEX_AUTO, 1);
+ ctx->pm4[ctx->pm4_cdwords++] = PKT3(PKT3_DRAW_INDEX_AUTO, 1, ctx->predicate_drawing);
ctx->pm4[ctx->pm4_cdwords++] = draw->vgt_num_indices;
ctx->pm4[ctx->pm4_cdwords++] = draw->vgt_draw_initiator;
}
- ctx->pm4[ctx->pm4_cdwords++] = PKT3(PKT3_EVENT_WRITE, 0);
+ ctx->pm4[ctx->pm4_cdwords++] = PKT3(PKT3_EVENT_WRITE, 0, ctx->predicate_drawing);
ctx->pm4[ctx->pm4_cdwords++] = EVENT_TYPE(EVENT_TYPE_CACHE_FLUSH_AND_INV_EVENT) | EVENT_INDEX(0);
/* flush color buffer */
@@ -1099,7 +1108,7 @@ void r600_context_draw(struct r600_context *ctx, const struct r600_draw *draw)
void r600_context_flush(struct r600_context *ctx)
{
- struct drm_radeon_cs drmib;
+ struct drm_radeon_cs drmib = {};
struct drm_radeon_cs_chunk chunks[2];
uint64_t chunk_array[2];
unsigned fence;
@@ -1112,17 +1121,17 @@ void r600_context_flush(struct r600_context *ctx)
r600_context_queries_suspend(ctx);
/* emit fence */
- ctx->pm4[ctx->pm4_cdwords++] = PKT3(PKT3_EVENT_WRITE, 0);
+ ctx->pm4[ctx->pm4_cdwords++] = PKT3(PKT3_EVENT_WRITE, 0, 0);
ctx->pm4[ctx->pm4_cdwords++] = EVENT_TYPE(EVENT_TYPE_PS_PARTIAL_FLUSH) | EVENT_INDEX(4);
- ctx->pm4[ctx->pm4_cdwords++] = PKT3(PKT3_EVENT_WRITE_EOP, 4);
+ ctx->pm4[ctx->pm4_cdwords++] = PKT3(PKT3_EVENT_WRITE_EOP, 4, 0);
ctx->pm4[ctx->pm4_cdwords++] = EVENT_TYPE(EVENT_TYPE_CACHE_FLUSH_AND_INV_TS_EVENT) | EVENT_INDEX(5);
ctx->pm4[ctx->pm4_cdwords++] = 0;
ctx->pm4[ctx->pm4_cdwords++] = (1 << 29) | (0 << 24);
- ctx->pm4[ctx->pm4_cdwords++] = ctx->fence;
+ ctx->pm4[ctx->pm4_cdwords++] = ctx->radeon->fence;
ctx->pm4[ctx->pm4_cdwords++] = 0;
- ctx->pm4[ctx->pm4_cdwords++] = PKT3(PKT3_NOP, 0);
+ ctx->pm4[ctx->pm4_cdwords++] = PKT3(PKT3_NOP, 0, 0);
ctx->pm4[ctx->pm4_cdwords++] = 0;
- r600_context_bo_reloc(ctx, &ctx->pm4[ctx->pm4_cdwords - 1], ctx->fence_bo);
+ r600_context_bo_reloc(ctx, &ctx->pm4[ctx->pm4_cdwords - 1], ctx->radeon->fence_bo);
#if 1
/* emit cs */
@@ -1139,18 +1148,18 @@ void r600_context_flush(struct r600_context *ctx)
r = drmCommandWriteRead(ctx->radeon->fd, DRM_RADEON_CS, &drmib,
sizeof(struct drm_radeon_cs));
#else
- *ctx->cfence = ctx->fence;
+ *ctx->radeon->cfence = ctx->radeon->fence;
#endif
r600_context_update_fenced_list(ctx);
- fence = ctx->fence + 1;
- if (fence < ctx->fence) {
+ fence = ctx->radeon->fence + 1;
+ if (fence < ctx->radeon->fence) {
/* wrap around */
fence = 1;
r600_context_fence_wraparound(ctx, fence);
}
- ctx->fence = fence;
+ ctx->radeon->fence = fence;
/* restart */
for (int i = 0; i < ctx->creloc; i++) {
@@ -1261,44 +1270,90 @@ out_err:
bof_decref(root);
}
-static void r600_query_result(struct r600_context *ctx, struct r600_query *query)
+static boolean r600_query_result(struct r600_context *ctx, struct r600_query *query, boolean wait)
{
u64 start, end;
u32 *results;
int i;
+ int size;
+
+ if (wait)
+ results = r600_bo_map(ctx->radeon, query->buffer, PB_USAGE_CPU_READ, NULL);
+ else
+ results = r600_bo_map(ctx->radeon, query->buffer, PB_USAGE_DONTBLOCK | PB_USAGE_CPU_READ, NULL);
+ if (!results)
+ return FALSE;
- results = r600_bo_map(ctx->radeon, query->buffer, 0, NULL);
- for (i = 0; i < query->num_results; i += 4) {
+ size = query->num_results * (query->type == PIPE_QUERY_OCCLUSION_COUNTER ? ctx->max_db : 1);
+ for (i = 0; i < size; i += 4) {
start = (u64)results[i] | (u64)results[i + 1] << 32;
end = (u64)results[i + 2] | (u64)results[i + 3] << 32;
- if ((start & 0x8000000000000000UL) && (end & 0x8000000000000000UL)) {
+ if (((start & 0x8000000000000000UL) && (end & 0x8000000000000000UL))
+ || query->type == PIPE_QUERY_TIME_ELAPSED) {
query->result += end - start;
}
}
r600_bo_unmap(ctx->radeon, query->buffer);
query->num_results = 0;
+
+ return TRUE;
}
void r600_query_begin(struct r600_context *ctx, struct r600_query *query)
{
- /* query request needs 6 dwords for begin + 6 dwords for end */
- if ((12 + ctx->pm4_cdwords) > ctx->pm4_ndwords) {
+ unsigned required_space;
+ int num_backends = r600_get_num_backends(ctx->radeon);
+
+ /* query request needs 6/8 dwords for begin + 6/8 dwords for end */
+ if (query->type == PIPE_QUERY_TIME_ELAPSED)
+ required_space = 16;
+ else
+ required_space = 12;
+
+ if ((required_space + ctx->pm4_cdwords) > ctx->pm4_ndwords) {
/* need to flush */
r600_context_flush(ctx);
}
/* if query buffer is full force a flush */
- if (query->num_results >= ((query->buffer_size >> 2) - 2)) {
+ if (query->num_results*4 >= query->buffer_size - 16) {
r600_context_flush(ctx);
- r600_query_result(ctx, query);
+ r600_query_result(ctx, query, TRUE);
}
+ if (query->type == PIPE_QUERY_OCCLUSION_COUNTER &&
+ num_backends > 0 && num_backends < ctx->max_db) {
+ /* as per info on ZPASS the driver must set the unusued DB top bits */
+ u32 *results;
+ int i;
+
+ results = r600_bo_map(ctx->radeon, query->buffer, PB_USAGE_DONTBLOCK | PB_USAGE_CPU_WRITE, NULL);
+ if (results) {
+ memset(results + (query->num_results * 4), 0, ctx->max_db * 4 * 4);
+
+ for (i = num_backends; i < ctx->max_db; i++) {
+ results[(i * 4)+1] = 0x80000000;
+ results[(i * 4)+3] = 0x80000000;
+ }
+ r600_bo_unmap(ctx->radeon, query->buffer);
+ }
+ }
+
/* emit begin query */
- ctx->pm4[ctx->pm4_cdwords++] = PKT3(PKT3_EVENT_WRITE, 2);
- ctx->pm4[ctx->pm4_cdwords++] = EVENT_TYPE(EVENT_TYPE_ZPASS_DONE) | EVENT_INDEX(1);
- ctx->pm4[ctx->pm4_cdwords++] = query->num_results + r600_bo_offset(query->buffer);
- ctx->pm4[ctx->pm4_cdwords++] = 0;
- ctx->pm4[ctx->pm4_cdwords++] = PKT3(PKT3_NOP, 0);
+ if (query->type == PIPE_QUERY_TIME_ELAPSED) {
+ ctx->pm4[ctx->pm4_cdwords++] = PKT3(PKT3_EVENT_WRITE_EOP, 4, 0);
+ ctx->pm4[ctx->pm4_cdwords++] = EVENT_TYPE(EVENT_TYPE_CACHE_FLUSH_AND_INV_TS_EVENT) | EVENT_INDEX(5);
+ ctx->pm4[ctx->pm4_cdwords++] = query->num_results*4 + r600_bo_offset(query->buffer);
+ ctx->pm4[ctx->pm4_cdwords++] = (3 << 29);
+ ctx->pm4[ctx->pm4_cdwords++] = 0;
+ ctx->pm4[ctx->pm4_cdwords++] = 0;
+ } else {
+ ctx->pm4[ctx->pm4_cdwords++] = PKT3(PKT3_EVENT_WRITE, 2, 0);
+ ctx->pm4[ctx->pm4_cdwords++] = EVENT_TYPE(EVENT_TYPE_ZPASS_DONE) | EVENT_INDEX(1);
+ ctx->pm4[ctx->pm4_cdwords++] = query->num_results*4 + r600_bo_offset(query->buffer);
+ ctx->pm4[ctx->pm4_cdwords++] = 0;
+ }
+ ctx->pm4[ctx->pm4_cdwords++] = PKT3(PKT3_NOP, 0, 0);
ctx->pm4[ctx->pm4_cdwords++] = 0;
r600_context_bo_reloc(ctx, &ctx->pm4[ctx->pm4_cdwords - 1], query->buffer);
@@ -1310,25 +1365,56 @@ void r600_query_begin(struct r600_context *ctx, struct r600_query *query)
void r600_query_end(struct r600_context *ctx, struct r600_query *query)
{
/* emit begin query */
- ctx->pm4[ctx->pm4_cdwords++] = PKT3(PKT3_EVENT_WRITE, 2);
- ctx->pm4[ctx->pm4_cdwords++] = EVENT_TYPE(EVENT_TYPE_ZPASS_DONE) | EVENT_INDEX(1);
- ctx->pm4[ctx->pm4_cdwords++] = query->num_results + 8 + r600_bo_offset(query->buffer);
- ctx->pm4[ctx->pm4_cdwords++] = 0;
- ctx->pm4[ctx->pm4_cdwords++] = PKT3(PKT3_NOP, 0);
+ if (query->type == PIPE_QUERY_TIME_ELAPSED) {
+ ctx->pm4[ctx->pm4_cdwords++] = PKT3(PKT3_EVENT_WRITE_EOP, 4, 0);
+ ctx->pm4[ctx->pm4_cdwords++] = EVENT_TYPE(EVENT_TYPE_CACHE_FLUSH_AND_INV_TS_EVENT) | EVENT_INDEX(5);
+ ctx->pm4[ctx->pm4_cdwords++] = query->num_results*4 + 8 + r600_bo_offset(query->buffer);
+ ctx->pm4[ctx->pm4_cdwords++] = (3 << 29);
+ ctx->pm4[ctx->pm4_cdwords++] = 0;
+ ctx->pm4[ctx->pm4_cdwords++] = 0;
+ } else {
+ ctx->pm4[ctx->pm4_cdwords++] = PKT3(PKT3_EVENT_WRITE, 2, 0);
+ ctx->pm4[ctx->pm4_cdwords++] = EVENT_TYPE(EVENT_TYPE_ZPASS_DONE) | EVENT_INDEX(1);
+ ctx->pm4[ctx->pm4_cdwords++] = query->num_results*4 + 8 + r600_bo_offset(query->buffer);
+ ctx->pm4[ctx->pm4_cdwords++] = 0;
+ }
+ ctx->pm4[ctx->pm4_cdwords++] = PKT3(PKT3_NOP, 0, 0);
ctx->pm4[ctx->pm4_cdwords++] = 0;
r600_context_bo_reloc(ctx, &ctx->pm4[ctx->pm4_cdwords - 1], query->buffer);
- query->num_results += 16;
+ query->num_results += 4 * (query->type == PIPE_QUERY_OCCLUSION_COUNTER ? ctx->max_db : 1);
query->state ^= R600_QUERY_STATE_STARTED;
query->state |= R600_QUERY_STATE_ENDED;
ctx->num_query_running--;
}
+void r600_query_predication(struct r600_context *ctx, struct r600_query *query, int operation,
+ int flag_wait)
+{
+ ctx->pm4[ctx->pm4_cdwords++] = PKT3(PKT3_SET_PREDICATION, 1, 0);
+
+ if (operation == PREDICATION_OP_CLEAR) {
+ ctx->pm4[ctx->pm4_cdwords++] = 0;
+ ctx->pm4[ctx->pm4_cdwords++] = PRED_OP(PREDICATION_OP_CLEAR);
+ } else {
+ int results_base = query->num_results - (4 * ctx->max_db);
+
+ if (results_base < 0)
+ results_base = 0;
+
+ ctx->pm4[ctx->pm4_cdwords++] = results_base*4 + r600_bo_offset(query->buffer);
+ ctx->pm4[ctx->pm4_cdwords++] = PRED_OP(operation) | (flag_wait ? PREDICATION_HINT_WAIT : PREDICATION_HINT_NOWAIT_DRAW) | PREDICATION_DRAW_VISIBLE;
+ ctx->pm4[ctx->pm4_cdwords++] = PKT3(PKT3_NOP, 0, 0);
+ ctx->pm4[ctx->pm4_cdwords++] = 0;
+ r600_context_bo_reloc(ctx, &ctx->pm4[ctx->pm4_cdwords - 1], query->buffer);
+ }
+}
+
struct r600_query *r600_context_query_create(struct r600_context *ctx, unsigned query_type)
{
struct r600_query *query;
- if (query_type != PIPE_QUERY_OCCLUSION_COUNTER)
+ if (query_type != PIPE_QUERY_OCCLUSION_COUNTER && query_type != PIPE_QUERY_TIME_ELAPSED)
return NULL;
query = calloc(1, sizeof(struct r600_query));
@@ -1370,8 +1456,12 @@ boolean r600_context_query_result(struct r600_context *ctx,
if (query->num_results) {
r600_context_flush(ctx);
}
- r600_query_result(ctx, query);
- *result = query->result;
+ if (!r600_query_result(ctx, query, wait))
+ return FALSE;
+ if (query->type == PIPE_QUERY_TIME_ELAPSED)
+ *result = (1000000*query->result)/r600_get_clock_crystal_freq(ctx->radeon);
+ else
+ *result = query->result;
query->result = 0;
return TRUE;
}
diff --git a/src/gallium/winsys/r600/drm/r600_priv.h b/src/gallium/winsys/r600/drm/r600_priv.h
index 193af984f8e..41c5ee02c38 100644
--- a/src/gallium/winsys/r600/drm/r600_priv.h
+++ b/src/gallium/winsys/r600/drm/r600_priv.h
@@ -30,24 +30,30 @@
#include <stdint.h>
#include <stdlib.h>
#include <assert.h>
-#include <pipebuffer/pb_bufmgr.h>
-#include "util/u_double_list.h"
+#include <util/u_double_list.h>
+#include <util/u_inlines.h>
+#include <os/os_thread.h>
#include "r600.h"
+struct r600_bomgr;
+struct r600_bo;
+
struct radeon {
int fd;
int refcount;
unsigned device;
unsigned family;
enum chip_class chip_class;
- struct pb_manager *kman; /* kernel bo manager */
- struct pb_manager *cman; /* cached bo manager */
- struct r600_tiling_info tiling_info;
+ struct r600_tiling_info tiling_info;
+ struct r600_bomgr *bomgr;
+ unsigned fence;
+ unsigned *cfence;
+ struct r600_bo *fence_bo;
+ unsigned clock_crystal_freq;
+ unsigned num_backends;
+ unsigned minor_version;
};
-struct radeon *r600_new(int fd, unsigned device);
-void r600_delete(struct radeon *r600);
-
struct r600_reg {
unsigned opcode;
unsigned offset_base;
@@ -75,25 +81,49 @@ struct radeon_bo {
struct r600_bo {
struct pipe_reference reference;
- struct pb_buffer *pb;
unsigned size;
unsigned tiling_flags;
unsigned kernel_pitch;
unsigned domains;
+ struct radeon_bo *bo;
+ unsigned fence;
+ /* manager data */
+ struct list_head list;
+ unsigned manager_id;
+ unsigned alignment;
+ unsigned offset;
+ int64_t start;
+ int64_t end;
};
+struct r600_bomgr {
+ struct radeon *radeon;
+ unsigned usecs;
+ pipe_mutex mutex;
+ struct list_head delayed;
+ unsigned num_delayed;
+};
-/* radeon_pciid.c */
+/*
+ * r600_drm.c
+ */
+struct radeon *r600_new(int fd, unsigned device);
+void r600_delete(struct radeon *r600);
+
+/*
+ * radeon_pciid.c
+ */
unsigned radeon_family_from_device(unsigned device);
-/* radeon_bo.c */
+/*
+ * radeon_bo.c
+ */
struct radeon_bo *radeon_bo(struct radeon *radeon, unsigned handle,
unsigned size, unsigned alignment);
void radeon_bo_reference(struct radeon *radeon, struct radeon_bo **dst,
struct radeon_bo *src);
int radeon_bo_wait(struct radeon *radeon, struct radeon_bo *bo);
int radeon_bo_busy(struct radeon *radeon, struct radeon_bo *bo, uint32_t *domain);
-void radeon_bo_pbmgr_flush_maps(struct pb_manager *_mgr);
int radeon_bo_fencelist(struct radeon *radeon, struct radeon_bo **bolist, uint32_t num_bo);
int radeon_bo_get_tiling_flags(struct radeon *radeon,
struct radeon_bo *bo,
@@ -103,13 +133,9 @@ int radeon_bo_get_name(struct radeon *radeon,
struct radeon_bo *bo,
uint32_t *name);
-/* radeon_bo_pb.c */
-struct radeon_bo *radeon_bo_pb_get_bo(struct pb_buffer *_buf);
-struct pb_manager *radeon_bo_pbmgr_create(struct radeon *radeon);
-struct pb_buffer *radeon_bo_pb_create_buffer_from_handle(struct pb_manager *_mgr,
- uint32_t handle);
-
-/* r600_hw_context.c */
+/*
+ * r600_hw_context.c
+ */
int r600_context_init_fence(struct r600_context *ctx);
void r600_context_bo_reloc(struct r600_context *ctx, u32 *pm4, struct r600_bo *rbo);
void r600_context_bo_flush(struct r600_context *ctx, unsigned flush_flags,
@@ -117,14 +143,27 @@ void r600_context_bo_flush(struct r600_context *ctx, unsigned flush_flags,
struct r600_bo *r600_context_reg_bo(struct r600_context *ctx, unsigned offset);
int r600_context_add_block(struct r600_context *ctx, const struct r600_reg *reg, unsigned nreg);
-/* r600_bo.c */
-unsigned r600_bo_get_handle(struct r600_bo *bo);
-unsigned r600_bo_get_size(struct r600_bo *bo);
-static INLINE struct radeon_bo *r600_bo_get_bo(struct r600_bo *bo)
-{
- return radeon_bo_pb_get_bo(bo->pb);
-}
+/*
+ * r600_bo.c
+ */
+void r600_bo_destroy(struct radeon *radeon, struct r600_bo *bo);
+/*
+ * r600_bomgr.c
+ */
+struct r600_bomgr *r600_bomgr_create(struct radeon *radeon, unsigned usecs);
+void r600_bomgr_destroy(struct r600_bomgr *mgr);
+bool r600_bomgr_bo_destroy(struct r600_bomgr *mgr, struct r600_bo *bo);
+void r600_bomgr_bo_init(struct r600_bomgr *mgr, struct r600_bo *bo);
+struct r600_bo *r600_bomgr_bo_create(struct r600_bomgr *mgr,
+ unsigned size,
+ unsigned alignment,
+ unsigned cfence);
+
+
+/*
+ * helpers
+ */
#define CTX_RANGE_ID(ctx, offset) (((offset) >> (ctx)->hash_shift) & 255)
#define CTX_BLOCK_ID(ctx, offset) ((offset) & ((1 << (ctx)->hash_shift) - 1))
@@ -172,6 +211,9 @@ static inline void r600_context_block_emit_dirty(struct r600_context *ctx, struc
LIST_DELINIT(&block->list);
}
+/*
+ * radeon_bo.c
+ */
static inline int radeon_bo_map(struct radeon *radeon, struct radeon_bo *bo)
{
bo->map_count++;
@@ -184,4 +226,35 @@ static inline void radeon_bo_unmap(struct radeon *radeon, struct radeon_bo *bo)
assert(bo->map_count >= 0);
}
+/*
+ * r600_bo
+ */
+static inline struct radeon_bo *r600_bo_get_bo(struct r600_bo *bo)
+{
+ return bo->bo;
+}
+
+static unsigned inline r600_bo_get_handle(struct r600_bo *bo)
+{
+ return bo->bo->handle;
+}
+
+static unsigned inline r600_bo_get_size(struct r600_bo *bo)
+{
+ return bo->size;
+}
+
+/*
+ * fence
+ */
+static inline bool fence_is_after(unsigned fence, unsigned ofence)
+{
+ /* handle wrap around */
+ if (fence < 0x80000000 && ofence > 0x80000000)
+ return TRUE;
+ if (fence > ofence)
+ return TRUE;
+ return FALSE;
+}
+
#endif
diff --git a/src/gallium/winsys/r600/drm/r600d.h b/src/gallium/winsys/r600/drm/r600d.h
index 1c1ac76fe69..80424818044 100644
--- a/src/gallium/winsys/r600/drm/r600d.h
+++ b/src/gallium/winsys/r600/drm/r600d.h
@@ -90,6 +90,9 @@
#define PKT3_SET_SAMPLER 0x6E
#define PKT3_SET_CTL_CONST 0x6F
#define PKT3_SURFACE_BASE_UPDATE 0x73
+#define SURFACE_BASE_UPDATE_DEPTH (1 << 0)
+#define SURFACE_BASE_UPDATE_COLOR(x) (2 << (x))
+#define SURFACE_BASE_UPDATE_STRMOUT(x) (0x200 << (x))
#define EVENT_TYPE_PS_PARTIAL_FLUSH 0x10
#define EVENT_TYPE_CACHE_FLUSH_AND_INV_TS_EVENT 0x14
@@ -105,6 +108,18 @@
* 5 - TS events
*/
+#define PREDICATION_OP_CLEAR 0x0
+#define PREDICATION_OP_ZPASS 0x1
+#define PREDICATION_OP_PRIMCOUNT 0x2
+
+#define PRED_OP(x) ((x) << 16)
+
+#define PREDICATION_HINT_WAIT (0 << 12)
+#define PREDICATION_HINT_NOWAIT_DRAW (1 << 12)
+
+#define PREDICATION_DRAW_NOT_VISIBLE (0 << 8)
+#define PREDICATION_DRAW_VISIBLE (1 << 8)
+
#define PKT_TYPE_S(x) (((x) & 0x3) << 30)
#define PKT_TYPE_G(x) (((x) >> 30) & 0x3)
#define PKT_TYPE_C 0x3FFFFFFF
@@ -117,8 +132,9 @@
#define PKT3_IT_OPCODE_S(x) (((x) & 0xFF) << 8)
#define PKT3_IT_OPCODE_G(x) (((x) >> 8) & 0xFF)
#define PKT3_IT_OPCODE_C 0xFFFF00FF
+#define PKT3_PRED_S(x) (((x) >> 0) & 0x1)
#define PKT0(index, count) (PKT_TYPE_S(0) | PKT0_BASE_INDEX_S(index) | PKT_COUNT_S(count))
-#define PKT3(op, count) (PKT_TYPE_S(3) | PKT3_IT_OPCODE_S(op) | PKT_COUNT_S(count))
+#define PKT3(op, count, predicate) (PKT_TYPE_S(3) | PKT3_IT_OPCODE_S(op) | PKT_COUNT_S(count) | PKT3_PRED_S(predicate))
/* Registers */
#define R_0280A0_CB_COLOR0_INFO 0x0280A0
diff --git a/src/gallium/winsys/r600/drm/radeon_bo.c b/src/gallium/winsys/r600/drm/radeon_bo.c
index 557cfb95970..ba02a3c2bd9 100644
--- a/src/gallium/winsys/r600/drm/radeon_bo.c
+++ b/src/gallium/winsys/r600/drm/radeon_bo.c
@@ -33,6 +33,25 @@
#include "xf86drm.h"
#include "radeon_drm.h"
+#ifdef ANDROID
+
+extern void* __mmap2(void*, size_t, int, int, int, size_t);
+
+#define MMAP2_SHIFT 12
+static void* android_mmap2(void *addr, size_t size, int prot, int flags, int fd, unsigned long long offset)
+{
+ if ( offset & ((1UL << MMAP2_SHIFT)-1) ) {
+ errno = EINVAL;
+ return MAP_FAILED;
+ }
+
+ return __mmap2(addr, size, prot, flags, fd, (size_t)(offset >> MMAP2_SHIFT));
+}
+
+#define mmap(addr, size, prot, flags, fd, offset) android_mmap2(addr, size, prot, flags, fd, offset)
+
+#endif /* ANDROID */
+
static int radeon_bo_fixed_map(struct radeon *radeon, struct radeon_bo *bo)
{
struct drm_radeon_gem_mmap args;
@@ -98,7 +117,7 @@ struct radeon_bo *radeon_bo(struct radeon *radeon, unsigned handle,
bo->size = open_arg.size;
bo->shared = TRUE;
} else {
- struct drm_radeon_gem_create args;
+ struct drm_radeon_gem_create args = {};
args.size = size;
args.alignment = alignment;
@@ -156,7 +175,7 @@ int radeon_bo_wait(struct radeon *radeon, struct radeon_bo *bo)
if (!bo->shared) {
if (!bo->fence)
return 0;
- if (bo->fence <= *bo->ctx->cfence) {
+ if (bo->fence <= *radeon->cfence) {
LIST_DELINIT(&bo->fencedlist);
bo->fence = 0;
return 0;
@@ -181,7 +200,7 @@ int radeon_bo_busy(struct radeon *radeon, struct radeon_bo *bo, uint32_t *domain
if (!bo->shared) {
if (!bo->fence)
return 0;
- if (bo->fence <= *bo->ctx->cfence) {
+ if (bo->fence <= *radeon->cfence) {
LIST_DELINIT(&bo->fencedlist);
bo->fence = 0;
return 0;
@@ -204,15 +223,15 @@ int radeon_bo_get_tiling_flags(struct radeon *radeon,
uint32_t *tiling_flags,
uint32_t *pitch)
{
- struct drm_radeon_gem_get_tiling args;
+ struct drm_radeon_gem_get_tiling args = {};
int ret;
-
+
args.handle = bo->handle;
ret = drmCommandWriteRead(radeon->fd, DRM_RADEON_GEM_GET_TILING,
&args, sizeof(args));
if (ret)
return ret;
-
+
*tiling_flags = args.tiling_flags;
*pitch = args.pitch;
return ret;
diff --git a/src/gallium/winsys/r600/drm/radeon_bo_pb.c b/src/gallium/winsys/r600/drm/radeon_bo_pb.c
deleted file mode 100644
index 4bd3ae3ca1a..00000000000
--- a/src/gallium/winsys/r600/drm/radeon_bo_pb.c
+++ /dev/null
@@ -1,260 +0,0 @@
-/*
- * Copyright 2010 Dave Airlie
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * on the rights to use, copy, modify, merge, publish, distribute, sub
- * license, and/or sell copies of the Software, and to permit persons to whom
- * the Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
- * THE AUTHOR(S) AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM,
- * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
- * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
- * USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- * Authors:
- * Dave Airlie
- */
-#include <util/u_inlines.h>
-#include <util/u_memory.h>
-#include <util/u_double_list.h>
-#include <pipebuffer/pb_buffer.h>
-#include <pipebuffer/pb_bufmgr.h>
-#include "r600_priv.h"
-
-struct radeon_bo_pb {
- struct pb_buffer b;
- struct radeon_bo *bo;
-
- struct radeon_bo_pbmgr *mgr;
-};
-
-extern const struct pb_vtbl radeon_bo_pb_vtbl;
-
-static INLINE struct radeon_bo_pb *radeon_bo_pb(struct pb_buffer *buf)
-{
- assert(buf);
- assert(buf->vtbl == &radeon_bo_pb_vtbl);
- return (struct radeon_bo_pb *)buf;
-}
-
-struct radeon_bo_pbmgr {
- struct pb_manager b;
- struct radeon *radeon;
-};
-
-static INLINE struct radeon_bo_pbmgr *radeon_bo_pbmgr(struct pb_manager *mgr)
-{
- assert(mgr);
- return (struct radeon_bo_pbmgr *)mgr;
-}
-
-static void radeon_bo_pb_destroy(struct pb_buffer *_buf)
-{
- struct radeon_bo_pb *buf = radeon_bo_pb(_buf);
-
- /* If this buffer is on the list of buffers to unmap,
- * do the unmapping now.
- */
- radeon_bo_unmap(buf->mgr->radeon, buf->bo);
- radeon_bo_reference(buf->mgr->radeon, &buf->bo, NULL);
- FREE(buf);
-}
-
-static void *
-radeon_bo_pb_map_internal(struct pb_buffer *_buf,
- unsigned flags, void *ctx)
-{
- struct radeon_bo_pb *buf = radeon_bo_pb(_buf);
- struct pipe_context *pctx = ctx;
-
- if (flags & PB_USAGE_UNSYNCHRONIZED) {
- if (radeon_bo_map(buf->mgr->radeon, buf->bo)) {
- return NULL;
- }
- return buf->bo->data;
- }
-
- if (p_atomic_read(&buf->bo->reference.count) > 1) {
- if (flags & PB_USAGE_DONTBLOCK) {
- return NULL;
- }
- if (ctx) {
- pctx->flush(pctx, 0, NULL);
- }
- }
-
- if (flags & PB_USAGE_DONTBLOCK) {
- uint32_t domain;
- if (radeon_bo_busy(buf->mgr->radeon, buf->bo, &domain))
- return NULL;
- if (radeon_bo_map(buf->mgr->radeon, buf->bo)) {
- return NULL;
- }
- goto out;
- }
-
- if (radeon_bo_map(buf->mgr->radeon, buf->bo)) {
- return NULL;
- }
- if (radeon_bo_wait(buf->mgr->radeon, buf->bo)) {
- radeon_bo_unmap(buf->mgr->radeon, buf->bo);
- return NULL;
- }
-out:
- return buf->bo->data;
-}
-
-static void radeon_bo_pb_unmap_internal(struct pb_buffer *_buf)
-{
-}
-
-static void
-radeon_bo_pb_get_base_buffer(struct pb_buffer *buf,
- struct pb_buffer **base_buf,
- unsigned *offset)
-{
- *base_buf = buf;
- *offset = 0;
-}
-
-static enum pipe_error
-radeon_bo_pb_validate(struct pb_buffer *_buf,
- struct pb_validate *vl,
- unsigned flags)
-{
- /* Always pinned */
- return PIPE_OK;
-}
-
-static void
-radeon_bo_pb_fence(struct pb_buffer *buf,
- struct pipe_fence_handle *fence)
-{
-}
-
-const struct pb_vtbl radeon_bo_pb_vtbl = {
- radeon_bo_pb_destroy,
- radeon_bo_pb_map_internal,
- radeon_bo_pb_unmap_internal,
- radeon_bo_pb_validate,
- radeon_bo_pb_fence,
- radeon_bo_pb_get_base_buffer,
-};
-
-struct pb_buffer *
-radeon_bo_pb_create_buffer_from_handle(struct pb_manager *_mgr,
- uint32_t handle)
-{
- struct radeon_bo_pbmgr *mgr = radeon_bo_pbmgr(_mgr);
- struct radeon *radeon = mgr->radeon;
- struct radeon_bo_pb *bo;
- struct radeon_bo *hw_bo;
-
- hw_bo = radeon_bo(radeon, handle, 0, 0);
- if (hw_bo == NULL)
- return NULL;
-
- bo = CALLOC_STRUCT(radeon_bo_pb);
- if (!bo) {
- radeon_bo_reference(radeon, &hw_bo, NULL);
- return NULL;
- }
-
- pipe_reference_init(&bo->b.base.reference, 1);
- bo->b.base.alignment = 0;
- bo->b.base.usage = PB_USAGE_GPU_WRITE | PB_USAGE_GPU_READ;
- bo->b.base.size = hw_bo->size;
- bo->b.vtbl = &radeon_bo_pb_vtbl;
- bo->mgr = mgr;
-
- bo->bo = hw_bo;
-
- return &bo->b;
-}
-
-static struct pb_buffer *
-radeon_bo_pb_create_buffer(struct pb_manager *_mgr,
- pb_size size,
- const struct pb_desc *desc)
-{
- struct radeon_bo_pbmgr *mgr = radeon_bo_pbmgr(_mgr);
- struct radeon *radeon = mgr->radeon;
- struct radeon_bo_pb *bo;
-
- bo = CALLOC_STRUCT(radeon_bo_pb);
- if (!bo)
- goto error1;
-
- pipe_reference_init(&bo->b.base.reference, 1);
- bo->b.base.alignment = desc->alignment;
- bo->b.base.usage = desc->usage;
- bo->b.base.size = size;
- bo->b.vtbl = &radeon_bo_pb_vtbl;
- bo->mgr = mgr;
-
- bo->bo = radeon_bo(radeon, 0, size, desc->alignment);
- if (bo->bo == NULL)
- goto error2;
- return &bo->b;
-
-error2:
- FREE(bo);
-error1:
- return NULL;
-}
-
-static void
-radeon_bo_pbmgr_flush(struct pb_manager *mgr)
-{
- /* NOP */
-}
-
-static void
-radeon_bo_pbmgr_destroy(struct pb_manager *_mgr)
-{
- struct radeon_bo_pbmgr *mgr = radeon_bo_pbmgr(_mgr);
- FREE(mgr);
-}
-
-struct pb_manager *radeon_bo_pbmgr_create(struct radeon *radeon)
-{
- struct radeon_bo_pbmgr *mgr;
-
- mgr = CALLOC_STRUCT(radeon_bo_pbmgr);
- if (!mgr)
- return NULL;
-
- mgr->b.destroy = radeon_bo_pbmgr_destroy;
- mgr->b.create_buffer = radeon_bo_pb_create_buffer;
- mgr->b.flush = radeon_bo_pbmgr_flush;
-
- mgr->radeon = radeon;
- return &mgr->b;
-}
-
-struct radeon_bo *radeon_bo_pb_get_bo(struct pb_buffer *_buf)
-{
- struct radeon_bo_pb *buf;
- if (_buf->vtbl == &radeon_bo_pb_vtbl) {
- buf = radeon_bo_pb(_buf);
- return buf->bo;
- } else {
- struct pb_buffer *base_buf;
- pb_size offset;
- pb_get_base_buffer(_buf, &base_buf, &offset);
- if (base_buf->vtbl == &radeon_bo_pb_vtbl) {
- buf = radeon_bo_pb(base_buf);
- return buf->bo;
- }
- }
- return NULL;
-}
diff --git a/src/gallium/winsys/r600/drm/radeon_pciid.c b/src/gallium/winsys/r600/drm/radeon_pciid.c
index 92560a488ae..f19956931de 100644
--- a/src/gallium/winsys/r600/drm/radeon_pciid.c
+++ b/src/gallium/winsys/r600/drm/radeon_pciid.c
@@ -32,7 +32,7 @@ struct pci_id {
unsigned family;
};
-struct pci_id radeon_pci_id[] = {
+static const struct pci_id radeon_pci_id[] = {
{0x1002, 0x3150, CHIP_RV380},
{0x1002, 0x3152, CHIP_RV380},
{0x1002, 0x3154, CHIP_RV380},
@@ -40,29 +40,29 @@ struct pci_id radeon_pci_id[] = {
{0x1002, 0x3E54, CHIP_RV380},
{0x1002, 0x4136, CHIP_RS100},
{0x1002, 0x4137, CHIP_RS200},
- {0x1002, 0x4144, CHIP_R300},
- {0x1002, 0x4145, CHIP_R300},
- {0x1002, 0x4146, CHIP_R300},
- {0x1002, 0x4147, CHIP_R300},
- {0x1002, 0x4148, CHIP_R350},
- {0x1002, 0x4149, CHIP_R350},
- {0x1002, 0x414A, CHIP_R350},
- {0x1002, 0x414B, CHIP_R350},
- {0x1002, 0x4150, CHIP_RV350},
- {0x1002, 0x4151, CHIP_RV350},
- {0x1002, 0x4152, CHIP_RV350},
- {0x1002, 0x4153, CHIP_RV350},
- {0x1002, 0x4154, CHIP_RV350},
- {0x1002, 0x4155, CHIP_RV350},
- {0x1002, 0x4156, CHIP_RV350},
+ {0x1002, 0x4144, CHIP_R300},
+ {0x1002, 0x4145, CHIP_R300},
+ {0x1002, 0x4146, CHIP_R300},
+ {0x1002, 0x4147, CHIP_R300},
+ {0x1002, 0x4148, CHIP_R350},
+ {0x1002, 0x4149, CHIP_R350},
+ {0x1002, 0x414A, CHIP_R350},
+ {0x1002, 0x414B, CHIP_R350},
+ {0x1002, 0x4150, CHIP_RV350},
+ {0x1002, 0x4151, CHIP_RV350},
+ {0x1002, 0x4152, CHIP_RV350},
+ {0x1002, 0x4153, CHIP_RV350},
+ {0x1002, 0x4154, CHIP_RV350},
+ {0x1002, 0x4155, CHIP_RV350},
+ {0x1002, 0x4156, CHIP_RV350},
{0x1002, 0x4237, CHIP_RS200},
- {0x1002, 0x4242, CHIP_R200},
- {0x1002, 0x4243, CHIP_R200},
+ {0x1002, 0x4242, CHIP_R200},
+ {0x1002, 0x4243, CHIP_R200},
{0x1002, 0x4336, CHIP_RS100},
{0x1002, 0x4337, CHIP_RS200},
{0x1002, 0x4437, CHIP_RS200},
- {0x1002, 0x4966, CHIP_RV250},
- {0x1002, 0x4967, CHIP_RV250},
+ {0x1002, 0x4966, CHIP_RV250},
+ {0x1002, 0x4967, CHIP_RV250},
{0x1002, 0x4A48, CHIP_R420},
{0x1002, 0x4A49, CHIP_R420},
{0x1002, 0x4A4A, CHIP_R420},
@@ -85,14 +85,14 @@ struct pci_id radeon_pci_id[] = {
{0x1002, 0x4C64, CHIP_RV250},
{0x1002, 0x4C66, CHIP_RV250},
{0x1002, 0x4C67, CHIP_RV250},
- {0x1002, 0x4E44, CHIP_R300},
- {0x1002, 0x4E45, CHIP_R300},
- {0x1002, 0x4E46, CHIP_R300},
- {0x1002, 0x4E47, CHIP_R300},
- {0x1002, 0x4E48, CHIP_R350},
- {0x1002, 0x4E49, CHIP_R350},
- {0x1002, 0x4E4A, CHIP_R350},
- {0x1002, 0x4E4B, CHIP_R350},
+ {0x1002, 0x4E44, CHIP_R300},
+ {0x1002, 0x4E45, CHIP_R300},
+ {0x1002, 0x4E46, CHIP_R300},
+ {0x1002, 0x4E47, CHIP_R300},
+ {0x1002, 0x4E48, CHIP_R350},
+ {0x1002, 0x4E49, CHIP_R350},
+ {0x1002, 0x4E4A, CHIP_R350},
+ {0x1002, 0x4E4B, CHIP_R350},
{0x1002, 0x4E50, CHIP_RV350},
{0x1002, 0x4E51, CHIP_RV350},
{0x1002, 0x4E52, CHIP_RV350},
@@ -103,13 +103,13 @@ struct pci_id radeon_pci_id[] = {
{0x1002, 0x5145, CHIP_R100},
{0x1002, 0x5146, CHIP_R100},
{0x1002, 0x5147, CHIP_R100},
- {0x1002, 0x5148, CHIP_R200},
- {0x1002, 0x514C, CHIP_R200},
- {0x1002, 0x514D, CHIP_R200},
- {0x1002, 0x5157, CHIP_RV200},
- {0x1002, 0x5158, CHIP_RV200},
- {0x1002, 0x5159, CHIP_RV100},
- {0x1002, 0x515A, CHIP_RV100},
+ {0x1002, 0x5148, CHIP_R200},
+ {0x1002, 0x514C, CHIP_R200},
+ {0x1002, 0x514D, CHIP_R200},
+ {0x1002, 0x5157, CHIP_RV200},
+ {0x1002, 0x5158, CHIP_RV200},
+ {0x1002, 0x5159, CHIP_RV100},
+ {0x1002, 0x515A, CHIP_RV100},
{0x1002, 0x515E, CHIP_RV100},
{0x1002, 0x5460, CHIP_RV380},
{0x1002, 0x5462, CHIP_RV380},
@@ -138,10 +138,10 @@ struct pci_id radeon_pci_id[] = {
{0x1002, 0x5955, CHIP_RS480},
{0x1002, 0x5974, CHIP_RS480},
{0x1002, 0x5975, CHIP_RS480},
- {0x1002, 0x5960, CHIP_RV280},
- {0x1002, 0x5961, CHIP_RV280},
- {0x1002, 0x5962, CHIP_RV280},
- {0x1002, 0x5964, CHIP_RV280},
+ {0x1002, 0x5960, CHIP_RV280},
+ {0x1002, 0x5961, CHIP_RV280},
+ {0x1002, 0x5962, CHIP_RV280},
+ {0x1002, 0x5964, CHIP_RV280},
{0x1002, 0x5965, CHIP_RV280},
{0x1002, 0x5969, CHIP_RV100},
{0x1002, 0x5a41, CHIP_RS400},
@@ -445,6 +445,42 @@ struct pci_id radeon_pci_id[] = {
{0x1002, 0x9803, CHIP_PALM},
{0x1002, 0x9804, CHIP_PALM},
{0x1002, 0x9805, CHIP_PALM},
+ {0x1002, 0x6720, CHIP_BARTS},
+ {0x1002, 0x6721, CHIP_BARTS},
+ {0x1002, 0x6722, CHIP_BARTS},
+ {0x1002, 0x6723, CHIP_BARTS},
+ {0x1002, 0x6724, CHIP_BARTS},
+ {0x1002, 0x6725, CHIP_BARTS},
+ {0x1002, 0x6726, CHIP_BARTS},
+ {0x1002, 0x6727, CHIP_BARTS},
+ {0x1002, 0x6728, CHIP_BARTS},
+ {0x1002, 0x6729, CHIP_BARTS},
+ {0x1002, 0x6738, CHIP_BARTS},
+ {0x1002, 0x6739, CHIP_BARTS},
+ {0x1002, 0x6740, CHIP_TURKS},
+ {0x1002, 0x6741, CHIP_TURKS},
+ {0x1002, 0x6742, CHIP_TURKS},
+ {0x1002, 0x6743, CHIP_TURKS},
+ {0x1002, 0x6744, CHIP_TURKS},
+ {0x1002, 0x6745, CHIP_TURKS},
+ {0x1002, 0x6746, CHIP_TURKS},
+ {0x1002, 0x6747, CHIP_TURKS},
+ {0x1002, 0x6748, CHIP_TURKS},
+ {0x1002, 0x6749, CHIP_TURKS},
+ {0x1002, 0x6750, CHIP_TURKS},
+ {0x1002, 0x6758, CHIP_TURKS},
+ {0x1002, 0x6759, CHIP_TURKS},
+ {0x1002, 0x6760, CHIP_CAICOS},
+ {0x1002, 0x6761, CHIP_CAICOS},
+ {0x1002, 0x6762, CHIP_CAICOS},
+ {0x1002, 0x6763, CHIP_CAICOS},
+ {0x1002, 0x6764, CHIP_CAICOS},
+ {0x1002, 0x6765, CHIP_CAICOS},
+ {0x1002, 0x6766, CHIP_CAICOS},
+ {0x1002, 0x6767, CHIP_CAICOS},
+ {0x1002, 0x6768, CHIP_CAICOS},
+ {0x1002, 0x6770, CHIP_CAICOS},
+ {0x1002, 0x6779, CHIP_CAICOS},
{0, 0},
};
diff --git a/src/gallium/winsys/radeon/drm/Makefile b/src/gallium/winsys/radeon/drm/Makefile
index aa73edde34e..e63ae6f5006 100644
--- a/src/gallium/winsys/radeon/drm/Makefile
+++ b/src/gallium/winsys/radeon/drm/Makefile
@@ -5,9 +5,9 @@ include $(TOP)/configs/current
LIBNAME = radeonwinsys
C_SOURCES = \
- radeon_drm_buffer.c \
- radeon_drm_common.c \
- radeon_r300.c
+ radeon_drm_bo.c \
+ radeon_drm_cs.c \
+ radeon_drm_common.c
LIBRARY_INCLUDES = -I$(TOP)/src/gallium/drivers/r300 \
$(shell pkg-config libdrm --cflags-only-I)
diff --git a/src/gallium/winsys/radeon/drm/SConscript b/src/gallium/winsys/radeon/drm/SConscript
index 2dbf61a7ba3..b16e03556d3 100644
--- a/src/gallium/winsys/radeon/drm/SConscript
+++ b/src/gallium/winsys/radeon/drm/SConscript
@@ -3,12 +3,17 @@ Import('*')
env = env.Clone()
radeon_sources = [
- 'radeon_drm_buffer.c',
+ 'radeon_drm_bo.c',
+ 'radeon_drm_cs.c',
'radeon_drm_common.c',
- 'radeon_r300.c',
]
-env.ParseConfig('pkg-config --cflags libdrm_radeon')
+try:
+ env.ParseConfig('pkg-config --cflags libdrm_radeon')
+except:
+ print 'warning: not building r300g'
+ Return()
+
env.Append(CPPPATH = '#/src/gallium/drivers/r300')
radeonwinsys = env.ConvenienceLibrary(
diff --git a/src/gallium/winsys/radeon/drm/radeon_drm_bo.c b/src/gallium/winsys/radeon/drm/radeon_drm_bo.c
new file mode 100644
index 00000000000..9eb833454df
--- /dev/null
+++ b/src/gallium/winsys/radeon/drm/radeon_drm_bo.c
@@ -0,0 +1,602 @@
+/*
+ * Copyright © 2011 Marek Olšák <maraeo@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, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NON-INFRINGEMENT. IN NO EVENT SHALL THE COPYRIGHT HOLDERS, AUTHORS
+ * AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
+ * USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ */
+
+#define _FILE_OFFSET_BITS 64
+#include "radeon_drm_cs.h"
+
+#include "util/u_hash_table.h"
+#include "util/u_memory.h"
+#include "util/u_simple_list.h"
+#include "os/os_thread.h"
+
+#include "state_tracker/drm_driver.h"
+
+#include <sys/ioctl.h>
+#include <sys/mman.h>
+#include <xf86drm.h>
+#include <errno.h>
+
+#define RADEON_BO_FLAGS_MACRO_TILE 1
+#define RADEON_BO_FLAGS_MICRO_TILE 2
+#define RADEON_BO_FLAGS_MICRO_TILE_SQUARE 0x20
+
+extern const struct pb_vtbl radeon_bo_vtbl;
+
+
+static INLINE struct radeon_bo *radeon_bo(struct pb_buffer *bo)
+{
+ assert(bo->vtbl == &radeon_bo_vtbl);
+ return (struct radeon_bo *)bo;
+}
+
+struct radeon_bomgr {
+ /* Base class. */
+ struct pb_manager base;
+
+ /* Winsys. */
+ struct radeon_drm_winsys *rws;
+
+ /* List of buffer handles and its mutex. */
+ struct util_hash_table *bo_handles;
+ pipe_mutex bo_handles_mutex;
+};
+
+static INLINE struct radeon_bomgr *radeon_bomgr(struct pb_manager *mgr)
+{
+ return (struct radeon_bomgr *)mgr;
+}
+
+static struct radeon_bo *get_radeon_bo(struct pb_buffer *_buf)
+{
+ struct radeon_bo *bo = NULL;
+
+ if (_buf->vtbl == &radeon_bo_vtbl) {
+ bo = radeon_bo(_buf);
+ } else {
+ struct pb_buffer *base_buf;
+ pb_size offset;
+ pb_get_base_buffer(_buf, &base_buf, &offset);
+
+ if (base_buf->vtbl == &radeon_bo_vtbl)
+ bo = radeon_bo(base_buf);
+ }
+
+ return bo;
+}
+
+void radeon_bo_unref(struct radeon_bo *bo)
+{
+ struct drm_gem_close args = {};
+
+ if (!p_atomic_dec_zero(&bo->ref_count))
+ return;
+
+ if (bo->name) {
+ pipe_mutex_lock(bo->mgr->bo_handles_mutex);
+ util_hash_table_remove(bo->mgr->bo_handles,
+ (void*)(uintptr_t)bo->name);
+ pipe_mutex_unlock(bo->mgr->bo_handles_mutex);
+ }
+
+ if (bo->ptr)
+ munmap(bo->ptr, bo->size);
+
+ /* Close object. */
+ args.handle = bo->handle;
+ drmIoctl(bo->rws->fd, DRM_IOCTL_GEM_CLOSE, &args);
+ pipe_mutex_destroy(bo->map_mutex);
+ FREE(bo);
+}
+
+static void radeon_bo_wait(struct r300_winsys_bo *_buf)
+{
+ struct radeon_bo *bo = get_radeon_bo(pb_buffer(_buf));
+ struct drm_radeon_gem_wait_idle args = {};
+
+ while (p_atomic_read(&bo->num_active_ioctls)) {
+ sched_yield();
+ }
+
+ args.handle = bo->handle;
+ while (drmCommandWriteRead(bo->rws->fd, DRM_RADEON_GEM_WAIT_IDLE,
+ &args, sizeof(args)) == -EBUSY);
+}
+
+static boolean radeon_bo_is_busy(struct r300_winsys_bo *_buf)
+{
+ struct radeon_bo *bo = get_radeon_bo(pb_buffer(_buf));
+ struct drm_radeon_gem_busy args = {};
+
+ if (p_atomic_read(&bo->num_active_ioctls)) {
+ return TRUE;
+ }
+
+ args.handle = bo->handle;
+ return drmCommandWriteRead(bo->rws->fd, DRM_RADEON_GEM_BUSY,
+ &args, sizeof(args)) != 0;
+}
+
+static void radeon_bo_destroy(struct pb_buffer *_buf)
+{
+ struct radeon_bo *bo = radeon_bo(_buf);
+
+ radeon_bo_unref(bo);
+}
+
+static unsigned get_pb_usage_from_transfer_flags(enum pipe_transfer_usage usage)
+{
+ unsigned res = 0;
+
+ if (usage & PIPE_TRANSFER_DONTBLOCK)
+ res |= PB_USAGE_DONTBLOCK;
+
+ if (usage & PIPE_TRANSFER_UNSYNCHRONIZED)
+ res |= PB_USAGE_UNSYNCHRONIZED;
+
+ return res;
+}
+
+static void *radeon_bo_map_internal(struct pb_buffer *_buf,
+ unsigned flags, void *flush_ctx)
+{
+ struct radeon_bo *bo = radeon_bo(_buf);
+ struct radeon_drm_cs *cs = flush_ctx;
+ struct drm_radeon_gem_mmap args = {};
+ void *ptr;
+
+ /* If it's not unsynchronized bo_map, flush CS if needed and then wait. */
+ if (!(flags & PB_USAGE_UNSYNCHRONIZED)) {
+ /* DONTBLOCK doesn't make sense with UNSYNCHRONIZED. */
+ if (flags & PB_USAGE_DONTBLOCK) {
+ if (radeon_bo_is_referenced_by_cs(cs, bo)) {
+ cs->flush_cs(cs->flush_data, R300_FLUSH_ASYNC);
+ return NULL;
+ }
+
+ if (radeon_bo_is_busy((struct r300_winsys_bo*)bo)) {
+ return NULL;
+ }
+ } else {
+ if (radeon_bo_is_referenced_by_cs(cs, bo)) {
+ cs->flush_cs(cs->flush_data, 0);
+ } else {
+ /* Try to avoid busy-waiting in radeon_bo_wait. */
+ if (p_atomic_read(&bo->num_active_ioctls))
+ radeon_drm_cs_sync_flush(cs);
+ }
+
+ radeon_bo_wait((struct r300_winsys_bo*)bo);
+ }
+ }
+
+ /* Return the pointer if it's already mapped. */
+ if (bo->ptr)
+ return bo->ptr;
+
+ /* Map the buffer. */
+ pipe_mutex_lock(bo->map_mutex);
+ args.handle = bo->handle;
+ args.offset = 0;
+ args.size = (uint64_t)bo->size;
+ if (drmCommandWriteRead(bo->rws->fd,
+ DRM_RADEON_GEM_MMAP,
+ &args,
+ sizeof(args))) {
+ pipe_mutex_unlock(bo->map_mutex);
+ fprintf(stderr, "radeon: gem_mmap failed: %p 0x%08X\n",
+ bo, bo->handle);
+ return NULL;
+ }
+
+ ptr = mmap(0, args.size, PROT_READ|PROT_WRITE, MAP_SHARED,
+ bo->rws->fd, args.addr_ptr);
+ if (ptr == MAP_FAILED) {
+ pipe_mutex_unlock(bo->map_mutex);
+ fprintf(stderr, "radeon: mmap failed, errno: %i\n", errno);
+ return NULL;
+ }
+ bo->ptr = ptr;
+ pipe_mutex_unlock(bo->map_mutex);
+
+ return bo->ptr;
+}
+
+static void radeon_bo_unmap_internal(struct pb_buffer *_buf)
+{
+ /* NOP */
+}
+
+static void radeon_bo_get_base_buffer(struct pb_buffer *buf,
+ struct pb_buffer **base_buf,
+ unsigned *offset)
+{
+ *base_buf = buf;
+ *offset = 0;
+}
+
+static enum pipe_error radeon_bo_validate(struct pb_buffer *_buf,
+ struct pb_validate *vl,
+ unsigned flags)
+{
+ /* Always pinned */
+ return PIPE_OK;
+}
+
+static void radeon_bo_fence(struct pb_buffer *buf,
+ struct pipe_fence_handle *fence)
+{
+}
+
+const struct pb_vtbl radeon_bo_vtbl = {
+ radeon_bo_destroy,
+ radeon_bo_map_internal,
+ radeon_bo_unmap_internal,
+ radeon_bo_validate,
+ radeon_bo_fence,
+ radeon_bo_get_base_buffer,
+};
+
+static struct pb_buffer *radeon_bomgr_create_bo(struct pb_manager *_mgr,
+ pb_size size,
+ const struct pb_desc *desc)
+{
+ struct radeon_bomgr *mgr = radeon_bomgr(_mgr);
+ struct radeon_drm_winsys *rws = mgr->rws;
+ struct radeon_bo *bo;
+ struct drm_radeon_gem_create args = {};
+
+ args.size = size;
+ args.alignment = desc->alignment;
+ args.initial_domain =
+ (desc->usage & RADEON_PB_USAGE_DOMAIN_GTT ?
+ RADEON_GEM_DOMAIN_GTT : 0) |
+ (desc->usage & RADEON_PB_USAGE_DOMAIN_VRAM ?
+ RADEON_GEM_DOMAIN_VRAM : 0);
+
+ if (drmCommandWriteRead(rws->fd, DRM_RADEON_GEM_CREATE,
+ &args, sizeof(args))) {
+ fprintf(stderr, "Failed to allocate :\n");
+ fprintf(stderr, " size : %d bytes\n", size);
+ fprintf(stderr, " alignment : %d bytes\n", desc->alignment);
+ fprintf(stderr, " domains : %d\n", args.initial_domain);
+ return NULL;
+ }
+
+ bo = CALLOC_STRUCT(radeon_bo);
+ if (!bo)
+ return NULL;
+
+ pipe_reference_init(&bo->base.base.reference, 1);
+ bo->base.base.alignment = desc->alignment;
+ bo->base.base.usage = desc->usage;
+ bo->base.base.size = size;
+ bo->base.vtbl = &radeon_bo_vtbl;
+ bo->mgr = mgr;
+ bo->rws = mgr->rws;
+ bo->handle = args.handle;
+ bo->size = size;
+ pipe_mutex_init(bo->map_mutex);
+
+ radeon_bo_ref(bo);
+ return &bo->base;
+}
+
+static void radeon_bomgr_flush(struct pb_manager *mgr)
+{
+ /* NOP */
+}
+
+/* This is for the cache bufmgr. */
+static boolean radeon_bomgr_is_buffer_busy(struct pb_manager *_mgr,
+ struct pb_buffer *_buf)
+{
+ struct radeon_bo *bo = radeon_bo(_buf);
+
+ if (radeon_bo_is_referenced_by_any_cs(bo)) {
+ return TRUE;
+ }
+
+ if (radeon_bo_is_busy((struct r300_winsys_bo*)bo)) {
+ return TRUE;
+ }
+
+ return FALSE;
+}
+
+static void radeon_bomgr_destroy(struct pb_manager *_mgr)
+{
+ struct radeon_bomgr *mgr = radeon_bomgr(_mgr);
+ util_hash_table_destroy(mgr->bo_handles);
+ pipe_mutex_destroy(mgr->bo_handles_mutex);
+ FREE(mgr);
+}
+
+#define PTR_TO_UINT(x) ((unsigned)((intptr_t)(x)))
+
+static unsigned handle_hash(void *key)
+{
+ return PTR_TO_UINT(key);
+}
+
+static int handle_compare(void *key1, void *key2)
+{
+ return PTR_TO_UINT(key1) != PTR_TO_UINT(key2);
+}
+
+struct pb_manager *radeon_bomgr_create(struct radeon_drm_winsys *rws)
+{
+ struct radeon_bomgr *mgr;
+
+ mgr = CALLOC_STRUCT(radeon_bomgr);
+ if (!mgr)
+ return NULL;
+
+ mgr->base.destroy = radeon_bomgr_destroy;
+ mgr->base.create_buffer = radeon_bomgr_create_bo;
+ mgr->base.flush = radeon_bomgr_flush;
+ mgr->base.is_buffer_busy = radeon_bomgr_is_buffer_busy;
+
+ mgr->rws = rws;
+ mgr->bo_handles = util_hash_table_create(handle_hash, handle_compare);
+ pipe_mutex_init(mgr->bo_handles_mutex);
+ return &mgr->base;
+}
+
+static void *radeon_bo_map(struct r300_winsys_bo *buf,
+ struct r300_winsys_cs *cs,
+ enum pipe_transfer_usage usage)
+{
+ struct pb_buffer *_buf = pb_buffer(buf);
+
+ return pb_map(_buf, get_pb_usage_from_transfer_flags(usage), cs);
+}
+
+static void radeon_bo_get_tiling(struct r300_winsys_bo *_buf,
+ enum r300_buffer_tiling *microtiled,
+ enum r300_buffer_tiling *macrotiled)
+{
+ struct radeon_bo *bo = get_radeon_bo(pb_buffer(_buf));
+ struct drm_radeon_gem_set_tiling args = {};
+
+ args.handle = bo->handle;
+
+ drmCommandWriteRead(bo->rws->fd,
+ DRM_RADEON_GEM_GET_TILING,
+ &args,
+ sizeof(args));
+
+ *microtiled = R300_BUFFER_LINEAR;
+ *macrotiled = R300_BUFFER_LINEAR;
+ if (args.tiling_flags & RADEON_BO_FLAGS_MICRO_TILE)
+ *microtiled = R300_BUFFER_TILED;
+
+ if (args.tiling_flags & RADEON_BO_FLAGS_MACRO_TILE)
+ *macrotiled = R300_BUFFER_TILED;
+}
+
+static void radeon_bo_set_tiling(struct r300_winsys_bo *_buf,
+ struct r300_winsys_cs *rcs,
+ enum r300_buffer_tiling microtiled,
+ enum r300_buffer_tiling macrotiled,
+ uint32_t pitch)
+{
+ struct radeon_bo *bo = get_radeon_bo(pb_buffer(_buf));
+ struct radeon_drm_cs *cs = radeon_drm_cs(rcs);
+ struct drm_radeon_gem_set_tiling args = {};
+
+ /* Tiling determines how DRM treats the buffer data.
+ * We must flush CS when changing it if the buffer is referenced. */
+ if (cs && radeon_bo_is_referenced_by_cs(cs, bo)) {
+ cs->flush_cs(cs->flush_data, 0);
+ }
+
+ while (p_atomic_read(&bo->num_active_ioctls)) {
+ sched_yield();
+ }
+
+ if (microtiled == R300_BUFFER_TILED)
+ args.tiling_flags |= RADEON_BO_FLAGS_MICRO_TILE;
+ else if (microtiled == R300_BUFFER_SQUARETILED)
+ args.tiling_flags |= RADEON_BO_FLAGS_MICRO_TILE_SQUARE;
+
+ if (macrotiled == R300_BUFFER_TILED)
+ args.tiling_flags |= RADEON_BO_FLAGS_MACRO_TILE;
+
+ args.handle = bo->handle;
+ args.pitch = pitch;
+
+ drmCommandWriteRead(bo->rws->fd,
+ DRM_RADEON_GEM_SET_TILING,
+ &args,
+ sizeof(args));
+}
+
+static struct r300_winsys_cs_handle *radeon_drm_get_cs_handle(
+ struct r300_winsys_bo *_buf)
+{
+ /* return radeon_bo. */
+ return (struct r300_winsys_cs_handle*)
+ get_radeon_bo(pb_buffer(_buf));
+}
+
+static unsigned get_pb_usage_from_create_flags(unsigned bind, unsigned usage,
+ enum r300_buffer_domain domain)
+{
+ unsigned res = 0;
+
+ if (bind & (PIPE_BIND_VERTEX_BUFFER | PIPE_BIND_INDEX_BUFFER))
+ res |= RADEON_PB_USAGE_CACHE;
+
+ if (domain & R300_DOMAIN_GTT)
+ res |= RADEON_PB_USAGE_DOMAIN_GTT;
+
+ if (domain & R300_DOMAIN_VRAM)
+ res |= RADEON_PB_USAGE_DOMAIN_VRAM;
+
+ return res;
+}
+
+static struct r300_winsys_bo *
+radeon_winsys_bo_create(struct r300_winsys_screen *rws,
+ unsigned size,
+ unsigned alignment,
+ unsigned bind,
+ unsigned usage,
+ enum r300_buffer_domain domain)
+{
+ struct radeon_drm_winsys *ws = radeon_drm_winsys(rws);
+ struct pb_desc desc;
+ struct pb_manager *provider;
+ struct pb_buffer *buffer;
+
+ memset(&desc, 0, sizeof(desc));
+ desc.alignment = alignment;
+ desc.usage = get_pb_usage_from_create_flags(bind, usage, domain);
+
+ /* Assign a buffer manager. */
+ if (bind & (PIPE_BIND_VERTEX_BUFFER | PIPE_BIND_INDEX_BUFFER))
+ provider = ws->cman;
+ else
+ provider = ws->kman;
+
+ buffer = provider->create_buffer(provider, size, &desc);
+ if (!buffer)
+ return NULL;
+
+ return (struct r300_winsys_bo*)buffer;
+}
+
+static struct r300_winsys_bo *radeon_winsys_bo_from_handle(struct r300_winsys_screen *rws,
+ struct winsys_handle *whandle,
+ unsigned *stride,
+ unsigned *size)
+{
+ struct radeon_drm_winsys *ws = radeon_drm_winsys(rws);
+ struct radeon_bo *bo;
+ struct radeon_bomgr *mgr = radeon_bomgr(ws->kman);
+ struct drm_gem_open open_arg = {};
+
+ /* We must maintain a list of pairs <handle, bo>, so that we always return
+ * the same BO for one particular handle. If we didn't do that and created
+ * more than one BO for the same handle and then relocated them in a CS,
+ * we would hit a deadlock in the kernel.
+ *
+ * The list of pairs is guarded by a mutex, of course. */
+ pipe_mutex_lock(mgr->bo_handles_mutex);
+
+ /* First check if there already is an existing bo for the handle. */
+ bo = util_hash_table_get(mgr->bo_handles, (void*)(uintptr_t)whandle->handle);
+ if (bo) {
+ /* Increase the refcount. */
+ struct pb_buffer *b = NULL;
+ pb_reference(&b, &bo->base);
+ goto done;
+ }
+
+ /* There isn't, create a new one. */
+ bo = CALLOC_STRUCT(radeon_bo);
+ if (!bo) {
+ goto fail;
+ }
+
+ /* Open the BO. */
+ open_arg.name = whandle->handle;
+ if (drmIoctl(ws->fd, DRM_IOCTL_GEM_OPEN, &open_arg)) {
+ FREE(bo);
+ goto fail;
+ }
+ bo->handle = open_arg.handle;
+ bo->size = open_arg.size;
+ bo->name = whandle->handle;
+ radeon_bo_ref(bo);
+
+ /* Initialize it. */
+ pipe_reference_init(&bo->base.base.reference, 1);
+ bo->base.base.alignment = 0;
+ bo->base.base.usage = PB_USAGE_GPU_WRITE | PB_USAGE_GPU_READ;
+ bo->base.base.size = bo->size;
+ bo->base.vtbl = &radeon_bo_vtbl;
+ bo->mgr = mgr;
+ bo->rws = mgr->rws;
+ pipe_mutex_init(bo->map_mutex);
+
+ util_hash_table_set(mgr->bo_handles, (void*)(uintptr_t)whandle->handle, bo);
+
+done:
+ pipe_mutex_unlock(mgr->bo_handles_mutex);
+
+ if (stride)
+ *stride = whandle->stride;
+ if (size)
+ *size = bo->base.base.size;
+
+ return (struct r300_winsys_bo*)bo;
+
+fail:
+ pipe_mutex_unlock(mgr->bo_handles_mutex);
+ return NULL;
+}
+
+static boolean radeon_winsys_bo_get_handle(struct r300_winsys_bo *buffer,
+ unsigned stride,
+ struct winsys_handle *whandle)
+{
+ struct drm_gem_flink flink = {};
+ struct radeon_bo *bo = get_radeon_bo(pb_buffer(buffer));
+
+ if (whandle->type == DRM_API_HANDLE_TYPE_SHARED) {
+ if (!bo->flinked) {
+ flink.handle = bo->handle;
+
+ if (ioctl(bo->rws->fd, DRM_IOCTL_GEM_FLINK, &flink)) {
+ return FALSE;
+ }
+
+ bo->flinked = TRUE;
+ bo->flink = flink.name;
+ }
+ whandle->handle = bo->flink;
+ } else if (whandle->type == DRM_API_HANDLE_TYPE_KMS) {
+ whandle->handle = bo->handle;
+ }
+
+ whandle->stride = stride;
+ return TRUE;
+}
+
+void radeon_bomgr_init_functions(struct radeon_drm_winsys *ws)
+{
+ ws->base.buffer_get_cs_handle = radeon_drm_get_cs_handle;
+ ws->base.buffer_set_tiling = radeon_bo_set_tiling;
+ ws->base.buffer_get_tiling = radeon_bo_get_tiling;
+ ws->base.buffer_map = radeon_bo_map;
+ ws->base.buffer_unmap = pb_unmap;
+ ws->base.buffer_wait = radeon_bo_wait;
+ ws->base.buffer_is_busy = radeon_bo_is_busy;
+ ws->base.buffer_create = radeon_winsys_bo_create;
+ ws->base.buffer_from_handle = radeon_winsys_bo_from_handle;
+ ws->base.buffer_get_handle = radeon_winsys_bo_get_handle;
+}
diff --git a/src/gallium/winsys/radeon/drm/radeon_drm_buffer.h b/src/gallium/winsys/radeon/drm/radeon_drm_bo.h
index 494abdc0b48..a26866b7e75 100644
--- a/src/gallium/winsys/radeon/drm/radeon_drm_buffer.h
+++ b/src/gallium/winsys/radeon/drm/radeon_drm_bo.h
@@ -1,5 +1,6 @@
/*
* Copyright © 2008 Jérôme Glisse
+ * Copyright © 2011 Marek Olšák <maraeo@gmail.com>
* All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining
@@ -26,28 +27,61 @@
/*
* Authors:
* Jérôme Glisse <glisse@freedesktop.org>
+ * Marek Olšák <maraeo@gmail.com>
*/
#ifndef RADEON_DRM_BUFFER_H
#define RADEON_DRM_BUFFER_H
#include "radeon_winsys.h"
+#include "pipebuffer/pb_bufmgr.h"
+#include "os/os_thread.h"
-#define RADEON_PB_USAGE_VERTEX (1 << 28)
+#define RADEON_PB_USAGE_CACHE (1 << 28)
#define RADEON_PB_USAGE_DOMAIN_GTT (1 << 29)
#define RADEON_PB_USAGE_DOMAIN_VRAM (1 << 30)
+struct radeon_bomgr;
+
+struct radeon_bo {
+ struct pb_buffer base;
+ struct radeon_bomgr *mgr;
+ struct radeon_drm_winsys *rws;
+
+ void *ptr;
+ pipe_mutex map_mutex;
+
+ uint32_t size;
+ uint32_t handle;
+ uint32_t name;
+
+ int ref_count;
+
+ /* how many command streams is this bo referenced in? */
+ int num_cs_references;
+
+ /* how many command streams, which are being emitted in a separate
+ * thread, is this bo referenced in? */
+ int num_active_ioctls;
+
+ boolean flinked;
+ uint32_t flink;
+};
+
+struct pb_manager *radeon_bomgr_create(struct radeon_drm_winsys *rws);
+void radeon_bomgr_init_functions(struct radeon_drm_winsys *ws);
+
+void radeon_bo_unref(struct radeon_bo *buf);
+
+
+static INLINE void radeon_bo_ref(struct radeon_bo *bo)
+{
+ p_atomic_inc(&bo->ref_count);
+}
+
static INLINE struct pb_buffer *
-radeon_pb_buffer(struct r300_winsys_buffer *buffer)
+pb_buffer(struct r300_winsys_bo *buffer)
{
return (struct pb_buffer *)buffer;
}
-struct pb_manager *radeon_drm_bufmgr_create(struct radeon_drm_winsys *rws);
-struct pb_buffer *radeon_drm_bufmgr_create_buffer_from_handle(struct pb_manager *_mgr,
- uint32_t handle);
-void radeon_drm_bufmgr_flush_maps(struct pb_manager *_mgr);
-boolean radeon_drm_bufmgr_get_handle(struct pb_buffer *_buf,
- struct winsys_handle *whandle);
-void radeon_drm_bufmgr_init_functions(struct radeon_drm_winsys *ws);
-
#endif
diff --git a/src/gallium/winsys/radeon/drm/radeon_drm_buffer.c b/src/gallium/winsys/radeon/drm/radeon_drm_buffer.c
deleted file mode 100644
index dc4b51747f4..00000000000
--- a/src/gallium/winsys/radeon/drm/radeon_drm_buffer.c
+++ /dev/null
@@ -1,564 +0,0 @@
-#include "radeon_cs_gem.h"
-#include "radeon_drm_buffer.h"
-
-#include "util/u_hash_table.h"
-#include "util/u_memory.h"
-#include "util/u_simple_list.h"
-#include "pipebuffer/pb_bufmgr.h"
-#include "os/os_thread.h"
-
-#include "state_tracker/drm_driver.h"
-
-#include <radeon_drm.h>
-#include <radeon_bo_gem.h>
-#include <sys/ioctl.h>
-
-struct radeon_drm_bufmgr;
-
-struct radeon_drm_buffer {
- struct pb_buffer base;
- struct radeon_drm_bufmgr *mgr;
-
- struct radeon_bo *bo;
-
- boolean flinked;
- uint32_t flink;
-
- struct radeon_drm_buffer *next, *prev;
-};
-
-extern const struct pb_vtbl radeon_drm_buffer_vtbl;
-
-
-static INLINE struct radeon_drm_buffer *
-radeon_drm_buffer(struct pb_buffer *buf)
-{
- assert(buf);
- assert(buf->vtbl == &radeon_drm_buffer_vtbl);
- return (struct radeon_drm_buffer *)buf;
-}
-
-struct radeon_drm_bufmgr {
- /* Base class. */
- struct pb_manager base;
-
- /* Winsys. */
- struct radeon_drm_winsys *rws;
-
- /* List of mapped buffers and its mutex. */
- struct radeon_drm_buffer buffer_map_list;
- pipe_mutex buffer_map_list_mutex;
-
- /* List of buffer handles and its mutex. */
- struct util_hash_table *buffer_handles;
- pipe_mutex buffer_handles_mutex;
-};
-
-static INLINE struct radeon_drm_bufmgr *
-radeon_drm_bufmgr(struct pb_manager *mgr)
-{
- assert(mgr);
- return (struct radeon_drm_bufmgr *)mgr;
-}
-
-static void
-radeon_drm_buffer_destroy(struct pb_buffer *_buf)
-{
- struct radeon_drm_buffer *buf = radeon_drm_buffer(_buf);
- int name;
-
- if (buf->bo->ptr != NULL) {
- pipe_mutex_lock(buf->mgr->buffer_map_list_mutex);
- /* Now test it again inside the mutex. */
- if (buf->bo->ptr != NULL) {
- remove_from_list(buf);
- radeon_bo_unmap(buf->bo);
- buf->bo->ptr = NULL;
- }
- pipe_mutex_unlock(buf->mgr->buffer_map_list_mutex);
- }
- name = radeon_gem_name_bo(buf->bo);
- if (name) {
- pipe_mutex_lock(buf->mgr->buffer_handles_mutex);
- util_hash_table_remove(buf->mgr->buffer_handles,
- (void*)(uintptr_t)name);
- pipe_mutex_unlock(buf->mgr->buffer_handles_mutex);
- }
- radeon_bo_unref(buf->bo);
-
- FREE(buf);
-}
-
-static unsigned get_pb_usage_from_transfer_flags(enum pipe_transfer_usage usage)
-{
- unsigned res = 0;
-
- if (usage & PIPE_TRANSFER_READ)
- res |= PB_USAGE_CPU_READ;
-
- if (usage & PIPE_TRANSFER_WRITE)
- res |= PB_USAGE_CPU_WRITE;
-
- if (usage & PIPE_TRANSFER_DONTBLOCK)
- res |= PB_USAGE_DONTBLOCK;
-
- if (usage & PIPE_TRANSFER_UNSYNCHRONIZED)
- res |= PB_USAGE_UNSYNCHRONIZED;
-
- return res;
-}
-
-static void *
-radeon_drm_buffer_map_internal(struct pb_buffer *_buf,
- unsigned flags, void *flush_ctx)
-{
- struct radeon_drm_buffer *buf = radeon_drm_buffer(_buf);
- struct radeon_drm_cs *cs = flush_ctx;
- int write = 0;
-
- /* Note how we use radeon_bo_is_referenced_by_cs here. There are
- * basically two places this map function can be called from:
- * - pb_map
- * - create_buffer (in the buffer reuse case)
- *
- * Since pb managers are per-winsys managers, not per-context managers,
- * and we shouldn't reuse buffers if they are in-use in any context,
- * we simply ask: is this buffer referenced by *any* CS?
- *
- * The problem with buffer_create is that it comes from pipe_screen,
- * so we have no CS to look at, though luckily the following code
- * is sufficient to tell whether the buffer is in use. */
- if (flags & PB_USAGE_DONTBLOCK) {
- if (_buf->base.usage & RADEON_PB_USAGE_VERTEX)
- if (radeon_bo_is_referenced_by_cs(buf->bo, NULL))
- return NULL;
- }
-
- if (buf->bo->ptr != NULL) {
- pipe_mutex_lock(buf->mgr->buffer_map_list_mutex);
- /* Now test ptr again inside the mutex. We might have gotten a race
- * during the first test. */
- if (buf->bo->ptr != NULL) {
- remove_from_list(buf);
- }
- pipe_mutex_unlock(buf->mgr->buffer_map_list_mutex);
- return buf->bo->ptr;
- }
-
- if (flags & PB_USAGE_DONTBLOCK) {
- uint32_t domain;
- if (radeon_bo_is_busy(buf->bo, &domain))
- return NULL;
- }
-
- /* If we don't have any CS and the buffer is referenced,
- * we cannot flush. */
- assert(cs || !radeon_bo_is_referenced_by_cs(buf->bo, NULL));
-
- if (cs && radeon_bo_is_referenced_by_cs(buf->bo, cs->cs)) {
- cs->flush_cs(cs->flush_data);
- }
-
- if (flags & PB_USAGE_CPU_WRITE) {
- write = 1;
- }
-
- if (radeon_bo_map(buf->bo, write)) {
- return NULL;
- }
-
- pipe_mutex_lock(buf->mgr->buffer_map_list_mutex);
- remove_from_list(buf);
- pipe_mutex_unlock(buf->mgr->buffer_map_list_mutex);
- return buf->bo->ptr;
-}
-
-static void
-radeon_drm_buffer_unmap_internal(struct pb_buffer *_buf)
-{
- struct radeon_drm_buffer *buf = radeon_drm_buffer(_buf);
- pipe_mutex_lock(buf->mgr->buffer_map_list_mutex);
- if (is_empty_list(buf)) { /* = is not inserted... */
- insert_at_tail(&buf->mgr->buffer_map_list, buf);
- }
- pipe_mutex_unlock(buf->mgr->buffer_map_list_mutex);
-}
-
-static void
-radeon_drm_buffer_get_base_buffer(struct pb_buffer *buf,
- struct pb_buffer **base_buf,
- unsigned *offset)
-{
- *base_buf = buf;
- *offset = 0;
-}
-
-
-static enum pipe_error
-radeon_drm_buffer_validate(struct pb_buffer *_buf,
- struct pb_validate *vl,
- unsigned flags)
-{
- /* Always pinned */
- return PIPE_OK;
-}
-
-static void
-radeon_drm_buffer_fence(struct pb_buffer *buf,
- struct pipe_fence_handle *fence)
-{
-}
-
-const struct pb_vtbl radeon_drm_buffer_vtbl = {
- radeon_drm_buffer_destroy,
- radeon_drm_buffer_map_internal,
- radeon_drm_buffer_unmap_internal,
- radeon_drm_buffer_validate,
- radeon_drm_buffer_fence,
- radeon_drm_buffer_get_base_buffer,
-};
-
-static struct pb_buffer *
-radeon_drm_bufmgr_create_buffer_from_handle_unsafe(struct pb_manager *_mgr,
- uint32_t handle)
-{
- struct radeon_drm_bufmgr *mgr = radeon_drm_bufmgr(_mgr);
- struct radeon_drm_winsys *rws = mgr->rws;
- struct radeon_drm_buffer *buf;
- struct radeon_bo *bo;
-
- buf = util_hash_table_get(mgr->buffer_handles, (void*)(uintptr_t)handle);
-
- if (buf) {
- struct pb_buffer *b = NULL;
- pb_reference(&b, &buf->base);
- return b;
- }
-
- bo = radeon_bo_open(rws->bom, handle, 0,
- 0, 0, 0);
- if (bo == NULL)
- return NULL;
-
- buf = CALLOC_STRUCT(radeon_drm_buffer);
- if (!buf) {
- radeon_bo_unref(bo);
- return NULL;
- }
-
- make_empty_list(buf);
-
- pipe_reference_init(&buf->base.base.reference, 1);
- buf->base.base.alignment = 0;
- buf->base.base.usage = PB_USAGE_GPU_WRITE | PB_USAGE_GPU_READ;
- buf->base.base.size = bo->size;
- buf->base.vtbl = &radeon_drm_buffer_vtbl;
- buf->mgr = mgr;
-
- buf->bo = bo;
-
- util_hash_table_set(mgr->buffer_handles, (void*)(uintptr_t)handle, buf);
-
- return &buf->base;
-}
-
-struct pb_buffer *
-radeon_drm_bufmgr_create_buffer_from_handle(struct pb_manager *_mgr,
- uint32_t handle)
-{
- struct radeon_drm_bufmgr *mgr = radeon_drm_bufmgr(_mgr);
- struct pb_buffer *pb;
-
- pipe_mutex_lock(mgr->buffer_handles_mutex);
- pb = radeon_drm_bufmgr_create_buffer_from_handle_unsafe(_mgr, handle);
- pipe_mutex_unlock(mgr->buffer_handles_mutex);
-
- return pb;
-}
-
-static struct pb_buffer *
-radeon_drm_bufmgr_create_buffer(struct pb_manager *_mgr,
- pb_size size,
- const struct pb_desc *desc)
-{
- struct radeon_drm_bufmgr *mgr = radeon_drm_bufmgr(_mgr);
- struct radeon_drm_winsys *rws = mgr->rws;
- struct radeon_drm_buffer *buf;
- uint32_t domain;
-
- buf = CALLOC_STRUCT(radeon_drm_buffer);
- if (!buf)
- goto error1;
-
- pipe_reference_init(&buf->base.base.reference, 1);
- buf->base.base.alignment = desc->alignment;
- buf->base.base.usage = desc->usage;
- buf->base.base.size = size;
- buf->base.vtbl = &radeon_drm_buffer_vtbl;
- buf->mgr = mgr;
-
- make_empty_list(buf);
-
- domain =
- (desc->usage & RADEON_PB_USAGE_DOMAIN_GTT ? RADEON_GEM_DOMAIN_GTT : 0) |
- (desc->usage & RADEON_PB_USAGE_DOMAIN_VRAM ? RADEON_GEM_DOMAIN_VRAM : 0);
-
- buf->bo = radeon_bo_open(rws->bom, 0, size,
- desc->alignment, domain, 0);
- if (buf->bo == NULL)
- goto error2;
-
- return &buf->base;
-
- error2:
- FREE(buf);
- error1:
- return NULL;
-}
-
-static void
-radeon_drm_bufmgr_flush(struct pb_manager *mgr)
-{
- /* NOP */
-}
-
-static void
-radeon_drm_bufmgr_destroy(struct pb_manager *_mgr)
-{
- struct radeon_drm_bufmgr *mgr = radeon_drm_bufmgr(_mgr);
- util_hash_table_destroy(mgr->buffer_handles);
- pipe_mutex_destroy(mgr->buffer_map_list_mutex);
- pipe_mutex_destroy(mgr->buffer_handles_mutex);
- FREE(mgr);
-}
-
-static unsigned handle_hash(void *key)
-{
- return (unsigned)key;
-}
-
-static int handle_compare(void *key1, void *key2)
-{
- return !((int)key1 == (int)key2);
-}
-
-struct pb_manager *
-radeon_drm_bufmgr_create(struct radeon_drm_winsys *rws)
-{
- struct radeon_drm_bufmgr *mgr;
-
- mgr = CALLOC_STRUCT(radeon_drm_bufmgr);
- if (!mgr)
- return NULL;
-
- mgr->base.destroy = radeon_drm_bufmgr_destroy;
- mgr->base.create_buffer = radeon_drm_bufmgr_create_buffer;
- mgr->base.flush = radeon_drm_bufmgr_flush;
-
- mgr->rws = rws;
- make_empty_list(&mgr->buffer_map_list);
- mgr->buffer_handles = util_hash_table_create(handle_hash, handle_compare);
- pipe_mutex_init(mgr->buffer_map_list_mutex);
- pipe_mutex_init(mgr->buffer_handles_mutex);
- return &mgr->base;
-}
-
-static struct radeon_drm_buffer *get_drm_buffer(struct pb_buffer *_buf)
-{
- struct radeon_drm_buffer *buf = NULL;
-
- if (_buf->vtbl == &radeon_drm_buffer_vtbl) {
- buf = radeon_drm_buffer(_buf);
- } else {
- struct pb_buffer *base_buf;
- pb_size offset;
- pb_get_base_buffer(_buf, &base_buf, &offset);
-
- if (base_buf->vtbl == &radeon_drm_buffer_vtbl)
- buf = radeon_drm_buffer(base_buf);
- }
-
- return buf;
-}
-
-static void *radeon_drm_buffer_map(struct r300_winsys_screen *ws,
- struct r300_winsys_buffer *buf,
- struct r300_winsys_cs *cs,
- enum pipe_transfer_usage usage)
-{
- struct pb_buffer *_buf = radeon_pb_buffer(buf);
-
- return pb_map(_buf, get_pb_usage_from_transfer_flags(usage), radeon_drm_cs(cs));
-}
-
-static void radeon_drm_buffer_unmap(struct r300_winsys_screen *ws,
- struct r300_winsys_buffer *buf)
-{
- struct pb_buffer *_buf = radeon_pb_buffer(buf);
-
- pb_unmap(_buf);
-}
-
-boolean radeon_drm_bufmgr_get_handle(struct pb_buffer *_buf,
- struct winsys_handle *whandle)
-{
- struct drm_gem_flink flink;
- struct radeon_drm_buffer *buf = get_drm_buffer(_buf);
-
- if (whandle->type == DRM_API_HANDLE_TYPE_SHARED) {
- if (!buf->flinked) {
- flink.handle = buf->bo->handle;
-
- if (ioctl(buf->mgr->rws->fd, DRM_IOCTL_GEM_FLINK, &flink)) {
- return FALSE;
- }
-
- buf->flinked = TRUE;
- buf->flink = flink.name;
- }
- whandle->handle = buf->flink;
- } else if (whandle->type == DRM_API_HANDLE_TYPE_KMS) {
- whandle->handle = buf->bo->handle;
- }
- return TRUE;
-}
-
-static void radeon_drm_buffer_get_tiling(struct r300_winsys_screen *ws,
- struct r300_winsys_buffer *_buf,
- enum r300_buffer_tiling *microtiled,
- enum r300_buffer_tiling *macrotiled)
-{
- struct radeon_drm_buffer *buf = get_drm_buffer(radeon_pb_buffer(_buf));
- uint32_t flags = 0, pitch;
-
- radeon_bo_get_tiling(buf->bo, &flags, &pitch);
-
- *microtiled = R300_BUFFER_LINEAR;
- *macrotiled = R300_BUFFER_LINEAR;
- if (flags & RADEON_BO_FLAGS_MICRO_TILE)
- *microtiled = R300_BUFFER_TILED;
-
- if (flags & RADEON_BO_FLAGS_MACRO_TILE)
- *macrotiled = R300_BUFFER_TILED;
-}
-
-static void radeon_drm_buffer_set_tiling(struct r300_winsys_screen *ws,
- struct r300_winsys_buffer *_buf,
- enum r300_buffer_tiling microtiled,
- enum r300_buffer_tiling macrotiled,
- uint32_t pitch)
-{
- struct radeon_drm_buffer *buf = get_drm_buffer(radeon_pb_buffer(_buf));
- uint32_t flags = 0;
- if (microtiled == R300_BUFFER_TILED)
- flags |= RADEON_BO_FLAGS_MICRO_TILE;
-/* XXX Remove this ifdef when libdrm version 2.4.19 becomes mandatory. */
-#ifdef RADEON_BO_FLAGS_MICRO_TILE_SQUARE
- else if (microtiled == R300_BUFFER_SQUARETILED)
- flags |= RADEON_BO_FLAGS_MICRO_TILE_SQUARE;
-#endif
- if (macrotiled == R300_BUFFER_TILED)
- flags |= RADEON_BO_FLAGS_MACRO_TILE;
-
- radeon_bo_set_tiling(buf->bo, flags, pitch);
-}
-
-static void radeon_drm_bufmgr_add_buffer(struct r300_winsys_cs *rcs,
- struct r300_winsys_cs_buffer *_buf,
- enum r300_buffer_domain rd,
- enum r300_buffer_domain wd)
-{
- struct radeon_drm_cs *cs = radeon_drm_cs(rcs);
- struct radeon_bo *bo = (struct radeon_bo*)_buf;
-
- radeon_cs_space_add_persistent_bo(cs->cs, bo, rd, wd);
-}
-
-static void radeon_drm_bufmgr_write_reloc(struct r300_winsys_cs *rcs,
- struct r300_winsys_cs_buffer *_buf,
- enum r300_buffer_domain rd,
- enum r300_buffer_domain wd)
-{
- struct radeon_drm_cs *cs = radeon_drm_cs(rcs);
- struct radeon_bo *bo = (struct radeon_bo*)_buf;
- int retval;
-
- cs->cs->cdw = cs->base.cdw;
- retval = radeon_cs_write_reloc(cs->cs, bo, rd, wd, 0);
- cs->base.cdw = cs->cs->cdw;
- if (retval) {
- fprintf(stderr, "radeon: Relocation of %p (%d, %d, %d) failed!\n",
- bo, rd, wd, 0);
- }
-}
-
-static struct r300_winsys_cs_buffer *radeon_drm_get_cs_handle(
- struct r300_winsys_screen *rws,
- struct r300_winsys_buffer *_buf)
-{
- /* return pure radeon_bo. */
- return (struct r300_winsys_cs_buffer*)
- get_drm_buffer(radeon_pb_buffer(_buf))->bo;
-}
-
-static boolean radeon_drm_is_buffer_referenced(struct r300_winsys_cs *rcs,
- struct r300_winsys_cs_buffer *_buf,
- enum r300_reference_domain domain)
-{
- struct radeon_drm_cs *cs = radeon_drm_cs(rcs);
- struct radeon_bo *bo = (struct radeon_bo*)_buf;
- uint32_t tmp;
-
- if (domain & R300_REF_CS) {
- if (radeon_bo_is_referenced_by_cs(bo, cs->cs)) {
- return TRUE;
- }
- }
-
- if (domain & R300_REF_HW) {
- if (radeon_bo_is_busy(bo, &tmp)) {
- return TRUE;
- }
- }
-
- return FALSE;
-}
-
-void radeon_drm_bufmgr_flush_maps(struct pb_manager *_mgr)
-{
- struct radeon_drm_bufmgr *mgr = radeon_drm_bufmgr(_mgr);
- struct radeon_drm_buffer *rpb, *t_rpb;
-
- pipe_mutex_lock(mgr->buffer_map_list_mutex);
-
- foreach_s(rpb, t_rpb, &mgr->buffer_map_list) {
- radeon_bo_unmap(rpb->bo);
- rpb->bo->ptr = NULL;
- remove_from_list(rpb);
- }
-
- make_empty_list(&mgr->buffer_map_list);
-
- pipe_mutex_unlock(mgr->buffer_map_list_mutex);
-}
-
-static void radeon_drm_buffer_wait(struct r300_winsys_screen *ws,
- struct r300_winsys_buffer *_buf)
-{
- struct radeon_drm_buffer *buf = get_drm_buffer(radeon_pb_buffer(_buf));
-
- radeon_bo_wait(buf->bo);
-}
-
-void radeon_drm_bufmgr_init_functions(struct radeon_drm_winsys *ws)
-{
- ws->base.buffer_get_cs_handle = radeon_drm_get_cs_handle;
- ws->base.buffer_set_tiling = radeon_drm_buffer_set_tiling;
- ws->base.buffer_get_tiling = radeon_drm_buffer_get_tiling;
- ws->base.buffer_map = radeon_drm_buffer_map;
- ws->base.buffer_unmap = radeon_drm_buffer_unmap;
- ws->base.buffer_wait = radeon_drm_buffer_wait;
- ws->base.cs_is_buffer_referenced = radeon_drm_is_buffer_referenced;
- ws->base.cs_add_buffer = radeon_drm_bufmgr_add_buffer;
- ws->base.cs_write_reloc = radeon_drm_bufmgr_write_reloc;
-}
diff --git a/src/gallium/winsys/radeon/drm/radeon_drm_common.c b/src/gallium/winsys/radeon/drm/radeon_drm_common.c
index 6bc6244115c..72c2ff11125 100644
--- a/src/gallium/winsys/radeon/drm/radeon_drm_common.c
+++ b/src/gallium/winsys/radeon/drm/radeon_drm_common.c
@@ -1,5 +1,6 @@
/*
* Copyright © 2009 Corbin Simpson
+ * Copyright © 2011 Marek Olšák <maraeo@gmail.com>
* All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining
@@ -27,39 +28,35 @@
* Authors:
* Corbin Simpson <MostAwesomeDude@gmail.com>
* Joakim Sindholt <opensource@zhasha.com>
+ * Marek Olšák <maraeo@gmail.com>
*/
#include "radeon_winsys.h"
-#include "radeon_drm_buffer.h"
+#include "radeon_drm_bo.h"
+#include "radeon_drm_cs.h"
#include "radeon_drm_public.h"
#include "pipebuffer/pb_bufmgr.h"
#include "util/u_memory.h"
-#include "state_tracker/drm_driver.h"
-
-#include <radeon_drm.h>
-#include <radeon_bo_gem.h>
-#include <radeon_cs_gem.h>
#include <xf86drm.h>
#include <stdio.h>
-
-/* Enable/disable Hyper-Z access. Return TRUE on success. */
-static boolean radeon_set_hyperz_access(int fd, boolean enable)
-{
#ifndef RADEON_INFO_WANT_HYPERZ
#define RADEON_INFO_WANT_HYPERZ 7
#endif
+#ifndef RADEON_INFO_WANT_CMASK
+#define RADEON_INFO_WANT_CMASK 8
+#endif
+/* Enable/disable feature access. Return TRUE on success. */
+static boolean radeon_set_fd_access(int fd, unsigned request, boolean enable)
+{
struct drm_radeon_info info = {0};
unsigned value = enable ? 1 : 0;
- if (!debug_get_bool_option("RADEON_HYPERZ", FALSE))
- return FALSE;
-
info.value = (unsigned long)&value;
- info.request = RADEON_INFO_WANT_HYPERZ;
+ info.request = request;
if (drmCommandWriteRead(fd, DRM_RADEON_INFO, &info, sizeof(info)) != 0)
return FALSE;
@@ -99,28 +96,21 @@ static void do_ioctls(struct radeon_drm_winsys *winsys)
* we don't actually use the info for anything yet. */
version = drmGetVersion(winsys->fd);
- if (version->version_major != 2) {
+ if (version->version_major != 2 ||
+ version->version_minor < 3) {
fprintf(stderr, "%s: DRM version is %d.%d.%d but this driver is "
- "only compatible with 2.x.x\n", __FUNCTION__,
- version->version_major, version->version_minor,
+ "only compatible with 2.3.x (kernel 2.6.34) and later.\n",
+ __FUNCTION__,
+ version->version_major,
+ version->version_minor,
version->version_patchlevel);
drmFreeVersion(version);
exit(1);
}
-/* XXX Remove this ifdef when libdrm version 2.4.19 becomes mandatory. */
-#ifdef RADEON_BO_FLAGS_MICRO_TILE_SQUARE
- // Supported since 2.1.0.
- winsys->squaretiling = version->version_major > 2 ||
- version->version_minor >= 1;
-#endif
-
- winsys->drm_2_3_0 = version->version_major > 2 ||
- version->version_minor >= 3;
-
- winsys->drm_2_6_0 = version->version_major > 2 ||
- (version->version_major == 2 &&
- version->version_minor >= 6);
+ winsys->drm_major = version->version_major;
+ winsys->drm_minor = version->version_minor;
+ winsys->drm_patchlevel = version->version_patchlevel;
info.request = RADEON_INFO_DEVICE_ID;
retval = drmCommandWriteRead(winsys->fd, DRM_RADEON_INFO, &info, sizeof(info));
@@ -149,7 +139,15 @@ static void do_ioctls(struct radeon_drm_winsys *winsys)
}
winsys->z_pipes = target;
- winsys->hyperz = radeon_set_hyperz_access(winsys->fd, TRUE);
+ if (debug_get_bool_option("RADEON_HYPERZ", FALSE)) {
+ winsys->hyperz = radeon_set_fd_access(winsys->fd,
+ RADEON_INFO_WANT_HYPERZ, TRUE);
+ }
+
+ if (debug_get_bool_option("RADEON_CMASK", FALSE)) {
+ winsys->aacompress = radeon_set_fd_access(winsys->fd,
+ RADEON_INFO_WANT_CMASK, TRUE);
+ }
retval = drmCommandWriteRead(winsys->fd, DRM_RADEON_GEM_INFO,
&gem_info, sizeof(gem_info));
@@ -161,18 +159,9 @@ static void do_ioctls(struct radeon_drm_winsys *winsys)
winsys->gart_size = gem_info.gart_size;
winsys->vram_size = gem_info.vram_size;
- debug_printf("radeon: Successfully grabbed chipset info from kernel!\n"
- "radeon: DRM version: %d.%d.%d ID: 0x%04x GB: %d Z: %d\n"
- "radeon: GART size: %d MB VRAM size: %d MB\n"
- "radeon: HyperZ: %s\n",
- version->version_major, version->version_minor,
- version->version_patchlevel, winsys->pci_id,
- winsys->gb_pipes, winsys->z_pipes,
- winsys->gart_size / 1024 / 1024,
- winsys->vram_size / 1024 / 1024,
- winsys->hyperz ? "YES" : "NO");
-
drmFreeVersion(version);
+
+ winsys->num_cpus = sysconf(_SC_NPROCESSORS_ONLN);
}
static void radeon_winsys_destroy(struct r300_winsys_screen *rws)
@@ -181,12 +170,43 @@ static void radeon_winsys_destroy(struct r300_winsys_screen *rws)
ws->cman->destroy(ws->cman);
ws->kman->destroy(ws->kman);
-
- radeon_bo_manager_gem_dtor(ws->bom);
- radeon_cs_manager_gem_dtor(ws->csm);
FREE(rws);
}
+static uint32_t radeon_get_value(struct r300_winsys_screen *rws,
+ enum r300_value_id id)
+{
+ struct radeon_drm_winsys *ws = (struct radeon_drm_winsys *)rws;
+
+ switch(id) {
+ case R300_VID_PCI_ID:
+ return ws->pci_id;
+ case R300_VID_GB_PIPES:
+ return ws->gb_pipes;
+ case R300_VID_Z_PIPES:
+ return ws->z_pipes;
+ case R300_VID_GART_SIZE:
+ return ws->gart_size;
+ case R300_VID_VRAM_SIZE:
+ return ws->vram_size;
+ case R300_VID_DRM_MAJOR:
+ return ws->drm_major;
+ case R300_VID_DRM_MINOR:
+ return ws->drm_minor;
+ case R300_VID_DRM_PATCHLEVEL:
+ return ws->drm_patchlevel;
+ case R300_VID_DRM_2_6_0:
+ return ws->drm_major*100 + ws->drm_minor >= 206;
+ case R300_VID_DRM_2_8_0:
+ return ws->drm_major*100 + ws->drm_minor >= 208;
+ case R300_CAN_HYPERZ:
+ return ws->hyperz;
+ case R300_CAN_AACOMPRESS:
+ return ws->aacompress;
+ }
+ return 0;
+}
+
struct r300_winsys_screen *r300_drm_winsys_screen_create(int fd)
{
struct radeon_drm_winsys *ws = CALLOC_STRUCT(radeon_drm_winsys);
@@ -202,13 +222,7 @@ struct r300_winsys_screen *r300_drm_winsys_screen_create(int fd)
}
/* Create managers. */
- ws->bom = radeon_bo_manager_gem_ctor(fd);
- if (!ws->bom)
- goto fail;
- ws->csm = radeon_cs_manager_gem_ctor(fd);
- if (!ws->csm)
- goto fail;
- ws->kman = radeon_drm_bufmgr_create(ws);
+ ws->kman = radeon_bomgr_create(ws);
if (!ws->kman)
goto fail;
ws->cman = pb_cache_manager_create(ws->kman, 1000000);
@@ -217,23 +231,18 @@ struct r300_winsys_screen *r300_drm_winsys_screen_create(int fd)
/* Set functions. */
ws->base.destroy = radeon_winsys_destroy;
+ ws->base.get_value = radeon_get_value;
- radeon_drm_bufmgr_init_functions(ws);
- radeon_winsys_init_functions(ws);
+ radeon_bomgr_init_functions(ws);
+ radeon_drm_cs_init_functions(ws);
return &ws->base;
fail:
- if (ws->bom)
- radeon_bo_manager_gem_dtor(ws->bom);
- if (ws->csm)
- radeon_cs_manager_gem_dtor(ws->csm);
-
if (ws->cman)
ws->cman->destroy(ws->cman);
if (ws->kman)
ws->kman->destroy(ws->kman);
-
FREE(ws);
return NULL;
}
diff --git a/src/gallium/winsys/radeon/drm/radeon_drm_cs.c b/src/gallium/winsys/radeon/drm/radeon_drm_cs.c
new file mode 100644
index 00000000000..951791a1727
--- /dev/null
+++ b/src/gallium/winsys/radeon/drm/radeon_drm_cs.c
@@ -0,0 +1,446 @@
+/*
+ * Copyright © 2008 Jérôme Glisse
+ * Copyright © 2010 Marek Olšák <maraeo@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, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NON-INFRINGEMENT. IN NO EVENT SHALL THE COPYRIGHT HOLDERS, AUTHORS
+ * AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
+ * USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ */
+/*
+ * Authors:
+ * Marek Olšák <maraeo@gmail.com>
+ *
+ * Based on work from libdrm_radeon by:
+ * Aapo Tahkola <aet@rasterburn.org>
+ * Nicolai Haehnle <prefect_@gmx.net>
+ * Jérôme Glisse <glisse@freedesktop.org>
+ */
+
+/*
+ This file replaces libdrm's radeon_cs_gem with our own implemention.
+ It's optimized specifically for r300g, but r600g could use it as well.
+ Reloc writes and space checking are faster and simpler than their
+ counterparts in libdrm (the time complexity of all the functions
+ is O(1) in nearly all scenarios, thanks to hashing).
+
+ It works like this:
+
+ cs_add_reloc(cs, buf, read_domain, write_domain) adds a new relocation and
+ also adds the size of 'buf' to the used_gart and used_vram winsys variables
+ based on the domains, which are simply or'd for the accounting purposes.
+ The adding is skipped if the reloc is already present in the list, but it
+ accounts any newly-referenced domains.
+
+ cs_validate is then called, which just checks:
+ used_vram/gart < vram/gart_size * 0.8
+ The 0.8 number allows for some memory fragmentation. If the validation
+ fails, the pipe driver flushes CS and tries do the validation again,
+ i.e. it validates only that one operation. If it fails again, it drops
+ the operation on the floor and prints some nasty message to stderr.
+ (done in the pipe driver)
+
+ cs_write_reloc(cs, buf) just writes a reloc that has been added using
+ cs_add_reloc. The read_domain and write_domain parameters have been removed,
+ because we already specify them in cs_add_reloc.
+*/
+
+#include "radeon_drm_cs.h"
+
+#include "util/u_memory.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <stdint.h>
+#include <xf86drm.h>
+
+#define RELOC_DWORDS (sizeof(struct drm_radeon_cs_reloc) / sizeof(uint32_t))
+
+static boolean radeon_init_cs_context(struct radeon_cs_context *csc, int fd)
+{
+ csc->fd = fd;
+ csc->nrelocs = 512;
+ csc->relocs_bo = (struct radeon_bo**)
+ CALLOC(1, csc->nrelocs * sizeof(struct radeon_bo*));
+ if (!csc->relocs_bo) {
+ return FALSE;
+ }
+
+ csc->relocs = (struct drm_radeon_cs_reloc*)
+ CALLOC(1, csc->nrelocs * sizeof(struct drm_radeon_cs_reloc));
+ if (!csc->relocs) {
+ FREE(csc->relocs_bo);
+ return FALSE;
+ }
+
+ csc->chunks[0].chunk_id = RADEON_CHUNK_ID_IB;
+ csc->chunks[0].length_dw = 0;
+ csc->chunks[0].chunk_data = (uint64_t)(uintptr_t)csc->buf;
+ csc->chunks[1].chunk_id = RADEON_CHUNK_ID_RELOCS;
+ csc->chunks[1].length_dw = 0;
+ csc->chunks[1].chunk_data = (uint64_t)(uintptr_t)csc->relocs;
+
+ csc->chunk_array[0] = (uint64_t)(uintptr_t)&csc->chunks[0];
+ csc->chunk_array[1] = (uint64_t)(uintptr_t)&csc->chunks[1];
+
+ csc->cs.num_chunks = 2;
+ csc->cs.chunks = (uint64_t)(uintptr_t)csc->chunk_array;
+ return TRUE;
+}
+
+static void radeon_cs_context_cleanup(struct radeon_cs_context *csc)
+{
+ unsigned i;
+
+ for (i = 0; i < csc->crelocs; i++) {
+ p_atomic_dec(&csc->relocs_bo[i]->num_cs_references);
+ radeon_bo_unref(csc->relocs_bo[i]);
+ csc->relocs_bo[i] = NULL;
+ }
+
+ csc->crelocs = 0;
+ csc->chunks[0].length_dw = 0;
+ csc->chunks[1].length_dw = 0;
+ csc->used_gart = 0;
+ csc->used_vram = 0;
+ memset(csc->is_handle_added, 0, sizeof(csc->is_handle_added));
+}
+
+static void radeon_destroy_cs_context(struct radeon_cs_context *csc)
+{
+ radeon_cs_context_cleanup(csc);
+ FREE(csc->relocs_bo);
+ FREE(csc->relocs);
+}
+
+static struct r300_winsys_cs *radeon_drm_cs_create(struct r300_winsys_screen *rws)
+{
+ struct radeon_drm_winsys *ws = radeon_drm_winsys(rws);
+ struct radeon_drm_cs *cs;
+
+ cs = CALLOC_STRUCT(radeon_drm_cs);
+ if (!cs) {
+ return NULL;
+ }
+
+ cs->ws = ws;
+
+ if (!radeon_init_cs_context(&cs->csc1, cs->ws->fd)) {
+ FREE(cs);
+ return NULL;
+ }
+ if (!radeon_init_cs_context(&cs->csc2, cs->ws->fd)) {
+ radeon_destroy_cs_context(&cs->csc1);
+ FREE(cs);
+ return NULL;
+ }
+
+ /* Set the first command buffer as current. */
+ cs->csc = &cs->csc1;
+ cs->cst = &cs->csc2;
+ cs->base.buf = cs->csc->buf;
+
+ p_atomic_inc(&ws->num_cs);
+ return &cs->base;
+}
+
+#define OUT_CS(cs, value) (cs)->buf[(cs)->cdw++] = (value)
+
+static INLINE void update_domains(struct drm_radeon_cs_reloc *reloc,
+ enum r300_buffer_domain rd,
+ enum r300_buffer_domain wd,
+ enum r300_buffer_domain *added_domains)
+{
+ *added_domains = (rd | wd) & ~(reloc->read_domains | reloc->write_domain);
+
+ if (reloc->read_domains & wd) {
+ reloc->read_domains = rd;
+ reloc->write_domain = wd;
+ } else if (rd & reloc->write_domain) {
+ reloc->read_domains = rd;
+ reloc->write_domain |= wd;
+ } else {
+ reloc->read_domains |= rd;
+ reloc->write_domain |= wd;
+ }
+}
+
+int radeon_get_reloc(struct radeon_cs_context *csc, struct radeon_bo *bo)
+{
+ struct drm_radeon_cs_reloc *reloc;
+ unsigned i;
+ unsigned hash = bo->handle & (sizeof(csc->is_handle_added)-1);
+
+ if (csc->is_handle_added[hash]) {
+ reloc = csc->relocs_hashlist[hash];
+ if (reloc->handle == bo->handle) {
+ return csc->reloc_indices_hashlist[hash];
+ }
+
+ /* Hash collision, look for the BO in the list of relocs linearly. */
+ for (i = csc->crelocs; i != 0;) {
+ --i;
+ reloc = &csc->relocs[i];
+ if (reloc->handle == bo->handle) {
+ /* Put this reloc in the hash list.
+ * This will prevent additional hash collisions if there are
+ * several subsequent get_reloc calls of the same buffer.
+ *
+ * Example: Assuming buffers A,B,C collide in the hash list,
+ * the following sequence of relocs:
+ * AAAAAAAAAAABBBBBBBBBBBBBBCCCCCCCC
+ * will collide here: ^ and here: ^,
+ * meaning that we should get very few collisions in the end. */
+ csc->relocs_hashlist[hash] = reloc;
+ csc->reloc_indices_hashlist[hash] = i;
+ /*printf("write_reloc collision, hash: %i, handle: %i\n", hash, bo->handle);*/
+ return i;
+ }
+ }
+ }
+
+ return -1;
+}
+
+static void radeon_add_reloc(struct radeon_cs_context *csc,
+ struct radeon_bo *bo,
+ enum r300_buffer_domain rd,
+ enum r300_buffer_domain wd,
+ enum r300_buffer_domain *added_domains)
+{
+ struct drm_radeon_cs_reloc *reloc;
+ unsigned i;
+ unsigned hash = bo->handle & (sizeof(csc->is_handle_added)-1);
+
+ if (csc->is_handle_added[hash]) {
+ reloc = csc->relocs_hashlist[hash];
+ if (reloc->handle == bo->handle) {
+ update_domains(reloc, rd, wd, added_domains);
+ return;
+ }
+
+ /* Hash collision, look for the BO in the list of relocs linearly. */
+ for (i = csc->crelocs; i != 0;) {
+ --i;
+ reloc = &csc->relocs[i];
+ if (reloc->handle == bo->handle) {
+ update_domains(reloc, rd, wd, added_domains);
+
+ csc->relocs_hashlist[hash] = reloc;
+ csc->reloc_indices_hashlist[hash] = i;
+ /*printf("write_reloc collision, hash: %i, handle: %i\n", hash, bo->handle);*/
+ return;
+ }
+ }
+ }
+
+ /* New relocation, check if the backing array is large enough. */
+ if (csc->crelocs >= csc->nrelocs) {
+ uint32_t size;
+ csc->nrelocs += 10;
+
+ size = csc->nrelocs * sizeof(struct radeon_bo*);
+ csc->relocs_bo = (struct radeon_bo**)realloc(csc->relocs_bo, size);
+
+ size = csc->nrelocs * sizeof(struct drm_radeon_cs_reloc);
+ csc->relocs = (struct drm_radeon_cs_reloc*)realloc(csc->relocs, size);
+
+ csc->chunks[1].chunk_data = (uint64_t)(uintptr_t)csc->relocs;
+ }
+
+ /* Initialize the new relocation. */
+ radeon_bo_ref(bo);
+ p_atomic_inc(&bo->num_cs_references);
+ csc->relocs_bo[csc->crelocs] = bo;
+ reloc = &csc->relocs[csc->crelocs];
+ reloc->handle = bo->handle;
+ reloc->read_domains = rd;
+ reloc->write_domain = wd;
+ reloc->flags = 0;
+
+ csc->is_handle_added[hash] = TRUE;
+ csc->relocs_hashlist[hash] = reloc;
+ csc->reloc_indices_hashlist[hash] = csc->crelocs;
+
+ csc->chunks[1].length_dw += RELOC_DWORDS;
+ csc->crelocs++;
+
+ *added_domains = rd | wd;
+}
+
+static void radeon_drm_cs_add_reloc(struct r300_winsys_cs *rcs,
+ struct r300_winsys_cs_handle *buf,
+ enum r300_buffer_domain rd,
+ enum r300_buffer_domain wd)
+{
+ struct radeon_drm_cs *cs = radeon_drm_cs(rcs);
+ struct radeon_bo *bo = (struct radeon_bo*)buf;
+ enum r300_buffer_domain added_domains;
+
+ radeon_add_reloc(cs->csc, bo, rd, wd, &added_domains);
+
+ if (!added_domains)
+ return;
+
+ if (added_domains & R300_DOMAIN_GTT)
+ cs->csc->used_gart += bo->size;
+ if (added_domains & R300_DOMAIN_VRAM)
+ cs->csc->used_vram += bo->size;
+}
+
+static boolean radeon_drm_cs_validate(struct r300_winsys_cs *rcs)
+{
+ struct radeon_drm_cs *cs = radeon_drm_cs(rcs);
+
+ return cs->csc->used_gart < cs->ws->gart_size * 0.8 &&
+ cs->csc->used_vram < cs->ws->vram_size * 0.8;
+}
+
+static void radeon_drm_cs_write_reloc(struct r300_winsys_cs *rcs,
+ struct r300_winsys_cs_handle *buf)
+{
+ struct radeon_drm_cs *cs = radeon_drm_cs(rcs);
+ struct radeon_bo *bo = (struct radeon_bo*)buf;
+
+ unsigned index = radeon_get_reloc(cs->csc, bo);
+
+ if (index == -1) {
+ fprintf(stderr, "r300: Cannot get a relocation in %s.\n", __func__);
+ return;
+ }
+
+ OUT_CS(&cs->base, 0xc0001000);
+ OUT_CS(&cs->base, index * RELOC_DWORDS);
+}
+
+static PIPE_THREAD_ROUTINE(radeon_drm_cs_emit_ioctl, param)
+{
+ struct radeon_cs_context *csc = (struct radeon_cs_context*)param;
+ unsigned i;
+
+ if (drmCommandWriteRead(csc->fd, DRM_RADEON_CS,
+ &csc->cs, sizeof(struct drm_radeon_cs))) {
+ if (debug_get_bool_option("RADEON_DUMP_CS", FALSE)) {
+ unsigned i;
+
+ fprintf(stderr, "radeon: The kernel rejected CS, dumping...\n");
+ for (i = 0; i < csc->chunks[0].length_dw; i++) {
+ fprintf(stderr, "0x%08X\n", csc->buf[i]);
+ }
+ } else {
+ fprintf(stderr, "radeon: The kernel rejected CS, "
+ "see dmesg for more information.\n");
+ }
+ }
+
+ for (i = 0; i < csc->crelocs; i++)
+ p_atomic_dec(&csc->relocs_bo[i]->num_active_ioctls);
+ return NULL;
+}
+
+void radeon_drm_cs_sync_flush(struct radeon_drm_cs *cs)
+{
+ /* Wait for any pending ioctl to complete. */
+ if (cs->thread) {
+ pipe_thread_wait(cs->thread);
+ cs->thread = 0;
+ }
+}
+
+DEBUG_GET_ONCE_BOOL_OPTION(thread, "RADEON_THREAD", TRUE)
+
+static void radeon_drm_cs_flush(struct r300_winsys_cs *rcs, unsigned flags)
+{
+ struct radeon_drm_cs *cs = radeon_drm_cs(rcs);
+ struct radeon_cs_context *tmp;
+
+ radeon_drm_cs_sync_flush(cs);
+
+ /* If the CS is not empty, emit it in a newly-spawned thread. */
+ if (cs->base.cdw) {
+ unsigned i, crelocs = cs->csc->crelocs;
+
+ cs->csc->chunks[0].length_dw = cs->base.cdw;
+
+ for (i = 0; i < crelocs; i++)
+ p_atomic_inc(&cs->csc->relocs_bo[i]->num_active_ioctls);
+
+ if (cs->ws->num_cpus > 1 && debug_get_option_thread() &&
+ (flags & R300_FLUSH_ASYNC)) {
+ cs->thread = pipe_thread_create(radeon_drm_cs_emit_ioctl, cs->csc);
+ assert(cs->thread);
+ } else {
+ radeon_drm_cs_emit_ioctl(cs->csc);
+ }
+ }
+
+ /* Flip command streams. */
+ tmp = cs->csc;
+ cs->csc = cs->cst;
+ cs->cst = tmp;
+
+ /* Prepare a new CS. */
+ radeon_cs_context_cleanup(cs->csc);
+
+ cs->base.buf = cs->csc->buf;
+ cs->base.cdw = 0;
+}
+
+static void radeon_drm_cs_destroy(struct r300_winsys_cs *rcs)
+{
+ struct radeon_drm_cs *cs = radeon_drm_cs(rcs);
+ radeon_drm_cs_sync_flush(cs);
+ radeon_cs_context_cleanup(&cs->csc1);
+ radeon_cs_context_cleanup(&cs->csc2);
+ p_atomic_dec(&cs->ws->num_cs);
+ radeon_destroy_cs_context(&cs->csc1);
+ radeon_destroy_cs_context(&cs->csc2);
+ FREE(cs);
+}
+
+static void radeon_drm_cs_set_flush(struct r300_winsys_cs *rcs,
+ void (*flush)(void *ctx, unsigned flags),
+ void *user)
+{
+ struct radeon_drm_cs *cs = radeon_drm_cs(rcs);
+ cs->flush_cs = flush;
+ cs->flush_data = user;
+}
+
+static boolean radeon_bo_is_referenced(struct r300_winsys_cs *rcs,
+ struct r300_winsys_cs_handle *_buf)
+{
+ struct radeon_drm_cs *cs = radeon_drm_cs(rcs);
+ struct radeon_bo *bo = (struct radeon_bo*)_buf;
+
+ return radeon_bo_is_referenced_by_cs(cs, bo);
+}
+
+void radeon_drm_cs_init_functions(struct radeon_drm_winsys *ws)
+{
+ ws->base.cs_create = radeon_drm_cs_create;
+ ws->base.cs_destroy = radeon_drm_cs_destroy;
+ ws->base.cs_add_reloc = radeon_drm_cs_add_reloc;
+ ws->base.cs_validate = radeon_drm_cs_validate;
+ ws->base.cs_write_reloc = radeon_drm_cs_write_reloc;
+ ws->base.cs_flush = radeon_drm_cs_flush;
+ ws->base.cs_set_flush = radeon_drm_cs_set_flush;
+ ws->base.cs_is_buffer_referenced = radeon_bo_is_referenced;
+}
diff --git a/src/gallium/winsys/radeon/drm/radeon_drm_cs.h b/src/gallium/winsys/radeon/drm/radeon_drm_cs.h
new file mode 100644
index 00000000000..dfaa161c318
--- /dev/null
+++ b/src/gallium/winsys/radeon/drm/radeon_drm_cs.h
@@ -0,0 +1,102 @@
+/*
+ * Copyright © 2011 Marek Olšák <maraeo@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, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NON-INFRINGEMENT. IN NO EVENT SHALL THE COPYRIGHT HOLDERS, AUTHORS
+ * AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
+ * USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ */
+
+#ifndef RADEON_DRM_CS_H
+#define RADEON_DRM_CS_H
+
+#include "radeon_drm_bo.h"
+#include <radeon_drm.h>
+
+struct radeon_cs_context {
+ uint32_t buf[R300_MAX_CMDBUF_DWORDS];
+
+ int fd;
+ struct drm_radeon_cs cs;
+ struct drm_radeon_cs_chunk chunks[2];
+ uint64_t chunk_array[2];
+
+ /* Relocs. */
+ unsigned nrelocs;
+ unsigned crelocs;
+ struct radeon_bo **relocs_bo;
+ struct drm_radeon_cs_reloc *relocs;
+
+ /* 0 = BO not added, 1 = BO added */
+ char is_handle_added[256];
+ struct drm_radeon_cs_reloc *relocs_hashlist[256];
+ unsigned reloc_indices_hashlist[256];
+
+ unsigned used_vram;
+ unsigned used_gart;
+};
+
+struct radeon_drm_cs {
+ struct r300_winsys_cs base;
+
+ /* We flip between these two CS. While one is being consumed
+ * by the kernel in another thread, the other one is being filled
+ * by the pipe driver. */
+ struct radeon_cs_context csc1;
+ struct radeon_cs_context csc2;
+ /* The currently-used CS. */
+ struct radeon_cs_context *csc;
+ /* The CS being currently-owned by the other thread. */
+ struct radeon_cs_context *cst;
+
+ /* The winsys. */
+ struct radeon_drm_winsys *ws;
+
+ /* Flush CS. */
+ void (*flush_cs)(void *ctx, unsigned flags);
+ void *flush_data;
+
+ pipe_thread thread;
+};
+
+int radeon_get_reloc(struct radeon_cs_context *csc, struct radeon_bo *bo);
+
+static INLINE struct radeon_drm_cs *
+radeon_drm_cs(struct r300_winsys_cs *base)
+{
+ return (struct radeon_drm_cs*)base;
+}
+
+static INLINE boolean radeon_bo_is_referenced_by_cs(struct radeon_drm_cs *cs,
+ struct radeon_bo *bo)
+{
+ return bo->num_cs_references == bo->rws->num_cs ||
+ (bo->num_cs_references && radeon_get_reloc(cs->csc, bo) != -1);
+}
+
+static INLINE boolean radeon_bo_is_referenced_by_any_cs(struct radeon_bo *bo)
+{
+ return bo->num_cs_references;
+}
+
+void radeon_drm_cs_sync_flush(struct radeon_drm_cs *cs);
+void radeon_drm_cs_init_functions(struct radeon_drm_winsys *ws);
+
+#endif
diff --git a/src/gallium/winsys/radeon/drm/radeon_r300.c b/src/gallium/winsys/radeon/drm/radeon_r300.c
deleted file mode 100644
index 9f59b3de461..00000000000
--- a/src/gallium/winsys/radeon/drm/radeon_r300.c
+++ /dev/null
@@ -1,266 +0,0 @@
-/*
- * Copyright 2008 Corbin Simpson <MostAwesomeDude@gmail.com>
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * on the rights to use, copy, modify, merge, publish, distribute, sub
- * license, and/or sell copies of the Software, and to permit persons to whom
- * the Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
- * THE AUTHOR(S) AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM,
- * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
- * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
- * USE OR OTHER DEALINGS IN THE SOFTWARE. */
-
-#include "radeon_drm_buffer.h"
-
-#include "util/u_memory.h"
-#include "pipebuffer/pb_bufmgr.h"
-
-#include "radeon_cs_gem.h"
-#include "state_tracker/drm_driver.h"
-
-static unsigned get_pb_usage_from_create_flags(unsigned bind, unsigned usage,
- enum r300_buffer_domain domain)
-{
- unsigned res = 0;
-
- if (bind & (PIPE_BIND_DEPTH_STENCIL | PIPE_BIND_RENDER_TARGET |
- PIPE_BIND_DISPLAY_TARGET | PIPE_BIND_SCANOUT))
- res |= PB_USAGE_GPU_WRITE;
-
- if (bind & PIPE_BIND_SAMPLER_VIEW)
- res |= PB_USAGE_GPU_READ | PB_USAGE_GPU_WRITE;
-
- if (bind & (PIPE_BIND_VERTEX_BUFFER | PIPE_BIND_INDEX_BUFFER))
- res |= PB_USAGE_GPU_READ;
-
- if (bind & PIPE_BIND_TRANSFER_WRITE)
- res |= PB_USAGE_CPU_WRITE;
-
- if (bind & PIPE_BIND_TRANSFER_READ)
- res |= PB_USAGE_CPU_READ;
-
- /* Is usage of any use for us? Probably not. */
-
- /* Now add driver-specific usage flags. */
- if (bind & (PIPE_BIND_VERTEX_BUFFER | PIPE_BIND_INDEX_BUFFER))
- res |= RADEON_PB_USAGE_VERTEX;
-
- if (domain & R300_DOMAIN_GTT)
- res |= RADEON_PB_USAGE_DOMAIN_GTT;
-
- if (domain & R300_DOMAIN_VRAM)
- res |= RADEON_PB_USAGE_DOMAIN_VRAM;
-
- return res;
-}
-
-static struct r300_winsys_buffer *
-radeon_r300_winsys_buffer_create(struct r300_winsys_screen *rws,
- unsigned size,
- unsigned alignment,
- unsigned bind,
- unsigned usage,
- enum r300_buffer_domain domain)
-{
- struct radeon_drm_winsys *ws = radeon_drm_winsys(rws);
- struct pb_desc desc;
- struct pb_manager *provider;
- struct pb_buffer *buffer;
-
- memset(&desc, 0, sizeof(desc));
- desc.alignment = alignment;
- desc.usage = get_pb_usage_from_create_flags(bind, usage, domain);
-
- /* Assign a buffer manager. */
- if (bind & (PIPE_BIND_VERTEX_BUFFER | PIPE_BIND_INDEX_BUFFER))
- provider = ws->cman;
- else
- provider = ws->kman;
-
- buffer = provider->create_buffer(provider, size, &desc);
- if (!buffer)
- return NULL;
-
- return (struct r300_winsys_buffer*)buffer;
-}
-
-static void radeon_r300_winsys_buffer_reference(struct r300_winsys_screen *rws,
- struct r300_winsys_buffer **pdst,
- struct r300_winsys_buffer *src)
-{
- struct pb_buffer *_src = radeon_pb_buffer(src);
- struct pb_buffer *_dst = radeon_pb_buffer(*pdst);
-
- pb_reference(&_dst, _src);
-
- *pdst = (struct r300_winsys_buffer*)_dst;
-}
-
-static struct r300_winsys_buffer *radeon_r300_winsys_buffer_from_handle(struct r300_winsys_screen *rws,
- struct winsys_handle *whandle,
- unsigned *stride,
- unsigned *size)
-{
- struct radeon_drm_winsys *ws = radeon_drm_winsys(rws);
- struct pb_buffer *_buf;
-
- _buf = radeon_drm_bufmgr_create_buffer_from_handle(ws->kman, whandle->handle);
-
- if (stride)
- *stride = whandle->stride;
- if (size)
- *size = _buf->base.size;
-
- return (struct r300_winsys_buffer*)_buf;
-}
-
-static boolean radeon_r300_winsys_buffer_get_handle(struct r300_winsys_screen *rws,
- struct r300_winsys_buffer *buffer,
- unsigned stride,
- struct winsys_handle *whandle)
-{
- struct pb_buffer *_buf = radeon_pb_buffer(buffer);
- whandle->stride = stride;
- return radeon_drm_bufmgr_get_handle(_buf, whandle);
-}
-
-static void radeon_r300_winsys_cs_set_flush(struct r300_winsys_cs *rcs,
- void (*flush)(void *),
- void *user)
-{
- struct radeon_drm_cs *cs = radeon_drm_cs(rcs);
- cs->flush_cs = flush;
- cs->flush_data = user;
- radeon_cs_space_set_flush(cs->cs, flush, user);
-}
-
-static boolean radeon_r300_winsys_cs_validate(struct r300_winsys_cs *rcs)
-{
- struct radeon_drm_cs *cs = radeon_drm_cs(rcs);
-
- return radeon_cs_space_check(cs->cs) >= 0;
-}
-
-static void radeon_r300_winsys_cs_reset_buffers(struct r300_winsys_cs *rcs)
-{
- struct radeon_drm_cs *cs = radeon_drm_cs(rcs);
- radeon_cs_space_reset_bos(cs->cs);
-}
-
-static void radeon_r300_winsys_cs_flush(struct r300_winsys_cs *rcs)
-{
- struct radeon_drm_cs *cs = radeon_drm_cs(rcs);
- int retval;
-
- /* Don't flush a zero-sized CS. */
- if (!cs->base.cdw) {
- return;
- }
-
- cs->cs->cdw = cs->base.cdw;
-
- radeon_drm_bufmgr_flush_maps(cs->ws->kman);
-
- /* Emit the CS. */
- retval = radeon_cs_emit(cs->cs);
- if (retval) {
- if (debug_get_bool_option("RADEON_DUMP_CS", FALSE)) {
- fprintf(stderr, "radeon: The kernel rejected CS, dumping...\n");
- radeon_cs_print(cs->cs, stderr);
- } else {
- fprintf(stderr, "radeon: The kernel rejected CS, "
- "see dmesg for more information.\n");
- }
- }
-
- /* Reset CS.
- * Someday, when we care about performance, we should really find a way
- * to rotate between two or three CS objects so that the GPU can be
- * spinning through one CS while another one is being filled. */
- radeon_cs_erase(cs->cs);
-
- cs->base.buf = cs->cs->packets;
- cs->base.cdw = cs->cs->cdw;
-}
-
-static uint32_t radeon_get_value(struct r300_winsys_screen *rws,
- enum r300_value_id id)
-{
- struct radeon_drm_winsys *ws = (struct radeon_drm_winsys *)rws;
-
- switch(id) {
- case R300_VID_PCI_ID:
- return ws->pci_id;
- case R300_VID_GB_PIPES:
- return ws->gb_pipes;
- case R300_VID_Z_PIPES:
- return ws->z_pipes;
- case R300_VID_SQUARE_TILING_SUPPORT:
- return ws->squaretiling;
- case R300_VID_DRM_2_3_0:
- return ws->drm_2_3_0;
- case R300_VID_DRM_2_6_0:
- return ws->drm_2_6_0;
- case R300_CAN_HYPERZ:
- return ws->hyperz;
- }
- return 0;
-}
-
-static struct r300_winsys_cs *radeon_r300_winsys_cs_create(struct r300_winsys_screen *rws)
-{
- struct radeon_drm_winsys *ws = radeon_drm_winsys(rws);
- struct radeon_drm_cs *cs = CALLOC_STRUCT(radeon_drm_cs);
-
- if (!cs)
- return NULL;
-
- /* Size limit on IBs is 64 kibibytes. */
- cs->cs = radeon_cs_create(ws->csm, 1024 * 64 / 4);
- if (!cs->cs) {
- FREE(cs);
- return NULL;
- }
-
- radeon_cs_set_limit(cs->cs,
- RADEON_GEM_DOMAIN_GTT, ws->gart_size);
- radeon_cs_set_limit(cs->cs,
- RADEON_GEM_DOMAIN_VRAM, ws->vram_size);
-
- cs->ws = ws;
- cs->base.buf = cs->cs->packets;
- cs->base.cdw = cs->cs->cdw;
- return &cs->base;
-}
-
-static void radeon_r300_winsys_cs_destroy(struct r300_winsys_cs *rcs)
-{
- struct radeon_drm_cs *cs = radeon_drm_cs(rcs);
- radeon_cs_destroy(cs->cs);
- FREE(cs);
-}
-
-void radeon_winsys_init_functions(struct radeon_drm_winsys *ws)
-{
- ws->base.get_value = radeon_get_value;
- ws->base.buffer_create = radeon_r300_winsys_buffer_create;
- ws->base.buffer_reference = radeon_r300_winsys_buffer_reference;
- ws->base.buffer_from_handle = radeon_r300_winsys_buffer_from_handle;
- ws->base.buffer_get_handle = radeon_r300_winsys_buffer_get_handle;
- ws->base.cs_create = radeon_r300_winsys_cs_create;
- ws->base.cs_destroy = radeon_r300_winsys_cs_destroy;
- ws->base.cs_validate = radeon_r300_winsys_cs_validate;
- ws->base.cs_flush = radeon_r300_winsys_cs_flush;
- ws->base.cs_reset_buffers = radeon_r300_winsys_cs_reset_buffers;
- ws->base.cs_set_flush = radeon_r300_winsys_cs_set_flush;
-}
diff --git a/src/gallium/winsys/radeon/drm/radeon_winsys.h b/src/gallium/winsys/radeon/drm/radeon_winsys.h
index 81da1a25e0f..9ecbb074572 100644
--- a/src/gallium/winsys/radeon/drm/radeon_winsys.h
+++ b/src/gallium/winsys/radeon/drm/radeon_winsys.h
@@ -36,8 +36,8 @@ struct radeon_drm_winsys {
struct r300_winsys_screen base;
int fd; /* DRM file descriptor */
+ int num_cs; /* The number of command streams created. */
- struct radeon_bo_manager *bom; /* Radeon BO manager. */
struct pb_manager *kman;
struct pb_manager *cman;
@@ -46,44 +46,22 @@ struct radeon_drm_winsys {
uint32_t z_pipes; /* Z pipe count (rv530 only) */
uint32_t gart_size; /* GART size. */
uint32_t vram_size; /* VRAM size. */
- boolean squaretiling; /* Square tiling support. */
- /* DRM 2.3.0 (R500 VAP regs, MSPOS regs, fixed tex3D size checking) */
- boolean drm_2_3_0;
- /* DRM 2.6.0 (Hyper-Z, GB_Z_PEQ_CONFIG allowed on rv350->r4xx) */
- boolean drm_2_6_0;
- /* Hyper-Z user */
- boolean hyperz;
-
- /* Radeon CS manager. */
- struct radeon_cs_manager *csm;
-};
-
-struct radeon_drm_cs {
- struct r300_winsys_cs base;
-
- /* The winsys. */
- struct radeon_drm_winsys *ws;
+ uint32_t num_cpus; /* Number of CPUs. */
- /* The libdrm command stream. */
- struct radeon_cs *cs;
+ unsigned drm_major;
+ unsigned drm_minor;
+ unsigned drm_patchlevel;
- /* Flush CS. */
- void (*flush_cs)(void *);
- void *flush_data;
+ /* Hyper-Z user */
+ boolean hyperz;
+ /* AA compression (CMask) */
+ boolean aacompress;
};
-static INLINE struct radeon_drm_cs *
-radeon_drm_cs(struct r300_winsys_cs *base)
-{
- return (struct radeon_drm_cs*)base;
-}
-
static INLINE struct radeon_drm_winsys *
radeon_drm_winsys(struct r300_winsys_screen *base)
{
return (struct radeon_drm_winsys*)base;
}
-void radeon_winsys_init_functions(struct radeon_drm_winsys *ws);
-
#endif
diff --git a/src/gallium/winsys/svga/drm/vmw_buffer.c b/src/gallium/winsys/svga/drm/vmw_buffer.c
index eca174a6c56..80d5dfc3ed4 100644
--- a/src/gallium/winsys/svga/drm/vmw_buffer.c
+++ b/src/gallium/winsys/svga/drm/vmw_buffer.c
@@ -120,7 +120,8 @@ vmw_gmr_buffer_destroy(struct pb_buffer *_buf)
static void *
vmw_gmr_buffer_map(struct pb_buffer *_buf,
- unsigned flags)
+ unsigned flags,
+ void *flush_ctx)
{
struct vmw_gmr_buffer *buf = vmw_gmr_buffer(_buf);
return buf->map;
diff --git a/src/gallium/winsys/svga/drm/vmw_context.c b/src/gallium/winsys/svga/drm/vmw_context.c
index 11626ee637d..f2124c1bf65 100644
--- a/src/gallium/winsys/svga/drm/vmw_context.c
+++ b/src/gallium/winsys/svga/drm/vmw_context.c
@@ -320,7 +320,7 @@ vmw_swc_region_relocation(struct svga_winsys_context *swc,
* to the FIFO won't cause flushing in the host.
*/
vswc->seen_regions += reloc->buffer->base.size;
- if(vswc->seen_regions >= VMW_GMR_POOL_SIZE/2)
+ if(vswc->seen_regions >= VMW_GMR_POOL_SIZE/3)
vswc->preemptive_flush = TRUE;
}
diff --git a/src/gallium/winsys/svga/drm/vmw_screen.c b/src/gallium/winsys/svga/drm/vmw_screen.c
index 51a4c55e5a2..cc3003d252f 100644
--- a/src/gallium/winsys/svga/drm/vmw_screen.c
+++ b/src/gallium/winsys/svga/drm/vmw_screen.c
@@ -45,8 +45,6 @@ vmw_winsys_create( int fd, boolean use_old_scanout_flag )
vws->ioctl.drm_fd = fd;
vws->use_old_scanout_flag = use_old_scanout_flag;
- debug_printf("%s: use_old_scanout_flag == %s\n", __FUNCTION__,
- use_old_scanout_flag ? "true" : "false");
if (!vmw_ioctl_init(vws))
goto out_no_ioctl;
diff --git a/src/gallium/winsys/sw/dri/SConscript b/src/gallium/winsys/sw/dri/SConscript
index b255d725f95..f8e1fa6cfd8 100644
--- a/src/gallium/winsys/sw/dri/SConscript
+++ b/src/gallium/winsys/sw/dri/SConscript
@@ -4,7 +4,7 @@
Import('*')
-if env['platform'] == 'linux':
+if env['platform'] in ('linux', 'sunos'):
env = env.Clone()
diff --git a/src/gallium/winsys/sw/wrapper/wrapper_sw_winsys.c b/src/gallium/winsys/sw/wrapper/wrapper_sw_winsys.c
index 8f9a90858de..51245766d1c 100644
--- a/src/gallium/winsys/sw/wrapper/wrapper_sw_winsys.c
+++ b/src/gallium/winsys/sw/wrapper/wrapper_sw_winsys.c
@@ -61,10 +61,8 @@ struct wrapper_sw_displaytarget
struct pipe_resource *tex;
struct pipe_transfer *transfer;
- unsigned width;
- unsigned height;
unsigned map_count;
- unsigned stride; /**< because we give stride at create */
+ unsigned stride; /**< because we get stride at create */
void *ptr;
};
@@ -95,7 +93,7 @@ wsw_dt_get_stride(struct wrapper_sw_displaytarget *wdt, unsigned *stride)
tr = pipe_get_transfer(pipe, tex, 0, 0,
PIPE_TRANSFER_READ_WRITE,
- 0, 0, wdt->width, wdt->height);
+ 0, 0, wdt->tex->width0, wdt->tex->height0);
if (!tr)
return FALSE;
@@ -208,7 +206,7 @@ wsw_dt_map(struct sw_winsys *ws,
tr = pipe_get_transfer(pipe, tex, 0, 0,
PIPE_TRANSFER_READ_WRITE,
- 0, 0, wdt->width, wdt->height);
+ 0, 0, wdt->tex->width0, wdt->tex->height0);
if (!tr)
return NULL;
@@ -248,6 +246,7 @@ wsw_dt_unmap(struct sw_winsys *ws,
pipe->transfer_unmap(pipe, wdt->transfer);
pipe->transfer_destroy(pipe, wdt->transfer);
+ pipe->flush(pipe, NULL);
wdt->transfer = NULL;
}
diff --git a/src/gallium/winsys/sw/xlib/SConscript b/src/gallium/winsys/sw/xlib/SConscript
index df01a9ec2bf..e9c274059bd 100644
--- a/src/gallium/winsys/sw/xlib/SConscript
+++ b/src/gallium/winsys/sw/xlib/SConscript
@@ -4,7 +4,7 @@
Import('*')
-if env['platform'] in ('cygwin', 'linux'):
+if env['platform'] in ('cygwin', 'linux', 'sunos'):
env = env.Clone()
diff --git a/src/getopt/SConscript b/src/getopt/SConscript
new file mode 100644
index 00000000000..14cabed4e64
--- /dev/null
+++ b/src/getopt/SConscript
@@ -0,0 +1,15 @@
+Import('*')
+
+if not env['msvc']:
+ Return()
+
+env = env.Clone()
+
+env.Prepend(CPPPATH = ['.'])
+
+getopt = env.ConvenienceLibrary(
+ target = 'getopt',
+ source = ['getopt_long.c'],
+)
+
+Export('getopt')
diff --git a/src/getopt/getopt.h b/src/getopt/getopt.h
new file mode 100644
index 00000000000..117608f485e
--- /dev/null
+++ b/src/getopt/getopt.h
@@ -0,0 +1,82 @@
+/* $OpenBSD: getopt.h,v 1.2 2008/06/26 05:42:04 ray Exp $ */
+/* $NetBSD: getopt.h,v 1.4 2000/07/07 10:43:54 ad Exp $ */
+
+/*-
+ * Copyright (c) 2000 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Dieter Baron and Thomas Klausner.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef _GETOPT_H_
+#define _GETOPT_H_
+
+/*
+ * GNU-like getopt_long() and 4.4BSD getsubopt()/optreset extensions
+ */
+#define no_argument 0
+#define required_argument 1
+#define optional_argument 2
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+struct option {
+ /* name of long option */
+ const char *name;
+ /*
+ * one of no_argument, required_argument, and optional_argument:
+ * whether option takes an argument
+ */
+ int has_arg;
+ /* if not NULL, set *flag to val when option found */
+ int *flag;
+ /* if flag not NULL, value to set *flag to; else return value */
+ int val;
+};
+
+int getopt_long(int, char * const *, const char *,
+ const struct option *, int *);
+int getopt_long_only(int, char * const *, const char *,
+ const struct option *, int *);
+#ifndef _GETOPT_DEFINED_
+#define _GETOPT_DEFINED_
+int getopt(int, char * const *, const char *);
+int getsubopt(char **, char * const *, char **);
+
+extern char *optarg; /* getopt(3) external variables */
+extern int opterr;
+extern int optind;
+extern int optopt;
+extern int optreset;
+extern char *suboptarg; /* getsubopt(3) external variable */
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* !_GETOPT_H_ */
diff --git a/src/getopt/getopt_long.c b/src/getopt/getopt_long.c
new file mode 100644
index 00000000000..81268b83953
--- /dev/null
+++ b/src/getopt/getopt_long.c
@@ -0,0 +1,511 @@
+/* $OpenBSD: getopt_long.c,v 1.24 2010/07/22 19:31:53 blambert Exp $ */
+/* $NetBSD: getopt_long.c,v 1.15 2002/01/31 22:43:40 tv Exp $ */
+
+/*
+ * Copyright (c) 2002 Todd C. Miller <Todd.Miller@courtesan.com>
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ * Sponsored in part by the Defense Advanced Research Projects
+ * Agency (DARPA) and Air Force Research Laboratory, Air Force
+ * Materiel Command, USAF, under agreement number F39502-99-1-0512.
+ */
+/*-
+ * Copyright (c) 2000 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Dieter Baron and Thomas Klausner.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include <errno.h>
+#include <getopt.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+int opterr = 1; /* if error message should be printed */
+int optind = 1; /* index into parent argv vector */
+int optopt = '?'; /* character checked for validity */
+int optreset; /* reset getopt */
+char *optarg; /* argument associated with option */
+
+#define PRINT_ERROR ((opterr) && (*options != ':'))
+
+#define FLAG_PERMUTE 0x01 /* permute non-options to the end of argv */
+#define FLAG_ALLARGS 0x02 /* treat non-options as args to option "-1" */
+#define FLAG_LONGONLY 0x04 /* operate as getopt_long_only */
+
+/* return values */
+#define BADCH (int)'?'
+#define BADARG ((*options == ':') ? (int)':' : (int)'?')
+#define INORDER (int)1
+
+#define EMSG ""
+
+static int getopt_internal(int, char * const *, const char *,
+ const struct option *, int *, int);
+static int parse_long_options(char * const *, const char *,
+ const struct option *, int *, int);
+static int gcd(int, int);
+static void permute_args(int, int, int, char * const *);
+
+static char *place = EMSG; /* option letter processing */
+
+/* XXX: set optreset to 1 rather than these two */
+static int nonopt_start = -1; /* first non option argument (for permute) */
+static int nonopt_end = -1; /* first option after non options (for permute) */
+
+/* Error messages */
+static const char recargchar[] = "option requires an argument -- %c";
+static const char recargstring[] = "option requires an argument -- %s";
+static const char ambig[] = "ambiguous option -- %.*s";
+static const char noarg[] = "option doesn't take an argument -- %.*s";
+static const char illoptchar[] = "unknown option -- %c";
+static const char illoptstring[] = "unknown option -- %s";
+
+/*
+ * Compute the greatest common divisor of a and b.
+ */
+static int
+gcd(int a, int b)
+{
+ int c;
+
+ c = a % b;
+ while (c != 0) {
+ a = b;
+ b = c;
+ c = a % b;
+ }
+
+ return (b);
+}
+
+/*
+ * Exchange the block from nonopt_start to nonopt_end with the block
+ * from nonopt_end to opt_end (keeping the same order of arguments
+ * in each block).
+ */
+static void
+permute_args(int panonopt_start, int panonopt_end, int opt_end,
+ char * const *nargv)
+{
+ int cstart, cyclelen, i, j, ncycle, nnonopts, nopts, pos;
+ char *swap;
+
+ /*
+ * compute lengths of blocks and number and size of cycles
+ */
+ nnonopts = panonopt_end - panonopt_start;
+ nopts = opt_end - panonopt_end;
+ ncycle = gcd(nnonopts, nopts);
+ cyclelen = (opt_end - panonopt_start) / ncycle;
+
+ for (i = 0; i < ncycle; i++) {
+ cstart = panonopt_end+i;
+ pos = cstart;
+ for (j = 0; j < cyclelen; j++) {
+ if (pos >= panonopt_end)
+ pos -= nnonopts;
+ else
+ pos += nopts;
+ swap = nargv[pos];
+ /* LINTED const cast */
+ ((char **) nargv)[pos] = nargv[cstart];
+ /* LINTED const cast */
+ ((char **)nargv)[cstart] = swap;
+ }
+ }
+}
+
+/*
+ * parse_long_options --
+ * Parse long options in argc/argv argument vector.
+ * Returns -1 if short_too is set and the option does not match long_options.
+ */
+static int
+parse_long_options(char * const *nargv, const char *options,
+ const struct option *long_options, int *idx, int short_too)
+{
+ char *current_argv, *has_equal;
+ size_t current_argv_len;
+ int i, match;
+
+ current_argv = place;
+ match = -1;
+
+ optind++;
+
+ if ((has_equal = strchr(current_argv, '=')) != NULL) {
+ /* argument found (--option=arg) */
+ current_argv_len = has_equal - current_argv;
+ has_equal++;
+ } else
+ current_argv_len = strlen(current_argv);
+
+ for (i = 0; long_options[i].name; i++) {
+ /* find matching long option */
+ if (strncmp(current_argv, long_options[i].name,
+ current_argv_len))
+ continue;
+
+ if (strlen(long_options[i].name) == current_argv_len) {
+ /* exact match */
+ match = i;
+ break;
+ }
+ /*
+ * If this is a known short option, don't allow
+ * a partial match of a single character.
+ */
+ if (short_too && current_argv_len == 1)
+ continue;
+
+ if (match == -1) /* partial match */
+ match = i;
+ else {
+ /* ambiguous abbreviation */
+ if (PRINT_ERROR)
+ fprintf(stderr, ambig, (int)current_argv_len,
+ current_argv);
+ optopt = 0;
+ return (BADCH);
+ }
+ }
+ if (match != -1) { /* option found */
+ if (long_options[match].has_arg == no_argument
+ && has_equal) {
+ if (PRINT_ERROR)
+ fprintf(stderr, noarg, (int)current_argv_len,
+ current_argv);
+ /*
+ * XXX: GNU sets optopt to val regardless of flag
+ */
+ if (long_options[match].flag == NULL)
+ optopt = long_options[match].val;
+ else
+ optopt = 0;
+ return (BADARG);
+ }
+ if (long_options[match].has_arg == required_argument ||
+ long_options[match].has_arg == optional_argument) {
+ if (has_equal)
+ optarg = has_equal;
+ else if (long_options[match].has_arg ==
+ required_argument) {
+ /*
+ * optional argument doesn't use next nargv
+ */
+ optarg = nargv[optind++];
+ }
+ }
+ if ((long_options[match].has_arg == required_argument)
+ && (optarg == NULL)) {
+ /*
+ * Missing argument; leading ':' indicates no error
+ * should be generated.
+ */
+ if (PRINT_ERROR)
+ fprintf(stderr, recargstring,
+ current_argv);
+ /*
+ * XXX: GNU sets optopt to val regardless of flag
+ */
+ if (long_options[match].flag == NULL)
+ optopt = long_options[match].val;
+ else
+ optopt = 0;
+ --optind;
+ return (BADARG);
+ }
+ } else { /* unknown option */
+ if (short_too) {
+ --optind;
+ return (-1);
+ }
+ if (PRINT_ERROR)
+ fprintf(stderr, illoptstring, current_argv);
+ optopt = 0;
+ return (BADCH);
+ }
+ if (idx)
+ *idx = match;
+ if (long_options[match].flag) {
+ *long_options[match].flag = long_options[match].val;
+ return (0);
+ } else
+ return (long_options[match].val);
+}
+
+/*
+ * getopt_internal --
+ * Parse argc/argv argument vector. Called by user level routines.
+ */
+static int
+getopt_internal(int nargc, char * const *nargv, const char *options,
+ const struct option *long_options, int *idx, int flags)
+{
+ char *oli; /* option letter list index */
+ int optchar, short_too;
+ static int posixly_correct = -1;
+
+ if (options == NULL)
+ return (-1);
+
+ /*
+ * Disable GNU extensions if POSIXLY_CORRECT is set or options
+ * string begins with a '+'.
+ */
+ if (posixly_correct == -1)
+ posixly_correct = (getenv("POSIXLY_CORRECT") != NULL);
+ if (posixly_correct || *options == '+')
+ flags &= ~FLAG_PERMUTE;
+ else if (*options == '-')
+ flags |= FLAG_ALLARGS;
+ if (*options == '+' || *options == '-')
+ options++;
+
+ /*
+ * XXX Some GNU programs (like cvs) set optind to 0 instead of
+ * XXX using optreset. Work around this braindamage.
+ */
+ if (optind == 0)
+ optind = optreset = 1;
+
+ optarg = NULL;
+ if (optreset)
+ nonopt_start = nonopt_end = -1;
+start:
+ if (optreset || !*place) { /* update scanning pointer */
+ optreset = 0;
+ if (optind >= nargc) { /* end of argument vector */
+ place = EMSG;
+ if (nonopt_end != -1) {
+ /* do permutation, if we have to */
+ permute_args(nonopt_start, nonopt_end,
+ optind, nargv);
+ optind -= nonopt_end - nonopt_start;
+ }
+ else if (nonopt_start != -1) {
+ /*
+ * If we skipped non-options, set optind
+ * to the first of them.
+ */
+ optind = nonopt_start;
+ }
+ nonopt_start = nonopt_end = -1;
+ return (-1);
+ }
+ if (*(place = nargv[optind]) != '-' ||
+ (place[1] == '\0' && strchr(options, '-') == NULL)) {
+ place = EMSG; /* found non-option */
+ if (flags & FLAG_ALLARGS) {
+ /*
+ * GNU extension:
+ * return non-option as argument to option 1
+ */
+ optarg = nargv[optind++];
+ return (INORDER);
+ }
+ if (!(flags & FLAG_PERMUTE)) {
+ /*
+ * If no permutation wanted, stop parsing
+ * at first non-option.
+ */
+ return (-1);
+ }
+ /* do permutation */
+ if (nonopt_start == -1)
+ nonopt_start = optind;
+ else if (nonopt_end != -1) {
+ permute_args(nonopt_start, nonopt_end,
+ optind, nargv);
+ nonopt_start = optind -
+ (nonopt_end - nonopt_start);
+ nonopt_end = -1;
+ }
+ optind++;
+ /* process next argument */
+ goto start;
+ }
+ if (nonopt_start != -1 && nonopt_end == -1)
+ nonopt_end = optind;
+
+ /*
+ * If we have "-" do nothing, if "--" we are done.
+ */
+ if (place[1] != '\0' && *++place == '-' && place[1] == '\0') {
+ optind++;
+ place = EMSG;
+ /*
+ * We found an option (--), so if we skipped
+ * non-options, we have to permute.
+ */
+ if (nonopt_end != -1) {
+ permute_args(nonopt_start, nonopt_end,
+ optind, nargv);
+ optind -= nonopt_end - nonopt_start;
+ }
+ nonopt_start = nonopt_end = -1;
+ return (-1);
+ }
+ }
+
+ /*
+ * Check long options if:
+ * 1) we were passed some
+ * 2) the arg is not just "-"
+ * 3) either the arg starts with -- we are getopt_long_only()
+ */
+ if (long_options != NULL && place != nargv[optind] &&
+ (*place == '-' || (flags & FLAG_LONGONLY))) {
+ short_too = 0;
+ if (*place == '-')
+ place++; /* --foo long option */
+ else if (*place != ':' && strchr(options, *place) != NULL)
+ short_too = 1; /* could be short option too */
+
+ optchar = parse_long_options(nargv, options, long_options,
+ idx, short_too);
+ if (optchar != -1) {
+ place = EMSG;
+ return (optchar);
+ }
+ }
+
+ if ((optchar = (int)*place++) == (int)':' ||
+ (optchar == (int)'-' && *place != '\0') ||
+ (oli = strchr(options, optchar)) == NULL) {
+ /*
+ * If the user specified "-" and '-' isn't listed in
+ * options, return -1 (non-option) as per POSIX.
+ * Otherwise, it is an unknown option character (or ':').
+ */
+ if (optchar == (int)'-' && *place == '\0')
+ return (-1);
+ if (!*place)
+ ++optind;
+ if (PRINT_ERROR)
+ fprintf(stderr, illoptchar, optchar);
+ optopt = optchar;
+ return (BADCH);
+ }
+ if (long_options != NULL && optchar == 'W' && oli[1] == ';') {
+ /* -W long-option */
+ if (*place) /* no space */
+ /* NOTHING */;
+ else if (++optind >= nargc) { /* no arg */
+ place = EMSG;
+ if (PRINT_ERROR)
+ fprintf(stderr, recargchar, optchar);
+ optopt = optchar;
+ return (BADARG);
+ } else /* white space */
+ place = nargv[optind];
+ optchar = parse_long_options(nargv, options, long_options,
+ idx, 0);
+ place = EMSG;
+ return (optchar);
+ }
+ if (*++oli != ':') { /* doesn't take argument */
+ if (!*place)
+ ++optind;
+ } else { /* takes (optional) argument */
+ optarg = NULL;
+ if (*place) /* no white space */
+ optarg = place;
+ else if (oli[1] != ':') { /* arg not optional */
+ if (++optind >= nargc) { /* no arg */
+ place = EMSG;
+ if (PRINT_ERROR)
+ fprintf(stderr, recargchar, optchar);
+ optopt = optchar;
+ return (BADARG);
+ } else
+ optarg = nargv[optind];
+ }
+ place = EMSG;
+ ++optind;
+ }
+ /* dump back option letter */
+ return (optchar);
+}
+
+/*
+ * getopt --
+ * Parse argc/argv argument vector.
+ *
+ * [eventually this will replace the BSD getopt]
+ */
+int
+getopt(int nargc, char * const *nargv, const char *options)
+{
+
+ /*
+ * We don't pass FLAG_PERMUTE to getopt_internal() since
+ * the BSD getopt(3) (unlike GNU) has never done this.
+ *
+ * Furthermore, since many privileged programs call getopt()
+ * before dropping privileges it makes sense to keep things
+ * as simple (and bug-free) as possible.
+ */
+ return (getopt_internal(nargc, nargv, options, NULL, NULL, 0));
+}
+
+/*
+ * getopt_long --
+ * Parse argc/argv argument vector.
+ */
+int
+getopt_long(int nargc, char * const *nargv, const char *options,
+ const struct option *long_options, int *idx)
+{
+
+ return (getopt_internal(nargc, nargv, options, long_options, idx,
+ FLAG_PERMUTE));
+}
+
+/*
+ * getopt_long_only --
+ * Parse argc/argv argument vector.
+ */
+int
+getopt_long_only(int nargc, char * const *nargv, const char *options,
+ const struct option *long_options, int *idx)
+{
+
+ return (getopt_internal(nargc, nargv, options, long_options, idx,
+ FLAG_PERMUTE|FLAG_LONGONLY));
+}
diff --git a/src/glsl/.gitignore b/src/glsl/.gitignore
index 4c212313e45..dfbd572d894 100644
--- a/src/glsl/.gitignore
+++ b/src/glsl/.gitignore
@@ -1,2 +1,7 @@
glsl_compiler
+glsl_lexer.cpp
+glsl_parser.cpp
+glsl_parser.h
glsl_parser.output
+builtin_function.cpp
+builtin_compiler
diff --git a/src/glsl/Android.mk b/src/glsl/Android.mk
index a69943604c8..f7f733b0b67 100644
--- a/src/glsl/Android.mk
+++ b/src/glsl/Android.mk
@@ -1,3 +1,5 @@
+# Android.mk for glsl
+
LOCAL_PATH := $(call my-dir)
# from Makefile
@@ -7,6 +9,8 @@ LIBGLCPP_SOURCES = \
glcpp/pp.c
C_SOURCES = \
+ strtod.c \
+ ralloc.c \
$(LIBGLCPP_SOURCES)
CXX_SOURCES = \
@@ -14,7 +18,6 @@ CXX_SOURCES = \
ast_function.cpp \
ast_to_hir.cpp \
ast_type.cpp \
- builtin_function.cpp \
glsl_lexer.cpp \
glsl_parser.cpp \
glsl_parser_extras.cpp \
@@ -59,6 +62,7 @@ CXX_SOURCES = \
opt_constant_propagation.cpp \
opt_constant_variable.cpp \
opt_copy_propagation.cpp \
+ opt_copy_propagation_elements.cpp \
opt_dead_code.cpp \
opt_dead_code_local.cpp \
opt_dead_functions.cpp \
@@ -76,7 +80,8 @@ include $(CLEAR_VARS)
LOCAL_SRC_FILES := \
$(C_SOURCES) \
- $(CXX_SOURCES)
+ $(CXX_SOURCES) \
+ builtin_function.cpp
LOCAL_CFLAGS := \
-DPTHREADS \
@@ -88,7 +93,6 @@ LOCAL_CFLAGS := \
LOCAL_C_INCLUDES := \
external/mesa/include \
external/mesa/src/mapi \
- external/mesa/src/talloc \
external/mesa/src/mesa
LOCAL_MODULE := libmesa_glsl
diff --git a/src/glsl/Makefile b/src/glsl/Makefile
index 2674c6ec485..cd7c41a2abc 100644
--- a/src/glsl/Makefile
+++ b/src/glsl/Makefile
@@ -1,3 +1,4 @@
+
#src/glsl/pp/Makefile
TOP = ../..
@@ -13,9 +14,12 @@ LIBGLCPP_SOURCES = \
GLCPP_SOURCES = \
$(LIBGLCPP_SOURCES) \
+ ralloc.c \
glcpp/glcpp.c
C_SOURCES = \
+ strtod.c \
+ ralloc.c \
$(LIBGLCPP_SOURCES)
CXX_SOURCES = \
@@ -23,7 +27,6 @@ CXX_SOURCES = \
ast_function.cpp \
ast_to_hir.cpp \
ast_type.cpp \
- builtin_function.cpp \
glsl_lexer.cpp \
glsl_parser.cpp \
glsl_parser_extras.cpp \
@@ -68,6 +71,7 @@ CXX_SOURCES = \
opt_constant_propagation.cpp \
opt_constant_variable.cpp \
opt_copy_propagation.cpp \
+ opt_copy_propagation_elements.cpp \
opt_dead_code.cpp \
opt_dead_code_local.cpp \
opt_dead_functions.cpp \
@@ -82,8 +86,7 @@ CXX_SOURCES = \
s_expression.cpp
LIBS = \
- $(TOP)/src/glsl/libglsl.a \
- $(TALLOC_LIBS)
+ $(TOP)/src/glsl/libglsl.a
APPS = glsl_compiler glcpp/glcpp
@@ -111,8 +114,10 @@ OBJECTS = \
$(C_SOURCES:.c=.o) \
$(CXX_SOURCES:.cpp=.o)
+DRICORE_OBJ_DIR = obj-visible
+OBJECTS_DRICORE = $(addprefix $(DRICORE_OBJ_DIR)/,$(OBJECTS))
+
INCLUDES = \
- $(TALLOC_CFLAGS) \
-I. \
-I../mesa \
-I../mapi \
@@ -127,10 +132,16 @@ ALL_SOURCES = \
##### TARGETS #####
-default: depend lib$(LIBNAME).a $(APPS)
+default: depend lib$(LIBNAME).a $(APPS) $(DRICORE_GLSL_LIBS)
-lib$(LIBNAME).a: $(OBJECTS) Makefile $(TOP)/src/glsl/Makefile.template
- $(MKLIB) -cplusplus -o $(LIBNAME) -static $(OBJECTS)
+$(TOP)/$(LIB_DIR)/libglsl.so: $(OBJECTS_DRICORE) builtin_function.o Makefile $(TOP)/src/glsl/Makefile.template
+ $(MKLIB) -o $@ -linker '$(CXX)' -ldflags '$(LDFLAGS)' \
+ -cplusplus -noprefix \
+ -install $(TOP)/$(LIB_DIR) -id $(INSTALL_LIB_DIR)/$@.dylib \
+ $(OBJECTS_DRICORE) builtin_function.o
+
+lib$(LIBNAME).a: $(OBJECTS) builtin_function.o Makefile $(TOP)/src/glsl/Makefile.template
+ $(MKLIB) -cplusplus -o $(LIBNAME) -static $(OBJECTS) builtin_function.o
depend: $(ALL_SOURCES) Makefile
rm -f depend
@@ -138,22 +149,33 @@ depend: $(ALL_SOURCES) Makefile
$(MKDEP) $(MKDEP_OPTIONS) $(INCLUDES) $(ALL_SOURCES) 2> /dev/null
# Remove .o and backup files
-clean:
- rm -f $(GLCPP_OBJECTS) $(GLSL2_OBJECTS) $(OBJECTS) lib$(LIBNAME).a depend depend.bak
+clean: clean-dricore
+ rm -f $(GLCPP_OBJECTS) $(GLSL2_OBJECTS) $(OBJECTS) lib$(LIBNAME).a depend depend.bak builtin_function.cpp builtin_function.o builtin_stubs.o builtin_compiler
-rm -f $(APPS)
+clean-dricore:
+ -rm -f $(DRICORE_OBJ_DIR) $(TOP)/$(LIB_DIR)/libglsl.so libglsl.so
+
+ifneq (,$(DRICORE_GLSL_LIBS))
+DRICORE_INSTALL_TARGET = install-dricore
+endif
+
# Dummy target
-install:
+install: $(DRICORE_INSTALL_TARGET)
@echo -n ""
+install-dricore: default
+ $(INSTALL) -d $(DESTDIR)$(DRI_DRIVER_INSTALL_DIR)
+ $(INSTALL) -m 755 $(DRICORE_GLSL_LIBS) $(DESTDIR)$(DRI_DRIVER_INSTALL_DIR)
##### RULES #####
-glsl_compiler: $(GLSL2_OBJECTS) libglsl.a
- $(APP_CXX) $(INCLUDES) $(CFLAGS) $(LDFLAGS) $(GLSL2_OBJECTS) $(LIBS) -o $@
+glsl_compiler: $(GLSL2_OBJECTS) libglsl.a builtin_stubs.o
+ $(APP_CXX) $(INCLUDES) $(CFLAGS) $(LDFLAGS) $(GLSL2_OBJECTS) builtin_stubs.o $(LIBS) -o $@
-glcpp/glcpp: $(GLCPP_OBJECTS) libglsl.a
- $(APP_CC) $(INCLUDES) $(CFLAGS) $(LDFLAGS) $(GLCPP_OBJECTS) $(LIBS) -o $@
+glcpp: glcpp/glcpp
+glcpp/glcpp: $(GLCPP_OBJECTS)
+ $(APP_CC) $(INCLUDES) $(CFLAGS) $(LDFLAGS) $(GLCPP_OBJECTS) -o $@
.cpp.o:
$(CXX) -c $(INCLUDES) $(CXXFLAGS) $(DEFINES) $< -o $@
@@ -161,10 +183,18 @@ glcpp/glcpp: $(GLCPP_OBJECTS) libglsl.a
.c.o:
$(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
-glsl_lexer.cpp: glsl_lexer.lpp
+$(DRICORE_OBJ_DIR)/%.o : %.cpp
+ @mkdir -p $(dir $@)
+ $(CXX) -c $(INCLUDES) $(DRI_CXXFLAGS) $(DEFINES) $< -o $@
+
+$(DRICORE_OBJ_DIR)/%.o : %.c
+ @mkdir -p $(dir $@)
+ $(CC) -c $(INCLUDES) $(DRI_CFLAGS) $(DEFINES) $< -o $@
+
+glsl_lexer.cpp: glsl_lexer.ll
flex --nounistd -o$@ $<
-glsl_parser.cpp: glsl_parser.ypp
+glsl_parser.cpp: glsl_parser.yy
bison -v -o "$@" -p "_mesa_glsl_" --defines=glsl_parser.h $<
glcpp/glcpp-lex.c: glcpp/glcpp-lex.l
@@ -173,13 +203,11 @@ glcpp/glcpp-lex.c: glcpp/glcpp-lex.l
glcpp/glcpp-parse.c: glcpp/glcpp-parse.y
bison -v -o "$@" --defines=glcpp/glcpp-parse.h $<
-builtins: builtin_function.cpp builtins/profiles/* builtins/ir/* builtins/tools/generate_builtins.py builtins/tools/texture_builtins.py
- @echo Bootstrapping the compiler...
- cp builtins/tools/builtin_function.cpp .
- make glsl_compiler
+builtin_compiler: $(GLSL2_OBJECTS) $(OBJECTS) builtin_stubs.o
+ $(APP_CXX) $(INCLUDES) $(CFLAGS) $(LDFLAGS) $(OBJECTS) $(GLSL2_OBJECTS) builtin_stubs.o -o $@
+
+builtin_function.cpp: builtins/profiles/* builtins/ir/* builtins/tools/generate_builtins.py builtins/tools/texture_builtins.py builtin_compiler
@echo Regenerating builtin_function.cpp...
- $(PYTHON2) $(PYTHON_FLAGS) builtins/tools/generate_builtins.py > builtin_function.cpp
- @echo Rebuilding the real compiler...
- make glsl_compiler
+ $(PYTHON2) $(PYTHON_FLAGS) builtins/tools/generate_builtins.py ./builtin_compiler > builtin_function.cpp || rm -f builtin_function.cpp
-include depend
diff --git a/src/glsl/SConscript b/src/glsl/SConscript
index b5b1728beef..c3255835fb4 100644
--- a/src/glsl/SConscript
+++ b/src/glsl/SConscript
@@ -2,27 +2,44 @@ import common
Import('*')
+from sys import executable as python_cmd
+
env = env.Clone()
env.Prepend(CPPPATH = [
+ '#include',
'#src/mapi',
'#src/mesa',
+ '#src/glsl',
+ '#src/glsl/glcpp',
])
-if env['platform'] == 'windows':
- env.Prepend(CPPPATH = ['#src/talloc'])
+# Make glcpp/glcpp-parse.h and glsl_parser.h reacheable from the include path
+env.Append(CPPPATH = [Dir('.').abspath])
+
+env.Append(YACCFLAGS = '-d')
+
+parser_env = env.Clone()
+parser_env.Append(YACCFLAGS = [
+ '--defines=%s' % File('glsl_parser.h').abspath,
+ '-p', '_mesa_glsl_',
+])
-sources = [
- 'glcpp/glcpp-lex.c',
- 'glcpp/glcpp-parse.c',
+glcpp_lexer = env.CFile('glcpp/glcpp-lex.c', 'glcpp/glcpp-lex.l')
+glcpp_parser = env.CFile('glcpp/glcpp-parse.c', 'glcpp/glcpp-parse.y')
+glsl_lexer = parser_env.CXXFile('glsl_lexer.cpp', 'glsl_lexer.ll')
+glsl_parser = parser_env.CXXFile('glsl_parser.cpp', 'glsl_parser.yy')
+
+glsl_sources = [
+ glcpp_lexer,
+ glcpp_parser[0],
'glcpp/pp.c',
'ast_expr.cpp',
'ast_function.cpp',
'ast_to_hir.cpp',
'ast_type.cpp',
- 'builtin_function.cpp',
- 'glsl_lexer.cpp',
- 'glsl_parser.cpp',
+ glsl_lexer,
+ glsl_parser[0],
'glsl_parser_extras.cpp',
'glsl_types.cpp',
'glsl_symbol_table.cpp',
@@ -64,6 +81,7 @@ sources = [
'opt_constant_propagation.cpp',
'opt_constant_variable.cpp',
'opt_copy_propagation.cpp',
+ 'opt_copy_propagation_elements.cpp',
'opt_dead_code.cpp',
'opt_dead_code_local.cpp',
'opt_dead_functions.cpp',
@@ -75,18 +93,71 @@ sources = [
'opt_structure_splitting.cpp',
'opt_swizzle_swizzle.cpp',
'opt_tree_grafting.cpp',
+ 'ralloc.c',
's_expression.cpp',
-]
+ 'strtod.c',
+]
+
+if env['msvc']:
+ env.Prepend(CPPPATH = ['#/src/getopt'])
+ env.PrependUnique(LIBS = [getopt])
+
+if env['crosscompile'] and env['platform'] != 'embedded':
+ Import('builtin_glsl_function')
+else:
+ # Copy these files to avoid generation object files into src/mesa/program
+ env.Prepend(CPPPATH = ['#src/mesa/program'])
+ env.Command('hash_table.c', '#src/mesa/program/hash_table.c', Copy('$TARGET', '$SOURCE'))
+ env.Command('symbol_table.c', '#src/mesa/program/symbol_table.c', Copy('$TARGET', '$SOURCE'))
+
+ main_obj = env.StaticObject('main.cpp')
+
+ mesa_objs = env.StaticObject([
+ 'hash_table.c',
+ 'symbol_table.c',
+ ])
+
+ builtin_compiler = env.Program(
+ target = 'builtin_compiler',
+ source = main_obj + glsl_sources + ['builtin_stubs.cpp'] + mesa_objs,
+ )
+
+ # SCons builtin dependency scanner doesn't detect that glsl_lexer.ll
+ # depends on glsl_parser.h
+ env.Depends(builtin_compiler, glsl_parser)
+
+ builtin_glsl_function = env.CodeGenerate(
+ target = 'builtin_function.cpp',
+ script = 'builtins/tools/generate_builtins.py',
+ source = builtin_compiler,
+ command = python_cmd + ' $SCRIPT $SOURCE > $TARGET'
+ )
+
+ env.Depends(builtin_glsl_function, ['builtins/tools/generate_builtins.py', 'builtins/tools/texture_builtins.py'] + Glob('builtins/ir/*'))
+
+ Export('builtin_glsl_function')
+
+ if env['hostonly']:
+ Return()
+
+
+glsl_sources += builtin_glsl_function
glsl = env.ConvenienceLibrary(
target = 'glsl',
- source = sources,
+ source = glsl_sources,
)
+# SCons builtin dependency scanner doesn't detect that glsl_lexer.ll depends on
+# glsl_parser.h
+env.Depends(glsl, glsl_parser)
+
Export('glsl')
-# FIXME: We can't build the programs because there's a cyclic dependency between tis directory and src/mesa
-Return()
+# Skip building these programs as they will cause SCons error "Two environments
+# with different actions were specified for the same target"
+if env['crosscompile'] or env['platform'] == 'embedded':
+ Return()
env = env.Clone()
@@ -95,16 +166,16 @@ if env['platform'] == 'windows':
'user32',
])
-env.Prepend(LIBS = [glsl, talloc])
+env.Prepend(LIBS = [glsl])
-env.Program(
+glsl2 = env.Program(
target = 'glsl2',
- source = [
- 'main.cpp',
- ]
+ source = main_obj + mesa_objs,
)
+env.Alias('glsl2', glsl2)
-env.Program(
- target = 'glcpp',
- source = ['glcpp/glcpp.c'],
+glcpp = env.Program(
+ target = 'glcpp/glcpp',
+ source = ['glcpp/glcpp.c'] + mesa_objs,
)
+env.Alias('glcpp', glcpp)
diff --git a/src/glsl/ast.h b/src/glsl/ast.h
index 1420f234b6c..878f48b2070 100644
--- a/src/glsl/ast.h
+++ b/src/glsl/ast.h
@@ -49,23 +49,23 @@ struct YYLTYPE;
*/
class ast_node {
public:
- /* Callers of this talloc-based new need not call delete. It's
- * easier to just talloc_free 'ctx' (or any of its ancestors). */
+ /* Callers of this ralloc-based new need not call delete. It's
+ * easier to just ralloc_free 'ctx' (or any of its ancestors). */
static void* operator new(size_t size, void *ctx)
{
void *node;
- node = talloc_zero_size(ctx, size);
+ node = rzalloc_size(ctx, size);
assert(node != NULL);
return node;
}
/* If the user *does* call delete, that's OK, we will just
- * talloc_free in that case. */
+ * ralloc_free in that case. */
static void operator delete(void *table)
{
- talloc_free(table);
+ ralloc_free(table);
}
/**
@@ -129,7 +129,6 @@ protected:
* be created.
*/
ast_node(void);
- virtual ~ast_node() {}
};
@@ -319,7 +318,8 @@ public:
enum {
- ast_precision_high = 0, /**< Default precision. */
+ ast_precision_none = 0, /**< Absence of precision qualifier. */
+ ast_precision_high,
ast_precision_medium,
ast_precision_low
};
@@ -350,7 +350,19 @@ struct ast_type_qualifier {
* qualifier is used.
*/
unsigned explicit_location:1;
- } q;
+
+ /** \name Layout qualifiers for GL_AMD_conservative_depth */
+ /** \{ */
+ unsigned depth_any:1;
+ unsigned depth_greater:1;
+ unsigned depth_less:1;
+ unsigned depth_unchanged:1;
+ /** \} */
+ }
+ /** \brief Set of flags, accessed by name. */
+ q;
+
+ /** \brief Set of flags, accessed as a bitmask. */
unsigned i;
} flags;
@@ -361,6 +373,23 @@ struct ast_type_qualifier {
* This field is only valid if \c explicit_location is set.
*/
unsigned location;
+
+ /**
+ * Return true if and only if an interpolation qualifier is present.
+ */
+ bool has_interpolation() const;
+
+ /**
+ * \brief Return string representation of interpolation qualifier.
+ *
+ * If an interpolation qualifier is present, then return that qualifier's
+ * string representation. Otherwise, return null. For example, if the
+ * noperspective bit is set, then this returns "noperspective".
+ *
+ * If multiple interpolation qualifiers are somehow present, then the
+ * returned string is undefined but not null.
+ */
+ const char *interpolation_string() const;
};
class ast_struct_specifier : public ast_node {
@@ -441,7 +470,8 @@ public:
/** Construct a type specifier from a type name */
ast_type_specifier(const char *name)
: type_specifier(ast_type_name), type_name(name), structure(NULL),
- is_array(false), array_size(NULL), precision(ast_precision_high)
+ is_array(false), array_size(NULL), precision(ast_precision_none),
+ is_precision_statement(false)
{
/* empty */
}
@@ -449,7 +479,8 @@ public:
/** Construct a type specifier from a structure definition */
ast_type_specifier(ast_struct_specifier *s)
: type_specifier(ast_struct), type_name(s->name), structure(s),
- is_array(false), array_size(NULL), precision(ast_precision_high)
+ is_array(false), array_size(NULL), precision(ast_precision_none),
+ is_precision_statement(false)
{
/* empty */
}
@@ -471,6 +502,8 @@ public:
ast_expression *array_size;
unsigned precision:2;
+
+ bool is_precision_statement;
};
@@ -581,25 +614,6 @@ private:
};
-class ast_declaration_statement : public ast_node {
-public:
- ast_declaration_statement(void);
-
- enum {
- ast_function,
- ast_declaration,
- ast_precision
- } mode;
-
- union {
- class ast_function *function;
- ast_declarator_list *declarator;
- ast_type_specifier *type;
- ast_node *node;
- } declaration;
-};
-
-
class ast_expression_statement : public ast_node {
public:
ast_expression_statement(ast_expression *);
diff --git a/src/glsl/ast_expr.cpp b/src/glsl/ast_expr.cpp
index 4e83decb924..e624d11cf3b 100644
--- a/src/glsl/ast_expr.cpp
+++ b/src/glsl/ast_expr.cpp
@@ -20,8 +20,7 @@
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*/
-#include <cstdio>
-#include <cassert>
+#include <assert.h>
#include "ast.h"
const char *
diff --git a/src/glsl/ast_function.cpp b/src/glsl/ast_function.cpp
index 6ecf779c935..e5cb8733952 100644
--- a/src/glsl/ast_function.cpp
+++ b/src/glsl/ast_function.cpp
@@ -66,7 +66,7 @@ process_parameters(exec_list *instructions, exec_list *actual_parameters,
* formal or actual parameter list. Only the type is used.
*
* \return
- * A talloced string representing the prototype of the function.
+ * A ralloced string representing the prototype of the function.
*/
char *
prototype_string(const glsl_type *return_type, const char *name,
@@ -75,19 +75,19 @@ prototype_string(const glsl_type *return_type, const char *name,
char *str = NULL;
if (return_type != NULL)
- str = talloc_asprintf(str, "%s ", return_type->name);
+ str = ralloc_asprintf(NULL, "%s ", return_type->name);
- str = talloc_asprintf_append(str, "%s(", name);
+ ralloc_asprintf_append(&str, "%s(", name);
const char *comma = "";
foreach_list(node, parameters) {
const ir_instruction *const param = (ir_instruction *) node;
- str = talloc_asprintf_append(str, "%s%s", comma, param->type->name);
+ ralloc_asprintf_append(&str, "%s%s", comma, param->type->name);
comma = ", ";
}
- str = talloc_strdup_append(str, ")");
+ ralloc_strcat(&str, ")");
return str;
}
@@ -132,6 +132,9 @@ match_function_by_name(exec_list *instructions, const char *name,
/* Verify that 'out' and 'inout' actual parameters are lvalues. This
* isn't done in ir_function::matching_signature because that function
* cannot generate the necessary diagnostics.
+ *
+ * Also, validate that 'const_in' formal parameters (an extension of our
+ * IR) correspond to ir_constant actual parameters.
*/
exec_list_iterator actual_iter = actual_parameters->iterator();
exec_list_iterator formal_iter = sig->parameters.iterator();
@@ -143,14 +146,35 @@ match_function_by_name(exec_list *instructions, const char *name,
assert(actual != NULL);
assert(formal != NULL);
+ if (formal->mode == ir_var_const_in && !actual->as_constant()) {
+ _mesa_glsl_error(loc, state,
+ "parameter `%s' must be a constant expression",
+ formal->name);
+ }
+
if ((formal->mode == ir_var_out)
|| (formal->mode == ir_var_inout)) {
- if (! actual->is_lvalue()) {
- /* FINISHME: Log a better diagnostic here. There is no way
- * FINISHME: to tell the user which parameter is invalid.
- */
- _mesa_glsl_error(loc, state, "`%s' parameter is not lvalue",
- (formal->mode == ir_var_out) ? "out" : "inout");
+ const char *mode = NULL;
+ switch (formal->mode) {
+ case ir_var_out: mode = "out"; break;
+ case ir_var_inout: mode = "inout"; break;
+ default: assert(false); break;
+ }
+ /* FIXME: 'loc' is incorrect (as of 2011-01-21). It is always
+ * FIXME: 0:0(0).
+ */
+ if (actual->variable_referenced()
+ && actual->variable_referenced()->read_only) {
+ _mesa_glsl_error(loc, state,
+ "function parameter '%s %s' references the "
+ "read-only variable '%s'",
+ mode, formal->name,
+ actual->variable_referenced()->name);
+
+ } else if (!actual->is_lvalue()) {
+ _mesa_glsl_error(loc, state,
+ "function parameter '%s %s' is not an lvalue",
+ mode, formal->name);
}
}
@@ -173,7 +197,7 @@ match_function_by_name(exec_list *instructions, const char *name,
ir_dereference_variable *deref;
var = new(ctx) ir_variable(sig->return_type,
- talloc_asprintf(ctx, "%s_retval",
+ ralloc_asprintf(ctx, "%s_retval",
sig->function_name()),
ir_var_temporary);
instructions->push_tail(var);
@@ -195,11 +219,11 @@ match_function_by_name(exec_list *instructions, const char *name,
_mesa_glsl_error(loc, state, "no matching function for call to `%s'",
str);
- talloc_free(str);
+ ralloc_free(str);
const char *prefix = "candidates are: ";
- for (int i = -1; i < state->num_builtins_to_link; i++) {
+ for (int i = -1; i < (int) state->num_builtins_to_link; i++) {
glsl_symbol_table *syms = i >= 0 ? state->builtins_to_link[i]->symbols
: state->symbols;
f = syms->get_function(name);
@@ -211,7 +235,7 @@ match_function_by_name(exec_list *instructions, const char *name,
str = prototype_string(sig->return_type, f->name, &sig->parameters);
_mesa_glsl_error(loc, state, "%s%s\n", prefix, str);
- talloc_free(str);
+ ralloc_free(str);
prefix = " ";
}
@@ -232,7 +256,7 @@ match_function_by_name(exec_list *instructions, const char *name,
static ir_rvalue *
convert_component(ir_rvalue *src, const glsl_type *desired_type)
{
- void *ctx = talloc_parent(src);
+ void *ctx = ralloc_parent(src);
const unsigned a = desired_type->base_type;
const unsigned b = src->type->base_type;
ir_expression *result = NULL;
@@ -295,7 +319,7 @@ convert_component(ir_rvalue *src, const glsl_type *desired_type)
static ir_rvalue *
dereference_component(ir_rvalue *src, unsigned component)
{
- void *ctx = talloc_parent(src);
+ void *ctx = ralloc_parent(src);
assert(component < src->type->components());
/* If the source is a constant, just create a new constant instead of a
@@ -993,6 +1017,16 @@ ast_function_expression::hir(exec_list *instructions,
const glsl_type *const constructor_type = type->glsl_type(& name, state);
+ /* constructor_type can be NULL if a variable with the same name as the
+ * structure has come into scope.
+ */
+ if (constructor_type == NULL) {
+ _mesa_glsl_error(& loc, state, "unknown type `%s' (structure name "
+ "may be shadowed by a variable with the same name)",
+ type->type_name);
+ return ir_call::get_error_instruction(ctx);
+ }
+
/* Constructors for samplers are illegal.
*/
@@ -1022,6 +1056,57 @@ ast_function_expression::hir(exec_list *instructions,
* correct order. These constructors follow essentially the same type
* matching rules as functions.
*/
+ if (constructor_type->is_record()) {
+ exec_list actual_parameters;
+
+ process_parameters(instructions, &actual_parameters,
+ &this->expressions, state);
+
+ exec_node *node = actual_parameters.head;
+ for (unsigned i = 0; i < constructor_type->length; i++) {
+ ir_rvalue *ir = (ir_rvalue *) node;
+
+ if (node->is_tail_sentinel()) {
+ _mesa_glsl_error(&loc, state,
+ "insufficient parameters to constructor "
+ "for `%s'",
+ constructor_type->name);
+ return ir_call::get_error_instruction(ctx);
+ }
+
+ if (apply_implicit_conversion(constructor_type->fields.structure[i].type,
+ ir, state)) {
+ node->replace_with(ir);
+ } else {
+ _mesa_glsl_error(&loc, state,
+ "parameter type mismatch in constructor "
+ "for `%s.%s' (%s vs %s)",
+ constructor_type->name,
+ constructor_type->fields.structure[i].name,
+ ir->type->name,
+ constructor_type->fields.structure[i].type->name);
+ return ir_call::get_error_instruction(ctx);;
+ }
+
+ node = node->next;
+ }
+
+ if (!node->is_tail_sentinel()) {
+ _mesa_glsl_error(&loc, state, "too many parameters in constructor "
+ "for `%s'", constructor_type->name);
+ return ir_call::get_error_instruction(ctx);
+ }
+
+ ir_rvalue *const constant =
+ constant_record_constructor(constructor_type, &actual_parameters,
+ state);
+
+ return (constant != NULL)
+ ? constant
+ : emit_inline_record_constructor(constructor_type, instructions,
+ &actual_parameters, state);
+ }
+
if (!constructor_type->is_numeric() && !constructor_type->is_boolean())
return ir_call::get_error_instruction(ctx);
@@ -1197,54 +1282,6 @@ ast_function_expression::hir(exec_list *instructions,
process_parameters(instructions, &actual_parameters, &this->expressions,
state);
- const glsl_type *const type =
- state->symbols->get_type(id->primary_expression.identifier);
-
- if ((type != NULL) && type->is_record()) {
- exec_node *node = actual_parameters.head;
- for (unsigned i = 0; i < type->length; i++) {
- ir_rvalue *ir = (ir_rvalue *) node;
-
- if (node->is_tail_sentinel()) {
- _mesa_glsl_error(&loc, state,
- "insufficient parameters to constructor "
- "for `%s'",
- type->name);
- return ir_call::get_error_instruction(ctx);
- }
-
- if (apply_implicit_conversion(type->fields.structure[i].type, ir,
- state)) {
- node->replace_with(ir);
- } else {
- _mesa_glsl_error(&loc, state,
- "parameter type mismatch in constructor "
- "for `%s.%s' (%s vs %s)",
- type->name,
- type->fields.structure[i].name,
- ir->type->name,
- type->fields.structure[i].type->name);
- return ir_call::get_error_instruction(ctx);;
- }
-
- node = node->next;
- }
-
- if (!node->is_tail_sentinel()) {
- _mesa_glsl_error(&loc, state, "too many parameters in constructor "
- "for `%s'", type->name);
- return ir_call::get_error_instruction(ctx);
- }
-
- ir_rvalue *const constant =
- constant_record_constructor(type, &actual_parameters, state);
-
- return (constant != NULL)
- ? constant
- : emit_inline_record_constructor(type, instructions,
- &actual_parameters, state);
- }
-
return match_function_by_name(instructions,
id->primary_expression.identifier, & loc,
&actual_parameters, state);
diff --git a/src/glsl/ast_to_hir.cpp b/src/glsl/ast_to_hir.cpp
index 1f4972cfca2..cdb16fd492b 100644
--- a/src/glsl/ast_to_hir.cpp
+++ b/src/glsl/ast_to_hir.cpp
@@ -60,7 +60,7 @@ void
_mesa_ast_to_hir(exec_list *instructions, struct _mesa_glsl_parse_state *state)
{
_mesa_glsl_initialize_variables(instructions, state);
- _mesa_glsl_initialize_functions(instructions, state);
+ _mesa_glsl_initialize_functions(state);
state->symbols->language_version = state->language_version;
@@ -435,6 +435,13 @@ modulus_result_type(const struct glsl_type *type_a,
const struct glsl_type *type_b,
struct _mesa_glsl_parse_state *state, YYLTYPE *loc)
{
+ if (state->language_version < 130) {
+ _mesa_glsl_error(loc, state,
+ "operator '%%' is reserved in %s",
+ state->version_string);
+ return glsl_type::error_type;
+ }
+
/* From GLSL 1.50 spec, page 56:
* "The operator modulus (%) operates on signed or unsigned integers or
* integer vectors. The operand types must both be signed or both be
@@ -596,28 +603,28 @@ shift_result_type(const struct glsl_type *type_a,
*/
ir_rvalue *
validate_assignment(struct _mesa_glsl_parse_state *state,
- const glsl_type *lhs_type, ir_rvalue *rhs)
+ const glsl_type *lhs_type, ir_rvalue *rhs,
+ bool is_initializer)
{
- const glsl_type *rhs_type = rhs->type;
-
/* If there is already some error in the RHS, just return it. Anything
* else will lead to an avalanche of error message back to the user.
*/
- if (rhs_type->is_error())
+ if (rhs->type->is_error())
return rhs;
/* If the types are identical, the assignment can trivially proceed.
*/
- if (rhs_type == lhs_type)
+ if (rhs->type == lhs_type)
return rhs;
/* If the array element types are the same and the size of the LHS is zero,
- * the assignment is okay.
+ * the assignment is okay for initializers embedded in variable
+ * declarations.
*
* Note: Whole-array assignments are not permitted in GLSL 1.10, but this
* is handled by ir_dereference::is_lvalue.
*/
- if (lhs_type->is_array() && rhs->type->is_array()
+ if (is_initializer && lhs_type->is_array() && rhs->type->is_array()
&& (lhs_type->element_type() == rhs->type->element_type())
&& (lhs_type->array_size() == 0)) {
return rhs;
@@ -625,8 +632,7 @@ validate_assignment(struct _mesa_glsl_parse_state *state,
/* Check for implicit conversion in GLSL 1.20 */
if (apply_implicit_conversion(lhs_type, rhs, state)) {
- rhs_type = rhs->type;
- if (rhs_type == lhs_type)
+ if (rhs->type == lhs_type)
return rhs;
}
@@ -635,14 +641,21 @@ validate_assignment(struct _mesa_glsl_parse_state *state,
ir_rvalue *
do_assignment(exec_list *instructions, struct _mesa_glsl_parse_state *state,
- ir_rvalue *lhs, ir_rvalue *rhs,
+ ir_rvalue *lhs, ir_rvalue *rhs, bool is_initializer,
YYLTYPE lhs_loc)
{
void *ctx = state;
bool error_emitted = (lhs->type->is_error() || rhs->type->is_error());
if (!error_emitted) {
- if (!lhs->is_lvalue()) {
+ if (lhs->variable_referenced() != NULL
+ && lhs->variable_referenced()->read_only) {
+ _mesa_glsl_error(&lhs_loc, state,
+ "assignment to read-only variable '%s'",
+ lhs->variable_referenced()->name);
+ error_emitted = true;
+
+ } else if (!lhs->is_lvalue()) {
_mesa_glsl_error(& lhs_loc, state, "non-lvalue in assignment");
error_emitted = true;
}
@@ -654,7 +667,8 @@ do_assignment(exec_list *instructions, struct _mesa_glsl_parse_state *state,
}
}
- ir_rvalue *new_rhs = validate_assignment(state, lhs->type, rhs);
+ ir_rvalue *new_rhs =
+ validate_assignment(state, lhs->type, rhs, is_initializer);
if (new_rhs == NULL) {
_mesa_glsl_error(& lhs_loc, state, "type mismatch");
} else {
@@ -715,7 +729,7 @@ do_assignment(exec_list *instructions, struct _mesa_glsl_parse_state *state,
static ir_rvalue *
get_lvalue_copy(exec_list *instructions, ir_rvalue *lvalue)
{
- void *ctx = talloc_parent(lvalue);
+ void *ctx = ralloc_parent(lvalue);
ir_variable *var;
var = new(ctx) ir_variable(lvalue->type, "_post_incdec_tmp",
@@ -907,7 +921,7 @@ ast_expression::hir(exec_list *instructions,
op[0] = this->subexpressions[0]->hir(instructions, state);
op[1] = this->subexpressions[1]->hir(instructions, state);
- result = do_assignment(instructions, state, op[0], op[1],
+ result = do_assignment(instructions, state, op[0], op[1], false,
this->subexpressions[0]->get_location());
error_emitted = result->type->is_error();
type = result->type;
@@ -1234,7 +1248,7 @@ ast_expression::hir(exec_list *instructions,
op[0], op[1]);
result = do_assignment(instructions, state,
- op[0]->clone(ctx, NULL), temp_rhs,
+ op[0]->clone(ctx, NULL), temp_rhs, false,
this->subexpressions[0]->get_location());
type = result->type;
error_emitted = (op[0]->type->is_error());
@@ -1260,7 +1274,7 @@ ast_expression::hir(exec_list *instructions,
op[0], op[1]);
result = do_assignment(instructions, state,
- op[0]->clone(ctx, NULL), temp_rhs,
+ op[0]->clone(ctx, NULL), temp_rhs, false,
this->subexpressions[0]->get_location());
type = result->type;
error_emitted = type->is_error();
@@ -1276,7 +1290,7 @@ ast_expression::hir(exec_list *instructions,
ir_rvalue *temp_rhs = new(ctx) ir_expression(operations[this->oper],
type, op[0], op[1]);
result = do_assignment(instructions, state, op[0]->clone(ctx, NULL),
- temp_rhs,
+ temp_rhs, false,
this->subexpressions[0]->get_location());
error_emitted = op[0]->type->is_error() || op[1]->type->is_error();
break;
@@ -1292,7 +1306,7 @@ ast_expression::hir(exec_list *instructions,
ir_rvalue *temp_rhs = new(ctx) ir_expression(operations[this->oper],
type, op[0], op[1]);
result = do_assignment(instructions, state, op[0]->clone(ctx, NULL),
- temp_rhs,
+ temp_rhs, false,
this->subexpressions[0]->get_location());
error_emitted = op[0]->type->is_error() || op[1]->type->is_error();
break;
@@ -1408,7 +1422,7 @@ ast_expression::hir(exec_list *instructions,
op[0], op[1]);
result = do_assignment(instructions, state,
- op[0]->clone(ctx, NULL), temp_rhs,
+ op[0]->clone(ctx, NULL), temp_rhs, false,
this->subexpressions[0]->get_location());
type = result->type;
error_emitted = op[0]->type->is_error();
@@ -1437,7 +1451,7 @@ ast_expression::hir(exec_list *instructions,
result = get_lvalue_copy(instructions, op[0]->clone(ctx, NULL));
(void)do_assignment(instructions, state,
- op[0]->clone(ctx, NULL), temp_rhs,
+ op[0]->clone(ctx, NULL), temp_rhs, false,
this->subexpressions[0]->get_location());
type = result->type;
@@ -1567,18 +1581,38 @@ ast_expression::hir(exec_list *instructions,
}
}
- /* From section 4.1.7 of the GLSL 1.30 spec:
+ /* From page 23 (29 of the PDF) of the GLSL 1.30 spec:
+ *
* "Samplers aggregated into arrays within a shader (using square
* brackets [ ]) can only be indexed with integral constant
* expressions [...]."
+ *
+ * This restriction was added in GLSL 1.30. Shaders using earlier version
+ * of the language should not be rejected by the compiler front-end for
+ * using this construct. This allows useful things such as using a loop
+ * counter as the index to an array of samplers. If the loop in unrolled,
+ * the code should compile correctly. Instead, emit a warning.
*/
if (array->type->is_array() &&
array->type->element_type()->is_sampler() &&
const_index == NULL) {
- _mesa_glsl_error(&loc, state, "sampler arrays can only be indexed "
- "with constant expressions");
- error_emitted = true;
+ if (state->language_version == 100) {
+ _mesa_glsl_warning(&loc, state,
+ "sampler arrays indexed with non-constant "
+ "expressions is optional in GLSL ES 1.00");
+ } else if (state->language_version < 130) {
+ _mesa_glsl_warning(&loc, state,
+ "sampler arrays indexed with non-constant "
+ "expressions is forbidden in GLSL 1.30 and "
+ "later");
+ } else {
+ _mesa_glsl_error(&loc, state,
+ "sampler arrays indexed with non-constant "
+ "expressions is forbidden in GLSL 1.30 and "
+ "later");
+ error_emitted = true;
+ }
}
if (error_emitted)
@@ -1606,6 +1640,7 @@ ast_expression::hir(exec_list *instructions,
result = new(ctx) ir_dereference_variable(var);
if (var != NULL) {
+ var->used = true;
type = result->type;
} else {
_mesa_glsl_error(& loc, state, "`%s' undeclared",
@@ -1780,10 +1815,17 @@ apply_type_qualifier_to_variable(const struct ast_type_qualifier *qual,
struct _mesa_glsl_parse_state *state,
YYLTYPE *loc)
{
- if (qual->flags.q.invariant)
- var->invariant = 1;
+ if (qual->flags.q.invariant) {
+ if (var->used) {
+ _mesa_glsl_error(loc, state,
+ "variable `%s' may not be redeclared "
+ "`invariant' after being used",
+ var->name);
+ } else {
+ var->invariant = 1;
+ }
+ }
- /* FINISHME: Mark 'in' variables at global scope as read-only. */
if (qual->flags.q.constant || qual->flags.q.attribute
|| qual->flags.q.uniform
|| (qual->flags.q.varying && (state->target == fragment_shader)))
@@ -1835,6 +1877,23 @@ apply_type_qualifier_to_variable(const struct ast_type_qualifier *qual,
else if (qual->flags.q.uniform)
var->mode = ir_var_uniform;
+ if (state->all_invariant && (state->current_function == NULL)) {
+ switch (state->target) {
+ case vertex_shader:
+ if (var->mode == ir_var_out)
+ var->invariant = true;
+ break;
+ case geometry_shader:
+ if ((var->mode == ir_var_in) || (var->mode == ir_var_out))
+ var->invariant = true;
+ break;
+ case fragment_shader:
+ if (var->mode == ir_var_in)
+ var->invariant = true;
+ break;
+ }
+ }
+
if (qual->flags.q.flat)
var->interpolation = ir_var_flat;
else if (qual->flags.q.noperspective)
@@ -1914,11 +1973,345 @@ apply_type_qualifier_to_variable(const struct ast_type_qualifier *qual,
}
}
+ /* Does the declaration use the 'layout' keyword?
+ */
+ const bool uses_layout = qual->flags.q.pixel_center_integer
+ || qual->flags.q.origin_upper_left
+ || qual->flags.q.explicit_location;
+
+ /* Does the declaration use the deprecated 'attribute' or 'varying'
+ * keywords?
+ */
+ const bool uses_deprecated_qualifier = qual->flags.q.attribute
+ || qual->flags.q.varying;
+
+ /* Is the 'layout' keyword used with parameters that allow relaxed checking.
+ * Many implementations of GL_ARB_fragment_coord_conventions_enable and some
+ * implementations (only Mesa?) GL_ARB_explicit_attrib_location_enable
+ * allowed the layout qualifier to be used with 'varying' and 'attribute'.
+ * These extensions and all following extensions that add the 'layout'
+ * keyword have been modified to require the use of 'in' or 'out'.
+ *
+ * The following extension do not allow the deprecated keywords:
+ *
+ * GL_AMD_conservative_depth
+ * GL_ARB_gpu_shader5
+ * GL_ARB_separate_shader_objects
+ * GL_ARB_tesselation_shader
+ * GL_ARB_transform_feedback3
+ * GL_ARB_uniform_buffer_object
+ *
+ * It is unknown whether GL_EXT_shader_image_load_store or GL_NV_gpu_shader5
+ * allow layout with the deprecated keywords.
+ */
+ const bool relaxed_layout_qualifier_checking =
+ state->ARB_fragment_coord_conventions_enable;
+
+ if (uses_layout && uses_deprecated_qualifier) {
+ if (relaxed_layout_qualifier_checking) {
+ _mesa_glsl_warning(loc, state,
+ "`layout' qualifier may not be used with "
+ "`attribute' or `varying'");
+ } else {
+ _mesa_glsl_error(loc, state,
+ "`layout' qualifier may not be used with "
+ "`attribute' or `varying'");
+ }
+ }
+
+ /* Layout qualifiers for gl_FragDepth, which are enabled by extension
+ * AMD_conservative_depth.
+ */
+ int depth_layout_count = qual->flags.q.depth_any
+ + qual->flags.q.depth_greater
+ + qual->flags.q.depth_less
+ + qual->flags.q.depth_unchanged;
+ if (depth_layout_count > 0
+ && !state->AMD_conservative_depth_enable) {
+ _mesa_glsl_error(loc, state,
+ "extension GL_AMD_conservative_depth must be enabled "
+ "to use depth layout qualifiers");
+ } else if (depth_layout_count > 0
+ && strcmp(var->name, "gl_FragDepth") != 0) {
+ _mesa_glsl_error(loc, state,
+ "depth layout qualifiers can be applied only to "
+ "gl_FragDepth");
+ } else if (depth_layout_count > 1
+ && strcmp(var->name, "gl_FragDepth") == 0) {
+ _mesa_glsl_error(loc, state,
+ "at most one depth layout qualifier can be applied to "
+ "gl_FragDepth");
+ }
+ if (qual->flags.q.depth_any)
+ var->depth_layout = ir_depth_layout_any;
+ else if (qual->flags.q.depth_greater)
+ var->depth_layout = ir_depth_layout_greater;
+ else if (qual->flags.q.depth_less)
+ var->depth_layout = ir_depth_layout_less;
+ else if (qual->flags.q.depth_unchanged)
+ var->depth_layout = ir_depth_layout_unchanged;
+ else
+ var->depth_layout = ir_depth_layout_none;
+
if (var->type->is_array() && state->language_version != 110) {
var->array_lvalue = true;
}
}
+/**
+ * Get the variable that is being redeclared by this declaration
+ *
+ * Semantic checks to verify the validity of the redeclaration are also
+ * performed. If semantic checks fail, compilation error will be emitted via
+ * \c _mesa_glsl_error, but a non-\c NULL pointer will still be returned.
+ *
+ * \returns
+ * A pointer to an existing variable in the current scope if the declaration
+ * is a redeclaration, \c NULL otherwise.
+ */
+ir_variable *
+get_variable_being_redeclared(ir_variable *var, ast_declaration *decl,
+ struct _mesa_glsl_parse_state *state)
+{
+ /* Check if this declaration is actually a re-declaration, either to
+ * resize an array or add qualifiers to an existing variable.
+ *
+ * This is allowed for variables in the current scope, or when at
+ * global scope (for built-ins in the implicit outer scope).
+ */
+ ir_variable *earlier = state->symbols->get_variable(decl->identifier);
+ if (earlier == NULL ||
+ (state->current_function != NULL &&
+ !state->symbols->name_declared_this_scope(decl->identifier))) {
+ return NULL;
+ }
+
+
+ YYLTYPE loc = decl->get_location();
+
+ /* From page 24 (page 30 of the PDF) of the GLSL 1.50 spec,
+ *
+ * "It is legal to declare an array without a size and then
+ * later re-declare the same name as an array of the same
+ * type and specify a size."
+ */
+ if ((earlier->type->array_size() == 0)
+ && var->type->is_array()
+ && (var->type->element_type() == earlier->type->element_type())) {
+ /* FINISHME: This doesn't match the qualifiers on the two
+ * FINISHME: declarations. It's not 100% clear whether this is
+ * FINISHME: required or not.
+ */
+
+ /* From page 54 (page 60 of the PDF) of the GLSL 1.20 spec:
+ *
+ * "The size [of gl_TexCoord] can be at most
+ * gl_MaxTextureCoords."
+ */
+ const unsigned size = unsigned(var->type->array_size());
+ if ((strcmp("gl_TexCoord", var->name) == 0)
+ && (size > state->Const.MaxTextureCoords)) {
+ _mesa_glsl_error(& loc, state, "`gl_TexCoord' array size cannot "
+ "be larger than gl_MaxTextureCoords (%u)\n",
+ state->Const.MaxTextureCoords);
+ } else if ((size > 0) && (size <= earlier->max_array_access)) {
+ _mesa_glsl_error(& loc, state, "array size must be > %u due to "
+ "previous access",
+ earlier->max_array_access);
+ }
+
+ earlier->type = var->type;
+ delete var;
+ var = NULL;
+ } else if (state->ARB_fragment_coord_conventions_enable
+ && strcmp(var->name, "gl_FragCoord") == 0
+ && earlier->type == var->type
+ && earlier->mode == var->mode) {
+ /* Allow redeclaration of gl_FragCoord for ARB_fcc layout
+ * qualifiers.
+ */
+ earlier->origin_upper_left = var->origin_upper_left;
+ earlier->pixel_center_integer = var->pixel_center_integer;
+
+ /* According to section 4.3.7 of the GLSL 1.30 spec,
+ * the following built-in varaibles can be redeclared with an
+ * interpolation qualifier:
+ * * gl_FrontColor
+ * * gl_BackColor
+ * * gl_FrontSecondaryColor
+ * * gl_BackSecondaryColor
+ * * gl_Color
+ * * gl_SecondaryColor
+ */
+ } else if (state->language_version >= 130
+ && (strcmp(var->name, "gl_FrontColor") == 0
+ || strcmp(var->name, "gl_BackColor") == 0
+ || strcmp(var->name, "gl_FrontSecondaryColor") == 0
+ || strcmp(var->name, "gl_BackSecondaryColor") == 0
+ || strcmp(var->name, "gl_Color") == 0
+ || strcmp(var->name, "gl_SecondaryColor") == 0)
+ && earlier->type == var->type
+ && earlier->mode == var->mode) {
+ earlier->interpolation = var->interpolation;
+
+ /* Layout qualifiers for gl_FragDepth. */
+ } else if (state->AMD_conservative_depth_enable
+ && strcmp(var->name, "gl_FragDepth") == 0
+ && earlier->type == var->type
+ && earlier->mode == var->mode) {
+
+ /** From the AMD_conservative_depth spec:
+ * Within any shader, the first redeclarations of gl_FragDepth
+ * must appear before any use of gl_FragDepth.
+ */
+ if (earlier->used) {
+ _mesa_glsl_error(&loc, state,
+ "the first redeclaration of gl_FragDepth "
+ "must appear before any use of gl_FragDepth");
+ }
+
+ /* Prevent inconsistent redeclaration of depth layout qualifier. */
+ if (earlier->depth_layout != ir_depth_layout_none
+ && earlier->depth_layout != var->depth_layout) {
+ _mesa_glsl_error(&loc, state,
+ "gl_FragDepth: depth layout is declared here "
+ "as '%s, but it was previously declared as "
+ "'%s'",
+ depth_layout_string(var->depth_layout),
+ depth_layout_string(earlier->depth_layout));
+ }
+
+ earlier->depth_layout = var->depth_layout;
+
+ } else {
+ _mesa_glsl_error(&loc, state, "`%s' redeclared", decl->identifier);
+ }
+
+ return earlier;
+}
+
+/**
+ * Generate the IR for an initializer in a variable declaration
+ */
+ir_rvalue *
+process_initializer(ir_variable *var, ast_declaration *decl,
+ ast_fully_specified_type *type,
+ exec_list *initializer_instructions,
+ struct _mesa_glsl_parse_state *state)
+{
+ ir_rvalue *result = NULL;
+
+ YYLTYPE initializer_loc = decl->initializer->get_location();
+
+ /* From page 24 (page 30 of the PDF) of the GLSL 1.10 spec:
+ *
+ * "All uniform variables are read-only and are initialized either
+ * directly by an application via API commands, or indirectly by
+ * OpenGL."
+ */
+ if ((state->language_version <= 110)
+ && (var->mode == ir_var_uniform)) {
+ _mesa_glsl_error(& initializer_loc, state,
+ "cannot initialize uniforms in GLSL 1.10");
+ }
+
+ if (var->type->is_sampler()) {
+ _mesa_glsl_error(& initializer_loc, state,
+ "cannot initialize samplers");
+ }
+
+ if ((var->mode == ir_var_in) && (state->current_function == NULL)) {
+ _mesa_glsl_error(& initializer_loc, state,
+ "cannot initialize %s shader input / %s",
+ _mesa_glsl_shader_target_name(state->target),
+ (state->target == vertex_shader)
+ ? "attribute" : "varying");
+ }
+
+ ir_dereference *const lhs = new(state) ir_dereference_variable(var);
+ ir_rvalue *rhs = decl->initializer->hir(initializer_instructions,
+ state);
+
+ /* Calculate the constant value if this is a const or uniform
+ * declaration.
+ */
+ if (type->qualifier.flags.q.constant
+ || type->qualifier.flags.q.uniform) {
+ ir_rvalue *new_rhs = validate_assignment(state, var->type, rhs, true);
+ if (new_rhs != NULL) {
+ rhs = new_rhs;
+
+ ir_constant *constant_value = rhs->constant_expression_value();
+ if (!constant_value) {
+ _mesa_glsl_error(& initializer_loc, state,
+ "initializer of %s variable `%s' must be a "
+ "constant expression",
+ (type->qualifier.flags.q.constant)
+ ? "const" : "uniform",
+ decl->identifier);
+ if (var->type->is_numeric()) {
+ /* Reduce cascading errors. */
+ var->constant_value = ir_constant::zero(state, var->type);
+ }
+ } else {
+ rhs = constant_value;
+ var->constant_value = constant_value;
+ }
+ } else {
+ _mesa_glsl_error(&initializer_loc, state,
+ "initializer of type %s cannot be assigned to "
+ "variable of type %s",
+ rhs->type->name, var->type->name);
+ if (var->type->is_numeric()) {
+ /* Reduce cascading errors. */
+ var->constant_value = ir_constant::zero(state, var->type);
+ }
+ }
+ }
+
+ if (rhs && !rhs->type->is_error()) {
+ bool temp = var->read_only;
+ if (type->qualifier.flags.q.constant)
+ var->read_only = false;
+
+ /* Never emit code to initialize a uniform.
+ */
+ const glsl_type *initializer_type;
+ if (!type->qualifier.flags.q.uniform) {
+ result = do_assignment(initializer_instructions, state,
+ lhs, rhs, true,
+ type->get_location());
+ initializer_type = result->type;
+ } else
+ initializer_type = rhs->type;
+
+ /* If the declared variable is an unsized array, it must inherrit
+ * its full type from the initializer. A declaration such as
+ *
+ * uniform float a[] = float[](1.0, 2.0, 3.0, 3.0);
+ *
+ * becomes
+ *
+ * uniform float a[4] = float[](1.0, 2.0, 3.0, 3.0);
+ *
+ * The assignment generated in the if-statement (below) will also
+ * automatically handle this case for non-uniforms.
+ *
+ * If the declared variable is not an array, the types must
+ * already match exactly. As a result, the type assignment
+ * here can be done unconditionally. For non-uniforms the call
+ * to do_assignment can change the type of the initializer (via
+ * the implicit conversion rules). For uniforms the initializer
+ * must be a constant expression, and the type of that expression
+ * was validated above.
+ */
+ var->type = initializer_type;
+
+ var->read_only = temp;
+ }
+
+ return result;
+}
ir_rvalue *
ast_declarator_list::hir(exec_list *instructions,
@@ -1971,6 +2364,11 @@ ast_declarator_list::hir(exec_list *instructions,
_mesa_glsl_error(& loc, state,
"`%s' cannot be marked invariant, fragment shader "
"inputs only\n", decl->identifier);
+ } else if (earlier->used) {
+ _mesa_glsl_error(& loc, state,
+ "variable `%s' may not be redeclared "
+ "`invariant' after being used",
+ earlier->name);
} else {
earlier->invariant = true;
}
@@ -2040,20 +2438,23 @@ ast_declarator_list::hir(exec_list *instructions,
*
* Local variables can only use the qualifier const."
*
- * This is relaxed in GLSL 1.30.
+ * This is relaxed in GLSL 1.30. It is also relaxed by any extension
+ * that adds the 'layout' keyword.
*/
- if (state->language_version < 120) {
+ if ((state->language_version < 130)
+ && !state->ARB_explicit_attrib_location_enable
+ && !state->ARB_fragment_coord_conventions_enable) {
if (this->type->qualifier.flags.q.out) {
_mesa_glsl_error(& loc, state,
"`out' qualifier in declaration of `%s' "
- "only valid for function parameters in GLSL 1.10.",
- decl->identifier);
+ "only valid for function parameters in %s.",
+ decl->identifier, state->version_string);
}
if (this->type->qualifier.flags.q.in) {
_mesa_glsl_error(& loc, state,
"`in' qualifier in declaration of `%s' "
- "only valid for function parameters in GLSL 1.10.",
- decl->identifier);
+ "only valid for function parameters in %s.",
+ decl->identifier, state->version_string);
}
/* FINISHME: Test for other invalid qualifiers. */
}
@@ -2109,6 +2510,8 @@ ast_declarator_list::hir(exec_list *instructions,
mode, var->name, extra);
}
} else if (var->mode == ir_var_in) {
+ var->read_only = true;
+
if (state->target == vertex_shader) {
bool error_emitted = false;
@@ -2161,113 +2564,144 @@ ast_declarator_list::hir(exec_list *instructions,
}
}
- /* Process the initializer and add its instructions to a temporary
- * list. This list will be added to the instruction stream (below) after
- * the declaration is added. This is done because in some cases (such as
- * redeclarations) the declaration may not actually be added to the
- * instruction stream.
+ /* Integer vertex outputs must be qualified with 'flat'.
+ *
+ * From section 4.3.6 of the GLSL 1.30 spec:
+ * "If a vertex output is a signed or unsigned integer or integer
+ * vector, then it must be qualified with the interpolation qualifier
+ * flat."
*/
- exec_list initializer_instructions;
- if (decl->initializer != NULL) {
- YYLTYPE initializer_loc = decl->initializer->get_location();
+ if (state->language_version >= 130
+ && state->target == vertex_shader
+ && state->current_function == NULL
+ && var->type->is_integer()
+ && var->mode == ir_var_out
+ && var->interpolation != ir_var_flat) {
+
+ _mesa_glsl_error(&loc, state, "If a vertex output is an integer, "
+ "then it must be qualified with 'flat'");
+ }
- /* From page 24 (page 30 of the PDF) of the GLSL 1.10 spec:
- *
- * "All uniform variables are read-only and are initialized either
- * directly by an application via API commands, or indirectly by
- * OpenGL."
- */
- if ((state->language_version <= 110)
- && (var->mode == ir_var_uniform)) {
- _mesa_glsl_error(& initializer_loc, state,
- "cannot initialize uniforms in GLSL 1.10");
- }
- if (var->type->is_sampler()) {
- _mesa_glsl_error(& initializer_loc, state,
- "cannot initialize samplers");
- }
+ /* Interpolation qualifiers cannot be applied to 'centroid' and
+ * 'centroid varying'.
+ *
+ * From page 29 (page 35 of the PDF) of the GLSL 1.30 spec:
+ * "interpolation qualifiers may only precede the qualifiers in,
+ * centroid in, out, or centroid out in a declaration. They do not apply
+ * to the deprecated storage qualifiers varying or centroid varying."
+ */
+ if (state->language_version >= 130
+ && this->type->qualifier.has_interpolation()
+ && this->type->qualifier.flags.q.varying) {
+
+ const char *i = this->type->qualifier.interpolation_string();
+ assert(i != NULL);
+ const char *s;
+ if (this->type->qualifier.flags.q.centroid)
+ s = "centroid varying";
+ else
+ s = "varying";
+
+ _mesa_glsl_error(&loc, state,
+ "qualifier '%s' cannot be applied to the "
+ "deprecated storage qualifier '%s'", i, s);
+ }
- if ((var->mode == ir_var_in) && (state->current_function == NULL)) {
- _mesa_glsl_error(& initializer_loc, state,
- "cannot initialize %s shader input / %s",
- _mesa_glsl_shader_target_name(state->target),
- (state->target == vertex_shader)
- ? "attribute" : "varying");
- }
- ir_dereference *const lhs = new(ctx) ir_dereference_variable(var);
- ir_rvalue *rhs = decl->initializer->hir(&initializer_instructions,
- state);
+ /* Interpolation qualifiers can only apply to vertex shader outputs and
+ * fragment shader inputs.
+ *
+ * From page 29 (page 35 of the PDF) of the GLSL 1.30 spec:
+ * "Outputs from a vertex shader (out) and inputs to a fragment
+ * shader (in) can be further qualified with one or more of these
+ * interpolation qualifiers"
+ */
+ if (state->language_version >= 130
+ && this->type->qualifier.has_interpolation()) {
+
+ const char *i = this->type->qualifier.interpolation_string();
+ assert(i != NULL);
+
+ switch (state->target) {
+ case vertex_shader:
+ if (this->type->qualifier.flags.q.in) {
+ _mesa_glsl_error(&loc, state,
+ "qualifier '%s' cannot be applied to vertex "
+ "shader inputs", i);
+ }
+ break;
+ case fragment_shader:
+ if (this->type->qualifier.flags.q.out) {
+ _mesa_glsl_error(&loc, state,
+ "qualifier '%s' cannot be applied to fragment "
+ "shader outputs", i);
+ }
+ break;
+ default:
+ assert(0);
+ }
+ }
- /* Calculate the constant value if this is a const or uniform
- * declaration.
- */
- if (this->type->qualifier.flags.q.constant
- || this->type->qualifier.flags.q.uniform) {
- ir_rvalue *new_rhs = validate_assignment(state, var->type, rhs);
- if (new_rhs != NULL) {
- rhs = new_rhs;
-
- ir_constant *constant_value = rhs->constant_expression_value();
- if (!constant_value) {
- _mesa_glsl_error(& initializer_loc, state,
- "initializer of %s variable `%s' must be a "
- "constant expression",
- (this->type->qualifier.flags.q.constant)
- ? "const" : "uniform",
- decl->identifier);
- if (var->type->is_numeric()) {
- /* Reduce cascading errors. */
- var->constant_value = ir_constant::zero(ctx, var->type);
- }
- } else {
- rhs = constant_value;
- var->constant_value = constant_value;
- }
- } else {
- _mesa_glsl_error(&initializer_loc, state,
- "initializer of type %s cannot be assigned to "
- "variable of type %s",
- rhs->type->name, var->type->name);
- if (var->type->is_numeric()) {
- /* Reduce cascading errors. */
- var->constant_value = ir_constant::zero(ctx, var->type);
- }
- }
- }
- if (rhs && !rhs->type->is_error()) {
- bool temp = var->read_only;
- if (this->type->qualifier.flags.q.constant)
- var->read_only = false;
+ /* From section 4.3.4 of the GLSL 1.30 spec:
+ * "It is an error to use centroid in in a vertex shader."
+ */
+ if (state->language_version >= 130
+ && this->type->qualifier.flags.q.centroid
+ && this->type->qualifier.flags.q.in
+ && state->target == vertex_shader) {
- /* If the declared variable is an unsized array, it must inherrit
- * its full type from the initializer. A declaration such as
- *
- * uniform float a[] = float[](1.0, 2.0, 3.0, 3.0);
- *
- * becomes
- *
- * uniform float a[4] = float[](1.0, 2.0, 3.0, 3.0);
- *
- * The assignment generated in the if-statement (below) will also
- * automatically handle this case for non-uniforms.
- *
- * If the declared variable is not an array, the types must
- * already match exactly. As a result, the type assignment
- * here can be done unconditionally.
- */
- var->type = rhs->type;
+ _mesa_glsl_error(&loc, state,
+ "'centroid in' cannot be used in a vertex shader");
+ }
- /* Never emit code to initialize a uniform.
- */
- if (!this->type->qualifier.flags.q.uniform)
- result = do_assignment(&initializer_instructions, state,
- lhs, rhs,
- this->get_location());
- var->read_only = temp;
- }
+
+ /* Precision qualifiers exists only in GLSL versions 1.00 and >= 1.30.
+ */
+ if (this->type->specifier->precision != ast_precision_none
+ && state->language_version != 100
+ && state->language_version < 130) {
+
+ _mesa_glsl_error(&loc, state,
+ "precision qualifiers are supported only in GLSL ES "
+ "1.00, and GLSL 1.30 and later");
+ }
+
+
+ /* Precision qualifiers only apply to floating point and integer types.
+ *
+ * From section 4.5.2 of the GLSL 1.30 spec:
+ * "Any floating point or any integer declaration can have the type
+ * preceded by one of these precision qualifiers [...] Literal
+ * constants do not have precision qualifiers. Neither do Boolean
+ * variables.
+ */
+ if (this->type->specifier->precision != ast_precision_none
+ && !var->type->is_float()
+ && !var->type->is_integer()
+ && !(var->type->is_array()
+ && (var->type->fields.array->is_float()
+ || var->type->fields.array->is_integer()))) {
+
+ _mesa_glsl_error(&loc, state,
+ "precision qualifiers apply only to floating point "
+ "and integer types");
+ }
+
+ /* Process the initializer and add its instructions to a temporary
+ * list. This list will be added to the instruction stream (below) after
+ * the declaration is added. This is done because in some cases (such as
+ * redeclarations) the declaration may not actually be added to the
+ * instruction stream.
+ */
+ exec_list initializer_instructions;
+ ir_variable *earlier = get_variable_being_redeclared(var, decl, state);
+
+ if (decl->initializer != NULL) {
+ result = process_initializer((earlier == NULL) ? var : earlier,
+ decl, this->type,
+ &initializer_instructions, state);
}
/* From page 23 (page 29 of the PDF) of the GLSL 1.10 spec:
@@ -2278,115 +2712,54 @@ ast_declarator_list::hir(exec_list *instructions,
*/
if (this->type->qualifier.flags.q.constant && decl->initializer == NULL) {
_mesa_glsl_error(& loc, state,
- "const declaration of `%s' must be initialized");
+ "const declaration of `%s' must be initialized",
+ decl->identifier);
}
- /* Check if this declaration is actually a re-declaration, either to
- * resize an array or add qualifiers to an existing variable.
- *
- * This is allowed for variables in the current scope, or when at
- * global scope (for built-ins in the implicit outer scope).
+ /* If the declaration is not a redeclaration, there are a few additional
+ * semantic checks that must be applied. In addition, variable that was
+ * created for the declaration should be added to the IR stream.
*/
- ir_variable *earlier = state->symbols->get_variable(decl->identifier);
- if (earlier != NULL && (state->current_function == NULL ||
- state->symbols->name_declared_this_scope(decl->identifier))) {
-
- /* From page 24 (page 30 of the PDF) of the GLSL 1.50 spec,
+ if (earlier == NULL) {
+ /* From page 15 (page 21 of the PDF) of the GLSL 1.10 spec,
*
- * "It is legal to declare an array without a size and then
- * later re-declare the same name as an array of the same
- * type and specify a size."
+ * "Identifiers starting with "gl_" are reserved for use by
+ * OpenGL, and may not be declared in a shader as either a
+ * variable or a function."
*/
- if ((earlier->type->array_size() == 0)
- && var->type->is_array()
- && (var->type->element_type() == earlier->type->element_type())) {
- /* FINISHME: This doesn't match the qualifiers on the two
- * FINISHME: declarations. It's not 100% clear whether this is
- * FINISHME: required or not.
- */
-
- /* From page 54 (page 60 of the PDF) of the GLSL 1.20 spec:
- *
- * "The size [of gl_TexCoord] can be at most
- * gl_MaxTextureCoords."
- */
- const unsigned size = unsigned(var->type->array_size());
- if ((strcmp("gl_TexCoord", var->name) == 0)
- && (size > state->Const.MaxTextureCoords)) {
- YYLTYPE loc = this->get_location();
-
- _mesa_glsl_error(& loc, state, "`gl_TexCoord' array size cannot "
- "be larger than gl_MaxTextureCoords (%u)\n",
- state->Const.MaxTextureCoords);
- } else if ((size > 0) && (size <= earlier->max_array_access)) {
- YYLTYPE loc = this->get_location();
-
- _mesa_glsl_error(& loc, state, "array size must be > %u due to "
- "previous access",
- earlier->max_array_access);
- }
+ if (strncmp(decl->identifier, "gl_", 3) == 0)
+ _mesa_glsl_error(& loc, state,
+ "identifier `%s' uses reserved `gl_' prefix",
+ decl->identifier);
- earlier->type = var->type;
- delete var;
- var = NULL;
- } else if (state->ARB_fragment_coord_conventions_enable
- && strcmp(var->name, "gl_FragCoord") == 0
- && earlier->type == var->type
- && earlier->mode == var->mode) {
- /* Allow redeclaration of gl_FragCoord for ARB_fcc layout
- * qualifiers.
- */
- earlier->origin_upper_left = var->origin_upper_left;
- earlier->pixel_center_integer = var->pixel_center_integer;
- } else {
+ /* Add the variable to the symbol table. Note that the initializer's
+ * IR was already processed earlier (though it hasn't been emitted
+ * yet), without the variable in scope.
+ *
+ * This differs from most C-like languages, but it follows the GLSL
+ * specification. From page 28 (page 34 of the PDF) of the GLSL 1.50
+ * spec:
+ *
+ * "Within a declaration, the scope of a name starts immediately
+ * after the initializer if present or immediately after the name
+ * being declared if not."
+ */
+ if (!state->symbols->add_variable(var)) {
YYLTYPE loc = this->get_location();
- _mesa_glsl_error(&loc, state, "`%s' redeclared", decl->identifier);
+ _mesa_glsl_error(&loc, state, "name `%s' already taken in the "
+ "current scope", decl->identifier);
+ continue;
}
- continue;
- }
-
- /* By now, we know it's a new variable declaration (we didn't hit the
- * above "continue").
- *
- * From page 15 (page 21 of the PDF) of the GLSL 1.10 spec,
- *
- * "Identifiers starting with "gl_" are reserved for use by
- * OpenGL, and may not be declared in a shader as either a
- * variable or a function."
- */
- if (strncmp(decl->identifier, "gl_", 3) == 0)
- _mesa_glsl_error(& loc, state,
- "identifier `%s' uses reserved `gl_' prefix",
- decl->identifier);
-
- /* Add the variable to the symbol table. Note that the initializer's
- * IR was already processed earlier (though it hasn't been emitted yet),
- * without the variable in scope.
- *
- * This differs from most C-like languages, but it follows the GLSL
- * specification. From page 28 (page 34 of the PDF) of the GLSL 1.50
- * spec:
- *
- * "Within a declaration, the scope of a name starts immediately
- * after the initializer if present or immediately after the name
- * being declared if not."
- */
- if (!state->symbols->add_variable(var)) {
- YYLTYPE loc = this->get_location();
- _mesa_glsl_error(&loc, state, "name `%s' already taken in the "
- "current scope", decl->identifier);
- continue;
+ /* Push the variable declaration to the top. It means that all the
+ * variable declarations will appear in a funny last-to-first order,
+ * but otherwise we run into trouble if a function is prototyped, a
+ * global var is decled, then the function is defined with usage of
+ * the global var. See glslparsertest's CorrectModule.frag.
+ */
+ instructions->push_head(var);
}
- /* Push the variable declaration to the top. It means that all
- * the variable declarations will appear in a funny
- * last-to-first order, but otherwise we run into trouble if a
- * function is prototyped, a global var is decled, then the
- * function is defined with usage of the global var. See
- * glslparsertest's CorrectModule.frag.
- */
- instructions->push_head(var);
instructions->append_list(&initializer_instructions);
}
@@ -2749,27 +3122,26 @@ ast_jump_statement::hir(exec_list *instructions,
assert(state->current_function);
if (opt_return_value) {
- if (state->current_function->return_type->base_type ==
- GLSL_TYPE_VOID) {
- YYLTYPE loc = this->get_location();
-
- _mesa_glsl_error(& loc, state,
- "`return` with a value, in function `%s' "
- "returning void",
- state->current_function->function_name());
- }
-
ir_rvalue *const ret = opt_return_value->hir(instructions, state);
- assert(ret != NULL);
+
+ /* The value of the return type can be NULL if the shader says
+ * 'return foo();' and foo() is a function that returns void.
+ *
+ * NOTE: The GLSL spec doesn't say that this is an error. The type
+ * of the return value is void. If the return type of the function is
+ * also void, then this should compile without error. Seriously.
+ */
+ const glsl_type *const ret_type =
+ (ret == NULL) ? glsl_type::void_type : ret->type;
/* Implicit conversions are not allowed for return values. */
- if (state->current_function->return_type != ret->type) {
+ if (state->current_function->return_type != ret_type) {
YYLTYPE loc = this->get_location();
_mesa_glsl_error(& loc, state,
"`return' with wrong type %s, in function `%s' "
"returning %s",
- ret->type->name,
+ ret_type->name,
state->current_function->function_name(),
state->current_function->return_type->name);
}
@@ -2986,6 +3358,58 @@ ir_rvalue *
ast_type_specifier::hir(exec_list *instructions,
struct _mesa_glsl_parse_state *state)
{
+ if (!this->is_precision_statement && this->structure == NULL)
+ return NULL;
+
+ YYLTYPE loc = this->get_location();
+
+ if (this->precision != ast_precision_none
+ && state->language_version != 100
+ && state->language_version < 130) {
+ _mesa_glsl_error(&loc, state,
+ "precision qualifiers exist only in "
+ "GLSL ES 1.00, and GLSL 1.30 and later");
+ return NULL;
+ }
+ if (this->precision != ast_precision_none
+ && this->structure != NULL) {
+ _mesa_glsl_error(&loc, state,
+ "precision qualifiers do not apply to structures");
+ return NULL;
+ }
+
+ /* If this is a precision statement, check that the type to which it is
+ * applied is either float or int.
+ *
+ * From section 4.5.3 of the GLSL 1.30 spec:
+ * "The precision statement
+ * precision precision-qualifier type;
+ * can be used to establish a default precision qualifier. The type
+ * field can be either int or float [...]. Any other types or
+ * qualifiers will result in an error.
+ */
+ if (this->is_precision_statement) {
+ assert(this->precision != ast_precision_none);
+ assert(this->structure == NULL); /* The check for structures was
+ * performed above. */
+ if (this->is_array) {
+ _mesa_glsl_error(&loc, state,
+ "default precision statements do not apply to "
+ "arrays");
+ return NULL;
+ }
+ if (this->type_specifier != ast_float
+ && this->type_specifier != ast_int) {
+ _mesa_glsl_error(&loc, state,
+ "default precision statements apply only to types "
+ "float and int");
+ return NULL;
+ }
+
+ /* FINISHME: Translate precision statements into IR. */
+ return NULL;
+ }
+
if (this->structure != NULL)
return this->structure->hir(instructions, state);
@@ -3016,7 +3440,7 @@ ast_struct_specifier::hir(exec_list *instructions,
* the types to HIR. This ensures that structure definitions embedded in
* other structure definitions are processed.
*/
- glsl_struct_field *const fields = talloc_array(state, glsl_struct_field,
+ glsl_struct_field *const fields = ralloc_array(state, glsl_struct_field,
decl_count);
unsigned i = 0;
@@ -3062,11 +3486,9 @@ ast_struct_specifier::hir(exec_list *instructions,
if (!state->symbols->add_type(name, t)) {
_mesa_glsl_error(& loc, state, "struct `%s' previously defined", name);
} else {
-
- const glsl_type **s = (const glsl_type **)
- realloc(state->user_structures,
- sizeof(state->user_structures[0]) *
- (state->num_user_structures + 1));
+ const glsl_type **s = reralloc(state, state->user_structures,
+ const glsl_type *,
+ state->num_user_structures + 1);
if (s != NULL) {
s[state->num_user_structures] = t;
state->user_structures = s;
diff --git a/src/glsl/ast_type.cpp b/src/glsl/ast_type.cpp
index b7488cf6e90..c680ae5f671 100644
--- a/src/glsl/ast_type.cpp
+++ b/src/glsl/ast_type.cpp
@@ -21,7 +21,6 @@
* DEALINGS IN THE SOFTWARE.
*/
-#include <cstdio>
#include "ast.h"
extern "C" {
#include "program/symbol_table.h"
@@ -49,7 +48,8 @@ ast_type_specifier::print(void) const
ast_type_specifier::ast_type_specifier(int specifier)
: type_specifier(ast_types(specifier)), type_name(NULL), structure(NULL),
- is_array(false), array_size(NULL), precision(ast_precision_high)
+ is_array(false), array_size(NULL), precision(ast_precision_none),
+ is_precision_statement(false)
{
static const char *const names[] = {
"void",
@@ -116,3 +116,23 @@ ast_fully_specified_type::has_qualifiers() const
{
return this->qualifier.flags.i != 0;
}
+
+bool ast_type_qualifier::has_interpolation() const
+{
+ return this->flags.q.smooth
+ || this->flags.q.flat
+ || this->flags.q.noperspective;
+}
+
+const char*
+ast_type_qualifier::interpolation_string() const
+{
+ if (this->flags.q.smooth)
+ return "smooth";
+ else if (this->flags.q.flat)
+ return "flat";
+ else if (this->flags.q.noperspective)
+ return "noperspective";
+ else
+ return NULL;
+}
diff --git a/src/glsl/builtin_function.cpp b/src/glsl/builtin_function.cpp
index 631aeac12ce..0371c70a547 100644
--- a/src/glsl/builtin_function.cpp
+++ b/src/glsl/builtin_function.cpp
@@ -37,6 +37,8 @@ read_builtins(GLenum target, const char *protos, const char **functions, unsigne
{
struct gl_context fakeCtx;
fakeCtx.API = API_OPENGL;
+ fakeCtx.Const.GLSLVersion = 130;
+ fakeCtx.Extensions.ARB_ES2_compatibility = true;
gl_shader *sh = _mesa_new_shader(NULL, 0, target);
struct _mesa_glsl_parse_state *st =
new(sh) _mesa_glsl_parse_state(&fakeCtx, target, sh);
@@ -63,7 +65,7 @@ read_builtins(GLenum target, const char *protos, const char **functions, unsigne
if (st->error) {
printf("error reading builtin: %.35s ...\n", functions[i]);
printf("Info log:\n%s\n", st->info_log);
- talloc_free(sh);
+ ralloc_free(sh);
return NULL;
}
}
@@ -367,19 +369,19 @@ static const char builtin_atan[] =
" (\n"
" (declare () float r)\n"
" (if (expression bool > (expression float abs (var_ref x)) (constant float (0.000100))) (\n"
- " (assign (constant bool (1)) (x) (var_ref r) (call atan ((expression float / (var_ref y) (var_ref x)))))\n"
+ " (assign (x) (var_ref r) (call atan ((expression float / (var_ref y) (var_ref x)))))\n"
" (if (expression bool < (var_ref x) (constant float (0.000000)) ) (\n"
" (if (expression bool >= (var_ref y) (constant float (0.000000)) )\n"
- " ((assign (constant bool (1)) (x) (var_ref r) (expression float + (var_ref r) (constant float (3.141593)))))\n"
- " ((assign (constant bool (1)) (x) (var_ref r) (expression float - (var_ref r) (constant float (3.141593))))))\n"
+ " ((assign (x) (var_ref r) (expression float + (var_ref r) (constant float (3.141593)))))\n"
+ " ((assign (x) (var_ref r) (expression float - (var_ref r) (constant float (3.141593))))))\n"
" )\n"
" (\n"
" ))\n"
" )\n"
" (\n"
" (declare () float sgn)\n"
- " (assign (constant bool (1)) (x) (var_ref sgn) (expression float sign (var_ref y)))\n"
- " (assign (constant bool (1)) (x) (var_ref r) (expression float * (var_ref sgn) (constant float (1.5707965))))\n"
+ " (assign (x) (var_ref sgn) (expression float sign (var_ref y)))\n"
+ " (assign (x) (var_ref r) (expression float * (var_ref sgn) (constant float (1.5707965))))\n"
" ))\n"
"\n"
" (return (var_ref r) )\n"
@@ -392,10 +394,10 @@ static const char builtin_atan[] =
" (declare (in) vec2 y)\n"
" (declare (in) vec2 x))\n"
" ((declare () vec2 r)\n"
- " (assign (constant bool (1)) (x) (var_ref r)\n"
+ " (assign (x) (var_ref r)\n"
" (call atan ((swiz x (var_ref y))\n"
" (swiz x (var_ref x)))))\n"
- " (assign (constant bool (1)) (y) (var_ref r)\n"
+ " (assign (y) (var_ref r)\n"
" (call atan ((swiz y (var_ref y))\n"
" (swiz y (var_ref x)))))\n"
" (return (var_ref r))))\n"
@@ -405,13 +407,13 @@ static const char builtin_atan[] =
" (declare (in) vec3 y)\n"
" (declare (in) vec3 x))\n"
" ((declare () vec3 r)\n"
- " (assign (constant bool (1)) (x) (var_ref r)\n"
+ " (assign (x) (var_ref r)\n"
" (call atan ((swiz x (var_ref y))\n"
" (swiz x (var_ref x)))))\n"
- " (assign (constant bool (1)) (y) (var_ref r)\n"
+ " (assign (y) (var_ref r)\n"
" (call atan ((swiz y (var_ref y))\n"
" (swiz y (var_ref x)))))\n"
- " (assign (constant bool (1)) (z) (var_ref r)\n"
+ " (assign (z) (var_ref r)\n"
" (call atan ((swiz z (var_ref y))\n"
" (swiz z (var_ref x)))))\n"
" (return (var_ref r))))\n"
@@ -421,16 +423,16 @@ static const char builtin_atan[] =
" (declare (in) vec4 y)\n"
" (declare (in) vec4 x))\n"
" ((declare () vec4 r)\n"
- " (assign (constant bool (1)) (x) (var_ref r)\n"
+ " (assign (x) (var_ref r)\n"
" (call atan ((swiz x (var_ref y))\n"
" (swiz x (var_ref x)))))\n"
- " (assign (constant bool (1)) (y) (var_ref r)\n"
+ " (assign (y) (var_ref r)\n"
" (call atan ((swiz y (var_ref y))\n"
" (swiz y (var_ref x)))))\n"
- " (assign (constant bool (1)) (z) (var_ref r)\n"
+ " (assign (z) (var_ref r)\n"
" (call atan ((swiz z (var_ref y))\n"
" (swiz z (var_ref x)))))\n"
- " (assign (constant bool (1)) (w) (var_ref r)\n"
+ " (assign (w) (var_ref r)\n"
" (call atan ((swiz w (var_ref y))\n"
" (swiz w (var_ref x)))))\n"
" (return (var_ref r)))))\n"
@@ -807,7 +809,7 @@ static const char builtin_distance[] =
" (declare (in) vec2 p0)\n"
" (declare (in) vec2 p1))\n"
" ((declare () vec2 p)\n"
- " (assign (constant bool (1)) (xy) (var_ref p) (expression vec2 - (var_ref p0) (var_ref p1)))\n"
+ " (assign (xy) (var_ref p) (expression vec2 - (var_ref p0) (var_ref p1)))\n"
" (return (expression float sqrt (expression float dot (var_ref p) (var_ref p))))))\n"
"\n"
" (signature float\n"
@@ -815,7 +817,7 @@ static const char builtin_distance[] =
" (declare (in) vec3 p0)\n"
" (declare (in) vec3 p1))\n"
" ((declare () vec3 p)\n"
- " (assign (constant bool (1)) (xyz) (var_ref p) (expression vec3 - (var_ref p0) (var_ref p1)))\n"
+ " (assign (xyz) (var_ref p) (expression vec3 - (var_ref p0) (var_ref p1)))\n"
" (return (expression float sqrt (expression float dot (var_ref p) (var_ref p))))))\n"
"\n"
" (signature float\n"
@@ -823,7 +825,7 @@ static const char builtin_distance[] =
" (declare (in) vec4 p0)\n"
" (declare (in) vec4 p1))\n"
" ((declare () vec4 p)\n"
- " (assign (constant bool (1)) (xyzw) (var_ref p) (expression vec4 - (var_ref p0) (var_ref p1)))\n"
+ " (assign (xyzw) (var_ref p) (expression vec4 - (var_ref p0) (var_ref p1)))\n"
" (return (expression float sqrt (expression float dot (var_ref p) (var_ref p))))))\n"
"))\n"
""
@@ -1448,8 +1450,8 @@ static const char builtin_matrixCompMult[] =
" (declare (in) mat2 x)\n"
" (declare (in) mat2 y))\n"
" ((declare () mat2 z)\n"
- " (assign (constant bool (1)) (xy) (array_ref (var_ref z) (constant int (0))) (expression vec2 * (array_ref (var_ref x) (constant int (0))) (array_ref (var_ref y) (constant int (0)))))\n"
- " (assign (constant bool (1)) (xy) (array_ref (var_ref z) (constant int (1))) (expression vec2 * (array_ref (var_ref x) (constant int (1))) (array_ref (var_ref y) (constant int (1)))))\n"
+ " (assign (xy) (array_ref (var_ref z) (constant int (0))) (expression vec2 * (array_ref (var_ref x) (constant int (0))) (array_ref (var_ref y) (constant int (0)))))\n"
+ " (assign (xy) (array_ref (var_ref z) (constant int (1))) (expression vec2 * (array_ref (var_ref x) (constant int (1))) (array_ref (var_ref y) (constant int (1)))))\n"
"(return (var_ref z))))\n"
"\n"
" (signature mat3\n"
@@ -1457,9 +1459,9 @@ static const char builtin_matrixCompMult[] =
" (declare (in) mat3 x)\n"
" (declare (in) mat3 y))\n"
" ((declare () mat3 z)\n"
- " (assign (constant bool (1)) (xyz) (array_ref (var_ref z) (constant int (0))) (expression vec3 * (array_ref (var_ref x) (constant int (0))) (array_ref (var_ref y) (constant int (0)))))\n"
- " (assign (constant bool (1)) (xyz) (array_ref (var_ref z) (constant int (1))) (expression vec3 * (array_ref (var_ref x) (constant int (1))) (array_ref (var_ref y) (constant int (1)))))\n"
- " (assign (constant bool (1)) (xyz) (array_ref (var_ref z) (constant int (2))) (expression vec3 * (array_ref (var_ref x) (constant int (2))) (array_ref (var_ref y) (constant int (2)))))\n"
+ " (assign (xyz) (array_ref (var_ref z) (constant int (0))) (expression vec3 * (array_ref (var_ref x) (constant int (0))) (array_ref (var_ref y) (constant int (0)))))\n"
+ " (assign (xyz) (array_ref (var_ref z) (constant int (1))) (expression vec3 * (array_ref (var_ref x) (constant int (1))) (array_ref (var_ref y) (constant int (1)))))\n"
+ " (assign (xyz) (array_ref (var_ref z) (constant int (2))) (expression vec3 * (array_ref (var_ref x) (constant int (2))) (array_ref (var_ref y) (constant int (2)))))\n"
"(return (var_ref z))))\n"
"\n"
" (signature mat4\n"
@@ -1467,10 +1469,10 @@ static const char builtin_matrixCompMult[] =
" (declare (in) mat4 x)\n"
" (declare (in) mat4 y))\n"
" ((declare () mat4 z)\n"
- " (assign (constant bool (1)) (xyzw) (array_ref (var_ref z) (constant int (0))) (expression vec4 * (array_ref (var_ref x) (constant int (0))) (array_ref (var_ref y) (constant int (0)))))\n"
- " (assign (constant bool (1)) (xyzw) (array_ref (var_ref z) (constant int (1))) (expression vec4 * (array_ref (var_ref x) (constant int (1))) (array_ref (var_ref y) (constant int (1)))))\n"
- " (assign (constant bool (1)) (xyzw) (array_ref (var_ref z) (constant int (2))) (expression vec4 * (array_ref (var_ref x) (constant int (2))) (array_ref (var_ref y) (constant int (2)))))\n"
- " (assign (constant bool (1)) (xyzw) (array_ref (var_ref z) (constant int (3))) (expression vec4 * (array_ref (var_ref x) (constant int (3))) (array_ref (var_ref y) (constant int (3)))))\n"
+ " (assign (xyzw) (array_ref (var_ref z) (constant int (0))) (expression vec4 * (array_ref (var_ref x) (constant int (0))) (array_ref (var_ref y) (constant int (0)))))\n"
+ " (assign (xyzw) (array_ref (var_ref z) (constant int (1))) (expression vec4 * (array_ref (var_ref x) (constant int (1))) (array_ref (var_ref y) (constant int (1)))))\n"
+ " (assign (xyzw) (array_ref (var_ref z) (constant int (2))) (expression vec4 * (array_ref (var_ref x) (constant int (2))) (array_ref (var_ref y) (constant int (2)))))\n"
+ " (assign (xyzw) (array_ref (var_ref z) (constant int (3))) (expression vec4 * (array_ref (var_ref x) (constant int (3))) (array_ref (var_ref y) (constant int (3)))))\n"
"(return (var_ref z))))\n"
"\n"
" (signature mat2x3\n"
@@ -1478,8 +1480,8 @@ static const char builtin_matrixCompMult[] =
" (declare (in) mat2x3 x)\n"
" (declare (in) mat2x3 y))\n"
" ((declare () mat2x3 z)\n"
- " (assign (constant bool (1)) (xyz) (array_ref (var_ref z) (constant int (0))) (expression vec3 * (array_ref (var_ref x) (constant int (0))) (array_ref (var_ref y) (constant int (0)))))\n"
- " (assign (constant bool (1)) (xyz) (array_ref (var_ref z) (constant int (1))) (expression vec3 * (array_ref (var_ref x) (constant int (1))) (array_ref (var_ref y) (constant int (1)))))\n"
+ " (assign (xyz) (array_ref (var_ref z) (constant int (0))) (expression vec3 * (array_ref (var_ref x) (constant int (0))) (array_ref (var_ref y) (constant int (0)))))\n"
+ " (assign (xyz) (array_ref (var_ref z) (constant int (1))) (expression vec3 * (array_ref (var_ref x) (constant int (1))) (array_ref (var_ref y) (constant int (1)))))\n"
"(return (var_ref z))))\n"
"\n"
" (signature mat3x2\n"
@@ -1487,9 +1489,9 @@ static const char builtin_matrixCompMult[] =
" (declare (in) mat3x2 x)\n"
" (declare (in) mat3x2 y))\n"
" ((declare () mat3x2 z)\n"
- " (assign (constant bool (1)) (xy) (array_ref (var_ref z) (constant int (0))) (expression vec2 * (array_ref (var_ref x) (constant int (0))) (array_ref (var_ref y) (constant int (0)))))\n"
- " (assign (constant bool (1)) (xy) (array_ref (var_ref z) (constant int (1))) (expression vec2 * (array_ref (var_ref x) (constant int (1))) (array_ref (var_ref y) (constant int (1)))))\n"
- " (assign (constant bool (1)) (xy) (array_ref (var_ref z) (constant int (2))) (expression vec2 * (array_ref (var_ref x) (constant int (2))) (array_ref (var_ref y) (constant int (2)))))\n"
+ " (assign (xy) (array_ref (var_ref z) (constant int (0))) (expression vec2 * (array_ref (var_ref x) (constant int (0))) (array_ref (var_ref y) (constant int (0)))))\n"
+ " (assign (xy) (array_ref (var_ref z) (constant int (1))) (expression vec2 * (array_ref (var_ref x) (constant int (1))) (array_ref (var_ref y) (constant int (1)))))\n"
+ " (assign (xy) (array_ref (var_ref z) (constant int (2))) (expression vec2 * (array_ref (var_ref x) (constant int (2))) (array_ref (var_ref y) (constant int (2)))))\n"
"(return (var_ref z))))\n"
"\n"
" (signature mat2x4\n"
@@ -1497,8 +1499,8 @@ static const char builtin_matrixCompMult[] =
" (declare (in) mat2x4 x)\n"
" (declare (in) mat2x4 y))\n"
" ((declare () mat2x4 z)\n"
- " (assign (constant bool (1)) (xyzw) (array_ref (var_ref z) (constant int (0))) (expression vec4 * (array_ref (var_ref x) (constant int (0))) (array_ref (var_ref y) (constant int (0)))))\n"
- " (assign (constant bool (1)) (xyzw) (array_ref (var_ref z) (constant int (1))) (expression vec4 * (array_ref (var_ref x) (constant int (1))) (array_ref (var_ref y) (constant int (1)))))\n"
+ " (assign (xyzw) (array_ref (var_ref z) (constant int (0))) (expression vec4 * (array_ref (var_ref x) (constant int (0))) (array_ref (var_ref y) (constant int (0)))))\n"
+ " (assign (xyzw) (array_ref (var_ref z) (constant int (1))) (expression vec4 * (array_ref (var_ref x) (constant int (1))) (array_ref (var_ref y) (constant int (1)))))\n"
"(return (var_ref z))))\n"
"\n"
" (signature mat4x2\n"
@@ -1506,10 +1508,10 @@ static const char builtin_matrixCompMult[] =
" (declare (in) mat4x2 x)\n"
" (declare (in) mat4x2 y))\n"
" ((declare () mat4x2 z)\n"
- " (assign (constant bool (1)) (xy) (array_ref (var_ref z) (constant int (0))) (expression vec2 * (array_ref (var_ref x) (constant int (0))) (array_ref (var_ref y) (constant int (0)))))\n"
- " (assign (constant bool (1)) (xy) (array_ref (var_ref z) (constant int (1))) (expression vec2 * (array_ref (var_ref x) (constant int (1))) (array_ref (var_ref y) (constant int (1)))))\n"
- " (assign (constant bool (1)) (xy) (array_ref (var_ref z) (constant int (2))) (expression vec2 * (array_ref (var_ref x) (constant int (2))) (array_ref (var_ref y) (constant int (2)))))\n"
- " (assign (constant bool (1)) (xy) (array_ref (var_ref z) (constant int (3))) (expression vec2 * (array_ref (var_ref x) (constant int (3))) (array_ref (var_ref y) (constant int (3)))))\n"
+ " (assign (xy) (array_ref (var_ref z) (constant int (0))) (expression vec2 * (array_ref (var_ref x) (constant int (0))) (array_ref (var_ref y) (constant int (0)))))\n"
+ " (assign (xy) (array_ref (var_ref z) (constant int (1))) (expression vec2 * (array_ref (var_ref x) (constant int (1))) (array_ref (var_ref y) (constant int (1)))))\n"
+ " (assign (xy) (array_ref (var_ref z) (constant int (2))) (expression vec2 * (array_ref (var_ref x) (constant int (2))) (array_ref (var_ref y) (constant int (2)))))\n"
+ " (assign (xy) (array_ref (var_ref z) (constant int (3))) (expression vec2 * (array_ref (var_ref x) (constant int (3))) (array_ref (var_ref y) (constant int (3)))))\n"
"(return (var_ref z))))\n"
"\n"
" (signature mat3x4\n"
@@ -1517,9 +1519,9 @@ static const char builtin_matrixCompMult[] =
" (declare (in) mat3x4 x)\n"
" (declare (in) mat3x4 y))\n"
" ((declare () mat3x4 z)\n"
- " (assign (constant bool (1)) (xyzw) (array_ref (var_ref z) (constant int (0))) (expression vec4 * (array_ref (var_ref x) (constant int (0))) (array_ref (var_ref y) (constant int (0)))))\n"
- " (assign (constant bool (1)) (xyzw) (array_ref (var_ref z) (constant int (1))) (expression vec4 * (array_ref (var_ref x) (constant int (1))) (array_ref (var_ref y) (constant int (1)))))\n"
- " (assign (constant bool (1)) (xyzw) (array_ref (var_ref z) (constant int (2))) (expression vec4 * (array_ref (var_ref x) (constant int (2))) (array_ref (var_ref y) (constant int (2)))))\n"
+ " (assign (xyzw) (array_ref (var_ref z) (constant int (0))) (expression vec4 * (array_ref (var_ref x) (constant int (0))) (array_ref (var_ref y) (constant int (0)))))\n"
+ " (assign (xyzw) (array_ref (var_ref z) (constant int (1))) (expression vec4 * (array_ref (var_ref x) (constant int (1))) (array_ref (var_ref y) (constant int (1)))))\n"
+ " (assign (xyzw) (array_ref (var_ref z) (constant int (2))) (expression vec4 * (array_ref (var_ref x) (constant int (2))) (array_ref (var_ref y) (constant int (2)))))\n"
"(return (var_ref z))))\n"
"\n"
" (signature mat4x3\n"
@@ -1527,10 +1529,10 @@ static const char builtin_matrixCompMult[] =
" (declare (in) mat4x3 x)\n"
" (declare (in) mat4x3 y))\n"
" ((declare () mat4x3 z)\n"
- " (assign (constant bool (1)) (xyz) (array_ref (var_ref z) (constant int (0))) (expression vec3 * (array_ref (var_ref x) (constant int (0))) (array_ref (var_ref y) (constant int (0)))))\n"
- " (assign (constant bool (1)) (xyz) (array_ref (var_ref z) (constant int (1))) (expression vec3 * (array_ref (var_ref x) (constant int (1))) (array_ref (var_ref y) (constant int (1)))))\n"
- " (assign (constant bool (1)) (xyz) (array_ref (var_ref z) (constant int (2))) (expression vec3 * (array_ref (var_ref x) (constant int (2))) (array_ref (var_ref y) (constant int (2)))))\n"
- " (assign (constant bool (1)) (xyz) (array_ref (var_ref z) (constant int (3))) (expression vec3 * (array_ref (var_ref x) (constant int (3))) (array_ref (var_ref y) (constant int (3)))))\n"
+ " (assign (xyz) (array_ref (var_ref z) (constant int (0))) (expression vec3 * (array_ref (var_ref x) (constant int (0))) (array_ref (var_ref y) (constant int (0)))))\n"
+ " (assign (xyz) (array_ref (var_ref z) (constant int (1))) (expression vec3 * (array_ref (var_ref x) (constant int (1))) (array_ref (var_ref y) (constant int (1)))))\n"
+ " (assign (xyz) (array_ref (var_ref z) (constant int (2))) (expression vec3 * (array_ref (var_ref x) (constant int (2))) (array_ref (var_ref y) (constant int (2)))))\n"
+ " (assign (xyz) (array_ref (var_ref z) (constant int (3))) (expression vec3 * (array_ref (var_ref x) (constant int (3))) (array_ref (var_ref y) (constant int (3)))))\n"
"(return (var_ref z))))\n"
"))\n"
""
@@ -1939,9 +1941,8 @@ static const char builtin_modf[] =
" (declare (in) float x)\n"
" (declare (out) float i))\n"
" ((declare () float t)\n"
- " (assign (constant bool (1)) (x) (var_ref t)\n"
- " (expression float trunc (var_ref x)))\n"
- " (assign (constant bool (1)) (x) (var_ref i) (var_ref t))\n"
+ " (assign (x) (var_ref t) (expression float trunc (var_ref x)))\n"
+ " (assign (x) (var_ref i) (var_ref t))\n"
" (return (expression float - (var_ref x) (var_ref t)))))\n"
"\n"
" (signature vec2\n"
@@ -1949,9 +1950,8 @@ static const char builtin_modf[] =
" (declare (in) vec2 x)\n"
" (declare (out) vec2 i))\n"
" ((declare () vec2 t)\n"
- " (assign (constant bool (1)) (xy) (var_ref t)\n"
- " (expression vec2 trunc (var_ref x)))\n"
- " (assign (constant bool (1)) (xy) (var_ref i) (var_ref t))\n"
+ " (assign (xy) (var_ref t) (expression vec2 trunc (var_ref x)))\n"
+ " (assign (xy) (var_ref i) (var_ref t))\n"
" (return (expression vec2 - (var_ref x) (var_ref t)))))\n"
"\n"
" (signature vec3\n"
@@ -1959,9 +1959,8 @@ static const char builtin_modf[] =
" (declare (in) vec3 x)\n"
" (declare (out) vec3 i))\n"
" ((declare () vec3 t)\n"
- " (assign (constant bool (1)) (xyz) (var_ref t)\n"
- " (expression vec3 trunc (var_ref x)))\n"
- " (assign (constant bool (1)) (xyz) (var_ref i) (var_ref t))\n"
+ " (assign (xyz) (var_ref t) (expression vec3 trunc (var_ref x)))\n"
+ " (assign (xyz) (var_ref i) (var_ref t))\n"
" (return (expression vec3 - (var_ref x) (var_ref t)))))\n"
"\n"
" (signature vec4\n"
@@ -1969,9 +1968,8 @@ static const char builtin_modf[] =
" (declare (in) vec4 x)\n"
" (declare (out) vec4 i))\n"
" ((declare () vec4 t)\n"
- " (assign (constant bool (1)) (xyzw) (var_ref t)\n"
- " (expression vec4 trunc (var_ref x)))\n"
- " (assign (constant bool (1)) (xyzw) (var_ref i) (var_ref t))\n"
+ " (assign (xyzw) (var_ref t) (expression vec4 trunc (var_ref x)))\n"
+ " (assign (xyzw) (var_ref i) (var_ref t))\n"
" (return (expression vec4 - (var_ref x) (var_ref t)))))\n"
"))\n"
""
@@ -2006,10 +2004,10 @@ static const char builtin_noise2[] =
" (declare () float b)\n"
" (declare () vec2 t)\n"
"\n"
- " (assign (constant bool (1)) (x) (var_ref a) (expression float noise (var_ref p)))\n"
- " (assign (constant bool (1)) (x) (var_ref b) (expression float noise (expression vec4 + (var_ref p) (constant vec4 (601.0 313.0 29.0 277.0)))))\n"
- " (assign (constant bool (1)) (x) (var_ref t) (var_ref a))\n"
- " (assign (constant bool (1)) (y) (var_ref t) (var_ref b))\n"
+ " (assign (x) (var_ref a) (expression float noise (var_ref p)))\n"
+ " (assign (x) (var_ref b) (expression float noise (expression vec4 + (var_ref p) (constant vec4 (601.0 313.0 29.0 277.0)))))\n"
+ " (assign (x) (var_ref t) (var_ref a))\n"
+ " (assign (y) (var_ref t) (var_ref b))\n"
" (return (var_ref t))\n"
" ))\n"
"\n"
@@ -2020,10 +2018,10 @@ static const char builtin_noise2[] =
" (declare () float b)\n"
" (declare () vec2 t)\n"
"\n"
- " (assign (constant bool (1)) (x) (var_ref a) (expression float noise (var_ref p)))\n"
- " (assign (constant bool (1)) (x) (var_ref b) (expression float noise (expression vec3 + (var_ref p) (constant vec3 (601.0 313.0 29.0)))))\n"
- " (assign (constant bool (1)) (x) (var_ref t) (var_ref a))\n"
- " (assign (constant bool (1)) (y) (var_ref t) (var_ref b))\n"
+ " (assign (x) (var_ref a) (expression float noise (var_ref p)))\n"
+ " (assign (x) (var_ref b) (expression float noise (expression vec3 + (var_ref p) (constant vec3 (601.0 313.0 29.0)))))\n"
+ " (assign (x) (var_ref t) (var_ref a))\n"
+ " (assign (y) (var_ref t) (var_ref b))\n"
" (return (var_ref t))\n"
" ))\n"
"\n"
@@ -2036,10 +2034,10 @@ static const char builtin_noise2[] =
" (declare () float b)\n"
" (declare () vec2 t)\n"
"\n"
- " (assign (constant bool (1)) (x) (var_ref a) (expression float noise (var_ref p)))\n"
- " (assign (constant bool (1)) (x) (var_ref b) (expression float noise (expression vec2 + (var_ref p) (constant vec2 (601.0 313.0)))))\n"
- " (assign (constant bool (1)) (x) (var_ref t) (var_ref a))\n"
- " (assign (constant bool (1)) (y) (var_ref t) (var_ref b))\n"
+ " (assign (x) (var_ref a) (expression float noise (var_ref p)))\n"
+ " (assign (x) (var_ref b) (expression float noise (expression vec2 + (var_ref p) (constant vec2 (601.0 313.0)))))\n"
+ " (assign (x) (var_ref t) (var_ref a))\n"
+ " (assign (y) (var_ref t) (var_ref b))\n"
" (return (var_ref t))\n"
" ))\n"
"\n"
@@ -2052,10 +2050,10 @@ static const char builtin_noise2[] =
" (declare () float b)\n"
" (declare () vec2 t)\n"
"\n"
- " (assign (constant bool (1)) (x) (var_ref a) (expression float noise (var_ref p)))\n"
- " (assign (constant bool (1)) (x) (var_ref b) (expression float noise (expression float + (var_ref p) (constant float (601.0)))))\n"
- " (assign (constant bool (1)) (x) (var_ref t) (var_ref a))\n"
- " (assign (constant bool (1)) (y) (var_ref t) (var_ref b))\n"
+ " (assign (x) (var_ref a) (expression float noise (var_ref p)))\n"
+ " (assign (x) (var_ref b) (expression float noise (expression float + (var_ref p) (constant float (601.0)))))\n"
+ " (assign (x) (var_ref t) (var_ref a))\n"
+ " (assign (y) (var_ref t) (var_ref b))\n"
" (return (var_ref t))\n"
" ))\n"
"))\n"
@@ -2071,13 +2069,13 @@ static const char builtin_noise3[] =
" (declare () float c)\n"
" (declare () vec3 t)\n"
"\n"
- " (assign (constant bool (1)) (x) (var_ref a) (expression float noise (var_ref p)))\n"
- " (assign (constant bool (1)) (x) (var_ref b) (expression float noise (expression vec4 + (var_ref p) (constant vec4 (601.0 313.0 29.0 277.0)))))\n"
- " (assign (constant bool (1)) (x) (var_ref c) (expression float noise (expression vec4 + (var_ref p) (constant vec4 (1559.0 113.0 1861.0 797.0)))))\n"
+ " (assign (x) (var_ref a) (expression float noise (var_ref p)))\n"
+ " (assign (x) (var_ref b) (expression float noise (expression vec4 + (var_ref p) (constant vec4 (601.0 313.0 29.0 277.0)))))\n"
+ " (assign (x) (var_ref c) (expression float noise (expression vec4 + (var_ref p) (constant vec4 (1559.0 113.0 1861.0 797.0)))))\n"
"\n"
- " (assign (constant bool (1)) (x) (var_ref t) (var_ref a))\n"
- " (assign (constant bool (1)) (y) (var_ref t) (var_ref b))\n"
- " (assign (constant bool (1)) (z) (var_ref t) (var_ref c))\n"
+ " (assign (x) (var_ref t) (var_ref a))\n"
+ " (assign (y) (var_ref t) (var_ref b))\n"
+ " (assign (z) (var_ref t) (var_ref c))\n"
" (return (var_ref t))\n"
" ))\n"
"\n"
@@ -2089,13 +2087,13 @@ static const char builtin_noise3[] =
" (declare () float c)\n"
" (declare () vec3 t)\n"
"\n"
- " (assign (constant bool (1)) (x) (var_ref a) (expression float noise (var_ref p)))\n"
- " (assign (constant bool (1)) (x) (var_ref b) (expression float noise (expression vec3 + (var_ref p) (constant vec3 (601.0 313.0 29.0)))))\n"
- " (assign (constant bool (1)) (x) (var_ref c) (expression float noise (expression vec3 + (var_ref p) (constant vec3 (1559.0 113.0 1861.0)))))\n"
+ " (assign (x) (var_ref a) (expression float noise (var_ref p)))\n"
+ " (assign (x) (var_ref b) (expression float noise (expression vec3 + (var_ref p) (constant vec3 (601.0 313.0 29.0)))))\n"
+ " (assign (x) (var_ref c) (expression float noise (expression vec3 + (var_ref p) (constant vec3 (1559.0 113.0 1861.0)))))\n"
"\n"
- " (assign (constant bool (1)) (x) (var_ref t) (var_ref a))\n"
- " (assign (constant bool (1)) (y) (var_ref t) (var_ref b))\n"
- " (assign (constant bool (1)) (z) (var_ref t) (var_ref c))\n"
+ " (assign (x) (var_ref t) (var_ref a))\n"
+ " (assign (y) (var_ref t) (var_ref b))\n"
+ " (assign (z) (var_ref t) (var_ref c))\n"
" (return (var_ref t))\n"
" ))\n"
"\n"
@@ -2107,13 +2105,13 @@ static const char builtin_noise3[] =
" (declare () float c)\n"
" (declare () vec3 t)\n"
"\n"
- " (assign (constant bool (1)) (x) (var_ref a) (expression float noise (var_ref p)))\n"
- " (assign (constant bool (1)) (x) (var_ref b) (expression float noise (expression vec2 + (var_ref p) (constant vec2 (601.0 313.0)))))\n"
- " (assign (constant bool (1)) (x) (var_ref c) (expression float noise (expression vec2 + (var_ref p) (constant vec2 (1559.0 113.0)))))\n"
+ " (assign (x) (var_ref a) (expression float noise (var_ref p)))\n"
+ " (assign (x) (var_ref b) (expression float noise (expression vec2 + (var_ref p) (constant vec2 (601.0 313.0)))))\n"
+ " (assign (x) (var_ref c) (expression float noise (expression vec2 + (var_ref p) (constant vec2 (1559.0 113.0)))))\n"
"\n"
- " (assign (constant bool (1)) (x) (var_ref t) (var_ref a))\n"
- " (assign (constant bool (1)) (y) (var_ref t) (var_ref b))\n"
- " (assign (constant bool (1)) (z) (var_ref t) (var_ref c))\n"
+ " (assign (x) (var_ref t) (var_ref a))\n"
+ " (assign (y) (var_ref t) (var_ref b))\n"
+ " (assign (z) (var_ref t) (var_ref c))\n"
" (return (var_ref t))\n"
" ))\n"
"\n"
@@ -2125,13 +2123,13 @@ static const char builtin_noise3[] =
" (declare () float c)\n"
" (declare () vec3 t)\n"
"\n"
- " (assign (constant bool (1)) (x) (var_ref a) (expression float noise (var_ref p)))\n"
- " (assign (constant bool (1)) (x) (var_ref b) (expression float noise (expression float + (var_ref p) (constant float (601.0)))))\n"
- " (assign (constant bool (1)) (x) (var_ref c) (expression float noise (expression float + (var_ref p) (constant float (1559.0)))))\n"
+ " (assign (x) (var_ref a) (expression float noise (var_ref p)))\n"
+ " (assign (x) (var_ref b) (expression float noise (expression float + (var_ref p) (constant float (601.0)))))\n"
+ " (assign (x) (var_ref c) (expression float noise (expression float + (var_ref p) (constant float (1559.0)))))\n"
"\n"
- " (assign (constant bool (1)) (x) (var_ref t) (var_ref a))\n"
- " (assign (constant bool (1)) (y) (var_ref t) (var_ref b))\n"
- " (assign (constant bool (1)) (z) (var_ref t) (var_ref c))\n"
+ " (assign (x) (var_ref t) (var_ref a))\n"
+ " (assign (y) (var_ref t) (var_ref b))\n"
+ " (assign (z) (var_ref t) (var_ref c))\n"
" (return (var_ref t))\n"
" ))\n"
"))\n"
@@ -2149,17 +2147,17 @@ static const char builtin_noise4[] =
" (declare () vec4 _r)\n"
"\n"
" (declare () vec4 _p)\n"
- " (assign (constant bool (1)) (xyzw) (var_ref _p) (expression vec4 + (var_ref p) (constant vec4 (1559.0 113.0 1861.0 797.0))) )\n"
+ " (assign (xyzw) (var_ref _p) (expression vec4 + (var_ref p) (constant vec4 (1559.0 113.0 1861.0 797.0))) )\n"
"\n"
- " (assign (constant bool (1)) (x) (var_ref _x) (expression float noise(var_ref p)))\n"
- " (assign (constant bool (1)) (x) (var_ref _y) (expression float noise(expression vec4 + (var_ref p) (constant vec4 (601.0 313.0 29.0 277.0)))))\n"
- " (assign (constant bool (1)) (x) (var_ref _z) (expression float noise(var_ref _p)))\n"
- " (assign (constant bool (1)) (x) (var_ref _w) (expression float noise(expression vec4 + (var_ref _p) (constant vec4 (601.0 313.0 29.0 277.0)))))\n"
+ " (assign (x) (var_ref _x) (expression float noise(var_ref p)))\n"
+ " (assign (x) (var_ref _y) (expression float noise(expression vec4 + (var_ref p) (constant vec4 (601.0 313.0 29.0 277.0)))))\n"
+ " (assign (x) (var_ref _z) (expression float noise(var_ref _p)))\n"
+ " (assign (x) (var_ref _w) (expression float noise(expression vec4 + (var_ref _p) (constant vec4 (601.0 313.0 29.0 277.0)))))\n"
"\n"
- " (assign (constant bool (1)) (x) (var_ref _r) (var_ref _x))\n"
- " (assign (constant bool (1)) (y) (var_ref _r) (var_ref _y))\n"
- " (assign (constant bool (1)) (z) (var_ref _r) (var_ref _z))\n"
- " (assign (constant bool (1)) (w) (var_ref _r) (var_ref _w))\n"
+ " (assign (x) (var_ref _r) (var_ref _x))\n"
+ " (assign (y) (var_ref _r) (var_ref _y))\n"
+ " (assign (z) (var_ref _r) (var_ref _z))\n"
+ " (assign (w) (var_ref _r) (var_ref _w))\n"
" (return (var_ref _r))\n"
" ))\n"
"\n"
@@ -2173,17 +2171,17 @@ static const char builtin_noise4[] =
" (declare () vec4 _r)\n"
"\n"
" (declare () vec3 _p)\n"
- " (assign (constant bool (1)) (xyz) (var_ref _p) (expression vec3 + (var_ref p) (constant vec3 (1559.0 113.0 1861.0))) )\n"
+ " (assign (xyz) (var_ref _p) (expression vec3 + (var_ref p) (constant vec3 (1559.0 113.0 1861.0))) )\n"
"\n"
- " (assign (constant bool (1)) (x) (var_ref _x) (expression float noise(var_ref p)))\n"
- " (assign (constant bool (1)) (x) (var_ref _y) (expression float noise(expression vec3 + (var_ref p) (constant vec3 (601.0 313.0 29.0)))))\n"
- " (assign (constant bool (1)) (x) (var_ref _z) (expression float noise(var_ref _p)))\n"
- " (assign (constant bool (1)) (x) (var_ref _w) (expression float noise(expression vec3 + (var_ref _p) (constant vec3 (601.0 313.0 29.0)))))\n"
+ " (assign (x) (var_ref _x) (expression float noise(var_ref p)))\n"
+ " (assign (x) (var_ref _y) (expression float noise(expression vec3 + (var_ref p) (constant vec3 (601.0 313.0 29.0)))))\n"
+ " (assign (x) (var_ref _z) (expression float noise(var_ref _p)))\n"
+ " (assign (x) (var_ref _w) (expression float noise(expression vec3 + (var_ref _p) (constant vec3 (601.0 313.0 29.0)))))\n"
"\n"
- " (assign (constant bool (1)) (x) (var_ref _r) (var_ref _x))\n"
- " (assign (constant bool (1)) (y) (var_ref _r) (var_ref _y))\n"
- " (assign (constant bool (1)) (z) (var_ref _r) (var_ref _z))\n"
- " (assign (constant bool (1)) (w) (var_ref _r) (var_ref _w))\n"
+ " (assign (x) (var_ref _r) (var_ref _x))\n"
+ " (assign (y) (var_ref _r) (var_ref _y))\n"
+ " (assign (z) (var_ref _r) (var_ref _z))\n"
+ " (assign (w) (var_ref _r) (var_ref _w))\n"
" (return (var_ref _r))\n"
" ))\n"
"\n"
@@ -2197,17 +2195,17 @@ static const char builtin_noise4[] =
" (declare () vec4 _r)\n"
"\n"
" (declare () vec2 _p)\n"
- " (assign (constant bool (1)) (xy) (var_ref _p) (expression vec2 + (var_ref p) (constant vec2 (1559.0 113.0))) )\n"
+ " (assign (xy) (var_ref _p) (expression vec2 + (var_ref p) (constant vec2 (1559.0 113.0))) )\n"
"\n"
- " (assign (constant bool (1)) (x) (var_ref _x) (expression float noise(var_ref p)))\n"
- " (assign (constant bool (1)) (x) (var_ref _y) (expression float noise(expression vec2 + (var_ref p) (constant vec2 (601.0 313.0)))))\n"
- " (assign (constant bool (1)) (x) (var_ref _z) (expression float noise(var_ref _p)))\n"
- " (assign (constant bool (1)) (x) (var_ref _w) (expression float noise(expression vec2 + (var_ref _p) (constant vec2 (601.0 313.0)))))\n"
+ " (assign (x) (var_ref _x) (expression float noise(var_ref p)))\n"
+ " (assign (x) (var_ref _y) (expression float noise(expression vec2 + (var_ref p) (constant vec2 (601.0 313.0)))))\n"
+ " (assign (x) (var_ref _z) (expression float noise(var_ref _p)))\n"
+ " (assign (x) (var_ref _w) (expression float noise(expression vec2 + (var_ref _p) (constant vec2 (601.0 313.0)))))\n"
"\n"
- " (assign (constant bool (1)) (x) (var_ref _r) (var_ref _x))\n"
- " (assign (constant bool (1)) (y) (var_ref _r) (var_ref _y))\n"
- " (assign (constant bool (1)) (z) (var_ref _r) (var_ref _z))\n"
- " (assign (constant bool (1)) (w) (var_ref _r) (var_ref _w))\n"
+ " (assign (x) (var_ref _r) (var_ref _x))\n"
+ " (assign (y) (var_ref _r) (var_ref _y))\n"
+ " (assign (z) (var_ref _r) (var_ref _z))\n"
+ " (assign (w) (var_ref _r) (var_ref _w))\n"
" (return (var_ref _r))\n"
" ))\n"
"\n"
@@ -2221,17 +2219,17 @@ static const char builtin_noise4[] =
" (declare () vec4 _r)\n"
"\n"
" (declare () float _p)\n"
- " (assign (constant bool (1)) (x) (var_ref _p) (expression float + (var_ref p) (constant float (1559.0))) )\n"
+ " (assign (x) (var_ref _p) (expression float + (var_ref p) (constant float (1559.0))) )\n"
"\n"
- " (assign (constant bool (1)) (x) (var_ref _x) (expression float noise(var_ref p)))\n"
- " (assign (constant bool (1)) (x) (var_ref _y) (expression float noise(expression float + (var_ref p) (constant float (601.0 313.0 29.0 277.0)))))\n"
- " (assign (constant bool (1)) (x) (var_ref _z) (expression float noise(var_ref _p)))\n"
- " (assign (constant bool (1)) (x) (var_ref _w) (expression float noise(expression float + (var_ref _p) (constant float (601.0 313.0 29.0 277.0)))))\n"
+ " (assign (x) (var_ref _x) (expression float noise(var_ref p)))\n"
+ " (assign (x) (var_ref _y) (expression float noise(expression float + (var_ref p) (constant float (601.0 313.0 29.0 277.0)))))\n"
+ " (assign (x) (var_ref _z) (expression float noise(var_ref _p)))\n"
+ " (assign (x) (var_ref _w) (expression float noise(expression float + (var_ref _p) (constant float (601.0 313.0 29.0 277.0)))))\n"
"\n"
- " (assign (constant bool (1)) (x) (var_ref _r) (var_ref _x))\n"
- " (assign (constant bool (1)) (y) (var_ref _r) (var_ref _y))\n"
- " (assign (constant bool (1)) (z) (var_ref _r) (var_ref _z))\n"
- " (assign (constant bool (1)) (w) (var_ref _r) (var_ref _w))\n"
+ " (assign (x) (var_ref _r) (var_ref _x))\n"
+ " (assign (y) (var_ref _r) (var_ref _y))\n"
+ " (assign (z) (var_ref _r) (var_ref _z))\n"
+ " (assign (w) (var_ref _r) (var_ref _w))\n"
" (return (var_ref _r))\n"
" ))\n"
"))\n"
@@ -2363,8 +2361,8 @@ static const char builtin_outerProduct[] =
" (declare (in) vec2 u)\n"
" (declare (in) vec2 v))\n"
" ((declare () mat2 m)\n"
- " (assign (constant bool (1)) (xy) (array_ref (var_ref m) (constant int (0))) (expression vec2 * (var_ref u) (swiz x (var_ref v))))\n"
- " (assign (constant bool (1)) (xy) (array_ref (var_ref m) (constant int (1))) (expression vec2 * (var_ref u) (swiz y (var_ref v))))\n"
+ " (assign (xy) (array_ref (var_ref m) (constant int (0))) (expression vec2 * (var_ref u) (swiz x (var_ref v))))\n"
+ " (assign (xy) (array_ref (var_ref m) (constant int (1))) (expression vec2 * (var_ref u) (swiz y (var_ref v))))\n"
" (return (var_ref m))))\n"
"\n"
" (signature mat2x3\n"
@@ -2372,8 +2370,8 @@ static const char builtin_outerProduct[] =
" (declare (in) vec3 u)\n"
" (declare (in) vec2 v))\n"
" ((declare () mat2x3 m)\n"
- " (assign (constant bool (1)) (xyz) (array_ref (var_ref m) (constant int (0))) (expression vec3 * (var_ref u) (swiz x (var_ref v))))\n"
- " (assign (constant bool (1)) (xyz) (array_ref (var_ref m) (constant int (1))) (expression vec3 * (var_ref u) (swiz y (var_ref v))))\n"
+ " (assign (xyz) (array_ref (var_ref m) (constant int (0))) (expression vec3 * (var_ref u) (swiz x (var_ref v))))\n"
+ " (assign (xyz) (array_ref (var_ref m) (constant int (1))) (expression vec3 * (var_ref u) (swiz y (var_ref v))))\n"
" (return (var_ref m))))\n"
"\n"
" (signature mat2x4\n"
@@ -2381,8 +2379,8 @@ static const char builtin_outerProduct[] =
" (declare (in) vec4 u)\n"
" (declare (in) vec2 v))\n"
" ((declare () mat2x4 m)\n"
- " (assign (constant bool (1)) (xyzw) (array_ref (var_ref m) (constant int (0))) (expression vec4 * (var_ref u) (swiz x (var_ref v))))\n"
- " (assign (constant bool (1)) (xyzw) (array_ref (var_ref m) (constant int (1))) (expression vec4 * (var_ref u) (swiz y (var_ref v))))\n"
+ " (assign (xyzw) (array_ref (var_ref m) (constant int (0))) (expression vec4 * (var_ref u) (swiz x (var_ref v))))\n"
+ " (assign (xyzw) (array_ref (var_ref m) (constant int (1))) (expression vec4 * (var_ref u) (swiz y (var_ref v))))\n"
" (return (var_ref m))))\n"
"\n"
" (signature mat3x2\n"
@@ -2390,9 +2388,9 @@ static const char builtin_outerProduct[] =
" (declare (in) vec2 u)\n"
" (declare (in) vec3 v))\n"
" ((declare () mat3x2 m)\n"
- " (assign (constant bool (1)) (xy) (array_ref (var_ref m) (constant int (0))) (expression vec2 * (var_ref u) (swiz x (var_ref v))))\n"
- " (assign (constant bool (1)) (xy) (array_ref (var_ref m) (constant int (1))) (expression vec2 * (var_ref u) (swiz y (var_ref v))))\n"
- " (assign (constant bool (1)) (xy) (array_ref (var_ref m) (constant int (2))) (expression vec2 * (var_ref u) (swiz z (var_ref v))))\n"
+ " (assign (xy) (array_ref (var_ref m) (constant int (0))) (expression vec2 * (var_ref u) (swiz x (var_ref v))))\n"
+ " (assign (xy) (array_ref (var_ref m) (constant int (1))) (expression vec2 * (var_ref u) (swiz y (var_ref v))))\n"
+ " (assign (xy) (array_ref (var_ref m) (constant int (2))) (expression vec2 * (var_ref u) (swiz z (var_ref v))))\n"
" (return (var_ref m))\n"
" ))\n"
"\n"
@@ -2401,9 +2399,9 @@ static const char builtin_outerProduct[] =
" (declare (in) vec3 u)\n"
" (declare (in) vec3 v))\n"
" ((declare () mat3 m)\n"
- " (assign (constant bool (1)) (xyz) (array_ref (var_ref m) (constant int (0))) (expression vec3 * (var_ref u) (swiz x (var_ref v))))\n"
- " (assign (constant bool (1)) (xyz) (array_ref (var_ref m) (constant int (1))) (expression vec3 * (var_ref u) (swiz y (var_ref v))))\n"
- " (assign (constant bool (1)) (xyz) (array_ref (var_ref m) (constant int (2))) (expression vec3 * (var_ref u) (swiz z (var_ref v))))\n"
+ " (assign (xyz) (array_ref (var_ref m) (constant int (0))) (expression vec3 * (var_ref u) (swiz x (var_ref v))))\n"
+ " (assign (xyz) (array_ref (var_ref m) (constant int (1))) (expression vec3 * (var_ref u) (swiz y (var_ref v))))\n"
+ " (assign (xyz) (array_ref (var_ref m) (constant int (2))) (expression vec3 * (var_ref u) (swiz z (var_ref v))))\n"
" (return (var_ref m))))\n"
"\n"
" (signature mat3x4\n"
@@ -2411,9 +2409,9 @@ static const char builtin_outerProduct[] =
" (declare (in) vec4 u)\n"
" (declare (in) vec3 v))\n"
" ((declare () mat3x4 m)\n"
- " (assign (constant bool (1)) (xyzw) (array_ref (var_ref m) (constant int (0))) (expression vec4 * (var_ref u) (swiz x (var_ref v))))\n"
- " (assign (constant bool (1)) (xyzw) (array_ref (var_ref m) (constant int (1))) (expression vec4 * (var_ref u) (swiz y (var_ref v))))\n"
- " (assign (constant bool (1)) (xyzw) (array_ref (var_ref m) (constant int (2))) (expression vec4 * (var_ref u) (swiz z (var_ref v))))\n"
+ " (assign (xyzw) (array_ref (var_ref m) (constant int (0))) (expression vec4 * (var_ref u) (swiz x (var_ref v))))\n"
+ " (assign (xyzw) (array_ref (var_ref m) (constant int (1))) (expression vec4 * (var_ref u) (swiz y (var_ref v))))\n"
+ " (assign (xyzw) (array_ref (var_ref m) (constant int (2))) (expression vec4 * (var_ref u) (swiz z (var_ref v))))\n"
" (return (var_ref m))))\n"
"\n"
" (signature mat4x2\n"
@@ -2421,10 +2419,10 @@ static const char builtin_outerProduct[] =
" (declare (in) vec2 u)\n"
" (declare (in) vec4 v))\n"
" ((declare () mat4x2 m)\n"
- " (assign (constant bool (1)) (xy) (array_ref (var_ref m) (constant int (0))) (expression vec2 * (var_ref u) (swiz x (var_ref v))))\n"
- " (assign (constant bool (1)) (xy) (array_ref (var_ref m) (constant int (1))) (expression vec2 * (var_ref u) (swiz y (var_ref v))))\n"
- " (assign (constant bool (1)) (xy) (array_ref (var_ref m) (constant int (2))) (expression vec2 * (var_ref u) (swiz z (var_ref v))))\n"
- " (assign (constant bool (1)) (xy) (array_ref (var_ref m) (constant int (3))) (expression vec2 * (var_ref u) (swiz w (var_ref v))))\n"
+ " (assign (xy) (array_ref (var_ref m) (constant int (0))) (expression vec2 * (var_ref u) (swiz x (var_ref v))))\n"
+ " (assign (xy) (array_ref (var_ref m) (constant int (1))) (expression vec2 * (var_ref u) (swiz y (var_ref v))))\n"
+ " (assign (xy) (array_ref (var_ref m) (constant int (2))) (expression vec2 * (var_ref u) (swiz z (var_ref v))))\n"
+ " (assign (xy) (array_ref (var_ref m) (constant int (3))) (expression vec2 * (var_ref u) (swiz w (var_ref v))))\n"
" (return (var_ref m))))\n"
"\n"
" (signature mat4x3\n"
@@ -2432,10 +2430,10 @@ static const char builtin_outerProduct[] =
" (declare (in) vec3 u)\n"
" (declare (in) vec4 v))\n"
" ((declare () mat4x3 m)\n"
- " (assign (constant bool (1)) (xyz) (array_ref (var_ref m) (constant int (0))) (expression vec3 * (var_ref u) (swiz x (var_ref v))))\n"
- " (assign (constant bool (1)) (xyz) (array_ref (var_ref m) (constant int (1))) (expression vec3 * (var_ref u) (swiz y (var_ref v))))\n"
- " (assign (constant bool (1)) (xyz) (array_ref (var_ref m) (constant int (2))) (expression vec3 * (var_ref u) (swiz z (var_ref v))))\n"
- " (assign (constant bool (1)) (xyz) (array_ref (var_ref m) (constant int (3))) (expression vec3 * (var_ref u) (swiz w (var_ref v))))\n"
+ " (assign (xyz) (array_ref (var_ref m) (constant int (0))) (expression vec3 * (var_ref u) (swiz x (var_ref v))))\n"
+ " (assign (xyz) (array_ref (var_ref m) (constant int (1))) (expression vec3 * (var_ref u) (swiz y (var_ref v))))\n"
+ " (assign (xyz) (array_ref (var_ref m) (constant int (2))) (expression vec3 * (var_ref u) (swiz z (var_ref v))))\n"
+ " (assign (xyz) (array_ref (var_ref m) (constant int (3))) (expression vec3 * (var_ref u) (swiz w (var_ref v))))\n"
" (return (var_ref m))))\n"
"\n"
" (signature mat4\n"
@@ -2443,10 +2441,10 @@ static const char builtin_outerProduct[] =
" (declare (in) vec4 u)\n"
" (declare (in) vec4 v))\n"
" ((declare () mat4 m)\n"
- " (assign (constant bool (1)) (xyzw) (array_ref (var_ref m) (constant int (0))) (expression vec4 * (var_ref u) (swiz x (var_ref v))))\n"
- " (assign (constant bool (1)) (xyzw) (array_ref (var_ref m) (constant int (1))) (expression vec4 * (var_ref u) (swiz y (var_ref v))))\n"
- " (assign (constant bool (1)) (xyzw) (array_ref (var_ref m) (constant int (2))) (expression vec4 * (var_ref u) (swiz z (var_ref v))))\n"
- " (assign (constant bool (1)) (xyzw) (array_ref (var_ref m) (constant int (3))) (expression vec4 * (var_ref u) (swiz w (var_ref v))))\n"
+ " (assign (xyzw) (array_ref (var_ref m) (constant int (0))) (expression vec4 * (var_ref u) (swiz x (var_ref v))))\n"
+ " (assign (xyzw) (array_ref (var_ref m) (constant int (1))) (expression vec4 * (var_ref u) (swiz y (var_ref v))))\n"
+ " (assign (xyzw) (array_ref (var_ref m) (constant int (2))) (expression vec4 * (var_ref u) (swiz z (var_ref v))))\n"
+ " (assign (xyzw) (array_ref (var_ref m) (constant int (3))) (expression vec4 * (var_ref u) (swiz w (var_ref v))))\n"
" (return (var_ref m))))\n"
"))\n"
""
@@ -2572,7 +2570,7 @@ static const char builtin_refract[] =
" (declare (in) float n)\n"
" (declare (in) float eta))\n"
" ((declare () float k)\n"
- " (assign (constant bool (1)) (x) (var_ref k)\n"
+ " (assign (x) (var_ref k)\n"
" (expression float - (constant float (1.0))\n"
" (expression float * (var_ref eta)\n"
" (expression float * (var_ref eta)\n"
@@ -2597,7 +2595,7 @@ static const char builtin_refract[] =
" (declare (in) vec2 n)\n"
" (declare (in) float eta))\n"
" ((declare () float k)\n"
- " (assign (constant bool (1)) (x) (var_ref k)\n"
+ " (assign (x) (var_ref k)\n"
" (expression float - (constant float (1.0))\n"
" (expression float * (var_ref eta)\n"
" (expression float * (var_ref eta)\n"
@@ -2622,7 +2620,7 @@ static const char builtin_refract[] =
" (declare (in) vec3 n)\n"
" (declare (in) float eta))\n"
" ((declare () float k)\n"
- " (assign (constant bool (1)) (x) (var_ref k)\n"
+ " (assign (x) (var_ref k)\n"
" (expression float - (constant float (1.0))\n"
" (expression float * (var_ref eta)\n"
" (expression float * (var_ref eta)\n"
@@ -2647,7 +2645,7 @@ static const char builtin_refract[] =
" (declare (in) vec4 n)\n"
" (declare (in) float eta))\n"
" ((declare () float k)\n"
- " (assign (constant bool (1)) (x) (var_ref k)\n"
+ " (assign (x) (var_ref k)\n"
" (expression float - (constant float (1.0))\n"
" (expression float * (var_ref eta)\n"
" (expression float * (var_ref eta)\n"
@@ -2723,14 +2721,14 @@ static const char builtin_shadow1D[] =
" (parameters\n"
" (declare (in) sampler1DShadow sampler)\n"
" (declare (in) vec3 P) )\n"
- " ((return (tex (var_ref sampler) (swiz x (var_ref P)) (0 0 0) 1 (swiz z (var_ref P)) ))))\n"
+ " ((return (tex vec4 (var_ref sampler) (swiz x (var_ref P)) 0 1 (swiz z (var_ref P)) ))))\n"
"\n"
" (signature vec4\n"
" (parameters\n"
" (declare (in) sampler1DShadow sampler)\n"
" (declare (in) vec3 P) \n"
" (declare (in) float bias) )\n"
- " ((return (txb (var_ref sampler) (swiz x (var_ref P)) (0 0 0) 1 (swiz z (var_ref P)) (var_ref bias) ))))\n"
+ " ((return (txb vec4 (var_ref sampler) (swiz x (var_ref P)) 0 1 (swiz z (var_ref P)) (var_ref bias) ))))\n"
"\n"
"))\n"
""
@@ -2741,14 +2739,14 @@ static const char builtin_shadow1DArray[] =
" (parameters\n"
" (declare (in) sampler1DArrayShadow sampler)\n"
" (declare (in) vec3 P) )\n"
- " ((return (tex (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) 1 (swiz z (var_ref P)) ))))\n"
+ " ((return (tex vec4 (var_ref sampler) (swiz xy (var_ref P)) 0 1 (swiz z (var_ref P)) ))))\n"
"\n"
" (signature vec4\n"
" (parameters\n"
" (declare (in) sampler1DArrayShadow sampler)\n"
" (declare (in) vec3 P) \n"
" (declare (in) float bias) )\n"
- " ((return (txb (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) 1 (swiz z (var_ref P)) (var_ref bias) ))))\n"
+ " ((return (txb vec4 (var_ref sampler) (swiz xy (var_ref P)) 0 1 (swiz z (var_ref P)) (var_ref bias) ))))\n"
"\n"
"))\n"
""
@@ -2760,7 +2758,7 @@ static const char builtin_shadow1DArrayLod[] =
" (declare (in) sampler1DArrayShadow sampler)\n"
" (declare (in) vec3 P) \n"
" (declare (in) float lod) )\n"
- " ((return (txl (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) 1 (swiz z (var_ref P)) (var_ref lod) ))))\n"
+ " ((return (txl vec4 (var_ref sampler) (swiz xy (var_ref P)) 0 1 (swiz z (var_ref P)) (var_ref lod) ))))\n"
"\n"
"))\n"
""
@@ -2772,7 +2770,7 @@ static const char builtin_shadow1DLod[] =
" (declare (in) sampler1DShadow sampler)\n"
" (declare (in) vec3 P) \n"
" (declare (in) float lod) )\n"
- " ((return (txl (var_ref sampler) (swiz x (var_ref P)) (0 0 0) 1 (swiz z (var_ref P)) (var_ref lod) ))))\n"
+ " ((return (txl vec4 (var_ref sampler) (swiz x (var_ref P)) 0 1 (swiz z (var_ref P)) (var_ref lod) ))))\n"
"\n"
"))\n"
""
@@ -2783,14 +2781,14 @@ static const char builtin_shadow1DProj[] =
" (parameters\n"
" (declare (in) sampler1DShadow sampler)\n"
" (declare (in) vec4 P) )\n"
- " ((return (tex (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz w (var_ref P)) (swiz z (var_ref P)) ))))\n"
+ " ((return (tex vec4 (var_ref sampler) (swiz x (var_ref P)) 0 (swiz w (var_ref P)) (swiz z (var_ref P)) ))))\n"
"\n"
" (signature vec4\n"
" (parameters\n"
" (declare (in) sampler1DShadow sampler)\n"
" (declare (in) vec4 P) \n"
" (declare (in) float bias) )\n"
- " ((return (txb (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz w (var_ref P)) (swiz z (var_ref P)) (var_ref bias) ))))\n"
+ " ((return (txb vec4 (var_ref sampler) (swiz x (var_ref P)) 0 (swiz w (var_ref P)) (swiz z (var_ref P)) (var_ref bias) ))))\n"
"\n"
"))\n"
""
@@ -2802,7 +2800,7 @@ static const char builtin_shadow1DProjLod[] =
" (declare (in) sampler1DShadow sampler)\n"
" (declare (in) vec4 P) \n"
" (declare (in) float lod) )\n"
- " ((return (txl (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz w (var_ref P)) (swiz z (var_ref P)) (var_ref lod) ))))\n"
+ " ((return (txl vec4 (var_ref sampler) (swiz x (var_ref P)) 0 (swiz w (var_ref P)) (swiz z (var_ref P)) (var_ref lod) ))))\n"
"\n"
"))\n"
""
@@ -2813,14 +2811,14 @@ static const char builtin_shadow2D[] =
" (parameters\n"
" (declare (in) sampler2DShadow sampler)\n"
" (declare (in) vec3 P) )\n"
- " ((return (tex (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) 1 (swiz z (var_ref P)) ))))\n"
+ " ((return (tex vec4 (var_ref sampler) (swiz xy (var_ref P)) 0 1 (swiz z (var_ref P)) ))))\n"
"\n"
" (signature vec4\n"
" (parameters\n"
" (declare (in) sampler2DShadow sampler)\n"
" (declare (in) vec3 P) \n"
" (declare (in) float bias) )\n"
- " ((return (txb (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) 1 (swiz z (var_ref P)) (var_ref bias) ))))\n"
+ " ((return (txb vec4 (var_ref sampler) (swiz xy (var_ref P)) 0 1 (swiz z (var_ref P)) (var_ref bias) ))))\n"
"\n"
"))\n"
""
@@ -2831,7 +2829,7 @@ static const char builtin_shadow2DArray[] =
" (parameters\n"
" (declare (in) sampler2DArrayShadow sampler)\n"
" (declare (in) vec4 P) )\n"
- " ((return (tex (var_ref sampler) (swiz xyz (var_ref P)) (0 0 0) 1 (swiz w (var_ref P)) ))))\n"
+ " ((return (tex vec4 (var_ref sampler) (swiz xyz (var_ref P)) 0 1 (swiz w (var_ref P)) ))))\n"
"\n"
"))\n"
""
@@ -2843,7 +2841,7 @@ static const char builtin_shadow2DLod[] =
" (declare (in) sampler2DShadow sampler)\n"
" (declare (in) vec3 P) \n"
" (declare (in) float lod) )\n"
- " ((return (txl (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) 1 (swiz z (var_ref P)) (var_ref lod) ))))\n"
+ " ((return (txl vec4 (var_ref sampler) (swiz xy (var_ref P)) 0 1 (swiz z (var_ref P)) (var_ref lod) ))))\n"
"\n"
"))\n"
""
@@ -2854,14 +2852,14 @@ static const char builtin_shadow2DProj[] =
" (parameters\n"
" (declare (in) sampler2DShadow sampler)\n"
" (declare (in) vec4 P) )\n"
- " ((return (tex (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz w (var_ref P)) (swiz z (var_ref P)) ))))\n"
+ " ((return (tex vec4 (var_ref sampler) (swiz xy (var_ref P)) 0 (swiz w (var_ref P)) (swiz z (var_ref P)) ))))\n"
"\n"
" (signature vec4\n"
" (parameters\n"
" (declare (in) sampler2DShadow sampler)\n"
" (declare (in) vec4 P) \n"
" (declare (in) float bias) )\n"
- " ((return (txb (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz w (var_ref P)) (swiz z (var_ref P)) (var_ref bias) ))))\n"
+ " ((return (txb vec4 (var_ref sampler) (swiz xy (var_ref P)) 0 (swiz w (var_ref P)) (swiz z (var_ref P)) (var_ref bias) ))))\n"
"\n"
"))\n"
""
@@ -2873,7 +2871,7 @@ static const char builtin_shadow2DProjLod[] =
" (declare (in) sampler2DShadow sampler)\n"
" (declare (in) vec4 P) \n"
" (declare (in) float lod) )\n"
- " ((return (txl (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz w (var_ref P)) (swiz z (var_ref P)) (var_ref lod) ))))\n"
+ " ((return (txl vec4 (var_ref sampler) (swiz xy (var_ref P)) 0 (swiz w (var_ref P)) (swiz z (var_ref P)) (var_ref lod) ))))\n"
"\n"
"))\n"
""
@@ -2884,7 +2882,7 @@ static const char builtin_shadow2DRect[] =
" (parameters\n"
" (declare (in) sampler2DRectShadow sampler)\n"
" (declare (in) vec3 P) )\n"
- " ((return (tex (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) 1 (swiz z (var_ref P)) ))))\n"
+ " ((return (tex vec4 (var_ref sampler) (swiz xy (var_ref P)) 0 1 (swiz z (var_ref P)) ))))\n"
"\n"
"))\n"
""
@@ -2895,7 +2893,7 @@ static const char builtin_shadow2DRectProj[] =
" (parameters\n"
" (declare (in) sampler2DRectShadow sampler)\n"
" (declare (in) vec4 P) )\n"
- " ((return (tex (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz w (var_ref P)) (swiz z (var_ref P)) ))))\n"
+ " ((return (tex vec4 (var_ref sampler) (swiz xy (var_ref P)) 0 (swiz w (var_ref P)) (swiz z (var_ref P)) ))))\n"
"\n"
"))\n"
""
@@ -3010,40 +3008,26 @@ static const char builtin_smoothstep[] =
" (declare (in) float edge1)\n"
" (declare (in) float x))\n"
" ((declare () float t)\n"
- "\n"
- " (assign (constant bool (1)) (x) (var_ref t)\n"
+ " (assign (x) (var_ref t)\n"
" (expression float max\n"
" (expression float min\n"
" (expression float / (expression float - (var_ref x) (var_ref edge0)) (expression float - (var_ref edge1) (var_ref edge0)))\n"
" (constant float (1.0)))\n"
" (constant float (0.0))))\n"
- " (return (expression float * (var_ref t) (expression float * (var_ref t) (expression float - (constant float (3.000000)) (expression float * (constant float (2.000000)) (var_ref t))))))))\n"
- "\n"
+ " (return (expression float * (var_ref t) (expression float * (var_ref t) (expression float - (constant float (3.0)) (expression float * (constant float (2.0)) (var_ref t))))))))\n"
" (signature vec2\n"
" (parameters\n"
" (declare (in) float edge0)\n"
" (declare (in) float edge1)\n"
" (declare (in) vec2 x))\n"
" ((declare () vec2 t)\n"
- " (declare () vec2 retval)\n"
- "\n"
- " (assign (constant bool (1)) (x) (var_ref t)\n"
- " (expression float max\n"
- " (expression float min\n"
- " (expression float / (expression float - (swiz x (var_ref x)) (var_ref edge0)) (expression float - (var_ref edge1) (var_ref edge0)))\n"
+ " (assign (xy) (var_ref t)\n"
+ " (expression vec2 max\n"
+ " (expression vec2 min\n"
+ " (expression vec2 / (expression vec2 - (var_ref x) (var_ref edge0)) (expression float - (var_ref edge1) (var_ref edge0)))\n"
" (constant float (1.0)))\n"
" (constant float (0.0))))\n"
- " (assign (constant bool (1)) (x) (var_ref retval) (expression float * (swiz x (var_ref t)) (expression float * (swiz x (var_ref t)) (expression float - (constant float (3.000000)) (expression float * (constant float (2.000000)) (swiz x (var_ref t)))))))\n"
- "\n"
- " (assign (constant bool (1)) (y) (var_ref t)\n"
- " (expression float max\n"
- " (expression float min\n"
- " (expression float / (expression float - (swiz y (var_ref x)) (var_ref edge0)) (expression float - (var_ref edge1) (var_ref edge0)))\n"
- " (constant float (1.0)))\n"
- " (constant float (0.0))))\n"
- " (assign (constant bool (1)) (y) (var_ref retval) (expression float * (swiz y (var_ref t)) (expression float * (swiz y (var_ref t)) (expression float - (constant float (3.000000)) (expression float * (constant float (2.000000)) (swiz y (var_ref t)))))))\n"
- " (return (var_ref retval))\n"
- " ))\n"
+ " (return (expression vec2 * (var_ref t) (expression vec2 * (var_ref t) (expression vec2 - (constant float (3.0)) (expression vec2 * (constant float (2.0)) (var_ref t))))))))\n"
"\n"
" (signature vec3\n"
" (parameters\n"
@@ -3051,33 +3035,13 @@ static const char builtin_smoothstep[] =
" (declare (in) float edge1)\n"
" (declare (in) vec3 x))\n"
" ((declare () vec3 t)\n"
- " (declare () vec3 retval)\n"
- "\n"
- " (assign (constant bool (1)) (x) (var_ref t)\n"
- " (expression float max\n"
- " (expression float min\n"
- " (expression float / (expression float - (swiz x (var_ref x)) (var_ref edge0)) (expression float - (var_ref edge1) (var_ref edge0)))\n"
+ " (assign (xyz) (var_ref t)\n"
+ " (expression vec3 max\n"
+ " (expression vec3 min\n"
+ " (expression vec3 / (expression vec3 - (var_ref x) (var_ref edge0)) (expression float - (var_ref edge1) (var_ref edge0)))\n"
" (constant float (1.0)))\n"
" (constant float (0.0))))\n"
- " (assign (constant bool (1)) (x) (var_ref retval) (expression float * (swiz x (var_ref t)) (expression float * (swiz x (var_ref t)) (expression float - (constant float (3.000000)) (expression float * (constant float (2.000000)) (swiz x (var_ref t)))))))\n"
- "\n"
- " (assign (constant bool (1)) (y) (var_ref t)\n"
- " (expression float max\n"
- " (expression float min\n"
- " (expression float / (expression float - (swiz y (var_ref x)) (var_ref edge0)) (expression float - (var_ref edge1) (var_ref edge0)))\n"
- " (constant float (1.0)))\n"
- " (constant float (0.0))))\n"
- " (assign (constant bool (1)) (y) (var_ref retval) (expression float * (swiz y (var_ref t)) (expression float * (swiz y (var_ref t)) (expression float - (constant float (3.000000)) (expression float * (constant float (2.000000)) (swiz y (var_ref t)))))))\n"
- "\n"
- " (assign (constant bool (1)) (z) (var_ref t)\n"
- " (expression float max\n"
- " (expression float min\n"
- " (expression float / (expression float - (swiz z (var_ref x)) (var_ref edge0)) (expression float - (var_ref edge1) (var_ref edge0)))\n"
- " (constant float (1.0)))\n"
- " (constant float (0.0))))\n"
- " (assign (constant bool (1)) (z) (var_ref retval) (expression float * (swiz z (var_ref t)) (expression float * (swiz z (var_ref t)) (expression float - (constant float (3.000000)) (expression float * (constant float (2.000000)) (swiz z (var_ref t)))))))\n"
- " (return (var_ref retval))\n"
- " ))\n"
+ " (return (expression vec3 * (var_ref t) (expression vec3 * (var_ref t) (expression vec3 - (constant float (3.0)) (expression vec3 * (constant float (2.0)) (var_ref t))))))))\n"
"\n"
"\n"
" (signature vec4\n"
@@ -3086,74 +3050,55 @@ static const char builtin_smoothstep[] =
" (declare (in) float edge1)\n"
" (declare (in) vec4 x))\n"
" ((declare () vec4 t)\n"
- " (declare () vec4 retval)\n"
- "\n"
- " (assign (constant bool (1)) (x) (var_ref t)\n"
- " (expression float max\n"
- " (expression float min\n"
- " (expression float / (expression float - (swiz x (var_ref x)) (var_ref edge0)) (expression float - (var_ref edge1) (var_ref edge0)))\n"
+ " (assign (xyzw) (var_ref t)\n"
+ " (expression vec4 max\n"
+ " (expression vec4 min\n"
+ " (expression vec4 / (expression vec4 - (var_ref x) (var_ref edge0)) (expression float - (var_ref edge1) (var_ref edge0)))\n"
" (constant float (1.0)))\n"
" (constant float (0.0))))\n"
- " (assign (constant bool (1)) (x) (var_ref retval) (expression float * (swiz x (var_ref t)) (expression float * (swiz x (var_ref t)) (expression float - (constant float (3.000000)) (expression float * (constant float (2.000000)) (swiz x (var_ref t)))))))\n"
- "\n"
- " (assign (constant bool (1)) (y) (var_ref t)\n"
- " (expression float max\n"
- " (expression float min\n"
- " (expression float / (expression float - (swiz y (var_ref x)) (var_ref edge0)) (expression float - (var_ref edge1) (var_ref edge0)))\n"
- " (constant float (1.0)))\n"
- " (constant float (0.0))))\n"
- " (assign (constant bool (1)) (y) (var_ref retval) (expression float * (swiz y (var_ref t)) (expression float * (swiz y (var_ref t)) (expression float - (constant float (3.000000)) (expression float * (constant float (2.000000)) (swiz y (var_ref t)))))))\n"
- "\n"
- " (assign (constant bool (1)) (z) (var_ref t)\n"
- " (expression float max\n"
- " (expression float min\n"
- " (expression float / (expression float - (swiz z (var_ref x)) (var_ref edge0)) (expression float - (var_ref edge1) (var_ref edge0)))\n"
- " (constant float (1.0)))\n"
- " (constant float (0.0))))\n"
- " (assign (constant bool (1)) (z) (var_ref retval) (expression float * (swiz z (var_ref t)) (expression float * (swiz z (var_ref t)) (expression float - (constant float (3.000000)) (expression float * (constant float (2.000000)) (swiz z (var_ref t)))))))\n"
- "\n"
- " (assign (constant bool (1)) (w) (var_ref t)\n"
- " (expression float max\n"
- " (expression float min\n"
- " (expression float / (expression float - (swiz w (var_ref x)) (var_ref edge0)) (expression float - (var_ref edge1) (var_ref edge0)))\n"
- " (constant float (1.0)))\n"
- " (constant float (0.0))))\n"
- " (assign (constant bool (1)) (w) (var_ref retval) (expression float * (swiz w (var_ref t)) (expression float * (swiz w (var_ref t)) (expression float - (constant float (3.000000)) (expression float * (constant float (2.000000)) (swiz w (var_ref t)))))))\n"
- " (return (var_ref retval))\n"
- " ))\n"
+ " (return (expression vec4 * (var_ref t) (expression vec4 * (var_ref t) (expression vec4 - (constant float (3.0)) (expression vec4 * (constant float (2.0)) (var_ref t))))))))\n"
"\n"
" (signature vec2\n"
" (parameters\n"
" (declare (in) vec2 edge0)\n"
" (declare (in) vec2 edge1)\n"
" (declare (in) vec2 x))\n"
- " ((return (expression vec2 max\n"
+ " ((declare () vec2 t)\n"
+ " (assign (xy) (var_ref t)\n"
+ " (expression vec2 max\n"
" (expression vec2 min\n"
" (expression vec2 / (expression vec2 - (var_ref x) (var_ref edge0)) (expression vec2 - (var_ref edge1) (var_ref edge0)))\n"
- " (constant vec2 (1.0 1.0)))\n"
- " (constant vec2 (0.0 0.0))))))\n"
+ " (constant float (1.0)))\n"
+ " (constant float (0.0))))\n"
+ " (return (expression vec2 * (var_ref t) (expression vec2 * (var_ref t) (expression vec2 - (constant float (3.0)) (expression vec2 * (constant float (2.0)) (var_ref t))))))))\n"
"\n"
" (signature vec3\n"
" (parameters\n"
" (declare (in) vec3 edge0)\n"
" (declare (in) vec3 edge1)\n"
" (declare (in) vec3 x))\n"
- " ((return (expression vec3 max\n"
+ " ((declare () vec3 t)\n"
+ " (assign (xyz) (var_ref t)\n"
+ " (expression vec3 max\n"
" (expression vec3 min\n"
" (expression vec3 / (expression vec3 - (var_ref x) (var_ref edge0)) (expression vec3 - (var_ref edge1) (var_ref edge0)))\n"
- " (constant vec3 (1.0 1.0 1.0)))\n"
- " (constant vec3 (0.0 0.0 0.0))))))\n"
+ " (constant float (1.0)))\n"
+ " (constant float (0.0))))\n"
+ " (return (expression vec3 * (var_ref t) (expression vec3 * (var_ref t) (expression vec3 - (constant float (3.0)) (expression vec3 * (constant float (2.0)) (var_ref t))))))))\n"
"\n"
" (signature vec4\n"
" (parameters\n"
" (declare (in) vec4 edge0)\n"
" (declare (in) vec4 edge1)\n"
" (declare (in) vec4 x))\n"
- " ((return (expression vec4 max\n"
+ " ((declare () vec4 t)\n"
+ " (assign (xyzw) (var_ref t)\n"
+ " (expression vec4 max\n"
" (expression vec4 min\n"
" (expression vec4 / (expression vec4 - (var_ref x) (var_ref edge0)) (expression vec4 - (var_ref edge1) (var_ref edge0)))\n"
- " (constant vec4 (1.0 1.0 1.0 1.0)))\n"
- " (constant vec4 (0.0 0.0 0.0 0.0))))))\n"
+ " (constant float (1.0)))\n"
+ " (constant float (0.0))))\n"
+ " (return (expression vec4 * (var_ref t) (expression vec4 * (var_ref t) (expression vec4 - (constant float (3.0)) (expression vec4 * (constant float (2.0)) (var_ref t))))))))\n"
"))\n"
"\n"
""
@@ -3195,8 +3140,8 @@ static const char builtin_step[] =
" (declare (in) float edge)\n"
" (declare (in) vec2 x))\n"
" ((declare () vec2 t)\n"
- " (assign (constant bool (1)) (x) (var_ref t) (expression float b2f (expression bool >= (swiz x (var_ref x))(var_ref edge))))\n"
- " (assign (constant bool (1)) (y) (var_ref t) (expression float b2f (expression bool >= (swiz y (var_ref x))(var_ref edge))))\n"
+ " (assign (x) (var_ref t) (expression float b2f (expression bool >= (swiz x (var_ref x))(var_ref edge))))\n"
+ " (assign (y) (var_ref t) (expression float b2f (expression bool >= (swiz y (var_ref x))(var_ref edge))))\n"
" (return (var_ref t))))\n"
"\n"
" (signature vec3\n"
@@ -3204,9 +3149,9 @@ static const char builtin_step[] =
" (declare (in) float edge)\n"
" (declare (in) vec3 x))\n"
" ((declare () vec3 t)\n"
- " (assign (constant bool (1)) (x) (var_ref t) (expression float b2f (expression bool >= (swiz x (var_ref x))(var_ref edge))))\n"
- " (assign (constant bool (1)) (y) (var_ref t) (expression float b2f (expression bool >= (swiz y (var_ref x))(var_ref edge))))\n"
- " (assign (constant bool (1)) (z) (var_ref t) (expression float b2f (expression bool >= (swiz z (var_ref x))(var_ref edge))))\n"
+ " (assign (x) (var_ref t) (expression float b2f (expression bool >= (swiz x (var_ref x))(var_ref edge))))\n"
+ " (assign (y) (var_ref t) (expression float b2f (expression bool >= (swiz y (var_ref x))(var_ref edge))))\n"
+ " (assign (z) (var_ref t) (expression float b2f (expression bool >= (swiz z (var_ref x))(var_ref edge))))\n"
" (return (var_ref t))))\n"
"\n"
" (signature vec4\n"
@@ -3214,10 +3159,10 @@ static const char builtin_step[] =
" (declare (in) float edge)\n"
" (declare (in) vec4 x))\n"
" ((declare () vec4 t)\n"
- " (assign (constant bool (1)) (x) (var_ref t) (expression float b2f (expression bool >= (swiz x (var_ref x))(var_ref edge))))\n"
- " (assign (constant bool (1)) (y) (var_ref t) (expression float b2f (expression bool >= (swiz y (var_ref x))(var_ref edge))))\n"
- " (assign (constant bool (1)) (z) (var_ref t) (expression float b2f (expression bool >= (swiz z (var_ref x))(var_ref edge))))\n"
- " (assign (constant bool (1)) (w) (var_ref t) (expression float b2f (expression bool >= (swiz w (var_ref x))(var_ref edge))))\n"
+ " (assign (x) (var_ref t) (expression float b2f (expression bool >= (swiz x (var_ref x))(var_ref edge))))\n"
+ " (assign (y) (var_ref t) (expression float b2f (expression bool >= (swiz y (var_ref x))(var_ref edge))))\n"
+ " (assign (z) (var_ref t) (expression float b2f (expression bool >= (swiz z (var_ref x))(var_ref edge))))\n"
+ " (assign (w) (var_ref t) (expression float b2f (expression bool >= (swiz w (var_ref x))(var_ref edge))))\n"
" (return (var_ref t))))\n"
"\n"
" (signature vec2\n"
@@ -3225,8 +3170,8 @@ static const char builtin_step[] =
" (declare (in) vec2 edge)\n"
" (declare (in) vec2 x))\n"
" ((declare () vec2 t)\n"
- " (assign (constant bool (1)) (x) (var_ref t) (expression float b2f (expression bool >= (swiz x (var_ref x))(swiz x (var_ref edge)))))\n"
- " (assign (constant bool (1)) (y) (var_ref t) (expression float b2f (expression bool >= (swiz y (var_ref x))(swiz y (var_ref edge)))))\n"
+ " (assign (x) (var_ref t) (expression float b2f (expression bool >= (swiz x (var_ref x))(swiz x (var_ref edge)))))\n"
+ " (assign (y) (var_ref t) (expression float b2f (expression bool >= (swiz y (var_ref x))(swiz y (var_ref edge)))))\n"
" (return (var_ref t))))\n"
"\n"
" (signature vec3\n"
@@ -3234,9 +3179,9 @@ static const char builtin_step[] =
" (declare (in) vec3 edge)\n"
" (declare (in) vec3 x))\n"
" ((declare () vec3 t)\n"
- " (assign (constant bool (1)) (x) (var_ref t) (expression float b2f (expression bool >= (swiz x (var_ref x))(swiz x (var_ref edge)))))\n"
- " (assign (constant bool (1)) (y) (var_ref t) (expression float b2f (expression bool >= (swiz y (var_ref x))(swiz y (var_ref edge)))))\n"
- " (assign (constant bool (1)) (z) (var_ref t) (expression float b2f (expression bool >= (swiz z (var_ref x))(swiz z (var_ref edge)))))\n"
+ " (assign (x) (var_ref t) (expression float b2f (expression bool >= (swiz x (var_ref x))(swiz x (var_ref edge)))))\n"
+ " (assign (y) (var_ref t) (expression float b2f (expression bool >= (swiz y (var_ref x))(swiz y (var_ref edge)))))\n"
+ " (assign (z) (var_ref t) (expression float b2f (expression bool >= (swiz z (var_ref x))(swiz z (var_ref edge)))))\n"
" (return (var_ref t))))\n"
"\n"
" (signature vec4\n"
@@ -3244,10 +3189,10 @@ static const char builtin_step[] =
" (declare (in) vec4 edge)\n"
" (declare (in) vec4 x))\n"
" ((declare () vec4 t)\n"
- " (assign (constant bool (1)) (x) (var_ref t) (expression float b2f (expression bool >= (swiz x (var_ref x))(swiz x (var_ref edge)))))\n"
- " (assign (constant bool (1)) (y) (var_ref t) (expression float b2f (expression bool >= (swiz y (var_ref x))(swiz y (var_ref edge)))))\n"
- " (assign (constant bool (1)) (z) (var_ref t) (expression float b2f (expression bool >= (swiz z (var_ref x))(swiz z (var_ref edge)))))\n"
- " (assign (constant bool (1)) (w) (var_ref t) (expression float b2f (expression bool >= (swiz w (var_ref x))(swiz w (var_ref edge)))))\n"
+ " (assign (x) (var_ref t) (expression float b2f (expression bool >= (swiz x (var_ref x))(swiz x (var_ref edge)))))\n"
+ " (assign (y) (var_ref t) (expression float b2f (expression bool >= (swiz y (var_ref x))(swiz y (var_ref edge)))))\n"
+ " (assign (z) (var_ref t) (expression float b2f (expression bool >= (swiz z (var_ref x))(swiz z (var_ref edge)))))\n"
+ " (assign (w) (var_ref t) (expression float b2f (expression bool >= (swiz w (var_ref x))(swiz w (var_ref edge)))))\n"
" (return (var_ref t))))\n"
"))\n"
"\n"
@@ -3329,105 +3274,230 @@ static const char builtin_texelFetch[] =
" (declare (in) sampler1D sampler)\n"
" (declare (in) int P) \n"
" (declare (in) int lod) )\n"
- " ((return (txf (var_ref sampler) (var_ref P) (0 0 0) (var_ref lod) ))))\n"
+ " ((return (txf vec4 (var_ref sampler) (var_ref P) 0 (var_ref lod) ))))\n"
"\n"
" (signature ivec4\n"
" (parameters\n"
" (declare (in) isampler1D sampler)\n"
" (declare (in) int P) \n"
" (declare (in) int lod) )\n"
- " ((return (txf (var_ref sampler) (var_ref P) (0 0 0) (var_ref lod) ))))\n"
+ " ((return (txf ivec4 (var_ref sampler) (var_ref P) 0 (var_ref lod) ))))\n"
"\n"
" (signature uvec4\n"
" (parameters\n"
" (declare (in) usampler1D sampler)\n"
" (declare (in) int P) \n"
" (declare (in) int lod) )\n"
- " ((return (txf (var_ref sampler) (var_ref P) (0 0 0) (var_ref lod) ))))\n"
+ " ((return (txf uvec4 (var_ref sampler) (var_ref P) 0 (var_ref lod) ))))\n"
"\n"
" (signature vec4\n"
" (parameters\n"
" (declare (in) sampler2D sampler)\n"
" (declare (in) ivec2 P) \n"
" (declare (in) int lod) )\n"
- " ((return (txf (var_ref sampler) (var_ref P) (0 0 0) (var_ref lod) ))))\n"
+ " ((return (txf vec4 (var_ref sampler) (var_ref P) 0 (var_ref lod) ))))\n"
"\n"
" (signature ivec4\n"
" (parameters\n"
" (declare (in) isampler2D sampler)\n"
" (declare (in) ivec2 P) \n"
" (declare (in) int lod) )\n"
- " ((return (txf (var_ref sampler) (var_ref P) (0 0 0) (var_ref lod) ))))\n"
+ " ((return (txf ivec4 (var_ref sampler) (var_ref P) 0 (var_ref lod) ))))\n"
"\n"
" (signature uvec4\n"
" (parameters\n"
" (declare (in) usampler2D sampler)\n"
" (declare (in) ivec2 P) \n"
" (declare (in) int lod) )\n"
- " ((return (txf (var_ref sampler) (var_ref P) (0 0 0) (var_ref lod) ))))\n"
+ " ((return (txf uvec4 (var_ref sampler) (var_ref P) 0 (var_ref lod) ))))\n"
"\n"
" (signature vec4\n"
" (parameters\n"
" (declare (in) sampler3D sampler)\n"
" (declare (in) ivec3 P) \n"
" (declare (in) int lod) )\n"
- " ((return (txf (var_ref sampler) (var_ref P) (0 0 0) (var_ref lod) ))))\n"
+ " ((return (txf vec4 (var_ref sampler) (var_ref P) 0 (var_ref lod) ))))\n"
"\n"
" (signature ivec4\n"
" (parameters\n"
" (declare (in) isampler3D sampler)\n"
" (declare (in) ivec3 P) \n"
" (declare (in) int lod) )\n"
- " ((return (txf (var_ref sampler) (var_ref P) (0 0 0) (var_ref lod) ))))\n"
+ " ((return (txf ivec4 (var_ref sampler) (var_ref P) 0 (var_ref lod) ))))\n"
"\n"
" (signature uvec4\n"
" (parameters\n"
" (declare (in) usampler3D sampler)\n"
" (declare (in) ivec3 P) \n"
" (declare (in) int lod) )\n"
- " ((return (txf (var_ref sampler) (var_ref P) (0 0 0) (var_ref lod) ))))\n"
+ " ((return (txf uvec4 (var_ref sampler) (var_ref P) 0 (var_ref lod) ))))\n"
"\n"
" (signature vec4\n"
" (parameters\n"
" (declare (in) sampler1DArray sampler)\n"
" (declare (in) ivec2 P) \n"
" (declare (in) int lod) )\n"
- " ((return (txf (var_ref sampler) (var_ref P) (0 0 0) (var_ref lod) ))))\n"
+ " ((return (txf vec4 (var_ref sampler) (var_ref P) 0 (var_ref lod) ))))\n"
"\n"
" (signature ivec4\n"
" (parameters\n"
" (declare (in) isampler1DArray sampler)\n"
" (declare (in) ivec2 P) \n"
" (declare (in) int lod) )\n"
- " ((return (txf (var_ref sampler) (var_ref P) (0 0 0) (var_ref lod) ))))\n"
+ " ((return (txf ivec4 (var_ref sampler) (var_ref P) 0 (var_ref lod) ))))\n"
"\n"
" (signature uvec4\n"
" (parameters\n"
" (declare (in) usampler1DArray sampler)\n"
" (declare (in) ivec2 P) \n"
" (declare (in) int lod) )\n"
- " ((return (txf (var_ref sampler) (var_ref P) (0 0 0) (var_ref lod) ))))\n"
+ " ((return (txf uvec4 (var_ref sampler) (var_ref P) 0 (var_ref lod) ))))\n"
"\n"
" (signature vec4\n"
" (parameters\n"
" (declare (in) sampler2DArray sampler)\n"
" (declare (in) ivec3 P) \n"
" (declare (in) int lod) )\n"
- " ((return (txf (var_ref sampler) (var_ref P) (0 0 0) (var_ref lod) ))))\n"
+ " ((return (txf vec4 (var_ref sampler) (var_ref P) 0 (var_ref lod) ))))\n"
"\n"
" (signature ivec4\n"
" (parameters\n"
" (declare (in) isampler2DArray sampler)\n"
" (declare (in) ivec3 P) \n"
" (declare (in) int lod) )\n"
- " ((return (txf (var_ref sampler) (var_ref P) (0 0 0) (var_ref lod) ))))\n"
+ " ((return (txf ivec4 (var_ref sampler) (var_ref P) 0 (var_ref lod) ))))\n"
"\n"
" (signature uvec4\n"
" (parameters\n"
" (declare (in) usampler2DArray sampler)\n"
" (declare (in) ivec3 P) \n"
" (declare (in) int lod) )\n"
- " ((return (txf (var_ref sampler) (var_ref P) (0 0 0) (var_ref lod) ))))\n"
+ " ((return (txf uvec4 (var_ref sampler) (var_ref P) 0 (var_ref lod) ))))\n"
+ "\n"
+ "))\n"
+ ""
+;
+static const char builtin_texelFetchOffset[] =
+ "((function texelFetchOffset\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in) sampler1D sampler)\n"
+ " (declare (in) int P) \n"
+ " (declare (in) int lod) \n"
+ " (declare (const_in) int offset) )\n"
+ " ((return (txf vec4 (var_ref sampler) (var_ref P) (var_ref offset) (var_ref lod) ))))\n"
+ "\n"
+ " (signature ivec4\n"
+ " (parameters\n"
+ " (declare (in) isampler1D sampler)\n"
+ " (declare (in) int P) \n"
+ " (declare (in) int lod) \n"
+ " (declare (const_in) int offset) )\n"
+ " ((return (txf ivec4 (var_ref sampler) (var_ref P) (var_ref offset) (var_ref lod) ))))\n"
+ "\n"
+ " (signature uvec4\n"
+ " (parameters\n"
+ " (declare (in) usampler1D sampler)\n"
+ " (declare (in) int P) \n"
+ " (declare (in) int lod) \n"
+ " (declare (const_in) int offset) )\n"
+ " ((return (txf uvec4 (var_ref sampler) (var_ref P) (var_ref offset) (var_ref lod) ))))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in) sampler2D sampler)\n"
+ " (declare (in) ivec2 P) \n"
+ " (declare (in) int lod) \n"
+ " (declare (const_in) ivec2 offset) )\n"
+ " ((return (txf vec4 (var_ref sampler) (var_ref P) (var_ref offset) (var_ref lod) ))))\n"
+ "\n"
+ " (signature ivec4\n"
+ " (parameters\n"
+ " (declare (in) isampler2D sampler)\n"
+ " (declare (in) ivec2 P) \n"
+ " (declare (in) int lod) \n"
+ " (declare (const_in) ivec2 offset) )\n"
+ " ((return (txf ivec4 (var_ref sampler) (var_ref P) (var_ref offset) (var_ref lod) ))))\n"
+ "\n"
+ " (signature uvec4\n"
+ " (parameters\n"
+ " (declare (in) usampler2D sampler)\n"
+ " (declare (in) ivec2 P) \n"
+ " (declare (in) int lod) \n"
+ " (declare (const_in) ivec2 offset) )\n"
+ " ((return (txf uvec4 (var_ref sampler) (var_ref P) (var_ref offset) (var_ref lod) ))))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in) sampler3D sampler)\n"
+ " (declare (in) ivec3 P) \n"
+ " (declare (in) int lod) \n"
+ " (declare (const_in) ivec3 offset) )\n"
+ " ((return (txf vec4 (var_ref sampler) (var_ref P) (var_ref offset) (var_ref lod) ))))\n"
+ "\n"
+ " (signature ivec4\n"
+ " (parameters\n"
+ " (declare (in) isampler3D sampler)\n"
+ " (declare (in) ivec3 P) \n"
+ " (declare (in) int lod) \n"
+ " (declare (const_in) ivec3 offset) )\n"
+ " ((return (txf ivec4 (var_ref sampler) (var_ref P) (var_ref offset) (var_ref lod) ))))\n"
+ "\n"
+ " (signature uvec4\n"
+ " (parameters\n"
+ " (declare (in) usampler3D sampler)\n"
+ " (declare (in) ivec3 P) \n"
+ " (declare (in) int lod) \n"
+ " (declare (const_in) ivec3 offset) )\n"
+ " ((return (txf uvec4 (var_ref sampler) (var_ref P) (var_ref offset) (var_ref lod) ))))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in) sampler1DArray sampler)\n"
+ " (declare (in) ivec2 P) \n"
+ " (declare (in) int lod) \n"
+ " (declare (const_in) int offset) )\n"
+ " ((return (txf vec4 (var_ref sampler) (var_ref P) (var_ref offset) (var_ref lod) ))))\n"
+ "\n"
+ " (signature ivec4\n"
+ " (parameters\n"
+ " (declare (in) isampler1DArray sampler)\n"
+ " (declare (in) ivec2 P) \n"
+ " (declare (in) int lod) \n"
+ " (declare (const_in) int offset) )\n"
+ " ((return (txf ivec4 (var_ref sampler) (var_ref P) (var_ref offset) (var_ref lod) ))))\n"
+ "\n"
+ " (signature uvec4\n"
+ " (parameters\n"
+ " (declare (in) usampler1DArray sampler)\n"
+ " (declare (in) ivec2 P) \n"
+ " (declare (in) int lod) \n"
+ " (declare (const_in) int offset) )\n"
+ " ((return (txf uvec4 (var_ref sampler) (var_ref P) (var_ref offset) (var_ref lod) ))))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in) sampler2DArray sampler)\n"
+ " (declare (in) ivec3 P) \n"
+ " (declare (in) int lod) \n"
+ " (declare (const_in) ivec2 offset) )\n"
+ " ((return (txf vec4 (var_ref sampler) (var_ref P) (var_ref offset) (var_ref lod) ))))\n"
+ "\n"
+ " (signature ivec4\n"
+ " (parameters\n"
+ " (declare (in) isampler2DArray sampler)\n"
+ " (declare (in) ivec3 P) \n"
+ " (declare (in) int lod) \n"
+ " (declare (const_in) ivec2 offset) )\n"
+ " ((return (txf ivec4 (var_ref sampler) (var_ref P) (var_ref offset) (var_ref lod) ))))\n"
+ "\n"
+ " (signature uvec4\n"
+ " (parameters\n"
+ " (declare (in) usampler2DArray sampler)\n"
+ " (declare (in) ivec3 P) \n"
+ " (declare (in) int lod) \n"
+ " (declare (const_in) ivec2 offset) )\n"
+ " ((return (txf uvec4 (var_ref sampler) (var_ref P) (var_ref offset) (var_ref lod) ))))\n"
"\n"
"))\n"
""
@@ -3438,235 +3508,300 @@ static const char builtin_texture[] =
" (parameters\n"
" (declare (in) sampler1D sampler)\n"
" (declare (in) float P) )\n"
- " ((return (tex (var_ref sampler) (var_ref P) (0 0 0) 1 () ))))\n"
+ " ((return (tex vec4 (var_ref sampler) (var_ref P) 0 1 () ))))\n"
"\n"
" (signature ivec4\n"
" (parameters\n"
" (declare (in) isampler1D sampler)\n"
" (declare (in) float P) )\n"
- " ((return (tex (var_ref sampler) (var_ref P) (0 0 0) 1 () ))))\n"
+ " ((return (tex ivec4 (var_ref sampler) (var_ref P) 0 1 () ))))\n"
"\n"
" (signature uvec4\n"
" (parameters\n"
" (declare (in) usampler1D sampler)\n"
" (declare (in) float P) )\n"
- " ((return (tex (var_ref sampler) (var_ref P) (0 0 0) 1 () ))))\n"
+ " ((return (tex uvec4 (var_ref sampler) (var_ref P) 0 1 () ))))\n"
"\n"
" (signature vec4\n"
" (parameters\n"
" (declare (in) sampler2D sampler)\n"
" (declare (in) vec2 P) )\n"
- " ((return (tex (var_ref sampler) (var_ref P) (0 0 0) 1 () ))))\n"
+ " ((return (tex vec4 (var_ref sampler) (var_ref P) 0 1 () ))))\n"
"\n"
" (signature ivec4\n"
" (parameters\n"
" (declare (in) isampler2D sampler)\n"
" (declare (in) vec2 P) )\n"
- " ((return (tex (var_ref sampler) (var_ref P) (0 0 0) 1 () ))))\n"
+ " ((return (tex ivec4 (var_ref sampler) (var_ref P) 0 1 () ))))\n"
"\n"
" (signature uvec4\n"
" (parameters\n"
" (declare (in) usampler2D sampler)\n"
" (declare (in) vec2 P) )\n"
- " ((return (tex (var_ref sampler) (var_ref P) (0 0 0) 1 () ))))\n"
+ " ((return (tex uvec4 (var_ref sampler) (var_ref P) 0 1 () ))))\n"
"\n"
" (signature vec4\n"
" (parameters\n"
" (declare (in) sampler3D sampler)\n"
" (declare (in) vec3 P) )\n"
- " ((return (tex (var_ref sampler) (var_ref P) (0 0 0) 1 () ))))\n"
+ " ((return (tex vec4 (var_ref sampler) (var_ref P) 0 1 () ))))\n"
"\n"
" (signature ivec4\n"
" (parameters\n"
" (declare (in) isampler3D sampler)\n"
" (declare (in) vec3 P) )\n"
- " ((return (tex (var_ref sampler) (var_ref P) (0 0 0) 1 () ))))\n"
+ " ((return (tex ivec4 (var_ref sampler) (var_ref P) 0 1 () ))))\n"
"\n"
" (signature uvec4\n"
" (parameters\n"
" (declare (in) usampler3D sampler)\n"
" (declare (in) vec3 P) )\n"
- " ((return (tex (var_ref sampler) (var_ref P) (0 0 0) 1 () ))))\n"
+ " ((return (tex uvec4 (var_ref sampler) (var_ref P) 0 1 () ))))\n"
"\n"
" (signature vec4\n"
" (parameters\n"
" (declare (in) samplerCube sampler)\n"
" (declare (in) vec3 P) )\n"
- " ((return (tex (var_ref sampler) (var_ref P) (0 0 0) 1 () ))))\n"
+ " ((return (tex vec4 (var_ref sampler) (var_ref P) 0 1 () ))))\n"
"\n"
" (signature ivec4\n"
" (parameters\n"
" (declare (in) isamplerCube sampler)\n"
" (declare (in) vec3 P) )\n"
- " ((return (tex (var_ref sampler) (var_ref P) (0 0 0) 1 () ))))\n"
+ " ((return (tex ivec4 (var_ref sampler) (var_ref P) 0 1 () ))))\n"
"\n"
" (signature uvec4\n"
" (parameters\n"
" (declare (in) usamplerCube sampler)\n"
" (declare (in) vec3 P) )\n"
- " ((return (tex (var_ref sampler) (var_ref P) (0 0 0) 1 () ))))\n"
+ " ((return (tex uvec4 (var_ref sampler) (var_ref P) 0 1 () ))))\n"
"\n"
" (signature vec4\n"
" (parameters\n"
" (declare (in) sampler1DArray sampler)\n"
" (declare (in) vec2 P) )\n"
- " ((return (tex (var_ref sampler) (var_ref P) (0 0 0) 1 () ))))\n"
+ " ((return (tex vec4 (var_ref sampler) (var_ref P) 0 1 () ))))\n"
"\n"
" (signature ivec4\n"
" (parameters\n"
" (declare (in) isampler1DArray sampler)\n"
" (declare (in) vec2 P) )\n"
- " ((return (tex (var_ref sampler) (var_ref P) (0 0 0) 1 () ))))\n"
+ " ((return (tex ivec4 (var_ref sampler) (var_ref P) 0 1 () ))))\n"
"\n"
" (signature uvec4\n"
" (parameters\n"
" (declare (in) usampler1DArray sampler)\n"
" (declare (in) vec2 P) )\n"
- " ((return (tex (var_ref sampler) (var_ref P) (0 0 0) 1 () ))))\n"
+ " ((return (tex uvec4 (var_ref sampler) (var_ref P) 0 1 () ))))\n"
"\n"
" (signature vec4\n"
" (parameters\n"
" (declare (in) sampler2DArray sampler)\n"
" (declare (in) vec3 P) )\n"
- " ((return (tex (var_ref sampler) (var_ref P) (0 0 0) 1 () ))))\n"
+ " ((return (tex vec4 (var_ref sampler) (var_ref P) 0 1 () ))))\n"
"\n"
" (signature ivec4\n"
" (parameters\n"
" (declare (in) isampler2DArray sampler)\n"
" (declare (in) vec3 P) )\n"
- " ((return (tex (var_ref sampler) (var_ref P) (0 0 0) 1 () ))))\n"
+ " ((return (tex ivec4 (var_ref sampler) (var_ref P) 0 1 () ))))\n"
"\n"
" (signature uvec4\n"
" (parameters\n"
" (declare (in) usampler2DArray sampler)\n"
" (declare (in) vec3 P) )\n"
- " ((return (tex (var_ref sampler) (var_ref P) (0 0 0) 1 () ))))\n"
+ " ((return (tex uvec4 (var_ref sampler) (var_ref P) 0 1 () ))))\n"
+ "\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in) sampler1DShadow sampler)\n"
+ " (declare (in) vec3 P) )\n"
+ " ((return (tex float (var_ref sampler) (swiz x (var_ref P)) 0 1 (swiz z (var_ref P)) ))))\n"
+ "\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in) sampler2DShadow sampler)\n"
+ " (declare (in) vec3 P) )\n"
+ " ((return (tex float (var_ref sampler) (swiz xy (var_ref P)) 0 1 (swiz z (var_ref P)) ))))\n"
+ "\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in) samplerCubeShadow sampler)\n"
+ " (declare (in) vec4 P) )\n"
+ " ((return (tex float (var_ref sampler) (swiz xyz (var_ref P)) 0 1 (swiz z (var_ref P)) ))))\n"
+ "\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in) sampler1DArrayShadow sampler)\n"
+ " (declare (in) vec3 P) )\n"
+ " ((return (tex float (var_ref sampler) (swiz xy (var_ref P)) 0 1 (swiz z (var_ref P)) ))))\n"
+ "\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in) sampler2DArrayShadow sampler)\n"
+ " (declare (in) vec4 P) )\n"
+ " ((return (tex float (var_ref sampler) (swiz xyz (var_ref P)) 0 1 (swiz w (var_ref P)) ))))\n"
"\n"
" (signature vec4\n"
" (parameters\n"
" (declare (in) sampler1D sampler)\n"
" (declare (in) float P) \n"
" (declare (in) float bias) )\n"
- " ((return (txb (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref bias) ))))\n"
+ " ((return (txb vec4 (var_ref sampler) (var_ref P) 0 1 () (var_ref bias) ))))\n"
"\n"
" (signature ivec4\n"
" (parameters\n"
" (declare (in) isampler1D sampler)\n"
" (declare (in) float P) \n"
" (declare (in) float bias) )\n"
- " ((return (txb (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref bias) ))))\n"
+ " ((return (txb ivec4 (var_ref sampler) (var_ref P) 0 1 () (var_ref bias) ))))\n"
"\n"
" (signature uvec4\n"
" (parameters\n"
" (declare (in) usampler1D sampler)\n"
" (declare (in) float P) \n"
" (declare (in) float bias) )\n"
- " ((return (txb (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref bias) ))))\n"
+ " ((return (txb uvec4 (var_ref sampler) (var_ref P) 0 1 () (var_ref bias) ))))\n"
"\n"
" (signature vec4\n"
" (parameters\n"
" (declare (in) sampler2D sampler)\n"
" (declare (in) vec2 P) \n"
" (declare (in) float bias) )\n"
- " ((return (txb (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref bias) ))))\n"
+ " ((return (txb vec4 (var_ref sampler) (var_ref P) 0 1 () (var_ref bias) ))))\n"
"\n"
" (signature ivec4\n"
" (parameters\n"
" (declare (in) isampler2D sampler)\n"
" (declare (in) vec2 P) \n"
" (declare (in) float bias) )\n"
- " ((return (txb (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref bias) ))))\n"
+ " ((return (txb ivec4 (var_ref sampler) (var_ref P) 0 1 () (var_ref bias) ))))\n"
"\n"
" (signature uvec4\n"
" (parameters\n"
" (declare (in) usampler2D sampler)\n"
" (declare (in) vec2 P) \n"
" (declare (in) float bias) )\n"
- " ((return (txb (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref bias) ))))\n"
+ " ((return (txb uvec4 (var_ref sampler) (var_ref P) 0 1 () (var_ref bias) ))))\n"
"\n"
" (signature vec4\n"
" (parameters\n"
" (declare (in) sampler3D sampler)\n"
" (declare (in) vec3 P) \n"
" (declare (in) float bias) )\n"
- " ((return (txb (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref bias) ))))\n"
+ " ((return (txb vec4 (var_ref sampler) (var_ref P) 0 1 () (var_ref bias) ))))\n"
"\n"
" (signature ivec4\n"
" (parameters\n"
" (declare (in) isampler3D sampler)\n"
" (declare (in) vec3 P) \n"
" (declare (in) float bias) )\n"
- " ((return (txb (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref bias) ))))\n"
+ " ((return (txb ivec4 (var_ref sampler) (var_ref P) 0 1 () (var_ref bias) ))))\n"
"\n"
" (signature uvec4\n"
" (parameters\n"
" (declare (in) usampler3D sampler)\n"
" (declare (in) vec3 P) \n"
" (declare (in) float bias) )\n"
- " ((return (txb (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref bias) ))))\n"
+ " ((return (txb uvec4 (var_ref sampler) (var_ref P) 0 1 () (var_ref bias) ))))\n"
"\n"
" (signature vec4\n"
" (parameters\n"
" (declare (in) samplerCube sampler)\n"
" (declare (in) vec3 P) \n"
" (declare (in) float bias) )\n"
- " ((return (txb (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref bias) ))))\n"
+ " ((return (txb vec4 (var_ref sampler) (var_ref P) 0 1 () (var_ref bias) ))))\n"
"\n"
" (signature ivec4\n"
" (parameters\n"
" (declare (in) isamplerCube sampler)\n"
" (declare (in) vec3 P) \n"
" (declare (in) float bias) )\n"
- " ((return (txb (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref bias) ))))\n"
+ " ((return (txb ivec4 (var_ref sampler) (var_ref P) 0 1 () (var_ref bias) ))))\n"
"\n"
" (signature uvec4\n"
" (parameters\n"
" (declare (in) usamplerCube sampler)\n"
" (declare (in) vec3 P) \n"
" (declare (in) float bias) )\n"
- " ((return (txb (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref bias) ))))\n"
+ " ((return (txb uvec4 (var_ref sampler) (var_ref P) 0 1 () (var_ref bias) ))))\n"
"\n"
" (signature vec4\n"
" (parameters\n"
" (declare (in) sampler1DArray sampler)\n"
" (declare (in) vec2 P) \n"
" (declare (in) float bias) )\n"
- " ((return (txb (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref bias) ))))\n"
+ " ((return (txb vec4 (var_ref sampler) (var_ref P) 0 1 () (var_ref bias) ))))\n"
"\n"
" (signature ivec4\n"
" (parameters\n"
" (declare (in) isampler1DArray sampler)\n"
" (declare (in) vec2 P) \n"
" (declare (in) float bias) )\n"
- " ((return (txb (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref bias) ))))\n"
+ " ((return (txb ivec4 (var_ref sampler) (var_ref P) 0 1 () (var_ref bias) ))))\n"
"\n"
" (signature uvec4\n"
" (parameters\n"
" (declare (in) usampler1DArray sampler)\n"
" (declare (in) vec2 P) \n"
" (declare (in) float bias) )\n"
- " ((return (txb (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref bias) ))))\n"
+ " ((return (txb uvec4 (var_ref sampler) (var_ref P) 0 1 () (var_ref bias) ))))\n"
"\n"
" (signature vec4\n"
" (parameters\n"
" (declare (in) sampler2DArray sampler)\n"
" (declare (in) vec3 P) \n"
" (declare (in) float bias) )\n"
- " ((return (txb (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref bias) ))))\n"
+ " ((return (txb vec4 (var_ref sampler) (var_ref P) 0 1 () (var_ref bias) ))))\n"
"\n"
" (signature ivec4\n"
" (parameters\n"
" (declare (in) isampler2DArray sampler)\n"
" (declare (in) vec3 P) \n"
" (declare (in) float bias) )\n"
- " ((return (txb (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref bias) ))))\n"
+ " ((return (txb ivec4 (var_ref sampler) (var_ref P) 0 1 () (var_ref bias) ))))\n"
"\n"
" (signature uvec4\n"
" (parameters\n"
" (declare (in) usampler2DArray sampler)\n"
" (declare (in) vec3 P) \n"
" (declare (in) float bias) )\n"
- " ((return (txb (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref bias) ))))\n"
+ " ((return (txb uvec4 (var_ref sampler) (var_ref P) 0 1 () (var_ref bias) ))))\n"
+ "\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in) sampler1DShadow sampler)\n"
+ " (declare (in) vec3 P) \n"
+ " (declare (in) float bias) )\n"
+ " ((return (txb float (var_ref sampler) (swiz x (var_ref P)) 0 1 (swiz z (var_ref P)) (var_ref bias) ))))\n"
+ "\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in) sampler2DShadow sampler)\n"
+ " (declare (in) vec3 P) \n"
+ " (declare (in) float bias) )\n"
+ " ((return (txb float (var_ref sampler) (swiz xy (var_ref P)) 0 1 (swiz z (var_ref P)) (var_ref bias) ))))\n"
+ "\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in) samplerCubeShadow sampler)\n"
+ " (declare (in) vec4 P) \n"
+ " (declare (in) float bias) )\n"
+ " ((return (txb float (var_ref sampler) (swiz xyz (var_ref P)) 0 1 (swiz z (var_ref P)) (var_ref bias) ))))\n"
+ "\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in) sampler1DArrayShadow sampler)\n"
+ " (declare (in) vec3 P) \n"
+ " (declare (in) float bias) )\n"
+ " ((return (txb float (var_ref sampler) (swiz xy (var_ref P)) 0 1 (swiz z (var_ref P)) (var_ref bias) ))))\n"
+ "\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in) sampler2DArrayShadow sampler)\n"
+ " (declare (in) vec4 P) \n"
+ " (declare (in) float bias) )\n"
+ " ((return (txb float (var_ref sampler) (swiz xyz (var_ref P)) 0 1 (swiz w (var_ref P)) (var_ref bias) ))))\n"
"\n"
"))\n"
""
@@ -3677,14 +3812,14 @@ static const char builtin_texture1D[] =
" (parameters\n"
" (declare (in) sampler1D sampler)\n"
" (declare (in) float P) )\n"
- " ((return (tex (var_ref sampler) (var_ref P) (0 0 0) 1 () ))))\n"
+ " ((return (tex vec4 (var_ref sampler) (var_ref P) 0 1 () ))))\n"
"\n"
" (signature vec4\n"
" (parameters\n"
" (declare (in) sampler1D sampler)\n"
" (declare (in) float P) \n"
" (declare (in) float bias) )\n"
- " ((return (txb (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref bias) ))))\n"
+ " ((return (txb vec4 (var_ref sampler) (var_ref P) 0 1 () (var_ref bias) ))))\n"
"\n"
"))\n"
""
@@ -3695,14 +3830,14 @@ static const char builtin_texture1DArray[] =
" (parameters\n"
" (declare (in) sampler1DArray sampler)\n"
" (declare (in) vec2 P) )\n"
- " ((return (tex (var_ref sampler) (var_ref P) (0 0 0) 1 () ))))\n"
+ " ((return (tex vec4 (var_ref sampler) (var_ref P) 0 1 () ))))\n"
"\n"
" (signature vec4\n"
" (parameters\n"
" (declare (in) sampler1DArray sampler)\n"
" (declare (in) vec2 P) \n"
" (declare (in) float bias) )\n"
- " ((return (txb (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref bias) ))))\n"
+ " ((return (txb vec4 (var_ref sampler) (var_ref P) 0 1 () (var_ref bias) ))))\n"
"\n"
"))\n"
""
@@ -3714,7 +3849,7 @@ static const char builtin_texture1DArrayLod[] =
" (declare (in) sampler1DArray sampler)\n"
" (declare (in) vec2 P) \n"
" (declare (in) float lod) )\n"
- " ((return (txl (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref lod) ))))\n"
+ " ((return (txl vec4 (var_ref sampler) (var_ref P) 0 1 () (var_ref lod) ))))\n"
"\n"
"))\n"
""
@@ -3726,7 +3861,7 @@ static const char builtin_texture1DLod[] =
" (declare (in) sampler1D sampler)\n"
" (declare (in) float P) \n"
" (declare (in) float lod) )\n"
- " ((return (txl (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref lod) ))))\n"
+ " ((return (txl vec4 (var_ref sampler) (var_ref P) 0 1 () (var_ref lod) ))))\n"
"\n"
"))\n"
""
@@ -3737,27 +3872,27 @@ static const char builtin_texture1DProj[] =
" (parameters\n"
" (declare (in) sampler1D sampler)\n"
" (declare (in) vec2 P) )\n"
- " ((return (tex (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz y (var_ref P)) () ))))\n"
+ " ((return (tex vec4 (var_ref sampler) (swiz x (var_ref P)) 0 (swiz y (var_ref P)) () ))))\n"
"\n"
" (signature vec4\n"
" (parameters\n"
" (declare (in) sampler1D sampler)\n"
" (declare (in) vec4 P) )\n"
- " ((return (tex (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz w (var_ref P)) () ))))\n"
+ " ((return (tex vec4 (var_ref sampler) (swiz x (var_ref P)) 0 (swiz w (var_ref P)) () ))))\n"
"\n"
" (signature vec4\n"
" (parameters\n"
" (declare (in) sampler1D sampler)\n"
" (declare (in) vec2 P) \n"
" (declare (in) float bias) )\n"
- " ((return (txb (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz y (var_ref P)) () (var_ref bias) ))))\n"
+ " ((return (txb vec4 (var_ref sampler) (swiz x (var_ref P)) 0 (swiz y (var_ref P)) () (var_ref bias) ))))\n"
"\n"
" (signature vec4\n"
" (parameters\n"
" (declare (in) sampler1D sampler)\n"
" (declare (in) vec4 P) \n"
" (declare (in) float bias) )\n"
- " ((return (txb (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz w (var_ref P)) () (var_ref bias) ))))\n"
+ " ((return (txb vec4 (var_ref sampler) (swiz x (var_ref P)) 0 (swiz w (var_ref P)) () (var_ref bias) ))))\n"
"\n"
"))\n"
""
@@ -3769,14 +3904,14 @@ static const char builtin_texture1DProjLod[] =
" (declare (in) sampler1D sampler)\n"
" (declare (in) vec2 P) \n"
" (declare (in) float lod) )\n"
- " ((return (txl (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz y (var_ref P)) () (var_ref lod) ))))\n"
+ " ((return (txl vec4 (var_ref sampler) (swiz x (var_ref P)) 0 (swiz y (var_ref P)) () (var_ref lod) ))))\n"
"\n"
" (signature vec4\n"
" (parameters\n"
" (declare (in) sampler1D sampler)\n"
" (declare (in) vec4 P) \n"
" (declare (in) float lod) )\n"
- " ((return (txl (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz w (var_ref P)) () (var_ref lod) ))))\n"
+ " ((return (txl vec4 (var_ref sampler) (swiz x (var_ref P)) 0 (swiz w (var_ref P)) () (var_ref lod) ))))\n"
"\n"
"))\n"
""
@@ -3787,14 +3922,14 @@ static const char builtin_texture2D[] =
" (parameters\n"
" (declare (in) sampler2D sampler)\n"
" (declare (in) vec2 P) )\n"
- " ((return (tex (var_ref sampler) (var_ref P) (0 0 0) 1 () ))))\n"
+ " ((return (tex vec4 (var_ref sampler) (var_ref P) 0 1 () ))))\n"
"\n"
" (signature vec4\n"
" (parameters\n"
" (declare (in) sampler2D sampler)\n"
" (declare (in) vec2 P) \n"
" (declare (in) float bias) )\n"
- " ((return (txb (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref bias) ))))\n"
+ " ((return (txb vec4 (var_ref sampler) (var_ref P) 0 1 () (var_ref bias) ))))\n"
"\n"
"))\n"
""
@@ -3805,14 +3940,14 @@ static const char builtin_texture2DArray[] =
" (parameters\n"
" (declare (in) sampler2DArray sampler)\n"
" (declare (in) vec3 P) )\n"
- " ((return (tex (var_ref sampler) (var_ref P) (0 0 0) 1 () ))))\n"
+ " ((return (tex vec4 (var_ref sampler) (var_ref P) 0 1 () ))))\n"
"\n"
" (signature vec4\n"
" (parameters\n"
" (declare (in) sampler2DArray sampler)\n"
" (declare (in) vec3 P) \n"
" (declare (in) float bias) )\n"
- " ((return (txb (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref bias) ))))\n"
+ " ((return (txb vec4 (var_ref sampler) (var_ref P) 0 1 () (var_ref bias) ))))\n"
"\n"
"))\n"
""
@@ -3824,7 +3959,7 @@ static const char builtin_texture2DArrayLod[] =
" (declare (in) sampler2DArray sampler)\n"
" (declare (in) vec3 P) \n"
" (declare (in) float lod) )\n"
- " ((return (txl (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref lod) ))))\n"
+ " ((return (txl vec4 (var_ref sampler) (var_ref P) 0 1 () (var_ref lod) ))))\n"
"\n"
"))\n"
""
@@ -3836,7 +3971,7 @@ static const char builtin_texture2DLod[] =
" (declare (in) sampler2D sampler)\n"
" (declare (in) vec2 P) \n"
" (declare (in) float lod) )\n"
- " ((return (txl (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref lod) ))))\n"
+ " ((return (txl vec4 (var_ref sampler) (var_ref P) 0 1 () (var_ref lod) ))))\n"
"\n"
"))\n"
""
@@ -3847,27 +3982,27 @@ static const char builtin_texture2DProj[] =
" (parameters\n"
" (declare (in) sampler2D sampler)\n"
" (declare (in) vec3 P) )\n"
- " ((return (tex (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz z (var_ref P)) () ))))\n"
+ " ((return (tex vec4 (var_ref sampler) (swiz xy (var_ref P)) 0 (swiz z (var_ref P)) () ))))\n"
"\n"
" (signature vec4\n"
" (parameters\n"
" (declare (in) sampler2D sampler)\n"
" (declare (in) vec4 P) )\n"
- " ((return (tex (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz w (var_ref P)) () ))))\n"
+ " ((return (tex vec4 (var_ref sampler) (swiz xy (var_ref P)) 0 (swiz w (var_ref P)) () ))))\n"
"\n"
" (signature vec4\n"
" (parameters\n"
" (declare (in) sampler2D sampler)\n"
" (declare (in) vec3 P) \n"
" (declare (in) float bias) )\n"
- " ((return (txb (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz z (var_ref P)) () (var_ref bias) ))))\n"
+ " ((return (txb vec4 (var_ref sampler) (swiz xy (var_ref P)) 0 (swiz z (var_ref P)) () (var_ref bias) ))))\n"
"\n"
" (signature vec4\n"
" (parameters\n"
" (declare (in) sampler2D sampler)\n"
" (declare (in) vec4 P) \n"
" (declare (in) float bias) )\n"
- " ((return (txb (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz w (var_ref P)) () (var_ref bias) ))))\n"
+ " ((return (txb vec4 (var_ref sampler) (swiz xy (var_ref P)) 0 (swiz w (var_ref P)) () (var_ref bias) ))))\n"
"\n"
"))\n"
""
@@ -3879,14 +4014,14 @@ static const char builtin_texture2DProjLod[] =
" (declare (in) sampler2D sampler)\n"
" (declare (in) vec3 P) \n"
" (declare (in) float lod) )\n"
- " ((return (txl (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz z (var_ref P)) () (var_ref lod) ))))\n"
+ " ((return (txl vec4 (var_ref sampler) (swiz xy (var_ref P)) 0 (swiz z (var_ref P)) () (var_ref lod) ))))\n"
"\n"
" (signature vec4\n"
" (parameters\n"
" (declare (in) sampler2D sampler)\n"
" (declare (in) vec4 P) \n"
" (declare (in) float lod) )\n"
- " ((return (txl (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz w (var_ref P)) () (var_ref lod) ))))\n"
+ " ((return (txl vec4 (var_ref sampler) (swiz xy (var_ref P)) 0 (swiz w (var_ref P)) () (var_ref lod) ))))\n"
"\n"
"))\n"
""
@@ -3897,7 +4032,7 @@ static const char builtin_texture2DRect[] =
" (parameters\n"
" (declare (in) sampler2DRect sampler)\n"
" (declare (in) vec2 P) )\n"
- " ((return (tex (var_ref sampler) (var_ref P) (0 0 0) 1 () ))))\n"
+ " ((return (tex vec4 (var_ref sampler) (var_ref P) 0 1 () ))))\n"
"\n"
"))\n"
""
@@ -3908,13 +4043,13 @@ static const char builtin_texture2DRectProj[] =
" (parameters\n"
" (declare (in) sampler2DRect sampler)\n"
" (declare (in) vec3 P) )\n"
- " ((return (tex (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz z (var_ref P)) () ))))\n"
+ " ((return (tex vec4 (var_ref sampler) (swiz xy (var_ref P)) 0 (swiz z (var_ref P)) () ))))\n"
"\n"
" (signature vec4\n"
" (parameters\n"
" (declare (in) sampler2DRect sampler)\n"
" (declare (in) vec4 P) )\n"
- " ((return (tex (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz w (var_ref P)) () ))))\n"
+ " ((return (tex vec4 (var_ref sampler) (swiz xy (var_ref P)) 0 (swiz w (var_ref P)) () ))))\n"
"\n"
"))\n"
""
@@ -3925,14 +4060,14 @@ static const char builtin_texture3D[] =
" (parameters\n"
" (declare (in) sampler3D sampler)\n"
" (declare (in) vec3 P) )\n"
- " ((return (tex (var_ref sampler) (var_ref P) (0 0 0) 1 () ))))\n"
+ " ((return (tex vec4 (var_ref sampler) (var_ref P) 0 1 () ))))\n"
"\n"
" (signature vec4\n"
" (parameters\n"
" (declare (in) sampler3D sampler)\n"
" (declare (in) vec3 P) \n"
" (declare (in) float bias) )\n"
- " ((return (txb (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref bias) ))))\n"
+ " ((return (txb vec4 (var_ref sampler) (var_ref P) 0 1 () (var_ref bias) ))))\n"
"\n"
"))\n"
""
@@ -3944,7 +4079,7 @@ static const char builtin_texture3DLod[] =
" (declare (in) sampler3D sampler)\n"
" (declare (in) vec3 P) \n"
" (declare (in) float lod) )\n"
- " ((return (txl (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref lod) ))))\n"
+ " ((return (txl vec4 (var_ref sampler) (var_ref P) 0 1 () (var_ref lod) ))))\n"
"\n"
"))\n"
""
@@ -3955,14 +4090,14 @@ static const char builtin_texture3DProj[] =
" (parameters\n"
" (declare (in) sampler3D sampler)\n"
" (declare (in) vec4 P) )\n"
- " ((return (tex (var_ref sampler) (swiz xyz (var_ref P)) (0 0 0) (swiz w (var_ref P)) () ))))\n"
+ " ((return (tex vec4 (var_ref sampler) (swiz xyz (var_ref P)) 0 (swiz w (var_ref P)) () ))))\n"
"\n"
" (signature vec4\n"
" (parameters\n"
" (declare (in) sampler3D sampler)\n"
" (declare (in) vec4 P) \n"
" (declare (in) float bias) )\n"
- " ((return (txb (var_ref sampler) (swiz xyz (var_ref P)) (0 0 0) (swiz w (var_ref P)) () (var_ref bias) ))))\n"
+ " ((return (txb vec4 (var_ref sampler) (swiz xyz (var_ref P)) 0 (swiz w (var_ref P)) () (var_ref bias) ))))\n"
"\n"
"))\n"
""
@@ -3974,7 +4109,7 @@ static const char builtin_texture3DProjLod[] =
" (declare (in) sampler3D sampler)\n"
" (declare (in) vec4 P) \n"
" (declare (in) float lod) )\n"
- " ((return (txl (var_ref sampler) (swiz xyz (var_ref P)) (0 0 0) (swiz w (var_ref P)) () (var_ref lod) ))))\n"
+ " ((return (txl vec4 (var_ref sampler) (swiz xyz (var_ref P)) 0 (swiz w (var_ref P)) () (var_ref lod) ))))\n"
"\n"
"))\n"
""
@@ -3985,14 +4120,14 @@ static const char builtin_textureCube[] =
" (parameters\n"
" (declare (in) samplerCube sampler)\n"
" (declare (in) vec3 P) )\n"
- " ((return (tex (var_ref sampler) (var_ref P) (0 0 0) 1 () ))))\n"
+ " ((return (tex vec4 (var_ref sampler) (var_ref P) 0 1 () ))))\n"
"\n"
" (signature vec4\n"
" (parameters\n"
" (declare (in) samplerCube sampler)\n"
" (declare (in) vec3 P) \n"
" (declare (in) float bias) )\n"
- " ((return (txb (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref bias) ))))\n"
+ " ((return (txb vec4 (var_ref sampler) (var_ref P) 0 1 () (var_ref bias) ))))\n"
"\n"
"))\n"
""
@@ -4004,7 +4139,7 @@ static const char builtin_textureCubeLod[] =
" (declare (in) samplerCube sampler)\n"
" (declare (in) vec3 P) \n"
" (declare (in) float lod) )\n"
- " ((return (txl (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref lod) ))))\n"
+ " ((return (txl vec4 (var_ref sampler) (var_ref P) 0 1 () (var_ref lod) ))))\n"
"\n"
"))\n"
""
@@ -4017,7 +4152,7 @@ static const char builtin_textureGrad[] =
" (declare (in) float P) \n"
" (declare (in) float dPdx) \n"
" (declare (in) float dPdy) )\n"
- " ((return (txd (var_ref sampler) (var_ref P) (0 0 0) 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
+ " ((return (txd vec4 (var_ref sampler) (var_ref P) 0 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
"\n"
" (signature ivec4\n"
" (parameters\n"
@@ -4025,7 +4160,7 @@ static const char builtin_textureGrad[] =
" (declare (in) float P) \n"
" (declare (in) float dPdx) \n"
" (declare (in) float dPdy) )\n"
- " ((return (txd (var_ref sampler) (var_ref P) (0 0 0) 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
+ " ((return (txd ivec4 (var_ref sampler) (var_ref P) 0 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
"\n"
" (signature uvec4\n"
" (parameters\n"
@@ -4033,7 +4168,7 @@ static const char builtin_textureGrad[] =
" (declare (in) float P) \n"
" (declare (in) float dPdx) \n"
" (declare (in) float dPdy) )\n"
- " ((return (txd (var_ref sampler) (var_ref P) (0 0 0) 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
+ " ((return (txd uvec4 (var_ref sampler) (var_ref P) 0 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
"\n"
" (signature vec4\n"
" (parameters\n"
@@ -4041,7 +4176,7 @@ static const char builtin_textureGrad[] =
" (declare (in) vec2 P) \n"
" (declare (in) vec2 dPdx) \n"
" (declare (in) vec2 dPdy) )\n"
- " ((return (txd (var_ref sampler) (var_ref P) (0 0 0) 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
+ " ((return (txd vec4 (var_ref sampler) (var_ref P) 0 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
"\n"
" (signature ivec4\n"
" (parameters\n"
@@ -4049,7 +4184,7 @@ static const char builtin_textureGrad[] =
" (declare (in) vec2 P) \n"
" (declare (in) vec2 dPdx) \n"
" (declare (in) vec2 dPdy) )\n"
- " ((return (txd (var_ref sampler) (var_ref P) (0 0 0) 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
+ " ((return (txd ivec4 (var_ref sampler) (var_ref P) 0 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
"\n"
" (signature uvec4\n"
" (parameters\n"
@@ -4057,7 +4192,7 @@ static const char builtin_textureGrad[] =
" (declare (in) vec2 P) \n"
" (declare (in) vec2 dPdx) \n"
" (declare (in) vec2 dPdy) )\n"
- " ((return (txd (var_ref sampler) (var_ref P) (0 0 0) 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
+ " ((return (txd uvec4 (var_ref sampler) (var_ref P) 0 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
"\n"
" (signature vec4\n"
" (parameters\n"
@@ -4065,7 +4200,7 @@ static const char builtin_textureGrad[] =
" (declare (in) vec3 P) \n"
" (declare (in) vec3 dPdx) \n"
" (declare (in) vec3 dPdy) )\n"
- " ((return (txd (var_ref sampler) (var_ref P) (0 0 0) 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
+ " ((return (txd vec4 (var_ref sampler) (var_ref P) 0 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
"\n"
" (signature ivec4\n"
" (parameters\n"
@@ -4073,7 +4208,7 @@ static const char builtin_textureGrad[] =
" (declare (in) vec3 P) \n"
" (declare (in) vec3 dPdx) \n"
" (declare (in) vec3 dPdy) )\n"
- " ((return (txd (var_ref sampler) (var_ref P) (0 0 0) 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
+ " ((return (txd ivec4 (var_ref sampler) (var_ref P) 0 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
"\n"
" (signature uvec4\n"
" (parameters\n"
@@ -4081,7 +4216,7 @@ static const char builtin_textureGrad[] =
" (declare (in) vec3 P) \n"
" (declare (in) vec3 dPdx) \n"
" (declare (in) vec3 dPdy) )\n"
- " ((return (txd (var_ref sampler) (var_ref P) (0 0 0) 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
+ " ((return (txd uvec4 (var_ref sampler) (var_ref P) 0 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
"\n"
" (signature vec4\n"
" (parameters\n"
@@ -4089,7 +4224,7 @@ static const char builtin_textureGrad[] =
" (declare (in) vec3 P) \n"
" (declare (in) vec3 dPdx) \n"
" (declare (in) vec3 dPdy) )\n"
- " ((return (txd (var_ref sampler) (var_ref P) (0 0 0) 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
+ " ((return (txd vec4 (var_ref sampler) (var_ref P) 0 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
"\n"
" (signature ivec4\n"
" (parameters\n"
@@ -4097,7 +4232,7 @@ static const char builtin_textureGrad[] =
" (declare (in) vec3 P) \n"
" (declare (in) vec3 dPdx) \n"
" (declare (in) vec3 dPdy) )\n"
- " ((return (txd (var_ref sampler) (var_ref P) (0 0 0) 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
+ " ((return (txd ivec4 (var_ref sampler) (var_ref P) 0 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
"\n"
" (signature uvec4\n"
" (parameters\n"
@@ -4105,7 +4240,7 @@ static const char builtin_textureGrad[] =
" (declare (in) vec3 P) \n"
" (declare (in) vec3 dPdx) \n"
" (declare (in) vec3 dPdy) )\n"
- " ((return (txd (var_ref sampler) (var_ref P) (0 0 0) 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
+ " ((return (txd uvec4 (var_ref sampler) (var_ref P) 0 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
"\n"
" (signature vec4\n"
" (parameters\n"
@@ -4113,7 +4248,7 @@ static const char builtin_textureGrad[] =
" (declare (in) vec2 P) \n"
" (declare (in) vec2 dPdx) \n"
" (declare (in) vec2 dPdy) )\n"
- " ((return (txd (var_ref sampler) (var_ref P) (0 0 0) 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
+ " ((return (txd vec4 (var_ref sampler) (var_ref P) 0 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
"\n"
" (signature ivec4\n"
" (parameters\n"
@@ -4121,7 +4256,7 @@ static const char builtin_textureGrad[] =
" (declare (in) vec2 P) \n"
" (declare (in) vec2 dPdx) \n"
" (declare (in) vec2 dPdy) )\n"
- " ((return (txd (var_ref sampler) (var_ref P) (0 0 0) 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
+ " ((return (txd ivec4 (var_ref sampler) (var_ref P) 0 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
"\n"
" (signature uvec4\n"
" (parameters\n"
@@ -4129,7 +4264,7 @@ static const char builtin_textureGrad[] =
" (declare (in) vec2 P) \n"
" (declare (in) vec2 dPdx) \n"
" (declare (in) vec2 dPdy) )\n"
- " ((return (txd (var_ref sampler) (var_ref P) (0 0 0) 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
+ " ((return (txd uvec4 (var_ref sampler) (var_ref P) 0 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
"\n"
" (signature vec4\n"
" (parameters\n"
@@ -4137,7 +4272,7 @@ static const char builtin_textureGrad[] =
" (declare (in) vec3 P) \n"
" (declare (in) vec3 dPdx) \n"
" (declare (in) vec3 dPdy) )\n"
- " ((return (txd (var_ref sampler) (var_ref P) (0 0 0) 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
+ " ((return (txd vec4 (var_ref sampler) (var_ref P) 0 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
"\n"
" (signature ivec4\n"
" (parameters\n"
@@ -4145,7 +4280,7 @@ static const char builtin_textureGrad[] =
" (declare (in) vec3 P) \n"
" (declare (in) vec3 dPdx) \n"
" (declare (in) vec3 dPdy) )\n"
- " ((return (txd (var_ref sampler) (var_ref P) (0 0 0) 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
+ " ((return (txd ivec4 (var_ref sampler) (var_ref P) 0 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
"\n"
" (signature uvec4\n"
" (parameters\n"
@@ -4153,7 +4288,250 @@ static const char builtin_textureGrad[] =
" (declare (in) vec3 P) \n"
" (declare (in) vec3 dPdx) \n"
" (declare (in) vec3 dPdy) )\n"
- " ((return (txd (var_ref sampler) (var_ref P) (0 0 0) 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
+ " ((return (txd uvec4 (var_ref sampler) (var_ref P) 0 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
+ "\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in) sampler1DShadow sampler)\n"
+ " (declare (in) vec3 P) \n"
+ " (declare (in) float dPdx) \n"
+ " (declare (in) float dPdy) )\n"
+ " ((return (txd float (var_ref sampler) (swiz x (var_ref P)) 0 1 (swiz z (var_ref P)) ((var_ref dPdx) (var_ref dPdy)) ))))\n"
+ "\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in) sampler2DShadow sampler)\n"
+ " (declare (in) vec3 P) \n"
+ " (declare (in) vec2 dPdx) \n"
+ " (declare (in) vec2 dPdy) )\n"
+ " ((return (txd float (var_ref sampler) (swiz xy (var_ref P)) 0 1 (swiz z (var_ref P)) ((var_ref dPdx) (var_ref dPdy)) ))))\n"
+ "\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in) samplerCubeShadow sampler)\n"
+ " (declare (in) vec4 P) \n"
+ " (declare (in) vec3 dPdx) \n"
+ " (declare (in) vec3 dPdy) )\n"
+ " ((return (txd float (var_ref sampler) (swiz xyz (var_ref P)) 0 1 (swiz z (var_ref P)) ((var_ref dPdx) (var_ref dPdy)) ))))\n"
+ "\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in) sampler1DArrayShadow sampler)\n"
+ " (declare (in) vec3 P) \n"
+ " (declare (in) vec2 dPdx) \n"
+ " (declare (in) vec2 dPdy) )\n"
+ " ((return (txd float (var_ref sampler) (swiz xy (var_ref P)) 0 1 (swiz z (var_ref P)) ((var_ref dPdx) (var_ref dPdy)) ))))\n"
+ "\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in) sampler2DArrayShadow sampler)\n"
+ " (declare (in) vec4 P) \n"
+ " (declare (in) vec3 dPdx) \n"
+ " (declare (in) vec3 dPdy) )\n"
+ " ((return (txd float (var_ref sampler) (swiz xyz (var_ref P)) 0 1 (swiz w (var_ref P)) ((var_ref dPdx) (var_ref dPdy)) ))))\n"
+ "\n"
+ "))\n"
+ ""
+;
+static const char builtin_textureGradOffset[] =
+ "((function textureGradOffset\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in) sampler1D sampler)\n"
+ " (declare (in) float P) \n"
+ " (declare (in) float dPdx) \n"
+ " (declare (in) float dPdy) \n"
+ " (declare (const_in) int offset) )\n"
+ " ((return (txd vec4 (var_ref sampler) (var_ref P) (var_ref offset) 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
+ "\n"
+ " (signature ivec4\n"
+ " (parameters\n"
+ " (declare (in) isampler1D sampler)\n"
+ " (declare (in) float P) \n"
+ " (declare (in) float dPdx) \n"
+ " (declare (in) float dPdy) \n"
+ " (declare (const_in) int offset) )\n"
+ " ((return (txd ivec4 (var_ref sampler) (var_ref P) (var_ref offset) 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
+ "\n"
+ " (signature uvec4\n"
+ " (parameters\n"
+ " (declare (in) usampler1D sampler)\n"
+ " (declare (in) float P) \n"
+ " (declare (in) float dPdx) \n"
+ " (declare (in) float dPdy) \n"
+ " (declare (const_in) int offset) )\n"
+ " ((return (txd uvec4 (var_ref sampler) (var_ref P) (var_ref offset) 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in) sampler2D sampler)\n"
+ " (declare (in) vec2 P) \n"
+ " (declare (in) vec2 dPdx) \n"
+ " (declare (in) vec2 dPdy) \n"
+ " (declare (const_in) ivec2 offset) )\n"
+ " ((return (txd vec4 (var_ref sampler) (var_ref P) (var_ref offset) 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
+ "\n"
+ " (signature ivec4\n"
+ " (parameters\n"
+ " (declare (in) isampler2D sampler)\n"
+ " (declare (in) vec2 P) \n"
+ " (declare (in) vec2 dPdx) \n"
+ " (declare (in) vec2 dPdy) \n"
+ " (declare (const_in) ivec2 offset) )\n"
+ " ((return (txd ivec4 (var_ref sampler) (var_ref P) (var_ref offset) 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
+ "\n"
+ " (signature uvec4\n"
+ " (parameters\n"
+ " (declare (in) usampler2D sampler)\n"
+ " (declare (in) vec2 P) \n"
+ " (declare (in) vec2 dPdx) \n"
+ " (declare (in) vec2 dPdy) \n"
+ " (declare (const_in) ivec2 offset) )\n"
+ " ((return (txd uvec4 (var_ref sampler) (var_ref P) (var_ref offset) 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in) sampler3D sampler)\n"
+ " (declare (in) vec3 P) \n"
+ " (declare (in) vec3 dPdx) \n"
+ " (declare (in) vec3 dPdy) \n"
+ " (declare (const_in) ivec3 offset) )\n"
+ " ((return (txd vec4 (var_ref sampler) (var_ref P) (var_ref offset) 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
+ "\n"
+ " (signature ivec4\n"
+ " (parameters\n"
+ " (declare (in) isampler3D sampler)\n"
+ " (declare (in) vec3 P) \n"
+ " (declare (in) vec3 dPdx) \n"
+ " (declare (in) vec3 dPdy) \n"
+ " (declare (const_in) ivec3 offset) )\n"
+ " ((return (txd ivec4 (var_ref sampler) (var_ref P) (var_ref offset) 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
+ "\n"
+ " (signature uvec4\n"
+ " (parameters\n"
+ " (declare (in) usampler3D sampler)\n"
+ " (declare (in) vec3 P) \n"
+ " (declare (in) vec3 dPdx) \n"
+ " (declare (in) vec3 dPdy) \n"
+ " (declare (const_in) ivec3 offset) )\n"
+ " ((return (txd uvec4 (var_ref sampler) (var_ref P) (var_ref offset) 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in) samplerCube sampler)\n"
+ " (declare (in) vec3 P) \n"
+ " (declare (in) vec3 dPdx) \n"
+ " (declare (in) vec3 dPdy) \n"
+ " (declare (const_in) ivec3 offset) )\n"
+ " ((return (txd vec4 (var_ref sampler) (var_ref P) (var_ref offset) 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
+ "\n"
+ " (signature ivec4\n"
+ " (parameters\n"
+ " (declare (in) isamplerCube sampler)\n"
+ " (declare (in) vec3 P) \n"
+ " (declare (in) vec3 dPdx) \n"
+ " (declare (in) vec3 dPdy) \n"
+ " (declare (const_in) ivec3 offset) )\n"
+ " ((return (txd ivec4 (var_ref sampler) (var_ref P) (var_ref offset) 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
+ "\n"
+ " (signature uvec4\n"
+ " (parameters\n"
+ " (declare (in) usamplerCube sampler)\n"
+ " (declare (in) vec3 P) \n"
+ " (declare (in) vec3 dPdx) \n"
+ " (declare (in) vec3 dPdy) \n"
+ " (declare (const_in) ivec3 offset) )\n"
+ " ((return (txd uvec4 (var_ref sampler) (var_ref P) (var_ref offset) 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in) sampler1DArray sampler)\n"
+ " (declare (in) vec2 P) \n"
+ " (declare (in) vec2 dPdx) \n"
+ " (declare (in) vec2 dPdy) \n"
+ " (declare (const_in) int offset) )\n"
+ " ((return (txd vec4 (var_ref sampler) (var_ref P) (var_ref offset) 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
+ "\n"
+ " (signature ivec4\n"
+ " (parameters\n"
+ " (declare (in) isampler1DArray sampler)\n"
+ " (declare (in) vec2 P) \n"
+ " (declare (in) vec2 dPdx) \n"
+ " (declare (in) vec2 dPdy) \n"
+ " (declare (const_in) int offset) )\n"
+ " ((return (txd ivec4 (var_ref sampler) (var_ref P) (var_ref offset) 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
+ "\n"
+ " (signature uvec4\n"
+ " (parameters\n"
+ " (declare (in) usampler1DArray sampler)\n"
+ " (declare (in) vec2 P) \n"
+ " (declare (in) vec2 dPdx) \n"
+ " (declare (in) vec2 dPdy) \n"
+ " (declare (const_in) int offset) )\n"
+ " ((return (txd uvec4 (var_ref sampler) (var_ref P) (var_ref offset) 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in) sampler2DArray sampler)\n"
+ " (declare (in) vec3 P) \n"
+ " (declare (in) vec3 dPdx) \n"
+ " (declare (in) vec3 dPdy) \n"
+ " (declare (const_in) ivec2 offset) )\n"
+ " ((return (txd vec4 (var_ref sampler) (var_ref P) (var_ref offset) 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
+ "\n"
+ " (signature ivec4\n"
+ " (parameters\n"
+ " (declare (in) isampler2DArray sampler)\n"
+ " (declare (in) vec3 P) \n"
+ " (declare (in) vec3 dPdx) \n"
+ " (declare (in) vec3 dPdy) \n"
+ " (declare (const_in) ivec2 offset) )\n"
+ " ((return (txd ivec4 (var_ref sampler) (var_ref P) (var_ref offset) 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
+ "\n"
+ " (signature uvec4\n"
+ " (parameters\n"
+ " (declare (in) usampler2DArray sampler)\n"
+ " (declare (in) vec3 P) \n"
+ " (declare (in) vec3 dPdx) \n"
+ " (declare (in) vec3 dPdy) \n"
+ " (declare (const_in) ivec2 offset) )\n"
+ " ((return (txd uvec4 (var_ref sampler) (var_ref P) (var_ref offset) 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
+ "\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in) sampler1DShadow sampler)\n"
+ " (declare (in) vec3 P) \n"
+ " (declare (in) float dPdx) \n"
+ " (declare (in) float dPdy) \n"
+ " (declare (const_in) int offset) )\n"
+ " ((return (txd float (var_ref sampler) (swiz x (var_ref P)) (var_ref offset) 1 (swiz z (var_ref P)) ((var_ref dPdx) (var_ref dPdy)) ))))\n"
+ "\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in) sampler2DShadow sampler)\n"
+ " (declare (in) vec3 P) \n"
+ " (declare (in) vec2 dPdx) \n"
+ " (declare (in) vec2 dPdy) \n"
+ " (declare (const_in) ivec2 offset) )\n"
+ " ((return (txd float (var_ref sampler) (swiz xy (var_ref P)) (var_ref offset) 1 (swiz z (var_ref P)) ((var_ref dPdx) (var_ref dPdy)) ))))\n"
+ "\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in) sampler1DArrayShadow sampler)\n"
+ " (declare (in) vec3 P) \n"
+ " (declare (in) vec2 dPdx) \n"
+ " (declare (in) vec2 dPdy) \n"
+ " (declare (const_in) int offset) )\n"
+ " ((return (txd float (var_ref sampler) (swiz xy (var_ref P)) (var_ref offset) 1 (swiz z (var_ref P)) ((var_ref dPdx) (var_ref dPdy)) ))))\n"
+ "\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in) sampler2DArrayShadow sampler)\n"
+ " (declare (in) vec4 P) \n"
+ " (declare (in) vec3 dPdx) \n"
+ " (declare (in) vec3 dPdy) \n"
+ " (declare (const_in) ivec2 offset) )\n"
+ " ((return (txd float (var_ref sampler) (swiz xyz (var_ref P)) (var_ref offset) 1 (swiz w (var_ref P)) ((var_ref dPdx) (var_ref dPdy)) ))))\n"
"\n"
"))\n"
""
@@ -4165,126 +4543,571 @@ static const char builtin_textureLod[] =
" (declare (in) sampler1D sampler)\n"
" (declare (in) float P) \n"
" (declare (in) float lod) )\n"
- " ((return (txl (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref lod) ))))\n"
+ " ((return (txl vec4 (var_ref sampler) (var_ref P) 0 1 () (var_ref lod) ))))\n"
"\n"
" (signature ivec4\n"
" (parameters\n"
" (declare (in) isampler1D sampler)\n"
" (declare (in) float P) \n"
" (declare (in) float lod) )\n"
- " ((return (txl (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref lod) ))))\n"
+ " ((return (txl ivec4 (var_ref sampler) (var_ref P) 0 1 () (var_ref lod) ))))\n"
"\n"
" (signature uvec4\n"
" (parameters\n"
" (declare (in) usampler1D sampler)\n"
" (declare (in) float P) \n"
" (declare (in) float lod) )\n"
- " ((return (txl (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref lod) ))))\n"
+ " ((return (txl uvec4 (var_ref sampler) (var_ref P) 0 1 () (var_ref lod) ))))\n"
"\n"
" (signature vec4\n"
" (parameters\n"
" (declare (in) sampler2D sampler)\n"
" (declare (in) vec2 P) \n"
" (declare (in) float lod) )\n"
- " ((return (txl (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref lod) ))))\n"
+ " ((return (txl vec4 (var_ref sampler) (var_ref P) 0 1 () (var_ref lod) ))))\n"
"\n"
" (signature ivec4\n"
" (parameters\n"
" (declare (in) isampler2D sampler)\n"
" (declare (in) vec2 P) \n"
" (declare (in) float lod) )\n"
- " ((return (txl (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref lod) ))))\n"
+ " ((return (txl ivec4 (var_ref sampler) (var_ref P) 0 1 () (var_ref lod) ))))\n"
"\n"
" (signature uvec4\n"
" (parameters\n"
" (declare (in) usampler2D sampler)\n"
" (declare (in) vec2 P) \n"
" (declare (in) float lod) )\n"
- " ((return (txl (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref lod) ))))\n"
+ " ((return (txl uvec4 (var_ref sampler) (var_ref P) 0 1 () (var_ref lod) ))))\n"
"\n"
" (signature vec4\n"
" (parameters\n"
" (declare (in) sampler3D sampler)\n"
" (declare (in) vec3 P) \n"
" (declare (in) float lod) )\n"
- " ((return (txl (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref lod) ))))\n"
+ " ((return (txl vec4 (var_ref sampler) (var_ref P) 0 1 () (var_ref lod) ))))\n"
"\n"
" (signature ivec4\n"
" (parameters\n"
" (declare (in) isampler3D sampler)\n"
" (declare (in) vec3 P) \n"
" (declare (in) float lod) )\n"
- " ((return (txl (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref lod) ))))\n"
+ " ((return (txl ivec4 (var_ref sampler) (var_ref P) 0 1 () (var_ref lod) ))))\n"
"\n"
" (signature uvec4\n"
" (parameters\n"
" (declare (in) usampler3D sampler)\n"
" (declare (in) vec3 P) \n"
" (declare (in) float lod) )\n"
- " ((return (txl (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref lod) ))))\n"
+ " ((return (txl uvec4 (var_ref sampler) (var_ref P) 0 1 () (var_ref lod) ))))\n"
"\n"
" (signature vec4\n"
" (parameters\n"
" (declare (in) samplerCube sampler)\n"
" (declare (in) vec3 P) \n"
" (declare (in) float lod) )\n"
- " ((return (txl (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref lod) ))))\n"
+ " ((return (txl vec4 (var_ref sampler) (var_ref P) 0 1 () (var_ref lod) ))))\n"
"\n"
" (signature ivec4\n"
" (parameters\n"
" (declare (in) isamplerCube sampler)\n"
" (declare (in) vec3 P) \n"
" (declare (in) float lod) )\n"
- " ((return (txl (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref lod) ))))\n"
+ " ((return (txl ivec4 (var_ref sampler) (var_ref P) 0 1 () (var_ref lod) ))))\n"
"\n"
" (signature uvec4\n"
" (parameters\n"
" (declare (in) usamplerCube sampler)\n"
" (declare (in) vec3 P) \n"
" (declare (in) float lod) )\n"
- " ((return (txl (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref lod) ))))\n"
+ " ((return (txl uvec4 (var_ref sampler) (var_ref P) 0 1 () (var_ref lod) ))))\n"
"\n"
" (signature vec4\n"
" (parameters\n"
" (declare (in) sampler1DArray sampler)\n"
" (declare (in) vec2 P) \n"
" (declare (in) float lod) )\n"
- " ((return (txl (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref lod) ))))\n"
+ " ((return (txl vec4 (var_ref sampler) (var_ref P) 0 1 () (var_ref lod) ))))\n"
"\n"
" (signature ivec4\n"
" (parameters\n"
" (declare (in) isampler1DArray sampler)\n"
" (declare (in) vec2 P) \n"
" (declare (in) float lod) )\n"
- " ((return (txl (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref lod) ))))\n"
+ " ((return (txl ivec4 (var_ref sampler) (var_ref P) 0 1 () (var_ref lod) ))))\n"
"\n"
" (signature uvec4\n"
" (parameters\n"
" (declare (in) usampler1DArray sampler)\n"
" (declare (in) vec2 P) \n"
" (declare (in) float lod) )\n"
- " ((return (txl (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref lod) ))))\n"
+ " ((return (txl uvec4 (var_ref sampler) (var_ref P) 0 1 () (var_ref lod) ))))\n"
"\n"
" (signature vec4\n"
" (parameters\n"
" (declare (in) sampler2DArray sampler)\n"
" (declare (in) vec3 P) \n"
" (declare (in) float lod) )\n"
- " ((return (txl (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref lod) ))))\n"
+ " ((return (txl vec4 (var_ref sampler) (var_ref P) 0 1 () (var_ref lod) ))))\n"
"\n"
" (signature ivec4\n"
" (parameters\n"
" (declare (in) isampler2DArray sampler)\n"
" (declare (in) vec3 P) \n"
" (declare (in) float lod) )\n"
- " ((return (txl (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref lod) ))))\n"
+ " ((return (txl ivec4 (var_ref sampler) (var_ref P) 0 1 () (var_ref lod) ))))\n"
"\n"
" (signature uvec4\n"
" (parameters\n"
" (declare (in) usampler2DArray sampler)\n"
" (declare (in) vec3 P) \n"
" (declare (in) float lod) )\n"
- " ((return (txl (var_ref sampler) (var_ref P) (0 0 0) 1 () (var_ref lod) ))))\n"
+ " ((return (txl uvec4 (var_ref sampler) (var_ref P) 0 1 () (var_ref lod) ))))\n"
+ "\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in) sampler1DShadow sampler)\n"
+ " (declare (in) vec3 P) \n"
+ " (declare (in) float lod) )\n"
+ " ((return (txl float (var_ref sampler) (swiz x (var_ref P)) 0 1 (swiz z (var_ref P)) (var_ref lod) ))))\n"
+ "\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in) sampler2DShadow sampler)\n"
+ " (declare (in) vec3 P) \n"
+ " (declare (in) float lod) )\n"
+ " ((return (txl float (var_ref sampler) (swiz xy (var_ref P)) 0 1 (swiz z (var_ref P)) (var_ref lod) ))))\n"
+ "\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in) sampler1DArrayShadow sampler)\n"
+ " (declare (in) vec3 P) \n"
+ " (declare (in) float lod) )\n"
+ " ((return (txl float (var_ref sampler) (swiz xy (var_ref P)) 0 1 (swiz z (var_ref P)) (var_ref lod) ))))\n"
+ "\n"
+ "))\n"
+ ""
+;
+static const char builtin_textureLodOffset[] =
+ "((function textureLodOffset\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in) sampler1D sampler)\n"
+ " (declare (in) float P) \n"
+ " (declare (in) float lod) \n"
+ " (declare (const_in) int offset) )\n"
+ " ((return (txl vec4 (var_ref sampler) (var_ref P) (var_ref offset) 1 () (var_ref lod) ))))\n"
+ "\n"
+ " (signature ivec4\n"
+ " (parameters\n"
+ " (declare (in) isampler1D sampler)\n"
+ " (declare (in) float P) \n"
+ " (declare (in) float lod) \n"
+ " (declare (const_in) int offset) )\n"
+ " ((return (txl ivec4 (var_ref sampler) (var_ref P) (var_ref offset) 1 () (var_ref lod) ))))\n"
+ "\n"
+ " (signature uvec4\n"
+ " (parameters\n"
+ " (declare (in) usampler1D sampler)\n"
+ " (declare (in) float P) \n"
+ " (declare (in) float lod) \n"
+ " (declare (const_in) int offset) )\n"
+ " ((return (txl uvec4 (var_ref sampler) (var_ref P) (var_ref offset) 1 () (var_ref lod) ))))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in) sampler2D sampler)\n"
+ " (declare (in) vec2 P) \n"
+ " (declare (in) float lod) \n"
+ " (declare (const_in) ivec2 offset) )\n"
+ " ((return (txl vec4 (var_ref sampler) (var_ref P) (var_ref offset) 1 () (var_ref lod) ))))\n"
+ "\n"
+ " (signature ivec4\n"
+ " (parameters\n"
+ " (declare (in) isampler2D sampler)\n"
+ " (declare (in) vec2 P) \n"
+ " (declare (in) float lod) \n"
+ " (declare (const_in) ivec2 offset) )\n"
+ " ((return (txl ivec4 (var_ref sampler) (var_ref P) (var_ref offset) 1 () (var_ref lod) ))))\n"
+ "\n"
+ " (signature uvec4\n"
+ " (parameters\n"
+ " (declare (in) usampler2D sampler)\n"
+ " (declare (in) vec2 P) \n"
+ " (declare (in) float lod) \n"
+ " (declare (const_in) ivec2 offset) )\n"
+ " ((return (txl uvec4 (var_ref sampler) (var_ref P) (var_ref offset) 1 () (var_ref lod) ))))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in) sampler3D sampler)\n"
+ " (declare (in) vec3 P) \n"
+ " (declare (in) float lod) \n"
+ " (declare (const_in) ivec3 offset) )\n"
+ " ((return (txl vec4 (var_ref sampler) (var_ref P) (var_ref offset) 1 () (var_ref lod) ))))\n"
+ "\n"
+ " (signature ivec4\n"
+ " (parameters\n"
+ " (declare (in) isampler3D sampler)\n"
+ " (declare (in) vec3 P) \n"
+ " (declare (in) float lod) \n"
+ " (declare (const_in) ivec3 offset) )\n"
+ " ((return (txl ivec4 (var_ref sampler) (var_ref P) (var_ref offset) 1 () (var_ref lod) ))))\n"
+ "\n"
+ " (signature uvec4\n"
+ " (parameters\n"
+ " (declare (in) usampler3D sampler)\n"
+ " (declare (in) vec3 P) \n"
+ " (declare (in) float lod) \n"
+ " (declare (const_in) ivec3 offset) )\n"
+ " ((return (txl uvec4 (var_ref sampler) (var_ref P) (var_ref offset) 1 () (var_ref lod) ))))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in) sampler1DArray sampler)\n"
+ " (declare (in) vec2 P) \n"
+ " (declare (in) float lod) \n"
+ " (declare (const_in) int offset) )\n"
+ " ((return (txl vec4 (var_ref sampler) (var_ref P) (var_ref offset) 1 () (var_ref lod) ))))\n"
+ "\n"
+ " (signature ivec4\n"
+ " (parameters\n"
+ " (declare (in) isampler1DArray sampler)\n"
+ " (declare (in) vec2 P) \n"
+ " (declare (in) float lod) \n"
+ " (declare (const_in) int offset) )\n"
+ " ((return (txl ivec4 (var_ref sampler) (var_ref P) (var_ref offset) 1 () (var_ref lod) ))))\n"
+ "\n"
+ " (signature uvec4\n"
+ " (parameters\n"
+ " (declare (in) usampler1DArray sampler)\n"
+ " (declare (in) vec2 P) \n"
+ " (declare (in) float lod) \n"
+ " (declare (const_in) int offset) )\n"
+ " ((return (txl uvec4 (var_ref sampler) (var_ref P) (var_ref offset) 1 () (var_ref lod) ))))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in) sampler2DArray sampler)\n"
+ " (declare (in) vec3 P) \n"
+ " (declare (in) float lod) \n"
+ " (declare (const_in) ivec2 offset) )\n"
+ " ((return (txl vec4 (var_ref sampler) (var_ref P) (var_ref offset) 1 () (var_ref lod) ))))\n"
+ "\n"
+ " (signature ivec4\n"
+ " (parameters\n"
+ " (declare (in) isampler2DArray sampler)\n"
+ " (declare (in) vec3 P) \n"
+ " (declare (in) float lod) \n"
+ " (declare (const_in) ivec2 offset) )\n"
+ " ((return (txl ivec4 (var_ref sampler) (var_ref P) (var_ref offset) 1 () (var_ref lod) ))))\n"
+ "\n"
+ " (signature uvec4\n"
+ " (parameters\n"
+ " (declare (in) usampler2DArray sampler)\n"
+ " (declare (in) vec3 P) \n"
+ " (declare (in) float lod) \n"
+ " (declare (const_in) ivec2 offset) )\n"
+ " ((return (txl uvec4 (var_ref sampler) (var_ref P) (var_ref offset) 1 () (var_ref lod) ))))\n"
+ "\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in) sampler1DShadow sampler)\n"
+ " (declare (in) vec3 P) \n"
+ " (declare (in) float lod) \n"
+ " (declare (const_in) int offset) )\n"
+ " ((return (txl float (var_ref sampler) (swiz x (var_ref P)) (var_ref offset) 1 (swiz z (var_ref P)) (var_ref lod) ))))\n"
+ "\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in) sampler2DShadow sampler)\n"
+ " (declare (in) vec3 P) \n"
+ " (declare (in) float lod) \n"
+ " (declare (const_in) ivec2 offset) )\n"
+ " ((return (txl float (var_ref sampler) (swiz xy (var_ref P)) (var_ref offset) 1 (swiz z (var_ref P)) (var_ref lod) ))))\n"
+ "\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in) sampler1DArrayShadow sampler)\n"
+ " (declare (in) vec3 P) \n"
+ " (declare (in) float lod) \n"
+ " (declare (const_in) int offset) )\n"
+ " ((return (txl float (var_ref sampler) (swiz xy (var_ref P)) (var_ref offset) 1 (swiz z (var_ref P)) (var_ref lod) ))))\n"
+ "\n"
+ "))\n"
+ ""
+;
+static const char builtin_textureOffset[] =
+ "((function textureOffset\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in) sampler1D sampler)\n"
+ " (declare (in) float P) \n"
+ " (declare (const_in) int offset) )\n"
+ " ((return (tex vec4 (var_ref sampler) (var_ref P) (var_ref offset) 1 () ))))\n"
+ "\n"
+ " (signature ivec4\n"
+ " (parameters\n"
+ " (declare (in) isampler1D sampler)\n"
+ " (declare (in) float P) \n"
+ " (declare (const_in) int offset) )\n"
+ " ((return (tex ivec4 (var_ref sampler) (var_ref P) (var_ref offset) 1 () ))))\n"
+ "\n"
+ " (signature uvec4\n"
+ " (parameters\n"
+ " (declare (in) usampler1D sampler)\n"
+ " (declare (in) float P) \n"
+ " (declare (const_in) int offset) )\n"
+ " ((return (tex uvec4 (var_ref sampler) (var_ref P) (var_ref offset) 1 () ))))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in) sampler2D sampler)\n"
+ " (declare (in) vec2 P) \n"
+ " (declare (const_in) ivec2 offset) )\n"
+ " ((return (tex vec4 (var_ref sampler) (var_ref P) (var_ref offset) 1 () ))))\n"
+ "\n"
+ " (signature ivec4\n"
+ " (parameters\n"
+ " (declare (in) isampler2D sampler)\n"
+ " (declare (in) vec2 P) \n"
+ " (declare (const_in) ivec2 offset) )\n"
+ " ((return (tex ivec4 (var_ref sampler) (var_ref P) (var_ref offset) 1 () ))))\n"
+ "\n"
+ " (signature uvec4\n"
+ " (parameters\n"
+ " (declare (in) usampler2D sampler)\n"
+ " (declare (in) vec2 P) \n"
+ " (declare (const_in) ivec2 offset) )\n"
+ " ((return (tex uvec4 (var_ref sampler) (var_ref P) (var_ref offset) 1 () ))))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in) sampler3D sampler)\n"
+ " (declare (in) vec3 P) \n"
+ " (declare (const_in) ivec3 offset) )\n"
+ " ((return (tex vec4 (var_ref sampler) (var_ref P) (var_ref offset) 1 () ))))\n"
+ "\n"
+ " (signature ivec4\n"
+ " (parameters\n"
+ " (declare (in) isampler3D sampler)\n"
+ " (declare (in) vec3 P) \n"
+ " (declare (const_in) ivec3 offset) )\n"
+ " ((return (tex ivec4 (var_ref sampler) (var_ref P) (var_ref offset) 1 () ))))\n"
+ "\n"
+ " (signature uvec4\n"
+ " (parameters\n"
+ " (declare (in) usampler3D sampler)\n"
+ " (declare (in) vec3 P) \n"
+ " (declare (const_in) ivec3 offset) )\n"
+ " ((return (tex uvec4 (var_ref sampler) (var_ref P) (var_ref offset) 1 () ))))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in) sampler1DArray sampler)\n"
+ " (declare (in) vec2 P) \n"
+ " (declare (const_in) int offset) )\n"
+ " ((return (tex vec4 (var_ref sampler) (var_ref P) (var_ref offset) 1 () ))))\n"
+ "\n"
+ " (signature ivec4\n"
+ " (parameters\n"
+ " (declare (in) isampler1DArray sampler)\n"
+ " (declare (in) vec2 P) \n"
+ " (declare (const_in) int offset) )\n"
+ " ((return (tex ivec4 (var_ref sampler) (var_ref P) (var_ref offset) 1 () ))))\n"
+ "\n"
+ " (signature uvec4\n"
+ " (parameters\n"
+ " (declare (in) usampler1DArray sampler)\n"
+ " (declare (in) vec2 P) \n"
+ " (declare (const_in) int offset) )\n"
+ " ((return (tex uvec4 (var_ref sampler) (var_ref P) (var_ref offset) 1 () ))))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in) sampler2DArray sampler)\n"
+ " (declare (in) vec3 P) \n"
+ " (declare (const_in) ivec2 offset) )\n"
+ " ((return (tex vec4 (var_ref sampler) (var_ref P) (var_ref offset) 1 () ))))\n"
+ "\n"
+ " (signature ivec4\n"
+ " (parameters\n"
+ " (declare (in) isampler2DArray sampler)\n"
+ " (declare (in) vec3 P) \n"
+ " (declare (const_in) ivec2 offset) )\n"
+ " ((return (tex ivec4 (var_ref sampler) (var_ref P) (var_ref offset) 1 () ))))\n"
+ "\n"
+ " (signature uvec4\n"
+ " (parameters\n"
+ " (declare (in) usampler2DArray sampler)\n"
+ " (declare (in) vec3 P) \n"
+ " (declare (const_in) ivec2 offset) )\n"
+ " ((return (tex uvec4 (var_ref sampler) (var_ref P) (var_ref offset) 1 () ))))\n"
+ "\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in) sampler1DShadow sampler)\n"
+ " (declare (in) vec3 P) \n"
+ " (declare (const_in) int offset) )\n"
+ " ((return (tex float (var_ref sampler) (swiz x (var_ref P)) (var_ref offset) 1 (swiz z (var_ref P)) ))))\n"
+ "\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in) sampler2DShadow sampler)\n"
+ " (declare (in) vec3 P) \n"
+ " (declare (const_in) ivec2 offset) )\n"
+ " ((return (tex float (var_ref sampler) (swiz xy (var_ref P)) (var_ref offset) 1 (swiz z (var_ref P)) ))))\n"
+ "\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in) sampler1DArrayShadow sampler)\n"
+ " (declare (in) vec3 P) \n"
+ " (declare (const_in) int offset) )\n"
+ " ((return (tex float (var_ref sampler) (swiz xy (var_ref P)) (var_ref offset) 1 (swiz z (var_ref P)) ))))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in) sampler1D sampler)\n"
+ " (declare (in) float P) \n"
+ " (declare (const_in) int offset) \n"
+ " (declare (in) float bias) )\n"
+ " ((return (txb vec4 (var_ref sampler) (var_ref P) (var_ref offset) 1 () (var_ref bias) ))))\n"
+ "\n"
+ " (signature ivec4\n"
+ " (parameters\n"
+ " (declare (in) isampler1D sampler)\n"
+ " (declare (in) float P) \n"
+ " (declare (const_in) int offset) \n"
+ " (declare (in) float bias) )\n"
+ " ((return (txb ivec4 (var_ref sampler) (var_ref P) (var_ref offset) 1 () (var_ref bias) ))))\n"
+ "\n"
+ " (signature uvec4\n"
+ " (parameters\n"
+ " (declare (in) usampler1D sampler)\n"
+ " (declare (in) float P) \n"
+ " (declare (const_in) int offset) \n"
+ " (declare (in) float bias) )\n"
+ " ((return (txb uvec4 (var_ref sampler) (var_ref P) (var_ref offset) 1 () (var_ref bias) ))))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in) sampler2D sampler)\n"
+ " (declare (in) vec2 P) \n"
+ " (declare (const_in) ivec2 offset) \n"
+ " (declare (in) float bias) )\n"
+ " ((return (txb vec4 (var_ref sampler) (var_ref P) (var_ref offset) 1 () (var_ref bias) ))))\n"
+ "\n"
+ " (signature ivec4\n"
+ " (parameters\n"
+ " (declare (in) isampler2D sampler)\n"
+ " (declare (in) vec2 P) \n"
+ " (declare (const_in) ivec2 offset) \n"
+ " (declare (in) float bias) )\n"
+ " ((return (txb ivec4 (var_ref sampler) (var_ref P) (var_ref offset) 1 () (var_ref bias) ))))\n"
+ "\n"
+ " (signature uvec4\n"
+ " (parameters\n"
+ " (declare (in) usampler2D sampler)\n"
+ " (declare (in) vec2 P) \n"
+ " (declare (const_in) ivec2 offset) \n"
+ " (declare (in) float bias) )\n"
+ " ((return (txb uvec4 (var_ref sampler) (var_ref P) (var_ref offset) 1 () (var_ref bias) ))))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in) sampler3D sampler)\n"
+ " (declare (in) vec3 P) \n"
+ " (declare (const_in) ivec3 offset) \n"
+ " (declare (in) float bias) )\n"
+ " ((return (txb vec4 (var_ref sampler) (var_ref P) (var_ref offset) 1 () (var_ref bias) ))))\n"
+ "\n"
+ " (signature ivec4\n"
+ " (parameters\n"
+ " (declare (in) isampler3D sampler)\n"
+ " (declare (in) vec3 P) \n"
+ " (declare (const_in) ivec3 offset) \n"
+ " (declare (in) float bias) )\n"
+ " ((return (txb ivec4 (var_ref sampler) (var_ref P) (var_ref offset) 1 () (var_ref bias) ))))\n"
+ "\n"
+ " (signature uvec4\n"
+ " (parameters\n"
+ " (declare (in) usampler3D sampler)\n"
+ " (declare (in) vec3 P) \n"
+ " (declare (const_in) ivec3 offset) \n"
+ " (declare (in) float bias) )\n"
+ " ((return (txb uvec4 (var_ref sampler) (var_ref P) (var_ref offset) 1 () (var_ref bias) ))))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in) sampler1DArray sampler)\n"
+ " (declare (in) vec2 P) \n"
+ " (declare (const_in) int offset) \n"
+ " (declare (in) float bias) )\n"
+ " ((return (txb vec4 (var_ref sampler) (var_ref P) (var_ref offset) 1 () (var_ref bias) ))))\n"
+ "\n"
+ " (signature ivec4\n"
+ " (parameters\n"
+ " (declare (in) isampler1DArray sampler)\n"
+ " (declare (in) vec2 P) \n"
+ " (declare (const_in) int offset) \n"
+ " (declare (in) float bias) )\n"
+ " ((return (txb ivec4 (var_ref sampler) (var_ref P) (var_ref offset) 1 () (var_ref bias) ))))\n"
+ "\n"
+ " (signature uvec4\n"
+ " (parameters\n"
+ " (declare (in) usampler1DArray sampler)\n"
+ " (declare (in) vec2 P) \n"
+ " (declare (const_in) int offset) \n"
+ " (declare (in) float bias) )\n"
+ " ((return (txb uvec4 (var_ref sampler) (var_ref P) (var_ref offset) 1 () (var_ref bias) ))))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in) sampler2DArray sampler)\n"
+ " (declare (in) vec3 P) \n"
+ " (declare (const_in) ivec2 offset) \n"
+ " (declare (in) float bias) )\n"
+ " ((return (txb vec4 (var_ref sampler) (var_ref P) (var_ref offset) 1 () (var_ref bias) ))))\n"
+ "\n"
+ " (signature ivec4\n"
+ " (parameters\n"
+ " (declare (in) isampler2DArray sampler)\n"
+ " (declare (in) vec3 P) \n"
+ " (declare (const_in) ivec2 offset) \n"
+ " (declare (in) float bias) )\n"
+ " ((return (txb ivec4 (var_ref sampler) (var_ref P) (var_ref offset) 1 () (var_ref bias) ))))\n"
+ "\n"
+ " (signature uvec4\n"
+ " (parameters\n"
+ " (declare (in) usampler2DArray sampler)\n"
+ " (declare (in) vec3 P) \n"
+ " (declare (const_in) ivec2 offset) \n"
+ " (declare (in) float bias) )\n"
+ " ((return (txb uvec4 (var_ref sampler) (var_ref P) (var_ref offset) 1 () (var_ref bias) ))))\n"
+ "\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in) sampler1DShadow sampler)\n"
+ " (declare (in) vec3 P) \n"
+ " (declare (const_in) int offset) \n"
+ " (declare (in) float bias) )\n"
+ " ((return (txb float (var_ref sampler) (swiz x (var_ref P)) (var_ref offset) 1 (swiz z (var_ref P)) (var_ref bias) ))))\n"
+ "\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in) sampler2DShadow sampler)\n"
+ " (declare (in) vec3 P) \n"
+ " (declare (const_in) ivec2 offset) \n"
+ " (declare (in) float bias) )\n"
+ " ((return (txb float (var_ref sampler) (swiz xy (var_ref P)) (var_ref offset) 1 (swiz z (var_ref P)) (var_ref bias) ))))\n"
+ "\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in) sampler1DArrayShadow sampler)\n"
+ " (declare (in) vec3 P) \n"
+ " (declare (const_in) int offset) \n"
+ " (declare (in) float bias) )\n"
+ " ((return (txb float (var_ref sampler) (swiz xy (var_ref P)) (var_ref offset) 1 (swiz z (var_ref P)) (var_ref bias) ))))\n"
"\n"
"))\n"
""
@@ -4295,196 +5118,222 @@ static const char builtin_textureProj[] =
" (parameters\n"
" (declare (in) sampler1D sampler)\n"
" (declare (in) vec2 P) )\n"
- " ((return (tex (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz y (var_ref P)) () ))))\n"
+ " ((return (tex vec4 (var_ref sampler) (swiz x (var_ref P)) 0 (swiz y (var_ref P)) () ))))\n"
"\n"
" (signature ivec4\n"
" (parameters\n"
" (declare (in) isampler1D sampler)\n"
" (declare (in) vec2 P) )\n"
- " ((return (tex (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz y (var_ref P)) () ))))\n"
+ " ((return (tex ivec4 (var_ref sampler) (swiz x (var_ref P)) 0 (swiz y (var_ref P)) () ))))\n"
"\n"
" (signature uvec4\n"
" (parameters\n"
" (declare (in) usampler1D sampler)\n"
" (declare (in) vec2 P) )\n"
- " ((return (tex (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz y (var_ref P)) () ))))\n"
+ " ((return (tex uvec4 (var_ref sampler) (swiz x (var_ref P)) 0 (swiz y (var_ref P)) () ))))\n"
"\n"
" (signature vec4\n"
" (parameters\n"
" (declare (in) sampler1D sampler)\n"
" (declare (in) vec4 P) )\n"
- " ((return (tex (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz w (var_ref P)) () ))))\n"
+ " ((return (tex vec4 (var_ref sampler) (swiz x (var_ref P)) 0 (swiz w (var_ref P)) () ))))\n"
"\n"
" (signature ivec4\n"
" (parameters\n"
" (declare (in) isampler1D sampler)\n"
" (declare (in) vec4 P) )\n"
- " ((return (tex (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz w (var_ref P)) () ))))\n"
+ " ((return (tex ivec4 (var_ref sampler) (swiz x (var_ref P)) 0 (swiz w (var_ref P)) () ))))\n"
"\n"
" (signature uvec4\n"
" (parameters\n"
" (declare (in) usampler1D sampler)\n"
" (declare (in) vec4 P) )\n"
- " ((return (tex (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz w (var_ref P)) () ))))\n"
+ " ((return (tex uvec4 (var_ref sampler) (swiz x (var_ref P)) 0 (swiz w (var_ref P)) () ))))\n"
"\n"
" (signature vec4\n"
" (parameters\n"
" (declare (in) sampler2D sampler)\n"
" (declare (in) vec3 P) )\n"
- " ((return (tex (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz z (var_ref P)) () ))))\n"
+ " ((return (tex vec4 (var_ref sampler) (swiz xy (var_ref P)) 0 (swiz z (var_ref P)) () ))))\n"
"\n"
" (signature ivec4\n"
" (parameters\n"
" (declare (in) isampler2D sampler)\n"
" (declare (in) vec3 P) )\n"
- " ((return (tex (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz z (var_ref P)) () ))))\n"
+ " ((return (tex ivec4 (var_ref sampler) (swiz xy (var_ref P)) 0 (swiz z (var_ref P)) () ))))\n"
"\n"
" (signature uvec4\n"
" (parameters\n"
" (declare (in) usampler2D sampler)\n"
" (declare (in) vec3 P) )\n"
- " ((return (tex (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz z (var_ref P)) () ))))\n"
+ " ((return (tex uvec4 (var_ref sampler) (swiz xy (var_ref P)) 0 (swiz z (var_ref P)) () ))))\n"
"\n"
" (signature vec4\n"
" (parameters\n"
" (declare (in) sampler2D sampler)\n"
" (declare (in) vec4 P) )\n"
- " ((return (tex (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz w (var_ref P)) () ))))\n"
+ " ((return (tex vec4 (var_ref sampler) (swiz xy (var_ref P)) 0 (swiz w (var_ref P)) () ))))\n"
"\n"
" (signature ivec4\n"
" (parameters\n"
" (declare (in) isampler2D sampler)\n"
" (declare (in) vec4 P) )\n"
- " ((return (tex (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz w (var_ref P)) () ))))\n"
+ " ((return (tex ivec4 (var_ref sampler) (swiz xy (var_ref P)) 0 (swiz w (var_ref P)) () ))))\n"
"\n"
" (signature uvec4\n"
" (parameters\n"
" (declare (in) usampler2D sampler)\n"
" (declare (in) vec4 P) )\n"
- " ((return (tex (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz w (var_ref P)) () ))))\n"
+ " ((return (tex uvec4 (var_ref sampler) (swiz xy (var_ref P)) 0 (swiz w (var_ref P)) () ))))\n"
"\n"
" (signature vec4\n"
" (parameters\n"
" (declare (in) sampler3D sampler)\n"
" (declare (in) vec4 P) )\n"
- " ((return (tex (var_ref sampler) (swiz xyz (var_ref P)) (0 0 0) (swiz w (var_ref P)) () ))))\n"
+ " ((return (tex vec4 (var_ref sampler) (swiz xyz (var_ref P)) 0 (swiz w (var_ref P)) () ))))\n"
"\n"
" (signature ivec4\n"
" (parameters\n"
" (declare (in) isampler3D sampler)\n"
" (declare (in) vec4 P) )\n"
- " ((return (tex (var_ref sampler) (swiz xyz (var_ref P)) (0 0 0) (swiz w (var_ref P)) () ))))\n"
+ " ((return (tex ivec4 (var_ref sampler) (swiz xyz (var_ref P)) 0 (swiz w (var_ref P)) () ))))\n"
"\n"
" (signature uvec4\n"
" (parameters\n"
" (declare (in) usampler3D sampler)\n"
" (declare (in) vec4 P) )\n"
- " ((return (tex (var_ref sampler) (swiz xyz (var_ref P)) (0 0 0) (swiz w (var_ref P)) () ))))\n"
+ " ((return (tex uvec4 (var_ref sampler) (swiz xyz (var_ref P)) 0 (swiz w (var_ref P)) () ))))\n"
+ "\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in) sampler1DShadow sampler)\n"
+ " (declare (in) vec4 P) )\n"
+ " ((return (tex float (var_ref sampler) (swiz x (var_ref P)) 0 (swiz w (var_ref P)) (swiz z (var_ref P)) ))))\n"
+ "\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in) sampler2DShadow sampler)\n"
+ " (declare (in) vec4 P) )\n"
+ " ((return (tex float (var_ref sampler) (swiz xy (var_ref P)) 0 (swiz w (var_ref P)) (swiz z (var_ref P)) ))))\n"
"\n"
" (signature vec4\n"
" (parameters\n"
" (declare (in) sampler1D sampler)\n"
" (declare (in) vec2 P) \n"
" (declare (in) float bias) )\n"
- " ((return (txb (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz y (var_ref P)) () (var_ref bias) ))))\n"
+ " ((return (txb vec4 (var_ref sampler) (swiz x (var_ref P)) 0 (swiz y (var_ref P)) () (var_ref bias) ))))\n"
"\n"
" (signature ivec4\n"
" (parameters\n"
" (declare (in) isampler1D sampler)\n"
" (declare (in) vec2 P) \n"
" (declare (in) float bias) )\n"
- " ((return (txb (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz y (var_ref P)) () (var_ref bias) ))))\n"
+ " ((return (txb ivec4 (var_ref sampler) (swiz x (var_ref P)) 0 (swiz y (var_ref P)) () (var_ref bias) ))))\n"
"\n"
" (signature uvec4\n"
" (parameters\n"
" (declare (in) usampler1D sampler)\n"
" (declare (in) vec2 P) \n"
" (declare (in) float bias) )\n"
- " ((return (txb (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz y (var_ref P)) () (var_ref bias) ))))\n"
+ " ((return (txb uvec4 (var_ref sampler) (swiz x (var_ref P)) 0 (swiz y (var_ref P)) () (var_ref bias) ))))\n"
"\n"
" (signature vec4\n"
" (parameters\n"
" (declare (in) sampler1D sampler)\n"
" (declare (in) vec4 P) \n"
" (declare (in) float bias) )\n"
- " ((return (txb (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz w (var_ref P)) () (var_ref bias) ))))\n"
+ " ((return (txb vec4 (var_ref sampler) (swiz x (var_ref P)) 0 (swiz w (var_ref P)) () (var_ref bias) ))))\n"
"\n"
" (signature ivec4\n"
" (parameters\n"
" (declare (in) isampler1D sampler)\n"
" (declare (in) vec4 P) \n"
" (declare (in) float bias) )\n"
- " ((return (txb (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz w (var_ref P)) () (var_ref bias) ))))\n"
+ " ((return (txb ivec4 (var_ref sampler) (swiz x (var_ref P)) 0 (swiz w (var_ref P)) () (var_ref bias) ))))\n"
"\n"
" (signature uvec4\n"
" (parameters\n"
" (declare (in) usampler1D sampler)\n"
" (declare (in) vec4 P) \n"
" (declare (in) float bias) )\n"
- " ((return (txb (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz w (var_ref P)) () (var_ref bias) ))))\n"
+ " ((return (txb uvec4 (var_ref sampler) (swiz x (var_ref P)) 0 (swiz w (var_ref P)) () (var_ref bias) ))))\n"
"\n"
" (signature vec4\n"
" (parameters\n"
" (declare (in) sampler2D sampler)\n"
" (declare (in) vec3 P) \n"
" (declare (in) float bias) )\n"
- " ((return (txb (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz z (var_ref P)) () (var_ref bias) ))))\n"
+ " ((return (txb vec4 (var_ref sampler) (swiz xy (var_ref P)) 0 (swiz z (var_ref P)) () (var_ref bias) ))))\n"
"\n"
" (signature ivec4\n"
" (parameters\n"
" (declare (in) isampler2D sampler)\n"
" (declare (in) vec3 P) \n"
" (declare (in) float bias) )\n"
- " ((return (txb (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz z (var_ref P)) () (var_ref bias) ))))\n"
+ " ((return (txb ivec4 (var_ref sampler) (swiz xy (var_ref P)) 0 (swiz z (var_ref P)) () (var_ref bias) ))))\n"
"\n"
" (signature uvec4\n"
" (parameters\n"
" (declare (in) usampler2D sampler)\n"
" (declare (in) vec3 P) \n"
" (declare (in) float bias) )\n"
- " ((return (txb (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz z (var_ref P)) () (var_ref bias) ))))\n"
+ " ((return (txb uvec4 (var_ref sampler) (swiz xy (var_ref P)) 0 (swiz z (var_ref P)) () (var_ref bias) ))))\n"
"\n"
" (signature vec4\n"
" (parameters\n"
" (declare (in) sampler2D sampler)\n"
" (declare (in) vec4 P) \n"
" (declare (in) float bias) )\n"
- " ((return (txb (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz w (var_ref P)) () (var_ref bias) ))))\n"
+ " ((return (txb vec4 (var_ref sampler) (swiz xy (var_ref P)) 0 (swiz w (var_ref P)) () (var_ref bias) ))))\n"
"\n"
" (signature ivec4\n"
" (parameters\n"
" (declare (in) isampler2D sampler)\n"
" (declare (in) vec4 P) \n"
" (declare (in) float bias) )\n"
- " ((return (txb (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz w (var_ref P)) () (var_ref bias) ))))\n"
+ " ((return (txb ivec4 (var_ref sampler) (swiz xy (var_ref P)) 0 (swiz w (var_ref P)) () (var_ref bias) ))))\n"
"\n"
" (signature uvec4\n"
" (parameters\n"
" (declare (in) usampler2D sampler)\n"
" (declare (in) vec4 P) \n"
" (declare (in) float bias) )\n"
- " ((return (txb (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz w (var_ref P)) () (var_ref bias) ))))\n"
+ " ((return (txb uvec4 (var_ref sampler) (swiz xy (var_ref P)) 0 (swiz w (var_ref P)) () (var_ref bias) ))))\n"
"\n"
" (signature vec4\n"
" (parameters\n"
" (declare (in) sampler3D sampler)\n"
" (declare (in) vec4 P) \n"
" (declare (in) float bias) )\n"
- " ((return (txb (var_ref sampler) (swiz xyz (var_ref P)) (0 0 0) (swiz w (var_ref P)) () (var_ref bias) ))))\n"
+ " ((return (txb vec4 (var_ref sampler) (swiz xyz (var_ref P)) 0 (swiz w (var_ref P)) () (var_ref bias) ))))\n"
"\n"
" (signature ivec4\n"
" (parameters\n"
" (declare (in) isampler3D sampler)\n"
" (declare (in) vec4 P) \n"
" (declare (in) float bias) )\n"
- " ((return (txb (var_ref sampler) (swiz xyz (var_ref P)) (0 0 0) (swiz w (var_ref P)) () (var_ref bias) ))))\n"
+ " ((return (txb ivec4 (var_ref sampler) (swiz xyz (var_ref P)) 0 (swiz w (var_ref P)) () (var_ref bias) ))))\n"
"\n"
" (signature uvec4\n"
" (parameters\n"
" (declare (in) usampler3D sampler)\n"
" (declare (in) vec4 P) \n"
" (declare (in) float bias) )\n"
- " ((return (txb (var_ref sampler) (swiz xyz (var_ref P)) (0 0 0) (swiz w (var_ref P)) () (var_ref bias) ))))\n"
+ " ((return (txb uvec4 (var_ref sampler) (swiz xyz (var_ref P)) 0 (swiz w (var_ref P)) () (var_ref bias) ))))\n"
+ "\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in) sampler1DShadow sampler)\n"
+ " (declare (in) vec4 P) \n"
+ " (declare (in) float bias) )\n"
+ " ((return (txb float (var_ref sampler) (swiz x (var_ref P)) 0 (swiz w (var_ref P)) (swiz z (var_ref P)) (var_ref bias) ))))\n"
+ "\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in) sampler2DShadow sampler)\n"
+ " (declare (in) vec4 P) \n"
+ " (declare (in) float bias) )\n"
+ " ((return (txb float (var_ref sampler) (swiz xy (var_ref P)) 0 (swiz w (var_ref P)) (swiz z (var_ref P)) (var_ref bias) ))))\n"
"\n"
"))\n"
""
@@ -4497,7 +5346,7 @@ static const char builtin_textureProjGrad[] =
" (declare (in) vec2 P) \n"
" (declare (in) float dPdx) \n"
" (declare (in) float dPdy) )\n"
- " ((return (txd (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz y (var_ref P)) () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
+ " ((return (txd vec4 (var_ref sampler) (swiz x (var_ref P)) 0 (swiz y (var_ref P)) () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
"\n"
" (signature ivec4\n"
" (parameters\n"
@@ -4505,7 +5354,7 @@ static const char builtin_textureProjGrad[] =
" (declare (in) vec2 P) \n"
" (declare (in) float dPdx) \n"
" (declare (in) float dPdy) )\n"
- " ((return (txd (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz y (var_ref P)) () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
+ " ((return (txd ivec4 (var_ref sampler) (swiz x (var_ref P)) 0 (swiz y (var_ref P)) () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
"\n"
" (signature uvec4\n"
" (parameters\n"
@@ -4513,7 +5362,7 @@ static const char builtin_textureProjGrad[] =
" (declare (in) vec2 P) \n"
" (declare (in) float dPdx) \n"
" (declare (in) float dPdy) )\n"
- " ((return (txd (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz y (var_ref P)) () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
+ " ((return (txd uvec4 (var_ref sampler) (swiz x (var_ref P)) 0 (swiz y (var_ref P)) () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
"\n"
" (signature vec4\n"
" (parameters\n"
@@ -4521,7 +5370,7 @@ static const char builtin_textureProjGrad[] =
" (declare (in) vec4 P) \n"
" (declare (in) float dPdx) \n"
" (declare (in) float dPdy) )\n"
- " ((return (txd (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz w (var_ref P)) () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
+ " ((return (txd vec4 (var_ref sampler) (swiz x (var_ref P)) 0 (swiz w (var_ref P)) () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
"\n"
" (signature ivec4\n"
" (parameters\n"
@@ -4529,7 +5378,7 @@ static const char builtin_textureProjGrad[] =
" (declare (in) vec4 P) \n"
" (declare (in) float dPdx) \n"
" (declare (in) float dPdy) )\n"
- " ((return (txd (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz w (var_ref P)) () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
+ " ((return (txd ivec4 (var_ref sampler) (swiz x (var_ref P)) 0 (swiz w (var_ref P)) () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
"\n"
" (signature uvec4\n"
" (parameters\n"
@@ -4537,7 +5386,7 @@ static const char builtin_textureProjGrad[] =
" (declare (in) vec4 P) \n"
" (declare (in) float dPdx) \n"
" (declare (in) float dPdy) )\n"
- " ((return (txd (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz w (var_ref P)) () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
+ " ((return (txd uvec4 (var_ref sampler) (swiz x (var_ref P)) 0 (swiz w (var_ref P)) () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
"\n"
" (signature vec4\n"
" (parameters\n"
@@ -4545,7 +5394,7 @@ static const char builtin_textureProjGrad[] =
" (declare (in) vec3 P) \n"
" (declare (in) vec2 dPdx) \n"
" (declare (in) vec2 dPdy) )\n"
- " ((return (txd (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz z (var_ref P)) () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
+ " ((return (txd vec4 (var_ref sampler) (swiz xy (var_ref P)) 0 (swiz z (var_ref P)) () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
"\n"
" (signature ivec4\n"
" (parameters\n"
@@ -4553,7 +5402,7 @@ static const char builtin_textureProjGrad[] =
" (declare (in) vec3 P) \n"
" (declare (in) vec2 dPdx) \n"
" (declare (in) vec2 dPdy) )\n"
- " ((return (txd (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz z (var_ref P)) () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
+ " ((return (txd ivec4 (var_ref sampler) (swiz xy (var_ref P)) 0 (swiz z (var_ref P)) () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
"\n"
" (signature uvec4\n"
" (parameters\n"
@@ -4561,7 +5410,7 @@ static const char builtin_textureProjGrad[] =
" (declare (in) vec3 P) \n"
" (declare (in) vec2 dPdx) \n"
" (declare (in) vec2 dPdy) )\n"
- " ((return (txd (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz z (var_ref P)) () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
+ " ((return (txd uvec4 (var_ref sampler) (swiz xy (var_ref P)) 0 (swiz z (var_ref P)) () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
"\n"
" (signature vec4\n"
" (parameters\n"
@@ -4569,7 +5418,7 @@ static const char builtin_textureProjGrad[] =
" (declare (in) vec4 P) \n"
" (declare (in) vec2 dPdx) \n"
" (declare (in) vec2 dPdy) )\n"
- " ((return (txd (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz w (var_ref P)) () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
+ " ((return (txd vec4 (var_ref sampler) (swiz xy (var_ref P)) 0 (swiz w (var_ref P)) () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
"\n"
" (signature ivec4\n"
" (parameters\n"
@@ -4577,7 +5426,7 @@ static const char builtin_textureProjGrad[] =
" (declare (in) vec4 P) \n"
" (declare (in) vec2 dPdx) \n"
" (declare (in) vec2 dPdy) )\n"
- " ((return (txd (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz w (var_ref P)) () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
+ " ((return (txd ivec4 (var_ref sampler) (swiz xy (var_ref P)) 0 (swiz w (var_ref P)) () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
"\n"
" (signature uvec4\n"
" (parameters\n"
@@ -4585,7 +5434,7 @@ static const char builtin_textureProjGrad[] =
" (declare (in) vec4 P) \n"
" (declare (in) vec2 dPdx) \n"
" (declare (in) vec2 dPdy) )\n"
- " ((return (txd (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz w (var_ref P)) () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
+ " ((return (txd uvec4 (var_ref sampler) (swiz xy (var_ref P)) 0 (swiz w (var_ref P)) () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
"\n"
" (signature vec4\n"
" (parameters\n"
@@ -4593,7 +5442,7 @@ static const char builtin_textureProjGrad[] =
" (declare (in) vec4 P) \n"
" (declare (in) vec3 dPdx) \n"
" (declare (in) vec3 dPdy) )\n"
- " ((return (txd (var_ref sampler) (swiz xyz (var_ref P)) (0 0 0) (swiz w (var_ref P)) () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
+ " ((return (txd vec4 (var_ref sampler) (swiz xyz (var_ref P)) 0 (swiz w (var_ref P)) () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
"\n"
" (signature ivec4\n"
" (parameters\n"
@@ -4601,7 +5450,7 @@ static const char builtin_textureProjGrad[] =
" (declare (in) vec4 P) \n"
" (declare (in) vec3 dPdx) \n"
" (declare (in) vec3 dPdy) )\n"
- " ((return (txd (var_ref sampler) (swiz xyz (var_ref P)) (0 0 0) (swiz w (var_ref P)) () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
+ " ((return (txd ivec4 (var_ref sampler) (swiz xyz (var_ref P)) 0 (swiz w (var_ref P)) () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
"\n"
" (signature uvec4\n"
" (parameters\n"
@@ -4609,7 +5458,181 @@ static const char builtin_textureProjGrad[] =
" (declare (in) vec4 P) \n"
" (declare (in) vec3 dPdx) \n"
" (declare (in) vec3 dPdy) )\n"
- " ((return (txd (var_ref sampler) (swiz xyz (var_ref P)) (0 0 0) (swiz w (var_ref P)) () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
+ " ((return (txd uvec4 (var_ref sampler) (swiz xyz (var_ref P)) 0 (swiz w (var_ref P)) () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
+ "\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in) sampler1DShadow sampler)\n"
+ " (declare (in) vec4 P) \n"
+ " (declare (in) float dPdx) \n"
+ " (declare (in) float dPdy) )\n"
+ " ((return (txd float (var_ref sampler) (swiz x (var_ref P)) 0 (swiz w (var_ref P)) (swiz z (var_ref P)) ((var_ref dPdx) (var_ref dPdy)) ))))\n"
+ "\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in) sampler2DShadow sampler)\n"
+ " (declare (in) vec4 P) \n"
+ " (declare (in) vec2 dPdx) \n"
+ " (declare (in) vec2 dPdy) )\n"
+ " ((return (txd float (var_ref sampler) (swiz xy (var_ref P)) 0 (swiz w (var_ref P)) (swiz z (var_ref P)) ((var_ref dPdx) (var_ref dPdy)) ))))\n"
+ "\n"
+ "))\n"
+ ""
+;
+static const char builtin_textureProjGradOffset[] =
+ "((function textureProjGradOffset\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in) sampler1D sampler)\n"
+ " (declare (in) vec2 P) \n"
+ " (declare (in) float dPdx) \n"
+ " (declare (in) float dPdy) \n"
+ " (declare (const_in) int offset) )\n"
+ " ((return (txd vec4 (var_ref sampler) (swiz x (var_ref P)) (var_ref offset) (swiz y (var_ref P)) () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
+ "\n"
+ " (signature ivec4\n"
+ " (parameters\n"
+ " (declare (in) isampler1D sampler)\n"
+ " (declare (in) vec2 P) \n"
+ " (declare (in) float dPdx) \n"
+ " (declare (in) float dPdy) \n"
+ " (declare (const_in) int offset) )\n"
+ " ((return (txd ivec4 (var_ref sampler) (swiz x (var_ref P)) (var_ref offset) (swiz y (var_ref P)) () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
+ "\n"
+ " (signature uvec4\n"
+ " (parameters\n"
+ " (declare (in) usampler1D sampler)\n"
+ " (declare (in) vec2 P) \n"
+ " (declare (in) float dPdx) \n"
+ " (declare (in) float dPdy) \n"
+ " (declare (const_in) int offset) )\n"
+ " ((return (txd uvec4 (var_ref sampler) (swiz x (var_ref P)) (var_ref offset) (swiz y (var_ref P)) () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in) sampler1D sampler)\n"
+ " (declare (in) vec4 P) \n"
+ " (declare (in) float dPdx) \n"
+ " (declare (in) float dPdy) \n"
+ " (declare (const_in) int offset) )\n"
+ " ((return (txd vec4 (var_ref sampler) (swiz x (var_ref P)) (var_ref offset) (swiz w (var_ref P)) () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
+ "\n"
+ " (signature ivec4\n"
+ " (parameters\n"
+ " (declare (in) isampler1D sampler)\n"
+ " (declare (in) vec4 P) \n"
+ " (declare (in) float dPdx) \n"
+ " (declare (in) float dPdy) \n"
+ " (declare (const_in) int offset) )\n"
+ " ((return (txd ivec4 (var_ref sampler) (swiz x (var_ref P)) (var_ref offset) (swiz w (var_ref P)) () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
+ "\n"
+ " (signature uvec4\n"
+ " (parameters\n"
+ " (declare (in) usampler1D sampler)\n"
+ " (declare (in) vec4 P) \n"
+ " (declare (in) float dPdx) \n"
+ " (declare (in) float dPdy) \n"
+ " (declare (const_in) int offset) )\n"
+ " ((return (txd uvec4 (var_ref sampler) (swiz x (var_ref P)) (var_ref offset) (swiz w (var_ref P)) () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in) sampler2D sampler)\n"
+ " (declare (in) vec3 P) \n"
+ " (declare (in) vec2 dPdx) \n"
+ " (declare (in) vec2 dPdy) \n"
+ " (declare (const_in) ivec2 offset) )\n"
+ " ((return (txd vec4 (var_ref sampler) (swiz xy (var_ref P)) (var_ref offset) (swiz z (var_ref P)) () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
+ "\n"
+ " (signature ivec4\n"
+ " (parameters\n"
+ " (declare (in) isampler2D sampler)\n"
+ " (declare (in) vec3 P) \n"
+ " (declare (in) vec2 dPdx) \n"
+ " (declare (in) vec2 dPdy) \n"
+ " (declare (const_in) ivec2 offset) )\n"
+ " ((return (txd ivec4 (var_ref sampler) (swiz xy (var_ref P)) (var_ref offset) (swiz z (var_ref P)) () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
+ "\n"
+ " (signature uvec4\n"
+ " (parameters\n"
+ " (declare (in) usampler2D sampler)\n"
+ " (declare (in) vec3 P) \n"
+ " (declare (in) vec2 dPdx) \n"
+ " (declare (in) vec2 dPdy) \n"
+ " (declare (const_in) ivec2 offset) )\n"
+ " ((return (txd uvec4 (var_ref sampler) (swiz xy (var_ref P)) (var_ref offset) (swiz z (var_ref P)) () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in) sampler2D sampler)\n"
+ " (declare (in) vec4 P) \n"
+ " (declare (in) vec2 dPdx) \n"
+ " (declare (in) vec2 dPdy) \n"
+ " (declare (const_in) ivec2 offset) )\n"
+ " ((return (txd vec4 (var_ref sampler) (swiz xy (var_ref P)) (var_ref offset) (swiz w (var_ref P)) () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
+ "\n"
+ " (signature ivec4\n"
+ " (parameters\n"
+ " (declare (in) isampler2D sampler)\n"
+ " (declare (in) vec4 P) \n"
+ " (declare (in) vec2 dPdx) \n"
+ " (declare (in) vec2 dPdy) \n"
+ " (declare (const_in) ivec2 offset) )\n"
+ " ((return (txd ivec4 (var_ref sampler) (swiz xy (var_ref P)) (var_ref offset) (swiz w (var_ref P)) () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
+ "\n"
+ " (signature uvec4\n"
+ " (parameters\n"
+ " (declare (in) usampler2D sampler)\n"
+ " (declare (in) vec4 P) \n"
+ " (declare (in) vec2 dPdx) \n"
+ " (declare (in) vec2 dPdy) \n"
+ " (declare (const_in) ivec2 offset) )\n"
+ " ((return (txd uvec4 (var_ref sampler) (swiz xy (var_ref P)) (var_ref offset) (swiz w (var_ref P)) () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in) sampler3D sampler)\n"
+ " (declare (in) vec4 P) \n"
+ " (declare (in) vec3 dPdx) \n"
+ " (declare (in) vec3 dPdy) \n"
+ " (declare (const_in) ivec3 offset) )\n"
+ " ((return (txd vec4 (var_ref sampler) (swiz xyz (var_ref P)) (var_ref offset) (swiz w (var_ref P)) () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
+ "\n"
+ " (signature ivec4\n"
+ " (parameters\n"
+ " (declare (in) isampler3D sampler)\n"
+ " (declare (in) vec4 P) \n"
+ " (declare (in) vec3 dPdx) \n"
+ " (declare (in) vec3 dPdy) \n"
+ " (declare (const_in) ivec3 offset) )\n"
+ " ((return (txd ivec4 (var_ref sampler) (swiz xyz (var_ref P)) (var_ref offset) (swiz w (var_ref P)) () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
+ "\n"
+ " (signature uvec4\n"
+ " (parameters\n"
+ " (declare (in) usampler3D sampler)\n"
+ " (declare (in) vec4 P) \n"
+ " (declare (in) vec3 dPdx) \n"
+ " (declare (in) vec3 dPdy) \n"
+ " (declare (const_in) ivec3 offset) )\n"
+ " ((return (txd uvec4 (var_ref sampler) (swiz xyz (var_ref P)) (var_ref offset) (swiz w (var_ref P)) () ((var_ref dPdx) (var_ref dPdy)) ))))\n"
+ "\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in) sampler1DShadow sampler)\n"
+ " (declare (in) vec4 P) \n"
+ " (declare (in) float dPdx) \n"
+ " (declare (in) float dPdy) \n"
+ " (declare (const_in) int offset) )\n"
+ " ((return (txd float (var_ref sampler) (swiz x (var_ref P)) (var_ref offset) (swiz w (var_ref P)) (swiz z (var_ref P)) ((var_ref dPdx) (var_ref dPdy)) ))))\n"
+ "\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in) sampler2DShadow sampler)\n"
+ " (declare (in) vec4 P) \n"
+ " (declare (in) vec2 dPdx) \n"
+ " (declare (in) vec2 dPdy) \n"
+ " (declare (const_in) ivec2 offset) )\n"
+ " ((return (txd float (var_ref sampler) (swiz xy (var_ref P)) (var_ref offset) (swiz w (var_ref P)) (swiz z (var_ref P)) ((var_ref dPdx) (var_ref dPdy)) ))))\n"
"\n"
"))\n"
""
@@ -4621,105 +5644,520 @@ static const char builtin_textureProjLod[] =
" (declare (in) sampler1D sampler)\n"
" (declare (in) vec2 P) \n"
" (declare (in) float lod) )\n"
- " ((return (txl (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz y (var_ref P)) () (var_ref lod) ))))\n"
+ " ((return (txl vec4 (var_ref sampler) (swiz x (var_ref P)) 0 (swiz y (var_ref P)) () (var_ref lod) ))))\n"
"\n"
" (signature ivec4\n"
" (parameters\n"
" (declare (in) isampler1D sampler)\n"
" (declare (in) vec2 P) \n"
" (declare (in) float lod) )\n"
- " ((return (txl (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz y (var_ref P)) () (var_ref lod) ))))\n"
+ " ((return (txl ivec4 (var_ref sampler) (swiz x (var_ref P)) 0 (swiz y (var_ref P)) () (var_ref lod) ))))\n"
"\n"
" (signature uvec4\n"
" (parameters\n"
" (declare (in) usampler1D sampler)\n"
" (declare (in) vec2 P) \n"
" (declare (in) float lod) )\n"
- " ((return (txl (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz y (var_ref P)) () (var_ref lod) ))))\n"
+ " ((return (txl uvec4 (var_ref sampler) (swiz x (var_ref P)) 0 (swiz y (var_ref P)) () (var_ref lod) ))))\n"
"\n"
" (signature vec4\n"
" (parameters\n"
" (declare (in) sampler1D sampler)\n"
" (declare (in) vec4 P) \n"
" (declare (in) float lod) )\n"
- " ((return (txl (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz w (var_ref P)) () (var_ref lod) ))))\n"
+ " ((return (txl vec4 (var_ref sampler) (swiz x (var_ref P)) 0 (swiz w (var_ref P)) () (var_ref lod) ))))\n"
"\n"
" (signature ivec4\n"
" (parameters\n"
" (declare (in) isampler1D sampler)\n"
" (declare (in) vec4 P) \n"
" (declare (in) float lod) )\n"
- " ((return (txl (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz w (var_ref P)) () (var_ref lod) ))))\n"
+ " ((return (txl ivec4 (var_ref sampler) (swiz x (var_ref P)) 0 (swiz w (var_ref P)) () (var_ref lod) ))))\n"
"\n"
" (signature uvec4\n"
" (parameters\n"
" (declare (in) usampler1D sampler)\n"
" (declare (in) vec4 P) \n"
" (declare (in) float lod) )\n"
- " ((return (txl (var_ref sampler) (swiz x (var_ref P)) (0 0 0) (swiz w (var_ref P)) () (var_ref lod) ))))\n"
+ " ((return (txl uvec4 (var_ref sampler) (swiz x (var_ref P)) 0 (swiz w (var_ref P)) () (var_ref lod) ))))\n"
"\n"
" (signature vec4\n"
" (parameters\n"
" (declare (in) sampler2D sampler)\n"
" (declare (in) vec3 P) \n"
" (declare (in) float lod) )\n"
- " ((return (txl (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz z (var_ref P)) () (var_ref lod) ))))\n"
+ " ((return (txl vec4 (var_ref sampler) (swiz xy (var_ref P)) 0 (swiz z (var_ref P)) () (var_ref lod) ))))\n"
"\n"
" (signature ivec4\n"
" (parameters\n"
" (declare (in) isampler2D sampler)\n"
" (declare (in) vec3 P) \n"
" (declare (in) float lod) )\n"
- " ((return (txl (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz z (var_ref P)) () (var_ref lod) ))))\n"
+ " ((return (txl ivec4 (var_ref sampler) (swiz xy (var_ref P)) 0 (swiz z (var_ref P)) () (var_ref lod) ))))\n"
"\n"
" (signature uvec4\n"
" (parameters\n"
" (declare (in) usampler2D sampler)\n"
" (declare (in) vec3 P) \n"
" (declare (in) float lod) )\n"
- " ((return (txl (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz z (var_ref P)) () (var_ref lod) ))))\n"
+ " ((return (txl uvec4 (var_ref sampler) (swiz xy (var_ref P)) 0 (swiz z (var_ref P)) () (var_ref lod) ))))\n"
"\n"
" (signature vec4\n"
" (parameters\n"
" (declare (in) sampler2D sampler)\n"
" (declare (in) vec4 P) \n"
" (declare (in) float lod) )\n"
- " ((return (txl (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz w (var_ref P)) () (var_ref lod) ))))\n"
+ " ((return (txl vec4 (var_ref sampler) (swiz xy (var_ref P)) 0 (swiz w (var_ref P)) () (var_ref lod) ))))\n"
"\n"
" (signature ivec4\n"
" (parameters\n"
" (declare (in) isampler2D sampler)\n"
" (declare (in) vec4 P) \n"
" (declare (in) float lod) )\n"
- " ((return (txl (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz w (var_ref P)) () (var_ref lod) ))))\n"
+ " ((return (txl ivec4 (var_ref sampler) (swiz xy (var_ref P)) 0 (swiz w (var_ref P)) () (var_ref lod) ))))\n"
"\n"
" (signature uvec4\n"
" (parameters\n"
" (declare (in) usampler2D sampler)\n"
" (declare (in) vec4 P) \n"
" (declare (in) float lod) )\n"
- " ((return (txl (var_ref sampler) (swiz xy (var_ref P)) (0 0 0) (swiz w (var_ref P)) () (var_ref lod) ))))\n"
+ " ((return (txl uvec4 (var_ref sampler) (swiz xy (var_ref P)) 0 (swiz w (var_ref P)) () (var_ref lod) ))))\n"
"\n"
" (signature vec4\n"
" (parameters\n"
" (declare (in) sampler3D sampler)\n"
" (declare (in) vec4 P) \n"
" (declare (in) float lod) )\n"
- " ((return (txl (var_ref sampler) (swiz xyz (var_ref P)) (0 0 0) (swiz w (var_ref P)) () (var_ref lod) ))))\n"
+ " ((return (txl vec4 (var_ref sampler) (swiz xyz (var_ref P)) 0 (swiz w (var_ref P)) () (var_ref lod) ))))\n"
"\n"
" (signature ivec4\n"
" (parameters\n"
" (declare (in) isampler3D sampler)\n"
" (declare (in) vec4 P) \n"
" (declare (in) float lod) )\n"
- " ((return (txl (var_ref sampler) (swiz xyz (var_ref P)) (0 0 0) (swiz w (var_ref P)) () (var_ref lod) ))))\n"
+ " ((return (txl ivec4 (var_ref sampler) (swiz xyz (var_ref P)) 0 (swiz w (var_ref P)) () (var_ref lod) ))))\n"
"\n"
" (signature uvec4\n"
" (parameters\n"
" (declare (in) usampler3D sampler)\n"
" (declare (in) vec4 P) \n"
" (declare (in) float lod) )\n"
- " ((return (txl (var_ref sampler) (swiz xyz (var_ref P)) (0 0 0) (swiz w (var_ref P)) () (var_ref lod) ))))\n"
+ " ((return (txl uvec4 (var_ref sampler) (swiz xyz (var_ref P)) 0 (swiz w (var_ref P)) () (var_ref lod) ))))\n"
+ "\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in) sampler1DShadow sampler)\n"
+ " (declare (in) vec4 P) \n"
+ " (declare (in) float lod) )\n"
+ " ((return (txl float (var_ref sampler) (swiz x (var_ref P)) 0 (swiz w (var_ref P)) (swiz z (var_ref P)) (var_ref lod) ))))\n"
+ "\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in) sampler2DShadow sampler)\n"
+ " (declare (in) vec4 P) \n"
+ " (declare (in) float lod) )\n"
+ " ((return (txl float (var_ref sampler) (swiz xy (var_ref P)) 0 (swiz w (var_ref P)) (swiz z (var_ref P)) (var_ref lod) ))))\n"
+ "\n"
+ "))\n"
+ ""
+;
+static const char builtin_textureProjLodOffset[] =
+ "((function textureProjLodOffset\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in) sampler1D sampler)\n"
+ " (declare (in) vec2 P) \n"
+ " (declare (in) float lod) \n"
+ " (declare (const_in) int offset) )\n"
+ " ((return (txl vec4 (var_ref sampler) (swiz x (var_ref P)) (var_ref offset) (swiz y (var_ref P)) () (var_ref lod) ))))\n"
+ "\n"
+ " (signature ivec4\n"
+ " (parameters\n"
+ " (declare (in) isampler1D sampler)\n"
+ " (declare (in) vec2 P) \n"
+ " (declare (in) float lod) \n"
+ " (declare (const_in) int offset) )\n"
+ " ((return (txl ivec4 (var_ref sampler) (swiz x (var_ref P)) (var_ref offset) (swiz y (var_ref P)) () (var_ref lod) ))))\n"
+ "\n"
+ " (signature uvec4\n"
+ " (parameters\n"
+ " (declare (in) usampler1D sampler)\n"
+ " (declare (in) vec2 P) \n"
+ " (declare (in) float lod) \n"
+ " (declare (const_in) int offset) )\n"
+ " ((return (txl uvec4 (var_ref sampler) (swiz x (var_ref P)) (var_ref offset) (swiz y (var_ref P)) () (var_ref lod) ))))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in) sampler1D sampler)\n"
+ " (declare (in) vec4 P) \n"
+ " (declare (in) float lod) \n"
+ " (declare (const_in) int offset) )\n"
+ " ((return (txl vec4 (var_ref sampler) (swiz x (var_ref P)) (var_ref offset) (swiz w (var_ref P)) () (var_ref lod) ))))\n"
+ "\n"
+ " (signature ivec4\n"
+ " (parameters\n"
+ " (declare (in) isampler1D sampler)\n"
+ " (declare (in) vec4 P) \n"
+ " (declare (in) float lod) \n"
+ " (declare (const_in) int offset) )\n"
+ " ((return (txl ivec4 (var_ref sampler) (swiz x (var_ref P)) (var_ref offset) (swiz w (var_ref P)) () (var_ref lod) ))))\n"
+ "\n"
+ " (signature uvec4\n"
+ " (parameters\n"
+ " (declare (in) usampler1D sampler)\n"
+ " (declare (in) vec4 P) \n"
+ " (declare (in) float lod) \n"
+ " (declare (const_in) int offset) )\n"
+ " ((return (txl uvec4 (var_ref sampler) (swiz x (var_ref P)) (var_ref offset) (swiz w (var_ref P)) () (var_ref lod) ))))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in) sampler2D sampler)\n"
+ " (declare (in) vec3 P) \n"
+ " (declare (in) float lod) \n"
+ " (declare (const_in) ivec2 offset) )\n"
+ " ((return (txl vec4 (var_ref sampler) (swiz xy (var_ref P)) (var_ref offset) (swiz z (var_ref P)) () (var_ref lod) ))))\n"
+ "\n"
+ " (signature ivec4\n"
+ " (parameters\n"
+ " (declare (in) isampler2D sampler)\n"
+ " (declare (in) vec3 P) \n"
+ " (declare (in) float lod) \n"
+ " (declare (const_in) ivec2 offset) )\n"
+ " ((return (txl ivec4 (var_ref sampler) (swiz xy (var_ref P)) (var_ref offset) (swiz z (var_ref P)) () (var_ref lod) ))))\n"
+ "\n"
+ " (signature uvec4\n"
+ " (parameters\n"
+ " (declare (in) usampler2D sampler)\n"
+ " (declare (in) vec3 P) \n"
+ " (declare (in) float lod) \n"
+ " (declare (const_in) ivec2 offset) )\n"
+ " ((return (txl uvec4 (var_ref sampler) (swiz xy (var_ref P)) (var_ref offset) (swiz z (var_ref P)) () (var_ref lod) ))))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in) sampler2D sampler)\n"
+ " (declare (in) vec4 P) \n"
+ " (declare (in) float lod) \n"
+ " (declare (const_in) ivec2 offset) )\n"
+ " ((return (txl vec4 (var_ref sampler) (swiz xy (var_ref P)) (var_ref offset) (swiz w (var_ref P)) () (var_ref lod) ))))\n"
+ "\n"
+ " (signature ivec4\n"
+ " (parameters\n"
+ " (declare (in) isampler2D sampler)\n"
+ " (declare (in) vec4 P) \n"
+ " (declare (in) float lod) \n"
+ " (declare (const_in) ivec2 offset) )\n"
+ " ((return (txl ivec4 (var_ref sampler) (swiz xy (var_ref P)) (var_ref offset) (swiz w (var_ref P)) () (var_ref lod) ))))\n"
+ "\n"
+ " (signature uvec4\n"
+ " (parameters\n"
+ " (declare (in) usampler2D sampler)\n"
+ " (declare (in) vec4 P) \n"
+ " (declare (in) float lod) \n"
+ " (declare (const_in) ivec2 offset) )\n"
+ " ((return (txl uvec4 (var_ref sampler) (swiz xy (var_ref P)) (var_ref offset) (swiz w (var_ref P)) () (var_ref lod) ))))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in) sampler3D sampler)\n"
+ " (declare (in) vec4 P) \n"
+ " (declare (in) float lod) \n"
+ " (declare (const_in) ivec3 offset) )\n"
+ " ((return (txl vec4 (var_ref sampler) (swiz xyz (var_ref P)) (var_ref offset) (swiz w (var_ref P)) () (var_ref lod) ))))\n"
+ "\n"
+ " (signature ivec4\n"
+ " (parameters\n"
+ " (declare (in) isampler3D sampler)\n"
+ " (declare (in) vec4 P) \n"
+ " (declare (in) float lod) \n"
+ " (declare (const_in) ivec3 offset) )\n"
+ " ((return (txl ivec4 (var_ref sampler) (swiz xyz (var_ref P)) (var_ref offset) (swiz w (var_ref P)) () (var_ref lod) ))))\n"
+ "\n"
+ " (signature uvec4\n"
+ " (parameters\n"
+ " (declare (in) usampler3D sampler)\n"
+ " (declare (in) vec4 P) \n"
+ " (declare (in) float lod) \n"
+ " (declare (const_in) ivec3 offset) )\n"
+ " ((return (txl uvec4 (var_ref sampler) (swiz xyz (var_ref P)) (var_ref offset) (swiz w (var_ref P)) () (var_ref lod) ))))\n"
+ "\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in) sampler1DShadow sampler)\n"
+ " (declare (in) vec4 P) \n"
+ " (declare (in) float lod) \n"
+ " (declare (const_in) int offset) )\n"
+ " ((return (txl float (var_ref sampler) (swiz x (var_ref P)) (var_ref offset) (swiz w (var_ref P)) (swiz z (var_ref P)) (var_ref lod) ))))\n"
+ "\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in) sampler2DShadow sampler)\n"
+ " (declare (in) vec4 P) \n"
+ " (declare (in) float lod) \n"
+ " (declare (const_in) ivec2 offset) )\n"
+ " ((return (txl float (var_ref sampler) (swiz xy (var_ref P)) (var_ref offset) (swiz w (var_ref P)) (swiz z (var_ref P)) (var_ref lod) ))))\n"
+ "\n"
+ "))\n"
+ ""
+;
+static const char builtin_textureProjOffset[] =
+ "((function textureProjOffset\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in) sampler1D sampler)\n"
+ " (declare (in) vec2 P) \n"
+ " (declare (const_in) int offset) )\n"
+ " ((return (tex vec4 (var_ref sampler) (swiz x (var_ref P)) (var_ref offset) (swiz y (var_ref P)) () ))))\n"
+ "\n"
+ " (signature ivec4\n"
+ " (parameters\n"
+ " (declare (in) isampler1D sampler)\n"
+ " (declare (in) vec2 P) \n"
+ " (declare (const_in) int offset) )\n"
+ " ((return (tex ivec4 (var_ref sampler) (swiz x (var_ref P)) (var_ref offset) (swiz y (var_ref P)) () ))))\n"
+ "\n"
+ " (signature uvec4\n"
+ " (parameters\n"
+ " (declare (in) usampler1D sampler)\n"
+ " (declare (in) vec2 P) \n"
+ " (declare (const_in) int offset) )\n"
+ " ((return (tex uvec4 (var_ref sampler) (swiz x (var_ref P)) (var_ref offset) (swiz y (var_ref P)) () ))))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in) sampler1D sampler)\n"
+ " (declare (in) vec4 P) \n"
+ " (declare (const_in) int offset) )\n"
+ " ((return (tex vec4 (var_ref sampler) (swiz x (var_ref P)) (var_ref offset) (swiz w (var_ref P)) () ))))\n"
+ "\n"
+ " (signature ivec4\n"
+ " (parameters\n"
+ " (declare (in) isampler1D sampler)\n"
+ " (declare (in) vec4 P) \n"
+ " (declare (const_in) int offset) )\n"
+ " ((return (tex ivec4 (var_ref sampler) (swiz x (var_ref P)) (var_ref offset) (swiz w (var_ref P)) () ))))\n"
+ "\n"
+ " (signature uvec4\n"
+ " (parameters\n"
+ " (declare (in) usampler1D sampler)\n"
+ " (declare (in) vec4 P) \n"
+ " (declare (const_in) int offset) )\n"
+ " ((return (tex uvec4 (var_ref sampler) (swiz x (var_ref P)) (var_ref offset) (swiz w (var_ref P)) () ))))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in) sampler2D sampler)\n"
+ " (declare (in) vec3 P) \n"
+ " (declare (const_in) ivec2 offset) )\n"
+ " ((return (tex vec4 (var_ref sampler) (swiz xy (var_ref P)) (var_ref offset) (swiz z (var_ref P)) () ))))\n"
+ "\n"
+ " (signature ivec4\n"
+ " (parameters\n"
+ " (declare (in) isampler2D sampler)\n"
+ " (declare (in) vec3 P) \n"
+ " (declare (const_in) ivec2 offset) )\n"
+ " ((return (tex ivec4 (var_ref sampler) (swiz xy (var_ref P)) (var_ref offset) (swiz z (var_ref P)) () ))))\n"
+ "\n"
+ " (signature uvec4\n"
+ " (parameters\n"
+ " (declare (in) usampler2D sampler)\n"
+ " (declare (in) vec3 P) \n"
+ " (declare (const_in) ivec2 offset) )\n"
+ " ((return (tex uvec4 (var_ref sampler) (swiz xy (var_ref P)) (var_ref offset) (swiz z (var_ref P)) () ))))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in) sampler2D sampler)\n"
+ " (declare (in) vec4 P) \n"
+ " (declare (const_in) ivec2 offset) )\n"
+ " ((return (tex vec4 (var_ref sampler) (swiz xy (var_ref P)) (var_ref offset) (swiz w (var_ref P)) () ))))\n"
+ "\n"
+ " (signature ivec4\n"
+ " (parameters\n"
+ " (declare (in) isampler2D sampler)\n"
+ " (declare (in) vec4 P) \n"
+ " (declare (const_in) ivec2 offset) )\n"
+ " ((return (tex ivec4 (var_ref sampler) (swiz xy (var_ref P)) (var_ref offset) (swiz w (var_ref P)) () ))))\n"
+ "\n"
+ " (signature uvec4\n"
+ " (parameters\n"
+ " (declare (in) usampler2D sampler)\n"
+ " (declare (in) vec4 P) \n"
+ " (declare (const_in) ivec2 offset) )\n"
+ " ((return (tex uvec4 (var_ref sampler) (swiz xy (var_ref P)) (var_ref offset) (swiz w (var_ref P)) () ))))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in) sampler3D sampler)\n"
+ " (declare (in) vec4 P) \n"
+ " (declare (const_in) ivec3 offset) )\n"
+ " ((return (tex vec4 (var_ref sampler) (swiz xyz (var_ref P)) (var_ref offset) (swiz w (var_ref P)) () ))))\n"
+ "\n"
+ " (signature ivec4\n"
+ " (parameters\n"
+ " (declare (in) isampler3D sampler)\n"
+ " (declare (in) vec4 P) \n"
+ " (declare (const_in) ivec3 offset) )\n"
+ " ((return (tex ivec4 (var_ref sampler) (swiz xyz (var_ref P)) (var_ref offset) (swiz w (var_ref P)) () ))))\n"
+ "\n"
+ " (signature uvec4\n"
+ " (parameters\n"
+ " (declare (in) usampler3D sampler)\n"
+ " (declare (in) vec4 P) \n"
+ " (declare (const_in) ivec3 offset) )\n"
+ " ((return (tex uvec4 (var_ref sampler) (swiz xyz (var_ref P)) (var_ref offset) (swiz w (var_ref P)) () ))))\n"
+ "\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in) sampler1DShadow sampler)\n"
+ " (declare (in) vec4 P) \n"
+ " (declare (const_in) int offset) )\n"
+ " ((return (tex float (var_ref sampler) (swiz x (var_ref P)) (var_ref offset) (swiz w (var_ref P)) (swiz z (var_ref P)) ))))\n"
+ "\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in) sampler2DShadow sampler)\n"
+ " (declare (in) vec4 P) \n"
+ " (declare (const_in) ivec2 offset) )\n"
+ " ((return (tex float (var_ref sampler) (swiz xy (var_ref P)) (var_ref offset) (swiz w (var_ref P)) (swiz z (var_ref P)) ))))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in) sampler1D sampler)\n"
+ " (declare (in) vec2 P) \n"
+ " (declare (const_in) int offset) \n"
+ " (declare (in) float bias) )\n"
+ " ((return (txb vec4 (var_ref sampler) (swiz x (var_ref P)) (var_ref offset) (swiz y (var_ref P)) () (var_ref bias) ))))\n"
+ "\n"
+ " (signature ivec4\n"
+ " (parameters\n"
+ " (declare (in) isampler1D sampler)\n"
+ " (declare (in) vec2 P) \n"
+ " (declare (const_in) int offset) \n"
+ " (declare (in) float bias) )\n"
+ " ((return (txb ivec4 (var_ref sampler) (swiz x (var_ref P)) (var_ref offset) (swiz y (var_ref P)) () (var_ref bias) ))))\n"
+ "\n"
+ " (signature uvec4\n"
+ " (parameters\n"
+ " (declare (in) usampler1D sampler)\n"
+ " (declare (in) vec2 P) \n"
+ " (declare (const_in) int offset) \n"
+ " (declare (in) float bias) )\n"
+ " ((return (txb uvec4 (var_ref sampler) (swiz x (var_ref P)) (var_ref offset) (swiz y (var_ref P)) () (var_ref bias) ))))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in) sampler1D sampler)\n"
+ " (declare (in) vec4 P) \n"
+ " (declare (const_in) int offset) \n"
+ " (declare (in) float bias) )\n"
+ " ((return (txb vec4 (var_ref sampler) (swiz x (var_ref P)) (var_ref offset) (swiz w (var_ref P)) () (var_ref bias) ))))\n"
+ "\n"
+ " (signature ivec4\n"
+ " (parameters\n"
+ " (declare (in) isampler1D sampler)\n"
+ " (declare (in) vec4 P) \n"
+ " (declare (const_in) int offset) \n"
+ " (declare (in) float bias) )\n"
+ " ((return (txb ivec4 (var_ref sampler) (swiz x (var_ref P)) (var_ref offset) (swiz w (var_ref P)) () (var_ref bias) ))))\n"
+ "\n"
+ " (signature uvec4\n"
+ " (parameters\n"
+ " (declare (in) usampler1D sampler)\n"
+ " (declare (in) vec4 P) \n"
+ " (declare (const_in) int offset) \n"
+ " (declare (in) float bias) )\n"
+ " ((return (txb uvec4 (var_ref sampler) (swiz x (var_ref P)) (var_ref offset) (swiz w (var_ref P)) () (var_ref bias) ))))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in) sampler2D sampler)\n"
+ " (declare (in) vec3 P) \n"
+ " (declare (const_in) ivec2 offset) \n"
+ " (declare (in) float bias) )\n"
+ " ((return (txb vec4 (var_ref sampler) (swiz xy (var_ref P)) (var_ref offset) (swiz z (var_ref P)) () (var_ref bias) ))))\n"
+ "\n"
+ " (signature ivec4\n"
+ " (parameters\n"
+ " (declare (in) isampler2D sampler)\n"
+ " (declare (in) vec3 P) \n"
+ " (declare (const_in) ivec2 offset) \n"
+ " (declare (in) float bias) )\n"
+ " ((return (txb ivec4 (var_ref sampler) (swiz xy (var_ref P)) (var_ref offset) (swiz z (var_ref P)) () (var_ref bias) ))))\n"
+ "\n"
+ " (signature uvec4\n"
+ " (parameters\n"
+ " (declare (in) usampler2D sampler)\n"
+ " (declare (in) vec3 P) \n"
+ " (declare (const_in) ivec2 offset) \n"
+ " (declare (in) float bias) )\n"
+ " ((return (txb uvec4 (var_ref sampler) (swiz xy (var_ref P)) (var_ref offset) (swiz z (var_ref P)) () (var_ref bias) ))))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in) sampler2D sampler)\n"
+ " (declare (in) vec4 P) \n"
+ " (declare (const_in) ivec2 offset) \n"
+ " (declare (in) float bias) )\n"
+ " ((return (txb vec4 (var_ref sampler) (swiz xy (var_ref P)) (var_ref offset) (swiz w (var_ref P)) () (var_ref bias) ))))\n"
+ "\n"
+ " (signature ivec4\n"
+ " (parameters\n"
+ " (declare (in) isampler2D sampler)\n"
+ " (declare (in) vec4 P) \n"
+ " (declare (const_in) ivec2 offset) \n"
+ " (declare (in) float bias) )\n"
+ " ((return (txb ivec4 (var_ref sampler) (swiz xy (var_ref P)) (var_ref offset) (swiz w (var_ref P)) () (var_ref bias) ))))\n"
+ "\n"
+ " (signature uvec4\n"
+ " (parameters\n"
+ " (declare (in) usampler2D sampler)\n"
+ " (declare (in) vec4 P) \n"
+ " (declare (const_in) ivec2 offset) \n"
+ " (declare (in) float bias) )\n"
+ " ((return (txb uvec4 (var_ref sampler) (swiz xy (var_ref P)) (var_ref offset) (swiz w (var_ref P)) () (var_ref bias) ))))\n"
+ "\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in) sampler3D sampler)\n"
+ " (declare (in) vec4 P) \n"
+ " (declare (const_in) ivec3 offset) \n"
+ " (declare (in) float bias) )\n"
+ " ((return (txb vec4 (var_ref sampler) (swiz xyz (var_ref P)) (var_ref offset) (swiz w (var_ref P)) () (var_ref bias) ))))\n"
+ "\n"
+ " (signature ivec4\n"
+ " (parameters\n"
+ " (declare (in) isampler3D sampler)\n"
+ " (declare (in) vec4 P) \n"
+ " (declare (const_in) ivec3 offset) \n"
+ " (declare (in) float bias) )\n"
+ " ((return (txb ivec4 (var_ref sampler) (swiz xyz (var_ref P)) (var_ref offset) (swiz w (var_ref P)) () (var_ref bias) ))))\n"
+ "\n"
+ " (signature uvec4\n"
+ " (parameters\n"
+ " (declare (in) usampler3D sampler)\n"
+ " (declare (in) vec4 P) \n"
+ " (declare (const_in) ivec3 offset) \n"
+ " (declare (in) float bias) )\n"
+ " ((return (txb uvec4 (var_ref sampler) (swiz xyz (var_ref P)) (var_ref offset) (swiz w (var_ref P)) () (var_ref bias) ))))\n"
+ "\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in) sampler1DShadow sampler)\n"
+ " (declare (in) vec4 P) \n"
+ " (declare (const_in) int offset) \n"
+ " (declare (in) float bias) )\n"
+ " ((return (txb float (var_ref sampler) (swiz x (var_ref P)) (var_ref offset) (swiz w (var_ref P)) (swiz z (var_ref P)) (var_ref bias) ))))\n"
+ "\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in) sampler2DShadow sampler)\n"
+ " (declare (in) vec4 P) \n"
+ " (declare (const_in) ivec2 offset) \n"
+ " (declare (in) float bias) )\n"
+ " ((return (txb float (var_ref sampler) (swiz xy (var_ref P)) (var_ref offset) (swiz w (var_ref P)) (swiz z (var_ref P)) (var_ref bias) ))))\n"
"\n"
"))\n"
""
@@ -4730,135 +6168,135 @@ static const char builtin_transpose[] =
" (parameters\n"
" (declare (in) mat2 m))\n"
" ((declare () mat2 t)\n"
- " (assign (constant bool (1)) (x) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (0)))))\n"
- " (assign (constant bool (1)) (x) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (0)))))\n"
- " (assign (constant bool (1)) (y) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (1)))))\n"
- " (assign (constant bool (1)) (y) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (1)))))\n"
+ " (assign (x) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (0)))))\n"
+ " (assign (x) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (0)))))\n"
+ " (assign (y) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (1)))))\n"
+ " (assign (y) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (1)))))\n"
"(return (var_ref t))))\n"
"\n"
" (signature mat3x2\n"
" (parameters\n"
" (declare (in) mat2x3 m))\n"
" ((declare () mat3x2 t)\n"
- " (assign (constant bool (1)) (x) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (0)))))\n"
- " (assign (constant bool (1)) (x) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (0)))))\n"
- " (assign (constant bool (1)) (x) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (0)))))\n"
- " (assign (constant bool (1)) (y) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (1)))))\n"
- " (assign (constant bool (1)) (y) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (1)))))\n"
- " (assign (constant bool (1)) (y) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (1)))))\n"
+ " (assign (x) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (0)))))\n"
+ " (assign (x) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (0)))))\n"
+ " (assign (x) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (0)))))\n"
+ " (assign (y) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (1)))))\n"
+ " (assign (y) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (1)))))\n"
+ " (assign (y) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (1)))))\n"
"(return (var_ref t))))\n"
"\n"
" (signature mat4x2\n"
" (parameters\n"
" (declare (in) mat2x4 m))\n"
" ((declare () mat4x2 t)\n"
- " (assign (constant bool (1)) (x) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (0)))))\n"
- " (assign (constant bool (1)) (x) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (0)))))\n"
- " (assign (constant bool (1)) (x) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (0)))))\n"
- " (assign (constant bool (1)) (x) (array_ref (var_ref t) (constant int (3))) (swiz w (array_ref (var_ref m) (constant int (0)))))\n"
- " (assign (constant bool (1)) (y) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (1)))))\n"
- " (assign (constant bool (1)) (y) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (1)))))\n"
- " (assign (constant bool (1)) (y) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (1)))))\n"
- " (assign (constant bool (1)) (y) (array_ref (var_ref t) (constant int (3))) (swiz w (array_ref (var_ref m) (constant int (1)))))\n"
+ " (assign (x) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (0)))))\n"
+ " (assign (x) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (0)))))\n"
+ " (assign (x) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (0)))))\n"
+ " (assign (x) (array_ref (var_ref t) (constant int (3))) (swiz w (array_ref (var_ref m) (constant int (0)))))\n"
+ " (assign (y) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (1)))))\n"
+ " (assign (y) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (1)))))\n"
+ " (assign (y) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (1)))))\n"
+ " (assign (y) (array_ref (var_ref t) (constant int (3))) (swiz w (array_ref (var_ref m) (constant int (1)))))\n"
"(return (var_ref t))))\n"
"\n"
" (signature mat2x3\n"
" (parameters\n"
" (declare (in) mat3x2 m))\n"
" ((declare () mat2x3 t)\n"
- " (assign (constant bool (1)) (x) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (0)))))\n"
- " (assign (constant bool (1)) (x) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (0)))))\n"
- " (assign (constant bool (1)) (y) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (1)))))\n"
- " (assign (constant bool (1)) (y) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (1)))))\n"
- " (assign (constant bool (1)) (z) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (2)))))\n"
- " (assign (constant bool (1)) (z) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (2)))))\n"
+ " (assign (x) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (0)))))\n"
+ " (assign (x) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (0)))))\n"
+ " (assign (y) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (1)))))\n"
+ " (assign (y) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (1)))))\n"
+ " (assign (z) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (2)))))\n"
+ " (assign (z) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (2)))))\n"
"(return (var_ref t))))\n"
"\n"
" (signature mat3\n"
" (parameters\n"
" (declare (in) mat3 m))\n"
" ((declare () mat3 t)\n"
- " (assign (constant bool (1)) (x) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (0)))))\n"
- " (assign (constant bool (1)) (x) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (0)))))\n"
- " (assign (constant bool (1)) (x) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (0)))))\n"
- " (assign (constant bool (1)) (y) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (1)))))\n"
- " (assign (constant bool (1)) (y) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (1)))))\n"
- " (assign (constant bool (1)) (y) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (1)))))\n"
- " (assign (constant bool (1)) (z) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (2)))))\n"
- " (assign (constant bool (1)) (z) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (2)))))\n"
- " (assign (constant bool (1)) (z) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (2)))))\n"
+ " (assign (x) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (0)))))\n"
+ " (assign (x) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (0)))))\n"
+ " (assign (x) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (0)))))\n"
+ " (assign (y) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (1)))))\n"
+ " (assign (y) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (1)))))\n"
+ " (assign (y) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (1)))))\n"
+ " (assign (z) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (2)))))\n"
+ " (assign (z) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (2)))))\n"
+ " (assign (z) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (2)))))\n"
"(return (var_ref t))))\n"
"\n"
" (signature mat4x3\n"
" (parameters\n"
" (declare (in) mat3x4 m))\n"
" ((declare () mat4x3 t)\n"
- " (assign (constant bool (1)) (x) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (0)))))\n"
- " (assign (constant bool (1)) (x) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (0)))))\n"
- " (assign (constant bool (1)) (x) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (0)))))\n"
- " (assign (constant bool (1)) (x) (array_ref (var_ref t) (constant int (3))) (swiz w (array_ref (var_ref m) (constant int (0)))))\n"
- " (assign (constant bool (1)) (y) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (1)))))\n"
- " (assign (constant bool (1)) (y) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (1)))))\n"
- " (assign (constant bool (1)) (y) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (1)))))\n"
- " (assign (constant bool (1)) (y) (array_ref (var_ref t) (constant int (3))) (swiz w (array_ref (var_ref m) (constant int (1)))))\n"
- " (assign (constant bool (1)) (z) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (2)))))\n"
- " (assign (constant bool (1)) (z) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (2)))))\n"
- " (assign (constant bool (1)) (z) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (2)))))\n"
- " (assign (constant bool (1)) (z) (array_ref (var_ref t) (constant int (3))) (swiz w (array_ref (var_ref m) (constant int (2)))))\n"
+ " (assign (x) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (0)))))\n"
+ " (assign (x) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (0)))))\n"
+ " (assign (x) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (0)))))\n"
+ " (assign (x) (array_ref (var_ref t) (constant int (3))) (swiz w (array_ref (var_ref m) (constant int (0)))))\n"
+ " (assign (y) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (1)))))\n"
+ " (assign (y) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (1)))))\n"
+ " (assign (y) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (1)))))\n"
+ " (assign (y) (array_ref (var_ref t) (constant int (3))) (swiz w (array_ref (var_ref m) (constant int (1)))))\n"
+ " (assign (z) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (2)))))\n"
+ " (assign (z) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (2)))))\n"
+ " (assign (z) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (2)))))\n"
+ " (assign (z) (array_ref (var_ref t) (constant int (3))) (swiz w (array_ref (var_ref m) (constant int (2)))))\n"
"(return (var_ref t))))\n"
"\n"
" (signature mat2x4\n"
" (parameters\n"
" (declare (in) mat4x2 m))\n"
" ((declare () mat2x4 t)\n"
- " (assign (constant bool (1)) (x) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (0)))))\n"
- " (assign (constant bool (1)) (x) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (0)))))\n"
- " (assign (constant bool (1)) (y) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (1)))))\n"
- " (assign (constant bool (1)) (y) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (1)))))\n"
- " (assign (constant bool (1)) (z) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (2)))))\n"
- " (assign (constant bool (1)) (z) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (2)))))\n"
- " (assign (constant bool (1)) (w) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (3)))))\n"
- " (assign (constant bool (1)) (w) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (3)))))\n"
+ " (assign (x) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (0)))))\n"
+ " (assign (x) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (0)))))\n"
+ " (assign (y) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (1)))))\n"
+ " (assign (y) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (1)))))\n"
+ " (assign (z) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (2)))))\n"
+ " (assign (z) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (2)))))\n"
+ " (assign (w) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (3)))))\n"
+ " (assign (w) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (3)))))\n"
"(return (var_ref t))))\n"
"\n"
" (signature mat3x4\n"
" (parameters\n"
" (declare (in) mat4x3 m))\n"
" ((declare () mat3x4 t)\n"
- " (assign (constant bool (1)) (x) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (0)))))\n"
- " (assign (constant bool (1)) (x) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (0)))))\n"
- " (assign (constant bool (1)) (x) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (0)))))\n"
- " (assign (constant bool (1)) (y) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (1)))))\n"
- " (assign (constant bool (1)) (y) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (1)))))\n"
- " (assign (constant bool (1)) (y) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (1)))))\n"
- " (assign (constant bool (1)) (z) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (2)))))\n"
- " (assign (constant bool (1)) (z) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (2)))))\n"
- " (assign (constant bool (1)) (z) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (2)))))\n"
- " (assign (constant bool (1)) (w) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (3)))))\n"
- " (assign (constant bool (1)) (w) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (3)))))\n"
- " (assign (constant bool (1)) (w) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (3)))))\n"
+ " (assign (x) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (0)))))\n"
+ " (assign (x) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (0)))))\n"
+ " (assign (x) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (0)))))\n"
+ " (assign (y) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (1)))))\n"
+ " (assign (y) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (1)))))\n"
+ " (assign (y) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (1)))))\n"
+ " (assign (z) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (2)))))\n"
+ " (assign (z) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (2)))))\n"
+ " (assign (z) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (2)))))\n"
+ " (assign (w) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (3)))))\n"
+ " (assign (w) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (3)))))\n"
+ " (assign (w) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (3)))))\n"
"(return (var_ref t))))\n"
"\n"
" (signature mat4\n"
" (parameters\n"
" (declare (in) mat4 m))\n"
" ((declare () mat4 t)\n"
- " (assign (constant bool (1)) (x) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (0)))))\n"
- " (assign (constant bool (1)) (x) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (0)))))\n"
- " (assign (constant bool (1)) (x) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (0)))))\n"
- " (assign (constant bool (1)) (x) (array_ref (var_ref t) (constant int (3))) (swiz w (array_ref (var_ref m) (constant int (0)))))\n"
- " (assign (constant bool (1)) (y) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (1)))))\n"
- " (assign (constant bool (1)) (y) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (1)))))\n"
- " (assign (constant bool (1)) (y) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (1)))))\n"
- " (assign (constant bool (1)) (y) (array_ref (var_ref t) (constant int (3))) (swiz w (array_ref (var_ref m) (constant int (1)))))\n"
- " (assign (constant bool (1)) (z) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (2)))))\n"
- " (assign (constant bool (1)) (z) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (2)))))\n"
- " (assign (constant bool (1)) (z) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (2)))))\n"
- " (assign (constant bool (1)) (z) (array_ref (var_ref t) (constant int (3))) (swiz w (array_ref (var_ref m) (constant int (2)))))\n"
- " (assign (constant bool (1)) (w) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (3)))))\n"
- " (assign (constant bool (1)) (w) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (3)))))\n"
- " (assign (constant bool (1)) (w) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (3)))))\n"
- " (assign (constant bool (1)) (w) (array_ref (var_ref t) (constant int (3))) (swiz w (array_ref (var_ref m) (constant int (3)))))\n"
+ " (assign (x) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (0)))))\n"
+ " (assign (x) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (0)))))\n"
+ " (assign (x) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (0)))))\n"
+ " (assign (x) (array_ref (var_ref t) (constant int (3))) (swiz w (array_ref (var_ref m) (constant int (0)))))\n"
+ " (assign (y) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (1)))))\n"
+ " (assign (y) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (1)))))\n"
+ " (assign (y) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (1)))))\n"
+ " (assign (y) (array_ref (var_ref t) (constant int (3))) (swiz w (array_ref (var_ref m) (constant int (1)))))\n"
+ " (assign (z) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (2)))))\n"
+ " (assign (z) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (2)))))\n"
+ " (assign (z) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (2)))))\n"
+ " (assign (z) (array_ref (var_ref t) (constant int (3))) (swiz w (array_ref (var_ref m) (constant int (2)))))\n"
+ " (assign (w) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (3)))))\n"
+ " (assign (w) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (3)))))\n"
+ " (assign (w) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (3)))))\n"
+ " (assign (w) (array_ref (var_ref t) (constant int (3))) (swiz w (array_ref (var_ref m) (constant int (3)))))\n"
"(return (var_ref t))))\n"
")\n"
"\n"
@@ -13062,12 +14500,18 @@ static const char prototypes_for_130_frag[] =
'(','f','u','n','c','t','i','o','n',' ','a','l','l',' ','(','s','i','g','n','a','t','u','r','e',' ','b','o','o','l',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','b','v','e','c','2',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','o','o','l',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','b','v','e','c','3',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','o','o','l',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','b','v','e','c','4',' ','x',')',')',' ','(',')',')',')',
'(','f','u','n','c','t','i','o','n',' ','n','o','t',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','b','v','e','c','2',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','b','v','e','c','3',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','b','v','e','c','4',' ','x',')',')',' ','(',')',')',')',
'(','f','u','n','c','t','i','o','n',' ','t','e','x','t','u','r','e',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','C','u','b','e',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','C','u','b','e',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','C','u','b','e',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','C','u','b','e','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','A','r','r','a','y','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','A','r','r','a','y','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','C','u','b','e',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','C','u','b','e',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','C','u','b','e',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','C','u','b','e','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','A','r','r','a','y','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','t','e','x','t','u','r','e','P','r','o','j',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',')',
+'(','f','u','n','c','t','i','o','n',' ','t','e','x','t','u','r','e','P','r','o','j',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','o','f','f','s','e','t',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','o','f','f','s','e','t',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','o','f','f','s','e','t',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',')',
'(','f','u','n','c','t','i','o','n',' ','t','e','x','t','u','r','e','L','o','d',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','C','u','b','e',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','C','u','b','e',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','C','u','b','e',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','A','r','r','a','y','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',')',
+'(','f','u','n','c','t','i','o','n',' ','t','e','x','t','u','r','e','O','f','f','s','e','t',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','A','r','r','a','y','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','o','f','f','s','e','t',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','o','f','f','s','e','t',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','o','f','f','s','e','t',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','A','r','r','a','y','S','h','a','d','o','w',' ','s','a','m','p',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',')',
'(','f','u','n','c','t','i','o','n',' ','t','e','x','e','l','F','e','t','c','h',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',')',' ','(',')',')',')',
+'(','f','u','n','c','t','i','o','n',' ','t','e','x','e','l','F','e','t','c','h','O','f','f','s','e','t',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',')',
+'(','f','u','n','c','t','i','o','n',' ','t','e','x','t','u','r','e','L','o','d','O','f','f','s','e','t',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','S','h','a','d','o','w',' ','s','a','m','p',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','S','h','a','d','o','w',' ','s','a','m','p',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','A','r','r','a','y',' ','s','a','m','p',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D','A','r','r','a','y',' ','s','a','m','p',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D','A','r','r','a','y',' ','s','a','m','p',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','A','r','r','a','y','S','h','a','d','o','w',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',')',
'(','f','u','n','c','t','i','o','n',' ','t','e','x','t','u','r','e','P','r','o','j','L','o','d',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',')',
+'(','f','u','n','c','t','i','o','n',' ','t','e','x','t','u','r','e','P','r','o','j','L','o','d','O','f','f','s','e','t',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','S','h','a','d','o','w',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','S','h','a','d','o','w',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',')',
'(','f','u','n','c','t','i','o','n',' ','t','e','x','t','u','r','e','G','r','a','d',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','C','u','b','e',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','C','u','b','e',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','C','u','b','e',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','C','u','b','e','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','A','r','r','a','y','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','A','r','r','a','y','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','y',')',')',' ','(',')',')',')',
+'(','f','u','n','c','t','i','o','n',' ','t','e','x','t','u','r','e','G','r','a','d','O','f','f','s','e','t',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','3','D',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','3','D',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','3','D',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','C','u','b','e',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','C','u','b','e',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','C','u','b','e',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','S','h','a','d','o','w',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','S','h','a','d','o','w',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','A','r','r','a','y',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D','A','r','r','a','y',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D','A','r','r','a','y',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','A','r','r','a','y',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D','A','r','r','a','y',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D','A','r','r','a','y',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','A','r','r','a','y','S','h','a','d','o','w',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','A','r','r','a','y','S','h','a','d','o','w',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o',')',')',' ','(',')',')',')',
'(','f','u','n','c','t','i','o','n',' ','t','e','x','t','u','r','e','P','r','o','j','G','r','a','d',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','y',')',')',' ','(',')',')',')',
+'(','f','u','n','c','t','i','o','n',' ','t','e','x','t','u','r','e','P','r','o','j','G','r','a','d','O','f','f','s','e','t',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','3','D',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','o','f','f',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','3','D',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','o','f','f',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','3','D',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','o','f','f',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','S','h','a','d','o','w',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','S','h','a','d','o','w',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','o',')',')',' ','(',')',')',')',
'(','f','u','n','c','t','i','o','n',' ','t','e','x','t','u','r','e','1','D',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','c','o','o','r','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','c','o','o','r','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',')',
'(','f','u','n','c','t','i','o','n',' ','t','e','x','t','u','r','e','1','D','P','r','o','j',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','c','o','o','r','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','c','o','o','r','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','c','o','o','r','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','c','o','o','r','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',')',
'(','f','u','n','c','t','i','o','n',' ','t','e','x','t','u','r','e','1','D','L','o','d',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','c','o','o','r','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',')',
@@ -13169,6 +14613,7 @@ static const char *functions_for_130_frag [] = {
builtin_tan,
builtin_tanh,
builtin_texelFetch,
+ builtin_texelFetchOffset,
builtin_texture,
builtin_texture1D,
builtin_texture1DLod,
@@ -13185,10 +14630,15 @@ static const char *functions_for_130_frag [] = {
builtin_textureCube,
builtin_textureCubeLod,
builtin_textureGrad,
+ builtin_textureGradOffset,
builtin_textureLod,
+ builtin_textureLodOffset,
+ builtin_textureOffset,
builtin_textureProj,
builtin_textureProjGrad,
+ builtin_textureProjGradOffset,
builtin_textureProjLod,
+ builtin_textureProjLodOffset,
builtin_transpose,
builtin_trunc,
};
@@ -13253,12 +14703,18 @@ static const char prototypes_for_130_vert[] =
'(','f','u','n','c','t','i','o','n',' ','a','l','l',' ','(','s','i','g','n','a','t','u','r','e',' ','b','o','o','l',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','b','v','e','c','2',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','o','o','l',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','b','v','e','c','3',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','o','o','l',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','b','v','e','c','4',' ','x',')',')',' ','(',')',')',')',
'(','f','u','n','c','t','i','o','n',' ','n','o','t',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','b','v','e','c','2',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','b','v','e','c','3',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','b','v','e','c','4',' ','x',')',')',' ','(',')',')',')',
'(','f','u','n','c','t','i','o','n',' ','t','e','x','t','u','r','e',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','C','u','b','e',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','C','u','b','e',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','C','u','b','e',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','C','u','b','e','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','A','r','r','a','y','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','A','r','r','a','y','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','C','u','b','e',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','C','u','b','e',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','C','u','b','e',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','C','u','b','e','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','A','r','r','a','y','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',')',
-'(','f','u','n','c','t','i','o','n',' ','t','e','x','t','u','r','e','P','r','o','j',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',')',
+'(','f','u','n','c','t','i','o','n',' ','t','e','x','t','u','r','e','P','r','o','j',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','o','f','f','s','e','t',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','o','f','f','s','e','t',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','o','f','f','s','e','t',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',')',
'(','f','u','n','c','t','i','o','n',' ','t','e','x','t','u','r','e','L','o','d',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','C','u','b','e',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','C','u','b','e',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','C','u','b','e',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','A','r','r','a','y','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',')',
+'(','f','u','n','c','t','i','o','n',' ','t','e','x','t','u','r','e','O','f','f','s','e','t',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','A','r','r','a','y','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','o','f','f','s','e','t',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','o','f','f','s','e','t',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','o','f','f','s','e','t',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','A','r','r','a','y','S','h','a','d','o','w',' ','s','a','m','p',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',')',
'(','f','u','n','c','t','i','o','n',' ','t','e','x','e','l','F','e','t','c','h',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',')',' ','(',')',')',')',
+'(','f','u','n','c','t','i','o','n',' ','t','e','x','e','l','F','e','t','c','h','O','f','f','s','e','t',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',')',
+'(','f','u','n','c','t','i','o','n',' ','t','e','x','t','u','r','e','L','o','d','O','f','f','s','e','t',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','S','h','a','d','o','w',' ','s','a','m','p',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','S','h','a','d','o','w',' ','s','a','m','p',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','A','r','r','a','y',' ','s','a','m','p',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D','A','r','r','a','y',' ','s','a','m','p',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D','A','r','r','a','y',' ','s','a','m','p',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','A','r','r','a','y','S','h','a','d','o','w',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',')',
'(','f','u','n','c','t','i','o','n',' ','t','e','x','t','u','r','e','P','r','o','j','L','o','d',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',')',
+'(','f','u','n','c','t','i','o','n',' ','t','e','x','t','u','r','e','P','r','o','j','L','o','d','O','f','f','s','e','t',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','S','h','a','d','o','w',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','S','h','a','d','o','w',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',')',
'(','f','u','n','c','t','i','o','n',' ','t','e','x','t','u','r','e','G','r','a','d',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','C','u','b','e',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','C','u','b','e',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','C','u','b','e',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','C','u','b','e','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','A','r','r','a','y','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','A','r','r','a','y','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','y',')',')',' ','(',')',')',')',
+'(','f','u','n','c','t','i','o','n',' ','t','e','x','t','u','r','e','G','r','a','d','O','f','f','s','e','t',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','3','D',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','3','D',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','3','D',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','C','u','b','e',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','C','u','b','e',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','C','u','b','e',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','S','h','a','d','o','w',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','S','h','a','d','o','w',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','A','r','r','a','y',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D','A','r','r','a','y',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D','A','r','r','a','y',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','A','r','r','a','y',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D','A','r','r','a','y',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D','A','r','r','a','y',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','A','r','r','a','y','S','h','a','d','o','w',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','A','r','r','a','y','S','h','a','d','o','w',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o',')',')',' ','(',')',')',')',
'(','f','u','n','c','t','i','o','n',' ','t','e','x','t','u','r','e','P','r','o','j','G','r','a','d',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','y',')',')',' ','(',')',')',')',
+'(','f','u','n','c','t','i','o','n',' ','t','e','x','t','u','r','e','P','r','o','j','G','r','a','d','O','f','f','s','e','t',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','3','D',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','o','f','f',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','3','D',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','o','f','f',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','3','D',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','o','f','f',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','S','h','a','d','o','w',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','S','h','a','d','o','w',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','o',')',')',' ','(',')',')',')',
'(','f','u','n','c','t','i','o','n',' ','t','e','x','t','u','r','e','1','D',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','c','o','o','r','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','c','o','o','r','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',')',
'(','f','u','n','c','t','i','o','n',' ','t','e','x','t','u','r','e','1','D','P','r','o','j',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','c','o','o','r','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','c','o','o','r','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','c','o','o','r','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','c','o','o','r','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',')',
'(','f','u','n','c','t','i','o','n',' ','t','e','x','t','u','r','e','1','D','L','o','d',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','c','o','o','r','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',')',
@@ -13355,6 +14811,7 @@ static const char *functions_for_130_vert [] = {
builtin_tan,
builtin_tanh,
builtin_texelFetch,
+ builtin_texelFetchOffset,
builtin_texture,
builtin_texture1D,
builtin_texture1DLod,
@@ -13371,10 +14828,15 @@ static const char *functions_for_130_vert [] = {
builtin_textureCube,
builtin_textureCubeLod,
builtin_textureGrad,
+ builtin_textureGradOffset,
builtin_textureLod,
+ builtin_textureLodOffset,
+ builtin_textureOffset,
builtin_textureProj,
builtin_textureProjGrad,
+ builtin_textureProjGradOffset,
builtin_textureProjLod,
+ builtin_textureProjLodOffset,
builtin_transpose,
builtin_trunc,
};
@@ -13562,21 +15024,86 @@ static const char *functions_for_EXT_texture_array_vert [] = {
builtin_texture2DArray,
builtin_texture2DArrayLod,
};
-static gl_shader *builtin_profiles[12];
+static const char prototypes_for_OES_texture_3D_frag[] =
+ "(\n"
+ "(function texture3D\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in) sampler3D sampler)\n"
+ " (declare (in) vec3 coord))\n"
+ " ())\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in) sampler3D sampler)\n"
+ " (declare (in) vec3 coord)\n"
+ " (declare (in) float bias))\n"
+ " ()))\n"
+ "(function texture3DProj\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in) sampler3D sampler)\n"
+ " (declare (in) vec4 coord))\n"
+ " ())\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in) sampler3D sampler)\n"
+ " (declare (in) vec4 coord)\n"
+ " (declare (in) float bias))\n"
+ " ())))"
+;
+static const char *functions_for_OES_texture_3D_frag [] = {
+ builtin_texture3D,
+ builtin_texture3DProj,
+};
+static const char prototypes_for_OES_texture_3D_vert[] =
+ "(\n"
+ "(function texture3D\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in) sampler3D sampler)\n"
+ " (declare (in) vec3 coord))\n"
+ " ()))\n"
+ "(function texture3DProj\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in) sampler3D sampler)\n"
+ " (declare (in) vec4 coord))\n"
+ " ()))\n"
+ "(function texture3DLod\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in) sampler3D sampler)\n"
+ " (declare (in) vec3 coord)\n"
+ " (declare (in) float lod))\n"
+ " ()))\n"
+ "(function texture3DProjLod\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in) sampler3D sampler)\n"
+ " (declare (in) vec4 coord)\n"
+ " (declare (in) float lod))\n"
+ " ())))"
+;
+static const char *functions_for_OES_texture_3D_vert [] = {
+ builtin_texture3D,
+ builtin_texture3DLod,
+ builtin_texture3DProj,
+ builtin_texture3DProjLod,
+};
+static gl_shader *builtin_profiles[14];
void *builtin_mem_ctx = NULL;
void
_mesa_glsl_release_functions(void)
{
- talloc_free(builtin_mem_ctx);
+ ralloc_free(builtin_mem_ctx);
builtin_mem_ctx = NULL;
memset(builtin_profiles, 0, sizeof(builtin_profiles));
}
static void
_mesa_read_profile(struct _mesa_glsl_parse_state *state,
- exec_list *instructions,
int profile_index,
const char *prototypes,
const char **functions,
@@ -13586,7 +15113,7 @@ _mesa_read_profile(struct _mesa_glsl_parse_state *state,
if (sh == NULL) {
sh = read_builtins(GL_VERTEX_SHADER, prototypes, functions, count);
- talloc_steal(builtin_mem_ctx, sh);
+ ralloc_steal(builtin_mem_ctx, sh);
builtin_profiles[profile_index] = sh;
}
@@ -13595,98 +15122,111 @@ _mesa_read_profile(struct _mesa_glsl_parse_state *state,
}
void
-_mesa_glsl_initialize_functions(exec_list *instructions,
- struct _mesa_glsl_parse_state *state)
+_mesa_glsl_initialize_functions(struct _mesa_glsl_parse_state *state)
{
if (builtin_mem_ctx == NULL) {
- builtin_mem_ctx = talloc_init("GLSL built-in functions");
+ builtin_mem_ctx = ralloc_context(NULL); // "GLSL built-in functions"
memset(&builtin_profiles, 0, sizeof(builtin_profiles));
}
state->num_builtins_to_link = 0;
if (state->target == fragment_shader && state->language_version == 100) {
- _mesa_read_profile(state, instructions, 0,
+ _mesa_read_profile(state, 0,
prototypes_for_100_frag,
functions_for_100_frag,
Elements(functions_for_100_frag));
}
if (state->target == vertex_shader && state->language_version == 100) {
- _mesa_read_profile(state, instructions, 1,
+ _mesa_read_profile(state, 1,
prototypes_for_100_vert,
functions_for_100_vert,
Elements(functions_for_100_vert));
}
if (state->target == fragment_shader && state->language_version == 110) {
- _mesa_read_profile(state, instructions, 2,
+ _mesa_read_profile(state, 2,
prototypes_for_110_frag,
functions_for_110_frag,
Elements(functions_for_110_frag));
}
if (state->target == vertex_shader && state->language_version == 110) {
- _mesa_read_profile(state, instructions, 3,
+ _mesa_read_profile(state, 3,
prototypes_for_110_vert,
functions_for_110_vert,
Elements(functions_for_110_vert));
}
if (state->target == fragment_shader && state->language_version == 120) {
- _mesa_read_profile(state, instructions, 4,
+ _mesa_read_profile(state, 4,
prototypes_for_120_frag,
functions_for_120_frag,
Elements(functions_for_120_frag));
}
if (state->target == vertex_shader && state->language_version == 120) {
- _mesa_read_profile(state, instructions, 5,
+ _mesa_read_profile(state, 5,
prototypes_for_120_vert,
functions_for_120_vert,
Elements(functions_for_120_vert));
}
if (state->target == fragment_shader && state->language_version == 130) {
- _mesa_read_profile(state, instructions, 6,
+ _mesa_read_profile(state, 6,
prototypes_for_130_frag,
functions_for_130_frag,
Elements(functions_for_130_frag));
}
if (state->target == vertex_shader && state->language_version == 130) {
- _mesa_read_profile(state, instructions, 7,
+ _mesa_read_profile(state, 7,
prototypes_for_130_vert,
functions_for_130_vert,
Elements(functions_for_130_vert));
}
if (state->target == fragment_shader && state->ARB_texture_rectangle_enable) {
- _mesa_read_profile(state, instructions, 8,
+ _mesa_read_profile(state, 8,
prototypes_for_ARB_texture_rectangle_frag,
functions_for_ARB_texture_rectangle_frag,
Elements(functions_for_ARB_texture_rectangle_frag));
}
if (state->target == vertex_shader && state->ARB_texture_rectangle_enable) {
- _mesa_read_profile(state, instructions, 9,
+ _mesa_read_profile(state, 9,
prototypes_for_ARB_texture_rectangle_vert,
functions_for_ARB_texture_rectangle_vert,
Elements(functions_for_ARB_texture_rectangle_vert));
}
if (state->target == fragment_shader && state->EXT_texture_array_enable) {
- _mesa_read_profile(state, instructions, 10,
+ _mesa_read_profile(state, 10,
prototypes_for_EXT_texture_array_frag,
functions_for_EXT_texture_array_frag,
Elements(functions_for_EXT_texture_array_frag));
}
if (state->target == vertex_shader && state->EXT_texture_array_enable) {
- _mesa_read_profile(state, instructions, 11,
+ _mesa_read_profile(state, 11,
prototypes_for_EXT_texture_array_vert,
functions_for_EXT_texture_array_vert,
Elements(functions_for_EXT_texture_array_vert));
}
+ if (state->target == fragment_shader && state->OES_texture_3D_enable) {
+ _mesa_read_profile(state, 12,
+ prototypes_for_OES_texture_3D_frag,
+ functions_for_OES_texture_3D_frag,
+ Elements(functions_for_OES_texture_3D_frag));
+ }
+
+ if (state->target == vertex_shader && state->OES_texture_3D_enable) {
+ _mesa_read_profile(state, 13,
+ prototypes_for_OES_texture_3D_vert,
+ functions_for_OES_texture_3D_vert,
+ Elements(functions_for_OES_texture_3D_vert));
+ }
+
}
diff --git a/src/glsl/builtins/tools/builtin_function.cpp b/src/glsl/builtin_stubs.cpp
index c44804f2ef7..00b32949158 100644
--- a/src/glsl/builtins/tools/builtin_function.cpp
+++ b/src/glsl/builtin_stubs.cpp
@@ -33,7 +33,6 @@ _mesa_glsl_release_functions(void)
}
void
-_mesa_glsl_initialize_functions(exec_list *instructions,
- struct _mesa_glsl_parse_state *state)
+_mesa_glsl_initialize_functions(_mesa_glsl_parse_state *state)
{
}
diff --git a/src/glsl/builtin_types.h b/src/glsl/builtin_types.h
index 443ae1606ed..58b9a81273a 100644
--- a/src/glsl/builtin_types.h
+++ b/src/glsl/builtin_types.h
@@ -24,10 +24,15 @@
const glsl_type glsl_type::_error_type =
glsl_type(GL_INVALID_ENUM, GLSL_TYPE_ERROR, 0, 0, "");
-const glsl_type glsl_type::void_type =
+const glsl_type glsl_type::_void_type =
glsl_type(GL_INVALID_ENUM, GLSL_TYPE_VOID, 0, 0, "void");
+const glsl_type glsl_type::_sampler3D_type =
+ glsl_type(GL_SAMPLER_3D, GLSL_SAMPLER_DIM_3D, 0, 0, GLSL_TYPE_FLOAT,
+ "sampler3D");
+
const glsl_type *const glsl_type::error_type = & glsl_type::_error_type;
+const glsl_type *const glsl_type::void_type = & glsl_type::_void_type;
/** \name Core built-in types
*
@@ -180,8 +185,6 @@ const glsl_type glsl_type::builtin_110_types[] = {
"sampler1DShadow"),
glsl_type(GL_SAMPLER_2D_SHADOW, GLSL_SAMPLER_DIM_2D, 1, 0, GLSL_TYPE_FLOAT,
"sampler2DShadow"),
- glsl_type(GL_SAMPLER_3D, GLSL_SAMPLER_DIM_3D, 0, 0, GLSL_TYPE_FLOAT,
- "sampler3D"),
};
/*@}*/
diff --git a/src/glsl/builtin_variables.h b/src/glsl/builtin_variables.h
index a34c67e3481..9b4f5d9e3ec 100644
--- a/src/glsl/builtin_variables.h
+++ b/src/glsl/builtin_variables.h
@@ -101,5 +101,10 @@ static const builtin_variable builtin_110_deprecated_uniforms[] = {
{ ir_var_uniform, -1, "mat4", "gl_ModelViewProjectionMatrixInverseTranspose" },
{ ir_var_uniform, -1, "float", "gl_NormalScale" },
{ ir_var_uniform, -1, "gl_LightModelParameters", "gl_LightModel"},
+
+ /* Mesa-internal ATI_envmap_bumpmap state. */
+ { ir_var_uniform, -1, "vec2", "gl_MESABumpRotMatrix0"},
+ { ir_var_uniform, -1, "vec2", "gl_MESABumpRotMatrix1"},
+ { ir_var_uniform, -1, "vec4", "gl_MESAFogParamsOptimized"},
};
diff --git a/src/glsl/builtins/ir/atan b/src/glsl/builtins/ir/atan
index 3f97e0d46f1..cfecc1f1749 100644
--- a/src/glsl/builtins/ir/atan
+++ b/src/glsl/builtins/ir/atan
@@ -55,19 +55,19 @@
(
(declare () float r)
(if (expression bool > (expression float abs (var_ref x)) (constant float (0.000100))) (
- (assign (constant bool (1)) (x) (var_ref r) (call atan ((expression float / (var_ref y) (var_ref x)))))
+ (assign (x) (var_ref r) (call atan ((expression float / (var_ref y) (var_ref x)))))
(if (expression bool < (var_ref x) (constant float (0.000000)) ) (
(if (expression bool >= (var_ref y) (constant float (0.000000)) )
- ((assign (constant bool (1)) (x) (var_ref r) (expression float + (var_ref r) (constant float (3.141593)))))
- ((assign (constant bool (1)) (x) (var_ref r) (expression float - (var_ref r) (constant float (3.141593))))))
+ ((assign (x) (var_ref r) (expression float + (var_ref r) (constant float (3.141593)))))
+ ((assign (x) (var_ref r) (expression float - (var_ref r) (constant float (3.141593))))))
)
(
))
)
(
(declare () float sgn)
- (assign (constant bool (1)) (x) (var_ref sgn) (expression float sign (var_ref y)))
- (assign (constant bool (1)) (x) (var_ref r) (expression float * (var_ref sgn) (constant float (1.5707965))))
+ (assign (x) (var_ref sgn) (expression float sign (var_ref y)))
+ (assign (x) (var_ref r) (expression float * (var_ref sgn) (constant float (1.5707965))))
))
(return (var_ref r) )
@@ -80,10 +80,10 @@
(declare (in) vec2 y)
(declare (in) vec2 x))
((declare () vec2 r)
- (assign (constant bool (1)) (x) (var_ref r)
+ (assign (x) (var_ref r)
(call atan ((swiz x (var_ref y))
(swiz x (var_ref x)))))
- (assign (constant bool (1)) (y) (var_ref r)
+ (assign (y) (var_ref r)
(call atan ((swiz y (var_ref y))
(swiz y (var_ref x)))))
(return (var_ref r))))
@@ -93,13 +93,13 @@
(declare (in) vec3 y)
(declare (in) vec3 x))
((declare () vec3 r)
- (assign (constant bool (1)) (x) (var_ref r)
+ (assign (x) (var_ref r)
(call atan ((swiz x (var_ref y))
(swiz x (var_ref x)))))
- (assign (constant bool (1)) (y) (var_ref r)
+ (assign (y) (var_ref r)
(call atan ((swiz y (var_ref y))
(swiz y (var_ref x)))))
- (assign (constant bool (1)) (z) (var_ref r)
+ (assign (z) (var_ref r)
(call atan ((swiz z (var_ref y))
(swiz z (var_ref x)))))
(return (var_ref r))))
@@ -109,16 +109,16 @@
(declare (in) vec4 y)
(declare (in) vec4 x))
((declare () vec4 r)
- (assign (constant bool (1)) (x) (var_ref r)
+ (assign (x) (var_ref r)
(call atan ((swiz x (var_ref y))
(swiz x (var_ref x)))))
- (assign (constant bool (1)) (y) (var_ref r)
+ (assign (y) (var_ref r)
(call atan ((swiz y (var_ref y))
(swiz y (var_ref x)))))
- (assign (constant bool (1)) (z) (var_ref r)
+ (assign (z) (var_ref r)
(call atan ((swiz z (var_ref y))
(swiz z (var_ref x)))))
- (assign (constant bool (1)) (w) (var_ref r)
+ (assign (w) (var_ref r)
(call atan ((swiz w (var_ref y))
(swiz w (var_ref x)))))
(return (var_ref r)))))
diff --git a/src/glsl/builtins/ir/distance b/src/glsl/builtins/ir/distance
index 7789ca6314d..c249f8c9962 100644
--- a/src/glsl/builtins/ir/distance
+++ b/src/glsl/builtins/ir/distance
@@ -10,7 +10,7 @@
(declare (in) vec2 p0)
(declare (in) vec2 p1))
((declare () vec2 p)
- (assign (constant bool (1)) (xy) (var_ref p) (expression vec2 - (var_ref p0) (var_ref p1)))
+ (assign (xy) (var_ref p) (expression vec2 - (var_ref p0) (var_ref p1)))
(return (expression float sqrt (expression float dot (var_ref p) (var_ref p))))))
(signature float
@@ -18,7 +18,7 @@
(declare (in) vec3 p0)
(declare (in) vec3 p1))
((declare () vec3 p)
- (assign (constant bool (1)) (xyz) (var_ref p) (expression vec3 - (var_ref p0) (var_ref p1)))
+ (assign (xyz) (var_ref p) (expression vec3 - (var_ref p0) (var_ref p1)))
(return (expression float sqrt (expression float dot (var_ref p) (var_ref p))))))
(signature float
@@ -26,6 +26,6 @@
(declare (in) vec4 p0)
(declare (in) vec4 p1))
((declare () vec4 p)
- (assign (constant bool (1)) (xyzw) (var_ref p) (expression vec4 - (var_ref p0) (var_ref p1)))
+ (assign (xyzw) (var_ref p) (expression vec4 - (var_ref p0) (var_ref p1)))
(return (expression float sqrt (expression float dot (var_ref p) (var_ref p))))))
))
diff --git a/src/glsl/builtins/ir/matrixCompMult b/src/glsl/builtins/ir/matrixCompMult
index 4be9b03e31e..2400f11afad 100644
--- a/src/glsl/builtins/ir/matrixCompMult
+++ b/src/glsl/builtins/ir/matrixCompMult
@@ -4,8 +4,8 @@
(declare (in) mat2 x)
(declare (in) mat2 y))
((declare () mat2 z)
- (assign (constant bool (1)) (xy) (array_ref (var_ref z) (constant int (0))) (expression vec2 * (array_ref (var_ref x) (constant int (0))) (array_ref (var_ref y) (constant int (0)))))
- (assign (constant bool (1)) (xy) (array_ref (var_ref z) (constant int (1))) (expression vec2 * (array_ref (var_ref x) (constant int (1))) (array_ref (var_ref y) (constant int (1)))))
+ (assign (xy) (array_ref (var_ref z) (constant int (0))) (expression vec2 * (array_ref (var_ref x) (constant int (0))) (array_ref (var_ref y) (constant int (0)))))
+ (assign (xy) (array_ref (var_ref z) (constant int (1))) (expression vec2 * (array_ref (var_ref x) (constant int (1))) (array_ref (var_ref y) (constant int (1)))))
(return (var_ref z))))
(signature mat3
@@ -13,9 +13,9 @@
(declare (in) mat3 x)
(declare (in) mat3 y))
((declare () mat3 z)
- (assign (constant bool (1)) (xyz) (array_ref (var_ref z) (constant int (0))) (expression vec3 * (array_ref (var_ref x) (constant int (0))) (array_ref (var_ref y) (constant int (0)))))
- (assign (constant bool (1)) (xyz) (array_ref (var_ref z) (constant int (1))) (expression vec3 * (array_ref (var_ref x) (constant int (1))) (array_ref (var_ref y) (constant int (1)))))
- (assign (constant bool (1)) (xyz) (array_ref (var_ref z) (constant int (2))) (expression vec3 * (array_ref (var_ref x) (constant int (2))) (array_ref (var_ref y) (constant int (2)))))
+ (assign (xyz) (array_ref (var_ref z) (constant int (0))) (expression vec3 * (array_ref (var_ref x) (constant int (0))) (array_ref (var_ref y) (constant int (0)))))
+ (assign (xyz) (array_ref (var_ref z) (constant int (1))) (expression vec3 * (array_ref (var_ref x) (constant int (1))) (array_ref (var_ref y) (constant int (1)))))
+ (assign (xyz) (array_ref (var_ref z) (constant int (2))) (expression vec3 * (array_ref (var_ref x) (constant int (2))) (array_ref (var_ref y) (constant int (2)))))
(return (var_ref z))))
(signature mat4
@@ -23,10 +23,10 @@
(declare (in) mat4 x)
(declare (in) mat4 y))
((declare () mat4 z)
- (assign (constant bool (1)) (xyzw) (array_ref (var_ref z) (constant int (0))) (expression vec4 * (array_ref (var_ref x) (constant int (0))) (array_ref (var_ref y) (constant int (0)))))
- (assign (constant bool (1)) (xyzw) (array_ref (var_ref z) (constant int (1))) (expression vec4 * (array_ref (var_ref x) (constant int (1))) (array_ref (var_ref y) (constant int (1)))))
- (assign (constant bool (1)) (xyzw) (array_ref (var_ref z) (constant int (2))) (expression vec4 * (array_ref (var_ref x) (constant int (2))) (array_ref (var_ref y) (constant int (2)))))
- (assign (constant bool (1)) (xyzw) (array_ref (var_ref z) (constant int (3))) (expression vec4 * (array_ref (var_ref x) (constant int (3))) (array_ref (var_ref y) (constant int (3)))))
+ (assign (xyzw) (array_ref (var_ref z) (constant int (0))) (expression vec4 * (array_ref (var_ref x) (constant int (0))) (array_ref (var_ref y) (constant int (0)))))
+ (assign (xyzw) (array_ref (var_ref z) (constant int (1))) (expression vec4 * (array_ref (var_ref x) (constant int (1))) (array_ref (var_ref y) (constant int (1)))))
+ (assign (xyzw) (array_ref (var_ref z) (constant int (2))) (expression vec4 * (array_ref (var_ref x) (constant int (2))) (array_ref (var_ref y) (constant int (2)))))
+ (assign (xyzw) (array_ref (var_ref z) (constant int (3))) (expression vec4 * (array_ref (var_ref x) (constant int (3))) (array_ref (var_ref y) (constant int (3)))))
(return (var_ref z))))
(signature mat2x3
@@ -34,8 +34,8 @@
(declare (in) mat2x3 x)
(declare (in) mat2x3 y))
((declare () mat2x3 z)
- (assign (constant bool (1)) (xyz) (array_ref (var_ref z) (constant int (0))) (expression vec3 * (array_ref (var_ref x) (constant int (0))) (array_ref (var_ref y) (constant int (0)))))
- (assign (constant bool (1)) (xyz) (array_ref (var_ref z) (constant int (1))) (expression vec3 * (array_ref (var_ref x) (constant int (1))) (array_ref (var_ref y) (constant int (1)))))
+ (assign (xyz) (array_ref (var_ref z) (constant int (0))) (expression vec3 * (array_ref (var_ref x) (constant int (0))) (array_ref (var_ref y) (constant int (0)))))
+ (assign (xyz) (array_ref (var_ref z) (constant int (1))) (expression vec3 * (array_ref (var_ref x) (constant int (1))) (array_ref (var_ref y) (constant int (1)))))
(return (var_ref z))))
(signature mat3x2
@@ -43,9 +43,9 @@
(declare (in) mat3x2 x)
(declare (in) mat3x2 y))
((declare () mat3x2 z)
- (assign (constant bool (1)) (xy) (array_ref (var_ref z) (constant int (0))) (expression vec2 * (array_ref (var_ref x) (constant int (0))) (array_ref (var_ref y) (constant int (0)))))
- (assign (constant bool (1)) (xy) (array_ref (var_ref z) (constant int (1))) (expression vec2 * (array_ref (var_ref x) (constant int (1))) (array_ref (var_ref y) (constant int (1)))))
- (assign (constant bool (1)) (xy) (array_ref (var_ref z) (constant int (2))) (expression vec2 * (array_ref (var_ref x) (constant int (2))) (array_ref (var_ref y) (constant int (2)))))
+ (assign (xy) (array_ref (var_ref z) (constant int (0))) (expression vec2 * (array_ref (var_ref x) (constant int (0))) (array_ref (var_ref y) (constant int (0)))))
+ (assign (xy) (array_ref (var_ref z) (constant int (1))) (expression vec2 * (array_ref (var_ref x) (constant int (1))) (array_ref (var_ref y) (constant int (1)))))
+ (assign (xy) (array_ref (var_ref z) (constant int (2))) (expression vec2 * (array_ref (var_ref x) (constant int (2))) (array_ref (var_ref y) (constant int (2)))))
(return (var_ref z))))
(signature mat2x4
@@ -53,8 +53,8 @@
(declare (in) mat2x4 x)
(declare (in) mat2x4 y))
((declare () mat2x4 z)
- (assign (constant bool (1)) (xyzw) (array_ref (var_ref z) (constant int (0))) (expression vec4 * (array_ref (var_ref x) (constant int (0))) (array_ref (var_ref y) (constant int (0)))))
- (assign (constant bool (1)) (xyzw) (array_ref (var_ref z) (constant int (1))) (expression vec4 * (array_ref (var_ref x) (constant int (1))) (array_ref (var_ref y) (constant int (1)))))
+ (assign (xyzw) (array_ref (var_ref z) (constant int (0))) (expression vec4 * (array_ref (var_ref x) (constant int (0))) (array_ref (var_ref y) (constant int (0)))))
+ (assign (xyzw) (array_ref (var_ref z) (constant int (1))) (expression vec4 * (array_ref (var_ref x) (constant int (1))) (array_ref (var_ref y) (constant int (1)))))
(return (var_ref z))))
(signature mat4x2
@@ -62,10 +62,10 @@
(declare (in) mat4x2 x)
(declare (in) mat4x2 y))
((declare () mat4x2 z)
- (assign (constant bool (1)) (xy) (array_ref (var_ref z) (constant int (0))) (expression vec2 * (array_ref (var_ref x) (constant int (0))) (array_ref (var_ref y) (constant int (0)))))
- (assign (constant bool (1)) (xy) (array_ref (var_ref z) (constant int (1))) (expression vec2 * (array_ref (var_ref x) (constant int (1))) (array_ref (var_ref y) (constant int (1)))))
- (assign (constant bool (1)) (xy) (array_ref (var_ref z) (constant int (2))) (expression vec2 * (array_ref (var_ref x) (constant int (2))) (array_ref (var_ref y) (constant int (2)))))
- (assign (constant bool (1)) (xy) (array_ref (var_ref z) (constant int (3))) (expression vec2 * (array_ref (var_ref x) (constant int (3))) (array_ref (var_ref y) (constant int (3)))))
+ (assign (xy) (array_ref (var_ref z) (constant int (0))) (expression vec2 * (array_ref (var_ref x) (constant int (0))) (array_ref (var_ref y) (constant int (0)))))
+ (assign (xy) (array_ref (var_ref z) (constant int (1))) (expression vec2 * (array_ref (var_ref x) (constant int (1))) (array_ref (var_ref y) (constant int (1)))))
+ (assign (xy) (array_ref (var_ref z) (constant int (2))) (expression vec2 * (array_ref (var_ref x) (constant int (2))) (array_ref (var_ref y) (constant int (2)))))
+ (assign (xy) (array_ref (var_ref z) (constant int (3))) (expression vec2 * (array_ref (var_ref x) (constant int (3))) (array_ref (var_ref y) (constant int (3)))))
(return (var_ref z))))
(signature mat3x4
@@ -73,9 +73,9 @@
(declare (in) mat3x4 x)
(declare (in) mat3x4 y))
((declare () mat3x4 z)
- (assign (constant bool (1)) (xyzw) (array_ref (var_ref z) (constant int (0))) (expression vec4 * (array_ref (var_ref x) (constant int (0))) (array_ref (var_ref y) (constant int (0)))))
- (assign (constant bool (1)) (xyzw) (array_ref (var_ref z) (constant int (1))) (expression vec4 * (array_ref (var_ref x) (constant int (1))) (array_ref (var_ref y) (constant int (1)))))
- (assign (constant bool (1)) (xyzw) (array_ref (var_ref z) (constant int (2))) (expression vec4 * (array_ref (var_ref x) (constant int (2))) (array_ref (var_ref y) (constant int (2)))))
+ (assign (xyzw) (array_ref (var_ref z) (constant int (0))) (expression vec4 * (array_ref (var_ref x) (constant int (0))) (array_ref (var_ref y) (constant int (0)))))
+ (assign (xyzw) (array_ref (var_ref z) (constant int (1))) (expression vec4 * (array_ref (var_ref x) (constant int (1))) (array_ref (var_ref y) (constant int (1)))))
+ (assign (xyzw) (array_ref (var_ref z) (constant int (2))) (expression vec4 * (array_ref (var_ref x) (constant int (2))) (array_ref (var_ref y) (constant int (2)))))
(return (var_ref z))))
(signature mat4x3
@@ -83,9 +83,9 @@
(declare (in) mat4x3 x)
(declare (in) mat4x3 y))
((declare () mat4x3 z)
- (assign (constant bool (1)) (xyz) (array_ref (var_ref z) (constant int (0))) (expression vec3 * (array_ref (var_ref x) (constant int (0))) (array_ref (var_ref y) (constant int (0)))))
- (assign (constant bool (1)) (xyz) (array_ref (var_ref z) (constant int (1))) (expression vec3 * (array_ref (var_ref x) (constant int (1))) (array_ref (var_ref y) (constant int (1)))))
- (assign (constant bool (1)) (xyz) (array_ref (var_ref z) (constant int (2))) (expression vec3 * (array_ref (var_ref x) (constant int (2))) (array_ref (var_ref y) (constant int (2)))))
- (assign (constant bool (1)) (xyz) (array_ref (var_ref z) (constant int (3))) (expression vec3 * (array_ref (var_ref x) (constant int (3))) (array_ref (var_ref y) (constant int (3)))))
+ (assign (xyz) (array_ref (var_ref z) (constant int (0))) (expression vec3 * (array_ref (var_ref x) (constant int (0))) (array_ref (var_ref y) (constant int (0)))))
+ (assign (xyz) (array_ref (var_ref z) (constant int (1))) (expression vec3 * (array_ref (var_ref x) (constant int (1))) (array_ref (var_ref y) (constant int (1)))))
+ (assign (xyz) (array_ref (var_ref z) (constant int (2))) (expression vec3 * (array_ref (var_ref x) (constant int (2))) (array_ref (var_ref y) (constant int (2)))))
+ (assign (xyz) (array_ref (var_ref z) (constant int (3))) (expression vec3 * (array_ref (var_ref x) (constant int (3))) (array_ref (var_ref y) (constant int (3)))))
(return (var_ref z))))
))
diff --git a/src/glsl/builtins/ir/modf b/src/glsl/builtins/ir/modf
index 2b935a91a7c..f4f631567bd 100644
--- a/src/glsl/builtins/ir/modf
+++ b/src/glsl/builtins/ir/modf
@@ -4,9 +4,8 @@
(declare (in) float x)
(declare (out) float i))
((declare () float t)
- (assign (constant bool (1)) (x) (var_ref t)
- (expression float trunc (var_ref x)))
- (assign (constant bool (1)) (x) (var_ref i) (var_ref t))
+ (assign (x) (var_ref t) (expression float trunc (var_ref x)))
+ (assign (x) (var_ref i) (var_ref t))
(return (expression float - (var_ref x) (var_ref t)))))
(signature vec2
@@ -14,9 +13,8 @@
(declare (in) vec2 x)
(declare (out) vec2 i))
((declare () vec2 t)
- (assign (constant bool (1)) (xy) (var_ref t)
- (expression vec2 trunc (var_ref x)))
- (assign (constant bool (1)) (xy) (var_ref i) (var_ref t))
+ (assign (xy) (var_ref t) (expression vec2 trunc (var_ref x)))
+ (assign (xy) (var_ref i) (var_ref t))
(return (expression vec2 - (var_ref x) (var_ref t)))))
(signature vec3
@@ -24,9 +22,8 @@
(declare (in) vec3 x)
(declare (out) vec3 i))
((declare () vec3 t)
- (assign (constant bool (1)) (xyz) (var_ref t)
- (expression vec3 trunc (var_ref x)))
- (assign (constant bool (1)) (xyz) (var_ref i) (var_ref t))
+ (assign (xyz) (var_ref t) (expression vec3 trunc (var_ref x)))
+ (assign (xyz) (var_ref i) (var_ref t))
(return (expression vec3 - (var_ref x) (var_ref t)))))
(signature vec4
@@ -34,8 +31,7 @@
(declare (in) vec4 x)
(declare (out) vec4 i))
((declare () vec4 t)
- (assign (constant bool (1)) (xyzw) (var_ref t)
- (expression vec4 trunc (var_ref x)))
- (assign (constant bool (1)) (xyzw) (var_ref i) (var_ref t))
+ (assign (xyzw) (var_ref t) (expression vec4 trunc (var_ref x)))
+ (assign (xyzw) (var_ref i) (var_ref t))
(return (expression vec4 - (var_ref x) (var_ref t)))))
))
diff --git a/src/glsl/builtins/ir/noise2 b/src/glsl/builtins/ir/noise2
index 383fccfadfb..d3366145fed 100644
--- a/src/glsl/builtins/ir/noise2
+++ b/src/glsl/builtins/ir/noise2
@@ -6,10 +6,10 @@
(declare () float b)
(declare () vec2 t)
- (assign (constant bool (1)) (x) (var_ref a) (expression float noise (var_ref p)))
- (assign (constant bool (1)) (x) (var_ref b) (expression float noise (expression vec4 + (var_ref p) (constant vec4 (601.0 313.0 29.0 277.0)))))
- (assign (constant bool (1)) (x) (var_ref t) (var_ref a))
- (assign (constant bool (1)) (y) (var_ref t) (var_ref b))
+ (assign (x) (var_ref a) (expression float noise (var_ref p)))
+ (assign (x) (var_ref b) (expression float noise (expression vec4 + (var_ref p) (constant vec4 (601.0 313.0 29.0 277.0)))))
+ (assign (x) (var_ref t) (var_ref a))
+ (assign (y) (var_ref t) (var_ref b))
(return (var_ref t))
))
@@ -20,10 +20,10 @@
(declare () float b)
(declare () vec2 t)
- (assign (constant bool (1)) (x) (var_ref a) (expression float noise (var_ref p)))
- (assign (constant bool (1)) (x) (var_ref b) (expression float noise (expression vec3 + (var_ref p) (constant vec3 (601.0 313.0 29.0)))))
- (assign (constant bool (1)) (x) (var_ref t) (var_ref a))
- (assign (constant bool (1)) (y) (var_ref t) (var_ref b))
+ (assign (x) (var_ref a) (expression float noise (var_ref p)))
+ (assign (x) (var_ref b) (expression float noise (expression vec3 + (var_ref p) (constant vec3 (601.0 313.0 29.0)))))
+ (assign (x) (var_ref t) (var_ref a))
+ (assign (y) (var_ref t) (var_ref b))
(return (var_ref t))
))
@@ -36,10 +36,10 @@
(declare () float b)
(declare () vec2 t)
- (assign (constant bool (1)) (x) (var_ref a) (expression float noise (var_ref p)))
- (assign (constant bool (1)) (x) (var_ref b) (expression float noise (expression vec2 + (var_ref p) (constant vec2 (601.0 313.0)))))
- (assign (constant bool (1)) (x) (var_ref t) (var_ref a))
- (assign (constant bool (1)) (y) (var_ref t) (var_ref b))
+ (assign (x) (var_ref a) (expression float noise (var_ref p)))
+ (assign (x) (var_ref b) (expression float noise (expression vec2 + (var_ref p) (constant vec2 (601.0 313.0)))))
+ (assign (x) (var_ref t) (var_ref a))
+ (assign (y) (var_ref t) (var_ref b))
(return (var_ref t))
))
@@ -52,10 +52,10 @@
(declare () float b)
(declare () vec2 t)
- (assign (constant bool (1)) (x) (var_ref a) (expression float noise (var_ref p)))
- (assign (constant bool (1)) (x) (var_ref b) (expression float noise (expression float + (var_ref p) (constant float (601.0)))))
- (assign (constant bool (1)) (x) (var_ref t) (var_ref a))
- (assign (constant bool (1)) (y) (var_ref t) (var_ref b))
+ (assign (x) (var_ref a) (expression float noise (var_ref p)))
+ (assign (x) (var_ref b) (expression float noise (expression float + (var_ref p) (constant float (601.0)))))
+ (assign (x) (var_ref t) (var_ref a))
+ (assign (y) (var_ref t) (var_ref b))
(return (var_ref t))
))
))
diff --git a/src/glsl/builtins/ir/noise3 b/src/glsl/builtins/ir/noise3
index ed7ad5190f2..1d8aa3f30d0 100644
--- a/src/glsl/builtins/ir/noise3
+++ b/src/glsl/builtins/ir/noise3
@@ -7,13 +7,13 @@
(declare () float c)
(declare () vec3 t)
- (assign (constant bool (1)) (x) (var_ref a) (expression float noise (var_ref p)))
- (assign (constant bool (1)) (x) (var_ref b) (expression float noise (expression vec4 + (var_ref p) (constant vec4 (601.0 313.0 29.0 277.0)))))
- (assign (constant bool (1)) (x) (var_ref c) (expression float noise (expression vec4 + (var_ref p) (constant vec4 (1559.0 113.0 1861.0 797.0)))))
+ (assign (x) (var_ref a) (expression float noise (var_ref p)))
+ (assign (x) (var_ref b) (expression float noise (expression vec4 + (var_ref p) (constant vec4 (601.0 313.0 29.0 277.0)))))
+ (assign (x) (var_ref c) (expression float noise (expression vec4 + (var_ref p) (constant vec4 (1559.0 113.0 1861.0 797.0)))))
- (assign (constant bool (1)) (x) (var_ref t) (var_ref a))
- (assign (constant bool (1)) (y) (var_ref t) (var_ref b))
- (assign (constant bool (1)) (z) (var_ref t) (var_ref c))
+ (assign (x) (var_ref t) (var_ref a))
+ (assign (y) (var_ref t) (var_ref b))
+ (assign (z) (var_ref t) (var_ref c))
(return (var_ref t))
))
@@ -25,13 +25,13 @@
(declare () float c)
(declare () vec3 t)
- (assign (constant bool (1)) (x) (var_ref a) (expression float noise (var_ref p)))
- (assign (constant bool (1)) (x) (var_ref b) (expression float noise (expression vec3 + (var_ref p) (constant vec3 (601.0 313.0 29.0)))))
- (assign (constant bool (1)) (x) (var_ref c) (expression float noise (expression vec3 + (var_ref p) (constant vec3 (1559.0 113.0 1861.0)))))
+ (assign (x) (var_ref a) (expression float noise (var_ref p)))
+ (assign (x) (var_ref b) (expression float noise (expression vec3 + (var_ref p) (constant vec3 (601.0 313.0 29.0)))))
+ (assign (x) (var_ref c) (expression float noise (expression vec3 + (var_ref p) (constant vec3 (1559.0 113.0 1861.0)))))
- (assign (constant bool (1)) (x) (var_ref t) (var_ref a))
- (assign (constant bool (1)) (y) (var_ref t) (var_ref b))
- (assign (constant bool (1)) (z) (var_ref t) (var_ref c))
+ (assign (x) (var_ref t) (var_ref a))
+ (assign (y) (var_ref t) (var_ref b))
+ (assign (z) (var_ref t) (var_ref c))
(return (var_ref t))
))
@@ -43,13 +43,13 @@
(declare () float c)
(declare () vec3 t)
- (assign (constant bool (1)) (x) (var_ref a) (expression float noise (var_ref p)))
- (assign (constant bool (1)) (x) (var_ref b) (expression float noise (expression vec2 + (var_ref p) (constant vec2 (601.0 313.0)))))
- (assign (constant bool (1)) (x) (var_ref c) (expression float noise (expression vec2 + (var_ref p) (constant vec2 (1559.0 113.0)))))
+ (assign (x) (var_ref a) (expression float noise (var_ref p)))
+ (assign (x) (var_ref b) (expression float noise (expression vec2 + (var_ref p) (constant vec2 (601.0 313.0)))))
+ (assign (x) (var_ref c) (expression float noise (expression vec2 + (var_ref p) (constant vec2 (1559.0 113.0)))))
- (assign (constant bool (1)) (x) (var_ref t) (var_ref a))
- (assign (constant bool (1)) (y) (var_ref t) (var_ref b))
- (assign (constant bool (1)) (z) (var_ref t) (var_ref c))
+ (assign (x) (var_ref t) (var_ref a))
+ (assign (y) (var_ref t) (var_ref b))
+ (assign (z) (var_ref t) (var_ref c))
(return (var_ref t))
))
@@ -61,13 +61,13 @@
(declare () float c)
(declare () vec3 t)
- (assign (constant bool (1)) (x) (var_ref a) (expression float noise (var_ref p)))
- (assign (constant bool (1)) (x) (var_ref b) (expression float noise (expression float + (var_ref p) (constant float (601.0)))))
- (assign (constant bool (1)) (x) (var_ref c) (expression float noise (expression float + (var_ref p) (constant float (1559.0)))))
+ (assign (x) (var_ref a) (expression float noise (var_ref p)))
+ (assign (x) (var_ref b) (expression float noise (expression float + (var_ref p) (constant float (601.0)))))
+ (assign (x) (var_ref c) (expression float noise (expression float + (var_ref p) (constant float (1559.0)))))
- (assign (constant bool (1)) (x) (var_ref t) (var_ref a))
- (assign (constant bool (1)) (y) (var_ref t) (var_ref b))
- (assign (constant bool (1)) (z) (var_ref t) (var_ref c))
+ (assign (x) (var_ref t) (var_ref a))
+ (assign (y) (var_ref t) (var_ref b))
+ (assign (z) (var_ref t) (var_ref c))
(return (var_ref t))
))
))
diff --git a/src/glsl/builtins/ir/noise4 b/src/glsl/builtins/ir/noise4
index 77a2529a180..d0894fd5e3e 100644
--- a/src/glsl/builtins/ir/noise4
+++ b/src/glsl/builtins/ir/noise4
@@ -9,17 +9,17 @@
(declare () vec4 _r)
(declare () vec4 _p)
- (assign (constant bool (1)) (xyzw) (var_ref _p) (expression vec4 + (var_ref p) (constant vec4 (1559.0 113.0 1861.0 797.0))) )
+ (assign (xyzw) (var_ref _p) (expression vec4 + (var_ref p) (constant vec4 (1559.0 113.0 1861.0 797.0))) )
- (assign (constant bool (1)) (x) (var_ref _x) (expression float noise(var_ref p)))
- (assign (constant bool (1)) (x) (var_ref _y) (expression float noise(expression vec4 + (var_ref p) (constant vec4 (601.0 313.0 29.0 277.0)))))
- (assign (constant bool (1)) (x) (var_ref _z) (expression float noise(var_ref _p)))
- (assign (constant bool (1)) (x) (var_ref _w) (expression float noise(expression vec4 + (var_ref _p) (constant vec4 (601.0 313.0 29.0 277.0)))))
+ (assign (x) (var_ref _x) (expression float noise(var_ref p)))
+ (assign (x) (var_ref _y) (expression float noise(expression vec4 + (var_ref p) (constant vec4 (601.0 313.0 29.0 277.0)))))
+ (assign (x) (var_ref _z) (expression float noise(var_ref _p)))
+ (assign (x) (var_ref _w) (expression float noise(expression vec4 + (var_ref _p) (constant vec4 (601.0 313.0 29.0 277.0)))))
- (assign (constant bool (1)) (x) (var_ref _r) (var_ref _x))
- (assign (constant bool (1)) (y) (var_ref _r) (var_ref _y))
- (assign (constant bool (1)) (z) (var_ref _r) (var_ref _z))
- (assign (constant bool (1)) (w) (var_ref _r) (var_ref _w))
+ (assign (x) (var_ref _r) (var_ref _x))
+ (assign (y) (var_ref _r) (var_ref _y))
+ (assign (z) (var_ref _r) (var_ref _z))
+ (assign (w) (var_ref _r) (var_ref _w))
(return (var_ref _r))
))
@@ -33,17 +33,17 @@
(declare () vec4 _r)
(declare () vec3 _p)
- (assign (constant bool (1)) (xyz) (var_ref _p) (expression vec3 + (var_ref p) (constant vec3 (1559.0 113.0 1861.0))) )
+ (assign (xyz) (var_ref _p) (expression vec3 + (var_ref p) (constant vec3 (1559.0 113.0 1861.0))) )
- (assign (constant bool (1)) (x) (var_ref _x) (expression float noise(var_ref p)))
- (assign (constant bool (1)) (x) (var_ref _y) (expression float noise(expression vec3 + (var_ref p) (constant vec3 (601.0 313.0 29.0)))))
- (assign (constant bool (1)) (x) (var_ref _z) (expression float noise(var_ref _p)))
- (assign (constant bool (1)) (x) (var_ref _w) (expression float noise(expression vec3 + (var_ref _p) (constant vec3 (601.0 313.0 29.0)))))
+ (assign (x) (var_ref _x) (expression float noise(var_ref p)))
+ (assign (x) (var_ref _y) (expression float noise(expression vec3 + (var_ref p) (constant vec3 (601.0 313.0 29.0)))))
+ (assign (x) (var_ref _z) (expression float noise(var_ref _p)))
+ (assign (x) (var_ref _w) (expression float noise(expression vec3 + (var_ref _p) (constant vec3 (601.0 313.0 29.0)))))
- (assign (constant bool (1)) (x) (var_ref _r) (var_ref _x))
- (assign (constant bool (1)) (y) (var_ref _r) (var_ref _y))
- (assign (constant bool (1)) (z) (var_ref _r) (var_ref _z))
- (assign (constant bool (1)) (w) (var_ref _r) (var_ref _w))
+ (assign (x) (var_ref _r) (var_ref _x))
+ (assign (y) (var_ref _r) (var_ref _y))
+ (assign (z) (var_ref _r) (var_ref _z))
+ (assign (w) (var_ref _r) (var_ref _w))
(return (var_ref _r))
))
@@ -57,17 +57,17 @@
(declare () vec4 _r)
(declare () vec2 _p)
- (assign (constant bool (1)) (xy) (var_ref _p) (expression vec2 + (var_ref p) (constant vec2 (1559.0 113.0))) )
+ (assign (xy) (var_ref _p) (expression vec2 + (var_ref p) (constant vec2 (1559.0 113.0))) )
- (assign (constant bool (1)) (x) (var_ref _x) (expression float noise(var_ref p)))
- (assign (constant bool (1)) (x) (var_ref _y) (expression float noise(expression vec2 + (var_ref p) (constant vec2 (601.0 313.0)))))
- (assign (constant bool (1)) (x) (var_ref _z) (expression float noise(var_ref _p)))
- (assign (constant bool (1)) (x) (var_ref _w) (expression float noise(expression vec2 + (var_ref _p) (constant vec2 (601.0 313.0)))))
+ (assign (x) (var_ref _x) (expression float noise(var_ref p)))
+ (assign (x) (var_ref _y) (expression float noise(expression vec2 + (var_ref p) (constant vec2 (601.0 313.0)))))
+ (assign (x) (var_ref _z) (expression float noise(var_ref _p)))
+ (assign (x) (var_ref _w) (expression float noise(expression vec2 + (var_ref _p) (constant vec2 (601.0 313.0)))))
- (assign (constant bool (1)) (x) (var_ref _r) (var_ref _x))
- (assign (constant bool (1)) (y) (var_ref _r) (var_ref _y))
- (assign (constant bool (1)) (z) (var_ref _r) (var_ref _z))
- (assign (constant bool (1)) (w) (var_ref _r) (var_ref _w))
+ (assign (x) (var_ref _r) (var_ref _x))
+ (assign (y) (var_ref _r) (var_ref _y))
+ (assign (z) (var_ref _r) (var_ref _z))
+ (assign (w) (var_ref _r) (var_ref _w))
(return (var_ref _r))
))
@@ -81,17 +81,17 @@
(declare () vec4 _r)
(declare () float _p)
- (assign (constant bool (1)) (x) (var_ref _p) (expression float + (var_ref p) (constant float (1559.0))) )
+ (assign (x) (var_ref _p) (expression float + (var_ref p) (constant float (1559.0))) )
- (assign (constant bool (1)) (x) (var_ref _x) (expression float noise(var_ref p)))
- (assign (constant bool (1)) (x) (var_ref _y) (expression float noise(expression float + (var_ref p) (constant float (601.0 313.0 29.0 277.0)))))
- (assign (constant bool (1)) (x) (var_ref _z) (expression float noise(var_ref _p)))
- (assign (constant bool (1)) (x) (var_ref _w) (expression float noise(expression float + (var_ref _p) (constant float (601.0 313.0 29.0 277.0)))))
+ (assign (x) (var_ref _x) (expression float noise(var_ref p)))
+ (assign (x) (var_ref _y) (expression float noise(expression float + (var_ref p) (constant float (601.0 313.0 29.0 277.0)))))
+ (assign (x) (var_ref _z) (expression float noise(var_ref _p)))
+ (assign (x) (var_ref _w) (expression float noise(expression float + (var_ref _p) (constant float (601.0 313.0 29.0 277.0)))))
- (assign (constant bool (1)) (x) (var_ref _r) (var_ref _x))
- (assign (constant bool (1)) (y) (var_ref _r) (var_ref _y))
- (assign (constant bool (1)) (z) (var_ref _r) (var_ref _z))
- (assign (constant bool (1)) (w) (var_ref _r) (var_ref _w))
+ (assign (x) (var_ref _r) (var_ref _x))
+ (assign (y) (var_ref _r) (var_ref _y))
+ (assign (z) (var_ref _r) (var_ref _z))
+ (assign (w) (var_ref _r) (var_ref _w))
(return (var_ref _r))
))
))
diff --git a/src/glsl/builtins/ir/outerProduct b/src/glsl/builtins/ir/outerProduct
index 61d46261548..0e3f375bbac 100644
--- a/src/glsl/builtins/ir/outerProduct
+++ b/src/glsl/builtins/ir/outerProduct
@@ -4,8 +4,8 @@
(declare (in) vec2 u)
(declare (in) vec2 v))
((declare () mat2 m)
- (assign (constant bool (1)) (xy) (array_ref (var_ref m) (constant int (0))) (expression vec2 * (var_ref u) (swiz x (var_ref v))))
- (assign (constant bool (1)) (xy) (array_ref (var_ref m) (constant int (1))) (expression vec2 * (var_ref u) (swiz y (var_ref v))))
+ (assign (xy) (array_ref (var_ref m) (constant int (0))) (expression vec2 * (var_ref u) (swiz x (var_ref v))))
+ (assign (xy) (array_ref (var_ref m) (constant int (1))) (expression vec2 * (var_ref u) (swiz y (var_ref v))))
(return (var_ref m))))
(signature mat2x3
@@ -13,8 +13,8 @@
(declare (in) vec3 u)
(declare (in) vec2 v))
((declare () mat2x3 m)
- (assign (constant bool (1)) (xyz) (array_ref (var_ref m) (constant int (0))) (expression vec3 * (var_ref u) (swiz x (var_ref v))))
- (assign (constant bool (1)) (xyz) (array_ref (var_ref m) (constant int (1))) (expression vec3 * (var_ref u) (swiz y (var_ref v))))
+ (assign (xyz) (array_ref (var_ref m) (constant int (0))) (expression vec3 * (var_ref u) (swiz x (var_ref v))))
+ (assign (xyz) (array_ref (var_ref m) (constant int (1))) (expression vec3 * (var_ref u) (swiz y (var_ref v))))
(return (var_ref m))))
(signature mat2x4
@@ -22,8 +22,8 @@
(declare (in) vec4 u)
(declare (in) vec2 v))
((declare () mat2x4 m)
- (assign (constant bool (1)) (xyzw) (array_ref (var_ref m) (constant int (0))) (expression vec4 * (var_ref u) (swiz x (var_ref v))))
- (assign (constant bool (1)) (xyzw) (array_ref (var_ref m) (constant int (1))) (expression vec4 * (var_ref u) (swiz y (var_ref v))))
+ (assign (xyzw) (array_ref (var_ref m) (constant int (0))) (expression vec4 * (var_ref u) (swiz x (var_ref v))))
+ (assign (xyzw) (array_ref (var_ref m) (constant int (1))) (expression vec4 * (var_ref u) (swiz y (var_ref v))))
(return (var_ref m))))
(signature mat3x2
@@ -31,9 +31,9 @@
(declare (in) vec2 u)
(declare (in) vec3 v))
((declare () mat3x2 m)
- (assign (constant bool (1)) (xy) (array_ref (var_ref m) (constant int (0))) (expression vec2 * (var_ref u) (swiz x (var_ref v))))
- (assign (constant bool (1)) (xy) (array_ref (var_ref m) (constant int (1))) (expression vec2 * (var_ref u) (swiz y (var_ref v))))
- (assign (constant bool (1)) (xy) (array_ref (var_ref m) (constant int (2))) (expression vec2 * (var_ref u) (swiz z (var_ref v))))
+ (assign (xy) (array_ref (var_ref m) (constant int (0))) (expression vec2 * (var_ref u) (swiz x (var_ref v))))
+ (assign (xy) (array_ref (var_ref m) (constant int (1))) (expression vec2 * (var_ref u) (swiz y (var_ref v))))
+ (assign (xy) (array_ref (var_ref m) (constant int (2))) (expression vec2 * (var_ref u) (swiz z (var_ref v))))
(return (var_ref m))
))
@@ -42,9 +42,9 @@
(declare (in) vec3 u)
(declare (in) vec3 v))
((declare () mat3 m)
- (assign (constant bool (1)) (xyz) (array_ref (var_ref m) (constant int (0))) (expression vec3 * (var_ref u) (swiz x (var_ref v))))
- (assign (constant bool (1)) (xyz) (array_ref (var_ref m) (constant int (1))) (expression vec3 * (var_ref u) (swiz y (var_ref v))))
- (assign (constant bool (1)) (xyz) (array_ref (var_ref m) (constant int (2))) (expression vec3 * (var_ref u) (swiz z (var_ref v))))
+ (assign (xyz) (array_ref (var_ref m) (constant int (0))) (expression vec3 * (var_ref u) (swiz x (var_ref v))))
+ (assign (xyz) (array_ref (var_ref m) (constant int (1))) (expression vec3 * (var_ref u) (swiz y (var_ref v))))
+ (assign (xyz) (array_ref (var_ref m) (constant int (2))) (expression vec3 * (var_ref u) (swiz z (var_ref v))))
(return (var_ref m))))
(signature mat3x4
@@ -52,9 +52,9 @@
(declare (in) vec4 u)
(declare (in) vec3 v))
((declare () mat3x4 m)
- (assign (constant bool (1)) (xyzw) (array_ref (var_ref m) (constant int (0))) (expression vec4 * (var_ref u) (swiz x (var_ref v))))
- (assign (constant bool (1)) (xyzw) (array_ref (var_ref m) (constant int (1))) (expression vec4 * (var_ref u) (swiz y (var_ref v))))
- (assign (constant bool (1)) (xyzw) (array_ref (var_ref m) (constant int (2))) (expression vec4 * (var_ref u) (swiz z (var_ref v))))
+ (assign (xyzw) (array_ref (var_ref m) (constant int (0))) (expression vec4 * (var_ref u) (swiz x (var_ref v))))
+ (assign (xyzw) (array_ref (var_ref m) (constant int (1))) (expression vec4 * (var_ref u) (swiz y (var_ref v))))
+ (assign (xyzw) (array_ref (var_ref m) (constant int (2))) (expression vec4 * (var_ref u) (swiz z (var_ref v))))
(return (var_ref m))))
(signature mat4x2
@@ -62,10 +62,10 @@
(declare (in) vec2 u)
(declare (in) vec4 v))
((declare () mat4x2 m)
- (assign (constant bool (1)) (xy) (array_ref (var_ref m) (constant int (0))) (expression vec2 * (var_ref u) (swiz x (var_ref v))))
- (assign (constant bool (1)) (xy) (array_ref (var_ref m) (constant int (1))) (expression vec2 * (var_ref u) (swiz y (var_ref v))))
- (assign (constant bool (1)) (xy) (array_ref (var_ref m) (constant int (2))) (expression vec2 * (var_ref u) (swiz z (var_ref v))))
- (assign (constant bool (1)) (xy) (array_ref (var_ref m) (constant int (3))) (expression vec2 * (var_ref u) (swiz w (var_ref v))))
+ (assign (xy) (array_ref (var_ref m) (constant int (0))) (expression vec2 * (var_ref u) (swiz x (var_ref v))))
+ (assign (xy) (array_ref (var_ref m) (constant int (1))) (expression vec2 * (var_ref u) (swiz y (var_ref v))))
+ (assign (xy) (array_ref (var_ref m) (constant int (2))) (expression vec2 * (var_ref u) (swiz z (var_ref v))))
+ (assign (xy) (array_ref (var_ref m) (constant int (3))) (expression vec2 * (var_ref u) (swiz w (var_ref v))))
(return (var_ref m))))
(signature mat4x3
@@ -73,10 +73,10 @@
(declare (in) vec3 u)
(declare (in) vec4 v))
((declare () mat4x3 m)
- (assign (constant bool (1)) (xyz) (array_ref (var_ref m) (constant int (0))) (expression vec3 * (var_ref u) (swiz x (var_ref v))))
- (assign (constant bool (1)) (xyz) (array_ref (var_ref m) (constant int (1))) (expression vec3 * (var_ref u) (swiz y (var_ref v))))
- (assign (constant bool (1)) (xyz) (array_ref (var_ref m) (constant int (2))) (expression vec3 * (var_ref u) (swiz z (var_ref v))))
- (assign (constant bool (1)) (xyz) (array_ref (var_ref m) (constant int (3))) (expression vec3 * (var_ref u) (swiz w (var_ref v))))
+ (assign (xyz) (array_ref (var_ref m) (constant int (0))) (expression vec3 * (var_ref u) (swiz x (var_ref v))))
+ (assign (xyz) (array_ref (var_ref m) (constant int (1))) (expression vec3 * (var_ref u) (swiz y (var_ref v))))
+ (assign (xyz) (array_ref (var_ref m) (constant int (2))) (expression vec3 * (var_ref u) (swiz z (var_ref v))))
+ (assign (xyz) (array_ref (var_ref m) (constant int (3))) (expression vec3 * (var_ref u) (swiz w (var_ref v))))
(return (var_ref m))))
(signature mat4
@@ -84,9 +84,9 @@
(declare (in) vec4 u)
(declare (in) vec4 v))
((declare () mat4 m)
- (assign (constant bool (1)) (xyzw) (array_ref (var_ref m) (constant int (0))) (expression vec4 * (var_ref u) (swiz x (var_ref v))))
- (assign (constant bool (1)) (xyzw) (array_ref (var_ref m) (constant int (1))) (expression vec4 * (var_ref u) (swiz y (var_ref v))))
- (assign (constant bool (1)) (xyzw) (array_ref (var_ref m) (constant int (2))) (expression vec4 * (var_ref u) (swiz z (var_ref v))))
- (assign (constant bool (1)) (xyzw) (array_ref (var_ref m) (constant int (3))) (expression vec4 * (var_ref u) (swiz w (var_ref v))))
+ (assign (xyzw) (array_ref (var_ref m) (constant int (0))) (expression vec4 * (var_ref u) (swiz x (var_ref v))))
+ (assign (xyzw) (array_ref (var_ref m) (constant int (1))) (expression vec4 * (var_ref u) (swiz y (var_ref v))))
+ (assign (xyzw) (array_ref (var_ref m) (constant int (2))) (expression vec4 * (var_ref u) (swiz z (var_ref v))))
+ (assign (xyzw) (array_ref (var_ref m) (constant int (3))) (expression vec4 * (var_ref u) (swiz w (var_ref v))))
(return (var_ref m))))
))
diff --git a/src/glsl/builtins/ir/refract b/src/glsl/builtins/ir/refract
index f6319b0ed47..60899f01cec 100644
--- a/src/glsl/builtins/ir/refract
+++ b/src/glsl/builtins/ir/refract
@@ -5,7 +5,7 @@
(declare (in) float n)
(declare (in) float eta))
((declare () float k)
- (assign (constant bool (1)) (x) (var_ref k)
+ (assign (x) (var_ref k)
(expression float - (constant float (1.0))
(expression float * (var_ref eta)
(expression float * (var_ref eta)
@@ -30,7 +30,7 @@
(declare (in) vec2 n)
(declare (in) float eta))
((declare () float k)
- (assign (constant bool (1)) (x) (var_ref k)
+ (assign (x) (var_ref k)
(expression float - (constant float (1.0))
(expression float * (var_ref eta)
(expression float * (var_ref eta)
@@ -55,7 +55,7 @@
(declare (in) vec3 n)
(declare (in) float eta))
((declare () float k)
- (assign (constant bool (1)) (x) (var_ref k)
+ (assign (x) (var_ref k)
(expression float - (constant float (1.0))
(expression float * (var_ref eta)
(expression float * (var_ref eta)
@@ -80,7 +80,7 @@
(declare (in) vec4 n)
(declare (in) float eta))
((declare () float k)
- (assign (constant bool (1)) (x) (var_ref k)
+ (assign (x) (var_ref k)
(expression float - (constant float (1.0))
(expression float * (var_ref eta)
(expression float * (var_ref eta)
diff --git a/src/glsl/builtins/ir/smoothstep b/src/glsl/builtins/ir/smoothstep
index 0164219a056..94c98b29e53 100644
--- a/src/glsl/builtins/ir/smoothstep
+++ b/src/glsl/builtins/ir/smoothstep
@@ -5,40 +5,26 @@
(declare (in) float edge1)
(declare (in) float x))
((declare () float t)
-
- (assign (constant bool (1)) (x) (var_ref t)
+ (assign (x) (var_ref t)
(expression float max
(expression float min
(expression float / (expression float - (var_ref x) (var_ref edge0)) (expression float - (var_ref edge1) (var_ref edge0)))
(constant float (1.0)))
(constant float (0.0))))
- (return (expression float * (var_ref t) (expression float * (var_ref t) (expression float - (constant float (3.000000)) (expression float * (constant float (2.000000)) (var_ref t))))))))
-
+ (return (expression float * (var_ref t) (expression float * (var_ref t) (expression float - (constant float (3.0)) (expression float * (constant float (2.0)) (var_ref t))))))))
(signature vec2
(parameters
(declare (in) float edge0)
(declare (in) float edge1)
(declare (in) vec2 x))
((declare () vec2 t)
- (declare () vec2 retval)
-
- (assign (constant bool (1)) (x) (var_ref t)
- (expression float max
- (expression float min
- (expression float / (expression float - (swiz x (var_ref x)) (var_ref edge0)) (expression float - (var_ref edge1) (var_ref edge0)))
+ (assign (xy) (var_ref t)
+ (expression vec2 max
+ (expression vec2 min
+ (expression vec2 / (expression vec2 - (var_ref x) (var_ref edge0)) (expression float - (var_ref edge1) (var_ref edge0)))
(constant float (1.0)))
(constant float (0.0))))
- (assign (constant bool (1)) (x) (var_ref retval) (expression float * (swiz x (var_ref t)) (expression float * (swiz x (var_ref t)) (expression float - (constant float (3.000000)) (expression float * (constant float (2.000000)) (swiz x (var_ref t)))))))
-
- (assign (constant bool (1)) (y) (var_ref t)
- (expression float max
- (expression float min
- (expression float / (expression float - (swiz y (var_ref x)) (var_ref edge0)) (expression float - (var_ref edge1) (var_ref edge0)))
- (constant float (1.0)))
- (constant float (0.0))))
- (assign (constant bool (1)) (y) (var_ref retval) (expression float * (swiz y (var_ref t)) (expression float * (swiz y (var_ref t)) (expression float - (constant float (3.000000)) (expression float * (constant float (2.000000)) (swiz y (var_ref t)))))))
- (return (var_ref retval))
- ))
+ (return (expression vec2 * (var_ref t) (expression vec2 * (var_ref t) (expression vec2 - (constant float (3.0)) (expression vec2 * (constant float (2.0)) (var_ref t))))))))
(signature vec3
(parameters
@@ -46,33 +32,13 @@
(declare (in) float edge1)
(declare (in) vec3 x))
((declare () vec3 t)
- (declare () vec3 retval)
-
- (assign (constant bool (1)) (x) (var_ref t)
- (expression float max
- (expression float min
- (expression float / (expression float - (swiz x (var_ref x)) (var_ref edge0)) (expression float - (var_ref edge1) (var_ref edge0)))
- (constant float (1.0)))
- (constant float (0.0))))
- (assign (constant bool (1)) (x) (var_ref retval) (expression float * (swiz x (var_ref t)) (expression float * (swiz x (var_ref t)) (expression float - (constant float (3.000000)) (expression float * (constant float (2.000000)) (swiz x (var_ref t)))))))
-
- (assign (constant bool (1)) (y) (var_ref t)
- (expression float max
- (expression float min
- (expression float / (expression float - (swiz y (var_ref x)) (var_ref edge0)) (expression float - (var_ref edge1) (var_ref edge0)))
- (constant float (1.0)))
- (constant float (0.0))))
- (assign (constant bool (1)) (y) (var_ref retval) (expression float * (swiz y (var_ref t)) (expression float * (swiz y (var_ref t)) (expression float - (constant float (3.000000)) (expression float * (constant float (2.000000)) (swiz y (var_ref t)))))))
-
- (assign (constant bool (1)) (z) (var_ref t)
- (expression float max
- (expression float min
- (expression float / (expression float - (swiz z (var_ref x)) (var_ref edge0)) (expression float - (var_ref edge1) (var_ref edge0)))
+ (assign (xyz) (var_ref t)
+ (expression vec3 max
+ (expression vec3 min
+ (expression vec3 / (expression vec3 - (var_ref x) (var_ref edge0)) (expression float - (var_ref edge1) (var_ref edge0)))
(constant float (1.0)))
(constant float (0.0))))
- (assign (constant bool (1)) (z) (var_ref retval) (expression float * (swiz z (var_ref t)) (expression float * (swiz z (var_ref t)) (expression float - (constant float (3.000000)) (expression float * (constant float (2.000000)) (swiz z (var_ref t)))))))
- (return (var_ref retval))
- ))
+ (return (expression vec3 * (var_ref t) (expression vec3 * (var_ref t) (expression vec3 - (constant float (3.0)) (expression vec3 * (constant float (2.0)) (var_ref t))))))))
(signature vec4
@@ -81,73 +47,54 @@
(declare (in) float edge1)
(declare (in) vec4 x))
((declare () vec4 t)
- (declare () vec4 retval)
-
- (assign (constant bool (1)) (x) (var_ref t)
- (expression float max
- (expression float min
- (expression float / (expression float - (swiz x (var_ref x)) (var_ref edge0)) (expression float - (var_ref edge1) (var_ref edge0)))
- (constant float (1.0)))
- (constant float (0.0))))
- (assign (constant bool (1)) (x) (var_ref retval) (expression float * (swiz x (var_ref t)) (expression float * (swiz x (var_ref t)) (expression float - (constant float (3.000000)) (expression float * (constant float (2.000000)) (swiz x (var_ref t)))))))
-
- (assign (constant bool (1)) (y) (var_ref t)
- (expression float max
- (expression float min
- (expression float / (expression float - (swiz y (var_ref x)) (var_ref edge0)) (expression float - (var_ref edge1) (var_ref edge0)))
- (constant float (1.0)))
- (constant float (0.0))))
- (assign (constant bool (1)) (y) (var_ref retval) (expression float * (swiz y (var_ref t)) (expression float * (swiz y (var_ref t)) (expression float - (constant float (3.000000)) (expression float * (constant float (2.000000)) (swiz y (var_ref t)))))))
-
- (assign (constant bool (1)) (z) (var_ref t)
- (expression float max
- (expression float min
- (expression float / (expression float - (swiz z (var_ref x)) (var_ref edge0)) (expression float - (var_ref edge1) (var_ref edge0)))
+ (assign (xyzw) (var_ref t)
+ (expression vec4 max
+ (expression vec4 min
+ (expression vec4 / (expression vec4 - (var_ref x) (var_ref edge0)) (expression float - (var_ref edge1) (var_ref edge0)))
(constant float (1.0)))
(constant float (0.0))))
- (assign (constant bool (1)) (z) (var_ref retval) (expression float * (swiz z (var_ref t)) (expression float * (swiz z (var_ref t)) (expression float - (constant float (3.000000)) (expression float * (constant float (2.000000)) (swiz z (var_ref t)))))))
-
- (assign (constant bool (1)) (w) (var_ref t)
- (expression float max
- (expression float min
- (expression float / (expression float - (swiz w (var_ref x)) (var_ref edge0)) (expression float - (var_ref edge1) (var_ref edge0)))
- (constant float (1.0)))
- (constant float (0.0))))
- (assign (constant bool (1)) (w) (var_ref retval) (expression float * (swiz w (var_ref t)) (expression float * (swiz w (var_ref t)) (expression float - (constant float (3.000000)) (expression float * (constant float (2.000000)) (swiz w (var_ref t)))))))
- (return (var_ref retval))
- ))
+ (return (expression vec4 * (var_ref t) (expression vec4 * (var_ref t) (expression vec4 - (constant float (3.0)) (expression vec4 * (constant float (2.0)) (var_ref t))))))))
(signature vec2
(parameters
(declare (in) vec2 edge0)
(declare (in) vec2 edge1)
(declare (in) vec2 x))
- ((return (expression vec2 max
+ ((declare () vec2 t)
+ (assign (xy) (var_ref t)
+ (expression vec2 max
(expression vec2 min
(expression vec2 / (expression vec2 - (var_ref x) (var_ref edge0)) (expression vec2 - (var_ref edge1) (var_ref edge0)))
- (constant vec2 (1.0 1.0)))
- (constant vec2 (0.0 0.0))))))
+ (constant float (1.0)))
+ (constant float (0.0))))
+ (return (expression vec2 * (var_ref t) (expression vec2 * (var_ref t) (expression vec2 - (constant float (3.0)) (expression vec2 * (constant float (2.0)) (var_ref t))))))))
(signature vec3
(parameters
(declare (in) vec3 edge0)
(declare (in) vec3 edge1)
(declare (in) vec3 x))
- ((return (expression vec3 max
+ ((declare () vec3 t)
+ (assign (xyz) (var_ref t)
+ (expression vec3 max
(expression vec3 min
(expression vec3 / (expression vec3 - (var_ref x) (var_ref edge0)) (expression vec3 - (var_ref edge1) (var_ref edge0)))
- (constant vec3 (1.0 1.0 1.0)))
- (constant vec3 (0.0 0.0 0.0))))))
+ (constant float (1.0)))
+ (constant float (0.0))))
+ (return (expression vec3 * (var_ref t) (expression vec3 * (var_ref t) (expression vec3 - (constant float (3.0)) (expression vec3 * (constant float (2.0)) (var_ref t))))))))
(signature vec4
(parameters
(declare (in) vec4 edge0)
(declare (in) vec4 edge1)
(declare (in) vec4 x))
- ((return (expression vec4 max
+ ((declare () vec4 t)
+ (assign (xyzw) (var_ref t)
+ (expression vec4 max
(expression vec4 min
(expression vec4 / (expression vec4 - (var_ref x) (var_ref edge0)) (expression vec4 - (var_ref edge1) (var_ref edge0)))
- (constant vec4 (1.0 1.0 1.0 1.0)))
- (constant vec4 (0.0 0.0 0.0 0.0))))))
+ (constant float (1.0)))
+ (constant float (0.0))))
+ (return (expression vec4 * (var_ref t) (expression vec4 * (var_ref t) (expression vec4 - (constant float (3.0)) (expression vec4 * (constant float (2.0)) (var_ref t))))))))
))
diff --git a/src/glsl/builtins/ir/step b/src/glsl/builtins/ir/step
index 7aec9d7a6cc..efcd7bc8023 100644
--- a/src/glsl/builtins/ir/step
+++ b/src/glsl/builtins/ir/step
@@ -10,8 +10,8 @@
(declare (in) float edge)
(declare (in) vec2 x))
((declare () vec2 t)
- (assign (constant bool (1)) (x) (var_ref t) (expression float b2f (expression bool >= (swiz x (var_ref x))(var_ref edge))))
- (assign (constant bool (1)) (y) (var_ref t) (expression float b2f (expression bool >= (swiz y (var_ref x))(var_ref edge))))
+ (assign (x) (var_ref t) (expression float b2f (expression bool >= (swiz x (var_ref x))(var_ref edge))))
+ (assign (y) (var_ref t) (expression float b2f (expression bool >= (swiz y (var_ref x))(var_ref edge))))
(return (var_ref t))))
(signature vec3
@@ -19,9 +19,9 @@
(declare (in) float edge)
(declare (in) vec3 x))
((declare () vec3 t)
- (assign (constant bool (1)) (x) (var_ref t) (expression float b2f (expression bool >= (swiz x (var_ref x))(var_ref edge))))
- (assign (constant bool (1)) (y) (var_ref t) (expression float b2f (expression bool >= (swiz y (var_ref x))(var_ref edge))))
- (assign (constant bool (1)) (z) (var_ref t) (expression float b2f (expression bool >= (swiz z (var_ref x))(var_ref edge))))
+ (assign (x) (var_ref t) (expression float b2f (expression bool >= (swiz x (var_ref x))(var_ref edge))))
+ (assign (y) (var_ref t) (expression float b2f (expression bool >= (swiz y (var_ref x))(var_ref edge))))
+ (assign (z) (var_ref t) (expression float b2f (expression bool >= (swiz z (var_ref x))(var_ref edge))))
(return (var_ref t))))
(signature vec4
@@ -29,10 +29,10 @@
(declare (in) float edge)
(declare (in) vec4 x))
((declare () vec4 t)
- (assign (constant bool (1)) (x) (var_ref t) (expression float b2f (expression bool >= (swiz x (var_ref x))(var_ref edge))))
- (assign (constant bool (1)) (y) (var_ref t) (expression float b2f (expression bool >= (swiz y (var_ref x))(var_ref edge))))
- (assign (constant bool (1)) (z) (var_ref t) (expression float b2f (expression bool >= (swiz z (var_ref x))(var_ref edge))))
- (assign (constant bool (1)) (w) (var_ref t) (expression float b2f (expression bool >= (swiz w (var_ref x))(var_ref edge))))
+ (assign (x) (var_ref t) (expression float b2f (expression bool >= (swiz x (var_ref x))(var_ref edge))))
+ (assign (y) (var_ref t) (expression float b2f (expression bool >= (swiz y (var_ref x))(var_ref edge))))
+ (assign (z) (var_ref t) (expression float b2f (expression bool >= (swiz z (var_ref x))(var_ref edge))))
+ (assign (w) (var_ref t) (expression float b2f (expression bool >= (swiz w (var_ref x))(var_ref edge))))
(return (var_ref t))))
(signature vec2
@@ -40,8 +40,8 @@
(declare (in) vec2 edge)
(declare (in) vec2 x))
((declare () vec2 t)
- (assign (constant bool (1)) (x) (var_ref t) (expression float b2f (expression bool >= (swiz x (var_ref x))(swiz x (var_ref edge)))))
- (assign (constant bool (1)) (y) (var_ref t) (expression float b2f (expression bool >= (swiz y (var_ref x))(swiz y (var_ref edge)))))
+ (assign (x) (var_ref t) (expression float b2f (expression bool >= (swiz x (var_ref x))(swiz x (var_ref edge)))))
+ (assign (y) (var_ref t) (expression float b2f (expression bool >= (swiz y (var_ref x))(swiz y (var_ref edge)))))
(return (var_ref t))))
(signature vec3
@@ -49,9 +49,9 @@
(declare (in) vec3 edge)
(declare (in) vec3 x))
((declare () vec3 t)
- (assign (constant bool (1)) (x) (var_ref t) (expression float b2f (expression bool >= (swiz x (var_ref x))(swiz x (var_ref edge)))))
- (assign (constant bool (1)) (y) (var_ref t) (expression float b2f (expression bool >= (swiz y (var_ref x))(swiz y (var_ref edge)))))
- (assign (constant bool (1)) (z) (var_ref t) (expression float b2f (expression bool >= (swiz z (var_ref x))(swiz z (var_ref edge)))))
+ (assign (x) (var_ref t) (expression float b2f (expression bool >= (swiz x (var_ref x))(swiz x (var_ref edge)))))
+ (assign (y) (var_ref t) (expression float b2f (expression bool >= (swiz y (var_ref x))(swiz y (var_ref edge)))))
+ (assign (z) (var_ref t) (expression float b2f (expression bool >= (swiz z (var_ref x))(swiz z (var_ref edge)))))
(return (var_ref t))))
(signature vec4
@@ -59,10 +59,10 @@
(declare (in) vec4 edge)
(declare (in) vec4 x))
((declare () vec4 t)
- (assign (constant bool (1)) (x) (var_ref t) (expression float b2f (expression bool >= (swiz x (var_ref x))(swiz x (var_ref edge)))))
- (assign (constant bool (1)) (y) (var_ref t) (expression float b2f (expression bool >= (swiz y (var_ref x))(swiz y (var_ref edge)))))
- (assign (constant bool (1)) (z) (var_ref t) (expression float b2f (expression bool >= (swiz z (var_ref x))(swiz z (var_ref edge)))))
- (assign (constant bool (1)) (w) (var_ref t) (expression float b2f (expression bool >= (swiz w (var_ref x))(swiz w (var_ref edge)))))
+ (assign (x) (var_ref t) (expression float b2f (expression bool >= (swiz x (var_ref x))(swiz x (var_ref edge)))))
+ (assign (y) (var_ref t) (expression float b2f (expression bool >= (swiz y (var_ref x))(swiz y (var_ref edge)))))
+ (assign (z) (var_ref t) (expression float b2f (expression bool >= (swiz z (var_ref x))(swiz z (var_ref edge)))))
+ (assign (w) (var_ref t) (expression float b2f (expression bool >= (swiz w (var_ref x))(swiz w (var_ref edge)))))
(return (var_ref t))))
))
diff --git a/src/glsl/builtins/ir/transpose b/src/glsl/builtins/ir/transpose
index 4bed4489bf4..043327d235b 100644
--- a/src/glsl/builtins/ir/transpose
+++ b/src/glsl/builtins/ir/transpose
@@ -3,135 +3,135 @@
(parameters
(declare (in) mat2 m))
((declare () mat2 t)
- (assign (constant bool (1)) (x) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (0)))))
- (assign (constant bool (1)) (x) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (0)))))
- (assign (constant bool (1)) (y) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (1)))))
- (assign (constant bool (1)) (y) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (1)))))
+ (assign (x) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (0)))))
+ (assign (x) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (0)))))
+ (assign (y) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (1)))))
+ (assign (y) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (1)))))
(return (var_ref t))))
(signature mat3x2
(parameters
(declare (in) mat2x3 m))
((declare () mat3x2 t)
- (assign (constant bool (1)) (x) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (0)))))
- (assign (constant bool (1)) (x) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (0)))))
- (assign (constant bool (1)) (x) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (0)))))
- (assign (constant bool (1)) (y) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (1)))))
- (assign (constant bool (1)) (y) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (1)))))
- (assign (constant bool (1)) (y) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (1)))))
+ (assign (x) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (0)))))
+ (assign (x) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (0)))))
+ (assign (x) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (0)))))
+ (assign (y) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (1)))))
+ (assign (y) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (1)))))
+ (assign (y) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (1)))))
(return (var_ref t))))
(signature mat4x2
(parameters
(declare (in) mat2x4 m))
((declare () mat4x2 t)
- (assign (constant bool (1)) (x) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (0)))))
- (assign (constant bool (1)) (x) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (0)))))
- (assign (constant bool (1)) (x) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (0)))))
- (assign (constant bool (1)) (x) (array_ref (var_ref t) (constant int (3))) (swiz w (array_ref (var_ref m) (constant int (0)))))
- (assign (constant bool (1)) (y) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (1)))))
- (assign (constant bool (1)) (y) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (1)))))
- (assign (constant bool (1)) (y) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (1)))))
- (assign (constant bool (1)) (y) (array_ref (var_ref t) (constant int (3))) (swiz w (array_ref (var_ref m) (constant int (1)))))
+ (assign (x) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (0)))))
+ (assign (x) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (0)))))
+ (assign (x) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (0)))))
+ (assign (x) (array_ref (var_ref t) (constant int (3))) (swiz w (array_ref (var_ref m) (constant int (0)))))
+ (assign (y) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (1)))))
+ (assign (y) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (1)))))
+ (assign (y) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (1)))))
+ (assign (y) (array_ref (var_ref t) (constant int (3))) (swiz w (array_ref (var_ref m) (constant int (1)))))
(return (var_ref t))))
(signature mat2x3
(parameters
(declare (in) mat3x2 m))
((declare () mat2x3 t)
- (assign (constant bool (1)) (x) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (0)))))
- (assign (constant bool (1)) (x) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (0)))))
- (assign (constant bool (1)) (y) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (1)))))
- (assign (constant bool (1)) (y) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (1)))))
- (assign (constant bool (1)) (z) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (2)))))
- (assign (constant bool (1)) (z) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (2)))))
+ (assign (x) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (0)))))
+ (assign (x) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (0)))))
+ (assign (y) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (1)))))
+ (assign (y) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (1)))))
+ (assign (z) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (2)))))
+ (assign (z) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (2)))))
(return (var_ref t))))
(signature mat3
(parameters
(declare (in) mat3 m))
((declare () mat3 t)
- (assign (constant bool (1)) (x) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (0)))))
- (assign (constant bool (1)) (x) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (0)))))
- (assign (constant bool (1)) (x) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (0)))))
- (assign (constant bool (1)) (y) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (1)))))
- (assign (constant bool (1)) (y) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (1)))))
- (assign (constant bool (1)) (y) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (1)))))
- (assign (constant bool (1)) (z) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (2)))))
- (assign (constant bool (1)) (z) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (2)))))
- (assign (constant bool (1)) (z) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (2)))))
+ (assign (x) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (0)))))
+ (assign (x) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (0)))))
+ (assign (x) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (0)))))
+ (assign (y) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (1)))))
+ (assign (y) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (1)))))
+ (assign (y) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (1)))))
+ (assign (z) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (2)))))
+ (assign (z) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (2)))))
+ (assign (z) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (2)))))
(return (var_ref t))))
(signature mat4x3
(parameters
(declare (in) mat3x4 m))
((declare () mat4x3 t)
- (assign (constant bool (1)) (x) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (0)))))
- (assign (constant bool (1)) (x) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (0)))))
- (assign (constant bool (1)) (x) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (0)))))
- (assign (constant bool (1)) (x) (array_ref (var_ref t) (constant int (3))) (swiz w (array_ref (var_ref m) (constant int (0)))))
- (assign (constant bool (1)) (y) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (1)))))
- (assign (constant bool (1)) (y) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (1)))))
- (assign (constant bool (1)) (y) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (1)))))
- (assign (constant bool (1)) (y) (array_ref (var_ref t) (constant int (3))) (swiz w (array_ref (var_ref m) (constant int (1)))))
- (assign (constant bool (1)) (z) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (2)))))
- (assign (constant bool (1)) (z) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (2)))))
- (assign (constant bool (1)) (z) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (2)))))
- (assign (constant bool (1)) (z) (array_ref (var_ref t) (constant int (3))) (swiz w (array_ref (var_ref m) (constant int (2)))))
+ (assign (x) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (0)))))
+ (assign (x) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (0)))))
+ (assign (x) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (0)))))
+ (assign (x) (array_ref (var_ref t) (constant int (3))) (swiz w (array_ref (var_ref m) (constant int (0)))))
+ (assign (y) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (1)))))
+ (assign (y) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (1)))))
+ (assign (y) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (1)))))
+ (assign (y) (array_ref (var_ref t) (constant int (3))) (swiz w (array_ref (var_ref m) (constant int (1)))))
+ (assign (z) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (2)))))
+ (assign (z) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (2)))))
+ (assign (z) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (2)))))
+ (assign (z) (array_ref (var_ref t) (constant int (3))) (swiz w (array_ref (var_ref m) (constant int (2)))))
(return (var_ref t))))
(signature mat2x4
(parameters
(declare (in) mat4x2 m))
((declare () mat2x4 t)
- (assign (constant bool (1)) (x) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (0)))))
- (assign (constant bool (1)) (x) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (0)))))
- (assign (constant bool (1)) (y) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (1)))))
- (assign (constant bool (1)) (y) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (1)))))
- (assign (constant bool (1)) (z) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (2)))))
- (assign (constant bool (1)) (z) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (2)))))
- (assign (constant bool (1)) (w) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (3)))))
- (assign (constant bool (1)) (w) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (3)))))
+ (assign (x) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (0)))))
+ (assign (x) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (0)))))
+ (assign (y) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (1)))))
+ (assign (y) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (1)))))
+ (assign (z) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (2)))))
+ (assign (z) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (2)))))
+ (assign (w) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (3)))))
+ (assign (w) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (3)))))
(return (var_ref t))))
(signature mat3x4
(parameters
(declare (in) mat4x3 m))
((declare () mat3x4 t)
- (assign (constant bool (1)) (x) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (0)))))
- (assign (constant bool (1)) (x) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (0)))))
- (assign (constant bool (1)) (x) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (0)))))
- (assign (constant bool (1)) (y) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (1)))))
- (assign (constant bool (1)) (y) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (1)))))
- (assign (constant bool (1)) (y) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (1)))))
- (assign (constant bool (1)) (z) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (2)))))
- (assign (constant bool (1)) (z) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (2)))))
- (assign (constant bool (1)) (z) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (2)))))
- (assign (constant bool (1)) (w) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (3)))))
- (assign (constant bool (1)) (w) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (3)))))
- (assign (constant bool (1)) (w) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (3)))))
+ (assign (x) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (0)))))
+ (assign (x) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (0)))))
+ (assign (x) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (0)))))
+ (assign (y) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (1)))))
+ (assign (y) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (1)))))
+ (assign (y) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (1)))))
+ (assign (z) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (2)))))
+ (assign (z) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (2)))))
+ (assign (z) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (2)))))
+ (assign (w) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (3)))))
+ (assign (w) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (3)))))
+ (assign (w) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (3)))))
(return (var_ref t))))
(signature mat4
(parameters
(declare (in) mat4 m))
((declare () mat4 t)
- (assign (constant bool (1)) (x) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (0)))))
- (assign (constant bool (1)) (x) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (0)))))
- (assign (constant bool (1)) (x) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (0)))))
- (assign (constant bool (1)) (x) (array_ref (var_ref t) (constant int (3))) (swiz w (array_ref (var_ref m) (constant int (0)))))
- (assign (constant bool (1)) (y) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (1)))))
- (assign (constant bool (1)) (y) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (1)))))
- (assign (constant bool (1)) (y) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (1)))))
- (assign (constant bool (1)) (y) (array_ref (var_ref t) (constant int (3))) (swiz w (array_ref (var_ref m) (constant int (1)))))
- (assign (constant bool (1)) (z) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (2)))))
- (assign (constant bool (1)) (z) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (2)))))
- (assign (constant bool (1)) (z) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (2)))))
- (assign (constant bool (1)) (z) (array_ref (var_ref t) (constant int (3))) (swiz w (array_ref (var_ref m) (constant int (2)))))
- (assign (constant bool (1)) (w) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (3)))))
- (assign (constant bool (1)) (w) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (3)))))
- (assign (constant bool (1)) (w) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (3)))))
- (assign (constant bool (1)) (w) (array_ref (var_ref t) (constant int (3))) (swiz w (array_ref (var_ref m) (constant int (3)))))
+ (assign (x) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (0)))))
+ (assign (x) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (0)))))
+ (assign (x) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (0)))))
+ (assign (x) (array_ref (var_ref t) (constant int (3))) (swiz w (array_ref (var_ref m) (constant int (0)))))
+ (assign (y) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (1)))))
+ (assign (y) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (1)))))
+ (assign (y) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (1)))))
+ (assign (y) (array_ref (var_ref t) (constant int (3))) (swiz w (array_ref (var_ref m) (constant int (1)))))
+ (assign (z) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (2)))))
+ (assign (z) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (2)))))
+ (assign (z) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (2)))))
+ (assign (z) (array_ref (var_ref t) (constant int (3))) (swiz w (array_ref (var_ref m) (constant int (2)))))
+ (assign (w) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (3)))))
+ (assign (w) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (3)))))
+ (assign (w) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (3)))))
+ (assign (w) (array_ref (var_ref t) (constant int (3))) (swiz w (array_ref (var_ref m) (constant int (3)))))
(return (var_ref t))))
)
diff --git a/src/glsl/builtins/profiles/130.frag b/src/glsl/builtins/profiles/130.frag
index 329116f2a28..0e3c7ac4199 100644
--- a/src/glsl/builtins/profiles/130.frag
+++ b/src/glsl/builtins/profiles/130.frag
@@ -491,8 +491,8 @@ ivec2 textureSize( sampler1DArray sampler, int lod);
ivec2 textureSize(isampler1DArray sampler, int lod);
ivec2 textureSize(usampler1DArray sampler, int lod);
ivec3 textureSize( sampler2DArray sampler, int lod);
-ivec2 textureSize(isampler2DArray sampler, int lod);
-ivec2 textureSize(usampler2DArray sampler, int lod);
+ivec3 textureSize(isampler2DArray sampler, int lod);
+ivec3 textureSize(usampler2DArray sampler, int lod);
ivec2 textureSize(sampler1DArrayShadow sampler, int lod);
ivec3 textureSize(sampler2DArrayShadow sampler, int lod);
@@ -635,7 +635,6 @@ uvec4 textureLod(usampler2DArray sampler, vec3 P, float lod);
float textureLod(sampler1DArrayShadow sampler, vec3 P, float lod);
-#if 0
/* textureOffset - no bias */
vec4 textureOffset( sampler1D sampler, float P, int offset);
ivec4 textureOffset(isampler1D sampler, float P, int offset);
@@ -687,7 +686,6 @@ ivec4 textureOffset(isampler2DArray sampler, vec3 P, ivec2 offset, float bias);
uvec4 textureOffset(usampler2DArray sampler, vec3 P, ivec2 offset, float bias);
float textureOffset(sampler1DArrayShadow samp, vec3 P, int offset, float bias);
-#endif
/* texelFetch */
vec4 texelFetch( sampler1D sampler, int P, int lod);
@@ -710,7 +708,6 @@ uvec4 texelFetch(usampler1DArray sampler, ivec2 P, int lod);
ivec4 texelFetch(isampler2DArray sampler, ivec3 P, int lod);
uvec4 texelFetch(usampler2DArray sampler, ivec3 P, int lod);
-#if 0
/* texelFetchOffset */
vec4 texelFetchOffset( sampler1D sampler, int P, int lod, int offset);
ivec4 texelFetchOffset(isampler1D sampler, int P, int lod, int offset);
@@ -801,7 +798,6 @@ ivec4 textureLodOffset(isampler2DArray samp, vec3 P, float lod, ivec2 offset);
uvec4 textureLodOffset(usampler2DArray samp, vec3 P, float lod, ivec2 offset);
float textureLodOffset(sampler1DArrayShadow s, vec3 P, float lod, int offset);
-#endif
/* textureProjLod */
vec4 textureProjLod( sampler1D sampler, vec2 P, float lod);
@@ -825,7 +821,6 @@ uvec4 textureProjLod(usampler3D sampler, vec4 P, float lod);
float textureProjLod(sampler1DShadow sampler, vec4 P, float lod);
float textureProjLod(sampler2DShadow sampler, vec4 P, float lod);
-#if 0
/* textureProjLodOffset */
vec4 textureProjLodOffset( sampler1D sampler, vec2 P, float lod, int offset);
ivec4 textureProjLodOffset(isampler1D sampler, vec2 P, float lod, int offset);
@@ -847,7 +842,6 @@ uvec4 textureProjLodOffset(usampler3D sampler, vec4 P, float lod, ivec3 offset);
float textureProjLodOffset(sampler1DShadow s, vec4 P, float lod, int offset);
float textureProjLodOffset(sampler2DShadow s, vec4 P, float lod, ivec2 offset);
-#endif
/* textureGrad */
vec4 textureGrad( sampler1D sampler, float P, float dPdx, float dPdy);
@@ -881,7 +875,6 @@ uvec4 textureGrad(usampler2DArray sampler, vec3 P, vec2 dPdx, vec2 dPdy);
float textureGrad(sampler1DArrayShadow sampler, vec3 P, float dPdx, float dPdy);
float textureGrad(sampler2DArrayShadow sampler, vec4 P, vec2 dPdx, vec2 dPdy);
-#if 0
/* textureGradOffset */
vec4 textureGradOffset( sampler1D s, float P, float dx, float dy, int off);
ivec4 textureGradOffset(isampler1D s, float P, float dx, float dy, int offset);
@@ -912,7 +905,6 @@ uvec4 textureGradOffset(usampler2DArray s, vec3 P, vec2 dx, vec2 dy, ivec2 off);
float textureGradOffset(sampler1DArrayShadow s, vec3 P, float dx, float dy, int o);
float textureGradOffset(sampler2DArrayShadow s, vec4 P, vec2 dx, vec2 dy, ivec2 o);
-#endif
/* textureProjGrad */
vec4 textureProjGrad( sampler1D sampler, vec2 P, float dPdx, float dPdy);
@@ -936,7 +928,6 @@ uvec4 textureProjGrad(usampler3D sampler, vec4 P, vec3 dPdx, vec3 dPdy);
float textureProjGrad(sampler1DShadow sampler, vec4 P, float dPdx, float dPdy);
float textureProjGrad(sampler2DShadow sampler, vec4 P, vec2 dPdx, vec2 dPdy);
-#if 0
/* textureProjGradOffset */
vec4 textureProjGradOffset( sampler1D s, vec2 P, float dx, float dy, int off);
ivec4 textureProjGradOffset(isampler1D s, vec2 P, float dx, float dy, int off);
@@ -958,7 +949,6 @@ uvec4 textureProjGradOffset(usampler3D s, vec4 P, vec3 dx, vec3 dy, ivec3 off);
float textureProjGradOffset(sampler1DShadow s, vec4 P, float dx, float dy, int o);
float textureProjGradOffset(sampler2DShadow s, vec4 P, vec2 dx, vec2 dy, vec2 o);
-#endif
/*
* The following texture functions are deprecated:
diff --git a/src/glsl/builtins/profiles/130.vert b/src/glsl/builtins/profiles/130.vert
index 1c212ebb3c5..f85b27f8f8c 100644
--- a/src/glsl/builtins/profiles/130.vert
+++ b/src/glsl/builtins/profiles/130.vert
@@ -493,8 +493,8 @@ ivec2 textureSize( sampler1DArray sampler, int lod);
ivec2 textureSize(isampler1DArray sampler, int lod);
ivec2 textureSize(usampler1DArray sampler, int lod);
ivec3 textureSize( sampler2DArray sampler, int lod);
-ivec2 textureSize(isampler2DArray sampler, int lod);
-ivec2 textureSize(usampler2DArray sampler, int lod);
+ivec3 textureSize(isampler2DArray sampler, int lod);
+ivec3 textureSize(usampler2DArray sampler, int lod);
ivec2 textureSize(sampler1DArrayShadow sampler, int lod);
ivec3 textureSize(sampler2DArrayShadow sampler, int lod);
@@ -637,7 +637,6 @@ uvec4 textureLod(usampler2DArray sampler, vec3 P, float lod);
float textureLod(sampler1DArrayShadow sampler, vec3 P, float lod);
-#if 0
/* textureOffset - no bias */
vec4 textureOffset( sampler1D sampler, float P, int offset);
ivec4 textureOffset(isampler1D sampler, float P, int offset);
@@ -689,7 +688,6 @@ ivec4 textureOffset(isampler2DArray sampler, vec3 P, ivec2 offset, float bias);
uvec4 textureOffset(usampler2DArray sampler, vec3 P, ivec2 offset, float bias);
float textureOffset(sampler1DArrayShadow samp, vec3 P, int offset, float bias);
-#endif
/* texelFetch */
vec4 texelFetch( sampler1D sampler, int P, int lod);
@@ -712,7 +710,6 @@ uvec4 texelFetch(usampler1DArray sampler, ivec2 P, int lod);
ivec4 texelFetch(isampler2DArray sampler, ivec3 P, int lod);
uvec4 texelFetch(usampler2DArray sampler, ivec3 P, int lod);
-#if 0
/* texelFetchOffset */
vec4 texelFetchOffset( sampler1D sampler, int P, int lod, int offset);
ivec4 texelFetchOffset(isampler1D sampler, int P, int lod, int offset);
@@ -803,7 +800,6 @@ ivec4 textureLodOffset(isampler2DArray samp, vec3 P, float lod, ivec2 offset);
uvec4 textureLodOffset(usampler2DArray samp, vec3 P, float lod, ivec2 offset);
float textureLodOffset(sampler1DArrayShadow s, vec3 P, float lod, int offset);
-#endif
/* textureProjLod */
vec4 textureProjLod( sampler1D sampler, vec2 P, float lod);
@@ -827,7 +823,6 @@ uvec4 textureProjLod(usampler3D sampler, vec4 P, float lod);
float textureProjLod(sampler1DShadow sampler, vec4 P, float lod);
float textureProjLod(sampler2DShadow sampler, vec4 P, float lod);
-#if 0
/* textureProjLodOffset */
vec4 textureProjLodOffset( sampler1D sampler, vec2 P, float lod, int offset);
ivec4 textureProjLodOffset(isampler1D sampler, vec2 P, float lod, int offset);
@@ -849,7 +844,6 @@ uvec4 textureProjLodOffset(usampler3D sampler, vec4 P, float lod, ivec3 offset);
float textureProjLodOffset(sampler1DShadow s, vec4 P, float lod, int offset);
float textureProjLodOffset(sampler2DShadow s, vec4 P, float lod, ivec2 offset);
-#endif
/* textureGrad */
vec4 textureGrad( sampler1D sampler, float P, float dPdx, float dPdy);
@@ -883,7 +877,6 @@ uvec4 textureGrad(usampler2DArray sampler, vec3 P, vec2 dPdx, vec2 dPdy);
float textureGrad(sampler1DArrayShadow sampler, vec3 P, float dPdx, float dPdy);
float textureGrad(sampler2DArrayShadow sampler, vec4 P, vec2 dPdx, vec2 dPdy);
-#if 0
/* textureGradOffset */
vec4 textureGradOffset( sampler1D s, float P, float dx, float dy, int off);
ivec4 textureGradOffset(isampler1D s, float P, float dx, float dy, int offset);
@@ -914,7 +907,6 @@ uvec4 textureGradOffset(usampler2DArray s, vec3 P, vec2 dx, vec2 dy, ivec2 off);
float textureGradOffset(sampler1DArrayShadow s, vec3 P, float dx, float dy, int o);
float textureGradOffset(sampler2DArrayShadow s, vec4 P, vec2 dx, vec2 dy, ivec2 o);
-#endif
/* textureProjGrad */
vec4 textureProjGrad( sampler1D sampler, vec2 P, float dPdx, float dPdy);
@@ -938,7 +930,6 @@ uvec4 textureProjGrad(usampler3D sampler, vec4 P, vec3 dPdx, vec3 dPdy);
float textureProjGrad(sampler1DShadow sampler, vec4 P, float dPdx, float dPdy);
float textureProjGrad(sampler2DShadow sampler, vec4 P, vec2 dPdx, vec2 dPdy);
-#if 0
/* textureProjGradOffset */
vec4 textureProjGradOffset( sampler1D s, vec2 P, float dx, float dy, int off);
ivec4 textureProjGradOffset(isampler1D s, vec2 P, float dx, float dy, int off);
@@ -960,7 +951,6 @@ uvec4 textureProjGradOffset(usampler3D s, vec4 P, vec3 dx, vec3 dy, ivec3 off);
float textureProjGradOffset(sampler1DShadow s, vec4 P, float dx, float dy, int o);
float textureProjGradOffset(sampler2DShadow s, vec4 P, vec2 dx, vec2 dy, vec2 o);
-#endif
/*
* The following texture functions are deprecated:
diff --git a/src/glsl/builtins/profiles/OES_texture_3D.frag b/src/glsl/builtins/profiles/OES_texture_3D.frag
new file mode 100644
index 00000000000..b6ebd6a311f
--- /dev/null
+++ b/src/glsl/builtins/profiles/OES_texture_3D.frag
@@ -0,0 +1,7 @@
+#version 100
+#extension GL_OES_texture_3D : enable
+
+vec4 texture3D (sampler3D sampler, vec3 coord);
+vec4 texture3DProj (sampler3D sampler, vec4 coord);
+vec4 texture3D (sampler3D sampler, vec3 coord, float bias);
+vec4 texture3DProj (sampler3D sampler, vec4 coord, float bias);
diff --git a/src/glsl/builtins/profiles/OES_texture_3D.vert b/src/glsl/builtins/profiles/OES_texture_3D.vert
new file mode 100644
index 00000000000..81d12f51e9f
--- /dev/null
+++ b/src/glsl/builtins/profiles/OES_texture_3D.vert
@@ -0,0 +1,7 @@
+#version 100
+#extension GL_OES_texture_3D : enable
+
+vec4 texture3D (sampler3D sampler, vec3 coord);
+vec4 texture3DProj (sampler3D sampler, vec4 coord);
+vec4 texture3DLod (sampler3D sampler, vec3 coord, float lod);
+vec4 texture3DProjLod (sampler3D sampler, vec4 coord, float lod);
diff --git a/src/glsl/builtins/tools/generate_builtins.py b/src/glsl/builtins/tools/generate_builtins.py
index 5ea4b5c48f4..edd3c70e00b 100755
--- a/src/glsl/builtins/tools/generate_builtins.py
+++ b/src/glsl/builtins/tools/generate_builtins.py
@@ -1,16 +1,27 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-
+from __future__ import with_statement
+
import re
+import sys
from glob import glob
from os import path
from subprocess import Popen, PIPE
+from sys import argv
# Local module: generator for texture lookup builtins
from texture_builtins import generate_texture_functions
builtins_dir = path.join(path.dirname(path.abspath(__file__)), "..")
+# Get the path to the standalone GLSL compiler
+if len(argv) != 2:
+ print "Usage:", argv[0], "<path to compiler>"
+ sys.exit(1)
+
+compiler = argv[1]
+
# Read the files in builtins/ir/*...add them to the supplied dictionary.
def read_ir_files(fs):
for filename in glob(path.join(path.join(builtins_dir, 'ir'), '*')):
@@ -47,14 +58,13 @@ def write_function_definitions():
print stringify(v), ';'
def run_compiler(args):
- compiler_path = path.join(path.join(builtins_dir, '..'), 'glsl_compiler')
- command = [compiler_path, '--dump-lir'] + args
+ command = [compiler, '--dump-lir'] + args
p = Popen(command, 1, stdout=PIPE, shell=False)
output = p.communicate()[0]
# Clean up output a bit by killing whitespace before a closing paren.
- kill_paren_whitespace = re.compile(r'[ \n]*\)', re.MULTILINE);
- output = kill_paren_whitespace.sub(')', output);
+ kill_paren_whitespace = re.compile(r'[ \n]*\)', re.MULTILINE)
+ output = kill_paren_whitespace.sub(')', output)
# Also toss any duplicate newlines
output = output.replace('\n\n', '\n')
@@ -69,12 +79,12 @@ def write_profile(filename, profile):
return
# Kill any global variable declarations. We don't want them.
- kill_globals = re.compile(r'^\(declare.*\n', re.MULTILINE);
+ kill_globals = re.compile(r'^\(declare.*\n', re.MULTILINE)
proto_ir = kill_globals.sub('', proto_ir)
# Kill pointer addresses. They're not necessary in prototypes and just
# clutter the diff output.
- proto_ir = re.sub(r'@0x[0-9a-f]+', '', proto_ir);
+ proto_ir = re.sub(r'@0x[0-9a-f]+', '', proto_ir)
print 'static const char prototypes_for_' + profile + '[] ='
print stringify(proto_ir), ';'
@@ -142,6 +152,8 @@ read_builtins(GLenum target, const char *protos, const char **functions, unsigne
{
struct gl_context fakeCtx;
fakeCtx.API = API_OPENGL;
+ fakeCtx.Const.GLSLVersion = 130;
+ fakeCtx.Extensions.ARB_ES2_compatibility = true;
gl_shader *sh = _mesa_new_shader(NULL, 0, target);
struct _mesa_glsl_parse_state *st =
new(sh) _mesa_glsl_parse_state(&fakeCtx, target, sh);
@@ -168,7 +180,7 @@ read_builtins(GLenum target, const char *protos, const char **functions, unsigne
if (st->error) {
printf("error reading builtin: %.35s ...\\n", functions[i]);
printf("Info log:\\n%s\\n", st->info_log);
- talloc_free(sh);
+ ralloc_free(sh);
return NULL;
}
}
@@ -193,14 +205,13 @@ void *builtin_mem_ctx = NULL;
void
_mesa_glsl_release_functions(void)
{
- talloc_free(builtin_mem_ctx);
+ ralloc_free(builtin_mem_ctx);
builtin_mem_ctx = NULL;
memset(builtin_profiles, 0, sizeof(builtin_profiles));
}
static void
_mesa_read_profile(struct _mesa_glsl_parse_state *state,
- exec_list *instructions,
int profile_index,
const char *prototypes,
const char **functions,
@@ -210,7 +221,7 @@ _mesa_read_profile(struct _mesa_glsl_parse_state *state,
if (sh == NULL) {
sh = read_builtins(GL_VERTEX_SHADER, prototypes, functions, count);
- talloc_steal(builtin_mem_ctx, sh);
+ ralloc_steal(builtin_mem_ctx, sh);
builtin_profiles[profile_index] = sh;
}
@@ -219,18 +230,17 @@ _mesa_read_profile(struct _mesa_glsl_parse_state *state,
}
void
-_mesa_glsl_initialize_functions(exec_list *instructions,
- struct _mesa_glsl_parse_state *state)
+_mesa_glsl_initialize_functions(struct _mesa_glsl_parse_state *state)
{
if (builtin_mem_ctx == NULL) {
- builtin_mem_ctx = talloc_init("GLSL built-in functions");
+ builtin_mem_ctx = ralloc_context(NULL); // "GLSL built-in functions"
memset(&builtin_profiles, 0, sizeof(builtin_profiles));
}
state->num_builtins_to_link = 0;
"""
- i=0
+ i = 0
for (filename, profile) in profiles:
if profile.endswith('_vert'):
check = 'state->target == vertex_shader && '
@@ -244,7 +254,7 @@ _mesa_glsl_initialize_functions(exec_list *instructions,
check += 'state->' + version + '_enable'
print ' if (' + check + ') {'
- print ' _mesa_read_profile(state, instructions, %d,' % i
+ print ' _mesa_read_profile(state, %d,' % i
print ' prototypes_for_' + profile + ','
print ' functions_for_' + profile + ','
print ' Elements(functions_for_' + profile + '));'
diff --git a/src/glsl/builtins/tools/texture_builtins.py b/src/glsl/builtins/tools/texture_builtins.py
index 8bf708b5aac..2fbe79010f9 100755
--- a/src/glsl/builtins/tools/texture_builtins.py
+++ b/src/glsl/builtins/tools/texture_builtins.py
@@ -3,6 +3,11 @@
import sys
import StringIO
+# Bitfield constants for the 'variant' argument to generate_sigs
+Proj = 1
+Offset = 2
+Single = 4
+
def vec_type(g, size):
if size == 1:
if g == "i":
@@ -12,16 +17,20 @@ def vec_type(g, size):
return "float"
return g + "vec" + str(size)
-# Get the base dimension - i.e. sampler3D gives 3
-# Array samplers also get +1 here since the layer is really an extra coordinate
-def get_coord_dim(sampler_type):
+# Get the sampler dimension - i.e. sampler3D gives 3
+def get_sampler_dim(sampler_type):
if sampler_type[0].isdigit():
- coord_dim = int(sampler_type[0])
+ sampler_dim = int(sampler_type[0])
elif sampler_type.startswith("Cube"):
- coord_dim = 3
+ sampler_dim = 3
else:
assert False ("coord_dim: invalid sampler_type: " + sampler_type)
+ return sampler_dim
+# Get the coordinate dimension for a given sampler type.
+# Array samplers also get +1 here since the layer is really an extra coordinate
+def get_coord_dim(sampler_type):
+ coord_dim = get_sampler_dim(sampler_type)
if sampler_type.find("Array") != -1:
coord_dim += 1
return coord_dim
@@ -35,18 +44,22 @@ def get_extra_dim(sampler_type, use_proj, unused_fields):
extra_dim += 1
return extra_dim
-def generate_sigs(g, tex_inst, sampler_type, use_proj = False, unused_fields = 0):
+def generate_sigs(g, tex_inst, sampler_type, variant = 0, unused_fields = 0):
coord_dim = get_coord_dim(sampler_type)
- extra_dim = get_extra_dim(sampler_type, use_proj, unused_fields)
+ extra_dim = get_extra_dim(sampler_type, variant & Proj, unused_fields)
+ offset_dim = get_sampler_dim(sampler_type)
+
+ if variant & Single:
+ return_type = "float"
+ else:
+ return_type = g + "vec4"
# Print parameters
- print " (signature " + g + "vec4"
+ print " (signature", return_type
print " (parameters"
print " (declare (in) " + g + "sampler" + sampler_type + " sampler)"
print " (declare (in) " + vec_type("i" if tex_inst == "txf" else "", coord_dim + extra_dim) + " P)",
- if tex_inst == "txb":
- print "\n (declare (in) float bias)",
- elif tex_inst == "txl":
+ if tex_inst == "txl":
print "\n (declare (in) float lod)",
elif tex_inst == "txf":
print "\n (declare (in) int lod)",
@@ -55,7 +68,12 @@ def generate_sigs(g, tex_inst, sampler_type, use_proj = False, unused_fields = 0
print "\n (declare (in) " + grad_type + " dPdx)",
print "\n (declare (in) " + grad_type + " dPdy)",
- print ")\n ((return (" + tex_inst + " (var_ref sampler)",
+ if variant & Offset:
+ print "\n (declare (const_in) " + vec_type("i", offset_dim) + " offset)",
+ if tex_inst == "txb":
+ print "\n (declare (in) float bias)",
+
+ print ")\n ((return (" + tex_inst, return_type, "(var_ref sampler)",
# Coordinate
if extra_dim > 0:
@@ -63,12 +81,14 @@ def generate_sigs(g, tex_inst, sampler_type, use_proj = False, unused_fields = 0
else:
print "(var_ref P)",
- # Offset
- print "(0 0 0)",
+ if variant & Offset:
+ print "(var_ref offset)",
+ else:
+ print "0",
if tex_inst != "txf":
# Projective divisor
- if use_proj:
+ if variant & Proj:
print "(swiz " + "xyzw"[coord_dim + extra_dim-1] + " (var_ref P))",
else:
print "1",
@@ -90,10 +110,10 @@ def generate_sigs(g, tex_inst, sampler_type, use_proj = False, unused_fields = 0
print "((var_ref dPdx) (var_ref dPdy))",
print "))))\n"
-def generate_fiu_sigs(tex_inst, sampler_type, use_proj = False, unused_fields = 0):
- generate_sigs("", tex_inst, sampler_type, use_proj, unused_fields)
- generate_sigs("i", tex_inst, sampler_type, use_proj, unused_fields)
- generate_sigs("u", tex_inst, sampler_type, use_proj, unused_fields)
+def generate_fiu_sigs(tex_inst, sampler_type, variant = 0, unused_fields = 0):
+ generate_sigs("", tex_inst, sampler_type, variant, unused_fields)
+ generate_sigs("i", tex_inst, sampler_type, variant, unused_fields)
+ generate_sigs("u", tex_inst, sampler_type, variant, unused_fields)
def start_function(name):
sys.stdout = StringIO.StringIO()
@@ -117,6 +137,11 @@ def generate_texture_functions(fs):
generate_fiu_sigs("tex", "Cube")
generate_fiu_sigs("tex", "1DArray")
generate_fiu_sigs("tex", "2DArray")
+ generate_sigs("", "tex", "1DShadow", Single, 1);
+ generate_sigs("", "tex", "2DShadow", Single);
+ generate_sigs("", "tex", "CubeShadow", Single);
+ generate_sigs("", "tex", "1DArrayShadow", Single);
+ generate_sigs("", "tex", "2DArrayShadow", Single);
generate_fiu_sigs("txb", "1D")
generate_fiu_sigs("txb", "2D")
@@ -124,20 +149,29 @@ def generate_texture_functions(fs):
generate_fiu_sigs("txb", "Cube")
generate_fiu_sigs("txb", "1DArray")
generate_fiu_sigs("txb", "2DArray")
+ generate_sigs("", "txb", "1DShadow", Single, 1);
+ generate_sigs("", "txb", "2DShadow", Single);
+ generate_sigs("", "txb", "CubeShadow", Single);
+ generate_sigs("", "txb", "1DArrayShadow", Single);
+ generate_sigs("", "txb", "2DArrayShadow", Single);
end_function(fs, "texture")
start_function("textureProj")
- generate_fiu_sigs("tex", "1D", True)
- generate_fiu_sigs("tex", "1D", True, 2)
- generate_fiu_sigs("tex", "2D", True)
- generate_fiu_sigs("tex", "2D", True, 1)
- generate_fiu_sigs("tex", "3D", True)
-
- generate_fiu_sigs("txb", "1D", True)
- generate_fiu_sigs("txb", "1D", True, 2)
- generate_fiu_sigs("txb", "2D", True)
- generate_fiu_sigs("txb", "2D", True, 1)
- generate_fiu_sigs("txb", "3D", True)
+ generate_fiu_sigs("tex", "1D", Proj)
+ generate_fiu_sigs("tex", "1D", Proj, 2)
+ generate_fiu_sigs("tex", "2D", Proj)
+ generate_fiu_sigs("tex", "2D", Proj, 1)
+ generate_fiu_sigs("tex", "3D", Proj)
+ generate_sigs("", "tex", "1DShadow", Proj | Single, 1);
+ generate_sigs("", "tex", "2DShadow", Proj | Single);
+
+ generate_fiu_sigs("txb", "1D", Proj)
+ generate_fiu_sigs("txb", "1D", Proj, 2)
+ generate_fiu_sigs("txb", "2D", Proj)
+ generate_fiu_sigs("txb", "2D", Proj, 1)
+ generate_fiu_sigs("txb", "3D", Proj)
+ generate_sigs("", "txb", "1DShadow", Proj | Single, 1);
+ generate_sigs("", "txb", "2DShadow", Proj | Single);
end_function(fs, "textureProj")
start_function("textureLod")
@@ -147,8 +181,42 @@ def generate_texture_functions(fs):
generate_fiu_sigs("txl", "Cube")
generate_fiu_sigs("txl", "1DArray")
generate_fiu_sigs("txl", "2DArray")
+ generate_sigs("", "txl", "1DShadow", Single, 1);
+ generate_sigs("", "txl", "2DShadow", Single);
+ generate_sigs("", "txl", "1DArrayShadow", Single);
end_function(fs, "textureLod")
+ start_function("textureLodOffset")
+ generate_fiu_sigs("txl", "1D", Offset)
+ generate_fiu_sigs("txl", "2D", Offset)
+ generate_fiu_sigs("txl", "3D", Offset)
+ generate_fiu_sigs("txl", "1DArray", Offset)
+ generate_fiu_sigs("txl", "2DArray", Offset)
+ generate_sigs("", "txl", "1DShadow", Offset | Single, 1);
+ generate_sigs("", "txl", "2DShadow", Offset | Single);
+ generate_sigs("", "txl", "1DArrayShadow", Offset | Single);
+ end_function(fs, "textureLodOffset")
+
+ start_function("textureOffset")
+ generate_fiu_sigs("tex", "1D", Offset)
+ generate_fiu_sigs("tex", "2D", Offset)
+ generate_fiu_sigs("tex", "3D", Offset)
+ generate_fiu_sigs("tex", "1DArray", Offset)
+ generate_fiu_sigs("tex", "2DArray", Offset)
+ generate_sigs("", "tex", "1DShadow", Offset | Single, 1);
+ generate_sigs("", "tex", "2DShadow", Offset | Single);
+ generate_sigs("", "tex", "1DArrayShadow", Offset | Single);
+
+ generate_fiu_sigs("txb", "1D", Offset)
+ generate_fiu_sigs("txb", "2D", Offset)
+ generate_fiu_sigs("txb", "3D", Offset)
+ generate_fiu_sigs("txb", "1DArray", Offset)
+ generate_fiu_sigs("txb", "2DArray", Offset)
+ generate_sigs("", "txb", "1DShadow", Offset | Single, 1);
+ generate_sigs("", "txb", "2DShadow", Offset | Single);
+ generate_sigs("", "txb", "1DArrayShadow", Offset | Single);
+ end_function(fs, "textureOffset")
+
start_function("texelFetch")
generate_fiu_sigs("txf", "1D")
generate_fiu_sigs("txf", "2D")
@@ -157,14 +225,52 @@ def generate_texture_functions(fs):
generate_fiu_sigs("txf", "2DArray")
end_function(fs, "texelFetch")
+ start_function("texelFetchOffset")
+ generate_fiu_sigs("txf", "1D", Offset)
+ generate_fiu_sigs("txf", "2D", Offset)
+ generate_fiu_sigs("txf", "3D", Offset)
+ generate_fiu_sigs("txf", "1DArray", Offset)
+ generate_fiu_sigs("txf", "2DArray", Offset)
+ end_function(fs, "texelFetchOffset")
+
+ start_function("textureProjOffset")
+ generate_fiu_sigs("tex", "1D", Proj | Offset)
+ generate_fiu_sigs("tex", "1D", Proj | Offset, 2)
+ generate_fiu_sigs("tex", "2D", Proj | Offset)
+ generate_fiu_sigs("tex", "2D", Proj | Offset, 1)
+ generate_fiu_sigs("tex", "3D", Proj | Offset)
+ generate_sigs("", "tex", "1DShadow", Proj | Offset | Single, 1);
+ generate_sigs("", "tex", "2DShadow", Proj | Offset | Single);
+
+ generate_fiu_sigs("txb", "1D", Proj | Offset)
+ generate_fiu_sigs("txb", "1D", Proj | Offset, 2)
+ generate_fiu_sigs("txb", "2D", Proj | Offset)
+ generate_fiu_sigs("txb", "2D", Proj | Offset, 1)
+ generate_fiu_sigs("txb", "3D", Proj | Offset)
+ generate_sigs("", "txb", "1DShadow", Proj | Offset | Single, 1);
+ generate_sigs("", "txb", "2DShadow", Proj | Offset | Single);
+ end_function(fs, "textureProjOffset")
+
start_function("textureProjLod")
- generate_fiu_sigs("txl", "1D", True)
- generate_fiu_sigs("txl", "1D", True, 2)
- generate_fiu_sigs("txl", "2D", True)
- generate_fiu_sigs("txl", "2D", True, 1)
- generate_fiu_sigs("txl", "3D", True)
+ generate_fiu_sigs("txl", "1D", Proj)
+ generate_fiu_sigs("txl", "1D", Proj, 2)
+ generate_fiu_sigs("txl", "2D", Proj)
+ generate_fiu_sigs("txl", "2D", Proj, 1)
+ generate_fiu_sigs("txl", "3D", Proj)
+ generate_sigs("", "txl", "1DShadow", Proj | Single, 1);
+ generate_sigs("", "txl", "2DShadow", Proj | Single);
end_function(fs, "textureProjLod")
+ start_function("textureProjLodOffset")
+ generate_fiu_sigs("txl", "1D", Proj | Offset)
+ generate_fiu_sigs("txl", "1D", Proj | Offset, 2)
+ generate_fiu_sigs("txl", "2D", Proj | Offset)
+ generate_fiu_sigs("txl", "2D", Proj | Offset, 1)
+ generate_fiu_sigs("txl", "3D", Proj | Offset)
+ generate_sigs("", "txl", "1DShadow", Proj | Offset | Single, 1);
+ generate_sigs("", "txl", "2DShadow", Proj | Offset | Single);
+ end_function(fs, "textureProjLodOffset")
+
start_function("textureGrad")
generate_fiu_sigs("txd", "1D")
generate_fiu_sigs("txd", "2D")
@@ -172,24 +278,55 @@ def generate_texture_functions(fs):
generate_fiu_sigs("txd", "Cube")
generate_fiu_sigs("txd", "1DArray")
generate_fiu_sigs("txd", "2DArray")
+ generate_sigs("", "txd", "1DShadow", Single, 1);
+ generate_sigs("", "txd", "2DShadow", Single);
+ generate_sigs("", "txd", "CubeShadow", Single);
+ generate_sigs("", "txd", "1DArrayShadow", Single);
+ generate_sigs("", "txd", "2DArrayShadow", Single);
end_function(fs, "textureGrad")
+ start_function("textureGradOffset")
+ generate_fiu_sigs("txd", "1D", Offset)
+ generate_fiu_sigs("txd", "2D", Offset)
+ generate_fiu_sigs("txd", "3D", Offset)
+ generate_fiu_sigs("txd", "Cube", Offset)
+ generate_fiu_sigs("txd", "1DArray", Offset)
+ generate_fiu_sigs("txd", "2DArray", Offset)
+ generate_sigs("", "txd", "1DShadow", Offset | Single, 1);
+ generate_sigs("", "txd", "2DShadow", Offset | Single);
+ generate_sigs("", "txd", "1DArrayShadow", Offset | Single);
+ generate_sigs("", "txd", "2DArrayShadow", Offset | Single);
+ end_function(fs, "textureGradOffset")
+
start_function("textureProjGrad")
- generate_fiu_sigs("txd", "1D", True)
- generate_fiu_sigs("txd", "1D", True, 2)
- generate_fiu_sigs("txd", "2D", True)
- generate_fiu_sigs("txd", "2D", True, 1)
- generate_fiu_sigs("txd", "3D", True)
+ generate_fiu_sigs("txd", "1D", Proj)
+ generate_fiu_sigs("txd", "1D", Proj, 2)
+ generate_fiu_sigs("txd", "2D", Proj)
+ generate_fiu_sigs("txd", "2D", Proj, 1)
+ generate_fiu_sigs("txd", "3D", Proj)
+ generate_sigs("", "txd", "1DShadow", Proj | Single, 1);
+ generate_sigs("", "txd", "2DShadow", Proj | Single);
end_function(fs, "textureProjGrad")
+ start_function("textureProjGradOffset")
+ generate_fiu_sigs("txd", "1D", Proj | Offset)
+ generate_fiu_sigs("txd", "1D", Proj | Offset, 2)
+ generate_fiu_sigs("txd", "2D", Proj | Offset)
+ generate_fiu_sigs("txd", "2D", Proj | Offset, 1)
+ generate_fiu_sigs("txd", "3D", Proj | Offset)
+ generate_sigs("", "txd", "1DShadow", Proj | Offset | Single, 1);
+ generate_sigs("", "txd", "2DShadow", Proj | Offset | Single);
+ end_function(fs, "textureProjGradOffset")
+
+
# ARB_texture_rectangle extension
start_function("texture2DRect")
generate_sigs("", "tex", "2DRect")
end_function(fs, "texture2DRect")
start_function("texture2DRectProj")
- generate_sigs("", "tex", "2DRect", True)
- generate_sigs("", "tex", "2DRect", True, 1)
+ generate_sigs("", "tex", "2DRect", Proj)
+ generate_sigs("", "tex", "2DRect", Proj, 1)
end_function(fs, "texture2DRectProj")
start_function("shadow2DRect")
@@ -197,7 +334,7 @@ def generate_texture_functions(fs):
end_function(fs, "shadow2DRect")
start_function("shadow2DRectProj")
- generate_sigs("", "tex", "2DRectShadow", True)
+ generate_sigs("", "tex", "2DRectShadow", Proj)
end_function(fs, "shadow2DRectProj")
# EXT_texture_array extension
@@ -243,15 +380,15 @@ def generate_texture_functions(fs):
end_function(fs, "texture1DLod")
start_function("texture1DProj")
- generate_sigs("", "tex", "1D", True)
- generate_sigs("", "tex", "1D", True, 2)
- generate_sigs("", "txb", "1D", True)
- generate_sigs("", "txb", "1D", True, 2)
+ generate_sigs("", "tex", "1D", Proj)
+ generate_sigs("", "tex", "1D", Proj, 2)
+ generate_sigs("", "txb", "1D", Proj)
+ generate_sigs("", "txb", "1D", Proj, 2)
end_function(fs, "texture1DProj")
start_function("texture1DProjLod")
- generate_sigs("", "txl", "1D", True)
- generate_sigs("", "txl", "1D", True, 2)
+ generate_sigs("", "txl", "1D", Proj)
+ generate_sigs("", "txl", "1D", Proj, 2)
end_function(fs, "texture1DProjLod")
start_function("texture2D")
@@ -264,15 +401,15 @@ def generate_texture_functions(fs):
end_function(fs, "texture2DLod")
start_function("texture2DProj")
- generate_sigs("", "tex", "2D", True)
- generate_sigs("", "tex", "2D", True, 1)
- generate_sigs("", "txb", "2D", True)
- generate_sigs("", "txb", "2D", True, 1)
+ generate_sigs("", "tex", "2D", Proj)
+ generate_sigs("", "tex", "2D", Proj, 1)
+ generate_sigs("", "txb", "2D", Proj)
+ generate_sigs("", "txb", "2D", Proj, 1)
end_function(fs, "texture2DProj")
start_function("texture2DProjLod")
- generate_sigs("", "txl", "2D", True)
- generate_sigs("", "txl", "2D", True, 1)
+ generate_sigs("", "txl", "2D", Proj)
+ generate_sigs("", "txl", "2D", Proj, 1)
end_function(fs, "texture2DProjLod")
start_function("texture3D")
@@ -285,12 +422,12 @@ def generate_texture_functions(fs):
end_function(fs, "texture3DLod")
start_function("texture3DProj")
- generate_sigs("", "tex", "3D", True)
- generate_sigs("", "txb", "3D", True)
+ generate_sigs("", "tex", "3D", Proj)
+ generate_sigs("", "txb", "3D", Proj)
end_function(fs, "texture3DProj")
start_function("texture3DProjLod")
- generate_sigs("", "txl", "3D", True)
+ generate_sigs("", "txl", "3D", Proj)
end_function(fs, "texture3DProjLod")
start_function("textureCube")
@@ -312,12 +449,12 @@ def generate_texture_functions(fs):
end_function(fs, "shadow1DLod")
start_function("shadow1DProj")
- generate_sigs("", "tex", "1DShadow", True, 1)
- generate_sigs("", "txb", "1DShadow", True, 1)
+ generate_sigs("", "tex", "1DShadow", Proj, 1)
+ generate_sigs("", "txb", "1DShadow", Proj, 1)
end_function(fs, "shadow1DProj")
start_function("shadow1DProjLod")
- generate_sigs("", "txl", "1DShadow", True, 1)
+ generate_sigs("", "txl", "1DShadow", Proj, 1)
end_function(fs, "shadow1DProjLod")
start_function("shadow2D")
@@ -330,12 +467,12 @@ def generate_texture_functions(fs):
end_function(fs, "shadow2DLod")
start_function("shadow2DProj")
- generate_sigs("", "tex", "2DShadow", True)
- generate_sigs("", "txb", "2DShadow", True)
+ generate_sigs("", "tex", "2DShadow", Proj)
+ generate_sigs("", "txb", "2DShadow", Proj)
end_function(fs, "shadow2DProj")
start_function("shadow2DProjLod")
- generate_sigs("", "txl", "2DShadow", True)
+ generate_sigs("", "txl", "2DShadow", Proj)
end_function(fs, "shadow2DProjLod")
sys.stdout = sys.__stdout__
@@ -346,4 +483,4 @@ if __name__ == "__main__":
fs = {}
generate_texture_functions(fs);
for k, v in fs.iteritems():
- print v
+ print v
diff --git a/src/glsl/configure.ac b/src/glsl/configure.ac
deleted file mode 100644
index 73ce67de3d1..00000000000
--- a/src/glsl/configure.ac
+++ /dev/null
@@ -1,69 +0,0 @@
-# -*- Autoconf -*-
-# Process this file with autoconf to produce a configure script.
-
-AC_PREREQ(2.61)
-AC_INIT(glsl, XXXXX, idr@freedesktop.org, glsl)
-AC_CONFIG_SRCDIR([Makefile.am])
-AM_CONFIG_HEADER([config.h])
-AC_CONFIG_FILES([glcpp/Makefile])
-
-AM_INIT_AUTOMAKE
-LT_INIT
-
-AM_MAINTAINER_MODE
-
-# Checks for programs.
-AC_PROG_CXX
-AC_PROG_CC
-AC_PROG_MAKE_SET
-AC_PROG_YACC
-AC_PROG_LEX
-
-m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
-
-# Checks for libraries.
-
-# Checks for header files.
-
-# Checks for typedefs, structures, and compiler characteristics.
-
-# Checks for library functions.
-AC_HEADER_STDC
-
-AH_TOP([#ifndef GLSL_CONFIG_H
-#define GLSL_CONFIG_H])
-AH_BOTTOM([#endif /* GLSL_CONFIG_H */])
-
-PKG_CHECK_MODULES([talloc], [talloc >= 2.0])
-
-AC_ARG_ENABLE([debug],
- [AS_HELP_STRING([--enable-debug],
- [use debug compiler flags and macros @<:@default=disabled@:>@])],
- [enable_debug="$enableval"],
- [enable_debug=no]
-)
-if test "x$enable_debug" = xyes; then
- DEFINES="$DEFINES -DDEBUG"
- if test "x$GCC" = xyes; then
- # Remove any -g or -O flags from the command line
- CFLAGS=[`echo $CFLAGS | sed 's/-g[^ \t]*[ \t]*//g;s/-O[^ \t]*[ \t]*//g'`]
- CFLAGS="$CFLAGS -O0 -ggdb3 -fstack-protector -D_FORTIFY_SOURCE=2"
- fi
- if test "x$GXX" = xyes; then
- # Remove any -g flags from the command line
- CXXFLAGS=[`echo $CXXFLAGS | sed 's/-g[^ \t]*[ \t]*//g;s/-O[^ \t]*[ \t]*//g'`]
- CXXFLAGS="$CXXFLAGS -O0 -ggdb3 -fstack-protector -D_FORTIFY_SOURCE=2"
- fi
-fi
-
-if test "x$GXX" = xyes ; then
- WARN="-Wall -Wextra -Wunsafe-loop-optimizations -Wstack-protector"
-else
- WARN=""
-fi
-
-CFLAGS="$CFLAGS $WARN"
-CXXFLAGS="$CXXFLAGS $WARN"
-YFLAGS="-d -v"
-
-AC_OUTPUT([Makefile])
diff --git a/src/glsl/glcpp/.gitignore b/src/glsl/glcpp/.gitignore
index dbc37e1926d..fb0be2065b4 100644
--- a/src/glsl/glcpp/.gitignore
+++ b/src/glsl/glcpp/.gitignore
@@ -1,5 +1,8 @@
glcpp
+glcpp-lex.c
glcpp-parse.output
+glcpp-parse.c
+glcpp-parse.h
*.o
*.lo
*.la
diff --git a/src/glsl/glcpp/Makefile.am b/src/glsl/glcpp/Makefile.am
deleted file mode 100644
index 81147e6e12c..00000000000
--- a/src/glsl/glcpp/Makefile.am
+++ /dev/null
@@ -1,44 +0,0 @@
-# Copyright © 2010 Intel Corporation
-# All Rights Reserved.
-#
-# Permission is hereby granted, free of charge, to any person obtaining a
-# copy of this software and associated documentation files (the "Software"),
-# to deal in the Software without restriction, including without limitation
-# on the rights to use, copy, modify, merge, publish, distribute, 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
-# AUTHORS, COPYRIGHT HOLDERS, AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM,
-# DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
-# OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
-# USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-noinst_LTLIBRARIES = libglcpp.la
-libglcpp_la_SOURCES = \
- glcpp-lex.l \
- glcpp-parse.y \
- glcpp.h \
- pp.c
-
-BUILT_SOURCES = glcpp-parse.h glcpp-parse.c glcpp-lex.c
-CLEANFILES = $(BUILT_SOURCES)
-
-glcpp-parse.h: glcpp-parse.c
-
-bin_PROGRAMS = glcpp
-glcpp_LDADD = libglcpp.la
-glcpp_LDFLAGS = @LDFLAGS@ $(talloc_LIBS)
-glcpp_SOURCES = glcpp.c
-
-.l.c:
- $(LEXCOMPILE) --outfile="$@" $<
-
-test: glcpp
- @(cd tests; ./glcpp-test)
diff --git a/src/glsl/glcpp/glcpp-lex.c b/src/glsl/glcpp/glcpp-lex.c
index 156af3008c0..34605598822 100644
--- a/src/glsl/glcpp/glcpp-lex.c
+++ b/src/glsl/glcpp/glcpp-lex.c
@@ -54,7 +54,6 @@ typedef int flex_int32_t;
typedef unsigned char flex_uint8_t;
typedef unsigned short int flex_uint16_t;
typedef unsigned int flex_uint32_t;
-#endif /* ! C99 */
/* Limits of integral types. */
#ifndef INT8_MIN
@@ -85,6 +84,8 @@ typedef unsigned int flex_uint32_t;
#define UINT32_MAX (4294967295U)
#endif
+#endif /* ! C99 */
+
#endif /* ! FLEXINT_H */
#ifdef __cplusplus
@@ -158,7 +159,15 @@ typedef void* yyscan_t;
/* Size of default input buffer. */
#ifndef YY_BUF_SIZE
+#ifdef __ia64__
+/* On IA-64, the buffer size is 16k, not 8k.
+ * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
+ * Ditto for the __ia64__ case accordingly.
+ */
+#define YY_BUF_SIZE 32768
+#else
#define YY_BUF_SIZE 16384
+#endif /* __ia64__ */
#endif
/* The state buf must be large enough to hold one state per character in the main buffer.
@@ -358,45 +367,43 @@ struct yy_trans_info
flex_int32_t yy_verify;
flex_int32_t yy_nxt;
};
-static yyconst flex_int16_t yy_acclist[137] =
+static yyconst flex_int16_t yy_acclist[125] =
{ 0,
3, 3, 44, 39, 43, 40, 43, 41, 43, 43,
38, 43, 43, 38, 43, 38, 43, 38, 43, 25,
39, 43, 24, 39, 43, 38, 43, 38, 43, 38,
43, 37, 39, 43, 37, 39, 43, 38, 43, 40,
- 43, 23, 43, 43, 3, 43, 4, 43, 5, 43,
- 42, 43, 39, 18, 40, 32, 35, 33, 2, 1,
- 25, 39, 25, 39, 39, 24, 39, 24, 39, 27,
- 29, 31, 30, 28, 37, 39, 37, 39, 34, 40,
- 23, 23, 3, 4, 5, 6, 5, 7, 1, 26,
- 39, 37, 39,16398, 26, 39, 37, 39, 18, 37,
-
- 39,16399,16400, 8206, 18, 8206, 37, 39, 8207, 18,
- 8208, 18,16401, 19,16396, 22, 36, 37, 39, 21,
- 8209, 18, 19, 8204, 18,16397,16404, 8205, 18, 11,
- 18, 9, 8, 8212, 10, 18
+ 43, 23, 43, 3, 43, 4, 43, 5, 43, 42,
+ 43, 18, 43, 18, 43, 18, 43, 39, 40, 32,
+ 35, 33, 2, 1, 25, 39, 25, 39, 39, 24,
+ 39, 24, 39, 27, 29, 31, 30, 28, 37, 39,
+ 37, 39, 34, 40, 23, 23, 3, 4, 5, 6,
+ 5, 7, 1, 26, 39, 37, 39, 26, 39, 37,
+
+ 39, 14, 37, 39, 15, 16, 37, 39, 17, 19,
+ 12, 22, 36, 37, 39, 21, 19, 13,16404, 11,
+ 9, 8, 8212, 10
} ;
-static yyconst flex_int16_t yy_accept[164] =
+static yyconst flex_int16_t yy_accept[155] =
{ 0,
- 1, 1, 1, 1, 1, 2, 3, 3, 3, 4,
- 6, 8, 10, 11, 13, 14, 16, 18, 20, 23,
- 26, 28, 30, 32, 35, 38, 40, 42, 44, 45,
- 47, 49, 51, 53, 54, 54, 55, 56, 57, 58,
- 59, 60, 61, 63, 65, 66, 68, 70, 71, 72,
- 73, 74, 75, 77, 79, 80, 81, 82, 83, 83,
- 83, 83, 83, 83, 83, 83, 84, 85, 86, 87,
- 88, 89, 90, 92, 94, 94, 94, 94, 94, 94,
- 95, 95, 95, 95, 95, 97, 99, 99, 99, 99,
- 99, 99, 99, 99, 100, 100, 100, 100, 100, 100,
-
- 100, 102, 102, 103, 104, 104, 104, 104, 104, 106,
- 106, 107, 107, 107, 107, 107, 107, 107, 109, 109,
- 109, 111, 111, 113, 114, 115, 115, 116, 116, 116,
- 116, 117, 117, 120, 121, 121, 123, 124, 124, 124,
- 126, 127, 127, 127, 127, 128, 128, 128, 130, 130,
- 132, 132, 133, 134, 134, 134, 134, 135, 135, 135,
- 137, 137, 137
+ 1, 1, 1, 1, 1, 2, 3, 3, 3, 3,
+ 3, 4, 6, 8, 10, 11, 13, 14, 16, 18,
+ 20, 23, 26, 28, 30, 32, 35, 38, 40, 42,
+ 44, 46, 48, 50, 52, 54, 56, 58, 59, 60,
+ 61, 62, 63, 64, 65, 67, 69, 70, 72, 74,
+ 75, 76, 77, 78, 79, 81, 83, 84, 85, 86,
+ 87, 87, 87, 87, 87, 87, 87, 87, 88, 89,
+ 90, 91, 92, 93, 93, 93, 93, 93, 94, 96,
+ 98, 98, 98, 98, 98, 98, 98, 98, 98, 98,
+ 98, 100, 102, 102, 102, 102, 102, 102, 102, 103,
+
+ 103, 103, 103, 103, 103, 103, 105, 105, 106, 107,
+ 107, 107, 107, 107, 107, 107, 107, 107, 107, 109,
+ 109, 110, 111, 111, 112, 112, 112, 112, 113, 113,
+ 116, 117, 118, 118, 119, 119, 119, 119, 120, 120,
+ 120, 121, 121, 122, 123, 123, 123, 123, 124, 124,
+ 124, 125, 125, 125
} ;
static yyconst flex_int32_t yy_ec[256] =
@@ -433,198 +440,144 @@ static yyconst flex_int32_t yy_ec[256] =
static yyconst flex_int32_t yy_meta[40] =
{ 0,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 2,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1
+ 1, 2, 3, 4, 4, 4, 4, 4, 5, 6,
+ 4, 7, 7, 7, 4, 4, 4, 8, 8, 8,
+ 8, 8, 9, 8, 8, 8, 8, 8, 8, 9,
+ 8, 8, 8, 8, 8, 8, 8, 8, 4
} ;
-static yyconst flex_int16_t yy_base[182] =
+static yyconst flex_int16_t yy_base[168] =
{ 0,
- 0, 38, 0, 0, 38, 39, 499, 498, 500, 48,
- 43, 552, 496, 44, 63, 495, 59, 65, 87, 125,
- 58, 67, 68, 164, 203, 40, 75, 241, 552, 494,
- 552, 140, 552, 140, 493, 552, 144, 492, 491, 487,
- 486, 485, 156, 179, 267, 0, 209, 472, 471, 470,
- 469, 468, 446, 124, 466, 153, 462, 458, 154, 198,
- 159, 155, 183, 160, 193, 460, 552, 222, 552, 227,
- 552, 459, 204, 161, 231, 232, 238, 243, 236, 303,
- 245, 180, 247, 249, 281, 56, 257, 271, 248, 259,
- 252, 264, 455, 454, 297, 299, 312, 313, 320, 294,
-
- 407, 295, 427, 426, 321, 296, 324, 425, 552, 424,
- 552, 327, 329, 195, 328, 331, 332, 230, 334, 378,
- 552, 377, 552, 371, 370, 335, 365, 337, 358, 342,
- 360, 344, 326, 255, 340, 552, 260, 338, 246, 552,
- 197, 364, 192, 352, 382, 348, 186, 552, 420, 552,
- 423, 184, 141, 437, 421, 447, 79, 476, 346, 552,
- 453, 552, 515, 517, 519, 521, 523, 525, 71, 527,
- 529, 531, 533, 535, 537, 539, 541, 543, 545, 547,
- 549
+ 0, 38, 0, 0, 38, 39, 328, 327, 326, 44,
+ 328, 0, 325, 332, 332, 310, 319, 332, 316, 41,
+ 41, 44, 44, 307, 49, 321, 44, 282, 61, 79,
+ 317, 332, 72, 332, 332, 67, 68, 0, 317, 332,
+ 332, 332, 332, 0, 34, 0, 105, 0, 0, 332,
+ 332, 332, 332, 332, 317, 73, 332, 82, 311, 310,
+ 291, 61, 289, 286, 279, 281, 286, 306, 332, 90,
+ 332, 94, 332, 84, 85, 108, 48, 0, 88, 95,
+ 283, 86, 284, 273, 270, 91, 274, 281, 279, 268,
+ 0, 124, 273, 274, 274, 270, 265, 271, 332, 267,
+
+ 264, 262, 259, 260, 249, 125, 245, 332, 332, 241,
+ 229, 231, 223, 209, 222, 194, 197, 194, 130, 196,
+ 332, 0, 181, 332, 189, 131, 191, 332, 181, 210,
+ 162, 0, 136, 332, 134, 0, 130, 155, 111, 138,
+ 332, 153, 0, 332, 125, 41, 156, 332, 34, 136,
+ 332, 159, 332, 173, 182, 191, 200, 209, 218, 227,
+ 236, 245, 254, 263, 272, 280, 285
} ;
-static yyconst flex_int16_t yy_def[182] =
+static yyconst flex_int16_t yy_def[168] =
{ 0,
- 162, 1, 163, 163, 164, 164, 165, 165, 162, 166,
- 167, 162, 167, 167, 167, 167, 167, 167, 162, 166,
- 167, 167, 167, 168, 168, 167, 167, 167, 162, 169,
- 162, 170, 162, 20, 167, 162, 167, 167, 167, 167,
- 167, 171, 19, 20, 20, 20, 20, 167, 167, 167,
- 167, 167, 25, 25, 167, 167, 28, 28, 167, 167,
- 167, 167, 167, 167, 167, 169, 162, 170, 162, 170,
- 162, 171, 45, 25, 167, 167, 167, 167, 167, 167,
- 167, 167, 167, 167, 20, 25, 167, 167, 167, 167,
- 167, 167, 172, 173, 167, 167, 167, 167, 167, 167,
-
- 25, 167, 174, 175, 167, 167, 167, 172, 162, 173,
- 162, 167, 167, 167, 167, 167, 167, 25, 167, 174,
- 162, 175, 162, 176, 177, 167, 178, 167, 167, 167,
- 167, 167, 25, 167, 176, 162, 177, 167, 178, 162,
- 179, 167, 180, 167, 162, 167, 179, 162, 167, 162,
- 167, 180, 167, 181, 167, 167, 167, 181, 167, 162,
- 167, 0, 162, 162, 162, 162, 162, 162, 162, 162,
- 162, 162, 162, 162, 162, 162, 162, 162, 162, 162,
- 162
+ 153, 1, 154, 154, 155, 155, 156, 156, 157, 157,
+ 153, 158, 153, 153, 153, 153, 153, 153, 153, 153,
+ 158, 158, 153, 153, 153, 159, 159, 153, 153, 153,
+ 160, 153, 161, 153, 153, 153, 153, 158, 153, 153,
+ 153, 153, 153, 162, 21, 158, 158, 22, 158, 153,
+ 153, 153, 153, 153, 159, 159, 153, 153, 30, 30,
+ 153, 153, 153, 153, 153, 153, 153, 160, 153, 161,
+ 153, 161, 153, 153, 153, 153, 153, 162, 47, 159,
+ 153, 153, 153, 153, 153, 163, 153, 153, 153, 153,
+ 158, 159, 153, 153, 153, 153, 153, 153, 153, 153,
+
+ 153, 153, 153, 153, 153, 159, 153, 153, 153, 153,
+ 153, 153, 153, 153, 153, 153, 153, 153, 159, 153,
+ 153, 164, 153, 153, 153, 153, 153, 153, 153, 159,
+ 153, 164, 153, 153, 153, 165, 153, 166, 153, 153,
+ 153, 153, 165, 153, 167, 153, 153, 153, 167, 153,
+ 153, 153, 0, 153, 153, 153, 153, 153, 153, 153,
+ 153, 153, 153, 153, 153, 153, 153
} ;
-static yyconst flex_int16_t yy_nxt[592] =
+static yyconst flex_int16_t yy_nxt[372] =
{ 0,
- 10, 11, 12, 13, 14, 15, 16, 17, 16, 16,
- 18, 19, 20, 20, 21, 22, 23, 24, 24, 24,
- 24, 24, 25, 24, 24, 24, 24, 24, 24, 24,
- 24, 24, 24, 24, 24, 24, 24, 24, 26, 27,
- 31, 31, 36, 28, 37, 36, 36, 32, 32, 35,
- 36, 35, 35, 35, 35, 35, 35, 35, 35, 38,
- 36, 36, 35, 35, 35, 36, 40, 36, 39, 36,
- 36, 66, 48, 49, 41, 42, 56, 36, 55, 53,
- 57, 36, 50, 51, 52, 101, 35, 34, 35, 36,
- 35, 35, 35, 35, 35, 35, 35, 35, 43, 43,
-
- 34, 35, 35, 35, 34, 34, 44, 45, 34, 34,
- 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
- 34, 34, 44, 34, 45, 35, 35, 36, 35, 35,
- 35, 35, 35, 35, 35, 35, 46, 46, 46, 35,
- 35, 35, 69, 36, 47, 37, 36, 53, 74, 70,
- 71, 34, 34, 34, 56, 36, 36, 36, 57, 34,
- 47, 36, 36, 35, 34, 35, 36, 35, 35, 35,
- 35, 35, 35, 35, 35, 34, 34, 75, 35, 35,
- 35, 81, 36, 80, 53, 36, 36, 86, 148, 83,
- 34, 34, 34, 34, 36, 36, 129, 36, 34, 148,
-
- 36, 98, 35, 34, 35, 36, 35, 35, 35, 35,
- 35, 35, 35, 35, 34, 82, 84, 35, 35, 35,
- 34, 34, 34, 85, 69, 76, 54, 77, 34, 69,
- 78, 162, 162, 36, 36, 79, 70, 71, 36, 85,
- 36, 35, 58, 36, 34, 36, 39, 36, 140, 36,
- 36, 36, 133, 53, 36, 87, 145, 36, 88, 36,
- 90, 36, 36, 59, 60, 89, 36, 61, 62, 99,
- 92, 104, 63, 36, 97, 91, 64, 65, 73, 73,
- 73, 100, 106, 102, 73, 105, 34, 107, 73, 73,
- 73, 73, 34, 34, 34, 103, 36, 36, 36, 36,
-
- 34, 36, 34, 93, 93, 94, 93, 93, 93, 93,
- 93, 93, 93, 93, 36, 36, 34, 93, 93, 93,
- 112, 113, 36, 36, 119, 95, 36, 117, 125, 36,
- 36, 36, 96, 36, 36, 114, 36, 36, 115, 36,
- 36, 93, 136, 116, 36, 124, 36, 159, 160, 53,
- 36, 127, 128, 126, 36, 131, 130, 134, 132, 129,
- 36, 141, 36, 143, 146, 149, 150, 140, 138, 142,
- 142, 142, 36, 136, 144, 151, 151, 151, 155, 123,
- 121, 153, 35, 145, 36, 35, 35, 35, 35, 35,
- 35, 35, 35, 35, 35, 35, 35, 35, 35, 154,
-
- 154, 154, 154, 154, 154, 154, 154, 154, 154, 154,
- 154, 154, 154, 154, 154, 154, 154, 154, 154, 154,
- 35, 149, 150, 36, 149, 150, 111, 109, 123, 121,
- 118, 156, 156, 156, 151, 151, 151, 35, 35, 36,
- 35, 35, 35, 35, 35, 157, 35, 35, 159, 160,
- 143, 35, 35, 35, 159, 160, 111, 109, 161, 161,
- 161, 36, 67, 35, 161, 161, 161, 35, 36, 53,
- 36, 36, 36, 36, 36, 35, 35, 35, 36, 35,
- 35, 35, 35, 35, 157, 35, 35, 36, 36, 36,
- 35, 35, 35, 36, 36, 36, 67, 36, 36, 162,
-
- 29, 29, 162, 162, 162, 162, 162, 162, 162, 162,
- 162, 162, 162, 162, 35, 29, 29, 30, 30, 33,
- 33, 34, 34, 35, 35, 53, 53, 68, 68, 72,
- 72, 108, 108, 110, 110, 120, 120, 122, 122, 135,
- 135, 137, 137, 139, 139, 147, 147, 152, 152, 158,
- 158, 9, 162, 162, 162, 162, 162, 162, 162, 162,
- 162, 162, 162, 162, 162, 162, 162, 162, 162, 162,
- 162, 162, 162, 162, 162, 162, 162, 162, 162, 162,
- 162, 162, 162, 162, 162, 162, 162, 162, 162, 162,
- 162
-
+ 12, 13, 14, 15, 16, 17, 18, 19, 18, 18,
+ 20, 21, 22, 22, 23, 24, 25, 26, 26, 26,
+ 26, 26, 27, 26, 26, 26, 26, 26, 26, 26,
+ 26, 26, 26, 26, 26, 26, 26, 26, 28, 29,
+ 32, 32, 148, 30, 38, 36, 14, 33, 33, 37,
+ 43, 44, 45, 45, 38, 48, 48, 48, 50, 51,
+ 46, 47, 58, 49, 53, 54, 59, 56, 74, 76,
+ 136, 38, 75, 38, 71, 82, 46, 83, 47, 49,
+ 60, 72, 73, 58, 41, 74, 76, 59, 82, 75,
+ 83, 77, 71, 84, 63, 38, 71, 80, 85, 153,
+
+ 153, 61, 62, 72, 73, 63, 64, 91, 77, 76,
+ 65, 63, 94, 100, 66, 67, 79, 79, 79, 95,
+ 101, 92, 79, 91, 38, 38, 79, 79, 79, 79,
+ 38, 77, 126, 148, 63, 140, 141, 150, 151, 140,
+ 141, 146, 135, 135, 135, 142, 142, 142, 119, 147,
+ 147, 147, 130, 106, 140, 141, 138, 150, 151, 144,
+ 150, 151, 139, 138, 142, 142, 142, 152, 152, 152,
+ 152, 152, 152, 15, 15, 15, 15, 15, 15, 15,
+ 15, 15, 31, 31, 31, 31, 31, 31, 31, 31,
+ 31, 34, 34, 34, 34, 34, 34, 34, 34, 34,
+
+ 35, 35, 35, 35, 35, 35, 35, 35, 35, 38,
+ 38, 137, 136, 134, 133, 38, 38, 38, 55, 131,
+ 129, 128, 127, 126, 55, 55, 55, 68, 68, 68,
+ 68, 68, 125, 68, 68, 68, 70, 70, 70, 70,
+ 70, 70, 70, 70, 70, 78, 78, 124, 78, 78,
+ 78, 78, 78, 78, 99, 99, 99, 99, 99, 99,
+ 123, 122, 99, 132, 132, 121, 132, 132, 132, 132,
+ 132, 132, 143, 143, 120, 143, 143, 143, 143, 143,
+ 143, 145, 118, 117, 116, 115, 114, 145, 145, 149,
+ 113, 149, 149, 149, 112, 111, 110, 109, 108, 107,
+
+ 105, 104, 103, 102, 98, 97, 96, 93, 69, 90,
+ 89, 88, 87, 86, 81, 153, 153, 38, 39, 69,
+ 57, 38, 52, 42, 41, 40, 39, 153, 14, 15,
+ 15, 11, 153, 153, 153, 153, 153, 153, 153, 153,
+ 153, 153, 153, 153, 153, 153, 153, 153, 153, 153,
+ 153, 153, 153, 153, 153, 153, 153, 153, 153, 153,
+ 153, 153, 153, 153, 153, 153, 153, 153, 153, 153,
+ 153
} ;
-static yyconst flex_int16_t yy_chk[592] =
+static yyconst flex_int16_t yy_chk[372] =
{ 0,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 2,
- 5, 6, 26, 2, 11, 11, 14, 5, 6, 10,
- 10, 10, 10, 10, 10, 10, 10, 10, 10, 14,
- 21, 17, 10, 10, 10, 15, 17, 18, 15, 22,
- 23, 169, 21, 21, 18, 18, 27, 27, 26, 86,
- 27, 157, 22, 23, 23, 86, 10, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
-
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 20, 20, 20, 20,
- 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
- 20, 20, 32, 153, 20, 37, 37, 54, 54, 32,
- 32, 34, 34, 34, 56, 56, 59, 62, 56, 34,
- 20, 61, 64, 20, 24, 24, 24, 24, 24, 24,
- 24, 24, 24, 24, 24, 34, 43, 59, 24, 24,
- 24, 62, 82, 61, 74, 63, 152, 74, 147, 64,
- 44, 44, 44, 43, 143, 65, 114, 114, 44, 141,
-
- 60, 82, 24, 25, 25, 25, 25, 25, 25, 25,
- 25, 25, 25, 25, 44, 63, 65, 25, 25, 25,
- 47, 47, 47, 73, 68, 60, 25, 60, 47, 70,
- 60, 68, 68, 75, 76, 60, 70, 70, 79, 73,
- 77, 25, 28, 28, 47, 78, 28, 81, 139, 83,
- 89, 84, 118, 118, 91, 75, 134, 134, 76, 87,
- 77, 90, 137, 28, 28, 76, 92, 28, 28, 83,
- 79, 89, 28, 88, 81, 78, 28, 28, 45, 45,
- 45, 84, 91, 87, 45, 90, 45, 92, 45, 45,
- 45, 45, 85, 85, 85, 88, 100, 102, 106, 95,
-
- 85, 96, 45, 80, 80, 80, 80, 80, 80, 80,
- 80, 80, 80, 80, 97, 98, 85, 80, 80, 80,
- 95, 96, 99, 105, 102, 80, 107, 100, 106, 112,
- 115, 113, 80, 116, 117, 97, 119, 126, 98, 128,
- 138, 80, 135, 99, 130, 105, 132, 159, 159, 133,
- 146, 112, 113, 107, 144, 116, 115, 119, 117, 129,
- 129, 128, 131, 130, 138, 142, 142, 127, 126, 129,
- 129, 129, 125, 124, 132, 142, 142, 142, 146, 122,
- 120, 144, 145, 145, 145, 145, 145, 145, 145, 145,
- 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
-
- 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
- 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
- 145, 149, 149, 155, 151, 151, 110, 108, 104, 103,
- 101, 149, 149, 149, 151, 151, 151, 154, 154, 154,
- 154, 154, 154, 154, 154, 154, 154, 154, 156, 156,
- 155, 154, 154, 154, 161, 161, 94, 93, 156, 156,
- 156, 72, 66, 58, 161, 161, 161, 57, 55, 53,
- 52, 51, 50, 49, 48, 154, 158, 158, 158, 158,
- 158, 158, 158, 158, 158, 158, 158, 42, 41, 40,
- 158, 158, 158, 39, 38, 35, 30, 16, 13, 9,
-
- 8, 7, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 158, 163, 163, 164, 164, 165,
- 165, 166, 166, 167, 167, 168, 168, 170, 170, 171,
- 171, 172, 172, 173, 173, 174, 174, 175, 175, 176,
- 176, 177, 177, 178, 178, 179, 179, 180, 180, 181,
- 181, 162, 162, 162, 162, 162, 162, 162, 162, 162,
- 162, 162, 162, 162, 162, 162, 162, 162, 162, 162,
- 162, 162, 162, 162, 162, 162, 162, 162, 162, 162,
- 162, 162, 162, 162, 162, 162, 162, 162, 162, 162,
- 162
-
+ 5, 6, 149, 2, 27, 10, 10, 5, 6, 10,
+ 20, 20, 21, 21, 45, 22, 22, 22, 23, 23,
+ 21, 21, 29, 22, 25, 25, 29, 27, 36, 37,
+ 146, 45, 36, 56, 33, 77, 21, 77, 21, 22,
+ 30, 33, 33, 58, 30, 74, 75, 58, 62, 74,
+ 62, 37, 70, 62, 37, 80, 72, 56, 62, 70,
+
+ 70, 30, 30, 72, 72, 30, 30, 79, 75, 76,
+ 30, 75, 82, 86, 30, 30, 47, 47, 47, 82,
+ 86, 80, 47, 79, 92, 106, 47, 47, 47, 47,
+ 119, 76, 126, 145, 76, 135, 135, 150, 150, 140,
+ 140, 139, 126, 126, 126, 135, 135, 135, 106, 140,
+ 140, 140, 119, 92, 142, 142, 138, 147, 147, 137,
+ 152, 152, 133, 131, 142, 142, 142, 147, 147, 147,
+ 152, 152, 152, 154, 154, 154, 154, 154, 154, 154,
+ 154, 154, 155, 155, 155, 155, 155, 155, 155, 155,
+ 155, 156, 156, 156, 156, 156, 156, 156, 156, 156,
+
+ 157, 157, 157, 157, 157, 157, 157, 157, 157, 158,
+ 130, 129, 127, 125, 123, 158, 158, 158, 159, 120,
+ 118, 117, 116, 115, 159, 159, 159, 160, 160, 160,
+ 160, 160, 114, 160, 160, 160, 161, 161, 161, 161,
+ 161, 161, 161, 161, 161, 162, 162, 113, 162, 162,
+ 162, 162, 162, 162, 163, 163, 163, 163, 163, 163,
+ 112, 111, 163, 164, 164, 110, 164, 164, 164, 164,
+ 164, 164, 165, 165, 107, 165, 165, 165, 165, 165,
+ 165, 166, 105, 104, 103, 102, 101, 166, 166, 167,
+ 100, 167, 167, 167, 98, 97, 96, 95, 94, 93,
+
+ 90, 89, 88, 87, 85, 84, 83, 81, 68, 67,
+ 66, 65, 64, 63, 61, 60, 59, 55, 39, 31,
+ 28, 26, 24, 19, 17, 16, 13, 11, 9, 8,
+ 7, 153, 153, 153, 153, 153, 153, 153, 153, 153,
+ 153, 153, 153, 153, 153, 153, 153, 153, 153, 153,
+ 153, 153, 153, 153, 153, 153, 153, 153, 153, 153,
+ 153, 153, 153, 153, 153, 153, 153, 153, 153, 153,
+ 153
} ;
#define YY_TRAILING_MASK 0x2000
@@ -680,6 +633,10 @@ goto find_rule; \
int glcpp_get_column (yyscan_t yyscanner);
void glcpp_set_column (int column_no , yyscan_t yyscanner);
+#ifdef _MSC_VER
+#define YY_NO_UNISTD_H
+#endif
+
#define YY_NO_INPUT
#define YY_USER_ACTION \
@@ -696,12 +653,13 @@ void glcpp_set_column (int column_no , yyscan_t yyscanner);
yylloc->source = 0; \
} while(0)
-#line 700 "glcpp/glcpp-lex.c"
+#line 657 "glcpp/glcpp-lex.c"
#define INITIAL 0
#define DONE 1
#define COMMENT 2
#define UNREACHABLE 3
+#define SKIP 4
#define YY_EXTRA_TYPE glcpp_parser_t *
@@ -843,7 +801,12 @@ static int input (yyscan_t yyscanner );
/* Amount of stuff to slurp up with each read. */
#ifndef YY_READ_BUF_SIZE
+#ifdef __ia64__
+/* On IA-64, the buffer size is 16k, not 8k */
+#define YY_READ_BUF_SIZE 16384
+#else
#define YY_READ_BUF_SIZE 8192
+#endif /* __ia64__ */
#endif
/* Copy whatever the last rule matched to the standard output. */
@@ -862,7 +825,7 @@ static int input (yyscan_t yyscanner );
if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
{ \
int c = '*'; \
- unsigned n; \
+ size_t n; \
for ( n = 0; n < max_size && \
(c = getc( yyin )) != EOF && c != '\n'; ++n ) \
buf[n] = (char) c; \
@@ -950,11 +913,22 @@ YY_DECL
register int yy_act;
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-#line 76 "glcpp/glcpp-lex.l"
+#line 80 "glcpp/glcpp-lex.l"
+ /* Implicitly switch between SKIP and INITIAL (non-skipping);
+ * don't switch if some other state was explicitly set.
+ */
+ glcpp_parser_t *parser = yyextra;
+ if (YY_START == 0 || YY_START == SKIP) {
+ if (parser->lexing_if || parser->skip_stack == NULL || parser->skip_stack->type == SKIP_NO_SKIP) {
+ BEGIN 0;
+ } else {
+ BEGIN SKIP;
+ }
+ }
/* Single-line comments */
-#line 958 "glcpp/glcpp-lex.c"
+#line 932 "glcpp/glcpp-lex.c"
yylval = yylval_param;
@@ -1017,14 +991,14 @@ yy_match:
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{
yy_current_state = (int) yy_def[yy_current_state];
- if ( yy_current_state >= 163 )
+ if ( yy_current_state >= 154 )
yy_c = yy_meta[(unsigned int) yy_c];
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
*yyg->yy_state_ptr++ = yy_current_state;
++yy_cp;
}
- while ( yy_current_state != 162 );
+ while ( yy_current_state != 153 );
yy_find_action:
yy_current_state = *--yyg->yy_state_ptr;
@@ -1049,9 +1023,6 @@ find_rule: /* we branch to this label when backing up */
{
yyg->yy_looking_for_trail_begin = yy_act & ~YY_TRAILING_MASK;
yyg->yy_looking_for_trail_begin |= YY_TRAILING_HEAD_MASK;
- yyg->yy_full_match = yy_cp;
- yyg->yy_full_state = yyg->yy_state_ptr;
- yyg->yy_full_lp = yyg->yy_lp;
}
else
{
@@ -1076,41 +1047,41 @@ do_action: /* This label is used only to access EOF actions. */
{ /* beginning of action switch */
case 1:
YY_RULE_SETUP
-#line 79 "glcpp/glcpp-lex.l"
+#line 94 "glcpp/glcpp-lex.l"
{
}
YY_BREAK
/* Multi-line comments */
case 2:
YY_RULE_SETUP
-#line 83 "glcpp/glcpp-lex.l"
+#line 98 "glcpp/glcpp-lex.l"
{ yy_push_state(COMMENT, yyscanner); }
YY_BREAK
case 3:
YY_RULE_SETUP
-#line 84 "glcpp/glcpp-lex.l"
+#line 99 "glcpp/glcpp-lex.l"
YY_BREAK
case 4:
/* rule 4 can match eol */
YY_RULE_SETUP
-#line 85 "glcpp/glcpp-lex.l"
+#line 100 "glcpp/glcpp-lex.l"
{ yylineno++; yycolumn = 0; return NEWLINE; }
YY_BREAK
case 5:
YY_RULE_SETUP
-#line 86 "glcpp/glcpp-lex.l"
+#line 101 "glcpp/glcpp-lex.l"
YY_BREAK
case 6:
/* rule 6 can match eol */
YY_RULE_SETUP
-#line 87 "glcpp/glcpp-lex.l"
+#line 102 "glcpp/glcpp-lex.l"
{ yylineno++; yycolumn = 0; return NEWLINE; }
YY_BREAK
case 7:
YY_RULE_SETUP
-#line 88 "glcpp/glcpp-lex.l"
+#line 103 "glcpp/glcpp-lex.l"
{
yy_pop_state(yyscanner);
if (yyextra->space_tokens)
@@ -1119,9 +1090,9 @@ YY_RULE_SETUP
YY_BREAK
case 8:
YY_RULE_SETUP
-#line 94 "glcpp/glcpp-lex.l"
+#line 109 "glcpp/glcpp-lex.l"
{
- yylval->str = talloc_strdup (yyextra, yytext);
+ yylval->str = ralloc_strdup (yyextra, yytext);
yyextra->space_tokens = 0;
return HASH_VERSION;
}
@@ -1130,9 +1101,9 @@ YY_RULE_SETUP
* Simply pass them through to the main compiler's lexer/parser. */
case 9:
YY_RULE_SETUP
-#line 102 "glcpp/glcpp-lex.l"
+#line 117 "glcpp/glcpp-lex.l"
{
- yylval->str = talloc_strdup (yyextra, yytext);
+ yylval->str = ralloc_strdup (yyextra, yytext);
yylineno++;
yycolumn = 0;
return OTHER;
@@ -1143,7 +1114,7 @@ case 10:
yyg->yy_c_buf_p = yy_cp -= 1;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
-#line 109 "glcpp/glcpp-lex.l"
+#line 124 "glcpp/glcpp-lex.l"
{
/* Eat characters until the first digit is
* encountered
@@ -1165,7 +1136,7 @@ case 11:
yyg->yy_c_buf_p = yy_cp -= 1;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
-#line 125 "glcpp/glcpp-lex.l"
+#line 140 "glcpp/glcpp-lex.l"
{
/* Eat characters until the first digit is
* encountered
@@ -1181,10 +1152,10 @@ YY_RULE_SETUP
yylineno = strtol(ptr, &ptr, 0) - 1;
}
YY_BREAK
+
case 12:
-/* rule 12 can match eol */
YY_RULE_SETUP
-#line 140 "glcpp/glcpp-lex.l"
+#line 156 "glcpp/glcpp-lex.l"
{
yyextra->lexing_if = 1;
yyextra->space_tokens = 0;
@@ -1192,9 +1163,8 @@ YY_RULE_SETUP
}
YY_BREAK
case 13:
-/* rule 13 can match eol */
YY_RULE_SETUP
-#line 146 "glcpp/glcpp-lex.l"
+#line 162 "glcpp/glcpp-lex.l"
{
yyextra->lexing_if = 1;
yyextra->space_tokens = 0;
@@ -1203,8 +1173,11 @@ YY_RULE_SETUP
YY_BREAK
case 14:
/* rule 14 can match eol */
+*yy_cp = yyg->yy_hold_char; /* undo effects of setting up yytext */
+yyg->yy_c_buf_p = yy_cp -= 1;
+YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
-#line 152 "glcpp/glcpp-lex.l"
+#line 168 "glcpp/glcpp-lex.l"
{
yyextra->lexing_if = 1;
yyextra->space_tokens = 0;
@@ -1212,9 +1185,8 @@ YY_RULE_SETUP
}
YY_BREAK
case 15:
-/* rule 15 can match eol */
YY_RULE_SETUP
-#line 158 "glcpp/glcpp-lex.l"
+#line 174 "glcpp/glcpp-lex.l"
{
yyextra->lexing_if = 1;
yyextra->space_tokens = 0;
@@ -1222,53 +1194,30 @@ YY_RULE_SETUP
}
YY_BREAK
case 16:
-/* rule 16 can match eol */
YY_RULE_SETUP
-#line 164 "glcpp/glcpp-lex.l"
+#line 180 "glcpp/glcpp-lex.l"
{
yyextra->space_tokens = 0;
return HASH_ELSE;
}
YY_BREAK
case 17:
-/* rule 17 can match eol */
YY_RULE_SETUP
-#line 169 "glcpp/glcpp-lex.l"
+#line 185 "glcpp/glcpp-lex.l"
{
yyextra->space_tokens = 0;
return HASH_ENDIF;
}
YY_BREAK
-/* When skipping (due to an #if 0 or similar) consume anything
- * up to a newline. We do this with less priority than any
- * #if-related directive (#if, #elif, #else, #endif), but with
- * more priority than any other directive or token to avoid
- * any side-effects from skipped content.
- *
- * We use the lexing_if flag to avoid skipping any part of an
- * if conditional expression. */
+
case 18:
-/* rule 18 can match eol */
-*yy_cp = yyg->yy_hold_char; /* undo effects of setting up yytext */
-yyg->yy_c_buf_p = yy_cp -= 1;
-YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
-#line 182 "glcpp/glcpp-lex.l"
-{
- /* Since this rule always matches, YY_USER_ACTION gets called for it,
- * wrongly incrementing yycolumn. We undo that effect here. */
- yycolumn -= yyleng;
- if (yyextra->lexing_if ||
- yyextra->skip_stack == NULL ||
- yyextra->skip_stack->type == SKIP_NO_SKIP)
- {
- REJECT;
- }
-}
+#line 191 "glcpp/glcpp-lex.l"
+;
YY_BREAK
case 19:
YY_RULE_SETUP
-#line 194 "glcpp/glcpp-lex.l"
+#line 193 "glcpp/glcpp-lex.l"
{
char *p;
for (p = yytext; !isalpha(p[0]); p++); /* skip " # " */
@@ -1278,7 +1227,7 @@ YY_RULE_SETUP
YY_BREAK
case 20:
YY_RULE_SETUP
-#line 201 "glcpp/glcpp-lex.l"
+#line 200 "glcpp/glcpp-lex.l"
{
yyextra->space_tokens = 0;
return HASH_DEFINE_FUNC;
@@ -1286,7 +1235,7 @@ YY_RULE_SETUP
YY_BREAK
case 21:
YY_RULE_SETUP
-#line 206 "glcpp/glcpp-lex.l"
+#line 205 "glcpp/glcpp-lex.l"
{
yyextra->space_tokens = 0;
return HASH_DEFINE_OBJ;
@@ -1294,7 +1243,7 @@ YY_RULE_SETUP
YY_BREAK
case 22:
YY_RULE_SETUP
-#line 211 "glcpp/glcpp-lex.l"
+#line 210 "glcpp/glcpp-lex.l"
{
yyextra->space_tokens = 0;
return HASH_UNDEF;
@@ -1302,7 +1251,7 @@ YY_RULE_SETUP
YY_BREAK
case 23:
YY_RULE_SETUP
-#line 216 "glcpp/glcpp-lex.l"
+#line 215 "glcpp/glcpp-lex.l"
{
yyextra->space_tokens = 0;
return HASH;
@@ -1310,124 +1259,124 @@ YY_RULE_SETUP
YY_BREAK
case 24:
YY_RULE_SETUP
-#line 221 "glcpp/glcpp-lex.l"
+#line 220 "glcpp/glcpp-lex.l"
{
- yylval->str = talloc_strdup (yyextra, yytext);
+ yylval->str = ralloc_strdup (yyextra, yytext);
return INTEGER_STRING;
}
YY_BREAK
case 25:
YY_RULE_SETUP
-#line 226 "glcpp/glcpp-lex.l"
+#line 225 "glcpp/glcpp-lex.l"
{
- yylval->str = talloc_strdup (yyextra, yytext);
+ yylval->str = ralloc_strdup (yyextra, yytext);
return INTEGER_STRING;
}
YY_BREAK
case 26:
YY_RULE_SETUP
-#line 231 "glcpp/glcpp-lex.l"
+#line 230 "glcpp/glcpp-lex.l"
{
- yylval->str = talloc_strdup (yyextra, yytext);
+ yylval->str = ralloc_strdup (yyextra, yytext);
return INTEGER_STRING;
}
YY_BREAK
case 27:
YY_RULE_SETUP
-#line 236 "glcpp/glcpp-lex.l"
+#line 235 "glcpp/glcpp-lex.l"
{
return LEFT_SHIFT;
}
YY_BREAK
case 28:
YY_RULE_SETUP
-#line 240 "glcpp/glcpp-lex.l"
+#line 239 "glcpp/glcpp-lex.l"
{
return RIGHT_SHIFT;
}
YY_BREAK
case 29:
YY_RULE_SETUP
-#line 244 "glcpp/glcpp-lex.l"
+#line 243 "glcpp/glcpp-lex.l"
{
return LESS_OR_EQUAL;
}
YY_BREAK
case 30:
YY_RULE_SETUP
-#line 248 "glcpp/glcpp-lex.l"
+#line 247 "glcpp/glcpp-lex.l"
{
return GREATER_OR_EQUAL;
}
YY_BREAK
case 31:
YY_RULE_SETUP
-#line 252 "glcpp/glcpp-lex.l"
+#line 251 "glcpp/glcpp-lex.l"
{
return EQUAL;
}
YY_BREAK
case 32:
YY_RULE_SETUP
-#line 256 "glcpp/glcpp-lex.l"
+#line 255 "glcpp/glcpp-lex.l"
{
return NOT_EQUAL;
}
YY_BREAK
case 33:
YY_RULE_SETUP
-#line 260 "glcpp/glcpp-lex.l"
+#line 259 "glcpp/glcpp-lex.l"
{
return AND;
}
YY_BREAK
case 34:
YY_RULE_SETUP
-#line 264 "glcpp/glcpp-lex.l"
+#line 263 "glcpp/glcpp-lex.l"
{
return OR;
}
YY_BREAK
case 35:
YY_RULE_SETUP
-#line 268 "glcpp/glcpp-lex.l"
+#line 267 "glcpp/glcpp-lex.l"
{
return PASTE;
}
YY_BREAK
case 36:
YY_RULE_SETUP
-#line 272 "glcpp/glcpp-lex.l"
+#line 271 "glcpp/glcpp-lex.l"
{
return DEFINED;
}
YY_BREAK
case 37:
YY_RULE_SETUP
-#line 276 "glcpp/glcpp-lex.l"
+#line 275 "glcpp/glcpp-lex.l"
{
- yylval->str = talloc_strdup (yyextra, yytext);
+ yylval->str = ralloc_strdup (yyextra, yytext);
return IDENTIFIER;
}
YY_BREAK
case 38:
YY_RULE_SETUP
-#line 281 "glcpp/glcpp-lex.l"
+#line 280 "glcpp/glcpp-lex.l"
{
return yytext[0];
}
YY_BREAK
case 39:
YY_RULE_SETUP
-#line 285 "glcpp/glcpp-lex.l"
+#line 284 "glcpp/glcpp-lex.l"
{
- yylval->str = talloc_strdup (yyextra, yytext);
+ yylval->str = ralloc_strdup (yyextra, yytext);
return OTHER;
}
YY_BREAK
case 40:
YY_RULE_SETUP
-#line 290 "glcpp/glcpp-lex.l"
+#line 289 "glcpp/glcpp-lex.l"
{
if (yyextra->space_tokens) {
return SPACE;
@@ -1437,7 +1386,7 @@ YY_RULE_SETUP
case 41:
/* rule 41 can match eol */
YY_RULE_SETUP
-#line 296 "glcpp/glcpp-lex.l"
+#line 295 "glcpp/glcpp-lex.l"
{
yyextra->lexing_if = 0;
yylineno++;
@@ -1447,7 +1396,7 @@ YY_RULE_SETUP
YY_BREAK
/* Handle missing newline at EOF. */
case YY_STATE_EOF(INITIAL):
-#line 304 "glcpp/glcpp-lex.l"
+#line 303 "glcpp/glcpp-lex.l"
{
BEGIN DONE; /* Don't keep matching this rule forever. */
yyextra->lexing_if = 0;
@@ -1460,7 +1409,7 @@ case YY_STATE_EOF(INITIAL):
warnings. */
case 42:
YY_RULE_SETUP
-#line 314 "glcpp/glcpp-lex.l"
+#line 313 "glcpp/glcpp-lex.l"
{
unput('.');
yy_top_state(yyextra);
@@ -1468,13 +1417,14 @@ YY_RULE_SETUP
YY_BREAK
case 43:
YY_RULE_SETUP
-#line 319 "glcpp/glcpp-lex.l"
+#line 318 "glcpp/glcpp-lex.l"
ECHO;
YY_BREAK
-#line 1475 "glcpp/glcpp-lex.c"
+#line 1424 "glcpp/glcpp-lex.c"
case YY_STATE_EOF(DONE):
case YY_STATE_EOF(COMMENT):
case YY_STATE_EOF(UNREACHABLE):
+ case YY_STATE_EOF(SKIP):
yyterminate();
case YY_END_OF_BUFFER:
@@ -1737,7 +1687,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{
yy_current_state = (int) yy_def[yy_current_state];
- if ( yy_current_state >= 163 )
+ if ( yy_current_state >= 154 )
yy_c = yy_meta[(unsigned int) yy_c];
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
@@ -1761,11 +1711,11 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{
yy_current_state = (int) yy_def[yy_current_state];
- if ( yy_current_state >= 163 )
+ if ( yy_current_state >= 154 )
yy_c = yy_meta[(unsigned int) yy_c];
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
- yy_is_jam = (yy_current_state == 162);
+ yy_is_jam = (yy_current_state == 153);
if ( ! yy_is_jam )
*yyg->yy_state_ptr++ = yy_current_state;
@@ -2210,8 +2160,8 @@ YY_BUFFER_STATE glcpp__scan_string (yyconst char * yystr , yyscan_t yyscanner)
/** Setup the input buffer state to scan the given bytes. The next call to glcpp_lex() will
* scan from a @e copy of @a bytes.
- * @param bytes the byte buffer to scan
- * @param len the number of bytes in the buffer pointed to by @a bytes.
+ * @param yybytes the byte buffer to scan
+ * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
* @param yyscanner The scanner object.
* @return the newly allocated buffer state object.
*/
@@ -2665,7 +2615,7 @@ void glcpp_free (void * ptr , yyscan_t yyscanner)
#define YYTABLES_NAME "yytables"
-#line 319 "glcpp/glcpp-lex.l"
+#line 318 "glcpp/glcpp-lex.l"
diff --git a/src/glsl/glcpp/glcpp-lex.l b/src/glsl/glcpp/glcpp-lex.l
index e936854cf2c..86618870885 100644
--- a/src/glsl/glcpp/glcpp-lex.l
+++ b/src/glsl/glcpp/glcpp-lex.l
@@ -34,6 +34,10 @@
int glcpp_get_column (yyscan_t yyscanner);
void glcpp_set_column (int column_no , yyscan_t yyscanner);
+#ifdef _MSC_VER
+#define YY_NO_UNISTD_H
+#endif
+
#define YY_NO_INPUT
#define YY_USER_ACTION \
@@ -57,7 +61,7 @@ void glcpp_set_column (int column_no , yyscan_t yyscanner);
%option stack
%option never-interactive
-%x DONE COMMENT UNREACHABLE
+%x DONE COMMENT UNREACHABLE SKIP
SPACE [[:space:]]
NONSPACE [^[:space:]]
@@ -74,6 +78,17 @@ OCTAL_INTEGER 0[0-7]*[uU]?
HEXADECIMAL_INTEGER 0[xX][0-9a-fA-F]+[uU]?
%%
+ /* Implicitly switch between SKIP and INITIAL (non-skipping);
+ * don't switch if some other state was explicitly set.
+ */
+ glcpp_parser_t *parser = yyextra;
+ if (YY_START == 0 || YY_START == SKIP) {
+ if (parser->lexing_if || parser->skip_stack == NULL || parser->skip_stack->type == SKIP_NO_SKIP) {
+ BEGIN 0;
+ } else {
+ BEGIN SKIP;
+ }
+ }
/* Single-line comments */
"//"[^\n]* {
@@ -92,7 +107,7 @@ HEXADECIMAL_INTEGER 0[xX][0-9a-fA-F]+[uU]?
}
{HASH}version {
- yylval->str = talloc_strdup (yyextra, yytext);
+ yylval->str = ralloc_strdup (yyextra, yytext);
yyextra->space_tokens = 0;
return HASH_VERSION;
}
@@ -100,7 +115,7 @@ HEXADECIMAL_INTEGER 0[xX][0-9a-fA-F]+[uU]?
/* glcpp doesn't handle #extension, #version, or #pragma directives.
* Simply pass them through to the main compiler's lexer/parser. */
{HASH}(extension|pragma)[^\n]+ {
- yylval->str = talloc_strdup (yyextra, yytext);
+ yylval->str = ralloc_strdup (yyextra, yytext);
yylineno++;
yycolumn = 0;
return OTHER;
@@ -137,60 +152,44 @@ HEXADECIMAL_INTEGER 0[xX][0-9a-fA-F]+[uU]?
yylineno = strtol(ptr, &ptr, 0) - 1;
}
-{HASH}ifdef/.*\n {
+<SKIP,INITIAL>{
+{HASH}ifdef {
yyextra->lexing_if = 1;
yyextra->space_tokens = 0;
return HASH_IFDEF;
}
-{HASH}ifndef/.*\n {
+{HASH}ifndef {
yyextra->lexing_if = 1;
yyextra->space_tokens = 0;
return HASH_IFNDEF;
}
-{HASH}if/[^_a-zA-Z0-9].*\n {
+{HASH}if/[^_a-zA-Z0-9] {
yyextra->lexing_if = 1;
yyextra->space_tokens = 0;
return HASH_IF;
}
-{HASH}elif/.*\n {
+{HASH}elif {
yyextra->lexing_if = 1;
yyextra->space_tokens = 0;
return HASH_ELIF;
}
-{HASH}else/.*\n {
+{HASH}else {
yyextra->space_tokens = 0;
return HASH_ELSE;
}
-{HASH}endif/.*\n {
+{HASH}endif {
yyextra->space_tokens = 0;
return HASH_ENDIF;
}
-
- /* When skipping (due to an #if 0 or similar) consume anything
- * up to a newline. We do this with less priority than any
- * #if-related directive (#if, #elif, #else, #endif), but with
- * more priority than any other directive or token to avoid
- * any side-effects from skipped content.
- *
- * We use the lexing_if flag to avoid skipping any part of an
- * if conditional expression. */
-[^\n]+/\n {
- /* Since this rule always matches, YY_USER_ACTION gets called for it,
- * wrongly incrementing yycolumn. We undo that effect here. */
- yycolumn -= yyleng;
- if (yyextra->lexing_if ||
- yyextra->skip_stack == NULL ||
- yyextra->skip_stack->type == SKIP_NO_SKIP)
- {
- REJECT;
- }
}
+<SKIP>[^\n] ;
+
{HASH}error.* {
char *p;
for (p = yytext; !isalpha(p[0]); p++); /* skip " # " */
@@ -219,17 +218,17 @@ HEXADECIMAL_INTEGER 0[xX][0-9a-fA-F]+[uU]?
}
{DECIMAL_INTEGER} {
- yylval->str = talloc_strdup (yyextra, yytext);
+ yylval->str = ralloc_strdup (yyextra, yytext);
return INTEGER_STRING;
}
{OCTAL_INTEGER} {
- yylval->str = talloc_strdup (yyextra, yytext);
+ yylval->str = ralloc_strdup (yyextra, yytext);
return INTEGER_STRING;
}
{HEXADECIMAL_INTEGER} {
- yylval->str = talloc_strdup (yyextra, yytext);
+ yylval->str = ralloc_strdup (yyextra, yytext);
return INTEGER_STRING;
}
@@ -274,7 +273,7 @@ HEXADECIMAL_INTEGER 0[xX][0-9a-fA-F]+[uU]?
}
{IDENTIFIER} {
- yylval->str = talloc_strdup (yyextra, yytext);
+ yylval->str = ralloc_strdup (yyextra, yytext);
return IDENTIFIER;
}
@@ -283,7 +282,7 @@ HEXADECIMAL_INTEGER 0[xX][0-9a-fA-F]+[uU]?
}
{OTHER}+ {
- yylval->str = talloc_strdup (yyextra, yytext);
+ yylval->str = ralloc_strdup (yyextra, yytext);
return OTHER;
}
@@ -293,7 +292,7 @@ HEXADECIMAL_INTEGER 0[xX][0-9a-fA-F]+[uU]?
}
}
-\n {
+<SKIP,INITIAL>\n {
yyextra->lexing_if = 0;
yylineno++;
yycolumn = 0;
diff --git a/src/glsl/glcpp/glcpp-parse.c b/src/glsl/glcpp/glcpp-parse.c
index ab7c30ed78a..29c45c7f30b 100644
--- a/src/glsl/glcpp/glcpp-parse.c
+++ b/src/glsl/glcpp/glcpp-parse.c
@@ -1,9 +1,10 @@
-/* A Bison parser, made by GNU Bison 2.4.3. */
+
+/* A Bison parser, made by GNU Bison 2.4.1. */
/* Skeleton implementation for Bison's Yacc-like parsers in C
- Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2009, 2010 Free Software Foundation, Inc.
+ Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+ Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -45,7 +46,7 @@
#define YYBISON 1
/* Bison version. */
-#define YYBISON_VERSION "2.4.3"
+#define YYBISON_VERSION "2.4.1"
/* Skeleton name. */
#define YYSKELETON_NAME "yacc.c"
@@ -102,10 +103,6 @@
#include "main/core.h" /* for struct gl_extensions */
#include "main/mtypes.h" /* for gl_api enum */
-#define glcpp_print(stream, str) stream = talloc_strdup_append(stream, str)
-#define glcpp_printf(stream, fmt, args, ...) \
- stream = talloc_asprintf_append(stream, fmt, args)
-
static void
yyerror (YYLTYPE *locp, glcpp_parser_t *parser, const char *error);
@@ -149,7 +146,7 @@ _argument_list_length (argument_list_t *list);
static token_list_t *
_argument_list_member_at (argument_list_t *list, int index);
-/* Note: This function talloc_steal()s the str pointer. */
+/* Note: This function ralloc_steal()s the str pointer. */
static token_t *
_token_create_str (void *ctx, int type, char *str);
@@ -159,10 +156,7 @@ _token_create_ival (void *ctx, int type, int ival);
static token_list_t *
_token_list_create (void *ctx);
-/* Note: This function adds a talloc_reference() to token.
- *
- * You may want to talloc_unlink any current reference if you no
- * longer need it. */
+/* Note: This function calls ralloc_steal on token. */
static void
_token_list_append (token_list_t *list, token_t *token);
@@ -219,7 +213,7 @@ add_builtin_define(glcpp_parser_t *parser, const char *name, int value);
/* Line 189 of yacc.c */
-#line 223 "glcpp/glcpp-parse.c"
+#line 217 "glcpp/glcpp-parse.c"
/* Enabling traces. */
#ifndef YYDEBUG
@@ -307,7 +301,7 @@ typedef struct YYLTYPE
/* Line 264 of yacc.c */
-#line 311 "glcpp/glcpp-parse.c"
+#line 305 "glcpp/glcpp-parse.c"
#ifdef short
# undef short
@@ -357,7 +351,7 @@ typedef short int yytype_int16;
#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
#ifndef YY_
-# if defined YYENABLE_NLS && YYENABLE_NLS
+# if YYENABLE_NLS
# if ENABLE_NLS
# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
# define YY_(msgid) dgettext ("bison-runtime", msgid)
@@ -632,17 +626,17 @@ static const yytype_int8 yyrhs[] =
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
static const yytype_uint16 yyrline[] =
{
- 0, 188, 188, 190, 194, 197, 202, 203, 207, 210,
- 216, 219, 222, 225, 233, 252, 262, 267, 272, 291,
- 306, 309, 312, 333, 337, 346, 351, 352, 355, 358,
- 361, 364, 367, 370, 373, 376, 379, 382, 385, 388,
- 391, 394, 397, 400, 403, 406, 409, 412, 415, 418,
- 424, 429, 437, 438, 442, 448, 449, 452, 454, 461,
- 465, 469, 474, 479, 487, 493, 501, 505, 509, 513,
- 517, 524, 525, 526, 527, 528, 529, 530, 531, 532,
- 533, 534, 535, 536, 537, 538, 539, 540, 541, 542,
- 543, 544, 545, 546, 547, 548, 549, 550, 551, 552,
- 553, 554
+ 0, 181, 181, 183, 187, 190, 195, 196, 200, 203,
+ 209, 212, 215, 218, 226, 245, 255, 260, 265, 284,
+ 299, 302, 305, 326, 330, 339, 344, 345, 348, 351,
+ 354, 357, 360, 363, 366, 369, 372, 375, 378, 381,
+ 384, 387, 390, 398, 406, 409, 412, 415, 418, 421,
+ 427, 432, 440, 441, 445, 451, 452, 455, 457, 464,
+ 468, 472, 477, 481, 488, 493, 500, 504, 508, 512,
+ 516, 523, 524, 525, 526, 527, 528, 529, 530, 531,
+ 532, 533, 534, 535, 536, 537, 538, 539, 540, 541,
+ 542, 543, 544, 545, 546, 547, 548, 549, 550, 551,
+ 552, 553
};
#endif
@@ -945,18 +939,9 @@ static const yytype_uint8 yystos[] =
/* Like YYERROR except do call yyerror. This remains here temporarily
to ease the transition to the new meaning of YYERROR, for GCC.
- Once GCC version 2 has supplanted version 1, this can go. However,
- YYFAIL appears to be in use. Nevertheless, it is formally deprecated
- in Bison 2.4.2's NEWS entry, where a plan to phase it out is
- discussed. */
+ Once GCC version 2 has supplanted version 1, this can go. */
#define YYFAIL goto yyerrlab
-#if defined YYFAIL
- /* This is here to suppress warnings from the GCC cpp's
- -Wunused-macros. Normally we don't worry about that warning, but
- some users do, and we want to make it easy for users to remove
- YYFAIL uses, which will produce warnings from Bison 2.5. */
-#endif
#define YYRECOVERING() (!!yyerrstatus)
@@ -1013,7 +998,7 @@ while (YYID (0))
we won't break user code: when these are the locations we know. */
#ifndef YY_LOCATION_PRINT
-# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
+# if YYLTYPE_IS_TRIVIAL
# define YY_LOCATION_PRINT(File, Loc) \
fprintf (File, "%d.%d-%d.%d", \
(Loc).first_line, (Loc).first_column, \
@@ -1555,7 +1540,7 @@ YYLTYPE yylloc;
YYLTYPE *yylsp;
/* The locations where the error started and ended. */
- YYLTYPE yyerror_range[3];
+ YYLTYPE yyerror_range[2];
YYSIZE_T yystacksize;
@@ -1602,7 +1587,7 @@ YYLTYPE yylloc;
yyvsp = yyvs;
yylsp = yyls;
-#if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
+#if YYLTYPE_IS_TRIVIAL
/* Initialize the default location before parsing starts. */
yylloc.first_line = yylloc.last_line = 1;
yylloc.first_column = yylloc.last_column = 1;
@@ -1610,8 +1595,8 @@ YYLTYPE yylloc;
/* User initialization code. */
-/* Line 1251 of yacc.c */
-#line 155 "glcpp/glcpp-parse.y"
+/* Line 1242 of yacc.c */
+#line 148 "glcpp/glcpp-parse.y"
{
yylloc.first_line = 1;
yylloc.first_column = 1;
@@ -1620,8 +1605,8 @@ YYLTYPE yylloc;
yylloc.source = 0;
}
-/* Line 1251 of yacc.c */
-#line 1625 "glcpp/glcpp-parse.c"
+/* Line 1242 of yacc.c */
+#line 1610 "glcpp/glcpp-parse.c"
yylsp[0] = yylloc;
goto yysetstate;
@@ -1808,28 +1793,28 @@ yyreduce:
{
case 4:
-/* Line 1464 of yacc.c */
-#line 194 "glcpp/glcpp-parse.y"
+/* Line 1455 of yacc.c */
+#line 187 "glcpp/glcpp-parse.y"
{
- glcpp_print(parser->output, "\n");
+ ralloc_strcat (&parser->output, "\n");
;}
break;
case 5:
-/* Line 1464 of yacc.c */
-#line 197 "glcpp/glcpp-parse.y"
+/* Line 1455 of yacc.c */
+#line 190 "glcpp/glcpp-parse.y"
{
_glcpp_parser_print_expanded_token_list (parser, (yyvsp[(1) - (1)].token_list));
- glcpp_print(parser->output, "\n");
- talloc_free ((yyvsp[(1) - (1)].token_list));
+ ralloc_strcat (&parser->output, "\n");
+ ralloc_free ((yyvsp[(1) - (1)].token_list));
;}
break;
case 8:
-/* Line 1464 of yacc.c */
-#line 207 "glcpp/glcpp-parse.y"
+/* Line 1455 of yacc.c */
+#line 200 "glcpp/glcpp-parse.y"
{
_glcpp_parser_skip_stack_push_if (parser, & (yylsp[(1) - (3)]), (yyvsp[(2) - (3)].ival));
;}
@@ -1837,8 +1822,8 @@ yyreduce:
case 9:
-/* Line 1464 of yacc.c */
-#line 210 "glcpp/glcpp-parse.y"
+/* Line 1455 of yacc.c */
+#line 203 "glcpp/glcpp-parse.y"
{
_glcpp_parser_skip_stack_change_if (parser, & (yylsp[(1) - (3)]), "elif", (yyvsp[(2) - (3)].ival));
;}
@@ -1846,8 +1831,8 @@ yyreduce:
case 10:
-/* Line 1464 of yacc.c */
-#line 216 "glcpp/glcpp-parse.y"
+/* Line 1455 of yacc.c */
+#line 209 "glcpp/glcpp-parse.y"
{
_define_object_macro (parser, & (yylsp[(2) - (4)]), (yyvsp[(2) - (4)].str), (yyvsp[(3) - (4)].token_list));
;}
@@ -1855,8 +1840,8 @@ yyreduce:
case 11:
-/* Line 1464 of yacc.c */
-#line 219 "glcpp/glcpp-parse.y"
+/* Line 1455 of yacc.c */
+#line 212 "glcpp/glcpp-parse.y"
{
_define_function_macro (parser, & (yylsp[(2) - (6)]), (yyvsp[(2) - (6)].str), NULL, (yyvsp[(5) - (6)].token_list));
;}
@@ -1864,8 +1849,8 @@ yyreduce:
case 12:
-/* Line 1464 of yacc.c */
-#line 222 "glcpp/glcpp-parse.y"
+/* Line 1455 of yacc.c */
+#line 215 "glcpp/glcpp-parse.y"
{
_define_function_macro (parser, & (yylsp[(2) - (7)]), (yyvsp[(2) - (7)].str), (yyvsp[(4) - (7)].string_list), (yyvsp[(6) - (7)].token_list));
;}
@@ -1873,22 +1858,22 @@ yyreduce:
case 13:
-/* Line 1464 of yacc.c */
-#line 225 "glcpp/glcpp-parse.y"
+/* Line 1455 of yacc.c */
+#line 218 "glcpp/glcpp-parse.y"
{
macro_t *macro = hash_table_find (parser->defines, (yyvsp[(2) - (3)].str));
if (macro) {
hash_table_remove (parser->defines, (yyvsp[(2) - (3)].str));
- talloc_free (macro);
+ ralloc_free (macro);
}
- talloc_free ((yyvsp[(2) - (3)].str));
+ ralloc_free ((yyvsp[(2) - (3)].str));
;}
break;
case 14:
-/* Line 1464 of yacc.c */
-#line 233 "glcpp/glcpp-parse.y"
+/* Line 1455 of yacc.c */
+#line 226 "glcpp/glcpp-parse.y"
{
/* Be careful to only evaluate the 'if' expression if
* we are not skipping. When we are skipping, we
@@ -1912,8 +1897,8 @@ yyreduce:
case 15:
-/* Line 1464 of yacc.c */
-#line 252 "glcpp/glcpp-parse.y"
+/* Line 1455 of yacc.c */
+#line 245 "glcpp/glcpp-parse.y"
{
/* #if without an expression is only an error if we
* are not skipping */
@@ -1928,30 +1913,30 @@ yyreduce:
case 16:
-/* Line 1464 of yacc.c */
-#line 262 "glcpp/glcpp-parse.y"
+/* Line 1455 of yacc.c */
+#line 255 "glcpp/glcpp-parse.y"
{
macro_t *macro = hash_table_find (parser->defines, (yyvsp[(2) - (4)].str));
- talloc_free ((yyvsp[(2) - (4)].str));
+ ralloc_free ((yyvsp[(2) - (4)].str));
_glcpp_parser_skip_stack_push_if (parser, & (yylsp[(1) - (4)]), macro != NULL);
;}
break;
case 17:
-/* Line 1464 of yacc.c */
-#line 267 "glcpp/glcpp-parse.y"
+/* Line 1455 of yacc.c */
+#line 260 "glcpp/glcpp-parse.y"
{
macro_t *macro = hash_table_find (parser->defines, (yyvsp[(2) - (4)].str));
- talloc_free ((yyvsp[(2) - (4)].str));
+ ralloc_free ((yyvsp[(2) - (4)].str));
_glcpp_parser_skip_stack_push_if (parser, & (yylsp[(1) - (4)]), macro == NULL);
;}
break;
case 18:
-/* Line 1464 of yacc.c */
-#line 272 "glcpp/glcpp-parse.y"
+/* Line 1455 of yacc.c */
+#line 265 "glcpp/glcpp-parse.y"
{
/* Be careful to only evaluate the 'elif' expression
* if we are not skipping. When we are skipping, we
@@ -1975,8 +1960,8 @@ yyreduce:
case 19:
-/* Line 1464 of yacc.c */
-#line 291 "glcpp/glcpp-parse.y"
+/* Line 1455 of yacc.c */
+#line 284 "glcpp/glcpp-parse.y"
{
/* #elif without an expression is an error unless we
* are skipping. */
@@ -1996,8 +1981,8 @@ yyreduce:
case 20:
-/* Line 1464 of yacc.c */
-#line 306 "glcpp/glcpp-parse.y"
+/* Line 1455 of yacc.c */
+#line 299 "glcpp/glcpp-parse.y"
{
_glcpp_parser_skip_stack_change_if (parser, & (yylsp[(1) - (2)]), "else", 1);
;}
@@ -2005,8 +1990,8 @@ yyreduce:
case 21:
-/* Line 1464 of yacc.c */
-#line 309 "glcpp/glcpp-parse.y"
+/* Line 1455 of yacc.c */
+#line 302 "glcpp/glcpp-parse.y"
{
_glcpp_parser_skip_stack_pop (parser, & (yylsp[(1) - (2)]));
;}
@@ -2014,13 +1999,13 @@ yyreduce:
case 22:
-/* Line 1464 of yacc.c */
-#line 312 "glcpp/glcpp-parse.y"
+/* Line 1455 of yacc.c */
+#line 305 "glcpp/glcpp-parse.y"
{
macro_t *macro = hash_table_find (parser->defines, "__VERSION__");
if (macro) {
hash_table_remove (parser->defines, "__VERSION__");
- talloc_free (macro);
+ ralloc_free (macro);
}
add_builtin_define (parser, "__VERSION__", (yyvsp[(2) - (3)].ival));
@@ -2035,14 +2020,14 @@ yyreduce:
if ((yyvsp[(2) - (3)].ival) >= 130 || (yyvsp[(2) - (3)].ival) == 100)
add_builtin_define (parser, "GL_FRAGMENT_PRECISION_HIGH", 1);
- glcpp_printf(parser->output, "#version %" PRIiMAX, (yyvsp[(2) - (3)].ival));
+ ralloc_asprintf_append (&parser->output, "#version %" PRIiMAX, (yyvsp[(2) - (3)].ival));
;}
break;
case 24:
-/* Line 1464 of yacc.c */
-#line 337 "glcpp/glcpp-parse.y"
+/* Line 1455 of yacc.c */
+#line 330 "glcpp/glcpp-parse.y"
{
if (strlen ((yyvsp[(1) - (1)].str)) >= 3 && strncmp ((yyvsp[(1) - (1)].str), "0x", 2) == 0) {
(yyval.ival) = strtoll ((yyvsp[(1) - (1)].str) + 2, NULL, 16);
@@ -2056,8 +2041,8 @@ yyreduce:
case 25:
-/* Line 1464 of yacc.c */
-#line 346 "glcpp/glcpp-parse.y"
+/* Line 1455 of yacc.c */
+#line 339 "glcpp/glcpp-parse.y"
{
(yyval.ival) = (yyvsp[(1) - (1)].ival);
;}
@@ -2065,8 +2050,8 @@ yyreduce:
case 27:
-/* Line 1464 of yacc.c */
-#line 352 "glcpp/glcpp-parse.y"
+/* Line 1455 of yacc.c */
+#line 345 "glcpp/glcpp-parse.y"
{
(yyval.ival) = (yyvsp[(1) - (3)].ival) || (yyvsp[(3) - (3)].ival);
;}
@@ -2074,8 +2059,8 @@ yyreduce:
case 28:
-/* Line 1464 of yacc.c */
-#line 355 "glcpp/glcpp-parse.y"
+/* Line 1455 of yacc.c */
+#line 348 "glcpp/glcpp-parse.y"
{
(yyval.ival) = (yyvsp[(1) - (3)].ival) && (yyvsp[(3) - (3)].ival);
;}
@@ -2083,8 +2068,8 @@ yyreduce:
case 29:
-/* Line 1464 of yacc.c */
-#line 358 "glcpp/glcpp-parse.y"
+/* Line 1455 of yacc.c */
+#line 351 "glcpp/glcpp-parse.y"
{
(yyval.ival) = (yyvsp[(1) - (3)].ival) | (yyvsp[(3) - (3)].ival);
;}
@@ -2092,8 +2077,8 @@ yyreduce:
case 30:
-/* Line 1464 of yacc.c */
-#line 361 "glcpp/glcpp-parse.y"
+/* Line 1455 of yacc.c */
+#line 354 "glcpp/glcpp-parse.y"
{
(yyval.ival) = (yyvsp[(1) - (3)].ival) ^ (yyvsp[(3) - (3)].ival);
;}
@@ -2101,8 +2086,8 @@ yyreduce:
case 31:
-/* Line 1464 of yacc.c */
-#line 364 "glcpp/glcpp-parse.y"
+/* Line 1455 of yacc.c */
+#line 357 "glcpp/glcpp-parse.y"
{
(yyval.ival) = (yyvsp[(1) - (3)].ival) & (yyvsp[(3) - (3)].ival);
;}
@@ -2110,8 +2095,8 @@ yyreduce:
case 32:
-/* Line 1464 of yacc.c */
-#line 367 "glcpp/glcpp-parse.y"
+/* Line 1455 of yacc.c */
+#line 360 "glcpp/glcpp-parse.y"
{
(yyval.ival) = (yyvsp[(1) - (3)].ival) != (yyvsp[(3) - (3)].ival);
;}
@@ -2119,8 +2104,8 @@ yyreduce:
case 33:
-/* Line 1464 of yacc.c */
-#line 370 "glcpp/glcpp-parse.y"
+/* Line 1455 of yacc.c */
+#line 363 "glcpp/glcpp-parse.y"
{
(yyval.ival) = (yyvsp[(1) - (3)].ival) == (yyvsp[(3) - (3)].ival);
;}
@@ -2128,8 +2113,8 @@ yyreduce:
case 34:
-/* Line 1464 of yacc.c */
-#line 373 "glcpp/glcpp-parse.y"
+/* Line 1455 of yacc.c */
+#line 366 "glcpp/glcpp-parse.y"
{
(yyval.ival) = (yyvsp[(1) - (3)].ival) >= (yyvsp[(3) - (3)].ival);
;}
@@ -2137,8 +2122,8 @@ yyreduce:
case 35:
-/* Line 1464 of yacc.c */
-#line 376 "glcpp/glcpp-parse.y"
+/* Line 1455 of yacc.c */
+#line 369 "glcpp/glcpp-parse.y"
{
(yyval.ival) = (yyvsp[(1) - (3)].ival) <= (yyvsp[(3) - (3)].ival);
;}
@@ -2146,8 +2131,8 @@ yyreduce:
case 36:
-/* Line 1464 of yacc.c */
-#line 379 "glcpp/glcpp-parse.y"
+/* Line 1455 of yacc.c */
+#line 372 "glcpp/glcpp-parse.y"
{
(yyval.ival) = (yyvsp[(1) - (3)].ival) > (yyvsp[(3) - (3)].ival);
;}
@@ -2155,8 +2140,8 @@ yyreduce:
case 37:
-/* Line 1464 of yacc.c */
-#line 382 "glcpp/glcpp-parse.y"
+/* Line 1455 of yacc.c */
+#line 375 "glcpp/glcpp-parse.y"
{
(yyval.ival) = (yyvsp[(1) - (3)].ival) < (yyvsp[(3) - (3)].ival);
;}
@@ -2164,8 +2149,8 @@ yyreduce:
case 38:
-/* Line 1464 of yacc.c */
-#line 385 "glcpp/glcpp-parse.y"
+/* Line 1455 of yacc.c */
+#line 378 "glcpp/glcpp-parse.y"
{
(yyval.ival) = (yyvsp[(1) - (3)].ival) >> (yyvsp[(3) - (3)].ival);
;}
@@ -2173,8 +2158,8 @@ yyreduce:
case 39:
-/* Line 1464 of yacc.c */
-#line 388 "glcpp/glcpp-parse.y"
+/* Line 1455 of yacc.c */
+#line 381 "glcpp/glcpp-parse.y"
{
(yyval.ival) = (yyvsp[(1) - (3)].ival) << (yyvsp[(3) - (3)].ival);
;}
@@ -2182,8 +2167,8 @@ yyreduce:
case 40:
-/* Line 1464 of yacc.c */
-#line 391 "glcpp/glcpp-parse.y"
+/* Line 1455 of yacc.c */
+#line 384 "glcpp/glcpp-parse.y"
{
(yyval.ival) = (yyvsp[(1) - (3)].ival) - (yyvsp[(3) - (3)].ival);
;}
@@ -2191,8 +2176,8 @@ yyreduce:
case 41:
-/* Line 1464 of yacc.c */
-#line 394 "glcpp/glcpp-parse.y"
+/* Line 1455 of yacc.c */
+#line 387 "glcpp/glcpp-parse.y"
{
(yyval.ival) = (yyvsp[(1) - (3)].ival) + (yyvsp[(3) - (3)].ival);
;}
@@ -2200,26 +2185,36 @@ yyreduce:
case 42:
-/* Line 1464 of yacc.c */
-#line 397 "glcpp/glcpp-parse.y"
+/* Line 1455 of yacc.c */
+#line 390 "glcpp/glcpp-parse.y"
{
- (yyval.ival) = (yyvsp[(1) - (3)].ival) % (yyvsp[(3) - (3)].ival);
+ if ((yyvsp[(3) - (3)].ival) == 0) {
+ yyerror (& (yylsp[(1) - (3)]), parser,
+ "zero modulus in preprocessor directive");
+ } else {
+ (yyval.ival) = (yyvsp[(1) - (3)].ival) % (yyvsp[(3) - (3)].ival);
+ }
;}
break;
case 43:
-/* Line 1464 of yacc.c */
-#line 400 "glcpp/glcpp-parse.y"
+/* Line 1455 of yacc.c */
+#line 398 "glcpp/glcpp-parse.y"
{
- (yyval.ival) = (yyvsp[(1) - (3)].ival) / (yyvsp[(3) - (3)].ival);
+ if ((yyvsp[(3) - (3)].ival) == 0) {
+ yyerror (& (yylsp[(1) - (3)]), parser,
+ "division by 0 in preprocessor directive");
+ } else {
+ (yyval.ival) = (yyvsp[(1) - (3)].ival) / (yyvsp[(3) - (3)].ival);
+ }
;}
break;
case 44:
-/* Line 1464 of yacc.c */
-#line 403 "glcpp/glcpp-parse.y"
+/* Line 1455 of yacc.c */
+#line 406 "glcpp/glcpp-parse.y"
{
(yyval.ival) = (yyvsp[(1) - (3)].ival) * (yyvsp[(3) - (3)].ival);
;}
@@ -2227,8 +2222,8 @@ yyreduce:
case 45:
-/* Line 1464 of yacc.c */
-#line 406 "glcpp/glcpp-parse.y"
+/* Line 1455 of yacc.c */
+#line 409 "glcpp/glcpp-parse.y"
{
(yyval.ival) = ! (yyvsp[(2) - (2)].ival);
;}
@@ -2236,8 +2231,8 @@ yyreduce:
case 46:
-/* Line 1464 of yacc.c */
-#line 409 "glcpp/glcpp-parse.y"
+/* Line 1455 of yacc.c */
+#line 412 "glcpp/glcpp-parse.y"
{
(yyval.ival) = ~ (yyvsp[(2) - (2)].ival);
;}
@@ -2245,8 +2240,8 @@ yyreduce:
case 47:
-/* Line 1464 of yacc.c */
-#line 412 "glcpp/glcpp-parse.y"
+/* Line 1455 of yacc.c */
+#line 415 "glcpp/glcpp-parse.y"
{
(yyval.ival) = - (yyvsp[(2) - (2)].ival);
;}
@@ -2254,8 +2249,8 @@ yyreduce:
case 48:
-/* Line 1464 of yacc.c */
-#line 415 "glcpp/glcpp-parse.y"
+/* Line 1455 of yacc.c */
+#line 418 "glcpp/glcpp-parse.y"
{
(yyval.ival) = + (yyvsp[(2) - (2)].ival);
;}
@@ -2263,8 +2258,8 @@ yyreduce:
case 49:
-/* Line 1464 of yacc.c */
-#line 418 "glcpp/glcpp-parse.y"
+/* Line 1455 of yacc.c */
+#line 421 "glcpp/glcpp-parse.y"
{
(yyval.ival) = (yyvsp[(2) - (3)].ival);
;}
@@ -2272,37 +2267,37 @@ yyreduce:
case 50:
-/* Line 1464 of yacc.c */
-#line 424 "glcpp/glcpp-parse.y"
+/* Line 1455 of yacc.c */
+#line 427 "glcpp/glcpp-parse.y"
{
(yyval.string_list) = _string_list_create (parser);
_string_list_append_item ((yyval.string_list), (yyvsp[(1) - (1)].str));
- talloc_steal ((yyval.string_list), (yyvsp[(1) - (1)].str));
+ ralloc_steal ((yyval.string_list), (yyvsp[(1) - (1)].str));
;}
break;
case 51:
-/* Line 1464 of yacc.c */
-#line 429 "glcpp/glcpp-parse.y"
+/* Line 1455 of yacc.c */
+#line 432 "glcpp/glcpp-parse.y"
{
(yyval.string_list) = (yyvsp[(1) - (3)].string_list);
_string_list_append_item ((yyval.string_list), (yyvsp[(3) - (3)].str));
- talloc_steal ((yyval.string_list), (yyvsp[(3) - (3)].str));
+ ralloc_steal ((yyval.string_list), (yyvsp[(3) - (3)].str));
;}
break;
case 52:
-/* Line 1464 of yacc.c */
-#line 437 "glcpp/glcpp-parse.y"
+/* Line 1455 of yacc.c */
+#line 440 "glcpp/glcpp-parse.y"
{ (yyval.token_list) = NULL; ;}
break;
case 54:
-/* Line 1464 of yacc.c */
-#line 442 "glcpp/glcpp-parse.y"
+/* Line 1455 of yacc.c */
+#line 445 "glcpp/glcpp-parse.y"
{
yyerror (& (yylsp[(1) - (2)]), parser, "Invalid tokens after #");
;}
@@ -2310,15 +2305,15 @@ yyreduce:
case 55:
-/* Line 1464 of yacc.c */
-#line 448 "glcpp/glcpp-parse.y"
+/* Line 1455 of yacc.c */
+#line 451 "glcpp/glcpp-parse.y"
{ (yyval.token_list) = NULL; ;}
break;
case 58:
-/* Line 1464 of yacc.c */
-#line 454 "glcpp/glcpp-parse.y"
+/* Line 1455 of yacc.c */
+#line 457 "glcpp/glcpp-parse.y"
{
glcpp_warning(&(yylsp[(1) - (1)]), parser, "extra tokens at end of directive");
;}
@@ -2326,8 +2321,8 @@ yyreduce:
case 59:
-/* Line 1464 of yacc.c */
-#line 461 "glcpp/glcpp-parse.y"
+/* Line 1455 of yacc.c */
+#line 464 "glcpp/glcpp-parse.y"
{
int v = hash_table_find (parser->defines, (yyvsp[(2) - (2)].str)) ? 1 : 0;
(yyval.token) = _token_create_ival (parser, INTEGER, v);
@@ -2336,8 +2331,8 @@ yyreduce:
case 60:
-/* Line 1464 of yacc.c */
-#line 465 "glcpp/glcpp-parse.y"
+/* Line 1455 of yacc.c */
+#line 468 "glcpp/glcpp-parse.y"
{
int v = hash_table_find (parser->defines, (yyvsp[(3) - (4)].str)) ? 1 : 0;
(yyval.token) = _token_create_ival (parser, INTEGER, v);
@@ -2346,53 +2341,49 @@ yyreduce:
case 62:
-/* Line 1464 of yacc.c */
-#line 474 "glcpp/glcpp-parse.y"
+/* Line 1455 of yacc.c */
+#line 477 "glcpp/glcpp-parse.y"
{
(yyval.token_list) = _token_list_create (parser);
_token_list_append ((yyval.token_list), (yyvsp[(1) - (1)].token));
- talloc_unlink (parser, (yyvsp[(1) - (1)].token));
;}
break;
case 63:
-/* Line 1464 of yacc.c */
-#line 479 "glcpp/glcpp-parse.y"
+/* Line 1455 of yacc.c */
+#line 481 "glcpp/glcpp-parse.y"
{
(yyval.token_list) = (yyvsp[(1) - (2)].token_list);
_token_list_append ((yyval.token_list), (yyvsp[(2) - (2)].token));
- talloc_unlink (parser, (yyvsp[(2) - (2)].token));
;}
break;
case 64:
-/* Line 1464 of yacc.c */
-#line 487 "glcpp/glcpp-parse.y"
+/* Line 1455 of yacc.c */
+#line 488 "glcpp/glcpp-parse.y"
{
parser->space_tokens = 1;
(yyval.token_list) = _token_list_create (parser);
_token_list_append ((yyval.token_list), (yyvsp[(1) - (1)].token));
- talloc_unlink (parser, (yyvsp[(1) - (1)].token));
;}
break;
case 65:
-/* Line 1464 of yacc.c */
+/* Line 1455 of yacc.c */
#line 493 "glcpp/glcpp-parse.y"
{
(yyval.token_list) = (yyvsp[(1) - (2)].token_list);
_token_list_append ((yyval.token_list), (yyvsp[(2) - (2)].token));
- talloc_unlink (parser, (yyvsp[(2) - (2)].token));
;}
break;
case 66:
-/* Line 1464 of yacc.c */
-#line 501 "glcpp/glcpp-parse.y"
+/* Line 1455 of yacc.c */
+#line 500 "glcpp/glcpp-parse.y"
{
(yyval.token) = _token_create_str (parser, IDENTIFIER, (yyvsp[(1) - (1)].str));
(yyval.token)->location = yylloc;
@@ -2401,8 +2392,8 @@ yyreduce:
case 67:
-/* Line 1464 of yacc.c */
-#line 505 "glcpp/glcpp-parse.y"
+/* Line 1455 of yacc.c */
+#line 504 "glcpp/glcpp-parse.y"
{
(yyval.token) = _token_create_str (parser, INTEGER_STRING, (yyvsp[(1) - (1)].str));
(yyval.token)->location = yylloc;
@@ -2411,8 +2402,8 @@ yyreduce:
case 68:
-/* Line 1464 of yacc.c */
-#line 509 "glcpp/glcpp-parse.y"
+/* Line 1455 of yacc.c */
+#line 508 "glcpp/glcpp-parse.y"
{
(yyval.token) = _token_create_ival (parser, (yyvsp[(1) - (1)].ival), (yyvsp[(1) - (1)].ival));
(yyval.token)->location = yylloc;
@@ -2421,8 +2412,8 @@ yyreduce:
case 69:
-/* Line 1464 of yacc.c */
-#line 513 "glcpp/glcpp-parse.y"
+/* Line 1455 of yacc.c */
+#line 512 "glcpp/glcpp-parse.y"
{
(yyval.token) = _token_create_str (parser, OTHER, (yyvsp[(1) - (1)].str));
(yyval.token)->location = yylloc;
@@ -2431,8 +2422,8 @@ yyreduce:
case 70:
-/* Line 1464 of yacc.c */
-#line 517 "glcpp/glcpp-parse.y"
+/* Line 1455 of yacc.c */
+#line 516 "glcpp/glcpp-parse.y"
{
(yyval.token) = _token_create_ival (parser, SPACE, SPACE);
(yyval.token)->location = yylloc;
@@ -2441,225 +2432,225 @@ yyreduce:
case 71:
-/* Line 1464 of yacc.c */
-#line 524 "glcpp/glcpp-parse.y"
+/* Line 1455 of yacc.c */
+#line 523 "glcpp/glcpp-parse.y"
{ (yyval.ival) = '['; ;}
break;
case 72:
-/* Line 1464 of yacc.c */
-#line 525 "glcpp/glcpp-parse.y"
+/* Line 1455 of yacc.c */
+#line 524 "glcpp/glcpp-parse.y"
{ (yyval.ival) = ']'; ;}
break;
case 73:
-/* Line 1464 of yacc.c */
-#line 526 "glcpp/glcpp-parse.y"
+/* Line 1455 of yacc.c */
+#line 525 "glcpp/glcpp-parse.y"
{ (yyval.ival) = '('; ;}
break;
case 74:
-/* Line 1464 of yacc.c */
-#line 527 "glcpp/glcpp-parse.y"
+/* Line 1455 of yacc.c */
+#line 526 "glcpp/glcpp-parse.y"
{ (yyval.ival) = ')'; ;}
break;
case 75:
-/* Line 1464 of yacc.c */
-#line 528 "glcpp/glcpp-parse.y"
+/* Line 1455 of yacc.c */
+#line 527 "glcpp/glcpp-parse.y"
{ (yyval.ival) = '{'; ;}
break;
case 76:
-/* Line 1464 of yacc.c */
-#line 529 "glcpp/glcpp-parse.y"
+/* Line 1455 of yacc.c */
+#line 528 "glcpp/glcpp-parse.y"
{ (yyval.ival) = '}'; ;}
break;
case 77:
-/* Line 1464 of yacc.c */
-#line 530 "glcpp/glcpp-parse.y"
+/* Line 1455 of yacc.c */
+#line 529 "glcpp/glcpp-parse.y"
{ (yyval.ival) = '.'; ;}
break;
case 78:
-/* Line 1464 of yacc.c */
-#line 531 "glcpp/glcpp-parse.y"
+/* Line 1455 of yacc.c */
+#line 530 "glcpp/glcpp-parse.y"
{ (yyval.ival) = '&'; ;}
break;
case 79:
-/* Line 1464 of yacc.c */
-#line 532 "glcpp/glcpp-parse.y"
+/* Line 1455 of yacc.c */
+#line 531 "glcpp/glcpp-parse.y"
{ (yyval.ival) = '*'; ;}
break;
case 80:
-/* Line 1464 of yacc.c */
-#line 533 "glcpp/glcpp-parse.y"
+/* Line 1455 of yacc.c */
+#line 532 "glcpp/glcpp-parse.y"
{ (yyval.ival) = '+'; ;}
break;
case 81:
-/* Line 1464 of yacc.c */
-#line 534 "glcpp/glcpp-parse.y"
+/* Line 1455 of yacc.c */
+#line 533 "glcpp/glcpp-parse.y"
{ (yyval.ival) = '-'; ;}
break;
case 82:
-/* Line 1464 of yacc.c */
-#line 535 "glcpp/glcpp-parse.y"
+/* Line 1455 of yacc.c */
+#line 534 "glcpp/glcpp-parse.y"
{ (yyval.ival) = '~'; ;}
break;
case 83:
-/* Line 1464 of yacc.c */
-#line 536 "glcpp/glcpp-parse.y"
+/* Line 1455 of yacc.c */
+#line 535 "glcpp/glcpp-parse.y"
{ (yyval.ival) = '!'; ;}
break;
case 84:
-/* Line 1464 of yacc.c */
-#line 537 "glcpp/glcpp-parse.y"
+/* Line 1455 of yacc.c */
+#line 536 "glcpp/glcpp-parse.y"
{ (yyval.ival) = '/'; ;}
break;
case 85:
-/* Line 1464 of yacc.c */
-#line 538 "glcpp/glcpp-parse.y"
+/* Line 1455 of yacc.c */
+#line 537 "glcpp/glcpp-parse.y"
{ (yyval.ival) = '%'; ;}
break;
case 86:
-/* Line 1464 of yacc.c */
-#line 539 "glcpp/glcpp-parse.y"
+/* Line 1455 of yacc.c */
+#line 538 "glcpp/glcpp-parse.y"
{ (yyval.ival) = LEFT_SHIFT; ;}
break;
case 87:
-/* Line 1464 of yacc.c */
-#line 540 "glcpp/glcpp-parse.y"
+/* Line 1455 of yacc.c */
+#line 539 "glcpp/glcpp-parse.y"
{ (yyval.ival) = RIGHT_SHIFT; ;}
break;
case 88:
-/* Line 1464 of yacc.c */
-#line 541 "glcpp/glcpp-parse.y"
+/* Line 1455 of yacc.c */
+#line 540 "glcpp/glcpp-parse.y"
{ (yyval.ival) = '<'; ;}
break;
case 89:
-/* Line 1464 of yacc.c */
-#line 542 "glcpp/glcpp-parse.y"
+/* Line 1455 of yacc.c */
+#line 541 "glcpp/glcpp-parse.y"
{ (yyval.ival) = '>'; ;}
break;
case 90:
-/* Line 1464 of yacc.c */
-#line 543 "glcpp/glcpp-parse.y"
+/* Line 1455 of yacc.c */
+#line 542 "glcpp/glcpp-parse.y"
{ (yyval.ival) = LESS_OR_EQUAL; ;}
break;
case 91:
-/* Line 1464 of yacc.c */
-#line 544 "glcpp/glcpp-parse.y"
+/* Line 1455 of yacc.c */
+#line 543 "glcpp/glcpp-parse.y"
{ (yyval.ival) = GREATER_OR_EQUAL; ;}
break;
case 92:
-/* Line 1464 of yacc.c */
-#line 545 "glcpp/glcpp-parse.y"
+/* Line 1455 of yacc.c */
+#line 544 "glcpp/glcpp-parse.y"
{ (yyval.ival) = EQUAL; ;}
break;
case 93:
-/* Line 1464 of yacc.c */
-#line 546 "glcpp/glcpp-parse.y"
+/* Line 1455 of yacc.c */
+#line 545 "glcpp/glcpp-parse.y"
{ (yyval.ival) = NOT_EQUAL; ;}
break;
case 94:
-/* Line 1464 of yacc.c */
-#line 547 "glcpp/glcpp-parse.y"
+/* Line 1455 of yacc.c */
+#line 546 "glcpp/glcpp-parse.y"
{ (yyval.ival) = '^'; ;}
break;
case 95:
-/* Line 1464 of yacc.c */
-#line 548 "glcpp/glcpp-parse.y"
+/* Line 1455 of yacc.c */
+#line 547 "glcpp/glcpp-parse.y"
{ (yyval.ival) = '|'; ;}
break;
case 96:
-/* Line 1464 of yacc.c */
-#line 549 "glcpp/glcpp-parse.y"
+/* Line 1455 of yacc.c */
+#line 548 "glcpp/glcpp-parse.y"
{ (yyval.ival) = AND; ;}
break;
case 97:
-/* Line 1464 of yacc.c */
-#line 550 "glcpp/glcpp-parse.y"
+/* Line 1455 of yacc.c */
+#line 549 "glcpp/glcpp-parse.y"
{ (yyval.ival) = OR; ;}
break;
case 98:
-/* Line 1464 of yacc.c */
-#line 551 "glcpp/glcpp-parse.y"
+/* Line 1455 of yacc.c */
+#line 550 "glcpp/glcpp-parse.y"
{ (yyval.ival) = ';'; ;}
break;
case 99:
-/* Line 1464 of yacc.c */
-#line 552 "glcpp/glcpp-parse.y"
+/* Line 1455 of yacc.c */
+#line 551 "glcpp/glcpp-parse.y"
{ (yyval.ival) = ','; ;}
break;
case 100:
-/* Line 1464 of yacc.c */
-#line 553 "glcpp/glcpp-parse.y"
+/* Line 1455 of yacc.c */
+#line 552 "glcpp/glcpp-parse.y"
{ (yyval.ival) = '='; ;}
break;
case 101:
-/* Line 1464 of yacc.c */
-#line 554 "glcpp/glcpp-parse.y"
+/* Line 1455 of yacc.c */
+#line 553 "glcpp/glcpp-parse.y"
{ (yyval.ival) = PASTE; ;}
break;
-/* Line 1464 of yacc.c */
-#line 2663 "glcpp/glcpp-parse.c"
+/* Line 1455 of yacc.c */
+#line 2654 "glcpp/glcpp-parse.c"
default: break;
}
YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
@@ -2731,7 +2722,7 @@ yyerrlab:
#endif
}
- yyerror_range[1] = yylloc;
+ yyerror_range[0] = yylloc;
if (yyerrstatus == 3)
{
@@ -2768,7 +2759,7 @@ yyerrorlab:
if (/*CONSTCOND*/ 0)
goto yyerrorlab;
- yyerror_range[1] = yylsp[1-yylen];
+ yyerror_range[0] = yylsp[1-yylen];
/* Do not reclaim the symbols of the rule which action triggered
this YYERROR. */
YYPOPSTACK (yylen);
@@ -2802,7 +2793,7 @@ yyerrlab1:
if (yyssp == yyss)
YYABORT;
- yyerror_range[1] = *yylsp;
+ yyerror_range[0] = *yylsp;
yydestruct ("Error: popping",
yystos[yystate], yyvsp, yylsp, parser);
YYPOPSTACK (1);
@@ -2812,10 +2803,10 @@ yyerrlab1:
*++yyvsp = yylval;
- yyerror_range[2] = yylloc;
+ yyerror_range[1] = yylloc;
/* Using YYLLOC is tempting, but would change the location of
the lookahead. YYLOC is available though. */
- YYLLOC_DEFAULT (yyloc, yyerror_range, 2);
+ YYLLOC_DEFAULT (yyloc, (yyerror_range - 1), 2);
*++yylsp = yyloc;
/* Shift the error token. */
@@ -2877,8 +2868,8 @@ yyreturn:
-/* Line 1684 of yacc.c */
-#line 557 "glcpp/glcpp-parse.y"
+/* Line 1675 of yacc.c */
+#line 556 "glcpp/glcpp-parse.y"
string_list_t *
@@ -2886,7 +2877,7 @@ _string_list_create (void *ctx)
{
string_list_t *list;
- list = talloc (ctx, string_list_t);
+ list = ralloc (ctx, string_list_t);
list->head = NULL;
list->tail = NULL;
@@ -2898,8 +2889,8 @@ _string_list_append_item (string_list_t *list, const char *str)
{
string_node_t *node;
- node = talloc (list, string_node_t);
- node->str = talloc_strdup (node, str);
+ node = ralloc (list, string_node_t);
+ node->str = ralloc_strdup (node, str);
node->next = NULL;
@@ -2977,7 +2968,7 @@ _argument_list_create (void *ctx)
{
argument_list_t *list;
- list = talloc (ctx, argument_list_t);
+ list = ralloc (ctx, argument_list_t);
list->head = NULL;
list->tail = NULL;
@@ -2989,7 +2980,7 @@ _argument_list_append (argument_list_t *list, token_list_t *argument)
{
argument_node_t *node;
- node = talloc (list, argument_node_t);
+ node = ralloc (list, argument_node_t);
node->argument = argument;
node->next = NULL;
@@ -3040,15 +3031,17 @@ _argument_list_member_at (argument_list_t *list, int index)
return NULL;
}
-/* Note: This function talloc_steal()s the str pointer. */
+/* Note: This function ralloc_steal()s the str pointer. */
token_t *
_token_create_str (void *ctx, int type, char *str)
{
token_t *token;
- token = talloc (ctx, token_t);
+ token = ralloc (ctx, token_t);
token->type = type;
- token->value.str = talloc_steal (token, str);
+ token->value.str = str;
+
+ ralloc_steal (token, str);
return token;
}
@@ -3058,7 +3051,7 @@ _token_create_ival (void *ctx, int type, int ival)
{
token_t *token;
- token = talloc (ctx, token_t);
+ token = ralloc (ctx, token_t);
token->type = type;
token->value.ival = ival;
@@ -3070,7 +3063,7 @@ _token_list_create (void *ctx)
{
token_list_t *list;
- list = talloc (ctx, token_list_t);
+ list = ralloc (ctx, token_list_t);
list->head = NULL;
list->tail = NULL;
list->non_space_tail = NULL;
@@ -3083,11 +3076,12 @@ _token_list_append (token_list_t *list, token_t *token)
{
token_node_t *node;
- node = talloc (list, token_node_t);
- node->token = talloc_reference (list, token);
-
+ node = ralloc (list, token_node_t);
+ node->token = token;
node->next = NULL;
+ ralloc_steal (list, token);
+
if (list->head == NULL) {
list->head = node;
} else {
@@ -3125,8 +3119,11 @@ _token_list_copy (void *ctx, token_list_t *other)
return NULL;
copy = _token_list_create (ctx);
- for (node = other->head; node; node = node->next)
- _token_list_append (copy, node->token);
+ for (node = other->head; node; node = node->next) {
+ token_t *new_token = ralloc (copy, token_t);
+ *new_token = *node->token;
+ _token_list_append (copy, new_token);
+ }
return copy;
}
@@ -3143,17 +3140,38 @@ _token_list_trim_trailing_space (token_list_t *list)
while (tail) {
next = tail->next;
- talloc_free (tail);
+ ralloc_free (tail);
tail = next;
}
}
}
+static int
+_token_list_is_empty_ignoring_space (token_list_t *l)
+{
+ token_node_t *n;
+
+ if (l == NULL)
+ return 1;
+
+ n = l->head;
+ while (n != NULL && n->token->type == SPACE)
+ n = n->next;
+
+ return n == NULL;
+}
+
int
_token_list_equal_ignoring_space (token_list_t *a, token_list_t *b)
{
token_node_t *node_a, *node_b;
+ if (a == NULL || b == NULL) {
+ int a_empty = _token_list_is_empty_ignoring_space(a);
+ int b_empty = _token_list_is_empty_ignoring_space(b);
+ return a_empty == b_empty;
+ }
+
node_a = a->head;
node_b = b->head;
@@ -3208,51 +3226,51 @@ static void
_token_print (char **out, token_t *token)
{
if (token->type < 256) {
- glcpp_printf (*out, "%c", token->type);
+ ralloc_asprintf_append (out, "%c", token->type);
return;
}
switch (token->type) {
case INTEGER:
- glcpp_printf (*out, "%" PRIiMAX, token->value.ival);
+ ralloc_asprintf_append (out, "%" PRIiMAX, token->value.ival);
break;
case IDENTIFIER:
case INTEGER_STRING:
case OTHER:
- glcpp_print (*out, token->value.str);
+ ralloc_strcat (out, token->value.str);
break;
case SPACE:
- glcpp_print (*out, " ");
+ ralloc_strcat (out, " ");
break;
case LEFT_SHIFT:
- glcpp_print (*out, "<<");
+ ralloc_strcat (out, "<<");
break;
case RIGHT_SHIFT:
- glcpp_print (*out, ">>");
+ ralloc_strcat (out, ">>");
break;
case LESS_OR_EQUAL:
- glcpp_print (*out, "<=");
+ ralloc_strcat (out, "<=");
break;
case GREATER_OR_EQUAL:
- glcpp_print (*out, ">=");
+ ralloc_strcat (out, ">=");
break;
case EQUAL:
- glcpp_print (*out, "==");
+ ralloc_strcat (out, "==");
break;
case NOT_EQUAL:
- glcpp_print (*out, "!=");
+ ralloc_strcat (out, "!=");
break;
case AND:
- glcpp_print (*out, "&&");
+ ralloc_strcat (out, "&&");
break;
case OR:
- glcpp_print (*out, "||");
+ ralloc_strcat (out, "||");
break;
case PASTE:
- glcpp_print (*out, "##");
+ ralloc_strcat (out, "##");
break;
case COMMA_FINAL:
- glcpp_print (*out, ",");
+ ralloc_strcat (out, ",");
break;
case PLACEHOLDER:
/* Nothing to print. */
@@ -3263,7 +3281,7 @@ _token_print (char **out, token_t *token)
}
}
-/* Return a new token (talloc()ed off of 'token') formed by pasting
+/* Return a new token (ralloc()ed off of 'token') formed by pasting
* 'token' and 'other'. Note that this function may return 'token' or
* 'other' directly rather than allocating anything new.
*
@@ -3334,7 +3352,7 @@ _token_paste (glcpp_parser_t *parser, token_t *token, token_t *other)
{
char *str;
- str = talloc_asprintf (token, "%s%s", token->value.str,
+ str = ralloc_asprintf (token, "%s%s", token->value.str,
other->value.str);
combined = _token_create_str (token, token->type, str);
combined->location = token->location;
@@ -3342,11 +3360,11 @@ _token_paste (glcpp_parser_t *parser, token_t *token, token_t *other)
}
glcpp_error (&token->location, parser, "");
- glcpp_print (parser->info_log, "Pasting \"");
+ ralloc_strcat (&parser->info_log, "Pasting \"");
_token_print (&parser->info_log, token);
- glcpp_print (parser->info_log, "\" and \"");
+ ralloc_strcat (&parser->info_log, "\" and \"");
_token_print (&parser->info_log, other);
- glcpp_print (parser->info_log, "\" does not give a valid preprocessing token.\n");
+ ralloc_strcat (&parser->info_log, "\" does not give a valid preprocessing token.\n");
return token;
}
@@ -3380,8 +3398,6 @@ static void add_builtin_define(glcpp_parser_t *parser,
list = _token_list_create(parser);
_token_list_append(list, tok);
_define_object_macro(parser, NULL, name, list);
-
- talloc_unlink(parser, tok);
}
glcpp_parser_t *
@@ -3390,7 +3406,7 @@ glcpp_parser_create (const struct gl_extensions *extensions, int api)
glcpp_parser_t *parser;
int language_version;
- parser = talloc (NULL, glcpp_parser_t);
+ parser = ralloc (NULL, glcpp_parser_t);
glcpp_lex_init_extra (parser, &parser->scanner);
parser->defines = hash_table_ctor (32, hash_table_string_hash,
@@ -3407,8 +3423,8 @@ glcpp_parser_create (const struct gl_extensions *extensions, int api)
parser->lex_from_list = NULL;
parser->lex_from_node = NULL;
- parser->output = talloc_strdup(parser, "");
- parser->info_log = talloc_strdup(parser, "");
+ parser->output = ralloc_strdup(parser, "");
+ parser->info_log = ralloc_strdup(parser, "");
parser->error = 0;
/* Add pre-defined macros. */
@@ -3429,6 +3445,8 @@ glcpp_parser_create (const struct gl_extensions *extensions, int api)
if (extensions->ARB_explicit_attrib_location)
add_builtin_define(parser, "GL_ARB_explicit_attrib_location", 1);
+ if (extensions->AMD_conservative_depth)
+ add_builtin_define(parser, "GL_AMD_conservative_depth", 1);
}
language_version = 110;
@@ -3448,7 +3466,7 @@ glcpp_parser_destroy (glcpp_parser_t *parser)
{
glcpp_lex_destroy (parser->scanner);
hash_table_dtor (parser->defines);
- talloc_free (parser);
+ ralloc_free (parser);
}
typedef enum function_status
@@ -3619,7 +3637,7 @@ _glcpp_parser_expand_function (glcpp_parser_t *parser,
/* Replace a macro defined as empty with a SPACE token. */
if (macro->replacements == NULL) {
- talloc_free (arguments);
+ ralloc_free (arguments);
return _token_list_create_with_one_space (parser);
}
@@ -3775,7 +3793,7 @@ _glcpp_parser_expand_node (glcpp_parser_t *parser,
token_list_t *expansion;
token_t *final;
- str = talloc_strdup (parser, token->value.str);
+ str = ralloc_strdup (parser, token->value.str);
final = _token_create_str (parser, OTHER, str);
expansion = _token_list_create (parser);
_token_list_append (expansion, final);
@@ -3811,8 +3829,8 @@ _active_list_push (active_list_t *list,
{
active_list_t *node;
- node = talloc (list, active_list_t);
- node->identifier = talloc_strdup (node, identifier);
+ node = ralloc (list, active_list_t);
+ node->identifier = ralloc_strdup (node, identifier);
node->marker = marker;
node->next = list;
@@ -3828,7 +3846,7 @@ _active_list_pop (active_list_t *list)
return NULL;
node = list->next;
- talloc_free (list);
+ ralloc_free (list);
return node;
}
@@ -3977,17 +3995,18 @@ _define_object_macro (glcpp_parser_t *parser,
if (loc != NULL)
_check_for_reserved_macro_name(parser, loc, identifier);
- macro = talloc (parser, macro_t);
+ macro = ralloc (parser, macro_t);
macro->is_function = 0;
macro->parameters = NULL;
- macro->identifier = talloc_strdup (macro, identifier);
- macro->replacements = talloc_steal (macro, replacements);
+ macro->identifier = ralloc_strdup (macro, identifier);
+ macro->replacements = replacements;
+ ralloc_steal (macro, replacements);
previous = hash_table_find (parser->defines, identifier);
if (previous) {
if (_macro_equal (macro, previous)) {
- talloc_free (macro);
+ ralloc_free (macro);
return;
}
glcpp_error (loc, parser, "Redefinition of macro %s\n",
@@ -4008,17 +4027,18 @@ _define_function_macro (glcpp_parser_t *parser,
_check_for_reserved_macro_name(parser, loc, identifier);
- macro = talloc (parser, macro_t);
+ macro = ralloc (parser, macro_t);
+ ralloc_steal (macro, parameters);
+ ralloc_steal (macro, replacements);
macro->is_function = 1;
- macro->parameters = talloc_steal (macro, parameters);
- macro->identifier = talloc_strdup (macro, identifier);
- macro->replacements = talloc_steal (macro, replacements);
-
+ macro->parameters = parameters;
+ macro->identifier = ralloc_strdup (macro, identifier);
+ macro->replacements = replacements;
previous = hash_table_find (parser->defines, identifier);
if (previous) {
if (_macro_equal (macro, previous)) {
- talloc_free (macro);
+ ralloc_free (macro);
return;
}
glcpp_error (loc, parser, "Redefinition of macro %s\n",
@@ -4094,7 +4114,7 @@ glcpp_parser_lex (YYSTYPE *yylval, YYLTYPE *yylloc, glcpp_parser_t *parser)
node = parser->lex_from_node;
if (node == NULL) {
- talloc_free (parser->lex_from_list);
+ ralloc_free (parser->lex_from_list);
parser->lex_from_list = NULL;
return NEWLINE;
}
@@ -4123,13 +4143,13 @@ glcpp_parser_lex_from (glcpp_parser_t *parser, token_list_t *list)
_token_list_append (parser->lex_from_list, node->token);
}
- talloc_free (list);
+ ralloc_free (list);
parser->lex_from_node = parser->lex_from_list->head;
/* It's possible the list consisted of nothing but whitespace. */
if (parser->lex_from_node == NULL) {
- talloc_free (parser->lex_from_list);
+ ralloc_free (parser->lex_from_list);
parser->lex_from_list = NULL;
}
}
@@ -4144,7 +4164,7 @@ _glcpp_parser_skip_stack_push_if (glcpp_parser_t *parser, YYLTYPE *loc,
if (parser->skip_stack)
current = parser->skip_stack->type;
- node = talloc (parser, skip_node_t);
+ node = ralloc (parser, skip_node_t);
node->loc = *loc;
if (current == SKIP_NO_SKIP) {
@@ -4189,6 +4209,6 @@ _glcpp_parser_skip_stack_pop (glcpp_parser_t *parser, YYLTYPE *loc)
node = parser->skip_stack;
parser->skip_stack = node->next;
- talloc_free (node);
+ ralloc_free (node);
}
diff --git a/src/glsl/glcpp/glcpp-parse.h b/src/glsl/glcpp/glcpp-parse.h
index 40556854f38..50758930e9c 100644
--- a/src/glsl/glcpp/glcpp-parse.h
+++ b/src/glsl/glcpp/glcpp-parse.h
@@ -1,9 +1,10 @@
-/* A Bison parser, made by GNU Bison 2.4.3. */
+
+/* A Bison parser, made by GNU Bison 2.4.1. */
/* Skeleton interface for Bison's Yacc-like parsers in C
- Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2009, 2010 Free Software Foundation, Inc.
+ Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+ Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/src/glsl/glcpp/glcpp-parse.y b/src/glsl/glcpp/glcpp-parse.y
index 558ad0acacc..1f6e67fa062 100644
--- a/src/glsl/glcpp/glcpp-parse.y
+++ b/src/glsl/glcpp/glcpp-parse.y
@@ -32,10 +32,6 @@
#include "main/core.h" /* for struct gl_extensions */
#include "main/mtypes.h" /* for gl_api enum */
-#define glcpp_print(stream, str) stream = talloc_strdup_append(stream, str)
-#define glcpp_printf(stream, fmt, args, ...) \
- stream = talloc_asprintf_append(stream, fmt, args)
-
static void
yyerror (YYLTYPE *locp, glcpp_parser_t *parser, const char *error);
@@ -79,7 +75,7 @@ _argument_list_length (argument_list_t *list);
static token_list_t *
_argument_list_member_at (argument_list_t *list, int index);
-/* Note: This function talloc_steal()s the str pointer. */
+/* Note: This function ralloc_steal()s the str pointer. */
static token_t *
_token_create_str (void *ctx, int type, char *str);
@@ -89,10 +85,7 @@ _token_create_ival (void *ctx, int type, int ival);
static token_list_t *
_token_list_create (void *ctx);
-/* Note: This function adds a talloc_reference() to token.
- *
- * You may want to talloc_unlink any current reference if you no
- * longer need it. */
+/* Note: This function calls ralloc_steal on token. */
static void
_token_list_append (token_list_t *list, token_t *token);
@@ -192,12 +185,12 @@ input:
line:
control_line {
- glcpp_print(parser->output, "\n");
+ ralloc_strcat (&parser->output, "\n");
}
| text_line {
_glcpp_parser_print_expanded_token_list (parser, $1);
- glcpp_print(parser->output, "\n");
- talloc_free ($1);
+ ralloc_strcat (&parser->output, "\n");
+ ralloc_free ($1);
}
| expanded_line
| HASH non_directive
@@ -226,9 +219,9 @@ control_line:
macro_t *macro = hash_table_find (parser->defines, $2);
if (macro) {
hash_table_remove (parser->defines, $2);
- talloc_free (macro);
+ ralloc_free (macro);
}
- talloc_free ($2);
+ ralloc_free ($2);
}
| HASH_IF conditional_tokens NEWLINE {
/* Be careful to only evaluate the 'if' expression if
@@ -261,12 +254,12 @@ control_line:
}
| HASH_IFDEF IDENTIFIER junk NEWLINE {
macro_t *macro = hash_table_find (parser->defines, $2);
- talloc_free ($2);
+ ralloc_free ($2);
_glcpp_parser_skip_stack_push_if (parser, & @1, macro != NULL);
}
| HASH_IFNDEF IDENTIFIER junk NEWLINE {
macro_t *macro = hash_table_find (parser->defines, $2);
- talloc_free ($2);
+ ralloc_free ($2);
_glcpp_parser_skip_stack_push_if (parser, & @1, macro == NULL);
}
| HASH_ELIF conditional_tokens NEWLINE {
@@ -313,7 +306,7 @@ control_line:
macro_t *macro = hash_table_find (parser->defines, "__VERSION__");
if (macro) {
hash_table_remove (parser->defines, "__VERSION__");
- talloc_free (macro);
+ ralloc_free (macro);
}
add_builtin_define (parser, "__VERSION__", $2);
@@ -328,7 +321,7 @@ control_line:
if ($2 >= 130 || $2 == 100)
add_builtin_define (parser, "GL_FRAGMENT_PRECISION_HIGH", 1);
- glcpp_printf(parser->output, "#version %" PRIiMAX, $2);
+ ralloc_asprintf_append (&parser->output, "#version %" PRIiMAX, $2);
}
| HASH NEWLINE
;
@@ -395,10 +388,20 @@ expression:
$$ = $1 + $3;
}
| expression '%' expression {
- $$ = $1 % $3;
+ if ($3 == 0) {
+ yyerror (& @1, parser,
+ "zero modulus in preprocessor directive");
+ } else {
+ $$ = $1 % $3;
+ }
}
| expression '/' expression {
- $$ = $1 / $3;
+ if ($3 == 0) {
+ yyerror (& @1, parser,
+ "division by 0 in preprocessor directive");
+ } else {
+ $$ = $1 / $3;
+ }
}
| expression '*' expression {
$$ = $1 * $3;
@@ -424,12 +427,12 @@ identifier_list:
IDENTIFIER {
$$ = _string_list_create (parser);
_string_list_append_item ($$, $1);
- talloc_steal ($$, $1);
+ ralloc_steal ($$, $1);
}
| identifier_list ',' IDENTIFIER {
$$ = $1;
_string_list_append_item ($$, $3);
- talloc_steal ($$, $3);
+ ralloc_steal ($$, $3);
}
;
@@ -474,12 +477,10 @@ conditional_tokens:
conditional_token {
$$ = _token_list_create (parser);
_token_list_append ($$, $1);
- talloc_unlink (parser, $1);
}
| conditional_tokens conditional_token {
$$ = $1;
_token_list_append ($$, $2);
- talloc_unlink (parser, $2);
}
;
@@ -488,12 +489,10 @@ pp_tokens:
parser->space_tokens = 1;
$$ = _token_list_create (parser);
_token_list_append ($$, $1);
- talloc_unlink (parser, $1);
}
| pp_tokens preprocessing_token {
$$ = $1;
_token_list_append ($$, $2);
- talloc_unlink (parser, $2);
}
;
@@ -561,7 +560,7 @@ _string_list_create (void *ctx)
{
string_list_t *list;
- list = talloc (ctx, string_list_t);
+ list = ralloc (ctx, string_list_t);
list->head = NULL;
list->tail = NULL;
@@ -573,8 +572,8 @@ _string_list_append_item (string_list_t *list, const char *str)
{
string_node_t *node;
- node = talloc (list, string_node_t);
- node->str = talloc_strdup (node, str);
+ node = ralloc (list, string_node_t);
+ node->str = ralloc_strdup (node, str);
node->next = NULL;
@@ -652,7 +651,7 @@ _argument_list_create (void *ctx)
{
argument_list_t *list;
- list = talloc (ctx, argument_list_t);
+ list = ralloc (ctx, argument_list_t);
list->head = NULL;
list->tail = NULL;
@@ -664,7 +663,7 @@ _argument_list_append (argument_list_t *list, token_list_t *argument)
{
argument_node_t *node;
- node = talloc (list, argument_node_t);
+ node = ralloc (list, argument_node_t);
node->argument = argument;
node->next = NULL;
@@ -715,15 +714,17 @@ _argument_list_member_at (argument_list_t *list, int index)
return NULL;
}
-/* Note: This function talloc_steal()s the str pointer. */
+/* Note: This function ralloc_steal()s the str pointer. */
token_t *
_token_create_str (void *ctx, int type, char *str)
{
token_t *token;
- token = talloc (ctx, token_t);
+ token = ralloc (ctx, token_t);
token->type = type;
- token->value.str = talloc_steal (token, str);
+ token->value.str = str;
+
+ ralloc_steal (token, str);
return token;
}
@@ -733,7 +734,7 @@ _token_create_ival (void *ctx, int type, int ival)
{
token_t *token;
- token = talloc (ctx, token_t);
+ token = ralloc (ctx, token_t);
token->type = type;
token->value.ival = ival;
@@ -745,7 +746,7 @@ _token_list_create (void *ctx)
{
token_list_t *list;
- list = talloc (ctx, token_list_t);
+ list = ralloc (ctx, token_list_t);
list->head = NULL;
list->tail = NULL;
list->non_space_tail = NULL;
@@ -758,11 +759,12 @@ _token_list_append (token_list_t *list, token_t *token)
{
token_node_t *node;
- node = talloc (list, token_node_t);
- node->token = talloc_reference (list, token);
-
+ node = ralloc (list, token_node_t);
+ node->token = token;
node->next = NULL;
+ ralloc_steal (list, token);
+
if (list->head == NULL) {
list->head = node;
} else {
@@ -800,8 +802,11 @@ _token_list_copy (void *ctx, token_list_t *other)
return NULL;
copy = _token_list_create (ctx);
- for (node = other->head; node; node = node->next)
- _token_list_append (copy, node->token);
+ for (node = other->head; node; node = node->next) {
+ token_t *new_token = ralloc (copy, token_t);
+ *new_token = *node->token;
+ _token_list_append (copy, new_token);
+ }
return copy;
}
@@ -818,17 +823,38 @@ _token_list_trim_trailing_space (token_list_t *list)
while (tail) {
next = tail->next;
- talloc_free (tail);
+ ralloc_free (tail);
tail = next;
}
}
}
+static int
+_token_list_is_empty_ignoring_space (token_list_t *l)
+{
+ token_node_t *n;
+
+ if (l == NULL)
+ return 1;
+
+ n = l->head;
+ while (n != NULL && n->token->type == SPACE)
+ n = n->next;
+
+ return n == NULL;
+}
+
int
_token_list_equal_ignoring_space (token_list_t *a, token_list_t *b)
{
token_node_t *node_a, *node_b;
+ if (a == NULL || b == NULL) {
+ int a_empty = _token_list_is_empty_ignoring_space(a);
+ int b_empty = _token_list_is_empty_ignoring_space(b);
+ return a_empty == b_empty;
+ }
+
node_a = a->head;
node_b = b->head;
@@ -883,51 +909,51 @@ static void
_token_print (char **out, token_t *token)
{
if (token->type < 256) {
- glcpp_printf (*out, "%c", token->type);
+ ralloc_asprintf_append (out, "%c", token->type);
return;
}
switch (token->type) {
case INTEGER:
- glcpp_printf (*out, "%" PRIiMAX, token->value.ival);
+ ralloc_asprintf_append (out, "%" PRIiMAX, token->value.ival);
break;
case IDENTIFIER:
case INTEGER_STRING:
case OTHER:
- glcpp_print (*out, token->value.str);
+ ralloc_strcat (out, token->value.str);
break;
case SPACE:
- glcpp_print (*out, " ");
+ ralloc_strcat (out, " ");
break;
case LEFT_SHIFT:
- glcpp_print (*out, "<<");
+ ralloc_strcat (out, "<<");
break;
case RIGHT_SHIFT:
- glcpp_print (*out, ">>");
+ ralloc_strcat (out, ">>");
break;
case LESS_OR_EQUAL:
- glcpp_print (*out, "<=");
+ ralloc_strcat (out, "<=");
break;
case GREATER_OR_EQUAL:
- glcpp_print (*out, ">=");
+ ralloc_strcat (out, ">=");
break;
case EQUAL:
- glcpp_print (*out, "==");
+ ralloc_strcat (out, "==");
break;
case NOT_EQUAL:
- glcpp_print (*out, "!=");
+ ralloc_strcat (out, "!=");
break;
case AND:
- glcpp_print (*out, "&&");
+ ralloc_strcat (out, "&&");
break;
case OR:
- glcpp_print (*out, "||");
+ ralloc_strcat (out, "||");
break;
case PASTE:
- glcpp_print (*out, "##");
+ ralloc_strcat (out, "##");
break;
case COMMA_FINAL:
- glcpp_print (*out, ",");
+ ralloc_strcat (out, ",");
break;
case PLACEHOLDER:
/* Nothing to print. */
@@ -938,7 +964,7 @@ _token_print (char **out, token_t *token)
}
}
-/* Return a new token (talloc()ed off of 'token') formed by pasting
+/* Return a new token (ralloc()ed off of 'token') formed by pasting
* 'token' and 'other'. Note that this function may return 'token' or
* 'other' directly rather than allocating anything new.
*
@@ -1009,7 +1035,7 @@ _token_paste (glcpp_parser_t *parser, token_t *token, token_t *other)
{
char *str;
- str = talloc_asprintf (token, "%s%s", token->value.str,
+ str = ralloc_asprintf (token, "%s%s", token->value.str,
other->value.str);
combined = _token_create_str (token, token->type, str);
combined->location = token->location;
@@ -1017,11 +1043,11 @@ _token_paste (glcpp_parser_t *parser, token_t *token, token_t *other)
}
glcpp_error (&token->location, parser, "");
- glcpp_print (parser->info_log, "Pasting \"");
+ ralloc_strcat (&parser->info_log, "Pasting \"");
_token_print (&parser->info_log, token);
- glcpp_print (parser->info_log, "\" and \"");
+ ralloc_strcat (&parser->info_log, "\" and \"");
_token_print (&parser->info_log, other);
- glcpp_print (parser->info_log, "\" does not give a valid preprocessing token.\n");
+ ralloc_strcat (&parser->info_log, "\" does not give a valid preprocessing token.\n");
return token;
}
@@ -1055,8 +1081,6 @@ static void add_builtin_define(glcpp_parser_t *parser,
list = _token_list_create(parser);
_token_list_append(list, tok);
_define_object_macro(parser, NULL, name, list);
-
- talloc_unlink(parser, tok);
}
glcpp_parser_t *
@@ -1065,7 +1089,7 @@ glcpp_parser_create (const struct gl_extensions *extensions, int api)
glcpp_parser_t *parser;
int language_version;
- parser = talloc (NULL, glcpp_parser_t);
+ parser = ralloc (NULL, glcpp_parser_t);
glcpp_lex_init_extra (parser, &parser->scanner);
parser->defines = hash_table_ctor (32, hash_table_string_hash,
@@ -1082,8 +1106,8 @@ glcpp_parser_create (const struct gl_extensions *extensions, int api)
parser->lex_from_list = NULL;
parser->lex_from_node = NULL;
- parser->output = talloc_strdup(parser, "");
- parser->info_log = talloc_strdup(parser, "");
+ parser->output = ralloc_strdup(parser, "");
+ parser->info_log = ralloc_strdup(parser, "");
parser->error = 0;
/* Add pre-defined macros. */
@@ -1104,6 +1128,8 @@ glcpp_parser_create (const struct gl_extensions *extensions, int api)
if (extensions->ARB_explicit_attrib_location)
add_builtin_define(parser, "GL_ARB_explicit_attrib_location", 1);
+ if (extensions->AMD_conservative_depth)
+ add_builtin_define(parser, "GL_AMD_conservative_depth", 1);
}
language_version = 110;
@@ -1123,7 +1149,7 @@ glcpp_parser_destroy (glcpp_parser_t *parser)
{
glcpp_lex_destroy (parser->scanner);
hash_table_dtor (parser->defines);
- talloc_free (parser);
+ ralloc_free (parser);
}
typedef enum function_status
@@ -1294,7 +1320,7 @@ _glcpp_parser_expand_function (glcpp_parser_t *parser,
/* Replace a macro defined as empty with a SPACE token. */
if (macro->replacements == NULL) {
- talloc_free (arguments);
+ ralloc_free (arguments);
return _token_list_create_with_one_space (parser);
}
@@ -1450,7 +1476,7 @@ _glcpp_parser_expand_node (glcpp_parser_t *parser,
token_list_t *expansion;
token_t *final;
- str = talloc_strdup (parser, token->value.str);
+ str = ralloc_strdup (parser, token->value.str);
final = _token_create_str (parser, OTHER, str);
expansion = _token_list_create (parser);
_token_list_append (expansion, final);
@@ -1486,8 +1512,8 @@ _active_list_push (active_list_t *list,
{
active_list_t *node;
- node = talloc (list, active_list_t);
- node->identifier = talloc_strdup (node, identifier);
+ node = ralloc (list, active_list_t);
+ node->identifier = ralloc_strdup (node, identifier);
node->marker = marker;
node->next = list;
@@ -1503,7 +1529,7 @@ _active_list_pop (active_list_t *list)
return NULL;
node = list->next;
- talloc_free (list);
+ ralloc_free (list);
return node;
}
@@ -1652,17 +1678,18 @@ _define_object_macro (glcpp_parser_t *parser,
if (loc != NULL)
_check_for_reserved_macro_name(parser, loc, identifier);
- macro = talloc (parser, macro_t);
+ macro = ralloc (parser, macro_t);
macro->is_function = 0;
macro->parameters = NULL;
- macro->identifier = talloc_strdup (macro, identifier);
- macro->replacements = talloc_steal (macro, replacements);
+ macro->identifier = ralloc_strdup (macro, identifier);
+ macro->replacements = replacements;
+ ralloc_steal (macro, replacements);
previous = hash_table_find (parser->defines, identifier);
if (previous) {
if (_macro_equal (macro, previous)) {
- talloc_free (macro);
+ ralloc_free (macro);
return;
}
glcpp_error (loc, parser, "Redefinition of macro %s\n",
@@ -1683,17 +1710,18 @@ _define_function_macro (glcpp_parser_t *parser,
_check_for_reserved_macro_name(parser, loc, identifier);
- macro = talloc (parser, macro_t);
+ macro = ralloc (parser, macro_t);
+ ralloc_steal (macro, parameters);
+ ralloc_steal (macro, replacements);
macro->is_function = 1;
- macro->parameters = talloc_steal (macro, parameters);
- macro->identifier = talloc_strdup (macro, identifier);
- macro->replacements = talloc_steal (macro, replacements);
-
+ macro->parameters = parameters;
+ macro->identifier = ralloc_strdup (macro, identifier);
+ macro->replacements = replacements;
previous = hash_table_find (parser->defines, identifier);
if (previous) {
if (_macro_equal (macro, previous)) {
- talloc_free (macro);
+ ralloc_free (macro);
return;
}
glcpp_error (loc, parser, "Redefinition of macro %s\n",
@@ -1769,7 +1797,7 @@ glcpp_parser_lex (YYSTYPE *yylval, YYLTYPE *yylloc, glcpp_parser_t *parser)
node = parser->lex_from_node;
if (node == NULL) {
- talloc_free (parser->lex_from_list);
+ ralloc_free (parser->lex_from_list);
parser->lex_from_list = NULL;
return NEWLINE;
}
@@ -1798,13 +1826,13 @@ glcpp_parser_lex_from (glcpp_parser_t *parser, token_list_t *list)
_token_list_append (parser->lex_from_list, node->token);
}
- talloc_free (list);
+ ralloc_free (list);
parser->lex_from_node = parser->lex_from_list->head;
/* It's possible the list consisted of nothing but whitespace. */
if (parser->lex_from_node == NULL) {
- talloc_free (parser->lex_from_list);
+ ralloc_free (parser->lex_from_list);
parser->lex_from_list = NULL;
}
}
@@ -1819,7 +1847,7 @@ _glcpp_parser_skip_stack_push_if (glcpp_parser_t *parser, YYLTYPE *loc,
if (parser->skip_stack)
current = parser->skip_stack->type;
- node = talloc (parser, skip_node_t);
+ node = ralloc (parser, skip_node_t);
node->loc = *loc;
if (current == SKIP_NO_SKIP) {
@@ -1864,5 +1892,5 @@ _glcpp_parser_skip_stack_pop (glcpp_parser_t *parser, YYLTYPE *loc)
node = parser->skip_stack;
parser->skip_stack = node->next;
- talloc_free (node);
+ ralloc_free (node);
}
diff --git a/src/glsl/glcpp/glcpp.c b/src/glsl/glcpp/glcpp.c
index 062eb6b72d4..325289129d5 100644
--- a/src/glsl/glcpp/glcpp.c
+++ b/src/glsl/glcpp/glcpp.c
@@ -21,10 +21,7 @@
* DEALINGS IN THE SOFTWARE.
*/
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <unistd.h>
+#include <stdio.h>
#include <string.h>
#include <errno.h>
#include "glcpp.h"
@@ -40,39 +37,32 @@ _mesa_reference_shader(struct gl_context *ctx, struct gl_shader **ptr,
*ptr = sh;
}
-/* Read from fd until EOF and return a string of everything read.
+/* Read from fp until EOF and return a string of everything read.
*/
static char *
-load_text_fd (void *ctx, int fd)
+load_text_fp (void *ctx, FILE *fp)
{
#define CHUNK 4096
char *text = NULL;
- ssize_t text_size = 0;
- ssize_t total_read = 0;
- ssize_t bytes;
+ size_t text_size = 0;
+ size_t total_read = 0;
+ size_t bytes;
while (1) {
if (total_read + CHUNK + 1 > text_size) {
text_size = text_size ? text_size * 2 : CHUNK + 1;
- text = talloc_realloc_size (ctx, text, text_size);
+ text = reralloc_size (ctx, text, text_size);
if (text == NULL) {
fprintf (stderr, "Out of memory\n");
return NULL;
}
}
- bytes = read (fd, text + total_read, CHUNK);
- if (bytes < 0) {
- fprintf (stderr, "Error while reading: %s\n",
- strerror (errno));
- talloc_free (text);
- return NULL;
- }
+ bytes = fread (text + total_read, 1, CHUNK, fp);
+ total_read += bytes;
- if (bytes == 0) {
+ if (bytes < CHUNK) {
break;
}
-
- total_read += bytes;
}
text[total_read] = '\0';
@@ -84,21 +74,21 @@ static char *
load_text_file(void *ctx, const char *filename)
{
char *text;
- int fd;
+ FILE *fp;
if (filename == NULL || strcmp (filename, "-") == 0)
- return load_text_fd (ctx, STDIN_FILENO);
+ return load_text_fp (ctx, stdin);
- fd = open (filename, O_RDONLY);
- if (fd < 0) {
+ fp = fopen (filename, "r");
+ if (fp == NULL) {
fprintf (stderr, "Failed to open file %s: %s\n",
filename, strerror (errno));
return NULL;
}
- text = load_text_fd (ctx, fd);
+ text = load_text_fp (ctx, fp);
- close(fd);
+ fclose(fp);
return text;
}
@@ -107,8 +97,8 @@ int
main (int argc, char *argv[])
{
char *filename = NULL;
- void *ctx = talloc(NULL, void*);
- char *info_log = talloc_strdup(ctx, "");
+ void *ctx = ralloc(NULL, void*);
+ char *info_log = ralloc_strdup(ctx, "");
const char *shader;
int ret;
@@ -125,7 +115,7 @@ main (int argc, char *argv[])
printf("%s", shader);
fprintf(stderr, "%s", info_log);
- talloc_free(ctx);
+ ralloc_free(ctx);
return ret;
}
diff --git a/src/glsl/glcpp/glcpp.h b/src/glsl/glcpp/glcpp.h
index 7125d325dff..dc816e90ee7 100644
--- a/src/glsl/glcpp/glcpp.h
+++ b/src/glsl/glcpp/glcpp.h
@@ -26,7 +26,7 @@
#include <stdint.h>
-#include <talloc.h>
+#include "../ralloc.h"
#include "program/hash_table.h"
@@ -189,7 +189,7 @@ void
glcpp_parser_destroy (glcpp_parser_t *parser);
int
-preprocess(void *talloc_ctx, const char **shader, char **info_log,
+preprocess(void *ralloc_ctx, const char **shader, char **info_log,
const struct gl_extensions *extensions, int api);
/* Functions for writing to the info log */
diff --git a/src/glsl/glcpp/pp.c b/src/glsl/glcpp/pp.c
index e1a3a88a3e5..3640896a2c2 100644
--- a/src/glsl/glcpp/pp.c
+++ b/src/glsl/glcpp/pp.c
@@ -33,16 +33,15 @@ glcpp_error (YYLTYPE *locp, glcpp_parser_t *parser, const char *fmt, ...)
va_list ap;
parser->error = 1;
- parser->info_log = talloc_asprintf_append(parser->info_log,
- "%u:%u(%u): "
+ ralloc_asprintf_append(&parser->info_log, "%u:%u(%u): "
"preprocessor error: ",
locp->source,
locp->first_line,
locp->first_column);
va_start(ap, fmt);
- parser->info_log = talloc_vasprintf_append(parser->info_log, fmt, ap);
+ ralloc_vasprintf_append(&parser->info_log, fmt, ap);
va_end(ap);
- parser->info_log = talloc_strdup_append(parser->info_log, "\n");
+ ralloc_strcat(&parser->info_log, "\n");
}
void
@@ -50,16 +49,15 @@ glcpp_warning (YYLTYPE *locp, glcpp_parser_t *parser, const char *fmt, ...)
{
va_list ap;
- parser->info_log = talloc_asprintf_append(parser->info_log,
- "%u:%u(%u): "
+ ralloc_asprintf_append(&parser->info_log, "%u:%u(%u): "
"preprocessor warning: ",
locp->source,
locp->first_line,
locp->first_column);
va_start(ap, fmt);
- parser->info_log = talloc_vasprintf_append(parser->info_log, fmt, ap);
+ ralloc_vasprintf_append(&parser->info_log, fmt, ap);
va_end(ap);
- parser->info_log = talloc_strdup_append(parser->info_log, "\n");
+ ralloc_strcat(&parser->info_log, "\n");
}
/* Searches backwards for '^ *#' from a given starting point. */
@@ -92,7 +90,7 @@ remove_line_continuations(glcpp_parser_t *ctx, const char *shader)
{
int in_continued_line = 0;
int extra_newlines = 0;
- char *clean = talloc_strdup(ctx, "");
+ char *clean = ralloc_strdup(ctx, "");
const char *search_start = shader;
const char *newline;
while ((newline = strchr(search_start, '\n')) != NULL) {
@@ -122,27 +120,27 @@ remove_line_continuations(glcpp_parser_t *ctx, const char *shader)
}
if (in_continued_line) {
/* Copy everything before the \ */
- clean = talloc_strndup_append(clean, shader, backslash - shader);
+ ralloc_strncat(&clean, shader, backslash - shader);
shader = newline + 1;
extra_newlines++;
}
} else if (in_continued_line) {
/* Copy everything up to and including the \n */
- clean = talloc_strndup_append(clean, shader, newline - shader + 1);
+ ralloc_strncat(&clean, shader, newline - shader + 1);
shader = newline + 1;
/* Output extra newlines to make line numbers match */
for (; extra_newlines > 0; extra_newlines--)
- clean = talloc_strdup_append(clean, "\n");
+ ralloc_strcat(&clean, "\n");
in_continued_line = 0;
}
search_start = newline + 1;
}
- clean = talloc_strdup_append(clean, shader);
+ ralloc_strcat(&clean, shader);
return clean;
}
int
-preprocess(void *talloc_ctx, const char **shader, char **info_log,
+preprocess(void *ralloc_ctx, const char **shader, char **info_log,
const struct gl_extensions *extensions, int api)
{
int errors;
@@ -156,9 +154,9 @@ preprocess(void *talloc_ctx, const char **shader, char **info_log,
if (parser->skip_stack)
glcpp_error (&parser->skip_stack->loc, parser, "Unterminated #if\n");
- *info_log = talloc_strdup_append(*info_log, parser->info_log);
+ ralloc_strcat(info_log, parser->info_log);
- talloc_steal(talloc_ctx, parser->output);
+ ralloc_steal(ralloc_ctx, parser->output);
*shader = parser->output;
errors = parser->error;
diff --git a/src/glsl/glcpp/tests/063-comments.c.expected b/src/glsl/glcpp/tests/063-comments.c.expected
index ed4feedd457..73ca7071faa 100644
--- a/src/glsl/glcpp/tests/063-comments.c.expected
+++ b/src/glsl/glcpp/tests/063-comments.c.expected
@@ -5,8 +5,15 @@ f = g /h;
l();
m = n
+ p;
+
+
+
+
+
+
more code here
+
are not treated like comments.
diff --git a/src/glsl/glcpp/tests/092-redefine-macro-error-2.c b/src/glsl/glcpp/tests/092-redefine-macro-error-2.c
new file mode 100644
index 00000000000..3c161a5c501
--- /dev/null
+++ b/src/glsl/glcpp/tests/092-redefine-macro-error-2.c
@@ -0,0 +1,5 @@
+#define A
+#define A 1
+
+#define B 1
+#define B
diff --git a/src/glsl/glcpp/tests/092-redefine-macro-error-2.c.expected b/src/glsl/glcpp/tests/092-redefine-macro-error-2.c.expected
new file mode 100644
index 00000000000..0026f91f32b
--- /dev/null
+++ b/src/glsl/glcpp/tests/092-redefine-macro-error-2.c.expected
@@ -0,0 +1,10 @@
+0:2(9): preprocessor error: Redefinition of macro A
+
+0:5(9): preprocessor error: Redefinition of macro B
+
+
+
+
+
+
+
diff --git a/src/glsl/glcpp/tests/093-divide-by-zero.c b/src/glsl/glcpp/tests/093-divide-by-zero.c
new file mode 100644
index 00000000000..bf65d4f5271
--- /dev/null
+++ b/src/glsl/glcpp/tests/093-divide-by-zero.c
@@ -0,0 +1,2 @@
+#if (1 / 0)
+#endif
diff --git a/src/glsl/glcpp/tests/094-divide-by-zero-short-circuit.c b/src/glsl/glcpp/tests/094-divide-by-zero-short-circuit.c
new file mode 100644
index 00000000000..a9c6f36def8
--- /dev/null
+++ b/src/glsl/glcpp/tests/094-divide-by-zero-short-circuit.c
@@ -0,0 +1,2 @@
+#if 1 || (1 / 0)
+#endif
diff --git a/src/glsl/glcpp/tests/095-recursive-define.c b/src/glsl/glcpp/tests/095-recursive-define.c
new file mode 100644
index 00000000000..801d90ce2e3
--- /dev/null
+++ b/src/glsl/glcpp/tests/095-recursive-define.c
@@ -0,0 +1,3 @@
+#define A(a, b) B(a, b)
+#define C A(0, C)
+C
diff --git a/src/glsl/glsl_lexer.cpp b/src/glsl/glsl_lexer.cpp
index e3d0a3cfc9d..ef0d99e4789 100644
--- a/src/glsl/glsl_lexer.cpp
+++ b/src/glsl/glsl_lexer.cpp
@@ -54,7 +54,6 @@ typedef int flex_int32_t;
typedef unsigned char flex_uint8_t;
typedef unsigned short int flex_uint16_t;
typedef unsigned int flex_uint32_t;
-#endif /* ! C99 */
/* Limits of integral types. */
#ifndef INT8_MIN
@@ -85,6 +84,8 @@ typedef unsigned int flex_uint32_t;
#define UINT32_MAX (4294967295U)
#endif
+#endif /* ! C99 */
+
#endif /* ! FLEXINT_H */
#ifdef __cplusplus
@@ -158,7 +159,15 @@ typedef void* yyscan_t;
/* Size of default input buffer. */
#ifndef YY_BUF_SIZE
+#ifdef __ia64__
+/* On IA-64, the buffer size is 16k, not 8k.
+ * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
+ * Ditto for the __ia64__ case accordingly.
+ */
+#define YY_BUF_SIZE 32768
+#else
#define YY_BUF_SIZE 16384
+#endif /* __ia64__ */
#endif
/* The state buf must be large enough to hold one state per character in the main buffer.
@@ -349,8 +358,8 @@ static void yy_fatal_error (yyconst char msg[] ,yyscan_t yyscanner );
*yy_cp = '\0'; \
yyg->yy_c_buf_p = yy_cp;
-#define YY_NUM_RULES 209
-#define YY_END_OF_BUFFER 210
+#define YY_NUM_RULES 210
+#define YY_END_OF_BUFFER 211
/* This struct is not used in this scanner,
but its presence is necessary. */
struct yy_trans_info
@@ -358,98 +367,100 @@ struct yy_trans_info
flex_int32_t yy_verify;
flex_int32_t yy_nxt;
};
-static yyconst flex_int16_t yy_accept[813] =
+static yyconst flex_int16_t yy_accept[836] =
{ 0,
- 0, 0, 15, 15, 0, 0, 210, 208, 1, 20,
- 208, 208, 208, 208, 208, 208, 208, 208, 119, 117,
- 208, 208, 208, 207, 208, 207, 207, 207, 207, 207,
- 207, 207, 207, 207, 207, 207, 207, 207, 207, 207,
- 207, 207, 207, 207, 207, 208, 1, 208, 209, 15,
- 19, 209, 18, 16, 17, 13, 12, 1, 101, 110,
- 102, 113, 107, 96, 109, 97, 116, 121, 108, 122,
- 119, 0, 0, 124, 119, 0, 117, 117, 105, 98,
- 100, 99, 106, 207, 114, 104, 207, 207, 207, 207,
- 207, 207, 207, 207, 207, 207, 207, 207, 29, 207,
-
- 207, 207, 207, 207, 207, 207, 207, 207, 207, 207,
- 207, 207, 33, 207, 207, 60, 207, 207, 207, 207,
- 207, 207, 207, 207, 207, 207, 207, 207, 207, 207,
- 207, 207, 207, 207, 207, 207, 207, 207, 207, 207,
- 207, 207, 207, 207, 207, 207, 207, 207, 207, 115,
- 103, 1, 0, 0, 2, 0, 0, 0, 0, 15,
- 14, 18, 17, 0, 121, 120, 0, 122, 0, 123,
- 118, 111, 112, 207, 127, 207, 207, 207, 207, 207,
- 207, 207, 207, 207, 207, 207, 207, 207, 207, 207,
- 207, 207, 207, 207, 207, 207, 32, 207, 207, 207,
-
- 207, 207, 207, 207, 207, 207, 207, 25, 207, 207,
- 207, 207, 207, 207, 207, 207, 207, 207, 207, 61,
- 207, 207, 207, 207, 207, 207, 207, 207, 207, 207,
- 207, 207, 207, 207, 207, 207, 207, 207, 207, 207,
- 207, 207, 207, 207, 207, 207, 207, 207, 207, 207,
- 0, 0, 0, 0, 14, 0, 121, 0, 120, 0,
- 122, 123, 118, 207, 207, 23, 207, 207, 174, 167,
- 207, 207, 207, 207, 207, 207, 207, 207, 207, 31,
- 130, 207, 207, 207, 207, 67, 207, 207, 135, 149,
- 207, 207, 207, 207, 207, 207, 207, 207, 207, 207,
-
- 207, 207, 146, 170, 48, 49, 50, 207, 207, 207,
- 207, 207, 207, 207, 207, 207, 207, 207, 207, 207,
- 207, 207, 207, 207, 207, 207, 207, 133, 125, 207,
- 207, 26, 207, 207, 207, 207, 207, 207, 207, 45,
- 46, 47, 94, 207, 207, 0, 0, 0, 0, 0,
- 120, 207, 207, 27, 36, 37, 38, 207, 128, 207,
- 22, 207, 207, 207, 207, 157, 158, 159, 207, 126,
- 207, 150, 24, 160, 161, 162, 172, 154, 155, 156,
- 207, 207, 207, 62, 152, 207, 207, 207, 39, 40,
- 41, 207, 207, 207, 207, 207, 207, 207, 207, 207,
-
- 207, 207, 207, 207, 207, 207, 207, 147, 207, 207,
- 207, 207, 207, 207, 207, 207, 207, 207, 129, 207,
- 207, 169, 42, 43, 44, 207, 207, 30, 0, 0,
- 0, 0, 177, 207, 207, 175, 207, 207, 207, 148,
- 143, 180, 207, 207, 207, 207, 207, 207, 138, 207,
- 207, 207, 95, 51, 52, 53, 54, 55, 56, 57,
- 58, 59, 207, 207, 207, 207, 153, 134, 207, 207,
- 141, 35, 207, 207, 166, 68, 142, 93, 178, 136,
- 207, 207, 207, 207, 207, 207, 207, 207, 0, 0,
- 0, 0, 207, 207, 207, 137, 34, 207, 207, 207,
-
- 207, 207, 207, 181, 182, 183, 207, 207, 207, 207,
- 207, 171, 207, 207, 207, 207, 207, 207, 207, 207,
- 131, 207, 207, 207, 207, 207, 63, 207, 207, 64,
- 207, 0, 0, 0, 0, 0, 207, 65, 28, 144,
- 185, 186, 187, 207, 207, 207, 207, 207, 207, 207,
- 207, 207, 207, 207, 207, 139, 207, 207, 207, 207,
- 207, 207, 207, 207, 207, 132, 189, 190, 191, 207,
- 207, 151, 207, 140, 0, 0, 6, 0, 0, 0,
- 11, 3, 21, 207, 207, 207, 207, 207, 207, 207,
- 207, 207, 184, 145, 66, 207, 207, 207, 207, 168,
-
- 207, 176, 173, 206, 70, 71, 72, 207, 207, 207,
- 207, 207, 207, 207, 207, 207, 207, 0, 0, 0,
- 0, 0, 0, 207, 207, 207, 188, 207, 207, 207,
- 207, 207, 81, 82, 83, 207, 207, 207, 207, 207,
- 207, 207, 207, 207, 207, 207, 207, 207, 192, 87,
- 88, 89, 207, 4, 0, 5, 0, 0, 0, 0,
- 0, 207, 207, 207, 207, 207, 207, 207, 203, 207,
- 207, 207, 207, 207, 207, 207, 207, 207, 207, 207,
- 73, 207, 207, 207, 207, 207, 207, 0, 0, 0,
- 207, 207, 204, 193, 207, 194, 207, 207, 207, 84,
-
- 207, 207, 207, 207, 207, 207, 207, 207, 207, 207,
- 207, 205, 207, 207, 90, 0, 0, 195, 196, 207,
- 199, 207, 200, 207, 207, 69, 207, 207, 207, 163,
- 207, 164, 179, 207, 197, 198, 207, 207, 0, 0,
- 207, 207, 207, 207, 74, 207, 75, 207, 207, 207,
- 207, 207, 0, 0, 0, 207, 207, 85, 86, 207,
- 76, 207, 207, 77, 207, 91, 92, 0, 0, 0,
- 207, 207, 207, 207, 207, 207, 0, 0, 0, 207,
- 207, 207, 207, 207, 78, 0, 0, 7, 0, 0,
- 201, 202, 207, 207, 207, 0, 8, 0, 0, 207,
-
- 207, 165, 0, 0, 79, 80, 0, 0, 9, 0,
- 10, 0
+ 0, 0, 16, 16, 0, 0, 211, 209, 1, 21,
+ 209, 209, 209, 209, 209, 209, 209, 209, 120, 118,
+ 209, 209, 209, 208, 209, 208, 208, 208, 208, 208,
+ 208, 208, 208, 208, 208, 208, 208, 208, 208, 208,
+ 208, 208, 208, 208, 208, 209, 1, 209, 210, 16,
+ 20, 210, 19, 17, 18, 14, 13, 1, 102, 111,
+ 103, 114, 108, 97, 110, 98, 117, 122, 109, 123,
+ 120, 0, 0, 125, 120, 0, 118, 118, 106, 99,
+ 101, 100, 107, 208, 115, 105, 208, 208, 208, 208,
+ 208, 208, 208, 208, 208, 208, 208, 208, 30, 208,
+
+ 208, 208, 208, 208, 208, 208, 208, 208, 208, 208,
+ 208, 208, 34, 208, 208, 61, 208, 208, 208, 208,
+ 208, 208, 208, 208, 208, 208, 208, 208, 208, 208,
+ 208, 208, 208, 208, 208, 208, 208, 208, 208, 208,
+ 208, 208, 208, 208, 208, 208, 208, 208, 208, 116,
+ 104, 1, 0, 0, 2, 0, 0, 0, 0, 16,
+ 15, 19, 18, 0, 122, 121, 0, 123, 0, 124,
+ 119, 112, 113, 208, 128, 208, 208, 208, 208, 208,
+ 208, 208, 208, 208, 208, 208, 208, 208, 208, 208,
+ 208, 208, 208, 208, 208, 208, 33, 208, 208, 208,
+
+ 208, 208, 208, 208, 208, 208, 208, 26, 208, 208,
+ 208, 208, 208, 208, 208, 208, 208, 208, 208, 62,
+ 208, 208, 208, 208, 208, 208, 208, 208, 208, 208,
+ 208, 208, 208, 208, 208, 208, 208, 208, 208, 208,
+ 208, 208, 208, 208, 208, 208, 208, 208, 208, 208,
+ 0, 0, 0, 0, 15, 0, 122, 0, 121, 0,
+ 123, 124, 119, 208, 208, 24, 208, 208, 175, 168,
+ 208, 208, 208, 208, 208, 208, 208, 208, 208, 32,
+ 131, 208, 208, 208, 208, 68, 208, 208, 136, 150,
+ 208, 208, 208, 208, 208, 208, 208, 208, 208, 208,
+
+ 208, 208, 147, 171, 49, 50, 51, 208, 208, 208,
+ 208, 208, 208, 208, 208, 208, 208, 208, 208, 208,
+ 208, 208, 208, 208, 208, 208, 208, 134, 126, 208,
+ 208, 27, 208, 208, 208, 208, 208, 208, 208, 46,
+ 47, 48, 95, 208, 208, 0, 0, 0, 0, 0,
+ 121, 208, 208, 28, 37, 38, 39, 208, 129, 208,
+ 23, 208, 208, 208, 208, 158, 159, 160, 208, 127,
+ 208, 151, 25, 161, 162, 163, 173, 155, 156, 157,
+ 208, 208, 208, 63, 153, 208, 208, 208, 40, 41,
+ 42, 208, 208, 208, 208, 208, 208, 208, 208, 208,
+
+ 208, 208, 208, 208, 208, 208, 208, 148, 208, 208,
+ 208, 208, 208, 208, 208, 208, 208, 208, 130, 208,
+ 208, 170, 43, 44, 45, 208, 208, 31, 0, 0,
+ 0, 0, 178, 208, 208, 176, 208, 208, 208, 149,
+ 144, 181, 208, 208, 208, 208, 208, 208, 139, 208,
+ 208, 208, 96, 52, 53, 54, 55, 56, 57, 58,
+ 59, 60, 208, 208, 208, 208, 154, 135, 208, 208,
+ 142, 36, 208, 208, 167, 69, 143, 94, 179, 137,
+ 208, 208, 208, 208, 208, 208, 208, 208, 0, 0,
+ 0, 0, 208, 208, 208, 138, 35, 208, 208, 208,
+
+ 208, 208, 208, 182, 183, 184, 208, 208, 208, 208,
+ 208, 172, 208, 208, 208, 208, 208, 208, 208, 208,
+ 132, 208, 208, 208, 208, 208, 64, 208, 208, 65,
+ 208, 0, 0, 0, 0, 0, 208, 66, 29, 145,
+ 186, 187, 188, 208, 208, 208, 208, 208, 208, 208,
+ 208, 208, 208, 208, 208, 140, 208, 208, 208, 208,
+ 208, 208, 208, 208, 208, 133, 190, 191, 192, 208,
+ 208, 152, 208, 141, 0, 0, 6, 0, 0, 0,
+ 12, 3, 22, 208, 208, 208, 208, 208, 208, 208,
+ 208, 208, 185, 146, 67, 208, 208, 208, 208, 169,
+
+ 208, 177, 174, 207, 71, 72, 73, 208, 208, 208,
+ 208, 208, 208, 208, 208, 208, 208, 0, 0, 0,
+ 0, 0, 0, 0, 208, 208, 208, 189, 208, 208,
+ 208, 208, 208, 82, 83, 84, 208, 208, 208, 208,
+ 208, 208, 208, 208, 208, 208, 208, 208, 208, 193,
+ 88, 89, 90, 208, 4, 0, 5, 0, 0, 0,
+ 0, 0, 0, 208, 208, 208, 208, 208, 208, 208,
+ 204, 208, 208, 208, 208, 208, 208, 208, 208, 208,
+ 208, 208, 74, 208, 208, 208, 208, 208, 208, 0,
+ 0, 0, 0, 208, 208, 205, 194, 208, 195, 208,
+
+ 208, 208, 85, 208, 208, 208, 208, 208, 208, 208,
+ 208, 208, 208, 208, 206, 208, 208, 91, 0, 0,
+ 0, 196, 197, 208, 200, 208, 201, 208, 208, 70,
+ 208, 208, 208, 164, 208, 165, 180, 208, 198, 199,
+ 208, 208, 0, 0, 0, 208, 208, 208, 208, 75,
+ 208, 76, 208, 208, 208, 208, 208, 0, 0, 0,
+ 0, 208, 208, 86, 87, 208, 77, 208, 208, 78,
+ 208, 92, 93, 0, 0, 0, 0, 208, 208, 208,
+ 208, 208, 208, 0, 0, 0, 0, 208, 208, 208,
+ 208, 208, 79, 0, 0, 0, 7, 0, 0, 202,
+
+ 203, 208, 208, 208, 0, 0, 8, 0, 0, 208,
+ 208, 166, 0, 0, 0, 80, 81, 0, 0, 0,
+ 9, 0, 0, 10, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 11, 0
} ;
static yyconst flex_int32_t yy_ec[256] =
@@ -461,13 +472,13 @@ static yyconst flex_int32_t yy_ec[256] =
10, 11, 12, 1, 13, 14, 15, 16, 17, 18,
19, 20, 21, 21, 21, 22, 22, 23, 1, 24,
25, 26, 1, 1, 27, 28, 29, 30, 31, 32,
- 33, 33, 33, 33, 33, 33, 33, 33, 33, 33,
- 33, 34, 35, 33, 36, 33, 33, 37, 33, 33,
- 1, 1, 1, 38, 39, 1, 40, 41, 42, 43,
+ 33, 34, 34, 34, 34, 35, 34, 34, 34, 34,
+ 34, 36, 37, 38, 39, 34, 34, 40, 34, 34,
+ 1, 1, 1, 41, 42, 1, 43, 44, 45, 46,
- 44, 45, 46, 47, 48, 49, 50, 51, 52, 53,
- 54, 55, 33, 56, 57, 58, 59, 60, 61, 62,
- 63, 64, 1, 65, 1, 1, 1, 1, 1, 1,
+ 47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
+ 57, 58, 34, 59, 60, 61, 62, 63, 64, 65,
+ 66, 67, 1, 68, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
@@ -484,350 +495,357 @@ static yyconst flex_int32_t yy_ec[256] =
1, 1, 1, 1, 1
} ;
-static yyconst flex_int32_t yy_meta[66] =
+static yyconst flex_int32_t yy_meta[69] =
{ 0,
- 1, 2, 3, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 4, 4, 4, 4, 4,
- 4, 5, 1, 1, 1, 1, 6, 6, 6, 6,
- 5, 5, 7, 7, 7, 7, 8, 1, 7, 6,
- 6, 6, 6, 5, 5, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 8, 7, 7, 1
+ 1, 1, 2, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 3, 3, 3, 3, 3,
+ 3, 3, 1, 1, 1, 1, 4, 4, 4, 4,
+ 3, 3, 5, 5, 5, 5, 5, 5, 5, 5,
+ 1, 5, 4, 4, 4, 4, 3, 3, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 1
} ;
-static yyconst flex_int16_t yy_base[824] =
+static yyconst flex_int16_t yy_base[845] =
{ 0,
- 0, 64, 70, 0, 1185, 1184, 1186, 1189, 65, 1189,
- 1160, 1159, 128, 1158, 125, 126, 124, 1157, 140, 189,
- 123, 1156, 138, 0, 127, 124, 113, 135, 144, 161,
- 176, 1126, 130, 187, 140, 143, 161, 1120, 182, 174,
- 202, 199, 211, 212, 1131, 130, 263, 255, 1189, 189,
- 1189, 1162, 256, 1189, 0, 1189, 1189, 215, 1189, 1189,
- 1189, 1189, 1189, 1189, 1189, 1189, 1189, 248, 1189, 250,
- 112, 302, 319, 1189, 1189, 0, 0, 1189, 1151, 1189,
- 1189, 1189, 1150, 0, 1189, 1189, 1116, 1121, 1114, 1117,
- 1126, 1125, 1111, 1114, 1126, 144, 1120, 1107, 1104, 1118,
-
- 1104, 1101, 1101, 1107, 175, 191, 1101, 1112, 1097, 1103,
- 1107, 1108, 0, 1099, 1110, 247, 1109, 1104, 1084, 230,
- 1088, 1102, 1092, 241, 1085, 228, 1098, 1100, 1082, 1078,
- 1086, 1083, 1072, 1081, 173, 1079, 1085, 1080, 1083, 1071,
- 1074, 233, 240, 260, 1084, 1071, 1084, 239, 1077, 1189,
- 1189, 307, 301, 323, 1189, 1062, 1075, 1066, 1077, 249,
- 0, 368, 0, 379, 1189, 298, 390, 1189, 397, 404,
- 291, 1189, 1189, 1072, 0, 1063, 1067, 1077, 1074, 270,
- 1057, 1057, 1061, 291, 1072, 1069, 1069, 1067, 1064, 1055,
- 1062, 1048, 1046, 1059, 1044, 1061, 0, 1058, 1045, 1053,
-
- 1050, 1054, 1055, 1048, 1045, 1033, 1032, 1046, 1049, 1036,
- 1045, 1032, 1039, 1029, 335, 1035, 1038, 1028, 1036, 1024,
- 1028, 1019, 1034, 1024, 1015, 1034, 1017, 1015, 1026, 1015,
- 1010, 1008, 1022, 1007, 1009, 1006, 1018, 1017, 1020, 1001,
- 306, 1010, 1005, 1003, 1013, 991, 339, 1010, 1012, 1000,
- 992, 996, 1008, 991, 0, 411, 421, 438, 1189, 451,
- 458, 1189, 1189, 986, 997, 0, 994, 344, 0, 0,
- 987, 985, 987, 982, 991, 979, 997, 985, 350, 0,
- 0, 979, 990, 989, 989, 0, 973, 353, 0, 0,
- 975, 357, 983, 984, 974, 968, 967, 968, 967, 967,
-
- 361, 962, 0, 0, 958, 957, 956, 958, 959, 964,
- 958, 954, 968, 963, 962, 961, 952, 955, 955, 947,
- 950, 945, 954, 959, 944, 957, 947, 0, 0, 954,
- 950, 0, 941, 941, 947, 937, 945, 426, 942, 0,
- 0, 0, 0, 931, 944, 943, 942, 939, 927, 465,
- 475, 939, 941, 0, 0, 0, 0, 927, 0, 927,
- 0, 926, 927, 921, 932, 0, 0, 0, 922, 0,
- 918, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 929, 481, 928, 0, 0, 926, 922, 918, 0, 0,
- 0, 910, 443, 486, 493, 915, 911, 917, 907, 905,
-
- 919, 903, 903, 917, 905, 917, 912, 0, 910, 907,
- 911, 894, 896, 903, 909, 904, 903, 890, 0, 892,
- 893, 0, 0, 0, 0, 890, 894, 0, 888, 938,
- 887, 890, 0, 878, 888, 0, 876, 876, 890, 0,
- 892, 0, 497, 901, 900, 899, 869, 868, 0, 886,
- 885, 880, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 868, 882, 868, 865, 0, 0, 871, 870,
- 0, 0, 868, 860, 0, 0, 0, 0, 0, 0,
- 857, 869, 500, 861, 868, 867, 864, 858, 851, 519,
- 867, 852, 847, 861, 859, 0, 0, 851, 871, 870,
-
- 869, 839, 838, 495, 496, 0, 851, 854, 852, 840,
- 836, 0, 849, 846, 845, 834, 833, 832, 515, 841,
- 0, 854, 853, 852, 822, 821, 0, 836, 822, 0,
- 833, 828, 543, 545, 873, 821, 829, 0, 0, 0,
- 845, 844, 0, 825, 828, 812, 820, 810, 818, 819,
- 819, 818, 803, 539, 816, 0, 817, 805, 804, 800,
- 825, 824, 823, 793, 792, 0, 823, 822, 0, 803,
- 806, 0, 552, 0, 792, 557, 1189, 580, 0, 590,
- 499, 1189, 0, 789, 788, 798, 798, 785, 800, 783,
- 798, 793, 0, 0, 0, 806, 805, 804, 774, 0,
-
- 774, 0, 0, 0, 559, 568, 797, 785, 788, 772,
- 771, 781, 781, 794, 793, 792, 762, 767, 552, 613,
- 363, 775, 763, 761, 760, 771, 0, 774, 770, 772,
- 768, 754, 782, 781, 0, 766, 758, 749, 757, 747,
- 758, 754, 756, 754, 754, 741, 740, 751, 0, 767,
- 766, 0, 751, 1189, 391, 1189, 620, 0, 640, 750,
- 732, 749, 748, 731, 723, 731, 721, 729, 0, 726,
- 725, 736, 719, 722, 737, 720, 733, 734, 731, 728,
- 736, 730, 729, 712, 711, 710, 721, 402, 705, 715,
- 699, 698, 0, 725, 698, 723, 696, 700, 699, 0,
-
- 710, 713, 709, 711, 688, 702, 686, 680, 688, 671,
- 662, 0, 640, 639, 0, 648, 641, 0, 0, 645,
- 0, 644, 0, 650, 649, 0, 625, 633, 623, 650,
- 630, 0, 0, 643, 0, 0, 642, 641, 582, 632,
- 639, 638, 614, 613, 635, 608, 633, 607, 590, 607,
- 586, 585, 611, 380, 526, 545, 544, 0, 0, 538,
- 0, 504, 510, 0, 495, 0, 0, 550, 572, 483,
- 470, 454, 462, 449, 445, 404, 419, 616, 619, 391,
- 387, 404, 392, 290, 0, 617, 642, 1189, 644, 570,
- 0, 0, 263, 258, 139, 645, 1189, 643, 618, 107,
-
- 77, 0, 23, 662, 0, 0, 663, 664, 1189, 665,
- 1189, 1189, 697, 702, 707, 712, 714, 716, 722, 729,
- 734, 739, 744
+ 0, 67, 73, 0, 1210, 1209, 1211, 1214, 68, 1214,
+ 1185, 1184, 134, 1183, 131, 132, 130, 1182, 146, 198,
+ 129, 1181, 144, 0, 130, 113, 124, 141, 150, 126,
+ 181, 1148, 159, 192, 118, 129, 146, 1142, 147, 174,
+ 206, 192, 203, 222, 1153, 203, 221, 231, 1214, 260,
+ 1214, 1187, 279, 1214, 0, 1214, 1214, 270, 1214, 1214,
+ 1214, 1214, 1214, 1214, 1214, 1214, 1214, 244, 1214, 255,
+ 139, 290, 307, 1214, 1214, 0, 0, 1214, 1176, 1214,
+ 1214, 1214, 1175, 0, 1214, 1214, 1138, 1143, 1136, 1139,
+ 1148, 1147, 1133, 1136, 1148, 144, 1142, 1129, 1126, 1140,
+
+ 1126, 1123, 1123, 1129, 219, 193, 1123, 1134, 1119, 1125,
+ 1129, 1130, 0, 1121, 1132, 278, 1131, 1126, 1106, 224,
+ 1110, 1124, 1114, 232, 1107, 271, 1120, 1122, 1104, 1100,
+ 1108, 1105, 1094, 1103, 234, 1101, 1107, 1102, 1105, 1093,
+ 1096, 226, 145, 262, 1106, 1093, 1106, 263, 1099, 1214,
+ 1214, 338, 331, 343, 1214, 1084, 1097, 1088, 1099, 345,
+ 0, 334, 0, 345, 1214, 328, 391, 1214, 352, 398,
+ 338, 1214, 1214, 1094, 0, 1085, 1089, 1099, 1096, 332,
+ 1079, 1079, 1083, 320, 1094, 1091, 1091, 1089, 1086, 1077,
+ 1084, 1070, 1068, 1081, 1066, 1083, 0, 1080, 1067, 1075,
+
+ 1072, 1076, 1077, 1070, 1067, 1055, 1054, 1068, 1071, 1058,
+ 1067, 1054, 1061, 1051, 364, 1057, 1060, 1050, 1058, 1046,
+ 1050, 1041, 1056, 1046, 1037, 1056, 1039, 1037, 1048, 1037,
+ 1032, 1030, 1044, 1029, 1031, 1028, 1040, 1039, 1042, 1023,
+ 338, 1032, 1027, 1025, 1035, 1013, 403, 1032, 1034, 1022,
+ 1014, 1018, 1030, 1013, 0, 415, 422, 439, 1214, 446,
+ 455, 1214, 1214, 1008, 1019, 0, 1016, 406, 0, 0,
+ 1009, 1007, 1009, 1004, 1013, 1001, 1019, 1007, 409, 0,
+ 0, 1001, 1012, 1011, 1011, 0, 995, 429, 0, 0,
+ 997, 460, 1005, 1006, 996, 990, 989, 990, 989, 989,
+
+ 463, 984, 0, 0, 980, 979, 978, 980, 981, 986,
+ 980, 976, 990, 985, 984, 983, 974, 977, 977, 969,
+ 972, 967, 976, 981, 966, 979, 969, 0, 0, 976,
+ 972, 0, 963, 963, 969, 959, 967, 466, 964, 0,
+ 0, 0, 0, 953, 966, 965, 964, 961, 949, 472,
+ 479, 961, 963, 0, 0, 0, 0, 949, 0, 949,
+ 0, 948, 949, 943, 954, 0, 0, 0, 944, 0,
+ 940, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 951, 487, 950, 0, 0, 948, 944, 940, 0, 0,
+ 0, 932, 489, 494, 499, 937, 933, 939, 929, 927,
+
+ 941, 925, 925, 939, 927, 939, 934, 0, 932, 929,
+ 933, 916, 918, 925, 931, 926, 925, 912, 0, 914,
+ 915, 0, 0, 0, 0, 912, 916, 0, 910, 963,
+ 909, 912, 0, 900, 910, 0, 898, 898, 912, 0,
+ 914, 0, 503, 926, 925, 924, 891, 890, 0, 908,
+ 907, 902, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 890, 904, 890, 887, 0, 0, 893, 892,
+ 0, 0, 890, 882, 0, 0, 0, 0, 0, 0,
+ 879, 891, 506, 883, 890, 889, 886, 880, 873, 524,
+ 889, 874, 869, 883, 881, 0, 0, 873, 896, 895,
+
+ 894, 861, 860, 361, 365, 0, 873, 876, 874, 862,
+ 858, 0, 871, 868, 867, 856, 855, 854, 519, 863,
+ 0, 879, 878, 877, 844, 843, 0, 858, 844, 0,
+ 855, 850, 547, 553, 898, 843, 851, 0, 0, 0,
+ 870, 869, 0, 847, 850, 834, 842, 832, 840, 841,
+ 841, 840, 825, 559, 838, 0, 839, 827, 826, 822,
+ 850, 849, 848, 815, 814, 0, 848, 847, 0, 825,
+ 828, 0, 562, 0, 814, 580, 1214, 587, 0, 607,
+ 584, 1214, 0, 811, 810, 820, 820, 807, 822, 805,
+ 820, 815, 0, 0, 0, 831, 830, 829, 796, 0,
+
+ 796, 0, 0, 0, 502, 524, 820, 807, 810, 794,
+ 793, 803, 803, 819, 818, 817, 784, 789, 615, 640,
+ 550, 806, 796, 784, 782, 781, 792, 0, 795, 791,
+ 793, 789, 775, 806, 805, 0, 787, 779, 770, 778,
+ 768, 779, 775, 777, 775, 775, 762, 761, 772, 0,
+ 791, 790, 0, 772, 1214, 555, 1214, 647, 0, 667,
+ 785, 770, 752, 769, 768, 751, 743, 751, 741, 749,
+ 0, 746, 745, 756, 739, 742, 757, 740, 753, 754,
+ 751, 748, 757, 750, 749, 732, 731, 730, 741, 582,
+ 754, 724, 734, 718, 717, 0, 745, 717, 743, 715,
+
+ 719, 718, 0, 729, 732, 728, 730, 711, 725, 709,
+ 710, 718, 701, 700, 0, 706, 705, 0, 728, 713,
+ 706, 0, 0, 710, 0, 709, 0, 715, 714, 0,
+ 690, 698, 688, 716, 695, 0, 0, 708, 0, 0,
+ 707, 706, 746, 611, 696, 703, 702, 678, 677, 705,
+ 677, 703, 689, 674, 691, 670, 669, 190, 613, 557,
+ 667, 687, 686, 0, 0, 681, 0, 680, 686, 0,
+ 671, 0, 0, 671, 590, 343, 672, 645, 644, 654,
+ 635, 631, 612, 612, 604, 443, 635, 576, 575, 549,
+ 25, 87, 0, 183, 500, 552, 1214, 636, 591, 0,
+
+ 0, 196, 258, 254, 272, 609, 1214, 614, 598, 279,
+ 284, 0, 336, 348, 671, 0, 0, 362, 672, 688,
+ 1214, 394, 689, 1214, 408, 670, 691, 649, 651, 474,
+ 476, 693, 694, 1214, 1214, 704, 707, 710, 530, 591,
+ 713, 717, 720, 722
} ;
-static yyconst flex_int16_t yy_def[824] =
+static yyconst flex_int16_t yy_def[845] =
{ 0,
- 812, 1, 812, 3, 813, 813, 812, 812, 812, 812,
- 812, 812, 812, 812, 812, 812, 812, 812, 812, 812,
- 812, 812, 812, 814, 812, 814, 814, 814, 814, 814,
- 814, 814, 814, 814, 814, 814, 814, 814, 814, 814,
- 814, 814, 814, 814, 814, 812, 812, 812, 812, 812,
- 812, 812, 812, 812, 815, 812, 812, 812, 812, 812,
- 812, 812, 812, 812, 812, 812, 812, 816, 812, 817,
- 19, 812, 812, 812, 812, 818, 20, 812, 812, 812,
- 812, 812, 812, 814, 812, 812, 814, 814, 814, 814,
- 814, 814, 814, 814, 814, 814, 814, 814, 814, 814,
-
- 814, 814, 814, 814, 814, 814, 814, 814, 814, 814,
- 814, 814, 814, 814, 814, 814, 814, 814, 814, 814,
- 814, 814, 814, 814, 814, 814, 814, 814, 814, 814,
- 814, 814, 814, 814, 814, 814, 814, 814, 814, 814,
- 814, 814, 814, 814, 814, 814, 814, 814, 814, 812,
- 812, 812, 812, 812, 812, 812, 812, 812, 812, 812,
- 819, 812, 815, 812, 812, 817, 812, 812, 812, 812,
- 818, 812, 812, 814, 814, 814, 814, 814, 814, 814,
- 814, 814, 814, 814, 814, 814, 814, 814, 814, 814,
- 814, 814, 814, 814, 814, 814, 814, 814, 814, 814,
-
- 814, 814, 814, 814, 814, 814, 814, 814, 814, 814,
- 814, 814, 814, 814, 814, 814, 814, 814, 814, 814,
- 814, 814, 814, 814, 814, 814, 814, 814, 814, 814,
- 814, 814, 814, 814, 814, 814, 814, 814, 814, 814,
- 814, 814, 814, 814, 814, 814, 814, 814, 814, 814,
- 812, 812, 812, 812, 819, 812, 812, 812, 812, 812,
- 812, 812, 812, 814, 814, 814, 814, 814, 814, 814,
- 814, 814, 814, 814, 814, 814, 814, 814, 814, 814,
- 814, 814, 814, 814, 814, 814, 814, 814, 814, 814,
- 814, 814, 814, 814, 814, 814, 814, 814, 814, 814,
-
- 814, 814, 814, 814, 814, 814, 814, 814, 814, 814,
- 814, 814, 814, 814, 814, 814, 814, 814, 814, 814,
- 814, 814, 814, 814, 814, 814, 814, 814, 814, 814,
- 814, 814, 814, 814, 814, 814, 814, 814, 814, 814,
- 814, 814, 814, 814, 814, 812, 812, 812, 812, 812,
- 812, 814, 814, 814, 814, 814, 814, 814, 814, 814,
- 814, 814, 814, 814, 814, 814, 814, 814, 814, 814,
- 814, 814, 814, 814, 814, 814, 814, 814, 814, 814,
- 814, 814, 814, 814, 814, 814, 814, 814, 814, 814,
- 814, 814, 814, 814, 814, 814, 814, 814, 814, 814,
-
- 814, 814, 814, 814, 814, 814, 814, 814, 814, 814,
- 814, 814, 814, 814, 814, 814, 814, 814, 814, 814,
- 814, 814, 814, 814, 814, 814, 814, 814, 812, 812,
- 812, 812, 814, 814, 814, 814, 814, 814, 814, 814,
- 814, 814, 814, 814, 814, 814, 814, 814, 814, 814,
- 814, 814, 814, 814, 814, 814, 814, 814, 814, 814,
- 814, 814, 814, 814, 814, 814, 814, 814, 814, 814,
- 814, 814, 814, 814, 814, 814, 814, 814, 814, 814,
- 814, 814, 814, 814, 814, 814, 814, 814, 812, 812,
- 812, 812, 814, 814, 814, 814, 814, 814, 814, 814,
-
- 814, 814, 814, 814, 814, 814, 814, 814, 814, 814,
- 814, 814, 814, 814, 814, 814, 814, 814, 814, 814,
- 814, 814, 814, 814, 814, 814, 814, 814, 814, 814,
- 814, 812, 820, 812, 812, 812, 814, 814, 814, 814,
- 814, 814, 814, 814, 814, 814, 814, 814, 814, 814,
- 814, 814, 814, 814, 814, 814, 814, 814, 814, 814,
- 814, 814, 814, 814, 814, 814, 814, 814, 814, 814,
- 814, 814, 814, 814, 812, 812, 812, 812, 821, 812,
- 812, 812, 814, 814, 814, 814, 814, 814, 814, 814,
- 814, 814, 814, 814, 814, 814, 814, 814, 814, 814,
-
- 814, 814, 814, 814, 814, 814, 814, 814, 814, 814,
- 814, 814, 814, 814, 814, 814, 814, 812, 822, 812,
- 821, 812, 812, 814, 814, 814, 814, 814, 814, 814,
- 814, 814, 814, 814, 814, 814, 814, 814, 814, 814,
- 814, 814, 814, 814, 814, 814, 814, 814, 814, 814,
- 814, 814, 814, 812, 812, 812, 812, 823, 812, 812,
- 812, 814, 814, 814, 814, 814, 814, 814, 814, 814,
- 814, 814, 814, 814, 814, 814, 814, 814, 814, 814,
- 814, 814, 814, 814, 814, 814, 814, 823, 812, 812,
- 814, 814, 814, 814, 814, 814, 814, 814, 814, 814,
-
- 814, 814, 814, 814, 814, 814, 814, 814, 814, 814,
- 814, 814, 814, 814, 814, 812, 812, 814, 814, 814,
- 814, 814, 814, 814, 814, 814, 814, 814, 814, 814,
- 814, 814, 814, 814, 814, 814, 814, 814, 812, 812,
- 814, 814, 814, 814, 814, 814, 814, 814, 814, 814,
- 814, 814, 812, 812, 812, 814, 814, 814, 814, 814,
- 814, 814, 814, 814, 814, 814, 814, 812, 812, 812,
- 814, 814, 814, 814, 814, 814, 812, 812, 812, 814,
- 814, 814, 814, 814, 814, 812, 812, 812, 812, 812,
- 814, 814, 814, 814, 814, 812, 812, 812, 812, 814,
-
- 814, 814, 812, 812, 814, 814, 812, 812, 812, 812,
- 812, 0, 812, 812, 812, 812, 812, 812, 812, 812,
- 812, 812, 812
+ 835, 1, 835, 3, 836, 836, 835, 835, 835, 835,
+ 835, 835, 835, 835, 835, 835, 835, 835, 835, 835,
+ 835, 835, 835, 837, 835, 837, 837, 837, 837, 837,
+ 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
+ 837, 837, 837, 837, 837, 835, 835, 835, 835, 835,
+ 835, 835, 835, 835, 838, 835, 835, 835, 835, 835,
+ 835, 835, 835, 835, 835, 835, 835, 839, 835, 840,
+ 19, 835, 835, 835, 835, 841, 20, 835, 835, 835,
+ 835, 835, 835, 837, 835, 835, 837, 837, 837, 837,
+ 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
+
+ 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
+ 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
+ 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
+ 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
+ 837, 837, 837, 837, 837, 837, 837, 837, 837, 835,
+ 835, 835, 835, 835, 835, 835, 835, 835, 835, 835,
+ 842, 835, 838, 835, 835, 840, 835, 835, 835, 835,
+ 841, 835, 835, 837, 837, 837, 837, 837, 837, 837,
+ 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
+ 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
+
+ 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
+ 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
+ 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
+ 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
+ 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
+ 835, 835, 835, 835, 842, 835, 835, 835, 835, 835,
+ 835, 835, 835, 837, 837, 837, 837, 837, 837, 837,
+ 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
+ 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
+ 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
+
+ 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
+ 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
+ 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
+ 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
+ 837, 837, 837, 837, 837, 835, 835, 835, 835, 835,
+ 835, 837, 837, 837, 837, 837, 837, 837, 837, 837,
+ 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
+ 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
+ 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
+ 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
+
+ 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
+ 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
+ 837, 837, 837, 837, 837, 837, 837, 837, 835, 835,
+ 835, 835, 837, 837, 837, 837, 837, 837, 837, 837,
+ 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
+ 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
+ 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
+ 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
+ 837, 837, 837, 837, 837, 837, 837, 837, 835, 835,
+ 835, 835, 837, 837, 837, 837, 837, 837, 837, 837,
+
+ 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
+ 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
+ 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
+ 837, 835, 835, 835, 835, 835, 837, 837, 837, 837,
+ 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
+ 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
+ 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
+ 837, 837, 837, 837, 835, 835, 835, 835, 843, 835,
+ 835, 835, 837, 837, 837, 837, 837, 837, 837, 837,
+ 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
+
+ 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
+ 837, 837, 837, 837, 837, 837, 837, 835, 835, 835,
+ 843, 835, 835, 835, 837, 837, 837, 837, 837, 837,
+ 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
+ 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
+ 837, 837, 837, 837, 835, 835, 835, 835, 844, 835,
+ 835, 835, 835, 837, 837, 837, 837, 837, 837, 837,
+ 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
+ 837, 837, 837, 837, 837, 837, 837, 837, 837, 844,
+ 835, 835, 835, 837, 837, 837, 837, 837, 837, 837,
+
+ 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
+ 837, 837, 837, 837, 837, 837, 837, 837, 835, 835,
+ 835, 837, 837, 837, 837, 837, 837, 837, 837, 837,
+ 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
+ 837, 837, 835, 835, 835, 837, 837, 837, 837, 837,
+ 837, 837, 837, 837, 837, 837, 837, 835, 835, 835,
+ 835, 837, 837, 837, 837, 837, 837, 837, 837, 837,
+ 837, 837, 837, 835, 835, 835, 835, 837, 837, 837,
+ 837, 837, 837, 835, 835, 835, 835, 837, 837, 837,
+ 837, 837, 837, 835, 835, 835, 835, 835, 835, 837,
+
+ 837, 837, 837, 837, 835, 835, 835, 835, 835, 837,
+ 837, 837, 835, 835, 835, 837, 837, 835, 835, 835,
+ 835, 835, 835, 835, 835, 835, 835, 835, 835, 835,
+ 835, 835, 835, 835, 0, 835, 835, 835, 835, 835,
+ 835, 835, 835, 835
} ;
-static yyconst flex_int16_t yy_nxt[1255] =
+static yyconst flex_int16_t yy_nxt[1283] =
{ 0,
8, 9, 10, 9, 11, 8, 12, 13, 8, 8,
14, 15, 16, 17, 18, 19, 20, 20, 20, 20,
20, 20, 8, 21, 22, 23, 24, 24, 24, 24,
- 24, 24, 24, 24, 24, 24, 24, 25, 24, 26,
- 27, 28, 29, 30, 31, 32, 33, 34, 24, 24,
- 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
- 45, 24, 24, 24, 46, 47, 58, 807, 58, 48,
- 49, 50, 51, 50, 49, 49, 49, 49, 49, 49,
- 49, 49, 49, 49, 52, 49, 53, 53, 53, 53,
- 53, 53, 54, 49, 49, 49, 55, 55, 55, 55,
-
- 55, 55, 55, 55, 55, 55, 55, 49, 55, 55,
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+ 25, 24, 26, 27, 28, 29, 30, 31, 32, 33,
+ 34, 24, 24, 35, 36, 37, 38, 39, 40, 41,
+ 42, 43, 44, 45, 24, 24, 24, 46, 47, 58,
+ 803, 58, 48, 49, 50, 51, 50, 49, 49, 49,
+ 49, 49, 49, 49, 49, 49, 49, 52, 49, 53,
+ 53, 53, 53, 53, 53, 54, 49, 49, 49, 55,
+
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 49, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 55, 55, 55, 49, 61, 64, 806, 66, 68,
- 68, 68, 68, 68, 68, 68, 79, 80, 812, 65,
- 67, 85, 62, 70, 150, 71, 71, 71, 71, 71,
- 71, 72, 82, 83, 86, 87, 90, 805, 91, 110,
- 73, 74, 92, 812, 93, 75, 76, 111, 94, 119,
- 88, 89, 121, 73, 74, 95, 122, 97, 96, 112,
- 160, 98, 160, 120, 151, 183, 184, 99, 75, 802,
-
- 123, 76, 70, 100, 77, 77, 77, 77, 77, 77,
- 77, 101, 231, 102, 124, 104, 58, 129, 58, 73,
- 74, 126, 103, 105, 78, 193, 106, 130, 232, 107,
- 195, 113, 73, 74, 114, 108, 194, 127, 115, 116,
- 128, 131, 138, 117, 196, 139, 118, 78, 132, 133,
- 160, 146, 160, 134, 140, 147, 154, 155, 142, 135,
- 136, 141, 137, 143, 152, 148, 58, 144, 153, 221,
- 145, 162, 162, 162, 162, 162, 162, 162, 164, 165,
- 167, 168, 213, 222, 239, 240, 248, 241, 218, 249,
- 214, 164, 165, 167, 168, 219, 242, 205, 156, 243,
-
- 206, 207, 154, 155, 208, 157, 209, 244, 152, 158,
- 58, 801, 153, 269, 159, 70, 800, 72, 72, 72,
- 72, 72, 72, 72, 154, 155, 263, 270, 258, 259,
- 169, 169, 73, 74, 170, 170, 170, 170, 170, 170,
- 170, 258, 259, 795, 156, 73, 74, 274, 275, 263,
- 333, 157, 305, 306, 307, 158, 340, 341, 342, 334,
- 159, 355, 356, 357, 576, 577, 156, 366, 367, 368,
- 374, 375, 376, 157, 378, 379, 380, 158, 389, 390,
- 391, 768, 159, 162, 162, 162, 162, 162, 162, 162,
- 256, 256, 655, 656, 257, 257, 257, 257, 257, 257,
-
- 257, 260, 260, 655, 656, 261, 261, 261, 261, 261,
- 261, 261, 170, 170, 170, 170, 170, 170, 170, 170,
- 170, 170, 170, 170, 170, 170, 257, 257, 257, 257,
- 257, 257, 257, 769, 794, 262, 257, 257, 257, 257,
- 257, 257, 257, 423, 424, 425, 793, 792, 262, 350,
- 350, 791, 165, 351, 351, 351, 351, 351, 351, 351,
- 454, 455, 456, 786, 785, 165, 261, 261, 261, 261,
- 261, 261, 261, 261, 261, 261, 261, 261, 261, 261,
- 351, 351, 351, 351, 351, 351, 351, 784, 783, 168,
- 351, 351, 351, 351, 351, 351, 351, 444, 445, 446,
-
- 581, 782, 168, 457, 458, 459, 259, 781, 447, 448,
- 460, 461, 462, 499, 500, 501, 522, 523, 524, 259,
- 490, 546, 548, 780, 502, 503, 779, 525, 526, 547,
- 549, 561, 562, 563, 533, 534, 534, 534, 534, 534,
- 534, 622, 564, 565, 576, 577, 576, 577, 776, 775,
- 774, 768, 623, 655, 656, 596, 597, 598, 576, 577,
- 580, 580, 580, 580, 580, 580, 580, 599, 614, 615,
- 616, 798, 619, 620, 620, 620, 620, 620, 620, 579,
- 617, 576, 577, 753, 773, 638, 772, 771, 658, 770,
- 754, 576, 577, 639, 640, 578, 578, 578, 578, 578,
-
- 578, 641, 642, 769, 579, 580, 580, 580, 580, 580,
- 580, 580, 753, 658, 655, 656, 777, 787, 796, 754,
- 789, 655, 656, 799, 778, 788, 797, 790, 659, 659,
- 659, 659, 659, 659, 659, 657, 657, 657, 657, 657,
- 657, 655, 656, 787, 798, 789, 796, 767, 766, 765,
- 764, 788, 790, 763, 797, 659, 659, 659, 659, 659,
- 659, 659, 803, 808, 810, 808, 810, 762, 761, 760,
- 804, 809, 811, 809, 811, 759, 758, 757, 756, 755,
- 752, 751, 750, 749, 748, 747, 746, 745, 744, 743,
- 742, 741, 740, 739, 738, 737, 799, 56, 56, 56,
-
- 56, 56, 56, 56, 56, 84, 84, 84, 84, 84,
- 163, 163, 163, 163, 163, 68, 68, 166, 166, 171,
- 171, 171, 255, 255, 736, 255, 255, 255, 255, 255,
- 578, 578, 578, 735, 734, 733, 578, 621, 621, 621,
- 657, 657, 657, 732, 731, 730, 657, 688, 688, 688,
- 729, 728, 727, 726, 725, 724, 723, 722, 721, 720,
- 719, 718, 717, 716, 715, 714, 713, 712, 711, 710,
- 709, 708, 707, 706, 705, 704, 703, 702, 701, 700,
- 699, 698, 697, 696, 695, 694, 693, 692, 691, 690,
- 689, 687, 686, 685, 684, 683, 682, 681, 680, 679,
-
- 678, 677, 676, 675, 674, 673, 672, 671, 670, 669,
- 668, 667, 666, 665, 664, 663, 662, 661, 660, 654,
- 653, 652, 651, 650, 649, 648, 647, 646, 645, 644,
- 643, 637, 636, 635, 634, 633, 632, 631, 630, 629,
- 628, 627, 626, 625, 624, 618, 613, 612, 611, 610,
- 609, 608, 607, 606, 605, 604, 603, 602, 601, 600,
- 595, 594, 593, 592, 591, 590, 589, 588, 587, 586,
- 585, 584, 583, 582, 581, 575, 574, 573, 572, 571,
- 570, 569, 568, 567, 566, 560, 559, 558, 557, 556,
- 555, 554, 553, 552, 551, 550, 545, 544, 543, 542,
-
- 541, 540, 539, 538, 537, 536, 535, 532, 531, 530,
- 529, 528, 527, 521, 520, 519, 518, 517, 516, 515,
- 514, 513, 512, 511, 510, 509, 508, 507, 506, 505,
- 504, 498, 497, 496, 495, 494, 493, 492, 491, 490,
- 489, 488, 487, 486, 485, 484, 483, 482, 481, 480,
- 479, 478, 477, 476, 475, 474, 473, 472, 471, 470,
- 469, 468, 467, 466, 465, 464, 463, 453, 452, 451,
- 450, 449, 443, 442, 441, 440, 439, 438, 437, 436,
- 435, 434, 433, 432, 431, 430, 429, 428, 427, 426,
- 422, 421, 420, 419, 418, 417, 416, 415, 414, 413,
-
- 412, 411, 410, 409, 408, 407, 406, 405, 404, 403,
- 402, 401, 400, 399, 398, 397, 396, 395, 394, 393,
- 392, 388, 387, 386, 385, 384, 383, 382, 381, 377,
- 373, 372, 371, 370, 369, 365, 364, 363, 362, 361,
- 360, 359, 358, 354, 353, 352, 349, 348, 347, 346,
- 345, 344, 343, 339, 338, 337, 336, 335, 332, 331,
- 330, 329, 328, 327, 326, 325, 324, 323, 322, 321,
- 320, 319, 318, 317, 316, 315, 314, 313, 312, 311,
- 310, 309, 308, 304, 303, 302, 301, 300, 299, 298,
- 297, 296, 295, 294, 293, 292, 291, 290, 289, 288,
-
- 287, 286, 285, 284, 283, 282, 281, 280, 279, 278,
- 277, 276, 273, 272, 271, 268, 267, 266, 265, 264,
- 254, 253, 252, 251, 250, 247, 246, 245, 238, 237,
- 236, 235, 234, 233, 230, 229, 228, 227, 226, 225,
- 224, 223, 220, 217, 216, 215, 212, 211, 210, 204,
- 203, 202, 201, 200, 199, 198, 197, 192, 191, 190,
- 189, 188, 187, 186, 185, 182, 181, 180, 179, 178,
- 177, 176, 175, 174, 173, 172, 161, 149, 125, 109,
- 81, 69, 63, 60, 59, 812, 57, 57, 7, 812,
- 812, 812, 812, 812, 812, 812, 812, 812, 812, 812,
-
- 812, 812, 812, 812, 812, 812, 812, 812, 812, 812,
- 812, 812, 812, 812, 812, 812, 812, 812, 812, 812,
- 812, 812, 812, 812, 812, 812, 812, 812, 812, 812,
- 812, 812, 812, 812, 812, 812, 812, 812, 812, 812,
- 812, 812, 812, 812, 812, 812, 812, 812, 812, 812,
- 812, 812, 812, 812
+ 49, 61, 64, 804, 66, 68, 68, 68, 68, 68,
+ 68, 68, 79, 80, 85, 65, 67, 87, 62, 70,
+ 119, 71, 71, 71, 71, 71, 71, 72, 82, 83,
+ 86, 121, 88, 89, 120, 122, 73, 74, 835, 101,
+ 90, 102, 91, 93, 75, 76, 92, 94, 123, 126,
+ 103, 758, 73, 74, 95, 241, 97, 96, 183, 184,
+
+ 98, 110, 124, 835, 242, 127, 99, 75, 128, 111,
+ 76, 70, 100, 77, 77, 77, 77, 77, 77, 77,
+ 129, 112, 152, 104, 58, 805, 153, 150, 73, 74,
+ 130, 105, 154, 155, 106, 195, 78, 107, 138, 113,
+ 774, 139, 114, 108, 73, 74, 115, 116, 131, 196,
+ 140, 117, 810, 142, 118, 132, 133, 141, 143, 78,
+ 134, 160, 144, 160, 146, 145, 135, 136, 147, 137,
+ 151, 58, 193, 58, 164, 165, 231, 156, 148, 213,
+ 239, 240, 218, 194, 157, 167, 168, 214, 158, 219,
+ 164, 165, 232, 159, 162, 162, 162, 162, 162, 162,
+
+ 162, 167, 168, 70, 243, 72, 72, 72, 72, 72,
+ 72, 72, 244, 248, 811, 221, 249, 812, 169, 169,
+ 73, 74, 170, 170, 170, 170, 170, 170, 170, 222,
+ 813, 205, 154, 155, 206, 207, 73, 74, 208, 152,
+ 209, 58, 816, 153, 154, 155, 160, 817, 160, 162,
+ 162, 162, 162, 162, 162, 162, 256, 256, 258, 259,
+ 257, 257, 257, 257, 257, 257, 257, 170, 170, 170,
+ 170, 170, 170, 170, 258, 259, 263, 156, 269, 274,
+ 275, 305, 306, 307, 157, 333, 818, 546, 158, 156,
+ 785, 548, 270, 159, 334, 819, 157, 547, 786, 263,
+
+ 158, 549, 260, 260, 822, 159, 261, 261, 261, 261,
+ 261, 261, 261, 170, 170, 170, 170, 170, 170, 170,
+ 340, 341, 342, 355, 356, 357, 366, 367, 368, 262,
+ 257, 257, 257, 257, 257, 257, 257, 257, 257, 257,
+ 257, 257, 257, 257, 796, 262, 374, 375, 376, 825,
+ 350, 350, 797, 165, 351, 351, 351, 351, 351, 351,
+ 351, 261, 261, 261, 261, 261, 261, 261, 826, 165,
+ 261, 261, 261, 261, 261, 261, 261, 378, 379, 380,
+ 389, 390, 391, 423, 424, 425, 168, 351, 351, 351,
+ 351, 351, 351, 351, 351, 351, 351, 351, 351, 351,
+
+ 351, 806, 168, 444, 445, 446, 454, 455, 456, 807,
+ 259, 457, 458, 459, 447, 448, 460, 461, 462, 499,
+ 500, 501, 522, 523, 524, 490, 259, 831, 639, 832,
+ 502, 503, 68, 525, 526, 561, 562, 563, 640, 533,
+ 534, 534, 534, 534, 534, 534, 564, 565, 576, 577,
+ 641, 576, 577, 796, 576, 577, 656, 657, 775, 642,
+ 643, 797, 578, 578, 578, 578, 578, 578, 580, 580,
+ 580, 580, 580, 580, 580, 596, 597, 598, 614, 615,
+ 616, 576, 577, 656, 657, 581, 579, 599, 576, 577,
+ 617, 775, 808, 166, 802, 619, 620, 620, 620, 620,
+
+ 620, 620, 578, 578, 578, 578, 578, 578, 576, 577,
+ 806, 579, 759, 776, 759, 808, 656, 657, 807, 760,
+ 622, 760, 580, 580, 580, 580, 580, 580, 580, 623,
+ 658, 658, 658, 658, 658, 658, 798, 798, 801, 800,
+ 624, 656, 657, 799, 799, 814, 776, 809, 656, 657,
+ 829, 795, 829, 815, 659, 660, 660, 660, 660, 660,
+ 660, 660, 658, 658, 658, 658, 658, 658, 656, 657,
+ 809, 827, 820, 823, 794, 793, 792, 791, 828, 659,
+ 821, 824, 660, 660, 660, 660, 660, 660, 660, 820,
+ 823, 830, 827, 830, 833, 833, 790, 821, 824, 828,
+
+ 789, 788, 834, 834, 56, 56, 56, 56, 56, 84,
+ 84, 84, 163, 163, 163, 171, 171, 255, 787, 255,
+ 255, 255, 621, 621, 690, 690, 784, 783, 782, 781,
+ 780, 779, 778, 777, 773, 772, 771, 770, 769, 768,
+ 767, 766, 765, 764, 763, 762, 761, 758, 757, 756,
+ 755, 754, 753, 752, 751, 750, 749, 748, 747, 746,
+ 745, 744, 743, 742, 741, 740, 739, 738, 737, 736,
+ 735, 734, 733, 732, 731, 730, 729, 728, 727, 726,
+ 725, 724, 723, 722, 721, 720, 719, 718, 717, 716,
+ 715, 714, 713, 712, 711, 710, 709, 708, 707, 706,
+
+ 705, 704, 703, 702, 701, 700, 699, 698, 697, 696,
+ 695, 694, 693, 692, 691, 689, 688, 687, 686, 685,
+ 684, 683, 682, 681, 680, 679, 678, 677, 676, 675,
+ 674, 673, 672, 671, 670, 669, 668, 667, 666, 665,
+ 664, 663, 662, 661, 655, 654, 653, 652, 651, 650,
+ 649, 648, 647, 646, 645, 644, 638, 637, 636, 635,
+ 634, 633, 632, 631, 630, 629, 628, 627, 626, 625,
+ 618, 613, 612, 611, 610, 609, 608, 607, 606, 605,
+ 604, 603, 602, 601, 600, 595, 594, 593, 592, 591,
+ 590, 589, 588, 587, 586, 585, 584, 583, 582, 581,
+
+ 575, 574, 573, 572, 571, 570, 569, 568, 567, 566,
+ 560, 559, 558, 557, 556, 555, 554, 553, 552, 551,
+ 550, 545, 544, 543, 542, 541, 540, 539, 538, 537,
+ 536, 535, 532, 531, 530, 529, 528, 527, 521, 520,
+ 519, 518, 517, 516, 515, 514, 513, 512, 511, 510,
+ 509, 508, 507, 506, 505, 504, 498, 497, 496, 495,
+ 494, 493, 492, 491, 490, 489, 488, 487, 486, 485,
+ 484, 483, 482, 481, 480, 479, 478, 477, 476, 475,
+ 474, 473, 472, 471, 470, 469, 468, 467, 466, 465,
+ 464, 463, 453, 452, 451, 450, 449, 443, 442, 441,
+
+ 440, 439, 438, 437, 436, 435, 434, 433, 432, 431,
+ 430, 429, 428, 427, 426, 422, 421, 420, 419, 418,
+ 417, 416, 415, 414, 413, 412, 411, 410, 409, 408,
+ 407, 406, 405, 404, 403, 402, 401, 400, 399, 398,
+ 397, 396, 395, 394, 393, 392, 388, 387, 386, 385,
+ 384, 383, 382, 381, 377, 373, 372, 371, 370, 369,
+ 365, 364, 363, 362, 361, 360, 359, 358, 354, 353,
+ 352, 349, 348, 347, 346, 345, 344, 343, 339, 338,
+ 337, 336, 335, 332, 331, 330, 329, 328, 327, 326,
+ 325, 324, 323, 322, 321, 320, 319, 318, 317, 316,
+
+ 315, 314, 313, 312, 311, 310, 309, 308, 304, 303,
+ 302, 301, 300, 299, 298, 297, 296, 295, 294, 293,
+ 292, 291, 290, 289, 288, 287, 286, 285, 284, 283,
+ 282, 281, 280, 279, 278, 277, 276, 273, 272, 271,
+ 268, 267, 266, 265, 264, 254, 253, 252, 251, 250,
+ 247, 246, 245, 238, 237, 236, 235, 234, 233, 230,
+ 229, 228, 227, 226, 225, 224, 223, 220, 217, 216,
+ 215, 212, 211, 210, 204, 203, 202, 201, 200, 199,
+ 198, 197, 192, 191, 190, 189, 188, 187, 186, 185,
+ 182, 181, 180, 179, 178, 177, 176, 175, 174, 173,
+
+ 172, 161, 149, 125, 109, 81, 69, 63, 60, 59,
+ 835, 57, 57, 7, 835, 835, 835, 835, 835, 835,
+ 835, 835, 835, 835, 835, 835, 835, 835, 835, 835,
+ 835, 835, 835, 835, 835, 835, 835, 835, 835, 835,
+ 835, 835, 835, 835, 835, 835, 835, 835, 835, 835,
+ 835, 835, 835, 835, 835, 835, 835, 835, 835, 835,
+ 835, 835, 835, 835, 835, 835, 835, 835, 835, 835,
+ 835, 835, 835, 835, 835, 835, 835, 835, 835, 835,
+ 835, 835
} ;
-static yyconst flex_int16_t yy_chk[1255] =
+static yyconst flex_int16_t yy_chk[1283] =
{ 0,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
@@ -835,138 +853,141 @@ static yyconst flex_int16_t yy_chk[1255] =
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 2, 9, 803, 9, 2,
- 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 1, 1, 1, 1, 1, 1, 1, 1, 2, 9,
+ 791, 9, 2, 3, 3, 3, 3, 3, 3, 3,
3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
- 3, 3, 3, 3, 3, 13, 15, 801, 16, 17,
- 17, 17, 17, 17, 17, 17, 21, 21, 71, 15,
- 16, 25, 13, 19, 46, 19, 19, 19, 19, 19,
- 19, 19, 23, 23, 25, 26, 27, 800, 27, 33,
- 19, 19, 27, 71, 28, 19, 19, 33, 28, 35,
- 26, 26, 36, 19, 19, 28, 36, 29, 28, 33,
- 50, 29, 50, 35, 46, 96, 96, 29, 19, 795,
-
- 37, 19, 20, 29, 20, 20, 20, 20, 20, 20,
- 20, 30, 135, 30, 37, 31, 58, 40, 58, 20,
- 20, 39, 30, 31, 20, 105, 31, 40, 135, 31,
- 106, 34, 20, 20, 34, 31, 105, 39, 34, 34,
- 39, 41, 42, 34, 106, 42, 34, 20, 41, 41,
- 160, 44, 160, 41, 42, 44, 48, 48, 43, 41,
- 41, 42, 41, 43, 47, 44, 47, 43, 47, 126,
- 43, 53, 53, 53, 53, 53, 53, 53, 68, 68,
- 70, 70, 120, 126, 142, 142, 148, 143, 124, 148,
- 120, 68, 68, 70, 70, 124, 143, 116, 48, 144,
-
- 116, 116, 153, 153, 116, 48, 116, 144, 152, 48,
- 152, 794, 152, 180, 48, 72, 793, 72, 72, 72,
- 72, 72, 72, 72, 154, 154, 171, 180, 166, 166,
- 73, 73, 72, 72, 73, 73, 73, 73, 73, 73,
- 73, 166, 166, 784, 153, 72, 72, 184, 184, 171,
- 241, 153, 215, 215, 215, 153, 247, 247, 247, 241,
- 153, 268, 268, 268, 621, 621, 154, 279, 279, 279,
- 288, 288, 288, 154, 292, 292, 292, 154, 301, 301,
- 301, 754, 154, 162, 162, 162, 162, 162, 162, 162,
- 164, 164, 655, 655, 164, 164, 164, 164, 164, 164,
-
- 164, 167, 167, 688, 688, 167, 167, 167, 167, 167,
- 167, 167, 169, 169, 169, 169, 169, 169, 169, 170,
- 170, 170, 170, 170, 170, 170, 256, 256, 256, 256,
- 256, 256, 256, 754, 783, 170, 257, 257, 257, 257,
- 257, 257, 257, 338, 338, 338, 782, 781, 170, 258,
- 258, 780, 257, 258, 258, 258, 258, 258, 258, 258,
- 393, 393, 393, 777, 776, 257, 260, 260, 260, 260,
- 260, 260, 260, 261, 261, 261, 261, 261, 261, 261,
- 350, 350, 350, 350, 350, 350, 350, 775, 774, 261,
- 351, 351, 351, 351, 351, 351, 351, 382, 382, 382,
-
- 581, 773, 261, 394, 394, 394, 351, 772, 382, 382,
- 395, 395, 395, 443, 443, 443, 483, 483, 483, 351,
- 490, 504, 505, 771, 443, 443, 770, 483, 483, 504,
- 505, 519, 519, 519, 490, 490, 490, 490, 490, 490,
- 490, 581, 519, 519, 533, 533, 534, 534, 765, 763,
- 762, 768, 581, 619, 619, 554, 554, 554, 576, 576,
- 534, 534, 534, 534, 534, 534, 534, 554, 573, 573,
- 573, 790, 576, 576, 576, 576, 576, 576, 576, 533,
- 573, 578, 578, 739, 760, 605, 757, 756, 619, 755,
- 739, 580, 580, 605, 606, 578, 578, 578, 578, 578,
-
- 578, 606, 606, 768, 533, 580, 580, 580, 580, 580,
- 580, 580, 753, 619, 620, 620, 769, 778, 786, 753,
- 779, 657, 657, 790, 769, 778, 786, 779, 620, 620,
- 620, 620, 620, 620, 620, 657, 657, 657, 657, 657,
- 657, 659, 659, 787, 798, 789, 796, 752, 751, 750,
- 749, 787, 789, 748, 796, 659, 659, 659, 659, 659,
- 659, 659, 799, 804, 807, 808, 810, 747, 746, 745,
- 799, 804, 807, 808, 810, 744, 743, 742, 741, 740,
- 738, 737, 734, 731, 730, 729, 728, 727, 725, 724,
- 722, 720, 717, 716, 714, 713, 798, 813, 813, 813,
-
- 813, 813, 813, 813, 813, 814, 814, 814, 814, 814,
- 815, 815, 815, 815, 815, 816, 816, 817, 817, 818,
- 818, 818, 819, 819, 711, 819, 819, 819, 819, 819,
- 820, 820, 820, 710, 709, 708, 820, 821, 821, 821,
- 822, 822, 822, 707, 706, 705, 822, 823, 823, 823,
- 704, 703, 702, 701, 699, 698, 697, 696, 695, 694,
- 692, 691, 690, 689, 687, 686, 685, 684, 683, 682,
- 681, 680, 679, 678, 677, 676, 675, 674, 673, 672,
- 671, 670, 668, 667, 666, 665, 664, 663, 662, 661,
- 660, 653, 651, 650, 648, 647, 646, 645, 644, 643,
-
- 642, 641, 640, 639, 638, 637, 636, 634, 633, 632,
- 631, 630, 629, 628, 626, 625, 624, 623, 622, 618,
- 617, 616, 615, 614, 613, 612, 611, 610, 609, 608,
- 607, 601, 599, 598, 597, 596, 592, 591, 590, 589,
- 588, 587, 586, 585, 584, 575, 571, 570, 568, 567,
- 565, 564, 563, 562, 561, 560, 559, 558, 557, 555,
- 553, 552, 551, 550, 549, 548, 547, 546, 545, 544,
- 542, 541, 537, 536, 535, 532, 531, 529, 528, 526,
- 525, 524, 523, 522, 520, 518, 517, 516, 515, 514,
- 513, 511, 510, 509, 508, 507, 503, 502, 501, 500,
-
- 499, 498, 495, 494, 493, 492, 491, 489, 488, 487,
- 486, 485, 484, 482, 481, 474, 473, 470, 469, 466,
- 465, 464, 463, 452, 451, 450, 448, 447, 446, 445,
- 444, 441, 439, 438, 437, 435, 434, 432, 431, 430,
- 429, 427, 426, 421, 420, 418, 417, 416, 415, 414,
- 413, 412, 411, 410, 409, 407, 406, 405, 404, 403,
- 402, 401, 400, 399, 398, 397, 396, 392, 388, 387,
- 386, 383, 381, 371, 369, 365, 364, 363, 362, 360,
- 358, 353, 352, 349, 348, 347, 346, 345, 344, 339,
- 337, 336, 335, 334, 333, 331, 330, 327, 326, 325,
-
- 324, 323, 322, 321, 320, 319, 318, 317, 316, 315,
- 314, 313, 312, 311, 310, 309, 308, 307, 306, 305,
- 302, 300, 299, 298, 297, 296, 295, 294, 293, 291,
- 287, 285, 284, 283, 282, 278, 277, 276, 275, 274,
- 273, 272, 271, 267, 265, 264, 254, 253, 252, 251,
- 250, 249, 248, 246, 245, 244, 243, 242, 240, 239,
- 238, 237, 236, 235, 234, 233, 232, 231, 230, 229,
- 228, 227, 226, 225, 224, 223, 222, 221, 220, 219,
- 218, 217, 216, 214, 213, 212, 211, 210, 209, 208,
- 207, 206, 205, 204, 203, 202, 201, 200, 199, 198,
-
- 196, 195, 194, 193, 192, 191, 190, 189, 188, 187,
- 186, 185, 183, 182, 181, 179, 178, 177, 176, 174,
- 159, 158, 157, 156, 149, 147, 146, 145, 141, 140,
- 139, 138, 137, 136, 134, 133, 132, 131, 130, 129,
- 128, 127, 125, 123, 122, 121, 119, 118, 117, 115,
- 114, 112, 111, 110, 109, 108, 107, 104, 103, 102,
- 101, 100, 99, 98, 97, 95, 94, 93, 92, 91,
- 90, 89, 88, 87, 83, 79, 52, 45, 38, 32,
- 22, 18, 14, 12, 11, 7, 6, 5, 812, 812,
- 812, 812, 812, 812, 812, 812, 812, 812, 812, 812,
-
- 812, 812, 812, 812, 812, 812, 812, 812, 812, 812,
- 812, 812, 812, 812, 812, 812, 812, 812, 812, 812,
- 812, 812, 812, 812, 812, 812, 812, 812, 812, 812,
- 812, 812, 812, 812, 812, 812, 812, 812, 812, 812,
- 812, 812, 812, 812, 812, 812, 812, 812, 812, 812,
- 812, 812, 812, 812
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 13, 15, 792, 16, 17, 17, 17, 17, 17,
+ 17, 17, 21, 21, 25, 15, 16, 26, 13, 19,
+ 35, 19, 19, 19, 19, 19, 19, 19, 23, 23,
+ 25, 36, 26, 26, 35, 36, 19, 19, 71, 30,
+ 27, 30, 27, 28, 19, 19, 27, 28, 37, 39,
+ 30, 758, 19, 19, 28, 143, 29, 28, 96, 96,
+
+ 29, 33, 37, 71, 143, 39, 29, 19, 39, 33,
+ 19, 20, 29, 20, 20, 20, 20, 20, 20, 20,
+ 40, 33, 47, 31, 47, 794, 47, 46, 20, 20,
+ 40, 31, 48, 48, 31, 106, 20, 31, 42, 34,
+ 758, 42, 34, 31, 20, 20, 34, 34, 41, 106,
+ 42, 34, 802, 43, 34, 41, 41, 42, 43, 20,
+ 41, 50, 43, 50, 44, 43, 41, 41, 44, 41,
+ 46, 58, 105, 58, 68, 68, 135, 48, 44, 120,
+ 142, 142, 124, 105, 48, 70, 70, 120, 48, 124,
+ 68, 68, 135, 48, 53, 53, 53, 53, 53, 53,
+
+ 53, 70, 70, 72, 144, 72, 72, 72, 72, 72,
+ 72, 72, 144, 148, 803, 126, 148, 804, 73, 73,
+ 72, 72, 73, 73, 73, 73, 73, 73, 73, 126,
+ 805, 116, 153, 153, 116, 116, 72, 72, 116, 152,
+ 116, 152, 810, 152, 154, 154, 160, 811, 160, 162,
+ 162, 162, 162, 162, 162, 162, 164, 164, 166, 166,
+ 164, 164, 164, 164, 164, 164, 164, 169, 169, 169,
+ 169, 169, 169, 169, 166, 166, 171, 153, 180, 184,
+ 184, 215, 215, 215, 153, 241, 813, 504, 153, 154,
+ 776, 505, 180, 153, 241, 814, 154, 504, 776, 171,
+
+ 154, 505, 167, 167, 818, 154, 167, 167, 167, 167,
+ 167, 167, 167, 170, 170, 170, 170, 170, 170, 170,
+ 247, 247, 247, 268, 268, 268, 279, 279, 279, 170,
+ 256, 256, 256, 256, 256, 256, 256, 257, 257, 257,
+ 257, 257, 257, 257, 786, 170, 288, 288, 288, 822,
+ 258, 258, 786, 257, 258, 258, 258, 258, 258, 258,
+ 258, 260, 260, 260, 260, 260, 260, 260, 825, 257,
+ 261, 261, 261, 261, 261, 261, 261, 292, 292, 292,
+ 301, 301, 301, 338, 338, 338, 261, 350, 350, 350,
+ 350, 350, 350, 350, 351, 351, 351, 351, 351, 351,
+
+ 351, 795, 261, 382, 382, 382, 393, 393, 393, 795,
+ 351, 394, 394, 394, 382, 382, 395, 395, 395, 443,
+ 443, 443, 483, 483, 483, 490, 351, 830, 605, 831,
+ 443, 443, 839, 483, 483, 519, 519, 519, 605, 490,
+ 490, 490, 490, 490, 490, 490, 519, 519, 533, 533,
+ 606, 621, 621, 796, 534, 534, 656, 656, 760, 606,
+ 606, 796, 533, 533, 533, 533, 533, 533, 534, 534,
+ 534, 534, 534, 534, 534, 554, 554, 554, 573, 573,
+ 573, 576, 576, 690, 690, 581, 533, 554, 578, 578,
+ 573, 775, 799, 840, 790, 576, 576, 576, 576, 576,
+
+ 576, 576, 578, 578, 578, 578, 578, 578, 580, 580,
+ 806, 533, 744, 760, 759, 808, 619, 619, 806, 744,
+ 581, 759, 580, 580, 580, 580, 580, 580, 580, 581,
+ 619, 619, 619, 619, 619, 619, 787, 798, 789, 788,
+ 581, 620, 620, 787, 798, 809, 775, 799, 658, 658,
+ 828, 785, 829, 809, 619, 620, 620, 620, 620, 620,
+ 620, 620, 658, 658, 658, 658, 658, 658, 660, 660,
+ 808, 826, 815, 819, 784, 783, 782, 781, 826, 619,
+ 815, 819, 660, 660, 660, 660, 660, 660, 660, 820,
+ 823, 828, 827, 829, 832, 833, 780, 820, 823, 827,
+
+ 779, 778, 832, 833, 836, 836, 836, 836, 836, 837,
+ 837, 837, 838, 838, 838, 841, 841, 842, 777, 842,
+ 842, 842, 843, 843, 844, 844, 774, 771, 769, 768,
+ 766, 763, 762, 761, 757, 756, 755, 754, 753, 752,
+ 751, 750, 749, 748, 747, 746, 745, 743, 742, 741,
+ 738, 735, 734, 733, 732, 731, 729, 728, 726, 724,
+ 721, 720, 719, 717, 716, 714, 713, 712, 711, 710,
+ 709, 708, 707, 706, 705, 704, 702, 701, 700, 699,
+ 698, 697, 695, 694, 693, 692, 691, 689, 688, 687,
+ 686, 685, 684, 683, 682, 681, 680, 679, 678, 677,
+
+ 676, 675, 674, 673, 672, 670, 669, 668, 667, 666,
+ 665, 664, 663, 662, 661, 654, 652, 651, 649, 648,
+ 647, 646, 645, 644, 643, 642, 641, 640, 639, 638,
+ 637, 635, 634, 633, 632, 631, 630, 629, 627, 626,
+ 625, 624, 623, 622, 618, 617, 616, 615, 614, 613,
+ 612, 611, 610, 609, 608, 607, 601, 599, 598, 597,
+ 596, 592, 591, 590, 589, 588, 587, 586, 585, 584,
+ 575, 571, 570, 568, 567, 565, 564, 563, 562, 561,
+ 560, 559, 558, 557, 555, 553, 552, 551, 550, 549,
+ 548, 547, 546, 545, 544, 542, 541, 537, 536, 535,
+
+ 532, 531, 529, 528, 526, 525, 524, 523, 522, 520,
+ 518, 517, 516, 515, 514, 513, 511, 510, 509, 508,
+ 507, 503, 502, 501, 500, 499, 498, 495, 494, 493,
+ 492, 491, 489, 488, 487, 486, 485, 484, 482, 481,
+ 474, 473, 470, 469, 466, 465, 464, 463, 452, 451,
+ 450, 448, 447, 446, 445, 444, 441, 439, 438, 437,
+ 435, 434, 432, 431, 430, 429, 427, 426, 421, 420,
+ 418, 417, 416, 415, 414, 413, 412, 411, 410, 409,
+ 407, 406, 405, 404, 403, 402, 401, 400, 399, 398,
+ 397, 396, 392, 388, 387, 386, 383, 381, 371, 369,
+
+ 365, 364, 363, 362, 360, 358, 353, 352, 349, 348,
+ 347, 346, 345, 344, 339, 337, 336, 335, 334, 333,
+ 331, 330, 327, 326, 325, 324, 323, 322, 321, 320,
+ 319, 318, 317, 316, 315, 314, 313, 312, 311, 310,
+ 309, 308, 307, 306, 305, 302, 300, 299, 298, 297,
+ 296, 295, 294, 293, 291, 287, 285, 284, 283, 282,
+ 278, 277, 276, 275, 274, 273, 272, 271, 267, 265,
+ 264, 254, 253, 252, 251, 250, 249, 248, 246, 245,
+ 244, 243, 242, 240, 239, 238, 237, 236, 235, 234,
+ 233, 232, 231, 230, 229, 228, 227, 226, 225, 224,
+
+ 223, 222, 221, 220, 219, 218, 217, 216, 214, 213,
+ 212, 211, 210, 209, 208, 207, 206, 205, 204, 203,
+ 202, 201, 200, 199, 198, 196, 195, 194, 193, 192,
+ 191, 190, 189, 188, 187, 186, 185, 183, 182, 181,
+ 179, 178, 177, 176, 174, 159, 158, 157, 156, 149,
+ 147, 146, 145, 141, 140, 139, 138, 137, 136, 134,
+ 133, 132, 131, 130, 129, 128, 127, 125, 123, 122,
+ 121, 119, 118, 117, 115, 114, 112, 111, 110, 109,
+ 108, 107, 104, 103, 102, 101, 100, 99, 98, 97,
+ 95, 94, 93, 92, 91, 90, 89, 88, 87, 83,
+
+ 79, 52, 45, 38, 32, 22, 18, 14, 12, 11,
+ 7, 6, 5, 835, 835, 835, 835, 835, 835, 835,
+ 835, 835, 835, 835, 835, 835, 835, 835, 835, 835,
+ 835, 835, 835, 835, 835, 835, 835, 835, 835, 835,
+ 835, 835, 835, 835, 835, 835, 835, 835, 835, 835,
+ 835, 835, 835, 835, 835, 835, 835, 835, 835, 835,
+ 835, 835, 835, 835, 835, 835, 835, 835, 835, 835,
+ 835, 835, 835, 835, 835, 835, 835, 835, 835, 835,
+ 835, 835
} ;
/* The intent behind this definition is that it'll catch
@@ -976,8 +997,8 @@ static yyconst flex_int16_t yy_chk[1255] =
#define yymore() yymore_used_but_not_detected
#define YY_MORE_ADJ 0
#define YY_RESTORE_YY_MORE_OFFSET
-#line 1 "glsl_lexer.lpp"
-#line 2 "glsl_lexer.lpp"
+#line 1 "glsl_lexer.ll"
+#line 2 "glsl_lexer.ll"
/*
* Copyright © 2008, 2009 Intel Corporation
*
@@ -1001,10 +1022,17 @@ static yyconst flex_int16_t yy_chk[1255] =
* DEALINGS IN THE SOFTWARE.
*/
#include <ctype.h>
+#include "strtod.h"
#include "ast.h"
#include "glsl_parser_extras.h"
#include "glsl_parser.h"
+static int classify_identifier(struct _mesa_glsl_parse_state *, const char *);
+
+#ifdef _MSC_VER
+#define YY_NO_UNISTD_H
+#endif
+
#define YY_USER_ACTION \
do { \
yylloc->source = 0; \
@@ -1040,7 +1068,7 @@ static yyconst flex_int16_t yy_chk[1255] =
return ERROR_TOK; \
} else { \
yylval->identifier = strdup(yytext); \
- return IDENTIFIER; \
+ return classify_identifier(yyextra, yytext); \
} \
} while (0)
@@ -1054,7 +1082,7 @@ static yyconst flex_int16_t yy_chk[1255] =
*/
#define ES yyextra->es_shader
-#line 1058 "glsl_lexer.cpp"
+#line 1086 "glsl_lexer.cpp"
#define INITIAL 0
#define PP 1
@@ -1141,10 +1169,6 @@ int _mesa_glsl_get_lineno (yyscan_t yyscanner );
void _mesa_glsl_set_lineno (int line_number ,yyscan_t yyscanner );
-int _mesa_glsl_get_column (yyscan_t yyscanner );
-
-void _mesa_glsl_set_column (int column_no ,yyscan_t yyscanner );
-
YYSTYPE * _mesa_glsl_get_lval (yyscan_t yyscanner );
void _mesa_glsl_set_lval (YYSTYPE * yylval_param ,yyscan_t yyscanner );
@@ -1185,7 +1209,12 @@ static int input (yyscan_t yyscanner );
/* Amount of stuff to slurp up with each read. */
#ifndef YY_READ_BUF_SIZE
+#ifdef __ia64__
+/* On IA-64, the buffer size is 16k, not 8k */
+#define YY_READ_BUF_SIZE 16384
+#else
#define YY_READ_BUF_SIZE 8192
+#endif /* __ia64__ */
#endif
/* Copy whatever the last rule matched to the standard output. */
@@ -1204,7 +1233,7 @@ static int input (yyscan_t yyscanner );
if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
{ \
int c = '*'; \
- unsigned n; \
+ size_t n; \
for ( n = 0; n < max_size && \
(c = getc( yyin )) != EOF && c != '\n'; ++n ) \
buf[n] = (char) c; \
@@ -1292,10 +1321,10 @@ YY_DECL
register int yy_act;
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-#line 94 "glsl_lexer.lpp"
+#line 101 "glsl_lexer.ll"
-#line 1299 "glsl_lexer.cpp"
+#line 1328 "glsl_lexer.cpp"
yylval = yylval_param;
@@ -1353,13 +1382,13 @@ yy_match:
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{
yy_current_state = (int) yy_def[yy_current_state];
- if ( yy_current_state >= 813 )
+ if ( yy_current_state >= 836 )
yy_c = yy_meta[(unsigned int) yy_c];
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
++yy_cp;
}
- while ( yy_current_state != 812 );
+ while ( yy_current_state != 835 );
yy_cp = yyg->yy_last_accepting_cpos;
yy_current_state = yyg->yy_last_accepting_state;
@@ -1381,7 +1410,7 @@ do_action: /* This label is used only to access EOF actions. */
case 1:
YY_RULE_SETUP
-#line 96 "glsl_lexer.lpp"
+#line 103 "glsl_lexer.ll"
;
YY_BREAK
/* Preprocessor tokens. */
@@ -1390,17 +1419,17 @@ case 2:
yyg->yy_c_buf_p = yy_cp -= 1;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
-#line 99 "glsl_lexer.lpp"
+#line 106 "glsl_lexer.ll"
;
YY_BREAK
case 3:
YY_RULE_SETUP
-#line 100 "glsl_lexer.lpp"
+#line 107 "glsl_lexer.ll"
{ BEGIN PP; return VERSION; }
YY_BREAK
case 4:
YY_RULE_SETUP
-#line 101 "glsl_lexer.lpp"
+#line 108 "glsl_lexer.ll"
{ BEGIN PP; return EXTENSION; }
YY_BREAK
case 5:
@@ -1408,7 +1437,7 @@ case 5:
yyg->yy_c_buf_p = yy_cp -= 1;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
-#line 102 "glsl_lexer.lpp"
+#line 109 "glsl_lexer.ll"
{
/* Eat characters until the first digit is
* encountered
@@ -1430,7 +1459,7 @@ case 6:
yyg->yy_c_buf_p = yy_cp -= 1;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
-#line 117 "glsl_lexer.lpp"
+#line 124 "glsl_lexer.ll"
{
/* Eat characters until the first digit is
* encountered
@@ -1448,7 +1477,7 @@ YY_RULE_SETUP
YY_BREAK
case 7:
YY_RULE_SETUP
-#line 131 "glsl_lexer.lpp"
+#line 138 "glsl_lexer.ll"
{
BEGIN PP;
return PRAGMA_DEBUG_ON;
@@ -1456,7 +1485,7 @@ YY_RULE_SETUP
YY_BREAK
case 8:
YY_RULE_SETUP
-#line 135 "glsl_lexer.lpp"
+#line 142 "glsl_lexer.ll"
{
BEGIN PP;
return PRAGMA_DEBUG_OFF;
@@ -1464,7 +1493,7 @@ YY_RULE_SETUP
YY_BREAK
case 9:
YY_RULE_SETUP
-#line 139 "glsl_lexer.lpp"
+#line 146 "glsl_lexer.ll"
{
BEGIN PP;
return PRAGMA_OPTIMIZE_ON;
@@ -1472,7 +1501,7 @@ YY_RULE_SETUP
YY_BREAK
case 10:
YY_RULE_SETUP
-#line 143 "glsl_lexer.lpp"
+#line 150 "glsl_lexer.ll"
{
BEGIN PP;
return PRAGMA_OPTIMIZE_OFF;
@@ -1480,440 +1509,449 @@ YY_RULE_SETUP
YY_BREAK
case 11:
YY_RULE_SETUP
-#line 147 "glsl_lexer.lpp"
-{ BEGIN PRAGMA; }
+#line 154 "glsl_lexer.ll"
+{
+ BEGIN PP;
+ return PRAGMA_INVARIANT_ALL;
+ }
YY_BREAK
case 12:
-/* rule 12 can match eol */
YY_RULE_SETUP
-#line 149 "glsl_lexer.lpp"
-{ BEGIN 0; yylineno++; yycolumn = 0; }
+#line 158 "glsl_lexer.ll"
+{ BEGIN PRAGMA; }
YY_BREAK
case 13:
+/* rule 13 can match eol */
YY_RULE_SETUP
-#line 150 "glsl_lexer.lpp"
-{ }
+#line 160 "glsl_lexer.ll"
+{ BEGIN 0; yylineno++; yycolumn = 0; }
YY_BREAK
case 14:
YY_RULE_SETUP
-#line 152 "glsl_lexer.lpp"
+#line 161 "glsl_lexer.ll"
{ }
YY_BREAK
case 15:
YY_RULE_SETUP
-#line 153 "glsl_lexer.lpp"
+#line 163 "glsl_lexer.ll"
{ }
YY_BREAK
case 16:
YY_RULE_SETUP
-#line 154 "glsl_lexer.lpp"
-return COLON;
+#line 164 "glsl_lexer.ll"
+{ }
YY_BREAK
case 17:
YY_RULE_SETUP
-#line 155 "glsl_lexer.lpp"
+#line 165 "glsl_lexer.ll"
+return COLON;
+ YY_BREAK
+case 18:
+YY_RULE_SETUP
+#line 166 "glsl_lexer.ll"
{
yylval->identifier = strdup(yytext);
return IDENTIFIER;
}
YY_BREAK
-case 18:
+case 19:
YY_RULE_SETUP
-#line 159 "glsl_lexer.lpp"
+#line 170 "glsl_lexer.ll"
{
yylval->n = strtol(yytext, NULL, 10);
return INTCONSTANT;
}
YY_BREAK
-case 19:
-/* rule 19 can match eol */
+case 20:
+/* rule 20 can match eol */
YY_RULE_SETUP
-#line 163 "glsl_lexer.lpp"
+#line 174 "glsl_lexer.ll"
{ BEGIN 0; yylineno++; yycolumn = 0; return EOL; }
YY_BREAK
-case 20:
-/* rule 20 can match eol */
+case 21:
+/* rule 21 can match eol */
YY_RULE_SETUP
-#line 165 "glsl_lexer.lpp"
+#line 176 "glsl_lexer.ll"
{ yylineno++; yycolumn = 0; }
YY_BREAK
-case 21:
+case 22:
YY_RULE_SETUP
-#line 167 "glsl_lexer.lpp"
+#line 178 "glsl_lexer.ll"
return ATTRIBUTE;
YY_BREAK
-case 22:
+case 23:
YY_RULE_SETUP
-#line 168 "glsl_lexer.lpp"
+#line 179 "glsl_lexer.ll"
return CONST_TOK;
YY_BREAK
-case 23:
+case 24:
YY_RULE_SETUP
-#line 169 "glsl_lexer.lpp"
+#line 180 "glsl_lexer.ll"
return BOOL_TOK;
YY_BREAK
-case 24:
+case 25:
YY_RULE_SETUP
-#line 170 "glsl_lexer.lpp"
+#line 181 "glsl_lexer.ll"
return FLOAT_TOK;
YY_BREAK
-case 25:
+case 26:
YY_RULE_SETUP
-#line 171 "glsl_lexer.lpp"
+#line 182 "glsl_lexer.ll"
return INT_TOK;
YY_BREAK
-case 26:
+case 27:
YY_RULE_SETUP
-#line 172 "glsl_lexer.lpp"
+#line 183 "glsl_lexer.ll"
KEYWORD(130, 130, UINT_TOK);
YY_BREAK
-case 27:
+case 28:
YY_RULE_SETUP
-#line 174 "glsl_lexer.lpp"
+#line 185 "glsl_lexer.ll"
return BREAK;
YY_BREAK
-case 28:
+case 29:
YY_RULE_SETUP
-#line 175 "glsl_lexer.lpp"
+#line 186 "glsl_lexer.ll"
return CONTINUE;
YY_BREAK
-case 29:
+case 30:
YY_RULE_SETUP
-#line 176 "glsl_lexer.lpp"
+#line 187 "glsl_lexer.ll"
return DO;
YY_BREAK
-case 30:
+case 31:
YY_RULE_SETUP
-#line 177 "glsl_lexer.lpp"
+#line 188 "glsl_lexer.ll"
return WHILE;
YY_BREAK
-case 31:
+case 32:
YY_RULE_SETUP
-#line 178 "glsl_lexer.lpp"
+#line 189 "glsl_lexer.ll"
return ELSE;
YY_BREAK
-case 32:
+case 33:
YY_RULE_SETUP
-#line 179 "glsl_lexer.lpp"
+#line 190 "glsl_lexer.ll"
return FOR;
YY_BREAK
-case 33:
+case 34:
YY_RULE_SETUP
-#line 180 "glsl_lexer.lpp"
+#line 191 "glsl_lexer.ll"
return IF;
YY_BREAK
-case 34:
+case 35:
YY_RULE_SETUP
-#line 181 "glsl_lexer.lpp"
+#line 192 "glsl_lexer.ll"
return DISCARD;
YY_BREAK
-case 35:
+case 36:
YY_RULE_SETUP
-#line 182 "glsl_lexer.lpp"
+#line 193 "glsl_lexer.ll"
return RETURN;
YY_BREAK
-case 36:
+case 37:
YY_RULE_SETUP
-#line 184 "glsl_lexer.lpp"
+#line 195 "glsl_lexer.ll"
return BVEC2;
YY_BREAK
-case 37:
+case 38:
YY_RULE_SETUP
-#line 185 "glsl_lexer.lpp"
+#line 196 "glsl_lexer.ll"
return BVEC3;
YY_BREAK
-case 38:
+case 39:
YY_RULE_SETUP
-#line 186 "glsl_lexer.lpp"
+#line 197 "glsl_lexer.ll"
return BVEC4;
YY_BREAK
-case 39:
+case 40:
YY_RULE_SETUP
-#line 187 "glsl_lexer.lpp"
+#line 198 "glsl_lexer.ll"
return IVEC2;
YY_BREAK
-case 40:
+case 41:
YY_RULE_SETUP
-#line 188 "glsl_lexer.lpp"
+#line 199 "glsl_lexer.ll"
return IVEC3;
YY_BREAK
-case 41:
+case 42:
YY_RULE_SETUP
-#line 189 "glsl_lexer.lpp"
+#line 200 "glsl_lexer.ll"
return IVEC4;
YY_BREAK
-case 42:
+case 43:
YY_RULE_SETUP
-#line 190 "glsl_lexer.lpp"
+#line 201 "glsl_lexer.ll"
KEYWORD(130, 130, UVEC2);
YY_BREAK
-case 43:
+case 44:
YY_RULE_SETUP
-#line 191 "glsl_lexer.lpp"
+#line 202 "glsl_lexer.ll"
KEYWORD(130, 130, UVEC3);
YY_BREAK
-case 44:
+case 45:
YY_RULE_SETUP
-#line 192 "glsl_lexer.lpp"
+#line 203 "glsl_lexer.ll"
KEYWORD(130, 130, UVEC4);
YY_BREAK
-case 45:
+case 46:
YY_RULE_SETUP
-#line 193 "glsl_lexer.lpp"
+#line 204 "glsl_lexer.ll"
return VEC2;
YY_BREAK
-case 46:
+case 47:
YY_RULE_SETUP
-#line 194 "glsl_lexer.lpp"
+#line 205 "glsl_lexer.ll"
return VEC3;
YY_BREAK
-case 47:
+case 48:
YY_RULE_SETUP
-#line 195 "glsl_lexer.lpp"
+#line 206 "glsl_lexer.ll"
return VEC4;
YY_BREAK
-case 48:
+case 49:
YY_RULE_SETUP
-#line 196 "glsl_lexer.lpp"
+#line 207 "glsl_lexer.ll"
return MAT2X2;
YY_BREAK
-case 49:
+case 50:
YY_RULE_SETUP
-#line 197 "glsl_lexer.lpp"
+#line 208 "glsl_lexer.ll"
return MAT3X3;
YY_BREAK
-case 50:
+case 51:
YY_RULE_SETUP
-#line 198 "glsl_lexer.lpp"
+#line 209 "glsl_lexer.ll"
return MAT4X4;
YY_BREAK
-case 51:
+case 52:
YY_RULE_SETUP
-#line 199 "glsl_lexer.lpp"
+#line 210 "glsl_lexer.ll"
KEYWORD(120, 120, MAT2X2);
YY_BREAK
-case 52:
+case 53:
YY_RULE_SETUP
-#line 200 "glsl_lexer.lpp"
+#line 211 "glsl_lexer.ll"
KEYWORD(120, 120, MAT2X3);
YY_BREAK
-case 53:
+case 54:
YY_RULE_SETUP
-#line 201 "glsl_lexer.lpp"
+#line 212 "glsl_lexer.ll"
KEYWORD(120, 120, MAT2X4);
YY_BREAK
-case 54:
+case 55:
YY_RULE_SETUP
-#line 202 "glsl_lexer.lpp"
+#line 213 "glsl_lexer.ll"
KEYWORD(120, 120, MAT3X2);
YY_BREAK
-case 55:
+case 56:
YY_RULE_SETUP
-#line 203 "glsl_lexer.lpp"
+#line 214 "glsl_lexer.ll"
KEYWORD(120, 120, MAT3X3);
YY_BREAK
-case 56:
+case 57:
YY_RULE_SETUP
-#line 204 "glsl_lexer.lpp"
+#line 215 "glsl_lexer.ll"
KEYWORD(120, 120, MAT3X4);
YY_BREAK
-case 57:
+case 58:
YY_RULE_SETUP
-#line 205 "glsl_lexer.lpp"
+#line 216 "glsl_lexer.ll"
KEYWORD(120, 120, MAT4X2);
YY_BREAK
-case 58:
+case 59:
YY_RULE_SETUP
-#line 206 "glsl_lexer.lpp"
+#line 217 "glsl_lexer.ll"
KEYWORD(120, 120, MAT4X3);
YY_BREAK
-case 59:
+case 60:
YY_RULE_SETUP
-#line 207 "glsl_lexer.lpp"
+#line 218 "glsl_lexer.ll"
KEYWORD(120, 120, MAT4X4);
YY_BREAK
-case 60:
+case 61:
YY_RULE_SETUP
-#line 209 "glsl_lexer.lpp"
+#line 220 "glsl_lexer.ll"
return IN_TOK;
YY_BREAK
-case 61:
+case 62:
YY_RULE_SETUP
-#line 210 "glsl_lexer.lpp"
+#line 221 "glsl_lexer.ll"
return OUT_TOK;
YY_BREAK
-case 62:
+case 63:
YY_RULE_SETUP
-#line 211 "glsl_lexer.lpp"
+#line 222 "glsl_lexer.ll"
return INOUT_TOK;
YY_BREAK
-case 63:
+case 64:
YY_RULE_SETUP
-#line 212 "glsl_lexer.lpp"
+#line 223 "glsl_lexer.ll"
return UNIFORM;
YY_BREAK
-case 64:
+case 65:
YY_RULE_SETUP
-#line 213 "glsl_lexer.lpp"
+#line 224 "glsl_lexer.ll"
return VARYING;
YY_BREAK
-case 65:
+case 66:
YY_RULE_SETUP
-#line 214 "glsl_lexer.lpp"
+#line 225 "glsl_lexer.ll"
KEYWORD(120, 120, CENTROID);
YY_BREAK
-case 66:
+case 67:
YY_RULE_SETUP
-#line 215 "glsl_lexer.lpp"
+#line 226 "glsl_lexer.ll"
KEYWORD(120 || ES, 120 || ES, INVARIANT);
YY_BREAK
-case 67:
+case 68:
YY_RULE_SETUP
-#line 216 "glsl_lexer.lpp"
+#line 227 "glsl_lexer.ll"
KEYWORD(130 || ES, 130, FLAT);
YY_BREAK
-case 68:
+case 69:
YY_RULE_SETUP
-#line 217 "glsl_lexer.lpp"
+#line 228 "glsl_lexer.ll"
KEYWORD(130, 130, SMOOTH);
YY_BREAK
-case 69:
+case 70:
YY_RULE_SETUP
-#line 218 "glsl_lexer.lpp"
+#line 229 "glsl_lexer.ll"
KEYWORD(130, 130, NOPERSPECTIVE);
YY_BREAK
-case 70:
+case 71:
YY_RULE_SETUP
-#line 220 "glsl_lexer.lpp"
+#line 231 "glsl_lexer.ll"
return SAMPLER1D;
YY_BREAK
-case 71:
+case 72:
YY_RULE_SETUP
-#line 221 "glsl_lexer.lpp"
+#line 232 "glsl_lexer.ll"
return SAMPLER2D;
YY_BREAK
-case 72:
+case 73:
YY_RULE_SETUP
-#line 222 "glsl_lexer.lpp"
+#line 233 "glsl_lexer.ll"
return SAMPLER3D;
YY_BREAK
-case 73:
+case 74:
YY_RULE_SETUP
-#line 223 "glsl_lexer.lpp"
+#line 234 "glsl_lexer.ll"
return SAMPLERCUBE;
YY_BREAK
-case 74:
+case 75:
YY_RULE_SETUP
-#line 224 "glsl_lexer.lpp"
+#line 235 "glsl_lexer.ll"
KEYWORD(130, 130, SAMPLER1DARRAY);
YY_BREAK
-case 75:
+case 76:
YY_RULE_SETUP
-#line 225 "glsl_lexer.lpp"
+#line 236 "glsl_lexer.ll"
KEYWORD(130, 130, SAMPLER2DARRAY);
YY_BREAK
-case 76:
+case 77:
YY_RULE_SETUP
-#line 226 "glsl_lexer.lpp"
+#line 237 "glsl_lexer.ll"
return SAMPLER1DSHADOW;
YY_BREAK
-case 77:
+case 78:
YY_RULE_SETUP
-#line 227 "glsl_lexer.lpp"
+#line 238 "glsl_lexer.ll"
return SAMPLER2DSHADOW;
YY_BREAK
-case 78:
+case 79:
YY_RULE_SETUP
-#line 228 "glsl_lexer.lpp"
+#line 239 "glsl_lexer.ll"
KEYWORD(130, 130, SAMPLERCUBESHADOW);
YY_BREAK
-case 79:
+case 80:
YY_RULE_SETUP
-#line 229 "glsl_lexer.lpp"
+#line 240 "glsl_lexer.ll"
KEYWORD(130, 130, SAMPLER1DARRAYSHADOW);
YY_BREAK
-case 80:
+case 81:
YY_RULE_SETUP
-#line 230 "glsl_lexer.lpp"
+#line 241 "glsl_lexer.ll"
KEYWORD(130, 130, SAMPLER2DARRAYSHADOW);
YY_BREAK
-case 81:
+case 82:
YY_RULE_SETUP
-#line 231 "glsl_lexer.lpp"
+#line 242 "glsl_lexer.ll"
KEYWORD(130, 130, ISAMPLER1D);
YY_BREAK
-case 82:
+case 83:
YY_RULE_SETUP
-#line 232 "glsl_lexer.lpp"
+#line 243 "glsl_lexer.ll"
KEYWORD(130, 130, ISAMPLER2D);
YY_BREAK
-case 83:
+case 84:
YY_RULE_SETUP
-#line 233 "glsl_lexer.lpp"
+#line 244 "glsl_lexer.ll"
KEYWORD(130, 130, ISAMPLER3D);
YY_BREAK
-case 84:
+case 85:
YY_RULE_SETUP
-#line 234 "glsl_lexer.lpp"
+#line 245 "glsl_lexer.ll"
KEYWORD(130, 130, ISAMPLERCUBE);
YY_BREAK
-case 85:
+case 86:
YY_RULE_SETUP
-#line 235 "glsl_lexer.lpp"
+#line 246 "glsl_lexer.ll"
KEYWORD(130, 130, ISAMPLER1DARRAY);
YY_BREAK
-case 86:
+case 87:
YY_RULE_SETUP
-#line 236 "glsl_lexer.lpp"
+#line 247 "glsl_lexer.ll"
KEYWORD(130, 130, ISAMPLER2DARRAY);
YY_BREAK
-case 87:
+case 88:
YY_RULE_SETUP
-#line 237 "glsl_lexer.lpp"
+#line 248 "glsl_lexer.ll"
KEYWORD(130, 130, USAMPLER1D);
YY_BREAK
-case 88:
+case 89:
YY_RULE_SETUP
-#line 238 "glsl_lexer.lpp"
+#line 249 "glsl_lexer.ll"
KEYWORD(130, 130, USAMPLER2D);
YY_BREAK
-case 89:
+case 90:
YY_RULE_SETUP
-#line 239 "glsl_lexer.lpp"
+#line 250 "glsl_lexer.ll"
KEYWORD(130, 130, USAMPLER3D);
YY_BREAK
-case 90:
+case 91:
YY_RULE_SETUP
-#line 240 "glsl_lexer.lpp"
+#line 251 "glsl_lexer.ll"
KEYWORD(130, 130, USAMPLERCUBE);
YY_BREAK
-case 91:
+case 92:
YY_RULE_SETUP
-#line 241 "glsl_lexer.lpp"
+#line 252 "glsl_lexer.ll"
KEYWORD(130, 130, USAMPLER1DARRAY);
YY_BREAK
-case 92:
+case 93:
YY_RULE_SETUP
-#line 242 "glsl_lexer.lpp"
+#line 253 "glsl_lexer.ll"
KEYWORD(130, 130, USAMPLER2DARRAY);
YY_BREAK
-case 93:
+case 94:
YY_RULE_SETUP
-#line 245 "glsl_lexer.lpp"
+#line 256 "glsl_lexer.ll"
return STRUCT;
YY_BREAK
-case 94:
+case 95:
YY_RULE_SETUP
-#line 246 "glsl_lexer.lpp"
+#line 257 "glsl_lexer.ll"
return VOID_TOK;
YY_BREAK
-case 95:
+case 96:
YY_RULE_SETUP
-#line 248 "glsl_lexer.lpp"
+#line 259 "glsl_lexer.ll"
{
if ((yyextra->language_version >= 140)
+ || yyextra->AMD_conservative_depth_enable
|| yyextra->ARB_explicit_attrib_location_enable
- || (yyextra->ARB_fragment_coord_conventions_enable)){
+ || yyextra->ARB_fragment_coord_conventions_enable) {
return LAYOUT_TOK;
} else {
yylval->identifier = strdup(yytext);
@@ -1921,615 +1959,615 @@ YY_RULE_SETUP
}
}
YY_BREAK
-case 96:
+case 97:
YY_RULE_SETUP
-#line 259 "glsl_lexer.lpp"
+#line 271 "glsl_lexer.ll"
return INC_OP;
YY_BREAK
-case 97:
+case 98:
YY_RULE_SETUP
-#line 260 "glsl_lexer.lpp"
+#line 272 "glsl_lexer.ll"
return DEC_OP;
YY_BREAK
-case 98:
+case 99:
YY_RULE_SETUP
-#line 261 "glsl_lexer.lpp"
+#line 273 "glsl_lexer.ll"
return LE_OP;
YY_BREAK
-case 99:
+case 100:
YY_RULE_SETUP
-#line 262 "glsl_lexer.lpp"
+#line 274 "glsl_lexer.ll"
return GE_OP;
YY_BREAK
-case 100:
+case 101:
YY_RULE_SETUP
-#line 263 "glsl_lexer.lpp"
+#line 275 "glsl_lexer.ll"
return EQ_OP;
YY_BREAK
-case 101:
+case 102:
YY_RULE_SETUP
-#line 264 "glsl_lexer.lpp"
+#line 276 "glsl_lexer.ll"
return NE_OP;
YY_BREAK
-case 102:
+case 103:
YY_RULE_SETUP
-#line 265 "glsl_lexer.lpp"
+#line 277 "glsl_lexer.ll"
return AND_OP;
YY_BREAK
-case 103:
+case 104:
YY_RULE_SETUP
-#line 266 "glsl_lexer.lpp"
+#line 278 "glsl_lexer.ll"
return OR_OP;
YY_BREAK
-case 104:
+case 105:
YY_RULE_SETUP
-#line 267 "glsl_lexer.lpp"
+#line 279 "glsl_lexer.ll"
return XOR_OP;
YY_BREAK
-case 105:
+case 106:
YY_RULE_SETUP
-#line 268 "glsl_lexer.lpp"
+#line 280 "glsl_lexer.ll"
return LEFT_OP;
YY_BREAK
-case 106:
+case 107:
YY_RULE_SETUP
-#line 269 "glsl_lexer.lpp"
+#line 281 "glsl_lexer.ll"
return RIGHT_OP;
YY_BREAK
-case 107:
+case 108:
YY_RULE_SETUP
-#line 271 "glsl_lexer.lpp"
+#line 283 "glsl_lexer.ll"
return MUL_ASSIGN;
YY_BREAK
-case 108:
+case 109:
YY_RULE_SETUP
-#line 272 "glsl_lexer.lpp"
+#line 284 "glsl_lexer.ll"
return DIV_ASSIGN;
YY_BREAK
-case 109:
+case 110:
YY_RULE_SETUP
-#line 273 "glsl_lexer.lpp"
+#line 285 "glsl_lexer.ll"
return ADD_ASSIGN;
YY_BREAK
-case 110:
+case 111:
YY_RULE_SETUP
-#line 274 "glsl_lexer.lpp"
+#line 286 "glsl_lexer.ll"
return MOD_ASSIGN;
YY_BREAK
-case 111:
+case 112:
YY_RULE_SETUP
-#line 275 "glsl_lexer.lpp"
+#line 287 "glsl_lexer.ll"
return LEFT_ASSIGN;
YY_BREAK
-case 112:
+case 113:
YY_RULE_SETUP
-#line 276 "glsl_lexer.lpp"
+#line 288 "glsl_lexer.ll"
return RIGHT_ASSIGN;
YY_BREAK
-case 113:
+case 114:
YY_RULE_SETUP
-#line 277 "glsl_lexer.lpp"
+#line 289 "glsl_lexer.ll"
return AND_ASSIGN;
YY_BREAK
-case 114:
+case 115:
YY_RULE_SETUP
-#line 278 "glsl_lexer.lpp"
+#line 290 "glsl_lexer.ll"
return XOR_ASSIGN;
YY_BREAK
-case 115:
+case 116:
YY_RULE_SETUP
-#line 279 "glsl_lexer.lpp"
+#line 291 "glsl_lexer.ll"
return OR_ASSIGN;
YY_BREAK
-case 116:
+case 117:
YY_RULE_SETUP
-#line 280 "glsl_lexer.lpp"
+#line 292 "glsl_lexer.ll"
return SUB_ASSIGN;
YY_BREAK
-case 117:
+case 118:
YY_RULE_SETUP
-#line 282 "glsl_lexer.lpp"
+#line 294 "glsl_lexer.ll"
{
yylval->n = strtol(yytext, NULL, 10);
return IS_UINT ? UINTCONSTANT : INTCONSTANT;
}
YY_BREAK
-case 118:
+case 119:
YY_RULE_SETUP
-#line 286 "glsl_lexer.lpp"
+#line 298 "glsl_lexer.ll"
{
yylval->n = strtol(yytext + 2, NULL, 16);
return IS_UINT ? UINTCONSTANT : INTCONSTANT;
}
YY_BREAK
-case 119:
+case 120:
YY_RULE_SETUP
-#line 290 "glsl_lexer.lpp"
+#line 302 "glsl_lexer.ll"
{
yylval->n = strtol(yytext, NULL, 8);
return IS_UINT ? UINTCONSTANT : INTCONSTANT;
}
YY_BREAK
-case 120:
-YY_RULE_SETUP
-#line 295 "glsl_lexer.lpp"
-{
- yylval->real = strtod(yytext, NULL);
- return FLOATCONSTANT;
- }
- YY_BREAK
case 121:
YY_RULE_SETUP
-#line 299 "glsl_lexer.lpp"
+#line 307 "glsl_lexer.ll"
{
- yylval->real = strtod(yytext, NULL);
+ yylval->real = glsl_strtod(yytext, NULL);
return FLOATCONSTANT;
}
YY_BREAK
case 122:
YY_RULE_SETUP
-#line 303 "glsl_lexer.lpp"
+#line 311 "glsl_lexer.ll"
{
- yylval->real = strtod(yytext, NULL);
+ yylval->real = glsl_strtod(yytext, NULL);
return FLOATCONSTANT;
}
YY_BREAK
case 123:
YY_RULE_SETUP
-#line 307 "glsl_lexer.lpp"
+#line 315 "glsl_lexer.ll"
{
- yylval->real = strtod(yytext, NULL);
+ yylval->real = glsl_strtod(yytext, NULL);
return FLOATCONSTANT;
}
YY_BREAK
case 124:
YY_RULE_SETUP
-#line 311 "glsl_lexer.lpp"
+#line 319 "glsl_lexer.ll"
{
- yylval->real = strtod(yytext, NULL);
+ yylval->real = glsl_strtod(yytext, NULL);
return FLOATCONSTANT;
}
YY_BREAK
case 125:
YY_RULE_SETUP
-#line 316 "glsl_lexer.lpp"
+#line 323 "glsl_lexer.ll"
+{
+ yylval->real = glsl_strtod(yytext, NULL);
+ return FLOATCONSTANT;
+ }
+ YY_BREAK
+case 126:
+YY_RULE_SETUP
+#line 328 "glsl_lexer.ll"
{
yylval->n = 1;
return BOOLCONSTANT;
}
YY_BREAK
-case 126:
+case 127:
YY_RULE_SETUP
-#line 320 "glsl_lexer.lpp"
+#line 332 "glsl_lexer.ll"
{
yylval->n = 0;
return BOOLCONSTANT;
}
YY_BREAK
/* Reserved words in GLSL 1.10. */
-case 127:
+case 128:
YY_RULE_SETUP
-#line 327 "glsl_lexer.lpp"
+#line 339 "glsl_lexer.ll"
KEYWORD(110 || ES, 999, ASM);
YY_BREAK
-case 128:
+case 129:
YY_RULE_SETUP
-#line 328 "glsl_lexer.lpp"
+#line 340 "glsl_lexer.ll"
KEYWORD(110 || ES, 999, CLASS);
YY_BREAK
-case 129:
+case 130:
YY_RULE_SETUP
-#line 329 "glsl_lexer.lpp"
+#line 341 "glsl_lexer.ll"
KEYWORD(110 || ES, 999, UNION);
YY_BREAK
-case 130:
+case 131:
YY_RULE_SETUP
-#line 330 "glsl_lexer.lpp"
+#line 342 "glsl_lexer.ll"
KEYWORD(110 || ES, 999, ENUM);
YY_BREAK
-case 131:
+case 132:
YY_RULE_SETUP
-#line 331 "glsl_lexer.lpp"
+#line 343 "glsl_lexer.ll"
KEYWORD(110 || ES, 999, TYPEDEF);
YY_BREAK
-case 132:
+case 133:
YY_RULE_SETUP
-#line 332 "glsl_lexer.lpp"
+#line 344 "glsl_lexer.ll"
KEYWORD(110 || ES, 999, TEMPLATE);
YY_BREAK
-case 133:
+case 134:
YY_RULE_SETUP
-#line 333 "glsl_lexer.lpp"
+#line 345 "glsl_lexer.ll"
KEYWORD(110 || ES, 999, THIS);
YY_BREAK
-case 134:
+case 135:
YY_RULE_SETUP
-#line 334 "glsl_lexer.lpp"
+#line 346 "glsl_lexer.ll"
KEYWORD(110 || ES, 999, PACKED_TOK);
YY_BREAK
-case 135:
+case 136:
YY_RULE_SETUP
-#line 335 "glsl_lexer.lpp"
+#line 347 "glsl_lexer.ll"
KEYWORD(110 || ES, 999, GOTO);
YY_BREAK
-case 136:
+case 137:
YY_RULE_SETUP
-#line 336 "glsl_lexer.lpp"
+#line 348 "glsl_lexer.ll"
KEYWORD(110 || ES, 130, SWITCH);
YY_BREAK
-case 137:
+case 138:
YY_RULE_SETUP
-#line 337 "glsl_lexer.lpp"
+#line 349 "glsl_lexer.ll"
KEYWORD(110 || ES, 130, DEFAULT);
YY_BREAK
-case 138:
+case 139:
YY_RULE_SETUP
-#line 338 "glsl_lexer.lpp"
+#line 350 "glsl_lexer.ll"
KEYWORD(110 || ES, 999, INLINE_TOK);
YY_BREAK
-case 139:
+case 140:
YY_RULE_SETUP
-#line 339 "glsl_lexer.lpp"
+#line 351 "glsl_lexer.ll"
KEYWORD(110 || ES, 999, NOINLINE);
YY_BREAK
-case 140:
+case 141:
YY_RULE_SETUP
-#line 340 "glsl_lexer.lpp"
+#line 352 "glsl_lexer.ll"
KEYWORD(110 || ES, 999, VOLATILE);
YY_BREAK
-case 141:
+case 142:
YY_RULE_SETUP
-#line 341 "glsl_lexer.lpp"
+#line 353 "glsl_lexer.ll"
KEYWORD(110 || ES, 999, PUBLIC_TOK);
YY_BREAK
-case 142:
+case 143:
YY_RULE_SETUP
-#line 342 "glsl_lexer.lpp"
+#line 354 "glsl_lexer.ll"
KEYWORD(110 || ES, 999, STATIC);
YY_BREAK
-case 143:
+case 144:
YY_RULE_SETUP
-#line 343 "glsl_lexer.lpp"
+#line 355 "glsl_lexer.ll"
KEYWORD(110 || ES, 999, EXTERN);
YY_BREAK
-case 144:
+case 145:
YY_RULE_SETUP
-#line 344 "glsl_lexer.lpp"
+#line 356 "glsl_lexer.ll"
KEYWORD(110 || ES, 999, EXTERNAL);
YY_BREAK
-case 145:
+case 146:
YY_RULE_SETUP
-#line 345 "glsl_lexer.lpp"
+#line 357 "glsl_lexer.ll"
KEYWORD(110 || ES, 999, INTERFACE);
YY_BREAK
-case 146:
+case 147:
YY_RULE_SETUP
-#line 346 "glsl_lexer.lpp"
+#line 358 "glsl_lexer.ll"
KEYWORD(110 || ES, 999, LONG_TOK);
YY_BREAK
-case 147:
+case 148:
YY_RULE_SETUP
-#line 347 "glsl_lexer.lpp"
+#line 359 "glsl_lexer.ll"
KEYWORD(110 || ES, 999, SHORT_TOK);
YY_BREAK
-case 148:
+case 149:
YY_RULE_SETUP
-#line 348 "glsl_lexer.lpp"
+#line 360 "glsl_lexer.ll"
KEYWORD(110 || ES, 400, DOUBLE_TOK);
YY_BREAK
-case 149:
+case 150:
YY_RULE_SETUP
-#line 349 "glsl_lexer.lpp"
+#line 361 "glsl_lexer.ll"
KEYWORD(110 || ES, 999, HALF);
YY_BREAK
-case 150:
+case 151:
YY_RULE_SETUP
-#line 350 "glsl_lexer.lpp"
+#line 362 "glsl_lexer.ll"
KEYWORD(110 || ES, 999, FIXED_TOK);
YY_BREAK
-case 151:
+case 152:
YY_RULE_SETUP
-#line 351 "glsl_lexer.lpp"
+#line 363 "glsl_lexer.ll"
KEYWORD(110 || ES, 999, UNSIGNED);
YY_BREAK
-case 152:
+case 153:
YY_RULE_SETUP
-#line 352 "glsl_lexer.lpp"
+#line 364 "glsl_lexer.ll"
KEYWORD(110 || ES, 999, INPUT_TOK);
YY_BREAK
-case 153:
+case 154:
YY_RULE_SETUP
-#line 353 "glsl_lexer.lpp"
+#line 365 "glsl_lexer.ll"
KEYWORD(110 || ES, 999, OUTPUT);
YY_BREAK
-case 154:
+case 155:
YY_RULE_SETUP
-#line 354 "glsl_lexer.lpp"
+#line 366 "glsl_lexer.ll"
KEYWORD(110 || ES, 999, HVEC2);
YY_BREAK
-case 155:
+case 156:
YY_RULE_SETUP
-#line 355 "glsl_lexer.lpp"
+#line 367 "glsl_lexer.ll"
KEYWORD(110 || ES, 999, HVEC3);
YY_BREAK
-case 156:
+case 157:
YY_RULE_SETUP
-#line 356 "glsl_lexer.lpp"
+#line 368 "glsl_lexer.ll"
KEYWORD(110 || ES, 999, HVEC4);
YY_BREAK
-case 157:
+case 158:
YY_RULE_SETUP
-#line 357 "glsl_lexer.lpp"
+#line 369 "glsl_lexer.ll"
KEYWORD(110 || ES, 400, DVEC2);
YY_BREAK
-case 158:
+case 159:
YY_RULE_SETUP
-#line 358 "glsl_lexer.lpp"
+#line 370 "glsl_lexer.ll"
KEYWORD(110 || ES, 400, DVEC3);
YY_BREAK
-case 159:
+case 160:
YY_RULE_SETUP
-#line 359 "glsl_lexer.lpp"
+#line 371 "glsl_lexer.ll"
KEYWORD(110 || ES, 400, DVEC4);
YY_BREAK
-case 160:
+case 161:
YY_RULE_SETUP
-#line 360 "glsl_lexer.lpp"
+#line 372 "glsl_lexer.ll"
KEYWORD(110 || ES, 999, FVEC2);
YY_BREAK
-case 161:
+case 162:
YY_RULE_SETUP
-#line 361 "glsl_lexer.lpp"
+#line 373 "glsl_lexer.ll"
KEYWORD(110 || ES, 999, FVEC3);
YY_BREAK
-case 162:
+case 163:
YY_RULE_SETUP
-#line 362 "glsl_lexer.lpp"
+#line 374 "glsl_lexer.ll"
KEYWORD(110 || ES, 999, FVEC4);
YY_BREAK
-case 163:
+case 164:
YY_RULE_SETUP
-#line 363 "glsl_lexer.lpp"
+#line 375 "glsl_lexer.ll"
return SAMPLER2DRECT;
YY_BREAK
-case 164:
+case 165:
YY_RULE_SETUP
-#line 364 "glsl_lexer.lpp"
+#line 376 "glsl_lexer.ll"
KEYWORD(110 || ES, 999, SAMPLER3DRECT);
YY_BREAK
-case 165:
+case 166:
YY_RULE_SETUP
-#line 365 "glsl_lexer.lpp"
+#line 377 "glsl_lexer.ll"
return SAMPLER2DRECTSHADOW;
YY_BREAK
-case 166:
+case 167:
YY_RULE_SETUP
-#line 366 "glsl_lexer.lpp"
+#line 378 "glsl_lexer.ll"
KEYWORD(110 || ES, 999, SIZEOF);
YY_BREAK
-case 167:
+case 168:
YY_RULE_SETUP
-#line 367 "glsl_lexer.lpp"
+#line 379 "glsl_lexer.ll"
KEYWORD(110 || ES, 999, CAST);
YY_BREAK
-case 168:
+case 169:
YY_RULE_SETUP
-#line 368 "glsl_lexer.lpp"
+#line 380 "glsl_lexer.ll"
KEYWORD(110 || ES, 999, NAMESPACE);
YY_BREAK
-case 169:
+case 170:
YY_RULE_SETUP
-#line 369 "glsl_lexer.lpp"
+#line 381 "glsl_lexer.ll"
KEYWORD(110 || ES, 999, USING);
YY_BREAK
/* Additional reserved words in GLSL 1.20. */
-case 170:
+case 171:
YY_RULE_SETUP
-#line 372 "glsl_lexer.lpp"
+#line 384 "glsl_lexer.ll"
KEYWORD(120, 130 || ES, LOWP);
YY_BREAK
-case 171:
+case 172:
YY_RULE_SETUP
-#line 373 "glsl_lexer.lpp"
+#line 385 "glsl_lexer.ll"
KEYWORD(120, 130 || ES, MEDIUMP);
YY_BREAK
-case 172:
+case 173:
YY_RULE_SETUP
-#line 374 "glsl_lexer.lpp"
+#line 386 "glsl_lexer.ll"
KEYWORD(120, 130 || ES, HIGHP);
YY_BREAK
-case 173:
+case 174:
YY_RULE_SETUP
-#line 375 "glsl_lexer.lpp"
+#line 387 "glsl_lexer.ll"
KEYWORD(120, 130 || ES, PRECISION);
YY_BREAK
/* Additional reserved words in GLSL 1.30. */
-case 174:
+case 175:
YY_RULE_SETUP
-#line 378 "glsl_lexer.lpp"
+#line 390 "glsl_lexer.ll"
KEYWORD(130, 130, CASE);
YY_BREAK
-case 175:
+case 176:
YY_RULE_SETUP
-#line 379 "glsl_lexer.lpp"
+#line 391 "glsl_lexer.ll"
KEYWORD(130, 999, COMMON);
YY_BREAK
-case 176:
+case 177:
YY_RULE_SETUP
-#line 380 "glsl_lexer.lpp"
+#line 392 "glsl_lexer.ll"
KEYWORD(130, 999, PARTITION);
YY_BREAK
-case 177:
+case 178:
YY_RULE_SETUP
-#line 381 "glsl_lexer.lpp"
+#line 393 "glsl_lexer.ll"
KEYWORD(130, 999, ACTIVE);
YY_BREAK
-case 178:
+case 179:
YY_RULE_SETUP
-#line 382 "glsl_lexer.lpp"
+#line 394 "glsl_lexer.ll"
KEYWORD(130 || ES, 999, SUPERP);
YY_BREAK
-case 179:
+case 180:
YY_RULE_SETUP
-#line 383 "glsl_lexer.lpp"
+#line 395 "glsl_lexer.ll"
KEYWORD(130, 140, SAMPLERBUFFER);
YY_BREAK
-case 180:
+case 181:
YY_RULE_SETUP
-#line 384 "glsl_lexer.lpp"
+#line 396 "glsl_lexer.ll"
KEYWORD(130, 999, FILTER);
YY_BREAK
-case 181:
+case 182:
YY_RULE_SETUP
-#line 385 "glsl_lexer.lpp"
+#line 397 "glsl_lexer.ll"
KEYWORD(130, 999, IMAGE1D);
YY_BREAK
-case 182:
+case 183:
YY_RULE_SETUP
-#line 386 "glsl_lexer.lpp"
+#line 398 "glsl_lexer.ll"
KEYWORD(130, 999, IMAGE2D);
YY_BREAK
-case 183:
+case 184:
YY_RULE_SETUP
-#line 387 "glsl_lexer.lpp"
+#line 399 "glsl_lexer.ll"
KEYWORD(130, 999, IMAGE3D);
YY_BREAK
-case 184:
+case 185:
YY_RULE_SETUP
-#line 388 "glsl_lexer.lpp"
+#line 400 "glsl_lexer.ll"
KEYWORD(130, 999, IMAGECUBE);
YY_BREAK
-case 185:
+case 186:
YY_RULE_SETUP
-#line 389 "glsl_lexer.lpp"
+#line 401 "glsl_lexer.ll"
KEYWORD(130, 999, IIMAGE1D);
YY_BREAK
-case 186:
+case 187:
YY_RULE_SETUP
-#line 390 "glsl_lexer.lpp"
+#line 402 "glsl_lexer.ll"
KEYWORD(130, 999, IIMAGE2D);
YY_BREAK
-case 187:
+case 188:
YY_RULE_SETUP
-#line 391 "glsl_lexer.lpp"
+#line 403 "glsl_lexer.ll"
KEYWORD(130, 999, IIMAGE3D);
YY_BREAK
-case 188:
+case 189:
YY_RULE_SETUP
-#line 392 "glsl_lexer.lpp"
+#line 404 "glsl_lexer.ll"
KEYWORD(130, 999, IIMAGECUBE);
YY_BREAK
-case 189:
+case 190:
YY_RULE_SETUP
-#line 393 "glsl_lexer.lpp"
+#line 405 "glsl_lexer.ll"
KEYWORD(130, 999, UIMAGE1D);
YY_BREAK
-case 190:
+case 191:
YY_RULE_SETUP
-#line 394 "glsl_lexer.lpp"
+#line 406 "glsl_lexer.ll"
KEYWORD(130, 999, UIMAGE2D);
YY_BREAK
-case 191:
+case 192:
YY_RULE_SETUP
-#line 395 "glsl_lexer.lpp"
+#line 407 "glsl_lexer.ll"
KEYWORD(130, 999, UIMAGE3D);
YY_BREAK
-case 192:
+case 193:
YY_RULE_SETUP
-#line 396 "glsl_lexer.lpp"
+#line 408 "glsl_lexer.ll"
KEYWORD(130, 999, UIMAGECUBE);
YY_BREAK
-case 193:
+case 194:
YY_RULE_SETUP
-#line 397 "glsl_lexer.lpp"
+#line 409 "glsl_lexer.ll"
KEYWORD(130, 999, IMAGE1DARRAY);
YY_BREAK
-case 194:
+case 195:
YY_RULE_SETUP
-#line 398 "glsl_lexer.lpp"
+#line 410 "glsl_lexer.ll"
KEYWORD(130, 999, IMAGE2DARRAY);
YY_BREAK
-case 195:
+case 196:
YY_RULE_SETUP
-#line 399 "glsl_lexer.lpp"
+#line 411 "glsl_lexer.ll"
KEYWORD(130, 999, IIMAGE1DARRAY);
YY_BREAK
-case 196:
+case 197:
YY_RULE_SETUP
-#line 400 "glsl_lexer.lpp"
+#line 412 "glsl_lexer.ll"
KEYWORD(130, 999, IIMAGE2DARRAY);
YY_BREAK
-case 197:
+case 198:
YY_RULE_SETUP
-#line 401 "glsl_lexer.lpp"
+#line 413 "glsl_lexer.ll"
KEYWORD(130, 999, UIMAGE1DARRAY);
YY_BREAK
-case 198:
+case 199:
YY_RULE_SETUP
-#line 402 "glsl_lexer.lpp"
+#line 414 "glsl_lexer.ll"
KEYWORD(130, 999, UIMAGE2DARRAY);
YY_BREAK
-case 199:
+case 200:
YY_RULE_SETUP
-#line 403 "glsl_lexer.lpp"
+#line 415 "glsl_lexer.ll"
KEYWORD(130, 999, IMAGE1DSHADOW);
YY_BREAK
-case 200:
+case 201:
YY_RULE_SETUP
-#line 404 "glsl_lexer.lpp"
+#line 416 "glsl_lexer.ll"
KEYWORD(130, 999, IMAGE2DSHADOW);
YY_BREAK
-case 201:
+case 202:
YY_RULE_SETUP
-#line 405 "glsl_lexer.lpp"
+#line 417 "glsl_lexer.ll"
KEYWORD(130, 999, IMAGE1DARRAYSHADOW);
YY_BREAK
-case 202:
+case 203:
YY_RULE_SETUP
-#line 406 "glsl_lexer.lpp"
+#line 418 "glsl_lexer.ll"
KEYWORD(130, 999, IMAGE2DARRAYSHADOW);
YY_BREAK
-case 203:
+case 204:
YY_RULE_SETUP
-#line 407 "glsl_lexer.lpp"
+#line 419 "glsl_lexer.ll"
KEYWORD(130, 999, IMAGEBUFFER);
YY_BREAK
-case 204:
+case 205:
YY_RULE_SETUP
-#line 408 "glsl_lexer.lpp"
+#line 420 "glsl_lexer.ll"
KEYWORD(130, 999, IIMAGEBUFFER);
YY_BREAK
-case 205:
+case 206:
YY_RULE_SETUP
-#line 409 "glsl_lexer.lpp"
+#line 421 "glsl_lexer.ll"
KEYWORD(130, 999, UIMAGEBUFFER);
YY_BREAK
-case 206:
+case 207:
YY_RULE_SETUP
-#line 410 "glsl_lexer.lpp"
+#line 422 "glsl_lexer.ll"
KEYWORD(130, 999, ROW_MAJOR);
YY_BREAK
-case 207:
+case 208:
YY_RULE_SETUP
-#line 412 "glsl_lexer.lpp"
+#line 424 "glsl_lexer.ll"
{
struct _mesa_glsl_parse_state *state = yyextra;
void *ctx = state;
- yylval->identifier = talloc_strdup(ctx, yytext);
- return IDENTIFIER;
+ yylval->identifier = ralloc_strdup(ctx, yytext);
+ return classify_identifier(state, yytext);
}
YY_BREAK
-case 208:
+case 209:
YY_RULE_SETUP
-#line 419 "glsl_lexer.lpp"
+#line 431 "glsl_lexer.ll"
{ return yytext[0]; }
YY_BREAK
-case 209:
+case 210:
YY_RULE_SETUP
-#line 421 "glsl_lexer.lpp"
+#line 433 "glsl_lexer.ll"
ECHO;
YY_BREAK
-#line 2533 "glsl_lexer.cpp"
+#line 2571 "glsl_lexer.cpp"
case YY_STATE_EOF(INITIAL):
case YY_STATE_EOF(PP):
case YY_STATE_EOF(PRAGMA):
@@ -2827,7 +2865,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{
yy_current_state = (int) yy_def[yy_current_state];
- if ( yy_current_state >= 813 )
+ if ( yy_current_state >= 836 )
yy_c = yy_meta[(unsigned int) yy_c];
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
@@ -2856,11 +2894,11 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{
yy_current_state = (int) yy_def[yy_current_state];
- if ( yy_current_state >= 813 )
+ if ( yy_current_state >= 836 )
yy_c = yy_meta[(unsigned int) yy_c];
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
- yy_is_jam = (yy_current_state == 812);
+ yy_is_jam = (yy_current_state == 835);
return yy_is_jam ? 0 : yy_current_state;
}
@@ -3265,8 +3303,8 @@ YY_BUFFER_STATE _mesa_glsl__scan_string (yyconst char * yystr , yyscan_t yyscann
/** Setup the input buffer state to scan the given bytes. The next call to _mesa_glsl_lex() will
* scan from a @e copy of @a bytes.
- * @param bytes the byte buffer to scan
- * @param len the number of bytes in the buffer pointed to by @a bytes.
+ * @param yybytes the byte buffer to scan
+ * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
* @param yyscanner The scanner object.
* @return the newly allocated buffer state object.
*/
@@ -3672,10 +3710,21 @@ void _mesa_glsl_free (void * ptr , yyscan_t yyscanner)
#define YYTABLES_NAME "yytables"
-#line 421 "glsl_lexer.lpp"
+#line 433 "glsl_lexer.ll"
+int
+classify_identifier(struct _mesa_glsl_parse_state *state, const char *name)
+{
+ if (state->symbols->get_variable(name) || state->symbols->get_function(name))
+ return IDENTIFIER;
+ else if (state->symbols->get_type(name))
+ return TYPE_IDENTIFIER;
+ else
+ return NEW_IDENTIFIER;
+}
+
void
_mesa_glsl_lexer_ctor(struct _mesa_glsl_parse_state *state, const char *string)
{
diff --git a/src/glsl/glsl_lexer.lpp b/src/glsl/glsl_lexer.ll
index 7a3f1a67e66..cfd89261757 100644
--- a/src/glsl/glsl_lexer.lpp
+++ b/src/glsl/glsl_lexer.ll
@@ -22,10 +22,17 @@
* DEALINGS IN THE SOFTWARE.
*/
#include <ctype.h>
+#include "strtod.h"
#include "ast.h"
#include "glsl_parser_extras.h"
#include "glsl_parser.h"
+static int classify_identifier(struct _mesa_glsl_parse_state *, const char *);
+
+#ifdef _MSC_VER
+#define YY_NO_UNISTD_H
+#endif
+
#define YY_USER_ACTION \
do { \
yylloc->source = 0; \
@@ -61,7 +68,7 @@
return ERROR_TOK; \
} else { \
yylval->identifier = strdup(yytext); \
- return IDENTIFIER; \
+ return classify_identifier(yyextra, yytext); \
} \
} while (0)
@@ -144,6 +151,10 @@ HASH ^{SPC}#{SPC}
BEGIN PP;
return PRAGMA_OPTIMIZE_OFF;
}
+^{SPC}#{SPC}pragma{SPCP}STDGL{SPCP}invariant{SPC}\({SPC}all{SPC}\) {
+ BEGIN PP;
+ return PRAGMA_INVARIANT_ALL;
+ }
^{SPC}#{SPC}pragma{SPCP} { BEGIN PRAGMA; }
<PRAGMA>\n { BEGIN 0; yylineno++; yycolumn = 0; }
@@ -247,8 +258,9 @@ void return VOID_TOK;
layout {
if ((yyextra->language_version >= 140)
+ || yyextra->AMD_conservative_depth_enable
|| yyextra->ARB_explicit_attrib_location_enable
- || (yyextra->ARB_fragment_coord_conventions_enable)){
+ || yyextra->ARB_fragment_coord_conventions_enable) {
return LAYOUT_TOK;
} else {
yylval->identifier = strdup(yytext);
@@ -293,23 +305,23 @@ layout {
}
[0-9]+\.[0-9]+([eE][+-]?[0-9]+)?[fF]? {
- yylval->real = strtod(yytext, NULL);
+ yylval->real = glsl_strtod(yytext, NULL);
return FLOATCONSTANT;
}
\.[0-9]+([eE][+-]?[0-9]+)?[fF]? {
- yylval->real = strtod(yytext, NULL);
+ yylval->real = glsl_strtod(yytext, NULL);
return FLOATCONSTANT;
}
[0-9]+\.([eE][+-]?[0-9]+)?[fF]? {
- yylval->real = strtod(yytext, NULL);
+ yylval->real = glsl_strtod(yytext, NULL);
return FLOATCONSTANT;
}
[0-9]+[eE][+-]?[0-9]+[fF]? {
- yylval->real = strtod(yytext, NULL);
+ yylval->real = glsl_strtod(yytext, NULL);
return FLOATCONSTANT;
}
[0-9]+[fF] {
- yylval->real = strtod(yytext, NULL);
+ yylval->real = glsl_strtod(yytext, NULL);
return FLOATCONSTANT;
}
@@ -412,14 +424,25 @@ row_major KEYWORD(130, 999, ROW_MAJOR);
[_a-zA-Z][_a-zA-Z0-9]* {
struct _mesa_glsl_parse_state *state = yyextra;
void *ctx = state;
- yylval->identifier = talloc_strdup(ctx, yytext);
- return IDENTIFIER;
+ yylval->identifier = ralloc_strdup(ctx, yytext);
+ return classify_identifier(state, yytext);
}
. { return yytext[0]; }
%%
+int
+classify_identifier(struct _mesa_glsl_parse_state *state, const char *name)
+{
+ if (state->symbols->get_variable(name) || state->symbols->get_function(name))
+ return IDENTIFIER;
+ else if (state->symbols->get_type(name))
+ return TYPE_IDENTIFIER;
+ else
+ return NEW_IDENTIFIER;
+}
+
void
_mesa_glsl_lexer_ctor(struct _mesa_glsl_parse_state *state, const char *string)
{
diff --git a/src/glsl/glsl_parser.cpp b/src/glsl/glsl_parser.cpp
index 23e439c7c54..c9c2fb31a26 100644
--- a/src/glsl/glsl_parser.cpp
+++ b/src/glsl/glsl_parser.cpp
@@ -1,9 +1,10 @@
-/* A Bison parser, made by GNU Bison 2.4.3. */
+
+/* A Bison parser, made by GNU Bison 2.4.1. */
/* Skeleton implementation for Bison's Yacc-like parsers in C
- Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2009, 2010 Free Software Foundation, Inc.
+ Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+ Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -45,7 +46,7 @@
#define YYBISON 1
/* Bison version. */
-#define YYBISON_VERSION "2.4.3"
+#define YYBISON_VERSION "2.4.1"
/* Skeleton name. */
#define YYSKELETON_NAME "yacc.c"
@@ -75,7 +76,7 @@
/* Copy the first part of user declarations. */
/* Line 189 of yacc.c */
-#line 1 "glsl_parser.ypp"
+#line 1 "glsl_parser.yy"
/*
* Copyright © 2008, 2009 Intel Corporation
@@ -113,7 +114,7 @@
/* Line 189 of yacc.c */
-#line 117 "glsl_parser.cpp"
+#line 118 "glsl_parser.cpp"
/* Enabling traces. */
#ifndef YYDEBUG
@@ -214,122 +215,125 @@
VOID_TOK = 329,
WHILE = 330,
IDENTIFIER = 331,
- FLOATCONSTANT = 332,
- INTCONSTANT = 333,
- UINTCONSTANT = 334,
- BOOLCONSTANT = 335,
- FIELD_SELECTION = 336,
- LEFT_OP = 337,
- RIGHT_OP = 338,
- INC_OP = 339,
- DEC_OP = 340,
- LE_OP = 341,
- GE_OP = 342,
- EQ_OP = 343,
- NE_OP = 344,
- AND_OP = 345,
- OR_OP = 346,
- XOR_OP = 347,
- MUL_ASSIGN = 348,
- DIV_ASSIGN = 349,
- ADD_ASSIGN = 350,
- MOD_ASSIGN = 351,
- LEFT_ASSIGN = 352,
- RIGHT_ASSIGN = 353,
- AND_ASSIGN = 354,
- XOR_ASSIGN = 355,
- OR_ASSIGN = 356,
- SUB_ASSIGN = 357,
- INVARIANT = 358,
- LOWP = 359,
- MEDIUMP = 360,
- HIGHP = 361,
- SUPERP = 362,
- PRECISION = 363,
- VERSION = 364,
- EXTENSION = 365,
- LINE = 366,
- COLON = 367,
- EOL = 368,
- INTERFACE = 369,
- OUTPUT = 370,
- PRAGMA_DEBUG_ON = 371,
- PRAGMA_DEBUG_OFF = 372,
- PRAGMA_OPTIMIZE_ON = 373,
- PRAGMA_OPTIMIZE_OFF = 374,
- LAYOUT_TOK = 375,
- ASM = 376,
- CLASS = 377,
- UNION = 378,
- ENUM = 379,
- TYPEDEF = 380,
- TEMPLATE = 381,
- THIS = 382,
- PACKED_TOK = 383,
- GOTO = 384,
- INLINE_TOK = 385,
- NOINLINE = 386,
- VOLATILE = 387,
- PUBLIC_TOK = 388,
- STATIC = 389,
- EXTERN = 390,
- EXTERNAL = 391,
- LONG_TOK = 392,
- SHORT_TOK = 393,
- DOUBLE_TOK = 394,
- HALF = 395,
- FIXED_TOK = 396,
- UNSIGNED = 397,
- INPUT_TOK = 398,
- OUPTUT = 399,
- HVEC2 = 400,
- HVEC3 = 401,
- HVEC4 = 402,
- DVEC2 = 403,
- DVEC3 = 404,
- DVEC4 = 405,
- FVEC2 = 406,
- FVEC3 = 407,
- FVEC4 = 408,
- SAMPLER2DRECT = 409,
- SAMPLER3DRECT = 410,
- SAMPLER2DRECTSHADOW = 411,
- SIZEOF = 412,
- CAST = 413,
- NAMESPACE = 414,
- USING = 415,
- ERROR_TOK = 416,
- COMMON = 417,
- PARTITION = 418,
- ACTIVE = 419,
- SAMPLERBUFFER = 420,
- FILTER = 421,
- IMAGE1D = 422,
- IMAGE2D = 423,
- IMAGE3D = 424,
- IMAGECUBE = 425,
- IMAGE1DARRAY = 426,
- IMAGE2DARRAY = 427,
- IIMAGE1D = 428,
- IIMAGE2D = 429,
- IIMAGE3D = 430,
- IIMAGECUBE = 431,
- IIMAGE1DARRAY = 432,
- IIMAGE2DARRAY = 433,
- UIMAGE1D = 434,
- UIMAGE2D = 435,
- UIMAGE3D = 436,
- UIMAGECUBE = 437,
- UIMAGE1DARRAY = 438,
- UIMAGE2DARRAY = 439,
- IMAGE1DSHADOW = 440,
- IMAGE2DSHADOW = 441,
- IMAGEBUFFER = 442,
- IIMAGEBUFFER = 443,
- UIMAGEBUFFER = 444,
- IMAGE1DARRAYSHADOW = 445,
- IMAGE2DARRAYSHADOW = 446,
- ROW_MAJOR = 447
+ TYPE_IDENTIFIER = 332,
+ NEW_IDENTIFIER = 333,
+ FLOATCONSTANT = 334,
+ INTCONSTANT = 335,
+ UINTCONSTANT = 336,
+ BOOLCONSTANT = 337,
+ FIELD_SELECTION = 338,
+ LEFT_OP = 339,
+ RIGHT_OP = 340,
+ INC_OP = 341,
+ DEC_OP = 342,
+ LE_OP = 343,
+ GE_OP = 344,
+ EQ_OP = 345,
+ NE_OP = 346,
+ AND_OP = 347,
+ OR_OP = 348,
+ XOR_OP = 349,
+ MUL_ASSIGN = 350,
+ DIV_ASSIGN = 351,
+ ADD_ASSIGN = 352,
+ MOD_ASSIGN = 353,
+ LEFT_ASSIGN = 354,
+ RIGHT_ASSIGN = 355,
+ AND_ASSIGN = 356,
+ XOR_ASSIGN = 357,
+ OR_ASSIGN = 358,
+ SUB_ASSIGN = 359,
+ INVARIANT = 360,
+ LOWP = 361,
+ MEDIUMP = 362,
+ HIGHP = 363,
+ SUPERP = 364,
+ PRECISION = 365,
+ VERSION = 366,
+ EXTENSION = 367,
+ LINE = 368,
+ COLON = 369,
+ EOL = 370,
+ INTERFACE = 371,
+ OUTPUT = 372,
+ PRAGMA_DEBUG_ON = 373,
+ PRAGMA_DEBUG_OFF = 374,
+ PRAGMA_OPTIMIZE_ON = 375,
+ PRAGMA_OPTIMIZE_OFF = 376,
+ PRAGMA_INVARIANT_ALL = 377,
+ LAYOUT_TOK = 378,
+ ASM = 379,
+ CLASS = 380,
+ UNION = 381,
+ ENUM = 382,
+ TYPEDEF = 383,
+ TEMPLATE = 384,
+ THIS = 385,
+ PACKED_TOK = 386,
+ GOTO = 387,
+ INLINE_TOK = 388,
+ NOINLINE = 389,
+ VOLATILE = 390,
+ PUBLIC_TOK = 391,
+ STATIC = 392,
+ EXTERN = 393,
+ EXTERNAL = 394,
+ LONG_TOK = 395,
+ SHORT_TOK = 396,
+ DOUBLE_TOK = 397,
+ HALF = 398,
+ FIXED_TOK = 399,
+ UNSIGNED = 400,
+ INPUT_TOK = 401,
+ OUPTUT = 402,
+ HVEC2 = 403,
+ HVEC3 = 404,
+ HVEC4 = 405,
+ DVEC2 = 406,
+ DVEC3 = 407,
+ DVEC4 = 408,
+ FVEC2 = 409,
+ FVEC3 = 410,
+ FVEC4 = 411,
+ SAMPLER2DRECT = 412,
+ SAMPLER3DRECT = 413,
+ SAMPLER2DRECTSHADOW = 414,
+ SIZEOF = 415,
+ CAST = 416,
+ NAMESPACE = 417,
+ USING = 418,
+ ERROR_TOK = 419,
+ COMMON = 420,
+ PARTITION = 421,
+ ACTIVE = 422,
+ SAMPLERBUFFER = 423,
+ FILTER = 424,
+ IMAGE1D = 425,
+ IMAGE2D = 426,
+ IMAGE3D = 427,
+ IMAGECUBE = 428,
+ IMAGE1DARRAY = 429,
+ IMAGE2DARRAY = 430,
+ IIMAGE1D = 431,
+ IIMAGE2D = 432,
+ IIMAGE3D = 433,
+ IIMAGECUBE = 434,
+ IIMAGE1DARRAY = 435,
+ IIMAGE2DARRAY = 436,
+ UIMAGE1D = 437,
+ UIMAGE2D = 438,
+ UIMAGE3D = 439,
+ UIMAGECUBE = 440,
+ UIMAGE1DARRAY = 441,
+ UIMAGE2DARRAY = 442,
+ IMAGE1DSHADOW = 443,
+ IMAGE2DSHADOW = 444,
+ IMAGEBUFFER = 445,
+ IIMAGEBUFFER = 446,
+ UIMAGEBUFFER = 447,
+ IMAGE1DARRAYSHADOW = 448,
+ IMAGE2DARRAYSHADOW = 449,
+ ROW_MAJOR = 450
};
#endif
@@ -340,7 +344,7 @@ typedef union YYSTYPE
{
/* Line 214 of yacc.c */
-#line 52 "glsl_parser.ypp"
+#line 52 "glsl_parser.yy"
int n;
float real;
@@ -373,7 +377,7 @@ typedef union YYSTYPE
/* Line 214 of yacc.c */
-#line 377 "glsl_parser.cpp"
+#line 381 "glsl_parser.cpp"
} YYSTYPE;
# define YYSTYPE_IS_TRIVIAL 1
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
@@ -398,7 +402,7 @@ typedef struct YYLTYPE
/* Line 264 of yacc.c */
-#line 402 "glsl_parser.cpp"
+#line 406 "glsl_parser.cpp"
#ifdef short
# undef short
@@ -448,7 +452,7 @@ typedef short int yytype_int16;
#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
#ifndef YY_
-# if defined YYENABLE_NLS && YYENABLE_NLS
+# if YYENABLE_NLS
# if ENABLE_NLS
# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
# define YY_(msgid) dgettext ("bison-runtime", msgid)
@@ -615,20 +619,20 @@ union yyalloc
/* YYFINAL -- State number of the termination state. */
#define YYFINAL 5
/* YYLAST -- Last index in YYTABLE. */
-#define YYLAST 3718
+#define YYLAST 3692
/* YYNTOKENS -- Number of terminals. */
-#define YYNTOKENS 217
+#define YYNTOKENS 220
/* YYNNTS -- Number of nonterminals. */
-#define YYNNTS 87
+#define YYNNTS 93
/* YYNRULES -- Number of rules. */
-#define YYNRULES 278
+#define YYNRULES 291
/* YYNRULES -- Number of states. */
-#define YYNSTATES 413
+#define YYNSTATES 434
/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
#define YYUNDEFTOK 2
-#define YYMAXUTOK 447
+#define YYMAXUTOK 450
#define YYTRANSLATE(YYX) \
((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
@@ -639,16 +643,16 @@ static const yytype_uint8 yytranslate[] =
0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 201, 2, 2, 2, 205, 208, 2,
- 193, 194, 203, 199, 198, 200, 197, 204, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 212, 214,
- 206, 213, 207, 211, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 204, 2, 2, 2, 208, 211, 2,
+ 196, 197, 206, 202, 201, 203, 200, 207, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 215, 217,
+ 209, 216, 210, 214, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 195, 2, 196, 209, 2, 2, 2, 2, 2,
+ 2, 198, 2, 199, 212, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 215, 210, 216, 202, 2, 2, 2,
+ 2, 2, 2, 218, 213, 219, 205, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
@@ -680,7 +684,8 @@ static const yytype_uint8 yytranslate[] =
155, 156, 157, 158, 159, 160, 161, 162, 163, 164,
165, 166, 167, 168, 169, 170, 171, 172, 173, 174,
175, 176, 177, 178, 179, 180, 181, 182, 183, 184,
- 185, 186, 187, 188, 189, 190, 191, 192
+ 185, 186, 187, 188, 189, 190, 191, 192, 193, 194,
+ 195
};
#if YYDEBUG
@@ -689,151 +694,158 @@ static const yytype_uint8 yytranslate[] =
static const yytype_uint16 yyprhs[] =
{
0, 0, 3, 4, 9, 10, 14, 17, 20, 23,
- 26, 27, 30, 36, 38, 41, 43, 45, 47, 49,
- 51, 53, 57, 59, 64, 66, 70, 73, 76, 78,
- 80, 82, 86, 89, 92, 95, 97, 100, 104, 107,
- 109, 111, 113, 115, 118, 121, 124, 126, 128, 130,
- 132, 134, 138, 142, 146, 148, 152, 156, 158, 162,
- 166, 168, 172, 176, 180, 184, 186, 190, 194, 196,
- 200, 202, 206, 208, 212, 214, 218, 220, 224, 226,
- 230, 232, 238, 240, 244, 246, 248, 250, 252, 254,
- 256, 258, 260, 262, 264, 266, 268, 272, 274, 277,
- 280, 285, 288, 290, 292, 295, 299, 303, 306, 312,
- 316, 319, 323, 326, 327, 329, 331, 333, 335, 337,
- 341, 347, 354, 362, 371, 377, 379, 382, 387, 393,
- 400, 408, 413, 416, 418, 421, 426, 428, 432, 434,
- 438, 440, 442, 444, 446, 448, 450, 453, 455, 458,
- 461, 465, 467, 469, 471, 473, 476, 478, 480, 483,
- 486, 488, 490, 493, 495, 499, 504, 506, 508, 510,
- 512, 514, 516, 518, 520, 522, 524, 526, 528, 530,
- 532, 534, 536, 538, 540, 542, 544, 546, 548, 550,
- 552, 554, 556, 558, 560, 562, 564, 566, 568, 570,
- 572, 574, 576, 578, 580, 582, 584, 586, 588, 590,
- 592, 594, 596, 598, 600, 602, 604, 606, 608, 610,
- 612, 614, 616, 618, 624, 629, 631, 634, 638, 640,
- 644, 646, 651, 653, 655, 657, 659, 661, 663, 665,
- 667, 669, 671, 673, 676, 680, 682, 684, 687, 691,
- 693, 696, 698, 701, 707, 711, 713, 715, 720, 726,
- 730, 733, 739, 747, 754, 756, 758, 760, 761, 764,
- 768, 771, 774, 777, 781, 784, 786, 788, 790
+ 26, 29, 30, 33, 35, 37, 39, 45, 47, 50,
+ 52, 54, 56, 58, 60, 62, 64, 68, 70, 75,
+ 77, 81, 84, 87, 89, 91, 93, 97, 100, 103,
+ 106, 108, 111, 115, 118, 120, 122, 124, 127, 130,
+ 133, 135, 138, 142, 145, 147, 150, 153, 156, 158,
+ 160, 162, 164, 166, 170, 174, 178, 180, 184, 188,
+ 190, 194, 198, 200, 204, 208, 212, 216, 218, 222,
+ 226, 228, 232, 234, 238, 240, 244, 246, 250, 252,
+ 256, 258, 262, 264, 270, 272, 276, 278, 280, 282,
+ 284, 286, 288, 290, 292, 294, 296, 298, 300, 304,
+ 306, 309, 312, 317, 320, 322, 324, 327, 331, 335,
+ 338, 344, 348, 351, 355, 358, 359, 361, 363, 365,
+ 367, 369, 373, 379, 386, 394, 403, 409, 411, 414,
+ 419, 425, 432, 440, 445, 448, 450, 453, 458, 460,
+ 464, 466, 470, 472, 474, 476, 478, 480, 482, 485,
+ 487, 490, 493, 497, 499, 501, 503, 505, 508, 510,
+ 512, 515, 518, 520, 522, 525, 527, 531, 536, 538,
+ 540, 542, 544, 546, 548, 550, 552, 554, 556, 558,
+ 560, 562, 564, 566, 568, 570, 572, 574, 576, 578,
+ 580, 582, 584, 586, 588, 590, 592, 594, 596, 598,
+ 600, 602, 604, 606, 608, 610, 612, 614, 616, 618,
+ 620, 622, 624, 626, 628, 630, 632, 634, 636, 638,
+ 640, 642, 644, 646, 648, 650, 656, 661, 663, 666,
+ 670, 672, 676, 678, 683, 685, 687, 689, 691, 693,
+ 695, 697, 699, 701, 703, 705, 708, 709, 714, 716,
+ 718, 721, 725, 727, 730, 732, 735, 741, 745, 747,
+ 749, 754, 760, 764, 767, 773, 781, 788, 790, 792,
+ 794, 795, 798, 802, 805, 808, 811, 815, 818, 820,
+ 822, 824
};
/* YYRHS -- A `-1'-separated list of the rules' RHS. */
static const yytype_int16 yyrhs[] =
{
- 218, 0, -1, -1, 220, 222, 219, 224, -1, -1,
- 109, 78, 113, -1, 116, 113, -1, 117, 113, -1,
- 118, 113, -1, 119, 113, -1, -1, 222, 223, -1,
- 110, 76, 112, 76, 113, -1, 302, -1, 224, 302,
- -1, 76, -1, 225, -1, 78, -1, 79, -1, 77,
- -1, 80, -1, 193, 252, 194, -1, 226, -1, 227,
- 195, 228, 196, -1, 229, -1, 227, 197, 76, -1,
- 227, 84, -1, 227, 85, -1, 252, -1, 230, -1,
- 231, -1, 227, 197, 231, -1, 233, 194, -1, 232,
- 194, -1, 234, 74, -1, 234, -1, 234, 250, -1,
- 233, 198, 250, -1, 235, 193, -1, 273, -1, 76,
- -1, 81, -1, 227, -1, 84, 236, -1, 85, 236,
- -1, 237, 236, -1, 199, -1, 200, -1, 201, -1,
- 202, -1, 236, -1, 238, 203, 236, -1, 238, 204,
- 236, -1, 238, 205, 236, -1, 238, -1, 239, 199,
- 238, -1, 239, 200, 238, -1, 239, -1, 240, 82,
- 239, -1, 240, 83, 239, -1, 240, -1, 241, 206,
- 240, -1, 241, 207, 240, -1, 241, 86, 240, -1,
- 241, 87, 240, -1, 241, -1, 242, 88, 241, -1,
- 242, 89, 241, -1, 242, -1, 243, 208, 242, -1,
- 243, -1, 244, 209, 243, -1, 244, -1, 245, 210,
- 244, -1, 245, -1, 246, 90, 245, -1, 246, -1,
- 247, 92, 246, -1, 247, -1, 248, 91, 247, -1,
- 248, -1, 248, 211, 252, 212, 250, -1, 249, -1,
- 236, 251, 250, -1, 213, -1, 93, -1, 94, -1,
- 96, -1, 95, -1, 102, -1, 97, -1, 98, -1,
- 99, -1, 100, -1, 101, -1, 250, -1, 252, 198,
- 250, -1, 249, -1, 255, 214, -1, 263, 214, -1,
- 108, 277, 274, 214, -1, 256, 194, -1, 258, -1,
- 257, -1, 258, 260, -1, 257, 198, 260, -1, 265,
- 76, 193, -1, 273, 76, -1, 273, 76, 195, 253,
- 196, -1, 270, 261, 259, -1, 261, 259, -1, 270,
- 261, 262, -1, 261, 262, -1, -1, 33, -1, 34,
- -1, 35, -1, 273, -1, 264, -1, 263, 198, 76,
- -1, 263, 198, 76, 195, 196, -1, 263, 198, 76,
- 195, 253, 196, -1, 263, 198, 76, 195, 196, 213,
- 283, -1, 263, 198, 76, 195, 253, 196, 213, 283,
- -1, 263, 198, 76, 213, 283, -1, 265, -1, 265,
- 76, -1, 265, 76, 195, 196, -1, 265, 76, 195,
- 253, 196, -1, 265, 76, 195, 196, 213, 283, -1,
- 265, 76, 195, 253, 196, 213, 283, -1, 265, 76,
- 213, 283, -1, 103, 76, -1, 273, -1, 271, 273,
- -1, 120, 193, 267, 194, -1, 268, -1, 267, 198,
- 268, -1, 76, -1, 76, 213, 78, -1, 40, -1,
- 39, -1, 38, -1, 4, -1, 272, -1, 266, -1,
- 266, 272, -1, 269, -1, 269, 272, -1, 103, 272,
- -1, 103, 269, 272, -1, 103, -1, 4, -1, 3,
- -1, 37, -1, 32, 37, -1, 33, -1, 34, -1,
- 32, 33, -1, 32, 34, -1, 36, -1, 274, -1,
- 277, 274, -1, 275, -1, 275, 195, 196, -1, 275,
- 195, 253, 196, -1, 276, -1, 278, -1, 76, -1,
- 74, -1, 6, -1, 7, -1, 8, -1, 5, -1,
- 29, -1, 30, -1, 31, -1, 20, -1, 21, -1,
- 22, -1, 23, -1, 24, -1, 25, -1, 26, -1,
- 27, -1, 28, -1, 41, -1, 42, -1, 43, -1,
- 44, -1, 45, -1, 46, -1, 47, -1, 48, -1,
- 49, -1, 50, -1, 51, -1, 154, -1, 52, -1,
- 53, -1, 54, -1, 55, -1, 156, -1, 56, -1,
- 57, -1, 58, -1, 59, -1, 60, -1, 61, -1,
- 62, -1, 63, -1, 64, -1, 65, -1, 66, -1,
- 67, -1, 68, -1, 69, -1, 70, -1, 71, -1,
- 72, -1, 106, -1, 105, -1, 104, -1, 73, 76,
- 215, 279, 216, -1, 73, 215, 279, 216, -1, 280,
- -1, 279, 280, -1, 273, 281, 214, -1, 282, -1,
- 281, 198, 282, -1, 76, -1, 76, 195, 253, 196,
- -1, 250, -1, 254, -1, 287, -1, 286, -1, 284,
- -1, 291, -1, 292, -1, 295, -1, 296, -1, 297,
- -1, 301, -1, 215, 216, -1, 215, 290, 216, -1,
- 289, -1, 286, -1, 215, 216, -1, 215, 290, 216,
- -1, 285, -1, 290, 285, -1, 214, -1, 252, 214,
- -1, 14, 193, 252, 194, 293, -1, 285, 12, 285,
- -1, 285, -1, 252, -1, 265, 76, 213, 283, -1,
- 17, 193, 252, 194, 287, -1, 18, 252, 212, -1,
- 19, 212, -1, 75, 193, 294, 194, 288, -1, 11,
- 285, 75, 193, 252, 194, 214, -1, 13, 193, 298,
- 300, 194, 288, -1, 291, -1, 284, -1, 294, -1,
- -1, 299, 214, -1, 299, 214, 252, -1, 10, 214,
- -1, 9, 214, -1, 16, 214, -1, 16, 252, 214,
- -1, 15, 214, -1, 303, -1, 254, -1, 221, -1,
- 255, 289, -1
+ 221, 0, -1, -1, 223, 225, 222, 228, -1, -1,
+ 111, 80, 115, -1, 118, 115, -1, 119, 115, -1,
+ 120, 115, -1, 121, 115, -1, 122, 115, -1, -1,
+ 225, 227, -1, 76, -1, 77, -1, 78, -1, 112,
+ 226, 114, 226, 115, -1, 311, -1, 228, 311, -1,
+ 76, -1, 78, -1, 229, -1, 80, -1, 81, -1,
+ 79, -1, 82, -1, 196, 260, 197, -1, 230, -1,
+ 231, 198, 232, 199, -1, 233, -1, 231, 200, 226,
+ -1, 231, 86, -1, 231, 87, -1, 260, -1, 234,
+ -1, 235, -1, 231, 200, 240, -1, 237, 197, -1,
+ 236, 197, -1, 238, 74, -1, 238, -1, 238, 258,
+ -1, 237, 201, 258, -1, 239, 196, -1, 281, -1,
+ 229, -1, 83, -1, 242, 197, -1, 241, 197, -1,
+ 243, 74, -1, 243, -1, 243, 258, -1, 242, 201,
+ 258, -1, 229, 196, -1, 231, -1, 86, 244, -1,
+ 87, 244, -1, 245, 244, -1, 202, -1, 203, -1,
+ 204, -1, 205, -1, 244, -1, 246, 206, 244, -1,
+ 246, 207, 244, -1, 246, 208, 244, -1, 246, -1,
+ 247, 202, 246, -1, 247, 203, 246, -1, 247, -1,
+ 248, 84, 247, -1, 248, 85, 247, -1, 248, -1,
+ 249, 209, 248, -1, 249, 210, 248, -1, 249, 88,
+ 248, -1, 249, 89, 248, -1, 249, -1, 250, 90,
+ 249, -1, 250, 91, 249, -1, 250, -1, 251, 211,
+ 250, -1, 251, -1, 252, 212, 251, -1, 252, -1,
+ 253, 213, 252, -1, 253, -1, 254, 92, 253, -1,
+ 254, -1, 255, 94, 254, -1, 255, -1, 256, 93,
+ 255, -1, 256, -1, 256, 214, 260, 215, 258, -1,
+ 257, -1, 244, 259, 258, -1, 216, -1, 95, -1,
+ 96, -1, 98, -1, 97, -1, 104, -1, 99, -1,
+ 100, -1, 101, -1, 102, -1, 103, -1, 258, -1,
+ 260, 201, 258, -1, 257, -1, 263, 217, -1, 271,
+ 217, -1, 110, 285, 282, 217, -1, 264, 197, -1,
+ 266, -1, 265, -1, 266, 268, -1, 265, 201, 268,
+ -1, 273, 229, 196, -1, 281, 226, -1, 281, 226,
+ 198, 261, 199, -1, 278, 269, 267, -1, 269, 267,
+ -1, 278, 269, 270, -1, 269, 270, -1, -1, 33,
+ -1, 34, -1, 35, -1, 281, -1, 272, -1, 271,
+ 201, 226, -1, 271, 201, 226, 198, 199, -1, 271,
+ 201, 226, 198, 261, 199, -1, 271, 201, 226, 198,
+ 199, 216, 291, -1, 271, 201, 226, 198, 261, 199,
+ 216, 291, -1, 271, 201, 226, 216, 291, -1, 273,
+ -1, 273, 226, -1, 273, 226, 198, 199, -1, 273,
+ 226, 198, 261, 199, -1, 273, 226, 198, 199, 216,
+ 291, -1, 273, 226, 198, 261, 199, 216, 291, -1,
+ 273, 226, 216, 291, -1, 105, 229, -1, 281, -1,
+ 279, 281, -1, 123, 196, 275, 197, -1, 276, -1,
+ 275, 201, 276, -1, 226, -1, 226, 216, 80, -1,
+ 40, -1, 39, -1, 38, -1, 4, -1, 280, -1,
+ 274, -1, 274, 280, -1, 277, -1, 277, 280, -1,
+ 105, 280, -1, 105, 277, 280, -1, 105, -1, 4,
+ -1, 3, -1, 37, -1, 32, 37, -1, 33, -1,
+ 34, -1, 32, 33, -1, 32, 34, -1, 36, -1,
+ 282, -1, 285, 282, -1, 283, -1, 283, 198, 199,
+ -1, 283, 198, 261, 199, -1, 284, -1, 286, -1,
+ 77, -1, 74, -1, 6, -1, 7, -1, 8, -1,
+ 5, -1, 29, -1, 30, -1, 31, -1, 20, -1,
+ 21, -1, 22, -1, 23, -1, 24, -1, 25, -1,
+ 26, -1, 27, -1, 28, -1, 41, -1, 42, -1,
+ 43, -1, 44, -1, 45, -1, 46, -1, 47, -1,
+ 48, -1, 49, -1, 50, -1, 51, -1, 157, -1,
+ 52, -1, 53, -1, 54, -1, 55, -1, 159, -1,
+ 56, -1, 57, -1, 58, -1, 59, -1, 60, -1,
+ 61, -1, 62, -1, 63, -1, 64, -1, 65, -1,
+ 66, -1, 67, -1, 68, -1, 69, -1, 70, -1,
+ 71, -1, 72, -1, 108, -1, 107, -1, 106, -1,
+ 73, 226, 218, 287, 219, -1, 73, 218, 287, 219,
+ -1, 288, -1, 287, 288, -1, 281, 289, 217, -1,
+ 290, -1, 289, 201, 290, -1, 226, -1, 226, 198,
+ 261, 199, -1, 258, -1, 262, -1, 295, -1, 294,
+ -1, 292, -1, 300, -1, 301, -1, 304, -1, 305,
+ -1, 306, -1, 310, -1, 218, 219, -1, -1, 218,
+ 296, 299, 219, -1, 298, -1, 294, -1, 218, 219,
+ -1, 218, 299, 219, -1, 293, -1, 299, 293, -1,
+ 217, -1, 260, 217, -1, 14, 196, 260, 197, 302,
+ -1, 293, 12, 293, -1, 293, -1, 260, -1, 273,
+ 226, 216, 291, -1, 17, 196, 260, 197, 295, -1,
+ 18, 260, 215, -1, 19, 215, -1, 75, 196, 303,
+ 197, 297, -1, 11, 293, 75, 196, 260, 197, 217,
+ -1, 13, 196, 307, 309, 197, 297, -1, 300, -1,
+ 292, -1, 303, -1, -1, 308, 217, -1, 308, 217,
+ 260, -1, 10, 217, -1, 9, 217, -1, 16, 217,
+ -1, 16, 260, 217, -1, 15, 217, -1, 312, -1,
+ 262, -1, 224, -1, 263, 298, -1
};
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
static const yytype_uint16 yyrline[] =
{
- 0, 212, 212, 211, 218, 220, 240, 241, 242, 243,
- 246, 248, 252, 261, 269, 280, 284, 291, 298, 305,
- 312, 319, 326, 327, 333, 337, 344, 350, 359, 363,
- 367, 368, 377, 378, 382, 383, 387, 393, 405, 409,
- 415, 422, 433, 434, 440, 446, 456, 457, 458, 459,
- 463, 464, 470, 476, 485, 486, 492, 501, 502, 508,
- 517, 518, 524, 530, 536, 545, 546, 552, 561, 562,
- 571, 572, 581, 582, 591, 592, 601, 602, 611, 612,
- 621, 622, 631, 632, 641, 642, 643, 644, 645, 646,
- 647, 648, 649, 650, 651, 655, 659, 675, 679, 683,
- 687, 701, 705, 706, 710, 715, 723, 734, 744, 759,
- 766, 771, 782, 795, 798, 803, 808, 817, 821, 822,
- 831, 840, 849, 858, 867, 880, 891, 900, 909, 918,
- 927, 936, 945, 959, 966, 977, 984, 985, 1004, 1033,
- 1074, 1079, 1084, 1092, 1100, 1101, 1102, 1107, 1108, 1113,
- 1118, 1124, 1132, 1137, 1142, 1147, 1153, 1158, 1163, 1168,
- 1173, 1181, 1182, 1190, 1191, 1197, 1206, 1212, 1218, 1227,
- 1228, 1229, 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237,
- 1238, 1239, 1240, 1241, 1242, 1243, 1244, 1245, 1246, 1247,
- 1248, 1249, 1250, 1251, 1252, 1253, 1254, 1255, 1256, 1257,
- 1258, 1259, 1260, 1261, 1262, 1263, 1264, 1265, 1266, 1267,
- 1268, 1269, 1270, 1271, 1272, 1273, 1274, 1275, 1276, 1277,
- 1281, 1292, 1303, 1317, 1323, 1332, 1337, 1345, 1360, 1365,
- 1373, 1379, 1388, 1392, 1398, 1399, 1403, 1404, 1405, 1406,
- 1407, 1408, 1409, 1413, 1419, 1428, 1429, 1433, 1439, 1448,
- 1458, 1470, 1476, 1485, 1494, 1499, 1507, 1511, 1525, 1529,
- 1530, 1534, 1541, 1548, 1558, 1559, 1563, 1565, 1571, 1576,
- 1585, 1591, 1597, 1603, 1609, 1618, 1619, 1620, 1624
+ 0, 218, 218, 217, 229, 231, 271, 272, 273, 274,
+ 275, 287, 289, 293, 294, 295, 299, 308, 316, 327,
+ 328, 332, 339, 346, 353, 360, 367, 374, 375, 381,
+ 385, 392, 398, 407, 411, 415, 416, 425, 426, 430,
+ 431, 435, 441, 453, 457, 463, 470, 480, 481, 485,
+ 486, 490, 496, 508, 519, 520, 526, 532, 542, 543,
+ 544, 545, 549, 550, 556, 562, 571, 572, 578, 587,
+ 588, 594, 603, 604, 610, 616, 622, 631, 632, 638,
+ 647, 648, 657, 658, 667, 668, 677, 678, 687, 688,
+ 697, 698, 707, 708, 717, 718, 727, 728, 729, 730,
+ 731, 732, 733, 734, 735, 736, 737, 741, 745, 761,
+ 765, 770, 774, 783, 787, 788, 792, 797, 805, 819,
+ 829, 844, 851, 856, 867, 880, 883, 888, 893, 902,
+ 906, 907, 917, 927, 937, 947, 957, 971, 982, 991,
+ 1000, 1009, 1018, 1027, 1036, 1050, 1057, 1068, 1075, 1076,
+ 1095, 1147, 1188, 1193, 1198, 1206, 1214, 1215, 1216, 1221,
+ 1222, 1227, 1232, 1238, 1246, 1251, 1256, 1261, 1267, 1272,
+ 1277, 1282, 1287, 1295, 1299, 1307, 1308, 1314, 1323, 1329,
+ 1335, 1344, 1345, 1346, 1347, 1348, 1349, 1350, 1351, 1352,
+ 1353, 1354, 1355, 1356, 1357, 1358, 1359, 1360, 1361, 1362,
+ 1363, 1364, 1365, 1366, 1367, 1368, 1369, 1370, 1371, 1372,
+ 1373, 1374, 1375, 1376, 1377, 1378, 1379, 1380, 1381, 1382,
+ 1383, 1384, 1385, 1386, 1387, 1388, 1389, 1390, 1391, 1392,
+ 1393, 1394, 1398, 1408, 1418, 1431, 1438, 1447, 1452, 1460,
+ 1475, 1480, 1488, 1495, 1504, 1508, 1514, 1515, 1519, 1520,
+ 1521, 1522, 1523, 1524, 1525, 1529, 1536, 1535, 1549, 1550,
+ 1554, 1560, 1569, 1579, 1591, 1597, 1606, 1615, 1620, 1628,
+ 1632, 1646, 1650, 1651, 1655, 1662, 1669, 1679, 1680, 1684,
+ 1686, 1692, 1697, 1706, 1712, 1718, 1724, 1730, 1739, 1740,
+ 1741, 1745
};
#endif
@@ -856,38 +868,41 @@ static const char *const yytname[] =
"ISAMPLERCUBE", "ISAMPLER1DARRAY", "ISAMPLER2DARRAY", "USAMPLER1D",
"USAMPLER2D", "USAMPLER3D", "USAMPLERCUBE", "USAMPLER1DARRAY",
"USAMPLER2DARRAY", "STRUCT", "VOID_TOK", "WHILE", "IDENTIFIER",
- "FLOATCONSTANT", "INTCONSTANT", "UINTCONSTANT", "BOOLCONSTANT",
- "FIELD_SELECTION", "LEFT_OP", "RIGHT_OP", "INC_OP", "DEC_OP", "LE_OP",
- "GE_OP", "EQ_OP", "NE_OP", "AND_OP", "OR_OP", "XOR_OP", "MUL_ASSIGN",
- "DIV_ASSIGN", "ADD_ASSIGN", "MOD_ASSIGN", "LEFT_ASSIGN", "RIGHT_ASSIGN",
- "AND_ASSIGN", "XOR_ASSIGN", "OR_ASSIGN", "SUB_ASSIGN", "INVARIANT",
- "LOWP", "MEDIUMP", "HIGHP", "SUPERP", "PRECISION", "VERSION",
- "EXTENSION", "LINE", "COLON", "EOL", "INTERFACE", "OUTPUT",
- "PRAGMA_DEBUG_ON", "PRAGMA_DEBUG_OFF", "PRAGMA_OPTIMIZE_ON",
- "PRAGMA_OPTIMIZE_OFF", "LAYOUT_TOK", "ASM", "CLASS", "UNION", "ENUM",
- "TYPEDEF", "TEMPLATE", "THIS", "PACKED_TOK", "GOTO", "INLINE_TOK",
- "NOINLINE", "VOLATILE", "PUBLIC_TOK", "STATIC", "EXTERN", "EXTERNAL",
- "LONG_TOK", "SHORT_TOK", "DOUBLE_TOK", "HALF", "FIXED_TOK", "UNSIGNED",
- "INPUT_TOK", "OUPTUT", "HVEC2", "HVEC3", "HVEC4", "DVEC2", "DVEC3",
- "DVEC4", "FVEC2", "FVEC3", "FVEC4", "SAMPLER2DRECT", "SAMPLER3DRECT",
- "SAMPLER2DRECTSHADOW", "SIZEOF", "CAST", "NAMESPACE", "USING",
- "ERROR_TOK", "COMMON", "PARTITION", "ACTIVE", "SAMPLERBUFFER", "FILTER",
- "IMAGE1D", "IMAGE2D", "IMAGE3D", "IMAGECUBE", "IMAGE1DARRAY",
- "IMAGE2DARRAY", "IIMAGE1D", "IIMAGE2D", "IIMAGE3D", "IIMAGECUBE",
- "IIMAGE1DARRAY", "IIMAGE2DARRAY", "UIMAGE1D", "UIMAGE2D", "UIMAGE3D",
- "UIMAGECUBE", "UIMAGE1DARRAY", "UIMAGE2DARRAY", "IMAGE1DSHADOW",
- "IMAGE2DSHADOW", "IMAGEBUFFER", "IIMAGEBUFFER", "UIMAGEBUFFER",
- "IMAGE1DARRAYSHADOW", "IMAGE2DARRAYSHADOW", "ROW_MAJOR", "'('", "')'",
- "'['", "']'", "'.'", "','", "'+'", "'-'", "'!'", "'~'", "'*'", "'/'",
- "'%'", "'<'", "'>'", "'&'", "'^'", "'|'", "'?'", "':'", "'='", "';'",
- "'{'", "'}'", "$accept", "translation_unit", "$@1", "version_statement",
- "pragma_statement", "extension_statement_list", "extension_statement",
+ "TYPE_IDENTIFIER", "NEW_IDENTIFIER", "FLOATCONSTANT", "INTCONSTANT",
+ "UINTCONSTANT", "BOOLCONSTANT", "FIELD_SELECTION", "LEFT_OP", "RIGHT_OP",
+ "INC_OP", "DEC_OP", "LE_OP", "GE_OP", "EQ_OP", "NE_OP", "AND_OP",
+ "OR_OP", "XOR_OP", "MUL_ASSIGN", "DIV_ASSIGN", "ADD_ASSIGN",
+ "MOD_ASSIGN", "LEFT_ASSIGN", "RIGHT_ASSIGN", "AND_ASSIGN", "XOR_ASSIGN",
+ "OR_ASSIGN", "SUB_ASSIGN", "INVARIANT", "LOWP", "MEDIUMP", "HIGHP",
+ "SUPERP", "PRECISION", "VERSION", "EXTENSION", "LINE", "COLON", "EOL",
+ "INTERFACE", "OUTPUT", "PRAGMA_DEBUG_ON", "PRAGMA_DEBUG_OFF",
+ "PRAGMA_OPTIMIZE_ON", "PRAGMA_OPTIMIZE_OFF", "PRAGMA_INVARIANT_ALL",
+ "LAYOUT_TOK", "ASM", "CLASS", "UNION", "ENUM", "TYPEDEF", "TEMPLATE",
+ "THIS", "PACKED_TOK", "GOTO", "INLINE_TOK", "NOINLINE", "VOLATILE",
+ "PUBLIC_TOK", "STATIC", "EXTERN", "EXTERNAL", "LONG_TOK", "SHORT_TOK",
+ "DOUBLE_TOK", "HALF", "FIXED_TOK", "UNSIGNED", "INPUT_TOK", "OUPTUT",
+ "HVEC2", "HVEC3", "HVEC4", "DVEC2", "DVEC3", "DVEC4", "FVEC2", "FVEC3",
+ "FVEC4", "SAMPLER2DRECT", "SAMPLER3DRECT", "SAMPLER2DRECTSHADOW",
+ "SIZEOF", "CAST", "NAMESPACE", "USING", "ERROR_TOK", "COMMON",
+ "PARTITION", "ACTIVE", "SAMPLERBUFFER", "FILTER", "IMAGE1D", "IMAGE2D",
+ "IMAGE3D", "IMAGECUBE", "IMAGE1DARRAY", "IMAGE2DARRAY", "IIMAGE1D",
+ "IIMAGE2D", "IIMAGE3D", "IIMAGECUBE", "IIMAGE1DARRAY", "IIMAGE2DARRAY",
+ "UIMAGE1D", "UIMAGE2D", "UIMAGE3D", "UIMAGECUBE", "UIMAGE1DARRAY",
+ "UIMAGE2DARRAY", "IMAGE1DSHADOW", "IMAGE2DSHADOW", "IMAGEBUFFER",
+ "IIMAGEBUFFER", "UIMAGEBUFFER", "IMAGE1DARRAYSHADOW",
+ "IMAGE2DARRAYSHADOW", "ROW_MAJOR", "'('", "')'", "'['", "']'", "'.'",
+ "','", "'+'", "'-'", "'!'", "'~'", "'*'", "'/'", "'%'", "'<'", "'>'",
+ "'&'", "'^'", "'|'", "'?'", "':'", "'='", "';'", "'{'", "'}'", "$accept",
+ "translation_unit", "$@1", "version_statement", "pragma_statement",
+ "extension_statement_list", "any_identifier", "extension_statement",
"external_declaration_list", "variable_identifier", "primary_expression",
"postfix_expression", "integer_expression", "function_call",
"function_call_or_method", "function_call_generic",
"function_call_header_no_parameters",
"function_call_header_with_parameters", "function_call_header",
- "function_identifier", "unary_expression", "unary_operator",
+ "function_identifier", "method_call_generic",
+ "method_call_header_no_parameters", "method_call_header_with_parameters",
+ "method_call_header", "unary_expression", "unary_operator",
"multiplicative_expression", "additive_expression", "shift_expression",
"relational_expression", "equality_expression", "and_expression",
"exclusive_or_expression", "inclusive_or_expression",
@@ -906,7 +921,7 @@ static const char *const yytname[] =
"precision_qualifier", "struct_specifier", "struct_declaration_list",
"struct_declaration", "struct_declarator_list", "struct_declarator",
"initializer", "declaration_statement", "statement", "simple_statement",
- "compound_statement", "statement_no_new_scope",
+ "compound_statement", "$@2", "statement_no_new_scope",
"compound_statement_no_new_scope", "statement_list",
"expression_statement", "selection_statement",
"selection_rest_statement", "condition", "switch_statement",
@@ -940,76 +955,80 @@ static const yytype_uint16 yytoknum[] =
415, 416, 417, 418, 419, 420, 421, 422, 423, 424,
425, 426, 427, 428, 429, 430, 431, 432, 433, 434,
435, 436, 437, 438, 439, 440, 441, 442, 443, 444,
- 445, 446, 447, 40, 41, 91, 93, 46, 44, 43,
- 45, 33, 126, 42, 47, 37, 60, 62, 38, 94,
- 124, 63, 58, 61, 59, 123, 125
+ 445, 446, 447, 448, 449, 450, 40, 41, 91, 93,
+ 46, 44, 43, 45, 33, 126, 42, 47, 37, 60,
+ 62, 38, 94, 124, 63, 58, 61, 59, 123, 125
};
# endif
/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
static const yytype_uint16 yyr1[] =
{
- 0, 217, 219, 218, 220, 220, 221, 221, 221, 221,
- 222, 222, 223, 224, 224, 225, 226, 226, 226, 226,
- 226, 226, 227, 227, 227, 227, 227, 227, 228, 229,
- 230, 230, 231, 231, 232, 232, 233, 233, 234, 235,
- 235, 235, 236, 236, 236, 236, 237, 237, 237, 237,
- 238, 238, 238, 238, 239, 239, 239, 240, 240, 240,
- 241, 241, 241, 241, 241, 242, 242, 242, 243, 243,
- 244, 244, 245, 245, 246, 246, 247, 247, 248, 248,
- 249, 249, 250, 250, 251, 251, 251, 251, 251, 251,
- 251, 251, 251, 251, 251, 252, 252, 253, 254, 254,
- 254, 255, 256, 256, 257, 257, 258, 259, 259, 260,
- 260, 260, 260, 261, 261, 261, 261, 262, 263, 263,
- 263, 263, 263, 263, 263, 264, 264, 264, 264, 264,
- 264, 264, 264, 265, 265, 266, 267, 267, 268, 268,
- 269, 269, 269, 270, 271, 271, 271, 271, 271, 271,
- 271, 271, 272, 272, 272, 272, 272, 272, 272, 272,
- 272, 273, 273, 274, 274, 274, 275, 275, 275, 276,
- 276, 276, 276, 276, 276, 276, 276, 276, 276, 276,
- 276, 276, 276, 276, 276, 276, 276, 276, 276, 276,
- 276, 276, 276, 276, 276, 276, 276, 276, 276, 276,
- 276, 276, 276, 276, 276, 276, 276, 276, 276, 276,
- 276, 276, 276, 276, 276, 276, 276, 276, 276, 276,
- 277, 277, 277, 278, 278, 279, 279, 280, 281, 281,
- 282, 282, 283, 284, 285, 285, 286, 286, 286, 286,
- 286, 286, 286, 287, 287, 288, 288, 289, 289, 290,
- 290, 291, 291, 292, 293, 293, 294, 294, 295, 296,
- 296, 297, 297, 297, 298, 298, 299, 299, 300, 300,
- 301, 301, 301, 301, 301, 302, 302, 302, 303
+ 0, 220, 222, 221, 223, 223, 224, 224, 224, 224,
+ 224, 225, 225, 226, 226, 226, 227, 228, 228, 229,
+ 229, 230, 230, 230, 230, 230, 230, 231, 231, 231,
+ 231, 231, 231, 232, 233, 234, 234, 235, 235, 236,
+ 236, 237, 237, 238, 239, 239, 239, 240, 240, 241,
+ 241, 242, 242, 243, 244, 244, 244, 244, 245, 245,
+ 245, 245, 246, 246, 246, 246, 247, 247, 247, 248,
+ 248, 248, 249, 249, 249, 249, 249, 250, 250, 250,
+ 251, 251, 252, 252, 253, 253, 254, 254, 255, 255,
+ 256, 256, 257, 257, 258, 258, 259, 259, 259, 259,
+ 259, 259, 259, 259, 259, 259, 259, 260, 260, 261,
+ 262, 262, 262, 263, 264, 264, 265, 265, 266, 267,
+ 267, 268, 268, 268, 268, 269, 269, 269, 269, 270,
+ 271, 271, 271, 271, 271, 271, 271, 272, 272, 272,
+ 272, 272, 272, 272, 272, 273, 273, 274, 275, 275,
+ 276, 276, 277, 277, 277, 278, 279, 279, 279, 279,
+ 279, 279, 279, 279, 280, 280, 280, 280, 280, 280,
+ 280, 280, 280, 281, 281, 282, 282, 282, 283, 283,
+ 283, 284, 284, 284, 284, 284, 284, 284, 284, 284,
+ 284, 284, 284, 284, 284, 284, 284, 284, 284, 284,
+ 284, 284, 284, 284, 284, 284, 284, 284, 284, 284,
+ 284, 284, 284, 284, 284, 284, 284, 284, 284, 284,
+ 284, 284, 284, 284, 284, 284, 284, 284, 284, 284,
+ 284, 284, 285, 285, 285, 286, 286, 287, 287, 288,
+ 289, 289, 290, 290, 291, 292, 293, 293, 294, 294,
+ 294, 294, 294, 294, 294, 295, 296, 295, 297, 297,
+ 298, 298, 299, 299, 300, 300, 301, 302, 302, 303,
+ 303, 304, 305, 305, 306, 306, 306, 307, 307, 308,
+ 308, 309, 309, 310, 310, 310, 310, 310, 311, 311,
+ 311, 312
};
/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
static const yytype_uint8 yyr2[] =
{
0, 2, 0, 4, 0, 3, 2, 2, 2, 2,
- 0, 2, 5, 1, 2, 1, 1, 1, 1, 1,
- 1, 3, 1, 4, 1, 3, 2, 2, 1, 1,
- 1, 3, 2, 2, 2, 1, 2, 3, 2, 1,
- 1, 1, 1, 2, 2, 2, 1, 1, 1, 1,
- 1, 3, 3, 3, 1, 3, 3, 1, 3, 3,
- 1, 3, 3, 3, 3, 1, 3, 3, 1, 3,
+ 2, 0, 2, 1, 1, 1, 5, 1, 2, 1,
+ 1, 1, 1, 1, 1, 1, 3, 1, 4, 1,
+ 3, 2, 2, 1, 1, 1, 3, 2, 2, 2,
+ 1, 2, 3, 2, 1, 1, 1, 2, 2, 2,
+ 1, 2, 3, 2, 1, 2, 2, 2, 1, 1,
+ 1, 1, 1, 3, 3, 3, 1, 3, 3, 1,
+ 3, 3, 1, 3, 3, 3, 3, 1, 3, 3,
1, 3, 1, 3, 1, 3, 1, 3, 1, 3,
- 1, 5, 1, 3, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 3, 1, 2, 2,
- 4, 2, 1, 1, 2, 3, 3, 2, 5, 3,
- 2, 3, 2, 0, 1, 1, 1, 1, 1, 3,
- 5, 6, 7, 8, 5, 1, 2, 4, 5, 6,
- 7, 4, 2, 1, 2, 4, 1, 3, 1, 3,
- 1, 1, 1, 1, 1, 1, 2, 1, 2, 2,
- 3, 1, 1, 1, 1, 2, 1, 1, 2, 2,
- 1, 1, 2, 1, 3, 4, 1, 1, 1, 1,
+ 1, 3, 1, 5, 1, 3, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 3, 1,
+ 2, 2, 4, 2, 1, 1, 2, 3, 3, 2,
+ 5, 3, 2, 3, 2, 0, 1, 1, 1, 1,
+ 1, 3, 5, 6, 7, 8, 5, 1, 2, 4,
+ 5, 6, 7, 4, 2, 1, 2, 4, 1, 3,
+ 1, 3, 1, 1, 1, 1, 1, 1, 2, 1,
+ 2, 2, 3, 1, 1, 1, 1, 2, 1, 1,
+ 2, 2, 1, 1, 2, 1, 3, 4, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 5, 4, 1, 2, 3, 1, 3,
- 1, 4, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 2, 3, 1, 1, 2, 3, 1,
- 2, 1, 2, 5, 3, 1, 1, 4, 5, 3,
- 2, 5, 7, 6, 1, 1, 1, 0, 2, 3,
- 2, 2, 2, 3, 2, 1, 1, 1, 2
+ 1, 1, 1, 1, 1, 5, 4, 1, 2, 3,
+ 1, 3, 1, 4, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 2, 0, 4, 1, 1,
+ 2, 3, 1, 2, 1, 2, 5, 3, 1, 1,
+ 4, 5, 3, 2, 5, 7, 6, 1, 1, 1,
+ 0, 2, 3, 2, 2, 2, 3, 2, 1, 1,
+ 1, 2
};
/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
@@ -1017,614 +1036,621 @@ static const yytype_uint8 yyr2[] =
means the default is an error. */
static const yytype_uint16 yydefact[] =
{
- 4, 0, 0, 10, 0, 1, 2, 5, 0, 0,
- 11, 0, 153, 152, 173, 170, 171, 172, 177, 178,
- 179, 180, 181, 182, 183, 184, 185, 174, 175, 176,
- 0, 156, 157, 160, 154, 142, 141, 140, 186, 187,
- 188, 189, 190, 191, 192, 193, 194, 195, 196, 198,
- 199, 200, 201, 203, 204, 205, 206, 207, 208, 209,
- 210, 211, 212, 213, 214, 215, 216, 217, 218, 219,
- 0, 169, 168, 151, 222, 221, 220, 0, 0, 0,
- 0, 0, 0, 197, 202, 277, 3, 276, 0, 0,
- 103, 113, 0, 118, 125, 145, 147, 0, 144, 133,
- 161, 163, 166, 0, 167, 13, 275, 0, 158, 159,
- 155, 0, 0, 132, 0, 149, 0, 6, 7, 8,
- 9, 0, 14, 98, 0, 278, 101, 113, 143, 114,
- 115, 116, 104, 0, 113, 0, 99, 126, 146, 148,
- 134, 0, 162, 0, 0, 0, 0, 225, 150, 0,
- 138, 0, 136, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 15, 19, 17, 18, 20, 41,
- 0, 0, 0, 46, 47, 48, 49, 251, 0, 247,
- 16, 22, 42, 24, 29, 30, 0, 0, 35, 0,
- 50, 0, 54, 57, 60, 65, 68, 70, 72, 74,
- 76, 78, 80, 82, 95, 0, 233, 0, 133, 236,
- 249, 235, 234, 0, 237, 238, 239, 240, 241, 242,
- 105, 110, 112, 117, 0, 119, 106, 0, 0, 164,
- 50, 97, 0, 39, 12, 0, 230, 0, 228, 224,
- 226, 100, 0, 135, 0, 271, 270, 0, 0, 0,
- 274, 272, 0, 0, 0, 260, 0, 43, 44, 0,
- 243, 0, 26, 27, 0, 0, 33, 32, 0, 169,
- 36, 38, 85, 86, 88, 87, 90, 91, 92, 93,
- 94, 89, 84, 0, 45, 0, 0, 0, 0, 0,
+ 4, 0, 0, 11, 0, 1, 2, 5, 0, 0,
+ 12, 13, 14, 15, 0, 165, 164, 185, 182, 183,
+ 184, 189, 190, 191, 192, 193, 194, 195, 196, 197,
+ 186, 187, 188, 0, 168, 169, 172, 166, 154, 153,
+ 152, 198, 199, 200, 201, 202, 203, 204, 205, 206,
+ 207, 208, 210, 211, 212, 213, 215, 216, 217, 218,
+ 219, 220, 221, 222, 223, 224, 225, 226, 227, 228,
+ 229, 230, 231, 0, 181, 180, 163, 234, 233, 232,
+ 0, 0, 0, 0, 0, 0, 0, 209, 214, 290,
+ 3, 289, 0, 0, 115, 125, 0, 130, 137, 157,
+ 159, 0, 156, 145, 173, 175, 178, 0, 179, 17,
+ 288, 0, 170, 171, 167, 0, 0, 19, 20, 144,
+ 0, 161, 0, 6, 7, 8, 9, 10, 0, 18,
+ 110, 0, 291, 113, 125, 155, 126, 127, 128, 116,
+ 0, 125, 0, 111, 13, 15, 138, 0, 158, 160,
+ 146, 0, 174, 0, 0, 0, 237, 0, 162, 0,
+ 150, 0, 148, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 24, 22, 23, 25, 46, 0,
+ 0, 0, 58, 59, 60, 61, 264, 256, 260, 21,
+ 27, 54, 29, 34, 35, 0, 0, 40, 0, 62,
+ 0, 66, 69, 72, 77, 80, 82, 84, 86, 88,
+ 90, 92, 94, 107, 0, 245, 0, 145, 248, 262,
+ 247, 246, 0, 249, 250, 251, 252, 253, 254, 117,
+ 122, 124, 129, 0, 131, 0, 0, 118, 176, 62,
+ 109, 0, 44, 16, 242, 0, 240, 236, 238, 0,
+ 112, 0, 147, 0, 284, 283, 0, 0, 0, 287,
+ 285, 0, 0, 0, 273, 0, 55, 56, 0, 255,
+ 0, 31, 32, 0, 0, 38, 37, 0, 181, 41,
+ 43, 97, 98, 100, 99, 102, 103, 104, 105, 106,
+ 101, 96, 0, 57, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 252, 248, 250, 107,
- 109, 111, 0, 0, 127, 0, 232, 131, 165, 223,
- 0, 0, 227, 139, 137, 0, 265, 264, 267, 0,
- 273, 0, 259, 151, 256, 0, 0, 21, 244, 0,
- 28, 25, 31, 37, 83, 51, 52, 53, 55, 56,
- 58, 59, 63, 64, 61, 62, 66, 67, 69, 71,
- 73, 75, 77, 79, 0, 96, 0, 120, 0, 124,
- 0, 128, 0, 229, 0, 266, 0, 0, 0, 0,
- 0, 0, 23, 0, 0, 0, 121, 129, 0, 231,
- 0, 268, 0, 255, 253, 258, 0, 246, 261, 245,
- 81, 108, 122, 0, 130, 0, 269, 263, 0, 257,
- 123, 262, 254
+ 0, 0, 0, 0, 0, 265, 261, 263, 119, 121,
+ 123, 0, 0, 139, 0, 244, 143, 177, 0, 0,
+ 239, 235, 151, 149, 0, 278, 277, 280, 0, 286,
+ 0, 272, 163, 269, 0, 0, 26, 0, 0, 33,
+ 30, 0, 36, 0, 0, 50, 42, 95, 63, 64,
+ 65, 67, 68, 70, 71, 75, 76, 73, 74, 78,
+ 79, 81, 83, 85, 87, 89, 91, 0, 108, 0,
+ 132, 0, 136, 0, 140, 0, 241, 0, 279, 0,
+ 0, 0, 0, 0, 0, 257, 28, 53, 48, 47,
+ 0, 181, 51, 0, 0, 0, 133, 141, 0, 243,
+ 0, 281, 0, 268, 266, 271, 0, 259, 274, 258,
+ 52, 93, 120, 134, 0, 142, 0, 282, 276, 0,
+ 270, 135, 275, 267
};
/* YYDEFGOTO[NTERM-NUM]. */
static const yytype_int16 yydefgoto[] =
{
- -1, 2, 9, 3, 85, 6, 10, 86, 180, 181,
- 182, 339, 183, 184, 185, 186, 187, 188, 189, 190,
- 191, 192, 193, 194, 195, 196, 197, 198, 199, 200,
- 201, 202, 203, 204, 283, 205, 232, 206, 207, 89,
- 90, 91, 221, 132, 133, 222, 92, 93, 94, 95,
- 151, 152, 96, 134, 97, 98, 233, 100, 101, 102,
- 103, 104, 146, 147, 237, 238, 317, 209, 210, 211,
- 212, 398, 399, 213, 214, 215, 394, 336, 216, 217,
- 218, 328, 376, 377, 219, 105, 106
+ -1, 2, 9, 3, 89, 6, 160, 10, 90, 189,
+ 190, 191, 348, 192, 193, 194, 195, 196, 197, 198,
+ 352, 353, 354, 355, 199, 200, 201, 202, 203, 204,
+ 205, 206, 207, 208, 209, 210, 211, 212, 213, 292,
+ 214, 241, 215, 216, 93, 94, 95, 230, 139, 140,
+ 231, 96, 97, 98, 99, 161, 162, 100, 141, 101,
+ 102, 242, 104, 105, 106, 107, 108, 155, 156, 245,
+ 246, 326, 218, 219, 220, 221, 270, 418, 419, 222,
+ 223, 224, 414, 345, 225, 226, 227, 337, 389, 390,
+ 228, 109, 110
};
/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
STATE-NUM. */
-#define YYPACT_NINF -350
+#define YYPACT_NINF -366
static const yytype_int16 yypact[] =
{
- -78, -56, 54, -350, -52, -350, -37, -350, 8, 3302,
- -350, -26, -350, -350, -350, -350, -350, -350, -350, -350,
- -350, -350, -350, -350, -350, -350, -350, -350, -350, -350,
- 88, -350, -350, -350, -350, -350, -350, -350, -350, -350,
- -350, -350, -350, -350, -350, -350, -350, -350, -350, -350,
- -350, -350, -350, -350, -350, -350, -350, -350, -350, -350,
- -350, -350, -350, -350, -350, -350, -350, -350, -350, -350,
- -66, -350, -350, 42, -350, -350, -350, 70, -4, 10,
- 29, 34, -79, -350, -350, -350, 3302, -350, -19, -24,
- -69, 5, -154, -350, 102, 16, 16, 3490, -350, -350,
- -350, 18, -350, 3562, -350, -350, -350, 108, -350, -350,
- -350, -8, 3490, -350, 16, -350, 3562, -350, -350, -350,
- -350, 138, -350, -350, 387, -350, -350, 24, -350, -350,
- -350, -350, -350, 3490, 147, 141, -350, -166, -350, -350,
- -350, 2387, -350, 106, 3490, 144, 1772, -350, -350, 7,
- 11, -87, -350, 14, 15, 1243, 30, 32, 20, 2004,
- 37, 2936, 25, 39, -65, -350, -350, -350, -350, -350,
- 2936, 2936, 2936, -350, -350, -350, -350, -350, 601, -350,
- -350, -350, -59, -350, -350, -350, 28, -82, 3119, 43,
- -30, 2936, -11, -2, 118, -74, 114, 35, 31, 36,
- 148, 152, -77, -350, -350, -115, -350, 40, 52, -350,
- -350, -350, -350, 815, -350, -350, -350, -350, -350, -350,
- -350, -350, -350, 172, 3490, -180, -350, 2570, 2936, -350,
- -350, -350, 53, -350, -350, 1888, 55, -113, -350, -350,
- -350, -350, 173, -350, 138, -350, -350, 178, 1656, 2936,
- -350, -350, -108, 2936, -161, -350, 2204, -350, -350, -68,
- -350, 1029, -350, -350, 2936, 3418, -350, -350, 2936, 61,
- -350, -350, -350, -350, -350, -350, -350, -350, -350, -350,
- -350, -350, -350, 2936, -350, 2936, 2936, 2936, 2936, 2936,
- 2936, 2936, 2936, 2936, 2936, 2936, 2936, 2936, 2936, 2936,
- 2936, 2936, 2936, 2936, 2936, 2936, -350, -350, -350, 63,
- -350, -350, 2753, 2936, 46, 60, -350, -350, -350, -350,
- 2936, 144, -350, -350, -350, 67, -350, -350, 2204, -55,
- -350, -54, -350, 238, 65, 188, 71, -350, -350, 72,
- 65, 73, -350, -350, -350, -350, -350, -350, -11, -11,
- -2, -2, 118, 118, 118, 118, -74, -74, 114, 35,
- 31, 36, 148, 152, -157, -350, 2936, 56, 83, -350,
- 2936, 68, 84, -350, 2936, -350, 69, 90, 1243, 74,
- 77, 1456, -350, 2936, 86, 2936, 79, -350, 2936, -350,
- -53, 2936, 1456, 255, -350, -350, 2936, -350, -350, -350,
- -350, -350, -350, 2936, -350, 80, 65, -350, 1243, -350,
- -350, -350, -350
+ -57, -43, 62, -366, -50, -366, -30, -366, 67, 3341,
+ -366, -366, -366, -366, -6, -366, -366, -366, -366, -366,
+ -366, -366, -366, -366, -366, -366, -366, -366, -366, -366,
+ -366, -366, -366, 8, -366, -366, -366, -366, -366, -366,
+ -366, -366, -366, -366, -366, -366, -366, -366, -366, -366,
+ -366, -366, -366, -366, -366, -366, -366, -366, -366, -366,
+ -366, -366, -366, -366, -366, -366, -366, -366, -366, -366,
+ -366, -366, -366, -65, -366, -366, 226, -366, -366, -366,
+ 51, -31, -28, 6, 13, 15, -44, -366, -366, -366,
+ 3341, -366, -183, -47, -29, 18, -169, -366, 140, 24,
+ 24, 3460, -366, -366, -366, -24, -366, 3533, -366, -366,
+ -366, 67, -366, -366, -366, 3460, -48, -366, -366, -366,
+ 24, -366, 3533, -366, -366, -366, -366, -366, 67, -366,
+ -366, 408, -366, -366, 55, -366, -366, -366, -366, -366,
+ 3460, 200, 67, -366, -20, -18, -178, 23, -366, -366,
+ -366, 2225, -366, 72, 67, 1598, -366, 3460, -366, 4,
+ 10, -84, -366, 11, 14, 1059, 40, 42, 29, 1836,
+ 43, 2783, 34, 54, -366, -366, -366, -366, -366, 2783,
+ 2783, 2783, -366, -366, -366, -366, -366, 32, -366, 56,
+ -366, -71, -366, -366, -366, 57, -81, 2969, 61, -27,
+ 2783, 35, -88, -41, -70, 33, 60, 41, 59, 181,
+ 180, -89, -366, -366, -168, -366, 58, 80, -366, -366,
+ -366, -366, 625, -366, -366, -366, -366, -366, -366, -366,
+ -366, -366, 67, 3460, -177, 2411, 2783, -366, -366, -366,
+ -366, 78, -366, -366, 81, -137, -366, -366, -366, 1717,
+ -366, 201, -366, 67, -366, -366, 205, 1478, 2783, -366,
+ -366, -134, 2783, -115, -366, 2039, -366, -366, -60, -366,
+ 1059, -366, -366, 2783, 140, -366, -366, 2783, 85, -366,
+ -366, -366, -366, -366, -366, -366, -366, -366, -366, -366,
+ -366, -366, 2783, -366, 2783, 2783, 2783, 2783, 2783, 2783,
+ 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783,
+ 2783, 2783, 2783, 2783, 2783, -366, -366, -366, 86, -366,
+ -366, 2597, 2783, 69, 87, -366, -366, -366, 2783, 67,
+ -366, -366, -366, -366, 91, -366, -366, 2039, -59, -366,
+ -46, -366, 129, 88, 67, 93, -366, 842, 89, 88,
+ -366, 95, -366, 96, -37, 3155, -366, -366, -366, -366,
+ -366, 35, 35, -88, -88, -41, -41, -41, -41, -70,
+ -70, 33, 60, 41, 59, 181, 180, -96, -366, 2783,
+ 76, 97, -366, 2783, 79, 98, -366, 2783, -366, 77,
+ 101, 1059, 83, 90, 1275, -366, -366, -366, -366, -366,
+ 2783, 102, -366, 2783, 108, 2783, 94, -366, 2783, -366,
+ -26, 2783, 1275, 297, -366, -366, 2783, -366, -366, -366,
+ -366, -366, -366, -366, 2783, -366, 100, 88, -366, 1059,
+ -366, -366, -366, -366
};
/* YYPGOTO[NTERM-NUM]. */
static const yytype_int16 yypgoto[] =
{
- -350, -350, -350, -350, -350, -350, -350, -350, -350, -350,
- -350, -350, -350, -350, 22, -350, -350, -350, -350, -135,
- -350, -83, -81, -104, -85, -13, -6, -5, -3, -1,
- -7, -350, -133, -97, -350, -156, -193, 9, 12, -350,
- -350, -350, 76, 170, 168, 81, -350, -350, -239, -350,
- -350, 59, -71, -350, -350, -72, -9, 1, -350, -350,
- 227, -350, 163, -139, -350, -12, -283, 62, -151, -349,
- -67, -84, 223, 135, 66, -350, -350, -10, -350, -350,
- -350, -350, -350, -350, -350, 229, -350
+ -366, -366, -366, -366, -366, -366, -7, -366, -366, -62,
+ -366, -366, -366, -366, -366, -366, -366, -366, -366, -366,
+ -366, -366, -366, -366, -101, -366, -113, -109, -121, -61,
+ 5, 3, 9, 16, 2, 7, -366, -142, -100, -366,
+ -164, -225, 21, 22, -366, -366, -366, 82, 186, 173,
+ 92, -366, -366, -242, -366, -366, 68, -73, -366, -366,
+ -74, -9, -67, -366, -366, 243, -366, 170, -147, -366,
+ 0, -298, 73, -159, -365, -58, -366, -80, 239, 63,
+ 84, -366, -366, -2, -366, -366, -366, -366, -366, -366,
+ -366, 246, -366
};
/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
positive, shift that token. If negative, reduce the rule which
number is the opposite. If zero, do what YYDEFACT says.
If YYTABLE_NINF, syntax error. */
-#define YYTABLE_NINF -169
+#define YYTABLE_NINF -115
static const yytype_int16 yytable[] =
{
- 99, 115, 114, 252, 247, 254, 230, 240, 231, 128,
- 111, -168, 292, 293, 303, 312, 259, 335, 87, 12,
- 13, 88, 4, 138, 139, 262, 263, 226, 128, 227,
- 369, 1, 397, 313, 315, 257, 258, 305, 129, 130,
- 131, 305, 148, 397, 135, 12, 13, 228, 30, 31,
- 32, 332, 33, 34, 5, 383, 284, 129, 130, 131,
- 136, 7, 308, 272, 273, 274, 275, 276, 277, 278,
- 279, 280, 281, 8, 30, 31, 32, 99, 33, 34,
- 35, 36, 37, 305, 11, 321, 107, 387, 140, 335,
- 305, 270, 230, 329, 231, 87, 240, 331, 88, 306,
- 334, 322, 402, 145, 142, 404, 330, 243, 340, 117,
- 308, 244, 267, 409, 121, 208, 268, 149, 113, 368,
- 410, 108, 109, 118, 223, 110, 337, 372, -40, 127,
- 305, 316, 294, 295, 304, 145, 264, 145, 265, 378,
- 379, 405, 119, 305, 305, 305, 208, 120, 364, 112,
- 345, 346, 347, 230, 230, 230, 230, 230, 230, 230,
- 230, 230, 230, 230, 230, 230, 230, 230, 230, 208,
- 126, 343, 334, 384, 74, 75, 76, 230, 137, 231,
- 129, 130, 131, 282, 143, 230, 344, 231, 352, 353,
- 354, 355, 285, 286, 287, 123, 124, 288, 289, -102,
- 290, 291, 296, 297, 208, 348, 349, 144, 365, 350,
- 351, 356, 357, 141, 150, 223, 316, 225, 390, 234,
- 236, 241, 266, 248, 242, 249, 145, 393, 245, 246,
- 253, 230, 256, 231, 250, 406, 271, 255, 301, 208,
- 299, 12, 13, 298, 302, -39, 300, 208, 309, 318,
- 320, 323, 208, 325, 123, -34, 371, 412, 366, 370,
- 374, 115, 114, 305, 380, 381, -40, 408, 382, 385,
- 30, 31, 32, 316, 33, 34, 35, 36, 37, 386,
- 389, 388, 401, 391, 392, 358, 400, 342, 316, 178,
- 396, 316, 403, 359, 411, 360, 363, 220, 361, 316,
- 310, 362, 224, 324, 116, 311, 316, 235, 407, 373,
- 326, 125, 395, 261, 327, 122, 0, 0, 375, 208,
+ 103, 14, 121, 120, 312, 261, 256, 263, 248, 240,
+ 324, 11, 12, 13, 119, 271, 272, 268, 301, 302,
+ 235, 321, 135, 344, 382, 148, 149, 15, 16, 417,
+ 91, 92, 142, 314, 130, 131, 147, 4, 236, 322,
+ 152, 112, 113, 299, 300, 114, 158, 417, 143, 315,
+ 239, 136, 137, 138, 1, 159, 33, 34, 35, 135,
+ 36, 37, 5, 317, 329, 7, 116, 314, 281, 282,
+ 283, 284, 285, 286, 287, 288, 289, 290, 266, 267,
+ 330, 103, 8, 339, 123, 407, 314, 124, 136, 137,
+ 138, 146, 150, 240, 338, 344, 381, 279, 340, 293,
+ 341, 343, 248, 385, 153, 314, 154, 423, 111, 349,
+ 425, 91, 92, 252, 297, 298, 276, 253, 430, 403,
+ 277, 125, 217, 305, 306, 313, 431, 273, 126, 274,
+ 127, 232, 15, 16, 239, 234, 325, 346, 391, 303,
+ 304, 314, 314, 11, 12, 13, 154, 244, 154, 377,
+ 133, 392, 128, 115, 404, 314, 217, 77, 78, 79,
+ 399, 33, 34, 35, 400, 36, 37, 38, 39, 40,
+ 157, 426, 134, 343, 151, 314, -19, 356, -20, 240,
+ 365, 366, 367, 368, 361, 362, 240, 243, 317, 291,
+ 363, 364, 357, 358, 359, 360, 239, 239, 239, 239,
+ 239, 239, 239, 239, 239, 239, 239, 239, 239, 239,
+ 239, 239, 351, 217, 378, -114, 144, 12, 145, 237,
+ 239, 250, 325, 410, 232, 318, 251, 239, 254, 15,
+ 16, 255, 413, 136, 137, 138, 257, 240, 258, 262,
+ 154, 294, 295, 296, 369, 370, 259, 427, 217, 264,
+ 265, 269, -45, 308, 275, 402, 217, 280, 33, 34,
+ 35, 217, 36, 37, 38, 39, 40, 350, 121, 120,
+ 433, 307, 309, 310, 311, 130, -44, 327, 239, 328,
+ 334, 332, -39, 325, 379, 383, 384, 387, 396, 314,
+ 394, 397, 405, 398, 411, 408, 406, 409, 412, -49,
+ 420, 187, 117, 421, 118, 325, 416, 422, 325, 429,
+ 424, 372, 371, 375, 233, 319, 325, 432, 373, 376,
+ 229, 333, 244, 122, 325, 320, 374, 249, 217, 386,
+ 335, 132, 428, 347, 415, 388, 129, 393, 217, 0,
+ 0, 336, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 217, 0, 0, 217, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 208,
- 0, 0, 208, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 208, 0, 0, 0, 0, 0, 0,
- 12, 13, 14, 15, 16, 17, 153, 154, 155, 208,
- 156, 157, 158, 159, 160, 161, 162, 18, 19, 20,
- 21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
- 31, 32, 0, 33, 34, 35, 36, 37, 38, 39,
- 40, 41, 42, 43, 44, 45, 46, 47, 48, 49,
- 50, 51, 52, 53, 54, 55, 56, 57, 58, 59,
- 60, 61, 62, 63, 64, 65, 66, 67, 68, 69,
- 70, 71, 163, 164, 165, 166, 167, 168, 169, 0,
- 0, 170, 171, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 217, 0, 0, 0, 0, 0, 0,
+ 0, 15, 16, 17, 18, 19, 20, 163, 164, 165,
+ 217, 166, 167, 168, 169, 170, 171, 172, 21, 22,
+ 23, 24, 25, 26, 27, 28, 29, 30, 31, 32,
+ 33, 34, 35, 0, 36, 37, 38, 39, 40, 41,
+ 42, 43, 44, 45, 46, 47, 48, 49, 50, 51,
+ 52, 53, 54, 55, 56, 57, 58, 59, 60, 61,
+ 62, 63, 64, 65, 66, 67, 68, 69, 70, 71,
+ 72, 73, 74, 173, 117, 75, 118, 174, 175, 176,
+ 177, 178, 0, 0, 179, 180, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 73, 74, 75, 76, 0, 77, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 82, 0, 0,
+ 0, 0, 0, 76, 77, 78, 79, 0, 80, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 86, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 83, 0, 84, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 87, 0, 88, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 172, 0, 0, 0, 0, 0, 173, 174, 175, 176,
+ 0, 0, 0, 0, 181, 0, 0, 0, 0, 0,
+ 182, 183, 184, 185, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 186, 187, 188, 15, 16,
+ 17, 18, 19, 20, 163, 164, 165, 0, 166, 167,
+ 168, 169, 170, 171, 172, 21, 22, 23, 24, 25,
+ 26, 27, 28, 29, 30, 31, 32, 33, 34, 35,
+ 0, 36, 37, 38, 39, 40, 41, 42, 43, 44,
+ 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
+ 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
+ 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
+ 173, 117, 75, 118, 174, 175, 176, 177, 178, 0,
+ 0, 179, 180, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 177, 178, 179, 12, 13, 14, 15, 16, 17,
- 153, 154, 155, 0, 156, 157, 158, 159, 160, 161,
- 162, 18, 19, 20, 21, 22, 23, 24, 25, 26,
- 27, 28, 29, 30, 31, 32, 0, 33, 34, 35,
- 36, 37, 38, 39, 40, 41, 42, 43, 44, 45,
- 46, 47, 48, 49, 50, 51, 52, 53, 54, 55,
- 56, 57, 58, 59, 60, 61, 62, 63, 64, 65,
- 66, 67, 68, 69, 70, 71, 163, 164, 165, 166,
- 167, 168, 169, 0, 0, 170, 171, 0, 0, 0,
+ 76, 77, 78, 79, 0, 80, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 86, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 73, 74, 75, 76, 0, 77,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 82, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 87, 0, 88, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 83, 0, 84, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 181, 0, 0, 0, 0, 0, 182, 183, 184,
+ 185, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 186, 187, 316, 15, 16, 17, 18, 19,
+ 20, 163, 164, 165, 0, 166, 167, 168, 169, 170,
+ 171, 172, 21, 22, 23, 24, 25, 26, 27, 28,
+ 29, 30, 31, 32, 33, 34, 35, 0, 36, 37,
+ 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
+ 48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
+ 58, 59, 60, 61, 62, 63, 64, 65, 66, 67,
+ 68, 69, 70, 71, 72, 73, 74, 173, 117, 75,
+ 118, 174, 175, 176, 177, 178, 0, 0, 179, 180,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 172, 0, 0, 0, 0, 0,
- 173, 174, 175, 176, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 177, 178, 260, 12, 13,
- 14, 15, 16, 17, 153, 154, 155, 0, 156, 157,
- 158, 159, 160, 161, 162, 18, 19, 20, 21, 22,
- 23, 24, 25, 26, 27, 28, 29, 30, 31, 32,
- 0, 33, 34, 35, 36, 37, 38, 39, 40, 41,
- 42, 43, 44, 45, 46, 47, 48, 49, 50, 51,
- 52, 53, 54, 55, 56, 57, 58, 59, 60, 61,
- 62, 63, 64, 65, 66, 67, 68, 69, 70, 71,
- 163, 164, 165, 166, 167, 168, 169, 0, 0, 170,
- 171, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 73, 74,
- 75, 76, 0, 77, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 82, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 76, 77, 78,
+ 79, 0, 80, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 86, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 83,
- 0, 84, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 87,
+ 0, 88, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 172, 0,
- 0, 0, 0, 0, 173, 174, 175, 176, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 177,
- 178, 307, 12, 13, 14, 15, 16, 17, 153, 154,
- 155, 0, 156, 157, 158, 159, 160, 161, 162, 18,
- 19, 20, 21, 22, 23, 24, 25, 26, 27, 28,
- 29, 30, 31, 32, 0, 33, 34, 35, 36, 37,
- 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
- 48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
- 58, 59, 60, 61, 62, 63, 64, 65, 66, 67,
- 68, 69, 70, 71, 163, 164, 165, 166, 167, 168,
- 169, 0, 0, 170, 171, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 181, 0,
+ 0, 0, 0, 0, 182, 183, 184, 185, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 186,
+ 187, 395, 15, 16, 17, 18, 19, 20, 163, 164,
+ 165, 0, 166, 167, 168, 169, 170, 171, 172, 21,
+ 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
+ 32, 33, 34, 35, 0, 36, 37, 38, 39, 40,
+ 41, 42, 43, 44, 45, 46, 47, 48, 49, 50,
+ 51, 52, 53, 54, 55, 56, 57, 58, 59, 60,
+ 61, 62, 63, 64, 65, 66, 67, 68, 69, 70,
+ 71, 72, 73, 74, 173, 117, 75, 118, 174, 175,
+ 176, 177, 178, 0, 0, 179, 180, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 73, 74, 75, 76, 0, 77, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 82,
+ 0, 0, 0, 0, 76, 77, 78, 79, 0, 80,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 86, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 83, 0, 84, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 87, 0, 88, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 172, 0, 0, 0, 0, 0, 173, 174,
- 175, 176, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 177, 178, 338, 12, 13, 14, 15,
- 16, 17, 153, 154, 155, 0, 156, 157, 158, 159,
- 160, 161, 162, 18, 19, 20, 21, 22, 23, 24,
- 25, 26, 27, 28, 29, 30, 31, 32, 0, 33,
- 34, 35, 36, 37, 38, 39, 40, 41, 42, 43,
- 44, 45, 46, 47, 48, 49, 50, 51, 52, 53,
- 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
- 64, 65, 66, 67, 68, 69, 70, 71, 163, 164,
- 165, 166, 167, 168, 169, 0, 0, 170, 171, 0,
+ 0, 0, 0, 0, 0, 181, 0, 0, 0, 0,
+ 0, 182, 183, 184, 185, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 186, 187, 15, 16,
+ 17, 18, 19, 20, 163, 164, 165, 0, 166, 167,
+ 168, 169, 170, 171, 172, 21, 22, 23, 24, 25,
+ 26, 27, 28, 29, 30, 31, 32, 33, 34, 35,
+ 0, 36, 37, 38, 39, 40, 41, 42, 43, 44,
+ 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
+ 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
+ 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
+ 173, 117, 75, 118, 174, 175, 176, 177, 178, 0,
+ 0, 179, 180, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 73, 74, 75, 76,
- 0, 77, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 82, 0, 0, 0, 0, 0, 0,
+ 76, 77, 78, 79, 0, 80, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 86, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 83, 0, 84,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 87, 0, 88, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 172, 0, 0, 0,
- 0, 0, 173, 174, 175, 176, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 177, 178, 12,
- 13, 14, 15, 16, 17, 153, 154, 155, 0, 156,
- 157, 158, 159, 160, 161, 162, 18, 19, 20, 21,
- 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
- 32, 0, 33, 34, 35, 36, 37, 38, 39, 40,
- 41, 42, 43, 44, 45, 46, 47, 48, 49, 50,
- 51, 52, 53, 54, 55, 56, 57, 58, 59, 60,
- 61, 62, 63, 64, 65, 66, 67, 68, 69, 70,
- 71, 163, 164, 165, 166, 167, 168, 169, 0, 0,
- 170, 171, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 73,
- 74, 75, 76, 0, 77, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 82, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 181, 0, 0, 0, 0, 0, 182, 183, 184,
+ 185, 15, 16, 17, 18, 19, 20, 0, 0, 0,
+ 0, 0, 186, 131, 0, 0, 0, 0, 21, 22,
+ 23, 24, 25, 26, 27, 28, 29, 30, 31, 32,
+ 33, 34, 35, 0, 36, 37, 38, 39, 40, 41,
+ 42, 43, 44, 45, 46, 47, 48, 49, 50, 51,
+ 52, 53, 54, 55, 56, 57, 58, 59, 60, 61,
+ 62, 63, 64, 65, 66, 67, 68, 69, 70, 71,
+ 72, 73, 74, 0, 117, 75, 118, 174, 175, 176,
+ 177, 178, 0, 0, 179, 180, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 76, 77, 78, 79, 0, 80, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 83, 0, 84, 0, 0, 0, 0, 0, 0, 0,
+ 0, 86, 0, 17, 18, 19, 20, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 21, 22,
+ 23, 24, 25, 26, 27, 28, 29, 30, 31, 32,
+ 0, 0, 0, 0, 0, 87, 0, 88, 0, 41,
+ 42, 43, 44, 45, 46, 47, 48, 49, 50, 51,
+ 52, 53, 54, 55, 56, 57, 58, 59, 60, 61,
+ 62, 63, 64, 65, 66, 67, 68, 69, 70, 71,
+ 72, 73, 74, 0, 181, 75, 0, 0, 0, 0,
+ 182, 183, 184, 185, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 186, 0, 0, 0, 0,
+ 0, 0, 0, 0, 77, 78, 79, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 17, 18, 19, 20, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 21, 22, 23,
+ 24, 25, 26, 27, 28, 29, 30, 31, 32, 0,
+ 0, 0, 0, 0, 0, 87, 0, 88, 41, 42,
+ 43, 44, 45, 46, 47, 48, 49, 50, 51, 52,
+ 53, 54, 55, 56, 57, 58, 59, 60, 61, 62,
+ 63, 64, 65, 66, 67, 68, 69, 70, 71, 72,
+ 73, 74, 0, 0, 75, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 247, 0, 0,
+ 0, 0, 0, 77, 78, 79, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 17, 18, 19, 20, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 21, 22, 23, 24,
+ 25, 26, 27, 28, 29, 30, 31, 32, 0, 0,
+ 0, 0, 0, 0, 87, 0, 88, 41, 42, 43,
+ 44, 45, 46, 47, 48, 49, 50, 51, 52, 53,
+ 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
+ 64, 65, 66, 67, 68, 69, 70, 71, 72, 73,
+ 74, 0, 117, 75, 118, 174, 175, 176, 177, 178,
+ 0, 0, 179, 180, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 331, 0, 0, 0,
+ 0, 0, 77, 78, 79, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 172,
- 0, 0, 0, 0, 0, 173, 174, 175, 176, 12,
- 13, 14, 15, 16, 17, 0, 0, 0, 0, 0,
- 177, 124, 0, 0, 0, 0, 18, 19, 20, 21,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 87, 0, 88, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 181, 0, 0, 0, 0, 0, 182, 183,
+ 184, 185, 15, 16, 17, 18, 19, 20, 0, 0,
+ 0, 0, 0, 260, 0, 0, 0, 0, 0, 21,
22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
- 32, 0, 33, 34, 35, 36, 37, 38, 39, 40,
+ 32, 33, 34, 35, 0, 36, 37, 38, 39, 40,
41, 42, 43, 44, 45, 46, 47, 48, 49, 50,
51, 52, 53, 54, 55, 56, 57, 58, 59, 60,
61, 62, 63, 64, 65, 66, 67, 68, 69, 70,
- 71, 0, 164, 165, 166, 167, 168, 169, 0, 0,
- 170, 171, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 73,
- 74, 75, 76, 0, 77, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 82, 14, 15, 16,
- 17, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 18, 19, 20, 21, 22, 23, 24, 25,
- 26, 27, 28, 29, 0, 0, 0, 0, 0, 0,
- 83, 0, 84, 38, 39, 40, 41, 42, 43, 44,
- 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
- 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
- 65, 66, 67, 68, 69, 70, 71, 0, 72, 172,
- 0, 0, 0, 0, 0, 173, 174, 175, 176, 0,
+ 71, 72, 73, 74, 0, 117, 75, 118, 174, 175,
+ 176, 177, 178, 0, 0, 179, 180, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 177, 0, 0, 0, 0, 0, 74, 75, 76, 0,
+ 0, 0, 0, 0, 342, 77, 78, 79, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 14, 15, 16, 17, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 18, 19,
- 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
- 0, 0, 0, 0, 0, 0, 83, 0, 84, 38,
- 39, 40, 41, 42, 43, 44, 45, 46, 47, 48,
- 49, 50, 51, 52, 53, 54, 55, 56, 57, 58,
- 59, 60, 61, 62, 63, 64, 65, 66, 67, 68,
- 69, 70, 71, 0, 72, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 239, 0,
- 0, 0, 74, 75, 76, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 14,
- 15, 16, 17, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 18, 19, 20, 21, 22, 23,
- 24, 25, 26, 27, 28, 29, 0, 0, 0, 0,
- 0, 0, 83, 0, 84, 38, 39, 40, 41, 42,
- 43, 44, 45, 46, 47, 48, 49, 50, 51, 52,
- 53, 54, 55, 56, 57, 58, 59, 60, 61, 62,
- 63, 64, 65, 66, 67, 68, 69, 70, 71, 0,
- 164, 165, 166, 167, 168, 169, 0, 0, 170, 171,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 319, 0, 0, 0, 74, 75,
- 76, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 86, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 87, 0, 88, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 83, 0,
- 84, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 172, 0, 0,
- 0, 0, 0, 173, 174, 175, 176, 12, 13, 14,
- 15, 16, 17, 0, 0, 0, 0, 0, 251, 0,
- 0, 0, 0, 0, 18, 19, 20, 21, 22, 23,
- 24, 25, 26, 27, 28, 29, 30, 31, 32, 0,
- 33, 34, 35, 36, 37, 38, 39, 40, 41, 42,
- 43, 44, 45, 46, 47, 48, 49, 50, 51, 52,
- 53, 54, 55, 56, 57, 58, 59, 60, 61, 62,
- 63, 64, 65, 66, 67, 68, 69, 70, 71, 0,
- 164, 165, 166, 167, 168, 169, 0, 0, 170, 171,
+ 17, 18, 19, 20, 0, 181, 0, 0, 0, 0,
+ 0, 182, 183, 184, 185, 21, 22, 23, 24, 25,
+ 26, 27, 28, 29, 30, 31, 32, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 41, 42, 43, 44,
+ 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
+ 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
+ 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
+ 0, 117, 75, 118, 174, 175, 176, 177, 178, 0,
+ 0, 179, 180, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 333, 74, 75,
- 76, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 82, 0, 0, 0, 0, 0,
+ 0, 77, 78, 79, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 83, 0,
- 84, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 14, 15, 16, 17, 0, 172, 0, 0,
- 0, 0, 0, 173, 174, 175, 176, 18, 19, 20,
- 21, 22, 23, 24, 25, 26, 27, 28, 29, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 38, 39,
- 40, 41, 42, 43, 44, 45, 46, 47, 48, 49,
- 50, 51, 52, 53, 54, 55, 56, 57, 58, 59,
- 60, 61, 62, 63, 64, 65, 66, 67, 68, 69,
- 70, 71, 0, 164, 165, 166, 167, 168, 169, 0,
- 0, 170, 171, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 87, 0, 88, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 74, 75, 76, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 17, 18, 19, 20,
+ 0, 181, 0, 0, 238, 0, 0, 182, 183, 184,
+ 185, 21, 22, 23, 24, 25, 26, 27, 28, 29,
+ 30, 31, 32, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 41, 42, 43, 44, 45, 46, 47, 48,
+ 49, 50, 51, 52, 53, 54, 55, 56, 57, 58,
+ 59, 60, 61, 62, 63, 64, 65, 66, 67, 68,
+ 69, 70, 71, 72, 73, 74, 0, 117, 75, 118,
+ 174, 175, 176, 177, 178, 0, 0, 179, 180, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 77, 78, 79,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 83, 0, 84, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 14, 15, 16, 17, 0,
- 172, 0, 0, 229, 0, 0, 173, 174, 175, 176,
- 18, 19, 20, 21, 22, 23, 24, 25, 26, 27,
- 28, 29, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 38, 39, 40, 41, 42, 43, 44, 45, 46,
- 47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
- 57, 58, 59, 60, 61, 62, 63, 64, 65, 66,
- 67, 68, 69, 70, 71, 0, 164, 165, 166, 167,
- 168, 169, 0, 0, 170, 171, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 87, 0,
+ 88, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 74, 75, 76, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 17, 18, 19, 20, 0, 181, 0, 0,
+ 323, 0, 0, 182, 183, 184, 185, 21, 22, 23,
+ 24, 25, 26, 27, 28, 29, 30, 31, 32, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 41, 42,
+ 43, 44, 45, 46, 47, 48, 49, 50, 51, 52,
+ 53, 54, 55, 56, 57, 58, 59, 60, 61, 62,
+ 63, 64, 65, 66, 67, 68, 69, 70, 71, 72,
+ 73, 74, 0, 117, 75, 118, 174, 175, 176, 177,
+ 178, 0, 0, 179, 180, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 77, 78, 79, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 83, 0, 84, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 14, 15,
- 16, 17, 0, 172, 0, 0, 314, 0, 0, 173,
- 174, 175, 176, 18, 19, 20, 21, 22, 23, 24,
- 25, 26, 27, 28, 29, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 38, 39, 40, 41, 42, 43,
- 44, 45, 46, 47, 48, 49, 50, 51, 52, 53,
- 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
- 64, 65, 66, 67, 68, 69, 70, 71, 0, 164,
- 165, 166, 167, 168, 169, 0, 0, 170, 171, 0,
+ 0, 0, 0, 0, 87, 0, 88, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 74, 75, 76,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 17, 18,
+ 19, 20, 0, 181, 0, 0, 380, 0, 0, 182,
+ 183, 184, 185, 21, 22, 23, 24, 25, 26, 27,
+ 28, 29, 30, 31, 32, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 41, 42, 43, 44, 45, 46,
+ 47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
+ 57, 58, 59, 60, 61, 62, 63, 64, 65, 66,
+ 67, 68, 69, 70, 71, 72, 73, 74, 0, 117,
+ 75, 118, 174, 175, 176, 177, 178, 0, 0, 179,
+ 180, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 77,
+ 78, 79, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 83, 0, 84,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 87, 0, 88, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 14, 15, 16, 17, 0, 172, 0, 0, 367,
- 0, 0, 173, 174, 175, 176, 18, 19, 20, 21,
- 22, 23, 24, 25, 26, 27, 28, 29, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 38, 39, 40,
+ 0, 0, 0, 0, 17, 18, 19, 20, 0, 181,
+ 0, 0, 0, 0, 0, 182, 183, 184, 185, 21,
+ 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
+ 32, 0, 0, 0, 0, 0, 0, 0, 0, 0,
41, 42, 43, 44, 45, 46, 47, 48, 49, 50,
51, 52, 53, 54, 55, 56, 57, 58, 59, 60,
61, 62, 63, 64, 65, 66, 67, 68, 69, 70,
- 71, 0, 164, 165, 166, 167, 168, 169, 0, 0,
- 170, 171, 0, 0, 0, 0, 0, 0, 0, 0,
+ 71, 72, 73, 278, 0, 117, 75, 118, 174, 175,
+ 176, 177, 178, 0, 0, 179, 180, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 74, 75, 76, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 77, 78, 79, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 83, 0, 84, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 87, 0, 88, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 14, 15, 16, 17, 0, 172,
- 0, 0, 0, 0, 0, 173, 174, 175, 176, 18,
- 19, 20, 21, 22, 23, 24, 25, 26, 27, 28,
- 29, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
- 48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
- 58, 59, 60, 61, 62, 63, 64, 65, 66, 67,
- 68, 69, 70, 269, 0, 164, 165, 166, 167, 168,
- 169, 0, 0, 170, 171, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 74, 75, 76, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 17, 18, 19, 20, 0, 181, 0, 0, 0, 0,
+ 0, 182, 183, 184, 185, 21, 22, 23, 24, 25,
+ 26, 27, 28, 29, 30, 31, 32, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 41, 42, 43, 44,
+ 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
+ 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
+ 65, 66, 67, 68, 69, 70, 71, 72, 73, 401,
+ 0, 117, 75, 118, 174, 175, 176, 177, 178, 0,
+ 0, 179, 180, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 77, 78, 79, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 83, 0, 84, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 12, 13, 14, 15, 16,
- 17, 0, 172, 0, 0, 0, 0, 0, 173, 174,
- 175, 176, 18, 19, 20, 21, 22, 23, 24, 25,
- 26, 27, 28, 29, 30, 31, 32, 0, 33, 34,
- 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
- 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
- 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
- 65, 66, 67, 68, 69, 70, 71, 0, 72, 0,
+ 0, 0, 87, 0, 88, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 73, 74, 75, 76, 0,
- 77, 0, 0, 0, 0, 0, 0, 0, 78, 79,
- 80, 81, 82, 14, 15, 16, 17, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 18, 19,
- 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
- 0, 0, 0, 0, 0, 0, 83, 0, 84, 38,
+ 0, 0, 0, 0, 15, 16, 17, 18, 19, 20,
+ 0, 181, 0, 0, 0, 0, 0, 182, 183, 184,
+ 185, 21, 22, 23, 24, 25, 26, 27, 28, 29,
+ 30, 31, 32, 33, 34, 35, 0, 36, 37, 38,
39, 40, 41, 42, 43, 44, 45, 46, 47, 48,
49, 50, 51, 52, 53, 54, 55, 56, 57, 58,
59, 60, 61, 62, 63, 64, 65, 66, 67, 68,
- 69, 70, 71, 0, 341, 14, 15, 16, 17, 169,
+ 69, 70, 71, 72, 73, 74, 0, 0, 75, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 18, 19, 20, 21, 22, 23, 24, 25, 26, 27,
- 28, 29, 74, 75, 76, 0, 0, 0, 0, 0,
- 0, 38, 39, 40, 41, 42, 43, 44, 45, 46,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 76, 77, 78, 79,
+ 0, 80, 0, 0, 0, 0, 0, 0, 0, 81,
+ 82, 83, 84, 85, 86, 17, 18, 19, 20, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
+ 31, 32, 0, 0, 0, 0, 0, 0, 87, 0,
+ 88, 41, 42, 43, 44, 45, 46, 47, 48, 49,
+ 50, 51, 52, 53, 54, 55, 56, 57, 58, 59,
+ 60, 61, 62, 63, 64, 65, 66, 67, 68, 69,
+ 70, 71, 72, 73, 74, 0, 0, 75, 17, 18,
+ 19, 20, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 21, 22, 23, 24, 25, 26, 27,
+ 28, 29, 30, 31, 32, 0, 77, 78, 79, 0,
+ 0, 0, 0, 0, 41, 42, 43, 44, 45, 46,
47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
57, 58, 59, 60, 61, 62, 63, 64, 65, 66,
- 67, 68, 69, 70, 71, 0, 72, 14, 15, 16,
- 17, 0, 83, 0, 84, 0, 0, 0, 0, 0,
- 0, 0, 18, 19, 20, 21, 22, 23, 24, 25,
- 26, 27, 28, 29, 74, 75, 76, 0, 0, 0,
- 0, 0, 0, 38, 39, 40, 41, 42, 43, 44,
- 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
- 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
- 65, 66, 67, 68, 69, 70, 71, 0, 72, 0,
- 0, 0, 0, 0, 83, 0, 84, 0, 0, 0,
+ 67, 68, 69, 70, 71, 72, 73, 74, 0, 0,
+ 75, 0, 0, 0, 0, 0, 0, 87, 0, 88,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 83, 0, 84
+ 87, 0, 88
};
static const yytype_int16 yycheck[] =
{
- 9, 73, 73, 159, 155, 161, 141, 146, 141, 4,
- 76, 76, 86, 87, 91, 195, 172, 256, 9, 3,
- 4, 9, 78, 95, 96, 84, 85, 193, 4, 195,
- 313, 109, 381, 213, 227, 170, 171, 198, 33, 34,
- 35, 198, 114, 392, 198, 3, 4, 213, 32, 33,
- 34, 212, 36, 37, 0, 212, 191, 33, 34, 35,
- 214, 113, 213, 93, 94, 95, 96, 97, 98, 99,
- 100, 101, 102, 110, 32, 33, 34, 86, 36, 37,
- 38, 39, 40, 198, 76, 198, 112, 370, 97, 328,
- 198, 188, 227, 249, 227, 86, 235, 253, 86, 214,
- 256, 214, 385, 112, 103, 388, 214, 194, 264, 113,
- 261, 198, 194, 396, 193, 124, 198, 116, 76, 312,
- 403, 33, 34, 113, 133, 37, 194, 320, 193, 198,
- 198, 228, 206, 207, 211, 144, 195, 146, 197, 194,
- 194, 194, 113, 198, 198, 198, 155, 113, 304, 215,
- 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
- 295, 296, 297, 298, 299, 300, 301, 302, 303, 178,
- 194, 268, 328, 366, 104, 105, 106, 312, 76, 312,
- 33, 34, 35, 213, 76, 320, 283, 320, 292, 293,
- 294, 295, 203, 204, 205, 214, 215, 199, 200, 194,
- 82, 83, 88, 89, 213, 288, 289, 215, 305, 290,
- 291, 296, 297, 195, 76, 224, 313, 76, 374, 113,
- 76, 214, 194, 193, 213, 193, 235, 378, 214, 214,
- 193, 366, 193, 366, 214, 391, 193, 212, 90, 248,
- 209, 3, 4, 208, 92, 193, 210, 256, 76, 196,
- 195, 78, 261, 75, 214, 194, 196, 408, 195, 213,
- 193, 333, 333, 198, 76, 194, 193, 12, 196, 213,
- 32, 33, 34, 370, 36, 37, 38, 39, 40, 196,
- 196, 213, 196, 214, 194, 298, 383, 265, 385, 215,
- 213, 388, 213, 299, 214, 300, 303, 127, 301, 396,
- 224, 302, 134, 244, 77, 224, 403, 144, 392, 321,
- 248, 88, 379, 178, 248, 86, -1, -1, 328, 328,
+ 9, 8, 76, 76, 93, 169, 165, 171, 155, 151,
+ 235, 76, 77, 78, 76, 86, 87, 181, 88, 89,
+ 198, 198, 4, 265, 322, 99, 100, 3, 4, 394,
+ 9, 9, 201, 201, 217, 218, 98, 80, 216, 216,
+ 107, 33, 34, 84, 85, 37, 120, 412, 217, 217,
+ 151, 33, 34, 35, 111, 122, 32, 33, 34, 4,
+ 36, 37, 0, 222, 201, 115, 73, 201, 95, 96,
+ 97, 98, 99, 100, 101, 102, 103, 104, 179, 180,
+ 217, 90, 112, 217, 115, 383, 201, 115, 33, 34,
+ 35, 98, 101, 235, 258, 337, 321, 197, 262, 200,
+ 215, 265, 249, 328, 111, 201, 115, 405, 114, 273,
+ 408, 90, 90, 197, 202, 203, 197, 201, 416, 215,
+ 201, 115, 131, 90, 91, 214, 424, 198, 115, 200,
+ 115, 140, 3, 4, 235, 142, 236, 197, 197, 209,
+ 210, 201, 201, 76, 77, 78, 155, 154, 157, 313,
+ 197, 197, 196, 218, 379, 201, 165, 106, 107, 108,
+ 197, 32, 33, 34, 201, 36, 37, 38, 39, 40,
+ 218, 197, 201, 337, 198, 201, 196, 277, 196, 321,
+ 301, 302, 303, 304, 297, 298, 328, 115, 347, 216,
+ 299, 300, 292, 294, 295, 296, 297, 298, 299, 300,
+ 301, 302, 303, 304, 305, 306, 307, 308, 309, 310,
+ 311, 312, 274, 222, 314, 197, 76, 77, 78, 196,
+ 321, 217, 322, 387, 233, 232, 216, 328, 217, 3,
+ 4, 217, 391, 33, 34, 35, 196, 379, 196, 196,
+ 249, 206, 207, 208, 305, 306, 217, 411, 257, 215,
+ 196, 219, 196, 212, 197, 355, 265, 196, 32, 33,
+ 34, 270, 36, 37, 38, 39, 40, 274, 342, 342,
+ 429, 211, 213, 92, 94, 217, 196, 199, 379, 198,
+ 75, 80, 197, 383, 198, 216, 199, 196, 199, 201,
+ 197, 196, 216, 197, 217, 216, 199, 199, 197, 197,
+ 400, 218, 76, 403, 78, 405, 216, 199, 408, 12,
+ 216, 308, 307, 311, 141, 233, 416, 217, 309, 312,
+ 134, 253, 329, 80, 424, 233, 310, 157, 337, 329,
+ 257, 92, 412, 270, 392, 337, 90, 344, 347, -1,
+ -1, 257, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 391, -1, -1, 394, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, 378,
- -1, -1, 381, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, 392, -1, -1, -1, -1, -1, -1,
- 3, 4, 5, 6, 7, 8, 9, 10, 11, 408,
- 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
- 23, 24, 25, 26, 27, 28, 29, 30, 31, 32,
- 33, 34, -1, 36, 37, 38, 39, 40, 41, 42,
- 43, 44, 45, 46, 47, 48, 49, 50, 51, 52,
- 53, 54, 55, 56, 57, 58, 59, 60, 61, 62,
- 63, 64, 65, 66, 67, 68, 69, 70, 71, 72,
- 73, 74, 75, 76, 77, 78, 79, 80, 81, -1,
- -1, 84, 85, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 412, -1, -1, -1, -1, -1, -1,
+ -1, 3, 4, 5, 6, 7, 8, 9, 10, 11,
+ 429, 13, 14, 15, 16, 17, 18, 19, 20, 21,
+ 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
+ 32, 33, 34, -1, 36, 37, 38, 39, 40, 41,
+ 42, 43, 44, 45, 46, 47, 48, 49, 50, 51,
+ 52, 53, 54, 55, 56, 57, 58, 59, 60, 61,
+ 62, 63, 64, 65, 66, 67, 68, 69, 70, 71,
+ 72, 73, 74, 75, 76, 77, 78, 79, 80, 81,
+ 82, 83, -1, -1, 86, 87, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- 103, 104, 105, 106, -1, 108, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, 120, -1, -1,
+ -1, -1, -1, 105, 106, 107, 108, -1, 110, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 123, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, 154, -1, 156, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 157, -1, 159, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- 193, -1, -1, -1, -1, -1, 199, 200, 201, 202,
+ -1, -1, -1, -1, 196, -1, -1, -1, -1, -1,
+ 202, 203, 204, 205, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 217, 218, 219, 3, 4,
+ 5, 6, 7, 8, 9, 10, 11, -1, 13, 14,
+ 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
+ 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
+ -1, 36, 37, 38, 39, 40, 41, 42, 43, 44,
+ 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
+ 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
+ 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
+ 75, 76, 77, 78, 79, 80, 81, 82, 83, -1,
+ -1, 86, 87, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, 214, 215, 216, 3, 4, 5, 6, 7, 8,
- 9, 10, 11, -1, 13, 14, 15, 16, 17, 18,
- 19, 20, 21, 22, 23, 24, 25, 26, 27, 28,
- 29, 30, 31, 32, 33, 34, -1, 36, 37, 38,
- 39, 40, 41, 42, 43, 44, 45, 46, 47, 48,
- 49, 50, 51, 52, 53, 54, 55, 56, 57, 58,
- 59, 60, 61, 62, 63, 64, 65, 66, 67, 68,
- 69, 70, 71, 72, 73, 74, 75, 76, 77, 78,
- 79, 80, 81, -1, -1, 84, 85, -1, -1, -1,
+ 105, 106, 107, 108, -1, 110, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 123, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, 103, 104, 105, 106, -1, 108,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, 120, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 157, -1, 159, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 154, -1, 156, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 196, -1, -1, -1, -1, -1, 202, 203, 204,
+ 205, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 217, 218, 219, 3, 4, 5, 6, 7,
+ 8, 9, 10, 11, -1, 13, 14, 15, 16, 17,
+ 18, 19, 20, 21, 22, 23, 24, 25, 26, 27,
+ 28, 29, 30, 31, 32, 33, 34, -1, 36, 37,
+ 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
+ 48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
+ 58, 59, 60, 61, 62, 63, 64, 65, 66, 67,
+ 68, 69, 70, 71, 72, 73, 74, 75, 76, 77,
+ 78, 79, 80, 81, 82, 83, -1, -1, 86, 87,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, 193, -1, -1, -1, -1, -1,
- 199, 200, 201, 202, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 214, 215, 216, 3, 4,
- 5, 6, 7, 8, 9, 10, 11, -1, 13, 14,
- 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
- 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
- -1, 36, 37, 38, 39, 40, 41, 42, 43, 44,
- 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
- 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
- 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
- 75, 76, 77, 78, 79, 80, 81, -1, -1, 84,
- 85, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, 103, 104,
- 105, 106, -1, 108, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 120, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 105, 106, 107,
+ 108, -1, 110, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 123, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, 154,
- -1, 156, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 157,
+ -1, 159, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, 193, -1,
- -1, -1, -1, -1, 199, 200, 201, 202, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, 214,
- 215, 216, 3, 4, 5, 6, 7, 8, 9, 10,
+ -1, -1, -1, -1, -1, -1, -1, -1, 196, -1,
+ -1, -1, -1, -1, 202, 203, 204, 205, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 217,
+ 218, 219, 3, 4, 5, 6, 7, 8, 9, 10,
11, -1, 13, 14, 15, 16, 17, 18, 19, 20,
21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
31, 32, 33, 34, -1, 36, 37, 38, 39, 40,
@@ -1632,315 +1658,312 @@ static const yytype_int16 yycheck[] =
51, 52, 53, 54, 55, 56, 57, 58, 59, 60,
61, 62, 63, 64, 65, 66, 67, 68, 69, 70,
71, 72, 73, 74, 75, 76, 77, 78, 79, 80,
- 81, -1, -1, 84, 85, -1, -1, -1, -1, -1,
+ 81, 82, 83, -1, -1, 86, 87, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, 103, 104, 105, 106, -1, 108, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, 120,
+ -1, -1, -1, -1, 105, 106, 107, 108, -1, 110,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 123, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, 154, -1, 156, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 157, -1, 159, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, 193, -1, -1, -1, -1, -1, 199, 200,
- 201, 202, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, 214, 215, 216, 3, 4, 5, 6,
- 7, 8, 9, 10, 11, -1, 13, 14, 15, 16,
- 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
- 27, 28, 29, 30, 31, 32, 33, 34, -1, 36,
- 37, 38, 39, 40, 41, 42, 43, 44, 45, 46,
- 47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
- 57, 58, 59, 60, 61, 62, 63, 64, 65, 66,
- 67, 68, 69, 70, 71, 72, 73, 74, 75, 76,
- 77, 78, 79, 80, 81, -1, -1, 84, 85, -1,
+ -1, -1, -1, -1, -1, 196, -1, -1, -1, -1,
+ -1, 202, 203, 204, 205, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 217, 218, 3, 4,
+ 5, 6, 7, 8, 9, 10, 11, -1, 13, 14,
+ 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
+ 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
+ -1, 36, 37, 38, 39, 40, 41, 42, 43, 44,
+ 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
+ 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
+ 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
+ 75, 76, 77, 78, 79, 80, 81, 82, 83, -1,
+ -1, 86, 87, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, 103, 104, 105, 106,
- -1, 108, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, 120, -1, -1, -1, -1, -1, -1,
+ 105, 106, 107, 108, -1, 110, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 123, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, 154, -1, 156,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 157, -1, 159, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, 193, -1, -1, -1,
- -1, -1, 199, 200, 201, 202, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, 214, 215, 3,
- 4, 5, 6, 7, 8, 9, 10, 11, -1, 13,
- 14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
- 24, 25, 26, 27, 28, 29, 30, 31, 32, 33,
- 34, -1, 36, 37, 38, 39, 40, 41, 42, 43,
- 44, 45, 46, 47, 48, 49, 50, 51, 52, 53,
- 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
- 64, 65, 66, 67, 68, 69, 70, 71, 72, 73,
- 74, 75, 76, 77, 78, 79, 80, 81, -1, -1,
- 84, 85, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, 103,
- 104, 105, 106, -1, 108, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, 120, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 196, -1, -1, -1, -1, -1, 202, 203, 204,
+ 205, 3, 4, 5, 6, 7, 8, -1, -1, -1,
+ -1, -1, 217, 218, -1, -1, -1, -1, 20, 21,
+ 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
+ 32, 33, 34, -1, 36, 37, 38, 39, 40, 41,
+ 42, 43, 44, 45, 46, 47, 48, 49, 50, 51,
+ 52, 53, 54, 55, 56, 57, 58, 59, 60, 61,
+ 62, 63, 64, 65, 66, 67, 68, 69, 70, 71,
+ 72, 73, 74, -1, 76, 77, 78, 79, 80, 81,
+ 82, 83, -1, -1, 86, 87, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 105, 106, 107, 108, -1, 110, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- 154, -1, 156, -1, -1, -1, -1, -1, -1, -1,
+ -1, 123, -1, 5, 6, 7, 8, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 20, 21,
+ 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
+ -1, -1, -1, -1, -1, 157, -1, 159, -1, 41,
+ 42, 43, 44, 45, 46, 47, 48, 49, 50, 51,
+ 52, 53, 54, 55, 56, 57, 58, 59, 60, 61,
+ 62, 63, 64, 65, 66, 67, 68, 69, 70, 71,
+ 72, 73, 74, -1, 196, 77, -1, -1, -1, -1,
+ 202, 203, 204, 205, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 217, -1, -1, -1, -1,
+ -1, -1, -1, -1, 106, 107, 108, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 5, 6, 7, 8, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 20, 21, 22,
+ 23, 24, 25, 26, 27, 28, 29, 30, 31, -1,
+ -1, -1, -1, -1, -1, 157, -1, 159, 41, 42,
+ 43, 44, 45, 46, 47, 48, 49, 50, 51, 52,
+ 53, 54, 55, 56, 57, 58, 59, 60, 61, 62,
+ 63, 64, 65, 66, 67, 68, 69, 70, 71, 72,
+ 73, 74, -1, -1, 77, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 219, -1, -1,
+ -1, -1, -1, 106, 107, 108, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, 193,
- -1, -1, -1, -1, -1, 199, 200, 201, 202, 3,
- 4, 5, 6, 7, 8, -1, -1, -1, -1, -1,
- 214, 215, -1, -1, -1, -1, 20, 21, 22, 23,
- 24, 25, 26, 27, 28, 29, 30, 31, 32, 33,
- 34, -1, 36, 37, 38, 39, 40, 41, 42, 43,
+ -1, 5, 6, 7, 8, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 20, 21, 22, 23,
+ 24, 25, 26, 27, 28, 29, 30, 31, -1, -1,
+ -1, -1, -1, -1, 157, -1, 159, 41, 42, 43,
44, 45, 46, 47, 48, 49, 50, 51, 52, 53,
54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
64, 65, 66, 67, 68, 69, 70, 71, 72, 73,
- 74, -1, 76, 77, 78, 79, 80, 81, -1, -1,
- 84, 85, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, 103,
- 104, 105, 106, -1, 108, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, 120, 5, 6, 7,
- 8, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, 20, 21, 22, 23, 24, 25, 26, 27,
- 28, 29, 30, 31, -1, -1, -1, -1, -1, -1,
- 154, -1, 156, 41, 42, 43, 44, 45, 46, 47,
- 48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
- 58, 59, 60, 61, 62, 63, 64, 65, 66, 67,
- 68, 69, 70, 71, 72, 73, 74, -1, 76, 193,
- -1, -1, -1, -1, -1, 199, 200, 201, 202, -1,
+ 74, -1, 76, 77, 78, 79, 80, 81, 82, 83,
+ -1, -1, 86, 87, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 219, -1, -1, -1,
+ -1, -1, 106, 107, 108, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- 214, -1, -1, -1, -1, -1, 104, 105, 106, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, 5, 6, 7, 8, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, 20, 21,
- 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
- -1, -1, -1, -1, -1, -1, 154, -1, 156, 41,
- 42, 43, 44, 45, 46, 47, 48, 49, 50, 51,
- 52, 53, 54, 55, 56, 57, 58, 59, 60, 61,
- 62, 63, 64, 65, 66, 67, 68, 69, 70, 71,
- 72, 73, 74, -1, 76, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, 216, -1,
- -1, -1, 104, 105, 106, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, 5,
- 6, 7, 8, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, 20, 21, 22, 23, 24, 25,
- 26, 27, 28, 29, 30, 31, -1, -1, -1, -1,
- -1, -1, 154, -1, 156, 41, 42, 43, 44, 45,
- 46, 47, 48, 49, 50, 51, 52, 53, 54, 55,
- 56, 57, 58, 59, 60, 61, 62, 63, 64, 65,
- 66, 67, 68, 69, 70, 71, 72, 73, 74, -1,
- 76, 77, 78, 79, 80, 81, -1, -1, 84, 85,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, 216, -1, -1, -1, 104, 105,
- 106, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 157, -1, 159, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, 154, -1,
- 156, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 196, -1, -1, -1, -1, -1, 202, 203,
+ 204, 205, 3, 4, 5, 6, 7, 8, -1, -1,
+ -1, -1, -1, 217, -1, -1, -1, -1, -1, 20,
+ 21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
+ 31, 32, 33, 34, -1, 36, 37, 38, 39, 40,
+ 41, 42, 43, 44, 45, 46, 47, 48, 49, 50,
+ 51, 52, 53, 54, 55, 56, 57, 58, 59, 60,
+ 61, 62, 63, 64, 65, 66, 67, 68, 69, 70,
+ 71, 72, 73, 74, -1, 76, 77, 78, 79, 80,
+ 81, 82, 83, -1, -1, 86, 87, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 105, 106, 107, 108, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, 193, -1, -1,
- -1, -1, -1, 199, 200, 201, 202, 3, 4, 5,
- 6, 7, 8, -1, -1, -1, -1, -1, 214, -1,
- -1, -1, -1, -1, 20, 21, 22, 23, 24, 25,
- 26, 27, 28, 29, 30, 31, 32, 33, 34, -1,
- 36, 37, 38, 39, 40, 41, 42, 43, 44, 45,
- 46, 47, 48, 49, 50, 51, 52, 53, 54, 55,
- 56, 57, 58, 59, 60, 61, 62, 63, 64, 65,
- 66, 67, 68, 69, 70, 71, 72, 73, 74, -1,
- 76, 77, 78, 79, 80, 81, -1, -1, 84, 85,
+ -1, -1, 123, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, 103, 104, 105,
- 106, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, 120, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 157, -1, 159, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, 154, -1,
- 156, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, 5, 6, 7, 8, -1, 193, -1, -1,
- -1, -1, -1, 199, 200, 201, 202, 20, 21, 22,
- 23, 24, 25, 26, 27, 28, 29, 30, 31, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, 41, 42,
- 43, 44, 45, 46, 47, 48, 49, 50, 51, 52,
- 53, 54, 55, 56, 57, 58, 59, 60, 61, 62,
- 63, 64, 65, 66, 67, 68, 69, 70, 71, 72,
- 73, 74, -1, 76, 77, 78, 79, 80, 81, -1,
- -1, 84, 85, -1, -1, -1, -1, -1, -1, -1,
+ 5, 6, 7, 8, -1, 196, -1, -1, -1, -1,
+ -1, 202, 203, 204, 205, 20, 21, 22, 23, 24,
+ 25, 26, 27, 28, 29, 30, 31, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 41, 42, 43, 44,
+ 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
+ 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
+ 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
+ -1, 76, 77, 78, 79, 80, 81, 82, 83, -1,
+ -1, 86, 87, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, 104, 105, 106, -1, -1, -1, -1, -1, -1,
+ -1, 106, 107, 108, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, 154, -1, 156, -1, -1, -1, -1, -1, -1,
+ -1, -1, 157, -1, 159, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 5, 6, 7, 8, -1,
- 193, -1, -1, 196, -1, -1, 199, 200, 201, 202,
- 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
- 30, 31, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, 41, 42, 43, 44, 45, 46, 47, 48, 49,
- 50, 51, 52, 53, 54, 55, 56, 57, 58, 59,
- 60, 61, 62, 63, 64, 65, 66, 67, 68, 69,
- 70, 71, 72, 73, 74, -1, 76, 77, 78, 79,
- 80, 81, -1, -1, 84, 85, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 5, 6, 7, 8,
+ -1, 196, -1, -1, 199, -1, -1, 202, 203, 204,
+ 205, 20, 21, 22, 23, 24, 25, 26, 27, 28,
+ 29, 30, 31, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 41, 42, 43, 44, 45, 46, 47, 48,
+ 49, 50, 51, 52, 53, 54, 55, 56, 57, 58,
+ 59, 60, 61, 62, 63, 64, 65, 66, 67, 68,
+ 69, 70, 71, 72, 73, 74, -1, 76, 77, 78,
+ 79, 80, 81, 82, 83, -1, -1, 86, 87, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, 104, 105, 106, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 106, 107, 108,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, 154, -1, 156, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 157, -1,
+ 159, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 5, 6, 7, 8, -1, 196, -1, -1,
+ 199, -1, -1, 202, 203, 204, 205, 20, 21, 22,
+ 23, 24, 25, 26, 27, 28, 29, 30, 31, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 41, 42,
+ 43, 44, 45, 46, 47, 48, 49, 50, 51, 52,
+ 53, 54, 55, 56, 57, 58, 59, 60, 61, 62,
+ 63, 64, 65, 66, 67, 68, 69, 70, 71, 72,
+ 73, 74, -1, 76, 77, 78, 79, 80, 81, 82,
+ 83, -1, -1, 86, 87, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 106, 107, 108, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 157, -1, 159, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, 5, 6,
- 7, 8, -1, 193, -1, -1, 196, -1, -1, 199,
- 200, 201, 202, 20, 21, 22, 23, 24, 25, 26,
+ 7, 8, -1, 196, -1, -1, 199, -1, -1, 202,
+ 203, 204, 205, 20, 21, 22, 23, 24, 25, 26,
27, 28, 29, 30, 31, -1, -1, -1, -1, -1,
-1, -1, -1, -1, 41, 42, 43, 44, 45, 46,
47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
57, 58, 59, 60, 61, 62, 63, 64, 65, 66,
67, 68, 69, 70, 71, 72, 73, 74, -1, 76,
- 77, 78, 79, 80, 81, -1, -1, 84, 85, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, 104, 105, 106,
+ 77, 78, 79, 80, 81, 82, 83, -1, -1, 86,
+ 87, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 106,
+ 107, 108, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, 154, -1, 156,
+ 157, -1, 159, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 5, 6, 7, 8, -1, 196,
+ -1, -1, -1, -1, -1, 202, 203, 204, 205, 20,
+ 21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
+ 31, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 41, 42, 43, 44, 45, 46, 47, 48, 49, 50,
+ 51, 52, 53, 54, 55, 56, 57, 58, 59, 60,
+ 61, 62, 63, 64, 65, 66, 67, 68, 69, 70,
+ 71, 72, 73, 74, -1, 76, 77, 78, 79, 80,
+ 81, 82, 83, -1, -1, 86, 87, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, 5, 6, 7, 8, -1, 193, -1, -1, 196,
- -1, -1, 199, 200, 201, 202, 20, 21, 22, 23,
- 24, 25, 26, 27, 28, 29, 30, 31, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, 41, 42, 43,
- 44, 45, 46, 47, 48, 49, 50, 51, 52, 53,
- 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
- 64, 65, 66, 67, 68, 69, 70, 71, 72, 73,
- 74, -1, 76, 77, 78, 79, 80, 81, -1, -1,
- 84, 85, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 106, 107, 108, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- 104, 105, 106, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 157, -1, 159, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- 154, -1, 156, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, 5, 6, 7, 8, -1, 193,
- -1, -1, -1, -1, -1, 199, 200, 201, 202, 20,
- 21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
- 31, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- 41, 42, 43, 44, 45, 46, 47, 48, 49, 50,
- 51, 52, 53, 54, 55, 56, 57, 58, 59, 60,
- 61, 62, 63, 64, 65, 66, 67, 68, 69, 70,
- 71, 72, 73, 74, -1, 76, 77, 78, 79, 80,
- 81, -1, -1, 84, 85, -1, -1, -1, -1, -1,
+ 5, 6, 7, 8, -1, 196, -1, -1, -1, -1,
+ -1, 202, 203, 204, 205, 20, 21, 22, 23, 24,
+ 25, 26, 27, 28, 29, 30, 31, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 41, 42, 43, 44,
+ 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
+ 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
+ 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
+ -1, 76, 77, 78, 79, 80, 81, 82, 83, -1,
+ -1, 86, 87, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, 104, 105, 106, -1, -1, -1, -1,
+ -1, 106, 107, 108, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, 154, -1, 156, -1, -1, -1, -1,
+ -1, -1, 157, -1, 159, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 3, 4, 5, 6, 7,
- 8, -1, 193, -1, -1, -1, -1, -1, 199, 200,
- 201, 202, 20, 21, 22, 23, 24, 25, 26, 27,
- 28, 29, 30, 31, 32, 33, 34, -1, 36, 37,
- 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
- 48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
- 58, 59, 60, 61, 62, 63, 64, 65, 66, 67,
- 68, 69, 70, 71, 72, 73, 74, -1, 76, -1,
+ -1, -1, -1, -1, 3, 4, 5, 6, 7, 8,
+ -1, 196, -1, -1, -1, -1, -1, 202, 203, 204,
+ 205, 20, 21, 22, 23, 24, 25, 26, 27, 28,
+ 29, 30, 31, 32, 33, 34, -1, 36, 37, 38,
+ 39, 40, 41, 42, 43, 44, 45, 46, 47, 48,
+ 49, 50, 51, 52, 53, 54, 55, 56, 57, 58,
+ 59, 60, 61, 62, 63, 64, 65, 66, 67, 68,
+ 69, 70, 71, 72, 73, 74, -1, -1, 77, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 103, 104, 105, 106, -1,
- 108, -1, -1, -1, -1, -1, -1, -1, 116, 117,
- 118, 119, 120, 5, 6, 7, 8, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, 20, 21,
- 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
- -1, -1, -1, -1, -1, -1, 154, -1, 156, 41,
- 42, 43, 44, 45, 46, 47, 48, 49, 50, 51,
- 52, 53, 54, 55, 56, 57, 58, 59, 60, 61,
- 62, 63, 64, 65, 66, 67, 68, 69, 70, 71,
- 72, 73, 74, -1, 76, 5, 6, 7, 8, 81,
+ -1, -1, -1, -1, -1, -1, 105, 106, 107, 108,
+ -1, 110, -1, -1, -1, -1, -1, -1, -1, 118,
+ 119, 120, 121, 122, 123, 5, 6, 7, 8, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
- 30, 31, 104, 105, 106, -1, -1, -1, -1, -1,
- -1, 41, 42, 43, 44, 45, 46, 47, 48, 49,
+ 30, 31, -1, -1, -1, -1, -1, -1, 157, -1,
+ 159, 41, 42, 43, 44, 45, 46, 47, 48, 49,
50, 51, 52, 53, 54, 55, 56, 57, 58, 59,
60, 61, 62, 63, 64, 65, 66, 67, 68, 69,
- 70, 71, 72, 73, 74, -1, 76, 5, 6, 7,
- 8, -1, 154, -1, 156, -1, -1, -1, -1, -1,
- -1, -1, 20, 21, 22, 23, 24, 25, 26, 27,
- 28, 29, 30, 31, 104, 105, 106, -1, -1, -1,
- -1, -1, -1, 41, 42, 43, 44, 45, 46, 47,
- 48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
- 58, 59, 60, 61, 62, 63, 64, 65, 66, 67,
- 68, 69, 70, 71, 72, 73, 74, -1, 76, -1,
- -1, -1, -1, -1, 154, -1, 156, -1, -1, -1,
+ 70, 71, 72, 73, 74, -1, -1, 77, 5, 6,
+ 7, 8, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 20, 21, 22, 23, 24, 25, 26,
+ 27, 28, 29, 30, 31, -1, 106, 107, 108, -1,
+ -1, -1, -1, -1, 41, 42, 43, 44, 45, 46,
+ 47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
+ 57, 58, 59, 60, 61, 62, 63, 64, 65, 66,
+ 67, 68, 69, 70, 71, 72, 73, 74, -1, -1,
+ 77, -1, -1, -1, -1, -1, -1, 157, -1, 159,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, 154, -1, 156
+ 157, -1, 159
};
/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
symbol of state STATE-NUM. */
static const yytype_uint16 yystos[] =
{
- 0, 109, 218, 220, 78, 0, 222, 113, 110, 219,
- 223, 76, 3, 4, 5, 6, 7, 8, 20, 21,
- 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
- 32, 33, 34, 36, 37, 38, 39, 40, 41, 42,
- 43, 44, 45, 46, 47, 48, 49, 50, 51, 52,
- 53, 54, 55, 56, 57, 58, 59, 60, 61, 62,
- 63, 64, 65, 66, 67, 68, 69, 70, 71, 72,
- 73, 74, 76, 103, 104, 105, 106, 108, 116, 117,
- 118, 119, 120, 154, 156, 221, 224, 254, 255, 256,
- 257, 258, 263, 264, 265, 266, 269, 271, 272, 273,
- 274, 275, 276, 277, 278, 302, 303, 112, 33, 34,
- 37, 76, 215, 76, 269, 272, 277, 113, 113, 113,
- 113, 193, 302, 214, 215, 289, 194, 198, 4, 33,
- 34, 35, 260, 261, 270, 198, 214, 76, 272, 272,
- 273, 195, 274, 76, 215, 273, 279, 280, 272, 274,
- 76, 267, 268, 9, 10, 11, 13, 14, 15, 16,
- 17, 18, 19, 75, 76, 77, 78, 79, 80, 81,
- 84, 85, 193, 199, 200, 201, 202, 214, 215, 216,
- 225, 226, 227, 229, 230, 231, 232, 233, 234, 235,
- 236, 237, 238, 239, 240, 241, 242, 243, 244, 245,
- 246, 247, 248, 249, 250, 252, 254, 255, 273, 284,
- 285, 286, 287, 290, 291, 292, 295, 296, 297, 301,
- 260, 259, 262, 273, 261, 76, 193, 195, 213, 196,
- 236, 249, 253, 273, 113, 279, 76, 281, 282, 216,
- 280, 214, 213, 194, 198, 214, 214, 285, 193, 193,
- 214, 214, 252, 193, 252, 212, 193, 236, 236, 252,
- 216, 290, 84, 85, 195, 197, 194, 194, 198, 74,
- 250, 193, 93, 94, 95, 96, 97, 98, 99, 100,
- 101, 102, 213, 251, 236, 203, 204, 205, 199, 200,
- 82, 83, 86, 87, 206, 207, 88, 89, 208, 209,
- 210, 90, 92, 91, 211, 198, 214, 216, 285, 76,
- 259, 262, 195, 213, 196, 253, 250, 283, 196, 216,
- 195, 198, 214, 78, 268, 75, 284, 291, 298, 252,
- 214, 252, 212, 103, 252, 265, 294, 194, 216, 228,
- 252, 76, 231, 250, 250, 236, 236, 236, 238, 238,
- 239, 239, 240, 240, 240, 240, 241, 241, 242, 243,
- 244, 245, 246, 247, 252, 250, 195, 196, 253, 283,
- 213, 196, 253, 282, 193, 294, 299, 300, 194, 194,
- 76, 194, 196, 212, 253, 213, 196, 283, 213, 196,
- 252, 214, 194, 285, 293, 287, 213, 286, 288, 289,
- 250, 196, 283, 213, 283, 194, 252, 288, 12, 283,
- 283, 214, 285
+ 0, 111, 221, 223, 80, 0, 225, 115, 112, 222,
+ 227, 76, 77, 78, 226, 3, 4, 5, 6, 7,
+ 8, 20, 21, 22, 23, 24, 25, 26, 27, 28,
+ 29, 30, 31, 32, 33, 34, 36, 37, 38, 39,
+ 40, 41, 42, 43, 44, 45, 46, 47, 48, 49,
+ 50, 51, 52, 53, 54, 55, 56, 57, 58, 59,
+ 60, 61, 62, 63, 64, 65, 66, 67, 68, 69,
+ 70, 71, 72, 73, 74, 77, 105, 106, 107, 108,
+ 110, 118, 119, 120, 121, 122, 123, 157, 159, 224,
+ 228, 262, 263, 264, 265, 266, 271, 272, 273, 274,
+ 277, 279, 280, 281, 282, 283, 284, 285, 286, 311,
+ 312, 114, 33, 34, 37, 218, 226, 76, 78, 229,
+ 277, 280, 285, 115, 115, 115, 115, 115, 196, 311,
+ 217, 218, 298, 197, 201, 4, 33, 34, 35, 268,
+ 269, 278, 201, 217, 76, 78, 226, 229, 280, 280,
+ 281, 198, 282, 226, 281, 287, 288, 218, 280, 282,
+ 226, 275, 276, 9, 10, 11, 13, 14, 15, 16,
+ 17, 18, 19, 75, 79, 80, 81, 82, 83, 86,
+ 87, 196, 202, 203, 204, 205, 217, 218, 219, 229,
+ 230, 231, 233, 234, 235, 236, 237, 238, 239, 244,
+ 245, 246, 247, 248, 249, 250, 251, 252, 253, 254,
+ 255, 256, 257, 258, 260, 262, 263, 281, 292, 293,
+ 294, 295, 299, 300, 301, 304, 305, 306, 310, 268,
+ 267, 270, 281, 269, 226, 198, 216, 196, 199, 244,
+ 257, 261, 281, 115, 226, 289, 290, 219, 288, 287,
+ 217, 216, 197, 201, 217, 217, 293, 196, 196, 217,
+ 217, 260, 196, 260, 215, 196, 244, 244, 260, 219,
+ 296, 86, 87, 198, 200, 197, 197, 201, 74, 258,
+ 196, 95, 96, 97, 98, 99, 100, 101, 102, 103,
+ 104, 216, 259, 244, 206, 207, 208, 202, 203, 84,
+ 85, 88, 89, 209, 210, 90, 91, 211, 212, 213,
+ 92, 94, 93, 214, 201, 217, 219, 293, 226, 267,
+ 270, 198, 216, 199, 261, 258, 291, 199, 198, 201,
+ 217, 219, 80, 276, 75, 292, 300, 307, 260, 217,
+ 260, 215, 105, 260, 273, 303, 197, 299, 232, 260,
+ 226, 229, 240, 241, 242, 243, 258, 258, 244, 244,
+ 244, 246, 246, 247, 247, 248, 248, 248, 248, 249,
+ 249, 250, 251, 252, 253, 254, 255, 260, 258, 198,
+ 199, 261, 291, 216, 199, 261, 290, 196, 303, 308,
+ 309, 197, 197, 226, 197, 219, 199, 196, 197, 197,
+ 201, 74, 258, 215, 261, 216, 199, 291, 216, 199,
+ 260, 217, 197, 293, 302, 295, 216, 294, 297, 298,
+ 258, 258, 199, 291, 216, 291, 197, 260, 297, 12,
+ 291, 291, 217, 293
};
#define yyerrok (yyerrstatus = 0)
@@ -1955,18 +1978,9 @@ static const yytype_uint16 yystos[] =
/* Like YYERROR except do call yyerror. This remains here temporarily
to ease the transition to the new meaning of YYERROR, for GCC.
- Once GCC version 2 has supplanted version 1, this can go. However,
- YYFAIL appears to be in use. Nevertheless, it is formally deprecated
- in Bison 2.4.2's NEWS entry, where a plan to phase it out is
- discussed. */
+ Once GCC version 2 has supplanted version 1, this can go. */
#define YYFAIL goto yyerrlab
-#if defined YYFAIL
- /* This is here to suppress warnings from the GCC cpp's
- -Wunused-macros. Normally we don't worry about that warning, but
- some users do, and we want to make it easy for users to remove
- YYFAIL uses, which will produce warnings from Bison 2.5. */
-#endif
#define YYRECOVERING() (!!yyerrstatus)
@@ -2023,7 +2037,7 @@ while (YYID (0))
we won't break user code: when these are the locations we know. */
#ifndef YY_LOCATION_PRINT
-# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
+# if YYLTYPE_IS_TRIVIAL
# define YY_LOCATION_PRINT(File, Loc) \
fprintf (File, "%d.%d-%d.%d", \
(Loc).first_line, (Loc).first_column, \
@@ -2565,7 +2579,7 @@ YYLTYPE yylloc;
YYLTYPE *yylsp;
/* The locations where the error started and ended. */
- YYLTYPE yyerror_range[3];
+ YYLTYPE yyerror_range[2];
YYSIZE_T yystacksize;
@@ -2612,7 +2626,7 @@ YYLTYPE yylloc;
yyvsp = yyvs;
yylsp = yyls;
-#if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
+#if YYLTYPE_IS_TRIVIAL
/* Initialize the default location before parsing starts. */
yylloc.first_line = yylloc.last_line = 1;
yylloc.first_column = yylloc.last_column = 1;
@@ -2620,8 +2634,8 @@ YYLTYPE yylloc;
/* User initialization code. */
-/* Line 1251 of yacc.c */
-#line 41 "glsl_parser.ypp"
+/* Line 1242 of yacc.c */
+#line 41 "glsl_parser.yy"
{
yylloc.first_line = 1;
yylloc.first_column = 1;
@@ -2630,8 +2644,8 @@ YYLTYPE yylloc;
yylloc.source = 0;
}
-/* Line 1251 of yacc.c */
-#line 2635 "glsl_parser.cpp"
+/* Line 1242 of yacc.c */
+#line 2649 "glsl_parser.cpp"
yylsp[0] = yylloc;
goto yysetstate;
@@ -2818,39 +2832,85 @@ yyreduce:
{
case 2:
-/* Line 1464 of yacc.c */
-#line 212 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 218 "glsl_parser.yy"
+ {
+ _mesa_glsl_initialize_types(state);
+ ;}
+ break;
+
+ case 3:
+
+/* Line 1455 of yacc.c */
+#line 222 "glsl_parser.yy"
{
+ delete state->symbols;
+ state->symbols = new(ralloc_parent(state)) glsl_symbol_table;
_mesa_glsl_initialize_types(state);
;}
break;
case 5:
-/* Line 1464 of yacc.c */
-#line 221 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 232 "glsl_parser.yy"
{
+ bool supported = false;
+
switch ((yyvsp[(2) - (3)].n)) {
case 100:
state->es_shader = true;
+ supported = state->Const.GLSL_100ES;
+ break;
case 110:
+ supported = state->Const.GLSL_110;
+ break;
case 120:
+ supported = state->Const.GLSL_120;
+ break;
case 130:
- /* FINISHME: Check against implementation support versions. */
- state->language_version = (yyvsp[(2) - (3)].n);
+ supported = state->Const.GLSL_130;
break;
default:
- _mesa_glsl_error(& (yylsp[(2) - (3)]), state, "Shading language version"
- "%u is not supported\n", (yyvsp[(2) - (3)].n));
+ supported = false;
break;
}
+
+ state->language_version = (yyvsp[(2) - (3)].n);
+ state->version_string =
+ ralloc_asprintf(state, "GLSL%s %d.%02d",
+ state->es_shader ? " ES" : "",
+ state->language_version / 100,
+ state->language_version % 100);
+
+ if (!supported) {
+ _mesa_glsl_error(& (yylsp[(2) - (3)]), state, "%s is not supported. "
+ "Supported versions are: %s\n",
+ state->version_string,
+ state->supported_version_string);
+ }
;}
break;
- case 12:
+ case 10:
-/* Line 1464 of yacc.c */
-#line 253 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 276 "glsl_parser.yy"
+ {
+ if (state->language_version < 120) {
+ _mesa_glsl_warning(& (yylsp[(1) - (2)]), state,
+ "pragma `invariant(all)' not supported in %s",
+ state->version_string);
+ } else {
+ state->all_invariant = true;
+ }
+ ;}
+ break;
+
+ case 16:
+
+/* Line 1455 of yacc.c */
+#line 300 "glsl_parser.yy"
{
if (!_mesa_glsl_process_extension((yyvsp[(2) - (5)].identifier), & (yylsp[(2) - (5)]), (yyvsp[(4) - (5)].identifier), & (yylsp[(4) - (5)]), state)) {
YYERROR;
@@ -2858,36 +2918,36 @@ yyreduce:
;}
break;
- case 13:
+ case 17:
-/* Line 1464 of yacc.c */
-#line 262 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 309 "glsl_parser.yy"
{
- /* FINISHME: The NULL test is only required because 'precision'
- * FINISHME: statements are not yet supported.
+ /* FINISHME: The NULL test is required because pragmas are set to
+ * FINISHME: NULL. (See production rule for external_declaration.)
*/
if ((yyvsp[(1) - (1)].node) != NULL)
state->translation_unit.push_tail(& (yyvsp[(1) - (1)].node)->link);
;}
break;
- case 14:
+ case 18:
-/* Line 1464 of yacc.c */
-#line 270 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 317 "glsl_parser.yy"
{
- /* FINISHME: The NULL test is only required because 'precision'
- * FINISHME: statements are not yet supported.
+ /* FINISHME: The NULL test is required because pragmas are set to
+ * FINISHME: NULL. (See production rule for external_declaration.)
*/
if ((yyvsp[(2) - (2)].node) != NULL)
state->translation_unit.push_tail(& (yyvsp[(2) - (2)].node)->link);
;}
break;
- case 16:
+ case 21:
-/* Line 1464 of yacc.c */
-#line 285 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 333 "glsl_parser.yy"
{
void *ctx = state;
(yyval.expression) = new(ctx) ast_expression(ast_identifier, NULL, NULL, NULL);
@@ -2896,10 +2956,10 @@ yyreduce:
;}
break;
- case 17:
+ case 22:
-/* Line 1464 of yacc.c */
-#line 292 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 340 "glsl_parser.yy"
{
void *ctx = state;
(yyval.expression) = new(ctx) ast_expression(ast_int_constant, NULL, NULL, NULL);
@@ -2908,10 +2968,10 @@ yyreduce:
;}
break;
- case 18:
+ case 23:
-/* Line 1464 of yacc.c */
-#line 299 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 347 "glsl_parser.yy"
{
void *ctx = state;
(yyval.expression) = new(ctx) ast_expression(ast_uint_constant, NULL, NULL, NULL);
@@ -2920,10 +2980,10 @@ yyreduce:
;}
break;
- case 19:
+ case 24:
-/* Line 1464 of yacc.c */
-#line 306 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 354 "glsl_parser.yy"
{
void *ctx = state;
(yyval.expression) = new(ctx) ast_expression(ast_float_constant, NULL, NULL, NULL);
@@ -2932,10 +2992,10 @@ yyreduce:
;}
break;
- case 20:
+ case 25:
-/* Line 1464 of yacc.c */
-#line 313 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 361 "glsl_parser.yy"
{
void *ctx = state;
(yyval.expression) = new(ctx) ast_expression(ast_bool_constant, NULL, NULL, NULL);
@@ -2944,19 +3004,19 @@ yyreduce:
;}
break;
- case 21:
+ case 26:
-/* Line 1464 of yacc.c */
-#line 320 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 368 "glsl_parser.yy"
{
(yyval.expression) = (yyvsp[(2) - (3)].expression);
;}
break;
- case 23:
+ case 28:
-/* Line 1464 of yacc.c */
-#line 328 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 376 "glsl_parser.yy"
{
void *ctx = state;
(yyval.expression) = new(ctx) ast_expression(ast_array_index, (yyvsp[(1) - (4)].expression), (yyvsp[(3) - (4)].expression), NULL);
@@ -2964,19 +3024,19 @@ yyreduce:
;}
break;
- case 24:
+ case 29:
-/* Line 1464 of yacc.c */
-#line 334 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 382 "glsl_parser.yy"
{
(yyval.expression) = (yyvsp[(1) - (1)].expression);
;}
break;
- case 25:
+ case 30:
-/* Line 1464 of yacc.c */
-#line 338 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 386 "glsl_parser.yy"
{
void *ctx = state;
(yyval.expression) = new(ctx) ast_expression(ast_field_selection, (yyvsp[(1) - (3)].expression), NULL, NULL);
@@ -2985,10 +3045,10 @@ yyreduce:
;}
break;
- case 26:
+ case 31:
-/* Line 1464 of yacc.c */
-#line 345 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 393 "glsl_parser.yy"
{
void *ctx = state;
(yyval.expression) = new(ctx) ast_expression(ast_post_inc, (yyvsp[(1) - (2)].expression), NULL, NULL);
@@ -2996,10 +3056,10 @@ yyreduce:
;}
break;
- case 27:
+ case 32:
-/* Line 1464 of yacc.c */
-#line 351 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 399 "glsl_parser.yy"
{
void *ctx = state;
(yyval.expression) = new(ctx) ast_expression(ast_post_dec, (yyvsp[(1) - (2)].expression), NULL, NULL);
@@ -3007,10 +3067,10 @@ yyreduce:
;}
break;
- case 31:
+ case 36:
-/* Line 1464 of yacc.c */
-#line 369 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 417 "glsl_parser.yy"
{
void *ctx = state;
(yyval.expression) = new(ctx) ast_expression(ast_field_selection, (yyvsp[(1) - (3)].expression), (yyvsp[(3) - (3)].expression), NULL);
@@ -3018,10 +3078,10 @@ yyreduce:
;}
break;
- case 36:
+ case 41:
-/* Line 1464 of yacc.c */
-#line 388 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 436 "glsl_parser.yy"
{
(yyval.expression) = (yyvsp[(1) - (2)].expression);
(yyval.expression)->set_location(yylloc);
@@ -3029,10 +3089,10 @@ yyreduce:
;}
break;
- case 37:
+ case 42:
-/* Line 1464 of yacc.c */
-#line 394 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 442 "glsl_parser.yy"
{
(yyval.expression) = (yyvsp[(1) - (3)].expression);
(yyval.expression)->set_location(yylloc);
@@ -3040,10 +3100,10 @@ yyreduce:
;}
break;
- case 39:
+ case 44:
-/* Line 1464 of yacc.c */
-#line 410 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 458 "glsl_parser.yy"
{
void *ctx = state;
(yyval.expression) = new(ctx) ast_function_expression((yyvsp[(1) - (1)].type_specifier));
@@ -3051,10 +3111,10 @@ yyreduce:
;}
break;
- case 40:
+ case 45:
-/* Line 1464 of yacc.c */
-#line 416 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 464 "glsl_parser.yy"
{
void *ctx = state;
ast_expression *callee = new(ctx) ast_expression((yyvsp[(1) - (1)].identifier));
@@ -3063,10 +3123,10 @@ yyreduce:
;}
break;
- case 41:
+ case 46:
-/* Line 1464 of yacc.c */
-#line 423 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 471 "glsl_parser.yy"
{
void *ctx = state;
ast_expression *callee = new(ctx) ast_expression((yyvsp[(1) - (1)].identifier));
@@ -3075,10 +3135,44 @@ yyreduce:
;}
break;
- case 43:
+ case 51:
-/* Line 1464 of yacc.c */
-#line 435 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 491 "glsl_parser.yy"
+ {
+ (yyval.expression) = (yyvsp[(1) - (2)].expression);
+ (yyval.expression)->set_location(yylloc);
+ (yyval.expression)->expressions.push_tail(& (yyvsp[(2) - (2)].expression)->link);
+ ;}
+ break;
+
+ case 52:
+
+/* Line 1455 of yacc.c */
+#line 497 "glsl_parser.yy"
+ {
+ (yyval.expression) = (yyvsp[(1) - (3)].expression);
+ (yyval.expression)->set_location(yylloc);
+ (yyval.expression)->expressions.push_tail(& (yyvsp[(3) - (3)].expression)->link);
+ ;}
+ break;
+
+ case 53:
+
+/* Line 1455 of yacc.c */
+#line 509 "glsl_parser.yy"
+ {
+ void *ctx = state;
+ ast_expression *callee = new(ctx) ast_expression((yyvsp[(1) - (2)].identifier));
+ (yyval.expression) = new(ctx) ast_function_expression(callee);
+ (yyval.expression)->set_location(yylloc);
+ ;}
+ break;
+
+ case 55:
+
+/* Line 1455 of yacc.c */
+#line 521 "glsl_parser.yy"
{
void *ctx = state;
(yyval.expression) = new(ctx) ast_expression(ast_pre_inc, (yyvsp[(2) - (2)].expression), NULL, NULL);
@@ -3086,10 +3180,10 @@ yyreduce:
;}
break;
- case 44:
+ case 56:
-/* Line 1464 of yacc.c */
-#line 441 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 527 "glsl_parser.yy"
{
void *ctx = state;
(yyval.expression) = new(ctx) ast_expression(ast_pre_dec, (yyvsp[(2) - (2)].expression), NULL, NULL);
@@ -3097,10 +3191,10 @@ yyreduce:
;}
break;
- case 45:
+ case 57:
-/* Line 1464 of yacc.c */
-#line 447 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 533 "glsl_parser.yy"
{
void *ctx = state;
(yyval.expression) = new(ctx) ast_expression((yyvsp[(1) - (2)].n), (yyvsp[(2) - (2)].expression), NULL, NULL);
@@ -3108,38 +3202,38 @@ yyreduce:
;}
break;
- case 46:
+ case 58:
-/* Line 1464 of yacc.c */
-#line 456 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 542 "glsl_parser.yy"
{ (yyval.n) = ast_plus; ;}
break;
- case 47:
+ case 59:
-/* Line 1464 of yacc.c */
-#line 457 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 543 "glsl_parser.yy"
{ (yyval.n) = ast_neg; ;}
break;
- case 48:
+ case 60:
-/* Line 1464 of yacc.c */
-#line 458 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 544 "glsl_parser.yy"
{ (yyval.n) = ast_logic_not; ;}
break;
- case 49:
+ case 61:
-/* Line 1464 of yacc.c */
-#line 459 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 545 "glsl_parser.yy"
{ (yyval.n) = ast_bit_not; ;}
break;
- case 51:
+ case 63:
-/* Line 1464 of yacc.c */
-#line 465 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 551 "glsl_parser.yy"
{
void *ctx = state;
(yyval.expression) = new(ctx) ast_expression_bin(ast_mul, (yyvsp[(1) - (3)].expression), (yyvsp[(3) - (3)].expression));
@@ -3147,10 +3241,10 @@ yyreduce:
;}
break;
- case 52:
+ case 64:
-/* Line 1464 of yacc.c */
-#line 471 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 557 "glsl_parser.yy"
{
void *ctx = state;
(yyval.expression) = new(ctx) ast_expression_bin(ast_div, (yyvsp[(1) - (3)].expression), (yyvsp[(3) - (3)].expression));
@@ -3158,10 +3252,10 @@ yyreduce:
;}
break;
- case 53:
+ case 65:
-/* Line 1464 of yacc.c */
-#line 477 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 563 "glsl_parser.yy"
{
void *ctx = state;
(yyval.expression) = new(ctx) ast_expression_bin(ast_mod, (yyvsp[(1) - (3)].expression), (yyvsp[(3) - (3)].expression));
@@ -3169,10 +3263,10 @@ yyreduce:
;}
break;
- case 55:
+ case 67:
-/* Line 1464 of yacc.c */
-#line 487 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 573 "glsl_parser.yy"
{
void *ctx = state;
(yyval.expression) = new(ctx) ast_expression_bin(ast_add, (yyvsp[(1) - (3)].expression), (yyvsp[(3) - (3)].expression));
@@ -3180,10 +3274,10 @@ yyreduce:
;}
break;
- case 56:
+ case 68:
-/* Line 1464 of yacc.c */
-#line 493 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 579 "glsl_parser.yy"
{
void *ctx = state;
(yyval.expression) = new(ctx) ast_expression_bin(ast_sub, (yyvsp[(1) - (3)].expression), (yyvsp[(3) - (3)].expression));
@@ -3191,10 +3285,10 @@ yyreduce:
;}
break;
- case 58:
+ case 70:
-/* Line 1464 of yacc.c */
-#line 503 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 589 "glsl_parser.yy"
{
void *ctx = state;
(yyval.expression) = new(ctx) ast_expression_bin(ast_lshift, (yyvsp[(1) - (3)].expression), (yyvsp[(3) - (3)].expression));
@@ -3202,10 +3296,10 @@ yyreduce:
;}
break;
- case 59:
+ case 71:
-/* Line 1464 of yacc.c */
-#line 509 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 595 "glsl_parser.yy"
{
void *ctx = state;
(yyval.expression) = new(ctx) ast_expression_bin(ast_rshift, (yyvsp[(1) - (3)].expression), (yyvsp[(3) - (3)].expression));
@@ -3213,10 +3307,10 @@ yyreduce:
;}
break;
- case 61:
+ case 73:
-/* Line 1464 of yacc.c */
-#line 519 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 605 "glsl_parser.yy"
{
void *ctx = state;
(yyval.expression) = new(ctx) ast_expression_bin(ast_less, (yyvsp[(1) - (3)].expression), (yyvsp[(3) - (3)].expression));
@@ -3224,10 +3318,10 @@ yyreduce:
;}
break;
- case 62:
+ case 74:
-/* Line 1464 of yacc.c */
-#line 525 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 611 "glsl_parser.yy"
{
void *ctx = state;
(yyval.expression) = new(ctx) ast_expression_bin(ast_greater, (yyvsp[(1) - (3)].expression), (yyvsp[(3) - (3)].expression));
@@ -3235,10 +3329,10 @@ yyreduce:
;}
break;
- case 63:
+ case 75:
-/* Line 1464 of yacc.c */
-#line 531 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 617 "glsl_parser.yy"
{
void *ctx = state;
(yyval.expression) = new(ctx) ast_expression_bin(ast_lequal, (yyvsp[(1) - (3)].expression), (yyvsp[(3) - (3)].expression));
@@ -3246,10 +3340,10 @@ yyreduce:
;}
break;
- case 64:
+ case 76:
-/* Line 1464 of yacc.c */
-#line 537 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 623 "glsl_parser.yy"
{
void *ctx = state;
(yyval.expression) = new(ctx) ast_expression_bin(ast_gequal, (yyvsp[(1) - (3)].expression), (yyvsp[(3) - (3)].expression));
@@ -3257,10 +3351,10 @@ yyreduce:
;}
break;
- case 66:
+ case 78:
-/* Line 1464 of yacc.c */
-#line 547 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 633 "glsl_parser.yy"
{
void *ctx = state;
(yyval.expression) = new(ctx) ast_expression_bin(ast_equal, (yyvsp[(1) - (3)].expression), (yyvsp[(3) - (3)].expression));
@@ -3268,10 +3362,10 @@ yyreduce:
;}
break;
- case 67:
+ case 79:
-/* Line 1464 of yacc.c */
-#line 553 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 639 "glsl_parser.yy"
{
void *ctx = state;
(yyval.expression) = new(ctx) ast_expression_bin(ast_nequal, (yyvsp[(1) - (3)].expression), (yyvsp[(3) - (3)].expression));
@@ -3279,10 +3373,10 @@ yyreduce:
;}
break;
- case 69:
+ case 81:
-/* Line 1464 of yacc.c */
-#line 563 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 649 "glsl_parser.yy"
{
void *ctx = state;
(yyval.expression) = new(ctx) ast_expression_bin(ast_bit_and, (yyvsp[(1) - (3)].expression), (yyvsp[(3) - (3)].expression));
@@ -3290,10 +3384,10 @@ yyreduce:
;}
break;
- case 71:
+ case 83:
-/* Line 1464 of yacc.c */
-#line 573 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 659 "glsl_parser.yy"
{
void *ctx = state;
(yyval.expression) = new(ctx) ast_expression_bin(ast_bit_xor, (yyvsp[(1) - (3)].expression), (yyvsp[(3) - (3)].expression));
@@ -3301,10 +3395,10 @@ yyreduce:
;}
break;
- case 73:
+ case 85:
-/* Line 1464 of yacc.c */
-#line 583 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 669 "glsl_parser.yy"
{
void *ctx = state;
(yyval.expression) = new(ctx) ast_expression_bin(ast_bit_or, (yyvsp[(1) - (3)].expression), (yyvsp[(3) - (3)].expression));
@@ -3312,10 +3406,10 @@ yyreduce:
;}
break;
- case 75:
+ case 87:
-/* Line 1464 of yacc.c */
-#line 593 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 679 "glsl_parser.yy"
{
void *ctx = state;
(yyval.expression) = new(ctx) ast_expression_bin(ast_logic_and, (yyvsp[(1) - (3)].expression), (yyvsp[(3) - (3)].expression));
@@ -3323,10 +3417,10 @@ yyreduce:
;}
break;
- case 77:
+ case 89:
-/* Line 1464 of yacc.c */
-#line 603 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 689 "glsl_parser.yy"
{
void *ctx = state;
(yyval.expression) = new(ctx) ast_expression_bin(ast_logic_xor, (yyvsp[(1) - (3)].expression), (yyvsp[(3) - (3)].expression));
@@ -3334,10 +3428,10 @@ yyreduce:
;}
break;
- case 79:
+ case 91:
-/* Line 1464 of yacc.c */
-#line 613 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 699 "glsl_parser.yy"
{
void *ctx = state;
(yyval.expression) = new(ctx) ast_expression_bin(ast_logic_or, (yyvsp[(1) - (3)].expression), (yyvsp[(3) - (3)].expression));
@@ -3345,10 +3439,10 @@ yyreduce:
;}
break;
- case 81:
+ case 93:
-/* Line 1464 of yacc.c */
-#line 623 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 709 "glsl_parser.yy"
{
void *ctx = state;
(yyval.expression) = new(ctx) ast_expression(ast_conditional, (yyvsp[(1) - (5)].expression), (yyvsp[(3) - (5)].expression), (yyvsp[(5) - (5)].expression));
@@ -3356,10 +3450,10 @@ yyreduce:
;}
break;
- case 83:
+ case 95:
-/* Line 1464 of yacc.c */
-#line 633 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 719 "glsl_parser.yy"
{
void *ctx = state;
(yyval.expression) = new(ctx) ast_expression((yyvsp[(2) - (3)].n), (yyvsp[(1) - (3)].expression), (yyvsp[(3) - (3)].expression), NULL);
@@ -3367,96 +3461,96 @@ yyreduce:
;}
break;
- case 84:
+ case 96:
-/* Line 1464 of yacc.c */
-#line 641 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 727 "glsl_parser.yy"
{ (yyval.n) = ast_assign; ;}
break;
- case 85:
+ case 97:
-/* Line 1464 of yacc.c */
-#line 642 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 728 "glsl_parser.yy"
{ (yyval.n) = ast_mul_assign; ;}
break;
- case 86:
+ case 98:
-/* Line 1464 of yacc.c */
-#line 643 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 729 "glsl_parser.yy"
{ (yyval.n) = ast_div_assign; ;}
break;
- case 87:
+ case 99:
-/* Line 1464 of yacc.c */
-#line 644 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 730 "glsl_parser.yy"
{ (yyval.n) = ast_mod_assign; ;}
break;
- case 88:
+ case 100:
-/* Line 1464 of yacc.c */
-#line 645 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 731 "glsl_parser.yy"
{ (yyval.n) = ast_add_assign; ;}
break;
- case 89:
+ case 101:
-/* Line 1464 of yacc.c */
-#line 646 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 732 "glsl_parser.yy"
{ (yyval.n) = ast_sub_assign; ;}
break;
- case 90:
+ case 102:
-/* Line 1464 of yacc.c */
-#line 647 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 733 "glsl_parser.yy"
{ (yyval.n) = ast_ls_assign; ;}
break;
- case 91:
+ case 103:
-/* Line 1464 of yacc.c */
-#line 648 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 734 "glsl_parser.yy"
{ (yyval.n) = ast_rs_assign; ;}
break;
- case 92:
+ case 104:
-/* Line 1464 of yacc.c */
-#line 649 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 735 "glsl_parser.yy"
{ (yyval.n) = ast_and_assign; ;}
break;
- case 93:
+ case 105:
-/* Line 1464 of yacc.c */
-#line 650 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 736 "glsl_parser.yy"
{ (yyval.n) = ast_xor_assign; ;}
break;
- case 94:
+ case 106:
-/* Line 1464 of yacc.c */
-#line 651 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 737 "glsl_parser.yy"
{ (yyval.n) = ast_or_assign; ;}
break;
- case 95:
+ case 107:
-/* Line 1464 of yacc.c */
-#line 656 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 742 "glsl_parser.yy"
{
(yyval.expression) = (yyvsp[(1) - (1)].expression);
;}
break;
- case 96:
+ case 108:
-/* Line 1464 of yacc.c */
-#line 660 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 746 "glsl_parser.yy"
{
void *ctx = state;
if ((yyvsp[(1) - (3)].expression)->oper != ast_sequence) {
@@ -3471,77 +3565,76 @@ yyreduce:
;}
break;
- case 98:
+ case 110:
-/* Line 1464 of yacc.c */
-#line 680 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 766 "glsl_parser.yy"
{
+ state->symbols->pop_scope();
(yyval.node) = (yyvsp[(1) - (2)].function);
;}
break;
- case 99:
+ case 111:
-/* Line 1464 of yacc.c */
-#line 684 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 771 "glsl_parser.yy"
{
(yyval.node) = (yyvsp[(1) - (2)].declarator_list);
;}
break;
- case 100:
+ case 112:
-/* Line 1464 of yacc.c */
-#line 688 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 775 "glsl_parser.yy"
{
- if (((yyvsp[(3) - (4)].type_specifier)->type_specifier != ast_float)
- && ((yyvsp[(3) - (4)].type_specifier)->type_specifier != ast_int)) {
- _mesa_glsl_error(& (yylsp[(3) - (4)]), state, "global precision qualifier can "
- "only be applied to `int' or `float'\n");
- YYERROR;
- }
-
- (yyval.node) = NULL; /* FINISHME */
+ (yyvsp[(3) - (4)].type_specifier)->precision = (yyvsp[(2) - (4)].n);
+ (yyvsp[(3) - (4)].type_specifier)->is_precision_statement = true;
+ (yyval.node) = (yyvsp[(3) - (4)].type_specifier);
;}
break;
- case 104:
+ case 116:
-/* Line 1464 of yacc.c */
-#line 711 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 793 "glsl_parser.yy"
{
(yyval.function) = (yyvsp[(1) - (2)].function);
(yyval.function)->parameters.push_tail(& (yyvsp[(2) - (2)].parameter_declarator)->link);
;}
break;
- case 105:
+ case 117:
-/* Line 1464 of yacc.c */
-#line 716 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 798 "glsl_parser.yy"
{
(yyval.function) = (yyvsp[(1) - (3)].function);
(yyval.function)->parameters.push_tail(& (yyvsp[(3) - (3)].parameter_declarator)->link);
;}
break;
- case 106:
+ case 118:
-/* Line 1464 of yacc.c */
-#line 724 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 806 "glsl_parser.yy"
{
void *ctx = state;
(yyval.function) = new(ctx) ast_function();
(yyval.function)->set_location(yylloc);
(yyval.function)->return_type = (yyvsp[(1) - (3)].fully_specified_type);
(yyval.function)->identifier = (yyvsp[(2) - (3)].identifier);
+
+ state->symbols->add_function(new(state) ir_function((yyvsp[(2) - (3)].identifier)));
+ state->symbols->push_scope();
;}
break;
- case 107:
+ case 119:
-/* Line 1464 of yacc.c */
-#line 735 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 820 "glsl_parser.yy"
{
void *ctx = state;
(yyval.parameter_declarator) = new(ctx) ast_parameter_declarator();
@@ -3553,10 +3646,10 @@ yyreduce:
;}
break;
- case 108:
+ case 120:
-/* Line 1464 of yacc.c */
-#line 745 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 830 "glsl_parser.yy"
{
void *ctx = state;
(yyval.parameter_declarator) = new(ctx) ast_parameter_declarator();
@@ -3570,10 +3663,10 @@ yyreduce:
;}
break;
- case 109:
+ case 121:
-/* Line 1464 of yacc.c */
-#line 760 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 845 "glsl_parser.yy"
{
(yyvsp[(1) - (3)].type_qualifier).flags.i |= (yyvsp[(2) - (3)].type_qualifier).flags.i;
@@ -3582,20 +3675,20 @@ yyreduce:
;}
break;
- case 110:
+ case 122:
-/* Line 1464 of yacc.c */
-#line 767 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 852 "glsl_parser.yy"
{
(yyval.parameter_declarator) = (yyvsp[(2) - (2)].parameter_declarator);
(yyval.parameter_declarator)->type->qualifier = (yyvsp[(1) - (2)].type_qualifier);
;}
break;
- case 111:
+ case 123:
-/* Line 1464 of yacc.c */
-#line 772 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 857 "glsl_parser.yy"
{
void *ctx = state;
(yyvsp[(1) - (3)].type_qualifier).flags.i |= (yyvsp[(2) - (3)].type_qualifier).flags.i;
@@ -3608,10 +3701,10 @@ yyreduce:
;}
break;
- case 112:
+ case 124:
-/* Line 1464 of yacc.c */
-#line 783 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 868 "glsl_parser.yy"
{
void *ctx = state;
(yyval.parameter_declarator) = new(ctx) ast_parameter_declarator();
@@ -3622,39 +3715,39 @@ yyreduce:
;}
break;
- case 113:
+ case 125:
-/* Line 1464 of yacc.c */
-#line 795 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 880 "glsl_parser.yy"
{
memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier)));
;}
break;
- case 114:
+ case 126:
-/* Line 1464 of yacc.c */
-#line 799 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 884 "glsl_parser.yy"
{
memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier)));
(yyval.type_qualifier).flags.q.in = 1;
;}
break;
- case 115:
+ case 127:
-/* Line 1464 of yacc.c */
-#line 804 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 889 "glsl_parser.yy"
{
memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier)));
(yyval.type_qualifier).flags.q.out = 1;
;}
break;
- case 116:
+ case 128:
-/* Line 1464 of yacc.c */
-#line 809 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 894 "glsl_parser.yy"
{
memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier)));
(yyval.type_qualifier).flags.q.in = 1;
@@ -3662,10 +3755,10 @@ yyreduce:
;}
break;
- case 119:
+ case 131:
-/* Line 1464 of yacc.c */
-#line 823 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 908 "glsl_parser.yy"
{
void *ctx = state;
ast_declaration *decl = new(ctx) ast_declaration((yyvsp[(3) - (3)].identifier), false, NULL, NULL);
@@ -3673,13 +3766,14 @@ yyreduce:
(yyval.declarator_list) = (yyvsp[(1) - (3)].declarator_list);
(yyval.declarator_list)->declarations.push_tail(&decl->link);
+ state->symbols->add_variable(new(state) ir_variable(NULL, (yyvsp[(3) - (3)].identifier), ir_var_auto));
;}
break;
- case 120:
+ case 132:
-/* Line 1464 of yacc.c */
-#line 832 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 918 "glsl_parser.yy"
{
void *ctx = state;
ast_declaration *decl = new(ctx) ast_declaration((yyvsp[(3) - (5)].identifier), true, NULL, NULL);
@@ -3687,13 +3781,14 @@ yyreduce:
(yyval.declarator_list) = (yyvsp[(1) - (5)].declarator_list);
(yyval.declarator_list)->declarations.push_tail(&decl->link);
+ state->symbols->add_variable(new(state) ir_variable(NULL, (yyvsp[(3) - (5)].identifier), ir_var_auto));
;}
break;
- case 121:
+ case 133:
-/* Line 1464 of yacc.c */
-#line 841 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 928 "glsl_parser.yy"
{
void *ctx = state;
ast_declaration *decl = new(ctx) ast_declaration((yyvsp[(3) - (6)].identifier), true, (yyvsp[(5) - (6)].expression), NULL);
@@ -3701,13 +3796,14 @@ yyreduce:
(yyval.declarator_list) = (yyvsp[(1) - (6)].declarator_list);
(yyval.declarator_list)->declarations.push_tail(&decl->link);
+ state->symbols->add_variable(new(state) ir_variable(NULL, (yyvsp[(3) - (6)].identifier), ir_var_auto));
;}
break;
- case 122:
+ case 134:
-/* Line 1464 of yacc.c */
-#line 850 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 938 "glsl_parser.yy"
{
void *ctx = state;
ast_declaration *decl = new(ctx) ast_declaration((yyvsp[(3) - (7)].identifier), true, NULL, (yyvsp[(7) - (7)].expression));
@@ -3715,13 +3811,14 @@ yyreduce:
(yyval.declarator_list) = (yyvsp[(1) - (7)].declarator_list);
(yyval.declarator_list)->declarations.push_tail(&decl->link);
+ state->symbols->add_variable(new(state) ir_variable(NULL, (yyvsp[(3) - (7)].identifier), ir_var_auto));
;}
break;
- case 123:
+ case 135:
-/* Line 1464 of yacc.c */
-#line 859 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 948 "glsl_parser.yy"
{
void *ctx = state;
ast_declaration *decl = new(ctx) ast_declaration((yyvsp[(3) - (8)].identifier), true, (yyvsp[(5) - (8)].expression), (yyvsp[(8) - (8)].expression));
@@ -3729,13 +3826,14 @@ yyreduce:
(yyval.declarator_list) = (yyvsp[(1) - (8)].declarator_list);
(yyval.declarator_list)->declarations.push_tail(&decl->link);
+ state->symbols->add_variable(new(state) ir_variable(NULL, (yyvsp[(3) - (8)].identifier), ir_var_auto));
;}
break;
- case 124:
+ case 136:
-/* Line 1464 of yacc.c */
-#line 868 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 958 "glsl_parser.yy"
{
void *ctx = state;
ast_declaration *decl = new(ctx) ast_declaration((yyvsp[(3) - (5)].identifier), false, NULL, (yyvsp[(5) - (5)].expression));
@@ -3743,13 +3841,14 @@ yyreduce:
(yyval.declarator_list) = (yyvsp[(1) - (5)].declarator_list);
(yyval.declarator_list)->declarations.push_tail(&decl->link);
+ state->symbols->add_variable(new(state) ir_variable(NULL, (yyvsp[(3) - (5)].identifier), ir_var_auto));
;}
break;
- case 125:
+ case 137:
-/* Line 1464 of yacc.c */
-#line 881 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 972 "glsl_parser.yy"
{
void *ctx = state;
if ((yyvsp[(1) - (1)].fully_specified_type)->specifier->type_specifier != ast_struct) {
@@ -3762,10 +3861,10 @@ yyreduce:
;}
break;
- case 126:
+ case 138:
-/* Line 1464 of yacc.c */
-#line 892 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 983 "glsl_parser.yy"
{
void *ctx = state;
ast_declaration *decl = new(ctx) ast_declaration((yyvsp[(2) - (2)].identifier), false, NULL, NULL);
@@ -3776,10 +3875,10 @@ yyreduce:
;}
break;
- case 127:
+ case 139:
-/* Line 1464 of yacc.c */
-#line 901 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 992 "glsl_parser.yy"
{
void *ctx = state;
ast_declaration *decl = new(ctx) ast_declaration((yyvsp[(2) - (4)].identifier), true, NULL, NULL);
@@ -3790,10 +3889,10 @@ yyreduce:
;}
break;
- case 128:
+ case 140:
-/* Line 1464 of yacc.c */
-#line 910 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 1001 "glsl_parser.yy"
{
void *ctx = state;
ast_declaration *decl = new(ctx) ast_declaration((yyvsp[(2) - (5)].identifier), true, (yyvsp[(4) - (5)].expression), NULL);
@@ -3804,10 +3903,10 @@ yyreduce:
;}
break;
- case 129:
+ case 141:
-/* Line 1464 of yacc.c */
-#line 919 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 1010 "glsl_parser.yy"
{
void *ctx = state;
ast_declaration *decl = new(ctx) ast_declaration((yyvsp[(2) - (6)].identifier), true, NULL, (yyvsp[(6) - (6)].expression));
@@ -3818,10 +3917,10 @@ yyreduce:
;}
break;
- case 130:
+ case 142:
-/* Line 1464 of yacc.c */
-#line 928 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 1019 "glsl_parser.yy"
{
void *ctx = state;
ast_declaration *decl = new(ctx) ast_declaration((yyvsp[(2) - (7)].identifier), true, (yyvsp[(4) - (7)].expression), (yyvsp[(7) - (7)].expression));
@@ -3832,10 +3931,10 @@ yyreduce:
;}
break;
- case 131:
+ case 143:
-/* Line 1464 of yacc.c */
-#line 937 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 1028 "glsl_parser.yy"
{
void *ctx = state;
ast_declaration *decl = new(ctx) ast_declaration((yyvsp[(2) - (4)].identifier), false, NULL, (yyvsp[(4) - (4)].expression));
@@ -3846,10 +3945,10 @@ yyreduce:
;}
break;
- case 132:
+ case 144:
-/* Line 1464 of yacc.c */
-#line 946 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 1037 "glsl_parser.yy"
{
void *ctx = state;
ast_declaration *decl = new(ctx) ast_declaration((yyvsp[(2) - (2)].identifier), false, NULL, NULL);
@@ -3862,10 +3961,10 @@ yyreduce:
;}
break;
- case 133:
+ case 145:
-/* Line 1464 of yacc.c */
-#line 960 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 1051 "glsl_parser.yy"
{
void *ctx = state;
(yyval.fully_specified_type) = new(ctx) ast_fully_specified_type();
@@ -3874,10 +3973,10 @@ yyreduce:
;}
break;
- case 134:
+ case 146:
-/* Line 1464 of yacc.c */
-#line 967 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 1058 "glsl_parser.yy"
{
void *ctx = state;
(yyval.fully_specified_type) = new(ctx) ast_fully_specified_type();
@@ -3887,19 +3986,19 @@ yyreduce:
;}
break;
- case 135:
+ case 147:
-/* Line 1464 of yacc.c */
-#line 978 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 1069 "glsl_parser.yy"
{
(yyval.type_qualifier) = (yyvsp[(3) - (4)].type_qualifier);
;}
break;
- case 137:
+ case 149:
-/* Line 1464 of yacc.c */
-#line 986 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 1077 "glsl_parser.yy"
{
if (((yyvsp[(1) - (3)].type_qualifier).flags.i & (yyvsp[(3) - (3)].type_qualifier).flags.i) != 0) {
_mesa_glsl_error(& (yylsp[(3) - (3)]), state,
@@ -3917,16 +4016,17 @@ yyreduce:
;}
break;
- case 138:
+ case 150:
-/* Line 1464 of yacc.c */
-#line 1005 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 1096 "glsl_parser.yy"
{
bool got_one = false;
memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier)));
- if (state->ARB_fragment_coord_conventions_enable) {
+ /* Layout qualifiers for ARB_fragment_coord_conventions. */
+ if (!got_one && state->ARB_fragment_coord_conventions_enable) {
if (strcmp((yyvsp[(1) - (1)].identifier), "origin_upper_left") == 0) {
got_one = true;
(yyval.type_qualifier).flags.q.origin_upper_left = 1;
@@ -3934,27 +4034,49 @@ yyreduce:
got_one = true;
(yyval.type_qualifier).flags.q.pixel_center_integer = 1;
}
+
+ if (got_one && state->ARB_fragment_coord_conventions_warn) {
+ _mesa_glsl_warning(& (yylsp[(1) - (1)]), state,
+ "GL_ARB_fragment_coord_conventions layout "
+ "identifier `%s' used\n", (yyvsp[(1) - (1)].identifier));
+ }
+ }
+
+ /* Layout qualifiers for AMD_conservative_depth. */
+ if (!got_one && state->AMD_conservative_depth_enable) {
+ if (strcmp((yyvsp[(1) - (1)].identifier), "depth_any") == 0) {
+ got_one = true;
+ (yyval.type_qualifier).flags.q.depth_any = 1;
+ } else if (strcmp((yyvsp[(1) - (1)].identifier), "depth_greater") == 0) {
+ got_one = true;
+ (yyval.type_qualifier).flags.q.depth_greater = 1;
+ } else if (strcmp((yyvsp[(1) - (1)].identifier), "depth_less") == 0) {
+ got_one = true;
+ (yyval.type_qualifier).flags.q.depth_less = 1;
+ } else if (strcmp((yyvsp[(1) - (1)].identifier), "depth_unchanged") == 0) {
+ got_one = true;
+ (yyval.type_qualifier).flags.q.depth_unchanged = 1;
+ }
+
+ if (got_one && state->AMD_conservative_depth_warn) {
+ _mesa_glsl_warning(& (yylsp[(1) - (1)]), state,
+ "GL_AMD_conservative_depth "
+ "layout qualifier `%s' is used\n", (yyvsp[(1) - (1)].identifier));
+ }
}
- /* If the identifier didn't match any known layout identifiers,
- * emit an error.
- */
if (!got_one) {
_mesa_glsl_error(& (yylsp[(1) - (1)]), state, "unrecognized layout identifier "
"`%s'\n", (yyvsp[(1) - (1)].identifier));
YYERROR;
- } else if (state->ARB_fragment_coord_conventions_warn) {
- _mesa_glsl_warning(& (yylsp[(1) - (1)]), state,
- "GL_ARB_fragment_coord_conventions layout "
- "identifier `%s' used\n", (yyvsp[(1) - (1)].identifier));
}
;}
break;
- case 139:
+ case 151:
-/* Line 1464 of yacc.c */
-#line 1034 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 1148 "glsl_parser.yy"
{
bool got_one = false;
@@ -3994,80 +4116,80 @@ yyreduce:
;}
break;
- case 140:
+ case 152:
-/* Line 1464 of yacc.c */
-#line 1075 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 1189 "glsl_parser.yy"
{
memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier)));
(yyval.type_qualifier).flags.q.smooth = 1;
;}
break;
- case 141:
+ case 153:
-/* Line 1464 of yacc.c */
-#line 1080 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 1194 "glsl_parser.yy"
{
memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier)));
(yyval.type_qualifier).flags.q.flat = 1;
;}
break;
- case 142:
+ case 154:
-/* Line 1464 of yacc.c */
-#line 1085 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 1199 "glsl_parser.yy"
{
memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier)));
(yyval.type_qualifier).flags.q.noperspective = 1;
;}
break;
- case 143:
+ case 155:
-/* Line 1464 of yacc.c */
-#line 1093 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 1207 "glsl_parser.yy"
{
memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier)));
(yyval.type_qualifier).flags.q.constant = 1;
;}
break;
- case 146:
+ case 158:
-/* Line 1464 of yacc.c */
-#line 1103 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 1217 "glsl_parser.yy"
{
(yyval.type_qualifier) = (yyvsp[(1) - (2)].type_qualifier);
(yyval.type_qualifier).flags.i |= (yyvsp[(2) - (2)].type_qualifier).flags.i;
;}
break;
- case 148:
+ case 160:
-/* Line 1464 of yacc.c */
-#line 1109 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 1223 "glsl_parser.yy"
{
(yyval.type_qualifier) = (yyvsp[(1) - (2)].type_qualifier);
(yyval.type_qualifier).flags.i |= (yyvsp[(2) - (2)].type_qualifier).flags.i;
;}
break;
- case 149:
+ case 161:
-/* Line 1464 of yacc.c */
-#line 1114 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 1228 "glsl_parser.yy"
{
(yyval.type_qualifier) = (yyvsp[(2) - (2)].type_qualifier);
(yyval.type_qualifier).flags.q.invariant = 1;
;}
break;
- case 150:
+ case 162:
-/* Line 1464 of yacc.c */
-#line 1119 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 1233 "glsl_parser.yy"
{
(yyval.type_qualifier) = (yyvsp[(2) - (3)].type_qualifier);
(yyval.type_qualifier).flags.i |= (yyvsp[(3) - (3)].type_qualifier).flags.i;
@@ -4075,50 +4197,50 @@ yyreduce:
;}
break;
- case 151:
+ case 163:
-/* Line 1464 of yacc.c */
-#line 1125 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 1239 "glsl_parser.yy"
{
memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier)));
(yyval.type_qualifier).flags.q.invariant = 1;
;}
break;
- case 152:
+ case 164:
-/* Line 1464 of yacc.c */
-#line 1133 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 1247 "glsl_parser.yy"
{
memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier)));
(yyval.type_qualifier).flags.q.constant = 1;
;}
break;
- case 153:
+ case 165:
-/* Line 1464 of yacc.c */
-#line 1138 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 1252 "glsl_parser.yy"
{
memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier)));
(yyval.type_qualifier).flags.q.attribute = 1;
;}
break;
- case 154:
+ case 166:
-/* Line 1464 of yacc.c */
-#line 1143 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 1257 "glsl_parser.yy"
{
memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier)));
(yyval.type_qualifier).flags.q.varying = 1;
;}
break;
- case 155:
+ case 167:
-/* Line 1464 of yacc.c */
-#line 1148 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 1262 "glsl_parser.yy"
{
memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier)));
(yyval.type_qualifier).flags.q.centroid = 1;
@@ -4126,70 +4248,79 @@ yyreduce:
;}
break;
- case 156:
+ case 168:
-/* Line 1464 of yacc.c */
-#line 1154 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 1268 "glsl_parser.yy"
{
memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier)));
(yyval.type_qualifier).flags.q.in = 1;
;}
break;
- case 157:
+ case 169:
-/* Line 1464 of yacc.c */
-#line 1159 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 1273 "glsl_parser.yy"
{
memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier)));
(yyval.type_qualifier).flags.q.out = 1;
;}
break;
- case 158:
+ case 170:
-/* Line 1464 of yacc.c */
-#line 1164 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 1278 "glsl_parser.yy"
{
memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier)));
(yyval.type_qualifier).flags.q.centroid = 1; (yyval.type_qualifier).flags.q.in = 1;
;}
break;
- case 159:
+ case 171:
-/* Line 1464 of yacc.c */
-#line 1169 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 1283 "glsl_parser.yy"
{
memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier)));
(yyval.type_qualifier).flags.q.centroid = 1; (yyval.type_qualifier).flags.q.out = 1;
;}
break;
- case 160:
+ case 172:
-/* Line 1464 of yacc.c */
-#line 1174 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 1288 "glsl_parser.yy"
{
memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier)));
(yyval.type_qualifier).flags.q.uniform = 1;
;}
break;
- case 162:
+ case 173:
-/* Line 1464 of yacc.c */
-#line 1183 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 1296 "glsl_parser.yy"
+ {
+ (yyval.type_specifier) = (yyvsp[(1) - (1)].type_specifier);
+ ;}
+ break;
+
+ case 174:
+
+/* Line 1455 of yacc.c */
+#line 1300 "glsl_parser.yy"
{
(yyval.type_specifier) = (yyvsp[(2) - (2)].type_specifier);
(yyval.type_specifier)->precision = (yyvsp[(1) - (2)].n);
;}
break;
- case 164:
+ case 176:
-/* Line 1464 of yacc.c */
-#line 1192 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 1309 "glsl_parser.yy"
{
(yyval.type_specifier) = (yyvsp[(1) - (3)].type_specifier);
(yyval.type_specifier)->is_array = true;
@@ -4197,10 +4328,10 @@ yyreduce:
;}
break;
- case 165:
+ case 177:
-/* Line 1464 of yacc.c */
-#line 1198 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 1315 "glsl_parser.yy"
{
(yyval.type_specifier) = (yyvsp[(1) - (4)].type_specifier);
(yyval.type_specifier)->is_array = true;
@@ -4208,10 +4339,10 @@ yyreduce:
;}
break;
- case 166:
+ case 178:
-/* Line 1464 of yacc.c */
-#line 1207 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 1324 "glsl_parser.yy"
{
void *ctx = state;
(yyval.type_specifier) = new(ctx) ast_type_specifier((yyvsp[(1) - (1)].n));
@@ -4219,10 +4350,10 @@ yyreduce:
;}
break;
- case 167:
+ case 179:
-/* Line 1464 of yacc.c */
-#line 1213 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 1330 "glsl_parser.yy"
{
void *ctx = state;
(yyval.type_specifier) = new(ctx) ast_type_specifier((yyvsp[(1) - (1)].struct_specifier));
@@ -4230,10 +4361,10 @@ yyreduce:
;}
break;
- case 168:
+ case 180:
-/* Line 1464 of yacc.c */
-#line 1219 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 1336 "glsl_parser.yy"
{
void *ctx = state;
(yyval.type_specifier) = new(ctx) ast_type_specifier((yyvsp[(1) - (1)].identifier));
@@ -4241,429 +4372,427 @@ yyreduce:
;}
break;
- case 169:
+ case 181:
-/* Line 1464 of yacc.c */
-#line 1227 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 1344 "glsl_parser.yy"
{ (yyval.n) = ast_void; ;}
break;
- case 170:
+ case 182:
-/* Line 1464 of yacc.c */
-#line 1228 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 1345 "glsl_parser.yy"
{ (yyval.n) = ast_float; ;}
break;
- case 171:
+ case 183:
-/* Line 1464 of yacc.c */
-#line 1229 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 1346 "glsl_parser.yy"
{ (yyval.n) = ast_int; ;}
break;
- case 172:
+ case 184:
-/* Line 1464 of yacc.c */
-#line 1230 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 1347 "glsl_parser.yy"
{ (yyval.n) = ast_uint; ;}
break;
- case 173:
+ case 185:
-/* Line 1464 of yacc.c */
-#line 1231 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 1348 "glsl_parser.yy"
{ (yyval.n) = ast_bool; ;}
break;
- case 174:
+ case 186:
-/* Line 1464 of yacc.c */
-#line 1232 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 1349 "glsl_parser.yy"
{ (yyval.n) = ast_vec2; ;}
break;
- case 175:
+ case 187:
-/* Line 1464 of yacc.c */
-#line 1233 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 1350 "glsl_parser.yy"
{ (yyval.n) = ast_vec3; ;}
break;
- case 176:
+ case 188:
-/* Line 1464 of yacc.c */
-#line 1234 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 1351 "glsl_parser.yy"
{ (yyval.n) = ast_vec4; ;}
break;
- case 177:
+ case 189:
-/* Line 1464 of yacc.c */
-#line 1235 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 1352 "glsl_parser.yy"
{ (yyval.n) = ast_bvec2; ;}
break;
- case 178:
+ case 190:
-/* Line 1464 of yacc.c */
-#line 1236 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 1353 "glsl_parser.yy"
{ (yyval.n) = ast_bvec3; ;}
break;
- case 179:
+ case 191:
-/* Line 1464 of yacc.c */
-#line 1237 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 1354 "glsl_parser.yy"
{ (yyval.n) = ast_bvec4; ;}
break;
- case 180:
+ case 192:
-/* Line 1464 of yacc.c */
-#line 1238 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 1355 "glsl_parser.yy"
{ (yyval.n) = ast_ivec2; ;}
break;
- case 181:
+ case 193:
-/* Line 1464 of yacc.c */
-#line 1239 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 1356 "glsl_parser.yy"
{ (yyval.n) = ast_ivec3; ;}
break;
- case 182:
+ case 194:
-/* Line 1464 of yacc.c */
-#line 1240 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 1357 "glsl_parser.yy"
{ (yyval.n) = ast_ivec4; ;}
break;
- case 183:
+ case 195:
-/* Line 1464 of yacc.c */
-#line 1241 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 1358 "glsl_parser.yy"
{ (yyval.n) = ast_uvec2; ;}
break;
- case 184:
+ case 196:
-/* Line 1464 of yacc.c */
-#line 1242 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 1359 "glsl_parser.yy"
{ (yyval.n) = ast_uvec3; ;}
break;
- case 185:
+ case 197:
-/* Line 1464 of yacc.c */
-#line 1243 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 1360 "glsl_parser.yy"
{ (yyval.n) = ast_uvec4; ;}
break;
- case 186:
+ case 198:
-/* Line 1464 of yacc.c */
-#line 1244 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 1361 "glsl_parser.yy"
{ (yyval.n) = ast_mat2; ;}
break;
- case 187:
+ case 199:
-/* Line 1464 of yacc.c */
-#line 1245 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 1362 "glsl_parser.yy"
{ (yyval.n) = ast_mat2x3; ;}
break;
- case 188:
+ case 200:
-/* Line 1464 of yacc.c */
-#line 1246 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 1363 "glsl_parser.yy"
{ (yyval.n) = ast_mat2x4; ;}
break;
- case 189:
+ case 201:
-/* Line 1464 of yacc.c */
-#line 1247 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 1364 "glsl_parser.yy"
{ (yyval.n) = ast_mat3x2; ;}
break;
- case 190:
+ case 202:
-/* Line 1464 of yacc.c */
-#line 1248 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 1365 "glsl_parser.yy"
{ (yyval.n) = ast_mat3; ;}
break;
- case 191:
+ case 203:
-/* Line 1464 of yacc.c */
-#line 1249 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 1366 "glsl_parser.yy"
{ (yyval.n) = ast_mat3x4; ;}
break;
- case 192:
+ case 204:
-/* Line 1464 of yacc.c */
-#line 1250 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 1367 "glsl_parser.yy"
{ (yyval.n) = ast_mat4x2; ;}
break;
- case 193:
+ case 205:
-/* Line 1464 of yacc.c */
-#line 1251 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 1368 "glsl_parser.yy"
{ (yyval.n) = ast_mat4x3; ;}
break;
- case 194:
+ case 206:
-/* Line 1464 of yacc.c */
-#line 1252 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 1369 "glsl_parser.yy"
{ (yyval.n) = ast_mat4; ;}
break;
- case 195:
+ case 207:
-/* Line 1464 of yacc.c */
-#line 1253 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 1370 "glsl_parser.yy"
{ (yyval.n) = ast_sampler1d; ;}
break;
- case 196:
+ case 208:
-/* Line 1464 of yacc.c */
-#line 1254 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 1371 "glsl_parser.yy"
{ (yyval.n) = ast_sampler2d; ;}
break;
- case 197:
+ case 209:
-/* Line 1464 of yacc.c */
-#line 1255 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 1372 "glsl_parser.yy"
{ (yyval.n) = ast_sampler2drect; ;}
break;
- case 198:
+ case 210:
-/* Line 1464 of yacc.c */
-#line 1256 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 1373 "glsl_parser.yy"
{ (yyval.n) = ast_sampler3d; ;}
break;
- case 199:
+ case 211:
-/* Line 1464 of yacc.c */
-#line 1257 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 1374 "glsl_parser.yy"
{ (yyval.n) = ast_samplercube; ;}
break;
- case 200:
+ case 212:
-/* Line 1464 of yacc.c */
-#line 1258 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 1375 "glsl_parser.yy"
{ (yyval.n) = ast_sampler1dshadow; ;}
break;
- case 201:
+ case 213:
-/* Line 1464 of yacc.c */
-#line 1259 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 1376 "glsl_parser.yy"
{ (yyval.n) = ast_sampler2dshadow; ;}
break;
- case 202:
+ case 214:
-/* Line 1464 of yacc.c */
-#line 1260 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 1377 "glsl_parser.yy"
{ (yyval.n) = ast_sampler2drectshadow; ;}
break;
- case 203:
+ case 215:
-/* Line 1464 of yacc.c */
-#line 1261 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 1378 "glsl_parser.yy"
{ (yyval.n) = ast_samplercubeshadow; ;}
break;
- case 204:
+ case 216:
-/* Line 1464 of yacc.c */
-#line 1262 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 1379 "glsl_parser.yy"
{ (yyval.n) = ast_sampler1darray; ;}
break;
- case 205:
+ case 217:
-/* Line 1464 of yacc.c */
-#line 1263 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 1380 "glsl_parser.yy"
{ (yyval.n) = ast_sampler2darray; ;}
break;
- case 206:
+ case 218:
-/* Line 1464 of yacc.c */
-#line 1264 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 1381 "glsl_parser.yy"
{ (yyval.n) = ast_sampler1darrayshadow; ;}
break;
- case 207:
+ case 219:
-/* Line 1464 of yacc.c */
-#line 1265 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 1382 "glsl_parser.yy"
{ (yyval.n) = ast_sampler2darrayshadow; ;}
break;
- case 208:
+ case 220:
-/* Line 1464 of yacc.c */
-#line 1266 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 1383 "glsl_parser.yy"
{ (yyval.n) = ast_isampler1d; ;}
break;
- case 209:
+ case 221:
-/* Line 1464 of yacc.c */
-#line 1267 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 1384 "glsl_parser.yy"
{ (yyval.n) = ast_isampler2d; ;}
break;
- case 210:
+ case 222:
-/* Line 1464 of yacc.c */
-#line 1268 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 1385 "glsl_parser.yy"
{ (yyval.n) = ast_isampler3d; ;}
break;
- case 211:
+ case 223:
-/* Line 1464 of yacc.c */
-#line 1269 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 1386 "glsl_parser.yy"
{ (yyval.n) = ast_isamplercube; ;}
break;
- case 212:
+ case 224:
-/* Line 1464 of yacc.c */
-#line 1270 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 1387 "glsl_parser.yy"
{ (yyval.n) = ast_isampler1darray; ;}
break;
- case 213:
+ case 225:
-/* Line 1464 of yacc.c */
-#line 1271 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 1388 "glsl_parser.yy"
{ (yyval.n) = ast_isampler2darray; ;}
break;
- case 214:
+ case 226:
-/* Line 1464 of yacc.c */
-#line 1272 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 1389 "glsl_parser.yy"
{ (yyval.n) = ast_usampler1d; ;}
break;
- case 215:
+ case 227:
-/* Line 1464 of yacc.c */
-#line 1273 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 1390 "glsl_parser.yy"
{ (yyval.n) = ast_usampler2d; ;}
break;
- case 216:
+ case 228:
-/* Line 1464 of yacc.c */
-#line 1274 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 1391 "glsl_parser.yy"
{ (yyval.n) = ast_usampler3d; ;}
break;
- case 217:
+ case 229:
-/* Line 1464 of yacc.c */
-#line 1275 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 1392 "glsl_parser.yy"
{ (yyval.n) = ast_usamplercube; ;}
break;
- case 218:
+ case 230:
-/* Line 1464 of yacc.c */
-#line 1276 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 1393 "glsl_parser.yy"
{ (yyval.n) = ast_usampler1darray; ;}
break;
- case 219:
+ case 231:
-/* Line 1464 of yacc.c */
-#line 1277 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 1394 "glsl_parser.yy"
{ (yyval.n) = ast_usampler2darray; ;}
break;
- case 220:
+ case 232:
-/* Line 1464 of yacc.c */
-#line 1281 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 1398 "glsl_parser.yy"
{
if (!state->es_shader && state->language_version < 130)
_mesa_glsl_error(& (yylsp[(1) - (1)]), state,
"precision qualifier forbidden "
- "in GLSL %d.%d (1.30 or later "
+ "in %s (1.30 or later "
"required)\n",
- state->language_version / 100,
- state->language_version % 100);
+ state->version_string);
(yyval.n) = ast_precision_high;
;}
break;
- case 221:
+ case 233:
-/* Line 1464 of yacc.c */
-#line 1292 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 1408 "glsl_parser.yy"
{
if (!state->es_shader && state->language_version < 130)
_mesa_glsl_error(& (yylsp[(1) - (1)]), state,
"precision qualifier forbidden "
- "in GLSL %d.%d (1.30 or later "
+ "in %s (1.30 or later "
"required)\n",
- state->language_version / 100,
- state->language_version % 100);
+ state->version_string);
(yyval.n) = ast_precision_medium;
;}
break;
- case 222:
+ case 234:
-/* Line 1464 of yacc.c */
-#line 1303 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 1418 "glsl_parser.yy"
{
if (!state->es_shader && state->language_version < 130)
_mesa_glsl_error(& (yylsp[(1) - (1)]), state,
"precision qualifier forbidden "
- "in GLSL %d.%d (1.30 or later "
+ "in %s (1.30 or later "
"required)\n",
- state->language_version / 100,
- state->language_version % 100);
+ state->version_string);
(yyval.n) = ast_precision_low;
;}
break;
- case 223:
+ case 235:
-/* Line 1464 of yacc.c */
-#line 1318 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 1432 "glsl_parser.yy"
{
void *ctx = state;
(yyval.struct_specifier) = new(ctx) ast_struct_specifier((yyvsp[(2) - (5)].identifier), (yyvsp[(4) - (5)].node));
(yyval.struct_specifier)->set_location(yylloc);
+ state->symbols->add_type((yyvsp[(2) - (5)].identifier), glsl_type::void_type);
;}
break;
- case 224:
+ case 236:
-/* Line 1464 of yacc.c */
-#line 1324 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 1439 "glsl_parser.yy"
{
void *ctx = state;
(yyval.struct_specifier) = new(ctx) ast_struct_specifier(NULL, (yyvsp[(3) - (4)].node));
@@ -4671,30 +4800,30 @@ yyreduce:
;}
break;
- case 225:
+ case 237:
-/* Line 1464 of yacc.c */
-#line 1333 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 1448 "glsl_parser.yy"
{
(yyval.node) = (ast_node *) (yyvsp[(1) - (1)].declarator_list);
(yyvsp[(1) - (1)].declarator_list)->link.self_link();
;}
break;
- case 226:
+ case 238:
-/* Line 1464 of yacc.c */
-#line 1338 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 1453 "glsl_parser.yy"
{
(yyval.node) = (ast_node *) (yyvsp[(1) - (2)].node);
(yyval.node)->link.insert_before(& (yyvsp[(2) - (2)].declarator_list)->link);
;}
break;
- case 227:
+ case 239:
-/* Line 1464 of yacc.c */
-#line 1346 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 1461 "glsl_parser.yy"
{
void *ctx = state;
ast_fully_specified_type *type = new(ctx) ast_fully_specified_type();
@@ -4708,41 +4837,42 @@ yyreduce:
;}
break;
- case 228:
+ case 240:
-/* Line 1464 of yacc.c */
-#line 1361 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 1476 "glsl_parser.yy"
{
(yyval.declaration) = (yyvsp[(1) - (1)].declaration);
(yyvsp[(1) - (1)].declaration)->link.self_link();
;}
break;
- case 229:
+ case 241:
-/* Line 1464 of yacc.c */
-#line 1366 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 1481 "glsl_parser.yy"
{
(yyval.declaration) = (yyvsp[(1) - (3)].declaration);
(yyval.declaration)->link.insert_before(& (yyvsp[(3) - (3)].declaration)->link);
;}
break;
- case 230:
+ case 242:
-/* Line 1464 of yacc.c */
-#line 1374 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 1489 "glsl_parser.yy"
{
void *ctx = state;
(yyval.declaration) = new(ctx) ast_declaration((yyvsp[(1) - (1)].identifier), false, NULL, NULL);
(yyval.declaration)->set_location(yylloc);
+ state->symbols->add_variable(new(state) ir_variable(NULL, (yyvsp[(1) - (1)].identifier), ir_var_auto));
;}
break;
- case 231:
+ case 243:
-/* Line 1464 of yacc.c */
-#line 1380 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 1496 "glsl_parser.yy"
{
void *ctx = state;
(yyval.declaration) = new(ctx) ast_declaration((yyvsp[(1) - (4)].identifier), true, (yyvsp[(3) - (4)].expression), NULL);
@@ -4750,31 +4880,31 @@ yyreduce:
;}
break;
- case 234:
+ case 246:
-/* Line 1464 of yacc.c */
-#line 1398 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 1514 "glsl_parser.yy"
{ (yyval.node) = (ast_node *) (yyvsp[(1) - (1)].compound_statement); ;}
break;
- case 239:
+ case 251:
-/* Line 1464 of yacc.c */
-#line 1406 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 1522 "glsl_parser.yy"
{ (yyval.node) = NULL; ;}
break;
- case 240:
+ case 252:
-/* Line 1464 of yacc.c */
-#line 1407 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 1523 "glsl_parser.yy"
{ (yyval.node) = NULL; ;}
break;
- case 243:
+ case 255:
-/* Line 1464 of yacc.c */
-#line 1414 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 1530 "glsl_parser.yy"
{
void *ctx = state;
(yyval.compound_statement) = new(ctx) ast_compound_statement(true, NULL);
@@ -4782,28 +4912,38 @@ yyreduce:
;}
break;
- case 244:
+ case 256:
-/* Line 1464 of yacc.c */
-#line 1420 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 1536 "glsl_parser.yy"
+ {
+ state->symbols->push_scope();
+ ;}
+ break;
+
+ case 257:
+
+/* Line 1455 of yacc.c */
+#line 1540 "glsl_parser.yy"
{
void *ctx = state;
- (yyval.compound_statement) = new(ctx) ast_compound_statement(true, (yyvsp[(2) - (3)].node));
+ (yyval.compound_statement) = new(ctx) ast_compound_statement(true, (yyvsp[(3) - (4)].node));
(yyval.compound_statement)->set_location(yylloc);
+ state->symbols->pop_scope();
;}
break;
- case 245:
+ case 258:
-/* Line 1464 of yacc.c */
-#line 1428 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 1549 "glsl_parser.yy"
{ (yyval.node) = (ast_node *) (yyvsp[(1) - (1)].compound_statement); ;}
break;
- case 247:
+ case 260:
-/* Line 1464 of yacc.c */
-#line 1434 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 1555 "glsl_parser.yy"
{
void *ctx = state;
(yyval.compound_statement) = new(ctx) ast_compound_statement(false, NULL);
@@ -4811,10 +4951,10 @@ yyreduce:
;}
break;
- case 248:
+ case 261:
-/* Line 1464 of yacc.c */
-#line 1440 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 1561 "glsl_parser.yy"
{
void *ctx = state;
(yyval.compound_statement) = new(ctx) ast_compound_statement(false, (yyvsp[(2) - (3)].node));
@@ -4822,10 +4962,10 @@ yyreduce:
;}
break;
- case 249:
+ case 262:
-/* Line 1464 of yacc.c */
-#line 1449 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 1570 "glsl_parser.yy"
{
if ((yyvsp[(1) - (1)].node) == NULL) {
_mesa_glsl_error(& (yylsp[(1) - (1)]), state, "<nil> statement\n");
@@ -4837,10 +4977,10 @@ yyreduce:
;}
break;
- case 250:
+ case 263:
-/* Line 1464 of yacc.c */
-#line 1459 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 1580 "glsl_parser.yy"
{
if ((yyvsp[(2) - (2)].node) == NULL) {
_mesa_glsl_error(& (yylsp[(2) - (2)]), state, "<nil> statement\n");
@@ -4851,10 +4991,10 @@ yyreduce:
;}
break;
- case 251:
+ case 264:
-/* Line 1464 of yacc.c */
-#line 1471 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 1592 "glsl_parser.yy"
{
void *ctx = state;
(yyval.node) = new(ctx) ast_expression_statement(NULL);
@@ -4862,10 +5002,10 @@ yyreduce:
;}
break;
- case 252:
+ case 265:
-/* Line 1464 of yacc.c */
-#line 1477 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 1598 "glsl_parser.yy"
{
void *ctx = state;
(yyval.node) = new(ctx) ast_expression_statement((yyvsp[(1) - (2)].expression));
@@ -4873,10 +5013,10 @@ yyreduce:
;}
break;
- case 253:
+ case 266:
-/* Line 1464 of yacc.c */
-#line 1486 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 1607 "glsl_parser.yy"
{
(yyval.node) = new(state) ast_selection_statement((yyvsp[(3) - (5)].expression), (yyvsp[(5) - (5)].selection_rest_statement).then_statement,
(yyvsp[(5) - (5)].selection_rest_statement).else_statement);
@@ -4884,39 +5024,39 @@ yyreduce:
;}
break;
- case 254:
+ case 267:
-/* Line 1464 of yacc.c */
-#line 1495 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 1616 "glsl_parser.yy"
{
(yyval.selection_rest_statement).then_statement = (yyvsp[(1) - (3)].node);
(yyval.selection_rest_statement).else_statement = (yyvsp[(3) - (3)].node);
;}
break;
- case 255:
+ case 268:
-/* Line 1464 of yacc.c */
-#line 1500 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 1621 "glsl_parser.yy"
{
(yyval.selection_rest_statement).then_statement = (yyvsp[(1) - (1)].node);
(yyval.selection_rest_statement).else_statement = NULL;
;}
break;
- case 256:
+ case 269:
-/* Line 1464 of yacc.c */
-#line 1508 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 1629 "glsl_parser.yy"
{
(yyval.node) = (ast_node *) (yyvsp[(1) - (1)].expression);
;}
break;
- case 257:
+ case 270:
-/* Line 1464 of yacc.c */
-#line 1512 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 1633 "glsl_parser.yy"
{
void *ctx = state;
ast_declaration *decl = new(ctx) ast_declaration((yyvsp[(2) - (4)].identifier), false, NULL, (yyvsp[(4) - (4)].expression));
@@ -4929,10 +5069,10 @@ yyreduce:
;}
break;
- case 261:
+ case 274:
-/* Line 1464 of yacc.c */
-#line 1535 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 1656 "glsl_parser.yy"
{
void *ctx = state;
(yyval.node) = new(ctx) ast_iteration_statement(ast_iteration_statement::ast_while,
@@ -4941,10 +5081,10 @@ yyreduce:
;}
break;
- case 262:
+ case 275:
-/* Line 1464 of yacc.c */
-#line 1542 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 1663 "glsl_parser.yy"
{
void *ctx = state;
(yyval.node) = new(ctx) ast_iteration_statement(ast_iteration_statement::ast_do_while,
@@ -4953,10 +5093,10 @@ yyreduce:
;}
break;
- case 263:
+ case 276:
-/* Line 1464 of yacc.c */
-#line 1549 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 1670 "glsl_parser.yy"
{
void *ctx = state;
(yyval.node) = new(ctx) ast_iteration_statement(ast_iteration_statement::ast_for,
@@ -4965,39 +5105,39 @@ yyreduce:
;}
break;
- case 267:
+ case 280:
-/* Line 1464 of yacc.c */
-#line 1565 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 1686 "glsl_parser.yy"
{
(yyval.node) = NULL;
;}
break;
- case 268:
+ case 281:
-/* Line 1464 of yacc.c */
-#line 1572 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 1693 "glsl_parser.yy"
{
(yyval.for_rest_statement).cond = (yyvsp[(1) - (2)].node);
(yyval.for_rest_statement).rest = NULL;
;}
break;
- case 269:
+ case 282:
-/* Line 1464 of yacc.c */
-#line 1577 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 1698 "glsl_parser.yy"
{
(yyval.for_rest_statement).cond = (yyvsp[(1) - (3)].node);
(yyval.for_rest_statement).rest = (yyvsp[(3) - (3)].expression);
;}
break;
- case 270:
+ case 283:
-/* Line 1464 of yacc.c */
-#line 1586 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 1707 "glsl_parser.yy"
{
void *ctx = state;
(yyval.node) = new(ctx) ast_jump_statement(ast_jump_statement::ast_continue, NULL);
@@ -5005,10 +5145,10 @@ yyreduce:
;}
break;
- case 271:
+ case 284:
-/* Line 1464 of yacc.c */
-#line 1592 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 1713 "glsl_parser.yy"
{
void *ctx = state;
(yyval.node) = new(ctx) ast_jump_statement(ast_jump_statement::ast_break, NULL);
@@ -5016,10 +5156,10 @@ yyreduce:
;}
break;
- case 272:
+ case 285:
-/* Line 1464 of yacc.c */
-#line 1598 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 1719 "glsl_parser.yy"
{
void *ctx = state;
(yyval.node) = new(ctx) ast_jump_statement(ast_jump_statement::ast_return, NULL);
@@ -5027,10 +5167,10 @@ yyreduce:
;}
break;
- case 273:
+ case 286:
-/* Line 1464 of yacc.c */
-#line 1604 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 1725 "glsl_parser.yy"
{
void *ctx = state;
(yyval.node) = new(ctx) ast_jump_statement(ast_jump_statement::ast_return, (yyvsp[(2) - (3)].expression));
@@ -5038,10 +5178,10 @@ yyreduce:
;}
break;
- case 274:
+ case 287:
-/* Line 1464 of yacc.c */
-#line 1610 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 1731 "glsl_parser.yy"
{
void *ctx = state;
(yyval.node) = new(ctx) ast_jump_statement(ast_jump_statement::ast_discard, NULL);
@@ -5049,44 +5189,46 @@ yyreduce:
;}
break;
- case 275:
+ case 288:
-/* Line 1464 of yacc.c */
-#line 1618 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 1739 "glsl_parser.yy"
{ (yyval.node) = (yyvsp[(1) - (1)].function_definition); ;}
break;
- case 276:
+ case 289:
-/* Line 1464 of yacc.c */
-#line 1619 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 1740 "glsl_parser.yy"
{ (yyval.node) = (yyvsp[(1) - (1)].node); ;}
break;
- case 277:
+ case 290:
-/* Line 1464 of yacc.c */
-#line 1620 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 1741 "glsl_parser.yy"
{ (yyval.node) = NULL; ;}
break;
- case 278:
+ case 291:
-/* Line 1464 of yacc.c */
-#line 1625 "glsl_parser.ypp"
+/* Line 1455 of yacc.c */
+#line 1746 "glsl_parser.yy"
{
void *ctx = state;
(yyval.function_definition) = new(ctx) ast_function_definition();
(yyval.function_definition)->set_location(yylloc);
(yyval.function_definition)->prototype = (yyvsp[(1) - (2)].function);
(yyval.function_definition)->body = (yyvsp[(2) - (2)].compound_statement);
+
+ state->symbols->pop_scope();
;}
break;
-/* Line 1464 of yacc.c */
-#line 5090 "glsl_parser.cpp"
+/* Line 1455 of yacc.c */
+#line 5232 "glsl_parser.cpp"
default: break;
}
YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
@@ -5158,7 +5300,7 @@ yyerrlab:
#endif
}
- yyerror_range[1] = yylloc;
+ yyerror_range[0] = yylloc;
if (yyerrstatus == 3)
{
@@ -5195,7 +5337,7 @@ yyerrorlab:
if (/*CONSTCOND*/ 0)
goto yyerrorlab;
- yyerror_range[1] = yylsp[1-yylen];
+ yyerror_range[0] = yylsp[1-yylen];
/* Do not reclaim the symbols of the rule which action triggered
this YYERROR. */
YYPOPSTACK (yylen);
@@ -5229,7 +5371,7 @@ yyerrlab1:
if (yyssp == yyss)
YYABORT;
- yyerror_range[1] = *yylsp;
+ yyerror_range[0] = *yylsp;
yydestruct ("Error: popping",
yystos[yystate], yyvsp, yylsp, state);
YYPOPSTACK (1);
@@ -5239,10 +5381,10 @@ yyerrlab1:
*++yyvsp = yylval;
- yyerror_range[2] = yylloc;
+ yyerror_range[1] = yylloc;
/* Using YYLLOC is tempting, but would change the location of
the lookahead. YYLOC is available though. */
- YYLLOC_DEFAULT (yyloc, yyerror_range, 2);
+ YYLLOC_DEFAULT (yyloc, (yyerror_range - 1), 2);
*++yylsp = yyloc;
/* Shift the error token. */
diff --git a/src/glsl/glsl_parser.h b/src/glsl/glsl_parser.h
index 83aa56f7cbe..091e2858a2c 100644
--- a/src/glsl/glsl_parser.h
+++ b/src/glsl/glsl_parser.h
@@ -1,9 +1,10 @@
-/* A Bison parser, made by GNU Bison 2.4.3. */
+
+/* A Bison parser, made by GNU Bison 2.4.1. */
/* Skeleton interface for Bison's Yacc-like parsers in C
- Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2009, 2010 Free Software Foundation, Inc.
+ Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+ Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -112,122 +113,125 @@
VOID_TOK = 329,
WHILE = 330,
IDENTIFIER = 331,
- FLOATCONSTANT = 332,
- INTCONSTANT = 333,
- UINTCONSTANT = 334,
- BOOLCONSTANT = 335,
- FIELD_SELECTION = 336,
- LEFT_OP = 337,
- RIGHT_OP = 338,
- INC_OP = 339,
- DEC_OP = 340,
- LE_OP = 341,
- GE_OP = 342,
- EQ_OP = 343,
- NE_OP = 344,
- AND_OP = 345,
- OR_OP = 346,
- XOR_OP = 347,
- MUL_ASSIGN = 348,
- DIV_ASSIGN = 349,
- ADD_ASSIGN = 350,
- MOD_ASSIGN = 351,
- LEFT_ASSIGN = 352,
- RIGHT_ASSIGN = 353,
- AND_ASSIGN = 354,
- XOR_ASSIGN = 355,
- OR_ASSIGN = 356,
- SUB_ASSIGN = 357,
- INVARIANT = 358,
- LOWP = 359,
- MEDIUMP = 360,
- HIGHP = 361,
- SUPERP = 362,
- PRECISION = 363,
- VERSION = 364,
- EXTENSION = 365,
- LINE = 366,
- COLON = 367,
- EOL = 368,
- INTERFACE = 369,
- OUTPUT = 370,
- PRAGMA_DEBUG_ON = 371,
- PRAGMA_DEBUG_OFF = 372,
- PRAGMA_OPTIMIZE_ON = 373,
- PRAGMA_OPTIMIZE_OFF = 374,
- LAYOUT_TOK = 375,
- ASM = 376,
- CLASS = 377,
- UNION = 378,
- ENUM = 379,
- TYPEDEF = 380,
- TEMPLATE = 381,
- THIS = 382,
- PACKED_TOK = 383,
- GOTO = 384,
- INLINE_TOK = 385,
- NOINLINE = 386,
- VOLATILE = 387,
- PUBLIC_TOK = 388,
- STATIC = 389,
- EXTERN = 390,
- EXTERNAL = 391,
- LONG_TOK = 392,
- SHORT_TOK = 393,
- DOUBLE_TOK = 394,
- HALF = 395,
- FIXED_TOK = 396,
- UNSIGNED = 397,
- INPUT_TOK = 398,
- OUPTUT = 399,
- HVEC2 = 400,
- HVEC3 = 401,
- HVEC4 = 402,
- DVEC2 = 403,
- DVEC3 = 404,
- DVEC4 = 405,
- FVEC2 = 406,
- FVEC3 = 407,
- FVEC4 = 408,
- SAMPLER2DRECT = 409,
- SAMPLER3DRECT = 410,
- SAMPLER2DRECTSHADOW = 411,
- SIZEOF = 412,
- CAST = 413,
- NAMESPACE = 414,
- USING = 415,
- ERROR_TOK = 416,
- COMMON = 417,
- PARTITION = 418,
- ACTIVE = 419,
- SAMPLERBUFFER = 420,
- FILTER = 421,
- IMAGE1D = 422,
- IMAGE2D = 423,
- IMAGE3D = 424,
- IMAGECUBE = 425,
- IMAGE1DARRAY = 426,
- IMAGE2DARRAY = 427,
- IIMAGE1D = 428,
- IIMAGE2D = 429,
- IIMAGE3D = 430,
- IIMAGECUBE = 431,
- IIMAGE1DARRAY = 432,
- IIMAGE2DARRAY = 433,
- UIMAGE1D = 434,
- UIMAGE2D = 435,
- UIMAGE3D = 436,
- UIMAGECUBE = 437,
- UIMAGE1DARRAY = 438,
- UIMAGE2DARRAY = 439,
- IMAGE1DSHADOW = 440,
- IMAGE2DSHADOW = 441,
- IMAGEBUFFER = 442,
- IIMAGEBUFFER = 443,
- UIMAGEBUFFER = 444,
- IMAGE1DARRAYSHADOW = 445,
- IMAGE2DARRAYSHADOW = 446,
- ROW_MAJOR = 447
+ TYPE_IDENTIFIER = 332,
+ NEW_IDENTIFIER = 333,
+ FLOATCONSTANT = 334,
+ INTCONSTANT = 335,
+ UINTCONSTANT = 336,
+ BOOLCONSTANT = 337,
+ FIELD_SELECTION = 338,
+ LEFT_OP = 339,
+ RIGHT_OP = 340,
+ INC_OP = 341,
+ DEC_OP = 342,
+ LE_OP = 343,
+ GE_OP = 344,
+ EQ_OP = 345,
+ NE_OP = 346,
+ AND_OP = 347,
+ OR_OP = 348,
+ XOR_OP = 349,
+ MUL_ASSIGN = 350,
+ DIV_ASSIGN = 351,
+ ADD_ASSIGN = 352,
+ MOD_ASSIGN = 353,
+ LEFT_ASSIGN = 354,
+ RIGHT_ASSIGN = 355,
+ AND_ASSIGN = 356,
+ XOR_ASSIGN = 357,
+ OR_ASSIGN = 358,
+ SUB_ASSIGN = 359,
+ INVARIANT = 360,
+ LOWP = 361,
+ MEDIUMP = 362,
+ HIGHP = 363,
+ SUPERP = 364,
+ PRECISION = 365,
+ VERSION = 366,
+ EXTENSION = 367,
+ LINE = 368,
+ COLON = 369,
+ EOL = 370,
+ INTERFACE = 371,
+ OUTPUT = 372,
+ PRAGMA_DEBUG_ON = 373,
+ PRAGMA_DEBUG_OFF = 374,
+ PRAGMA_OPTIMIZE_ON = 375,
+ PRAGMA_OPTIMIZE_OFF = 376,
+ PRAGMA_INVARIANT_ALL = 377,
+ LAYOUT_TOK = 378,
+ ASM = 379,
+ CLASS = 380,
+ UNION = 381,
+ ENUM = 382,
+ TYPEDEF = 383,
+ TEMPLATE = 384,
+ THIS = 385,
+ PACKED_TOK = 386,
+ GOTO = 387,
+ INLINE_TOK = 388,
+ NOINLINE = 389,
+ VOLATILE = 390,
+ PUBLIC_TOK = 391,
+ STATIC = 392,
+ EXTERN = 393,
+ EXTERNAL = 394,
+ LONG_TOK = 395,
+ SHORT_TOK = 396,
+ DOUBLE_TOK = 397,
+ HALF = 398,
+ FIXED_TOK = 399,
+ UNSIGNED = 400,
+ INPUT_TOK = 401,
+ OUPTUT = 402,
+ HVEC2 = 403,
+ HVEC3 = 404,
+ HVEC4 = 405,
+ DVEC2 = 406,
+ DVEC3 = 407,
+ DVEC4 = 408,
+ FVEC2 = 409,
+ FVEC3 = 410,
+ FVEC4 = 411,
+ SAMPLER2DRECT = 412,
+ SAMPLER3DRECT = 413,
+ SAMPLER2DRECTSHADOW = 414,
+ SIZEOF = 415,
+ CAST = 416,
+ NAMESPACE = 417,
+ USING = 418,
+ ERROR_TOK = 419,
+ COMMON = 420,
+ PARTITION = 421,
+ ACTIVE = 422,
+ SAMPLERBUFFER = 423,
+ FILTER = 424,
+ IMAGE1D = 425,
+ IMAGE2D = 426,
+ IMAGE3D = 427,
+ IMAGECUBE = 428,
+ IMAGE1DARRAY = 429,
+ IMAGE2DARRAY = 430,
+ IIMAGE1D = 431,
+ IIMAGE2D = 432,
+ IIMAGE3D = 433,
+ IIMAGECUBE = 434,
+ IIMAGE1DARRAY = 435,
+ IIMAGE2DARRAY = 436,
+ UIMAGE1D = 437,
+ UIMAGE2D = 438,
+ UIMAGE3D = 439,
+ UIMAGECUBE = 440,
+ UIMAGE1DARRAY = 441,
+ UIMAGE2DARRAY = 442,
+ IMAGE1DSHADOW = 443,
+ IMAGE2DSHADOW = 444,
+ IMAGEBUFFER = 445,
+ IIMAGEBUFFER = 446,
+ UIMAGEBUFFER = 447,
+ IMAGE1DARRAYSHADOW = 448,
+ IMAGE2DARRAYSHADOW = 449,
+ ROW_MAJOR = 450
};
#endif
@@ -237,8 +241,8 @@
typedef union YYSTYPE
{
-/* Line 1685 of yacc.c */
-#line 52 "glsl_parser.ypp"
+/* Line 1676 of yacc.c */
+#line 52 "glsl_parser.yy"
int n;
float real;
@@ -270,8 +274,8 @@ typedef union YYSTYPE
-/* Line 1685 of yacc.c */
-#line 275 "glsl_parser.h"
+/* Line 1676 of yacc.c */
+#line 279 "glsl_parser.h"
} YYSTYPE;
# define YYSTYPE_IS_TRIVIAL 1
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
diff --git a/src/glsl/glsl_parser.ypp b/src/glsl/glsl_parser.yy
index 6d7d148eb04..2c0498ece7a 100644
--- a/src/glsl/glsl_parser.ypp
+++ b/src/glsl/glsl_parser.yy
@@ -93,7 +93,8 @@
%token ISAMPLER1DARRAY ISAMPLER2DARRAY USAMPLER1D USAMPLER2D USAMPLER3D
%token USAMPLERCUBE USAMPLER1DARRAY USAMPLER2DARRAY
%token STRUCT VOID_TOK WHILE
-%token <identifier> IDENTIFIER
+%token <identifier> IDENTIFIER TYPE_IDENTIFIER NEW_IDENTIFIER
+%type <identifier> any_identifier
%token <real> FLOATCONSTANT
%token <n> INTCONSTANT UINTCONSTANT BOOLCONSTANT
%token <identifier> FIELD_SELECTION
@@ -108,6 +109,7 @@
%token VERSION EXTENSION LINE COLON EOL INTERFACE OUTPUT
%token PRAGMA_DEBUG_ON PRAGMA_DEBUG_OFF
%token PRAGMA_OPTIMIZE_ON PRAGMA_OPTIMIZE_OFF
+%token PRAGMA_INVARIANT_ALL
%token LAYOUT_TOK
/* Reserved words that are not actually used in the grammar.
@@ -183,6 +185,10 @@
%type <expression> function_call_generic
%type <expression> function_call_or_method
%type <expression> function_call
+%type <expression> method_call_generic
+%type <expression> method_call_header_with_parameters
+%type <expression> method_call_header_no_parameters
+%type <expression> method_call_header
%type <n> assignment_operator
%type <n> unary_operator
%type <expression> function_identifier
@@ -213,26 +219,51 @@ translation_unit:
_mesa_glsl_initialize_types(state);
}
external_declaration_list
+ {
+ delete state->symbols;
+ state->symbols = new(ralloc_parent(state)) glsl_symbol_table;
+ _mesa_glsl_initialize_types(state);
+ }
;
version_statement:
/* blank - no #version specified: defaults are already set */
| VERSION INTCONSTANT EOL
{
+ bool supported = false;
+
switch ($2) {
case 100:
state->es_shader = true;
+ supported = state->Const.GLSL_100ES;
+ break;
case 110:
+ supported = state->Const.GLSL_110;
+ break;
case 120:
+ supported = state->Const.GLSL_120;
+ break;
case 130:
- /* FINISHME: Check against implementation support versions. */
- state->language_version = $2;
+ supported = state->Const.GLSL_130;
break;
default:
- _mesa_glsl_error(& @2, state, "Shading language version"
- "%u is not supported\n", $2);
+ supported = false;
break;
}
+
+ state->language_version = $2;
+ state->version_string =
+ ralloc_asprintf(state, "GLSL%s %d.%02d",
+ state->es_shader ? " ES" : "",
+ state->language_version / 100,
+ state->language_version % 100);
+
+ if (!supported) {
+ _mesa_glsl_error(& @2, state, "%s is not supported. "
+ "Supported versions are: %s\n",
+ state->version_string,
+ state->supported_version_string);
+ }
}
;
@@ -241,6 +272,16 @@ pragma_statement:
| PRAGMA_DEBUG_OFF EOL
| PRAGMA_OPTIMIZE_ON EOL
| PRAGMA_OPTIMIZE_OFF EOL
+ | PRAGMA_INVARIANT_ALL EOL
+ {
+ if (state->language_version < 120) {
+ _mesa_glsl_warning(& @1, state,
+ "pragma `invariant(all)' not supported in %s",
+ state->version_string);
+ } else {
+ state->all_invariant = true;
+ }
+ }
;
extension_statement_list:
@@ -248,8 +289,14 @@ extension_statement_list:
| extension_statement_list extension_statement
;
+any_identifier:
+ IDENTIFIER
+ | TYPE_IDENTIFIER
+ | NEW_IDENTIFIER
+ ;
+
extension_statement:
- EXTENSION IDENTIFIER COLON IDENTIFIER EOL
+ EXTENSION any_identifier COLON any_identifier EOL
{
if (!_mesa_glsl_process_extension($2, & @2, $4, & @4, state)) {
YYERROR;
@@ -260,16 +307,16 @@ extension_statement:
external_declaration_list:
external_declaration
{
- /* FINISHME: The NULL test is only required because 'precision'
- * FINISHME: statements are not yet supported.
+ /* FINISHME: The NULL test is required because pragmas are set to
+ * FINISHME: NULL. (See production rule for external_declaration.)
*/
if ($1 != NULL)
state->translation_unit.push_tail(& $1->link);
}
| external_declaration_list external_declaration
{
- /* FINISHME: The NULL test is only required because 'precision'
- * FINISHME: statements are not yet supported.
+ /* FINISHME: The NULL test is required because pragmas are set to
+ * FINISHME: NULL. (See production rule for external_declaration.)
*/
if ($2 != NULL)
state->translation_unit.push_tail(& $2->link);
@@ -278,6 +325,7 @@ external_declaration_list:
variable_identifier:
IDENTIFIER
+ | NEW_IDENTIFIER
;
primary_expression:
@@ -334,7 +382,7 @@ postfix_expression:
{
$$ = $1;
}
- | postfix_expression '.' IDENTIFIER
+ | postfix_expression '.' any_identifier
{
void *ctx = state;
$$ = new(ctx) ast_expression(ast_field_selection, $1, NULL, NULL);
@@ -365,7 +413,7 @@ function_call:
function_call_or_method:
function_call_generic
- | postfix_expression '.' function_call_generic
+ | postfix_expression '.' method_call_generic
{
void *ctx = state;
$$ = new(ctx) ast_expression(ast_field_selection, $1, $3, NULL);
@@ -412,7 +460,7 @@ function_identifier:
$$ = new(ctx) ast_function_expression($1);
$$->set_location(yylloc);
}
- | IDENTIFIER
+ | variable_identifier
{
void *ctx = state;
ast_expression *callee = new(ctx) ast_expression($1);
@@ -428,6 +476,44 @@ function_identifier:
}
;
+method_call_generic:
+ method_call_header_with_parameters ')'
+ | method_call_header_no_parameters ')'
+ ;
+
+method_call_header_no_parameters:
+ method_call_header VOID_TOK
+ | method_call_header
+ ;
+
+method_call_header_with_parameters:
+ method_call_header assignment_expression
+ {
+ $$ = $1;
+ $$->set_location(yylloc);
+ $$->expressions.push_tail(& $2->link);
+ }
+ | method_call_header_with_parameters ',' assignment_expression
+ {
+ $$ = $1;
+ $$->set_location(yylloc);
+ $$->expressions.push_tail(& $3->link);
+ }
+ ;
+
+ // Grammar Note: Constructors look like methods, but lexical
+ // analysis recognized most of them as keywords. They are now
+ // recognized through "type_specifier".
+method_call_header:
+ variable_identifier '('
+ {
+ void *ctx = state;
+ ast_expression *callee = new(ctx) ast_expression($1);
+ $$ = new(ctx) ast_function_expression(callee);
+ $$->set_location(yylloc);
+ }
+ ;
+
// Grammar Note: No traditional style type casts.
unary_expression:
postfix_expression
@@ -678,6 +764,7 @@ constant_expression:
declaration:
function_prototype ';'
{
+ state->symbols->pop_scope();
$$ = $1;
}
| init_declarator_list ';'
@@ -686,14 +773,9 @@ declaration:
}
| PRECISION precision_qualifier type_specifier_no_prec ';'
{
- if (($3->type_specifier != ast_float)
- && ($3->type_specifier != ast_int)) {
- _mesa_glsl_error(& @3, state, "global precision qualifier can "
- "only be applied to `int' or `float'\n");
- YYERROR;
- }
-
- $$ = NULL; /* FINISHME */
+ $3->precision = $2;
+ $3->is_precision_statement = true;
+ $$ = $3;
}
;
@@ -720,18 +802,21 @@ function_header_with_parameters:
;
function_header:
- fully_specified_type IDENTIFIER '('
+ fully_specified_type variable_identifier '('
{
void *ctx = state;
$$ = new(ctx) ast_function();
$$->set_location(yylloc);
$$->return_type = $1;
$$->identifier = $2;
+
+ state->symbols->add_function(new(state) ir_function($2));
+ state->symbols->push_scope();
}
;
parameter_declarator:
- type_specifier IDENTIFIER
+ type_specifier any_identifier
{
void *ctx = state;
$$ = new(ctx) ast_parameter_declarator();
@@ -741,7 +826,7 @@ parameter_declarator:
$$->type->specifier = $1;
$$->identifier = $2;
}
- | type_specifier IDENTIFIER '[' constant_expression ']'
+ | type_specifier any_identifier '[' constant_expression ']'
{
void *ctx = state;
$$ = new(ctx) ast_parameter_declarator();
@@ -819,7 +904,7 @@ parameter_type_specifier:
init_declarator_list:
single_declaration
- | init_declarator_list ',' IDENTIFIER
+ | init_declarator_list ',' any_identifier
{
void *ctx = state;
ast_declaration *decl = new(ctx) ast_declaration($3, false, NULL, NULL);
@@ -827,8 +912,9 @@ init_declarator_list:
$$ = $1;
$$->declarations.push_tail(&decl->link);
+ state->symbols->add_variable(new(state) ir_variable(NULL, $3, ir_var_auto));
}
- | init_declarator_list ',' IDENTIFIER '[' ']'
+ | init_declarator_list ',' any_identifier '[' ']'
{
void *ctx = state;
ast_declaration *decl = new(ctx) ast_declaration($3, true, NULL, NULL);
@@ -836,8 +922,9 @@ init_declarator_list:
$$ = $1;
$$->declarations.push_tail(&decl->link);
+ state->symbols->add_variable(new(state) ir_variable(NULL, $3, ir_var_auto));
}
- | init_declarator_list ',' IDENTIFIER '[' constant_expression ']'
+ | init_declarator_list ',' any_identifier '[' constant_expression ']'
{
void *ctx = state;
ast_declaration *decl = new(ctx) ast_declaration($3, true, $5, NULL);
@@ -845,8 +932,9 @@ init_declarator_list:
$$ = $1;
$$->declarations.push_tail(&decl->link);
+ state->symbols->add_variable(new(state) ir_variable(NULL, $3, ir_var_auto));
}
- | init_declarator_list ',' IDENTIFIER '[' ']' '=' initializer
+ | init_declarator_list ',' any_identifier '[' ']' '=' initializer
{
void *ctx = state;
ast_declaration *decl = new(ctx) ast_declaration($3, true, NULL, $7);
@@ -854,8 +942,9 @@ init_declarator_list:
$$ = $1;
$$->declarations.push_tail(&decl->link);
+ state->symbols->add_variable(new(state) ir_variable(NULL, $3, ir_var_auto));
}
- | init_declarator_list ',' IDENTIFIER '[' constant_expression ']' '=' initializer
+ | init_declarator_list ',' any_identifier '[' constant_expression ']' '=' initializer
{
void *ctx = state;
ast_declaration *decl = new(ctx) ast_declaration($3, true, $5, $8);
@@ -863,8 +952,9 @@ init_declarator_list:
$$ = $1;
$$->declarations.push_tail(&decl->link);
+ state->symbols->add_variable(new(state) ir_variable(NULL, $3, ir_var_auto));
}
- | init_declarator_list ',' IDENTIFIER '=' initializer
+ | init_declarator_list ',' any_identifier '=' initializer
{
void *ctx = state;
ast_declaration *decl = new(ctx) ast_declaration($3, false, NULL, $5);
@@ -872,6 +962,7 @@ init_declarator_list:
$$ = $1;
$$->declarations.push_tail(&decl->link);
+ state->symbols->add_variable(new(state) ir_variable(NULL, $3, ir_var_auto));
}
;
@@ -888,7 +979,7 @@ single_declaration:
$$->set_location(yylloc);
}
}
- | fully_specified_type IDENTIFIER
+ | fully_specified_type any_identifier
{
void *ctx = state;
ast_declaration *decl = new(ctx) ast_declaration($2, false, NULL, NULL);
@@ -897,7 +988,7 @@ single_declaration:
$$->set_location(yylloc);
$$->declarations.push_tail(&decl->link);
}
- | fully_specified_type IDENTIFIER '[' ']'
+ | fully_specified_type any_identifier '[' ']'
{
void *ctx = state;
ast_declaration *decl = new(ctx) ast_declaration($2, true, NULL, NULL);
@@ -906,7 +997,7 @@ single_declaration:
$$->set_location(yylloc);
$$->declarations.push_tail(&decl->link);
}
- | fully_specified_type IDENTIFIER '[' constant_expression ']'
+ | fully_specified_type any_identifier '[' constant_expression ']'
{
void *ctx = state;
ast_declaration *decl = new(ctx) ast_declaration($2, true, $4, NULL);
@@ -915,7 +1006,7 @@ single_declaration:
$$->set_location(yylloc);
$$->declarations.push_tail(&decl->link);
}
- | fully_specified_type IDENTIFIER '[' ']' '=' initializer
+ | fully_specified_type any_identifier '[' ']' '=' initializer
{
void *ctx = state;
ast_declaration *decl = new(ctx) ast_declaration($2, true, NULL, $6);
@@ -924,7 +1015,7 @@ single_declaration:
$$->set_location(yylloc);
$$->declarations.push_tail(&decl->link);
}
- | fully_specified_type IDENTIFIER '[' constant_expression ']' '=' initializer
+ | fully_specified_type any_identifier '[' constant_expression ']' '=' initializer
{
void *ctx = state;
ast_declaration *decl = new(ctx) ast_declaration($2, true, $4, $7);
@@ -933,7 +1024,7 @@ single_declaration:
$$->set_location(yylloc);
$$->declarations.push_tail(&decl->link);
}
- | fully_specified_type IDENTIFIER '=' initializer
+ | fully_specified_type any_identifier '=' initializer
{
void *ctx = state;
ast_declaration *decl = new(ctx) ast_declaration($2, false, NULL, $4);
@@ -942,7 +1033,7 @@ single_declaration:
$$->set_location(yylloc);
$$->declarations.push_tail(&decl->link);
}
- | INVARIANT IDENTIFIER // Vertex only.
+ | INVARIANT variable_identifier // Vertex only.
{
void *ctx = state;
ast_declaration *decl = new(ctx) ast_declaration($2, false, NULL, NULL);
@@ -1001,13 +1092,14 @@ layout_qualifier_id_list:
;
layout_qualifier_id:
- IDENTIFIER
+ any_identifier
{
bool got_one = false;
memset(& $$, 0, sizeof($$));
- if (state->ARB_fragment_coord_conventions_enable) {
+ /* Layout qualifiers for ARB_fragment_coord_conventions. */
+ if (!got_one && state->ARB_fragment_coord_conventions_enable) {
if (strcmp($1, "origin_upper_left") == 0) {
got_one = true;
$$.flags.q.origin_upper_left = 1;
@@ -1015,22 +1107,44 @@ layout_qualifier_id:
got_one = true;
$$.flags.q.pixel_center_integer = 1;
}
+
+ if (got_one && state->ARB_fragment_coord_conventions_warn) {
+ _mesa_glsl_warning(& @1, state,
+ "GL_ARB_fragment_coord_conventions layout "
+ "identifier `%s' used\n", $1);
+ }
+ }
+
+ /* Layout qualifiers for AMD_conservative_depth. */
+ if (!got_one && state->AMD_conservative_depth_enable) {
+ if (strcmp($1, "depth_any") == 0) {
+ got_one = true;
+ $$.flags.q.depth_any = 1;
+ } else if (strcmp($1, "depth_greater") == 0) {
+ got_one = true;
+ $$.flags.q.depth_greater = 1;
+ } else if (strcmp($1, "depth_less") == 0) {
+ got_one = true;
+ $$.flags.q.depth_less = 1;
+ } else if (strcmp($1, "depth_unchanged") == 0) {
+ got_one = true;
+ $$.flags.q.depth_unchanged = 1;
+ }
+
+ if (got_one && state->AMD_conservative_depth_warn) {
+ _mesa_glsl_warning(& @1, state,
+ "GL_AMD_conservative_depth "
+ "layout qualifier `%s' is used\n", $1);
+ }
}
- /* If the identifier didn't match any known layout identifiers,
- * emit an error.
- */
if (!got_one) {
_mesa_glsl_error(& @1, state, "unrecognized layout identifier "
"`%s'\n", $1);
YYERROR;
- } else if (state->ARB_fragment_coord_conventions_warn) {
- _mesa_glsl_warning(& @1, state,
- "GL_ARB_fragment_coord_conventions layout "
- "identifier `%s' used\n", $1);
}
}
- | IDENTIFIER '=' INTCONSTANT
+ | any_identifier '=' INTCONSTANT
{
bool got_one = false;
@@ -1179,6 +1293,9 @@ storage_qualifier:
type_specifier:
type_specifier_no_prec
+ {
+ $$ = $1;
+ }
| precision_qualifier type_specifier_no_prec
{
$$ = $2;
@@ -1215,7 +1332,7 @@ type_specifier_nonarray:
$$ = new(ctx) ast_type_specifier($1);
$$->set_location(yylloc);
}
- | IDENTIFIER
+ | TYPE_IDENTIFIER
{
void *ctx = state;
$$ = new(ctx) ast_type_specifier($1);
@@ -1282,10 +1399,9 @@ precision_qualifier:
if (!state->es_shader && state->language_version < 130)
_mesa_glsl_error(& @1, state,
"precision qualifier forbidden "
- "in GLSL %d.%d (1.30 or later "
+ "in %s (1.30 or later "
"required)\n",
- state->language_version / 100,
- state->language_version % 100);
+ state->version_string);
$$ = ast_precision_high;
}
@@ -1293,10 +1409,9 @@ precision_qualifier:
if (!state->es_shader && state->language_version < 130)
_mesa_glsl_error(& @1, state,
"precision qualifier forbidden "
- "in GLSL %d.%d (1.30 or later "
+ "in %s (1.30 or later "
"required)\n",
- state->language_version / 100,
- state->language_version % 100);
+ state->version_string);
$$ = ast_precision_medium;
}
@@ -1304,21 +1419,21 @@ precision_qualifier:
if (!state->es_shader && state->language_version < 130)
_mesa_glsl_error(& @1, state,
"precision qualifier forbidden "
- "in GLSL %d.%d (1.30 or later "
+ "in %s (1.30 or later "
"required)\n",
- state->language_version / 100,
- state->language_version % 100);
+ state->version_string);
$$ = ast_precision_low;
}
;
struct_specifier:
- STRUCT IDENTIFIER '{' struct_declaration_list '}'
+ STRUCT any_identifier '{' struct_declaration_list '}'
{
void *ctx = state;
$$ = new(ctx) ast_struct_specifier($2, $4);
$$->set_location(yylloc);
+ state->symbols->add_type($2, glsl_type::void_type);
}
| STRUCT '{' struct_declaration_list '}'
{
@@ -1370,13 +1485,14 @@ struct_declarator_list:
;
struct_declarator:
- IDENTIFIER
+ any_identifier
{
void *ctx = state;
$$ = new(ctx) ast_declaration($1, false, NULL, NULL);
$$->set_location(yylloc);
+ state->symbols->add_variable(new(state) ir_variable(NULL, $1, ir_var_auto));
}
- | IDENTIFIER '[' constant_expression ']'
+ | any_identifier '[' constant_expression ']'
{
void *ctx = state;
$$ = new(ctx) ast_declaration($1, true, $3, NULL);
@@ -1416,11 +1532,16 @@ compound_statement:
$$ = new(ctx) ast_compound_statement(true, NULL);
$$->set_location(yylloc);
}
- | '{' statement_list '}'
+ | '{'
+ {
+ state->symbols->push_scope();
+ }
+ statement_list '}'
{
void *ctx = state;
- $$ = new(ctx) ast_compound_statement(true, $2);
+ $$ = new(ctx) ast_compound_statement(true, $3);
$$->set_location(yylloc);
+ state->symbols->pop_scope();
}
;
@@ -1508,7 +1629,7 @@ condition:
{
$$ = (ast_node *) $1;
}
- | fully_specified_type IDENTIFIER '=' initializer
+ | fully_specified_type any_identifier '=' initializer
{
void *ctx = state;
ast_declaration *decl = new(ctx) ast_declaration($2, false, NULL, $4);
@@ -1628,5 +1749,7 @@ function_definition:
$$->set_location(yylloc);
$$->prototype = $1;
$$->body = $2;
+
+ state->symbols->pop_scope();
}
;
diff --git a/src/glsl/glsl_parser_extras.cpp b/src/glsl/glsl_parser_extras.cpp
index 8dbe66927dc..e8c60936fb6 100644
--- a/src/glsl/glsl_parser_extras.cpp
+++ b/src/glsl/glsl_parser_extras.cpp
@@ -26,10 +26,10 @@
#include <assert.h>
extern "C" {
-#include <talloc.h>
#include "main/core.h" /* for struct gl_context */
}
+#include "ralloc.h"
#include "ast.h"
#include "glsl_parser_extras.h"
#include "glsl_parser.h"
@@ -48,7 +48,7 @@ _mesa_glsl_parse_state::_mesa_glsl_parse_state(struct gl_context *ctx,
this->scanner = NULL;
this->translation_unit.make_empty();
this->symbols = new(mem_ctx) glsl_symbol_table;
- this->info_log = talloc_strdup(mem_ctx, "");
+ this->info_log = ralloc_strdup(mem_ctx, "");
this->error = false;
this->loop_or_switch_nesting = NULL;
@@ -79,6 +79,38 @@ _mesa_glsl_parse_state::_mesa_glsl_parse_state(struct gl_context *ctx,
this->Const.MaxFragmentUniformComponents = ctx->Const.FragmentProgram.MaxUniformComponents;
this->Const.MaxDrawBuffers = ctx->Const.MaxDrawBuffers;
+
+ /* Note: Once the OpenGL 3.0 'forward compatible' context or the OpenGL 3.2
+ * Core context is supported, this logic will need change. Older versions of
+ * GLSL are no longer supported outside the compatibility contexts of 3.x.
+ */
+ this->Const.GLSL_100ES = (ctx->API == API_OPENGLES2)
+ || ctx->Extensions.ARB_ES2_compatibility;
+ this->Const.GLSL_110 = (ctx->API == API_OPENGL);
+ this->Const.GLSL_120 = (ctx->API == API_OPENGL)
+ && (ctx->Const.GLSLVersion >= 120);
+ this->Const.GLSL_130 = (ctx->API == API_OPENGL)
+ && (ctx->Const.GLSLVersion >= 130);
+
+ const unsigned lowest_version =
+ (ctx->API == API_OPENGLES2) || ctx->Extensions.ARB_ES2_compatibility
+ ? 100 : 110;
+ const unsigned highest_version =
+ (ctx->API == API_OPENGL) ? ctx->Const.GLSLVersion : 100;
+ char *supported = ralloc_strdup(this, "");
+
+ for (unsigned ver = lowest_version; ver <= highest_version; ver += 10) {
+ const char *const prefix = (ver == lowest_version)
+ ? ""
+ : ((ver == highest_version) ? ", and " : ", ");
+
+ ralloc_asprintf_append(& supported, "%s%d.%02d%s",
+ prefix,
+ ver / 100, ver % 100,
+ (ver == 100) ? " ES" : "");
+ }
+
+ this->supported_version_string = supported;
}
const char *
@@ -104,15 +136,14 @@ _mesa_glsl_error(YYLTYPE *locp, _mesa_glsl_parse_state *state,
state->error = true;
assert(state->info_log != NULL);
- state->info_log = talloc_asprintf_append(state->info_log,
- "%u:%u(%u): error: ",
+ ralloc_asprintf_append(&state->info_log, "%u:%u(%u): error: ",
locp->source,
locp->first_line,
locp->first_column);
va_start(ap, fmt);
- state->info_log = talloc_vasprintf_append(state->info_log, fmt, ap);
+ ralloc_vasprintf_append(&state->info_log, fmt, ap);
va_end(ap);
- state->info_log = talloc_strdup_append(state->info_log, "\n");
+ ralloc_strcat(&state->info_log, "\n");
}
@@ -123,15 +154,14 @@ _mesa_glsl_warning(const YYLTYPE *locp, _mesa_glsl_parse_state *state,
va_list ap;
assert(state->info_log != NULL);
- state->info_log = talloc_asprintf_append(state->info_log,
- "%u:%u(%u): warning: ",
+ ralloc_asprintf_append(&state->info_log, "%u:%u(%u): warning: ",
locp->source,
locp->first_line,
locp->first_column);
va_start(ap, fmt);
- state->info_log = talloc_vasprintf_append(state->info_log, fmt, ap);
+ ralloc_vasprintf_append(&state->info_log, fmt, ap);
va_end(ap);
- state->info_log = talloc_strdup_append(state->info_log, "\n");
+ ralloc_strcat(&state->info_log, "\n");
}
@@ -180,6 +210,15 @@ _mesa_glsl_process_extension(const char *name, YYLTYPE *name_locp,
state->ARB_draw_buffers_enable = (ext_mode != extension_disable);
state->ARB_draw_buffers_warn = (ext_mode == extension_warn);
}
+ } else if (strcmp(name, "GL_ARB_draw_instanced") == 0) {
+ /* This extension is only supported in vertex shaders.
+ */
+ if (state->target != vertex_shader) {
+ unsupported = true;
+ } else {
+ state->ARB_draw_instanced_enable = (ext_mode != extension_disable);
+ state->ARB_draw_instanced_warn = (ext_mode == extension_warn);
+ }
} else if (strcmp(name, "GL_ARB_explicit_attrib_location") == 0) {
state->ARB_explicit_attrib_location_enable =
(ext_mode != extension_disable);
@@ -210,6 +249,18 @@ _mesa_glsl_process_extension(const char *name, YYLTYPE *name_locp,
state->ARB_shader_stencil_export_warn = (ext_mode == extension_warn);
unsupported = !state->extensions->ARB_shader_stencil_export;
}
+ } else if (strcmp(name, "GL_AMD_conservative_depth") == 0) {
+ /* The AMD_conservative spec does not forbid requiring the extension in
+ * the vertex shader.
+ */
+ state->AMD_conservative_depth_enable = (ext_mode != extension_disable);
+ state->AMD_conservative_depth_warn = (ext_mode == extension_warn);
+ unsupported = !state->extensions->AMD_conservative_depth;
+ } else if (strcmp(name, "GL_OES_texture_3D") == 0 && state->es_shader) {
+ state->OES_texture_3D_enable = (ext_mode != extension_disable);
+ state->OES_texture_3D_warn = (ext_mode == extension_warn);
+
+ unsupported = !state->extensions->EXT_texture3D;
} else {
unsupported = true;
}
@@ -696,7 +747,7 @@ ast_struct_specifier::ast_struct_specifier(char *identifier,
{
if (identifier == NULL) {
static unsigned anon_count = 1;
- identifier = talloc_asprintf(this, "#anon_struct_%04x", anon_count);
+ identifier = ralloc_asprintf(this, "#anon_struct_%04x", anon_count);
anon_count++;
}
name = identifier;
@@ -718,6 +769,7 @@ do_common_optimization(exec_list *ir, bool linked, unsigned max_unroll_iteration
progress = do_if_simplification(ir) || progress;
progress = do_discard_simplification(ir) || progress;
progress = do_copy_propagation(ir) || progress;
+ /*progress = do_copy_propagation_elements(ir) || progress;*/
if (linked)
progress = do_dead_code(ir) || progress;
else
@@ -739,8 +791,10 @@ do_common_optimization(exec_list *ir, bool linked, unsigned max_unroll_iteration
progress = optimize_redundant_jumps(ir) || progress;
loop_state *ls = analyze_loop_variables(ir);
- progress = set_loop_controls(ir, ls) || progress;
- progress = unroll_loops(ir, ls, max_unroll_iterations) || progress;
+ if (ls->loop_found) {
+ progress = set_loop_controls(ir, ls) || progress;
+ progress = unroll_loops(ir, ls, max_unroll_iterations) || progress;
+ }
delete ls;
return progress;
diff --git a/src/glsl/glsl_parser_extras.h b/src/glsl/glsl_parser_extras.h
index 98c4e70173d..b5c016fb399 100644
--- a/src/glsl/glsl_parser_extras.h
+++ b/src/glsl/glsl_parser_extras.h
@@ -31,7 +31,7 @@
#ifdef __cplusplus
-#include <cstdlib>
+#include <stdlib.h>
#include "glsl_symbol_table.h"
enum _mesa_glsl_parser_targets {
@@ -46,21 +46,21 @@ struct _mesa_glsl_parse_state {
_mesa_glsl_parse_state(struct gl_context *ctx, GLenum target,
void *mem_ctx);
- /* Callers of this talloc-based new need not call delete. It's
- * easier to just talloc_free 'ctx' (or any of its ancestors). */
+ /* Callers of this ralloc-based new need not call delete. It's
+ * easier to just ralloc_free 'ctx' (or any of its ancestors). */
static void* operator new(size_t size, void *ctx)
{
- void *mem = talloc_zero_size(ctx, size);
+ void *mem = rzalloc_size(ctx, size);
assert(mem != NULL);
return mem;
}
/* If the user *does* call delete, that's OK, we will just
- * talloc_free in that case. */
+ * ralloc_free in that case. */
static void operator delete(void *mem)
{
- talloc_free(mem);
+ ralloc_free(mem);
}
void *scanner;
@@ -69,9 +69,20 @@ struct _mesa_glsl_parse_state {
bool es_shader;
unsigned language_version;
+ const char *version_string;
enum _mesa_glsl_parser_targets target;
/**
+ * Printable list of GLSL versions supported by the current context
+ *
+ * \note
+ * This string should probably be generated per-context instead of per
+ * invokation of the compiler. This should be changed when the method of
+ * tracking supported GLSL versions changes.
+ */
+ const char *supported_version_string;
+
+ /**
* Implementation defined limits that affect built-in variables, etc.
*
* \sa struct gl_constants (in mtypes.h)
@@ -92,6 +103,22 @@ struct _mesa_glsl_parse_state {
/* ARB_draw_buffers */
unsigned MaxDrawBuffers;
+
+ /**
+ * Set of GLSL versions supported by the current context
+ *
+ * Knowing that version X is supported doesn't mean that versions before
+ * X are also supported. Version 1.00 is only supported in an ES2
+ * context or when GL_ARB_ES2_compatibility is supported. In an OpenGL
+ * 3.0 "forward compatible" context, GLSL 1.10 and 1.20 are \b not
+ * supported.
+ */
+ /*@{*/
+ unsigned GLSL_100ES:1;
+ unsigned GLSL_110:1;
+ unsigned GLSL_120:1;
+ unsigned GLSL_130:1;
+ /*@}*/
} Const;
/**
@@ -108,6 +135,13 @@ struct _mesa_glsl_parse_state {
/** Was there an error during compilation? */
bool error;
+ /**
+ * Are all shader inputs / outputs invariant?
+ *
+ * This is set when the 'STDGL invariant(all)' pragma is used.
+ */
+ bool all_invariant;
+
/** Loop or switch statement containing the current instructions. */
class ir_instruction *loop_or_switch_nesting;
class ast_iteration_statement *loop_or_switch_nesting_ast;
@@ -124,6 +158,8 @@ struct _mesa_glsl_parse_state {
/*@{*/
unsigned ARB_draw_buffers_enable:1;
unsigned ARB_draw_buffers_warn:1;
+ unsigned ARB_draw_instanced_enable:1;
+ unsigned ARB_draw_instanced_warn:1;
unsigned ARB_explicit_attrib_location_enable:1;
unsigned ARB_explicit_attrib_location_warn:1;
unsigned ARB_fragment_coord_conventions_enable:1;
@@ -134,6 +170,10 @@ struct _mesa_glsl_parse_state {
unsigned EXT_texture_array_warn:1;
unsigned ARB_shader_stencil_export_enable:1;
unsigned ARB_shader_stencil_export_warn:1;
+ unsigned AMD_conservative_depth_enable:1;
+ unsigned AMD_conservative_depth_warn:1;
+ unsigned OES_texture_3D_enable:1;
+ unsigned OES_texture_3D_warn:1;
/*@}*/
/** Extensions supported by the OpenGL implementation. */
diff --git a/src/glsl/glsl_symbol_table.cpp b/src/glsl/glsl_symbol_table.cpp
index 3dcd928016a..2f291d4f97f 100644
--- a/src/glsl/glsl_symbol_table.cpp
+++ b/src/glsl/glsl_symbol_table.cpp
@@ -26,22 +26,19 @@
class symbol_table_entry {
public:
- /* Callers of this talloc-based new need not call delete. It's
- * easier to just talloc_free 'ctx' (or any of its ancestors). */
+ /* Callers of this ralloc-based new need not call delete. It's
+ * easier to just ralloc_free 'ctx' (or any of its ancestors). */
static void* operator new(size_t size, void *ctx)
{
- void *entry = talloc_size(ctx, size);
+ void *entry = ralloc_size(ctx, size);
assert(entry != NULL);
return entry;
}
- /* If the user *does* call delete, that's OK, we will just
- * talloc_free in that case. Here, C++ will have already called the
- * destructor so tell talloc not to do that again. */
- static void operator delete(void *table)
+ /* If the user *does* call delete, that's OK, we will just ralloc_free. */
+ static void operator delete(void *entry)
{
- talloc_set_destructor(table, NULL);
- talloc_free(table);
+ ralloc_free(entry);
}
symbol_table_entry(ir_variable *v) : v(v), f(0), t(0) {}
@@ -57,13 +54,13 @@ glsl_symbol_table::glsl_symbol_table()
{
this->language_version = 120;
this->table = _mesa_symbol_table_ctor();
- this->mem_ctx = talloc_init("symbol table entries");
+ this->mem_ctx = ralloc_context(NULL);
}
glsl_symbol_table::~glsl_symbol_table()
{
_mesa_symbol_table_dtor(table);
- talloc_free(mem_ctx);
+ ralloc_free(mem_ctx);
}
void glsl_symbol_table::push_scope()
diff --git a/src/glsl/glsl_symbol_table.h b/src/glsl/glsl_symbol_table.h
index 28a44ebe91c..637bc033b93 100644
--- a/src/glsl/glsl_symbol_table.h
+++ b/src/glsl/glsl_symbol_table.h
@@ -44,36 +44,34 @@ class symbol_table_entry;
*/
struct glsl_symbol_table {
private:
- static int
+ static void
_glsl_symbol_table_destructor (glsl_symbol_table *table)
{
table->~glsl_symbol_table();
-
- return 0;
}
public:
- /* Callers of this talloc-based new need not call delete. It's
- * easier to just talloc_free 'ctx' (or any of its ancestors). */
+ /* Callers of this ralloc-based new need not call delete. It's
+ * easier to just ralloc_free 'ctx' (or any of its ancestors). */
static void* operator new(size_t size, void *ctx)
{
void *table;
- table = talloc_size(ctx, size);
+ table = ralloc_size(ctx, size);
assert(table != NULL);
- talloc_set_destructor(table, (int (*)(void*)) _glsl_symbol_table_destructor);
+ ralloc_set_destructor(table, (void (*)(void*)) _glsl_symbol_table_destructor);
return table;
}
/* If the user *does* call delete, that's OK, we will just
- * talloc_free in that case. Here, C++ will have already called the
- * destructor so tell talloc not to do that again. */
+ * ralloc_free in that case. Here, C++ will have already called the
+ * destructor so tell ralloc not to do that again. */
static void operator delete(void *table)
{
- talloc_set_destructor(table, NULL);
- talloc_free(table);
+ ralloc_set_destructor(table, NULL);
+ ralloc_free(table);
}
glsl_symbol_table();
diff --git a/src/glsl/glsl_types.cpp b/src/glsl/glsl_types.cpp
index 8c33cfa20d0..78d10bd9380 100644
--- a/src/glsl/glsl_types.cpp
+++ b/src/glsl/glsl_types.cpp
@@ -21,7 +21,7 @@
* DEALINGS IN THE SOFTWARE.
*/
-#include <cstdio>
+#include <stdio.h>
#include <stdlib.h>
#include "main/core.h" /* for Elements */
#include "glsl_symbol_table.h"
@@ -37,10 +37,10 @@ hash_table *glsl_type::record_types = NULL;
void *glsl_type::mem_ctx = NULL;
void
-glsl_type::init_talloc_type_ctx(void)
+glsl_type::init_ralloc_type_ctx(void)
{
if (glsl_type::mem_ctx == NULL) {
- glsl_type::mem_ctx = talloc_autofree_context();
+ glsl_type::mem_ctx = ralloc_autofree_context();
assert(glsl_type::mem_ctx != NULL);
}
}
@@ -55,8 +55,8 @@ glsl_type::glsl_type(GLenum gl_type,
vector_elements(vector_elements), matrix_columns(matrix_columns),
length(0)
{
- init_talloc_type_ctx();
- this->name = talloc_strdup(this->mem_ctx, name);
+ init_ralloc_type_ctx();
+ this->name = ralloc_strdup(this->mem_ctx, name);
/* Neither dimension is zero or both dimensions are zero.
*/
assert((vector_elements == 0) == (matrix_columns == 0));
@@ -73,8 +73,8 @@ glsl_type::glsl_type(GLenum gl_type,
vector_elements(0), matrix_columns(0),
length(0)
{
- init_talloc_type_ctx();
- this->name = talloc_strdup(this->mem_ctx, name);
+ init_ralloc_type_ctx();
+ this->name = ralloc_strdup(this->mem_ctx, name);
memset(& fields, 0, sizeof(fields));
}
@@ -88,13 +88,13 @@ glsl_type::glsl_type(const glsl_struct_field *fields, unsigned num_fields,
{
unsigned int i;
- init_talloc_type_ctx();
- this->name = talloc_strdup(this->mem_ctx, name);
- this->fields.structure = talloc_array(this->mem_ctx,
+ init_ralloc_type_ctx();
+ this->name = ralloc_strdup(this->mem_ctx, name);
+ this->fields.structure = ralloc_array(this->mem_ctx,
glsl_struct_field, length);
for (i = 0; i < length; i++) {
this->fields.structure[i].type = fields[i].type;
- this->fields.structure[i].name = talloc_strdup(this->fields.structure,
+ this->fields.structure[i].name = ralloc_strdup(this->fields.structure,
fields[i].name);
}
}
@@ -120,7 +120,7 @@ glsl_type::generate_100ES_types(glsl_symbol_table *symtab)
add_types_to_symbol_table(symtab, builtin_structure_types,
Elements(builtin_structure_types),
false);
- add_types_to_symbol_table(symtab, &void_type, 1, false);
+ add_types_to_symbol_table(symtab, void_type, 1, false);
}
void
@@ -131,6 +131,7 @@ glsl_type::generate_110_types(glsl_symbol_table *symtab)
add_types_to_symbol_table(symtab, builtin_110_types,
Elements(builtin_110_types),
false);
+ add_types_to_symbol_table(symtab, &_sampler3D_type, 1, false);
add_types_to_symbol_table(symtab, builtin_110_deprecated_structure_types,
Elements(builtin_110_deprecated_structure_types),
false);
@@ -179,6 +180,13 @@ glsl_type::generate_EXT_texture_array_types(glsl_symbol_table *symtab,
void
+glsl_type::generate_OES_texture_3D_types(glsl_symbol_table *symtab, bool warn)
+{
+ add_types_to_symbol_table(symtab, &_sampler3D_type, 1, warn);
+}
+
+
+void
_mesa_glsl_initialize_types(struct _mesa_glsl_parse_state *state)
{
switch (state->language_version) {
@@ -204,6 +212,10 @@ _mesa_glsl_initialize_types(struct _mesa_glsl_parse_state *state)
glsl_type::generate_ARB_texture_rectangle_types(state->symbols,
state->ARB_texture_rectangle_warn);
}
+ if (state->OES_texture_3D_enable && state->language_version == 100) {
+ glsl_type::generate_OES_texture_3D_types(state->symbols,
+ state->OES_texture_3D_warn);
+ }
if (state->EXT_texture_array_enable && state->language_version < 130) {
// These are already included in 130; don't create twice.
@@ -264,7 +276,7 @@ glsl_type::glsl_type(const glsl_type *array, unsigned length) :
* NUL.
*/
const unsigned name_length = strlen(array->name) + 10 + 3;
- char *const n = (char *) talloc_size(this->mem_ctx, name_length);
+ char *const n = (char *) ralloc_size(this->mem_ctx, name_length);
if (length == 0)
snprintf(n, name_length, "%s[]", array->name);
@@ -279,7 +291,7 @@ const glsl_type *
glsl_type::get_instance(unsigned base_type, unsigned rows, unsigned columns)
{
if (base_type == GLSL_TYPE_VOID)
- return &void_type;
+ return void_type;
if ((rows < 1) || (rows > 4) || (columns < 1) || (columns > 4))
return error_type;
@@ -354,7 +366,7 @@ glsl_type::get_array_instance(const glsl_type *base, unsigned array_size)
if (t == NULL) {
t = new glsl_type(base, array_size);
- hash_table_insert(array_types, (void *) t, talloc_strdup(mem_ctx, key));
+ hash_table_insert(array_types, (void *) t, ralloc_strdup(mem_ctx, key));
}
assert(t->base_type == GLSL_TYPE_ARRAY);
diff --git a/src/glsl/glsl_types.h b/src/glsl/glsl_types.h
index d62d493c8e8..1b069df74fe 100644
--- a/src/glsl/glsl_types.h
+++ b/src/glsl/glsl_types.h
@@ -26,14 +26,15 @@
#ifndef GLSL_TYPES_H
#define GLSL_TYPES_H
-#include <cstring>
-#include <cassert>
+#include <string.h>
+#include <assert.h>
extern "C" {
#include "GL/gl.h"
-#include <talloc.h>
}
+#include "ralloc.h"
+
struct _mesa_glsl_parse_state;
struct glsl_symbol_table;
@@ -69,7 +70,7 @@ struct glsl_type {
GLenum gl_type;
glsl_base_type base_type;
- unsigned sampler_dimensionality:3;
+ unsigned sampler_dimensionality:3; /**< \see glsl_sampler_dim */
unsigned sampler_shadow:1;
unsigned sampler_array:1;
unsigned sampler_type:2; /**< Type of data returned using this sampler.
@@ -77,28 +78,28 @@ struct glsl_type {
* and \c GLSL_TYPE_UINT are valid.
*/
- /* Callers of this talloc-based new need not call delete. It's
- * easier to just talloc_free 'mem_ctx' (or any of its ancestors). */
+ /* Callers of this ralloc-based new need not call delete. It's
+ * easier to just ralloc_free 'mem_ctx' (or any of its ancestors). */
static void* operator new(size_t size)
{
if (glsl_type::mem_ctx == NULL) {
- glsl_type::mem_ctx = talloc_init("glsl_type");
+ glsl_type::mem_ctx = ralloc_context(NULL);
assert(glsl_type::mem_ctx != NULL);
}
void *type;
- type = talloc_size(glsl_type::mem_ctx, size);
+ type = ralloc_size(glsl_type::mem_ctx, size);
assert(type != NULL);
return type;
}
/* If the user *does* call delete, that's OK, we will just
- * talloc_free in that case. */
+ * ralloc_free in that case. */
static void operator delete(void *type)
{
- talloc_free(type);
+ ralloc_free(type);
}
/**
@@ -142,6 +143,7 @@ struct glsl_type {
*/
/*@{*/
static const glsl_type *const error_type;
+ static const glsl_type *const void_type;
static const glsl_type *const int_type;
static const glsl_type *const ivec4_type;
static const glsl_type *const uint_type;
@@ -385,13 +387,13 @@ struct glsl_type {
private:
/**
- * talloc context for all glsl_type allocations
+ * ralloc context for all glsl_type allocations
*
* Set on the first call to \c glsl_type::new.
*/
static void *mem_ctx;
- void init_talloc_type_ctx(void);
+ void init_ralloc_type_ctx(void);
/** Constructor for vector and matrix types */
glsl_type(GLenum gl_type,
@@ -424,7 +426,8 @@ private:
*/
/*@{*/
static const glsl_type _error_type;
- static const glsl_type void_type;
+ static const glsl_type _void_type;
+ static const glsl_type _sampler3D_type;
static const glsl_type builtin_core_types[];
static const glsl_type builtin_structure_types[];
static const glsl_type builtin_110_deprecated_structure_types[];
@@ -451,6 +454,7 @@ private:
static void generate_130_types(glsl_symbol_table *);
static void generate_ARB_texture_rectangle_types(glsl_symbol_table *, bool);
static void generate_EXT_texture_array_types(glsl_symbol_table *, bool);
+ static void generate_OES_texture_3D_types(glsl_symbol_table *, bool);
/*@}*/
/**
diff --git a/src/glsl/ir.cpp b/src/glsl/ir.cpp
index b8b0fed9d1c..a3623b31e5d 100644
--- a/src/glsl/ir.cpp
+++ b/src/glsl/ir.cpp
@@ -261,12 +261,38 @@ ir_expression::ir_expression(int op, ir_rvalue *op0)
case ir_unop_floor:
case ir_unop_fract:
case ir_unop_round_even:
+ case ir_unop_sin:
case ir_unop_cos:
+ case ir_unop_sin_reduced:
+ case ir_unop_cos_reduced:
case ir_unop_dFdx:
case ir_unop_dFdy:
this->type = op0->type;
break;
+ case ir_unop_f2i:
+ case ir_unop_b2i:
+ this->type = glsl_type::get_instance(GLSL_TYPE_INT,
+ op0->type->vector_elements, 1);
+ break;
+
+ case ir_unop_b2f:
+ case ir_unop_i2f:
+ case ir_unop_u2f:
+ this->type = glsl_type::get_instance(GLSL_TYPE_FLOAT,
+ op0->type->vector_elements, 1);
+ break;
+
+ case ir_unop_f2b:
+ case ir_unop_i2b:
+ this->type = glsl_type::get_instance(GLSL_TYPE_BOOL,
+ op0->type->vector_elements, 1);
+ break;
+
+ case ir_unop_noise:
+ this->type = glsl_type::float_type;
+ break;
+
case ir_unop_any:
this->type = glsl_type::bool_type;
break;
@@ -302,6 +328,8 @@ ir_expression::ir_expression(int op, ir_rvalue *op0, ir_rvalue *op1)
case ir_binop_max:
case ir_binop_pow:
case ir_binop_mul:
+ case ir_binop_div:
+ case ir_binop_mod:
if (op0->type->is_scalar()) {
this->type = op1->type;
} else if (op1->type->is_scalar()) {
@@ -315,7 +343,11 @@ ir_expression::ir_expression(int op, ir_rvalue *op0, ir_rvalue *op1)
break;
case ir_binop_logic_and:
+ case ir_binop_logic_xor:
case ir_binop_logic_or:
+ case ir_binop_bit_and:
+ case ir_binop_bit_xor:
+ case ir_binop_bit_or:
if (op0->type->is_scalar()) {
this->type = op1->type;
} else if (op1->type->is_scalar()) {
@@ -323,10 +355,26 @@ ir_expression::ir_expression(int op, ir_rvalue *op0, ir_rvalue *op1)
}
break;
+ case ir_binop_equal:
+ case ir_binop_nequal:
+ case ir_binop_lequal:
+ case ir_binop_gequal:
+ case ir_binop_less:
+ case ir_binop_greater:
+ assert(op0->type == op1->type);
+ this->type = glsl_type::get_instance(GLSL_TYPE_BOOL,
+ op0->type->vector_elements, 1);
+ break;
+
case ir_binop_dot:
this->type = glsl_type::float_type;
break;
+ case ir_binop_lshift:
+ case ir_binop_rshift:
+ this->type = op0->type;
+ break;
+
default:
assert(!"not reached: missing automatic type setup for ir_expression");
this->type = glsl_type::float_type;
@@ -424,6 +472,22 @@ const char *ir_expression::operator_string()
return operator_string(this->operation);
}
+const char*
+depth_layout_string(ir_depth_layout layout)
+{
+ switch(layout) {
+ case ir_depth_layout_none: return "";
+ case ir_depth_layout_any: return "depth_any";
+ case ir_depth_layout_greater: return "depth_greater";
+ case ir_depth_layout_less: return "depth_less";
+ case ir_depth_layout_unchanged: return "depth_unchanged";
+
+ default:
+ assert(0);
+ return "";
+ }
+}
+
ir_expression_operation
ir_expression::get_operator(const char *str)
{
@@ -514,7 +578,7 @@ ir_constant::ir_constant(const struct glsl_type *type, exec_list *value_list)
|| type->is_record() || type->is_array());
if (type->is_array()) {
- this->array_elements = talloc_array(this, ir_constant *, type->length);
+ this->array_elements = ralloc_array(this, ir_constant *, type->length);
unsigned i = 0;
foreach_list(node, value_list) {
ir_constant *value = (ir_constant *) node;
@@ -972,7 +1036,7 @@ ir_dereference_array::ir_dereference_array(ir_rvalue *value,
ir_dereference_array::ir_dereference_array(ir_variable *var,
ir_rvalue *array_index)
{
- void *ctx = talloc_parent(var);
+ void *ctx = ralloc_parent(var);
this->ir_type = ir_type_dereference_array;
this->array_index = array_index;
@@ -1005,7 +1069,7 @@ ir_dereference_record::ir_dereference_record(ir_rvalue *value,
{
this->ir_type = ir_type_dereference_record;
this->record = value;
- this->field = talloc_strdup(this, field);
+ this->field = ralloc_strdup(this, field);
this->type = (this->record != NULL)
? this->record->type->field_type(field) : glsl_type::error_type;
}
@@ -1014,11 +1078,11 @@ ir_dereference_record::ir_dereference_record(ir_rvalue *value,
ir_dereference_record::ir_dereference_record(ir_variable *var,
const char *field)
{
- void *ctx = talloc_parent(var);
+ void *ctx = ralloc_parent(var);
this->ir_type = ir_type_dereference_record;
this->record = new(ctx) ir_dereference_variable(var);
- this->field = talloc_strdup(this, field);
+ this->field = ralloc_strdup(this, field);
this->type = (this->record != NULL)
? this->record->type->field_type(field) : glsl_type::error_type;
}
@@ -1086,22 +1150,18 @@ ir_texture::get_opcode(const char *str)
void
-ir_texture::set_sampler(ir_dereference *sampler)
+ir_texture::set_sampler(ir_dereference *sampler, const glsl_type *type)
{
assert(sampler != NULL);
+ assert(type != NULL);
this->sampler = sampler;
+ this->type = type;
- switch (sampler->type->sampler_type) {
- case GLSL_TYPE_FLOAT:
- this->type = glsl_type::vec4_type;
- break;
- case GLSL_TYPE_INT:
- this->type = glsl_type::ivec4_type;
- break;
- case GLSL_TYPE_UINT:
- this->type = glsl_type::uvec4_type;
- break;
- }
+ assert(sampler->type->sampler_type == (int) type->base_type);
+ if (sampler->type->sampler_shadow)
+ assert(type->vector_elements == 4 || type->vector_elements == 1);
+ else
+ assert(type->vector_elements == 4);
}
@@ -1181,7 +1241,7 @@ ir_swizzle::ir_swizzle(ir_rvalue *val, ir_swizzle_mask mask)
ir_swizzle *
ir_swizzle::create(ir_rvalue *val, const char *str, unsigned vector_length)
{
- void *ctx = talloc_parent(val);
+ void *ctx = ralloc_parent(val);
/* For each possible swizzle character, this table encodes the value in
* \c idx_map that represents the 0th element of the vector. For invalid
@@ -1270,13 +1330,15 @@ ir_variable::ir_variable(const struct glsl_type *type, const char *name,
{
this->ir_type = ir_type_variable;
this->type = type;
- this->name = talloc_strdup(this, name);
+ this->name = ralloc_strdup(this, name);
this->explicit_location = false;
this->location = -1;
this->warn_extension = NULL;
this->constant_value = NULL;
this->origin_upper_left = false;
this->pixel_center_integer = false;
+ this->depth_layout = ir_depth_layout_none;
+ this->used = false;
if (type && type->base_type == GLSL_TYPE_SAMPLER)
this->read_only = true;
@@ -1313,6 +1375,21 @@ ir_function_signature::ir_function_signature(const glsl_type *return_type)
}
+static bool
+modes_match(unsigned a, unsigned b)
+{
+ if (a == b)
+ return true;
+
+ /* Accept "in" vs. "const in" */
+ if ((a == ir_var_const_in && b == ir_var_in) ||
+ (b == ir_var_const_in && a == ir_var_in))
+ return true;
+
+ return false;
+}
+
+
const char *
ir_function_signature::qualifiers_match(exec_list *params)
{
@@ -1325,7 +1402,7 @@ ir_function_signature::qualifiers_match(exec_list *params)
ir_variable *b = (ir_variable *)iter_b.get();
if (a->read_only != b->read_only ||
- a->mode != b->mode ||
+ !modes_match(a->mode, b->mode) ||
a->interpolation != b->interpolation ||
a->centroid != b->centroid) {
@@ -1360,7 +1437,7 @@ ir_function_signature::replace_parameters(exec_list *new_params)
ir_function::ir_function(const char *name)
{
this->ir_type = ir_type_function;
- this->name = talloc_strdup(this, name);
+ this->name = ralloc_strdup(this, name);
}
@@ -1426,7 +1503,7 @@ steal_memory(ir_instruction *ir, void *new_ctx)
}
}
- talloc_steal(new_ctx, ir);
+ ralloc_steal(new_ctx, ir);
}
diff --git a/src/glsl/ir.h b/src/glsl/ir.h
index f3c1d42108b..39d4ebc7107 100644
--- a/src/glsl/ir.h
+++ b/src/glsl/ir.h
@@ -26,13 +26,10 @@
#ifndef IR_H
#define IR_H
-#include <cstdio>
-#include <cstdlib>
-
-extern "C" {
-#include <talloc.h>
-}
+#include <stdio.h>
+#include <stdlib.h>
+#include "ralloc.h"
#include "glsl_types.h"
#include "list.h"
#include "ir_visitor.h"
@@ -131,7 +128,6 @@ protected:
ir_type = ir_type_unset;
type = NULL;
}
- virtual ~ir_instruction() {}
};
@@ -226,6 +222,8 @@ enum ir_variable_mode {
ir_var_in,
ir_var_out,
ir_var_inout,
+ ir_var_const_in, /**< "in" param that must be a constant expression */
+ ir_var_system_value, /**< Ex: front-face, instance-id, etc. */
ir_var_temporary /**< Temporary variable generated during compilation. */
};
@@ -235,6 +233,25 @@ enum ir_variable_interpolation {
ir_var_noperspective
};
+/**
+ * \brief Layout qualifiers for gl_FragDepth.
+ *
+ * The AMD_conservative_depth extension allows gl_FragDepth to be redeclared
+ * with a layout qualifier.
+ */
+enum ir_depth_layout {
+ ir_depth_layout_none, /**< No depth layout is specified. */
+ ir_depth_layout_any,
+ ir_depth_layout_greater,
+ ir_depth_layout_less,
+ ir_depth_layout_unchanged
+};
+
+/**
+ * \brief Convert depth layout qualifier to string.
+ */
+const char*
+depth_layout_string(ir_depth_layout layout);
class ir_variable : public ir_instruction {
public:
@@ -296,6 +313,15 @@ public:
unsigned invariant:1;
/**
+ * Has this variable been used for reading or writing?
+ *
+ * Several GLSL semantic checks require knowledge of whether or not a
+ * variable has been used. For example, it is an error to redeclare a
+ * variable as invariant after it has been used.
+ */
+ unsigned used:1;
+
+ /**
* Storage class of the variable.
*
* \sa ir_variable_mode
@@ -326,6 +352,14 @@ public:
/*@}*/
/**
+ * \brief Layout qualifier for gl_FragDepth.
+ *
+ * This is not equal to \c ir_depth_layout_none if and only if this
+ * variable is \c gl_FragDepth and a layout qualifier is specified.
+ */
+ ir_depth_layout depth_layout;
+
+ /**
* Was the location explicitly set in the shader?
*
* If the location is explicitly set in the shader, it \b cannot be changed
@@ -950,7 +984,7 @@ public:
/**
* Get a generic ir_call object when an error occurs
*
- * Any allocation will be performed with 'ctx' as talloc owner.
+ * Any allocation will be performed with 'ctx' as ralloc owner.
*/
static ir_call *get_error_instruction(void *ctx);
@@ -1157,21 +1191,21 @@ enum ir_texture_opcode {
* selected from \c ir_texture_opcodes. In the printed IR, these will
* appear as:
*
- * Texel offset
- * | Projection divisor
- * | | Shadow comparitor
- * | | |
- * v v v
- * (tex (sampler) (coordinate) (0 0 0) (1) ( ))
- * (txb (sampler) (coordinate) (0 0 0) (1) ( ) (bias))
- * (txl (sampler) (coordinate) (0 0 0) (1) ( ) (lod))
- * (txd (sampler) (coordinate) (0 0 0) (1) ( ) (dPdx dPdy))
- * (txf (sampler) (coordinate) (0 0 0) (lod))
+ * Texel offset (0 or an expression)
+ * | Projection divisor
+ * | | Shadow comparitor
+ * | | |
+ * v v v
+ * (tex <type> <sampler> <coordinate> 0 1 ( ))
+ * (txb <type> <sampler> <coordinate> 0 1 ( ) <bias>)
+ * (txl <type> <sampler> <coordinate> 0 1 ( ) <lod>)
+ * (txd <type> <sampler> <coordinate> 0 1 ( ) (dPdx dPdy))
+ * (txf <type> <sampler> <coordinate> 0 <lod>)
*/
class ir_texture : public ir_rvalue {
public:
ir_texture(enum ir_texture_opcode op)
- : op(op), projector(NULL), shadow_comparitor(NULL)
+ : op(op), projector(NULL), shadow_comparitor(NULL), offset(NULL)
{
this->ir_type = ir_type_texture;
}
@@ -1192,8 +1226,8 @@ public:
*/
const char *opcode_string();
- /** Set the sampler and infer the type. */
- void set_sampler(ir_dereference *sampler);
+ /** Set the sampler and type. */
+ void set_sampler(ir_dereference *sampler, const glsl_type *type);
/**
* Do a reverse-lookup to translate a string into an ir_texture_opcode.
@@ -1225,8 +1259,8 @@ public:
*/
ir_rvalue *shadow_comparitor;
- /** Explicit texel offsets. */
- signed char offsets[3];
+ /** Texel offset. */
+ ir_rvalue *offset;
union {
ir_rvalue *lod; /**< Floating point LOD */
@@ -1583,8 +1617,7 @@ _mesa_glsl_initialize_variables(exec_list *instructions,
struct _mesa_glsl_parse_state *state);
extern void
-_mesa_glsl_initialize_functions(exec_list *instructions,
- struct _mesa_glsl_parse_state *state);
+_mesa_glsl_initialize_functions(_mesa_glsl_parse_state *state);
extern void
_mesa_glsl_release_functions(void);
diff --git a/src/glsl/ir_clone.cpp b/src/glsl/ir_clone.cpp
index 1522af682bb..2c0574dc6bf 100644
--- a/src/glsl/ir_clone.cpp
+++ b/src/glsl/ir_clone.cpp
@@ -217,8 +217,8 @@ ir_texture::clone(void *mem_ctx, struct hash_table *ht) const
new_tex->shadow_comparitor = this->shadow_comparitor->clone(mem_ctx, ht);
}
- for (int i = 0; i < 3; i++)
- new_tex->offsets[i] = this->offsets[i];
+ if (this->offset != NULL)
+ new_tex->offset = this->offset->clone(mem_ctx, ht);
switch (this->op) {
case ir_tex:
@@ -346,7 +346,7 @@ ir_constant::clone(void *mem_ctx, struct hash_table *ht) const
ir_constant *c = new(mem_ctx) ir_constant;
c->type = this->type;
- c->array_elements = talloc_array(c, ir_constant *, this->type->length);
+ c->array_elements = ralloc_array(c, ir_constant *, this->type->length);
for (unsigned i = 0; i < this->type->length; i++) {
c->array_elements[i] = this->array_elements[i]->clone(mem_ctx, NULL);
}
diff --git a/src/glsl/ir_constant_expression.cpp b/src/glsl/ir_constant_expression.cpp
index 4fd6d09a3af..2a308489656 100644
--- a/src/glsl/ir_constant_expression.cpp
+++ b/src/glsl/ir_constant_expression.cpp
@@ -86,7 +86,7 @@ ir_expression::constant_expression_value()
components = op[1]->type->components();
}
- void *ctx = talloc_parent(this);
+ void *ctx = ralloc_parent(this);
/* Handle array operations here, rather than below. */
if (op[0]->type->is_array()) {
@@ -507,6 +507,7 @@ ir_expression::constant_expression_value()
break;
case ir_binop_div:
+ /* FINISHME: Emit warning when division-by-zero is detected. */
assert(op[0]->type == op[1]->type || op0_scalar || op1_scalar);
for (unsigned c = 0, c0 = 0, c1 = 0;
c < components;
@@ -514,10 +515,18 @@ ir_expression::constant_expression_value()
switch (op[0]->type->base_type) {
case GLSL_TYPE_UINT:
- data.u[c] = op[0]->value.u[c0] / op[1]->value.u[c1];
+ if (op[1]->value.u[c1] == 0) {
+ data.u[c] = 0;
+ } else {
+ data.u[c] = op[0]->value.u[c0] / op[1]->value.u[c1];
+ }
break;
case GLSL_TYPE_INT:
- data.i[c] = op[0]->value.i[c0] / op[1]->value.i[c1];
+ if (op[1]->value.i[c1] == 0) {
+ data.i[c] = 0;
+ } else {
+ data.i[c] = op[0]->value.i[c0] / op[1]->value.i[c1];
+ }
break;
case GLSL_TYPE_FLOAT:
data.f[c] = op[0]->value.f[c0] / op[1]->value.f[c1];
@@ -529,6 +538,7 @@ ir_expression::constant_expression_value()
break;
case ir_binop_mod:
+ /* FINISHME: Emit warning when division-by-zero is detected. */
assert(op[0]->type == op[1]->type || op0_scalar || op1_scalar);
for (unsigned c = 0, c0 = 0, c1 = 0;
c < components;
@@ -536,10 +546,18 @@ ir_expression::constant_expression_value()
switch (op[0]->type->base_type) {
case GLSL_TYPE_UINT:
- data.u[c] = op[0]->value.u[c0] % op[1]->value.u[c1];
+ if (op[1]->value.u[c1] == 0) {
+ data.u[c] = 0;
+ } else {
+ data.u[c] = op[0]->value.u[c0] % op[1]->value.u[c1];
+ }
break;
case GLSL_TYPE_INT:
- data.i[c] = op[0]->value.i[c0] % op[1]->value.i[c1];
+ if (op[1]->value.i[c1] == 0) {
+ data.i[c] = 0;
+ } else {
+ data.i[c] = op[0]->value.i[c0] % op[1]->value.i[c1];
+ }
break;
case GLSL_TYPE_FLOAT:
/* We don't use fmod because it rounds toward zero; GLSL specifies
@@ -845,7 +863,7 @@ ir_swizzle::constant_expression_value()
}
}
- void *ctx = talloc_parent(this);
+ void *ctx = ralloc_parent(this);
return new(ctx) ir_constant(this->type, &data);
}
return NULL;
@@ -868,7 +886,7 @@ ir_dereference_variable::constant_expression_value()
if (!var->constant_value)
return NULL;
- return var->constant_value->clone(talloc_parent(var), NULL);
+ return var->constant_value->clone(ralloc_parent(var), NULL);
}
@@ -879,7 +897,7 @@ ir_dereference_array::constant_expression_value()
ir_constant *idx = this->array_index->constant_expression_value();
if ((array != NULL) && (idx != NULL)) {
- void *ctx = talloc_parent(this);
+ void *ctx = ralloc_parent(this);
if (array->type->is_matrix()) {
/* Array access of a matrix results in a vector.
*/
@@ -984,7 +1002,7 @@ ir_call::constant_expression_value()
* - Fill "data" with appopriate constant data
* - Return an ir_constant directly.
*/
- void *mem_ctx = talloc_parent(this);
+ void *mem_ctx = ralloc_parent(this);
ir_expression *expr = NULL;
ir_constant_data data;
diff --git a/src/glsl/ir_expression_flattening.cpp b/src/glsl/ir_expression_flattening.cpp
index 7b1b8dbfef1..0b7c537bd8a 100644
--- a/src/glsl/ir_expression_flattening.cpp
+++ b/src/glsl/ir_expression_flattening.cpp
@@ -78,7 +78,7 @@ ir_expression_flattening_visitor::handle_rvalue(ir_rvalue **rvalue)
if (!ir || !this->predicate(ir))
return;
- void *ctx = talloc_parent(ir);
+ void *ctx = ralloc_parent(ir);
var = new(ctx) ir_variable(ir->type, "flattening_tmp", ir_var_temporary);
base_ir->insert_before(var);
diff --git a/src/glsl/ir_function.cpp b/src/glsl/ir_function.cpp
index 8db70119ec2..caee9296af9 100644
--- a/src/glsl/ir_function.cpp
+++ b/src/glsl/ir_function.cpp
@@ -123,6 +123,7 @@ parameter_lists_match(const exec_list *list_a, const exec_list *list_b)
assert(0);
return -1;
+ case ir_var_const_in:
case ir_var_in:
score = type_compare(param->type, actual->type);
break;
diff --git a/src/glsl/ir_hierarchical_visitor.h b/src/glsl/ir_hierarchical_visitor.h
index 387563f1139..dc177f5eb0d 100644
--- a/src/glsl/ir_hierarchical_visitor.h
+++ b/src/glsl/ir_hierarchical_visitor.h
@@ -77,7 +77,6 @@ enum ir_visitor_status {
class ir_hierarchical_visitor {
public:
ir_hierarchical_visitor();
- virtual ~ir_hierarchical_visitor() {}
/**
* \name Visit methods for leaf-node classes
diff --git a/src/glsl/ir_hv_accept.cpp b/src/glsl/ir_hv_accept.cpp
index be8b36a7cf8..4a607dc8749 100644
--- a/src/glsl/ir_hv_accept.cpp
+++ b/src/glsl/ir_hv_accept.cpp
@@ -187,6 +187,12 @@ ir_texture::accept(ir_hierarchical_visitor *v)
return (s == visit_continue_with_parent) ? visit_continue : s;
}
+ if (this->offset) {
+ s = this->offset->accept(v);
+ if (s != visit_continue)
+ return (s == visit_continue_with_parent) ? visit_continue : s;
+ }
+
switch (this->op) {
case ir_tex:
break;
diff --git a/src/glsl/ir_import_prototypes.cpp b/src/glsl/ir_import_prototypes.cpp
index 4e0b30aa90e..3585bf6b24b 100644
--- a/src/glsl/ir_import_prototypes.cpp
+++ b/src/glsl/ir_import_prototypes.cpp
@@ -27,7 +27,6 @@
*
* \author Ian Romanick
*/
-#include <cstdio>
#include "ir.h"
#include "glsl_symbol_table.h"
@@ -109,7 +108,7 @@ private:
* \param dest Destination instruction stream where new \c ir_function and
* \c ir_function_signature nodes will be stored
* \param symbols Symbol table where new functions will be stored
- * \param mem_ctx talloc memory context used for new allocations
+ * \param mem_ctx ralloc memory context used for new allocations
*/
void
import_prototypes(const exec_list *source, exec_list *dest,
diff --git a/src/glsl/ir_optimization.h b/src/glsl/ir_optimization.h
index f264265f4b1..dd265673c55 100644
--- a/src/glsl/ir_optimization.h
+++ b/src/glsl/ir_optimization.h
@@ -43,6 +43,7 @@ bool do_constant_folding(exec_list *instructions);
bool do_constant_variable(exec_list *instructions);
bool do_constant_variable_unlinked(exec_list *instructions);
bool do_copy_propagation(exec_list *instructions);
+bool do_copy_propagation_elements(exec_list *instructions);
bool do_constant_propagation(exec_list *instructions);
bool do_dead_code(exec_list *instructions);
bool do_dead_code_local(exec_list *instructions);
@@ -53,7 +54,7 @@ bool do_lower_jumps(exec_list *instructions, bool pull_out_jumps = true, bool lo
bool do_lower_texture_projection(exec_list *instructions);
bool do_if_simplification(exec_list *instructions);
bool do_discard_simplification(exec_list *instructions);
-bool do_if_to_cond_assign(exec_list *instructions);
+bool lower_if_to_cond_assign(exec_list *instructions, unsigned max_depth = 0);
bool do_mat_op_to_vec(exec_list *instructions);
bool do_mod_to_fract(exec_list *instructions);
bool do_noop_swizzle(exec_list *instructions);
diff --git a/src/glsl/ir_print_visitor.cpp b/src/glsl/ir_print_visitor.cpp
index 0aa0b0a5d32..a84f8dfc8a1 100644
--- a/src/glsl/ir_print_visitor.cpp
+++ b/src/glsl/ir_print_visitor.cpp
@@ -97,7 +97,7 @@ void ir_print_visitor::visit(ir_variable *ir)
const char *const cent = (ir->centroid) ? "centroid " : "";
const char *const inv = (ir->invariant) ? "invariant " : "";
const char *const mode[] = { "", "uniform ", "in ", "out ", "inout ",
- "temporary " };
+ "const_in ", "sys ", "temporary " };
const char *const interp[] = { "", "flat", "noperspective" };
printf("(%s%s%s%s) ",
@@ -187,12 +187,23 @@ void ir_print_visitor::visit(ir_texture *ir)
{
printf("(%s ", ir->opcode_string());
+ print_type(ir->type);
+ printf(" ");
+
ir->sampler->accept(this);
printf(" ");
ir->coordinate->accept(this);
- printf(" (%d %d %d) ", ir->offsets[0], ir->offsets[1], ir->offsets[2]);
+ printf(" ");
+
+ if (ir->offset != NULL) {
+ ir->offset->accept(this);
+ } else {
+ printf("0");
+ }
+
+ printf(" ");
if (ir->op != ir_txf) {
if (ir->projector)
@@ -281,9 +292,6 @@ void ir_print_visitor::visit(ir_assignment *ir)
if (ir->condition)
ir->condition->accept(this);
- else
- printf("(constant bool (1))");
-
char mask[5];
unsigned j = 0;
diff --git a/src/glsl/ir_reader.cpp b/src/glsl/ir_reader.cpp
index b9d9d8639f5..30df257be2f 100644
--- a/src/glsl/ir_reader.cpp
+++ b/src/glsl/ir_reader.cpp
@@ -21,12 +21,6 @@
* DEALINGS IN THE SOFTWARE.
*/
-
-extern "C" {
-#include <stdarg.h>
-#include <talloc.h>
-}
-
#include "ir_reader.h"
#include "glsl_parser_extras.h"
#include "glsl_types.h"
@@ -34,155 +28,137 @@ extern "C" {
const static bool debug = false;
-static void ir_read_error(_mesa_glsl_parse_state *, s_expression *,
- const char *fmt, ...);
-static const glsl_type *read_type(_mesa_glsl_parse_state *, s_expression *);
-
-static void scan_for_prototypes(_mesa_glsl_parse_state *, exec_list *,
- s_expression *);
-static ir_function *read_function(_mesa_glsl_parse_state *, s_list *,
- bool skip_body);
-static void read_function_sig(_mesa_glsl_parse_state *, ir_function *,
- s_list *, bool skip_body);
-
-static void read_instructions(_mesa_glsl_parse_state *, exec_list *,
- s_expression *, ir_loop *);
-static ir_instruction *read_instruction(_mesa_glsl_parse_state *,
- s_expression *, ir_loop *);
-static ir_variable *read_declaration(_mesa_glsl_parse_state *, s_list *);
-static ir_if *read_if(_mesa_glsl_parse_state *, s_list *, ir_loop *);
-static ir_loop *read_loop(_mesa_glsl_parse_state *st, s_list *list);
-static ir_return *read_return(_mesa_glsl_parse_state *, s_list *);
-
-static ir_rvalue *read_rvalue(_mesa_glsl_parse_state *, s_expression *);
-static ir_assignment *read_assignment(_mesa_glsl_parse_state *, s_list *);
-static ir_expression *read_expression(_mesa_glsl_parse_state *, s_list *);
-static ir_call *read_call(_mesa_glsl_parse_state *, s_list *);
-static ir_swizzle *read_swizzle(_mesa_glsl_parse_state *, s_list *);
-static ir_constant *read_constant(_mesa_glsl_parse_state *, s_list *);
-static ir_texture *read_texture(_mesa_glsl_parse_state *, s_list *);
-
-static ir_dereference *read_dereference(_mesa_glsl_parse_state *,
- s_expression *);
-static ir_dereference_variable *
-read_var_ref(_mesa_glsl_parse_state *, s_list *);
-static ir_dereference_array *
-read_array_ref(_mesa_glsl_parse_state *, s_list *);
-static ir_dereference_record *
-read_record_ref(_mesa_glsl_parse_state *, s_list *);
+class ir_reader {
+public:
+ ir_reader(_mesa_glsl_parse_state *);
+
+ void read(exec_list *instructions, const char *src, bool scan_for_protos);
+
+private:
+ void *mem_ctx;
+ _mesa_glsl_parse_state *state;
+
+ void ir_read_error(s_expression *, const char *fmt, ...);
+
+ const glsl_type *read_type(s_expression *);
+
+ void scan_for_prototypes(exec_list *, s_expression *);
+ ir_function *read_function(s_expression *, bool skip_body);
+ void read_function_sig(ir_function *, s_expression *, bool skip_body);
+
+ void read_instructions(exec_list *, s_expression *, ir_loop *);
+ ir_instruction *read_instruction(s_expression *, ir_loop *);
+ ir_variable *read_declaration(s_expression *);
+ ir_if *read_if(s_expression *, ir_loop *);
+ ir_loop *read_loop(s_expression *);
+ ir_return *read_return(s_expression *);
+ ir_rvalue *read_rvalue(s_expression *);
+ ir_assignment *read_assignment(s_expression *);
+ ir_expression *read_expression(s_expression *);
+ ir_call *read_call(s_expression *);
+ ir_swizzle *read_swizzle(s_expression *);
+ ir_constant *read_constant(s_expression *);
+ ir_texture *read_texture(s_expression *);
+
+ ir_dereference *read_dereference(s_expression *);
+};
+
+ir_reader::ir_reader(_mesa_glsl_parse_state *state) : state(state)
+{
+ this->mem_ctx = state;
+}
void
_mesa_glsl_read_ir(_mesa_glsl_parse_state *state, exec_list *instructions,
const char *src, bool scan_for_protos)
{
- s_expression *expr = s_expression::read_expression(state, src);
+ ir_reader r(state);
+ r.read(instructions, src, scan_for_protos);
+}
+
+void
+ir_reader::read(exec_list *instructions, const char *src, bool scan_for_protos)
+{
+ s_expression *expr = s_expression::read_expression(mem_ctx, src);
if (expr == NULL) {
- ir_read_error(state, NULL, "couldn't parse S-Expression.");
+ ir_read_error(NULL, "couldn't parse S-Expression.");
return;
}
if (scan_for_protos) {
- scan_for_prototypes(state, instructions, expr);
+ scan_for_prototypes(instructions, expr);
if (state->error)
return;
}
- read_instructions(state, instructions, expr, NULL);
- talloc_free(expr);
+ read_instructions(instructions, expr, NULL);
+ ralloc_free(expr);
if (debug)
validate_ir_tree(instructions);
}
-static void
-ir_read_error(_mesa_glsl_parse_state *state, s_expression *expr,
- const char *fmt, ...)
+void
+ir_reader::ir_read_error(s_expression *expr, const char *fmt, ...)
{
va_list ap;
state->error = true;
if (state->current_function != NULL)
- state->info_log = talloc_asprintf_append(state->info_log,
- "In function %s:\n",
- state->current_function->function_name());
- state->info_log = talloc_strdup_append(state->info_log, "error: ");
+ ralloc_asprintf_append(&state->info_log, "In function %s:\n",
+ state->current_function->function_name());
+ ralloc_strcat(&state->info_log, "error: ");
va_start(ap, fmt);
- state->info_log = talloc_vasprintf_append(state->info_log, fmt, ap);
+ ralloc_vasprintf_append(&state->info_log, fmt, ap);
va_end(ap);
- state->info_log = talloc_strdup_append(state->info_log, "\n");
+ ralloc_strcat(&state->info_log, "\n");
if (expr != NULL) {
- state->info_log = talloc_strdup_append(state->info_log,
- "...in this context:\n ");
+ ralloc_strcat(&state->info_log, "...in this context:\n ");
expr->print();
- state->info_log = talloc_strdup_append(state->info_log, "\n\n");
+ ralloc_strcat(&state->info_log, "\n\n");
}
}
-static const glsl_type *
-read_type(_mesa_glsl_parse_state *st, s_expression *expr)
+const glsl_type *
+ir_reader::read_type(s_expression *expr)
{
- s_list *list = SX_AS_LIST(expr);
- if (list != NULL) {
- s_symbol *type_sym = SX_AS_SYMBOL(list->subexpressions.get_head());
- if (type_sym == NULL) {
- ir_read_error(st, expr, "expected type (array ...) or (struct ...)");
+ s_expression *s_base_type;
+ s_int *s_size;
+
+ s_pattern pat[] = { "array", s_base_type, s_size };
+ if (MATCH(expr, pat)) {
+ const glsl_type *base_type = read_type(s_base_type);
+ if (base_type == NULL) {
+ ir_read_error(NULL, "when reading base type of array type");
return NULL;
}
- if (strcmp(type_sym->value(), "array") == 0) {
- if (list->length() != 3) {
- ir_read_error(st, expr, "expected type (array <type> <int>)");
- return NULL;
- }
- // Read base type
- s_expression *base_expr = (s_expression*) type_sym->next;
- const glsl_type *base_type = read_type(st, base_expr);
- if (base_type == NULL) {
- ir_read_error(st, NULL, "when reading base type of array");
- return NULL;
- }
-
- // Read array size
- s_int *size = SX_AS_INT(base_expr->next);
- if (size == NULL) {
- ir_read_error(st, expr, "found non-integer array size");
- return NULL;
- }
-
- return glsl_type::get_array_instance(base_type, size->value());
- } else if (strcmp(type_sym->value(), "struct") == 0) {
- assert(false); // FINISHME
- } else {
- ir_read_error(st, expr, "expected (array ...) or (struct ...); "
- "found (%s ...)", type_sym->value());
- return NULL;
- }
+ return glsl_type::get_array_instance(base_type, s_size->value());
}
s_symbol *type_sym = SX_AS_SYMBOL(expr);
if (type_sym == NULL) {
- ir_read_error(st, expr, "expected <type> (symbol or list)");
+ ir_read_error(expr, "expected <type>");
return NULL;
}
- const glsl_type *type = st->symbols->get_type(type_sym->value());
+ const glsl_type *type = state->symbols->get_type(type_sym->value());
if (type == NULL)
- ir_read_error(st, expr, "invalid type: %s", type_sym->value());
+ ir_read_error(expr, "invalid type: %s", type_sym->value());
return type;
}
-static void
-scan_for_prototypes(_mesa_glsl_parse_state *st, exec_list *instructions,
- s_expression *expr)
+void
+ir_reader::scan_for_prototypes(exec_list *instructions, s_expression *expr)
{
s_list *list = SX_AS_LIST(expr);
if (list == NULL) {
- ir_read_error(st, expr, "Expected (<instruction> ...); found an atom.");
+ ir_read_error(expr, "Expected (<instruction> ...); found an atom.");
return;
}
@@ -195,94 +171,73 @@ scan_for_prototypes(_mesa_glsl_parse_state *st, exec_list *instructions,
if (tag == NULL || strcmp(tag->value(), "function") != 0)
continue; // not a (function ...); ignore it.
- ir_function *f = read_function(st, sub, true);
+ ir_function *f = read_function(sub, true);
if (f == NULL)
return;
instructions->push_tail(f);
}
}
-static ir_function *
-read_function(_mesa_glsl_parse_state *st, s_list *list, bool skip_body)
+ir_function *
+ir_reader::read_function(s_expression *expr, bool skip_body)
{
- void *ctx = st;
bool added = false;
- if (list->length() < 3) {
- ir_read_error(st, list, "Expected (function <name> (signature ...) ...)");
- return NULL;
- }
+ s_symbol *name;
- s_symbol *name = SX_AS_SYMBOL(list->subexpressions.head->next);
- if (name == NULL) {
- ir_read_error(st, list, "Expected (function <name> ...)");
+ s_pattern pat[] = { "function", name };
+ if (!PARTIAL_MATCH(expr, pat)) {
+ ir_read_error(expr, "Expected (function <name> (signature ...) ...)");
return NULL;
}
- ir_function *f = st->symbols->get_function(name->value());
+ ir_function *f = state->symbols->get_function(name->value());
if (f == NULL) {
- f = new(ctx) ir_function(name->value());
- added = st->symbols->add_function(f);
+ f = new(mem_ctx) ir_function(name->value());
+ added = state->symbols->add_function(f);
assert(added);
}
- exec_list_iterator it = list->subexpressions.iterator();
+ exec_list_iterator it = ((s_list *) expr)->subexpressions.iterator();
it.next(); // skip "function" tag
it.next(); // skip function name
for (/* nothing */; it.has_next(); it.next()) {
- s_list *siglist = SX_AS_LIST(it.get());
- if (siglist == NULL) {
- ir_read_error(st, list, "Expected (function (signature ...) ...)");
- return NULL;
- }
-
- s_symbol *tag = SX_AS_SYMBOL(siglist->subexpressions.get_head());
- if (tag == NULL || strcmp(tag->value(), "signature") != 0) {
- ir_read_error(st, siglist, "Expected (signature ...)");
- return NULL;
- }
-
- read_function_sig(st, f, siglist, skip_body);
+ s_expression *s_sig = (s_expression *) it.get();
+ read_function_sig(f, s_sig, skip_body);
}
return added ? f : NULL;
}
-static void
-read_function_sig(_mesa_glsl_parse_state *st, ir_function *f, s_list *list,
- bool skip_body)
+void
+ir_reader::read_function_sig(ir_function *f, s_expression *expr, bool skip_body)
{
- void *ctx = st;
- if (list->length() != 4) {
- ir_read_error(st, list, "Expected (signature <type> (parameters ...) "
- "(<instruction> ...))");
+ s_expression *type_expr;
+ s_list *paramlist;
+ s_list *body_list;
+
+ s_pattern pat[] = { "signature", type_expr, paramlist, body_list };
+ if (!MATCH(expr, pat)) {
+ ir_read_error(expr, "Expected (signature <type> (parameters ...) "
+ "(<instruction> ...))");
return;
}
- s_expression *type_expr = (s_expression*) list->subexpressions.head->next;
- const glsl_type *return_type = read_type(st, type_expr);
+ const glsl_type *return_type = read_type(type_expr);
if (return_type == NULL)
return;
- s_list *paramlist = SX_AS_LIST(type_expr->next);
- s_list *body_list = SX_AS_LIST(type_expr->next->next);
- if (paramlist == NULL || body_list == NULL) {
- ir_read_error(st, list, "Expected (signature <type> (parameters ...) "
- "(<instruction> ...))");
- return;
- }
s_symbol *paramtag = SX_AS_SYMBOL(paramlist->subexpressions.get_head());
if (paramtag == NULL || strcmp(paramtag->value(), "parameters") != 0) {
- ir_read_error(st, paramlist, "Expected (parameters ...)");
+ ir_read_error(paramlist, "Expected (parameters ...)");
return;
}
// Read the parameters list into a temporary place.
exec_list hir_parameters;
- st->symbols->push_scope();
+ state->symbols->push_scope();
exec_list_iterator it = paramlist->subexpressions.iterator();
for (it.next() /* skip "parameters" */; it.has_next(); it.next()) {
- s_list *decl = SX_AS_LIST(it.get());
- ir_variable *var = read_declaration(st, decl);
+ ir_variable *var = read_declaration((s_expression *) it.get());
if (var == NULL)
return;
@@ -292,25 +247,25 @@ read_function_sig(_mesa_glsl_parse_state *st, ir_function *f, s_list *list,
ir_function_signature *sig = f->exact_matching_signature(&hir_parameters);
if (sig == NULL && skip_body) {
/* If scanning for prototypes, generate a new signature. */
- sig = new(ctx) ir_function_signature(return_type);
+ sig = new(mem_ctx) ir_function_signature(return_type);
sig->is_builtin = true;
f->add_signature(sig);
} else if (sig != NULL) {
const char *badvar = sig->qualifiers_match(&hir_parameters);
if (badvar != NULL) {
- ir_read_error(st, list, "function `%s' parameter `%s' qualifiers "
+ ir_read_error(expr, "function `%s' parameter `%s' qualifiers "
"don't match prototype", f->name, badvar);
return;
}
if (sig->return_type != return_type) {
- ir_read_error(st, list, "function `%s' return type doesn't "
+ ir_read_error(expr, "function `%s' return type doesn't "
"match prototype", f->name);
return;
}
} else {
/* No prototype for this body exists - skip it. */
- st->symbols->pop_scope();
+ state->symbols->pop_scope();
return;
}
assert(sig != NULL);
@@ -319,39 +274,39 @@ read_function_sig(_mesa_glsl_parse_state *st, ir_function *f, s_list *list,
if (!skip_body && !body_list->subexpressions.is_empty()) {
if (sig->is_defined) {
- ir_read_error(st, list, "function %s redefined", f->name);
+ ir_read_error(expr, "function %s redefined", f->name);
return;
}
- st->current_function = sig;
- read_instructions(st, &sig->body, body_list, NULL);
- st->current_function = NULL;
+ state->current_function = sig;
+ read_instructions(&sig->body, body_list, NULL);
+ state->current_function = NULL;
sig->is_defined = true;
}
- st->symbols->pop_scope();
+ state->symbols->pop_scope();
}
-static void
-read_instructions(_mesa_glsl_parse_state *st, exec_list *instructions,
- s_expression *expr, ir_loop *loop_ctx)
+void
+ir_reader::read_instructions(exec_list *instructions, s_expression *expr,
+ ir_loop *loop_ctx)
{
// Read in a list of instructions
s_list *list = SX_AS_LIST(expr);
if (list == NULL) {
- ir_read_error(st, expr, "Expected (<instruction> ...); found an atom.");
+ ir_read_error(expr, "Expected (<instruction> ...); found an atom.");
return;
}
foreach_iter(exec_list_iterator, it, list->subexpressions) {
s_expression *sub = (s_expression*) it.get();
- ir_instruction *ir = read_instruction(st, sub, loop_ctx);
+ ir_instruction *ir = read_instruction(sub, loop_ctx);
if (ir != NULL) {
/* Global variable declarations should be moved to the top, before
* any functions that might use them. Functions are added to the
* instruction stream when scanning for prototypes, so without this
* hack, they always appear before variable declarations.
*/
- if (st->current_function == NULL && ir->as_variable() != NULL)
+ if (state->current_function == NULL && ir->as_variable() != NULL)
instructions->push_head(ir);
else
instructions->push_tail(ir);
@@ -360,88 +315,74 @@ read_instructions(_mesa_glsl_parse_state *st, exec_list *instructions,
}
-static ir_instruction *
-read_instruction(_mesa_glsl_parse_state *st, s_expression *expr,
- ir_loop *loop_ctx)
+ir_instruction *
+ir_reader::read_instruction(s_expression *expr, ir_loop *loop_ctx)
{
- void *ctx = st;
s_symbol *symbol = SX_AS_SYMBOL(expr);
if (symbol != NULL) {
if (strcmp(symbol->value(), "break") == 0 && loop_ctx != NULL)
- return new(ctx) ir_loop_jump(ir_loop_jump::jump_break);
+ return new(mem_ctx) ir_loop_jump(ir_loop_jump::jump_break);
if (strcmp(symbol->value(), "continue") == 0 && loop_ctx != NULL)
- return new(ctx) ir_loop_jump(ir_loop_jump::jump_continue);
+ return new(mem_ctx) ir_loop_jump(ir_loop_jump::jump_continue);
}
s_list *list = SX_AS_LIST(expr);
if (list == NULL || list->subexpressions.is_empty()) {
- ir_read_error(st, expr, "Invalid instruction.\n");
+ ir_read_error(expr, "Invalid instruction.\n");
return NULL;
}
s_symbol *tag = SX_AS_SYMBOL(list->subexpressions.get_head());
if (tag == NULL) {
- ir_read_error(st, expr, "expected instruction tag");
+ ir_read_error(expr, "expected instruction tag");
return NULL;
}
ir_instruction *inst = NULL;
if (strcmp(tag->value(), "declare") == 0) {
- inst = read_declaration(st, list);
+ inst = read_declaration(list);
} else if (strcmp(tag->value(), "assign") == 0) {
- inst = read_assignment(st, list);
+ inst = read_assignment(list);
} else if (strcmp(tag->value(), "if") == 0) {
- inst = read_if(st, list, loop_ctx);
+ inst = read_if(list, loop_ctx);
} else if (strcmp(tag->value(), "loop") == 0) {
- inst = read_loop(st, list);
+ inst = read_loop(list);
} else if (strcmp(tag->value(), "return") == 0) {
- inst = read_return(st, list);
+ inst = read_return(list);
} else if (strcmp(tag->value(), "function") == 0) {
- inst = read_function(st, list, false);
+ inst = read_function(list, false);
} else {
- inst = read_rvalue(st, list);
+ inst = read_rvalue(list);
if (inst == NULL)
- ir_read_error(st, NULL, "when reading instruction");
+ ir_read_error(NULL, "when reading instruction");
}
return inst;
}
-
-static ir_variable *
-read_declaration(_mesa_glsl_parse_state *st, s_list *list)
+ir_variable *
+ir_reader::read_declaration(s_expression *expr)
{
- void *ctx = st;
- if (list->length() != 4) {
- ir_read_error(st, list, "expected (declare (<qualifiers>) <type> "
- "<name>)");
- return NULL;
- }
+ s_list *s_quals;
+ s_expression *s_type;
+ s_symbol *s_name;
- s_list *quals = SX_AS_LIST(list->subexpressions.head->next);
- if (quals == NULL) {
- ir_read_error(st, list, "expected a list of variable qualifiers");
+ s_pattern pat[] = { "declare", s_quals, s_type, s_name };
+ if (!MATCH(expr, pat)) {
+ ir_read_error(expr, "expected (declare (<qualifiers>) <type> <name>)");
return NULL;
}
- s_expression *type_expr = (s_expression*) quals->next;
- const glsl_type *type = read_type(st, type_expr);
+ const glsl_type *type = read_type(s_type);
if (type == NULL)
return NULL;
- s_symbol *var_name = SX_AS_SYMBOL(type_expr->next);
- if (var_name == NULL) {
- ir_read_error(st, list, "expected variable name, found non-symbol");
- return NULL;
- }
-
- ir_variable *var = new(ctx) ir_variable(type, var_name->value(),
- ir_var_auto);
+ ir_variable *var = new(mem_ctx) ir_variable(type, s_name->value(),
+ ir_var_auto);
- foreach_iter(exec_list_iterator, it, quals->subexpressions) {
+ foreach_iter(exec_list_iterator, it, s_quals->subexpressions) {
s_symbol *qualifier = SX_AS_SYMBOL(it.get());
if (qualifier == NULL) {
- ir_read_error(st, list, "qualifier list must contain only symbols");
- delete var;
+ ir_read_error(expr, "qualifier list must contain only symbols");
return NULL;
}
@@ -456,6 +397,8 @@ read_declaration(_mesa_glsl_parse_state *st, s_list *list)
var->mode = ir_var_auto;
} else if (strcmp(qualifier->value(), "in") == 0) {
var->mode = ir_var_in;
+ } else if (strcmp(qualifier->value(), "const_in") == 0) {
+ var->mode = ir_var_const_in;
} else if (strcmp(qualifier->value(), "out") == 0) {
var->mode = ir_var_out;
} else if (strcmp(qualifier->value(), "inout") == 0) {
@@ -467,44 +410,42 @@ read_declaration(_mesa_glsl_parse_state *st, s_list *list)
} else if (strcmp(qualifier->value(), "noperspective") == 0) {
var->interpolation = ir_var_noperspective;
} else {
- ir_read_error(st, list, "unknown qualifier: %s", qualifier->value());
- delete var;
+ ir_read_error(expr, "unknown qualifier: %s", qualifier->value());
return NULL;
}
}
// Add the variable to the symbol table
- st->symbols->add_variable(var);
+ state->symbols->add_variable(var);
return var;
}
-static ir_if *
-read_if(_mesa_glsl_parse_state *st, s_list *list, ir_loop *loop_ctx)
+ir_if *
+ir_reader::read_if(s_expression *expr, ir_loop *loop_ctx)
{
- void *ctx = st;
- if (list->length() != 4) {
- ir_read_error(st, list, "expected (if <condition> (<then> ...) "
- "(<else> ...))");
+ s_expression *s_cond;
+ s_expression *s_then;
+ s_expression *s_else;
+
+ s_pattern pat[] = { "if", s_cond, s_then, s_else };
+ if (!MATCH(expr, pat)) {
+ ir_read_error(expr, "expected (if <condition> (<then>...) (<else>...))");
return NULL;
}
- s_expression *cond_expr = (s_expression*) list->subexpressions.head->next;
- ir_rvalue *condition = read_rvalue(st, cond_expr);
+ ir_rvalue *condition = read_rvalue(s_cond);
if (condition == NULL) {
- ir_read_error(st, NULL, "when reading condition of (if ...)");
+ ir_read_error(NULL, "when reading condition of (if ...)");
return NULL;
}
- s_expression *then_expr = (s_expression*) cond_expr->next;
- s_expression *else_expr = (s_expression*) then_expr->next;
-
- ir_if *iff = new(ctx) ir_if(condition);
+ ir_if *iff = new(mem_ctx) ir_if(condition);
- read_instructions(st, &iff->then_instructions, then_expr, loop_ctx);
- read_instructions(st, &iff->else_instructions, else_expr, loop_ctx);
- if (st->error) {
+ read_instructions(&iff->then_instructions, s_then, loop_ctx);
+ read_instructions(&iff->else_instructions, s_else, loop_ctx);
+ if (state->error) {
delete iff;
iff = NULL;
}
@@ -512,27 +453,23 @@ read_if(_mesa_glsl_parse_state *st, s_list *list, ir_loop *loop_ctx)
}
-static ir_loop *
-read_loop(_mesa_glsl_parse_state *st, s_list *list)
+ir_loop *
+ir_reader::read_loop(s_expression *expr)
{
- void *ctx = st;
- if (list->length() != 6) {
- ir_read_error(st, list, "expected (loop <counter> <from> <to> "
- "<increment> <body>)");
+ s_expression *s_counter, *s_from, *s_to, *s_inc, *s_body;
+
+ s_pattern pat[] = { "loop", s_counter, s_from, s_to, s_inc, s_body };
+ if (!MATCH(expr, pat)) {
+ ir_read_error(expr, "expected (loop <counter> <from> <to> "
+ "<increment> <body>)");
return NULL;
}
- s_expression *count_expr = (s_expression*) list->subexpressions.head->next;
- s_expression *from_expr = (s_expression*) count_expr->next;
- s_expression *to_expr = (s_expression*) from_expr->next;
- s_expression *inc_expr = (s_expression*) to_expr->next;
- s_expression *body_expr = (s_expression*) inc_expr->next;
-
// FINISHME: actually read the count/from/to fields.
- ir_loop *loop = new(ctx) ir_loop;
- read_instructions(st, &loop->body_instructions, body_expr, loop);
- if (st->error) {
+ ir_loop *loop = new(mem_ctx) ir_loop;
+ read_instructions(&loop->body_instructions, s_body, loop);
+ if (state->error) {
delete loop;
loop = NULL;
}
@@ -540,29 +477,29 @@ read_loop(_mesa_glsl_parse_state *st, s_list *list)
}
-static ir_return *
-read_return(_mesa_glsl_parse_state *st, s_list *list)
+ir_return *
+ir_reader::read_return(s_expression *expr)
{
- void *ctx = st;
- if (list->length() != 2) {
- ir_read_error(st, list, "expected (return <rvalue>)");
+ s_expression *s_retval;
+
+ s_pattern pat[] = { "return", s_retval};
+ if (!MATCH(expr, pat)) {
+ ir_read_error(expr, "expected (return <rvalue>)");
return NULL;
}
- s_expression *expr = (s_expression*) list->subexpressions.head->next;
-
- ir_rvalue *retval = read_rvalue(st, expr);
+ ir_rvalue *retval = read_rvalue(s_retval);
if (retval == NULL) {
- ir_read_error(st, NULL, "when reading return value");
+ ir_read_error(NULL, "when reading return value");
return NULL;
}
- return new(ctx) ir_return(retval);
+ return new(mem_ctx) ir_return(retval);
}
-static ir_rvalue *
-read_rvalue(_mesa_glsl_parse_state *st, s_expression *expr)
+ir_rvalue *
+ir_reader::read_rvalue(s_expression *expr)
{
s_list *list = SX_AS_LIST(expr);
if (list == NULL || list->subexpressions.is_empty())
@@ -570,68 +507,63 @@ read_rvalue(_mesa_glsl_parse_state *st, s_expression *expr)
s_symbol *tag = SX_AS_SYMBOL(list->subexpressions.get_head());
if (tag == NULL) {
- ir_read_error(st, expr, "expected rvalue tag");
+ ir_read_error(expr, "expected rvalue tag");
return NULL;
}
- ir_rvalue *rvalue = read_dereference(st, list);
- if (rvalue != NULL || st->error)
+ ir_rvalue *rvalue = read_dereference(list);
+ if (rvalue != NULL || state->error)
return rvalue;
else if (strcmp(tag->value(), "swiz") == 0) {
- rvalue = read_swizzle(st, list);
+ rvalue = read_swizzle(list);
} else if (strcmp(tag->value(), "expression") == 0) {
- rvalue = read_expression(st, list);
+ rvalue = read_expression(list);
} else if (strcmp(tag->value(), "call") == 0) {
- rvalue = read_call(st, list);
+ rvalue = read_call(list);
} else if (strcmp(tag->value(), "constant") == 0) {
- rvalue = read_constant(st, list);
+ rvalue = read_constant(list);
} else {
- rvalue = read_texture(st, list);
- if (rvalue == NULL && !st->error)
- ir_read_error(st, expr, "unrecognized rvalue tag: %s", tag->value());
+ rvalue = read_texture(list);
+ if (rvalue == NULL && !state->error)
+ ir_read_error(expr, "unrecognized rvalue tag: %s", tag->value());
}
return rvalue;
}
-static ir_assignment *
-read_assignment(_mesa_glsl_parse_state *st, s_list *list)
+ir_assignment *
+ir_reader::read_assignment(s_expression *expr)
{
- void *ctx = st;
- if (list->length() != 5) {
- ir_read_error(st, list, "expected (assign <condition> (<write mask>) "
- "<lhs> <rhs>)");
- return NULL;
- }
+ s_expression *cond_expr = NULL;
+ s_expression *lhs_expr, *rhs_expr;
+ s_list *mask_list;
- s_expression *cond_expr = (s_expression*) list->subexpressions.head->next;
- s_list *mask_list = SX_AS_LIST(cond_expr->next);
- s_expression *lhs_expr = (s_expression*) cond_expr->next->next;
- s_expression *rhs_expr = (s_expression*) lhs_expr->next;
-
- ir_rvalue *condition = read_rvalue(st, cond_expr);
- if (condition == NULL) {
- ir_read_error(st, NULL, "when reading condition of assignment");
+ s_pattern pat4[] = { "assign", mask_list, lhs_expr, rhs_expr };
+ s_pattern pat5[] = { "assign", cond_expr, mask_list, lhs_expr, rhs_expr };
+ if (!MATCH(expr, pat4) && !MATCH(expr, pat5)) {
+ ir_read_error(expr, "expected (assign [<condition>] (<write mask>) "
+ "<lhs> <rhs>)");
return NULL;
}
- if (mask_list == NULL || mask_list->length() > 1) {
- ir_read_error(st, mask_list, "expected () or (<write mask>)");
- return NULL;
+ ir_rvalue *condition = NULL;
+ if (cond_expr != NULL) {
+ condition = read_rvalue(cond_expr);
+ if (condition == NULL) {
+ ir_read_error(NULL, "when reading condition of assignment");
+ return NULL;
+ }
}
unsigned mask = 0;
- if (mask_list->length() == 1) {
- s_symbol *mask_symbol = SX_AS_SYMBOL(mask_list->subexpressions.head);
- if (mask_symbol == NULL) {
- ir_read_error(st, list, "expected a write mask; found non-symbol");
- return NULL;
- }
+ s_symbol *mask_symbol;
+ s_pattern mask_pat[] = { mask_symbol };
+ if (MATCH(mask_list, mask_pat)) {
const char *mask_str = mask_symbol->value();
unsigned mask_length = strlen(mask_str);
if (mask_length > 4) {
- ir_read_error(st, list, "invalid write mask: %s", mask_str);
+ ir_read_error(expr, "invalid write mask: %s", mask_str);
return NULL;
}
@@ -639,47 +571,46 @@ read_assignment(_mesa_glsl_parse_state *st, s_list *list)
for (unsigned i = 0; i < mask_length; i++) {
if (mask_str[i] < 'w' || mask_str[i] > 'z') {
- ir_read_error(st, list, "write mask contains invalid character: %c",
+ ir_read_error(expr, "write mask contains invalid character: %c",
mask_str[i]);
return NULL;
}
mask |= 1 << idx_map[mask_str[i] - 'w'];
}
+ } else if (!mask_list->subexpressions.is_empty()) {
+ ir_read_error(mask_list, "expected () or (<write mask>)");
+ return NULL;
}
- ir_dereference *lhs = read_dereference(st, lhs_expr);
+ ir_dereference *lhs = read_dereference(lhs_expr);
if (lhs == NULL) {
- ir_read_error(st, NULL, "when reading left-hand side of assignment");
+ ir_read_error(NULL, "when reading left-hand side of assignment");
return NULL;
}
- ir_rvalue *rhs = read_rvalue(st, rhs_expr);
+ ir_rvalue *rhs = read_rvalue(rhs_expr);
if (rhs == NULL) {
- ir_read_error(st, NULL, "when reading right-hand side of assignment");
+ ir_read_error(NULL, "when reading right-hand side of assignment");
return NULL;
}
if (mask == 0 && (lhs->type->is_vector() || lhs->type->is_scalar())) {
- ir_read_error(st, list, "non-zero write mask required.");
+ ir_read_error(expr, "non-zero write mask required.");
return NULL;
}
- return new(ctx) ir_assignment(lhs, rhs, condition, mask);
+ return new(mem_ctx) ir_assignment(lhs, rhs, condition, mask);
}
-static ir_call *
-read_call(_mesa_glsl_parse_state *st, s_list *list)
+ir_call *
+ir_reader::read_call(s_expression *expr)
{
- void *ctx = st;
- if (list->length() != 3) {
- ir_read_error(st, list, "expected (call <name> (<param> ...))");
- return NULL;
- }
+ s_symbol *name;
+ s_list *params;
- s_symbol *name = SX_AS_SYMBOL(list->subexpressions.head->next);
- s_list *params = SX_AS_LIST(list->subexpressions.head->next->next);
- if (name == NULL || params == NULL) {
- ir_read_error(st, list, "expected (call <name> (<param> ...))");
+ s_pattern pat[] = { "call", name, params };
+ if (!MATCH(expr, pat)) {
+ ir_read_error(expr, "expected (call <name> (<param> ...))");
return NULL;
}
@@ -687,173 +618,156 @@ read_call(_mesa_glsl_parse_state *st, s_list *list)
foreach_iter(exec_list_iterator, it, params->subexpressions) {
s_expression *expr = (s_expression*) it.get();
- ir_rvalue *param = read_rvalue(st, expr);
+ ir_rvalue *param = read_rvalue(expr);
if (param == NULL) {
- ir_read_error(st, list, "when reading parameter to function call");
+ ir_read_error(expr, "when reading parameter to function call");
return NULL;
}
parameters.push_tail(param);
}
- ir_function *f = st->symbols->get_function(name->value());
+ ir_function *f = state->symbols->get_function(name->value());
if (f == NULL) {
- ir_read_error(st, list, "found call to undefined function %s",
+ ir_read_error(expr, "found call to undefined function %s",
name->value());
return NULL;
}
ir_function_signature *callee = f->matching_signature(&parameters);
if (callee == NULL) {
- ir_read_error(st, list, "couldn't find matching signature for function "
+ ir_read_error(expr, "couldn't find matching signature for function "
"%s", name->value());
return NULL;
}
- return new(ctx) ir_call(callee, &parameters);
+ return new(mem_ctx) ir_call(callee, &parameters);
}
-static ir_expression *
-read_expression(_mesa_glsl_parse_state *st, s_list *list)
+ir_expression *
+ir_reader::read_expression(s_expression *expr)
{
- void *ctx = st;
- const unsigned list_length = list->length();
- if (list_length < 4) {
- ir_read_error(st, list, "expected (expression <type> <operator> "
- "<operand> [<operand>])");
+ s_expression *s_type;
+ s_symbol *s_op;
+ s_expression *s_arg1;
+
+ s_pattern pat[] = { "expression", s_type, s_op, s_arg1 };
+ if (!PARTIAL_MATCH(expr, pat)) {
+ ir_read_error(expr, "expected (expression <type> <operator> "
+ "<operand> [<operand>])");
return NULL;
}
+ s_expression *s_arg2 = (s_expression *) s_arg1->next; // may be tail sentinel
- s_expression *type_expr = (s_expression*) list->subexpressions.head->next;
- const glsl_type *type = read_type(st, type_expr);
+ const glsl_type *type = read_type(s_type);
if (type == NULL)
return NULL;
/* Read the operator */
- s_symbol *op_sym = SX_AS_SYMBOL(type_expr->next);
- if (op_sym == NULL) {
- ir_read_error(st, list, "expected operator, found non-symbol");
- return NULL;
- }
-
- ir_expression_operation op = ir_expression::get_operator(op_sym->value());
+ ir_expression_operation op = ir_expression::get_operator(s_op->value());
if (op == (ir_expression_operation) -1) {
- ir_read_error(st, list, "invalid operator: %s", op_sym->value());
+ ir_read_error(expr, "invalid operator: %s", s_op->value());
return NULL;
}
- /* Now that we know the operator, check for the right number of operands */
- if (ir_expression::get_num_operands(op) == 2) {
- if (list_length != 5) {
- ir_read_error(st, list, "expected (expression <type> %s <operand> "
- " <operand>)", op_sym->value());
- return NULL;
- }
- } else {
- if (list_length != 4) {
- ir_read_error(st, list, "expected (expression <type> %s <operand>)",
- op_sym->value());
- return NULL;
- }
+ unsigned num_operands = ir_expression::get_num_operands(op);
+ if (num_operands == 1 && !s_arg1->next->is_tail_sentinel()) {
+ ir_read_error(expr, "expected (expression <type> %s <operand>)",
+ s_op->value());
+ return NULL;
}
- s_expression *exp1 = (s_expression*) (op_sym->next);
- ir_rvalue *arg1 = read_rvalue(st, exp1);
+ ir_rvalue *arg1 = read_rvalue(s_arg1);
+ ir_rvalue *arg2 = NULL;
if (arg1 == NULL) {
- ir_read_error(st, NULL, "when reading first operand of %s",
- op_sym->value());
+ ir_read_error(NULL, "when reading first operand of %s", s_op->value());
return NULL;
}
- ir_rvalue *arg2 = NULL;
- if (ir_expression::get_num_operands(op) == 2) {
- s_expression *exp2 = (s_expression*) (exp1->next);
- arg2 = read_rvalue(st, exp2);
+ if (num_operands == 2) {
+ if (s_arg2->is_tail_sentinel() || !s_arg2->next->is_tail_sentinel()) {
+ ir_read_error(expr, "expected (expression <type> %s <operand> "
+ "<operand>)", s_op->value());
+ return NULL;
+ }
+ arg2 = read_rvalue(s_arg2);
if (arg2 == NULL) {
- ir_read_error(st, NULL, "when reading second operand of %s",
- op_sym->value());
+ ir_read_error(NULL, "when reading second operand of %s",
+ s_op->value());
return NULL;
}
}
- return new(ctx) ir_expression(op, type, arg1, arg2);
+ return new(mem_ctx) ir_expression(op, type, arg1, arg2);
}
-static ir_swizzle *
-read_swizzle(_mesa_glsl_parse_state *st, s_list *list)
+ir_swizzle *
+ir_reader::read_swizzle(s_expression *expr)
{
- if (list->length() != 3) {
- ir_read_error(st, list, "expected (swiz <swizzle> <rvalue>)");
- return NULL;
- }
+ s_symbol *swiz;
+ s_expression *sub;
- s_symbol *swiz = SX_AS_SYMBOL(list->subexpressions.head->next);
- if (swiz == NULL) {
- ir_read_error(st, list, "expected a valid swizzle; found non-symbol");
+ s_pattern pat[] = { "swiz", swiz, sub };
+ if (!MATCH(expr, pat)) {
+ ir_read_error(expr, "expected (swiz <swizzle> <rvalue>)");
return NULL;
}
if (strlen(swiz->value()) > 4) {
- ir_read_error(st, list, "expected a valid swizzle; found %s",
- swiz->value());
+ ir_read_error(expr, "expected a valid swizzle; found %s", swiz->value());
return NULL;
}
- s_expression *sub = (s_expression*) swiz->next;
- ir_rvalue *rvalue = read_rvalue(st, sub);
+ ir_rvalue *rvalue = read_rvalue(sub);
if (rvalue == NULL)
return NULL;
ir_swizzle *ir = ir_swizzle::create(rvalue, swiz->value(),
rvalue->type->vector_elements);
if (ir == NULL)
- ir_read_error(st, list, "invalid swizzle");
+ ir_read_error(expr, "invalid swizzle");
return ir;
}
-static ir_constant *
-read_constant(_mesa_glsl_parse_state *st, s_list *list)
+ir_constant *
+ir_reader::read_constant(s_expression *expr)
{
- void *ctx = st;
- if (list->length() != 3) {
- ir_read_error(st, list, "expected (constant <type> (...))");
+ s_expression *type_expr;
+ s_list *values;
+
+ s_pattern pat[] = { "constant", type_expr, values };
+ if (!MATCH(expr, pat)) {
+ ir_read_error(expr, "expected (constant <type> (...))");
return NULL;
}
- s_expression *type_expr = (s_expression*) list->subexpressions.head->next;
- const glsl_type *type = read_type(st, type_expr);
+ const glsl_type *type = read_type(type_expr);
if (type == NULL)
return NULL;
- s_list *values = SX_AS_LIST(type_expr->next);
if (values == NULL) {
- ir_read_error(st, list, "expected (constant <type> (...))");
+ ir_read_error(expr, "expected (constant <type> (...))");
return NULL;
}
if (type->is_array()) {
- const unsigned elements_supplied = values->length();
- if (elements_supplied != type->length) {
- ir_read_error(st, values, "expected exactly %u array elements, "
- "given %u", type->length, elements_supplied);
- return NULL;
- }
-
+ unsigned elements_supplied = 0;
exec_list elements;
foreach_iter(exec_list_iterator, it, values->subexpressions) {
- s_expression *expr = (s_expression *) it.get();
- s_list *elt = SX_AS_LIST(expr);
- if (elt == NULL) {
- ir_read_error(st, expr, "expected (constant ...) array element");
- return NULL;
- }
-
- ir_constant *ir_elt = read_constant(st, elt);
+ s_expression *elt = (s_expression *) it.get();
+ ir_constant *ir_elt = read_constant(elt);
if (ir_elt == NULL)
return NULL;
elements.push_tail(ir_elt);
+ elements_supplied++;
+ }
+
+ if (elements_supplied != type->length) {
+ ir_read_error(values, "expected exactly %u array elements, "
+ "given %u", type->length, elements_supplied);
+ return NULL;
}
- return new(ctx) ir_constant(type, &elements);
+ return new(mem_ctx) ir_constant(type, &elements);
}
const glsl_type *const base_type = type->get_base_type();
@@ -864,7 +778,7 @@ read_constant(_mesa_glsl_parse_state *st, s_list *list)
int k = 0;
foreach_iter(exec_list_iterator, it, values->subexpressions) {
if (k >= 16) {
- ir_read_error(st, values, "expected at most 16 numbers");
+ ir_read_error(values, "expected at most 16 numbers");
return NULL;
}
@@ -873,14 +787,14 @@ read_constant(_mesa_glsl_parse_state *st, s_list *list)
if (base_type->base_type == GLSL_TYPE_FLOAT) {
s_number *value = SX_AS_NUMBER(expr);
if (value == NULL) {
- ir_read_error(st, values, "expected numbers");
+ ir_read_error(values, "expected numbers");
return NULL;
}
data.f[k] = value->fvalue();
} else {
s_int *value = SX_AS_INT(expr);
if (value == NULL) {
- ir_read_error(st, values, "expected integers");
+ ir_read_error(values, "expected integers");
return NULL;
}
@@ -898,246 +812,194 @@ read_constant(_mesa_glsl_parse_state *st, s_list *list)
break;
}
default:
- ir_read_error(st, values, "unsupported constant type");
+ ir_read_error(values, "unsupported constant type");
return NULL;
}
}
++k;
}
- return new(ctx) ir_constant(type, &data);
+ return new(mem_ctx) ir_constant(type, &data);
}
-static ir_dereference *
-read_dereference(_mesa_glsl_parse_state *st, s_expression *expr)
+ir_dereference *
+ir_reader::read_dereference(s_expression *expr)
{
- s_list *list = SX_AS_LIST(expr);
- if (list == NULL || list->subexpressions.is_empty())
- return NULL;
-
- s_symbol *tag = SX_AS_SYMBOL(list->subexpressions.head);
- assert(tag != NULL);
-
- if (strcmp(tag->value(), "var_ref") == 0)
- return read_var_ref(st, list);
- if (strcmp(tag->value(), "array_ref") == 0)
- return read_array_ref(st, list);
- if (strcmp(tag->value(), "record_ref") == 0)
- return read_record_ref(st, list);
- return NULL;
-}
-
-static ir_dereference_variable *
-read_var_ref(_mesa_glsl_parse_state *st, s_list *list)
-{
- void *ctx = st;
- if (list->length() != 2) {
- ir_read_error(st, list, "expected (var_ref <variable name>)");
- return NULL;
- }
- s_symbol *var_name = SX_AS_SYMBOL(list->subexpressions.head->next);
- if (var_name == NULL) {
- ir_read_error(st, list, "expected (var_ref <variable name>)");
- return NULL;
- }
-
- ir_variable *var = st->symbols->get_variable(var_name->value());
- if (var == NULL) {
- ir_read_error(st, list, "undeclared variable: %s", var_name->value());
- return NULL;
- }
-
- return new(ctx) ir_dereference_variable(var);
-}
-
-static ir_dereference_array *
-read_array_ref(_mesa_glsl_parse_state *st, s_list *list)
-{
- void *ctx = st;
- if (list->length() != 3) {
- ir_read_error(st, list, "expected (array_ref <rvalue> <index>)");
- return NULL;
- }
+ s_symbol *s_var;
+ s_expression *s_subject;
+ s_expression *s_index;
+ s_symbol *s_field;
+
+ s_pattern var_pat[] = { "var_ref", s_var };
+ s_pattern array_pat[] = { "array_ref", s_subject, s_index };
+ s_pattern record_pat[] = { "record_ref", s_subject, s_field };
+
+ if (MATCH(expr, var_pat)) {
+ ir_variable *var = state->symbols->get_variable(s_var->value());
+ if (var == NULL) {
+ ir_read_error(expr, "undeclared variable: %s", s_var->value());
+ return NULL;
+ }
+ return new(mem_ctx) ir_dereference_variable(var);
+ } else if (MATCH(expr, array_pat)) {
+ ir_rvalue *subject = read_rvalue(s_subject);
+ if (subject == NULL) {
+ ir_read_error(NULL, "when reading the subject of an array_ref");
+ return NULL;
+ }
- s_expression *subj_expr = (s_expression*) list->subexpressions.head->next;
- ir_rvalue *subject = read_rvalue(st, subj_expr);
- if (subject == NULL) {
- ir_read_error(st, NULL, "when reading the subject of an array_ref");
- return NULL;
+ ir_rvalue *idx = read_rvalue(s_index);
+ if (subject == NULL) {
+ ir_read_error(NULL, "when reading the index of an array_ref");
+ return NULL;
+ }
+ return new(mem_ctx) ir_dereference_array(subject, idx);
+ } else if (MATCH(expr, record_pat)) {
+ ir_rvalue *subject = read_rvalue(s_subject);
+ if (subject == NULL) {
+ ir_read_error(NULL, "when reading the subject of a record_ref");
+ return NULL;
+ }
+ return new(mem_ctx) ir_dereference_record(subject, s_field->value());
}
-
- s_expression *idx_expr = (s_expression*) subj_expr->next;
- ir_rvalue *idx = read_rvalue(st, idx_expr);
- return new(ctx) ir_dereference_array(subject, idx);
+ return NULL;
}
-static ir_dereference_record *
-read_record_ref(_mesa_glsl_parse_state *st, s_list *list)
+ir_texture *
+ir_reader::read_texture(s_expression *expr)
{
- void *ctx = st;
- if (list->length() != 3) {
- ir_read_error(st, list, "expected (record_ref <rvalue> <field>)");
- return NULL;
- }
-
- s_expression *subj_expr = (s_expression*) list->subexpressions.head->next;
- ir_rvalue *subject = read_rvalue(st, subj_expr);
- if (subject == NULL) {
- ir_read_error(st, NULL, "when reading the subject of a record_ref");
- return NULL;
- }
-
- s_symbol *field = SX_AS_SYMBOL(subj_expr->next);
- if (field == NULL) {
- ir_read_error(st, list, "expected (record_ref ... <field name>)");
+ s_symbol *tag = NULL;
+ s_expression *s_type = NULL;
+ s_expression *s_sampler = NULL;
+ s_expression *s_coord = NULL;
+ s_expression *s_offset = NULL;
+ s_expression *s_proj = NULL;
+ s_list *s_shadow = NULL;
+ s_expression *s_lod = NULL;
+
+ ir_texture_opcode op = ir_tex; /* silence warning */
+
+ s_pattern tex_pattern[] =
+ { "tex", s_type, s_sampler, s_coord, s_offset, s_proj, s_shadow };
+ s_pattern txf_pattern[] =
+ { "txf", s_type, s_sampler, s_coord, s_offset, s_lod };
+ s_pattern other_pattern[] =
+ { tag, s_type, s_sampler, s_coord, s_offset, s_proj, s_shadow, s_lod };
+
+ if (MATCH(expr, tex_pattern)) {
+ op = ir_tex;
+ } else if (MATCH(expr, txf_pattern)) {
+ op = ir_txf;
+ } else if (MATCH(expr, other_pattern)) {
+ op = ir_texture::get_opcode(tag->value());
+ if (op == -1)
+ return NULL;
+ } else {
+ ir_read_error(NULL, "unexpected texture pattern");
return NULL;
}
- return new(ctx) ir_dereference_record(subject, field->value());
-}
-
-static bool
-valid_texture_list_length(ir_texture_opcode op, s_list *list)
-{
- unsigned required_length = 7;
- if (op == ir_txf)
- required_length = 5;
- else if (op == ir_tex)
- required_length = 6;
- return list->length() == required_length;
-}
-
-static ir_texture *
-read_texture(_mesa_glsl_parse_state *st, s_list *list)
-{
- void *ctx = st;
- s_symbol *tag = SX_AS_SYMBOL(list->subexpressions.head);
- assert(tag != NULL);
+ ir_texture *tex = new(mem_ctx) ir_texture(op);
- ir_texture_opcode op = ir_texture::get_opcode(tag->value());
- if (op == (ir_texture_opcode) -1)
- return NULL;
-
- if (!valid_texture_list_length(op, list)) {
- ir_read_error(st, NULL, "invalid list size in (%s ...)", tag->value());
+ // Read return type
+ const glsl_type *type = read_type(s_type);
+ if (type == NULL) {
+ ir_read_error(NULL, "when reading type in (%s ...)",
+ tex->opcode_string());
return NULL;
}
- ir_texture *tex = new(ctx) ir_texture(op);
-
// Read sampler (must be a deref)
- s_expression *sampler_expr = (s_expression *) tag->next;
- ir_dereference *sampler = read_dereference(st, sampler_expr);
+ ir_dereference *sampler = read_dereference(s_sampler);
if (sampler == NULL) {
- ir_read_error(st, NULL, "when reading sampler in (%s ...)", tag->value());
+ ir_read_error(NULL, "when reading sampler in (%s ...)",
+ tex->opcode_string());
return NULL;
}
- tex->set_sampler(sampler);
+ tex->set_sampler(sampler, type);
// Read coordinate (any rvalue)
- s_expression *coordinate_expr = (s_expression *) sampler_expr->next;
- tex->coordinate = read_rvalue(st, coordinate_expr);
+ tex->coordinate = read_rvalue(s_coord);
if (tex->coordinate == NULL) {
- ir_read_error(st, NULL, "when reading coordinate in (%s ...)",
- tag->value());
+ ir_read_error(NULL, "when reading coordinate in (%s ...)",
+ tex->opcode_string());
return NULL;
}
- // Read texel offset, i.e. (0 0 0)
- s_list *offset_list = SX_AS_LIST(coordinate_expr->next);
- if (offset_list == NULL || offset_list->length() != 3) {
- ir_read_error(st, offset_list, "expected (<int> <int> <int>)");
- return NULL;
- }
- s_int *offset_x = SX_AS_INT(offset_list->subexpressions.head);
- s_int *offset_y = SX_AS_INT(offset_list->subexpressions.head->next);
- s_int *offset_z = SX_AS_INT(offset_list->subexpressions.head->next->next);
- if (offset_x == NULL || offset_y == NULL || offset_z == NULL) {
- ir_read_error(st, offset_list, "expected (<int> <int> <int>)");
- return NULL;
- }
- tex->offsets[0] = offset_x->value();
- tex->offsets[1] = offset_y->value();
- tex->offsets[2] = offset_z->value();
-
- if (op == ir_txf) {
- s_expression *lod_expr = (s_expression *) offset_list->next;
- tex->lod_info.lod = read_rvalue(st, lod_expr);
- if (tex->lod_info.lod == NULL) {
- ir_read_error(st, NULL, "when reading LOD in (txf ...)");
+ // Read texel offset - either 0 or an rvalue.
+ s_int *si_offset = SX_AS_INT(s_offset);
+ if (si_offset == NULL || si_offset->value() != 0) {
+ tex->offset = read_rvalue(s_offset);
+ if (tex->offset == NULL) {
+ ir_read_error(s_offset, "expected 0 or an expression");
return NULL;
}
- } else {
- s_expression *proj_expr = (s_expression *) offset_list->next;
- s_int *proj_as_int = SX_AS_INT(proj_expr);
+ }
+
+ if (op != ir_txf) {
+ s_int *proj_as_int = SX_AS_INT(s_proj);
if (proj_as_int && proj_as_int->value() == 1) {
tex->projector = NULL;
} else {
- tex->projector = read_rvalue(st, proj_expr);
+ tex->projector = read_rvalue(s_proj);
if (tex->projector == NULL) {
- ir_read_error(st, NULL, "when reading projective divide in (%s ..)",
- tag->value());
+ ir_read_error(NULL, "when reading projective divide in (%s ..)",
+ tex->opcode_string());
return NULL;
}
}
- s_list *shadow_list = SX_AS_LIST(proj_expr->next);
- if (shadow_list == NULL) {
- ir_read_error(st, NULL, "shadow comparitor must be a list");
- return NULL;
- }
- if (shadow_list->subexpressions.is_empty()) {
- tex->shadow_comparitor= NULL;
+ if (s_shadow->subexpressions.is_empty()) {
+ tex->shadow_comparitor = NULL;
} else {
- tex->shadow_comparitor = read_rvalue(st, shadow_list);
+ tex->shadow_comparitor = read_rvalue(s_shadow);
if (tex->shadow_comparitor == NULL) {
- ir_read_error(st, NULL, "when reading shadow comparitor in (%s ..)",
- tag->value());
+ ir_read_error(NULL, "when reading shadow comparitor in (%s ..)",
+ tex->opcode_string());
return NULL;
}
}
- s_expression *lod_expr = (s_expression *) shadow_list->next;
-
- switch (op) {
- case ir_txb:
- tex->lod_info.bias = read_rvalue(st, lod_expr);
- if (tex->lod_info.bias == NULL) {
- ir_read_error(st, NULL, "when reading LOD bias in (txb ...)");
- return NULL;
- }
- break;
- case ir_txl:
- tex->lod_info.lod = read_rvalue(st, lod_expr);
- if (tex->lod_info.lod == NULL) {
- ir_read_error(st, NULL, "when reading LOD in (txl ...)");
- return NULL;
- }
- break;
- case ir_txd: {
- s_list *lod_list = SX_AS_LIST(lod_expr);
- if (lod_list->length() != 2) {
- ir_read_error(st, lod_expr, "expected (dPdx dPdy) in (txd ...)");
- return NULL;
- }
- s_expression *dx_expr = (s_expression *) lod_list->subexpressions.head;
- s_expression *dy_expr = (s_expression *) dx_expr->next;
+ }
- tex->lod_info.grad.dPdx = read_rvalue(st, dx_expr);
- if (tex->lod_info.grad.dPdx == NULL) {
- ir_read_error(st, NULL, "when reading dPdx in (txd ...)");
- return NULL;
- }
- tex->lod_info.grad.dPdy = read_rvalue(st, dy_expr);
- if (tex->lod_info.grad.dPdy == NULL) {
- ir_read_error(st, NULL, "when reading dPdy in (txd ...)");
- return NULL;
- }
- break;
+ switch (op) {
+ case ir_txb:
+ tex->lod_info.bias = read_rvalue(s_lod);
+ if (tex->lod_info.bias == NULL) {
+ ir_read_error(NULL, "when reading LOD bias in (txb ...)");
+ return NULL;
+ }
+ break;
+ case ir_txl:
+ case ir_txf:
+ tex->lod_info.lod = read_rvalue(s_lod);
+ if (tex->lod_info.lod == NULL) {
+ ir_read_error(NULL, "when reading LOD in (%s ...)",
+ tex->opcode_string());
+ return NULL;
+ }
+ break;
+ case ir_txd: {
+ s_expression *s_dx, *s_dy;
+ s_pattern dxdy_pat[] = { s_dx, s_dy };
+ if (!MATCH(s_lod, dxdy_pat)) {
+ ir_read_error(s_lod, "expected (dPdx dPdy) in (txd ...)");
+ return NULL;
+ }
+ tex->lod_info.grad.dPdx = read_rvalue(s_dx);
+ if (tex->lod_info.grad.dPdx == NULL) {
+ ir_read_error(NULL, "when reading dPdx in (txd ...)");
+ return NULL;
+ }
+ tex->lod_info.grad.dPdy = read_rvalue(s_dy);
+ if (tex->lod_info.grad.dPdy == NULL) {
+ ir_read_error(NULL, "when reading dPdy in (txd ...)");
+ return NULL;
}
- default:
- // tex doesn't have any extra parameters and txf was handled earlier.
- break;
- };
+ break;
}
+ default:
+ // tex doesn't have any extra parameters.
+ break;
+ };
return tex;
}
diff --git a/src/glsl/ir_rvalue_visitor.cpp b/src/glsl/ir_rvalue_visitor.cpp
index 773bfcfa3ec..ed6c7cb6a1a 100644
--- a/src/glsl/ir_rvalue_visitor.cpp
+++ b/src/glsl/ir_rvalue_visitor.cpp
@@ -53,6 +53,7 @@ ir_rvalue_visitor::visit_leave(ir_texture *ir)
handle_rvalue(&ir->coordinate);
handle_rvalue(&ir->projector);
handle_rvalue(&ir->shadow_comparitor);
+ handle_rvalue(&ir->offset);
switch (ir->op) {
case ir_tex:
diff --git a/src/glsl/ir_set_program_inouts.cpp b/src/glsl/ir_set_program_inouts.cpp
index b3f1cc0d8b5..085456533c5 100644
--- a/src/glsl/ir_set_program_inouts.cpp
+++ b/src/glsl/ir_set_program_inouts.cpp
@@ -66,7 +66,7 @@ public:
};
static void
-mark(struct gl_program *prog, ir_variable *var, int index)
+mark(struct gl_program *prog, ir_variable *var, int offset, int len)
{
/* As of GLSL 1.20, varyings can only be floats, floating-point
* vectors or matrices, or arrays of them. For Mesa programs using
@@ -75,25 +75,14 @@ mark(struct gl_program *prog, ir_variable *var, int index)
* something doing a more clever packing would use something other
* than InputsRead/OutputsWritten.
*/
- const glsl_type *element_type;
- int element_size;
- if (var->type->is_array())
- element_type = var->type->fields.array;
- else
- element_type = var->type;
-
- if (element_type->is_matrix())
- element_size = element_type->matrix_columns;
- else
- element_size = 1;
-
- index *= element_size;
- for (int i = 0; i < element_size; i++) {
+ for (int i = 0; i < len; i++) {
if (var->mode == ir_var_in)
- prog->InputsRead |= BITFIELD64_BIT(var->location + index + i);
+ prog->InputsRead |= BITFIELD64_BIT(var->location + offset + i);
+ else if (var->mode == ir_var_system_value)
+ prog->SystemValuesRead |= (1 << (var->location + offset + i));
else
- prog->OutputsWritten |= BITFIELD64_BIT(var->location + index + i);
+ prog->OutputsWritten |= BITFIELD64_BIT(var->location + offset + i);
}
}
@@ -106,10 +95,11 @@ ir_set_program_inouts_visitor::visit(ir_dereference_variable *ir)
if (ir->type->is_array()) {
for (unsigned int i = 0; i < ir->type->length; i++) {
- mark(this->prog, ir->var, i);
+ mark(this->prog, ir->var, i,
+ ir->type->length * ir->type->fields.array->matrix_columns);
}
} else {
- mark(this->prog, ir->var, 0);
+ mark(this->prog, ir->var, 0, ir->type->matrix_columns);
}
return visit_continue;
@@ -128,7 +118,14 @@ ir_set_program_inouts_visitor::visit_enter(ir_dereference_array *ir)
var = (ir_variable *)hash_table_find(this->ht, deref_var->var);
if (index && var) {
- mark(this->prog, var, index->value.i[0]);
+ int width = 1;
+
+ if (deref_var->type->is_array() &&
+ deref_var->type->fields.array->is_matrix()) {
+ width = deref_var->type->fields.array->matrix_columns;
+ }
+
+ mark(this->prog, var, index->value.i[0] * width, width);
return visit_continue_with_parent;
}
@@ -139,7 +136,8 @@ ir_visitor_status
ir_set_program_inouts_visitor::visit(ir_variable *ir)
{
if (ir->mode == ir_var_in ||
- ir->mode == ir_var_out) {
+ ir->mode == ir_var_out ||
+ ir->mode == ir_var_system_value) {
hash_table_insert(this->ht, ir, ir);
}
@@ -163,5 +161,6 @@ do_set_program_inouts(exec_list *instructions, struct gl_program *prog)
prog->InputsRead = 0;
prog->OutputsWritten = 0;
+ prog->SystemValuesRead = 0;
visit_list_elements(&v, instructions);
}
diff --git a/src/glsl/ir_validate.cpp b/src/glsl/ir_validate.cpp
index 5b055f64d38..0fc3baf8690 100644
--- a/src/glsl/ir_validate.cpp
+++ b/src/glsl/ir_validate.cpp
@@ -70,6 +70,7 @@ public:
virtual ir_visitor_status visit_leave(ir_swizzle *ir);
virtual ir_visitor_status visit_enter(ir_assignment *ir);
+ virtual ir_visitor_status visit_enter(ir_call *ir);
static void validate_ir(ir_instruction *ir, void *data);
@@ -173,13 +174,26 @@ ir_validate::visit_enter(ir_function *ir)
this->validate_ir(ir, this->data);
+ /* Verify that all of the things stored in the list of signatures are,
+ * in fact, function signatures.
+ */
+ foreach_list(node, &ir->signatures) {
+ ir_instruction *sig = (ir_instruction *) node;
+
+ if (sig->ir_type != ir_type_function_signature) {
+ printf("Non-signature in signature list of function `%s'\n",
+ ir->name);
+ abort();
+ }
+ }
+
return visit_continue;
}
ir_visitor_status
ir_validate::visit_leave(ir_function *ir)
{
- assert(talloc_parent(ir->name) == ir);
+ assert(ralloc_parent(ir->name) == ir);
this->current_function = NULL;
return visit_continue;
@@ -198,6 +212,12 @@ ir_validate::visit_enter(ir_function_signature *ir)
abort();
}
+ if (ir->return_type == NULL) {
+ printf("Function signature %p for function %s has NULL return type.\n",
+ (void *) ir, ir->function_name());
+ abort();
+ }
+
this->validate_ir(ir, this->data);
return visit_continue;
@@ -450,7 +470,7 @@ ir_validate::visit(ir_variable *ir)
* declared before it is dereferenced.
*/
if (ir->name)
- assert(talloc_parent(ir->name) == ir);
+ assert(ralloc_parent(ir->name) == ir);
hash_table_insert(ht, ir, ir);
return visit_continue;
@@ -488,6 +508,19 @@ ir_validate::visit_enter(ir_assignment *ir)
return visit_continue;
}
+ir_visitor_status
+ir_validate::visit_enter(ir_call *ir)
+{
+ ir_function_signature *const callee = ir->get_callee();
+
+ if (callee->ir_type != ir_type_function_signature) {
+ printf("IR called by ir_call is not ir_function_signature!\n");
+ abort();
+ }
+
+ return visit_continue;
+}
+
void
ir_validate::validate_ir(ir_instruction *ir, void *data)
{
diff --git a/src/glsl/ir_variable.cpp b/src/glsl/ir_variable.cpp
index 5b8281e16e3..18a3e0fb0d9 100644
--- a/src/glsl/ir_variable.cpp
+++ b/src/glsl/ir_variable.cpp
@@ -30,6 +30,11 @@ static void generate_ARB_draw_buffers_variables(exec_list *,
struct _mesa_glsl_parse_state *,
bool, _mesa_glsl_parser_targets);
+static void
+generate_ARB_draw_instanced_variables(exec_list *,
+ struct _mesa_glsl_parse_state *,
+ bool, _mesa_glsl_parser_targets);
+
static ir_variable *
add_variable(const char *name, enum ir_variable_mode mode, int slot,
const glsl_type *type, exec_list *instructions,
@@ -40,7 +45,9 @@ add_variable(const char *name, enum ir_variable_mode mode, int slot,
switch (var->mode) {
case ir_var_auto:
case ir_var_in:
+ case ir_var_const_in:
case ir_var_uniform:
+ case ir_var_system_value:
var->read_only = true;
break;
case ir_var_inout:
@@ -324,8 +331,13 @@ initialize_vs_variables(exec_list *instructions,
generate_130_vs_variables(instructions, state);
break;
}
+
+ if (state->ARB_draw_instanced_enable)
+ generate_ARB_draw_instanced_variables(instructions, state, false,
+ vertex_shader);
}
+
/* This function should only be called for ES, not desktop GL. */
static void
generate_100ES_fs_variables(exec_list *instructions,
@@ -422,6 +434,27 @@ generate_ARB_draw_buffers_variables(exec_list *instructions,
}
}
+
+static void
+generate_ARB_draw_instanced_variables(exec_list *instructions,
+ struct _mesa_glsl_parse_state *state,
+ bool warn,
+ _mesa_glsl_parser_targets target)
+{
+ /* gl_InstanceIDARB is only available in the vertex shader.
+ */
+ if (target == vertex_shader) {
+ ir_variable *const inst =
+ add_variable("gl_InstanceIDARB", ir_var_system_value,
+ SYSTEM_VALUE_INSTANCE_ID,
+ glsl_type::int_type, instructions, state->symbols);
+
+ if (warn)
+ inst->warn_extension = "GL_ARB_draw_instanced";
+ }
+}
+
+
static void
generate_ARB_shader_stencil_export_variables(exec_list *instructions,
struct _mesa_glsl_parse_state *state,
diff --git a/src/glsl/ir_variable_refcount.h b/src/glsl/ir_variable_refcount.h
index 8b43bad71f8..906135a9e1e 100644
--- a/src/glsl/ir_variable_refcount.h
+++ b/src/glsl/ir_variable_refcount.h
@@ -54,13 +54,13 @@ class ir_variable_refcount_visitor : public ir_hierarchical_visitor {
public:
ir_variable_refcount_visitor(void)
{
- this->mem_ctx = talloc_new(NULL);
+ this->mem_ctx = ralloc_context(NULL);
this->variable_list.make_empty();
}
~ir_variable_refcount_visitor(void)
{
- talloc_free(this->mem_ctx);
+ ralloc_free(this->mem_ctx);
}
virtual ir_visitor_status visit(ir_variable *);
diff --git a/src/glsl/link_functions.cpp b/src/glsl/link_functions.cpp
index c6339abf237..ae8818be871 100644
--- a/src/glsl/link_functions.cpp
+++ b/src/glsl/link_functions.cpp
@@ -21,14 +21,6 @@
* DEALINGS IN THE SOFTWARE.
*/
-#include <cstdlib>
-#include <cstdio>
-
-extern "C" {
-#include <stdarg.h>
-#include <talloc.h>
-}
-
#include "main/core.h"
#include "glsl_symbol_table.h"
#include "glsl_parser_extras.h"
@@ -107,9 +99,15 @@ public:
* details that may be missing.
*/
ir_function *f = linked->symbols->get_function(name);
- if (f == NULL)
+ if (f == NULL) {
f = new(linked) ir_function(name);
+ /* Add the new function to the linked IR.
+ */
+ linked->symbols->add_function(f);
+ linked->ir->push_head(f);
+ }
+
ir_function_signature *linked_sig =
f->exact_matching_signature(&callee->parameters);
if (linked_sig == NULL) {
@@ -185,6 +183,18 @@ public:
var = ir->var->clone(linked, NULL);
linked->symbols->add_variable(var);
linked->ir->push_head(var);
+ } else if (var->type->is_array()) {
+ /* It is possible to have a global array declared in multiple
+ * shaders without a size. The array is implicitly sized by the
+ * maximal access to it in *any* shader. Because of this, we
+ * need to track the maximal access to the array as linking pulls
+ * more functions in that access the array.
+ */
+ var->max_array_access =
+ MAX2(var->max_array_access, ir->var->max_array_access);
+
+ if (var->type->length == 0 && ir->var->type->length != 0)
+ var->type = ir->var->type;
}
ir->var = var;
diff --git a/src/glsl/linker.cpp b/src/glsl/linker.cpp
index a219ab7e66c..7db5c5e8d53 100644
--- a/src/glsl/linker.cpp
+++ b/src/glsl/linker.cpp
@@ -63,14 +63,6 @@
*
* \author Ian Romanick <ian.d.romanick@intel.com>
*/
-#include <cstdlib>
-#include <cstdio>
-#include <climits>
-
-extern "C" {
-#include <stdarg.h>
-#include <talloc.h>
-}
#include "main/core.h"
#include "glsl_symbol_table.h"
@@ -176,9 +168,9 @@ linker_error_printf(gl_shader_program *prog, const char *fmt, ...)
{
va_list ap;
- prog->InfoLog = talloc_strdup_append(prog->InfoLog, "error: ");
+ ralloc_strcat(&prog->InfoLog, "error: ");
va_start(ap, fmt);
- prog->InfoLog = talloc_vasprintf_append(prog->InfoLog, fmt, ap);
+ ralloc_vasprintf_append(&prog->InfoLog, fmt, ap);
va_end(ap);
}
@@ -303,6 +295,7 @@ mode_string(const ir_variable *var)
case ir_var_out: return "shader output";
case ir_var_inout: return "shader inout";
+ case ir_var_const_in:
case ir_var_temporary:
default:
assert(!"Should not get here.");
@@ -360,11 +353,8 @@ cross_validate_globals(struct gl_shader_program *prog,
&& (var->type->fields.array == existing->type->fields.array)
&& ((var->type->length == 0)
|| (existing->type->length == 0))) {
- if (existing->type->length == 0) {
+ if (var->type->length != 0) {
existing->type = var->type;
- existing->max_array_access =
- MAX2(existing->max_array_access,
- var->max_array_access);
}
} else {
linker_error_printf(prog, "%s `%s' declared as type "
@@ -389,6 +379,32 @@ cross_validate_globals(struct gl_shader_program *prog,
existing->explicit_location = true;
}
+ /* Validate layout qualifiers for gl_FragDepth.
+ *
+ * From the AMD_conservative_depth spec:
+ * "If gl_FragDepth is redeclared in any fragment shader in
+ * a program, it must be redeclared in all fragment shaders in that
+ * program that have static assignments to gl_FragDepth. All
+ * redeclarations of gl_FragDepth in all fragment shaders in
+ * a single program must have the same set of qualifiers."
+ */
+ if (strcmp(var->name, "gl_FragDepth") == 0) {
+ bool layout_declared = var->depth_layout != ir_depth_layout_none;
+ bool layout_differs = var->depth_layout != existing->depth_layout;
+ if (layout_declared && layout_differs) {
+ linker_error_printf(prog,
+ "All redeclarations of gl_FragDepth in all fragment shaders "
+ "in a single program must have the same set of qualifiers.");
+ }
+ if (var->used && layout_differs) {
+ linker_error_printf(prog,
+ "If gl_FragDepth is redeclared with a layout qualifier in"
+ "any fragment shader, it must be redeclared with the same"
+ "layout qualifier in all fragment shaders that have"
+ "assignments to gl_FragDepth");
+ }
+ }
+
/* FINISHME: Handle non-constant initializers.
*/
if (var->constant_value != NULL) {
@@ -413,7 +429,7 @@ cross_validate_globals(struct gl_shader_program *prog,
* FINISHME: will fail.
*/
existing->constant_value =
- var->constant_value->clone(talloc_parent(existing), NULL);
+ var->constant_value->clone(ralloc_parent(existing), NULL);
}
if (existing->invariant != var->invariant) {
@@ -422,6 +438,12 @@ cross_validate_globals(struct gl_shader_program *prog,
mode_string(var), var->name);
return false;
}
+ if (existing->centroid != var->centroid) {
+ linker_error_printf(prog, "declarations for %s `%s' have "
+ "mismatching centroid qualifiers\n",
+ mode_string(var), var->name);
+ return false;
+ }
} else
variables.add_variable(var);
}
@@ -487,14 +509,35 @@ cross_validate_outputs_to_inputs(struct gl_shader_program *prog,
/* Check that the types match between stages.
*/
if (input->type != output->type) {
- linker_error_printf(prog,
- "%s shader output `%s' declared as "
- "type `%s', but %s shader input declared "
- "as type `%s'\n",
- producer_stage, output->name,
- output->type->name,
- consumer_stage, input->type->name);
- return false;
+ /* There is a bit of a special case for gl_TexCoord. This
+ * built-in is unsized by default. Appliations that variable
+ * access it must redeclare it with a size. There is some
+ * language in the GLSL spec that implies the fragment shader
+ * and vertex shader do not have to agree on this size. Other
+ * driver behave this way, and one or two applications seem to
+ * rely on it.
+ *
+ * Neither declaration needs to be modified here because the array
+ * sizes are fixed later when update_array_sizes is called.
+ *
+ * From page 48 (page 54 of the PDF) of the GLSL 1.10 spec:
+ *
+ * "Unlike user-defined varying variables, the built-in
+ * varying variables don't have a strict one-to-one
+ * correspondence between the vertex language and the
+ * fragment language."
+ */
+ if (!output->type->is_array()
+ || (strncmp("gl_", output->name, 3) != 0)) {
+ linker_error_printf(prog,
+ "%s shader output `%s' declared as "
+ "type `%s', but %s shader input declared "
+ "as type `%s'\n",
+ producer_stage, output->name,
+ output->type->name,
+ consumer_stage, input->type->name);
+ return false;
+ }
}
/* Check that all of the qualifiers match between stages.
@@ -867,30 +910,29 @@ link_intrastage_shaders(void *mem_ctx,
free(linking_shaders);
- /* Make a pass over all global variables to ensure that arrays with
+ /* Make a pass over all variable declarations to ensure that arrays with
* unspecified sizes have a size specified. The size is inferred from the
* max_array_access field.
*/
if (linked != NULL) {
- foreach_list(node, linked->ir) {
- ir_variable *const var = ((ir_instruction *) node)->as_variable();
-
- if (var == NULL)
- continue;
-
- if ((var->mode != ir_var_auto) && (var->mode != ir_var_temporary))
- continue;
-
- if (!var->type->is_array() || (var->type->length != 0))
- continue;
+ class array_sizing_visitor : public ir_hierarchical_visitor {
+ public:
+ virtual ir_visitor_status visit(ir_variable *var)
+ {
+ if (var->type->is_array() && (var->type->length == 0)) {
+ const glsl_type *type =
+ glsl_type::get_array_instance(var->type->fields.array,
+ var->max_array_access + 1);
+
+ assert(type != NULL);
+ var->type = type;
+ }
- const glsl_type *type =
- glsl_type::get_array_instance(var->type->fields.array,
- var->max_array_access);
+ return visit_continue;
+ }
+ } v;
- assert(type != NULL);
- var->type = type;
- }
+ v.run(linked->ir);
}
return linked;
@@ -970,7 +1012,7 @@ add_uniform(void *mem_ctx, exec_list *uniforms, struct hash_table *ht,
if (type->is_record()) {
for (unsigned int i = 0; i < type->length; i++) {
const glsl_type *field_type = type->fields.structure[i].type;
- char *field_name = talloc_asprintf(mem_ctx, "%s.%s", name,
+ char *field_name = ralloc_asprintf(mem_ctx, "%s.%s", name,
type->fields.structure[i].name);
add_uniform(mem_ctx, uniforms, ht, field_name, field_type,
@@ -986,7 +1028,7 @@ add_uniform(void *mem_ctx, exec_list *uniforms, struct hash_table *ht,
/* Array of structures. */
if (array_elem_type->is_record()) {
for (unsigned int i = 0; i < type->length; i++) {
- char *elem_name = talloc_asprintf(mem_ctx, "%s[%d]", name, i);
+ char *elem_name = ralloc_asprintf(mem_ctx, "%s[%d]", name, i);
add_uniform(mem_ctx, uniforms, ht, elem_name, array_elem_type,
shader_type, next_shader_pos, total_uniforms);
}
@@ -1048,7 +1090,7 @@ assign_uniform_locations(struct gl_shader_program *prog)
unsigned total_uniforms = 0;
hash_table *ht = hash_table_ctor(32, hash_table_string_hash,
hash_table_string_compare);
- void *mem_ctx = talloc_new(NULL);
+ void *mem_ctx = ralloc_context(NULL);
for (unsigned i = 0; i < MESA_SHADER_TYPES; i++) {
if (prog->_LinkedShaders[i] == NULL)
@@ -1077,7 +1119,7 @@ assign_uniform_locations(struct gl_shader_program *prog)
}
}
- talloc_free(mem_ctx);
+ ralloc_free(mem_ctx);
gl_uniform_list *ul = (gl_uniform_list *)
calloc(1, sizeof(gl_uniform_list));
@@ -1445,16 +1487,16 @@ assign_varying_locations(struct gl_shader_program *prog,
void
link_shaders(struct gl_context *ctx, struct gl_shader_program *prog)
{
- void *mem_ctx = talloc_init("temporary linker context");
+ void *mem_ctx = ralloc_context(NULL); // temporary linker context
prog->LinkStatus = false;
prog->Validated = false;
prog->_Used = false;
if (prog->InfoLog != NULL)
- talloc_free(prog->InfoLog);
+ ralloc_free(prog->InfoLog);
- prog->InfoLog = talloc_strdup(NULL, "");
+ prog->InfoLog = ralloc_strdup(NULL, "");
/* Separate the shaders into groups based on their type.
*/
@@ -1636,6 +1678,20 @@ link_shaders(struct gl_context *ctx, struct gl_shader_program *prog)
demote_shader_inputs_and_outputs(sh, ir_var_in);
}
+ /* OpenGL ES requires that a vertex shader and a fragment shader both be
+ * present in a linked program. By checking for use of shading language
+ * version 1.00, we also catch the GL_ARB_ES2_compatibility case.
+ */
+ if (ctx->API == API_OPENGLES2 || prog->Version == 100) {
+ if (prog->_LinkedShaders[MESA_SHADER_VERTEX] == NULL) {
+ linker_error_printf(prog, "program lacks a vertex shader\n");
+ prog->LinkStatus = false;
+ } else if (prog->_LinkedShaders[MESA_SHADER_FRAGMENT] == NULL) {
+ linker_error_printf(prog, "program lacks a fragment shader\n");
+ prog->LinkStatus = false;
+ }
+ }
+
/* FINISHME: Assign fragment shader output locations. */
done:
@@ -1649,5 +1705,5 @@ done:
reparent_ir(prog->_LinkedShaders[i]->ir, prog->_LinkedShaders[i]->ir);
}
- talloc_free(mem_ctx);
+ ralloc_free(mem_ctx);
}
diff --git a/src/glsl/list.h b/src/glsl/list.h
index 3197b03cf28..1d46365faec 100644
--- a/src/glsl/list.h
+++ b/src/glsl/list.h
@@ -66,37 +66,33 @@
#ifndef __cplusplus
#include <stddef.h>
-#include <talloc.h>
-#else
-extern "C" {
-#include <talloc.h>
-}
#endif
-
#include <assert.h>
+#include "ralloc.h"
+
struct exec_node {
struct exec_node *next;
struct exec_node *prev;
#ifdef __cplusplus
- /* Callers of this talloc-based new need not call delete. It's
- * easier to just talloc_free 'ctx' (or any of its ancestors). */
+ /* Callers of this ralloc-based new need not call delete. It's
+ * easier to just ralloc_free 'ctx' (or any of its ancestors). */
static void* operator new(size_t size, void *ctx)
{
void *node;
- node = talloc_size(ctx, size);
+ node = ralloc_size(ctx, size);
assert(node != NULL);
return node;
}
/* If the user *does* call delete, that's OK, we will just
- * talloc_free in that case. */
+ * ralloc_free in that case. */
static void operator delete(void *node)
{
- talloc_free(node);
+ ralloc_free(node);
}
exec_node() : next(NULL), prev(NULL)
@@ -289,23 +285,23 @@ struct exec_list {
struct exec_node *tail_pred;
#ifdef __cplusplus
- /* Callers of this talloc-based new need not call delete. It's
- * easier to just talloc_free 'ctx' (or any of its ancestors). */
+ /* Callers of this ralloc-based new need not call delete. It's
+ * easier to just ralloc_free 'ctx' (or any of its ancestors). */
static void* operator new(size_t size, void *ctx)
{
void *node;
- node = talloc_size(ctx, size);
+ node = ralloc_size(ctx, size);
assert(node != NULL);
return node;
}
/* If the user *does* call delete, that's OK, we will just
- * talloc_free in that case. */
+ * ralloc_free in that case. */
static void operator delete(void *node)
{
- talloc_free(node);
+ ralloc_free(node);
}
exec_list()
diff --git a/src/glsl/loop_analysis.cpp b/src/glsl/loop_analysis.cpp
index ff7adf00a21..9bba6a97c48 100644
--- a/src/glsl/loop_analysis.cpp
+++ b/src/glsl/loop_analysis.cpp
@@ -37,14 +37,15 @@ loop_state::loop_state()
{
this->ht = hash_table_ctor(0, hash_table_pointer_hash,
hash_table_pointer_compare);
- this->mem_ctx = talloc_init("loop state");
+ this->mem_ctx = ralloc_context(NULL);
+ this->loop_found = false;
}
loop_state::~loop_state()
{
hash_table_dtor(this->ht);
- talloc_free(this->mem_ctx);
+ ralloc_free(this->mem_ctx);
}
@@ -52,7 +53,9 @@ loop_variable_state *
loop_state::insert(ir_loop *ir)
{
loop_variable_state *ls = new(this->mem_ctx) loop_variable_state;
+
hash_table_insert(this->ht, ls, ir);
+ this->loop_found = true;
return ls;
}
@@ -75,8 +78,8 @@ loop_variable_state::get(const ir_variable *ir)
loop_variable *
loop_variable_state::insert(ir_variable *var)
{
- void *mem_ctx = talloc_parent(this);
- loop_variable *lv = talloc_zero(mem_ctx, loop_variable);
+ void *mem_ctx = ralloc_parent(this);
+ loop_variable *lv = rzalloc(mem_ctx, loop_variable);
lv->var = var;
@@ -90,8 +93,8 @@ loop_variable_state::insert(ir_variable *var)
loop_terminator *
loop_variable_state::insert(ir_if *if_stmt)
{
- void *mem_ctx = talloc_parent(this);
- loop_terminator *t = talloc_zero(mem_ctx, loop_terminator);
+ void *mem_ctx = ralloc_parent(this);
+ loop_terminator *t = rzalloc(mem_ctx, loop_terminator);
t->ir = if_stmt;
this->terminators.push_tail(t);
@@ -447,7 +450,7 @@ get_basic_induction_increment(ir_assignment *ir, hash_table *var_hash)
}
if ((inc != NULL) && (rhs->operation == ir_binop_sub)) {
- void *mem_ctx = talloc_parent(ir);
+ void *mem_ctx = ralloc_parent(ir);
inc = new(mem_ctx) ir_expression(ir_unop_neg,
inc->type,
diff --git a/src/glsl/loop_analysis.h b/src/glsl/loop_analysis.h
index 7b0511fbbec..229730836a8 100644
--- a/src/glsl/loop_analysis.h
+++ b/src/glsl/loop_analysis.h
@@ -214,6 +214,8 @@ public:
loop_variable_state *insert(ir_loop *ir);
+ bool loop_found;
+
private:
loop_state();
diff --git a/src/glsl/loop_controls.cpp b/src/glsl/loop_controls.cpp
index b528810f40d..9acbadc50ea 100644
--- a/src/glsl/loop_controls.cpp
+++ b/src/glsl/loop_controls.cpp
@@ -21,7 +21,7 @@
* DEALINGS IN THE SOFTWARE.
*/
-#include <climits>
+#include <limits.h>
#include "main/compiler.h"
#include "glsl_types.h"
#include "loop_analysis.h"
@@ -88,7 +88,7 @@ calculate_iterations(ir_rvalue *from, ir_rvalue *to, ir_rvalue *increment,
if (from == NULL || to == NULL || increment == NULL)
return -1;
- void *mem_ctx = talloc_init("%s", __func__);
+ void *mem_ctx = ralloc_context(NULL);
ir_expression *const sub =
new(mem_ctx) ir_expression(ir_binop_sub, from->type, to, from);
@@ -147,7 +147,7 @@ calculate_iterations(ir_rvalue *from, ir_rvalue *to, ir_rvalue *increment,
}
}
- talloc_free(mem_ctx);
+ ralloc_free(mem_ctx);
return (valid_loop) ? iter_value : -1;
}
diff --git a/src/glsl/loop_unroll.cpp b/src/glsl/loop_unroll.cpp
index 11709587e24..5b84e101477 100644
--- a/src/glsl/loop_unroll.cpp
+++ b/src/glsl/loop_unroll.cpp
@@ -43,6 +43,14 @@ public:
};
+static bool
+is_break(ir_instruction *ir)
+{
+ return ir != NULL && ir->ir_type == ir_type_loop_jump
+ && ((ir_loop_jump *) ir)->is_break();
+}
+
+
ir_visitor_status
loop_unroll_visitor::visit_leave(ir_loop *ir)
{
@@ -73,46 +81,76 @@ loop_unroll_visitor::visit_leave(ir_loop *ir)
if (ls->num_loop_jumps > 1)
return visit_continue;
else if (ls->num_loop_jumps) {
- /* recognize loops in the form produced by ir_lower_jumps */
- ir_instruction *last_ir =
- ((ir_instruction*)ir->body_instructions.get_tail());
-
+ ir_instruction *last_ir = (ir_instruction *) ir->body_instructions.get_tail();
assert(last_ir != NULL);
- ir_if *last_if = last_ir->as_if();
- if (last_if) {
- bool continue_from_then_branch;
-
- /* Determine which if-statement branch, if any, ends with a break.
- * The branch that did *not* have the break will get a temporary
- * continue inserted in each iteration of the loop unroll.
- *
- * Note that since ls->num_loop_jumps is <= 1, it is impossible for
- * both branches to end with a break.
- */
- ir_instruction *last =
- (ir_instruction *) last_if->then_instructions.get_tail();
-
- if (last && last->ir_type == ir_type_loop_jump
- && ((ir_loop_jump*) last)->is_break()) {
- continue_from_then_branch = false;
- } else {
- last = (ir_instruction *) last_if->then_instructions.get_tail();
-
- if (last && last->ir_type == ir_type_loop_jump
- && ((ir_loop_jump*) last)->is_break())
- continue_from_then_branch = true;
- else
- /* Bail out if neither if-statement branch ends with a break.
+ if (is_break(last_ir)) {
+ /* If the only loop-jump is a break at the end of the loop, the loop
+ * will execute exactly once. Remove the break, set the iteration
+ * count, and fall through to the normal unroller.
+ */
+ last_ir->remove();
+ iterations = 1;
+
+ this->progress = true;
+ } else {
+ ir_if *ir_if = NULL;
+ ir_instruction *break_ir = NULL;
+ bool continue_from_then_branch = false;
+
+ foreach_list(node, &ir->body_instructions) {
+ /* recognize loops in the form produced by ir_lower_jumps */
+ ir_instruction *cur_ir = (ir_instruction *) node;
+
+ ir_if = cur_ir->as_if();
+ if (ir_if != NULL) {
+ /* Determine which if-statement branch, if any, ends with a
+ * break. The branch that did *not* have the break will get a
+ * temporary continue inserted in each iteration of the loop
+ * unroll.
+ *
+ * Note that since ls->num_loop_jumps is <= 1, it is impossible
+ * for both branches to end with a break.
*/
- return visit_continue;
- }
+ ir_instruction *ir_if_last =
+ (ir_instruction *) ir_if->then_instructions.get_tail();
+
+ if (is_break(ir_if_last)) {
+ continue_from_then_branch = false;
+ break_ir = ir_if_last;
+ break;
+ } else {
+ ir_if_last =
+ (ir_instruction *) ir_if->else_instructions.get_tail();
+
+ if (is_break(ir_if_last)) {
+ break_ir = ir_if_last;
+ continue_from_then_branch = true;
+ break;
+ }
+ }
+ }
+ }
+
+ if (break_ir == NULL)
+ return visit_continue;
+
+ /* move instructions after then if in the continue branch */
+ while (!ir_if->get_next()->is_tail_sentinel()) {
+ ir_instruction *move_ir = (ir_instruction *) ir_if->get_next();
+
+ move_ir->remove();
+ if (continue_from_then_branch)
+ ir_if->then_instructions.push_tail(move_ir);
+ else
+ ir_if->else_instructions.push_tail(move_ir);
+ }
- /* Remove the break from the if-statement.
- */
- last->remove();
+ /* Remove the break from the if-statement.
+ */
+ break_ir->remove();
- void *const mem_ctx = talloc_parent(ir);
+ void *const mem_ctx = ralloc_parent(ir);
ir_instruction *ir_to_replace = ir;
for (int i = 0; i < iterations; i++) {
@@ -121,8 +159,8 @@ loop_unroll_visitor::visit_leave(ir_loop *ir)
copy_list.make_empty();
clone_ir_list(mem_ctx, &copy_list, &ir->body_instructions);
- last_if = ((ir_instruction*)copy_list.get_tail())->as_if();
- assert(last_if);
+ ir_if = ((ir_instruction *) copy_list.get_tail())->as_if();
+ assert(ir_if != NULL);
ir_to_replace->insert_before(&copy_list);
ir_to_replace->remove();
@@ -132,7 +170,7 @@ loop_unroll_visitor::visit_leave(ir_loop *ir)
new(mem_ctx) ir_loop_jump(ir_loop_jump::jump_continue);
exec_list *const list = (continue_from_then_branch)
- ? &last_if->then_instructions : &last_if->else_instructions;
+ ? &ir_if->then_instructions : &ir_if->else_instructions;
list->push_tail(ir_to_replace);
}
@@ -141,21 +179,10 @@ loop_unroll_visitor::visit_leave(ir_loop *ir)
this->progress = true;
return visit_continue;
- } else if (last_ir->ir_type == ir_type_loop_jump
- && ((ir_loop_jump *)last_ir)->is_break()) {
- /* If the only loop-jump is a break at the end of the loop, the loop
- * will execute exactly once. Remove the break, set the iteration
- * count, and fall through to the normal unroller.
- */
- last_ir->remove();
- iterations = 1;
-
- this->progress = true;
- } else
- return visit_continue;
+ }
}
- void *const mem_ctx = talloc_parent(ir);
+ void *const mem_ctx = ralloc_parent(ir);
for (int i = 0; i < iterations; i++) {
exec_list copy_list;
diff --git a/src/glsl/lower_discard.cpp b/src/glsl/lower_discard.cpp
index b95313df8c8..cafd2dd3b44 100644
--- a/src/glsl/lower_discard.cpp
+++ b/src/glsl/lower_discard.cpp
@@ -170,7 +170,7 @@ lower_discard_visitor::visit_leave(ir_if *ir)
if (then_discard == NULL && else_discard == NULL)
return visit_continue;
- void *mem_ctx = talloc_parent(ir);
+ void *mem_ctx = ralloc_parent(ir);
ir_variable *temp = new(mem_ctx) ir_variable(glsl_type::bool_type,
"discard_cond_temp",
diff --git a/src/glsl/lower_if_to_cond_assign.cpp b/src/glsl/lower_if_to_cond_assign.cpp
index cf48cfb8d61..e3a1065d996 100644
--- a/src/glsl/lower_if_to_cond_assign.cpp
+++ b/src/glsl/lower_if_to_cond_assign.cpp
@@ -24,12 +24,25 @@
/**
* \file lower_if_to_cond_assign.cpp
*
- * This attempts to flatten all if statements to conditional
- * assignments for GPUs that don't do control flow.
+ * This attempts to flatten if-statements to conditional assignments for
+ * GPUs with limited or no flow control support.
*
* It can't handle other control flow being inside of its block, such
* as calls or loops. Hopefully loop unrolling and inlining will take
* care of those.
+ *
+ * Drivers for GPUs with no control flow support should simply call
+ *
+ * lower_if_to_cond_assign(instructions)
+ *
+ * to attempt to flatten all if-statements.
+ *
+ * Some GPUs (such as i965 prior to gen6) do support control flow, but have a
+ * maximum nesting depth N. Drivers for such hardware can call
+ *
+ * lower_if_to_cond_assign(instructions, N)
+ *
+ * to attempt to flatten any if-statements appearing at depth > N.
*/
#include "glsl_types.h"
@@ -37,20 +50,25 @@
class ir_if_to_cond_assign_visitor : public ir_hierarchical_visitor {
public:
- ir_if_to_cond_assign_visitor()
+ ir_if_to_cond_assign_visitor(unsigned max_depth)
{
this->progress = false;
+ this->max_depth = max_depth;
+ this->depth = 0;
}
+ ir_visitor_status visit_enter(ir_if *);
ir_visitor_status visit_leave(ir_if *);
bool progress;
+ unsigned max_depth;
+ unsigned depth;
};
bool
-do_if_to_cond_assign(exec_list *instructions)
+lower_if_to_cond_assign(exec_list *instructions, unsigned max_depth)
{
- ir_if_to_cond_assign_visitor v;
+ ir_if_to_cond_assign_visitor v(max_depth);
visit_list_elements(&v, instructions);
@@ -120,8 +138,22 @@ move_block_to_cond_assign(void *mem_ctx,
}
ir_visitor_status
+ir_if_to_cond_assign_visitor::visit_enter(ir_if *ir)
+{
+ (void) ir;
+ this->depth++;
+ return visit_continue;
+}
+
+ir_visitor_status
ir_if_to_cond_assign_visitor::visit_leave(ir_if *ir)
{
+ /* Only flatten when beyond the GPU's maximum supported nesting depth. */
+ if (this->depth <= this->max_depth)
+ return visit_continue;
+
+ this->depth--;
+
bool found_control_flow = false;
ir_variable *cond_var;
ir_assignment *assign;
@@ -139,7 +171,7 @@ ir_if_to_cond_assign_visitor::visit_leave(ir_if *ir)
if (found_control_flow)
return visit_continue;
- void *mem_ctx = talloc_parent(ir);
+ void *mem_ctx = ralloc_parent(ir);
/* Store the condition to a variable so the assignment conditions are
* simpler.
diff --git a/src/glsl/lower_jumps.cpp b/src/glsl/lower_jumps.cpp
index 9cd15ef7366..dd2601d1aad 100644
--- a/src/glsl/lower_jumps.cpp
+++ b/src/glsl/lower_jumps.cpp
@@ -66,7 +66,7 @@ enum jump_strength
strength_always_clears_execute_flag,
strength_continue,
strength_break,
- strength_return,
+ strength_return
};
struct block_record
@@ -512,7 +512,11 @@ lower_continue:
if(this->loop.may_set_return_flag) {
assert(this->function.return_flag);
ir_if* return_if = new(ir) ir_if(new(ir) ir_dereference_variable(this->function.return_flag));
- return_if->then_instructions.push_tail(new(ir) ir_loop_jump(saved_loop.loop ? ir_loop_jump::jump_break : ir_loop_jump::jump_continue));
+ saved_loop.may_set_return_flag = true;
+ if(saved_loop.loop)
+ return_if->then_instructions.push_tail(new(ir) ir_loop_jump(ir_loop_jump::jump_break));
+ else
+ move_outer_block_inside(ir, &return_if->else_instructions);
ir->insert_after(return_if);
}
diff --git a/src/glsl/lower_mat_op_to_vec.cpp b/src/glsl/lower_mat_op_to_vec.cpp
index 7065fdec35f..8cbbfa713c9 100644
--- a/src/glsl/lower_mat_op_to_vec.cpp
+++ b/src/glsl/lower_mat_op_to_vec.cpp
@@ -368,7 +368,7 @@ ir_mat_op_to_vec_visitor::visit_leave(ir_assignment *orig_assign)
assert(orig_expr->get_num_operands() <= 2);
- mem_ctx = talloc_parent(orig_assign);
+ mem_ctx = ralloc_parent(orig_assign);
ir_dereference_variable *lhs_deref =
orig_assign->lhs->as_dereference_variable();
diff --git a/src/glsl/lower_noise.cpp b/src/glsl/lower_noise.cpp
index cb32d283486..85f59b675e0 100644
--- a/src/glsl/lower_noise.cpp
+++ b/src/glsl/lower_noise.cpp
@@ -51,7 +51,7 @@ public:
* that implements noise. No hardware has a noise instruction.
*/
if (expr->operation == ir_unop_noise) {
- *rvalue = ir_constant::zero(talloc_parent(expr), expr->type);
+ *rvalue = ir_constant::zero(ralloc_parent(expr), expr->type);
this->progress = true;
}
}
diff --git a/src/glsl/lower_texture_projection.cpp b/src/glsl/lower_texture_projection.cpp
index 1fd26a7a2b5..6e3aaecceee 100644
--- a/src/glsl/lower_texture_projection.cpp
+++ b/src/glsl/lower_texture_projection.cpp
@@ -55,7 +55,7 @@ lower_texture_projection_visitor::visit_leave(ir_texture *ir)
if (!ir->projector)
return visit_continue;
- void *mem_ctx = talloc_parent(ir);
+ void *mem_ctx = ralloc_parent(ir);
ir_variable *var = new(mem_ctx) ir_variable(ir->projector->type,
"projector", ir_var_auto);
diff --git a/src/glsl/lower_variable_index_to_cond_assign.cpp b/src/glsl/lower_variable_index_to_cond_assign.cpp
index 5f0dd731135..8eb1612f0a0 100644
--- a/src/glsl/lower_variable_index_to_cond_assign.cpp
+++ b/src/glsl/lower_variable_index_to_cond_assign.cpp
@@ -42,6 +42,7 @@ struct assignment_generator
ir_instruction* base_ir;
ir_rvalue* array;
bool is_write;
+ unsigned int write_mask;
ir_variable* var;
assignment_generator()
@@ -53,15 +54,19 @@ struct assignment_generator
/* Just clone the rest of the deref chain when trying to get at the
* underlying variable.
*/
- void *mem_ctx = talloc_parent(base_ir);
- ir_rvalue *element =
+ void *mem_ctx = ralloc_parent(base_ir);
+ ir_dereference *element =
new(mem_ctx) ir_dereference_array(this->array->clone(mem_ctx, NULL),
new(mem_ctx) ir_constant(i));
ir_rvalue *variable = new(mem_ctx) ir_dereference_variable(this->var);
- ir_assignment *assignment = (is_write)
- ? new(mem_ctx) ir_assignment(element, variable, condition)
- : new(mem_ctx) ir_assignment(variable, element, condition);
+ ir_assignment *assignment;
+ if (is_write) {
+ assignment = new(mem_ctx) ir_assignment(element, variable, condition,
+ write_mask);
+ } else {
+ assignment = new(mem_ctx) ir_assignment(variable, element, condition);
+ }
list->push_tail(assignment);
}
@@ -86,7 +91,7 @@ struct switch_generator
linear_sequence_max_length(linear_sequence_max_length),
condition_components(condition_components)
{
- this->mem_ctx = talloc_parent(index);
+ this->mem_ctx = ralloc_parent(index);
}
void linear_sequence(unsigned begin, unsigned end, exec_list *list)
@@ -250,6 +255,7 @@ public:
case ir_var_uniform:
return this->lower_uniforms;
case ir_var_in:
+ case ir_var_const_in:
return (var->location == -1) ? this->lower_temps : this->lower_inputs;
case ir_var_out:
return (var->location == -1) ? this->lower_temps : this->lower_outputs;
@@ -262,7 +268,7 @@ public:
}
ir_variable *convert_dereference_array(ir_dereference_array *orig_deref,
- ir_rvalue* value)
+ ir_assignment* orig_assign)
{
assert(is_array_or_matrix(orig_deref->array));
@@ -270,17 +276,31 @@ public:
? orig_deref->array->type->length
: orig_deref->array->type->matrix_columns;
- void *const mem_ctx = talloc_parent(base_ir);
- ir_variable *var =
- new(mem_ctx) ir_variable(orig_deref->type, "dereference_array_value",
- ir_var_temporary);
- base_ir->insert_before(var);
+ void *const mem_ctx = ralloc_parent(base_ir);
+
+ /* Temporary storage for either the result of the dereference of
+ * the array, or the RHS that's being assigned into the
+ * dereference of the array.
+ */
+ ir_variable *var;
+
+ if (orig_assign) {
+ var = new(mem_ctx) ir_variable(orig_assign->rhs->type,
+ "dereference_array_value",
+ ir_var_temporary);
+ base_ir->insert_before(var);
- if (value) {
ir_dereference *lhs = new(mem_ctx) ir_dereference_variable(var);
- ir_assignment *assign = new(mem_ctx) ir_assignment(lhs, value, NULL);
+ ir_assignment *assign = new(mem_ctx) ir_assignment(lhs,
+ orig_assign->rhs,
+ NULL);
base_ir->insert_before(assign);
+ } else {
+ var = new(mem_ctx) ir_variable(orig_deref->type,
+ "dereference_array_value",
+ ir_var_temporary);
+ base_ir->insert_before(var);
}
/* Store the index to a temporary to avoid reusing its tree. */
@@ -298,7 +318,12 @@ public:
ag.array = orig_deref->array;
ag.base_ir = base_ir;
ag.var = var;
- ag.is_write = !!value;
+ if (orig_assign) {
+ ag.is_write = true;
+ ag.write_mask = orig_assign->write_mask;
+ } else {
+ ag.is_write = false;
+ }
switch_generator sg(ag, index, 4, 4);
@@ -318,7 +343,7 @@ public:
if (needs_lowering(orig_deref)) {
ir_variable* var = convert_dereference_array(orig_deref, 0);
assert(var);
- *pir = new(talloc_parent(base_ir)) ir_dereference_variable(var);
+ *pir = new(ralloc_parent(base_ir)) ir_dereference_variable(var);
this->progress = true;
}
}
@@ -331,7 +356,7 @@ public:
ir_dereference_array *orig_deref = ir->lhs->as_dereference_array();
if (needs_lowering(orig_deref)) {
- convert_dereference_array(orig_deref, ir->rhs);
+ convert_dereference_array(orig_deref, ir);
ir->remove();
this->progress = true;
}
diff --git a/src/glsl/lower_vec_index_to_cond_assign.cpp b/src/glsl/lower_vec_index_to_cond_assign.cpp
index f8011a16e5b..3c4d93201d2 100644
--- a/src/glsl/lower_vec_index_to_cond_assign.cpp
+++ b/src/glsl/lower_vec_index_to_cond_assign.cpp
@@ -82,7 +82,7 @@ ir_vec_index_to_cond_assign_visitor::convert_vec_index_to_cond_assign(ir_rvalue
orig_deref->array->type->is_array())
return ir;
- void *mem_ctx = talloc_parent(ir);
+ void *mem_ctx = ralloc_parent(ir);
assert(orig_deref->array_index->type->base_type == GLSL_TYPE_INT);
@@ -167,7 +167,7 @@ ir_vec_index_to_cond_assign_visitor::visit_leave(ir_assignment *ir)
orig_deref->array->type->is_array())
return visit_continue;
- void *mem_ctx = talloc_parent(ir);
+ void *mem_ctx = ralloc_parent(ir);
assert(orig_deref->array_index->type->base_type == GLSL_TYPE_INT);
diff --git a/src/glsl/lower_vec_index_to_swizzle.cpp b/src/glsl/lower_vec_index_to_swizzle.cpp
index 9ae43c0db17..c7630c28a83 100644
--- a/src/glsl/lower_vec_index_to_swizzle.cpp
+++ b/src/glsl/lower_vec_index_to_swizzle.cpp
@@ -74,7 +74,7 @@ ir_vec_index_to_swizzle_visitor::convert_vec_index_to_swizzle(ir_rvalue *ir)
if (!ir_constant)
return ir;
- void *ctx = talloc_parent(ir);
+ void *ctx = ralloc_parent(ir);
this->progress = true;
return new(ctx) ir_swizzle(deref->array,
ir_constant->value.i[0], 0, 0, 0, 1);
diff --git a/src/glsl/lower_vector.cpp b/src/glsl/lower_vector.cpp
index 93c37638bbd..57963a121ad 100644
--- a/src/glsl/lower_vector.cpp
+++ b/src/glsl/lower_vector.cpp
@@ -125,7 +125,7 @@ lower_vector_visitor::handle_rvalue(ir_rvalue **rvalue)
if (this->dont_lower_swz && is_extended_swizzle(expr))
return;
- /* FINISHME: Is this the right thing to use for the talloc context?
+ /* FINISHME: Is this the right thing to use for the ralloc context?
*/
void *const mem_ctx = expr;
diff --git a/src/glsl/main.cpp b/src/glsl/main.cpp
index c8fc2676253..096da93dcef 100644
--- a/src/glsl/main.cpp
+++ b/src/glsl/main.cpp
@@ -20,15 +20,8 @@
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*/
-#include <cstdlib>
-#include <cstdio>
#include <getopt.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <unistd.h>
-
#include "ast.h"
#include "glsl_parser_extras.h"
#include "glsl_parser.h"
@@ -61,7 +54,7 @@ _mesa_new_shader(struct gl_context *ctx, GLuint name, GLenum type)
(void) ctx;
assert(type == GL_FRAGMENT_SHADER || type == GL_VERTEX_SHADER);
- shader = talloc_zero(NULL, struct gl_shader);
+ shader = rzalloc(NULL, struct gl_shader);
if (shader) {
shader->Type = type;
shader->Name = name;
@@ -77,11 +70,18 @@ initialize_context(struct gl_context *ctx, gl_api api)
ctx->API = api;
+ ctx->Extensions.ARB_ES2_compatibility = GL_TRUE;
ctx->Extensions.ARB_draw_buffers = GL_TRUE;
+ ctx->Extensions.ARB_draw_instanced = GL_TRUE;
ctx->Extensions.ARB_fragment_coord_conventions = GL_TRUE;
ctx->Extensions.EXT_texture_array = GL_TRUE;
ctx->Extensions.NV_texture_rectangle = GL_TRUE;
+ /* GLSL 1.30 isn't fully supported, but we need to advertise 1.30 so that
+ * the built-in functions for 1.30 can be built.
+ */
+ ctx->Const.GLSLVersion = 130;
+
/* 1.10 minimums. */
ctx->Const.MaxLights = 8;
ctx->Const.MaxClipPlanes = 8;
@@ -105,43 +105,45 @@ initialize_context(struct gl_context *ctx, gl_api api)
ctx->Driver.NewShader = _mesa_new_shader;
}
-/* Returned string will have 'ctx' as its talloc owner. */
+/* Returned string will have 'ctx' as its ralloc owner. */
static char *
load_text_file(void *ctx, const char *file_name)
{
char *text = NULL;
- struct stat st;
- ssize_t total_read = 0;
- int fd = open(file_name, O_RDONLY);
+ size_t size;
+ size_t total_read = 0;
+ FILE *fp = fopen(file_name, "rb");
- if (fd < 0) {
+ if (!fp) {
return NULL;
}
- if (fstat(fd, & st) == 0) {
- text = (char *) talloc_size(ctx, st.st_size + 1);
- if (text != NULL) {
- do {
- ssize_t bytes = read(fd, text + total_read,
- st.st_size - total_read);
- if (bytes < 0) {
- free(text);
- text = NULL;
- break;
- }
-
- if (bytes == 0) {
- break;
- }
-
- total_read += bytes;
- } while (total_read < st.st_size);
-
- text[total_read] = '\0';
- }
+ fseek(fp, 0L, SEEK_END);
+ size = ftell(fp);
+ fseek(fp, 0L, SEEK_SET);
+
+ text = (char *) ralloc_size(ctx, size + 1);
+ if (text != NULL) {
+ do {
+ size_t bytes = fread(text + total_read,
+ 1, size - total_read, fp);
+ if (bytes < size - total_read) {
+ free(text);
+ text = NULL;
+ break;
+ }
+
+ if (bytes == 0) {
+ break;
+ }
+
+ total_read += bytes;
+ } while (total_read < size);
+
+ text[total_read] = '\0';
}
- close(fd);
+ fclose(fp);
return text;
}
@@ -188,7 +190,7 @@ compile_shader(struct gl_context *ctx, struct gl_shader *shader)
const char *source = shader->Source;
state->error = preprocess(state, &source, &state->info_log,
- state->extensions, ctx->API);
+ state->extensions, ctx->API) != 0;
if (!state->error) {
_mesa_glsl_lexer_ctor(state, source);
@@ -238,14 +240,14 @@ compile_shader(struct gl_context *ctx, struct gl_shader *shader)
shader->num_builtins_to_link = state->num_builtins_to_link;
if (shader->InfoLog)
- talloc_free(shader->InfoLog);
+ ralloc_free(shader->InfoLog);
shader->InfoLog = state->info_log;
/* Retain any live IR, but trash the rest. */
reparent_ir(shader->ir, shader);
- talloc_free(state);
+ ralloc_free(state);
return;
}
@@ -270,16 +272,16 @@ main(int argc, char **argv)
struct gl_shader_program *whole_program;
- whole_program = talloc_zero (NULL, struct gl_shader_program);
+ whole_program = rzalloc (NULL, struct gl_shader_program);
assert(whole_program != NULL);
for (/* empty */; argc > optind; optind++) {
- whole_program->Shaders = (struct gl_shader **)
- talloc_realloc(whole_program, whole_program->Shaders,
- struct gl_shader *, whole_program->NumShaders + 1);
+ whole_program->Shaders =
+ reralloc(whole_program, whole_program->Shaders,
+ struct gl_shader *, whole_program->NumShaders + 1);
assert(whole_program->Shaders != NULL);
- struct gl_shader *shader = talloc_zero(whole_program, gl_shader);
+ struct gl_shader *shader = rzalloc(whole_program, gl_shader);
whole_program->Shaders[whole_program->NumShaders] = shader;
whole_program->NumShaders++;
@@ -322,9 +324,9 @@ main(int argc, char **argv)
}
for (unsigned i = 0; i < MESA_SHADER_TYPES; i++)
- talloc_free(whole_program->_LinkedShaders[i]);
+ ralloc_free(whole_program->_LinkedShaders[i]);
- talloc_free(whole_program);
+ ralloc_free(whole_program);
_mesa_glsl_release_types();
_mesa_glsl_release_functions();
diff --git a/src/glsl/opt_algebraic.cpp b/src/glsl/opt_algebraic.cpp
index 20f6159f0e6..cade9611dbb 100644
--- a/src/glsl/opt_algebraic.cpp
+++ b/src/glsl/opt_algebraic.cpp
@@ -191,7 +191,7 @@ ir_algebraic_visitor::handle_expression(ir_expression *ir)
}
if (this->mem_ctx == NULL)
- this->mem_ctx = talloc_parent(ir);
+ this->mem_ctx = ralloc_parent(ir);
switch (ir->operation) {
case ir_unop_logic_not: {
diff --git a/src/glsl/opt_constant_folding.cpp b/src/glsl/opt_constant_folding.cpp
index d69ca75fe03..599b21525de 100644
--- a/src/glsl/opt_constant_folding.cpp
+++ b/src/glsl/opt_constant_folding.cpp
@@ -122,7 +122,7 @@ ir_constant_folding_visitor::visit_enter(ir_call *ir)
ir_rvalue *param_rval = (ir_rvalue *)iter.get();
ir_variable *sig_param = (ir_variable *)sig_iter.get();
- if (sig_param->mode == ir_var_in) {
+ if (sig_param->mode == ir_var_in || sig_param->mode == ir_var_const_in) {
ir_rvalue *new_param = param_rval;
handle_rvalue(&new_param);
diff --git a/src/glsl/opt_constant_propagation.cpp b/src/glsl/opt_constant_propagation.cpp
index 6719fc81863..4425f421193 100644
--- a/src/glsl/opt_constant_propagation.cpp
+++ b/src/glsl/opt_constant_propagation.cpp
@@ -78,13 +78,13 @@ public:
ir_constant_propagation_visitor()
{
progress = false;
- mem_ctx = talloc_new(0);
+ mem_ctx = ralloc_context(0);
this->acp = new(mem_ctx) exec_list;
this->kills = new(mem_ctx) exec_list;
}
~ir_constant_propagation_visitor()
{
- talloc_free(mem_ctx);
+ ralloc_free(mem_ctx);
}
virtual ir_visitor_status visit_enter(class ir_loop *);
@@ -195,7 +195,7 @@ ir_constant_propagation_visitor::handle_rvalue(ir_rvalue **rvalue)
}
}
- *rvalue = new(talloc_parent(deref)) ir_constant(type, &data);
+ *rvalue = new(ralloc_parent(deref)) ir_constant(type, &data);
this->progress = true;
}
@@ -398,11 +398,8 @@ ir_constant_propagation_visitor::add_constant(ir_assignment *ir)
{
acp_entry *entry;
- if (ir->condition) {
- ir_constant *condition = ir->condition->as_constant();
- if (!condition || !condition->value.b[0])
- return;
- }
+ if (ir->condition)
+ return;
if (!ir->write_mask)
return;
diff --git a/src/glsl/opt_constant_variable.cpp b/src/glsl/opt_constant_variable.cpp
index 8068d0c1435..3fa7c3badc8 100644
--- a/src/glsl/opt_constant_variable.cpp
+++ b/src/glsl/opt_constant_variable.cpp
@@ -104,11 +104,8 @@ ir_constant_variable_visitor::visit_enter(ir_assignment *ir)
/* OK, now find if we actually have all the right conditions for
* this to be a constant value assigned to the var.
*/
- if (ir->condition) {
- constval = ir->condition->constant_expression_value();
- if (!constval || !constval->value.b[0])
- return visit_continue;
- }
+ if (ir->condition)
+ return visit_continue;
ir_variable *var = ir->whole_variable_written();
if (!var)
diff --git a/src/glsl/opt_copy_propagation.cpp b/src/glsl/opt_copy_propagation.cpp
index 8d07fefbfd0..efa3afda35a 100644
--- a/src/glsl/opt_copy_propagation.cpp
+++ b/src/glsl/opt_copy_propagation.cpp
@@ -71,13 +71,13 @@ public:
ir_copy_propagation_visitor()
{
progress = false;
- mem_ctx = talloc_new(0);
+ mem_ctx = ralloc_context(0);
this->acp = new(mem_ctx) exec_list;
this->kills = new(mem_ctx) exec_list;
}
~ir_copy_propagation_visitor()
{
- talloc_free(mem_ctx);
+ ralloc_free(mem_ctx);
}
virtual ir_visitor_status visit(class ir_dereference_variable *);
@@ -191,7 +191,7 @@ ir_copy_propagation_visitor::visit_enter(ir_call *ir)
sig_param_iter.next();
}
- /* Since we're unlinked, we don't (necssarily) know the side effects of
+ /* Since we're unlinked, we don't (necessarily) know the side effects of
* this call. So kill all copies.
*/
acp->make_empty();
@@ -309,11 +309,8 @@ ir_copy_propagation_visitor::add_copy(ir_assignment *ir)
{
acp_entry *entry;
- if (ir->condition) {
- ir_constant *condition = ir->condition->as_constant();
- if (!condition || !condition->value.b[0])
- return;
- }
+ if (ir->condition)
+ return;
ir_variable *lhs_var = ir->whole_variable_written();
ir_variable *rhs_var = ir->rhs->whole_variable_referenced();
@@ -325,7 +322,7 @@ ir_copy_propagation_visitor::add_copy(ir_assignment *ir)
* calling us. Just flag it to not execute, and someone else
* will clean up the mess.
*/
- ir->condition = new(talloc_parent(ir)) ir_constant(false);
+ ir->condition = new(ralloc_parent(ir)) ir_constant(false);
this->progress = true;
} else {
entry = new(this->mem_ctx) acp_entry(lhs_var, rhs_var);
diff --git a/src/glsl/opt_copy_propagation_elements.cpp b/src/glsl/opt_copy_propagation_elements.cpp
new file mode 100644
index 00000000000..8541d9a8ee1
--- /dev/null
+++ b/src/glsl/opt_copy_propagation_elements.cpp
@@ -0,0 +1,458 @@
+/*
+ * Copyright © 2010 Intel Corporation
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+
+/**
+ * \file opt_copy_propagation_elements.cpp
+ *
+ * Replaces usage of recently-copied components of variables with the
+ * previous copy of the variable.
+ *
+ * This pass can be compared with opt_copy_propagation, which operands
+ * on arbitrary whole-variable copies. However, in order to handle
+ * the copy propagation of swizzled variables or writemasked writes,
+ * we want to track things on a channel-wise basis. I found that
+ * trying to mix the swizzled/writemasked support here with the
+ * whole-variable stuff in opt_copy_propagation.cpp just made a mess,
+ * so this is separate despite the ACP handling being somewhat
+ * similar.
+ *
+ * This should reduce the number of MOV instructions in the generated
+ * programs unless copy propagation is also done on the LIR, and may
+ * help anyway by triggering other optimizations that live in the HIR.
+ */
+
+#include "ir.h"
+#include "ir_rvalue_visitor.h"
+#include "ir_basic_block.h"
+#include "ir_optimization.h"
+#include "glsl_types.h"
+
+static bool debug = false;
+
+class acp_entry : public exec_node
+{
+public:
+ acp_entry(ir_variable *lhs, ir_variable *rhs, int write_mask, int swizzle[4])
+ {
+ this->lhs = lhs;
+ this->rhs = rhs;
+ this->write_mask = write_mask;
+ memcpy(this->swizzle, swizzle, sizeof(this->swizzle));
+ }
+
+ acp_entry(acp_entry *a)
+ {
+ this->lhs = a->lhs;
+ this->rhs = a->rhs;
+ this->write_mask = a->write_mask;
+ memcpy(this->swizzle, a->swizzle, sizeof(this->swizzle));
+ }
+
+ ir_variable *lhs;
+ ir_variable *rhs;
+ unsigned int write_mask;
+ int swizzle[4];
+};
+
+
+class kill_entry : public exec_node
+{
+public:
+ kill_entry(ir_variable *var, int write_mask)
+ {
+ this->var = var;
+ this->write_mask = write_mask;
+ }
+
+ ir_variable *var;
+ unsigned int write_mask;
+};
+
+class ir_copy_propagation_elements_visitor : public ir_rvalue_visitor {
+public:
+ ir_copy_propagation_elements_visitor()
+ {
+ this->progress = false;
+ this->mem_ctx = ralloc_context(NULL);
+ this->shader_mem_ctx = NULL;
+ this->acp = new(mem_ctx) exec_list;
+ this->kills = new(mem_ctx) exec_list;
+ }
+ ~ir_copy_propagation_elements_visitor()
+ {
+ ralloc_free(mem_ctx);
+ }
+
+ virtual ir_visitor_status visit_enter(class ir_loop *);
+ virtual ir_visitor_status visit_enter(class ir_function_signature *);
+ virtual ir_visitor_status visit_leave(class ir_assignment *);
+ virtual ir_visitor_status visit_enter(class ir_call *);
+ virtual ir_visitor_status visit_enter(class ir_if *);
+
+ void handle_rvalue(ir_rvalue **rvalue);
+
+ void add_copy(ir_assignment *ir);
+ void kill(kill_entry *k);
+ void handle_if_block(exec_list *instructions);
+
+ /** List of acp_entry: The available copies to propagate */
+ exec_list *acp;
+ /**
+ * List of kill_entry: The variables whose values were killed in this
+ * block.
+ */
+ exec_list *kills;
+
+ bool progress;
+
+ bool killed_all;
+
+ /* Context for our local data structures. */
+ void *mem_ctx;
+ /* Context for allocating new shader nodes. */
+ void *shader_mem_ctx;
+};
+
+ir_visitor_status
+ir_copy_propagation_elements_visitor::visit_enter(ir_function_signature *ir)
+{
+ /* Treat entry into a function signature as a completely separate
+ * block. Any instructions at global scope will be shuffled into
+ * main() at link time, so they're irrelevant to us.
+ */
+ exec_list *orig_acp = this->acp;
+ exec_list *orig_kills = this->kills;
+ bool orig_killed_all = this->killed_all;
+
+ this->acp = new(mem_ctx) exec_list;
+ this->kills = new(mem_ctx) exec_list;
+ this->killed_all = false;
+
+ visit_list_elements(this, &ir->body);
+
+ this->kills = orig_kills;
+ this->acp = orig_acp;
+ this->killed_all = orig_killed_all;
+
+ return visit_continue_with_parent;
+}
+
+ir_visitor_status
+ir_copy_propagation_elements_visitor::visit_leave(ir_assignment *ir)
+{
+ ir_dereference_variable *lhs = ir->lhs->as_dereference_variable();
+
+ if (lhs && (lhs->type->is_scalar() || lhs->type->is_vector())) {
+ kill_entry *k = new(mem_ctx) kill_entry(lhs->var, ir->write_mask);
+ kill(k);
+ }
+
+ add_copy(ir);
+
+ return visit_continue;
+}
+
+/**
+ * Replaces dereferences of ACP RHS variables with ACP LHS variables.
+ *
+ * This is where the actual copy propagation occurs. Note that the
+ * rewriting of ir_dereference means that the ir_dereference instance
+ * must not be shared by multiple IR operations!
+ */
+void
+ir_copy_propagation_elements_visitor::handle_rvalue(ir_rvalue **ir)
+{
+ int swizzle_chan[4];
+ ir_dereference_variable *deref_var;
+ ir_variable *source[4] = {NULL, NULL, NULL, NULL};
+ int source_chan[4];
+ int chans;
+
+ if (!*ir)
+ return;
+
+ ir_swizzle *swizzle = (*ir)->as_swizzle();
+ if (swizzle) {
+ deref_var = swizzle->val->as_dereference_variable();
+ if (!deref_var)
+ return;
+
+ swizzle_chan[0] = swizzle->mask.x;
+ swizzle_chan[1] = swizzle->mask.y;
+ swizzle_chan[2] = swizzle->mask.z;
+ swizzle_chan[3] = swizzle->mask.w;
+ chans = swizzle->type->vector_elements;
+ } else {
+ deref_var = (*ir)->as_dereference_variable();
+ if (!deref_var)
+ return;
+
+ swizzle_chan[0] = 0;
+ swizzle_chan[1] = 1;
+ swizzle_chan[2] = 2;
+ swizzle_chan[3] = 3;
+ chans = deref_var->type->vector_elements;
+ }
+
+ if (this->in_assignee)
+ return;
+
+ ir_variable *var = deref_var->var;
+
+ /* Try to find ACP entries covering swizzle_chan[], hoping they're
+ * the same source variable.
+ */
+ foreach_iter(exec_list_iterator, iter, *this->acp) {
+ acp_entry *entry = (acp_entry *)iter.get();
+
+ if (var == entry->lhs) {
+ for (int c = 0; c < chans; c++) {
+ if (entry->write_mask & (1 << swizzle_chan[c])) {
+ source[c] = entry->rhs;
+ source_chan[c] = entry->swizzle[swizzle_chan[c]];
+ }
+ }
+ }
+ }
+
+ /* Make sure all channels are copying from the same source variable. */
+ if (!source[0])
+ return;
+ for (int c = 1; c < chans; c++) {
+ if (source[c] != source[0])
+ return;
+ }
+
+ if (!shader_mem_ctx)
+ shader_mem_ctx = ralloc_parent(deref_var);
+
+ if (debug) {
+ printf("Copy propagation from:\n");
+ (*ir)->print();
+ }
+
+ deref_var = new(shader_mem_ctx) ir_dereference_variable(source[0]);
+ *ir = new(shader_mem_ctx) ir_swizzle(deref_var,
+ source_chan[0],
+ source_chan[1],
+ source_chan[2],
+ source_chan[3],
+ chans);
+
+ if (debug) {
+ printf("to:\n");
+ (*ir)->print();
+ printf("\n");
+ }
+}
+
+
+ir_visitor_status
+ir_copy_propagation_elements_visitor::visit_enter(ir_call *ir)
+{
+ /* Do copy propagation on call parameters, but skip any out params */
+ exec_list_iterator sig_param_iter = ir->get_callee()->parameters.iterator();
+ foreach_iter(exec_list_iterator, iter, ir->actual_parameters) {
+ ir_variable *sig_param = (ir_variable *)sig_param_iter.get();
+ ir_instruction *ir = (ir_instruction *)iter.get();
+ if (sig_param->mode != ir_var_out && sig_param->mode != ir_var_inout) {
+ ir->accept(this);
+ }
+ sig_param_iter.next();
+ }
+
+ /* Since we're unlinked, we don't (necessarily) know the side effects of
+ * this call. So kill all copies.
+ */
+ acp->make_empty();
+ this->killed_all = true;
+
+ return visit_continue_with_parent;
+}
+
+void
+ir_copy_propagation_elements_visitor::handle_if_block(exec_list *instructions)
+{
+ exec_list *orig_acp = this->acp;
+ exec_list *orig_kills = this->kills;
+ bool orig_killed_all = this->killed_all;
+
+ this->acp = new(mem_ctx) exec_list;
+ this->kills = new(mem_ctx) exec_list;
+ this->killed_all = false;
+
+ /* Populate the initial acp with a copy of the original */
+ foreach_iter(exec_list_iterator, iter, *orig_acp) {
+ acp_entry *a = (acp_entry *)iter.get();
+ this->acp->push_tail(new(this->mem_ctx) acp_entry(a));
+ }
+
+ visit_list_elements(this, instructions);
+
+ if (this->killed_all) {
+ orig_acp->make_empty();
+ }
+
+ exec_list *new_kills = this->kills;
+ this->kills = orig_kills;
+ this->acp = orig_acp;
+ this->killed_all = this->killed_all || orig_killed_all;
+
+ /* Move the new kills into the parent block's list, removing them
+ * from the parent's ACP list in the process.
+ */
+ foreach_list_safe(node, new_kills) {
+ kill_entry *k = (kill_entry *)node;
+ kill(k);
+ }
+}
+
+ir_visitor_status
+ir_copy_propagation_elements_visitor::visit_enter(ir_if *ir)
+{
+ ir->condition->accept(this);
+
+ handle_if_block(&ir->then_instructions);
+ handle_if_block(&ir->else_instructions);
+
+ /* handle_if_block() already descended into the children. */
+ return visit_continue_with_parent;
+}
+
+ir_visitor_status
+ir_copy_propagation_elements_visitor::visit_enter(ir_loop *ir)
+{
+ exec_list *orig_acp = this->acp;
+ exec_list *orig_kills = this->kills;
+ bool orig_killed_all = this->killed_all;
+
+ /* FINISHME: For now, the initial acp for loops is totally empty.
+ * We could go through once, then go through again with the acp
+ * cloned minus the killed entries after the first run through.
+ */
+ this->acp = new(mem_ctx) exec_list;
+ this->kills = new(mem_ctx) exec_list;
+ this->killed_all = false;
+
+ visit_list_elements(this, &ir->body_instructions);
+
+ if (this->killed_all) {
+ orig_acp->make_empty();
+ }
+
+ exec_list *new_kills = this->kills;
+ this->kills = orig_kills;
+ this->acp = orig_acp;
+ this->killed_all = this->killed_all || orig_killed_all;
+
+ foreach_list_safe(node, new_kills) {
+ kill_entry *k = (kill_entry *)node;
+ kill(k);
+ }
+
+ /* already descended into the children. */
+ return visit_continue_with_parent;
+}
+
+/* Remove any entries currently in the ACP for this kill. */
+void
+ir_copy_propagation_elements_visitor::kill(kill_entry *k)
+{
+ foreach_list_safe(node, acp) {
+ acp_entry *entry = (acp_entry *)node;
+
+ if (entry->lhs == k->var) {
+ entry->write_mask = entry->write_mask & ~k->write_mask;
+ if (entry->write_mask == 0)
+ entry->remove();
+ }
+ if (entry->rhs == k->var) {
+ entry->remove();
+ }
+ }
+
+ /* If we were on a list, remove ourselves before inserting */
+ if (k->next)
+ k->remove();
+
+ this->kills->push_tail(k);
+}
+
+/**
+ * Adds directly-copied channels between vector variables to the available
+ * copy propagation list.
+ */
+void
+ir_copy_propagation_elements_visitor::add_copy(ir_assignment *ir)
+{
+ acp_entry *entry;
+ int orig_swizzle[4] = {0, 1, 2, 3};
+ int swizzle[4];
+
+ if (ir->condition)
+ return;
+
+ ir_dereference_variable *lhs = ir->lhs->as_dereference_variable();
+ if (!lhs || !(lhs->type->is_scalar() || lhs->type->is_vector()))
+ return;
+
+ ir_dereference_variable *rhs = ir->rhs->as_dereference_variable();
+ if (!rhs) {
+ ir_swizzle *swiz = ir->rhs->as_swizzle();
+ if (!swiz)
+ return;
+
+ rhs = swiz->val->as_dereference_variable();
+ if (!rhs)
+ return;
+
+ orig_swizzle[0] = swiz->mask.x;
+ orig_swizzle[1] = swiz->mask.y;
+ orig_swizzle[2] = swiz->mask.z;
+ orig_swizzle[3] = swiz->mask.w;
+ }
+
+ /* Move the swizzle channels out to the positions they match in the
+ * destination. We don't want to have to rewrite the swizzle[]
+ * array every time we clear a bit of the write_mask.
+ */
+ int j = 0;
+ for (int i = 0; i < 4; i++) {
+ if (ir->write_mask & (1 << i))
+ swizzle[i] = orig_swizzle[j++];
+ }
+
+ entry = new(this->mem_ctx) acp_entry(lhs->var, rhs->var, ir->write_mask,
+ swizzle);
+ this->acp->push_tail(entry);
+}
+
+bool
+do_copy_propagation_elements(exec_list *instructions)
+{
+ ir_copy_propagation_elements_visitor v;
+
+ visit_list_elements(&v, instructions);
+
+ return v.progress;
+}
diff --git a/src/glsl/opt_dead_code_local.cpp b/src/glsl/opt_dead_code_local.cpp
index 5689e7d20db..39962bd602e 100644
--- a/src/glsl/opt_dead_code_local.cpp
+++ b/src/glsl/opt_dead_code_local.cpp
@@ -129,15 +129,8 @@ process_assignment(void *ctx, ir_assignment *ir, exec_list *assignments)
var = ir->lhs->variable_referenced();
assert(var);
- bool always_assign = true;
- if (ir->condition) {
- ir_constant *condition = ir->condition->as_constant();
- if (!condition || !condition->value.b[0])
- always_assign = false;
- }
-
/* Now, check if we did a whole-variable assignment. */
- if (always_assign && (ir->whole_variable_written() != NULL)) {
+ if (!ir->condition && (ir->whole_variable_written() != NULL)) {
/* We did a whole-variable assignment. So, any instruction in
* the assignment list with the same LHS is dead.
*/
@@ -190,7 +183,7 @@ dead_code_local_basic_block(ir_instruction *first,
bool *out_progress = (bool *)data;
bool progress = false;
- void *ctx = talloc_new(NULL);
+ void *ctx = ralloc_context(NULL);
/* Safe looping, since process_assignment */
for (ir = first, ir_next = (ir_instruction *)first->next;;
ir = ir_next, ir_next = (ir_instruction *)ir->next) {
@@ -212,7 +205,7 @@ dead_code_local_basic_block(ir_instruction *first,
break;
}
*out_progress = progress;
- talloc_free(ctx);
+ ralloc_free(ctx);
}
/**
diff --git a/src/glsl/opt_dead_functions.cpp b/src/glsl/opt_dead_functions.cpp
index cf91cb6d368..7c64c618c0c 100644
--- a/src/glsl/opt_dead_functions.cpp
+++ b/src/glsl/opt_dead_functions.cpp
@@ -1,109 +1,120 @@
- /*
- * Copyright © 2010 Intel Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- */
-
- /**
- * \file opt_dead_functions.cpp
- *
- * Eliminates unused functions from the linked program.
- */
-
- #include "ir.h"
- #include "ir_visitor.h"
- #include "ir_expression_flattening.h"
- #include "glsl_types.h"
-
- class signature_entry : public exec_node
- {
- public:
- signature_entry(ir_function_signature *sig)
- {
- this->signature = sig;
- this->used = false;
- }
-
- ir_function_signature *signature;
- bool used;
- };
-
- class ir_dead_functions_visitor : public ir_hierarchical_visitor {
- public:
- ir_dead_functions_visitor()
- {
- this->mem_ctx = talloc_new(NULL);
- }
-
- ~ir_dead_functions_visitor()
- {
- talloc_free(this->mem_ctx);
- }
-
- virtual ir_visitor_status visit_enter(ir_function_signature *);
- virtual ir_visitor_status visit_enter(ir_call *);
-
- signature_entry *get_signature_entry(ir_function_signature *var);
-
- bool (*predicate)(ir_instruction *ir);
-
- /* List of signature_entry */
- exec_list signature_list;
- void *mem_ctx;
- };
-
-
- signature_entry *
- ir_dead_functions_visitor::get_signature_entry(ir_function_signature *sig)
- {
- foreach_iter(exec_list_iterator, iter, this->signature_list) {
- signature_entry *entry = (signature_entry *)iter.get();
- if (entry->signature == sig)
- return entry;
- }
-
- signature_entry *entry = new(mem_ctx) signature_entry(sig);
- this->signature_list.push_tail(entry);
- return entry;
- }
-
-
- ir_visitor_status
- ir_dead_functions_visitor::visit_enter(ir_function_signature *ir)
- {
- signature_entry *entry = this->get_signature_entry(ir);
-
- if (strcmp(ir->function_name(), "main") == 0) {
- entry->used = true;
- }
-
- return visit_continue;
- }
-
-
- ir_visitor_status
- ir_dead_functions_visitor::visit_enter(ir_call *ir)
- {
- signature_entry *entry = this->get_signature_entry(ir->get_callee());
-
- entry->used = true;
+/*
+ * Copyright © 2010 Intel Corporation
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+
+/**
+ * \file opt_dead_functions.cpp
+ *
+ * Eliminates unused functions from the linked program.
+ */
+
+#include "ir.h"
+#include "ir_visitor.h"
+#include "ir_expression_flattening.h"
+#include "glsl_types.h"
+
+class signature_entry : public exec_node
+{
+public:
+ signature_entry(ir_function_signature *sig)
+ {
+ this->signature = sig;
+ this->used = false;
+ }
+
+ ir_function_signature *signature;
+ bool used;
+};
+
+class ir_dead_functions_visitor : public ir_hierarchical_visitor {
+public:
+ ir_dead_functions_visitor()
+ {
+ this->mem_ctx = ralloc_context(NULL);
+ this->seen_another_function_signature = false;
+ }
+
+ ~ir_dead_functions_visitor()
+ {
+ ralloc_free(this->mem_ctx);
+ }
+
+ virtual ir_visitor_status visit_enter(ir_function_signature *);
+ virtual ir_visitor_status visit_enter(ir_call *);
+
+ signature_entry *get_signature_entry(ir_function_signature *var);
+
+ bool (*predicate)(ir_instruction *ir);
+
+ bool seen_another_function_signature;
+
+ /* List of signature_entry */
+ exec_list signature_list;
+ void *mem_ctx;
+};
+
+
+signature_entry *
+ir_dead_functions_visitor::get_signature_entry(ir_function_signature *sig)
+{
+ foreach_iter(exec_list_iterator, iter, this->signature_list) {
+ signature_entry *entry = (signature_entry *)iter.get();
+ if (entry->signature == sig)
+ return entry;
+ }
+
+ signature_entry *entry = new(mem_ctx) signature_entry(sig);
+ this->signature_list.push_tail(entry);
+ return entry;
+}
+
+
+ir_visitor_status
+ir_dead_functions_visitor::visit_enter(ir_function_signature *ir)
+{
+ signature_entry *entry = this->get_signature_entry(ir);
+
+ if (strcmp(ir->function_name(), "main") == 0) {
+ entry->used = true;
+ }
+
+ /* If this is the first signature to look at, no need to descend to see
+ * if it has calls to another function signature.
+ */
+ if (!this->seen_another_function_signature) {
+ this->seen_another_function_signature = true;
+ return visit_continue_with_parent;
+ }
+
+ return visit_continue;
+}
+
+
+ir_visitor_status
+ir_dead_functions_visitor::visit_enter(ir_call *ir)
+{
+ signature_entry *entry = this->get_signature_entry(ir->get_callee());
+
+ entry->used = true;
return visit_continue;
}
diff --git a/src/glsl/opt_discard_simplification.cpp b/src/glsl/opt_discard_simplification.cpp
index 0e577c478a9..7c2928d271c 100644
--- a/src/glsl/opt_discard_simplification.cpp
+++ b/src/glsl/opt_discard_simplification.cpp
@@ -95,6 +95,7 @@ public:
ir_visitor_status visit_enter(ir_if *);
ir_visitor_status visit_enter(ir_loop *);
+ ir_visitor_status visit_enter(ir_assignment *);
bool progress;
};
@@ -117,6 +118,15 @@ is_only_instruction(ir_discard *discard)
discard->next->is_tail_sentinel());
}
+/* We only care about the top level instructions, so don't descend
+ * into expressions.
+ */
+ir_visitor_status
+discard_simplifier::visit_enter(ir_assignment *ir)
+{
+ return visit_continue_with_parent;
+}
+
ir_visitor_status
discard_simplifier::visit_enter(ir_if *ir)
{
diff --git a/src/glsl/opt_function_inlining.cpp b/src/glsl/opt_function_inlining.cpp
index 169fd826882..8fef358cc97 100644
--- a/src/glsl/opt_function_inlining.cpp
+++ b/src/glsl/opt_function_inlining.cpp
@@ -89,7 +89,7 @@ do_function_inlining(exec_list *instructions)
static void
replace_return_with_assignment(ir_instruction *ir, void *data)
{
- void *ctx = talloc_parent(ir);
+ void *ctx = ralloc_parent(ir);
ir_variable *retval = (ir_variable *)data;
ir_return *ret = ir->as_return();
@@ -110,7 +110,7 @@ replace_return_with_assignment(ir_instruction *ir, void *data)
ir_rvalue *
ir_call::generate_inline(ir_instruction *next_ir)
{
- void *ctx = talloc_parent(this);
+ void *ctx = ralloc_parent(this);
ir_variable **parameters;
int num_parameters;
int i;
@@ -126,7 +126,7 @@ ir_call::generate_inline(ir_instruction *next_ir)
parameters = new ir_variable *[num_parameters];
/* Generate storage for the return value. */
- if (this->callee->return_type) {
+ if (!this->callee->return_type->is_void()) {
retval = new(ctx) ir_variable(this->callee->return_type, "_ret_val",
ir_var_auto);
next_ir->insert_before(retval);
@@ -165,6 +165,7 @@ ir_call::generate_inline(ir_instruction *next_ir)
/* Move the actual param into our param variable if it's an 'in' type. */
if (parameters[i] && (sig_param->mode == ir_var_in ||
+ sig_param->mode == ir_var_const_in ||
sig_param->mode == ir_var_inout)) {
ir_assignment *assign;
@@ -208,10 +209,7 @@ ir_call::generate_inline(ir_instruction *next_ir)
}
/* Now push those new instructions in. */
- foreach_iter(exec_list_iterator, iter, new_instructions) {
- ir_instruction *ir = (ir_instruction *)iter.get();
- next_ir->insert_before(ir);
- }
+ next_ir->insert_before(&new_instructions);
/* Copy back the value of any 'out' parameters from the function body
* variables to our own.
@@ -357,7 +355,7 @@ ir_sampler_replacement_visitor::replace_deref(ir_dereference **deref)
{
ir_dereference_variable *deref_var = (*deref)->as_dereference_variable();
if (deref_var && deref_var->var == this->sampler) {
- *deref = this->deref->clone(talloc_parent(*deref), NULL);
+ *deref = this->deref->clone(ralloc_parent(*deref), NULL);
}
}
diff --git a/src/glsl/opt_if_simplification.cpp b/src/glsl/opt_if_simplification.cpp
index 618bacfecf1..29b1d18aa59 100644
--- a/src/glsl/opt_if_simplification.cpp
+++ b/src/glsl/opt_if_simplification.cpp
@@ -38,10 +38,20 @@ public:
}
ir_visitor_status visit_leave(ir_if *);
+ ir_visitor_status visit_enter(ir_assignment *);
bool made_progress;
};
+/* We only care about the top level "if" instructions, so don't
+ * descend into expressions.
+ */
+ir_visitor_status
+ir_if_simplification_visitor::visit_enter(ir_assignment *ir)
+{
+ return visit_continue_with_parent;
+}
+
bool
do_if_simplification(exec_list *instructions)
{
diff --git a/src/glsl/opt_redundant_jumps.cpp b/src/glsl/opt_redundant_jumps.cpp
index edf4bb6c224..f350fa947c9 100644
--- a/src/glsl/opt_redundant_jumps.cpp
+++ b/src/glsl/opt_redundant_jumps.cpp
@@ -37,10 +37,19 @@ public:
virtual ir_visitor_status visit_leave(ir_if *);
virtual ir_visitor_status visit_leave(ir_loop *);
+ virtual ir_visitor_status visit_enter(ir_assignment *);
bool progress;
};
+/* We only care about the top level instructions, so don't descend
+ * into expressions.
+ */
+ir_visitor_status
+redundant_jumps_visitor::visit_enter(ir_assignment *ir)
+{
+ return visit_continue_with_parent;
+}
ir_visitor_status
redundant_jumps_visitor::visit_leave(ir_if *ir)
diff --git a/src/glsl/opt_structure_splitting.cpp b/src/glsl/opt_structure_splitting.cpp
index d6191002c2f..2c1f6bb227a 100644
--- a/src/glsl/opt_structure_splitting.cpp
+++ b/src/glsl/opt_structure_splitting.cpp
@@ -65,7 +65,7 @@ public:
ir_variable **components;
- /** talloc_parent(this->var) -- the shader's talloc context. */
+ /** ralloc_parent(this->var) -- the shader's ralloc context. */
void *mem_ctx;
};
@@ -74,13 +74,13 @@ class ir_structure_reference_visitor : public ir_hierarchical_visitor {
public:
ir_structure_reference_visitor(void)
{
- this->mem_ctx = talloc_new(NULL);
+ this->mem_ctx = ralloc_context(NULL);
this->variable_list.make_empty();
}
~ir_structure_reference_visitor(void)
{
- talloc_free(mem_ctx);
+ ralloc_free(mem_ctx);
}
virtual ir_visitor_status visit(ir_variable *);
@@ -151,6 +151,12 @@ ir_structure_reference_visitor::visit_enter(ir_dereference_record *ir)
ir_visitor_status
ir_structure_reference_visitor::visit_enter(ir_assignment *ir)
{
+ /* If there are no structure references yet, no need to bother with
+ * processing the expression tree.
+ */
+ if (this->variable_list.is_empty())
+ return visit_continue_with_parent;
+
if (ir->lhs->as_dereference_variable() &&
ir->rhs->as_dereference_variable() &&
!ir->condition) {
@@ -322,7 +328,7 @@ do_structure_splitting(exec_list *instructions)
if (refs.variable_list.is_empty())
return false;
- void *mem_ctx = talloc_new(NULL);
+ void *mem_ctx = ralloc_context(NULL);
/* Replace the decls of the structures to be split with their split
* components.
@@ -331,14 +337,14 @@ do_structure_splitting(exec_list *instructions)
variable_entry2 *entry = (variable_entry2 *)iter.get();
const struct glsl_type *type = entry->var->type;
- entry->mem_ctx = talloc_parent(entry->var);
+ entry->mem_ctx = ralloc_parent(entry->var);
- entry->components = talloc_array(mem_ctx,
+ entry->components = ralloc_array(mem_ctx,
ir_variable *,
type->length);
for (unsigned int i = 0; i < entry->var->type->length; i++) {
- const char *name = talloc_asprintf(mem_ctx, "%s_%s",
+ const char *name = ralloc_asprintf(mem_ctx, "%s_%s",
entry->var->name,
type->fields.structure[i].name);
@@ -355,7 +361,7 @@ do_structure_splitting(exec_list *instructions)
ir_structure_splitting_visitor split(&refs.variable_list);
visit_list_elements(&split, instructions);
- talloc_free(mem_ctx);
+ ralloc_free(mem_ctx);
return true;
}
diff --git a/src/glsl/opt_tree_grafting.cpp b/src/glsl/opt_tree_grafting.cpp
index 9917c045b1d..1ef940f9c72 100644
--- a/src/glsl/opt_tree_grafting.cpp
+++ b/src/glsl/opt_tree_grafting.cpp
@@ -195,7 +195,7 @@ ir_tree_grafting_visitor::visit_enter(ir_call *ir)
ir_rvalue *ir = (ir_rvalue *)iter.get();
ir_rvalue *new_ir = ir;
- if (sig_param->mode != ir_var_in)
+ if (sig_param->mode != ir_var_in && sig_param->mode != ir_var_const_in)
continue;
if (do_graft(&new_ir)) {
@@ -245,6 +245,7 @@ ir_tree_grafting_visitor::visit_enter(ir_texture *ir)
{
if (do_graft(&ir->coordinate) ||
do_graft(&ir->projector) ||
+ do_graft(&ir->offset) ||
do_graft(&ir->shadow_comparitor))
return visit_stop;
diff --git a/src/glsl/ralloc.c b/src/glsl/ralloc.c
new file mode 100644
index 00000000000..757ab5c76b5
--- /dev/null
+++ b/src/glsl/ralloc.c
@@ -0,0 +1,462 @@
+/*
+ * Copyright © 2010 Intel Corporation
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+
+#include <assert.h>
+#include <stdlib.h>
+#include <stdarg.h>
+#include <stdio.h>
+#include <string.h>
+#include <stdint.h>
+
+#include "ralloc.h"
+
+#ifdef __GNUC__
+#define likely(x) __builtin_expect(!!(x),1)
+#define unlikely(x) __builtin_expect(!!(x),0)
+#else
+#define likely(x) !!(x)
+#define unlikely(x) !!(x)
+#endif
+
+#ifndef va_copy
+#ifdef __va_copy
+#define va_copy(dest, src) __va_copy((dest), (src))
+#else
+#define va_copy(dest, src) (dest) = (src)
+#endif
+#endif
+
+#ifdef ANDROID
+#define SIZE_MAX UINT32_MAX
+#endif
+
+#define CANARY 0x5A1106
+
+struct ralloc_header
+{
+ /* A canary value used to determine whether a pointer is ralloc'd. */
+ unsigned canary;
+
+ struct ralloc_header *parent;
+
+ /* The first child (head of a linked list) */
+ struct ralloc_header *child;
+
+ /* Linked list of siblings */
+ struct ralloc_header *prev;
+ struct ralloc_header *next;
+
+ void (*destructor)(void *);
+};
+
+typedef struct ralloc_header ralloc_header;
+
+static void unlink_block(ralloc_header *info);
+static void unsafe_free(ralloc_header *info);
+
+static ralloc_header *
+get_header(const void *ptr)
+{
+ ralloc_header *info = (ralloc_header *) (((char *) ptr) -
+ sizeof(ralloc_header));
+ assert(info->canary == CANARY);
+ return info;
+}
+
+#define PTR_FROM_HEADER(info) (((char *) info) + sizeof(ralloc_header))
+
+static void
+add_child(ralloc_header *parent, ralloc_header *info)
+{
+ if (parent != NULL) {
+ info->parent = parent;
+ info->next = parent->child;
+ parent->child = info;
+
+ if (info->next != NULL)
+ info->next->prev = info;
+ }
+}
+
+void *
+ralloc_context(const void *ctx)
+{
+ return ralloc_size(ctx, 0);
+}
+
+void *
+ralloc_size(const void *ctx, size_t size)
+{
+ void *block = calloc(1, size + sizeof(ralloc_header));
+
+ ralloc_header *info = (ralloc_header *) block;
+ ralloc_header *parent = ctx != NULL ? get_header(ctx) : NULL;
+
+ add_child(parent, info);
+
+ info->canary = CANARY;
+
+ return PTR_FROM_HEADER(info);
+}
+
+void *
+rzalloc_size(const void *ctx, size_t size)
+{
+ void *ptr = ralloc_size(ctx, size);
+ if (likely(ptr != NULL))
+ memset(ptr, 0, size);
+ return ptr;
+}
+
+/* helper function - assumes ptr != NULL */
+static void *
+resize(void *ptr, size_t size)
+{
+ ralloc_header *child, *old, *info;
+
+ old = get_header(ptr);
+ info = realloc(old, size + sizeof(ralloc_header));
+
+ if (info == NULL)
+ return NULL;
+
+ /* Update parent and sibling's links to the reallocated node. */
+ if (info != old && info->parent != NULL) {
+ if (info->parent->child == old)
+ info->parent->child = info;
+
+ if (info->prev != NULL)
+ info->prev->next = info;
+
+ if (info->next != NULL)
+ info->next->prev = info;
+ }
+
+ /* Update child->parent links for all children */
+ for (child = info->child; child != NULL; child = child->next)
+ child->parent = info;
+
+ return PTR_FROM_HEADER(info);
+}
+
+void *
+reralloc_size(const void *ctx, void *ptr, size_t size)
+{
+ if (unlikely(ptr == NULL))
+ return ralloc_size(ctx, size);
+
+ assert(ralloc_parent(ptr) == ctx);
+ return resize(ptr, size);
+}
+
+void *
+ralloc_array_size(const void *ctx, size_t size, unsigned count)
+{
+ if (count > SIZE_MAX/size)
+ return NULL;
+
+ return ralloc_size(ctx, size * count);
+}
+
+void *
+rzalloc_array_size(const void *ctx, size_t size, unsigned count)
+{
+ if (count > SIZE_MAX/size)
+ return NULL;
+
+ return rzalloc_size(ctx, size * count);
+}
+
+void *
+reralloc_array_size(const void *ctx, void *ptr, size_t size, unsigned count)
+{
+ if (count > SIZE_MAX/size)
+ return NULL;
+
+ return reralloc_size(ctx, ptr, size * count);
+}
+
+void
+ralloc_free(void *ptr)
+{
+ ralloc_header *info;
+
+ if (ptr == NULL)
+ return;
+
+ info = get_header(ptr);
+ unlink_block(info);
+ unsafe_free(info);
+}
+
+static void
+unlink_block(ralloc_header *info)
+{
+ /* Unlink from parent & siblings */
+ if (info->parent != NULL) {
+ if (info->parent->child == info)
+ info->parent->child = info->next;
+
+ if (info->prev != NULL)
+ info->prev->next = info->next;
+
+ if (info->next != NULL)
+ info->next->prev = info->prev;
+ }
+ info->parent = NULL;
+ info->prev = NULL;
+ info->next = NULL;
+}
+
+static void
+unsafe_free(ralloc_header *info)
+{
+ /* Recursively free any children...don't waste time unlinking them. */
+ ralloc_header *temp;
+ while (info->child != NULL) {
+ temp = info->child;
+ info->child = temp->next;
+ unsafe_free(temp);
+ }
+
+ /* Free the block itself. Call the destructor first, if any. */
+ if (info->destructor != NULL)
+ info->destructor(PTR_FROM_HEADER(info));
+
+ free(info);
+}
+
+void
+ralloc_steal(const void *new_ctx, void *ptr)
+{
+ ralloc_header *info, *parent;
+
+ if (unlikely(ptr == NULL))
+ return;
+
+ info = get_header(ptr);
+ parent = get_header(new_ctx);
+
+ unlink_block(info);
+
+ add_child(parent, info);
+}
+
+void *
+ralloc_parent(const void *ptr)
+{
+ ralloc_header *info;
+
+ if (unlikely(ptr == NULL))
+ return NULL;
+
+ info = get_header(ptr);
+ return PTR_FROM_HEADER(info->parent);
+}
+
+static void *autofree_context = NULL;
+
+static void
+autofree(void)
+{
+ ralloc_free(autofree_context);
+}
+
+void *
+ralloc_autofree_context(void)
+{
+ if (unlikely(autofree_context == NULL)) {
+ autofree_context = ralloc_context(NULL);
+ atexit(autofree);
+ }
+ return autofree_context;
+}
+
+void
+ralloc_set_destructor(const void *ptr, void(*destructor)(void *))
+{
+ ralloc_header *info = get_header(ptr);
+ info->destructor = destructor;
+}
+
+char *
+ralloc_strdup(const void *ctx, const char *str)
+{
+ size_t n;
+ char *ptr;
+
+ if (unlikely(str == NULL))
+ return NULL;
+
+ n = strlen(str);
+ ptr = ralloc_array(ctx, char, n + 1);
+ memcpy(ptr, str, n);
+ ptr[n] = '\0';
+ return ptr;
+}
+
+char *
+ralloc_strndup(const void *ctx, const char *str, size_t max)
+{
+ size_t n;
+ char *ptr;
+
+ if (unlikely(str == NULL))
+ return NULL;
+
+ n = strlen(str);
+ if (n > max)
+ n = max;
+
+ ptr = ralloc_array(ctx, char, n + 1);
+ memcpy(ptr, str, n);
+ ptr[n] = '\0';
+ return ptr;
+}
+
+/* helper routine for strcat/strncat - n is the exact amount to copy */
+static bool
+cat(char **dest, const char *str, size_t n)
+{
+ char *both;
+ size_t existing_length;
+ assert(dest != NULL && *dest != NULL);
+
+ existing_length = strlen(*dest);
+ both = resize(*dest, existing_length + n + 1);
+ if (unlikely(both == NULL))
+ return false;
+
+ memcpy(both + existing_length, str, n);
+ both[existing_length + n] = '\0';
+
+ *dest = both;
+ return true;
+}
+
+
+bool
+ralloc_strcat(char **dest, const char *str)
+{
+ return cat(dest, str, strlen(str));
+}
+
+bool
+ralloc_strncat(char **dest, const char *str, size_t n)
+{
+ /* Clamp n to the string length */
+ size_t str_length = strlen(str);
+ if (str_length < n)
+ n = str_length;
+
+ return cat(dest, str, n);
+}
+
+char *
+ralloc_asprintf(const void *ctx, const char *fmt, ...)
+{
+ char *ptr;
+ va_list args;
+ va_start(args, fmt);
+ ptr = ralloc_vasprintf(ctx, fmt, args);
+ va_end(args);
+ return ptr;
+}
+
+/* Return the length of the string that would be generated by a printf-style
+ * format and argument list, not including the \0 byte.
+ */
+static size_t
+printf_length(const char *fmt, va_list untouched_args)
+{
+ int size;
+ char junk;
+
+ /* Make a copy of the va_list so the original caller can still use it */
+ va_list args;
+ va_copy(args, untouched_args);
+
+#ifdef _MSC_VER
+ /* We need to use _vcsprintf to calculate the size as vsnprintf returns -1
+ * if the number of characters to write is greater than count.
+ */
+ size = _vscprintf(fmt, args);
+ (void)junk;
+#else
+ size = vsnprintf(&junk, 1, fmt, args);
+#endif
+ assert(size >= 0);
+
+ va_end(args);
+
+ return size;
+}
+
+char *
+ralloc_vasprintf(const void *ctx, const char *fmt, va_list args)
+{
+ size_t size = printf_length(fmt, args) + 1;
+
+ char *ptr = ralloc_size(ctx, size);
+ if (ptr != NULL)
+ vsnprintf(ptr, size, fmt, args);
+
+ return ptr;
+}
+
+bool
+ralloc_asprintf_append(char **str, const char *fmt, ...)
+{
+ bool success;
+ va_list args;
+ va_start(args, fmt);
+ success = ralloc_vasprintf_append(str, fmt, args);
+ va_end(args);
+ return success;
+}
+
+bool
+ralloc_vasprintf_append(char **str, const char *fmt, va_list args)
+{
+ size_t existing_length, new_length;
+ char *ptr;
+
+ assert(str != NULL);
+
+ if (unlikely(*str == NULL)) {
+ // Assuming a NULL context is probably bad, but it's expected behavior.
+ *str = ralloc_vasprintf(NULL, fmt, args);
+ return true;
+ }
+
+ existing_length = strlen(*str);
+ new_length = printf_length(fmt, args);
+
+ ptr = resize(*str, existing_length + new_length + 1);
+ if (unlikely(ptr == NULL))
+ return false;
+
+ vsnprintf(ptr + existing_length, new_length + 1, fmt, args);
+ *str = ptr;
+ return true;
+}
diff --git a/src/glsl/ralloc.h b/src/glsl/ralloc.h
new file mode 100644
index 00000000000..d5338152f10
--- /dev/null
+++ b/src/glsl/ralloc.h
@@ -0,0 +1,345 @@
+/*
+ * Copyright © 2010 Intel Corporation
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+
+/**
+ * \file ralloc.h
+ *
+ * ralloc: a recursive memory allocator
+ *
+ * The ralloc memory allocator creates a hierarchy of allocated
+ * objects. Every allocation is in reference to some parent, and
+ * every allocated object can in turn be used as the parent of a
+ * subsequent allocation. This allows for extremely convenient
+ * discarding of an entire tree/sub-tree of allocations by calling
+ * ralloc_free on any particular object to free it and all of its
+ * children.
+ *
+ * The conceptual working of ralloc was directly inspired by Andrew
+ * Tridgell's talloc, but ralloc is an independent implementation
+ * released under the MIT license and tuned for Mesa.
+ *
+ * The talloc implementation is available under the GNU Lesser
+ * General Public License (GNU LGPL), version 3 or later. It is
+ * more sophisticated than ralloc in that it includes reference
+ * counting and debugging features. See: http://talloc.samba.org/
+ */
+
+#ifndef RALLOC_H
+#define RALLOC_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <stddef.h>
+#include <stdarg.h>
+#include <stdbool.h>
+
+/**
+ * \def ralloc(ctx, type)
+ * Allocate a new object chained off of the given context.
+ *
+ * This is equivalent to:
+ * \code
+ * ((type *) ralloc_size(ctx, sizeof(type))
+ * \endcode
+ */
+#define ralloc(ctx, type) ((type *) ralloc_size(ctx, sizeof(type)))
+
+/**
+ * \def rzalloc(ctx, type)
+ * Allocate a new object out of the given context and initialize it to zero.
+ *
+ * This is equivalent to:
+ * \code
+ * ((type *) rzalloc_size(ctx, sizeof(type))
+ * \endcode
+ */
+#define rzalloc(ctx, type) ((type *) rzalloc_size(ctx, sizeof(type)))
+
+/**
+ * Allocate a new ralloc context.
+ *
+ * While any ralloc'd pointer can be used as a context, sometimes it is useful
+ * to simply allocate a context with no associated memory.
+ *
+ * It is equivalent to:
+ * \code
+ * ((type *) ralloc_size(ctx, 0)
+ * \endcode
+ */
+void *ralloc_context(const void *ctx);
+
+/**
+ * Allocate memory chained off of the given context.
+ *
+ * This is the core allocation routine which is used by all others. It
+ * simply allocates storage for \p size bytes and returns the pointer,
+ * similar to \c malloc.
+ */
+void *ralloc_size(const void *ctx, size_t size);
+
+/**
+ * Allocate zero-initialized memory chained off of the given context.
+ *
+ * This is similar to \c calloc with a size of 1.
+ */
+void *rzalloc_size(const void *ctx, size_t size);
+
+/**
+ * Resize a piece of ralloc-managed memory, preserving data.
+ *
+ * Similar to \c realloc. Unlike C89, passing 0 for \p size does not free the
+ * memory. Instead, it resizes it to a 0-byte ralloc context, just like
+ * calling ralloc_size(ctx, 0). This is different from talloc.
+ *
+ * \param ctx The context to use for new allocation. If \p ptr != NULL,
+ * it must be the same as ralloc_parent(\p ptr).
+ * \param ptr Pointer to the memory to be resized. May be NULL.
+ * \param size The amount of memory to allocate, in bytes.
+ */
+void *reralloc_size(const void *ctx, void *ptr, size_t size);
+
+/// \defgroup array Array Allocators @{
+
+/**
+ * \def ralloc_array(ctx, type, count)
+ * Allocate an array of objects chained off the given context.
+ *
+ * Similar to \c calloc, but does not initialize the memory to zero.
+ *
+ * More than a convenience function, this also checks for integer overflow when
+ * multiplying \c sizeof(type) and \p count. This is necessary for security.
+ *
+ * This is equivalent to:
+ * \code
+ * ((type *) ralloc_array_size(ctx, sizeof(type), count)
+ * \endcode
+ */
+#define ralloc_array(ctx, type, count) \
+ ((type *) ralloc_array_size(ctx, sizeof(type), count))
+
+/**
+ * \def rzalloc_array(ctx, type, count)
+ * Allocate a zero-initialized array chained off the given context.
+ *
+ * Similar to \c calloc.
+ *
+ * More than a convenience function, this also checks for integer overflow when
+ * multiplying \c sizeof(type) and \p count. This is necessary for security.
+ *
+ * This is equivalent to:
+ * \code
+ * ((type *) rzalloc_array_size(ctx, sizeof(type), count)
+ * \endcode
+ */
+#define rzalloc_array(ctx, type, count) \
+ ((type *) rzalloc_array_size(ctx, sizeof(type), count))
+
+/**
+ * \def reralloc(ctx, ptr, type, count)
+ * Resize a ralloc-managed array, preserving data.
+ *
+ * Similar to \c realloc. Unlike C89, passing 0 for \p size does not free the
+ * memory. Instead, it resizes it to a 0-byte ralloc context, just like
+ * calling ralloc_size(ctx, 0). This is different from talloc.
+ *
+ * More than a convenience function, this also checks for integer overflow when
+ * multiplying \c sizeof(type) and \p count. This is necessary for security.
+ *
+ * \param ctx The context to use for new allocation. If \p ptr != NULL,
+ * it must be the same as ralloc_parent(\p ptr).
+ * \param ptr Pointer to the array to be resized. May be NULL.
+ * \param type The element type.
+ * \param count The number of elements to allocate.
+ */
+#define reralloc(ctx, ptr, type, count) \
+ ((type *) reralloc_array_size(ctx, ptr, sizeof(type), count))
+
+/**
+ * Allocate memory for an array chained off the given context.
+ *
+ * Similar to \c calloc, but does not initialize the memory to zero.
+ *
+ * More than a convenience function, this also checks for integer overflow when
+ * multiplying \p size and \p count. This is necessary for security.
+ */
+void *ralloc_array_size(const void *ctx, size_t size, unsigned count);
+
+/**
+ * Allocate a zero-initialized array chained off the given context.
+ *
+ * Similar to \c calloc.
+ *
+ * More than a convenience function, this also checks for integer overflow when
+ * multiplying \p size and \p count. This is necessary for security.
+ */
+void *rzalloc_array_size(const void *ctx, size_t size, unsigned count);
+
+/**
+ * Resize a ralloc-managed array, preserving data.
+ *
+ * Similar to \c realloc. Unlike C89, passing 0 for \p size does not free the
+ * memory. Instead, it resizes it to a 0-byte ralloc context, just like
+ * calling ralloc_size(ctx, 0). This is different from talloc.
+ *
+ * More than a convenience function, this also checks for integer overflow when
+ * multiplying \c sizeof(type) and \p count. This is necessary for security.
+ *
+ * \param ctx The context to use for new allocation. If \p ptr != NULL,
+ * it must be the same as ralloc_parent(\p ptr).
+ * \param ptr Pointer to the array to be resized. May be NULL.
+ * \param size The size of an individual element.
+ * \param count The number of elements to allocate.
+ *
+ * \return True unless allocation failed.
+ */
+void *reralloc_array_size(const void *ctx, void *ptr, size_t size,
+ unsigned count);
+/// @}
+
+/**
+ * Free a piece of ralloc-managed memory.
+ *
+ * This will also free the memory of any children allocated this context.
+ */
+void ralloc_free(void *ptr);
+
+/**
+ * "Steal" memory from one context, changing it to another.
+ *
+ * This changes \p ptr's context to \p new_ctx. This is quite useful if
+ * memory is allocated out of a temporary context.
+ */
+void ralloc_steal(const void *new_ctx, void *ptr);
+
+/**
+ * Return the given pointer's ralloc context.
+ */
+void *ralloc_parent(const void *ptr);
+
+/**
+ * Return a context whose memory will be automatically freed at program exit.
+ *
+ * The first call to this function creates a context and registers a handler
+ * to free it using \c atexit. This may cause trouble if used in a library
+ * loaded with \c dlopen.
+ */
+void *ralloc_autofree_context(void);
+
+/**
+ * Set a callback to occur just before an object is freed.
+ */
+void ralloc_set_destructor(const void *ptr, void(*destructor)(void *));
+
+/// \defgroup array String Functions @{
+/**
+ * Duplicate a string, allocating the memory from the given context.
+ */
+char *ralloc_strdup(const void *ctx, const char *str);
+
+/**
+ * Duplicate a string, allocating the memory from the given context.
+ *
+ * Like \c strndup, at most \p n characters are copied. If \p str is longer
+ * than \p n characters, \p n are copied, and a termining \c '\0' byte is added.
+ */
+char *ralloc_strndup(const void *ctx, const char *str, size_t n);
+
+/**
+ * Concatenate two strings, allocating the necessary space.
+ *
+ * This appends \p str to \p *dest, similar to \c strcat, using ralloc_resize
+ * to expand \p *dest to the appropriate size. \p dest will be updated to the
+ * new pointer unless allocation fails.
+ *
+ * The result will always be null-terminated.
+ *
+ * \return True unless allocation failed.
+ */
+bool ralloc_strcat(char **dest, const char *str);
+
+/**
+ * Concatenate two strings, allocating the necessary space.
+ *
+ * This appends at most \p n bytes of \p str to \p *dest, using ralloc_resize
+ * to expand \p *dest to the appropriate size. \p dest will be updated to the
+ * new pointer unless allocation fails.
+ *
+ * The result will always be null-terminated; \p str does not need to be null
+ * terminated if it is longer than \p n.
+ *
+ * \return True unless allocation failed.
+ */
+bool ralloc_strncat(char **dest, const char *str, size_t n);
+
+/**
+ * Print to a string.
+ *
+ * This is analogous to \c sprintf, but allocates enough space (using \p ctx
+ * as the context) for the resulting string.
+ *
+ * \return The newly allocated string.
+ */
+char *ralloc_asprintf (const void *ctx, const char *fmt, ...);
+
+/**
+ * Print to a string, given a va_list.
+ *
+ * This is analogous to \c vsprintf, but allocates enough space (using \p ctx
+ * as the context) for the resulting string.
+ *
+ * \return The newly allocated string.
+ */
+char *ralloc_vasprintf(const void *ctx, const char *fmt, va_list args);
+
+/**
+ * Append formatted text to the supplied string.
+ *
+ * \sa ralloc_asprintf
+ * \sa ralloc_strcat
+ *
+ * \p str will be updated to the new pointer unless allocation fails.
+ *
+ * \return True unless allocation failed.
+ */
+bool ralloc_asprintf_append (char **str, const char *fmt, ...);
+
+/**
+ * Append formatted text to the supplied string, given a va_list.
+ *
+ * \sa ralloc_vasprintf
+ * \sa ralloc_strcat
+ *
+ * \p str will be updated to the new pointer unless allocation fails.
+ *
+ * \return True unless allocation failed.
+ */
+bool ralloc_vasprintf_append(char **str, const char *fmt, va_list args);
+/// @}
+
+#ifdef __cplusplus
+} /* end of extern "C" */
+#endif
+
+#endif
diff --git a/src/glsl/s_expression.cpp b/src/glsl/s_expression.cpp
index 4c8829fea9a..a922a50d3b9 100644
--- a/src/glsl/s_expression.cpp
+++ b/src/glsl/s_expression.cpp
@@ -22,15 +22,12 @@
* DEALINGS IN THE SOFTWARE.
*/
-#include <cstdio>
-#include <cstdlib>
-#include <cstring>
#include <assert.h>
#include "s_expression.h"
s_symbol::s_symbol(const char *tmp, size_t n)
{
- this->str = talloc_strndup (this, tmp, n);
+ this->str = ralloc_strndup (this, tmp, n);
assert(this->str != NULL);
}
@@ -38,14 +35,15 @@ s_list::s_list()
{
}
-unsigned
-s_list::length() const
+static void
+skip_whitespace(const char *& src)
{
- unsigned i = 0;
- foreach_iter(exec_list_iterator, it, this->subexpressions) {
- i++;
+ src += strspn(src, " \v\t\r\n");
+ /* Also skip Scheme-style comments: semi-colon 'til end of line */
+ if (src[0] == ';') {
+ src += strcspn(src, "\n");
+ skip_whitespace(src);
}
- return i;
}
static s_expression *
@@ -53,16 +51,15 @@ read_atom(void *ctx, const char *& src)
{
s_expression *expr = NULL;
- // Skip leading spaces.
- src += strspn(src, " \v\t\r\n");
+ skip_whitespace(src);
- size_t n = strcspn(src, "( \v\t\r\n)");
+ size_t n = strcspn(src, "( \v\t\r\n);");
if (n == 0)
return NULL; // no atom
// Check if the atom is a number.
char *float_end = NULL;
- double f = strtod(src, &float_end);
+ double f = glsl_strtod(src, &float_end);
if (float_end != src) {
char *int_end = NULL;
int i = strtol(src, &int_end, 10);
@@ -90,8 +87,7 @@ s_expression::read_expression(void *ctx, const char *&src)
if (atom != NULL)
return atom;
- // Skip leading spaces.
- src += strspn(src, " \v\t\r\n");
+ skip_whitespace(src);
if (src[0] == '(') {
++src;
@@ -101,7 +97,7 @@ s_expression::read_expression(void *ctx, const char *&src)
while ((expr = read_expression(ctx, src)) != NULL) {
list->subexpressions.push_tail(expr);
}
- src += strspn(src, " \v\t\r\n");
+ skip_whitespace(src);
if (src[0] != ')') {
printf("Unclosed expression (check your parenthesis).\n");
return NULL;
@@ -139,3 +135,49 @@ void s_list::print()
printf(")");
}
+// --------------------------------------------------
+
+bool
+s_pattern::match(s_expression *expr)
+{
+ switch (type)
+ {
+ case EXPR: *p_expr = expr; break;
+ case LIST: if (expr->is_list()) *p_list = (s_list *) expr; break;
+ case SYMBOL: if (expr->is_symbol()) *p_symbol = (s_symbol *) expr; break;
+ case NUMBER: if (expr->is_number()) *p_number = (s_number *) expr; break;
+ case INT: if (expr->is_int()) *p_int = (s_int *) expr; break;
+ case STRING:
+ s_symbol *sym = SX_AS_SYMBOL(expr);
+ if (sym != NULL && strcmp(sym->value(), literal) == 0)
+ return true;
+ return false;
+ };
+
+ return *p_expr == expr;
+}
+
+bool
+s_match(s_expression *top, unsigned n, s_pattern *pattern, bool partial)
+{
+ s_list *list = SX_AS_LIST(top);
+ if (list == NULL)
+ return false;
+
+ unsigned i = 0;
+ foreach_iter(exec_list_iterator, it, list->subexpressions) {
+ if (i >= n)
+ return partial; /* More actual items than the pattern expected */
+
+ s_expression *expr = (s_expression *) it.get();
+ if (expr == NULL || !pattern[i].match(expr))
+ return false;
+
+ i++;
+ }
+
+ if (i < n)
+ return false; /* Less actual items than the pattern expected */
+
+ return true;
+}
diff --git a/src/glsl/s_expression.h b/src/glsl/s_expression.h
index aa22475a1bf..c9dc676b319 100644
--- a/src/glsl/s_expression.h
+++ b/src/glsl/s_expression.h
@@ -26,8 +26,11 @@
#ifndef S_EXPRESSION_H
#define S_EXPRESSION_H
+#include "main/core.h" /* for Elements */
+#include "strtod.h"
#include "list.h"
+/* Type-safe downcasting macros (also safe to pass NULL) */
#define SX_AS_(t,x) ((x) && ((s_expression*) x)->is_##t()) ? ((s_##t*) (x)) \
: NULL
#define SX_AS_LIST(x) SX_AS_(list, x)
@@ -35,6 +38,10 @@
#define SX_AS_NUMBER(x) SX_AS_(number, x)
#define SX_AS_INT(x) SX_AS_(int, x)
+/* Pattern matching macros */
+#define MATCH(list, pat) s_match(list, Elements(pat), pat, false)
+#define PARTIAL_MATCH(list, pat) s_match(list, Elements(pat), pat, true)
+
/* For our purposes, S-Expressions are:
* - <int>
* - <float>
@@ -50,7 +57,7 @@ public:
* Read an S-Expression from the given string.
* Advances the supplied pointer to just after the expression read.
*
- * Any allocation will be performed with 'ctx' as the talloc owner.
+ * Any allocation will be performed with 'ctx' as the ralloc owner.
*/
static s_expression *read_expression(void *ctx, const char *&src);
@@ -132,11 +139,42 @@ public:
s_list();
virtual bool is_list() const { return true; }
- unsigned length() const;
void print();
exec_list subexpressions;
};
+// ------------------------------------------------------------
+
+/**
+ * Part of a pattern to match - essentially a record holding a pointer to the
+ * storage for the component to match, along with the appropriate type.
+ */
+class s_pattern {
+public:
+ s_pattern(s_expression *&s) : p_expr(&s), type(EXPR) { }
+ s_pattern(s_list *&s) : p_list(&s), type(LIST) { }
+ s_pattern(s_symbol *&s) : p_symbol(&s), type(SYMBOL) { }
+ s_pattern(s_number *&s) : p_number(&s), type(NUMBER) { }
+ s_pattern(s_int *&s) : p_int(&s), type(INT) { }
+ s_pattern(const char *str) : literal(str), type(STRING) { }
+
+ bool match(s_expression *expr);
+
+private:
+ union {
+ s_expression **p_expr;
+ s_list **p_list;
+ s_symbol **p_symbol;
+ s_number **p_number;
+ s_int **p_int;
+ const char *literal;
+ };
+ enum { EXPR, LIST, SYMBOL, NUMBER, INT, STRING } type;
+};
+
+bool
+s_match(s_expression *top, unsigned n, s_pattern *pattern, bool partial);
+
#endif /* S_EXPRESSION_H */
diff --git a/src/glsl/strtod.c b/src/glsl/strtod.c
new file mode 100644
index 00000000000..ff34591488c
--- /dev/null
+++ b/src/glsl/strtod.c
@@ -0,0 +1,56 @@
+/*
+ * Copyright 2010 VMware, Inc.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+
+#include <stdlib.h>
+
+#ifdef _GNU_SOURCE
+#include <locale.h>
+#ifdef __APPLE__
+#include <xlocale.h>
+#endif
+#endif
+
+#include "strtod.h"
+
+
+
+/**
+ * Wrapper around strtod which uses the "C" locale so the decimal
+ * point is always '.'
+ */
+double
+glsl_strtod(const char *s, char **end)
+{
+#if defined(_GNU_SOURCE) && !defined(__CYGWIN__) && !defined(__FreeBSD__)
+ static locale_t loc = NULL;
+ if (!loc) {
+ loc = newlocale(LC_CTYPE_MASK, "C", NULL);
+ }
+ return strtod_l(s, end, loc);
+#else
+ return strtod(s, end);
+#endif
+}
diff --git a/src/glsl/strtod.h b/src/glsl/strtod.h
new file mode 100644
index 00000000000..0cf6409d425
--- /dev/null
+++ b/src/glsl/strtod.h
@@ -0,0 +1,43 @@
+/*
+ * Copyright 2010 VMware, Inc.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+
+#ifndef STRTOD_H
+#define STRTOD_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+extern double
+glsl_strtod(const char *s, char **end);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif
diff --git a/src/glsl/tests/array-01.glsl b/src/glsl/tests/array-01.glsl
deleted file mode 100644
index d14135fb3a8..00000000000
--- a/src/glsl/tests/array-01.glsl
+++ /dev/null
@@ -1,3 +0,0 @@
-#version 120
-/* FAIL - array size type must be int */
-uniform vec4 [3.2] a;
diff --git a/src/glsl/tests/array-02.glsl b/src/glsl/tests/array-02.glsl
deleted file mode 100644
index d743617158d..00000000000
--- a/src/glsl/tests/array-02.glsl
+++ /dev/null
@@ -1,3 +0,0 @@
-#version 120
-/* FAIL - array size type must be scalar */
-uniform vec4 [ivec4(3)] a;
diff --git a/src/glsl/tests/array-03.glsl b/src/glsl/tests/array-03.glsl
deleted file mode 100644
index 0026913f019..00000000000
--- a/src/glsl/tests/array-03.glsl
+++ /dev/null
@@ -1,3 +0,0 @@
-#version 120
-/* PASS */
-uniform vec4 [3] a;
diff --git a/src/glsl/tests/array-04.glsl b/src/glsl/tests/array-04.glsl
deleted file mode 100644
index 70f434d8ab6..00000000000
--- a/src/glsl/tests/array-04.glsl
+++ /dev/null
@@ -1,2 +0,0 @@
-/* FAIL - array size type must be int */
-uniform vec4 a[3.2];
diff --git a/src/glsl/tests/array-05.glsl b/src/glsl/tests/array-05.glsl
deleted file mode 100644
index 168704096b0..00000000000
--- a/src/glsl/tests/array-05.glsl
+++ /dev/null
@@ -1,2 +0,0 @@
-/* FAIL - array size type must be scalar */
-uniform vec4 a[ivec4(3)];
diff --git a/src/glsl/tests/array-06.glsl b/src/glsl/tests/array-06.glsl
deleted file mode 100644
index 46b43795be1..00000000000
--- a/src/glsl/tests/array-06.glsl
+++ /dev/null
@@ -1,2 +0,0 @@
-/* PASS */
-uniform vec4 a[3];
diff --git a/src/glsl/tests/array-07.glsl b/src/glsl/tests/array-07.glsl
deleted file mode 100644
index 161ffbf2f2e..00000000000
--- a/src/glsl/tests/array-07.glsl
+++ /dev/null
@@ -1,2 +0,0 @@
-/* FAIL - array size must be > 0 */
-uniform vec4 a[0];
diff --git a/src/glsl/tests/array-08.glsl b/src/glsl/tests/array-08.glsl
deleted file mode 100644
index 4bf0c6bd513..00000000000
--- a/src/glsl/tests/array-08.glsl
+++ /dev/null
@@ -1,2 +0,0 @@
-/* FAIL - array size must be > 0 */
-uniform vec4 a[-1];
diff --git a/src/glsl/tests/array-09.glsl b/src/glsl/tests/array-09.glsl
deleted file mode 100644
index cad6d0e54ec..00000000000
--- a/src/glsl/tests/array-09.glsl
+++ /dev/null
@@ -1,9 +0,0 @@
-#version 120
-/* PASS */
-
-void main()
-{
- vec4 a[2] = vec4 [2] (vec4(1.0), vec4(2.0));
-
- gl_Position = gl_Vertex;
-}
diff --git a/src/glsl/tests/array-10.glsl b/src/glsl/tests/array-10.glsl
deleted file mode 100644
index 019aa21150f..00000000000
--- a/src/glsl/tests/array-10.glsl
+++ /dev/null
@@ -1,11 +0,0 @@
-/* FAIL - array constructors forbidden in GLSL 1.10
- *
- * This can also generate an error because the 'vec4[]' style syntax is
- * illegal in GLSL 1.10.
- */
-void main()
-{
- vec4 a[2] = vec4 [2] (vec4(1.0), vec4(2.0));
-
- gl_Position = gl_Vertex;
-}
diff --git a/src/glsl/tests/array-11.glsl b/src/glsl/tests/array-11.glsl
deleted file mode 100644
index 51d94e94773..00000000000
--- a/src/glsl/tests/array-11.glsl
+++ /dev/null
@@ -1,9 +0,0 @@
-#version 120
-/* PASS */
-
-void main()
-{
- vec4 a[] = vec4 [] (vec4(1.0), vec4(2.0));
-
- gl_Position = gl_Vertex;
-}
diff --git a/src/glsl/tests/array-12.glsl b/src/glsl/tests/array-12.glsl
deleted file mode 100644
index 7fc9579452f..00000000000
--- a/src/glsl/tests/array-12.glsl
+++ /dev/null
@@ -1,11 +0,0 @@
-#version 120
-/* FAIL - array must have an implicit or explicit size */
-
-void main()
-{
- vec4 a[];
-
- a = vec4 [2] (vec4(1.0), vec4(2.0));
-
- gl_Position = gl_Vertex;
-}
diff --git a/src/glsl/tests/array-13.glsl b/src/glsl/tests/array-13.glsl
deleted file mode 100644
index cc7e29a5f76..00000000000
--- a/src/glsl/tests/array-13.glsl
+++ /dev/null
@@ -1,11 +0,0 @@
-#version 120
-/* PASS */
-
-void main()
-{
- vec4 a[2];
-
- a = vec4 [] (vec4(1.0), vec4(2.0));
-
- gl_Position = gl_Vertex;
-}
diff --git a/src/glsl/tests/attribute-01.glsl b/src/glsl/tests/attribute-01.glsl
deleted file mode 100644
index 18e9e4468aa..00000000000
--- a/src/glsl/tests/attribute-01.glsl
+++ /dev/null
@@ -1,7 +0,0 @@
-/* FAIL - attribute cannot have type int */
-attribute int i;
-
-void main()
-{
- gl_Position = vec4(1.0);
-}
diff --git a/src/glsl/tests/attribute-02.glsl b/src/glsl/tests/attribute-02.glsl
deleted file mode 100644
index 6b6df74d252..00000000000
--- a/src/glsl/tests/attribute-02.glsl
+++ /dev/null
@@ -1,7 +0,0 @@
-/* FAIL - attribute cannot have type ivec2 */
-attribute ivec2 i;
-
-void main()
-{
- gl_Position = vec4(1.0);
-}
diff --git a/src/glsl/tests/attribute-03.glsl b/src/glsl/tests/attribute-03.glsl
deleted file mode 100644
index 870de9e8148..00000000000
--- a/src/glsl/tests/attribute-03.glsl
+++ /dev/null
@@ -1,7 +0,0 @@
-/* FAIL - attribute cannot have type ivec3 */
-attribute ivec3 i;
-
-void main()
-{
- gl_Position = vec4(1.0);
-}
diff --git a/src/glsl/tests/attribute-04.glsl b/src/glsl/tests/attribute-04.glsl
deleted file mode 100644
index 14af2fcaadd..00000000000
--- a/src/glsl/tests/attribute-04.glsl
+++ /dev/null
@@ -1,7 +0,0 @@
-/* FAIL - attribute cannot have type ivec4 */
-attribute ivec4 i;
-
-void main()
-{
- gl_Position = vec4(1.0);
-}
diff --git a/src/glsl/tests/attribute-05.glsl b/src/glsl/tests/attribute-05.glsl
deleted file mode 100644
index 18822c78541..00000000000
--- a/src/glsl/tests/attribute-05.glsl
+++ /dev/null
@@ -1,7 +0,0 @@
-/* FAIL - attribute cannot have type bool */
-attribute bool i;
-
-void main()
-{
- gl_Position = vec4(1.0);
-}
diff --git a/src/glsl/tests/attribute-06.glsl b/src/glsl/tests/attribute-06.glsl
deleted file mode 100644
index f18027b81af..00000000000
--- a/src/glsl/tests/attribute-06.glsl
+++ /dev/null
@@ -1,7 +0,0 @@
-/* FAIL - attribute cannot have type bvec2 */
-attribute bvec2 i;
-
-void main()
-{
- gl_Position = vec4(1.0);
-}
diff --git a/src/glsl/tests/attribute-07.glsl b/src/glsl/tests/attribute-07.glsl
deleted file mode 100644
index 0af13ba84bf..00000000000
--- a/src/glsl/tests/attribute-07.glsl
+++ /dev/null
@@ -1,7 +0,0 @@
-/* FAIL - attribute cannot have type bvec3 */
-attribute bvec3 i;
-
-void main()
-{
- gl_Position = vec4(1.0);
-}
diff --git a/src/glsl/tests/attribute-08.glsl b/src/glsl/tests/attribute-08.glsl
deleted file mode 100644
index b069c04d1b4..00000000000
--- a/src/glsl/tests/attribute-08.glsl
+++ /dev/null
@@ -1,7 +0,0 @@
-/* FAIL - attribute cannot have type bvec4 */
-attribute bvec4 i;
-
-void main()
-{
- gl_Position = vec4(1.0);
-}
diff --git a/src/glsl/tests/attribute-09.glsl b/src/glsl/tests/attribute-09.glsl
deleted file mode 100644
index 6a607244b9a..00000000000
--- a/src/glsl/tests/attribute-09.glsl
+++ /dev/null
@@ -1,7 +0,0 @@
-/* FAIL - attribute cannot have array type in GLSL 1.10 */
-attribute vec4 i[10];
-
-void main()
-{
- gl_Position = vec4(1.0);
-}
diff --git a/src/glsl/tests/attribute-10.glsl b/src/glsl/tests/attribute-10.glsl
deleted file mode 100644
index 6f5ef63a015..00000000000
--- a/src/glsl/tests/attribute-10.glsl
+++ /dev/null
@@ -1,8 +0,0 @@
-#version 120
-/* FAIL - attribute cannot have array type in GLSL 1.20 */
-attribute vec4 i[10];
-
-void main()
-{
- gl_Position = vec4(1.0);
-}
diff --git a/src/glsl/tests/attribute-11.glsl b/src/glsl/tests/attribute-11.glsl
deleted file mode 100644
index 47cb5a05833..00000000000
--- a/src/glsl/tests/attribute-11.glsl
+++ /dev/null
@@ -1,8 +0,0 @@
-#version 130
-/* FAIL - attribute cannot have array type in GLSL 1.30 */
-attribute vec4 i[10];
-
-void main()
-{
- gl_Position = vec4(1.0);
-}
diff --git a/src/glsl/tests/condition-01.glsl b/src/glsl/tests/condition-01.glsl
deleted file mode 100644
index d89c313117e..00000000000
--- a/src/glsl/tests/condition-01.glsl
+++ /dev/null
@@ -1,8 +0,0 @@
-/* FAIL - :? condition is not bool scalar */
-
-uniform bvec4 a;
-
-void main()
-{
- gl_Position = (a) ? vec4(1.0, 0.0, 0.0, 1.0) : vec4(0.0, 1.0, 0.0, 1.0);
-}
diff --git a/src/glsl/tests/condition-02.glsl b/src/glsl/tests/condition-02.glsl
deleted file mode 100644
index cbd0e18d9a8..00000000000
--- a/src/glsl/tests/condition-02.glsl
+++ /dev/null
@@ -1,8 +0,0 @@
-/* FAIL - :? condition is not bool scalar */
-
-uniform float a;
-
-void main()
-{
- gl_Position = (a) ? vec4(1.0, 0.0, 0.0, 1.0) : vec4(0.0, 1.0, 0.0, 1.0);
-}
diff --git a/src/glsl/tests/condition-03.glsl b/src/glsl/tests/condition-03.glsl
deleted file mode 100644
index 9af5d7aa470..00000000000
--- a/src/glsl/tests/condition-03.glsl
+++ /dev/null
@@ -1,8 +0,0 @@
-/* PASS */
-
-uniform bool a;
-
-void main()
-{
- gl_Position = (a) ? vec4(1.0, 0.0, 0.0, 1.0) : vec4(0.0, 1.0, 0.0, 1.0);
-}
diff --git a/src/glsl/tests/condition-04.glsl b/src/glsl/tests/condition-04.glsl
deleted file mode 100644
index f440b7e9955..00000000000
--- a/src/glsl/tests/condition-04.glsl
+++ /dev/null
@@ -1,8 +0,0 @@
-/* FAIL - type of second two operands must match */
-
-uniform bool a;
-
-void main()
-{
- gl_Position = (a) ? vec4(1.0, 0.0, 0.0, 1.0) : vec3(0.0, 1.0, 0.0);
-}
diff --git a/src/glsl/tests/condition-05.glsl b/src/glsl/tests/condition-05.glsl
deleted file mode 100644
index 3dff18f519d..00000000000
--- a/src/glsl/tests/condition-05.glsl
+++ /dev/null
@@ -1,13 +0,0 @@
-#version 120
-/* PASS */
-
-uniform bool a;
-uniform int b;
-
-void main()
-{
- float x;
-
- x = (a) ? 2.0 : b;
- gl_Position = vec4(x);
-}
diff --git a/src/glsl/tests/constructor-01.glsl b/src/glsl/tests/constructor-01.glsl
deleted file mode 100644
index fdfaf898663..00000000000
--- a/src/glsl/tests/constructor-01.glsl
+++ /dev/null
@@ -1,6 +0,0 @@
-/* PASS */
-
-void main()
-{
- gl_Position = vec4(1.0, 1.0, 1.0, 0.0);;
-}
diff --git a/src/glsl/tests/constructor-02.glsl b/src/glsl/tests/constructor-02.glsl
deleted file mode 100644
index 47acbe9db14..00000000000
--- a/src/glsl/tests/constructor-02.glsl
+++ /dev/null
@@ -1,7 +0,0 @@
-/* FAIL - cannot construct samplers */
-void main()
-{
- int i;
-
- i = sampler2D(0);
-}
diff --git a/src/glsl/tests/constructor-03.glsl b/src/glsl/tests/constructor-03.glsl
deleted file mode 100644
index 07ec225633a..00000000000
--- a/src/glsl/tests/constructor-03.glsl
+++ /dev/null
@@ -1,12 +0,0 @@
-/* FAIL - cannot construct a matrix from a matrix in GLSL 1.10 */
-
-uniform mat2 a;
-
-void main()
-{
- mat2 b;
-
- b = mat2(a);
-
- gl_Position = gl_Vertex;
-}
diff --git a/src/glsl/tests/constructor-04.glsl b/src/glsl/tests/constructor-04.glsl
deleted file mode 100644
index 19d5e011dea..00000000000
--- a/src/glsl/tests/constructor-04.glsl
+++ /dev/null
@@ -1,14 +0,0 @@
-#version 120
-/* FAIL - matrix must be only parameter to matrix constructor */
-
-uniform mat2 a;
-uniform float x;
-
-void main()
-{
- mat2 b;
-
- b = mat2(a, x);
-
- gl_Position = gl_Vertex;
-}
diff --git a/src/glsl/tests/constructor-05.glsl b/src/glsl/tests/constructor-05.glsl
deleted file mode 100644
index 9c74f75a404..00000000000
--- a/src/glsl/tests/constructor-05.glsl
+++ /dev/null
@@ -1,13 +0,0 @@
-/* FAIL - too few components supplied to constructor */
-
-uniform vec2 a;
-uniform float x;
-
-void main()
-{
- mat2 b;
-
- b = mat2(a, x);
-
- gl_Position = gl_Vertex;
-}
diff --git a/src/glsl/tests/constructor-06.glsl b/src/glsl/tests/constructor-06.glsl
deleted file mode 100644
index d77a5f9e892..00000000000
--- a/src/glsl/tests/constructor-06.glsl
+++ /dev/null
@@ -1,13 +0,0 @@
-#version 120
-/* PASS */
-
-uniform mat2 a;
-
-void main()
-{
- mat2 b;
-
- b = mat2(a);
-
- gl_Position = gl_Vertex;
-}
diff --git a/src/glsl/tests/constructor-07.glsl b/src/glsl/tests/constructor-07.glsl
deleted file mode 100644
index 92322506ed1..00000000000
--- a/src/glsl/tests/constructor-07.glsl
+++ /dev/null
@@ -1,13 +0,0 @@
-/* PASS */
-
-uniform ivec2 a;
-uniform ivec2 b;
-
-void main()
-{
- mat2 c;
-
- c = mat2(a, b);
-
- gl_Position = gl_Vertex;
-}
diff --git a/src/glsl/tests/constructor-08.glsl b/src/glsl/tests/constructor-08.glsl
deleted file mode 100644
index 27153f0cda1..00000000000
--- a/src/glsl/tests/constructor-08.glsl
+++ /dev/null
@@ -1,13 +0,0 @@
-/* PASS */
-
-uniform float a;
-uniform float b;
-
-void main()
-{
- ivec2 c;
-
- c = ivec2(a, b);
-
- gl_Position = gl_Vertex;
-}
diff --git a/src/glsl/tests/constructor-09.glsl b/src/glsl/tests/constructor-09.glsl
deleted file mode 100644
index 1985699b305..00000000000
--- a/src/glsl/tests/constructor-09.glsl
+++ /dev/null
@@ -1,26 +0,0 @@
-/* PASS */
-
-uniform int a;
-uniform float b;
-uniform bool c;
-
-void main()
-{
- float x;
- int y;
- bool z;
-
- x = float(a);
- x = float(b);
- x = float(c);
-
- y = int(a);
- y = int(b);
- y = int(c);
-
- z = bool(a);
- z = bool(b);
- z = bool(c);
-
- gl_Position = gl_Vertex;
-}
diff --git a/src/glsl/tests/function-01.glsl b/src/glsl/tests/function-01.glsl
deleted file mode 100644
index 0eaa2397ab6..00000000000
--- a/src/glsl/tests/function-01.glsl
+++ /dev/null
@@ -1,16 +0,0 @@
-/* FAIL - no function named 'foo' exists */
-
-vec4 bar(float x, float y, float z, float w)
-{
- vec4 v;
- v.x = x;
- v.y = y;
- v.z = z;
- v.w = w;
- return v;
-}
-
-void main()
-{
- gl_Position = foo(1.0, 1.0, 1.0, 0.0);
-}
diff --git a/src/glsl/tests/function-02.glsl b/src/glsl/tests/function-02.glsl
deleted file mode 100644
index 941fcc1ef7b..00000000000
--- a/src/glsl/tests/function-02.glsl
+++ /dev/null
@@ -1,16 +0,0 @@
-/* FAIL - no version of 'foo' matches the call to 'foo' */
-
-vec4 foo(float x, float y, float z, float w)
-{
- vec4 v;
- v.x = x;
- v.y = y;
- v.z = z;
- v.w = w;
- return v;
-}
-
-void main()
-{
- gl_Position = foo(1.0, 1.0, 1.0);
-}
diff --git a/src/glsl/tests/function-03.glsl b/src/glsl/tests/function-03.glsl
deleted file mode 100644
index b0da42f8e96..00000000000
--- a/src/glsl/tests/function-03.glsl
+++ /dev/null
@@ -1,16 +0,0 @@
-/* PASS */
-
-vec4 foo(in float x, in float y, float z, float w)
-{
- vec4 v;
- v.x = x;
- v.y = y;
- v.z = z;
- v.w = w;
- return v;
-}
-
-void main()
-{
- gl_Position = foo(1.0, 1.0, 1.0, 0.0);
-}
diff --git a/src/glsl/tests/function-04.glsl b/src/glsl/tests/function-04.glsl
deleted file mode 100644
index dfc0d2b7a6c..00000000000
--- a/src/glsl/tests/function-04.glsl
+++ /dev/null
@@ -1,15 +0,0 @@
-/* FAIL - type mismatch in assignment */
-
-vec3 foo(float x, float y, float z)
-{
- vec3 v;
- v.x = x;
- v.y = y;
- v.z = z;
- return v;
-}
-
-void main()
-{
- gl_Position = foo(1.0, 1.0, 1.0);
-}
diff --git a/src/glsl/tests/function-05.glsl b/src/glsl/tests/function-05.glsl
deleted file mode 100644
index 43365bf6062..00000000000
--- a/src/glsl/tests/function-05.glsl
+++ /dev/null
@@ -1,26 +0,0 @@
-/* PASS */
-
-vec4 foo(in float x, in float y, float z, float w)
-{
- vec4 v;
- v.x = x;
- v.y = y;
- v.z = z;
- v.w = w;
- return v;
-}
-
-vec4 foo(in float x)
-{
- vec4 v;
- v.x = x;
- v.y = x;
- v.z = x;
- v.w = x;
-}
-
-void main()
-{
- gl_Position = foo(1.0, 1.0, 1.0, 0.0);
- gl_Position = foo(2.0);
-}
diff --git a/src/glsl/tests/if-01.glsl b/src/glsl/tests/if-01.glsl
deleted file mode 100644
index ca9abd54f75..00000000000
--- a/src/glsl/tests/if-01.glsl
+++ /dev/null
@@ -1,11 +0,0 @@
-/* FAIL - if-statement condition is not bool scalar */
-
-uniform bvec4 a;
-
-void main()
-{
- if (a)
- gl_Position = vec4(1.0, 0.0, 0.0, 1.0);
- else
- gl_Position = vec4(0.0, 1.0, 0.0, 1.0);
-}
diff --git a/src/glsl/tests/if-02.glsl b/src/glsl/tests/if-02.glsl
deleted file mode 100644
index 7adccea0432..00000000000
--- a/src/glsl/tests/if-02.glsl
+++ /dev/null
@@ -1,11 +0,0 @@
-/* FAIL - if-statement condition is not bool scalar */
-
-uniform float a;
-
-void main()
-{
- if (a)
- gl_Position = vec4(1.0, 0.0, 0.0, 1.0);
- else
- gl_Position = vec4(0.0, 1.0, 0.0, 1.0);
-}
diff --git a/src/glsl/tests/if-03.glsl b/src/glsl/tests/if-03.glsl
deleted file mode 100644
index 179618c716e..00000000000
--- a/src/glsl/tests/if-03.glsl
+++ /dev/null
@@ -1,11 +0,0 @@
-/* PASS */
-
-uniform bool a;
-
-void main()
-{
- if (a)
- gl_Position = vec4(1.0, 0.0, 0.0, 1.0);
- else
- gl_Position = vec4(0.0, 1.0, 0.0, 1.0);
-}
diff --git a/src/glsl/tests/if-04.glsl b/src/glsl/tests/if-04.glsl
deleted file mode 100644
index 7b711fb7edf..00000000000
--- a/src/glsl/tests/if-04.glsl
+++ /dev/null
@@ -1,11 +0,0 @@
-/* PASS */
-
-uniform bvec4 a;
-
-void main()
-{
- if (a.x)
- gl_Position = vec4(1.0, 0.0, 0.0, 1.0);
- else
- gl_Position = vec4(0.0, 1.0, 0.0, 1.0);
-}
diff --git a/src/glsl/tests/matrix-01.glsl b/src/glsl/tests/matrix-01.glsl
deleted file mode 100644
index f46416c8f67..00000000000
--- a/src/glsl/tests/matrix-01.glsl
+++ /dev/null
@@ -1,6 +0,0 @@
-/* FAIL - non-square matrices are not available in GLSL 1.10 */
-
-void main()
-{
- mat2x3 m;
-}
diff --git a/src/glsl/tests/matrix-02.glsl b/src/glsl/tests/matrix-02.glsl
deleted file mode 100644
index 0630722b795..00000000000
--- a/src/glsl/tests/matrix-02.glsl
+++ /dev/null
@@ -1,6 +0,0 @@
-/* FAIL - non-square matrices are not available in GLSL 1.10 */
-
-void main()
-{
- mat2x4 m;
-}
diff --git a/src/glsl/tests/matrix-03.glsl b/src/glsl/tests/matrix-03.glsl
deleted file mode 100644
index 925dc806258..00000000000
--- a/src/glsl/tests/matrix-03.glsl
+++ /dev/null
@@ -1,6 +0,0 @@
-/* FAIL - non-square matrices are not available in GLSL 1.10 */
-
-void main()
-{
- mat3x2 m;
-}
diff --git a/src/glsl/tests/matrix-04.glsl b/src/glsl/tests/matrix-04.glsl
deleted file mode 100644
index 5275619b319..00000000000
--- a/src/glsl/tests/matrix-04.glsl
+++ /dev/null
@@ -1,6 +0,0 @@
-/* FAIL - non-square matrices are not available in GLSL 1.10 */
-
-void main()
-{
- mat3x4 m;
-}
diff --git a/src/glsl/tests/matrix-05.glsl b/src/glsl/tests/matrix-05.glsl
deleted file mode 100644
index 74e1fd25148..00000000000
--- a/src/glsl/tests/matrix-05.glsl
+++ /dev/null
@@ -1,6 +0,0 @@
-/* FAIL - non-square matrices are not available in GLSL 1.10 */
-
-void main()
-{
- mat4x2 m;
-}
diff --git a/src/glsl/tests/matrix-06.glsl b/src/glsl/tests/matrix-06.glsl
deleted file mode 100644
index 0a512b85234..00000000000
--- a/src/glsl/tests/matrix-06.glsl
+++ /dev/null
@@ -1,6 +0,0 @@
-/* FAIL - non-square matrices are not available in GLSL 1.10 */
-
-void main()
-{
- mat4x3 m;
-}
diff --git a/src/glsl/tests/matrix-07.glsl b/src/glsl/tests/matrix-07.glsl
deleted file mode 100644
index 0b59aa69d50..00000000000
--- a/src/glsl/tests/matrix-07.glsl
+++ /dev/null
@@ -1,27 +0,0 @@
-/* PASS */
-
-uniform mat2 a;
-uniform mat2 b;
-uniform mat2 c;
-uniform mat2 d;
-uniform mat3 e;
-uniform mat3 f;
-uniform mat3 g;
-uniform mat3 h;
-uniform mat4 i;
-uniform mat4 j;
-uniform mat4 k;
-uniform mat4 l;
-
-void main()
-{
- mat2 x;
- mat3 y;
- mat4 z;
-
- x = a * b + c / d;
- y = e * f + g / h;
- z = i * j + k / l;
-
- gl_Position = gl_Vertex;
-}
diff --git a/src/glsl/tests/matrix-08.glsl b/src/glsl/tests/matrix-08.glsl
deleted file mode 100644
index 38138d22de4..00000000000
--- a/src/glsl/tests/matrix-08.glsl
+++ /dev/null
@@ -1,19 +0,0 @@
-#version 120
-/* PASS */
-
-uniform mat2x3 a;
-uniform mat3x2 b;
-uniform mat3x3 c;
-uniform mat3x3 d;
-
-void main()
-{
- mat3x3 x;
-
- /* Multiplying a 2 column, 3 row matrix with a 3 column, 2 row matrix
- * results in a 3 column, 3 row matrix.
- */
- x = (a * b) + c / d;
-
- gl_Position = gl_Vertex;
-}
diff --git a/src/glsl/tests/matrix-09.glsl b/src/glsl/tests/matrix-09.glsl
deleted file mode 100644
index 18afbcacea7..00000000000
--- a/src/glsl/tests/matrix-09.glsl
+++ /dev/null
@@ -1,11 +0,0 @@
-/* FAIL - matrix-to-matrix constructors are not available in GLSL 1.10 */
-
-uniform mat3 a;
-
-void main()
-{
- mat2 m;
-
- m = mat2(a);
- gl_Position = gl_Vertex;
-}
diff --git a/src/glsl/tests/matrix-10.glsl b/src/glsl/tests/matrix-10.glsl
deleted file mode 100644
index 20b55180cbb..00000000000
--- a/src/glsl/tests/matrix-10.glsl
+++ /dev/null
@@ -1,12 +0,0 @@
-#version 120
-/* PASS */
-
-uniform mat3 a;
-
-void main()
-{
- mat2 m;
-
- m = mat2(a);
- gl_Position = gl_Vertex;
-}
diff --git a/src/glsl/tests/parameters-01.glsl b/src/glsl/tests/parameters-01.glsl
deleted file mode 100644
index b485106e9d7..00000000000
--- a/src/glsl/tests/parameters-01.glsl
+++ /dev/null
@@ -1,11 +0,0 @@
-/* FAIL: redefinition of a() */
-
-void a()
-{
- ;
-}
-
-void a()
-{
- ;
-}
diff --git a/src/glsl/tests/parameters-02.glsl b/src/glsl/tests/parameters-02.glsl
deleted file mode 100644
index 7ff5f59ab79..00000000000
--- a/src/glsl/tests/parameters-02.glsl
+++ /dev/null
@@ -1,11 +0,0 @@
-/* PASS */
-
-void a()
-{
- ;
-}
-
-void a(float x)
-{
- ;
-}
diff --git a/src/glsl/tests/parameters-03.glsl b/src/glsl/tests/parameters-03.glsl
deleted file mode 100644
index 7ec30f80cc6..00000000000
--- a/src/glsl/tests/parameters-03.glsl
+++ /dev/null
@@ -1,9 +0,0 @@
-/* FAIL - x is redeclared in the function body at the same scope as the
- * parameter
- */
-void a(float x, float y)
-{
- float x;
-
- x = y;
-}
diff --git a/src/glsl/tests/qualifier-01.glsl b/src/glsl/tests/qualifier-01.glsl
deleted file mode 100644
index 54ec3572a24..00000000000
--- a/src/glsl/tests/qualifier-01.glsl
+++ /dev/null
@@ -1,3 +0,0 @@
-#version 130
-/* FAIL - inout only allowed in parameter list */
-inout vec4 foo;
diff --git a/src/glsl/tests/qualifier-02.glsl b/src/glsl/tests/qualifier-02.glsl
deleted file mode 100644
index b635d52aa2a..00000000000
--- a/src/glsl/tests/qualifier-02.glsl
+++ /dev/null
@@ -1,2 +0,0 @@
-/* FAIL - in only allowed in parameter list in GLSL 1.10 */
-in foo;
diff --git a/src/glsl/tests/qualifier-03.glsl b/src/glsl/tests/qualifier-03.glsl
deleted file mode 100644
index 7e448034a7c..00000000000
--- a/src/glsl/tests/qualifier-03.glsl
+++ /dev/null
@@ -1,2 +0,0 @@
-/* FAIL - out only allowed in parameter list in GLSL 1.10 */
-out vec4 foo;
diff --git a/src/glsl/tests/qualifier-04.glsl b/src/glsl/tests/qualifier-04.glsl
deleted file mode 100644
index d03cafc1db2..00000000000
--- a/src/glsl/tests/qualifier-04.glsl
+++ /dev/null
@@ -1,3 +0,0 @@
-#version 130
-/* PASS */
-in vec4 foo;
diff --git a/src/glsl/tests/qualifier-05.glsl b/src/glsl/tests/qualifier-05.glsl
deleted file mode 100644
index 15281f33840..00000000000
--- a/src/glsl/tests/qualifier-05.glsl
+++ /dev/null
@@ -1,3 +0,0 @@
-#version 130
-/* PASS */
-out vec4 foo;
diff --git a/src/glsl/tests/qualifier-06.glsl b/src/glsl/tests/qualifier-06.glsl
deleted file mode 100644
index 1907a087c8e..00000000000
--- a/src/glsl/tests/qualifier-06.glsl
+++ /dev/null
@@ -1,7 +0,0 @@
-/* FAIL - in only allowed in parameter list in GLSL 1.10 */
-void main()
-{
- in vec4 foo;
-
- gl_Position = gl_Vertex;
-}
diff --git a/src/glsl/tests/qualifier-07.glsl b/src/glsl/tests/qualifier-07.glsl
deleted file mode 100644
index 12568a57dbc..00000000000
--- a/src/glsl/tests/qualifier-07.glsl
+++ /dev/null
@@ -1,7 +0,0 @@
-/* FAIL - out only allowed in parameter list in GLSL 1.10 */
-void main()
-{
- out vec4 foo;
-
- gl_Position = gl_Vertex;
-}
diff --git a/src/glsl/tests/swiz-01.glsl b/src/glsl/tests/swiz-01.glsl
deleted file mode 100644
index 3268fa178c1..00000000000
--- a/src/glsl/tests/swiz-01.glsl
+++ /dev/null
@@ -1,11 +0,0 @@
-/* PASS */
-#version 120
-
-void main()
-{
- float a;
- vec4 b;
-
- b.x = 6.0;
- a = b.x;
-}
diff --git a/src/glsl/tests/swiz-02.glsl b/src/glsl/tests/swiz-02.glsl
deleted file mode 100644
index e3f043c47bd..00000000000
--- a/src/glsl/tests/swiz-02.glsl
+++ /dev/null
@@ -1,11 +0,0 @@
-/* FAIL: assignment of a vec2 to a float */
-#version 120
-
-void main()
-{
- float a;
- vec4 b;
-
- b.x = 6.0;
- a = b.xy;
-}
diff --git a/src/glsl/tests/void-01.glsl b/src/glsl/tests/void-01.glsl
deleted file mode 100644
index 5719edc0b6c..00000000000
--- a/src/glsl/tests/void-01.glsl
+++ /dev/null
@@ -1,2 +0,0 @@
-/* FAIL - cannot declare a variable as having type `void' */
-void foo;
diff --git a/src/glx/Makefile b/src/glx/Makefile
index 2c94ef1cd4f..dd96973ea8f 100644
--- a/src/glx/Makefile
+++ b/src/glx/Makefile
@@ -46,6 +46,12 @@ SOURCES = \
applegl_glx.c
+ifeq ($(SHARED_GLAPI),1)
+GL_LIB_DEPS := -L$(TOP)/$(LIB_DIR) -l$(GLAPI_LIB) $(GL_LIB_DEPS)
+EXTRA_DEFINES += -DGLX_SHARED_GLAPI
+endif
+
+# override GLAPI_LIB
GLAPI_LIB = $(TOP)/src/mapi/glapi/libglapi.a
OBJECTS = $(SOURCES:.c=.o)
@@ -58,6 +64,7 @@ INCLUDES = -I. \
-I$(TOP)/src/mapi/glapi \
$(LIBDRM_CFLAGS) \
$(DRI2PROTO_CFLAGS) \
+ $(GLPROTO_CFLAGS) \
$(X11_INCLUDES)
diff --git a/src/glx/dri2_glx.c b/src/glx/dri2_glx.c
index b0559b24d72..2c28bc27150 100644
--- a/src/glx/dri2_glx.c
+++ b/src/glx/dri2_glx.c
@@ -535,8 +535,13 @@ dri2SwapBuffers(__GLXDRIdrawable *pdraw, int64_t target_msc, int64_t divisor,
CARD64 ret = 0;
#ifdef __DRI2_FLUSH
- if (psc->f)
- (*psc->f->flush)(priv->driDrawable);
+ if (psc->f) {
+ struct glx_context *gc = __glXGetCurrentContext();
+
+ if (gc) {
+ (*psc->f->flush)(priv->driDrawable);
+ }
+ }
#endif
/* Old servers don't send invalidate events */
@@ -719,6 +724,27 @@ dri2_bind_tex_image(Display * dpy,
static void
dri2_release_tex_image(Display * dpy, GLXDrawable drawable, int buffer)
{
+#if __DRI_TEX_BUFFER_VERSION >= 3
+ struct glx_context *gc = __glXGetCurrentContext();
+ struct dri2_context *pcp = (struct dri2_context *) gc;
+ __GLXDRIdrawable *base = GetGLXDRIDrawable(dpy, drawable);
+ struct glx_display *dpyPriv = __glXInitialize(dpy);
+ struct dri2_drawable *pdraw = (struct dri2_drawable *) base;
+ struct dri2_display *pdp =
+ (struct dri2_display *) dpyPriv->dri2Display;
+ struct dri2_screen *psc;
+
+ if (pdraw != NULL) {
+ psc = (struct dri2_screen *) base->psc;
+
+ if (psc->texBuffer->base.version >= 3 &&
+ psc->texBuffer->releaseTexBuffer != NULL) {
+ (*psc->texBuffer->releaseTexBuffer) (pcp->driContext,
+ pdraw->base.textureTarget,
+ pdraw->driDrawable);
+ }
+ }
+#endif
}
static const struct glx_context_vtable dri2_context_vtable = {
@@ -783,11 +809,16 @@ dri2CreateScreen(int screen, struct glx_display * priv)
return NULL;
memset(psc, 0, sizeof *psc);
- if (!glx_screen_init(&psc->base, screen, priv))
- return NULL;
+ psc->fd = -1;
+
+ if (!glx_screen_init(&psc->base, screen, priv)) {
+ Xfree(psc);
+ return NULL;
+ }
if (!DRI2Connect(priv->dpy, RootWindow(priv->dpy, screen),
&driverName, &deviceName)) {
+ glx_screen_cleanup(&psc->base);
XFree(psc);
return NULL;
}
@@ -897,12 +928,15 @@ dri2CreateScreen(int screen, struct glx_display * priv)
return &psc->base;
handle_error:
+ if (psc->fd >= 0)
+ close(psc->fd);
+ if (psc->driver)
+ dlclose(psc->driver);
Xfree(driverName);
Xfree(deviceName);
+ glx_screen_cleanup(&psc->base);
XFree(psc);
- /* FIXME: clean up here */
-
return NULL;
}
diff --git a/src/glx/dri_common.c b/src/glx/dri_common.c
index 83d6e3c3108..06a73e4a6b2 100644
--- a/src/glx/dri_common.c
+++ b/src/glx/dri_common.c
@@ -222,7 +222,9 @@ __ATTRIB(__DRI_ATTRIB_BIND_TO_TEXTURE_RGB, bindToTextureRgb),
__ATTRIB(__DRI_ATTRIB_BIND_TO_TEXTURE_RGBA, bindToTextureRgba),
__ATTRIB(__DRI_ATTRIB_BIND_TO_MIPMAP_TEXTURE,
bindToMipmapTexture),
- __ATTRIB(__DRI_ATTRIB_YINVERTED, yInverted),};
+ __ATTRIB(__DRI_ATTRIB_YINVERTED, yInverted),
+ __ATTRIB(__DRI_ATTRIB_FRAMEBUFFER_SRGB_CAPABLE, sRGBCapable)
+};
static int
scalarEqual(struct glx_config *mode, unsigned int attrib, unsigned int value)
diff --git a/src/glx/dri_glx.c b/src/glx/dri_glx.c
index 42b263c6377..ff027dc9e9c 100644
--- a/src/glx/dri_glx.c
+++ b/src/glx/dri_glx.c
@@ -836,26 +836,24 @@ driCreateScreen(int screen, struct glx_display *priv)
return NULL;
memset(psc, 0, sizeof *psc);
- if (!glx_screen_init(&psc->base, screen, priv))
- return NULL;
-
- if (!driGetDriverName(priv->dpy, screen, &driverName)) {
+ if (!glx_screen_init(&psc->base, screen, priv)) {
Xfree(psc);
return NULL;
}
+ if (!driGetDriverName(priv->dpy, screen, &driverName)) {
+ goto cleanup;
+ }
+
psc->driver = driOpenDriver(driverName);
Xfree(driverName);
- if (psc->driver == NULL) {
- Xfree(psc);
- return NULL;
- }
+ if (psc->driver == NULL)
+ goto cleanup;
extensions = dlsym(psc->driver, __DRI_DRIVER_EXTENSIONS);
if (extensions == NULL) {
ErrorMessageF("driver exports no extensions (%s)\n", dlerror());
- Xfree(psc);
- return NULL;
+ goto cleanup;
}
for (i = 0; extensions[i]; i++) {
@@ -865,19 +863,14 @@ driCreateScreen(int screen, struct glx_display *priv)
psc->legacy = (__DRIlegacyExtension *) extensions[i];
}
- if (psc->core == NULL || psc->legacy == NULL) {
- Xfree(psc);
- return NULL;
- }
+ if (psc->core == NULL || psc->legacy == NULL)
+ goto cleanup;
pdp = (struct dri_display *) priv->driDisplay;
psc->driScreen =
CallCreateNewScreen(psc->base.dpy, screen, psc, pdp);
- if (psc->driScreen == NULL) {
- dlclose(psc->driver);
- Xfree(psc);
- return NULL;
- }
+ if (psc->driScreen == NULL)
+ goto cleanup;
extensions = psc->core->getExtensions(psc->driScreen);
driBindExtensions(psc, extensions);
@@ -902,6 +895,14 @@ driCreateScreen(int screen, struct glx_display *priv)
psp->getSwapInterval = driGetSwapInterval;
return &psc->base;
+
+cleanup:
+ if (psc->driver)
+ dlclose(psc->driver);
+ glx_screen_cleanup(&psc->base);
+ Xfree(psc);
+
+ return NULL;
}
/* Called from __glXFreeDisplayPrivate.
diff --git a/src/glx/drisw_glx.c b/src/glx/drisw_glx.c
index 237ce176176..5c7f40cdffa 100644
--- a/src/glx/drisw_glx.c
+++ b/src/glx/drisw_glx.c
@@ -452,8 +452,10 @@ driCreateScreen(int screen, struct glx_display *priv)
return NULL;
memset(psc, 0, sizeof *psc);
- if (!glx_screen_init(&psc->base, screen, priv))
- return NULL;
+ if (!glx_screen_init(&psc->base, screen, priv)) {
+ Xfree(psc);
+ return NULL;
+ }
psc->driver = driOpenSwrast();
if (psc->driver == NULL)
@@ -504,6 +506,7 @@ driCreateScreen(int screen, struct glx_display *priv)
handle_error:
if (psc->driver)
dlclose(psc->driver);
+ glx_screen_cleanup(&psc->base);
Xfree(psc);
ErrorMessageF("reverting to indirect rendering\n");
diff --git a/src/glx/glx_pbuffer.c b/src/glx/glx_pbuffer.c
index 34892e8b1a2..5f91bc623a9 100644
--- a/src/glx/glx_pbuffer.c
+++ b/src/glx/glx_pbuffer.c
@@ -106,7 +106,7 @@ ChangeDrawableAttribute(Display * dpy, GLXDrawable drawable,
if ((priv->majorVersion > 1) || (priv->minorVersion >= 3)) {
xGLXChangeDrawableAttributesReq *req;
- GetReqExtra(GLXChangeDrawableAttributes, 8 + (8 * num_attribs), req);
+ GetReqExtra(GLXChangeDrawableAttributes, 8 * num_attribs, req);
output = (CARD32 *) (req + 1);
req->reqType = opcode;
@@ -117,7 +117,7 @@ ChangeDrawableAttribute(Display * dpy, GLXDrawable drawable,
else {
xGLXVendorPrivateWithReplyReq *vpreq;
- GetReqExtra(GLXVendorPrivateWithReply, 4 + (8 * num_attribs), vpreq);
+ GetReqExtra(GLXVendorPrivateWithReply, 8 + (8 * num_attribs), vpreq);
output = (CARD32 *) (vpreq + 1);
vpreq->reqType = opcode;
@@ -125,7 +125,8 @@ ChangeDrawableAttribute(Display * dpy, GLXDrawable drawable,
vpreq->vendorCode = X_GLXvop_ChangeDrawableAttributesSGIX;
output[0] = (CARD32) drawable;
- output++;
+ output[1] = num_attribs;
+ output += 2;
}
(void) memcpy(output, attribs, sizeof(CARD32) * 2 * num_attribs);
@@ -297,7 +298,7 @@ GetDrawableAttribute(Display * dpy, GLXDrawable drawable,
if (use_glx_1_3) {
xGLXGetDrawableAttributesReq *req;
- GetReqExtra(GLXGetDrawableAttributes, 4, req);
+ GetReq(GLXGetDrawableAttributes, req);
req->reqType = opcode;
req->glxCode = X_GLXGetDrawableAttributes;
req->drawable = drawable;
@@ -435,7 +436,7 @@ DestroyDrawable(Display * dpy, GLXDrawable drawable, CARD32 glxCode)
LockDisplay(dpy);
- GetReqExtra(GLXDestroyPbuffer, 4, req);
+ GetReq(GLXDestroyPbuffer, req);
req->reqType = opcode;
req->glxCode = glxCode;
req->pbuffer = (GLXPbuffer) drawable;
diff --git a/src/glx/glxclient.h b/src/glx/glxclient.h
index 36a0808c048..2b6966f2e08 100644
--- a/src/glx/glxclient.h
+++ b/src/glx/glxclient.h
@@ -419,9 +419,9 @@ struct glx_context
/*@} */
/**
- * Thread ID we're currently current in. Zero if none.
+ * Number of threads we're currently current in.
*/
- unsigned long thread_id;
+ unsigned long thread_refcount;
char gl_extension_bits[__GL_EXT_BYTES];
};
@@ -585,6 +585,8 @@ struct glx_display
extern int
glx_screen_init(struct glx_screen *psc,
int screen, struct glx_display * priv);
+extern void
+glx_screen_cleanup(struct glx_screen *psc);
#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
extern __GLXDRIdrawable *
diff --git a/src/glx/glxcmds.c b/src/glx/glxcmds.c
index 4f7e84ef5f9..22bebab26bc 100644
--- a/src/glx/glxcmds.c
+++ b/src/glx/glxcmds.c
@@ -36,6 +36,7 @@
#include "glxclient.h"
#include "glapi.h"
#include "glxextensions.h"
+#include "indirect.h"
#ifdef GLX_DIRECT_RENDERING
#ifdef GLX_USE_APPLEGL
@@ -214,12 +215,16 @@ CreateContext(Display * dpy, int generic_id,
Bool allowDirect,
unsigned code, int renderType, int screen)
{
- struct glx_context *gc = NULL;
- struct glx_screen *const psc = GetGLXScreenConfigs(dpy, screen);
+ struct glx_context *gc;
+ struct glx_screen *psc;
struct glx_context *shareList = (struct glx_context *) shareList_user;
if (dpy == NULL)
return NULL;
+ psc = GetGLXScreenConfigs(dpy, screen);
+ if (psc == NULL)
+ return NULL;
+
if (generic_id == None)
return NULL;
@@ -722,11 +727,16 @@ glXSwapBuffers(Display * dpy, GLXDrawable drawable)
xGLXSwapBuffersReq *req;
#endif
+ gc = __glXGetCurrentContext();
+
#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
__GLXDRIdrawable *pdraw = GetGLXDRIDrawable(dpy, drawable);
if (pdraw != NULL) {
- glFlush();
+ if (gc && drawable == gc->currentDrawable) {
+ glFlush();
+ }
+
(*pdraw->psc->driScreen->swapBuffers)(pdraw, 0, 0, 0);
return;
}
@@ -741,7 +751,6 @@ glXSwapBuffers(Display * dpy, GLXDrawable drawable)
** The calling thread may or may not have a current context. If it
** does, send the context tag so the server can do a flush.
*/
- gc = __glXGetCurrentContext();
if ((gc != NULL) && (dpy == gc->currentDpy) &&
((drawable == gc->currentDrawable)
|| (drawable == gc->currentReadable))) {
@@ -2514,7 +2523,11 @@ _X_EXPORT void (*glXGetProcAddressARB(const GLubyte * procName)) (void)
f = (gl_function) get_glx_proc_address((const char *) procName);
if ((f == NULL) && (procName[0] == 'g') && (procName[1] == 'l')
&& (procName[2] != 'X')) {
- f = (gl_function) _glapi_get_proc_address((const char *) procName);
+#ifdef GLX_SHARED_GLAPI
+ f = (gl_function) __indirect_get_proc_address((const char *) procName);
+#endif
+ if (!f)
+ f = (gl_function) _glapi_get_proc_address((const char *) procName);
}
#endif
return f;
diff --git a/src/glx/glxconfig.c b/src/glx/glxconfig.c
index 1d9678f48cd..c3e1d5a5680 100644
--- a/src/glx/glxconfig.c
+++ b/src/glx/glxconfig.c
@@ -188,6 +188,10 @@ glx_config_get(struct glx_config * mode, int attribute, int *value_return)
*value_return = mode->yInverted;
return 0;
+ case GLX_FRAMEBUFFER_SRGB_CAPABLE_EXT:
+ *value_return = mode->sRGBCapable;
+ return 0;
+
/* Applications are NOT allowed to query GLX_VISUAL_SELECT_GROUP_SGIX.
* It is ONLY for communication between the GLX client and the GLX
* server.
@@ -251,6 +255,7 @@ glx_config_create_list(unsigned count)
(*next)->bindToMipmapTexture = GLX_DONT_CARE;
(*next)->bindToTextureTargets = GLX_DONT_CARE;
(*next)->yInverted = GLX_DONT_CARE;
+ (*next)->sRGBCapable = GLX_DONT_CARE;
next = &((*next)->next);
}
diff --git a/src/glx/glxconfig.h b/src/glx/glxconfig.h
index f7ee958e4be..2f1074ca5fa 100644
--- a/src/glx/glxconfig.h
+++ b/src/glx/glxconfig.h
@@ -100,6 +100,9 @@ struct glx_config {
GLint bindToMipmapTexture;
GLint bindToTextureTargets;
GLint yInverted;
+
+ /* EXT_framebuffer_sRGB */
+ GLint sRGBCapable;
};
#define __GLX_MIN_CONFIG_PROPS 18
diff --git a/src/glx/glxcurrent.c b/src/glx/glxcurrent.c
index 36317383544..1f845ce65e1 100644
--- a/src/glx/glxcurrent.c
+++ b/src/glx/glxcurrent.c
@@ -189,7 +189,7 @@ glXGetCurrentDrawable(void)
}
static void
-__glXGenerateError(Display * dpy, struct glx_context *gc, XID resource,
+__glXGenerateError(Display * dpy, XID resource,
BYTE errorCode, CARD16 minorCode)
{
xError error;
@@ -198,7 +198,7 @@ __glXGenerateError(Display * dpy, struct glx_context *gc, XID resource,
error.resourceID = resource;
error.sequenceNumber = dpy->request;
error.type = X_Error;
- error.majorCode = gc->majorOpcode;
+ error.majorCode = __glXSetupForCommand(dpy);
error.minorCode = minorCode;
_XError(dpy, &error);
}
@@ -216,6 +216,16 @@ MakeContextCurrent(Display * dpy, GLXDrawable draw,
struct glx_context *oldGC = __glXGetCurrentContext();
int ret = Success;
+ /* XXX: If this is left out, then libGL ends up not having this
+ * symbol, and drivers using it fail to load. Compare the
+ * implementation of this symbol to _glapi_noop_enable_warnings(),
+ * though, which gets into the library despite no callers, the same
+ * prototypes, and the same compile flags to the files containing
+ * them. Moving the definition to glapi_nop.c gets it into the
+ * library, though.
+ */
+ (void)_glthread_GetID();
+
/* Make sure that the new context has a nonzero ID. In the request,
* a zero context ID is used only to mean that we bind to no current
* context.
@@ -225,55 +235,56 @@ MakeContextCurrent(Display * dpy, GLXDrawable draw,
}
if (gc == NULL && (draw != None || read != None)) {
- __glXGenerateError(dpy, gc, (draw != None) ? draw : read,
+ __glXGenerateError(dpy, (draw != None) ? draw : read,
BadMatch, X_GLXMakeContextCurrent);
return False;
}
if (gc != NULL && (draw == None || read == None)) {
- __glXGenerateError(dpy, gc, None, BadMatch, X_GLXMakeContextCurrent);
+ __glXGenerateError(dpy, None, BadMatch, X_GLXMakeContextCurrent);
return False;
}
_glapi_check_multithread();
- if (gc != NULL && gc->thread_id != 0 && gc->thread_id != _glthread_GetID()) {
- __glXGenerateError(dpy, gc, gc->xid,
- BadAccess, X_GLXMakeContextCurrent);
- return False;
- }
-
+ __glXLock();
if (oldGC == gc &&
- gc->currentDrawable == draw && gc->currentReadable == read)
+ gc->currentDrawable == draw && gc->currentReadable == read) {
+ __glXUnlock();
return True;
+ }
if (oldGC != &dummyContext) {
- oldGC->vtable->unbind(oldGC, gc);
- oldGC->currentDpy = 0;
- oldGC->currentDrawable = None;
- oldGC->currentReadable = None;
- oldGC->thread_id = 0;
+ if (--oldGC->thread_refcount == 0) {
+ oldGC->vtable->unbind(oldGC, gc);
+ oldGC->currentDpy = 0;
+ oldGC->currentDrawable = None;
+ oldGC->currentReadable = None;
+
+ if (oldGC->xid == None && oldGC != gc) {
+ /* We are switching away from a context that was
+ * previously destroyed, so we need to free the memory
+ * for the old handle. */
+ oldGC->vtable->destroy(oldGC);
+ }
+ }
}
if (gc) {
- gc->currentDpy = dpy;
- gc->currentDrawable = draw;
- gc->currentReadable = read;
- gc->thread_id = _glthread_GetID();
+ if (gc->thread_refcount++ == 0) {
+ gc->currentDpy = dpy;
+ gc->currentDrawable = draw;
+ gc->currentReadable = read;
+ }
__glXSetCurrentContext(gc);
ret = gc->vtable->bind(gc, oldGC, draw, read);
} else {
__glXSetCurrentContextNull();
}
- if (oldGC != &dummyContext && oldGC->xid == None && oldGC != gc) {
- /* We are switching away from a context that was
- * previously destroyed, so we need to free the memory
- * for the old handle. */
- oldGC->vtable->destroy(oldGC);
- }
+ __glXUnlock();
if (ret) {
- __glXGenerateError(dpy, gc, None, ret, X_GLXMakeContextCurrent);
+ __glXGenerateError(dpy, None, ret, X_GLXMakeContextCurrent);
return GL_FALSE;
}
diff --git a/src/glx/glxext.c b/src/glx/glxext.c
index c5e9d0510b6..e35dcb73e89 100644
--- a/src/glx/glxext.c
+++ b/src/glx/glxext.c
@@ -194,17 +194,7 @@ FreeScreenConfigs(struct glx_display * priv)
screens = ScreenCount(priv->dpy);
for (i = 0; i < screens; i++) {
psc = priv->screens[i];
- if (psc->configs) {
- glx_config_destroy_list(psc->configs);
- if (psc->effectiveGLXexts)
- Xfree(psc->effectiveGLXexts);
- psc->configs = NULL; /* NOTE: just for paranoia */
- }
- if (psc->visuals) {
- glx_config_destroy_list(psc->visuals);
- psc->visuals = NULL; /* NOTE: just for paranoia */
- }
- Xfree((char *) psc->serverGLXexts);
+ glx_screen_cleanup(psc);
#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
if (psc->driScreen) {
@@ -556,6 +546,10 @@ __glXInitializeVisualConfigFromTags(struct glx_config * config, int count,
config->yInverted = *bp++;
break;
#endif
+ case GLX_FRAMEBUFFER_SRGB_CAPABLE_EXT:
+ config->sRGBCapable = *bp++;
+ break;
+
case GLX_USE_GL:
if (fbconfig_style_tags)
bp++;
@@ -688,7 +682,7 @@ static GLboolean
}
else if (strstr(psc->serverGLXexts, "GLX_SGIX_fbconfig") != NULL) {
GetReqExtra(GLXVendorPrivateWithReply,
- sz_xGLXGetFBConfigsSGIXReq +
+ sz_xGLXGetFBConfigsSGIXReq -
sz_xGLXVendorPrivateWithReplyReq, vpreq);
sgi_req = (xGLXGetFBConfigsSGIXReq *) vpreq;
sgi_req->reqType = priv->majorOpcode;
@@ -728,6 +722,22 @@ glx_screen_init(struct glx_screen *psc,
return GL_TRUE;
}
+_X_HIDDEN void
+glx_screen_cleanup(struct glx_screen *psc)
+{
+ if (psc->configs) {
+ glx_config_destroy_list(psc->configs);
+ if (psc->effectiveGLXexts)
+ Xfree(psc->effectiveGLXexts);
+ psc->configs = NULL; /* NOTE: just for paranoia */
+ }
+ if (psc->visuals) {
+ glx_config_destroy_list(psc->visuals);
+ psc->visuals = NULL; /* NOTE: just for paranoia */
+ }
+ Xfree((char *) psc->serverGLXexts);
+}
+
/*
** Allocate the memory for the per screen configs for each screen.
** If that works then fetch the per screen configs data.
diff --git a/src/glx/glxextensions.c b/src/glx/glxextensions.c
index 3a0e64c46d1..d6eb408309c 100644
--- a/src/glx/glxextensions.c
+++ b/src/glx/glxextensions.c
@@ -83,6 +83,7 @@ static const struct extension_info known_glx_extensions[] = {
{ GLX(EXT_visual_info), VER(0,0), Y, Y, N, N },
#endif
{ GLX(EXT_visual_rating), VER(0,0), Y, Y, N, N },
+ { GLX(EXT_framebuffer_sRGB), VER(0,0), Y, Y, N, N },
#ifdef GLX_USE_APPLEGL
{ GLX(MESA_agp_offset), VER(0,0), N, N, N, N }, /* Deprecated */
{ GLX(MESA_copy_sub_buffer), VER(0,0), N, N, N, N },
@@ -90,6 +91,7 @@ static const struct extension_info known_glx_extensions[] = {
{ GLX(MESA_agp_offset), VER(0,0), N, N, N, Y }, /* Deprecated */
{ GLX(MESA_copy_sub_buffer), VER(0,0), Y, N, N, N },
#endif
+ { GLX(MESA_multithread_makecurrent),VER(0,0), Y, N, Y, N },
{ GLX(MESA_pixmap_colormap), VER(0,0), N, N, N, N }, /* Deprecated */
{ GLX(MESA_release_buffers), VER(0,0), N, N, N, N }, /* Deprecated */
#ifdef GLX_USE_APPLEGL
@@ -189,6 +191,7 @@ static const struct extension_info known_gl_extensions[] = {
{ GL(EXT_framebuffer_blit), VER(0,0), Y, N, N, N },
{ GL(EXT_framebuffer_multisample), VER(0,0), Y, N, N, N },
{ GL(EXT_framebuffer_object), VER(0,0), Y, N, N, N },
+ { GL(EXT_framebuffer_sRGB), VER(0,0), Y, N, N, N },
{ GL(EXT_multi_draw_arrays), VER(1,4), Y, N, Y, N },
{ GL(EXT_packed_depth_stencil), VER(0,0), Y, N, N, N },
{ GL(EXT_packed_pixels), VER(1,2), Y, N, N, N },
diff --git a/src/glx/glxextensions.h b/src/glx/glxextensions.h
index 78776618338..4fa7a61d338 100644
--- a/src/glx/glxextensions.h
+++ b/src/glx/glxextensions.h
@@ -40,9 +40,11 @@ enum
EXT_visual_info_bit,
EXT_visual_rating_bit,
EXT_import_context_bit,
+ EXT_framebuffer_sRGB_bit,
MESA_agp_offset_bit,
MESA_copy_sub_buffer_bit,
MESA_depth_float_bit,
+ MESA_multithread_makecurrent_bit,
MESA_pixmap_colormap_bit,
MESA_release_buffers_bit,
MESA_swap_control_bit,
@@ -117,6 +119,7 @@ enum
GL_EXT_framebuffer_blit_bit,
GL_EXT_framebuffer_multisample_bit,
GL_EXT_framebuffer_object_bit,
+ GL_EXT_framebuffer_sRGB_bit,
GL_EXT_multi_draw_arrays_bit,
GL_EXT_packed_depth_stencil_bit,
GL_EXT_packed_pixels_bit,
diff --git a/src/glx/indirect.c b/src/glx/indirect.c
index 49938a167a5..b2675c2958f 100644
--- a/src/glx/indirect.c
+++ b/src/glx/indirect.c
@@ -10657,5 +10657,65 @@ __indirect_glFramebufferTextureLayerEXT(GLenum target, GLenum attachment,
}
+#ifdef GLX_SHARED_GLAPI
+
+static const struct proc_pair {
+ const char *name;
+ _glapi_proc proc;
+} proc_pairs[20] = {
+ {
+ "AreTexturesResidentEXT", (_glapi_proc) glAreTexturesResidentEXT}, {
+ "DeleteTexturesEXT", (_glapi_proc) glDeleteTexturesEXT}, {
+ "GenTexturesEXT", (_glapi_proc) glGenTexturesEXT}, {
+ "GetColorTableEXT", (_glapi_proc) glGetColorTableEXT}, {
+ "GetColorTableParameterfvEXT",
+ (_glapi_proc) glGetColorTableParameterfvEXT}, {
+ "GetColorTableParameterfvSGI",
+ (_glapi_proc) glGetColorTableParameterfvEXT}, {
+ "GetColorTableParameterivEXT",
+ (_glapi_proc) glGetColorTableParameterivEXT}, {
+ "GetColorTableParameterivSGI",
+ (_glapi_proc) glGetColorTableParameterivEXT}, {
+ "GetColorTableSGI", (_glapi_proc) glGetColorTableEXT}, {
+ "GetConvolutionFilterEXT", (_glapi_proc) gl_dispatch_stub_356}, {
+ "GetConvolutionParameterfvEXT", (_glapi_proc) gl_dispatch_stub_357}, {
+ "GetConvolutionParameterivEXT", (_glapi_proc) gl_dispatch_stub_358}, {
+ "GetHistogramEXT", (_glapi_proc) gl_dispatch_stub_361}, {
+ "GetHistogramParameterfvEXT", (_glapi_proc) gl_dispatch_stub_362}, {
+ "GetHistogramParameterivEXT", (_glapi_proc) gl_dispatch_stub_363}, {
+ "GetMinmaxEXT", (_glapi_proc) gl_dispatch_stub_364}, {
+ "GetMinmaxParameterfvEXT", (_glapi_proc) gl_dispatch_stub_365}, {
+ "GetMinmaxParameterivEXT", (_glapi_proc) gl_dispatch_stub_366}, {
+ "GetSeparableFilterEXT", (_glapi_proc) gl_dispatch_stub_359}, {
+ "IsTextureEXT", (_glapi_proc) glIsTextureEXT}
+};
+
+static int
+__indirect_get_proc_compare(const void *key, const void *memb)
+{
+ const struct proc_pair *pair = (const struct proc_pair *) memb;
+ return strcmp((const char *) key, pair->name);
+}
+
+_glapi_proc
+__indirect_get_proc_address(const char *name)
+{
+ const struct proc_pair *pair;
+
+ /* skip "gl" */
+ name += 2;
+
+ pair = (const struct proc_pair *) bsearch((const void *) name,
+ (const void *) proc_pairs,
+ ARRAY_SIZE(proc_pairs),
+ sizeof(proc_pairs[0]),
+ __indirect_get_proc_compare);
+
+ return (pair) ? pair->proc : NULL;
+}
+
+#endif /* GLX_SHARED_GLAPI */
+
+
# undef FASTCALL
# undef NOINLINE
diff --git a/src/glx/indirect.h b/src/glx/indirect.h
index f3222077bf5..b610cc20279 100644
--- a/src/glx/indirect.h
+++ b/src/glx/indirect.h
@@ -715,6 +715,10 @@ extern HIDDEN void __indirect_glRenderbufferStorageEXT(GLenum target, GLenum int
extern HIDDEN void __indirect_glBlitFramebufferEXT(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
extern HIDDEN void __indirect_glFramebufferTextureLayerEXT(GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer);
+#ifdef GLX_SHARED_GLAPI
+extern HIDDEN void (*__indirect_get_proc_address(const char *name))(void);
+#endif
+
# undef HIDDEN
# undef FASTCALL
# undef NOINLINE
diff --git a/src/gralloc/Android.mk b/src/gralloc/Android.mk
index 4125548735b..d440a99308b 100644
--- a/src/gralloc/Android.mk
+++ b/src/gralloc/Android.mk
@@ -1,54 +1,47 @@
+# Android.mk for gralloc
+
LOCAL_PATH := $(call my-dir)
+include $(CLEAR_VARS)
-common_SRC_FILES := \
+LOCAL_SRC_FILES := \
gralloc_gem.c \
gralloc_kms.c \
gralloc_mod.c
-common_C_INCLUDES := \
+LOCAL_C_INCLUDES := \
external/drm \
external/drm/include/drm
-common_SHARED_LIBRARIES := \
+LOCAL_SHARED_LIBRARIES := \
libdrm \
liblog \
- libcutils
-
-ifeq ($(strip $(MESA_BUILD_I915)),true)
-include $(CLEAR_VARS)
-
-LOCAL_SRC_FILES := \
- $(common_SRC_FILES) \
- gralloc_gem_i915.c
-
-LOCAL_C_INCLUDES := \
- $(common_C_INCLUDES) \
- external/drm/intel
-
-LOCAL_SHARED_LIBRARIES := \
- $(common_SHARED_LIBRARIES) \
- libdrm_intel \
- libEGL
-
-LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)/hw
-LOCAL_MODULE := gralloc.i915
-
-include $(BUILD_SHARED_LIBRARY)
-endif # MESA_BUILD_I915
-
-ifeq ($(strip $(MESA_BUILD_GALLIUM)),true)
-include $(CLEAR_VARS)
-
-LOCAL_SRC_FILES := \
- $(common_SRC_FILES) \
- gralloc_gem_pipe.c
-
-LOCAL_C_INCLUDES := \
- $(common_C_INCLUDES) \
+ libcutils \
+ libGLESv1_CM
+
+ifeq ($(strip $(MESA_BUILD_INTEL)),true)
+LOCAL_SRC_FILES += gralloc_gem_intel.c
+LOCAL_C_INCLUDES += external/drm/intel
+LOCAL_CFLAGS += -DENABLE_INTEL
+LOCAL_SHARED_LIBRARIES += libdrm_intel
+endif # MESA_BUILD_INTEL
+
+ifeq ($(strip $(MESA_BUILD_RADEON)),true)
+LOCAL_SRC_FILES += gralloc_gem_radeon.c
+LOCAL_C_INCLUDES += external/drm/radeon
+LOCAL_CFLAGS += -DENABLE_RADEON
+LOCAL_SHARED_LIBRARIES += libdrm_radeon
+endif # MESA_BUILD_INTEL
+
+# this is broken
+ifeq ($(strip $(MESA_BUILD_VMWGFX)),true)
+LOCAL_SRC_FILES += gralloc_gem_pipe.c
+LOCAL_C_INCLUDES += \
external/mesa/src/gallium/include \
external/mesa/src/gallium/auxiliary
+LOCAL_CFLAGS += -DENABLE_VMWGFX
+endif # MESA_BUILD_VMWGFX
-LOCAL_MODULE := libmesa_st_gralloc
+LOCAL_MODULE := gralloc.mesa
+LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)/hw
-include $(BUILD_STATIC_LIBRARY)
-endif # MESA_BUILD_GALLIUM
+include $(BUILD_SHARED_LIBRARY)
diff --git a/src/gralloc/gralloc_gem.c b/src/gralloc/gralloc_gem.c
index a3df97f89bb..be1a77c60ba 100644
--- a/src/gralloc/gralloc_gem.c
+++ b/src/gralloc/gralloc_gem.c
@@ -117,3 +117,70 @@ drm_gem_validate(buffer_handle_t handle)
return bo;
}
+
+static const struct drm_gem_drv *
+get_drv_from_fd(int fd)
+{
+ const struct drm_gem_drv *drv = NULL;
+ drmVersionPtr version;
+
+ version = drmGetVersion(fd);
+ if (!version) {
+ LOGE("invalid DRM fd");
+ return NULL;
+ }
+
+ if (version->name) {
+#ifdef ENABLE_INTEL
+ if (!drv && !strcmp(version->name, "i915"))
+ drv = &drm_gem_drv_intel;
+#endif
+#ifdef ENABLE_RADEON
+ if (!drv && !strcmp(version->name, "radeon"))
+ drv = &drm_gem_drv_radeon;
+#endif
+#ifdef ENABLE_VMWGFX
+ if (!drv && !strcmp(version->name, "vmwgfx"))
+ drv = &drm_gem_drv_pipe;
+#endif
+ }
+
+ if (!drv)
+ LOGE("unknown driver: %s", (version->name) ? version->name : "NULL");
+
+ drmFreeVersion(version);
+
+ return drv;
+}
+
+static int
+drm_gem_drv_init_locked(struct drm_module_t *drm)
+{
+ const struct drm_gem_drv *drv;
+ int ret;
+
+ if (drm->gem)
+ return 0;
+
+ drv = get_drv_from_fd(drm->fd);
+ if (!drv)
+ return -EINVAL;
+
+ ret = drv->init(drm);
+ if (!ret)
+ drm->drv = (void *) drv;
+
+ return ret;
+}
+
+int
+drm_gem_drv_init(struct drm_module_t *drm)
+{
+ int ret;
+
+ pthread_mutex_lock(&drm->mutex);
+ ret = drm_gem_drv_init_locked(drm);
+ pthread_mutex_unlock(&drm->mutex);
+
+ return ret;
+}
diff --git a/src/gralloc/gralloc_gem.h b/src/gralloc/gralloc_gem.h
index e6ef176efa2..f8fa1e069d3 100644
--- a/src/gralloc/gralloc_gem.h
+++ b/src/gralloc/gralloc_gem.h
@@ -56,22 +56,56 @@ drm_gem_validate(buffer_handle_t handle);
struct drm_bo_t *
drm_gem_create_bo(int width, int height, int format, int usage);
-
int
drm_gem_drv_init(struct drm_module_t *drm);
-struct drm_bo_t *
+
+struct drm_gem_drv {
+ int (*init)(struct drm_module_t *drm);
+
+ struct drm_bo_t *(*alloc)(struct drm_module_t *drm, int width, int height,
+ int format, int usage, int *stride);
+
+ void (*free)(struct drm_module_t *drm, struct drm_bo_t *bo);
+
+ int (*map)(struct drm_module_t *drm, struct drm_bo_t *bo,
+ int x, int y, int w, int h, int enable_write, void **addr);
+
+ void (*unmap)(struct drm_module_t *drm, struct drm_bo_t *bo);
+};
+
+extern const struct drm_gem_drv drm_gem_drv_intel;
+extern const struct drm_gem_drv drm_gem_drv_radeon;
+extern const struct drm_gem_drv drm_gem_drv_pipe;
+
+static inline struct drm_bo_t *
drm_gem_drv_alloc(struct drm_module_t *drm, int width, int height,
- int format, int usage, int *stride);
+ int format, int usage, int *stride)
+{
+ const struct drm_gem_drv *drv = (const struct drm_gem_drv *) drm->drv;
+ return drv->alloc(drm, width, height, format, usage, stride);
+}
-void
-drm_gem_drv_free(struct drm_module_t *drm, struct drm_bo_t *bo);
+static inline void
+drm_gem_drv_free(struct drm_module_t *drm, struct drm_bo_t *bo)
+{
+ const struct drm_gem_drv *drv = (const struct drm_gem_drv *) drm->drv;
+ drv->free(drm, bo);
+}
-int
+static inline int
drm_gem_drv_map(struct drm_module_t *drm, struct drm_bo_t *bo,
- int x, int y, int w, int h, int enable_write, void **addr);
+ int x, int y, int w, int h, int enable_write, void **addr)
+{
+ const struct drm_gem_drv *drv = (const struct drm_gem_drv *) drm->drv;
+ return drv->map(drm, bo, x, y, w, h, enable_write, addr);
+}
-void
-drm_gem_drv_unmap(struct drm_module_t *drm, struct drm_bo_t *bo);
+static inline void
+drm_gem_drv_unmap(struct drm_module_t *drm, struct drm_bo_t *bo)
+{
+ const struct drm_gem_drv *drv = (const struct drm_gem_drv *) drm->drv;
+ drv->unmap(drm, bo);
+}
#endif /* _GRALLOC_GEM_H_ */
diff --git a/src/gralloc/gralloc_gem_i915.c b/src/gralloc/gralloc_gem_intel.c
index 2822fe5c127..5cd765b562c 100644
--- a/src/gralloc/gralloc_gem_i915.c
+++ b/src/gralloc/gralloc_gem_intel.c
@@ -11,7 +11,7 @@
#include "gralloc_gem.h"
static void
-drm_gem_drv_init_features_locked(struct drm_module_t *drm)
+drm_gem_intel_init_features(struct drm_module_t *drm)
{
struct drm_i915_getparam gp;
@@ -27,6 +27,8 @@ drm_gem_drv_init_features_locked(struct drm_module_t *drm)
else
drm->mode_page_flip = 0;
+ drm->mode_page_flip_blocking = 0;
+
if (drm->resources) {
int pipe;
@@ -40,38 +42,22 @@ drm_gem_drv_init_features_locked(struct drm_module_t *drm)
/* XXX there is a bug in the kernel module */
drm->mode_page_flip = 0;
-
}
static int
-drm_gem_drv_init_locked(struct drm_module_t *drm)
+drm_gem_intel_init(struct drm_module_t *drm)
{
- if (drm->gem)
- return 0;
-
drm->gem = (void *) drm_intel_bufmgr_gem_init(drm->fd, 16 * 1024);
if (!drm->gem) {
LOGE("failed to create buffer manager");
return -ENOMEM;
}
- drm_gem_drv_init_features_locked(drm);
+ drm_gem_intel_init_features(drm);
return 0;
}
-int
-drm_gem_drv_init(struct drm_module_t *drm)
-{
- int ret;
-
- pthread_mutex_lock(&drm->mutex);
- ret = drm_gem_drv_init_locked(drm);
- pthread_mutex_unlock(&drm->mutex);
-
- return ret;
-}
-
static uint32_t
drm_gem_get_tiling(struct drm_bo_t *bo)
{
@@ -89,9 +75,9 @@ drm_gem_get_tiling(struct drm_bo_t *bo)
return tiling;
}
-struct drm_bo_t *
-drm_gem_drv_alloc(struct drm_module_t *drm, int width, int height,
- int format, int usage, int *stride)
+static struct drm_bo_t *
+drm_gem_intel_alloc(struct drm_module_t *drm, int width, int height,
+ int format, int usage, int *stride)
{
drm_intel_bufmgr *bufmgr = (drm_intel_bufmgr *) drm->gem;
struct drm_bo_t *bo;
@@ -161,16 +147,16 @@ drm_gem_drv_alloc(struct drm_module_t *drm, int width, int height,
return bo;
}
-void
-drm_gem_drv_free(struct drm_module_t *drm, struct drm_bo_t *bo)
+static void
+drm_gem_intel_free(struct drm_module_t *drm, struct drm_bo_t *bo)
{
drm_intel_bo_unreference((drm_intel_bo *) bo->data);
free(bo);
}
-int
-drm_gem_drv_map(struct drm_module_t *drm, struct drm_bo_t *bo,
- int x, int y, int w, int h, int enable_write, void **addr)
+static int
+drm_gem_intel_map(struct drm_module_t *drm, struct drm_bo_t *bo,
+ int x, int y, int w, int h, int enable_write, void **addr)
{
drm_intel_bo *ibo = (drm_intel_bo *) bo->data;
int err;
@@ -198,8 +184,8 @@ drm_gem_drv_map(struct drm_module_t *drm, struct drm_bo_t *bo,
return err;
}
-void
-drm_gem_drv_unmap(struct drm_module_t *drm, struct drm_bo_t *bo)
+static void
+drm_gem_intel_unmap(struct drm_module_t *drm, struct drm_bo_t *bo)
{
drm_intel_bo *ibo = (drm_intel_bo *) bo->data;
@@ -209,3 +195,11 @@ drm_gem_drv_unmap(struct drm_module_t *drm, struct drm_bo_t *bo)
else
drm_intel_bo_unmap(ibo);
}
+
+const struct drm_gem_drv drm_gem_drv_intel = {
+ .init = drm_gem_intel_init,
+ .alloc = drm_gem_intel_alloc,
+ .free = drm_gem_intel_free,
+ .map = drm_gem_intel_map,
+ .unmap = drm_gem_intel_unmap,
+};
diff --git a/src/gralloc/gralloc_gem_pipe.c b/src/gralloc/gralloc_gem_pipe.c
index 99a84616273..74b35d05375 100644
--- a/src/gralloc/gralloc_gem_pipe.c
+++ b/src/gralloc/gralloc_gem_pipe.c
@@ -26,10 +26,11 @@ struct drm_pipe_buffer {
};
static void
-drm_gem_drv_init_features_locked(struct drm_module_t *drm)
+drm_gem_pipe_init_features(struct drm_module_t *drm)
{
drm->mode_dirty_fb = 0;
drm->mode_page_flip = 0;
+ drm->mode_page_flip_blocking = 0;
if (strcmp(driver_descriptor.driver_name, "vmwgfx") == 0)
drm->mode_dirty_fb = 1;
@@ -38,13 +39,10 @@ drm_gem_drv_init_features_locked(struct drm_module_t *drm)
}
static int
-drm_gem_drv_init_locked(struct drm_module_t *drm)
+drm_gem_pipe_init(struct drm_module_t *drm)
{
struct drm_pipe_manager *pm;
- if (drm->gem)
- return 0;
-
pm = CALLOC(1, sizeof(*pm));
if (!pm)
return -ENOMEM;
@@ -60,23 +58,11 @@ drm_gem_drv_init_locked(struct drm_module_t *drm)
drm->gem = (void *) pm;
- drm_gem_drv_init_features_locked(drm);
+ drm_gem_pipe_init_features(drm);
return 0;
}
-int
-drm_gem_drv_init(struct drm_module_t *drm)
-{
- int ret;
-
- pthread_mutex_lock(&drm->mutex);
- ret = drm_gem_drv_init_locked(drm);
- pthread_mutex_unlock(&drm->mutex);
-
- return ret;
-}
-
static enum pipe_format
get_pipe_format(int format)
{
@@ -144,7 +130,7 @@ get_pipe_buffer(struct drm_pipe_manager *pm, int width, int height,
if (templ.format == PIPE_FORMAT_NONE ||
!pm->screen->is_format_supported(pm->screen, templ.format,
- templ.target, 0, templ.bind, 0)) {
+ templ.target, 0, templ.bind)) {
LOGE("unsupported format 0x%x", format);
return NULL;
}
@@ -198,9 +184,9 @@ fail:
return NULL;
}
-struct drm_bo_t *
-drm_gem_drv_alloc(struct drm_module_t *drm, int width, int height,
- int format, int usage, int *stride)
+static struct drm_bo_t *
+drm_gem_pipe_alloc(struct drm_module_t *drm, int width, int height,
+ int format, int usage, int *stride)
{
struct drm_pipe_manager *pm = (struct drm_pipe_manager *) drm->gem;
struct drm_pipe_buffer *buf;
@@ -232,8 +218,8 @@ drm_gem_drv_alloc(struct drm_module_t *drm, int width, int height,
return bo;
}
-void
-drm_gem_drv_free(struct drm_module_t *drm, struct drm_bo_t *bo)
+static void
+drm_gem_pipe_free(struct drm_module_t *drm, struct drm_bo_t *bo)
{
struct drm_pipe_manager *pm = (struct drm_pipe_manager *) drm->gem;
struct drm_pipe_buffer *buf = (struct drm_pipe_buffer *) bo->data;
@@ -250,9 +236,9 @@ drm_gem_drv_free(struct drm_module_t *drm, struct drm_bo_t *bo)
free(bo);
}
-int
-drm_gem_drv_map(struct drm_module_t *drm, struct drm_bo_t *bo,
- int x, int y, int w, int h, int enable_write, void **addr)
+static int
+drm_gem_pipe_map(struct drm_module_t *drm, struct drm_bo_t *bo,
+ int x, int y, int w, int h, int enable_write, void **addr)
{
struct drm_pipe_manager *pm = (struct drm_pipe_manager *) drm->gem;
struct drm_pipe_buffer *buf = (struct drm_pipe_buffer *) bo->data;
@@ -313,8 +299,8 @@ drm_gem_drv_map(struct drm_module_t *drm, struct drm_bo_t *bo,
return ret;
}
-void
-drm_gem_drv_unmap(struct drm_module_t *drm, struct drm_bo_t *bo)
+static void
+drm_gem_pipe_unmap(struct drm_module_t *drm, struct drm_bo_t *bo)
{
struct drm_pipe_manager *pm = (struct drm_pipe_manager *) drm->gem;
struct drm_pipe_buffer *buf = (struct drm_pipe_buffer *) bo->data;
@@ -327,7 +313,15 @@ drm_gem_drv_unmap(struct drm_module_t *drm, struct drm_bo_t *bo)
pipe_transfer_destroy(pm->context, buf->transfer);
buf->transfer = NULL;
- pm->context->flush(pm->context, PIPE_FLUSH_RENDER_CACHE, NULL);
+ pm->context->flush(pm->context, NULL);
pthread_mutex_unlock(&pm->mutex);
}
+
+const struct drm_gem_drv drm_gem_drv_pipe = {
+ .init = drm_gem_pipe_init,
+ .alloc = drm_gem_pipe_alloc,
+ .free = drm_gem_pipe_free,
+ .map = drm_gem_pipe_map,
+ .unmap = drm_gem_pipe_unmap,
+};
diff --git a/src/gralloc/gralloc_gem_radeon.c b/src/gralloc/gralloc_gem_radeon.c
new file mode 100644
index 00000000000..469a1488a0a
--- /dev/null
+++ b/src/gralloc/gralloc_gem_radeon.c
@@ -0,0 +1,362 @@
+/*
+ * Based on xf86-video-ati, which is
+ *
+ * Copyright © 2009 Red Hat, Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * Authors:
+ * Dave Airlie <airlied@redhat.com>
+ */
+
+/*
+ * XXX This driver assumes evergreen. It works, but is slow and has sync
+ * issues.
+ */
+
+#define LOG_TAG "GRALLOC-RADEON"
+
+#include <cutils/log.h>
+#include <stdlib.h>
+#include <errno.h>
+#include <drm.h>
+#include <radeon_drm.h>
+#include <radeon_bo_gem.h>
+#include <radeon_bo.h>
+
+#include "gralloc_mod.h"
+#include "gralloc_gem.h"
+
+#define RADEON_GPU_PAGE_SIZE 4096
+
+#define MAX(a, b) (((a) > (b)) ? (a) : (b))
+#define ALIGN(val, align) (((val) + (align) - 1) & ~((align) - 1))
+
+struct radeon_info {
+ struct drm_module_t *drm;
+ struct radeon_bo_manager *bufmgr;
+
+ uint32_t tile_config;
+ int num_channels;
+ int num_banks;
+ int group_bytes;
+ /* r6xx+ tile config */
+ int have_tiling_info;
+ int allow_color_tiling;
+};
+
+static int
+eg_init_tile_config(struct radeon_info *info)
+{
+ struct drm_radeon_info ginfo;
+ uint32_t val;
+ int ret;
+
+ memset(&ginfo, 0, sizeof(ginfo));
+ ginfo.request = RADEON_INFO_TILING_CONFIG;
+ ginfo.value = (long) &val;
+ ret = drmCommandWriteRead(info->drm->fd, DRM_RADEON_INFO, &ginfo, sizeof(ginfo));
+ if (ret)
+ return ret;
+
+ info->tile_config = val;
+
+ switch (info->tile_config & 0xf) {
+ case 0:
+ info->num_channels = 1;
+ break;
+ case 1:
+ info->num_channels = 2;
+ break;
+ case 2:
+ info->num_channels = 4;
+ break;
+ case 3:
+ info->num_channels = 8;
+ break;
+ default:
+ return -EINVAL;
+ break;
+ }
+
+ info->num_banks = (info->tile_config & 0xf0) >> 4;
+
+ switch ((info->tile_config & 0xf00) >> 8) {
+ case 0:
+ info->group_bytes = 256;
+ break;
+ case 1:
+ info->group_bytes = 512;
+ break;
+ default:
+ return -EINVAL;
+ break;
+ }
+
+ info->have_tiling_info = 1;
+ info->allow_color_tiling = 0;
+
+ return 0;
+}
+
+/* returns pitch alignment in pixels */
+static int
+eg_get_pitch_align(struct radeon_info *info, int bpe, uint32_t tiling)
+{
+ int pitch_align = 1;
+
+ if (tiling & RADEON_TILING_MACRO) {
+ /* general surface requirements */
+ pitch_align = MAX(info->num_banks,
+ (((info->group_bytes / 8) / bpe) * info->num_banks)) * 8;
+ /* further restrictions for scanout */
+ pitch_align = MAX(info->num_banks * 8, pitch_align);
+ } else if (tiling & RADEON_TILING_MICRO) {
+ /* general surface requirements */
+ pitch_align = MAX(8, (info->group_bytes / (8 * bpe)));
+ /* further restrictions for scanout */
+ pitch_align = MAX(info->group_bytes / bpe, pitch_align);
+ } else {
+ if (info->have_tiling_info)
+ /* linear aligned requirements */
+ pitch_align = MAX(64, info->group_bytes / bpe);
+ else
+ /* default to 512 elements if we don't know the real
+ * group size otherwise the kernel may reject the CS
+ * if the group sizes don't match as the pitch won't
+ * be aligned properly.
+ */
+ pitch_align = 512;
+ }
+
+ return pitch_align;
+}
+
+/* returns height alignment in pixels */
+static int
+eg_get_height_align(struct radeon_info *info, uint32_t tiling)
+{
+ int height_align = 1;
+
+ if (tiling & RADEON_TILING_MACRO)
+ height_align = info->num_channels * 8;
+ else if (tiling & RADEON_TILING_MICRO)
+ height_align = 8;
+ else
+ height_align = 8;
+
+ return height_align;
+}
+
+/* returns base alignment in bytes */
+static int
+eg_get_base_align(struct radeon_info *info, int bpe, uint32_t tiling)
+{
+ int pixel_align = eg_get_pitch_align(info, bpe, tiling);
+ int height_align = eg_get_height_align(info, tiling);
+ int base_align = RADEON_GPU_PAGE_SIZE;
+
+ if (tiling & RADEON_TILING_MACRO) {
+ base_align = MAX(info->num_banks * info->num_channels * 8 * 8 * bpe,
+ pixel_align * bpe * height_align);
+ }
+ else {
+ if (info->have_tiling_info)
+ base_align = info->group_bytes;
+ else
+ /* default to 512 if we don't know the real
+ * group size otherwise the kernel may reject the CS
+ * if the group sizes don't match as the base won't
+ * be aligned properly.
+ */
+ base_align = 512;
+ }
+
+ return base_align;
+}
+
+static void
+drm_gem_radeon_init_features(struct drm_module_t *drm)
+{
+ drm->mode_dirty_fb = 0;
+ drm->mode_page_flip = 1;
+ drm->mode_page_flip_blocking = 1;
+ drm->swap_interval = 1;
+ drm->vblank_secondary = 0;
+}
+
+static int
+drm_gem_radeon_init(struct drm_module_t *drm)
+{
+ struct radeon_info *info;
+ int ret;
+
+ info = calloc(1, sizeof(*info));
+ if (!info)
+ return -ENOMEM;
+
+ info->drm = drm;
+ info->bufmgr = radeon_bo_manager_gem_ctor(info->drm->fd);
+ if (!info->bufmgr) {
+ LOGE("failed to create buffer manager");
+ free(info);
+ return -ENOMEM;
+ }
+
+
+ drm->gem = (void *) info;
+
+ ret = eg_init_tile_config(info);
+ if (ret) {
+ radeon_bo_manager_gem_dtor(info->bufmgr);
+ free(info);
+ return ret;
+ }
+
+ drm_gem_radeon_init_features(drm);
+
+ return 0;
+}
+
+static uint32_t
+drm_gem_get_tiling(struct drm_bo_t *bo)
+{
+ return 0;
+}
+
+static struct drm_bo_t *
+drm_gem_radeon_alloc(struct drm_module_t *drm, int width, int height,
+ int format, int usage, int *stride)
+{
+ struct radeon_info *info = (struct radeon_info *) drm->gem;
+ struct drm_bo_t *bo;
+ struct radeon_bo *rbo;
+ int aligned_width, aligned_height, cpp;
+ int pitch, size, base_align;
+ uint32_t tiling, domain;
+
+ bo = drm_gem_create_bo(width, height, format, usage);
+ if (!bo)
+ return NULL;
+
+ cpp = drm_mod_get_bpp(format);
+ if (!cpp) {
+ LOGE("unrecognized format 0x%x", format);
+ free(bo);
+ return NULL;
+ }
+
+ tiling = drm_gem_get_tiling(bo);
+ domain = RADEON_GEM_DOMAIN_VRAM;
+
+ if (usage & (GRALLOC_USAGE_HW_FB | GRALLOC_USAGE_HW_TEXTURE)) {
+ aligned_width = ALIGN(width, eg_get_pitch_align(info, cpp, tiling));
+ aligned_height = ALIGN(height, eg_get_height_align(info, tiling));
+ }
+ else {
+ aligned_width = width;
+ aligned_height = height;
+ }
+
+ if (!(usage & (GRALLOC_USAGE_HW_FB | GRALLOC_USAGE_HW_RENDER)) &&
+ (usage & GRALLOC_USAGE_SW_READ_OFTEN))
+ domain = RADEON_GEM_DOMAIN_GTT;
+
+ pitch = aligned_width * cpp;
+ size = ALIGN(aligned_height * pitch, RADEON_GPU_PAGE_SIZE);
+ base_align = eg_get_base_align(info, cpp, tiling);
+
+ rbo = radeon_bo_open(info->bufmgr, 0, size, base_align, domain, 0);
+ if (!rbo) {
+ LOGE("failed to allocate rbo %dx%dx%d", width, height, cpp);
+ free(bo);
+ return NULL;
+ }
+
+ if (tiling)
+ radeon_bo_set_tiling(rbo, tiling, pitch);
+
+ if (bo->usage & GRALLOC_USAGE_HW_FB) {
+ bo->stride = pitch;
+ bo->fb_handle = rbo->handle;
+ }
+
+ if (radeon_gem_get_kernel_name(rbo, (uint32_t *) &bo->name)) {
+ LOGE("failed to flink rbo");
+ radeon_bo_unref(rbo);
+ free(bo);
+ return NULL;
+ }
+
+ bo->data = (int) rbo;
+
+ *stride = pitch;
+
+ return bo;
+}
+
+static void
+drm_gem_radeon_free(struct drm_module_t *drm, struct drm_bo_t *bo)
+{
+ radeon_bo_unref((struct radeon_bo *) bo->data);
+ free(bo);
+}
+
+static int
+drm_gem_radeon_map(struct drm_module_t *drm, struct drm_bo_t *bo,
+ int x, int y, int w, int h, int enable_write, void **addr)
+{
+ struct radeon_bo *rbo = (struct radeon_bo *) bo->data;
+ int err;
+
+ if (!rbo) {
+ struct radeon_info *info = (struct radeon_info *) drm->gem;
+
+ rbo = radeon_bo_open(info->bufmgr, bo->name, 0, 0, RADEON_GEM_DOMAIN_VRAM, 0);
+ if (!rbo) {
+ LOGE("failed to create rbo from name %u", bo->name);
+ return -EINVAL;
+ }
+
+ bo->data = (int) rbo;
+ }
+
+ err = radeon_bo_map(rbo, enable_write);
+ if (!err)
+ *addr = rbo->ptr;
+
+ return err;
+}
+
+static void
+drm_gem_radeon_unmap(struct drm_module_t *drm, struct drm_bo_t *bo)
+{
+ struct radeon_bo *rbo = (struct radeon_bo *) bo->data;
+
+ radeon_bo_unmap(rbo);
+}
+
+const struct drm_gem_drv drm_gem_drv_radeon = {
+ .init = drm_gem_radeon_init,
+ .alloc = drm_gem_radeon_alloc,
+ .free = drm_gem_radeon_free,
+ .map = drm_gem_radeon_map,
+ .unmap = drm_gem_radeon_unmap,
+};
diff --git a/src/gralloc/gralloc_kms.c b/src/gralloc/gralloc_kms.c
index 6ae9446244d..7bc65b34382 100644
--- a/src/gralloc/gralloc_kms.c
+++ b/src/gralloc/gralloc_kms.c
@@ -63,28 +63,52 @@ drm_kms_set_crtc(struct drm_module_t *drm, struct drm_bo_t *bo)
return ret;
}
+static void page_flip_handler(int fd, unsigned int sequence,
+ unsigned int tv_sec, unsigned int tv_usec,
+ void *user_data)
+{
+ struct drm_module_t *drm = (struct drm_module_t *) user_data;
+
+ drm->flip_pending = 0;
+}
+
static int
drm_kms_page_flip(struct drm_module_t *drm, struct drm_bo_t *bo)
{
- int waits = 3, ret;
+ int retries = 3, ret;
if (drm->swap_interval > 1)
drm_kms_wait_vblank(drm, drm->swap_interval - 1);
- while (waits) {
- ret = drmModePageFlip(drm->fd, drm->crtc_id, bo->fb_id, 0x0, NULL);
- if (ret && errno == -EBUSY) {
+ /* TODO throttle page flip instead of retrying here */
+ while (retries) {
+ ret = drmModePageFlip(drm->fd, drm->crtc_id, bo->fb_id,
+ DRM_MODE_PAGE_FLIP_EVENT, (void *) drm);
+ if (ret && errno == EBUSY) {
if (drm->swap_interval)
drm_kms_wait_vblank(drm, 1);
else
usleep(5000);
- waits--;
+ retries--;
}
else {
+ if (!ret)
+ drm->flip_pending = 1;
break;
}
}
+ if (drm->mode_page_flip_blocking && drm->flip_pending) {
+ drmEventContext ctx;
+
+ memset(&ctx, 0, sizeof(ctx));
+ ctx.version = DRM_EVENT_CONTEXT_VERSION;
+ ctx.page_flip_handler = page_flip_handler;
+
+ while (drm->flip_pending)
+ drmHandleEvent(drm->fd, &ctx);
+ }
+
if (ret)
LOGE("failed to perform page flip");
@@ -202,8 +226,10 @@ drm_kms_init_locked(struct drm_module_t *drm)
return 0;
drm->resources = drmModeGetResources(drm->fd);
- if (!drm->resources)
+ if (!drm->resources) {
+ LOGE("failed to get modeset resources");
return -EINVAL;
+ }
for (i = 0; i < drm->resources->count_connectors; i++) {
drmModeConnectorPtr connector;
diff --git a/src/gralloc/gralloc_mod.c b/src/gralloc/gralloc_mod.c
index 1296d2af042..bc0786eb3ea 100644
--- a/src/gralloc/gralloc_mod.c
+++ b/src/gralloc/gralloc_mod.c
@@ -222,11 +222,17 @@ drm_mod_post_fb0(struct framebuffer_device_t *fb, buffer_handle_t handle)
return drm_kms_post(drm, bo);
}
-#include <EGL/egl.h>
+#include <GLES/gl.h>
static int
drm_mod_composition_complete_fb0(struct framebuffer_device_t *fb)
{
- eglWaitClient();
+ struct drm_module_t *drm = (struct drm_module_t *) fb->common.module;
+
+ if (drm->mode_page_flip)
+ glFlush();
+ else
+ glFinish();
+
return 0;
}
diff --git a/src/gralloc/gralloc_mod.h b/src/gralloc/gralloc_mod.h
index e06ec864ad8..33f6e9a91de 100644
--- a/src/gralloc/gralloc_mod.h
+++ b/src/gralloc/gralloc_mod.h
@@ -26,13 +26,16 @@ struct drm_module_t {
#endif
/* initialized by drm_gem_drv_init */
+ void *drv;
void *gem;
int mode_dirty_fb;
int mode_page_flip;
+ int mode_page_flip_blocking; /* page flip should block */
int swap_interval;
int vblank_secondary;
int first_post;
+ int flip_pending;
};
static inline int
diff --git a/src/mapi/Android.mk b/src/mapi/Android.mk
index 7a61d1571a4..5af2988e80f 100644
--- a/src/mapi/Android.mk
+++ b/src/mapi/Android.mk
@@ -1,46 +1,23 @@
+# Android.mk for glapi
+
LOCAL_PATH := $(call my-dir)
-include $(LOCAL_PATH)/glapi/sources.mak
+include $(CLEAR_VARS)
+
include $(LOCAL_PATH)/mapi/sources.mak
-glapi_SOURCES := \
- $(addprefix glapi/, $(GLAPI_SOURCES)) \
- $(addprefix mapi/, $(MAPI_GLAPI_SOURCES))
+LOCAL_SRC_FILES := $(addprefix mapi/, $(MAPI_GLAPI_SOURCES))
-glapi_CFLAGS := \
+LOCAL_CFLAGS := \
-DPTHREADS \
- -DMAPI_GLAPI_CURRENT \
+ -DMAPI_MODE_GLAPI \
+ -DMAPI_ABI_HEADER=\"shared-glapi/glapi_mapi_tmp.h\" \
-fvisibility=hidden \
-Wno-sign-compare
-glapi_C_INCLUDES := \
+LOCAL_C_INCLUDES := \
external/mesa/include \
external/mesa/src/mapi
-# use x86 assembly to generate ES2 entries on the fly
-glapi_SOURCES += \
- $(addprefix es1api/glapi/, $(X86_API))
-glapi_CFLAGS += \
- -DUSE_X86_ASM
-glapi_C_INCLUDES += \
- external/mesa/src/mesa
-
-include $(CLEAR_VARS)
-
-LOCAL_MODULE := libmesa_glapi
-
-LOCAL_SRC_FILES := $(glapi_SOURCES)
-LOCAL_CFLAGS := $(glapi_CFLAGS)
-
-## generate glapi headers
-#intermediates := $(call local-intermediates-dir)
-#glapi_OUT := $(intermediates)/es1api
-#glapi_XML := $(LOCAL_PATH)/glapi/gen-es/es1_API.xml
-#include $(LOCAL_PATH)/generate_glapi.mk
-#
-## depend on the generated headers
-#$(intermediates)/%.o: $(LOCAL_GENERATED_SOURCES)
-glapi_OUT := external/mesa/src/mapi/es1api
-
-LOCAL_C_INCLUDES := $(glapi_OUT) $(glapi_C_INCLUDES)
+LOCAL_MODULE := libglapi
-include $(BUILD_STATIC_LIBRARY)
+include $(BUILD_SHARED_LIBRARY)
diff --git a/src/mapi/es1api/.gitignore b/src/mapi/es1api/.gitignore
new file mode 100644
index 00000000000..b21f1d14c6f
--- /dev/null
+++ b/src/mapi/es1api/.gitignore
@@ -0,0 +1,4 @@
+glapi_mapi_tmp.h
+glapi-stamp
+glapi
+main
diff --git a/src/mapi/es1api/Makefile b/src/mapi/es1api/Makefile
index 576ac5afdc3..aef694866c2 100644
--- a/src/mapi/es1api/Makefile
+++ b/src/mapi/es1api/Makefile
@@ -7,27 +7,27 @@ include $(TOP)/configs/current
ifeq ($(ES),)
ES := es1
-GLES_HEADER := GLES
-GLES_PC := glesv1_cm.pc
-
-GLES_LIB := $(GLESv1_CM_LIB)
-GLES_LIB_NAME := $(GLESv1_CM_LIB_NAME)
-GLES_LIB_GLOB := $(GLESv1_CM_LIB_GLOB)
-GLES_LIB_DEPS := $(GLESv1_CM_LIB_DEPS)
-GLES_LIB_MAJOR := 1
-GLES_LIB_MINOR := 1
-GLES_LIB_PATCH := 0
+esapi_HEADER := GLES
+esapi_PC := glesv1_cm.pc
+
+esapi_LIB := $(GLESv1_CM_LIB)
+esapi_LIB_NAME := $(GLESv1_CM_LIB_NAME)
+esapi_LIB_GLOB := $(GLESv1_CM_LIB_GLOB)
+esapi_LIB_DEPS := $(GLESv1_CM_LIB_DEPS)
+esapi_LIB_MAJOR := 1
+esapi_LIB_MINOR := 1
+esapi_LIB_PATCH := 0
else
-GLES_HEADER := GLES2
-GLES_PC := glesv2.pc
-
-GLES_LIB := $(GLESv2_LIB)
-GLES_LIB_NAME := $(GLESv2_LIB_NAME)
-GLES_LIB_GLOB := $(GLESv2_LIB_GLOB)
-GLES_LIB_DEPS := $(GLESv2_LIB_DEPS)
-GLES_LIB_MAJOR := 2
-GLES_LIB_MINOR := 0
-GLES_LIB_PATCH := 0
+esapi_HEADER := GLES2
+esapi_PC := glesv2.pc
+
+esapi_LIB := $(GLESv2_LIB)
+esapi_LIB_NAME := $(GLESv2_LIB_NAME)
+esapi_LIB_GLOB := $(GLESv2_LIB_GLOB)
+esapi_LIB_DEPS := $(GLESv2_LIB_DEPS)
+esapi_LIB_MAJOR := 2
+esapi_LIB_MINOR := 0
+esapi_LIB_PATCH := 0
endif
ESAPI = $(ES)api
@@ -37,51 +37,40 @@ MAPI := $(TOP)/src/mapi/mapi
# directory for generated sources/headers
GEN := glapi
-include $(GLAPI)/sources.mak
-GLAPI_OBJECTS := $(GLAPI_SOURCES:.c=.o)
-GLAPI_SOURCES := $(addprefix $(GLAPI)/, $(GLAPI_SOURCES))
-GLAPI_ASM_OBJECTS := $(GLAPI_ASM_SOURCES:.S=.o)
-GLAPI_ASM_SOURCES := $(addprefix $(GEN)/, $(GLAPI_ASM_SOURCES))
+esapi_CPPFLAGS := \
+ -I$(TOP)/include \
+ -I$(TOP)/src/mapi \
+ -DMAPI_ABI_HEADER=\"$(ESAPI)/glapi_mapi_tmp.h\"
include $(MAPI)/sources.mak
-MAPI_GLAPI_OBJECTS := $(MAPI_GLAPI_SOURCES:.c=.o)
-MAPI_GLAPI_SOURCES := $(addprefix $(MAPI)/, $(MAPI_GLAPI_SOURCES))
-
-ESAPI_OBJECTS = $(GLAPI_OBJECTS) $(GLAPI_ASM_OBJECTS) $(MAPI_GLAPI_OBJECTS)
+esapi_SOURCES := $(addprefix $(MAPI)/, $(MAPI_BRIDGE_SOURCES))
+esapi_OBJECTS := $(MAPI_BRIDGE_SOURCES:.c=.o)
+esapi_CPPFLAGS += -DMAPI_MODE_BRIDGE
-INCLUDE_DIRS = \
- -I$(TOP)/include \
- -I$(TOP)/src/mapi/$(ESAPI) \
- -I$(TOP)/src/mapi \
- -I$(TOP)/src/mesa
+esapi_LIB_DEPS := -L$(TOP)/$(LIB_DIR) -l$(GLAPI_LIB) $(esapi_LIB_DEPS)
.PHONY: default
-default: depend $(TOP)/$(LIB_DIR)/$(GLES_LIB_NAME)
-
-$(TOP)/$(LIB_DIR)/$(GLES_LIB_NAME): $(ESAPI_OBJECTS)
- $(MKLIB) -o $(GLES_LIB) -linker '$(CC)' -ldflags '$(LDFLAGS)' \
- -major $(GLES_LIB_MAJOR) \
- -minor $(GLES_LIB_MINOR) \
- -patch $(GLES_LIB_PATCH) \
- -id $(INSTALL_LIB_DIR)/lib$(GLES_LIB).$(GLES_LIB_MAJOR).dylib \
+default: depend $(TOP)/$(LIB_DIR)/$(esapi_LIB_NAME)
+
+$(TOP)/$(LIB_DIR)/$(esapi_LIB_NAME): $(esapi_OBJECTS)
+ $(MKLIB) -o $(esapi_LIB) -linker '$(CC)' -ldflags '$(LDFLAGS)' \
+ -major $(esapi_LIB_MAJOR) \
+ -minor $(esapi_LIB_MINOR) \
+ -patch $(esapi_LIB_PATCH) \
+ -id $(INSTALL_LIB_DIR)/lib$(esapi_LIB).$(esapi_LIB_MAJOR).dylib \
$(MKLIB_OPTIONS) -install $(TOP)/$(LIB_DIR) \
- $(ESAPI_OBJECTS) $(GLES_LIB_DEPS)
+ $(esapi_OBJECTS) $(esapi_LIB_DEPS)
# not used, but kept for completeness
-lib$(ESAPI).a: $(ESAPI_OBJECTS)
- @$(MKLIB) -o $(ESAPI) -static $(ESAPI_OBJECTS)
+lib$(ESAPI).a: $(esapi_OBJECTS)
+ @$(MKLIB) -o $(ESAPI) -static $(esapi_OBJECTS)
-$(GLAPI_OBJECTS): %.o: $(GLAPI)/%.c
- $(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $< -o $@
+$(esapi_OBJECTS): %.o: $(MAPI)/%.c
+ $(CC) -c $(esapi_CPPFLAGS) $(CFLAGS) $< -o $@
-$(GLAPI_ASM_OBJECTS): %.o: $(GEN)/%.S
- $(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $< -o $@
-
-$(MAPI_GLAPI_OBJECTS): %.o: $(MAPI)/%.c
- $(CC) -c $(INCLUDE_DIRS) $(CFLAGS) -DMAPI_GLAPI_CURRENT $< -o $@
-
-$(GLAPI_SOURCES) $(GLAPI_ASM_SOURCES): | glapi-stamp
+$(esapi_SOURCES): | glapi-stamp
+.PHONY: glapi-stamp
glapi-stamp:
@# generate sources/headers
@$(MAKE) -C $(GLAPI)/gen-es $(ES)
@@ -89,10 +78,10 @@ glapi-stamp:
.PHONY: clean
clean:
- -rm -f $(GLES_PC)
- -rm -f $(TOP)/$(LIB_DIR)/$(GLES_LIB_NAME)
+ -rm -f $(esapi_PC)
+ -rm -f $(TOP)/$(LIB_DIR)/$(esapi_LIB_NAME)
-rm -f lib$(ESAPI).a
- -rm -f $(ESAPI_OBJECTS)
+ -rm -f $(esapi_OBJECTS)
-rm -f depend depend.bak
-rm -f glapi-stamp
@# clean generated sources/headers
@@ -118,27 +107,33 @@ pcedit-es2 = \
-e 's,@GLESv2_PC_CFLAGS@,$(GLESv2_PC_CFLAGS),' \
-e 's,@GLESv2_LIB@,$(GLESv2_LIB),'
-$(GLES_PC): $(GLES_PC).in
+$(esapi_PC): $(esapi_PC).in
@sed $(pcedit-$(ES)) $< > $@
install-headers:
- $(INSTALL) -d $(DESTDIR)$(INSTALL_INC_DIR)/$(GLES_HEADER)
- $(INSTALL) -m 644 $(TOP)/include/$(GLES_HEADER)/*.h \
- $(DESTDIR)$(INSTALL_INC_DIR)/$(GLES_HEADER)
+ $(INSTALL) -d $(DESTDIR)$(INSTALL_INC_DIR)/$(esapi_HEADER)
+ $(INSTALL) -m 644 $(TOP)/include/$(esapi_HEADER)/*.h \
+ $(DESTDIR)$(INSTALL_INC_DIR)/$(esapi_HEADER)
-install-pc: $(GLES_PC)
+install-pc: $(esapi_PC)
$(INSTALL) -d $(DESTDIR)$(INSTALL_LIB_DIR)/pkgconfig
- $(INSTALL) -m 644 $(GLES_PC) $(DESTDIR)$(INSTALL_LIB_DIR)/pkgconfig
+ $(INSTALL) -m 644 $(esapi_PC) $(DESTDIR)$(INSTALL_LIB_DIR)/pkgconfig
install: default install-headers install-pc
$(INSTALL) -d $(DESTDIR)$(INSTALL_LIB_DIR)
- $(MINSTALL) $(TOP)/$(LIB_DIR)/$(GLES_LIB_GLOB) \
+ $(MINSTALL) $(TOP)/$(LIB_DIR)/$(esapi_LIB_GLOB) \
$(DESTDIR)$(INSTALL_LIB_DIR)
-depend: $(GLAPI_SOURCES) $(MAPI_GLAPI_SOURCES)
+# workaround a bug in makedepend
+makedepend_CPPFLAGS := \
+ $(filter-out -DMAPI_ABI_HEADER=%, $(esapi_CPPFLAGS))
+$(esapi_OBJECTS): glapi_mapi_tmp.h
+
+depend: $(esapi_SOURCES)
@echo "running $(MKDEP)"
@touch depend
- @$(MKDEP) $(MKDEP_OPTIONS) -f- $(DEFINES) $(INCLUDE_DIRS) \
- -DMAPI_GLAPI_CURRENT $(GLAPI_SOURCES) $(MAPI_GLAPI_SOURCES) \
- 2>/dev/null | sed -e 's,^$(GLAPI)/,,' -e 's,^$(MAPI)/,,' \
- > depend
+ @$(MKDEP) $(MKDEP_OPTIONS) -f- $(DEFINES) $(makedepend_CPPFLAGS) \
+ $(esapi_SOURCES) 2>/dev/null | \
+ sed -e 's,^$(GLAPI)/,,' -e 's,^$(MAPI)/,,' > depend
+
+-include depend
diff --git a/src/mapi/es1api/glapi/glapi_sparc.S b/src/mapi/es1api/glapi/glapi_sparc.S
deleted file mode 100644
index 331f85a8caa..00000000000
--- a/src/mapi/es1api/glapi/glapi_sparc.S
+++ /dev/null
@@ -1,1080 +0,0 @@
-/* DO NOT EDIT - This file generated automatically by gl_SPARC_asm.py (from Mesa) script */
-
-/*
- * Copyright (C) 1999-2003 Brian Paul All Rights Reserved.
- * (C) Copyright IBM Corporation 2004
- * 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
- * BRIAN PAUL, IBM,
- * AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
- * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-#ifdef __arch64__
-#define GL_OFF(N) ((N) * 8)
-#define GL_LL ldx
-#define GL_TIE_LD(SYM) %tie_ldx(SYM)
-#define GL_STACK_SIZE 128
-#else
-#define GL_OFF(N) ((N) * 4)
-#define GL_LL ld
-#define GL_TIE_LD(SYM) %tie_ld(SYM)
-#define GL_STACK_SIZE 64
-#endif
-
-#define GLOBL_FN(x) .globl x ; .type x, @function
-#define HIDDEN(x) .hidden x
-
- .register %g2, #scratch
- .register %g3, #scratch
-
- .text
-
- GLOBL_FN(__glapi_sparc_icache_flush)
- HIDDEN(__glapi_sparc_icache_flush)
- .type __glapi_sparc_icache_flush, @function
-__glapi_sparc_icache_flush: /* %o0 = insn_addr */
- flush %o0
- retl
- nop
-
- .align 32
-
- .type __glapi_sparc_get_pc, @function
-__glapi_sparc_get_pc:
- retl
- add %o7, %g2, %g2
- .size __glapi_sparc_get_pc, .-__glapi_sparc_get_pc
-
-#ifdef GLX_USE_TLS
-
- GLOBL_FN(__glapi_sparc_get_dispatch)
- HIDDEN(__glapi_sparc_get_dispatch)
-__glapi_sparc_get_dispatch:
- mov %o7, %g1
- sethi %hi(_GLOBAL_OFFSET_TABLE_-4), %g2
- call __glapi_sparc_get_pc
- add %g2, %lo(_GLOBAL_OFFSET_TABLE_+4), %g2
- mov %g1, %o7
- sethi %tie_hi22(_glapi_tls_Dispatch), %g1
- add %g1, %tie_lo10(_glapi_tls_Dispatch), %g1
- GL_LL [%g2 + %g1], %g2, GL_TIE_LD(_glapi_tls_Dispatch)
- retl
- mov %g2, %o0
-
- .data
- .align 32
-
- /* --> sethi %hi(_glapi_tls_Dispatch), %g1 */
- /* --> or %g1, %lo(_glapi_tls_Dispatch), %g1 */
- GLOBL_FN(__glapi_sparc_tls_stub)
- HIDDEN(__glapi_sparc_tls_stub)
-__glapi_sparc_tls_stub: /* Call offset in %g3 */
- mov %o7, %g1
- sethi %hi(_GLOBAL_OFFSET_TABLE_-4), %g2
- call __glapi_sparc_get_pc
- add %g2, %lo(_GLOBAL_OFFSET_TABLE_+4), %g2
- mov %g1, %o7
- srl %g3, 10, %g3
- sethi %tie_hi22(_glapi_tls_Dispatch), %g1
- add %g1, %tie_lo10(_glapi_tls_Dispatch), %g1
- GL_LL [%g2 + %g1], %g2, GL_TIE_LD(_glapi_tls_Dispatch)
- GL_LL [%g7+%g2], %g1
- GL_LL [%g1 + %g3], %g1
- jmp %g1
- nop
- .size __glapi_sparc_tls_stub, .-__glapi_sparc_tls_stub
-
-#define GL_STUB(fn, off) \
- GLOBL_FN(fn); \
-fn: ba __glapi_sparc_tls_stub; \
- sethi GL_OFF(off), %g3; \
- .size fn,.-fn;
-
-#elif defined(PTHREADS)
-
- /* 64-bit 0x00 --> sethi %hh(_glapi_Dispatch), %g1 */
- /* 64-bit 0x04 --> sethi %lm(_glapi_Dispatch), %g2 */
- /* 64-bit 0x08 --> or %g1, %hm(_glapi_Dispatch), %g1 */
- /* 64-bit 0x0c --> sllx %g1, 32, %g1 */
- /* 64-bit 0x10 --> add %g1, %g2, %g1 */
- /* 64-bit 0x14 --> ldx [%g1 + %lo(_glapi_Dispatch)], %g1 */
-
- /* 32-bit 0x00 --> sethi %hi(_glapi_Dispatch), %g1 */
- /* 32-bit 0x04 --> ld [%g1 + %lo(_glapi_Dispatch)], %g1 */
-
- .data
- .align 32
-
- GLOBL_FN(__glapi_sparc_pthread_stub)
- HIDDEN(__glapi_sparc_pthread_stub)
-__glapi_sparc_pthread_stub: /* Call offset in %g3 */
- mov %o7, %g1
- sethi %hi(_GLOBAL_OFFSET_TABLE_-4), %g2
- call __glapi_sparc_get_pc
- add %g2, %lo(_GLOBAL_OFFSET_TABLE_+4), %g2
- mov %g1, %o7
- sethi %hi(_glapi_Dispatch), %g1
- or %g1, %lo(_glapi_Dispatch), %g1
- srl %g3, 10, %g3
- GL_LL [%g2+%g1], %g2
- GL_LL [%g2], %g1
- cmp %g1, 0
- be 2f
- nop
-1: GL_LL [%g1 + %g3], %g1
- jmp %g1
- nop
-2: save %sp, GL_STACK_SIZE, %sp
- mov %g3, %l0
- call _glapi_get_dispatch
- nop
- mov %o0, %g1
- mov %l0, %g3
- ba 1b
- restore %g0, %g0, %g0
- .size __glapi_sparc_pthread_stub, .-__glapi_sparc_pthread_stub
-
-#define GL_STUB(fn, off) \
- GLOBL_FN(fn); \
-fn: ba __glapi_sparc_pthread_stub; \
- sethi GL_OFF(off), %g3; \
- .size fn,.-fn;
-
-#else /* Non-threaded version. */
-
- .type __glapi_sparc_nothread_stub, @function
-__glapi_sparc_nothread_stub: /* Call offset in %g3 */
- mov %o7, %g1
- sethi %hi(_GLOBAL_OFFSET_TABLE_-4), %g2
- call __glapi_sparc_get_pc
- add %g2, %lo(_GLOBAL_OFFSET_TABLE_+4), %g2
- mov %g1, %o7
- srl %g3, 10, %g3
- sethi %hi(_glapi_Dispatch), %g1
- or %g1, %lo(_glapi_Dispatch), %g1
- GL_LL [%g2+%g1], %g2
- GL_LL [%g2], %g1
- GL_LL [%g1 + %g3], %g1
- jmp %g1
- nop
- .size __glapi_sparc_nothread_stub, .-__glapi_sparc_nothread_stub
-
-#define GL_STUB(fn, off) \
- GLOBL_FN(fn); \
-fn: ba __glapi_sparc_nothread_stub; \
- sethi GL_OFF(off), %g3; \
- .size fn,.-fn;
-
-#endif
-
-#define GL_STUB_ALIAS(fn, alias) \
- .globl fn; \
- .set fn, alias
-
- .text
- .align 32
-
- .globl gl_dispatch_functions_start
- HIDDEN(gl_dispatch_functions_start)
-gl_dispatch_functions_start:
-
- GL_STUB(gl_dispatch_stub_0, 0)
- HIDDEN(gl_dispatch_stub_0)
- GL_STUB(gl_dispatch_stub_1, 1)
- HIDDEN(gl_dispatch_stub_1)
- GL_STUB(gl_dispatch_stub_2, 2)
- HIDDEN(gl_dispatch_stub_2)
- GL_STUB(gl_dispatch_stub_3, 3)
- HIDDEN(gl_dispatch_stub_3)
- GL_STUB(gl_dispatch_stub_4, 4)
- HIDDEN(gl_dispatch_stub_4)
- GL_STUB(gl_dispatch_stub_5, 5)
- HIDDEN(gl_dispatch_stub_5)
- GL_STUB(gl_dispatch_stub_6, 6)
- HIDDEN(gl_dispatch_stub_6)
- GL_STUB(gl_dispatch_stub_7, 7)
- HIDDEN(gl_dispatch_stub_7)
- GL_STUB(gl_dispatch_stub_8, 8)
- HIDDEN(gl_dispatch_stub_8)
- GL_STUB(gl_dispatch_stub_9, 9)
- HIDDEN(gl_dispatch_stub_9)
- GL_STUB(gl_dispatch_stub_10, 10)
- HIDDEN(gl_dispatch_stub_10)
- GL_STUB(gl_dispatch_stub_11, 11)
- HIDDEN(gl_dispatch_stub_11)
- GL_STUB(gl_dispatch_stub_12, 12)
- HIDDEN(gl_dispatch_stub_12)
- GL_STUB(gl_dispatch_stub_13, 13)
- HIDDEN(gl_dispatch_stub_13)
- GL_STUB(gl_dispatch_stub_14, 14)
- HIDDEN(gl_dispatch_stub_14)
- GL_STUB(gl_dispatch_stub_15, 15)
- HIDDEN(gl_dispatch_stub_15)
- GL_STUB(gl_dispatch_stub_16, 16)
- HIDDEN(gl_dispatch_stub_16)
- GL_STUB(gl_dispatch_stub_17, 17)
- HIDDEN(gl_dispatch_stub_17)
- GL_STUB(gl_dispatch_stub_18, 18)
- HIDDEN(gl_dispatch_stub_18)
- GL_STUB(gl_dispatch_stub_19, 19)
- HIDDEN(gl_dispatch_stub_19)
- GL_STUB(gl_dispatch_stub_20, 20)
- HIDDEN(gl_dispatch_stub_20)
- GL_STUB(gl_dispatch_stub_21, 21)
- HIDDEN(gl_dispatch_stub_21)
- GL_STUB(gl_dispatch_stub_22, 22)
- HIDDEN(gl_dispatch_stub_22)
- GL_STUB(gl_dispatch_stub_23, 23)
- HIDDEN(gl_dispatch_stub_23)
- GL_STUB(gl_dispatch_stub_24, 24)
- HIDDEN(gl_dispatch_stub_24)
- GL_STUB(gl_dispatch_stub_25, 25)
- HIDDEN(gl_dispatch_stub_25)
- GL_STUB(gl_dispatch_stub_26, 26)
- HIDDEN(gl_dispatch_stub_26)
- GL_STUB(gl_dispatch_stub_27, 27)
- HIDDEN(gl_dispatch_stub_27)
- GL_STUB(gl_dispatch_stub_28, 28)
- HIDDEN(gl_dispatch_stub_28)
- GL_STUB(glColor4f, 29)
- GL_STUB(gl_dispatch_stub_30, 30)
- HIDDEN(gl_dispatch_stub_30)
- GL_STUB(gl_dispatch_stub_31, 31)
- HIDDEN(gl_dispatch_stub_31)
- GL_STUB(gl_dispatch_stub_32, 32)
- HIDDEN(gl_dispatch_stub_32)
- GL_STUB(gl_dispatch_stub_33, 33)
- HIDDEN(gl_dispatch_stub_33)
- GL_STUB(gl_dispatch_stub_34, 34)
- HIDDEN(gl_dispatch_stub_34)
- GL_STUB(glColor4ub, 35)
- GL_STUB(gl_dispatch_stub_36, 36)
- HIDDEN(gl_dispatch_stub_36)
- GL_STUB(gl_dispatch_stub_37, 37)
- HIDDEN(gl_dispatch_stub_37)
- GL_STUB(gl_dispatch_stub_38, 38)
- HIDDEN(gl_dispatch_stub_38)
- GL_STUB(gl_dispatch_stub_39, 39)
- HIDDEN(gl_dispatch_stub_39)
- GL_STUB(gl_dispatch_stub_40, 40)
- HIDDEN(gl_dispatch_stub_40)
- GL_STUB(gl_dispatch_stub_41, 41)
- HIDDEN(gl_dispatch_stub_41)
- GL_STUB(gl_dispatch_stub_42, 42)
- HIDDEN(gl_dispatch_stub_42)
- GL_STUB(gl_dispatch_stub_43, 43)
- HIDDEN(gl_dispatch_stub_43)
- GL_STUB(gl_dispatch_stub_44, 44)
- HIDDEN(gl_dispatch_stub_44)
- GL_STUB(gl_dispatch_stub_45, 45)
- HIDDEN(gl_dispatch_stub_45)
- GL_STUB(gl_dispatch_stub_46, 46)
- HIDDEN(gl_dispatch_stub_46)
- GL_STUB(gl_dispatch_stub_47, 47)
- HIDDEN(gl_dispatch_stub_47)
- GL_STUB(gl_dispatch_stub_48, 48)
- HIDDEN(gl_dispatch_stub_48)
- GL_STUB(gl_dispatch_stub_49, 49)
- HIDDEN(gl_dispatch_stub_49)
- GL_STUB(gl_dispatch_stub_50, 50)
- HIDDEN(gl_dispatch_stub_50)
- GL_STUB(gl_dispatch_stub_51, 51)
- HIDDEN(gl_dispatch_stub_51)
- GL_STUB(gl_dispatch_stub_52, 52)
- HIDDEN(gl_dispatch_stub_52)
- GL_STUB(gl_dispatch_stub_53, 53)
- HIDDEN(gl_dispatch_stub_53)
- GL_STUB(gl_dispatch_stub_54, 54)
- HIDDEN(gl_dispatch_stub_54)
- GL_STUB(gl_dispatch_stub_55, 55)
- HIDDEN(gl_dispatch_stub_55)
- GL_STUB(glNormal3f, 56)
- GL_STUB(gl_dispatch_stub_57, 57)
- HIDDEN(gl_dispatch_stub_57)
- GL_STUB(gl_dispatch_stub_58, 58)
- HIDDEN(gl_dispatch_stub_58)
- GL_STUB(gl_dispatch_stub_59, 59)
- HIDDEN(gl_dispatch_stub_59)
- GL_STUB(gl_dispatch_stub_60, 60)
- HIDDEN(gl_dispatch_stub_60)
- GL_STUB(gl_dispatch_stub_61, 61)
- HIDDEN(gl_dispatch_stub_61)
- GL_STUB(gl_dispatch_stub_62, 62)
- HIDDEN(gl_dispatch_stub_62)
- GL_STUB(gl_dispatch_stub_63, 63)
- HIDDEN(gl_dispatch_stub_63)
- GL_STUB(gl_dispatch_stub_64, 64)
- HIDDEN(gl_dispatch_stub_64)
- GL_STUB(gl_dispatch_stub_65, 65)
- HIDDEN(gl_dispatch_stub_65)
- GL_STUB(gl_dispatch_stub_66, 66)
- HIDDEN(gl_dispatch_stub_66)
- GL_STUB(gl_dispatch_stub_67, 67)
- HIDDEN(gl_dispatch_stub_67)
- GL_STUB(gl_dispatch_stub_68, 68)
- HIDDEN(gl_dispatch_stub_68)
- GL_STUB(gl_dispatch_stub_69, 69)
- HIDDEN(gl_dispatch_stub_69)
- GL_STUB(gl_dispatch_stub_70, 70)
- HIDDEN(gl_dispatch_stub_70)
- GL_STUB(gl_dispatch_stub_71, 71)
- HIDDEN(gl_dispatch_stub_71)
- GL_STUB(gl_dispatch_stub_72, 72)
- HIDDEN(gl_dispatch_stub_72)
- GL_STUB(gl_dispatch_stub_73, 73)
- HIDDEN(gl_dispatch_stub_73)
- GL_STUB(gl_dispatch_stub_74, 74)
- HIDDEN(gl_dispatch_stub_74)
- GL_STUB(gl_dispatch_stub_75, 75)
- HIDDEN(gl_dispatch_stub_75)
- GL_STUB(gl_dispatch_stub_76, 76)
- HIDDEN(gl_dispatch_stub_76)
- GL_STUB(gl_dispatch_stub_77, 77)
- HIDDEN(gl_dispatch_stub_77)
- GL_STUB(gl_dispatch_stub_78, 78)
- HIDDEN(gl_dispatch_stub_78)
- GL_STUB(gl_dispatch_stub_79, 79)
- HIDDEN(gl_dispatch_stub_79)
- GL_STUB(gl_dispatch_stub_80, 80)
- HIDDEN(gl_dispatch_stub_80)
- GL_STUB(gl_dispatch_stub_81, 81)
- HIDDEN(gl_dispatch_stub_81)
- GL_STUB(gl_dispatch_stub_82, 82)
- HIDDEN(gl_dispatch_stub_82)
- GL_STUB(gl_dispatch_stub_83, 83)
- HIDDEN(gl_dispatch_stub_83)
- GL_STUB(gl_dispatch_stub_84, 84)
- HIDDEN(gl_dispatch_stub_84)
- GL_STUB(gl_dispatch_stub_85, 85)
- HIDDEN(gl_dispatch_stub_85)
- GL_STUB(gl_dispatch_stub_86, 86)
- HIDDEN(gl_dispatch_stub_86)
- GL_STUB(gl_dispatch_stub_87, 87)
- HIDDEN(gl_dispatch_stub_87)
- GL_STUB(gl_dispatch_stub_88, 88)
- HIDDEN(gl_dispatch_stub_88)
- GL_STUB(gl_dispatch_stub_89, 89)
- HIDDEN(gl_dispatch_stub_89)
- GL_STUB(gl_dispatch_stub_90, 90)
- HIDDEN(gl_dispatch_stub_90)
- GL_STUB(gl_dispatch_stub_91, 91)
- HIDDEN(gl_dispatch_stub_91)
- GL_STUB(gl_dispatch_stub_92, 92)
- HIDDEN(gl_dispatch_stub_92)
- GL_STUB(gl_dispatch_stub_93, 93)
- HIDDEN(gl_dispatch_stub_93)
- GL_STUB(gl_dispatch_stub_94, 94)
- HIDDEN(gl_dispatch_stub_94)
- GL_STUB(gl_dispatch_stub_95, 95)
- HIDDEN(gl_dispatch_stub_95)
- GL_STUB(gl_dispatch_stub_96, 96)
- HIDDEN(gl_dispatch_stub_96)
- GL_STUB(gl_dispatch_stub_97, 97)
- HIDDEN(gl_dispatch_stub_97)
- GL_STUB(gl_dispatch_stub_98, 98)
- HIDDEN(gl_dispatch_stub_98)
- GL_STUB(gl_dispatch_stub_99, 99)
- HIDDEN(gl_dispatch_stub_99)
- GL_STUB(gl_dispatch_stub_100, 100)
- HIDDEN(gl_dispatch_stub_100)
- GL_STUB(gl_dispatch_stub_101, 101)
- HIDDEN(gl_dispatch_stub_101)
- GL_STUB(gl_dispatch_stub_102, 102)
- HIDDEN(gl_dispatch_stub_102)
- GL_STUB(gl_dispatch_stub_103, 103)
- HIDDEN(gl_dispatch_stub_103)
- GL_STUB(gl_dispatch_stub_104, 104)
- HIDDEN(gl_dispatch_stub_104)
- GL_STUB(gl_dispatch_stub_105, 105)
- HIDDEN(gl_dispatch_stub_105)
- GL_STUB(gl_dispatch_stub_106, 106)
- HIDDEN(gl_dispatch_stub_106)
- GL_STUB(gl_dispatch_stub_107, 107)
- HIDDEN(gl_dispatch_stub_107)
- GL_STUB(gl_dispatch_stub_108, 108)
- HIDDEN(gl_dispatch_stub_108)
- GL_STUB(gl_dispatch_stub_109, 109)
- HIDDEN(gl_dispatch_stub_109)
- GL_STUB(gl_dispatch_stub_110, 110)
- HIDDEN(gl_dispatch_stub_110)
- GL_STUB(gl_dispatch_stub_111, 111)
- HIDDEN(gl_dispatch_stub_111)
- GL_STUB(gl_dispatch_stub_112, 112)
- HIDDEN(gl_dispatch_stub_112)
- GL_STUB(gl_dispatch_stub_113, 113)
- HIDDEN(gl_dispatch_stub_113)
- GL_STUB(gl_dispatch_stub_114, 114)
- HIDDEN(gl_dispatch_stub_114)
- GL_STUB(gl_dispatch_stub_115, 115)
- HIDDEN(gl_dispatch_stub_115)
- GL_STUB(gl_dispatch_stub_116, 116)
- HIDDEN(gl_dispatch_stub_116)
- GL_STUB(gl_dispatch_stub_117, 117)
- HIDDEN(gl_dispatch_stub_117)
- GL_STUB(gl_dispatch_stub_118, 118)
- HIDDEN(gl_dispatch_stub_118)
- GL_STUB(gl_dispatch_stub_119, 119)
- HIDDEN(gl_dispatch_stub_119)
- GL_STUB(gl_dispatch_stub_120, 120)
- HIDDEN(gl_dispatch_stub_120)
- GL_STUB(gl_dispatch_stub_121, 121)
- HIDDEN(gl_dispatch_stub_121)
- GL_STUB(gl_dispatch_stub_122, 122)
- HIDDEN(gl_dispatch_stub_122)
- GL_STUB(gl_dispatch_stub_123, 123)
- HIDDEN(gl_dispatch_stub_123)
- GL_STUB(gl_dispatch_stub_124, 124)
- HIDDEN(gl_dispatch_stub_124)
- GL_STUB(gl_dispatch_stub_125, 125)
- HIDDEN(gl_dispatch_stub_125)
- GL_STUB(gl_dispatch_stub_126, 126)
- HIDDEN(gl_dispatch_stub_126)
- GL_STUB(gl_dispatch_stub_127, 127)
- HIDDEN(gl_dispatch_stub_127)
- GL_STUB(gl_dispatch_stub_128, 128)
- HIDDEN(gl_dispatch_stub_128)
- GL_STUB(gl_dispatch_stub_129, 129)
- HIDDEN(gl_dispatch_stub_129)
- GL_STUB(gl_dispatch_stub_130, 130)
- HIDDEN(gl_dispatch_stub_130)
- GL_STUB(gl_dispatch_stub_131, 131)
- HIDDEN(gl_dispatch_stub_131)
- GL_STUB(gl_dispatch_stub_132, 132)
- HIDDEN(gl_dispatch_stub_132)
- GL_STUB(gl_dispatch_stub_133, 133)
- HIDDEN(gl_dispatch_stub_133)
- GL_STUB(gl_dispatch_stub_134, 134)
- HIDDEN(gl_dispatch_stub_134)
- GL_STUB(gl_dispatch_stub_135, 135)
- HIDDEN(gl_dispatch_stub_135)
- GL_STUB(gl_dispatch_stub_136, 136)
- HIDDEN(gl_dispatch_stub_136)
- GL_STUB(gl_dispatch_stub_137, 137)
- HIDDEN(gl_dispatch_stub_137)
- GL_STUB(gl_dispatch_stub_138, 138)
- HIDDEN(gl_dispatch_stub_138)
- GL_STUB(gl_dispatch_stub_139, 139)
- HIDDEN(gl_dispatch_stub_139)
- GL_STUB(gl_dispatch_stub_140, 140)
- HIDDEN(gl_dispatch_stub_140)
- GL_STUB(gl_dispatch_stub_141, 141)
- HIDDEN(gl_dispatch_stub_141)
- GL_STUB(gl_dispatch_stub_142, 142)
- HIDDEN(gl_dispatch_stub_142)
- GL_STUB(gl_dispatch_stub_143, 143)
- HIDDEN(gl_dispatch_stub_143)
- GL_STUB(gl_dispatch_stub_144, 144)
- HIDDEN(gl_dispatch_stub_144)
- GL_STUB(gl_dispatch_stub_145, 145)
- HIDDEN(gl_dispatch_stub_145)
- GL_STUB(gl_dispatch_stub_146, 146)
- HIDDEN(gl_dispatch_stub_146)
- GL_STUB(gl_dispatch_stub_147, 147)
- HIDDEN(gl_dispatch_stub_147)
- GL_STUB(gl_dispatch_stub_148, 148)
- HIDDEN(gl_dispatch_stub_148)
- GL_STUB(gl_dispatch_stub_149, 149)
- HIDDEN(gl_dispatch_stub_149)
- GL_STUB(gl_dispatch_stub_150, 150)
- HIDDEN(gl_dispatch_stub_150)
- GL_STUB(gl_dispatch_stub_151, 151)
- HIDDEN(gl_dispatch_stub_151)
- GL_STUB(glCullFace, 152)
- GL_STUB(glFogf, 153)
- GL_STUB(glFogfv, 154)
- GL_STUB(gl_dispatch_stub_155, 155)
- HIDDEN(gl_dispatch_stub_155)
- GL_STUB(gl_dispatch_stub_156, 156)
- HIDDEN(gl_dispatch_stub_156)
- GL_STUB(glFrontFace, 157)
- GL_STUB(glHint, 158)
- GL_STUB(glLightf, 159)
- GL_STUB(glLightfv, 160)
- GL_STUB(gl_dispatch_stub_161, 161)
- HIDDEN(gl_dispatch_stub_161)
- GL_STUB(gl_dispatch_stub_162, 162)
- HIDDEN(gl_dispatch_stub_162)
- GL_STUB(glLightModelf, 163)
- GL_STUB(glLightModelfv, 164)
- GL_STUB(gl_dispatch_stub_165, 165)
- HIDDEN(gl_dispatch_stub_165)
- GL_STUB(gl_dispatch_stub_166, 166)
- HIDDEN(gl_dispatch_stub_166)
- GL_STUB(gl_dispatch_stub_167, 167)
- HIDDEN(gl_dispatch_stub_167)
- GL_STUB(glLineWidth, 168)
- GL_STUB(glMaterialf, 169)
- GL_STUB(glMaterialfv, 170)
- GL_STUB(gl_dispatch_stub_171, 171)
- HIDDEN(gl_dispatch_stub_171)
- GL_STUB(gl_dispatch_stub_172, 172)
- HIDDEN(gl_dispatch_stub_172)
- GL_STUB(glPointSize, 173)
- GL_STUB(gl_dispatch_stub_174, 174)
- HIDDEN(gl_dispatch_stub_174)
- GL_STUB(gl_dispatch_stub_175, 175)
- HIDDEN(gl_dispatch_stub_175)
- GL_STUB(glScissor, 176)
- GL_STUB(glShadeModel, 177)
- GL_STUB(glTexParameterf, 178)
- GL_STUB(glTexParameterfv, 179)
- GL_STUB(glTexParameteri, 180)
- GL_STUB(glTexParameteriv, 181)
- GL_STUB(gl_dispatch_stub_182, 182)
- HIDDEN(gl_dispatch_stub_182)
- GL_STUB(glTexImage2D, 183)
- GL_STUB(glTexEnvf, 184)
- GL_STUB(glTexEnvfv, 185)
- GL_STUB(glTexEnvi, 186)
- GL_STUB(glTexEnviv, 187)
- GL_STUB(gl_dispatch_stub_188, 188)
- HIDDEN(gl_dispatch_stub_188)
- GL_STUB(gl_dispatch_stub_189, 189)
- HIDDEN(gl_dispatch_stub_189)
- GL_STUB(glTexGenfOES, 190)
- GL_STUB(glTexGenfvOES, 191)
- GL_STUB(glTexGeniOES, 192)
- GL_STUB(glTexGenivOES, 193)
- GL_STUB(gl_dispatch_stub_194, 194)
- HIDDEN(gl_dispatch_stub_194)
- GL_STUB(gl_dispatch_stub_195, 195)
- HIDDEN(gl_dispatch_stub_195)
- GL_STUB(gl_dispatch_stub_196, 196)
- HIDDEN(gl_dispatch_stub_196)
- GL_STUB(gl_dispatch_stub_197, 197)
- HIDDEN(gl_dispatch_stub_197)
- GL_STUB(gl_dispatch_stub_198, 198)
- HIDDEN(gl_dispatch_stub_198)
- GL_STUB(gl_dispatch_stub_199, 199)
- HIDDEN(gl_dispatch_stub_199)
- GL_STUB(gl_dispatch_stub_200, 200)
- HIDDEN(gl_dispatch_stub_200)
- GL_STUB(gl_dispatch_stub_201, 201)
- HIDDEN(gl_dispatch_stub_201)
- GL_STUB(gl_dispatch_stub_202, 202)
- HIDDEN(gl_dispatch_stub_202)
- GL_STUB(glClear, 203)
- GL_STUB(gl_dispatch_stub_204, 204)
- HIDDEN(gl_dispatch_stub_204)
- GL_STUB(gl_dispatch_stub_205, 205)
- HIDDEN(gl_dispatch_stub_205)
- GL_STUB(glClearColor, 206)
- GL_STUB(glClearStencil, 207)
- GL_STUB(gl_dispatch_stub_208, 208)
- HIDDEN(gl_dispatch_stub_208)
- GL_STUB(glStencilMask, 209)
- GL_STUB(glColorMask, 210)
- GL_STUB(glDepthMask, 211)
- GL_STUB(gl_dispatch_stub_212, 212)
- HIDDEN(gl_dispatch_stub_212)
- GL_STUB(gl_dispatch_stub_213, 213)
- HIDDEN(gl_dispatch_stub_213)
- GL_STUB(glDisable, 214)
- GL_STUB(glEnable, 215)
- GL_STUB(glFinish, 216)
- GL_STUB(glFlush, 217)
- GL_STUB(gl_dispatch_stub_218, 218)
- HIDDEN(gl_dispatch_stub_218)
- GL_STUB(gl_dispatch_stub_219, 219)
- HIDDEN(gl_dispatch_stub_219)
- GL_STUB(gl_dispatch_stub_220, 220)
- HIDDEN(gl_dispatch_stub_220)
- GL_STUB(gl_dispatch_stub_221, 221)
- HIDDEN(gl_dispatch_stub_221)
- GL_STUB(gl_dispatch_stub_222, 222)
- HIDDEN(gl_dispatch_stub_222)
- GL_STUB(gl_dispatch_stub_223, 223)
- HIDDEN(gl_dispatch_stub_223)
- GL_STUB(gl_dispatch_stub_224, 224)
- HIDDEN(gl_dispatch_stub_224)
- GL_STUB(gl_dispatch_stub_225, 225)
- HIDDEN(gl_dispatch_stub_225)
- GL_STUB(gl_dispatch_stub_226, 226)
- HIDDEN(gl_dispatch_stub_226)
- GL_STUB(gl_dispatch_stub_227, 227)
- HIDDEN(gl_dispatch_stub_227)
- GL_STUB(gl_dispatch_stub_228, 228)
- HIDDEN(gl_dispatch_stub_228)
- GL_STUB(gl_dispatch_stub_229, 229)
- HIDDEN(gl_dispatch_stub_229)
- GL_STUB(gl_dispatch_stub_230, 230)
- HIDDEN(gl_dispatch_stub_230)
- GL_STUB(gl_dispatch_stub_231, 231)
- HIDDEN(gl_dispatch_stub_231)
- GL_STUB(gl_dispatch_stub_232, 232)
- HIDDEN(gl_dispatch_stub_232)
- GL_STUB(gl_dispatch_stub_233, 233)
- HIDDEN(gl_dispatch_stub_233)
- GL_STUB(gl_dispatch_stub_234, 234)
- HIDDEN(gl_dispatch_stub_234)
- GL_STUB(gl_dispatch_stub_235, 235)
- HIDDEN(gl_dispatch_stub_235)
- GL_STUB(gl_dispatch_stub_236, 236)
- HIDDEN(gl_dispatch_stub_236)
- GL_STUB(gl_dispatch_stub_237, 237)
- HIDDEN(gl_dispatch_stub_237)
- GL_STUB(gl_dispatch_stub_238, 238)
- HIDDEN(gl_dispatch_stub_238)
- GL_STUB(gl_dispatch_stub_239, 239)
- HIDDEN(gl_dispatch_stub_239)
- GL_STUB(glAlphaFunc, 240)
- GL_STUB(glBlendFunc, 241)
- GL_STUB(glLogicOp, 242)
- GL_STUB(glStencilFunc, 243)
- GL_STUB(glStencilOp, 244)
- GL_STUB(glDepthFunc, 245)
- GL_STUB(gl_dispatch_stub_246, 246)
- HIDDEN(gl_dispatch_stub_246)
- GL_STUB(gl_dispatch_stub_247, 247)
- HIDDEN(gl_dispatch_stub_247)
- GL_STUB(gl_dispatch_stub_248, 248)
- HIDDEN(gl_dispatch_stub_248)
- GL_STUB(gl_dispatch_stub_249, 249)
- HIDDEN(gl_dispatch_stub_249)
- GL_STUB(glPixelStorei, 250)
- GL_STUB(gl_dispatch_stub_251, 251)
- HIDDEN(gl_dispatch_stub_251)
- GL_STUB(gl_dispatch_stub_252, 252)
- HIDDEN(gl_dispatch_stub_252)
- GL_STUB(gl_dispatch_stub_253, 253)
- HIDDEN(gl_dispatch_stub_253)
- GL_STUB(gl_dispatch_stub_254, 254)
- HIDDEN(gl_dispatch_stub_254)
- GL_STUB(gl_dispatch_stub_255, 255)
- HIDDEN(gl_dispatch_stub_255)
- GL_STUB(glReadPixels, 256)
- GL_STUB(gl_dispatch_stub_257, 257)
- HIDDEN(gl_dispatch_stub_257)
- GL_STUB(glGetBooleanv, 258)
- GL_STUB(gl_dispatch_stub_259, 259)
- HIDDEN(gl_dispatch_stub_259)
- GL_STUB(gl_dispatch_stub_260, 260)
- HIDDEN(gl_dispatch_stub_260)
- GL_STUB(glGetError, 261)
- GL_STUB(glGetFloatv, 262)
- GL_STUB(glGetIntegerv, 263)
- GL_STUB(glGetLightfv, 264)
- GL_STUB(gl_dispatch_stub_265, 265)
- HIDDEN(gl_dispatch_stub_265)
- GL_STUB(gl_dispatch_stub_266, 266)
- HIDDEN(gl_dispatch_stub_266)
- GL_STUB(gl_dispatch_stub_267, 267)
- HIDDEN(gl_dispatch_stub_267)
- GL_STUB(gl_dispatch_stub_268, 268)
- HIDDEN(gl_dispatch_stub_268)
- GL_STUB(glGetMaterialfv, 269)
- GL_STUB(gl_dispatch_stub_270, 270)
- HIDDEN(gl_dispatch_stub_270)
- GL_STUB(gl_dispatch_stub_271, 271)
- HIDDEN(gl_dispatch_stub_271)
- GL_STUB(gl_dispatch_stub_272, 272)
- HIDDEN(gl_dispatch_stub_272)
- GL_STUB(gl_dispatch_stub_273, 273)
- HIDDEN(gl_dispatch_stub_273)
- GL_STUB(gl_dispatch_stub_274, 274)
- HIDDEN(gl_dispatch_stub_274)
- GL_STUB(glGetString, 275)
- GL_STUB(glGetTexEnvfv, 276)
- GL_STUB(glGetTexEnviv, 277)
- GL_STUB(gl_dispatch_stub_278, 278)
- HIDDEN(gl_dispatch_stub_278)
- GL_STUB(glGetTexGenfvOES, 279)
- GL_STUB(glGetTexGenivOES, 280)
- GL_STUB(gl_dispatch_stub_281, 281)
- HIDDEN(gl_dispatch_stub_281)
- GL_STUB(glGetTexParameterfv, 282)
- GL_STUB(glGetTexParameteriv, 283)
- GL_STUB(gl_dispatch_stub_284, 284)
- HIDDEN(gl_dispatch_stub_284)
- GL_STUB(gl_dispatch_stub_285, 285)
- HIDDEN(gl_dispatch_stub_285)
- GL_STUB(glIsEnabled, 286)
- GL_STUB(gl_dispatch_stub_287, 287)
- HIDDEN(gl_dispatch_stub_287)
- GL_STUB(gl_dispatch_stub_288, 288)
- HIDDEN(gl_dispatch_stub_288)
- GL_STUB(gl_dispatch_stub_289, 289)
- HIDDEN(gl_dispatch_stub_289)
- GL_STUB(glLoadIdentity, 290)
- GL_STUB(glLoadMatrixf, 291)
- GL_STUB(gl_dispatch_stub_292, 292)
- HIDDEN(gl_dispatch_stub_292)
- GL_STUB(glMatrixMode, 293)
- GL_STUB(glMultMatrixf, 294)
- GL_STUB(gl_dispatch_stub_295, 295)
- HIDDEN(gl_dispatch_stub_295)
- GL_STUB(gl_dispatch_stub_296, 296)
- HIDDEN(gl_dispatch_stub_296)
- GL_STUB(glPopMatrix, 297)
- GL_STUB(glPushMatrix, 298)
- GL_STUB(gl_dispatch_stub_299, 299)
- HIDDEN(gl_dispatch_stub_299)
- GL_STUB(glRotatef, 300)
- GL_STUB(gl_dispatch_stub_301, 301)
- HIDDEN(gl_dispatch_stub_301)
- GL_STUB(glScalef, 302)
- GL_STUB(gl_dispatch_stub_303, 303)
- HIDDEN(gl_dispatch_stub_303)
- GL_STUB(glTranslatef, 304)
- GL_STUB(glViewport, 305)
- GL_STUB(gl_dispatch_stub_306, 306)
- HIDDEN(gl_dispatch_stub_306)
- GL_STUB(glBindTexture, 307)
- GL_STUB(glColorPointer, 308)
- GL_STUB(glDisableClientState, 309)
- GL_STUB(glDrawArrays, 310)
- GL_STUB(glDrawElements, 311)
- GL_STUB(gl_dispatch_stub_312, 312)
- HIDDEN(gl_dispatch_stub_312)
- GL_STUB(glEnableClientState, 313)
- GL_STUB(gl_dispatch_stub_314, 314)
- HIDDEN(gl_dispatch_stub_314)
- GL_STUB(gl_dispatch_stub_315, 315)
- HIDDEN(gl_dispatch_stub_315)
- GL_STUB(gl_dispatch_stub_316, 316)
- HIDDEN(gl_dispatch_stub_316)
- GL_STUB(gl_dispatch_stub_317, 317)
- HIDDEN(gl_dispatch_stub_317)
- GL_STUB(glNormalPointer, 318)
- GL_STUB(glPolygonOffset, 319)
- GL_STUB(glTexCoordPointer, 320)
- GL_STUB(glVertexPointer, 321)
- GL_STUB(gl_dispatch_stub_322, 322)
- HIDDEN(gl_dispatch_stub_322)
- GL_STUB(gl_dispatch_stub_323, 323)
- HIDDEN(gl_dispatch_stub_323)
- GL_STUB(glCopyTexImage2D, 324)
- GL_STUB(gl_dispatch_stub_325, 325)
- HIDDEN(gl_dispatch_stub_325)
- GL_STUB(glCopyTexSubImage2D, 326)
- GL_STUB(glDeleteTextures, 327)
- GL_STUB(glGenTextures, 328)
- GL_STUB(glGetPointerv, 329)
- GL_STUB(glIsTexture, 330)
- GL_STUB(gl_dispatch_stub_331, 331)
- HIDDEN(gl_dispatch_stub_331)
- GL_STUB(gl_dispatch_stub_332, 332)
- HIDDEN(gl_dispatch_stub_332)
- GL_STUB(glTexSubImage2D, 333)
- GL_STUB(gl_dispatch_stub_334, 334)
- HIDDEN(gl_dispatch_stub_334)
- GL_STUB(gl_dispatch_stub_335, 335)
- HIDDEN(gl_dispatch_stub_335)
- GL_STUB(gl_dispatch_stub_336, 336)
- HIDDEN(gl_dispatch_stub_336)
- GL_STUB(glBlendEquationOES, 337)
- GL_STUB(gl_dispatch_stub_338, 338)
- HIDDEN(gl_dispatch_stub_338)
- GL_STUB(gl_dispatch_stub_339, 339)
- HIDDEN(gl_dispatch_stub_339)
- GL_STUB(gl_dispatch_stub_340, 340)
- HIDDEN(gl_dispatch_stub_340)
- GL_STUB(gl_dispatch_stub_341, 341)
- HIDDEN(gl_dispatch_stub_341)
- GL_STUB(gl_dispatch_stub_342, 342)
- HIDDEN(gl_dispatch_stub_342)
- GL_STUB(gl_dispatch_stub_343, 343)
- HIDDEN(gl_dispatch_stub_343)
- GL_STUB(gl_dispatch_stub_344, 344)
- HIDDEN(gl_dispatch_stub_344)
- GL_STUB(gl_dispatch_stub_345, 345)
- HIDDEN(gl_dispatch_stub_345)
- GL_STUB(gl_dispatch_stub_346, 346)
- HIDDEN(gl_dispatch_stub_346)
- GL_STUB(gl_dispatch_stub_347, 347)
- HIDDEN(gl_dispatch_stub_347)
- GL_STUB(gl_dispatch_stub_348, 348)
- HIDDEN(gl_dispatch_stub_348)
- GL_STUB(gl_dispatch_stub_349, 349)
- HIDDEN(gl_dispatch_stub_349)
- GL_STUB(gl_dispatch_stub_350, 350)
- HIDDEN(gl_dispatch_stub_350)
- GL_STUB(gl_dispatch_stub_351, 351)
- HIDDEN(gl_dispatch_stub_351)
- GL_STUB(gl_dispatch_stub_352, 352)
- HIDDEN(gl_dispatch_stub_352)
- GL_STUB(gl_dispatch_stub_353, 353)
- HIDDEN(gl_dispatch_stub_353)
- GL_STUB(gl_dispatch_stub_354, 354)
- HIDDEN(gl_dispatch_stub_354)
- GL_STUB(gl_dispatch_stub_355, 355)
- HIDDEN(gl_dispatch_stub_355)
- GL_STUB(gl_dispatch_stub_356, 356)
- HIDDEN(gl_dispatch_stub_356)
- GL_STUB(gl_dispatch_stub_357, 357)
- HIDDEN(gl_dispatch_stub_357)
- GL_STUB(gl_dispatch_stub_358, 358)
- HIDDEN(gl_dispatch_stub_358)
- GL_STUB(gl_dispatch_stub_359, 359)
- HIDDEN(gl_dispatch_stub_359)
- GL_STUB(gl_dispatch_stub_360, 360)
- HIDDEN(gl_dispatch_stub_360)
- GL_STUB(gl_dispatch_stub_361, 361)
- HIDDEN(gl_dispatch_stub_361)
- GL_STUB(gl_dispatch_stub_362, 362)
- HIDDEN(gl_dispatch_stub_362)
- GL_STUB(gl_dispatch_stub_363, 363)
- HIDDEN(gl_dispatch_stub_363)
- GL_STUB(gl_dispatch_stub_364, 364)
- HIDDEN(gl_dispatch_stub_364)
- GL_STUB(gl_dispatch_stub_365, 365)
- HIDDEN(gl_dispatch_stub_365)
- GL_STUB(gl_dispatch_stub_366, 366)
- HIDDEN(gl_dispatch_stub_366)
- GL_STUB(gl_dispatch_stub_367, 367)
- HIDDEN(gl_dispatch_stub_367)
- GL_STUB(gl_dispatch_stub_368, 368)
- HIDDEN(gl_dispatch_stub_368)
- GL_STUB(gl_dispatch_stub_369, 369)
- HIDDEN(gl_dispatch_stub_369)
- GL_STUB(gl_dispatch_stub_370, 370)
- HIDDEN(gl_dispatch_stub_370)
- GL_STUB(gl_dispatch_stub_371, 371)
- HIDDEN(gl_dispatch_stub_371)
- GL_STUB(gl_dispatch_stub_372, 372)
- HIDDEN(gl_dispatch_stub_372)
- GL_STUB(gl_dispatch_stub_373, 373)
- HIDDEN(gl_dispatch_stub_373)
- GL_STUB(glActiveTexture, 374)
- GL_STUB(glClientActiveTexture, 375)
- GL_STUB(gl_dispatch_stub_376, 376)
- HIDDEN(gl_dispatch_stub_376)
- GL_STUB(gl_dispatch_stub_377, 377)
- HIDDEN(gl_dispatch_stub_377)
- GL_STUB(gl_dispatch_stub_378, 378)
- HIDDEN(gl_dispatch_stub_378)
- GL_STUB(gl_dispatch_stub_379, 379)
- HIDDEN(gl_dispatch_stub_379)
- GL_STUB(gl_dispatch_stub_380, 380)
- HIDDEN(gl_dispatch_stub_380)
- GL_STUB(gl_dispatch_stub_381, 381)
- HIDDEN(gl_dispatch_stub_381)
- GL_STUB(gl_dispatch_stub_382, 382)
- HIDDEN(gl_dispatch_stub_382)
- GL_STUB(gl_dispatch_stub_383, 383)
- HIDDEN(gl_dispatch_stub_383)
- GL_STUB(gl_dispatch_stub_384, 384)
- HIDDEN(gl_dispatch_stub_384)
- GL_STUB(gl_dispatch_stub_385, 385)
- HIDDEN(gl_dispatch_stub_385)
- GL_STUB(gl_dispatch_stub_386, 386)
- HIDDEN(gl_dispatch_stub_386)
- GL_STUB(gl_dispatch_stub_387, 387)
- HIDDEN(gl_dispatch_stub_387)
- GL_STUB(gl_dispatch_stub_388, 388)
- HIDDEN(gl_dispatch_stub_388)
- GL_STUB(gl_dispatch_stub_389, 389)
- HIDDEN(gl_dispatch_stub_389)
- GL_STUB(gl_dispatch_stub_390, 390)
- HIDDEN(gl_dispatch_stub_390)
- GL_STUB(gl_dispatch_stub_391, 391)
- HIDDEN(gl_dispatch_stub_391)
- GL_STUB(gl_dispatch_stub_392, 392)
- HIDDEN(gl_dispatch_stub_392)
- GL_STUB(gl_dispatch_stub_393, 393)
- HIDDEN(gl_dispatch_stub_393)
- GL_STUB(gl_dispatch_stub_394, 394)
- HIDDEN(gl_dispatch_stub_394)
- GL_STUB(gl_dispatch_stub_395, 395)
- HIDDEN(gl_dispatch_stub_395)
- GL_STUB(gl_dispatch_stub_396, 396)
- HIDDEN(gl_dispatch_stub_396)
- GL_STUB(gl_dispatch_stub_397, 397)
- HIDDEN(gl_dispatch_stub_397)
- GL_STUB(gl_dispatch_stub_398, 398)
- HIDDEN(gl_dispatch_stub_398)
- GL_STUB(gl_dispatch_stub_399, 399)
- HIDDEN(gl_dispatch_stub_399)
- GL_STUB(gl_dispatch_stub_400, 400)
- HIDDEN(gl_dispatch_stub_400)
- GL_STUB(gl_dispatch_stub_401, 401)
- HIDDEN(gl_dispatch_stub_401)
- GL_STUB(glMultiTexCoord4f, 402)
- GL_STUB(gl_dispatch_stub_403, 403)
- HIDDEN(gl_dispatch_stub_403)
- GL_STUB(gl_dispatch_stub_404, 404)
- HIDDEN(gl_dispatch_stub_404)
- GL_STUB(gl_dispatch_stub_405, 405)
- HIDDEN(gl_dispatch_stub_405)
- GL_STUB(gl_dispatch_stub_406, 406)
- HIDDEN(gl_dispatch_stub_406)
- GL_STUB(gl_dispatch_stub_407, 407)
- HIDDEN(gl_dispatch_stub_407)
- GL_STUB(glBlendEquationSeparateOES, 408)
- GL_STUB(glBlendFuncSeparateOES, 409)
- GL_STUB(glDrawTexfOES, 410)
- GL_STUB(glDrawTexfvOES, 411)
- GL_STUB(glDrawTexiOES, 412)
- GL_STUB(glDrawTexivOES, 413)
- GL_STUB(glDrawTexsOES, 414)
- GL_STUB(glDrawTexsvOES, 415)
- GL_STUB(glDrawTexxOES, 416)
- GL_STUB(glDrawTexxvOES, 417)
- GL_STUB(glBindFramebufferOES, 418)
- GL_STUB(glBindRenderbufferOES, 419)
- GL_STUB(glCheckFramebufferStatusOES, 420)
- GL_STUB(glDeleteFramebuffersOES, 421)
- GL_STUB(glDeleteRenderbuffersOES, 422)
- GL_STUB(glFramebufferRenderbufferOES, 423)
- GL_STUB(glFramebufferTexture2DOES, 424)
- GL_STUB(glGenFramebuffersOES, 425)
- GL_STUB(glGenRenderbuffersOES, 426)
- GL_STUB(glGenerateMipmapOES, 427)
- GL_STUB(glGetFramebufferAttachmentParameterivOES, 428)
- GL_STUB(glGetRenderbufferParameterivOES, 429)
- GL_STUB(glIsFramebufferOES, 430)
- GL_STUB(glIsRenderbufferOES, 431)
- GL_STUB(glRenderbufferStorageOES, 432)
- GL_STUB(glPointSizePointerOES, 433)
- GL_STUB(glQueryMatrixxOES, 434)
- GL_STUB(glGetTexGenxvOES, 435)
- GL_STUB(glTexGenxOES, 436)
- GL_STUB(glTexGenxvOES, 437)
- GL_STUB(glGetBufferPointervOES, 438)
- GL_STUB(glMapBufferOES, 439)
- GL_STUB(glUnmapBufferOES, 440)
- GL_STUB(glMultiDrawArraysEXT, 441)
- GL_STUB(glMultiDrawElementsEXT, 442)
- GL_STUB(gl_dispatch_stub_443, 443)
- HIDDEN(gl_dispatch_stub_443)
- GL_STUB(gl_dispatch_stub_444, 444)
- HIDDEN(gl_dispatch_stub_444)
- GL_STUB(gl_dispatch_stub_445, 445)
- HIDDEN(gl_dispatch_stub_445)
- GL_STUB(gl_dispatch_stub_446, 446)
- HIDDEN(gl_dispatch_stub_446)
- GL_STUB(glEGLImageTargetRenderbufferStorageOES, 447)
- GL_STUB(glEGLImageTargetTexture2DOES, 448)
- GL_STUB(glCompressedTexImage2D, 449)
- GL_STUB(glCompressedTexSubImage2D, 450)
- GL_STUB(glSampleCoverage, 451)
- GL_STUB(glBindBuffer, 452)
- GL_STUB(glBufferData, 453)
- GL_STUB(glBufferSubData, 454)
- GL_STUB(glDeleteBuffers, 455)
- GL_STUB(glGenBuffers, 456)
- GL_STUB(glGetBufferParameteriv, 457)
- GL_STUB(glIsBuffer, 458)
- GL_STUB(glPointParameterf, 459)
- GL_STUB(glPointParameterfv, 460)
- GL_STUB(glAlphaFuncx, 461)
- GL_STUB(glClearColorx, 462)
- GL_STUB(glClearDepthf, 463)
- GL_STUB(glClearDepthx, 464)
- GL_STUB(glColor4x, 465)
- GL_STUB(glDepthRangef, 466)
- GL_STUB(glDepthRangex, 467)
- GL_STUB(glFogx, 468)
- GL_STUB(glFogxv, 469)
- GL_STUB(glFrustumf, 470)
- GL_STUB(glFrustumx, 471)
- GL_STUB(glLightModelx, 472)
- GL_STUB(glLightModelxv, 473)
- GL_STUB(glLightx, 474)
- GL_STUB(glLightxv, 475)
- GL_STUB(glLineWidthx, 476)
- GL_STUB(glLoadMatrixx, 477)
- GL_STUB(glMaterialx, 478)
- GL_STUB(glMaterialxv, 479)
- GL_STUB(glMultMatrixx, 480)
- GL_STUB(glMultiTexCoord4x, 481)
- GL_STUB(glNormal3x, 482)
- GL_STUB(glOrthof, 483)
- GL_STUB(glOrthox, 484)
- GL_STUB(glPointSizex, 485)
- GL_STUB(glPolygonOffsetx, 486)
- GL_STUB(glRotatex, 487)
- GL_STUB(glSampleCoveragex, 488)
- GL_STUB(glScalex, 489)
- GL_STUB(glTexEnvx, 490)
- GL_STUB(glTexEnvxv, 491)
- GL_STUB(glTexParameterx, 492)
- GL_STUB(glTranslatex, 493)
- GL_STUB(glClipPlanef, 494)
- GL_STUB(glClipPlanex, 495)
- GL_STUB(glGetClipPlanef, 496)
- GL_STUB(glGetClipPlanex, 497)
- GL_STUB(glGetFixedv, 498)
- GL_STUB(glGetLightxv, 499)
- GL_STUB(glGetMaterialxv, 500)
- GL_STUB(glGetTexEnvxv, 501)
- GL_STUB(glGetTexParameterxv, 502)
- GL_STUB(glPointParameterx, 503)
- GL_STUB(glPointParameterxv, 504)
- GL_STUB(glTexParameterxv, 505)
- GL_STUB_ALIAS(glTexGenf, glTexGenfOES)
- GL_STUB_ALIAS(glTexGenfv, glTexGenfvOES)
- GL_STUB_ALIAS(glTexGeni, glTexGeniOES)
- GL_STUB_ALIAS(glTexGeniv, glTexGenivOES)
- GL_STUB_ALIAS(glGetTexGenfv, glGetTexGenfvOES)
- GL_STUB_ALIAS(glGetTexGeniv, glGetTexGenivOES)
- GL_STUB_ALIAS(glBlendEquation, glBlendEquationOES)
- GL_STUB_ALIAS(glActiveTextureARB, glActiveTexture)
- GL_STUB_ALIAS(glClientActiveTextureARB, glClientActiveTexture)
- GL_STUB_ALIAS(glMultiTexCoord4fARB, glMultiTexCoord4f)
- GL_STUB_ALIAS(glAlphaFuncxOES, glAlphaFuncx)
- GL_STUB_ALIAS(glClearColorxOES, glClearColorx)
- GL_STUB_ALIAS(glClearDepthfOES, glClearDepthf)
- GL_STUB_ALIAS(glClearDepthxOES, glClearDepthx)
- GL_STUB_ALIAS(glColor4xOES, glColor4x)
- GL_STUB_ALIAS(glDepthRangefOES, glDepthRangef)
- GL_STUB_ALIAS(glDepthRangexOES, glDepthRangex)
- GL_STUB_ALIAS(glFogxOES, glFogx)
- GL_STUB_ALIAS(glFogxvOES, glFogxv)
- GL_STUB_ALIAS(glFrustumfOES, glFrustumf)
- GL_STUB_ALIAS(glFrustumxOES, glFrustumx)
- GL_STUB_ALIAS(glLightModelxOES, glLightModelx)
- GL_STUB_ALIAS(glLightModelxvOES, glLightModelxv)
- GL_STUB_ALIAS(glLightxOES, glLightx)
- GL_STUB_ALIAS(glLightxvOES, glLightxv)
- GL_STUB_ALIAS(glLineWidthxOES, glLineWidthx)
- GL_STUB_ALIAS(glLoadMatrixxOES, glLoadMatrixx)
- GL_STUB_ALIAS(glMaterialxOES, glMaterialx)
- GL_STUB_ALIAS(glMaterialxvOES, glMaterialxv)
- GL_STUB_ALIAS(glMultMatrixxOES, glMultMatrixx)
- GL_STUB_ALIAS(glMultiTexCoord4xOES, glMultiTexCoord4x)
- GL_STUB_ALIAS(glNormal3xOES, glNormal3x)
- GL_STUB_ALIAS(glOrthofOES, glOrthof)
- GL_STUB_ALIAS(glOrthoxOES, glOrthox)
- GL_STUB_ALIAS(glPointSizexOES, glPointSizex)
- GL_STUB_ALIAS(glPolygonOffsetxOES, glPolygonOffsetx)
- GL_STUB_ALIAS(glRotatexOES, glRotatex)
- GL_STUB_ALIAS(glSampleCoveragexOES, glSampleCoveragex)
- GL_STUB_ALIAS(glScalexOES, glScalex)
- GL_STUB_ALIAS(glTexEnvxOES, glTexEnvx)
- GL_STUB_ALIAS(glTexEnvxvOES, glTexEnvxv)
- GL_STUB_ALIAS(glTexParameterxOES, glTexParameterx)
- GL_STUB_ALIAS(glTranslatexOES, glTranslatex)
- GL_STUB_ALIAS(glClipPlanefOES, glClipPlanef)
- GL_STUB_ALIAS(glClipPlanexOES, glClipPlanex)
- GL_STUB_ALIAS(glGetClipPlanefOES, glGetClipPlanef)
- GL_STUB_ALIAS(glGetClipPlanexOES, glGetClipPlanex)
- GL_STUB_ALIAS(glGetFixedvOES, glGetFixedv)
- GL_STUB_ALIAS(glGetLightxvOES, glGetLightxv)
- GL_STUB_ALIAS(glGetMaterialxvOES, glGetMaterialxv)
- GL_STUB_ALIAS(glGetTexEnvxvOES, glGetTexEnvxv)
- GL_STUB_ALIAS(glGetTexParameterxvOES, glGetTexParameterxv)
- GL_STUB_ALIAS(glPointParameterxOES, glPointParameterx)
- GL_STUB_ALIAS(glPointParameterxvOES, glPointParameterxv)
- GL_STUB_ALIAS(glTexParameterxvOES, glTexParameterxv)
-
- .globl gl_dispatch_functions_end
- HIDDEN(gl_dispatch_functions_end)
-gl_dispatch_functions_end:
diff --git a/src/mapi/es1api/glapi/glapi_x86-64.S b/src/mapi/es1api/glapi/glapi_x86-64.S
deleted file mode 100644
index 7fe97e53a1b..00000000000
--- a/src/mapi/es1api/glapi/glapi_x86-64.S
+++ /dev/null
@@ -1,19246 +0,0 @@
-/* DO NOT EDIT - This file generated automatically by gl_x86-64_asm.py (from Mesa) script */
-
-/*
- * (C) Copyright IBM Corporation 2005
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sub license,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
- * IBM,
- * AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
- * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-/* If we build with gcc's -fvisibility=hidden flag, we'll need to change
- * the symbol visibility mode to 'default'.
- */
-
-#include "x86/assyntax.h"
-
-#ifdef __GNUC__
-# pragma GCC visibility push(default)
-# define HIDDEN(x) .hidden x
-#else
-# define HIDDEN(x)
-#endif
-
-# if defined(USE_MGL_NAMESPACE)
-# define GL_PREFIX(n) GLNAME(CONCAT(mgl,n))
-# define _glapi_Dispatch _mglapi_Dispatch
-# else
-# define GL_PREFIX(n) GLNAME(CONCAT(gl,n))
-# endif
-
-#if defined(PTHREADS) || defined(WIN32) || defined(BEOS_THREADS)
-# define THREADS
-#endif
-
- .text
-
-#ifdef GLX_USE_TLS
-
- .globl _x86_64_get_get_dispatch; HIDDEN(_x86_64_get_get_dispatch)
-_x86_64_get_get_dispatch:
- lea _x86_64_get_dispatch(%rip), %rax
- ret
-
- .p2align 4,,15
-_x86_64_get_dispatch:
- movq _glapi_tls_Dispatch@GOTTPOFF(%rip), %rax
- movq %fs:(%rax), %rax
- ret
- .size _x86_64_get_dispatch, .-_x86_64_get_dispatch
-
-#elif defined(PTHREADS)
-
- .extern _glapi_Dispatch
- .extern _gl_DispatchTSD
- .extern pthread_getspecific
-
- .p2align 4,,15
-_x86_64_get_dispatch:
- movq _gl_DispatchTSD(%rip), %rdi
- jmp pthread_getspecific@PLT
-
-#elif defined(THREADS)
-
- .extern _glapi_get_dispatch
-
-#endif
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_0)
- .type GL_PREFIX(_dispatch_stub_0), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_0))
-GL_PREFIX(_dispatch_stub_0):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 0(%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 (%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 0(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 0(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_0), .-GL_PREFIX(_dispatch_stub_0)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_1)
- .type GL_PREFIX(_dispatch_stub_1), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_1))
-GL_PREFIX(_dispatch_stub_1):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 8(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- movq 8(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 8(%rax), %r11
- jmp *%r11
-1:
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- movq 8(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_1), .-GL_PREFIX(_dispatch_stub_1)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_2)
- .type GL_PREFIX(_dispatch_stub_2), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_2))
-GL_PREFIX(_dispatch_stub_2):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 16(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 16(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 16(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 16(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_2), .-GL_PREFIX(_dispatch_stub_2)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_3)
- .type GL_PREFIX(_dispatch_stub_3), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_3))
-GL_PREFIX(_dispatch_stub_3):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 24(%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 24(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 24(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 24(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_3), .-GL_PREFIX(_dispatch_stub_3)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_4)
- .type GL_PREFIX(_dispatch_stub_4), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_4))
-GL_PREFIX(_dispatch_stub_4):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 32(%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 32(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 32(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 32(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_4), .-GL_PREFIX(_dispatch_stub_4)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_5)
- .type GL_PREFIX(_dispatch_stub_5), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_5))
-GL_PREFIX(_dispatch_stub_5):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 40(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 40(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 40(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 40(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_5), .-GL_PREFIX(_dispatch_stub_5)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_6)
- .type GL_PREFIX(_dispatch_stub_6), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_6))
-GL_PREFIX(_dispatch_stub_6):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 48(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 48(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 48(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 48(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_6), .-GL_PREFIX(_dispatch_stub_6)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_7)
- .type GL_PREFIX(_dispatch_stub_7), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_7))
-GL_PREFIX(_dispatch_stub_7):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 56(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 56(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 56(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 56(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_7), .-GL_PREFIX(_dispatch_stub_7)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_8)
- .type GL_PREFIX(_dispatch_stub_8), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_8))
-GL_PREFIX(_dispatch_stub_8):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 64(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $56, %rsp
- movq %rdi, (%rsp)
- movq %rsi, 8(%rsp)
- movq %xmm0, 16(%rsp)
- movq %xmm1, 24(%rsp)
- movq %xmm2, 32(%rsp)
- movq %xmm3, 40(%rsp)
- movq %rdx, 48(%rsp)
- call _x86_64_get_dispatch@PLT
- movq 48(%rsp), %rdx
- movq 40(%rsp), %xmm3
- movq 32(%rsp), %xmm2
- movq 24(%rsp), %xmm1
- movq 16(%rsp), %xmm0
- movq 8(%rsp), %rsi
- movq (%rsp), %rdi
- addq $56, %rsp
- movq 64(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 64(%rax), %r11
- jmp *%r11
-1:
- subq $56, %rsp
- movq %rdi, (%rsp)
- movq %rsi, 8(%rsp)
- movq %xmm0, 16(%rsp)
- movq %xmm1, 24(%rsp)
- movq %xmm2, 32(%rsp)
- movq %xmm3, 40(%rsp)
- movq %rdx, 48(%rsp)
- call _glapi_get_dispatch
- movq 48(%rsp), %rdx
- movq 40(%rsp), %xmm3
- movq 32(%rsp), %xmm2
- movq 24(%rsp), %xmm1
- movq 16(%rsp), %xmm0
- movq 8(%rsp), %rsi
- movq (%rsp), %rdi
- addq $56, %rsp
- movq 64(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_8), .-GL_PREFIX(_dispatch_stub_8)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_9)
- .type GL_PREFIX(_dispatch_stub_9), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_9))
-GL_PREFIX(_dispatch_stub_9):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 72(%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 72(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 72(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 72(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_9), .-GL_PREFIX(_dispatch_stub_9)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_10)
- .type GL_PREFIX(_dispatch_stub_10), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_10))
-GL_PREFIX(_dispatch_stub_10):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 80(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 80(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 80(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 80(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_10), .-GL_PREFIX(_dispatch_stub_10)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_11)
- .type GL_PREFIX(_dispatch_stub_11), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_11))
-GL_PREFIX(_dispatch_stub_11):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 88(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $24, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- movq %xmm2, 16(%rsp)
- call _x86_64_get_dispatch@PLT
- movq 16(%rsp), %xmm2
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $24, %rsp
- movq 88(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 88(%rax), %r11
- jmp *%r11
-1:
- subq $24, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- movq %xmm2, 16(%rsp)
- call _glapi_get_dispatch
- movq 16(%rsp), %xmm2
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $24, %rsp
- movq 88(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_11), .-GL_PREFIX(_dispatch_stub_11)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_12)
- .type GL_PREFIX(_dispatch_stub_12), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_12))
-GL_PREFIX(_dispatch_stub_12):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 96(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 96(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 96(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 96(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_12), .-GL_PREFIX(_dispatch_stub_12)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_13)
- .type GL_PREFIX(_dispatch_stub_13), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_13))
-GL_PREFIX(_dispatch_stub_13):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 104(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $24, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- movq %xmm2, 16(%rsp)
- call _x86_64_get_dispatch@PLT
- movq 16(%rsp), %xmm2
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $24, %rsp
- movq 104(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 104(%rax), %r11
- jmp *%r11
-1:
- subq $24, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- movq %xmm2, 16(%rsp)
- call _glapi_get_dispatch
- movq 16(%rsp), %xmm2
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $24, %rsp
- movq 104(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_13), .-GL_PREFIX(_dispatch_stub_13)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_14)
- .type GL_PREFIX(_dispatch_stub_14), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_14))
-GL_PREFIX(_dispatch_stub_14):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 112(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 112(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 112(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 112(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_14), .-GL_PREFIX(_dispatch_stub_14)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_15)
- .type GL_PREFIX(_dispatch_stub_15), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_15))
-GL_PREFIX(_dispatch_stub_15):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 120(%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 120(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 120(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 120(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_15), .-GL_PREFIX(_dispatch_stub_15)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_16)
- .type GL_PREFIX(_dispatch_stub_16), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_16))
-GL_PREFIX(_dispatch_stub_16):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 128(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 128(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 128(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 128(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_16), .-GL_PREFIX(_dispatch_stub_16)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_17)
- .type GL_PREFIX(_dispatch_stub_17), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_17))
-GL_PREFIX(_dispatch_stub_17):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 136(%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 136(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 136(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 136(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_17), .-GL_PREFIX(_dispatch_stub_17)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_18)
- .type GL_PREFIX(_dispatch_stub_18), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_18))
-GL_PREFIX(_dispatch_stub_18):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 144(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 144(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 144(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 144(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_18), .-GL_PREFIX(_dispatch_stub_18)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_19)
- .type GL_PREFIX(_dispatch_stub_19), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_19))
-GL_PREFIX(_dispatch_stub_19):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 152(%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 152(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 152(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 152(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_19), .-GL_PREFIX(_dispatch_stub_19)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_20)
- .type GL_PREFIX(_dispatch_stub_20), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_20))
-GL_PREFIX(_dispatch_stub_20):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 160(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 160(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 160(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 160(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_20), .-GL_PREFIX(_dispatch_stub_20)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_21)
- .type GL_PREFIX(_dispatch_stub_21), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_21))
-GL_PREFIX(_dispatch_stub_21):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 168(%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 168(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 168(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 168(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_21), .-GL_PREFIX(_dispatch_stub_21)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_22)
- .type GL_PREFIX(_dispatch_stub_22), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_22))
-GL_PREFIX(_dispatch_stub_22):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 176(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 176(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 176(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 176(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_22), .-GL_PREFIX(_dispatch_stub_22)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_23)
- .type GL_PREFIX(_dispatch_stub_23), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_23))
-GL_PREFIX(_dispatch_stub_23):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 184(%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 184(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 184(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 184(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_23), .-GL_PREFIX(_dispatch_stub_23)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_24)
- .type GL_PREFIX(_dispatch_stub_24), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_24))
-GL_PREFIX(_dispatch_stub_24):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 192(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 192(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 192(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 192(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_24), .-GL_PREFIX(_dispatch_stub_24)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_25)
- .type GL_PREFIX(_dispatch_stub_25), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_25))
-GL_PREFIX(_dispatch_stub_25):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 200(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 200(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 200(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 200(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_25), .-GL_PREFIX(_dispatch_stub_25)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_26)
- .type GL_PREFIX(_dispatch_stub_26), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_26))
-GL_PREFIX(_dispatch_stub_26):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 208(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 208(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 208(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 208(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_26), .-GL_PREFIX(_dispatch_stub_26)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_27)
- .type GL_PREFIX(_dispatch_stub_27), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_27))
-GL_PREFIX(_dispatch_stub_27):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 216(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $40, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- movq %xmm2, 16(%rsp)
- movq %xmm3, 24(%rsp)
- call _x86_64_get_dispatch@PLT
- movq 24(%rsp), %xmm3
- movq 16(%rsp), %xmm2
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $40, %rsp
- movq 216(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 216(%rax), %r11
- jmp *%r11
-1:
- subq $40, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- movq %xmm2, 16(%rsp)
- movq %xmm3, 24(%rsp)
- call _glapi_get_dispatch
- movq 24(%rsp), %xmm3
- movq 16(%rsp), %xmm2
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $40, %rsp
- movq 216(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_27), .-GL_PREFIX(_dispatch_stub_27)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_28)
- .type GL_PREFIX(_dispatch_stub_28), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_28))
-GL_PREFIX(_dispatch_stub_28):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 224(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 224(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 224(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 224(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_28), .-GL_PREFIX(_dispatch_stub_28)
-
- .p2align 4,,15
- .globl GL_PREFIX(Color4f)
- .type GL_PREFIX(Color4f), @function
-GL_PREFIX(Color4f):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 232(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $40, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- movq %xmm2, 16(%rsp)
- movq %xmm3, 24(%rsp)
- call _x86_64_get_dispatch@PLT
- movq 24(%rsp), %xmm3
- movq 16(%rsp), %xmm2
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $40, %rsp
- movq 232(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 232(%rax), %r11
- jmp *%r11
-1:
- subq $40, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- movq %xmm2, 16(%rsp)
- movq %xmm3, 24(%rsp)
- call _glapi_get_dispatch
- movq 24(%rsp), %xmm3
- movq 16(%rsp), %xmm2
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $40, %rsp
- movq 232(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(Color4f), .-GL_PREFIX(Color4f)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_30)
- .type GL_PREFIX(_dispatch_stub_30), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_30))
-GL_PREFIX(_dispatch_stub_30):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 240(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 240(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 240(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 240(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_30), .-GL_PREFIX(_dispatch_stub_30)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_31)
- .type GL_PREFIX(_dispatch_stub_31), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_31))
-GL_PREFIX(_dispatch_stub_31):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 248(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 248(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 248(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 248(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_31), .-GL_PREFIX(_dispatch_stub_31)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_32)
- .type GL_PREFIX(_dispatch_stub_32), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_32))
-GL_PREFIX(_dispatch_stub_32):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 256(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 256(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 256(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 256(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_32), .-GL_PREFIX(_dispatch_stub_32)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_33)
- .type GL_PREFIX(_dispatch_stub_33), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_33))
-GL_PREFIX(_dispatch_stub_33):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 264(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 264(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 264(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 264(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_33), .-GL_PREFIX(_dispatch_stub_33)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_34)
- .type GL_PREFIX(_dispatch_stub_34), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_34))
-GL_PREFIX(_dispatch_stub_34):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 272(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 272(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 272(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 272(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_34), .-GL_PREFIX(_dispatch_stub_34)
-
- .p2align 4,,15
- .globl GL_PREFIX(Color4ub)
- .type GL_PREFIX(Color4ub), @function
-GL_PREFIX(Color4ub):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 280(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 280(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 280(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 280(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(Color4ub), .-GL_PREFIX(Color4ub)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_36)
- .type GL_PREFIX(_dispatch_stub_36), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_36))
-GL_PREFIX(_dispatch_stub_36):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 288(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 288(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 288(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 288(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_36), .-GL_PREFIX(_dispatch_stub_36)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_37)
- .type GL_PREFIX(_dispatch_stub_37), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_37))
-GL_PREFIX(_dispatch_stub_37):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 296(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 296(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 296(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 296(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_37), .-GL_PREFIX(_dispatch_stub_37)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_38)
- .type GL_PREFIX(_dispatch_stub_38), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_38))
-GL_PREFIX(_dispatch_stub_38):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 304(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 304(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 304(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 304(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_38), .-GL_PREFIX(_dispatch_stub_38)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_39)
- .type GL_PREFIX(_dispatch_stub_39), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_39))
-GL_PREFIX(_dispatch_stub_39):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 312(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 312(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 312(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 312(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_39), .-GL_PREFIX(_dispatch_stub_39)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_40)
- .type GL_PREFIX(_dispatch_stub_40), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_40))
-GL_PREFIX(_dispatch_stub_40):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 320(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 320(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 320(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 320(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_40), .-GL_PREFIX(_dispatch_stub_40)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_41)
- .type GL_PREFIX(_dispatch_stub_41), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_41))
-GL_PREFIX(_dispatch_stub_41):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 328(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 328(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 328(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 328(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_41), .-GL_PREFIX(_dispatch_stub_41)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_42)
- .type GL_PREFIX(_dispatch_stub_42), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_42))
-GL_PREFIX(_dispatch_stub_42):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 336(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 336(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 336(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 336(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_42), .-GL_PREFIX(_dispatch_stub_42)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_43)
- .type GL_PREFIX(_dispatch_stub_43), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_43))
-GL_PREFIX(_dispatch_stub_43):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 344(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- movq 344(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 344(%rax), %r11
- jmp *%r11
-1:
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- movq 344(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_43), .-GL_PREFIX(_dispatch_stub_43)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_44)
- .type GL_PREFIX(_dispatch_stub_44), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_44))
-GL_PREFIX(_dispatch_stub_44):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 352(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $8, %rsp
- movq %xmm0, (%rsp)
- call _x86_64_get_dispatch@PLT
- movq (%rsp), %xmm0
- addq $8, %rsp
- movq 352(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 352(%rax), %r11
- jmp *%r11
-1:
- subq $8, %rsp
- movq %xmm0, (%rsp)
- call _glapi_get_dispatch
- movq (%rsp), %xmm0
- addq $8, %rsp
- movq 352(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_44), .-GL_PREFIX(_dispatch_stub_44)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_45)
- .type GL_PREFIX(_dispatch_stub_45), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_45))
-GL_PREFIX(_dispatch_stub_45):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 360(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 360(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 360(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 360(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_45), .-GL_PREFIX(_dispatch_stub_45)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_46)
- .type GL_PREFIX(_dispatch_stub_46), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_46))
-GL_PREFIX(_dispatch_stub_46):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 368(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $8, %rsp
- movq %xmm0, (%rsp)
- call _x86_64_get_dispatch@PLT
- movq (%rsp), %xmm0
- addq $8, %rsp
- movq 368(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 368(%rax), %r11
- jmp *%r11
-1:
- subq $8, %rsp
- movq %xmm0, (%rsp)
- call _glapi_get_dispatch
- movq (%rsp), %xmm0
- addq $8, %rsp
- movq 368(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_46), .-GL_PREFIX(_dispatch_stub_46)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_47)
- .type GL_PREFIX(_dispatch_stub_47), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_47))
-GL_PREFIX(_dispatch_stub_47):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 376(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 376(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 376(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 376(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_47), .-GL_PREFIX(_dispatch_stub_47)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_48)
- .type GL_PREFIX(_dispatch_stub_48), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_48))
-GL_PREFIX(_dispatch_stub_48):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 384(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 384(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 384(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 384(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_48), .-GL_PREFIX(_dispatch_stub_48)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_49)
- .type GL_PREFIX(_dispatch_stub_49), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_49))
-GL_PREFIX(_dispatch_stub_49):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 392(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 392(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 392(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 392(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_49), .-GL_PREFIX(_dispatch_stub_49)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_50)
- .type GL_PREFIX(_dispatch_stub_50), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_50))
-GL_PREFIX(_dispatch_stub_50):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 400(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 400(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 400(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 400(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_50), .-GL_PREFIX(_dispatch_stub_50)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_51)
- .type GL_PREFIX(_dispatch_stub_51), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_51))
-GL_PREFIX(_dispatch_stub_51):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 408(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 408(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 408(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 408(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_51), .-GL_PREFIX(_dispatch_stub_51)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_52)
- .type GL_PREFIX(_dispatch_stub_52), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_52))
-GL_PREFIX(_dispatch_stub_52):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 416(%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 416(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 416(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 416(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_52), .-GL_PREFIX(_dispatch_stub_52)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_53)
- .type GL_PREFIX(_dispatch_stub_53), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_53))
-GL_PREFIX(_dispatch_stub_53):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 424(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 424(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 424(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 424(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_53), .-GL_PREFIX(_dispatch_stub_53)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_54)
- .type GL_PREFIX(_dispatch_stub_54), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_54))
-GL_PREFIX(_dispatch_stub_54):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 432(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $24, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- movq %xmm2, 16(%rsp)
- call _x86_64_get_dispatch@PLT
- movq 16(%rsp), %xmm2
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $24, %rsp
- movq 432(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 432(%rax), %r11
- jmp *%r11
-1:
- subq $24, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- movq %xmm2, 16(%rsp)
- call _glapi_get_dispatch
- movq 16(%rsp), %xmm2
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $24, %rsp
- movq 432(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_54), .-GL_PREFIX(_dispatch_stub_54)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_55)
- .type GL_PREFIX(_dispatch_stub_55), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_55))
-GL_PREFIX(_dispatch_stub_55):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 440(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 440(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 440(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 440(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_55), .-GL_PREFIX(_dispatch_stub_55)
-
- .p2align 4,,15
- .globl GL_PREFIX(Normal3f)
- .type GL_PREFIX(Normal3f), @function
-GL_PREFIX(Normal3f):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 448(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $24, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- movq %xmm2, 16(%rsp)
- call _x86_64_get_dispatch@PLT
- movq 16(%rsp), %xmm2
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $24, %rsp
- movq 448(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 448(%rax), %r11
- jmp *%r11
-1:
- subq $24, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- movq %xmm2, 16(%rsp)
- call _glapi_get_dispatch
- movq 16(%rsp), %xmm2
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $24, %rsp
- movq 448(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(Normal3f), .-GL_PREFIX(Normal3f)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_57)
- .type GL_PREFIX(_dispatch_stub_57), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_57))
-GL_PREFIX(_dispatch_stub_57):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 456(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 456(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 456(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 456(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_57), .-GL_PREFIX(_dispatch_stub_57)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_58)
- .type GL_PREFIX(_dispatch_stub_58), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_58))
-GL_PREFIX(_dispatch_stub_58):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 464(%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 464(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 464(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 464(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_58), .-GL_PREFIX(_dispatch_stub_58)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_59)
- .type GL_PREFIX(_dispatch_stub_59), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_59))
-GL_PREFIX(_dispatch_stub_59):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 472(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 472(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 472(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 472(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_59), .-GL_PREFIX(_dispatch_stub_59)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_60)
- .type GL_PREFIX(_dispatch_stub_60), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_60))
-GL_PREFIX(_dispatch_stub_60):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 480(%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 480(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 480(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 480(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_60), .-GL_PREFIX(_dispatch_stub_60)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_61)
- .type GL_PREFIX(_dispatch_stub_61), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_61))
-GL_PREFIX(_dispatch_stub_61):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 488(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 488(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 488(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 488(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_61), .-GL_PREFIX(_dispatch_stub_61)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_62)
- .type GL_PREFIX(_dispatch_stub_62), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_62))
-GL_PREFIX(_dispatch_stub_62):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 496(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $24, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- call _x86_64_get_dispatch@PLT
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $24, %rsp
- movq 496(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 496(%rax), %r11
- jmp *%r11
-1:
- subq $24, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- call _glapi_get_dispatch
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $24, %rsp
- movq 496(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_62), .-GL_PREFIX(_dispatch_stub_62)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_63)
- .type GL_PREFIX(_dispatch_stub_63), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_63))
-GL_PREFIX(_dispatch_stub_63):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 504(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 504(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 504(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 504(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_63), .-GL_PREFIX(_dispatch_stub_63)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_64)
- .type GL_PREFIX(_dispatch_stub_64), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_64))
-GL_PREFIX(_dispatch_stub_64):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 512(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $24, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- call _x86_64_get_dispatch@PLT
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $24, %rsp
- movq 512(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 512(%rax), %r11
- jmp *%r11
-1:
- subq $24, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- call _glapi_get_dispatch
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $24, %rsp
- movq 512(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_64), .-GL_PREFIX(_dispatch_stub_64)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_65)
- .type GL_PREFIX(_dispatch_stub_65), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_65))
-GL_PREFIX(_dispatch_stub_65):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 520(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 520(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 520(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 520(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_65), .-GL_PREFIX(_dispatch_stub_65)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_66)
- .type GL_PREFIX(_dispatch_stub_66), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_66))
-GL_PREFIX(_dispatch_stub_66):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 528(%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 528(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 528(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 528(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_66), .-GL_PREFIX(_dispatch_stub_66)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_67)
- .type GL_PREFIX(_dispatch_stub_67), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_67))
-GL_PREFIX(_dispatch_stub_67):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 536(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 536(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 536(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 536(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_67), .-GL_PREFIX(_dispatch_stub_67)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_68)
- .type GL_PREFIX(_dispatch_stub_68), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_68))
-GL_PREFIX(_dispatch_stub_68):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 544(%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 544(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 544(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 544(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_68), .-GL_PREFIX(_dispatch_stub_68)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_69)
- .type GL_PREFIX(_dispatch_stub_69), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_69))
-GL_PREFIX(_dispatch_stub_69):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 552(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 552(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 552(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 552(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_69), .-GL_PREFIX(_dispatch_stub_69)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_70)
- .type GL_PREFIX(_dispatch_stub_70), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_70))
-GL_PREFIX(_dispatch_stub_70):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 560(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $24, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- movq %xmm2, 16(%rsp)
- call _x86_64_get_dispatch@PLT
- movq 16(%rsp), %xmm2
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $24, %rsp
- movq 560(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 560(%rax), %r11
- jmp *%r11
-1:
- subq $24, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- movq %xmm2, 16(%rsp)
- call _glapi_get_dispatch
- movq 16(%rsp), %xmm2
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $24, %rsp
- movq 560(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_70), .-GL_PREFIX(_dispatch_stub_70)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_71)
- .type GL_PREFIX(_dispatch_stub_71), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_71))
-GL_PREFIX(_dispatch_stub_71):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 568(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 568(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 568(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 568(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_71), .-GL_PREFIX(_dispatch_stub_71)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_72)
- .type GL_PREFIX(_dispatch_stub_72), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_72))
-GL_PREFIX(_dispatch_stub_72):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 576(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $24, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- movq %xmm2, 16(%rsp)
- call _x86_64_get_dispatch@PLT
- movq 16(%rsp), %xmm2
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $24, %rsp
- movq 576(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 576(%rax), %r11
- jmp *%r11
-1:
- subq $24, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- movq %xmm2, 16(%rsp)
- call _glapi_get_dispatch
- movq 16(%rsp), %xmm2
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $24, %rsp
- movq 576(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_72), .-GL_PREFIX(_dispatch_stub_72)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_73)
- .type GL_PREFIX(_dispatch_stub_73), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_73))
-GL_PREFIX(_dispatch_stub_73):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 584(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 584(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 584(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 584(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_73), .-GL_PREFIX(_dispatch_stub_73)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_74)
- .type GL_PREFIX(_dispatch_stub_74), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_74))
-GL_PREFIX(_dispatch_stub_74):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 592(%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 592(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 592(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 592(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_74), .-GL_PREFIX(_dispatch_stub_74)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_75)
- .type GL_PREFIX(_dispatch_stub_75), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_75))
-GL_PREFIX(_dispatch_stub_75):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 600(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 600(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 600(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 600(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_75), .-GL_PREFIX(_dispatch_stub_75)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_76)
- .type GL_PREFIX(_dispatch_stub_76), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_76))
-GL_PREFIX(_dispatch_stub_76):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 608(%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 608(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 608(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 608(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_76), .-GL_PREFIX(_dispatch_stub_76)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_77)
- .type GL_PREFIX(_dispatch_stub_77), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_77))
-GL_PREFIX(_dispatch_stub_77):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 616(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 616(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 616(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 616(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_77), .-GL_PREFIX(_dispatch_stub_77)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_78)
- .type GL_PREFIX(_dispatch_stub_78), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_78))
-GL_PREFIX(_dispatch_stub_78):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 624(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $40, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- movq %xmm2, 16(%rsp)
- movq %xmm3, 24(%rsp)
- call _x86_64_get_dispatch@PLT
- movq 24(%rsp), %xmm3
- movq 16(%rsp), %xmm2
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $40, %rsp
- movq 624(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 624(%rax), %r11
- jmp *%r11
-1:
- subq $40, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- movq %xmm2, 16(%rsp)
- movq %xmm3, 24(%rsp)
- call _glapi_get_dispatch
- movq 24(%rsp), %xmm3
- movq 16(%rsp), %xmm2
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $40, %rsp
- movq 624(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_78), .-GL_PREFIX(_dispatch_stub_78)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_79)
- .type GL_PREFIX(_dispatch_stub_79), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_79))
-GL_PREFIX(_dispatch_stub_79):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 632(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 632(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 632(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 632(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_79), .-GL_PREFIX(_dispatch_stub_79)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_80)
- .type GL_PREFIX(_dispatch_stub_80), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_80))
-GL_PREFIX(_dispatch_stub_80):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 640(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $40, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- movq %xmm2, 16(%rsp)
- movq %xmm3, 24(%rsp)
- call _x86_64_get_dispatch@PLT
- movq 24(%rsp), %xmm3
- movq 16(%rsp), %xmm2
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $40, %rsp
- movq 640(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 640(%rax), %r11
- jmp *%r11
-1:
- subq $40, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- movq %xmm2, 16(%rsp)
- movq %xmm3, 24(%rsp)
- call _glapi_get_dispatch
- movq 24(%rsp), %xmm3
- movq 16(%rsp), %xmm2
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $40, %rsp
- movq 640(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_80), .-GL_PREFIX(_dispatch_stub_80)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_81)
- .type GL_PREFIX(_dispatch_stub_81), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_81))
-GL_PREFIX(_dispatch_stub_81):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 648(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 648(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 648(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 648(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_81), .-GL_PREFIX(_dispatch_stub_81)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_82)
- .type GL_PREFIX(_dispatch_stub_82), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_82))
-GL_PREFIX(_dispatch_stub_82):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 656(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 656(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 656(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 656(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_82), .-GL_PREFIX(_dispatch_stub_82)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_83)
- .type GL_PREFIX(_dispatch_stub_83), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_83))
-GL_PREFIX(_dispatch_stub_83):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 664(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 664(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 664(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 664(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_83), .-GL_PREFIX(_dispatch_stub_83)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_84)
- .type GL_PREFIX(_dispatch_stub_84), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_84))
-GL_PREFIX(_dispatch_stub_84):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 672(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 672(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 672(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 672(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_84), .-GL_PREFIX(_dispatch_stub_84)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_85)
- .type GL_PREFIX(_dispatch_stub_85), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_85))
-GL_PREFIX(_dispatch_stub_85):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 680(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 680(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 680(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 680(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_85), .-GL_PREFIX(_dispatch_stub_85)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_86)
- .type GL_PREFIX(_dispatch_stub_86), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_86))
-GL_PREFIX(_dispatch_stub_86):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 688(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $40, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- movq %xmm2, 16(%rsp)
- movq %xmm3, 24(%rsp)
- call _x86_64_get_dispatch@PLT
- movq 24(%rsp), %xmm3
- movq 16(%rsp), %xmm2
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $40, %rsp
- movq 688(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 688(%rax), %r11
- jmp *%r11
-1:
- subq $40, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- movq %xmm2, 16(%rsp)
- movq %xmm3, 24(%rsp)
- call _glapi_get_dispatch
- movq 24(%rsp), %xmm3
- movq 16(%rsp), %xmm2
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $40, %rsp
- movq 688(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_86), .-GL_PREFIX(_dispatch_stub_86)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_87)
- .type GL_PREFIX(_dispatch_stub_87), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_87))
-GL_PREFIX(_dispatch_stub_87):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 696(%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 696(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 696(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 696(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_87), .-GL_PREFIX(_dispatch_stub_87)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_88)
- .type GL_PREFIX(_dispatch_stub_88), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_88))
-GL_PREFIX(_dispatch_stub_88):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 704(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $40, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- movq %xmm2, 16(%rsp)
- movq %xmm3, 24(%rsp)
- call _x86_64_get_dispatch@PLT
- movq 24(%rsp), %xmm3
- movq 16(%rsp), %xmm2
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $40, %rsp
- movq 704(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 704(%rax), %r11
- jmp *%r11
-1:
- subq $40, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- movq %xmm2, 16(%rsp)
- movq %xmm3, 24(%rsp)
- call _glapi_get_dispatch
- movq 24(%rsp), %xmm3
- movq 16(%rsp), %xmm2
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $40, %rsp
- movq 704(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_88), .-GL_PREFIX(_dispatch_stub_88)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_89)
- .type GL_PREFIX(_dispatch_stub_89), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_89))
-GL_PREFIX(_dispatch_stub_89):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 712(%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 712(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 712(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 712(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_89), .-GL_PREFIX(_dispatch_stub_89)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_90)
- .type GL_PREFIX(_dispatch_stub_90), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_90))
-GL_PREFIX(_dispatch_stub_90):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 720(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 720(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 720(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 720(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_90), .-GL_PREFIX(_dispatch_stub_90)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_91)
- .type GL_PREFIX(_dispatch_stub_91), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_91))
-GL_PREFIX(_dispatch_stub_91):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 728(%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 728(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 728(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 728(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_91), .-GL_PREFIX(_dispatch_stub_91)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_92)
- .type GL_PREFIX(_dispatch_stub_92), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_92))
-GL_PREFIX(_dispatch_stub_92):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 736(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 736(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 736(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 736(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_92), .-GL_PREFIX(_dispatch_stub_92)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_93)
- .type GL_PREFIX(_dispatch_stub_93), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_93))
-GL_PREFIX(_dispatch_stub_93):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 744(%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 744(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 744(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 744(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_93), .-GL_PREFIX(_dispatch_stub_93)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_94)
- .type GL_PREFIX(_dispatch_stub_94), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_94))
-GL_PREFIX(_dispatch_stub_94):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 752(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $8, %rsp
- movq %xmm0, (%rsp)
- call _x86_64_get_dispatch@PLT
- movq (%rsp), %xmm0
- addq $8, %rsp
- movq 752(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 752(%rax), %r11
- jmp *%r11
-1:
- subq $8, %rsp
- movq %xmm0, (%rsp)
- call _glapi_get_dispatch
- movq (%rsp), %xmm0
- addq $8, %rsp
- movq 752(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_94), .-GL_PREFIX(_dispatch_stub_94)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_95)
- .type GL_PREFIX(_dispatch_stub_95), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_95))
-GL_PREFIX(_dispatch_stub_95):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 760(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 760(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 760(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 760(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_95), .-GL_PREFIX(_dispatch_stub_95)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_96)
- .type GL_PREFIX(_dispatch_stub_96), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_96))
-GL_PREFIX(_dispatch_stub_96):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 768(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $8, %rsp
- movq %xmm0, (%rsp)
- call _x86_64_get_dispatch@PLT
- movq (%rsp), %xmm0
- addq $8, %rsp
- movq 768(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 768(%rax), %r11
- jmp *%r11
-1:
- subq $8, %rsp
- movq %xmm0, (%rsp)
- call _glapi_get_dispatch
- movq (%rsp), %xmm0
- addq $8, %rsp
- movq 768(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_96), .-GL_PREFIX(_dispatch_stub_96)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_97)
- .type GL_PREFIX(_dispatch_stub_97), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_97))
-GL_PREFIX(_dispatch_stub_97):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 776(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 776(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 776(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 776(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_97), .-GL_PREFIX(_dispatch_stub_97)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_98)
- .type GL_PREFIX(_dispatch_stub_98), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_98))
-GL_PREFIX(_dispatch_stub_98):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 784(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 784(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 784(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 784(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_98), .-GL_PREFIX(_dispatch_stub_98)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_99)
- .type GL_PREFIX(_dispatch_stub_99), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_99))
-GL_PREFIX(_dispatch_stub_99):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 792(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 792(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 792(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 792(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_99), .-GL_PREFIX(_dispatch_stub_99)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_100)
- .type GL_PREFIX(_dispatch_stub_100), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_100))
-GL_PREFIX(_dispatch_stub_100):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 800(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 800(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 800(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 800(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_100), .-GL_PREFIX(_dispatch_stub_100)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_101)
- .type GL_PREFIX(_dispatch_stub_101), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_101))
-GL_PREFIX(_dispatch_stub_101):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 808(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 808(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 808(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 808(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_101), .-GL_PREFIX(_dispatch_stub_101)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_102)
- .type GL_PREFIX(_dispatch_stub_102), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_102))
-GL_PREFIX(_dispatch_stub_102):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 816(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $24, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- call _x86_64_get_dispatch@PLT
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $24, %rsp
- movq 816(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 816(%rax), %r11
- jmp *%r11
-1:
- subq $24, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- call _glapi_get_dispatch
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $24, %rsp
- movq 816(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_102), .-GL_PREFIX(_dispatch_stub_102)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_103)
- .type GL_PREFIX(_dispatch_stub_103), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_103))
-GL_PREFIX(_dispatch_stub_103):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 824(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 824(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 824(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 824(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_103), .-GL_PREFIX(_dispatch_stub_103)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_104)
- .type GL_PREFIX(_dispatch_stub_104), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_104))
-GL_PREFIX(_dispatch_stub_104):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 832(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $24, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- call _x86_64_get_dispatch@PLT
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $24, %rsp
- movq 832(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 832(%rax), %r11
- jmp *%r11
-1:
- subq $24, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- call _glapi_get_dispatch
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $24, %rsp
- movq 832(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_104), .-GL_PREFIX(_dispatch_stub_104)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_105)
- .type GL_PREFIX(_dispatch_stub_105), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_105))
-GL_PREFIX(_dispatch_stub_105):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 840(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 840(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 840(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 840(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_105), .-GL_PREFIX(_dispatch_stub_105)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_106)
- .type GL_PREFIX(_dispatch_stub_106), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_106))
-GL_PREFIX(_dispatch_stub_106):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 848(%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 848(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 848(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 848(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_106), .-GL_PREFIX(_dispatch_stub_106)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_107)
- .type GL_PREFIX(_dispatch_stub_107), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_107))
-GL_PREFIX(_dispatch_stub_107):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 856(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 856(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 856(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 856(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_107), .-GL_PREFIX(_dispatch_stub_107)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_108)
- .type GL_PREFIX(_dispatch_stub_108), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_108))
-GL_PREFIX(_dispatch_stub_108):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 864(%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 864(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 864(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 864(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_108), .-GL_PREFIX(_dispatch_stub_108)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_109)
- .type GL_PREFIX(_dispatch_stub_109), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_109))
-GL_PREFIX(_dispatch_stub_109):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 872(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 872(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 872(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 872(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_109), .-GL_PREFIX(_dispatch_stub_109)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_110)
- .type GL_PREFIX(_dispatch_stub_110), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_110))
-GL_PREFIX(_dispatch_stub_110):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 880(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $24, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- movq %xmm2, 16(%rsp)
- call _x86_64_get_dispatch@PLT
- movq 16(%rsp), %xmm2
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $24, %rsp
- movq 880(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 880(%rax), %r11
- jmp *%r11
-1:
- subq $24, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- movq %xmm2, 16(%rsp)
- call _glapi_get_dispatch
- movq 16(%rsp), %xmm2
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $24, %rsp
- movq 880(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_110), .-GL_PREFIX(_dispatch_stub_110)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_111)
- .type GL_PREFIX(_dispatch_stub_111), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_111))
-GL_PREFIX(_dispatch_stub_111):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 888(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 888(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 888(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 888(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_111), .-GL_PREFIX(_dispatch_stub_111)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_112)
- .type GL_PREFIX(_dispatch_stub_112), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_112))
-GL_PREFIX(_dispatch_stub_112):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 896(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $24, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- movq %xmm2, 16(%rsp)
- call _x86_64_get_dispatch@PLT
- movq 16(%rsp), %xmm2
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $24, %rsp
- movq 896(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 896(%rax), %r11
- jmp *%r11
-1:
- subq $24, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- movq %xmm2, 16(%rsp)
- call _glapi_get_dispatch
- movq 16(%rsp), %xmm2
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $24, %rsp
- movq 896(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_112), .-GL_PREFIX(_dispatch_stub_112)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_113)
- .type GL_PREFIX(_dispatch_stub_113), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_113))
-GL_PREFIX(_dispatch_stub_113):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 904(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 904(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 904(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 904(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_113), .-GL_PREFIX(_dispatch_stub_113)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_114)
- .type GL_PREFIX(_dispatch_stub_114), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_114))
-GL_PREFIX(_dispatch_stub_114):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 912(%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 912(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 912(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 912(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_114), .-GL_PREFIX(_dispatch_stub_114)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_115)
- .type GL_PREFIX(_dispatch_stub_115), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_115))
-GL_PREFIX(_dispatch_stub_115):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 920(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 920(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 920(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 920(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_115), .-GL_PREFIX(_dispatch_stub_115)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_116)
- .type GL_PREFIX(_dispatch_stub_116), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_116))
-GL_PREFIX(_dispatch_stub_116):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 928(%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 928(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 928(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 928(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_116), .-GL_PREFIX(_dispatch_stub_116)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_117)
- .type GL_PREFIX(_dispatch_stub_117), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_117))
-GL_PREFIX(_dispatch_stub_117):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 936(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 936(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 936(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 936(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_117), .-GL_PREFIX(_dispatch_stub_117)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_118)
- .type GL_PREFIX(_dispatch_stub_118), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_118))
-GL_PREFIX(_dispatch_stub_118):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 944(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $40, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- movq %xmm2, 16(%rsp)
- movq %xmm3, 24(%rsp)
- call _x86_64_get_dispatch@PLT
- movq 24(%rsp), %xmm3
- movq 16(%rsp), %xmm2
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $40, %rsp
- movq 944(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 944(%rax), %r11
- jmp *%r11
-1:
- subq $40, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- movq %xmm2, 16(%rsp)
- movq %xmm3, 24(%rsp)
- call _glapi_get_dispatch
- movq 24(%rsp), %xmm3
- movq 16(%rsp), %xmm2
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $40, %rsp
- movq 944(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_118), .-GL_PREFIX(_dispatch_stub_118)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_119)
- .type GL_PREFIX(_dispatch_stub_119), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_119))
-GL_PREFIX(_dispatch_stub_119):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 952(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 952(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 952(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 952(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_119), .-GL_PREFIX(_dispatch_stub_119)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_120)
- .type GL_PREFIX(_dispatch_stub_120), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_120))
-GL_PREFIX(_dispatch_stub_120):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 960(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $40, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- movq %xmm2, 16(%rsp)
- movq %xmm3, 24(%rsp)
- call _x86_64_get_dispatch@PLT
- movq 24(%rsp), %xmm3
- movq 16(%rsp), %xmm2
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $40, %rsp
- movq 960(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 960(%rax), %r11
- jmp *%r11
-1:
- subq $40, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- movq %xmm2, 16(%rsp)
- movq %xmm3, 24(%rsp)
- call _glapi_get_dispatch
- movq 24(%rsp), %xmm3
- movq 16(%rsp), %xmm2
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $40, %rsp
- movq 960(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_120), .-GL_PREFIX(_dispatch_stub_120)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_121)
- .type GL_PREFIX(_dispatch_stub_121), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_121))
-GL_PREFIX(_dispatch_stub_121):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 968(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 968(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 968(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 968(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_121), .-GL_PREFIX(_dispatch_stub_121)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_122)
- .type GL_PREFIX(_dispatch_stub_122), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_122))
-GL_PREFIX(_dispatch_stub_122):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 976(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 976(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 976(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 976(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_122), .-GL_PREFIX(_dispatch_stub_122)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_123)
- .type GL_PREFIX(_dispatch_stub_123), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_123))
-GL_PREFIX(_dispatch_stub_123):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 984(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 984(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 984(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 984(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_123), .-GL_PREFIX(_dispatch_stub_123)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_124)
- .type GL_PREFIX(_dispatch_stub_124), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_124))
-GL_PREFIX(_dispatch_stub_124):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 992(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 992(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 992(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 992(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_124), .-GL_PREFIX(_dispatch_stub_124)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_125)
- .type GL_PREFIX(_dispatch_stub_125), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_125))
-GL_PREFIX(_dispatch_stub_125):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1000(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 1000(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1000(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 1000(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_125), .-GL_PREFIX(_dispatch_stub_125)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_126)
- .type GL_PREFIX(_dispatch_stub_126), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_126))
-GL_PREFIX(_dispatch_stub_126):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1008(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $24, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- call _x86_64_get_dispatch@PLT
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $24, %rsp
- movq 1008(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1008(%rax), %r11
- jmp *%r11
-1:
- subq $24, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- call _glapi_get_dispatch
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $24, %rsp
- movq 1008(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_126), .-GL_PREFIX(_dispatch_stub_126)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_127)
- .type GL_PREFIX(_dispatch_stub_127), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_127))
-GL_PREFIX(_dispatch_stub_127):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1016(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 1016(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1016(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 1016(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_127), .-GL_PREFIX(_dispatch_stub_127)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_128)
- .type GL_PREFIX(_dispatch_stub_128), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_128))
-GL_PREFIX(_dispatch_stub_128):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1024(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $24, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- call _x86_64_get_dispatch@PLT
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $24, %rsp
- movq 1024(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1024(%rax), %r11
- jmp *%r11
-1:
- subq $24, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- call _glapi_get_dispatch
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $24, %rsp
- movq 1024(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_128), .-GL_PREFIX(_dispatch_stub_128)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_129)
- .type GL_PREFIX(_dispatch_stub_129), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_129))
-GL_PREFIX(_dispatch_stub_129):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1032(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 1032(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1032(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 1032(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_129), .-GL_PREFIX(_dispatch_stub_129)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_130)
- .type GL_PREFIX(_dispatch_stub_130), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_130))
-GL_PREFIX(_dispatch_stub_130):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1040(%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 1040(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1040(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 1040(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_130), .-GL_PREFIX(_dispatch_stub_130)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_131)
- .type GL_PREFIX(_dispatch_stub_131), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_131))
-GL_PREFIX(_dispatch_stub_131):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1048(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 1048(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1048(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 1048(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_131), .-GL_PREFIX(_dispatch_stub_131)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_132)
- .type GL_PREFIX(_dispatch_stub_132), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_132))
-GL_PREFIX(_dispatch_stub_132):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1056(%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 1056(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1056(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 1056(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_132), .-GL_PREFIX(_dispatch_stub_132)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_133)
- .type GL_PREFIX(_dispatch_stub_133), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_133))
-GL_PREFIX(_dispatch_stub_133):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1064(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 1064(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1064(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 1064(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_133), .-GL_PREFIX(_dispatch_stub_133)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_134)
- .type GL_PREFIX(_dispatch_stub_134), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_134))
-GL_PREFIX(_dispatch_stub_134):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1072(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $24, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- movq %xmm2, 16(%rsp)
- call _x86_64_get_dispatch@PLT
- movq 16(%rsp), %xmm2
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $24, %rsp
- movq 1072(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1072(%rax), %r11
- jmp *%r11
-1:
- subq $24, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- movq %xmm2, 16(%rsp)
- call _glapi_get_dispatch
- movq 16(%rsp), %xmm2
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $24, %rsp
- movq 1072(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_134), .-GL_PREFIX(_dispatch_stub_134)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_135)
- .type GL_PREFIX(_dispatch_stub_135), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_135))
-GL_PREFIX(_dispatch_stub_135):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1080(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 1080(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1080(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 1080(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_135), .-GL_PREFIX(_dispatch_stub_135)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_136)
- .type GL_PREFIX(_dispatch_stub_136), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_136))
-GL_PREFIX(_dispatch_stub_136):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1088(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $24, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- movq %xmm2, 16(%rsp)
- call _x86_64_get_dispatch@PLT
- movq 16(%rsp), %xmm2
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $24, %rsp
- movq 1088(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1088(%rax), %r11
- jmp *%r11
-1:
- subq $24, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- movq %xmm2, 16(%rsp)
- call _glapi_get_dispatch
- movq 16(%rsp), %xmm2
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $24, %rsp
- movq 1088(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_136), .-GL_PREFIX(_dispatch_stub_136)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_137)
- .type GL_PREFIX(_dispatch_stub_137), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_137))
-GL_PREFIX(_dispatch_stub_137):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1096(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 1096(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1096(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 1096(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_137), .-GL_PREFIX(_dispatch_stub_137)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_138)
- .type GL_PREFIX(_dispatch_stub_138), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_138))
-GL_PREFIX(_dispatch_stub_138):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1104(%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 1104(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1104(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 1104(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_138), .-GL_PREFIX(_dispatch_stub_138)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_139)
- .type GL_PREFIX(_dispatch_stub_139), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_139))
-GL_PREFIX(_dispatch_stub_139):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1112(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 1112(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1112(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 1112(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_139), .-GL_PREFIX(_dispatch_stub_139)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_140)
- .type GL_PREFIX(_dispatch_stub_140), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_140))
-GL_PREFIX(_dispatch_stub_140):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1120(%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 1120(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1120(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 1120(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_140), .-GL_PREFIX(_dispatch_stub_140)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_141)
- .type GL_PREFIX(_dispatch_stub_141), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_141))
-GL_PREFIX(_dispatch_stub_141):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1128(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 1128(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1128(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 1128(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_141), .-GL_PREFIX(_dispatch_stub_141)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_142)
- .type GL_PREFIX(_dispatch_stub_142), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_142))
-GL_PREFIX(_dispatch_stub_142):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1136(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $40, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- movq %xmm2, 16(%rsp)
- movq %xmm3, 24(%rsp)
- call _x86_64_get_dispatch@PLT
- movq 24(%rsp), %xmm3
- movq 16(%rsp), %xmm2
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $40, %rsp
- movq 1136(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1136(%rax), %r11
- jmp *%r11
-1:
- subq $40, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- movq %xmm2, 16(%rsp)
- movq %xmm3, 24(%rsp)
- call _glapi_get_dispatch
- movq 24(%rsp), %xmm3
- movq 16(%rsp), %xmm2
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $40, %rsp
- movq 1136(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_142), .-GL_PREFIX(_dispatch_stub_142)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_143)
- .type GL_PREFIX(_dispatch_stub_143), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_143))
-GL_PREFIX(_dispatch_stub_143):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1144(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 1144(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1144(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 1144(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_143), .-GL_PREFIX(_dispatch_stub_143)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_144)
- .type GL_PREFIX(_dispatch_stub_144), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_144))
-GL_PREFIX(_dispatch_stub_144):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1152(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $40, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- movq %xmm2, 16(%rsp)
- movq %xmm3, 24(%rsp)
- call _x86_64_get_dispatch@PLT
- movq 24(%rsp), %xmm3
- movq 16(%rsp), %xmm2
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $40, %rsp
- movq 1152(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1152(%rax), %r11
- jmp *%r11
-1:
- subq $40, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- movq %xmm2, 16(%rsp)
- movq %xmm3, 24(%rsp)
- call _glapi_get_dispatch
- movq 24(%rsp), %xmm3
- movq 16(%rsp), %xmm2
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $40, %rsp
- movq 1152(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_144), .-GL_PREFIX(_dispatch_stub_144)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_145)
- .type GL_PREFIX(_dispatch_stub_145), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_145))
-GL_PREFIX(_dispatch_stub_145):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1160(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 1160(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1160(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 1160(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_145), .-GL_PREFIX(_dispatch_stub_145)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_146)
- .type GL_PREFIX(_dispatch_stub_146), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_146))
-GL_PREFIX(_dispatch_stub_146):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1168(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 1168(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1168(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 1168(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_146), .-GL_PREFIX(_dispatch_stub_146)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_147)
- .type GL_PREFIX(_dispatch_stub_147), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_147))
-GL_PREFIX(_dispatch_stub_147):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1176(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 1176(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1176(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 1176(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_147), .-GL_PREFIX(_dispatch_stub_147)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_148)
- .type GL_PREFIX(_dispatch_stub_148), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_148))
-GL_PREFIX(_dispatch_stub_148):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1184(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 1184(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1184(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 1184(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_148), .-GL_PREFIX(_dispatch_stub_148)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_149)
- .type GL_PREFIX(_dispatch_stub_149), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_149))
-GL_PREFIX(_dispatch_stub_149):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1192(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 1192(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1192(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 1192(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_149), .-GL_PREFIX(_dispatch_stub_149)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_150)
- .type GL_PREFIX(_dispatch_stub_150), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_150))
-GL_PREFIX(_dispatch_stub_150):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1200(%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 1200(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1200(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 1200(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_150), .-GL_PREFIX(_dispatch_stub_150)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_151)
- .type GL_PREFIX(_dispatch_stub_151), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_151))
-GL_PREFIX(_dispatch_stub_151):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1208(%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 1208(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1208(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 1208(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_151), .-GL_PREFIX(_dispatch_stub_151)
-
- .p2align 4,,15
- .globl GL_PREFIX(CullFace)
- .type GL_PREFIX(CullFace), @function
-GL_PREFIX(CullFace):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1216(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 1216(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1216(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 1216(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(CullFace), .-GL_PREFIX(CullFace)
-
- .p2align 4,,15
- .globl GL_PREFIX(Fogf)
- .type GL_PREFIX(Fogf), @function
-GL_PREFIX(Fogf):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1224(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $24, %rsp
- movq %rdi, (%rsp)
- movq %xmm0, 8(%rsp)
- call _x86_64_get_dispatch@PLT
- movq 8(%rsp), %xmm0
- movq (%rsp), %rdi
- addq $24, %rsp
- movq 1224(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1224(%rax), %r11
- jmp *%r11
-1:
- subq $24, %rsp
- movq %rdi, (%rsp)
- movq %xmm0, 8(%rsp)
- call _glapi_get_dispatch
- movq 8(%rsp), %xmm0
- movq (%rsp), %rdi
- addq $24, %rsp
- movq 1224(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(Fogf), .-GL_PREFIX(Fogf)
-
- .p2align 4,,15
- .globl GL_PREFIX(Fogfv)
- .type GL_PREFIX(Fogfv), @function
-GL_PREFIX(Fogfv):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1232(%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 1232(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1232(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 1232(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(Fogfv), .-GL_PREFIX(Fogfv)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_155)
- .type GL_PREFIX(_dispatch_stub_155), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_155))
-GL_PREFIX(_dispatch_stub_155):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1240(%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 1240(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1240(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 1240(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_155), .-GL_PREFIX(_dispatch_stub_155)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_156)
- .type GL_PREFIX(_dispatch_stub_156), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_156))
-GL_PREFIX(_dispatch_stub_156):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1248(%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 1248(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1248(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 1248(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_156), .-GL_PREFIX(_dispatch_stub_156)
-
- .p2align 4,,15
- .globl GL_PREFIX(FrontFace)
- .type GL_PREFIX(FrontFace), @function
-GL_PREFIX(FrontFace):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1256(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 1256(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1256(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 1256(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(FrontFace), .-GL_PREFIX(FrontFace)
-
- .p2align 4,,15
- .globl GL_PREFIX(Hint)
- .type GL_PREFIX(Hint), @function
-GL_PREFIX(Hint):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1264(%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 1264(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1264(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 1264(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(Hint), .-GL_PREFIX(Hint)
-
- .p2align 4,,15
- .globl GL_PREFIX(Lightf)
- .type GL_PREFIX(Lightf), @function
-GL_PREFIX(Lightf):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1272(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $24, %rsp
- movq %rdi, (%rsp)
- movq %rsi, 8(%rsp)
- movq %xmm0, 16(%rsp)
- call _x86_64_get_dispatch@PLT
- movq 16(%rsp), %xmm0
- movq 8(%rsp), %rsi
- movq (%rsp), %rdi
- addq $24, %rsp
- movq 1272(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1272(%rax), %r11
- jmp *%r11
-1:
- subq $24, %rsp
- movq %rdi, (%rsp)
- movq %rsi, 8(%rsp)
- movq %xmm0, 16(%rsp)
- call _glapi_get_dispatch
- movq 16(%rsp), %xmm0
- movq 8(%rsp), %rsi
- movq (%rsp), %rdi
- addq $24, %rsp
- movq 1272(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(Lightf), .-GL_PREFIX(Lightf)
-
- .p2align 4,,15
- .globl GL_PREFIX(Lightfv)
- .type GL_PREFIX(Lightfv), @function
-GL_PREFIX(Lightfv):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1280(%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 1280(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1280(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 1280(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(Lightfv), .-GL_PREFIX(Lightfv)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_161)
- .type GL_PREFIX(_dispatch_stub_161), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_161))
-GL_PREFIX(_dispatch_stub_161):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1288(%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 1288(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1288(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 1288(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_161), .-GL_PREFIX(_dispatch_stub_161)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_162)
- .type GL_PREFIX(_dispatch_stub_162), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_162))
-GL_PREFIX(_dispatch_stub_162):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1296(%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 1296(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1296(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 1296(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_162), .-GL_PREFIX(_dispatch_stub_162)
-
- .p2align 4,,15
- .globl GL_PREFIX(LightModelf)
- .type GL_PREFIX(LightModelf), @function
-GL_PREFIX(LightModelf):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1304(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $24, %rsp
- movq %rdi, (%rsp)
- movq %xmm0, 8(%rsp)
- call _x86_64_get_dispatch@PLT
- movq 8(%rsp), %xmm0
- movq (%rsp), %rdi
- addq $24, %rsp
- movq 1304(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1304(%rax), %r11
- jmp *%r11
-1:
- subq $24, %rsp
- movq %rdi, (%rsp)
- movq %xmm0, 8(%rsp)
- call _glapi_get_dispatch
- movq 8(%rsp), %xmm0
- movq (%rsp), %rdi
- addq $24, %rsp
- movq 1304(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(LightModelf), .-GL_PREFIX(LightModelf)
-
- .p2align 4,,15
- .globl GL_PREFIX(LightModelfv)
- .type GL_PREFIX(LightModelfv), @function
-GL_PREFIX(LightModelfv):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1312(%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 1312(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1312(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 1312(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(LightModelfv), .-GL_PREFIX(LightModelfv)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_165)
- .type GL_PREFIX(_dispatch_stub_165), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_165))
-GL_PREFIX(_dispatch_stub_165):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1320(%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 1320(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1320(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 1320(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_165), .-GL_PREFIX(_dispatch_stub_165)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_166)
- .type GL_PREFIX(_dispatch_stub_166), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_166))
-GL_PREFIX(_dispatch_stub_166):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1328(%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 1328(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1328(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 1328(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_166), .-GL_PREFIX(_dispatch_stub_166)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_167)
- .type GL_PREFIX(_dispatch_stub_167), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_167))
-GL_PREFIX(_dispatch_stub_167):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1336(%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 1336(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1336(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 1336(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_167), .-GL_PREFIX(_dispatch_stub_167)
-
- .p2align 4,,15
- .globl GL_PREFIX(LineWidth)
- .type GL_PREFIX(LineWidth), @function
-GL_PREFIX(LineWidth):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1344(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $8, %rsp
- movq %xmm0, (%rsp)
- call _x86_64_get_dispatch@PLT
- movq (%rsp), %xmm0
- addq $8, %rsp
- movq 1344(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1344(%rax), %r11
- jmp *%r11
-1:
- subq $8, %rsp
- movq %xmm0, (%rsp)
- call _glapi_get_dispatch
- movq (%rsp), %xmm0
- addq $8, %rsp
- movq 1344(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(LineWidth), .-GL_PREFIX(LineWidth)
-
- .p2align 4,,15
- .globl GL_PREFIX(Materialf)
- .type GL_PREFIX(Materialf), @function
-GL_PREFIX(Materialf):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1352(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $24, %rsp
- movq %rdi, (%rsp)
- movq %rsi, 8(%rsp)
- movq %xmm0, 16(%rsp)
- call _x86_64_get_dispatch@PLT
- movq 16(%rsp), %xmm0
- movq 8(%rsp), %rsi
- movq (%rsp), %rdi
- addq $24, %rsp
- movq 1352(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1352(%rax), %r11
- jmp *%r11
-1:
- subq $24, %rsp
- movq %rdi, (%rsp)
- movq %rsi, 8(%rsp)
- movq %xmm0, 16(%rsp)
- call _glapi_get_dispatch
- movq 16(%rsp), %xmm0
- movq 8(%rsp), %rsi
- movq (%rsp), %rdi
- addq $24, %rsp
- movq 1352(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(Materialf), .-GL_PREFIX(Materialf)
-
- .p2align 4,,15
- .globl GL_PREFIX(Materialfv)
- .type GL_PREFIX(Materialfv), @function
-GL_PREFIX(Materialfv):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1360(%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 1360(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1360(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 1360(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(Materialfv), .-GL_PREFIX(Materialfv)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_171)
- .type GL_PREFIX(_dispatch_stub_171), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_171))
-GL_PREFIX(_dispatch_stub_171):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1368(%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 1368(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1368(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 1368(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_171), .-GL_PREFIX(_dispatch_stub_171)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_172)
- .type GL_PREFIX(_dispatch_stub_172), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_172))
-GL_PREFIX(_dispatch_stub_172):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1376(%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 1376(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1376(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 1376(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_172), .-GL_PREFIX(_dispatch_stub_172)
-
- .p2align 4,,15
- .globl GL_PREFIX(PointSize)
- .type GL_PREFIX(PointSize), @function
-GL_PREFIX(PointSize):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1384(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $8, %rsp
- movq %xmm0, (%rsp)
- call _x86_64_get_dispatch@PLT
- movq (%rsp), %xmm0
- addq $8, %rsp
- movq 1384(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1384(%rax), %r11
- jmp *%r11
-1:
- subq $8, %rsp
- movq %xmm0, (%rsp)
- call _glapi_get_dispatch
- movq (%rsp), %xmm0
- addq $8, %rsp
- movq 1384(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(PointSize), .-GL_PREFIX(PointSize)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_174)
- .type GL_PREFIX(_dispatch_stub_174), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_174))
-GL_PREFIX(_dispatch_stub_174):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1392(%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 1392(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1392(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 1392(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_174), .-GL_PREFIX(_dispatch_stub_174)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_175)
- .type GL_PREFIX(_dispatch_stub_175), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_175))
-GL_PREFIX(_dispatch_stub_175):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1400(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 1400(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1400(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 1400(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_175), .-GL_PREFIX(_dispatch_stub_175)
-
- .p2align 4,,15
- .globl GL_PREFIX(Scissor)
- .type GL_PREFIX(Scissor), @function
-GL_PREFIX(Scissor):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1408(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 1408(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1408(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 1408(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(Scissor), .-GL_PREFIX(Scissor)
-
- .p2align 4,,15
- .globl GL_PREFIX(ShadeModel)
- .type GL_PREFIX(ShadeModel), @function
-GL_PREFIX(ShadeModel):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1416(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 1416(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1416(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 1416(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(ShadeModel), .-GL_PREFIX(ShadeModel)
-
- .p2align 4,,15
- .globl GL_PREFIX(TexParameterf)
- .type GL_PREFIX(TexParameterf), @function
-GL_PREFIX(TexParameterf):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1424(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $24, %rsp
- movq %rdi, (%rsp)
- movq %rsi, 8(%rsp)
- movq %xmm0, 16(%rsp)
- call _x86_64_get_dispatch@PLT
- movq 16(%rsp), %xmm0
- movq 8(%rsp), %rsi
- movq (%rsp), %rdi
- addq $24, %rsp
- movq 1424(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1424(%rax), %r11
- jmp *%r11
-1:
- subq $24, %rsp
- movq %rdi, (%rsp)
- movq %rsi, 8(%rsp)
- movq %xmm0, 16(%rsp)
- call _glapi_get_dispatch
- movq 16(%rsp), %xmm0
- movq 8(%rsp), %rsi
- movq (%rsp), %rdi
- addq $24, %rsp
- movq 1424(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(TexParameterf), .-GL_PREFIX(TexParameterf)
-
- .p2align 4,,15
- .globl GL_PREFIX(TexParameterfv)
- .type GL_PREFIX(TexParameterfv), @function
-GL_PREFIX(TexParameterfv):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1432(%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 1432(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1432(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 1432(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(TexParameterfv), .-GL_PREFIX(TexParameterfv)
-
- .p2align 4,,15
- .globl GL_PREFIX(TexParameteri)
- .type GL_PREFIX(TexParameteri), @function
-GL_PREFIX(TexParameteri):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1440(%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 1440(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1440(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 1440(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(TexParameteri), .-GL_PREFIX(TexParameteri)
-
- .p2align 4,,15
- .globl GL_PREFIX(TexParameteriv)
- .type GL_PREFIX(TexParameteriv), @function
-GL_PREFIX(TexParameteriv):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1448(%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 1448(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1448(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 1448(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(TexParameteriv), .-GL_PREFIX(TexParameteriv)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_182)
- .type GL_PREFIX(_dispatch_stub_182), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_182))
-GL_PREFIX(_dispatch_stub_182):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1456(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %r8
- pushq %r9
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- popq %r9
- popq %r8
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 1456(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1456(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %r8
- pushq %r9
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %r9
- popq %r8
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 1456(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_182), .-GL_PREFIX(_dispatch_stub_182)
-
- .p2align 4,,15
- .globl GL_PREFIX(TexImage2D)
- .type GL_PREFIX(TexImage2D), @function
-GL_PREFIX(TexImage2D):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1464(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %r8
- pushq %r9
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- popq %r9
- popq %r8
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 1464(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1464(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %r8
- pushq %r9
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %r9
- popq %r8
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 1464(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(TexImage2D), .-GL_PREFIX(TexImage2D)
-
- .p2align 4,,15
- .globl GL_PREFIX(TexEnvf)
- .type GL_PREFIX(TexEnvf), @function
-GL_PREFIX(TexEnvf):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1472(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $24, %rsp
- movq %rdi, (%rsp)
- movq %rsi, 8(%rsp)
- movq %xmm0, 16(%rsp)
- call _x86_64_get_dispatch@PLT
- movq 16(%rsp), %xmm0
- movq 8(%rsp), %rsi
- movq (%rsp), %rdi
- addq $24, %rsp
- movq 1472(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1472(%rax), %r11
- jmp *%r11
-1:
- subq $24, %rsp
- movq %rdi, (%rsp)
- movq %rsi, 8(%rsp)
- movq %xmm0, 16(%rsp)
- call _glapi_get_dispatch
- movq 16(%rsp), %xmm0
- movq 8(%rsp), %rsi
- movq (%rsp), %rdi
- addq $24, %rsp
- movq 1472(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(TexEnvf), .-GL_PREFIX(TexEnvf)
-
- .p2align 4,,15
- .globl GL_PREFIX(TexEnvfv)
- .type GL_PREFIX(TexEnvfv), @function
-GL_PREFIX(TexEnvfv):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1480(%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 1480(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1480(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 1480(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(TexEnvfv), .-GL_PREFIX(TexEnvfv)
-
- .p2align 4,,15
- .globl GL_PREFIX(TexEnvi)
- .type GL_PREFIX(TexEnvi), @function
-GL_PREFIX(TexEnvi):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1488(%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 1488(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1488(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 1488(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(TexEnvi), .-GL_PREFIX(TexEnvi)
-
- .p2align 4,,15
- .globl GL_PREFIX(TexEnviv)
- .type GL_PREFIX(TexEnviv), @function
-GL_PREFIX(TexEnviv):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1496(%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 1496(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1496(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 1496(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(TexEnviv), .-GL_PREFIX(TexEnviv)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_188)
- .type GL_PREFIX(_dispatch_stub_188), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_188))
-GL_PREFIX(_dispatch_stub_188):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1504(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $24, %rsp
- movq %rdi, (%rsp)
- movq %rsi, 8(%rsp)
- movq %xmm0, 16(%rsp)
- call _x86_64_get_dispatch@PLT
- movq 16(%rsp), %xmm0
- movq 8(%rsp), %rsi
- movq (%rsp), %rdi
- addq $24, %rsp
- movq 1504(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1504(%rax), %r11
- jmp *%r11
-1:
- subq $24, %rsp
- movq %rdi, (%rsp)
- movq %rsi, 8(%rsp)
- movq %xmm0, 16(%rsp)
- call _glapi_get_dispatch
- movq 16(%rsp), %xmm0
- movq 8(%rsp), %rsi
- movq (%rsp), %rdi
- addq $24, %rsp
- movq 1504(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_188), .-GL_PREFIX(_dispatch_stub_188)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_189)
- .type GL_PREFIX(_dispatch_stub_189), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_189))
-GL_PREFIX(_dispatch_stub_189):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1512(%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 1512(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1512(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 1512(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_189), .-GL_PREFIX(_dispatch_stub_189)
-
- .p2align 4,,15
- .globl GL_PREFIX(TexGenfOES)
- .type GL_PREFIX(TexGenfOES), @function
-GL_PREFIX(TexGenfOES):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1520(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $24, %rsp
- movq %rdi, (%rsp)
- movq %rsi, 8(%rsp)
- movq %xmm0, 16(%rsp)
- call _x86_64_get_dispatch@PLT
- movq 16(%rsp), %xmm0
- movq 8(%rsp), %rsi
- movq (%rsp), %rdi
- addq $24, %rsp
- movq 1520(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1520(%rax), %r11
- jmp *%r11
-1:
- subq $24, %rsp
- movq %rdi, (%rsp)
- movq %rsi, 8(%rsp)
- movq %xmm0, 16(%rsp)
- call _glapi_get_dispatch
- movq 16(%rsp), %xmm0
- movq 8(%rsp), %rsi
- movq (%rsp), %rdi
- addq $24, %rsp
- movq 1520(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(TexGenfOES), .-GL_PREFIX(TexGenfOES)
-
- .p2align 4,,15
- .globl GL_PREFIX(TexGenfvOES)
- .type GL_PREFIX(TexGenfvOES), @function
-GL_PREFIX(TexGenfvOES):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1528(%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 1528(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1528(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 1528(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(TexGenfvOES), .-GL_PREFIX(TexGenfvOES)
-
- .p2align 4,,15
- .globl GL_PREFIX(TexGeniOES)
- .type GL_PREFIX(TexGeniOES), @function
-GL_PREFIX(TexGeniOES):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1536(%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 1536(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1536(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 1536(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(TexGeniOES), .-GL_PREFIX(TexGeniOES)
-
- .p2align 4,,15
- .globl GL_PREFIX(TexGenivOES)
- .type GL_PREFIX(TexGenivOES), @function
-GL_PREFIX(TexGenivOES):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1544(%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 1544(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1544(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 1544(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(TexGenivOES), .-GL_PREFIX(TexGenivOES)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_194)
- .type GL_PREFIX(_dispatch_stub_194), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_194))
-GL_PREFIX(_dispatch_stub_194):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1552(%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 1552(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1552(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 1552(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_194), .-GL_PREFIX(_dispatch_stub_194)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_195)
- .type GL_PREFIX(_dispatch_stub_195), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_195))
-GL_PREFIX(_dispatch_stub_195):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1560(%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 1560(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1560(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 1560(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_195), .-GL_PREFIX(_dispatch_stub_195)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_196)
- .type GL_PREFIX(_dispatch_stub_196), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_196))
-GL_PREFIX(_dispatch_stub_196):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1568(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 1568(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1568(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 1568(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_196), .-GL_PREFIX(_dispatch_stub_196)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_197)
- .type GL_PREFIX(_dispatch_stub_197), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_197))
-GL_PREFIX(_dispatch_stub_197):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1576(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- movq 1576(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1576(%rax), %r11
- jmp *%r11
-1:
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- movq 1576(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_197), .-GL_PREFIX(_dispatch_stub_197)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_198)
- .type GL_PREFIX(_dispatch_stub_198), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_198))
-GL_PREFIX(_dispatch_stub_198):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1584(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 1584(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1584(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 1584(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_198), .-GL_PREFIX(_dispatch_stub_198)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_199)
- .type GL_PREFIX(_dispatch_stub_199), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_199))
-GL_PREFIX(_dispatch_stub_199):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1592(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $8, %rsp
- movq %xmm0, (%rsp)
- call _x86_64_get_dispatch@PLT
- movq (%rsp), %xmm0
- addq $8, %rsp
- movq 1592(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1592(%rax), %r11
- jmp *%r11
-1:
- subq $8, %rsp
- movq %xmm0, (%rsp)
- call _glapi_get_dispatch
- movq (%rsp), %xmm0
- addq $8, %rsp
- movq 1592(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_199), .-GL_PREFIX(_dispatch_stub_199)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_200)
- .type GL_PREFIX(_dispatch_stub_200), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_200))
-GL_PREFIX(_dispatch_stub_200):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1600(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- movq 1600(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1600(%rax), %r11
- jmp *%r11
-1:
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- movq 1600(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_200), .-GL_PREFIX(_dispatch_stub_200)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_201)
- .type GL_PREFIX(_dispatch_stub_201), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_201))
-GL_PREFIX(_dispatch_stub_201):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1608(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 1608(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1608(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 1608(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_201), .-GL_PREFIX(_dispatch_stub_201)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_202)
- .type GL_PREFIX(_dispatch_stub_202), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_202))
-GL_PREFIX(_dispatch_stub_202):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1616(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 1616(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1616(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 1616(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_202), .-GL_PREFIX(_dispatch_stub_202)
-
- .p2align 4,,15
- .globl GL_PREFIX(Clear)
- .type GL_PREFIX(Clear), @function
-GL_PREFIX(Clear):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1624(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 1624(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1624(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 1624(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(Clear), .-GL_PREFIX(Clear)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_204)
- .type GL_PREFIX(_dispatch_stub_204), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_204))
-GL_PREFIX(_dispatch_stub_204):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1632(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $40, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- movq %xmm2, 16(%rsp)
- movq %xmm3, 24(%rsp)
- call _x86_64_get_dispatch@PLT
- movq 24(%rsp), %xmm3
- movq 16(%rsp), %xmm2
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $40, %rsp
- movq 1632(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1632(%rax), %r11
- jmp *%r11
-1:
- subq $40, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- movq %xmm2, 16(%rsp)
- movq %xmm3, 24(%rsp)
- call _glapi_get_dispatch
- movq 24(%rsp), %xmm3
- movq 16(%rsp), %xmm2
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $40, %rsp
- movq 1632(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_204), .-GL_PREFIX(_dispatch_stub_204)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_205)
- .type GL_PREFIX(_dispatch_stub_205), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_205))
-GL_PREFIX(_dispatch_stub_205):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1640(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $8, %rsp
- movq %xmm0, (%rsp)
- call _x86_64_get_dispatch@PLT
- movq (%rsp), %xmm0
- addq $8, %rsp
- movq 1640(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1640(%rax), %r11
- jmp *%r11
-1:
- subq $8, %rsp
- movq %xmm0, (%rsp)
- call _glapi_get_dispatch
- movq (%rsp), %xmm0
- addq $8, %rsp
- movq 1640(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_205), .-GL_PREFIX(_dispatch_stub_205)
-
- .p2align 4,,15
- .globl GL_PREFIX(ClearColor)
- .type GL_PREFIX(ClearColor), @function
-GL_PREFIX(ClearColor):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1648(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 1648(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1648(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 1648(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(ClearColor), .-GL_PREFIX(ClearColor)
-
- .p2align 4,,15
- .globl GL_PREFIX(ClearStencil)
- .type GL_PREFIX(ClearStencil), @function
-GL_PREFIX(ClearStencil):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1656(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 1656(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1656(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 1656(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(ClearStencil), .-GL_PREFIX(ClearStencil)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_208)
- .type GL_PREFIX(_dispatch_stub_208), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_208))
-GL_PREFIX(_dispatch_stub_208):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1664(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 1664(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1664(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 1664(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_208), .-GL_PREFIX(_dispatch_stub_208)
-
- .p2align 4,,15
- .globl GL_PREFIX(StencilMask)
- .type GL_PREFIX(StencilMask), @function
-GL_PREFIX(StencilMask):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1672(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 1672(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1672(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 1672(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(StencilMask), .-GL_PREFIX(StencilMask)
-
- .p2align 4,,15
- .globl GL_PREFIX(ColorMask)
- .type GL_PREFIX(ColorMask), @function
-GL_PREFIX(ColorMask):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1680(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 1680(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1680(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 1680(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(ColorMask), .-GL_PREFIX(ColorMask)
-
- .p2align 4,,15
- .globl GL_PREFIX(DepthMask)
- .type GL_PREFIX(DepthMask), @function
-GL_PREFIX(DepthMask):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1688(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 1688(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1688(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 1688(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(DepthMask), .-GL_PREFIX(DepthMask)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_212)
- .type GL_PREFIX(_dispatch_stub_212), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_212))
-GL_PREFIX(_dispatch_stub_212):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1696(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 1696(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1696(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 1696(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_212), .-GL_PREFIX(_dispatch_stub_212)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_213)
- .type GL_PREFIX(_dispatch_stub_213), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_213))
-GL_PREFIX(_dispatch_stub_213):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1704(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $24, %rsp
- movq %rdi, (%rsp)
- movq %xmm0, 8(%rsp)
- call _x86_64_get_dispatch@PLT
- movq 8(%rsp), %xmm0
- movq (%rsp), %rdi
- addq $24, %rsp
- movq 1704(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1704(%rax), %r11
- jmp *%r11
-1:
- subq $24, %rsp
- movq %rdi, (%rsp)
- movq %xmm0, 8(%rsp)
- call _glapi_get_dispatch
- movq 8(%rsp), %xmm0
- movq (%rsp), %rdi
- addq $24, %rsp
- movq 1704(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_213), .-GL_PREFIX(_dispatch_stub_213)
-
- .p2align 4,,15
- .globl GL_PREFIX(Disable)
- .type GL_PREFIX(Disable), @function
-GL_PREFIX(Disable):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1712(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 1712(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1712(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 1712(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(Disable), .-GL_PREFIX(Disable)
-
- .p2align 4,,15
- .globl GL_PREFIX(Enable)
- .type GL_PREFIX(Enable), @function
-GL_PREFIX(Enable):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1720(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 1720(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1720(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 1720(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(Enable), .-GL_PREFIX(Enable)
-
- .p2align 4,,15
- .globl GL_PREFIX(Finish)
- .type GL_PREFIX(Finish), @function
-GL_PREFIX(Finish):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1728(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- movq 1728(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1728(%rax), %r11
- jmp *%r11
-1:
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- movq 1728(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(Finish), .-GL_PREFIX(Finish)
-
- .p2align 4,,15
- .globl GL_PREFIX(Flush)
- .type GL_PREFIX(Flush), @function
-GL_PREFIX(Flush):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1736(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- movq 1736(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1736(%rax), %r11
- jmp *%r11
-1:
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- movq 1736(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(Flush), .-GL_PREFIX(Flush)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_218)
- .type GL_PREFIX(_dispatch_stub_218), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_218))
-GL_PREFIX(_dispatch_stub_218):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1744(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- movq 1744(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1744(%rax), %r11
- jmp *%r11
-1:
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- movq 1744(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_218), .-GL_PREFIX(_dispatch_stub_218)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_219)
- .type GL_PREFIX(_dispatch_stub_219), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_219))
-GL_PREFIX(_dispatch_stub_219):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1752(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 1752(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1752(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 1752(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_219), .-GL_PREFIX(_dispatch_stub_219)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_220)
- .type GL_PREFIX(_dispatch_stub_220), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_220))
-GL_PREFIX(_dispatch_stub_220):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1760(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $56, %rsp
- movq %rdi, (%rsp)
- movq %xmm0, 8(%rsp)
- movq %xmm1, 16(%rsp)
- movq %rsi, 24(%rsp)
- movq %rdx, 32(%rsp)
- movq %rcx, 40(%rsp)
- call _x86_64_get_dispatch@PLT
- movq 40(%rsp), %rcx
- movq 32(%rsp), %rdx
- movq 24(%rsp), %rsi
- movq 16(%rsp), %xmm1
- movq 8(%rsp), %xmm0
- movq (%rsp), %rdi
- addq $56, %rsp
- movq 1760(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1760(%rax), %r11
- jmp *%r11
-1:
- subq $56, %rsp
- movq %rdi, (%rsp)
- movq %xmm0, 8(%rsp)
- movq %xmm1, 16(%rsp)
- movq %rsi, 24(%rsp)
- movq %rdx, 32(%rsp)
- movq %rcx, 40(%rsp)
- call _glapi_get_dispatch
- movq 40(%rsp), %rcx
- movq 32(%rsp), %rdx
- movq 24(%rsp), %rsi
- movq 16(%rsp), %xmm1
- movq 8(%rsp), %xmm0
- movq (%rsp), %rdi
- addq $56, %rsp
- movq 1760(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_220), .-GL_PREFIX(_dispatch_stub_220)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_221)
- .type GL_PREFIX(_dispatch_stub_221), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_221))
-GL_PREFIX(_dispatch_stub_221):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1768(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $56, %rsp
- movq %rdi, (%rsp)
- movq %xmm0, 8(%rsp)
- movq %xmm1, 16(%rsp)
- movq %rsi, 24(%rsp)
- movq %rdx, 32(%rsp)
- movq %rcx, 40(%rsp)
- call _x86_64_get_dispatch@PLT
- movq 40(%rsp), %rcx
- movq 32(%rsp), %rdx
- movq 24(%rsp), %rsi
- movq 16(%rsp), %xmm1
- movq 8(%rsp), %xmm0
- movq (%rsp), %rdi
- addq $56, %rsp
- movq 1768(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1768(%rax), %r11
- jmp *%r11
-1:
- subq $56, %rsp
- movq %rdi, (%rsp)
- movq %xmm0, 8(%rsp)
- movq %xmm1, 16(%rsp)
- movq %rsi, 24(%rsp)
- movq %rdx, 32(%rsp)
- movq %rcx, 40(%rsp)
- call _glapi_get_dispatch
- movq 40(%rsp), %rcx
- movq 32(%rsp), %rdx
- movq 24(%rsp), %rsi
- movq 16(%rsp), %xmm1
- movq 8(%rsp), %xmm0
- movq (%rsp), %rdi
- addq $56, %rsp
- movq 1768(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_221), .-GL_PREFIX(_dispatch_stub_221)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_222)
- .type GL_PREFIX(_dispatch_stub_222), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_222))
-GL_PREFIX(_dispatch_stub_222):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1776(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $88, %rsp
- movq %rdi, (%rsp)
- movq %xmm0, 8(%rsp)
- movq %xmm1, 16(%rsp)
- movq %rsi, 24(%rsp)
- movq %rdx, 32(%rsp)
- movq %xmm2, 40(%rsp)
- movq %xmm3, 48(%rsp)
- movq %rcx, 56(%rsp)
- movq %r8, 64(%rsp)
- movq %r9, 72(%rsp)
- call _x86_64_get_dispatch@PLT
- movq 72(%rsp), %r9
- movq 64(%rsp), %r8
- movq 56(%rsp), %rcx
- movq 48(%rsp), %xmm3
- movq 40(%rsp), %xmm2
- movq 32(%rsp), %rdx
- movq 24(%rsp), %rsi
- movq 16(%rsp), %xmm1
- movq 8(%rsp), %xmm0
- movq (%rsp), %rdi
- addq $88, %rsp
- movq 1776(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1776(%rax), %r11
- jmp *%r11
-1:
- subq $88, %rsp
- movq %rdi, (%rsp)
- movq %xmm0, 8(%rsp)
- movq %xmm1, 16(%rsp)
- movq %rsi, 24(%rsp)
- movq %rdx, 32(%rsp)
- movq %xmm2, 40(%rsp)
- movq %xmm3, 48(%rsp)
- movq %rcx, 56(%rsp)
- movq %r8, 64(%rsp)
- movq %r9, 72(%rsp)
- call _glapi_get_dispatch
- movq 72(%rsp), %r9
- movq 64(%rsp), %r8
- movq 56(%rsp), %rcx
- movq 48(%rsp), %xmm3
- movq 40(%rsp), %xmm2
- movq 32(%rsp), %rdx
- movq 24(%rsp), %rsi
- movq 16(%rsp), %xmm1
- movq 8(%rsp), %xmm0
- movq (%rsp), %rdi
- addq $88, %rsp
- movq 1776(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_222), .-GL_PREFIX(_dispatch_stub_222)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_223)
- .type GL_PREFIX(_dispatch_stub_223), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_223))
-GL_PREFIX(_dispatch_stub_223):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1784(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $88, %rsp
- movq %rdi, (%rsp)
- movq %xmm0, 8(%rsp)
- movq %xmm1, 16(%rsp)
- movq %rsi, 24(%rsp)
- movq %rdx, 32(%rsp)
- movq %xmm2, 40(%rsp)
- movq %xmm3, 48(%rsp)
- movq %rcx, 56(%rsp)
- movq %r8, 64(%rsp)
- movq %r9, 72(%rsp)
- call _x86_64_get_dispatch@PLT
- movq 72(%rsp), %r9
- movq 64(%rsp), %r8
- movq 56(%rsp), %rcx
- movq 48(%rsp), %xmm3
- movq 40(%rsp), %xmm2
- movq 32(%rsp), %rdx
- movq 24(%rsp), %rsi
- movq 16(%rsp), %xmm1
- movq 8(%rsp), %xmm0
- movq (%rsp), %rdi
- addq $88, %rsp
- movq 1784(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1784(%rax), %r11
- jmp *%r11
-1:
- subq $88, %rsp
- movq %rdi, (%rsp)
- movq %xmm0, 8(%rsp)
- movq %xmm1, 16(%rsp)
- movq %rsi, 24(%rsp)
- movq %rdx, 32(%rsp)
- movq %xmm2, 40(%rsp)
- movq %xmm3, 48(%rsp)
- movq %rcx, 56(%rsp)
- movq %r8, 64(%rsp)
- movq %r9, 72(%rsp)
- call _glapi_get_dispatch
- movq 72(%rsp), %r9
- movq 64(%rsp), %r8
- movq 56(%rsp), %rcx
- movq 48(%rsp), %xmm3
- movq 40(%rsp), %xmm2
- movq 32(%rsp), %rdx
- movq 24(%rsp), %rsi
- movq 16(%rsp), %xmm1
- movq 8(%rsp), %xmm0
- movq (%rsp), %rdi
- addq $88, %rsp
- movq 1784(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_223), .-GL_PREFIX(_dispatch_stub_223)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_224)
- .type GL_PREFIX(_dispatch_stub_224), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_224))
-GL_PREFIX(_dispatch_stub_224):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1792(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $24, %rsp
- movq %rdi, (%rsp)
- movq %xmm0, 8(%rsp)
- movq %xmm1, 16(%rsp)
- call _x86_64_get_dispatch@PLT
- movq 16(%rsp), %xmm1
- movq 8(%rsp), %xmm0
- movq (%rsp), %rdi
- addq $24, %rsp
- movq 1792(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1792(%rax), %r11
- jmp *%r11
-1:
- subq $24, %rsp
- movq %rdi, (%rsp)
- movq %xmm0, 8(%rsp)
- movq %xmm1, 16(%rsp)
- call _glapi_get_dispatch
- movq 16(%rsp), %xmm1
- movq 8(%rsp), %xmm0
- movq (%rsp), %rdi
- addq $24, %rsp
- movq 1792(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_224), .-GL_PREFIX(_dispatch_stub_224)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_225)
- .type GL_PREFIX(_dispatch_stub_225), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_225))
-GL_PREFIX(_dispatch_stub_225):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1800(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $24, %rsp
- movq %rdi, (%rsp)
- movq %xmm0, 8(%rsp)
- movq %xmm1, 16(%rsp)
- call _x86_64_get_dispatch@PLT
- movq 16(%rsp), %xmm1
- movq 8(%rsp), %xmm0
- movq (%rsp), %rdi
- addq $24, %rsp
- movq 1800(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1800(%rax), %r11
- jmp *%r11
-1:
- subq $24, %rsp
- movq %rdi, (%rsp)
- movq %xmm0, 8(%rsp)
- movq %xmm1, 16(%rsp)
- call _glapi_get_dispatch
- movq 16(%rsp), %xmm1
- movq 8(%rsp), %xmm0
- movq (%rsp), %rdi
- addq $24, %rsp
- movq 1800(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_225), .-GL_PREFIX(_dispatch_stub_225)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_226)
- .type GL_PREFIX(_dispatch_stub_226), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_226))
-GL_PREFIX(_dispatch_stub_226):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1808(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $56, %rsp
- movq %rdi, (%rsp)
- movq %xmm0, 8(%rsp)
- movq %xmm1, 16(%rsp)
- movq %rsi, 24(%rsp)
- movq %xmm2, 32(%rsp)
- movq %xmm3, 40(%rsp)
- call _x86_64_get_dispatch@PLT
- movq 40(%rsp), %xmm3
- movq 32(%rsp), %xmm2
- movq 24(%rsp), %rsi
- movq 16(%rsp), %xmm1
- movq 8(%rsp), %xmm0
- movq (%rsp), %rdi
- addq $56, %rsp
- movq 1808(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1808(%rax), %r11
- jmp *%r11
-1:
- subq $56, %rsp
- movq %rdi, (%rsp)
- movq %xmm0, 8(%rsp)
- movq %xmm1, 16(%rsp)
- movq %rsi, 24(%rsp)
- movq %xmm2, 32(%rsp)
- movq %xmm3, 40(%rsp)
- call _glapi_get_dispatch
- movq 40(%rsp), %xmm3
- movq 32(%rsp), %xmm2
- movq 24(%rsp), %rsi
- movq 16(%rsp), %xmm1
- movq 8(%rsp), %xmm0
- movq (%rsp), %rdi
- addq $56, %rsp
- movq 1808(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_226), .-GL_PREFIX(_dispatch_stub_226)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_227)
- .type GL_PREFIX(_dispatch_stub_227), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_227))
-GL_PREFIX(_dispatch_stub_227):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1816(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $56, %rsp
- movq %rdi, (%rsp)
- movq %xmm0, 8(%rsp)
- movq %xmm1, 16(%rsp)
- movq %rsi, 24(%rsp)
- movq %xmm2, 32(%rsp)
- movq %xmm3, 40(%rsp)
- call _x86_64_get_dispatch@PLT
- movq 40(%rsp), %xmm3
- movq 32(%rsp), %xmm2
- movq 24(%rsp), %rsi
- movq 16(%rsp), %xmm1
- movq 8(%rsp), %xmm0
- movq (%rsp), %rdi
- addq $56, %rsp
- movq 1816(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1816(%rax), %r11
- jmp *%r11
-1:
- subq $56, %rsp
- movq %rdi, (%rsp)
- movq %xmm0, 8(%rsp)
- movq %xmm1, 16(%rsp)
- movq %rsi, 24(%rsp)
- movq %xmm2, 32(%rsp)
- movq %xmm3, 40(%rsp)
- call _glapi_get_dispatch
- movq 40(%rsp), %xmm3
- movq 32(%rsp), %xmm2
- movq 24(%rsp), %rsi
- movq 16(%rsp), %xmm1
- movq 8(%rsp), %xmm0
- movq (%rsp), %rdi
- addq $56, %rsp
- movq 1816(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_227), .-GL_PREFIX(_dispatch_stub_227)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_228)
- .type GL_PREFIX(_dispatch_stub_228), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_228))
-GL_PREFIX(_dispatch_stub_228):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1824(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $8, %rsp
- movq %xmm0, (%rsp)
- call _x86_64_get_dispatch@PLT
- movq (%rsp), %xmm0
- addq $8, %rsp
- movq 1824(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1824(%rax), %r11
- jmp *%r11
-1:
- subq $8, %rsp
- movq %xmm0, (%rsp)
- call _glapi_get_dispatch
- movq (%rsp), %xmm0
- addq $8, %rsp
- movq 1824(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_228), .-GL_PREFIX(_dispatch_stub_228)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_229)
- .type GL_PREFIX(_dispatch_stub_229), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_229))
-GL_PREFIX(_dispatch_stub_229):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1832(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 1832(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1832(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 1832(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_229), .-GL_PREFIX(_dispatch_stub_229)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_230)
- .type GL_PREFIX(_dispatch_stub_230), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_230))
-GL_PREFIX(_dispatch_stub_230):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1840(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $8, %rsp
- movq %xmm0, (%rsp)
- call _x86_64_get_dispatch@PLT
- movq (%rsp), %xmm0
- addq $8, %rsp
- movq 1840(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1840(%rax), %r11
- jmp *%r11
-1:
- subq $8, %rsp
- movq %xmm0, (%rsp)
- call _glapi_get_dispatch
- movq (%rsp), %xmm0
- addq $8, %rsp
- movq 1840(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_230), .-GL_PREFIX(_dispatch_stub_230)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_231)
- .type GL_PREFIX(_dispatch_stub_231), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_231))
-GL_PREFIX(_dispatch_stub_231):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1848(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 1848(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1848(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 1848(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_231), .-GL_PREFIX(_dispatch_stub_231)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_232)
- .type GL_PREFIX(_dispatch_stub_232), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_232))
-GL_PREFIX(_dispatch_stub_232):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1856(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $24, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- call _x86_64_get_dispatch@PLT
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $24, %rsp
- movq 1856(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1856(%rax), %r11
- jmp *%r11
-1:
- subq $24, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- call _glapi_get_dispatch
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $24, %rsp
- movq 1856(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_232), .-GL_PREFIX(_dispatch_stub_232)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_233)
- .type GL_PREFIX(_dispatch_stub_233), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_233))
-GL_PREFIX(_dispatch_stub_233):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1864(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 1864(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1864(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 1864(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_233), .-GL_PREFIX(_dispatch_stub_233)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_234)
- .type GL_PREFIX(_dispatch_stub_234), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_234))
-GL_PREFIX(_dispatch_stub_234):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1872(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $24, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- call _x86_64_get_dispatch@PLT
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $24, %rsp
- movq 1872(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1872(%rax), %r11
- jmp *%r11
-1:
- subq $24, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- call _glapi_get_dispatch
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $24, %rsp
- movq 1872(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_234), .-GL_PREFIX(_dispatch_stub_234)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_235)
- .type GL_PREFIX(_dispatch_stub_235), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_235))
-GL_PREFIX(_dispatch_stub_235):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1880(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 1880(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1880(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 1880(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_235), .-GL_PREFIX(_dispatch_stub_235)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_236)
- .type GL_PREFIX(_dispatch_stub_236), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_236))
-GL_PREFIX(_dispatch_stub_236):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1888(%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 1888(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1888(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 1888(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_236), .-GL_PREFIX(_dispatch_stub_236)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_237)
- .type GL_PREFIX(_dispatch_stub_237), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_237))
-GL_PREFIX(_dispatch_stub_237):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1896(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 1896(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1896(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 1896(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_237), .-GL_PREFIX(_dispatch_stub_237)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_238)
- .type GL_PREFIX(_dispatch_stub_238), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_238))
-GL_PREFIX(_dispatch_stub_238):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1904(%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 1904(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1904(%rax), %r11
- 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 1904(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_238), .-GL_PREFIX(_dispatch_stub_238)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_239)
- .type GL_PREFIX(_dispatch_stub_239), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_239))
-GL_PREFIX(_dispatch_stub_239):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1912(%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 1912(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1912(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 1912(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_239), .-GL_PREFIX(_dispatch_stub_239)
-
- .p2align 4,,15
- .globl GL_PREFIX(AlphaFunc)
- .type GL_PREFIX(AlphaFunc), @function
-GL_PREFIX(AlphaFunc):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1920(%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 1920(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1920(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 1920(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(AlphaFunc), .-GL_PREFIX(AlphaFunc)
-
- .p2align 4,,15
- .globl GL_PREFIX(BlendFunc)
- .type GL_PREFIX(BlendFunc), @function
-GL_PREFIX(BlendFunc):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1928(%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 1928(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1928(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 1928(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(BlendFunc), .-GL_PREFIX(BlendFunc)
-
- .p2align 4,,15
- .globl GL_PREFIX(LogicOp)
- .type GL_PREFIX(LogicOp), @function
-GL_PREFIX(LogicOp):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1936(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 1936(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1936(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 1936(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(LogicOp), .-GL_PREFIX(LogicOp)
-
- .p2align 4,,15
- .globl GL_PREFIX(StencilFunc)
- .type GL_PREFIX(StencilFunc), @function
-GL_PREFIX(StencilFunc):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1944(%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 1944(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1944(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 1944(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(StencilFunc), .-GL_PREFIX(StencilFunc)
-
- .p2align 4,,15
- .globl GL_PREFIX(StencilOp)
- .type GL_PREFIX(StencilOp), @function
-GL_PREFIX(StencilOp):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1952(%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 1952(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1952(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 1952(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(StencilOp), .-GL_PREFIX(StencilOp)
-
- .p2align 4,,15
- .globl GL_PREFIX(DepthFunc)
- .type GL_PREFIX(DepthFunc), @function
-GL_PREFIX(DepthFunc):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1960(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 1960(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1960(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 1960(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(DepthFunc), .-GL_PREFIX(DepthFunc)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_246)
- .type GL_PREFIX(_dispatch_stub_246), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_246))
-GL_PREFIX(_dispatch_stub_246):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1968(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $24, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- call _x86_64_get_dispatch@PLT
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $24, %rsp
- movq 1968(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1968(%rax), %r11
- jmp *%r11
-1:
- subq $24, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- call _glapi_get_dispatch
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $24, %rsp
- movq 1968(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_246), .-GL_PREFIX(_dispatch_stub_246)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_247)
- .type GL_PREFIX(_dispatch_stub_247), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_247))
-GL_PREFIX(_dispatch_stub_247):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1976(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $24, %rsp
- movq %rdi, (%rsp)
- movq %xmm0, 8(%rsp)
- call _x86_64_get_dispatch@PLT
- movq 8(%rsp), %xmm0
- movq (%rsp), %rdi
- addq $24, %rsp
- movq 1976(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1976(%rax), %r11
- jmp *%r11
-1:
- subq $24, %rsp
- movq %rdi, (%rsp)
- movq %xmm0, 8(%rsp)
- call _glapi_get_dispatch
- movq 8(%rsp), %xmm0
- movq (%rsp), %rdi
- addq $24, %rsp
- movq 1976(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_247), .-GL_PREFIX(_dispatch_stub_247)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_248)
- .type GL_PREFIX(_dispatch_stub_248), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_248))
-GL_PREFIX(_dispatch_stub_248):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1984(%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 1984(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1984(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 1984(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_248), .-GL_PREFIX(_dispatch_stub_248)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_249)
- .type GL_PREFIX(_dispatch_stub_249), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_249))
-GL_PREFIX(_dispatch_stub_249):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1992(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $24, %rsp
- movq %rdi, (%rsp)
- movq %xmm0, 8(%rsp)
- call _x86_64_get_dispatch@PLT
- movq 8(%rsp), %xmm0
- movq (%rsp), %rdi
- addq $24, %rsp
- movq 1992(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1992(%rax), %r11
- jmp *%r11
-1:
- subq $24, %rsp
- movq %rdi, (%rsp)
- movq %xmm0, 8(%rsp)
- call _glapi_get_dispatch
- movq 8(%rsp), %xmm0
- movq (%rsp), %rdi
- addq $24, %rsp
- movq 1992(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_249), .-GL_PREFIX(_dispatch_stub_249)
-
- .p2align 4,,15
- .globl GL_PREFIX(PixelStorei)
- .type GL_PREFIX(PixelStorei), @function
-GL_PREFIX(PixelStorei):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2000(%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 2000(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2000(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 2000(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(PixelStorei), .-GL_PREFIX(PixelStorei)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_251)
- .type GL_PREFIX(_dispatch_stub_251), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_251))
-GL_PREFIX(_dispatch_stub_251):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2008(%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 2008(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2008(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2008(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_251), .-GL_PREFIX(_dispatch_stub_251)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_252)
- .type GL_PREFIX(_dispatch_stub_252), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_252))
-GL_PREFIX(_dispatch_stub_252):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2016(%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 2016(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2016(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2016(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_252), .-GL_PREFIX(_dispatch_stub_252)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_253)
- .type GL_PREFIX(_dispatch_stub_253), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_253))
-GL_PREFIX(_dispatch_stub_253):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2024(%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 2024(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2024(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2024(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_253), .-GL_PREFIX(_dispatch_stub_253)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_254)
- .type GL_PREFIX(_dispatch_stub_254), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_254))
-GL_PREFIX(_dispatch_stub_254):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2032(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 2032(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2032(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 2032(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_254), .-GL_PREFIX(_dispatch_stub_254)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_255)
- .type GL_PREFIX(_dispatch_stub_255), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_255))
-GL_PREFIX(_dispatch_stub_255):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2040(%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 2040(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2040(%rax), %r11
- 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 2040(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_255), .-GL_PREFIX(_dispatch_stub_255)
-
- .p2align 4,,15
- .globl GL_PREFIX(ReadPixels)
- .type GL_PREFIX(ReadPixels), @function
-GL_PREFIX(ReadPixels):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2048(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %r8
- pushq %r9
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- popq %r9
- popq %r8
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2048(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2048(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %r8
- pushq %r9
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %r9
- popq %r8
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2048(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(ReadPixels), .-GL_PREFIX(ReadPixels)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_257)
- .type GL_PREFIX(_dispatch_stub_257), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_257))
-GL_PREFIX(_dispatch_stub_257):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2056(%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 2056(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2056(%rax), %r11
- 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 2056(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_257), .-GL_PREFIX(_dispatch_stub_257)
-
- .p2align 4,,15
- .globl GL_PREFIX(GetBooleanv)
- .type GL_PREFIX(GetBooleanv), @function
-GL_PREFIX(GetBooleanv):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2064(%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 2064(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2064(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 2064(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(GetBooleanv), .-GL_PREFIX(GetBooleanv)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_259)
- .type GL_PREFIX(_dispatch_stub_259), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_259))
-GL_PREFIX(_dispatch_stub_259):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2072(%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 2072(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2072(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 2072(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_259), .-GL_PREFIX(_dispatch_stub_259)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_260)
- .type GL_PREFIX(_dispatch_stub_260), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_260))
-GL_PREFIX(_dispatch_stub_260):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2080(%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 2080(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2080(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 2080(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_260), .-GL_PREFIX(_dispatch_stub_260)
-
- .p2align 4,,15
- .globl GL_PREFIX(GetError)
- .type GL_PREFIX(GetError), @function
-GL_PREFIX(GetError):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2088(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- movq 2088(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2088(%rax), %r11
- jmp *%r11
-1:
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- movq 2088(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(GetError), .-GL_PREFIX(GetError)
-
- .p2align 4,,15
- .globl GL_PREFIX(GetFloatv)
- .type GL_PREFIX(GetFloatv), @function
-GL_PREFIX(GetFloatv):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2096(%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 2096(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2096(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 2096(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(GetFloatv), .-GL_PREFIX(GetFloatv)
-
- .p2align 4,,15
- .globl GL_PREFIX(GetIntegerv)
- .type GL_PREFIX(GetIntegerv), @function
-GL_PREFIX(GetIntegerv):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2104(%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 2104(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2104(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 2104(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(GetIntegerv), .-GL_PREFIX(GetIntegerv)
-
- .p2align 4,,15
- .globl GL_PREFIX(GetLightfv)
- .type GL_PREFIX(GetLightfv), @function
-GL_PREFIX(GetLightfv):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2112(%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 2112(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2112(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2112(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(GetLightfv), .-GL_PREFIX(GetLightfv)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_265)
- .type GL_PREFIX(_dispatch_stub_265), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_265))
-GL_PREFIX(_dispatch_stub_265):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2120(%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 2120(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2120(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2120(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_265), .-GL_PREFIX(_dispatch_stub_265)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_266)
- .type GL_PREFIX(_dispatch_stub_266), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_266))
-GL_PREFIX(_dispatch_stub_266):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2128(%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 2128(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2128(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2128(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_266), .-GL_PREFIX(_dispatch_stub_266)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_267)
- .type GL_PREFIX(_dispatch_stub_267), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_267))
-GL_PREFIX(_dispatch_stub_267):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2136(%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 2136(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2136(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2136(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_267), .-GL_PREFIX(_dispatch_stub_267)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_268)
- .type GL_PREFIX(_dispatch_stub_268), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_268))
-GL_PREFIX(_dispatch_stub_268):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2144(%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 2144(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2144(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2144(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_268), .-GL_PREFIX(_dispatch_stub_268)
-
- .p2align 4,,15
- .globl GL_PREFIX(GetMaterialfv)
- .type GL_PREFIX(GetMaterialfv), @function
-GL_PREFIX(GetMaterialfv):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2152(%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 2152(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2152(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2152(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(GetMaterialfv), .-GL_PREFIX(GetMaterialfv)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_270)
- .type GL_PREFIX(_dispatch_stub_270), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_270))
-GL_PREFIX(_dispatch_stub_270):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2160(%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 2160(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2160(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2160(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_270), .-GL_PREFIX(_dispatch_stub_270)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_271)
- .type GL_PREFIX(_dispatch_stub_271), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_271))
-GL_PREFIX(_dispatch_stub_271):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2168(%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 2168(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2168(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 2168(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_271), .-GL_PREFIX(_dispatch_stub_271)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_272)
- .type GL_PREFIX(_dispatch_stub_272), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_272))
-GL_PREFIX(_dispatch_stub_272):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2176(%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 2176(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2176(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 2176(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_272), .-GL_PREFIX(_dispatch_stub_272)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_273)
- .type GL_PREFIX(_dispatch_stub_273), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_273))
-GL_PREFIX(_dispatch_stub_273):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2184(%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 2184(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2184(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 2184(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_273), .-GL_PREFIX(_dispatch_stub_273)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_274)
- .type GL_PREFIX(_dispatch_stub_274), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_274))
-GL_PREFIX(_dispatch_stub_274):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2192(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 2192(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2192(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 2192(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_274), .-GL_PREFIX(_dispatch_stub_274)
-
- .p2align 4,,15
- .globl GL_PREFIX(GetString)
- .type GL_PREFIX(GetString), @function
-GL_PREFIX(GetString):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2200(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 2200(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2200(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 2200(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(GetString), .-GL_PREFIX(GetString)
-
- .p2align 4,,15
- .globl GL_PREFIX(GetTexEnvfv)
- .type GL_PREFIX(GetTexEnvfv), @function
-GL_PREFIX(GetTexEnvfv):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2208(%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 2208(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2208(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2208(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(GetTexEnvfv), .-GL_PREFIX(GetTexEnvfv)
-
- .p2align 4,,15
- .globl GL_PREFIX(GetTexEnviv)
- .type GL_PREFIX(GetTexEnviv), @function
-GL_PREFIX(GetTexEnviv):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2216(%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 2216(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2216(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2216(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(GetTexEnviv), .-GL_PREFIX(GetTexEnviv)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_278)
- .type GL_PREFIX(_dispatch_stub_278), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_278))
-GL_PREFIX(_dispatch_stub_278):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2224(%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 2224(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2224(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2224(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_278), .-GL_PREFIX(_dispatch_stub_278)
-
- .p2align 4,,15
- .globl GL_PREFIX(GetTexGenfvOES)
- .type GL_PREFIX(GetTexGenfvOES), @function
-GL_PREFIX(GetTexGenfvOES):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2232(%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 2232(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2232(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2232(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(GetTexGenfvOES), .-GL_PREFIX(GetTexGenfvOES)
-
- .p2align 4,,15
- .globl GL_PREFIX(GetTexGenivOES)
- .type GL_PREFIX(GetTexGenivOES), @function
-GL_PREFIX(GetTexGenivOES):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2240(%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 2240(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2240(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2240(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(GetTexGenivOES), .-GL_PREFIX(GetTexGenivOES)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_281)
- .type GL_PREFIX(_dispatch_stub_281), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_281))
-GL_PREFIX(_dispatch_stub_281):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2248(%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 2248(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2248(%rax), %r11
- 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 2248(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_281), .-GL_PREFIX(_dispatch_stub_281)
-
- .p2align 4,,15
- .globl GL_PREFIX(GetTexParameterfv)
- .type GL_PREFIX(GetTexParameterfv), @function
-GL_PREFIX(GetTexParameterfv):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2256(%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 2256(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2256(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2256(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(GetTexParameterfv), .-GL_PREFIX(GetTexParameterfv)
-
- .p2align 4,,15
- .globl GL_PREFIX(GetTexParameteriv)
- .type GL_PREFIX(GetTexParameteriv), @function
-GL_PREFIX(GetTexParameteriv):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2264(%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 2264(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2264(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2264(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(GetTexParameteriv), .-GL_PREFIX(GetTexParameteriv)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_284)
- .type GL_PREFIX(_dispatch_stub_284), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_284))
-GL_PREFIX(_dispatch_stub_284):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2272(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2272(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2272(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2272(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_284), .-GL_PREFIX(_dispatch_stub_284)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_285)
- .type GL_PREFIX(_dispatch_stub_285), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_285))
-GL_PREFIX(_dispatch_stub_285):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2280(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2280(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2280(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2280(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_285), .-GL_PREFIX(_dispatch_stub_285)
-
- .p2align 4,,15
- .globl GL_PREFIX(IsEnabled)
- .type GL_PREFIX(IsEnabled), @function
-GL_PREFIX(IsEnabled):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2288(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 2288(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2288(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 2288(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(IsEnabled), .-GL_PREFIX(IsEnabled)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_287)
- .type GL_PREFIX(_dispatch_stub_287), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_287))
-GL_PREFIX(_dispatch_stub_287):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2296(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 2296(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2296(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 2296(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_287), .-GL_PREFIX(_dispatch_stub_287)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_288)
- .type GL_PREFIX(_dispatch_stub_288), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_288))
-GL_PREFIX(_dispatch_stub_288):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2304(%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 2304(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2304(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 2304(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_288), .-GL_PREFIX(_dispatch_stub_288)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_289)
- .type GL_PREFIX(_dispatch_stub_289), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_289))
-GL_PREFIX(_dispatch_stub_289):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2312(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $56, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- movq %xmm2, 16(%rsp)
- movq %xmm3, 24(%rsp)
- movq %xmm4, 32(%rsp)
- movq %xmm5, 40(%rsp)
- call _x86_64_get_dispatch@PLT
- movq 40(%rsp), %xmm5
- movq 32(%rsp), %xmm4
- movq 24(%rsp), %xmm3
- movq 16(%rsp), %xmm2
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $56, %rsp
- movq 2312(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2312(%rax), %r11
- jmp *%r11
-1:
- subq $56, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- movq %xmm2, 16(%rsp)
- movq %xmm3, 24(%rsp)
- movq %xmm4, 32(%rsp)
- movq %xmm5, 40(%rsp)
- call _glapi_get_dispatch
- movq 40(%rsp), %xmm5
- movq 32(%rsp), %xmm4
- movq 24(%rsp), %xmm3
- movq 16(%rsp), %xmm2
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $56, %rsp
- movq 2312(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_289), .-GL_PREFIX(_dispatch_stub_289)
-
- .p2align 4,,15
- .globl GL_PREFIX(LoadIdentity)
- .type GL_PREFIX(LoadIdentity), @function
-GL_PREFIX(LoadIdentity):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2320(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- movq 2320(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2320(%rax), %r11
- jmp *%r11
-1:
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- movq 2320(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(LoadIdentity), .-GL_PREFIX(LoadIdentity)
-
- .p2align 4,,15
- .globl GL_PREFIX(LoadMatrixf)
- .type GL_PREFIX(LoadMatrixf), @function
-GL_PREFIX(LoadMatrixf):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2328(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 2328(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2328(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 2328(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(LoadMatrixf), .-GL_PREFIX(LoadMatrixf)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_292)
- .type GL_PREFIX(_dispatch_stub_292), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_292))
-GL_PREFIX(_dispatch_stub_292):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2336(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 2336(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2336(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 2336(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_292), .-GL_PREFIX(_dispatch_stub_292)
-
- .p2align 4,,15
- .globl GL_PREFIX(MatrixMode)
- .type GL_PREFIX(MatrixMode), @function
-GL_PREFIX(MatrixMode):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2344(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 2344(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2344(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 2344(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(MatrixMode), .-GL_PREFIX(MatrixMode)
-
- .p2align 4,,15
- .globl GL_PREFIX(MultMatrixf)
- .type GL_PREFIX(MultMatrixf), @function
-GL_PREFIX(MultMatrixf):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2352(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 2352(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2352(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 2352(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(MultMatrixf), .-GL_PREFIX(MultMatrixf)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_295)
- .type GL_PREFIX(_dispatch_stub_295), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_295))
-GL_PREFIX(_dispatch_stub_295):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2360(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 2360(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2360(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 2360(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_295), .-GL_PREFIX(_dispatch_stub_295)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_296)
- .type GL_PREFIX(_dispatch_stub_296), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_296))
-GL_PREFIX(_dispatch_stub_296):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2368(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $56, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- movq %xmm2, 16(%rsp)
- movq %xmm3, 24(%rsp)
- movq %xmm4, 32(%rsp)
- movq %xmm5, 40(%rsp)
- call _x86_64_get_dispatch@PLT
- movq 40(%rsp), %xmm5
- movq 32(%rsp), %xmm4
- movq 24(%rsp), %xmm3
- movq 16(%rsp), %xmm2
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $56, %rsp
- movq 2368(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2368(%rax), %r11
- jmp *%r11
-1:
- subq $56, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- movq %xmm2, 16(%rsp)
- movq %xmm3, 24(%rsp)
- movq %xmm4, 32(%rsp)
- movq %xmm5, 40(%rsp)
- call _glapi_get_dispatch
- movq 40(%rsp), %xmm5
- movq 32(%rsp), %xmm4
- movq 24(%rsp), %xmm3
- movq 16(%rsp), %xmm2
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $56, %rsp
- movq 2368(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_296), .-GL_PREFIX(_dispatch_stub_296)
-
- .p2align 4,,15
- .globl GL_PREFIX(PopMatrix)
- .type GL_PREFIX(PopMatrix), @function
-GL_PREFIX(PopMatrix):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2376(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- movq 2376(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2376(%rax), %r11
- jmp *%r11
-1:
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- movq 2376(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(PopMatrix), .-GL_PREFIX(PopMatrix)
-
- .p2align 4,,15
- .globl GL_PREFIX(PushMatrix)
- .type GL_PREFIX(PushMatrix), @function
-GL_PREFIX(PushMatrix):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2384(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- movq 2384(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2384(%rax), %r11
- jmp *%r11
-1:
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- movq 2384(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(PushMatrix), .-GL_PREFIX(PushMatrix)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_299)
- .type GL_PREFIX(_dispatch_stub_299), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_299))
-GL_PREFIX(_dispatch_stub_299):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2392(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $40, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- movq %xmm2, 16(%rsp)
- movq %xmm3, 24(%rsp)
- call _x86_64_get_dispatch@PLT
- movq 24(%rsp), %xmm3
- movq 16(%rsp), %xmm2
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $40, %rsp
- movq 2392(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2392(%rax), %r11
- jmp *%r11
-1:
- subq $40, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- movq %xmm2, 16(%rsp)
- movq %xmm3, 24(%rsp)
- call _glapi_get_dispatch
- movq 24(%rsp), %xmm3
- movq 16(%rsp), %xmm2
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $40, %rsp
- movq 2392(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_299), .-GL_PREFIX(_dispatch_stub_299)
-
- .p2align 4,,15
- .globl GL_PREFIX(Rotatef)
- .type GL_PREFIX(Rotatef), @function
-GL_PREFIX(Rotatef):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2400(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $40, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- movq %xmm2, 16(%rsp)
- movq %xmm3, 24(%rsp)
- call _x86_64_get_dispatch@PLT
- movq 24(%rsp), %xmm3
- movq 16(%rsp), %xmm2
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $40, %rsp
- movq 2400(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2400(%rax), %r11
- jmp *%r11
-1:
- subq $40, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- movq %xmm2, 16(%rsp)
- movq %xmm3, 24(%rsp)
- call _glapi_get_dispatch
- movq 24(%rsp), %xmm3
- movq 16(%rsp), %xmm2
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $40, %rsp
- movq 2400(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(Rotatef), .-GL_PREFIX(Rotatef)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_301)
- .type GL_PREFIX(_dispatch_stub_301), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_301))
-GL_PREFIX(_dispatch_stub_301):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2408(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $24, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- movq %xmm2, 16(%rsp)
- call _x86_64_get_dispatch@PLT
- movq 16(%rsp), %xmm2
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $24, %rsp
- movq 2408(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2408(%rax), %r11
- jmp *%r11
-1:
- subq $24, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- movq %xmm2, 16(%rsp)
- call _glapi_get_dispatch
- movq 16(%rsp), %xmm2
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $24, %rsp
- movq 2408(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_301), .-GL_PREFIX(_dispatch_stub_301)
-
- .p2align 4,,15
- .globl GL_PREFIX(Scalef)
- .type GL_PREFIX(Scalef), @function
-GL_PREFIX(Scalef):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2416(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $24, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- movq %xmm2, 16(%rsp)
- call _x86_64_get_dispatch@PLT
- movq 16(%rsp), %xmm2
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $24, %rsp
- movq 2416(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2416(%rax), %r11
- jmp *%r11
-1:
- subq $24, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- movq %xmm2, 16(%rsp)
- call _glapi_get_dispatch
- movq 16(%rsp), %xmm2
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $24, %rsp
- movq 2416(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(Scalef), .-GL_PREFIX(Scalef)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_303)
- .type GL_PREFIX(_dispatch_stub_303), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_303))
-GL_PREFIX(_dispatch_stub_303):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2424(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $24, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- movq %xmm2, 16(%rsp)
- call _x86_64_get_dispatch@PLT
- movq 16(%rsp), %xmm2
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $24, %rsp
- movq 2424(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2424(%rax), %r11
- jmp *%r11
-1:
- subq $24, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- movq %xmm2, 16(%rsp)
- call _glapi_get_dispatch
- movq 16(%rsp), %xmm2
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $24, %rsp
- movq 2424(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_303), .-GL_PREFIX(_dispatch_stub_303)
-
- .p2align 4,,15
- .globl GL_PREFIX(Translatef)
- .type GL_PREFIX(Translatef), @function
-GL_PREFIX(Translatef):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2432(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $24, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- movq %xmm2, 16(%rsp)
- call _x86_64_get_dispatch@PLT
- movq 16(%rsp), %xmm2
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $24, %rsp
- movq 2432(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2432(%rax), %r11
- jmp *%r11
-1:
- subq $24, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- movq %xmm2, 16(%rsp)
- call _glapi_get_dispatch
- movq 16(%rsp), %xmm2
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $24, %rsp
- movq 2432(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(Translatef), .-GL_PREFIX(Translatef)
-
- .p2align 4,,15
- .globl GL_PREFIX(Viewport)
- .type GL_PREFIX(Viewport), @function
-GL_PREFIX(Viewport):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2440(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2440(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2440(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2440(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(Viewport), .-GL_PREFIX(Viewport)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_306)
- .type GL_PREFIX(_dispatch_stub_306), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_306))
-GL_PREFIX(_dispatch_stub_306):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2448(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 2448(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2448(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 2448(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_306), .-GL_PREFIX(_dispatch_stub_306)
-
- .p2align 4,,15
- .globl GL_PREFIX(BindTexture)
- .type GL_PREFIX(BindTexture), @function
-GL_PREFIX(BindTexture):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2456(%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 2456(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2456(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 2456(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(BindTexture), .-GL_PREFIX(BindTexture)
-
- .p2align 4,,15
- .globl GL_PREFIX(ColorPointer)
- .type GL_PREFIX(ColorPointer), @function
-GL_PREFIX(ColorPointer):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2464(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2464(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2464(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2464(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(ColorPointer), .-GL_PREFIX(ColorPointer)
-
- .p2align 4,,15
- .globl GL_PREFIX(DisableClientState)
- .type GL_PREFIX(DisableClientState), @function
-GL_PREFIX(DisableClientState):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2472(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 2472(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2472(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 2472(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(DisableClientState), .-GL_PREFIX(DisableClientState)
-
- .p2align 4,,15
- .globl GL_PREFIX(DrawArrays)
- .type GL_PREFIX(DrawArrays), @function
-GL_PREFIX(DrawArrays):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2480(%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 2480(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2480(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2480(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(DrawArrays), .-GL_PREFIX(DrawArrays)
-
- .p2align 4,,15
- .globl GL_PREFIX(DrawElements)
- .type GL_PREFIX(DrawElements), @function
-GL_PREFIX(DrawElements):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2488(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2488(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2488(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2488(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(DrawElements), .-GL_PREFIX(DrawElements)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_312)
- .type GL_PREFIX(_dispatch_stub_312), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_312))
-GL_PREFIX(_dispatch_stub_312):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2496(%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 2496(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2496(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 2496(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_312), .-GL_PREFIX(_dispatch_stub_312)
-
- .p2align 4,,15
- .globl GL_PREFIX(EnableClientState)
- .type GL_PREFIX(EnableClientState), @function
-GL_PREFIX(EnableClientState):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2504(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 2504(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2504(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 2504(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(EnableClientState), .-GL_PREFIX(EnableClientState)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_314)
- .type GL_PREFIX(_dispatch_stub_314), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_314))
-GL_PREFIX(_dispatch_stub_314):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2512(%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 2512(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2512(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2512(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_314), .-GL_PREFIX(_dispatch_stub_314)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_315)
- .type GL_PREFIX(_dispatch_stub_315), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_315))
-GL_PREFIX(_dispatch_stub_315):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2520(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 2520(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2520(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 2520(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_315), .-GL_PREFIX(_dispatch_stub_315)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_316)
- .type GL_PREFIX(_dispatch_stub_316), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_316))
-GL_PREFIX(_dispatch_stub_316):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2528(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 2528(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2528(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 2528(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_316), .-GL_PREFIX(_dispatch_stub_316)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_317)
- .type GL_PREFIX(_dispatch_stub_317), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_317))
-GL_PREFIX(_dispatch_stub_317):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2536(%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 2536(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2536(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2536(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_317), .-GL_PREFIX(_dispatch_stub_317)
-
- .p2align 4,,15
- .globl GL_PREFIX(NormalPointer)
- .type GL_PREFIX(NormalPointer), @function
-GL_PREFIX(NormalPointer):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2544(%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 2544(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2544(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2544(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(NormalPointer), .-GL_PREFIX(NormalPointer)
-
- .p2align 4,,15
- .globl GL_PREFIX(PolygonOffset)
- .type GL_PREFIX(PolygonOffset), @function
-GL_PREFIX(PolygonOffset):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2552(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $24, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- call _x86_64_get_dispatch@PLT
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $24, %rsp
- movq 2552(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2552(%rax), %r11
- jmp *%r11
-1:
- subq $24, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- call _glapi_get_dispatch
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $24, %rsp
- movq 2552(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(PolygonOffset), .-GL_PREFIX(PolygonOffset)
-
- .p2align 4,,15
- .globl GL_PREFIX(TexCoordPointer)
- .type GL_PREFIX(TexCoordPointer), @function
-GL_PREFIX(TexCoordPointer):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2560(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2560(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2560(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2560(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(TexCoordPointer), .-GL_PREFIX(TexCoordPointer)
-
- .p2align 4,,15
- .globl GL_PREFIX(VertexPointer)
- .type GL_PREFIX(VertexPointer), @function
-GL_PREFIX(VertexPointer):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2568(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2568(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2568(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2568(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(VertexPointer), .-GL_PREFIX(VertexPointer)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_322)
- .type GL_PREFIX(_dispatch_stub_322), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_322))
-GL_PREFIX(_dispatch_stub_322):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2576(%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 2576(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2576(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2576(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_322), .-GL_PREFIX(_dispatch_stub_322)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_323)
- .type GL_PREFIX(_dispatch_stub_323), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_323))
-GL_PREFIX(_dispatch_stub_323):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2584(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %r8
- pushq %r9
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- popq %r9
- popq %r8
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2584(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2584(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %r8
- pushq %r9
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %r9
- popq %r8
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2584(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_323), .-GL_PREFIX(_dispatch_stub_323)
-
- .p2align 4,,15
- .globl GL_PREFIX(CopyTexImage2D)
- .type GL_PREFIX(CopyTexImage2D), @function
-GL_PREFIX(CopyTexImage2D):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2592(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %r8
- pushq %r9
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- popq %r9
- popq %r8
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2592(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2592(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %r8
- pushq %r9
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %r9
- popq %r8
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2592(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(CopyTexImage2D), .-GL_PREFIX(CopyTexImage2D)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_325)
- .type GL_PREFIX(_dispatch_stub_325), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_325))
-GL_PREFIX(_dispatch_stub_325):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2600(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %r8
- pushq %r9
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- popq %r9
- popq %r8
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2600(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2600(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %r8
- pushq %r9
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %r9
- popq %r8
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2600(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_325), .-GL_PREFIX(_dispatch_stub_325)
-
- .p2align 4,,15
- .globl GL_PREFIX(CopyTexSubImage2D)
- .type GL_PREFIX(CopyTexSubImage2D), @function
-GL_PREFIX(CopyTexSubImage2D):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2608(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %r8
- pushq %r9
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- popq %r9
- popq %r8
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2608(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2608(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %r8
- pushq %r9
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %r9
- popq %r8
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2608(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(CopyTexSubImage2D), .-GL_PREFIX(CopyTexSubImage2D)
-
- .p2align 4,,15
- .globl GL_PREFIX(DeleteTextures)
- .type GL_PREFIX(DeleteTextures), @function
-GL_PREFIX(DeleteTextures):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2616(%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 2616(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2616(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 2616(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(DeleteTextures), .-GL_PREFIX(DeleteTextures)
-
- .p2align 4,,15
- .globl GL_PREFIX(GenTextures)
- .type GL_PREFIX(GenTextures), @function
-GL_PREFIX(GenTextures):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2624(%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 2624(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2624(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 2624(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(GenTextures), .-GL_PREFIX(GenTextures)
-
- .p2align 4,,15
- .globl GL_PREFIX(GetPointerv)
- .type GL_PREFIX(GetPointerv), @function
-GL_PREFIX(GetPointerv):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2632(%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 2632(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2632(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 2632(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(GetPointerv), .-GL_PREFIX(GetPointerv)
-
- .p2align 4,,15
- .globl GL_PREFIX(IsTexture)
- .type GL_PREFIX(IsTexture), @function
-GL_PREFIX(IsTexture):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2640(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 2640(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2640(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 2640(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(IsTexture), .-GL_PREFIX(IsTexture)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_331)
- .type GL_PREFIX(_dispatch_stub_331), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_331))
-GL_PREFIX(_dispatch_stub_331):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2648(%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 2648(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2648(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2648(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_331), .-GL_PREFIX(_dispatch_stub_331)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_332)
- .type GL_PREFIX(_dispatch_stub_332), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_332))
-GL_PREFIX(_dispatch_stub_332):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2656(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %r8
- pushq %r9
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- popq %r9
- popq %r8
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2656(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2656(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %r8
- pushq %r9
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %r9
- popq %r8
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2656(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_332), .-GL_PREFIX(_dispatch_stub_332)
-
- .p2align 4,,15
- .globl GL_PREFIX(TexSubImage2D)
- .type GL_PREFIX(TexSubImage2D), @function
-GL_PREFIX(TexSubImage2D):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2664(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %r8
- pushq %r9
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- popq %r9
- popq %r8
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2664(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2664(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %r8
- pushq %r9
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %r9
- popq %r8
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2664(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(TexSubImage2D), .-GL_PREFIX(TexSubImage2D)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_334)
- .type GL_PREFIX(_dispatch_stub_334), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_334))
-GL_PREFIX(_dispatch_stub_334):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2672(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- movq 2672(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2672(%rax), %r11
- jmp *%r11
-1:
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- movq 2672(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_334), .-GL_PREFIX(_dispatch_stub_334)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_335)
- .type GL_PREFIX(_dispatch_stub_335), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_335))
-GL_PREFIX(_dispatch_stub_335):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2680(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 2680(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2680(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 2680(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_335), .-GL_PREFIX(_dispatch_stub_335)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_336)
- .type GL_PREFIX(_dispatch_stub_336), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_336))
-GL_PREFIX(_dispatch_stub_336):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2688(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2688(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2688(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2688(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_336), .-GL_PREFIX(_dispatch_stub_336)
-
- .p2align 4,,15
- .globl GL_PREFIX(BlendEquationOES)
- .type GL_PREFIX(BlendEquationOES), @function
-GL_PREFIX(BlendEquationOES):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2696(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 2696(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2696(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 2696(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(BlendEquationOES), .-GL_PREFIX(BlendEquationOES)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_338)
- .type GL_PREFIX(_dispatch_stub_338), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_338))
-GL_PREFIX(_dispatch_stub_338):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2704(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %r8
- pushq %r9
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- popq %r9
- popq %r8
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2704(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2704(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %r8
- pushq %r9
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %r9
- popq %r8
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2704(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_338), .-GL_PREFIX(_dispatch_stub_338)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_339)
- .type GL_PREFIX(_dispatch_stub_339), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_339))
-GL_PREFIX(_dispatch_stub_339):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2712(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %r8
- pushq %r9
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- popq %r9
- popq %r8
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2712(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2712(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %r8
- pushq %r9
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %r9
- popq %r8
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2712(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_339), .-GL_PREFIX(_dispatch_stub_339)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_340)
- .type GL_PREFIX(_dispatch_stub_340), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_340))
-GL_PREFIX(_dispatch_stub_340):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2720(%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 2720(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2720(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2720(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_340), .-GL_PREFIX(_dispatch_stub_340)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_341)
- .type GL_PREFIX(_dispatch_stub_341), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_341))
-GL_PREFIX(_dispatch_stub_341):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2728(%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 2728(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2728(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2728(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_341), .-GL_PREFIX(_dispatch_stub_341)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_342)
- .type GL_PREFIX(_dispatch_stub_342), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_342))
-GL_PREFIX(_dispatch_stub_342):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2736(%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 2736(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2736(%rax), %r11
- 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 2736(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_342), .-GL_PREFIX(_dispatch_stub_342)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_343)
- .type GL_PREFIX(_dispatch_stub_343), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_343))
-GL_PREFIX(_dispatch_stub_343):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2744(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2744(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2744(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2744(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_343), .-GL_PREFIX(_dispatch_stub_343)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_344)
- .type GL_PREFIX(_dispatch_stub_344), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_344))
-GL_PREFIX(_dispatch_stub_344):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2752(%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 2752(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2752(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2752(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_344), .-GL_PREFIX(_dispatch_stub_344)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_345)
- .type GL_PREFIX(_dispatch_stub_345), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_345))
-GL_PREFIX(_dispatch_stub_345):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2760(%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 2760(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2760(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2760(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_345), .-GL_PREFIX(_dispatch_stub_345)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_346)
- .type GL_PREFIX(_dispatch_stub_346), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_346))
-GL_PREFIX(_dispatch_stub_346):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2768(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %r8
- pushq %r9
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- popq %r9
- popq %r8
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2768(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2768(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %r8
- pushq %r9
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %r9
- popq %r8
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2768(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_346), .-GL_PREFIX(_dispatch_stub_346)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_347)
- .type GL_PREFIX(_dispatch_stub_347), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_347))
-GL_PREFIX(_dispatch_stub_347):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2776(%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 2776(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2776(%rax), %r11
- 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 2776(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_347), .-GL_PREFIX(_dispatch_stub_347)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_348)
- .type GL_PREFIX(_dispatch_stub_348), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_348))
-GL_PREFIX(_dispatch_stub_348):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2784(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %r8
- pushq %r9
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- popq %r9
- popq %r8
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2784(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2784(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %r8
- pushq %r9
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %r9
- popq %r8
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2784(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_348), .-GL_PREFIX(_dispatch_stub_348)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_349)
- .type GL_PREFIX(_dispatch_stub_349), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_349))
-GL_PREFIX(_dispatch_stub_349):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2792(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %r8
- pushq %r9
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- popq %r9
- popq %r8
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2792(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2792(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %r8
- pushq %r9
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %r9
- popq %r8
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2792(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_349), .-GL_PREFIX(_dispatch_stub_349)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_350)
- .type GL_PREFIX(_dispatch_stub_350), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_350))
-GL_PREFIX(_dispatch_stub_350):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2800(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $24, %rsp
- movq %rdi, (%rsp)
- movq %rsi, 8(%rsp)
- movq %xmm0, 16(%rsp)
- call _x86_64_get_dispatch@PLT
- movq 16(%rsp), %xmm0
- movq 8(%rsp), %rsi
- movq (%rsp), %rdi
- addq $24, %rsp
- movq 2800(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2800(%rax), %r11
- jmp *%r11
-1:
- subq $24, %rsp
- movq %rdi, (%rsp)
- movq %rsi, 8(%rsp)
- movq %xmm0, 16(%rsp)
- call _glapi_get_dispatch
- movq 16(%rsp), %xmm0
- movq 8(%rsp), %rsi
- movq (%rsp), %rdi
- addq $24, %rsp
- movq 2800(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_350), .-GL_PREFIX(_dispatch_stub_350)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_351)
- .type GL_PREFIX(_dispatch_stub_351), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_351))
-GL_PREFIX(_dispatch_stub_351):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2808(%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 2808(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2808(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2808(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_351), .-GL_PREFIX(_dispatch_stub_351)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_352)
- .type GL_PREFIX(_dispatch_stub_352), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_352))
-GL_PREFIX(_dispatch_stub_352):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2816(%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 2816(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2816(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2816(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_352), .-GL_PREFIX(_dispatch_stub_352)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_353)
- .type GL_PREFIX(_dispatch_stub_353), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_353))
-GL_PREFIX(_dispatch_stub_353):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2824(%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 2824(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2824(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2824(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_353), .-GL_PREFIX(_dispatch_stub_353)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_354)
- .type GL_PREFIX(_dispatch_stub_354), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_354))
-GL_PREFIX(_dispatch_stub_354):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2832(%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 2832(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2832(%rax), %r11
- 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 2832(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_354), .-GL_PREFIX(_dispatch_stub_354)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_355)
- .type GL_PREFIX(_dispatch_stub_355), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_355))
-GL_PREFIX(_dispatch_stub_355):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2840(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %r8
- pushq %r9
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- popq %r9
- popq %r8
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2840(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2840(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %r8
- pushq %r9
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %r9
- popq %r8
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2840(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_355), .-GL_PREFIX(_dispatch_stub_355)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_356)
- .type GL_PREFIX(_dispatch_stub_356), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_356))
-GL_PREFIX(_dispatch_stub_356):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2848(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2848(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2848(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2848(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_356), .-GL_PREFIX(_dispatch_stub_356)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_357)
- .type GL_PREFIX(_dispatch_stub_357), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_357))
-GL_PREFIX(_dispatch_stub_357):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2856(%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 2856(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2856(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2856(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_357), .-GL_PREFIX(_dispatch_stub_357)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_358)
- .type GL_PREFIX(_dispatch_stub_358), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_358))
-GL_PREFIX(_dispatch_stub_358):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2864(%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 2864(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2864(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2864(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_358), .-GL_PREFIX(_dispatch_stub_358)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_359)
- .type GL_PREFIX(_dispatch_stub_359), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_359))
-GL_PREFIX(_dispatch_stub_359):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2872(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %r8
- pushq %r9
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- popq %r9
- popq %r8
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2872(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2872(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %r8
- pushq %r9
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %r9
- popq %r8
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2872(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_359), .-GL_PREFIX(_dispatch_stub_359)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_360)
- .type GL_PREFIX(_dispatch_stub_360), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_360))
-GL_PREFIX(_dispatch_stub_360):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2880(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %r8
- pushq %r9
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- popq %r9
- popq %r8
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2880(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2880(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %r8
- pushq %r9
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %r9
- popq %r8
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2880(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_360), .-GL_PREFIX(_dispatch_stub_360)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_361)
- .type GL_PREFIX(_dispatch_stub_361), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_361))
-GL_PREFIX(_dispatch_stub_361):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2888(%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 2888(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2888(%rax), %r11
- 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 2888(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_361), .-GL_PREFIX(_dispatch_stub_361)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_362)
- .type GL_PREFIX(_dispatch_stub_362), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_362))
-GL_PREFIX(_dispatch_stub_362):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2896(%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 2896(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2896(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2896(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_362), .-GL_PREFIX(_dispatch_stub_362)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_363)
- .type GL_PREFIX(_dispatch_stub_363), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_363))
-GL_PREFIX(_dispatch_stub_363):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2904(%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 2904(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2904(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2904(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_363), .-GL_PREFIX(_dispatch_stub_363)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_364)
- .type GL_PREFIX(_dispatch_stub_364), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_364))
-GL_PREFIX(_dispatch_stub_364):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2912(%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 2912(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2912(%rax), %r11
- 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 2912(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_364), .-GL_PREFIX(_dispatch_stub_364)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_365)
- .type GL_PREFIX(_dispatch_stub_365), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_365))
-GL_PREFIX(_dispatch_stub_365):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2920(%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 2920(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2920(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2920(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_365), .-GL_PREFIX(_dispatch_stub_365)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_366)
- .type GL_PREFIX(_dispatch_stub_366), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_366))
-GL_PREFIX(_dispatch_stub_366):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2928(%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 2928(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2928(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2928(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_366), .-GL_PREFIX(_dispatch_stub_366)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_367)
- .type GL_PREFIX(_dispatch_stub_367), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_367))
-GL_PREFIX(_dispatch_stub_367):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2936(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2936(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2936(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2936(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_367), .-GL_PREFIX(_dispatch_stub_367)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_368)
- .type GL_PREFIX(_dispatch_stub_368), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_368))
-GL_PREFIX(_dispatch_stub_368):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2944(%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 2944(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2944(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2944(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_368), .-GL_PREFIX(_dispatch_stub_368)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_369)
- .type GL_PREFIX(_dispatch_stub_369), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_369))
-GL_PREFIX(_dispatch_stub_369):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2952(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 2952(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2952(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 2952(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_369), .-GL_PREFIX(_dispatch_stub_369)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_370)
- .type GL_PREFIX(_dispatch_stub_370), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_370))
-GL_PREFIX(_dispatch_stub_370):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2960(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 2960(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2960(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 2960(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_370), .-GL_PREFIX(_dispatch_stub_370)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_371)
- .type GL_PREFIX(_dispatch_stub_371), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_371))
-GL_PREFIX(_dispatch_stub_371):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2968(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %r8
- pushq %r9
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- popq %r9
- popq %r8
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2968(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2968(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %r8
- pushq %r9
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %r9
- popq %r8
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2968(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_371), .-GL_PREFIX(_dispatch_stub_371)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_372)
- .type GL_PREFIX(_dispatch_stub_372), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_372))
-GL_PREFIX(_dispatch_stub_372):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2976(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %r8
- pushq %r9
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- popq %r9
- popq %r8
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2976(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2976(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %r8
- pushq %r9
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %r9
- popq %r8
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2976(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_372), .-GL_PREFIX(_dispatch_stub_372)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_373)
- .type GL_PREFIX(_dispatch_stub_373), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_373))
-GL_PREFIX(_dispatch_stub_373):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2984(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %r8
- pushq %r9
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- popq %r9
- popq %r8
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2984(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2984(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %r8
- pushq %r9
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %r9
- popq %r8
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2984(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_373), .-GL_PREFIX(_dispatch_stub_373)
-
- .p2align 4,,15
- .globl GL_PREFIX(ActiveTexture)
- .type GL_PREFIX(ActiveTexture), @function
-GL_PREFIX(ActiveTexture):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2992(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 2992(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2992(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 2992(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(ActiveTexture), .-GL_PREFIX(ActiveTexture)
-
- .p2align 4,,15
- .globl GL_PREFIX(ClientActiveTexture)
- .type GL_PREFIX(ClientActiveTexture), @function
-GL_PREFIX(ClientActiveTexture):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3000(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 3000(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3000(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 3000(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(ClientActiveTexture), .-GL_PREFIX(ClientActiveTexture)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_376)
- .type GL_PREFIX(_dispatch_stub_376), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_376))
-GL_PREFIX(_dispatch_stub_376):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3008(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $24, %rsp
- movq %rdi, (%rsp)
- movq %xmm0, 8(%rsp)
- call _x86_64_get_dispatch@PLT
- movq 8(%rsp), %xmm0
- movq (%rsp), %rdi
- addq $24, %rsp
- movq 3008(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3008(%rax), %r11
- jmp *%r11
-1:
- subq $24, %rsp
- movq %rdi, (%rsp)
- movq %xmm0, 8(%rsp)
- call _glapi_get_dispatch
- movq 8(%rsp), %xmm0
- movq (%rsp), %rdi
- addq $24, %rsp
- movq 3008(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_376), .-GL_PREFIX(_dispatch_stub_376)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_377)
- .type GL_PREFIX(_dispatch_stub_377), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_377))
-GL_PREFIX(_dispatch_stub_377):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3016(%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 3016(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3016(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 3016(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_377), .-GL_PREFIX(_dispatch_stub_377)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_378)
- .type GL_PREFIX(_dispatch_stub_378), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_378))
-GL_PREFIX(_dispatch_stub_378):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3024(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $24, %rsp
- movq %rdi, (%rsp)
- movq %xmm0, 8(%rsp)
- call _x86_64_get_dispatch@PLT
- movq 8(%rsp), %xmm0
- movq (%rsp), %rdi
- addq $24, %rsp
- movq 3024(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3024(%rax), %r11
- jmp *%r11
-1:
- subq $24, %rsp
- movq %rdi, (%rsp)
- movq %xmm0, 8(%rsp)
- call _glapi_get_dispatch
- movq 8(%rsp), %xmm0
- movq (%rsp), %rdi
- addq $24, %rsp
- movq 3024(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_378), .-GL_PREFIX(_dispatch_stub_378)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_379)
- .type GL_PREFIX(_dispatch_stub_379), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_379))
-GL_PREFIX(_dispatch_stub_379):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3032(%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 3032(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3032(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 3032(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_379), .-GL_PREFIX(_dispatch_stub_379)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_380)
- .type GL_PREFIX(_dispatch_stub_380), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_380))
-GL_PREFIX(_dispatch_stub_380):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3040(%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 3040(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3040(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 3040(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_380), .-GL_PREFIX(_dispatch_stub_380)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_381)
- .type GL_PREFIX(_dispatch_stub_381), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_381))
-GL_PREFIX(_dispatch_stub_381):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3048(%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 3048(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3048(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 3048(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_381), .-GL_PREFIX(_dispatch_stub_381)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_382)
- .type GL_PREFIX(_dispatch_stub_382), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_382))
-GL_PREFIX(_dispatch_stub_382):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3056(%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 3056(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3056(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 3056(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_382), .-GL_PREFIX(_dispatch_stub_382)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_383)
- .type GL_PREFIX(_dispatch_stub_383), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_383))
-GL_PREFIX(_dispatch_stub_383):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3064(%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 3064(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3064(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 3064(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_383), .-GL_PREFIX(_dispatch_stub_383)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_384)
- .type GL_PREFIX(_dispatch_stub_384), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_384))
-GL_PREFIX(_dispatch_stub_384):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3072(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $24, %rsp
- movq %rdi, (%rsp)
- movq %xmm0, 8(%rsp)
- movq %xmm1, 16(%rsp)
- call _x86_64_get_dispatch@PLT
- movq 16(%rsp), %xmm1
- movq 8(%rsp), %xmm0
- movq (%rsp), %rdi
- addq $24, %rsp
- movq 3072(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3072(%rax), %r11
- jmp *%r11
-1:
- subq $24, %rsp
- movq %rdi, (%rsp)
- movq %xmm0, 8(%rsp)
- movq %xmm1, 16(%rsp)
- call _glapi_get_dispatch
- movq 16(%rsp), %xmm1
- movq 8(%rsp), %xmm0
- movq (%rsp), %rdi
- addq $24, %rsp
- movq 3072(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_384), .-GL_PREFIX(_dispatch_stub_384)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_385)
- .type GL_PREFIX(_dispatch_stub_385), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_385))
-GL_PREFIX(_dispatch_stub_385):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3080(%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 3080(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3080(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 3080(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_385), .-GL_PREFIX(_dispatch_stub_385)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_386)
- .type GL_PREFIX(_dispatch_stub_386), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_386))
-GL_PREFIX(_dispatch_stub_386):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3088(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $24, %rsp
- movq %rdi, (%rsp)
- movq %xmm0, 8(%rsp)
- movq %xmm1, 16(%rsp)
- call _x86_64_get_dispatch@PLT
- movq 16(%rsp), %xmm1
- movq 8(%rsp), %xmm0
- movq (%rsp), %rdi
- addq $24, %rsp
- movq 3088(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3088(%rax), %r11
- jmp *%r11
-1:
- subq $24, %rsp
- movq %rdi, (%rsp)
- movq %xmm0, 8(%rsp)
- movq %xmm1, 16(%rsp)
- call _glapi_get_dispatch
- movq 16(%rsp), %xmm1
- movq 8(%rsp), %xmm0
- movq (%rsp), %rdi
- addq $24, %rsp
- movq 3088(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_386), .-GL_PREFIX(_dispatch_stub_386)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_387)
- .type GL_PREFIX(_dispatch_stub_387), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_387))
-GL_PREFIX(_dispatch_stub_387):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3096(%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 3096(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3096(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 3096(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_387), .-GL_PREFIX(_dispatch_stub_387)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_388)
- .type GL_PREFIX(_dispatch_stub_388), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_388))
-GL_PREFIX(_dispatch_stub_388):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3104(%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 3104(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3104(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 3104(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_388), .-GL_PREFIX(_dispatch_stub_388)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_389)
- .type GL_PREFIX(_dispatch_stub_389), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_389))
-GL_PREFIX(_dispatch_stub_389):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3112(%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 3112(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3112(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 3112(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_389), .-GL_PREFIX(_dispatch_stub_389)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_390)
- .type GL_PREFIX(_dispatch_stub_390), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_390))
-GL_PREFIX(_dispatch_stub_390):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3120(%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 3120(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3120(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 3120(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_390), .-GL_PREFIX(_dispatch_stub_390)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_391)
- .type GL_PREFIX(_dispatch_stub_391), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_391))
-GL_PREFIX(_dispatch_stub_391):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3128(%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 3128(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3128(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 3128(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_391), .-GL_PREFIX(_dispatch_stub_391)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_392)
- .type GL_PREFIX(_dispatch_stub_392), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_392))
-GL_PREFIX(_dispatch_stub_392):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3136(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $40, %rsp
- movq %rdi, (%rsp)
- movq %xmm0, 8(%rsp)
- movq %xmm1, 16(%rsp)
- movq %xmm2, 24(%rsp)
- call _x86_64_get_dispatch@PLT
- movq 24(%rsp), %xmm2
- movq 16(%rsp), %xmm1
- movq 8(%rsp), %xmm0
- movq (%rsp), %rdi
- addq $40, %rsp
- movq 3136(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3136(%rax), %r11
- jmp *%r11
-1:
- subq $40, %rsp
- movq %rdi, (%rsp)
- movq %xmm0, 8(%rsp)
- movq %xmm1, 16(%rsp)
- movq %xmm2, 24(%rsp)
- call _glapi_get_dispatch
- movq 24(%rsp), %xmm2
- movq 16(%rsp), %xmm1
- movq 8(%rsp), %xmm0
- movq (%rsp), %rdi
- addq $40, %rsp
- movq 3136(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_392), .-GL_PREFIX(_dispatch_stub_392)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_393)
- .type GL_PREFIX(_dispatch_stub_393), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_393))
-GL_PREFIX(_dispatch_stub_393):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3144(%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 3144(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3144(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 3144(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_393), .-GL_PREFIX(_dispatch_stub_393)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_394)
- .type GL_PREFIX(_dispatch_stub_394), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_394))
-GL_PREFIX(_dispatch_stub_394):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3152(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $40, %rsp
- movq %rdi, (%rsp)
- movq %xmm0, 8(%rsp)
- movq %xmm1, 16(%rsp)
- movq %xmm2, 24(%rsp)
- call _x86_64_get_dispatch@PLT
- movq 24(%rsp), %xmm2
- movq 16(%rsp), %xmm1
- movq 8(%rsp), %xmm0
- movq (%rsp), %rdi
- addq $40, %rsp
- movq 3152(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3152(%rax), %r11
- jmp *%r11
-1:
- subq $40, %rsp
- movq %rdi, (%rsp)
- movq %xmm0, 8(%rsp)
- movq %xmm1, 16(%rsp)
- movq %xmm2, 24(%rsp)
- call _glapi_get_dispatch
- movq 24(%rsp), %xmm2
- movq 16(%rsp), %xmm1
- movq 8(%rsp), %xmm0
- movq (%rsp), %rdi
- addq $40, %rsp
- movq 3152(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_394), .-GL_PREFIX(_dispatch_stub_394)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_395)
- .type GL_PREFIX(_dispatch_stub_395), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_395))
-GL_PREFIX(_dispatch_stub_395):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3160(%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 3160(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3160(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 3160(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_395), .-GL_PREFIX(_dispatch_stub_395)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_396)
- .type GL_PREFIX(_dispatch_stub_396), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_396))
-GL_PREFIX(_dispatch_stub_396):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3168(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 3168(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3168(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 3168(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_396), .-GL_PREFIX(_dispatch_stub_396)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_397)
- .type GL_PREFIX(_dispatch_stub_397), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_397))
-GL_PREFIX(_dispatch_stub_397):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3176(%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 3176(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3176(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 3176(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_397), .-GL_PREFIX(_dispatch_stub_397)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_398)
- .type GL_PREFIX(_dispatch_stub_398), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_398))
-GL_PREFIX(_dispatch_stub_398):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3184(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 3184(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3184(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 3184(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_398), .-GL_PREFIX(_dispatch_stub_398)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_399)
- .type GL_PREFIX(_dispatch_stub_399), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_399))
-GL_PREFIX(_dispatch_stub_399):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3192(%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 3192(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3192(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 3192(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_399), .-GL_PREFIX(_dispatch_stub_399)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_400)
- .type GL_PREFIX(_dispatch_stub_400), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_400))
-GL_PREFIX(_dispatch_stub_400):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3200(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $40, %rsp
- movq %rdi, (%rsp)
- movq %xmm0, 8(%rsp)
- movq %xmm1, 16(%rsp)
- movq %xmm2, 24(%rsp)
- movq %xmm3, 32(%rsp)
- call _x86_64_get_dispatch@PLT
- movq 32(%rsp), %xmm3
- movq 24(%rsp), %xmm2
- movq 16(%rsp), %xmm1
- movq 8(%rsp), %xmm0
- movq (%rsp), %rdi
- addq $40, %rsp
- movq 3200(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3200(%rax), %r11
- jmp *%r11
-1:
- subq $40, %rsp
- movq %rdi, (%rsp)
- movq %xmm0, 8(%rsp)
- movq %xmm1, 16(%rsp)
- movq %xmm2, 24(%rsp)
- movq %xmm3, 32(%rsp)
- call _glapi_get_dispatch
- movq 32(%rsp), %xmm3
- movq 24(%rsp), %xmm2
- movq 16(%rsp), %xmm1
- movq 8(%rsp), %xmm0
- movq (%rsp), %rdi
- addq $40, %rsp
- movq 3200(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_400), .-GL_PREFIX(_dispatch_stub_400)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_401)
- .type GL_PREFIX(_dispatch_stub_401), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_401))
-GL_PREFIX(_dispatch_stub_401):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3208(%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 3208(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3208(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 3208(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_401), .-GL_PREFIX(_dispatch_stub_401)
-
- .p2align 4,,15
- .globl GL_PREFIX(MultiTexCoord4f)
- .type GL_PREFIX(MultiTexCoord4f), @function
-GL_PREFIX(MultiTexCoord4f):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3216(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $40, %rsp
- movq %rdi, (%rsp)
- movq %xmm0, 8(%rsp)
- movq %xmm1, 16(%rsp)
- movq %xmm2, 24(%rsp)
- movq %xmm3, 32(%rsp)
- call _x86_64_get_dispatch@PLT
- movq 32(%rsp), %xmm3
- movq 24(%rsp), %xmm2
- movq 16(%rsp), %xmm1
- movq 8(%rsp), %xmm0
- movq (%rsp), %rdi
- addq $40, %rsp
- movq 3216(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3216(%rax), %r11
- jmp *%r11
-1:
- subq $40, %rsp
- movq %rdi, (%rsp)
- movq %xmm0, 8(%rsp)
- movq %xmm1, 16(%rsp)
- movq %xmm2, 24(%rsp)
- movq %xmm3, 32(%rsp)
- call _glapi_get_dispatch
- movq 32(%rsp), %xmm3
- movq 24(%rsp), %xmm2
- movq 16(%rsp), %xmm1
- movq 8(%rsp), %xmm0
- movq (%rsp), %rdi
- addq $40, %rsp
- movq 3216(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(MultiTexCoord4f), .-GL_PREFIX(MultiTexCoord4f)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_403)
- .type GL_PREFIX(_dispatch_stub_403), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_403))
-GL_PREFIX(_dispatch_stub_403):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3224(%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 3224(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3224(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 3224(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_403), .-GL_PREFIX(_dispatch_stub_403)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_404)
- .type GL_PREFIX(_dispatch_stub_404), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_404))
-GL_PREFIX(_dispatch_stub_404):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3232(%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 3232(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3232(%rax), %r11
- 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 3232(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_404), .-GL_PREFIX(_dispatch_stub_404)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_405)
- .type GL_PREFIX(_dispatch_stub_405), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_405))
-GL_PREFIX(_dispatch_stub_405):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3240(%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 3240(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3240(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 3240(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_405), .-GL_PREFIX(_dispatch_stub_405)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_406)
- .type GL_PREFIX(_dispatch_stub_406), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_406))
-GL_PREFIX(_dispatch_stub_406):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3248(%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 3248(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3248(%rax), %r11
- 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 3248(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_406), .-GL_PREFIX(_dispatch_stub_406)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_407)
- .type GL_PREFIX(_dispatch_stub_407), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_407))
-GL_PREFIX(_dispatch_stub_407):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3256(%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 3256(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3256(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 3256(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_407), .-GL_PREFIX(_dispatch_stub_407)
-
- .p2align 4,,15
- .globl GL_PREFIX(BlendEquationSeparateOES)
- .type GL_PREFIX(BlendEquationSeparateOES), @function
-GL_PREFIX(BlendEquationSeparateOES):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3264(%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 3264(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3264(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 3264(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(BlendEquationSeparateOES), .-GL_PREFIX(BlendEquationSeparateOES)
-
- .p2align 4,,15
- .globl GL_PREFIX(BlendFuncSeparateOES)
- .type GL_PREFIX(BlendFuncSeparateOES), @function
-GL_PREFIX(BlendFuncSeparateOES):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3272(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 3272(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3272(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 3272(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(BlendFuncSeparateOES), .-GL_PREFIX(BlendFuncSeparateOES)
-
- .p2align 4,,15
- .globl GL_PREFIX(DrawTexfOES)
- .type GL_PREFIX(DrawTexfOES), @function
-GL_PREFIX(DrawTexfOES):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3280(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $40, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- movq %xmm2, 16(%rsp)
- movq %xmm3, 24(%rsp)
- movq %xmm4, 32(%rsp)
- call _x86_64_get_dispatch@PLT
- movq 32(%rsp), %xmm4
- movq 24(%rsp), %xmm3
- movq 16(%rsp), %xmm2
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $40, %rsp
- movq 3280(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3280(%rax), %r11
- jmp *%r11
-1:
- subq $40, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- movq %xmm2, 16(%rsp)
- movq %xmm3, 24(%rsp)
- movq %xmm4, 32(%rsp)
- call _glapi_get_dispatch
- movq 32(%rsp), %xmm4
- movq 24(%rsp), %xmm3
- movq 16(%rsp), %xmm2
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $40, %rsp
- movq 3280(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(DrawTexfOES), .-GL_PREFIX(DrawTexfOES)
-
- .p2align 4,,15
- .globl GL_PREFIX(DrawTexfvOES)
- .type GL_PREFIX(DrawTexfvOES), @function
-GL_PREFIX(DrawTexfvOES):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3288(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 3288(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3288(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 3288(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(DrawTexfvOES), .-GL_PREFIX(DrawTexfvOES)
-
- .p2align 4,,15
- .globl GL_PREFIX(DrawTexiOES)
- .type GL_PREFIX(DrawTexiOES), @function
-GL_PREFIX(DrawTexiOES):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3296(%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 3296(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3296(%rax), %r11
- 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 3296(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(DrawTexiOES), .-GL_PREFIX(DrawTexiOES)
-
- .p2align 4,,15
- .globl GL_PREFIX(DrawTexivOES)
- .type GL_PREFIX(DrawTexivOES), @function
-GL_PREFIX(DrawTexivOES):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3304(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 3304(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3304(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 3304(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(DrawTexivOES), .-GL_PREFIX(DrawTexivOES)
-
- .p2align 4,,15
- .globl GL_PREFIX(DrawTexsOES)
- .type GL_PREFIX(DrawTexsOES), @function
-GL_PREFIX(DrawTexsOES):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3312(%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 3312(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3312(%rax), %r11
- 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 3312(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(DrawTexsOES), .-GL_PREFIX(DrawTexsOES)
-
- .p2align 4,,15
- .globl GL_PREFIX(DrawTexsvOES)
- .type GL_PREFIX(DrawTexsvOES), @function
-GL_PREFIX(DrawTexsvOES):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3320(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 3320(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3320(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 3320(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(DrawTexsvOES), .-GL_PREFIX(DrawTexsvOES)
-
- .p2align 4,,15
- .globl GL_PREFIX(DrawTexxOES)
- .type GL_PREFIX(DrawTexxOES), @function
-GL_PREFIX(DrawTexxOES):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3328(%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 3328(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3328(%rax), %r11
- 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 3328(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(DrawTexxOES), .-GL_PREFIX(DrawTexxOES)
-
- .p2align 4,,15
- .globl GL_PREFIX(DrawTexxvOES)
- .type GL_PREFIX(DrawTexxvOES), @function
-GL_PREFIX(DrawTexxvOES):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3336(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 3336(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3336(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 3336(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(DrawTexxvOES), .-GL_PREFIX(DrawTexxvOES)
-
- .p2align 4,,15
- .globl GL_PREFIX(BindFramebufferOES)
- .type GL_PREFIX(BindFramebufferOES), @function
-GL_PREFIX(BindFramebufferOES):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3344(%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 3344(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3344(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 3344(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(BindFramebufferOES), .-GL_PREFIX(BindFramebufferOES)
-
- .p2align 4,,15
- .globl GL_PREFIX(BindRenderbufferOES)
- .type GL_PREFIX(BindRenderbufferOES), @function
-GL_PREFIX(BindRenderbufferOES):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3352(%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 3352(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3352(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 3352(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(BindRenderbufferOES), .-GL_PREFIX(BindRenderbufferOES)
-
- .p2align 4,,15
- .globl GL_PREFIX(CheckFramebufferStatusOES)
- .type GL_PREFIX(CheckFramebufferStatusOES), @function
-GL_PREFIX(CheckFramebufferStatusOES):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3360(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 3360(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3360(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 3360(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(CheckFramebufferStatusOES), .-GL_PREFIX(CheckFramebufferStatusOES)
-
- .p2align 4,,15
- .globl GL_PREFIX(DeleteFramebuffersOES)
- .type GL_PREFIX(DeleteFramebuffersOES), @function
-GL_PREFIX(DeleteFramebuffersOES):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3368(%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 3368(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3368(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 3368(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(DeleteFramebuffersOES), .-GL_PREFIX(DeleteFramebuffersOES)
-
- .p2align 4,,15
- .globl GL_PREFIX(DeleteRenderbuffersOES)
- .type GL_PREFIX(DeleteRenderbuffersOES), @function
-GL_PREFIX(DeleteRenderbuffersOES):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3376(%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 3376(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3376(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 3376(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(DeleteRenderbuffersOES), .-GL_PREFIX(DeleteRenderbuffersOES)
-
- .p2align 4,,15
- .globl GL_PREFIX(FramebufferRenderbufferOES)
- .type GL_PREFIX(FramebufferRenderbufferOES), @function
-GL_PREFIX(FramebufferRenderbufferOES):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3384(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 3384(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3384(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 3384(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(FramebufferRenderbufferOES), .-GL_PREFIX(FramebufferRenderbufferOES)
-
- .p2align 4,,15
- .globl GL_PREFIX(FramebufferTexture2DOES)
- .type GL_PREFIX(FramebufferTexture2DOES), @function
-GL_PREFIX(FramebufferTexture2DOES):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3392(%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 3392(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3392(%rax), %r11
- 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 3392(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(FramebufferTexture2DOES), .-GL_PREFIX(FramebufferTexture2DOES)
-
- .p2align 4,,15
- .globl GL_PREFIX(GenFramebuffersOES)
- .type GL_PREFIX(GenFramebuffersOES), @function
-GL_PREFIX(GenFramebuffersOES):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3400(%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 3400(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3400(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 3400(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(GenFramebuffersOES), .-GL_PREFIX(GenFramebuffersOES)
-
- .p2align 4,,15
- .globl GL_PREFIX(GenRenderbuffersOES)
- .type GL_PREFIX(GenRenderbuffersOES), @function
-GL_PREFIX(GenRenderbuffersOES):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3408(%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 3408(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3408(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 3408(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(GenRenderbuffersOES), .-GL_PREFIX(GenRenderbuffersOES)
-
- .p2align 4,,15
- .globl GL_PREFIX(GenerateMipmapOES)
- .type GL_PREFIX(GenerateMipmapOES), @function
-GL_PREFIX(GenerateMipmapOES):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3416(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 3416(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3416(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 3416(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(GenerateMipmapOES), .-GL_PREFIX(GenerateMipmapOES)
-
- .p2align 4,,15
- .globl GL_PREFIX(GetFramebufferAttachmentParameterivOES)
- .type GL_PREFIX(GetFramebufferAttachmentParameterivOES), @function
-GL_PREFIX(GetFramebufferAttachmentParameterivOES):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3424(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 3424(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3424(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 3424(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(GetFramebufferAttachmentParameterivOES), .-GL_PREFIX(GetFramebufferAttachmentParameterivOES)
-
- .p2align 4,,15
- .globl GL_PREFIX(GetRenderbufferParameterivOES)
- .type GL_PREFIX(GetRenderbufferParameterivOES), @function
-GL_PREFIX(GetRenderbufferParameterivOES):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3432(%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 3432(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3432(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 3432(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(GetRenderbufferParameterivOES), .-GL_PREFIX(GetRenderbufferParameterivOES)
-
- .p2align 4,,15
- .globl GL_PREFIX(IsFramebufferOES)
- .type GL_PREFIX(IsFramebufferOES), @function
-GL_PREFIX(IsFramebufferOES):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3440(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 3440(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3440(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 3440(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(IsFramebufferOES), .-GL_PREFIX(IsFramebufferOES)
-
- .p2align 4,,15
- .globl GL_PREFIX(IsRenderbufferOES)
- .type GL_PREFIX(IsRenderbufferOES), @function
-GL_PREFIX(IsRenderbufferOES):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3448(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 3448(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3448(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 3448(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(IsRenderbufferOES), .-GL_PREFIX(IsRenderbufferOES)
-
- .p2align 4,,15
- .globl GL_PREFIX(RenderbufferStorageOES)
- .type GL_PREFIX(RenderbufferStorageOES), @function
-GL_PREFIX(RenderbufferStorageOES):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3456(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 3456(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3456(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 3456(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(RenderbufferStorageOES), .-GL_PREFIX(RenderbufferStorageOES)
-
- .p2align 4,,15
- .globl GL_PREFIX(PointSizePointerOES)
- .type GL_PREFIX(PointSizePointerOES), @function
-GL_PREFIX(PointSizePointerOES):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3464(%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 3464(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3464(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 3464(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(PointSizePointerOES), .-GL_PREFIX(PointSizePointerOES)
-
- .p2align 4,,15
- .globl GL_PREFIX(QueryMatrixxOES)
- .type GL_PREFIX(QueryMatrixxOES), @function
-GL_PREFIX(QueryMatrixxOES):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3472(%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 3472(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3472(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 3472(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(QueryMatrixxOES), .-GL_PREFIX(QueryMatrixxOES)
-
- .p2align 4,,15
- .globl GL_PREFIX(GetTexGenxvOES)
- .type GL_PREFIX(GetTexGenxvOES), @function
-GL_PREFIX(GetTexGenxvOES):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3480(%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 3480(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3480(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 3480(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(GetTexGenxvOES), .-GL_PREFIX(GetTexGenxvOES)
-
- .p2align 4,,15
- .globl GL_PREFIX(TexGenxOES)
- .type GL_PREFIX(TexGenxOES), @function
-GL_PREFIX(TexGenxOES):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3488(%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 3488(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3488(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 3488(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(TexGenxOES), .-GL_PREFIX(TexGenxOES)
-
- .p2align 4,,15
- .globl GL_PREFIX(TexGenxvOES)
- .type GL_PREFIX(TexGenxvOES), @function
-GL_PREFIX(TexGenxvOES):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3496(%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 3496(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3496(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 3496(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(TexGenxvOES), .-GL_PREFIX(TexGenxvOES)
-
- .p2align 4,,15
- .globl GL_PREFIX(GetBufferPointervOES)
- .type GL_PREFIX(GetBufferPointervOES), @function
-GL_PREFIX(GetBufferPointervOES):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3504(%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 3504(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3504(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 3504(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(GetBufferPointervOES), .-GL_PREFIX(GetBufferPointervOES)
-
- .p2align 4,,15
- .globl GL_PREFIX(MapBufferOES)
- .type GL_PREFIX(MapBufferOES), @function
-GL_PREFIX(MapBufferOES):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3512(%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 3512(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3512(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 3512(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(MapBufferOES), .-GL_PREFIX(MapBufferOES)
-
- .p2align 4,,15
- .globl GL_PREFIX(UnmapBufferOES)
- .type GL_PREFIX(UnmapBufferOES), @function
-GL_PREFIX(UnmapBufferOES):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3520(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 3520(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3520(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 3520(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(UnmapBufferOES), .-GL_PREFIX(UnmapBufferOES)
-
- .p2align 4,,15
- .globl GL_PREFIX(MultiDrawArraysEXT)
- .type GL_PREFIX(MultiDrawArraysEXT), @function
-GL_PREFIX(MultiDrawArraysEXT):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3528(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 3528(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3528(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 3528(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(MultiDrawArraysEXT), .-GL_PREFIX(MultiDrawArraysEXT)
-
- .p2align 4,,15
- .globl GL_PREFIX(MultiDrawElementsEXT)
- .type GL_PREFIX(MultiDrawElementsEXT), @function
-GL_PREFIX(MultiDrawElementsEXT):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3536(%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 3536(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3536(%rax), %r11
- 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 3536(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(MultiDrawElementsEXT), .-GL_PREFIX(MultiDrawElementsEXT)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_443)
- .type GL_PREFIX(_dispatch_stub_443), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_443))
-GL_PREFIX(_dispatch_stub_443):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3544(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 3544(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3544(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 3544(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_443), .-GL_PREFIX(_dispatch_stub_443)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_444)
- .type GL_PREFIX(_dispatch_stub_444), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_444))
-GL_PREFIX(_dispatch_stub_444):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3552(%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 3552(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3552(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 3552(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_444), .-GL_PREFIX(_dispatch_stub_444)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_445)
- .type GL_PREFIX(_dispatch_stub_445), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_445))
-GL_PREFIX(_dispatch_stub_445):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3560(%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 3560(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3560(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 3560(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_445), .-GL_PREFIX(_dispatch_stub_445)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_446)
- .type GL_PREFIX(_dispatch_stub_446), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_446))
-GL_PREFIX(_dispatch_stub_446):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3568(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 3568(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3568(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 3568(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_446), .-GL_PREFIX(_dispatch_stub_446)
-
- .p2align 4,,15
- .globl GL_PREFIX(EGLImageTargetRenderbufferStorageOES)
- .type GL_PREFIX(EGLImageTargetRenderbufferStorageOES), @function
-GL_PREFIX(EGLImageTargetRenderbufferStorageOES):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3576(%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 3576(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3576(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 3576(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(EGLImageTargetRenderbufferStorageOES), .-GL_PREFIX(EGLImageTargetRenderbufferStorageOES)
-
- .p2align 4,,15
- .globl GL_PREFIX(EGLImageTargetTexture2DOES)
- .type GL_PREFIX(EGLImageTargetTexture2DOES), @function
-GL_PREFIX(EGLImageTargetTexture2DOES):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3584(%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 3584(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3584(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 3584(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(EGLImageTargetTexture2DOES), .-GL_PREFIX(EGLImageTargetTexture2DOES)
-
- .p2align 4,,15
- .globl GL_PREFIX(CompressedTexImage2D)
- .type GL_PREFIX(CompressedTexImage2D), @function
-GL_PREFIX(CompressedTexImage2D):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3592(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %r8
- pushq %r9
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- popq %r9
- popq %r8
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 3592(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3592(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %r8
- pushq %r9
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %r9
- popq %r8
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 3592(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(CompressedTexImage2D), .-GL_PREFIX(CompressedTexImage2D)
-
- .p2align 4,,15
- .globl GL_PREFIX(CompressedTexSubImage2D)
- .type GL_PREFIX(CompressedTexSubImage2D), @function
-GL_PREFIX(CompressedTexSubImage2D):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3600(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %r8
- pushq %r9
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- popq %r9
- popq %r8
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 3600(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3600(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %r8
- pushq %r9
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %r9
- popq %r8
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 3600(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(CompressedTexSubImage2D), .-GL_PREFIX(CompressedTexSubImage2D)
-
- .p2align 4,,15
- .globl GL_PREFIX(SampleCoverage)
- .type GL_PREFIX(SampleCoverage), @function
-GL_PREFIX(SampleCoverage):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3608(%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 3608(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3608(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 3608(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(SampleCoverage), .-GL_PREFIX(SampleCoverage)
-
- .p2align 4,,15
- .globl GL_PREFIX(BindBuffer)
- .type GL_PREFIX(BindBuffer), @function
-GL_PREFIX(BindBuffer):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3616(%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 3616(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3616(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 3616(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(BindBuffer), .-GL_PREFIX(BindBuffer)
-
- .p2align 4,,15
- .globl GL_PREFIX(BufferData)
- .type GL_PREFIX(BufferData), @function
-GL_PREFIX(BufferData):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3624(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 3624(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3624(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 3624(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(BufferData), .-GL_PREFIX(BufferData)
-
- .p2align 4,,15
- .globl GL_PREFIX(BufferSubData)
- .type GL_PREFIX(BufferSubData), @function
-GL_PREFIX(BufferSubData):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3632(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 3632(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3632(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 3632(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(BufferSubData), .-GL_PREFIX(BufferSubData)
-
- .p2align 4,,15
- .globl GL_PREFIX(DeleteBuffers)
- .type GL_PREFIX(DeleteBuffers), @function
-GL_PREFIX(DeleteBuffers):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3640(%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 3640(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3640(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 3640(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(DeleteBuffers), .-GL_PREFIX(DeleteBuffers)
-
- .p2align 4,,15
- .globl GL_PREFIX(GenBuffers)
- .type GL_PREFIX(GenBuffers), @function
-GL_PREFIX(GenBuffers):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3648(%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 3648(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3648(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 3648(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(GenBuffers), .-GL_PREFIX(GenBuffers)
-
- .p2align 4,,15
- .globl GL_PREFIX(GetBufferParameteriv)
- .type GL_PREFIX(GetBufferParameteriv), @function
-GL_PREFIX(GetBufferParameteriv):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3656(%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 3656(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3656(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 3656(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(GetBufferParameteriv), .-GL_PREFIX(GetBufferParameteriv)
-
- .p2align 4,,15
- .globl GL_PREFIX(IsBuffer)
- .type GL_PREFIX(IsBuffer), @function
-GL_PREFIX(IsBuffer):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3664(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 3664(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3664(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 3664(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(IsBuffer), .-GL_PREFIX(IsBuffer)
-
- .p2align 4,,15
- .globl GL_PREFIX(PointParameterf)
- .type GL_PREFIX(PointParameterf), @function
-GL_PREFIX(PointParameterf):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3672(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $24, %rsp
- movq %rdi, (%rsp)
- movq %xmm0, 8(%rsp)
- call _x86_64_get_dispatch@PLT
- movq 8(%rsp), %xmm0
- movq (%rsp), %rdi
- addq $24, %rsp
- movq 3672(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3672(%rax), %r11
- jmp *%r11
-1:
- subq $24, %rsp
- movq %rdi, (%rsp)
- movq %xmm0, 8(%rsp)
- call _glapi_get_dispatch
- movq 8(%rsp), %xmm0
- movq (%rsp), %rdi
- addq $24, %rsp
- movq 3672(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(PointParameterf), .-GL_PREFIX(PointParameterf)
-
- .p2align 4,,15
- .globl GL_PREFIX(PointParameterfv)
- .type GL_PREFIX(PointParameterfv), @function
-GL_PREFIX(PointParameterfv):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3680(%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 3680(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3680(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 3680(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(PointParameterfv), .-GL_PREFIX(PointParameterfv)
-
- .p2align 4,,15
- .globl GL_PREFIX(AlphaFuncx)
- .type GL_PREFIX(AlphaFuncx), @function
-GL_PREFIX(AlphaFuncx):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3688(%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 3688(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3688(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 3688(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(AlphaFuncx), .-GL_PREFIX(AlphaFuncx)
-
- .p2align 4,,15
- .globl GL_PREFIX(ClearColorx)
- .type GL_PREFIX(ClearColorx), @function
-GL_PREFIX(ClearColorx):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3696(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 3696(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3696(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 3696(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(ClearColorx), .-GL_PREFIX(ClearColorx)
-
- .p2align 4,,15
- .globl GL_PREFIX(ClearDepthf)
- .type GL_PREFIX(ClearDepthf), @function
-GL_PREFIX(ClearDepthf):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3704(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 3704(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3704(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 3704(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(ClearDepthf), .-GL_PREFIX(ClearDepthf)
-
- .p2align 4,,15
- .globl GL_PREFIX(ClearDepthx)
- .type GL_PREFIX(ClearDepthx), @function
-GL_PREFIX(ClearDepthx):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3712(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 3712(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3712(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 3712(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(ClearDepthx), .-GL_PREFIX(ClearDepthx)
-
- .p2align 4,,15
- .globl GL_PREFIX(Color4x)
- .type GL_PREFIX(Color4x), @function
-GL_PREFIX(Color4x):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3720(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 3720(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3720(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 3720(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(Color4x), .-GL_PREFIX(Color4x)
-
- .p2align 4,,15
- .globl GL_PREFIX(DepthRangef)
- .type GL_PREFIX(DepthRangef), @function
-GL_PREFIX(DepthRangef):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3728(%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 3728(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3728(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 3728(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(DepthRangef), .-GL_PREFIX(DepthRangef)
-
- .p2align 4,,15
- .globl GL_PREFIX(DepthRangex)
- .type GL_PREFIX(DepthRangex), @function
-GL_PREFIX(DepthRangex):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3736(%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 3736(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3736(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 3736(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(DepthRangex), .-GL_PREFIX(DepthRangex)
-
- .p2align 4,,15
- .globl GL_PREFIX(Fogx)
- .type GL_PREFIX(Fogx), @function
-GL_PREFIX(Fogx):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3744(%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 3744(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3744(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 3744(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(Fogx), .-GL_PREFIX(Fogx)
-
- .p2align 4,,15
- .globl GL_PREFIX(Fogxv)
- .type GL_PREFIX(Fogxv), @function
-GL_PREFIX(Fogxv):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3752(%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 3752(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3752(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 3752(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(Fogxv), .-GL_PREFIX(Fogxv)
-
- .p2align 4,,15
- .globl GL_PREFIX(Frustumf)
- .type GL_PREFIX(Frustumf), @function
-GL_PREFIX(Frustumf):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3760(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $56, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- movq %xmm2, 16(%rsp)
- movq %xmm3, 24(%rsp)
- movq %xmm4, 32(%rsp)
- movq %xmm5, 40(%rsp)
- call _x86_64_get_dispatch@PLT
- movq 40(%rsp), %xmm5
- movq 32(%rsp), %xmm4
- movq 24(%rsp), %xmm3
- movq 16(%rsp), %xmm2
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $56, %rsp
- movq 3760(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3760(%rax), %r11
- jmp *%r11
-1:
- subq $56, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- movq %xmm2, 16(%rsp)
- movq %xmm3, 24(%rsp)
- movq %xmm4, 32(%rsp)
- movq %xmm5, 40(%rsp)
- call _glapi_get_dispatch
- movq 40(%rsp), %xmm5
- movq 32(%rsp), %xmm4
- movq 24(%rsp), %xmm3
- movq 16(%rsp), %xmm2
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $56, %rsp
- movq 3760(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(Frustumf), .-GL_PREFIX(Frustumf)
-
- .p2align 4,,15
- .globl GL_PREFIX(Frustumx)
- .type GL_PREFIX(Frustumx), @function
-GL_PREFIX(Frustumx):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3768(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %r8
- pushq %r9
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- popq %r9
- popq %r8
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 3768(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3768(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %r8
- pushq %r9
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %r9
- popq %r8
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 3768(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(Frustumx), .-GL_PREFIX(Frustumx)
-
- .p2align 4,,15
- .globl GL_PREFIX(LightModelx)
- .type GL_PREFIX(LightModelx), @function
-GL_PREFIX(LightModelx):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3776(%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 3776(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3776(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 3776(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(LightModelx), .-GL_PREFIX(LightModelx)
-
- .p2align 4,,15
- .globl GL_PREFIX(LightModelxv)
- .type GL_PREFIX(LightModelxv), @function
-GL_PREFIX(LightModelxv):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3784(%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 3784(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3784(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 3784(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(LightModelxv), .-GL_PREFIX(LightModelxv)
-
- .p2align 4,,15
- .globl GL_PREFIX(Lightx)
- .type GL_PREFIX(Lightx), @function
-GL_PREFIX(Lightx):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3792(%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 3792(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3792(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 3792(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(Lightx), .-GL_PREFIX(Lightx)
-
- .p2align 4,,15
- .globl GL_PREFIX(Lightxv)
- .type GL_PREFIX(Lightxv), @function
-GL_PREFIX(Lightxv):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3800(%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 3800(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3800(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 3800(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(Lightxv), .-GL_PREFIX(Lightxv)
-
- .p2align 4,,15
- .globl GL_PREFIX(LineWidthx)
- .type GL_PREFIX(LineWidthx), @function
-GL_PREFIX(LineWidthx):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3808(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 3808(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3808(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 3808(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(LineWidthx), .-GL_PREFIX(LineWidthx)
-
- .p2align 4,,15
- .globl GL_PREFIX(LoadMatrixx)
- .type GL_PREFIX(LoadMatrixx), @function
-GL_PREFIX(LoadMatrixx):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3816(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 3816(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3816(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 3816(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(LoadMatrixx), .-GL_PREFIX(LoadMatrixx)
-
- .p2align 4,,15
- .globl GL_PREFIX(Materialx)
- .type GL_PREFIX(Materialx), @function
-GL_PREFIX(Materialx):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3824(%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 3824(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3824(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 3824(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(Materialx), .-GL_PREFIX(Materialx)
-
- .p2align 4,,15
- .globl GL_PREFIX(Materialxv)
- .type GL_PREFIX(Materialxv), @function
-GL_PREFIX(Materialxv):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3832(%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 3832(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3832(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 3832(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(Materialxv), .-GL_PREFIX(Materialxv)
-
- .p2align 4,,15
- .globl GL_PREFIX(MultMatrixx)
- .type GL_PREFIX(MultMatrixx), @function
-GL_PREFIX(MultMatrixx):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3840(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 3840(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3840(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 3840(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(MultMatrixx), .-GL_PREFIX(MultMatrixx)
-
- .p2align 4,,15
- .globl GL_PREFIX(MultiTexCoord4x)
- .type GL_PREFIX(MultiTexCoord4x), @function
-GL_PREFIX(MultiTexCoord4x):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3848(%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 3848(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3848(%rax), %r11
- 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 3848(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(MultiTexCoord4x), .-GL_PREFIX(MultiTexCoord4x)
-
- .p2align 4,,15
- .globl GL_PREFIX(Normal3x)
- .type GL_PREFIX(Normal3x), @function
-GL_PREFIX(Normal3x):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3856(%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 3856(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3856(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 3856(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(Normal3x), .-GL_PREFIX(Normal3x)
-
- .p2align 4,,15
- .globl GL_PREFIX(Orthof)
- .type GL_PREFIX(Orthof), @function
-GL_PREFIX(Orthof):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3864(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $56, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- movq %xmm2, 16(%rsp)
- movq %xmm3, 24(%rsp)
- movq %xmm4, 32(%rsp)
- movq %xmm5, 40(%rsp)
- call _x86_64_get_dispatch@PLT
- movq 40(%rsp), %xmm5
- movq 32(%rsp), %xmm4
- movq 24(%rsp), %xmm3
- movq 16(%rsp), %xmm2
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $56, %rsp
- movq 3864(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3864(%rax), %r11
- jmp *%r11
-1:
- subq $56, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- movq %xmm2, 16(%rsp)
- movq %xmm3, 24(%rsp)
- movq %xmm4, 32(%rsp)
- movq %xmm5, 40(%rsp)
- call _glapi_get_dispatch
- movq 40(%rsp), %xmm5
- movq 32(%rsp), %xmm4
- movq 24(%rsp), %xmm3
- movq 16(%rsp), %xmm2
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $56, %rsp
- movq 3864(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(Orthof), .-GL_PREFIX(Orthof)
-
- .p2align 4,,15
- .globl GL_PREFIX(Orthox)
- .type GL_PREFIX(Orthox), @function
-GL_PREFIX(Orthox):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3872(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %r8
- pushq %r9
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- popq %r9
- popq %r8
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 3872(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3872(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %r8
- pushq %r9
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %r9
- popq %r8
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 3872(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(Orthox), .-GL_PREFIX(Orthox)
-
- .p2align 4,,15
- .globl GL_PREFIX(PointSizex)
- .type GL_PREFIX(PointSizex), @function
-GL_PREFIX(PointSizex):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3880(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 3880(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3880(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 3880(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(PointSizex), .-GL_PREFIX(PointSizex)
-
- .p2align 4,,15
- .globl GL_PREFIX(PolygonOffsetx)
- .type GL_PREFIX(PolygonOffsetx), @function
-GL_PREFIX(PolygonOffsetx):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3888(%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 3888(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3888(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 3888(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(PolygonOffsetx), .-GL_PREFIX(PolygonOffsetx)
-
- .p2align 4,,15
- .globl GL_PREFIX(Rotatex)
- .type GL_PREFIX(Rotatex), @function
-GL_PREFIX(Rotatex):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3896(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 3896(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3896(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 3896(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(Rotatex), .-GL_PREFIX(Rotatex)
-
- .p2align 4,,15
- .globl GL_PREFIX(SampleCoveragex)
- .type GL_PREFIX(SampleCoveragex), @function
-GL_PREFIX(SampleCoveragex):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3904(%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 3904(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3904(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 3904(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(SampleCoveragex), .-GL_PREFIX(SampleCoveragex)
-
- .p2align 4,,15
- .globl GL_PREFIX(Scalex)
- .type GL_PREFIX(Scalex), @function
-GL_PREFIX(Scalex):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3912(%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 3912(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3912(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 3912(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(Scalex), .-GL_PREFIX(Scalex)
-
- .p2align 4,,15
- .globl GL_PREFIX(TexEnvx)
- .type GL_PREFIX(TexEnvx), @function
-GL_PREFIX(TexEnvx):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3920(%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 3920(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3920(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 3920(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(TexEnvx), .-GL_PREFIX(TexEnvx)
-
- .p2align 4,,15
- .globl GL_PREFIX(TexEnvxv)
- .type GL_PREFIX(TexEnvxv), @function
-GL_PREFIX(TexEnvxv):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3928(%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 3928(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3928(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 3928(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(TexEnvxv), .-GL_PREFIX(TexEnvxv)
-
- .p2align 4,,15
- .globl GL_PREFIX(TexParameterx)
- .type GL_PREFIX(TexParameterx), @function
-GL_PREFIX(TexParameterx):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3936(%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 3936(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3936(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 3936(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(TexParameterx), .-GL_PREFIX(TexParameterx)
-
- .p2align 4,,15
- .globl GL_PREFIX(Translatex)
- .type GL_PREFIX(Translatex), @function
-GL_PREFIX(Translatex):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3944(%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 3944(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3944(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 3944(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(Translatex), .-GL_PREFIX(Translatex)
-
- .p2align 4,,15
- .globl GL_PREFIX(ClipPlanef)
- .type GL_PREFIX(ClipPlanef), @function
-GL_PREFIX(ClipPlanef):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3952(%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 3952(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3952(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 3952(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(ClipPlanef), .-GL_PREFIX(ClipPlanef)
-
- .p2align 4,,15
- .globl GL_PREFIX(ClipPlanex)
- .type GL_PREFIX(ClipPlanex), @function
-GL_PREFIX(ClipPlanex):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3960(%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 3960(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3960(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 3960(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(ClipPlanex), .-GL_PREFIX(ClipPlanex)
-
- .p2align 4,,15
- .globl GL_PREFIX(GetClipPlanef)
- .type GL_PREFIX(GetClipPlanef), @function
-GL_PREFIX(GetClipPlanef):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3968(%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 3968(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3968(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 3968(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(GetClipPlanef), .-GL_PREFIX(GetClipPlanef)
-
- .p2align 4,,15
- .globl GL_PREFIX(GetClipPlanex)
- .type GL_PREFIX(GetClipPlanex), @function
-GL_PREFIX(GetClipPlanex):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3976(%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 3976(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3976(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 3976(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(GetClipPlanex), .-GL_PREFIX(GetClipPlanex)
-
- .p2align 4,,15
- .globl GL_PREFIX(GetFixedv)
- .type GL_PREFIX(GetFixedv), @function
-GL_PREFIX(GetFixedv):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3984(%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 3984(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3984(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 3984(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(GetFixedv), .-GL_PREFIX(GetFixedv)
-
- .p2align 4,,15
- .globl GL_PREFIX(GetLightxv)
- .type GL_PREFIX(GetLightxv), @function
-GL_PREFIX(GetLightxv):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3992(%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 3992(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3992(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 3992(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(GetLightxv), .-GL_PREFIX(GetLightxv)
-
- .p2align 4,,15
- .globl GL_PREFIX(GetMaterialxv)
- .type GL_PREFIX(GetMaterialxv), @function
-GL_PREFIX(GetMaterialxv):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 4000(%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 4000(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 4000(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 4000(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(GetMaterialxv), .-GL_PREFIX(GetMaterialxv)
-
- .p2align 4,,15
- .globl GL_PREFIX(GetTexEnvxv)
- .type GL_PREFIX(GetTexEnvxv), @function
-GL_PREFIX(GetTexEnvxv):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 4008(%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 4008(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 4008(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 4008(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(GetTexEnvxv), .-GL_PREFIX(GetTexEnvxv)
-
- .p2align 4,,15
- .globl GL_PREFIX(GetTexParameterxv)
- .type GL_PREFIX(GetTexParameterxv), @function
-GL_PREFIX(GetTexParameterxv):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 4016(%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 4016(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 4016(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 4016(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(GetTexParameterxv), .-GL_PREFIX(GetTexParameterxv)
-
- .p2align 4,,15
- .globl GL_PREFIX(PointParameterx)
- .type GL_PREFIX(PointParameterx), @function
-GL_PREFIX(PointParameterx):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 4024(%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 4024(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 4024(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 4024(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(PointParameterx), .-GL_PREFIX(PointParameterx)
-
- .p2align 4,,15
- .globl GL_PREFIX(PointParameterxv)
- .type GL_PREFIX(PointParameterxv), @function
-GL_PREFIX(PointParameterxv):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 4032(%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 4032(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 4032(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 4032(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(PointParameterxv), .-GL_PREFIX(PointParameterxv)
-
- .p2align 4,,15
- .globl GL_PREFIX(TexParameterxv)
- .type GL_PREFIX(TexParameterxv), @function
-GL_PREFIX(TexParameterxv):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 4040(%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 4040(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 4040(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 4040(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(TexParameterxv), .-GL_PREFIX(TexParameterxv)
-
- .globl GL_PREFIX(AlphaFuncxOES) ; .set GL_PREFIX(AlphaFuncxOES), GL_PREFIX(AlphaFuncx)
- .globl GL_PREFIX(ClearColorxOES) ; .set GL_PREFIX(ClearColorxOES), GL_PREFIX(ClearColorx)
- .globl GL_PREFIX(ClearDepthfOES) ; .set GL_PREFIX(ClearDepthfOES), GL_PREFIX(ClearDepthf)
- .globl GL_PREFIX(ClearDepthxOES) ; .set GL_PREFIX(ClearDepthxOES), GL_PREFIX(ClearDepthx)
- .globl GL_PREFIX(Color4xOES) ; .set GL_PREFIX(Color4xOES), GL_PREFIX(Color4x)
- .globl GL_PREFIX(DepthRangefOES) ; .set GL_PREFIX(DepthRangefOES), GL_PREFIX(DepthRangef)
- .globl GL_PREFIX(DepthRangexOES) ; .set GL_PREFIX(DepthRangexOES), GL_PREFIX(DepthRangex)
- .globl GL_PREFIX(FogxOES) ; .set GL_PREFIX(FogxOES), GL_PREFIX(Fogx)
- .globl GL_PREFIX(FogxvOES) ; .set GL_PREFIX(FogxvOES), GL_PREFIX(Fogxv)
- .globl GL_PREFIX(FrustumfOES) ; .set GL_PREFIX(FrustumfOES), GL_PREFIX(Frustumf)
- .globl GL_PREFIX(FrustumxOES) ; .set GL_PREFIX(FrustumxOES), GL_PREFIX(Frustumx)
- .globl GL_PREFIX(LightModelxOES) ; .set GL_PREFIX(LightModelxOES), GL_PREFIX(LightModelx)
- .globl GL_PREFIX(LightModelxvOES) ; .set GL_PREFIX(LightModelxvOES), GL_PREFIX(LightModelxv)
- .globl GL_PREFIX(LightxOES) ; .set GL_PREFIX(LightxOES), GL_PREFIX(Lightx)
- .globl GL_PREFIX(LightxvOES) ; .set GL_PREFIX(LightxvOES), GL_PREFIX(Lightxv)
- .globl GL_PREFIX(LineWidthxOES) ; .set GL_PREFIX(LineWidthxOES), GL_PREFIX(LineWidthx)
- .globl GL_PREFIX(LoadMatrixxOES) ; .set GL_PREFIX(LoadMatrixxOES), GL_PREFIX(LoadMatrixx)
- .globl GL_PREFIX(MaterialxOES) ; .set GL_PREFIX(MaterialxOES), GL_PREFIX(Materialx)
- .globl GL_PREFIX(MaterialxvOES) ; .set GL_PREFIX(MaterialxvOES), GL_PREFIX(Materialxv)
- .globl GL_PREFIX(MultMatrixxOES) ; .set GL_PREFIX(MultMatrixxOES), GL_PREFIX(MultMatrixx)
- .globl GL_PREFIX(MultiTexCoord4xOES) ; .set GL_PREFIX(MultiTexCoord4xOES), GL_PREFIX(MultiTexCoord4x)
- .globl GL_PREFIX(Normal3xOES) ; .set GL_PREFIX(Normal3xOES), GL_PREFIX(Normal3x)
- .globl GL_PREFIX(OrthofOES) ; .set GL_PREFIX(OrthofOES), GL_PREFIX(Orthof)
- .globl GL_PREFIX(OrthoxOES) ; .set GL_PREFIX(OrthoxOES), GL_PREFIX(Orthox)
- .globl GL_PREFIX(PointSizexOES) ; .set GL_PREFIX(PointSizexOES), GL_PREFIX(PointSizex)
- .globl GL_PREFIX(PolygonOffsetxOES) ; .set GL_PREFIX(PolygonOffsetxOES), GL_PREFIX(PolygonOffsetx)
- .globl GL_PREFIX(RotatexOES) ; .set GL_PREFIX(RotatexOES), GL_PREFIX(Rotatex)
- .globl GL_PREFIX(SampleCoveragexOES) ; .set GL_PREFIX(SampleCoveragexOES), GL_PREFIX(SampleCoveragex)
- .globl GL_PREFIX(ScalexOES) ; .set GL_PREFIX(ScalexOES), GL_PREFIX(Scalex)
- .globl GL_PREFIX(TexEnvxOES) ; .set GL_PREFIX(TexEnvxOES), GL_PREFIX(TexEnvx)
- .globl GL_PREFIX(TexEnvxvOES) ; .set GL_PREFIX(TexEnvxvOES), GL_PREFIX(TexEnvxv)
- .globl GL_PREFIX(TexParameterxOES) ; .set GL_PREFIX(TexParameterxOES), GL_PREFIX(TexParameterx)
- .globl GL_PREFIX(TranslatexOES) ; .set GL_PREFIX(TranslatexOES), GL_PREFIX(Translatex)
- .globl GL_PREFIX(ClipPlanefOES) ; .set GL_PREFIX(ClipPlanefOES), GL_PREFIX(ClipPlanef)
- .globl GL_PREFIX(ClipPlanexOES) ; .set GL_PREFIX(ClipPlanexOES), GL_PREFIX(ClipPlanex)
- .globl GL_PREFIX(GetClipPlanefOES) ; .set GL_PREFIX(GetClipPlanefOES), GL_PREFIX(GetClipPlanef)
- .globl GL_PREFIX(GetClipPlanexOES) ; .set GL_PREFIX(GetClipPlanexOES), GL_PREFIX(GetClipPlanex)
- .globl GL_PREFIX(GetFixedvOES) ; .set GL_PREFIX(GetFixedvOES), GL_PREFIX(GetFixedv)
- .globl GL_PREFIX(GetLightxvOES) ; .set GL_PREFIX(GetLightxvOES), GL_PREFIX(GetLightxv)
- .globl GL_PREFIX(GetMaterialxvOES) ; .set GL_PREFIX(GetMaterialxvOES), GL_PREFIX(GetMaterialxv)
- .globl GL_PREFIX(GetTexEnvxvOES) ; .set GL_PREFIX(GetTexEnvxvOES), GL_PREFIX(GetTexEnvxv)
- .globl GL_PREFIX(GetTexParameterxvOES) ; .set GL_PREFIX(GetTexParameterxvOES), GL_PREFIX(GetTexParameterxv)
- .globl GL_PREFIX(PointParameterxOES) ; .set GL_PREFIX(PointParameterxOES), GL_PREFIX(PointParameterx)
- .globl GL_PREFIX(PointParameterxvOES) ; .set GL_PREFIX(PointParameterxvOES), GL_PREFIX(PointParameterxv)
- .globl GL_PREFIX(TexParameterxvOES) ; .set GL_PREFIX(TexParameterxvOES), GL_PREFIX(TexParameterxv)
-
-#if defined(GLX_USE_TLS) && defined(__linux__)
- .section ".note.ABI-tag", "a"
- .p2align 2
- .long 1f - 0f /* name length */
- .long 3f - 2f /* data length */
- .long 1 /* note length */
-0: .asciz "GNU" /* vendor name */
-1: .p2align 2
-2: .long 0 /* note data: the ABI tag */
- .long 2,4,20 /* Minimum kernel version w/TLS */
-3: .p2align 2 /* pad out section */
-#endif /* GLX_USE_TLS */
-
-#if defined (__ELF__) && defined (__linux__)
- .section .note.GNU-stack,"",%progbits
-#endif
diff --git a/src/mapi/es1api/glapi/glapi_x86.S b/src/mapi/es1api/glapi/glapi_x86.S
deleted file mode 100644
index f2dca68925a..00000000000
--- a/src/mapi/es1api/glapi/glapi_x86.S
+++ /dev/null
@@ -1,1043 +0,0 @@
-/* DO NOT EDIT - This file generated automatically by gl_x86_asm.py (from Mesa) script */
-
-/*
- * Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
- * (C) Copyright IBM Corporation 2004, 2005
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sub license,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL, IBM,
- * AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
- * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-#include "x86/assyntax.h"
-
-#if defined(STDCALL_API)
-# if defined(USE_MGL_NAMESPACE)
-# define GL_PREFIX(n,n2) GLNAME(CONCAT(mgl,n2))
-# else
-# define GL_PREFIX(n,n2) GLNAME(CONCAT(gl,n2))
-# endif
-#else
-# if defined(USE_MGL_NAMESPACE)
-# define GL_PREFIX(n,n2) GLNAME(CONCAT(mgl,n))
-# define _glapi_Dispatch _mglapi_Dispatch
-# else
-# define GL_PREFIX(n,n2) GLNAME(CONCAT(gl,n))
-# endif
-#endif
-
-#define GL_OFFSET(x) CODEPTR(REGOFF(4 * x, EAX))
-
-#if defined(GNU_ASSEMBLER) && !defined(__DJGPP__) && !defined(__MINGW32__) && !defined(__APPLE__)
-#define GLOBL_FN(x) GLOBL x ; .type x, function
-#else
-#define GLOBL_FN(x) GLOBL x
-#endif
-
-#if defined(PTHREADS) || defined(WIN32) || defined(BEOS_THREADS)
-# define THREADS
-#endif
-
-#ifdef GLX_USE_TLS
-
-#ifdef GLX_X86_READONLY_TEXT
-# define CTX_INSNS MOV_L(GS:(EAX), EAX)
-#else
-# define CTX_INSNS NOP /* Pad for init_glapi_relocs() */
-#endif
-
-# define GL_STUB(fn,off,fn_alt) \
-ALIGNTEXT16; \
-GLOBL_FN(GL_PREFIX(fn, fn_alt)); \
-GL_PREFIX(fn, fn_alt): \
- CALL(_x86_get_dispatch) ; \
- CTX_INSNS ; \
- JMP(GL_OFFSET(off))
-
-#elif defined(PTHREADS)
-# define GL_STUB(fn,off,fn_alt) \
-ALIGNTEXT16; \
-GLOBL_FN(GL_PREFIX(fn, fn_alt)); \
-GL_PREFIX(fn, fn_alt): \
- MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) ; \
- TEST_L(EAX, EAX) ; \
- JE(1f) ; \
- JMP(GL_OFFSET(off)) ; \
-1: CALL(_x86_get_dispatch) ; \
- JMP(GL_OFFSET(off))
-#elif defined(THREADS)
-# define GL_STUB(fn,off,fn_alt) \
-ALIGNTEXT16; \
-GLOBL_FN(GL_PREFIX(fn, fn_alt)); \
-GL_PREFIX(fn, fn_alt): \
- MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) ; \
- TEST_L(EAX, EAX) ; \
- JE(1f) ; \
- JMP(GL_OFFSET(off)) ; \
-1: CALL(_glapi_get_dispatch) ; \
- JMP(GL_OFFSET(off))
-#else /* Non-threaded version. */
-# define GL_STUB(fn,off,fn_alt) \
-ALIGNTEXT16; \
-GLOBL_FN(GL_PREFIX(fn, fn_alt)); \
-GL_PREFIX(fn, fn_alt): \
- MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) ; \
- JMP(GL_OFFSET(off))
-#endif
-
-#ifdef HAVE_ALIAS
-# define GL_STUB_ALIAS(fn,off,fn_alt,alias,alias_alt) \
- .globl GL_PREFIX(fn, fn_alt) ; \
- .set GL_PREFIX(fn, fn_alt), GL_PREFIX(alias, alias_alt)
-#else
-# define GL_STUB_ALIAS(fn,off,fn_alt,alias,alias_alt) \
- GL_STUB(fn, off, fn_alt)
-#endif
-
-SEG_TEXT
-
-#ifdef GLX_USE_TLS
-
- GLOBL GLNAME(_x86_get_dispatch)
- HIDDEN(GLNAME(_x86_get_dispatch))
-ALIGNTEXT16
-GLNAME(_x86_get_dispatch):
- call 1f
-1: popl %eax
- addl $_GLOBAL_OFFSET_TABLE_+[.-1b], %eax
- movl _glapi_tls_Dispatch@GOTNTPOFF(%eax), %eax
- ret
-
-#elif defined(PTHREADS)
-EXTERN GLNAME(_glapi_Dispatch)
-EXTERN GLNAME(_gl_DispatchTSD)
-EXTERN GLNAME(pthread_getspecific)
-
-ALIGNTEXT16
-GLNAME(_x86_get_dispatch):
- SUB_L(CONST(24), ESP)
- PUSH_L(GLNAME(_gl_DispatchTSD))
- CALL(GLNAME(pthread_getspecific))
- ADD_L(CONST(28), ESP)
- RET
-#elif defined(THREADS)
-EXTERN GLNAME(_glapi_get_dispatch)
-#endif
-
-#if defined( GLX_USE_TLS ) && !defined( GLX_X86_READONLY_TEXT )
- .section wtext, "awx", @progbits
-#endif /* defined( GLX_USE_TLS ) */
-
- ALIGNTEXT16
- GLOBL GLNAME(gl_dispatch_functions_start)
- HIDDEN(GLNAME(gl_dispatch_functions_start))
-GLNAME(gl_dispatch_functions_start):
-
- GL_STUB(_dispatch_stub_0, 0, _dispatch_stub_0@8)
- HIDDEN(GL_PREFIX(_dispatch_stub_0, _dispatch_stub_0@8))
- GL_STUB(_dispatch_stub_1, 1, _dispatch_stub_1@0)
- HIDDEN(GL_PREFIX(_dispatch_stub_1, _dispatch_stub_1@0))
- GL_STUB(_dispatch_stub_2, 2, _dispatch_stub_2@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_2, _dispatch_stub_2@4))
- GL_STUB(_dispatch_stub_3, 3, _dispatch_stub_3@12)
- HIDDEN(GL_PREFIX(_dispatch_stub_3, _dispatch_stub_3@12))
- GL_STUB(_dispatch_stub_4, 4, _dispatch_stub_4@8)
- HIDDEN(GL_PREFIX(_dispatch_stub_4, _dispatch_stub_4@8))
- GL_STUB(_dispatch_stub_5, 5, _dispatch_stub_5@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_5, _dispatch_stub_5@4))
- GL_STUB(_dispatch_stub_6, 6, _dispatch_stub_6@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_6, _dispatch_stub_6@4))
- GL_STUB(_dispatch_stub_7, 7, _dispatch_stub_7@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_7, _dispatch_stub_7@4))
- GL_STUB(_dispatch_stub_8, 8, _dispatch_stub_8@28)
- HIDDEN(GL_PREFIX(_dispatch_stub_8, _dispatch_stub_8@28))
- GL_STUB(_dispatch_stub_9, 9, _dispatch_stub_9@12)
- HIDDEN(GL_PREFIX(_dispatch_stub_9, _dispatch_stub_9@12))
- GL_STUB(_dispatch_stub_10, 10, _dispatch_stub_10@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_10, _dispatch_stub_10@4))
- GL_STUB(_dispatch_stub_11, 11, _dispatch_stub_11@24)
- HIDDEN(GL_PREFIX(_dispatch_stub_11, _dispatch_stub_11@24))
- GL_STUB(_dispatch_stub_12, 12, _dispatch_stub_12@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_12, _dispatch_stub_12@4))
- GL_STUB(_dispatch_stub_13, 13, _dispatch_stub_13@12)
- HIDDEN(GL_PREFIX(_dispatch_stub_13, _dispatch_stub_13@12))
- GL_STUB(_dispatch_stub_14, 14, _dispatch_stub_14@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_14, _dispatch_stub_14@4))
- GL_STUB(_dispatch_stub_15, 15, _dispatch_stub_15@12)
- HIDDEN(GL_PREFIX(_dispatch_stub_15, _dispatch_stub_15@12))
- GL_STUB(_dispatch_stub_16, 16, _dispatch_stub_16@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_16, _dispatch_stub_16@4))
- GL_STUB(_dispatch_stub_17, 17, _dispatch_stub_17@12)
- HIDDEN(GL_PREFIX(_dispatch_stub_17, _dispatch_stub_17@12))
- GL_STUB(_dispatch_stub_18, 18, _dispatch_stub_18@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_18, _dispatch_stub_18@4))
- GL_STUB(_dispatch_stub_19, 19, _dispatch_stub_19@12)
- HIDDEN(GL_PREFIX(_dispatch_stub_19, _dispatch_stub_19@12))
- GL_STUB(_dispatch_stub_20, 20, _dispatch_stub_20@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_20, _dispatch_stub_20@4))
- GL_STUB(_dispatch_stub_21, 21, _dispatch_stub_21@12)
- HIDDEN(GL_PREFIX(_dispatch_stub_21, _dispatch_stub_21@12))
- GL_STUB(_dispatch_stub_22, 22, _dispatch_stub_22@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_22, _dispatch_stub_22@4))
- GL_STUB(_dispatch_stub_23, 23, _dispatch_stub_23@12)
- HIDDEN(GL_PREFIX(_dispatch_stub_23, _dispatch_stub_23@12))
- GL_STUB(_dispatch_stub_24, 24, _dispatch_stub_24@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_24, _dispatch_stub_24@4))
- GL_STUB(_dispatch_stub_25, 25, _dispatch_stub_25@16)
- HIDDEN(GL_PREFIX(_dispatch_stub_25, _dispatch_stub_25@16))
- GL_STUB(_dispatch_stub_26, 26, _dispatch_stub_26@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_26, _dispatch_stub_26@4))
- GL_STUB(_dispatch_stub_27, 27, _dispatch_stub_27@32)
- HIDDEN(GL_PREFIX(_dispatch_stub_27, _dispatch_stub_27@32))
- GL_STUB(_dispatch_stub_28, 28, _dispatch_stub_28@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_28, _dispatch_stub_28@4))
- GL_STUB(Color4f, 29, Color4f@16)
- GL_STUB(_dispatch_stub_30, 30, _dispatch_stub_30@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_30, _dispatch_stub_30@4))
- GL_STUB(_dispatch_stub_31, 31, _dispatch_stub_31@16)
- HIDDEN(GL_PREFIX(_dispatch_stub_31, _dispatch_stub_31@16))
- GL_STUB(_dispatch_stub_32, 32, _dispatch_stub_32@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_32, _dispatch_stub_32@4))
- GL_STUB(_dispatch_stub_33, 33, _dispatch_stub_33@16)
- HIDDEN(GL_PREFIX(_dispatch_stub_33, _dispatch_stub_33@16))
- GL_STUB(_dispatch_stub_34, 34, _dispatch_stub_34@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_34, _dispatch_stub_34@4))
- GL_STUB(Color4ub, 35, Color4ub@16)
- GL_STUB(_dispatch_stub_36, 36, _dispatch_stub_36@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_36, _dispatch_stub_36@4))
- GL_STUB(_dispatch_stub_37, 37, _dispatch_stub_37@16)
- HIDDEN(GL_PREFIX(_dispatch_stub_37, _dispatch_stub_37@16))
- GL_STUB(_dispatch_stub_38, 38, _dispatch_stub_38@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_38, _dispatch_stub_38@4))
- GL_STUB(_dispatch_stub_39, 39, _dispatch_stub_39@16)
- HIDDEN(GL_PREFIX(_dispatch_stub_39, _dispatch_stub_39@16))
- GL_STUB(_dispatch_stub_40, 40, _dispatch_stub_40@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_40, _dispatch_stub_40@4))
- GL_STUB(_dispatch_stub_41, 41, _dispatch_stub_41@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_41, _dispatch_stub_41@4))
- GL_STUB(_dispatch_stub_42, 42, _dispatch_stub_42@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_42, _dispatch_stub_42@4))
- GL_STUB(_dispatch_stub_43, 43, _dispatch_stub_43@0)
- HIDDEN(GL_PREFIX(_dispatch_stub_43, _dispatch_stub_43@0))
- GL_STUB(_dispatch_stub_44, 44, _dispatch_stub_44@8)
- HIDDEN(GL_PREFIX(_dispatch_stub_44, _dispatch_stub_44@8))
- GL_STUB(_dispatch_stub_45, 45, _dispatch_stub_45@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_45, _dispatch_stub_45@4))
- GL_STUB(_dispatch_stub_46, 46, _dispatch_stub_46@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_46, _dispatch_stub_46@4))
- GL_STUB(_dispatch_stub_47, 47, _dispatch_stub_47@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_47, _dispatch_stub_47@4))
- GL_STUB(_dispatch_stub_48, 48, _dispatch_stub_48@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_48, _dispatch_stub_48@4))
- GL_STUB(_dispatch_stub_49, 49, _dispatch_stub_49@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_49, _dispatch_stub_49@4))
- GL_STUB(_dispatch_stub_50, 50, _dispatch_stub_50@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_50, _dispatch_stub_50@4))
- GL_STUB(_dispatch_stub_51, 51, _dispatch_stub_51@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_51, _dispatch_stub_51@4))
- GL_STUB(_dispatch_stub_52, 52, _dispatch_stub_52@12)
- HIDDEN(GL_PREFIX(_dispatch_stub_52, _dispatch_stub_52@12))
- GL_STUB(_dispatch_stub_53, 53, _dispatch_stub_53@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_53, _dispatch_stub_53@4))
- GL_STUB(_dispatch_stub_54, 54, _dispatch_stub_54@24)
- HIDDEN(GL_PREFIX(_dispatch_stub_54, _dispatch_stub_54@24))
- GL_STUB(_dispatch_stub_55, 55, _dispatch_stub_55@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_55, _dispatch_stub_55@4))
- GL_STUB(Normal3f, 56, Normal3f@12)
- GL_STUB(_dispatch_stub_57, 57, _dispatch_stub_57@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_57, _dispatch_stub_57@4))
- GL_STUB(_dispatch_stub_58, 58, _dispatch_stub_58@12)
- HIDDEN(GL_PREFIX(_dispatch_stub_58, _dispatch_stub_58@12))
- GL_STUB(_dispatch_stub_59, 59, _dispatch_stub_59@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_59, _dispatch_stub_59@4))
- GL_STUB(_dispatch_stub_60, 60, _dispatch_stub_60@12)
- HIDDEN(GL_PREFIX(_dispatch_stub_60, _dispatch_stub_60@12))
- GL_STUB(_dispatch_stub_61, 61, _dispatch_stub_61@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_61, _dispatch_stub_61@4))
- GL_STUB(_dispatch_stub_62, 62, _dispatch_stub_62@16)
- HIDDEN(GL_PREFIX(_dispatch_stub_62, _dispatch_stub_62@16))
- GL_STUB(_dispatch_stub_63, 63, _dispatch_stub_63@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_63, _dispatch_stub_63@4))
- GL_STUB(_dispatch_stub_64, 64, _dispatch_stub_64@8)
- HIDDEN(GL_PREFIX(_dispatch_stub_64, _dispatch_stub_64@8))
- GL_STUB(_dispatch_stub_65, 65, _dispatch_stub_65@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_65, _dispatch_stub_65@4))
- GL_STUB(_dispatch_stub_66, 66, _dispatch_stub_66@8)
- HIDDEN(GL_PREFIX(_dispatch_stub_66, _dispatch_stub_66@8))
- GL_STUB(_dispatch_stub_67, 67, _dispatch_stub_67@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_67, _dispatch_stub_67@4))
- GL_STUB(_dispatch_stub_68, 68, _dispatch_stub_68@8)
- HIDDEN(GL_PREFIX(_dispatch_stub_68, _dispatch_stub_68@8))
- GL_STUB(_dispatch_stub_69, 69, _dispatch_stub_69@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_69, _dispatch_stub_69@4))
- GL_STUB(_dispatch_stub_70, 70, _dispatch_stub_70@24)
- HIDDEN(GL_PREFIX(_dispatch_stub_70, _dispatch_stub_70@24))
- GL_STUB(_dispatch_stub_71, 71, _dispatch_stub_71@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_71, _dispatch_stub_71@4))
- GL_STUB(_dispatch_stub_72, 72, _dispatch_stub_72@12)
- HIDDEN(GL_PREFIX(_dispatch_stub_72, _dispatch_stub_72@12))
- GL_STUB(_dispatch_stub_73, 73, _dispatch_stub_73@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_73, _dispatch_stub_73@4))
- GL_STUB(_dispatch_stub_74, 74, _dispatch_stub_74@12)
- HIDDEN(GL_PREFIX(_dispatch_stub_74, _dispatch_stub_74@12))
- GL_STUB(_dispatch_stub_75, 75, _dispatch_stub_75@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_75, _dispatch_stub_75@4))
- GL_STUB(_dispatch_stub_76, 76, _dispatch_stub_76@12)
- HIDDEN(GL_PREFIX(_dispatch_stub_76, _dispatch_stub_76@12))
- GL_STUB(_dispatch_stub_77, 77, _dispatch_stub_77@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_77, _dispatch_stub_77@4))
- GL_STUB(_dispatch_stub_78, 78, _dispatch_stub_78@32)
- HIDDEN(GL_PREFIX(_dispatch_stub_78, _dispatch_stub_78@32))
- GL_STUB(_dispatch_stub_79, 79, _dispatch_stub_79@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_79, _dispatch_stub_79@4))
- GL_STUB(_dispatch_stub_80, 80, _dispatch_stub_80@16)
- HIDDEN(GL_PREFIX(_dispatch_stub_80, _dispatch_stub_80@16))
- GL_STUB(_dispatch_stub_81, 81, _dispatch_stub_81@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_81, _dispatch_stub_81@4))
- GL_STUB(_dispatch_stub_82, 82, _dispatch_stub_82@16)
- HIDDEN(GL_PREFIX(_dispatch_stub_82, _dispatch_stub_82@16))
- GL_STUB(_dispatch_stub_83, 83, _dispatch_stub_83@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_83, _dispatch_stub_83@4))
- GL_STUB(_dispatch_stub_84, 84, _dispatch_stub_84@16)
- HIDDEN(GL_PREFIX(_dispatch_stub_84, _dispatch_stub_84@16))
- GL_STUB(_dispatch_stub_85, 85, _dispatch_stub_85@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_85, _dispatch_stub_85@4))
- GL_STUB(_dispatch_stub_86, 86, _dispatch_stub_86@32)
- HIDDEN(GL_PREFIX(_dispatch_stub_86, _dispatch_stub_86@32))
- GL_STUB(_dispatch_stub_87, 87, _dispatch_stub_87@8)
- HIDDEN(GL_PREFIX(_dispatch_stub_87, _dispatch_stub_87@8))
- GL_STUB(_dispatch_stub_88, 88, _dispatch_stub_88@16)
- HIDDEN(GL_PREFIX(_dispatch_stub_88, _dispatch_stub_88@16))
- GL_STUB(_dispatch_stub_89, 89, _dispatch_stub_89@8)
- HIDDEN(GL_PREFIX(_dispatch_stub_89, _dispatch_stub_89@8))
- GL_STUB(_dispatch_stub_90, 90, _dispatch_stub_90@16)
- HIDDEN(GL_PREFIX(_dispatch_stub_90, _dispatch_stub_90@16))
- GL_STUB(_dispatch_stub_91, 91, _dispatch_stub_91@8)
- HIDDEN(GL_PREFIX(_dispatch_stub_91, _dispatch_stub_91@8))
- GL_STUB(_dispatch_stub_92, 92, _dispatch_stub_92@16)
- HIDDEN(GL_PREFIX(_dispatch_stub_92, _dispatch_stub_92@16))
- GL_STUB(_dispatch_stub_93, 93, _dispatch_stub_93@8)
- HIDDEN(GL_PREFIX(_dispatch_stub_93, _dispatch_stub_93@8))
- GL_STUB(_dispatch_stub_94, 94, _dispatch_stub_94@8)
- HIDDEN(GL_PREFIX(_dispatch_stub_94, _dispatch_stub_94@8))
- GL_STUB(_dispatch_stub_95, 95, _dispatch_stub_95@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_95, _dispatch_stub_95@4))
- GL_STUB(_dispatch_stub_96, 96, _dispatch_stub_96@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_96, _dispatch_stub_96@4))
- GL_STUB(_dispatch_stub_97, 97, _dispatch_stub_97@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_97, _dispatch_stub_97@4))
- GL_STUB(_dispatch_stub_98, 98, _dispatch_stub_98@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_98, _dispatch_stub_98@4))
- GL_STUB(_dispatch_stub_99, 99, _dispatch_stub_99@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_99, _dispatch_stub_99@4))
- GL_STUB(_dispatch_stub_100, 100, _dispatch_stub_100@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_100, _dispatch_stub_100@4))
- GL_STUB(_dispatch_stub_101, 101, _dispatch_stub_101@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_101, _dispatch_stub_101@4))
- GL_STUB(_dispatch_stub_102, 102, _dispatch_stub_102@16)
- HIDDEN(GL_PREFIX(_dispatch_stub_102, _dispatch_stub_102@16))
- GL_STUB(_dispatch_stub_103, 103, _dispatch_stub_103@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_103, _dispatch_stub_103@4))
- GL_STUB(_dispatch_stub_104, 104, _dispatch_stub_104@8)
- HIDDEN(GL_PREFIX(_dispatch_stub_104, _dispatch_stub_104@8))
- GL_STUB(_dispatch_stub_105, 105, _dispatch_stub_105@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_105, _dispatch_stub_105@4))
- GL_STUB(_dispatch_stub_106, 106, _dispatch_stub_106@8)
- HIDDEN(GL_PREFIX(_dispatch_stub_106, _dispatch_stub_106@8))
- GL_STUB(_dispatch_stub_107, 107, _dispatch_stub_107@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_107, _dispatch_stub_107@4))
- GL_STUB(_dispatch_stub_108, 108, _dispatch_stub_108@8)
- HIDDEN(GL_PREFIX(_dispatch_stub_108, _dispatch_stub_108@8))
- GL_STUB(_dispatch_stub_109, 109, _dispatch_stub_109@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_109, _dispatch_stub_109@4))
- GL_STUB(_dispatch_stub_110, 110, _dispatch_stub_110@24)
- HIDDEN(GL_PREFIX(_dispatch_stub_110, _dispatch_stub_110@24))
- GL_STUB(_dispatch_stub_111, 111, _dispatch_stub_111@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_111, _dispatch_stub_111@4))
- GL_STUB(_dispatch_stub_112, 112, _dispatch_stub_112@12)
- HIDDEN(GL_PREFIX(_dispatch_stub_112, _dispatch_stub_112@12))
- GL_STUB(_dispatch_stub_113, 113, _dispatch_stub_113@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_113, _dispatch_stub_113@4))
- GL_STUB(_dispatch_stub_114, 114, _dispatch_stub_114@12)
- HIDDEN(GL_PREFIX(_dispatch_stub_114, _dispatch_stub_114@12))
- GL_STUB(_dispatch_stub_115, 115, _dispatch_stub_115@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_115, _dispatch_stub_115@4))
- GL_STUB(_dispatch_stub_116, 116, _dispatch_stub_116@12)
- HIDDEN(GL_PREFIX(_dispatch_stub_116, _dispatch_stub_116@12))
- GL_STUB(_dispatch_stub_117, 117, _dispatch_stub_117@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_117, _dispatch_stub_117@4))
- GL_STUB(_dispatch_stub_118, 118, _dispatch_stub_118@32)
- HIDDEN(GL_PREFIX(_dispatch_stub_118, _dispatch_stub_118@32))
- GL_STUB(_dispatch_stub_119, 119, _dispatch_stub_119@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_119, _dispatch_stub_119@4))
- GL_STUB(_dispatch_stub_120, 120, _dispatch_stub_120@16)
- HIDDEN(GL_PREFIX(_dispatch_stub_120, _dispatch_stub_120@16))
- GL_STUB(_dispatch_stub_121, 121, _dispatch_stub_121@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_121, _dispatch_stub_121@4))
- GL_STUB(_dispatch_stub_122, 122, _dispatch_stub_122@16)
- HIDDEN(GL_PREFIX(_dispatch_stub_122, _dispatch_stub_122@16))
- GL_STUB(_dispatch_stub_123, 123, _dispatch_stub_123@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_123, _dispatch_stub_123@4))
- GL_STUB(_dispatch_stub_124, 124, _dispatch_stub_124@16)
- HIDDEN(GL_PREFIX(_dispatch_stub_124, _dispatch_stub_124@16))
- GL_STUB(_dispatch_stub_125, 125, _dispatch_stub_125@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_125, _dispatch_stub_125@4))
- GL_STUB(_dispatch_stub_126, 126, _dispatch_stub_126@16)
- HIDDEN(GL_PREFIX(_dispatch_stub_126, _dispatch_stub_126@16))
- GL_STUB(_dispatch_stub_127, 127, _dispatch_stub_127@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_127, _dispatch_stub_127@4))
- GL_STUB(_dispatch_stub_128, 128, _dispatch_stub_128@8)
- HIDDEN(GL_PREFIX(_dispatch_stub_128, _dispatch_stub_128@8))
- GL_STUB(_dispatch_stub_129, 129, _dispatch_stub_129@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_129, _dispatch_stub_129@4))
- GL_STUB(_dispatch_stub_130, 130, _dispatch_stub_130@8)
- HIDDEN(GL_PREFIX(_dispatch_stub_130, _dispatch_stub_130@8))
- GL_STUB(_dispatch_stub_131, 131, _dispatch_stub_131@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_131, _dispatch_stub_131@4))
- GL_STUB(_dispatch_stub_132, 132, _dispatch_stub_132@8)
- HIDDEN(GL_PREFIX(_dispatch_stub_132, _dispatch_stub_132@8))
- GL_STUB(_dispatch_stub_133, 133, _dispatch_stub_133@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_133, _dispatch_stub_133@4))
- GL_STUB(_dispatch_stub_134, 134, _dispatch_stub_134@24)
- HIDDEN(GL_PREFIX(_dispatch_stub_134, _dispatch_stub_134@24))
- GL_STUB(_dispatch_stub_135, 135, _dispatch_stub_135@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_135, _dispatch_stub_135@4))
- GL_STUB(_dispatch_stub_136, 136, _dispatch_stub_136@12)
- HIDDEN(GL_PREFIX(_dispatch_stub_136, _dispatch_stub_136@12))
- GL_STUB(_dispatch_stub_137, 137, _dispatch_stub_137@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_137, _dispatch_stub_137@4))
- GL_STUB(_dispatch_stub_138, 138, _dispatch_stub_138@12)
- HIDDEN(GL_PREFIX(_dispatch_stub_138, _dispatch_stub_138@12))
- GL_STUB(_dispatch_stub_139, 139, _dispatch_stub_139@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_139, _dispatch_stub_139@4))
- GL_STUB(_dispatch_stub_140, 140, _dispatch_stub_140@12)
- HIDDEN(GL_PREFIX(_dispatch_stub_140, _dispatch_stub_140@12))
- GL_STUB(_dispatch_stub_141, 141, _dispatch_stub_141@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_141, _dispatch_stub_141@4))
- GL_STUB(_dispatch_stub_142, 142, _dispatch_stub_142@32)
- HIDDEN(GL_PREFIX(_dispatch_stub_142, _dispatch_stub_142@32))
- GL_STUB(_dispatch_stub_143, 143, _dispatch_stub_143@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_143, _dispatch_stub_143@4))
- GL_STUB(_dispatch_stub_144, 144, _dispatch_stub_144@16)
- HIDDEN(GL_PREFIX(_dispatch_stub_144, _dispatch_stub_144@16))
- GL_STUB(_dispatch_stub_145, 145, _dispatch_stub_145@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_145, _dispatch_stub_145@4))
- GL_STUB(_dispatch_stub_146, 146, _dispatch_stub_146@16)
- HIDDEN(GL_PREFIX(_dispatch_stub_146, _dispatch_stub_146@16))
- GL_STUB(_dispatch_stub_147, 147, _dispatch_stub_147@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_147, _dispatch_stub_147@4))
- GL_STUB(_dispatch_stub_148, 148, _dispatch_stub_148@16)
- HIDDEN(GL_PREFIX(_dispatch_stub_148, _dispatch_stub_148@16))
- GL_STUB(_dispatch_stub_149, 149, _dispatch_stub_149@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_149, _dispatch_stub_149@4))
- GL_STUB(_dispatch_stub_150, 150, _dispatch_stub_150@8)
- HIDDEN(GL_PREFIX(_dispatch_stub_150, _dispatch_stub_150@8))
- GL_STUB(_dispatch_stub_151, 151, _dispatch_stub_151@8)
- HIDDEN(GL_PREFIX(_dispatch_stub_151, _dispatch_stub_151@8))
- GL_STUB(CullFace, 152, CullFace@4)
- GL_STUB(Fogf, 153, Fogf@8)
- GL_STUB(Fogfv, 154, Fogfv@8)
- GL_STUB(_dispatch_stub_155, 155, _dispatch_stub_155@8)
- HIDDEN(GL_PREFIX(_dispatch_stub_155, _dispatch_stub_155@8))
- GL_STUB(_dispatch_stub_156, 156, _dispatch_stub_156@8)
- HIDDEN(GL_PREFIX(_dispatch_stub_156, _dispatch_stub_156@8))
- GL_STUB(FrontFace, 157, FrontFace@4)
- GL_STUB(Hint, 158, Hint@8)
- GL_STUB(Lightf, 159, Lightf@12)
- GL_STUB(Lightfv, 160, Lightfv@12)
- GL_STUB(_dispatch_stub_161, 161, _dispatch_stub_161@12)
- HIDDEN(GL_PREFIX(_dispatch_stub_161, _dispatch_stub_161@12))
- GL_STUB(_dispatch_stub_162, 162, _dispatch_stub_162@12)
- HIDDEN(GL_PREFIX(_dispatch_stub_162, _dispatch_stub_162@12))
- GL_STUB(LightModelf, 163, LightModelf@8)
- GL_STUB(LightModelfv, 164, LightModelfv@8)
- GL_STUB(_dispatch_stub_165, 165, _dispatch_stub_165@8)
- HIDDEN(GL_PREFIX(_dispatch_stub_165, _dispatch_stub_165@8))
- GL_STUB(_dispatch_stub_166, 166, _dispatch_stub_166@8)
- HIDDEN(GL_PREFIX(_dispatch_stub_166, _dispatch_stub_166@8))
- GL_STUB(_dispatch_stub_167, 167, _dispatch_stub_167@8)
- HIDDEN(GL_PREFIX(_dispatch_stub_167, _dispatch_stub_167@8))
- GL_STUB(LineWidth, 168, LineWidth@4)
- GL_STUB(Materialf, 169, Materialf@12)
- GL_STUB(Materialfv, 170, Materialfv@12)
- GL_STUB(_dispatch_stub_171, 171, _dispatch_stub_171@12)
- HIDDEN(GL_PREFIX(_dispatch_stub_171, _dispatch_stub_171@12))
- GL_STUB(_dispatch_stub_172, 172, _dispatch_stub_172@12)
- HIDDEN(GL_PREFIX(_dispatch_stub_172, _dispatch_stub_172@12))
- GL_STUB(PointSize, 173, PointSize@4)
- GL_STUB(_dispatch_stub_174, 174, _dispatch_stub_174@8)
- HIDDEN(GL_PREFIX(_dispatch_stub_174, _dispatch_stub_174@8))
- GL_STUB(_dispatch_stub_175, 175, _dispatch_stub_175@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_175, _dispatch_stub_175@4))
- GL_STUB(Scissor, 176, Scissor@16)
- GL_STUB(ShadeModel, 177, ShadeModel@4)
- GL_STUB(TexParameterf, 178, TexParameterf@12)
- GL_STUB(TexParameterfv, 179, TexParameterfv@12)
- GL_STUB(TexParameteri, 180, TexParameteri@12)
- GL_STUB(TexParameteriv, 181, TexParameteriv@12)
- GL_STUB(_dispatch_stub_182, 182, _dispatch_stub_182@32)
- HIDDEN(GL_PREFIX(_dispatch_stub_182, _dispatch_stub_182@32))
- GL_STUB(TexImage2D, 183, TexImage2D@36)
- GL_STUB(TexEnvf, 184, TexEnvf@12)
- GL_STUB(TexEnvfv, 185, TexEnvfv@12)
- GL_STUB(TexEnvi, 186, TexEnvi@12)
- GL_STUB(TexEnviv, 187, TexEnviv@12)
- GL_STUB(_dispatch_stub_188, 188, _dispatch_stub_188@16)
- HIDDEN(GL_PREFIX(_dispatch_stub_188, _dispatch_stub_188@16))
- GL_STUB(_dispatch_stub_189, 189, _dispatch_stub_189@12)
- HIDDEN(GL_PREFIX(_dispatch_stub_189, _dispatch_stub_189@12))
- GL_STUB(TexGenfOES, 190, TexGenfOES@12)
- GL_STUB(TexGenfvOES, 191, TexGenfvOES@12)
- GL_STUB(TexGeniOES, 192, TexGeniOES@12)
- GL_STUB(TexGenivOES, 193, TexGenivOES@12)
- GL_STUB(_dispatch_stub_194, 194, _dispatch_stub_194@12)
- HIDDEN(GL_PREFIX(_dispatch_stub_194, _dispatch_stub_194@12))
- GL_STUB(_dispatch_stub_195, 195, _dispatch_stub_195@8)
- HIDDEN(GL_PREFIX(_dispatch_stub_195, _dispatch_stub_195@8))
- GL_STUB(_dispatch_stub_196, 196, _dispatch_stub_196@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_196, _dispatch_stub_196@4))
- GL_STUB(_dispatch_stub_197, 197, _dispatch_stub_197@0)
- HIDDEN(GL_PREFIX(_dispatch_stub_197, _dispatch_stub_197@0))
- GL_STUB(_dispatch_stub_198, 198, _dispatch_stub_198@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_198, _dispatch_stub_198@4))
- GL_STUB(_dispatch_stub_199, 199, _dispatch_stub_199@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_199, _dispatch_stub_199@4))
- GL_STUB(_dispatch_stub_200, 200, _dispatch_stub_200@0)
- HIDDEN(GL_PREFIX(_dispatch_stub_200, _dispatch_stub_200@0))
- GL_STUB(_dispatch_stub_201, 201, _dispatch_stub_201@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_201, _dispatch_stub_201@4))
- GL_STUB(_dispatch_stub_202, 202, _dispatch_stub_202@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_202, _dispatch_stub_202@4))
- GL_STUB(Clear, 203, Clear@4)
- GL_STUB(_dispatch_stub_204, 204, _dispatch_stub_204@16)
- HIDDEN(GL_PREFIX(_dispatch_stub_204, _dispatch_stub_204@16))
- GL_STUB(_dispatch_stub_205, 205, _dispatch_stub_205@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_205, _dispatch_stub_205@4))
- GL_STUB(ClearColor, 206, ClearColor@16)
- GL_STUB(ClearStencil, 207, ClearStencil@4)
- GL_STUB(_dispatch_stub_208, 208, _dispatch_stub_208@8)
- HIDDEN(GL_PREFIX(_dispatch_stub_208, _dispatch_stub_208@8))
- GL_STUB(StencilMask, 209, StencilMask@4)
- GL_STUB(ColorMask, 210, ColorMask@16)
- GL_STUB(DepthMask, 211, DepthMask@4)
- GL_STUB(_dispatch_stub_212, 212, _dispatch_stub_212@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_212, _dispatch_stub_212@4))
- GL_STUB(_dispatch_stub_213, 213, _dispatch_stub_213@8)
- HIDDEN(GL_PREFIX(_dispatch_stub_213, _dispatch_stub_213@8))
- GL_STUB(Disable, 214, Disable@4)
- GL_STUB(Enable, 215, Enable@4)
- GL_STUB(Finish, 216, Finish@0)
- GL_STUB(Flush, 217, Flush@0)
- GL_STUB(_dispatch_stub_218, 218, _dispatch_stub_218@0)
- HIDDEN(GL_PREFIX(_dispatch_stub_218, _dispatch_stub_218@0))
- GL_STUB(_dispatch_stub_219, 219, _dispatch_stub_219@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_219, _dispatch_stub_219@4))
- GL_STUB(_dispatch_stub_220, 220, _dispatch_stub_220@32)
- HIDDEN(GL_PREFIX(_dispatch_stub_220, _dispatch_stub_220@32))
- GL_STUB(_dispatch_stub_221, 221, _dispatch_stub_221@24)
- HIDDEN(GL_PREFIX(_dispatch_stub_221, _dispatch_stub_221@24))
- GL_STUB(_dispatch_stub_222, 222, _dispatch_stub_222@56)
- HIDDEN(GL_PREFIX(_dispatch_stub_222, _dispatch_stub_222@56))
- GL_STUB(_dispatch_stub_223, 223, _dispatch_stub_223@40)
- HIDDEN(GL_PREFIX(_dispatch_stub_223, _dispatch_stub_223@40))
- GL_STUB(_dispatch_stub_224, 224, _dispatch_stub_224@20)
- HIDDEN(GL_PREFIX(_dispatch_stub_224, _dispatch_stub_224@20))
- GL_STUB(_dispatch_stub_225, 225, _dispatch_stub_225@12)
- HIDDEN(GL_PREFIX(_dispatch_stub_225, _dispatch_stub_225@12))
- GL_STUB(_dispatch_stub_226, 226, _dispatch_stub_226@40)
- HIDDEN(GL_PREFIX(_dispatch_stub_226, _dispatch_stub_226@40))
- GL_STUB(_dispatch_stub_227, 227, _dispatch_stub_227@24)
- HIDDEN(GL_PREFIX(_dispatch_stub_227, _dispatch_stub_227@24))
- GL_STUB(_dispatch_stub_228, 228, _dispatch_stub_228@8)
- HIDDEN(GL_PREFIX(_dispatch_stub_228, _dispatch_stub_228@8))
- GL_STUB(_dispatch_stub_229, 229, _dispatch_stub_229@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_229, _dispatch_stub_229@4))
- GL_STUB(_dispatch_stub_230, 230, _dispatch_stub_230@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_230, _dispatch_stub_230@4))
- GL_STUB(_dispatch_stub_231, 231, _dispatch_stub_231@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_231, _dispatch_stub_231@4))
- GL_STUB(_dispatch_stub_232, 232, _dispatch_stub_232@16)
- HIDDEN(GL_PREFIX(_dispatch_stub_232, _dispatch_stub_232@16))
- GL_STUB(_dispatch_stub_233, 233, _dispatch_stub_233@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_233, _dispatch_stub_233@4))
- GL_STUB(_dispatch_stub_234, 234, _dispatch_stub_234@8)
- HIDDEN(GL_PREFIX(_dispatch_stub_234, _dispatch_stub_234@8))
- GL_STUB(_dispatch_stub_235, 235, _dispatch_stub_235@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_235, _dispatch_stub_235@4))
- GL_STUB(_dispatch_stub_236, 236, _dispatch_stub_236@12)
- HIDDEN(GL_PREFIX(_dispatch_stub_236, _dispatch_stub_236@12))
- GL_STUB(_dispatch_stub_237, 237, _dispatch_stub_237@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_237, _dispatch_stub_237@4))
- GL_STUB(_dispatch_stub_238, 238, _dispatch_stub_238@20)
- HIDDEN(GL_PREFIX(_dispatch_stub_238, _dispatch_stub_238@20))
- GL_STUB(_dispatch_stub_239, 239, _dispatch_stub_239@8)
- HIDDEN(GL_PREFIX(_dispatch_stub_239, _dispatch_stub_239@8))
- GL_STUB(AlphaFunc, 240, AlphaFunc@8)
- GL_STUB(BlendFunc, 241, BlendFunc@8)
- GL_STUB(LogicOp, 242, LogicOp@4)
- GL_STUB(StencilFunc, 243, StencilFunc@12)
- GL_STUB(StencilOp, 244, StencilOp@12)
- GL_STUB(DepthFunc, 245, DepthFunc@4)
- GL_STUB(_dispatch_stub_246, 246, _dispatch_stub_246@8)
- HIDDEN(GL_PREFIX(_dispatch_stub_246, _dispatch_stub_246@8))
- GL_STUB(_dispatch_stub_247, 247, _dispatch_stub_247@8)
- HIDDEN(GL_PREFIX(_dispatch_stub_247, _dispatch_stub_247@8))
- GL_STUB(_dispatch_stub_248, 248, _dispatch_stub_248@8)
- HIDDEN(GL_PREFIX(_dispatch_stub_248, _dispatch_stub_248@8))
- GL_STUB(_dispatch_stub_249, 249, _dispatch_stub_249@8)
- HIDDEN(GL_PREFIX(_dispatch_stub_249, _dispatch_stub_249@8))
- GL_STUB(PixelStorei, 250, PixelStorei@8)
- GL_STUB(_dispatch_stub_251, 251, _dispatch_stub_251@12)
- HIDDEN(GL_PREFIX(_dispatch_stub_251, _dispatch_stub_251@12))
- GL_STUB(_dispatch_stub_252, 252, _dispatch_stub_252@12)
- HIDDEN(GL_PREFIX(_dispatch_stub_252, _dispatch_stub_252@12))
- GL_STUB(_dispatch_stub_253, 253, _dispatch_stub_253@12)
- HIDDEN(GL_PREFIX(_dispatch_stub_253, _dispatch_stub_253@12))
- GL_STUB(_dispatch_stub_254, 254, _dispatch_stub_254@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_254, _dispatch_stub_254@4))
- GL_STUB(_dispatch_stub_255, 255, _dispatch_stub_255@20)
- HIDDEN(GL_PREFIX(_dispatch_stub_255, _dispatch_stub_255@20))
- GL_STUB(ReadPixels, 256, ReadPixels@28)
- GL_STUB(_dispatch_stub_257, 257, _dispatch_stub_257@20)
- HIDDEN(GL_PREFIX(_dispatch_stub_257, _dispatch_stub_257@20))
- GL_STUB(GetBooleanv, 258, GetBooleanv@8)
- GL_STUB(_dispatch_stub_259, 259, _dispatch_stub_259@8)
- HIDDEN(GL_PREFIX(_dispatch_stub_259, _dispatch_stub_259@8))
- GL_STUB(_dispatch_stub_260, 260, _dispatch_stub_260@8)
- HIDDEN(GL_PREFIX(_dispatch_stub_260, _dispatch_stub_260@8))
- GL_STUB(GetError, 261, GetError@0)
- GL_STUB(GetFloatv, 262, GetFloatv@8)
- GL_STUB(GetIntegerv, 263, GetIntegerv@8)
- GL_STUB(GetLightfv, 264, GetLightfv@12)
- GL_STUB(_dispatch_stub_265, 265, _dispatch_stub_265@12)
- HIDDEN(GL_PREFIX(_dispatch_stub_265, _dispatch_stub_265@12))
- GL_STUB(_dispatch_stub_266, 266, _dispatch_stub_266@12)
- HIDDEN(GL_PREFIX(_dispatch_stub_266, _dispatch_stub_266@12))
- GL_STUB(_dispatch_stub_267, 267, _dispatch_stub_267@12)
- HIDDEN(GL_PREFIX(_dispatch_stub_267, _dispatch_stub_267@12))
- GL_STUB(_dispatch_stub_268, 268, _dispatch_stub_268@12)
- HIDDEN(GL_PREFIX(_dispatch_stub_268, _dispatch_stub_268@12))
- GL_STUB(GetMaterialfv, 269, GetMaterialfv@12)
- GL_STUB(_dispatch_stub_270, 270, _dispatch_stub_270@12)
- HIDDEN(GL_PREFIX(_dispatch_stub_270, _dispatch_stub_270@12))
- GL_STUB(_dispatch_stub_271, 271, _dispatch_stub_271@8)
- HIDDEN(GL_PREFIX(_dispatch_stub_271, _dispatch_stub_271@8))
- GL_STUB(_dispatch_stub_272, 272, _dispatch_stub_272@8)
- HIDDEN(GL_PREFIX(_dispatch_stub_272, _dispatch_stub_272@8))
- GL_STUB(_dispatch_stub_273, 273, _dispatch_stub_273@8)
- HIDDEN(GL_PREFIX(_dispatch_stub_273, _dispatch_stub_273@8))
- GL_STUB(_dispatch_stub_274, 274, _dispatch_stub_274@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_274, _dispatch_stub_274@4))
- GL_STUB(GetString, 275, GetString@4)
- GL_STUB(GetTexEnvfv, 276, GetTexEnvfv@12)
- GL_STUB(GetTexEnviv, 277, GetTexEnviv@12)
- GL_STUB(_dispatch_stub_278, 278, _dispatch_stub_278@12)
- HIDDEN(GL_PREFIX(_dispatch_stub_278, _dispatch_stub_278@12))
- GL_STUB(GetTexGenfvOES, 279, GetTexGenfvOES@12)
- GL_STUB(GetTexGenivOES, 280, GetTexGenivOES@12)
- GL_STUB(_dispatch_stub_281, 281, _dispatch_stub_281@20)
- HIDDEN(GL_PREFIX(_dispatch_stub_281, _dispatch_stub_281@20))
- GL_STUB(GetTexParameterfv, 282, GetTexParameterfv@12)
- GL_STUB(GetTexParameteriv, 283, GetTexParameteriv@12)
- GL_STUB(_dispatch_stub_284, 284, _dispatch_stub_284@16)
- HIDDEN(GL_PREFIX(_dispatch_stub_284, _dispatch_stub_284@16))
- GL_STUB(_dispatch_stub_285, 285, _dispatch_stub_285@16)
- HIDDEN(GL_PREFIX(_dispatch_stub_285, _dispatch_stub_285@16))
- GL_STUB(IsEnabled, 286, IsEnabled@4)
- GL_STUB(_dispatch_stub_287, 287, _dispatch_stub_287@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_287, _dispatch_stub_287@4))
- GL_STUB(_dispatch_stub_288, 288, _dispatch_stub_288@16)
- HIDDEN(GL_PREFIX(_dispatch_stub_288, _dispatch_stub_288@16))
- GL_STUB(_dispatch_stub_289, 289, _dispatch_stub_289@48)
- HIDDEN(GL_PREFIX(_dispatch_stub_289, _dispatch_stub_289@48))
- GL_STUB(LoadIdentity, 290, LoadIdentity@0)
- GL_STUB(LoadMatrixf, 291, LoadMatrixf@4)
- GL_STUB(_dispatch_stub_292, 292, _dispatch_stub_292@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_292, _dispatch_stub_292@4))
- GL_STUB(MatrixMode, 293, MatrixMode@4)
- GL_STUB(MultMatrixf, 294, MultMatrixf@4)
- GL_STUB(_dispatch_stub_295, 295, _dispatch_stub_295@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_295, _dispatch_stub_295@4))
- GL_STUB(_dispatch_stub_296, 296, _dispatch_stub_296@48)
- HIDDEN(GL_PREFIX(_dispatch_stub_296, _dispatch_stub_296@48))
- GL_STUB(PopMatrix, 297, PopMatrix@0)
- GL_STUB(PushMatrix, 298, PushMatrix@0)
- GL_STUB(_dispatch_stub_299, 299, _dispatch_stub_299@32)
- HIDDEN(GL_PREFIX(_dispatch_stub_299, _dispatch_stub_299@32))
- GL_STUB(Rotatef, 300, Rotatef@16)
- GL_STUB(_dispatch_stub_301, 301, _dispatch_stub_301@24)
- HIDDEN(GL_PREFIX(_dispatch_stub_301, _dispatch_stub_301@24))
- GL_STUB(Scalef, 302, Scalef@12)
- GL_STUB(_dispatch_stub_303, 303, _dispatch_stub_303@24)
- HIDDEN(GL_PREFIX(_dispatch_stub_303, _dispatch_stub_303@24))
- GL_STUB(Translatef, 304, Translatef@12)
- GL_STUB(Viewport, 305, Viewport@16)
- GL_STUB(_dispatch_stub_306, 306, _dispatch_stub_306@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_306, _dispatch_stub_306@4))
- GL_STUB(BindTexture, 307, BindTexture@8)
- GL_STUB(ColorPointer, 308, ColorPointer@16)
- GL_STUB(DisableClientState, 309, DisableClientState@4)
- GL_STUB(DrawArrays, 310, DrawArrays@12)
- GL_STUB(DrawElements, 311, DrawElements@16)
- GL_STUB(_dispatch_stub_312, 312, _dispatch_stub_312@8)
- HIDDEN(GL_PREFIX(_dispatch_stub_312, _dispatch_stub_312@8))
- GL_STUB(EnableClientState, 313, EnableClientState@4)
- GL_STUB(_dispatch_stub_314, 314, _dispatch_stub_314@12)
- HIDDEN(GL_PREFIX(_dispatch_stub_314, _dispatch_stub_314@12))
- GL_STUB(_dispatch_stub_315, 315, _dispatch_stub_315@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_315, _dispatch_stub_315@4))
- GL_STUB(_dispatch_stub_316, 316, _dispatch_stub_316@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_316, _dispatch_stub_316@4))
- GL_STUB(_dispatch_stub_317, 317, _dispatch_stub_317@12)
- HIDDEN(GL_PREFIX(_dispatch_stub_317, _dispatch_stub_317@12))
- GL_STUB(NormalPointer, 318, NormalPointer@12)
- GL_STUB(PolygonOffset, 319, PolygonOffset@8)
- GL_STUB(TexCoordPointer, 320, TexCoordPointer@16)
- GL_STUB(VertexPointer, 321, VertexPointer@16)
- GL_STUB(_dispatch_stub_322, 322, _dispatch_stub_322@12)
- HIDDEN(GL_PREFIX(_dispatch_stub_322, _dispatch_stub_322@12))
- GL_STUB(_dispatch_stub_323, 323, _dispatch_stub_323@28)
- HIDDEN(GL_PREFIX(_dispatch_stub_323, _dispatch_stub_323@28))
- GL_STUB(CopyTexImage2D, 324, CopyTexImage2D@32)
- GL_STUB(_dispatch_stub_325, 325, _dispatch_stub_325@24)
- HIDDEN(GL_PREFIX(_dispatch_stub_325, _dispatch_stub_325@24))
- GL_STUB(CopyTexSubImage2D, 326, CopyTexSubImage2D@32)
- GL_STUB(DeleteTextures, 327, DeleteTextures@8)
- GL_STUB(GenTextures, 328, GenTextures@8)
- GL_STUB(GetPointerv, 329, GetPointerv@8)
- GL_STUB(IsTexture, 330, IsTexture@4)
- GL_STUB(_dispatch_stub_331, 331, _dispatch_stub_331@12)
- HIDDEN(GL_PREFIX(_dispatch_stub_331, _dispatch_stub_331@12))
- GL_STUB(_dispatch_stub_332, 332, _dispatch_stub_332@28)
- HIDDEN(GL_PREFIX(_dispatch_stub_332, _dispatch_stub_332@28))
- GL_STUB(TexSubImage2D, 333, TexSubImage2D@36)
- GL_STUB(_dispatch_stub_334, 334, _dispatch_stub_334@0)
- HIDDEN(GL_PREFIX(_dispatch_stub_334, _dispatch_stub_334@0))
- GL_STUB(_dispatch_stub_335, 335, _dispatch_stub_335@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_335, _dispatch_stub_335@4))
- GL_STUB(_dispatch_stub_336, 336, _dispatch_stub_336@16)
- HIDDEN(GL_PREFIX(_dispatch_stub_336, _dispatch_stub_336@16))
- GL_STUB(BlendEquationOES, 337, BlendEquationOES@4)
- GL_STUB(_dispatch_stub_338, 338, _dispatch_stub_338@24)
- HIDDEN(GL_PREFIX(_dispatch_stub_338, _dispatch_stub_338@24))
- GL_STUB(_dispatch_stub_339, 339, _dispatch_stub_339@24)
- HIDDEN(GL_PREFIX(_dispatch_stub_339, _dispatch_stub_339@24))
- GL_STUB(_dispatch_stub_340, 340, _dispatch_stub_340@12)
- HIDDEN(GL_PREFIX(_dispatch_stub_340, _dispatch_stub_340@12))
- GL_STUB(_dispatch_stub_341, 341, _dispatch_stub_341@12)
- HIDDEN(GL_PREFIX(_dispatch_stub_341, _dispatch_stub_341@12))
- GL_STUB(_dispatch_stub_342, 342, _dispatch_stub_342@20)
- HIDDEN(GL_PREFIX(_dispatch_stub_342, _dispatch_stub_342@20))
- GL_STUB(_dispatch_stub_343, 343, _dispatch_stub_343@16)
- HIDDEN(GL_PREFIX(_dispatch_stub_343, _dispatch_stub_343@16))
- GL_STUB(_dispatch_stub_344, 344, _dispatch_stub_344@12)
- HIDDEN(GL_PREFIX(_dispatch_stub_344, _dispatch_stub_344@12))
- GL_STUB(_dispatch_stub_345, 345, _dispatch_stub_345@12)
- HIDDEN(GL_PREFIX(_dispatch_stub_345, _dispatch_stub_345@12))
- GL_STUB(_dispatch_stub_346, 346, _dispatch_stub_346@24)
- HIDDEN(GL_PREFIX(_dispatch_stub_346, _dispatch_stub_346@24))
- GL_STUB(_dispatch_stub_347, 347, _dispatch_stub_347@20)
- HIDDEN(GL_PREFIX(_dispatch_stub_347, _dispatch_stub_347@20))
- GL_STUB(_dispatch_stub_348, 348, _dispatch_stub_348@24)
- HIDDEN(GL_PREFIX(_dispatch_stub_348, _dispatch_stub_348@24))
- GL_STUB(_dispatch_stub_349, 349, _dispatch_stub_349@28)
- HIDDEN(GL_PREFIX(_dispatch_stub_349, _dispatch_stub_349@28))
- GL_STUB(_dispatch_stub_350, 350, _dispatch_stub_350@12)
- HIDDEN(GL_PREFIX(_dispatch_stub_350, _dispatch_stub_350@12))
- GL_STUB(_dispatch_stub_351, 351, _dispatch_stub_351@12)
- HIDDEN(GL_PREFIX(_dispatch_stub_351, _dispatch_stub_351@12))
- GL_STUB(_dispatch_stub_352, 352, _dispatch_stub_352@12)
- HIDDEN(GL_PREFIX(_dispatch_stub_352, _dispatch_stub_352@12))
- GL_STUB(_dispatch_stub_353, 353, _dispatch_stub_353@12)
- HIDDEN(GL_PREFIX(_dispatch_stub_353, _dispatch_stub_353@12))
- GL_STUB(_dispatch_stub_354, 354, _dispatch_stub_354@20)
- HIDDEN(GL_PREFIX(_dispatch_stub_354, _dispatch_stub_354@20))
- GL_STUB(_dispatch_stub_355, 355, _dispatch_stub_355@24)
- HIDDEN(GL_PREFIX(_dispatch_stub_355, _dispatch_stub_355@24))
- GL_STUB(_dispatch_stub_356, 356, _dispatch_stub_356@16)
- HIDDEN(GL_PREFIX(_dispatch_stub_356, _dispatch_stub_356@16))
- GL_STUB(_dispatch_stub_357, 357, _dispatch_stub_357@12)
- HIDDEN(GL_PREFIX(_dispatch_stub_357, _dispatch_stub_357@12))
- GL_STUB(_dispatch_stub_358, 358, _dispatch_stub_358@12)
- HIDDEN(GL_PREFIX(_dispatch_stub_358, _dispatch_stub_358@12))
- GL_STUB(_dispatch_stub_359, 359, _dispatch_stub_359@24)
- HIDDEN(GL_PREFIX(_dispatch_stub_359, _dispatch_stub_359@24))
- GL_STUB(_dispatch_stub_360, 360, _dispatch_stub_360@32)
- HIDDEN(GL_PREFIX(_dispatch_stub_360, _dispatch_stub_360@32))
- GL_STUB(_dispatch_stub_361, 361, _dispatch_stub_361@20)
- HIDDEN(GL_PREFIX(_dispatch_stub_361, _dispatch_stub_361@20))
- GL_STUB(_dispatch_stub_362, 362, _dispatch_stub_362@12)
- HIDDEN(GL_PREFIX(_dispatch_stub_362, _dispatch_stub_362@12))
- GL_STUB(_dispatch_stub_363, 363, _dispatch_stub_363@12)
- HIDDEN(GL_PREFIX(_dispatch_stub_363, _dispatch_stub_363@12))
- GL_STUB(_dispatch_stub_364, 364, _dispatch_stub_364@20)
- HIDDEN(GL_PREFIX(_dispatch_stub_364, _dispatch_stub_364@20))
- GL_STUB(_dispatch_stub_365, 365, _dispatch_stub_365@12)
- HIDDEN(GL_PREFIX(_dispatch_stub_365, _dispatch_stub_365@12))
- GL_STUB(_dispatch_stub_366, 366, _dispatch_stub_366@12)
- HIDDEN(GL_PREFIX(_dispatch_stub_366, _dispatch_stub_366@12))
- GL_STUB(_dispatch_stub_367, 367, _dispatch_stub_367@16)
- HIDDEN(GL_PREFIX(_dispatch_stub_367, _dispatch_stub_367@16))
- GL_STUB(_dispatch_stub_368, 368, _dispatch_stub_368@12)
- HIDDEN(GL_PREFIX(_dispatch_stub_368, _dispatch_stub_368@12))
- GL_STUB(_dispatch_stub_369, 369, _dispatch_stub_369@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_369, _dispatch_stub_369@4))
- GL_STUB(_dispatch_stub_370, 370, _dispatch_stub_370@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_370, _dispatch_stub_370@4))
- GL_STUB(_dispatch_stub_371, 371, _dispatch_stub_371@40)
- HIDDEN(GL_PREFIX(_dispatch_stub_371, _dispatch_stub_371@40))
- GL_STUB(_dispatch_stub_372, 372, _dispatch_stub_372@44)
- HIDDEN(GL_PREFIX(_dispatch_stub_372, _dispatch_stub_372@44))
- GL_STUB(_dispatch_stub_373, 373, _dispatch_stub_373@36)
- HIDDEN(GL_PREFIX(_dispatch_stub_373, _dispatch_stub_373@36))
- GL_STUB(ActiveTexture, 374, ActiveTexture@4)
- GL_STUB(ClientActiveTexture, 375, ClientActiveTexture@4)
- GL_STUB(_dispatch_stub_376, 376, _dispatch_stub_376@12)
- HIDDEN(GL_PREFIX(_dispatch_stub_376, _dispatch_stub_376@12))
- GL_STUB(_dispatch_stub_377, 377, _dispatch_stub_377@8)
- HIDDEN(GL_PREFIX(_dispatch_stub_377, _dispatch_stub_377@8))
- GL_STUB(_dispatch_stub_378, 378, _dispatch_stub_378@8)
- HIDDEN(GL_PREFIX(_dispatch_stub_378, _dispatch_stub_378@8))
- GL_STUB(_dispatch_stub_379, 379, _dispatch_stub_379@8)
- HIDDEN(GL_PREFIX(_dispatch_stub_379, _dispatch_stub_379@8))
- GL_STUB(_dispatch_stub_380, 380, _dispatch_stub_380@8)
- HIDDEN(GL_PREFIX(_dispatch_stub_380, _dispatch_stub_380@8))
- GL_STUB(_dispatch_stub_381, 381, _dispatch_stub_381@8)
- HIDDEN(GL_PREFIX(_dispatch_stub_381, _dispatch_stub_381@8))
- GL_STUB(_dispatch_stub_382, 382, _dispatch_stub_382@8)
- HIDDEN(GL_PREFIX(_dispatch_stub_382, _dispatch_stub_382@8))
- GL_STUB(_dispatch_stub_383, 383, _dispatch_stub_383@8)
- HIDDEN(GL_PREFIX(_dispatch_stub_383, _dispatch_stub_383@8))
- GL_STUB(_dispatch_stub_384, 384, _dispatch_stub_384@20)
- HIDDEN(GL_PREFIX(_dispatch_stub_384, _dispatch_stub_384@20))
- GL_STUB(_dispatch_stub_385, 385, _dispatch_stub_385@8)
- HIDDEN(GL_PREFIX(_dispatch_stub_385, _dispatch_stub_385@8))
- GL_STUB(_dispatch_stub_386, 386, _dispatch_stub_386@12)
- HIDDEN(GL_PREFIX(_dispatch_stub_386, _dispatch_stub_386@12))
- GL_STUB(_dispatch_stub_387, 387, _dispatch_stub_387@8)
- HIDDEN(GL_PREFIX(_dispatch_stub_387, _dispatch_stub_387@8))
- GL_STUB(_dispatch_stub_388, 388, _dispatch_stub_388@12)
- HIDDEN(GL_PREFIX(_dispatch_stub_388, _dispatch_stub_388@12))
- GL_STUB(_dispatch_stub_389, 389, _dispatch_stub_389@8)
- HIDDEN(GL_PREFIX(_dispatch_stub_389, _dispatch_stub_389@8))
- GL_STUB(_dispatch_stub_390, 390, _dispatch_stub_390@12)
- HIDDEN(GL_PREFIX(_dispatch_stub_390, _dispatch_stub_390@12))
- GL_STUB(_dispatch_stub_391, 391, _dispatch_stub_391@8)
- HIDDEN(GL_PREFIX(_dispatch_stub_391, _dispatch_stub_391@8))
- GL_STUB(_dispatch_stub_392, 392, _dispatch_stub_392@28)
- HIDDEN(GL_PREFIX(_dispatch_stub_392, _dispatch_stub_392@28))
- GL_STUB(_dispatch_stub_393, 393, _dispatch_stub_393@8)
- HIDDEN(GL_PREFIX(_dispatch_stub_393, _dispatch_stub_393@8))
- GL_STUB(_dispatch_stub_394, 394, _dispatch_stub_394@16)
- HIDDEN(GL_PREFIX(_dispatch_stub_394, _dispatch_stub_394@16))
- GL_STUB(_dispatch_stub_395, 395, _dispatch_stub_395@8)
- HIDDEN(GL_PREFIX(_dispatch_stub_395, _dispatch_stub_395@8))
- GL_STUB(_dispatch_stub_396, 396, _dispatch_stub_396@16)
- HIDDEN(GL_PREFIX(_dispatch_stub_396, _dispatch_stub_396@16))
- GL_STUB(_dispatch_stub_397, 397, _dispatch_stub_397@8)
- HIDDEN(GL_PREFIX(_dispatch_stub_397, _dispatch_stub_397@8))
- GL_STUB(_dispatch_stub_398, 398, _dispatch_stub_398@16)
- HIDDEN(GL_PREFIX(_dispatch_stub_398, _dispatch_stub_398@16))
- GL_STUB(_dispatch_stub_399, 399, _dispatch_stub_399@8)
- HIDDEN(GL_PREFIX(_dispatch_stub_399, _dispatch_stub_399@8))
- GL_STUB(_dispatch_stub_400, 400, _dispatch_stub_400@36)
- HIDDEN(GL_PREFIX(_dispatch_stub_400, _dispatch_stub_400@36))
- GL_STUB(_dispatch_stub_401, 401, _dispatch_stub_401@8)
- HIDDEN(GL_PREFIX(_dispatch_stub_401, _dispatch_stub_401@8))
- GL_STUB(MultiTexCoord4f, 402, MultiTexCoord4f@20)
- GL_STUB(_dispatch_stub_403, 403, _dispatch_stub_403@8)
- HIDDEN(GL_PREFIX(_dispatch_stub_403, _dispatch_stub_403@8))
- GL_STUB(_dispatch_stub_404, 404, _dispatch_stub_404@20)
- HIDDEN(GL_PREFIX(_dispatch_stub_404, _dispatch_stub_404@20))
- GL_STUB(_dispatch_stub_405, 405, _dispatch_stub_405@8)
- HIDDEN(GL_PREFIX(_dispatch_stub_405, _dispatch_stub_405@8))
- GL_STUB(_dispatch_stub_406, 406, _dispatch_stub_406@20)
- HIDDEN(GL_PREFIX(_dispatch_stub_406, _dispatch_stub_406@20))
- GL_STUB(_dispatch_stub_407, 407, _dispatch_stub_407@8)
- HIDDEN(GL_PREFIX(_dispatch_stub_407, _dispatch_stub_407@8))
- GL_STUB(BlendEquationSeparateOES, 408, BlendEquationSeparateOES@8)
- GL_STUB(BlendFuncSeparateOES, 409, BlendFuncSeparateOES@16)
- GL_STUB(DrawTexfOES, 410, DrawTexfOES@20)
- GL_STUB(DrawTexfvOES, 411, DrawTexfvOES@4)
- GL_STUB(DrawTexiOES, 412, DrawTexiOES@20)
- GL_STUB(DrawTexivOES, 413, DrawTexivOES@4)
- GL_STUB(DrawTexsOES, 414, DrawTexsOES@20)
- GL_STUB(DrawTexsvOES, 415, DrawTexsvOES@4)
- GL_STUB(DrawTexxOES, 416, DrawTexxOES@20)
- GL_STUB(DrawTexxvOES, 417, DrawTexxvOES@4)
- GL_STUB(BindFramebufferOES, 418, BindFramebufferOES@8)
- GL_STUB(BindRenderbufferOES, 419, BindRenderbufferOES@8)
- GL_STUB(CheckFramebufferStatusOES, 420, CheckFramebufferStatusOES@4)
- GL_STUB(DeleteFramebuffersOES, 421, DeleteFramebuffersOES@8)
- GL_STUB(DeleteRenderbuffersOES, 422, DeleteRenderbuffersOES@8)
- GL_STUB(FramebufferRenderbufferOES, 423, FramebufferRenderbufferOES@16)
- GL_STUB(FramebufferTexture2DOES, 424, FramebufferTexture2DOES@20)
- GL_STUB(GenFramebuffersOES, 425, GenFramebuffersOES@8)
- GL_STUB(GenRenderbuffersOES, 426, GenRenderbuffersOES@8)
- GL_STUB(GenerateMipmapOES, 427, GenerateMipmapOES@4)
- GL_STUB(GetFramebufferAttachmentParameterivOES, 428, GetFramebufferAttachmentParameterivOES@16)
- GL_STUB(GetRenderbufferParameterivOES, 429, GetRenderbufferParameterivOES@12)
- GL_STUB(IsFramebufferOES, 430, IsFramebufferOES@4)
- GL_STUB(IsRenderbufferOES, 431, IsRenderbufferOES@4)
- GL_STUB(RenderbufferStorageOES, 432, RenderbufferStorageOES@16)
- GL_STUB(PointSizePointerOES, 433, PointSizePointerOES@12)
- GL_STUB(QueryMatrixxOES, 434, QueryMatrixxOES@8)
- GL_STUB(GetTexGenxvOES, 435, GetTexGenxvOES@12)
- GL_STUB(TexGenxOES, 436, TexGenxOES@12)
- GL_STUB(TexGenxvOES, 437, TexGenxvOES@12)
- GL_STUB(GetBufferPointervOES, 438, GetBufferPointervOES@12)
- GL_STUB(MapBufferOES, 439, MapBufferOES@8)
- GL_STUB(UnmapBufferOES, 440, UnmapBufferOES@4)
- GL_STUB(MultiDrawArraysEXT, 441, MultiDrawArraysEXT@16)
- GL_STUB(MultiDrawElementsEXT, 442, MultiDrawElementsEXT@20)
- GL_STUB(_dispatch_stub_443, 443, _dispatch_stub_443@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_443, _dispatch_stub_443@4))
- GL_STUB(_dispatch_stub_444, 444, _dispatch_stub_444@8)
- HIDDEN(GL_PREFIX(_dispatch_stub_444, _dispatch_stub_444@8))
- GL_STUB(_dispatch_stub_445, 445, _dispatch_stub_445@8)
- HIDDEN(GL_PREFIX(_dispatch_stub_445, _dispatch_stub_445@8))
- GL_STUB(_dispatch_stub_446, 446, _dispatch_stub_446@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_446, _dispatch_stub_446@4))
- GL_STUB(EGLImageTargetRenderbufferStorageOES, 447, EGLImageTargetRenderbufferStorageOES@8)
- GL_STUB(EGLImageTargetTexture2DOES, 448, EGLImageTargetTexture2DOES@8)
- GL_STUB(CompressedTexImage2D, 449, CompressedTexImage2D@32)
- GL_STUB(CompressedTexSubImage2D, 450, CompressedTexSubImage2D@36)
- GL_STUB(SampleCoverage, 451, SampleCoverage@8)
- GL_STUB(BindBuffer, 452, BindBuffer@8)
- GL_STUB(BufferData, 453, BufferData@16)
- GL_STUB(BufferSubData, 454, BufferSubData@16)
- GL_STUB(DeleteBuffers, 455, DeleteBuffers@8)
- GL_STUB(GenBuffers, 456, GenBuffers@8)
- GL_STUB(GetBufferParameteriv, 457, GetBufferParameteriv@12)
- GL_STUB(IsBuffer, 458, IsBuffer@4)
- GL_STUB(PointParameterf, 459, PointParameterf@8)
- GL_STUB(PointParameterfv, 460, PointParameterfv@8)
- GL_STUB(AlphaFuncx, 461, AlphaFuncx@8)
- GL_STUB(ClearColorx, 462, ClearColorx@16)
- GL_STUB(ClearDepthf, 463, ClearDepthf@4)
- GL_STUB(ClearDepthx, 464, ClearDepthx@4)
- GL_STUB(Color4x, 465, Color4x@16)
- GL_STUB(DepthRangef, 466, DepthRangef@8)
- GL_STUB(DepthRangex, 467, DepthRangex@8)
- GL_STUB(Fogx, 468, Fogx@8)
- GL_STUB(Fogxv, 469, Fogxv@8)
- GL_STUB(Frustumf, 470, Frustumf@24)
- GL_STUB(Frustumx, 471, Frustumx@24)
- GL_STUB(LightModelx, 472, LightModelx@8)
- GL_STUB(LightModelxv, 473, LightModelxv@8)
- GL_STUB(Lightx, 474, Lightx@12)
- GL_STUB(Lightxv, 475, Lightxv@12)
- GL_STUB(LineWidthx, 476, LineWidthx@4)
- GL_STUB(LoadMatrixx, 477, LoadMatrixx@4)
- GL_STUB(Materialx, 478, Materialx@12)
- GL_STUB(Materialxv, 479, Materialxv@12)
- GL_STUB(MultMatrixx, 480, MultMatrixx@4)
- GL_STUB(MultiTexCoord4x, 481, MultiTexCoord4x@20)
- GL_STUB(Normal3x, 482, Normal3x@12)
- GL_STUB(Orthof, 483, Orthof@24)
- GL_STUB(Orthox, 484, Orthox@24)
- GL_STUB(PointSizex, 485, PointSizex@4)
- GL_STUB(PolygonOffsetx, 486, PolygonOffsetx@8)
- GL_STUB(Rotatex, 487, Rotatex@16)
- GL_STUB(SampleCoveragex, 488, SampleCoveragex@8)
- GL_STUB(Scalex, 489, Scalex@12)
- GL_STUB(TexEnvx, 490, TexEnvx@12)
- GL_STUB(TexEnvxv, 491, TexEnvxv@12)
- GL_STUB(TexParameterx, 492, TexParameterx@12)
- GL_STUB(Translatex, 493, Translatex@12)
- GL_STUB(ClipPlanef, 494, ClipPlanef@8)
- GL_STUB(ClipPlanex, 495, ClipPlanex@8)
- GL_STUB(GetClipPlanef, 496, GetClipPlanef@8)
- GL_STUB(GetClipPlanex, 497, GetClipPlanex@8)
- GL_STUB(GetFixedv, 498, GetFixedv@8)
- GL_STUB(GetLightxv, 499, GetLightxv@12)
- GL_STUB(GetMaterialxv, 500, GetMaterialxv@12)
- GL_STUB(GetTexEnvxv, 501, GetTexEnvxv@12)
- GL_STUB(GetTexParameterxv, 502, GetTexParameterxv@12)
- GL_STUB(PointParameterx, 503, PointParameterx@8)
- GL_STUB(PointParameterxv, 504, PointParameterxv@8)
- GL_STUB(TexParameterxv, 505, TexParameterxv@12)
- GL_STUB_ALIAS(AlphaFuncxOES, 461, AlphaFuncxOES@8, AlphaFuncx, AlphaFuncx@8)
- GL_STUB_ALIAS(ClearColorxOES, 462, ClearColorxOES@16, ClearColorx, ClearColorx@16)
- GL_STUB_ALIAS(ClearDepthfOES, 463, ClearDepthfOES@4, ClearDepthf, ClearDepthf@4)
- GL_STUB_ALIAS(ClearDepthxOES, 464, ClearDepthxOES@4, ClearDepthx, ClearDepthx@4)
- GL_STUB_ALIAS(Color4xOES, 465, Color4xOES@16, Color4x, Color4x@16)
- GL_STUB_ALIAS(DepthRangefOES, 466, DepthRangefOES@8, DepthRangef, DepthRangef@8)
- GL_STUB_ALIAS(DepthRangexOES, 467, DepthRangexOES@8, DepthRangex, DepthRangex@8)
- GL_STUB_ALIAS(FogxOES, 468, FogxOES@8, Fogx, Fogx@8)
- GL_STUB_ALIAS(FogxvOES, 469, FogxvOES@8, Fogxv, Fogxv@8)
- GL_STUB_ALIAS(FrustumfOES, 470, FrustumfOES@24, Frustumf, Frustumf@24)
- GL_STUB_ALIAS(FrustumxOES, 471, FrustumxOES@24, Frustumx, Frustumx@24)
- GL_STUB_ALIAS(LightModelxOES, 472, LightModelxOES@8, LightModelx, LightModelx@8)
- GL_STUB_ALIAS(LightModelxvOES, 473, LightModelxvOES@8, LightModelxv, LightModelxv@8)
- GL_STUB_ALIAS(LightxOES, 474, LightxOES@12, Lightx, Lightx@12)
- GL_STUB_ALIAS(LightxvOES, 475, LightxvOES@12, Lightxv, Lightxv@12)
- GL_STUB_ALIAS(LineWidthxOES, 476, LineWidthxOES@4, LineWidthx, LineWidthx@4)
- GL_STUB_ALIAS(LoadMatrixxOES, 477, LoadMatrixxOES@4, LoadMatrixx, LoadMatrixx@4)
- GL_STUB_ALIAS(MaterialxOES, 478, MaterialxOES@12, Materialx, Materialx@12)
- GL_STUB_ALIAS(MaterialxvOES, 479, MaterialxvOES@12, Materialxv, Materialxv@12)
- GL_STUB_ALIAS(MultMatrixxOES, 480, MultMatrixxOES@4, MultMatrixx, MultMatrixx@4)
- GL_STUB_ALIAS(MultiTexCoord4xOES, 481, MultiTexCoord4xOES@20, MultiTexCoord4x, MultiTexCoord4x@20)
- GL_STUB_ALIAS(Normal3xOES, 482, Normal3xOES@12, Normal3x, Normal3x@12)
- GL_STUB_ALIAS(OrthofOES, 483, OrthofOES@24, Orthof, Orthof@24)
- GL_STUB_ALIAS(OrthoxOES, 484, OrthoxOES@24, Orthox, Orthox@24)
- GL_STUB_ALIAS(PointSizexOES, 485, PointSizexOES@4, PointSizex, PointSizex@4)
- GL_STUB_ALIAS(PolygonOffsetxOES, 486, PolygonOffsetxOES@8, PolygonOffsetx, PolygonOffsetx@8)
- GL_STUB_ALIAS(RotatexOES, 487, RotatexOES@16, Rotatex, Rotatex@16)
- GL_STUB_ALIAS(SampleCoveragexOES, 488, SampleCoveragexOES@8, SampleCoveragex, SampleCoveragex@8)
- GL_STUB_ALIAS(ScalexOES, 489, ScalexOES@12, Scalex, Scalex@12)
- GL_STUB_ALIAS(TexEnvxOES, 490, TexEnvxOES@12, TexEnvx, TexEnvx@12)
- GL_STUB_ALIAS(TexEnvxvOES, 491, TexEnvxvOES@12, TexEnvxv, TexEnvxv@12)
- GL_STUB_ALIAS(TexParameterxOES, 492, TexParameterxOES@12, TexParameterx, TexParameterx@12)
- GL_STUB_ALIAS(TranslatexOES, 493, TranslatexOES@12, Translatex, Translatex@12)
- GL_STUB_ALIAS(ClipPlanefOES, 494, ClipPlanefOES@8, ClipPlanef, ClipPlanef@8)
- GL_STUB_ALIAS(ClipPlanexOES, 495, ClipPlanexOES@8, ClipPlanex, ClipPlanex@8)
- GL_STUB_ALIAS(GetClipPlanefOES, 496, GetClipPlanefOES@8, GetClipPlanef, GetClipPlanef@8)
- GL_STUB_ALIAS(GetClipPlanexOES, 497, GetClipPlanexOES@8, GetClipPlanex, GetClipPlanex@8)
- GL_STUB_ALIAS(GetFixedvOES, 498, GetFixedvOES@8, GetFixedv, GetFixedv@8)
- GL_STUB_ALIAS(GetLightxvOES, 499, GetLightxvOES@12, GetLightxv, GetLightxv@12)
- GL_STUB_ALIAS(GetMaterialxvOES, 500, GetMaterialxvOES@12, GetMaterialxv, GetMaterialxv@12)
- GL_STUB_ALIAS(GetTexEnvxvOES, 501, GetTexEnvxvOES@12, GetTexEnvxv, GetTexEnvxv@12)
- GL_STUB_ALIAS(GetTexParameterxvOES, 502, GetTexParameterxvOES@12, GetTexParameterxv, GetTexParameterxv@12)
- GL_STUB_ALIAS(PointParameterxOES, 503, PointParameterxOES@8, PointParameterx, PointParameterx@8)
- GL_STUB_ALIAS(PointParameterxvOES, 504, PointParameterxvOES@8, PointParameterxv, PointParameterxv@8)
- GL_STUB_ALIAS(TexParameterxvOES, 505, TexParameterxvOES@12, TexParameterxv, TexParameterxv@12)
-
- GLOBL GLNAME(gl_dispatch_functions_end)
- HIDDEN(GLNAME(gl_dispatch_functions_end))
- ALIGNTEXT16
-GLNAME(gl_dispatch_functions_end):
-
-#if defined(GLX_USE_TLS) && defined(__linux__)
- .section ".note.ABI-tag", "a"
- .p2align 2
- .long 1f - 0f /* name length */
- .long 3f - 2f /* data length */
- .long 1 /* note length */
-0: .asciz "GNU" /* vendor name */
-1: .p2align 2
-2: .long 0 /* note data: the ABI tag */
- .long 2,4,20 /* Minimum kernel version w/TLS */
-3: .p2align 2 /* pad out section */
-#endif /* GLX_USE_TLS */
-
-#if defined (__ELF__) && defined (__linux__)
- .section .note.GNU-stack,"",%progbits
-#endif
diff --git a/src/mapi/es1api/glapi/glapitable.h b/src/mapi/es1api/glapi/glapitable.h
deleted file mode 100644
index ea3f519484c..00000000000
--- a/src/mapi/es1api/glapi/glapitable.h
+++ /dev/null
@@ -1,551 +0,0 @@
-/* DO NOT EDIT - This file generated automatically by gl_table.py (from Mesa) script */
-
-/*
- * Copyright (C) 1999-2003 Brian Paul All Rights Reserved.
- * (C) Copyright IBM Corporation 2004
- * 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
- * BRIAN PAUL, IBM,
- * AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
- * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-#if !defined( _GLAPI_TABLE_H_ )
-# define _GLAPI_TABLE_H_
-
-#ifndef GLAPIENTRYP
-# ifndef GLAPIENTRY
-# define GLAPIENTRY
-# endif
-
-# define GLAPIENTRYP GLAPIENTRY *
-#endif
-
-
-struct _glapi_table
-{
- void (GLAPIENTRYP NewList)(GLuint list, GLenum mode); /* 0 */
- void (GLAPIENTRYP EndList)(void); /* 1 */
- void (GLAPIENTRYP CallList)(GLuint list); /* 2 */
- void (GLAPIENTRYP CallLists)(GLsizei n, GLenum type, const GLvoid * lists); /* 3 */
- void (GLAPIENTRYP DeleteLists)(GLuint list, GLsizei range); /* 4 */
- GLuint (GLAPIENTRYP GenLists)(GLsizei range); /* 5 */
- void (GLAPIENTRYP ListBase)(GLuint base); /* 6 */
- void (GLAPIENTRYP Begin)(GLenum mode); /* 7 */
- void (GLAPIENTRYP Bitmap)(GLsizei width, GLsizei height, GLfloat xorig, GLfloat yorig, GLfloat xmove, GLfloat ymove, const GLubyte * bitmap); /* 8 */
- void (GLAPIENTRYP Color3b)(GLbyte red, GLbyte green, GLbyte blue); /* 9 */
- void (GLAPIENTRYP Color3bv)(const GLbyte * v); /* 10 */
- void (GLAPIENTRYP Color3d)(GLdouble red, GLdouble green, GLdouble blue); /* 11 */
- void (GLAPIENTRYP Color3dv)(const GLdouble * v); /* 12 */
- void (GLAPIENTRYP Color3f)(GLfloat red, GLfloat green, GLfloat blue); /* 13 */
- void (GLAPIENTRYP Color3fv)(const GLfloat * v); /* 14 */
- void (GLAPIENTRYP Color3i)(GLint red, GLint green, GLint blue); /* 15 */
- void (GLAPIENTRYP Color3iv)(const GLint * v); /* 16 */
- void (GLAPIENTRYP Color3s)(GLshort red, GLshort green, GLshort blue); /* 17 */
- void (GLAPIENTRYP Color3sv)(const GLshort * v); /* 18 */
- void (GLAPIENTRYP Color3ub)(GLubyte red, GLubyte green, GLubyte blue); /* 19 */
- void (GLAPIENTRYP Color3ubv)(const GLubyte * v); /* 20 */
- void (GLAPIENTRYP Color3ui)(GLuint red, GLuint green, GLuint blue); /* 21 */
- void (GLAPIENTRYP Color3uiv)(const GLuint * v); /* 22 */
- void (GLAPIENTRYP Color3us)(GLushort red, GLushort green, GLushort blue); /* 23 */
- void (GLAPIENTRYP Color3usv)(const GLushort * v); /* 24 */
- void (GLAPIENTRYP Color4b)(GLbyte red, GLbyte green, GLbyte blue, GLbyte alpha); /* 25 */
- void (GLAPIENTRYP Color4bv)(const GLbyte * v); /* 26 */
- void (GLAPIENTRYP Color4d)(GLdouble red, GLdouble green, GLdouble blue, GLdouble alpha); /* 27 */
- void (GLAPIENTRYP Color4dv)(const GLdouble * v); /* 28 */
- void (GLAPIENTRYP Color4f)(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); /* 29 */
- void (GLAPIENTRYP Color4fv)(const GLfloat * v); /* 30 */
- void (GLAPIENTRYP Color4i)(GLint red, GLint green, GLint blue, GLint alpha); /* 31 */
- void (GLAPIENTRYP Color4iv)(const GLint * v); /* 32 */
- void (GLAPIENTRYP Color4s)(GLshort red, GLshort green, GLshort blue, GLshort alpha); /* 33 */
- void (GLAPIENTRYP Color4sv)(const GLshort * v); /* 34 */
- void (GLAPIENTRYP Color4ub)(GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha); /* 35 */
- void (GLAPIENTRYP Color4ubv)(const GLubyte * v); /* 36 */
- void (GLAPIENTRYP Color4ui)(GLuint red, GLuint green, GLuint blue, GLuint alpha); /* 37 */
- void (GLAPIENTRYP Color4uiv)(const GLuint * v); /* 38 */
- void (GLAPIENTRYP Color4us)(GLushort red, GLushort green, GLushort blue, GLushort alpha); /* 39 */
- void (GLAPIENTRYP Color4usv)(const GLushort * v); /* 40 */
- void (GLAPIENTRYP EdgeFlag)(GLboolean flag); /* 41 */
- void (GLAPIENTRYP EdgeFlagv)(const GLboolean * flag); /* 42 */
- void (GLAPIENTRYP End)(void); /* 43 */
- void (GLAPIENTRYP Indexd)(GLdouble c); /* 44 */
- void (GLAPIENTRYP Indexdv)(const GLdouble * c); /* 45 */
- void (GLAPIENTRYP Indexf)(GLfloat c); /* 46 */
- void (GLAPIENTRYP Indexfv)(const GLfloat * c); /* 47 */
- void (GLAPIENTRYP Indexi)(GLint c); /* 48 */
- void (GLAPIENTRYP Indexiv)(const GLint * c); /* 49 */
- void (GLAPIENTRYP Indexs)(GLshort c); /* 50 */
- void (GLAPIENTRYP Indexsv)(const GLshort * c); /* 51 */
- void (GLAPIENTRYP Normal3b)(GLbyte nx, GLbyte ny, GLbyte nz); /* 52 */
- void (GLAPIENTRYP Normal3bv)(const GLbyte * v); /* 53 */
- void (GLAPIENTRYP Normal3d)(GLdouble nx, GLdouble ny, GLdouble nz); /* 54 */
- void (GLAPIENTRYP Normal3dv)(const GLdouble * v); /* 55 */
- void (GLAPIENTRYP Normal3f)(GLfloat nx, GLfloat ny, GLfloat nz); /* 56 */
- void (GLAPIENTRYP Normal3fv)(const GLfloat * v); /* 57 */
- void (GLAPIENTRYP Normal3i)(GLint nx, GLint ny, GLint nz); /* 58 */
- void (GLAPIENTRYP Normal3iv)(const GLint * v); /* 59 */
- void (GLAPIENTRYP Normal3s)(GLshort nx, GLshort ny, GLshort nz); /* 60 */
- void (GLAPIENTRYP Normal3sv)(const GLshort * v); /* 61 */
- void (GLAPIENTRYP RasterPos2d)(GLdouble x, GLdouble y); /* 62 */
- void (GLAPIENTRYP RasterPos2dv)(const GLdouble * v); /* 63 */
- void (GLAPIENTRYP RasterPos2f)(GLfloat x, GLfloat y); /* 64 */
- void (GLAPIENTRYP RasterPos2fv)(const GLfloat * v); /* 65 */
- void (GLAPIENTRYP RasterPos2i)(GLint x, GLint y); /* 66 */
- void (GLAPIENTRYP RasterPos2iv)(const GLint * v); /* 67 */
- void (GLAPIENTRYP RasterPos2s)(GLshort x, GLshort y); /* 68 */
- void (GLAPIENTRYP RasterPos2sv)(const GLshort * v); /* 69 */
- void (GLAPIENTRYP RasterPos3d)(GLdouble x, GLdouble y, GLdouble z); /* 70 */
- void (GLAPIENTRYP RasterPos3dv)(const GLdouble * v); /* 71 */
- void (GLAPIENTRYP RasterPos3f)(GLfloat x, GLfloat y, GLfloat z); /* 72 */
- void (GLAPIENTRYP RasterPos3fv)(const GLfloat * v); /* 73 */
- void (GLAPIENTRYP RasterPos3i)(GLint x, GLint y, GLint z); /* 74 */
- void (GLAPIENTRYP RasterPos3iv)(const GLint * v); /* 75 */
- void (GLAPIENTRYP RasterPos3s)(GLshort x, GLshort y, GLshort z); /* 76 */
- void (GLAPIENTRYP RasterPos3sv)(const GLshort * v); /* 77 */
- void (GLAPIENTRYP RasterPos4d)(GLdouble x, GLdouble y, GLdouble z, GLdouble w); /* 78 */
- void (GLAPIENTRYP RasterPos4dv)(const GLdouble * v); /* 79 */
- void (GLAPIENTRYP RasterPos4f)(GLfloat x, GLfloat y, GLfloat z, GLfloat w); /* 80 */
- void (GLAPIENTRYP RasterPos4fv)(const GLfloat * v); /* 81 */
- void (GLAPIENTRYP RasterPos4i)(GLint x, GLint y, GLint z, GLint w); /* 82 */
- void (GLAPIENTRYP RasterPos4iv)(const GLint * v); /* 83 */
- void (GLAPIENTRYP RasterPos4s)(GLshort x, GLshort y, GLshort z, GLshort w); /* 84 */
- void (GLAPIENTRYP RasterPos4sv)(const GLshort * v); /* 85 */
- void (GLAPIENTRYP Rectd)(GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2); /* 86 */
- void (GLAPIENTRYP Rectdv)(const GLdouble * v1, const GLdouble * v2); /* 87 */
- void (GLAPIENTRYP Rectf)(GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2); /* 88 */
- void (GLAPIENTRYP Rectfv)(const GLfloat * v1, const GLfloat * v2); /* 89 */
- void (GLAPIENTRYP Recti)(GLint x1, GLint y1, GLint x2, GLint y2); /* 90 */
- void (GLAPIENTRYP Rectiv)(const GLint * v1, const GLint * v2); /* 91 */
- void (GLAPIENTRYP Rects)(GLshort x1, GLshort y1, GLshort x2, GLshort y2); /* 92 */
- void (GLAPIENTRYP Rectsv)(const GLshort * v1, const GLshort * v2); /* 93 */
- void (GLAPIENTRYP TexCoord1d)(GLdouble s); /* 94 */
- void (GLAPIENTRYP TexCoord1dv)(const GLdouble * v); /* 95 */
- void (GLAPIENTRYP TexCoord1f)(GLfloat s); /* 96 */
- void (GLAPIENTRYP TexCoord1fv)(const GLfloat * v); /* 97 */
- void (GLAPIENTRYP TexCoord1i)(GLint s); /* 98 */
- void (GLAPIENTRYP TexCoord1iv)(const GLint * v); /* 99 */
- void (GLAPIENTRYP TexCoord1s)(GLshort s); /* 100 */
- void (GLAPIENTRYP TexCoord1sv)(const GLshort * v); /* 101 */
- void (GLAPIENTRYP TexCoord2d)(GLdouble s, GLdouble t); /* 102 */
- void (GLAPIENTRYP TexCoord2dv)(const GLdouble * v); /* 103 */
- void (GLAPIENTRYP TexCoord2f)(GLfloat s, GLfloat t); /* 104 */
- void (GLAPIENTRYP TexCoord2fv)(const GLfloat * v); /* 105 */
- void (GLAPIENTRYP TexCoord2i)(GLint s, GLint t); /* 106 */
- void (GLAPIENTRYP TexCoord2iv)(const GLint * v); /* 107 */
- void (GLAPIENTRYP TexCoord2s)(GLshort s, GLshort t); /* 108 */
- void (GLAPIENTRYP TexCoord2sv)(const GLshort * v); /* 109 */
- void (GLAPIENTRYP TexCoord3d)(GLdouble s, GLdouble t, GLdouble r); /* 110 */
- void (GLAPIENTRYP TexCoord3dv)(const GLdouble * v); /* 111 */
- void (GLAPIENTRYP TexCoord3f)(GLfloat s, GLfloat t, GLfloat r); /* 112 */
- void (GLAPIENTRYP TexCoord3fv)(const GLfloat * v); /* 113 */
- void (GLAPIENTRYP TexCoord3i)(GLint s, GLint t, GLint r); /* 114 */
- void (GLAPIENTRYP TexCoord3iv)(const GLint * v); /* 115 */
- void (GLAPIENTRYP TexCoord3s)(GLshort s, GLshort t, GLshort r); /* 116 */
- void (GLAPIENTRYP TexCoord3sv)(const GLshort * v); /* 117 */
- void (GLAPIENTRYP TexCoord4d)(GLdouble s, GLdouble t, GLdouble r, GLdouble q); /* 118 */
- void (GLAPIENTRYP TexCoord4dv)(const GLdouble * v); /* 119 */
- void (GLAPIENTRYP TexCoord4f)(GLfloat s, GLfloat t, GLfloat r, GLfloat q); /* 120 */
- void (GLAPIENTRYP TexCoord4fv)(const GLfloat * v); /* 121 */
- void (GLAPIENTRYP TexCoord4i)(GLint s, GLint t, GLint r, GLint q); /* 122 */
- void (GLAPIENTRYP TexCoord4iv)(const GLint * v); /* 123 */
- void (GLAPIENTRYP TexCoord4s)(GLshort s, GLshort t, GLshort r, GLshort q); /* 124 */
- void (GLAPIENTRYP TexCoord4sv)(const GLshort * v); /* 125 */
- void (GLAPIENTRYP Vertex2d)(GLdouble x, GLdouble y); /* 126 */
- void (GLAPIENTRYP Vertex2dv)(const GLdouble * v); /* 127 */
- void (GLAPIENTRYP Vertex2f)(GLfloat x, GLfloat y); /* 128 */
- void (GLAPIENTRYP Vertex2fv)(const GLfloat * v); /* 129 */
- void (GLAPIENTRYP Vertex2i)(GLint x, GLint y); /* 130 */
- void (GLAPIENTRYP Vertex2iv)(const GLint * v); /* 131 */
- void (GLAPIENTRYP Vertex2s)(GLshort x, GLshort y); /* 132 */
- void (GLAPIENTRYP Vertex2sv)(const GLshort * v); /* 133 */
- void (GLAPIENTRYP Vertex3d)(GLdouble x, GLdouble y, GLdouble z); /* 134 */
- void (GLAPIENTRYP Vertex3dv)(const GLdouble * v); /* 135 */
- void (GLAPIENTRYP Vertex3f)(GLfloat x, GLfloat y, GLfloat z); /* 136 */
- void (GLAPIENTRYP Vertex3fv)(const GLfloat * v); /* 137 */
- void (GLAPIENTRYP Vertex3i)(GLint x, GLint y, GLint z); /* 138 */
- void (GLAPIENTRYP Vertex3iv)(const GLint * v); /* 139 */
- void (GLAPIENTRYP Vertex3s)(GLshort x, GLshort y, GLshort z); /* 140 */
- void (GLAPIENTRYP Vertex3sv)(const GLshort * v); /* 141 */
- void (GLAPIENTRYP Vertex4d)(GLdouble x, GLdouble y, GLdouble z, GLdouble w); /* 142 */
- void (GLAPIENTRYP Vertex4dv)(const GLdouble * v); /* 143 */
- void (GLAPIENTRYP Vertex4f)(GLfloat x, GLfloat y, GLfloat z, GLfloat w); /* 144 */
- void (GLAPIENTRYP Vertex4fv)(const GLfloat * v); /* 145 */
- void (GLAPIENTRYP Vertex4i)(GLint x, GLint y, GLint z, GLint w); /* 146 */
- void (GLAPIENTRYP Vertex4iv)(const GLint * v); /* 147 */
- void (GLAPIENTRYP Vertex4s)(GLshort x, GLshort y, GLshort z, GLshort w); /* 148 */
- void (GLAPIENTRYP Vertex4sv)(const GLshort * v); /* 149 */
- void (GLAPIENTRYP ClipPlane)(GLenum plane, const GLdouble * equation); /* 150 */
- void (GLAPIENTRYP ColorMaterial)(GLenum face, GLenum mode); /* 151 */
- void (GLAPIENTRYP CullFace)(GLenum mode); /* 152 */
- void (GLAPIENTRYP Fogf)(GLenum pname, GLfloat param); /* 153 */
- void (GLAPIENTRYP Fogfv)(GLenum pname, const GLfloat * params); /* 154 */
- void (GLAPIENTRYP Fogi)(GLenum pname, GLint param); /* 155 */
- void (GLAPIENTRYP Fogiv)(GLenum pname, const GLint * params); /* 156 */
- void (GLAPIENTRYP FrontFace)(GLenum mode); /* 157 */
- void (GLAPIENTRYP Hint)(GLenum target, GLenum mode); /* 158 */
- void (GLAPIENTRYP Lightf)(GLenum light, GLenum pname, GLfloat param); /* 159 */
- void (GLAPIENTRYP Lightfv)(GLenum light, GLenum pname, const GLfloat * params); /* 160 */
- void (GLAPIENTRYP Lighti)(GLenum light, GLenum pname, GLint param); /* 161 */
- void (GLAPIENTRYP Lightiv)(GLenum light, GLenum pname, const GLint * params); /* 162 */
- void (GLAPIENTRYP LightModelf)(GLenum pname, GLfloat param); /* 163 */
- void (GLAPIENTRYP LightModelfv)(GLenum pname, const GLfloat * params); /* 164 */
- void (GLAPIENTRYP LightModeli)(GLenum pname, GLint param); /* 165 */
- void (GLAPIENTRYP LightModeliv)(GLenum pname, const GLint * params); /* 166 */
- void (GLAPIENTRYP LineStipple)(GLint factor, GLushort pattern); /* 167 */
- void (GLAPIENTRYP LineWidth)(GLfloat width); /* 168 */
- void (GLAPIENTRYP Materialf)(GLenum face, GLenum pname, GLfloat param); /* 169 */
- void (GLAPIENTRYP Materialfv)(GLenum face, GLenum pname, const GLfloat * params); /* 170 */
- void (GLAPIENTRYP Materiali)(GLenum face, GLenum pname, GLint param); /* 171 */
- void (GLAPIENTRYP Materialiv)(GLenum face, GLenum pname, const GLint * params); /* 172 */
- void (GLAPIENTRYP PointSize)(GLfloat size); /* 173 */
- void (GLAPIENTRYP PolygonMode)(GLenum face, GLenum mode); /* 174 */
- void (GLAPIENTRYP PolygonStipple)(const GLubyte * mask); /* 175 */
- void (GLAPIENTRYP Scissor)(GLint x, GLint y, GLsizei width, GLsizei height); /* 176 */
- void (GLAPIENTRYP ShadeModel)(GLenum mode); /* 177 */
- void (GLAPIENTRYP TexParameterf)(GLenum target, GLenum pname, GLfloat param); /* 178 */
- void (GLAPIENTRYP TexParameterfv)(GLenum target, GLenum pname, const GLfloat * params); /* 179 */
- void (GLAPIENTRYP TexParameteri)(GLenum target, GLenum pname, GLint param); /* 180 */
- void (GLAPIENTRYP TexParameteriv)(GLenum target, GLenum pname, const GLint * params); /* 181 */
- void (GLAPIENTRYP TexImage1D)(GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid * pixels); /* 182 */
- void (GLAPIENTRYP TexImage2D)(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid * pixels); /* 183 */
- void (GLAPIENTRYP TexEnvf)(GLenum target, GLenum pname, GLfloat param); /* 184 */
- void (GLAPIENTRYP TexEnvfv)(GLenum target, GLenum pname, const GLfloat * params); /* 185 */
- void (GLAPIENTRYP TexEnvi)(GLenum target, GLenum pname, GLint param); /* 186 */
- void (GLAPIENTRYP TexEnviv)(GLenum target, GLenum pname, const GLint * params); /* 187 */
- void (GLAPIENTRYP TexGend)(GLenum coord, GLenum pname, GLdouble param); /* 188 */
- void (GLAPIENTRYP TexGendv)(GLenum coord, GLenum pname, const GLdouble * params); /* 189 */
- void (GLAPIENTRYP TexGenfOES)(GLenum coord, GLenum pname, GLfloat param); /* 190 */
- void (GLAPIENTRYP TexGenfvOES)(GLenum coord, GLenum pname, const GLfloat * params); /* 191 */
- void (GLAPIENTRYP TexGeniOES)(GLenum coord, GLenum pname, GLint param); /* 192 */
- void (GLAPIENTRYP TexGenivOES)(GLenum coord, GLenum pname, const GLint * params); /* 193 */
- void (GLAPIENTRYP FeedbackBuffer)(GLsizei size, GLenum type, GLfloat * buffer); /* 194 */
- void (GLAPIENTRYP SelectBuffer)(GLsizei size, GLuint * buffer); /* 195 */
- GLint (GLAPIENTRYP RenderMode)(GLenum mode); /* 196 */
- void (GLAPIENTRYP InitNames)(void); /* 197 */
- void (GLAPIENTRYP LoadName)(GLuint name); /* 198 */
- void (GLAPIENTRYP PassThrough)(GLfloat token); /* 199 */
- void (GLAPIENTRYP PopName)(void); /* 200 */
- void (GLAPIENTRYP PushName)(GLuint name); /* 201 */
- void (GLAPIENTRYP DrawBuffer)(GLenum mode); /* 202 */
- void (GLAPIENTRYP Clear)(GLbitfield mask); /* 203 */
- void (GLAPIENTRYP ClearAccum)(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); /* 204 */
- void (GLAPIENTRYP ClearIndex)(GLfloat c); /* 205 */
- void (GLAPIENTRYP ClearColor)(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); /* 206 */
- void (GLAPIENTRYP ClearStencil)(GLint s); /* 207 */
- void (GLAPIENTRYP ClearDepth)(GLclampd depth); /* 208 */
- void (GLAPIENTRYP StencilMask)(GLuint mask); /* 209 */
- void (GLAPIENTRYP ColorMask)(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha); /* 210 */
- void (GLAPIENTRYP DepthMask)(GLboolean flag); /* 211 */
- void (GLAPIENTRYP IndexMask)(GLuint mask); /* 212 */
- void (GLAPIENTRYP Accum)(GLenum op, GLfloat value); /* 213 */
- void (GLAPIENTRYP Disable)(GLenum cap); /* 214 */
- void (GLAPIENTRYP Enable)(GLenum cap); /* 215 */
- void (GLAPIENTRYP Finish)(void); /* 216 */
- void (GLAPIENTRYP Flush)(void); /* 217 */
- void (GLAPIENTRYP PopAttrib)(void); /* 218 */
- void (GLAPIENTRYP PushAttrib)(GLbitfield mask); /* 219 */
- void (GLAPIENTRYP Map1d)(GLenum target, GLdouble u1, GLdouble u2, GLint stride, GLint order, const GLdouble * points); /* 220 */
- void (GLAPIENTRYP Map1f)(GLenum target, GLfloat u1, GLfloat u2, GLint stride, GLint order, const GLfloat * points); /* 221 */
- void (GLAPIENTRYP Map2d)(GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, const GLdouble * points); /* 222 */
- void (GLAPIENTRYP Map2f)(GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, const GLfloat * points); /* 223 */
- void (GLAPIENTRYP MapGrid1d)(GLint un, GLdouble u1, GLdouble u2); /* 224 */
- void (GLAPIENTRYP MapGrid1f)(GLint un, GLfloat u1, GLfloat u2); /* 225 */
- void (GLAPIENTRYP MapGrid2d)(GLint un, GLdouble u1, GLdouble u2, GLint vn, GLdouble v1, GLdouble v2); /* 226 */
- void (GLAPIENTRYP MapGrid2f)(GLint un, GLfloat u1, GLfloat u2, GLint vn, GLfloat v1, GLfloat v2); /* 227 */
- void (GLAPIENTRYP EvalCoord1d)(GLdouble u); /* 228 */
- void (GLAPIENTRYP EvalCoord1dv)(const GLdouble * u); /* 229 */
- void (GLAPIENTRYP EvalCoord1f)(GLfloat u); /* 230 */
- void (GLAPIENTRYP EvalCoord1fv)(const GLfloat * u); /* 231 */
- void (GLAPIENTRYP EvalCoord2d)(GLdouble u, GLdouble v); /* 232 */
- void (GLAPIENTRYP EvalCoord2dv)(const GLdouble * u); /* 233 */
- void (GLAPIENTRYP EvalCoord2f)(GLfloat u, GLfloat v); /* 234 */
- void (GLAPIENTRYP EvalCoord2fv)(const GLfloat * u); /* 235 */
- void (GLAPIENTRYP EvalMesh1)(GLenum mode, GLint i1, GLint i2); /* 236 */
- void (GLAPIENTRYP EvalPoint1)(GLint i); /* 237 */
- void (GLAPIENTRYP EvalMesh2)(GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2); /* 238 */
- void (GLAPIENTRYP EvalPoint2)(GLint i, GLint j); /* 239 */
- void (GLAPIENTRYP AlphaFunc)(GLenum func, GLclampf ref); /* 240 */
- void (GLAPIENTRYP BlendFunc)(GLenum sfactor, GLenum dfactor); /* 241 */
- void (GLAPIENTRYP LogicOp)(GLenum opcode); /* 242 */
- void (GLAPIENTRYP StencilFunc)(GLenum func, GLint ref, GLuint mask); /* 243 */
- void (GLAPIENTRYP StencilOp)(GLenum fail, GLenum zfail, GLenum zpass); /* 244 */
- void (GLAPIENTRYP DepthFunc)(GLenum func); /* 245 */
- void (GLAPIENTRYP PixelZoom)(GLfloat xfactor, GLfloat yfactor); /* 246 */
- void (GLAPIENTRYP PixelTransferf)(GLenum pname, GLfloat param); /* 247 */
- void (GLAPIENTRYP PixelTransferi)(GLenum pname, GLint param); /* 248 */
- void (GLAPIENTRYP PixelStoref)(GLenum pname, GLfloat param); /* 249 */
- void (GLAPIENTRYP PixelStorei)(GLenum pname, GLint param); /* 250 */
- void (GLAPIENTRYP PixelMapfv)(GLenum map, GLsizei mapsize, const GLfloat * values); /* 251 */
- void (GLAPIENTRYP PixelMapuiv)(GLenum map, GLsizei mapsize, const GLuint * values); /* 252 */
- void (GLAPIENTRYP PixelMapusv)(GLenum map, GLsizei mapsize, const GLushort * values); /* 253 */
- void (GLAPIENTRYP ReadBuffer)(GLenum mode); /* 254 */
- void (GLAPIENTRYP CopyPixels)(GLint x, GLint y, GLsizei width, GLsizei height, GLenum type); /* 255 */
- void (GLAPIENTRYP ReadPixels)(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid * pixels); /* 256 */
- void (GLAPIENTRYP DrawPixels)(GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid * pixels); /* 257 */
- void (GLAPIENTRYP GetBooleanv)(GLenum pname, GLboolean * params); /* 258 */
- void (GLAPIENTRYP GetClipPlane)(GLenum plane, GLdouble * equation); /* 259 */
- void (GLAPIENTRYP GetDoublev)(GLenum pname, GLdouble * params); /* 260 */
- GLenum (GLAPIENTRYP GetError)(void); /* 261 */
- void (GLAPIENTRYP GetFloatv)(GLenum pname, GLfloat * params); /* 262 */
- void (GLAPIENTRYP GetIntegerv)(GLenum pname, GLint * params); /* 263 */
- void (GLAPIENTRYP GetLightfv)(GLenum light, GLenum pname, GLfloat * params); /* 264 */
- void (GLAPIENTRYP GetLightiv)(GLenum light, GLenum pname, GLint * params); /* 265 */
- void (GLAPIENTRYP GetMapdv)(GLenum target, GLenum query, GLdouble * v); /* 266 */
- void (GLAPIENTRYP GetMapfv)(GLenum target, GLenum query, GLfloat * v); /* 267 */
- void (GLAPIENTRYP GetMapiv)(GLenum target, GLenum query, GLint * v); /* 268 */
- void (GLAPIENTRYP GetMaterialfv)(GLenum face, GLenum pname, GLfloat * params); /* 269 */
- void (GLAPIENTRYP GetMaterialiv)(GLenum face, GLenum pname, GLint * params); /* 270 */
- void (GLAPIENTRYP GetPixelMapfv)(GLenum map, GLfloat * values); /* 271 */
- void (GLAPIENTRYP GetPixelMapuiv)(GLenum map, GLuint * values); /* 272 */
- void (GLAPIENTRYP GetPixelMapusv)(GLenum map, GLushort * values); /* 273 */
- void (GLAPIENTRYP GetPolygonStipple)(GLubyte * mask); /* 274 */
- const GLubyte * (GLAPIENTRYP GetString)(GLenum name); /* 275 */
- void (GLAPIENTRYP GetTexEnvfv)(GLenum target, GLenum pname, GLfloat * params); /* 276 */
- void (GLAPIENTRYP GetTexEnviv)(GLenum target, GLenum pname, GLint * params); /* 277 */
- void (GLAPIENTRYP GetTexGendv)(GLenum coord, GLenum pname, GLdouble * params); /* 278 */
- void (GLAPIENTRYP GetTexGenfvOES)(GLenum coord, GLenum pname, GLfloat * params); /* 279 */
- void (GLAPIENTRYP GetTexGenivOES)(GLenum coord, GLenum pname, GLint * params); /* 280 */
- void (GLAPIENTRYP GetTexImage)(GLenum target, GLint level, GLenum format, GLenum type, GLvoid * pixels); /* 281 */
- void (GLAPIENTRYP GetTexParameterfv)(GLenum target, GLenum pname, GLfloat * params); /* 282 */
- void (GLAPIENTRYP GetTexParameteriv)(GLenum target, GLenum pname, GLint * params); /* 283 */
- void (GLAPIENTRYP GetTexLevelParameterfv)(GLenum target, GLint level, GLenum pname, GLfloat * params); /* 284 */
- void (GLAPIENTRYP GetTexLevelParameteriv)(GLenum target, GLint level, GLenum pname, GLint * params); /* 285 */
- GLboolean (GLAPIENTRYP IsEnabled)(GLenum cap); /* 286 */
- GLboolean (GLAPIENTRYP IsList)(GLuint list); /* 287 */
- void (GLAPIENTRYP DepthRange)(GLclampd zNear, GLclampd zFar); /* 288 */
- void (GLAPIENTRYP Frustum)(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar); /* 289 */
- void (GLAPIENTRYP LoadIdentity)(void); /* 290 */
- void (GLAPIENTRYP LoadMatrixf)(const GLfloat * m); /* 291 */
- void (GLAPIENTRYP LoadMatrixd)(const GLdouble * m); /* 292 */
- void (GLAPIENTRYP MatrixMode)(GLenum mode); /* 293 */
- void (GLAPIENTRYP MultMatrixf)(const GLfloat * m); /* 294 */
- void (GLAPIENTRYP MultMatrixd)(const GLdouble * m); /* 295 */
- void (GLAPIENTRYP Ortho)(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar); /* 296 */
- void (GLAPIENTRYP PopMatrix)(void); /* 297 */
- void (GLAPIENTRYP PushMatrix)(void); /* 298 */
- void (GLAPIENTRYP Rotated)(GLdouble angle, GLdouble x, GLdouble y, GLdouble z); /* 299 */
- void (GLAPIENTRYP Rotatef)(GLfloat angle, GLfloat x, GLfloat y, GLfloat z); /* 300 */
- void (GLAPIENTRYP Scaled)(GLdouble x, GLdouble y, GLdouble z); /* 301 */
- void (GLAPIENTRYP Scalef)(GLfloat x, GLfloat y, GLfloat z); /* 302 */
- void (GLAPIENTRYP Translated)(GLdouble x, GLdouble y, GLdouble z); /* 303 */
- void (GLAPIENTRYP Translatef)(GLfloat x, GLfloat y, GLfloat z); /* 304 */
- void (GLAPIENTRYP Viewport)(GLint x, GLint y, GLsizei width, GLsizei height); /* 305 */
- void (GLAPIENTRYP ArrayElement)(GLint i); /* 306 */
- void (GLAPIENTRYP BindTexture)(GLenum target, GLuint texture); /* 307 */
- void (GLAPIENTRYP ColorPointer)(GLint size, GLenum type, GLsizei stride, const GLvoid * pointer); /* 308 */
- void (GLAPIENTRYP DisableClientState)(GLenum array); /* 309 */
- void (GLAPIENTRYP DrawArrays)(GLenum mode, GLint first, GLsizei count); /* 310 */
- void (GLAPIENTRYP DrawElements)(GLenum mode, GLsizei count, GLenum type, const GLvoid * indices); /* 311 */
- void (GLAPIENTRYP EdgeFlagPointer)(GLsizei stride, const GLvoid * pointer); /* 312 */
- void (GLAPIENTRYP EnableClientState)(GLenum array); /* 313 */
- void (GLAPIENTRYP IndexPointer)(GLenum type, GLsizei stride, const GLvoid * pointer); /* 314 */
- void (GLAPIENTRYP Indexub)(GLubyte c); /* 315 */
- void (GLAPIENTRYP Indexubv)(const GLubyte * c); /* 316 */
- void (GLAPIENTRYP InterleavedArrays)(GLenum format, GLsizei stride, const GLvoid * pointer); /* 317 */
- void (GLAPIENTRYP NormalPointer)(GLenum type, GLsizei stride, const GLvoid * pointer); /* 318 */
- void (GLAPIENTRYP PolygonOffset)(GLfloat factor, GLfloat units); /* 319 */
- void (GLAPIENTRYP TexCoordPointer)(GLint size, GLenum type, GLsizei stride, const GLvoid * pointer); /* 320 */
- void (GLAPIENTRYP VertexPointer)(GLint size, GLenum type, GLsizei stride, const GLvoid * pointer); /* 321 */
- GLboolean (GLAPIENTRYP AreTexturesResident)(GLsizei n, const GLuint * textures, GLboolean * residences); /* 322 */
- void (GLAPIENTRYP CopyTexImage1D)(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border); /* 323 */
- void (GLAPIENTRYP CopyTexImage2D)(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); /* 324 */
- void (GLAPIENTRYP CopyTexSubImage1D)(GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width); /* 325 */
- void (GLAPIENTRYP CopyTexSubImage2D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); /* 326 */
- void (GLAPIENTRYP DeleteTextures)(GLsizei n, const GLuint * textures); /* 327 */
- void (GLAPIENTRYP GenTextures)(GLsizei n, GLuint * textures); /* 328 */
- void (GLAPIENTRYP GetPointerv)(GLenum pname, GLvoid ** params); /* 329 */
- GLboolean (GLAPIENTRYP IsTexture)(GLuint texture); /* 330 */
- void (GLAPIENTRYP PrioritizeTextures)(GLsizei n, const GLuint * textures, const GLclampf * priorities); /* 331 */
- void (GLAPIENTRYP TexSubImage1D)(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid * pixels); /* 332 */
- void (GLAPIENTRYP TexSubImage2D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid * pixels); /* 333 */
- void (GLAPIENTRYP PopClientAttrib)(void); /* 334 */
- void (GLAPIENTRYP PushClientAttrib)(GLbitfield mask); /* 335 */
- void (GLAPIENTRYP BlendColor)(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); /* 336 */
- void (GLAPIENTRYP BlendEquationOES)(GLenum mode); /* 337 */
- void (GLAPIENTRYP DrawRangeElements)(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid * indices); /* 338 */
- void (GLAPIENTRYP ColorTable)(GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid * table); /* 339 */
- void (GLAPIENTRYP ColorTableParameterfv)(GLenum target, GLenum pname, const GLfloat * params); /* 340 */
- void (GLAPIENTRYP ColorTableParameteriv)(GLenum target, GLenum pname, const GLint * params); /* 341 */
- void (GLAPIENTRYP CopyColorTable)(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); /* 342 */
- void (GLAPIENTRYP GetColorTable)(GLenum target, GLenum format, GLenum type, GLvoid * table); /* 343 */
- void (GLAPIENTRYP GetColorTableParameterfv)(GLenum target, GLenum pname, GLfloat * params); /* 344 */
- void (GLAPIENTRYP GetColorTableParameteriv)(GLenum target, GLenum pname, GLint * params); /* 345 */
- void (GLAPIENTRYP ColorSubTable)(GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid * data); /* 346 */
- void (GLAPIENTRYP CopyColorSubTable)(GLenum target, GLsizei start, GLint x, GLint y, GLsizei width); /* 347 */
- void (GLAPIENTRYP ConvolutionFilter1D)(GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid * image); /* 348 */
- void (GLAPIENTRYP ConvolutionFilter2D)(GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid * image); /* 349 */
- void (GLAPIENTRYP ConvolutionParameterf)(GLenum target, GLenum pname, GLfloat params); /* 350 */
- void (GLAPIENTRYP ConvolutionParameterfv)(GLenum target, GLenum pname, const GLfloat * params); /* 351 */
- void (GLAPIENTRYP ConvolutionParameteri)(GLenum target, GLenum pname, GLint params); /* 352 */
- void (GLAPIENTRYP ConvolutionParameteriv)(GLenum target, GLenum pname, const GLint * params); /* 353 */
- void (GLAPIENTRYP CopyConvolutionFilter1D)(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); /* 354 */
- void (GLAPIENTRYP CopyConvolutionFilter2D)(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height); /* 355 */
- void (GLAPIENTRYP GetConvolutionFilter)(GLenum target, GLenum format, GLenum type, GLvoid * image); /* 356 */
- void (GLAPIENTRYP GetConvolutionParameterfv)(GLenum target, GLenum pname, GLfloat * params); /* 357 */
- void (GLAPIENTRYP GetConvolutionParameteriv)(GLenum target, GLenum pname, GLint * params); /* 358 */
- void (GLAPIENTRYP GetSeparableFilter)(GLenum target, GLenum format, GLenum type, GLvoid * row, GLvoid * column, GLvoid * span); /* 359 */
- void (GLAPIENTRYP SeparableFilter2D)(GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid * row, const GLvoid * column); /* 360 */
- void (GLAPIENTRYP GetHistogram)(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid * values); /* 361 */
- void (GLAPIENTRYP GetHistogramParameterfv)(GLenum target, GLenum pname, GLfloat * params); /* 362 */
- void (GLAPIENTRYP GetHistogramParameteriv)(GLenum target, GLenum pname, GLint * params); /* 363 */
- void (GLAPIENTRYP GetMinmax)(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid * values); /* 364 */
- void (GLAPIENTRYP GetMinmaxParameterfv)(GLenum target, GLenum pname, GLfloat * params); /* 365 */
- void (GLAPIENTRYP GetMinmaxParameteriv)(GLenum target, GLenum pname, GLint * params); /* 366 */
- void (GLAPIENTRYP Histogram)(GLenum target, GLsizei width, GLenum internalformat, GLboolean sink); /* 367 */
- void (GLAPIENTRYP Minmax)(GLenum target, GLenum internalformat, GLboolean sink); /* 368 */
- void (GLAPIENTRYP ResetHistogram)(GLenum target); /* 369 */
- void (GLAPIENTRYP ResetMinmax)(GLenum target); /* 370 */
- void (GLAPIENTRYP TexImage3D)(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid * pixels); /* 371 */
- void (GLAPIENTRYP TexSubImage3D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid * pixels); /* 372 */
- void (GLAPIENTRYP CopyTexSubImage3D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); /* 373 */
- void (GLAPIENTRYP ActiveTexture)(GLenum texture); /* 374 */
- void (GLAPIENTRYP ClientActiveTexture)(GLenum texture); /* 375 */
- void (GLAPIENTRYP MultiTexCoord1dARB)(GLenum target, GLdouble s); /* 376 */
- void (GLAPIENTRYP MultiTexCoord1dvARB)(GLenum target, const GLdouble * v); /* 377 */
- void (GLAPIENTRYP MultiTexCoord1fARB)(GLenum target, GLfloat s); /* 378 */
- void (GLAPIENTRYP MultiTexCoord1fvARB)(GLenum target, const GLfloat * v); /* 379 */
- void (GLAPIENTRYP MultiTexCoord1iARB)(GLenum target, GLint s); /* 380 */
- void (GLAPIENTRYP MultiTexCoord1ivARB)(GLenum target, const GLint * v); /* 381 */
- void (GLAPIENTRYP MultiTexCoord1sARB)(GLenum target, GLshort s); /* 382 */
- void (GLAPIENTRYP MultiTexCoord1svARB)(GLenum target, const GLshort * v); /* 383 */
- void (GLAPIENTRYP MultiTexCoord2dARB)(GLenum target, GLdouble s, GLdouble t); /* 384 */
- void (GLAPIENTRYP MultiTexCoord2dvARB)(GLenum target, const GLdouble * v); /* 385 */
- void (GLAPIENTRYP MultiTexCoord2fARB)(GLenum target, GLfloat s, GLfloat t); /* 386 */
- void (GLAPIENTRYP MultiTexCoord2fvARB)(GLenum target, const GLfloat * v); /* 387 */
- void (GLAPIENTRYP MultiTexCoord2iARB)(GLenum target, GLint s, GLint t); /* 388 */
- void (GLAPIENTRYP MultiTexCoord2ivARB)(GLenum target, const GLint * v); /* 389 */
- void (GLAPIENTRYP MultiTexCoord2sARB)(GLenum target, GLshort s, GLshort t); /* 390 */
- void (GLAPIENTRYP MultiTexCoord2svARB)(GLenum target, const GLshort * v); /* 391 */
- void (GLAPIENTRYP MultiTexCoord3dARB)(GLenum target, GLdouble s, GLdouble t, GLdouble r); /* 392 */
- void (GLAPIENTRYP MultiTexCoord3dvARB)(GLenum target, const GLdouble * v); /* 393 */
- void (GLAPIENTRYP MultiTexCoord3fARB)(GLenum target, GLfloat s, GLfloat t, GLfloat r); /* 394 */
- void (GLAPIENTRYP MultiTexCoord3fvARB)(GLenum target, const GLfloat * v); /* 395 */
- void (GLAPIENTRYP MultiTexCoord3iARB)(GLenum target, GLint s, GLint t, GLint r); /* 396 */
- void (GLAPIENTRYP MultiTexCoord3ivARB)(GLenum target, const GLint * v); /* 397 */
- void (GLAPIENTRYP MultiTexCoord3sARB)(GLenum target, GLshort s, GLshort t, GLshort r); /* 398 */
- void (GLAPIENTRYP MultiTexCoord3svARB)(GLenum target, const GLshort * v); /* 399 */
- void (GLAPIENTRYP MultiTexCoord4dARB)(GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q); /* 400 */
- void (GLAPIENTRYP MultiTexCoord4dvARB)(GLenum target, const GLdouble * v); /* 401 */
- void (GLAPIENTRYP MultiTexCoord4f)(GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q); /* 402 */
- void (GLAPIENTRYP MultiTexCoord4fvARB)(GLenum target, const GLfloat * v); /* 403 */
- void (GLAPIENTRYP MultiTexCoord4iARB)(GLenum target, GLint s, GLint t, GLint r, GLint q); /* 404 */
- void (GLAPIENTRYP MultiTexCoord4ivARB)(GLenum target, const GLint * v); /* 405 */
- void (GLAPIENTRYP MultiTexCoord4sARB)(GLenum target, GLshort s, GLshort t, GLshort r, GLshort q); /* 406 */
- void (GLAPIENTRYP MultiTexCoord4svARB)(GLenum target, const GLshort * v); /* 407 */
- void (GLAPIENTRYP BlendEquationSeparateOES)(GLenum modeRGB, GLenum modeA); /* 408 */
- void (GLAPIENTRYP BlendFuncSeparateOES)(GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); /* 409 */
- void (GLAPIENTRYP DrawTexfOES)(GLfloat x, GLfloat y, GLfloat z, GLfloat width, GLfloat height); /* 410 */
- void (GLAPIENTRYP DrawTexfvOES)(const GLfloat * coords); /* 411 */
- void (GLAPIENTRYP DrawTexiOES)(GLint x, GLint y, GLint z, GLint width, GLint height); /* 412 */
- void (GLAPIENTRYP DrawTexivOES)(const GLint * coords); /* 413 */
- void (GLAPIENTRYP DrawTexsOES)(GLshort x, GLshort y, GLshort z, GLshort width, GLshort height); /* 414 */
- void (GLAPIENTRYP DrawTexsvOES)(const GLshort * coords); /* 415 */
- void (GLAPIENTRYP DrawTexxOES)(GLfixed x, GLfixed y, GLfixed z, GLfixed width, GLfixed height); /* 416 */
- void (GLAPIENTRYP DrawTexxvOES)(const GLfixed * coords); /* 417 */
- void (GLAPIENTRYP BindFramebufferOES)(GLenum target, GLuint framebuffer); /* 418 */
- void (GLAPIENTRYP BindRenderbufferOES)(GLenum target, GLuint renderbuffer); /* 419 */
- GLenum (GLAPIENTRYP CheckFramebufferStatusOES)(GLenum target); /* 420 */
- void (GLAPIENTRYP DeleteFramebuffersOES)(GLsizei n, const GLuint * framebuffers); /* 421 */
- void (GLAPIENTRYP DeleteRenderbuffersOES)(GLsizei n, const GLuint * renderbuffers); /* 422 */
- void (GLAPIENTRYP FramebufferRenderbufferOES)(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); /* 423 */
- void (GLAPIENTRYP FramebufferTexture2DOES)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); /* 424 */
- void (GLAPIENTRYP GenFramebuffersOES)(GLsizei n, GLuint * framebuffers); /* 425 */
- void (GLAPIENTRYP GenRenderbuffersOES)(GLsizei n, GLuint * renderbuffers); /* 426 */
- void (GLAPIENTRYP GenerateMipmapOES)(GLenum target); /* 427 */
- void (GLAPIENTRYP GetFramebufferAttachmentParameterivOES)(GLenum target, GLenum attachment, GLenum pname, GLint * params); /* 428 */
- void (GLAPIENTRYP GetRenderbufferParameterivOES)(GLenum target, GLenum pname, GLint * params); /* 429 */
- GLboolean (GLAPIENTRYP IsFramebufferOES)(GLuint framebuffer); /* 430 */
- GLboolean (GLAPIENTRYP IsRenderbufferOES)(GLuint renderbuffer); /* 431 */
- void (GLAPIENTRYP RenderbufferStorageOES)(GLenum target, GLenum internalformat, GLsizei width, GLsizei height); /* 432 */
- void (GLAPIENTRYP PointSizePointerOES)(GLenum type, GLsizei stride, const GLvoid * pointer); /* 433 */
- GLbitfield (GLAPIENTRYP QueryMatrixxOES)(GLfixed * mantissa, GLint * exponent); /* 434 */
- void (GLAPIENTRYP GetTexGenxvOES)(GLenum coord, GLenum pname, GLfixed * params); /* 435 */
- void (GLAPIENTRYP TexGenxOES)(GLenum coord, GLenum pname, GLint param); /* 436 */
- void (GLAPIENTRYP TexGenxvOES)(GLenum coord, GLenum pname, const GLfixed * params); /* 437 */
- void (GLAPIENTRYP GetBufferPointervOES)(GLenum target, GLenum pname, GLvoid ** params); /* 438 */
- GLvoid * (GLAPIENTRYP MapBufferOES)(GLenum target, GLenum access); /* 439 */
- GLboolean (GLAPIENTRYP UnmapBufferOES)(GLenum target); /* 440 */
- void (GLAPIENTRYP MultiDrawArraysEXT)(GLenum mode, const GLint * first, const GLsizei * count, GLsizei primcount); /* 441 */
- void (GLAPIENTRYP MultiDrawElementsEXT)(GLenum mode, const GLsizei * count, GLenum type, const GLvoid ** indices, GLsizei primcount); /* 442 */
- void (GLAPIENTRYP BindVertexArrayAPPLE)(GLuint array); /* 443 */
- void (GLAPIENTRYP DeleteVertexArraysAPPLE)(GLsizei n, const GLuint * arrays); /* 444 */
- void (GLAPIENTRYP GenVertexArraysAPPLE)(GLsizei n, GLuint * arrays); /* 445 */
- GLboolean (GLAPIENTRYP IsVertexArrayAPPLE)(GLuint array); /* 446 */
- void (GLAPIENTRYP EGLImageTargetRenderbufferStorageOES)(GLenum target, GLvoid * writeOffset); /* 447 */
- void (GLAPIENTRYP EGLImageTargetTexture2DOES)(GLenum target, GLvoid * writeOffset); /* 448 */
- void (GLAPIENTRYP CompressedTexImage2D)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid * data); /* 449 */
- void (GLAPIENTRYP CompressedTexSubImage2D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid * data); /* 450 */
- void (GLAPIENTRYP SampleCoverage)(GLclampf value, GLboolean invert); /* 451 */
- void (GLAPIENTRYP BindBuffer)(GLenum target, GLuint buffer); /* 452 */
- void (GLAPIENTRYP BufferData)(GLenum target, GLsizeiptr size, const GLvoid * data, GLenum usage); /* 453 */
- void (GLAPIENTRYP BufferSubData)(GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid * data); /* 454 */
- void (GLAPIENTRYP DeleteBuffers)(GLsizei n, const GLuint * buffer); /* 455 */
- void (GLAPIENTRYP GenBuffers)(GLsizei n, GLuint * buffer); /* 456 */
- void (GLAPIENTRYP GetBufferParameteriv)(GLenum target, GLenum pname, GLint * params); /* 457 */
- GLboolean (GLAPIENTRYP IsBuffer)(GLuint buffer); /* 458 */
- void (GLAPIENTRYP PointParameterf)(GLenum pname, GLfloat param); /* 459 */
- void (GLAPIENTRYP PointParameterfv)(GLenum pname, const GLfloat * params); /* 460 */
- void (GLAPIENTRYP AlphaFuncx)(GLenum func, GLclampx ref); /* 461 */
- void (GLAPIENTRYP ClearColorx)(GLclampx red, GLclampx green, GLclampx blue, GLclampx alpha); /* 462 */
- void (GLAPIENTRYP ClearDepthf)(GLclampf depth); /* 463 */
- void (GLAPIENTRYP ClearDepthx)(GLclampx depth); /* 464 */
- void (GLAPIENTRYP Color4x)(GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha); /* 465 */
- void (GLAPIENTRYP DepthRangef)(GLclampf zNear, GLclampf zFar); /* 466 */
- void (GLAPIENTRYP DepthRangex)(GLclampx zNear, GLclampx zFar); /* 467 */
- void (GLAPIENTRYP Fogx)(GLenum pname, GLfixed param); /* 468 */
- void (GLAPIENTRYP Fogxv)(GLenum pname, const GLfixed * params); /* 469 */
- void (GLAPIENTRYP Frustumf)(GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar); /* 470 */
- void (GLAPIENTRYP Frustumx)(GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar); /* 471 */
- void (GLAPIENTRYP LightModelx)(GLenum pname, GLfixed param); /* 472 */
- void (GLAPIENTRYP LightModelxv)(GLenum pname, const GLfixed * params); /* 473 */
- void (GLAPIENTRYP Lightx)(GLenum light, GLenum pname, GLfixed param); /* 474 */
- void (GLAPIENTRYP Lightxv)(GLenum light, GLenum pname, const GLfixed * params); /* 475 */
- void (GLAPIENTRYP LineWidthx)(GLfixed width); /* 476 */
- void (GLAPIENTRYP LoadMatrixx)(const GLfixed * m); /* 477 */
- void (GLAPIENTRYP Materialx)(GLenum face, GLenum pname, GLfixed param); /* 478 */
- void (GLAPIENTRYP Materialxv)(GLenum face, GLenum pname, const GLfixed * params); /* 479 */
- void (GLAPIENTRYP MultMatrixx)(const GLfixed * m); /* 480 */
- void (GLAPIENTRYP MultiTexCoord4x)(GLenum target, GLfixed s, GLfixed t, GLfixed r, GLfixed q); /* 481 */
- void (GLAPIENTRYP Normal3x)(GLfixed nx, GLfixed ny, GLfixed nz); /* 482 */
- void (GLAPIENTRYP Orthof)(GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar); /* 483 */
- void (GLAPIENTRYP Orthox)(GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar); /* 484 */
- void (GLAPIENTRYP PointSizex)(GLfixed size); /* 485 */
- void (GLAPIENTRYP PolygonOffsetx)(GLfixed factor, GLfixed units); /* 486 */
- void (GLAPIENTRYP Rotatex)(GLfixed angle, GLfixed x, GLfixed y, GLfixed z); /* 487 */
- void (GLAPIENTRYP SampleCoveragex)(GLclampx value, GLboolean invert); /* 488 */
- void (GLAPIENTRYP Scalex)(GLfixed x, GLfixed y, GLfixed z); /* 489 */
- void (GLAPIENTRYP TexEnvx)(GLenum target, GLenum pname, GLfixed param); /* 490 */
- void (GLAPIENTRYP TexEnvxv)(GLenum target, GLenum pname, const GLfixed * params); /* 491 */
- void (GLAPIENTRYP TexParameterx)(GLenum target, GLenum pname, GLfixed param); /* 492 */
- void (GLAPIENTRYP Translatex)(GLfixed x, GLfixed y, GLfixed z); /* 493 */
- void (GLAPIENTRYP ClipPlanef)(GLenum plane, const GLfloat * equation); /* 494 */
- void (GLAPIENTRYP ClipPlanex)(GLenum plane, const GLfixed * equation); /* 495 */
- void (GLAPIENTRYP GetClipPlanef)(GLenum plane, GLfloat * equation); /* 496 */
- void (GLAPIENTRYP GetClipPlanex)(GLenum plane, GLfixed * equation); /* 497 */
- void (GLAPIENTRYP GetFixedv)(GLenum pname, GLfixed * params); /* 498 */
- void (GLAPIENTRYP GetLightxv)(GLenum light, GLenum pname, GLfixed * params); /* 499 */
- void (GLAPIENTRYP GetMaterialxv)(GLenum face, GLenum pname, GLfixed * params); /* 500 */
- void (GLAPIENTRYP GetTexEnvxv)(GLenum target, GLenum pname, GLfixed * params); /* 501 */
- void (GLAPIENTRYP GetTexParameterxv)(GLenum target, GLenum pname, GLfixed * params); /* 502 */
- void (GLAPIENTRYP PointParameterx)(GLenum pname, GLfixed param); /* 503 */
- void (GLAPIENTRYP PointParameterxv)(GLenum pname, const GLfixed * params); /* 504 */
- void (GLAPIENTRYP TexParameterxv)(GLenum target, GLenum pname, const GLfixed * params); /* 505 */
-};
-
-#endif /* !defined( _GLAPI_TABLE_H_ ) */
diff --git a/src/mapi/es1api/glapi/glapitemp.h b/src/mapi/es1api/glapi/glapitemp.h
deleted file mode 100644
index 69995716d31..00000000000
--- a/src/mapi/es1api/glapi/glapitemp.h
+++ /dev/null
@@ -1,4528 +0,0 @@
-/* DO NOT EDIT - This file generated automatically by gl_apitemp.py (from Mesa) script */
-
-/*
- * Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
- * (C) Copyright IBM Corporation 2004
- * 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
- * BRIAN PAUL, IBM,
- * AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
- * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-
-# if defined(__GNUC__) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590)) && defined(__ELF__)
-# define HIDDEN __attribute__((visibility("hidden")))
-# else
-# define HIDDEN
-# endif
-
-/*
- * This file is a template which generates the OpenGL API entry point
- * functions. It should be included by a .c file which first defines
- * the following macros:
- * KEYWORD1 - usually nothing, but might be __declspec(dllexport) on Win32
- * KEYWORD2 - usually nothing, but might be __stdcall on Win32
- * NAME(n) - builds the final function name (usually add "gl" prefix)
- * DISPATCH(func, args, msg) - code to do dispatch of named function.
- * msg is a printf-style debug message.
- * RETURN_DISPATCH(func, args, msg) - code to do dispatch with a return value
- *
- * Here is an example which generates the usual OpenGL functions:
- * #define KEYWORD1
- * #define KEYWORD2
- * #define NAME(func) gl##func
- * #define DISPATCH(func, args, msg) \
- * struct _glapi_table *dispatch = CurrentDispatch; \
- * (*dispatch->func) args
- * #define RETURN DISPATCH(func, args, msg) \
- * struct _glapi_table *dispatch = CurrentDispatch; \
- * return (*dispatch->func) args
- *
- */
-
-
-#if defined( NAME )
-#ifndef KEYWORD1
-#define KEYWORD1
-#endif
-
-#ifndef KEYWORD1_ALT
-#define KEYWORD1_ALT HIDDEN
-#endif
-
-#ifndef KEYWORD2
-#define KEYWORD2
-#endif
-
-#ifndef DISPATCH
-#error DISPATCH must be defined
-#endif
-
-#ifndef RETURN_DISPATCH
-#error RETURN_DISPATCH must be defined
-#endif
-
-
-#ifndef _GLAPI_SKIP_NORMAL_ENTRY_POINTS
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_0)(GLuint list, GLenum mode);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_0)(GLuint list, GLenum mode)
-{
- DISPATCH(NewList, (list, mode), (F, "glNewList(%d, 0x%x);\n", list, mode));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_1)(void);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_1)(void)
-{
- DISPATCH(EndList, (), (F, "glEndList();\n"));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_2)(GLuint list);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_2)(GLuint list)
-{
- DISPATCH(CallList, (list), (F, "glCallList(%d);\n", list));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_3)(GLsizei n, GLenum type, const GLvoid * lists);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_3)(GLsizei n, GLenum type, const GLvoid * lists)
-{
- DISPATCH(CallLists, (n, type, lists), (F, "glCallLists(%d, 0x%x, %p);\n", n, type, (const void *) lists));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_4)(GLuint list, GLsizei range);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_4)(GLuint list, GLsizei range)
-{
- DISPATCH(DeleteLists, (list, range), (F, "glDeleteLists(%d, %d);\n", list, range));
-}
-
-KEYWORD1_ALT GLuint KEYWORD2 NAME(_dispatch_stub_5)(GLsizei range);
-
-KEYWORD1_ALT GLuint KEYWORD2 NAME(_dispatch_stub_5)(GLsizei range)
-{
- RETURN_DISPATCH(GenLists, (range), (F, "glGenLists(%d);\n", range));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_6)(GLuint base);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_6)(GLuint base)
-{
- DISPATCH(ListBase, (base), (F, "glListBase(%d);\n", base));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_7)(GLenum mode);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_7)(GLenum mode)
-{
- DISPATCH(Begin, (mode), (F, "glBegin(0x%x);\n", mode));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_8)(GLsizei width, GLsizei height, GLfloat xorig, GLfloat yorig, GLfloat xmove, GLfloat ymove, const GLubyte * bitmap);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_8)(GLsizei width, GLsizei height, GLfloat xorig, GLfloat yorig, GLfloat xmove, GLfloat ymove, const GLubyte * bitmap)
-{
- DISPATCH(Bitmap, (width, height, xorig, yorig, xmove, ymove, bitmap), (F, "glBitmap(%d, %d, %f, %f, %f, %f, %p);\n", width, height, xorig, yorig, xmove, ymove, (const void *) bitmap));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_9)(GLbyte red, GLbyte green, GLbyte blue);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_9)(GLbyte red, GLbyte green, GLbyte blue)
-{
- DISPATCH(Color3b, (red, green, blue), (F, "glColor3b(%d, %d, %d);\n", red, green, blue));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_10)(const GLbyte * v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_10)(const GLbyte * v)
-{
- DISPATCH(Color3bv, (v), (F, "glColor3bv(%p);\n", (const void *) v));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_11)(GLdouble red, GLdouble green, GLdouble blue);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_11)(GLdouble red, GLdouble green, GLdouble blue)
-{
- DISPATCH(Color3d, (red, green, blue), (F, "glColor3d(%f, %f, %f);\n", red, green, blue));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_12)(const GLdouble * v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_12)(const GLdouble * v)
-{
- DISPATCH(Color3dv, (v), (F, "glColor3dv(%p);\n", (const void *) v));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_13)(GLfloat red, GLfloat green, GLfloat blue);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_13)(GLfloat red, GLfloat green, GLfloat blue)
-{
- DISPATCH(Color3f, (red, green, blue), (F, "glColor3f(%f, %f, %f);\n", red, green, blue));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_14)(const GLfloat * v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_14)(const GLfloat * v)
-{
- DISPATCH(Color3fv, (v), (F, "glColor3fv(%p);\n", (const void *) v));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_15)(GLint red, GLint green, GLint blue);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_15)(GLint red, GLint green, GLint blue)
-{
- DISPATCH(Color3i, (red, green, blue), (F, "glColor3i(%d, %d, %d);\n", red, green, blue));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_16)(const GLint * v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_16)(const GLint * v)
-{
- DISPATCH(Color3iv, (v), (F, "glColor3iv(%p);\n", (const void *) v));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_17)(GLshort red, GLshort green, GLshort blue);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_17)(GLshort red, GLshort green, GLshort blue)
-{
- DISPATCH(Color3s, (red, green, blue), (F, "glColor3s(%d, %d, %d);\n", red, green, blue));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_18)(const GLshort * v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_18)(const GLshort * v)
-{
- DISPATCH(Color3sv, (v), (F, "glColor3sv(%p);\n", (const void *) v));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_19)(GLubyte red, GLubyte green, GLubyte blue);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_19)(GLubyte red, GLubyte green, GLubyte blue)
-{
- DISPATCH(Color3ub, (red, green, blue), (F, "glColor3ub(%d, %d, %d);\n", red, green, blue));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_20)(const GLubyte * v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_20)(const GLubyte * v)
-{
- DISPATCH(Color3ubv, (v), (F, "glColor3ubv(%p);\n", (const void *) v));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_21)(GLuint red, GLuint green, GLuint blue);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_21)(GLuint red, GLuint green, GLuint blue)
-{
- DISPATCH(Color3ui, (red, green, blue), (F, "glColor3ui(%d, %d, %d);\n", red, green, blue));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_22)(const GLuint * v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_22)(const GLuint * v)
-{
- DISPATCH(Color3uiv, (v), (F, "glColor3uiv(%p);\n", (const void *) v));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_23)(GLushort red, GLushort green, GLushort blue);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_23)(GLushort red, GLushort green, GLushort blue)
-{
- DISPATCH(Color3us, (red, green, blue), (F, "glColor3us(%d, %d, %d);\n", red, green, blue));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_24)(const GLushort * v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_24)(const GLushort * v)
-{
- DISPATCH(Color3usv, (v), (F, "glColor3usv(%p);\n", (const void *) v));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_25)(GLbyte red, GLbyte green, GLbyte blue, GLbyte alpha);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_25)(GLbyte red, GLbyte green, GLbyte blue, GLbyte alpha)
-{
- DISPATCH(Color4b, (red, green, blue, alpha), (F, "glColor4b(%d, %d, %d, %d);\n", red, green, blue, alpha));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_26)(const GLbyte * v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_26)(const GLbyte * v)
-{
- DISPATCH(Color4bv, (v), (F, "glColor4bv(%p);\n", (const void *) v));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_27)(GLdouble red, GLdouble green, GLdouble blue, GLdouble alpha);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_27)(GLdouble red, GLdouble green, GLdouble blue, GLdouble alpha)
-{
- DISPATCH(Color4d, (red, green, blue, alpha), (F, "glColor4d(%f, %f, %f, %f);\n", red, green, blue, alpha));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_28)(const GLdouble * v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_28)(const GLdouble * v)
-{
- DISPATCH(Color4dv, (v), (F, "glColor4dv(%p);\n", (const void *) v));
-}
-
-KEYWORD1 void KEYWORD2 NAME(Color4f)(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha)
-{
- DISPATCH(Color4f, (red, green, blue, alpha), (F, "glColor4f(%f, %f, %f, %f);\n", red, green, blue, alpha));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_30)(const GLfloat * v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_30)(const GLfloat * v)
-{
- DISPATCH(Color4fv, (v), (F, "glColor4fv(%p);\n", (const void *) v));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_31)(GLint red, GLint green, GLint blue, GLint alpha);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_31)(GLint red, GLint green, GLint blue, GLint alpha)
-{
- DISPATCH(Color4i, (red, green, blue, alpha), (F, "glColor4i(%d, %d, %d, %d);\n", red, green, blue, alpha));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_32)(const GLint * v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_32)(const GLint * v)
-{
- DISPATCH(Color4iv, (v), (F, "glColor4iv(%p);\n", (const void *) v));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_33)(GLshort red, GLshort green, GLshort blue, GLshort alpha);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_33)(GLshort red, GLshort green, GLshort blue, GLshort alpha)
-{
- DISPATCH(Color4s, (red, green, blue, alpha), (F, "glColor4s(%d, %d, %d, %d);\n", red, green, blue, alpha));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_34)(const GLshort * v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_34)(const GLshort * v)
-{
- DISPATCH(Color4sv, (v), (F, "glColor4sv(%p);\n", (const void *) v));
-}
-
-KEYWORD1 void KEYWORD2 NAME(Color4ub)(GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha)
-{
- DISPATCH(Color4ub, (red, green, blue, alpha), (F, "glColor4ub(%d, %d, %d, %d);\n", red, green, blue, alpha));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_36)(const GLubyte * v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_36)(const GLubyte * v)
-{
- DISPATCH(Color4ubv, (v), (F, "glColor4ubv(%p);\n", (const void *) v));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_37)(GLuint red, GLuint green, GLuint blue, GLuint alpha);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_37)(GLuint red, GLuint green, GLuint blue, GLuint alpha)
-{
- DISPATCH(Color4ui, (red, green, blue, alpha), (F, "glColor4ui(%d, %d, %d, %d);\n", red, green, blue, alpha));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_38)(const GLuint * v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_38)(const GLuint * v)
-{
- DISPATCH(Color4uiv, (v), (F, "glColor4uiv(%p);\n", (const void *) v));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_39)(GLushort red, GLushort green, GLushort blue, GLushort alpha);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_39)(GLushort red, GLushort green, GLushort blue, GLushort alpha)
-{
- DISPATCH(Color4us, (red, green, blue, alpha), (F, "glColor4us(%d, %d, %d, %d);\n", red, green, blue, alpha));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_40)(const GLushort * v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_40)(const GLushort * v)
-{
- DISPATCH(Color4usv, (v), (F, "glColor4usv(%p);\n", (const void *) v));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_41)(GLboolean flag);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_41)(GLboolean flag)
-{
- DISPATCH(EdgeFlag, (flag), (F, "glEdgeFlag(%d);\n", flag));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_42)(const GLboolean * flag);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_42)(const GLboolean * flag)
-{
- DISPATCH(EdgeFlagv, (flag), (F, "glEdgeFlagv(%p);\n", (const void *) flag));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_43)(void);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_43)(void)
-{
- DISPATCH(End, (), (F, "glEnd();\n"));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_44)(GLdouble c);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_44)(GLdouble c)
-{
- DISPATCH(Indexd, (c), (F, "glIndexd(%f);\n", c));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_45)(const GLdouble * c);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_45)(const GLdouble * c)
-{
- DISPATCH(Indexdv, (c), (F, "glIndexdv(%p);\n", (const void *) c));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_46)(GLfloat c);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_46)(GLfloat c)
-{
- DISPATCH(Indexf, (c), (F, "glIndexf(%f);\n", c));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_47)(const GLfloat * c);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_47)(const GLfloat * c)
-{
- DISPATCH(Indexfv, (c), (F, "glIndexfv(%p);\n", (const void *) c));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_48)(GLint c);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_48)(GLint c)
-{
- DISPATCH(Indexi, (c), (F, "glIndexi(%d);\n", c));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_49)(const GLint * c);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_49)(const GLint * c)
-{
- DISPATCH(Indexiv, (c), (F, "glIndexiv(%p);\n", (const void *) c));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_50)(GLshort c);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_50)(GLshort c)
-{
- DISPATCH(Indexs, (c), (F, "glIndexs(%d);\n", c));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_51)(const GLshort * c);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_51)(const GLshort * c)
-{
- DISPATCH(Indexsv, (c), (F, "glIndexsv(%p);\n", (const void *) c));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_52)(GLbyte nx, GLbyte ny, GLbyte nz);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_52)(GLbyte nx, GLbyte ny, GLbyte nz)
-{
- DISPATCH(Normal3b, (nx, ny, nz), (F, "glNormal3b(%d, %d, %d);\n", nx, ny, nz));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_53)(const GLbyte * v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_53)(const GLbyte * v)
-{
- DISPATCH(Normal3bv, (v), (F, "glNormal3bv(%p);\n", (const void *) v));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_54)(GLdouble nx, GLdouble ny, GLdouble nz);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_54)(GLdouble nx, GLdouble ny, GLdouble nz)
-{
- DISPATCH(Normal3d, (nx, ny, nz), (F, "glNormal3d(%f, %f, %f);\n", nx, ny, nz));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_55)(const GLdouble * v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_55)(const GLdouble * v)
-{
- DISPATCH(Normal3dv, (v), (F, "glNormal3dv(%p);\n", (const void *) v));
-}
-
-KEYWORD1 void KEYWORD2 NAME(Normal3f)(GLfloat nx, GLfloat ny, GLfloat nz)
-{
- DISPATCH(Normal3f, (nx, ny, nz), (F, "glNormal3f(%f, %f, %f);\n", nx, ny, nz));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_57)(const GLfloat * v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_57)(const GLfloat * v)
-{
- DISPATCH(Normal3fv, (v), (F, "glNormal3fv(%p);\n", (const void *) v));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_58)(GLint nx, GLint ny, GLint nz);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_58)(GLint nx, GLint ny, GLint nz)
-{
- DISPATCH(Normal3i, (nx, ny, nz), (F, "glNormal3i(%d, %d, %d);\n", nx, ny, nz));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_59)(const GLint * v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_59)(const GLint * v)
-{
- DISPATCH(Normal3iv, (v), (F, "glNormal3iv(%p);\n", (const void *) v));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_60)(GLshort nx, GLshort ny, GLshort nz);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_60)(GLshort nx, GLshort ny, GLshort nz)
-{
- DISPATCH(Normal3s, (nx, ny, nz), (F, "glNormal3s(%d, %d, %d);\n", nx, ny, nz));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_61)(const GLshort * v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_61)(const GLshort * v)
-{
- DISPATCH(Normal3sv, (v), (F, "glNormal3sv(%p);\n", (const void *) v));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_62)(GLdouble x, GLdouble y);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_62)(GLdouble x, GLdouble y)
-{
- DISPATCH(RasterPos2d, (x, y), (F, "glRasterPos2d(%f, %f);\n", x, y));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_63)(const GLdouble * v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_63)(const GLdouble * v)
-{
- DISPATCH(RasterPos2dv, (v), (F, "glRasterPos2dv(%p);\n", (const void *) v));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_64)(GLfloat x, GLfloat y);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_64)(GLfloat x, GLfloat y)
-{
- DISPATCH(RasterPos2f, (x, y), (F, "glRasterPos2f(%f, %f);\n", x, y));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_65)(const GLfloat * v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_65)(const GLfloat * v)
-{
- DISPATCH(RasterPos2fv, (v), (F, "glRasterPos2fv(%p);\n", (const void *) v));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_66)(GLint x, GLint y);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_66)(GLint x, GLint y)
-{
- DISPATCH(RasterPos2i, (x, y), (F, "glRasterPos2i(%d, %d);\n", x, y));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_67)(const GLint * v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_67)(const GLint * v)
-{
- DISPATCH(RasterPos2iv, (v), (F, "glRasterPos2iv(%p);\n", (const void *) v));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_68)(GLshort x, GLshort y);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_68)(GLshort x, GLshort y)
-{
- DISPATCH(RasterPos2s, (x, y), (F, "glRasterPos2s(%d, %d);\n", x, y));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_69)(const GLshort * v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_69)(const GLshort * v)
-{
- DISPATCH(RasterPos2sv, (v), (F, "glRasterPos2sv(%p);\n", (const void *) v));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_70)(GLdouble x, GLdouble y, GLdouble z);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_70)(GLdouble x, GLdouble y, GLdouble z)
-{
- DISPATCH(RasterPos3d, (x, y, z), (F, "glRasterPos3d(%f, %f, %f);\n", x, y, z));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_71)(const GLdouble * v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_71)(const GLdouble * v)
-{
- DISPATCH(RasterPos3dv, (v), (F, "glRasterPos3dv(%p);\n", (const void *) v));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_72)(GLfloat x, GLfloat y, GLfloat z);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_72)(GLfloat x, GLfloat y, GLfloat z)
-{
- DISPATCH(RasterPos3f, (x, y, z), (F, "glRasterPos3f(%f, %f, %f);\n", x, y, z));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_73)(const GLfloat * v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_73)(const GLfloat * v)
-{
- DISPATCH(RasterPos3fv, (v), (F, "glRasterPos3fv(%p);\n", (const void *) v));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_74)(GLint x, GLint y, GLint z);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_74)(GLint x, GLint y, GLint z)
-{
- DISPATCH(RasterPos3i, (x, y, z), (F, "glRasterPos3i(%d, %d, %d);\n", x, y, z));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_75)(const GLint * v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_75)(const GLint * v)
-{
- DISPATCH(RasterPos3iv, (v), (F, "glRasterPos3iv(%p);\n", (const void *) v));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_76)(GLshort x, GLshort y, GLshort z);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_76)(GLshort x, GLshort y, GLshort z)
-{
- DISPATCH(RasterPos3s, (x, y, z), (F, "glRasterPos3s(%d, %d, %d);\n", x, y, z));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_77)(const GLshort * v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_77)(const GLshort * v)
-{
- DISPATCH(RasterPos3sv, (v), (F, "glRasterPos3sv(%p);\n", (const void *) v));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_78)(GLdouble x, GLdouble y, GLdouble z, GLdouble w);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_78)(GLdouble x, GLdouble y, GLdouble z, GLdouble w)
-{
- DISPATCH(RasterPos4d, (x, y, z, w), (F, "glRasterPos4d(%f, %f, %f, %f);\n", x, y, z, w));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_79)(const GLdouble * v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_79)(const GLdouble * v)
-{
- DISPATCH(RasterPos4dv, (v), (F, "glRasterPos4dv(%p);\n", (const void *) v));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_80)(GLfloat x, GLfloat y, GLfloat z, GLfloat w);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_80)(GLfloat x, GLfloat y, GLfloat z, GLfloat w)
-{
- DISPATCH(RasterPos4f, (x, y, z, w), (F, "glRasterPos4f(%f, %f, %f, %f);\n", x, y, z, w));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_81)(const GLfloat * v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_81)(const GLfloat * v)
-{
- DISPATCH(RasterPos4fv, (v), (F, "glRasterPos4fv(%p);\n", (const void *) v));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_82)(GLint x, GLint y, GLint z, GLint w);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_82)(GLint x, GLint y, GLint z, GLint w)
-{
- DISPATCH(RasterPos4i, (x, y, z, w), (F, "glRasterPos4i(%d, %d, %d, %d);\n", x, y, z, w));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_83)(const GLint * v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_83)(const GLint * v)
-{
- DISPATCH(RasterPos4iv, (v), (F, "glRasterPos4iv(%p);\n", (const void *) v));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_84)(GLshort x, GLshort y, GLshort z, GLshort w);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_84)(GLshort x, GLshort y, GLshort z, GLshort w)
-{
- DISPATCH(RasterPos4s, (x, y, z, w), (F, "glRasterPos4s(%d, %d, %d, %d);\n", x, y, z, w));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_85)(const GLshort * v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_85)(const GLshort * v)
-{
- DISPATCH(RasterPos4sv, (v), (F, "glRasterPos4sv(%p);\n", (const void *) v));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_86)(GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_86)(GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2)
-{
- DISPATCH(Rectd, (x1, y1, x2, y2), (F, "glRectd(%f, %f, %f, %f);\n", x1, y1, x2, y2));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_87)(const GLdouble * v1, const GLdouble * v2);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_87)(const GLdouble * v1, const GLdouble * v2)
-{
- DISPATCH(Rectdv, (v1, v2), (F, "glRectdv(%p, %p);\n", (const void *) v1, (const void *) v2));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_88)(GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_88)(GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2)
-{
- DISPATCH(Rectf, (x1, y1, x2, y2), (F, "glRectf(%f, %f, %f, %f);\n", x1, y1, x2, y2));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_89)(const GLfloat * v1, const GLfloat * v2);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_89)(const GLfloat * v1, const GLfloat * v2)
-{
- DISPATCH(Rectfv, (v1, v2), (F, "glRectfv(%p, %p);\n", (const void *) v1, (const void *) v2));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_90)(GLint x1, GLint y1, GLint x2, GLint y2);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_90)(GLint x1, GLint y1, GLint x2, GLint y2)
-{
- DISPATCH(Recti, (x1, y1, x2, y2), (F, "glRecti(%d, %d, %d, %d);\n", x1, y1, x2, y2));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_91)(const GLint * v1, const GLint * v2);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_91)(const GLint * v1, const GLint * v2)
-{
- DISPATCH(Rectiv, (v1, v2), (F, "glRectiv(%p, %p);\n", (const void *) v1, (const void *) v2));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_92)(GLshort x1, GLshort y1, GLshort x2, GLshort y2);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_92)(GLshort x1, GLshort y1, GLshort x2, GLshort y2)
-{
- DISPATCH(Rects, (x1, y1, x2, y2), (F, "glRects(%d, %d, %d, %d);\n", x1, y1, x2, y2));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_93)(const GLshort * v1, const GLshort * v2);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_93)(const GLshort * v1, const GLshort * v2)
-{
- DISPATCH(Rectsv, (v1, v2), (F, "glRectsv(%p, %p);\n", (const void *) v1, (const void *) v2));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_94)(GLdouble s);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_94)(GLdouble s)
-{
- DISPATCH(TexCoord1d, (s), (F, "glTexCoord1d(%f);\n", s));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_95)(const GLdouble * v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_95)(const GLdouble * v)
-{
- DISPATCH(TexCoord1dv, (v), (F, "glTexCoord1dv(%p);\n", (const void *) v));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_96)(GLfloat s);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_96)(GLfloat s)
-{
- DISPATCH(TexCoord1f, (s), (F, "glTexCoord1f(%f);\n", s));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_97)(const GLfloat * v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_97)(const GLfloat * v)
-{
- DISPATCH(TexCoord1fv, (v), (F, "glTexCoord1fv(%p);\n", (const void *) v));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_98)(GLint s);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_98)(GLint s)
-{
- DISPATCH(TexCoord1i, (s), (F, "glTexCoord1i(%d);\n", s));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_99)(const GLint * v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_99)(const GLint * v)
-{
- DISPATCH(TexCoord1iv, (v), (F, "glTexCoord1iv(%p);\n", (const void *) v));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_100)(GLshort s);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_100)(GLshort s)
-{
- DISPATCH(TexCoord1s, (s), (F, "glTexCoord1s(%d);\n", s));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_101)(const GLshort * v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_101)(const GLshort * v)
-{
- DISPATCH(TexCoord1sv, (v), (F, "glTexCoord1sv(%p);\n", (const void *) v));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_102)(GLdouble s, GLdouble t);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_102)(GLdouble s, GLdouble t)
-{
- DISPATCH(TexCoord2d, (s, t), (F, "glTexCoord2d(%f, %f);\n", s, t));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_103)(const GLdouble * v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_103)(const GLdouble * v)
-{
- DISPATCH(TexCoord2dv, (v), (F, "glTexCoord2dv(%p);\n", (const void *) v));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_104)(GLfloat s, GLfloat t);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_104)(GLfloat s, GLfloat t)
-{
- DISPATCH(TexCoord2f, (s, t), (F, "glTexCoord2f(%f, %f);\n", s, t));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_105)(const GLfloat * v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_105)(const GLfloat * v)
-{
- DISPATCH(TexCoord2fv, (v), (F, "glTexCoord2fv(%p);\n", (const void *) v));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_106)(GLint s, GLint t);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_106)(GLint s, GLint t)
-{
- DISPATCH(TexCoord2i, (s, t), (F, "glTexCoord2i(%d, %d);\n", s, t));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_107)(const GLint * v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_107)(const GLint * v)
-{
- DISPATCH(TexCoord2iv, (v), (F, "glTexCoord2iv(%p);\n", (const void *) v));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_108)(GLshort s, GLshort t);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_108)(GLshort s, GLshort t)
-{
- DISPATCH(TexCoord2s, (s, t), (F, "glTexCoord2s(%d, %d);\n", s, t));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_109)(const GLshort * v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_109)(const GLshort * v)
-{
- DISPATCH(TexCoord2sv, (v), (F, "glTexCoord2sv(%p);\n", (const void *) v));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_110)(GLdouble s, GLdouble t, GLdouble r);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_110)(GLdouble s, GLdouble t, GLdouble r)
-{
- DISPATCH(TexCoord3d, (s, t, r), (F, "glTexCoord3d(%f, %f, %f);\n", s, t, r));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_111)(const GLdouble * v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_111)(const GLdouble * v)
-{
- DISPATCH(TexCoord3dv, (v), (F, "glTexCoord3dv(%p);\n", (const void *) v));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_112)(GLfloat s, GLfloat t, GLfloat r);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_112)(GLfloat s, GLfloat t, GLfloat r)
-{
- DISPATCH(TexCoord3f, (s, t, r), (F, "glTexCoord3f(%f, %f, %f);\n", s, t, r));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_113)(const GLfloat * v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_113)(const GLfloat * v)
-{
- DISPATCH(TexCoord3fv, (v), (F, "glTexCoord3fv(%p);\n", (const void *) v));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_114)(GLint s, GLint t, GLint r);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_114)(GLint s, GLint t, GLint r)
-{
- DISPATCH(TexCoord3i, (s, t, r), (F, "glTexCoord3i(%d, %d, %d);\n", s, t, r));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_115)(const GLint * v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_115)(const GLint * v)
-{
- DISPATCH(TexCoord3iv, (v), (F, "glTexCoord3iv(%p);\n", (const void *) v));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_116)(GLshort s, GLshort t, GLshort r);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_116)(GLshort s, GLshort t, GLshort r)
-{
- DISPATCH(TexCoord3s, (s, t, r), (F, "glTexCoord3s(%d, %d, %d);\n", s, t, r));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_117)(const GLshort * v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_117)(const GLshort * v)
-{
- DISPATCH(TexCoord3sv, (v), (F, "glTexCoord3sv(%p);\n", (const void *) v));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_118)(GLdouble s, GLdouble t, GLdouble r, GLdouble q);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_118)(GLdouble s, GLdouble t, GLdouble r, GLdouble q)
-{
- DISPATCH(TexCoord4d, (s, t, r, q), (F, "glTexCoord4d(%f, %f, %f, %f);\n", s, t, r, q));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_119)(const GLdouble * v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_119)(const GLdouble * v)
-{
- DISPATCH(TexCoord4dv, (v), (F, "glTexCoord4dv(%p);\n", (const void *) v));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_120)(GLfloat s, GLfloat t, GLfloat r, GLfloat q);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_120)(GLfloat s, GLfloat t, GLfloat r, GLfloat q)
-{
- DISPATCH(TexCoord4f, (s, t, r, q), (F, "glTexCoord4f(%f, %f, %f, %f);\n", s, t, r, q));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_121)(const GLfloat * v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_121)(const GLfloat * v)
-{
- DISPATCH(TexCoord4fv, (v), (F, "glTexCoord4fv(%p);\n", (const void *) v));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_122)(GLint s, GLint t, GLint r, GLint q);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_122)(GLint s, GLint t, GLint r, GLint q)
-{
- DISPATCH(TexCoord4i, (s, t, r, q), (F, "glTexCoord4i(%d, %d, %d, %d);\n", s, t, r, q));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_123)(const GLint * v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_123)(const GLint * v)
-{
- DISPATCH(TexCoord4iv, (v), (F, "glTexCoord4iv(%p);\n", (const void *) v));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_124)(GLshort s, GLshort t, GLshort r, GLshort q);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_124)(GLshort s, GLshort t, GLshort r, GLshort q)
-{
- DISPATCH(TexCoord4s, (s, t, r, q), (F, "glTexCoord4s(%d, %d, %d, %d);\n", s, t, r, q));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_125)(const GLshort * v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_125)(const GLshort * v)
-{
- DISPATCH(TexCoord4sv, (v), (F, "glTexCoord4sv(%p);\n", (const void *) v));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_126)(GLdouble x, GLdouble y);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_126)(GLdouble x, GLdouble y)
-{
- DISPATCH(Vertex2d, (x, y), (F, "glVertex2d(%f, %f);\n", x, y));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_127)(const GLdouble * v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_127)(const GLdouble * v)
-{
- DISPATCH(Vertex2dv, (v), (F, "glVertex2dv(%p);\n", (const void *) v));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_128)(GLfloat x, GLfloat y);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_128)(GLfloat x, GLfloat y)
-{
- DISPATCH(Vertex2f, (x, y), (F, "glVertex2f(%f, %f);\n", x, y));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_129)(const GLfloat * v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_129)(const GLfloat * v)
-{
- DISPATCH(Vertex2fv, (v), (F, "glVertex2fv(%p);\n", (const void *) v));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_130)(GLint x, GLint y);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_130)(GLint x, GLint y)
-{
- DISPATCH(Vertex2i, (x, y), (F, "glVertex2i(%d, %d);\n", x, y));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_131)(const GLint * v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_131)(const GLint * v)
-{
- DISPATCH(Vertex2iv, (v), (F, "glVertex2iv(%p);\n", (const void *) v));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_132)(GLshort x, GLshort y);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_132)(GLshort x, GLshort y)
-{
- DISPATCH(Vertex2s, (x, y), (F, "glVertex2s(%d, %d);\n", x, y));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_133)(const GLshort * v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_133)(const GLshort * v)
-{
- DISPATCH(Vertex2sv, (v), (F, "glVertex2sv(%p);\n", (const void *) v));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_134)(GLdouble x, GLdouble y, GLdouble z);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_134)(GLdouble x, GLdouble y, GLdouble z)
-{
- DISPATCH(Vertex3d, (x, y, z), (F, "glVertex3d(%f, %f, %f);\n", x, y, z));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_135)(const GLdouble * v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_135)(const GLdouble * v)
-{
- DISPATCH(Vertex3dv, (v), (F, "glVertex3dv(%p);\n", (const void *) v));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_136)(GLfloat x, GLfloat y, GLfloat z);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_136)(GLfloat x, GLfloat y, GLfloat z)
-{
- DISPATCH(Vertex3f, (x, y, z), (F, "glVertex3f(%f, %f, %f);\n", x, y, z));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_137)(const GLfloat * v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_137)(const GLfloat * v)
-{
- DISPATCH(Vertex3fv, (v), (F, "glVertex3fv(%p);\n", (const void *) v));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_138)(GLint x, GLint y, GLint z);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_138)(GLint x, GLint y, GLint z)
-{
- DISPATCH(Vertex3i, (x, y, z), (F, "glVertex3i(%d, %d, %d);\n", x, y, z));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_139)(const GLint * v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_139)(const GLint * v)
-{
- DISPATCH(Vertex3iv, (v), (F, "glVertex3iv(%p);\n", (const void *) v));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_140)(GLshort x, GLshort y, GLshort z);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_140)(GLshort x, GLshort y, GLshort z)
-{
- DISPATCH(Vertex3s, (x, y, z), (F, "glVertex3s(%d, %d, %d);\n", x, y, z));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_141)(const GLshort * v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_141)(const GLshort * v)
-{
- DISPATCH(Vertex3sv, (v), (F, "glVertex3sv(%p);\n", (const void *) v));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_142)(GLdouble x, GLdouble y, GLdouble z, GLdouble w);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_142)(GLdouble x, GLdouble y, GLdouble z, GLdouble w)
-{
- DISPATCH(Vertex4d, (x, y, z, w), (F, "glVertex4d(%f, %f, %f, %f);\n", x, y, z, w));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_143)(const GLdouble * v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_143)(const GLdouble * v)
-{
- DISPATCH(Vertex4dv, (v), (F, "glVertex4dv(%p);\n", (const void *) v));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_144)(GLfloat x, GLfloat y, GLfloat z, GLfloat w);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_144)(GLfloat x, GLfloat y, GLfloat z, GLfloat w)
-{
- DISPATCH(Vertex4f, (x, y, z, w), (F, "glVertex4f(%f, %f, %f, %f);\n", x, y, z, w));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_145)(const GLfloat * v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_145)(const GLfloat * v)
-{
- DISPATCH(Vertex4fv, (v), (F, "glVertex4fv(%p);\n", (const void *) v));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_146)(GLint x, GLint y, GLint z, GLint w);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_146)(GLint x, GLint y, GLint z, GLint w)
-{
- DISPATCH(Vertex4i, (x, y, z, w), (F, "glVertex4i(%d, %d, %d, %d);\n", x, y, z, w));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_147)(const GLint * v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_147)(const GLint * v)
-{
- DISPATCH(Vertex4iv, (v), (F, "glVertex4iv(%p);\n", (const void *) v));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_148)(GLshort x, GLshort y, GLshort z, GLshort w);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_148)(GLshort x, GLshort y, GLshort z, GLshort w)
-{
- DISPATCH(Vertex4s, (x, y, z, w), (F, "glVertex4s(%d, %d, %d, %d);\n", x, y, z, w));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_149)(const GLshort * v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_149)(const GLshort * v)
-{
- DISPATCH(Vertex4sv, (v), (F, "glVertex4sv(%p);\n", (const void *) v));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_150)(GLenum plane, const GLdouble * equation);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_150)(GLenum plane, const GLdouble * equation)
-{
- DISPATCH(ClipPlane, (plane, equation), (F, "glClipPlane(0x%x, %p);\n", plane, (const void *) equation));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_151)(GLenum face, GLenum mode);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_151)(GLenum face, GLenum mode)
-{
- DISPATCH(ColorMaterial, (face, mode), (F, "glColorMaterial(0x%x, 0x%x);\n", face, mode));
-}
-
-KEYWORD1 void KEYWORD2 NAME(CullFace)(GLenum mode)
-{
- DISPATCH(CullFace, (mode), (F, "glCullFace(0x%x);\n", mode));
-}
-
-KEYWORD1 void KEYWORD2 NAME(Fogf)(GLenum pname, GLfloat param)
-{
- DISPATCH(Fogf, (pname, param), (F, "glFogf(0x%x, %f);\n", pname, param));
-}
-
-KEYWORD1 void KEYWORD2 NAME(Fogfv)(GLenum pname, const GLfloat * params)
-{
- DISPATCH(Fogfv, (pname, params), (F, "glFogfv(0x%x, %p);\n", pname, (const void *) params));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_155)(GLenum pname, GLint param);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_155)(GLenum pname, GLint param)
-{
- DISPATCH(Fogi, (pname, param), (F, "glFogi(0x%x, %d);\n", pname, param));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_156)(GLenum pname, const GLint * params);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_156)(GLenum pname, const GLint * params)
-{
- DISPATCH(Fogiv, (pname, params), (F, "glFogiv(0x%x, %p);\n", pname, (const void *) params));
-}
-
-KEYWORD1 void KEYWORD2 NAME(FrontFace)(GLenum mode)
-{
- DISPATCH(FrontFace, (mode), (F, "glFrontFace(0x%x);\n", mode));
-}
-
-KEYWORD1 void KEYWORD2 NAME(Hint)(GLenum target, GLenum mode)
-{
- DISPATCH(Hint, (target, mode), (F, "glHint(0x%x, 0x%x);\n", target, mode));
-}
-
-KEYWORD1 void KEYWORD2 NAME(Lightf)(GLenum light, GLenum pname, GLfloat param)
-{
- DISPATCH(Lightf, (light, pname, param), (F, "glLightf(0x%x, 0x%x, %f);\n", light, pname, param));
-}
-
-KEYWORD1 void KEYWORD2 NAME(Lightfv)(GLenum light, GLenum pname, const GLfloat * params)
-{
- DISPATCH(Lightfv, (light, pname, params), (F, "glLightfv(0x%x, 0x%x, %p);\n", light, pname, (const void *) params));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_161)(GLenum light, GLenum pname, GLint param);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_161)(GLenum light, GLenum pname, GLint param)
-{
- DISPATCH(Lighti, (light, pname, param), (F, "glLighti(0x%x, 0x%x, %d);\n", light, pname, param));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_162)(GLenum light, GLenum pname, const GLint * params);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_162)(GLenum light, GLenum pname, const GLint * params)
-{
- DISPATCH(Lightiv, (light, pname, params), (F, "glLightiv(0x%x, 0x%x, %p);\n", light, pname, (const void *) params));
-}
-
-KEYWORD1 void KEYWORD2 NAME(LightModelf)(GLenum pname, GLfloat param)
-{
- DISPATCH(LightModelf, (pname, param), (F, "glLightModelf(0x%x, %f);\n", pname, param));
-}
-
-KEYWORD1 void KEYWORD2 NAME(LightModelfv)(GLenum pname, const GLfloat * params)
-{
- DISPATCH(LightModelfv, (pname, params), (F, "glLightModelfv(0x%x, %p);\n", pname, (const void *) params));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_165)(GLenum pname, GLint param);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_165)(GLenum pname, GLint param)
-{
- DISPATCH(LightModeli, (pname, param), (F, "glLightModeli(0x%x, %d);\n", pname, param));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_166)(GLenum pname, const GLint * params);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_166)(GLenum pname, const GLint * params)
-{
- DISPATCH(LightModeliv, (pname, params), (F, "glLightModeliv(0x%x, %p);\n", pname, (const void *) params));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_167)(GLint factor, GLushort pattern);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_167)(GLint factor, GLushort pattern)
-{
- DISPATCH(LineStipple, (factor, pattern), (F, "glLineStipple(%d, %d);\n", factor, pattern));
-}
-
-KEYWORD1 void KEYWORD2 NAME(LineWidth)(GLfloat width)
-{
- DISPATCH(LineWidth, (width), (F, "glLineWidth(%f);\n", width));
-}
-
-KEYWORD1 void KEYWORD2 NAME(Materialf)(GLenum face, GLenum pname, GLfloat param)
-{
- DISPATCH(Materialf, (face, pname, param), (F, "glMaterialf(0x%x, 0x%x, %f);\n", face, pname, param));
-}
-
-KEYWORD1 void KEYWORD2 NAME(Materialfv)(GLenum face, GLenum pname, const GLfloat * params)
-{
- DISPATCH(Materialfv, (face, pname, params), (F, "glMaterialfv(0x%x, 0x%x, %p);\n", face, pname, (const void *) params));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_171)(GLenum face, GLenum pname, GLint param);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_171)(GLenum face, GLenum pname, GLint param)
-{
- DISPATCH(Materiali, (face, pname, param), (F, "glMateriali(0x%x, 0x%x, %d);\n", face, pname, param));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_172)(GLenum face, GLenum pname, const GLint * params);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_172)(GLenum face, GLenum pname, const GLint * params)
-{
- DISPATCH(Materialiv, (face, pname, params), (F, "glMaterialiv(0x%x, 0x%x, %p);\n", face, pname, (const void *) params));
-}
-
-KEYWORD1 void KEYWORD2 NAME(PointSize)(GLfloat size)
-{
- DISPATCH(PointSize, (size), (F, "glPointSize(%f);\n", size));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_174)(GLenum face, GLenum mode);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_174)(GLenum face, GLenum mode)
-{
- DISPATCH(PolygonMode, (face, mode), (F, "glPolygonMode(0x%x, 0x%x);\n", face, mode));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_175)(const GLubyte * mask);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_175)(const GLubyte * mask)
-{
- DISPATCH(PolygonStipple, (mask), (F, "glPolygonStipple(%p);\n", (const void *) mask));
-}
-
-KEYWORD1 void KEYWORD2 NAME(Scissor)(GLint x, GLint y, GLsizei width, GLsizei height)
-{
- DISPATCH(Scissor, (x, y, width, height), (F, "glScissor(%d, %d, %d, %d);\n", x, y, width, height));
-}
-
-KEYWORD1 void KEYWORD2 NAME(ShadeModel)(GLenum mode)
-{
- DISPATCH(ShadeModel, (mode), (F, "glShadeModel(0x%x);\n", mode));
-}
-
-KEYWORD1 void KEYWORD2 NAME(TexParameterf)(GLenum target, GLenum pname, GLfloat param)
-{
- DISPATCH(TexParameterf, (target, pname, param), (F, "glTexParameterf(0x%x, 0x%x, %f);\n", target, pname, param));
-}
-
-KEYWORD1 void KEYWORD2 NAME(TexParameterfv)(GLenum target, GLenum pname, const GLfloat * params)
-{
- DISPATCH(TexParameterfv, (target, pname, params), (F, "glTexParameterfv(0x%x, 0x%x, %p);\n", target, pname, (const void *) params));
-}
-
-KEYWORD1 void KEYWORD2 NAME(TexParameteri)(GLenum target, GLenum pname, GLint param)
-{
- DISPATCH(TexParameteri, (target, pname, param), (F, "glTexParameteri(0x%x, 0x%x, %d);\n", target, pname, param));
-}
-
-KEYWORD1 void KEYWORD2 NAME(TexParameteriv)(GLenum target, GLenum pname, const GLint * params)
-{
- DISPATCH(TexParameteriv, (target, pname, params), (F, "glTexParameteriv(0x%x, 0x%x, %p);\n", target, pname, (const void *) params));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_182)(GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid * pixels);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_182)(GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid * pixels)
-{
- DISPATCH(TexImage1D, (target, level, internalformat, width, border, format, type, pixels), (F, "glTexImage1D(0x%x, %d, %d, %d, %d, 0x%x, 0x%x, %p);\n", target, level, internalformat, width, border, format, type, (const void *) pixels));
-}
-
-KEYWORD1 void KEYWORD2 NAME(TexImage2D)(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid * pixels)
-{
- DISPATCH(TexImage2D, (target, level, internalformat, width, height, border, format, type, pixels), (F, "glTexImage2D(0x%x, %d, %d, %d, %d, %d, 0x%x, 0x%x, %p);\n", target, level, internalformat, width, height, border, format, type, (const void *) pixels));
-}
-
-KEYWORD1 void KEYWORD2 NAME(TexEnvf)(GLenum target, GLenum pname, GLfloat param)
-{
- DISPATCH(TexEnvf, (target, pname, param), (F, "glTexEnvf(0x%x, 0x%x, %f);\n", target, pname, param));
-}
-
-KEYWORD1 void KEYWORD2 NAME(TexEnvfv)(GLenum target, GLenum pname, const GLfloat * params)
-{
- DISPATCH(TexEnvfv, (target, pname, params), (F, "glTexEnvfv(0x%x, 0x%x, %p);\n", target, pname, (const void *) params));
-}
-
-KEYWORD1 void KEYWORD2 NAME(TexEnvi)(GLenum target, GLenum pname, GLint param)
-{
- DISPATCH(TexEnvi, (target, pname, param), (F, "glTexEnvi(0x%x, 0x%x, %d);\n", target, pname, param));
-}
-
-KEYWORD1 void KEYWORD2 NAME(TexEnviv)(GLenum target, GLenum pname, const GLint * params)
-{
- DISPATCH(TexEnviv, (target, pname, params), (F, "glTexEnviv(0x%x, 0x%x, %p);\n", target, pname, (const void *) params));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_188)(GLenum coord, GLenum pname, GLdouble param);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_188)(GLenum coord, GLenum pname, GLdouble param)
-{
- DISPATCH(TexGend, (coord, pname, param), (F, "glTexGend(0x%x, 0x%x, %f);\n", coord, pname, param));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_189)(GLenum coord, GLenum pname, const GLdouble * params);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_189)(GLenum coord, GLenum pname, const GLdouble * params)
-{
- DISPATCH(TexGendv, (coord, pname, params), (F, "glTexGendv(0x%x, 0x%x, %p);\n", coord, pname, (const void *) params));
-}
-
-KEYWORD1 void KEYWORD2 NAME(TexGenfOES)(GLenum coord, GLenum pname, GLfloat param);
-
-KEYWORD1 void KEYWORD2 NAME(TexGenfOES)(GLenum coord, GLenum pname, GLfloat param)
-{
- DISPATCH(TexGenfOES, (coord, pname, param), (F, "glTexGenfOES(0x%x, 0x%x, %f);\n", coord, pname, param));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_190)(GLenum coord, GLenum pname, GLfloat param);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_190)(GLenum coord, GLenum pname, GLfloat param)
-{
- DISPATCH(TexGenfOES, (coord, pname, param), (F, "glTexGenf(0x%x, 0x%x, %f);\n", coord, pname, param));
-}
-
-KEYWORD1 void KEYWORD2 NAME(TexGenfvOES)(GLenum coord, GLenum pname, const GLfloat * params);
-
-KEYWORD1 void KEYWORD2 NAME(TexGenfvOES)(GLenum coord, GLenum pname, const GLfloat * params)
-{
- DISPATCH(TexGenfvOES, (coord, pname, params), (F, "glTexGenfvOES(0x%x, 0x%x, %p);\n", coord, pname, (const void *) params));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_191)(GLenum coord, GLenum pname, const GLfloat * params);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_191)(GLenum coord, GLenum pname, const GLfloat * params)
-{
- DISPATCH(TexGenfvOES, (coord, pname, params), (F, "glTexGenfv(0x%x, 0x%x, %p);\n", coord, pname, (const void *) params));
-}
-
-KEYWORD1 void KEYWORD2 NAME(TexGeniOES)(GLenum coord, GLenum pname, GLint param);
-
-KEYWORD1 void KEYWORD2 NAME(TexGeniOES)(GLenum coord, GLenum pname, GLint param)
-{
- DISPATCH(TexGeniOES, (coord, pname, param), (F, "glTexGeniOES(0x%x, 0x%x, %d);\n", coord, pname, param));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_192)(GLenum coord, GLenum pname, GLint param);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_192)(GLenum coord, GLenum pname, GLint param)
-{
- DISPATCH(TexGeniOES, (coord, pname, param), (F, "glTexGeni(0x%x, 0x%x, %d);\n", coord, pname, param));
-}
-
-KEYWORD1 void KEYWORD2 NAME(TexGenivOES)(GLenum coord, GLenum pname, const GLint * params);
-
-KEYWORD1 void KEYWORD2 NAME(TexGenivOES)(GLenum coord, GLenum pname, const GLint * params)
-{
- DISPATCH(TexGenivOES, (coord, pname, params), (F, "glTexGenivOES(0x%x, 0x%x, %p);\n", coord, pname, (const void *) params));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_193)(GLenum coord, GLenum pname, const GLint * params);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_193)(GLenum coord, GLenum pname, const GLint * params)
-{
- DISPATCH(TexGenivOES, (coord, pname, params), (F, "glTexGeniv(0x%x, 0x%x, %p);\n", coord, pname, (const void *) params));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_194)(GLsizei size, GLenum type, GLfloat * buffer);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_194)(GLsizei size, GLenum type, GLfloat * buffer)
-{
- DISPATCH(FeedbackBuffer, (size, type, buffer), (F, "glFeedbackBuffer(%d, 0x%x, %p);\n", size, type, (const void *) buffer));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_195)(GLsizei size, GLuint * buffer);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_195)(GLsizei size, GLuint * buffer)
-{
- DISPATCH(SelectBuffer, (size, buffer), (F, "glSelectBuffer(%d, %p);\n", size, (const void *) buffer));
-}
-
-KEYWORD1_ALT GLint KEYWORD2 NAME(_dispatch_stub_196)(GLenum mode);
-
-KEYWORD1_ALT GLint KEYWORD2 NAME(_dispatch_stub_196)(GLenum mode)
-{
- RETURN_DISPATCH(RenderMode, (mode), (F, "glRenderMode(0x%x);\n", mode));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_197)(void);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_197)(void)
-{
- DISPATCH(InitNames, (), (F, "glInitNames();\n"));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_198)(GLuint name);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_198)(GLuint name)
-{
- DISPATCH(LoadName, (name), (F, "glLoadName(%d);\n", name));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_199)(GLfloat token);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_199)(GLfloat token)
-{
- DISPATCH(PassThrough, (token), (F, "glPassThrough(%f);\n", token));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_200)(void);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_200)(void)
-{
- DISPATCH(PopName, (), (F, "glPopName();\n"));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_201)(GLuint name);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_201)(GLuint name)
-{
- DISPATCH(PushName, (name), (F, "glPushName(%d);\n", name));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_202)(GLenum mode);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_202)(GLenum mode)
-{
- DISPATCH(DrawBuffer, (mode), (F, "glDrawBuffer(0x%x);\n", mode));
-}
-
-KEYWORD1 void KEYWORD2 NAME(Clear)(GLbitfield mask)
-{
- DISPATCH(Clear, (mask), (F, "glClear(%d);\n", mask));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_204)(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_204)(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha)
-{
- DISPATCH(ClearAccum, (red, green, blue, alpha), (F, "glClearAccum(%f, %f, %f, %f);\n", red, green, blue, alpha));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_205)(GLfloat c);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_205)(GLfloat c)
-{
- DISPATCH(ClearIndex, (c), (F, "glClearIndex(%f);\n", c));
-}
-
-KEYWORD1 void KEYWORD2 NAME(ClearColor)(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)
-{
- DISPATCH(ClearColor, (red, green, blue, alpha), (F, "glClearColor(%f, %f, %f, %f);\n", red, green, blue, alpha));
-}
-
-KEYWORD1 void KEYWORD2 NAME(ClearStencil)(GLint s)
-{
- DISPATCH(ClearStencil, (s), (F, "glClearStencil(%d);\n", s));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_208)(GLclampd depth);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_208)(GLclampd depth)
-{
- DISPATCH(ClearDepth, (depth), (F, "glClearDepth(%f);\n", depth));
-}
-
-KEYWORD1 void KEYWORD2 NAME(StencilMask)(GLuint mask)
-{
- DISPATCH(StencilMask, (mask), (F, "glStencilMask(%d);\n", mask));
-}
-
-KEYWORD1 void KEYWORD2 NAME(ColorMask)(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha)
-{
- DISPATCH(ColorMask, (red, green, blue, alpha), (F, "glColorMask(%d, %d, %d, %d);\n", red, green, blue, alpha));
-}
-
-KEYWORD1 void KEYWORD2 NAME(DepthMask)(GLboolean flag)
-{
- DISPATCH(DepthMask, (flag), (F, "glDepthMask(%d);\n", flag));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_212)(GLuint mask);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_212)(GLuint mask)
-{
- DISPATCH(IndexMask, (mask), (F, "glIndexMask(%d);\n", mask));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_213)(GLenum op, GLfloat value);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_213)(GLenum op, GLfloat value)
-{
- DISPATCH(Accum, (op, value), (F, "glAccum(0x%x, %f);\n", op, value));
-}
-
-KEYWORD1 void KEYWORD2 NAME(Disable)(GLenum cap)
-{
- DISPATCH(Disable, (cap), (F, "glDisable(0x%x);\n", cap));
-}
-
-KEYWORD1 void KEYWORD2 NAME(Enable)(GLenum cap)
-{
- DISPATCH(Enable, (cap), (F, "glEnable(0x%x);\n", cap));
-}
-
-KEYWORD1 void KEYWORD2 NAME(Finish)(void)
-{
- DISPATCH(Finish, (), (F, "glFinish();\n"));
-}
-
-KEYWORD1 void KEYWORD2 NAME(Flush)(void)
-{
- DISPATCH(Flush, (), (F, "glFlush();\n"));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_218)(void);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_218)(void)
-{
- DISPATCH(PopAttrib, (), (F, "glPopAttrib();\n"));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_219)(GLbitfield mask);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_219)(GLbitfield mask)
-{
- DISPATCH(PushAttrib, (mask), (F, "glPushAttrib(%d);\n", mask));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_220)(GLenum target, GLdouble u1, GLdouble u2, GLint stride, GLint order, const GLdouble * points);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_220)(GLenum target, GLdouble u1, GLdouble u2, GLint stride, GLint order, const GLdouble * points)
-{
- DISPATCH(Map1d, (target, u1, u2, stride, order, points), (F, "glMap1d(0x%x, %f, %f, %d, %d, %p);\n", target, u1, u2, stride, order, (const void *) points));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_221)(GLenum target, GLfloat u1, GLfloat u2, GLint stride, GLint order, const GLfloat * points);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_221)(GLenum target, GLfloat u1, GLfloat u2, GLint stride, GLint order, const GLfloat * points)
-{
- DISPATCH(Map1f, (target, u1, u2, stride, order, points), (F, "glMap1f(0x%x, %f, %f, %d, %d, %p);\n", target, u1, u2, stride, order, (const void *) points));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_222)(GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, const GLdouble * points);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_222)(GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, const GLdouble * points)
-{
- DISPATCH(Map2d, (target, u1, u2, ustride, uorder, v1, v2, vstride, vorder, points), (F, "glMap2d(0x%x, %f, %f, %d, %d, %f, %f, %d, %d, %p);\n", target, u1, u2, ustride, uorder, v1, v2, vstride, vorder, (const void *) points));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_223)(GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, const GLfloat * points);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_223)(GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, const GLfloat * points)
-{
- DISPATCH(Map2f, (target, u1, u2, ustride, uorder, v1, v2, vstride, vorder, points), (F, "glMap2f(0x%x, %f, %f, %d, %d, %f, %f, %d, %d, %p);\n", target, u1, u2, ustride, uorder, v1, v2, vstride, vorder, (const void *) points));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_224)(GLint un, GLdouble u1, GLdouble u2);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_224)(GLint un, GLdouble u1, GLdouble u2)
-{
- DISPATCH(MapGrid1d, (un, u1, u2), (F, "glMapGrid1d(%d, %f, %f);\n", un, u1, u2));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_225)(GLint un, GLfloat u1, GLfloat u2);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_225)(GLint un, GLfloat u1, GLfloat u2)
-{
- DISPATCH(MapGrid1f, (un, u1, u2), (F, "glMapGrid1f(%d, %f, %f);\n", un, u1, u2));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_226)(GLint un, GLdouble u1, GLdouble u2, GLint vn, GLdouble v1, GLdouble v2);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_226)(GLint un, GLdouble u1, GLdouble u2, GLint vn, GLdouble v1, GLdouble v2)
-{
- DISPATCH(MapGrid2d, (un, u1, u2, vn, v1, v2), (F, "glMapGrid2d(%d, %f, %f, %d, %f, %f);\n", un, u1, u2, vn, v1, v2));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_227)(GLint un, GLfloat u1, GLfloat u2, GLint vn, GLfloat v1, GLfloat v2);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_227)(GLint un, GLfloat u1, GLfloat u2, GLint vn, GLfloat v1, GLfloat v2)
-{
- DISPATCH(MapGrid2f, (un, u1, u2, vn, v1, v2), (F, "glMapGrid2f(%d, %f, %f, %d, %f, %f);\n", un, u1, u2, vn, v1, v2));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_228)(GLdouble u);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_228)(GLdouble u)
-{
- DISPATCH(EvalCoord1d, (u), (F, "glEvalCoord1d(%f);\n", u));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_229)(const GLdouble * u);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_229)(const GLdouble * u)
-{
- DISPATCH(EvalCoord1dv, (u), (F, "glEvalCoord1dv(%p);\n", (const void *) u));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_230)(GLfloat u);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_230)(GLfloat u)
-{
- DISPATCH(EvalCoord1f, (u), (F, "glEvalCoord1f(%f);\n", u));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_231)(const GLfloat * u);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_231)(const GLfloat * u)
-{
- DISPATCH(EvalCoord1fv, (u), (F, "glEvalCoord1fv(%p);\n", (const void *) u));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_232)(GLdouble u, GLdouble v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_232)(GLdouble u, GLdouble v)
-{
- DISPATCH(EvalCoord2d, (u, v), (F, "glEvalCoord2d(%f, %f);\n", u, v));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_233)(const GLdouble * u);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_233)(const GLdouble * u)
-{
- DISPATCH(EvalCoord2dv, (u), (F, "glEvalCoord2dv(%p);\n", (const void *) u));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_234)(GLfloat u, GLfloat v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_234)(GLfloat u, GLfloat v)
-{
- DISPATCH(EvalCoord2f, (u, v), (F, "glEvalCoord2f(%f, %f);\n", u, v));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_235)(const GLfloat * u);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_235)(const GLfloat * u)
-{
- DISPATCH(EvalCoord2fv, (u), (F, "glEvalCoord2fv(%p);\n", (const void *) u));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_236)(GLenum mode, GLint i1, GLint i2);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_236)(GLenum mode, GLint i1, GLint i2)
-{
- DISPATCH(EvalMesh1, (mode, i1, i2), (F, "glEvalMesh1(0x%x, %d, %d);\n", mode, i1, i2));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_237)(GLint i);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_237)(GLint i)
-{
- DISPATCH(EvalPoint1, (i), (F, "glEvalPoint1(%d);\n", i));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_238)(GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_238)(GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2)
-{
- DISPATCH(EvalMesh2, (mode, i1, i2, j1, j2), (F, "glEvalMesh2(0x%x, %d, %d, %d, %d);\n", mode, i1, i2, j1, j2));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_239)(GLint i, GLint j);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_239)(GLint i, GLint j)
-{
- DISPATCH(EvalPoint2, (i, j), (F, "glEvalPoint2(%d, %d);\n", i, j));
-}
-
-KEYWORD1 void KEYWORD2 NAME(AlphaFunc)(GLenum func, GLclampf ref)
-{
- DISPATCH(AlphaFunc, (func, ref), (F, "glAlphaFunc(0x%x, %f);\n", func, ref));
-}
-
-KEYWORD1 void KEYWORD2 NAME(BlendFunc)(GLenum sfactor, GLenum dfactor)
-{
- DISPATCH(BlendFunc, (sfactor, dfactor), (F, "glBlendFunc(0x%x, 0x%x);\n", sfactor, dfactor));
-}
-
-KEYWORD1 void KEYWORD2 NAME(LogicOp)(GLenum opcode)
-{
- DISPATCH(LogicOp, (opcode), (F, "glLogicOp(0x%x);\n", opcode));
-}
-
-KEYWORD1 void KEYWORD2 NAME(StencilFunc)(GLenum func, GLint ref, GLuint mask)
-{
- DISPATCH(StencilFunc, (func, ref, mask), (F, "glStencilFunc(0x%x, %d, %d);\n", func, ref, mask));
-}
-
-KEYWORD1 void KEYWORD2 NAME(StencilOp)(GLenum fail, GLenum zfail, GLenum zpass)
-{
- DISPATCH(StencilOp, (fail, zfail, zpass), (F, "glStencilOp(0x%x, 0x%x, 0x%x);\n", fail, zfail, zpass));
-}
-
-KEYWORD1 void KEYWORD2 NAME(DepthFunc)(GLenum func)
-{
- DISPATCH(DepthFunc, (func), (F, "glDepthFunc(0x%x);\n", func));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_246)(GLfloat xfactor, GLfloat yfactor);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_246)(GLfloat xfactor, GLfloat yfactor)
-{
- DISPATCH(PixelZoom, (xfactor, yfactor), (F, "glPixelZoom(%f, %f);\n", xfactor, yfactor));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_247)(GLenum pname, GLfloat param);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_247)(GLenum pname, GLfloat param)
-{
- DISPATCH(PixelTransferf, (pname, param), (F, "glPixelTransferf(0x%x, %f);\n", pname, param));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_248)(GLenum pname, GLint param);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_248)(GLenum pname, GLint param)
-{
- DISPATCH(PixelTransferi, (pname, param), (F, "glPixelTransferi(0x%x, %d);\n", pname, param));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_249)(GLenum pname, GLfloat param);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_249)(GLenum pname, GLfloat param)
-{
- DISPATCH(PixelStoref, (pname, param), (F, "glPixelStoref(0x%x, %f);\n", pname, param));
-}
-
-KEYWORD1 void KEYWORD2 NAME(PixelStorei)(GLenum pname, GLint param)
-{
- DISPATCH(PixelStorei, (pname, param), (F, "glPixelStorei(0x%x, %d);\n", pname, param));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_251)(GLenum map, GLsizei mapsize, const GLfloat * values);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_251)(GLenum map, GLsizei mapsize, const GLfloat * values)
-{
- DISPATCH(PixelMapfv, (map, mapsize, values), (F, "glPixelMapfv(0x%x, %d, %p);\n", map, mapsize, (const void *) values));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_252)(GLenum map, GLsizei mapsize, const GLuint * values);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_252)(GLenum map, GLsizei mapsize, const GLuint * values)
-{
- DISPATCH(PixelMapuiv, (map, mapsize, values), (F, "glPixelMapuiv(0x%x, %d, %p);\n", map, mapsize, (const void *) values));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_253)(GLenum map, GLsizei mapsize, const GLushort * values);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_253)(GLenum map, GLsizei mapsize, const GLushort * values)
-{
- DISPATCH(PixelMapusv, (map, mapsize, values), (F, "glPixelMapusv(0x%x, %d, %p);\n", map, mapsize, (const void *) values));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_254)(GLenum mode);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_254)(GLenum mode)
-{
- DISPATCH(ReadBuffer, (mode), (F, "glReadBuffer(0x%x);\n", mode));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_255)(GLint x, GLint y, GLsizei width, GLsizei height, GLenum type);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_255)(GLint x, GLint y, GLsizei width, GLsizei height, GLenum type)
-{
- DISPATCH(CopyPixels, (x, y, width, height, type), (F, "glCopyPixels(%d, %d, %d, %d, 0x%x);\n", x, y, width, height, type));
-}
-
-KEYWORD1 void KEYWORD2 NAME(ReadPixels)(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid * pixels)
-{
- DISPATCH(ReadPixels, (x, y, width, height, format, type, pixels), (F, "glReadPixels(%d, %d, %d, %d, 0x%x, 0x%x, %p);\n", x, y, width, height, format, type, (const void *) pixels));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_257)(GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid * pixels);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_257)(GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid * pixels)
-{
- DISPATCH(DrawPixels, (width, height, format, type, pixels), (F, "glDrawPixels(%d, %d, 0x%x, 0x%x, %p);\n", width, height, format, type, (const void *) pixels));
-}
-
-KEYWORD1 void KEYWORD2 NAME(GetBooleanv)(GLenum pname, GLboolean * params)
-{
- DISPATCH(GetBooleanv, (pname, params), (F, "glGetBooleanv(0x%x, %p);\n", pname, (const void *) params));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_259)(GLenum plane, GLdouble * equation);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_259)(GLenum plane, GLdouble * equation)
-{
- DISPATCH(GetClipPlane, (plane, equation), (F, "glGetClipPlane(0x%x, %p);\n", plane, (const void *) equation));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_260)(GLenum pname, GLdouble * params);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_260)(GLenum pname, GLdouble * params)
-{
- DISPATCH(GetDoublev, (pname, params), (F, "glGetDoublev(0x%x, %p);\n", pname, (const void *) params));
-}
-
-KEYWORD1 GLenum KEYWORD2 NAME(GetError)(void)
-{
- RETURN_DISPATCH(GetError, (), (F, "glGetError();\n"));
-}
-
-KEYWORD1 void KEYWORD2 NAME(GetFloatv)(GLenum pname, GLfloat * params)
-{
- DISPATCH(GetFloatv, (pname, params), (F, "glGetFloatv(0x%x, %p);\n", pname, (const void *) params));
-}
-
-KEYWORD1 void KEYWORD2 NAME(GetIntegerv)(GLenum pname, GLint * params)
-{
- DISPATCH(GetIntegerv, (pname, params), (F, "glGetIntegerv(0x%x, %p);\n", pname, (const void *) params));
-}
-
-KEYWORD1 void KEYWORD2 NAME(GetLightfv)(GLenum light, GLenum pname, GLfloat * params)
-{
- DISPATCH(GetLightfv, (light, pname, params), (F, "glGetLightfv(0x%x, 0x%x, %p);\n", light, pname, (const void *) params));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_265)(GLenum light, GLenum pname, GLint * params);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_265)(GLenum light, GLenum pname, GLint * params)
-{
- DISPATCH(GetLightiv, (light, pname, params), (F, "glGetLightiv(0x%x, 0x%x, %p);\n", light, pname, (const void *) params));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_266)(GLenum target, GLenum query, GLdouble * v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_266)(GLenum target, GLenum query, GLdouble * v)
-{
- DISPATCH(GetMapdv, (target, query, v), (F, "glGetMapdv(0x%x, 0x%x, %p);\n", target, query, (const void *) v));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_267)(GLenum target, GLenum query, GLfloat * v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_267)(GLenum target, GLenum query, GLfloat * v)
-{
- DISPATCH(GetMapfv, (target, query, v), (F, "glGetMapfv(0x%x, 0x%x, %p);\n", target, query, (const void *) v));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_268)(GLenum target, GLenum query, GLint * v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_268)(GLenum target, GLenum query, GLint * v)
-{
- DISPATCH(GetMapiv, (target, query, v), (F, "glGetMapiv(0x%x, 0x%x, %p);\n", target, query, (const void *) v));
-}
-
-KEYWORD1 void KEYWORD2 NAME(GetMaterialfv)(GLenum face, GLenum pname, GLfloat * params)
-{
- DISPATCH(GetMaterialfv, (face, pname, params), (F, "glGetMaterialfv(0x%x, 0x%x, %p);\n", face, pname, (const void *) params));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_270)(GLenum face, GLenum pname, GLint * params);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_270)(GLenum face, GLenum pname, GLint * params)
-{
- DISPATCH(GetMaterialiv, (face, pname, params), (F, "glGetMaterialiv(0x%x, 0x%x, %p);\n", face, pname, (const void *) params));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_271)(GLenum map, GLfloat * values);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_271)(GLenum map, GLfloat * values)
-{
- DISPATCH(GetPixelMapfv, (map, values), (F, "glGetPixelMapfv(0x%x, %p);\n", map, (const void *) values));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_272)(GLenum map, GLuint * values);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_272)(GLenum map, GLuint * values)
-{
- DISPATCH(GetPixelMapuiv, (map, values), (F, "glGetPixelMapuiv(0x%x, %p);\n", map, (const void *) values));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_273)(GLenum map, GLushort * values);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_273)(GLenum map, GLushort * values)
-{
- DISPATCH(GetPixelMapusv, (map, values), (F, "glGetPixelMapusv(0x%x, %p);\n", map, (const void *) values));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_274)(GLubyte * mask);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_274)(GLubyte * mask)
-{
- DISPATCH(GetPolygonStipple, (mask), (F, "glGetPolygonStipple(%p);\n", (const void *) mask));
-}
-
-KEYWORD1 const GLubyte * KEYWORD2 NAME(GetString)(GLenum name)
-{
- RETURN_DISPATCH(GetString, (name), (F, "glGetString(0x%x);\n", name));
-}
-
-KEYWORD1 void KEYWORD2 NAME(GetTexEnvfv)(GLenum target, GLenum pname, GLfloat * params)
-{
- DISPATCH(GetTexEnvfv, (target, pname, params), (F, "glGetTexEnvfv(0x%x, 0x%x, %p);\n", target, pname, (const void *) params));
-}
-
-KEYWORD1 void KEYWORD2 NAME(GetTexEnviv)(GLenum target, GLenum pname, GLint * params)
-{
- DISPATCH(GetTexEnviv, (target, pname, params), (F, "glGetTexEnviv(0x%x, 0x%x, %p);\n", target, pname, (const void *) params));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_278)(GLenum coord, GLenum pname, GLdouble * params);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_278)(GLenum coord, GLenum pname, GLdouble * params)
-{
- DISPATCH(GetTexGendv, (coord, pname, params), (F, "glGetTexGendv(0x%x, 0x%x, %p);\n", coord, pname, (const void *) params));
-}
-
-KEYWORD1 void KEYWORD2 NAME(GetTexGenfvOES)(GLenum coord, GLenum pname, GLfloat * params);
-
-KEYWORD1 void KEYWORD2 NAME(GetTexGenfvOES)(GLenum coord, GLenum pname, GLfloat * params)
-{
- DISPATCH(GetTexGenfvOES, (coord, pname, params), (F, "glGetTexGenfvOES(0x%x, 0x%x, %p);\n", coord, pname, (const void *) params));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_279)(GLenum coord, GLenum pname, GLfloat * params);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_279)(GLenum coord, GLenum pname, GLfloat * params)
-{
- DISPATCH(GetTexGenfvOES, (coord, pname, params), (F, "glGetTexGenfv(0x%x, 0x%x, %p);\n", coord, pname, (const void *) params));
-}
-
-KEYWORD1 void KEYWORD2 NAME(GetTexGenivOES)(GLenum coord, GLenum pname, GLint * params);
-
-KEYWORD1 void KEYWORD2 NAME(GetTexGenivOES)(GLenum coord, GLenum pname, GLint * params)
-{
- DISPATCH(GetTexGenivOES, (coord, pname, params), (F, "glGetTexGenivOES(0x%x, 0x%x, %p);\n", coord, pname, (const void *) params));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_280)(GLenum coord, GLenum pname, GLint * params);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_280)(GLenum coord, GLenum pname, GLint * params)
-{
- DISPATCH(GetTexGenivOES, (coord, pname, params), (F, "glGetTexGeniv(0x%x, 0x%x, %p);\n", coord, pname, (const void *) params));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_281)(GLenum target, GLint level, GLenum format, GLenum type, GLvoid * pixels);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_281)(GLenum target, GLint level, GLenum format, GLenum type, GLvoid * pixels)
-{
- DISPATCH(GetTexImage, (target, level, format, type, pixels), (F, "glGetTexImage(0x%x, %d, 0x%x, 0x%x, %p);\n", target, level, format, type, (const void *) pixels));
-}
-
-KEYWORD1 void KEYWORD2 NAME(GetTexParameterfv)(GLenum target, GLenum pname, GLfloat * params)
-{
- DISPATCH(GetTexParameterfv, (target, pname, params), (F, "glGetTexParameterfv(0x%x, 0x%x, %p);\n", target, pname, (const void *) params));
-}
-
-KEYWORD1 void KEYWORD2 NAME(GetTexParameteriv)(GLenum target, GLenum pname, GLint * params)
-{
- DISPATCH(GetTexParameteriv, (target, pname, params), (F, "glGetTexParameteriv(0x%x, 0x%x, %p);\n", target, pname, (const void *) params));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_284)(GLenum target, GLint level, GLenum pname, GLfloat * params);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_284)(GLenum target, GLint level, GLenum pname, GLfloat * params)
-{
- DISPATCH(GetTexLevelParameterfv, (target, level, pname, params), (F, "glGetTexLevelParameterfv(0x%x, %d, 0x%x, %p);\n", target, level, pname, (const void *) params));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_285)(GLenum target, GLint level, GLenum pname, GLint * params);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_285)(GLenum target, GLint level, GLenum pname, GLint * params)
-{
- DISPATCH(GetTexLevelParameteriv, (target, level, pname, params), (F, "glGetTexLevelParameteriv(0x%x, %d, 0x%x, %p);\n", target, level, pname, (const void *) params));
-}
-
-KEYWORD1 GLboolean KEYWORD2 NAME(IsEnabled)(GLenum cap)
-{
- RETURN_DISPATCH(IsEnabled, (cap), (F, "glIsEnabled(0x%x);\n", cap));
-}
-
-KEYWORD1_ALT GLboolean KEYWORD2 NAME(_dispatch_stub_287)(GLuint list);
-
-KEYWORD1_ALT GLboolean KEYWORD2 NAME(_dispatch_stub_287)(GLuint list)
-{
- RETURN_DISPATCH(IsList, (list), (F, "glIsList(%d);\n", list));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_288)(GLclampd zNear, GLclampd zFar);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_288)(GLclampd zNear, GLclampd zFar)
-{
- DISPATCH(DepthRange, (zNear, zFar), (F, "glDepthRange(%f, %f);\n", zNear, zFar));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_289)(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_289)(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar)
-{
- DISPATCH(Frustum, (left, right, bottom, top, zNear, zFar), (F, "glFrustum(%f, %f, %f, %f, %f, %f);\n", left, right, bottom, top, zNear, zFar));
-}
-
-KEYWORD1 void KEYWORD2 NAME(LoadIdentity)(void)
-{
- DISPATCH(LoadIdentity, (), (F, "glLoadIdentity();\n"));
-}
-
-KEYWORD1 void KEYWORD2 NAME(LoadMatrixf)(const GLfloat * m)
-{
- DISPATCH(LoadMatrixf, (m), (F, "glLoadMatrixf(%p);\n", (const void *) m));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_292)(const GLdouble * m);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_292)(const GLdouble * m)
-{
- DISPATCH(LoadMatrixd, (m), (F, "glLoadMatrixd(%p);\n", (const void *) m));
-}
-
-KEYWORD1 void KEYWORD2 NAME(MatrixMode)(GLenum mode)
-{
- DISPATCH(MatrixMode, (mode), (F, "glMatrixMode(0x%x);\n", mode));
-}
-
-KEYWORD1 void KEYWORD2 NAME(MultMatrixf)(const GLfloat * m)
-{
- DISPATCH(MultMatrixf, (m), (F, "glMultMatrixf(%p);\n", (const void *) m));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_295)(const GLdouble * m);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_295)(const GLdouble * m)
-{
- DISPATCH(MultMatrixd, (m), (F, "glMultMatrixd(%p);\n", (const void *) m));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_296)(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_296)(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar)
-{
- DISPATCH(Ortho, (left, right, bottom, top, zNear, zFar), (F, "glOrtho(%f, %f, %f, %f, %f, %f);\n", left, right, bottom, top, zNear, zFar));
-}
-
-KEYWORD1 void KEYWORD2 NAME(PopMatrix)(void)
-{
- DISPATCH(PopMatrix, (), (F, "glPopMatrix();\n"));
-}
-
-KEYWORD1 void KEYWORD2 NAME(PushMatrix)(void)
-{
- DISPATCH(PushMatrix, (), (F, "glPushMatrix();\n"));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_299)(GLdouble angle, GLdouble x, GLdouble y, GLdouble z);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_299)(GLdouble angle, GLdouble x, GLdouble y, GLdouble z)
-{
- DISPATCH(Rotated, (angle, x, y, z), (F, "glRotated(%f, %f, %f, %f);\n", angle, x, y, z));
-}
-
-KEYWORD1 void KEYWORD2 NAME(Rotatef)(GLfloat angle, GLfloat x, GLfloat y, GLfloat z)
-{
- DISPATCH(Rotatef, (angle, x, y, z), (F, "glRotatef(%f, %f, %f, %f);\n", angle, x, y, z));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_301)(GLdouble x, GLdouble y, GLdouble z);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_301)(GLdouble x, GLdouble y, GLdouble z)
-{
- DISPATCH(Scaled, (x, y, z), (F, "glScaled(%f, %f, %f);\n", x, y, z));
-}
-
-KEYWORD1 void KEYWORD2 NAME(Scalef)(GLfloat x, GLfloat y, GLfloat z)
-{
- DISPATCH(Scalef, (x, y, z), (F, "glScalef(%f, %f, %f);\n", x, y, z));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_303)(GLdouble x, GLdouble y, GLdouble z);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_303)(GLdouble x, GLdouble y, GLdouble z)
-{
- DISPATCH(Translated, (x, y, z), (F, "glTranslated(%f, %f, %f);\n", x, y, z));
-}
-
-KEYWORD1 void KEYWORD2 NAME(Translatef)(GLfloat x, GLfloat y, GLfloat z)
-{
- DISPATCH(Translatef, (x, y, z), (F, "glTranslatef(%f, %f, %f);\n", x, y, z));
-}
-
-KEYWORD1 void KEYWORD2 NAME(Viewport)(GLint x, GLint y, GLsizei width, GLsizei height)
-{
- DISPATCH(Viewport, (x, y, width, height), (F, "glViewport(%d, %d, %d, %d);\n", x, y, width, height));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_306)(GLint i);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_306)(GLint i)
-{
- DISPATCH(ArrayElement, (i), (F, "glArrayElement(%d);\n", i));
-}
-
-KEYWORD1 void KEYWORD2 NAME(BindTexture)(GLenum target, GLuint texture)
-{
- DISPATCH(BindTexture, (target, texture), (F, "glBindTexture(0x%x, %d);\n", target, texture));
-}
-
-KEYWORD1 void KEYWORD2 NAME(ColorPointer)(GLint size, GLenum type, GLsizei stride, const GLvoid * pointer)
-{
- DISPATCH(ColorPointer, (size, type, stride, pointer), (F, "glColorPointer(%d, 0x%x, %d, %p);\n", size, type, stride, (const void *) pointer));
-}
-
-KEYWORD1 void KEYWORD2 NAME(DisableClientState)(GLenum array)
-{
- DISPATCH(DisableClientState, (array), (F, "glDisableClientState(0x%x);\n", array));
-}
-
-KEYWORD1 void KEYWORD2 NAME(DrawArrays)(GLenum mode, GLint first, GLsizei count)
-{
- DISPATCH(DrawArrays, (mode, first, count), (F, "glDrawArrays(0x%x, %d, %d);\n", mode, first, count));
-}
-
-KEYWORD1 void KEYWORD2 NAME(DrawElements)(GLenum mode, GLsizei count, GLenum type, const GLvoid * indices)
-{
- DISPATCH(DrawElements, (mode, count, type, indices), (F, "glDrawElements(0x%x, %d, 0x%x, %p);\n", mode, count, type, (const void *) indices));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_312)(GLsizei stride, const GLvoid * pointer);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_312)(GLsizei stride, const GLvoid * pointer)
-{
- DISPATCH(EdgeFlagPointer, (stride, pointer), (F, "glEdgeFlagPointer(%d, %p);\n", stride, (const void *) pointer));
-}
-
-KEYWORD1 void KEYWORD2 NAME(EnableClientState)(GLenum array)
-{
- DISPATCH(EnableClientState, (array), (F, "glEnableClientState(0x%x);\n", array));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_314)(GLenum type, GLsizei stride, const GLvoid * pointer);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_314)(GLenum type, GLsizei stride, const GLvoid * pointer)
-{
- DISPATCH(IndexPointer, (type, stride, pointer), (F, "glIndexPointer(0x%x, %d, %p);\n", type, stride, (const void *) pointer));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_315)(GLubyte c);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_315)(GLubyte c)
-{
- DISPATCH(Indexub, (c), (F, "glIndexub(%d);\n", c));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_316)(const GLubyte * c);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_316)(const GLubyte * c)
-{
- DISPATCH(Indexubv, (c), (F, "glIndexubv(%p);\n", (const void *) c));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_317)(GLenum format, GLsizei stride, const GLvoid * pointer);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_317)(GLenum format, GLsizei stride, const GLvoid * pointer)
-{
- DISPATCH(InterleavedArrays, (format, stride, pointer), (F, "glInterleavedArrays(0x%x, %d, %p);\n", format, stride, (const void *) pointer));
-}
-
-KEYWORD1 void KEYWORD2 NAME(NormalPointer)(GLenum type, GLsizei stride, const GLvoid * pointer)
-{
- DISPATCH(NormalPointer, (type, stride, pointer), (F, "glNormalPointer(0x%x, %d, %p);\n", type, stride, (const void *) pointer));
-}
-
-KEYWORD1 void KEYWORD2 NAME(PolygonOffset)(GLfloat factor, GLfloat units)
-{
- DISPATCH(PolygonOffset, (factor, units), (F, "glPolygonOffset(%f, %f);\n", factor, units));
-}
-
-KEYWORD1 void KEYWORD2 NAME(TexCoordPointer)(GLint size, GLenum type, GLsizei stride, const GLvoid * pointer)
-{
- DISPATCH(TexCoordPointer, (size, type, stride, pointer), (F, "glTexCoordPointer(%d, 0x%x, %d, %p);\n", size, type, stride, (const void *) pointer));
-}
-
-KEYWORD1 void KEYWORD2 NAME(VertexPointer)(GLint size, GLenum type, GLsizei stride, const GLvoid * pointer)
-{
- DISPATCH(VertexPointer, (size, type, stride, pointer), (F, "glVertexPointer(%d, 0x%x, %d, %p);\n", size, type, stride, (const void *) pointer));
-}
-
-KEYWORD1_ALT GLboolean KEYWORD2 NAME(_dispatch_stub_322)(GLsizei n, const GLuint * textures, GLboolean * residences);
-
-KEYWORD1_ALT GLboolean KEYWORD2 NAME(_dispatch_stub_322)(GLsizei n, const GLuint * textures, GLboolean * residences)
-{
- RETURN_DISPATCH(AreTexturesResident, (n, textures, residences), (F, "glAreTexturesResident(%d, %p, %p);\n", n, (const void *) textures, (const void *) residences));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_323)(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_323)(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));
-}
-
-KEYWORD1 void KEYWORD2 NAME(CopyTexImage2D)(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border)
-{
- DISPATCH(CopyTexImage2D, (target, level, internalformat, x, y, width, height, border), (F, "glCopyTexImage2D(0x%x, %d, 0x%x, %d, %d, %d, %d, %d);\n", target, level, internalformat, x, y, width, height, border));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_325)(GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_325)(GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width)
-{
- DISPATCH(CopyTexSubImage1D, (target, level, xoffset, x, y, width), (F, "glCopyTexSubImage1D(0x%x, %d, %d, %d, %d, %d);\n", target, level, xoffset, x, y, width));
-}
-
-KEYWORD1 void KEYWORD2 NAME(CopyTexSubImage2D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height)
-{
- DISPATCH(CopyTexSubImage2D, (target, level, xoffset, yoffset, x, y, width, height), (F, "glCopyTexSubImage2D(0x%x, %d, %d, %d, %d, %d, %d, %d);\n", target, level, xoffset, yoffset, x, y, width, height));
-}
-
-KEYWORD1 void KEYWORD2 NAME(DeleteTextures)(GLsizei n, const GLuint * textures)
-{
- DISPATCH(DeleteTextures, (n, textures), (F, "glDeleteTextures(%d, %p);\n", n, (const void *) textures));
-}
-
-KEYWORD1 void KEYWORD2 NAME(GenTextures)(GLsizei n, GLuint * textures)
-{
- DISPATCH(GenTextures, (n, textures), (F, "glGenTextures(%d, %p);\n", n, (const void *) textures));
-}
-
-KEYWORD1 void KEYWORD2 NAME(GetPointerv)(GLenum pname, GLvoid ** params)
-{
- DISPATCH(GetPointerv, (pname, params), (F, "glGetPointerv(0x%x, %p);\n", pname, (const void *) params));
-}
-
-KEYWORD1 GLboolean KEYWORD2 NAME(IsTexture)(GLuint texture)
-{
- RETURN_DISPATCH(IsTexture, (texture), (F, "glIsTexture(%d);\n", texture));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_331)(GLsizei n, const GLuint * textures, const GLclampf * priorities);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_331)(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));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_332)(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid * pixels);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_332)(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid * pixels)
-{
- DISPATCH(TexSubImage1D, (target, level, xoffset, width, format, type, pixels), (F, "glTexSubImage1D(0x%x, %d, %d, %d, 0x%x, 0x%x, %p);\n", target, level, xoffset, width, format, type, (const void *) pixels));
-}
-
-KEYWORD1 void KEYWORD2 NAME(TexSubImage2D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid * pixels)
-{
- DISPATCH(TexSubImage2D, (target, level, xoffset, yoffset, width, height, format, type, pixels), (F, "glTexSubImage2D(0x%x, %d, %d, %d, %d, %d, 0x%x, 0x%x, %p);\n", target, level, xoffset, yoffset, width, height, format, type, (const void *) pixels));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_334)(void);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_334)(void)
-{
- DISPATCH(PopClientAttrib, (), (F, "glPopClientAttrib();\n"));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_335)(GLbitfield mask);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_335)(GLbitfield mask)
-{
- DISPATCH(PushClientAttrib, (mask), (F, "glPushClientAttrib(%d);\n", mask));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_336)(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_336)(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)
-{
- DISPATCH(BlendColor, (red, green, blue, alpha), (F, "glBlendColor(%f, %f, %f, %f);\n", red, green, blue, alpha));
-}
-
-KEYWORD1 void KEYWORD2 NAME(BlendEquationOES)(GLenum mode);
-
-KEYWORD1 void KEYWORD2 NAME(BlendEquationOES)(GLenum mode)
-{
- DISPATCH(BlendEquationOES, (mode), (F, "glBlendEquationOES(0x%x);\n", mode));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_337)(GLenum mode);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_337)(GLenum mode)
-{
- DISPATCH(BlendEquationOES, (mode), (F, "glBlendEquation(0x%x);\n", mode));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_338)(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid * indices);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_338)(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid * indices)
-{
- DISPATCH(DrawRangeElements, (mode, start, end, count, type, indices), (F, "glDrawRangeElements(0x%x, %d, %d, %d, 0x%x, %p);\n", mode, start, end, count, type, (const void *) indices));
-}
-
-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)
-{
- 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_ALT void KEYWORD2 NAME(_dispatch_stub_340)(GLenum target, GLenum pname, const GLfloat * params);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_340)(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));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_341)(GLenum target, GLenum pname, const GLint * params);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_341)(GLenum target, GLenum pname, const GLint * params)
-{
- DISPATCH(ColorTableParameteriv, (target, pname, params), (F, "glColorTableParameteriv(0x%x, 0x%x, %p);\n", target, pname, (const void *) params));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_342)(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_342)(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width)
-{
- DISPATCH(CopyColorTable, (target, internalformat, x, y, width), (F, "glCopyColorTable(0x%x, 0x%x, %d, %d, %d);\n", target, internalformat, x, y, width));
-}
-
-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, "glGetColorTable(0x%x, 0x%x, 0x%x, %p);\n", target, format, type, (const void *) table));
-}
-
-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, "glGetColorTableParameterfv(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, "glGetColorTableParameteriv(0x%x, 0x%x, %p);\n", target, pname, (const void *) params));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_346)(GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid * data);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_346)(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));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_347)(GLenum target, GLsizei start, GLint x, GLint y, GLsizei width);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_347)(GLenum target, GLsizei start, GLint x, GLint y, GLsizei width)
-{
- DISPATCH(CopyColorSubTable, (target, start, x, y, width), (F, "glCopyColorSubTable(0x%x, %d, %d, %d, %d);\n", target, start, x, y, width));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_348)(GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid * image);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_348)(GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid * image)
-{
- DISPATCH(ConvolutionFilter1D, (target, internalformat, width, format, type, image), (F, "glConvolutionFilter1D(0x%x, 0x%x, %d, 0x%x, 0x%x, %p);\n", target, internalformat, width, format, type, (const void *) image));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_349)(GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid * image);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_349)(GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid * image)
-{
- DISPATCH(ConvolutionFilter2D, (target, internalformat, width, height, format, type, image), (F, "glConvolutionFilter2D(0x%x, 0x%x, %d, %d, 0x%x, 0x%x, %p);\n", target, internalformat, width, height, format, type, (const void *) image));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_350)(GLenum target, GLenum pname, GLfloat params);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_350)(GLenum target, GLenum pname, GLfloat params)
-{
- DISPATCH(ConvolutionParameterf, (target, pname, params), (F, "glConvolutionParameterf(0x%x, 0x%x, %f);\n", target, pname, params));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_351)(GLenum target, GLenum pname, const GLfloat * params);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_351)(GLenum target, GLenum pname, const GLfloat * params)
-{
- DISPATCH(ConvolutionParameterfv, (target, pname, params), (F, "glConvolutionParameterfv(0x%x, 0x%x, %p);\n", target, pname, (const void *) params));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_352)(GLenum target, GLenum pname, GLint params);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_352)(GLenum target, GLenum pname, GLint params)
-{
- DISPATCH(ConvolutionParameteri, (target, pname, params), (F, "glConvolutionParameteri(0x%x, 0x%x, %d);\n", target, pname, params));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_353)(GLenum target, GLenum pname, const GLint * params);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_353)(GLenum target, GLenum pname, const GLint * params)
-{
- DISPATCH(ConvolutionParameteriv, (target, pname, params), (F, "glConvolutionParameteriv(0x%x, 0x%x, %p);\n", target, pname, (const void *) params));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_354)(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_354)(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width)
-{
- DISPATCH(CopyConvolutionFilter1D, (target, internalformat, x, y, width), (F, "glCopyConvolutionFilter1D(0x%x, 0x%x, %d, %d, %d);\n", target, internalformat, x, y, width));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_355)(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_355)(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height)
-{
- DISPATCH(CopyConvolutionFilter2D, (target, internalformat, x, y, width, height), (F, "glCopyConvolutionFilter2D(0x%x, 0x%x, %d, %d, %d, %d);\n", target, internalformat, x, y, width, height));
-}
-
-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, "glGetConvolutionFilter(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, "glGetConvolutionParameterfv(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, "glGetConvolutionParameteriv(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, "glGetSeparableFilter(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_360)(GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid * row, const GLvoid * column);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_360)(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));
-}
-
-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, "glGetHistogram(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, "glGetHistogramParameterfv(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, "glGetHistogramParameteriv(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, "glGetMinmax(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, "glGetMinmaxParameterfv(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, "glGetMinmaxParameteriv(0x%x, 0x%x, %p);\n", target, pname, (const void *) params));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_367)(GLenum target, GLsizei width, GLenum internalformat, GLboolean sink);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_367)(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));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_368)(GLenum target, GLenum internalformat, GLboolean sink);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_368)(GLenum target, GLenum internalformat, GLboolean sink)
-{
- DISPATCH(Minmax, (target, internalformat, sink), (F, "glMinmax(0x%x, 0x%x, %d);\n", target, internalformat, sink));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_369)(GLenum target);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_369)(GLenum target)
-{
- DISPATCH(ResetHistogram, (target), (F, "glResetHistogram(0x%x);\n", target));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_370)(GLenum target);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_370)(GLenum target)
-{
- DISPATCH(ResetMinmax, (target), (F, "glResetMinmax(0x%x);\n", target));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_371)(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid * pixels);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_371)(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid * pixels)
-{
- DISPATCH(TexImage3D, (target, level, internalformat, width, height, depth, border, format, type, pixels), (F, "glTexImage3D(0x%x, %d, %d, %d, %d, %d, %d, 0x%x, 0x%x, %p);\n", target, level, internalformat, width, height, depth, border, format, type, (const void *) pixels));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_372)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid * pixels);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_372)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid * pixels)
-{
- DISPATCH(TexSubImage3D, (target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels), (F, "glTexSubImage3D(0x%x, %d, %d, %d, %d, %d, %d, %d, 0x%x, 0x%x, %p);\n", target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, (const void *) pixels));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_373)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_373)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height)
-{
- DISPATCH(CopyTexSubImage3D, (target, level, xoffset, yoffset, zoffset, x, y, width, height), (F, "glCopyTexSubImage3D(0x%x, %d, %d, %d, %d, %d, %d, %d, %d);\n", target, level, xoffset, yoffset, zoffset, x, y, width, height));
-}
-
-KEYWORD1 void KEYWORD2 NAME(ActiveTexture)(GLenum texture)
-{
- DISPATCH(ActiveTexture, (texture), (F, "glActiveTexture(0x%x);\n", texture));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_374)(GLenum texture);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_374)(GLenum texture)
-{
- DISPATCH(ActiveTexture, (texture), (F, "glActiveTextureARB(0x%x);\n", texture));
-}
-
-KEYWORD1 void KEYWORD2 NAME(ClientActiveTexture)(GLenum texture)
-{
- DISPATCH(ClientActiveTexture, (texture), (F, "glClientActiveTexture(0x%x);\n", texture));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_375)(GLenum texture);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_375)(GLenum texture)
-{
- DISPATCH(ClientActiveTexture, (texture), (F, "glClientActiveTextureARB(0x%x);\n", texture));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_376)(GLenum target, GLdouble s);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_376)(GLenum target, GLdouble s)
-{
- DISPATCH(MultiTexCoord1dARB, (target, s), (F, "glMultiTexCoord1dARB(0x%x, %f);\n", target, s));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_377)(GLenum target, const GLdouble * v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_377)(GLenum target, const GLdouble * v)
-{
- DISPATCH(MultiTexCoord1dvARB, (target, v), (F, "glMultiTexCoord1dvARB(0x%x, %p);\n", target, (const void *) v));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_378)(GLenum target, GLfloat s);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_378)(GLenum target, GLfloat s)
-{
- DISPATCH(MultiTexCoord1fARB, (target, s), (F, "glMultiTexCoord1fARB(0x%x, %f);\n", target, s));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_379)(GLenum target, const GLfloat * v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_379)(GLenum target, const GLfloat * v)
-{
- DISPATCH(MultiTexCoord1fvARB, (target, v), (F, "glMultiTexCoord1fvARB(0x%x, %p);\n", target, (const void *) v));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_380)(GLenum target, GLint s);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_380)(GLenum target, GLint s)
-{
- DISPATCH(MultiTexCoord1iARB, (target, s), (F, "glMultiTexCoord1iARB(0x%x, %d);\n", target, s));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_381)(GLenum target, const GLint * v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_381)(GLenum target, const GLint * v)
-{
- DISPATCH(MultiTexCoord1ivARB, (target, v), (F, "glMultiTexCoord1ivARB(0x%x, %p);\n", target, (const void *) v));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_382)(GLenum target, GLshort s);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_382)(GLenum target, GLshort s)
-{
- DISPATCH(MultiTexCoord1sARB, (target, s), (F, "glMultiTexCoord1sARB(0x%x, %d);\n", target, s));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_383)(GLenum target, const GLshort * v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_383)(GLenum target, const GLshort * v)
-{
- DISPATCH(MultiTexCoord1svARB, (target, v), (F, "glMultiTexCoord1svARB(0x%x, %p);\n", target, (const void *) v));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_384)(GLenum target, GLdouble s, GLdouble t);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_384)(GLenum target, GLdouble s, GLdouble t)
-{
- DISPATCH(MultiTexCoord2dARB, (target, s, t), (F, "glMultiTexCoord2dARB(0x%x, %f, %f);\n", target, s, t));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_385)(GLenum target, const GLdouble * v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_385)(GLenum target, const GLdouble * v)
-{
- DISPATCH(MultiTexCoord2dvARB, (target, v), (F, "glMultiTexCoord2dvARB(0x%x, %p);\n", target, (const void *) v));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_386)(GLenum target, GLfloat s, GLfloat t);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_386)(GLenum target, GLfloat s, GLfloat t)
-{
- DISPATCH(MultiTexCoord2fARB, (target, s, t), (F, "glMultiTexCoord2fARB(0x%x, %f, %f);\n", target, s, t));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_387)(GLenum target, const GLfloat * v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_387)(GLenum target, const GLfloat * v)
-{
- DISPATCH(MultiTexCoord2fvARB, (target, v), (F, "glMultiTexCoord2fvARB(0x%x, %p);\n", target, (const void *) v));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_388)(GLenum target, GLint s, GLint t);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_388)(GLenum target, GLint s, GLint t)
-{
- DISPATCH(MultiTexCoord2iARB, (target, s, t), (F, "glMultiTexCoord2iARB(0x%x, %d, %d);\n", target, s, t));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_389)(GLenum target, const GLint * v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_389)(GLenum target, const GLint * v)
-{
- DISPATCH(MultiTexCoord2ivARB, (target, v), (F, "glMultiTexCoord2ivARB(0x%x, %p);\n", target, (const void *) v));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_390)(GLenum target, GLshort s, GLshort t);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_390)(GLenum target, GLshort s, GLshort t)
-{
- DISPATCH(MultiTexCoord2sARB, (target, s, t), (F, "glMultiTexCoord2sARB(0x%x, %d, %d);\n", target, s, t));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_391)(GLenum target, const GLshort * v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_391)(GLenum target, const GLshort * v)
-{
- DISPATCH(MultiTexCoord2svARB, (target, v), (F, "glMultiTexCoord2svARB(0x%x, %p);\n", target, (const void *) v));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_392)(GLenum target, GLdouble s, GLdouble t, GLdouble r);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_392)(GLenum target, GLdouble s, GLdouble t, GLdouble r)
-{
- DISPATCH(MultiTexCoord3dARB, (target, s, t, r), (F, "glMultiTexCoord3dARB(0x%x, %f, %f, %f);\n", target, s, t, r));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_393)(GLenum target, const GLdouble * v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_393)(GLenum target, const GLdouble * v)
-{
- DISPATCH(MultiTexCoord3dvARB, (target, v), (F, "glMultiTexCoord3dvARB(0x%x, %p);\n", target, (const void *) v));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_394)(GLenum target, GLfloat s, GLfloat t, GLfloat r);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_394)(GLenum target, GLfloat s, GLfloat t, GLfloat r)
-{
- DISPATCH(MultiTexCoord3fARB, (target, s, t, r), (F, "glMultiTexCoord3fARB(0x%x, %f, %f, %f);\n", target, s, t, r));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_395)(GLenum target, const GLfloat * v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_395)(GLenum target, const GLfloat * v)
-{
- DISPATCH(MultiTexCoord3fvARB, (target, v), (F, "glMultiTexCoord3fvARB(0x%x, %p);\n", target, (const void *) v));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_396)(GLenum target, GLint s, GLint t, GLint r);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_396)(GLenum target, GLint s, GLint t, GLint r)
-{
- DISPATCH(MultiTexCoord3iARB, (target, s, t, r), (F, "glMultiTexCoord3iARB(0x%x, %d, %d, %d);\n", target, s, t, r));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_397)(GLenum target, const GLint * v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_397)(GLenum target, const GLint * v)
-{
- DISPATCH(MultiTexCoord3ivARB, (target, v), (F, "glMultiTexCoord3ivARB(0x%x, %p);\n", target, (const void *) v));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_398)(GLenum target, GLshort s, GLshort t, GLshort r);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_398)(GLenum target, GLshort s, GLshort t, GLshort r)
-{
- DISPATCH(MultiTexCoord3sARB, (target, s, t, r), (F, "glMultiTexCoord3sARB(0x%x, %d, %d, %d);\n", target, s, t, r));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_399)(GLenum target, const GLshort * v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_399)(GLenum target, const GLshort * v)
-{
- DISPATCH(MultiTexCoord3svARB, (target, v), (F, "glMultiTexCoord3svARB(0x%x, %p);\n", target, (const void *) v));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_400)(GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_400)(GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q)
-{
- DISPATCH(MultiTexCoord4dARB, (target, s, t, r, q), (F, "glMultiTexCoord4dARB(0x%x, %f, %f, %f, %f);\n", target, s, t, r, q));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_401)(GLenum target, const GLdouble * v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_401)(GLenum target, const GLdouble * v)
-{
- DISPATCH(MultiTexCoord4dvARB, (target, v), (F, "glMultiTexCoord4dvARB(0x%x, %p);\n", target, (const void *) v));
-}
-
-KEYWORD1 void KEYWORD2 NAME(MultiTexCoord4f)(GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q)
-{
- DISPATCH(MultiTexCoord4f, (target, s, t, r, q), (F, "glMultiTexCoord4f(0x%x, %f, %f, %f, %f);\n", target, s, t, r, q));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_402)(GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_402)(GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q)
-{
- DISPATCH(MultiTexCoord4f, (target, s, t, r, q), (F, "glMultiTexCoord4fARB(0x%x, %f, %f, %f, %f);\n", target, s, t, r, q));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_403)(GLenum target, const GLfloat * v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_403)(GLenum target, const GLfloat * v)
-{
- DISPATCH(MultiTexCoord4fvARB, (target, v), (F, "glMultiTexCoord4fvARB(0x%x, %p);\n", target, (const void *) v));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_404)(GLenum target, GLint s, GLint t, GLint r, GLint q);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_404)(GLenum target, GLint s, GLint t, GLint r, GLint q)
-{
- DISPATCH(MultiTexCoord4iARB, (target, s, t, r, q), (F, "glMultiTexCoord4iARB(0x%x, %d, %d, %d, %d);\n", target, s, t, r, q));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_405)(GLenum target, const GLint * v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_405)(GLenum target, const GLint * v)
-{
- DISPATCH(MultiTexCoord4ivARB, (target, v), (F, "glMultiTexCoord4ivARB(0x%x, %p);\n", target, (const void *) v));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_406)(GLenum target, GLshort s, GLshort t, GLshort r, GLshort q);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_406)(GLenum target, GLshort s, GLshort t, GLshort r, GLshort q)
-{
- DISPATCH(MultiTexCoord4sARB, (target, s, t, r, q), (F, "glMultiTexCoord4sARB(0x%x, %d, %d, %d, %d);\n", target, s, t, r, q));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_407)(GLenum target, const GLshort * v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_407)(GLenum target, const GLshort * v)
-{
- DISPATCH(MultiTexCoord4svARB, (target, v), (F, "glMultiTexCoord4svARB(0x%x, %p);\n", target, (const void *) v));
-}
-
-KEYWORD1 void KEYWORD2 NAME(BlendEquationSeparateOES)(GLenum modeRGB, GLenum modeA);
-
-KEYWORD1 void KEYWORD2 NAME(BlendEquationSeparateOES)(GLenum modeRGB, GLenum modeA)
-{
- DISPATCH(BlendEquationSeparateOES, (modeRGB, modeA), (F, "glBlendEquationSeparateOES(0x%x, 0x%x);\n", modeRGB, modeA));
-}
-
-KEYWORD1 void KEYWORD2 NAME(BlendFuncSeparateOES)(GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
-
-KEYWORD1 void KEYWORD2 NAME(BlendFuncSeparateOES)(GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha)
-{
- DISPATCH(BlendFuncSeparateOES, (sfactorRGB, dfactorRGB, sfactorAlpha, dfactorAlpha), (F, "glBlendFuncSeparateOES(0x%x, 0x%x, 0x%x, 0x%x);\n", sfactorRGB, dfactorRGB, sfactorAlpha, dfactorAlpha));
-}
-
-KEYWORD1 void KEYWORD2 NAME(DrawTexfOES)(GLfloat x, GLfloat y, GLfloat z, GLfloat width, GLfloat height);
-
-KEYWORD1 void KEYWORD2 NAME(DrawTexfOES)(GLfloat x, GLfloat y, GLfloat z, GLfloat width, GLfloat height)
-{
- DISPATCH(DrawTexfOES, (x, y, z, width, height), (F, "glDrawTexfOES(%f, %f, %f, %f, %f);\n", x, y, z, width, height));
-}
-
-KEYWORD1 void KEYWORD2 NAME(DrawTexfvOES)(const GLfloat * coords);
-
-KEYWORD1 void KEYWORD2 NAME(DrawTexfvOES)(const GLfloat * coords)
-{
- DISPATCH(DrawTexfvOES, (coords), (F, "glDrawTexfvOES(%p);\n", (const void *) coords));
-}
-
-KEYWORD1 void KEYWORD2 NAME(DrawTexiOES)(GLint x, GLint y, GLint z, GLint width, GLint height);
-
-KEYWORD1 void KEYWORD2 NAME(DrawTexiOES)(GLint x, GLint y, GLint z, GLint width, GLint height)
-{
- DISPATCH(DrawTexiOES, (x, y, z, width, height), (F, "glDrawTexiOES(%d, %d, %d, %d, %d);\n", x, y, z, width, height));
-}
-
-KEYWORD1 void KEYWORD2 NAME(DrawTexivOES)(const GLint * coords);
-
-KEYWORD1 void KEYWORD2 NAME(DrawTexivOES)(const GLint * coords)
-{
- DISPATCH(DrawTexivOES, (coords), (F, "glDrawTexivOES(%p);\n", (const void *) coords));
-}
-
-KEYWORD1 void KEYWORD2 NAME(DrawTexsOES)(GLshort x, GLshort y, GLshort z, GLshort width, GLshort height);
-
-KEYWORD1 void KEYWORD2 NAME(DrawTexsOES)(GLshort x, GLshort y, GLshort z, GLshort width, GLshort height)
-{
- DISPATCH(DrawTexsOES, (x, y, z, width, height), (F, "glDrawTexsOES(%d, %d, %d, %d, %d);\n", x, y, z, width, height));
-}
-
-KEYWORD1 void KEYWORD2 NAME(DrawTexsvOES)(const GLshort * coords);
-
-KEYWORD1 void KEYWORD2 NAME(DrawTexsvOES)(const GLshort * coords)
-{
- DISPATCH(DrawTexsvOES, (coords), (F, "glDrawTexsvOES(%p);\n", (const void *) coords));
-}
-
-KEYWORD1 void KEYWORD2 NAME(DrawTexxOES)(GLfixed x, GLfixed y, GLfixed z, GLfixed width, GLfixed height);
-
-KEYWORD1 void KEYWORD2 NAME(DrawTexxOES)(GLfixed x, GLfixed y, GLfixed z, GLfixed width, GLfixed height)
-{
- DISPATCH(DrawTexxOES, (x, y, z, width, height), (F, "glDrawTexxOES(%d, %d, %d, %d, %d);\n", x, y, z, width, height));
-}
-
-KEYWORD1 void KEYWORD2 NAME(DrawTexxvOES)(const GLfixed * coords);
-
-KEYWORD1 void KEYWORD2 NAME(DrawTexxvOES)(const GLfixed * coords)
-{
- DISPATCH(DrawTexxvOES, (coords), (F, "glDrawTexxvOES(%p);\n", (const void *) coords));
-}
-
-KEYWORD1 void KEYWORD2 NAME(BindFramebufferOES)(GLenum target, GLuint framebuffer);
-
-KEYWORD1 void KEYWORD2 NAME(BindFramebufferOES)(GLenum target, GLuint framebuffer)
-{
- DISPATCH(BindFramebufferOES, (target, framebuffer), (F, "glBindFramebufferOES(0x%x, %d);\n", target, framebuffer));
-}
-
-KEYWORD1 void KEYWORD2 NAME(BindRenderbufferOES)(GLenum target, GLuint renderbuffer);
-
-KEYWORD1 void KEYWORD2 NAME(BindRenderbufferOES)(GLenum target, GLuint renderbuffer)
-{
- DISPATCH(BindRenderbufferOES, (target, renderbuffer), (F, "glBindRenderbufferOES(0x%x, %d);\n", target, renderbuffer));
-}
-
-KEYWORD1 GLenum KEYWORD2 NAME(CheckFramebufferStatusOES)(GLenum target);
-
-KEYWORD1 GLenum KEYWORD2 NAME(CheckFramebufferStatusOES)(GLenum target)
-{
- RETURN_DISPATCH(CheckFramebufferStatusOES, (target), (F, "glCheckFramebufferStatusOES(0x%x);\n", target));
-}
-
-KEYWORD1 void KEYWORD2 NAME(DeleteFramebuffersOES)(GLsizei n, const GLuint * framebuffers);
-
-KEYWORD1 void KEYWORD2 NAME(DeleteFramebuffersOES)(GLsizei n, const GLuint * framebuffers)
-{
- DISPATCH(DeleteFramebuffersOES, (n, framebuffers), (F, "glDeleteFramebuffersOES(%d, %p);\n", n, (const void *) framebuffers));
-}
-
-KEYWORD1 void KEYWORD2 NAME(DeleteRenderbuffersOES)(GLsizei n, const GLuint * renderbuffers);
-
-KEYWORD1 void KEYWORD2 NAME(DeleteRenderbuffersOES)(GLsizei n, const GLuint * renderbuffers)
-{
- DISPATCH(DeleteRenderbuffersOES, (n, renderbuffers), (F, "glDeleteRenderbuffersOES(%d, %p);\n", n, (const void *) renderbuffers));
-}
-
-KEYWORD1 void KEYWORD2 NAME(FramebufferRenderbufferOES)(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
-
-KEYWORD1 void KEYWORD2 NAME(FramebufferRenderbufferOES)(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer)
-{
- DISPATCH(FramebufferRenderbufferOES, (target, attachment, renderbuffertarget, renderbuffer), (F, "glFramebufferRenderbufferOES(0x%x, 0x%x, 0x%x, %d);\n", target, attachment, renderbuffertarget, renderbuffer));
-}
-
-KEYWORD1 void KEYWORD2 NAME(FramebufferTexture2DOES)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
-
-KEYWORD1 void KEYWORD2 NAME(FramebufferTexture2DOES)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level)
-{
- DISPATCH(FramebufferTexture2DOES, (target, attachment, textarget, texture, level), (F, "glFramebufferTexture2DOES(0x%x, 0x%x, 0x%x, %d, %d);\n", target, attachment, textarget, texture, level));
-}
-
-KEYWORD1 void KEYWORD2 NAME(GenFramebuffersOES)(GLsizei n, GLuint * framebuffers);
-
-KEYWORD1 void KEYWORD2 NAME(GenFramebuffersOES)(GLsizei n, GLuint * framebuffers)
-{
- DISPATCH(GenFramebuffersOES, (n, framebuffers), (F, "glGenFramebuffersOES(%d, %p);\n", n, (const void *) framebuffers));
-}
-
-KEYWORD1 void KEYWORD2 NAME(GenRenderbuffersOES)(GLsizei n, GLuint * renderbuffers);
-
-KEYWORD1 void KEYWORD2 NAME(GenRenderbuffersOES)(GLsizei n, GLuint * renderbuffers)
-{
- DISPATCH(GenRenderbuffersOES, (n, renderbuffers), (F, "glGenRenderbuffersOES(%d, %p);\n", n, (const void *) renderbuffers));
-}
-
-KEYWORD1 void KEYWORD2 NAME(GenerateMipmapOES)(GLenum target);
-
-KEYWORD1 void KEYWORD2 NAME(GenerateMipmapOES)(GLenum target)
-{
- DISPATCH(GenerateMipmapOES, (target), (F, "glGenerateMipmapOES(0x%x);\n", target));
-}
-
-KEYWORD1 void KEYWORD2 NAME(GetFramebufferAttachmentParameterivOES)(GLenum target, GLenum attachment, GLenum pname, GLint * params);
-
-KEYWORD1 void KEYWORD2 NAME(GetFramebufferAttachmentParameterivOES)(GLenum target, GLenum attachment, GLenum pname, GLint * params)
-{
- DISPATCH(GetFramebufferAttachmentParameterivOES, (target, attachment, pname, params), (F, "glGetFramebufferAttachmentParameterivOES(0x%x, 0x%x, 0x%x, %p);\n", target, attachment, pname, (const void *) params));
-}
-
-KEYWORD1 void KEYWORD2 NAME(GetRenderbufferParameterivOES)(GLenum target, GLenum pname, GLint * params);
-
-KEYWORD1 void KEYWORD2 NAME(GetRenderbufferParameterivOES)(GLenum target, GLenum pname, GLint * params)
-{
- DISPATCH(GetRenderbufferParameterivOES, (target, pname, params), (F, "glGetRenderbufferParameterivOES(0x%x, 0x%x, %p);\n", target, pname, (const void *) params));
-}
-
-KEYWORD1 GLboolean KEYWORD2 NAME(IsFramebufferOES)(GLuint framebuffer);
-
-KEYWORD1 GLboolean KEYWORD2 NAME(IsFramebufferOES)(GLuint framebuffer)
-{
- RETURN_DISPATCH(IsFramebufferOES, (framebuffer), (F, "glIsFramebufferOES(%d);\n", framebuffer));
-}
-
-KEYWORD1 GLboolean KEYWORD2 NAME(IsRenderbufferOES)(GLuint renderbuffer);
-
-KEYWORD1 GLboolean KEYWORD2 NAME(IsRenderbufferOES)(GLuint renderbuffer)
-{
- RETURN_DISPATCH(IsRenderbufferOES, (renderbuffer), (F, "glIsRenderbufferOES(%d);\n", renderbuffer));
-}
-
-KEYWORD1 void KEYWORD2 NAME(RenderbufferStorageOES)(GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
-
-KEYWORD1 void KEYWORD2 NAME(RenderbufferStorageOES)(GLenum target, GLenum internalformat, GLsizei width, GLsizei height)
-{
- DISPATCH(RenderbufferStorageOES, (target, internalformat, width, height), (F, "glRenderbufferStorageOES(0x%x, 0x%x, %d, %d);\n", target, internalformat, width, height));
-}
-
-KEYWORD1 void KEYWORD2 NAME(PointSizePointerOES)(GLenum type, GLsizei stride, const GLvoid * pointer);
-
-KEYWORD1 void KEYWORD2 NAME(PointSizePointerOES)(GLenum type, GLsizei stride, const GLvoid * pointer)
-{
- DISPATCH(PointSizePointerOES, (type, stride, pointer), (F, "glPointSizePointerOES(0x%x, %d, %p);\n", type, stride, (const void *) pointer));
-}
-
-KEYWORD1 GLbitfield KEYWORD2 NAME(QueryMatrixxOES)(GLfixed * mantissa, GLint * exponent);
-
-KEYWORD1 GLbitfield KEYWORD2 NAME(QueryMatrixxOES)(GLfixed * mantissa, GLint * exponent)
-{
- RETURN_DISPATCH(QueryMatrixxOES, (mantissa, exponent), (F, "glQueryMatrixxOES(%p, %p);\n", (const void *) mantissa, (const void *) exponent));
-}
-
-KEYWORD1 void KEYWORD2 NAME(GetTexGenxvOES)(GLenum coord, GLenum pname, GLfixed * params);
-
-KEYWORD1 void KEYWORD2 NAME(GetTexGenxvOES)(GLenum coord, GLenum pname, GLfixed * params)
-{
- DISPATCH(GetTexGenxvOES, (coord, pname, params), (F, "glGetTexGenxvOES(0x%x, 0x%x, %p);\n", coord, pname, (const void *) params));
-}
-
-KEYWORD1 void KEYWORD2 NAME(TexGenxOES)(GLenum coord, GLenum pname, GLint param);
-
-KEYWORD1 void KEYWORD2 NAME(TexGenxOES)(GLenum coord, GLenum pname, GLint param)
-{
- DISPATCH(TexGenxOES, (coord, pname, param), (F, "glTexGenxOES(0x%x, 0x%x, %d);\n", coord, pname, param));
-}
-
-KEYWORD1 void KEYWORD2 NAME(TexGenxvOES)(GLenum coord, GLenum pname, const GLfixed * params);
-
-KEYWORD1 void KEYWORD2 NAME(TexGenxvOES)(GLenum coord, GLenum pname, const GLfixed * params)
-{
- DISPATCH(TexGenxvOES, (coord, pname, params), (F, "glTexGenxvOES(0x%x, 0x%x, %p);\n", coord, pname, (const void *) params));
-}
-
-KEYWORD1 void KEYWORD2 NAME(GetBufferPointervOES)(GLenum target, GLenum pname, GLvoid ** params);
-
-KEYWORD1 void KEYWORD2 NAME(GetBufferPointervOES)(GLenum target, GLenum pname, GLvoid ** params)
-{
- DISPATCH(GetBufferPointervOES, (target, pname, params), (F, "glGetBufferPointervOES(0x%x, 0x%x, %p);\n", target, pname, (const void *) params));
-}
-
-KEYWORD1 GLvoid * KEYWORD2 NAME(MapBufferOES)(GLenum target, GLenum access);
-
-KEYWORD1 GLvoid * KEYWORD2 NAME(MapBufferOES)(GLenum target, GLenum access)
-{
- RETURN_DISPATCH(MapBufferOES, (target, access), (F, "glMapBufferOES(0x%x, 0x%x);\n", target, access));
-}
-
-KEYWORD1 GLboolean KEYWORD2 NAME(UnmapBufferOES)(GLenum target);
-
-KEYWORD1 GLboolean KEYWORD2 NAME(UnmapBufferOES)(GLenum target)
-{
- RETURN_DISPATCH(UnmapBufferOES, (target), (F, "glUnmapBufferOES(0x%x);\n", target));
-}
-
-KEYWORD1 void KEYWORD2 NAME(MultiDrawArraysEXT)(GLenum mode, const GLint * first, const GLsizei * count, GLsizei primcount)
-{
- DISPATCH(MultiDrawArraysEXT, (mode, first, count, primcount), (F, "glMultiDrawArraysEXT(0x%x, %p, %p, %d);\n", mode, (const void *) first, (const void *) count, primcount));
-}
-
-KEYWORD1 void KEYWORD2 NAME(MultiDrawElementsEXT)(GLenum mode, const GLsizei * count, GLenum type, const GLvoid ** indices, GLsizei primcount)
-{
- DISPATCH(MultiDrawElementsEXT, (mode, count, type, indices, primcount), (F, "glMultiDrawElementsEXT(0x%x, %p, 0x%x, %p, %d);\n", mode, (const void *) count, type, (const void *) indices, primcount));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_443)(GLuint array);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_443)(GLuint array)
-{
- DISPATCH(BindVertexArrayAPPLE, (array), (F, "glBindVertexArrayAPPLE(%d);\n", array));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_444)(GLsizei n, const GLuint * arrays);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_444)(GLsizei n, const GLuint * arrays)
-{
- DISPATCH(DeleteVertexArraysAPPLE, (n, arrays), (F, "glDeleteVertexArraysAPPLE(%d, %p);\n", n, (const void *) arrays));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_445)(GLsizei n, GLuint * arrays);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_445)(GLsizei n, GLuint * arrays)
-{
- DISPATCH(GenVertexArraysAPPLE, (n, arrays), (F, "glGenVertexArraysAPPLE(%d, %p);\n", n, (const void *) arrays));
-}
-
-KEYWORD1_ALT GLboolean KEYWORD2 NAME(_dispatch_stub_446)(GLuint array);
-
-KEYWORD1_ALT GLboolean KEYWORD2 NAME(_dispatch_stub_446)(GLuint array)
-{
- RETURN_DISPATCH(IsVertexArrayAPPLE, (array), (F, "glIsVertexArrayAPPLE(%d);\n", array));
-}
-
-KEYWORD1 void KEYWORD2 NAME(EGLImageTargetRenderbufferStorageOES)(GLenum target, GLvoid * writeOffset);
-
-KEYWORD1 void KEYWORD2 NAME(EGLImageTargetRenderbufferStorageOES)(GLenum target, GLvoid * writeOffset)
-{
- DISPATCH(EGLImageTargetRenderbufferStorageOES, (target, writeOffset), (F, "glEGLImageTargetRenderbufferStorageOES(0x%x, %p);\n", target, (const void *) writeOffset));
-}
-
-KEYWORD1 void KEYWORD2 NAME(EGLImageTargetTexture2DOES)(GLenum target, GLvoid * writeOffset);
-
-KEYWORD1 void KEYWORD2 NAME(EGLImageTargetTexture2DOES)(GLenum target, GLvoid * writeOffset)
-{
- DISPATCH(EGLImageTargetTexture2DOES, (target, writeOffset), (F, "glEGLImageTargetTexture2DOES(0x%x, %p);\n", target, (const void *) writeOffset));
-}
-
-KEYWORD1 void KEYWORD2 NAME(CompressedTexImage2D)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid * data)
-{
- DISPATCH(CompressedTexImage2D, (target, level, internalformat, width, height, border, imageSize, data), (F, "glCompressedTexImage2D(0x%x, %d, 0x%x, %d, %d, %d, %d, %p);\n", target, level, internalformat, width, height, border, imageSize, (const void *) data));
-}
-
-KEYWORD1 void KEYWORD2 NAME(CompressedTexSubImage2D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid * data)
-{
- DISPATCH(CompressedTexSubImage2D, (target, level, xoffset, yoffset, width, height, format, imageSize, data), (F, "glCompressedTexSubImage2D(0x%x, %d, %d, %d, %d, %d, 0x%x, %d, %p);\n", target, level, xoffset, yoffset, width, height, format, imageSize, (const void *) data));
-}
-
-KEYWORD1 void KEYWORD2 NAME(SampleCoverage)(GLclampf value, GLboolean invert)
-{
- DISPATCH(SampleCoverage, (value, invert), (F, "glSampleCoverage(%f, %d);\n", value, invert));
-}
-
-KEYWORD1 void KEYWORD2 NAME(BindBuffer)(GLenum target, GLuint buffer)
-{
- DISPATCH(BindBuffer, (target, buffer), (F, "glBindBuffer(0x%x, %d);\n", target, buffer));
-}
-
-KEYWORD1 void KEYWORD2 NAME(BufferData)(GLenum target, GLsizeiptr size, const GLvoid * data, GLenum usage)
-{
- DISPATCH(BufferData, (target, size, data, usage), (F, "glBufferData(0x%x, %d, %p, 0x%x);\n", target, size, (const void *) data, usage));
-}
-
-KEYWORD1 void KEYWORD2 NAME(BufferSubData)(GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid * data)
-{
- DISPATCH(BufferSubData, (target, offset, size, data), (F, "glBufferSubData(0x%x, %d, %d, %p);\n", target, offset, size, (const void *) data));
-}
-
-KEYWORD1 void KEYWORD2 NAME(DeleteBuffers)(GLsizei n, const GLuint * buffer)
-{
- DISPATCH(DeleteBuffers, (n, buffer), (F, "glDeleteBuffers(%d, %p);\n", n, (const void *) buffer));
-}
-
-KEYWORD1 void KEYWORD2 NAME(GenBuffers)(GLsizei n, GLuint * buffer)
-{
- DISPATCH(GenBuffers, (n, buffer), (F, "glGenBuffers(%d, %p);\n", n, (const void *) buffer));
-}
-
-KEYWORD1 void KEYWORD2 NAME(GetBufferParameteriv)(GLenum target, GLenum pname, GLint * params)
-{
- DISPATCH(GetBufferParameteriv, (target, pname, params), (F, "glGetBufferParameteriv(0x%x, 0x%x, %p);\n", target, pname, (const void *) params));
-}
-
-KEYWORD1 GLboolean KEYWORD2 NAME(IsBuffer)(GLuint buffer)
-{
- RETURN_DISPATCH(IsBuffer, (buffer), (F, "glIsBuffer(%d);\n", buffer));
-}
-
-KEYWORD1 void KEYWORD2 NAME(PointParameterf)(GLenum pname, GLfloat param)
-{
- DISPATCH(PointParameterf, (pname, param), (F, "glPointParameterf(0x%x, %f);\n", pname, param));
-}
-
-KEYWORD1 void KEYWORD2 NAME(PointParameterfv)(GLenum pname, const GLfloat * params)
-{
- DISPATCH(PointParameterfv, (pname, params), (F, "glPointParameterfv(0x%x, %p);\n", pname, (const void *) params));
-}
-
-KEYWORD1 void KEYWORD2 NAME(AlphaFuncx)(GLenum func, GLclampx ref);
-
-KEYWORD1 void KEYWORD2 NAME(AlphaFuncx)(GLenum func, GLclampx ref)
-{
- DISPATCH(AlphaFuncx, (func, ref), (F, "glAlphaFuncx(0x%x, %d);\n", func, ref));
-}
-
-KEYWORD1 void KEYWORD2 NAME(AlphaFuncxOES)(GLenum func, GLclampx ref);
-
-KEYWORD1 void KEYWORD2 NAME(AlphaFuncxOES)(GLenum func, GLclampx ref)
-{
- DISPATCH(AlphaFuncx, (func, ref), (F, "glAlphaFuncxOES(0x%x, %d);\n", func, ref));
-}
-
-KEYWORD1 void KEYWORD2 NAME(ClearColorx)(GLclampx red, GLclampx green, GLclampx blue, GLclampx alpha);
-
-KEYWORD1 void KEYWORD2 NAME(ClearColorx)(GLclampx red, GLclampx green, GLclampx blue, GLclampx alpha)
-{
- DISPATCH(ClearColorx, (red, green, blue, alpha), (F, "glClearColorx(%d, %d, %d, %d);\n", red, green, blue, alpha));
-}
-
-KEYWORD1 void KEYWORD2 NAME(ClearColorxOES)(GLclampx red, GLclampx green, GLclampx blue, GLclampx alpha);
-
-KEYWORD1 void KEYWORD2 NAME(ClearColorxOES)(GLclampx red, GLclampx green, GLclampx blue, GLclampx alpha)
-{
- DISPATCH(ClearColorx, (red, green, blue, alpha), (F, "glClearColorxOES(%d, %d, %d, %d);\n", red, green, blue, alpha));
-}
-
-KEYWORD1 void KEYWORD2 NAME(ClearDepthf)(GLclampf depth);
-
-KEYWORD1 void KEYWORD2 NAME(ClearDepthf)(GLclampf depth)
-{
- DISPATCH(ClearDepthf, (depth), (F, "glClearDepthf(%f);\n", depth));
-}
-
-KEYWORD1 void KEYWORD2 NAME(ClearDepthfOES)(GLclampf depth);
-
-KEYWORD1 void KEYWORD2 NAME(ClearDepthfOES)(GLclampf depth)
-{
- DISPATCH(ClearDepthf, (depth), (F, "glClearDepthfOES(%f);\n", depth));
-}
-
-KEYWORD1 void KEYWORD2 NAME(ClearDepthx)(GLclampx depth);
-
-KEYWORD1 void KEYWORD2 NAME(ClearDepthx)(GLclampx depth)
-{
- DISPATCH(ClearDepthx, (depth), (F, "glClearDepthx(%d);\n", depth));
-}
-
-KEYWORD1 void KEYWORD2 NAME(ClearDepthxOES)(GLclampx depth);
-
-KEYWORD1 void KEYWORD2 NAME(ClearDepthxOES)(GLclampx depth)
-{
- DISPATCH(ClearDepthx, (depth), (F, "glClearDepthxOES(%d);\n", depth));
-}
-
-KEYWORD1 void KEYWORD2 NAME(Color4x)(GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha);
-
-KEYWORD1 void KEYWORD2 NAME(Color4x)(GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha)
-{
- DISPATCH(Color4x, (red, green, blue, alpha), (F, "glColor4x(%d, %d, %d, %d);\n", red, green, blue, alpha));
-}
-
-KEYWORD1 void KEYWORD2 NAME(Color4xOES)(GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha);
-
-KEYWORD1 void KEYWORD2 NAME(Color4xOES)(GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha)
-{
- DISPATCH(Color4x, (red, green, blue, alpha), (F, "glColor4xOES(%d, %d, %d, %d);\n", red, green, blue, alpha));
-}
-
-KEYWORD1 void KEYWORD2 NAME(DepthRangef)(GLclampf zNear, GLclampf zFar);
-
-KEYWORD1 void KEYWORD2 NAME(DepthRangef)(GLclampf zNear, GLclampf zFar)
-{
- DISPATCH(DepthRangef, (zNear, zFar), (F, "glDepthRangef(%f, %f);\n", zNear, zFar));
-}
-
-KEYWORD1 void KEYWORD2 NAME(DepthRangefOES)(GLclampf zNear, GLclampf zFar);
-
-KEYWORD1 void KEYWORD2 NAME(DepthRangefOES)(GLclampf zNear, GLclampf zFar)
-{
- DISPATCH(DepthRangef, (zNear, zFar), (F, "glDepthRangefOES(%f, %f);\n", zNear, zFar));
-}
-
-KEYWORD1 void KEYWORD2 NAME(DepthRangex)(GLclampx zNear, GLclampx zFar);
-
-KEYWORD1 void KEYWORD2 NAME(DepthRangex)(GLclampx zNear, GLclampx zFar)
-{
- DISPATCH(DepthRangex, (zNear, zFar), (F, "glDepthRangex(%d, %d);\n", zNear, zFar));
-}
-
-KEYWORD1 void KEYWORD2 NAME(DepthRangexOES)(GLclampx zNear, GLclampx zFar);
-
-KEYWORD1 void KEYWORD2 NAME(DepthRangexOES)(GLclampx zNear, GLclampx zFar)
-{
- DISPATCH(DepthRangex, (zNear, zFar), (F, "glDepthRangexOES(%d, %d);\n", zNear, zFar));
-}
-
-KEYWORD1 void KEYWORD2 NAME(Fogx)(GLenum pname, GLfixed param);
-
-KEYWORD1 void KEYWORD2 NAME(Fogx)(GLenum pname, GLfixed param)
-{
- DISPATCH(Fogx, (pname, param), (F, "glFogx(0x%x, %d);\n", pname, param));
-}
-
-KEYWORD1 void KEYWORD2 NAME(FogxOES)(GLenum pname, GLfixed param);
-
-KEYWORD1 void KEYWORD2 NAME(FogxOES)(GLenum pname, GLfixed param)
-{
- DISPATCH(Fogx, (pname, param), (F, "glFogxOES(0x%x, %d);\n", pname, param));
-}
-
-KEYWORD1 void KEYWORD2 NAME(Fogxv)(GLenum pname, const GLfixed * params);
-
-KEYWORD1 void KEYWORD2 NAME(Fogxv)(GLenum pname, const GLfixed * params)
-{
- DISPATCH(Fogxv, (pname, params), (F, "glFogxv(0x%x, %p);\n", pname, (const void *) params));
-}
-
-KEYWORD1 void KEYWORD2 NAME(FogxvOES)(GLenum pname, const GLfixed * params);
-
-KEYWORD1 void KEYWORD2 NAME(FogxvOES)(GLenum pname, const GLfixed * params)
-{
- DISPATCH(Fogxv, (pname, params), (F, "glFogxvOES(0x%x, %p);\n", pname, (const void *) params));
-}
-
-KEYWORD1 void KEYWORD2 NAME(Frustumf)(GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar);
-
-KEYWORD1 void KEYWORD2 NAME(Frustumf)(GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar)
-{
- DISPATCH(Frustumf, (left, right, bottom, top, zNear, zFar), (F, "glFrustumf(%f, %f, %f, %f, %f, %f);\n", left, right, bottom, top, zNear, zFar));
-}
-
-KEYWORD1 void KEYWORD2 NAME(FrustumfOES)(GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar);
-
-KEYWORD1 void KEYWORD2 NAME(FrustumfOES)(GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar)
-{
- DISPATCH(Frustumf, (left, right, bottom, top, zNear, zFar), (F, "glFrustumfOES(%f, %f, %f, %f, %f, %f);\n", left, right, bottom, top, zNear, zFar));
-}
-
-KEYWORD1 void KEYWORD2 NAME(Frustumx)(GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar);
-
-KEYWORD1 void KEYWORD2 NAME(Frustumx)(GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar)
-{
- DISPATCH(Frustumx, (left, right, bottom, top, zNear, zFar), (F, "glFrustumx(%d, %d, %d, %d, %d, %d);\n", left, right, bottom, top, zNear, zFar));
-}
-
-KEYWORD1 void KEYWORD2 NAME(FrustumxOES)(GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar);
-
-KEYWORD1 void KEYWORD2 NAME(FrustumxOES)(GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar)
-{
- DISPATCH(Frustumx, (left, right, bottom, top, zNear, zFar), (F, "glFrustumxOES(%d, %d, %d, %d, %d, %d);\n", left, right, bottom, top, zNear, zFar));
-}
-
-KEYWORD1 void KEYWORD2 NAME(LightModelx)(GLenum pname, GLfixed param);
-
-KEYWORD1 void KEYWORD2 NAME(LightModelx)(GLenum pname, GLfixed param)
-{
- DISPATCH(LightModelx, (pname, param), (F, "glLightModelx(0x%x, %d);\n", pname, param));
-}
-
-KEYWORD1 void KEYWORD2 NAME(LightModelxOES)(GLenum pname, GLfixed param);
-
-KEYWORD1 void KEYWORD2 NAME(LightModelxOES)(GLenum pname, GLfixed param)
-{
- DISPATCH(LightModelx, (pname, param), (F, "glLightModelxOES(0x%x, %d);\n", pname, param));
-}
-
-KEYWORD1 void KEYWORD2 NAME(LightModelxv)(GLenum pname, const GLfixed * params);
-
-KEYWORD1 void KEYWORD2 NAME(LightModelxv)(GLenum pname, const GLfixed * params)
-{
- DISPATCH(LightModelxv, (pname, params), (F, "glLightModelxv(0x%x, %p);\n", pname, (const void *) params));
-}
-
-KEYWORD1 void KEYWORD2 NAME(LightModelxvOES)(GLenum pname, const GLfixed * params);
-
-KEYWORD1 void KEYWORD2 NAME(LightModelxvOES)(GLenum pname, const GLfixed * params)
-{
- DISPATCH(LightModelxv, (pname, params), (F, "glLightModelxvOES(0x%x, %p);\n", pname, (const void *) params));
-}
-
-KEYWORD1 void KEYWORD2 NAME(Lightx)(GLenum light, GLenum pname, GLfixed param);
-
-KEYWORD1 void KEYWORD2 NAME(Lightx)(GLenum light, GLenum pname, GLfixed param)
-{
- DISPATCH(Lightx, (light, pname, param), (F, "glLightx(0x%x, 0x%x, %d);\n", light, pname, param));
-}
-
-KEYWORD1 void KEYWORD2 NAME(LightxOES)(GLenum light, GLenum pname, GLfixed param);
-
-KEYWORD1 void KEYWORD2 NAME(LightxOES)(GLenum light, GLenum pname, GLfixed param)
-{
- DISPATCH(Lightx, (light, pname, param), (F, "glLightxOES(0x%x, 0x%x, %d);\n", light, pname, param));
-}
-
-KEYWORD1 void KEYWORD2 NAME(Lightxv)(GLenum light, GLenum pname, const GLfixed * params);
-
-KEYWORD1 void KEYWORD2 NAME(Lightxv)(GLenum light, GLenum pname, const GLfixed * params)
-{
- DISPATCH(Lightxv, (light, pname, params), (F, "glLightxv(0x%x, 0x%x, %p);\n", light, pname, (const void *) params));
-}
-
-KEYWORD1 void KEYWORD2 NAME(LightxvOES)(GLenum light, GLenum pname, const GLfixed * params);
-
-KEYWORD1 void KEYWORD2 NAME(LightxvOES)(GLenum light, GLenum pname, const GLfixed * params)
-{
- DISPATCH(Lightxv, (light, pname, params), (F, "glLightxvOES(0x%x, 0x%x, %p);\n", light, pname, (const void *) params));
-}
-
-KEYWORD1 void KEYWORD2 NAME(LineWidthx)(GLfixed width);
-
-KEYWORD1 void KEYWORD2 NAME(LineWidthx)(GLfixed width)
-{
- DISPATCH(LineWidthx, (width), (F, "glLineWidthx(%d);\n", width));
-}
-
-KEYWORD1 void KEYWORD2 NAME(LineWidthxOES)(GLfixed width);
-
-KEYWORD1 void KEYWORD2 NAME(LineWidthxOES)(GLfixed width)
-{
- DISPATCH(LineWidthx, (width), (F, "glLineWidthxOES(%d);\n", width));
-}
-
-KEYWORD1 void KEYWORD2 NAME(LoadMatrixx)(const GLfixed * m);
-
-KEYWORD1 void KEYWORD2 NAME(LoadMatrixx)(const GLfixed * m)
-{
- DISPATCH(LoadMatrixx, (m), (F, "glLoadMatrixx(%p);\n", (const void *) m));
-}
-
-KEYWORD1 void KEYWORD2 NAME(LoadMatrixxOES)(const GLfixed * m);
-
-KEYWORD1 void KEYWORD2 NAME(LoadMatrixxOES)(const GLfixed * m)
-{
- DISPATCH(LoadMatrixx, (m), (F, "glLoadMatrixxOES(%p);\n", (const void *) m));
-}
-
-KEYWORD1 void KEYWORD2 NAME(Materialx)(GLenum face, GLenum pname, GLfixed param);
-
-KEYWORD1 void KEYWORD2 NAME(Materialx)(GLenum face, GLenum pname, GLfixed param)
-{
- DISPATCH(Materialx, (face, pname, param), (F, "glMaterialx(0x%x, 0x%x, %d);\n", face, pname, param));
-}
-
-KEYWORD1 void KEYWORD2 NAME(MaterialxOES)(GLenum face, GLenum pname, GLfixed param);
-
-KEYWORD1 void KEYWORD2 NAME(MaterialxOES)(GLenum face, GLenum pname, GLfixed param)
-{
- DISPATCH(Materialx, (face, pname, param), (F, "glMaterialxOES(0x%x, 0x%x, %d);\n", face, pname, param));
-}
-
-KEYWORD1 void KEYWORD2 NAME(Materialxv)(GLenum face, GLenum pname, const GLfixed * params);
-
-KEYWORD1 void KEYWORD2 NAME(Materialxv)(GLenum face, GLenum pname, const GLfixed * params)
-{
- DISPATCH(Materialxv, (face, pname, params), (F, "glMaterialxv(0x%x, 0x%x, %p);\n", face, pname, (const void *) params));
-}
-
-KEYWORD1 void KEYWORD2 NAME(MaterialxvOES)(GLenum face, GLenum pname, const GLfixed * params);
-
-KEYWORD1 void KEYWORD2 NAME(MaterialxvOES)(GLenum face, GLenum pname, const GLfixed * params)
-{
- DISPATCH(Materialxv, (face, pname, params), (F, "glMaterialxvOES(0x%x, 0x%x, %p);\n", face, pname, (const void *) params));
-}
-
-KEYWORD1 void KEYWORD2 NAME(MultMatrixx)(const GLfixed * m);
-
-KEYWORD1 void KEYWORD2 NAME(MultMatrixx)(const GLfixed * m)
-{
- DISPATCH(MultMatrixx, (m), (F, "glMultMatrixx(%p);\n", (const void *) m));
-}
-
-KEYWORD1 void KEYWORD2 NAME(MultMatrixxOES)(const GLfixed * m);
-
-KEYWORD1 void KEYWORD2 NAME(MultMatrixxOES)(const GLfixed * m)
-{
- DISPATCH(MultMatrixx, (m), (F, "glMultMatrixxOES(%p);\n", (const void *) m));
-}
-
-KEYWORD1 void KEYWORD2 NAME(MultiTexCoord4x)(GLenum target, GLfixed s, GLfixed t, GLfixed r, GLfixed q);
-
-KEYWORD1 void KEYWORD2 NAME(MultiTexCoord4x)(GLenum target, GLfixed s, GLfixed t, GLfixed r, GLfixed q)
-{
- DISPATCH(MultiTexCoord4x, (target, s, t, r, q), (F, "glMultiTexCoord4x(0x%x, %d, %d, %d, %d);\n", target, s, t, r, q));
-}
-
-KEYWORD1 void KEYWORD2 NAME(MultiTexCoord4xOES)(GLenum target, GLfixed s, GLfixed t, GLfixed r, GLfixed q);
-
-KEYWORD1 void KEYWORD2 NAME(MultiTexCoord4xOES)(GLenum target, GLfixed s, GLfixed t, GLfixed r, GLfixed q)
-{
- DISPATCH(MultiTexCoord4x, (target, s, t, r, q), (F, "glMultiTexCoord4xOES(0x%x, %d, %d, %d, %d);\n", target, s, t, r, q));
-}
-
-KEYWORD1 void KEYWORD2 NAME(Normal3x)(GLfixed nx, GLfixed ny, GLfixed nz);
-
-KEYWORD1 void KEYWORD2 NAME(Normal3x)(GLfixed nx, GLfixed ny, GLfixed nz)
-{
- DISPATCH(Normal3x, (nx, ny, nz), (F, "glNormal3x(%d, %d, %d);\n", nx, ny, nz));
-}
-
-KEYWORD1 void KEYWORD2 NAME(Normal3xOES)(GLfixed nx, GLfixed ny, GLfixed nz);
-
-KEYWORD1 void KEYWORD2 NAME(Normal3xOES)(GLfixed nx, GLfixed ny, GLfixed nz)
-{
- DISPATCH(Normal3x, (nx, ny, nz), (F, "glNormal3xOES(%d, %d, %d);\n", nx, ny, nz));
-}
-
-KEYWORD1 void KEYWORD2 NAME(Orthof)(GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar);
-
-KEYWORD1 void KEYWORD2 NAME(Orthof)(GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar)
-{
- DISPATCH(Orthof, (left, right, bottom, top, zNear, zFar), (F, "glOrthof(%f, %f, %f, %f, %f, %f);\n", left, right, bottom, top, zNear, zFar));
-}
-
-KEYWORD1 void KEYWORD2 NAME(OrthofOES)(GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar);
-
-KEYWORD1 void KEYWORD2 NAME(OrthofOES)(GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar)
-{
- DISPATCH(Orthof, (left, right, bottom, top, zNear, zFar), (F, "glOrthofOES(%f, %f, %f, %f, %f, %f);\n", left, right, bottom, top, zNear, zFar));
-}
-
-KEYWORD1 void KEYWORD2 NAME(Orthox)(GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar);
-
-KEYWORD1 void KEYWORD2 NAME(Orthox)(GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar)
-{
- DISPATCH(Orthox, (left, right, bottom, top, zNear, zFar), (F, "glOrthox(%d, %d, %d, %d, %d, %d);\n", left, right, bottom, top, zNear, zFar));
-}
-
-KEYWORD1 void KEYWORD2 NAME(OrthoxOES)(GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar);
-
-KEYWORD1 void KEYWORD2 NAME(OrthoxOES)(GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar)
-{
- DISPATCH(Orthox, (left, right, bottom, top, zNear, zFar), (F, "glOrthoxOES(%d, %d, %d, %d, %d, %d);\n", left, right, bottom, top, zNear, zFar));
-}
-
-KEYWORD1 void KEYWORD2 NAME(PointSizex)(GLfixed size);
-
-KEYWORD1 void KEYWORD2 NAME(PointSizex)(GLfixed size)
-{
- DISPATCH(PointSizex, (size), (F, "glPointSizex(%d);\n", size));
-}
-
-KEYWORD1 void KEYWORD2 NAME(PointSizexOES)(GLfixed size);
-
-KEYWORD1 void KEYWORD2 NAME(PointSizexOES)(GLfixed size)
-{
- DISPATCH(PointSizex, (size), (F, "glPointSizexOES(%d);\n", size));
-}
-
-KEYWORD1 void KEYWORD2 NAME(PolygonOffsetx)(GLfixed factor, GLfixed units);
-
-KEYWORD1 void KEYWORD2 NAME(PolygonOffsetx)(GLfixed factor, GLfixed units)
-{
- DISPATCH(PolygonOffsetx, (factor, units), (F, "glPolygonOffsetx(%d, %d);\n", factor, units));
-}
-
-KEYWORD1 void KEYWORD2 NAME(PolygonOffsetxOES)(GLfixed factor, GLfixed units);
-
-KEYWORD1 void KEYWORD2 NAME(PolygonOffsetxOES)(GLfixed factor, GLfixed units)
-{
- DISPATCH(PolygonOffsetx, (factor, units), (F, "glPolygonOffsetxOES(%d, %d);\n", factor, units));
-}
-
-KEYWORD1 void KEYWORD2 NAME(Rotatex)(GLfixed angle, GLfixed x, GLfixed y, GLfixed z);
-
-KEYWORD1 void KEYWORD2 NAME(Rotatex)(GLfixed angle, GLfixed x, GLfixed y, GLfixed z)
-{
- DISPATCH(Rotatex, (angle, x, y, z), (F, "glRotatex(%d, %d, %d, %d);\n", angle, x, y, z));
-}
-
-KEYWORD1 void KEYWORD2 NAME(RotatexOES)(GLfixed angle, GLfixed x, GLfixed y, GLfixed z);
-
-KEYWORD1 void KEYWORD2 NAME(RotatexOES)(GLfixed angle, GLfixed x, GLfixed y, GLfixed z)
-{
- DISPATCH(Rotatex, (angle, x, y, z), (F, "glRotatexOES(%d, %d, %d, %d);\n", angle, x, y, z));
-}
-
-KEYWORD1 void KEYWORD2 NAME(SampleCoveragex)(GLclampx value, GLboolean invert);
-
-KEYWORD1 void KEYWORD2 NAME(SampleCoveragex)(GLclampx value, GLboolean invert)
-{
- DISPATCH(SampleCoveragex, (value, invert), (F, "glSampleCoveragex(%d, %d);\n", value, invert));
-}
-
-KEYWORD1 void KEYWORD2 NAME(SampleCoveragexOES)(GLclampx value, GLboolean invert);
-
-KEYWORD1 void KEYWORD2 NAME(SampleCoveragexOES)(GLclampx value, GLboolean invert)
-{
- DISPATCH(SampleCoveragex, (value, invert), (F, "glSampleCoveragexOES(%d, %d);\n", value, invert));
-}
-
-KEYWORD1 void KEYWORD2 NAME(Scalex)(GLfixed x, GLfixed y, GLfixed z);
-
-KEYWORD1 void KEYWORD2 NAME(Scalex)(GLfixed x, GLfixed y, GLfixed z)
-{
- DISPATCH(Scalex, (x, y, z), (F, "glScalex(%d, %d, %d);\n", x, y, z));
-}
-
-KEYWORD1 void KEYWORD2 NAME(ScalexOES)(GLfixed x, GLfixed y, GLfixed z);
-
-KEYWORD1 void KEYWORD2 NAME(ScalexOES)(GLfixed x, GLfixed y, GLfixed z)
-{
- DISPATCH(Scalex, (x, y, z), (F, "glScalexOES(%d, %d, %d);\n", x, y, z));
-}
-
-KEYWORD1 void KEYWORD2 NAME(TexEnvx)(GLenum target, GLenum pname, GLfixed param);
-
-KEYWORD1 void KEYWORD2 NAME(TexEnvx)(GLenum target, GLenum pname, GLfixed param)
-{
- DISPATCH(TexEnvx, (target, pname, param), (F, "glTexEnvx(0x%x, 0x%x, %d);\n", target, pname, param));
-}
-
-KEYWORD1 void KEYWORD2 NAME(TexEnvxOES)(GLenum target, GLenum pname, GLfixed param);
-
-KEYWORD1 void KEYWORD2 NAME(TexEnvxOES)(GLenum target, GLenum pname, GLfixed param)
-{
- DISPATCH(TexEnvx, (target, pname, param), (F, "glTexEnvxOES(0x%x, 0x%x, %d);\n", target, pname, param));
-}
-
-KEYWORD1 void KEYWORD2 NAME(TexEnvxv)(GLenum target, GLenum pname, const GLfixed * params);
-
-KEYWORD1 void KEYWORD2 NAME(TexEnvxv)(GLenum target, GLenum pname, const GLfixed * params)
-{
- DISPATCH(TexEnvxv, (target, pname, params), (F, "glTexEnvxv(0x%x, 0x%x, %p);\n", target, pname, (const void *) params));
-}
-
-KEYWORD1 void KEYWORD2 NAME(TexEnvxvOES)(GLenum target, GLenum pname, const GLfixed * params);
-
-KEYWORD1 void KEYWORD2 NAME(TexEnvxvOES)(GLenum target, GLenum pname, const GLfixed * params)
-{
- DISPATCH(TexEnvxv, (target, pname, params), (F, "glTexEnvxvOES(0x%x, 0x%x, %p);\n", target, pname, (const void *) params));
-}
-
-KEYWORD1 void KEYWORD2 NAME(TexParameterx)(GLenum target, GLenum pname, GLfixed param);
-
-KEYWORD1 void KEYWORD2 NAME(TexParameterx)(GLenum target, GLenum pname, GLfixed param)
-{
- DISPATCH(TexParameterx, (target, pname, param), (F, "glTexParameterx(0x%x, 0x%x, %d);\n", target, pname, param));
-}
-
-KEYWORD1 void KEYWORD2 NAME(TexParameterxOES)(GLenum target, GLenum pname, GLfixed param);
-
-KEYWORD1 void KEYWORD2 NAME(TexParameterxOES)(GLenum target, GLenum pname, GLfixed param)
-{
- DISPATCH(TexParameterx, (target, pname, param), (F, "glTexParameterxOES(0x%x, 0x%x, %d);\n", target, pname, param));
-}
-
-KEYWORD1 void KEYWORD2 NAME(Translatex)(GLfixed x, GLfixed y, GLfixed z);
-
-KEYWORD1 void KEYWORD2 NAME(Translatex)(GLfixed x, GLfixed y, GLfixed z)
-{
- DISPATCH(Translatex, (x, y, z), (F, "glTranslatex(%d, %d, %d);\n", x, y, z));
-}
-
-KEYWORD1 void KEYWORD2 NAME(TranslatexOES)(GLfixed x, GLfixed y, GLfixed z);
-
-KEYWORD1 void KEYWORD2 NAME(TranslatexOES)(GLfixed x, GLfixed y, GLfixed z)
-{
- DISPATCH(Translatex, (x, y, z), (F, "glTranslatexOES(%d, %d, %d);\n", x, y, z));
-}
-
-KEYWORD1 void KEYWORD2 NAME(ClipPlanef)(GLenum plane, const GLfloat * equation);
-
-KEYWORD1 void KEYWORD2 NAME(ClipPlanef)(GLenum plane, const GLfloat * equation)
-{
- DISPATCH(ClipPlanef, (plane, equation), (F, "glClipPlanef(0x%x, %p);\n", plane, (const void *) equation));
-}
-
-KEYWORD1 void KEYWORD2 NAME(ClipPlanefOES)(GLenum plane, const GLfloat * equation);
-
-KEYWORD1 void KEYWORD2 NAME(ClipPlanefOES)(GLenum plane, const GLfloat * equation)
-{
- DISPATCH(ClipPlanef, (plane, equation), (F, "glClipPlanefOES(0x%x, %p);\n", plane, (const void *) equation));
-}
-
-KEYWORD1 void KEYWORD2 NAME(ClipPlanex)(GLenum plane, const GLfixed * equation);
-
-KEYWORD1 void KEYWORD2 NAME(ClipPlanex)(GLenum plane, const GLfixed * equation)
-{
- DISPATCH(ClipPlanex, (plane, equation), (F, "glClipPlanex(0x%x, %p);\n", plane, (const void *) equation));
-}
-
-KEYWORD1 void KEYWORD2 NAME(ClipPlanexOES)(GLenum plane, const GLfixed * equation);
-
-KEYWORD1 void KEYWORD2 NAME(ClipPlanexOES)(GLenum plane, const GLfixed * equation)
-{
- DISPATCH(ClipPlanex, (plane, equation), (F, "glClipPlanexOES(0x%x, %p);\n", plane, (const void *) equation));
-}
-
-KEYWORD1 void KEYWORD2 NAME(GetClipPlanef)(GLenum plane, GLfloat * equation);
-
-KEYWORD1 void KEYWORD2 NAME(GetClipPlanef)(GLenum plane, GLfloat * equation)
-{
- DISPATCH(GetClipPlanef, (plane, equation), (F, "glGetClipPlanef(0x%x, %p);\n", plane, (const void *) equation));
-}
-
-KEYWORD1 void KEYWORD2 NAME(GetClipPlanefOES)(GLenum plane, GLfloat * equation);
-
-KEYWORD1 void KEYWORD2 NAME(GetClipPlanefOES)(GLenum plane, GLfloat * equation)
-{
- DISPATCH(GetClipPlanef, (plane, equation), (F, "glGetClipPlanefOES(0x%x, %p);\n", plane, (const void *) equation));
-}
-
-KEYWORD1 void KEYWORD2 NAME(GetClipPlanex)(GLenum plane, GLfixed * equation);
-
-KEYWORD1 void KEYWORD2 NAME(GetClipPlanex)(GLenum plane, GLfixed * equation)
-{
- DISPATCH(GetClipPlanex, (plane, equation), (F, "glGetClipPlanex(0x%x, %p);\n", plane, (const void *) equation));
-}
-
-KEYWORD1 void KEYWORD2 NAME(GetClipPlanexOES)(GLenum plane, GLfixed * equation);
-
-KEYWORD1 void KEYWORD2 NAME(GetClipPlanexOES)(GLenum plane, GLfixed * equation)
-{
- DISPATCH(GetClipPlanex, (plane, equation), (F, "glGetClipPlanexOES(0x%x, %p);\n", plane, (const void *) equation));
-}
-
-KEYWORD1 void KEYWORD2 NAME(GetFixedv)(GLenum pname, GLfixed * params);
-
-KEYWORD1 void KEYWORD2 NAME(GetFixedv)(GLenum pname, GLfixed * params)
-{
- DISPATCH(GetFixedv, (pname, params), (F, "glGetFixedv(0x%x, %p);\n", pname, (const void *) params));
-}
-
-KEYWORD1 void KEYWORD2 NAME(GetFixedvOES)(GLenum pname, GLfixed * params);
-
-KEYWORD1 void KEYWORD2 NAME(GetFixedvOES)(GLenum pname, GLfixed * params)
-{
- DISPATCH(GetFixedv, (pname, params), (F, "glGetFixedvOES(0x%x, %p);\n", pname, (const void *) params));
-}
-
-KEYWORD1 void KEYWORD2 NAME(GetLightxv)(GLenum light, GLenum pname, GLfixed * params);
-
-KEYWORD1 void KEYWORD2 NAME(GetLightxv)(GLenum light, GLenum pname, GLfixed * params)
-{
- DISPATCH(GetLightxv, (light, pname, params), (F, "glGetLightxv(0x%x, 0x%x, %p);\n", light, pname, (const void *) params));
-}
-
-KEYWORD1 void KEYWORD2 NAME(GetLightxvOES)(GLenum light, GLenum pname, GLfixed * params);
-
-KEYWORD1 void KEYWORD2 NAME(GetLightxvOES)(GLenum light, GLenum pname, GLfixed * params)
-{
- DISPATCH(GetLightxv, (light, pname, params), (F, "glGetLightxvOES(0x%x, 0x%x, %p);\n", light, pname, (const void *) params));
-}
-
-KEYWORD1 void KEYWORD2 NAME(GetMaterialxv)(GLenum face, GLenum pname, GLfixed * params);
-
-KEYWORD1 void KEYWORD2 NAME(GetMaterialxv)(GLenum face, GLenum pname, GLfixed * params)
-{
- DISPATCH(GetMaterialxv, (face, pname, params), (F, "glGetMaterialxv(0x%x, 0x%x, %p);\n", face, pname, (const void *) params));
-}
-
-KEYWORD1 void KEYWORD2 NAME(GetMaterialxvOES)(GLenum face, GLenum pname, GLfixed * params);
-
-KEYWORD1 void KEYWORD2 NAME(GetMaterialxvOES)(GLenum face, GLenum pname, GLfixed * params)
-{
- DISPATCH(GetMaterialxv, (face, pname, params), (F, "glGetMaterialxvOES(0x%x, 0x%x, %p);\n", face, pname, (const void *) params));
-}
-
-KEYWORD1 void KEYWORD2 NAME(GetTexEnvxv)(GLenum target, GLenum pname, GLfixed * params);
-
-KEYWORD1 void KEYWORD2 NAME(GetTexEnvxv)(GLenum target, GLenum pname, GLfixed * params)
-{
- DISPATCH(GetTexEnvxv, (target, pname, params), (F, "glGetTexEnvxv(0x%x, 0x%x, %p);\n", target, pname, (const void *) params));
-}
-
-KEYWORD1 void KEYWORD2 NAME(GetTexEnvxvOES)(GLenum target, GLenum pname, GLfixed * params);
-
-KEYWORD1 void KEYWORD2 NAME(GetTexEnvxvOES)(GLenum target, GLenum pname, GLfixed * params)
-{
- DISPATCH(GetTexEnvxv, (target, pname, params), (F, "glGetTexEnvxvOES(0x%x, 0x%x, %p);\n", target, pname, (const void *) params));
-}
-
-KEYWORD1 void KEYWORD2 NAME(GetTexParameterxv)(GLenum target, GLenum pname, GLfixed * params);
-
-KEYWORD1 void KEYWORD2 NAME(GetTexParameterxv)(GLenum target, GLenum pname, GLfixed * params)
-{
- DISPATCH(GetTexParameterxv, (target, pname, params), (F, "glGetTexParameterxv(0x%x, 0x%x, %p);\n", target, pname, (const void *) params));
-}
-
-KEYWORD1 void KEYWORD2 NAME(GetTexParameterxvOES)(GLenum target, GLenum pname, GLfixed * params);
-
-KEYWORD1 void KEYWORD2 NAME(GetTexParameterxvOES)(GLenum target, GLenum pname, GLfixed * params)
-{
- DISPATCH(GetTexParameterxv, (target, pname, params), (F, "glGetTexParameterxvOES(0x%x, 0x%x, %p);\n", target, pname, (const void *) params));
-}
-
-KEYWORD1 void KEYWORD2 NAME(PointParameterx)(GLenum pname, GLfixed param);
-
-KEYWORD1 void KEYWORD2 NAME(PointParameterx)(GLenum pname, GLfixed param)
-{
- DISPATCH(PointParameterx, (pname, param), (F, "glPointParameterx(0x%x, %d);\n", pname, param));
-}
-
-KEYWORD1 void KEYWORD2 NAME(PointParameterxOES)(GLenum pname, GLfixed param);
-
-KEYWORD1 void KEYWORD2 NAME(PointParameterxOES)(GLenum pname, GLfixed param)
-{
- DISPATCH(PointParameterx, (pname, param), (F, "glPointParameterxOES(0x%x, %d);\n", pname, param));
-}
-
-KEYWORD1 void KEYWORD2 NAME(PointParameterxv)(GLenum pname, const GLfixed * params);
-
-KEYWORD1 void KEYWORD2 NAME(PointParameterxv)(GLenum pname, const GLfixed * params)
-{
- DISPATCH(PointParameterxv, (pname, params), (F, "glPointParameterxv(0x%x, %p);\n", pname, (const void *) params));
-}
-
-KEYWORD1 void KEYWORD2 NAME(PointParameterxvOES)(GLenum pname, const GLfixed * params);
-
-KEYWORD1 void KEYWORD2 NAME(PointParameterxvOES)(GLenum pname, const GLfixed * params)
-{
- DISPATCH(PointParameterxv, (pname, params), (F, "glPointParameterxvOES(0x%x, %p);\n", pname, (const void *) params));
-}
-
-KEYWORD1 void KEYWORD2 NAME(TexParameterxv)(GLenum target, GLenum pname, const GLfixed * params);
-
-KEYWORD1 void KEYWORD2 NAME(TexParameterxv)(GLenum target, GLenum pname, const GLfixed * params)
-{
- DISPATCH(TexParameterxv, (target, pname, params), (F, "glTexParameterxv(0x%x, 0x%x, %p);\n", target, pname, (const void *) params));
-}
-
-KEYWORD1 void KEYWORD2 NAME(TexParameterxvOES)(GLenum target, GLenum pname, const GLfixed * params);
-
-KEYWORD1 void KEYWORD2 NAME(TexParameterxvOES)(GLenum target, GLenum pname, const GLfixed * params)
-{
- DISPATCH(TexParameterxv, (target, pname, params), (F, "glTexParameterxvOES(0x%x, 0x%x, %p);\n", target, pname, (const void *) params));
-}
-
-
-#endif /* _GLAPI_SKIP_NORMAL_ENTRY_POINTS */
-
-/* these entry points might require different protocols */
-#ifndef _GLAPI_SKIP_PROTO_ENTRY_POINTS
-
-
-#endif /* _GLAPI_SKIP_PROTO_ENTRY_POINTS */
-
-
-#endif /* defined( NAME ) */
-
-/*
- * This is how a dispatch table can be initialized with all the functions
- * we generated above.
- */
-#ifdef DISPATCH_TABLE_NAME
-
-#ifndef TABLE_ENTRY
-#error TABLE_ENTRY must be defined
-#endif
-
-#ifdef _GLAPI_SKIP_NORMAL_ENTRY_POINTS
-#error _GLAPI_SKIP_NORMAL_ENTRY_POINTS must not be defined
-#endif
-
-_glapi_proc DISPATCH_TABLE_NAME[] = {
- TABLE_ENTRY(_dispatch_stub_0),
- TABLE_ENTRY(_dispatch_stub_1),
- TABLE_ENTRY(_dispatch_stub_2),
- TABLE_ENTRY(_dispatch_stub_3),
- TABLE_ENTRY(_dispatch_stub_4),
- TABLE_ENTRY(_dispatch_stub_5),
- TABLE_ENTRY(_dispatch_stub_6),
- TABLE_ENTRY(_dispatch_stub_7),
- TABLE_ENTRY(_dispatch_stub_8),
- TABLE_ENTRY(_dispatch_stub_9),
- TABLE_ENTRY(_dispatch_stub_10),
- TABLE_ENTRY(_dispatch_stub_11),
- TABLE_ENTRY(_dispatch_stub_12),
- TABLE_ENTRY(_dispatch_stub_13),
- TABLE_ENTRY(_dispatch_stub_14),
- TABLE_ENTRY(_dispatch_stub_15),
- TABLE_ENTRY(_dispatch_stub_16),
- TABLE_ENTRY(_dispatch_stub_17),
- TABLE_ENTRY(_dispatch_stub_18),
- TABLE_ENTRY(_dispatch_stub_19),
- TABLE_ENTRY(_dispatch_stub_20),
- TABLE_ENTRY(_dispatch_stub_21),
- TABLE_ENTRY(_dispatch_stub_22),
- TABLE_ENTRY(_dispatch_stub_23),
- TABLE_ENTRY(_dispatch_stub_24),
- TABLE_ENTRY(_dispatch_stub_25),
- TABLE_ENTRY(_dispatch_stub_26),
- TABLE_ENTRY(_dispatch_stub_27),
- TABLE_ENTRY(_dispatch_stub_28),
- TABLE_ENTRY(Color4f),
- TABLE_ENTRY(_dispatch_stub_30),
- TABLE_ENTRY(_dispatch_stub_31),
- TABLE_ENTRY(_dispatch_stub_32),
- TABLE_ENTRY(_dispatch_stub_33),
- TABLE_ENTRY(_dispatch_stub_34),
- TABLE_ENTRY(Color4ub),
- TABLE_ENTRY(_dispatch_stub_36),
- TABLE_ENTRY(_dispatch_stub_37),
- TABLE_ENTRY(_dispatch_stub_38),
- TABLE_ENTRY(_dispatch_stub_39),
- TABLE_ENTRY(_dispatch_stub_40),
- TABLE_ENTRY(_dispatch_stub_41),
- TABLE_ENTRY(_dispatch_stub_42),
- TABLE_ENTRY(_dispatch_stub_43),
- TABLE_ENTRY(_dispatch_stub_44),
- TABLE_ENTRY(_dispatch_stub_45),
- TABLE_ENTRY(_dispatch_stub_46),
- TABLE_ENTRY(_dispatch_stub_47),
- TABLE_ENTRY(_dispatch_stub_48),
- TABLE_ENTRY(_dispatch_stub_49),
- TABLE_ENTRY(_dispatch_stub_50),
- TABLE_ENTRY(_dispatch_stub_51),
- TABLE_ENTRY(_dispatch_stub_52),
- TABLE_ENTRY(_dispatch_stub_53),
- TABLE_ENTRY(_dispatch_stub_54),
- TABLE_ENTRY(_dispatch_stub_55),
- TABLE_ENTRY(Normal3f),
- TABLE_ENTRY(_dispatch_stub_57),
- TABLE_ENTRY(_dispatch_stub_58),
- TABLE_ENTRY(_dispatch_stub_59),
- TABLE_ENTRY(_dispatch_stub_60),
- TABLE_ENTRY(_dispatch_stub_61),
- TABLE_ENTRY(_dispatch_stub_62),
- TABLE_ENTRY(_dispatch_stub_63),
- TABLE_ENTRY(_dispatch_stub_64),
- TABLE_ENTRY(_dispatch_stub_65),
- TABLE_ENTRY(_dispatch_stub_66),
- TABLE_ENTRY(_dispatch_stub_67),
- TABLE_ENTRY(_dispatch_stub_68),
- TABLE_ENTRY(_dispatch_stub_69),
- TABLE_ENTRY(_dispatch_stub_70),
- TABLE_ENTRY(_dispatch_stub_71),
- TABLE_ENTRY(_dispatch_stub_72),
- TABLE_ENTRY(_dispatch_stub_73),
- TABLE_ENTRY(_dispatch_stub_74),
- TABLE_ENTRY(_dispatch_stub_75),
- TABLE_ENTRY(_dispatch_stub_76),
- TABLE_ENTRY(_dispatch_stub_77),
- TABLE_ENTRY(_dispatch_stub_78),
- TABLE_ENTRY(_dispatch_stub_79),
- TABLE_ENTRY(_dispatch_stub_80),
- TABLE_ENTRY(_dispatch_stub_81),
- TABLE_ENTRY(_dispatch_stub_82),
- TABLE_ENTRY(_dispatch_stub_83),
- TABLE_ENTRY(_dispatch_stub_84),
- TABLE_ENTRY(_dispatch_stub_85),
- TABLE_ENTRY(_dispatch_stub_86),
- TABLE_ENTRY(_dispatch_stub_87),
- TABLE_ENTRY(_dispatch_stub_88),
- TABLE_ENTRY(_dispatch_stub_89),
- TABLE_ENTRY(_dispatch_stub_90),
- TABLE_ENTRY(_dispatch_stub_91),
- TABLE_ENTRY(_dispatch_stub_92),
- TABLE_ENTRY(_dispatch_stub_93),
- TABLE_ENTRY(_dispatch_stub_94),
- TABLE_ENTRY(_dispatch_stub_95),
- TABLE_ENTRY(_dispatch_stub_96),
- TABLE_ENTRY(_dispatch_stub_97),
- TABLE_ENTRY(_dispatch_stub_98),
- TABLE_ENTRY(_dispatch_stub_99),
- TABLE_ENTRY(_dispatch_stub_100),
- TABLE_ENTRY(_dispatch_stub_101),
- TABLE_ENTRY(_dispatch_stub_102),
- TABLE_ENTRY(_dispatch_stub_103),
- TABLE_ENTRY(_dispatch_stub_104),
- TABLE_ENTRY(_dispatch_stub_105),
- TABLE_ENTRY(_dispatch_stub_106),
- TABLE_ENTRY(_dispatch_stub_107),
- TABLE_ENTRY(_dispatch_stub_108),
- TABLE_ENTRY(_dispatch_stub_109),
- TABLE_ENTRY(_dispatch_stub_110),
- TABLE_ENTRY(_dispatch_stub_111),
- TABLE_ENTRY(_dispatch_stub_112),
- TABLE_ENTRY(_dispatch_stub_113),
- TABLE_ENTRY(_dispatch_stub_114),
- TABLE_ENTRY(_dispatch_stub_115),
- TABLE_ENTRY(_dispatch_stub_116),
- TABLE_ENTRY(_dispatch_stub_117),
- TABLE_ENTRY(_dispatch_stub_118),
- TABLE_ENTRY(_dispatch_stub_119),
- TABLE_ENTRY(_dispatch_stub_120),
- TABLE_ENTRY(_dispatch_stub_121),
- TABLE_ENTRY(_dispatch_stub_122),
- TABLE_ENTRY(_dispatch_stub_123),
- TABLE_ENTRY(_dispatch_stub_124),
- TABLE_ENTRY(_dispatch_stub_125),
- TABLE_ENTRY(_dispatch_stub_126),
- TABLE_ENTRY(_dispatch_stub_127),
- TABLE_ENTRY(_dispatch_stub_128),
- TABLE_ENTRY(_dispatch_stub_129),
- TABLE_ENTRY(_dispatch_stub_130),
- TABLE_ENTRY(_dispatch_stub_131),
- TABLE_ENTRY(_dispatch_stub_132),
- TABLE_ENTRY(_dispatch_stub_133),
- TABLE_ENTRY(_dispatch_stub_134),
- TABLE_ENTRY(_dispatch_stub_135),
- TABLE_ENTRY(_dispatch_stub_136),
- TABLE_ENTRY(_dispatch_stub_137),
- TABLE_ENTRY(_dispatch_stub_138),
- TABLE_ENTRY(_dispatch_stub_139),
- TABLE_ENTRY(_dispatch_stub_140),
- TABLE_ENTRY(_dispatch_stub_141),
- TABLE_ENTRY(_dispatch_stub_142),
- TABLE_ENTRY(_dispatch_stub_143),
- TABLE_ENTRY(_dispatch_stub_144),
- TABLE_ENTRY(_dispatch_stub_145),
- TABLE_ENTRY(_dispatch_stub_146),
- TABLE_ENTRY(_dispatch_stub_147),
- TABLE_ENTRY(_dispatch_stub_148),
- TABLE_ENTRY(_dispatch_stub_149),
- TABLE_ENTRY(_dispatch_stub_150),
- TABLE_ENTRY(_dispatch_stub_151),
- TABLE_ENTRY(CullFace),
- TABLE_ENTRY(Fogf),
- TABLE_ENTRY(Fogfv),
- TABLE_ENTRY(_dispatch_stub_155),
- TABLE_ENTRY(_dispatch_stub_156),
- TABLE_ENTRY(FrontFace),
- TABLE_ENTRY(Hint),
- TABLE_ENTRY(Lightf),
- TABLE_ENTRY(Lightfv),
- TABLE_ENTRY(_dispatch_stub_161),
- TABLE_ENTRY(_dispatch_stub_162),
- TABLE_ENTRY(LightModelf),
- TABLE_ENTRY(LightModelfv),
- TABLE_ENTRY(_dispatch_stub_165),
- TABLE_ENTRY(_dispatch_stub_166),
- TABLE_ENTRY(_dispatch_stub_167),
- TABLE_ENTRY(LineWidth),
- TABLE_ENTRY(Materialf),
- TABLE_ENTRY(Materialfv),
- TABLE_ENTRY(_dispatch_stub_171),
- TABLE_ENTRY(_dispatch_stub_172),
- TABLE_ENTRY(PointSize),
- TABLE_ENTRY(_dispatch_stub_174),
- TABLE_ENTRY(_dispatch_stub_175),
- TABLE_ENTRY(Scissor),
- TABLE_ENTRY(ShadeModel),
- TABLE_ENTRY(TexParameterf),
- TABLE_ENTRY(TexParameterfv),
- TABLE_ENTRY(TexParameteri),
- TABLE_ENTRY(TexParameteriv),
- TABLE_ENTRY(_dispatch_stub_182),
- TABLE_ENTRY(TexImage2D),
- TABLE_ENTRY(TexEnvf),
- TABLE_ENTRY(TexEnvfv),
- TABLE_ENTRY(TexEnvi),
- TABLE_ENTRY(TexEnviv),
- TABLE_ENTRY(_dispatch_stub_188),
- TABLE_ENTRY(_dispatch_stub_189),
- TABLE_ENTRY(TexGenfOES),
- TABLE_ENTRY(TexGenfvOES),
- TABLE_ENTRY(TexGeniOES),
- TABLE_ENTRY(TexGenivOES),
- TABLE_ENTRY(_dispatch_stub_194),
- TABLE_ENTRY(_dispatch_stub_195),
- TABLE_ENTRY(_dispatch_stub_196),
- TABLE_ENTRY(_dispatch_stub_197),
- TABLE_ENTRY(_dispatch_stub_198),
- TABLE_ENTRY(_dispatch_stub_199),
- TABLE_ENTRY(_dispatch_stub_200),
- TABLE_ENTRY(_dispatch_stub_201),
- TABLE_ENTRY(_dispatch_stub_202),
- TABLE_ENTRY(Clear),
- TABLE_ENTRY(_dispatch_stub_204),
- TABLE_ENTRY(_dispatch_stub_205),
- TABLE_ENTRY(ClearColor),
- TABLE_ENTRY(ClearStencil),
- TABLE_ENTRY(_dispatch_stub_208),
- TABLE_ENTRY(StencilMask),
- TABLE_ENTRY(ColorMask),
- TABLE_ENTRY(DepthMask),
- TABLE_ENTRY(_dispatch_stub_212),
- TABLE_ENTRY(_dispatch_stub_213),
- TABLE_ENTRY(Disable),
- TABLE_ENTRY(Enable),
- TABLE_ENTRY(Finish),
- TABLE_ENTRY(Flush),
- TABLE_ENTRY(_dispatch_stub_218),
- TABLE_ENTRY(_dispatch_stub_219),
- TABLE_ENTRY(_dispatch_stub_220),
- TABLE_ENTRY(_dispatch_stub_221),
- TABLE_ENTRY(_dispatch_stub_222),
- TABLE_ENTRY(_dispatch_stub_223),
- TABLE_ENTRY(_dispatch_stub_224),
- TABLE_ENTRY(_dispatch_stub_225),
- TABLE_ENTRY(_dispatch_stub_226),
- TABLE_ENTRY(_dispatch_stub_227),
- TABLE_ENTRY(_dispatch_stub_228),
- TABLE_ENTRY(_dispatch_stub_229),
- TABLE_ENTRY(_dispatch_stub_230),
- TABLE_ENTRY(_dispatch_stub_231),
- TABLE_ENTRY(_dispatch_stub_232),
- TABLE_ENTRY(_dispatch_stub_233),
- TABLE_ENTRY(_dispatch_stub_234),
- TABLE_ENTRY(_dispatch_stub_235),
- TABLE_ENTRY(_dispatch_stub_236),
- TABLE_ENTRY(_dispatch_stub_237),
- TABLE_ENTRY(_dispatch_stub_238),
- TABLE_ENTRY(_dispatch_stub_239),
- TABLE_ENTRY(AlphaFunc),
- TABLE_ENTRY(BlendFunc),
- TABLE_ENTRY(LogicOp),
- TABLE_ENTRY(StencilFunc),
- TABLE_ENTRY(StencilOp),
- TABLE_ENTRY(DepthFunc),
- TABLE_ENTRY(_dispatch_stub_246),
- TABLE_ENTRY(_dispatch_stub_247),
- TABLE_ENTRY(_dispatch_stub_248),
- TABLE_ENTRY(_dispatch_stub_249),
- TABLE_ENTRY(PixelStorei),
- TABLE_ENTRY(_dispatch_stub_251),
- TABLE_ENTRY(_dispatch_stub_252),
- TABLE_ENTRY(_dispatch_stub_253),
- TABLE_ENTRY(_dispatch_stub_254),
- TABLE_ENTRY(_dispatch_stub_255),
- TABLE_ENTRY(ReadPixels),
- TABLE_ENTRY(_dispatch_stub_257),
- TABLE_ENTRY(GetBooleanv),
- TABLE_ENTRY(_dispatch_stub_259),
- TABLE_ENTRY(_dispatch_stub_260),
- TABLE_ENTRY(GetError),
- TABLE_ENTRY(GetFloatv),
- TABLE_ENTRY(GetIntegerv),
- TABLE_ENTRY(GetLightfv),
- TABLE_ENTRY(_dispatch_stub_265),
- TABLE_ENTRY(_dispatch_stub_266),
- TABLE_ENTRY(_dispatch_stub_267),
- TABLE_ENTRY(_dispatch_stub_268),
- TABLE_ENTRY(GetMaterialfv),
- TABLE_ENTRY(_dispatch_stub_270),
- TABLE_ENTRY(_dispatch_stub_271),
- TABLE_ENTRY(_dispatch_stub_272),
- TABLE_ENTRY(_dispatch_stub_273),
- TABLE_ENTRY(_dispatch_stub_274),
- TABLE_ENTRY(GetString),
- TABLE_ENTRY(GetTexEnvfv),
- TABLE_ENTRY(GetTexEnviv),
- TABLE_ENTRY(_dispatch_stub_278),
- TABLE_ENTRY(GetTexGenfvOES),
- TABLE_ENTRY(GetTexGenivOES),
- TABLE_ENTRY(_dispatch_stub_281),
- TABLE_ENTRY(GetTexParameterfv),
- TABLE_ENTRY(GetTexParameteriv),
- TABLE_ENTRY(_dispatch_stub_284),
- TABLE_ENTRY(_dispatch_stub_285),
- TABLE_ENTRY(IsEnabled),
- TABLE_ENTRY(_dispatch_stub_287),
- TABLE_ENTRY(_dispatch_stub_288),
- TABLE_ENTRY(_dispatch_stub_289),
- TABLE_ENTRY(LoadIdentity),
- TABLE_ENTRY(LoadMatrixf),
- TABLE_ENTRY(_dispatch_stub_292),
- TABLE_ENTRY(MatrixMode),
- TABLE_ENTRY(MultMatrixf),
- TABLE_ENTRY(_dispatch_stub_295),
- TABLE_ENTRY(_dispatch_stub_296),
- TABLE_ENTRY(PopMatrix),
- TABLE_ENTRY(PushMatrix),
- TABLE_ENTRY(_dispatch_stub_299),
- TABLE_ENTRY(Rotatef),
- TABLE_ENTRY(_dispatch_stub_301),
- TABLE_ENTRY(Scalef),
- TABLE_ENTRY(_dispatch_stub_303),
- TABLE_ENTRY(Translatef),
- TABLE_ENTRY(Viewport),
- TABLE_ENTRY(_dispatch_stub_306),
- TABLE_ENTRY(BindTexture),
- TABLE_ENTRY(ColorPointer),
- TABLE_ENTRY(DisableClientState),
- TABLE_ENTRY(DrawArrays),
- TABLE_ENTRY(DrawElements),
- TABLE_ENTRY(_dispatch_stub_312),
- TABLE_ENTRY(EnableClientState),
- TABLE_ENTRY(_dispatch_stub_314),
- TABLE_ENTRY(_dispatch_stub_315),
- TABLE_ENTRY(_dispatch_stub_316),
- TABLE_ENTRY(_dispatch_stub_317),
- TABLE_ENTRY(NormalPointer),
- TABLE_ENTRY(PolygonOffset),
- TABLE_ENTRY(TexCoordPointer),
- TABLE_ENTRY(VertexPointer),
- TABLE_ENTRY(_dispatch_stub_322),
- TABLE_ENTRY(_dispatch_stub_323),
- TABLE_ENTRY(CopyTexImage2D),
- TABLE_ENTRY(_dispatch_stub_325),
- TABLE_ENTRY(CopyTexSubImage2D),
- TABLE_ENTRY(DeleteTextures),
- TABLE_ENTRY(GenTextures),
- TABLE_ENTRY(GetPointerv),
- TABLE_ENTRY(IsTexture),
- TABLE_ENTRY(_dispatch_stub_331),
- TABLE_ENTRY(_dispatch_stub_332),
- TABLE_ENTRY(TexSubImage2D),
- TABLE_ENTRY(_dispatch_stub_334),
- TABLE_ENTRY(_dispatch_stub_335),
- TABLE_ENTRY(_dispatch_stub_336),
- TABLE_ENTRY(BlendEquationOES),
- TABLE_ENTRY(_dispatch_stub_338),
- TABLE_ENTRY(_dispatch_stub_339),
- TABLE_ENTRY(_dispatch_stub_340),
- TABLE_ENTRY(_dispatch_stub_341),
- TABLE_ENTRY(_dispatch_stub_342),
- TABLE_ENTRY(_dispatch_stub_343),
- TABLE_ENTRY(_dispatch_stub_344),
- TABLE_ENTRY(_dispatch_stub_345),
- 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_356),
- TABLE_ENTRY(_dispatch_stub_357),
- TABLE_ENTRY(_dispatch_stub_358),
- TABLE_ENTRY(_dispatch_stub_359),
- TABLE_ENTRY(_dispatch_stub_360),
- 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),
- TABLE_ENTRY(_dispatch_stub_367),
- TABLE_ENTRY(_dispatch_stub_368),
- TABLE_ENTRY(_dispatch_stub_369),
- TABLE_ENTRY(_dispatch_stub_370),
- TABLE_ENTRY(_dispatch_stub_371),
- TABLE_ENTRY(_dispatch_stub_372),
- TABLE_ENTRY(_dispatch_stub_373),
- TABLE_ENTRY(ActiveTexture),
- TABLE_ENTRY(ClientActiveTexture),
- TABLE_ENTRY(_dispatch_stub_376),
- TABLE_ENTRY(_dispatch_stub_377),
- TABLE_ENTRY(_dispatch_stub_378),
- TABLE_ENTRY(_dispatch_stub_379),
- TABLE_ENTRY(_dispatch_stub_380),
- TABLE_ENTRY(_dispatch_stub_381),
- TABLE_ENTRY(_dispatch_stub_382),
- TABLE_ENTRY(_dispatch_stub_383),
- TABLE_ENTRY(_dispatch_stub_384),
- TABLE_ENTRY(_dispatch_stub_385),
- TABLE_ENTRY(_dispatch_stub_386),
- TABLE_ENTRY(_dispatch_stub_387),
- TABLE_ENTRY(_dispatch_stub_388),
- TABLE_ENTRY(_dispatch_stub_389),
- TABLE_ENTRY(_dispatch_stub_390),
- TABLE_ENTRY(_dispatch_stub_391),
- TABLE_ENTRY(_dispatch_stub_392),
- TABLE_ENTRY(_dispatch_stub_393),
- TABLE_ENTRY(_dispatch_stub_394),
- TABLE_ENTRY(_dispatch_stub_395),
- TABLE_ENTRY(_dispatch_stub_396),
- TABLE_ENTRY(_dispatch_stub_397),
- TABLE_ENTRY(_dispatch_stub_398),
- TABLE_ENTRY(_dispatch_stub_399),
- TABLE_ENTRY(_dispatch_stub_400),
- TABLE_ENTRY(_dispatch_stub_401),
- TABLE_ENTRY(MultiTexCoord4f),
- TABLE_ENTRY(_dispatch_stub_403),
- TABLE_ENTRY(_dispatch_stub_404),
- TABLE_ENTRY(_dispatch_stub_405),
- TABLE_ENTRY(_dispatch_stub_406),
- TABLE_ENTRY(_dispatch_stub_407),
- TABLE_ENTRY(BlendEquationSeparateOES),
- TABLE_ENTRY(BlendFuncSeparateOES),
- TABLE_ENTRY(DrawTexfOES),
- TABLE_ENTRY(DrawTexfvOES),
- TABLE_ENTRY(DrawTexiOES),
- TABLE_ENTRY(DrawTexivOES),
- TABLE_ENTRY(DrawTexsOES),
- TABLE_ENTRY(DrawTexsvOES),
- TABLE_ENTRY(DrawTexxOES),
- TABLE_ENTRY(DrawTexxvOES),
- TABLE_ENTRY(BindFramebufferOES),
- TABLE_ENTRY(BindRenderbufferOES),
- TABLE_ENTRY(CheckFramebufferStatusOES),
- TABLE_ENTRY(DeleteFramebuffersOES),
- TABLE_ENTRY(DeleteRenderbuffersOES),
- TABLE_ENTRY(FramebufferRenderbufferOES),
- TABLE_ENTRY(FramebufferTexture2DOES),
- TABLE_ENTRY(GenFramebuffersOES),
- TABLE_ENTRY(GenRenderbuffersOES),
- TABLE_ENTRY(GenerateMipmapOES),
- TABLE_ENTRY(GetFramebufferAttachmentParameterivOES),
- TABLE_ENTRY(GetRenderbufferParameterivOES),
- TABLE_ENTRY(IsFramebufferOES),
- TABLE_ENTRY(IsRenderbufferOES),
- TABLE_ENTRY(RenderbufferStorageOES),
- TABLE_ENTRY(PointSizePointerOES),
- TABLE_ENTRY(QueryMatrixxOES),
- TABLE_ENTRY(GetTexGenxvOES),
- TABLE_ENTRY(TexGenxOES),
- TABLE_ENTRY(TexGenxvOES),
- TABLE_ENTRY(GetBufferPointervOES),
- TABLE_ENTRY(MapBufferOES),
- TABLE_ENTRY(UnmapBufferOES),
- TABLE_ENTRY(MultiDrawArraysEXT),
- TABLE_ENTRY(MultiDrawElementsEXT),
- TABLE_ENTRY(_dispatch_stub_443),
- TABLE_ENTRY(_dispatch_stub_444),
- TABLE_ENTRY(_dispatch_stub_445),
- TABLE_ENTRY(_dispatch_stub_446),
- TABLE_ENTRY(EGLImageTargetRenderbufferStorageOES),
- TABLE_ENTRY(EGLImageTargetTexture2DOES),
- TABLE_ENTRY(CompressedTexImage2D),
- TABLE_ENTRY(CompressedTexSubImage2D),
- TABLE_ENTRY(SampleCoverage),
- TABLE_ENTRY(BindBuffer),
- TABLE_ENTRY(BufferData),
- TABLE_ENTRY(BufferSubData),
- TABLE_ENTRY(DeleteBuffers),
- TABLE_ENTRY(GenBuffers),
- TABLE_ENTRY(GetBufferParameteriv),
- TABLE_ENTRY(IsBuffer),
- TABLE_ENTRY(PointParameterf),
- TABLE_ENTRY(PointParameterfv),
- TABLE_ENTRY(AlphaFuncx),
- TABLE_ENTRY(ClearColorx),
- TABLE_ENTRY(ClearDepthf),
- TABLE_ENTRY(ClearDepthx),
- TABLE_ENTRY(Color4x),
- TABLE_ENTRY(DepthRangef),
- TABLE_ENTRY(DepthRangex),
- TABLE_ENTRY(Fogx),
- TABLE_ENTRY(Fogxv),
- TABLE_ENTRY(Frustumf),
- TABLE_ENTRY(Frustumx),
- TABLE_ENTRY(LightModelx),
- TABLE_ENTRY(LightModelxv),
- TABLE_ENTRY(Lightx),
- TABLE_ENTRY(Lightxv),
- TABLE_ENTRY(LineWidthx),
- TABLE_ENTRY(LoadMatrixx),
- TABLE_ENTRY(Materialx),
- TABLE_ENTRY(Materialxv),
- TABLE_ENTRY(MultMatrixx),
- TABLE_ENTRY(MultiTexCoord4x),
- TABLE_ENTRY(Normal3x),
- TABLE_ENTRY(Orthof),
- TABLE_ENTRY(Orthox),
- TABLE_ENTRY(PointSizex),
- TABLE_ENTRY(PolygonOffsetx),
- TABLE_ENTRY(Rotatex),
- TABLE_ENTRY(SampleCoveragex),
- TABLE_ENTRY(Scalex),
- TABLE_ENTRY(TexEnvx),
- TABLE_ENTRY(TexEnvxv),
- TABLE_ENTRY(TexParameterx),
- TABLE_ENTRY(Translatex),
- TABLE_ENTRY(ClipPlanef),
- TABLE_ENTRY(ClipPlanex),
- TABLE_ENTRY(GetClipPlanef),
- TABLE_ENTRY(GetClipPlanex),
- TABLE_ENTRY(GetFixedv),
- TABLE_ENTRY(GetLightxv),
- TABLE_ENTRY(GetMaterialxv),
- TABLE_ENTRY(GetTexEnvxv),
- TABLE_ENTRY(GetTexParameterxv),
- TABLE_ENTRY(PointParameterx),
- TABLE_ENTRY(PointParameterxv),
- TABLE_ENTRY(TexParameterxv),
- /* 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.
- */
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
-};
-#endif /* DISPATCH_TABLE_NAME */
-
-
-/*
- * This is just used to silence compiler warnings.
- * We list the functions which are not otherwise used.
- */
-#ifdef UNUSED_TABLE_NAME
-_glapi_proc UNUSED_TABLE_NAME[] = {
-#ifndef _GLAPI_SKIP_NORMAL_ENTRY_POINTS
- TABLE_ENTRY(_dispatch_stub_190),
- TABLE_ENTRY(_dispatch_stub_191),
- TABLE_ENTRY(_dispatch_stub_192),
- TABLE_ENTRY(_dispatch_stub_193),
- TABLE_ENTRY(_dispatch_stub_279),
- TABLE_ENTRY(_dispatch_stub_280),
- TABLE_ENTRY(_dispatch_stub_337),
- TABLE_ENTRY(_dispatch_stub_374),
- TABLE_ENTRY(_dispatch_stub_375),
- TABLE_ENTRY(_dispatch_stub_402),
- TABLE_ENTRY(AlphaFuncxOES),
- TABLE_ENTRY(ClearColorxOES),
- TABLE_ENTRY(ClearDepthfOES),
- TABLE_ENTRY(ClearDepthxOES),
- TABLE_ENTRY(Color4xOES),
- TABLE_ENTRY(DepthRangefOES),
- TABLE_ENTRY(DepthRangexOES),
- TABLE_ENTRY(FogxOES),
- TABLE_ENTRY(FogxvOES),
- TABLE_ENTRY(FrustumfOES),
- TABLE_ENTRY(FrustumxOES),
- TABLE_ENTRY(LightModelxOES),
- TABLE_ENTRY(LightModelxvOES),
- TABLE_ENTRY(LightxOES),
- TABLE_ENTRY(LightxvOES),
- TABLE_ENTRY(LineWidthxOES),
- TABLE_ENTRY(LoadMatrixxOES),
- TABLE_ENTRY(MaterialxOES),
- TABLE_ENTRY(MaterialxvOES),
- TABLE_ENTRY(MultMatrixxOES),
- TABLE_ENTRY(MultiTexCoord4xOES),
- TABLE_ENTRY(Normal3xOES),
- TABLE_ENTRY(OrthofOES),
- TABLE_ENTRY(OrthoxOES),
- TABLE_ENTRY(PointSizexOES),
- TABLE_ENTRY(PolygonOffsetxOES),
- TABLE_ENTRY(RotatexOES),
- TABLE_ENTRY(SampleCoveragexOES),
- TABLE_ENTRY(ScalexOES),
- TABLE_ENTRY(TexEnvxOES),
- TABLE_ENTRY(TexEnvxvOES),
- TABLE_ENTRY(TexParameterxOES),
- TABLE_ENTRY(TranslatexOES),
- TABLE_ENTRY(ClipPlanefOES),
- TABLE_ENTRY(ClipPlanexOES),
- TABLE_ENTRY(GetClipPlanefOES),
- TABLE_ENTRY(GetClipPlanexOES),
- TABLE_ENTRY(GetFixedvOES),
- TABLE_ENTRY(GetLightxvOES),
- TABLE_ENTRY(GetMaterialxvOES),
- TABLE_ENTRY(GetTexEnvxvOES),
- TABLE_ENTRY(GetTexParameterxvOES),
- TABLE_ENTRY(PointParameterxOES),
- TABLE_ENTRY(PointParameterxvOES),
- TABLE_ENTRY(TexParameterxvOES),
-#endif /* _GLAPI_SKIP_NORMAL_ENTRY_POINTS */
-#ifndef _GLAPI_SKIP_PROTO_ENTRY_POINTS
-#endif /* _GLAPI_SKIP_PROTO_ENTRY_POINTS */
-};
-#endif /*UNUSED_TABLE_NAME*/
-
-
-# undef KEYWORD1
-# undef KEYWORD1_ALT
-# undef KEYWORD2
-# undef NAME
-# undef DISPATCH
-# undef RETURN_DISPATCH
-# undef DISPATCH_TABLE_NAME
-# undef UNUSED_TABLE_NAME
-# undef TABLE_ENTRY
-# undef HIDDEN
diff --git a/src/mapi/es1api/glapi/glprocs.h b/src/mapi/es1api/glapi/glprocs.h
deleted file mode 100644
index fe2fecfc932..00000000000
--- a/src/mapi/es1api/glapi/glprocs.h
+++ /dev/null
@@ -1,1977 +0,0 @@
-/* DO NOT EDIT - This file generated automatically by gl_procs.py (from Mesa) script */
-
-/*
- * Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
- * (C) Copyright IBM Corporation 2004, 2006
- * 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
- * BRIAN PAUL, IBM,
- * AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
- * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-
-/* This file is only included by glapi.c and is used for
- * the GetProcAddress() function
- */
-
-typedef struct {
- GLint Name_offset;
-#if defined(NEED_FUNCTION_POINTER) || defined(GLX_INDIRECT_RENDERING)
- _glapi_proc Address;
-#endif
- GLuint Offset;
-} glprocs_table_t;
-
-#if !defined(NEED_FUNCTION_POINTER) && !defined(GLX_INDIRECT_RENDERING)
-# define NAME_FUNC_OFFSET(n,f1,f2,f3,o) { n , o }
-#elif defined(NEED_FUNCTION_POINTER) && !defined(GLX_INDIRECT_RENDERING)
-# define NAME_FUNC_OFFSET(n,f1,f2,f3,o) { n , (_glapi_proc) f1 , o }
-#elif defined(NEED_FUNCTION_POINTER) && defined(GLX_INDIRECT_RENDERING)
-# define NAME_FUNC_OFFSET(n,f1,f2,f3,o) { n , (_glapi_proc) f2 , o }
-#elif !defined(NEED_FUNCTION_POINTER) && defined(GLX_INDIRECT_RENDERING)
-# define NAME_FUNC_OFFSET(n,f1,f2,f3,o) { n , (_glapi_proc) f3 , o }
-#endif
-
-
-
-static const char gl_string_table[] =
- "glNewList\0"
- "glEndList\0"
- "glCallList\0"
- "glCallLists\0"
- "glDeleteLists\0"
- "glGenLists\0"
- "glListBase\0"
- "glBegin\0"
- "glBitmap\0"
- "glColor3b\0"
- "glColor3bv\0"
- "glColor3d\0"
- "glColor3dv\0"
- "glColor3f\0"
- "glColor3fv\0"
- "glColor3i\0"
- "glColor3iv\0"
- "glColor3s\0"
- "glColor3sv\0"
- "glColor3ub\0"
- "glColor3ubv\0"
- "glColor3ui\0"
- "glColor3uiv\0"
- "glColor3us\0"
- "glColor3usv\0"
- "glColor4b\0"
- "glColor4bv\0"
- "glColor4d\0"
- "glColor4dv\0"
- "glColor4f\0"
- "glColor4fv\0"
- "glColor4i\0"
- "glColor4iv\0"
- "glColor4s\0"
- "glColor4sv\0"
- "glColor4ub\0"
- "glColor4ubv\0"
- "glColor4ui\0"
- "glColor4uiv\0"
- "glColor4us\0"
- "glColor4usv\0"
- "glEdgeFlag\0"
- "glEdgeFlagv\0"
- "glEnd\0"
- "glIndexd\0"
- "glIndexdv\0"
- "glIndexf\0"
- "glIndexfv\0"
- "glIndexi\0"
- "glIndexiv\0"
- "glIndexs\0"
- "glIndexsv\0"
- "glNormal3b\0"
- "glNormal3bv\0"
- "glNormal3d\0"
- "glNormal3dv\0"
- "glNormal3f\0"
- "glNormal3fv\0"
- "glNormal3i\0"
- "glNormal3iv\0"
- "glNormal3s\0"
- "glNormal3sv\0"
- "glRasterPos2d\0"
- "glRasterPos2dv\0"
- "glRasterPos2f\0"
- "glRasterPos2fv\0"
- "glRasterPos2i\0"
- "glRasterPos2iv\0"
- "glRasterPos2s\0"
- "glRasterPos2sv\0"
- "glRasterPos3d\0"
- "glRasterPos3dv\0"
- "glRasterPos3f\0"
- "glRasterPos3fv\0"
- "glRasterPos3i\0"
- "glRasterPos3iv\0"
- "glRasterPos3s\0"
- "glRasterPos3sv\0"
- "glRasterPos4d\0"
- "glRasterPos4dv\0"
- "glRasterPos4f\0"
- "glRasterPos4fv\0"
- "glRasterPos4i\0"
- "glRasterPos4iv\0"
- "glRasterPos4s\0"
- "glRasterPos4sv\0"
- "glRectd\0"
- "glRectdv\0"
- "glRectf\0"
- "glRectfv\0"
- "glRecti\0"
- "glRectiv\0"
- "glRects\0"
- "glRectsv\0"
- "glTexCoord1d\0"
- "glTexCoord1dv\0"
- "glTexCoord1f\0"
- "glTexCoord1fv\0"
- "glTexCoord1i\0"
- "glTexCoord1iv\0"
- "glTexCoord1s\0"
- "glTexCoord1sv\0"
- "glTexCoord2d\0"
- "glTexCoord2dv\0"
- "glTexCoord2f\0"
- "glTexCoord2fv\0"
- "glTexCoord2i\0"
- "glTexCoord2iv\0"
- "glTexCoord2s\0"
- "glTexCoord2sv\0"
- "glTexCoord3d\0"
- "glTexCoord3dv\0"
- "glTexCoord3f\0"
- "glTexCoord3fv\0"
- "glTexCoord3i\0"
- "glTexCoord3iv\0"
- "glTexCoord3s\0"
- "glTexCoord3sv\0"
- "glTexCoord4d\0"
- "glTexCoord4dv\0"
- "glTexCoord4f\0"
- "glTexCoord4fv\0"
- "glTexCoord4i\0"
- "glTexCoord4iv\0"
- "glTexCoord4s\0"
- "glTexCoord4sv\0"
- "glVertex2d\0"
- "glVertex2dv\0"
- "glVertex2f\0"
- "glVertex2fv\0"
- "glVertex2i\0"
- "glVertex2iv\0"
- "glVertex2s\0"
- "glVertex2sv\0"
- "glVertex3d\0"
- "glVertex3dv\0"
- "glVertex3f\0"
- "glVertex3fv\0"
- "glVertex3i\0"
- "glVertex3iv\0"
- "glVertex3s\0"
- "glVertex3sv\0"
- "glVertex4d\0"
- "glVertex4dv\0"
- "glVertex4f\0"
- "glVertex4fv\0"
- "glVertex4i\0"
- "glVertex4iv\0"
- "glVertex4s\0"
- "glVertex4sv\0"
- "glClipPlane\0"
- "glColorMaterial\0"
- "glCullFace\0"
- "glFogf\0"
- "glFogfv\0"
- "glFogi\0"
- "glFogiv\0"
- "glFrontFace\0"
- "glHint\0"
- "glLightf\0"
- "glLightfv\0"
- "glLighti\0"
- "glLightiv\0"
- "glLightModelf\0"
- "glLightModelfv\0"
- "glLightModeli\0"
- "glLightModeliv\0"
- "glLineStipple\0"
- "glLineWidth\0"
- "glMaterialf\0"
- "glMaterialfv\0"
- "glMateriali\0"
- "glMaterialiv\0"
- "glPointSize\0"
- "glPolygonMode\0"
- "glPolygonStipple\0"
- "glScissor\0"
- "glShadeModel\0"
- "glTexParameterf\0"
- "glTexParameterfv\0"
- "glTexParameteri\0"
- "glTexParameteriv\0"
- "glTexImage1D\0"
- "glTexImage2D\0"
- "glTexEnvf\0"
- "glTexEnvfv\0"
- "glTexEnvi\0"
- "glTexEnviv\0"
- "glTexGend\0"
- "glTexGendv\0"
- "glTexGenfOES\0"
- "glTexGenfvOES\0"
- "glTexGeniOES\0"
- "glTexGenivOES\0"
- "glFeedbackBuffer\0"
- "glSelectBuffer\0"
- "glRenderMode\0"
- "glInitNames\0"
- "glLoadName\0"
- "glPassThrough\0"
- "glPopName\0"
- "glPushName\0"
- "glDrawBuffer\0"
- "glClear\0"
- "glClearAccum\0"
- "glClearIndex\0"
- "glClearColor\0"
- "glClearStencil\0"
- "glClearDepth\0"
- "glStencilMask\0"
- "glColorMask\0"
- "glDepthMask\0"
- "glIndexMask\0"
- "glAccum\0"
- "glDisable\0"
- "glEnable\0"
- "glFinish\0"
- "glFlush\0"
- "glPopAttrib\0"
- "glPushAttrib\0"
- "glMap1d\0"
- "glMap1f\0"
- "glMap2d\0"
- "glMap2f\0"
- "glMapGrid1d\0"
- "glMapGrid1f\0"
- "glMapGrid2d\0"
- "glMapGrid2f\0"
- "glEvalCoord1d\0"
- "glEvalCoord1dv\0"
- "glEvalCoord1f\0"
- "glEvalCoord1fv\0"
- "glEvalCoord2d\0"
- "glEvalCoord2dv\0"
- "glEvalCoord2f\0"
- "glEvalCoord2fv\0"
- "glEvalMesh1\0"
- "glEvalPoint1\0"
- "glEvalMesh2\0"
- "glEvalPoint2\0"
- "glAlphaFunc\0"
- "glBlendFunc\0"
- "glLogicOp\0"
- "glStencilFunc\0"
- "glStencilOp\0"
- "glDepthFunc\0"
- "glPixelZoom\0"
- "glPixelTransferf\0"
- "glPixelTransferi\0"
- "glPixelStoref\0"
- "glPixelStorei\0"
- "glPixelMapfv\0"
- "glPixelMapuiv\0"
- "glPixelMapusv\0"
- "glReadBuffer\0"
- "glCopyPixels\0"
- "glReadPixels\0"
- "glDrawPixels\0"
- "glGetBooleanv\0"
- "glGetClipPlane\0"
- "glGetDoublev\0"
- "glGetError\0"
- "glGetFloatv\0"
- "glGetIntegerv\0"
- "glGetLightfv\0"
- "glGetLightiv\0"
- "glGetMapdv\0"
- "glGetMapfv\0"
- "glGetMapiv\0"
- "glGetMaterialfv\0"
- "glGetMaterialiv\0"
- "glGetPixelMapfv\0"
- "glGetPixelMapuiv\0"
- "glGetPixelMapusv\0"
- "glGetPolygonStipple\0"
- "glGetString\0"
- "glGetTexEnvfv\0"
- "glGetTexEnviv\0"
- "glGetTexGendv\0"
- "glGetTexGenfvOES\0"
- "glGetTexGenivOES\0"
- "glGetTexImage\0"
- "glGetTexParameterfv\0"
- "glGetTexParameteriv\0"
- "glGetTexLevelParameterfv\0"
- "glGetTexLevelParameteriv\0"
- "glIsEnabled\0"
- "glIsList\0"
- "glDepthRange\0"
- "glFrustum\0"
- "glLoadIdentity\0"
- "glLoadMatrixf\0"
- "glLoadMatrixd\0"
- "glMatrixMode\0"
- "glMultMatrixf\0"
- "glMultMatrixd\0"
- "glOrtho\0"
- "glPopMatrix\0"
- "glPushMatrix\0"
- "glRotated\0"
- "glRotatef\0"
- "glScaled\0"
- "glScalef\0"
- "glTranslated\0"
- "glTranslatef\0"
- "glViewport\0"
- "glArrayElement\0"
- "glBindTexture\0"
- "glColorPointer\0"
- "glDisableClientState\0"
- "glDrawArrays\0"
- "glDrawElements\0"
- "glEdgeFlagPointer\0"
- "glEnableClientState\0"
- "glIndexPointer\0"
- "glIndexub\0"
- "glIndexubv\0"
- "glInterleavedArrays\0"
- "glNormalPointer\0"
- "glPolygonOffset\0"
- "glTexCoordPointer\0"
- "glVertexPointer\0"
- "glAreTexturesResident\0"
- "glCopyTexImage1D\0"
- "glCopyTexImage2D\0"
- "glCopyTexSubImage1D\0"
- "glCopyTexSubImage2D\0"
- "glDeleteTextures\0"
- "glGenTextures\0"
- "glGetPointerv\0"
- "glIsTexture\0"
- "glPrioritizeTextures\0"
- "glTexSubImage1D\0"
- "glTexSubImage2D\0"
- "glPopClientAttrib\0"
- "glPushClientAttrib\0"
- "glBlendColor\0"
- "glBlendEquationOES\0"
- "glDrawRangeElements\0"
- "glColorTable\0"
- "glColorTableParameterfv\0"
- "glColorTableParameteriv\0"
- "glCopyColorTable\0"
- "glGetColorTable\0"
- "glGetColorTableParameterfv\0"
- "glGetColorTableParameteriv\0"
- "glColorSubTable\0"
- "glCopyColorSubTable\0"
- "glConvolutionFilter1D\0"
- "glConvolutionFilter2D\0"
- "glConvolutionParameterf\0"
- "glConvolutionParameterfv\0"
- "glConvolutionParameteri\0"
- "glConvolutionParameteriv\0"
- "glCopyConvolutionFilter1D\0"
- "glCopyConvolutionFilter2D\0"
- "glGetConvolutionFilter\0"
- "glGetConvolutionParameterfv\0"
- "glGetConvolutionParameteriv\0"
- "glGetSeparableFilter\0"
- "glSeparableFilter2D\0"
- "glGetHistogram\0"
- "glGetHistogramParameterfv\0"
- "glGetHistogramParameteriv\0"
- "glGetMinmax\0"
- "glGetMinmaxParameterfv\0"
- "glGetMinmaxParameteriv\0"
- "glHistogram\0"
- "glMinmax\0"
- "glResetHistogram\0"
- "glResetMinmax\0"
- "glTexImage3D\0"
- "glTexSubImage3D\0"
- "glCopyTexSubImage3D\0"
- "glActiveTexture\0"
- "glClientActiveTexture\0"
- "glMultiTexCoord1dARB\0"
- "glMultiTexCoord1dvARB\0"
- "glMultiTexCoord1fARB\0"
- "glMultiTexCoord1fvARB\0"
- "glMultiTexCoord1iARB\0"
- "glMultiTexCoord1ivARB\0"
- "glMultiTexCoord1sARB\0"
- "glMultiTexCoord1svARB\0"
- "glMultiTexCoord2dARB\0"
- "glMultiTexCoord2dvARB\0"
- "glMultiTexCoord2fARB\0"
- "glMultiTexCoord2fvARB\0"
- "glMultiTexCoord2iARB\0"
- "glMultiTexCoord2ivARB\0"
- "glMultiTexCoord2sARB\0"
- "glMultiTexCoord2svARB\0"
- "glMultiTexCoord3dARB\0"
- "glMultiTexCoord3dvARB\0"
- "glMultiTexCoord3fARB\0"
- "glMultiTexCoord3fvARB\0"
- "glMultiTexCoord3iARB\0"
- "glMultiTexCoord3ivARB\0"
- "glMultiTexCoord3sARB\0"
- "glMultiTexCoord3svARB\0"
- "glMultiTexCoord4dARB\0"
- "glMultiTexCoord4dvARB\0"
- "glMultiTexCoord4f\0"
- "glMultiTexCoord4fvARB\0"
- "glMultiTexCoord4iARB\0"
- "glMultiTexCoord4ivARB\0"
- "glMultiTexCoord4sARB\0"
- "glMultiTexCoord4svARB\0"
- "glBlendEquationSeparateOES\0"
- "glBlendFuncSeparateOES\0"
- "glDrawTexfOES\0"
- "glDrawTexfvOES\0"
- "glDrawTexiOES\0"
- "glDrawTexivOES\0"
- "glDrawTexsOES\0"
- "glDrawTexsvOES\0"
- "glDrawTexxOES\0"
- "glDrawTexxvOES\0"
- "glBindFramebufferOES\0"
- "glBindRenderbufferOES\0"
- "glCheckFramebufferStatusOES\0"
- "glDeleteFramebuffersOES\0"
- "glDeleteRenderbuffersOES\0"
- "glFramebufferRenderbufferOES\0"
- "glFramebufferTexture2DOES\0"
- "glGenFramebuffersOES\0"
- "glGenRenderbuffersOES\0"
- "glGenerateMipmapOES\0"
- "glGetFramebufferAttachmentParameterivOES\0"
- "glGetRenderbufferParameterivOES\0"
- "glIsFramebufferOES\0"
- "glIsRenderbufferOES\0"
- "glRenderbufferStorageOES\0"
- "glPointSizePointerOES\0"
- "glQueryMatrixxOES\0"
- "glGetTexGenxvOES\0"
- "glTexGenxOES\0"
- "glTexGenxvOES\0"
- "glGetBufferPointervOES\0"
- "glMapBufferOES\0"
- "glUnmapBufferOES\0"
- "glMultiDrawArraysEXT\0"
- "glMultiDrawElementsEXT\0"
- "glBindVertexArrayAPPLE\0"
- "glDeleteVertexArraysAPPLE\0"
- "glGenVertexArraysAPPLE\0"
- "glIsVertexArrayAPPLE\0"
- "glEGLImageTargetRenderbufferStorageOES\0"
- "glEGLImageTargetTexture2DOES\0"
- "glCompressedTexImage2D\0"
- "glCompressedTexSubImage2D\0"
- "glSampleCoverage\0"
- "glBindBuffer\0"
- "glBufferData\0"
- "glBufferSubData\0"
- "glDeleteBuffers\0"
- "glGenBuffers\0"
- "glGetBufferParameteriv\0"
- "glIsBuffer\0"
- "glPointParameterf\0"
- "glPointParameterfv\0"
- "glAlphaFuncx\0"
- "glClearColorx\0"
- "glClearDepthf\0"
- "glClearDepthx\0"
- "glColor4x\0"
- "glDepthRangef\0"
- "glDepthRangex\0"
- "glFogx\0"
- "glFogxv\0"
- "glFrustumf\0"
- "glFrustumx\0"
- "glLightModelx\0"
- "glLightModelxv\0"
- "glLightx\0"
- "glLightxv\0"
- "glLineWidthx\0"
- "glLoadMatrixx\0"
- "glMaterialx\0"
- "glMaterialxv\0"
- "glMultMatrixx\0"
- "glMultiTexCoord4x\0"
- "glNormal3x\0"
- "glOrthof\0"
- "glOrthox\0"
- "glPointSizex\0"
- "glPolygonOffsetx\0"
- "glRotatex\0"
- "glSampleCoveragex\0"
- "glScalex\0"
- "glTexEnvx\0"
- "glTexEnvxv\0"
- "glTexParameterx\0"
- "glTranslatex\0"
- "glClipPlanef\0"
- "glClipPlanex\0"
- "glGetClipPlanef\0"
- "glGetClipPlanex\0"
- "glGetFixedv\0"
- "glGetLightxv\0"
- "glGetMaterialxv\0"
- "glGetTexEnvxv\0"
- "glGetTexParameterxv\0"
- "glPointParameterx\0"
- "glPointParameterxv\0"
- "glTexParameterxv\0"
- "glTexGenf\0"
- "glTexGenfv\0"
- "glTexGeni\0"
- "glTexGeniv\0"
- "glGetTexGenfv\0"
- "glGetTexGeniv\0"
- "glBlendEquation\0"
- "glActiveTextureARB\0"
- "glClientActiveTextureARB\0"
- "glMultiTexCoord4fARB\0"
- "glAlphaFuncxOES\0"
- "glClearColorxOES\0"
- "glClearDepthfOES\0"
- "glClearDepthxOES\0"
- "glColor4xOES\0"
- "glDepthRangefOES\0"
- "glDepthRangexOES\0"
- "glFogxOES\0"
- "glFogxvOES\0"
- "glFrustumfOES\0"
- "glFrustumxOES\0"
- "glLightModelxOES\0"
- "glLightModelxvOES\0"
- "glLightxOES\0"
- "glLightxvOES\0"
- "glLineWidthxOES\0"
- "glLoadMatrixxOES\0"
- "glMaterialxOES\0"
- "glMaterialxvOES\0"
- "glMultMatrixxOES\0"
- "glMultiTexCoord4xOES\0"
- "glNormal3xOES\0"
- "glOrthofOES\0"
- "glOrthoxOES\0"
- "glPointSizexOES\0"
- "glPolygonOffsetxOES\0"
- "glRotatexOES\0"
- "glSampleCoveragexOES\0"
- "glScalexOES\0"
- "glTexEnvxOES\0"
- "glTexEnvxvOES\0"
- "glTexParameterxOES\0"
- "glTranslatexOES\0"
- "glClipPlanefOES\0"
- "glClipPlanexOES\0"
- "glGetClipPlanefOES\0"
- "glGetClipPlanexOES\0"
- "glGetFixedvOES\0"
- "glGetLightxvOES\0"
- "glGetMaterialxvOES\0"
- "glGetTexEnvxvOES\0"
- "glGetTexParameterxvOES\0"
- "glPointParameterxOES\0"
- "glPointParameterxvOES\0"
- "glTexParameterxvOES\0"
- ;
-
-
-#ifdef USE_MGL_NAMESPACE
-#define gl_dispatch_stub_0 mgl_dispatch_stub_0
-#define gl_dispatch_stub_1 mgl_dispatch_stub_1
-#define gl_dispatch_stub_2 mgl_dispatch_stub_2
-#define gl_dispatch_stub_3 mgl_dispatch_stub_3
-#define gl_dispatch_stub_4 mgl_dispatch_stub_4
-#define gl_dispatch_stub_5 mgl_dispatch_stub_5
-#define gl_dispatch_stub_6 mgl_dispatch_stub_6
-#define gl_dispatch_stub_7 mgl_dispatch_stub_7
-#define gl_dispatch_stub_8 mgl_dispatch_stub_8
-#define gl_dispatch_stub_9 mgl_dispatch_stub_9
-#define gl_dispatch_stub_10 mgl_dispatch_stub_10
-#define gl_dispatch_stub_11 mgl_dispatch_stub_11
-#define gl_dispatch_stub_12 mgl_dispatch_stub_12
-#define gl_dispatch_stub_13 mgl_dispatch_stub_13
-#define gl_dispatch_stub_14 mgl_dispatch_stub_14
-#define gl_dispatch_stub_15 mgl_dispatch_stub_15
-#define gl_dispatch_stub_16 mgl_dispatch_stub_16
-#define gl_dispatch_stub_17 mgl_dispatch_stub_17
-#define gl_dispatch_stub_18 mgl_dispatch_stub_18
-#define gl_dispatch_stub_19 mgl_dispatch_stub_19
-#define gl_dispatch_stub_20 mgl_dispatch_stub_20
-#define gl_dispatch_stub_21 mgl_dispatch_stub_21
-#define gl_dispatch_stub_22 mgl_dispatch_stub_22
-#define gl_dispatch_stub_23 mgl_dispatch_stub_23
-#define gl_dispatch_stub_24 mgl_dispatch_stub_24
-#define gl_dispatch_stub_25 mgl_dispatch_stub_25
-#define gl_dispatch_stub_26 mgl_dispatch_stub_26
-#define gl_dispatch_stub_27 mgl_dispatch_stub_27
-#define gl_dispatch_stub_28 mgl_dispatch_stub_28
-#define gl_dispatch_stub_30 mgl_dispatch_stub_30
-#define gl_dispatch_stub_31 mgl_dispatch_stub_31
-#define gl_dispatch_stub_32 mgl_dispatch_stub_32
-#define gl_dispatch_stub_33 mgl_dispatch_stub_33
-#define gl_dispatch_stub_34 mgl_dispatch_stub_34
-#define gl_dispatch_stub_36 mgl_dispatch_stub_36
-#define gl_dispatch_stub_37 mgl_dispatch_stub_37
-#define gl_dispatch_stub_38 mgl_dispatch_stub_38
-#define gl_dispatch_stub_39 mgl_dispatch_stub_39
-#define gl_dispatch_stub_40 mgl_dispatch_stub_40
-#define gl_dispatch_stub_41 mgl_dispatch_stub_41
-#define gl_dispatch_stub_42 mgl_dispatch_stub_42
-#define gl_dispatch_stub_43 mgl_dispatch_stub_43
-#define gl_dispatch_stub_44 mgl_dispatch_stub_44
-#define gl_dispatch_stub_45 mgl_dispatch_stub_45
-#define gl_dispatch_stub_46 mgl_dispatch_stub_46
-#define gl_dispatch_stub_47 mgl_dispatch_stub_47
-#define gl_dispatch_stub_48 mgl_dispatch_stub_48
-#define gl_dispatch_stub_49 mgl_dispatch_stub_49
-#define gl_dispatch_stub_50 mgl_dispatch_stub_50
-#define gl_dispatch_stub_51 mgl_dispatch_stub_51
-#define gl_dispatch_stub_52 mgl_dispatch_stub_52
-#define gl_dispatch_stub_53 mgl_dispatch_stub_53
-#define gl_dispatch_stub_54 mgl_dispatch_stub_54
-#define gl_dispatch_stub_55 mgl_dispatch_stub_55
-#define gl_dispatch_stub_57 mgl_dispatch_stub_57
-#define gl_dispatch_stub_58 mgl_dispatch_stub_58
-#define gl_dispatch_stub_59 mgl_dispatch_stub_59
-#define gl_dispatch_stub_60 mgl_dispatch_stub_60
-#define gl_dispatch_stub_61 mgl_dispatch_stub_61
-#define gl_dispatch_stub_62 mgl_dispatch_stub_62
-#define gl_dispatch_stub_63 mgl_dispatch_stub_63
-#define gl_dispatch_stub_64 mgl_dispatch_stub_64
-#define gl_dispatch_stub_65 mgl_dispatch_stub_65
-#define gl_dispatch_stub_66 mgl_dispatch_stub_66
-#define gl_dispatch_stub_67 mgl_dispatch_stub_67
-#define gl_dispatch_stub_68 mgl_dispatch_stub_68
-#define gl_dispatch_stub_69 mgl_dispatch_stub_69
-#define gl_dispatch_stub_70 mgl_dispatch_stub_70
-#define gl_dispatch_stub_71 mgl_dispatch_stub_71
-#define gl_dispatch_stub_72 mgl_dispatch_stub_72
-#define gl_dispatch_stub_73 mgl_dispatch_stub_73
-#define gl_dispatch_stub_74 mgl_dispatch_stub_74
-#define gl_dispatch_stub_75 mgl_dispatch_stub_75
-#define gl_dispatch_stub_76 mgl_dispatch_stub_76
-#define gl_dispatch_stub_77 mgl_dispatch_stub_77
-#define gl_dispatch_stub_78 mgl_dispatch_stub_78
-#define gl_dispatch_stub_79 mgl_dispatch_stub_79
-#define gl_dispatch_stub_80 mgl_dispatch_stub_80
-#define gl_dispatch_stub_81 mgl_dispatch_stub_81
-#define gl_dispatch_stub_82 mgl_dispatch_stub_82
-#define gl_dispatch_stub_83 mgl_dispatch_stub_83
-#define gl_dispatch_stub_84 mgl_dispatch_stub_84
-#define gl_dispatch_stub_85 mgl_dispatch_stub_85
-#define gl_dispatch_stub_86 mgl_dispatch_stub_86
-#define gl_dispatch_stub_87 mgl_dispatch_stub_87
-#define gl_dispatch_stub_88 mgl_dispatch_stub_88
-#define gl_dispatch_stub_89 mgl_dispatch_stub_89
-#define gl_dispatch_stub_90 mgl_dispatch_stub_90
-#define gl_dispatch_stub_91 mgl_dispatch_stub_91
-#define gl_dispatch_stub_92 mgl_dispatch_stub_92
-#define gl_dispatch_stub_93 mgl_dispatch_stub_93
-#define gl_dispatch_stub_94 mgl_dispatch_stub_94
-#define gl_dispatch_stub_95 mgl_dispatch_stub_95
-#define gl_dispatch_stub_96 mgl_dispatch_stub_96
-#define gl_dispatch_stub_97 mgl_dispatch_stub_97
-#define gl_dispatch_stub_98 mgl_dispatch_stub_98
-#define gl_dispatch_stub_99 mgl_dispatch_stub_99
-#define gl_dispatch_stub_100 mgl_dispatch_stub_100
-#define gl_dispatch_stub_101 mgl_dispatch_stub_101
-#define gl_dispatch_stub_102 mgl_dispatch_stub_102
-#define gl_dispatch_stub_103 mgl_dispatch_stub_103
-#define gl_dispatch_stub_104 mgl_dispatch_stub_104
-#define gl_dispatch_stub_105 mgl_dispatch_stub_105
-#define gl_dispatch_stub_106 mgl_dispatch_stub_106
-#define gl_dispatch_stub_107 mgl_dispatch_stub_107
-#define gl_dispatch_stub_108 mgl_dispatch_stub_108
-#define gl_dispatch_stub_109 mgl_dispatch_stub_109
-#define gl_dispatch_stub_110 mgl_dispatch_stub_110
-#define gl_dispatch_stub_111 mgl_dispatch_stub_111
-#define gl_dispatch_stub_112 mgl_dispatch_stub_112
-#define gl_dispatch_stub_113 mgl_dispatch_stub_113
-#define gl_dispatch_stub_114 mgl_dispatch_stub_114
-#define gl_dispatch_stub_115 mgl_dispatch_stub_115
-#define gl_dispatch_stub_116 mgl_dispatch_stub_116
-#define gl_dispatch_stub_117 mgl_dispatch_stub_117
-#define gl_dispatch_stub_118 mgl_dispatch_stub_118
-#define gl_dispatch_stub_119 mgl_dispatch_stub_119
-#define gl_dispatch_stub_120 mgl_dispatch_stub_120
-#define gl_dispatch_stub_121 mgl_dispatch_stub_121
-#define gl_dispatch_stub_122 mgl_dispatch_stub_122
-#define gl_dispatch_stub_123 mgl_dispatch_stub_123
-#define gl_dispatch_stub_124 mgl_dispatch_stub_124
-#define gl_dispatch_stub_125 mgl_dispatch_stub_125
-#define gl_dispatch_stub_126 mgl_dispatch_stub_126
-#define gl_dispatch_stub_127 mgl_dispatch_stub_127
-#define gl_dispatch_stub_128 mgl_dispatch_stub_128
-#define gl_dispatch_stub_129 mgl_dispatch_stub_129
-#define gl_dispatch_stub_130 mgl_dispatch_stub_130
-#define gl_dispatch_stub_131 mgl_dispatch_stub_131
-#define gl_dispatch_stub_132 mgl_dispatch_stub_132
-#define gl_dispatch_stub_133 mgl_dispatch_stub_133
-#define gl_dispatch_stub_134 mgl_dispatch_stub_134
-#define gl_dispatch_stub_135 mgl_dispatch_stub_135
-#define gl_dispatch_stub_136 mgl_dispatch_stub_136
-#define gl_dispatch_stub_137 mgl_dispatch_stub_137
-#define gl_dispatch_stub_138 mgl_dispatch_stub_138
-#define gl_dispatch_stub_139 mgl_dispatch_stub_139
-#define gl_dispatch_stub_140 mgl_dispatch_stub_140
-#define gl_dispatch_stub_141 mgl_dispatch_stub_141
-#define gl_dispatch_stub_142 mgl_dispatch_stub_142
-#define gl_dispatch_stub_143 mgl_dispatch_stub_143
-#define gl_dispatch_stub_144 mgl_dispatch_stub_144
-#define gl_dispatch_stub_145 mgl_dispatch_stub_145
-#define gl_dispatch_stub_146 mgl_dispatch_stub_146
-#define gl_dispatch_stub_147 mgl_dispatch_stub_147
-#define gl_dispatch_stub_148 mgl_dispatch_stub_148
-#define gl_dispatch_stub_149 mgl_dispatch_stub_149
-#define gl_dispatch_stub_150 mgl_dispatch_stub_150
-#define gl_dispatch_stub_151 mgl_dispatch_stub_151
-#define gl_dispatch_stub_155 mgl_dispatch_stub_155
-#define gl_dispatch_stub_156 mgl_dispatch_stub_156
-#define gl_dispatch_stub_161 mgl_dispatch_stub_161
-#define gl_dispatch_stub_162 mgl_dispatch_stub_162
-#define gl_dispatch_stub_165 mgl_dispatch_stub_165
-#define gl_dispatch_stub_166 mgl_dispatch_stub_166
-#define gl_dispatch_stub_167 mgl_dispatch_stub_167
-#define gl_dispatch_stub_171 mgl_dispatch_stub_171
-#define gl_dispatch_stub_172 mgl_dispatch_stub_172
-#define gl_dispatch_stub_174 mgl_dispatch_stub_174
-#define gl_dispatch_stub_175 mgl_dispatch_stub_175
-#define gl_dispatch_stub_182 mgl_dispatch_stub_182
-#define gl_dispatch_stub_188 mgl_dispatch_stub_188
-#define gl_dispatch_stub_189 mgl_dispatch_stub_189
-#define gl_dispatch_stub_194 mgl_dispatch_stub_194
-#define gl_dispatch_stub_195 mgl_dispatch_stub_195
-#define gl_dispatch_stub_196 mgl_dispatch_stub_196
-#define gl_dispatch_stub_197 mgl_dispatch_stub_197
-#define gl_dispatch_stub_198 mgl_dispatch_stub_198
-#define gl_dispatch_stub_199 mgl_dispatch_stub_199
-#define gl_dispatch_stub_200 mgl_dispatch_stub_200
-#define gl_dispatch_stub_201 mgl_dispatch_stub_201
-#define gl_dispatch_stub_202 mgl_dispatch_stub_202
-#define gl_dispatch_stub_204 mgl_dispatch_stub_204
-#define gl_dispatch_stub_205 mgl_dispatch_stub_205
-#define gl_dispatch_stub_208 mgl_dispatch_stub_208
-#define gl_dispatch_stub_212 mgl_dispatch_stub_212
-#define gl_dispatch_stub_213 mgl_dispatch_stub_213
-#define gl_dispatch_stub_218 mgl_dispatch_stub_218
-#define gl_dispatch_stub_219 mgl_dispatch_stub_219
-#define gl_dispatch_stub_220 mgl_dispatch_stub_220
-#define gl_dispatch_stub_221 mgl_dispatch_stub_221
-#define gl_dispatch_stub_222 mgl_dispatch_stub_222
-#define gl_dispatch_stub_223 mgl_dispatch_stub_223
-#define gl_dispatch_stub_224 mgl_dispatch_stub_224
-#define gl_dispatch_stub_225 mgl_dispatch_stub_225
-#define gl_dispatch_stub_226 mgl_dispatch_stub_226
-#define gl_dispatch_stub_227 mgl_dispatch_stub_227
-#define gl_dispatch_stub_228 mgl_dispatch_stub_228
-#define gl_dispatch_stub_229 mgl_dispatch_stub_229
-#define gl_dispatch_stub_230 mgl_dispatch_stub_230
-#define gl_dispatch_stub_231 mgl_dispatch_stub_231
-#define gl_dispatch_stub_232 mgl_dispatch_stub_232
-#define gl_dispatch_stub_233 mgl_dispatch_stub_233
-#define gl_dispatch_stub_234 mgl_dispatch_stub_234
-#define gl_dispatch_stub_235 mgl_dispatch_stub_235
-#define gl_dispatch_stub_236 mgl_dispatch_stub_236
-#define gl_dispatch_stub_237 mgl_dispatch_stub_237
-#define gl_dispatch_stub_238 mgl_dispatch_stub_238
-#define gl_dispatch_stub_239 mgl_dispatch_stub_239
-#define gl_dispatch_stub_246 mgl_dispatch_stub_246
-#define gl_dispatch_stub_247 mgl_dispatch_stub_247
-#define gl_dispatch_stub_248 mgl_dispatch_stub_248
-#define gl_dispatch_stub_249 mgl_dispatch_stub_249
-#define gl_dispatch_stub_251 mgl_dispatch_stub_251
-#define gl_dispatch_stub_252 mgl_dispatch_stub_252
-#define gl_dispatch_stub_253 mgl_dispatch_stub_253
-#define gl_dispatch_stub_254 mgl_dispatch_stub_254
-#define gl_dispatch_stub_255 mgl_dispatch_stub_255
-#define gl_dispatch_stub_257 mgl_dispatch_stub_257
-#define gl_dispatch_stub_259 mgl_dispatch_stub_259
-#define gl_dispatch_stub_260 mgl_dispatch_stub_260
-#define gl_dispatch_stub_265 mgl_dispatch_stub_265
-#define gl_dispatch_stub_266 mgl_dispatch_stub_266
-#define gl_dispatch_stub_267 mgl_dispatch_stub_267
-#define gl_dispatch_stub_268 mgl_dispatch_stub_268
-#define gl_dispatch_stub_270 mgl_dispatch_stub_270
-#define gl_dispatch_stub_271 mgl_dispatch_stub_271
-#define gl_dispatch_stub_272 mgl_dispatch_stub_272
-#define gl_dispatch_stub_273 mgl_dispatch_stub_273
-#define gl_dispatch_stub_274 mgl_dispatch_stub_274
-#define gl_dispatch_stub_278 mgl_dispatch_stub_278
-#define gl_dispatch_stub_281 mgl_dispatch_stub_281
-#define gl_dispatch_stub_284 mgl_dispatch_stub_284
-#define gl_dispatch_stub_285 mgl_dispatch_stub_285
-#define gl_dispatch_stub_287 mgl_dispatch_stub_287
-#define gl_dispatch_stub_288 mgl_dispatch_stub_288
-#define gl_dispatch_stub_289 mgl_dispatch_stub_289
-#define gl_dispatch_stub_292 mgl_dispatch_stub_292
-#define gl_dispatch_stub_295 mgl_dispatch_stub_295
-#define gl_dispatch_stub_296 mgl_dispatch_stub_296
-#define gl_dispatch_stub_299 mgl_dispatch_stub_299
-#define gl_dispatch_stub_301 mgl_dispatch_stub_301
-#define gl_dispatch_stub_303 mgl_dispatch_stub_303
-#define gl_dispatch_stub_306 mgl_dispatch_stub_306
-#define gl_dispatch_stub_312 mgl_dispatch_stub_312
-#define gl_dispatch_stub_314 mgl_dispatch_stub_314
-#define gl_dispatch_stub_315 mgl_dispatch_stub_315
-#define gl_dispatch_stub_316 mgl_dispatch_stub_316
-#define gl_dispatch_stub_317 mgl_dispatch_stub_317
-#define gl_dispatch_stub_322 mgl_dispatch_stub_322
-#define gl_dispatch_stub_323 mgl_dispatch_stub_323
-#define gl_dispatch_stub_325 mgl_dispatch_stub_325
-#define gl_dispatch_stub_331 mgl_dispatch_stub_331
-#define gl_dispatch_stub_332 mgl_dispatch_stub_332
-#define gl_dispatch_stub_334 mgl_dispatch_stub_334
-#define gl_dispatch_stub_335 mgl_dispatch_stub_335
-#define gl_dispatch_stub_336 mgl_dispatch_stub_336
-#define gl_dispatch_stub_338 mgl_dispatch_stub_338
-#define gl_dispatch_stub_339 mgl_dispatch_stub_339
-#define gl_dispatch_stub_340 mgl_dispatch_stub_340
-#define gl_dispatch_stub_341 mgl_dispatch_stub_341
-#define gl_dispatch_stub_342 mgl_dispatch_stub_342
-#define gl_dispatch_stub_343 mgl_dispatch_stub_343
-#define gl_dispatch_stub_344 mgl_dispatch_stub_344
-#define gl_dispatch_stub_345 mgl_dispatch_stub_345
-#define gl_dispatch_stub_346 mgl_dispatch_stub_346
-#define gl_dispatch_stub_347 mgl_dispatch_stub_347
-#define gl_dispatch_stub_348 mgl_dispatch_stub_348
-#define gl_dispatch_stub_349 mgl_dispatch_stub_349
-#define gl_dispatch_stub_350 mgl_dispatch_stub_350
-#define gl_dispatch_stub_351 mgl_dispatch_stub_351
-#define gl_dispatch_stub_352 mgl_dispatch_stub_352
-#define gl_dispatch_stub_353 mgl_dispatch_stub_353
-#define gl_dispatch_stub_354 mgl_dispatch_stub_354
-#define gl_dispatch_stub_355 mgl_dispatch_stub_355
-#define gl_dispatch_stub_356 mgl_dispatch_stub_356
-#define gl_dispatch_stub_357 mgl_dispatch_stub_357
-#define gl_dispatch_stub_358 mgl_dispatch_stub_358
-#define gl_dispatch_stub_359 mgl_dispatch_stub_359
-#define gl_dispatch_stub_360 mgl_dispatch_stub_360
-#define gl_dispatch_stub_361 mgl_dispatch_stub_361
-#define gl_dispatch_stub_362 mgl_dispatch_stub_362
-#define gl_dispatch_stub_363 mgl_dispatch_stub_363
-#define gl_dispatch_stub_364 mgl_dispatch_stub_364
-#define gl_dispatch_stub_365 mgl_dispatch_stub_365
-#define gl_dispatch_stub_366 mgl_dispatch_stub_366
-#define gl_dispatch_stub_367 mgl_dispatch_stub_367
-#define gl_dispatch_stub_368 mgl_dispatch_stub_368
-#define gl_dispatch_stub_369 mgl_dispatch_stub_369
-#define gl_dispatch_stub_370 mgl_dispatch_stub_370
-#define gl_dispatch_stub_371 mgl_dispatch_stub_371
-#define gl_dispatch_stub_372 mgl_dispatch_stub_372
-#define gl_dispatch_stub_373 mgl_dispatch_stub_373
-#define gl_dispatch_stub_376 mgl_dispatch_stub_376
-#define gl_dispatch_stub_377 mgl_dispatch_stub_377
-#define gl_dispatch_stub_378 mgl_dispatch_stub_378
-#define gl_dispatch_stub_379 mgl_dispatch_stub_379
-#define gl_dispatch_stub_380 mgl_dispatch_stub_380
-#define gl_dispatch_stub_381 mgl_dispatch_stub_381
-#define gl_dispatch_stub_382 mgl_dispatch_stub_382
-#define gl_dispatch_stub_383 mgl_dispatch_stub_383
-#define gl_dispatch_stub_384 mgl_dispatch_stub_384
-#define gl_dispatch_stub_385 mgl_dispatch_stub_385
-#define gl_dispatch_stub_386 mgl_dispatch_stub_386
-#define gl_dispatch_stub_387 mgl_dispatch_stub_387
-#define gl_dispatch_stub_388 mgl_dispatch_stub_388
-#define gl_dispatch_stub_389 mgl_dispatch_stub_389
-#define gl_dispatch_stub_390 mgl_dispatch_stub_390
-#define gl_dispatch_stub_391 mgl_dispatch_stub_391
-#define gl_dispatch_stub_392 mgl_dispatch_stub_392
-#define gl_dispatch_stub_393 mgl_dispatch_stub_393
-#define gl_dispatch_stub_394 mgl_dispatch_stub_394
-#define gl_dispatch_stub_395 mgl_dispatch_stub_395
-#define gl_dispatch_stub_396 mgl_dispatch_stub_396
-#define gl_dispatch_stub_397 mgl_dispatch_stub_397
-#define gl_dispatch_stub_398 mgl_dispatch_stub_398
-#define gl_dispatch_stub_399 mgl_dispatch_stub_399
-#define gl_dispatch_stub_400 mgl_dispatch_stub_400
-#define gl_dispatch_stub_401 mgl_dispatch_stub_401
-#define gl_dispatch_stub_403 mgl_dispatch_stub_403
-#define gl_dispatch_stub_404 mgl_dispatch_stub_404
-#define gl_dispatch_stub_405 mgl_dispatch_stub_405
-#define gl_dispatch_stub_406 mgl_dispatch_stub_406
-#define gl_dispatch_stub_407 mgl_dispatch_stub_407
-#define gl_dispatch_stub_443 mgl_dispatch_stub_443
-#define gl_dispatch_stub_444 mgl_dispatch_stub_444
-#define gl_dispatch_stub_445 mgl_dispatch_stub_445
-#define gl_dispatch_stub_446 mgl_dispatch_stub_446
-#endif /* USE_MGL_NAMESPACE */
-
-
-#if defined(NEED_FUNCTION_POINTER) || defined(GLX_INDIRECT_RENDERING)
-void GLAPIENTRY gl_dispatch_stub_0(GLuint list, GLenum mode);
-void GLAPIENTRY gl_dispatch_stub_1(void);
-void GLAPIENTRY gl_dispatch_stub_2(GLuint list);
-void GLAPIENTRY gl_dispatch_stub_3(GLsizei n, GLenum type, const GLvoid * lists);
-void GLAPIENTRY gl_dispatch_stub_4(GLuint list, GLsizei range);
-GLuint GLAPIENTRY gl_dispatch_stub_5(GLsizei range);
-void GLAPIENTRY gl_dispatch_stub_6(GLuint base);
-void GLAPIENTRY gl_dispatch_stub_7(GLenum mode);
-void GLAPIENTRY gl_dispatch_stub_8(GLsizei width, GLsizei height, GLfloat xorig, GLfloat yorig, GLfloat xmove, GLfloat ymove, const GLubyte * bitmap);
-void GLAPIENTRY gl_dispatch_stub_9(GLbyte red, GLbyte green, GLbyte blue);
-void GLAPIENTRY gl_dispatch_stub_10(const GLbyte * v);
-void GLAPIENTRY gl_dispatch_stub_11(GLdouble red, GLdouble green, GLdouble blue);
-void GLAPIENTRY gl_dispatch_stub_12(const GLdouble * v);
-void GLAPIENTRY gl_dispatch_stub_13(GLfloat red, GLfloat green, GLfloat blue);
-void GLAPIENTRY gl_dispatch_stub_14(const GLfloat * v);
-void GLAPIENTRY gl_dispatch_stub_15(GLint red, GLint green, GLint blue);
-void GLAPIENTRY gl_dispatch_stub_16(const GLint * v);
-void GLAPIENTRY gl_dispatch_stub_17(GLshort red, GLshort green, GLshort blue);
-void GLAPIENTRY gl_dispatch_stub_18(const GLshort * v);
-void GLAPIENTRY gl_dispatch_stub_19(GLubyte red, GLubyte green, GLubyte blue);
-void GLAPIENTRY gl_dispatch_stub_20(const GLubyte * v);
-void GLAPIENTRY gl_dispatch_stub_21(GLuint red, GLuint green, GLuint blue);
-void GLAPIENTRY gl_dispatch_stub_22(const GLuint * v);
-void GLAPIENTRY gl_dispatch_stub_23(GLushort red, GLushort green, GLushort blue);
-void GLAPIENTRY gl_dispatch_stub_24(const GLushort * v);
-void GLAPIENTRY gl_dispatch_stub_25(GLbyte red, GLbyte green, GLbyte blue, GLbyte alpha);
-void GLAPIENTRY gl_dispatch_stub_26(const GLbyte * v);
-void GLAPIENTRY gl_dispatch_stub_27(GLdouble red, GLdouble green, GLdouble blue, GLdouble alpha);
-void GLAPIENTRY gl_dispatch_stub_28(const GLdouble * v);
-void GLAPIENTRY gl_dispatch_stub_30(const GLfloat * v);
-void GLAPIENTRY gl_dispatch_stub_31(GLint red, GLint green, GLint blue, GLint alpha);
-void GLAPIENTRY gl_dispatch_stub_32(const GLint * v);
-void GLAPIENTRY gl_dispatch_stub_33(GLshort red, GLshort green, GLshort blue, GLshort alpha);
-void GLAPIENTRY gl_dispatch_stub_34(const GLshort * v);
-void GLAPIENTRY gl_dispatch_stub_36(const GLubyte * v);
-void GLAPIENTRY gl_dispatch_stub_37(GLuint red, GLuint green, GLuint blue, GLuint alpha);
-void GLAPIENTRY gl_dispatch_stub_38(const GLuint * v);
-void GLAPIENTRY gl_dispatch_stub_39(GLushort red, GLushort green, GLushort blue, GLushort alpha);
-void GLAPIENTRY gl_dispatch_stub_40(const GLushort * v);
-void GLAPIENTRY gl_dispatch_stub_41(GLboolean flag);
-void GLAPIENTRY gl_dispatch_stub_42(const GLboolean * flag);
-void GLAPIENTRY gl_dispatch_stub_43(void);
-void GLAPIENTRY gl_dispatch_stub_44(GLdouble c);
-void GLAPIENTRY gl_dispatch_stub_45(const GLdouble * c);
-void GLAPIENTRY gl_dispatch_stub_46(GLfloat c);
-void GLAPIENTRY gl_dispatch_stub_47(const GLfloat * c);
-void GLAPIENTRY gl_dispatch_stub_48(GLint c);
-void GLAPIENTRY gl_dispatch_stub_49(const GLint * c);
-void GLAPIENTRY gl_dispatch_stub_50(GLshort c);
-void GLAPIENTRY gl_dispatch_stub_51(const GLshort * c);
-void GLAPIENTRY gl_dispatch_stub_52(GLbyte nx, GLbyte ny, GLbyte nz);
-void GLAPIENTRY gl_dispatch_stub_53(const GLbyte * v);
-void GLAPIENTRY gl_dispatch_stub_54(GLdouble nx, GLdouble ny, GLdouble nz);
-void GLAPIENTRY gl_dispatch_stub_55(const GLdouble * v);
-void GLAPIENTRY gl_dispatch_stub_57(const GLfloat * v);
-void GLAPIENTRY gl_dispatch_stub_58(GLint nx, GLint ny, GLint nz);
-void GLAPIENTRY gl_dispatch_stub_59(const GLint * v);
-void GLAPIENTRY gl_dispatch_stub_60(GLshort nx, GLshort ny, GLshort nz);
-void GLAPIENTRY gl_dispatch_stub_61(const GLshort * v);
-void GLAPIENTRY gl_dispatch_stub_62(GLdouble x, GLdouble y);
-void GLAPIENTRY gl_dispatch_stub_63(const GLdouble * v);
-void GLAPIENTRY gl_dispatch_stub_64(GLfloat x, GLfloat y);
-void GLAPIENTRY gl_dispatch_stub_65(const GLfloat * v);
-void GLAPIENTRY gl_dispatch_stub_66(GLint x, GLint y);
-void GLAPIENTRY gl_dispatch_stub_67(const GLint * v);
-void GLAPIENTRY gl_dispatch_stub_68(GLshort x, GLshort y);
-void GLAPIENTRY gl_dispatch_stub_69(const GLshort * v);
-void GLAPIENTRY gl_dispatch_stub_70(GLdouble x, GLdouble y, GLdouble z);
-void GLAPIENTRY gl_dispatch_stub_71(const GLdouble * v);
-void GLAPIENTRY gl_dispatch_stub_72(GLfloat x, GLfloat y, GLfloat z);
-void GLAPIENTRY gl_dispatch_stub_73(const GLfloat * v);
-void GLAPIENTRY gl_dispatch_stub_74(GLint x, GLint y, GLint z);
-void GLAPIENTRY gl_dispatch_stub_75(const GLint * v);
-void GLAPIENTRY gl_dispatch_stub_76(GLshort x, GLshort y, GLshort z);
-void GLAPIENTRY gl_dispatch_stub_77(const GLshort * v);
-void GLAPIENTRY gl_dispatch_stub_78(GLdouble x, GLdouble y, GLdouble z, GLdouble w);
-void GLAPIENTRY gl_dispatch_stub_79(const GLdouble * v);
-void GLAPIENTRY gl_dispatch_stub_80(GLfloat x, GLfloat y, GLfloat z, GLfloat w);
-void GLAPIENTRY gl_dispatch_stub_81(const GLfloat * v);
-void GLAPIENTRY gl_dispatch_stub_82(GLint x, GLint y, GLint z, GLint w);
-void GLAPIENTRY gl_dispatch_stub_83(const GLint * v);
-void GLAPIENTRY gl_dispatch_stub_84(GLshort x, GLshort y, GLshort z, GLshort w);
-void GLAPIENTRY gl_dispatch_stub_85(const GLshort * v);
-void GLAPIENTRY gl_dispatch_stub_86(GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2);
-void GLAPIENTRY gl_dispatch_stub_87(const GLdouble * v1, const GLdouble * v2);
-void GLAPIENTRY gl_dispatch_stub_88(GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2);
-void GLAPIENTRY gl_dispatch_stub_89(const GLfloat * v1, const GLfloat * v2);
-void GLAPIENTRY gl_dispatch_stub_90(GLint x1, GLint y1, GLint x2, GLint y2);
-void GLAPIENTRY gl_dispatch_stub_91(const GLint * v1, const GLint * v2);
-void GLAPIENTRY gl_dispatch_stub_92(GLshort x1, GLshort y1, GLshort x2, GLshort y2);
-void GLAPIENTRY gl_dispatch_stub_93(const GLshort * v1, const GLshort * v2);
-void GLAPIENTRY gl_dispatch_stub_94(GLdouble s);
-void GLAPIENTRY gl_dispatch_stub_95(const GLdouble * v);
-void GLAPIENTRY gl_dispatch_stub_96(GLfloat s);
-void GLAPIENTRY gl_dispatch_stub_97(const GLfloat * v);
-void GLAPIENTRY gl_dispatch_stub_98(GLint s);
-void GLAPIENTRY gl_dispatch_stub_99(const GLint * v);
-void GLAPIENTRY gl_dispatch_stub_100(GLshort s);
-void GLAPIENTRY gl_dispatch_stub_101(const GLshort * v);
-void GLAPIENTRY gl_dispatch_stub_102(GLdouble s, GLdouble t);
-void GLAPIENTRY gl_dispatch_stub_103(const GLdouble * v);
-void GLAPIENTRY gl_dispatch_stub_104(GLfloat s, GLfloat t);
-void GLAPIENTRY gl_dispatch_stub_105(const GLfloat * v);
-void GLAPIENTRY gl_dispatch_stub_106(GLint s, GLint t);
-void GLAPIENTRY gl_dispatch_stub_107(const GLint * v);
-void GLAPIENTRY gl_dispatch_stub_108(GLshort s, GLshort t);
-void GLAPIENTRY gl_dispatch_stub_109(const GLshort * v);
-void GLAPIENTRY gl_dispatch_stub_110(GLdouble s, GLdouble t, GLdouble r);
-void GLAPIENTRY gl_dispatch_stub_111(const GLdouble * v);
-void GLAPIENTRY gl_dispatch_stub_112(GLfloat s, GLfloat t, GLfloat r);
-void GLAPIENTRY gl_dispatch_stub_113(const GLfloat * v);
-void GLAPIENTRY gl_dispatch_stub_114(GLint s, GLint t, GLint r);
-void GLAPIENTRY gl_dispatch_stub_115(const GLint * v);
-void GLAPIENTRY gl_dispatch_stub_116(GLshort s, GLshort t, GLshort r);
-void GLAPIENTRY gl_dispatch_stub_117(const GLshort * v);
-void GLAPIENTRY gl_dispatch_stub_118(GLdouble s, GLdouble t, GLdouble r, GLdouble q);
-void GLAPIENTRY gl_dispatch_stub_119(const GLdouble * v);
-void GLAPIENTRY gl_dispatch_stub_120(GLfloat s, GLfloat t, GLfloat r, GLfloat q);
-void GLAPIENTRY gl_dispatch_stub_121(const GLfloat * v);
-void GLAPIENTRY gl_dispatch_stub_122(GLint s, GLint t, GLint r, GLint q);
-void GLAPIENTRY gl_dispatch_stub_123(const GLint * v);
-void GLAPIENTRY gl_dispatch_stub_124(GLshort s, GLshort t, GLshort r, GLshort q);
-void GLAPIENTRY gl_dispatch_stub_125(const GLshort * v);
-void GLAPIENTRY gl_dispatch_stub_126(GLdouble x, GLdouble y);
-void GLAPIENTRY gl_dispatch_stub_127(const GLdouble * v);
-void GLAPIENTRY gl_dispatch_stub_128(GLfloat x, GLfloat y);
-void GLAPIENTRY gl_dispatch_stub_129(const GLfloat * v);
-void GLAPIENTRY gl_dispatch_stub_130(GLint x, GLint y);
-void GLAPIENTRY gl_dispatch_stub_131(const GLint * v);
-void GLAPIENTRY gl_dispatch_stub_132(GLshort x, GLshort y);
-void GLAPIENTRY gl_dispatch_stub_133(const GLshort * v);
-void GLAPIENTRY gl_dispatch_stub_134(GLdouble x, GLdouble y, GLdouble z);
-void GLAPIENTRY gl_dispatch_stub_135(const GLdouble * v);
-void GLAPIENTRY gl_dispatch_stub_136(GLfloat x, GLfloat y, GLfloat z);
-void GLAPIENTRY gl_dispatch_stub_137(const GLfloat * v);
-void GLAPIENTRY gl_dispatch_stub_138(GLint x, GLint y, GLint z);
-void GLAPIENTRY gl_dispatch_stub_139(const GLint * v);
-void GLAPIENTRY gl_dispatch_stub_140(GLshort x, GLshort y, GLshort z);
-void GLAPIENTRY gl_dispatch_stub_141(const GLshort * v);
-void GLAPIENTRY gl_dispatch_stub_142(GLdouble x, GLdouble y, GLdouble z, GLdouble w);
-void GLAPIENTRY gl_dispatch_stub_143(const GLdouble * v);
-void GLAPIENTRY gl_dispatch_stub_144(GLfloat x, GLfloat y, GLfloat z, GLfloat w);
-void GLAPIENTRY gl_dispatch_stub_145(const GLfloat * v);
-void GLAPIENTRY gl_dispatch_stub_146(GLint x, GLint y, GLint z, GLint w);
-void GLAPIENTRY gl_dispatch_stub_147(const GLint * v);
-void GLAPIENTRY gl_dispatch_stub_148(GLshort x, GLshort y, GLshort z, GLshort w);
-void GLAPIENTRY gl_dispatch_stub_149(const GLshort * v);
-void GLAPIENTRY gl_dispatch_stub_150(GLenum plane, const GLdouble * equation);
-void GLAPIENTRY gl_dispatch_stub_151(GLenum face, GLenum mode);
-void GLAPIENTRY gl_dispatch_stub_155(GLenum pname, GLint param);
-void GLAPIENTRY gl_dispatch_stub_156(GLenum pname, const GLint * params);
-void GLAPIENTRY gl_dispatch_stub_161(GLenum light, GLenum pname, GLint param);
-void GLAPIENTRY gl_dispatch_stub_162(GLenum light, GLenum pname, const GLint * params);
-void GLAPIENTRY gl_dispatch_stub_165(GLenum pname, GLint param);
-void GLAPIENTRY gl_dispatch_stub_166(GLenum pname, const GLint * params);
-void GLAPIENTRY gl_dispatch_stub_167(GLint factor, GLushort pattern);
-void GLAPIENTRY gl_dispatch_stub_171(GLenum face, GLenum pname, GLint param);
-void GLAPIENTRY gl_dispatch_stub_172(GLenum face, GLenum pname, const GLint * params);
-void GLAPIENTRY gl_dispatch_stub_174(GLenum face, GLenum mode);
-void GLAPIENTRY gl_dispatch_stub_175(const GLubyte * mask);
-void GLAPIENTRY gl_dispatch_stub_182(GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid * pixels);
-void GLAPIENTRY gl_dispatch_stub_188(GLenum coord, GLenum pname, GLdouble param);
-void GLAPIENTRY gl_dispatch_stub_189(GLenum coord, GLenum pname, const GLdouble * params);
-void GLAPIENTRY gl_dispatch_stub_194(GLsizei size, GLenum type, GLfloat * buffer);
-void GLAPIENTRY gl_dispatch_stub_195(GLsizei size, GLuint * buffer);
-GLint GLAPIENTRY gl_dispatch_stub_196(GLenum mode);
-void GLAPIENTRY gl_dispatch_stub_197(void);
-void GLAPIENTRY gl_dispatch_stub_198(GLuint name);
-void GLAPIENTRY gl_dispatch_stub_199(GLfloat token);
-void GLAPIENTRY gl_dispatch_stub_200(void);
-void GLAPIENTRY gl_dispatch_stub_201(GLuint name);
-void GLAPIENTRY gl_dispatch_stub_202(GLenum mode);
-void GLAPIENTRY gl_dispatch_stub_204(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
-void GLAPIENTRY gl_dispatch_stub_205(GLfloat c);
-void GLAPIENTRY gl_dispatch_stub_208(GLclampd depth);
-void GLAPIENTRY gl_dispatch_stub_212(GLuint mask);
-void GLAPIENTRY gl_dispatch_stub_213(GLenum op, GLfloat value);
-void GLAPIENTRY gl_dispatch_stub_218(void);
-void GLAPIENTRY gl_dispatch_stub_219(GLbitfield mask);
-void GLAPIENTRY gl_dispatch_stub_220(GLenum target, GLdouble u1, GLdouble u2, GLint stride, GLint order, const GLdouble * points);
-void GLAPIENTRY gl_dispatch_stub_221(GLenum target, GLfloat u1, GLfloat u2, GLint stride, GLint order, const GLfloat * points);
-void GLAPIENTRY gl_dispatch_stub_222(GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, const GLdouble * points);
-void GLAPIENTRY gl_dispatch_stub_223(GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, const GLfloat * points);
-void GLAPIENTRY gl_dispatch_stub_224(GLint un, GLdouble u1, GLdouble u2);
-void GLAPIENTRY gl_dispatch_stub_225(GLint un, GLfloat u1, GLfloat u2);
-void GLAPIENTRY gl_dispatch_stub_226(GLint un, GLdouble u1, GLdouble u2, GLint vn, GLdouble v1, GLdouble v2);
-void GLAPIENTRY gl_dispatch_stub_227(GLint un, GLfloat u1, GLfloat u2, GLint vn, GLfloat v1, GLfloat v2);
-void GLAPIENTRY gl_dispatch_stub_228(GLdouble u);
-void GLAPIENTRY gl_dispatch_stub_229(const GLdouble * u);
-void GLAPIENTRY gl_dispatch_stub_230(GLfloat u);
-void GLAPIENTRY gl_dispatch_stub_231(const GLfloat * u);
-void GLAPIENTRY gl_dispatch_stub_232(GLdouble u, GLdouble v);
-void GLAPIENTRY gl_dispatch_stub_233(const GLdouble * u);
-void GLAPIENTRY gl_dispatch_stub_234(GLfloat u, GLfloat v);
-void GLAPIENTRY gl_dispatch_stub_235(const GLfloat * u);
-void GLAPIENTRY gl_dispatch_stub_236(GLenum mode, GLint i1, GLint i2);
-void GLAPIENTRY gl_dispatch_stub_237(GLint i);
-void GLAPIENTRY gl_dispatch_stub_238(GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2);
-void GLAPIENTRY gl_dispatch_stub_239(GLint i, GLint j);
-void GLAPIENTRY gl_dispatch_stub_246(GLfloat xfactor, GLfloat yfactor);
-void GLAPIENTRY gl_dispatch_stub_247(GLenum pname, GLfloat param);
-void GLAPIENTRY gl_dispatch_stub_248(GLenum pname, GLint param);
-void GLAPIENTRY gl_dispatch_stub_249(GLenum pname, GLfloat param);
-void GLAPIENTRY gl_dispatch_stub_251(GLenum map, GLsizei mapsize, const GLfloat * values);
-void GLAPIENTRY gl_dispatch_stub_252(GLenum map, GLsizei mapsize, const GLuint * values);
-void GLAPIENTRY gl_dispatch_stub_253(GLenum map, GLsizei mapsize, const GLushort * values);
-void GLAPIENTRY gl_dispatch_stub_254(GLenum mode);
-void GLAPIENTRY gl_dispatch_stub_255(GLint x, GLint y, GLsizei width, GLsizei height, GLenum type);
-void GLAPIENTRY gl_dispatch_stub_257(GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid * pixels);
-void GLAPIENTRY gl_dispatch_stub_259(GLenum plane, GLdouble * equation);
-void GLAPIENTRY gl_dispatch_stub_260(GLenum pname, GLdouble * params);
-void GLAPIENTRY gl_dispatch_stub_265(GLenum light, GLenum pname, GLint * params);
-void GLAPIENTRY gl_dispatch_stub_266(GLenum target, GLenum query, GLdouble * v);
-void GLAPIENTRY gl_dispatch_stub_267(GLenum target, GLenum query, GLfloat * v);
-void GLAPIENTRY gl_dispatch_stub_268(GLenum target, GLenum query, GLint * v);
-void GLAPIENTRY gl_dispatch_stub_270(GLenum face, GLenum pname, GLint * params);
-void GLAPIENTRY gl_dispatch_stub_271(GLenum map, GLfloat * values);
-void GLAPIENTRY gl_dispatch_stub_272(GLenum map, GLuint * values);
-void GLAPIENTRY gl_dispatch_stub_273(GLenum map, GLushort * values);
-void GLAPIENTRY gl_dispatch_stub_274(GLubyte * mask);
-void GLAPIENTRY gl_dispatch_stub_278(GLenum coord, GLenum pname, GLdouble * params);
-void GLAPIENTRY gl_dispatch_stub_281(GLenum target, GLint level, GLenum format, GLenum type, GLvoid * pixels);
-void GLAPIENTRY gl_dispatch_stub_284(GLenum target, GLint level, GLenum pname, GLfloat * params);
-void GLAPIENTRY gl_dispatch_stub_285(GLenum target, GLint level, GLenum pname, GLint * params);
-GLboolean GLAPIENTRY gl_dispatch_stub_287(GLuint list);
-void GLAPIENTRY gl_dispatch_stub_288(GLclampd zNear, GLclampd zFar);
-void GLAPIENTRY gl_dispatch_stub_289(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar);
-void GLAPIENTRY gl_dispatch_stub_292(const GLdouble * m);
-void GLAPIENTRY gl_dispatch_stub_295(const GLdouble * m);
-void GLAPIENTRY gl_dispatch_stub_296(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar);
-void GLAPIENTRY gl_dispatch_stub_299(GLdouble angle, GLdouble x, GLdouble y, GLdouble z);
-void GLAPIENTRY gl_dispatch_stub_301(GLdouble x, GLdouble y, GLdouble z);
-void GLAPIENTRY gl_dispatch_stub_303(GLdouble x, GLdouble y, GLdouble z);
-void GLAPIENTRY gl_dispatch_stub_306(GLint i);
-void GLAPIENTRY gl_dispatch_stub_312(GLsizei stride, const GLvoid * pointer);
-void GLAPIENTRY gl_dispatch_stub_314(GLenum type, GLsizei stride, const GLvoid * pointer);
-void GLAPIENTRY gl_dispatch_stub_315(GLubyte c);
-void GLAPIENTRY gl_dispatch_stub_316(const GLubyte * c);
-void GLAPIENTRY gl_dispatch_stub_317(GLenum format, GLsizei stride, const GLvoid * pointer);
-GLboolean GLAPIENTRY gl_dispatch_stub_322(GLsizei n, const GLuint * textures, GLboolean * residences);
-void GLAPIENTRY gl_dispatch_stub_323(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border);
-void GLAPIENTRY gl_dispatch_stub_325(GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width);
-void GLAPIENTRY gl_dispatch_stub_331(GLsizei n, const GLuint * textures, const GLclampf * priorities);
-void GLAPIENTRY gl_dispatch_stub_332(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid * pixels);
-void GLAPIENTRY gl_dispatch_stub_334(void);
-void GLAPIENTRY gl_dispatch_stub_335(GLbitfield mask);
-void GLAPIENTRY gl_dispatch_stub_336(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
-void GLAPIENTRY gl_dispatch_stub_338(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid * indices);
-void GLAPIENTRY gl_dispatch_stub_339(GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid * table);
-void GLAPIENTRY gl_dispatch_stub_340(GLenum target, GLenum pname, const GLfloat * params);
-void GLAPIENTRY gl_dispatch_stub_341(GLenum target, GLenum pname, const GLint * params);
-void GLAPIENTRY gl_dispatch_stub_342(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
-void GLAPIENTRY gl_dispatch_stub_343(GLenum target, GLenum format, GLenum type, GLvoid * table);
-void GLAPIENTRY gl_dispatch_stub_344(GLenum target, GLenum pname, GLfloat * params);
-void GLAPIENTRY gl_dispatch_stub_345(GLenum target, GLenum pname, GLint * params);
-void GLAPIENTRY gl_dispatch_stub_346(GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid * data);
-void GLAPIENTRY gl_dispatch_stub_347(GLenum target, GLsizei start, GLint x, GLint y, GLsizei width);
-void GLAPIENTRY gl_dispatch_stub_348(GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid * image);
-void GLAPIENTRY gl_dispatch_stub_349(GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid * image);
-void GLAPIENTRY gl_dispatch_stub_350(GLenum target, GLenum pname, GLfloat params);
-void GLAPIENTRY gl_dispatch_stub_351(GLenum target, GLenum pname, const GLfloat * params);
-void GLAPIENTRY gl_dispatch_stub_352(GLenum target, GLenum pname, GLint params);
-void GLAPIENTRY gl_dispatch_stub_353(GLenum target, GLenum pname, const GLint * params);
-void GLAPIENTRY gl_dispatch_stub_354(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
-void GLAPIENTRY gl_dispatch_stub_355(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height);
-void GLAPIENTRY gl_dispatch_stub_356(GLenum target, GLenum format, GLenum type, GLvoid * image);
-void GLAPIENTRY gl_dispatch_stub_357(GLenum target, GLenum pname, GLfloat * params);
-void GLAPIENTRY gl_dispatch_stub_358(GLenum target, GLenum pname, GLint * params);
-void GLAPIENTRY gl_dispatch_stub_359(GLenum target, GLenum format, GLenum type, GLvoid * row, GLvoid * column, GLvoid * span);
-void GLAPIENTRY gl_dispatch_stub_360(GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid * row, const GLvoid * column);
-void GLAPIENTRY gl_dispatch_stub_361(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid * values);
-void GLAPIENTRY gl_dispatch_stub_362(GLenum target, GLenum pname, GLfloat * params);
-void GLAPIENTRY gl_dispatch_stub_363(GLenum target, GLenum pname, GLint * params);
-void GLAPIENTRY gl_dispatch_stub_364(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid * values);
-void GLAPIENTRY gl_dispatch_stub_365(GLenum target, GLenum pname, GLfloat * params);
-void GLAPIENTRY gl_dispatch_stub_366(GLenum target, GLenum pname, GLint * params);
-void GLAPIENTRY gl_dispatch_stub_367(GLenum target, GLsizei width, GLenum internalformat, GLboolean sink);
-void GLAPIENTRY gl_dispatch_stub_368(GLenum target, GLenum internalformat, GLboolean sink);
-void GLAPIENTRY gl_dispatch_stub_369(GLenum target);
-void GLAPIENTRY gl_dispatch_stub_370(GLenum target);
-void GLAPIENTRY gl_dispatch_stub_371(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid * pixels);
-void GLAPIENTRY gl_dispatch_stub_372(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid * pixels);
-void GLAPIENTRY gl_dispatch_stub_373(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
-void GLAPIENTRY gl_dispatch_stub_376(GLenum target, GLdouble s);
-void GLAPIENTRY gl_dispatch_stub_377(GLenum target, const GLdouble * v);
-void GLAPIENTRY gl_dispatch_stub_378(GLenum target, GLfloat s);
-void GLAPIENTRY gl_dispatch_stub_379(GLenum target, const GLfloat * v);
-void GLAPIENTRY gl_dispatch_stub_380(GLenum target, GLint s);
-void GLAPIENTRY gl_dispatch_stub_381(GLenum target, const GLint * v);
-void GLAPIENTRY gl_dispatch_stub_382(GLenum target, GLshort s);
-void GLAPIENTRY gl_dispatch_stub_383(GLenum target, const GLshort * v);
-void GLAPIENTRY gl_dispatch_stub_384(GLenum target, GLdouble s, GLdouble t);
-void GLAPIENTRY gl_dispatch_stub_385(GLenum target, const GLdouble * v);
-void GLAPIENTRY gl_dispatch_stub_386(GLenum target, GLfloat s, GLfloat t);
-void GLAPIENTRY gl_dispatch_stub_387(GLenum target, const GLfloat * v);
-void GLAPIENTRY gl_dispatch_stub_388(GLenum target, GLint s, GLint t);
-void GLAPIENTRY gl_dispatch_stub_389(GLenum target, const GLint * v);
-void GLAPIENTRY gl_dispatch_stub_390(GLenum target, GLshort s, GLshort t);
-void GLAPIENTRY gl_dispatch_stub_391(GLenum target, const GLshort * v);
-void GLAPIENTRY gl_dispatch_stub_392(GLenum target, GLdouble s, GLdouble t, GLdouble r);
-void GLAPIENTRY gl_dispatch_stub_393(GLenum target, const GLdouble * v);
-void GLAPIENTRY gl_dispatch_stub_394(GLenum target, GLfloat s, GLfloat t, GLfloat r);
-void GLAPIENTRY gl_dispatch_stub_395(GLenum target, const GLfloat * v);
-void GLAPIENTRY gl_dispatch_stub_396(GLenum target, GLint s, GLint t, GLint r);
-void GLAPIENTRY gl_dispatch_stub_397(GLenum target, const GLint * v);
-void GLAPIENTRY gl_dispatch_stub_398(GLenum target, GLshort s, GLshort t, GLshort r);
-void GLAPIENTRY gl_dispatch_stub_399(GLenum target, const GLshort * v);
-void GLAPIENTRY gl_dispatch_stub_400(GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q);
-void GLAPIENTRY gl_dispatch_stub_401(GLenum target, const GLdouble * v);
-void GLAPIENTRY gl_dispatch_stub_403(GLenum target, const GLfloat * v);
-void GLAPIENTRY gl_dispatch_stub_404(GLenum target, GLint s, GLint t, GLint r, GLint q);
-void GLAPIENTRY gl_dispatch_stub_405(GLenum target, const GLint * v);
-void GLAPIENTRY gl_dispatch_stub_406(GLenum target, GLshort s, GLshort t, GLshort r, GLshort q);
-void GLAPIENTRY gl_dispatch_stub_407(GLenum target, const GLshort * v);
-void GLAPIENTRY gl_dispatch_stub_443(GLuint array);
-void GLAPIENTRY gl_dispatch_stub_444(GLsizei n, const GLuint * arrays);
-void GLAPIENTRY gl_dispatch_stub_445(GLsizei n, GLuint * arrays);
-GLboolean GLAPIENTRY gl_dispatch_stub_446(GLuint array);
-
-/* OpenGL ES specific prototypes */
-
-/* category GL_OES_EGL_image */
-GLAPI void GLAPIENTRY glEGLImageTargetRenderbufferStorageOES(GLenum target, GLvoid * writeOffset);
-GLAPI void GLAPIENTRY glEGLImageTargetTexture2DOES(GLenum target, GLvoid * writeOffset);
-/* category GL_OES_blend_equation_separate */
-GLAPI void GLAPIENTRY glBlendEquationSeparateOES(GLenum modeRGB, GLenum modeA);
-/* category GL_OES_blend_func_separate */
-GLAPI void GLAPIENTRY glBlendFuncSeparateOES(GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
-/* category GL_OES_blend_subtract */
-GLAPI void GLAPIENTRY glBlendEquationOES(GLenum mode);
-/* category GL_OES_draw_texture */
-GLAPI void GLAPIENTRY glDrawTexfOES(GLfloat x, GLfloat y, GLfloat z, GLfloat width, GLfloat height);
-GLAPI void GLAPIENTRY glDrawTexfvOES(const GLfloat * coords);
-GLAPI void GLAPIENTRY glDrawTexiOES(GLint x, GLint y, GLint z, GLint width, GLint height);
-GLAPI void GLAPIENTRY glDrawTexivOES(const GLint * coords);
-GLAPI void GLAPIENTRY glDrawTexsOES(GLshort x, GLshort y, GLshort z, GLshort width, GLshort height);
-GLAPI void GLAPIENTRY glDrawTexsvOES(const GLshort * coords);
-GLAPI void GLAPIENTRY glDrawTexxOES(GLfixed x, GLfixed y, GLfixed z, GLfixed width, GLfixed height);
-GLAPI void GLAPIENTRY glDrawTexxvOES(const GLfixed * coords);
-/* category GL_OES_fixed_point */
-GLAPI void GLAPIENTRY glAlphaFuncxOES(GLenum func, GLclampx ref);
-GLAPI void GLAPIENTRY glClearColorxOES(GLclampx red, GLclampx green, GLclampx blue, GLclampx alpha);
-GLAPI void GLAPIENTRY glClearDepthxOES(GLclampx depth);
-GLAPI void GLAPIENTRY glColor4xOES(GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha);
-GLAPI void GLAPIENTRY glDepthRangexOES(GLclampx zNear, GLclampx zFar);
-GLAPI void GLAPIENTRY glFogxOES(GLenum pname, GLfixed param);
-GLAPI void GLAPIENTRY glFogxvOES(GLenum pname, const GLfixed * params);
-GLAPI void GLAPIENTRY glFrustumxOES(GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar);
-GLAPI void GLAPIENTRY glLightModelxOES(GLenum pname, GLfixed param);
-GLAPI void GLAPIENTRY glLightModelxvOES(GLenum pname, const GLfixed * params);
-GLAPI void GLAPIENTRY glLightxOES(GLenum light, GLenum pname, GLfixed param);
-GLAPI void GLAPIENTRY glLightxvOES(GLenum light, GLenum pname, const GLfixed * params);
-GLAPI void GLAPIENTRY glLineWidthxOES(GLfixed width);
-GLAPI void GLAPIENTRY glLoadMatrixxOES(const GLfixed * m);
-GLAPI void GLAPIENTRY glMaterialxOES(GLenum face, GLenum pname, GLfixed param);
-GLAPI void GLAPIENTRY glMaterialxvOES(GLenum face, GLenum pname, const GLfixed * params);
-GLAPI void GLAPIENTRY glMultMatrixxOES(const GLfixed * m);
-GLAPI void GLAPIENTRY glMultiTexCoord4xOES(GLenum target, GLfixed s, GLfixed t, GLfixed r, GLfixed q);
-GLAPI void GLAPIENTRY glNormal3xOES(GLfixed nx, GLfixed ny, GLfixed nz);
-GLAPI void GLAPIENTRY glOrthoxOES(GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar);
-GLAPI void GLAPIENTRY glPointSizexOES(GLfixed size);
-GLAPI void GLAPIENTRY glPolygonOffsetxOES(GLfixed factor, GLfixed units);
-GLAPI void GLAPIENTRY glRotatexOES(GLfixed angle, GLfixed x, GLfixed y, GLfixed z);
-GLAPI void GLAPIENTRY glSampleCoveragexOES(GLclampx value, GLboolean invert);
-GLAPI void GLAPIENTRY glScalexOES(GLfixed x, GLfixed y, GLfixed z);
-GLAPI void GLAPIENTRY glTexEnvxOES(GLenum target, GLenum pname, GLfixed param);
-GLAPI void GLAPIENTRY glTexEnvxvOES(GLenum target, GLenum pname, const GLfixed * params);
-GLAPI void GLAPIENTRY glTexParameterxOES(GLenum target, GLenum pname, GLfixed param);
-GLAPI void GLAPIENTRY glTranslatexOES(GLfixed x, GLfixed y, GLfixed z);
-GLAPI void GLAPIENTRY glClipPlanexOES(GLenum plane, const GLfixed * equation);
-GLAPI void GLAPIENTRY glGetClipPlanexOES(GLenum plane, GLfixed * equation);
-GLAPI void GLAPIENTRY glGetFixedvOES(GLenum pname, GLfixed * params);
-GLAPI void GLAPIENTRY glGetLightxvOES(GLenum light, GLenum pname, GLfixed * params);
-GLAPI void GLAPIENTRY glGetMaterialxvOES(GLenum face, GLenum pname, GLfixed * params);
-GLAPI void GLAPIENTRY glGetTexEnvxvOES(GLenum target, GLenum pname, GLfixed * params);
-GLAPI void GLAPIENTRY glGetTexParameterxvOES(GLenum target, GLenum pname, GLfixed * params);
-GLAPI void GLAPIENTRY glPointParameterxOES(GLenum pname, GLfixed param);
-GLAPI void GLAPIENTRY glPointParameterxvOES(GLenum pname, const GLfixed * params);
-GLAPI void GLAPIENTRY glTexParameterxvOES(GLenum target, GLenum pname, const GLfixed * params);
-/* category GL_OES_framebuffer_object */
-GLAPI void GLAPIENTRY glBindFramebufferOES(GLenum target, GLuint framebuffer);
-GLAPI void GLAPIENTRY glBindRenderbufferOES(GLenum target, GLuint renderbuffer);
-GLAPI GLenum GLAPIENTRY glCheckFramebufferStatusOES(GLenum target);
-GLAPI void GLAPIENTRY glDeleteFramebuffersOES(GLsizei n, const GLuint * framebuffers);
-GLAPI void GLAPIENTRY glDeleteRenderbuffersOES(GLsizei n, const GLuint * renderbuffers);
-GLAPI void GLAPIENTRY glFramebufferRenderbufferOES(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
-GLAPI void GLAPIENTRY glFramebufferTexture2DOES(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
-GLAPI void GLAPIENTRY glGenFramebuffersOES(GLsizei n, GLuint * framebuffers);
-GLAPI void GLAPIENTRY glGenRenderbuffersOES(GLsizei n, GLuint * renderbuffers);
-GLAPI void GLAPIENTRY glGenerateMipmapOES(GLenum target);
-GLAPI void GLAPIENTRY glGetFramebufferAttachmentParameterivOES(GLenum target, GLenum attachment, GLenum pname, GLint * params);
-GLAPI void GLAPIENTRY glGetRenderbufferParameterivOES(GLenum target, GLenum pname, GLint * params);
-GLAPI GLboolean GLAPIENTRY glIsFramebufferOES(GLuint framebuffer);
-GLAPI GLboolean GLAPIENTRY glIsRenderbufferOES(GLuint renderbuffer);
-GLAPI void GLAPIENTRY glRenderbufferStorageOES(GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
-/* category GL_OES_mapbuffer */
-GLAPI void GLAPIENTRY glGetBufferPointervOES(GLenum target, GLenum pname, GLvoid ** params);
-GLAPI GLvoid * GLAPIENTRY glMapBufferOES(GLenum target, GLenum access);
-GLAPI GLboolean GLAPIENTRY glUnmapBufferOES(GLenum target);
-/* category GL_OES_point_size_array */
-GLAPI void GLAPIENTRY glPointSizePointerOES(GLenum type, GLsizei stride, const GLvoid * pointer);
-/* category GL_OES_query_matrix */
-GLAPI GLbitfield GLAPIENTRY glQueryMatrixxOES(GLfixed * mantissa, GLint * exponent);
-/* category GL_OES_single_precision */
-GLAPI void GLAPIENTRY glClearDepthfOES(GLclampf depth);
-GLAPI void GLAPIENTRY glDepthRangefOES(GLclampf zNear, GLclampf zFar);
-GLAPI void GLAPIENTRY glFrustumfOES(GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar);
-GLAPI void GLAPIENTRY glOrthofOES(GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar);
-GLAPI void GLAPIENTRY glClipPlanefOES(GLenum plane, const GLfloat * equation);
-GLAPI void GLAPIENTRY glGetClipPlanefOES(GLenum plane, GLfloat * equation);
-/* category GL_OES_texture_cube_map */
-GLAPI void GLAPIENTRY glTexGenfOES(GLenum coord, GLenum pname, GLfloat param);
-GLAPI void GLAPIENTRY glTexGenfvOES(GLenum coord, GLenum pname, const GLfloat * params);
-GLAPI void GLAPIENTRY glTexGeniOES(GLenum coord, GLenum pname, GLint param);
-GLAPI void GLAPIENTRY glTexGenivOES(GLenum coord, GLenum pname, const GLint * params);
-GLAPI void GLAPIENTRY glGetTexGenfvOES(GLenum coord, GLenum pname, GLfloat * params);
-GLAPI void GLAPIENTRY glGetTexGenivOES(GLenum coord, GLenum pname, GLint * params);
-GLAPI void GLAPIENTRY glGetTexGenxvOES(GLenum coord, GLenum pname, GLfixed * params);
-GLAPI void GLAPIENTRY glTexGenxOES(GLenum coord, GLenum pname, GLint param);
-GLAPI void GLAPIENTRY glTexGenxvOES(GLenum coord, GLenum pname, const GLfixed * params);
-/* category es1.0 */
-GLAPI void GLAPIENTRY glAlphaFuncx(GLenum func, GLclampx ref);
-GLAPI void GLAPIENTRY glClearColorx(GLclampx red, GLclampx green, GLclampx blue, GLclampx alpha);
-GLAPI void GLAPIENTRY glClearDepthf(GLclampf depth);
-GLAPI void GLAPIENTRY glClearDepthx(GLclampx depth);
-GLAPI void GLAPIENTRY glColor4x(GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha);
-GLAPI void GLAPIENTRY glDepthRangef(GLclampf zNear, GLclampf zFar);
-GLAPI void GLAPIENTRY glDepthRangex(GLclampx zNear, GLclampx zFar);
-GLAPI void GLAPIENTRY glFogx(GLenum pname, GLfixed param);
-GLAPI void GLAPIENTRY glFogxv(GLenum pname, const GLfixed * params);
-GLAPI void GLAPIENTRY glFrustumf(GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar);
-GLAPI void GLAPIENTRY glFrustumx(GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar);
-GLAPI void GLAPIENTRY glLightModelx(GLenum pname, GLfixed param);
-GLAPI void GLAPIENTRY glLightModelxv(GLenum pname, const GLfixed * params);
-GLAPI void GLAPIENTRY glLightx(GLenum light, GLenum pname, GLfixed param);
-GLAPI void GLAPIENTRY glLightxv(GLenum light, GLenum pname, const GLfixed * params);
-GLAPI void GLAPIENTRY glLineWidthx(GLfixed width);
-GLAPI void GLAPIENTRY glLoadMatrixx(const GLfixed * m);
-GLAPI void GLAPIENTRY glMaterialx(GLenum face, GLenum pname, GLfixed param);
-GLAPI void GLAPIENTRY glMaterialxv(GLenum face, GLenum pname, const GLfixed * params);
-GLAPI void GLAPIENTRY glMultMatrixx(const GLfixed * m);
-GLAPI void GLAPIENTRY glMultiTexCoord4x(GLenum target, GLfixed s, GLfixed t, GLfixed r, GLfixed q);
-GLAPI void GLAPIENTRY glNormal3x(GLfixed nx, GLfixed ny, GLfixed nz);
-GLAPI void GLAPIENTRY glOrthof(GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar);
-GLAPI void GLAPIENTRY glOrthox(GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar);
-GLAPI void GLAPIENTRY glPointSizex(GLfixed size);
-GLAPI void GLAPIENTRY glPolygonOffsetx(GLfixed factor, GLfixed units);
-GLAPI void GLAPIENTRY glRotatex(GLfixed angle, GLfixed x, GLfixed y, GLfixed z);
-GLAPI void GLAPIENTRY glSampleCoveragex(GLclampx value, GLboolean invert);
-GLAPI void GLAPIENTRY glScalex(GLfixed x, GLfixed y, GLfixed z);
-GLAPI void GLAPIENTRY glTexEnvx(GLenum target, GLenum pname, GLfixed param);
-GLAPI void GLAPIENTRY glTexEnvxv(GLenum target, GLenum pname, const GLfixed * params);
-GLAPI void GLAPIENTRY glTexParameterx(GLenum target, GLenum pname, GLfixed param);
-GLAPI void GLAPIENTRY glTranslatex(GLfixed x, GLfixed y, GLfixed z);
-/* category es1.1 */
-GLAPI void GLAPIENTRY glClipPlanef(GLenum plane, const GLfloat * equation);
-GLAPI void GLAPIENTRY glClipPlanex(GLenum plane, const GLfixed * equation);
-GLAPI void GLAPIENTRY glGetClipPlanef(GLenum plane, GLfloat * equation);
-GLAPI void GLAPIENTRY glGetClipPlanex(GLenum plane, GLfixed * equation);
-GLAPI void GLAPIENTRY glGetFixedv(GLenum pname, GLfixed * params);
-GLAPI void GLAPIENTRY glGetLightxv(GLenum light, GLenum pname, GLfixed * params);
-GLAPI void GLAPIENTRY glGetMaterialxv(GLenum face, GLenum pname, GLfixed * params);
-GLAPI void GLAPIENTRY glGetTexEnvxv(GLenum target, GLenum pname, GLfixed * params);
-GLAPI void GLAPIENTRY glGetTexParameterxv(GLenum target, GLenum pname, GLfixed * params);
-GLAPI void GLAPIENTRY glPointParameterx(GLenum pname, GLfixed param);
-GLAPI void GLAPIENTRY glPointParameterxv(GLenum pname, const GLfixed * params);
-GLAPI void GLAPIENTRY glTexParameterxv(GLenum target, GLenum pname, const GLfixed * params);
-
-#endif /* defined(NEED_FUNCTION_POINTER) || defined(GLX_INDIRECT_RENDERING) */
-
-static const glprocs_table_t static_functions[] = {
- NAME_FUNC_OFFSET( 0, gl_dispatch_stub_0, gl_dispatch_stub_0, NULL, 0),
- NAME_FUNC_OFFSET( 10, gl_dispatch_stub_1, gl_dispatch_stub_1, NULL, 1),
- NAME_FUNC_OFFSET( 20, gl_dispatch_stub_2, gl_dispatch_stub_2, NULL, 2),
- NAME_FUNC_OFFSET( 31, gl_dispatch_stub_3, gl_dispatch_stub_3, NULL, 3),
- NAME_FUNC_OFFSET( 43, gl_dispatch_stub_4, gl_dispatch_stub_4, NULL, 4),
- NAME_FUNC_OFFSET( 57, gl_dispatch_stub_5, gl_dispatch_stub_5, NULL, 5),
- NAME_FUNC_OFFSET( 68, gl_dispatch_stub_6, gl_dispatch_stub_6, NULL, 6),
- NAME_FUNC_OFFSET( 79, gl_dispatch_stub_7, gl_dispatch_stub_7, NULL, 7),
- NAME_FUNC_OFFSET( 87, gl_dispatch_stub_8, gl_dispatch_stub_8, NULL, 8),
- NAME_FUNC_OFFSET( 96, gl_dispatch_stub_9, gl_dispatch_stub_9, NULL, 9),
- NAME_FUNC_OFFSET( 106, gl_dispatch_stub_10, gl_dispatch_stub_10, NULL, 10),
- NAME_FUNC_OFFSET( 117, gl_dispatch_stub_11, gl_dispatch_stub_11, NULL, 11),
- NAME_FUNC_OFFSET( 127, gl_dispatch_stub_12, gl_dispatch_stub_12, NULL, 12),
- NAME_FUNC_OFFSET( 138, gl_dispatch_stub_13, gl_dispatch_stub_13, NULL, 13),
- NAME_FUNC_OFFSET( 148, gl_dispatch_stub_14, gl_dispatch_stub_14, NULL, 14),
- NAME_FUNC_OFFSET( 159, gl_dispatch_stub_15, gl_dispatch_stub_15, NULL, 15),
- NAME_FUNC_OFFSET( 169, gl_dispatch_stub_16, gl_dispatch_stub_16, NULL, 16),
- NAME_FUNC_OFFSET( 180, gl_dispatch_stub_17, gl_dispatch_stub_17, NULL, 17),
- NAME_FUNC_OFFSET( 190, gl_dispatch_stub_18, gl_dispatch_stub_18, NULL, 18),
- NAME_FUNC_OFFSET( 201, gl_dispatch_stub_19, gl_dispatch_stub_19, NULL, 19),
- NAME_FUNC_OFFSET( 212, gl_dispatch_stub_20, gl_dispatch_stub_20, NULL, 20),
- NAME_FUNC_OFFSET( 224, gl_dispatch_stub_21, gl_dispatch_stub_21, NULL, 21),
- NAME_FUNC_OFFSET( 235, gl_dispatch_stub_22, gl_dispatch_stub_22, NULL, 22),
- NAME_FUNC_OFFSET( 247, gl_dispatch_stub_23, gl_dispatch_stub_23, NULL, 23),
- NAME_FUNC_OFFSET( 258, gl_dispatch_stub_24, gl_dispatch_stub_24, NULL, 24),
- NAME_FUNC_OFFSET( 270, gl_dispatch_stub_25, gl_dispatch_stub_25, NULL, 25),
- NAME_FUNC_OFFSET( 280, gl_dispatch_stub_26, gl_dispatch_stub_26, NULL, 26),
- NAME_FUNC_OFFSET( 291, gl_dispatch_stub_27, gl_dispatch_stub_27, NULL, 27),
- NAME_FUNC_OFFSET( 301, gl_dispatch_stub_28, gl_dispatch_stub_28, NULL, 28),
- NAME_FUNC_OFFSET( 312, glColor4f, glColor4f, NULL, 29),
- NAME_FUNC_OFFSET( 322, gl_dispatch_stub_30, gl_dispatch_stub_30, NULL, 30),
- NAME_FUNC_OFFSET( 333, gl_dispatch_stub_31, gl_dispatch_stub_31, NULL, 31),
- NAME_FUNC_OFFSET( 343, gl_dispatch_stub_32, gl_dispatch_stub_32, NULL, 32),
- NAME_FUNC_OFFSET( 354, gl_dispatch_stub_33, gl_dispatch_stub_33, NULL, 33),
- NAME_FUNC_OFFSET( 364, gl_dispatch_stub_34, gl_dispatch_stub_34, NULL, 34),
- NAME_FUNC_OFFSET( 375, glColor4ub, glColor4ub, NULL, 35),
- NAME_FUNC_OFFSET( 386, gl_dispatch_stub_36, gl_dispatch_stub_36, NULL, 36),
- NAME_FUNC_OFFSET( 398, gl_dispatch_stub_37, gl_dispatch_stub_37, NULL, 37),
- NAME_FUNC_OFFSET( 409, gl_dispatch_stub_38, gl_dispatch_stub_38, NULL, 38),
- NAME_FUNC_OFFSET( 421, gl_dispatch_stub_39, gl_dispatch_stub_39, NULL, 39),
- NAME_FUNC_OFFSET( 432, gl_dispatch_stub_40, gl_dispatch_stub_40, NULL, 40),
- NAME_FUNC_OFFSET( 444, gl_dispatch_stub_41, gl_dispatch_stub_41, NULL, 41),
- NAME_FUNC_OFFSET( 455, gl_dispatch_stub_42, gl_dispatch_stub_42, NULL, 42),
- NAME_FUNC_OFFSET( 467, gl_dispatch_stub_43, gl_dispatch_stub_43, NULL, 43),
- NAME_FUNC_OFFSET( 473, gl_dispatch_stub_44, gl_dispatch_stub_44, NULL, 44),
- NAME_FUNC_OFFSET( 482, gl_dispatch_stub_45, gl_dispatch_stub_45, NULL, 45),
- NAME_FUNC_OFFSET( 492, gl_dispatch_stub_46, gl_dispatch_stub_46, NULL, 46),
- NAME_FUNC_OFFSET( 501, gl_dispatch_stub_47, gl_dispatch_stub_47, NULL, 47),
- NAME_FUNC_OFFSET( 511, gl_dispatch_stub_48, gl_dispatch_stub_48, NULL, 48),
- NAME_FUNC_OFFSET( 520, gl_dispatch_stub_49, gl_dispatch_stub_49, NULL, 49),
- NAME_FUNC_OFFSET( 530, gl_dispatch_stub_50, gl_dispatch_stub_50, NULL, 50),
- NAME_FUNC_OFFSET( 539, gl_dispatch_stub_51, gl_dispatch_stub_51, NULL, 51),
- NAME_FUNC_OFFSET( 549, gl_dispatch_stub_52, gl_dispatch_stub_52, NULL, 52),
- NAME_FUNC_OFFSET( 560, gl_dispatch_stub_53, gl_dispatch_stub_53, NULL, 53),
- NAME_FUNC_OFFSET( 572, gl_dispatch_stub_54, gl_dispatch_stub_54, NULL, 54),
- NAME_FUNC_OFFSET( 583, gl_dispatch_stub_55, gl_dispatch_stub_55, NULL, 55),
- NAME_FUNC_OFFSET( 595, glNormal3f, glNormal3f, NULL, 56),
- NAME_FUNC_OFFSET( 606, gl_dispatch_stub_57, gl_dispatch_stub_57, NULL, 57),
- NAME_FUNC_OFFSET( 618, gl_dispatch_stub_58, gl_dispatch_stub_58, NULL, 58),
- NAME_FUNC_OFFSET( 629, gl_dispatch_stub_59, gl_dispatch_stub_59, NULL, 59),
- NAME_FUNC_OFFSET( 641, gl_dispatch_stub_60, gl_dispatch_stub_60, NULL, 60),
- NAME_FUNC_OFFSET( 652, gl_dispatch_stub_61, gl_dispatch_stub_61, NULL, 61),
- NAME_FUNC_OFFSET( 664, gl_dispatch_stub_62, gl_dispatch_stub_62, NULL, 62),
- NAME_FUNC_OFFSET( 678, gl_dispatch_stub_63, gl_dispatch_stub_63, NULL, 63),
- NAME_FUNC_OFFSET( 693, gl_dispatch_stub_64, gl_dispatch_stub_64, NULL, 64),
- NAME_FUNC_OFFSET( 707, gl_dispatch_stub_65, gl_dispatch_stub_65, NULL, 65),
- NAME_FUNC_OFFSET( 722, gl_dispatch_stub_66, gl_dispatch_stub_66, NULL, 66),
- NAME_FUNC_OFFSET( 736, gl_dispatch_stub_67, gl_dispatch_stub_67, NULL, 67),
- NAME_FUNC_OFFSET( 751, gl_dispatch_stub_68, gl_dispatch_stub_68, NULL, 68),
- NAME_FUNC_OFFSET( 765, gl_dispatch_stub_69, gl_dispatch_stub_69, NULL, 69),
- NAME_FUNC_OFFSET( 780, gl_dispatch_stub_70, gl_dispatch_stub_70, NULL, 70),
- NAME_FUNC_OFFSET( 794, gl_dispatch_stub_71, gl_dispatch_stub_71, NULL, 71),
- NAME_FUNC_OFFSET( 809, gl_dispatch_stub_72, gl_dispatch_stub_72, NULL, 72),
- NAME_FUNC_OFFSET( 823, gl_dispatch_stub_73, gl_dispatch_stub_73, NULL, 73),
- NAME_FUNC_OFFSET( 838, gl_dispatch_stub_74, gl_dispatch_stub_74, NULL, 74),
- NAME_FUNC_OFFSET( 852, gl_dispatch_stub_75, gl_dispatch_stub_75, NULL, 75),
- NAME_FUNC_OFFSET( 867, gl_dispatch_stub_76, gl_dispatch_stub_76, NULL, 76),
- NAME_FUNC_OFFSET( 881, gl_dispatch_stub_77, gl_dispatch_stub_77, NULL, 77),
- NAME_FUNC_OFFSET( 896, gl_dispatch_stub_78, gl_dispatch_stub_78, NULL, 78),
- NAME_FUNC_OFFSET( 910, gl_dispatch_stub_79, gl_dispatch_stub_79, NULL, 79),
- NAME_FUNC_OFFSET( 925, gl_dispatch_stub_80, gl_dispatch_stub_80, NULL, 80),
- NAME_FUNC_OFFSET( 939, gl_dispatch_stub_81, gl_dispatch_stub_81, NULL, 81),
- NAME_FUNC_OFFSET( 954, gl_dispatch_stub_82, gl_dispatch_stub_82, NULL, 82),
- NAME_FUNC_OFFSET( 968, gl_dispatch_stub_83, gl_dispatch_stub_83, NULL, 83),
- NAME_FUNC_OFFSET( 983, gl_dispatch_stub_84, gl_dispatch_stub_84, NULL, 84),
- NAME_FUNC_OFFSET( 997, gl_dispatch_stub_85, gl_dispatch_stub_85, NULL, 85),
- NAME_FUNC_OFFSET( 1012, gl_dispatch_stub_86, gl_dispatch_stub_86, NULL, 86),
- NAME_FUNC_OFFSET( 1020, gl_dispatch_stub_87, gl_dispatch_stub_87, NULL, 87),
- NAME_FUNC_OFFSET( 1029, gl_dispatch_stub_88, gl_dispatch_stub_88, NULL, 88),
- NAME_FUNC_OFFSET( 1037, gl_dispatch_stub_89, gl_dispatch_stub_89, NULL, 89),
- NAME_FUNC_OFFSET( 1046, gl_dispatch_stub_90, gl_dispatch_stub_90, NULL, 90),
- NAME_FUNC_OFFSET( 1054, gl_dispatch_stub_91, gl_dispatch_stub_91, NULL, 91),
- NAME_FUNC_OFFSET( 1063, gl_dispatch_stub_92, gl_dispatch_stub_92, NULL, 92),
- NAME_FUNC_OFFSET( 1071, gl_dispatch_stub_93, gl_dispatch_stub_93, NULL, 93),
- NAME_FUNC_OFFSET( 1080, gl_dispatch_stub_94, gl_dispatch_stub_94, NULL, 94),
- NAME_FUNC_OFFSET( 1093, gl_dispatch_stub_95, gl_dispatch_stub_95, NULL, 95),
- NAME_FUNC_OFFSET( 1107, gl_dispatch_stub_96, gl_dispatch_stub_96, NULL, 96),
- NAME_FUNC_OFFSET( 1120, gl_dispatch_stub_97, gl_dispatch_stub_97, NULL, 97),
- NAME_FUNC_OFFSET( 1134, gl_dispatch_stub_98, gl_dispatch_stub_98, NULL, 98),
- NAME_FUNC_OFFSET( 1147, gl_dispatch_stub_99, gl_dispatch_stub_99, NULL, 99),
- NAME_FUNC_OFFSET( 1161, gl_dispatch_stub_100, gl_dispatch_stub_100, NULL, 100),
- NAME_FUNC_OFFSET( 1174, gl_dispatch_stub_101, gl_dispatch_stub_101, NULL, 101),
- NAME_FUNC_OFFSET( 1188, gl_dispatch_stub_102, gl_dispatch_stub_102, NULL, 102),
- NAME_FUNC_OFFSET( 1201, gl_dispatch_stub_103, gl_dispatch_stub_103, NULL, 103),
- NAME_FUNC_OFFSET( 1215, gl_dispatch_stub_104, gl_dispatch_stub_104, NULL, 104),
- NAME_FUNC_OFFSET( 1228, gl_dispatch_stub_105, gl_dispatch_stub_105, NULL, 105),
- NAME_FUNC_OFFSET( 1242, gl_dispatch_stub_106, gl_dispatch_stub_106, NULL, 106),
- NAME_FUNC_OFFSET( 1255, gl_dispatch_stub_107, gl_dispatch_stub_107, NULL, 107),
- NAME_FUNC_OFFSET( 1269, gl_dispatch_stub_108, gl_dispatch_stub_108, NULL, 108),
- NAME_FUNC_OFFSET( 1282, gl_dispatch_stub_109, gl_dispatch_stub_109, NULL, 109),
- NAME_FUNC_OFFSET( 1296, gl_dispatch_stub_110, gl_dispatch_stub_110, NULL, 110),
- NAME_FUNC_OFFSET( 1309, gl_dispatch_stub_111, gl_dispatch_stub_111, NULL, 111),
- NAME_FUNC_OFFSET( 1323, gl_dispatch_stub_112, gl_dispatch_stub_112, NULL, 112),
- NAME_FUNC_OFFSET( 1336, gl_dispatch_stub_113, gl_dispatch_stub_113, NULL, 113),
- NAME_FUNC_OFFSET( 1350, gl_dispatch_stub_114, gl_dispatch_stub_114, NULL, 114),
- NAME_FUNC_OFFSET( 1363, gl_dispatch_stub_115, gl_dispatch_stub_115, NULL, 115),
- NAME_FUNC_OFFSET( 1377, gl_dispatch_stub_116, gl_dispatch_stub_116, NULL, 116),
- NAME_FUNC_OFFSET( 1390, gl_dispatch_stub_117, gl_dispatch_stub_117, NULL, 117),
- NAME_FUNC_OFFSET( 1404, gl_dispatch_stub_118, gl_dispatch_stub_118, NULL, 118),
- NAME_FUNC_OFFSET( 1417, gl_dispatch_stub_119, gl_dispatch_stub_119, NULL, 119),
- NAME_FUNC_OFFSET( 1431, gl_dispatch_stub_120, gl_dispatch_stub_120, NULL, 120),
- NAME_FUNC_OFFSET( 1444, gl_dispatch_stub_121, gl_dispatch_stub_121, NULL, 121),
- NAME_FUNC_OFFSET( 1458, gl_dispatch_stub_122, gl_dispatch_stub_122, NULL, 122),
- NAME_FUNC_OFFSET( 1471, gl_dispatch_stub_123, gl_dispatch_stub_123, NULL, 123),
- NAME_FUNC_OFFSET( 1485, gl_dispatch_stub_124, gl_dispatch_stub_124, NULL, 124),
- NAME_FUNC_OFFSET( 1498, gl_dispatch_stub_125, gl_dispatch_stub_125, NULL, 125),
- NAME_FUNC_OFFSET( 1512, gl_dispatch_stub_126, gl_dispatch_stub_126, NULL, 126),
- NAME_FUNC_OFFSET( 1523, gl_dispatch_stub_127, gl_dispatch_stub_127, NULL, 127),
- NAME_FUNC_OFFSET( 1535, gl_dispatch_stub_128, gl_dispatch_stub_128, NULL, 128),
- NAME_FUNC_OFFSET( 1546, gl_dispatch_stub_129, gl_dispatch_stub_129, NULL, 129),
- NAME_FUNC_OFFSET( 1558, gl_dispatch_stub_130, gl_dispatch_stub_130, NULL, 130),
- NAME_FUNC_OFFSET( 1569, gl_dispatch_stub_131, gl_dispatch_stub_131, NULL, 131),
- NAME_FUNC_OFFSET( 1581, gl_dispatch_stub_132, gl_dispatch_stub_132, NULL, 132),
- NAME_FUNC_OFFSET( 1592, gl_dispatch_stub_133, gl_dispatch_stub_133, NULL, 133),
- NAME_FUNC_OFFSET( 1604, gl_dispatch_stub_134, gl_dispatch_stub_134, NULL, 134),
- NAME_FUNC_OFFSET( 1615, gl_dispatch_stub_135, gl_dispatch_stub_135, NULL, 135),
- NAME_FUNC_OFFSET( 1627, gl_dispatch_stub_136, gl_dispatch_stub_136, NULL, 136),
- NAME_FUNC_OFFSET( 1638, gl_dispatch_stub_137, gl_dispatch_stub_137, NULL, 137),
- NAME_FUNC_OFFSET( 1650, gl_dispatch_stub_138, gl_dispatch_stub_138, NULL, 138),
- NAME_FUNC_OFFSET( 1661, gl_dispatch_stub_139, gl_dispatch_stub_139, NULL, 139),
- NAME_FUNC_OFFSET( 1673, gl_dispatch_stub_140, gl_dispatch_stub_140, NULL, 140),
- NAME_FUNC_OFFSET( 1684, gl_dispatch_stub_141, gl_dispatch_stub_141, NULL, 141),
- NAME_FUNC_OFFSET( 1696, gl_dispatch_stub_142, gl_dispatch_stub_142, NULL, 142),
- NAME_FUNC_OFFSET( 1707, gl_dispatch_stub_143, gl_dispatch_stub_143, NULL, 143),
- NAME_FUNC_OFFSET( 1719, gl_dispatch_stub_144, gl_dispatch_stub_144, NULL, 144),
- NAME_FUNC_OFFSET( 1730, gl_dispatch_stub_145, gl_dispatch_stub_145, NULL, 145),
- NAME_FUNC_OFFSET( 1742, gl_dispatch_stub_146, gl_dispatch_stub_146, NULL, 146),
- NAME_FUNC_OFFSET( 1753, gl_dispatch_stub_147, gl_dispatch_stub_147, NULL, 147),
- NAME_FUNC_OFFSET( 1765, gl_dispatch_stub_148, gl_dispatch_stub_148, NULL, 148),
- NAME_FUNC_OFFSET( 1776, gl_dispatch_stub_149, gl_dispatch_stub_149, NULL, 149),
- NAME_FUNC_OFFSET( 1788, gl_dispatch_stub_150, gl_dispatch_stub_150, NULL, 150),
- NAME_FUNC_OFFSET( 1800, gl_dispatch_stub_151, gl_dispatch_stub_151, NULL, 151),
- NAME_FUNC_OFFSET( 1816, glCullFace, glCullFace, NULL, 152),
- NAME_FUNC_OFFSET( 1827, glFogf, glFogf, NULL, 153),
- NAME_FUNC_OFFSET( 1834, glFogfv, glFogfv, NULL, 154),
- NAME_FUNC_OFFSET( 1842, gl_dispatch_stub_155, gl_dispatch_stub_155, NULL, 155),
- NAME_FUNC_OFFSET( 1849, gl_dispatch_stub_156, gl_dispatch_stub_156, NULL, 156),
- NAME_FUNC_OFFSET( 1857, glFrontFace, glFrontFace, NULL, 157),
- NAME_FUNC_OFFSET( 1869, glHint, glHint, NULL, 158),
- NAME_FUNC_OFFSET( 1876, glLightf, glLightf, NULL, 159),
- NAME_FUNC_OFFSET( 1885, glLightfv, glLightfv, NULL, 160),
- NAME_FUNC_OFFSET( 1895, gl_dispatch_stub_161, gl_dispatch_stub_161, NULL, 161),
- NAME_FUNC_OFFSET( 1904, gl_dispatch_stub_162, gl_dispatch_stub_162, NULL, 162),
- NAME_FUNC_OFFSET( 1914, glLightModelf, glLightModelf, NULL, 163),
- NAME_FUNC_OFFSET( 1928, glLightModelfv, glLightModelfv, NULL, 164),
- NAME_FUNC_OFFSET( 1943, gl_dispatch_stub_165, gl_dispatch_stub_165, NULL, 165),
- NAME_FUNC_OFFSET( 1957, gl_dispatch_stub_166, gl_dispatch_stub_166, NULL, 166),
- NAME_FUNC_OFFSET( 1972, gl_dispatch_stub_167, gl_dispatch_stub_167, NULL, 167),
- NAME_FUNC_OFFSET( 1986, glLineWidth, glLineWidth, NULL, 168),
- NAME_FUNC_OFFSET( 1998, glMaterialf, glMaterialf, NULL, 169),
- NAME_FUNC_OFFSET( 2010, glMaterialfv, glMaterialfv, NULL, 170),
- NAME_FUNC_OFFSET( 2023, gl_dispatch_stub_171, gl_dispatch_stub_171, NULL, 171),
- NAME_FUNC_OFFSET( 2035, gl_dispatch_stub_172, gl_dispatch_stub_172, NULL, 172),
- NAME_FUNC_OFFSET( 2048, glPointSize, glPointSize, NULL, 173),
- NAME_FUNC_OFFSET( 2060, gl_dispatch_stub_174, gl_dispatch_stub_174, NULL, 174),
- NAME_FUNC_OFFSET( 2074, gl_dispatch_stub_175, gl_dispatch_stub_175, NULL, 175),
- NAME_FUNC_OFFSET( 2091, glScissor, glScissor, NULL, 176),
- NAME_FUNC_OFFSET( 2101, glShadeModel, glShadeModel, NULL, 177),
- NAME_FUNC_OFFSET( 2114, glTexParameterf, glTexParameterf, NULL, 178),
- NAME_FUNC_OFFSET( 2130, glTexParameterfv, glTexParameterfv, NULL, 179),
- NAME_FUNC_OFFSET( 2147, glTexParameteri, glTexParameteri, NULL, 180),
- NAME_FUNC_OFFSET( 2163, glTexParameteriv, glTexParameteriv, NULL, 181),
- NAME_FUNC_OFFSET( 2180, gl_dispatch_stub_182, gl_dispatch_stub_182, NULL, 182),
- NAME_FUNC_OFFSET( 2193, glTexImage2D, glTexImage2D, NULL, 183),
- NAME_FUNC_OFFSET( 2206, glTexEnvf, glTexEnvf, NULL, 184),
- NAME_FUNC_OFFSET( 2216, glTexEnvfv, glTexEnvfv, NULL, 185),
- NAME_FUNC_OFFSET( 2227, glTexEnvi, glTexEnvi, NULL, 186),
- NAME_FUNC_OFFSET( 2237, glTexEnviv, glTexEnviv, NULL, 187),
- NAME_FUNC_OFFSET( 2248, gl_dispatch_stub_188, gl_dispatch_stub_188, NULL, 188),
- NAME_FUNC_OFFSET( 2258, gl_dispatch_stub_189, gl_dispatch_stub_189, NULL, 189),
- NAME_FUNC_OFFSET( 2269, glTexGenfOES, glTexGenfOES, NULL, 190),
- NAME_FUNC_OFFSET( 2282, glTexGenfvOES, glTexGenfvOES, NULL, 191),
- NAME_FUNC_OFFSET( 2296, glTexGeniOES, glTexGeniOES, NULL, 192),
- NAME_FUNC_OFFSET( 2309, glTexGenivOES, glTexGenivOES, NULL, 193),
- NAME_FUNC_OFFSET( 2323, gl_dispatch_stub_194, gl_dispatch_stub_194, NULL, 194),
- NAME_FUNC_OFFSET( 2340, gl_dispatch_stub_195, gl_dispatch_stub_195, NULL, 195),
- NAME_FUNC_OFFSET( 2355, gl_dispatch_stub_196, gl_dispatch_stub_196, NULL, 196),
- NAME_FUNC_OFFSET( 2368, gl_dispatch_stub_197, gl_dispatch_stub_197, NULL, 197),
- NAME_FUNC_OFFSET( 2380, gl_dispatch_stub_198, gl_dispatch_stub_198, NULL, 198),
- NAME_FUNC_OFFSET( 2391, gl_dispatch_stub_199, gl_dispatch_stub_199, NULL, 199),
- NAME_FUNC_OFFSET( 2405, gl_dispatch_stub_200, gl_dispatch_stub_200, NULL, 200),
- NAME_FUNC_OFFSET( 2415, gl_dispatch_stub_201, gl_dispatch_stub_201, NULL, 201),
- NAME_FUNC_OFFSET( 2426, gl_dispatch_stub_202, gl_dispatch_stub_202, NULL, 202),
- NAME_FUNC_OFFSET( 2439, glClear, glClear, NULL, 203),
- NAME_FUNC_OFFSET( 2447, gl_dispatch_stub_204, gl_dispatch_stub_204, NULL, 204),
- NAME_FUNC_OFFSET( 2460, gl_dispatch_stub_205, gl_dispatch_stub_205, NULL, 205),
- NAME_FUNC_OFFSET( 2473, glClearColor, glClearColor, NULL, 206),
- NAME_FUNC_OFFSET( 2486, glClearStencil, glClearStencil, NULL, 207),
- NAME_FUNC_OFFSET( 2501, gl_dispatch_stub_208, gl_dispatch_stub_208, NULL, 208),
- NAME_FUNC_OFFSET( 2514, glStencilMask, glStencilMask, NULL, 209),
- NAME_FUNC_OFFSET( 2528, glColorMask, glColorMask, NULL, 210),
- NAME_FUNC_OFFSET( 2540, glDepthMask, glDepthMask, NULL, 211),
- NAME_FUNC_OFFSET( 2552, gl_dispatch_stub_212, gl_dispatch_stub_212, NULL, 212),
- NAME_FUNC_OFFSET( 2564, gl_dispatch_stub_213, gl_dispatch_stub_213, NULL, 213),
- NAME_FUNC_OFFSET( 2572, glDisable, glDisable, NULL, 214),
- NAME_FUNC_OFFSET( 2582, glEnable, glEnable, NULL, 215),
- NAME_FUNC_OFFSET( 2591, glFinish, glFinish, NULL, 216),
- NAME_FUNC_OFFSET( 2600, glFlush, glFlush, NULL, 217),
- NAME_FUNC_OFFSET( 2608, gl_dispatch_stub_218, gl_dispatch_stub_218, NULL, 218),
- NAME_FUNC_OFFSET( 2620, gl_dispatch_stub_219, gl_dispatch_stub_219, NULL, 219),
- NAME_FUNC_OFFSET( 2633, gl_dispatch_stub_220, gl_dispatch_stub_220, NULL, 220),
- NAME_FUNC_OFFSET( 2641, gl_dispatch_stub_221, gl_dispatch_stub_221, NULL, 221),
- NAME_FUNC_OFFSET( 2649, gl_dispatch_stub_222, gl_dispatch_stub_222, NULL, 222),
- NAME_FUNC_OFFSET( 2657, gl_dispatch_stub_223, gl_dispatch_stub_223, NULL, 223),
- NAME_FUNC_OFFSET( 2665, gl_dispatch_stub_224, gl_dispatch_stub_224, NULL, 224),
- NAME_FUNC_OFFSET( 2677, gl_dispatch_stub_225, gl_dispatch_stub_225, NULL, 225),
- NAME_FUNC_OFFSET( 2689, gl_dispatch_stub_226, gl_dispatch_stub_226, NULL, 226),
- NAME_FUNC_OFFSET( 2701, gl_dispatch_stub_227, gl_dispatch_stub_227, NULL, 227),
- NAME_FUNC_OFFSET( 2713, gl_dispatch_stub_228, gl_dispatch_stub_228, NULL, 228),
- NAME_FUNC_OFFSET( 2727, gl_dispatch_stub_229, gl_dispatch_stub_229, NULL, 229),
- NAME_FUNC_OFFSET( 2742, gl_dispatch_stub_230, gl_dispatch_stub_230, NULL, 230),
- NAME_FUNC_OFFSET( 2756, gl_dispatch_stub_231, gl_dispatch_stub_231, NULL, 231),
- NAME_FUNC_OFFSET( 2771, gl_dispatch_stub_232, gl_dispatch_stub_232, NULL, 232),
- NAME_FUNC_OFFSET( 2785, gl_dispatch_stub_233, gl_dispatch_stub_233, NULL, 233),
- NAME_FUNC_OFFSET( 2800, gl_dispatch_stub_234, gl_dispatch_stub_234, NULL, 234),
- NAME_FUNC_OFFSET( 2814, gl_dispatch_stub_235, gl_dispatch_stub_235, NULL, 235),
- NAME_FUNC_OFFSET( 2829, gl_dispatch_stub_236, gl_dispatch_stub_236, NULL, 236),
- NAME_FUNC_OFFSET( 2841, gl_dispatch_stub_237, gl_dispatch_stub_237, NULL, 237),
- NAME_FUNC_OFFSET( 2854, gl_dispatch_stub_238, gl_dispatch_stub_238, NULL, 238),
- NAME_FUNC_OFFSET( 2866, gl_dispatch_stub_239, gl_dispatch_stub_239, NULL, 239),
- NAME_FUNC_OFFSET( 2879, glAlphaFunc, glAlphaFunc, NULL, 240),
- NAME_FUNC_OFFSET( 2891, glBlendFunc, glBlendFunc, NULL, 241),
- NAME_FUNC_OFFSET( 2903, glLogicOp, glLogicOp, NULL, 242),
- NAME_FUNC_OFFSET( 2913, glStencilFunc, glStencilFunc, NULL, 243),
- NAME_FUNC_OFFSET( 2927, glStencilOp, glStencilOp, NULL, 244),
- NAME_FUNC_OFFSET( 2939, glDepthFunc, glDepthFunc, NULL, 245),
- NAME_FUNC_OFFSET( 2951, gl_dispatch_stub_246, gl_dispatch_stub_246, NULL, 246),
- NAME_FUNC_OFFSET( 2963, gl_dispatch_stub_247, gl_dispatch_stub_247, NULL, 247),
- NAME_FUNC_OFFSET( 2980, gl_dispatch_stub_248, gl_dispatch_stub_248, NULL, 248),
- NAME_FUNC_OFFSET( 2997, gl_dispatch_stub_249, gl_dispatch_stub_249, NULL, 249),
- NAME_FUNC_OFFSET( 3011, glPixelStorei, glPixelStorei, NULL, 250),
- NAME_FUNC_OFFSET( 3025, gl_dispatch_stub_251, gl_dispatch_stub_251, NULL, 251),
- NAME_FUNC_OFFSET( 3038, gl_dispatch_stub_252, gl_dispatch_stub_252, NULL, 252),
- NAME_FUNC_OFFSET( 3052, gl_dispatch_stub_253, gl_dispatch_stub_253, NULL, 253),
- NAME_FUNC_OFFSET( 3066, gl_dispatch_stub_254, gl_dispatch_stub_254, NULL, 254),
- NAME_FUNC_OFFSET( 3079, gl_dispatch_stub_255, gl_dispatch_stub_255, NULL, 255),
- NAME_FUNC_OFFSET( 3092, glReadPixels, glReadPixels, NULL, 256),
- NAME_FUNC_OFFSET( 3105, gl_dispatch_stub_257, gl_dispatch_stub_257, NULL, 257),
- NAME_FUNC_OFFSET( 3118, glGetBooleanv, glGetBooleanv, NULL, 258),
- NAME_FUNC_OFFSET( 3132, gl_dispatch_stub_259, gl_dispatch_stub_259, NULL, 259),
- NAME_FUNC_OFFSET( 3147, gl_dispatch_stub_260, gl_dispatch_stub_260, NULL, 260),
- NAME_FUNC_OFFSET( 3160, glGetError, glGetError, NULL, 261),
- NAME_FUNC_OFFSET( 3171, glGetFloatv, glGetFloatv, NULL, 262),
- NAME_FUNC_OFFSET( 3183, glGetIntegerv, glGetIntegerv, NULL, 263),
- NAME_FUNC_OFFSET( 3197, glGetLightfv, glGetLightfv, NULL, 264),
- NAME_FUNC_OFFSET( 3210, gl_dispatch_stub_265, gl_dispatch_stub_265, NULL, 265),
- NAME_FUNC_OFFSET( 3223, gl_dispatch_stub_266, gl_dispatch_stub_266, NULL, 266),
- NAME_FUNC_OFFSET( 3234, gl_dispatch_stub_267, gl_dispatch_stub_267, NULL, 267),
- NAME_FUNC_OFFSET( 3245, gl_dispatch_stub_268, gl_dispatch_stub_268, NULL, 268),
- NAME_FUNC_OFFSET( 3256, glGetMaterialfv, glGetMaterialfv, NULL, 269),
- NAME_FUNC_OFFSET( 3272, gl_dispatch_stub_270, gl_dispatch_stub_270, NULL, 270),
- NAME_FUNC_OFFSET( 3288, gl_dispatch_stub_271, gl_dispatch_stub_271, NULL, 271),
- NAME_FUNC_OFFSET( 3304, gl_dispatch_stub_272, gl_dispatch_stub_272, NULL, 272),
- NAME_FUNC_OFFSET( 3321, gl_dispatch_stub_273, gl_dispatch_stub_273, NULL, 273),
- NAME_FUNC_OFFSET( 3338, gl_dispatch_stub_274, gl_dispatch_stub_274, NULL, 274),
- NAME_FUNC_OFFSET( 3358, glGetString, glGetString, NULL, 275),
- NAME_FUNC_OFFSET( 3370, glGetTexEnvfv, glGetTexEnvfv, NULL, 276),
- NAME_FUNC_OFFSET( 3384, glGetTexEnviv, glGetTexEnviv, NULL, 277),
- NAME_FUNC_OFFSET( 3398, gl_dispatch_stub_278, gl_dispatch_stub_278, NULL, 278),
- NAME_FUNC_OFFSET( 3412, glGetTexGenfvOES, glGetTexGenfvOES, NULL, 279),
- NAME_FUNC_OFFSET( 3429, glGetTexGenivOES, glGetTexGenivOES, NULL, 280),
- NAME_FUNC_OFFSET( 3446, gl_dispatch_stub_281, gl_dispatch_stub_281, NULL, 281),
- NAME_FUNC_OFFSET( 3460, glGetTexParameterfv, glGetTexParameterfv, NULL, 282),
- NAME_FUNC_OFFSET( 3480, glGetTexParameteriv, glGetTexParameteriv, NULL, 283),
- NAME_FUNC_OFFSET( 3500, gl_dispatch_stub_284, gl_dispatch_stub_284, NULL, 284),
- NAME_FUNC_OFFSET( 3525, gl_dispatch_stub_285, gl_dispatch_stub_285, NULL, 285),
- NAME_FUNC_OFFSET( 3550, glIsEnabled, glIsEnabled, NULL, 286),
- NAME_FUNC_OFFSET( 3562, gl_dispatch_stub_287, gl_dispatch_stub_287, NULL, 287),
- NAME_FUNC_OFFSET( 3571, gl_dispatch_stub_288, gl_dispatch_stub_288, NULL, 288),
- NAME_FUNC_OFFSET( 3584, gl_dispatch_stub_289, gl_dispatch_stub_289, NULL, 289),
- NAME_FUNC_OFFSET( 3594, glLoadIdentity, glLoadIdentity, NULL, 290),
- NAME_FUNC_OFFSET( 3609, glLoadMatrixf, glLoadMatrixf, NULL, 291),
- NAME_FUNC_OFFSET( 3623, gl_dispatch_stub_292, gl_dispatch_stub_292, NULL, 292),
- NAME_FUNC_OFFSET( 3637, glMatrixMode, glMatrixMode, NULL, 293),
- NAME_FUNC_OFFSET( 3650, glMultMatrixf, glMultMatrixf, NULL, 294),
- NAME_FUNC_OFFSET( 3664, gl_dispatch_stub_295, gl_dispatch_stub_295, NULL, 295),
- NAME_FUNC_OFFSET( 3678, gl_dispatch_stub_296, gl_dispatch_stub_296, NULL, 296),
- NAME_FUNC_OFFSET( 3686, glPopMatrix, glPopMatrix, NULL, 297),
- NAME_FUNC_OFFSET( 3698, glPushMatrix, glPushMatrix, NULL, 298),
- NAME_FUNC_OFFSET( 3711, gl_dispatch_stub_299, gl_dispatch_stub_299, NULL, 299),
- NAME_FUNC_OFFSET( 3721, glRotatef, glRotatef, NULL, 300),
- NAME_FUNC_OFFSET( 3731, gl_dispatch_stub_301, gl_dispatch_stub_301, NULL, 301),
- NAME_FUNC_OFFSET( 3740, glScalef, glScalef, NULL, 302),
- NAME_FUNC_OFFSET( 3749, gl_dispatch_stub_303, gl_dispatch_stub_303, NULL, 303),
- NAME_FUNC_OFFSET( 3762, glTranslatef, glTranslatef, NULL, 304),
- NAME_FUNC_OFFSET( 3775, glViewport, glViewport, NULL, 305),
- NAME_FUNC_OFFSET( 3786, gl_dispatch_stub_306, gl_dispatch_stub_306, NULL, 306),
- NAME_FUNC_OFFSET( 3801, glBindTexture, glBindTexture, NULL, 307),
- NAME_FUNC_OFFSET( 3815, glColorPointer, glColorPointer, NULL, 308),
- NAME_FUNC_OFFSET( 3830, glDisableClientState, glDisableClientState, NULL, 309),
- NAME_FUNC_OFFSET( 3851, glDrawArrays, glDrawArrays, NULL, 310),
- NAME_FUNC_OFFSET( 3864, glDrawElements, glDrawElements, NULL, 311),
- NAME_FUNC_OFFSET( 3879, gl_dispatch_stub_312, gl_dispatch_stub_312, NULL, 312),
- NAME_FUNC_OFFSET( 3897, glEnableClientState, glEnableClientState, NULL, 313),
- NAME_FUNC_OFFSET( 3917, gl_dispatch_stub_314, gl_dispatch_stub_314, NULL, 314),
- NAME_FUNC_OFFSET( 3932, gl_dispatch_stub_315, gl_dispatch_stub_315, NULL, 315),
- NAME_FUNC_OFFSET( 3942, gl_dispatch_stub_316, gl_dispatch_stub_316, NULL, 316),
- NAME_FUNC_OFFSET( 3953, gl_dispatch_stub_317, gl_dispatch_stub_317, NULL, 317),
- NAME_FUNC_OFFSET( 3973, glNormalPointer, glNormalPointer, NULL, 318),
- NAME_FUNC_OFFSET( 3989, glPolygonOffset, glPolygonOffset, NULL, 319),
- NAME_FUNC_OFFSET( 4005, glTexCoordPointer, glTexCoordPointer, NULL, 320),
- NAME_FUNC_OFFSET( 4023, glVertexPointer, glVertexPointer, NULL, 321),
- NAME_FUNC_OFFSET( 4039, gl_dispatch_stub_322, gl_dispatch_stub_322, NULL, 322),
- NAME_FUNC_OFFSET( 4061, gl_dispatch_stub_323, gl_dispatch_stub_323, NULL, 323),
- NAME_FUNC_OFFSET( 4078, glCopyTexImage2D, glCopyTexImage2D, NULL, 324),
- NAME_FUNC_OFFSET( 4095, gl_dispatch_stub_325, gl_dispatch_stub_325, NULL, 325),
- NAME_FUNC_OFFSET( 4115, glCopyTexSubImage2D, glCopyTexSubImage2D, NULL, 326),
- NAME_FUNC_OFFSET( 4135, glDeleteTextures, glDeleteTextures, NULL, 327),
- NAME_FUNC_OFFSET( 4152, glGenTextures, glGenTextures, NULL, 328),
- NAME_FUNC_OFFSET( 4166, glGetPointerv, glGetPointerv, NULL, 329),
- NAME_FUNC_OFFSET( 4180, glIsTexture, glIsTexture, NULL, 330),
- NAME_FUNC_OFFSET( 4192, gl_dispatch_stub_331, gl_dispatch_stub_331, NULL, 331),
- NAME_FUNC_OFFSET( 4213, gl_dispatch_stub_332, gl_dispatch_stub_332, NULL, 332),
- NAME_FUNC_OFFSET( 4229, glTexSubImage2D, glTexSubImage2D, NULL, 333),
- NAME_FUNC_OFFSET( 4245, gl_dispatch_stub_334, gl_dispatch_stub_334, NULL, 334),
- NAME_FUNC_OFFSET( 4263, gl_dispatch_stub_335, gl_dispatch_stub_335, NULL, 335),
- NAME_FUNC_OFFSET( 4282, gl_dispatch_stub_336, gl_dispatch_stub_336, NULL, 336),
- NAME_FUNC_OFFSET( 4295, glBlendEquationOES, glBlendEquationOES, NULL, 337),
- NAME_FUNC_OFFSET( 4314, gl_dispatch_stub_338, gl_dispatch_stub_338, NULL, 338),
- NAME_FUNC_OFFSET( 4334, gl_dispatch_stub_339, gl_dispatch_stub_339, NULL, 339),
- NAME_FUNC_OFFSET( 4347, gl_dispatch_stub_340, gl_dispatch_stub_340, NULL, 340),
- NAME_FUNC_OFFSET( 4371, gl_dispatch_stub_341, gl_dispatch_stub_341, NULL, 341),
- NAME_FUNC_OFFSET( 4395, gl_dispatch_stub_342, gl_dispatch_stub_342, NULL, 342),
- NAME_FUNC_OFFSET( 4412, gl_dispatch_stub_343, gl_dispatch_stub_343, NULL, 343),
- NAME_FUNC_OFFSET( 4428, gl_dispatch_stub_344, gl_dispatch_stub_344, NULL, 344),
- NAME_FUNC_OFFSET( 4455, gl_dispatch_stub_345, gl_dispatch_stub_345, NULL, 345),
- NAME_FUNC_OFFSET( 4482, gl_dispatch_stub_346, gl_dispatch_stub_346, NULL, 346),
- NAME_FUNC_OFFSET( 4498, gl_dispatch_stub_347, gl_dispatch_stub_347, NULL, 347),
- NAME_FUNC_OFFSET( 4518, gl_dispatch_stub_348, gl_dispatch_stub_348, NULL, 348),
- NAME_FUNC_OFFSET( 4540, gl_dispatch_stub_349, gl_dispatch_stub_349, NULL, 349),
- NAME_FUNC_OFFSET( 4562, gl_dispatch_stub_350, gl_dispatch_stub_350, NULL, 350),
- NAME_FUNC_OFFSET( 4586, gl_dispatch_stub_351, gl_dispatch_stub_351, NULL, 351),
- NAME_FUNC_OFFSET( 4611, gl_dispatch_stub_352, gl_dispatch_stub_352, NULL, 352),
- NAME_FUNC_OFFSET( 4635, gl_dispatch_stub_353, gl_dispatch_stub_353, NULL, 353),
- NAME_FUNC_OFFSET( 4660, gl_dispatch_stub_354, gl_dispatch_stub_354, NULL, 354),
- NAME_FUNC_OFFSET( 4686, gl_dispatch_stub_355, gl_dispatch_stub_355, NULL, 355),
- NAME_FUNC_OFFSET( 4712, gl_dispatch_stub_356, gl_dispatch_stub_356, NULL, 356),
- NAME_FUNC_OFFSET( 4735, gl_dispatch_stub_357, gl_dispatch_stub_357, NULL, 357),
- NAME_FUNC_OFFSET( 4763, gl_dispatch_stub_358, gl_dispatch_stub_358, NULL, 358),
- NAME_FUNC_OFFSET( 4791, gl_dispatch_stub_359, gl_dispatch_stub_359, NULL, 359),
- NAME_FUNC_OFFSET( 4812, gl_dispatch_stub_360, gl_dispatch_stub_360, NULL, 360),
- NAME_FUNC_OFFSET( 4832, gl_dispatch_stub_361, gl_dispatch_stub_361, NULL, 361),
- NAME_FUNC_OFFSET( 4847, gl_dispatch_stub_362, gl_dispatch_stub_362, NULL, 362),
- NAME_FUNC_OFFSET( 4873, gl_dispatch_stub_363, gl_dispatch_stub_363, NULL, 363),
- NAME_FUNC_OFFSET( 4899, gl_dispatch_stub_364, gl_dispatch_stub_364, NULL, 364),
- NAME_FUNC_OFFSET( 4911, gl_dispatch_stub_365, gl_dispatch_stub_365, NULL, 365),
- NAME_FUNC_OFFSET( 4934, gl_dispatch_stub_366, gl_dispatch_stub_366, NULL, 366),
- NAME_FUNC_OFFSET( 4957, gl_dispatch_stub_367, gl_dispatch_stub_367, NULL, 367),
- NAME_FUNC_OFFSET( 4969, gl_dispatch_stub_368, gl_dispatch_stub_368, NULL, 368),
- NAME_FUNC_OFFSET( 4978, gl_dispatch_stub_369, gl_dispatch_stub_369, NULL, 369),
- NAME_FUNC_OFFSET( 4995, gl_dispatch_stub_370, gl_dispatch_stub_370, NULL, 370),
- NAME_FUNC_OFFSET( 5009, gl_dispatch_stub_371, gl_dispatch_stub_371, NULL, 371),
- NAME_FUNC_OFFSET( 5022, gl_dispatch_stub_372, gl_dispatch_stub_372, NULL, 372),
- NAME_FUNC_OFFSET( 5038, gl_dispatch_stub_373, gl_dispatch_stub_373, NULL, 373),
- NAME_FUNC_OFFSET( 5058, glActiveTexture, glActiveTexture, NULL, 374),
- NAME_FUNC_OFFSET( 5074, glClientActiveTexture, glClientActiveTexture, NULL, 375),
- NAME_FUNC_OFFSET( 5096, gl_dispatch_stub_376, gl_dispatch_stub_376, NULL, 376),
- NAME_FUNC_OFFSET( 5117, gl_dispatch_stub_377, gl_dispatch_stub_377, NULL, 377),
- NAME_FUNC_OFFSET( 5139, gl_dispatch_stub_378, gl_dispatch_stub_378, NULL, 378),
- NAME_FUNC_OFFSET( 5160, gl_dispatch_stub_379, gl_dispatch_stub_379, NULL, 379),
- NAME_FUNC_OFFSET( 5182, gl_dispatch_stub_380, gl_dispatch_stub_380, NULL, 380),
- NAME_FUNC_OFFSET( 5203, gl_dispatch_stub_381, gl_dispatch_stub_381, NULL, 381),
- NAME_FUNC_OFFSET( 5225, gl_dispatch_stub_382, gl_dispatch_stub_382, NULL, 382),
- NAME_FUNC_OFFSET( 5246, gl_dispatch_stub_383, gl_dispatch_stub_383, NULL, 383),
- NAME_FUNC_OFFSET( 5268, gl_dispatch_stub_384, gl_dispatch_stub_384, NULL, 384),
- NAME_FUNC_OFFSET( 5289, gl_dispatch_stub_385, gl_dispatch_stub_385, NULL, 385),
- NAME_FUNC_OFFSET( 5311, gl_dispatch_stub_386, gl_dispatch_stub_386, NULL, 386),
- NAME_FUNC_OFFSET( 5332, gl_dispatch_stub_387, gl_dispatch_stub_387, NULL, 387),
- NAME_FUNC_OFFSET( 5354, gl_dispatch_stub_388, gl_dispatch_stub_388, NULL, 388),
- NAME_FUNC_OFFSET( 5375, gl_dispatch_stub_389, gl_dispatch_stub_389, NULL, 389),
- NAME_FUNC_OFFSET( 5397, gl_dispatch_stub_390, gl_dispatch_stub_390, NULL, 390),
- NAME_FUNC_OFFSET( 5418, gl_dispatch_stub_391, gl_dispatch_stub_391, NULL, 391),
- NAME_FUNC_OFFSET( 5440, gl_dispatch_stub_392, gl_dispatch_stub_392, NULL, 392),
- NAME_FUNC_OFFSET( 5461, gl_dispatch_stub_393, gl_dispatch_stub_393, NULL, 393),
- NAME_FUNC_OFFSET( 5483, gl_dispatch_stub_394, gl_dispatch_stub_394, NULL, 394),
- NAME_FUNC_OFFSET( 5504, gl_dispatch_stub_395, gl_dispatch_stub_395, NULL, 395),
- NAME_FUNC_OFFSET( 5526, gl_dispatch_stub_396, gl_dispatch_stub_396, NULL, 396),
- NAME_FUNC_OFFSET( 5547, gl_dispatch_stub_397, gl_dispatch_stub_397, NULL, 397),
- NAME_FUNC_OFFSET( 5569, gl_dispatch_stub_398, gl_dispatch_stub_398, NULL, 398),
- NAME_FUNC_OFFSET( 5590, gl_dispatch_stub_399, gl_dispatch_stub_399, NULL, 399),
- NAME_FUNC_OFFSET( 5612, gl_dispatch_stub_400, gl_dispatch_stub_400, NULL, 400),
- NAME_FUNC_OFFSET( 5633, gl_dispatch_stub_401, gl_dispatch_stub_401, NULL, 401),
- NAME_FUNC_OFFSET( 5655, glMultiTexCoord4f, glMultiTexCoord4f, NULL, 402),
- NAME_FUNC_OFFSET( 5673, gl_dispatch_stub_403, gl_dispatch_stub_403, NULL, 403),
- NAME_FUNC_OFFSET( 5695, gl_dispatch_stub_404, gl_dispatch_stub_404, NULL, 404),
- NAME_FUNC_OFFSET( 5716, gl_dispatch_stub_405, gl_dispatch_stub_405, NULL, 405),
- NAME_FUNC_OFFSET( 5738, gl_dispatch_stub_406, gl_dispatch_stub_406, NULL, 406),
- NAME_FUNC_OFFSET( 5759, gl_dispatch_stub_407, gl_dispatch_stub_407, NULL, 407),
- NAME_FUNC_OFFSET( 5781, glBlendEquationSeparateOES, glBlendEquationSeparateOES, NULL, 408),
- NAME_FUNC_OFFSET( 5808, glBlendFuncSeparateOES, glBlendFuncSeparateOES, NULL, 409),
- NAME_FUNC_OFFSET( 5831, glDrawTexfOES, glDrawTexfOES, NULL, 410),
- NAME_FUNC_OFFSET( 5845, glDrawTexfvOES, glDrawTexfvOES, NULL, 411),
- NAME_FUNC_OFFSET( 5860, glDrawTexiOES, glDrawTexiOES, NULL, 412),
- NAME_FUNC_OFFSET( 5874, glDrawTexivOES, glDrawTexivOES, NULL, 413),
- NAME_FUNC_OFFSET( 5889, glDrawTexsOES, glDrawTexsOES, NULL, 414),
- NAME_FUNC_OFFSET( 5903, glDrawTexsvOES, glDrawTexsvOES, NULL, 415),
- NAME_FUNC_OFFSET( 5918, glDrawTexxOES, glDrawTexxOES, NULL, 416),
- NAME_FUNC_OFFSET( 5932, glDrawTexxvOES, glDrawTexxvOES, NULL, 417),
- NAME_FUNC_OFFSET( 5947, glBindFramebufferOES, glBindFramebufferOES, NULL, 418),
- NAME_FUNC_OFFSET( 5968, glBindRenderbufferOES, glBindRenderbufferOES, NULL, 419),
- NAME_FUNC_OFFSET( 5990, glCheckFramebufferStatusOES, glCheckFramebufferStatusOES, NULL, 420),
- NAME_FUNC_OFFSET( 6018, glDeleteFramebuffersOES, glDeleteFramebuffersOES, NULL, 421),
- NAME_FUNC_OFFSET( 6042, glDeleteRenderbuffersOES, glDeleteRenderbuffersOES, NULL, 422),
- NAME_FUNC_OFFSET( 6067, glFramebufferRenderbufferOES, glFramebufferRenderbufferOES, NULL, 423),
- NAME_FUNC_OFFSET( 6096, glFramebufferTexture2DOES, glFramebufferTexture2DOES, NULL, 424),
- NAME_FUNC_OFFSET( 6122, glGenFramebuffersOES, glGenFramebuffersOES, NULL, 425),
- NAME_FUNC_OFFSET( 6143, glGenRenderbuffersOES, glGenRenderbuffersOES, NULL, 426),
- NAME_FUNC_OFFSET( 6165, glGenerateMipmapOES, glGenerateMipmapOES, NULL, 427),
- NAME_FUNC_OFFSET( 6185, glGetFramebufferAttachmentParameterivOES, glGetFramebufferAttachmentParameterivOES, NULL, 428),
- NAME_FUNC_OFFSET( 6226, glGetRenderbufferParameterivOES, glGetRenderbufferParameterivOES, NULL, 429),
- NAME_FUNC_OFFSET( 6258, glIsFramebufferOES, glIsFramebufferOES, NULL, 430),
- NAME_FUNC_OFFSET( 6277, glIsRenderbufferOES, glIsRenderbufferOES, NULL, 431),
- NAME_FUNC_OFFSET( 6297, glRenderbufferStorageOES, glRenderbufferStorageOES, NULL, 432),
- NAME_FUNC_OFFSET( 6322, glPointSizePointerOES, glPointSizePointerOES, NULL, 433),
- NAME_FUNC_OFFSET( 6344, glQueryMatrixxOES, glQueryMatrixxOES, NULL, 434),
- NAME_FUNC_OFFSET( 6362, glGetTexGenxvOES, glGetTexGenxvOES, NULL, 435),
- NAME_FUNC_OFFSET( 6379, glTexGenxOES, glTexGenxOES, NULL, 436),
- NAME_FUNC_OFFSET( 6392, glTexGenxvOES, glTexGenxvOES, NULL, 437),
- NAME_FUNC_OFFSET( 6406, glGetBufferPointervOES, glGetBufferPointervOES, NULL, 438),
- NAME_FUNC_OFFSET( 6429, glMapBufferOES, glMapBufferOES, NULL, 439),
- NAME_FUNC_OFFSET( 6444, glUnmapBufferOES, glUnmapBufferOES, NULL, 440),
- NAME_FUNC_OFFSET( 6461, glMultiDrawArraysEXT, glMultiDrawArraysEXT, NULL, 441),
- NAME_FUNC_OFFSET( 6482, glMultiDrawElementsEXT, glMultiDrawElementsEXT, NULL, 442),
- NAME_FUNC_OFFSET( 6505, gl_dispatch_stub_443, gl_dispatch_stub_443, NULL, 443),
- NAME_FUNC_OFFSET( 6528, gl_dispatch_stub_444, gl_dispatch_stub_444, NULL, 444),
- NAME_FUNC_OFFSET( 6554, gl_dispatch_stub_445, gl_dispatch_stub_445, NULL, 445),
- NAME_FUNC_OFFSET( 6577, gl_dispatch_stub_446, gl_dispatch_stub_446, NULL, 446),
- NAME_FUNC_OFFSET( 6598, glEGLImageTargetRenderbufferStorageOES, glEGLImageTargetRenderbufferStorageOES, NULL, 447),
- NAME_FUNC_OFFSET( 6637, glEGLImageTargetTexture2DOES, glEGLImageTargetTexture2DOES, NULL, 448),
- NAME_FUNC_OFFSET( 6666, glCompressedTexImage2D, glCompressedTexImage2D, NULL, 449),
- NAME_FUNC_OFFSET( 6689, glCompressedTexSubImage2D, glCompressedTexSubImage2D, NULL, 450),
- NAME_FUNC_OFFSET( 6715, glSampleCoverage, glSampleCoverage, NULL, 451),
- NAME_FUNC_OFFSET( 6732, glBindBuffer, glBindBuffer, NULL, 452),
- NAME_FUNC_OFFSET( 6745, glBufferData, glBufferData, NULL, 453),
- NAME_FUNC_OFFSET( 6758, glBufferSubData, glBufferSubData, NULL, 454),
- NAME_FUNC_OFFSET( 6774, glDeleteBuffers, glDeleteBuffers, NULL, 455),
- NAME_FUNC_OFFSET( 6790, glGenBuffers, glGenBuffers, NULL, 456),
- NAME_FUNC_OFFSET( 6803, glGetBufferParameteriv, glGetBufferParameteriv, NULL, 457),
- NAME_FUNC_OFFSET( 6826, glIsBuffer, glIsBuffer, NULL, 458),
- NAME_FUNC_OFFSET( 6837, glPointParameterf, glPointParameterf, NULL, 459),
- NAME_FUNC_OFFSET( 6855, glPointParameterfv, glPointParameterfv, NULL, 460),
- NAME_FUNC_OFFSET( 6874, glAlphaFuncx, glAlphaFuncx, NULL, 461),
- NAME_FUNC_OFFSET( 6887, glClearColorx, glClearColorx, NULL, 462),
- NAME_FUNC_OFFSET( 6901, glClearDepthf, glClearDepthf, NULL, 463),
- NAME_FUNC_OFFSET( 6915, glClearDepthx, glClearDepthx, NULL, 464),
- NAME_FUNC_OFFSET( 6929, glColor4x, glColor4x, NULL, 465),
- NAME_FUNC_OFFSET( 6939, glDepthRangef, glDepthRangef, NULL, 466),
- NAME_FUNC_OFFSET( 6953, glDepthRangex, glDepthRangex, NULL, 467),
- NAME_FUNC_OFFSET( 6967, glFogx, glFogx, NULL, 468),
- NAME_FUNC_OFFSET( 6974, glFogxv, glFogxv, NULL, 469),
- NAME_FUNC_OFFSET( 6982, glFrustumf, glFrustumf, NULL, 470),
- NAME_FUNC_OFFSET( 6993, glFrustumx, glFrustumx, NULL, 471),
- NAME_FUNC_OFFSET( 7004, glLightModelx, glLightModelx, NULL, 472),
- NAME_FUNC_OFFSET( 7018, glLightModelxv, glLightModelxv, NULL, 473),
- NAME_FUNC_OFFSET( 7033, glLightx, glLightx, NULL, 474),
- NAME_FUNC_OFFSET( 7042, glLightxv, glLightxv, NULL, 475),
- NAME_FUNC_OFFSET( 7052, glLineWidthx, glLineWidthx, NULL, 476),
- NAME_FUNC_OFFSET( 7065, glLoadMatrixx, glLoadMatrixx, NULL, 477),
- NAME_FUNC_OFFSET( 7079, glMaterialx, glMaterialx, NULL, 478),
- NAME_FUNC_OFFSET( 7091, glMaterialxv, glMaterialxv, NULL, 479),
- NAME_FUNC_OFFSET( 7104, glMultMatrixx, glMultMatrixx, NULL, 480),
- NAME_FUNC_OFFSET( 7118, glMultiTexCoord4x, glMultiTexCoord4x, NULL, 481),
- NAME_FUNC_OFFSET( 7136, glNormal3x, glNormal3x, NULL, 482),
- NAME_FUNC_OFFSET( 7147, glOrthof, glOrthof, NULL, 483),
- NAME_FUNC_OFFSET( 7156, glOrthox, glOrthox, NULL, 484),
- NAME_FUNC_OFFSET( 7165, glPointSizex, glPointSizex, NULL, 485),
- NAME_FUNC_OFFSET( 7178, glPolygonOffsetx, glPolygonOffsetx, NULL, 486),
- NAME_FUNC_OFFSET( 7195, glRotatex, glRotatex, NULL, 487),
- NAME_FUNC_OFFSET( 7205, glSampleCoveragex, glSampleCoveragex, NULL, 488),
- NAME_FUNC_OFFSET( 7223, glScalex, glScalex, NULL, 489),
- NAME_FUNC_OFFSET( 7232, glTexEnvx, glTexEnvx, NULL, 490),
- NAME_FUNC_OFFSET( 7242, glTexEnvxv, glTexEnvxv, NULL, 491),
- NAME_FUNC_OFFSET( 7253, glTexParameterx, glTexParameterx, NULL, 492),
- NAME_FUNC_OFFSET( 7269, glTranslatex, glTranslatex, NULL, 493),
- NAME_FUNC_OFFSET( 7282, glClipPlanef, glClipPlanef, NULL, 494),
- NAME_FUNC_OFFSET( 7295, glClipPlanex, glClipPlanex, NULL, 495),
- NAME_FUNC_OFFSET( 7308, glGetClipPlanef, glGetClipPlanef, NULL, 496),
- NAME_FUNC_OFFSET( 7324, glGetClipPlanex, glGetClipPlanex, NULL, 497),
- NAME_FUNC_OFFSET( 7340, glGetFixedv, glGetFixedv, NULL, 498),
- NAME_FUNC_OFFSET( 7352, glGetLightxv, glGetLightxv, NULL, 499),
- NAME_FUNC_OFFSET( 7365, glGetMaterialxv, glGetMaterialxv, NULL, 500),
- NAME_FUNC_OFFSET( 7381, glGetTexEnvxv, glGetTexEnvxv, NULL, 501),
- NAME_FUNC_OFFSET( 7395, glGetTexParameterxv, glGetTexParameterxv, NULL, 502),
- NAME_FUNC_OFFSET( 7415, glPointParameterx, glPointParameterx, NULL, 503),
- NAME_FUNC_OFFSET( 7433, glPointParameterxv, glPointParameterxv, NULL, 504),
- NAME_FUNC_OFFSET( 7452, glTexParameterxv, glTexParameterxv, NULL, 505),
- NAME_FUNC_OFFSET( 7469, glTexGenfOES, glTexGenfOES, NULL, 190),
- NAME_FUNC_OFFSET( 7479, glTexGenfvOES, glTexGenfvOES, NULL, 191),
- NAME_FUNC_OFFSET( 7490, glTexGeniOES, glTexGeniOES, NULL, 192),
- NAME_FUNC_OFFSET( 7500, glTexGenivOES, glTexGenivOES, NULL, 193),
- NAME_FUNC_OFFSET( 7511, glGetTexGenfvOES, glGetTexGenfvOES, NULL, 279),
- NAME_FUNC_OFFSET( 7525, glGetTexGenivOES, glGetTexGenivOES, NULL, 280),
- NAME_FUNC_OFFSET( 7539, glBlendEquationOES, glBlendEquationOES, NULL, 337),
- NAME_FUNC_OFFSET( 7555, glActiveTexture, glActiveTexture, NULL, 374),
- NAME_FUNC_OFFSET( 7574, glClientActiveTexture, glClientActiveTexture, NULL, 375),
- NAME_FUNC_OFFSET( 7599, glMultiTexCoord4f, glMultiTexCoord4f, NULL, 402),
- NAME_FUNC_OFFSET( 7620, glAlphaFuncx, glAlphaFuncx, NULL, 461),
- NAME_FUNC_OFFSET( 7636, glClearColorx, glClearColorx, NULL, 462),
- NAME_FUNC_OFFSET( 7653, glClearDepthf, glClearDepthf, NULL, 463),
- NAME_FUNC_OFFSET( 7670, glClearDepthx, glClearDepthx, NULL, 464),
- NAME_FUNC_OFFSET( 7687, glColor4x, glColor4x, NULL, 465),
- NAME_FUNC_OFFSET( 7700, glDepthRangef, glDepthRangef, NULL, 466),
- NAME_FUNC_OFFSET( 7717, glDepthRangex, glDepthRangex, NULL, 467),
- NAME_FUNC_OFFSET( 7734, glFogx, glFogx, NULL, 468),
- NAME_FUNC_OFFSET( 7744, glFogxv, glFogxv, NULL, 469),
- NAME_FUNC_OFFSET( 7755, glFrustumf, glFrustumf, NULL, 470),
- NAME_FUNC_OFFSET( 7769, glFrustumx, glFrustumx, NULL, 471),
- NAME_FUNC_OFFSET( 7783, glLightModelx, glLightModelx, NULL, 472),
- NAME_FUNC_OFFSET( 7800, glLightModelxv, glLightModelxv, NULL, 473),
- NAME_FUNC_OFFSET( 7818, glLightx, glLightx, NULL, 474),
- NAME_FUNC_OFFSET( 7830, glLightxv, glLightxv, NULL, 475),
- NAME_FUNC_OFFSET( 7843, glLineWidthx, glLineWidthx, NULL, 476),
- NAME_FUNC_OFFSET( 7859, glLoadMatrixx, glLoadMatrixx, NULL, 477),
- NAME_FUNC_OFFSET( 7876, glMaterialx, glMaterialx, NULL, 478),
- NAME_FUNC_OFFSET( 7891, glMaterialxv, glMaterialxv, NULL, 479),
- NAME_FUNC_OFFSET( 7907, glMultMatrixx, glMultMatrixx, NULL, 480),
- NAME_FUNC_OFFSET( 7924, glMultiTexCoord4x, glMultiTexCoord4x, NULL, 481),
- NAME_FUNC_OFFSET( 7945, glNormal3x, glNormal3x, NULL, 482),
- NAME_FUNC_OFFSET( 7959, glOrthof, glOrthof, NULL, 483),
- NAME_FUNC_OFFSET( 7971, glOrthox, glOrthox, NULL, 484),
- NAME_FUNC_OFFSET( 7983, glPointSizex, glPointSizex, NULL, 485),
- NAME_FUNC_OFFSET( 7999, glPolygonOffsetx, glPolygonOffsetx, NULL, 486),
- NAME_FUNC_OFFSET( 8019, glRotatex, glRotatex, NULL, 487),
- NAME_FUNC_OFFSET( 8032, glSampleCoveragex, glSampleCoveragex, NULL, 488),
- NAME_FUNC_OFFSET( 8053, glScalex, glScalex, NULL, 489),
- NAME_FUNC_OFFSET( 8065, glTexEnvx, glTexEnvx, NULL, 490),
- NAME_FUNC_OFFSET( 8078, glTexEnvxv, glTexEnvxv, NULL, 491),
- NAME_FUNC_OFFSET( 8092, glTexParameterx, glTexParameterx, NULL, 492),
- NAME_FUNC_OFFSET( 8111, glTranslatex, glTranslatex, NULL, 493),
- NAME_FUNC_OFFSET( 8127, glClipPlanef, glClipPlanef, NULL, 494),
- NAME_FUNC_OFFSET( 8143, glClipPlanex, glClipPlanex, NULL, 495),
- NAME_FUNC_OFFSET( 8159, glGetClipPlanef, glGetClipPlanef, NULL, 496),
- NAME_FUNC_OFFSET( 8178, glGetClipPlanex, glGetClipPlanex, NULL, 497),
- NAME_FUNC_OFFSET( 8197, glGetFixedv, glGetFixedv, NULL, 498),
- NAME_FUNC_OFFSET( 8212, glGetLightxv, glGetLightxv, NULL, 499),
- NAME_FUNC_OFFSET( 8228, glGetMaterialxv, glGetMaterialxv, NULL, 500),
- NAME_FUNC_OFFSET( 8247, glGetTexEnvxv, glGetTexEnvxv, NULL, 501),
- NAME_FUNC_OFFSET( 8264, glGetTexParameterxv, glGetTexParameterxv, NULL, 502),
- NAME_FUNC_OFFSET( 8287, glPointParameterx, glPointParameterx, NULL, 503),
- NAME_FUNC_OFFSET( 8308, glPointParameterxv, glPointParameterxv, NULL, 504),
- NAME_FUNC_OFFSET( 8330, glTexParameterxv, glTexParameterxv, NULL, 505),
- NAME_FUNC_OFFSET(-1, NULL, NULL, NULL, 0)
-};
-
-#undef NAME_FUNC_OFFSET
diff --git a/src/mapi/es1api/glapi_mapi_tmp.h b/src/mapi/es1api/glapi_mapi_tmp.h
new file mode 100644
index 00000000000..28dafc34435
--- /dev/null
+++ b/src/mapi/es1api/glapi_mapi_tmp.h
@@ -0,0 +1,3394 @@
+/* This file is automatically generated by mapi_abi.py. Do not modify. */
+
+#ifndef _GLAPI_TMP_H_
+#define _GLAPI_TMP_H_
+typedef int GLfixed;
+typedef int GLclampx;
+#endif /* _GLAPI_TMP_H_ */
+
+#ifdef MAPI_TMP_DEFINES
+#define GL_GLEXT_PROTOTYPES
+#include "GL/gl.h"
+#include "GL/glext.h"
+
+void APIENTRY gl_dispatch_stub_0(GLuint list, GLenum mode);
+void APIENTRY gl_dispatch_stub_1(void);
+void APIENTRY gl_dispatch_stub_2(GLuint list);
+void APIENTRY gl_dispatch_stub_3(GLsizei n, GLenum type, const GLvoid *lists);
+void APIENTRY gl_dispatch_stub_4(GLuint list, GLsizei range);
+GLuint APIENTRY gl_dispatch_stub_5(GLsizei range);
+void APIENTRY gl_dispatch_stub_6(GLuint base);
+void APIENTRY gl_dispatch_stub_7(GLenum mode);
+void APIENTRY gl_dispatch_stub_8(GLsizei width, GLsizei height, GLfloat xorig, GLfloat yorig, GLfloat xmove, GLfloat ymove, const GLubyte *bitmap);
+void APIENTRY gl_dispatch_stub_9(GLbyte red, GLbyte green, GLbyte blue);
+void APIENTRY gl_dispatch_stub_10(const GLbyte *v);
+void APIENTRY gl_dispatch_stub_11(GLdouble red, GLdouble green, GLdouble blue);
+void APIENTRY gl_dispatch_stub_12(const GLdouble *v);
+void APIENTRY gl_dispatch_stub_13(GLfloat red, GLfloat green, GLfloat blue);
+void APIENTRY gl_dispatch_stub_14(const GLfloat *v);
+void APIENTRY gl_dispatch_stub_15(GLint red, GLint green, GLint blue);
+void APIENTRY gl_dispatch_stub_16(const GLint *v);
+void APIENTRY gl_dispatch_stub_17(GLshort red, GLshort green, GLshort blue);
+void APIENTRY gl_dispatch_stub_18(const GLshort *v);
+void APIENTRY gl_dispatch_stub_19(GLubyte red, GLubyte green, GLubyte blue);
+void APIENTRY gl_dispatch_stub_20(const GLubyte *v);
+void APIENTRY gl_dispatch_stub_21(GLuint red, GLuint green, GLuint blue);
+void APIENTRY gl_dispatch_stub_22(const GLuint *v);
+void APIENTRY gl_dispatch_stub_23(GLushort red, GLushort green, GLushort blue);
+void APIENTRY gl_dispatch_stub_24(const GLushort *v);
+void APIENTRY gl_dispatch_stub_25(GLbyte red, GLbyte green, GLbyte blue, GLbyte alpha);
+void APIENTRY gl_dispatch_stub_26(const GLbyte *v);
+void APIENTRY gl_dispatch_stub_27(GLdouble red, GLdouble green, GLdouble blue, GLdouble alpha);
+void APIENTRY gl_dispatch_stub_28(const GLdouble *v);
+GLAPI void APIENTRY glColor4f(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
+void APIENTRY gl_dispatch_stub_30(const GLfloat *v);
+void APIENTRY gl_dispatch_stub_31(GLint red, GLint green, GLint blue, GLint alpha);
+void APIENTRY gl_dispatch_stub_32(const GLint *v);
+void APIENTRY gl_dispatch_stub_33(GLshort red, GLshort green, GLshort blue, GLshort alpha);
+void APIENTRY gl_dispatch_stub_34(const GLshort *v);
+GLAPI void APIENTRY glColor4ub(GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha);
+void APIENTRY gl_dispatch_stub_36(const GLubyte *v);
+void APIENTRY gl_dispatch_stub_37(GLuint red, GLuint green, GLuint blue, GLuint alpha);
+void APIENTRY gl_dispatch_stub_38(const GLuint *v);
+void APIENTRY gl_dispatch_stub_39(GLushort red, GLushort green, GLushort blue, GLushort alpha);
+void APIENTRY gl_dispatch_stub_40(const GLushort *v);
+void APIENTRY gl_dispatch_stub_41(GLboolean flag);
+void APIENTRY gl_dispatch_stub_42(const GLboolean *flag);
+void APIENTRY gl_dispatch_stub_43(void);
+void APIENTRY gl_dispatch_stub_44(GLdouble c);
+void APIENTRY gl_dispatch_stub_45(const GLdouble *c);
+void APIENTRY gl_dispatch_stub_46(GLfloat c);
+void APIENTRY gl_dispatch_stub_47(const GLfloat *c);
+void APIENTRY gl_dispatch_stub_48(GLint c);
+void APIENTRY gl_dispatch_stub_49(const GLint *c);
+void APIENTRY gl_dispatch_stub_50(GLshort c);
+void APIENTRY gl_dispatch_stub_51(const GLshort *c);
+void APIENTRY gl_dispatch_stub_52(GLbyte nx, GLbyte ny, GLbyte nz);
+void APIENTRY gl_dispatch_stub_53(const GLbyte *v);
+void APIENTRY gl_dispatch_stub_54(GLdouble nx, GLdouble ny, GLdouble nz);
+void APIENTRY gl_dispatch_stub_55(const GLdouble *v);
+GLAPI void APIENTRY glNormal3f(GLfloat nx, GLfloat ny, GLfloat nz);
+void APIENTRY gl_dispatch_stub_57(const GLfloat *v);
+void APIENTRY gl_dispatch_stub_58(GLint nx, GLint ny, GLint nz);
+void APIENTRY gl_dispatch_stub_59(const GLint *v);
+void APIENTRY gl_dispatch_stub_60(GLshort nx, GLshort ny, GLshort nz);
+void APIENTRY gl_dispatch_stub_61(const GLshort *v);
+void APIENTRY gl_dispatch_stub_62(GLdouble x, GLdouble y);
+void APIENTRY gl_dispatch_stub_63(const GLdouble *v);
+void APIENTRY gl_dispatch_stub_64(GLfloat x, GLfloat y);
+void APIENTRY gl_dispatch_stub_65(const GLfloat *v);
+void APIENTRY gl_dispatch_stub_66(GLint x, GLint y);
+void APIENTRY gl_dispatch_stub_67(const GLint *v);
+void APIENTRY gl_dispatch_stub_68(GLshort x, GLshort y);
+void APIENTRY gl_dispatch_stub_69(const GLshort *v);
+void APIENTRY gl_dispatch_stub_70(GLdouble x, GLdouble y, GLdouble z);
+void APIENTRY gl_dispatch_stub_71(const GLdouble *v);
+void APIENTRY gl_dispatch_stub_72(GLfloat x, GLfloat y, GLfloat z);
+void APIENTRY gl_dispatch_stub_73(const GLfloat *v);
+void APIENTRY gl_dispatch_stub_74(GLint x, GLint y, GLint z);
+void APIENTRY gl_dispatch_stub_75(const GLint *v);
+void APIENTRY gl_dispatch_stub_76(GLshort x, GLshort y, GLshort z);
+void APIENTRY gl_dispatch_stub_77(const GLshort *v);
+void APIENTRY gl_dispatch_stub_78(GLdouble x, GLdouble y, GLdouble z, GLdouble w);
+void APIENTRY gl_dispatch_stub_79(const GLdouble *v);
+void APIENTRY gl_dispatch_stub_80(GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+void APIENTRY gl_dispatch_stub_81(const GLfloat *v);
+void APIENTRY gl_dispatch_stub_82(GLint x, GLint y, GLint z, GLint w);
+void APIENTRY gl_dispatch_stub_83(const GLint *v);
+void APIENTRY gl_dispatch_stub_84(GLshort x, GLshort y, GLshort z, GLshort w);
+void APIENTRY gl_dispatch_stub_85(const GLshort *v);
+void APIENTRY gl_dispatch_stub_86(GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2);
+void APIENTRY gl_dispatch_stub_87(const GLdouble *v1, const GLdouble *v2);
+void APIENTRY gl_dispatch_stub_88(GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2);
+void APIENTRY gl_dispatch_stub_89(const GLfloat *v1, const GLfloat *v2);
+void APIENTRY gl_dispatch_stub_90(GLint x1, GLint y1, GLint x2, GLint y2);
+void APIENTRY gl_dispatch_stub_91(const GLint *v1, const GLint *v2);
+void APIENTRY gl_dispatch_stub_92(GLshort x1, GLshort y1, GLshort x2, GLshort y2);
+void APIENTRY gl_dispatch_stub_93(const GLshort *v1, const GLshort *v2);
+void APIENTRY gl_dispatch_stub_94(GLdouble s);
+void APIENTRY gl_dispatch_stub_95(const GLdouble *v);
+void APIENTRY gl_dispatch_stub_96(GLfloat s);
+void APIENTRY gl_dispatch_stub_97(const GLfloat *v);
+void APIENTRY gl_dispatch_stub_98(GLint s);
+void APIENTRY gl_dispatch_stub_99(const GLint *v);
+void APIENTRY gl_dispatch_stub_100(GLshort s);
+void APIENTRY gl_dispatch_stub_101(const GLshort *v);
+void APIENTRY gl_dispatch_stub_102(GLdouble s, GLdouble t);
+void APIENTRY gl_dispatch_stub_103(const GLdouble *v);
+void APIENTRY gl_dispatch_stub_104(GLfloat s, GLfloat t);
+void APIENTRY gl_dispatch_stub_105(const GLfloat *v);
+void APIENTRY gl_dispatch_stub_106(GLint s, GLint t);
+void APIENTRY gl_dispatch_stub_107(const GLint *v);
+void APIENTRY gl_dispatch_stub_108(GLshort s, GLshort t);
+void APIENTRY gl_dispatch_stub_109(const GLshort *v);
+void APIENTRY gl_dispatch_stub_110(GLdouble s, GLdouble t, GLdouble r);
+void APIENTRY gl_dispatch_stub_111(const GLdouble *v);
+void APIENTRY gl_dispatch_stub_112(GLfloat s, GLfloat t, GLfloat r);
+void APIENTRY gl_dispatch_stub_113(const GLfloat *v);
+void APIENTRY gl_dispatch_stub_114(GLint s, GLint t, GLint r);
+void APIENTRY gl_dispatch_stub_115(const GLint *v);
+void APIENTRY gl_dispatch_stub_116(GLshort s, GLshort t, GLshort r);
+void APIENTRY gl_dispatch_stub_117(const GLshort *v);
+void APIENTRY gl_dispatch_stub_118(GLdouble s, GLdouble t, GLdouble r, GLdouble q);
+void APIENTRY gl_dispatch_stub_119(const GLdouble *v);
+void APIENTRY gl_dispatch_stub_120(GLfloat s, GLfloat t, GLfloat r, GLfloat q);
+void APIENTRY gl_dispatch_stub_121(const GLfloat *v);
+void APIENTRY gl_dispatch_stub_122(GLint s, GLint t, GLint r, GLint q);
+void APIENTRY gl_dispatch_stub_123(const GLint *v);
+void APIENTRY gl_dispatch_stub_124(GLshort s, GLshort t, GLshort r, GLshort q);
+void APIENTRY gl_dispatch_stub_125(const GLshort *v);
+void APIENTRY gl_dispatch_stub_126(GLdouble x, GLdouble y);
+void APIENTRY gl_dispatch_stub_127(const GLdouble *v);
+void APIENTRY gl_dispatch_stub_128(GLfloat x, GLfloat y);
+void APIENTRY gl_dispatch_stub_129(const GLfloat *v);
+void APIENTRY gl_dispatch_stub_130(GLint x, GLint y);
+void APIENTRY gl_dispatch_stub_131(const GLint *v);
+void APIENTRY gl_dispatch_stub_132(GLshort x, GLshort y);
+void APIENTRY gl_dispatch_stub_133(const GLshort *v);
+void APIENTRY gl_dispatch_stub_134(GLdouble x, GLdouble y, GLdouble z);
+void APIENTRY gl_dispatch_stub_135(const GLdouble *v);
+void APIENTRY gl_dispatch_stub_136(GLfloat x, GLfloat y, GLfloat z);
+void APIENTRY gl_dispatch_stub_137(const GLfloat *v);
+void APIENTRY gl_dispatch_stub_138(GLint x, GLint y, GLint z);
+void APIENTRY gl_dispatch_stub_139(const GLint *v);
+void APIENTRY gl_dispatch_stub_140(GLshort x, GLshort y, GLshort z);
+void APIENTRY gl_dispatch_stub_141(const GLshort *v);
+void APIENTRY gl_dispatch_stub_142(GLdouble x, GLdouble y, GLdouble z, GLdouble w);
+void APIENTRY gl_dispatch_stub_143(const GLdouble *v);
+void APIENTRY gl_dispatch_stub_144(GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+void APIENTRY gl_dispatch_stub_145(const GLfloat *v);
+void APIENTRY gl_dispatch_stub_146(GLint x, GLint y, GLint z, GLint w);
+void APIENTRY gl_dispatch_stub_147(const GLint *v);
+void APIENTRY gl_dispatch_stub_148(GLshort x, GLshort y, GLshort z, GLshort w);
+void APIENTRY gl_dispatch_stub_149(const GLshort *v);
+void APIENTRY gl_dispatch_stub_150(GLenum plane, const GLdouble *equation);
+void APIENTRY gl_dispatch_stub_151(GLenum face, GLenum mode);
+GLAPI void APIENTRY glCullFace(GLenum mode);
+GLAPI void APIENTRY glFogf(GLenum pname, GLfloat param);
+GLAPI void APIENTRY glFogfv(GLenum pname, const GLfloat *params);
+void APIENTRY gl_dispatch_stub_155(GLenum pname, GLint param);
+void APIENTRY gl_dispatch_stub_156(GLenum pname, const GLint *params);
+GLAPI void APIENTRY glFrontFace(GLenum mode);
+GLAPI void APIENTRY glHint(GLenum target, GLenum mode);
+GLAPI void APIENTRY glLightf(GLenum light, GLenum pname, GLfloat param);
+GLAPI void APIENTRY glLightfv(GLenum light, GLenum pname, const GLfloat *params);
+void APIENTRY gl_dispatch_stub_161(GLenum light, GLenum pname, GLint param);
+void APIENTRY gl_dispatch_stub_162(GLenum light, GLenum pname, const GLint *params);
+GLAPI void APIENTRY glLightModelf(GLenum pname, GLfloat param);
+GLAPI void APIENTRY glLightModelfv(GLenum pname, const GLfloat *params);
+void APIENTRY gl_dispatch_stub_165(GLenum pname, GLint param);
+void APIENTRY gl_dispatch_stub_166(GLenum pname, const GLint *params);
+void APIENTRY gl_dispatch_stub_167(GLint factor, GLushort pattern);
+GLAPI void APIENTRY glLineWidth(GLfloat width);
+GLAPI void APIENTRY glMaterialf(GLenum face, GLenum pname, GLfloat param);
+GLAPI void APIENTRY glMaterialfv(GLenum face, GLenum pname, const GLfloat *params);
+void APIENTRY gl_dispatch_stub_171(GLenum face, GLenum pname, GLint param);
+void APIENTRY gl_dispatch_stub_172(GLenum face, GLenum pname, const GLint *params);
+GLAPI void APIENTRY glPointSize(GLfloat size);
+void APIENTRY gl_dispatch_stub_174(GLenum face, GLenum mode);
+void APIENTRY gl_dispatch_stub_175(const GLubyte *mask);
+GLAPI void APIENTRY glScissor(GLint x, GLint y, GLsizei width, GLsizei height);
+GLAPI void APIENTRY glShadeModel(GLenum mode);
+GLAPI void APIENTRY glTexParameterf(GLenum target, GLenum pname, GLfloat param);
+GLAPI void APIENTRY glTexParameterfv(GLenum target, GLenum pname, const GLfloat *params);
+GLAPI void APIENTRY glTexParameteri(GLenum target, GLenum pname, GLint param);
+GLAPI void APIENTRY glTexParameteriv(GLenum target, GLenum pname, const GLint *params);
+void APIENTRY gl_dispatch_stub_182(GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid *pixels);
+GLAPI void APIENTRY glTexImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels);
+GLAPI void APIENTRY glTexEnvf(GLenum target, GLenum pname, GLfloat param);
+GLAPI void APIENTRY glTexEnvfv(GLenum target, GLenum pname, const GLfloat *params);
+GLAPI void APIENTRY glTexEnvi(GLenum target, GLenum pname, GLint param);
+GLAPI void APIENTRY glTexEnviv(GLenum target, GLenum pname, const GLint *params);
+void APIENTRY gl_dispatch_stub_188(GLenum coord, GLenum pname, GLdouble param);
+void APIENTRY gl_dispatch_stub_189(GLenum coord, GLenum pname, const GLdouble *params);
+void APIENTRY gl_dispatch_stub_190(GLenum coord, GLenum pname, GLfloat param);
+GLAPI void APIENTRY glTexGenfOES(GLenum coord, GLenum pname, GLfloat param);
+void APIENTRY gl_dispatch_stub_191(GLenum coord, GLenum pname, const GLfloat *params);
+GLAPI void APIENTRY glTexGenfvOES(GLenum coord, GLenum pname, const GLfloat *params);
+void APIENTRY gl_dispatch_stub_192(GLenum coord, GLenum pname, GLint param);
+GLAPI void APIENTRY glTexGeniOES(GLenum coord, GLenum pname, GLint param);
+void APIENTRY gl_dispatch_stub_193(GLenum coord, GLenum pname, const GLint *params);
+GLAPI void APIENTRY glTexGenivOES(GLenum coord, GLenum pname, const GLint *params);
+void APIENTRY gl_dispatch_stub_194(GLsizei size, GLenum type, GLfloat *buffer);
+void APIENTRY gl_dispatch_stub_195(GLsizei size, GLuint *buffer);
+GLint APIENTRY gl_dispatch_stub_196(GLenum mode);
+void APIENTRY gl_dispatch_stub_197(void);
+void APIENTRY gl_dispatch_stub_198(GLuint name);
+void APIENTRY gl_dispatch_stub_199(GLfloat token);
+void APIENTRY gl_dispatch_stub_200(void);
+void APIENTRY gl_dispatch_stub_201(GLuint name);
+void APIENTRY gl_dispatch_stub_202(GLenum mode);
+GLAPI void APIENTRY glClear(GLbitfield mask);
+void APIENTRY gl_dispatch_stub_204(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
+void APIENTRY gl_dispatch_stub_205(GLfloat c);
+GLAPI void APIENTRY glClearColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
+GLAPI void APIENTRY glClearStencil(GLint s);
+void APIENTRY gl_dispatch_stub_208(GLclampd depth);
+GLAPI void APIENTRY glStencilMask(GLuint mask);
+GLAPI void APIENTRY glColorMask(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
+GLAPI void APIENTRY glDepthMask(GLboolean flag);
+void APIENTRY gl_dispatch_stub_212(GLuint mask);
+void APIENTRY gl_dispatch_stub_213(GLenum op, GLfloat value);
+GLAPI void APIENTRY glDisable(GLenum cap);
+GLAPI void APIENTRY glEnable(GLenum cap);
+GLAPI void APIENTRY glFinish(void);
+GLAPI void APIENTRY glFlush(void);
+void APIENTRY gl_dispatch_stub_218(void);
+void APIENTRY gl_dispatch_stub_219(GLbitfield mask);
+void APIENTRY gl_dispatch_stub_220(GLenum target, GLdouble u1, GLdouble u2, GLint stride, GLint order, const GLdouble *points);
+void APIENTRY gl_dispatch_stub_221(GLenum target, GLfloat u1, GLfloat u2, GLint stride, GLint order, const GLfloat *points);
+void APIENTRY gl_dispatch_stub_222(GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, const GLdouble *points);
+void APIENTRY gl_dispatch_stub_223(GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, const GLfloat *points);
+void APIENTRY gl_dispatch_stub_224(GLint un, GLdouble u1, GLdouble u2);
+void APIENTRY gl_dispatch_stub_225(GLint un, GLfloat u1, GLfloat u2);
+void APIENTRY gl_dispatch_stub_226(GLint un, GLdouble u1, GLdouble u2, GLint vn, GLdouble v1, GLdouble v2);
+void APIENTRY gl_dispatch_stub_227(GLint un, GLfloat u1, GLfloat u2, GLint vn, GLfloat v1, GLfloat v2);
+void APIENTRY gl_dispatch_stub_228(GLdouble u);
+void APIENTRY gl_dispatch_stub_229(const GLdouble *u);
+void APIENTRY gl_dispatch_stub_230(GLfloat u);
+void APIENTRY gl_dispatch_stub_231(const GLfloat *u);
+void APIENTRY gl_dispatch_stub_232(GLdouble u, GLdouble v);
+void APIENTRY gl_dispatch_stub_233(const GLdouble *u);
+void APIENTRY gl_dispatch_stub_234(GLfloat u, GLfloat v);
+void APIENTRY gl_dispatch_stub_235(const GLfloat *u);
+void APIENTRY gl_dispatch_stub_236(GLenum mode, GLint i1, GLint i2);
+void APIENTRY gl_dispatch_stub_237(GLint i);
+void APIENTRY gl_dispatch_stub_238(GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2);
+void APIENTRY gl_dispatch_stub_239(GLint i, GLint j);
+GLAPI void APIENTRY glAlphaFunc(GLenum func, GLclampf ref);
+GLAPI void APIENTRY glBlendFunc(GLenum sfactor, GLenum dfactor);
+GLAPI void APIENTRY glLogicOp(GLenum opcode);
+GLAPI void APIENTRY glStencilFunc(GLenum func, GLint ref, GLuint mask);
+GLAPI void APIENTRY glStencilOp(GLenum fail, GLenum zfail, GLenum zpass);
+GLAPI void APIENTRY glDepthFunc(GLenum func);
+void APIENTRY gl_dispatch_stub_246(GLfloat xfactor, GLfloat yfactor);
+void APIENTRY gl_dispatch_stub_247(GLenum pname, GLfloat param);
+void APIENTRY gl_dispatch_stub_248(GLenum pname, GLint param);
+void APIENTRY gl_dispatch_stub_249(GLenum pname, GLfloat param);
+GLAPI void APIENTRY glPixelStorei(GLenum pname, GLint param);
+void APIENTRY gl_dispatch_stub_251(GLenum map, GLsizei mapsize, const GLfloat *values);
+void APIENTRY gl_dispatch_stub_252(GLenum map, GLsizei mapsize, const GLuint *values);
+void APIENTRY gl_dispatch_stub_253(GLenum map, GLsizei mapsize, const GLushort *values);
+void APIENTRY gl_dispatch_stub_254(GLenum mode);
+void APIENTRY gl_dispatch_stub_255(GLint x, GLint y, GLsizei width, GLsizei height, GLenum type);
+GLAPI void APIENTRY glReadPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels);
+void APIENTRY gl_dispatch_stub_257(GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels);
+GLAPI void APIENTRY glGetBooleanv(GLenum pname, GLboolean *params);
+void APIENTRY gl_dispatch_stub_259(GLenum plane, GLdouble *equation);
+void APIENTRY gl_dispatch_stub_260(GLenum pname, GLdouble *params);
+GLAPI GLenum APIENTRY glGetError(void);
+GLAPI void APIENTRY glGetFloatv(GLenum pname, GLfloat *params);
+GLAPI void APIENTRY glGetIntegerv(GLenum pname, GLint *params);
+GLAPI void APIENTRY glGetLightfv(GLenum light, GLenum pname, GLfloat *params);
+void APIENTRY gl_dispatch_stub_265(GLenum light, GLenum pname, GLint *params);
+void APIENTRY gl_dispatch_stub_266(GLenum target, GLenum query, GLdouble *v);
+void APIENTRY gl_dispatch_stub_267(GLenum target, GLenum query, GLfloat *v);
+void APIENTRY gl_dispatch_stub_268(GLenum target, GLenum query, GLint *v);
+GLAPI void APIENTRY glGetMaterialfv(GLenum face, GLenum pname, GLfloat *params);
+void APIENTRY gl_dispatch_stub_270(GLenum face, GLenum pname, GLint *params);
+void APIENTRY gl_dispatch_stub_271(GLenum map, GLfloat *values);
+void APIENTRY gl_dispatch_stub_272(GLenum map, GLuint *values);
+void APIENTRY gl_dispatch_stub_273(GLenum map, GLushort *values);
+void APIENTRY gl_dispatch_stub_274(GLubyte *mask);
+GLAPI const GLubyte * APIENTRY glGetString(GLenum name);
+GLAPI void APIENTRY glGetTexEnvfv(GLenum target, GLenum pname, GLfloat *params);
+GLAPI void APIENTRY glGetTexEnviv(GLenum target, GLenum pname, GLint *params);
+void APIENTRY gl_dispatch_stub_278(GLenum coord, GLenum pname, GLdouble *params);
+void APIENTRY gl_dispatch_stub_279(GLenum coord, GLenum pname, GLfloat *params);
+GLAPI void APIENTRY glGetTexGenfvOES(GLenum coord, GLenum pname, GLfloat *params);
+void APIENTRY gl_dispatch_stub_280(GLenum coord, GLenum pname, GLint *params);
+GLAPI void APIENTRY glGetTexGenivOES(GLenum coord, GLenum pname, GLint *params);
+void APIENTRY gl_dispatch_stub_281(GLenum target, GLint level, GLenum format, GLenum type, GLvoid *pixels);
+GLAPI void APIENTRY glGetTexParameterfv(GLenum target, GLenum pname, GLfloat *params);
+GLAPI void APIENTRY glGetTexParameteriv(GLenum target, GLenum pname, GLint *params);
+void APIENTRY gl_dispatch_stub_284(GLenum target, GLint level, GLenum pname, GLfloat *params);
+void APIENTRY gl_dispatch_stub_285(GLenum target, GLint level, GLenum pname, GLint *params);
+GLAPI GLboolean APIENTRY glIsEnabled(GLenum cap);
+GLboolean APIENTRY gl_dispatch_stub_287(GLuint list);
+void APIENTRY gl_dispatch_stub_288(GLclampd zNear, GLclampd zFar);
+void APIENTRY gl_dispatch_stub_289(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar);
+GLAPI void APIENTRY glLoadIdentity(void);
+GLAPI void APIENTRY glLoadMatrixf(const GLfloat *m);
+void APIENTRY gl_dispatch_stub_292(const GLdouble *m);
+GLAPI void APIENTRY glMatrixMode(GLenum mode);
+GLAPI void APIENTRY glMultMatrixf(const GLfloat *m);
+void APIENTRY gl_dispatch_stub_295(const GLdouble *m);
+void APIENTRY gl_dispatch_stub_296(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar);
+GLAPI void APIENTRY glPopMatrix(void);
+GLAPI void APIENTRY glPushMatrix(void);
+void APIENTRY gl_dispatch_stub_299(GLdouble angle, GLdouble x, GLdouble y, GLdouble z);
+GLAPI void APIENTRY glRotatef(GLfloat angle, GLfloat x, GLfloat y, GLfloat z);
+void APIENTRY gl_dispatch_stub_301(GLdouble x, GLdouble y, GLdouble z);
+GLAPI void APIENTRY glScalef(GLfloat x, GLfloat y, GLfloat z);
+void APIENTRY gl_dispatch_stub_303(GLdouble x, GLdouble y, GLdouble z);
+GLAPI void APIENTRY glTranslatef(GLfloat x, GLfloat y, GLfloat z);
+GLAPI void APIENTRY glViewport(GLint x, GLint y, GLsizei width, GLsizei height);
+void APIENTRY gl_dispatch_stub_306(GLint i);
+GLAPI void APIENTRY glBindTexture(GLenum target, GLuint texture);
+GLAPI void APIENTRY glColorPointer(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
+GLAPI void APIENTRY glDisableClientState(GLenum array);
+GLAPI void APIENTRY glDrawArrays(GLenum mode, GLint first, GLsizei count);
+GLAPI void APIENTRY glDrawElements(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices);
+void APIENTRY gl_dispatch_stub_312(GLsizei stride, const GLvoid *pointer);
+GLAPI void APIENTRY glEnableClientState(GLenum array);
+void APIENTRY gl_dispatch_stub_314(GLenum type, GLsizei stride, const GLvoid *pointer);
+void APIENTRY gl_dispatch_stub_315(GLubyte c);
+void APIENTRY gl_dispatch_stub_316(const GLubyte *c);
+void APIENTRY gl_dispatch_stub_317(GLenum format, GLsizei stride, const GLvoid *pointer);
+GLAPI void APIENTRY glNormalPointer(GLenum type, GLsizei stride, const GLvoid *pointer);
+GLAPI void APIENTRY glPolygonOffset(GLfloat factor, GLfloat units);
+GLAPI void APIENTRY glTexCoordPointer(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
+GLAPI void APIENTRY glVertexPointer(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
+GLboolean APIENTRY gl_dispatch_stub_322(GLsizei n, const GLuint *textures, GLboolean *residences);
+void APIENTRY gl_dispatch_stub_323(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border);
+GLAPI void APIENTRY glCopyTexImage2D(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
+void APIENTRY gl_dispatch_stub_325(GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width);
+GLAPI void APIENTRY glCopyTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
+GLAPI void APIENTRY glDeleteTextures(GLsizei n, const GLuint *textures);
+GLAPI void APIENTRY glGenTextures(GLsizei n, GLuint *textures);
+GLAPI void APIENTRY glGetPointerv(GLenum pname, GLvoid **params);
+GLAPI GLboolean APIENTRY glIsTexture(GLuint texture);
+void APIENTRY gl_dispatch_stub_331(GLsizei n, const GLuint *textures, const GLclampf *priorities);
+void APIENTRY gl_dispatch_stub_332(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels);
+GLAPI void APIENTRY glTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels);
+void APIENTRY gl_dispatch_stub_334(void);
+void APIENTRY gl_dispatch_stub_335(GLbitfield mask);
+void APIENTRY gl_dispatch_stub_336(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
+void APIENTRY gl_dispatch_stub_337(GLenum mode);
+GLAPI void APIENTRY glBlendEquationOES(GLenum mode);
+void APIENTRY gl_dispatch_stub_338(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices);
+void APIENTRY gl_dispatch_stub_339(GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *table);
+void APIENTRY gl_dispatch_stub_340(GLenum target, GLenum pname, const GLfloat *params);
+void APIENTRY gl_dispatch_stub_341(GLenum target, GLenum pname, const GLint *params);
+void APIENTRY gl_dispatch_stub_342(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
+void APIENTRY gl_dispatch_stub_343(GLenum target, GLenum format, GLenum type, GLvoid *table);
+void APIENTRY gl_dispatch_stub_344(GLenum target, GLenum pname, GLfloat *params);
+void APIENTRY gl_dispatch_stub_345(GLenum target, GLenum pname, GLint *params);
+void APIENTRY gl_dispatch_stub_346(GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid *data);
+void APIENTRY gl_dispatch_stub_347(GLenum target, GLsizei start, GLint x, GLint y, GLsizei width);
+void APIENTRY gl_dispatch_stub_348(GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *image);
+void APIENTRY gl_dispatch_stub_349(GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *image);
+void APIENTRY gl_dispatch_stub_350(GLenum target, GLenum pname, GLfloat params);
+void APIENTRY gl_dispatch_stub_351(GLenum target, GLenum pname, const GLfloat *params);
+void APIENTRY gl_dispatch_stub_352(GLenum target, GLenum pname, GLint params);
+void APIENTRY gl_dispatch_stub_353(GLenum target, GLenum pname, const GLint *params);
+void APIENTRY gl_dispatch_stub_354(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
+void APIENTRY gl_dispatch_stub_355(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height);
+void APIENTRY gl_dispatch_stub_356(GLenum target, GLenum format, GLenum type, GLvoid *image);
+void APIENTRY gl_dispatch_stub_357(GLenum target, GLenum pname, GLfloat *params);
+void APIENTRY gl_dispatch_stub_358(GLenum target, GLenum pname, GLint *params);
+void APIENTRY gl_dispatch_stub_359(GLenum target, GLenum format, GLenum type, GLvoid *row, GLvoid *column, GLvoid *span);
+void APIENTRY gl_dispatch_stub_360(GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *row, const GLvoid *column);
+void APIENTRY gl_dispatch_stub_361(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values);
+void APIENTRY gl_dispatch_stub_362(GLenum target, GLenum pname, GLfloat *params);
+void APIENTRY gl_dispatch_stub_363(GLenum target, GLenum pname, GLint *params);
+void APIENTRY gl_dispatch_stub_364(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values);
+void APIENTRY gl_dispatch_stub_365(GLenum target, GLenum pname, GLfloat *params);
+void APIENTRY gl_dispatch_stub_366(GLenum target, GLenum pname, GLint *params);
+void APIENTRY gl_dispatch_stub_367(GLenum target, GLsizei width, GLenum internalformat, GLboolean sink);
+void APIENTRY gl_dispatch_stub_368(GLenum target, GLenum internalformat, GLboolean sink);
+void APIENTRY gl_dispatch_stub_369(GLenum target);
+void APIENTRY gl_dispatch_stub_370(GLenum target);
+void APIENTRY gl_dispatch_stub_371(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels);
+void APIENTRY gl_dispatch_stub_372(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels);
+void APIENTRY gl_dispatch_stub_373(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
+void APIENTRY gl_dispatch_stub_374(GLenum texture);
+GLAPI void APIENTRY glActiveTexture(GLenum texture);
+void APIENTRY gl_dispatch_stub_375(GLenum texture);
+GLAPI void APIENTRY glClientActiveTexture(GLenum texture);
+void APIENTRY gl_dispatch_stub_376(GLenum target, GLdouble s);
+void APIENTRY gl_dispatch_stub_377(GLenum target, const GLdouble *v);
+void APIENTRY gl_dispatch_stub_378(GLenum target, GLfloat s);
+void APIENTRY gl_dispatch_stub_379(GLenum target, const GLfloat *v);
+void APIENTRY gl_dispatch_stub_380(GLenum target, GLint s);
+void APIENTRY gl_dispatch_stub_381(GLenum target, const GLint *v);
+void APIENTRY gl_dispatch_stub_382(GLenum target, GLshort s);
+void APIENTRY gl_dispatch_stub_383(GLenum target, const GLshort *v);
+void APIENTRY gl_dispatch_stub_384(GLenum target, GLdouble s, GLdouble t);
+void APIENTRY gl_dispatch_stub_385(GLenum target, const GLdouble *v);
+void APIENTRY gl_dispatch_stub_386(GLenum target, GLfloat s, GLfloat t);
+void APIENTRY gl_dispatch_stub_387(GLenum target, const GLfloat *v);
+void APIENTRY gl_dispatch_stub_388(GLenum target, GLint s, GLint t);
+void APIENTRY gl_dispatch_stub_389(GLenum target, const GLint *v);
+void APIENTRY gl_dispatch_stub_390(GLenum target, GLshort s, GLshort t);
+void APIENTRY gl_dispatch_stub_391(GLenum target, const GLshort *v);
+void APIENTRY gl_dispatch_stub_392(GLenum target, GLdouble s, GLdouble t, GLdouble r);
+void APIENTRY gl_dispatch_stub_393(GLenum target, const GLdouble *v);
+void APIENTRY gl_dispatch_stub_394(GLenum target, GLfloat s, GLfloat t, GLfloat r);
+void APIENTRY gl_dispatch_stub_395(GLenum target, const GLfloat *v);
+void APIENTRY gl_dispatch_stub_396(GLenum target, GLint s, GLint t, GLint r);
+void APIENTRY gl_dispatch_stub_397(GLenum target, const GLint *v);
+void APIENTRY gl_dispatch_stub_398(GLenum target, GLshort s, GLshort t, GLshort r);
+void APIENTRY gl_dispatch_stub_399(GLenum target, const GLshort *v);
+void APIENTRY gl_dispatch_stub_400(GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q);
+void APIENTRY gl_dispatch_stub_401(GLenum target, const GLdouble *v);
+void APIENTRY gl_dispatch_stub_402(GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);
+GLAPI void APIENTRY glMultiTexCoord4f(GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);
+void APIENTRY gl_dispatch_stub_403(GLenum target, const GLfloat *v);
+void APIENTRY gl_dispatch_stub_404(GLenum target, GLint s, GLint t, GLint r, GLint q);
+void APIENTRY gl_dispatch_stub_405(GLenum target, const GLint *v);
+void APIENTRY gl_dispatch_stub_406(GLenum target, GLshort s, GLshort t, GLshort r, GLshort q);
+void APIENTRY gl_dispatch_stub_407(GLenum target, const GLshort *v);
+void APIENTRY gl_dispatch_stub_408(GLuint program, GLuint shader);
+GLuint APIENTRY gl_dispatch_stub_409(void);
+GLuint APIENTRY gl_dispatch_stub_410(GLenum type);
+void APIENTRY gl_dispatch_stub_411(GLuint program);
+void APIENTRY gl_dispatch_stub_412(GLuint program);
+void APIENTRY gl_dispatch_stub_413(GLuint program, GLuint shader);
+void APIENTRY gl_dispatch_stub_414(GLuint program, GLsizei maxCount, GLsizei *count, GLuint *obj);
+void APIENTRY gl_dispatch_stub_415(GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
+void APIENTRY gl_dispatch_stub_416(GLuint program, GLenum pname, GLint *params);
+void APIENTRY gl_dispatch_stub_417(GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
+void APIENTRY gl_dispatch_stub_418(GLuint shader, GLenum pname, GLint *params);
+GLboolean APIENTRY gl_dispatch_stub_419(GLuint program);
+GLboolean APIENTRY gl_dispatch_stub_420(GLuint shader);
+void APIENTRY gl_dispatch_stub_421(GLenum face, GLenum func, GLint ref, GLuint mask);
+void APIENTRY gl_dispatch_stub_422(GLenum face, GLuint mask);
+void APIENTRY gl_dispatch_stub_423(GLenum face, GLenum sfail, GLenum zfail, GLenum zpass);
+void APIENTRY gl_dispatch_stub_424(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+void APIENTRY gl_dispatch_stub_425(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+void APIENTRY gl_dispatch_stub_426(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+void APIENTRY gl_dispatch_stub_427(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+void APIENTRY gl_dispatch_stub_428(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+void APIENTRY gl_dispatch_stub_429(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+void APIENTRY gl_dispatch_stub_430(GLenum target, GLenum clamp);
+void APIENTRY gl_dispatch_stub_431(GLenum buffer, GLint drawbuffer, const GLfloat depth, const GLint stencil);
+void APIENTRY gl_dispatch_stub_432(GLenum buffer, GLint drawbuffer, const GLfloat *value);
+void APIENTRY gl_dispatch_stub_433(GLenum buffer, GLint drawbuffer, const GLint *value);
+void APIENTRY gl_dispatch_stub_434(GLenum buffer, GLint drawbuffer, const GLuint *value);
+const GLubyte * APIENTRY gl_dispatch_stub_435(GLenum name, GLuint index);
+void APIENTRY gl_dispatch_stub_436(GLenum target, GLenum internalFormat, GLuint buffer);
+void APIENTRY gl_dispatch_stub_437(GLenum target, GLenum attachment, GLuint texture, GLint level);
+void APIENTRY gl_dispatch_stub_438(GLenum target, GLenum pname, GLint64 *params);
+void APIENTRY gl_dispatch_stub_439(GLenum cap, GLuint index, GLint64 *data);
+void APIENTRY gl_dispatch_stub_440(GLuint index, GLuint divisor);
+void APIENTRY gl_dispatch_stub_441(const GLdouble *m);
+void APIENTRY gl_dispatch_stub_442(const GLfloat *m);
+void APIENTRY gl_dispatch_stub_443(const GLdouble *m);
+void APIENTRY gl_dispatch_stub_444(const GLfloat *m);
+void APIENTRY gl_dispatch_stub_445(GLclampf value, GLboolean invert);
+GLAPI void APIENTRY glSampleCoverage(GLclampf value, GLboolean invert);
+void APIENTRY gl_dispatch_stub_446(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data);
+void APIENTRY gl_dispatch_stub_447(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data);
+GLAPI void APIENTRY glCompressedTexImage2D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data);
+void APIENTRY gl_dispatch_stub_448(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data);
+void APIENTRY gl_dispatch_stub_449(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data);
+void APIENTRY gl_dispatch_stub_450(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data);
+GLAPI void APIENTRY glCompressedTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data);
+void APIENTRY gl_dispatch_stub_451(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data);
+void APIENTRY gl_dispatch_stub_452(GLenum target, GLint level, GLvoid *img);
+void APIENTRY gl_dispatch_stub_453(GLuint index);
+void APIENTRY gl_dispatch_stub_454(GLuint index);
+void APIENTRY gl_dispatch_stub_455(GLenum target, GLuint index, GLdouble *params);
+void APIENTRY gl_dispatch_stub_456(GLenum target, GLuint index, GLfloat *params);
+void APIENTRY gl_dispatch_stub_457(GLenum target, GLuint index, GLdouble *params);
+void APIENTRY gl_dispatch_stub_458(GLenum target, GLuint index, GLfloat *params);
+void APIENTRY gl_dispatch_stub_459(GLenum target, GLenum pname, GLvoid *string);
+void APIENTRY gl_dispatch_stub_460(GLenum target, GLenum pname, GLint *params);
+void APIENTRY gl_dispatch_stub_461(GLuint index, GLenum pname, GLdouble *params);
+void APIENTRY gl_dispatch_stub_462(GLuint index, GLenum pname, GLfloat *params);
+void APIENTRY gl_dispatch_stub_463(GLuint index, GLenum pname, GLint *params);
+void APIENTRY gl_dispatch_stub_464(GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
+void APIENTRY gl_dispatch_stub_465(GLenum target, GLuint index, const GLdouble *params);
+void APIENTRY gl_dispatch_stub_466(GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+void APIENTRY gl_dispatch_stub_467(GLenum target, GLuint index, const GLfloat *params);
+void APIENTRY gl_dispatch_stub_468(GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
+void APIENTRY gl_dispatch_stub_469(GLenum target, GLuint index, const GLdouble *params);
+void APIENTRY gl_dispatch_stub_470(GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+void APIENTRY gl_dispatch_stub_471(GLenum target, GLuint index, const GLfloat *params);
+void APIENTRY gl_dispatch_stub_472(GLenum target, GLenum format, GLsizei len, const GLvoid *string);
+void APIENTRY gl_dispatch_stub_473(GLuint index, GLdouble x);
+void APIENTRY gl_dispatch_stub_474(GLuint index, const GLdouble *v);
+void APIENTRY gl_dispatch_stub_475(GLuint index, GLfloat x);
+void APIENTRY gl_dispatch_stub_476(GLuint index, const GLfloat *v);
+void APIENTRY gl_dispatch_stub_477(GLuint index, GLshort x);
+void APIENTRY gl_dispatch_stub_478(GLuint index, const GLshort *v);
+void APIENTRY gl_dispatch_stub_479(GLuint index, GLdouble x, GLdouble y);
+void APIENTRY gl_dispatch_stub_480(GLuint index, const GLdouble *v);
+void APIENTRY gl_dispatch_stub_481(GLuint index, GLfloat x, GLfloat y);
+void APIENTRY gl_dispatch_stub_482(GLuint index, const GLfloat *v);
+void APIENTRY gl_dispatch_stub_483(GLuint index, GLshort x, GLshort y);
+void APIENTRY gl_dispatch_stub_484(GLuint index, const GLshort *v);
+void APIENTRY gl_dispatch_stub_485(GLuint index, GLdouble x, GLdouble y, GLdouble z);
+void APIENTRY gl_dispatch_stub_486(GLuint index, const GLdouble *v);
+void APIENTRY gl_dispatch_stub_487(GLuint index, GLfloat x, GLfloat y, GLfloat z);
+void APIENTRY gl_dispatch_stub_488(GLuint index, const GLfloat *v);
+void APIENTRY gl_dispatch_stub_489(GLuint index, GLshort x, GLshort y, GLshort z);
+void APIENTRY gl_dispatch_stub_490(GLuint index, const GLshort *v);
+void APIENTRY gl_dispatch_stub_491(GLuint index, const GLbyte *v);
+void APIENTRY gl_dispatch_stub_492(GLuint index, const GLint *v);
+void APIENTRY gl_dispatch_stub_493(GLuint index, const GLshort *v);
+void APIENTRY gl_dispatch_stub_494(GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w);
+void APIENTRY gl_dispatch_stub_495(GLuint index, const GLubyte *v);
+void APIENTRY gl_dispatch_stub_496(GLuint index, const GLuint *v);
+void APIENTRY gl_dispatch_stub_497(GLuint index, const GLushort *v);
+void APIENTRY gl_dispatch_stub_498(GLuint index, const GLbyte *v);
+void APIENTRY gl_dispatch_stub_499(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
+void APIENTRY gl_dispatch_stub_500(GLuint index, const GLdouble *v);
+void APIENTRY gl_dispatch_stub_501(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+void APIENTRY gl_dispatch_stub_502(GLuint index, const GLfloat *v);
+void APIENTRY gl_dispatch_stub_503(GLuint index, const GLint *v);
+void APIENTRY gl_dispatch_stub_504(GLuint index, GLshort x, GLshort y, GLshort z, GLshort w);
+void APIENTRY gl_dispatch_stub_505(GLuint index, const GLshort *v);
+void APIENTRY gl_dispatch_stub_506(GLuint index, const GLubyte *v);
+void APIENTRY gl_dispatch_stub_507(GLuint index, const GLuint *v);
+void APIENTRY gl_dispatch_stub_508(GLuint index, const GLushort *v);
+void APIENTRY gl_dispatch_stub_509(GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *pointer);
+void APIENTRY gl_dispatch_stub_510(GLenum target, GLuint buffer);
+GLAPI void APIENTRY glBindBuffer(GLenum target, GLuint buffer);
+void APIENTRY gl_dispatch_stub_511(GLenum target, GLsizeiptrARB size, const GLvoid *data, GLenum usage);
+GLAPI void APIENTRY glBufferData(GLenum target, GLsizeiptr size, const GLvoid *data, GLenum usage);
+void APIENTRY gl_dispatch_stub_512(GLenum target, GLintptrARB offset, GLsizeiptrARB size, const GLvoid *data);
+GLAPI void APIENTRY glBufferSubData(GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid *data);
+void APIENTRY gl_dispatch_stub_513(GLsizei n, const GLuint *buffer);
+GLAPI void APIENTRY glDeleteBuffers(GLsizei n, const GLuint *buffer);
+void APIENTRY gl_dispatch_stub_514(GLsizei n, GLuint *buffer);
+GLAPI void APIENTRY glGenBuffers(GLsizei n, GLuint *buffer);
+void APIENTRY gl_dispatch_stub_515(GLenum target, GLenum pname, GLint *params);
+GLAPI void APIENTRY glGetBufferParameteriv(GLenum target, GLenum pname, GLint *params);
+void APIENTRY gl_dispatch_stub_516(GLenum target, GLenum pname, GLvoid **params);
+GLAPI void APIENTRY glGetBufferPointervOES(GLenum target, GLenum pname, GLvoid **params);
+void APIENTRY gl_dispatch_stub_517(GLenum target, GLintptrARB offset, GLsizeiptrARB size, GLvoid *data);
+GLboolean APIENTRY gl_dispatch_stub_518(GLuint buffer);
+GLAPI GLboolean APIENTRY glIsBuffer(GLuint buffer);
+GLvoid * APIENTRY gl_dispatch_stub_519(GLenum target, GLenum access);
+GLAPI GLvoid * APIENTRY glMapBufferOES(GLenum target, GLenum access);
+GLboolean APIENTRY gl_dispatch_stub_520(GLenum target);
+GLAPI GLboolean APIENTRY glUnmapBufferOES(GLenum target);
+void APIENTRY gl_dispatch_stub_521(GLenum target, GLuint id);
+void APIENTRY gl_dispatch_stub_522(GLsizei n, const GLuint *ids);
+void APIENTRY gl_dispatch_stub_523(GLenum target);
+void APIENTRY gl_dispatch_stub_524(GLsizei n, GLuint *ids);
+void APIENTRY gl_dispatch_stub_525(GLuint id, GLenum pname, GLint *params);
+void APIENTRY gl_dispatch_stub_526(GLuint id, GLenum pname, GLuint *params);
+void APIENTRY gl_dispatch_stub_527(GLenum target, GLenum pname, GLint *params);
+GLboolean APIENTRY gl_dispatch_stub_528(GLuint id);
+void APIENTRY gl_dispatch_stub_529(GLhandleARB containerObj, GLhandleARB obj);
+void APIENTRY gl_dispatch_stub_530(GLhandleARB shader);
+GLhandleARB APIENTRY gl_dispatch_stub_531(void);
+GLhandleARB APIENTRY gl_dispatch_stub_532(GLenum shaderType);
+void APIENTRY gl_dispatch_stub_533(GLhandleARB obj);
+void APIENTRY gl_dispatch_stub_534(GLhandleARB containerObj, GLhandleARB attachedObj);
+void APIENTRY gl_dispatch_stub_535(GLhandleARB program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name);
+void APIENTRY gl_dispatch_stub_536(GLhandleARB containerObj, GLsizei maxLength, GLsizei *length, GLhandleARB *infoLog);
+GLhandleARB APIENTRY gl_dispatch_stub_537(GLenum pname);
+void APIENTRY gl_dispatch_stub_538(GLhandleARB obj, GLsizei maxLength, GLsizei *length, GLcharARB *infoLog);
+void APIENTRY gl_dispatch_stub_539(GLhandleARB obj, GLenum pname, GLfloat *params);
+void APIENTRY gl_dispatch_stub_540(GLhandleARB obj, GLenum pname, GLint *params);
+void APIENTRY gl_dispatch_stub_541(GLhandleARB shader, GLsizei bufSize, GLsizei *length, GLcharARB *source);
+GLint APIENTRY gl_dispatch_stub_542(GLhandleARB program, const GLcharARB *name);
+void APIENTRY gl_dispatch_stub_543(GLhandleARB program, GLint location, GLfloat *params);
+void APIENTRY gl_dispatch_stub_544(GLhandleARB program, GLint location, GLint *params);
+void APIENTRY gl_dispatch_stub_545(GLhandleARB program);
+void APIENTRY gl_dispatch_stub_546(GLhandleARB shader, GLsizei count, const GLcharARB **string, const GLint *length);
+void APIENTRY gl_dispatch_stub_547(GLint location, GLfloat v0);
+void APIENTRY gl_dispatch_stub_548(GLint location, GLsizei count, const GLfloat *value);
+void APIENTRY gl_dispatch_stub_549(GLint location, GLint v0);
+void APIENTRY gl_dispatch_stub_550(GLint location, GLsizei count, const GLint *value);
+void APIENTRY gl_dispatch_stub_551(GLint location, GLfloat v0, GLfloat v1);
+void APIENTRY gl_dispatch_stub_552(GLint location, GLsizei count, const GLfloat *value);
+void APIENTRY gl_dispatch_stub_553(GLint location, GLint v0, GLint v1);
+void APIENTRY gl_dispatch_stub_554(GLint location, GLsizei count, const GLint *value);
+void APIENTRY gl_dispatch_stub_555(GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
+void APIENTRY gl_dispatch_stub_556(GLint location, GLsizei count, const GLfloat *value);
+void APIENTRY gl_dispatch_stub_557(GLint location, GLint v0, GLint v1, GLint v2);
+void APIENTRY gl_dispatch_stub_558(GLint location, GLsizei count, const GLint *value);
+void APIENTRY gl_dispatch_stub_559(GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
+void APIENTRY gl_dispatch_stub_560(GLint location, GLsizei count, const GLfloat *value);
+void APIENTRY gl_dispatch_stub_561(GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
+void APIENTRY gl_dispatch_stub_562(GLint location, GLsizei count, const GLint *value);
+void APIENTRY gl_dispatch_stub_563(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+void APIENTRY gl_dispatch_stub_564(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+void APIENTRY gl_dispatch_stub_565(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+void APIENTRY gl_dispatch_stub_566(GLhandleARB program);
+void APIENTRY gl_dispatch_stub_567(GLhandleARB program);
+void APIENTRY gl_dispatch_stub_568(GLhandleARB program, GLuint index, const GLcharARB *name);
+void APIENTRY gl_dispatch_stub_569(GLhandleARB program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name);
+GLint APIENTRY gl_dispatch_stub_570(GLhandleARB program, const GLcharARB *name);
+void APIENTRY gl_dispatch_stub_571(GLsizei n, const GLenum *bufs);
+void APIENTRY gl_dispatch_stub_572(GLenum mode, GLint first, GLsizei count, GLsizei primcount);
+void APIENTRY gl_dispatch_stub_573(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount);
+void APIENTRY gl_dispatch_stub_574(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
+void APIENTRY gl_dispatch_stub_575(GLenum target, GLenum attachment, GLuint texture, GLint level);
+void APIENTRY gl_dispatch_stub_576(GLenum target, GLenum attachment, GLuint texture, GLint level, GLenum face);
+void APIENTRY gl_dispatch_stub_577(GLuint program, GLenum pname, GLint value);
+void APIENTRY gl_dispatch_stub_578(GLuint index, GLuint divisor);
+void APIENTRY gl_dispatch_stub_579(GLenum target, GLintptr offset, GLsizeiptr length);
+GLvoid * APIENTRY gl_dispatch_stub_580(GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access);
+void APIENTRY gl_dispatch_stub_581(GLuint array);
+void APIENTRY gl_dispatch_stub_582(GLsizei n, GLuint *arrays);
+void APIENTRY gl_dispatch_stub_583(GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size);
+GLenum APIENTRY gl_dispatch_stub_584(GLsync sync, GLbitfield flags, GLuint64 timeout);
+void APIENTRY gl_dispatch_stub_585(GLsync sync);
+GLsync APIENTRY gl_dispatch_stub_586(GLenum condition, GLbitfield flags);
+void APIENTRY gl_dispatch_stub_587(GLenum pname, GLint64 *params);
+void APIENTRY gl_dispatch_stub_588(GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values);
+GLboolean APIENTRY gl_dispatch_stub_589(GLsync sync);
+void APIENTRY gl_dispatch_stub_590(GLsync sync, GLbitfield flags, GLuint64 timeout);
+void APIENTRY gl_dispatch_stub_591(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLint basevertex);
+void APIENTRY gl_dispatch_stub_592(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices, GLint basevertex);
+void APIENTRY gl_dispatch_stub_593(GLenum mode, const GLsizei *count, GLenum type, const GLvoid **indices, GLsizei primcount, const GLint *basevertex);
+void APIENTRY gl_dispatch_stub_594(GLuint buf, GLenum modeRGB, GLenum modeA);
+void APIENTRY gl_dispatch_stub_595(GLuint buf, GLenum mode);
+void APIENTRY gl_dispatch_stub_596(GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcA, GLenum dstA);
+void APIENTRY gl_dispatch_stub_597(GLuint buf, GLenum src, GLenum dst);
+void APIENTRY gl_dispatch_stub_598(GLenum target, GLuint id);
+void APIENTRY gl_dispatch_stub_599(GLsizei n, const GLuint *ids);
+void APIENTRY gl_dispatch_stub_600(GLenum mode, GLuint id);
+void APIENTRY gl_dispatch_stub_601(GLsizei n, GLuint *ids);
+GLboolean APIENTRY gl_dispatch_stub_602(GLuint id);
+void APIENTRY gl_dispatch_stub_603(void);
+void APIENTRY gl_dispatch_stub_604(void);
+GLAPI void APIENTRY glClearDepthf(GLclampf depth);
+GLAPI void APIENTRY glClearDepthfOES(GLclampf depth);
+GLAPI void APIENTRY glDepthRangef(GLclampf zNear, GLclampf zFar);
+GLAPI void APIENTRY glDepthRangefOES(GLclampf zNear, GLclampf zFar);
+void APIENTRY gl_dispatch_stub_607(GLenum shadertype, GLenum precisiontype, GLint *range, GLint *precision);
+void APIENTRY gl_dispatch_stub_608(void);
+void APIENTRY gl_dispatch_stub_609(GLsizei n, const GLuint *shaders, GLenum binaryformat, const GLvoid *binary, GLsizei length);
+void APIENTRY gl_dispatch_stub_610(GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, GLvoid *binary);
+void APIENTRY gl_dispatch_stub_611(GLuint program, GLenum binaryFormat, const GLvoid *binary, GLsizei length);
+void APIENTRY gl_dispatch_stub_612(GLuint program, GLenum pname, GLint value);
+void APIENTRY gl_dispatch_stub_613(GLfloat factor, GLfloat bias);
+GLAPI void APIENTRY glDrawTexfOES(GLfloat x, GLfloat y, GLfloat z, GLfloat width, GLfloat height);
+GLAPI void APIENTRY glDrawTexfvOES(const GLfloat *coords);
+GLAPI void APIENTRY glDrawTexiOES(GLint x, GLint y, GLint z, GLint width, GLint height);
+GLAPI void APIENTRY glDrawTexivOES(const GLint *coords);
+GLAPI void APIENTRY glDrawTexsOES(GLshort x, GLshort y, GLshort z, GLshort width, GLshort height);
+GLAPI void APIENTRY glDrawTexsvOES(const GLshort *coords);
+GLAPI void APIENTRY glDrawTexxOES(GLfixed x, GLfixed y, GLfixed z, GLfixed width, GLfixed height);
+GLAPI void APIENTRY glDrawTexxvOES(const GLfixed *coords);
+GLAPI void APIENTRY glPointSizePointerOES(GLenum type, GLsizei stride, const GLvoid *pointer);
+void APIENTRY gl_dispatch_stub_623(GLenum pname, GLfloat *params);
+void APIENTRY gl_dispatch_stub_624(GLenum pname, GLint *params);
+void APIENTRY gl_dispatch_stub_625(GLenum pname, GLfloat param);
+void APIENTRY gl_dispatch_stub_626(GLenum pname, const GLfloat *params);
+void APIENTRY gl_dispatch_stub_627(GLenum pname, GLint param);
+void APIENTRY gl_dispatch_stub_628(GLenum pname, const GLint *params);
+GLAPI GLbitfield APIENTRY glQueryMatrixxOES(GLfixed *mantissa, GLint *exponent);
+void APIENTRY gl_dispatch_stub_630(GLclampf value, GLboolean invert);
+void APIENTRY gl_dispatch_stub_631(GLenum pattern);
+void APIENTRY gl_dispatch_stub_632(GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer);
+void APIENTRY gl_dispatch_stub_633(GLsizei stride, GLsizei count, const GLboolean *pointer);
+void APIENTRY gl_dispatch_stub_634(GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer);
+void APIENTRY gl_dispatch_stub_635(GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer);
+void APIENTRY gl_dispatch_stub_636(GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer);
+void APIENTRY gl_dispatch_stub_637(GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer);
+void APIENTRY gl_dispatch_stub_638(GLenum pname, GLfloat param);
+GLAPI void APIENTRY glPointParameterf(GLenum pname, GLfloat param);
+void APIENTRY gl_dispatch_stub_639(GLenum pname, const GLfloat *params);
+GLAPI void APIENTRY glPointParameterfv(GLenum pname, const GLfloat *params);
+void APIENTRY gl_dispatch_stub_640(GLint first, GLsizei count);
+void APIENTRY gl_dispatch_stub_641(void);
+void APIENTRY gl_dispatch_stub_642(GLbyte red, GLbyte green, GLbyte blue);
+void APIENTRY gl_dispatch_stub_643(const GLbyte *v);
+void APIENTRY gl_dispatch_stub_644(GLdouble red, GLdouble green, GLdouble blue);
+void APIENTRY gl_dispatch_stub_645(const GLdouble *v);
+void APIENTRY gl_dispatch_stub_646(GLfloat red, GLfloat green, GLfloat blue);
+void APIENTRY gl_dispatch_stub_647(const GLfloat *v);
+void APIENTRY gl_dispatch_stub_648(GLint red, GLint green, GLint blue);
+void APIENTRY gl_dispatch_stub_649(const GLint *v);
+void APIENTRY gl_dispatch_stub_650(GLshort red, GLshort green, GLshort blue);
+void APIENTRY gl_dispatch_stub_651(const GLshort *v);
+void APIENTRY gl_dispatch_stub_652(GLubyte red, GLubyte green, GLubyte blue);
+void APIENTRY gl_dispatch_stub_653(const GLubyte *v);
+void APIENTRY gl_dispatch_stub_654(GLuint red, GLuint green, GLuint blue);
+void APIENTRY gl_dispatch_stub_655(const GLuint *v);
+void APIENTRY gl_dispatch_stub_656(GLushort red, GLushort green, GLushort blue);
+void APIENTRY gl_dispatch_stub_657(const GLushort *v);
+void APIENTRY gl_dispatch_stub_658(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
+GLAPI void APIENTRY glMultiDrawArraysEXT(GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount);
+GLAPI void APIENTRY glMultiDrawElementsEXT(GLenum mode, const GLsizei *count, GLenum type, const GLvoid **indices, GLsizei primcount);
+void APIENTRY gl_dispatch_stub_661(GLenum type, GLsizei stride, const GLvoid *pointer);
+void APIENTRY gl_dispatch_stub_662(GLdouble coord);
+void APIENTRY gl_dispatch_stub_663(const GLdouble *coord);
+void APIENTRY gl_dispatch_stub_664(GLfloat coord);
+void APIENTRY gl_dispatch_stub_665(const GLfloat *coord);
+void APIENTRY gl_dispatch_stub_666(GLenum mode);
+void APIENTRY gl_dispatch_stub_667(GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
+GLAPI void APIENTRY glBlendFuncSeparateOES(GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
+void APIENTRY gl_dispatch_stub_668(void);
+void APIENTRY gl_dispatch_stub_669(GLsizei length, const GLvoid *pointer);
+void APIENTRY gl_dispatch_stub_670(GLenum stage, GLenum portion, GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage);
+void APIENTRY gl_dispatch_stub_671(GLenum stage, GLenum portion, GLenum abOutput, GLenum cdOutput, GLenum sumOutput, GLenum scale, GLenum bias, GLboolean abDotProduct, GLboolean cdDotProduct, GLboolean muxSum);
+void APIENTRY gl_dispatch_stub_672(GLenum pname, GLfloat param);
+void APIENTRY gl_dispatch_stub_673(GLenum pname, const GLfloat *params);
+void APIENTRY gl_dispatch_stub_674(GLenum pname, GLint param);
+void APIENTRY gl_dispatch_stub_675(GLenum pname, const GLint *params);
+void APIENTRY gl_dispatch_stub_676(GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage);
+void APIENTRY gl_dispatch_stub_677(GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLfloat *params);
+void APIENTRY gl_dispatch_stub_678(GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLint *params);
+void APIENTRY gl_dispatch_stub_679(GLenum stage, GLenum portion, GLenum pname, GLfloat *params);
+void APIENTRY gl_dispatch_stub_680(GLenum stage, GLenum portion, GLenum pname, GLint *params);
+void APIENTRY gl_dispatch_stub_681(GLenum variable, GLenum pname, GLfloat *params);
+void APIENTRY gl_dispatch_stub_682(GLenum variable, GLenum pname, GLint *params);
+void APIENTRY gl_dispatch_stub_683(void);
+void APIENTRY gl_dispatch_stub_684(GLdouble x, GLdouble y);
+void APIENTRY gl_dispatch_stub_685(const GLdouble *v);
+void APIENTRY gl_dispatch_stub_686(GLfloat x, GLfloat y);
+void APIENTRY gl_dispatch_stub_687(const GLfloat *v);
+void APIENTRY gl_dispatch_stub_688(GLint x, GLint y);
+void APIENTRY gl_dispatch_stub_689(const GLint *v);
+void APIENTRY gl_dispatch_stub_690(GLshort x, GLshort y);
+void APIENTRY gl_dispatch_stub_691(const GLshort *v);
+void APIENTRY gl_dispatch_stub_692(GLdouble x, GLdouble y, GLdouble z);
+void APIENTRY gl_dispatch_stub_693(const GLdouble *v);
+void APIENTRY gl_dispatch_stub_694(GLfloat x, GLfloat y, GLfloat z);
+void APIENTRY gl_dispatch_stub_695(const GLfloat *v);
+void APIENTRY gl_dispatch_stub_696(GLint x, GLint y, GLint z);
+void APIENTRY gl_dispatch_stub_697(const GLint *v);
+void APIENTRY gl_dispatch_stub_698(GLshort x, GLshort y, GLshort z);
+void APIENTRY gl_dispatch_stub_699(const GLshort *v);
+void APIENTRY gl_dispatch_stub_700(GLdouble x, GLdouble y, GLdouble z, GLdouble w);
+void APIENTRY gl_dispatch_stub_701(const GLdouble *v);
+void APIENTRY gl_dispatch_stub_702(GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+void APIENTRY gl_dispatch_stub_703(const GLfloat *v);
+void APIENTRY gl_dispatch_stub_704(GLint x, GLint y, GLint z, GLint w);
+void APIENTRY gl_dispatch_stub_705(const GLint *v);
+void APIENTRY gl_dispatch_stub_706(GLshort x, GLshort y, GLshort z, GLshort w);
+void APIENTRY gl_dispatch_stub_707(const GLshort *v);
+void APIENTRY gl_dispatch_stub_708(const GLenum *mode, const GLint *first, const GLsizei *count, GLsizei primcount, GLint modestride);
+void APIENTRY gl_dispatch_stub_709(const GLenum *mode, const GLsizei *count, GLenum type, const GLvoid * const *indices, GLsizei primcount, GLint modestride);
+void APIENTRY gl_dispatch_stub_710(GLsizei n, const GLuint *fences);
+void APIENTRY gl_dispatch_stub_711(GLuint fence);
+void APIENTRY gl_dispatch_stub_712(GLsizei n, GLuint *fences);
+void APIENTRY gl_dispatch_stub_713(GLuint fence, GLenum pname, GLint *params);
+GLboolean APIENTRY gl_dispatch_stub_714(GLuint fence);
+void APIENTRY gl_dispatch_stub_715(GLuint fence, GLenum condition);
+GLboolean APIENTRY gl_dispatch_stub_716(GLuint fence);
+GLboolean APIENTRY gl_dispatch_stub_717(GLsizei n, const GLuint *ids, GLboolean *residences);
+void APIENTRY gl_dispatch_stub_718(GLenum target, GLuint program);
+void APIENTRY gl_dispatch_stub_719(GLsizei n, const GLuint *programs);
+void APIENTRY gl_dispatch_stub_720(GLenum target, GLuint id, const GLfloat *params);
+void APIENTRY gl_dispatch_stub_721(GLsizei n, GLuint *programs);
+void APIENTRY gl_dispatch_stub_722(GLenum target, GLuint index, GLenum pname, GLdouble *params);
+void APIENTRY gl_dispatch_stub_723(GLenum target, GLuint index, GLenum pname, GLfloat *params);
+void APIENTRY gl_dispatch_stub_724(GLuint id, GLenum pname, GLubyte *program);
+void APIENTRY gl_dispatch_stub_725(GLuint id, GLenum pname, GLint *params);
+void APIENTRY gl_dispatch_stub_726(GLenum target, GLuint address, GLenum pname, GLint *params);
+void APIENTRY gl_dispatch_stub_727(GLuint index, GLenum pname, GLvoid **pointer);
+void APIENTRY gl_dispatch_stub_728(GLuint index, GLenum pname, GLdouble *params);
+void APIENTRY gl_dispatch_stub_729(GLuint index, GLenum pname, GLfloat *params);
+void APIENTRY gl_dispatch_stub_730(GLuint index, GLenum pname, GLint *params);
+GLboolean APIENTRY gl_dispatch_stub_731(GLuint program);
+void APIENTRY gl_dispatch_stub_732(GLenum target, GLuint id, GLsizei len, const GLubyte *program);
+void APIENTRY gl_dispatch_stub_733(GLenum target, GLuint index, GLsizei num, const GLdouble *params);
+void APIENTRY gl_dispatch_stub_734(GLenum target, GLuint index, GLsizei num, const GLfloat *params);
+void APIENTRY gl_dispatch_stub_735(GLsizei n, const GLuint *ids);
+void APIENTRY gl_dispatch_stub_736(GLenum target, GLuint address, GLenum matrix, GLenum transform);
+void APIENTRY gl_dispatch_stub_737(GLuint index, GLdouble x);
+void APIENTRY gl_dispatch_stub_738(GLuint index, const GLdouble *v);
+void APIENTRY gl_dispatch_stub_739(GLuint index, GLfloat x);
+void APIENTRY gl_dispatch_stub_740(GLuint index, const GLfloat *v);
+void APIENTRY gl_dispatch_stub_741(GLuint index, GLshort x);
+void APIENTRY gl_dispatch_stub_742(GLuint index, const GLshort *v);
+void APIENTRY gl_dispatch_stub_743(GLuint index, GLdouble x, GLdouble y);
+void APIENTRY gl_dispatch_stub_744(GLuint index, const GLdouble *v);
+void APIENTRY gl_dispatch_stub_745(GLuint index, GLfloat x, GLfloat y);
+void APIENTRY gl_dispatch_stub_746(GLuint index, const GLfloat *v);
+void APIENTRY gl_dispatch_stub_747(GLuint index, GLshort x, GLshort y);
+void APIENTRY gl_dispatch_stub_748(GLuint index, const GLshort *v);
+void APIENTRY gl_dispatch_stub_749(GLuint index, GLdouble x, GLdouble y, GLdouble z);
+void APIENTRY gl_dispatch_stub_750(GLuint index, const GLdouble *v);
+void APIENTRY gl_dispatch_stub_751(GLuint index, GLfloat x, GLfloat y, GLfloat z);
+void APIENTRY gl_dispatch_stub_752(GLuint index, const GLfloat *v);
+void APIENTRY gl_dispatch_stub_753(GLuint index, GLshort x, GLshort y, GLshort z);
+void APIENTRY gl_dispatch_stub_754(GLuint index, const GLshort *v);
+void APIENTRY gl_dispatch_stub_755(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
+void APIENTRY gl_dispatch_stub_756(GLuint index, const GLdouble *v);
+void APIENTRY gl_dispatch_stub_757(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+void APIENTRY gl_dispatch_stub_758(GLuint index, const GLfloat *v);
+void APIENTRY gl_dispatch_stub_759(GLuint index, GLshort x, GLshort y, GLshort z, GLshort w);
+void APIENTRY gl_dispatch_stub_760(GLuint index, const GLshort *v);
+void APIENTRY gl_dispatch_stub_761(GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w);
+void APIENTRY gl_dispatch_stub_762(GLuint index, const GLubyte *v);
+void APIENTRY gl_dispatch_stub_763(GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
+void APIENTRY gl_dispatch_stub_764(GLuint index, GLsizei n, const GLdouble *v);
+void APIENTRY gl_dispatch_stub_765(GLuint index, GLsizei n, const GLfloat *v);
+void APIENTRY gl_dispatch_stub_766(GLuint index, GLsizei n, const GLshort *v);
+void APIENTRY gl_dispatch_stub_767(GLuint index, GLsizei n, const GLdouble *v);
+void APIENTRY gl_dispatch_stub_768(GLuint index, GLsizei n, const GLfloat *v);
+void APIENTRY gl_dispatch_stub_769(GLuint index, GLsizei n, const GLshort *v);
+void APIENTRY gl_dispatch_stub_770(GLuint index, GLsizei n, const GLdouble *v);
+void APIENTRY gl_dispatch_stub_771(GLuint index, GLsizei n, const GLfloat *v);
+void APIENTRY gl_dispatch_stub_772(GLuint index, GLsizei n, const GLshort *v);
+void APIENTRY gl_dispatch_stub_773(GLuint index, GLsizei n, const GLdouble *v);
+void APIENTRY gl_dispatch_stub_774(GLuint index, GLsizei n, const GLfloat *v);
+void APIENTRY gl_dispatch_stub_775(GLuint index, GLsizei n, const GLshort *v);
+void APIENTRY gl_dispatch_stub_776(GLuint index, GLsizei n, const GLubyte *v);
+void APIENTRY gl_dispatch_stub_777(GLenum pname, GLfloat *param);
+void APIENTRY gl_dispatch_stub_778(GLenum pname, GLint *param);
+void APIENTRY gl_dispatch_stub_779(GLenum pname, const GLfloat *param);
+void APIENTRY gl_dispatch_stub_780(GLenum pname, const GLint *param);
+void APIENTRY gl_dispatch_stub_781(GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod);
+void APIENTRY gl_dispatch_stub_782(GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod);
+void APIENTRY gl_dispatch_stub_783(GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod);
+void APIENTRY gl_dispatch_stub_784(void);
+void APIENTRY gl_dispatch_stub_785(GLuint id);
+void APIENTRY gl_dispatch_stub_786(GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod);
+void APIENTRY gl_dispatch_stub_787(GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod);
+void APIENTRY gl_dispatch_stub_788(GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod);
+void APIENTRY gl_dispatch_stub_789(GLuint id);
+void APIENTRY gl_dispatch_stub_790(void);
+GLuint APIENTRY gl_dispatch_stub_791(GLuint range);
+void APIENTRY gl_dispatch_stub_792(GLuint dst, GLuint coord, GLenum swizzle);
+void APIENTRY gl_dispatch_stub_793(GLuint dst, GLuint interp, GLenum swizzle);
+void APIENTRY gl_dispatch_stub_794(GLuint dst, const GLfloat *value);
+void APIENTRY gl_dispatch_stub_795(GLenum pname, GLint param);
+void APIENTRY gl_dispatch_stub_796(GLenum pname, const GLint *params);
+void APIENTRY gl_dispatch_stub_797(GLenum face);
+void APIENTRY gl_dispatch_stub_798(GLuint array);
+void APIENTRY gl_dispatch_stub_799(GLsizei n, const GLuint *arrays);
+void APIENTRY gl_dispatch_stub_800(GLsizei n, GLuint *arrays);
+GLboolean APIENTRY gl_dispatch_stub_801(GLuint array);
+void APIENTRY gl_dispatch_stub_802(GLuint id, GLsizei len, const GLubyte *name, GLdouble *params);
+void APIENTRY gl_dispatch_stub_803(GLuint id, GLsizei len, const GLubyte *name, GLfloat *params);
+void APIENTRY gl_dispatch_stub_804(GLuint id, GLsizei len, const GLubyte *name, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
+void APIENTRY gl_dispatch_stub_805(GLuint id, GLsizei len, const GLubyte *name, const GLdouble *v);
+void APIENTRY gl_dispatch_stub_806(GLuint id, GLsizei len, const GLubyte *name, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+void APIENTRY gl_dispatch_stub_807(GLuint id, GLsizei len, const GLubyte *name, const GLfloat *v);
+void APIENTRY gl_dispatch_stub_808(GLuint index);
+void APIENTRY gl_dispatch_stub_809(void);
+GLAPI void APIENTRY glAlphaFuncxOES(GLenum func, GLclampx ref);
+GLAPI void APIENTRY glAlphaFuncx(GLenum func, GLclampx ref);
+GLAPI void APIENTRY glClearColorxOES(GLclampx red, GLclampx green, GLclampx blue, GLclampx alpha);
+GLAPI void APIENTRY glClearColorx(GLclampx red, GLclampx green, GLclampx blue, GLclampx alpha);
+GLAPI void APIENTRY glClearDepthxOES(GLclampx depth);
+GLAPI void APIENTRY glClearDepthx(GLclampx depth);
+GLAPI void APIENTRY glClipPlanexOES(GLenum plane, const GLfixed *equation);
+GLAPI void APIENTRY glClipPlanex(GLenum plane, const GLfixed *equation);
+GLAPI void APIENTRY glColor4xOES(GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha);
+GLAPI void APIENTRY glColor4x(GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha);
+GLAPI void APIENTRY glDepthRangexOES(GLclampx zNear, GLclampx zFar);
+GLAPI void APIENTRY glDepthRangex(GLclampx zNear, GLclampx zFar);
+GLAPI void APIENTRY glFogxOES(GLenum pname, GLfixed param);
+GLAPI void APIENTRY glFogx(GLenum pname, GLfixed param);
+GLAPI void APIENTRY glFogxvOES(GLenum pname, const GLfixed *params);
+GLAPI void APIENTRY glFogxv(GLenum pname, const GLfixed *params);
+GLAPI void APIENTRY glFrustumxOES(GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar);
+GLAPI void APIENTRY glFrustumx(GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar);
+GLAPI void APIENTRY glGetClipPlanexOES(GLenum plane, GLfixed *equation);
+GLAPI void APIENTRY glGetClipPlanex(GLenum plane, GLfixed *equation);
+GLAPI void APIENTRY glGetFixedvOES(GLenum pname, GLfixed *params);
+GLAPI void APIENTRY glGetFixedv(GLenum pname, GLfixed *params);
+GLAPI void APIENTRY glGetLightxvOES(GLenum light, GLenum pname, GLfixed *params);
+GLAPI void APIENTRY glGetLightxv(GLenum light, GLenum pname, GLfixed *params);
+GLAPI void APIENTRY glGetMaterialxvOES(GLenum face, GLenum pname, GLfixed *params);
+GLAPI void APIENTRY glGetMaterialxv(GLenum face, GLenum pname, GLfixed *params);
+GLAPI void APIENTRY glGetTexEnvxvOES(GLenum target, GLenum pname, GLfixed *params);
+GLAPI void APIENTRY glGetTexEnvxv(GLenum target, GLenum pname, GLfixed *params);
+GLAPI void APIENTRY glGetTexGenxvOES(GLenum coord, GLenum pname, GLfixed *params);
+GLAPI void APIENTRY glGetTexParameterxvOES(GLenum target, GLenum pname, GLfixed *params);
+GLAPI void APIENTRY glGetTexParameterxv(GLenum target, GLenum pname, GLfixed *params);
+GLAPI void APIENTRY glLightModelxOES(GLenum pname, GLfixed param);
+GLAPI void APIENTRY glLightModelx(GLenum pname, GLfixed param);
+GLAPI void APIENTRY glLightModelxvOES(GLenum pname, const GLfixed *params);
+GLAPI void APIENTRY glLightModelxv(GLenum pname, const GLfixed *params);
+GLAPI void APIENTRY glLightxOES(GLenum light, GLenum pname, GLfixed param);
+GLAPI void APIENTRY glLightx(GLenum light, GLenum pname, GLfixed param);
+GLAPI void APIENTRY glLightxvOES(GLenum light, GLenum pname, const GLfixed *params);
+GLAPI void APIENTRY glLightxv(GLenum light, GLenum pname, const GLfixed *params);
+GLAPI void APIENTRY glLineWidthxOES(GLfixed width);
+GLAPI void APIENTRY glLineWidthx(GLfixed width);
+GLAPI void APIENTRY glLoadMatrixxOES(const GLfixed *m);
+GLAPI void APIENTRY glLoadMatrixx(const GLfixed *m);
+GLAPI void APIENTRY glMaterialxOES(GLenum face, GLenum pname, GLfixed param);
+GLAPI void APIENTRY glMaterialx(GLenum face, GLenum pname, GLfixed param);
+GLAPI void APIENTRY glMaterialxvOES(GLenum face, GLenum pname, const GLfixed *params);
+GLAPI void APIENTRY glMaterialxv(GLenum face, GLenum pname, const GLfixed *params);
+GLAPI void APIENTRY glMultMatrixxOES(const GLfixed *m);
+GLAPI void APIENTRY glMultMatrixx(const GLfixed *m);
+GLAPI void APIENTRY glMultiTexCoord4xOES(GLenum target, GLfixed s, GLfixed t, GLfixed r, GLfixed q);
+GLAPI void APIENTRY glMultiTexCoord4x(GLenum target, GLfixed s, GLfixed t, GLfixed r, GLfixed q);
+GLAPI void APIENTRY glNormal3xOES(GLfixed nx, GLfixed ny, GLfixed nz);
+GLAPI void APIENTRY glNormal3x(GLfixed nx, GLfixed ny, GLfixed nz);
+GLAPI void APIENTRY glOrthoxOES(GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar);
+GLAPI void APIENTRY glOrthox(GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar);
+GLAPI void APIENTRY glPointParameterxOES(GLenum pname, GLfixed param);
+GLAPI void APIENTRY glPointParameterx(GLenum pname, GLfixed param);
+GLAPI void APIENTRY glPointParameterxvOES(GLenum pname, const GLfixed *params);
+GLAPI void APIENTRY glPointParameterxv(GLenum pname, const GLfixed *params);
+GLAPI void APIENTRY glPointSizexOES(GLfixed size);
+GLAPI void APIENTRY glPointSizex(GLfixed size);
+GLAPI void APIENTRY glPolygonOffsetxOES(GLfixed factor, GLfixed units);
+GLAPI void APIENTRY glPolygonOffsetx(GLfixed factor, GLfixed units);
+GLAPI void APIENTRY glRotatexOES(GLfixed angle, GLfixed x, GLfixed y, GLfixed z);
+GLAPI void APIENTRY glRotatex(GLfixed angle, GLfixed x, GLfixed y, GLfixed z);
+GLAPI void APIENTRY glSampleCoveragexOES(GLclampx value, GLboolean invert);
+GLAPI void APIENTRY glSampleCoveragex(GLclampx value, GLboolean invert);
+GLAPI void APIENTRY glScalexOES(GLfixed x, GLfixed y, GLfixed z);
+GLAPI void APIENTRY glScalex(GLfixed x, GLfixed y, GLfixed z);
+GLAPI void APIENTRY glTexEnvxOES(GLenum target, GLenum pname, GLfixed param);
+GLAPI void APIENTRY glTexEnvx(GLenum target, GLenum pname, GLfixed param);
+GLAPI void APIENTRY glTexEnvxvOES(GLenum target, GLenum pname, const GLfixed *params);
+GLAPI void APIENTRY glTexEnvxv(GLenum target, GLenum pname, const GLfixed *params);
+GLAPI void APIENTRY glTexGenxOES(GLenum coord, GLenum pname, GLint param);
+GLAPI void APIENTRY glTexGenxvOES(GLenum coord, GLenum pname, const GLfixed *params);
+GLAPI void APIENTRY glTexParameterxOES(GLenum target, GLenum pname, GLfixed param);
+GLAPI void APIENTRY glTexParameterx(GLenum target, GLenum pname, GLfixed param);
+GLAPI void APIENTRY glTexParameterxvOES(GLenum target, GLenum pname, const GLfixed *params);
+GLAPI void APIENTRY glTexParameterxv(GLenum target, GLenum pname, const GLfixed *params);
+GLAPI void APIENTRY glTranslatexOES(GLfixed x, GLfixed y, GLfixed z);
+GLAPI void APIENTRY glTranslatex(GLfixed x, GLfixed y, GLfixed z);
+GLAPI void APIENTRY glClipPlanefOES(GLenum plane, const GLfloat *equation);
+GLAPI void APIENTRY glClipPlanef(GLenum plane, const GLfloat *equation);
+GLAPI void APIENTRY glFrustumfOES(GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar);
+GLAPI void APIENTRY glFrustumf(GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar);
+GLAPI void APIENTRY glGetClipPlanefOES(GLenum plane, GLfloat *equation);
+GLAPI void APIENTRY glGetClipPlanef(GLenum plane, GLfloat *equation);
+GLAPI void APIENTRY glOrthofOES(GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar);
+GLAPI void APIENTRY glOrthof(GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar);
+void APIENTRY gl_dispatch_stub_856(GLclampd zmin, GLclampd zmax);
+void APIENTRY gl_dispatch_stub_857(GLenum modeRGB, GLenum modeA);
+GLAPI void APIENTRY glBlendEquationSeparateOES(GLenum modeRGB, GLenum modeA);
+void APIENTRY gl_dispatch_stub_858(GLenum target, GLuint framebuffer);
+GLAPI void APIENTRY glBindFramebufferOES(GLenum target, GLuint framebuffer);
+void APIENTRY gl_dispatch_stub_859(GLenum target, GLuint renderbuffer);
+GLAPI void APIENTRY glBindRenderbufferOES(GLenum target, GLuint renderbuffer);
+GLenum APIENTRY gl_dispatch_stub_860(GLenum target);
+GLAPI GLenum APIENTRY glCheckFramebufferStatusOES(GLenum target);
+void APIENTRY gl_dispatch_stub_861(GLsizei n, const GLuint *framebuffers);
+GLAPI void APIENTRY glDeleteFramebuffersOES(GLsizei n, const GLuint *framebuffers);
+void APIENTRY gl_dispatch_stub_862(GLsizei n, const GLuint *renderbuffers);
+GLAPI void APIENTRY glDeleteRenderbuffersOES(GLsizei n, const GLuint *renderbuffers);
+void APIENTRY gl_dispatch_stub_863(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
+GLAPI void APIENTRY glFramebufferRenderbufferOES(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
+void APIENTRY gl_dispatch_stub_864(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
+void APIENTRY gl_dispatch_stub_865(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
+GLAPI void APIENTRY glFramebufferTexture2DOES(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
+void APIENTRY gl_dispatch_stub_866(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);
+void APIENTRY gl_dispatch_stub_867(GLsizei n, GLuint *framebuffers);
+GLAPI void APIENTRY glGenFramebuffersOES(GLsizei n, GLuint *framebuffers);
+void APIENTRY gl_dispatch_stub_868(GLsizei n, GLuint *renderbuffers);
+GLAPI void APIENTRY glGenRenderbuffersOES(GLsizei n, GLuint *renderbuffers);
+void APIENTRY gl_dispatch_stub_869(GLenum target);
+GLAPI void APIENTRY glGenerateMipmapOES(GLenum target);
+void APIENTRY gl_dispatch_stub_870(GLenum target, GLenum attachment, GLenum pname, GLint *params);
+GLAPI void APIENTRY glGetFramebufferAttachmentParameterivOES(GLenum target, GLenum attachment, GLenum pname, GLint *params);
+void APIENTRY gl_dispatch_stub_871(GLenum target, GLenum pname, GLint *params);
+GLAPI void APIENTRY glGetRenderbufferParameterivOES(GLenum target, GLenum pname, GLint *params);
+GLboolean APIENTRY gl_dispatch_stub_872(GLuint framebuffer);
+GLAPI GLboolean APIENTRY glIsFramebufferOES(GLuint framebuffer);
+GLboolean APIENTRY gl_dispatch_stub_873(GLuint renderbuffer);
+GLAPI GLboolean APIENTRY glIsRenderbufferOES(GLuint renderbuffer);
+void APIENTRY gl_dispatch_stub_874(GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
+GLAPI void APIENTRY glRenderbufferStorageOES(GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
+void APIENTRY gl_dispatch_stub_875(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
+void APIENTRY gl_dispatch_stub_876(GLenum target, GLenum pname, GLint param);
+void APIENTRY gl_dispatch_stub_877(GLenum target, GLintptr offset, GLsizeiptr size);
+void APIENTRY gl_dispatch_stub_878(GLuint program, GLuint colorNumber, const GLchar *name);
+GLint APIENTRY gl_dispatch_stub_879(GLuint program, const GLchar *name);
+void APIENTRY gl_dispatch_stub_880(GLuint program, GLint location, GLuint *params);
+void APIENTRY gl_dispatch_stub_881(GLuint index, GLenum pname, GLint *params);
+void APIENTRY gl_dispatch_stub_882(GLuint index, GLenum pname, GLuint *params);
+void APIENTRY gl_dispatch_stub_883(GLint location, GLuint x);
+void APIENTRY gl_dispatch_stub_884(GLint location, GLsizei count, const GLuint *value);
+void APIENTRY gl_dispatch_stub_885(GLint location, GLuint x, GLuint y);
+void APIENTRY gl_dispatch_stub_886(GLint location, GLsizei count, const GLuint *value);
+void APIENTRY gl_dispatch_stub_887(GLint location, GLuint x, GLuint y, GLuint z);
+void APIENTRY gl_dispatch_stub_888(GLint location, GLsizei count, const GLuint *value);
+void APIENTRY gl_dispatch_stub_889(GLint location, GLuint x, GLuint y, GLuint z, GLuint w);
+void APIENTRY gl_dispatch_stub_890(GLint location, GLsizei count, const GLuint *value);
+void APIENTRY gl_dispatch_stub_891(GLuint index, GLint x);
+void APIENTRY gl_dispatch_stub_892(GLuint index, const GLint *v);
+void APIENTRY gl_dispatch_stub_893(GLuint index, GLuint x);
+void APIENTRY gl_dispatch_stub_894(GLuint index, const GLuint *v);
+void APIENTRY gl_dispatch_stub_895(GLuint index, GLint x, GLint y);
+void APIENTRY gl_dispatch_stub_896(GLuint index, const GLint *v);
+void APIENTRY gl_dispatch_stub_897(GLuint index, GLuint x, GLuint y);
+void APIENTRY gl_dispatch_stub_898(GLuint index, const GLuint *v);
+void APIENTRY gl_dispatch_stub_899(GLuint index, GLint x, GLint y, GLint z);
+void APIENTRY gl_dispatch_stub_900(GLuint index, const GLint *v);
+void APIENTRY gl_dispatch_stub_901(GLuint index, GLuint x, GLuint y, GLuint z);
+void APIENTRY gl_dispatch_stub_902(GLuint index, const GLuint *v);
+void APIENTRY gl_dispatch_stub_903(GLuint index, const GLbyte *v);
+void APIENTRY gl_dispatch_stub_904(GLuint index, GLint x, GLint y, GLint z, GLint w);
+void APIENTRY gl_dispatch_stub_905(GLuint index, const GLint *v);
+void APIENTRY gl_dispatch_stub_906(GLuint index, const GLshort *v);
+void APIENTRY gl_dispatch_stub_907(GLuint index, const GLubyte *v);
+void APIENTRY gl_dispatch_stub_908(GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
+void APIENTRY gl_dispatch_stub_909(GLuint index, const GLuint *v);
+void APIENTRY gl_dispatch_stub_910(GLuint index, const GLushort *v);
+void APIENTRY gl_dispatch_stub_911(GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
+void APIENTRY gl_dispatch_stub_912(GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer);
+void APIENTRY gl_dispatch_stub_913(GLuint buf, GLboolean r, GLboolean g, GLboolean b, GLboolean a);
+void APIENTRY gl_dispatch_stub_914(GLenum target, GLuint index);
+void APIENTRY gl_dispatch_stub_915(GLenum target, GLuint index);
+void APIENTRY gl_dispatch_stub_916(GLenum value, GLuint index, GLboolean *data);
+void APIENTRY gl_dispatch_stub_917(GLenum value, GLuint index, GLint *data);
+GLboolean APIENTRY gl_dispatch_stub_918(GLenum target, GLuint index);
+void APIENTRY gl_dispatch_stub_919(GLint r, GLint g, GLint b, GLint a);
+void APIENTRY gl_dispatch_stub_920(GLuint r, GLuint g, GLuint b, GLuint a);
+void APIENTRY gl_dispatch_stub_921(GLenum target, GLenum pname, GLint *params);
+void APIENTRY gl_dispatch_stub_922(GLenum target, GLenum pname, GLuint *params);
+void APIENTRY gl_dispatch_stub_923(GLenum target, GLenum pname, const GLint *params);
+void APIENTRY gl_dispatch_stub_924(GLenum target, GLenum pname, const GLuint *params);
+void APIENTRY gl_dispatch_stub_925(GLuint query, GLenum mode);
+void APIENTRY gl_dispatch_stub_926(void);
+void APIENTRY gl_dispatch_stub_927(GLenum mode);
+void APIENTRY gl_dispatch_stub_928(GLenum target, GLuint index, GLuint buffer);
+void APIENTRY gl_dispatch_stub_929(GLenum target, GLuint index, GLuint buffer, GLintptr offset);
+void APIENTRY gl_dispatch_stub_930(GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size);
+void APIENTRY gl_dispatch_stub_931(void);
+void APIENTRY gl_dispatch_stub_932(GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name);
+void APIENTRY gl_dispatch_stub_933(GLuint program, GLsizei count, const char **varyings, GLenum bufferMode);
+void APIENTRY gl_dispatch_stub_934(GLenum mode);
+void APIENTRY gl_dispatch_stub_935(GLenum target, GLenum pname, GLvoid **params);
+void APIENTRY gl_dispatch_stub_936(GLenum target, GLsizei length, GLvoid *pointer);
+void APIENTRY gl_dispatch_stub_937(GLenum objectType, GLuint name, GLenum pname, GLint *value);
+GLenum APIENTRY gl_dispatch_stub_938(GLenum objectType, GLuint name, GLenum option);
+GLenum APIENTRY gl_dispatch_stub_939(GLenum objectType, GLuint name, GLenum option);
+void APIENTRY gl_dispatch_stub_940(GLuint program);
+GLuint APIENTRY gl_dispatch_stub_941(GLenum type, const GLchar *string);
+void APIENTRY gl_dispatch_stub_942(GLenum type, GLuint program);
+void APIENTRY gl_dispatch_stub_943(void);
+void APIENTRY gl_dispatch_stub_944(GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask);
+void APIENTRY gl_dispatch_stub_945(GLenum target, GLuint index, GLsizei count, const GLfloat *params);
+void APIENTRY gl_dispatch_stub_946(GLenum target, GLuint index, GLsizei count, const GLfloat *params);
+void APIENTRY gl_dispatch_stub_947(GLuint id, GLenum pname, GLint64EXT *params);
+void APIENTRY gl_dispatch_stub_948(GLuint id, GLenum pname, GLuint64EXT *params);
+GLAPI void APIENTRY glEGLImageTargetRenderbufferStorageOES(GLenum target, GLvoid *writeOffset);
+GLAPI void APIENTRY glEGLImageTargetTexture2DOES(GLenum target, GLvoid *writeOffset);
+#undef MAPI_TMP_DEFINES
+#endif /* MAPI_TMP_DEFINES */
+
+#ifdef MAPI_TMP_PUBLIC_ENTRIES_NO_HIDDEN
+GLAPI void APIENTRY glColor4f(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[29];
+ ((void (APIENTRY *)(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha)) _func)(red, green, blue, alpha);
+}
+
+GLAPI void APIENTRY glColor4ub(GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[35];
+ ((void (APIENTRY *)(GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha)) _func)(red, green, blue, alpha);
+}
+
+GLAPI void APIENTRY glNormal3f(GLfloat nx, GLfloat ny, GLfloat nz)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[56];
+ ((void (APIENTRY *)(GLfloat nx, GLfloat ny, GLfloat nz)) _func)(nx, ny, nz);
+}
+
+GLAPI void APIENTRY glCullFace(GLenum mode)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[152];
+ ((void (APIENTRY *)(GLenum mode)) _func)(mode);
+}
+
+GLAPI void APIENTRY glFogf(GLenum pname, GLfloat param)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[153];
+ ((void (APIENTRY *)(GLenum pname, GLfloat param)) _func)(pname, param);
+}
+
+GLAPI void APIENTRY glFogfv(GLenum pname, const GLfloat *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[154];
+ ((void (APIENTRY *)(GLenum pname, const GLfloat *params)) _func)(pname, params);
+}
+
+GLAPI void APIENTRY glFrontFace(GLenum mode)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[157];
+ ((void (APIENTRY *)(GLenum mode)) _func)(mode);
+}
+
+GLAPI void APIENTRY glHint(GLenum target, GLenum mode)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[158];
+ ((void (APIENTRY *)(GLenum target, GLenum mode)) _func)(target, mode);
+}
+
+GLAPI void APIENTRY glLightf(GLenum light, GLenum pname, GLfloat param)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[159];
+ ((void (APIENTRY *)(GLenum light, GLenum pname, GLfloat param)) _func)(light, pname, param);
+}
+
+GLAPI void APIENTRY glLightfv(GLenum light, GLenum pname, const GLfloat *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[160];
+ ((void (APIENTRY *)(GLenum light, GLenum pname, const GLfloat *params)) _func)(light, pname, params);
+}
+
+GLAPI void APIENTRY glLightModelf(GLenum pname, GLfloat param)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[163];
+ ((void (APIENTRY *)(GLenum pname, GLfloat param)) _func)(pname, param);
+}
+
+GLAPI void APIENTRY glLightModelfv(GLenum pname, const GLfloat *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[164];
+ ((void (APIENTRY *)(GLenum pname, const GLfloat *params)) _func)(pname, params);
+}
+
+GLAPI void APIENTRY glLineWidth(GLfloat width)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[168];
+ ((void (APIENTRY *)(GLfloat width)) _func)(width);
+}
+
+GLAPI void APIENTRY glMaterialf(GLenum face, GLenum pname, GLfloat param)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[169];
+ ((void (APIENTRY *)(GLenum face, GLenum pname, GLfloat param)) _func)(face, pname, param);
+}
+
+GLAPI void APIENTRY glMaterialfv(GLenum face, GLenum pname, const GLfloat *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[170];
+ ((void (APIENTRY *)(GLenum face, GLenum pname, const GLfloat *params)) _func)(face, pname, params);
+}
+
+GLAPI void APIENTRY glPointSize(GLfloat size)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[173];
+ ((void (APIENTRY *)(GLfloat size)) _func)(size);
+}
+
+GLAPI void APIENTRY glScissor(GLint x, GLint y, GLsizei width, GLsizei height)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[176];
+ ((void (APIENTRY *)(GLint x, GLint y, GLsizei width, GLsizei height)) _func)(x, y, width, height);
+}
+
+GLAPI void APIENTRY glShadeModel(GLenum mode)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[177];
+ ((void (APIENTRY *)(GLenum mode)) _func)(mode);
+}
+
+GLAPI void APIENTRY glTexParameterf(GLenum target, GLenum pname, GLfloat param)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[178];
+ ((void (APIENTRY *)(GLenum target, GLenum pname, GLfloat param)) _func)(target, pname, param);
+}
+
+GLAPI void APIENTRY glTexParameterfv(GLenum target, GLenum pname, const GLfloat *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[179];
+ ((void (APIENTRY *)(GLenum target, GLenum pname, const GLfloat *params)) _func)(target, pname, params);
+}
+
+GLAPI void APIENTRY glTexParameteri(GLenum target, GLenum pname, GLint param)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[180];
+ ((void (APIENTRY *)(GLenum target, GLenum pname, GLint param)) _func)(target, pname, param);
+}
+
+GLAPI void APIENTRY glTexParameteriv(GLenum target, GLenum pname, const GLint *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[181];
+ ((void (APIENTRY *)(GLenum target, GLenum pname, const GLint *params)) _func)(target, pname, params);
+}
+
+GLAPI void APIENTRY glTexImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[183];
+ ((void (APIENTRY *)(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels)) _func)(target, level, internalformat, width, height, border, format, type, pixels);
+}
+
+GLAPI void APIENTRY glTexEnvf(GLenum target, GLenum pname, GLfloat param)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[184];
+ ((void (APIENTRY *)(GLenum target, GLenum pname, GLfloat param)) _func)(target, pname, param);
+}
+
+GLAPI void APIENTRY glTexEnvfv(GLenum target, GLenum pname, const GLfloat *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[185];
+ ((void (APIENTRY *)(GLenum target, GLenum pname, const GLfloat *params)) _func)(target, pname, params);
+}
+
+GLAPI void APIENTRY glTexEnvi(GLenum target, GLenum pname, GLint param)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[186];
+ ((void (APIENTRY *)(GLenum target, GLenum pname, GLint param)) _func)(target, pname, param);
+}
+
+GLAPI void APIENTRY glTexEnviv(GLenum target, GLenum pname, const GLint *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[187];
+ ((void (APIENTRY *)(GLenum target, GLenum pname, const GLint *params)) _func)(target, pname, params);
+}
+
+GLAPI void APIENTRY glTexGenfOES(GLenum coord, GLenum pname, GLfloat param)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[190];
+ ((void (APIENTRY *)(GLenum coord, GLenum pname, GLfloat param)) _func)(coord, pname, param);
+}
+
+GLAPI void APIENTRY glTexGenfvOES(GLenum coord, GLenum pname, const GLfloat *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[191];
+ ((void (APIENTRY *)(GLenum coord, GLenum pname, const GLfloat *params)) _func)(coord, pname, params);
+}
+
+GLAPI void APIENTRY glTexGeniOES(GLenum coord, GLenum pname, GLint param)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[192];
+ ((void (APIENTRY *)(GLenum coord, GLenum pname, GLint param)) _func)(coord, pname, param);
+}
+
+GLAPI void APIENTRY glTexGenivOES(GLenum coord, GLenum pname, const GLint *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[193];
+ ((void (APIENTRY *)(GLenum coord, GLenum pname, const GLint *params)) _func)(coord, pname, params);
+}
+
+GLAPI void APIENTRY glClear(GLbitfield mask)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[203];
+ ((void (APIENTRY *)(GLbitfield mask)) _func)(mask);
+}
+
+GLAPI void APIENTRY glClearColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[206];
+ ((void (APIENTRY *)(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)) _func)(red, green, blue, alpha);
+}
+
+GLAPI void APIENTRY glClearStencil(GLint s)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[207];
+ ((void (APIENTRY *)(GLint s)) _func)(s);
+}
+
+GLAPI void APIENTRY glStencilMask(GLuint mask)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[209];
+ ((void (APIENTRY *)(GLuint mask)) _func)(mask);
+}
+
+GLAPI void APIENTRY glColorMask(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[210];
+ ((void (APIENTRY *)(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha)) _func)(red, green, blue, alpha);
+}
+
+GLAPI void APIENTRY glDepthMask(GLboolean flag)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[211];
+ ((void (APIENTRY *)(GLboolean flag)) _func)(flag);
+}
+
+GLAPI void APIENTRY glDisable(GLenum cap)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[214];
+ ((void (APIENTRY *)(GLenum cap)) _func)(cap);
+}
+
+GLAPI void APIENTRY glEnable(GLenum cap)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[215];
+ ((void (APIENTRY *)(GLenum cap)) _func)(cap);
+}
+
+GLAPI void APIENTRY glFinish(void)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[216];
+ ((void (APIENTRY *)(void)) _func)();
+}
+
+GLAPI void APIENTRY glFlush(void)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[217];
+ ((void (APIENTRY *)(void)) _func)();
+}
+
+GLAPI void APIENTRY glAlphaFunc(GLenum func, GLclampf ref)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[240];
+ ((void (APIENTRY *)(GLenum func, GLclampf ref)) _func)(func, ref);
+}
+
+GLAPI void APIENTRY glBlendFunc(GLenum sfactor, GLenum dfactor)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[241];
+ ((void (APIENTRY *)(GLenum sfactor, GLenum dfactor)) _func)(sfactor, dfactor);
+}
+
+GLAPI void APIENTRY glLogicOp(GLenum opcode)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[242];
+ ((void (APIENTRY *)(GLenum opcode)) _func)(opcode);
+}
+
+GLAPI void APIENTRY glStencilFunc(GLenum func, GLint ref, GLuint mask)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[243];
+ ((void (APIENTRY *)(GLenum func, GLint ref, GLuint mask)) _func)(func, ref, mask);
+}
+
+GLAPI void APIENTRY glStencilOp(GLenum fail, GLenum zfail, GLenum zpass)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[244];
+ ((void (APIENTRY *)(GLenum fail, GLenum zfail, GLenum zpass)) _func)(fail, zfail, zpass);
+}
+
+GLAPI void APIENTRY glDepthFunc(GLenum func)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[245];
+ ((void (APIENTRY *)(GLenum func)) _func)(func);
+}
+
+GLAPI void APIENTRY glPixelStorei(GLenum pname, GLint param)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[250];
+ ((void (APIENTRY *)(GLenum pname, GLint param)) _func)(pname, param);
+}
+
+GLAPI void APIENTRY glReadPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[256];
+ ((void (APIENTRY *)(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels)) _func)(x, y, width, height, format, type, pixels);
+}
+
+GLAPI void APIENTRY glGetBooleanv(GLenum pname, GLboolean *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[258];
+ ((void (APIENTRY *)(GLenum pname, GLboolean *params)) _func)(pname, params);
+}
+
+GLAPI GLenum APIENTRY glGetError(void)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[261];
+ return ((GLenum (APIENTRY *)(void)) _func)();
+}
+
+GLAPI void APIENTRY glGetFloatv(GLenum pname, GLfloat *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[262];
+ ((void (APIENTRY *)(GLenum pname, GLfloat *params)) _func)(pname, params);
+}
+
+GLAPI void APIENTRY glGetIntegerv(GLenum pname, GLint *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[263];
+ ((void (APIENTRY *)(GLenum pname, GLint *params)) _func)(pname, params);
+}
+
+GLAPI void APIENTRY glGetLightfv(GLenum light, GLenum pname, GLfloat *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[264];
+ ((void (APIENTRY *)(GLenum light, GLenum pname, GLfloat *params)) _func)(light, pname, params);
+}
+
+GLAPI void APIENTRY glGetMaterialfv(GLenum face, GLenum pname, GLfloat *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[269];
+ ((void (APIENTRY *)(GLenum face, GLenum pname, GLfloat *params)) _func)(face, pname, params);
+}
+
+GLAPI const GLubyte * APIENTRY glGetString(GLenum name)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[275];
+ return ((const GLubyte * (APIENTRY *)(GLenum name)) _func)(name);
+}
+
+GLAPI void APIENTRY glGetTexEnvfv(GLenum target, GLenum pname, GLfloat *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[276];
+ ((void (APIENTRY *)(GLenum target, GLenum pname, GLfloat *params)) _func)(target, pname, params);
+}
+
+GLAPI void APIENTRY glGetTexEnviv(GLenum target, GLenum pname, GLint *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[277];
+ ((void (APIENTRY *)(GLenum target, GLenum pname, GLint *params)) _func)(target, pname, params);
+}
+
+GLAPI void APIENTRY glGetTexGenfvOES(GLenum coord, GLenum pname, GLfloat *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[279];
+ ((void (APIENTRY *)(GLenum coord, GLenum pname, GLfloat *params)) _func)(coord, pname, params);
+}
+
+GLAPI void APIENTRY glGetTexGenivOES(GLenum coord, GLenum pname, GLint *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[280];
+ ((void (APIENTRY *)(GLenum coord, GLenum pname, GLint *params)) _func)(coord, pname, params);
+}
+
+GLAPI void APIENTRY glGetTexParameterfv(GLenum target, GLenum pname, GLfloat *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[282];
+ ((void (APIENTRY *)(GLenum target, GLenum pname, GLfloat *params)) _func)(target, pname, params);
+}
+
+GLAPI void APIENTRY glGetTexParameteriv(GLenum target, GLenum pname, GLint *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[283];
+ ((void (APIENTRY *)(GLenum target, GLenum pname, GLint *params)) _func)(target, pname, params);
+}
+
+GLAPI GLboolean APIENTRY glIsEnabled(GLenum cap)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[286];
+ return ((GLboolean (APIENTRY *)(GLenum cap)) _func)(cap);
+}
+
+GLAPI void APIENTRY glLoadIdentity(void)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[290];
+ ((void (APIENTRY *)(void)) _func)();
+}
+
+GLAPI void APIENTRY glLoadMatrixf(const GLfloat *m)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[291];
+ ((void (APIENTRY *)(const GLfloat *m)) _func)(m);
+}
+
+GLAPI void APIENTRY glMatrixMode(GLenum mode)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[293];
+ ((void (APIENTRY *)(GLenum mode)) _func)(mode);
+}
+
+GLAPI void APIENTRY glMultMatrixf(const GLfloat *m)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[294];
+ ((void (APIENTRY *)(const GLfloat *m)) _func)(m);
+}
+
+GLAPI void APIENTRY glPopMatrix(void)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[297];
+ ((void (APIENTRY *)(void)) _func)();
+}
+
+GLAPI void APIENTRY glPushMatrix(void)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[298];
+ ((void (APIENTRY *)(void)) _func)();
+}
+
+GLAPI void APIENTRY glRotatef(GLfloat angle, GLfloat x, GLfloat y, GLfloat z)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[300];
+ ((void (APIENTRY *)(GLfloat angle, GLfloat x, GLfloat y, GLfloat z)) _func)(angle, x, y, z);
+}
+
+GLAPI void APIENTRY glScalef(GLfloat x, GLfloat y, GLfloat z)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[302];
+ ((void (APIENTRY *)(GLfloat x, GLfloat y, GLfloat z)) _func)(x, y, z);
+}
+
+GLAPI void APIENTRY glTranslatef(GLfloat x, GLfloat y, GLfloat z)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[304];
+ ((void (APIENTRY *)(GLfloat x, GLfloat y, GLfloat z)) _func)(x, y, z);
+}
+
+GLAPI void APIENTRY glViewport(GLint x, GLint y, GLsizei width, GLsizei height)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[305];
+ ((void (APIENTRY *)(GLint x, GLint y, GLsizei width, GLsizei height)) _func)(x, y, width, height);
+}
+
+GLAPI void APIENTRY glBindTexture(GLenum target, GLuint texture)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[307];
+ ((void (APIENTRY *)(GLenum target, GLuint texture)) _func)(target, texture);
+}
+
+GLAPI void APIENTRY glColorPointer(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[308];
+ ((void (APIENTRY *)(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer)) _func)(size, type, stride, pointer);
+}
+
+GLAPI void APIENTRY glDisableClientState(GLenum array)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[309];
+ ((void (APIENTRY *)(GLenum array)) _func)(array);
+}
+
+GLAPI void APIENTRY glDrawArrays(GLenum mode, GLint first, GLsizei count)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[310];
+ ((void (APIENTRY *)(GLenum mode, GLint first, GLsizei count)) _func)(mode, first, count);
+}
+
+GLAPI void APIENTRY glDrawElements(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[311];
+ ((void (APIENTRY *)(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices)) _func)(mode, count, type, indices);
+}
+
+GLAPI void APIENTRY glEnableClientState(GLenum array)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[313];
+ ((void (APIENTRY *)(GLenum array)) _func)(array);
+}
+
+GLAPI void APIENTRY glNormalPointer(GLenum type, GLsizei stride, const GLvoid *pointer)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[318];
+ ((void (APIENTRY *)(GLenum type, GLsizei stride, const GLvoid *pointer)) _func)(type, stride, pointer);
+}
+
+GLAPI void APIENTRY glPolygonOffset(GLfloat factor, GLfloat units)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[319];
+ ((void (APIENTRY *)(GLfloat factor, GLfloat units)) _func)(factor, units);
+}
+
+GLAPI void APIENTRY glTexCoordPointer(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[320];
+ ((void (APIENTRY *)(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer)) _func)(size, type, stride, pointer);
+}
+
+GLAPI void APIENTRY glVertexPointer(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[321];
+ ((void (APIENTRY *)(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer)) _func)(size, type, stride, pointer);
+}
+
+GLAPI void APIENTRY glCopyTexImage2D(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[324];
+ ((void (APIENTRY *)(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border)) _func)(target, level, internalformat, x, y, width, height, border);
+}
+
+GLAPI void APIENTRY glCopyTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[326];
+ ((void (APIENTRY *)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height)) _func)(target, level, xoffset, yoffset, x, y, width, height);
+}
+
+GLAPI void APIENTRY glDeleteTextures(GLsizei n, const GLuint *textures)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[327];
+ ((void (APIENTRY *)(GLsizei n, const GLuint *textures)) _func)(n, textures);
+}
+
+GLAPI void APIENTRY glGenTextures(GLsizei n, GLuint *textures)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[328];
+ ((void (APIENTRY *)(GLsizei n, GLuint *textures)) _func)(n, textures);
+}
+
+GLAPI void APIENTRY glGetPointerv(GLenum pname, GLvoid **params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[329];
+ ((void (APIENTRY *)(GLenum pname, GLvoid **params)) _func)(pname, params);
+}
+
+GLAPI GLboolean APIENTRY glIsTexture(GLuint texture)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[330];
+ return ((GLboolean (APIENTRY *)(GLuint texture)) _func)(texture);
+}
+
+GLAPI void APIENTRY glTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[333];
+ ((void (APIENTRY *)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels)) _func)(target, level, xoffset, yoffset, width, height, format, type, pixels);
+}
+
+GLAPI void APIENTRY glBlendEquationOES(GLenum mode)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[337];
+ ((void (APIENTRY *)(GLenum mode)) _func)(mode);
+}
+
+GLAPI void APIENTRY glActiveTexture(GLenum texture)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[374];
+ ((void (APIENTRY *)(GLenum texture)) _func)(texture);
+}
+
+GLAPI void APIENTRY glClientActiveTexture(GLenum texture)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[375];
+ ((void (APIENTRY *)(GLenum texture)) _func)(texture);
+}
+
+GLAPI void APIENTRY glMultiTexCoord4f(GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[402];
+ ((void (APIENTRY *)(GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q)) _func)(target, s, t, r, q);
+}
+
+GLAPI void APIENTRY glSampleCoverage(GLclampf value, GLboolean invert)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[445];
+ ((void (APIENTRY *)(GLclampf value, GLboolean invert)) _func)(value, invert);
+}
+
+GLAPI void APIENTRY glCompressedTexImage2D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[447];
+ ((void (APIENTRY *)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data)) _func)(target, level, internalformat, width, height, border, imageSize, data);
+}
+
+GLAPI void APIENTRY glCompressedTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[450];
+ ((void (APIENTRY *)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data)) _func)(target, level, xoffset, yoffset, width, height, format, imageSize, data);
+}
+
+GLAPI void APIENTRY glBindBuffer(GLenum target, GLuint buffer)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[510];
+ ((void (APIENTRY *)(GLenum target, GLuint buffer)) _func)(target, buffer);
+}
+
+GLAPI void APIENTRY glBufferData(GLenum target, GLsizeiptr size, const GLvoid *data, GLenum usage)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[511];
+ ((void (APIENTRY *)(GLenum target, GLsizeiptr size, const GLvoid *data, GLenum usage)) _func)(target, size, data, usage);
+}
+
+GLAPI void APIENTRY glBufferSubData(GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid *data)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[512];
+ ((void (APIENTRY *)(GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid *data)) _func)(target, offset, size, data);
+}
+
+GLAPI void APIENTRY glDeleteBuffers(GLsizei n, const GLuint *buffer)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[513];
+ ((void (APIENTRY *)(GLsizei n, const GLuint *buffer)) _func)(n, buffer);
+}
+
+GLAPI void APIENTRY glGenBuffers(GLsizei n, GLuint *buffer)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[514];
+ ((void (APIENTRY *)(GLsizei n, GLuint *buffer)) _func)(n, buffer);
+}
+
+GLAPI void APIENTRY glGetBufferParameteriv(GLenum target, GLenum pname, GLint *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[515];
+ ((void (APIENTRY *)(GLenum target, GLenum pname, GLint *params)) _func)(target, pname, params);
+}
+
+GLAPI void APIENTRY glGetBufferPointervOES(GLenum target, GLenum pname, GLvoid **params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[516];
+ ((void (APIENTRY *)(GLenum target, GLenum pname, GLvoid **params)) _func)(target, pname, params);
+}
+
+GLAPI GLboolean APIENTRY glIsBuffer(GLuint buffer)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[518];
+ return ((GLboolean (APIENTRY *)(GLuint buffer)) _func)(buffer);
+}
+
+GLAPI GLvoid * APIENTRY glMapBufferOES(GLenum target, GLenum access)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[519];
+ return ((GLvoid * (APIENTRY *)(GLenum target, GLenum access)) _func)(target, access);
+}
+
+GLAPI GLboolean APIENTRY glUnmapBufferOES(GLenum target)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[520];
+ return ((GLboolean (APIENTRY *)(GLenum target)) _func)(target);
+}
+
+GLAPI void APIENTRY glClearDepthf(GLclampf depth)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[605];
+ ((void (APIENTRY *)(GLclampf depth)) _func)(depth);
+}
+
+GLAPI void APIENTRY glClearDepthfOES(GLclampf depth)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[605];
+ ((void (APIENTRY *)(GLclampf depth)) _func)(depth);
+}
+
+GLAPI void APIENTRY glDepthRangef(GLclampf zNear, GLclampf zFar)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[606];
+ ((void (APIENTRY *)(GLclampf zNear, GLclampf zFar)) _func)(zNear, zFar);
+}
+
+GLAPI void APIENTRY glDepthRangefOES(GLclampf zNear, GLclampf zFar)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[606];
+ ((void (APIENTRY *)(GLclampf zNear, GLclampf zFar)) _func)(zNear, zFar);
+}
+
+GLAPI void APIENTRY glDrawTexfOES(GLfloat x, GLfloat y, GLfloat z, GLfloat width, GLfloat height)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[614];
+ ((void (APIENTRY *)(GLfloat x, GLfloat y, GLfloat z, GLfloat width, GLfloat height)) _func)(x, y, z, width, height);
+}
+
+GLAPI void APIENTRY glDrawTexfvOES(const GLfloat *coords)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[615];
+ ((void (APIENTRY *)(const GLfloat *coords)) _func)(coords);
+}
+
+GLAPI void APIENTRY glDrawTexiOES(GLint x, GLint y, GLint z, GLint width, GLint height)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[616];
+ ((void (APIENTRY *)(GLint x, GLint y, GLint z, GLint width, GLint height)) _func)(x, y, z, width, height);
+}
+
+GLAPI void APIENTRY glDrawTexivOES(const GLint *coords)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[617];
+ ((void (APIENTRY *)(const GLint *coords)) _func)(coords);
+}
+
+GLAPI void APIENTRY glDrawTexsOES(GLshort x, GLshort y, GLshort z, GLshort width, GLshort height)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[618];
+ ((void (APIENTRY *)(GLshort x, GLshort y, GLshort z, GLshort width, GLshort height)) _func)(x, y, z, width, height);
+}
+
+GLAPI void APIENTRY glDrawTexsvOES(const GLshort *coords)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[619];
+ ((void (APIENTRY *)(const GLshort *coords)) _func)(coords);
+}
+
+GLAPI void APIENTRY glDrawTexxOES(GLfixed x, GLfixed y, GLfixed z, GLfixed width, GLfixed height)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[620];
+ ((void (APIENTRY *)(GLfixed x, GLfixed y, GLfixed z, GLfixed width, GLfixed height)) _func)(x, y, z, width, height);
+}
+
+GLAPI void APIENTRY glDrawTexxvOES(const GLfixed *coords)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[621];
+ ((void (APIENTRY *)(const GLfixed *coords)) _func)(coords);
+}
+
+GLAPI void APIENTRY glPointSizePointerOES(GLenum type, GLsizei stride, const GLvoid *pointer)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[622];
+ ((void (APIENTRY *)(GLenum type, GLsizei stride, const GLvoid *pointer)) _func)(type, stride, pointer);
+}
+
+GLAPI GLbitfield APIENTRY glQueryMatrixxOES(GLfixed *mantissa, GLint *exponent)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[629];
+ return ((GLbitfield (APIENTRY *)(GLfixed *mantissa, GLint *exponent)) _func)(mantissa, exponent);
+}
+
+GLAPI void APIENTRY glPointParameterf(GLenum pname, GLfloat param)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[638];
+ ((void (APIENTRY *)(GLenum pname, GLfloat param)) _func)(pname, param);
+}
+
+GLAPI void APIENTRY glPointParameterfv(GLenum pname, const GLfloat *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[639];
+ ((void (APIENTRY *)(GLenum pname, const GLfloat *params)) _func)(pname, params);
+}
+
+GLAPI void APIENTRY glMultiDrawArraysEXT(GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[659];
+ ((void (APIENTRY *)(GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount)) _func)(mode, first, count, primcount);
+}
+
+GLAPI void APIENTRY glMultiDrawElementsEXT(GLenum mode, const GLsizei *count, GLenum type, const GLvoid **indices, GLsizei primcount)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[660];
+ ((void (APIENTRY *)(GLenum mode, const GLsizei *count, GLenum type, const GLvoid **indices, GLsizei primcount)) _func)(mode, count, type, indices, primcount);
+}
+
+GLAPI void APIENTRY glBlendFuncSeparateOES(GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[667];
+ ((void (APIENTRY *)(GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha)) _func)(sfactorRGB, dfactorRGB, sfactorAlpha, dfactorAlpha);
+}
+
+GLAPI void APIENTRY glAlphaFuncxOES(GLenum func, GLclampx ref)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[810];
+ ((void (APIENTRY *)(GLenum func, GLclampx ref)) _func)(func, ref);
+}
+
+GLAPI void APIENTRY glAlphaFuncx(GLenum func, GLclampx ref)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[810];
+ ((void (APIENTRY *)(GLenum func, GLclampx ref)) _func)(func, ref);
+}
+
+GLAPI void APIENTRY glClearColorxOES(GLclampx red, GLclampx green, GLclampx blue, GLclampx alpha)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[811];
+ ((void (APIENTRY *)(GLclampx red, GLclampx green, GLclampx blue, GLclampx alpha)) _func)(red, green, blue, alpha);
+}
+
+GLAPI void APIENTRY glClearColorx(GLclampx red, GLclampx green, GLclampx blue, GLclampx alpha)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[811];
+ ((void (APIENTRY *)(GLclampx red, GLclampx green, GLclampx blue, GLclampx alpha)) _func)(red, green, blue, alpha);
+}
+
+GLAPI void APIENTRY glClearDepthxOES(GLclampx depth)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[812];
+ ((void (APIENTRY *)(GLclampx depth)) _func)(depth);
+}
+
+GLAPI void APIENTRY glClearDepthx(GLclampx depth)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[812];
+ ((void (APIENTRY *)(GLclampx depth)) _func)(depth);
+}
+
+GLAPI void APIENTRY glClipPlanexOES(GLenum plane, const GLfixed *equation)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[813];
+ ((void (APIENTRY *)(GLenum plane, const GLfixed *equation)) _func)(plane, equation);
+}
+
+GLAPI void APIENTRY glClipPlanex(GLenum plane, const GLfixed *equation)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[813];
+ ((void (APIENTRY *)(GLenum plane, const GLfixed *equation)) _func)(plane, equation);
+}
+
+GLAPI void APIENTRY glColor4xOES(GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[814];
+ ((void (APIENTRY *)(GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha)) _func)(red, green, blue, alpha);
+}
+
+GLAPI void APIENTRY glColor4x(GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[814];
+ ((void (APIENTRY *)(GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha)) _func)(red, green, blue, alpha);
+}
+
+GLAPI void APIENTRY glDepthRangexOES(GLclampx zNear, GLclampx zFar)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[815];
+ ((void (APIENTRY *)(GLclampx zNear, GLclampx zFar)) _func)(zNear, zFar);
+}
+
+GLAPI void APIENTRY glDepthRangex(GLclampx zNear, GLclampx zFar)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[815];
+ ((void (APIENTRY *)(GLclampx zNear, GLclampx zFar)) _func)(zNear, zFar);
+}
+
+GLAPI void APIENTRY glFogxOES(GLenum pname, GLfixed param)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[816];
+ ((void (APIENTRY *)(GLenum pname, GLfixed param)) _func)(pname, param);
+}
+
+GLAPI void APIENTRY glFogx(GLenum pname, GLfixed param)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[816];
+ ((void (APIENTRY *)(GLenum pname, GLfixed param)) _func)(pname, param);
+}
+
+GLAPI void APIENTRY glFogxvOES(GLenum pname, const GLfixed *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[817];
+ ((void (APIENTRY *)(GLenum pname, const GLfixed *params)) _func)(pname, params);
+}
+
+GLAPI void APIENTRY glFogxv(GLenum pname, const GLfixed *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[817];
+ ((void (APIENTRY *)(GLenum pname, const GLfixed *params)) _func)(pname, params);
+}
+
+GLAPI void APIENTRY glFrustumxOES(GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[818];
+ ((void (APIENTRY *)(GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar)) _func)(left, right, bottom, top, zNear, zFar);
+}
+
+GLAPI void APIENTRY glFrustumx(GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[818];
+ ((void (APIENTRY *)(GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar)) _func)(left, right, bottom, top, zNear, zFar);
+}
+
+GLAPI void APIENTRY glGetClipPlanexOES(GLenum plane, GLfixed *equation)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[819];
+ ((void (APIENTRY *)(GLenum plane, GLfixed *equation)) _func)(plane, equation);
+}
+
+GLAPI void APIENTRY glGetClipPlanex(GLenum plane, GLfixed *equation)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[819];
+ ((void (APIENTRY *)(GLenum plane, GLfixed *equation)) _func)(plane, equation);
+}
+
+GLAPI void APIENTRY glGetFixedvOES(GLenum pname, GLfixed *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[820];
+ ((void (APIENTRY *)(GLenum pname, GLfixed *params)) _func)(pname, params);
+}
+
+GLAPI void APIENTRY glGetFixedv(GLenum pname, GLfixed *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[820];
+ ((void (APIENTRY *)(GLenum pname, GLfixed *params)) _func)(pname, params);
+}
+
+GLAPI void APIENTRY glGetLightxvOES(GLenum light, GLenum pname, GLfixed *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[821];
+ ((void (APIENTRY *)(GLenum light, GLenum pname, GLfixed *params)) _func)(light, pname, params);
+}
+
+GLAPI void APIENTRY glGetLightxv(GLenum light, GLenum pname, GLfixed *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[821];
+ ((void (APIENTRY *)(GLenum light, GLenum pname, GLfixed *params)) _func)(light, pname, params);
+}
+
+GLAPI void APIENTRY glGetMaterialxvOES(GLenum face, GLenum pname, GLfixed *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[822];
+ ((void (APIENTRY *)(GLenum face, GLenum pname, GLfixed *params)) _func)(face, pname, params);
+}
+
+GLAPI void APIENTRY glGetMaterialxv(GLenum face, GLenum pname, GLfixed *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[822];
+ ((void (APIENTRY *)(GLenum face, GLenum pname, GLfixed *params)) _func)(face, pname, params);
+}
+
+GLAPI void APIENTRY glGetTexEnvxvOES(GLenum target, GLenum pname, GLfixed *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[823];
+ ((void (APIENTRY *)(GLenum target, GLenum pname, GLfixed *params)) _func)(target, pname, params);
+}
+
+GLAPI void APIENTRY glGetTexEnvxv(GLenum target, GLenum pname, GLfixed *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[823];
+ ((void (APIENTRY *)(GLenum target, GLenum pname, GLfixed *params)) _func)(target, pname, params);
+}
+
+GLAPI void APIENTRY glGetTexGenxvOES(GLenum coord, GLenum pname, GLfixed *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[824];
+ ((void (APIENTRY *)(GLenum coord, GLenum pname, GLfixed *params)) _func)(coord, pname, params);
+}
+
+GLAPI void APIENTRY glGetTexParameterxvOES(GLenum target, GLenum pname, GLfixed *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[825];
+ ((void (APIENTRY *)(GLenum target, GLenum pname, GLfixed *params)) _func)(target, pname, params);
+}
+
+GLAPI void APIENTRY glGetTexParameterxv(GLenum target, GLenum pname, GLfixed *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[825];
+ ((void (APIENTRY *)(GLenum target, GLenum pname, GLfixed *params)) _func)(target, pname, params);
+}
+
+GLAPI void APIENTRY glLightModelxOES(GLenum pname, GLfixed param)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[826];
+ ((void (APIENTRY *)(GLenum pname, GLfixed param)) _func)(pname, param);
+}
+
+GLAPI void APIENTRY glLightModelx(GLenum pname, GLfixed param)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[826];
+ ((void (APIENTRY *)(GLenum pname, GLfixed param)) _func)(pname, param);
+}
+
+GLAPI void APIENTRY glLightModelxvOES(GLenum pname, const GLfixed *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[827];
+ ((void (APIENTRY *)(GLenum pname, const GLfixed *params)) _func)(pname, params);
+}
+
+GLAPI void APIENTRY glLightModelxv(GLenum pname, const GLfixed *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[827];
+ ((void (APIENTRY *)(GLenum pname, const GLfixed *params)) _func)(pname, params);
+}
+
+GLAPI void APIENTRY glLightxOES(GLenum light, GLenum pname, GLfixed param)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[828];
+ ((void (APIENTRY *)(GLenum light, GLenum pname, GLfixed param)) _func)(light, pname, param);
+}
+
+GLAPI void APIENTRY glLightx(GLenum light, GLenum pname, GLfixed param)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[828];
+ ((void (APIENTRY *)(GLenum light, GLenum pname, GLfixed param)) _func)(light, pname, param);
+}
+
+GLAPI void APIENTRY glLightxvOES(GLenum light, GLenum pname, const GLfixed *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[829];
+ ((void (APIENTRY *)(GLenum light, GLenum pname, const GLfixed *params)) _func)(light, pname, params);
+}
+
+GLAPI void APIENTRY glLightxv(GLenum light, GLenum pname, const GLfixed *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[829];
+ ((void (APIENTRY *)(GLenum light, GLenum pname, const GLfixed *params)) _func)(light, pname, params);
+}
+
+GLAPI void APIENTRY glLineWidthxOES(GLfixed width)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[830];
+ ((void (APIENTRY *)(GLfixed width)) _func)(width);
+}
+
+GLAPI void APIENTRY glLineWidthx(GLfixed width)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[830];
+ ((void (APIENTRY *)(GLfixed width)) _func)(width);
+}
+
+GLAPI void APIENTRY glLoadMatrixxOES(const GLfixed *m)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[831];
+ ((void (APIENTRY *)(const GLfixed *m)) _func)(m);
+}
+
+GLAPI void APIENTRY glLoadMatrixx(const GLfixed *m)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[831];
+ ((void (APIENTRY *)(const GLfixed *m)) _func)(m);
+}
+
+GLAPI void APIENTRY glMaterialxOES(GLenum face, GLenum pname, GLfixed param)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[832];
+ ((void (APIENTRY *)(GLenum face, GLenum pname, GLfixed param)) _func)(face, pname, param);
+}
+
+GLAPI void APIENTRY glMaterialx(GLenum face, GLenum pname, GLfixed param)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[832];
+ ((void (APIENTRY *)(GLenum face, GLenum pname, GLfixed param)) _func)(face, pname, param);
+}
+
+GLAPI void APIENTRY glMaterialxvOES(GLenum face, GLenum pname, const GLfixed *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[833];
+ ((void (APIENTRY *)(GLenum face, GLenum pname, const GLfixed *params)) _func)(face, pname, params);
+}
+
+GLAPI void APIENTRY glMaterialxv(GLenum face, GLenum pname, const GLfixed *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[833];
+ ((void (APIENTRY *)(GLenum face, GLenum pname, const GLfixed *params)) _func)(face, pname, params);
+}
+
+GLAPI void APIENTRY glMultMatrixxOES(const GLfixed *m)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[834];
+ ((void (APIENTRY *)(const GLfixed *m)) _func)(m);
+}
+
+GLAPI void APIENTRY glMultMatrixx(const GLfixed *m)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[834];
+ ((void (APIENTRY *)(const GLfixed *m)) _func)(m);
+}
+
+GLAPI void APIENTRY glMultiTexCoord4xOES(GLenum target, GLfixed s, GLfixed t, GLfixed r, GLfixed q)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[835];
+ ((void (APIENTRY *)(GLenum target, GLfixed s, GLfixed t, GLfixed r, GLfixed q)) _func)(target, s, t, r, q);
+}
+
+GLAPI void APIENTRY glMultiTexCoord4x(GLenum target, GLfixed s, GLfixed t, GLfixed r, GLfixed q)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[835];
+ ((void (APIENTRY *)(GLenum target, GLfixed s, GLfixed t, GLfixed r, GLfixed q)) _func)(target, s, t, r, q);
+}
+
+GLAPI void APIENTRY glNormal3xOES(GLfixed nx, GLfixed ny, GLfixed nz)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[836];
+ ((void (APIENTRY *)(GLfixed nx, GLfixed ny, GLfixed nz)) _func)(nx, ny, nz);
+}
+
+GLAPI void APIENTRY glNormal3x(GLfixed nx, GLfixed ny, GLfixed nz)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[836];
+ ((void (APIENTRY *)(GLfixed nx, GLfixed ny, GLfixed nz)) _func)(nx, ny, nz);
+}
+
+GLAPI void APIENTRY glOrthoxOES(GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[837];
+ ((void (APIENTRY *)(GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar)) _func)(left, right, bottom, top, zNear, zFar);
+}
+
+GLAPI void APIENTRY glOrthox(GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[837];
+ ((void (APIENTRY *)(GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar)) _func)(left, right, bottom, top, zNear, zFar);
+}
+
+GLAPI void APIENTRY glPointParameterxOES(GLenum pname, GLfixed param)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[838];
+ ((void (APIENTRY *)(GLenum pname, GLfixed param)) _func)(pname, param);
+}
+
+GLAPI void APIENTRY glPointParameterx(GLenum pname, GLfixed param)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[838];
+ ((void (APIENTRY *)(GLenum pname, GLfixed param)) _func)(pname, param);
+}
+
+GLAPI void APIENTRY glPointParameterxvOES(GLenum pname, const GLfixed *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[839];
+ ((void (APIENTRY *)(GLenum pname, const GLfixed *params)) _func)(pname, params);
+}
+
+GLAPI void APIENTRY glPointParameterxv(GLenum pname, const GLfixed *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[839];
+ ((void (APIENTRY *)(GLenum pname, const GLfixed *params)) _func)(pname, params);
+}
+
+GLAPI void APIENTRY glPointSizexOES(GLfixed size)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[840];
+ ((void (APIENTRY *)(GLfixed size)) _func)(size);
+}
+
+GLAPI void APIENTRY glPointSizex(GLfixed size)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[840];
+ ((void (APIENTRY *)(GLfixed size)) _func)(size);
+}
+
+GLAPI void APIENTRY glPolygonOffsetxOES(GLfixed factor, GLfixed units)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[841];
+ ((void (APIENTRY *)(GLfixed factor, GLfixed units)) _func)(factor, units);
+}
+
+GLAPI void APIENTRY glPolygonOffsetx(GLfixed factor, GLfixed units)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[841];
+ ((void (APIENTRY *)(GLfixed factor, GLfixed units)) _func)(factor, units);
+}
+
+GLAPI void APIENTRY glRotatexOES(GLfixed angle, GLfixed x, GLfixed y, GLfixed z)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[842];
+ ((void (APIENTRY *)(GLfixed angle, GLfixed x, GLfixed y, GLfixed z)) _func)(angle, x, y, z);
+}
+
+GLAPI void APIENTRY glRotatex(GLfixed angle, GLfixed x, GLfixed y, GLfixed z)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[842];
+ ((void (APIENTRY *)(GLfixed angle, GLfixed x, GLfixed y, GLfixed z)) _func)(angle, x, y, z);
+}
+
+GLAPI void APIENTRY glSampleCoveragexOES(GLclampx value, GLboolean invert)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[843];
+ ((void (APIENTRY *)(GLclampx value, GLboolean invert)) _func)(value, invert);
+}
+
+GLAPI void APIENTRY glSampleCoveragex(GLclampx value, GLboolean invert)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[843];
+ ((void (APIENTRY *)(GLclampx value, GLboolean invert)) _func)(value, invert);
+}
+
+GLAPI void APIENTRY glScalexOES(GLfixed x, GLfixed y, GLfixed z)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[844];
+ ((void (APIENTRY *)(GLfixed x, GLfixed y, GLfixed z)) _func)(x, y, z);
+}
+
+GLAPI void APIENTRY glScalex(GLfixed x, GLfixed y, GLfixed z)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[844];
+ ((void (APIENTRY *)(GLfixed x, GLfixed y, GLfixed z)) _func)(x, y, z);
+}
+
+GLAPI void APIENTRY glTexEnvxOES(GLenum target, GLenum pname, GLfixed param)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[845];
+ ((void (APIENTRY *)(GLenum target, GLenum pname, GLfixed param)) _func)(target, pname, param);
+}
+
+GLAPI void APIENTRY glTexEnvx(GLenum target, GLenum pname, GLfixed param)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[845];
+ ((void (APIENTRY *)(GLenum target, GLenum pname, GLfixed param)) _func)(target, pname, param);
+}
+
+GLAPI void APIENTRY glTexEnvxvOES(GLenum target, GLenum pname, const GLfixed *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[846];
+ ((void (APIENTRY *)(GLenum target, GLenum pname, const GLfixed *params)) _func)(target, pname, params);
+}
+
+GLAPI void APIENTRY glTexEnvxv(GLenum target, GLenum pname, const GLfixed *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[846];
+ ((void (APIENTRY *)(GLenum target, GLenum pname, const GLfixed *params)) _func)(target, pname, params);
+}
+
+GLAPI void APIENTRY glTexGenxOES(GLenum coord, GLenum pname, GLint param)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[847];
+ ((void (APIENTRY *)(GLenum coord, GLenum pname, GLint param)) _func)(coord, pname, param);
+}
+
+GLAPI void APIENTRY glTexGenxvOES(GLenum coord, GLenum pname, const GLfixed *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[848];
+ ((void (APIENTRY *)(GLenum coord, GLenum pname, const GLfixed *params)) _func)(coord, pname, params);
+}
+
+GLAPI void APIENTRY glTexParameterxOES(GLenum target, GLenum pname, GLfixed param)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[849];
+ ((void (APIENTRY *)(GLenum target, GLenum pname, GLfixed param)) _func)(target, pname, param);
+}
+
+GLAPI void APIENTRY glTexParameterx(GLenum target, GLenum pname, GLfixed param)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[849];
+ ((void (APIENTRY *)(GLenum target, GLenum pname, GLfixed param)) _func)(target, pname, param);
+}
+
+GLAPI void APIENTRY glTexParameterxvOES(GLenum target, GLenum pname, const GLfixed *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[850];
+ ((void (APIENTRY *)(GLenum target, GLenum pname, const GLfixed *params)) _func)(target, pname, params);
+}
+
+GLAPI void APIENTRY glTexParameterxv(GLenum target, GLenum pname, const GLfixed *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[850];
+ ((void (APIENTRY *)(GLenum target, GLenum pname, const GLfixed *params)) _func)(target, pname, params);
+}
+
+GLAPI void APIENTRY glTranslatexOES(GLfixed x, GLfixed y, GLfixed z)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[851];
+ ((void (APIENTRY *)(GLfixed x, GLfixed y, GLfixed z)) _func)(x, y, z);
+}
+
+GLAPI void APIENTRY glTranslatex(GLfixed x, GLfixed y, GLfixed z)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[851];
+ ((void (APIENTRY *)(GLfixed x, GLfixed y, GLfixed z)) _func)(x, y, z);
+}
+
+GLAPI void APIENTRY glClipPlanefOES(GLenum plane, const GLfloat *equation)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[852];
+ ((void (APIENTRY *)(GLenum plane, const GLfloat *equation)) _func)(plane, equation);
+}
+
+GLAPI void APIENTRY glClipPlanef(GLenum plane, const GLfloat *equation)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[852];
+ ((void (APIENTRY *)(GLenum plane, const GLfloat *equation)) _func)(plane, equation);
+}
+
+GLAPI void APIENTRY glFrustumfOES(GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[853];
+ ((void (APIENTRY *)(GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar)) _func)(left, right, bottom, top, zNear, zFar);
+}
+
+GLAPI void APIENTRY glFrustumf(GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[853];
+ ((void (APIENTRY *)(GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar)) _func)(left, right, bottom, top, zNear, zFar);
+}
+
+GLAPI void APIENTRY glGetClipPlanefOES(GLenum plane, GLfloat *equation)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[854];
+ ((void (APIENTRY *)(GLenum plane, GLfloat *equation)) _func)(plane, equation);
+}
+
+GLAPI void APIENTRY glGetClipPlanef(GLenum plane, GLfloat *equation)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[854];
+ ((void (APIENTRY *)(GLenum plane, GLfloat *equation)) _func)(plane, equation);
+}
+
+GLAPI void APIENTRY glOrthofOES(GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[855];
+ ((void (APIENTRY *)(GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar)) _func)(left, right, bottom, top, zNear, zFar);
+}
+
+GLAPI void APIENTRY glOrthof(GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[855];
+ ((void (APIENTRY *)(GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar)) _func)(left, right, bottom, top, zNear, zFar);
+}
+
+GLAPI void APIENTRY glBlendEquationSeparateOES(GLenum modeRGB, GLenum modeA)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[857];
+ ((void (APIENTRY *)(GLenum modeRGB, GLenum modeA)) _func)(modeRGB, modeA);
+}
+
+GLAPI void APIENTRY glBindFramebufferOES(GLenum target, GLuint framebuffer)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[858];
+ ((void (APIENTRY *)(GLenum target, GLuint framebuffer)) _func)(target, framebuffer);
+}
+
+GLAPI void APIENTRY glBindRenderbufferOES(GLenum target, GLuint renderbuffer)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[859];
+ ((void (APIENTRY *)(GLenum target, GLuint renderbuffer)) _func)(target, renderbuffer);
+}
+
+GLAPI GLenum APIENTRY glCheckFramebufferStatusOES(GLenum target)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[860];
+ return ((GLenum (APIENTRY *)(GLenum target)) _func)(target);
+}
+
+GLAPI void APIENTRY glDeleteFramebuffersOES(GLsizei n, const GLuint *framebuffers)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[861];
+ ((void (APIENTRY *)(GLsizei n, const GLuint *framebuffers)) _func)(n, framebuffers);
+}
+
+GLAPI void APIENTRY glDeleteRenderbuffersOES(GLsizei n, const GLuint *renderbuffers)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[862];
+ ((void (APIENTRY *)(GLsizei n, const GLuint *renderbuffers)) _func)(n, renderbuffers);
+}
+
+GLAPI void APIENTRY glFramebufferRenderbufferOES(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[863];
+ ((void (APIENTRY *)(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer)) _func)(target, attachment, renderbuffertarget, renderbuffer);
+}
+
+GLAPI void APIENTRY glFramebufferTexture2DOES(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[865];
+ ((void (APIENTRY *)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level)) _func)(target, attachment, textarget, texture, level);
+}
+
+GLAPI void APIENTRY glGenFramebuffersOES(GLsizei n, GLuint *framebuffers)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[867];
+ ((void (APIENTRY *)(GLsizei n, GLuint *framebuffers)) _func)(n, framebuffers);
+}
+
+GLAPI void APIENTRY glGenRenderbuffersOES(GLsizei n, GLuint *renderbuffers)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[868];
+ ((void (APIENTRY *)(GLsizei n, GLuint *renderbuffers)) _func)(n, renderbuffers);
+}
+
+GLAPI void APIENTRY glGenerateMipmapOES(GLenum target)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[869];
+ ((void (APIENTRY *)(GLenum target)) _func)(target);
+}
+
+GLAPI void APIENTRY glGetFramebufferAttachmentParameterivOES(GLenum target, GLenum attachment, GLenum pname, GLint *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[870];
+ ((void (APIENTRY *)(GLenum target, GLenum attachment, GLenum pname, GLint *params)) _func)(target, attachment, pname, params);
+}
+
+GLAPI void APIENTRY glGetRenderbufferParameterivOES(GLenum target, GLenum pname, GLint *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[871];
+ ((void (APIENTRY *)(GLenum target, GLenum pname, GLint *params)) _func)(target, pname, params);
+}
+
+GLAPI GLboolean APIENTRY glIsFramebufferOES(GLuint framebuffer)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[872];
+ return ((GLboolean (APIENTRY *)(GLuint framebuffer)) _func)(framebuffer);
+}
+
+GLAPI GLboolean APIENTRY glIsRenderbufferOES(GLuint renderbuffer)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[873];
+ return ((GLboolean (APIENTRY *)(GLuint renderbuffer)) _func)(renderbuffer);
+}
+
+GLAPI void APIENTRY glRenderbufferStorageOES(GLenum target, GLenum internalformat, GLsizei width, GLsizei height)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[874];
+ ((void (APIENTRY *)(GLenum target, GLenum internalformat, GLsizei width, GLsizei height)) _func)(target, internalformat, width, height);
+}
+
+GLAPI void APIENTRY glEGLImageTargetRenderbufferStorageOES(GLenum target, GLvoid *writeOffset)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[949];
+ ((void (APIENTRY *)(GLenum target, GLvoid *writeOffset)) _func)(target, writeOffset);
+}
+
+GLAPI void APIENTRY glEGLImageTargetTexture2DOES(GLenum target, GLvoid *writeOffset)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[950];
+ ((void (APIENTRY *)(GLenum target, GLvoid *writeOffset)) _func)(target, writeOffset);
+}
+
+/* does not need public_entries */
+#undef MAPI_TMP_PUBLIC_ENTRIES_NO_HIDDEN
+#endif /* MAPI_TMP_PUBLIC_ENTRIES_NO_HIDDEN */
+
+#ifdef MAPI_TMP_STUB_ASM_GCC_NO_HIDDEN
+__asm__(
+STUB_ASM_ENTRY("glColor4f")"\n"
+"\t"STUB_ASM_CODE("29")"\n"
+
+STUB_ASM_ENTRY("glColor4ub")"\n"
+"\t"STUB_ASM_CODE("35")"\n"
+
+STUB_ASM_ENTRY("glNormal3f")"\n"
+"\t"STUB_ASM_CODE("56")"\n"
+
+STUB_ASM_ENTRY("glCullFace")"\n"
+"\t"STUB_ASM_CODE("152")"\n"
+
+STUB_ASM_ENTRY("glFogf")"\n"
+"\t"STUB_ASM_CODE("153")"\n"
+
+STUB_ASM_ENTRY("glFogfv")"\n"
+"\t"STUB_ASM_CODE("154")"\n"
+
+STUB_ASM_ENTRY("glFrontFace")"\n"
+"\t"STUB_ASM_CODE("157")"\n"
+
+STUB_ASM_ENTRY("glHint")"\n"
+"\t"STUB_ASM_CODE("158")"\n"
+
+STUB_ASM_ENTRY("glLightf")"\n"
+"\t"STUB_ASM_CODE("159")"\n"
+
+STUB_ASM_ENTRY("glLightfv")"\n"
+"\t"STUB_ASM_CODE("160")"\n"
+
+STUB_ASM_ENTRY("glLightModelf")"\n"
+"\t"STUB_ASM_CODE("163")"\n"
+
+STUB_ASM_ENTRY("glLightModelfv")"\n"
+"\t"STUB_ASM_CODE("164")"\n"
+
+STUB_ASM_ENTRY("glLineWidth")"\n"
+"\t"STUB_ASM_CODE("168")"\n"
+
+STUB_ASM_ENTRY("glMaterialf")"\n"
+"\t"STUB_ASM_CODE("169")"\n"
+
+STUB_ASM_ENTRY("glMaterialfv")"\n"
+"\t"STUB_ASM_CODE("170")"\n"
+
+STUB_ASM_ENTRY("glPointSize")"\n"
+"\t"STUB_ASM_CODE("173")"\n"
+
+STUB_ASM_ENTRY("glScissor")"\n"
+"\t"STUB_ASM_CODE("176")"\n"
+
+STUB_ASM_ENTRY("glShadeModel")"\n"
+"\t"STUB_ASM_CODE("177")"\n"
+
+STUB_ASM_ENTRY("glTexParameterf")"\n"
+"\t"STUB_ASM_CODE("178")"\n"
+
+STUB_ASM_ENTRY("glTexParameterfv")"\n"
+"\t"STUB_ASM_CODE("179")"\n"
+
+STUB_ASM_ENTRY("glTexParameteri")"\n"
+"\t"STUB_ASM_CODE("180")"\n"
+
+STUB_ASM_ENTRY("glTexParameteriv")"\n"
+"\t"STUB_ASM_CODE("181")"\n"
+
+STUB_ASM_ENTRY("glTexImage2D")"\n"
+"\t"STUB_ASM_CODE("183")"\n"
+
+STUB_ASM_ENTRY("glTexEnvf")"\n"
+"\t"STUB_ASM_CODE("184")"\n"
+
+STUB_ASM_ENTRY("glTexEnvfv")"\n"
+"\t"STUB_ASM_CODE("185")"\n"
+
+STUB_ASM_ENTRY("glTexEnvi")"\n"
+"\t"STUB_ASM_CODE("186")"\n"
+
+STUB_ASM_ENTRY("glTexEnviv")"\n"
+"\t"STUB_ASM_CODE("187")"\n"
+
+STUB_ASM_ENTRY("glTexGenfOES")"\n"
+"\t"STUB_ASM_CODE("190")"\n"
+
+STUB_ASM_ENTRY("glTexGenfvOES")"\n"
+"\t"STUB_ASM_CODE("191")"\n"
+
+STUB_ASM_ENTRY("glTexGeniOES")"\n"
+"\t"STUB_ASM_CODE("192")"\n"
+
+STUB_ASM_ENTRY("glTexGenivOES")"\n"
+"\t"STUB_ASM_CODE("193")"\n"
+
+STUB_ASM_ENTRY("glClear")"\n"
+"\t"STUB_ASM_CODE("203")"\n"
+
+STUB_ASM_ENTRY("glClearColor")"\n"
+"\t"STUB_ASM_CODE("206")"\n"
+
+STUB_ASM_ENTRY("glClearStencil")"\n"
+"\t"STUB_ASM_CODE("207")"\n"
+
+STUB_ASM_ENTRY("glStencilMask")"\n"
+"\t"STUB_ASM_CODE("209")"\n"
+
+STUB_ASM_ENTRY("glColorMask")"\n"
+"\t"STUB_ASM_CODE("210")"\n"
+
+STUB_ASM_ENTRY("glDepthMask")"\n"
+"\t"STUB_ASM_CODE("211")"\n"
+
+STUB_ASM_ENTRY("glDisable")"\n"
+"\t"STUB_ASM_CODE("214")"\n"
+
+STUB_ASM_ENTRY("glEnable")"\n"
+"\t"STUB_ASM_CODE("215")"\n"
+
+STUB_ASM_ENTRY("glFinish")"\n"
+"\t"STUB_ASM_CODE("216")"\n"
+
+STUB_ASM_ENTRY("glFlush")"\n"
+"\t"STUB_ASM_CODE("217")"\n"
+
+STUB_ASM_ENTRY("glAlphaFunc")"\n"
+"\t"STUB_ASM_CODE("240")"\n"
+
+STUB_ASM_ENTRY("glBlendFunc")"\n"
+"\t"STUB_ASM_CODE("241")"\n"
+
+STUB_ASM_ENTRY("glLogicOp")"\n"
+"\t"STUB_ASM_CODE("242")"\n"
+
+STUB_ASM_ENTRY("glStencilFunc")"\n"
+"\t"STUB_ASM_CODE("243")"\n"
+
+STUB_ASM_ENTRY("glStencilOp")"\n"
+"\t"STUB_ASM_CODE("244")"\n"
+
+STUB_ASM_ENTRY("glDepthFunc")"\n"
+"\t"STUB_ASM_CODE("245")"\n"
+
+STUB_ASM_ENTRY("glPixelStorei")"\n"
+"\t"STUB_ASM_CODE("250")"\n"
+
+STUB_ASM_ENTRY("glReadPixels")"\n"
+"\t"STUB_ASM_CODE("256")"\n"
+
+STUB_ASM_ENTRY("glGetBooleanv")"\n"
+"\t"STUB_ASM_CODE("258")"\n"
+
+STUB_ASM_ENTRY("glGetError")"\n"
+"\t"STUB_ASM_CODE("261")"\n"
+
+STUB_ASM_ENTRY("glGetFloatv")"\n"
+"\t"STUB_ASM_CODE("262")"\n"
+
+STUB_ASM_ENTRY("glGetIntegerv")"\n"
+"\t"STUB_ASM_CODE("263")"\n"
+
+STUB_ASM_ENTRY("glGetLightfv")"\n"
+"\t"STUB_ASM_CODE("264")"\n"
+
+STUB_ASM_ENTRY("glGetMaterialfv")"\n"
+"\t"STUB_ASM_CODE("269")"\n"
+
+STUB_ASM_ENTRY("glGetString")"\n"
+"\t"STUB_ASM_CODE("275")"\n"
+
+STUB_ASM_ENTRY("glGetTexEnvfv")"\n"
+"\t"STUB_ASM_CODE("276")"\n"
+
+STUB_ASM_ENTRY("glGetTexEnviv")"\n"
+"\t"STUB_ASM_CODE("277")"\n"
+
+STUB_ASM_ENTRY("glGetTexGenfvOES")"\n"
+"\t"STUB_ASM_CODE("279")"\n"
+
+STUB_ASM_ENTRY("glGetTexGenivOES")"\n"
+"\t"STUB_ASM_CODE("280")"\n"
+
+STUB_ASM_ENTRY("glGetTexParameterfv")"\n"
+"\t"STUB_ASM_CODE("282")"\n"
+
+STUB_ASM_ENTRY("glGetTexParameteriv")"\n"
+"\t"STUB_ASM_CODE("283")"\n"
+
+STUB_ASM_ENTRY("glIsEnabled")"\n"
+"\t"STUB_ASM_CODE("286")"\n"
+
+STUB_ASM_ENTRY("glLoadIdentity")"\n"
+"\t"STUB_ASM_CODE("290")"\n"
+
+STUB_ASM_ENTRY("glLoadMatrixf")"\n"
+"\t"STUB_ASM_CODE("291")"\n"
+
+STUB_ASM_ENTRY("glMatrixMode")"\n"
+"\t"STUB_ASM_CODE("293")"\n"
+
+STUB_ASM_ENTRY("glMultMatrixf")"\n"
+"\t"STUB_ASM_CODE("294")"\n"
+
+STUB_ASM_ENTRY("glPopMatrix")"\n"
+"\t"STUB_ASM_CODE("297")"\n"
+
+STUB_ASM_ENTRY("glPushMatrix")"\n"
+"\t"STUB_ASM_CODE("298")"\n"
+
+STUB_ASM_ENTRY("glRotatef")"\n"
+"\t"STUB_ASM_CODE("300")"\n"
+
+STUB_ASM_ENTRY("glScalef")"\n"
+"\t"STUB_ASM_CODE("302")"\n"
+
+STUB_ASM_ENTRY("glTranslatef")"\n"
+"\t"STUB_ASM_CODE("304")"\n"
+
+STUB_ASM_ENTRY("glViewport")"\n"
+"\t"STUB_ASM_CODE("305")"\n"
+
+STUB_ASM_ENTRY("glBindTexture")"\n"
+"\t"STUB_ASM_CODE("307")"\n"
+
+STUB_ASM_ENTRY("glColorPointer")"\n"
+"\t"STUB_ASM_CODE("308")"\n"
+
+STUB_ASM_ENTRY("glDisableClientState")"\n"
+"\t"STUB_ASM_CODE("309")"\n"
+
+STUB_ASM_ENTRY("glDrawArrays")"\n"
+"\t"STUB_ASM_CODE("310")"\n"
+
+STUB_ASM_ENTRY("glDrawElements")"\n"
+"\t"STUB_ASM_CODE("311")"\n"
+
+STUB_ASM_ENTRY("glEnableClientState")"\n"
+"\t"STUB_ASM_CODE("313")"\n"
+
+STUB_ASM_ENTRY("glNormalPointer")"\n"
+"\t"STUB_ASM_CODE("318")"\n"
+
+STUB_ASM_ENTRY("glPolygonOffset")"\n"
+"\t"STUB_ASM_CODE("319")"\n"
+
+STUB_ASM_ENTRY("glTexCoordPointer")"\n"
+"\t"STUB_ASM_CODE("320")"\n"
+
+STUB_ASM_ENTRY("glVertexPointer")"\n"
+"\t"STUB_ASM_CODE("321")"\n"
+
+STUB_ASM_ENTRY("glCopyTexImage2D")"\n"
+"\t"STUB_ASM_CODE("324")"\n"
+
+STUB_ASM_ENTRY("glCopyTexSubImage2D")"\n"
+"\t"STUB_ASM_CODE("326")"\n"
+
+STUB_ASM_ENTRY("glDeleteTextures")"\n"
+"\t"STUB_ASM_CODE("327")"\n"
+
+STUB_ASM_ENTRY("glGenTextures")"\n"
+"\t"STUB_ASM_CODE("328")"\n"
+
+STUB_ASM_ENTRY("glGetPointerv")"\n"
+"\t"STUB_ASM_CODE("329")"\n"
+
+STUB_ASM_ENTRY("glIsTexture")"\n"
+"\t"STUB_ASM_CODE("330")"\n"
+
+STUB_ASM_ENTRY("glTexSubImage2D")"\n"
+"\t"STUB_ASM_CODE("333")"\n"
+
+STUB_ASM_ENTRY("glBlendEquationOES")"\n"
+"\t"STUB_ASM_CODE("337")"\n"
+
+STUB_ASM_ENTRY("glActiveTexture")"\n"
+"\t"STUB_ASM_CODE("374")"\n"
+
+STUB_ASM_ENTRY("glClientActiveTexture")"\n"
+"\t"STUB_ASM_CODE("375")"\n"
+
+STUB_ASM_ENTRY("glMultiTexCoord4f")"\n"
+"\t"STUB_ASM_CODE("402")"\n"
+
+STUB_ASM_ENTRY("glSampleCoverage")"\n"
+"\t"STUB_ASM_CODE("445")"\n"
+
+STUB_ASM_ENTRY("glCompressedTexImage2D")"\n"
+"\t"STUB_ASM_CODE("447")"\n"
+
+STUB_ASM_ENTRY("glCompressedTexSubImage2D")"\n"
+"\t"STUB_ASM_CODE("450")"\n"
+
+STUB_ASM_ENTRY("glBindBuffer")"\n"
+"\t"STUB_ASM_CODE("510")"\n"
+
+STUB_ASM_ENTRY("glBufferData")"\n"
+"\t"STUB_ASM_CODE("511")"\n"
+
+STUB_ASM_ENTRY("glBufferSubData")"\n"
+"\t"STUB_ASM_CODE("512")"\n"
+
+STUB_ASM_ENTRY("glDeleteBuffers")"\n"
+"\t"STUB_ASM_CODE("513")"\n"
+
+STUB_ASM_ENTRY("glGenBuffers")"\n"
+"\t"STUB_ASM_CODE("514")"\n"
+
+STUB_ASM_ENTRY("glGetBufferParameteriv")"\n"
+"\t"STUB_ASM_CODE("515")"\n"
+
+STUB_ASM_ENTRY("glGetBufferPointervOES")"\n"
+"\t"STUB_ASM_CODE("516")"\n"
+
+STUB_ASM_ENTRY("glIsBuffer")"\n"
+"\t"STUB_ASM_CODE("518")"\n"
+
+STUB_ASM_ENTRY("glMapBufferOES")"\n"
+"\t"STUB_ASM_CODE("519")"\n"
+
+STUB_ASM_ENTRY("glUnmapBufferOES")"\n"
+"\t"STUB_ASM_CODE("520")"\n"
+
+STUB_ASM_ENTRY("glClearDepthf")"\n"
+"\t"STUB_ASM_CODE("605")"\n"
+
+".globl ""glClearDepthfOES""\n"
+".set ""glClearDepthfOES"", ""glClearDepthf""\n"
+
+STUB_ASM_ENTRY("glDepthRangef")"\n"
+"\t"STUB_ASM_CODE("606")"\n"
+
+".globl ""glDepthRangefOES""\n"
+".set ""glDepthRangefOES"", ""glDepthRangef""\n"
+
+STUB_ASM_ENTRY("glDrawTexfOES")"\n"
+"\t"STUB_ASM_CODE("614")"\n"
+
+STUB_ASM_ENTRY("glDrawTexfvOES")"\n"
+"\t"STUB_ASM_CODE("615")"\n"
+
+STUB_ASM_ENTRY("glDrawTexiOES")"\n"
+"\t"STUB_ASM_CODE("616")"\n"
+
+STUB_ASM_ENTRY("glDrawTexivOES")"\n"
+"\t"STUB_ASM_CODE("617")"\n"
+
+STUB_ASM_ENTRY("glDrawTexsOES")"\n"
+"\t"STUB_ASM_CODE("618")"\n"
+
+STUB_ASM_ENTRY("glDrawTexsvOES")"\n"
+"\t"STUB_ASM_CODE("619")"\n"
+
+STUB_ASM_ENTRY("glDrawTexxOES")"\n"
+"\t"STUB_ASM_CODE("620")"\n"
+
+STUB_ASM_ENTRY("glDrawTexxvOES")"\n"
+"\t"STUB_ASM_CODE("621")"\n"
+
+STUB_ASM_ENTRY("glPointSizePointerOES")"\n"
+"\t"STUB_ASM_CODE("622")"\n"
+
+STUB_ASM_ENTRY("glQueryMatrixxOES")"\n"
+"\t"STUB_ASM_CODE("629")"\n"
+
+STUB_ASM_ENTRY("glPointParameterf")"\n"
+"\t"STUB_ASM_CODE("638")"\n"
+
+STUB_ASM_ENTRY("glPointParameterfv")"\n"
+"\t"STUB_ASM_CODE("639")"\n"
+
+STUB_ASM_ENTRY("glMultiDrawArraysEXT")"\n"
+"\t"STUB_ASM_CODE("659")"\n"
+
+STUB_ASM_ENTRY("glMultiDrawElementsEXT")"\n"
+"\t"STUB_ASM_CODE("660")"\n"
+
+STUB_ASM_ENTRY("glBlendFuncSeparateOES")"\n"
+"\t"STUB_ASM_CODE("667")"\n"
+
+STUB_ASM_ENTRY("glAlphaFuncxOES")"\n"
+"\t"STUB_ASM_CODE("810")"\n"
+
+".globl ""glAlphaFuncx""\n"
+".set ""glAlphaFuncx"", ""glAlphaFuncxOES""\n"
+
+STUB_ASM_ENTRY("glClearColorxOES")"\n"
+"\t"STUB_ASM_CODE("811")"\n"
+
+".globl ""glClearColorx""\n"
+".set ""glClearColorx"", ""glClearColorxOES""\n"
+
+STUB_ASM_ENTRY("glClearDepthxOES")"\n"
+"\t"STUB_ASM_CODE("812")"\n"
+
+".globl ""glClearDepthx""\n"
+".set ""glClearDepthx"", ""glClearDepthxOES""\n"
+
+STUB_ASM_ENTRY("glClipPlanexOES")"\n"
+"\t"STUB_ASM_CODE("813")"\n"
+
+".globl ""glClipPlanex""\n"
+".set ""glClipPlanex"", ""glClipPlanexOES""\n"
+
+STUB_ASM_ENTRY("glColor4xOES")"\n"
+"\t"STUB_ASM_CODE("814")"\n"
+
+".globl ""glColor4x""\n"
+".set ""glColor4x"", ""glColor4xOES""\n"
+
+STUB_ASM_ENTRY("glDepthRangexOES")"\n"
+"\t"STUB_ASM_CODE("815")"\n"
+
+".globl ""glDepthRangex""\n"
+".set ""glDepthRangex"", ""glDepthRangexOES""\n"
+
+STUB_ASM_ENTRY("glFogxOES")"\n"
+"\t"STUB_ASM_CODE("816")"\n"
+
+".globl ""glFogx""\n"
+".set ""glFogx"", ""glFogxOES""\n"
+
+STUB_ASM_ENTRY("glFogxvOES")"\n"
+"\t"STUB_ASM_CODE("817")"\n"
+
+".globl ""glFogxv""\n"
+".set ""glFogxv"", ""glFogxvOES""\n"
+
+STUB_ASM_ENTRY("glFrustumxOES")"\n"
+"\t"STUB_ASM_CODE("818")"\n"
+
+".globl ""glFrustumx""\n"
+".set ""glFrustumx"", ""glFrustumxOES""\n"
+
+STUB_ASM_ENTRY("glGetClipPlanexOES")"\n"
+"\t"STUB_ASM_CODE("819")"\n"
+
+".globl ""glGetClipPlanex""\n"
+".set ""glGetClipPlanex"", ""glGetClipPlanexOES""\n"
+
+STUB_ASM_ENTRY("glGetFixedvOES")"\n"
+"\t"STUB_ASM_CODE("820")"\n"
+
+".globl ""glGetFixedv""\n"
+".set ""glGetFixedv"", ""glGetFixedvOES""\n"
+
+STUB_ASM_ENTRY("glGetLightxvOES")"\n"
+"\t"STUB_ASM_CODE("821")"\n"
+
+".globl ""glGetLightxv""\n"
+".set ""glGetLightxv"", ""glGetLightxvOES""\n"
+
+STUB_ASM_ENTRY("glGetMaterialxvOES")"\n"
+"\t"STUB_ASM_CODE("822")"\n"
+
+".globl ""glGetMaterialxv""\n"
+".set ""glGetMaterialxv"", ""glGetMaterialxvOES""\n"
+
+STUB_ASM_ENTRY("glGetTexEnvxvOES")"\n"
+"\t"STUB_ASM_CODE("823")"\n"
+
+".globl ""glGetTexEnvxv""\n"
+".set ""glGetTexEnvxv"", ""glGetTexEnvxvOES""\n"
+
+STUB_ASM_ENTRY("glGetTexGenxvOES")"\n"
+"\t"STUB_ASM_CODE("824")"\n"
+
+STUB_ASM_ENTRY("glGetTexParameterxvOES")"\n"
+"\t"STUB_ASM_CODE("825")"\n"
+
+".globl ""glGetTexParameterxv""\n"
+".set ""glGetTexParameterxv"", ""glGetTexParameterxvOES""\n"
+
+STUB_ASM_ENTRY("glLightModelxOES")"\n"
+"\t"STUB_ASM_CODE("826")"\n"
+
+".globl ""glLightModelx""\n"
+".set ""glLightModelx"", ""glLightModelxOES""\n"
+
+STUB_ASM_ENTRY("glLightModelxvOES")"\n"
+"\t"STUB_ASM_CODE("827")"\n"
+
+".globl ""glLightModelxv""\n"
+".set ""glLightModelxv"", ""glLightModelxvOES""\n"
+
+STUB_ASM_ENTRY("glLightxOES")"\n"
+"\t"STUB_ASM_CODE("828")"\n"
+
+".globl ""glLightx""\n"
+".set ""glLightx"", ""glLightxOES""\n"
+
+STUB_ASM_ENTRY("glLightxvOES")"\n"
+"\t"STUB_ASM_CODE("829")"\n"
+
+".globl ""glLightxv""\n"
+".set ""glLightxv"", ""glLightxvOES""\n"
+
+STUB_ASM_ENTRY("glLineWidthxOES")"\n"
+"\t"STUB_ASM_CODE("830")"\n"
+
+".globl ""glLineWidthx""\n"
+".set ""glLineWidthx"", ""glLineWidthxOES""\n"
+
+STUB_ASM_ENTRY("glLoadMatrixxOES")"\n"
+"\t"STUB_ASM_CODE("831")"\n"
+
+".globl ""glLoadMatrixx""\n"
+".set ""glLoadMatrixx"", ""glLoadMatrixxOES""\n"
+
+STUB_ASM_ENTRY("glMaterialxOES")"\n"
+"\t"STUB_ASM_CODE("832")"\n"
+
+".globl ""glMaterialx""\n"
+".set ""glMaterialx"", ""glMaterialxOES""\n"
+
+STUB_ASM_ENTRY("glMaterialxvOES")"\n"
+"\t"STUB_ASM_CODE("833")"\n"
+
+".globl ""glMaterialxv""\n"
+".set ""glMaterialxv"", ""glMaterialxvOES""\n"
+
+STUB_ASM_ENTRY("glMultMatrixxOES")"\n"
+"\t"STUB_ASM_CODE("834")"\n"
+
+".globl ""glMultMatrixx""\n"
+".set ""glMultMatrixx"", ""glMultMatrixxOES""\n"
+
+STUB_ASM_ENTRY("glMultiTexCoord4xOES")"\n"
+"\t"STUB_ASM_CODE("835")"\n"
+
+".globl ""glMultiTexCoord4x""\n"
+".set ""glMultiTexCoord4x"", ""glMultiTexCoord4xOES""\n"
+
+STUB_ASM_ENTRY("glNormal3xOES")"\n"
+"\t"STUB_ASM_CODE("836")"\n"
+
+".globl ""glNormal3x""\n"
+".set ""glNormal3x"", ""glNormal3xOES""\n"
+
+STUB_ASM_ENTRY("glOrthoxOES")"\n"
+"\t"STUB_ASM_CODE("837")"\n"
+
+".globl ""glOrthox""\n"
+".set ""glOrthox"", ""glOrthoxOES""\n"
+
+STUB_ASM_ENTRY("glPointParameterxOES")"\n"
+"\t"STUB_ASM_CODE("838")"\n"
+
+".globl ""glPointParameterx""\n"
+".set ""glPointParameterx"", ""glPointParameterxOES""\n"
+
+STUB_ASM_ENTRY("glPointParameterxvOES")"\n"
+"\t"STUB_ASM_CODE("839")"\n"
+
+".globl ""glPointParameterxv""\n"
+".set ""glPointParameterxv"", ""glPointParameterxvOES""\n"
+
+STUB_ASM_ENTRY("glPointSizexOES")"\n"
+"\t"STUB_ASM_CODE("840")"\n"
+
+".globl ""glPointSizex""\n"
+".set ""glPointSizex"", ""glPointSizexOES""\n"
+
+STUB_ASM_ENTRY("glPolygonOffsetxOES")"\n"
+"\t"STUB_ASM_CODE("841")"\n"
+
+".globl ""glPolygonOffsetx""\n"
+".set ""glPolygonOffsetx"", ""glPolygonOffsetxOES""\n"
+
+STUB_ASM_ENTRY("glRotatexOES")"\n"
+"\t"STUB_ASM_CODE("842")"\n"
+
+".globl ""glRotatex""\n"
+".set ""glRotatex"", ""glRotatexOES""\n"
+
+STUB_ASM_ENTRY("glSampleCoveragexOES")"\n"
+"\t"STUB_ASM_CODE("843")"\n"
+
+".globl ""glSampleCoveragex""\n"
+".set ""glSampleCoveragex"", ""glSampleCoveragexOES""\n"
+
+STUB_ASM_ENTRY("glScalexOES")"\n"
+"\t"STUB_ASM_CODE("844")"\n"
+
+".globl ""glScalex""\n"
+".set ""glScalex"", ""glScalexOES""\n"
+
+STUB_ASM_ENTRY("glTexEnvxOES")"\n"
+"\t"STUB_ASM_CODE("845")"\n"
+
+".globl ""glTexEnvx""\n"
+".set ""glTexEnvx"", ""glTexEnvxOES""\n"
+
+STUB_ASM_ENTRY("glTexEnvxvOES")"\n"
+"\t"STUB_ASM_CODE("846")"\n"
+
+".globl ""glTexEnvxv""\n"
+".set ""glTexEnvxv"", ""glTexEnvxvOES""\n"
+
+STUB_ASM_ENTRY("glTexGenxOES")"\n"
+"\t"STUB_ASM_CODE("847")"\n"
+
+STUB_ASM_ENTRY("glTexGenxvOES")"\n"
+"\t"STUB_ASM_CODE("848")"\n"
+
+STUB_ASM_ENTRY("glTexParameterxOES")"\n"
+"\t"STUB_ASM_CODE("849")"\n"
+
+".globl ""glTexParameterx""\n"
+".set ""glTexParameterx"", ""glTexParameterxOES""\n"
+
+STUB_ASM_ENTRY("glTexParameterxvOES")"\n"
+"\t"STUB_ASM_CODE("850")"\n"
+
+".globl ""glTexParameterxv""\n"
+".set ""glTexParameterxv"", ""glTexParameterxvOES""\n"
+
+STUB_ASM_ENTRY("glTranslatexOES")"\n"
+"\t"STUB_ASM_CODE("851")"\n"
+
+".globl ""glTranslatex""\n"
+".set ""glTranslatex"", ""glTranslatexOES""\n"
+
+STUB_ASM_ENTRY("glClipPlanefOES")"\n"
+"\t"STUB_ASM_CODE("852")"\n"
+
+".globl ""glClipPlanef""\n"
+".set ""glClipPlanef"", ""glClipPlanefOES""\n"
+
+STUB_ASM_ENTRY("glFrustumfOES")"\n"
+"\t"STUB_ASM_CODE("853")"\n"
+
+".globl ""glFrustumf""\n"
+".set ""glFrustumf"", ""glFrustumfOES""\n"
+
+STUB_ASM_ENTRY("glGetClipPlanefOES")"\n"
+"\t"STUB_ASM_CODE("854")"\n"
+
+".globl ""glGetClipPlanef""\n"
+".set ""glGetClipPlanef"", ""glGetClipPlanefOES""\n"
+
+STUB_ASM_ENTRY("glOrthofOES")"\n"
+"\t"STUB_ASM_CODE("855")"\n"
+
+".globl ""glOrthof""\n"
+".set ""glOrthof"", ""glOrthofOES""\n"
+
+STUB_ASM_ENTRY("glBlendEquationSeparateOES")"\n"
+"\t"STUB_ASM_CODE("857")"\n"
+
+STUB_ASM_ENTRY("glBindFramebufferOES")"\n"
+"\t"STUB_ASM_CODE("858")"\n"
+
+STUB_ASM_ENTRY("glBindRenderbufferOES")"\n"
+"\t"STUB_ASM_CODE("859")"\n"
+
+STUB_ASM_ENTRY("glCheckFramebufferStatusOES")"\n"
+"\t"STUB_ASM_CODE("860")"\n"
+
+STUB_ASM_ENTRY("glDeleteFramebuffersOES")"\n"
+"\t"STUB_ASM_CODE("861")"\n"
+
+STUB_ASM_ENTRY("glDeleteRenderbuffersOES")"\n"
+"\t"STUB_ASM_CODE("862")"\n"
+
+STUB_ASM_ENTRY("glFramebufferRenderbufferOES")"\n"
+"\t"STUB_ASM_CODE("863")"\n"
+
+STUB_ASM_ENTRY("glFramebufferTexture2DOES")"\n"
+"\t"STUB_ASM_CODE("865")"\n"
+
+STUB_ASM_ENTRY("glGenFramebuffersOES")"\n"
+"\t"STUB_ASM_CODE("867")"\n"
+
+STUB_ASM_ENTRY("glGenRenderbuffersOES")"\n"
+"\t"STUB_ASM_CODE("868")"\n"
+
+STUB_ASM_ENTRY("glGenerateMipmapOES")"\n"
+"\t"STUB_ASM_CODE("869")"\n"
+
+STUB_ASM_ENTRY("glGetFramebufferAttachmentParameterivOES")"\n"
+"\t"STUB_ASM_CODE("870")"\n"
+
+STUB_ASM_ENTRY("glGetRenderbufferParameterivOES")"\n"
+"\t"STUB_ASM_CODE("871")"\n"
+
+STUB_ASM_ENTRY("glIsFramebufferOES")"\n"
+"\t"STUB_ASM_CODE("872")"\n"
+
+STUB_ASM_ENTRY("glIsRenderbufferOES")"\n"
+"\t"STUB_ASM_CODE("873")"\n"
+
+STUB_ASM_ENTRY("glRenderbufferStorageOES")"\n"
+"\t"STUB_ASM_CODE("874")"\n"
+
+STUB_ASM_ENTRY("glEGLImageTargetRenderbufferStorageOES")"\n"
+"\t"STUB_ASM_CODE("949")"\n"
+
+STUB_ASM_ENTRY("glEGLImageTargetTexture2DOES")"\n"
+"\t"STUB_ASM_CODE("950")"\n"
+
+);
+#undef MAPI_TMP_STUB_ASM_GCC_NO_HIDDEN
+#endif /* MAPI_TMP_STUB_ASM_GCC_NO_HIDDEN */
diff --git a/src/mapi/es2api/.gitignore b/src/mapi/es2api/.gitignore
new file mode 100644
index 00000000000..b21f1d14c6f
--- /dev/null
+++ b/src/mapi/es2api/.gitignore
@@ -0,0 +1,4 @@
+glapi_mapi_tmp.h
+glapi-stamp
+glapi
+main
diff --git a/src/mapi/es2api/glapi/glapi_sparc.S b/src/mapi/es2api/glapi/glapi_sparc.S
deleted file mode 100644
index ce1e3aeb53b..00000000000
--- a/src/mapi/es2api/glapi/glapi_sparc.S
+++ /dev/null
@@ -1,1084 +0,0 @@
-/* DO NOT EDIT - This file generated automatically by gl_SPARC_asm.py (from Mesa) script */
-
-/*
- * Copyright (C) 1999-2003 Brian Paul All Rights Reserved.
- * (C) Copyright IBM Corporation 2004
- * 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
- * BRIAN PAUL, IBM,
- * AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
- * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-#ifdef __arch64__
-#define GL_OFF(N) ((N) * 8)
-#define GL_LL ldx
-#define GL_TIE_LD(SYM) %tie_ldx(SYM)
-#define GL_STACK_SIZE 128
-#else
-#define GL_OFF(N) ((N) * 4)
-#define GL_LL ld
-#define GL_TIE_LD(SYM) %tie_ld(SYM)
-#define GL_STACK_SIZE 64
-#endif
-
-#define GLOBL_FN(x) .globl x ; .type x, @function
-#define HIDDEN(x) .hidden x
-
- .register %g2, #scratch
- .register %g3, #scratch
-
- .text
-
- GLOBL_FN(__glapi_sparc_icache_flush)
- HIDDEN(__glapi_sparc_icache_flush)
- .type __glapi_sparc_icache_flush, @function
-__glapi_sparc_icache_flush: /* %o0 = insn_addr */
- flush %o0
- retl
- nop
-
- .align 32
-
- .type __glapi_sparc_get_pc, @function
-__glapi_sparc_get_pc:
- retl
- add %o7, %g2, %g2
- .size __glapi_sparc_get_pc, .-__glapi_sparc_get_pc
-
-#ifdef GLX_USE_TLS
-
- GLOBL_FN(__glapi_sparc_get_dispatch)
- HIDDEN(__glapi_sparc_get_dispatch)
-__glapi_sparc_get_dispatch:
- mov %o7, %g1
- sethi %hi(_GLOBAL_OFFSET_TABLE_-4), %g2
- call __glapi_sparc_get_pc
- add %g2, %lo(_GLOBAL_OFFSET_TABLE_+4), %g2
- mov %g1, %o7
- sethi %tie_hi22(_glapi_tls_Dispatch), %g1
- add %g1, %tie_lo10(_glapi_tls_Dispatch), %g1
- GL_LL [%g2 + %g1], %g2, GL_TIE_LD(_glapi_tls_Dispatch)
- retl
- mov %g2, %o0
-
- .data
- .align 32
-
- /* --> sethi %hi(_glapi_tls_Dispatch), %g1 */
- /* --> or %g1, %lo(_glapi_tls_Dispatch), %g1 */
- GLOBL_FN(__glapi_sparc_tls_stub)
- HIDDEN(__glapi_sparc_tls_stub)
-__glapi_sparc_tls_stub: /* Call offset in %g3 */
- mov %o7, %g1
- sethi %hi(_GLOBAL_OFFSET_TABLE_-4), %g2
- call __glapi_sparc_get_pc
- add %g2, %lo(_GLOBAL_OFFSET_TABLE_+4), %g2
- mov %g1, %o7
- srl %g3, 10, %g3
- sethi %tie_hi22(_glapi_tls_Dispatch), %g1
- add %g1, %tie_lo10(_glapi_tls_Dispatch), %g1
- GL_LL [%g2 + %g1], %g2, GL_TIE_LD(_glapi_tls_Dispatch)
- GL_LL [%g7+%g2], %g1
- GL_LL [%g1 + %g3], %g1
- jmp %g1
- nop
- .size __glapi_sparc_tls_stub, .-__glapi_sparc_tls_stub
-
-#define GL_STUB(fn, off) \
- GLOBL_FN(fn); \
-fn: ba __glapi_sparc_tls_stub; \
- sethi GL_OFF(off), %g3; \
- .size fn,.-fn;
-
-#elif defined(PTHREADS)
-
- /* 64-bit 0x00 --> sethi %hh(_glapi_Dispatch), %g1 */
- /* 64-bit 0x04 --> sethi %lm(_glapi_Dispatch), %g2 */
- /* 64-bit 0x08 --> or %g1, %hm(_glapi_Dispatch), %g1 */
- /* 64-bit 0x0c --> sllx %g1, 32, %g1 */
- /* 64-bit 0x10 --> add %g1, %g2, %g1 */
- /* 64-bit 0x14 --> ldx [%g1 + %lo(_glapi_Dispatch)], %g1 */
-
- /* 32-bit 0x00 --> sethi %hi(_glapi_Dispatch), %g1 */
- /* 32-bit 0x04 --> ld [%g1 + %lo(_glapi_Dispatch)], %g1 */
-
- .data
- .align 32
-
- GLOBL_FN(__glapi_sparc_pthread_stub)
- HIDDEN(__glapi_sparc_pthread_stub)
-__glapi_sparc_pthread_stub: /* Call offset in %g3 */
- mov %o7, %g1
- sethi %hi(_GLOBAL_OFFSET_TABLE_-4), %g2
- call __glapi_sparc_get_pc
- add %g2, %lo(_GLOBAL_OFFSET_TABLE_+4), %g2
- mov %g1, %o7
- sethi %hi(_glapi_Dispatch), %g1
- or %g1, %lo(_glapi_Dispatch), %g1
- srl %g3, 10, %g3
- GL_LL [%g2+%g1], %g2
- GL_LL [%g2], %g1
- cmp %g1, 0
- be 2f
- nop
-1: GL_LL [%g1 + %g3], %g1
- jmp %g1
- nop
-2: save %sp, GL_STACK_SIZE, %sp
- mov %g3, %l0
- call _glapi_get_dispatch
- nop
- mov %o0, %g1
- mov %l0, %g3
- ba 1b
- restore %g0, %g0, %g0
- .size __glapi_sparc_pthread_stub, .-__glapi_sparc_pthread_stub
-
-#define GL_STUB(fn, off) \
- GLOBL_FN(fn); \
-fn: ba __glapi_sparc_pthread_stub; \
- sethi GL_OFF(off), %g3; \
- .size fn,.-fn;
-
-#else /* Non-threaded version. */
-
- .type __glapi_sparc_nothread_stub, @function
-__glapi_sparc_nothread_stub: /* Call offset in %g3 */
- mov %o7, %g1
- sethi %hi(_GLOBAL_OFFSET_TABLE_-4), %g2
- call __glapi_sparc_get_pc
- add %g2, %lo(_GLOBAL_OFFSET_TABLE_+4), %g2
- mov %g1, %o7
- srl %g3, 10, %g3
- sethi %hi(_glapi_Dispatch), %g1
- or %g1, %lo(_glapi_Dispatch), %g1
- GL_LL [%g2+%g1], %g2
- GL_LL [%g2], %g1
- GL_LL [%g1 + %g3], %g1
- jmp %g1
- nop
- .size __glapi_sparc_nothread_stub, .-__glapi_sparc_nothread_stub
-
-#define GL_STUB(fn, off) \
- GLOBL_FN(fn); \
-fn: ba __glapi_sparc_nothread_stub; \
- sethi GL_OFF(off), %g3; \
- .size fn,.-fn;
-
-#endif
-
-#define GL_STUB_ALIAS(fn, alias) \
- .globl fn; \
- .set fn, alias
-
- .text
- .align 32
-
- .globl gl_dispatch_functions_start
- HIDDEN(gl_dispatch_functions_start)
-gl_dispatch_functions_start:
-
- GL_STUB(gl_dispatch_stub_0, 0)
- HIDDEN(gl_dispatch_stub_0)
- GL_STUB(gl_dispatch_stub_1, 1)
- HIDDEN(gl_dispatch_stub_1)
- GL_STUB(gl_dispatch_stub_2, 2)
- HIDDEN(gl_dispatch_stub_2)
- GL_STUB(gl_dispatch_stub_3, 3)
- HIDDEN(gl_dispatch_stub_3)
- GL_STUB(gl_dispatch_stub_4, 4)
- HIDDEN(gl_dispatch_stub_4)
- GL_STUB(gl_dispatch_stub_5, 5)
- HIDDEN(gl_dispatch_stub_5)
- GL_STUB(gl_dispatch_stub_6, 6)
- HIDDEN(gl_dispatch_stub_6)
- GL_STUB(gl_dispatch_stub_7, 7)
- HIDDEN(gl_dispatch_stub_7)
- GL_STUB(gl_dispatch_stub_8, 8)
- HIDDEN(gl_dispatch_stub_8)
- GL_STUB(gl_dispatch_stub_9, 9)
- HIDDEN(gl_dispatch_stub_9)
- GL_STUB(gl_dispatch_stub_10, 10)
- HIDDEN(gl_dispatch_stub_10)
- GL_STUB(gl_dispatch_stub_11, 11)
- HIDDEN(gl_dispatch_stub_11)
- GL_STUB(gl_dispatch_stub_12, 12)
- HIDDEN(gl_dispatch_stub_12)
- GL_STUB(gl_dispatch_stub_13, 13)
- HIDDEN(gl_dispatch_stub_13)
- GL_STUB(gl_dispatch_stub_14, 14)
- HIDDEN(gl_dispatch_stub_14)
- GL_STUB(gl_dispatch_stub_15, 15)
- HIDDEN(gl_dispatch_stub_15)
- GL_STUB(gl_dispatch_stub_16, 16)
- HIDDEN(gl_dispatch_stub_16)
- GL_STUB(gl_dispatch_stub_17, 17)
- HIDDEN(gl_dispatch_stub_17)
- GL_STUB(gl_dispatch_stub_18, 18)
- HIDDEN(gl_dispatch_stub_18)
- GL_STUB(gl_dispatch_stub_19, 19)
- HIDDEN(gl_dispatch_stub_19)
- GL_STUB(gl_dispatch_stub_20, 20)
- HIDDEN(gl_dispatch_stub_20)
- GL_STUB(gl_dispatch_stub_21, 21)
- HIDDEN(gl_dispatch_stub_21)
- GL_STUB(gl_dispatch_stub_22, 22)
- HIDDEN(gl_dispatch_stub_22)
- GL_STUB(gl_dispatch_stub_23, 23)
- HIDDEN(gl_dispatch_stub_23)
- GL_STUB(gl_dispatch_stub_24, 24)
- HIDDEN(gl_dispatch_stub_24)
- GL_STUB(gl_dispatch_stub_25, 25)
- HIDDEN(gl_dispatch_stub_25)
- GL_STUB(gl_dispatch_stub_26, 26)
- HIDDEN(gl_dispatch_stub_26)
- GL_STUB(gl_dispatch_stub_27, 27)
- HIDDEN(gl_dispatch_stub_27)
- GL_STUB(gl_dispatch_stub_28, 28)
- HIDDEN(gl_dispatch_stub_28)
- GL_STUB(gl_dispatch_stub_29, 29)
- HIDDEN(gl_dispatch_stub_29)
- GL_STUB(gl_dispatch_stub_30, 30)
- HIDDEN(gl_dispatch_stub_30)
- GL_STUB(gl_dispatch_stub_31, 31)
- HIDDEN(gl_dispatch_stub_31)
- GL_STUB(gl_dispatch_stub_32, 32)
- HIDDEN(gl_dispatch_stub_32)
- GL_STUB(gl_dispatch_stub_33, 33)
- HIDDEN(gl_dispatch_stub_33)
- GL_STUB(gl_dispatch_stub_34, 34)
- HIDDEN(gl_dispatch_stub_34)
- GL_STUB(gl_dispatch_stub_35, 35)
- HIDDEN(gl_dispatch_stub_35)
- GL_STUB(gl_dispatch_stub_36, 36)
- HIDDEN(gl_dispatch_stub_36)
- GL_STUB(gl_dispatch_stub_37, 37)
- HIDDEN(gl_dispatch_stub_37)
- GL_STUB(gl_dispatch_stub_38, 38)
- HIDDEN(gl_dispatch_stub_38)
- GL_STUB(gl_dispatch_stub_39, 39)
- HIDDEN(gl_dispatch_stub_39)
- GL_STUB(gl_dispatch_stub_40, 40)
- HIDDEN(gl_dispatch_stub_40)
- GL_STUB(gl_dispatch_stub_41, 41)
- HIDDEN(gl_dispatch_stub_41)
- GL_STUB(gl_dispatch_stub_42, 42)
- HIDDEN(gl_dispatch_stub_42)
- GL_STUB(gl_dispatch_stub_43, 43)
- HIDDEN(gl_dispatch_stub_43)
- GL_STUB(gl_dispatch_stub_44, 44)
- HIDDEN(gl_dispatch_stub_44)
- GL_STUB(gl_dispatch_stub_45, 45)
- HIDDEN(gl_dispatch_stub_45)
- GL_STUB(gl_dispatch_stub_46, 46)
- HIDDEN(gl_dispatch_stub_46)
- GL_STUB(gl_dispatch_stub_47, 47)
- HIDDEN(gl_dispatch_stub_47)
- GL_STUB(gl_dispatch_stub_48, 48)
- HIDDEN(gl_dispatch_stub_48)
- GL_STUB(gl_dispatch_stub_49, 49)
- HIDDEN(gl_dispatch_stub_49)
- GL_STUB(gl_dispatch_stub_50, 50)
- HIDDEN(gl_dispatch_stub_50)
- GL_STUB(gl_dispatch_stub_51, 51)
- HIDDEN(gl_dispatch_stub_51)
- GL_STUB(gl_dispatch_stub_52, 52)
- HIDDEN(gl_dispatch_stub_52)
- GL_STUB(gl_dispatch_stub_53, 53)
- HIDDEN(gl_dispatch_stub_53)
- GL_STUB(gl_dispatch_stub_54, 54)
- HIDDEN(gl_dispatch_stub_54)
- GL_STUB(gl_dispatch_stub_55, 55)
- HIDDEN(gl_dispatch_stub_55)
- GL_STUB(gl_dispatch_stub_56, 56)
- HIDDEN(gl_dispatch_stub_56)
- GL_STUB(gl_dispatch_stub_57, 57)
- HIDDEN(gl_dispatch_stub_57)
- GL_STUB(gl_dispatch_stub_58, 58)
- HIDDEN(gl_dispatch_stub_58)
- GL_STUB(gl_dispatch_stub_59, 59)
- HIDDEN(gl_dispatch_stub_59)
- GL_STUB(gl_dispatch_stub_60, 60)
- HIDDEN(gl_dispatch_stub_60)
- GL_STUB(gl_dispatch_stub_61, 61)
- HIDDEN(gl_dispatch_stub_61)
- GL_STUB(gl_dispatch_stub_62, 62)
- HIDDEN(gl_dispatch_stub_62)
- GL_STUB(gl_dispatch_stub_63, 63)
- HIDDEN(gl_dispatch_stub_63)
- GL_STUB(gl_dispatch_stub_64, 64)
- HIDDEN(gl_dispatch_stub_64)
- GL_STUB(gl_dispatch_stub_65, 65)
- HIDDEN(gl_dispatch_stub_65)
- GL_STUB(gl_dispatch_stub_66, 66)
- HIDDEN(gl_dispatch_stub_66)
- GL_STUB(gl_dispatch_stub_67, 67)
- HIDDEN(gl_dispatch_stub_67)
- GL_STUB(gl_dispatch_stub_68, 68)
- HIDDEN(gl_dispatch_stub_68)
- GL_STUB(gl_dispatch_stub_69, 69)
- HIDDEN(gl_dispatch_stub_69)
- GL_STUB(gl_dispatch_stub_70, 70)
- HIDDEN(gl_dispatch_stub_70)
- GL_STUB(gl_dispatch_stub_71, 71)
- HIDDEN(gl_dispatch_stub_71)
- GL_STUB(gl_dispatch_stub_72, 72)
- HIDDEN(gl_dispatch_stub_72)
- GL_STUB(gl_dispatch_stub_73, 73)
- HIDDEN(gl_dispatch_stub_73)
- GL_STUB(gl_dispatch_stub_74, 74)
- HIDDEN(gl_dispatch_stub_74)
- GL_STUB(gl_dispatch_stub_75, 75)
- HIDDEN(gl_dispatch_stub_75)
- GL_STUB(gl_dispatch_stub_76, 76)
- HIDDEN(gl_dispatch_stub_76)
- GL_STUB(gl_dispatch_stub_77, 77)
- HIDDEN(gl_dispatch_stub_77)
- GL_STUB(gl_dispatch_stub_78, 78)
- HIDDEN(gl_dispatch_stub_78)
- GL_STUB(gl_dispatch_stub_79, 79)
- HIDDEN(gl_dispatch_stub_79)
- GL_STUB(gl_dispatch_stub_80, 80)
- HIDDEN(gl_dispatch_stub_80)
- GL_STUB(gl_dispatch_stub_81, 81)
- HIDDEN(gl_dispatch_stub_81)
- GL_STUB(gl_dispatch_stub_82, 82)
- HIDDEN(gl_dispatch_stub_82)
- GL_STUB(gl_dispatch_stub_83, 83)
- HIDDEN(gl_dispatch_stub_83)
- GL_STUB(gl_dispatch_stub_84, 84)
- HIDDEN(gl_dispatch_stub_84)
- GL_STUB(gl_dispatch_stub_85, 85)
- HIDDEN(gl_dispatch_stub_85)
- GL_STUB(gl_dispatch_stub_86, 86)
- HIDDEN(gl_dispatch_stub_86)
- GL_STUB(gl_dispatch_stub_87, 87)
- HIDDEN(gl_dispatch_stub_87)
- GL_STUB(gl_dispatch_stub_88, 88)
- HIDDEN(gl_dispatch_stub_88)
- GL_STUB(gl_dispatch_stub_89, 89)
- HIDDEN(gl_dispatch_stub_89)
- GL_STUB(gl_dispatch_stub_90, 90)
- HIDDEN(gl_dispatch_stub_90)
- GL_STUB(gl_dispatch_stub_91, 91)
- HIDDEN(gl_dispatch_stub_91)
- GL_STUB(gl_dispatch_stub_92, 92)
- HIDDEN(gl_dispatch_stub_92)
- GL_STUB(gl_dispatch_stub_93, 93)
- HIDDEN(gl_dispatch_stub_93)
- GL_STUB(gl_dispatch_stub_94, 94)
- HIDDEN(gl_dispatch_stub_94)
- GL_STUB(gl_dispatch_stub_95, 95)
- HIDDEN(gl_dispatch_stub_95)
- GL_STUB(gl_dispatch_stub_96, 96)
- HIDDEN(gl_dispatch_stub_96)
- GL_STUB(gl_dispatch_stub_97, 97)
- HIDDEN(gl_dispatch_stub_97)
- GL_STUB(gl_dispatch_stub_98, 98)
- HIDDEN(gl_dispatch_stub_98)
- GL_STUB(gl_dispatch_stub_99, 99)
- HIDDEN(gl_dispatch_stub_99)
- GL_STUB(gl_dispatch_stub_100, 100)
- HIDDEN(gl_dispatch_stub_100)
- GL_STUB(gl_dispatch_stub_101, 101)
- HIDDEN(gl_dispatch_stub_101)
- GL_STUB(gl_dispatch_stub_102, 102)
- HIDDEN(gl_dispatch_stub_102)
- GL_STUB(gl_dispatch_stub_103, 103)
- HIDDEN(gl_dispatch_stub_103)
- GL_STUB(gl_dispatch_stub_104, 104)
- HIDDEN(gl_dispatch_stub_104)
- GL_STUB(gl_dispatch_stub_105, 105)
- HIDDEN(gl_dispatch_stub_105)
- GL_STUB(gl_dispatch_stub_106, 106)
- HIDDEN(gl_dispatch_stub_106)
- GL_STUB(gl_dispatch_stub_107, 107)
- HIDDEN(gl_dispatch_stub_107)
- GL_STUB(gl_dispatch_stub_108, 108)
- HIDDEN(gl_dispatch_stub_108)
- GL_STUB(gl_dispatch_stub_109, 109)
- HIDDEN(gl_dispatch_stub_109)
- GL_STUB(gl_dispatch_stub_110, 110)
- HIDDEN(gl_dispatch_stub_110)
- GL_STUB(gl_dispatch_stub_111, 111)
- HIDDEN(gl_dispatch_stub_111)
- GL_STUB(gl_dispatch_stub_112, 112)
- HIDDEN(gl_dispatch_stub_112)
- GL_STUB(gl_dispatch_stub_113, 113)
- HIDDEN(gl_dispatch_stub_113)
- GL_STUB(gl_dispatch_stub_114, 114)
- HIDDEN(gl_dispatch_stub_114)
- GL_STUB(gl_dispatch_stub_115, 115)
- HIDDEN(gl_dispatch_stub_115)
- GL_STUB(gl_dispatch_stub_116, 116)
- HIDDEN(gl_dispatch_stub_116)
- GL_STUB(gl_dispatch_stub_117, 117)
- HIDDEN(gl_dispatch_stub_117)
- GL_STUB(gl_dispatch_stub_118, 118)
- HIDDEN(gl_dispatch_stub_118)
- GL_STUB(gl_dispatch_stub_119, 119)
- HIDDEN(gl_dispatch_stub_119)
- GL_STUB(gl_dispatch_stub_120, 120)
- HIDDEN(gl_dispatch_stub_120)
- GL_STUB(gl_dispatch_stub_121, 121)
- HIDDEN(gl_dispatch_stub_121)
- GL_STUB(gl_dispatch_stub_122, 122)
- HIDDEN(gl_dispatch_stub_122)
- GL_STUB(gl_dispatch_stub_123, 123)
- HIDDEN(gl_dispatch_stub_123)
- GL_STUB(gl_dispatch_stub_124, 124)
- HIDDEN(gl_dispatch_stub_124)
- GL_STUB(gl_dispatch_stub_125, 125)
- HIDDEN(gl_dispatch_stub_125)
- GL_STUB(gl_dispatch_stub_126, 126)
- HIDDEN(gl_dispatch_stub_126)
- GL_STUB(gl_dispatch_stub_127, 127)
- HIDDEN(gl_dispatch_stub_127)
- GL_STUB(gl_dispatch_stub_128, 128)
- HIDDEN(gl_dispatch_stub_128)
- GL_STUB(gl_dispatch_stub_129, 129)
- HIDDEN(gl_dispatch_stub_129)
- GL_STUB(gl_dispatch_stub_130, 130)
- HIDDEN(gl_dispatch_stub_130)
- GL_STUB(gl_dispatch_stub_131, 131)
- HIDDEN(gl_dispatch_stub_131)
- GL_STUB(gl_dispatch_stub_132, 132)
- HIDDEN(gl_dispatch_stub_132)
- GL_STUB(gl_dispatch_stub_133, 133)
- HIDDEN(gl_dispatch_stub_133)
- GL_STUB(gl_dispatch_stub_134, 134)
- HIDDEN(gl_dispatch_stub_134)
- GL_STUB(gl_dispatch_stub_135, 135)
- HIDDEN(gl_dispatch_stub_135)
- GL_STUB(gl_dispatch_stub_136, 136)
- HIDDEN(gl_dispatch_stub_136)
- GL_STUB(gl_dispatch_stub_137, 137)
- HIDDEN(gl_dispatch_stub_137)
- GL_STUB(gl_dispatch_stub_138, 138)
- HIDDEN(gl_dispatch_stub_138)
- GL_STUB(gl_dispatch_stub_139, 139)
- HIDDEN(gl_dispatch_stub_139)
- GL_STUB(gl_dispatch_stub_140, 140)
- HIDDEN(gl_dispatch_stub_140)
- GL_STUB(gl_dispatch_stub_141, 141)
- HIDDEN(gl_dispatch_stub_141)
- GL_STUB(gl_dispatch_stub_142, 142)
- HIDDEN(gl_dispatch_stub_142)
- GL_STUB(gl_dispatch_stub_143, 143)
- HIDDEN(gl_dispatch_stub_143)
- GL_STUB(gl_dispatch_stub_144, 144)
- HIDDEN(gl_dispatch_stub_144)
- GL_STUB(gl_dispatch_stub_145, 145)
- HIDDEN(gl_dispatch_stub_145)
- GL_STUB(gl_dispatch_stub_146, 146)
- HIDDEN(gl_dispatch_stub_146)
- GL_STUB(gl_dispatch_stub_147, 147)
- HIDDEN(gl_dispatch_stub_147)
- GL_STUB(gl_dispatch_stub_148, 148)
- HIDDEN(gl_dispatch_stub_148)
- GL_STUB(gl_dispatch_stub_149, 149)
- HIDDEN(gl_dispatch_stub_149)
- GL_STUB(gl_dispatch_stub_150, 150)
- HIDDEN(gl_dispatch_stub_150)
- GL_STUB(gl_dispatch_stub_151, 151)
- HIDDEN(gl_dispatch_stub_151)
- GL_STUB(glCullFace, 152)
- GL_STUB(gl_dispatch_stub_153, 153)
- HIDDEN(gl_dispatch_stub_153)
- GL_STUB(gl_dispatch_stub_154, 154)
- HIDDEN(gl_dispatch_stub_154)
- GL_STUB(gl_dispatch_stub_155, 155)
- HIDDEN(gl_dispatch_stub_155)
- GL_STUB(gl_dispatch_stub_156, 156)
- HIDDEN(gl_dispatch_stub_156)
- GL_STUB(glFrontFace, 157)
- GL_STUB(glHint, 158)
- GL_STUB(gl_dispatch_stub_159, 159)
- HIDDEN(gl_dispatch_stub_159)
- GL_STUB(gl_dispatch_stub_160, 160)
- HIDDEN(gl_dispatch_stub_160)
- GL_STUB(gl_dispatch_stub_161, 161)
- HIDDEN(gl_dispatch_stub_161)
- GL_STUB(gl_dispatch_stub_162, 162)
- HIDDEN(gl_dispatch_stub_162)
- GL_STUB(gl_dispatch_stub_163, 163)
- HIDDEN(gl_dispatch_stub_163)
- GL_STUB(gl_dispatch_stub_164, 164)
- HIDDEN(gl_dispatch_stub_164)
- GL_STUB(gl_dispatch_stub_165, 165)
- HIDDEN(gl_dispatch_stub_165)
- GL_STUB(gl_dispatch_stub_166, 166)
- HIDDEN(gl_dispatch_stub_166)
- GL_STUB(gl_dispatch_stub_167, 167)
- HIDDEN(gl_dispatch_stub_167)
- GL_STUB(glLineWidth, 168)
- GL_STUB(gl_dispatch_stub_169, 169)
- HIDDEN(gl_dispatch_stub_169)
- GL_STUB(gl_dispatch_stub_170, 170)
- HIDDEN(gl_dispatch_stub_170)
- GL_STUB(gl_dispatch_stub_171, 171)
- HIDDEN(gl_dispatch_stub_171)
- GL_STUB(gl_dispatch_stub_172, 172)
- HIDDEN(gl_dispatch_stub_172)
- GL_STUB(gl_dispatch_stub_173, 173)
- HIDDEN(gl_dispatch_stub_173)
- GL_STUB(gl_dispatch_stub_174, 174)
- HIDDEN(gl_dispatch_stub_174)
- GL_STUB(gl_dispatch_stub_175, 175)
- HIDDEN(gl_dispatch_stub_175)
- GL_STUB(glScissor, 176)
- GL_STUB(gl_dispatch_stub_177, 177)
- HIDDEN(gl_dispatch_stub_177)
- GL_STUB(glTexParameterf, 178)
- GL_STUB(glTexParameterfv, 179)
- GL_STUB(glTexParameteri, 180)
- GL_STUB(glTexParameteriv, 181)
- GL_STUB(gl_dispatch_stub_182, 182)
- HIDDEN(gl_dispatch_stub_182)
- GL_STUB(glTexImage2D, 183)
- GL_STUB(gl_dispatch_stub_184, 184)
- HIDDEN(gl_dispatch_stub_184)
- GL_STUB(gl_dispatch_stub_185, 185)
- HIDDEN(gl_dispatch_stub_185)
- GL_STUB(gl_dispatch_stub_186, 186)
- HIDDEN(gl_dispatch_stub_186)
- GL_STUB(gl_dispatch_stub_187, 187)
- HIDDEN(gl_dispatch_stub_187)
- GL_STUB(gl_dispatch_stub_188, 188)
- HIDDEN(gl_dispatch_stub_188)
- GL_STUB(gl_dispatch_stub_189, 189)
- HIDDEN(gl_dispatch_stub_189)
- GL_STUB(gl_dispatch_stub_190, 190)
- HIDDEN(gl_dispatch_stub_190)
- GL_STUB(gl_dispatch_stub_191, 191)
- HIDDEN(gl_dispatch_stub_191)
- GL_STUB(gl_dispatch_stub_192, 192)
- HIDDEN(gl_dispatch_stub_192)
- GL_STUB(gl_dispatch_stub_193, 193)
- HIDDEN(gl_dispatch_stub_193)
- GL_STUB(gl_dispatch_stub_194, 194)
- HIDDEN(gl_dispatch_stub_194)
- GL_STUB(gl_dispatch_stub_195, 195)
- HIDDEN(gl_dispatch_stub_195)
- GL_STUB(gl_dispatch_stub_196, 196)
- HIDDEN(gl_dispatch_stub_196)
- GL_STUB(gl_dispatch_stub_197, 197)
- HIDDEN(gl_dispatch_stub_197)
- GL_STUB(gl_dispatch_stub_198, 198)
- HIDDEN(gl_dispatch_stub_198)
- GL_STUB(gl_dispatch_stub_199, 199)
- HIDDEN(gl_dispatch_stub_199)
- GL_STUB(gl_dispatch_stub_200, 200)
- HIDDEN(gl_dispatch_stub_200)
- GL_STUB(gl_dispatch_stub_201, 201)
- HIDDEN(gl_dispatch_stub_201)
- GL_STUB(gl_dispatch_stub_202, 202)
- HIDDEN(gl_dispatch_stub_202)
- GL_STUB(glClear, 203)
- GL_STUB(gl_dispatch_stub_204, 204)
- HIDDEN(gl_dispatch_stub_204)
- GL_STUB(gl_dispatch_stub_205, 205)
- HIDDEN(gl_dispatch_stub_205)
- GL_STUB(glClearColor, 206)
- GL_STUB(glClearStencil, 207)
- GL_STUB(gl_dispatch_stub_208, 208)
- HIDDEN(gl_dispatch_stub_208)
- GL_STUB(glStencilMask, 209)
- GL_STUB(glColorMask, 210)
- GL_STUB(glDepthMask, 211)
- GL_STUB(gl_dispatch_stub_212, 212)
- HIDDEN(gl_dispatch_stub_212)
- GL_STUB(gl_dispatch_stub_213, 213)
- HIDDEN(gl_dispatch_stub_213)
- GL_STUB(glDisable, 214)
- GL_STUB(glEnable, 215)
- GL_STUB(glFinish, 216)
- GL_STUB(glFlush, 217)
- GL_STUB(gl_dispatch_stub_218, 218)
- HIDDEN(gl_dispatch_stub_218)
- GL_STUB(gl_dispatch_stub_219, 219)
- HIDDEN(gl_dispatch_stub_219)
- GL_STUB(gl_dispatch_stub_220, 220)
- HIDDEN(gl_dispatch_stub_220)
- GL_STUB(gl_dispatch_stub_221, 221)
- HIDDEN(gl_dispatch_stub_221)
- GL_STUB(gl_dispatch_stub_222, 222)
- HIDDEN(gl_dispatch_stub_222)
- GL_STUB(gl_dispatch_stub_223, 223)
- HIDDEN(gl_dispatch_stub_223)
- GL_STUB(gl_dispatch_stub_224, 224)
- HIDDEN(gl_dispatch_stub_224)
- GL_STUB(gl_dispatch_stub_225, 225)
- HIDDEN(gl_dispatch_stub_225)
- GL_STUB(gl_dispatch_stub_226, 226)
- HIDDEN(gl_dispatch_stub_226)
- GL_STUB(gl_dispatch_stub_227, 227)
- HIDDEN(gl_dispatch_stub_227)
- GL_STUB(gl_dispatch_stub_228, 228)
- HIDDEN(gl_dispatch_stub_228)
- GL_STUB(gl_dispatch_stub_229, 229)
- HIDDEN(gl_dispatch_stub_229)
- GL_STUB(gl_dispatch_stub_230, 230)
- HIDDEN(gl_dispatch_stub_230)
- GL_STUB(gl_dispatch_stub_231, 231)
- HIDDEN(gl_dispatch_stub_231)
- GL_STUB(gl_dispatch_stub_232, 232)
- HIDDEN(gl_dispatch_stub_232)
- GL_STUB(gl_dispatch_stub_233, 233)
- HIDDEN(gl_dispatch_stub_233)
- GL_STUB(gl_dispatch_stub_234, 234)
- HIDDEN(gl_dispatch_stub_234)
- GL_STUB(gl_dispatch_stub_235, 235)
- HIDDEN(gl_dispatch_stub_235)
- GL_STUB(gl_dispatch_stub_236, 236)
- HIDDEN(gl_dispatch_stub_236)
- GL_STUB(gl_dispatch_stub_237, 237)
- HIDDEN(gl_dispatch_stub_237)
- GL_STUB(gl_dispatch_stub_238, 238)
- HIDDEN(gl_dispatch_stub_238)
- GL_STUB(gl_dispatch_stub_239, 239)
- HIDDEN(gl_dispatch_stub_239)
- GL_STUB(gl_dispatch_stub_240, 240)
- HIDDEN(gl_dispatch_stub_240)
- GL_STUB(glBlendFunc, 241)
- GL_STUB(gl_dispatch_stub_242, 242)
- HIDDEN(gl_dispatch_stub_242)
- GL_STUB(glStencilFunc, 243)
- GL_STUB(glStencilOp, 244)
- GL_STUB(glDepthFunc, 245)
- GL_STUB(gl_dispatch_stub_246, 246)
- HIDDEN(gl_dispatch_stub_246)
- GL_STUB(gl_dispatch_stub_247, 247)
- HIDDEN(gl_dispatch_stub_247)
- GL_STUB(gl_dispatch_stub_248, 248)
- HIDDEN(gl_dispatch_stub_248)
- GL_STUB(gl_dispatch_stub_249, 249)
- HIDDEN(gl_dispatch_stub_249)
- GL_STUB(glPixelStorei, 250)
- GL_STUB(gl_dispatch_stub_251, 251)
- HIDDEN(gl_dispatch_stub_251)
- GL_STUB(gl_dispatch_stub_252, 252)
- HIDDEN(gl_dispatch_stub_252)
- GL_STUB(gl_dispatch_stub_253, 253)
- HIDDEN(gl_dispatch_stub_253)
- GL_STUB(gl_dispatch_stub_254, 254)
- HIDDEN(gl_dispatch_stub_254)
- GL_STUB(gl_dispatch_stub_255, 255)
- HIDDEN(gl_dispatch_stub_255)
- GL_STUB(glReadPixels, 256)
- GL_STUB(gl_dispatch_stub_257, 257)
- HIDDEN(gl_dispatch_stub_257)
- GL_STUB(glGetBooleanv, 258)
- GL_STUB(gl_dispatch_stub_259, 259)
- HIDDEN(gl_dispatch_stub_259)
- GL_STUB(gl_dispatch_stub_260, 260)
- HIDDEN(gl_dispatch_stub_260)
- GL_STUB(glGetError, 261)
- GL_STUB(glGetFloatv, 262)
- GL_STUB(glGetIntegerv, 263)
- GL_STUB(gl_dispatch_stub_264, 264)
- HIDDEN(gl_dispatch_stub_264)
- GL_STUB(gl_dispatch_stub_265, 265)
- HIDDEN(gl_dispatch_stub_265)
- GL_STUB(gl_dispatch_stub_266, 266)
- HIDDEN(gl_dispatch_stub_266)
- GL_STUB(gl_dispatch_stub_267, 267)
- HIDDEN(gl_dispatch_stub_267)
- GL_STUB(gl_dispatch_stub_268, 268)
- HIDDEN(gl_dispatch_stub_268)
- GL_STUB(gl_dispatch_stub_269, 269)
- HIDDEN(gl_dispatch_stub_269)
- GL_STUB(gl_dispatch_stub_270, 270)
- HIDDEN(gl_dispatch_stub_270)
- GL_STUB(gl_dispatch_stub_271, 271)
- HIDDEN(gl_dispatch_stub_271)
- GL_STUB(gl_dispatch_stub_272, 272)
- HIDDEN(gl_dispatch_stub_272)
- GL_STUB(gl_dispatch_stub_273, 273)
- HIDDEN(gl_dispatch_stub_273)
- GL_STUB(gl_dispatch_stub_274, 274)
- HIDDEN(gl_dispatch_stub_274)
- GL_STUB(glGetString, 275)
- GL_STUB(gl_dispatch_stub_276, 276)
- HIDDEN(gl_dispatch_stub_276)
- GL_STUB(gl_dispatch_stub_277, 277)
- HIDDEN(gl_dispatch_stub_277)
- GL_STUB(gl_dispatch_stub_278, 278)
- HIDDEN(gl_dispatch_stub_278)
- GL_STUB(gl_dispatch_stub_279, 279)
- HIDDEN(gl_dispatch_stub_279)
- GL_STUB(gl_dispatch_stub_280, 280)
- HIDDEN(gl_dispatch_stub_280)
- GL_STUB(gl_dispatch_stub_281, 281)
- HIDDEN(gl_dispatch_stub_281)
- GL_STUB(glGetTexParameterfv, 282)
- GL_STUB(glGetTexParameteriv, 283)
- GL_STUB(gl_dispatch_stub_284, 284)
- HIDDEN(gl_dispatch_stub_284)
- GL_STUB(gl_dispatch_stub_285, 285)
- HIDDEN(gl_dispatch_stub_285)
- GL_STUB(glIsEnabled, 286)
- GL_STUB(gl_dispatch_stub_287, 287)
- HIDDEN(gl_dispatch_stub_287)
- GL_STUB(gl_dispatch_stub_288, 288)
- HIDDEN(gl_dispatch_stub_288)
- GL_STUB(gl_dispatch_stub_289, 289)
- HIDDEN(gl_dispatch_stub_289)
- GL_STUB(gl_dispatch_stub_290, 290)
- HIDDEN(gl_dispatch_stub_290)
- GL_STUB(gl_dispatch_stub_291, 291)
- HIDDEN(gl_dispatch_stub_291)
- GL_STUB(gl_dispatch_stub_292, 292)
- HIDDEN(gl_dispatch_stub_292)
- GL_STUB(gl_dispatch_stub_293, 293)
- HIDDEN(gl_dispatch_stub_293)
- GL_STUB(gl_dispatch_stub_294, 294)
- HIDDEN(gl_dispatch_stub_294)
- GL_STUB(gl_dispatch_stub_295, 295)
- HIDDEN(gl_dispatch_stub_295)
- GL_STUB(gl_dispatch_stub_296, 296)
- HIDDEN(gl_dispatch_stub_296)
- GL_STUB(gl_dispatch_stub_297, 297)
- HIDDEN(gl_dispatch_stub_297)
- GL_STUB(gl_dispatch_stub_298, 298)
- HIDDEN(gl_dispatch_stub_298)
- GL_STUB(gl_dispatch_stub_299, 299)
- HIDDEN(gl_dispatch_stub_299)
- GL_STUB(gl_dispatch_stub_300, 300)
- HIDDEN(gl_dispatch_stub_300)
- GL_STUB(gl_dispatch_stub_301, 301)
- HIDDEN(gl_dispatch_stub_301)
- GL_STUB(gl_dispatch_stub_302, 302)
- HIDDEN(gl_dispatch_stub_302)
- GL_STUB(gl_dispatch_stub_303, 303)
- HIDDEN(gl_dispatch_stub_303)
- GL_STUB(gl_dispatch_stub_304, 304)
- HIDDEN(gl_dispatch_stub_304)
- GL_STUB(glViewport, 305)
- GL_STUB(gl_dispatch_stub_306, 306)
- HIDDEN(gl_dispatch_stub_306)
- GL_STUB(glBindTexture, 307)
- GL_STUB(gl_dispatch_stub_308, 308)
- HIDDEN(gl_dispatch_stub_308)
- GL_STUB(gl_dispatch_stub_309, 309)
- HIDDEN(gl_dispatch_stub_309)
- GL_STUB(glDrawArrays, 310)
- GL_STUB(glDrawElements, 311)
- GL_STUB(gl_dispatch_stub_312, 312)
- HIDDEN(gl_dispatch_stub_312)
- GL_STUB(gl_dispatch_stub_313, 313)
- HIDDEN(gl_dispatch_stub_313)
- GL_STUB(gl_dispatch_stub_314, 314)
- HIDDEN(gl_dispatch_stub_314)
- GL_STUB(gl_dispatch_stub_315, 315)
- HIDDEN(gl_dispatch_stub_315)
- GL_STUB(gl_dispatch_stub_316, 316)
- HIDDEN(gl_dispatch_stub_316)
- GL_STUB(gl_dispatch_stub_317, 317)
- HIDDEN(gl_dispatch_stub_317)
- GL_STUB(gl_dispatch_stub_318, 318)
- HIDDEN(gl_dispatch_stub_318)
- GL_STUB(glPolygonOffset, 319)
- GL_STUB(gl_dispatch_stub_320, 320)
- HIDDEN(gl_dispatch_stub_320)
- GL_STUB(gl_dispatch_stub_321, 321)
- HIDDEN(gl_dispatch_stub_321)
- GL_STUB(gl_dispatch_stub_322, 322)
- HIDDEN(gl_dispatch_stub_322)
- GL_STUB(gl_dispatch_stub_323, 323)
- HIDDEN(gl_dispatch_stub_323)
- GL_STUB(glCopyTexImage2D, 324)
- GL_STUB(gl_dispatch_stub_325, 325)
- HIDDEN(gl_dispatch_stub_325)
- GL_STUB(glCopyTexSubImage2D, 326)
- GL_STUB(glDeleteTextures, 327)
- GL_STUB(glGenTextures, 328)
- GL_STUB(gl_dispatch_stub_329, 329)
- HIDDEN(gl_dispatch_stub_329)
- GL_STUB(glIsTexture, 330)
- GL_STUB(gl_dispatch_stub_331, 331)
- HIDDEN(gl_dispatch_stub_331)
- GL_STUB(gl_dispatch_stub_332, 332)
- HIDDEN(gl_dispatch_stub_332)
- GL_STUB(glTexSubImage2D, 333)
- GL_STUB(gl_dispatch_stub_334, 334)
- HIDDEN(gl_dispatch_stub_334)
- GL_STUB(gl_dispatch_stub_335, 335)
- HIDDEN(gl_dispatch_stub_335)
- GL_STUB(glBlendColor, 336)
- GL_STUB(glBlendEquation, 337)
- GL_STUB(gl_dispatch_stub_338, 338)
- HIDDEN(gl_dispatch_stub_338)
- GL_STUB(gl_dispatch_stub_339, 339)
- HIDDEN(gl_dispatch_stub_339)
- GL_STUB(gl_dispatch_stub_340, 340)
- HIDDEN(gl_dispatch_stub_340)
- GL_STUB(gl_dispatch_stub_341, 341)
- HIDDEN(gl_dispatch_stub_341)
- GL_STUB(gl_dispatch_stub_342, 342)
- HIDDEN(gl_dispatch_stub_342)
- GL_STUB(gl_dispatch_stub_343, 343)
- HIDDEN(gl_dispatch_stub_343)
- GL_STUB(gl_dispatch_stub_344, 344)
- HIDDEN(gl_dispatch_stub_344)
- GL_STUB(gl_dispatch_stub_345, 345)
- HIDDEN(gl_dispatch_stub_345)
- GL_STUB(gl_dispatch_stub_346, 346)
- HIDDEN(gl_dispatch_stub_346)
- GL_STUB(gl_dispatch_stub_347, 347)
- HIDDEN(gl_dispatch_stub_347)
- GL_STUB(gl_dispatch_stub_348, 348)
- HIDDEN(gl_dispatch_stub_348)
- GL_STUB(gl_dispatch_stub_349, 349)
- HIDDEN(gl_dispatch_stub_349)
- GL_STUB(gl_dispatch_stub_350, 350)
- HIDDEN(gl_dispatch_stub_350)
- GL_STUB(gl_dispatch_stub_351, 351)
- HIDDEN(gl_dispatch_stub_351)
- GL_STUB(gl_dispatch_stub_352, 352)
- HIDDEN(gl_dispatch_stub_352)
- GL_STUB(gl_dispatch_stub_353, 353)
- HIDDEN(gl_dispatch_stub_353)
- GL_STUB(gl_dispatch_stub_354, 354)
- HIDDEN(gl_dispatch_stub_354)
- GL_STUB(gl_dispatch_stub_355, 355)
- HIDDEN(gl_dispatch_stub_355)
- GL_STUB(gl_dispatch_stub_356, 356)
- HIDDEN(gl_dispatch_stub_356)
- GL_STUB(gl_dispatch_stub_357, 357)
- HIDDEN(gl_dispatch_stub_357)
- GL_STUB(gl_dispatch_stub_358, 358)
- HIDDEN(gl_dispatch_stub_358)
- GL_STUB(gl_dispatch_stub_359, 359)
- HIDDEN(gl_dispatch_stub_359)
- GL_STUB(gl_dispatch_stub_360, 360)
- HIDDEN(gl_dispatch_stub_360)
- GL_STUB(gl_dispatch_stub_361, 361)
- HIDDEN(gl_dispatch_stub_361)
- GL_STUB(gl_dispatch_stub_362, 362)
- HIDDEN(gl_dispatch_stub_362)
- GL_STUB(gl_dispatch_stub_363, 363)
- HIDDEN(gl_dispatch_stub_363)
- GL_STUB(gl_dispatch_stub_364, 364)
- HIDDEN(gl_dispatch_stub_364)
- GL_STUB(gl_dispatch_stub_365, 365)
- HIDDEN(gl_dispatch_stub_365)
- GL_STUB(gl_dispatch_stub_366, 366)
- HIDDEN(gl_dispatch_stub_366)
- GL_STUB(gl_dispatch_stub_367, 367)
- HIDDEN(gl_dispatch_stub_367)
- GL_STUB(gl_dispatch_stub_368, 368)
- HIDDEN(gl_dispatch_stub_368)
- GL_STUB(gl_dispatch_stub_369, 369)
- HIDDEN(gl_dispatch_stub_369)
- GL_STUB(gl_dispatch_stub_370, 370)
- HIDDEN(gl_dispatch_stub_370)
- GL_STUB(glTexImage3DOES, 371)
- GL_STUB(glTexSubImage3DOES, 372)
- GL_STUB(glCopyTexSubImage3DOES, 373)
- GL_STUB(glActiveTexture, 374)
- GL_STUB(gl_dispatch_stub_375, 375)
- HIDDEN(gl_dispatch_stub_375)
- GL_STUB(gl_dispatch_stub_376, 376)
- HIDDEN(gl_dispatch_stub_376)
- GL_STUB(gl_dispatch_stub_377, 377)
- HIDDEN(gl_dispatch_stub_377)
- GL_STUB(gl_dispatch_stub_378, 378)
- HIDDEN(gl_dispatch_stub_378)
- GL_STUB(gl_dispatch_stub_379, 379)
- HIDDEN(gl_dispatch_stub_379)
- GL_STUB(gl_dispatch_stub_380, 380)
- HIDDEN(gl_dispatch_stub_380)
- GL_STUB(gl_dispatch_stub_381, 381)
- HIDDEN(gl_dispatch_stub_381)
- GL_STUB(gl_dispatch_stub_382, 382)
- HIDDEN(gl_dispatch_stub_382)
- GL_STUB(gl_dispatch_stub_383, 383)
- HIDDEN(gl_dispatch_stub_383)
- GL_STUB(gl_dispatch_stub_384, 384)
- HIDDEN(gl_dispatch_stub_384)
- GL_STUB(gl_dispatch_stub_385, 385)
- HIDDEN(gl_dispatch_stub_385)
- GL_STUB(gl_dispatch_stub_386, 386)
- HIDDEN(gl_dispatch_stub_386)
- GL_STUB(gl_dispatch_stub_387, 387)
- HIDDEN(gl_dispatch_stub_387)
- GL_STUB(gl_dispatch_stub_388, 388)
- HIDDEN(gl_dispatch_stub_388)
- GL_STUB(gl_dispatch_stub_389, 389)
- HIDDEN(gl_dispatch_stub_389)
- GL_STUB(gl_dispatch_stub_390, 390)
- HIDDEN(gl_dispatch_stub_390)
- GL_STUB(gl_dispatch_stub_391, 391)
- HIDDEN(gl_dispatch_stub_391)
- GL_STUB(gl_dispatch_stub_392, 392)
- HIDDEN(gl_dispatch_stub_392)
- GL_STUB(gl_dispatch_stub_393, 393)
- HIDDEN(gl_dispatch_stub_393)
- GL_STUB(gl_dispatch_stub_394, 394)
- HIDDEN(gl_dispatch_stub_394)
- GL_STUB(gl_dispatch_stub_395, 395)
- HIDDEN(gl_dispatch_stub_395)
- GL_STUB(gl_dispatch_stub_396, 396)
- HIDDEN(gl_dispatch_stub_396)
- GL_STUB(gl_dispatch_stub_397, 397)
- HIDDEN(gl_dispatch_stub_397)
- GL_STUB(gl_dispatch_stub_398, 398)
- HIDDEN(gl_dispatch_stub_398)
- GL_STUB(gl_dispatch_stub_399, 399)
- HIDDEN(gl_dispatch_stub_399)
- GL_STUB(gl_dispatch_stub_400, 400)
- HIDDEN(gl_dispatch_stub_400)
- GL_STUB(gl_dispatch_stub_401, 401)
- HIDDEN(gl_dispatch_stub_401)
- GL_STUB(gl_dispatch_stub_402, 402)
- HIDDEN(gl_dispatch_stub_402)
- GL_STUB(gl_dispatch_stub_403, 403)
- HIDDEN(gl_dispatch_stub_403)
- GL_STUB(gl_dispatch_stub_404, 404)
- HIDDEN(gl_dispatch_stub_404)
- GL_STUB(gl_dispatch_stub_405, 405)
- HIDDEN(gl_dispatch_stub_405)
- GL_STUB(gl_dispatch_stub_406, 406)
- HIDDEN(gl_dispatch_stub_406)
- GL_STUB(gl_dispatch_stub_407, 407)
- HIDDEN(gl_dispatch_stub_407)
- GL_STUB(glGetBufferPointervOES, 408)
- GL_STUB(glMapBufferOES, 409)
- GL_STUB(glUnmapBufferOES, 410)
- GL_STUB(glCompressedTexImage3DOES, 411)
- GL_STUB(glCompressedTexSubImage3DOES, 412)
- GL_STUB(glFramebufferTexture3DOES, 413)
- GL_STUB(glGetProgramBinaryOES, 414)
- GL_STUB(glProgramBinaryOES, 415)
- GL_STUB(glMultiDrawArraysEXT, 416)
- GL_STUB(glMultiDrawElementsEXT, 417)
- GL_STUB(gl_dispatch_stub_418, 418)
- HIDDEN(gl_dispatch_stub_418)
- GL_STUB(gl_dispatch_stub_419, 419)
- HIDDEN(gl_dispatch_stub_419)
- GL_STUB(gl_dispatch_stub_420, 420)
- HIDDEN(gl_dispatch_stub_420)
- GL_STUB(gl_dispatch_stub_421, 421)
- HIDDEN(gl_dispatch_stub_421)
- GL_STUB(glEGLImageTargetRenderbufferStorageOES, 422)
- GL_STUB(glEGLImageTargetTexture2DOES, 423)
- GL_STUB(glCompressedTexImage2D, 424)
- GL_STUB(glCompressedTexSubImage2D, 425)
- GL_STUB(glSampleCoverage, 426)
- GL_STUB(glBindBuffer, 427)
- GL_STUB(glBufferData, 428)
- GL_STUB(glBufferSubData, 429)
- GL_STUB(glDeleteBuffers, 430)
- GL_STUB(glGenBuffers, 431)
- GL_STUB(glGetBufferParameteriv, 432)
- GL_STUB(glIsBuffer, 433)
- GL_STUB(glAttachShader, 434)
- GL_STUB(glBindAttribLocation, 435)
- GL_STUB(glBlendEquationSeparate, 436)
- GL_STUB(glCompileShader, 437)
- GL_STUB(glCreateProgram, 438)
- GL_STUB(glCreateShader, 439)
- GL_STUB(glDeleteProgram, 440)
- GL_STUB(glDeleteShader, 441)
- GL_STUB(glDetachShader, 442)
- GL_STUB(glDisableVertexAttribArray, 443)
- GL_STUB(glEnableVertexAttribArray, 444)
- GL_STUB(glGetActiveAttrib, 445)
- GL_STUB(glGetActiveUniform, 446)
- GL_STUB(glGetAttachedShaders, 447)
- GL_STUB(glGetAttribLocation, 448)
- GL_STUB(glGetProgramInfoLog, 449)
- GL_STUB(glGetProgramiv, 450)
- GL_STUB(glGetShaderInfoLog, 451)
- GL_STUB(glGetShaderSource, 452)
- GL_STUB(glGetShaderiv, 453)
- GL_STUB(glGetUniformLocation, 454)
- GL_STUB(glGetUniformfv, 455)
- GL_STUB(glGetUniformiv, 456)
- GL_STUB(glGetVertexAttribPointerv, 457)
- GL_STUB(glGetVertexAttribfv, 458)
- GL_STUB(glGetVertexAttribiv, 459)
- GL_STUB(glIsProgram, 460)
- GL_STUB(glIsShader, 461)
- GL_STUB(glLinkProgram, 462)
- GL_STUB(glShaderSource, 463)
- GL_STUB(glStencilFuncSeparate, 464)
- GL_STUB(glStencilMaskSeparate, 465)
- GL_STUB(glStencilOpSeparate, 466)
- GL_STUB(glUniform1f, 467)
- GL_STUB(glUniform1fv, 468)
- GL_STUB(glUniform1i, 469)
- GL_STUB(glUniform1iv, 470)
- GL_STUB(glUniform2f, 471)
- GL_STUB(glUniform2fv, 472)
- GL_STUB(glUniform2i, 473)
- GL_STUB(glUniform2iv, 474)
- GL_STUB(glUniform3f, 475)
- GL_STUB(glUniform3fv, 476)
- GL_STUB(glUniform3i, 477)
- GL_STUB(glUniform3iv, 478)
- GL_STUB(glUniform4f, 479)
- GL_STUB(glUniform4fv, 480)
- GL_STUB(glUniform4i, 481)
- GL_STUB(glUniform4iv, 482)
- GL_STUB(glUniformMatrix2fv, 483)
- GL_STUB(glUniformMatrix3fv, 484)
- GL_STUB(glUniformMatrix4fv, 485)
- GL_STUB(glUseProgram, 486)
- GL_STUB(glValidateProgram, 487)
- GL_STUB(glVertexAttrib1f, 488)
- GL_STUB(glVertexAttrib1fv, 489)
- GL_STUB(glVertexAttrib2f, 490)
- GL_STUB(glVertexAttrib2fv, 491)
- GL_STUB(glVertexAttrib3f, 492)
- GL_STUB(glVertexAttrib3fv, 493)
- GL_STUB(glVertexAttrib4f, 494)
- GL_STUB(glVertexAttrib4fv, 495)
- GL_STUB(glVertexAttribPointer, 496)
- GL_STUB(glBlendFuncSeparate, 497)
- GL_STUB(glBindFramebuffer, 498)
- GL_STUB(glBindRenderbuffer, 499)
- GL_STUB(glCheckFramebufferStatus, 500)
- GL_STUB(glClearDepthf, 501)
- GL_STUB(glDeleteFramebuffers, 502)
- GL_STUB(glDeleteRenderbuffers, 503)
- GL_STUB(glDepthRangef, 504)
- GL_STUB(glFramebufferRenderbuffer, 505)
- GL_STUB(glFramebufferTexture2D, 506)
- GL_STUB(glGenFramebuffers, 507)
- GL_STUB(glGenRenderbuffers, 508)
- GL_STUB(glGenerateMipmap, 509)
- GL_STUB(glGetFramebufferAttachmentParameteriv, 510)
- GL_STUB(glGetRenderbufferParameteriv, 511)
- GL_STUB(glGetShaderPrecisionFormat, 512)
- GL_STUB(glIsFramebuffer, 513)
- GL_STUB(glIsRenderbuffer, 514)
- GL_STUB(glReleaseShaderCompiler, 515)
- GL_STUB(glRenderbufferStorage, 516)
- GL_STUB(glShaderBinary, 517)
- GL_STUB_ALIAS(glTexImage3D, glTexImage3DOES)
- GL_STUB_ALIAS(glTexSubImage3D, glTexSubImage3DOES)
- GL_STUB_ALIAS(glCopyTexSubImage3D, glCopyTexSubImage3DOES)
- GL_STUB_ALIAS(glActiveTextureARB, glActiveTexture)
-
- .globl gl_dispatch_functions_end
- HIDDEN(gl_dispatch_functions_end)
-gl_dispatch_functions_end:
diff --git a/src/mapi/es2api/glapi/glapi_x86-64.S b/src/mapi/es2api/glapi/glapi_x86-64.S
deleted file mode 100644
index 23202a26573..00000000000
--- a/src/mapi/es2api/glapi/glapi_x86-64.S
+++ /dev/null
@@ -1,19796 +0,0 @@
-/* DO NOT EDIT - This file generated automatically by gl_x86-64_asm.py (from Mesa) script */
-
-/*
- * (C) Copyright IBM Corporation 2005
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sub license,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
- * IBM,
- * AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
- * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-/* If we build with gcc's -fvisibility=hidden flag, we'll need to change
- * the symbol visibility mode to 'default'.
- */
-
-#include "x86/assyntax.h"
-
-#ifdef __GNUC__
-# pragma GCC visibility push(default)
-# define HIDDEN(x) .hidden x
-#else
-# define HIDDEN(x)
-#endif
-
-# if defined(USE_MGL_NAMESPACE)
-# define GL_PREFIX(n) GLNAME(CONCAT(mgl,n))
-# define _glapi_Dispatch _mglapi_Dispatch
-# else
-# define GL_PREFIX(n) GLNAME(CONCAT(gl,n))
-# endif
-
-#if defined(PTHREADS) || defined(WIN32) || defined(BEOS_THREADS)
-# define THREADS
-#endif
-
- .text
-
-#ifdef GLX_USE_TLS
-
- .globl _x86_64_get_get_dispatch; HIDDEN(_x86_64_get_get_dispatch)
-_x86_64_get_get_dispatch:
- lea _x86_64_get_dispatch(%rip), %rax
- ret
-
- .p2align 4,,15
-_x86_64_get_dispatch:
- movq _glapi_tls_Dispatch@GOTTPOFF(%rip), %rax
- movq %fs:(%rax), %rax
- ret
- .size _x86_64_get_dispatch, .-_x86_64_get_dispatch
-
-#elif defined(PTHREADS)
-
- .extern _glapi_Dispatch
- .extern _gl_DispatchTSD
- .extern pthread_getspecific
-
- .p2align 4,,15
-_x86_64_get_dispatch:
- movq _gl_DispatchTSD(%rip), %rdi
- jmp pthread_getspecific@PLT
-
-#elif defined(THREADS)
-
- .extern _glapi_get_dispatch
-
-#endif
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_0)
- .type GL_PREFIX(_dispatch_stub_0), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_0))
-GL_PREFIX(_dispatch_stub_0):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 0(%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 (%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 0(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 0(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_0), .-GL_PREFIX(_dispatch_stub_0)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_1)
- .type GL_PREFIX(_dispatch_stub_1), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_1))
-GL_PREFIX(_dispatch_stub_1):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 8(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- movq 8(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 8(%rax), %r11
- jmp *%r11
-1:
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- movq 8(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_1), .-GL_PREFIX(_dispatch_stub_1)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_2)
- .type GL_PREFIX(_dispatch_stub_2), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_2))
-GL_PREFIX(_dispatch_stub_2):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 16(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 16(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 16(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 16(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_2), .-GL_PREFIX(_dispatch_stub_2)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_3)
- .type GL_PREFIX(_dispatch_stub_3), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_3))
-GL_PREFIX(_dispatch_stub_3):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 24(%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 24(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 24(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 24(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_3), .-GL_PREFIX(_dispatch_stub_3)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_4)
- .type GL_PREFIX(_dispatch_stub_4), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_4))
-GL_PREFIX(_dispatch_stub_4):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 32(%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 32(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 32(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 32(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_4), .-GL_PREFIX(_dispatch_stub_4)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_5)
- .type GL_PREFIX(_dispatch_stub_5), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_5))
-GL_PREFIX(_dispatch_stub_5):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 40(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 40(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 40(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 40(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_5), .-GL_PREFIX(_dispatch_stub_5)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_6)
- .type GL_PREFIX(_dispatch_stub_6), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_6))
-GL_PREFIX(_dispatch_stub_6):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 48(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 48(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 48(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 48(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_6), .-GL_PREFIX(_dispatch_stub_6)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_7)
- .type GL_PREFIX(_dispatch_stub_7), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_7))
-GL_PREFIX(_dispatch_stub_7):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 56(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 56(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 56(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 56(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_7), .-GL_PREFIX(_dispatch_stub_7)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_8)
- .type GL_PREFIX(_dispatch_stub_8), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_8))
-GL_PREFIX(_dispatch_stub_8):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 64(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $56, %rsp
- movq %rdi, (%rsp)
- movq %rsi, 8(%rsp)
- movq %xmm0, 16(%rsp)
- movq %xmm1, 24(%rsp)
- movq %xmm2, 32(%rsp)
- movq %xmm3, 40(%rsp)
- movq %rdx, 48(%rsp)
- call _x86_64_get_dispatch@PLT
- movq 48(%rsp), %rdx
- movq 40(%rsp), %xmm3
- movq 32(%rsp), %xmm2
- movq 24(%rsp), %xmm1
- movq 16(%rsp), %xmm0
- movq 8(%rsp), %rsi
- movq (%rsp), %rdi
- addq $56, %rsp
- movq 64(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 64(%rax), %r11
- jmp *%r11
-1:
- subq $56, %rsp
- movq %rdi, (%rsp)
- movq %rsi, 8(%rsp)
- movq %xmm0, 16(%rsp)
- movq %xmm1, 24(%rsp)
- movq %xmm2, 32(%rsp)
- movq %xmm3, 40(%rsp)
- movq %rdx, 48(%rsp)
- call _glapi_get_dispatch
- movq 48(%rsp), %rdx
- movq 40(%rsp), %xmm3
- movq 32(%rsp), %xmm2
- movq 24(%rsp), %xmm1
- movq 16(%rsp), %xmm0
- movq 8(%rsp), %rsi
- movq (%rsp), %rdi
- addq $56, %rsp
- movq 64(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_8), .-GL_PREFIX(_dispatch_stub_8)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_9)
- .type GL_PREFIX(_dispatch_stub_9), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_9))
-GL_PREFIX(_dispatch_stub_9):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 72(%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 72(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 72(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 72(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_9), .-GL_PREFIX(_dispatch_stub_9)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_10)
- .type GL_PREFIX(_dispatch_stub_10), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_10))
-GL_PREFIX(_dispatch_stub_10):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 80(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 80(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 80(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 80(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_10), .-GL_PREFIX(_dispatch_stub_10)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_11)
- .type GL_PREFIX(_dispatch_stub_11), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_11))
-GL_PREFIX(_dispatch_stub_11):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 88(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $24, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- movq %xmm2, 16(%rsp)
- call _x86_64_get_dispatch@PLT
- movq 16(%rsp), %xmm2
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $24, %rsp
- movq 88(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 88(%rax), %r11
- jmp *%r11
-1:
- subq $24, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- movq %xmm2, 16(%rsp)
- call _glapi_get_dispatch
- movq 16(%rsp), %xmm2
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $24, %rsp
- movq 88(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_11), .-GL_PREFIX(_dispatch_stub_11)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_12)
- .type GL_PREFIX(_dispatch_stub_12), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_12))
-GL_PREFIX(_dispatch_stub_12):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 96(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 96(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 96(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 96(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_12), .-GL_PREFIX(_dispatch_stub_12)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_13)
- .type GL_PREFIX(_dispatch_stub_13), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_13))
-GL_PREFIX(_dispatch_stub_13):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 104(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $24, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- movq %xmm2, 16(%rsp)
- call _x86_64_get_dispatch@PLT
- movq 16(%rsp), %xmm2
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $24, %rsp
- movq 104(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 104(%rax), %r11
- jmp *%r11
-1:
- subq $24, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- movq %xmm2, 16(%rsp)
- call _glapi_get_dispatch
- movq 16(%rsp), %xmm2
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $24, %rsp
- movq 104(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_13), .-GL_PREFIX(_dispatch_stub_13)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_14)
- .type GL_PREFIX(_dispatch_stub_14), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_14))
-GL_PREFIX(_dispatch_stub_14):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 112(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 112(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 112(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 112(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_14), .-GL_PREFIX(_dispatch_stub_14)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_15)
- .type GL_PREFIX(_dispatch_stub_15), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_15))
-GL_PREFIX(_dispatch_stub_15):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 120(%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 120(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 120(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 120(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_15), .-GL_PREFIX(_dispatch_stub_15)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_16)
- .type GL_PREFIX(_dispatch_stub_16), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_16))
-GL_PREFIX(_dispatch_stub_16):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 128(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 128(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 128(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 128(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_16), .-GL_PREFIX(_dispatch_stub_16)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_17)
- .type GL_PREFIX(_dispatch_stub_17), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_17))
-GL_PREFIX(_dispatch_stub_17):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 136(%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 136(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 136(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 136(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_17), .-GL_PREFIX(_dispatch_stub_17)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_18)
- .type GL_PREFIX(_dispatch_stub_18), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_18))
-GL_PREFIX(_dispatch_stub_18):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 144(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 144(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 144(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 144(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_18), .-GL_PREFIX(_dispatch_stub_18)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_19)
- .type GL_PREFIX(_dispatch_stub_19), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_19))
-GL_PREFIX(_dispatch_stub_19):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 152(%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 152(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 152(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 152(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_19), .-GL_PREFIX(_dispatch_stub_19)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_20)
- .type GL_PREFIX(_dispatch_stub_20), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_20))
-GL_PREFIX(_dispatch_stub_20):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 160(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 160(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 160(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 160(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_20), .-GL_PREFIX(_dispatch_stub_20)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_21)
- .type GL_PREFIX(_dispatch_stub_21), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_21))
-GL_PREFIX(_dispatch_stub_21):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 168(%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 168(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 168(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 168(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_21), .-GL_PREFIX(_dispatch_stub_21)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_22)
- .type GL_PREFIX(_dispatch_stub_22), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_22))
-GL_PREFIX(_dispatch_stub_22):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 176(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 176(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 176(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 176(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_22), .-GL_PREFIX(_dispatch_stub_22)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_23)
- .type GL_PREFIX(_dispatch_stub_23), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_23))
-GL_PREFIX(_dispatch_stub_23):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 184(%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 184(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 184(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 184(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_23), .-GL_PREFIX(_dispatch_stub_23)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_24)
- .type GL_PREFIX(_dispatch_stub_24), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_24))
-GL_PREFIX(_dispatch_stub_24):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 192(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 192(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 192(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 192(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_24), .-GL_PREFIX(_dispatch_stub_24)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_25)
- .type GL_PREFIX(_dispatch_stub_25), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_25))
-GL_PREFIX(_dispatch_stub_25):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 200(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 200(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 200(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 200(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_25), .-GL_PREFIX(_dispatch_stub_25)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_26)
- .type GL_PREFIX(_dispatch_stub_26), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_26))
-GL_PREFIX(_dispatch_stub_26):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 208(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 208(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 208(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 208(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_26), .-GL_PREFIX(_dispatch_stub_26)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_27)
- .type GL_PREFIX(_dispatch_stub_27), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_27))
-GL_PREFIX(_dispatch_stub_27):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 216(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $40, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- movq %xmm2, 16(%rsp)
- movq %xmm3, 24(%rsp)
- call _x86_64_get_dispatch@PLT
- movq 24(%rsp), %xmm3
- movq 16(%rsp), %xmm2
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $40, %rsp
- movq 216(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 216(%rax), %r11
- jmp *%r11
-1:
- subq $40, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- movq %xmm2, 16(%rsp)
- movq %xmm3, 24(%rsp)
- call _glapi_get_dispatch
- movq 24(%rsp), %xmm3
- movq 16(%rsp), %xmm2
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $40, %rsp
- movq 216(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_27), .-GL_PREFIX(_dispatch_stub_27)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_28)
- .type GL_PREFIX(_dispatch_stub_28), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_28))
-GL_PREFIX(_dispatch_stub_28):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 224(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 224(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 224(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 224(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_28), .-GL_PREFIX(_dispatch_stub_28)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_29)
- .type GL_PREFIX(_dispatch_stub_29), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_29))
-GL_PREFIX(_dispatch_stub_29):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 232(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $40, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- movq %xmm2, 16(%rsp)
- movq %xmm3, 24(%rsp)
- call _x86_64_get_dispatch@PLT
- movq 24(%rsp), %xmm3
- movq 16(%rsp), %xmm2
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $40, %rsp
- movq 232(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 232(%rax), %r11
- jmp *%r11
-1:
- subq $40, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- movq %xmm2, 16(%rsp)
- movq %xmm3, 24(%rsp)
- call _glapi_get_dispatch
- movq 24(%rsp), %xmm3
- movq 16(%rsp), %xmm2
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $40, %rsp
- movq 232(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_29), .-GL_PREFIX(_dispatch_stub_29)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_30)
- .type GL_PREFIX(_dispatch_stub_30), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_30))
-GL_PREFIX(_dispatch_stub_30):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 240(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 240(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 240(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 240(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_30), .-GL_PREFIX(_dispatch_stub_30)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_31)
- .type GL_PREFIX(_dispatch_stub_31), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_31))
-GL_PREFIX(_dispatch_stub_31):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 248(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 248(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 248(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 248(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_31), .-GL_PREFIX(_dispatch_stub_31)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_32)
- .type GL_PREFIX(_dispatch_stub_32), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_32))
-GL_PREFIX(_dispatch_stub_32):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 256(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 256(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 256(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 256(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_32), .-GL_PREFIX(_dispatch_stub_32)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_33)
- .type GL_PREFIX(_dispatch_stub_33), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_33))
-GL_PREFIX(_dispatch_stub_33):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 264(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 264(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 264(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 264(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_33), .-GL_PREFIX(_dispatch_stub_33)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_34)
- .type GL_PREFIX(_dispatch_stub_34), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_34))
-GL_PREFIX(_dispatch_stub_34):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 272(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 272(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 272(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 272(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_34), .-GL_PREFIX(_dispatch_stub_34)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_35)
- .type GL_PREFIX(_dispatch_stub_35), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_35))
-GL_PREFIX(_dispatch_stub_35):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 280(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 280(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 280(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 280(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_35), .-GL_PREFIX(_dispatch_stub_35)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_36)
- .type GL_PREFIX(_dispatch_stub_36), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_36))
-GL_PREFIX(_dispatch_stub_36):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 288(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 288(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 288(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 288(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_36), .-GL_PREFIX(_dispatch_stub_36)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_37)
- .type GL_PREFIX(_dispatch_stub_37), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_37))
-GL_PREFIX(_dispatch_stub_37):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 296(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 296(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 296(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 296(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_37), .-GL_PREFIX(_dispatch_stub_37)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_38)
- .type GL_PREFIX(_dispatch_stub_38), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_38))
-GL_PREFIX(_dispatch_stub_38):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 304(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 304(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 304(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 304(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_38), .-GL_PREFIX(_dispatch_stub_38)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_39)
- .type GL_PREFIX(_dispatch_stub_39), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_39))
-GL_PREFIX(_dispatch_stub_39):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 312(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 312(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 312(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 312(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_39), .-GL_PREFIX(_dispatch_stub_39)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_40)
- .type GL_PREFIX(_dispatch_stub_40), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_40))
-GL_PREFIX(_dispatch_stub_40):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 320(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 320(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 320(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 320(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_40), .-GL_PREFIX(_dispatch_stub_40)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_41)
- .type GL_PREFIX(_dispatch_stub_41), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_41))
-GL_PREFIX(_dispatch_stub_41):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 328(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 328(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 328(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 328(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_41), .-GL_PREFIX(_dispatch_stub_41)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_42)
- .type GL_PREFIX(_dispatch_stub_42), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_42))
-GL_PREFIX(_dispatch_stub_42):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 336(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 336(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 336(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 336(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_42), .-GL_PREFIX(_dispatch_stub_42)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_43)
- .type GL_PREFIX(_dispatch_stub_43), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_43))
-GL_PREFIX(_dispatch_stub_43):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 344(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- movq 344(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 344(%rax), %r11
- jmp *%r11
-1:
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- movq 344(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_43), .-GL_PREFIX(_dispatch_stub_43)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_44)
- .type GL_PREFIX(_dispatch_stub_44), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_44))
-GL_PREFIX(_dispatch_stub_44):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 352(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $8, %rsp
- movq %xmm0, (%rsp)
- call _x86_64_get_dispatch@PLT
- movq (%rsp), %xmm0
- addq $8, %rsp
- movq 352(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 352(%rax), %r11
- jmp *%r11
-1:
- subq $8, %rsp
- movq %xmm0, (%rsp)
- call _glapi_get_dispatch
- movq (%rsp), %xmm0
- addq $8, %rsp
- movq 352(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_44), .-GL_PREFIX(_dispatch_stub_44)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_45)
- .type GL_PREFIX(_dispatch_stub_45), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_45))
-GL_PREFIX(_dispatch_stub_45):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 360(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 360(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 360(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 360(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_45), .-GL_PREFIX(_dispatch_stub_45)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_46)
- .type GL_PREFIX(_dispatch_stub_46), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_46))
-GL_PREFIX(_dispatch_stub_46):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 368(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $8, %rsp
- movq %xmm0, (%rsp)
- call _x86_64_get_dispatch@PLT
- movq (%rsp), %xmm0
- addq $8, %rsp
- movq 368(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 368(%rax), %r11
- jmp *%r11
-1:
- subq $8, %rsp
- movq %xmm0, (%rsp)
- call _glapi_get_dispatch
- movq (%rsp), %xmm0
- addq $8, %rsp
- movq 368(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_46), .-GL_PREFIX(_dispatch_stub_46)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_47)
- .type GL_PREFIX(_dispatch_stub_47), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_47))
-GL_PREFIX(_dispatch_stub_47):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 376(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 376(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 376(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 376(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_47), .-GL_PREFIX(_dispatch_stub_47)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_48)
- .type GL_PREFIX(_dispatch_stub_48), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_48))
-GL_PREFIX(_dispatch_stub_48):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 384(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 384(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 384(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 384(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_48), .-GL_PREFIX(_dispatch_stub_48)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_49)
- .type GL_PREFIX(_dispatch_stub_49), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_49))
-GL_PREFIX(_dispatch_stub_49):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 392(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 392(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 392(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 392(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_49), .-GL_PREFIX(_dispatch_stub_49)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_50)
- .type GL_PREFIX(_dispatch_stub_50), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_50))
-GL_PREFIX(_dispatch_stub_50):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 400(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 400(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 400(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 400(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_50), .-GL_PREFIX(_dispatch_stub_50)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_51)
- .type GL_PREFIX(_dispatch_stub_51), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_51))
-GL_PREFIX(_dispatch_stub_51):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 408(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 408(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 408(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 408(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_51), .-GL_PREFIX(_dispatch_stub_51)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_52)
- .type GL_PREFIX(_dispatch_stub_52), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_52))
-GL_PREFIX(_dispatch_stub_52):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 416(%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 416(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 416(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 416(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_52), .-GL_PREFIX(_dispatch_stub_52)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_53)
- .type GL_PREFIX(_dispatch_stub_53), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_53))
-GL_PREFIX(_dispatch_stub_53):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 424(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 424(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 424(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 424(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_53), .-GL_PREFIX(_dispatch_stub_53)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_54)
- .type GL_PREFIX(_dispatch_stub_54), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_54))
-GL_PREFIX(_dispatch_stub_54):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 432(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $24, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- movq %xmm2, 16(%rsp)
- call _x86_64_get_dispatch@PLT
- movq 16(%rsp), %xmm2
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $24, %rsp
- movq 432(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 432(%rax), %r11
- jmp *%r11
-1:
- subq $24, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- movq %xmm2, 16(%rsp)
- call _glapi_get_dispatch
- movq 16(%rsp), %xmm2
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $24, %rsp
- movq 432(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_54), .-GL_PREFIX(_dispatch_stub_54)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_55)
- .type GL_PREFIX(_dispatch_stub_55), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_55))
-GL_PREFIX(_dispatch_stub_55):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 440(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 440(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 440(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 440(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_55), .-GL_PREFIX(_dispatch_stub_55)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_56)
- .type GL_PREFIX(_dispatch_stub_56), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_56))
-GL_PREFIX(_dispatch_stub_56):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 448(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $24, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- movq %xmm2, 16(%rsp)
- call _x86_64_get_dispatch@PLT
- movq 16(%rsp), %xmm2
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $24, %rsp
- movq 448(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 448(%rax), %r11
- jmp *%r11
-1:
- subq $24, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- movq %xmm2, 16(%rsp)
- call _glapi_get_dispatch
- movq 16(%rsp), %xmm2
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $24, %rsp
- movq 448(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_56), .-GL_PREFIX(_dispatch_stub_56)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_57)
- .type GL_PREFIX(_dispatch_stub_57), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_57))
-GL_PREFIX(_dispatch_stub_57):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 456(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 456(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 456(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 456(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_57), .-GL_PREFIX(_dispatch_stub_57)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_58)
- .type GL_PREFIX(_dispatch_stub_58), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_58))
-GL_PREFIX(_dispatch_stub_58):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 464(%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 464(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 464(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 464(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_58), .-GL_PREFIX(_dispatch_stub_58)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_59)
- .type GL_PREFIX(_dispatch_stub_59), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_59))
-GL_PREFIX(_dispatch_stub_59):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 472(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 472(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 472(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 472(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_59), .-GL_PREFIX(_dispatch_stub_59)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_60)
- .type GL_PREFIX(_dispatch_stub_60), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_60))
-GL_PREFIX(_dispatch_stub_60):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 480(%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 480(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 480(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 480(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_60), .-GL_PREFIX(_dispatch_stub_60)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_61)
- .type GL_PREFIX(_dispatch_stub_61), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_61))
-GL_PREFIX(_dispatch_stub_61):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 488(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 488(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 488(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 488(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_61), .-GL_PREFIX(_dispatch_stub_61)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_62)
- .type GL_PREFIX(_dispatch_stub_62), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_62))
-GL_PREFIX(_dispatch_stub_62):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 496(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $24, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- call _x86_64_get_dispatch@PLT
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $24, %rsp
- movq 496(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 496(%rax), %r11
- jmp *%r11
-1:
- subq $24, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- call _glapi_get_dispatch
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $24, %rsp
- movq 496(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_62), .-GL_PREFIX(_dispatch_stub_62)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_63)
- .type GL_PREFIX(_dispatch_stub_63), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_63))
-GL_PREFIX(_dispatch_stub_63):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 504(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 504(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 504(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 504(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_63), .-GL_PREFIX(_dispatch_stub_63)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_64)
- .type GL_PREFIX(_dispatch_stub_64), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_64))
-GL_PREFIX(_dispatch_stub_64):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 512(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $24, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- call _x86_64_get_dispatch@PLT
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $24, %rsp
- movq 512(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 512(%rax), %r11
- jmp *%r11
-1:
- subq $24, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- call _glapi_get_dispatch
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $24, %rsp
- movq 512(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_64), .-GL_PREFIX(_dispatch_stub_64)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_65)
- .type GL_PREFIX(_dispatch_stub_65), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_65))
-GL_PREFIX(_dispatch_stub_65):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 520(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 520(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 520(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 520(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_65), .-GL_PREFIX(_dispatch_stub_65)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_66)
- .type GL_PREFIX(_dispatch_stub_66), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_66))
-GL_PREFIX(_dispatch_stub_66):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 528(%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 528(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 528(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 528(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_66), .-GL_PREFIX(_dispatch_stub_66)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_67)
- .type GL_PREFIX(_dispatch_stub_67), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_67))
-GL_PREFIX(_dispatch_stub_67):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 536(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 536(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 536(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 536(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_67), .-GL_PREFIX(_dispatch_stub_67)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_68)
- .type GL_PREFIX(_dispatch_stub_68), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_68))
-GL_PREFIX(_dispatch_stub_68):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 544(%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 544(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 544(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 544(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_68), .-GL_PREFIX(_dispatch_stub_68)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_69)
- .type GL_PREFIX(_dispatch_stub_69), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_69))
-GL_PREFIX(_dispatch_stub_69):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 552(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 552(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 552(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 552(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_69), .-GL_PREFIX(_dispatch_stub_69)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_70)
- .type GL_PREFIX(_dispatch_stub_70), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_70))
-GL_PREFIX(_dispatch_stub_70):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 560(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $24, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- movq %xmm2, 16(%rsp)
- call _x86_64_get_dispatch@PLT
- movq 16(%rsp), %xmm2
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $24, %rsp
- movq 560(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 560(%rax), %r11
- jmp *%r11
-1:
- subq $24, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- movq %xmm2, 16(%rsp)
- call _glapi_get_dispatch
- movq 16(%rsp), %xmm2
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $24, %rsp
- movq 560(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_70), .-GL_PREFIX(_dispatch_stub_70)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_71)
- .type GL_PREFIX(_dispatch_stub_71), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_71))
-GL_PREFIX(_dispatch_stub_71):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 568(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 568(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 568(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 568(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_71), .-GL_PREFIX(_dispatch_stub_71)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_72)
- .type GL_PREFIX(_dispatch_stub_72), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_72))
-GL_PREFIX(_dispatch_stub_72):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 576(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $24, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- movq %xmm2, 16(%rsp)
- call _x86_64_get_dispatch@PLT
- movq 16(%rsp), %xmm2
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $24, %rsp
- movq 576(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 576(%rax), %r11
- jmp *%r11
-1:
- subq $24, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- movq %xmm2, 16(%rsp)
- call _glapi_get_dispatch
- movq 16(%rsp), %xmm2
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $24, %rsp
- movq 576(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_72), .-GL_PREFIX(_dispatch_stub_72)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_73)
- .type GL_PREFIX(_dispatch_stub_73), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_73))
-GL_PREFIX(_dispatch_stub_73):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 584(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 584(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 584(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 584(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_73), .-GL_PREFIX(_dispatch_stub_73)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_74)
- .type GL_PREFIX(_dispatch_stub_74), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_74))
-GL_PREFIX(_dispatch_stub_74):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 592(%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 592(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 592(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 592(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_74), .-GL_PREFIX(_dispatch_stub_74)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_75)
- .type GL_PREFIX(_dispatch_stub_75), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_75))
-GL_PREFIX(_dispatch_stub_75):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 600(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 600(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 600(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 600(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_75), .-GL_PREFIX(_dispatch_stub_75)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_76)
- .type GL_PREFIX(_dispatch_stub_76), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_76))
-GL_PREFIX(_dispatch_stub_76):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 608(%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 608(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 608(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 608(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_76), .-GL_PREFIX(_dispatch_stub_76)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_77)
- .type GL_PREFIX(_dispatch_stub_77), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_77))
-GL_PREFIX(_dispatch_stub_77):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 616(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 616(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 616(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 616(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_77), .-GL_PREFIX(_dispatch_stub_77)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_78)
- .type GL_PREFIX(_dispatch_stub_78), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_78))
-GL_PREFIX(_dispatch_stub_78):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 624(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $40, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- movq %xmm2, 16(%rsp)
- movq %xmm3, 24(%rsp)
- call _x86_64_get_dispatch@PLT
- movq 24(%rsp), %xmm3
- movq 16(%rsp), %xmm2
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $40, %rsp
- movq 624(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 624(%rax), %r11
- jmp *%r11
-1:
- subq $40, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- movq %xmm2, 16(%rsp)
- movq %xmm3, 24(%rsp)
- call _glapi_get_dispatch
- movq 24(%rsp), %xmm3
- movq 16(%rsp), %xmm2
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $40, %rsp
- movq 624(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_78), .-GL_PREFIX(_dispatch_stub_78)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_79)
- .type GL_PREFIX(_dispatch_stub_79), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_79))
-GL_PREFIX(_dispatch_stub_79):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 632(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 632(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 632(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 632(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_79), .-GL_PREFIX(_dispatch_stub_79)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_80)
- .type GL_PREFIX(_dispatch_stub_80), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_80))
-GL_PREFIX(_dispatch_stub_80):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 640(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $40, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- movq %xmm2, 16(%rsp)
- movq %xmm3, 24(%rsp)
- call _x86_64_get_dispatch@PLT
- movq 24(%rsp), %xmm3
- movq 16(%rsp), %xmm2
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $40, %rsp
- movq 640(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 640(%rax), %r11
- jmp *%r11
-1:
- subq $40, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- movq %xmm2, 16(%rsp)
- movq %xmm3, 24(%rsp)
- call _glapi_get_dispatch
- movq 24(%rsp), %xmm3
- movq 16(%rsp), %xmm2
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $40, %rsp
- movq 640(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_80), .-GL_PREFIX(_dispatch_stub_80)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_81)
- .type GL_PREFIX(_dispatch_stub_81), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_81))
-GL_PREFIX(_dispatch_stub_81):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 648(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 648(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 648(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 648(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_81), .-GL_PREFIX(_dispatch_stub_81)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_82)
- .type GL_PREFIX(_dispatch_stub_82), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_82))
-GL_PREFIX(_dispatch_stub_82):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 656(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 656(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 656(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 656(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_82), .-GL_PREFIX(_dispatch_stub_82)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_83)
- .type GL_PREFIX(_dispatch_stub_83), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_83))
-GL_PREFIX(_dispatch_stub_83):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 664(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 664(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 664(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 664(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_83), .-GL_PREFIX(_dispatch_stub_83)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_84)
- .type GL_PREFIX(_dispatch_stub_84), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_84))
-GL_PREFIX(_dispatch_stub_84):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 672(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 672(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 672(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 672(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_84), .-GL_PREFIX(_dispatch_stub_84)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_85)
- .type GL_PREFIX(_dispatch_stub_85), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_85))
-GL_PREFIX(_dispatch_stub_85):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 680(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 680(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 680(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 680(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_85), .-GL_PREFIX(_dispatch_stub_85)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_86)
- .type GL_PREFIX(_dispatch_stub_86), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_86))
-GL_PREFIX(_dispatch_stub_86):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 688(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $40, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- movq %xmm2, 16(%rsp)
- movq %xmm3, 24(%rsp)
- call _x86_64_get_dispatch@PLT
- movq 24(%rsp), %xmm3
- movq 16(%rsp), %xmm2
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $40, %rsp
- movq 688(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 688(%rax), %r11
- jmp *%r11
-1:
- subq $40, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- movq %xmm2, 16(%rsp)
- movq %xmm3, 24(%rsp)
- call _glapi_get_dispatch
- movq 24(%rsp), %xmm3
- movq 16(%rsp), %xmm2
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $40, %rsp
- movq 688(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_86), .-GL_PREFIX(_dispatch_stub_86)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_87)
- .type GL_PREFIX(_dispatch_stub_87), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_87))
-GL_PREFIX(_dispatch_stub_87):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 696(%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 696(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 696(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 696(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_87), .-GL_PREFIX(_dispatch_stub_87)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_88)
- .type GL_PREFIX(_dispatch_stub_88), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_88))
-GL_PREFIX(_dispatch_stub_88):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 704(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $40, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- movq %xmm2, 16(%rsp)
- movq %xmm3, 24(%rsp)
- call _x86_64_get_dispatch@PLT
- movq 24(%rsp), %xmm3
- movq 16(%rsp), %xmm2
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $40, %rsp
- movq 704(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 704(%rax), %r11
- jmp *%r11
-1:
- subq $40, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- movq %xmm2, 16(%rsp)
- movq %xmm3, 24(%rsp)
- call _glapi_get_dispatch
- movq 24(%rsp), %xmm3
- movq 16(%rsp), %xmm2
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $40, %rsp
- movq 704(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_88), .-GL_PREFIX(_dispatch_stub_88)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_89)
- .type GL_PREFIX(_dispatch_stub_89), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_89))
-GL_PREFIX(_dispatch_stub_89):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 712(%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 712(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 712(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 712(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_89), .-GL_PREFIX(_dispatch_stub_89)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_90)
- .type GL_PREFIX(_dispatch_stub_90), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_90))
-GL_PREFIX(_dispatch_stub_90):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 720(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 720(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 720(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 720(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_90), .-GL_PREFIX(_dispatch_stub_90)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_91)
- .type GL_PREFIX(_dispatch_stub_91), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_91))
-GL_PREFIX(_dispatch_stub_91):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 728(%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 728(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 728(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 728(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_91), .-GL_PREFIX(_dispatch_stub_91)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_92)
- .type GL_PREFIX(_dispatch_stub_92), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_92))
-GL_PREFIX(_dispatch_stub_92):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 736(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 736(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 736(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 736(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_92), .-GL_PREFIX(_dispatch_stub_92)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_93)
- .type GL_PREFIX(_dispatch_stub_93), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_93))
-GL_PREFIX(_dispatch_stub_93):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 744(%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 744(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 744(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 744(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_93), .-GL_PREFIX(_dispatch_stub_93)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_94)
- .type GL_PREFIX(_dispatch_stub_94), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_94))
-GL_PREFIX(_dispatch_stub_94):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 752(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $8, %rsp
- movq %xmm0, (%rsp)
- call _x86_64_get_dispatch@PLT
- movq (%rsp), %xmm0
- addq $8, %rsp
- movq 752(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 752(%rax), %r11
- jmp *%r11
-1:
- subq $8, %rsp
- movq %xmm0, (%rsp)
- call _glapi_get_dispatch
- movq (%rsp), %xmm0
- addq $8, %rsp
- movq 752(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_94), .-GL_PREFIX(_dispatch_stub_94)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_95)
- .type GL_PREFIX(_dispatch_stub_95), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_95))
-GL_PREFIX(_dispatch_stub_95):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 760(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 760(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 760(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 760(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_95), .-GL_PREFIX(_dispatch_stub_95)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_96)
- .type GL_PREFIX(_dispatch_stub_96), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_96))
-GL_PREFIX(_dispatch_stub_96):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 768(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $8, %rsp
- movq %xmm0, (%rsp)
- call _x86_64_get_dispatch@PLT
- movq (%rsp), %xmm0
- addq $8, %rsp
- movq 768(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 768(%rax), %r11
- jmp *%r11
-1:
- subq $8, %rsp
- movq %xmm0, (%rsp)
- call _glapi_get_dispatch
- movq (%rsp), %xmm0
- addq $8, %rsp
- movq 768(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_96), .-GL_PREFIX(_dispatch_stub_96)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_97)
- .type GL_PREFIX(_dispatch_stub_97), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_97))
-GL_PREFIX(_dispatch_stub_97):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 776(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 776(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 776(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 776(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_97), .-GL_PREFIX(_dispatch_stub_97)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_98)
- .type GL_PREFIX(_dispatch_stub_98), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_98))
-GL_PREFIX(_dispatch_stub_98):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 784(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 784(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 784(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 784(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_98), .-GL_PREFIX(_dispatch_stub_98)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_99)
- .type GL_PREFIX(_dispatch_stub_99), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_99))
-GL_PREFIX(_dispatch_stub_99):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 792(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 792(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 792(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 792(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_99), .-GL_PREFIX(_dispatch_stub_99)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_100)
- .type GL_PREFIX(_dispatch_stub_100), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_100))
-GL_PREFIX(_dispatch_stub_100):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 800(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 800(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 800(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 800(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_100), .-GL_PREFIX(_dispatch_stub_100)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_101)
- .type GL_PREFIX(_dispatch_stub_101), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_101))
-GL_PREFIX(_dispatch_stub_101):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 808(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 808(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 808(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 808(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_101), .-GL_PREFIX(_dispatch_stub_101)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_102)
- .type GL_PREFIX(_dispatch_stub_102), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_102))
-GL_PREFIX(_dispatch_stub_102):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 816(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $24, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- call _x86_64_get_dispatch@PLT
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $24, %rsp
- movq 816(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 816(%rax), %r11
- jmp *%r11
-1:
- subq $24, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- call _glapi_get_dispatch
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $24, %rsp
- movq 816(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_102), .-GL_PREFIX(_dispatch_stub_102)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_103)
- .type GL_PREFIX(_dispatch_stub_103), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_103))
-GL_PREFIX(_dispatch_stub_103):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 824(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 824(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 824(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 824(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_103), .-GL_PREFIX(_dispatch_stub_103)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_104)
- .type GL_PREFIX(_dispatch_stub_104), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_104))
-GL_PREFIX(_dispatch_stub_104):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 832(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $24, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- call _x86_64_get_dispatch@PLT
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $24, %rsp
- movq 832(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 832(%rax), %r11
- jmp *%r11
-1:
- subq $24, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- call _glapi_get_dispatch
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $24, %rsp
- movq 832(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_104), .-GL_PREFIX(_dispatch_stub_104)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_105)
- .type GL_PREFIX(_dispatch_stub_105), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_105))
-GL_PREFIX(_dispatch_stub_105):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 840(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 840(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 840(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 840(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_105), .-GL_PREFIX(_dispatch_stub_105)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_106)
- .type GL_PREFIX(_dispatch_stub_106), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_106))
-GL_PREFIX(_dispatch_stub_106):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 848(%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 848(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 848(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 848(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_106), .-GL_PREFIX(_dispatch_stub_106)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_107)
- .type GL_PREFIX(_dispatch_stub_107), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_107))
-GL_PREFIX(_dispatch_stub_107):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 856(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 856(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 856(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 856(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_107), .-GL_PREFIX(_dispatch_stub_107)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_108)
- .type GL_PREFIX(_dispatch_stub_108), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_108))
-GL_PREFIX(_dispatch_stub_108):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 864(%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 864(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 864(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 864(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_108), .-GL_PREFIX(_dispatch_stub_108)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_109)
- .type GL_PREFIX(_dispatch_stub_109), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_109))
-GL_PREFIX(_dispatch_stub_109):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 872(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 872(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 872(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 872(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_109), .-GL_PREFIX(_dispatch_stub_109)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_110)
- .type GL_PREFIX(_dispatch_stub_110), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_110))
-GL_PREFIX(_dispatch_stub_110):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 880(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $24, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- movq %xmm2, 16(%rsp)
- call _x86_64_get_dispatch@PLT
- movq 16(%rsp), %xmm2
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $24, %rsp
- movq 880(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 880(%rax), %r11
- jmp *%r11
-1:
- subq $24, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- movq %xmm2, 16(%rsp)
- call _glapi_get_dispatch
- movq 16(%rsp), %xmm2
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $24, %rsp
- movq 880(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_110), .-GL_PREFIX(_dispatch_stub_110)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_111)
- .type GL_PREFIX(_dispatch_stub_111), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_111))
-GL_PREFIX(_dispatch_stub_111):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 888(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 888(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 888(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 888(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_111), .-GL_PREFIX(_dispatch_stub_111)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_112)
- .type GL_PREFIX(_dispatch_stub_112), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_112))
-GL_PREFIX(_dispatch_stub_112):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 896(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $24, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- movq %xmm2, 16(%rsp)
- call _x86_64_get_dispatch@PLT
- movq 16(%rsp), %xmm2
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $24, %rsp
- movq 896(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 896(%rax), %r11
- jmp *%r11
-1:
- subq $24, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- movq %xmm2, 16(%rsp)
- call _glapi_get_dispatch
- movq 16(%rsp), %xmm2
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $24, %rsp
- movq 896(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_112), .-GL_PREFIX(_dispatch_stub_112)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_113)
- .type GL_PREFIX(_dispatch_stub_113), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_113))
-GL_PREFIX(_dispatch_stub_113):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 904(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 904(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 904(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 904(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_113), .-GL_PREFIX(_dispatch_stub_113)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_114)
- .type GL_PREFIX(_dispatch_stub_114), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_114))
-GL_PREFIX(_dispatch_stub_114):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 912(%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 912(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 912(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 912(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_114), .-GL_PREFIX(_dispatch_stub_114)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_115)
- .type GL_PREFIX(_dispatch_stub_115), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_115))
-GL_PREFIX(_dispatch_stub_115):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 920(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 920(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 920(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 920(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_115), .-GL_PREFIX(_dispatch_stub_115)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_116)
- .type GL_PREFIX(_dispatch_stub_116), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_116))
-GL_PREFIX(_dispatch_stub_116):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 928(%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 928(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 928(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 928(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_116), .-GL_PREFIX(_dispatch_stub_116)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_117)
- .type GL_PREFIX(_dispatch_stub_117), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_117))
-GL_PREFIX(_dispatch_stub_117):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 936(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 936(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 936(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 936(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_117), .-GL_PREFIX(_dispatch_stub_117)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_118)
- .type GL_PREFIX(_dispatch_stub_118), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_118))
-GL_PREFIX(_dispatch_stub_118):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 944(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $40, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- movq %xmm2, 16(%rsp)
- movq %xmm3, 24(%rsp)
- call _x86_64_get_dispatch@PLT
- movq 24(%rsp), %xmm3
- movq 16(%rsp), %xmm2
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $40, %rsp
- movq 944(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 944(%rax), %r11
- jmp *%r11
-1:
- subq $40, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- movq %xmm2, 16(%rsp)
- movq %xmm3, 24(%rsp)
- call _glapi_get_dispatch
- movq 24(%rsp), %xmm3
- movq 16(%rsp), %xmm2
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $40, %rsp
- movq 944(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_118), .-GL_PREFIX(_dispatch_stub_118)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_119)
- .type GL_PREFIX(_dispatch_stub_119), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_119))
-GL_PREFIX(_dispatch_stub_119):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 952(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 952(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 952(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 952(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_119), .-GL_PREFIX(_dispatch_stub_119)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_120)
- .type GL_PREFIX(_dispatch_stub_120), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_120))
-GL_PREFIX(_dispatch_stub_120):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 960(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $40, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- movq %xmm2, 16(%rsp)
- movq %xmm3, 24(%rsp)
- call _x86_64_get_dispatch@PLT
- movq 24(%rsp), %xmm3
- movq 16(%rsp), %xmm2
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $40, %rsp
- movq 960(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 960(%rax), %r11
- jmp *%r11
-1:
- subq $40, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- movq %xmm2, 16(%rsp)
- movq %xmm3, 24(%rsp)
- call _glapi_get_dispatch
- movq 24(%rsp), %xmm3
- movq 16(%rsp), %xmm2
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $40, %rsp
- movq 960(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_120), .-GL_PREFIX(_dispatch_stub_120)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_121)
- .type GL_PREFIX(_dispatch_stub_121), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_121))
-GL_PREFIX(_dispatch_stub_121):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 968(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 968(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 968(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 968(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_121), .-GL_PREFIX(_dispatch_stub_121)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_122)
- .type GL_PREFIX(_dispatch_stub_122), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_122))
-GL_PREFIX(_dispatch_stub_122):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 976(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 976(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 976(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 976(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_122), .-GL_PREFIX(_dispatch_stub_122)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_123)
- .type GL_PREFIX(_dispatch_stub_123), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_123))
-GL_PREFIX(_dispatch_stub_123):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 984(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 984(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 984(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 984(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_123), .-GL_PREFIX(_dispatch_stub_123)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_124)
- .type GL_PREFIX(_dispatch_stub_124), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_124))
-GL_PREFIX(_dispatch_stub_124):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 992(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 992(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 992(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 992(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_124), .-GL_PREFIX(_dispatch_stub_124)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_125)
- .type GL_PREFIX(_dispatch_stub_125), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_125))
-GL_PREFIX(_dispatch_stub_125):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1000(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 1000(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1000(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 1000(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_125), .-GL_PREFIX(_dispatch_stub_125)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_126)
- .type GL_PREFIX(_dispatch_stub_126), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_126))
-GL_PREFIX(_dispatch_stub_126):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1008(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $24, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- call _x86_64_get_dispatch@PLT
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $24, %rsp
- movq 1008(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1008(%rax), %r11
- jmp *%r11
-1:
- subq $24, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- call _glapi_get_dispatch
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $24, %rsp
- movq 1008(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_126), .-GL_PREFIX(_dispatch_stub_126)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_127)
- .type GL_PREFIX(_dispatch_stub_127), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_127))
-GL_PREFIX(_dispatch_stub_127):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1016(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 1016(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1016(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 1016(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_127), .-GL_PREFIX(_dispatch_stub_127)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_128)
- .type GL_PREFIX(_dispatch_stub_128), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_128))
-GL_PREFIX(_dispatch_stub_128):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1024(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $24, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- call _x86_64_get_dispatch@PLT
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $24, %rsp
- movq 1024(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1024(%rax), %r11
- jmp *%r11
-1:
- subq $24, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- call _glapi_get_dispatch
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $24, %rsp
- movq 1024(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_128), .-GL_PREFIX(_dispatch_stub_128)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_129)
- .type GL_PREFIX(_dispatch_stub_129), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_129))
-GL_PREFIX(_dispatch_stub_129):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1032(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 1032(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1032(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 1032(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_129), .-GL_PREFIX(_dispatch_stub_129)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_130)
- .type GL_PREFIX(_dispatch_stub_130), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_130))
-GL_PREFIX(_dispatch_stub_130):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1040(%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 1040(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1040(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 1040(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_130), .-GL_PREFIX(_dispatch_stub_130)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_131)
- .type GL_PREFIX(_dispatch_stub_131), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_131))
-GL_PREFIX(_dispatch_stub_131):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1048(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 1048(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1048(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 1048(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_131), .-GL_PREFIX(_dispatch_stub_131)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_132)
- .type GL_PREFIX(_dispatch_stub_132), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_132))
-GL_PREFIX(_dispatch_stub_132):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1056(%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 1056(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1056(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 1056(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_132), .-GL_PREFIX(_dispatch_stub_132)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_133)
- .type GL_PREFIX(_dispatch_stub_133), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_133))
-GL_PREFIX(_dispatch_stub_133):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1064(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 1064(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1064(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 1064(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_133), .-GL_PREFIX(_dispatch_stub_133)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_134)
- .type GL_PREFIX(_dispatch_stub_134), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_134))
-GL_PREFIX(_dispatch_stub_134):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1072(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $24, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- movq %xmm2, 16(%rsp)
- call _x86_64_get_dispatch@PLT
- movq 16(%rsp), %xmm2
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $24, %rsp
- movq 1072(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1072(%rax), %r11
- jmp *%r11
-1:
- subq $24, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- movq %xmm2, 16(%rsp)
- call _glapi_get_dispatch
- movq 16(%rsp), %xmm2
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $24, %rsp
- movq 1072(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_134), .-GL_PREFIX(_dispatch_stub_134)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_135)
- .type GL_PREFIX(_dispatch_stub_135), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_135))
-GL_PREFIX(_dispatch_stub_135):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1080(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 1080(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1080(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 1080(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_135), .-GL_PREFIX(_dispatch_stub_135)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_136)
- .type GL_PREFIX(_dispatch_stub_136), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_136))
-GL_PREFIX(_dispatch_stub_136):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1088(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $24, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- movq %xmm2, 16(%rsp)
- call _x86_64_get_dispatch@PLT
- movq 16(%rsp), %xmm2
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $24, %rsp
- movq 1088(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1088(%rax), %r11
- jmp *%r11
-1:
- subq $24, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- movq %xmm2, 16(%rsp)
- call _glapi_get_dispatch
- movq 16(%rsp), %xmm2
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $24, %rsp
- movq 1088(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_136), .-GL_PREFIX(_dispatch_stub_136)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_137)
- .type GL_PREFIX(_dispatch_stub_137), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_137))
-GL_PREFIX(_dispatch_stub_137):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1096(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 1096(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1096(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 1096(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_137), .-GL_PREFIX(_dispatch_stub_137)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_138)
- .type GL_PREFIX(_dispatch_stub_138), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_138))
-GL_PREFIX(_dispatch_stub_138):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1104(%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 1104(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1104(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 1104(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_138), .-GL_PREFIX(_dispatch_stub_138)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_139)
- .type GL_PREFIX(_dispatch_stub_139), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_139))
-GL_PREFIX(_dispatch_stub_139):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1112(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 1112(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1112(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 1112(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_139), .-GL_PREFIX(_dispatch_stub_139)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_140)
- .type GL_PREFIX(_dispatch_stub_140), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_140))
-GL_PREFIX(_dispatch_stub_140):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1120(%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 1120(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1120(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 1120(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_140), .-GL_PREFIX(_dispatch_stub_140)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_141)
- .type GL_PREFIX(_dispatch_stub_141), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_141))
-GL_PREFIX(_dispatch_stub_141):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1128(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 1128(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1128(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 1128(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_141), .-GL_PREFIX(_dispatch_stub_141)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_142)
- .type GL_PREFIX(_dispatch_stub_142), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_142))
-GL_PREFIX(_dispatch_stub_142):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1136(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $40, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- movq %xmm2, 16(%rsp)
- movq %xmm3, 24(%rsp)
- call _x86_64_get_dispatch@PLT
- movq 24(%rsp), %xmm3
- movq 16(%rsp), %xmm2
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $40, %rsp
- movq 1136(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1136(%rax), %r11
- jmp *%r11
-1:
- subq $40, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- movq %xmm2, 16(%rsp)
- movq %xmm3, 24(%rsp)
- call _glapi_get_dispatch
- movq 24(%rsp), %xmm3
- movq 16(%rsp), %xmm2
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $40, %rsp
- movq 1136(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_142), .-GL_PREFIX(_dispatch_stub_142)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_143)
- .type GL_PREFIX(_dispatch_stub_143), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_143))
-GL_PREFIX(_dispatch_stub_143):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1144(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 1144(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1144(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 1144(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_143), .-GL_PREFIX(_dispatch_stub_143)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_144)
- .type GL_PREFIX(_dispatch_stub_144), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_144))
-GL_PREFIX(_dispatch_stub_144):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1152(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $40, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- movq %xmm2, 16(%rsp)
- movq %xmm3, 24(%rsp)
- call _x86_64_get_dispatch@PLT
- movq 24(%rsp), %xmm3
- movq 16(%rsp), %xmm2
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $40, %rsp
- movq 1152(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1152(%rax), %r11
- jmp *%r11
-1:
- subq $40, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- movq %xmm2, 16(%rsp)
- movq %xmm3, 24(%rsp)
- call _glapi_get_dispatch
- movq 24(%rsp), %xmm3
- movq 16(%rsp), %xmm2
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $40, %rsp
- movq 1152(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_144), .-GL_PREFIX(_dispatch_stub_144)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_145)
- .type GL_PREFIX(_dispatch_stub_145), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_145))
-GL_PREFIX(_dispatch_stub_145):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1160(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 1160(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1160(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 1160(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_145), .-GL_PREFIX(_dispatch_stub_145)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_146)
- .type GL_PREFIX(_dispatch_stub_146), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_146))
-GL_PREFIX(_dispatch_stub_146):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1168(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 1168(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1168(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 1168(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_146), .-GL_PREFIX(_dispatch_stub_146)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_147)
- .type GL_PREFIX(_dispatch_stub_147), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_147))
-GL_PREFIX(_dispatch_stub_147):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1176(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 1176(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1176(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 1176(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_147), .-GL_PREFIX(_dispatch_stub_147)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_148)
- .type GL_PREFIX(_dispatch_stub_148), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_148))
-GL_PREFIX(_dispatch_stub_148):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1184(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 1184(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1184(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 1184(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_148), .-GL_PREFIX(_dispatch_stub_148)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_149)
- .type GL_PREFIX(_dispatch_stub_149), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_149))
-GL_PREFIX(_dispatch_stub_149):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1192(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 1192(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1192(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 1192(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_149), .-GL_PREFIX(_dispatch_stub_149)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_150)
- .type GL_PREFIX(_dispatch_stub_150), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_150))
-GL_PREFIX(_dispatch_stub_150):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1200(%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 1200(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1200(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 1200(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_150), .-GL_PREFIX(_dispatch_stub_150)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_151)
- .type GL_PREFIX(_dispatch_stub_151), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_151))
-GL_PREFIX(_dispatch_stub_151):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1208(%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 1208(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1208(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 1208(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_151), .-GL_PREFIX(_dispatch_stub_151)
-
- .p2align 4,,15
- .globl GL_PREFIX(CullFace)
- .type GL_PREFIX(CullFace), @function
-GL_PREFIX(CullFace):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1216(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 1216(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1216(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 1216(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(CullFace), .-GL_PREFIX(CullFace)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_153)
- .type GL_PREFIX(_dispatch_stub_153), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_153))
-GL_PREFIX(_dispatch_stub_153):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1224(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $24, %rsp
- movq %rdi, (%rsp)
- movq %xmm0, 8(%rsp)
- call _x86_64_get_dispatch@PLT
- movq 8(%rsp), %xmm0
- movq (%rsp), %rdi
- addq $24, %rsp
- movq 1224(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1224(%rax), %r11
- jmp *%r11
-1:
- subq $24, %rsp
- movq %rdi, (%rsp)
- movq %xmm0, 8(%rsp)
- call _glapi_get_dispatch
- movq 8(%rsp), %xmm0
- movq (%rsp), %rdi
- addq $24, %rsp
- movq 1224(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_153), .-GL_PREFIX(_dispatch_stub_153)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_154)
- .type GL_PREFIX(_dispatch_stub_154), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_154))
-GL_PREFIX(_dispatch_stub_154):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1232(%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 1232(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1232(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 1232(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_154), .-GL_PREFIX(_dispatch_stub_154)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_155)
- .type GL_PREFIX(_dispatch_stub_155), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_155))
-GL_PREFIX(_dispatch_stub_155):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1240(%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 1240(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1240(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 1240(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_155), .-GL_PREFIX(_dispatch_stub_155)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_156)
- .type GL_PREFIX(_dispatch_stub_156), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_156))
-GL_PREFIX(_dispatch_stub_156):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1248(%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 1248(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1248(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 1248(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_156), .-GL_PREFIX(_dispatch_stub_156)
-
- .p2align 4,,15
- .globl GL_PREFIX(FrontFace)
- .type GL_PREFIX(FrontFace), @function
-GL_PREFIX(FrontFace):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1256(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 1256(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1256(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 1256(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(FrontFace), .-GL_PREFIX(FrontFace)
-
- .p2align 4,,15
- .globl GL_PREFIX(Hint)
- .type GL_PREFIX(Hint), @function
-GL_PREFIX(Hint):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1264(%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 1264(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1264(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 1264(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(Hint), .-GL_PREFIX(Hint)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_159)
- .type GL_PREFIX(_dispatch_stub_159), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_159))
-GL_PREFIX(_dispatch_stub_159):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1272(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $24, %rsp
- movq %rdi, (%rsp)
- movq %rsi, 8(%rsp)
- movq %xmm0, 16(%rsp)
- call _x86_64_get_dispatch@PLT
- movq 16(%rsp), %xmm0
- movq 8(%rsp), %rsi
- movq (%rsp), %rdi
- addq $24, %rsp
- movq 1272(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1272(%rax), %r11
- jmp *%r11
-1:
- subq $24, %rsp
- movq %rdi, (%rsp)
- movq %rsi, 8(%rsp)
- movq %xmm0, 16(%rsp)
- call _glapi_get_dispatch
- movq 16(%rsp), %xmm0
- movq 8(%rsp), %rsi
- movq (%rsp), %rdi
- addq $24, %rsp
- movq 1272(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_159), .-GL_PREFIX(_dispatch_stub_159)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_160)
- .type GL_PREFIX(_dispatch_stub_160), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_160))
-GL_PREFIX(_dispatch_stub_160):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1280(%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 1280(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1280(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 1280(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_160), .-GL_PREFIX(_dispatch_stub_160)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_161)
- .type GL_PREFIX(_dispatch_stub_161), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_161))
-GL_PREFIX(_dispatch_stub_161):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1288(%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 1288(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1288(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 1288(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_161), .-GL_PREFIX(_dispatch_stub_161)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_162)
- .type GL_PREFIX(_dispatch_stub_162), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_162))
-GL_PREFIX(_dispatch_stub_162):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1296(%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 1296(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1296(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 1296(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_162), .-GL_PREFIX(_dispatch_stub_162)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_163)
- .type GL_PREFIX(_dispatch_stub_163), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_163))
-GL_PREFIX(_dispatch_stub_163):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1304(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $24, %rsp
- movq %rdi, (%rsp)
- movq %xmm0, 8(%rsp)
- call _x86_64_get_dispatch@PLT
- movq 8(%rsp), %xmm0
- movq (%rsp), %rdi
- addq $24, %rsp
- movq 1304(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1304(%rax), %r11
- jmp *%r11
-1:
- subq $24, %rsp
- movq %rdi, (%rsp)
- movq %xmm0, 8(%rsp)
- call _glapi_get_dispatch
- movq 8(%rsp), %xmm0
- movq (%rsp), %rdi
- addq $24, %rsp
- movq 1304(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_163), .-GL_PREFIX(_dispatch_stub_163)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_164)
- .type GL_PREFIX(_dispatch_stub_164), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_164))
-GL_PREFIX(_dispatch_stub_164):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1312(%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 1312(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1312(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 1312(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_164), .-GL_PREFIX(_dispatch_stub_164)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_165)
- .type GL_PREFIX(_dispatch_stub_165), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_165))
-GL_PREFIX(_dispatch_stub_165):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1320(%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 1320(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1320(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 1320(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_165), .-GL_PREFIX(_dispatch_stub_165)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_166)
- .type GL_PREFIX(_dispatch_stub_166), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_166))
-GL_PREFIX(_dispatch_stub_166):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1328(%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 1328(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1328(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 1328(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_166), .-GL_PREFIX(_dispatch_stub_166)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_167)
- .type GL_PREFIX(_dispatch_stub_167), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_167))
-GL_PREFIX(_dispatch_stub_167):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1336(%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 1336(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1336(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 1336(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_167), .-GL_PREFIX(_dispatch_stub_167)
-
- .p2align 4,,15
- .globl GL_PREFIX(LineWidth)
- .type GL_PREFIX(LineWidth), @function
-GL_PREFIX(LineWidth):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1344(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $8, %rsp
- movq %xmm0, (%rsp)
- call _x86_64_get_dispatch@PLT
- movq (%rsp), %xmm0
- addq $8, %rsp
- movq 1344(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1344(%rax), %r11
- jmp *%r11
-1:
- subq $8, %rsp
- movq %xmm0, (%rsp)
- call _glapi_get_dispatch
- movq (%rsp), %xmm0
- addq $8, %rsp
- movq 1344(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(LineWidth), .-GL_PREFIX(LineWidth)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_169)
- .type GL_PREFIX(_dispatch_stub_169), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_169))
-GL_PREFIX(_dispatch_stub_169):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1352(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $24, %rsp
- movq %rdi, (%rsp)
- movq %rsi, 8(%rsp)
- movq %xmm0, 16(%rsp)
- call _x86_64_get_dispatch@PLT
- movq 16(%rsp), %xmm0
- movq 8(%rsp), %rsi
- movq (%rsp), %rdi
- addq $24, %rsp
- movq 1352(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1352(%rax), %r11
- jmp *%r11
-1:
- subq $24, %rsp
- movq %rdi, (%rsp)
- movq %rsi, 8(%rsp)
- movq %xmm0, 16(%rsp)
- call _glapi_get_dispatch
- movq 16(%rsp), %xmm0
- movq 8(%rsp), %rsi
- movq (%rsp), %rdi
- addq $24, %rsp
- movq 1352(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_169), .-GL_PREFIX(_dispatch_stub_169)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_170)
- .type GL_PREFIX(_dispatch_stub_170), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_170))
-GL_PREFIX(_dispatch_stub_170):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1360(%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 1360(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1360(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 1360(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_170), .-GL_PREFIX(_dispatch_stub_170)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_171)
- .type GL_PREFIX(_dispatch_stub_171), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_171))
-GL_PREFIX(_dispatch_stub_171):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1368(%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 1368(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1368(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 1368(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_171), .-GL_PREFIX(_dispatch_stub_171)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_172)
- .type GL_PREFIX(_dispatch_stub_172), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_172))
-GL_PREFIX(_dispatch_stub_172):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1376(%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 1376(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1376(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 1376(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_172), .-GL_PREFIX(_dispatch_stub_172)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_173)
- .type GL_PREFIX(_dispatch_stub_173), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_173))
-GL_PREFIX(_dispatch_stub_173):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1384(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $8, %rsp
- movq %xmm0, (%rsp)
- call _x86_64_get_dispatch@PLT
- movq (%rsp), %xmm0
- addq $8, %rsp
- movq 1384(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1384(%rax), %r11
- jmp *%r11
-1:
- subq $8, %rsp
- movq %xmm0, (%rsp)
- call _glapi_get_dispatch
- movq (%rsp), %xmm0
- addq $8, %rsp
- movq 1384(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_173), .-GL_PREFIX(_dispatch_stub_173)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_174)
- .type GL_PREFIX(_dispatch_stub_174), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_174))
-GL_PREFIX(_dispatch_stub_174):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1392(%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 1392(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1392(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 1392(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_174), .-GL_PREFIX(_dispatch_stub_174)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_175)
- .type GL_PREFIX(_dispatch_stub_175), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_175))
-GL_PREFIX(_dispatch_stub_175):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1400(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 1400(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1400(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 1400(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_175), .-GL_PREFIX(_dispatch_stub_175)
-
- .p2align 4,,15
- .globl GL_PREFIX(Scissor)
- .type GL_PREFIX(Scissor), @function
-GL_PREFIX(Scissor):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1408(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 1408(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1408(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 1408(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(Scissor), .-GL_PREFIX(Scissor)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_177)
- .type GL_PREFIX(_dispatch_stub_177), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_177))
-GL_PREFIX(_dispatch_stub_177):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1416(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 1416(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1416(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 1416(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_177), .-GL_PREFIX(_dispatch_stub_177)
-
- .p2align 4,,15
- .globl GL_PREFIX(TexParameterf)
- .type GL_PREFIX(TexParameterf), @function
-GL_PREFIX(TexParameterf):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1424(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $24, %rsp
- movq %rdi, (%rsp)
- movq %rsi, 8(%rsp)
- movq %xmm0, 16(%rsp)
- call _x86_64_get_dispatch@PLT
- movq 16(%rsp), %xmm0
- movq 8(%rsp), %rsi
- movq (%rsp), %rdi
- addq $24, %rsp
- movq 1424(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1424(%rax), %r11
- jmp *%r11
-1:
- subq $24, %rsp
- movq %rdi, (%rsp)
- movq %rsi, 8(%rsp)
- movq %xmm0, 16(%rsp)
- call _glapi_get_dispatch
- movq 16(%rsp), %xmm0
- movq 8(%rsp), %rsi
- movq (%rsp), %rdi
- addq $24, %rsp
- movq 1424(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(TexParameterf), .-GL_PREFIX(TexParameterf)
-
- .p2align 4,,15
- .globl GL_PREFIX(TexParameterfv)
- .type GL_PREFIX(TexParameterfv), @function
-GL_PREFIX(TexParameterfv):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1432(%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 1432(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1432(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 1432(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(TexParameterfv), .-GL_PREFIX(TexParameterfv)
-
- .p2align 4,,15
- .globl GL_PREFIX(TexParameteri)
- .type GL_PREFIX(TexParameteri), @function
-GL_PREFIX(TexParameteri):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1440(%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 1440(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1440(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 1440(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(TexParameteri), .-GL_PREFIX(TexParameteri)
-
- .p2align 4,,15
- .globl GL_PREFIX(TexParameteriv)
- .type GL_PREFIX(TexParameteriv), @function
-GL_PREFIX(TexParameteriv):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1448(%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 1448(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1448(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 1448(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(TexParameteriv), .-GL_PREFIX(TexParameteriv)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_182)
- .type GL_PREFIX(_dispatch_stub_182), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_182))
-GL_PREFIX(_dispatch_stub_182):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1456(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %r8
- pushq %r9
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- popq %r9
- popq %r8
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 1456(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1456(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %r8
- pushq %r9
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %r9
- popq %r8
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 1456(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_182), .-GL_PREFIX(_dispatch_stub_182)
-
- .p2align 4,,15
- .globl GL_PREFIX(TexImage2D)
- .type GL_PREFIX(TexImage2D), @function
-GL_PREFIX(TexImage2D):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1464(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %r8
- pushq %r9
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- popq %r9
- popq %r8
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 1464(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1464(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %r8
- pushq %r9
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %r9
- popq %r8
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 1464(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(TexImage2D), .-GL_PREFIX(TexImage2D)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_184)
- .type GL_PREFIX(_dispatch_stub_184), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_184))
-GL_PREFIX(_dispatch_stub_184):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1472(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $24, %rsp
- movq %rdi, (%rsp)
- movq %rsi, 8(%rsp)
- movq %xmm0, 16(%rsp)
- call _x86_64_get_dispatch@PLT
- movq 16(%rsp), %xmm0
- movq 8(%rsp), %rsi
- movq (%rsp), %rdi
- addq $24, %rsp
- movq 1472(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1472(%rax), %r11
- jmp *%r11
-1:
- subq $24, %rsp
- movq %rdi, (%rsp)
- movq %rsi, 8(%rsp)
- movq %xmm0, 16(%rsp)
- call _glapi_get_dispatch
- movq 16(%rsp), %xmm0
- movq 8(%rsp), %rsi
- movq (%rsp), %rdi
- addq $24, %rsp
- movq 1472(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_184), .-GL_PREFIX(_dispatch_stub_184)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_185)
- .type GL_PREFIX(_dispatch_stub_185), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_185))
-GL_PREFIX(_dispatch_stub_185):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1480(%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 1480(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1480(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 1480(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_185), .-GL_PREFIX(_dispatch_stub_185)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_186)
- .type GL_PREFIX(_dispatch_stub_186), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_186))
-GL_PREFIX(_dispatch_stub_186):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1488(%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 1488(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1488(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 1488(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_186), .-GL_PREFIX(_dispatch_stub_186)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_187)
- .type GL_PREFIX(_dispatch_stub_187), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_187))
-GL_PREFIX(_dispatch_stub_187):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1496(%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 1496(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1496(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 1496(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_187), .-GL_PREFIX(_dispatch_stub_187)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_188)
- .type GL_PREFIX(_dispatch_stub_188), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_188))
-GL_PREFIX(_dispatch_stub_188):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1504(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $24, %rsp
- movq %rdi, (%rsp)
- movq %rsi, 8(%rsp)
- movq %xmm0, 16(%rsp)
- call _x86_64_get_dispatch@PLT
- movq 16(%rsp), %xmm0
- movq 8(%rsp), %rsi
- movq (%rsp), %rdi
- addq $24, %rsp
- movq 1504(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1504(%rax), %r11
- jmp *%r11
-1:
- subq $24, %rsp
- movq %rdi, (%rsp)
- movq %rsi, 8(%rsp)
- movq %xmm0, 16(%rsp)
- call _glapi_get_dispatch
- movq 16(%rsp), %xmm0
- movq 8(%rsp), %rsi
- movq (%rsp), %rdi
- addq $24, %rsp
- movq 1504(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_188), .-GL_PREFIX(_dispatch_stub_188)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_189)
- .type GL_PREFIX(_dispatch_stub_189), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_189))
-GL_PREFIX(_dispatch_stub_189):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1512(%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 1512(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1512(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 1512(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_189), .-GL_PREFIX(_dispatch_stub_189)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_190)
- .type GL_PREFIX(_dispatch_stub_190), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_190))
-GL_PREFIX(_dispatch_stub_190):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1520(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $24, %rsp
- movq %rdi, (%rsp)
- movq %rsi, 8(%rsp)
- movq %xmm0, 16(%rsp)
- call _x86_64_get_dispatch@PLT
- movq 16(%rsp), %xmm0
- movq 8(%rsp), %rsi
- movq (%rsp), %rdi
- addq $24, %rsp
- movq 1520(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1520(%rax), %r11
- jmp *%r11
-1:
- subq $24, %rsp
- movq %rdi, (%rsp)
- movq %rsi, 8(%rsp)
- movq %xmm0, 16(%rsp)
- call _glapi_get_dispatch
- movq 16(%rsp), %xmm0
- movq 8(%rsp), %rsi
- movq (%rsp), %rdi
- addq $24, %rsp
- movq 1520(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_190), .-GL_PREFIX(_dispatch_stub_190)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_191)
- .type GL_PREFIX(_dispatch_stub_191), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_191))
-GL_PREFIX(_dispatch_stub_191):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1528(%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 1528(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1528(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 1528(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_191), .-GL_PREFIX(_dispatch_stub_191)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_192)
- .type GL_PREFIX(_dispatch_stub_192), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_192))
-GL_PREFIX(_dispatch_stub_192):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1536(%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 1536(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1536(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 1536(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_192), .-GL_PREFIX(_dispatch_stub_192)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_193)
- .type GL_PREFIX(_dispatch_stub_193), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_193))
-GL_PREFIX(_dispatch_stub_193):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1544(%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 1544(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1544(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 1544(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_193), .-GL_PREFIX(_dispatch_stub_193)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_194)
- .type GL_PREFIX(_dispatch_stub_194), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_194))
-GL_PREFIX(_dispatch_stub_194):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1552(%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 1552(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1552(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 1552(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_194), .-GL_PREFIX(_dispatch_stub_194)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_195)
- .type GL_PREFIX(_dispatch_stub_195), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_195))
-GL_PREFIX(_dispatch_stub_195):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1560(%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 1560(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1560(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 1560(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_195), .-GL_PREFIX(_dispatch_stub_195)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_196)
- .type GL_PREFIX(_dispatch_stub_196), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_196))
-GL_PREFIX(_dispatch_stub_196):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1568(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 1568(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1568(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 1568(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_196), .-GL_PREFIX(_dispatch_stub_196)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_197)
- .type GL_PREFIX(_dispatch_stub_197), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_197))
-GL_PREFIX(_dispatch_stub_197):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1576(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- movq 1576(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1576(%rax), %r11
- jmp *%r11
-1:
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- movq 1576(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_197), .-GL_PREFIX(_dispatch_stub_197)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_198)
- .type GL_PREFIX(_dispatch_stub_198), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_198))
-GL_PREFIX(_dispatch_stub_198):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1584(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 1584(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1584(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 1584(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_198), .-GL_PREFIX(_dispatch_stub_198)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_199)
- .type GL_PREFIX(_dispatch_stub_199), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_199))
-GL_PREFIX(_dispatch_stub_199):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1592(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $8, %rsp
- movq %xmm0, (%rsp)
- call _x86_64_get_dispatch@PLT
- movq (%rsp), %xmm0
- addq $8, %rsp
- movq 1592(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1592(%rax), %r11
- jmp *%r11
-1:
- subq $8, %rsp
- movq %xmm0, (%rsp)
- call _glapi_get_dispatch
- movq (%rsp), %xmm0
- addq $8, %rsp
- movq 1592(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_199), .-GL_PREFIX(_dispatch_stub_199)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_200)
- .type GL_PREFIX(_dispatch_stub_200), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_200))
-GL_PREFIX(_dispatch_stub_200):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1600(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- movq 1600(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1600(%rax), %r11
- jmp *%r11
-1:
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- movq 1600(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_200), .-GL_PREFIX(_dispatch_stub_200)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_201)
- .type GL_PREFIX(_dispatch_stub_201), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_201))
-GL_PREFIX(_dispatch_stub_201):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1608(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 1608(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1608(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 1608(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_201), .-GL_PREFIX(_dispatch_stub_201)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_202)
- .type GL_PREFIX(_dispatch_stub_202), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_202))
-GL_PREFIX(_dispatch_stub_202):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1616(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 1616(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1616(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 1616(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_202), .-GL_PREFIX(_dispatch_stub_202)
-
- .p2align 4,,15
- .globl GL_PREFIX(Clear)
- .type GL_PREFIX(Clear), @function
-GL_PREFIX(Clear):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1624(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 1624(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1624(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 1624(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(Clear), .-GL_PREFIX(Clear)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_204)
- .type GL_PREFIX(_dispatch_stub_204), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_204))
-GL_PREFIX(_dispatch_stub_204):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1632(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $40, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- movq %xmm2, 16(%rsp)
- movq %xmm3, 24(%rsp)
- call _x86_64_get_dispatch@PLT
- movq 24(%rsp), %xmm3
- movq 16(%rsp), %xmm2
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $40, %rsp
- movq 1632(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1632(%rax), %r11
- jmp *%r11
-1:
- subq $40, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- movq %xmm2, 16(%rsp)
- movq %xmm3, 24(%rsp)
- call _glapi_get_dispatch
- movq 24(%rsp), %xmm3
- movq 16(%rsp), %xmm2
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $40, %rsp
- movq 1632(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_204), .-GL_PREFIX(_dispatch_stub_204)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_205)
- .type GL_PREFIX(_dispatch_stub_205), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_205))
-GL_PREFIX(_dispatch_stub_205):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1640(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $8, %rsp
- movq %xmm0, (%rsp)
- call _x86_64_get_dispatch@PLT
- movq (%rsp), %xmm0
- addq $8, %rsp
- movq 1640(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1640(%rax), %r11
- jmp *%r11
-1:
- subq $8, %rsp
- movq %xmm0, (%rsp)
- call _glapi_get_dispatch
- movq (%rsp), %xmm0
- addq $8, %rsp
- movq 1640(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_205), .-GL_PREFIX(_dispatch_stub_205)
-
- .p2align 4,,15
- .globl GL_PREFIX(ClearColor)
- .type GL_PREFIX(ClearColor), @function
-GL_PREFIX(ClearColor):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1648(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 1648(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1648(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 1648(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(ClearColor), .-GL_PREFIX(ClearColor)
-
- .p2align 4,,15
- .globl GL_PREFIX(ClearStencil)
- .type GL_PREFIX(ClearStencil), @function
-GL_PREFIX(ClearStencil):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1656(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 1656(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1656(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 1656(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(ClearStencil), .-GL_PREFIX(ClearStencil)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_208)
- .type GL_PREFIX(_dispatch_stub_208), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_208))
-GL_PREFIX(_dispatch_stub_208):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1664(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 1664(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1664(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 1664(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_208), .-GL_PREFIX(_dispatch_stub_208)
-
- .p2align 4,,15
- .globl GL_PREFIX(StencilMask)
- .type GL_PREFIX(StencilMask), @function
-GL_PREFIX(StencilMask):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1672(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 1672(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1672(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 1672(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(StencilMask), .-GL_PREFIX(StencilMask)
-
- .p2align 4,,15
- .globl GL_PREFIX(ColorMask)
- .type GL_PREFIX(ColorMask), @function
-GL_PREFIX(ColorMask):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1680(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 1680(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1680(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 1680(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(ColorMask), .-GL_PREFIX(ColorMask)
-
- .p2align 4,,15
- .globl GL_PREFIX(DepthMask)
- .type GL_PREFIX(DepthMask), @function
-GL_PREFIX(DepthMask):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1688(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 1688(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1688(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 1688(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(DepthMask), .-GL_PREFIX(DepthMask)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_212)
- .type GL_PREFIX(_dispatch_stub_212), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_212))
-GL_PREFIX(_dispatch_stub_212):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1696(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 1696(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1696(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 1696(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_212), .-GL_PREFIX(_dispatch_stub_212)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_213)
- .type GL_PREFIX(_dispatch_stub_213), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_213))
-GL_PREFIX(_dispatch_stub_213):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1704(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $24, %rsp
- movq %rdi, (%rsp)
- movq %xmm0, 8(%rsp)
- call _x86_64_get_dispatch@PLT
- movq 8(%rsp), %xmm0
- movq (%rsp), %rdi
- addq $24, %rsp
- movq 1704(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1704(%rax), %r11
- jmp *%r11
-1:
- subq $24, %rsp
- movq %rdi, (%rsp)
- movq %xmm0, 8(%rsp)
- call _glapi_get_dispatch
- movq 8(%rsp), %xmm0
- movq (%rsp), %rdi
- addq $24, %rsp
- movq 1704(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_213), .-GL_PREFIX(_dispatch_stub_213)
-
- .p2align 4,,15
- .globl GL_PREFIX(Disable)
- .type GL_PREFIX(Disable), @function
-GL_PREFIX(Disable):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1712(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 1712(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1712(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 1712(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(Disable), .-GL_PREFIX(Disable)
-
- .p2align 4,,15
- .globl GL_PREFIX(Enable)
- .type GL_PREFIX(Enable), @function
-GL_PREFIX(Enable):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1720(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 1720(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1720(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 1720(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(Enable), .-GL_PREFIX(Enable)
-
- .p2align 4,,15
- .globl GL_PREFIX(Finish)
- .type GL_PREFIX(Finish), @function
-GL_PREFIX(Finish):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1728(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- movq 1728(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1728(%rax), %r11
- jmp *%r11
-1:
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- movq 1728(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(Finish), .-GL_PREFIX(Finish)
-
- .p2align 4,,15
- .globl GL_PREFIX(Flush)
- .type GL_PREFIX(Flush), @function
-GL_PREFIX(Flush):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1736(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- movq 1736(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1736(%rax), %r11
- jmp *%r11
-1:
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- movq 1736(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(Flush), .-GL_PREFIX(Flush)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_218)
- .type GL_PREFIX(_dispatch_stub_218), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_218))
-GL_PREFIX(_dispatch_stub_218):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1744(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- movq 1744(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1744(%rax), %r11
- jmp *%r11
-1:
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- movq 1744(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_218), .-GL_PREFIX(_dispatch_stub_218)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_219)
- .type GL_PREFIX(_dispatch_stub_219), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_219))
-GL_PREFIX(_dispatch_stub_219):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1752(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 1752(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1752(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 1752(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_219), .-GL_PREFIX(_dispatch_stub_219)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_220)
- .type GL_PREFIX(_dispatch_stub_220), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_220))
-GL_PREFIX(_dispatch_stub_220):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1760(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $56, %rsp
- movq %rdi, (%rsp)
- movq %xmm0, 8(%rsp)
- movq %xmm1, 16(%rsp)
- movq %rsi, 24(%rsp)
- movq %rdx, 32(%rsp)
- movq %rcx, 40(%rsp)
- call _x86_64_get_dispatch@PLT
- movq 40(%rsp), %rcx
- movq 32(%rsp), %rdx
- movq 24(%rsp), %rsi
- movq 16(%rsp), %xmm1
- movq 8(%rsp), %xmm0
- movq (%rsp), %rdi
- addq $56, %rsp
- movq 1760(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1760(%rax), %r11
- jmp *%r11
-1:
- subq $56, %rsp
- movq %rdi, (%rsp)
- movq %xmm0, 8(%rsp)
- movq %xmm1, 16(%rsp)
- movq %rsi, 24(%rsp)
- movq %rdx, 32(%rsp)
- movq %rcx, 40(%rsp)
- call _glapi_get_dispatch
- movq 40(%rsp), %rcx
- movq 32(%rsp), %rdx
- movq 24(%rsp), %rsi
- movq 16(%rsp), %xmm1
- movq 8(%rsp), %xmm0
- movq (%rsp), %rdi
- addq $56, %rsp
- movq 1760(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_220), .-GL_PREFIX(_dispatch_stub_220)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_221)
- .type GL_PREFIX(_dispatch_stub_221), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_221))
-GL_PREFIX(_dispatch_stub_221):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1768(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $56, %rsp
- movq %rdi, (%rsp)
- movq %xmm0, 8(%rsp)
- movq %xmm1, 16(%rsp)
- movq %rsi, 24(%rsp)
- movq %rdx, 32(%rsp)
- movq %rcx, 40(%rsp)
- call _x86_64_get_dispatch@PLT
- movq 40(%rsp), %rcx
- movq 32(%rsp), %rdx
- movq 24(%rsp), %rsi
- movq 16(%rsp), %xmm1
- movq 8(%rsp), %xmm0
- movq (%rsp), %rdi
- addq $56, %rsp
- movq 1768(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1768(%rax), %r11
- jmp *%r11
-1:
- subq $56, %rsp
- movq %rdi, (%rsp)
- movq %xmm0, 8(%rsp)
- movq %xmm1, 16(%rsp)
- movq %rsi, 24(%rsp)
- movq %rdx, 32(%rsp)
- movq %rcx, 40(%rsp)
- call _glapi_get_dispatch
- movq 40(%rsp), %rcx
- movq 32(%rsp), %rdx
- movq 24(%rsp), %rsi
- movq 16(%rsp), %xmm1
- movq 8(%rsp), %xmm0
- movq (%rsp), %rdi
- addq $56, %rsp
- movq 1768(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_221), .-GL_PREFIX(_dispatch_stub_221)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_222)
- .type GL_PREFIX(_dispatch_stub_222), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_222))
-GL_PREFIX(_dispatch_stub_222):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1776(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $88, %rsp
- movq %rdi, (%rsp)
- movq %xmm0, 8(%rsp)
- movq %xmm1, 16(%rsp)
- movq %rsi, 24(%rsp)
- movq %rdx, 32(%rsp)
- movq %xmm2, 40(%rsp)
- movq %xmm3, 48(%rsp)
- movq %rcx, 56(%rsp)
- movq %r8, 64(%rsp)
- movq %r9, 72(%rsp)
- call _x86_64_get_dispatch@PLT
- movq 72(%rsp), %r9
- movq 64(%rsp), %r8
- movq 56(%rsp), %rcx
- movq 48(%rsp), %xmm3
- movq 40(%rsp), %xmm2
- movq 32(%rsp), %rdx
- movq 24(%rsp), %rsi
- movq 16(%rsp), %xmm1
- movq 8(%rsp), %xmm0
- movq (%rsp), %rdi
- addq $88, %rsp
- movq 1776(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1776(%rax), %r11
- jmp *%r11
-1:
- subq $88, %rsp
- movq %rdi, (%rsp)
- movq %xmm0, 8(%rsp)
- movq %xmm1, 16(%rsp)
- movq %rsi, 24(%rsp)
- movq %rdx, 32(%rsp)
- movq %xmm2, 40(%rsp)
- movq %xmm3, 48(%rsp)
- movq %rcx, 56(%rsp)
- movq %r8, 64(%rsp)
- movq %r9, 72(%rsp)
- call _glapi_get_dispatch
- movq 72(%rsp), %r9
- movq 64(%rsp), %r8
- movq 56(%rsp), %rcx
- movq 48(%rsp), %xmm3
- movq 40(%rsp), %xmm2
- movq 32(%rsp), %rdx
- movq 24(%rsp), %rsi
- movq 16(%rsp), %xmm1
- movq 8(%rsp), %xmm0
- movq (%rsp), %rdi
- addq $88, %rsp
- movq 1776(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_222), .-GL_PREFIX(_dispatch_stub_222)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_223)
- .type GL_PREFIX(_dispatch_stub_223), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_223))
-GL_PREFIX(_dispatch_stub_223):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1784(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $88, %rsp
- movq %rdi, (%rsp)
- movq %xmm0, 8(%rsp)
- movq %xmm1, 16(%rsp)
- movq %rsi, 24(%rsp)
- movq %rdx, 32(%rsp)
- movq %xmm2, 40(%rsp)
- movq %xmm3, 48(%rsp)
- movq %rcx, 56(%rsp)
- movq %r8, 64(%rsp)
- movq %r9, 72(%rsp)
- call _x86_64_get_dispatch@PLT
- movq 72(%rsp), %r9
- movq 64(%rsp), %r8
- movq 56(%rsp), %rcx
- movq 48(%rsp), %xmm3
- movq 40(%rsp), %xmm2
- movq 32(%rsp), %rdx
- movq 24(%rsp), %rsi
- movq 16(%rsp), %xmm1
- movq 8(%rsp), %xmm0
- movq (%rsp), %rdi
- addq $88, %rsp
- movq 1784(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1784(%rax), %r11
- jmp *%r11
-1:
- subq $88, %rsp
- movq %rdi, (%rsp)
- movq %xmm0, 8(%rsp)
- movq %xmm1, 16(%rsp)
- movq %rsi, 24(%rsp)
- movq %rdx, 32(%rsp)
- movq %xmm2, 40(%rsp)
- movq %xmm3, 48(%rsp)
- movq %rcx, 56(%rsp)
- movq %r8, 64(%rsp)
- movq %r9, 72(%rsp)
- call _glapi_get_dispatch
- movq 72(%rsp), %r9
- movq 64(%rsp), %r8
- movq 56(%rsp), %rcx
- movq 48(%rsp), %xmm3
- movq 40(%rsp), %xmm2
- movq 32(%rsp), %rdx
- movq 24(%rsp), %rsi
- movq 16(%rsp), %xmm1
- movq 8(%rsp), %xmm0
- movq (%rsp), %rdi
- addq $88, %rsp
- movq 1784(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_223), .-GL_PREFIX(_dispatch_stub_223)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_224)
- .type GL_PREFIX(_dispatch_stub_224), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_224))
-GL_PREFIX(_dispatch_stub_224):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1792(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $24, %rsp
- movq %rdi, (%rsp)
- movq %xmm0, 8(%rsp)
- movq %xmm1, 16(%rsp)
- call _x86_64_get_dispatch@PLT
- movq 16(%rsp), %xmm1
- movq 8(%rsp), %xmm0
- movq (%rsp), %rdi
- addq $24, %rsp
- movq 1792(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1792(%rax), %r11
- jmp *%r11
-1:
- subq $24, %rsp
- movq %rdi, (%rsp)
- movq %xmm0, 8(%rsp)
- movq %xmm1, 16(%rsp)
- call _glapi_get_dispatch
- movq 16(%rsp), %xmm1
- movq 8(%rsp), %xmm0
- movq (%rsp), %rdi
- addq $24, %rsp
- movq 1792(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_224), .-GL_PREFIX(_dispatch_stub_224)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_225)
- .type GL_PREFIX(_dispatch_stub_225), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_225))
-GL_PREFIX(_dispatch_stub_225):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1800(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $24, %rsp
- movq %rdi, (%rsp)
- movq %xmm0, 8(%rsp)
- movq %xmm1, 16(%rsp)
- call _x86_64_get_dispatch@PLT
- movq 16(%rsp), %xmm1
- movq 8(%rsp), %xmm0
- movq (%rsp), %rdi
- addq $24, %rsp
- movq 1800(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1800(%rax), %r11
- jmp *%r11
-1:
- subq $24, %rsp
- movq %rdi, (%rsp)
- movq %xmm0, 8(%rsp)
- movq %xmm1, 16(%rsp)
- call _glapi_get_dispatch
- movq 16(%rsp), %xmm1
- movq 8(%rsp), %xmm0
- movq (%rsp), %rdi
- addq $24, %rsp
- movq 1800(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_225), .-GL_PREFIX(_dispatch_stub_225)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_226)
- .type GL_PREFIX(_dispatch_stub_226), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_226))
-GL_PREFIX(_dispatch_stub_226):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1808(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $56, %rsp
- movq %rdi, (%rsp)
- movq %xmm0, 8(%rsp)
- movq %xmm1, 16(%rsp)
- movq %rsi, 24(%rsp)
- movq %xmm2, 32(%rsp)
- movq %xmm3, 40(%rsp)
- call _x86_64_get_dispatch@PLT
- movq 40(%rsp), %xmm3
- movq 32(%rsp), %xmm2
- movq 24(%rsp), %rsi
- movq 16(%rsp), %xmm1
- movq 8(%rsp), %xmm0
- movq (%rsp), %rdi
- addq $56, %rsp
- movq 1808(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1808(%rax), %r11
- jmp *%r11
-1:
- subq $56, %rsp
- movq %rdi, (%rsp)
- movq %xmm0, 8(%rsp)
- movq %xmm1, 16(%rsp)
- movq %rsi, 24(%rsp)
- movq %xmm2, 32(%rsp)
- movq %xmm3, 40(%rsp)
- call _glapi_get_dispatch
- movq 40(%rsp), %xmm3
- movq 32(%rsp), %xmm2
- movq 24(%rsp), %rsi
- movq 16(%rsp), %xmm1
- movq 8(%rsp), %xmm0
- movq (%rsp), %rdi
- addq $56, %rsp
- movq 1808(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_226), .-GL_PREFIX(_dispatch_stub_226)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_227)
- .type GL_PREFIX(_dispatch_stub_227), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_227))
-GL_PREFIX(_dispatch_stub_227):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1816(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $56, %rsp
- movq %rdi, (%rsp)
- movq %xmm0, 8(%rsp)
- movq %xmm1, 16(%rsp)
- movq %rsi, 24(%rsp)
- movq %xmm2, 32(%rsp)
- movq %xmm3, 40(%rsp)
- call _x86_64_get_dispatch@PLT
- movq 40(%rsp), %xmm3
- movq 32(%rsp), %xmm2
- movq 24(%rsp), %rsi
- movq 16(%rsp), %xmm1
- movq 8(%rsp), %xmm0
- movq (%rsp), %rdi
- addq $56, %rsp
- movq 1816(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1816(%rax), %r11
- jmp *%r11
-1:
- subq $56, %rsp
- movq %rdi, (%rsp)
- movq %xmm0, 8(%rsp)
- movq %xmm1, 16(%rsp)
- movq %rsi, 24(%rsp)
- movq %xmm2, 32(%rsp)
- movq %xmm3, 40(%rsp)
- call _glapi_get_dispatch
- movq 40(%rsp), %xmm3
- movq 32(%rsp), %xmm2
- movq 24(%rsp), %rsi
- movq 16(%rsp), %xmm1
- movq 8(%rsp), %xmm0
- movq (%rsp), %rdi
- addq $56, %rsp
- movq 1816(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_227), .-GL_PREFIX(_dispatch_stub_227)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_228)
- .type GL_PREFIX(_dispatch_stub_228), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_228))
-GL_PREFIX(_dispatch_stub_228):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1824(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $8, %rsp
- movq %xmm0, (%rsp)
- call _x86_64_get_dispatch@PLT
- movq (%rsp), %xmm0
- addq $8, %rsp
- movq 1824(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1824(%rax), %r11
- jmp *%r11
-1:
- subq $8, %rsp
- movq %xmm0, (%rsp)
- call _glapi_get_dispatch
- movq (%rsp), %xmm0
- addq $8, %rsp
- movq 1824(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_228), .-GL_PREFIX(_dispatch_stub_228)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_229)
- .type GL_PREFIX(_dispatch_stub_229), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_229))
-GL_PREFIX(_dispatch_stub_229):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1832(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 1832(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1832(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 1832(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_229), .-GL_PREFIX(_dispatch_stub_229)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_230)
- .type GL_PREFIX(_dispatch_stub_230), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_230))
-GL_PREFIX(_dispatch_stub_230):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1840(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $8, %rsp
- movq %xmm0, (%rsp)
- call _x86_64_get_dispatch@PLT
- movq (%rsp), %xmm0
- addq $8, %rsp
- movq 1840(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1840(%rax), %r11
- jmp *%r11
-1:
- subq $8, %rsp
- movq %xmm0, (%rsp)
- call _glapi_get_dispatch
- movq (%rsp), %xmm0
- addq $8, %rsp
- movq 1840(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_230), .-GL_PREFIX(_dispatch_stub_230)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_231)
- .type GL_PREFIX(_dispatch_stub_231), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_231))
-GL_PREFIX(_dispatch_stub_231):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1848(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 1848(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1848(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 1848(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_231), .-GL_PREFIX(_dispatch_stub_231)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_232)
- .type GL_PREFIX(_dispatch_stub_232), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_232))
-GL_PREFIX(_dispatch_stub_232):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1856(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $24, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- call _x86_64_get_dispatch@PLT
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $24, %rsp
- movq 1856(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1856(%rax), %r11
- jmp *%r11
-1:
- subq $24, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- call _glapi_get_dispatch
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $24, %rsp
- movq 1856(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_232), .-GL_PREFIX(_dispatch_stub_232)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_233)
- .type GL_PREFIX(_dispatch_stub_233), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_233))
-GL_PREFIX(_dispatch_stub_233):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1864(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 1864(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1864(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 1864(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_233), .-GL_PREFIX(_dispatch_stub_233)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_234)
- .type GL_PREFIX(_dispatch_stub_234), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_234))
-GL_PREFIX(_dispatch_stub_234):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1872(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $24, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- call _x86_64_get_dispatch@PLT
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $24, %rsp
- movq 1872(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1872(%rax), %r11
- jmp *%r11
-1:
- subq $24, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- call _glapi_get_dispatch
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $24, %rsp
- movq 1872(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_234), .-GL_PREFIX(_dispatch_stub_234)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_235)
- .type GL_PREFIX(_dispatch_stub_235), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_235))
-GL_PREFIX(_dispatch_stub_235):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1880(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 1880(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1880(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 1880(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_235), .-GL_PREFIX(_dispatch_stub_235)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_236)
- .type GL_PREFIX(_dispatch_stub_236), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_236))
-GL_PREFIX(_dispatch_stub_236):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1888(%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 1888(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1888(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 1888(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_236), .-GL_PREFIX(_dispatch_stub_236)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_237)
- .type GL_PREFIX(_dispatch_stub_237), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_237))
-GL_PREFIX(_dispatch_stub_237):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1896(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 1896(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1896(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 1896(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_237), .-GL_PREFIX(_dispatch_stub_237)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_238)
- .type GL_PREFIX(_dispatch_stub_238), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_238))
-GL_PREFIX(_dispatch_stub_238):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1904(%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 1904(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1904(%rax), %r11
- 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 1904(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_238), .-GL_PREFIX(_dispatch_stub_238)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_239)
- .type GL_PREFIX(_dispatch_stub_239), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_239))
-GL_PREFIX(_dispatch_stub_239):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1912(%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 1912(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1912(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 1912(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_239), .-GL_PREFIX(_dispatch_stub_239)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_240)
- .type GL_PREFIX(_dispatch_stub_240), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_240))
-GL_PREFIX(_dispatch_stub_240):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1920(%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 1920(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1920(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 1920(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_240), .-GL_PREFIX(_dispatch_stub_240)
-
- .p2align 4,,15
- .globl GL_PREFIX(BlendFunc)
- .type GL_PREFIX(BlendFunc), @function
-GL_PREFIX(BlendFunc):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1928(%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 1928(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1928(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 1928(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(BlendFunc), .-GL_PREFIX(BlendFunc)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_242)
- .type GL_PREFIX(_dispatch_stub_242), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_242))
-GL_PREFIX(_dispatch_stub_242):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1936(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 1936(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1936(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 1936(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_242), .-GL_PREFIX(_dispatch_stub_242)
-
- .p2align 4,,15
- .globl GL_PREFIX(StencilFunc)
- .type GL_PREFIX(StencilFunc), @function
-GL_PREFIX(StencilFunc):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1944(%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 1944(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1944(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 1944(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(StencilFunc), .-GL_PREFIX(StencilFunc)
-
- .p2align 4,,15
- .globl GL_PREFIX(StencilOp)
- .type GL_PREFIX(StencilOp), @function
-GL_PREFIX(StencilOp):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1952(%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 1952(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1952(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 1952(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(StencilOp), .-GL_PREFIX(StencilOp)
-
- .p2align 4,,15
- .globl GL_PREFIX(DepthFunc)
- .type GL_PREFIX(DepthFunc), @function
-GL_PREFIX(DepthFunc):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1960(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 1960(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1960(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 1960(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(DepthFunc), .-GL_PREFIX(DepthFunc)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_246)
- .type GL_PREFIX(_dispatch_stub_246), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_246))
-GL_PREFIX(_dispatch_stub_246):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1968(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $24, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- call _x86_64_get_dispatch@PLT
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $24, %rsp
- movq 1968(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1968(%rax), %r11
- jmp *%r11
-1:
- subq $24, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- call _glapi_get_dispatch
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $24, %rsp
- movq 1968(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_246), .-GL_PREFIX(_dispatch_stub_246)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_247)
- .type GL_PREFIX(_dispatch_stub_247), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_247))
-GL_PREFIX(_dispatch_stub_247):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1976(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $24, %rsp
- movq %rdi, (%rsp)
- movq %xmm0, 8(%rsp)
- call _x86_64_get_dispatch@PLT
- movq 8(%rsp), %xmm0
- movq (%rsp), %rdi
- addq $24, %rsp
- movq 1976(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1976(%rax), %r11
- jmp *%r11
-1:
- subq $24, %rsp
- movq %rdi, (%rsp)
- movq %xmm0, 8(%rsp)
- call _glapi_get_dispatch
- movq 8(%rsp), %xmm0
- movq (%rsp), %rdi
- addq $24, %rsp
- movq 1976(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_247), .-GL_PREFIX(_dispatch_stub_247)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_248)
- .type GL_PREFIX(_dispatch_stub_248), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_248))
-GL_PREFIX(_dispatch_stub_248):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1984(%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 1984(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1984(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 1984(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_248), .-GL_PREFIX(_dispatch_stub_248)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_249)
- .type GL_PREFIX(_dispatch_stub_249), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_249))
-GL_PREFIX(_dispatch_stub_249):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 1992(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $24, %rsp
- movq %rdi, (%rsp)
- movq %xmm0, 8(%rsp)
- call _x86_64_get_dispatch@PLT
- movq 8(%rsp), %xmm0
- movq (%rsp), %rdi
- addq $24, %rsp
- movq 1992(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 1992(%rax), %r11
- jmp *%r11
-1:
- subq $24, %rsp
- movq %rdi, (%rsp)
- movq %xmm0, 8(%rsp)
- call _glapi_get_dispatch
- movq 8(%rsp), %xmm0
- movq (%rsp), %rdi
- addq $24, %rsp
- movq 1992(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_249), .-GL_PREFIX(_dispatch_stub_249)
-
- .p2align 4,,15
- .globl GL_PREFIX(PixelStorei)
- .type GL_PREFIX(PixelStorei), @function
-GL_PREFIX(PixelStorei):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2000(%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 2000(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2000(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 2000(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(PixelStorei), .-GL_PREFIX(PixelStorei)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_251)
- .type GL_PREFIX(_dispatch_stub_251), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_251))
-GL_PREFIX(_dispatch_stub_251):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2008(%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 2008(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2008(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2008(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_251), .-GL_PREFIX(_dispatch_stub_251)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_252)
- .type GL_PREFIX(_dispatch_stub_252), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_252))
-GL_PREFIX(_dispatch_stub_252):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2016(%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 2016(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2016(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2016(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_252), .-GL_PREFIX(_dispatch_stub_252)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_253)
- .type GL_PREFIX(_dispatch_stub_253), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_253))
-GL_PREFIX(_dispatch_stub_253):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2024(%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 2024(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2024(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2024(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_253), .-GL_PREFIX(_dispatch_stub_253)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_254)
- .type GL_PREFIX(_dispatch_stub_254), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_254))
-GL_PREFIX(_dispatch_stub_254):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2032(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 2032(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2032(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 2032(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_254), .-GL_PREFIX(_dispatch_stub_254)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_255)
- .type GL_PREFIX(_dispatch_stub_255), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_255))
-GL_PREFIX(_dispatch_stub_255):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2040(%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 2040(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2040(%rax), %r11
- 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 2040(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_255), .-GL_PREFIX(_dispatch_stub_255)
-
- .p2align 4,,15
- .globl GL_PREFIX(ReadPixels)
- .type GL_PREFIX(ReadPixels), @function
-GL_PREFIX(ReadPixels):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2048(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %r8
- pushq %r9
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- popq %r9
- popq %r8
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2048(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2048(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %r8
- pushq %r9
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %r9
- popq %r8
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2048(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(ReadPixels), .-GL_PREFIX(ReadPixels)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_257)
- .type GL_PREFIX(_dispatch_stub_257), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_257))
-GL_PREFIX(_dispatch_stub_257):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2056(%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 2056(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2056(%rax), %r11
- 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 2056(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_257), .-GL_PREFIX(_dispatch_stub_257)
-
- .p2align 4,,15
- .globl GL_PREFIX(GetBooleanv)
- .type GL_PREFIX(GetBooleanv), @function
-GL_PREFIX(GetBooleanv):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2064(%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 2064(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2064(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 2064(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(GetBooleanv), .-GL_PREFIX(GetBooleanv)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_259)
- .type GL_PREFIX(_dispatch_stub_259), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_259))
-GL_PREFIX(_dispatch_stub_259):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2072(%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 2072(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2072(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 2072(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_259), .-GL_PREFIX(_dispatch_stub_259)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_260)
- .type GL_PREFIX(_dispatch_stub_260), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_260))
-GL_PREFIX(_dispatch_stub_260):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2080(%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 2080(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2080(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 2080(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_260), .-GL_PREFIX(_dispatch_stub_260)
-
- .p2align 4,,15
- .globl GL_PREFIX(GetError)
- .type GL_PREFIX(GetError), @function
-GL_PREFIX(GetError):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2088(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- movq 2088(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2088(%rax), %r11
- jmp *%r11
-1:
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- movq 2088(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(GetError), .-GL_PREFIX(GetError)
-
- .p2align 4,,15
- .globl GL_PREFIX(GetFloatv)
- .type GL_PREFIX(GetFloatv), @function
-GL_PREFIX(GetFloatv):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2096(%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 2096(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2096(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 2096(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(GetFloatv), .-GL_PREFIX(GetFloatv)
-
- .p2align 4,,15
- .globl GL_PREFIX(GetIntegerv)
- .type GL_PREFIX(GetIntegerv), @function
-GL_PREFIX(GetIntegerv):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2104(%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 2104(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2104(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 2104(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(GetIntegerv), .-GL_PREFIX(GetIntegerv)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_264)
- .type GL_PREFIX(_dispatch_stub_264), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_264))
-GL_PREFIX(_dispatch_stub_264):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2112(%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 2112(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2112(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2112(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_264), .-GL_PREFIX(_dispatch_stub_264)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_265)
- .type GL_PREFIX(_dispatch_stub_265), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_265))
-GL_PREFIX(_dispatch_stub_265):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2120(%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 2120(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2120(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2120(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_265), .-GL_PREFIX(_dispatch_stub_265)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_266)
- .type GL_PREFIX(_dispatch_stub_266), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_266))
-GL_PREFIX(_dispatch_stub_266):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2128(%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 2128(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2128(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2128(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_266), .-GL_PREFIX(_dispatch_stub_266)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_267)
- .type GL_PREFIX(_dispatch_stub_267), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_267))
-GL_PREFIX(_dispatch_stub_267):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2136(%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 2136(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2136(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2136(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_267), .-GL_PREFIX(_dispatch_stub_267)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_268)
- .type GL_PREFIX(_dispatch_stub_268), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_268))
-GL_PREFIX(_dispatch_stub_268):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2144(%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 2144(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2144(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2144(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_268), .-GL_PREFIX(_dispatch_stub_268)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_269)
- .type GL_PREFIX(_dispatch_stub_269), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_269))
-GL_PREFIX(_dispatch_stub_269):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2152(%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 2152(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2152(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2152(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_269), .-GL_PREFIX(_dispatch_stub_269)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_270)
- .type GL_PREFIX(_dispatch_stub_270), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_270))
-GL_PREFIX(_dispatch_stub_270):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2160(%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 2160(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2160(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2160(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_270), .-GL_PREFIX(_dispatch_stub_270)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_271)
- .type GL_PREFIX(_dispatch_stub_271), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_271))
-GL_PREFIX(_dispatch_stub_271):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2168(%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 2168(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2168(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 2168(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_271), .-GL_PREFIX(_dispatch_stub_271)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_272)
- .type GL_PREFIX(_dispatch_stub_272), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_272))
-GL_PREFIX(_dispatch_stub_272):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2176(%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 2176(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2176(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 2176(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_272), .-GL_PREFIX(_dispatch_stub_272)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_273)
- .type GL_PREFIX(_dispatch_stub_273), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_273))
-GL_PREFIX(_dispatch_stub_273):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2184(%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 2184(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2184(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 2184(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_273), .-GL_PREFIX(_dispatch_stub_273)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_274)
- .type GL_PREFIX(_dispatch_stub_274), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_274))
-GL_PREFIX(_dispatch_stub_274):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2192(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 2192(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2192(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 2192(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_274), .-GL_PREFIX(_dispatch_stub_274)
-
- .p2align 4,,15
- .globl GL_PREFIX(GetString)
- .type GL_PREFIX(GetString), @function
-GL_PREFIX(GetString):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2200(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 2200(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2200(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 2200(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(GetString), .-GL_PREFIX(GetString)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_276)
- .type GL_PREFIX(_dispatch_stub_276), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_276))
-GL_PREFIX(_dispatch_stub_276):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2208(%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 2208(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2208(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2208(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_276), .-GL_PREFIX(_dispatch_stub_276)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_277)
- .type GL_PREFIX(_dispatch_stub_277), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_277))
-GL_PREFIX(_dispatch_stub_277):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2216(%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 2216(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2216(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2216(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_277), .-GL_PREFIX(_dispatch_stub_277)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_278)
- .type GL_PREFIX(_dispatch_stub_278), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_278))
-GL_PREFIX(_dispatch_stub_278):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2224(%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 2224(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2224(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2224(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_278), .-GL_PREFIX(_dispatch_stub_278)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_279)
- .type GL_PREFIX(_dispatch_stub_279), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_279))
-GL_PREFIX(_dispatch_stub_279):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2232(%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 2232(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2232(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2232(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_279), .-GL_PREFIX(_dispatch_stub_279)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_280)
- .type GL_PREFIX(_dispatch_stub_280), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_280))
-GL_PREFIX(_dispatch_stub_280):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2240(%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 2240(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2240(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2240(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_280), .-GL_PREFIX(_dispatch_stub_280)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_281)
- .type GL_PREFIX(_dispatch_stub_281), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_281))
-GL_PREFIX(_dispatch_stub_281):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2248(%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 2248(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2248(%rax), %r11
- 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 2248(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_281), .-GL_PREFIX(_dispatch_stub_281)
-
- .p2align 4,,15
- .globl GL_PREFIX(GetTexParameterfv)
- .type GL_PREFIX(GetTexParameterfv), @function
-GL_PREFIX(GetTexParameterfv):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2256(%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 2256(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2256(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2256(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(GetTexParameterfv), .-GL_PREFIX(GetTexParameterfv)
-
- .p2align 4,,15
- .globl GL_PREFIX(GetTexParameteriv)
- .type GL_PREFIX(GetTexParameteriv), @function
-GL_PREFIX(GetTexParameteriv):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2264(%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 2264(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2264(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2264(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(GetTexParameteriv), .-GL_PREFIX(GetTexParameteriv)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_284)
- .type GL_PREFIX(_dispatch_stub_284), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_284))
-GL_PREFIX(_dispatch_stub_284):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2272(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2272(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2272(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2272(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_284), .-GL_PREFIX(_dispatch_stub_284)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_285)
- .type GL_PREFIX(_dispatch_stub_285), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_285))
-GL_PREFIX(_dispatch_stub_285):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2280(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2280(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2280(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2280(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_285), .-GL_PREFIX(_dispatch_stub_285)
-
- .p2align 4,,15
- .globl GL_PREFIX(IsEnabled)
- .type GL_PREFIX(IsEnabled), @function
-GL_PREFIX(IsEnabled):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2288(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 2288(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2288(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 2288(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(IsEnabled), .-GL_PREFIX(IsEnabled)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_287)
- .type GL_PREFIX(_dispatch_stub_287), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_287))
-GL_PREFIX(_dispatch_stub_287):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2296(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 2296(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2296(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 2296(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_287), .-GL_PREFIX(_dispatch_stub_287)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_288)
- .type GL_PREFIX(_dispatch_stub_288), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_288))
-GL_PREFIX(_dispatch_stub_288):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2304(%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 2304(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2304(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 2304(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_288), .-GL_PREFIX(_dispatch_stub_288)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_289)
- .type GL_PREFIX(_dispatch_stub_289), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_289))
-GL_PREFIX(_dispatch_stub_289):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2312(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $56, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- movq %xmm2, 16(%rsp)
- movq %xmm3, 24(%rsp)
- movq %xmm4, 32(%rsp)
- movq %xmm5, 40(%rsp)
- call _x86_64_get_dispatch@PLT
- movq 40(%rsp), %xmm5
- movq 32(%rsp), %xmm4
- movq 24(%rsp), %xmm3
- movq 16(%rsp), %xmm2
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $56, %rsp
- movq 2312(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2312(%rax), %r11
- jmp *%r11
-1:
- subq $56, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- movq %xmm2, 16(%rsp)
- movq %xmm3, 24(%rsp)
- movq %xmm4, 32(%rsp)
- movq %xmm5, 40(%rsp)
- call _glapi_get_dispatch
- movq 40(%rsp), %xmm5
- movq 32(%rsp), %xmm4
- movq 24(%rsp), %xmm3
- movq 16(%rsp), %xmm2
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $56, %rsp
- movq 2312(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_289), .-GL_PREFIX(_dispatch_stub_289)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_290)
- .type GL_PREFIX(_dispatch_stub_290), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_290))
-GL_PREFIX(_dispatch_stub_290):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2320(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- movq 2320(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2320(%rax), %r11
- jmp *%r11
-1:
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- movq 2320(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_290), .-GL_PREFIX(_dispatch_stub_290)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_291)
- .type GL_PREFIX(_dispatch_stub_291), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_291))
-GL_PREFIX(_dispatch_stub_291):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2328(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 2328(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2328(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 2328(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_291), .-GL_PREFIX(_dispatch_stub_291)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_292)
- .type GL_PREFIX(_dispatch_stub_292), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_292))
-GL_PREFIX(_dispatch_stub_292):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2336(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 2336(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2336(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 2336(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_292), .-GL_PREFIX(_dispatch_stub_292)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_293)
- .type GL_PREFIX(_dispatch_stub_293), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_293))
-GL_PREFIX(_dispatch_stub_293):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2344(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 2344(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2344(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 2344(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_293), .-GL_PREFIX(_dispatch_stub_293)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_294)
- .type GL_PREFIX(_dispatch_stub_294), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_294))
-GL_PREFIX(_dispatch_stub_294):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2352(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 2352(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2352(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 2352(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_294), .-GL_PREFIX(_dispatch_stub_294)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_295)
- .type GL_PREFIX(_dispatch_stub_295), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_295))
-GL_PREFIX(_dispatch_stub_295):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2360(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 2360(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2360(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 2360(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_295), .-GL_PREFIX(_dispatch_stub_295)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_296)
- .type GL_PREFIX(_dispatch_stub_296), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_296))
-GL_PREFIX(_dispatch_stub_296):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2368(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $56, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- movq %xmm2, 16(%rsp)
- movq %xmm3, 24(%rsp)
- movq %xmm4, 32(%rsp)
- movq %xmm5, 40(%rsp)
- call _x86_64_get_dispatch@PLT
- movq 40(%rsp), %xmm5
- movq 32(%rsp), %xmm4
- movq 24(%rsp), %xmm3
- movq 16(%rsp), %xmm2
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $56, %rsp
- movq 2368(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2368(%rax), %r11
- jmp *%r11
-1:
- subq $56, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- movq %xmm2, 16(%rsp)
- movq %xmm3, 24(%rsp)
- movq %xmm4, 32(%rsp)
- movq %xmm5, 40(%rsp)
- call _glapi_get_dispatch
- movq 40(%rsp), %xmm5
- movq 32(%rsp), %xmm4
- movq 24(%rsp), %xmm3
- movq 16(%rsp), %xmm2
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $56, %rsp
- movq 2368(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_296), .-GL_PREFIX(_dispatch_stub_296)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_297)
- .type GL_PREFIX(_dispatch_stub_297), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_297))
-GL_PREFIX(_dispatch_stub_297):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2376(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- movq 2376(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2376(%rax), %r11
- jmp *%r11
-1:
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- movq 2376(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_297), .-GL_PREFIX(_dispatch_stub_297)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_298)
- .type GL_PREFIX(_dispatch_stub_298), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_298))
-GL_PREFIX(_dispatch_stub_298):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2384(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- movq 2384(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2384(%rax), %r11
- jmp *%r11
-1:
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- movq 2384(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_298), .-GL_PREFIX(_dispatch_stub_298)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_299)
- .type GL_PREFIX(_dispatch_stub_299), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_299))
-GL_PREFIX(_dispatch_stub_299):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2392(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $40, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- movq %xmm2, 16(%rsp)
- movq %xmm3, 24(%rsp)
- call _x86_64_get_dispatch@PLT
- movq 24(%rsp), %xmm3
- movq 16(%rsp), %xmm2
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $40, %rsp
- movq 2392(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2392(%rax), %r11
- jmp *%r11
-1:
- subq $40, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- movq %xmm2, 16(%rsp)
- movq %xmm3, 24(%rsp)
- call _glapi_get_dispatch
- movq 24(%rsp), %xmm3
- movq 16(%rsp), %xmm2
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $40, %rsp
- movq 2392(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_299), .-GL_PREFIX(_dispatch_stub_299)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_300)
- .type GL_PREFIX(_dispatch_stub_300), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_300))
-GL_PREFIX(_dispatch_stub_300):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2400(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $40, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- movq %xmm2, 16(%rsp)
- movq %xmm3, 24(%rsp)
- call _x86_64_get_dispatch@PLT
- movq 24(%rsp), %xmm3
- movq 16(%rsp), %xmm2
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $40, %rsp
- movq 2400(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2400(%rax), %r11
- jmp *%r11
-1:
- subq $40, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- movq %xmm2, 16(%rsp)
- movq %xmm3, 24(%rsp)
- call _glapi_get_dispatch
- movq 24(%rsp), %xmm3
- movq 16(%rsp), %xmm2
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $40, %rsp
- movq 2400(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_300), .-GL_PREFIX(_dispatch_stub_300)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_301)
- .type GL_PREFIX(_dispatch_stub_301), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_301))
-GL_PREFIX(_dispatch_stub_301):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2408(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $24, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- movq %xmm2, 16(%rsp)
- call _x86_64_get_dispatch@PLT
- movq 16(%rsp), %xmm2
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $24, %rsp
- movq 2408(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2408(%rax), %r11
- jmp *%r11
-1:
- subq $24, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- movq %xmm2, 16(%rsp)
- call _glapi_get_dispatch
- movq 16(%rsp), %xmm2
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $24, %rsp
- movq 2408(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_301), .-GL_PREFIX(_dispatch_stub_301)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_302)
- .type GL_PREFIX(_dispatch_stub_302), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_302))
-GL_PREFIX(_dispatch_stub_302):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2416(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $24, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- movq %xmm2, 16(%rsp)
- call _x86_64_get_dispatch@PLT
- movq 16(%rsp), %xmm2
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $24, %rsp
- movq 2416(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2416(%rax), %r11
- jmp *%r11
-1:
- subq $24, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- movq %xmm2, 16(%rsp)
- call _glapi_get_dispatch
- movq 16(%rsp), %xmm2
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $24, %rsp
- movq 2416(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_302), .-GL_PREFIX(_dispatch_stub_302)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_303)
- .type GL_PREFIX(_dispatch_stub_303), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_303))
-GL_PREFIX(_dispatch_stub_303):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2424(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $24, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- movq %xmm2, 16(%rsp)
- call _x86_64_get_dispatch@PLT
- movq 16(%rsp), %xmm2
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $24, %rsp
- movq 2424(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2424(%rax), %r11
- jmp *%r11
-1:
- subq $24, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- movq %xmm2, 16(%rsp)
- call _glapi_get_dispatch
- movq 16(%rsp), %xmm2
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $24, %rsp
- movq 2424(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_303), .-GL_PREFIX(_dispatch_stub_303)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_304)
- .type GL_PREFIX(_dispatch_stub_304), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_304))
-GL_PREFIX(_dispatch_stub_304):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2432(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $24, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- movq %xmm2, 16(%rsp)
- call _x86_64_get_dispatch@PLT
- movq 16(%rsp), %xmm2
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $24, %rsp
- movq 2432(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2432(%rax), %r11
- jmp *%r11
-1:
- subq $24, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- movq %xmm2, 16(%rsp)
- call _glapi_get_dispatch
- movq 16(%rsp), %xmm2
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $24, %rsp
- movq 2432(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_304), .-GL_PREFIX(_dispatch_stub_304)
-
- .p2align 4,,15
- .globl GL_PREFIX(Viewport)
- .type GL_PREFIX(Viewport), @function
-GL_PREFIX(Viewport):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2440(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2440(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2440(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2440(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(Viewport), .-GL_PREFIX(Viewport)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_306)
- .type GL_PREFIX(_dispatch_stub_306), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_306))
-GL_PREFIX(_dispatch_stub_306):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2448(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 2448(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2448(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 2448(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_306), .-GL_PREFIX(_dispatch_stub_306)
-
- .p2align 4,,15
- .globl GL_PREFIX(BindTexture)
- .type GL_PREFIX(BindTexture), @function
-GL_PREFIX(BindTexture):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2456(%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 2456(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2456(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 2456(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(BindTexture), .-GL_PREFIX(BindTexture)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_308)
- .type GL_PREFIX(_dispatch_stub_308), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_308))
-GL_PREFIX(_dispatch_stub_308):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2464(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2464(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2464(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2464(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_308), .-GL_PREFIX(_dispatch_stub_308)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_309)
- .type GL_PREFIX(_dispatch_stub_309), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_309))
-GL_PREFIX(_dispatch_stub_309):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2472(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 2472(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2472(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 2472(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_309), .-GL_PREFIX(_dispatch_stub_309)
-
- .p2align 4,,15
- .globl GL_PREFIX(DrawArrays)
- .type GL_PREFIX(DrawArrays), @function
-GL_PREFIX(DrawArrays):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2480(%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 2480(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2480(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2480(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(DrawArrays), .-GL_PREFIX(DrawArrays)
-
- .p2align 4,,15
- .globl GL_PREFIX(DrawElements)
- .type GL_PREFIX(DrawElements), @function
-GL_PREFIX(DrawElements):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2488(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2488(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2488(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2488(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(DrawElements), .-GL_PREFIX(DrawElements)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_312)
- .type GL_PREFIX(_dispatch_stub_312), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_312))
-GL_PREFIX(_dispatch_stub_312):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2496(%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 2496(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2496(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 2496(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_312), .-GL_PREFIX(_dispatch_stub_312)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_313)
- .type GL_PREFIX(_dispatch_stub_313), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_313))
-GL_PREFIX(_dispatch_stub_313):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2504(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 2504(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2504(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 2504(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_313), .-GL_PREFIX(_dispatch_stub_313)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_314)
- .type GL_PREFIX(_dispatch_stub_314), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_314))
-GL_PREFIX(_dispatch_stub_314):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2512(%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 2512(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2512(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2512(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_314), .-GL_PREFIX(_dispatch_stub_314)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_315)
- .type GL_PREFIX(_dispatch_stub_315), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_315))
-GL_PREFIX(_dispatch_stub_315):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2520(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 2520(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2520(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 2520(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_315), .-GL_PREFIX(_dispatch_stub_315)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_316)
- .type GL_PREFIX(_dispatch_stub_316), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_316))
-GL_PREFIX(_dispatch_stub_316):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2528(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 2528(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2528(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 2528(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_316), .-GL_PREFIX(_dispatch_stub_316)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_317)
- .type GL_PREFIX(_dispatch_stub_317), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_317))
-GL_PREFIX(_dispatch_stub_317):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2536(%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 2536(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2536(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2536(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_317), .-GL_PREFIX(_dispatch_stub_317)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_318)
- .type GL_PREFIX(_dispatch_stub_318), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_318))
-GL_PREFIX(_dispatch_stub_318):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2544(%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 2544(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2544(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2544(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_318), .-GL_PREFIX(_dispatch_stub_318)
-
- .p2align 4,,15
- .globl GL_PREFIX(PolygonOffset)
- .type GL_PREFIX(PolygonOffset), @function
-GL_PREFIX(PolygonOffset):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2552(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $24, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- call _x86_64_get_dispatch@PLT
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $24, %rsp
- movq 2552(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2552(%rax), %r11
- jmp *%r11
-1:
- subq $24, %rsp
- movq %xmm0, (%rsp)
- movq %xmm1, 8(%rsp)
- call _glapi_get_dispatch
- movq 8(%rsp), %xmm1
- movq (%rsp), %xmm0
- addq $24, %rsp
- movq 2552(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(PolygonOffset), .-GL_PREFIX(PolygonOffset)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_320)
- .type GL_PREFIX(_dispatch_stub_320), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_320))
-GL_PREFIX(_dispatch_stub_320):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2560(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2560(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2560(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2560(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_320), .-GL_PREFIX(_dispatch_stub_320)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_321)
- .type GL_PREFIX(_dispatch_stub_321), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_321))
-GL_PREFIX(_dispatch_stub_321):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2568(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2568(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2568(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2568(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_321), .-GL_PREFIX(_dispatch_stub_321)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_322)
- .type GL_PREFIX(_dispatch_stub_322), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_322))
-GL_PREFIX(_dispatch_stub_322):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2576(%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 2576(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2576(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2576(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_322), .-GL_PREFIX(_dispatch_stub_322)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_323)
- .type GL_PREFIX(_dispatch_stub_323), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_323))
-GL_PREFIX(_dispatch_stub_323):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2584(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %r8
- pushq %r9
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- popq %r9
- popq %r8
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2584(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2584(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %r8
- pushq %r9
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %r9
- popq %r8
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2584(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_323), .-GL_PREFIX(_dispatch_stub_323)
-
- .p2align 4,,15
- .globl GL_PREFIX(CopyTexImage2D)
- .type GL_PREFIX(CopyTexImage2D), @function
-GL_PREFIX(CopyTexImage2D):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2592(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %r8
- pushq %r9
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- popq %r9
- popq %r8
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2592(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2592(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %r8
- pushq %r9
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %r9
- popq %r8
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2592(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(CopyTexImage2D), .-GL_PREFIX(CopyTexImage2D)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_325)
- .type GL_PREFIX(_dispatch_stub_325), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_325))
-GL_PREFIX(_dispatch_stub_325):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2600(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %r8
- pushq %r9
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- popq %r9
- popq %r8
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2600(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2600(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %r8
- pushq %r9
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %r9
- popq %r8
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2600(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_325), .-GL_PREFIX(_dispatch_stub_325)
-
- .p2align 4,,15
- .globl GL_PREFIX(CopyTexSubImage2D)
- .type GL_PREFIX(CopyTexSubImage2D), @function
-GL_PREFIX(CopyTexSubImage2D):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2608(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %r8
- pushq %r9
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- popq %r9
- popq %r8
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2608(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2608(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %r8
- pushq %r9
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %r9
- popq %r8
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2608(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(CopyTexSubImage2D), .-GL_PREFIX(CopyTexSubImage2D)
-
- .p2align 4,,15
- .globl GL_PREFIX(DeleteTextures)
- .type GL_PREFIX(DeleteTextures), @function
-GL_PREFIX(DeleteTextures):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2616(%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 2616(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2616(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 2616(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(DeleteTextures), .-GL_PREFIX(DeleteTextures)
-
- .p2align 4,,15
- .globl GL_PREFIX(GenTextures)
- .type GL_PREFIX(GenTextures), @function
-GL_PREFIX(GenTextures):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2624(%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 2624(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2624(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 2624(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(GenTextures), .-GL_PREFIX(GenTextures)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_329)
- .type GL_PREFIX(_dispatch_stub_329), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_329))
-GL_PREFIX(_dispatch_stub_329):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2632(%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 2632(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2632(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 2632(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_329), .-GL_PREFIX(_dispatch_stub_329)
-
- .p2align 4,,15
- .globl GL_PREFIX(IsTexture)
- .type GL_PREFIX(IsTexture), @function
-GL_PREFIX(IsTexture):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2640(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 2640(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2640(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 2640(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(IsTexture), .-GL_PREFIX(IsTexture)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_331)
- .type GL_PREFIX(_dispatch_stub_331), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_331))
-GL_PREFIX(_dispatch_stub_331):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2648(%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 2648(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2648(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2648(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_331), .-GL_PREFIX(_dispatch_stub_331)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_332)
- .type GL_PREFIX(_dispatch_stub_332), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_332))
-GL_PREFIX(_dispatch_stub_332):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2656(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %r8
- pushq %r9
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- popq %r9
- popq %r8
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2656(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2656(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %r8
- pushq %r9
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %r9
- popq %r8
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2656(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_332), .-GL_PREFIX(_dispatch_stub_332)
-
- .p2align 4,,15
- .globl GL_PREFIX(TexSubImage2D)
- .type GL_PREFIX(TexSubImage2D), @function
-GL_PREFIX(TexSubImage2D):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2664(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %r8
- pushq %r9
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- popq %r9
- popq %r8
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2664(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2664(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %r8
- pushq %r9
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %r9
- popq %r8
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2664(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(TexSubImage2D), .-GL_PREFIX(TexSubImage2D)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_334)
- .type GL_PREFIX(_dispatch_stub_334), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_334))
-GL_PREFIX(_dispatch_stub_334):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2672(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- movq 2672(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2672(%rax), %r11
- jmp *%r11
-1:
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- movq 2672(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_334), .-GL_PREFIX(_dispatch_stub_334)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_335)
- .type GL_PREFIX(_dispatch_stub_335), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_335))
-GL_PREFIX(_dispatch_stub_335):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2680(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 2680(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2680(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 2680(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_335), .-GL_PREFIX(_dispatch_stub_335)
-
- .p2align 4,,15
- .globl GL_PREFIX(BlendColor)
- .type GL_PREFIX(BlendColor), @function
-GL_PREFIX(BlendColor):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2688(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2688(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2688(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2688(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(BlendColor), .-GL_PREFIX(BlendColor)
-
- .p2align 4,,15
- .globl GL_PREFIX(BlendEquation)
- .type GL_PREFIX(BlendEquation), @function
-GL_PREFIX(BlendEquation):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2696(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 2696(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2696(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 2696(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(BlendEquation), .-GL_PREFIX(BlendEquation)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_338)
- .type GL_PREFIX(_dispatch_stub_338), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_338))
-GL_PREFIX(_dispatch_stub_338):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2704(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %r8
- pushq %r9
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- popq %r9
- popq %r8
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2704(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2704(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %r8
- pushq %r9
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %r9
- popq %r8
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2704(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_338), .-GL_PREFIX(_dispatch_stub_338)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_339)
- .type GL_PREFIX(_dispatch_stub_339), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_339))
-GL_PREFIX(_dispatch_stub_339):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2712(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %r8
- pushq %r9
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- popq %r9
- popq %r8
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2712(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2712(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %r8
- pushq %r9
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %r9
- popq %r8
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2712(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_339), .-GL_PREFIX(_dispatch_stub_339)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_340)
- .type GL_PREFIX(_dispatch_stub_340), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_340))
-GL_PREFIX(_dispatch_stub_340):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2720(%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 2720(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2720(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2720(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_340), .-GL_PREFIX(_dispatch_stub_340)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_341)
- .type GL_PREFIX(_dispatch_stub_341), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_341))
-GL_PREFIX(_dispatch_stub_341):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2728(%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 2728(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2728(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2728(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_341), .-GL_PREFIX(_dispatch_stub_341)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_342)
- .type GL_PREFIX(_dispatch_stub_342), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_342))
-GL_PREFIX(_dispatch_stub_342):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2736(%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 2736(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2736(%rax), %r11
- 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 2736(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_342), .-GL_PREFIX(_dispatch_stub_342)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_343)
- .type GL_PREFIX(_dispatch_stub_343), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_343))
-GL_PREFIX(_dispatch_stub_343):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2744(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2744(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2744(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2744(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_343), .-GL_PREFIX(_dispatch_stub_343)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_344)
- .type GL_PREFIX(_dispatch_stub_344), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_344))
-GL_PREFIX(_dispatch_stub_344):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2752(%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 2752(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2752(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2752(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_344), .-GL_PREFIX(_dispatch_stub_344)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_345)
- .type GL_PREFIX(_dispatch_stub_345), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_345))
-GL_PREFIX(_dispatch_stub_345):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2760(%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 2760(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2760(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2760(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_345), .-GL_PREFIX(_dispatch_stub_345)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_346)
- .type GL_PREFIX(_dispatch_stub_346), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_346))
-GL_PREFIX(_dispatch_stub_346):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2768(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %r8
- pushq %r9
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- popq %r9
- popq %r8
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2768(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2768(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %r8
- pushq %r9
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %r9
- popq %r8
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2768(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_346), .-GL_PREFIX(_dispatch_stub_346)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_347)
- .type GL_PREFIX(_dispatch_stub_347), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_347))
-GL_PREFIX(_dispatch_stub_347):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2776(%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 2776(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2776(%rax), %r11
- 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 2776(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_347), .-GL_PREFIX(_dispatch_stub_347)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_348)
- .type GL_PREFIX(_dispatch_stub_348), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_348))
-GL_PREFIX(_dispatch_stub_348):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2784(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %r8
- pushq %r9
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- popq %r9
- popq %r8
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2784(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2784(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %r8
- pushq %r9
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %r9
- popq %r8
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2784(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_348), .-GL_PREFIX(_dispatch_stub_348)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_349)
- .type GL_PREFIX(_dispatch_stub_349), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_349))
-GL_PREFIX(_dispatch_stub_349):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2792(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %r8
- pushq %r9
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- popq %r9
- popq %r8
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2792(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2792(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %r8
- pushq %r9
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %r9
- popq %r8
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2792(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_349), .-GL_PREFIX(_dispatch_stub_349)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_350)
- .type GL_PREFIX(_dispatch_stub_350), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_350))
-GL_PREFIX(_dispatch_stub_350):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2800(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $24, %rsp
- movq %rdi, (%rsp)
- movq %rsi, 8(%rsp)
- movq %xmm0, 16(%rsp)
- call _x86_64_get_dispatch@PLT
- movq 16(%rsp), %xmm0
- movq 8(%rsp), %rsi
- movq (%rsp), %rdi
- addq $24, %rsp
- movq 2800(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2800(%rax), %r11
- jmp *%r11
-1:
- subq $24, %rsp
- movq %rdi, (%rsp)
- movq %rsi, 8(%rsp)
- movq %xmm0, 16(%rsp)
- call _glapi_get_dispatch
- movq 16(%rsp), %xmm0
- movq 8(%rsp), %rsi
- movq (%rsp), %rdi
- addq $24, %rsp
- movq 2800(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_350), .-GL_PREFIX(_dispatch_stub_350)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_351)
- .type GL_PREFIX(_dispatch_stub_351), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_351))
-GL_PREFIX(_dispatch_stub_351):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2808(%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 2808(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2808(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2808(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_351), .-GL_PREFIX(_dispatch_stub_351)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_352)
- .type GL_PREFIX(_dispatch_stub_352), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_352))
-GL_PREFIX(_dispatch_stub_352):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2816(%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 2816(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2816(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2816(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_352), .-GL_PREFIX(_dispatch_stub_352)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_353)
- .type GL_PREFIX(_dispatch_stub_353), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_353))
-GL_PREFIX(_dispatch_stub_353):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2824(%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 2824(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2824(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2824(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_353), .-GL_PREFIX(_dispatch_stub_353)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_354)
- .type GL_PREFIX(_dispatch_stub_354), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_354))
-GL_PREFIX(_dispatch_stub_354):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2832(%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 2832(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2832(%rax), %r11
- 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 2832(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_354), .-GL_PREFIX(_dispatch_stub_354)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_355)
- .type GL_PREFIX(_dispatch_stub_355), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_355))
-GL_PREFIX(_dispatch_stub_355):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2840(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %r8
- pushq %r9
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- popq %r9
- popq %r8
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2840(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2840(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %r8
- pushq %r9
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %r9
- popq %r8
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2840(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_355), .-GL_PREFIX(_dispatch_stub_355)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_356)
- .type GL_PREFIX(_dispatch_stub_356), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_356))
-GL_PREFIX(_dispatch_stub_356):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2848(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2848(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2848(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2848(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_356), .-GL_PREFIX(_dispatch_stub_356)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_357)
- .type GL_PREFIX(_dispatch_stub_357), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_357))
-GL_PREFIX(_dispatch_stub_357):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2856(%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 2856(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2856(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2856(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_357), .-GL_PREFIX(_dispatch_stub_357)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_358)
- .type GL_PREFIX(_dispatch_stub_358), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_358))
-GL_PREFIX(_dispatch_stub_358):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2864(%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 2864(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2864(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2864(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_358), .-GL_PREFIX(_dispatch_stub_358)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_359)
- .type GL_PREFIX(_dispatch_stub_359), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_359))
-GL_PREFIX(_dispatch_stub_359):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2872(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %r8
- pushq %r9
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- popq %r9
- popq %r8
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2872(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2872(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %r8
- pushq %r9
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %r9
- popq %r8
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2872(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_359), .-GL_PREFIX(_dispatch_stub_359)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_360)
- .type GL_PREFIX(_dispatch_stub_360), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_360))
-GL_PREFIX(_dispatch_stub_360):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2880(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %r8
- pushq %r9
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- popq %r9
- popq %r8
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2880(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2880(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %r8
- pushq %r9
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %r9
- popq %r8
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2880(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_360), .-GL_PREFIX(_dispatch_stub_360)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_361)
- .type GL_PREFIX(_dispatch_stub_361), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_361))
-GL_PREFIX(_dispatch_stub_361):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2888(%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 2888(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2888(%rax), %r11
- 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 2888(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_361), .-GL_PREFIX(_dispatch_stub_361)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_362)
- .type GL_PREFIX(_dispatch_stub_362), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_362))
-GL_PREFIX(_dispatch_stub_362):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2896(%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 2896(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2896(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2896(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_362), .-GL_PREFIX(_dispatch_stub_362)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_363)
- .type GL_PREFIX(_dispatch_stub_363), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_363))
-GL_PREFIX(_dispatch_stub_363):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2904(%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 2904(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2904(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2904(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_363), .-GL_PREFIX(_dispatch_stub_363)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_364)
- .type GL_PREFIX(_dispatch_stub_364), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_364))
-GL_PREFIX(_dispatch_stub_364):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2912(%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 2912(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2912(%rax), %r11
- 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 2912(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_364), .-GL_PREFIX(_dispatch_stub_364)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_365)
- .type GL_PREFIX(_dispatch_stub_365), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_365))
-GL_PREFIX(_dispatch_stub_365):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2920(%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 2920(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2920(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2920(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_365), .-GL_PREFIX(_dispatch_stub_365)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_366)
- .type GL_PREFIX(_dispatch_stub_366), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_366))
-GL_PREFIX(_dispatch_stub_366):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2928(%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 2928(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2928(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2928(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_366), .-GL_PREFIX(_dispatch_stub_366)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_367)
- .type GL_PREFIX(_dispatch_stub_367), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_367))
-GL_PREFIX(_dispatch_stub_367):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2936(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2936(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2936(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2936(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_367), .-GL_PREFIX(_dispatch_stub_367)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_368)
- .type GL_PREFIX(_dispatch_stub_368), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_368))
-GL_PREFIX(_dispatch_stub_368):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2944(%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 2944(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2944(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2944(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_368), .-GL_PREFIX(_dispatch_stub_368)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_369)
- .type GL_PREFIX(_dispatch_stub_369), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_369))
-GL_PREFIX(_dispatch_stub_369):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2952(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 2952(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2952(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 2952(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_369), .-GL_PREFIX(_dispatch_stub_369)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_370)
- .type GL_PREFIX(_dispatch_stub_370), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_370))
-GL_PREFIX(_dispatch_stub_370):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2960(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 2960(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2960(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 2960(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_370), .-GL_PREFIX(_dispatch_stub_370)
-
- .p2align 4,,15
- .globl GL_PREFIX(TexImage3DOES)
- .type GL_PREFIX(TexImage3DOES), @function
-GL_PREFIX(TexImage3DOES):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2968(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %r8
- pushq %r9
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- popq %r9
- popq %r8
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2968(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2968(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %r8
- pushq %r9
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %r9
- popq %r8
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2968(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(TexImage3DOES), .-GL_PREFIX(TexImage3DOES)
-
- .p2align 4,,15
- .globl GL_PREFIX(TexSubImage3DOES)
- .type GL_PREFIX(TexSubImage3DOES), @function
-GL_PREFIX(TexSubImage3DOES):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2976(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %r8
- pushq %r9
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- popq %r9
- popq %r8
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2976(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2976(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %r8
- pushq %r9
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %r9
- popq %r8
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2976(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(TexSubImage3DOES), .-GL_PREFIX(TexSubImage3DOES)
-
- .p2align 4,,15
- .globl GL_PREFIX(CopyTexSubImage3DOES)
- .type GL_PREFIX(CopyTexSubImage3DOES), @function
-GL_PREFIX(CopyTexSubImage3DOES):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2984(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %r8
- pushq %r9
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- popq %r9
- popq %r8
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2984(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2984(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %r8
- pushq %r9
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %r9
- popq %r8
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 2984(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(CopyTexSubImage3DOES), .-GL_PREFIX(CopyTexSubImage3DOES)
-
- .p2align 4,,15
- .globl GL_PREFIX(ActiveTexture)
- .type GL_PREFIX(ActiveTexture), @function
-GL_PREFIX(ActiveTexture):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 2992(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 2992(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 2992(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 2992(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(ActiveTexture), .-GL_PREFIX(ActiveTexture)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_375)
- .type GL_PREFIX(_dispatch_stub_375), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_375))
-GL_PREFIX(_dispatch_stub_375):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3000(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 3000(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3000(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 3000(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_375), .-GL_PREFIX(_dispatch_stub_375)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_376)
- .type GL_PREFIX(_dispatch_stub_376), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_376))
-GL_PREFIX(_dispatch_stub_376):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3008(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $24, %rsp
- movq %rdi, (%rsp)
- movq %xmm0, 8(%rsp)
- call _x86_64_get_dispatch@PLT
- movq 8(%rsp), %xmm0
- movq (%rsp), %rdi
- addq $24, %rsp
- movq 3008(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3008(%rax), %r11
- jmp *%r11
-1:
- subq $24, %rsp
- movq %rdi, (%rsp)
- movq %xmm0, 8(%rsp)
- call _glapi_get_dispatch
- movq 8(%rsp), %xmm0
- movq (%rsp), %rdi
- addq $24, %rsp
- movq 3008(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_376), .-GL_PREFIX(_dispatch_stub_376)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_377)
- .type GL_PREFIX(_dispatch_stub_377), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_377))
-GL_PREFIX(_dispatch_stub_377):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3016(%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 3016(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3016(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 3016(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_377), .-GL_PREFIX(_dispatch_stub_377)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_378)
- .type GL_PREFIX(_dispatch_stub_378), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_378))
-GL_PREFIX(_dispatch_stub_378):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3024(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $24, %rsp
- movq %rdi, (%rsp)
- movq %xmm0, 8(%rsp)
- call _x86_64_get_dispatch@PLT
- movq 8(%rsp), %xmm0
- movq (%rsp), %rdi
- addq $24, %rsp
- movq 3024(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3024(%rax), %r11
- jmp *%r11
-1:
- subq $24, %rsp
- movq %rdi, (%rsp)
- movq %xmm0, 8(%rsp)
- call _glapi_get_dispatch
- movq 8(%rsp), %xmm0
- movq (%rsp), %rdi
- addq $24, %rsp
- movq 3024(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_378), .-GL_PREFIX(_dispatch_stub_378)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_379)
- .type GL_PREFIX(_dispatch_stub_379), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_379))
-GL_PREFIX(_dispatch_stub_379):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3032(%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 3032(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3032(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 3032(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_379), .-GL_PREFIX(_dispatch_stub_379)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_380)
- .type GL_PREFIX(_dispatch_stub_380), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_380))
-GL_PREFIX(_dispatch_stub_380):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3040(%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 3040(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3040(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 3040(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_380), .-GL_PREFIX(_dispatch_stub_380)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_381)
- .type GL_PREFIX(_dispatch_stub_381), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_381))
-GL_PREFIX(_dispatch_stub_381):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3048(%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 3048(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3048(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 3048(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_381), .-GL_PREFIX(_dispatch_stub_381)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_382)
- .type GL_PREFIX(_dispatch_stub_382), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_382))
-GL_PREFIX(_dispatch_stub_382):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3056(%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 3056(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3056(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 3056(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_382), .-GL_PREFIX(_dispatch_stub_382)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_383)
- .type GL_PREFIX(_dispatch_stub_383), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_383))
-GL_PREFIX(_dispatch_stub_383):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3064(%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 3064(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3064(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 3064(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_383), .-GL_PREFIX(_dispatch_stub_383)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_384)
- .type GL_PREFIX(_dispatch_stub_384), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_384))
-GL_PREFIX(_dispatch_stub_384):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3072(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $24, %rsp
- movq %rdi, (%rsp)
- movq %xmm0, 8(%rsp)
- movq %xmm1, 16(%rsp)
- call _x86_64_get_dispatch@PLT
- movq 16(%rsp), %xmm1
- movq 8(%rsp), %xmm0
- movq (%rsp), %rdi
- addq $24, %rsp
- movq 3072(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3072(%rax), %r11
- jmp *%r11
-1:
- subq $24, %rsp
- movq %rdi, (%rsp)
- movq %xmm0, 8(%rsp)
- movq %xmm1, 16(%rsp)
- call _glapi_get_dispatch
- movq 16(%rsp), %xmm1
- movq 8(%rsp), %xmm0
- movq (%rsp), %rdi
- addq $24, %rsp
- movq 3072(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_384), .-GL_PREFIX(_dispatch_stub_384)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_385)
- .type GL_PREFIX(_dispatch_stub_385), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_385))
-GL_PREFIX(_dispatch_stub_385):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3080(%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 3080(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3080(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 3080(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_385), .-GL_PREFIX(_dispatch_stub_385)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_386)
- .type GL_PREFIX(_dispatch_stub_386), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_386))
-GL_PREFIX(_dispatch_stub_386):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3088(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $24, %rsp
- movq %rdi, (%rsp)
- movq %xmm0, 8(%rsp)
- movq %xmm1, 16(%rsp)
- call _x86_64_get_dispatch@PLT
- movq 16(%rsp), %xmm1
- movq 8(%rsp), %xmm0
- movq (%rsp), %rdi
- addq $24, %rsp
- movq 3088(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3088(%rax), %r11
- jmp *%r11
-1:
- subq $24, %rsp
- movq %rdi, (%rsp)
- movq %xmm0, 8(%rsp)
- movq %xmm1, 16(%rsp)
- call _glapi_get_dispatch
- movq 16(%rsp), %xmm1
- movq 8(%rsp), %xmm0
- movq (%rsp), %rdi
- addq $24, %rsp
- movq 3088(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_386), .-GL_PREFIX(_dispatch_stub_386)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_387)
- .type GL_PREFIX(_dispatch_stub_387), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_387))
-GL_PREFIX(_dispatch_stub_387):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3096(%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 3096(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3096(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 3096(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_387), .-GL_PREFIX(_dispatch_stub_387)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_388)
- .type GL_PREFIX(_dispatch_stub_388), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_388))
-GL_PREFIX(_dispatch_stub_388):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3104(%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 3104(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3104(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 3104(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_388), .-GL_PREFIX(_dispatch_stub_388)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_389)
- .type GL_PREFIX(_dispatch_stub_389), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_389))
-GL_PREFIX(_dispatch_stub_389):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3112(%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 3112(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3112(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 3112(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_389), .-GL_PREFIX(_dispatch_stub_389)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_390)
- .type GL_PREFIX(_dispatch_stub_390), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_390))
-GL_PREFIX(_dispatch_stub_390):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3120(%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 3120(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3120(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 3120(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_390), .-GL_PREFIX(_dispatch_stub_390)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_391)
- .type GL_PREFIX(_dispatch_stub_391), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_391))
-GL_PREFIX(_dispatch_stub_391):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3128(%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 3128(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3128(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 3128(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_391), .-GL_PREFIX(_dispatch_stub_391)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_392)
- .type GL_PREFIX(_dispatch_stub_392), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_392))
-GL_PREFIX(_dispatch_stub_392):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3136(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $40, %rsp
- movq %rdi, (%rsp)
- movq %xmm0, 8(%rsp)
- movq %xmm1, 16(%rsp)
- movq %xmm2, 24(%rsp)
- call _x86_64_get_dispatch@PLT
- movq 24(%rsp), %xmm2
- movq 16(%rsp), %xmm1
- movq 8(%rsp), %xmm0
- movq (%rsp), %rdi
- addq $40, %rsp
- movq 3136(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3136(%rax), %r11
- jmp *%r11
-1:
- subq $40, %rsp
- movq %rdi, (%rsp)
- movq %xmm0, 8(%rsp)
- movq %xmm1, 16(%rsp)
- movq %xmm2, 24(%rsp)
- call _glapi_get_dispatch
- movq 24(%rsp), %xmm2
- movq 16(%rsp), %xmm1
- movq 8(%rsp), %xmm0
- movq (%rsp), %rdi
- addq $40, %rsp
- movq 3136(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_392), .-GL_PREFIX(_dispatch_stub_392)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_393)
- .type GL_PREFIX(_dispatch_stub_393), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_393))
-GL_PREFIX(_dispatch_stub_393):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3144(%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 3144(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3144(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 3144(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_393), .-GL_PREFIX(_dispatch_stub_393)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_394)
- .type GL_PREFIX(_dispatch_stub_394), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_394))
-GL_PREFIX(_dispatch_stub_394):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3152(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $40, %rsp
- movq %rdi, (%rsp)
- movq %xmm0, 8(%rsp)
- movq %xmm1, 16(%rsp)
- movq %xmm2, 24(%rsp)
- call _x86_64_get_dispatch@PLT
- movq 24(%rsp), %xmm2
- movq 16(%rsp), %xmm1
- movq 8(%rsp), %xmm0
- movq (%rsp), %rdi
- addq $40, %rsp
- movq 3152(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3152(%rax), %r11
- jmp *%r11
-1:
- subq $40, %rsp
- movq %rdi, (%rsp)
- movq %xmm0, 8(%rsp)
- movq %xmm1, 16(%rsp)
- movq %xmm2, 24(%rsp)
- call _glapi_get_dispatch
- movq 24(%rsp), %xmm2
- movq 16(%rsp), %xmm1
- movq 8(%rsp), %xmm0
- movq (%rsp), %rdi
- addq $40, %rsp
- movq 3152(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_394), .-GL_PREFIX(_dispatch_stub_394)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_395)
- .type GL_PREFIX(_dispatch_stub_395), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_395))
-GL_PREFIX(_dispatch_stub_395):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3160(%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 3160(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3160(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 3160(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_395), .-GL_PREFIX(_dispatch_stub_395)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_396)
- .type GL_PREFIX(_dispatch_stub_396), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_396))
-GL_PREFIX(_dispatch_stub_396):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3168(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 3168(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3168(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 3168(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_396), .-GL_PREFIX(_dispatch_stub_396)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_397)
- .type GL_PREFIX(_dispatch_stub_397), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_397))
-GL_PREFIX(_dispatch_stub_397):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3176(%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 3176(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3176(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 3176(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_397), .-GL_PREFIX(_dispatch_stub_397)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_398)
- .type GL_PREFIX(_dispatch_stub_398), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_398))
-GL_PREFIX(_dispatch_stub_398):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3184(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 3184(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3184(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 3184(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_398), .-GL_PREFIX(_dispatch_stub_398)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_399)
- .type GL_PREFIX(_dispatch_stub_399), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_399))
-GL_PREFIX(_dispatch_stub_399):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3192(%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 3192(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3192(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 3192(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_399), .-GL_PREFIX(_dispatch_stub_399)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_400)
- .type GL_PREFIX(_dispatch_stub_400), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_400))
-GL_PREFIX(_dispatch_stub_400):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3200(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $40, %rsp
- movq %rdi, (%rsp)
- movq %xmm0, 8(%rsp)
- movq %xmm1, 16(%rsp)
- movq %xmm2, 24(%rsp)
- movq %xmm3, 32(%rsp)
- call _x86_64_get_dispatch@PLT
- movq 32(%rsp), %xmm3
- movq 24(%rsp), %xmm2
- movq 16(%rsp), %xmm1
- movq 8(%rsp), %xmm0
- movq (%rsp), %rdi
- addq $40, %rsp
- movq 3200(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3200(%rax), %r11
- jmp *%r11
-1:
- subq $40, %rsp
- movq %rdi, (%rsp)
- movq %xmm0, 8(%rsp)
- movq %xmm1, 16(%rsp)
- movq %xmm2, 24(%rsp)
- movq %xmm3, 32(%rsp)
- call _glapi_get_dispatch
- movq 32(%rsp), %xmm3
- movq 24(%rsp), %xmm2
- movq 16(%rsp), %xmm1
- movq 8(%rsp), %xmm0
- movq (%rsp), %rdi
- addq $40, %rsp
- movq 3200(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_400), .-GL_PREFIX(_dispatch_stub_400)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_401)
- .type GL_PREFIX(_dispatch_stub_401), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_401))
-GL_PREFIX(_dispatch_stub_401):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3208(%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 3208(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3208(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 3208(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_401), .-GL_PREFIX(_dispatch_stub_401)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_402)
- .type GL_PREFIX(_dispatch_stub_402), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_402))
-GL_PREFIX(_dispatch_stub_402):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3216(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $40, %rsp
- movq %rdi, (%rsp)
- movq %xmm0, 8(%rsp)
- movq %xmm1, 16(%rsp)
- movq %xmm2, 24(%rsp)
- movq %xmm3, 32(%rsp)
- call _x86_64_get_dispatch@PLT
- movq 32(%rsp), %xmm3
- movq 24(%rsp), %xmm2
- movq 16(%rsp), %xmm1
- movq 8(%rsp), %xmm0
- movq (%rsp), %rdi
- addq $40, %rsp
- movq 3216(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3216(%rax), %r11
- jmp *%r11
-1:
- subq $40, %rsp
- movq %rdi, (%rsp)
- movq %xmm0, 8(%rsp)
- movq %xmm1, 16(%rsp)
- movq %xmm2, 24(%rsp)
- movq %xmm3, 32(%rsp)
- call _glapi_get_dispatch
- movq 32(%rsp), %xmm3
- movq 24(%rsp), %xmm2
- movq 16(%rsp), %xmm1
- movq 8(%rsp), %xmm0
- movq (%rsp), %rdi
- addq $40, %rsp
- movq 3216(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_402), .-GL_PREFIX(_dispatch_stub_402)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_403)
- .type GL_PREFIX(_dispatch_stub_403), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_403))
-GL_PREFIX(_dispatch_stub_403):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3224(%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 3224(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3224(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 3224(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_403), .-GL_PREFIX(_dispatch_stub_403)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_404)
- .type GL_PREFIX(_dispatch_stub_404), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_404))
-GL_PREFIX(_dispatch_stub_404):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3232(%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 3232(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3232(%rax), %r11
- 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 3232(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_404), .-GL_PREFIX(_dispatch_stub_404)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_405)
- .type GL_PREFIX(_dispatch_stub_405), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_405))
-GL_PREFIX(_dispatch_stub_405):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3240(%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 3240(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3240(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 3240(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_405), .-GL_PREFIX(_dispatch_stub_405)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_406)
- .type GL_PREFIX(_dispatch_stub_406), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_406))
-GL_PREFIX(_dispatch_stub_406):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3248(%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 3248(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3248(%rax), %r11
- 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 3248(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_406), .-GL_PREFIX(_dispatch_stub_406)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_407)
- .type GL_PREFIX(_dispatch_stub_407), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_407))
-GL_PREFIX(_dispatch_stub_407):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3256(%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 3256(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3256(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 3256(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_407), .-GL_PREFIX(_dispatch_stub_407)
-
- .p2align 4,,15
- .globl GL_PREFIX(GetBufferPointervOES)
- .type GL_PREFIX(GetBufferPointervOES), @function
-GL_PREFIX(GetBufferPointervOES):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3264(%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 3264(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3264(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 3264(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(GetBufferPointervOES), .-GL_PREFIX(GetBufferPointervOES)
-
- .p2align 4,,15
- .globl GL_PREFIX(MapBufferOES)
- .type GL_PREFIX(MapBufferOES), @function
-GL_PREFIX(MapBufferOES):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3272(%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 3272(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3272(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 3272(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(MapBufferOES), .-GL_PREFIX(MapBufferOES)
-
- .p2align 4,,15
- .globl GL_PREFIX(UnmapBufferOES)
- .type GL_PREFIX(UnmapBufferOES), @function
-GL_PREFIX(UnmapBufferOES):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3280(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 3280(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3280(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 3280(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(UnmapBufferOES), .-GL_PREFIX(UnmapBufferOES)
-
- .p2align 4,,15
- .globl GL_PREFIX(CompressedTexImage3DOES)
- .type GL_PREFIX(CompressedTexImage3DOES), @function
-GL_PREFIX(CompressedTexImage3DOES):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3288(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %r8
- pushq %r9
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- popq %r9
- popq %r8
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 3288(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3288(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %r8
- pushq %r9
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %r9
- popq %r8
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 3288(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(CompressedTexImage3DOES), .-GL_PREFIX(CompressedTexImage3DOES)
-
- .p2align 4,,15
- .globl GL_PREFIX(CompressedTexSubImage3DOES)
- .type GL_PREFIX(CompressedTexSubImage3DOES), @function
-GL_PREFIX(CompressedTexSubImage3DOES):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3296(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %r8
- pushq %r9
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- popq %r9
- popq %r8
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 3296(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3296(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %r8
- pushq %r9
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %r9
- popq %r8
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 3296(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(CompressedTexSubImage3DOES), .-GL_PREFIX(CompressedTexSubImage3DOES)
-
- .p2align 4,,15
- .globl GL_PREFIX(FramebufferTexture3DOES)
- .type GL_PREFIX(FramebufferTexture3DOES), @function
-GL_PREFIX(FramebufferTexture3DOES):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3304(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %r8
- pushq %r9
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- popq %r9
- popq %r8
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 3304(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3304(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %r8
- pushq %r9
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %r9
- popq %r8
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 3304(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(FramebufferTexture3DOES), .-GL_PREFIX(FramebufferTexture3DOES)
-
- .p2align 4,,15
- .globl GL_PREFIX(GetProgramBinaryOES)
- .type GL_PREFIX(GetProgramBinaryOES), @function
-GL_PREFIX(GetProgramBinaryOES):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3312(%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 3312(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3312(%rax), %r11
- 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 3312(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(GetProgramBinaryOES), .-GL_PREFIX(GetProgramBinaryOES)
-
- .p2align 4,,15
- .globl GL_PREFIX(ProgramBinaryOES)
- .type GL_PREFIX(ProgramBinaryOES), @function
-GL_PREFIX(ProgramBinaryOES):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3320(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 3320(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3320(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 3320(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(ProgramBinaryOES), .-GL_PREFIX(ProgramBinaryOES)
-
- .p2align 4,,15
- .globl GL_PREFIX(MultiDrawArraysEXT)
- .type GL_PREFIX(MultiDrawArraysEXT), @function
-GL_PREFIX(MultiDrawArraysEXT):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3328(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 3328(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3328(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 3328(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(MultiDrawArraysEXT), .-GL_PREFIX(MultiDrawArraysEXT)
-
- .p2align 4,,15
- .globl GL_PREFIX(MultiDrawElementsEXT)
- .type GL_PREFIX(MultiDrawElementsEXT), @function
-GL_PREFIX(MultiDrawElementsEXT):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3336(%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 3336(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3336(%rax), %r11
- 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 3336(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(MultiDrawElementsEXT), .-GL_PREFIX(MultiDrawElementsEXT)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_418)
- .type GL_PREFIX(_dispatch_stub_418), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_418))
-GL_PREFIX(_dispatch_stub_418):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3344(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 3344(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3344(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 3344(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_418), .-GL_PREFIX(_dispatch_stub_418)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_419)
- .type GL_PREFIX(_dispatch_stub_419), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_419))
-GL_PREFIX(_dispatch_stub_419):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3352(%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 3352(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3352(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 3352(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_419), .-GL_PREFIX(_dispatch_stub_419)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_420)
- .type GL_PREFIX(_dispatch_stub_420), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_420))
-GL_PREFIX(_dispatch_stub_420):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3360(%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 3360(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3360(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 3360(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_420), .-GL_PREFIX(_dispatch_stub_420)
-
- .p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_421)
- .type GL_PREFIX(_dispatch_stub_421), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_421))
-GL_PREFIX(_dispatch_stub_421):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3368(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 3368(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3368(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 3368(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_421), .-GL_PREFIX(_dispatch_stub_421)
-
- .p2align 4,,15
- .globl GL_PREFIX(EGLImageTargetRenderbufferStorageOES)
- .type GL_PREFIX(EGLImageTargetRenderbufferStorageOES), @function
-GL_PREFIX(EGLImageTargetRenderbufferStorageOES):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3376(%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 3376(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3376(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 3376(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(EGLImageTargetRenderbufferStorageOES), .-GL_PREFIX(EGLImageTargetRenderbufferStorageOES)
-
- .p2align 4,,15
- .globl GL_PREFIX(EGLImageTargetTexture2DOES)
- .type GL_PREFIX(EGLImageTargetTexture2DOES), @function
-GL_PREFIX(EGLImageTargetTexture2DOES):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3384(%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 3384(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3384(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 3384(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(EGLImageTargetTexture2DOES), .-GL_PREFIX(EGLImageTargetTexture2DOES)
-
- .p2align 4,,15
- .globl GL_PREFIX(CompressedTexImage2D)
- .type GL_PREFIX(CompressedTexImage2D), @function
-GL_PREFIX(CompressedTexImage2D):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3392(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %r8
- pushq %r9
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- popq %r9
- popq %r8
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 3392(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3392(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %r8
- pushq %r9
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %r9
- popq %r8
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 3392(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(CompressedTexImage2D), .-GL_PREFIX(CompressedTexImage2D)
-
- .p2align 4,,15
- .globl GL_PREFIX(CompressedTexSubImage2D)
- .type GL_PREFIX(CompressedTexSubImage2D), @function
-GL_PREFIX(CompressedTexSubImage2D):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3400(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %r8
- pushq %r9
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- popq %r9
- popq %r8
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 3400(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3400(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %r8
- pushq %r9
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %r9
- popq %r8
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 3400(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(CompressedTexSubImage2D), .-GL_PREFIX(CompressedTexSubImage2D)
-
- .p2align 4,,15
- .globl GL_PREFIX(SampleCoverage)
- .type GL_PREFIX(SampleCoverage), @function
-GL_PREFIX(SampleCoverage):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3408(%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 3408(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3408(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 3408(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(SampleCoverage), .-GL_PREFIX(SampleCoverage)
-
- .p2align 4,,15
- .globl GL_PREFIX(BindBuffer)
- .type GL_PREFIX(BindBuffer), @function
-GL_PREFIX(BindBuffer):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3416(%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 3416(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3416(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 3416(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(BindBuffer), .-GL_PREFIX(BindBuffer)
-
- .p2align 4,,15
- .globl GL_PREFIX(BufferData)
- .type GL_PREFIX(BufferData), @function
-GL_PREFIX(BufferData):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3424(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 3424(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3424(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 3424(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(BufferData), .-GL_PREFIX(BufferData)
-
- .p2align 4,,15
- .globl GL_PREFIX(BufferSubData)
- .type GL_PREFIX(BufferSubData), @function
-GL_PREFIX(BufferSubData):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3432(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 3432(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3432(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 3432(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(BufferSubData), .-GL_PREFIX(BufferSubData)
-
- .p2align 4,,15
- .globl GL_PREFIX(DeleteBuffers)
- .type GL_PREFIX(DeleteBuffers), @function
-GL_PREFIX(DeleteBuffers):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3440(%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 3440(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3440(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 3440(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(DeleteBuffers), .-GL_PREFIX(DeleteBuffers)
-
- .p2align 4,,15
- .globl GL_PREFIX(GenBuffers)
- .type GL_PREFIX(GenBuffers), @function
-GL_PREFIX(GenBuffers):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3448(%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 3448(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3448(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 3448(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(GenBuffers), .-GL_PREFIX(GenBuffers)
-
- .p2align 4,,15
- .globl GL_PREFIX(GetBufferParameteriv)
- .type GL_PREFIX(GetBufferParameteriv), @function
-GL_PREFIX(GetBufferParameteriv):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3456(%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 3456(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3456(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 3456(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(GetBufferParameteriv), .-GL_PREFIX(GetBufferParameteriv)
-
- .p2align 4,,15
- .globl GL_PREFIX(IsBuffer)
- .type GL_PREFIX(IsBuffer), @function
-GL_PREFIX(IsBuffer):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3464(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 3464(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3464(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 3464(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(IsBuffer), .-GL_PREFIX(IsBuffer)
-
- .p2align 4,,15
- .globl GL_PREFIX(AttachShader)
- .type GL_PREFIX(AttachShader), @function
-GL_PREFIX(AttachShader):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3472(%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 3472(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3472(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 3472(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(AttachShader), .-GL_PREFIX(AttachShader)
-
- .p2align 4,,15
- .globl GL_PREFIX(BindAttribLocation)
- .type GL_PREFIX(BindAttribLocation), @function
-GL_PREFIX(BindAttribLocation):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3480(%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 3480(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3480(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 3480(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(BindAttribLocation), .-GL_PREFIX(BindAttribLocation)
-
- .p2align 4,,15
- .globl GL_PREFIX(BlendEquationSeparate)
- .type GL_PREFIX(BlendEquationSeparate), @function
-GL_PREFIX(BlendEquationSeparate):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3488(%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 3488(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3488(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 3488(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(BlendEquationSeparate), .-GL_PREFIX(BlendEquationSeparate)
-
- .p2align 4,,15
- .globl GL_PREFIX(CompileShader)
- .type GL_PREFIX(CompileShader), @function
-GL_PREFIX(CompileShader):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3496(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 3496(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3496(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 3496(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(CompileShader), .-GL_PREFIX(CompileShader)
-
- .p2align 4,,15
- .globl GL_PREFIX(CreateProgram)
- .type GL_PREFIX(CreateProgram), @function
-GL_PREFIX(CreateProgram):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3504(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- movq 3504(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3504(%rax), %r11
- jmp *%r11
-1:
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- movq 3504(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(CreateProgram), .-GL_PREFIX(CreateProgram)
-
- .p2align 4,,15
- .globl GL_PREFIX(CreateShader)
- .type GL_PREFIX(CreateShader), @function
-GL_PREFIX(CreateShader):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3512(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 3512(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3512(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 3512(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(CreateShader), .-GL_PREFIX(CreateShader)
-
- .p2align 4,,15
- .globl GL_PREFIX(DeleteProgram)
- .type GL_PREFIX(DeleteProgram), @function
-GL_PREFIX(DeleteProgram):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3520(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 3520(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3520(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 3520(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(DeleteProgram), .-GL_PREFIX(DeleteProgram)
-
- .p2align 4,,15
- .globl GL_PREFIX(DeleteShader)
- .type GL_PREFIX(DeleteShader), @function
-GL_PREFIX(DeleteShader):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3528(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 3528(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3528(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 3528(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(DeleteShader), .-GL_PREFIX(DeleteShader)
-
- .p2align 4,,15
- .globl GL_PREFIX(DetachShader)
- .type GL_PREFIX(DetachShader), @function
-GL_PREFIX(DetachShader):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3536(%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 3536(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3536(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 3536(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(DetachShader), .-GL_PREFIX(DetachShader)
-
- .p2align 4,,15
- .globl GL_PREFIX(DisableVertexAttribArray)
- .type GL_PREFIX(DisableVertexAttribArray), @function
-GL_PREFIX(DisableVertexAttribArray):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3544(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 3544(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3544(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 3544(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(DisableVertexAttribArray), .-GL_PREFIX(DisableVertexAttribArray)
-
- .p2align 4,,15
- .globl GL_PREFIX(EnableVertexAttribArray)
- .type GL_PREFIX(EnableVertexAttribArray), @function
-GL_PREFIX(EnableVertexAttribArray):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3552(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 3552(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3552(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 3552(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(EnableVertexAttribArray), .-GL_PREFIX(EnableVertexAttribArray)
-
- .p2align 4,,15
- .globl GL_PREFIX(GetActiveAttrib)
- .type GL_PREFIX(GetActiveAttrib), @function
-GL_PREFIX(GetActiveAttrib):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3560(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %r8
- pushq %r9
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- popq %r9
- popq %r8
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 3560(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3560(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %r8
- pushq %r9
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %r9
- popq %r8
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 3560(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(GetActiveAttrib), .-GL_PREFIX(GetActiveAttrib)
-
- .p2align 4,,15
- .globl GL_PREFIX(GetActiveUniform)
- .type GL_PREFIX(GetActiveUniform), @function
-GL_PREFIX(GetActiveUniform):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3568(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %r8
- pushq %r9
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- popq %r9
- popq %r8
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 3568(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3568(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %r8
- pushq %r9
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %r9
- popq %r8
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 3568(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(GetActiveUniform), .-GL_PREFIX(GetActiveUniform)
-
- .p2align 4,,15
- .globl GL_PREFIX(GetAttachedShaders)
- .type GL_PREFIX(GetAttachedShaders), @function
-GL_PREFIX(GetAttachedShaders):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3576(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 3576(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3576(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 3576(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(GetAttachedShaders), .-GL_PREFIX(GetAttachedShaders)
-
- .p2align 4,,15
- .globl GL_PREFIX(GetAttribLocation)
- .type GL_PREFIX(GetAttribLocation), @function
-GL_PREFIX(GetAttribLocation):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3584(%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 3584(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3584(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 3584(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(GetAttribLocation), .-GL_PREFIX(GetAttribLocation)
-
- .p2align 4,,15
- .globl GL_PREFIX(GetProgramInfoLog)
- .type GL_PREFIX(GetProgramInfoLog), @function
-GL_PREFIX(GetProgramInfoLog):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3592(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 3592(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3592(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 3592(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(GetProgramInfoLog), .-GL_PREFIX(GetProgramInfoLog)
-
- .p2align 4,,15
- .globl GL_PREFIX(GetProgramiv)
- .type GL_PREFIX(GetProgramiv), @function
-GL_PREFIX(GetProgramiv):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3600(%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 3600(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3600(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 3600(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(GetProgramiv), .-GL_PREFIX(GetProgramiv)
-
- .p2align 4,,15
- .globl GL_PREFIX(GetShaderInfoLog)
- .type GL_PREFIX(GetShaderInfoLog), @function
-GL_PREFIX(GetShaderInfoLog):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3608(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 3608(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3608(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 3608(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(GetShaderInfoLog), .-GL_PREFIX(GetShaderInfoLog)
-
- .p2align 4,,15
- .globl GL_PREFIX(GetShaderSource)
- .type GL_PREFIX(GetShaderSource), @function
-GL_PREFIX(GetShaderSource):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3616(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 3616(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3616(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 3616(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(GetShaderSource), .-GL_PREFIX(GetShaderSource)
-
- .p2align 4,,15
- .globl GL_PREFIX(GetShaderiv)
- .type GL_PREFIX(GetShaderiv), @function
-GL_PREFIX(GetShaderiv):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3624(%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 3624(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3624(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 3624(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(GetShaderiv), .-GL_PREFIX(GetShaderiv)
-
- .p2align 4,,15
- .globl GL_PREFIX(GetUniformLocation)
- .type GL_PREFIX(GetUniformLocation), @function
-GL_PREFIX(GetUniformLocation):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3632(%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 3632(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3632(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 3632(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(GetUniformLocation), .-GL_PREFIX(GetUniformLocation)
-
- .p2align 4,,15
- .globl GL_PREFIX(GetUniformfv)
- .type GL_PREFIX(GetUniformfv), @function
-GL_PREFIX(GetUniformfv):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3640(%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 3640(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3640(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 3640(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(GetUniformfv), .-GL_PREFIX(GetUniformfv)
-
- .p2align 4,,15
- .globl GL_PREFIX(GetUniformiv)
- .type GL_PREFIX(GetUniformiv), @function
-GL_PREFIX(GetUniformiv):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3648(%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 3648(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3648(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 3648(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(GetUniformiv), .-GL_PREFIX(GetUniformiv)
-
- .p2align 4,,15
- .globl GL_PREFIX(GetVertexAttribPointerv)
- .type GL_PREFIX(GetVertexAttribPointerv), @function
-GL_PREFIX(GetVertexAttribPointerv):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3656(%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 3656(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3656(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 3656(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(GetVertexAttribPointerv), .-GL_PREFIX(GetVertexAttribPointerv)
-
- .p2align 4,,15
- .globl GL_PREFIX(GetVertexAttribfv)
- .type GL_PREFIX(GetVertexAttribfv), @function
-GL_PREFIX(GetVertexAttribfv):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3664(%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 3664(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3664(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 3664(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(GetVertexAttribfv), .-GL_PREFIX(GetVertexAttribfv)
-
- .p2align 4,,15
- .globl GL_PREFIX(GetVertexAttribiv)
- .type GL_PREFIX(GetVertexAttribiv), @function
-GL_PREFIX(GetVertexAttribiv):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3672(%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 3672(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3672(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 3672(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(GetVertexAttribiv), .-GL_PREFIX(GetVertexAttribiv)
-
- .p2align 4,,15
- .globl GL_PREFIX(IsProgram)
- .type GL_PREFIX(IsProgram), @function
-GL_PREFIX(IsProgram):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3680(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 3680(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3680(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 3680(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(IsProgram), .-GL_PREFIX(IsProgram)
-
- .p2align 4,,15
- .globl GL_PREFIX(IsShader)
- .type GL_PREFIX(IsShader), @function
-GL_PREFIX(IsShader):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3688(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 3688(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3688(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 3688(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(IsShader), .-GL_PREFIX(IsShader)
-
- .p2align 4,,15
- .globl GL_PREFIX(LinkProgram)
- .type GL_PREFIX(LinkProgram), @function
-GL_PREFIX(LinkProgram):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3696(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 3696(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3696(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 3696(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(LinkProgram), .-GL_PREFIX(LinkProgram)
-
- .p2align 4,,15
- .globl GL_PREFIX(ShaderSource)
- .type GL_PREFIX(ShaderSource), @function
-GL_PREFIX(ShaderSource):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3704(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 3704(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3704(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 3704(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(ShaderSource), .-GL_PREFIX(ShaderSource)
-
- .p2align 4,,15
- .globl GL_PREFIX(StencilFuncSeparate)
- .type GL_PREFIX(StencilFuncSeparate), @function
-GL_PREFIX(StencilFuncSeparate):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3712(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 3712(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3712(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 3712(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(StencilFuncSeparate), .-GL_PREFIX(StencilFuncSeparate)
-
- .p2align 4,,15
- .globl GL_PREFIX(StencilMaskSeparate)
- .type GL_PREFIX(StencilMaskSeparate), @function
-GL_PREFIX(StencilMaskSeparate):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3720(%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 3720(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3720(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 3720(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(StencilMaskSeparate), .-GL_PREFIX(StencilMaskSeparate)
-
- .p2align 4,,15
- .globl GL_PREFIX(StencilOpSeparate)
- .type GL_PREFIX(StencilOpSeparate), @function
-GL_PREFIX(StencilOpSeparate):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3728(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 3728(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3728(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 3728(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(StencilOpSeparate), .-GL_PREFIX(StencilOpSeparate)
-
- .p2align 4,,15
- .globl GL_PREFIX(Uniform1f)
- .type GL_PREFIX(Uniform1f), @function
-GL_PREFIX(Uniform1f):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3736(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $24, %rsp
- movq %rdi, (%rsp)
- movq %xmm0, 8(%rsp)
- call _x86_64_get_dispatch@PLT
- movq 8(%rsp), %xmm0
- movq (%rsp), %rdi
- addq $24, %rsp
- movq 3736(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3736(%rax), %r11
- jmp *%r11
-1:
- subq $24, %rsp
- movq %rdi, (%rsp)
- movq %xmm0, 8(%rsp)
- call _glapi_get_dispatch
- movq 8(%rsp), %xmm0
- movq (%rsp), %rdi
- addq $24, %rsp
- movq 3736(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(Uniform1f), .-GL_PREFIX(Uniform1f)
-
- .p2align 4,,15
- .globl GL_PREFIX(Uniform1fv)
- .type GL_PREFIX(Uniform1fv), @function
-GL_PREFIX(Uniform1fv):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3744(%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 3744(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3744(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 3744(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(Uniform1fv), .-GL_PREFIX(Uniform1fv)
-
- .p2align 4,,15
- .globl GL_PREFIX(Uniform1i)
- .type GL_PREFIX(Uniform1i), @function
-GL_PREFIX(Uniform1i):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3752(%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 3752(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3752(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 3752(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(Uniform1i), .-GL_PREFIX(Uniform1i)
-
- .p2align 4,,15
- .globl GL_PREFIX(Uniform1iv)
- .type GL_PREFIX(Uniform1iv), @function
-GL_PREFIX(Uniform1iv):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3760(%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 3760(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3760(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 3760(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(Uniform1iv), .-GL_PREFIX(Uniform1iv)
-
- .p2align 4,,15
- .globl GL_PREFIX(Uniform2f)
- .type GL_PREFIX(Uniform2f), @function
-GL_PREFIX(Uniform2f):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3768(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $24, %rsp
- movq %rdi, (%rsp)
- movq %xmm0, 8(%rsp)
- movq %xmm1, 16(%rsp)
- call _x86_64_get_dispatch@PLT
- movq 16(%rsp), %xmm1
- movq 8(%rsp), %xmm0
- movq (%rsp), %rdi
- addq $24, %rsp
- movq 3768(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3768(%rax), %r11
- jmp *%r11
-1:
- subq $24, %rsp
- movq %rdi, (%rsp)
- movq %xmm0, 8(%rsp)
- movq %xmm1, 16(%rsp)
- call _glapi_get_dispatch
- movq 16(%rsp), %xmm1
- movq 8(%rsp), %xmm0
- movq (%rsp), %rdi
- addq $24, %rsp
- movq 3768(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(Uniform2f), .-GL_PREFIX(Uniform2f)
-
- .p2align 4,,15
- .globl GL_PREFIX(Uniform2fv)
- .type GL_PREFIX(Uniform2fv), @function
-GL_PREFIX(Uniform2fv):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3776(%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 3776(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3776(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 3776(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(Uniform2fv), .-GL_PREFIX(Uniform2fv)
-
- .p2align 4,,15
- .globl GL_PREFIX(Uniform2i)
- .type GL_PREFIX(Uniform2i), @function
-GL_PREFIX(Uniform2i):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3784(%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 3784(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3784(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 3784(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(Uniform2i), .-GL_PREFIX(Uniform2i)
-
- .p2align 4,,15
- .globl GL_PREFIX(Uniform2iv)
- .type GL_PREFIX(Uniform2iv), @function
-GL_PREFIX(Uniform2iv):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3792(%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 3792(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3792(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 3792(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(Uniform2iv), .-GL_PREFIX(Uniform2iv)
-
- .p2align 4,,15
- .globl GL_PREFIX(Uniform3f)
- .type GL_PREFIX(Uniform3f), @function
-GL_PREFIX(Uniform3f):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3800(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $40, %rsp
- movq %rdi, (%rsp)
- movq %xmm0, 8(%rsp)
- movq %xmm1, 16(%rsp)
- movq %xmm2, 24(%rsp)
- call _x86_64_get_dispatch@PLT
- movq 24(%rsp), %xmm2
- movq 16(%rsp), %xmm1
- movq 8(%rsp), %xmm0
- movq (%rsp), %rdi
- addq $40, %rsp
- movq 3800(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3800(%rax), %r11
- jmp *%r11
-1:
- subq $40, %rsp
- movq %rdi, (%rsp)
- movq %xmm0, 8(%rsp)
- movq %xmm1, 16(%rsp)
- movq %xmm2, 24(%rsp)
- call _glapi_get_dispatch
- movq 24(%rsp), %xmm2
- movq 16(%rsp), %xmm1
- movq 8(%rsp), %xmm0
- movq (%rsp), %rdi
- addq $40, %rsp
- movq 3800(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(Uniform3f), .-GL_PREFIX(Uniform3f)
-
- .p2align 4,,15
- .globl GL_PREFIX(Uniform3fv)
- .type GL_PREFIX(Uniform3fv), @function
-GL_PREFIX(Uniform3fv):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3808(%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 3808(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3808(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 3808(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(Uniform3fv), .-GL_PREFIX(Uniform3fv)
-
- .p2align 4,,15
- .globl GL_PREFIX(Uniform3i)
- .type GL_PREFIX(Uniform3i), @function
-GL_PREFIX(Uniform3i):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3816(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 3816(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3816(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 3816(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(Uniform3i), .-GL_PREFIX(Uniform3i)
-
- .p2align 4,,15
- .globl GL_PREFIX(Uniform3iv)
- .type GL_PREFIX(Uniform3iv), @function
-GL_PREFIX(Uniform3iv):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3824(%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 3824(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3824(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 3824(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(Uniform3iv), .-GL_PREFIX(Uniform3iv)
-
- .p2align 4,,15
- .globl GL_PREFIX(Uniform4f)
- .type GL_PREFIX(Uniform4f), @function
-GL_PREFIX(Uniform4f):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3832(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $40, %rsp
- movq %rdi, (%rsp)
- movq %xmm0, 8(%rsp)
- movq %xmm1, 16(%rsp)
- movq %xmm2, 24(%rsp)
- movq %xmm3, 32(%rsp)
- call _x86_64_get_dispatch@PLT
- movq 32(%rsp), %xmm3
- movq 24(%rsp), %xmm2
- movq 16(%rsp), %xmm1
- movq 8(%rsp), %xmm0
- movq (%rsp), %rdi
- addq $40, %rsp
- movq 3832(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3832(%rax), %r11
- jmp *%r11
-1:
- subq $40, %rsp
- movq %rdi, (%rsp)
- movq %xmm0, 8(%rsp)
- movq %xmm1, 16(%rsp)
- movq %xmm2, 24(%rsp)
- movq %xmm3, 32(%rsp)
- call _glapi_get_dispatch
- movq 32(%rsp), %xmm3
- movq 24(%rsp), %xmm2
- movq 16(%rsp), %xmm1
- movq 8(%rsp), %xmm0
- movq (%rsp), %rdi
- addq $40, %rsp
- movq 3832(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(Uniform4f), .-GL_PREFIX(Uniform4f)
-
- .p2align 4,,15
- .globl GL_PREFIX(Uniform4fv)
- .type GL_PREFIX(Uniform4fv), @function
-GL_PREFIX(Uniform4fv):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3840(%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 3840(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3840(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 3840(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(Uniform4fv), .-GL_PREFIX(Uniform4fv)
-
- .p2align 4,,15
- .globl GL_PREFIX(Uniform4i)
- .type GL_PREFIX(Uniform4i), @function
-GL_PREFIX(Uniform4i):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3848(%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 3848(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3848(%rax), %r11
- 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 3848(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(Uniform4i), .-GL_PREFIX(Uniform4i)
-
- .p2align 4,,15
- .globl GL_PREFIX(Uniform4iv)
- .type GL_PREFIX(Uniform4iv), @function
-GL_PREFIX(Uniform4iv):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3856(%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 3856(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3856(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 3856(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(Uniform4iv), .-GL_PREFIX(Uniform4iv)
-
- .p2align 4,,15
- .globl GL_PREFIX(UniformMatrix2fv)
- .type GL_PREFIX(UniformMatrix2fv), @function
-GL_PREFIX(UniformMatrix2fv):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3864(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 3864(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3864(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 3864(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(UniformMatrix2fv), .-GL_PREFIX(UniformMatrix2fv)
-
- .p2align 4,,15
- .globl GL_PREFIX(UniformMatrix3fv)
- .type GL_PREFIX(UniformMatrix3fv), @function
-GL_PREFIX(UniformMatrix3fv):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3872(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 3872(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3872(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 3872(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(UniformMatrix3fv), .-GL_PREFIX(UniformMatrix3fv)
-
- .p2align 4,,15
- .globl GL_PREFIX(UniformMatrix4fv)
- .type GL_PREFIX(UniformMatrix4fv), @function
-GL_PREFIX(UniformMatrix4fv):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3880(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 3880(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3880(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 3880(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(UniformMatrix4fv), .-GL_PREFIX(UniformMatrix4fv)
-
- .p2align 4,,15
- .globl GL_PREFIX(UseProgram)
- .type GL_PREFIX(UseProgram), @function
-GL_PREFIX(UseProgram):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3888(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 3888(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3888(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 3888(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(UseProgram), .-GL_PREFIX(UseProgram)
-
- .p2align 4,,15
- .globl GL_PREFIX(ValidateProgram)
- .type GL_PREFIX(ValidateProgram), @function
-GL_PREFIX(ValidateProgram):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3896(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 3896(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3896(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 3896(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(ValidateProgram), .-GL_PREFIX(ValidateProgram)
-
- .p2align 4,,15
- .globl GL_PREFIX(VertexAttrib1f)
- .type GL_PREFIX(VertexAttrib1f), @function
-GL_PREFIX(VertexAttrib1f):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3904(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $24, %rsp
- movq %rdi, (%rsp)
- movq %xmm0, 8(%rsp)
- call _x86_64_get_dispatch@PLT
- movq 8(%rsp), %xmm0
- movq (%rsp), %rdi
- addq $24, %rsp
- movq 3904(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3904(%rax), %r11
- jmp *%r11
-1:
- subq $24, %rsp
- movq %rdi, (%rsp)
- movq %xmm0, 8(%rsp)
- call _glapi_get_dispatch
- movq 8(%rsp), %xmm0
- movq (%rsp), %rdi
- addq $24, %rsp
- movq 3904(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(VertexAttrib1f), .-GL_PREFIX(VertexAttrib1f)
-
- .p2align 4,,15
- .globl GL_PREFIX(VertexAttrib1fv)
- .type GL_PREFIX(VertexAttrib1fv), @function
-GL_PREFIX(VertexAttrib1fv):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3912(%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 3912(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3912(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 3912(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(VertexAttrib1fv), .-GL_PREFIX(VertexAttrib1fv)
-
- .p2align 4,,15
- .globl GL_PREFIX(VertexAttrib2f)
- .type GL_PREFIX(VertexAttrib2f), @function
-GL_PREFIX(VertexAttrib2f):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3920(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $24, %rsp
- movq %rdi, (%rsp)
- movq %xmm0, 8(%rsp)
- movq %xmm1, 16(%rsp)
- call _x86_64_get_dispatch@PLT
- movq 16(%rsp), %xmm1
- movq 8(%rsp), %xmm0
- movq (%rsp), %rdi
- addq $24, %rsp
- movq 3920(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3920(%rax), %r11
- jmp *%r11
-1:
- subq $24, %rsp
- movq %rdi, (%rsp)
- movq %xmm0, 8(%rsp)
- movq %xmm1, 16(%rsp)
- call _glapi_get_dispatch
- movq 16(%rsp), %xmm1
- movq 8(%rsp), %xmm0
- movq (%rsp), %rdi
- addq $24, %rsp
- movq 3920(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(VertexAttrib2f), .-GL_PREFIX(VertexAttrib2f)
-
- .p2align 4,,15
- .globl GL_PREFIX(VertexAttrib2fv)
- .type GL_PREFIX(VertexAttrib2fv), @function
-GL_PREFIX(VertexAttrib2fv):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3928(%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 3928(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3928(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 3928(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(VertexAttrib2fv), .-GL_PREFIX(VertexAttrib2fv)
-
- .p2align 4,,15
- .globl GL_PREFIX(VertexAttrib3f)
- .type GL_PREFIX(VertexAttrib3f), @function
-GL_PREFIX(VertexAttrib3f):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3936(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $40, %rsp
- movq %rdi, (%rsp)
- movq %xmm0, 8(%rsp)
- movq %xmm1, 16(%rsp)
- movq %xmm2, 24(%rsp)
- call _x86_64_get_dispatch@PLT
- movq 24(%rsp), %xmm2
- movq 16(%rsp), %xmm1
- movq 8(%rsp), %xmm0
- movq (%rsp), %rdi
- addq $40, %rsp
- movq 3936(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3936(%rax), %r11
- jmp *%r11
-1:
- subq $40, %rsp
- movq %rdi, (%rsp)
- movq %xmm0, 8(%rsp)
- movq %xmm1, 16(%rsp)
- movq %xmm2, 24(%rsp)
- call _glapi_get_dispatch
- movq 24(%rsp), %xmm2
- movq 16(%rsp), %xmm1
- movq 8(%rsp), %xmm0
- movq (%rsp), %rdi
- addq $40, %rsp
- movq 3936(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(VertexAttrib3f), .-GL_PREFIX(VertexAttrib3f)
-
- .p2align 4,,15
- .globl GL_PREFIX(VertexAttrib3fv)
- .type GL_PREFIX(VertexAttrib3fv), @function
-GL_PREFIX(VertexAttrib3fv):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3944(%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 3944(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3944(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 3944(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(VertexAttrib3fv), .-GL_PREFIX(VertexAttrib3fv)
-
- .p2align 4,,15
- .globl GL_PREFIX(VertexAttrib4f)
- .type GL_PREFIX(VertexAttrib4f), @function
-GL_PREFIX(VertexAttrib4f):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3952(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- subq $40, %rsp
- movq %rdi, (%rsp)
- movq %xmm0, 8(%rsp)
- movq %xmm1, 16(%rsp)
- movq %xmm2, 24(%rsp)
- movq %xmm3, 32(%rsp)
- call _x86_64_get_dispatch@PLT
- movq 32(%rsp), %xmm3
- movq 24(%rsp), %xmm2
- movq 16(%rsp), %xmm1
- movq 8(%rsp), %xmm0
- movq (%rsp), %rdi
- addq $40, %rsp
- movq 3952(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3952(%rax), %r11
- jmp *%r11
-1:
- subq $40, %rsp
- movq %rdi, (%rsp)
- movq %xmm0, 8(%rsp)
- movq %xmm1, 16(%rsp)
- movq %xmm2, 24(%rsp)
- movq %xmm3, 32(%rsp)
- call _glapi_get_dispatch
- movq 32(%rsp), %xmm3
- movq 24(%rsp), %xmm2
- movq 16(%rsp), %xmm1
- movq 8(%rsp), %xmm0
- movq (%rsp), %rdi
- addq $40, %rsp
- movq 3952(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(VertexAttrib4f), .-GL_PREFIX(VertexAttrib4f)
-
- .p2align 4,,15
- .globl GL_PREFIX(VertexAttrib4fv)
- .type GL_PREFIX(VertexAttrib4fv), @function
-GL_PREFIX(VertexAttrib4fv):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3960(%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 3960(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3960(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 3960(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(VertexAttrib4fv), .-GL_PREFIX(VertexAttrib4fv)
-
- .p2align 4,,15
- .globl GL_PREFIX(VertexAttribPointer)
- .type GL_PREFIX(VertexAttribPointer), @function
-GL_PREFIX(VertexAttribPointer):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3968(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %r8
- pushq %r9
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- popq %r9
- popq %r8
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 3968(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3968(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %r8
- pushq %r9
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %r9
- popq %r8
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 3968(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(VertexAttribPointer), .-GL_PREFIX(VertexAttribPointer)
-
- .p2align 4,,15
- .globl GL_PREFIX(BlendFuncSeparate)
- .type GL_PREFIX(BlendFuncSeparate), @function
-GL_PREFIX(BlendFuncSeparate):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3976(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 3976(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3976(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 3976(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(BlendFuncSeparate), .-GL_PREFIX(BlendFuncSeparate)
-
- .p2align 4,,15
- .globl GL_PREFIX(BindFramebuffer)
- .type GL_PREFIX(BindFramebuffer), @function
-GL_PREFIX(BindFramebuffer):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3984(%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 3984(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3984(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 3984(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(BindFramebuffer), .-GL_PREFIX(BindFramebuffer)
-
- .p2align 4,,15
- .globl GL_PREFIX(BindRenderbuffer)
- .type GL_PREFIX(BindRenderbuffer), @function
-GL_PREFIX(BindRenderbuffer):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 3992(%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 3992(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 3992(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 3992(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(BindRenderbuffer), .-GL_PREFIX(BindRenderbuffer)
-
- .p2align 4,,15
- .globl GL_PREFIX(CheckFramebufferStatus)
- .type GL_PREFIX(CheckFramebufferStatus), @function
-GL_PREFIX(CheckFramebufferStatus):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 4000(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 4000(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 4000(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 4000(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(CheckFramebufferStatus), .-GL_PREFIX(CheckFramebufferStatus)
-
- .p2align 4,,15
- .globl GL_PREFIX(ClearDepthf)
- .type GL_PREFIX(ClearDepthf), @function
-GL_PREFIX(ClearDepthf):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 4008(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 4008(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 4008(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 4008(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(ClearDepthf), .-GL_PREFIX(ClearDepthf)
-
- .p2align 4,,15
- .globl GL_PREFIX(DeleteFramebuffers)
- .type GL_PREFIX(DeleteFramebuffers), @function
-GL_PREFIX(DeleteFramebuffers):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 4016(%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 4016(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 4016(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 4016(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(DeleteFramebuffers), .-GL_PREFIX(DeleteFramebuffers)
-
- .p2align 4,,15
- .globl GL_PREFIX(DeleteRenderbuffers)
- .type GL_PREFIX(DeleteRenderbuffers), @function
-GL_PREFIX(DeleteRenderbuffers):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 4024(%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 4024(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 4024(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 4024(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(DeleteRenderbuffers), .-GL_PREFIX(DeleteRenderbuffers)
-
- .p2align 4,,15
- .globl GL_PREFIX(DepthRangef)
- .type GL_PREFIX(DepthRangef), @function
-GL_PREFIX(DepthRangef):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 4032(%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 4032(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 4032(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 4032(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(DepthRangef), .-GL_PREFIX(DepthRangef)
-
- .p2align 4,,15
- .globl GL_PREFIX(FramebufferRenderbuffer)
- .type GL_PREFIX(FramebufferRenderbuffer), @function
-GL_PREFIX(FramebufferRenderbuffer):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 4040(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 4040(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 4040(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 4040(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(FramebufferRenderbuffer), .-GL_PREFIX(FramebufferRenderbuffer)
-
- .p2align 4,,15
- .globl GL_PREFIX(FramebufferTexture2D)
- .type GL_PREFIX(FramebufferTexture2D), @function
-GL_PREFIX(FramebufferTexture2D):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 4048(%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 4048(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 4048(%rax), %r11
- 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 4048(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(FramebufferTexture2D), .-GL_PREFIX(FramebufferTexture2D)
-
- .p2align 4,,15
- .globl GL_PREFIX(GenFramebuffers)
- .type GL_PREFIX(GenFramebuffers), @function
-GL_PREFIX(GenFramebuffers):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 4056(%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 4056(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 4056(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 4056(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(GenFramebuffers), .-GL_PREFIX(GenFramebuffers)
-
- .p2align 4,,15
- .globl GL_PREFIX(GenRenderbuffers)
- .type GL_PREFIX(GenRenderbuffers), @function
-GL_PREFIX(GenRenderbuffers):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 4064(%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 4064(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 4064(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rsi
- popq %rdi
- movq 4064(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(GenRenderbuffers), .-GL_PREFIX(GenRenderbuffers)
-
- .p2align 4,,15
- .globl GL_PREFIX(GenerateMipmap)
- .type GL_PREFIX(GenerateMipmap), @function
-GL_PREFIX(GenerateMipmap):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 4072(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 4072(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 4072(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 4072(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(GenerateMipmap), .-GL_PREFIX(GenerateMipmap)
-
- .p2align 4,,15
- .globl GL_PREFIX(GetFramebufferAttachmentParameteriv)
- .type GL_PREFIX(GetFramebufferAttachmentParameteriv), @function
-GL_PREFIX(GetFramebufferAttachmentParameteriv):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 4080(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 4080(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 4080(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 4080(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(GetFramebufferAttachmentParameteriv), .-GL_PREFIX(GetFramebufferAttachmentParameteriv)
-
- .p2align 4,,15
- .globl GL_PREFIX(GetRenderbufferParameteriv)
- .type GL_PREFIX(GetRenderbufferParameteriv), @function
-GL_PREFIX(GetRenderbufferParameteriv):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 4088(%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 4088(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 4088(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- call _glapi_get_dispatch
- popq %rdx
- popq %rsi
- popq %rdi
- movq 4088(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(GetRenderbufferParameteriv), .-GL_PREFIX(GetRenderbufferParameteriv)
-
- .p2align 4,,15
- .globl GL_PREFIX(GetShaderPrecisionFormat)
- .type GL_PREFIX(GetShaderPrecisionFormat), @function
-GL_PREFIX(GetShaderPrecisionFormat):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 4096(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 4096(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 4096(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 4096(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(GetShaderPrecisionFormat), .-GL_PREFIX(GetShaderPrecisionFormat)
-
- .p2align 4,,15
- .globl GL_PREFIX(IsFramebuffer)
- .type GL_PREFIX(IsFramebuffer), @function
-GL_PREFIX(IsFramebuffer):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 4104(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 4104(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 4104(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 4104(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(IsFramebuffer), .-GL_PREFIX(IsFramebuffer)
-
- .p2align 4,,15
- .globl GL_PREFIX(IsRenderbuffer)
- .type GL_PREFIX(IsRenderbuffer), @function
-GL_PREFIX(IsRenderbuffer):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 4112(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- call _x86_64_get_dispatch@PLT
- popq %rdi
- movq 4112(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 4112(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- call _glapi_get_dispatch
- popq %rdi
- movq 4112(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(IsRenderbuffer), .-GL_PREFIX(IsRenderbuffer)
-
- .p2align 4,,15
- .globl GL_PREFIX(ReleaseShaderCompiler)
- .type GL_PREFIX(ReleaseShaderCompiler), @function
-GL_PREFIX(ReleaseShaderCompiler):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 4120(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- movq 4120(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 4120(%rax), %r11
- jmp *%r11
-1:
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- movq 4120(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(ReleaseShaderCompiler), .-GL_PREFIX(ReleaseShaderCompiler)
-
- .p2align 4,,15
- .globl GL_PREFIX(RenderbufferStorage)
- .type GL_PREFIX(RenderbufferStorage), @function
-GL_PREFIX(RenderbufferStorage):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 4128(%rax), %r11
- jmp *%r11
-#elif defined(PTHREADS)
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _x86_64_get_dispatch@PLT
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 4128(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 4128(%rax), %r11
- jmp *%r11
-1:
- pushq %rdi
- pushq %rsi
- pushq %rdx
- pushq %rcx
- pushq %rbp
- call _glapi_get_dispatch
- popq %rbp
- popq %rcx
- popq %rdx
- popq %rsi
- popq %rdi
- movq 4128(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(RenderbufferStorage), .-GL_PREFIX(RenderbufferStorage)
-
- .p2align 4,,15
- .globl GL_PREFIX(ShaderBinary)
- .type GL_PREFIX(ShaderBinary), @function
-GL_PREFIX(ShaderBinary):
-#if defined(GLX_USE_TLS)
- call _x86_64_get_dispatch@PLT
- movq 4136(%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 4136(%rax), %r11
- jmp *%r11
-#else
- movq _glapi_Dispatch(%rip), %rax
- testq %rax, %rax
- je 1f
- movq 4136(%rax), %r11
- 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 4136(%rax), %r11
- jmp *%r11
-#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(ShaderBinary), .-GL_PREFIX(ShaderBinary)
-
-
-#if defined(GLX_USE_TLS) && defined(__linux__)
- .section ".note.ABI-tag", "a"
- .p2align 2
- .long 1f - 0f /* name length */
- .long 3f - 2f /* data length */
- .long 1 /* note length */
-0: .asciz "GNU" /* vendor name */
-1: .p2align 2
-2: .long 0 /* note data: the ABI tag */
- .long 2,4,20 /* Minimum kernel version w/TLS */
-3: .p2align 2 /* pad out section */
-#endif /* GLX_USE_TLS */
-
-#if defined (__ELF__) && defined (__linux__)
- .section .note.GNU-stack,"",%progbits
-#endif
diff --git a/src/mapi/es2api/glapi/glapi_x86.S b/src/mapi/es2api/glapi/glapi_x86.S
deleted file mode 100644
index b377c137413..00000000000
--- a/src/mapi/es2api/glapi/glapi_x86.S
+++ /dev/null
@@ -1,1053 +0,0 @@
-/* DO NOT EDIT - This file generated automatically by gl_x86_asm.py (from Mesa) script */
-
-/*
- * Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
- * (C) Copyright IBM Corporation 2004, 2005
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sub license,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL, IBM,
- * AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
- * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-#include "x86/assyntax.h"
-
-#if defined(STDCALL_API)
-# if defined(USE_MGL_NAMESPACE)
-# define GL_PREFIX(n,n2) GLNAME(CONCAT(mgl,n2))
-# else
-# define GL_PREFIX(n,n2) GLNAME(CONCAT(gl,n2))
-# endif
-#else
-# if defined(USE_MGL_NAMESPACE)
-# define GL_PREFIX(n,n2) GLNAME(CONCAT(mgl,n))
-# define _glapi_Dispatch _mglapi_Dispatch
-# else
-# define GL_PREFIX(n,n2) GLNAME(CONCAT(gl,n))
-# endif
-#endif
-
-#define GL_OFFSET(x) CODEPTR(REGOFF(4 * x, EAX))
-
-#if defined(GNU_ASSEMBLER) && !defined(__DJGPP__) && !defined(__MINGW32__) && !defined(__APPLE__)
-#define GLOBL_FN(x) GLOBL x ; .type x, function
-#else
-#define GLOBL_FN(x) GLOBL x
-#endif
-
-#if defined(PTHREADS) || defined(WIN32) || defined(BEOS_THREADS)
-# define THREADS
-#endif
-
-#ifdef GLX_USE_TLS
-
-#ifdef GLX_X86_READONLY_TEXT
-# define CTX_INSNS MOV_L(GS:(EAX), EAX)
-#else
-# define CTX_INSNS NOP /* Pad for init_glapi_relocs() */
-#endif
-
-# define GL_STUB(fn,off,fn_alt) \
-ALIGNTEXT16; \
-GLOBL_FN(GL_PREFIX(fn, fn_alt)); \
-GL_PREFIX(fn, fn_alt): \
- CALL(_x86_get_dispatch) ; \
- CTX_INSNS ; \
- JMP(GL_OFFSET(off))
-
-#elif defined(PTHREADS)
-# define GL_STUB(fn,off,fn_alt) \
-ALIGNTEXT16; \
-GLOBL_FN(GL_PREFIX(fn, fn_alt)); \
-GL_PREFIX(fn, fn_alt): \
- MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) ; \
- TEST_L(EAX, EAX) ; \
- JE(1f) ; \
- JMP(GL_OFFSET(off)) ; \
-1: CALL(_x86_get_dispatch) ; \
- JMP(GL_OFFSET(off))
-#elif defined(THREADS)
-# define GL_STUB(fn,off,fn_alt) \
-ALIGNTEXT16; \
-GLOBL_FN(GL_PREFIX(fn, fn_alt)); \
-GL_PREFIX(fn, fn_alt): \
- MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) ; \
- TEST_L(EAX, EAX) ; \
- JE(1f) ; \
- JMP(GL_OFFSET(off)) ; \
-1: CALL(_glapi_get_dispatch) ; \
- JMP(GL_OFFSET(off))
-#else /* Non-threaded version. */
-# define GL_STUB(fn,off,fn_alt) \
-ALIGNTEXT16; \
-GLOBL_FN(GL_PREFIX(fn, fn_alt)); \
-GL_PREFIX(fn, fn_alt): \
- MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) ; \
- JMP(GL_OFFSET(off))
-#endif
-
-#ifdef HAVE_ALIAS
-# define GL_STUB_ALIAS(fn,off,fn_alt,alias,alias_alt) \
- .globl GL_PREFIX(fn, fn_alt) ; \
- .set GL_PREFIX(fn, fn_alt), GL_PREFIX(alias, alias_alt)
-#else
-# define GL_STUB_ALIAS(fn,off,fn_alt,alias,alias_alt) \
- GL_STUB(fn, off, fn_alt)
-#endif
-
-SEG_TEXT
-
-#ifdef GLX_USE_TLS
-
- GLOBL GLNAME(_x86_get_dispatch)
- HIDDEN(GLNAME(_x86_get_dispatch))
-ALIGNTEXT16
-GLNAME(_x86_get_dispatch):
- call 1f
-1: popl %eax
- addl $_GLOBAL_OFFSET_TABLE_+[.-1b], %eax
- movl _glapi_tls_Dispatch@GOTNTPOFF(%eax), %eax
- ret
-
-#elif defined(PTHREADS)
-EXTERN GLNAME(_glapi_Dispatch)
-EXTERN GLNAME(_gl_DispatchTSD)
-EXTERN GLNAME(pthread_getspecific)
-
-ALIGNTEXT16
-GLNAME(_x86_get_dispatch):
- SUB_L(CONST(24), ESP)
- PUSH_L(GLNAME(_gl_DispatchTSD))
- CALL(GLNAME(pthread_getspecific))
- ADD_L(CONST(28), ESP)
- RET
-#elif defined(THREADS)
-EXTERN GLNAME(_glapi_get_dispatch)
-#endif
-
-#if defined( GLX_USE_TLS ) && !defined( GLX_X86_READONLY_TEXT )
- .section wtext, "awx", @progbits
-#endif /* defined( GLX_USE_TLS ) */
-
- ALIGNTEXT16
- GLOBL GLNAME(gl_dispatch_functions_start)
- HIDDEN(GLNAME(gl_dispatch_functions_start))
-GLNAME(gl_dispatch_functions_start):
-
- GL_STUB(_dispatch_stub_0, 0, _dispatch_stub_0@8)
- HIDDEN(GL_PREFIX(_dispatch_stub_0, _dispatch_stub_0@8))
- GL_STUB(_dispatch_stub_1, 1, _dispatch_stub_1@0)
- HIDDEN(GL_PREFIX(_dispatch_stub_1, _dispatch_stub_1@0))
- GL_STUB(_dispatch_stub_2, 2, _dispatch_stub_2@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_2, _dispatch_stub_2@4))
- GL_STUB(_dispatch_stub_3, 3, _dispatch_stub_3@12)
- HIDDEN(GL_PREFIX(_dispatch_stub_3, _dispatch_stub_3@12))
- GL_STUB(_dispatch_stub_4, 4, _dispatch_stub_4@8)
- HIDDEN(GL_PREFIX(_dispatch_stub_4, _dispatch_stub_4@8))
- GL_STUB(_dispatch_stub_5, 5, _dispatch_stub_5@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_5, _dispatch_stub_5@4))
- GL_STUB(_dispatch_stub_6, 6, _dispatch_stub_6@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_6, _dispatch_stub_6@4))
- GL_STUB(_dispatch_stub_7, 7, _dispatch_stub_7@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_7, _dispatch_stub_7@4))
- GL_STUB(_dispatch_stub_8, 8, _dispatch_stub_8@28)
- HIDDEN(GL_PREFIX(_dispatch_stub_8, _dispatch_stub_8@28))
- GL_STUB(_dispatch_stub_9, 9, _dispatch_stub_9@12)
- HIDDEN(GL_PREFIX(_dispatch_stub_9, _dispatch_stub_9@12))
- GL_STUB(_dispatch_stub_10, 10, _dispatch_stub_10@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_10, _dispatch_stub_10@4))
- GL_STUB(_dispatch_stub_11, 11, _dispatch_stub_11@24)
- HIDDEN(GL_PREFIX(_dispatch_stub_11, _dispatch_stub_11@24))
- GL_STUB(_dispatch_stub_12, 12, _dispatch_stub_12@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_12, _dispatch_stub_12@4))
- GL_STUB(_dispatch_stub_13, 13, _dispatch_stub_13@12)
- HIDDEN(GL_PREFIX(_dispatch_stub_13, _dispatch_stub_13@12))
- GL_STUB(_dispatch_stub_14, 14, _dispatch_stub_14@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_14, _dispatch_stub_14@4))
- GL_STUB(_dispatch_stub_15, 15, _dispatch_stub_15@12)
- HIDDEN(GL_PREFIX(_dispatch_stub_15, _dispatch_stub_15@12))
- GL_STUB(_dispatch_stub_16, 16, _dispatch_stub_16@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_16, _dispatch_stub_16@4))
- GL_STUB(_dispatch_stub_17, 17, _dispatch_stub_17@12)
- HIDDEN(GL_PREFIX(_dispatch_stub_17, _dispatch_stub_17@12))
- GL_STUB(_dispatch_stub_18, 18, _dispatch_stub_18@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_18, _dispatch_stub_18@4))
- GL_STUB(_dispatch_stub_19, 19, _dispatch_stub_19@12)
- HIDDEN(GL_PREFIX(_dispatch_stub_19, _dispatch_stub_19@12))
- GL_STUB(_dispatch_stub_20, 20, _dispatch_stub_20@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_20, _dispatch_stub_20@4))
- GL_STUB(_dispatch_stub_21, 21, _dispatch_stub_21@12)
- HIDDEN(GL_PREFIX(_dispatch_stub_21, _dispatch_stub_21@12))
- GL_STUB(_dispatch_stub_22, 22, _dispatch_stub_22@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_22, _dispatch_stub_22@4))
- GL_STUB(_dispatch_stub_23, 23, _dispatch_stub_23@12)
- HIDDEN(GL_PREFIX(_dispatch_stub_23, _dispatch_stub_23@12))
- GL_STUB(_dispatch_stub_24, 24, _dispatch_stub_24@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_24, _dispatch_stub_24@4))
- GL_STUB(_dispatch_stub_25, 25, _dispatch_stub_25@16)
- HIDDEN(GL_PREFIX(_dispatch_stub_25, _dispatch_stub_25@16))
- GL_STUB(_dispatch_stub_26, 26, _dispatch_stub_26@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_26, _dispatch_stub_26@4))
- GL_STUB(_dispatch_stub_27, 27, _dispatch_stub_27@32)
- HIDDEN(GL_PREFIX(_dispatch_stub_27, _dispatch_stub_27@32))
- GL_STUB(_dispatch_stub_28, 28, _dispatch_stub_28@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_28, _dispatch_stub_28@4))
- GL_STUB(_dispatch_stub_29, 29, _dispatch_stub_29@16)
- HIDDEN(GL_PREFIX(_dispatch_stub_29, _dispatch_stub_29@16))
- GL_STUB(_dispatch_stub_30, 30, _dispatch_stub_30@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_30, _dispatch_stub_30@4))
- GL_STUB(_dispatch_stub_31, 31, _dispatch_stub_31@16)
- HIDDEN(GL_PREFIX(_dispatch_stub_31, _dispatch_stub_31@16))
- GL_STUB(_dispatch_stub_32, 32, _dispatch_stub_32@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_32, _dispatch_stub_32@4))
- GL_STUB(_dispatch_stub_33, 33, _dispatch_stub_33@16)
- HIDDEN(GL_PREFIX(_dispatch_stub_33, _dispatch_stub_33@16))
- GL_STUB(_dispatch_stub_34, 34, _dispatch_stub_34@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_34, _dispatch_stub_34@4))
- GL_STUB(_dispatch_stub_35, 35, _dispatch_stub_35@16)
- HIDDEN(GL_PREFIX(_dispatch_stub_35, _dispatch_stub_35@16))
- GL_STUB(_dispatch_stub_36, 36, _dispatch_stub_36@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_36, _dispatch_stub_36@4))
- GL_STUB(_dispatch_stub_37, 37, _dispatch_stub_37@16)
- HIDDEN(GL_PREFIX(_dispatch_stub_37, _dispatch_stub_37@16))
- GL_STUB(_dispatch_stub_38, 38, _dispatch_stub_38@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_38, _dispatch_stub_38@4))
- GL_STUB(_dispatch_stub_39, 39, _dispatch_stub_39@16)
- HIDDEN(GL_PREFIX(_dispatch_stub_39, _dispatch_stub_39@16))
- GL_STUB(_dispatch_stub_40, 40, _dispatch_stub_40@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_40, _dispatch_stub_40@4))
- GL_STUB(_dispatch_stub_41, 41, _dispatch_stub_41@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_41, _dispatch_stub_41@4))
- GL_STUB(_dispatch_stub_42, 42, _dispatch_stub_42@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_42, _dispatch_stub_42@4))
- GL_STUB(_dispatch_stub_43, 43, _dispatch_stub_43@0)
- HIDDEN(GL_PREFIX(_dispatch_stub_43, _dispatch_stub_43@0))
- GL_STUB(_dispatch_stub_44, 44, _dispatch_stub_44@8)
- HIDDEN(GL_PREFIX(_dispatch_stub_44, _dispatch_stub_44@8))
- GL_STUB(_dispatch_stub_45, 45, _dispatch_stub_45@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_45, _dispatch_stub_45@4))
- GL_STUB(_dispatch_stub_46, 46, _dispatch_stub_46@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_46, _dispatch_stub_46@4))
- GL_STUB(_dispatch_stub_47, 47, _dispatch_stub_47@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_47, _dispatch_stub_47@4))
- GL_STUB(_dispatch_stub_48, 48, _dispatch_stub_48@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_48, _dispatch_stub_48@4))
- GL_STUB(_dispatch_stub_49, 49, _dispatch_stub_49@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_49, _dispatch_stub_49@4))
- GL_STUB(_dispatch_stub_50, 50, _dispatch_stub_50@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_50, _dispatch_stub_50@4))
- GL_STUB(_dispatch_stub_51, 51, _dispatch_stub_51@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_51, _dispatch_stub_51@4))
- GL_STUB(_dispatch_stub_52, 52, _dispatch_stub_52@12)
- HIDDEN(GL_PREFIX(_dispatch_stub_52, _dispatch_stub_52@12))
- GL_STUB(_dispatch_stub_53, 53, _dispatch_stub_53@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_53, _dispatch_stub_53@4))
- GL_STUB(_dispatch_stub_54, 54, _dispatch_stub_54@24)
- HIDDEN(GL_PREFIX(_dispatch_stub_54, _dispatch_stub_54@24))
- GL_STUB(_dispatch_stub_55, 55, _dispatch_stub_55@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_55, _dispatch_stub_55@4))
- GL_STUB(_dispatch_stub_56, 56, _dispatch_stub_56@12)
- HIDDEN(GL_PREFIX(_dispatch_stub_56, _dispatch_stub_56@12))
- GL_STUB(_dispatch_stub_57, 57, _dispatch_stub_57@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_57, _dispatch_stub_57@4))
- GL_STUB(_dispatch_stub_58, 58, _dispatch_stub_58@12)
- HIDDEN(GL_PREFIX(_dispatch_stub_58, _dispatch_stub_58@12))
- GL_STUB(_dispatch_stub_59, 59, _dispatch_stub_59@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_59, _dispatch_stub_59@4))
- GL_STUB(_dispatch_stub_60, 60, _dispatch_stub_60@12)
- HIDDEN(GL_PREFIX(_dispatch_stub_60, _dispatch_stub_60@12))
- GL_STUB(_dispatch_stub_61, 61, _dispatch_stub_61@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_61, _dispatch_stub_61@4))
- GL_STUB(_dispatch_stub_62, 62, _dispatch_stub_62@16)
- HIDDEN(GL_PREFIX(_dispatch_stub_62, _dispatch_stub_62@16))
- GL_STUB(_dispatch_stub_63, 63, _dispatch_stub_63@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_63, _dispatch_stub_63@4))
- GL_STUB(_dispatch_stub_64, 64, _dispatch_stub_64@8)
- HIDDEN(GL_PREFIX(_dispatch_stub_64, _dispatch_stub_64@8))
- GL_STUB(_dispatch_stub_65, 65, _dispatch_stub_65@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_65, _dispatch_stub_65@4))
- GL_STUB(_dispatch_stub_66, 66, _dispatch_stub_66@8)
- HIDDEN(GL_PREFIX(_dispatch_stub_66, _dispatch_stub_66@8))
- GL_STUB(_dispatch_stub_67, 67, _dispatch_stub_67@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_67, _dispatch_stub_67@4))
- GL_STUB(_dispatch_stub_68, 68, _dispatch_stub_68@8)
- HIDDEN(GL_PREFIX(_dispatch_stub_68, _dispatch_stub_68@8))
- GL_STUB(_dispatch_stub_69, 69, _dispatch_stub_69@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_69, _dispatch_stub_69@4))
- GL_STUB(_dispatch_stub_70, 70, _dispatch_stub_70@24)
- HIDDEN(GL_PREFIX(_dispatch_stub_70, _dispatch_stub_70@24))
- GL_STUB(_dispatch_stub_71, 71, _dispatch_stub_71@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_71, _dispatch_stub_71@4))
- GL_STUB(_dispatch_stub_72, 72, _dispatch_stub_72@12)
- HIDDEN(GL_PREFIX(_dispatch_stub_72, _dispatch_stub_72@12))
- GL_STUB(_dispatch_stub_73, 73, _dispatch_stub_73@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_73, _dispatch_stub_73@4))
- GL_STUB(_dispatch_stub_74, 74, _dispatch_stub_74@12)
- HIDDEN(GL_PREFIX(_dispatch_stub_74, _dispatch_stub_74@12))
- GL_STUB(_dispatch_stub_75, 75, _dispatch_stub_75@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_75, _dispatch_stub_75@4))
- GL_STUB(_dispatch_stub_76, 76, _dispatch_stub_76@12)
- HIDDEN(GL_PREFIX(_dispatch_stub_76, _dispatch_stub_76@12))
- GL_STUB(_dispatch_stub_77, 77, _dispatch_stub_77@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_77, _dispatch_stub_77@4))
- GL_STUB(_dispatch_stub_78, 78, _dispatch_stub_78@32)
- HIDDEN(GL_PREFIX(_dispatch_stub_78, _dispatch_stub_78@32))
- GL_STUB(_dispatch_stub_79, 79, _dispatch_stub_79@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_79, _dispatch_stub_79@4))
- GL_STUB(_dispatch_stub_80, 80, _dispatch_stub_80@16)
- HIDDEN(GL_PREFIX(_dispatch_stub_80, _dispatch_stub_80@16))
- GL_STUB(_dispatch_stub_81, 81, _dispatch_stub_81@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_81, _dispatch_stub_81@4))
- GL_STUB(_dispatch_stub_82, 82, _dispatch_stub_82@16)
- HIDDEN(GL_PREFIX(_dispatch_stub_82, _dispatch_stub_82@16))
- GL_STUB(_dispatch_stub_83, 83, _dispatch_stub_83@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_83, _dispatch_stub_83@4))
- GL_STUB(_dispatch_stub_84, 84, _dispatch_stub_84@16)
- HIDDEN(GL_PREFIX(_dispatch_stub_84, _dispatch_stub_84@16))
- GL_STUB(_dispatch_stub_85, 85, _dispatch_stub_85@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_85, _dispatch_stub_85@4))
- GL_STUB(_dispatch_stub_86, 86, _dispatch_stub_86@32)
- HIDDEN(GL_PREFIX(_dispatch_stub_86, _dispatch_stub_86@32))
- GL_STUB(_dispatch_stub_87, 87, _dispatch_stub_87@8)
- HIDDEN(GL_PREFIX(_dispatch_stub_87, _dispatch_stub_87@8))
- GL_STUB(_dispatch_stub_88, 88, _dispatch_stub_88@16)
- HIDDEN(GL_PREFIX(_dispatch_stub_88, _dispatch_stub_88@16))
- GL_STUB(_dispatch_stub_89, 89, _dispatch_stub_89@8)
- HIDDEN(GL_PREFIX(_dispatch_stub_89, _dispatch_stub_89@8))
- GL_STUB(_dispatch_stub_90, 90, _dispatch_stub_90@16)
- HIDDEN(GL_PREFIX(_dispatch_stub_90, _dispatch_stub_90@16))
- GL_STUB(_dispatch_stub_91, 91, _dispatch_stub_91@8)
- HIDDEN(GL_PREFIX(_dispatch_stub_91, _dispatch_stub_91@8))
- GL_STUB(_dispatch_stub_92, 92, _dispatch_stub_92@16)
- HIDDEN(GL_PREFIX(_dispatch_stub_92, _dispatch_stub_92@16))
- GL_STUB(_dispatch_stub_93, 93, _dispatch_stub_93@8)
- HIDDEN(GL_PREFIX(_dispatch_stub_93, _dispatch_stub_93@8))
- GL_STUB(_dispatch_stub_94, 94, _dispatch_stub_94@8)
- HIDDEN(GL_PREFIX(_dispatch_stub_94, _dispatch_stub_94@8))
- GL_STUB(_dispatch_stub_95, 95, _dispatch_stub_95@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_95, _dispatch_stub_95@4))
- GL_STUB(_dispatch_stub_96, 96, _dispatch_stub_96@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_96, _dispatch_stub_96@4))
- GL_STUB(_dispatch_stub_97, 97, _dispatch_stub_97@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_97, _dispatch_stub_97@4))
- GL_STUB(_dispatch_stub_98, 98, _dispatch_stub_98@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_98, _dispatch_stub_98@4))
- GL_STUB(_dispatch_stub_99, 99, _dispatch_stub_99@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_99, _dispatch_stub_99@4))
- GL_STUB(_dispatch_stub_100, 100, _dispatch_stub_100@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_100, _dispatch_stub_100@4))
- GL_STUB(_dispatch_stub_101, 101, _dispatch_stub_101@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_101, _dispatch_stub_101@4))
- GL_STUB(_dispatch_stub_102, 102, _dispatch_stub_102@16)
- HIDDEN(GL_PREFIX(_dispatch_stub_102, _dispatch_stub_102@16))
- GL_STUB(_dispatch_stub_103, 103, _dispatch_stub_103@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_103, _dispatch_stub_103@4))
- GL_STUB(_dispatch_stub_104, 104, _dispatch_stub_104@8)
- HIDDEN(GL_PREFIX(_dispatch_stub_104, _dispatch_stub_104@8))
- GL_STUB(_dispatch_stub_105, 105, _dispatch_stub_105@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_105, _dispatch_stub_105@4))
- GL_STUB(_dispatch_stub_106, 106, _dispatch_stub_106@8)
- HIDDEN(GL_PREFIX(_dispatch_stub_106, _dispatch_stub_106@8))
- GL_STUB(_dispatch_stub_107, 107, _dispatch_stub_107@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_107, _dispatch_stub_107@4))
- GL_STUB(_dispatch_stub_108, 108, _dispatch_stub_108@8)
- HIDDEN(GL_PREFIX(_dispatch_stub_108, _dispatch_stub_108@8))
- GL_STUB(_dispatch_stub_109, 109, _dispatch_stub_109@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_109, _dispatch_stub_109@4))
- GL_STUB(_dispatch_stub_110, 110, _dispatch_stub_110@24)
- HIDDEN(GL_PREFIX(_dispatch_stub_110, _dispatch_stub_110@24))
- GL_STUB(_dispatch_stub_111, 111, _dispatch_stub_111@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_111, _dispatch_stub_111@4))
- GL_STUB(_dispatch_stub_112, 112, _dispatch_stub_112@12)
- HIDDEN(GL_PREFIX(_dispatch_stub_112, _dispatch_stub_112@12))
- GL_STUB(_dispatch_stub_113, 113, _dispatch_stub_113@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_113, _dispatch_stub_113@4))
- GL_STUB(_dispatch_stub_114, 114, _dispatch_stub_114@12)
- HIDDEN(GL_PREFIX(_dispatch_stub_114, _dispatch_stub_114@12))
- GL_STUB(_dispatch_stub_115, 115, _dispatch_stub_115@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_115, _dispatch_stub_115@4))
- GL_STUB(_dispatch_stub_116, 116, _dispatch_stub_116@12)
- HIDDEN(GL_PREFIX(_dispatch_stub_116, _dispatch_stub_116@12))
- GL_STUB(_dispatch_stub_117, 117, _dispatch_stub_117@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_117, _dispatch_stub_117@4))
- GL_STUB(_dispatch_stub_118, 118, _dispatch_stub_118@32)
- HIDDEN(GL_PREFIX(_dispatch_stub_118, _dispatch_stub_118@32))
- GL_STUB(_dispatch_stub_119, 119, _dispatch_stub_119@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_119, _dispatch_stub_119@4))
- GL_STUB(_dispatch_stub_120, 120, _dispatch_stub_120@16)
- HIDDEN(GL_PREFIX(_dispatch_stub_120, _dispatch_stub_120@16))
- GL_STUB(_dispatch_stub_121, 121, _dispatch_stub_121@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_121, _dispatch_stub_121@4))
- GL_STUB(_dispatch_stub_122, 122, _dispatch_stub_122@16)
- HIDDEN(GL_PREFIX(_dispatch_stub_122, _dispatch_stub_122@16))
- GL_STUB(_dispatch_stub_123, 123, _dispatch_stub_123@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_123, _dispatch_stub_123@4))
- GL_STUB(_dispatch_stub_124, 124, _dispatch_stub_124@16)
- HIDDEN(GL_PREFIX(_dispatch_stub_124, _dispatch_stub_124@16))
- GL_STUB(_dispatch_stub_125, 125, _dispatch_stub_125@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_125, _dispatch_stub_125@4))
- GL_STUB(_dispatch_stub_126, 126, _dispatch_stub_126@16)
- HIDDEN(GL_PREFIX(_dispatch_stub_126, _dispatch_stub_126@16))
- GL_STUB(_dispatch_stub_127, 127, _dispatch_stub_127@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_127, _dispatch_stub_127@4))
- GL_STUB(_dispatch_stub_128, 128, _dispatch_stub_128@8)
- HIDDEN(GL_PREFIX(_dispatch_stub_128, _dispatch_stub_128@8))
- GL_STUB(_dispatch_stub_129, 129, _dispatch_stub_129@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_129, _dispatch_stub_129@4))
- GL_STUB(_dispatch_stub_130, 130, _dispatch_stub_130@8)
- HIDDEN(GL_PREFIX(_dispatch_stub_130, _dispatch_stub_130@8))
- GL_STUB(_dispatch_stub_131, 131, _dispatch_stub_131@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_131, _dispatch_stub_131@4))
- GL_STUB(_dispatch_stub_132, 132, _dispatch_stub_132@8)
- HIDDEN(GL_PREFIX(_dispatch_stub_132, _dispatch_stub_132@8))
- GL_STUB(_dispatch_stub_133, 133, _dispatch_stub_133@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_133, _dispatch_stub_133@4))
- GL_STUB(_dispatch_stub_134, 134, _dispatch_stub_134@24)
- HIDDEN(GL_PREFIX(_dispatch_stub_134, _dispatch_stub_134@24))
- GL_STUB(_dispatch_stub_135, 135, _dispatch_stub_135@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_135, _dispatch_stub_135@4))
- GL_STUB(_dispatch_stub_136, 136, _dispatch_stub_136@12)
- HIDDEN(GL_PREFIX(_dispatch_stub_136, _dispatch_stub_136@12))
- GL_STUB(_dispatch_stub_137, 137, _dispatch_stub_137@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_137, _dispatch_stub_137@4))
- GL_STUB(_dispatch_stub_138, 138, _dispatch_stub_138@12)
- HIDDEN(GL_PREFIX(_dispatch_stub_138, _dispatch_stub_138@12))
- GL_STUB(_dispatch_stub_139, 139, _dispatch_stub_139@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_139, _dispatch_stub_139@4))
- GL_STUB(_dispatch_stub_140, 140, _dispatch_stub_140@12)
- HIDDEN(GL_PREFIX(_dispatch_stub_140, _dispatch_stub_140@12))
- GL_STUB(_dispatch_stub_141, 141, _dispatch_stub_141@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_141, _dispatch_stub_141@4))
- GL_STUB(_dispatch_stub_142, 142, _dispatch_stub_142@32)
- HIDDEN(GL_PREFIX(_dispatch_stub_142, _dispatch_stub_142@32))
- GL_STUB(_dispatch_stub_143, 143, _dispatch_stub_143@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_143, _dispatch_stub_143@4))
- GL_STUB(_dispatch_stub_144, 144, _dispatch_stub_144@16)
- HIDDEN(GL_PREFIX(_dispatch_stub_144, _dispatch_stub_144@16))
- GL_STUB(_dispatch_stub_145, 145, _dispatch_stub_145@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_145, _dispatch_stub_145@4))
- GL_STUB(_dispatch_stub_146, 146, _dispatch_stub_146@16)
- HIDDEN(GL_PREFIX(_dispatch_stub_146, _dispatch_stub_146@16))
- GL_STUB(_dispatch_stub_147, 147, _dispatch_stub_147@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_147, _dispatch_stub_147@4))
- GL_STUB(_dispatch_stub_148, 148, _dispatch_stub_148@16)
- HIDDEN(GL_PREFIX(_dispatch_stub_148, _dispatch_stub_148@16))
- GL_STUB(_dispatch_stub_149, 149, _dispatch_stub_149@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_149, _dispatch_stub_149@4))
- GL_STUB(_dispatch_stub_150, 150, _dispatch_stub_150@8)
- HIDDEN(GL_PREFIX(_dispatch_stub_150, _dispatch_stub_150@8))
- GL_STUB(_dispatch_stub_151, 151, _dispatch_stub_151@8)
- HIDDEN(GL_PREFIX(_dispatch_stub_151, _dispatch_stub_151@8))
- GL_STUB(CullFace, 152, CullFace@4)
- GL_STUB(_dispatch_stub_153, 153, _dispatch_stub_153@8)
- HIDDEN(GL_PREFIX(_dispatch_stub_153, _dispatch_stub_153@8))
- GL_STUB(_dispatch_stub_154, 154, _dispatch_stub_154@8)
- HIDDEN(GL_PREFIX(_dispatch_stub_154, _dispatch_stub_154@8))
- GL_STUB(_dispatch_stub_155, 155, _dispatch_stub_155@8)
- HIDDEN(GL_PREFIX(_dispatch_stub_155, _dispatch_stub_155@8))
- GL_STUB(_dispatch_stub_156, 156, _dispatch_stub_156@8)
- HIDDEN(GL_PREFIX(_dispatch_stub_156, _dispatch_stub_156@8))
- GL_STUB(FrontFace, 157, FrontFace@4)
- GL_STUB(Hint, 158, Hint@8)
- GL_STUB(_dispatch_stub_159, 159, _dispatch_stub_159@12)
- HIDDEN(GL_PREFIX(_dispatch_stub_159, _dispatch_stub_159@12))
- GL_STUB(_dispatch_stub_160, 160, _dispatch_stub_160@12)
- HIDDEN(GL_PREFIX(_dispatch_stub_160, _dispatch_stub_160@12))
- GL_STUB(_dispatch_stub_161, 161, _dispatch_stub_161@12)
- HIDDEN(GL_PREFIX(_dispatch_stub_161, _dispatch_stub_161@12))
- GL_STUB(_dispatch_stub_162, 162, _dispatch_stub_162@12)
- HIDDEN(GL_PREFIX(_dispatch_stub_162, _dispatch_stub_162@12))
- GL_STUB(_dispatch_stub_163, 163, _dispatch_stub_163@8)
- HIDDEN(GL_PREFIX(_dispatch_stub_163, _dispatch_stub_163@8))
- GL_STUB(_dispatch_stub_164, 164, _dispatch_stub_164@8)
- HIDDEN(GL_PREFIX(_dispatch_stub_164, _dispatch_stub_164@8))
- GL_STUB(_dispatch_stub_165, 165, _dispatch_stub_165@8)
- HIDDEN(GL_PREFIX(_dispatch_stub_165, _dispatch_stub_165@8))
- GL_STUB(_dispatch_stub_166, 166, _dispatch_stub_166@8)
- HIDDEN(GL_PREFIX(_dispatch_stub_166, _dispatch_stub_166@8))
- GL_STUB(_dispatch_stub_167, 167, _dispatch_stub_167@8)
- HIDDEN(GL_PREFIX(_dispatch_stub_167, _dispatch_stub_167@8))
- GL_STUB(LineWidth, 168, LineWidth@4)
- GL_STUB(_dispatch_stub_169, 169, _dispatch_stub_169@12)
- HIDDEN(GL_PREFIX(_dispatch_stub_169, _dispatch_stub_169@12))
- GL_STUB(_dispatch_stub_170, 170, _dispatch_stub_170@12)
- HIDDEN(GL_PREFIX(_dispatch_stub_170, _dispatch_stub_170@12))
- GL_STUB(_dispatch_stub_171, 171, _dispatch_stub_171@12)
- HIDDEN(GL_PREFIX(_dispatch_stub_171, _dispatch_stub_171@12))
- GL_STUB(_dispatch_stub_172, 172, _dispatch_stub_172@12)
- HIDDEN(GL_PREFIX(_dispatch_stub_172, _dispatch_stub_172@12))
- GL_STUB(_dispatch_stub_173, 173, _dispatch_stub_173@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_173, _dispatch_stub_173@4))
- GL_STUB(_dispatch_stub_174, 174, _dispatch_stub_174@8)
- HIDDEN(GL_PREFIX(_dispatch_stub_174, _dispatch_stub_174@8))
- GL_STUB(_dispatch_stub_175, 175, _dispatch_stub_175@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_175, _dispatch_stub_175@4))
- GL_STUB(Scissor, 176, Scissor@16)
- GL_STUB(_dispatch_stub_177, 177, _dispatch_stub_177@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_177, _dispatch_stub_177@4))
- GL_STUB(TexParameterf, 178, TexParameterf@12)
- GL_STUB(TexParameterfv, 179, TexParameterfv@12)
- GL_STUB(TexParameteri, 180, TexParameteri@12)
- GL_STUB(TexParameteriv, 181, TexParameteriv@12)
- GL_STUB(_dispatch_stub_182, 182, _dispatch_stub_182@32)
- HIDDEN(GL_PREFIX(_dispatch_stub_182, _dispatch_stub_182@32))
- GL_STUB(TexImage2D, 183, TexImage2D@36)
- GL_STUB(_dispatch_stub_184, 184, _dispatch_stub_184@12)
- HIDDEN(GL_PREFIX(_dispatch_stub_184, _dispatch_stub_184@12))
- GL_STUB(_dispatch_stub_185, 185, _dispatch_stub_185@12)
- HIDDEN(GL_PREFIX(_dispatch_stub_185, _dispatch_stub_185@12))
- GL_STUB(_dispatch_stub_186, 186, _dispatch_stub_186@12)
- HIDDEN(GL_PREFIX(_dispatch_stub_186, _dispatch_stub_186@12))
- GL_STUB(_dispatch_stub_187, 187, _dispatch_stub_187@12)
- HIDDEN(GL_PREFIX(_dispatch_stub_187, _dispatch_stub_187@12))
- GL_STUB(_dispatch_stub_188, 188, _dispatch_stub_188@16)
- HIDDEN(GL_PREFIX(_dispatch_stub_188, _dispatch_stub_188@16))
- GL_STUB(_dispatch_stub_189, 189, _dispatch_stub_189@12)
- HIDDEN(GL_PREFIX(_dispatch_stub_189, _dispatch_stub_189@12))
- GL_STUB(_dispatch_stub_190, 190, _dispatch_stub_190@12)
- HIDDEN(GL_PREFIX(_dispatch_stub_190, _dispatch_stub_190@12))
- GL_STUB(_dispatch_stub_191, 191, _dispatch_stub_191@12)
- HIDDEN(GL_PREFIX(_dispatch_stub_191, _dispatch_stub_191@12))
- GL_STUB(_dispatch_stub_192, 192, _dispatch_stub_192@12)
- HIDDEN(GL_PREFIX(_dispatch_stub_192, _dispatch_stub_192@12))
- GL_STUB(_dispatch_stub_193, 193, _dispatch_stub_193@12)
- HIDDEN(GL_PREFIX(_dispatch_stub_193, _dispatch_stub_193@12))
- GL_STUB(_dispatch_stub_194, 194, _dispatch_stub_194@12)
- HIDDEN(GL_PREFIX(_dispatch_stub_194, _dispatch_stub_194@12))
- GL_STUB(_dispatch_stub_195, 195, _dispatch_stub_195@8)
- HIDDEN(GL_PREFIX(_dispatch_stub_195, _dispatch_stub_195@8))
- GL_STUB(_dispatch_stub_196, 196, _dispatch_stub_196@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_196, _dispatch_stub_196@4))
- GL_STUB(_dispatch_stub_197, 197, _dispatch_stub_197@0)
- HIDDEN(GL_PREFIX(_dispatch_stub_197, _dispatch_stub_197@0))
- GL_STUB(_dispatch_stub_198, 198, _dispatch_stub_198@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_198, _dispatch_stub_198@4))
- GL_STUB(_dispatch_stub_199, 199, _dispatch_stub_199@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_199, _dispatch_stub_199@4))
- GL_STUB(_dispatch_stub_200, 200, _dispatch_stub_200@0)
- HIDDEN(GL_PREFIX(_dispatch_stub_200, _dispatch_stub_200@0))
- GL_STUB(_dispatch_stub_201, 201, _dispatch_stub_201@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_201, _dispatch_stub_201@4))
- GL_STUB(_dispatch_stub_202, 202, _dispatch_stub_202@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_202, _dispatch_stub_202@4))
- GL_STUB(Clear, 203, Clear@4)
- GL_STUB(_dispatch_stub_204, 204, _dispatch_stub_204@16)
- HIDDEN(GL_PREFIX(_dispatch_stub_204, _dispatch_stub_204@16))
- GL_STUB(_dispatch_stub_205, 205, _dispatch_stub_205@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_205, _dispatch_stub_205@4))
- GL_STUB(ClearColor, 206, ClearColor@16)
- GL_STUB(ClearStencil, 207, ClearStencil@4)
- GL_STUB(_dispatch_stub_208, 208, _dispatch_stub_208@8)
- HIDDEN(GL_PREFIX(_dispatch_stub_208, _dispatch_stub_208@8))
- GL_STUB(StencilMask, 209, StencilMask@4)
- GL_STUB(ColorMask, 210, ColorMask@16)
- GL_STUB(DepthMask, 211, DepthMask@4)
- GL_STUB(_dispatch_stub_212, 212, _dispatch_stub_212@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_212, _dispatch_stub_212@4))
- GL_STUB(_dispatch_stub_213, 213, _dispatch_stub_213@8)
- HIDDEN(GL_PREFIX(_dispatch_stub_213, _dispatch_stub_213@8))
- GL_STUB(Disable, 214, Disable@4)
- GL_STUB(Enable, 215, Enable@4)
- GL_STUB(Finish, 216, Finish@0)
- GL_STUB(Flush, 217, Flush@0)
- GL_STUB(_dispatch_stub_218, 218, _dispatch_stub_218@0)
- HIDDEN(GL_PREFIX(_dispatch_stub_218, _dispatch_stub_218@0))
- GL_STUB(_dispatch_stub_219, 219, _dispatch_stub_219@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_219, _dispatch_stub_219@4))
- GL_STUB(_dispatch_stub_220, 220, _dispatch_stub_220@32)
- HIDDEN(GL_PREFIX(_dispatch_stub_220, _dispatch_stub_220@32))
- GL_STUB(_dispatch_stub_221, 221, _dispatch_stub_221@24)
- HIDDEN(GL_PREFIX(_dispatch_stub_221, _dispatch_stub_221@24))
- GL_STUB(_dispatch_stub_222, 222, _dispatch_stub_222@56)
- HIDDEN(GL_PREFIX(_dispatch_stub_222, _dispatch_stub_222@56))
- GL_STUB(_dispatch_stub_223, 223, _dispatch_stub_223@40)
- HIDDEN(GL_PREFIX(_dispatch_stub_223, _dispatch_stub_223@40))
- GL_STUB(_dispatch_stub_224, 224, _dispatch_stub_224@20)
- HIDDEN(GL_PREFIX(_dispatch_stub_224, _dispatch_stub_224@20))
- GL_STUB(_dispatch_stub_225, 225, _dispatch_stub_225@12)
- HIDDEN(GL_PREFIX(_dispatch_stub_225, _dispatch_stub_225@12))
- GL_STUB(_dispatch_stub_226, 226, _dispatch_stub_226@40)
- HIDDEN(GL_PREFIX(_dispatch_stub_226, _dispatch_stub_226@40))
- GL_STUB(_dispatch_stub_227, 227, _dispatch_stub_227@24)
- HIDDEN(GL_PREFIX(_dispatch_stub_227, _dispatch_stub_227@24))
- GL_STUB(_dispatch_stub_228, 228, _dispatch_stub_228@8)
- HIDDEN(GL_PREFIX(_dispatch_stub_228, _dispatch_stub_228@8))
- GL_STUB(_dispatch_stub_229, 229, _dispatch_stub_229@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_229, _dispatch_stub_229@4))
- GL_STUB(_dispatch_stub_230, 230, _dispatch_stub_230@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_230, _dispatch_stub_230@4))
- GL_STUB(_dispatch_stub_231, 231, _dispatch_stub_231@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_231, _dispatch_stub_231@4))
- GL_STUB(_dispatch_stub_232, 232, _dispatch_stub_232@16)
- HIDDEN(GL_PREFIX(_dispatch_stub_232, _dispatch_stub_232@16))
- GL_STUB(_dispatch_stub_233, 233, _dispatch_stub_233@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_233, _dispatch_stub_233@4))
- GL_STUB(_dispatch_stub_234, 234, _dispatch_stub_234@8)
- HIDDEN(GL_PREFIX(_dispatch_stub_234, _dispatch_stub_234@8))
- GL_STUB(_dispatch_stub_235, 235, _dispatch_stub_235@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_235, _dispatch_stub_235@4))
- GL_STUB(_dispatch_stub_236, 236, _dispatch_stub_236@12)
- HIDDEN(GL_PREFIX(_dispatch_stub_236, _dispatch_stub_236@12))
- GL_STUB(_dispatch_stub_237, 237, _dispatch_stub_237@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_237, _dispatch_stub_237@4))
- GL_STUB(_dispatch_stub_238, 238, _dispatch_stub_238@20)
- HIDDEN(GL_PREFIX(_dispatch_stub_238, _dispatch_stub_238@20))
- GL_STUB(_dispatch_stub_239, 239, _dispatch_stub_239@8)
- HIDDEN(GL_PREFIX(_dispatch_stub_239, _dispatch_stub_239@8))
- GL_STUB(_dispatch_stub_240, 240, _dispatch_stub_240@8)
- HIDDEN(GL_PREFIX(_dispatch_stub_240, _dispatch_stub_240@8))
- GL_STUB(BlendFunc, 241, BlendFunc@8)
- GL_STUB(_dispatch_stub_242, 242, _dispatch_stub_242@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_242, _dispatch_stub_242@4))
- GL_STUB(StencilFunc, 243, StencilFunc@12)
- GL_STUB(StencilOp, 244, StencilOp@12)
- GL_STUB(DepthFunc, 245, DepthFunc@4)
- GL_STUB(_dispatch_stub_246, 246, _dispatch_stub_246@8)
- HIDDEN(GL_PREFIX(_dispatch_stub_246, _dispatch_stub_246@8))
- GL_STUB(_dispatch_stub_247, 247, _dispatch_stub_247@8)
- HIDDEN(GL_PREFIX(_dispatch_stub_247, _dispatch_stub_247@8))
- GL_STUB(_dispatch_stub_248, 248, _dispatch_stub_248@8)
- HIDDEN(GL_PREFIX(_dispatch_stub_248, _dispatch_stub_248@8))
- GL_STUB(_dispatch_stub_249, 249, _dispatch_stub_249@8)
- HIDDEN(GL_PREFIX(_dispatch_stub_249, _dispatch_stub_249@8))
- GL_STUB(PixelStorei, 250, PixelStorei@8)
- GL_STUB(_dispatch_stub_251, 251, _dispatch_stub_251@12)
- HIDDEN(GL_PREFIX(_dispatch_stub_251, _dispatch_stub_251@12))
- GL_STUB(_dispatch_stub_252, 252, _dispatch_stub_252@12)
- HIDDEN(GL_PREFIX(_dispatch_stub_252, _dispatch_stub_252@12))
- GL_STUB(_dispatch_stub_253, 253, _dispatch_stub_253@12)
- HIDDEN(GL_PREFIX(_dispatch_stub_253, _dispatch_stub_253@12))
- GL_STUB(_dispatch_stub_254, 254, _dispatch_stub_254@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_254, _dispatch_stub_254@4))
- GL_STUB(_dispatch_stub_255, 255, _dispatch_stub_255@20)
- HIDDEN(GL_PREFIX(_dispatch_stub_255, _dispatch_stub_255@20))
- GL_STUB(ReadPixels, 256, ReadPixels@28)
- GL_STUB(_dispatch_stub_257, 257, _dispatch_stub_257@20)
- HIDDEN(GL_PREFIX(_dispatch_stub_257, _dispatch_stub_257@20))
- GL_STUB(GetBooleanv, 258, GetBooleanv@8)
- GL_STUB(_dispatch_stub_259, 259, _dispatch_stub_259@8)
- HIDDEN(GL_PREFIX(_dispatch_stub_259, _dispatch_stub_259@8))
- GL_STUB(_dispatch_stub_260, 260, _dispatch_stub_260@8)
- HIDDEN(GL_PREFIX(_dispatch_stub_260, _dispatch_stub_260@8))
- GL_STUB(GetError, 261, GetError@0)
- GL_STUB(GetFloatv, 262, GetFloatv@8)
- GL_STUB(GetIntegerv, 263, GetIntegerv@8)
- GL_STUB(_dispatch_stub_264, 264, _dispatch_stub_264@12)
- HIDDEN(GL_PREFIX(_dispatch_stub_264, _dispatch_stub_264@12))
- GL_STUB(_dispatch_stub_265, 265, _dispatch_stub_265@12)
- HIDDEN(GL_PREFIX(_dispatch_stub_265, _dispatch_stub_265@12))
- GL_STUB(_dispatch_stub_266, 266, _dispatch_stub_266@12)
- HIDDEN(GL_PREFIX(_dispatch_stub_266, _dispatch_stub_266@12))
- GL_STUB(_dispatch_stub_267, 267, _dispatch_stub_267@12)
- HIDDEN(GL_PREFIX(_dispatch_stub_267, _dispatch_stub_267@12))
- GL_STUB(_dispatch_stub_268, 268, _dispatch_stub_268@12)
- HIDDEN(GL_PREFIX(_dispatch_stub_268, _dispatch_stub_268@12))
- GL_STUB(_dispatch_stub_269, 269, _dispatch_stub_269@12)
- HIDDEN(GL_PREFIX(_dispatch_stub_269, _dispatch_stub_269@12))
- GL_STUB(_dispatch_stub_270, 270, _dispatch_stub_270@12)
- HIDDEN(GL_PREFIX(_dispatch_stub_270, _dispatch_stub_270@12))
- GL_STUB(_dispatch_stub_271, 271, _dispatch_stub_271@8)
- HIDDEN(GL_PREFIX(_dispatch_stub_271, _dispatch_stub_271@8))
- GL_STUB(_dispatch_stub_272, 272, _dispatch_stub_272@8)
- HIDDEN(GL_PREFIX(_dispatch_stub_272, _dispatch_stub_272@8))
- GL_STUB(_dispatch_stub_273, 273, _dispatch_stub_273@8)
- HIDDEN(GL_PREFIX(_dispatch_stub_273, _dispatch_stub_273@8))
- GL_STUB(_dispatch_stub_274, 274, _dispatch_stub_274@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_274, _dispatch_stub_274@4))
- GL_STUB(GetString, 275, GetString@4)
- GL_STUB(_dispatch_stub_276, 276, _dispatch_stub_276@12)
- HIDDEN(GL_PREFIX(_dispatch_stub_276, _dispatch_stub_276@12))
- GL_STUB(_dispatch_stub_277, 277, _dispatch_stub_277@12)
- HIDDEN(GL_PREFIX(_dispatch_stub_277, _dispatch_stub_277@12))
- GL_STUB(_dispatch_stub_278, 278, _dispatch_stub_278@12)
- HIDDEN(GL_PREFIX(_dispatch_stub_278, _dispatch_stub_278@12))
- GL_STUB(_dispatch_stub_279, 279, _dispatch_stub_279@12)
- HIDDEN(GL_PREFIX(_dispatch_stub_279, _dispatch_stub_279@12))
- GL_STUB(_dispatch_stub_280, 280, _dispatch_stub_280@12)
- HIDDEN(GL_PREFIX(_dispatch_stub_280, _dispatch_stub_280@12))
- GL_STUB(_dispatch_stub_281, 281, _dispatch_stub_281@20)
- HIDDEN(GL_PREFIX(_dispatch_stub_281, _dispatch_stub_281@20))
- GL_STUB(GetTexParameterfv, 282, GetTexParameterfv@12)
- GL_STUB(GetTexParameteriv, 283, GetTexParameteriv@12)
- GL_STUB(_dispatch_stub_284, 284, _dispatch_stub_284@16)
- HIDDEN(GL_PREFIX(_dispatch_stub_284, _dispatch_stub_284@16))
- GL_STUB(_dispatch_stub_285, 285, _dispatch_stub_285@16)
- HIDDEN(GL_PREFIX(_dispatch_stub_285, _dispatch_stub_285@16))
- GL_STUB(IsEnabled, 286, IsEnabled@4)
- GL_STUB(_dispatch_stub_287, 287, _dispatch_stub_287@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_287, _dispatch_stub_287@4))
- GL_STUB(_dispatch_stub_288, 288, _dispatch_stub_288@16)
- HIDDEN(GL_PREFIX(_dispatch_stub_288, _dispatch_stub_288@16))
- GL_STUB(_dispatch_stub_289, 289, _dispatch_stub_289@48)
- HIDDEN(GL_PREFIX(_dispatch_stub_289, _dispatch_stub_289@48))
- GL_STUB(_dispatch_stub_290, 290, _dispatch_stub_290@0)
- HIDDEN(GL_PREFIX(_dispatch_stub_290, _dispatch_stub_290@0))
- GL_STUB(_dispatch_stub_291, 291, _dispatch_stub_291@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_291, _dispatch_stub_291@4))
- GL_STUB(_dispatch_stub_292, 292, _dispatch_stub_292@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_292, _dispatch_stub_292@4))
- GL_STUB(_dispatch_stub_293, 293, _dispatch_stub_293@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_293, _dispatch_stub_293@4))
- GL_STUB(_dispatch_stub_294, 294, _dispatch_stub_294@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_294, _dispatch_stub_294@4))
- GL_STUB(_dispatch_stub_295, 295, _dispatch_stub_295@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_295, _dispatch_stub_295@4))
- GL_STUB(_dispatch_stub_296, 296, _dispatch_stub_296@48)
- HIDDEN(GL_PREFIX(_dispatch_stub_296, _dispatch_stub_296@48))
- GL_STUB(_dispatch_stub_297, 297, _dispatch_stub_297@0)
- HIDDEN(GL_PREFIX(_dispatch_stub_297, _dispatch_stub_297@0))
- GL_STUB(_dispatch_stub_298, 298, _dispatch_stub_298@0)
- HIDDEN(GL_PREFIX(_dispatch_stub_298, _dispatch_stub_298@0))
- GL_STUB(_dispatch_stub_299, 299, _dispatch_stub_299@32)
- HIDDEN(GL_PREFIX(_dispatch_stub_299, _dispatch_stub_299@32))
- GL_STUB(_dispatch_stub_300, 300, _dispatch_stub_300@16)
- HIDDEN(GL_PREFIX(_dispatch_stub_300, _dispatch_stub_300@16))
- GL_STUB(_dispatch_stub_301, 301, _dispatch_stub_301@24)
- HIDDEN(GL_PREFIX(_dispatch_stub_301, _dispatch_stub_301@24))
- GL_STUB(_dispatch_stub_302, 302, _dispatch_stub_302@12)
- HIDDEN(GL_PREFIX(_dispatch_stub_302, _dispatch_stub_302@12))
- GL_STUB(_dispatch_stub_303, 303, _dispatch_stub_303@24)
- HIDDEN(GL_PREFIX(_dispatch_stub_303, _dispatch_stub_303@24))
- GL_STUB(_dispatch_stub_304, 304, _dispatch_stub_304@12)
- HIDDEN(GL_PREFIX(_dispatch_stub_304, _dispatch_stub_304@12))
- GL_STUB(Viewport, 305, Viewport@16)
- GL_STUB(_dispatch_stub_306, 306, _dispatch_stub_306@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_306, _dispatch_stub_306@4))
- GL_STUB(BindTexture, 307, BindTexture@8)
- GL_STUB(_dispatch_stub_308, 308, _dispatch_stub_308@16)
- HIDDEN(GL_PREFIX(_dispatch_stub_308, _dispatch_stub_308@16))
- GL_STUB(_dispatch_stub_309, 309, _dispatch_stub_309@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_309, _dispatch_stub_309@4))
- GL_STUB(DrawArrays, 310, DrawArrays@12)
- GL_STUB(DrawElements, 311, DrawElements@16)
- GL_STUB(_dispatch_stub_312, 312, _dispatch_stub_312@8)
- HIDDEN(GL_PREFIX(_dispatch_stub_312, _dispatch_stub_312@8))
- GL_STUB(_dispatch_stub_313, 313, _dispatch_stub_313@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_313, _dispatch_stub_313@4))
- GL_STUB(_dispatch_stub_314, 314, _dispatch_stub_314@12)
- HIDDEN(GL_PREFIX(_dispatch_stub_314, _dispatch_stub_314@12))
- GL_STUB(_dispatch_stub_315, 315, _dispatch_stub_315@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_315, _dispatch_stub_315@4))
- GL_STUB(_dispatch_stub_316, 316, _dispatch_stub_316@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_316, _dispatch_stub_316@4))
- GL_STUB(_dispatch_stub_317, 317, _dispatch_stub_317@12)
- HIDDEN(GL_PREFIX(_dispatch_stub_317, _dispatch_stub_317@12))
- GL_STUB(_dispatch_stub_318, 318, _dispatch_stub_318@12)
- HIDDEN(GL_PREFIX(_dispatch_stub_318, _dispatch_stub_318@12))
- GL_STUB(PolygonOffset, 319, PolygonOffset@8)
- GL_STUB(_dispatch_stub_320, 320, _dispatch_stub_320@16)
- HIDDEN(GL_PREFIX(_dispatch_stub_320, _dispatch_stub_320@16))
- GL_STUB(_dispatch_stub_321, 321, _dispatch_stub_321@16)
- HIDDEN(GL_PREFIX(_dispatch_stub_321, _dispatch_stub_321@16))
- GL_STUB(_dispatch_stub_322, 322, _dispatch_stub_322@12)
- HIDDEN(GL_PREFIX(_dispatch_stub_322, _dispatch_stub_322@12))
- GL_STUB(_dispatch_stub_323, 323, _dispatch_stub_323@28)
- HIDDEN(GL_PREFIX(_dispatch_stub_323, _dispatch_stub_323@28))
- GL_STUB(CopyTexImage2D, 324, CopyTexImage2D@32)
- GL_STUB(_dispatch_stub_325, 325, _dispatch_stub_325@24)
- HIDDEN(GL_PREFIX(_dispatch_stub_325, _dispatch_stub_325@24))
- GL_STUB(CopyTexSubImage2D, 326, CopyTexSubImage2D@32)
- GL_STUB(DeleteTextures, 327, DeleteTextures@8)
- GL_STUB(GenTextures, 328, GenTextures@8)
- GL_STUB(_dispatch_stub_329, 329, _dispatch_stub_329@8)
- HIDDEN(GL_PREFIX(_dispatch_stub_329, _dispatch_stub_329@8))
- GL_STUB(IsTexture, 330, IsTexture@4)
- GL_STUB(_dispatch_stub_331, 331, _dispatch_stub_331@12)
- HIDDEN(GL_PREFIX(_dispatch_stub_331, _dispatch_stub_331@12))
- GL_STUB(_dispatch_stub_332, 332, _dispatch_stub_332@28)
- HIDDEN(GL_PREFIX(_dispatch_stub_332, _dispatch_stub_332@28))
- GL_STUB(TexSubImage2D, 333, TexSubImage2D@36)
- GL_STUB(_dispatch_stub_334, 334, _dispatch_stub_334@0)
- HIDDEN(GL_PREFIX(_dispatch_stub_334, _dispatch_stub_334@0))
- GL_STUB(_dispatch_stub_335, 335, _dispatch_stub_335@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_335, _dispatch_stub_335@4))
- GL_STUB(BlendColor, 336, BlendColor@16)
- GL_STUB(BlendEquation, 337, BlendEquation@4)
- GL_STUB(_dispatch_stub_338, 338, _dispatch_stub_338@24)
- HIDDEN(GL_PREFIX(_dispatch_stub_338, _dispatch_stub_338@24))
- GL_STUB(_dispatch_stub_339, 339, _dispatch_stub_339@24)
- HIDDEN(GL_PREFIX(_dispatch_stub_339, _dispatch_stub_339@24))
- GL_STUB(_dispatch_stub_340, 340, _dispatch_stub_340@12)
- HIDDEN(GL_PREFIX(_dispatch_stub_340, _dispatch_stub_340@12))
- GL_STUB(_dispatch_stub_341, 341, _dispatch_stub_341@12)
- HIDDEN(GL_PREFIX(_dispatch_stub_341, _dispatch_stub_341@12))
- GL_STUB(_dispatch_stub_342, 342, _dispatch_stub_342@20)
- HIDDEN(GL_PREFIX(_dispatch_stub_342, _dispatch_stub_342@20))
- GL_STUB(_dispatch_stub_343, 343, _dispatch_stub_343@16)
- HIDDEN(GL_PREFIX(_dispatch_stub_343, _dispatch_stub_343@16))
- GL_STUB(_dispatch_stub_344, 344, _dispatch_stub_344@12)
- HIDDEN(GL_PREFIX(_dispatch_stub_344, _dispatch_stub_344@12))
- GL_STUB(_dispatch_stub_345, 345, _dispatch_stub_345@12)
- HIDDEN(GL_PREFIX(_dispatch_stub_345, _dispatch_stub_345@12))
- GL_STUB(_dispatch_stub_346, 346, _dispatch_stub_346@24)
- HIDDEN(GL_PREFIX(_dispatch_stub_346, _dispatch_stub_346@24))
- GL_STUB(_dispatch_stub_347, 347, _dispatch_stub_347@20)
- HIDDEN(GL_PREFIX(_dispatch_stub_347, _dispatch_stub_347@20))
- GL_STUB(_dispatch_stub_348, 348, _dispatch_stub_348@24)
- HIDDEN(GL_PREFIX(_dispatch_stub_348, _dispatch_stub_348@24))
- GL_STUB(_dispatch_stub_349, 349, _dispatch_stub_349@28)
- HIDDEN(GL_PREFIX(_dispatch_stub_349, _dispatch_stub_349@28))
- GL_STUB(_dispatch_stub_350, 350, _dispatch_stub_350@12)
- HIDDEN(GL_PREFIX(_dispatch_stub_350, _dispatch_stub_350@12))
- GL_STUB(_dispatch_stub_351, 351, _dispatch_stub_351@12)
- HIDDEN(GL_PREFIX(_dispatch_stub_351, _dispatch_stub_351@12))
- GL_STUB(_dispatch_stub_352, 352, _dispatch_stub_352@12)
- HIDDEN(GL_PREFIX(_dispatch_stub_352, _dispatch_stub_352@12))
- GL_STUB(_dispatch_stub_353, 353, _dispatch_stub_353@12)
- HIDDEN(GL_PREFIX(_dispatch_stub_353, _dispatch_stub_353@12))
- GL_STUB(_dispatch_stub_354, 354, _dispatch_stub_354@20)
- HIDDEN(GL_PREFIX(_dispatch_stub_354, _dispatch_stub_354@20))
- GL_STUB(_dispatch_stub_355, 355, _dispatch_stub_355@24)
- HIDDEN(GL_PREFIX(_dispatch_stub_355, _dispatch_stub_355@24))
- GL_STUB(_dispatch_stub_356, 356, _dispatch_stub_356@16)
- HIDDEN(GL_PREFIX(_dispatch_stub_356, _dispatch_stub_356@16))
- GL_STUB(_dispatch_stub_357, 357, _dispatch_stub_357@12)
- HIDDEN(GL_PREFIX(_dispatch_stub_357, _dispatch_stub_357@12))
- GL_STUB(_dispatch_stub_358, 358, _dispatch_stub_358@12)
- HIDDEN(GL_PREFIX(_dispatch_stub_358, _dispatch_stub_358@12))
- GL_STUB(_dispatch_stub_359, 359, _dispatch_stub_359@24)
- HIDDEN(GL_PREFIX(_dispatch_stub_359, _dispatch_stub_359@24))
- GL_STUB(_dispatch_stub_360, 360, _dispatch_stub_360@32)
- HIDDEN(GL_PREFIX(_dispatch_stub_360, _dispatch_stub_360@32))
- GL_STUB(_dispatch_stub_361, 361, _dispatch_stub_361@20)
- HIDDEN(GL_PREFIX(_dispatch_stub_361, _dispatch_stub_361@20))
- GL_STUB(_dispatch_stub_362, 362, _dispatch_stub_362@12)
- HIDDEN(GL_PREFIX(_dispatch_stub_362, _dispatch_stub_362@12))
- GL_STUB(_dispatch_stub_363, 363, _dispatch_stub_363@12)
- HIDDEN(GL_PREFIX(_dispatch_stub_363, _dispatch_stub_363@12))
- GL_STUB(_dispatch_stub_364, 364, _dispatch_stub_364@20)
- HIDDEN(GL_PREFIX(_dispatch_stub_364, _dispatch_stub_364@20))
- GL_STUB(_dispatch_stub_365, 365, _dispatch_stub_365@12)
- HIDDEN(GL_PREFIX(_dispatch_stub_365, _dispatch_stub_365@12))
- GL_STUB(_dispatch_stub_366, 366, _dispatch_stub_366@12)
- HIDDEN(GL_PREFIX(_dispatch_stub_366, _dispatch_stub_366@12))
- GL_STUB(_dispatch_stub_367, 367, _dispatch_stub_367@16)
- HIDDEN(GL_PREFIX(_dispatch_stub_367, _dispatch_stub_367@16))
- GL_STUB(_dispatch_stub_368, 368, _dispatch_stub_368@12)
- HIDDEN(GL_PREFIX(_dispatch_stub_368, _dispatch_stub_368@12))
- GL_STUB(_dispatch_stub_369, 369, _dispatch_stub_369@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_369, _dispatch_stub_369@4))
- GL_STUB(_dispatch_stub_370, 370, _dispatch_stub_370@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_370, _dispatch_stub_370@4))
- GL_STUB(TexImage3DOES, 371, TexImage3DOES@40)
- GL_STUB(TexSubImage3DOES, 372, TexSubImage3DOES@44)
- GL_STUB(CopyTexSubImage3DOES, 373, CopyTexSubImage3DOES@36)
- GL_STUB(ActiveTexture, 374, ActiveTexture@4)
- GL_STUB(_dispatch_stub_375, 375, _dispatch_stub_375@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_375, _dispatch_stub_375@4))
- GL_STUB(_dispatch_stub_376, 376, _dispatch_stub_376@12)
- HIDDEN(GL_PREFIX(_dispatch_stub_376, _dispatch_stub_376@12))
- GL_STUB(_dispatch_stub_377, 377, _dispatch_stub_377@8)
- HIDDEN(GL_PREFIX(_dispatch_stub_377, _dispatch_stub_377@8))
- GL_STUB(_dispatch_stub_378, 378, _dispatch_stub_378@8)
- HIDDEN(GL_PREFIX(_dispatch_stub_378, _dispatch_stub_378@8))
- GL_STUB(_dispatch_stub_379, 379, _dispatch_stub_379@8)
- HIDDEN(GL_PREFIX(_dispatch_stub_379, _dispatch_stub_379@8))
- GL_STUB(_dispatch_stub_380, 380, _dispatch_stub_380@8)
- HIDDEN(GL_PREFIX(_dispatch_stub_380, _dispatch_stub_380@8))
- GL_STUB(_dispatch_stub_381, 381, _dispatch_stub_381@8)
- HIDDEN(GL_PREFIX(_dispatch_stub_381, _dispatch_stub_381@8))
- GL_STUB(_dispatch_stub_382, 382, _dispatch_stub_382@8)
- HIDDEN(GL_PREFIX(_dispatch_stub_382, _dispatch_stub_382@8))
- GL_STUB(_dispatch_stub_383, 383, _dispatch_stub_383@8)
- HIDDEN(GL_PREFIX(_dispatch_stub_383, _dispatch_stub_383@8))
- GL_STUB(_dispatch_stub_384, 384, _dispatch_stub_384@20)
- HIDDEN(GL_PREFIX(_dispatch_stub_384, _dispatch_stub_384@20))
- GL_STUB(_dispatch_stub_385, 385, _dispatch_stub_385@8)
- HIDDEN(GL_PREFIX(_dispatch_stub_385, _dispatch_stub_385@8))
- GL_STUB(_dispatch_stub_386, 386, _dispatch_stub_386@12)
- HIDDEN(GL_PREFIX(_dispatch_stub_386, _dispatch_stub_386@12))
- GL_STUB(_dispatch_stub_387, 387, _dispatch_stub_387@8)
- HIDDEN(GL_PREFIX(_dispatch_stub_387, _dispatch_stub_387@8))
- GL_STUB(_dispatch_stub_388, 388, _dispatch_stub_388@12)
- HIDDEN(GL_PREFIX(_dispatch_stub_388, _dispatch_stub_388@12))
- GL_STUB(_dispatch_stub_389, 389, _dispatch_stub_389@8)
- HIDDEN(GL_PREFIX(_dispatch_stub_389, _dispatch_stub_389@8))
- GL_STUB(_dispatch_stub_390, 390, _dispatch_stub_390@12)
- HIDDEN(GL_PREFIX(_dispatch_stub_390, _dispatch_stub_390@12))
- GL_STUB(_dispatch_stub_391, 391, _dispatch_stub_391@8)
- HIDDEN(GL_PREFIX(_dispatch_stub_391, _dispatch_stub_391@8))
- GL_STUB(_dispatch_stub_392, 392, _dispatch_stub_392@28)
- HIDDEN(GL_PREFIX(_dispatch_stub_392, _dispatch_stub_392@28))
- GL_STUB(_dispatch_stub_393, 393, _dispatch_stub_393@8)
- HIDDEN(GL_PREFIX(_dispatch_stub_393, _dispatch_stub_393@8))
- GL_STUB(_dispatch_stub_394, 394, _dispatch_stub_394@16)
- HIDDEN(GL_PREFIX(_dispatch_stub_394, _dispatch_stub_394@16))
- GL_STUB(_dispatch_stub_395, 395, _dispatch_stub_395@8)
- HIDDEN(GL_PREFIX(_dispatch_stub_395, _dispatch_stub_395@8))
- GL_STUB(_dispatch_stub_396, 396, _dispatch_stub_396@16)
- HIDDEN(GL_PREFIX(_dispatch_stub_396, _dispatch_stub_396@16))
- GL_STUB(_dispatch_stub_397, 397, _dispatch_stub_397@8)
- HIDDEN(GL_PREFIX(_dispatch_stub_397, _dispatch_stub_397@8))
- GL_STUB(_dispatch_stub_398, 398, _dispatch_stub_398@16)
- HIDDEN(GL_PREFIX(_dispatch_stub_398, _dispatch_stub_398@16))
- GL_STUB(_dispatch_stub_399, 399, _dispatch_stub_399@8)
- HIDDEN(GL_PREFIX(_dispatch_stub_399, _dispatch_stub_399@8))
- GL_STUB(_dispatch_stub_400, 400, _dispatch_stub_400@36)
- HIDDEN(GL_PREFIX(_dispatch_stub_400, _dispatch_stub_400@36))
- GL_STUB(_dispatch_stub_401, 401, _dispatch_stub_401@8)
- HIDDEN(GL_PREFIX(_dispatch_stub_401, _dispatch_stub_401@8))
- GL_STUB(_dispatch_stub_402, 402, _dispatch_stub_402@20)
- HIDDEN(GL_PREFIX(_dispatch_stub_402, _dispatch_stub_402@20))
- GL_STUB(_dispatch_stub_403, 403, _dispatch_stub_403@8)
- HIDDEN(GL_PREFIX(_dispatch_stub_403, _dispatch_stub_403@8))
- GL_STUB(_dispatch_stub_404, 404, _dispatch_stub_404@20)
- HIDDEN(GL_PREFIX(_dispatch_stub_404, _dispatch_stub_404@20))
- GL_STUB(_dispatch_stub_405, 405, _dispatch_stub_405@8)
- HIDDEN(GL_PREFIX(_dispatch_stub_405, _dispatch_stub_405@8))
- GL_STUB(_dispatch_stub_406, 406, _dispatch_stub_406@20)
- HIDDEN(GL_PREFIX(_dispatch_stub_406, _dispatch_stub_406@20))
- GL_STUB(_dispatch_stub_407, 407, _dispatch_stub_407@8)
- HIDDEN(GL_PREFIX(_dispatch_stub_407, _dispatch_stub_407@8))
- GL_STUB(GetBufferPointervOES, 408, GetBufferPointervOES@12)
- GL_STUB(MapBufferOES, 409, MapBufferOES@8)
- GL_STUB(UnmapBufferOES, 410, UnmapBufferOES@4)
- GL_STUB(CompressedTexImage3DOES, 411, CompressedTexImage3DOES@36)
- GL_STUB(CompressedTexSubImage3DOES, 412, CompressedTexSubImage3DOES@44)
- GL_STUB(FramebufferTexture3DOES, 413, FramebufferTexture3DOES@24)
- GL_STUB(GetProgramBinaryOES, 414, GetProgramBinaryOES@20)
- GL_STUB(ProgramBinaryOES, 415, ProgramBinaryOES@16)
- GL_STUB(MultiDrawArraysEXT, 416, MultiDrawArraysEXT@16)
- GL_STUB(MultiDrawElementsEXT, 417, MultiDrawElementsEXT@20)
- GL_STUB(_dispatch_stub_418, 418, _dispatch_stub_418@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_418, _dispatch_stub_418@4))
- GL_STUB(_dispatch_stub_419, 419, _dispatch_stub_419@8)
- HIDDEN(GL_PREFIX(_dispatch_stub_419, _dispatch_stub_419@8))
- GL_STUB(_dispatch_stub_420, 420, _dispatch_stub_420@8)
- HIDDEN(GL_PREFIX(_dispatch_stub_420, _dispatch_stub_420@8))
- GL_STUB(_dispatch_stub_421, 421, _dispatch_stub_421@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_421, _dispatch_stub_421@4))
- GL_STUB(EGLImageTargetRenderbufferStorageOES, 422, EGLImageTargetRenderbufferStorageOES@8)
- GL_STUB(EGLImageTargetTexture2DOES, 423, EGLImageTargetTexture2DOES@8)
- GL_STUB(CompressedTexImage2D, 424, CompressedTexImage2D@32)
- GL_STUB(CompressedTexSubImage2D, 425, CompressedTexSubImage2D@36)
- GL_STUB(SampleCoverage, 426, SampleCoverage@8)
- GL_STUB(BindBuffer, 427, BindBuffer@8)
- GL_STUB(BufferData, 428, BufferData@16)
- GL_STUB(BufferSubData, 429, BufferSubData@16)
- GL_STUB(DeleteBuffers, 430, DeleteBuffers@8)
- GL_STUB(GenBuffers, 431, GenBuffers@8)
- GL_STUB(GetBufferParameteriv, 432, GetBufferParameteriv@12)
- GL_STUB(IsBuffer, 433, IsBuffer@4)
- GL_STUB(AttachShader, 434, AttachShader@8)
- GL_STUB(BindAttribLocation, 435, BindAttribLocation@12)
- GL_STUB(BlendEquationSeparate, 436, BlendEquationSeparate@8)
- GL_STUB(CompileShader, 437, CompileShader@4)
- GL_STUB(CreateProgram, 438, CreateProgram@0)
- GL_STUB(CreateShader, 439, CreateShader@4)
- GL_STUB(DeleteProgram, 440, DeleteProgram@4)
- GL_STUB(DeleteShader, 441, DeleteShader@4)
- GL_STUB(DetachShader, 442, DetachShader@8)
- GL_STUB(DisableVertexAttribArray, 443, DisableVertexAttribArray@4)
- GL_STUB(EnableVertexAttribArray, 444, EnableVertexAttribArray@4)
- GL_STUB(GetActiveAttrib, 445, GetActiveAttrib@28)
- GL_STUB(GetActiveUniform, 446, GetActiveUniform@28)
- GL_STUB(GetAttachedShaders, 447, GetAttachedShaders@16)
- GL_STUB(GetAttribLocation, 448, GetAttribLocation@8)
- GL_STUB(GetProgramInfoLog, 449, GetProgramInfoLog@16)
- GL_STUB(GetProgramiv, 450, GetProgramiv@12)
- GL_STUB(GetShaderInfoLog, 451, GetShaderInfoLog@16)
- GL_STUB(GetShaderSource, 452, GetShaderSource@16)
- GL_STUB(GetShaderiv, 453, GetShaderiv@12)
- GL_STUB(GetUniformLocation, 454, GetUniformLocation@8)
- GL_STUB(GetUniformfv, 455, GetUniformfv@12)
- GL_STUB(GetUniformiv, 456, GetUniformiv@12)
- GL_STUB(GetVertexAttribPointerv, 457, GetVertexAttribPointerv@12)
- GL_STUB(GetVertexAttribfv, 458, GetVertexAttribfv@12)
- GL_STUB(GetVertexAttribiv, 459, GetVertexAttribiv@12)
- GL_STUB(IsProgram, 460, IsProgram@4)
- GL_STUB(IsShader, 461, IsShader@4)
- GL_STUB(LinkProgram, 462, LinkProgram@4)
- GL_STUB(ShaderSource, 463, ShaderSource@16)
- GL_STUB(StencilFuncSeparate, 464, StencilFuncSeparate@16)
- GL_STUB(StencilMaskSeparate, 465, StencilMaskSeparate@8)
- GL_STUB(StencilOpSeparate, 466, StencilOpSeparate@16)
- GL_STUB(Uniform1f, 467, Uniform1f@8)
- GL_STUB(Uniform1fv, 468, Uniform1fv@12)
- GL_STUB(Uniform1i, 469, Uniform1i@8)
- GL_STUB(Uniform1iv, 470, Uniform1iv@12)
- GL_STUB(Uniform2f, 471, Uniform2f@12)
- GL_STUB(Uniform2fv, 472, Uniform2fv@12)
- GL_STUB(Uniform2i, 473, Uniform2i@12)
- GL_STUB(Uniform2iv, 474, Uniform2iv@12)
- GL_STUB(Uniform3f, 475, Uniform3f@16)
- GL_STUB(Uniform3fv, 476, Uniform3fv@12)
- GL_STUB(Uniform3i, 477, Uniform3i@16)
- GL_STUB(Uniform3iv, 478, Uniform3iv@12)
- GL_STUB(Uniform4f, 479, Uniform4f@20)
- GL_STUB(Uniform4fv, 480, Uniform4fv@12)
- GL_STUB(Uniform4i, 481, Uniform4i@20)
- GL_STUB(Uniform4iv, 482, Uniform4iv@12)
- GL_STUB(UniformMatrix2fv, 483, UniformMatrix2fv@16)
- GL_STUB(UniformMatrix3fv, 484, UniformMatrix3fv@16)
- GL_STUB(UniformMatrix4fv, 485, UniformMatrix4fv@16)
- GL_STUB(UseProgram, 486, UseProgram@4)
- GL_STUB(ValidateProgram, 487, ValidateProgram@4)
- GL_STUB(VertexAttrib1f, 488, VertexAttrib1f@8)
- GL_STUB(VertexAttrib1fv, 489, VertexAttrib1fv@8)
- GL_STUB(VertexAttrib2f, 490, VertexAttrib2f@12)
- GL_STUB(VertexAttrib2fv, 491, VertexAttrib2fv@8)
- GL_STUB(VertexAttrib3f, 492, VertexAttrib3f@16)
- GL_STUB(VertexAttrib3fv, 493, VertexAttrib3fv@8)
- GL_STUB(VertexAttrib4f, 494, VertexAttrib4f@20)
- GL_STUB(VertexAttrib4fv, 495, VertexAttrib4fv@8)
- GL_STUB(VertexAttribPointer, 496, VertexAttribPointer@24)
- GL_STUB(BlendFuncSeparate, 497, BlendFuncSeparate@16)
- GL_STUB(BindFramebuffer, 498, BindFramebuffer@8)
- GL_STUB(BindRenderbuffer, 499, BindRenderbuffer@8)
- GL_STUB(CheckFramebufferStatus, 500, CheckFramebufferStatus@4)
- GL_STUB(ClearDepthf, 501, ClearDepthf@4)
- GL_STUB(DeleteFramebuffers, 502, DeleteFramebuffers@8)
- GL_STUB(DeleteRenderbuffers, 503, DeleteRenderbuffers@8)
- GL_STUB(DepthRangef, 504, DepthRangef@8)
- GL_STUB(FramebufferRenderbuffer, 505, FramebufferRenderbuffer@16)
- GL_STUB(FramebufferTexture2D, 506, FramebufferTexture2D@20)
- GL_STUB(GenFramebuffers, 507, GenFramebuffers@8)
- GL_STUB(GenRenderbuffers, 508, GenRenderbuffers@8)
- GL_STUB(GenerateMipmap, 509, GenerateMipmap@4)
- GL_STUB(GetFramebufferAttachmentParameteriv, 510, GetFramebufferAttachmentParameteriv@16)
- GL_STUB(GetRenderbufferParameteriv, 511, GetRenderbufferParameteriv@12)
- GL_STUB(GetShaderPrecisionFormat, 512, GetShaderPrecisionFormat@16)
- GL_STUB(IsFramebuffer, 513, IsFramebuffer@4)
- GL_STUB(IsRenderbuffer, 514, IsRenderbuffer@4)
- GL_STUB(ReleaseShaderCompiler, 515, ReleaseShaderCompiler@0)
- GL_STUB(RenderbufferStorage, 516, RenderbufferStorage@16)
- GL_STUB(ShaderBinary, 517, ShaderBinary@20)
-
- GLOBL GLNAME(gl_dispatch_functions_end)
- HIDDEN(GLNAME(gl_dispatch_functions_end))
- ALIGNTEXT16
-GLNAME(gl_dispatch_functions_end):
-
-#if defined(GLX_USE_TLS) && defined(__linux__)
- .section ".note.ABI-tag", "a"
- .p2align 2
- .long 1f - 0f /* name length */
- .long 3f - 2f /* data length */
- .long 1 /* note length */
-0: .asciz "GNU" /* vendor name */
-1: .p2align 2
-2: .long 0 /* note data: the ABI tag */
- .long 2,4,20 /* Minimum kernel version w/TLS */
-3: .p2align 2 /* pad out section */
-#endif /* GLX_USE_TLS */
-
-#if defined (__ELF__) && defined (__linux__)
- .section .note.GNU-stack,"",%progbits
-#endif
diff --git a/src/mapi/es2api/glapi/glapitable.h b/src/mapi/es2api/glapi/glapitable.h
deleted file mode 100644
index c531ea11fcf..00000000000
--- a/src/mapi/es2api/glapi/glapitable.h
+++ /dev/null
@@ -1,563 +0,0 @@
-/* DO NOT EDIT - This file generated automatically by gl_table.py (from Mesa) script */
-
-/*
- * Copyright (C) 1999-2003 Brian Paul All Rights Reserved.
- * (C) Copyright IBM Corporation 2004
- * 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
- * BRIAN PAUL, IBM,
- * AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
- * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-#if !defined( _GLAPI_TABLE_H_ )
-# define _GLAPI_TABLE_H_
-
-#ifndef GLAPIENTRYP
-# ifndef GLAPIENTRY
-# define GLAPIENTRY
-# endif
-
-# define GLAPIENTRYP GLAPIENTRY *
-#endif
-
-
-struct _glapi_table
-{
- void (GLAPIENTRYP NewList)(GLuint list, GLenum mode); /* 0 */
- void (GLAPIENTRYP EndList)(void); /* 1 */
- void (GLAPIENTRYP CallList)(GLuint list); /* 2 */
- void (GLAPIENTRYP CallLists)(GLsizei n, GLenum type, const GLvoid * lists); /* 3 */
- void (GLAPIENTRYP DeleteLists)(GLuint list, GLsizei range); /* 4 */
- GLuint (GLAPIENTRYP GenLists)(GLsizei range); /* 5 */
- void (GLAPIENTRYP ListBase)(GLuint base); /* 6 */
- void (GLAPIENTRYP Begin)(GLenum mode); /* 7 */
- void (GLAPIENTRYP Bitmap)(GLsizei width, GLsizei height, GLfloat xorig, GLfloat yorig, GLfloat xmove, GLfloat ymove, const GLubyte * bitmap); /* 8 */
- void (GLAPIENTRYP Color3b)(GLbyte red, GLbyte green, GLbyte blue); /* 9 */
- void (GLAPIENTRYP Color3bv)(const GLbyte * v); /* 10 */
- void (GLAPIENTRYP Color3d)(GLdouble red, GLdouble green, GLdouble blue); /* 11 */
- void (GLAPIENTRYP Color3dv)(const GLdouble * v); /* 12 */
- void (GLAPIENTRYP Color3f)(GLfloat red, GLfloat green, GLfloat blue); /* 13 */
- void (GLAPIENTRYP Color3fv)(const GLfloat * v); /* 14 */
- void (GLAPIENTRYP Color3i)(GLint red, GLint green, GLint blue); /* 15 */
- void (GLAPIENTRYP Color3iv)(const GLint * v); /* 16 */
- void (GLAPIENTRYP Color3s)(GLshort red, GLshort green, GLshort blue); /* 17 */
- void (GLAPIENTRYP Color3sv)(const GLshort * v); /* 18 */
- void (GLAPIENTRYP Color3ub)(GLubyte red, GLubyte green, GLubyte blue); /* 19 */
- void (GLAPIENTRYP Color3ubv)(const GLubyte * v); /* 20 */
- void (GLAPIENTRYP Color3ui)(GLuint red, GLuint green, GLuint blue); /* 21 */
- void (GLAPIENTRYP Color3uiv)(const GLuint * v); /* 22 */
- void (GLAPIENTRYP Color3us)(GLushort red, GLushort green, GLushort blue); /* 23 */
- void (GLAPIENTRYP Color3usv)(const GLushort * v); /* 24 */
- void (GLAPIENTRYP Color4b)(GLbyte red, GLbyte green, GLbyte blue, GLbyte alpha); /* 25 */
- void (GLAPIENTRYP Color4bv)(const GLbyte * v); /* 26 */
- void (GLAPIENTRYP Color4d)(GLdouble red, GLdouble green, GLdouble blue, GLdouble alpha); /* 27 */
- void (GLAPIENTRYP Color4dv)(const GLdouble * v); /* 28 */
- void (GLAPIENTRYP Color4f)(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); /* 29 */
- void (GLAPIENTRYP Color4fv)(const GLfloat * v); /* 30 */
- void (GLAPIENTRYP Color4i)(GLint red, GLint green, GLint blue, GLint alpha); /* 31 */
- void (GLAPIENTRYP Color4iv)(const GLint * v); /* 32 */
- void (GLAPIENTRYP Color4s)(GLshort red, GLshort green, GLshort blue, GLshort alpha); /* 33 */
- void (GLAPIENTRYP Color4sv)(const GLshort * v); /* 34 */
- void (GLAPIENTRYP Color4ub)(GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha); /* 35 */
- void (GLAPIENTRYP Color4ubv)(const GLubyte * v); /* 36 */
- void (GLAPIENTRYP Color4ui)(GLuint red, GLuint green, GLuint blue, GLuint alpha); /* 37 */
- void (GLAPIENTRYP Color4uiv)(const GLuint * v); /* 38 */
- void (GLAPIENTRYP Color4us)(GLushort red, GLushort green, GLushort blue, GLushort alpha); /* 39 */
- void (GLAPIENTRYP Color4usv)(const GLushort * v); /* 40 */
- void (GLAPIENTRYP EdgeFlag)(GLboolean flag); /* 41 */
- void (GLAPIENTRYP EdgeFlagv)(const GLboolean * flag); /* 42 */
- void (GLAPIENTRYP End)(void); /* 43 */
- void (GLAPIENTRYP Indexd)(GLdouble c); /* 44 */
- void (GLAPIENTRYP Indexdv)(const GLdouble * c); /* 45 */
- void (GLAPIENTRYP Indexf)(GLfloat c); /* 46 */
- void (GLAPIENTRYP Indexfv)(const GLfloat * c); /* 47 */
- void (GLAPIENTRYP Indexi)(GLint c); /* 48 */
- void (GLAPIENTRYP Indexiv)(const GLint * c); /* 49 */
- void (GLAPIENTRYP Indexs)(GLshort c); /* 50 */
- void (GLAPIENTRYP Indexsv)(const GLshort * c); /* 51 */
- void (GLAPIENTRYP Normal3b)(GLbyte nx, GLbyte ny, GLbyte nz); /* 52 */
- void (GLAPIENTRYP Normal3bv)(const GLbyte * v); /* 53 */
- void (GLAPIENTRYP Normal3d)(GLdouble nx, GLdouble ny, GLdouble nz); /* 54 */
- void (GLAPIENTRYP Normal3dv)(const GLdouble * v); /* 55 */
- void (GLAPIENTRYP Normal3f)(GLfloat nx, GLfloat ny, GLfloat nz); /* 56 */
- void (GLAPIENTRYP Normal3fv)(const GLfloat * v); /* 57 */
- void (GLAPIENTRYP Normal3i)(GLint nx, GLint ny, GLint nz); /* 58 */
- void (GLAPIENTRYP Normal3iv)(const GLint * v); /* 59 */
- void (GLAPIENTRYP Normal3s)(GLshort nx, GLshort ny, GLshort nz); /* 60 */
- void (GLAPIENTRYP Normal3sv)(const GLshort * v); /* 61 */
- void (GLAPIENTRYP RasterPos2d)(GLdouble x, GLdouble y); /* 62 */
- void (GLAPIENTRYP RasterPos2dv)(const GLdouble * v); /* 63 */
- void (GLAPIENTRYP RasterPos2f)(GLfloat x, GLfloat y); /* 64 */
- void (GLAPIENTRYP RasterPos2fv)(const GLfloat * v); /* 65 */
- void (GLAPIENTRYP RasterPos2i)(GLint x, GLint y); /* 66 */
- void (GLAPIENTRYP RasterPos2iv)(const GLint * v); /* 67 */
- void (GLAPIENTRYP RasterPos2s)(GLshort x, GLshort y); /* 68 */
- void (GLAPIENTRYP RasterPos2sv)(const GLshort * v); /* 69 */
- void (GLAPIENTRYP RasterPos3d)(GLdouble x, GLdouble y, GLdouble z); /* 70 */
- void (GLAPIENTRYP RasterPos3dv)(const GLdouble * v); /* 71 */
- void (GLAPIENTRYP RasterPos3f)(GLfloat x, GLfloat y, GLfloat z); /* 72 */
- void (GLAPIENTRYP RasterPos3fv)(const GLfloat * v); /* 73 */
- void (GLAPIENTRYP RasterPos3i)(GLint x, GLint y, GLint z); /* 74 */
- void (GLAPIENTRYP RasterPos3iv)(const GLint * v); /* 75 */
- void (GLAPIENTRYP RasterPos3s)(GLshort x, GLshort y, GLshort z); /* 76 */
- void (GLAPIENTRYP RasterPos3sv)(const GLshort * v); /* 77 */
- void (GLAPIENTRYP RasterPos4d)(GLdouble x, GLdouble y, GLdouble z, GLdouble w); /* 78 */
- void (GLAPIENTRYP RasterPos4dv)(const GLdouble * v); /* 79 */
- void (GLAPIENTRYP RasterPos4f)(GLfloat x, GLfloat y, GLfloat z, GLfloat w); /* 80 */
- void (GLAPIENTRYP RasterPos4fv)(const GLfloat * v); /* 81 */
- void (GLAPIENTRYP RasterPos4i)(GLint x, GLint y, GLint z, GLint w); /* 82 */
- void (GLAPIENTRYP RasterPos4iv)(const GLint * v); /* 83 */
- void (GLAPIENTRYP RasterPos4s)(GLshort x, GLshort y, GLshort z, GLshort w); /* 84 */
- void (GLAPIENTRYP RasterPos4sv)(const GLshort * v); /* 85 */
- void (GLAPIENTRYP Rectd)(GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2); /* 86 */
- void (GLAPIENTRYP Rectdv)(const GLdouble * v1, const GLdouble * v2); /* 87 */
- void (GLAPIENTRYP Rectf)(GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2); /* 88 */
- void (GLAPIENTRYP Rectfv)(const GLfloat * v1, const GLfloat * v2); /* 89 */
- void (GLAPIENTRYP Recti)(GLint x1, GLint y1, GLint x2, GLint y2); /* 90 */
- void (GLAPIENTRYP Rectiv)(const GLint * v1, const GLint * v2); /* 91 */
- void (GLAPIENTRYP Rects)(GLshort x1, GLshort y1, GLshort x2, GLshort y2); /* 92 */
- void (GLAPIENTRYP Rectsv)(const GLshort * v1, const GLshort * v2); /* 93 */
- void (GLAPIENTRYP TexCoord1d)(GLdouble s); /* 94 */
- void (GLAPIENTRYP TexCoord1dv)(const GLdouble * v); /* 95 */
- void (GLAPIENTRYP TexCoord1f)(GLfloat s); /* 96 */
- void (GLAPIENTRYP TexCoord1fv)(const GLfloat * v); /* 97 */
- void (GLAPIENTRYP TexCoord1i)(GLint s); /* 98 */
- void (GLAPIENTRYP TexCoord1iv)(const GLint * v); /* 99 */
- void (GLAPIENTRYP TexCoord1s)(GLshort s); /* 100 */
- void (GLAPIENTRYP TexCoord1sv)(const GLshort * v); /* 101 */
- void (GLAPIENTRYP TexCoord2d)(GLdouble s, GLdouble t); /* 102 */
- void (GLAPIENTRYP TexCoord2dv)(const GLdouble * v); /* 103 */
- void (GLAPIENTRYP TexCoord2f)(GLfloat s, GLfloat t); /* 104 */
- void (GLAPIENTRYP TexCoord2fv)(const GLfloat * v); /* 105 */
- void (GLAPIENTRYP TexCoord2i)(GLint s, GLint t); /* 106 */
- void (GLAPIENTRYP TexCoord2iv)(const GLint * v); /* 107 */
- void (GLAPIENTRYP TexCoord2s)(GLshort s, GLshort t); /* 108 */
- void (GLAPIENTRYP TexCoord2sv)(const GLshort * v); /* 109 */
- void (GLAPIENTRYP TexCoord3d)(GLdouble s, GLdouble t, GLdouble r); /* 110 */
- void (GLAPIENTRYP TexCoord3dv)(const GLdouble * v); /* 111 */
- void (GLAPIENTRYP TexCoord3f)(GLfloat s, GLfloat t, GLfloat r); /* 112 */
- void (GLAPIENTRYP TexCoord3fv)(const GLfloat * v); /* 113 */
- void (GLAPIENTRYP TexCoord3i)(GLint s, GLint t, GLint r); /* 114 */
- void (GLAPIENTRYP TexCoord3iv)(const GLint * v); /* 115 */
- void (GLAPIENTRYP TexCoord3s)(GLshort s, GLshort t, GLshort r); /* 116 */
- void (GLAPIENTRYP TexCoord3sv)(const GLshort * v); /* 117 */
- void (GLAPIENTRYP TexCoord4d)(GLdouble s, GLdouble t, GLdouble r, GLdouble q); /* 118 */
- void (GLAPIENTRYP TexCoord4dv)(const GLdouble * v); /* 119 */
- void (GLAPIENTRYP TexCoord4f)(GLfloat s, GLfloat t, GLfloat r, GLfloat q); /* 120 */
- void (GLAPIENTRYP TexCoord4fv)(const GLfloat * v); /* 121 */
- void (GLAPIENTRYP TexCoord4i)(GLint s, GLint t, GLint r, GLint q); /* 122 */
- void (GLAPIENTRYP TexCoord4iv)(const GLint * v); /* 123 */
- void (GLAPIENTRYP TexCoord4s)(GLshort s, GLshort t, GLshort r, GLshort q); /* 124 */
- void (GLAPIENTRYP TexCoord4sv)(const GLshort * v); /* 125 */
- void (GLAPIENTRYP Vertex2d)(GLdouble x, GLdouble y); /* 126 */
- void (GLAPIENTRYP Vertex2dv)(const GLdouble * v); /* 127 */
- void (GLAPIENTRYP Vertex2f)(GLfloat x, GLfloat y); /* 128 */
- void (GLAPIENTRYP Vertex2fv)(const GLfloat * v); /* 129 */
- void (GLAPIENTRYP Vertex2i)(GLint x, GLint y); /* 130 */
- void (GLAPIENTRYP Vertex2iv)(const GLint * v); /* 131 */
- void (GLAPIENTRYP Vertex2s)(GLshort x, GLshort y); /* 132 */
- void (GLAPIENTRYP Vertex2sv)(const GLshort * v); /* 133 */
- void (GLAPIENTRYP Vertex3d)(GLdouble x, GLdouble y, GLdouble z); /* 134 */
- void (GLAPIENTRYP Vertex3dv)(const GLdouble * v); /* 135 */
- void (GLAPIENTRYP Vertex3f)(GLfloat x, GLfloat y, GLfloat z); /* 136 */
- void (GLAPIENTRYP Vertex3fv)(const GLfloat * v); /* 137 */
- void (GLAPIENTRYP Vertex3i)(GLint x, GLint y, GLint z); /* 138 */
- void (GLAPIENTRYP Vertex3iv)(const GLint * v); /* 139 */
- void (GLAPIENTRYP Vertex3s)(GLshort x, GLshort y, GLshort z); /* 140 */
- void (GLAPIENTRYP Vertex3sv)(const GLshort * v); /* 141 */
- void (GLAPIENTRYP Vertex4d)(GLdouble x, GLdouble y, GLdouble z, GLdouble w); /* 142 */
- void (GLAPIENTRYP Vertex4dv)(const GLdouble * v); /* 143 */
- void (GLAPIENTRYP Vertex4f)(GLfloat x, GLfloat y, GLfloat z, GLfloat w); /* 144 */
- void (GLAPIENTRYP Vertex4fv)(const GLfloat * v); /* 145 */
- void (GLAPIENTRYP Vertex4i)(GLint x, GLint y, GLint z, GLint w); /* 146 */
- void (GLAPIENTRYP Vertex4iv)(const GLint * v); /* 147 */
- void (GLAPIENTRYP Vertex4s)(GLshort x, GLshort y, GLshort z, GLshort w); /* 148 */
- void (GLAPIENTRYP Vertex4sv)(const GLshort * v); /* 149 */
- void (GLAPIENTRYP ClipPlane)(GLenum plane, const GLdouble * equation); /* 150 */
- void (GLAPIENTRYP ColorMaterial)(GLenum face, GLenum mode); /* 151 */
- void (GLAPIENTRYP CullFace)(GLenum mode); /* 152 */
- void (GLAPIENTRYP Fogf)(GLenum pname, GLfloat param); /* 153 */
- void (GLAPIENTRYP Fogfv)(GLenum pname, const GLfloat * params); /* 154 */
- void (GLAPIENTRYP Fogi)(GLenum pname, GLint param); /* 155 */
- void (GLAPIENTRYP Fogiv)(GLenum pname, const GLint * params); /* 156 */
- void (GLAPIENTRYP FrontFace)(GLenum mode); /* 157 */
- void (GLAPIENTRYP Hint)(GLenum target, GLenum mode); /* 158 */
- void (GLAPIENTRYP Lightf)(GLenum light, GLenum pname, GLfloat param); /* 159 */
- void (GLAPIENTRYP Lightfv)(GLenum light, GLenum pname, const GLfloat * params); /* 160 */
- void (GLAPIENTRYP Lighti)(GLenum light, GLenum pname, GLint param); /* 161 */
- void (GLAPIENTRYP Lightiv)(GLenum light, GLenum pname, const GLint * params); /* 162 */
- void (GLAPIENTRYP LightModelf)(GLenum pname, GLfloat param); /* 163 */
- void (GLAPIENTRYP LightModelfv)(GLenum pname, const GLfloat * params); /* 164 */
- void (GLAPIENTRYP LightModeli)(GLenum pname, GLint param); /* 165 */
- void (GLAPIENTRYP LightModeliv)(GLenum pname, const GLint * params); /* 166 */
- void (GLAPIENTRYP LineStipple)(GLint factor, GLushort pattern); /* 167 */
- void (GLAPIENTRYP LineWidth)(GLfloat width); /* 168 */
- void (GLAPIENTRYP Materialf)(GLenum face, GLenum pname, GLfloat param); /* 169 */
- void (GLAPIENTRYP Materialfv)(GLenum face, GLenum pname, const GLfloat * params); /* 170 */
- void (GLAPIENTRYP Materiali)(GLenum face, GLenum pname, GLint param); /* 171 */
- void (GLAPIENTRYP Materialiv)(GLenum face, GLenum pname, const GLint * params); /* 172 */
- void (GLAPIENTRYP PointSize)(GLfloat size); /* 173 */
- void (GLAPIENTRYP PolygonMode)(GLenum face, GLenum mode); /* 174 */
- void (GLAPIENTRYP PolygonStipple)(const GLubyte * mask); /* 175 */
- void (GLAPIENTRYP Scissor)(GLint x, GLint y, GLsizei width, GLsizei height); /* 176 */
- void (GLAPIENTRYP ShadeModel)(GLenum mode); /* 177 */
- void (GLAPIENTRYP TexParameterf)(GLenum target, GLenum pname, GLfloat param); /* 178 */
- void (GLAPIENTRYP TexParameterfv)(GLenum target, GLenum pname, const GLfloat * params); /* 179 */
- void (GLAPIENTRYP TexParameteri)(GLenum target, GLenum pname, GLint param); /* 180 */
- void (GLAPIENTRYP TexParameteriv)(GLenum target, GLenum pname, const GLint * params); /* 181 */
- void (GLAPIENTRYP TexImage1D)(GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid * pixels); /* 182 */
- void (GLAPIENTRYP TexImage2D)(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid * pixels); /* 183 */
- void (GLAPIENTRYP TexEnvf)(GLenum target, GLenum pname, GLfloat param); /* 184 */
- void (GLAPIENTRYP TexEnvfv)(GLenum target, GLenum pname, const GLfloat * params); /* 185 */
- void (GLAPIENTRYP TexEnvi)(GLenum target, GLenum pname, GLint param); /* 186 */
- void (GLAPIENTRYP TexEnviv)(GLenum target, GLenum pname, const GLint * params); /* 187 */
- void (GLAPIENTRYP TexGend)(GLenum coord, GLenum pname, GLdouble param); /* 188 */
- void (GLAPIENTRYP TexGendv)(GLenum coord, GLenum pname, const GLdouble * params); /* 189 */
- void (GLAPIENTRYP TexGenf)(GLenum coord, GLenum pname, GLfloat param); /* 190 */
- void (GLAPIENTRYP TexGenfv)(GLenum coord, GLenum pname, const GLfloat * params); /* 191 */
- void (GLAPIENTRYP TexGeni)(GLenum coord, GLenum pname, GLint param); /* 192 */
- void (GLAPIENTRYP TexGeniv)(GLenum coord, GLenum pname, const GLint * params); /* 193 */
- void (GLAPIENTRYP FeedbackBuffer)(GLsizei size, GLenum type, GLfloat * buffer); /* 194 */
- void (GLAPIENTRYP SelectBuffer)(GLsizei size, GLuint * buffer); /* 195 */
- GLint (GLAPIENTRYP RenderMode)(GLenum mode); /* 196 */
- void (GLAPIENTRYP InitNames)(void); /* 197 */
- void (GLAPIENTRYP LoadName)(GLuint name); /* 198 */
- void (GLAPIENTRYP PassThrough)(GLfloat token); /* 199 */
- void (GLAPIENTRYP PopName)(void); /* 200 */
- void (GLAPIENTRYP PushName)(GLuint name); /* 201 */
- void (GLAPIENTRYP DrawBuffer)(GLenum mode); /* 202 */
- void (GLAPIENTRYP Clear)(GLbitfield mask); /* 203 */
- void (GLAPIENTRYP ClearAccum)(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); /* 204 */
- void (GLAPIENTRYP ClearIndex)(GLfloat c); /* 205 */
- void (GLAPIENTRYP ClearColor)(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); /* 206 */
- void (GLAPIENTRYP ClearStencil)(GLint s); /* 207 */
- void (GLAPIENTRYP ClearDepth)(GLclampd depth); /* 208 */
- void (GLAPIENTRYP StencilMask)(GLuint mask); /* 209 */
- void (GLAPIENTRYP ColorMask)(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha); /* 210 */
- void (GLAPIENTRYP DepthMask)(GLboolean flag); /* 211 */
- void (GLAPIENTRYP IndexMask)(GLuint mask); /* 212 */
- void (GLAPIENTRYP Accum)(GLenum op, GLfloat value); /* 213 */
- void (GLAPIENTRYP Disable)(GLenum cap); /* 214 */
- void (GLAPIENTRYP Enable)(GLenum cap); /* 215 */
- void (GLAPIENTRYP Finish)(void); /* 216 */
- void (GLAPIENTRYP Flush)(void); /* 217 */
- void (GLAPIENTRYP PopAttrib)(void); /* 218 */
- void (GLAPIENTRYP PushAttrib)(GLbitfield mask); /* 219 */
- void (GLAPIENTRYP Map1d)(GLenum target, GLdouble u1, GLdouble u2, GLint stride, GLint order, const GLdouble * points); /* 220 */
- void (GLAPIENTRYP Map1f)(GLenum target, GLfloat u1, GLfloat u2, GLint stride, GLint order, const GLfloat * points); /* 221 */
- void (GLAPIENTRYP Map2d)(GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, const GLdouble * points); /* 222 */
- void (GLAPIENTRYP Map2f)(GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, const GLfloat * points); /* 223 */
- void (GLAPIENTRYP MapGrid1d)(GLint un, GLdouble u1, GLdouble u2); /* 224 */
- void (GLAPIENTRYP MapGrid1f)(GLint un, GLfloat u1, GLfloat u2); /* 225 */
- void (GLAPIENTRYP MapGrid2d)(GLint un, GLdouble u1, GLdouble u2, GLint vn, GLdouble v1, GLdouble v2); /* 226 */
- void (GLAPIENTRYP MapGrid2f)(GLint un, GLfloat u1, GLfloat u2, GLint vn, GLfloat v1, GLfloat v2); /* 227 */
- void (GLAPIENTRYP EvalCoord1d)(GLdouble u); /* 228 */
- void (GLAPIENTRYP EvalCoord1dv)(const GLdouble * u); /* 229 */
- void (GLAPIENTRYP EvalCoord1f)(GLfloat u); /* 230 */
- void (GLAPIENTRYP EvalCoord1fv)(const GLfloat * u); /* 231 */
- void (GLAPIENTRYP EvalCoord2d)(GLdouble u, GLdouble v); /* 232 */
- void (GLAPIENTRYP EvalCoord2dv)(const GLdouble * u); /* 233 */
- void (GLAPIENTRYP EvalCoord2f)(GLfloat u, GLfloat v); /* 234 */
- void (GLAPIENTRYP EvalCoord2fv)(const GLfloat * u); /* 235 */
- void (GLAPIENTRYP EvalMesh1)(GLenum mode, GLint i1, GLint i2); /* 236 */
- void (GLAPIENTRYP EvalPoint1)(GLint i); /* 237 */
- void (GLAPIENTRYP EvalMesh2)(GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2); /* 238 */
- void (GLAPIENTRYP EvalPoint2)(GLint i, GLint j); /* 239 */
- void (GLAPIENTRYP AlphaFunc)(GLenum func, GLclampf ref); /* 240 */
- void (GLAPIENTRYP BlendFunc)(GLenum sfactor, GLenum dfactor); /* 241 */
- void (GLAPIENTRYP LogicOp)(GLenum opcode); /* 242 */
- void (GLAPIENTRYP StencilFunc)(GLenum func, GLint ref, GLuint mask); /* 243 */
- void (GLAPIENTRYP StencilOp)(GLenum fail, GLenum zfail, GLenum zpass); /* 244 */
- void (GLAPIENTRYP DepthFunc)(GLenum func); /* 245 */
- void (GLAPIENTRYP PixelZoom)(GLfloat xfactor, GLfloat yfactor); /* 246 */
- void (GLAPIENTRYP PixelTransferf)(GLenum pname, GLfloat param); /* 247 */
- void (GLAPIENTRYP PixelTransferi)(GLenum pname, GLint param); /* 248 */
- void (GLAPIENTRYP PixelStoref)(GLenum pname, GLfloat param); /* 249 */
- void (GLAPIENTRYP PixelStorei)(GLenum pname, GLint param); /* 250 */
- void (GLAPIENTRYP PixelMapfv)(GLenum map, GLsizei mapsize, const GLfloat * values); /* 251 */
- void (GLAPIENTRYP PixelMapuiv)(GLenum map, GLsizei mapsize, const GLuint * values); /* 252 */
- void (GLAPIENTRYP PixelMapusv)(GLenum map, GLsizei mapsize, const GLushort * values); /* 253 */
- void (GLAPIENTRYP ReadBuffer)(GLenum mode); /* 254 */
- void (GLAPIENTRYP CopyPixels)(GLint x, GLint y, GLsizei width, GLsizei height, GLenum type); /* 255 */
- void (GLAPIENTRYP ReadPixels)(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid * pixels); /* 256 */
- void (GLAPIENTRYP DrawPixels)(GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid * pixels); /* 257 */
- void (GLAPIENTRYP GetBooleanv)(GLenum pname, GLboolean * params); /* 258 */
- void (GLAPIENTRYP GetClipPlane)(GLenum plane, GLdouble * equation); /* 259 */
- void (GLAPIENTRYP GetDoublev)(GLenum pname, GLdouble * params); /* 260 */
- GLenum (GLAPIENTRYP GetError)(void); /* 261 */
- void (GLAPIENTRYP GetFloatv)(GLenum pname, GLfloat * params); /* 262 */
- void (GLAPIENTRYP GetIntegerv)(GLenum pname, GLint * params); /* 263 */
- void (GLAPIENTRYP GetLightfv)(GLenum light, GLenum pname, GLfloat * params); /* 264 */
- void (GLAPIENTRYP GetLightiv)(GLenum light, GLenum pname, GLint * params); /* 265 */
- void (GLAPIENTRYP GetMapdv)(GLenum target, GLenum query, GLdouble * v); /* 266 */
- void (GLAPIENTRYP GetMapfv)(GLenum target, GLenum query, GLfloat * v); /* 267 */
- void (GLAPIENTRYP GetMapiv)(GLenum target, GLenum query, GLint * v); /* 268 */
- void (GLAPIENTRYP GetMaterialfv)(GLenum face, GLenum pname, GLfloat * params); /* 269 */
- void (GLAPIENTRYP GetMaterialiv)(GLenum face, GLenum pname, GLint * params); /* 270 */
- void (GLAPIENTRYP GetPixelMapfv)(GLenum map, GLfloat * values); /* 271 */
- void (GLAPIENTRYP GetPixelMapuiv)(GLenum map, GLuint * values); /* 272 */
- void (GLAPIENTRYP GetPixelMapusv)(GLenum map, GLushort * values); /* 273 */
- void (GLAPIENTRYP GetPolygonStipple)(GLubyte * mask); /* 274 */
- const GLubyte * (GLAPIENTRYP GetString)(GLenum name); /* 275 */
- void (GLAPIENTRYP GetTexEnvfv)(GLenum target, GLenum pname, GLfloat * params); /* 276 */
- void (GLAPIENTRYP GetTexEnviv)(GLenum target, GLenum pname, GLint * params); /* 277 */
- void (GLAPIENTRYP GetTexGendv)(GLenum coord, GLenum pname, GLdouble * params); /* 278 */
- void (GLAPIENTRYP GetTexGenfv)(GLenum coord, GLenum pname, GLfloat * params); /* 279 */
- void (GLAPIENTRYP GetTexGeniv)(GLenum coord, GLenum pname, GLint * params); /* 280 */
- void (GLAPIENTRYP GetTexImage)(GLenum target, GLint level, GLenum format, GLenum type, GLvoid * pixels); /* 281 */
- void (GLAPIENTRYP GetTexParameterfv)(GLenum target, GLenum pname, GLfloat * params); /* 282 */
- void (GLAPIENTRYP GetTexParameteriv)(GLenum target, GLenum pname, GLint * params); /* 283 */
- void (GLAPIENTRYP GetTexLevelParameterfv)(GLenum target, GLint level, GLenum pname, GLfloat * params); /* 284 */
- void (GLAPIENTRYP GetTexLevelParameteriv)(GLenum target, GLint level, GLenum pname, GLint * params); /* 285 */
- GLboolean (GLAPIENTRYP IsEnabled)(GLenum cap); /* 286 */
- GLboolean (GLAPIENTRYP IsList)(GLuint list); /* 287 */
- void (GLAPIENTRYP DepthRange)(GLclampd zNear, GLclampd zFar); /* 288 */
- void (GLAPIENTRYP Frustum)(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar); /* 289 */
- void (GLAPIENTRYP LoadIdentity)(void); /* 290 */
- void (GLAPIENTRYP LoadMatrixf)(const GLfloat * m); /* 291 */
- void (GLAPIENTRYP LoadMatrixd)(const GLdouble * m); /* 292 */
- void (GLAPIENTRYP MatrixMode)(GLenum mode); /* 293 */
- void (GLAPIENTRYP MultMatrixf)(const GLfloat * m); /* 294 */
- void (GLAPIENTRYP MultMatrixd)(const GLdouble * m); /* 295 */
- void (GLAPIENTRYP Ortho)(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar); /* 296 */
- void (GLAPIENTRYP PopMatrix)(void); /* 297 */
- void (GLAPIENTRYP PushMatrix)(void); /* 298 */
- void (GLAPIENTRYP Rotated)(GLdouble angle, GLdouble x, GLdouble y, GLdouble z); /* 299 */
- void (GLAPIENTRYP Rotatef)(GLfloat angle, GLfloat x, GLfloat y, GLfloat z); /* 300 */
- void (GLAPIENTRYP Scaled)(GLdouble x, GLdouble y, GLdouble z); /* 301 */
- void (GLAPIENTRYP Scalef)(GLfloat x, GLfloat y, GLfloat z); /* 302 */
- void (GLAPIENTRYP Translated)(GLdouble x, GLdouble y, GLdouble z); /* 303 */
- void (GLAPIENTRYP Translatef)(GLfloat x, GLfloat y, GLfloat z); /* 304 */
- void (GLAPIENTRYP Viewport)(GLint x, GLint y, GLsizei width, GLsizei height); /* 305 */
- void (GLAPIENTRYP ArrayElement)(GLint i); /* 306 */
- void (GLAPIENTRYP BindTexture)(GLenum target, GLuint texture); /* 307 */
- void (GLAPIENTRYP ColorPointer)(GLint size, GLenum type, GLsizei stride, const GLvoid * pointer); /* 308 */
- void (GLAPIENTRYP DisableClientState)(GLenum array); /* 309 */
- void (GLAPIENTRYP DrawArrays)(GLenum mode, GLint first, GLsizei count); /* 310 */
- void (GLAPIENTRYP DrawElements)(GLenum mode, GLsizei count, GLenum type, const GLvoid * indices); /* 311 */
- void (GLAPIENTRYP EdgeFlagPointer)(GLsizei stride, const GLvoid * pointer); /* 312 */
- void (GLAPIENTRYP EnableClientState)(GLenum array); /* 313 */
- void (GLAPIENTRYP IndexPointer)(GLenum type, GLsizei stride, const GLvoid * pointer); /* 314 */
- void (GLAPIENTRYP Indexub)(GLubyte c); /* 315 */
- void (GLAPIENTRYP Indexubv)(const GLubyte * c); /* 316 */
- void (GLAPIENTRYP InterleavedArrays)(GLenum format, GLsizei stride, const GLvoid * pointer); /* 317 */
- void (GLAPIENTRYP NormalPointer)(GLenum type, GLsizei stride, const GLvoid * pointer); /* 318 */
- void (GLAPIENTRYP PolygonOffset)(GLfloat factor, GLfloat units); /* 319 */
- void (GLAPIENTRYP TexCoordPointer)(GLint size, GLenum type, GLsizei stride, const GLvoid * pointer); /* 320 */
- void (GLAPIENTRYP VertexPointer)(GLint size, GLenum type, GLsizei stride, const GLvoid * pointer); /* 321 */
- GLboolean (GLAPIENTRYP AreTexturesResident)(GLsizei n, const GLuint * textures, GLboolean * residences); /* 322 */
- void (GLAPIENTRYP CopyTexImage1D)(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border); /* 323 */
- void (GLAPIENTRYP CopyTexImage2D)(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); /* 324 */
- void (GLAPIENTRYP CopyTexSubImage1D)(GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width); /* 325 */
- void (GLAPIENTRYP CopyTexSubImage2D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); /* 326 */
- void (GLAPIENTRYP DeleteTextures)(GLsizei n, const GLuint * textures); /* 327 */
- void (GLAPIENTRYP GenTextures)(GLsizei n, GLuint * textures); /* 328 */
- void (GLAPIENTRYP GetPointerv)(GLenum pname, GLvoid ** params); /* 329 */
- GLboolean (GLAPIENTRYP IsTexture)(GLuint texture); /* 330 */
- void (GLAPIENTRYP PrioritizeTextures)(GLsizei n, const GLuint * textures, const GLclampf * priorities); /* 331 */
- void (GLAPIENTRYP TexSubImage1D)(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid * pixels); /* 332 */
- void (GLAPIENTRYP TexSubImage2D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid * pixels); /* 333 */
- void (GLAPIENTRYP PopClientAttrib)(void); /* 334 */
- void (GLAPIENTRYP PushClientAttrib)(GLbitfield mask); /* 335 */
- void (GLAPIENTRYP BlendColor)(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); /* 336 */
- void (GLAPIENTRYP BlendEquation)(GLenum mode); /* 337 */
- void (GLAPIENTRYP DrawRangeElements)(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid * indices); /* 338 */
- void (GLAPIENTRYP ColorTable)(GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid * table); /* 339 */
- void (GLAPIENTRYP ColorTableParameterfv)(GLenum target, GLenum pname, const GLfloat * params); /* 340 */
- void (GLAPIENTRYP ColorTableParameteriv)(GLenum target, GLenum pname, const GLint * params); /* 341 */
- void (GLAPIENTRYP CopyColorTable)(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); /* 342 */
- void (GLAPIENTRYP GetColorTable)(GLenum target, GLenum format, GLenum type, GLvoid * table); /* 343 */
- void (GLAPIENTRYP GetColorTableParameterfv)(GLenum target, GLenum pname, GLfloat * params); /* 344 */
- void (GLAPIENTRYP GetColorTableParameteriv)(GLenum target, GLenum pname, GLint * params); /* 345 */
- void (GLAPIENTRYP ColorSubTable)(GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid * data); /* 346 */
- void (GLAPIENTRYP CopyColorSubTable)(GLenum target, GLsizei start, GLint x, GLint y, GLsizei width); /* 347 */
- void (GLAPIENTRYP ConvolutionFilter1D)(GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid * image); /* 348 */
- void (GLAPIENTRYP ConvolutionFilter2D)(GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid * image); /* 349 */
- void (GLAPIENTRYP ConvolutionParameterf)(GLenum target, GLenum pname, GLfloat params); /* 350 */
- void (GLAPIENTRYP ConvolutionParameterfv)(GLenum target, GLenum pname, const GLfloat * params); /* 351 */
- void (GLAPIENTRYP ConvolutionParameteri)(GLenum target, GLenum pname, GLint params); /* 352 */
- void (GLAPIENTRYP ConvolutionParameteriv)(GLenum target, GLenum pname, const GLint * params); /* 353 */
- void (GLAPIENTRYP CopyConvolutionFilter1D)(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); /* 354 */
- void (GLAPIENTRYP CopyConvolutionFilter2D)(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height); /* 355 */
- void (GLAPIENTRYP GetConvolutionFilter)(GLenum target, GLenum format, GLenum type, GLvoid * image); /* 356 */
- void (GLAPIENTRYP GetConvolutionParameterfv)(GLenum target, GLenum pname, GLfloat * params); /* 357 */
- void (GLAPIENTRYP GetConvolutionParameteriv)(GLenum target, GLenum pname, GLint * params); /* 358 */
- void (GLAPIENTRYP GetSeparableFilter)(GLenum target, GLenum format, GLenum type, GLvoid * row, GLvoid * column, GLvoid * span); /* 359 */
- void (GLAPIENTRYP SeparableFilter2D)(GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid * row, const GLvoid * column); /* 360 */
- void (GLAPIENTRYP GetHistogram)(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid * values); /* 361 */
- void (GLAPIENTRYP GetHistogramParameterfv)(GLenum target, GLenum pname, GLfloat * params); /* 362 */
- void (GLAPIENTRYP GetHistogramParameteriv)(GLenum target, GLenum pname, GLint * params); /* 363 */
- void (GLAPIENTRYP GetMinmax)(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid * values); /* 364 */
- void (GLAPIENTRYP GetMinmaxParameterfv)(GLenum target, GLenum pname, GLfloat * params); /* 365 */
- void (GLAPIENTRYP GetMinmaxParameteriv)(GLenum target, GLenum pname, GLint * params); /* 366 */
- void (GLAPIENTRYP Histogram)(GLenum target, GLsizei width, GLenum internalformat, GLboolean sink); /* 367 */
- void (GLAPIENTRYP Minmax)(GLenum target, GLenum internalformat, GLboolean sink); /* 368 */
- void (GLAPIENTRYP ResetHistogram)(GLenum target); /* 369 */
- void (GLAPIENTRYP ResetMinmax)(GLenum target); /* 370 */
- void (GLAPIENTRYP TexImage3DOES)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid * pixels); /* 371 */
- void (GLAPIENTRYP TexSubImage3DOES)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid * pixels); /* 372 */
- void (GLAPIENTRYP CopyTexSubImage3DOES)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); /* 373 */
- void (GLAPIENTRYP ActiveTexture)(GLenum texture); /* 374 */
- void (GLAPIENTRYP ClientActiveTextureARB)(GLenum texture); /* 375 */
- void (GLAPIENTRYP MultiTexCoord1dARB)(GLenum target, GLdouble s); /* 376 */
- void (GLAPIENTRYP MultiTexCoord1dvARB)(GLenum target, const GLdouble * v); /* 377 */
- void (GLAPIENTRYP MultiTexCoord1fARB)(GLenum target, GLfloat s); /* 378 */
- void (GLAPIENTRYP MultiTexCoord1fvARB)(GLenum target, const GLfloat * v); /* 379 */
- void (GLAPIENTRYP MultiTexCoord1iARB)(GLenum target, GLint s); /* 380 */
- void (GLAPIENTRYP MultiTexCoord1ivARB)(GLenum target, const GLint * v); /* 381 */
- void (GLAPIENTRYP MultiTexCoord1sARB)(GLenum target, GLshort s); /* 382 */
- void (GLAPIENTRYP MultiTexCoord1svARB)(GLenum target, const GLshort * v); /* 383 */
- void (GLAPIENTRYP MultiTexCoord2dARB)(GLenum target, GLdouble s, GLdouble t); /* 384 */
- void (GLAPIENTRYP MultiTexCoord2dvARB)(GLenum target, const GLdouble * v); /* 385 */
- void (GLAPIENTRYP MultiTexCoord2fARB)(GLenum target, GLfloat s, GLfloat t); /* 386 */
- void (GLAPIENTRYP MultiTexCoord2fvARB)(GLenum target, const GLfloat * v); /* 387 */
- void (GLAPIENTRYP MultiTexCoord2iARB)(GLenum target, GLint s, GLint t); /* 388 */
- void (GLAPIENTRYP MultiTexCoord2ivARB)(GLenum target, const GLint * v); /* 389 */
- void (GLAPIENTRYP MultiTexCoord2sARB)(GLenum target, GLshort s, GLshort t); /* 390 */
- void (GLAPIENTRYP MultiTexCoord2svARB)(GLenum target, const GLshort * v); /* 391 */
- void (GLAPIENTRYP MultiTexCoord3dARB)(GLenum target, GLdouble s, GLdouble t, GLdouble r); /* 392 */
- void (GLAPIENTRYP MultiTexCoord3dvARB)(GLenum target, const GLdouble * v); /* 393 */
- void (GLAPIENTRYP MultiTexCoord3fARB)(GLenum target, GLfloat s, GLfloat t, GLfloat r); /* 394 */
- void (GLAPIENTRYP MultiTexCoord3fvARB)(GLenum target, const GLfloat * v); /* 395 */
- void (GLAPIENTRYP MultiTexCoord3iARB)(GLenum target, GLint s, GLint t, GLint r); /* 396 */
- void (GLAPIENTRYP MultiTexCoord3ivARB)(GLenum target, const GLint * v); /* 397 */
- void (GLAPIENTRYP MultiTexCoord3sARB)(GLenum target, GLshort s, GLshort t, GLshort r); /* 398 */
- void (GLAPIENTRYP MultiTexCoord3svARB)(GLenum target, const GLshort * v); /* 399 */
- void (GLAPIENTRYP MultiTexCoord4dARB)(GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q); /* 400 */
- void (GLAPIENTRYP MultiTexCoord4dvARB)(GLenum target, const GLdouble * v); /* 401 */
- void (GLAPIENTRYP MultiTexCoord4fARB)(GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q); /* 402 */
- void (GLAPIENTRYP MultiTexCoord4fvARB)(GLenum target, const GLfloat * v); /* 403 */
- void (GLAPIENTRYP MultiTexCoord4iARB)(GLenum target, GLint s, GLint t, GLint r, GLint q); /* 404 */
- void (GLAPIENTRYP MultiTexCoord4ivARB)(GLenum target, const GLint * v); /* 405 */
- void (GLAPIENTRYP MultiTexCoord4sARB)(GLenum target, GLshort s, GLshort t, GLshort r, GLshort q); /* 406 */
- void (GLAPIENTRYP MultiTexCoord4svARB)(GLenum target, const GLshort * v); /* 407 */
- void (GLAPIENTRYP GetBufferPointervOES)(GLenum target, GLenum pname, GLvoid ** params); /* 408 */
- GLvoid * (GLAPIENTRYP MapBufferOES)(GLenum target, GLenum access); /* 409 */
- GLboolean (GLAPIENTRYP UnmapBufferOES)(GLenum target); /* 410 */
- void (GLAPIENTRYP CompressedTexImage3DOES)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid * data); /* 411 */
- void (GLAPIENTRYP CompressedTexSubImage3DOES)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid * data); /* 412 */
- void (GLAPIENTRYP FramebufferTexture3DOES)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset); /* 413 */
- void (GLAPIENTRYP GetProgramBinaryOES)(GLuint program, GLsizei bufSize, GLsizei * length, GLenum * binaryFormat, GLvoid * binary); /* 414 */
- void (GLAPIENTRYP ProgramBinaryOES)(GLuint program, GLenum binaryFormat, const GLvoid * binary, GLint length); /* 415 */
- void (GLAPIENTRYP MultiDrawArraysEXT)(GLenum mode, const GLint * first, const GLsizei * count, GLsizei primcount); /* 416 */
- void (GLAPIENTRYP MultiDrawElementsEXT)(GLenum mode, const GLsizei * count, GLenum type, const GLvoid ** indices, GLsizei primcount); /* 417 */
- void (GLAPIENTRYP BindVertexArrayAPPLE)(GLuint array); /* 418 */
- void (GLAPIENTRYP DeleteVertexArraysAPPLE)(GLsizei n, const GLuint * arrays); /* 419 */
- void (GLAPIENTRYP GenVertexArraysAPPLE)(GLsizei n, GLuint * arrays); /* 420 */
- GLboolean (GLAPIENTRYP IsVertexArrayAPPLE)(GLuint array); /* 421 */
- void (GLAPIENTRYP EGLImageTargetRenderbufferStorageOES)(GLenum target, GLvoid * writeOffset); /* 422 */
- void (GLAPIENTRYP EGLImageTargetTexture2DOES)(GLenum target, GLvoid * writeOffset); /* 423 */
- void (GLAPIENTRYP CompressedTexImage2D)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid * data); /* 424 */
- void (GLAPIENTRYP CompressedTexSubImage2D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid * data); /* 425 */
- void (GLAPIENTRYP SampleCoverage)(GLclampf value, GLboolean invert); /* 426 */
- void (GLAPIENTRYP BindBuffer)(GLenum target, GLuint buffer); /* 427 */
- void (GLAPIENTRYP BufferData)(GLenum target, GLsizeiptr size, const GLvoid * data, GLenum usage); /* 428 */
- void (GLAPIENTRYP BufferSubData)(GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid * data); /* 429 */
- void (GLAPIENTRYP DeleteBuffers)(GLsizei n, const GLuint * buffer); /* 430 */
- void (GLAPIENTRYP GenBuffers)(GLsizei n, GLuint * buffer); /* 431 */
- void (GLAPIENTRYP GetBufferParameteriv)(GLenum target, GLenum pname, GLint * params); /* 432 */
- GLboolean (GLAPIENTRYP IsBuffer)(GLuint buffer); /* 433 */
- void (GLAPIENTRYP AttachShader)(GLuint program, GLuint shader); /* 434 */
- void (GLAPIENTRYP BindAttribLocation)(GLuint program, GLuint index, const GLchar * name); /* 435 */
- void (GLAPIENTRYP BlendEquationSeparate)(GLenum modeRGB, GLenum modeA); /* 436 */
- void (GLAPIENTRYP CompileShader)(GLuint shader); /* 437 */
- GLuint (GLAPIENTRYP CreateProgram)(void); /* 438 */
- GLuint (GLAPIENTRYP CreateShader)(GLenum type); /* 439 */
- void (GLAPIENTRYP DeleteProgram)(GLuint program); /* 440 */
- void (GLAPIENTRYP DeleteShader)(GLuint program); /* 441 */
- void (GLAPIENTRYP DetachShader)(GLuint program, GLuint shader); /* 442 */
- void (GLAPIENTRYP DisableVertexAttribArray)(GLuint index); /* 443 */
- void (GLAPIENTRYP EnableVertexAttribArray)(GLuint index); /* 444 */
- void (GLAPIENTRYP GetActiveAttrib)(GLuint program, GLuint index, GLsizei bufSize, GLsizei * length, GLint * size, GLenum * type, GLchar * name); /* 445 */
- void (GLAPIENTRYP GetActiveUniform)(GLuint program, GLuint index, GLsizei bufSize, GLsizei * length, GLint * size, GLenum * type, GLchar * name); /* 446 */
- void (GLAPIENTRYP GetAttachedShaders)(GLuint program, GLsizei maxCount, GLsizei * count, GLuint * obj); /* 447 */
- GLint (GLAPIENTRYP GetAttribLocation)(GLuint program, const GLchar * name); /* 448 */
- void (GLAPIENTRYP GetProgramInfoLog)(GLuint program, GLsizei bufSize, GLsizei * length, GLchar * infoLog); /* 449 */
- void (GLAPIENTRYP GetProgramiv)(GLuint program, GLenum pname, GLint * params); /* 450 */
- void (GLAPIENTRYP GetShaderInfoLog)(GLuint shader, GLsizei bufSize, GLsizei * length, GLchar * infoLog); /* 451 */
- void (GLAPIENTRYP GetShaderSource)(GLuint shader, GLsizei bufSize, GLsizei * length, GLchar * source); /* 452 */
- void (GLAPIENTRYP GetShaderiv)(GLuint shader, GLenum pname, GLint * params); /* 453 */
- GLint (GLAPIENTRYP GetUniformLocation)(GLuint program, const GLchar * name); /* 454 */
- void (GLAPIENTRYP GetUniformfv)(GLuint program, GLint location, GLfloat * params); /* 455 */
- void (GLAPIENTRYP GetUniformiv)(GLuint program, GLint location, GLint * params); /* 456 */
- void (GLAPIENTRYP GetVertexAttribPointerv)(GLuint index, GLenum pname, GLvoid ** pointer); /* 457 */
- void (GLAPIENTRYP GetVertexAttribfv)(GLuint index, GLenum pname, GLfloat * params); /* 458 */
- void (GLAPIENTRYP GetVertexAttribiv)(GLuint index, GLenum pname, GLint * params); /* 459 */
- GLboolean (GLAPIENTRYP IsProgram)(GLuint program); /* 460 */
- GLboolean (GLAPIENTRYP IsShader)(GLuint shader); /* 461 */
- void (GLAPIENTRYP LinkProgram)(GLuint program); /* 462 */
- void (GLAPIENTRYP ShaderSource)(GLuint shader, GLsizei count, const GLchar ** string, const GLint * length); /* 463 */
- void (GLAPIENTRYP StencilFuncSeparate)(GLenum face, GLenum func, GLint ref, GLuint mask); /* 464 */
- void (GLAPIENTRYP StencilMaskSeparate)(GLenum face, GLuint mask); /* 465 */
- void (GLAPIENTRYP StencilOpSeparate)(GLenum face, GLenum sfail, GLenum zfail, GLenum zpass); /* 466 */
- void (GLAPIENTRYP Uniform1f)(GLint location, GLfloat v0); /* 467 */
- void (GLAPIENTRYP Uniform1fv)(GLint location, GLsizei count, const GLfloat * value); /* 468 */
- void (GLAPIENTRYP Uniform1i)(GLint location, GLint v0); /* 469 */
- void (GLAPIENTRYP Uniform1iv)(GLint location, GLsizei count, const GLint * value); /* 470 */
- void (GLAPIENTRYP Uniform2f)(GLint location, GLfloat v0, GLfloat v1); /* 471 */
- void (GLAPIENTRYP Uniform2fv)(GLint location, GLsizei count, const GLfloat * value); /* 472 */
- void (GLAPIENTRYP Uniform2i)(GLint location, GLint v0, GLint v1); /* 473 */
- void (GLAPIENTRYP Uniform2iv)(GLint location, GLsizei count, const GLint * value); /* 474 */
- void (GLAPIENTRYP Uniform3f)(GLint location, GLfloat v0, GLfloat v1, GLfloat v2); /* 475 */
- void (GLAPIENTRYP Uniform3fv)(GLint location, GLsizei count, const GLfloat * value); /* 476 */
- void (GLAPIENTRYP Uniform3i)(GLint location, GLint v0, GLint v1, GLint v2); /* 477 */
- void (GLAPIENTRYP Uniform3iv)(GLint location, GLsizei count, const GLint * value); /* 478 */
- void (GLAPIENTRYP Uniform4f)(GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); /* 479 */
- void (GLAPIENTRYP Uniform4fv)(GLint location, GLsizei count, const GLfloat * value); /* 480 */
- void (GLAPIENTRYP Uniform4i)(GLint location, GLint v0, GLint v1, GLint v2, GLint v3); /* 481 */
- void (GLAPIENTRYP Uniform4iv)(GLint location, GLsizei count, const GLint * value); /* 482 */
- void (GLAPIENTRYP UniformMatrix2fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); /* 483 */
- void (GLAPIENTRYP UniformMatrix3fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); /* 484 */
- void (GLAPIENTRYP UniformMatrix4fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); /* 485 */
- void (GLAPIENTRYP UseProgram)(GLuint program); /* 486 */
- void (GLAPIENTRYP ValidateProgram)(GLuint program); /* 487 */
- void (GLAPIENTRYP VertexAttrib1f)(GLuint index, GLfloat x); /* 488 */
- void (GLAPIENTRYP VertexAttrib1fv)(GLuint index, const GLfloat * v); /* 489 */
- void (GLAPIENTRYP VertexAttrib2f)(GLuint index, GLfloat x, GLfloat y); /* 490 */
- void (GLAPIENTRYP VertexAttrib2fv)(GLuint index, const GLfloat * v); /* 491 */
- void (GLAPIENTRYP VertexAttrib3f)(GLuint index, GLfloat x, GLfloat y, GLfloat z); /* 492 */
- void (GLAPIENTRYP VertexAttrib3fv)(GLuint index, const GLfloat * v); /* 493 */
- void (GLAPIENTRYP VertexAttrib4f)(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); /* 494 */
- void (GLAPIENTRYP VertexAttrib4fv)(GLuint index, const GLfloat * v); /* 495 */
- void (GLAPIENTRYP VertexAttribPointer)(GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid * pointer); /* 496 */
- void (GLAPIENTRYP BlendFuncSeparate)(GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); /* 497 */
- void (GLAPIENTRYP BindFramebuffer)(GLenum target, GLuint framebuffer); /* 498 */
- void (GLAPIENTRYP BindRenderbuffer)(GLenum target, GLuint renderbuffer); /* 499 */
- GLenum (GLAPIENTRYP CheckFramebufferStatus)(GLenum target); /* 500 */
- void (GLAPIENTRYP ClearDepthf)(GLclampf depth); /* 501 */
- void (GLAPIENTRYP DeleteFramebuffers)(GLsizei n, const GLuint * framebuffers); /* 502 */
- void (GLAPIENTRYP DeleteRenderbuffers)(GLsizei n, const GLuint * renderbuffers); /* 503 */
- void (GLAPIENTRYP DepthRangef)(GLclampf zNear, GLclampf zFar); /* 504 */
- void (GLAPIENTRYP FramebufferRenderbuffer)(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); /* 505 */
- void (GLAPIENTRYP FramebufferTexture2D)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); /* 506 */
- void (GLAPIENTRYP GenFramebuffers)(GLsizei n, GLuint * framebuffers); /* 507 */
- void (GLAPIENTRYP GenRenderbuffers)(GLsizei n, GLuint * renderbuffers); /* 508 */
- void (GLAPIENTRYP GenerateMipmap)(GLenum target); /* 509 */
- void (GLAPIENTRYP GetFramebufferAttachmentParameteriv)(GLenum target, GLenum attachment, GLenum pname, GLint * params); /* 510 */
- void (GLAPIENTRYP GetRenderbufferParameteriv)(GLenum target, GLenum pname, GLint * params); /* 511 */
- void (GLAPIENTRYP GetShaderPrecisionFormat)(GLenum shadertype, GLenum precisiontype, GLint * range, GLint * precision); /* 512 */
- GLboolean (GLAPIENTRYP IsFramebuffer)(GLuint framebuffer); /* 513 */
- GLboolean (GLAPIENTRYP IsRenderbuffer)(GLuint renderbuffer); /* 514 */
- void (GLAPIENTRYP ReleaseShaderCompiler)(void); /* 515 */
- void (GLAPIENTRYP RenderbufferStorage)(GLenum target, GLenum internalformat, GLsizei width, GLsizei height); /* 516 */
- void (GLAPIENTRYP ShaderBinary)(GLsizei n, const GLuint * shaders, GLenum binaryformat, const GLvoid * binary, GLsizei length); /* 517 */
-};
-
-#endif /* !defined( _GLAPI_TABLE_H_ ) */
diff --git a/src/mapi/es2api/glapi/glapitemp.h b/src/mapi/es2api/glapi/glapitemp.h
deleted file mode 100644
index 7ec8a524b88..00000000000
--- a/src/mapi/es2api/glapi/glapitemp.h
+++ /dev/null
@@ -1,4170 +0,0 @@
-/* DO NOT EDIT - This file generated automatically by gl_apitemp.py (from Mesa) script */
-
-/*
- * Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
- * (C) Copyright IBM Corporation 2004
- * 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
- * BRIAN PAUL, IBM,
- * AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
- * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-
-# if defined(__GNUC__) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590)) && defined(__ELF__)
-# define HIDDEN __attribute__((visibility("hidden")))
-# else
-# define HIDDEN
-# endif
-
-/*
- * This file is a template which generates the OpenGL API entry point
- * functions. It should be included by a .c file which first defines
- * the following macros:
- * KEYWORD1 - usually nothing, but might be __declspec(dllexport) on Win32
- * KEYWORD2 - usually nothing, but might be __stdcall on Win32
- * NAME(n) - builds the final function name (usually add "gl" prefix)
- * DISPATCH(func, args, msg) - code to do dispatch of named function.
- * msg is a printf-style debug message.
- * RETURN_DISPATCH(func, args, msg) - code to do dispatch with a return value
- *
- * Here is an example which generates the usual OpenGL functions:
- * #define KEYWORD1
- * #define KEYWORD2
- * #define NAME(func) gl##func
- * #define DISPATCH(func, args, msg) \
- * struct _glapi_table *dispatch = CurrentDispatch; \
- * (*dispatch->func) args
- * #define RETURN DISPATCH(func, args, msg) \
- * struct _glapi_table *dispatch = CurrentDispatch; \
- * return (*dispatch->func) args
- *
- */
-
-
-#if defined( NAME )
-#ifndef KEYWORD1
-#define KEYWORD1
-#endif
-
-#ifndef KEYWORD1_ALT
-#define KEYWORD1_ALT HIDDEN
-#endif
-
-#ifndef KEYWORD2
-#define KEYWORD2
-#endif
-
-#ifndef DISPATCH
-#error DISPATCH must be defined
-#endif
-
-#ifndef RETURN_DISPATCH
-#error RETURN_DISPATCH must be defined
-#endif
-
-
-#ifndef _GLAPI_SKIP_NORMAL_ENTRY_POINTS
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_0)(GLuint list, GLenum mode);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_0)(GLuint list, GLenum mode)
-{
- DISPATCH(NewList, (list, mode), (F, "glNewList(%d, 0x%x);\n", list, mode));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_1)(void);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_1)(void)
-{
- DISPATCH(EndList, (), (F, "glEndList();\n"));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_2)(GLuint list);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_2)(GLuint list)
-{
- DISPATCH(CallList, (list), (F, "glCallList(%d);\n", list));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_3)(GLsizei n, GLenum type, const GLvoid * lists);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_3)(GLsizei n, GLenum type, const GLvoid * lists)
-{
- DISPATCH(CallLists, (n, type, lists), (F, "glCallLists(%d, 0x%x, %p);\n", n, type, (const void *) lists));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_4)(GLuint list, GLsizei range);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_4)(GLuint list, GLsizei range)
-{
- DISPATCH(DeleteLists, (list, range), (F, "glDeleteLists(%d, %d);\n", list, range));
-}
-
-KEYWORD1_ALT GLuint KEYWORD2 NAME(_dispatch_stub_5)(GLsizei range);
-
-KEYWORD1_ALT GLuint KEYWORD2 NAME(_dispatch_stub_5)(GLsizei range)
-{
- RETURN_DISPATCH(GenLists, (range), (F, "glGenLists(%d);\n", range));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_6)(GLuint base);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_6)(GLuint base)
-{
- DISPATCH(ListBase, (base), (F, "glListBase(%d);\n", base));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_7)(GLenum mode);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_7)(GLenum mode)
-{
- DISPATCH(Begin, (mode), (F, "glBegin(0x%x);\n", mode));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_8)(GLsizei width, GLsizei height, GLfloat xorig, GLfloat yorig, GLfloat xmove, GLfloat ymove, const GLubyte * bitmap);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_8)(GLsizei width, GLsizei height, GLfloat xorig, GLfloat yorig, GLfloat xmove, GLfloat ymove, const GLubyte * bitmap)
-{
- DISPATCH(Bitmap, (width, height, xorig, yorig, xmove, ymove, bitmap), (F, "glBitmap(%d, %d, %f, %f, %f, %f, %p);\n", width, height, xorig, yorig, xmove, ymove, (const void *) bitmap));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_9)(GLbyte red, GLbyte green, GLbyte blue);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_9)(GLbyte red, GLbyte green, GLbyte blue)
-{
- DISPATCH(Color3b, (red, green, blue), (F, "glColor3b(%d, %d, %d);\n", red, green, blue));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_10)(const GLbyte * v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_10)(const GLbyte * v)
-{
- DISPATCH(Color3bv, (v), (F, "glColor3bv(%p);\n", (const void *) v));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_11)(GLdouble red, GLdouble green, GLdouble blue);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_11)(GLdouble red, GLdouble green, GLdouble blue)
-{
- DISPATCH(Color3d, (red, green, blue), (F, "glColor3d(%f, %f, %f);\n", red, green, blue));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_12)(const GLdouble * v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_12)(const GLdouble * v)
-{
- DISPATCH(Color3dv, (v), (F, "glColor3dv(%p);\n", (const void *) v));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_13)(GLfloat red, GLfloat green, GLfloat blue);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_13)(GLfloat red, GLfloat green, GLfloat blue)
-{
- DISPATCH(Color3f, (red, green, blue), (F, "glColor3f(%f, %f, %f);\n", red, green, blue));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_14)(const GLfloat * v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_14)(const GLfloat * v)
-{
- DISPATCH(Color3fv, (v), (F, "glColor3fv(%p);\n", (const void *) v));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_15)(GLint red, GLint green, GLint blue);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_15)(GLint red, GLint green, GLint blue)
-{
- DISPATCH(Color3i, (red, green, blue), (F, "glColor3i(%d, %d, %d);\n", red, green, blue));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_16)(const GLint * v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_16)(const GLint * v)
-{
- DISPATCH(Color3iv, (v), (F, "glColor3iv(%p);\n", (const void *) v));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_17)(GLshort red, GLshort green, GLshort blue);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_17)(GLshort red, GLshort green, GLshort blue)
-{
- DISPATCH(Color3s, (red, green, blue), (F, "glColor3s(%d, %d, %d);\n", red, green, blue));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_18)(const GLshort * v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_18)(const GLshort * v)
-{
- DISPATCH(Color3sv, (v), (F, "glColor3sv(%p);\n", (const void *) v));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_19)(GLubyte red, GLubyte green, GLubyte blue);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_19)(GLubyte red, GLubyte green, GLubyte blue)
-{
- DISPATCH(Color3ub, (red, green, blue), (F, "glColor3ub(%d, %d, %d);\n", red, green, blue));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_20)(const GLubyte * v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_20)(const GLubyte * v)
-{
- DISPATCH(Color3ubv, (v), (F, "glColor3ubv(%p);\n", (const void *) v));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_21)(GLuint red, GLuint green, GLuint blue);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_21)(GLuint red, GLuint green, GLuint blue)
-{
- DISPATCH(Color3ui, (red, green, blue), (F, "glColor3ui(%d, %d, %d);\n", red, green, blue));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_22)(const GLuint * v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_22)(const GLuint * v)
-{
- DISPATCH(Color3uiv, (v), (F, "glColor3uiv(%p);\n", (const void *) v));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_23)(GLushort red, GLushort green, GLushort blue);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_23)(GLushort red, GLushort green, GLushort blue)
-{
- DISPATCH(Color3us, (red, green, blue), (F, "glColor3us(%d, %d, %d);\n", red, green, blue));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_24)(const GLushort * v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_24)(const GLushort * v)
-{
- DISPATCH(Color3usv, (v), (F, "glColor3usv(%p);\n", (const void *) v));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_25)(GLbyte red, GLbyte green, GLbyte blue, GLbyte alpha);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_25)(GLbyte red, GLbyte green, GLbyte blue, GLbyte alpha)
-{
- DISPATCH(Color4b, (red, green, blue, alpha), (F, "glColor4b(%d, %d, %d, %d);\n", red, green, blue, alpha));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_26)(const GLbyte * v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_26)(const GLbyte * v)
-{
- DISPATCH(Color4bv, (v), (F, "glColor4bv(%p);\n", (const void *) v));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_27)(GLdouble red, GLdouble green, GLdouble blue, GLdouble alpha);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_27)(GLdouble red, GLdouble green, GLdouble blue, GLdouble alpha)
-{
- DISPATCH(Color4d, (red, green, blue, alpha), (F, "glColor4d(%f, %f, %f, %f);\n", red, green, blue, alpha));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_28)(const GLdouble * v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_28)(const GLdouble * v)
-{
- DISPATCH(Color4dv, (v), (F, "glColor4dv(%p);\n", (const void *) v));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_29)(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_29)(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha)
-{
- DISPATCH(Color4f, (red, green, blue, alpha), (F, "glColor4f(%f, %f, %f, %f);\n", red, green, blue, alpha));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_30)(const GLfloat * v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_30)(const GLfloat * v)
-{
- DISPATCH(Color4fv, (v), (F, "glColor4fv(%p);\n", (const void *) v));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_31)(GLint red, GLint green, GLint blue, GLint alpha);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_31)(GLint red, GLint green, GLint blue, GLint alpha)
-{
- DISPATCH(Color4i, (red, green, blue, alpha), (F, "glColor4i(%d, %d, %d, %d);\n", red, green, blue, alpha));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_32)(const GLint * v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_32)(const GLint * v)
-{
- DISPATCH(Color4iv, (v), (F, "glColor4iv(%p);\n", (const void *) v));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_33)(GLshort red, GLshort green, GLshort blue, GLshort alpha);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_33)(GLshort red, GLshort green, GLshort blue, GLshort alpha)
-{
- DISPATCH(Color4s, (red, green, blue, alpha), (F, "glColor4s(%d, %d, %d, %d);\n", red, green, blue, alpha));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_34)(const GLshort * v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_34)(const GLshort * v)
-{
- DISPATCH(Color4sv, (v), (F, "glColor4sv(%p);\n", (const void *) v));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_35)(GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_35)(GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha)
-{
- DISPATCH(Color4ub, (red, green, blue, alpha), (F, "glColor4ub(%d, %d, %d, %d);\n", red, green, blue, alpha));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_36)(const GLubyte * v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_36)(const GLubyte * v)
-{
- DISPATCH(Color4ubv, (v), (F, "glColor4ubv(%p);\n", (const void *) v));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_37)(GLuint red, GLuint green, GLuint blue, GLuint alpha);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_37)(GLuint red, GLuint green, GLuint blue, GLuint alpha)
-{
- DISPATCH(Color4ui, (red, green, blue, alpha), (F, "glColor4ui(%d, %d, %d, %d);\n", red, green, blue, alpha));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_38)(const GLuint * v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_38)(const GLuint * v)
-{
- DISPATCH(Color4uiv, (v), (F, "glColor4uiv(%p);\n", (const void *) v));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_39)(GLushort red, GLushort green, GLushort blue, GLushort alpha);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_39)(GLushort red, GLushort green, GLushort blue, GLushort alpha)
-{
- DISPATCH(Color4us, (red, green, blue, alpha), (F, "glColor4us(%d, %d, %d, %d);\n", red, green, blue, alpha));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_40)(const GLushort * v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_40)(const GLushort * v)
-{
- DISPATCH(Color4usv, (v), (F, "glColor4usv(%p);\n", (const void *) v));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_41)(GLboolean flag);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_41)(GLboolean flag)
-{
- DISPATCH(EdgeFlag, (flag), (F, "glEdgeFlag(%d);\n", flag));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_42)(const GLboolean * flag);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_42)(const GLboolean * flag)
-{
- DISPATCH(EdgeFlagv, (flag), (F, "glEdgeFlagv(%p);\n", (const void *) flag));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_43)(void);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_43)(void)
-{
- DISPATCH(End, (), (F, "glEnd();\n"));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_44)(GLdouble c);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_44)(GLdouble c)
-{
- DISPATCH(Indexd, (c), (F, "glIndexd(%f);\n", c));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_45)(const GLdouble * c);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_45)(const GLdouble * c)
-{
- DISPATCH(Indexdv, (c), (F, "glIndexdv(%p);\n", (const void *) c));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_46)(GLfloat c);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_46)(GLfloat c)
-{
- DISPATCH(Indexf, (c), (F, "glIndexf(%f);\n", c));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_47)(const GLfloat * c);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_47)(const GLfloat * c)
-{
- DISPATCH(Indexfv, (c), (F, "glIndexfv(%p);\n", (const void *) c));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_48)(GLint c);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_48)(GLint c)
-{
- DISPATCH(Indexi, (c), (F, "glIndexi(%d);\n", c));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_49)(const GLint * c);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_49)(const GLint * c)
-{
- DISPATCH(Indexiv, (c), (F, "glIndexiv(%p);\n", (const void *) c));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_50)(GLshort c);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_50)(GLshort c)
-{
- DISPATCH(Indexs, (c), (F, "glIndexs(%d);\n", c));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_51)(const GLshort * c);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_51)(const GLshort * c)
-{
- DISPATCH(Indexsv, (c), (F, "glIndexsv(%p);\n", (const void *) c));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_52)(GLbyte nx, GLbyte ny, GLbyte nz);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_52)(GLbyte nx, GLbyte ny, GLbyte nz)
-{
- DISPATCH(Normal3b, (nx, ny, nz), (F, "glNormal3b(%d, %d, %d);\n", nx, ny, nz));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_53)(const GLbyte * v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_53)(const GLbyte * v)
-{
- DISPATCH(Normal3bv, (v), (F, "glNormal3bv(%p);\n", (const void *) v));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_54)(GLdouble nx, GLdouble ny, GLdouble nz);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_54)(GLdouble nx, GLdouble ny, GLdouble nz)
-{
- DISPATCH(Normal3d, (nx, ny, nz), (F, "glNormal3d(%f, %f, %f);\n", nx, ny, nz));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_55)(const GLdouble * v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_55)(const GLdouble * v)
-{
- DISPATCH(Normal3dv, (v), (F, "glNormal3dv(%p);\n", (const void *) v));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_56)(GLfloat nx, GLfloat ny, GLfloat nz);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_56)(GLfloat nx, GLfloat ny, GLfloat nz)
-{
- DISPATCH(Normal3f, (nx, ny, nz), (F, "glNormal3f(%f, %f, %f);\n", nx, ny, nz));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_57)(const GLfloat * v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_57)(const GLfloat * v)
-{
- DISPATCH(Normal3fv, (v), (F, "glNormal3fv(%p);\n", (const void *) v));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_58)(GLint nx, GLint ny, GLint nz);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_58)(GLint nx, GLint ny, GLint nz)
-{
- DISPATCH(Normal3i, (nx, ny, nz), (F, "glNormal3i(%d, %d, %d);\n", nx, ny, nz));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_59)(const GLint * v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_59)(const GLint * v)
-{
- DISPATCH(Normal3iv, (v), (F, "glNormal3iv(%p);\n", (const void *) v));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_60)(GLshort nx, GLshort ny, GLshort nz);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_60)(GLshort nx, GLshort ny, GLshort nz)
-{
- DISPATCH(Normal3s, (nx, ny, nz), (F, "glNormal3s(%d, %d, %d);\n", nx, ny, nz));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_61)(const GLshort * v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_61)(const GLshort * v)
-{
- DISPATCH(Normal3sv, (v), (F, "glNormal3sv(%p);\n", (const void *) v));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_62)(GLdouble x, GLdouble y);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_62)(GLdouble x, GLdouble y)
-{
- DISPATCH(RasterPos2d, (x, y), (F, "glRasterPos2d(%f, %f);\n", x, y));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_63)(const GLdouble * v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_63)(const GLdouble * v)
-{
- DISPATCH(RasterPos2dv, (v), (F, "glRasterPos2dv(%p);\n", (const void *) v));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_64)(GLfloat x, GLfloat y);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_64)(GLfloat x, GLfloat y)
-{
- DISPATCH(RasterPos2f, (x, y), (F, "glRasterPos2f(%f, %f);\n", x, y));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_65)(const GLfloat * v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_65)(const GLfloat * v)
-{
- DISPATCH(RasterPos2fv, (v), (F, "glRasterPos2fv(%p);\n", (const void *) v));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_66)(GLint x, GLint y);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_66)(GLint x, GLint y)
-{
- DISPATCH(RasterPos2i, (x, y), (F, "glRasterPos2i(%d, %d);\n", x, y));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_67)(const GLint * v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_67)(const GLint * v)
-{
- DISPATCH(RasterPos2iv, (v), (F, "glRasterPos2iv(%p);\n", (const void *) v));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_68)(GLshort x, GLshort y);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_68)(GLshort x, GLshort y)
-{
- DISPATCH(RasterPos2s, (x, y), (F, "glRasterPos2s(%d, %d);\n", x, y));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_69)(const GLshort * v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_69)(const GLshort * v)
-{
- DISPATCH(RasterPos2sv, (v), (F, "glRasterPos2sv(%p);\n", (const void *) v));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_70)(GLdouble x, GLdouble y, GLdouble z);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_70)(GLdouble x, GLdouble y, GLdouble z)
-{
- DISPATCH(RasterPos3d, (x, y, z), (F, "glRasterPos3d(%f, %f, %f);\n", x, y, z));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_71)(const GLdouble * v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_71)(const GLdouble * v)
-{
- DISPATCH(RasterPos3dv, (v), (F, "glRasterPos3dv(%p);\n", (const void *) v));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_72)(GLfloat x, GLfloat y, GLfloat z);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_72)(GLfloat x, GLfloat y, GLfloat z)
-{
- DISPATCH(RasterPos3f, (x, y, z), (F, "glRasterPos3f(%f, %f, %f);\n", x, y, z));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_73)(const GLfloat * v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_73)(const GLfloat * v)
-{
- DISPATCH(RasterPos3fv, (v), (F, "glRasterPos3fv(%p);\n", (const void *) v));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_74)(GLint x, GLint y, GLint z);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_74)(GLint x, GLint y, GLint z)
-{
- DISPATCH(RasterPos3i, (x, y, z), (F, "glRasterPos3i(%d, %d, %d);\n", x, y, z));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_75)(const GLint * v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_75)(const GLint * v)
-{
- DISPATCH(RasterPos3iv, (v), (F, "glRasterPos3iv(%p);\n", (const void *) v));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_76)(GLshort x, GLshort y, GLshort z);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_76)(GLshort x, GLshort y, GLshort z)
-{
- DISPATCH(RasterPos3s, (x, y, z), (F, "glRasterPos3s(%d, %d, %d);\n", x, y, z));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_77)(const GLshort * v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_77)(const GLshort * v)
-{
- DISPATCH(RasterPos3sv, (v), (F, "glRasterPos3sv(%p);\n", (const void *) v));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_78)(GLdouble x, GLdouble y, GLdouble z, GLdouble w);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_78)(GLdouble x, GLdouble y, GLdouble z, GLdouble w)
-{
- DISPATCH(RasterPos4d, (x, y, z, w), (F, "glRasterPos4d(%f, %f, %f, %f);\n", x, y, z, w));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_79)(const GLdouble * v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_79)(const GLdouble * v)
-{
- DISPATCH(RasterPos4dv, (v), (F, "glRasterPos4dv(%p);\n", (const void *) v));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_80)(GLfloat x, GLfloat y, GLfloat z, GLfloat w);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_80)(GLfloat x, GLfloat y, GLfloat z, GLfloat w)
-{
- DISPATCH(RasterPos4f, (x, y, z, w), (F, "glRasterPos4f(%f, %f, %f, %f);\n", x, y, z, w));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_81)(const GLfloat * v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_81)(const GLfloat * v)
-{
- DISPATCH(RasterPos4fv, (v), (F, "glRasterPos4fv(%p);\n", (const void *) v));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_82)(GLint x, GLint y, GLint z, GLint w);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_82)(GLint x, GLint y, GLint z, GLint w)
-{
- DISPATCH(RasterPos4i, (x, y, z, w), (F, "glRasterPos4i(%d, %d, %d, %d);\n", x, y, z, w));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_83)(const GLint * v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_83)(const GLint * v)
-{
- DISPATCH(RasterPos4iv, (v), (F, "glRasterPos4iv(%p);\n", (const void *) v));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_84)(GLshort x, GLshort y, GLshort z, GLshort w);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_84)(GLshort x, GLshort y, GLshort z, GLshort w)
-{
- DISPATCH(RasterPos4s, (x, y, z, w), (F, "glRasterPos4s(%d, %d, %d, %d);\n", x, y, z, w));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_85)(const GLshort * v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_85)(const GLshort * v)
-{
- DISPATCH(RasterPos4sv, (v), (F, "glRasterPos4sv(%p);\n", (const void *) v));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_86)(GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_86)(GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2)
-{
- DISPATCH(Rectd, (x1, y1, x2, y2), (F, "glRectd(%f, %f, %f, %f);\n", x1, y1, x2, y2));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_87)(const GLdouble * v1, const GLdouble * v2);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_87)(const GLdouble * v1, const GLdouble * v2)
-{
- DISPATCH(Rectdv, (v1, v2), (F, "glRectdv(%p, %p);\n", (const void *) v1, (const void *) v2));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_88)(GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_88)(GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2)
-{
- DISPATCH(Rectf, (x1, y1, x2, y2), (F, "glRectf(%f, %f, %f, %f);\n", x1, y1, x2, y2));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_89)(const GLfloat * v1, const GLfloat * v2);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_89)(const GLfloat * v1, const GLfloat * v2)
-{
- DISPATCH(Rectfv, (v1, v2), (F, "glRectfv(%p, %p);\n", (const void *) v1, (const void *) v2));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_90)(GLint x1, GLint y1, GLint x2, GLint y2);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_90)(GLint x1, GLint y1, GLint x2, GLint y2)
-{
- DISPATCH(Recti, (x1, y1, x2, y2), (F, "glRecti(%d, %d, %d, %d);\n", x1, y1, x2, y2));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_91)(const GLint * v1, const GLint * v2);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_91)(const GLint * v1, const GLint * v2)
-{
- DISPATCH(Rectiv, (v1, v2), (F, "glRectiv(%p, %p);\n", (const void *) v1, (const void *) v2));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_92)(GLshort x1, GLshort y1, GLshort x2, GLshort y2);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_92)(GLshort x1, GLshort y1, GLshort x2, GLshort y2)
-{
- DISPATCH(Rects, (x1, y1, x2, y2), (F, "glRects(%d, %d, %d, %d);\n", x1, y1, x2, y2));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_93)(const GLshort * v1, const GLshort * v2);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_93)(const GLshort * v1, const GLshort * v2)
-{
- DISPATCH(Rectsv, (v1, v2), (F, "glRectsv(%p, %p);\n", (const void *) v1, (const void *) v2));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_94)(GLdouble s);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_94)(GLdouble s)
-{
- DISPATCH(TexCoord1d, (s), (F, "glTexCoord1d(%f);\n", s));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_95)(const GLdouble * v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_95)(const GLdouble * v)
-{
- DISPATCH(TexCoord1dv, (v), (F, "glTexCoord1dv(%p);\n", (const void *) v));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_96)(GLfloat s);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_96)(GLfloat s)
-{
- DISPATCH(TexCoord1f, (s), (F, "glTexCoord1f(%f);\n", s));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_97)(const GLfloat * v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_97)(const GLfloat * v)
-{
- DISPATCH(TexCoord1fv, (v), (F, "glTexCoord1fv(%p);\n", (const void *) v));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_98)(GLint s);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_98)(GLint s)
-{
- DISPATCH(TexCoord1i, (s), (F, "glTexCoord1i(%d);\n", s));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_99)(const GLint * v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_99)(const GLint * v)
-{
- DISPATCH(TexCoord1iv, (v), (F, "glTexCoord1iv(%p);\n", (const void *) v));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_100)(GLshort s);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_100)(GLshort s)
-{
- DISPATCH(TexCoord1s, (s), (F, "glTexCoord1s(%d);\n", s));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_101)(const GLshort * v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_101)(const GLshort * v)
-{
- DISPATCH(TexCoord1sv, (v), (F, "glTexCoord1sv(%p);\n", (const void *) v));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_102)(GLdouble s, GLdouble t);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_102)(GLdouble s, GLdouble t)
-{
- DISPATCH(TexCoord2d, (s, t), (F, "glTexCoord2d(%f, %f);\n", s, t));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_103)(const GLdouble * v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_103)(const GLdouble * v)
-{
- DISPATCH(TexCoord2dv, (v), (F, "glTexCoord2dv(%p);\n", (const void *) v));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_104)(GLfloat s, GLfloat t);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_104)(GLfloat s, GLfloat t)
-{
- DISPATCH(TexCoord2f, (s, t), (F, "glTexCoord2f(%f, %f);\n", s, t));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_105)(const GLfloat * v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_105)(const GLfloat * v)
-{
- DISPATCH(TexCoord2fv, (v), (F, "glTexCoord2fv(%p);\n", (const void *) v));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_106)(GLint s, GLint t);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_106)(GLint s, GLint t)
-{
- DISPATCH(TexCoord2i, (s, t), (F, "glTexCoord2i(%d, %d);\n", s, t));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_107)(const GLint * v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_107)(const GLint * v)
-{
- DISPATCH(TexCoord2iv, (v), (F, "glTexCoord2iv(%p);\n", (const void *) v));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_108)(GLshort s, GLshort t);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_108)(GLshort s, GLshort t)
-{
- DISPATCH(TexCoord2s, (s, t), (F, "glTexCoord2s(%d, %d);\n", s, t));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_109)(const GLshort * v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_109)(const GLshort * v)
-{
- DISPATCH(TexCoord2sv, (v), (F, "glTexCoord2sv(%p);\n", (const void *) v));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_110)(GLdouble s, GLdouble t, GLdouble r);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_110)(GLdouble s, GLdouble t, GLdouble r)
-{
- DISPATCH(TexCoord3d, (s, t, r), (F, "glTexCoord3d(%f, %f, %f);\n", s, t, r));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_111)(const GLdouble * v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_111)(const GLdouble * v)
-{
- DISPATCH(TexCoord3dv, (v), (F, "glTexCoord3dv(%p);\n", (const void *) v));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_112)(GLfloat s, GLfloat t, GLfloat r);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_112)(GLfloat s, GLfloat t, GLfloat r)
-{
- DISPATCH(TexCoord3f, (s, t, r), (F, "glTexCoord3f(%f, %f, %f);\n", s, t, r));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_113)(const GLfloat * v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_113)(const GLfloat * v)
-{
- DISPATCH(TexCoord3fv, (v), (F, "glTexCoord3fv(%p);\n", (const void *) v));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_114)(GLint s, GLint t, GLint r);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_114)(GLint s, GLint t, GLint r)
-{
- DISPATCH(TexCoord3i, (s, t, r), (F, "glTexCoord3i(%d, %d, %d);\n", s, t, r));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_115)(const GLint * v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_115)(const GLint * v)
-{
- DISPATCH(TexCoord3iv, (v), (F, "glTexCoord3iv(%p);\n", (const void *) v));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_116)(GLshort s, GLshort t, GLshort r);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_116)(GLshort s, GLshort t, GLshort r)
-{
- DISPATCH(TexCoord3s, (s, t, r), (F, "glTexCoord3s(%d, %d, %d);\n", s, t, r));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_117)(const GLshort * v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_117)(const GLshort * v)
-{
- DISPATCH(TexCoord3sv, (v), (F, "glTexCoord3sv(%p);\n", (const void *) v));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_118)(GLdouble s, GLdouble t, GLdouble r, GLdouble q);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_118)(GLdouble s, GLdouble t, GLdouble r, GLdouble q)
-{
- DISPATCH(TexCoord4d, (s, t, r, q), (F, "glTexCoord4d(%f, %f, %f, %f);\n", s, t, r, q));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_119)(const GLdouble * v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_119)(const GLdouble * v)
-{
- DISPATCH(TexCoord4dv, (v), (F, "glTexCoord4dv(%p);\n", (const void *) v));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_120)(GLfloat s, GLfloat t, GLfloat r, GLfloat q);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_120)(GLfloat s, GLfloat t, GLfloat r, GLfloat q)
-{
- DISPATCH(TexCoord4f, (s, t, r, q), (F, "glTexCoord4f(%f, %f, %f, %f);\n", s, t, r, q));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_121)(const GLfloat * v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_121)(const GLfloat * v)
-{
- DISPATCH(TexCoord4fv, (v), (F, "glTexCoord4fv(%p);\n", (const void *) v));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_122)(GLint s, GLint t, GLint r, GLint q);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_122)(GLint s, GLint t, GLint r, GLint q)
-{
- DISPATCH(TexCoord4i, (s, t, r, q), (F, "glTexCoord4i(%d, %d, %d, %d);\n", s, t, r, q));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_123)(const GLint * v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_123)(const GLint * v)
-{
- DISPATCH(TexCoord4iv, (v), (F, "glTexCoord4iv(%p);\n", (const void *) v));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_124)(GLshort s, GLshort t, GLshort r, GLshort q);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_124)(GLshort s, GLshort t, GLshort r, GLshort q)
-{
- DISPATCH(TexCoord4s, (s, t, r, q), (F, "glTexCoord4s(%d, %d, %d, %d);\n", s, t, r, q));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_125)(const GLshort * v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_125)(const GLshort * v)
-{
- DISPATCH(TexCoord4sv, (v), (F, "glTexCoord4sv(%p);\n", (const void *) v));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_126)(GLdouble x, GLdouble y);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_126)(GLdouble x, GLdouble y)
-{
- DISPATCH(Vertex2d, (x, y), (F, "glVertex2d(%f, %f);\n", x, y));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_127)(const GLdouble * v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_127)(const GLdouble * v)
-{
- DISPATCH(Vertex2dv, (v), (F, "glVertex2dv(%p);\n", (const void *) v));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_128)(GLfloat x, GLfloat y);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_128)(GLfloat x, GLfloat y)
-{
- DISPATCH(Vertex2f, (x, y), (F, "glVertex2f(%f, %f);\n", x, y));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_129)(const GLfloat * v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_129)(const GLfloat * v)
-{
- DISPATCH(Vertex2fv, (v), (F, "glVertex2fv(%p);\n", (const void *) v));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_130)(GLint x, GLint y);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_130)(GLint x, GLint y)
-{
- DISPATCH(Vertex2i, (x, y), (F, "glVertex2i(%d, %d);\n", x, y));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_131)(const GLint * v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_131)(const GLint * v)
-{
- DISPATCH(Vertex2iv, (v), (F, "glVertex2iv(%p);\n", (const void *) v));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_132)(GLshort x, GLshort y);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_132)(GLshort x, GLshort y)
-{
- DISPATCH(Vertex2s, (x, y), (F, "glVertex2s(%d, %d);\n", x, y));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_133)(const GLshort * v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_133)(const GLshort * v)
-{
- DISPATCH(Vertex2sv, (v), (F, "glVertex2sv(%p);\n", (const void *) v));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_134)(GLdouble x, GLdouble y, GLdouble z);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_134)(GLdouble x, GLdouble y, GLdouble z)
-{
- DISPATCH(Vertex3d, (x, y, z), (F, "glVertex3d(%f, %f, %f);\n", x, y, z));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_135)(const GLdouble * v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_135)(const GLdouble * v)
-{
- DISPATCH(Vertex3dv, (v), (F, "glVertex3dv(%p);\n", (const void *) v));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_136)(GLfloat x, GLfloat y, GLfloat z);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_136)(GLfloat x, GLfloat y, GLfloat z)
-{
- DISPATCH(Vertex3f, (x, y, z), (F, "glVertex3f(%f, %f, %f);\n", x, y, z));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_137)(const GLfloat * v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_137)(const GLfloat * v)
-{
- DISPATCH(Vertex3fv, (v), (F, "glVertex3fv(%p);\n", (const void *) v));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_138)(GLint x, GLint y, GLint z);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_138)(GLint x, GLint y, GLint z)
-{
- DISPATCH(Vertex3i, (x, y, z), (F, "glVertex3i(%d, %d, %d);\n", x, y, z));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_139)(const GLint * v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_139)(const GLint * v)
-{
- DISPATCH(Vertex3iv, (v), (F, "glVertex3iv(%p);\n", (const void *) v));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_140)(GLshort x, GLshort y, GLshort z);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_140)(GLshort x, GLshort y, GLshort z)
-{
- DISPATCH(Vertex3s, (x, y, z), (F, "glVertex3s(%d, %d, %d);\n", x, y, z));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_141)(const GLshort * v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_141)(const GLshort * v)
-{
- DISPATCH(Vertex3sv, (v), (F, "glVertex3sv(%p);\n", (const void *) v));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_142)(GLdouble x, GLdouble y, GLdouble z, GLdouble w);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_142)(GLdouble x, GLdouble y, GLdouble z, GLdouble w)
-{
- DISPATCH(Vertex4d, (x, y, z, w), (F, "glVertex4d(%f, %f, %f, %f);\n", x, y, z, w));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_143)(const GLdouble * v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_143)(const GLdouble * v)
-{
- DISPATCH(Vertex4dv, (v), (F, "glVertex4dv(%p);\n", (const void *) v));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_144)(GLfloat x, GLfloat y, GLfloat z, GLfloat w);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_144)(GLfloat x, GLfloat y, GLfloat z, GLfloat w)
-{
- DISPATCH(Vertex4f, (x, y, z, w), (F, "glVertex4f(%f, %f, %f, %f);\n", x, y, z, w));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_145)(const GLfloat * v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_145)(const GLfloat * v)
-{
- DISPATCH(Vertex4fv, (v), (F, "glVertex4fv(%p);\n", (const void *) v));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_146)(GLint x, GLint y, GLint z, GLint w);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_146)(GLint x, GLint y, GLint z, GLint w)
-{
- DISPATCH(Vertex4i, (x, y, z, w), (F, "glVertex4i(%d, %d, %d, %d);\n", x, y, z, w));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_147)(const GLint * v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_147)(const GLint * v)
-{
- DISPATCH(Vertex4iv, (v), (F, "glVertex4iv(%p);\n", (const void *) v));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_148)(GLshort x, GLshort y, GLshort z, GLshort w);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_148)(GLshort x, GLshort y, GLshort z, GLshort w)
-{
- DISPATCH(Vertex4s, (x, y, z, w), (F, "glVertex4s(%d, %d, %d, %d);\n", x, y, z, w));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_149)(const GLshort * v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_149)(const GLshort * v)
-{
- DISPATCH(Vertex4sv, (v), (F, "glVertex4sv(%p);\n", (const void *) v));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_150)(GLenum plane, const GLdouble * equation);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_150)(GLenum plane, const GLdouble * equation)
-{
- DISPATCH(ClipPlane, (plane, equation), (F, "glClipPlane(0x%x, %p);\n", plane, (const void *) equation));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_151)(GLenum face, GLenum mode);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_151)(GLenum face, GLenum mode)
-{
- DISPATCH(ColorMaterial, (face, mode), (F, "glColorMaterial(0x%x, 0x%x);\n", face, mode));
-}
-
-KEYWORD1 void KEYWORD2 NAME(CullFace)(GLenum mode)
-{
- DISPATCH(CullFace, (mode), (F, "glCullFace(0x%x);\n", mode));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_153)(GLenum pname, GLfloat param);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_153)(GLenum pname, GLfloat param)
-{
- DISPATCH(Fogf, (pname, param), (F, "glFogf(0x%x, %f);\n", pname, param));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_154)(GLenum pname, const GLfloat * params);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_154)(GLenum pname, const GLfloat * params)
-{
- DISPATCH(Fogfv, (pname, params), (F, "glFogfv(0x%x, %p);\n", pname, (const void *) params));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_155)(GLenum pname, GLint param);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_155)(GLenum pname, GLint param)
-{
- DISPATCH(Fogi, (pname, param), (F, "glFogi(0x%x, %d);\n", pname, param));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_156)(GLenum pname, const GLint * params);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_156)(GLenum pname, const GLint * params)
-{
- DISPATCH(Fogiv, (pname, params), (F, "glFogiv(0x%x, %p);\n", pname, (const void *) params));
-}
-
-KEYWORD1 void KEYWORD2 NAME(FrontFace)(GLenum mode)
-{
- DISPATCH(FrontFace, (mode), (F, "glFrontFace(0x%x);\n", mode));
-}
-
-KEYWORD1 void KEYWORD2 NAME(Hint)(GLenum target, GLenum mode)
-{
- DISPATCH(Hint, (target, mode), (F, "glHint(0x%x, 0x%x);\n", target, mode));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_159)(GLenum light, GLenum pname, GLfloat param);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_159)(GLenum light, GLenum pname, GLfloat param)
-{
- DISPATCH(Lightf, (light, pname, param), (F, "glLightf(0x%x, 0x%x, %f);\n", light, pname, param));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_160)(GLenum light, GLenum pname, const GLfloat * params);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_160)(GLenum light, GLenum pname, const GLfloat * params)
-{
- DISPATCH(Lightfv, (light, pname, params), (F, "glLightfv(0x%x, 0x%x, %p);\n", light, pname, (const void *) params));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_161)(GLenum light, GLenum pname, GLint param);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_161)(GLenum light, GLenum pname, GLint param)
-{
- DISPATCH(Lighti, (light, pname, param), (F, "glLighti(0x%x, 0x%x, %d);\n", light, pname, param));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_162)(GLenum light, GLenum pname, const GLint * params);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_162)(GLenum light, GLenum pname, const GLint * params)
-{
- DISPATCH(Lightiv, (light, pname, params), (F, "glLightiv(0x%x, 0x%x, %p);\n", light, pname, (const void *) params));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_163)(GLenum pname, GLfloat param);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_163)(GLenum pname, GLfloat param)
-{
- DISPATCH(LightModelf, (pname, param), (F, "glLightModelf(0x%x, %f);\n", pname, param));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_164)(GLenum pname, const GLfloat * params);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_164)(GLenum pname, const GLfloat * params)
-{
- DISPATCH(LightModelfv, (pname, params), (F, "glLightModelfv(0x%x, %p);\n", pname, (const void *) params));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_165)(GLenum pname, GLint param);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_165)(GLenum pname, GLint param)
-{
- DISPATCH(LightModeli, (pname, param), (F, "glLightModeli(0x%x, %d);\n", pname, param));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_166)(GLenum pname, const GLint * params);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_166)(GLenum pname, const GLint * params)
-{
- DISPATCH(LightModeliv, (pname, params), (F, "glLightModeliv(0x%x, %p);\n", pname, (const void *) params));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_167)(GLint factor, GLushort pattern);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_167)(GLint factor, GLushort pattern)
-{
- DISPATCH(LineStipple, (factor, pattern), (F, "glLineStipple(%d, %d);\n", factor, pattern));
-}
-
-KEYWORD1 void KEYWORD2 NAME(LineWidth)(GLfloat width)
-{
- DISPATCH(LineWidth, (width), (F, "glLineWidth(%f);\n", width));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_169)(GLenum face, GLenum pname, GLfloat param);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_169)(GLenum face, GLenum pname, GLfloat param)
-{
- DISPATCH(Materialf, (face, pname, param), (F, "glMaterialf(0x%x, 0x%x, %f);\n", face, pname, param));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_170)(GLenum face, GLenum pname, const GLfloat * params);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_170)(GLenum face, GLenum pname, const GLfloat * params)
-{
- DISPATCH(Materialfv, (face, pname, params), (F, "glMaterialfv(0x%x, 0x%x, %p);\n", face, pname, (const void *) params));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_171)(GLenum face, GLenum pname, GLint param);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_171)(GLenum face, GLenum pname, GLint param)
-{
- DISPATCH(Materiali, (face, pname, param), (F, "glMateriali(0x%x, 0x%x, %d);\n", face, pname, param));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_172)(GLenum face, GLenum pname, const GLint * params);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_172)(GLenum face, GLenum pname, const GLint * params)
-{
- DISPATCH(Materialiv, (face, pname, params), (F, "glMaterialiv(0x%x, 0x%x, %p);\n", face, pname, (const void *) params));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_173)(GLfloat size);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_173)(GLfloat size)
-{
- DISPATCH(PointSize, (size), (F, "glPointSize(%f);\n", size));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_174)(GLenum face, GLenum mode);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_174)(GLenum face, GLenum mode)
-{
- DISPATCH(PolygonMode, (face, mode), (F, "glPolygonMode(0x%x, 0x%x);\n", face, mode));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_175)(const GLubyte * mask);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_175)(const GLubyte * mask)
-{
- DISPATCH(PolygonStipple, (mask), (F, "glPolygonStipple(%p);\n", (const void *) mask));
-}
-
-KEYWORD1 void KEYWORD2 NAME(Scissor)(GLint x, GLint y, GLsizei width, GLsizei height)
-{
- DISPATCH(Scissor, (x, y, width, height), (F, "glScissor(%d, %d, %d, %d);\n", x, y, width, height));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_177)(GLenum mode);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_177)(GLenum mode)
-{
- DISPATCH(ShadeModel, (mode), (F, "glShadeModel(0x%x);\n", mode));
-}
-
-KEYWORD1 void KEYWORD2 NAME(TexParameterf)(GLenum target, GLenum pname, GLfloat param)
-{
- DISPATCH(TexParameterf, (target, pname, param), (F, "glTexParameterf(0x%x, 0x%x, %f);\n", target, pname, param));
-}
-
-KEYWORD1 void KEYWORD2 NAME(TexParameterfv)(GLenum target, GLenum pname, const GLfloat * params)
-{
- DISPATCH(TexParameterfv, (target, pname, params), (F, "glTexParameterfv(0x%x, 0x%x, %p);\n", target, pname, (const void *) params));
-}
-
-KEYWORD1 void KEYWORD2 NAME(TexParameteri)(GLenum target, GLenum pname, GLint param)
-{
- DISPATCH(TexParameteri, (target, pname, param), (F, "glTexParameteri(0x%x, 0x%x, %d);\n", target, pname, param));
-}
-
-KEYWORD1 void KEYWORD2 NAME(TexParameteriv)(GLenum target, GLenum pname, const GLint * params)
-{
- DISPATCH(TexParameteriv, (target, pname, params), (F, "glTexParameteriv(0x%x, 0x%x, %p);\n", target, pname, (const void *) params));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_182)(GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid * pixels);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_182)(GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid * pixels)
-{
- DISPATCH(TexImage1D, (target, level, internalformat, width, border, format, type, pixels), (F, "glTexImage1D(0x%x, %d, %d, %d, %d, 0x%x, 0x%x, %p);\n", target, level, internalformat, width, border, format, type, (const void *) pixels));
-}
-
-KEYWORD1 void KEYWORD2 NAME(TexImage2D)(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid * pixels)
-{
- DISPATCH(TexImage2D, (target, level, internalformat, width, height, border, format, type, pixels), (F, "glTexImage2D(0x%x, %d, %d, %d, %d, %d, 0x%x, 0x%x, %p);\n", target, level, internalformat, width, height, border, format, type, (const void *) pixels));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_184)(GLenum target, GLenum pname, GLfloat param);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_184)(GLenum target, GLenum pname, GLfloat param)
-{
- DISPATCH(TexEnvf, (target, pname, param), (F, "glTexEnvf(0x%x, 0x%x, %f);\n", target, pname, param));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_185)(GLenum target, GLenum pname, const GLfloat * params);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_185)(GLenum target, GLenum pname, const GLfloat * params)
-{
- DISPATCH(TexEnvfv, (target, pname, params), (F, "glTexEnvfv(0x%x, 0x%x, %p);\n", target, pname, (const void *) params));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_186)(GLenum target, GLenum pname, GLint param);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_186)(GLenum target, GLenum pname, GLint param)
-{
- DISPATCH(TexEnvi, (target, pname, param), (F, "glTexEnvi(0x%x, 0x%x, %d);\n", target, pname, param));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_187)(GLenum target, GLenum pname, const GLint * params);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_187)(GLenum target, GLenum pname, const GLint * params)
-{
- DISPATCH(TexEnviv, (target, pname, params), (F, "glTexEnviv(0x%x, 0x%x, %p);\n", target, pname, (const void *) params));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_188)(GLenum coord, GLenum pname, GLdouble param);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_188)(GLenum coord, GLenum pname, GLdouble param)
-{
- DISPATCH(TexGend, (coord, pname, param), (F, "glTexGend(0x%x, 0x%x, %f);\n", coord, pname, param));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_189)(GLenum coord, GLenum pname, const GLdouble * params);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_189)(GLenum coord, GLenum pname, const GLdouble * params)
-{
- DISPATCH(TexGendv, (coord, pname, params), (F, "glTexGendv(0x%x, 0x%x, %p);\n", coord, pname, (const void *) params));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_190)(GLenum coord, GLenum pname, GLfloat param);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_190)(GLenum coord, GLenum pname, GLfloat param)
-{
- DISPATCH(TexGenf, (coord, pname, param), (F, "glTexGenf(0x%x, 0x%x, %f);\n", coord, pname, param));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_191)(GLenum coord, GLenum pname, const GLfloat * params);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_191)(GLenum coord, GLenum pname, const GLfloat * params)
-{
- DISPATCH(TexGenfv, (coord, pname, params), (F, "glTexGenfv(0x%x, 0x%x, %p);\n", coord, pname, (const void *) params));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_192)(GLenum coord, GLenum pname, GLint param);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_192)(GLenum coord, GLenum pname, GLint param)
-{
- DISPATCH(TexGeni, (coord, pname, param), (F, "glTexGeni(0x%x, 0x%x, %d);\n", coord, pname, param));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_193)(GLenum coord, GLenum pname, const GLint * params);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_193)(GLenum coord, GLenum pname, const GLint * params)
-{
- DISPATCH(TexGeniv, (coord, pname, params), (F, "glTexGeniv(0x%x, 0x%x, %p);\n", coord, pname, (const void *) params));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_194)(GLsizei size, GLenum type, GLfloat * buffer);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_194)(GLsizei size, GLenum type, GLfloat * buffer)
-{
- DISPATCH(FeedbackBuffer, (size, type, buffer), (F, "glFeedbackBuffer(%d, 0x%x, %p);\n", size, type, (const void *) buffer));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_195)(GLsizei size, GLuint * buffer);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_195)(GLsizei size, GLuint * buffer)
-{
- DISPATCH(SelectBuffer, (size, buffer), (F, "glSelectBuffer(%d, %p);\n", size, (const void *) buffer));
-}
-
-KEYWORD1_ALT GLint KEYWORD2 NAME(_dispatch_stub_196)(GLenum mode);
-
-KEYWORD1_ALT GLint KEYWORD2 NAME(_dispatch_stub_196)(GLenum mode)
-{
- RETURN_DISPATCH(RenderMode, (mode), (F, "glRenderMode(0x%x);\n", mode));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_197)(void);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_197)(void)
-{
- DISPATCH(InitNames, (), (F, "glInitNames();\n"));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_198)(GLuint name);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_198)(GLuint name)
-{
- DISPATCH(LoadName, (name), (F, "glLoadName(%d);\n", name));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_199)(GLfloat token);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_199)(GLfloat token)
-{
- DISPATCH(PassThrough, (token), (F, "glPassThrough(%f);\n", token));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_200)(void);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_200)(void)
-{
- DISPATCH(PopName, (), (F, "glPopName();\n"));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_201)(GLuint name);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_201)(GLuint name)
-{
- DISPATCH(PushName, (name), (F, "glPushName(%d);\n", name));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_202)(GLenum mode);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_202)(GLenum mode)
-{
- DISPATCH(DrawBuffer, (mode), (F, "glDrawBuffer(0x%x);\n", mode));
-}
-
-KEYWORD1 void KEYWORD2 NAME(Clear)(GLbitfield mask)
-{
- DISPATCH(Clear, (mask), (F, "glClear(%d);\n", mask));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_204)(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_204)(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha)
-{
- DISPATCH(ClearAccum, (red, green, blue, alpha), (F, "glClearAccum(%f, %f, %f, %f);\n", red, green, blue, alpha));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_205)(GLfloat c);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_205)(GLfloat c)
-{
- DISPATCH(ClearIndex, (c), (F, "glClearIndex(%f);\n", c));
-}
-
-KEYWORD1 void KEYWORD2 NAME(ClearColor)(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)
-{
- DISPATCH(ClearColor, (red, green, blue, alpha), (F, "glClearColor(%f, %f, %f, %f);\n", red, green, blue, alpha));
-}
-
-KEYWORD1 void KEYWORD2 NAME(ClearStencil)(GLint s)
-{
- DISPATCH(ClearStencil, (s), (F, "glClearStencil(%d);\n", s));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_208)(GLclampd depth);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_208)(GLclampd depth)
-{
- DISPATCH(ClearDepth, (depth), (F, "glClearDepth(%f);\n", depth));
-}
-
-KEYWORD1 void KEYWORD2 NAME(StencilMask)(GLuint mask)
-{
- DISPATCH(StencilMask, (mask), (F, "glStencilMask(%d);\n", mask));
-}
-
-KEYWORD1 void KEYWORD2 NAME(ColorMask)(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha)
-{
- DISPATCH(ColorMask, (red, green, blue, alpha), (F, "glColorMask(%d, %d, %d, %d);\n", red, green, blue, alpha));
-}
-
-KEYWORD1 void KEYWORD2 NAME(DepthMask)(GLboolean flag)
-{
- DISPATCH(DepthMask, (flag), (F, "glDepthMask(%d);\n", flag));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_212)(GLuint mask);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_212)(GLuint mask)
-{
- DISPATCH(IndexMask, (mask), (F, "glIndexMask(%d);\n", mask));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_213)(GLenum op, GLfloat value);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_213)(GLenum op, GLfloat value)
-{
- DISPATCH(Accum, (op, value), (F, "glAccum(0x%x, %f);\n", op, value));
-}
-
-KEYWORD1 void KEYWORD2 NAME(Disable)(GLenum cap)
-{
- DISPATCH(Disable, (cap), (F, "glDisable(0x%x);\n", cap));
-}
-
-KEYWORD1 void KEYWORD2 NAME(Enable)(GLenum cap)
-{
- DISPATCH(Enable, (cap), (F, "glEnable(0x%x);\n", cap));
-}
-
-KEYWORD1 void KEYWORD2 NAME(Finish)(void)
-{
- DISPATCH(Finish, (), (F, "glFinish();\n"));
-}
-
-KEYWORD1 void KEYWORD2 NAME(Flush)(void)
-{
- DISPATCH(Flush, (), (F, "glFlush();\n"));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_218)(void);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_218)(void)
-{
- DISPATCH(PopAttrib, (), (F, "glPopAttrib();\n"));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_219)(GLbitfield mask);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_219)(GLbitfield mask)
-{
- DISPATCH(PushAttrib, (mask), (F, "glPushAttrib(%d);\n", mask));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_220)(GLenum target, GLdouble u1, GLdouble u2, GLint stride, GLint order, const GLdouble * points);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_220)(GLenum target, GLdouble u1, GLdouble u2, GLint stride, GLint order, const GLdouble * points)
-{
- DISPATCH(Map1d, (target, u1, u2, stride, order, points), (F, "glMap1d(0x%x, %f, %f, %d, %d, %p);\n", target, u1, u2, stride, order, (const void *) points));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_221)(GLenum target, GLfloat u1, GLfloat u2, GLint stride, GLint order, const GLfloat * points);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_221)(GLenum target, GLfloat u1, GLfloat u2, GLint stride, GLint order, const GLfloat * points)
-{
- DISPATCH(Map1f, (target, u1, u2, stride, order, points), (F, "glMap1f(0x%x, %f, %f, %d, %d, %p);\n", target, u1, u2, stride, order, (const void *) points));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_222)(GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, const GLdouble * points);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_222)(GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, const GLdouble * points)
-{
- DISPATCH(Map2d, (target, u1, u2, ustride, uorder, v1, v2, vstride, vorder, points), (F, "glMap2d(0x%x, %f, %f, %d, %d, %f, %f, %d, %d, %p);\n", target, u1, u2, ustride, uorder, v1, v2, vstride, vorder, (const void *) points));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_223)(GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, const GLfloat * points);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_223)(GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, const GLfloat * points)
-{
- DISPATCH(Map2f, (target, u1, u2, ustride, uorder, v1, v2, vstride, vorder, points), (F, "glMap2f(0x%x, %f, %f, %d, %d, %f, %f, %d, %d, %p);\n", target, u1, u2, ustride, uorder, v1, v2, vstride, vorder, (const void *) points));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_224)(GLint un, GLdouble u1, GLdouble u2);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_224)(GLint un, GLdouble u1, GLdouble u2)
-{
- DISPATCH(MapGrid1d, (un, u1, u2), (F, "glMapGrid1d(%d, %f, %f);\n", un, u1, u2));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_225)(GLint un, GLfloat u1, GLfloat u2);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_225)(GLint un, GLfloat u1, GLfloat u2)
-{
- DISPATCH(MapGrid1f, (un, u1, u2), (F, "glMapGrid1f(%d, %f, %f);\n", un, u1, u2));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_226)(GLint un, GLdouble u1, GLdouble u2, GLint vn, GLdouble v1, GLdouble v2);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_226)(GLint un, GLdouble u1, GLdouble u2, GLint vn, GLdouble v1, GLdouble v2)
-{
- DISPATCH(MapGrid2d, (un, u1, u2, vn, v1, v2), (F, "glMapGrid2d(%d, %f, %f, %d, %f, %f);\n", un, u1, u2, vn, v1, v2));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_227)(GLint un, GLfloat u1, GLfloat u2, GLint vn, GLfloat v1, GLfloat v2);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_227)(GLint un, GLfloat u1, GLfloat u2, GLint vn, GLfloat v1, GLfloat v2)
-{
- DISPATCH(MapGrid2f, (un, u1, u2, vn, v1, v2), (F, "glMapGrid2f(%d, %f, %f, %d, %f, %f);\n", un, u1, u2, vn, v1, v2));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_228)(GLdouble u);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_228)(GLdouble u)
-{
- DISPATCH(EvalCoord1d, (u), (F, "glEvalCoord1d(%f);\n", u));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_229)(const GLdouble * u);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_229)(const GLdouble * u)
-{
- DISPATCH(EvalCoord1dv, (u), (F, "glEvalCoord1dv(%p);\n", (const void *) u));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_230)(GLfloat u);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_230)(GLfloat u)
-{
- DISPATCH(EvalCoord1f, (u), (F, "glEvalCoord1f(%f);\n", u));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_231)(const GLfloat * u);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_231)(const GLfloat * u)
-{
- DISPATCH(EvalCoord1fv, (u), (F, "glEvalCoord1fv(%p);\n", (const void *) u));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_232)(GLdouble u, GLdouble v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_232)(GLdouble u, GLdouble v)
-{
- DISPATCH(EvalCoord2d, (u, v), (F, "glEvalCoord2d(%f, %f);\n", u, v));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_233)(const GLdouble * u);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_233)(const GLdouble * u)
-{
- DISPATCH(EvalCoord2dv, (u), (F, "glEvalCoord2dv(%p);\n", (const void *) u));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_234)(GLfloat u, GLfloat v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_234)(GLfloat u, GLfloat v)
-{
- DISPATCH(EvalCoord2f, (u, v), (F, "glEvalCoord2f(%f, %f);\n", u, v));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_235)(const GLfloat * u);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_235)(const GLfloat * u)
-{
- DISPATCH(EvalCoord2fv, (u), (F, "glEvalCoord2fv(%p);\n", (const void *) u));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_236)(GLenum mode, GLint i1, GLint i2);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_236)(GLenum mode, GLint i1, GLint i2)
-{
- DISPATCH(EvalMesh1, (mode, i1, i2), (F, "glEvalMesh1(0x%x, %d, %d);\n", mode, i1, i2));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_237)(GLint i);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_237)(GLint i)
-{
- DISPATCH(EvalPoint1, (i), (F, "glEvalPoint1(%d);\n", i));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_238)(GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_238)(GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2)
-{
- DISPATCH(EvalMesh2, (mode, i1, i2, j1, j2), (F, "glEvalMesh2(0x%x, %d, %d, %d, %d);\n", mode, i1, i2, j1, j2));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_239)(GLint i, GLint j);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_239)(GLint i, GLint j)
-{
- DISPATCH(EvalPoint2, (i, j), (F, "glEvalPoint2(%d, %d);\n", i, j));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_240)(GLenum func, GLclampf ref);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_240)(GLenum func, GLclampf ref)
-{
- DISPATCH(AlphaFunc, (func, ref), (F, "glAlphaFunc(0x%x, %f);\n", func, ref));
-}
-
-KEYWORD1 void KEYWORD2 NAME(BlendFunc)(GLenum sfactor, GLenum dfactor)
-{
- DISPATCH(BlendFunc, (sfactor, dfactor), (F, "glBlendFunc(0x%x, 0x%x);\n", sfactor, dfactor));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_242)(GLenum opcode);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_242)(GLenum opcode)
-{
- DISPATCH(LogicOp, (opcode), (F, "glLogicOp(0x%x);\n", opcode));
-}
-
-KEYWORD1 void KEYWORD2 NAME(StencilFunc)(GLenum func, GLint ref, GLuint mask)
-{
- DISPATCH(StencilFunc, (func, ref, mask), (F, "glStencilFunc(0x%x, %d, %d);\n", func, ref, mask));
-}
-
-KEYWORD1 void KEYWORD2 NAME(StencilOp)(GLenum fail, GLenum zfail, GLenum zpass)
-{
- DISPATCH(StencilOp, (fail, zfail, zpass), (F, "glStencilOp(0x%x, 0x%x, 0x%x);\n", fail, zfail, zpass));
-}
-
-KEYWORD1 void KEYWORD2 NAME(DepthFunc)(GLenum func)
-{
- DISPATCH(DepthFunc, (func), (F, "glDepthFunc(0x%x);\n", func));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_246)(GLfloat xfactor, GLfloat yfactor);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_246)(GLfloat xfactor, GLfloat yfactor)
-{
- DISPATCH(PixelZoom, (xfactor, yfactor), (F, "glPixelZoom(%f, %f);\n", xfactor, yfactor));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_247)(GLenum pname, GLfloat param);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_247)(GLenum pname, GLfloat param)
-{
- DISPATCH(PixelTransferf, (pname, param), (F, "glPixelTransferf(0x%x, %f);\n", pname, param));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_248)(GLenum pname, GLint param);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_248)(GLenum pname, GLint param)
-{
- DISPATCH(PixelTransferi, (pname, param), (F, "glPixelTransferi(0x%x, %d);\n", pname, param));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_249)(GLenum pname, GLfloat param);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_249)(GLenum pname, GLfloat param)
-{
- DISPATCH(PixelStoref, (pname, param), (F, "glPixelStoref(0x%x, %f);\n", pname, param));
-}
-
-KEYWORD1 void KEYWORD2 NAME(PixelStorei)(GLenum pname, GLint param)
-{
- DISPATCH(PixelStorei, (pname, param), (F, "glPixelStorei(0x%x, %d);\n", pname, param));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_251)(GLenum map, GLsizei mapsize, const GLfloat * values);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_251)(GLenum map, GLsizei mapsize, const GLfloat * values)
-{
- DISPATCH(PixelMapfv, (map, mapsize, values), (F, "glPixelMapfv(0x%x, %d, %p);\n", map, mapsize, (const void *) values));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_252)(GLenum map, GLsizei mapsize, const GLuint * values);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_252)(GLenum map, GLsizei mapsize, const GLuint * values)
-{
- DISPATCH(PixelMapuiv, (map, mapsize, values), (F, "glPixelMapuiv(0x%x, %d, %p);\n", map, mapsize, (const void *) values));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_253)(GLenum map, GLsizei mapsize, const GLushort * values);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_253)(GLenum map, GLsizei mapsize, const GLushort * values)
-{
- DISPATCH(PixelMapusv, (map, mapsize, values), (F, "glPixelMapusv(0x%x, %d, %p);\n", map, mapsize, (const void *) values));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_254)(GLenum mode);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_254)(GLenum mode)
-{
- DISPATCH(ReadBuffer, (mode), (F, "glReadBuffer(0x%x);\n", mode));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_255)(GLint x, GLint y, GLsizei width, GLsizei height, GLenum type);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_255)(GLint x, GLint y, GLsizei width, GLsizei height, GLenum type)
-{
- DISPATCH(CopyPixels, (x, y, width, height, type), (F, "glCopyPixels(%d, %d, %d, %d, 0x%x);\n", x, y, width, height, type));
-}
-
-KEYWORD1 void KEYWORD2 NAME(ReadPixels)(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid * pixels)
-{
- DISPATCH(ReadPixels, (x, y, width, height, format, type, pixels), (F, "glReadPixels(%d, %d, %d, %d, 0x%x, 0x%x, %p);\n", x, y, width, height, format, type, (const void *) pixels));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_257)(GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid * pixels);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_257)(GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid * pixels)
-{
- DISPATCH(DrawPixels, (width, height, format, type, pixels), (F, "glDrawPixels(%d, %d, 0x%x, 0x%x, %p);\n", width, height, format, type, (const void *) pixels));
-}
-
-KEYWORD1 void KEYWORD2 NAME(GetBooleanv)(GLenum pname, GLboolean * params)
-{
- DISPATCH(GetBooleanv, (pname, params), (F, "glGetBooleanv(0x%x, %p);\n", pname, (const void *) params));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_259)(GLenum plane, GLdouble * equation);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_259)(GLenum plane, GLdouble * equation)
-{
- DISPATCH(GetClipPlane, (plane, equation), (F, "glGetClipPlane(0x%x, %p);\n", plane, (const void *) equation));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_260)(GLenum pname, GLdouble * params);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_260)(GLenum pname, GLdouble * params)
-{
- DISPATCH(GetDoublev, (pname, params), (F, "glGetDoublev(0x%x, %p);\n", pname, (const void *) params));
-}
-
-KEYWORD1 GLenum KEYWORD2 NAME(GetError)(void)
-{
- RETURN_DISPATCH(GetError, (), (F, "glGetError();\n"));
-}
-
-KEYWORD1 void KEYWORD2 NAME(GetFloatv)(GLenum pname, GLfloat * params)
-{
- DISPATCH(GetFloatv, (pname, params), (F, "glGetFloatv(0x%x, %p);\n", pname, (const void *) params));
-}
-
-KEYWORD1 void KEYWORD2 NAME(GetIntegerv)(GLenum pname, GLint * params)
-{
- DISPATCH(GetIntegerv, (pname, params), (F, "glGetIntegerv(0x%x, %p);\n", pname, (const void *) params));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_264)(GLenum light, GLenum pname, GLfloat * params);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_264)(GLenum light, GLenum pname, GLfloat * params)
-{
- DISPATCH(GetLightfv, (light, pname, params), (F, "glGetLightfv(0x%x, 0x%x, %p);\n", light, pname, (const void *) params));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_265)(GLenum light, GLenum pname, GLint * params);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_265)(GLenum light, GLenum pname, GLint * params)
-{
- DISPATCH(GetLightiv, (light, pname, params), (F, "glGetLightiv(0x%x, 0x%x, %p);\n", light, pname, (const void *) params));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_266)(GLenum target, GLenum query, GLdouble * v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_266)(GLenum target, GLenum query, GLdouble * v)
-{
- DISPATCH(GetMapdv, (target, query, v), (F, "glGetMapdv(0x%x, 0x%x, %p);\n", target, query, (const void *) v));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_267)(GLenum target, GLenum query, GLfloat * v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_267)(GLenum target, GLenum query, GLfloat * v)
-{
- DISPATCH(GetMapfv, (target, query, v), (F, "glGetMapfv(0x%x, 0x%x, %p);\n", target, query, (const void *) v));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_268)(GLenum target, GLenum query, GLint * v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_268)(GLenum target, GLenum query, GLint * v)
-{
- DISPATCH(GetMapiv, (target, query, v), (F, "glGetMapiv(0x%x, 0x%x, %p);\n", target, query, (const void *) v));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_269)(GLenum face, GLenum pname, GLfloat * params);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_269)(GLenum face, GLenum pname, GLfloat * params)
-{
- DISPATCH(GetMaterialfv, (face, pname, params), (F, "glGetMaterialfv(0x%x, 0x%x, %p);\n", face, pname, (const void *) params));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_270)(GLenum face, GLenum pname, GLint * params);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_270)(GLenum face, GLenum pname, GLint * params)
-{
- DISPATCH(GetMaterialiv, (face, pname, params), (F, "glGetMaterialiv(0x%x, 0x%x, %p);\n", face, pname, (const void *) params));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_271)(GLenum map, GLfloat * values);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_271)(GLenum map, GLfloat * values)
-{
- DISPATCH(GetPixelMapfv, (map, values), (F, "glGetPixelMapfv(0x%x, %p);\n", map, (const void *) values));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_272)(GLenum map, GLuint * values);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_272)(GLenum map, GLuint * values)
-{
- DISPATCH(GetPixelMapuiv, (map, values), (F, "glGetPixelMapuiv(0x%x, %p);\n", map, (const void *) values));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_273)(GLenum map, GLushort * values);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_273)(GLenum map, GLushort * values)
-{
- DISPATCH(GetPixelMapusv, (map, values), (F, "glGetPixelMapusv(0x%x, %p);\n", map, (const void *) values));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_274)(GLubyte * mask);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_274)(GLubyte * mask)
-{
- DISPATCH(GetPolygonStipple, (mask), (F, "glGetPolygonStipple(%p);\n", (const void *) mask));
-}
-
-KEYWORD1 const GLubyte * KEYWORD2 NAME(GetString)(GLenum name)
-{
- RETURN_DISPATCH(GetString, (name), (F, "glGetString(0x%x);\n", name));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_276)(GLenum target, GLenum pname, GLfloat * params);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_276)(GLenum target, GLenum pname, GLfloat * params)
-{
- DISPATCH(GetTexEnvfv, (target, pname, params), (F, "glGetTexEnvfv(0x%x, 0x%x, %p);\n", target, pname, (const void *) params));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_277)(GLenum target, GLenum pname, GLint * params);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_277)(GLenum target, GLenum pname, GLint * params)
-{
- DISPATCH(GetTexEnviv, (target, pname, params), (F, "glGetTexEnviv(0x%x, 0x%x, %p);\n", target, pname, (const void *) params));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_278)(GLenum coord, GLenum pname, GLdouble * params);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_278)(GLenum coord, GLenum pname, GLdouble * params)
-{
- DISPATCH(GetTexGendv, (coord, pname, params), (F, "glGetTexGendv(0x%x, 0x%x, %p);\n", coord, pname, (const void *) params));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_279)(GLenum coord, GLenum pname, GLfloat * params);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_279)(GLenum coord, GLenum pname, GLfloat * params)
-{
- DISPATCH(GetTexGenfv, (coord, pname, params), (F, "glGetTexGenfv(0x%x, 0x%x, %p);\n", coord, pname, (const void *) params));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_280)(GLenum coord, GLenum pname, GLint * params);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_280)(GLenum coord, GLenum pname, GLint * params)
-{
- DISPATCH(GetTexGeniv, (coord, pname, params), (F, "glGetTexGeniv(0x%x, 0x%x, %p);\n", coord, pname, (const void *) params));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_281)(GLenum target, GLint level, GLenum format, GLenum type, GLvoid * pixels);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_281)(GLenum target, GLint level, GLenum format, GLenum type, GLvoid * pixels)
-{
- DISPATCH(GetTexImage, (target, level, format, type, pixels), (F, "glGetTexImage(0x%x, %d, 0x%x, 0x%x, %p);\n", target, level, format, type, (const void *) pixels));
-}
-
-KEYWORD1 void KEYWORD2 NAME(GetTexParameterfv)(GLenum target, GLenum pname, GLfloat * params)
-{
- DISPATCH(GetTexParameterfv, (target, pname, params), (F, "glGetTexParameterfv(0x%x, 0x%x, %p);\n", target, pname, (const void *) params));
-}
-
-KEYWORD1 void KEYWORD2 NAME(GetTexParameteriv)(GLenum target, GLenum pname, GLint * params)
-{
- DISPATCH(GetTexParameteriv, (target, pname, params), (F, "glGetTexParameteriv(0x%x, 0x%x, %p);\n", target, pname, (const void *) params));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_284)(GLenum target, GLint level, GLenum pname, GLfloat * params);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_284)(GLenum target, GLint level, GLenum pname, GLfloat * params)
-{
- DISPATCH(GetTexLevelParameterfv, (target, level, pname, params), (F, "glGetTexLevelParameterfv(0x%x, %d, 0x%x, %p);\n", target, level, pname, (const void *) params));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_285)(GLenum target, GLint level, GLenum pname, GLint * params);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_285)(GLenum target, GLint level, GLenum pname, GLint * params)
-{
- DISPATCH(GetTexLevelParameteriv, (target, level, pname, params), (F, "glGetTexLevelParameteriv(0x%x, %d, 0x%x, %p);\n", target, level, pname, (const void *) params));
-}
-
-KEYWORD1 GLboolean KEYWORD2 NAME(IsEnabled)(GLenum cap)
-{
- RETURN_DISPATCH(IsEnabled, (cap), (F, "glIsEnabled(0x%x);\n", cap));
-}
-
-KEYWORD1_ALT GLboolean KEYWORD2 NAME(_dispatch_stub_287)(GLuint list);
-
-KEYWORD1_ALT GLboolean KEYWORD2 NAME(_dispatch_stub_287)(GLuint list)
-{
- RETURN_DISPATCH(IsList, (list), (F, "glIsList(%d);\n", list));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_288)(GLclampd zNear, GLclampd zFar);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_288)(GLclampd zNear, GLclampd zFar)
-{
- DISPATCH(DepthRange, (zNear, zFar), (F, "glDepthRange(%f, %f);\n", zNear, zFar));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_289)(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_289)(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar)
-{
- DISPATCH(Frustum, (left, right, bottom, top, zNear, zFar), (F, "glFrustum(%f, %f, %f, %f, %f, %f);\n", left, right, bottom, top, zNear, zFar));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_290)(void);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_290)(void)
-{
- DISPATCH(LoadIdentity, (), (F, "glLoadIdentity();\n"));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_291)(const GLfloat * m);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_291)(const GLfloat * m)
-{
- DISPATCH(LoadMatrixf, (m), (F, "glLoadMatrixf(%p);\n", (const void *) m));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_292)(const GLdouble * m);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_292)(const GLdouble * m)
-{
- DISPATCH(LoadMatrixd, (m), (F, "glLoadMatrixd(%p);\n", (const void *) m));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_293)(GLenum mode);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_293)(GLenum mode)
-{
- DISPATCH(MatrixMode, (mode), (F, "glMatrixMode(0x%x);\n", mode));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_294)(const GLfloat * m);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_294)(const GLfloat * m)
-{
- DISPATCH(MultMatrixf, (m), (F, "glMultMatrixf(%p);\n", (const void *) m));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_295)(const GLdouble * m);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_295)(const GLdouble * m)
-{
- DISPATCH(MultMatrixd, (m), (F, "glMultMatrixd(%p);\n", (const void *) m));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_296)(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_296)(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar)
-{
- DISPATCH(Ortho, (left, right, bottom, top, zNear, zFar), (F, "glOrtho(%f, %f, %f, %f, %f, %f);\n", left, right, bottom, top, zNear, zFar));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_297)(void);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_297)(void)
-{
- DISPATCH(PopMatrix, (), (F, "glPopMatrix();\n"));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_298)(void);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_298)(void)
-{
- DISPATCH(PushMatrix, (), (F, "glPushMatrix();\n"));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_299)(GLdouble angle, GLdouble x, GLdouble y, GLdouble z);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_299)(GLdouble angle, GLdouble x, GLdouble y, GLdouble z)
-{
- DISPATCH(Rotated, (angle, x, y, z), (F, "glRotated(%f, %f, %f, %f);\n", angle, x, y, z));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_300)(GLfloat angle, GLfloat x, GLfloat y, GLfloat z);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_300)(GLfloat angle, GLfloat x, GLfloat y, GLfloat z)
-{
- DISPATCH(Rotatef, (angle, x, y, z), (F, "glRotatef(%f, %f, %f, %f);\n", angle, x, y, z));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_301)(GLdouble x, GLdouble y, GLdouble z);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_301)(GLdouble x, GLdouble y, GLdouble z)
-{
- DISPATCH(Scaled, (x, y, z), (F, "glScaled(%f, %f, %f);\n", x, y, z));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_302)(GLfloat x, GLfloat y, GLfloat z);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_302)(GLfloat x, GLfloat y, GLfloat z)
-{
- DISPATCH(Scalef, (x, y, z), (F, "glScalef(%f, %f, %f);\n", x, y, z));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_303)(GLdouble x, GLdouble y, GLdouble z);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_303)(GLdouble x, GLdouble y, GLdouble z)
-{
- DISPATCH(Translated, (x, y, z), (F, "glTranslated(%f, %f, %f);\n", x, y, z));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_304)(GLfloat x, GLfloat y, GLfloat z);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_304)(GLfloat x, GLfloat y, GLfloat z)
-{
- DISPATCH(Translatef, (x, y, z), (F, "glTranslatef(%f, %f, %f);\n", x, y, z));
-}
-
-KEYWORD1 void KEYWORD2 NAME(Viewport)(GLint x, GLint y, GLsizei width, GLsizei height)
-{
- DISPATCH(Viewport, (x, y, width, height), (F, "glViewport(%d, %d, %d, %d);\n", x, y, width, height));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_306)(GLint i);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_306)(GLint i)
-{
- DISPATCH(ArrayElement, (i), (F, "glArrayElement(%d);\n", i));
-}
-
-KEYWORD1 void KEYWORD2 NAME(BindTexture)(GLenum target, GLuint texture)
-{
- DISPATCH(BindTexture, (target, texture), (F, "glBindTexture(0x%x, %d);\n", target, texture));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_308)(GLint size, GLenum type, GLsizei stride, const GLvoid * pointer);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_308)(GLint size, GLenum type, GLsizei stride, const GLvoid * pointer)
-{
- DISPATCH(ColorPointer, (size, type, stride, pointer), (F, "glColorPointer(%d, 0x%x, %d, %p);\n", size, type, stride, (const void *) pointer));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_309)(GLenum array);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_309)(GLenum array)
-{
- DISPATCH(DisableClientState, (array), (F, "glDisableClientState(0x%x);\n", array));
-}
-
-KEYWORD1 void KEYWORD2 NAME(DrawArrays)(GLenum mode, GLint first, GLsizei count)
-{
- DISPATCH(DrawArrays, (mode, first, count), (F, "glDrawArrays(0x%x, %d, %d);\n", mode, first, count));
-}
-
-KEYWORD1 void KEYWORD2 NAME(DrawElements)(GLenum mode, GLsizei count, GLenum type, const GLvoid * indices)
-{
- DISPATCH(DrawElements, (mode, count, type, indices), (F, "glDrawElements(0x%x, %d, 0x%x, %p);\n", mode, count, type, (const void *) indices));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_312)(GLsizei stride, const GLvoid * pointer);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_312)(GLsizei stride, const GLvoid * pointer)
-{
- DISPATCH(EdgeFlagPointer, (stride, pointer), (F, "glEdgeFlagPointer(%d, %p);\n", stride, (const void *) pointer));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_313)(GLenum array);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_313)(GLenum array)
-{
- DISPATCH(EnableClientState, (array), (F, "glEnableClientState(0x%x);\n", array));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_314)(GLenum type, GLsizei stride, const GLvoid * pointer);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_314)(GLenum type, GLsizei stride, const GLvoid * pointer)
-{
- DISPATCH(IndexPointer, (type, stride, pointer), (F, "glIndexPointer(0x%x, %d, %p);\n", type, stride, (const void *) pointer));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_315)(GLubyte c);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_315)(GLubyte c)
-{
- DISPATCH(Indexub, (c), (F, "glIndexub(%d);\n", c));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_316)(const GLubyte * c);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_316)(const GLubyte * c)
-{
- DISPATCH(Indexubv, (c), (F, "glIndexubv(%p);\n", (const void *) c));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_317)(GLenum format, GLsizei stride, const GLvoid * pointer);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_317)(GLenum format, GLsizei stride, const GLvoid * pointer)
-{
- DISPATCH(InterleavedArrays, (format, stride, pointer), (F, "glInterleavedArrays(0x%x, %d, %p);\n", format, stride, (const void *) pointer));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_318)(GLenum type, GLsizei stride, const GLvoid * pointer);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_318)(GLenum type, GLsizei stride, const GLvoid * pointer)
-{
- DISPATCH(NormalPointer, (type, stride, pointer), (F, "glNormalPointer(0x%x, %d, %p);\n", type, stride, (const void *) pointer));
-}
-
-KEYWORD1 void KEYWORD2 NAME(PolygonOffset)(GLfloat factor, GLfloat units)
-{
- DISPATCH(PolygonOffset, (factor, units), (F, "glPolygonOffset(%f, %f);\n", factor, units));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_320)(GLint size, GLenum type, GLsizei stride, const GLvoid * pointer);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_320)(GLint size, GLenum type, GLsizei stride, const GLvoid * pointer)
-{
- DISPATCH(TexCoordPointer, (size, type, stride, pointer), (F, "glTexCoordPointer(%d, 0x%x, %d, %p);\n", size, type, stride, (const void *) pointer));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_321)(GLint size, GLenum type, GLsizei stride, const GLvoid * pointer);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_321)(GLint size, GLenum type, GLsizei stride, const GLvoid * pointer)
-{
- DISPATCH(VertexPointer, (size, type, stride, pointer), (F, "glVertexPointer(%d, 0x%x, %d, %p);\n", size, type, stride, (const void *) pointer));
-}
-
-KEYWORD1_ALT GLboolean KEYWORD2 NAME(_dispatch_stub_322)(GLsizei n, const GLuint * textures, GLboolean * residences);
-
-KEYWORD1_ALT GLboolean KEYWORD2 NAME(_dispatch_stub_322)(GLsizei n, const GLuint * textures, GLboolean * residences)
-{
- RETURN_DISPATCH(AreTexturesResident, (n, textures, residences), (F, "glAreTexturesResident(%d, %p, %p);\n", n, (const void *) textures, (const void *) residences));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_323)(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_323)(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));
-}
-
-KEYWORD1 void KEYWORD2 NAME(CopyTexImage2D)(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border)
-{
- DISPATCH(CopyTexImage2D, (target, level, internalformat, x, y, width, height, border), (F, "glCopyTexImage2D(0x%x, %d, 0x%x, %d, %d, %d, %d, %d);\n", target, level, internalformat, x, y, width, height, border));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_325)(GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_325)(GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width)
-{
- DISPATCH(CopyTexSubImage1D, (target, level, xoffset, x, y, width), (F, "glCopyTexSubImage1D(0x%x, %d, %d, %d, %d, %d);\n", target, level, xoffset, x, y, width));
-}
-
-KEYWORD1 void KEYWORD2 NAME(CopyTexSubImage2D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height)
-{
- DISPATCH(CopyTexSubImage2D, (target, level, xoffset, yoffset, x, y, width, height), (F, "glCopyTexSubImage2D(0x%x, %d, %d, %d, %d, %d, %d, %d);\n", target, level, xoffset, yoffset, x, y, width, height));
-}
-
-KEYWORD1 void KEYWORD2 NAME(DeleteTextures)(GLsizei n, const GLuint * textures)
-{
- DISPATCH(DeleteTextures, (n, textures), (F, "glDeleteTextures(%d, %p);\n", n, (const void *) textures));
-}
-
-KEYWORD1 void KEYWORD2 NAME(GenTextures)(GLsizei n, GLuint * textures)
-{
- DISPATCH(GenTextures, (n, textures), (F, "glGenTextures(%d, %p);\n", n, (const void *) textures));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_329)(GLenum pname, GLvoid ** params);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_329)(GLenum pname, GLvoid ** params)
-{
- DISPATCH(GetPointerv, (pname, params), (F, "glGetPointerv(0x%x, %p);\n", pname, (const void *) params));
-}
-
-KEYWORD1 GLboolean KEYWORD2 NAME(IsTexture)(GLuint texture)
-{
- RETURN_DISPATCH(IsTexture, (texture), (F, "glIsTexture(%d);\n", texture));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_331)(GLsizei n, const GLuint * textures, const GLclampf * priorities);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_331)(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));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_332)(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid * pixels);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_332)(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid * pixels)
-{
- DISPATCH(TexSubImage1D, (target, level, xoffset, width, format, type, pixels), (F, "glTexSubImage1D(0x%x, %d, %d, %d, 0x%x, 0x%x, %p);\n", target, level, xoffset, width, format, type, (const void *) pixels));
-}
-
-KEYWORD1 void KEYWORD2 NAME(TexSubImage2D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid * pixels)
-{
- DISPATCH(TexSubImage2D, (target, level, xoffset, yoffset, width, height, format, type, pixels), (F, "glTexSubImage2D(0x%x, %d, %d, %d, %d, %d, 0x%x, 0x%x, %p);\n", target, level, xoffset, yoffset, width, height, format, type, (const void *) pixels));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_334)(void);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_334)(void)
-{
- DISPATCH(PopClientAttrib, (), (F, "glPopClientAttrib();\n"));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_335)(GLbitfield mask);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_335)(GLbitfield mask)
-{
- DISPATCH(PushClientAttrib, (mask), (F, "glPushClientAttrib(%d);\n", mask));
-}
-
-KEYWORD1 void KEYWORD2 NAME(BlendColor)(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)
-{
- DISPATCH(BlendColor, (red, green, blue, alpha), (F, "glBlendColor(%f, %f, %f, %f);\n", red, green, blue, alpha));
-}
-
-KEYWORD1 void KEYWORD2 NAME(BlendEquation)(GLenum mode)
-{
- DISPATCH(BlendEquation, (mode), (F, "glBlendEquation(0x%x);\n", mode));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_338)(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid * indices);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_338)(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid * indices)
-{
- DISPATCH(DrawRangeElements, (mode, start, end, count, type, indices), (F, "glDrawRangeElements(0x%x, %d, %d, %d, 0x%x, %p);\n", mode, start, end, count, type, (const void *) indices));
-}
-
-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)
-{
- 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_ALT void KEYWORD2 NAME(_dispatch_stub_340)(GLenum target, GLenum pname, const GLfloat * params);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_340)(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));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_341)(GLenum target, GLenum pname, const GLint * params);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_341)(GLenum target, GLenum pname, const GLint * params)
-{
- DISPATCH(ColorTableParameteriv, (target, pname, params), (F, "glColorTableParameteriv(0x%x, 0x%x, %p);\n", target, pname, (const void *) params));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_342)(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_342)(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width)
-{
- DISPATCH(CopyColorTable, (target, internalformat, x, y, width), (F, "glCopyColorTable(0x%x, 0x%x, %d, %d, %d);\n", target, internalformat, x, y, width));
-}
-
-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, "glGetColorTable(0x%x, 0x%x, 0x%x, %p);\n", target, format, type, (const void *) table));
-}
-
-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, "glGetColorTableParameterfv(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, "glGetColorTableParameteriv(0x%x, 0x%x, %p);\n", target, pname, (const void *) params));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_346)(GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid * data);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_346)(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));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_347)(GLenum target, GLsizei start, GLint x, GLint y, GLsizei width);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_347)(GLenum target, GLsizei start, GLint x, GLint y, GLsizei width)
-{
- DISPATCH(CopyColorSubTable, (target, start, x, y, width), (F, "glCopyColorSubTable(0x%x, %d, %d, %d, %d);\n", target, start, x, y, width));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_348)(GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid * image);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_348)(GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid * image)
-{
- DISPATCH(ConvolutionFilter1D, (target, internalformat, width, format, type, image), (F, "glConvolutionFilter1D(0x%x, 0x%x, %d, 0x%x, 0x%x, %p);\n", target, internalformat, width, format, type, (const void *) image));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_349)(GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid * image);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_349)(GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid * image)
-{
- DISPATCH(ConvolutionFilter2D, (target, internalformat, width, height, format, type, image), (F, "glConvolutionFilter2D(0x%x, 0x%x, %d, %d, 0x%x, 0x%x, %p);\n", target, internalformat, width, height, format, type, (const void *) image));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_350)(GLenum target, GLenum pname, GLfloat params);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_350)(GLenum target, GLenum pname, GLfloat params)
-{
- DISPATCH(ConvolutionParameterf, (target, pname, params), (F, "glConvolutionParameterf(0x%x, 0x%x, %f);\n", target, pname, params));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_351)(GLenum target, GLenum pname, const GLfloat * params);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_351)(GLenum target, GLenum pname, const GLfloat * params)
-{
- DISPATCH(ConvolutionParameterfv, (target, pname, params), (F, "glConvolutionParameterfv(0x%x, 0x%x, %p);\n", target, pname, (const void *) params));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_352)(GLenum target, GLenum pname, GLint params);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_352)(GLenum target, GLenum pname, GLint params)
-{
- DISPATCH(ConvolutionParameteri, (target, pname, params), (F, "glConvolutionParameteri(0x%x, 0x%x, %d);\n", target, pname, params));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_353)(GLenum target, GLenum pname, const GLint * params);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_353)(GLenum target, GLenum pname, const GLint * params)
-{
- DISPATCH(ConvolutionParameteriv, (target, pname, params), (F, "glConvolutionParameteriv(0x%x, 0x%x, %p);\n", target, pname, (const void *) params));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_354)(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_354)(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width)
-{
- DISPATCH(CopyConvolutionFilter1D, (target, internalformat, x, y, width), (F, "glCopyConvolutionFilter1D(0x%x, 0x%x, %d, %d, %d);\n", target, internalformat, x, y, width));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_355)(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_355)(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height)
-{
- DISPATCH(CopyConvolutionFilter2D, (target, internalformat, x, y, width, height), (F, "glCopyConvolutionFilter2D(0x%x, 0x%x, %d, %d, %d, %d);\n", target, internalformat, x, y, width, height));
-}
-
-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, "glGetConvolutionFilter(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, "glGetConvolutionParameterfv(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, "glGetConvolutionParameteriv(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, "glGetSeparableFilter(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_360)(GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid * row, const GLvoid * column);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_360)(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));
-}
-
-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, "glGetHistogram(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, "glGetHistogramParameterfv(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, "glGetHistogramParameteriv(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, "glGetMinmax(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, "glGetMinmaxParameterfv(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, "glGetMinmaxParameteriv(0x%x, 0x%x, %p);\n", target, pname, (const void *) params));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_367)(GLenum target, GLsizei width, GLenum internalformat, GLboolean sink);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_367)(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));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_368)(GLenum target, GLenum internalformat, GLboolean sink);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_368)(GLenum target, GLenum internalformat, GLboolean sink)
-{
- DISPATCH(Minmax, (target, internalformat, sink), (F, "glMinmax(0x%x, 0x%x, %d);\n", target, internalformat, sink));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_369)(GLenum target);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_369)(GLenum target)
-{
- DISPATCH(ResetHistogram, (target), (F, "glResetHistogram(0x%x);\n", target));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_370)(GLenum target);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_370)(GLenum target)
-{
- DISPATCH(ResetMinmax, (target), (F, "glResetMinmax(0x%x);\n", target));
-}
-
-KEYWORD1 void KEYWORD2 NAME(TexImage3DOES)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid * pixels);
-
-KEYWORD1 void KEYWORD2 NAME(TexImage3DOES)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid * pixels)
-{
- DISPATCH(TexImage3DOES, (target, level, internalformat, width, height, depth, border, format, type, pixels), (F, "glTexImage3DOES(0x%x, %d, 0x%x, %d, %d, %d, %d, 0x%x, 0x%x, %p);\n", target, level, internalformat, width, height, depth, border, format, type, (const void *) pixels));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_371)(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid * pixels);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_371)(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid * pixels)
-{
- DISPATCH(TexImage3DOES, (target, level, internalformat, width, height, depth, border, format, type, pixels), (F, "glTexImage3D(0x%x, %d, 0x%x, %d, %d, %d, %d, 0x%x, 0x%x, %p);\n", target, level, internalformat, width, height, depth, border, format, type, (const void *) pixels));
-}
-
-KEYWORD1 void KEYWORD2 NAME(TexSubImage3DOES)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid * pixels);
-
-KEYWORD1 void KEYWORD2 NAME(TexSubImage3DOES)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid * pixels)
-{
- DISPATCH(TexSubImage3DOES, (target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels), (F, "glTexSubImage3DOES(0x%x, %d, %d, %d, %d, %d, %d, %d, 0x%x, 0x%x, %p);\n", target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, (const void *) pixels));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_372)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid * pixels);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_372)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid * pixels)
-{
- DISPATCH(TexSubImage3DOES, (target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels), (F, "glTexSubImage3D(0x%x, %d, %d, %d, %d, %d, %d, %d, 0x%x, 0x%x, %p);\n", target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, (const void *) pixels));
-}
-
-KEYWORD1 void KEYWORD2 NAME(CopyTexSubImage3DOES)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
-
-KEYWORD1 void KEYWORD2 NAME(CopyTexSubImage3DOES)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height)
-{
- DISPATCH(CopyTexSubImage3DOES, (target, level, xoffset, yoffset, zoffset, x, y, width, height), (F, "glCopyTexSubImage3DOES(0x%x, %d, %d, %d, %d, %d, %d, %d, %d);\n", target, level, xoffset, yoffset, zoffset, x, y, width, height));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_373)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_373)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height)
-{
- DISPATCH(CopyTexSubImage3DOES, (target, level, xoffset, yoffset, zoffset, x, y, width, height), (F, "glCopyTexSubImage3D(0x%x, %d, %d, %d, %d, %d, %d, %d, %d);\n", target, level, xoffset, yoffset, zoffset, x, y, width, height));
-}
-
-KEYWORD1 void KEYWORD2 NAME(ActiveTexture)(GLenum texture)
-{
- DISPATCH(ActiveTexture, (texture), (F, "glActiveTexture(0x%x);\n", texture));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_374)(GLenum texture);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_374)(GLenum texture)
-{
- DISPATCH(ActiveTexture, (texture), (F, "glActiveTextureARB(0x%x);\n", texture));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_375)(GLenum texture);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_375)(GLenum texture)
-{
- DISPATCH(ClientActiveTextureARB, (texture), (F, "glClientActiveTextureARB(0x%x);\n", texture));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_376)(GLenum target, GLdouble s);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_376)(GLenum target, GLdouble s)
-{
- DISPATCH(MultiTexCoord1dARB, (target, s), (F, "glMultiTexCoord1dARB(0x%x, %f);\n", target, s));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_377)(GLenum target, const GLdouble * v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_377)(GLenum target, const GLdouble * v)
-{
- DISPATCH(MultiTexCoord1dvARB, (target, v), (F, "glMultiTexCoord1dvARB(0x%x, %p);\n", target, (const void *) v));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_378)(GLenum target, GLfloat s);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_378)(GLenum target, GLfloat s)
-{
- DISPATCH(MultiTexCoord1fARB, (target, s), (F, "glMultiTexCoord1fARB(0x%x, %f);\n", target, s));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_379)(GLenum target, const GLfloat * v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_379)(GLenum target, const GLfloat * v)
-{
- DISPATCH(MultiTexCoord1fvARB, (target, v), (F, "glMultiTexCoord1fvARB(0x%x, %p);\n", target, (const void *) v));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_380)(GLenum target, GLint s);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_380)(GLenum target, GLint s)
-{
- DISPATCH(MultiTexCoord1iARB, (target, s), (F, "glMultiTexCoord1iARB(0x%x, %d);\n", target, s));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_381)(GLenum target, const GLint * v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_381)(GLenum target, const GLint * v)
-{
- DISPATCH(MultiTexCoord1ivARB, (target, v), (F, "glMultiTexCoord1ivARB(0x%x, %p);\n", target, (const void *) v));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_382)(GLenum target, GLshort s);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_382)(GLenum target, GLshort s)
-{
- DISPATCH(MultiTexCoord1sARB, (target, s), (F, "glMultiTexCoord1sARB(0x%x, %d);\n", target, s));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_383)(GLenum target, const GLshort * v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_383)(GLenum target, const GLshort * v)
-{
- DISPATCH(MultiTexCoord1svARB, (target, v), (F, "glMultiTexCoord1svARB(0x%x, %p);\n", target, (const void *) v));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_384)(GLenum target, GLdouble s, GLdouble t);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_384)(GLenum target, GLdouble s, GLdouble t)
-{
- DISPATCH(MultiTexCoord2dARB, (target, s, t), (F, "glMultiTexCoord2dARB(0x%x, %f, %f);\n", target, s, t));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_385)(GLenum target, const GLdouble * v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_385)(GLenum target, const GLdouble * v)
-{
- DISPATCH(MultiTexCoord2dvARB, (target, v), (F, "glMultiTexCoord2dvARB(0x%x, %p);\n", target, (const void *) v));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_386)(GLenum target, GLfloat s, GLfloat t);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_386)(GLenum target, GLfloat s, GLfloat t)
-{
- DISPATCH(MultiTexCoord2fARB, (target, s, t), (F, "glMultiTexCoord2fARB(0x%x, %f, %f);\n", target, s, t));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_387)(GLenum target, const GLfloat * v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_387)(GLenum target, const GLfloat * v)
-{
- DISPATCH(MultiTexCoord2fvARB, (target, v), (F, "glMultiTexCoord2fvARB(0x%x, %p);\n", target, (const void *) v));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_388)(GLenum target, GLint s, GLint t);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_388)(GLenum target, GLint s, GLint t)
-{
- DISPATCH(MultiTexCoord2iARB, (target, s, t), (F, "glMultiTexCoord2iARB(0x%x, %d, %d);\n", target, s, t));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_389)(GLenum target, const GLint * v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_389)(GLenum target, const GLint * v)
-{
- DISPATCH(MultiTexCoord2ivARB, (target, v), (F, "glMultiTexCoord2ivARB(0x%x, %p);\n", target, (const void *) v));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_390)(GLenum target, GLshort s, GLshort t);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_390)(GLenum target, GLshort s, GLshort t)
-{
- DISPATCH(MultiTexCoord2sARB, (target, s, t), (F, "glMultiTexCoord2sARB(0x%x, %d, %d);\n", target, s, t));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_391)(GLenum target, const GLshort * v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_391)(GLenum target, const GLshort * v)
-{
- DISPATCH(MultiTexCoord2svARB, (target, v), (F, "glMultiTexCoord2svARB(0x%x, %p);\n", target, (const void *) v));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_392)(GLenum target, GLdouble s, GLdouble t, GLdouble r);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_392)(GLenum target, GLdouble s, GLdouble t, GLdouble r)
-{
- DISPATCH(MultiTexCoord3dARB, (target, s, t, r), (F, "glMultiTexCoord3dARB(0x%x, %f, %f, %f);\n", target, s, t, r));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_393)(GLenum target, const GLdouble * v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_393)(GLenum target, const GLdouble * v)
-{
- DISPATCH(MultiTexCoord3dvARB, (target, v), (F, "glMultiTexCoord3dvARB(0x%x, %p);\n", target, (const void *) v));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_394)(GLenum target, GLfloat s, GLfloat t, GLfloat r);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_394)(GLenum target, GLfloat s, GLfloat t, GLfloat r)
-{
- DISPATCH(MultiTexCoord3fARB, (target, s, t, r), (F, "glMultiTexCoord3fARB(0x%x, %f, %f, %f);\n", target, s, t, r));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_395)(GLenum target, const GLfloat * v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_395)(GLenum target, const GLfloat * v)
-{
- DISPATCH(MultiTexCoord3fvARB, (target, v), (F, "glMultiTexCoord3fvARB(0x%x, %p);\n", target, (const void *) v));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_396)(GLenum target, GLint s, GLint t, GLint r);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_396)(GLenum target, GLint s, GLint t, GLint r)
-{
- DISPATCH(MultiTexCoord3iARB, (target, s, t, r), (F, "glMultiTexCoord3iARB(0x%x, %d, %d, %d);\n", target, s, t, r));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_397)(GLenum target, const GLint * v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_397)(GLenum target, const GLint * v)
-{
- DISPATCH(MultiTexCoord3ivARB, (target, v), (F, "glMultiTexCoord3ivARB(0x%x, %p);\n", target, (const void *) v));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_398)(GLenum target, GLshort s, GLshort t, GLshort r);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_398)(GLenum target, GLshort s, GLshort t, GLshort r)
-{
- DISPATCH(MultiTexCoord3sARB, (target, s, t, r), (F, "glMultiTexCoord3sARB(0x%x, %d, %d, %d);\n", target, s, t, r));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_399)(GLenum target, const GLshort * v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_399)(GLenum target, const GLshort * v)
-{
- DISPATCH(MultiTexCoord3svARB, (target, v), (F, "glMultiTexCoord3svARB(0x%x, %p);\n", target, (const void *) v));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_400)(GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_400)(GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q)
-{
- DISPATCH(MultiTexCoord4dARB, (target, s, t, r, q), (F, "glMultiTexCoord4dARB(0x%x, %f, %f, %f, %f);\n", target, s, t, r, q));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_401)(GLenum target, const GLdouble * v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_401)(GLenum target, const GLdouble * v)
-{
- DISPATCH(MultiTexCoord4dvARB, (target, v), (F, "glMultiTexCoord4dvARB(0x%x, %p);\n", target, (const void *) v));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_402)(GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_402)(GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q)
-{
- DISPATCH(MultiTexCoord4fARB, (target, s, t, r, q), (F, "glMultiTexCoord4fARB(0x%x, %f, %f, %f, %f);\n", target, s, t, r, q));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_403)(GLenum target, const GLfloat * v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_403)(GLenum target, const GLfloat * v)
-{
- DISPATCH(MultiTexCoord4fvARB, (target, v), (F, "glMultiTexCoord4fvARB(0x%x, %p);\n", target, (const void *) v));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_404)(GLenum target, GLint s, GLint t, GLint r, GLint q);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_404)(GLenum target, GLint s, GLint t, GLint r, GLint q)
-{
- DISPATCH(MultiTexCoord4iARB, (target, s, t, r, q), (F, "glMultiTexCoord4iARB(0x%x, %d, %d, %d, %d);\n", target, s, t, r, q));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_405)(GLenum target, const GLint * v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_405)(GLenum target, const GLint * v)
-{
- DISPATCH(MultiTexCoord4ivARB, (target, v), (F, "glMultiTexCoord4ivARB(0x%x, %p);\n", target, (const void *) v));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_406)(GLenum target, GLshort s, GLshort t, GLshort r, GLshort q);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_406)(GLenum target, GLshort s, GLshort t, GLshort r, GLshort q)
-{
- DISPATCH(MultiTexCoord4sARB, (target, s, t, r, q), (F, "glMultiTexCoord4sARB(0x%x, %d, %d, %d, %d);\n", target, s, t, r, q));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_407)(GLenum target, const GLshort * v);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_407)(GLenum target, const GLshort * v)
-{
- DISPATCH(MultiTexCoord4svARB, (target, v), (F, "glMultiTexCoord4svARB(0x%x, %p);\n", target, (const void *) v));
-}
-
-KEYWORD1 void KEYWORD2 NAME(GetBufferPointervOES)(GLenum target, GLenum pname, GLvoid ** params);
-
-KEYWORD1 void KEYWORD2 NAME(GetBufferPointervOES)(GLenum target, GLenum pname, GLvoid ** params)
-{
- DISPATCH(GetBufferPointervOES, (target, pname, params), (F, "glGetBufferPointervOES(0x%x, 0x%x, %p);\n", target, pname, (const void *) params));
-}
-
-KEYWORD1 GLvoid * KEYWORD2 NAME(MapBufferOES)(GLenum target, GLenum access);
-
-KEYWORD1 GLvoid * KEYWORD2 NAME(MapBufferOES)(GLenum target, GLenum access)
-{
- RETURN_DISPATCH(MapBufferOES, (target, access), (F, "glMapBufferOES(0x%x, 0x%x);\n", target, access));
-}
-
-KEYWORD1 GLboolean KEYWORD2 NAME(UnmapBufferOES)(GLenum target);
-
-KEYWORD1 GLboolean KEYWORD2 NAME(UnmapBufferOES)(GLenum target)
-{
- RETURN_DISPATCH(UnmapBufferOES, (target), (F, "glUnmapBufferOES(0x%x);\n", target));
-}
-
-KEYWORD1 void KEYWORD2 NAME(CompressedTexImage3DOES)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid * data);
-
-KEYWORD1 void KEYWORD2 NAME(CompressedTexImage3DOES)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid * data)
-{
- DISPATCH(CompressedTexImage3DOES, (target, level, internalformat, width, height, depth, border, imageSize, data), (F, "glCompressedTexImage3DOES(0x%x, %d, 0x%x, %d, %d, %d, %d, %d, %p);\n", target, level, internalformat, width, height, depth, border, imageSize, (const void *) data));
-}
-
-KEYWORD1 void KEYWORD2 NAME(CompressedTexSubImage3DOES)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid * data);
-
-KEYWORD1 void KEYWORD2 NAME(CompressedTexSubImage3DOES)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid * data)
-{
- DISPATCH(CompressedTexSubImage3DOES, (target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data), (F, "glCompressedTexSubImage3DOES(0x%x, %d, %d, %d, %d, %d, %d, %d, 0x%x, %d, %p);\n", target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, (const void *) data));
-}
-
-KEYWORD1 void KEYWORD2 NAME(FramebufferTexture3DOES)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);
-
-KEYWORD1 void KEYWORD2 NAME(FramebufferTexture3DOES)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset)
-{
- DISPATCH(FramebufferTexture3DOES, (target, attachment, textarget, texture, level, zoffset), (F, "glFramebufferTexture3DOES(0x%x, 0x%x, 0x%x, %d, %d, %d);\n", target, attachment, textarget, texture, level, zoffset));
-}
-
-KEYWORD1 void KEYWORD2 NAME(GetProgramBinaryOES)(GLuint program, GLsizei bufSize, GLsizei * length, GLenum * binaryFormat, GLvoid * binary);
-
-KEYWORD1 void KEYWORD2 NAME(GetProgramBinaryOES)(GLuint program, GLsizei bufSize, GLsizei * length, GLenum * binaryFormat, GLvoid * binary)
-{
- DISPATCH(GetProgramBinaryOES, (program, bufSize, length, binaryFormat, binary), (F, "glGetProgramBinaryOES(%d, %d, %p, %p, %p);\n", program, bufSize, (const void *) length, (const void *) binaryFormat, (const void *) binary));
-}
-
-KEYWORD1 void KEYWORD2 NAME(ProgramBinaryOES)(GLuint program, GLenum binaryFormat, const GLvoid * binary, GLint length);
-
-KEYWORD1 void KEYWORD2 NAME(ProgramBinaryOES)(GLuint program, GLenum binaryFormat, const GLvoid * binary, GLint length)
-{
- DISPATCH(ProgramBinaryOES, (program, binaryFormat, binary, length), (F, "glProgramBinaryOES(%d, 0x%x, %p, %d);\n", program, binaryFormat, (const void *) binary, length));
-}
-
-KEYWORD1 void KEYWORD2 NAME(MultiDrawArraysEXT)(GLenum mode, const GLint * first, const GLsizei * count, GLsizei primcount)
-{
- DISPATCH(MultiDrawArraysEXT, (mode, first, count, primcount), (F, "glMultiDrawArraysEXT(0x%x, %p, %p, %d);\n", mode, (const void *) first, (const void *) count, primcount));
-}
-
-KEYWORD1 void KEYWORD2 NAME(MultiDrawElementsEXT)(GLenum mode, const GLsizei * count, GLenum type, const GLvoid ** indices, GLsizei primcount)
-{
- DISPATCH(MultiDrawElementsEXT, (mode, count, type, indices, primcount), (F, "glMultiDrawElementsEXT(0x%x, %p, 0x%x, %p, %d);\n", mode, (const void *) count, type, (const void *) indices, primcount));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_418)(GLuint array);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_418)(GLuint array)
-{
- DISPATCH(BindVertexArrayAPPLE, (array), (F, "glBindVertexArrayAPPLE(%d);\n", array));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_419)(GLsizei n, const GLuint * arrays);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_419)(GLsizei n, const GLuint * arrays)
-{
- DISPATCH(DeleteVertexArraysAPPLE, (n, arrays), (F, "glDeleteVertexArraysAPPLE(%d, %p);\n", n, (const void *) arrays));
-}
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_420)(GLsizei n, GLuint * arrays);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_420)(GLsizei n, GLuint * arrays)
-{
- DISPATCH(GenVertexArraysAPPLE, (n, arrays), (F, "glGenVertexArraysAPPLE(%d, %p);\n", n, (const void *) arrays));
-}
-
-KEYWORD1_ALT GLboolean KEYWORD2 NAME(_dispatch_stub_421)(GLuint array);
-
-KEYWORD1_ALT GLboolean KEYWORD2 NAME(_dispatch_stub_421)(GLuint array)
-{
- RETURN_DISPATCH(IsVertexArrayAPPLE, (array), (F, "glIsVertexArrayAPPLE(%d);\n", array));
-}
-
-KEYWORD1 void KEYWORD2 NAME(EGLImageTargetRenderbufferStorageOES)(GLenum target, GLvoid * writeOffset);
-
-KEYWORD1 void KEYWORD2 NAME(EGLImageTargetRenderbufferStorageOES)(GLenum target, GLvoid * writeOffset)
-{
- DISPATCH(EGLImageTargetRenderbufferStorageOES, (target, writeOffset), (F, "glEGLImageTargetRenderbufferStorageOES(0x%x, %p);\n", target, (const void *) writeOffset));
-}
-
-KEYWORD1 void KEYWORD2 NAME(EGLImageTargetTexture2DOES)(GLenum target, GLvoid * writeOffset);
-
-KEYWORD1 void KEYWORD2 NAME(EGLImageTargetTexture2DOES)(GLenum target, GLvoid * writeOffset)
-{
- DISPATCH(EGLImageTargetTexture2DOES, (target, writeOffset), (F, "glEGLImageTargetTexture2DOES(0x%x, %p);\n", target, (const void *) writeOffset));
-}
-
-KEYWORD1 void KEYWORD2 NAME(CompressedTexImage2D)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid * data)
-{
- DISPATCH(CompressedTexImage2D, (target, level, internalformat, width, height, border, imageSize, data), (F, "glCompressedTexImage2D(0x%x, %d, 0x%x, %d, %d, %d, %d, %p);\n", target, level, internalformat, width, height, border, imageSize, (const void *) data));
-}
-
-KEYWORD1 void KEYWORD2 NAME(CompressedTexSubImage2D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid * data)
-{
- DISPATCH(CompressedTexSubImage2D, (target, level, xoffset, yoffset, width, height, format, imageSize, data), (F, "glCompressedTexSubImage2D(0x%x, %d, %d, %d, %d, %d, 0x%x, %d, %p);\n", target, level, xoffset, yoffset, width, height, format, imageSize, (const void *) data));
-}
-
-KEYWORD1 void KEYWORD2 NAME(SampleCoverage)(GLclampf value, GLboolean invert)
-{
- DISPATCH(SampleCoverage, (value, invert), (F, "glSampleCoverage(%f, %d);\n", value, invert));
-}
-
-KEYWORD1 void KEYWORD2 NAME(BindBuffer)(GLenum target, GLuint buffer)
-{
- DISPATCH(BindBuffer, (target, buffer), (F, "glBindBuffer(0x%x, %d);\n", target, buffer));
-}
-
-KEYWORD1 void KEYWORD2 NAME(BufferData)(GLenum target, GLsizeiptr size, const GLvoid * data, GLenum usage)
-{
- DISPATCH(BufferData, (target, size, data, usage), (F, "glBufferData(0x%x, %d, %p, 0x%x);\n", target, size, (const void *) data, usage));
-}
-
-KEYWORD1 void KEYWORD2 NAME(BufferSubData)(GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid * data)
-{
- DISPATCH(BufferSubData, (target, offset, size, data), (F, "glBufferSubData(0x%x, %d, %d, %p);\n", target, offset, size, (const void *) data));
-}
-
-KEYWORD1 void KEYWORD2 NAME(DeleteBuffers)(GLsizei n, const GLuint * buffer)
-{
- DISPATCH(DeleteBuffers, (n, buffer), (F, "glDeleteBuffers(%d, %p);\n", n, (const void *) buffer));
-}
-
-KEYWORD1 void KEYWORD2 NAME(GenBuffers)(GLsizei n, GLuint * buffer)
-{
- DISPATCH(GenBuffers, (n, buffer), (F, "glGenBuffers(%d, %p);\n", n, (const void *) buffer));
-}
-
-KEYWORD1 void KEYWORD2 NAME(GetBufferParameteriv)(GLenum target, GLenum pname, GLint * params)
-{
- DISPATCH(GetBufferParameteriv, (target, pname, params), (F, "glGetBufferParameteriv(0x%x, 0x%x, %p);\n", target, pname, (const void *) params));
-}
-
-KEYWORD1 GLboolean KEYWORD2 NAME(IsBuffer)(GLuint buffer)
-{
- RETURN_DISPATCH(IsBuffer, (buffer), (F, "glIsBuffer(%d);\n", buffer));
-}
-
-KEYWORD1 void KEYWORD2 NAME(AttachShader)(GLuint program, GLuint shader)
-{
- DISPATCH(AttachShader, (program, shader), (F, "glAttachShader(%d, %d);\n", program, shader));
-}
-
-KEYWORD1 void KEYWORD2 NAME(BindAttribLocation)(GLuint program, GLuint index, const GLchar * name)
-{
- DISPATCH(BindAttribLocation, (program, index, name), (F, "glBindAttribLocation(%d, %d, %p);\n", program, index, (const void *) name));
-}
-
-KEYWORD1 void KEYWORD2 NAME(BlendEquationSeparate)(GLenum modeRGB, GLenum modeA)
-{
- DISPATCH(BlendEquationSeparate, (modeRGB, modeA), (F, "glBlendEquationSeparate(0x%x, 0x%x);\n", modeRGB, modeA));
-}
-
-KEYWORD1 void KEYWORD2 NAME(CompileShader)(GLuint shader)
-{
- DISPATCH(CompileShader, (shader), (F, "glCompileShader(%d);\n", shader));
-}
-
-KEYWORD1 GLuint KEYWORD2 NAME(CreateProgram)(void)
-{
- RETURN_DISPATCH(CreateProgram, (), (F, "glCreateProgram();\n"));
-}
-
-KEYWORD1 GLuint KEYWORD2 NAME(CreateShader)(GLenum type)
-{
- RETURN_DISPATCH(CreateShader, (type), (F, "glCreateShader(0x%x);\n", type));
-}
-
-KEYWORD1 void KEYWORD2 NAME(DeleteProgram)(GLuint program)
-{
- DISPATCH(DeleteProgram, (program), (F, "glDeleteProgram(%d);\n", program));
-}
-
-KEYWORD1 void KEYWORD2 NAME(DeleteShader)(GLuint program)
-{
- DISPATCH(DeleteShader, (program), (F, "glDeleteShader(%d);\n", program));
-}
-
-KEYWORD1 void KEYWORD2 NAME(DetachShader)(GLuint program, GLuint shader)
-{
- DISPATCH(DetachShader, (program, shader), (F, "glDetachShader(%d, %d);\n", program, shader));
-}
-
-KEYWORD1 void KEYWORD2 NAME(DisableVertexAttribArray)(GLuint index)
-{
- DISPATCH(DisableVertexAttribArray, (index), (F, "glDisableVertexAttribArray(%d);\n", index));
-}
-
-KEYWORD1 void KEYWORD2 NAME(EnableVertexAttribArray)(GLuint index)
-{
- DISPATCH(EnableVertexAttribArray, (index), (F, "glEnableVertexAttribArray(%d);\n", index));
-}
-
-KEYWORD1 void KEYWORD2 NAME(GetActiveAttrib)(GLuint program, GLuint index, GLsizei bufSize, GLsizei * length, GLint * size, GLenum * type, GLchar * name)
-{
- DISPATCH(GetActiveAttrib, (program, index, bufSize, length, size, type, name), (F, "glGetActiveAttrib(%d, %d, %d, %p, %p, %p, %p);\n", program, index, bufSize, (const void *) length, (const void *) size, (const void *) type, (const void *) name));
-}
-
-KEYWORD1 void KEYWORD2 NAME(GetActiveUniform)(GLuint program, GLuint index, GLsizei bufSize, GLsizei * length, GLint * size, GLenum * type, GLchar * name)
-{
- DISPATCH(GetActiveUniform, (program, index, bufSize, length, size, type, name), (F, "glGetActiveUniform(%d, %d, %d, %p, %p, %p, %p);\n", program, index, bufSize, (const void *) length, (const void *) size, (const void *) type, (const void *) name));
-}
-
-KEYWORD1 void KEYWORD2 NAME(GetAttachedShaders)(GLuint program, GLsizei maxCount, GLsizei * count, GLuint * obj)
-{
- DISPATCH(GetAttachedShaders, (program, maxCount, count, obj), (F, "glGetAttachedShaders(%d, %d, %p, %p);\n", program, maxCount, (const void *) count, (const void *) obj));
-}
-
-KEYWORD1 GLint KEYWORD2 NAME(GetAttribLocation)(GLuint program, const GLchar * name)
-{
- RETURN_DISPATCH(GetAttribLocation, (program, name), (F, "glGetAttribLocation(%d, %p);\n", program, (const void *) name));
-}
-
-KEYWORD1 void KEYWORD2 NAME(GetProgramInfoLog)(GLuint program, GLsizei bufSize, GLsizei * length, GLchar * infoLog)
-{
- DISPATCH(GetProgramInfoLog, (program, bufSize, length, infoLog), (F, "glGetProgramInfoLog(%d, %d, %p, %p);\n", program, bufSize, (const void *) length, (const void *) infoLog));
-}
-
-KEYWORD1 void KEYWORD2 NAME(GetProgramiv)(GLuint program, GLenum pname, GLint * params)
-{
- DISPATCH(GetProgramiv, (program, pname, params), (F, "glGetProgramiv(%d, 0x%x, %p);\n", program, pname, (const void *) params));
-}
-
-KEYWORD1 void KEYWORD2 NAME(GetShaderInfoLog)(GLuint shader, GLsizei bufSize, GLsizei * length, GLchar * infoLog)
-{
- DISPATCH(GetShaderInfoLog, (shader, bufSize, length, infoLog), (F, "glGetShaderInfoLog(%d, %d, %p, %p);\n", shader, bufSize, (const void *) length, (const void *) infoLog));
-}
-
-KEYWORD1 void KEYWORD2 NAME(GetShaderSource)(GLuint shader, GLsizei bufSize, GLsizei * length, GLchar * source)
-{
- DISPATCH(GetShaderSource, (shader, bufSize, length, source), (F, "glGetShaderSource(%d, %d, %p, %p);\n", shader, bufSize, (const void *) length, (const void *) source));
-}
-
-KEYWORD1 void KEYWORD2 NAME(GetShaderiv)(GLuint shader, GLenum pname, GLint * params)
-{
- DISPATCH(GetShaderiv, (shader, pname, params), (F, "glGetShaderiv(%d, 0x%x, %p);\n", shader, pname, (const void *) params));
-}
-
-KEYWORD1 GLint KEYWORD2 NAME(GetUniformLocation)(GLuint program, const GLchar * name)
-{
- RETURN_DISPATCH(GetUniformLocation, (program, name), (F, "glGetUniformLocation(%d, %p);\n", program, (const void *) name));
-}
-
-KEYWORD1 void KEYWORD2 NAME(GetUniformfv)(GLuint program, GLint location, GLfloat * params)
-{
- DISPATCH(GetUniformfv, (program, location, params), (F, "glGetUniformfv(%d, %d, %p);\n", program, location, (const void *) params));
-}
-
-KEYWORD1 void KEYWORD2 NAME(GetUniformiv)(GLuint program, GLint location, GLint * params)
-{
- DISPATCH(GetUniformiv, (program, location, params), (F, "glGetUniformiv(%d, %d, %p);\n", program, location, (const void *) params));
-}
-
-KEYWORD1 void KEYWORD2 NAME(GetVertexAttribPointerv)(GLuint index, GLenum pname, GLvoid ** pointer)
-{
- DISPATCH(GetVertexAttribPointerv, (index, pname, pointer), (F, "glGetVertexAttribPointerv(%d, 0x%x, %p);\n", index, pname, (const void *) pointer));
-}
-
-KEYWORD1 void KEYWORD2 NAME(GetVertexAttribfv)(GLuint index, GLenum pname, GLfloat * params)
-{
- DISPATCH(GetVertexAttribfv, (index, pname, params), (F, "glGetVertexAttribfv(%d, 0x%x, %p);\n", index, pname, (const void *) params));
-}
-
-KEYWORD1 void KEYWORD2 NAME(GetVertexAttribiv)(GLuint index, GLenum pname, GLint * params)
-{
- DISPATCH(GetVertexAttribiv, (index, pname, params), (F, "glGetVertexAttribiv(%d, 0x%x, %p);\n", index, pname, (const void *) params));
-}
-
-KEYWORD1 GLboolean KEYWORD2 NAME(IsProgram)(GLuint program)
-{
- RETURN_DISPATCH(IsProgram, (program), (F, "glIsProgram(%d);\n", program));
-}
-
-KEYWORD1 GLboolean KEYWORD2 NAME(IsShader)(GLuint shader)
-{
- RETURN_DISPATCH(IsShader, (shader), (F, "glIsShader(%d);\n", shader));
-}
-
-KEYWORD1 void KEYWORD2 NAME(LinkProgram)(GLuint program)
-{
- DISPATCH(LinkProgram, (program), (F, "glLinkProgram(%d);\n", program));
-}
-
-KEYWORD1 void KEYWORD2 NAME(ShaderSource)(GLuint shader, GLsizei count, const GLchar ** string, const GLint * length)
-{
- DISPATCH(ShaderSource, (shader, count, string, length), (F, "glShaderSource(%d, %d, %p, %p);\n", shader, count, (const void *) string, (const void *) length));
-}
-
-KEYWORD1 void KEYWORD2 NAME(StencilFuncSeparate)(GLenum face, GLenum func, GLint ref, GLuint mask)
-{
- DISPATCH(StencilFuncSeparate, (face, func, ref, mask), (F, "glStencilFuncSeparate(0x%x, 0x%x, %d, %d);\n", face, func, ref, mask));
-}
-
-KEYWORD1 void KEYWORD2 NAME(StencilMaskSeparate)(GLenum face, GLuint mask)
-{
- DISPATCH(StencilMaskSeparate, (face, mask), (F, "glStencilMaskSeparate(0x%x, %d);\n", face, mask));
-}
-
-KEYWORD1 void KEYWORD2 NAME(StencilOpSeparate)(GLenum face, GLenum sfail, GLenum zfail, GLenum zpass)
-{
- DISPATCH(StencilOpSeparate, (face, sfail, zfail, zpass), (F, "glStencilOpSeparate(0x%x, 0x%x, 0x%x, 0x%x);\n", face, sfail, zfail, zpass));
-}
-
-KEYWORD1 void KEYWORD2 NAME(Uniform1f)(GLint location, GLfloat v0)
-{
- DISPATCH(Uniform1f, (location, v0), (F, "glUniform1f(%d, %f);\n", location, v0));
-}
-
-KEYWORD1 void KEYWORD2 NAME(Uniform1fv)(GLint location, GLsizei count, const GLfloat * value)
-{
- DISPATCH(Uniform1fv, (location, count, value), (F, "glUniform1fv(%d, %d, %p);\n", location, count, (const void *) value));
-}
-
-KEYWORD1 void KEYWORD2 NAME(Uniform1i)(GLint location, GLint v0)
-{
- DISPATCH(Uniform1i, (location, v0), (F, "glUniform1i(%d, %d);\n", location, v0));
-}
-
-KEYWORD1 void KEYWORD2 NAME(Uniform1iv)(GLint location, GLsizei count, const GLint * value)
-{
- DISPATCH(Uniform1iv, (location, count, value), (F, "glUniform1iv(%d, %d, %p);\n", location, count, (const void *) value));
-}
-
-KEYWORD1 void KEYWORD2 NAME(Uniform2f)(GLint location, GLfloat v0, GLfloat v1)
-{
- DISPATCH(Uniform2f, (location, v0, v1), (F, "glUniform2f(%d, %f, %f);\n", location, v0, v1));
-}
-
-KEYWORD1 void KEYWORD2 NAME(Uniform2fv)(GLint location, GLsizei count, const GLfloat * value)
-{
- DISPATCH(Uniform2fv, (location, count, value), (F, "glUniform2fv(%d, %d, %p);\n", location, count, (const void *) value));
-}
-
-KEYWORD1 void KEYWORD2 NAME(Uniform2i)(GLint location, GLint v0, GLint v1)
-{
- DISPATCH(Uniform2i, (location, v0, v1), (F, "glUniform2i(%d, %d, %d);\n", location, v0, v1));
-}
-
-KEYWORD1 void KEYWORD2 NAME(Uniform2iv)(GLint location, GLsizei count, const GLint * value)
-{
- DISPATCH(Uniform2iv, (location, count, value), (F, "glUniform2iv(%d, %d, %p);\n", location, count, (const void *) value));
-}
-
-KEYWORD1 void KEYWORD2 NAME(Uniform3f)(GLint location, GLfloat v0, GLfloat v1, GLfloat v2)
-{
- DISPATCH(Uniform3f, (location, v0, v1, v2), (F, "glUniform3f(%d, %f, %f, %f);\n", location, v0, v1, v2));
-}
-
-KEYWORD1 void KEYWORD2 NAME(Uniform3fv)(GLint location, GLsizei count, const GLfloat * value)
-{
- DISPATCH(Uniform3fv, (location, count, value), (F, "glUniform3fv(%d, %d, %p);\n", location, count, (const void *) value));
-}
-
-KEYWORD1 void KEYWORD2 NAME(Uniform3i)(GLint location, GLint v0, GLint v1, GLint v2)
-{
- DISPATCH(Uniform3i, (location, v0, v1, v2), (F, "glUniform3i(%d, %d, %d, %d);\n", location, v0, v1, v2));
-}
-
-KEYWORD1 void KEYWORD2 NAME(Uniform3iv)(GLint location, GLsizei count, const GLint * value)
-{
- DISPATCH(Uniform3iv, (location, count, value), (F, "glUniform3iv(%d, %d, %p);\n", location, count, (const void *) value));
-}
-
-KEYWORD1 void KEYWORD2 NAME(Uniform4f)(GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3)
-{
- DISPATCH(Uniform4f, (location, v0, v1, v2, v3), (F, "glUniform4f(%d, %f, %f, %f, %f);\n", location, v0, v1, v2, v3));
-}
-
-KEYWORD1 void KEYWORD2 NAME(Uniform4fv)(GLint location, GLsizei count, const GLfloat * value)
-{
- DISPATCH(Uniform4fv, (location, count, value), (F, "glUniform4fv(%d, %d, %p);\n", location, count, (const void *) value));
-}
-
-KEYWORD1 void KEYWORD2 NAME(Uniform4i)(GLint location, GLint v0, GLint v1, GLint v2, GLint v3)
-{
- DISPATCH(Uniform4i, (location, v0, v1, v2, v3), (F, "glUniform4i(%d, %d, %d, %d, %d);\n", location, v0, v1, v2, v3));
-}
-
-KEYWORD1 void KEYWORD2 NAME(Uniform4iv)(GLint location, GLsizei count, const GLint * value)
-{
- DISPATCH(Uniform4iv, (location, count, value), (F, "glUniform4iv(%d, %d, %p);\n", location, count, (const void *) value));
-}
-
-KEYWORD1 void KEYWORD2 NAME(UniformMatrix2fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value)
-{
- DISPATCH(UniformMatrix2fv, (location, count, transpose, value), (F, "glUniformMatrix2fv(%d, %d, %d, %p);\n", location, count, transpose, (const void *) value));
-}
-
-KEYWORD1 void KEYWORD2 NAME(UniformMatrix3fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value)
-{
- DISPATCH(UniformMatrix3fv, (location, count, transpose, value), (F, "glUniformMatrix3fv(%d, %d, %d, %p);\n", location, count, transpose, (const void *) value));
-}
-
-KEYWORD1 void KEYWORD2 NAME(UniformMatrix4fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value)
-{
- DISPATCH(UniformMatrix4fv, (location, count, transpose, value), (F, "glUniformMatrix4fv(%d, %d, %d, %p);\n", location, count, transpose, (const void *) value));
-}
-
-KEYWORD1 void KEYWORD2 NAME(UseProgram)(GLuint program)
-{
- DISPATCH(UseProgram, (program), (F, "glUseProgram(%d);\n", program));
-}
-
-KEYWORD1 void KEYWORD2 NAME(ValidateProgram)(GLuint program)
-{
- DISPATCH(ValidateProgram, (program), (F, "glValidateProgram(%d);\n", program));
-}
-
-KEYWORD1 void KEYWORD2 NAME(VertexAttrib1f)(GLuint index, GLfloat x)
-{
- DISPATCH(VertexAttrib1f, (index, x), (F, "glVertexAttrib1f(%d, %f);\n", index, x));
-}
-
-KEYWORD1 void KEYWORD2 NAME(VertexAttrib1fv)(GLuint index, const GLfloat * v)
-{
- DISPATCH(VertexAttrib1fv, (index, v), (F, "glVertexAttrib1fv(%d, %p);\n", index, (const void *) v));
-}
-
-KEYWORD1 void KEYWORD2 NAME(VertexAttrib2f)(GLuint index, GLfloat x, GLfloat y)
-{
- DISPATCH(VertexAttrib2f, (index, x, y), (F, "glVertexAttrib2f(%d, %f, %f);\n", index, x, y));
-}
-
-KEYWORD1 void KEYWORD2 NAME(VertexAttrib2fv)(GLuint index, const GLfloat * v)
-{
- DISPATCH(VertexAttrib2fv, (index, v), (F, "glVertexAttrib2fv(%d, %p);\n", index, (const void *) v));
-}
-
-KEYWORD1 void KEYWORD2 NAME(VertexAttrib3f)(GLuint index, GLfloat x, GLfloat y, GLfloat z)
-{
- DISPATCH(VertexAttrib3f, (index, x, y, z), (F, "glVertexAttrib3f(%d, %f, %f, %f);\n", index, x, y, z));
-}
-
-KEYWORD1 void KEYWORD2 NAME(VertexAttrib3fv)(GLuint index, const GLfloat * v)
-{
- DISPATCH(VertexAttrib3fv, (index, v), (F, "glVertexAttrib3fv(%d, %p);\n", index, (const void *) v));
-}
-
-KEYWORD1 void KEYWORD2 NAME(VertexAttrib4f)(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
-{
- DISPATCH(VertexAttrib4f, (index, x, y, z, w), (F, "glVertexAttrib4f(%d, %f, %f, %f, %f);\n", index, x, y, z, w));
-}
-
-KEYWORD1 void KEYWORD2 NAME(VertexAttrib4fv)(GLuint index, const GLfloat * v)
-{
- DISPATCH(VertexAttrib4fv, (index, v), (F, "glVertexAttrib4fv(%d, %p);\n", index, (const void *) v));
-}
-
-KEYWORD1 void KEYWORD2 NAME(VertexAttribPointer)(GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid * pointer)
-{
- DISPATCH(VertexAttribPointer, (index, size, type, normalized, stride, pointer), (F, "glVertexAttribPointer(%d, %d, 0x%x, %d, %d, %p);\n", index, size, type, normalized, stride, (const void *) pointer));
-}
-
-KEYWORD1 void KEYWORD2 NAME(BlendFuncSeparate)(GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha)
-{
- DISPATCH(BlendFuncSeparate, (sfactorRGB, dfactorRGB, sfactorAlpha, dfactorAlpha), (F, "glBlendFuncSeparate(0x%x, 0x%x, 0x%x, 0x%x);\n", sfactorRGB, dfactorRGB, sfactorAlpha, dfactorAlpha));
-}
-
-KEYWORD1 void KEYWORD2 NAME(BindFramebuffer)(GLenum target, GLuint framebuffer);
-
-KEYWORD1 void KEYWORD2 NAME(BindFramebuffer)(GLenum target, GLuint framebuffer)
-{
- DISPATCH(BindFramebuffer, (target, framebuffer), (F, "glBindFramebuffer(0x%x, %d);\n", target, framebuffer));
-}
-
-KEYWORD1 void KEYWORD2 NAME(BindRenderbuffer)(GLenum target, GLuint renderbuffer);
-
-KEYWORD1 void KEYWORD2 NAME(BindRenderbuffer)(GLenum target, GLuint renderbuffer)
-{
- DISPATCH(BindRenderbuffer, (target, renderbuffer), (F, "glBindRenderbuffer(0x%x, %d);\n", target, renderbuffer));
-}
-
-KEYWORD1 GLenum KEYWORD2 NAME(CheckFramebufferStatus)(GLenum target);
-
-KEYWORD1 GLenum KEYWORD2 NAME(CheckFramebufferStatus)(GLenum target)
-{
- RETURN_DISPATCH(CheckFramebufferStatus, (target), (F, "glCheckFramebufferStatus(0x%x);\n", target));
-}
-
-KEYWORD1 void KEYWORD2 NAME(ClearDepthf)(GLclampf depth);
-
-KEYWORD1 void KEYWORD2 NAME(ClearDepthf)(GLclampf depth)
-{
- DISPATCH(ClearDepthf, (depth), (F, "glClearDepthf(%f);\n", depth));
-}
-
-KEYWORD1 void KEYWORD2 NAME(DeleteFramebuffers)(GLsizei n, const GLuint * framebuffers);
-
-KEYWORD1 void KEYWORD2 NAME(DeleteFramebuffers)(GLsizei n, const GLuint * framebuffers)
-{
- DISPATCH(DeleteFramebuffers, (n, framebuffers), (F, "glDeleteFramebuffers(%d, %p);\n", n, (const void *) framebuffers));
-}
-
-KEYWORD1 void KEYWORD2 NAME(DeleteRenderbuffers)(GLsizei n, const GLuint * renderbuffers);
-
-KEYWORD1 void KEYWORD2 NAME(DeleteRenderbuffers)(GLsizei n, const GLuint * renderbuffers)
-{
- DISPATCH(DeleteRenderbuffers, (n, renderbuffers), (F, "glDeleteRenderbuffers(%d, %p);\n", n, (const void *) renderbuffers));
-}
-
-KEYWORD1 void KEYWORD2 NAME(DepthRangef)(GLclampf zNear, GLclampf zFar);
-
-KEYWORD1 void KEYWORD2 NAME(DepthRangef)(GLclampf zNear, GLclampf zFar)
-{
- DISPATCH(DepthRangef, (zNear, zFar), (F, "glDepthRangef(%f, %f);\n", zNear, zFar));
-}
-
-KEYWORD1 void KEYWORD2 NAME(FramebufferRenderbuffer)(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
-
-KEYWORD1 void KEYWORD2 NAME(FramebufferRenderbuffer)(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer)
-{
- DISPATCH(FramebufferRenderbuffer, (target, attachment, renderbuffertarget, renderbuffer), (F, "glFramebufferRenderbuffer(0x%x, 0x%x, 0x%x, %d);\n", target, attachment, renderbuffertarget, renderbuffer));
-}
-
-KEYWORD1 void KEYWORD2 NAME(FramebufferTexture2D)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
-
-KEYWORD1 void KEYWORD2 NAME(FramebufferTexture2D)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level)
-{
- DISPATCH(FramebufferTexture2D, (target, attachment, textarget, texture, level), (F, "glFramebufferTexture2D(0x%x, 0x%x, 0x%x, %d, %d);\n", target, attachment, textarget, texture, level));
-}
-
-KEYWORD1 void KEYWORD2 NAME(GenFramebuffers)(GLsizei n, GLuint * framebuffers);
-
-KEYWORD1 void KEYWORD2 NAME(GenFramebuffers)(GLsizei n, GLuint * framebuffers)
-{
- DISPATCH(GenFramebuffers, (n, framebuffers), (F, "glGenFramebuffers(%d, %p);\n", n, (const void *) framebuffers));
-}
-
-KEYWORD1 void KEYWORD2 NAME(GenRenderbuffers)(GLsizei n, GLuint * renderbuffers);
-
-KEYWORD1 void KEYWORD2 NAME(GenRenderbuffers)(GLsizei n, GLuint * renderbuffers)
-{
- DISPATCH(GenRenderbuffers, (n, renderbuffers), (F, "glGenRenderbuffers(%d, %p);\n", n, (const void *) renderbuffers));
-}
-
-KEYWORD1 void KEYWORD2 NAME(GenerateMipmap)(GLenum target);
-
-KEYWORD1 void KEYWORD2 NAME(GenerateMipmap)(GLenum target)
-{
- DISPATCH(GenerateMipmap, (target), (F, "glGenerateMipmap(0x%x);\n", target));
-}
-
-KEYWORD1 void KEYWORD2 NAME(GetFramebufferAttachmentParameteriv)(GLenum target, GLenum attachment, GLenum pname, GLint * params);
-
-KEYWORD1 void KEYWORD2 NAME(GetFramebufferAttachmentParameteriv)(GLenum target, GLenum attachment, GLenum pname, GLint * params)
-{
- DISPATCH(GetFramebufferAttachmentParameteriv, (target, attachment, pname, params), (F, "glGetFramebufferAttachmentParameteriv(0x%x, 0x%x, 0x%x, %p);\n", target, attachment, pname, (const void *) params));
-}
-
-KEYWORD1 void KEYWORD2 NAME(GetRenderbufferParameteriv)(GLenum target, GLenum pname, GLint * params);
-
-KEYWORD1 void KEYWORD2 NAME(GetRenderbufferParameteriv)(GLenum target, GLenum pname, GLint * params)
-{
- DISPATCH(GetRenderbufferParameteriv, (target, pname, params), (F, "glGetRenderbufferParameteriv(0x%x, 0x%x, %p);\n", target, pname, (const void *) params));
-}
-
-KEYWORD1 void KEYWORD2 NAME(GetShaderPrecisionFormat)(GLenum shadertype, GLenum precisiontype, GLint * range, GLint * precision);
-
-KEYWORD1 void KEYWORD2 NAME(GetShaderPrecisionFormat)(GLenum shadertype, GLenum precisiontype, GLint * range, GLint * precision)
-{
- DISPATCH(GetShaderPrecisionFormat, (shadertype, precisiontype, range, precision), (F, "glGetShaderPrecisionFormat(0x%x, 0x%x, %p, %p);\n", shadertype, precisiontype, (const void *) range, (const void *) precision));
-}
-
-KEYWORD1 GLboolean KEYWORD2 NAME(IsFramebuffer)(GLuint framebuffer);
-
-KEYWORD1 GLboolean KEYWORD2 NAME(IsFramebuffer)(GLuint framebuffer)
-{
- RETURN_DISPATCH(IsFramebuffer, (framebuffer), (F, "glIsFramebuffer(%d);\n", framebuffer));
-}
-
-KEYWORD1 GLboolean KEYWORD2 NAME(IsRenderbuffer)(GLuint renderbuffer);
-
-KEYWORD1 GLboolean KEYWORD2 NAME(IsRenderbuffer)(GLuint renderbuffer)
-{
- RETURN_DISPATCH(IsRenderbuffer, (renderbuffer), (F, "glIsRenderbuffer(%d);\n", renderbuffer));
-}
-
-KEYWORD1 void KEYWORD2 NAME(ReleaseShaderCompiler)(void);
-
-KEYWORD1 void KEYWORD2 NAME(ReleaseShaderCompiler)(void)
-{
- DISPATCH(ReleaseShaderCompiler, (), (F, "glReleaseShaderCompiler();\n"));
-}
-
-KEYWORD1 void KEYWORD2 NAME(RenderbufferStorage)(GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
-
-KEYWORD1 void KEYWORD2 NAME(RenderbufferStorage)(GLenum target, GLenum internalformat, GLsizei width, GLsizei height)
-{
- DISPATCH(RenderbufferStorage, (target, internalformat, width, height), (F, "glRenderbufferStorage(0x%x, 0x%x, %d, %d);\n", target, internalformat, width, height));
-}
-
-KEYWORD1 void KEYWORD2 NAME(ShaderBinary)(GLsizei n, const GLuint * shaders, GLenum binaryformat, const GLvoid * binary, GLsizei length);
-
-KEYWORD1 void KEYWORD2 NAME(ShaderBinary)(GLsizei n, const GLuint * shaders, GLenum binaryformat, const GLvoid * binary, GLsizei length)
-{
- DISPATCH(ShaderBinary, (n, shaders, binaryformat, binary, length), (F, "glShaderBinary(%d, %p, 0x%x, %p, %d);\n", n, (const void *) shaders, binaryformat, (const void *) binary, length));
-}
-
-
-#endif /* _GLAPI_SKIP_NORMAL_ENTRY_POINTS */
-
-/* these entry points might require different protocols */
-#ifndef _GLAPI_SKIP_PROTO_ENTRY_POINTS
-
-
-#endif /* _GLAPI_SKIP_PROTO_ENTRY_POINTS */
-
-
-#endif /* defined( NAME ) */
-
-/*
- * This is how a dispatch table can be initialized with all the functions
- * we generated above.
- */
-#ifdef DISPATCH_TABLE_NAME
-
-#ifndef TABLE_ENTRY
-#error TABLE_ENTRY must be defined
-#endif
-
-#ifdef _GLAPI_SKIP_NORMAL_ENTRY_POINTS
-#error _GLAPI_SKIP_NORMAL_ENTRY_POINTS must not be defined
-#endif
-
-_glapi_proc DISPATCH_TABLE_NAME[] = {
- TABLE_ENTRY(_dispatch_stub_0),
- TABLE_ENTRY(_dispatch_stub_1),
- TABLE_ENTRY(_dispatch_stub_2),
- TABLE_ENTRY(_dispatch_stub_3),
- TABLE_ENTRY(_dispatch_stub_4),
- TABLE_ENTRY(_dispatch_stub_5),
- TABLE_ENTRY(_dispatch_stub_6),
- TABLE_ENTRY(_dispatch_stub_7),
- TABLE_ENTRY(_dispatch_stub_8),
- TABLE_ENTRY(_dispatch_stub_9),
- TABLE_ENTRY(_dispatch_stub_10),
- TABLE_ENTRY(_dispatch_stub_11),
- TABLE_ENTRY(_dispatch_stub_12),
- TABLE_ENTRY(_dispatch_stub_13),
- TABLE_ENTRY(_dispatch_stub_14),
- TABLE_ENTRY(_dispatch_stub_15),
- TABLE_ENTRY(_dispatch_stub_16),
- TABLE_ENTRY(_dispatch_stub_17),
- TABLE_ENTRY(_dispatch_stub_18),
- TABLE_ENTRY(_dispatch_stub_19),
- TABLE_ENTRY(_dispatch_stub_20),
- TABLE_ENTRY(_dispatch_stub_21),
- TABLE_ENTRY(_dispatch_stub_22),
- TABLE_ENTRY(_dispatch_stub_23),
- TABLE_ENTRY(_dispatch_stub_24),
- TABLE_ENTRY(_dispatch_stub_25),
- TABLE_ENTRY(_dispatch_stub_26),
- TABLE_ENTRY(_dispatch_stub_27),
- TABLE_ENTRY(_dispatch_stub_28),
- TABLE_ENTRY(_dispatch_stub_29),
- TABLE_ENTRY(_dispatch_stub_30),
- TABLE_ENTRY(_dispatch_stub_31),
- TABLE_ENTRY(_dispatch_stub_32),
- TABLE_ENTRY(_dispatch_stub_33),
- TABLE_ENTRY(_dispatch_stub_34),
- TABLE_ENTRY(_dispatch_stub_35),
- TABLE_ENTRY(_dispatch_stub_36),
- TABLE_ENTRY(_dispatch_stub_37),
- TABLE_ENTRY(_dispatch_stub_38),
- TABLE_ENTRY(_dispatch_stub_39),
- TABLE_ENTRY(_dispatch_stub_40),
- TABLE_ENTRY(_dispatch_stub_41),
- TABLE_ENTRY(_dispatch_stub_42),
- TABLE_ENTRY(_dispatch_stub_43),
- TABLE_ENTRY(_dispatch_stub_44),
- TABLE_ENTRY(_dispatch_stub_45),
- TABLE_ENTRY(_dispatch_stub_46),
- TABLE_ENTRY(_dispatch_stub_47),
- TABLE_ENTRY(_dispatch_stub_48),
- TABLE_ENTRY(_dispatch_stub_49),
- TABLE_ENTRY(_dispatch_stub_50),
- TABLE_ENTRY(_dispatch_stub_51),
- TABLE_ENTRY(_dispatch_stub_52),
- TABLE_ENTRY(_dispatch_stub_53),
- TABLE_ENTRY(_dispatch_stub_54),
- TABLE_ENTRY(_dispatch_stub_55),
- TABLE_ENTRY(_dispatch_stub_56),
- TABLE_ENTRY(_dispatch_stub_57),
- TABLE_ENTRY(_dispatch_stub_58),
- TABLE_ENTRY(_dispatch_stub_59),
- TABLE_ENTRY(_dispatch_stub_60),
- TABLE_ENTRY(_dispatch_stub_61),
- TABLE_ENTRY(_dispatch_stub_62),
- TABLE_ENTRY(_dispatch_stub_63),
- TABLE_ENTRY(_dispatch_stub_64),
- TABLE_ENTRY(_dispatch_stub_65),
- TABLE_ENTRY(_dispatch_stub_66),
- TABLE_ENTRY(_dispatch_stub_67),
- TABLE_ENTRY(_dispatch_stub_68),
- TABLE_ENTRY(_dispatch_stub_69),
- TABLE_ENTRY(_dispatch_stub_70),
- TABLE_ENTRY(_dispatch_stub_71),
- TABLE_ENTRY(_dispatch_stub_72),
- TABLE_ENTRY(_dispatch_stub_73),
- TABLE_ENTRY(_dispatch_stub_74),
- TABLE_ENTRY(_dispatch_stub_75),
- TABLE_ENTRY(_dispatch_stub_76),
- TABLE_ENTRY(_dispatch_stub_77),
- TABLE_ENTRY(_dispatch_stub_78),
- TABLE_ENTRY(_dispatch_stub_79),
- TABLE_ENTRY(_dispatch_stub_80),
- TABLE_ENTRY(_dispatch_stub_81),
- TABLE_ENTRY(_dispatch_stub_82),
- TABLE_ENTRY(_dispatch_stub_83),
- TABLE_ENTRY(_dispatch_stub_84),
- TABLE_ENTRY(_dispatch_stub_85),
- TABLE_ENTRY(_dispatch_stub_86),
- TABLE_ENTRY(_dispatch_stub_87),
- TABLE_ENTRY(_dispatch_stub_88),
- TABLE_ENTRY(_dispatch_stub_89),
- TABLE_ENTRY(_dispatch_stub_90),
- TABLE_ENTRY(_dispatch_stub_91),
- TABLE_ENTRY(_dispatch_stub_92),
- TABLE_ENTRY(_dispatch_stub_93),
- TABLE_ENTRY(_dispatch_stub_94),
- TABLE_ENTRY(_dispatch_stub_95),
- TABLE_ENTRY(_dispatch_stub_96),
- TABLE_ENTRY(_dispatch_stub_97),
- TABLE_ENTRY(_dispatch_stub_98),
- TABLE_ENTRY(_dispatch_stub_99),
- TABLE_ENTRY(_dispatch_stub_100),
- TABLE_ENTRY(_dispatch_stub_101),
- TABLE_ENTRY(_dispatch_stub_102),
- TABLE_ENTRY(_dispatch_stub_103),
- TABLE_ENTRY(_dispatch_stub_104),
- TABLE_ENTRY(_dispatch_stub_105),
- TABLE_ENTRY(_dispatch_stub_106),
- TABLE_ENTRY(_dispatch_stub_107),
- TABLE_ENTRY(_dispatch_stub_108),
- TABLE_ENTRY(_dispatch_stub_109),
- TABLE_ENTRY(_dispatch_stub_110),
- TABLE_ENTRY(_dispatch_stub_111),
- TABLE_ENTRY(_dispatch_stub_112),
- TABLE_ENTRY(_dispatch_stub_113),
- TABLE_ENTRY(_dispatch_stub_114),
- TABLE_ENTRY(_dispatch_stub_115),
- TABLE_ENTRY(_dispatch_stub_116),
- TABLE_ENTRY(_dispatch_stub_117),
- TABLE_ENTRY(_dispatch_stub_118),
- TABLE_ENTRY(_dispatch_stub_119),
- TABLE_ENTRY(_dispatch_stub_120),
- TABLE_ENTRY(_dispatch_stub_121),
- TABLE_ENTRY(_dispatch_stub_122),
- TABLE_ENTRY(_dispatch_stub_123),
- TABLE_ENTRY(_dispatch_stub_124),
- TABLE_ENTRY(_dispatch_stub_125),
- TABLE_ENTRY(_dispatch_stub_126),
- TABLE_ENTRY(_dispatch_stub_127),
- TABLE_ENTRY(_dispatch_stub_128),
- TABLE_ENTRY(_dispatch_stub_129),
- TABLE_ENTRY(_dispatch_stub_130),
- TABLE_ENTRY(_dispatch_stub_131),
- TABLE_ENTRY(_dispatch_stub_132),
- TABLE_ENTRY(_dispatch_stub_133),
- TABLE_ENTRY(_dispatch_stub_134),
- TABLE_ENTRY(_dispatch_stub_135),
- TABLE_ENTRY(_dispatch_stub_136),
- TABLE_ENTRY(_dispatch_stub_137),
- TABLE_ENTRY(_dispatch_stub_138),
- TABLE_ENTRY(_dispatch_stub_139),
- TABLE_ENTRY(_dispatch_stub_140),
- TABLE_ENTRY(_dispatch_stub_141),
- TABLE_ENTRY(_dispatch_stub_142),
- TABLE_ENTRY(_dispatch_stub_143),
- TABLE_ENTRY(_dispatch_stub_144),
- TABLE_ENTRY(_dispatch_stub_145),
- TABLE_ENTRY(_dispatch_stub_146),
- TABLE_ENTRY(_dispatch_stub_147),
- TABLE_ENTRY(_dispatch_stub_148),
- TABLE_ENTRY(_dispatch_stub_149),
- TABLE_ENTRY(_dispatch_stub_150),
- TABLE_ENTRY(_dispatch_stub_151),
- TABLE_ENTRY(CullFace),
- TABLE_ENTRY(_dispatch_stub_153),
- TABLE_ENTRY(_dispatch_stub_154),
- TABLE_ENTRY(_dispatch_stub_155),
- TABLE_ENTRY(_dispatch_stub_156),
- TABLE_ENTRY(FrontFace),
- TABLE_ENTRY(Hint),
- TABLE_ENTRY(_dispatch_stub_159),
- TABLE_ENTRY(_dispatch_stub_160),
- TABLE_ENTRY(_dispatch_stub_161),
- TABLE_ENTRY(_dispatch_stub_162),
- TABLE_ENTRY(_dispatch_stub_163),
- TABLE_ENTRY(_dispatch_stub_164),
- TABLE_ENTRY(_dispatch_stub_165),
- TABLE_ENTRY(_dispatch_stub_166),
- TABLE_ENTRY(_dispatch_stub_167),
- TABLE_ENTRY(LineWidth),
- TABLE_ENTRY(_dispatch_stub_169),
- TABLE_ENTRY(_dispatch_stub_170),
- TABLE_ENTRY(_dispatch_stub_171),
- TABLE_ENTRY(_dispatch_stub_172),
- TABLE_ENTRY(_dispatch_stub_173),
- TABLE_ENTRY(_dispatch_stub_174),
- TABLE_ENTRY(_dispatch_stub_175),
- TABLE_ENTRY(Scissor),
- TABLE_ENTRY(_dispatch_stub_177),
- TABLE_ENTRY(TexParameterf),
- TABLE_ENTRY(TexParameterfv),
- TABLE_ENTRY(TexParameteri),
- TABLE_ENTRY(TexParameteriv),
- TABLE_ENTRY(_dispatch_stub_182),
- TABLE_ENTRY(TexImage2D),
- TABLE_ENTRY(_dispatch_stub_184),
- TABLE_ENTRY(_dispatch_stub_185),
- TABLE_ENTRY(_dispatch_stub_186),
- TABLE_ENTRY(_dispatch_stub_187),
- TABLE_ENTRY(_dispatch_stub_188),
- TABLE_ENTRY(_dispatch_stub_189),
- TABLE_ENTRY(_dispatch_stub_190),
- TABLE_ENTRY(_dispatch_stub_191),
- TABLE_ENTRY(_dispatch_stub_192),
- TABLE_ENTRY(_dispatch_stub_193),
- TABLE_ENTRY(_dispatch_stub_194),
- TABLE_ENTRY(_dispatch_stub_195),
- TABLE_ENTRY(_dispatch_stub_196),
- TABLE_ENTRY(_dispatch_stub_197),
- TABLE_ENTRY(_dispatch_stub_198),
- TABLE_ENTRY(_dispatch_stub_199),
- TABLE_ENTRY(_dispatch_stub_200),
- TABLE_ENTRY(_dispatch_stub_201),
- TABLE_ENTRY(_dispatch_stub_202),
- TABLE_ENTRY(Clear),
- TABLE_ENTRY(_dispatch_stub_204),
- TABLE_ENTRY(_dispatch_stub_205),
- TABLE_ENTRY(ClearColor),
- TABLE_ENTRY(ClearStencil),
- TABLE_ENTRY(_dispatch_stub_208),
- TABLE_ENTRY(StencilMask),
- TABLE_ENTRY(ColorMask),
- TABLE_ENTRY(DepthMask),
- TABLE_ENTRY(_dispatch_stub_212),
- TABLE_ENTRY(_dispatch_stub_213),
- TABLE_ENTRY(Disable),
- TABLE_ENTRY(Enable),
- TABLE_ENTRY(Finish),
- TABLE_ENTRY(Flush),
- TABLE_ENTRY(_dispatch_stub_218),
- TABLE_ENTRY(_dispatch_stub_219),
- TABLE_ENTRY(_dispatch_stub_220),
- TABLE_ENTRY(_dispatch_stub_221),
- TABLE_ENTRY(_dispatch_stub_222),
- TABLE_ENTRY(_dispatch_stub_223),
- TABLE_ENTRY(_dispatch_stub_224),
- TABLE_ENTRY(_dispatch_stub_225),
- TABLE_ENTRY(_dispatch_stub_226),
- TABLE_ENTRY(_dispatch_stub_227),
- TABLE_ENTRY(_dispatch_stub_228),
- TABLE_ENTRY(_dispatch_stub_229),
- TABLE_ENTRY(_dispatch_stub_230),
- TABLE_ENTRY(_dispatch_stub_231),
- TABLE_ENTRY(_dispatch_stub_232),
- TABLE_ENTRY(_dispatch_stub_233),
- TABLE_ENTRY(_dispatch_stub_234),
- TABLE_ENTRY(_dispatch_stub_235),
- TABLE_ENTRY(_dispatch_stub_236),
- TABLE_ENTRY(_dispatch_stub_237),
- TABLE_ENTRY(_dispatch_stub_238),
- TABLE_ENTRY(_dispatch_stub_239),
- TABLE_ENTRY(_dispatch_stub_240),
- TABLE_ENTRY(BlendFunc),
- TABLE_ENTRY(_dispatch_stub_242),
- TABLE_ENTRY(StencilFunc),
- TABLE_ENTRY(StencilOp),
- TABLE_ENTRY(DepthFunc),
- TABLE_ENTRY(_dispatch_stub_246),
- TABLE_ENTRY(_dispatch_stub_247),
- TABLE_ENTRY(_dispatch_stub_248),
- TABLE_ENTRY(_dispatch_stub_249),
- TABLE_ENTRY(PixelStorei),
- TABLE_ENTRY(_dispatch_stub_251),
- TABLE_ENTRY(_dispatch_stub_252),
- TABLE_ENTRY(_dispatch_stub_253),
- TABLE_ENTRY(_dispatch_stub_254),
- TABLE_ENTRY(_dispatch_stub_255),
- TABLE_ENTRY(ReadPixels),
- TABLE_ENTRY(_dispatch_stub_257),
- TABLE_ENTRY(GetBooleanv),
- TABLE_ENTRY(_dispatch_stub_259),
- TABLE_ENTRY(_dispatch_stub_260),
- TABLE_ENTRY(GetError),
- TABLE_ENTRY(GetFloatv),
- TABLE_ENTRY(GetIntegerv),
- TABLE_ENTRY(_dispatch_stub_264),
- TABLE_ENTRY(_dispatch_stub_265),
- TABLE_ENTRY(_dispatch_stub_266),
- TABLE_ENTRY(_dispatch_stub_267),
- TABLE_ENTRY(_dispatch_stub_268),
- TABLE_ENTRY(_dispatch_stub_269),
- TABLE_ENTRY(_dispatch_stub_270),
- TABLE_ENTRY(_dispatch_stub_271),
- TABLE_ENTRY(_dispatch_stub_272),
- TABLE_ENTRY(_dispatch_stub_273),
- TABLE_ENTRY(_dispatch_stub_274),
- TABLE_ENTRY(GetString),
- TABLE_ENTRY(_dispatch_stub_276),
- TABLE_ENTRY(_dispatch_stub_277),
- TABLE_ENTRY(_dispatch_stub_278),
- TABLE_ENTRY(_dispatch_stub_279),
- TABLE_ENTRY(_dispatch_stub_280),
- TABLE_ENTRY(_dispatch_stub_281),
- TABLE_ENTRY(GetTexParameterfv),
- TABLE_ENTRY(GetTexParameteriv),
- TABLE_ENTRY(_dispatch_stub_284),
- TABLE_ENTRY(_dispatch_stub_285),
- TABLE_ENTRY(IsEnabled),
- TABLE_ENTRY(_dispatch_stub_287),
- TABLE_ENTRY(_dispatch_stub_288),
- TABLE_ENTRY(_dispatch_stub_289),
- TABLE_ENTRY(_dispatch_stub_290),
- TABLE_ENTRY(_dispatch_stub_291),
- TABLE_ENTRY(_dispatch_stub_292),
- TABLE_ENTRY(_dispatch_stub_293),
- TABLE_ENTRY(_dispatch_stub_294),
- TABLE_ENTRY(_dispatch_stub_295),
- TABLE_ENTRY(_dispatch_stub_296),
- TABLE_ENTRY(_dispatch_stub_297),
- TABLE_ENTRY(_dispatch_stub_298),
- TABLE_ENTRY(_dispatch_stub_299),
- TABLE_ENTRY(_dispatch_stub_300),
- TABLE_ENTRY(_dispatch_stub_301),
- TABLE_ENTRY(_dispatch_stub_302),
- TABLE_ENTRY(_dispatch_stub_303),
- TABLE_ENTRY(_dispatch_stub_304),
- TABLE_ENTRY(Viewport),
- TABLE_ENTRY(_dispatch_stub_306),
- TABLE_ENTRY(BindTexture),
- TABLE_ENTRY(_dispatch_stub_308),
- TABLE_ENTRY(_dispatch_stub_309),
- TABLE_ENTRY(DrawArrays),
- TABLE_ENTRY(DrawElements),
- TABLE_ENTRY(_dispatch_stub_312),
- TABLE_ENTRY(_dispatch_stub_313),
- TABLE_ENTRY(_dispatch_stub_314),
- TABLE_ENTRY(_dispatch_stub_315),
- TABLE_ENTRY(_dispatch_stub_316),
- TABLE_ENTRY(_dispatch_stub_317),
- TABLE_ENTRY(_dispatch_stub_318),
- TABLE_ENTRY(PolygonOffset),
- TABLE_ENTRY(_dispatch_stub_320),
- TABLE_ENTRY(_dispatch_stub_321),
- TABLE_ENTRY(_dispatch_stub_322),
- TABLE_ENTRY(_dispatch_stub_323),
- TABLE_ENTRY(CopyTexImage2D),
- TABLE_ENTRY(_dispatch_stub_325),
- TABLE_ENTRY(CopyTexSubImage2D),
- TABLE_ENTRY(DeleteTextures),
- TABLE_ENTRY(GenTextures),
- TABLE_ENTRY(_dispatch_stub_329),
- TABLE_ENTRY(IsTexture),
- TABLE_ENTRY(_dispatch_stub_331),
- TABLE_ENTRY(_dispatch_stub_332),
- TABLE_ENTRY(TexSubImage2D),
- TABLE_ENTRY(_dispatch_stub_334),
- TABLE_ENTRY(_dispatch_stub_335),
- TABLE_ENTRY(BlendColor),
- TABLE_ENTRY(BlendEquation),
- TABLE_ENTRY(_dispatch_stub_338),
- TABLE_ENTRY(_dispatch_stub_339),
- TABLE_ENTRY(_dispatch_stub_340),
- TABLE_ENTRY(_dispatch_stub_341),
- TABLE_ENTRY(_dispatch_stub_342),
- TABLE_ENTRY(_dispatch_stub_343),
- TABLE_ENTRY(_dispatch_stub_344),
- TABLE_ENTRY(_dispatch_stub_345),
- 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_356),
- TABLE_ENTRY(_dispatch_stub_357),
- TABLE_ENTRY(_dispatch_stub_358),
- TABLE_ENTRY(_dispatch_stub_359),
- TABLE_ENTRY(_dispatch_stub_360),
- 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),
- TABLE_ENTRY(_dispatch_stub_367),
- TABLE_ENTRY(_dispatch_stub_368),
- TABLE_ENTRY(_dispatch_stub_369),
- TABLE_ENTRY(_dispatch_stub_370),
- TABLE_ENTRY(TexImage3DOES),
- TABLE_ENTRY(TexSubImage3DOES),
- TABLE_ENTRY(CopyTexSubImage3DOES),
- TABLE_ENTRY(ActiveTexture),
- TABLE_ENTRY(_dispatch_stub_375),
- TABLE_ENTRY(_dispatch_stub_376),
- TABLE_ENTRY(_dispatch_stub_377),
- TABLE_ENTRY(_dispatch_stub_378),
- TABLE_ENTRY(_dispatch_stub_379),
- TABLE_ENTRY(_dispatch_stub_380),
- TABLE_ENTRY(_dispatch_stub_381),
- TABLE_ENTRY(_dispatch_stub_382),
- TABLE_ENTRY(_dispatch_stub_383),
- TABLE_ENTRY(_dispatch_stub_384),
- TABLE_ENTRY(_dispatch_stub_385),
- TABLE_ENTRY(_dispatch_stub_386),
- TABLE_ENTRY(_dispatch_stub_387),
- TABLE_ENTRY(_dispatch_stub_388),
- TABLE_ENTRY(_dispatch_stub_389),
- TABLE_ENTRY(_dispatch_stub_390),
- TABLE_ENTRY(_dispatch_stub_391),
- TABLE_ENTRY(_dispatch_stub_392),
- TABLE_ENTRY(_dispatch_stub_393),
- TABLE_ENTRY(_dispatch_stub_394),
- TABLE_ENTRY(_dispatch_stub_395),
- TABLE_ENTRY(_dispatch_stub_396),
- TABLE_ENTRY(_dispatch_stub_397),
- TABLE_ENTRY(_dispatch_stub_398),
- TABLE_ENTRY(_dispatch_stub_399),
- TABLE_ENTRY(_dispatch_stub_400),
- TABLE_ENTRY(_dispatch_stub_401),
- TABLE_ENTRY(_dispatch_stub_402),
- TABLE_ENTRY(_dispatch_stub_403),
- TABLE_ENTRY(_dispatch_stub_404),
- TABLE_ENTRY(_dispatch_stub_405),
- TABLE_ENTRY(_dispatch_stub_406),
- TABLE_ENTRY(_dispatch_stub_407),
- TABLE_ENTRY(GetBufferPointervOES),
- TABLE_ENTRY(MapBufferOES),
- TABLE_ENTRY(UnmapBufferOES),
- TABLE_ENTRY(CompressedTexImage3DOES),
- TABLE_ENTRY(CompressedTexSubImage3DOES),
- TABLE_ENTRY(FramebufferTexture3DOES),
- TABLE_ENTRY(GetProgramBinaryOES),
- TABLE_ENTRY(ProgramBinaryOES),
- TABLE_ENTRY(MultiDrawArraysEXT),
- TABLE_ENTRY(MultiDrawElementsEXT),
- TABLE_ENTRY(_dispatch_stub_418),
- TABLE_ENTRY(_dispatch_stub_419),
- TABLE_ENTRY(_dispatch_stub_420),
- TABLE_ENTRY(_dispatch_stub_421),
- TABLE_ENTRY(EGLImageTargetRenderbufferStorageOES),
- TABLE_ENTRY(EGLImageTargetTexture2DOES),
- TABLE_ENTRY(CompressedTexImage2D),
- TABLE_ENTRY(CompressedTexSubImage2D),
- TABLE_ENTRY(SampleCoverage),
- TABLE_ENTRY(BindBuffer),
- TABLE_ENTRY(BufferData),
- TABLE_ENTRY(BufferSubData),
- TABLE_ENTRY(DeleteBuffers),
- TABLE_ENTRY(GenBuffers),
- TABLE_ENTRY(GetBufferParameteriv),
- TABLE_ENTRY(IsBuffer),
- TABLE_ENTRY(AttachShader),
- TABLE_ENTRY(BindAttribLocation),
- TABLE_ENTRY(BlendEquationSeparate),
- TABLE_ENTRY(CompileShader),
- TABLE_ENTRY(CreateProgram),
- TABLE_ENTRY(CreateShader),
- TABLE_ENTRY(DeleteProgram),
- TABLE_ENTRY(DeleteShader),
- TABLE_ENTRY(DetachShader),
- TABLE_ENTRY(DisableVertexAttribArray),
- TABLE_ENTRY(EnableVertexAttribArray),
- TABLE_ENTRY(GetActiveAttrib),
- TABLE_ENTRY(GetActiveUniform),
- TABLE_ENTRY(GetAttachedShaders),
- TABLE_ENTRY(GetAttribLocation),
- TABLE_ENTRY(GetProgramInfoLog),
- TABLE_ENTRY(GetProgramiv),
- TABLE_ENTRY(GetShaderInfoLog),
- TABLE_ENTRY(GetShaderSource),
- TABLE_ENTRY(GetShaderiv),
- TABLE_ENTRY(GetUniformLocation),
- TABLE_ENTRY(GetUniformfv),
- TABLE_ENTRY(GetUniformiv),
- TABLE_ENTRY(GetVertexAttribPointerv),
- TABLE_ENTRY(GetVertexAttribfv),
- TABLE_ENTRY(GetVertexAttribiv),
- TABLE_ENTRY(IsProgram),
- TABLE_ENTRY(IsShader),
- TABLE_ENTRY(LinkProgram),
- TABLE_ENTRY(ShaderSource),
- TABLE_ENTRY(StencilFuncSeparate),
- TABLE_ENTRY(StencilMaskSeparate),
- TABLE_ENTRY(StencilOpSeparate),
- TABLE_ENTRY(Uniform1f),
- TABLE_ENTRY(Uniform1fv),
- TABLE_ENTRY(Uniform1i),
- TABLE_ENTRY(Uniform1iv),
- TABLE_ENTRY(Uniform2f),
- TABLE_ENTRY(Uniform2fv),
- TABLE_ENTRY(Uniform2i),
- TABLE_ENTRY(Uniform2iv),
- TABLE_ENTRY(Uniform3f),
- TABLE_ENTRY(Uniform3fv),
- TABLE_ENTRY(Uniform3i),
- TABLE_ENTRY(Uniform3iv),
- TABLE_ENTRY(Uniform4f),
- TABLE_ENTRY(Uniform4fv),
- TABLE_ENTRY(Uniform4i),
- TABLE_ENTRY(Uniform4iv),
- TABLE_ENTRY(UniformMatrix2fv),
- TABLE_ENTRY(UniformMatrix3fv),
- TABLE_ENTRY(UniformMatrix4fv),
- TABLE_ENTRY(UseProgram),
- TABLE_ENTRY(ValidateProgram),
- TABLE_ENTRY(VertexAttrib1f),
- TABLE_ENTRY(VertexAttrib1fv),
- TABLE_ENTRY(VertexAttrib2f),
- TABLE_ENTRY(VertexAttrib2fv),
- TABLE_ENTRY(VertexAttrib3f),
- TABLE_ENTRY(VertexAttrib3fv),
- TABLE_ENTRY(VertexAttrib4f),
- TABLE_ENTRY(VertexAttrib4fv),
- TABLE_ENTRY(VertexAttribPointer),
- TABLE_ENTRY(BlendFuncSeparate),
- TABLE_ENTRY(BindFramebuffer),
- TABLE_ENTRY(BindRenderbuffer),
- TABLE_ENTRY(CheckFramebufferStatus),
- TABLE_ENTRY(ClearDepthf),
- TABLE_ENTRY(DeleteFramebuffers),
- TABLE_ENTRY(DeleteRenderbuffers),
- TABLE_ENTRY(DepthRangef),
- TABLE_ENTRY(FramebufferRenderbuffer),
- TABLE_ENTRY(FramebufferTexture2D),
- TABLE_ENTRY(GenFramebuffers),
- TABLE_ENTRY(GenRenderbuffers),
- TABLE_ENTRY(GenerateMipmap),
- TABLE_ENTRY(GetFramebufferAttachmentParameteriv),
- TABLE_ENTRY(GetRenderbufferParameteriv),
- TABLE_ENTRY(GetShaderPrecisionFormat),
- TABLE_ENTRY(IsFramebuffer),
- TABLE_ENTRY(IsRenderbuffer),
- TABLE_ENTRY(ReleaseShaderCompiler),
- TABLE_ENTRY(RenderbufferStorage),
- TABLE_ENTRY(ShaderBinary),
- /* 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.
- */
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
- TABLE_ENTRY(Unused),
-};
-#endif /* DISPATCH_TABLE_NAME */
-
-
-/*
- * This is just used to silence compiler warnings.
- * We list the functions which are not otherwise used.
- */
-#ifdef UNUSED_TABLE_NAME
-_glapi_proc UNUSED_TABLE_NAME[] = {
-#ifndef _GLAPI_SKIP_NORMAL_ENTRY_POINTS
- TABLE_ENTRY(_dispatch_stub_371),
- TABLE_ENTRY(_dispatch_stub_372),
- TABLE_ENTRY(_dispatch_stub_373),
- TABLE_ENTRY(_dispatch_stub_374),
-#endif /* _GLAPI_SKIP_NORMAL_ENTRY_POINTS */
-#ifndef _GLAPI_SKIP_PROTO_ENTRY_POINTS
-#endif /* _GLAPI_SKIP_PROTO_ENTRY_POINTS */
-};
-#endif /*UNUSED_TABLE_NAME*/
-
-
-# undef KEYWORD1
-# undef KEYWORD1_ALT
-# undef KEYWORD2
-# undef NAME
-# undef DISPATCH
-# undef RETURN_DISPATCH
-# undef DISPATCH_TABLE_NAME
-# undef UNUSED_TABLE_NAME
-# undef TABLE_ENTRY
-# undef HIDDEN
diff --git a/src/mapi/es2api/glapi/glprocs.h b/src/mapi/es2api/glapi/glprocs.h
deleted file mode 100644
index fa27c57f33c..00000000000
--- a/src/mapi/es2api/glapi/glprocs.h
+++ /dev/null
@@ -1,1877 +0,0 @@
-/* DO NOT EDIT - This file generated automatically by gl_procs.py (from Mesa) script */
-
-/*
- * Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
- * (C) Copyright IBM Corporation 2004, 2006
- * 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
- * BRIAN PAUL, IBM,
- * AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
- * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-
-/* This file is only included by glapi.c and is used for
- * the GetProcAddress() function
- */
-
-typedef struct {
- GLint Name_offset;
-#if defined(NEED_FUNCTION_POINTER) || defined(GLX_INDIRECT_RENDERING)
- _glapi_proc Address;
-#endif
- GLuint Offset;
-} glprocs_table_t;
-
-#if !defined(NEED_FUNCTION_POINTER) && !defined(GLX_INDIRECT_RENDERING)
-# define NAME_FUNC_OFFSET(n,f1,f2,f3,o) { n , o }
-#elif defined(NEED_FUNCTION_POINTER) && !defined(GLX_INDIRECT_RENDERING)
-# define NAME_FUNC_OFFSET(n,f1,f2,f3,o) { n , (_glapi_proc) f1 , o }
-#elif defined(NEED_FUNCTION_POINTER) && defined(GLX_INDIRECT_RENDERING)
-# define NAME_FUNC_OFFSET(n,f1,f2,f3,o) { n , (_glapi_proc) f2 , o }
-#elif !defined(NEED_FUNCTION_POINTER) && defined(GLX_INDIRECT_RENDERING)
-# define NAME_FUNC_OFFSET(n,f1,f2,f3,o) { n , (_glapi_proc) f3 , o }
-#endif
-
-
-
-static const char gl_string_table[] =
- "glNewList\0"
- "glEndList\0"
- "glCallList\0"
- "glCallLists\0"
- "glDeleteLists\0"
- "glGenLists\0"
- "glListBase\0"
- "glBegin\0"
- "glBitmap\0"
- "glColor3b\0"
- "glColor3bv\0"
- "glColor3d\0"
- "glColor3dv\0"
- "glColor3f\0"
- "glColor3fv\0"
- "glColor3i\0"
- "glColor3iv\0"
- "glColor3s\0"
- "glColor3sv\0"
- "glColor3ub\0"
- "glColor3ubv\0"
- "glColor3ui\0"
- "glColor3uiv\0"
- "glColor3us\0"
- "glColor3usv\0"
- "glColor4b\0"
- "glColor4bv\0"
- "glColor4d\0"
- "glColor4dv\0"
- "glColor4f\0"
- "glColor4fv\0"
- "glColor4i\0"
- "glColor4iv\0"
- "glColor4s\0"
- "glColor4sv\0"
- "glColor4ub\0"
- "glColor4ubv\0"
- "glColor4ui\0"
- "glColor4uiv\0"
- "glColor4us\0"
- "glColor4usv\0"
- "glEdgeFlag\0"
- "glEdgeFlagv\0"
- "glEnd\0"
- "glIndexd\0"
- "glIndexdv\0"
- "glIndexf\0"
- "glIndexfv\0"
- "glIndexi\0"
- "glIndexiv\0"
- "glIndexs\0"
- "glIndexsv\0"
- "glNormal3b\0"
- "glNormal3bv\0"
- "glNormal3d\0"
- "glNormal3dv\0"
- "glNormal3f\0"
- "glNormal3fv\0"
- "glNormal3i\0"
- "glNormal3iv\0"
- "glNormal3s\0"
- "glNormal3sv\0"
- "glRasterPos2d\0"
- "glRasterPos2dv\0"
- "glRasterPos2f\0"
- "glRasterPos2fv\0"
- "glRasterPos2i\0"
- "glRasterPos2iv\0"
- "glRasterPos2s\0"
- "glRasterPos2sv\0"
- "glRasterPos3d\0"
- "glRasterPos3dv\0"
- "glRasterPos3f\0"
- "glRasterPos3fv\0"
- "glRasterPos3i\0"
- "glRasterPos3iv\0"
- "glRasterPos3s\0"
- "glRasterPos3sv\0"
- "glRasterPos4d\0"
- "glRasterPos4dv\0"
- "glRasterPos4f\0"
- "glRasterPos4fv\0"
- "glRasterPos4i\0"
- "glRasterPos4iv\0"
- "glRasterPos4s\0"
- "glRasterPos4sv\0"
- "glRectd\0"
- "glRectdv\0"
- "glRectf\0"
- "glRectfv\0"
- "glRecti\0"
- "glRectiv\0"
- "glRects\0"
- "glRectsv\0"
- "glTexCoord1d\0"
- "glTexCoord1dv\0"
- "glTexCoord1f\0"
- "glTexCoord1fv\0"
- "glTexCoord1i\0"
- "glTexCoord1iv\0"
- "glTexCoord1s\0"
- "glTexCoord1sv\0"
- "glTexCoord2d\0"
- "glTexCoord2dv\0"
- "glTexCoord2f\0"
- "glTexCoord2fv\0"
- "glTexCoord2i\0"
- "glTexCoord2iv\0"
- "glTexCoord2s\0"
- "glTexCoord2sv\0"
- "glTexCoord3d\0"
- "glTexCoord3dv\0"
- "glTexCoord3f\0"
- "glTexCoord3fv\0"
- "glTexCoord3i\0"
- "glTexCoord3iv\0"
- "glTexCoord3s\0"
- "glTexCoord3sv\0"
- "glTexCoord4d\0"
- "glTexCoord4dv\0"
- "glTexCoord4f\0"
- "glTexCoord4fv\0"
- "glTexCoord4i\0"
- "glTexCoord4iv\0"
- "glTexCoord4s\0"
- "glTexCoord4sv\0"
- "glVertex2d\0"
- "glVertex2dv\0"
- "glVertex2f\0"
- "glVertex2fv\0"
- "glVertex2i\0"
- "glVertex2iv\0"
- "glVertex2s\0"
- "glVertex2sv\0"
- "glVertex3d\0"
- "glVertex3dv\0"
- "glVertex3f\0"
- "glVertex3fv\0"
- "glVertex3i\0"
- "glVertex3iv\0"
- "glVertex3s\0"
- "glVertex3sv\0"
- "glVertex4d\0"
- "glVertex4dv\0"
- "glVertex4f\0"
- "glVertex4fv\0"
- "glVertex4i\0"
- "glVertex4iv\0"
- "glVertex4s\0"
- "glVertex4sv\0"
- "glClipPlane\0"
- "glColorMaterial\0"
- "glCullFace\0"
- "glFogf\0"
- "glFogfv\0"
- "glFogi\0"
- "glFogiv\0"
- "glFrontFace\0"
- "glHint\0"
- "glLightf\0"
- "glLightfv\0"
- "glLighti\0"
- "glLightiv\0"
- "glLightModelf\0"
- "glLightModelfv\0"
- "glLightModeli\0"
- "glLightModeliv\0"
- "glLineStipple\0"
- "glLineWidth\0"
- "glMaterialf\0"
- "glMaterialfv\0"
- "glMateriali\0"
- "glMaterialiv\0"
- "glPointSize\0"
- "glPolygonMode\0"
- "glPolygonStipple\0"
- "glScissor\0"
- "glShadeModel\0"
- "glTexParameterf\0"
- "glTexParameterfv\0"
- "glTexParameteri\0"
- "glTexParameteriv\0"
- "glTexImage1D\0"
- "glTexImage2D\0"
- "glTexEnvf\0"
- "glTexEnvfv\0"
- "glTexEnvi\0"
- "glTexEnviv\0"
- "glTexGend\0"
- "glTexGendv\0"
- "glTexGenf\0"
- "glTexGenfv\0"
- "glTexGeni\0"
- "glTexGeniv\0"
- "glFeedbackBuffer\0"
- "glSelectBuffer\0"
- "glRenderMode\0"
- "glInitNames\0"
- "glLoadName\0"
- "glPassThrough\0"
- "glPopName\0"
- "glPushName\0"
- "glDrawBuffer\0"
- "glClear\0"
- "glClearAccum\0"
- "glClearIndex\0"
- "glClearColor\0"
- "glClearStencil\0"
- "glClearDepth\0"
- "glStencilMask\0"
- "glColorMask\0"
- "glDepthMask\0"
- "glIndexMask\0"
- "glAccum\0"
- "glDisable\0"
- "glEnable\0"
- "glFinish\0"
- "glFlush\0"
- "glPopAttrib\0"
- "glPushAttrib\0"
- "glMap1d\0"
- "glMap1f\0"
- "glMap2d\0"
- "glMap2f\0"
- "glMapGrid1d\0"
- "glMapGrid1f\0"
- "glMapGrid2d\0"
- "glMapGrid2f\0"
- "glEvalCoord1d\0"
- "glEvalCoord1dv\0"
- "glEvalCoord1f\0"
- "glEvalCoord1fv\0"
- "glEvalCoord2d\0"
- "glEvalCoord2dv\0"
- "glEvalCoord2f\0"
- "glEvalCoord2fv\0"
- "glEvalMesh1\0"
- "glEvalPoint1\0"
- "glEvalMesh2\0"
- "glEvalPoint2\0"
- "glAlphaFunc\0"
- "glBlendFunc\0"
- "glLogicOp\0"
- "glStencilFunc\0"
- "glStencilOp\0"
- "glDepthFunc\0"
- "glPixelZoom\0"
- "glPixelTransferf\0"
- "glPixelTransferi\0"
- "glPixelStoref\0"
- "glPixelStorei\0"
- "glPixelMapfv\0"
- "glPixelMapuiv\0"
- "glPixelMapusv\0"
- "glReadBuffer\0"
- "glCopyPixels\0"
- "glReadPixels\0"
- "glDrawPixels\0"
- "glGetBooleanv\0"
- "glGetClipPlane\0"
- "glGetDoublev\0"
- "glGetError\0"
- "glGetFloatv\0"
- "glGetIntegerv\0"
- "glGetLightfv\0"
- "glGetLightiv\0"
- "glGetMapdv\0"
- "glGetMapfv\0"
- "glGetMapiv\0"
- "glGetMaterialfv\0"
- "glGetMaterialiv\0"
- "glGetPixelMapfv\0"
- "glGetPixelMapuiv\0"
- "glGetPixelMapusv\0"
- "glGetPolygonStipple\0"
- "glGetString\0"
- "glGetTexEnvfv\0"
- "glGetTexEnviv\0"
- "glGetTexGendv\0"
- "glGetTexGenfv\0"
- "glGetTexGeniv\0"
- "glGetTexImage\0"
- "glGetTexParameterfv\0"
- "glGetTexParameteriv\0"
- "glGetTexLevelParameterfv\0"
- "glGetTexLevelParameteriv\0"
- "glIsEnabled\0"
- "glIsList\0"
- "glDepthRange\0"
- "glFrustum\0"
- "glLoadIdentity\0"
- "glLoadMatrixf\0"
- "glLoadMatrixd\0"
- "glMatrixMode\0"
- "glMultMatrixf\0"
- "glMultMatrixd\0"
- "glOrtho\0"
- "glPopMatrix\0"
- "glPushMatrix\0"
- "glRotated\0"
- "glRotatef\0"
- "glScaled\0"
- "glScalef\0"
- "glTranslated\0"
- "glTranslatef\0"
- "glViewport\0"
- "glArrayElement\0"
- "glBindTexture\0"
- "glColorPointer\0"
- "glDisableClientState\0"
- "glDrawArrays\0"
- "glDrawElements\0"
- "glEdgeFlagPointer\0"
- "glEnableClientState\0"
- "glIndexPointer\0"
- "glIndexub\0"
- "glIndexubv\0"
- "glInterleavedArrays\0"
- "glNormalPointer\0"
- "glPolygonOffset\0"
- "glTexCoordPointer\0"
- "glVertexPointer\0"
- "glAreTexturesResident\0"
- "glCopyTexImage1D\0"
- "glCopyTexImage2D\0"
- "glCopyTexSubImage1D\0"
- "glCopyTexSubImage2D\0"
- "glDeleteTextures\0"
- "glGenTextures\0"
- "glGetPointerv\0"
- "glIsTexture\0"
- "glPrioritizeTextures\0"
- "glTexSubImage1D\0"
- "glTexSubImage2D\0"
- "glPopClientAttrib\0"
- "glPushClientAttrib\0"
- "glBlendColor\0"
- "glBlendEquation\0"
- "glDrawRangeElements\0"
- "glColorTable\0"
- "glColorTableParameterfv\0"
- "glColorTableParameteriv\0"
- "glCopyColorTable\0"
- "glGetColorTable\0"
- "glGetColorTableParameterfv\0"
- "glGetColorTableParameteriv\0"
- "glColorSubTable\0"
- "glCopyColorSubTable\0"
- "glConvolutionFilter1D\0"
- "glConvolutionFilter2D\0"
- "glConvolutionParameterf\0"
- "glConvolutionParameterfv\0"
- "glConvolutionParameteri\0"
- "glConvolutionParameteriv\0"
- "glCopyConvolutionFilter1D\0"
- "glCopyConvolutionFilter2D\0"
- "glGetConvolutionFilter\0"
- "glGetConvolutionParameterfv\0"
- "glGetConvolutionParameteriv\0"
- "glGetSeparableFilter\0"
- "glSeparableFilter2D\0"
- "glGetHistogram\0"
- "glGetHistogramParameterfv\0"
- "glGetHistogramParameteriv\0"
- "glGetMinmax\0"
- "glGetMinmaxParameterfv\0"
- "glGetMinmaxParameteriv\0"
- "glHistogram\0"
- "glMinmax\0"
- "glResetHistogram\0"
- "glResetMinmax\0"
- "glTexImage3DOES\0"
- "glTexSubImage3DOES\0"
- "glCopyTexSubImage3DOES\0"
- "glActiveTexture\0"
- "glClientActiveTextureARB\0"
- "glMultiTexCoord1dARB\0"
- "glMultiTexCoord1dvARB\0"
- "glMultiTexCoord1fARB\0"
- "glMultiTexCoord1fvARB\0"
- "glMultiTexCoord1iARB\0"
- "glMultiTexCoord1ivARB\0"
- "glMultiTexCoord1sARB\0"
- "glMultiTexCoord1svARB\0"
- "glMultiTexCoord2dARB\0"
- "glMultiTexCoord2dvARB\0"
- "glMultiTexCoord2fARB\0"
- "glMultiTexCoord2fvARB\0"
- "glMultiTexCoord2iARB\0"
- "glMultiTexCoord2ivARB\0"
- "glMultiTexCoord2sARB\0"
- "glMultiTexCoord2svARB\0"
- "glMultiTexCoord3dARB\0"
- "glMultiTexCoord3dvARB\0"
- "glMultiTexCoord3fARB\0"
- "glMultiTexCoord3fvARB\0"
- "glMultiTexCoord3iARB\0"
- "glMultiTexCoord3ivARB\0"
- "glMultiTexCoord3sARB\0"
- "glMultiTexCoord3svARB\0"
- "glMultiTexCoord4dARB\0"
- "glMultiTexCoord4dvARB\0"
- "glMultiTexCoord4fARB\0"
- "glMultiTexCoord4fvARB\0"
- "glMultiTexCoord4iARB\0"
- "glMultiTexCoord4ivARB\0"
- "glMultiTexCoord4sARB\0"
- "glMultiTexCoord4svARB\0"
- "glGetBufferPointervOES\0"
- "glMapBufferOES\0"
- "glUnmapBufferOES\0"
- "glCompressedTexImage3DOES\0"
- "glCompressedTexSubImage3DOES\0"
- "glFramebufferTexture3DOES\0"
- "glGetProgramBinaryOES\0"
- "glProgramBinaryOES\0"
- "glMultiDrawArraysEXT\0"
- "glMultiDrawElementsEXT\0"
- "glBindVertexArrayAPPLE\0"
- "glDeleteVertexArraysAPPLE\0"
- "glGenVertexArraysAPPLE\0"
- "glIsVertexArrayAPPLE\0"
- "glEGLImageTargetRenderbufferStorageOES\0"
- "glEGLImageTargetTexture2DOES\0"
- "glCompressedTexImage2D\0"
- "glCompressedTexSubImage2D\0"
- "glSampleCoverage\0"
- "glBindBuffer\0"
- "glBufferData\0"
- "glBufferSubData\0"
- "glDeleteBuffers\0"
- "glGenBuffers\0"
- "glGetBufferParameteriv\0"
- "glIsBuffer\0"
- "glAttachShader\0"
- "glBindAttribLocation\0"
- "glBlendEquationSeparate\0"
- "glCompileShader\0"
- "glCreateProgram\0"
- "glCreateShader\0"
- "glDeleteProgram\0"
- "glDeleteShader\0"
- "glDetachShader\0"
- "glDisableVertexAttribArray\0"
- "glEnableVertexAttribArray\0"
- "glGetActiveAttrib\0"
- "glGetActiveUniform\0"
- "glGetAttachedShaders\0"
- "glGetAttribLocation\0"
- "glGetProgramInfoLog\0"
- "glGetProgramiv\0"
- "glGetShaderInfoLog\0"
- "glGetShaderSource\0"
- "glGetShaderiv\0"
- "glGetUniformLocation\0"
- "glGetUniformfv\0"
- "glGetUniformiv\0"
- "glGetVertexAttribPointerv\0"
- "glGetVertexAttribfv\0"
- "glGetVertexAttribiv\0"
- "glIsProgram\0"
- "glIsShader\0"
- "glLinkProgram\0"
- "glShaderSource\0"
- "glStencilFuncSeparate\0"
- "glStencilMaskSeparate\0"
- "glStencilOpSeparate\0"
- "glUniform1f\0"
- "glUniform1fv\0"
- "glUniform1i\0"
- "glUniform1iv\0"
- "glUniform2f\0"
- "glUniform2fv\0"
- "glUniform2i\0"
- "glUniform2iv\0"
- "glUniform3f\0"
- "glUniform3fv\0"
- "glUniform3i\0"
- "glUniform3iv\0"
- "glUniform4f\0"
- "glUniform4fv\0"
- "glUniform4i\0"
- "glUniform4iv\0"
- "glUniformMatrix2fv\0"
- "glUniformMatrix3fv\0"
- "glUniformMatrix4fv\0"
- "glUseProgram\0"
- "glValidateProgram\0"
- "glVertexAttrib1f\0"
- "glVertexAttrib1fv\0"
- "glVertexAttrib2f\0"
- "glVertexAttrib2fv\0"
- "glVertexAttrib3f\0"
- "glVertexAttrib3fv\0"
- "glVertexAttrib4f\0"
- "glVertexAttrib4fv\0"
- "glVertexAttribPointer\0"
- "glBlendFuncSeparate\0"
- "glBindFramebuffer\0"
- "glBindRenderbuffer\0"
- "glCheckFramebufferStatus\0"
- "glClearDepthf\0"
- "glDeleteFramebuffers\0"
- "glDeleteRenderbuffers\0"
- "glDepthRangef\0"
- "glFramebufferRenderbuffer\0"
- "glFramebufferTexture2D\0"
- "glGenFramebuffers\0"
- "glGenRenderbuffers\0"
- "glGenerateMipmap\0"
- "glGetFramebufferAttachmentParameteriv\0"
- "glGetRenderbufferParameteriv\0"
- "glGetShaderPrecisionFormat\0"
- "glIsFramebuffer\0"
- "glIsRenderbuffer\0"
- "glReleaseShaderCompiler\0"
- "glRenderbufferStorage\0"
- "glShaderBinary\0"
- "glTexImage3D\0"
- "glTexSubImage3D\0"
- "glCopyTexSubImage3D\0"
- "glActiveTextureARB\0"
- ;
-
-
-#ifdef USE_MGL_NAMESPACE
-#define gl_dispatch_stub_0 mgl_dispatch_stub_0
-#define gl_dispatch_stub_1 mgl_dispatch_stub_1
-#define gl_dispatch_stub_2 mgl_dispatch_stub_2
-#define gl_dispatch_stub_3 mgl_dispatch_stub_3
-#define gl_dispatch_stub_4 mgl_dispatch_stub_4
-#define gl_dispatch_stub_5 mgl_dispatch_stub_5
-#define gl_dispatch_stub_6 mgl_dispatch_stub_6
-#define gl_dispatch_stub_7 mgl_dispatch_stub_7
-#define gl_dispatch_stub_8 mgl_dispatch_stub_8
-#define gl_dispatch_stub_9 mgl_dispatch_stub_9
-#define gl_dispatch_stub_10 mgl_dispatch_stub_10
-#define gl_dispatch_stub_11 mgl_dispatch_stub_11
-#define gl_dispatch_stub_12 mgl_dispatch_stub_12
-#define gl_dispatch_stub_13 mgl_dispatch_stub_13
-#define gl_dispatch_stub_14 mgl_dispatch_stub_14
-#define gl_dispatch_stub_15 mgl_dispatch_stub_15
-#define gl_dispatch_stub_16 mgl_dispatch_stub_16
-#define gl_dispatch_stub_17 mgl_dispatch_stub_17
-#define gl_dispatch_stub_18 mgl_dispatch_stub_18
-#define gl_dispatch_stub_19 mgl_dispatch_stub_19
-#define gl_dispatch_stub_20 mgl_dispatch_stub_20
-#define gl_dispatch_stub_21 mgl_dispatch_stub_21
-#define gl_dispatch_stub_22 mgl_dispatch_stub_22
-#define gl_dispatch_stub_23 mgl_dispatch_stub_23
-#define gl_dispatch_stub_24 mgl_dispatch_stub_24
-#define gl_dispatch_stub_25 mgl_dispatch_stub_25
-#define gl_dispatch_stub_26 mgl_dispatch_stub_26
-#define gl_dispatch_stub_27 mgl_dispatch_stub_27
-#define gl_dispatch_stub_28 mgl_dispatch_stub_28
-#define gl_dispatch_stub_29 mgl_dispatch_stub_29
-#define gl_dispatch_stub_30 mgl_dispatch_stub_30
-#define gl_dispatch_stub_31 mgl_dispatch_stub_31
-#define gl_dispatch_stub_32 mgl_dispatch_stub_32
-#define gl_dispatch_stub_33 mgl_dispatch_stub_33
-#define gl_dispatch_stub_34 mgl_dispatch_stub_34
-#define gl_dispatch_stub_35 mgl_dispatch_stub_35
-#define gl_dispatch_stub_36 mgl_dispatch_stub_36
-#define gl_dispatch_stub_37 mgl_dispatch_stub_37
-#define gl_dispatch_stub_38 mgl_dispatch_stub_38
-#define gl_dispatch_stub_39 mgl_dispatch_stub_39
-#define gl_dispatch_stub_40 mgl_dispatch_stub_40
-#define gl_dispatch_stub_41 mgl_dispatch_stub_41
-#define gl_dispatch_stub_42 mgl_dispatch_stub_42
-#define gl_dispatch_stub_43 mgl_dispatch_stub_43
-#define gl_dispatch_stub_44 mgl_dispatch_stub_44
-#define gl_dispatch_stub_45 mgl_dispatch_stub_45
-#define gl_dispatch_stub_46 mgl_dispatch_stub_46
-#define gl_dispatch_stub_47 mgl_dispatch_stub_47
-#define gl_dispatch_stub_48 mgl_dispatch_stub_48
-#define gl_dispatch_stub_49 mgl_dispatch_stub_49
-#define gl_dispatch_stub_50 mgl_dispatch_stub_50
-#define gl_dispatch_stub_51 mgl_dispatch_stub_51
-#define gl_dispatch_stub_52 mgl_dispatch_stub_52
-#define gl_dispatch_stub_53 mgl_dispatch_stub_53
-#define gl_dispatch_stub_54 mgl_dispatch_stub_54
-#define gl_dispatch_stub_55 mgl_dispatch_stub_55
-#define gl_dispatch_stub_56 mgl_dispatch_stub_56
-#define gl_dispatch_stub_57 mgl_dispatch_stub_57
-#define gl_dispatch_stub_58 mgl_dispatch_stub_58
-#define gl_dispatch_stub_59 mgl_dispatch_stub_59
-#define gl_dispatch_stub_60 mgl_dispatch_stub_60
-#define gl_dispatch_stub_61 mgl_dispatch_stub_61
-#define gl_dispatch_stub_62 mgl_dispatch_stub_62
-#define gl_dispatch_stub_63 mgl_dispatch_stub_63
-#define gl_dispatch_stub_64 mgl_dispatch_stub_64
-#define gl_dispatch_stub_65 mgl_dispatch_stub_65
-#define gl_dispatch_stub_66 mgl_dispatch_stub_66
-#define gl_dispatch_stub_67 mgl_dispatch_stub_67
-#define gl_dispatch_stub_68 mgl_dispatch_stub_68
-#define gl_dispatch_stub_69 mgl_dispatch_stub_69
-#define gl_dispatch_stub_70 mgl_dispatch_stub_70
-#define gl_dispatch_stub_71 mgl_dispatch_stub_71
-#define gl_dispatch_stub_72 mgl_dispatch_stub_72
-#define gl_dispatch_stub_73 mgl_dispatch_stub_73
-#define gl_dispatch_stub_74 mgl_dispatch_stub_74
-#define gl_dispatch_stub_75 mgl_dispatch_stub_75
-#define gl_dispatch_stub_76 mgl_dispatch_stub_76
-#define gl_dispatch_stub_77 mgl_dispatch_stub_77
-#define gl_dispatch_stub_78 mgl_dispatch_stub_78
-#define gl_dispatch_stub_79 mgl_dispatch_stub_79
-#define gl_dispatch_stub_80 mgl_dispatch_stub_80
-#define gl_dispatch_stub_81 mgl_dispatch_stub_81
-#define gl_dispatch_stub_82 mgl_dispatch_stub_82
-#define gl_dispatch_stub_83 mgl_dispatch_stub_83
-#define gl_dispatch_stub_84 mgl_dispatch_stub_84
-#define gl_dispatch_stub_85 mgl_dispatch_stub_85
-#define gl_dispatch_stub_86 mgl_dispatch_stub_86
-#define gl_dispatch_stub_87 mgl_dispatch_stub_87
-#define gl_dispatch_stub_88 mgl_dispatch_stub_88
-#define gl_dispatch_stub_89 mgl_dispatch_stub_89
-#define gl_dispatch_stub_90 mgl_dispatch_stub_90
-#define gl_dispatch_stub_91 mgl_dispatch_stub_91
-#define gl_dispatch_stub_92 mgl_dispatch_stub_92
-#define gl_dispatch_stub_93 mgl_dispatch_stub_93
-#define gl_dispatch_stub_94 mgl_dispatch_stub_94
-#define gl_dispatch_stub_95 mgl_dispatch_stub_95
-#define gl_dispatch_stub_96 mgl_dispatch_stub_96
-#define gl_dispatch_stub_97 mgl_dispatch_stub_97
-#define gl_dispatch_stub_98 mgl_dispatch_stub_98
-#define gl_dispatch_stub_99 mgl_dispatch_stub_99
-#define gl_dispatch_stub_100 mgl_dispatch_stub_100
-#define gl_dispatch_stub_101 mgl_dispatch_stub_101
-#define gl_dispatch_stub_102 mgl_dispatch_stub_102
-#define gl_dispatch_stub_103 mgl_dispatch_stub_103
-#define gl_dispatch_stub_104 mgl_dispatch_stub_104
-#define gl_dispatch_stub_105 mgl_dispatch_stub_105
-#define gl_dispatch_stub_106 mgl_dispatch_stub_106
-#define gl_dispatch_stub_107 mgl_dispatch_stub_107
-#define gl_dispatch_stub_108 mgl_dispatch_stub_108
-#define gl_dispatch_stub_109 mgl_dispatch_stub_109
-#define gl_dispatch_stub_110 mgl_dispatch_stub_110
-#define gl_dispatch_stub_111 mgl_dispatch_stub_111
-#define gl_dispatch_stub_112 mgl_dispatch_stub_112
-#define gl_dispatch_stub_113 mgl_dispatch_stub_113
-#define gl_dispatch_stub_114 mgl_dispatch_stub_114
-#define gl_dispatch_stub_115 mgl_dispatch_stub_115
-#define gl_dispatch_stub_116 mgl_dispatch_stub_116
-#define gl_dispatch_stub_117 mgl_dispatch_stub_117
-#define gl_dispatch_stub_118 mgl_dispatch_stub_118
-#define gl_dispatch_stub_119 mgl_dispatch_stub_119
-#define gl_dispatch_stub_120 mgl_dispatch_stub_120
-#define gl_dispatch_stub_121 mgl_dispatch_stub_121
-#define gl_dispatch_stub_122 mgl_dispatch_stub_122
-#define gl_dispatch_stub_123 mgl_dispatch_stub_123
-#define gl_dispatch_stub_124 mgl_dispatch_stub_124
-#define gl_dispatch_stub_125 mgl_dispatch_stub_125
-#define gl_dispatch_stub_126 mgl_dispatch_stub_126
-#define gl_dispatch_stub_127 mgl_dispatch_stub_127
-#define gl_dispatch_stub_128 mgl_dispatch_stub_128
-#define gl_dispatch_stub_129 mgl_dispatch_stub_129
-#define gl_dispatch_stub_130 mgl_dispatch_stub_130
-#define gl_dispatch_stub_131 mgl_dispatch_stub_131
-#define gl_dispatch_stub_132 mgl_dispatch_stub_132
-#define gl_dispatch_stub_133 mgl_dispatch_stub_133
-#define gl_dispatch_stub_134 mgl_dispatch_stub_134
-#define gl_dispatch_stub_135 mgl_dispatch_stub_135
-#define gl_dispatch_stub_136 mgl_dispatch_stub_136
-#define gl_dispatch_stub_137 mgl_dispatch_stub_137
-#define gl_dispatch_stub_138 mgl_dispatch_stub_138
-#define gl_dispatch_stub_139 mgl_dispatch_stub_139
-#define gl_dispatch_stub_140 mgl_dispatch_stub_140
-#define gl_dispatch_stub_141 mgl_dispatch_stub_141
-#define gl_dispatch_stub_142 mgl_dispatch_stub_142
-#define gl_dispatch_stub_143 mgl_dispatch_stub_143
-#define gl_dispatch_stub_144 mgl_dispatch_stub_144
-#define gl_dispatch_stub_145 mgl_dispatch_stub_145
-#define gl_dispatch_stub_146 mgl_dispatch_stub_146
-#define gl_dispatch_stub_147 mgl_dispatch_stub_147
-#define gl_dispatch_stub_148 mgl_dispatch_stub_148
-#define gl_dispatch_stub_149 mgl_dispatch_stub_149
-#define gl_dispatch_stub_150 mgl_dispatch_stub_150
-#define gl_dispatch_stub_151 mgl_dispatch_stub_151
-#define gl_dispatch_stub_153 mgl_dispatch_stub_153
-#define gl_dispatch_stub_154 mgl_dispatch_stub_154
-#define gl_dispatch_stub_155 mgl_dispatch_stub_155
-#define gl_dispatch_stub_156 mgl_dispatch_stub_156
-#define gl_dispatch_stub_159 mgl_dispatch_stub_159
-#define gl_dispatch_stub_160 mgl_dispatch_stub_160
-#define gl_dispatch_stub_161 mgl_dispatch_stub_161
-#define gl_dispatch_stub_162 mgl_dispatch_stub_162
-#define gl_dispatch_stub_163 mgl_dispatch_stub_163
-#define gl_dispatch_stub_164 mgl_dispatch_stub_164
-#define gl_dispatch_stub_165 mgl_dispatch_stub_165
-#define gl_dispatch_stub_166 mgl_dispatch_stub_166
-#define gl_dispatch_stub_167 mgl_dispatch_stub_167
-#define gl_dispatch_stub_169 mgl_dispatch_stub_169
-#define gl_dispatch_stub_170 mgl_dispatch_stub_170
-#define gl_dispatch_stub_171 mgl_dispatch_stub_171
-#define gl_dispatch_stub_172 mgl_dispatch_stub_172
-#define gl_dispatch_stub_173 mgl_dispatch_stub_173
-#define gl_dispatch_stub_174 mgl_dispatch_stub_174
-#define gl_dispatch_stub_175 mgl_dispatch_stub_175
-#define gl_dispatch_stub_177 mgl_dispatch_stub_177
-#define gl_dispatch_stub_182 mgl_dispatch_stub_182
-#define gl_dispatch_stub_184 mgl_dispatch_stub_184
-#define gl_dispatch_stub_185 mgl_dispatch_stub_185
-#define gl_dispatch_stub_186 mgl_dispatch_stub_186
-#define gl_dispatch_stub_187 mgl_dispatch_stub_187
-#define gl_dispatch_stub_188 mgl_dispatch_stub_188
-#define gl_dispatch_stub_189 mgl_dispatch_stub_189
-#define gl_dispatch_stub_190 mgl_dispatch_stub_190
-#define gl_dispatch_stub_191 mgl_dispatch_stub_191
-#define gl_dispatch_stub_192 mgl_dispatch_stub_192
-#define gl_dispatch_stub_193 mgl_dispatch_stub_193
-#define gl_dispatch_stub_194 mgl_dispatch_stub_194
-#define gl_dispatch_stub_195 mgl_dispatch_stub_195
-#define gl_dispatch_stub_196 mgl_dispatch_stub_196
-#define gl_dispatch_stub_197 mgl_dispatch_stub_197
-#define gl_dispatch_stub_198 mgl_dispatch_stub_198
-#define gl_dispatch_stub_199 mgl_dispatch_stub_199
-#define gl_dispatch_stub_200 mgl_dispatch_stub_200
-#define gl_dispatch_stub_201 mgl_dispatch_stub_201
-#define gl_dispatch_stub_202 mgl_dispatch_stub_202
-#define gl_dispatch_stub_204 mgl_dispatch_stub_204
-#define gl_dispatch_stub_205 mgl_dispatch_stub_205
-#define gl_dispatch_stub_208 mgl_dispatch_stub_208
-#define gl_dispatch_stub_212 mgl_dispatch_stub_212
-#define gl_dispatch_stub_213 mgl_dispatch_stub_213
-#define gl_dispatch_stub_218 mgl_dispatch_stub_218
-#define gl_dispatch_stub_219 mgl_dispatch_stub_219
-#define gl_dispatch_stub_220 mgl_dispatch_stub_220
-#define gl_dispatch_stub_221 mgl_dispatch_stub_221
-#define gl_dispatch_stub_222 mgl_dispatch_stub_222
-#define gl_dispatch_stub_223 mgl_dispatch_stub_223
-#define gl_dispatch_stub_224 mgl_dispatch_stub_224
-#define gl_dispatch_stub_225 mgl_dispatch_stub_225
-#define gl_dispatch_stub_226 mgl_dispatch_stub_226
-#define gl_dispatch_stub_227 mgl_dispatch_stub_227
-#define gl_dispatch_stub_228 mgl_dispatch_stub_228
-#define gl_dispatch_stub_229 mgl_dispatch_stub_229
-#define gl_dispatch_stub_230 mgl_dispatch_stub_230
-#define gl_dispatch_stub_231 mgl_dispatch_stub_231
-#define gl_dispatch_stub_232 mgl_dispatch_stub_232
-#define gl_dispatch_stub_233 mgl_dispatch_stub_233
-#define gl_dispatch_stub_234 mgl_dispatch_stub_234
-#define gl_dispatch_stub_235 mgl_dispatch_stub_235
-#define gl_dispatch_stub_236 mgl_dispatch_stub_236
-#define gl_dispatch_stub_237 mgl_dispatch_stub_237
-#define gl_dispatch_stub_238 mgl_dispatch_stub_238
-#define gl_dispatch_stub_239 mgl_dispatch_stub_239
-#define gl_dispatch_stub_240 mgl_dispatch_stub_240
-#define gl_dispatch_stub_242 mgl_dispatch_stub_242
-#define gl_dispatch_stub_246 mgl_dispatch_stub_246
-#define gl_dispatch_stub_247 mgl_dispatch_stub_247
-#define gl_dispatch_stub_248 mgl_dispatch_stub_248
-#define gl_dispatch_stub_249 mgl_dispatch_stub_249
-#define gl_dispatch_stub_251 mgl_dispatch_stub_251
-#define gl_dispatch_stub_252 mgl_dispatch_stub_252
-#define gl_dispatch_stub_253 mgl_dispatch_stub_253
-#define gl_dispatch_stub_254 mgl_dispatch_stub_254
-#define gl_dispatch_stub_255 mgl_dispatch_stub_255
-#define gl_dispatch_stub_257 mgl_dispatch_stub_257
-#define gl_dispatch_stub_259 mgl_dispatch_stub_259
-#define gl_dispatch_stub_260 mgl_dispatch_stub_260
-#define gl_dispatch_stub_264 mgl_dispatch_stub_264
-#define gl_dispatch_stub_265 mgl_dispatch_stub_265
-#define gl_dispatch_stub_266 mgl_dispatch_stub_266
-#define gl_dispatch_stub_267 mgl_dispatch_stub_267
-#define gl_dispatch_stub_268 mgl_dispatch_stub_268
-#define gl_dispatch_stub_269 mgl_dispatch_stub_269
-#define gl_dispatch_stub_270 mgl_dispatch_stub_270
-#define gl_dispatch_stub_271 mgl_dispatch_stub_271
-#define gl_dispatch_stub_272 mgl_dispatch_stub_272
-#define gl_dispatch_stub_273 mgl_dispatch_stub_273
-#define gl_dispatch_stub_274 mgl_dispatch_stub_274
-#define gl_dispatch_stub_276 mgl_dispatch_stub_276
-#define gl_dispatch_stub_277 mgl_dispatch_stub_277
-#define gl_dispatch_stub_278 mgl_dispatch_stub_278
-#define gl_dispatch_stub_279 mgl_dispatch_stub_279
-#define gl_dispatch_stub_280 mgl_dispatch_stub_280
-#define gl_dispatch_stub_281 mgl_dispatch_stub_281
-#define gl_dispatch_stub_284 mgl_dispatch_stub_284
-#define gl_dispatch_stub_285 mgl_dispatch_stub_285
-#define gl_dispatch_stub_287 mgl_dispatch_stub_287
-#define gl_dispatch_stub_288 mgl_dispatch_stub_288
-#define gl_dispatch_stub_289 mgl_dispatch_stub_289
-#define gl_dispatch_stub_290 mgl_dispatch_stub_290
-#define gl_dispatch_stub_291 mgl_dispatch_stub_291
-#define gl_dispatch_stub_292 mgl_dispatch_stub_292
-#define gl_dispatch_stub_293 mgl_dispatch_stub_293
-#define gl_dispatch_stub_294 mgl_dispatch_stub_294
-#define gl_dispatch_stub_295 mgl_dispatch_stub_295
-#define gl_dispatch_stub_296 mgl_dispatch_stub_296
-#define gl_dispatch_stub_297 mgl_dispatch_stub_297
-#define gl_dispatch_stub_298 mgl_dispatch_stub_298
-#define gl_dispatch_stub_299 mgl_dispatch_stub_299
-#define gl_dispatch_stub_300 mgl_dispatch_stub_300
-#define gl_dispatch_stub_301 mgl_dispatch_stub_301
-#define gl_dispatch_stub_302 mgl_dispatch_stub_302
-#define gl_dispatch_stub_303 mgl_dispatch_stub_303
-#define gl_dispatch_stub_304 mgl_dispatch_stub_304
-#define gl_dispatch_stub_306 mgl_dispatch_stub_306
-#define gl_dispatch_stub_308 mgl_dispatch_stub_308
-#define gl_dispatch_stub_309 mgl_dispatch_stub_309
-#define gl_dispatch_stub_312 mgl_dispatch_stub_312
-#define gl_dispatch_stub_313 mgl_dispatch_stub_313
-#define gl_dispatch_stub_314 mgl_dispatch_stub_314
-#define gl_dispatch_stub_315 mgl_dispatch_stub_315
-#define gl_dispatch_stub_316 mgl_dispatch_stub_316
-#define gl_dispatch_stub_317 mgl_dispatch_stub_317
-#define gl_dispatch_stub_318 mgl_dispatch_stub_318
-#define gl_dispatch_stub_320 mgl_dispatch_stub_320
-#define gl_dispatch_stub_321 mgl_dispatch_stub_321
-#define gl_dispatch_stub_322 mgl_dispatch_stub_322
-#define gl_dispatch_stub_323 mgl_dispatch_stub_323
-#define gl_dispatch_stub_325 mgl_dispatch_stub_325
-#define gl_dispatch_stub_329 mgl_dispatch_stub_329
-#define gl_dispatch_stub_331 mgl_dispatch_stub_331
-#define gl_dispatch_stub_332 mgl_dispatch_stub_332
-#define gl_dispatch_stub_334 mgl_dispatch_stub_334
-#define gl_dispatch_stub_335 mgl_dispatch_stub_335
-#define gl_dispatch_stub_338 mgl_dispatch_stub_338
-#define gl_dispatch_stub_339 mgl_dispatch_stub_339
-#define gl_dispatch_stub_340 mgl_dispatch_stub_340
-#define gl_dispatch_stub_341 mgl_dispatch_stub_341
-#define gl_dispatch_stub_342 mgl_dispatch_stub_342
-#define gl_dispatch_stub_343 mgl_dispatch_stub_343
-#define gl_dispatch_stub_344 mgl_dispatch_stub_344
-#define gl_dispatch_stub_345 mgl_dispatch_stub_345
-#define gl_dispatch_stub_346 mgl_dispatch_stub_346
-#define gl_dispatch_stub_347 mgl_dispatch_stub_347
-#define gl_dispatch_stub_348 mgl_dispatch_stub_348
-#define gl_dispatch_stub_349 mgl_dispatch_stub_349
-#define gl_dispatch_stub_350 mgl_dispatch_stub_350
-#define gl_dispatch_stub_351 mgl_dispatch_stub_351
-#define gl_dispatch_stub_352 mgl_dispatch_stub_352
-#define gl_dispatch_stub_353 mgl_dispatch_stub_353
-#define gl_dispatch_stub_354 mgl_dispatch_stub_354
-#define gl_dispatch_stub_355 mgl_dispatch_stub_355
-#define gl_dispatch_stub_356 mgl_dispatch_stub_356
-#define gl_dispatch_stub_357 mgl_dispatch_stub_357
-#define gl_dispatch_stub_358 mgl_dispatch_stub_358
-#define gl_dispatch_stub_359 mgl_dispatch_stub_359
-#define gl_dispatch_stub_360 mgl_dispatch_stub_360
-#define gl_dispatch_stub_361 mgl_dispatch_stub_361
-#define gl_dispatch_stub_362 mgl_dispatch_stub_362
-#define gl_dispatch_stub_363 mgl_dispatch_stub_363
-#define gl_dispatch_stub_364 mgl_dispatch_stub_364
-#define gl_dispatch_stub_365 mgl_dispatch_stub_365
-#define gl_dispatch_stub_366 mgl_dispatch_stub_366
-#define gl_dispatch_stub_367 mgl_dispatch_stub_367
-#define gl_dispatch_stub_368 mgl_dispatch_stub_368
-#define gl_dispatch_stub_369 mgl_dispatch_stub_369
-#define gl_dispatch_stub_370 mgl_dispatch_stub_370
-#define gl_dispatch_stub_375 mgl_dispatch_stub_375
-#define gl_dispatch_stub_376 mgl_dispatch_stub_376
-#define gl_dispatch_stub_377 mgl_dispatch_stub_377
-#define gl_dispatch_stub_378 mgl_dispatch_stub_378
-#define gl_dispatch_stub_379 mgl_dispatch_stub_379
-#define gl_dispatch_stub_380 mgl_dispatch_stub_380
-#define gl_dispatch_stub_381 mgl_dispatch_stub_381
-#define gl_dispatch_stub_382 mgl_dispatch_stub_382
-#define gl_dispatch_stub_383 mgl_dispatch_stub_383
-#define gl_dispatch_stub_384 mgl_dispatch_stub_384
-#define gl_dispatch_stub_385 mgl_dispatch_stub_385
-#define gl_dispatch_stub_386 mgl_dispatch_stub_386
-#define gl_dispatch_stub_387 mgl_dispatch_stub_387
-#define gl_dispatch_stub_388 mgl_dispatch_stub_388
-#define gl_dispatch_stub_389 mgl_dispatch_stub_389
-#define gl_dispatch_stub_390 mgl_dispatch_stub_390
-#define gl_dispatch_stub_391 mgl_dispatch_stub_391
-#define gl_dispatch_stub_392 mgl_dispatch_stub_392
-#define gl_dispatch_stub_393 mgl_dispatch_stub_393
-#define gl_dispatch_stub_394 mgl_dispatch_stub_394
-#define gl_dispatch_stub_395 mgl_dispatch_stub_395
-#define gl_dispatch_stub_396 mgl_dispatch_stub_396
-#define gl_dispatch_stub_397 mgl_dispatch_stub_397
-#define gl_dispatch_stub_398 mgl_dispatch_stub_398
-#define gl_dispatch_stub_399 mgl_dispatch_stub_399
-#define gl_dispatch_stub_400 mgl_dispatch_stub_400
-#define gl_dispatch_stub_401 mgl_dispatch_stub_401
-#define gl_dispatch_stub_402 mgl_dispatch_stub_402
-#define gl_dispatch_stub_403 mgl_dispatch_stub_403
-#define gl_dispatch_stub_404 mgl_dispatch_stub_404
-#define gl_dispatch_stub_405 mgl_dispatch_stub_405
-#define gl_dispatch_stub_406 mgl_dispatch_stub_406
-#define gl_dispatch_stub_407 mgl_dispatch_stub_407
-#define gl_dispatch_stub_418 mgl_dispatch_stub_418
-#define gl_dispatch_stub_419 mgl_dispatch_stub_419
-#define gl_dispatch_stub_420 mgl_dispatch_stub_420
-#define gl_dispatch_stub_421 mgl_dispatch_stub_421
-#endif /* USE_MGL_NAMESPACE */
-
-
-#if defined(NEED_FUNCTION_POINTER) || defined(GLX_INDIRECT_RENDERING)
-void GLAPIENTRY gl_dispatch_stub_0(GLuint list, GLenum mode);
-void GLAPIENTRY gl_dispatch_stub_1(void);
-void GLAPIENTRY gl_dispatch_stub_2(GLuint list);
-void GLAPIENTRY gl_dispatch_stub_3(GLsizei n, GLenum type, const GLvoid * lists);
-void GLAPIENTRY gl_dispatch_stub_4(GLuint list, GLsizei range);
-GLuint GLAPIENTRY gl_dispatch_stub_5(GLsizei range);
-void GLAPIENTRY gl_dispatch_stub_6(GLuint base);
-void GLAPIENTRY gl_dispatch_stub_7(GLenum mode);
-void GLAPIENTRY gl_dispatch_stub_8(GLsizei width, GLsizei height, GLfloat xorig, GLfloat yorig, GLfloat xmove, GLfloat ymove, const GLubyte * bitmap);
-void GLAPIENTRY gl_dispatch_stub_9(GLbyte red, GLbyte green, GLbyte blue);
-void GLAPIENTRY gl_dispatch_stub_10(const GLbyte * v);
-void GLAPIENTRY gl_dispatch_stub_11(GLdouble red, GLdouble green, GLdouble blue);
-void GLAPIENTRY gl_dispatch_stub_12(const GLdouble * v);
-void GLAPIENTRY gl_dispatch_stub_13(GLfloat red, GLfloat green, GLfloat blue);
-void GLAPIENTRY gl_dispatch_stub_14(const GLfloat * v);
-void GLAPIENTRY gl_dispatch_stub_15(GLint red, GLint green, GLint blue);
-void GLAPIENTRY gl_dispatch_stub_16(const GLint * v);
-void GLAPIENTRY gl_dispatch_stub_17(GLshort red, GLshort green, GLshort blue);
-void GLAPIENTRY gl_dispatch_stub_18(const GLshort * v);
-void GLAPIENTRY gl_dispatch_stub_19(GLubyte red, GLubyte green, GLubyte blue);
-void GLAPIENTRY gl_dispatch_stub_20(const GLubyte * v);
-void GLAPIENTRY gl_dispatch_stub_21(GLuint red, GLuint green, GLuint blue);
-void GLAPIENTRY gl_dispatch_stub_22(const GLuint * v);
-void GLAPIENTRY gl_dispatch_stub_23(GLushort red, GLushort green, GLushort blue);
-void GLAPIENTRY gl_dispatch_stub_24(const GLushort * v);
-void GLAPIENTRY gl_dispatch_stub_25(GLbyte red, GLbyte green, GLbyte blue, GLbyte alpha);
-void GLAPIENTRY gl_dispatch_stub_26(const GLbyte * v);
-void GLAPIENTRY gl_dispatch_stub_27(GLdouble red, GLdouble green, GLdouble blue, GLdouble alpha);
-void GLAPIENTRY gl_dispatch_stub_28(const GLdouble * v);
-void GLAPIENTRY gl_dispatch_stub_29(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
-void GLAPIENTRY gl_dispatch_stub_30(const GLfloat * v);
-void GLAPIENTRY gl_dispatch_stub_31(GLint red, GLint green, GLint blue, GLint alpha);
-void GLAPIENTRY gl_dispatch_stub_32(const GLint * v);
-void GLAPIENTRY gl_dispatch_stub_33(GLshort red, GLshort green, GLshort blue, GLshort alpha);
-void GLAPIENTRY gl_dispatch_stub_34(const GLshort * v);
-void GLAPIENTRY gl_dispatch_stub_35(GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha);
-void GLAPIENTRY gl_dispatch_stub_36(const GLubyte * v);
-void GLAPIENTRY gl_dispatch_stub_37(GLuint red, GLuint green, GLuint blue, GLuint alpha);
-void GLAPIENTRY gl_dispatch_stub_38(const GLuint * v);
-void GLAPIENTRY gl_dispatch_stub_39(GLushort red, GLushort green, GLushort blue, GLushort alpha);
-void GLAPIENTRY gl_dispatch_stub_40(const GLushort * v);
-void GLAPIENTRY gl_dispatch_stub_41(GLboolean flag);
-void GLAPIENTRY gl_dispatch_stub_42(const GLboolean * flag);
-void GLAPIENTRY gl_dispatch_stub_43(void);
-void GLAPIENTRY gl_dispatch_stub_44(GLdouble c);
-void GLAPIENTRY gl_dispatch_stub_45(const GLdouble * c);
-void GLAPIENTRY gl_dispatch_stub_46(GLfloat c);
-void GLAPIENTRY gl_dispatch_stub_47(const GLfloat * c);
-void GLAPIENTRY gl_dispatch_stub_48(GLint c);
-void GLAPIENTRY gl_dispatch_stub_49(const GLint * c);
-void GLAPIENTRY gl_dispatch_stub_50(GLshort c);
-void GLAPIENTRY gl_dispatch_stub_51(const GLshort * c);
-void GLAPIENTRY gl_dispatch_stub_52(GLbyte nx, GLbyte ny, GLbyte nz);
-void GLAPIENTRY gl_dispatch_stub_53(const GLbyte * v);
-void GLAPIENTRY gl_dispatch_stub_54(GLdouble nx, GLdouble ny, GLdouble nz);
-void GLAPIENTRY gl_dispatch_stub_55(const GLdouble * v);
-void GLAPIENTRY gl_dispatch_stub_56(GLfloat nx, GLfloat ny, GLfloat nz);
-void GLAPIENTRY gl_dispatch_stub_57(const GLfloat * v);
-void GLAPIENTRY gl_dispatch_stub_58(GLint nx, GLint ny, GLint nz);
-void GLAPIENTRY gl_dispatch_stub_59(const GLint * v);
-void GLAPIENTRY gl_dispatch_stub_60(GLshort nx, GLshort ny, GLshort nz);
-void GLAPIENTRY gl_dispatch_stub_61(const GLshort * v);
-void GLAPIENTRY gl_dispatch_stub_62(GLdouble x, GLdouble y);
-void GLAPIENTRY gl_dispatch_stub_63(const GLdouble * v);
-void GLAPIENTRY gl_dispatch_stub_64(GLfloat x, GLfloat y);
-void GLAPIENTRY gl_dispatch_stub_65(const GLfloat * v);
-void GLAPIENTRY gl_dispatch_stub_66(GLint x, GLint y);
-void GLAPIENTRY gl_dispatch_stub_67(const GLint * v);
-void GLAPIENTRY gl_dispatch_stub_68(GLshort x, GLshort y);
-void GLAPIENTRY gl_dispatch_stub_69(const GLshort * v);
-void GLAPIENTRY gl_dispatch_stub_70(GLdouble x, GLdouble y, GLdouble z);
-void GLAPIENTRY gl_dispatch_stub_71(const GLdouble * v);
-void GLAPIENTRY gl_dispatch_stub_72(GLfloat x, GLfloat y, GLfloat z);
-void GLAPIENTRY gl_dispatch_stub_73(const GLfloat * v);
-void GLAPIENTRY gl_dispatch_stub_74(GLint x, GLint y, GLint z);
-void GLAPIENTRY gl_dispatch_stub_75(const GLint * v);
-void GLAPIENTRY gl_dispatch_stub_76(GLshort x, GLshort y, GLshort z);
-void GLAPIENTRY gl_dispatch_stub_77(const GLshort * v);
-void GLAPIENTRY gl_dispatch_stub_78(GLdouble x, GLdouble y, GLdouble z, GLdouble w);
-void GLAPIENTRY gl_dispatch_stub_79(const GLdouble * v);
-void GLAPIENTRY gl_dispatch_stub_80(GLfloat x, GLfloat y, GLfloat z, GLfloat w);
-void GLAPIENTRY gl_dispatch_stub_81(const GLfloat * v);
-void GLAPIENTRY gl_dispatch_stub_82(GLint x, GLint y, GLint z, GLint w);
-void GLAPIENTRY gl_dispatch_stub_83(const GLint * v);
-void GLAPIENTRY gl_dispatch_stub_84(GLshort x, GLshort y, GLshort z, GLshort w);
-void GLAPIENTRY gl_dispatch_stub_85(const GLshort * v);
-void GLAPIENTRY gl_dispatch_stub_86(GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2);
-void GLAPIENTRY gl_dispatch_stub_87(const GLdouble * v1, const GLdouble * v2);
-void GLAPIENTRY gl_dispatch_stub_88(GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2);
-void GLAPIENTRY gl_dispatch_stub_89(const GLfloat * v1, const GLfloat * v2);
-void GLAPIENTRY gl_dispatch_stub_90(GLint x1, GLint y1, GLint x2, GLint y2);
-void GLAPIENTRY gl_dispatch_stub_91(const GLint * v1, const GLint * v2);
-void GLAPIENTRY gl_dispatch_stub_92(GLshort x1, GLshort y1, GLshort x2, GLshort y2);
-void GLAPIENTRY gl_dispatch_stub_93(const GLshort * v1, const GLshort * v2);
-void GLAPIENTRY gl_dispatch_stub_94(GLdouble s);
-void GLAPIENTRY gl_dispatch_stub_95(const GLdouble * v);
-void GLAPIENTRY gl_dispatch_stub_96(GLfloat s);
-void GLAPIENTRY gl_dispatch_stub_97(const GLfloat * v);
-void GLAPIENTRY gl_dispatch_stub_98(GLint s);
-void GLAPIENTRY gl_dispatch_stub_99(const GLint * v);
-void GLAPIENTRY gl_dispatch_stub_100(GLshort s);
-void GLAPIENTRY gl_dispatch_stub_101(const GLshort * v);
-void GLAPIENTRY gl_dispatch_stub_102(GLdouble s, GLdouble t);
-void GLAPIENTRY gl_dispatch_stub_103(const GLdouble * v);
-void GLAPIENTRY gl_dispatch_stub_104(GLfloat s, GLfloat t);
-void GLAPIENTRY gl_dispatch_stub_105(const GLfloat * v);
-void GLAPIENTRY gl_dispatch_stub_106(GLint s, GLint t);
-void GLAPIENTRY gl_dispatch_stub_107(const GLint * v);
-void GLAPIENTRY gl_dispatch_stub_108(GLshort s, GLshort t);
-void GLAPIENTRY gl_dispatch_stub_109(const GLshort * v);
-void GLAPIENTRY gl_dispatch_stub_110(GLdouble s, GLdouble t, GLdouble r);
-void GLAPIENTRY gl_dispatch_stub_111(const GLdouble * v);
-void GLAPIENTRY gl_dispatch_stub_112(GLfloat s, GLfloat t, GLfloat r);
-void GLAPIENTRY gl_dispatch_stub_113(const GLfloat * v);
-void GLAPIENTRY gl_dispatch_stub_114(GLint s, GLint t, GLint r);
-void GLAPIENTRY gl_dispatch_stub_115(const GLint * v);
-void GLAPIENTRY gl_dispatch_stub_116(GLshort s, GLshort t, GLshort r);
-void GLAPIENTRY gl_dispatch_stub_117(const GLshort * v);
-void GLAPIENTRY gl_dispatch_stub_118(GLdouble s, GLdouble t, GLdouble r, GLdouble q);
-void GLAPIENTRY gl_dispatch_stub_119(const GLdouble * v);
-void GLAPIENTRY gl_dispatch_stub_120(GLfloat s, GLfloat t, GLfloat r, GLfloat q);
-void GLAPIENTRY gl_dispatch_stub_121(const GLfloat * v);
-void GLAPIENTRY gl_dispatch_stub_122(GLint s, GLint t, GLint r, GLint q);
-void GLAPIENTRY gl_dispatch_stub_123(const GLint * v);
-void GLAPIENTRY gl_dispatch_stub_124(GLshort s, GLshort t, GLshort r, GLshort q);
-void GLAPIENTRY gl_dispatch_stub_125(const GLshort * v);
-void GLAPIENTRY gl_dispatch_stub_126(GLdouble x, GLdouble y);
-void GLAPIENTRY gl_dispatch_stub_127(const GLdouble * v);
-void GLAPIENTRY gl_dispatch_stub_128(GLfloat x, GLfloat y);
-void GLAPIENTRY gl_dispatch_stub_129(const GLfloat * v);
-void GLAPIENTRY gl_dispatch_stub_130(GLint x, GLint y);
-void GLAPIENTRY gl_dispatch_stub_131(const GLint * v);
-void GLAPIENTRY gl_dispatch_stub_132(GLshort x, GLshort y);
-void GLAPIENTRY gl_dispatch_stub_133(const GLshort * v);
-void GLAPIENTRY gl_dispatch_stub_134(GLdouble x, GLdouble y, GLdouble z);
-void GLAPIENTRY gl_dispatch_stub_135(const GLdouble * v);
-void GLAPIENTRY gl_dispatch_stub_136(GLfloat x, GLfloat y, GLfloat z);
-void GLAPIENTRY gl_dispatch_stub_137(const GLfloat * v);
-void GLAPIENTRY gl_dispatch_stub_138(GLint x, GLint y, GLint z);
-void GLAPIENTRY gl_dispatch_stub_139(const GLint * v);
-void GLAPIENTRY gl_dispatch_stub_140(GLshort x, GLshort y, GLshort z);
-void GLAPIENTRY gl_dispatch_stub_141(const GLshort * v);
-void GLAPIENTRY gl_dispatch_stub_142(GLdouble x, GLdouble y, GLdouble z, GLdouble w);
-void GLAPIENTRY gl_dispatch_stub_143(const GLdouble * v);
-void GLAPIENTRY gl_dispatch_stub_144(GLfloat x, GLfloat y, GLfloat z, GLfloat w);
-void GLAPIENTRY gl_dispatch_stub_145(const GLfloat * v);
-void GLAPIENTRY gl_dispatch_stub_146(GLint x, GLint y, GLint z, GLint w);
-void GLAPIENTRY gl_dispatch_stub_147(const GLint * v);
-void GLAPIENTRY gl_dispatch_stub_148(GLshort x, GLshort y, GLshort z, GLshort w);
-void GLAPIENTRY gl_dispatch_stub_149(const GLshort * v);
-void GLAPIENTRY gl_dispatch_stub_150(GLenum plane, const GLdouble * equation);
-void GLAPIENTRY gl_dispatch_stub_151(GLenum face, GLenum mode);
-void GLAPIENTRY gl_dispatch_stub_153(GLenum pname, GLfloat param);
-void GLAPIENTRY gl_dispatch_stub_154(GLenum pname, const GLfloat * params);
-void GLAPIENTRY gl_dispatch_stub_155(GLenum pname, GLint param);
-void GLAPIENTRY gl_dispatch_stub_156(GLenum pname, const GLint * params);
-void GLAPIENTRY gl_dispatch_stub_159(GLenum light, GLenum pname, GLfloat param);
-void GLAPIENTRY gl_dispatch_stub_160(GLenum light, GLenum pname, const GLfloat * params);
-void GLAPIENTRY gl_dispatch_stub_161(GLenum light, GLenum pname, GLint param);
-void GLAPIENTRY gl_dispatch_stub_162(GLenum light, GLenum pname, const GLint * params);
-void GLAPIENTRY gl_dispatch_stub_163(GLenum pname, GLfloat param);
-void GLAPIENTRY gl_dispatch_stub_164(GLenum pname, const GLfloat * params);
-void GLAPIENTRY gl_dispatch_stub_165(GLenum pname, GLint param);
-void GLAPIENTRY gl_dispatch_stub_166(GLenum pname, const GLint * params);
-void GLAPIENTRY gl_dispatch_stub_167(GLint factor, GLushort pattern);
-void GLAPIENTRY gl_dispatch_stub_169(GLenum face, GLenum pname, GLfloat param);
-void GLAPIENTRY gl_dispatch_stub_170(GLenum face, GLenum pname, const GLfloat * params);
-void GLAPIENTRY gl_dispatch_stub_171(GLenum face, GLenum pname, GLint param);
-void GLAPIENTRY gl_dispatch_stub_172(GLenum face, GLenum pname, const GLint * params);
-void GLAPIENTRY gl_dispatch_stub_173(GLfloat size);
-void GLAPIENTRY gl_dispatch_stub_174(GLenum face, GLenum mode);
-void GLAPIENTRY gl_dispatch_stub_175(const GLubyte * mask);
-void GLAPIENTRY gl_dispatch_stub_177(GLenum mode);
-void GLAPIENTRY gl_dispatch_stub_182(GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid * pixels);
-void GLAPIENTRY gl_dispatch_stub_184(GLenum target, GLenum pname, GLfloat param);
-void GLAPIENTRY gl_dispatch_stub_185(GLenum target, GLenum pname, const GLfloat * params);
-void GLAPIENTRY gl_dispatch_stub_186(GLenum target, GLenum pname, GLint param);
-void GLAPIENTRY gl_dispatch_stub_187(GLenum target, GLenum pname, const GLint * params);
-void GLAPIENTRY gl_dispatch_stub_188(GLenum coord, GLenum pname, GLdouble param);
-void GLAPIENTRY gl_dispatch_stub_189(GLenum coord, GLenum pname, const GLdouble * params);
-void GLAPIENTRY gl_dispatch_stub_190(GLenum coord, GLenum pname, GLfloat param);
-void GLAPIENTRY gl_dispatch_stub_191(GLenum coord, GLenum pname, const GLfloat * params);
-void GLAPIENTRY gl_dispatch_stub_192(GLenum coord, GLenum pname, GLint param);
-void GLAPIENTRY gl_dispatch_stub_193(GLenum coord, GLenum pname, const GLint * params);
-void GLAPIENTRY gl_dispatch_stub_194(GLsizei size, GLenum type, GLfloat * buffer);
-void GLAPIENTRY gl_dispatch_stub_195(GLsizei size, GLuint * buffer);
-GLint GLAPIENTRY gl_dispatch_stub_196(GLenum mode);
-void GLAPIENTRY gl_dispatch_stub_197(void);
-void GLAPIENTRY gl_dispatch_stub_198(GLuint name);
-void GLAPIENTRY gl_dispatch_stub_199(GLfloat token);
-void GLAPIENTRY gl_dispatch_stub_200(void);
-void GLAPIENTRY gl_dispatch_stub_201(GLuint name);
-void GLAPIENTRY gl_dispatch_stub_202(GLenum mode);
-void GLAPIENTRY gl_dispatch_stub_204(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
-void GLAPIENTRY gl_dispatch_stub_205(GLfloat c);
-void GLAPIENTRY gl_dispatch_stub_208(GLclampd depth);
-void GLAPIENTRY gl_dispatch_stub_212(GLuint mask);
-void GLAPIENTRY gl_dispatch_stub_213(GLenum op, GLfloat value);
-void GLAPIENTRY gl_dispatch_stub_218(void);
-void GLAPIENTRY gl_dispatch_stub_219(GLbitfield mask);
-void GLAPIENTRY gl_dispatch_stub_220(GLenum target, GLdouble u1, GLdouble u2, GLint stride, GLint order, const GLdouble * points);
-void GLAPIENTRY gl_dispatch_stub_221(GLenum target, GLfloat u1, GLfloat u2, GLint stride, GLint order, const GLfloat * points);
-void GLAPIENTRY gl_dispatch_stub_222(GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, const GLdouble * points);
-void GLAPIENTRY gl_dispatch_stub_223(GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, const GLfloat * points);
-void GLAPIENTRY gl_dispatch_stub_224(GLint un, GLdouble u1, GLdouble u2);
-void GLAPIENTRY gl_dispatch_stub_225(GLint un, GLfloat u1, GLfloat u2);
-void GLAPIENTRY gl_dispatch_stub_226(GLint un, GLdouble u1, GLdouble u2, GLint vn, GLdouble v1, GLdouble v2);
-void GLAPIENTRY gl_dispatch_stub_227(GLint un, GLfloat u1, GLfloat u2, GLint vn, GLfloat v1, GLfloat v2);
-void GLAPIENTRY gl_dispatch_stub_228(GLdouble u);
-void GLAPIENTRY gl_dispatch_stub_229(const GLdouble * u);
-void GLAPIENTRY gl_dispatch_stub_230(GLfloat u);
-void GLAPIENTRY gl_dispatch_stub_231(const GLfloat * u);
-void GLAPIENTRY gl_dispatch_stub_232(GLdouble u, GLdouble v);
-void GLAPIENTRY gl_dispatch_stub_233(const GLdouble * u);
-void GLAPIENTRY gl_dispatch_stub_234(GLfloat u, GLfloat v);
-void GLAPIENTRY gl_dispatch_stub_235(const GLfloat * u);
-void GLAPIENTRY gl_dispatch_stub_236(GLenum mode, GLint i1, GLint i2);
-void GLAPIENTRY gl_dispatch_stub_237(GLint i);
-void GLAPIENTRY gl_dispatch_stub_238(GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2);
-void GLAPIENTRY gl_dispatch_stub_239(GLint i, GLint j);
-void GLAPIENTRY gl_dispatch_stub_240(GLenum func, GLclampf ref);
-void GLAPIENTRY gl_dispatch_stub_242(GLenum opcode);
-void GLAPIENTRY gl_dispatch_stub_246(GLfloat xfactor, GLfloat yfactor);
-void GLAPIENTRY gl_dispatch_stub_247(GLenum pname, GLfloat param);
-void GLAPIENTRY gl_dispatch_stub_248(GLenum pname, GLint param);
-void GLAPIENTRY gl_dispatch_stub_249(GLenum pname, GLfloat param);
-void GLAPIENTRY gl_dispatch_stub_251(GLenum map, GLsizei mapsize, const GLfloat * values);
-void GLAPIENTRY gl_dispatch_stub_252(GLenum map, GLsizei mapsize, const GLuint * values);
-void GLAPIENTRY gl_dispatch_stub_253(GLenum map, GLsizei mapsize, const GLushort * values);
-void GLAPIENTRY gl_dispatch_stub_254(GLenum mode);
-void GLAPIENTRY gl_dispatch_stub_255(GLint x, GLint y, GLsizei width, GLsizei height, GLenum type);
-void GLAPIENTRY gl_dispatch_stub_257(GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid * pixels);
-void GLAPIENTRY gl_dispatch_stub_259(GLenum plane, GLdouble * equation);
-void GLAPIENTRY gl_dispatch_stub_260(GLenum pname, GLdouble * params);
-void GLAPIENTRY gl_dispatch_stub_264(GLenum light, GLenum pname, GLfloat * params);
-void GLAPIENTRY gl_dispatch_stub_265(GLenum light, GLenum pname, GLint * params);
-void GLAPIENTRY gl_dispatch_stub_266(GLenum target, GLenum query, GLdouble * v);
-void GLAPIENTRY gl_dispatch_stub_267(GLenum target, GLenum query, GLfloat * v);
-void GLAPIENTRY gl_dispatch_stub_268(GLenum target, GLenum query, GLint * v);
-void GLAPIENTRY gl_dispatch_stub_269(GLenum face, GLenum pname, GLfloat * params);
-void GLAPIENTRY gl_dispatch_stub_270(GLenum face, GLenum pname, GLint * params);
-void GLAPIENTRY gl_dispatch_stub_271(GLenum map, GLfloat * values);
-void GLAPIENTRY gl_dispatch_stub_272(GLenum map, GLuint * values);
-void GLAPIENTRY gl_dispatch_stub_273(GLenum map, GLushort * values);
-void GLAPIENTRY gl_dispatch_stub_274(GLubyte * mask);
-void GLAPIENTRY gl_dispatch_stub_276(GLenum target, GLenum pname, GLfloat * params);
-void GLAPIENTRY gl_dispatch_stub_277(GLenum target, GLenum pname, GLint * params);
-void GLAPIENTRY gl_dispatch_stub_278(GLenum coord, GLenum pname, GLdouble * params);
-void GLAPIENTRY gl_dispatch_stub_279(GLenum coord, GLenum pname, GLfloat * params);
-void GLAPIENTRY gl_dispatch_stub_280(GLenum coord, GLenum pname, GLint * params);
-void GLAPIENTRY gl_dispatch_stub_281(GLenum target, GLint level, GLenum format, GLenum type, GLvoid * pixels);
-void GLAPIENTRY gl_dispatch_stub_284(GLenum target, GLint level, GLenum pname, GLfloat * params);
-void GLAPIENTRY gl_dispatch_stub_285(GLenum target, GLint level, GLenum pname, GLint * params);
-GLboolean GLAPIENTRY gl_dispatch_stub_287(GLuint list);
-void GLAPIENTRY gl_dispatch_stub_288(GLclampd zNear, GLclampd zFar);
-void GLAPIENTRY gl_dispatch_stub_289(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar);
-void GLAPIENTRY gl_dispatch_stub_290(void);
-void GLAPIENTRY gl_dispatch_stub_291(const GLfloat * m);
-void GLAPIENTRY gl_dispatch_stub_292(const GLdouble * m);
-void GLAPIENTRY gl_dispatch_stub_293(GLenum mode);
-void GLAPIENTRY gl_dispatch_stub_294(const GLfloat * m);
-void GLAPIENTRY gl_dispatch_stub_295(const GLdouble * m);
-void GLAPIENTRY gl_dispatch_stub_296(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar);
-void GLAPIENTRY gl_dispatch_stub_297(void);
-void GLAPIENTRY gl_dispatch_stub_298(void);
-void GLAPIENTRY gl_dispatch_stub_299(GLdouble angle, GLdouble x, GLdouble y, GLdouble z);
-void GLAPIENTRY gl_dispatch_stub_300(GLfloat angle, GLfloat x, GLfloat y, GLfloat z);
-void GLAPIENTRY gl_dispatch_stub_301(GLdouble x, GLdouble y, GLdouble z);
-void GLAPIENTRY gl_dispatch_stub_302(GLfloat x, GLfloat y, GLfloat z);
-void GLAPIENTRY gl_dispatch_stub_303(GLdouble x, GLdouble y, GLdouble z);
-void GLAPIENTRY gl_dispatch_stub_304(GLfloat x, GLfloat y, GLfloat z);
-void GLAPIENTRY gl_dispatch_stub_306(GLint i);
-void GLAPIENTRY gl_dispatch_stub_308(GLint size, GLenum type, GLsizei stride, const GLvoid * pointer);
-void GLAPIENTRY gl_dispatch_stub_309(GLenum array);
-void GLAPIENTRY gl_dispatch_stub_312(GLsizei stride, const GLvoid * pointer);
-void GLAPIENTRY gl_dispatch_stub_313(GLenum array);
-void GLAPIENTRY gl_dispatch_stub_314(GLenum type, GLsizei stride, const GLvoid * pointer);
-void GLAPIENTRY gl_dispatch_stub_315(GLubyte c);
-void GLAPIENTRY gl_dispatch_stub_316(const GLubyte * c);
-void GLAPIENTRY gl_dispatch_stub_317(GLenum format, GLsizei stride, const GLvoid * pointer);
-void GLAPIENTRY gl_dispatch_stub_318(GLenum type, GLsizei stride, const GLvoid * pointer);
-void GLAPIENTRY gl_dispatch_stub_320(GLint size, GLenum type, GLsizei stride, const GLvoid * pointer);
-void GLAPIENTRY gl_dispatch_stub_321(GLint size, GLenum type, GLsizei stride, const GLvoid * pointer);
-GLboolean GLAPIENTRY gl_dispatch_stub_322(GLsizei n, const GLuint * textures, GLboolean * residences);
-void GLAPIENTRY gl_dispatch_stub_323(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border);
-void GLAPIENTRY gl_dispatch_stub_325(GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width);
-void GLAPIENTRY gl_dispatch_stub_329(GLenum pname, GLvoid ** params);
-void GLAPIENTRY gl_dispatch_stub_331(GLsizei n, const GLuint * textures, const GLclampf * priorities);
-void GLAPIENTRY gl_dispatch_stub_332(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid * pixels);
-void GLAPIENTRY gl_dispatch_stub_334(void);
-void GLAPIENTRY gl_dispatch_stub_335(GLbitfield mask);
-void GLAPIENTRY gl_dispatch_stub_338(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid * indices);
-void GLAPIENTRY gl_dispatch_stub_339(GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid * table);
-void GLAPIENTRY gl_dispatch_stub_340(GLenum target, GLenum pname, const GLfloat * params);
-void GLAPIENTRY gl_dispatch_stub_341(GLenum target, GLenum pname, const GLint * params);
-void GLAPIENTRY gl_dispatch_stub_342(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
-void GLAPIENTRY gl_dispatch_stub_343(GLenum target, GLenum format, GLenum type, GLvoid * table);
-void GLAPIENTRY gl_dispatch_stub_344(GLenum target, GLenum pname, GLfloat * params);
-void GLAPIENTRY gl_dispatch_stub_345(GLenum target, GLenum pname, GLint * params);
-void GLAPIENTRY gl_dispatch_stub_346(GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid * data);
-void GLAPIENTRY gl_dispatch_stub_347(GLenum target, GLsizei start, GLint x, GLint y, GLsizei width);
-void GLAPIENTRY gl_dispatch_stub_348(GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid * image);
-void GLAPIENTRY gl_dispatch_stub_349(GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid * image);
-void GLAPIENTRY gl_dispatch_stub_350(GLenum target, GLenum pname, GLfloat params);
-void GLAPIENTRY gl_dispatch_stub_351(GLenum target, GLenum pname, const GLfloat * params);
-void GLAPIENTRY gl_dispatch_stub_352(GLenum target, GLenum pname, GLint params);
-void GLAPIENTRY gl_dispatch_stub_353(GLenum target, GLenum pname, const GLint * params);
-void GLAPIENTRY gl_dispatch_stub_354(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
-void GLAPIENTRY gl_dispatch_stub_355(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height);
-void GLAPIENTRY gl_dispatch_stub_356(GLenum target, GLenum format, GLenum type, GLvoid * image);
-void GLAPIENTRY gl_dispatch_stub_357(GLenum target, GLenum pname, GLfloat * params);
-void GLAPIENTRY gl_dispatch_stub_358(GLenum target, GLenum pname, GLint * params);
-void GLAPIENTRY gl_dispatch_stub_359(GLenum target, GLenum format, GLenum type, GLvoid * row, GLvoid * column, GLvoid * span);
-void GLAPIENTRY gl_dispatch_stub_360(GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid * row, const GLvoid * column);
-void GLAPIENTRY gl_dispatch_stub_361(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid * values);
-void GLAPIENTRY gl_dispatch_stub_362(GLenum target, GLenum pname, GLfloat * params);
-void GLAPIENTRY gl_dispatch_stub_363(GLenum target, GLenum pname, GLint * params);
-void GLAPIENTRY gl_dispatch_stub_364(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid * values);
-void GLAPIENTRY gl_dispatch_stub_365(GLenum target, GLenum pname, GLfloat * params);
-void GLAPIENTRY gl_dispatch_stub_366(GLenum target, GLenum pname, GLint * params);
-void GLAPIENTRY gl_dispatch_stub_367(GLenum target, GLsizei width, GLenum internalformat, GLboolean sink);
-void GLAPIENTRY gl_dispatch_stub_368(GLenum target, GLenum internalformat, GLboolean sink);
-void GLAPIENTRY gl_dispatch_stub_369(GLenum target);
-void GLAPIENTRY gl_dispatch_stub_370(GLenum target);
-void GLAPIENTRY gl_dispatch_stub_375(GLenum texture);
-void GLAPIENTRY gl_dispatch_stub_376(GLenum target, GLdouble s);
-void GLAPIENTRY gl_dispatch_stub_377(GLenum target, const GLdouble * v);
-void GLAPIENTRY gl_dispatch_stub_378(GLenum target, GLfloat s);
-void GLAPIENTRY gl_dispatch_stub_379(GLenum target, const GLfloat * v);
-void GLAPIENTRY gl_dispatch_stub_380(GLenum target, GLint s);
-void GLAPIENTRY gl_dispatch_stub_381(GLenum target, const GLint * v);
-void GLAPIENTRY gl_dispatch_stub_382(GLenum target, GLshort s);
-void GLAPIENTRY gl_dispatch_stub_383(GLenum target, const GLshort * v);
-void GLAPIENTRY gl_dispatch_stub_384(GLenum target, GLdouble s, GLdouble t);
-void GLAPIENTRY gl_dispatch_stub_385(GLenum target, const GLdouble * v);
-void GLAPIENTRY gl_dispatch_stub_386(GLenum target, GLfloat s, GLfloat t);
-void GLAPIENTRY gl_dispatch_stub_387(GLenum target, const GLfloat * v);
-void GLAPIENTRY gl_dispatch_stub_388(GLenum target, GLint s, GLint t);
-void GLAPIENTRY gl_dispatch_stub_389(GLenum target, const GLint * v);
-void GLAPIENTRY gl_dispatch_stub_390(GLenum target, GLshort s, GLshort t);
-void GLAPIENTRY gl_dispatch_stub_391(GLenum target, const GLshort * v);
-void GLAPIENTRY gl_dispatch_stub_392(GLenum target, GLdouble s, GLdouble t, GLdouble r);
-void GLAPIENTRY gl_dispatch_stub_393(GLenum target, const GLdouble * v);
-void GLAPIENTRY gl_dispatch_stub_394(GLenum target, GLfloat s, GLfloat t, GLfloat r);
-void GLAPIENTRY gl_dispatch_stub_395(GLenum target, const GLfloat * v);
-void GLAPIENTRY gl_dispatch_stub_396(GLenum target, GLint s, GLint t, GLint r);
-void GLAPIENTRY gl_dispatch_stub_397(GLenum target, const GLint * v);
-void GLAPIENTRY gl_dispatch_stub_398(GLenum target, GLshort s, GLshort t, GLshort r);
-void GLAPIENTRY gl_dispatch_stub_399(GLenum target, const GLshort * v);
-void GLAPIENTRY gl_dispatch_stub_400(GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q);
-void GLAPIENTRY gl_dispatch_stub_401(GLenum target, const GLdouble * v);
-void GLAPIENTRY gl_dispatch_stub_402(GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);
-void GLAPIENTRY gl_dispatch_stub_403(GLenum target, const GLfloat * v);
-void GLAPIENTRY gl_dispatch_stub_404(GLenum target, GLint s, GLint t, GLint r, GLint q);
-void GLAPIENTRY gl_dispatch_stub_405(GLenum target, const GLint * v);
-void GLAPIENTRY gl_dispatch_stub_406(GLenum target, GLshort s, GLshort t, GLshort r, GLshort q);
-void GLAPIENTRY gl_dispatch_stub_407(GLenum target, const GLshort * v);
-void GLAPIENTRY gl_dispatch_stub_418(GLuint array);
-void GLAPIENTRY gl_dispatch_stub_419(GLsizei n, const GLuint * arrays);
-void GLAPIENTRY gl_dispatch_stub_420(GLsizei n, GLuint * arrays);
-GLboolean GLAPIENTRY gl_dispatch_stub_421(GLuint array);
-
-/* OpenGL ES specific prototypes */
-
-/* category GL_OES_EGL_image */
-GLAPI void GLAPIENTRY glEGLImageTargetRenderbufferStorageOES(GLenum target, GLvoid * writeOffset);
-GLAPI void GLAPIENTRY glEGLImageTargetTexture2DOES(GLenum target, GLvoid * writeOffset);
-/* category GL_OES_get_program_binary */
-GLAPI void GLAPIENTRY glGetProgramBinaryOES(GLuint program, GLsizei bufSize, GLsizei * length, GLenum * binaryFormat, GLvoid * binary);
-GLAPI void GLAPIENTRY glProgramBinaryOES(GLuint program, GLenum binaryFormat, const GLvoid * binary, GLint length);
-/* category GL_OES_mapbuffer */
-GLAPI void GLAPIENTRY glGetBufferPointervOES(GLenum target, GLenum pname, GLvoid ** params);
-GLAPI GLvoid * GLAPIENTRY glMapBufferOES(GLenum target, GLenum access);
-GLAPI GLboolean GLAPIENTRY glUnmapBufferOES(GLenum target);
-/* category GL_OES_texture_3D */
-GLAPI void GLAPIENTRY glTexImage3DOES(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid * pixels);
-GLAPI void GLAPIENTRY glTexSubImage3DOES(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid * pixels);
-GLAPI void GLAPIENTRY glCopyTexSubImage3DOES(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
-GLAPI void GLAPIENTRY glCompressedTexImage3DOES(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid * data);
-GLAPI void GLAPIENTRY glCompressedTexSubImage3DOES(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid * data);
-GLAPI void GLAPIENTRY glFramebufferTexture3DOES(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);
-/* category es2.0 */
-GLAPI void GLAPIENTRY glBindFramebuffer(GLenum target, GLuint framebuffer);
-GLAPI void GLAPIENTRY glBindRenderbuffer(GLenum target, GLuint renderbuffer);
-GLAPI GLenum GLAPIENTRY glCheckFramebufferStatus(GLenum target);
-GLAPI void GLAPIENTRY glClearDepthf(GLclampf depth);
-GLAPI void GLAPIENTRY glDeleteFramebuffers(GLsizei n, const GLuint * framebuffers);
-GLAPI void GLAPIENTRY glDeleteRenderbuffers(GLsizei n, const GLuint * renderbuffers);
-GLAPI void GLAPIENTRY glDepthRangef(GLclampf zNear, GLclampf zFar);
-GLAPI void GLAPIENTRY glFramebufferRenderbuffer(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
-GLAPI void GLAPIENTRY glFramebufferTexture2D(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
-GLAPI void GLAPIENTRY glGenFramebuffers(GLsizei n, GLuint * framebuffers);
-GLAPI void GLAPIENTRY glGenRenderbuffers(GLsizei n, GLuint * renderbuffers);
-GLAPI void GLAPIENTRY glGenerateMipmap(GLenum target);
-GLAPI void GLAPIENTRY glGetFramebufferAttachmentParameteriv(GLenum target, GLenum attachment, GLenum pname, GLint * params);
-GLAPI void GLAPIENTRY glGetRenderbufferParameteriv(GLenum target, GLenum pname, GLint * params);
-GLAPI void GLAPIENTRY glGetShaderPrecisionFormat(GLenum shadertype, GLenum precisiontype, GLint * range, GLint * precision);
-GLAPI GLboolean GLAPIENTRY glIsFramebuffer(GLuint framebuffer);
-GLAPI GLboolean GLAPIENTRY glIsRenderbuffer(GLuint renderbuffer);
-GLAPI void GLAPIENTRY glReleaseShaderCompiler(void);
-GLAPI void GLAPIENTRY glRenderbufferStorage(GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
-GLAPI void GLAPIENTRY glShaderBinary(GLsizei n, const GLuint * shaders, GLenum binaryformat, const GLvoid * binary, GLsizei length);
-
-#endif /* defined(NEED_FUNCTION_POINTER) || defined(GLX_INDIRECT_RENDERING) */
-
-static const glprocs_table_t static_functions[] = {
- NAME_FUNC_OFFSET( 0, gl_dispatch_stub_0, gl_dispatch_stub_0, NULL, 0),
- NAME_FUNC_OFFSET( 10, gl_dispatch_stub_1, gl_dispatch_stub_1, NULL, 1),
- NAME_FUNC_OFFSET( 20, gl_dispatch_stub_2, gl_dispatch_stub_2, NULL, 2),
- NAME_FUNC_OFFSET( 31, gl_dispatch_stub_3, gl_dispatch_stub_3, NULL, 3),
- NAME_FUNC_OFFSET( 43, gl_dispatch_stub_4, gl_dispatch_stub_4, NULL, 4),
- NAME_FUNC_OFFSET( 57, gl_dispatch_stub_5, gl_dispatch_stub_5, NULL, 5),
- NAME_FUNC_OFFSET( 68, gl_dispatch_stub_6, gl_dispatch_stub_6, NULL, 6),
- NAME_FUNC_OFFSET( 79, gl_dispatch_stub_7, gl_dispatch_stub_7, NULL, 7),
- NAME_FUNC_OFFSET( 87, gl_dispatch_stub_8, gl_dispatch_stub_8, NULL, 8),
- NAME_FUNC_OFFSET( 96, gl_dispatch_stub_9, gl_dispatch_stub_9, NULL, 9),
- NAME_FUNC_OFFSET( 106, gl_dispatch_stub_10, gl_dispatch_stub_10, NULL, 10),
- NAME_FUNC_OFFSET( 117, gl_dispatch_stub_11, gl_dispatch_stub_11, NULL, 11),
- NAME_FUNC_OFFSET( 127, gl_dispatch_stub_12, gl_dispatch_stub_12, NULL, 12),
- NAME_FUNC_OFFSET( 138, gl_dispatch_stub_13, gl_dispatch_stub_13, NULL, 13),
- NAME_FUNC_OFFSET( 148, gl_dispatch_stub_14, gl_dispatch_stub_14, NULL, 14),
- NAME_FUNC_OFFSET( 159, gl_dispatch_stub_15, gl_dispatch_stub_15, NULL, 15),
- NAME_FUNC_OFFSET( 169, gl_dispatch_stub_16, gl_dispatch_stub_16, NULL, 16),
- NAME_FUNC_OFFSET( 180, gl_dispatch_stub_17, gl_dispatch_stub_17, NULL, 17),
- NAME_FUNC_OFFSET( 190, gl_dispatch_stub_18, gl_dispatch_stub_18, NULL, 18),
- NAME_FUNC_OFFSET( 201, gl_dispatch_stub_19, gl_dispatch_stub_19, NULL, 19),
- NAME_FUNC_OFFSET( 212, gl_dispatch_stub_20, gl_dispatch_stub_20, NULL, 20),
- NAME_FUNC_OFFSET( 224, gl_dispatch_stub_21, gl_dispatch_stub_21, NULL, 21),
- NAME_FUNC_OFFSET( 235, gl_dispatch_stub_22, gl_dispatch_stub_22, NULL, 22),
- NAME_FUNC_OFFSET( 247, gl_dispatch_stub_23, gl_dispatch_stub_23, NULL, 23),
- NAME_FUNC_OFFSET( 258, gl_dispatch_stub_24, gl_dispatch_stub_24, NULL, 24),
- NAME_FUNC_OFFSET( 270, gl_dispatch_stub_25, gl_dispatch_stub_25, NULL, 25),
- NAME_FUNC_OFFSET( 280, gl_dispatch_stub_26, gl_dispatch_stub_26, NULL, 26),
- NAME_FUNC_OFFSET( 291, gl_dispatch_stub_27, gl_dispatch_stub_27, NULL, 27),
- NAME_FUNC_OFFSET( 301, gl_dispatch_stub_28, gl_dispatch_stub_28, NULL, 28),
- NAME_FUNC_OFFSET( 312, gl_dispatch_stub_29, gl_dispatch_stub_29, NULL, 29),
- NAME_FUNC_OFFSET( 322, gl_dispatch_stub_30, gl_dispatch_stub_30, NULL, 30),
- NAME_FUNC_OFFSET( 333, gl_dispatch_stub_31, gl_dispatch_stub_31, NULL, 31),
- NAME_FUNC_OFFSET( 343, gl_dispatch_stub_32, gl_dispatch_stub_32, NULL, 32),
- NAME_FUNC_OFFSET( 354, gl_dispatch_stub_33, gl_dispatch_stub_33, NULL, 33),
- NAME_FUNC_OFFSET( 364, gl_dispatch_stub_34, gl_dispatch_stub_34, NULL, 34),
- NAME_FUNC_OFFSET( 375, gl_dispatch_stub_35, gl_dispatch_stub_35, NULL, 35),
- NAME_FUNC_OFFSET( 386, gl_dispatch_stub_36, gl_dispatch_stub_36, NULL, 36),
- NAME_FUNC_OFFSET( 398, gl_dispatch_stub_37, gl_dispatch_stub_37, NULL, 37),
- NAME_FUNC_OFFSET( 409, gl_dispatch_stub_38, gl_dispatch_stub_38, NULL, 38),
- NAME_FUNC_OFFSET( 421, gl_dispatch_stub_39, gl_dispatch_stub_39, NULL, 39),
- NAME_FUNC_OFFSET( 432, gl_dispatch_stub_40, gl_dispatch_stub_40, NULL, 40),
- NAME_FUNC_OFFSET( 444, gl_dispatch_stub_41, gl_dispatch_stub_41, NULL, 41),
- NAME_FUNC_OFFSET( 455, gl_dispatch_stub_42, gl_dispatch_stub_42, NULL, 42),
- NAME_FUNC_OFFSET( 467, gl_dispatch_stub_43, gl_dispatch_stub_43, NULL, 43),
- NAME_FUNC_OFFSET( 473, gl_dispatch_stub_44, gl_dispatch_stub_44, NULL, 44),
- NAME_FUNC_OFFSET( 482, gl_dispatch_stub_45, gl_dispatch_stub_45, NULL, 45),
- NAME_FUNC_OFFSET( 492, gl_dispatch_stub_46, gl_dispatch_stub_46, NULL, 46),
- NAME_FUNC_OFFSET( 501, gl_dispatch_stub_47, gl_dispatch_stub_47, NULL, 47),
- NAME_FUNC_OFFSET( 511, gl_dispatch_stub_48, gl_dispatch_stub_48, NULL, 48),
- NAME_FUNC_OFFSET( 520, gl_dispatch_stub_49, gl_dispatch_stub_49, NULL, 49),
- NAME_FUNC_OFFSET( 530, gl_dispatch_stub_50, gl_dispatch_stub_50, NULL, 50),
- NAME_FUNC_OFFSET( 539, gl_dispatch_stub_51, gl_dispatch_stub_51, NULL, 51),
- NAME_FUNC_OFFSET( 549, gl_dispatch_stub_52, gl_dispatch_stub_52, NULL, 52),
- NAME_FUNC_OFFSET( 560, gl_dispatch_stub_53, gl_dispatch_stub_53, NULL, 53),
- NAME_FUNC_OFFSET( 572, gl_dispatch_stub_54, gl_dispatch_stub_54, NULL, 54),
- NAME_FUNC_OFFSET( 583, gl_dispatch_stub_55, gl_dispatch_stub_55, NULL, 55),
- NAME_FUNC_OFFSET( 595, gl_dispatch_stub_56, gl_dispatch_stub_56, NULL, 56),
- NAME_FUNC_OFFSET( 606, gl_dispatch_stub_57, gl_dispatch_stub_57, NULL, 57),
- NAME_FUNC_OFFSET( 618, gl_dispatch_stub_58, gl_dispatch_stub_58, NULL, 58),
- NAME_FUNC_OFFSET( 629, gl_dispatch_stub_59, gl_dispatch_stub_59, NULL, 59),
- NAME_FUNC_OFFSET( 641, gl_dispatch_stub_60, gl_dispatch_stub_60, NULL, 60),
- NAME_FUNC_OFFSET( 652, gl_dispatch_stub_61, gl_dispatch_stub_61, NULL, 61),
- NAME_FUNC_OFFSET( 664, gl_dispatch_stub_62, gl_dispatch_stub_62, NULL, 62),
- NAME_FUNC_OFFSET( 678, gl_dispatch_stub_63, gl_dispatch_stub_63, NULL, 63),
- NAME_FUNC_OFFSET( 693, gl_dispatch_stub_64, gl_dispatch_stub_64, NULL, 64),
- NAME_FUNC_OFFSET( 707, gl_dispatch_stub_65, gl_dispatch_stub_65, NULL, 65),
- NAME_FUNC_OFFSET( 722, gl_dispatch_stub_66, gl_dispatch_stub_66, NULL, 66),
- NAME_FUNC_OFFSET( 736, gl_dispatch_stub_67, gl_dispatch_stub_67, NULL, 67),
- NAME_FUNC_OFFSET( 751, gl_dispatch_stub_68, gl_dispatch_stub_68, NULL, 68),
- NAME_FUNC_OFFSET( 765, gl_dispatch_stub_69, gl_dispatch_stub_69, NULL, 69),
- NAME_FUNC_OFFSET( 780, gl_dispatch_stub_70, gl_dispatch_stub_70, NULL, 70),
- NAME_FUNC_OFFSET( 794, gl_dispatch_stub_71, gl_dispatch_stub_71, NULL, 71),
- NAME_FUNC_OFFSET( 809, gl_dispatch_stub_72, gl_dispatch_stub_72, NULL, 72),
- NAME_FUNC_OFFSET( 823, gl_dispatch_stub_73, gl_dispatch_stub_73, NULL, 73),
- NAME_FUNC_OFFSET( 838, gl_dispatch_stub_74, gl_dispatch_stub_74, NULL, 74),
- NAME_FUNC_OFFSET( 852, gl_dispatch_stub_75, gl_dispatch_stub_75, NULL, 75),
- NAME_FUNC_OFFSET( 867, gl_dispatch_stub_76, gl_dispatch_stub_76, NULL, 76),
- NAME_FUNC_OFFSET( 881, gl_dispatch_stub_77, gl_dispatch_stub_77, NULL, 77),
- NAME_FUNC_OFFSET( 896, gl_dispatch_stub_78, gl_dispatch_stub_78, NULL, 78),
- NAME_FUNC_OFFSET( 910, gl_dispatch_stub_79, gl_dispatch_stub_79, NULL, 79),
- NAME_FUNC_OFFSET( 925, gl_dispatch_stub_80, gl_dispatch_stub_80, NULL, 80),
- NAME_FUNC_OFFSET( 939, gl_dispatch_stub_81, gl_dispatch_stub_81, NULL, 81),
- NAME_FUNC_OFFSET( 954, gl_dispatch_stub_82, gl_dispatch_stub_82, NULL, 82),
- NAME_FUNC_OFFSET( 968, gl_dispatch_stub_83, gl_dispatch_stub_83, NULL, 83),
- NAME_FUNC_OFFSET( 983, gl_dispatch_stub_84, gl_dispatch_stub_84, NULL, 84),
- NAME_FUNC_OFFSET( 997, gl_dispatch_stub_85, gl_dispatch_stub_85, NULL, 85),
- NAME_FUNC_OFFSET( 1012, gl_dispatch_stub_86, gl_dispatch_stub_86, NULL, 86),
- NAME_FUNC_OFFSET( 1020, gl_dispatch_stub_87, gl_dispatch_stub_87, NULL, 87),
- NAME_FUNC_OFFSET( 1029, gl_dispatch_stub_88, gl_dispatch_stub_88, NULL, 88),
- NAME_FUNC_OFFSET( 1037, gl_dispatch_stub_89, gl_dispatch_stub_89, NULL, 89),
- NAME_FUNC_OFFSET( 1046, gl_dispatch_stub_90, gl_dispatch_stub_90, NULL, 90),
- NAME_FUNC_OFFSET( 1054, gl_dispatch_stub_91, gl_dispatch_stub_91, NULL, 91),
- NAME_FUNC_OFFSET( 1063, gl_dispatch_stub_92, gl_dispatch_stub_92, NULL, 92),
- NAME_FUNC_OFFSET( 1071, gl_dispatch_stub_93, gl_dispatch_stub_93, NULL, 93),
- NAME_FUNC_OFFSET( 1080, gl_dispatch_stub_94, gl_dispatch_stub_94, NULL, 94),
- NAME_FUNC_OFFSET( 1093, gl_dispatch_stub_95, gl_dispatch_stub_95, NULL, 95),
- NAME_FUNC_OFFSET( 1107, gl_dispatch_stub_96, gl_dispatch_stub_96, NULL, 96),
- NAME_FUNC_OFFSET( 1120, gl_dispatch_stub_97, gl_dispatch_stub_97, NULL, 97),
- NAME_FUNC_OFFSET( 1134, gl_dispatch_stub_98, gl_dispatch_stub_98, NULL, 98),
- NAME_FUNC_OFFSET( 1147, gl_dispatch_stub_99, gl_dispatch_stub_99, NULL, 99),
- NAME_FUNC_OFFSET( 1161, gl_dispatch_stub_100, gl_dispatch_stub_100, NULL, 100),
- NAME_FUNC_OFFSET( 1174, gl_dispatch_stub_101, gl_dispatch_stub_101, NULL, 101),
- NAME_FUNC_OFFSET( 1188, gl_dispatch_stub_102, gl_dispatch_stub_102, NULL, 102),
- NAME_FUNC_OFFSET( 1201, gl_dispatch_stub_103, gl_dispatch_stub_103, NULL, 103),
- NAME_FUNC_OFFSET( 1215, gl_dispatch_stub_104, gl_dispatch_stub_104, NULL, 104),
- NAME_FUNC_OFFSET( 1228, gl_dispatch_stub_105, gl_dispatch_stub_105, NULL, 105),
- NAME_FUNC_OFFSET( 1242, gl_dispatch_stub_106, gl_dispatch_stub_106, NULL, 106),
- NAME_FUNC_OFFSET( 1255, gl_dispatch_stub_107, gl_dispatch_stub_107, NULL, 107),
- NAME_FUNC_OFFSET( 1269, gl_dispatch_stub_108, gl_dispatch_stub_108, NULL, 108),
- NAME_FUNC_OFFSET( 1282, gl_dispatch_stub_109, gl_dispatch_stub_109, NULL, 109),
- NAME_FUNC_OFFSET( 1296, gl_dispatch_stub_110, gl_dispatch_stub_110, NULL, 110),
- NAME_FUNC_OFFSET( 1309, gl_dispatch_stub_111, gl_dispatch_stub_111, NULL, 111),
- NAME_FUNC_OFFSET( 1323, gl_dispatch_stub_112, gl_dispatch_stub_112, NULL, 112),
- NAME_FUNC_OFFSET( 1336, gl_dispatch_stub_113, gl_dispatch_stub_113, NULL, 113),
- NAME_FUNC_OFFSET( 1350, gl_dispatch_stub_114, gl_dispatch_stub_114, NULL, 114),
- NAME_FUNC_OFFSET( 1363, gl_dispatch_stub_115, gl_dispatch_stub_115, NULL, 115),
- NAME_FUNC_OFFSET( 1377, gl_dispatch_stub_116, gl_dispatch_stub_116, NULL, 116),
- NAME_FUNC_OFFSET( 1390, gl_dispatch_stub_117, gl_dispatch_stub_117, NULL, 117),
- NAME_FUNC_OFFSET( 1404, gl_dispatch_stub_118, gl_dispatch_stub_118, NULL, 118),
- NAME_FUNC_OFFSET( 1417, gl_dispatch_stub_119, gl_dispatch_stub_119, NULL, 119),
- NAME_FUNC_OFFSET( 1431, gl_dispatch_stub_120, gl_dispatch_stub_120, NULL, 120),
- NAME_FUNC_OFFSET( 1444, gl_dispatch_stub_121, gl_dispatch_stub_121, NULL, 121),
- NAME_FUNC_OFFSET( 1458, gl_dispatch_stub_122, gl_dispatch_stub_122, NULL, 122),
- NAME_FUNC_OFFSET( 1471, gl_dispatch_stub_123, gl_dispatch_stub_123, NULL, 123),
- NAME_FUNC_OFFSET( 1485, gl_dispatch_stub_124, gl_dispatch_stub_124, NULL, 124),
- NAME_FUNC_OFFSET( 1498, gl_dispatch_stub_125, gl_dispatch_stub_125, NULL, 125),
- NAME_FUNC_OFFSET( 1512, gl_dispatch_stub_126, gl_dispatch_stub_126, NULL, 126),
- NAME_FUNC_OFFSET( 1523, gl_dispatch_stub_127, gl_dispatch_stub_127, NULL, 127),
- NAME_FUNC_OFFSET( 1535, gl_dispatch_stub_128, gl_dispatch_stub_128, NULL, 128),
- NAME_FUNC_OFFSET( 1546, gl_dispatch_stub_129, gl_dispatch_stub_129, NULL, 129),
- NAME_FUNC_OFFSET( 1558, gl_dispatch_stub_130, gl_dispatch_stub_130, NULL, 130),
- NAME_FUNC_OFFSET( 1569, gl_dispatch_stub_131, gl_dispatch_stub_131, NULL, 131),
- NAME_FUNC_OFFSET( 1581, gl_dispatch_stub_132, gl_dispatch_stub_132, NULL, 132),
- NAME_FUNC_OFFSET( 1592, gl_dispatch_stub_133, gl_dispatch_stub_133, NULL, 133),
- NAME_FUNC_OFFSET( 1604, gl_dispatch_stub_134, gl_dispatch_stub_134, NULL, 134),
- NAME_FUNC_OFFSET( 1615, gl_dispatch_stub_135, gl_dispatch_stub_135, NULL, 135),
- NAME_FUNC_OFFSET( 1627, gl_dispatch_stub_136, gl_dispatch_stub_136, NULL, 136),
- NAME_FUNC_OFFSET( 1638, gl_dispatch_stub_137, gl_dispatch_stub_137, NULL, 137),
- NAME_FUNC_OFFSET( 1650, gl_dispatch_stub_138, gl_dispatch_stub_138, NULL, 138),
- NAME_FUNC_OFFSET( 1661, gl_dispatch_stub_139, gl_dispatch_stub_139, NULL, 139),
- NAME_FUNC_OFFSET( 1673, gl_dispatch_stub_140, gl_dispatch_stub_140, NULL, 140),
- NAME_FUNC_OFFSET( 1684, gl_dispatch_stub_141, gl_dispatch_stub_141, NULL, 141),
- NAME_FUNC_OFFSET( 1696, gl_dispatch_stub_142, gl_dispatch_stub_142, NULL, 142),
- NAME_FUNC_OFFSET( 1707, gl_dispatch_stub_143, gl_dispatch_stub_143, NULL, 143),
- NAME_FUNC_OFFSET( 1719, gl_dispatch_stub_144, gl_dispatch_stub_144, NULL, 144),
- NAME_FUNC_OFFSET( 1730, gl_dispatch_stub_145, gl_dispatch_stub_145, NULL, 145),
- NAME_FUNC_OFFSET( 1742, gl_dispatch_stub_146, gl_dispatch_stub_146, NULL, 146),
- NAME_FUNC_OFFSET( 1753, gl_dispatch_stub_147, gl_dispatch_stub_147, NULL, 147),
- NAME_FUNC_OFFSET( 1765, gl_dispatch_stub_148, gl_dispatch_stub_148, NULL, 148),
- NAME_FUNC_OFFSET( 1776, gl_dispatch_stub_149, gl_dispatch_stub_149, NULL, 149),
- NAME_FUNC_OFFSET( 1788, gl_dispatch_stub_150, gl_dispatch_stub_150, NULL, 150),
- NAME_FUNC_OFFSET( 1800, gl_dispatch_stub_151, gl_dispatch_stub_151, NULL, 151),
- NAME_FUNC_OFFSET( 1816, glCullFace, glCullFace, NULL, 152),
- NAME_FUNC_OFFSET( 1827, gl_dispatch_stub_153, gl_dispatch_stub_153, NULL, 153),
- NAME_FUNC_OFFSET( 1834, gl_dispatch_stub_154, gl_dispatch_stub_154, NULL, 154),
- NAME_FUNC_OFFSET( 1842, gl_dispatch_stub_155, gl_dispatch_stub_155, NULL, 155),
- NAME_FUNC_OFFSET( 1849, gl_dispatch_stub_156, gl_dispatch_stub_156, NULL, 156),
- NAME_FUNC_OFFSET( 1857, glFrontFace, glFrontFace, NULL, 157),
- NAME_FUNC_OFFSET( 1869, glHint, glHint, NULL, 158),
- NAME_FUNC_OFFSET( 1876, gl_dispatch_stub_159, gl_dispatch_stub_159, NULL, 159),
- NAME_FUNC_OFFSET( 1885, gl_dispatch_stub_160, gl_dispatch_stub_160, NULL, 160),
- NAME_FUNC_OFFSET( 1895, gl_dispatch_stub_161, gl_dispatch_stub_161, NULL, 161),
- NAME_FUNC_OFFSET( 1904, gl_dispatch_stub_162, gl_dispatch_stub_162, NULL, 162),
- NAME_FUNC_OFFSET( 1914, gl_dispatch_stub_163, gl_dispatch_stub_163, NULL, 163),
- NAME_FUNC_OFFSET( 1928, gl_dispatch_stub_164, gl_dispatch_stub_164, NULL, 164),
- NAME_FUNC_OFFSET( 1943, gl_dispatch_stub_165, gl_dispatch_stub_165, NULL, 165),
- NAME_FUNC_OFFSET( 1957, gl_dispatch_stub_166, gl_dispatch_stub_166, NULL, 166),
- NAME_FUNC_OFFSET( 1972, gl_dispatch_stub_167, gl_dispatch_stub_167, NULL, 167),
- NAME_FUNC_OFFSET( 1986, glLineWidth, glLineWidth, NULL, 168),
- NAME_FUNC_OFFSET( 1998, gl_dispatch_stub_169, gl_dispatch_stub_169, NULL, 169),
- NAME_FUNC_OFFSET( 2010, gl_dispatch_stub_170, gl_dispatch_stub_170, NULL, 170),
- NAME_FUNC_OFFSET( 2023, gl_dispatch_stub_171, gl_dispatch_stub_171, NULL, 171),
- NAME_FUNC_OFFSET( 2035, gl_dispatch_stub_172, gl_dispatch_stub_172, NULL, 172),
- NAME_FUNC_OFFSET( 2048, gl_dispatch_stub_173, gl_dispatch_stub_173, NULL, 173),
- NAME_FUNC_OFFSET( 2060, gl_dispatch_stub_174, gl_dispatch_stub_174, NULL, 174),
- NAME_FUNC_OFFSET( 2074, gl_dispatch_stub_175, gl_dispatch_stub_175, NULL, 175),
- NAME_FUNC_OFFSET( 2091, glScissor, glScissor, NULL, 176),
- NAME_FUNC_OFFSET( 2101, gl_dispatch_stub_177, gl_dispatch_stub_177, NULL, 177),
- NAME_FUNC_OFFSET( 2114, glTexParameterf, glTexParameterf, NULL, 178),
- NAME_FUNC_OFFSET( 2130, glTexParameterfv, glTexParameterfv, NULL, 179),
- NAME_FUNC_OFFSET( 2147, glTexParameteri, glTexParameteri, NULL, 180),
- NAME_FUNC_OFFSET( 2163, glTexParameteriv, glTexParameteriv, NULL, 181),
- NAME_FUNC_OFFSET( 2180, gl_dispatch_stub_182, gl_dispatch_stub_182, NULL, 182),
- NAME_FUNC_OFFSET( 2193, glTexImage2D, glTexImage2D, NULL, 183),
- NAME_FUNC_OFFSET( 2206, gl_dispatch_stub_184, gl_dispatch_stub_184, NULL, 184),
- NAME_FUNC_OFFSET( 2216, gl_dispatch_stub_185, gl_dispatch_stub_185, NULL, 185),
- NAME_FUNC_OFFSET( 2227, gl_dispatch_stub_186, gl_dispatch_stub_186, NULL, 186),
- NAME_FUNC_OFFSET( 2237, gl_dispatch_stub_187, gl_dispatch_stub_187, NULL, 187),
- NAME_FUNC_OFFSET( 2248, gl_dispatch_stub_188, gl_dispatch_stub_188, NULL, 188),
- NAME_FUNC_OFFSET( 2258, gl_dispatch_stub_189, gl_dispatch_stub_189, NULL, 189),
- NAME_FUNC_OFFSET( 2269, gl_dispatch_stub_190, gl_dispatch_stub_190, NULL, 190),
- NAME_FUNC_OFFSET( 2279, gl_dispatch_stub_191, gl_dispatch_stub_191, NULL, 191),
- NAME_FUNC_OFFSET( 2290, gl_dispatch_stub_192, gl_dispatch_stub_192, NULL, 192),
- NAME_FUNC_OFFSET( 2300, gl_dispatch_stub_193, gl_dispatch_stub_193, NULL, 193),
- NAME_FUNC_OFFSET( 2311, gl_dispatch_stub_194, gl_dispatch_stub_194, NULL, 194),
- NAME_FUNC_OFFSET( 2328, gl_dispatch_stub_195, gl_dispatch_stub_195, NULL, 195),
- NAME_FUNC_OFFSET( 2343, gl_dispatch_stub_196, gl_dispatch_stub_196, NULL, 196),
- NAME_FUNC_OFFSET( 2356, gl_dispatch_stub_197, gl_dispatch_stub_197, NULL, 197),
- NAME_FUNC_OFFSET( 2368, gl_dispatch_stub_198, gl_dispatch_stub_198, NULL, 198),
- NAME_FUNC_OFFSET( 2379, gl_dispatch_stub_199, gl_dispatch_stub_199, NULL, 199),
- NAME_FUNC_OFFSET( 2393, gl_dispatch_stub_200, gl_dispatch_stub_200, NULL, 200),
- NAME_FUNC_OFFSET( 2403, gl_dispatch_stub_201, gl_dispatch_stub_201, NULL, 201),
- NAME_FUNC_OFFSET( 2414, gl_dispatch_stub_202, gl_dispatch_stub_202, NULL, 202),
- NAME_FUNC_OFFSET( 2427, glClear, glClear, NULL, 203),
- NAME_FUNC_OFFSET( 2435, gl_dispatch_stub_204, gl_dispatch_stub_204, NULL, 204),
- NAME_FUNC_OFFSET( 2448, gl_dispatch_stub_205, gl_dispatch_stub_205, NULL, 205),
- NAME_FUNC_OFFSET( 2461, glClearColor, glClearColor, NULL, 206),
- NAME_FUNC_OFFSET( 2474, glClearStencil, glClearStencil, NULL, 207),
- NAME_FUNC_OFFSET( 2489, gl_dispatch_stub_208, gl_dispatch_stub_208, NULL, 208),
- NAME_FUNC_OFFSET( 2502, glStencilMask, glStencilMask, NULL, 209),
- NAME_FUNC_OFFSET( 2516, glColorMask, glColorMask, NULL, 210),
- NAME_FUNC_OFFSET( 2528, glDepthMask, glDepthMask, NULL, 211),
- NAME_FUNC_OFFSET( 2540, gl_dispatch_stub_212, gl_dispatch_stub_212, NULL, 212),
- NAME_FUNC_OFFSET( 2552, gl_dispatch_stub_213, gl_dispatch_stub_213, NULL, 213),
- NAME_FUNC_OFFSET( 2560, glDisable, glDisable, NULL, 214),
- NAME_FUNC_OFFSET( 2570, glEnable, glEnable, NULL, 215),
- NAME_FUNC_OFFSET( 2579, glFinish, glFinish, NULL, 216),
- NAME_FUNC_OFFSET( 2588, glFlush, glFlush, NULL, 217),
- NAME_FUNC_OFFSET( 2596, gl_dispatch_stub_218, gl_dispatch_stub_218, NULL, 218),
- NAME_FUNC_OFFSET( 2608, gl_dispatch_stub_219, gl_dispatch_stub_219, NULL, 219),
- NAME_FUNC_OFFSET( 2621, gl_dispatch_stub_220, gl_dispatch_stub_220, NULL, 220),
- NAME_FUNC_OFFSET( 2629, gl_dispatch_stub_221, gl_dispatch_stub_221, NULL, 221),
- NAME_FUNC_OFFSET( 2637, gl_dispatch_stub_222, gl_dispatch_stub_222, NULL, 222),
- NAME_FUNC_OFFSET( 2645, gl_dispatch_stub_223, gl_dispatch_stub_223, NULL, 223),
- NAME_FUNC_OFFSET( 2653, gl_dispatch_stub_224, gl_dispatch_stub_224, NULL, 224),
- NAME_FUNC_OFFSET( 2665, gl_dispatch_stub_225, gl_dispatch_stub_225, NULL, 225),
- NAME_FUNC_OFFSET( 2677, gl_dispatch_stub_226, gl_dispatch_stub_226, NULL, 226),
- NAME_FUNC_OFFSET( 2689, gl_dispatch_stub_227, gl_dispatch_stub_227, NULL, 227),
- NAME_FUNC_OFFSET( 2701, gl_dispatch_stub_228, gl_dispatch_stub_228, NULL, 228),
- NAME_FUNC_OFFSET( 2715, gl_dispatch_stub_229, gl_dispatch_stub_229, NULL, 229),
- NAME_FUNC_OFFSET( 2730, gl_dispatch_stub_230, gl_dispatch_stub_230, NULL, 230),
- NAME_FUNC_OFFSET( 2744, gl_dispatch_stub_231, gl_dispatch_stub_231, NULL, 231),
- NAME_FUNC_OFFSET( 2759, gl_dispatch_stub_232, gl_dispatch_stub_232, NULL, 232),
- NAME_FUNC_OFFSET( 2773, gl_dispatch_stub_233, gl_dispatch_stub_233, NULL, 233),
- NAME_FUNC_OFFSET( 2788, gl_dispatch_stub_234, gl_dispatch_stub_234, NULL, 234),
- NAME_FUNC_OFFSET( 2802, gl_dispatch_stub_235, gl_dispatch_stub_235, NULL, 235),
- NAME_FUNC_OFFSET( 2817, gl_dispatch_stub_236, gl_dispatch_stub_236, NULL, 236),
- NAME_FUNC_OFFSET( 2829, gl_dispatch_stub_237, gl_dispatch_stub_237, NULL, 237),
- NAME_FUNC_OFFSET( 2842, gl_dispatch_stub_238, gl_dispatch_stub_238, NULL, 238),
- NAME_FUNC_OFFSET( 2854, gl_dispatch_stub_239, gl_dispatch_stub_239, NULL, 239),
- NAME_FUNC_OFFSET( 2867, gl_dispatch_stub_240, gl_dispatch_stub_240, NULL, 240),
- NAME_FUNC_OFFSET( 2879, glBlendFunc, glBlendFunc, NULL, 241),
- NAME_FUNC_OFFSET( 2891, gl_dispatch_stub_242, gl_dispatch_stub_242, NULL, 242),
- NAME_FUNC_OFFSET( 2901, glStencilFunc, glStencilFunc, NULL, 243),
- NAME_FUNC_OFFSET( 2915, glStencilOp, glStencilOp, NULL, 244),
- NAME_FUNC_OFFSET( 2927, glDepthFunc, glDepthFunc, NULL, 245),
- NAME_FUNC_OFFSET( 2939, gl_dispatch_stub_246, gl_dispatch_stub_246, NULL, 246),
- NAME_FUNC_OFFSET( 2951, gl_dispatch_stub_247, gl_dispatch_stub_247, NULL, 247),
- NAME_FUNC_OFFSET( 2968, gl_dispatch_stub_248, gl_dispatch_stub_248, NULL, 248),
- NAME_FUNC_OFFSET( 2985, gl_dispatch_stub_249, gl_dispatch_stub_249, NULL, 249),
- NAME_FUNC_OFFSET( 2999, glPixelStorei, glPixelStorei, NULL, 250),
- NAME_FUNC_OFFSET( 3013, gl_dispatch_stub_251, gl_dispatch_stub_251, NULL, 251),
- NAME_FUNC_OFFSET( 3026, gl_dispatch_stub_252, gl_dispatch_stub_252, NULL, 252),
- NAME_FUNC_OFFSET( 3040, gl_dispatch_stub_253, gl_dispatch_stub_253, NULL, 253),
- NAME_FUNC_OFFSET( 3054, gl_dispatch_stub_254, gl_dispatch_stub_254, NULL, 254),
- NAME_FUNC_OFFSET( 3067, gl_dispatch_stub_255, gl_dispatch_stub_255, NULL, 255),
- NAME_FUNC_OFFSET( 3080, glReadPixels, glReadPixels, NULL, 256),
- NAME_FUNC_OFFSET( 3093, gl_dispatch_stub_257, gl_dispatch_stub_257, NULL, 257),
- NAME_FUNC_OFFSET( 3106, glGetBooleanv, glGetBooleanv, NULL, 258),
- NAME_FUNC_OFFSET( 3120, gl_dispatch_stub_259, gl_dispatch_stub_259, NULL, 259),
- NAME_FUNC_OFFSET( 3135, gl_dispatch_stub_260, gl_dispatch_stub_260, NULL, 260),
- NAME_FUNC_OFFSET( 3148, glGetError, glGetError, NULL, 261),
- NAME_FUNC_OFFSET( 3159, glGetFloatv, glGetFloatv, NULL, 262),
- NAME_FUNC_OFFSET( 3171, glGetIntegerv, glGetIntegerv, NULL, 263),
- NAME_FUNC_OFFSET( 3185, gl_dispatch_stub_264, gl_dispatch_stub_264, NULL, 264),
- NAME_FUNC_OFFSET( 3198, gl_dispatch_stub_265, gl_dispatch_stub_265, NULL, 265),
- NAME_FUNC_OFFSET( 3211, gl_dispatch_stub_266, gl_dispatch_stub_266, NULL, 266),
- NAME_FUNC_OFFSET( 3222, gl_dispatch_stub_267, gl_dispatch_stub_267, NULL, 267),
- NAME_FUNC_OFFSET( 3233, gl_dispatch_stub_268, gl_dispatch_stub_268, NULL, 268),
- NAME_FUNC_OFFSET( 3244, gl_dispatch_stub_269, gl_dispatch_stub_269, NULL, 269),
- NAME_FUNC_OFFSET( 3260, gl_dispatch_stub_270, gl_dispatch_stub_270, NULL, 270),
- NAME_FUNC_OFFSET( 3276, gl_dispatch_stub_271, gl_dispatch_stub_271, NULL, 271),
- NAME_FUNC_OFFSET( 3292, gl_dispatch_stub_272, gl_dispatch_stub_272, NULL, 272),
- NAME_FUNC_OFFSET( 3309, gl_dispatch_stub_273, gl_dispatch_stub_273, NULL, 273),
- NAME_FUNC_OFFSET( 3326, gl_dispatch_stub_274, gl_dispatch_stub_274, NULL, 274),
- NAME_FUNC_OFFSET( 3346, glGetString, glGetString, NULL, 275),
- NAME_FUNC_OFFSET( 3358, gl_dispatch_stub_276, gl_dispatch_stub_276, NULL, 276),
- NAME_FUNC_OFFSET( 3372, gl_dispatch_stub_277, gl_dispatch_stub_277, NULL, 277),
- NAME_FUNC_OFFSET( 3386, gl_dispatch_stub_278, gl_dispatch_stub_278, NULL, 278),
- NAME_FUNC_OFFSET( 3400, gl_dispatch_stub_279, gl_dispatch_stub_279, NULL, 279),
- NAME_FUNC_OFFSET( 3414, gl_dispatch_stub_280, gl_dispatch_stub_280, NULL, 280),
- NAME_FUNC_OFFSET( 3428, gl_dispatch_stub_281, gl_dispatch_stub_281, NULL, 281),
- NAME_FUNC_OFFSET( 3442, glGetTexParameterfv, glGetTexParameterfv, NULL, 282),
- NAME_FUNC_OFFSET( 3462, glGetTexParameteriv, glGetTexParameteriv, NULL, 283),
- NAME_FUNC_OFFSET( 3482, gl_dispatch_stub_284, gl_dispatch_stub_284, NULL, 284),
- NAME_FUNC_OFFSET( 3507, gl_dispatch_stub_285, gl_dispatch_stub_285, NULL, 285),
- NAME_FUNC_OFFSET( 3532, glIsEnabled, glIsEnabled, NULL, 286),
- NAME_FUNC_OFFSET( 3544, gl_dispatch_stub_287, gl_dispatch_stub_287, NULL, 287),
- NAME_FUNC_OFFSET( 3553, gl_dispatch_stub_288, gl_dispatch_stub_288, NULL, 288),
- NAME_FUNC_OFFSET( 3566, gl_dispatch_stub_289, gl_dispatch_stub_289, NULL, 289),
- NAME_FUNC_OFFSET( 3576, gl_dispatch_stub_290, gl_dispatch_stub_290, NULL, 290),
- NAME_FUNC_OFFSET( 3591, gl_dispatch_stub_291, gl_dispatch_stub_291, NULL, 291),
- NAME_FUNC_OFFSET( 3605, gl_dispatch_stub_292, gl_dispatch_stub_292, NULL, 292),
- NAME_FUNC_OFFSET( 3619, gl_dispatch_stub_293, gl_dispatch_stub_293, NULL, 293),
- NAME_FUNC_OFFSET( 3632, gl_dispatch_stub_294, gl_dispatch_stub_294, NULL, 294),
- NAME_FUNC_OFFSET( 3646, gl_dispatch_stub_295, gl_dispatch_stub_295, NULL, 295),
- NAME_FUNC_OFFSET( 3660, gl_dispatch_stub_296, gl_dispatch_stub_296, NULL, 296),
- NAME_FUNC_OFFSET( 3668, gl_dispatch_stub_297, gl_dispatch_stub_297, NULL, 297),
- NAME_FUNC_OFFSET( 3680, gl_dispatch_stub_298, gl_dispatch_stub_298, NULL, 298),
- NAME_FUNC_OFFSET( 3693, gl_dispatch_stub_299, gl_dispatch_stub_299, NULL, 299),
- NAME_FUNC_OFFSET( 3703, gl_dispatch_stub_300, gl_dispatch_stub_300, NULL, 300),
- NAME_FUNC_OFFSET( 3713, gl_dispatch_stub_301, gl_dispatch_stub_301, NULL, 301),
- NAME_FUNC_OFFSET( 3722, gl_dispatch_stub_302, gl_dispatch_stub_302, NULL, 302),
- NAME_FUNC_OFFSET( 3731, gl_dispatch_stub_303, gl_dispatch_stub_303, NULL, 303),
- NAME_FUNC_OFFSET( 3744, gl_dispatch_stub_304, gl_dispatch_stub_304, NULL, 304),
- NAME_FUNC_OFFSET( 3757, glViewport, glViewport, NULL, 305),
- NAME_FUNC_OFFSET( 3768, gl_dispatch_stub_306, gl_dispatch_stub_306, NULL, 306),
- NAME_FUNC_OFFSET( 3783, glBindTexture, glBindTexture, NULL, 307),
- NAME_FUNC_OFFSET( 3797, gl_dispatch_stub_308, gl_dispatch_stub_308, NULL, 308),
- NAME_FUNC_OFFSET( 3812, gl_dispatch_stub_309, gl_dispatch_stub_309, NULL, 309),
- NAME_FUNC_OFFSET( 3833, glDrawArrays, glDrawArrays, NULL, 310),
- NAME_FUNC_OFFSET( 3846, glDrawElements, glDrawElements, NULL, 311),
- NAME_FUNC_OFFSET( 3861, gl_dispatch_stub_312, gl_dispatch_stub_312, NULL, 312),
- NAME_FUNC_OFFSET( 3879, gl_dispatch_stub_313, gl_dispatch_stub_313, NULL, 313),
- NAME_FUNC_OFFSET( 3899, gl_dispatch_stub_314, gl_dispatch_stub_314, NULL, 314),
- NAME_FUNC_OFFSET( 3914, gl_dispatch_stub_315, gl_dispatch_stub_315, NULL, 315),
- NAME_FUNC_OFFSET( 3924, gl_dispatch_stub_316, gl_dispatch_stub_316, NULL, 316),
- NAME_FUNC_OFFSET( 3935, gl_dispatch_stub_317, gl_dispatch_stub_317, NULL, 317),
- NAME_FUNC_OFFSET( 3955, gl_dispatch_stub_318, gl_dispatch_stub_318, NULL, 318),
- NAME_FUNC_OFFSET( 3971, glPolygonOffset, glPolygonOffset, NULL, 319),
- NAME_FUNC_OFFSET( 3987, gl_dispatch_stub_320, gl_dispatch_stub_320, NULL, 320),
- NAME_FUNC_OFFSET( 4005, gl_dispatch_stub_321, gl_dispatch_stub_321, NULL, 321),
- NAME_FUNC_OFFSET( 4021, gl_dispatch_stub_322, gl_dispatch_stub_322, NULL, 322),
- NAME_FUNC_OFFSET( 4043, gl_dispatch_stub_323, gl_dispatch_stub_323, NULL, 323),
- NAME_FUNC_OFFSET( 4060, glCopyTexImage2D, glCopyTexImage2D, NULL, 324),
- NAME_FUNC_OFFSET( 4077, gl_dispatch_stub_325, gl_dispatch_stub_325, NULL, 325),
- NAME_FUNC_OFFSET( 4097, glCopyTexSubImage2D, glCopyTexSubImage2D, NULL, 326),
- NAME_FUNC_OFFSET( 4117, glDeleteTextures, glDeleteTextures, NULL, 327),
- NAME_FUNC_OFFSET( 4134, glGenTextures, glGenTextures, NULL, 328),
- NAME_FUNC_OFFSET( 4148, gl_dispatch_stub_329, gl_dispatch_stub_329, NULL, 329),
- NAME_FUNC_OFFSET( 4162, glIsTexture, glIsTexture, NULL, 330),
- NAME_FUNC_OFFSET( 4174, gl_dispatch_stub_331, gl_dispatch_stub_331, NULL, 331),
- NAME_FUNC_OFFSET( 4195, gl_dispatch_stub_332, gl_dispatch_stub_332, NULL, 332),
- NAME_FUNC_OFFSET( 4211, glTexSubImage2D, glTexSubImage2D, NULL, 333),
- NAME_FUNC_OFFSET( 4227, gl_dispatch_stub_334, gl_dispatch_stub_334, NULL, 334),
- NAME_FUNC_OFFSET( 4245, gl_dispatch_stub_335, gl_dispatch_stub_335, NULL, 335),
- NAME_FUNC_OFFSET( 4264, glBlendColor, glBlendColor, NULL, 336),
- NAME_FUNC_OFFSET( 4277, glBlendEquation, glBlendEquation, NULL, 337),
- NAME_FUNC_OFFSET( 4293, gl_dispatch_stub_338, gl_dispatch_stub_338, NULL, 338),
- NAME_FUNC_OFFSET( 4313, gl_dispatch_stub_339, gl_dispatch_stub_339, NULL, 339),
- NAME_FUNC_OFFSET( 4326, gl_dispatch_stub_340, gl_dispatch_stub_340, NULL, 340),
- NAME_FUNC_OFFSET( 4350, gl_dispatch_stub_341, gl_dispatch_stub_341, NULL, 341),
- NAME_FUNC_OFFSET( 4374, gl_dispatch_stub_342, gl_dispatch_stub_342, NULL, 342),
- NAME_FUNC_OFFSET( 4391, gl_dispatch_stub_343, gl_dispatch_stub_343, NULL, 343),
- NAME_FUNC_OFFSET( 4407, gl_dispatch_stub_344, gl_dispatch_stub_344, NULL, 344),
- NAME_FUNC_OFFSET( 4434, gl_dispatch_stub_345, gl_dispatch_stub_345, NULL, 345),
- NAME_FUNC_OFFSET( 4461, gl_dispatch_stub_346, gl_dispatch_stub_346, NULL, 346),
- NAME_FUNC_OFFSET( 4477, gl_dispatch_stub_347, gl_dispatch_stub_347, NULL, 347),
- NAME_FUNC_OFFSET( 4497, gl_dispatch_stub_348, gl_dispatch_stub_348, NULL, 348),
- NAME_FUNC_OFFSET( 4519, gl_dispatch_stub_349, gl_dispatch_stub_349, NULL, 349),
- NAME_FUNC_OFFSET( 4541, gl_dispatch_stub_350, gl_dispatch_stub_350, NULL, 350),
- NAME_FUNC_OFFSET( 4565, gl_dispatch_stub_351, gl_dispatch_stub_351, NULL, 351),
- NAME_FUNC_OFFSET( 4590, gl_dispatch_stub_352, gl_dispatch_stub_352, NULL, 352),
- NAME_FUNC_OFFSET( 4614, gl_dispatch_stub_353, gl_dispatch_stub_353, NULL, 353),
- NAME_FUNC_OFFSET( 4639, gl_dispatch_stub_354, gl_dispatch_stub_354, NULL, 354),
- NAME_FUNC_OFFSET( 4665, gl_dispatch_stub_355, gl_dispatch_stub_355, NULL, 355),
- NAME_FUNC_OFFSET( 4691, gl_dispatch_stub_356, gl_dispatch_stub_356, NULL, 356),
- NAME_FUNC_OFFSET( 4714, gl_dispatch_stub_357, gl_dispatch_stub_357, NULL, 357),
- NAME_FUNC_OFFSET( 4742, gl_dispatch_stub_358, gl_dispatch_stub_358, NULL, 358),
- NAME_FUNC_OFFSET( 4770, gl_dispatch_stub_359, gl_dispatch_stub_359, NULL, 359),
- NAME_FUNC_OFFSET( 4791, gl_dispatch_stub_360, gl_dispatch_stub_360, NULL, 360),
- NAME_FUNC_OFFSET( 4811, gl_dispatch_stub_361, gl_dispatch_stub_361, NULL, 361),
- NAME_FUNC_OFFSET( 4826, gl_dispatch_stub_362, gl_dispatch_stub_362, NULL, 362),
- NAME_FUNC_OFFSET( 4852, gl_dispatch_stub_363, gl_dispatch_stub_363, NULL, 363),
- NAME_FUNC_OFFSET( 4878, gl_dispatch_stub_364, gl_dispatch_stub_364, NULL, 364),
- NAME_FUNC_OFFSET( 4890, gl_dispatch_stub_365, gl_dispatch_stub_365, NULL, 365),
- NAME_FUNC_OFFSET( 4913, gl_dispatch_stub_366, gl_dispatch_stub_366, NULL, 366),
- NAME_FUNC_OFFSET( 4936, gl_dispatch_stub_367, gl_dispatch_stub_367, NULL, 367),
- NAME_FUNC_OFFSET( 4948, gl_dispatch_stub_368, gl_dispatch_stub_368, NULL, 368),
- NAME_FUNC_OFFSET( 4957, gl_dispatch_stub_369, gl_dispatch_stub_369, NULL, 369),
- NAME_FUNC_OFFSET( 4974, gl_dispatch_stub_370, gl_dispatch_stub_370, NULL, 370),
- NAME_FUNC_OFFSET( 4988, glTexImage3DOES, glTexImage3DOES, NULL, 371),
- NAME_FUNC_OFFSET( 5004, glTexSubImage3DOES, glTexSubImage3DOES, NULL, 372),
- NAME_FUNC_OFFSET( 5023, glCopyTexSubImage3DOES, glCopyTexSubImage3DOES, NULL, 373),
- NAME_FUNC_OFFSET( 5046, glActiveTexture, glActiveTexture, NULL, 374),
- NAME_FUNC_OFFSET( 5062, gl_dispatch_stub_375, gl_dispatch_stub_375, NULL, 375),
- NAME_FUNC_OFFSET( 5087, gl_dispatch_stub_376, gl_dispatch_stub_376, NULL, 376),
- NAME_FUNC_OFFSET( 5108, gl_dispatch_stub_377, gl_dispatch_stub_377, NULL, 377),
- NAME_FUNC_OFFSET( 5130, gl_dispatch_stub_378, gl_dispatch_stub_378, NULL, 378),
- NAME_FUNC_OFFSET( 5151, gl_dispatch_stub_379, gl_dispatch_stub_379, NULL, 379),
- NAME_FUNC_OFFSET( 5173, gl_dispatch_stub_380, gl_dispatch_stub_380, NULL, 380),
- NAME_FUNC_OFFSET( 5194, gl_dispatch_stub_381, gl_dispatch_stub_381, NULL, 381),
- NAME_FUNC_OFFSET( 5216, gl_dispatch_stub_382, gl_dispatch_stub_382, NULL, 382),
- NAME_FUNC_OFFSET( 5237, gl_dispatch_stub_383, gl_dispatch_stub_383, NULL, 383),
- NAME_FUNC_OFFSET( 5259, gl_dispatch_stub_384, gl_dispatch_stub_384, NULL, 384),
- NAME_FUNC_OFFSET( 5280, gl_dispatch_stub_385, gl_dispatch_stub_385, NULL, 385),
- NAME_FUNC_OFFSET( 5302, gl_dispatch_stub_386, gl_dispatch_stub_386, NULL, 386),
- NAME_FUNC_OFFSET( 5323, gl_dispatch_stub_387, gl_dispatch_stub_387, NULL, 387),
- NAME_FUNC_OFFSET( 5345, gl_dispatch_stub_388, gl_dispatch_stub_388, NULL, 388),
- NAME_FUNC_OFFSET( 5366, gl_dispatch_stub_389, gl_dispatch_stub_389, NULL, 389),
- NAME_FUNC_OFFSET( 5388, gl_dispatch_stub_390, gl_dispatch_stub_390, NULL, 390),
- NAME_FUNC_OFFSET( 5409, gl_dispatch_stub_391, gl_dispatch_stub_391, NULL, 391),
- NAME_FUNC_OFFSET( 5431, gl_dispatch_stub_392, gl_dispatch_stub_392, NULL, 392),
- NAME_FUNC_OFFSET( 5452, gl_dispatch_stub_393, gl_dispatch_stub_393, NULL, 393),
- NAME_FUNC_OFFSET( 5474, gl_dispatch_stub_394, gl_dispatch_stub_394, NULL, 394),
- NAME_FUNC_OFFSET( 5495, gl_dispatch_stub_395, gl_dispatch_stub_395, NULL, 395),
- NAME_FUNC_OFFSET( 5517, gl_dispatch_stub_396, gl_dispatch_stub_396, NULL, 396),
- NAME_FUNC_OFFSET( 5538, gl_dispatch_stub_397, gl_dispatch_stub_397, NULL, 397),
- NAME_FUNC_OFFSET( 5560, gl_dispatch_stub_398, gl_dispatch_stub_398, NULL, 398),
- NAME_FUNC_OFFSET( 5581, gl_dispatch_stub_399, gl_dispatch_stub_399, NULL, 399),
- NAME_FUNC_OFFSET( 5603, gl_dispatch_stub_400, gl_dispatch_stub_400, NULL, 400),
- NAME_FUNC_OFFSET( 5624, gl_dispatch_stub_401, gl_dispatch_stub_401, NULL, 401),
- NAME_FUNC_OFFSET( 5646, gl_dispatch_stub_402, gl_dispatch_stub_402, NULL, 402),
- NAME_FUNC_OFFSET( 5667, gl_dispatch_stub_403, gl_dispatch_stub_403, NULL, 403),
- NAME_FUNC_OFFSET( 5689, gl_dispatch_stub_404, gl_dispatch_stub_404, NULL, 404),
- NAME_FUNC_OFFSET( 5710, gl_dispatch_stub_405, gl_dispatch_stub_405, NULL, 405),
- NAME_FUNC_OFFSET( 5732, gl_dispatch_stub_406, gl_dispatch_stub_406, NULL, 406),
- NAME_FUNC_OFFSET( 5753, gl_dispatch_stub_407, gl_dispatch_stub_407, NULL, 407),
- NAME_FUNC_OFFSET( 5775, glGetBufferPointervOES, glGetBufferPointervOES, NULL, 408),
- NAME_FUNC_OFFSET( 5798, glMapBufferOES, glMapBufferOES, NULL, 409),
- NAME_FUNC_OFFSET( 5813, glUnmapBufferOES, glUnmapBufferOES, NULL, 410),
- NAME_FUNC_OFFSET( 5830, glCompressedTexImage3DOES, glCompressedTexImage3DOES, NULL, 411),
- NAME_FUNC_OFFSET( 5856, glCompressedTexSubImage3DOES, glCompressedTexSubImage3DOES, NULL, 412),
- NAME_FUNC_OFFSET( 5885, glFramebufferTexture3DOES, glFramebufferTexture3DOES, NULL, 413),
- NAME_FUNC_OFFSET( 5911, glGetProgramBinaryOES, glGetProgramBinaryOES, NULL, 414),
- NAME_FUNC_OFFSET( 5933, glProgramBinaryOES, glProgramBinaryOES, NULL, 415),
- NAME_FUNC_OFFSET( 5952, glMultiDrawArraysEXT, glMultiDrawArraysEXT, NULL, 416),
- NAME_FUNC_OFFSET( 5973, glMultiDrawElementsEXT, glMultiDrawElementsEXT, NULL, 417),
- NAME_FUNC_OFFSET( 5996, gl_dispatch_stub_418, gl_dispatch_stub_418, NULL, 418),
- NAME_FUNC_OFFSET( 6019, gl_dispatch_stub_419, gl_dispatch_stub_419, NULL, 419),
- NAME_FUNC_OFFSET( 6045, gl_dispatch_stub_420, gl_dispatch_stub_420, NULL, 420),
- NAME_FUNC_OFFSET( 6068, gl_dispatch_stub_421, gl_dispatch_stub_421, NULL, 421),
- NAME_FUNC_OFFSET( 6089, glEGLImageTargetRenderbufferStorageOES, glEGLImageTargetRenderbufferStorageOES, NULL, 422),
- NAME_FUNC_OFFSET( 6128, glEGLImageTargetTexture2DOES, glEGLImageTargetTexture2DOES, NULL, 423),
- NAME_FUNC_OFFSET( 6157, glCompressedTexImage2D, glCompressedTexImage2D, NULL, 424),
- NAME_FUNC_OFFSET( 6180, glCompressedTexSubImage2D, glCompressedTexSubImage2D, NULL, 425),
- NAME_FUNC_OFFSET( 6206, glSampleCoverage, glSampleCoverage, NULL, 426),
- NAME_FUNC_OFFSET( 6223, glBindBuffer, glBindBuffer, NULL, 427),
- NAME_FUNC_OFFSET( 6236, glBufferData, glBufferData, NULL, 428),
- NAME_FUNC_OFFSET( 6249, glBufferSubData, glBufferSubData, NULL, 429),
- NAME_FUNC_OFFSET( 6265, glDeleteBuffers, glDeleteBuffers, NULL, 430),
- NAME_FUNC_OFFSET( 6281, glGenBuffers, glGenBuffers, NULL, 431),
- NAME_FUNC_OFFSET( 6294, glGetBufferParameteriv, glGetBufferParameteriv, NULL, 432),
- NAME_FUNC_OFFSET( 6317, glIsBuffer, glIsBuffer, NULL, 433),
- NAME_FUNC_OFFSET( 6328, glAttachShader, glAttachShader, NULL, 434),
- NAME_FUNC_OFFSET( 6343, glBindAttribLocation, glBindAttribLocation, NULL, 435),
- NAME_FUNC_OFFSET( 6364, glBlendEquationSeparate, glBlendEquationSeparate, NULL, 436),
- NAME_FUNC_OFFSET( 6388, glCompileShader, glCompileShader, NULL, 437),
- NAME_FUNC_OFFSET( 6404, glCreateProgram, glCreateProgram, NULL, 438),
- NAME_FUNC_OFFSET( 6420, glCreateShader, glCreateShader, NULL, 439),
- NAME_FUNC_OFFSET( 6435, glDeleteProgram, glDeleteProgram, NULL, 440),
- NAME_FUNC_OFFSET( 6451, glDeleteShader, glDeleteShader, NULL, 441),
- NAME_FUNC_OFFSET( 6466, glDetachShader, glDetachShader, NULL, 442),
- NAME_FUNC_OFFSET( 6481, glDisableVertexAttribArray, glDisableVertexAttribArray, NULL, 443),
- NAME_FUNC_OFFSET( 6508, glEnableVertexAttribArray, glEnableVertexAttribArray, NULL, 444),
- NAME_FUNC_OFFSET( 6534, glGetActiveAttrib, glGetActiveAttrib, NULL, 445),
- NAME_FUNC_OFFSET( 6552, glGetActiveUniform, glGetActiveUniform, NULL, 446),
- NAME_FUNC_OFFSET( 6571, glGetAttachedShaders, glGetAttachedShaders, NULL, 447),
- NAME_FUNC_OFFSET( 6592, glGetAttribLocation, glGetAttribLocation, NULL, 448),
- NAME_FUNC_OFFSET( 6612, glGetProgramInfoLog, glGetProgramInfoLog, NULL, 449),
- NAME_FUNC_OFFSET( 6632, glGetProgramiv, glGetProgramiv, NULL, 450),
- NAME_FUNC_OFFSET( 6647, glGetShaderInfoLog, glGetShaderInfoLog, NULL, 451),
- NAME_FUNC_OFFSET( 6666, glGetShaderSource, glGetShaderSource, NULL, 452),
- NAME_FUNC_OFFSET( 6684, glGetShaderiv, glGetShaderiv, NULL, 453),
- NAME_FUNC_OFFSET( 6698, glGetUniformLocation, glGetUniformLocation, NULL, 454),
- NAME_FUNC_OFFSET( 6719, glGetUniformfv, glGetUniformfv, NULL, 455),
- NAME_FUNC_OFFSET( 6734, glGetUniformiv, glGetUniformiv, NULL, 456),
- NAME_FUNC_OFFSET( 6749, glGetVertexAttribPointerv, glGetVertexAttribPointerv, NULL, 457),
- NAME_FUNC_OFFSET( 6775, glGetVertexAttribfv, glGetVertexAttribfv, NULL, 458),
- NAME_FUNC_OFFSET( 6795, glGetVertexAttribiv, glGetVertexAttribiv, NULL, 459),
- NAME_FUNC_OFFSET( 6815, glIsProgram, glIsProgram, NULL, 460),
- NAME_FUNC_OFFSET( 6827, glIsShader, glIsShader, NULL, 461),
- NAME_FUNC_OFFSET( 6838, glLinkProgram, glLinkProgram, NULL, 462),
- NAME_FUNC_OFFSET( 6852, glShaderSource, glShaderSource, NULL, 463),
- NAME_FUNC_OFFSET( 6867, glStencilFuncSeparate, glStencilFuncSeparate, NULL, 464),
- NAME_FUNC_OFFSET( 6889, glStencilMaskSeparate, glStencilMaskSeparate, NULL, 465),
- NAME_FUNC_OFFSET( 6911, glStencilOpSeparate, glStencilOpSeparate, NULL, 466),
- NAME_FUNC_OFFSET( 6931, glUniform1f, glUniform1f, NULL, 467),
- NAME_FUNC_OFFSET( 6943, glUniform1fv, glUniform1fv, NULL, 468),
- NAME_FUNC_OFFSET( 6956, glUniform1i, glUniform1i, NULL, 469),
- NAME_FUNC_OFFSET( 6968, glUniform1iv, glUniform1iv, NULL, 470),
- NAME_FUNC_OFFSET( 6981, glUniform2f, glUniform2f, NULL, 471),
- NAME_FUNC_OFFSET( 6993, glUniform2fv, glUniform2fv, NULL, 472),
- NAME_FUNC_OFFSET( 7006, glUniform2i, glUniform2i, NULL, 473),
- NAME_FUNC_OFFSET( 7018, glUniform2iv, glUniform2iv, NULL, 474),
- NAME_FUNC_OFFSET( 7031, glUniform3f, glUniform3f, NULL, 475),
- NAME_FUNC_OFFSET( 7043, glUniform3fv, glUniform3fv, NULL, 476),
- NAME_FUNC_OFFSET( 7056, glUniform3i, glUniform3i, NULL, 477),
- NAME_FUNC_OFFSET( 7068, glUniform3iv, glUniform3iv, NULL, 478),
- NAME_FUNC_OFFSET( 7081, glUniform4f, glUniform4f, NULL, 479),
- NAME_FUNC_OFFSET( 7093, glUniform4fv, glUniform4fv, NULL, 480),
- NAME_FUNC_OFFSET( 7106, glUniform4i, glUniform4i, NULL, 481),
- NAME_FUNC_OFFSET( 7118, glUniform4iv, glUniform4iv, NULL, 482),
- NAME_FUNC_OFFSET( 7131, glUniformMatrix2fv, glUniformMatrix2fv, NULL, 483),
- NAME_FUNC_OFFSET( 7150, glUniformMatrix3fv, glUniformMatrix3fv, NULL, 484),
- NAME_FUNC_OFFSET( 7169, glUniformMatrix4fv, glUniformMatrix4fv, NULL, 485),
- NAME_FUNC_OFFSET( 7188, glUseProgram, glUseProgram, NULL, 486),
- NAME_FUNC_OFFSET( 7201, glValidateProgram, glValidateProgram, NULL, 487),
- NAME_FUNC_OFFSET( 7219, glVertexAttrib1f, glVertexAttrib1f, NULL, 488),
- NAME_FUNC_OFFSET( 7236, glVertexAttrib1fv, glVertexAttrib1fv, NULL, 489),
- NAME_FUNC_OFFSET( 7254, glVertexAttrib2f, glVertexAttrib2f, NULL, 490),
- NAME_FUNC_OFFSET( 7271, glVertexAttrib2fv, glVertexAttrib2fv, NULL, 491),
- NAME_FUNC_OFFSET( 7289, glVertexAttrib3f, glVertexAttrib3f, NULL, 492),
- NAME_FUNC_OFFSET( 7306, glVertexAttrib3fv, glVertexAttrib3fv, NULL, 493),
- NAME_FUNC_OFFSET( 7324, glVertexAttrib4f, glVertexAttrib4f, NULL, 494),
- NAME_FUNC_OFFSET( 7341, glVertexAttrib4fv, glVertexAttrib4fv, NULL, 495),
- NAME_FUNC_OFFSET( 7359, glVertexAttribPointer, glVertexAttribPointer, NULL, 496),
- NAME_FUNC_OFFSET( 7381, glBlendFuncSeparate, glBlendFuncSeparate, NULL, 497),
- NAME_FUNC_OFFSET( 7401, glBindFramebuffer, glBindFramebuffer, NULL, 498),
- NAME_FUNC_OFFSET( 7419, glBindRenderbuffer, glBindRenderbuffer, NULL, 499),
- NAME_FUNC_OFFSET( 7438, glCheckFramebufferStatus, glCheckFramebufferStatus, NULL, 500),
- NAME_FUNC_OFFSET( 7463, glClearDepthf, glClearDepthf, NULL, 501),
- NAME_FUNC_OFFSET( 7477, glDeleteFramebuffers, glDeleteFramebuffers, NULL, 502),
- NAME_FUNC_OFFSET( 7498, glDeleteRenderbuffers, glDeleteRenderbuffers, NULL, 503),
- NAME_FUNC_OFFSET( 7520, glDepthRangef, glDepthRangef, NULL, 504),
- NAME_FUNC_OFFSET( 7534, glFramebufferRenderbuffer, glFramebufferRenderbuffer, NULL, 505),
- NAME_FUNC_OFFSET( 7560, glFramebufferTexture2D, glFramebufferTexture2D, NULL, 506),
- NAME_FUNC_OFFSET( 7583, glGenFramebuffers, glGenFramebuffers, NULL, 507),
- NAME_FUNC_OFFSET( 7601, glGenRenderbuffers, glGenRenderbuffers, NULL, 508),
- NAME_FUNC_OFFSET( 7620, glGenerateMipmap, glGenerateMipmap, NULL, 509),
- NAME_FUNC_OFFSET( 7637, glGetFramebufferAttachmentParameteriv, glGetFramebufferAttachmentParameteriv, NULL, 510),
- NAME_FUNC_OFFSET( 7675, glGetRenderbufferParameteriv, glGetRenderbufferParameteriv, NULL, 511),
- NAME_FUNC_OFFSET( 7704, glGetShaderPrecisionFormat, glGetShaderPrecisionFormat, NULL, 512),
- NAME_FUNC_OFFSET( 7731, glIsFramebuffer, glIsFramebuffer, NULL, 513),
- NAME_FUNC_OFFSET( 7747, glIsRenderbuffer, glIsRenderbuffer, NULL, 514),
- NAME_FUNC_OFFSET( 7764, glReleaseShaderCompiler, glReleaseShaderCompiler, NULL, 515),
- NAME_FUNC_OFFSET( 7788, glRenderbufferStorage, glRenderbufferStorage, NULL, 516),
- NAME_FUNC_OFFSET( 7810, glShaderBinary, glShaderBinary, NULL, 517),
- NAME_FUNC_OFFSET( 7825, glTexImage3DOES, glTexImage3DOES, NULL, 371),
- NAME_FUNC_OFFSET( 7838, glTexSubImage3DOES, glTexSubImage3DOES, NULL, 372),
- NAME_FUNC_OFFSET( 7854, glCopyTexSubImage3DOES, glCopyTexSubImage3DOES, NULL, 373),
- NAME_FUNC_OFFSET( 7874, glActiveTexture, glActiveTexture, NULL, 374),
- NAME_FUNC_OFFSET(-1, NULL, NULL, NULL, 0)
-};
-
-#undef NAME_FUNC_OFFSET
diff --git a/src/mapi/es2api/glapi_mapi_tmp.h b/src/mapi/es2api/glapi_mapi_tmp.h
new file mode 100644
index 00000000000..6941ca915c4
--- /dev/null
+++ b/src/mapi/es2api/glapi_mapi_tmp.h
@@ -0,0 +1,2632 @@
+/* This file is automatically generated by mapi_abi.py. Do not modify. */
+
+#ifndef _GLAPI_TMP_H_
+#define _GLAPI_TMP_H_
+typedef int GLfixed;
+typedef int GLclampx;
+#endif /* _GLAPI_TMP_H_ */
+
+#ifdef MAPI_TMP_DEFINES
+#define GL_GLEXT_PROTOTYPES
+#include "GL/gl.h"
+#include "GL/glext.h"
+
+void APIENTRY gl_dispatch_stub_0(GLuint list, GLenum mode);
+void APIENTRY gl_dispatch_stub_1(void);
+void APIENTRY gl_dispatch_stub_2(GLuint list);
+void APIENTRY gl_dispatch_stub_3(GLsizei n, GLenum type, const GLvoid *lists);
+void APIENTRY gl_dispatch_stub_4(GLuint list, GLsizei range);
+GLuint APIENTRY gl_dispatch_stub_5(GLsizei range);
+void APIENTRY gl_dispatch_stub_6(GLuint base);
+void APIENTRY gl_dispatch_stub_7(GLenum mode);
+void APIENTRY gl_dispatch_stub_8(GLsizei width, GLsizei height, GLfloat xorig, GLfloat yorig, GLfloat xmove, GLfloat ymove, const GLubyte *bitmap);
+void APIENTRY gl_dispatch_stub_9(GLbyte red, GLbyte green, GLbyte blue);
+void APIENTRY gl_dispatch_stub_10(const GLbyte *v);
+void APIENTRY gl_dispatch_stub_11(GLdouble red, GLdouble green, GLdouble blue);
+void APIENTRY gl_dispatch_stub_12(const GLdouble *v);
+void APIENTRY gl_dispatch_stub_13(GLfloat red, GLfloat green, GLfloat blue);
+void APIENTRY gl_dispatch_stub_14(const GLfloat *v);
+void APIENTRY gl_dispatch_stub_15(GLint red, GLint green, GLint blue);
+void APIENTRY gl_dispatch_stub_16(const GLint *v);
+void APIENTRY gl_dispatch_stub_17(GLshort red, GLshort green, GLshort blue);
+void APIENTRY gl_dispatch_stub_18(const GLshort *v);
+void APIENTRY gl_dispatch_stub_19(GLubyte red, GLubyte green, GLubyte blue);
+void APIENTRY gl_dispatch_stub_20(const GLubyte *v);
+void APIENTRY gl_dispatch_stub_21(GLuint red, GLuint green, GLuint blue);
+void APIENTRY gl_dispatch_stub_22(const GLuint *v);
+void APIENTRY gl_dispatch_stub_23(GLushort red, GLushort green, GLushort blue);
+void APIENTRY gl_dispatch_stub_24(const GLushort *v);
+void APIENTRY gl_dispatch_stub_25(GLbyte red, GLbyte green, GLbyte blue, GLbyte alpha);
+void APIENTRY gl_dispatch_stub_26(const GLbyte *v);
+void APIENTRY gl_dispatch_stub_27(GLdouble red, GLdouble green, GLdouble blue, GLdouble alpha);
+void APIENTRY gl_dispatch_stub_28(const GLdouble *v);
+void APIENTRY gl_dispatch_stub_29(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
+void APIENTRY gl_dispatch_stub_30(const GLfloat *v);
+void APIENTRY gl_dispatch_stub_31(GLint red, GLint green, GLint blue, GLint alpha);
+void APIENTRY gl_dispatch_stub_32(const GLint *v);
+void APIENTRY gl_dispatch_stub_33(GLshort red, GLshort green, GLshort blue, GLshort alpha);
+void APIENTRY gl_dispatch_stub_34(const GLshort *v);
+void APIENTRY gl_dispatch_stub_35(GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha);
+void APIENTRY gl_dispatch_stub_36(const GLubyte *v);
+void APIENTRY gl_dispatch_stub_37(GLuint red, GLuint green, GLuint blue, GLuint alpha);
+void APIENTRY gl_dispatch_stub_38(const GLuint *v);
+void APIENTRY gl_dispatch_stub_39(GLushort red, GLushort green, GLushort blue, GLushort alpha);
+void APIENTRY gl_dispatch_stub_40(const GLushort *v);
+void APIENTRY gl_dispatch_stub_41(GLboolean flag);
+void APIENTRY gl_dispatch_stub_42(const GLboolean *flag);
+void APIENTRY gl_dispatch_stub_43(void);
+void APIENTRY gl_dispatch_stub_44(GLdouble c);
+void APIENTRY gl_dispatch_stub_45(const GLdouble *c);
+void APIENTRY gl_dispatch_stub_46(GLfloat c);
+void APIENTRY gl_dispatch_stub_47(const GLfloat *c);
+void APIENTRY gl_dispatch_stub_48(GLint c);
+void APIENTRY gl_dispatch_stub_49(const GLint *c);
+void APIENTRY gl_dispatch_stub_50(GLshort c);
+void APIENTRY gl_dispatch_stub_51(const GLshort *c);
+void APIENTRY gl_dispatch_stub_52(GLbyte nx, GLbyte ny, GLbyte nz);
+void APIENTRY gl_dispatch_stub_53(const GLbyte *v);
+void APIENTRY gl_dispatch_stub_54(GLdouble nx, GLdouble ny, GLdouble nz);
+void APIENTRY gl_dispatch_stub_55(const GLdouble *v);
+void APIENTRY gl_dispatch_stub_56(GLfloat nx, GLfloat ny, GLfloat nz);
+void APIENTRY gl_dispatch_stub_57(const GLfloat *v);
+void APIENTRY gl_dispatch_stub_58(GLint nx, GLint ny, GLint nz);
+void APIENTRY gl_dispatch_stub_59(const GLint *v);
+void APIENTRY gl_dispatch_stub_60(GLshort nx, GLshort ny, GLshort nz);
+void APIENTRY gl_dispatch_stub_61(const GLshort *v);
+void APIENTRY gl_dispatch_stub_62(GLdouble x, GLdouble y);
+void APIENTRY gl_dispatch_stub_63(const GLdouble *v);
+void APIENTRY gl_dispatch_stub_64(GLfloat x, GLfloat y);
+void APIENTRY gl_dispatch_stub_65(const GLfloat *v);
+void APIENTRY gl_dispatch_stub_66(GLint x, GLint y);
+void APIENTRY gl_dispatch_stub_67(const GLint *v);
+void APIENTRY gl_dispatch_stub_68(GLshort x, GLshort y);
+void APIENTRY gl_dispatch_stub_69(const GLshort *v);
+void APIENTRY gl_dispatch_stub_70(GLdouble x, GLdouble y, GLdouble z);
+void APIENTRY gl_dispatch_stub_71(const GLdouble *v);
+void APIENTRY gl_dispatch_stub_72(GLfloat x, GLfloat y, GLfloat z);
+void APIENTRY gl_dispatch_stub_73(const GLfloat *v);
+void APIENTRY gl_dispatch_stub_74(GLint x, GLint y, GLint z);
+void APIENTRY gl_dispatch_stub_75(const GLint *v);
+void APIENTRY gl_dispatch_stub_76(GLshort x, GLshort y, GLshort z);
+void APIENTRY gl_dispatch_stub_77(const GLshort *v);
+void APIENTRY gl_dispatch_stub_78(GLdouble x, GLdouble y, GLdouble z, GLdouble w);
+void APIENTRY gl_dispatch_stub_79(const GLdouble *v);
+void APIENTRY gl_dispatch_stub_80(GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+void APIENTRY gl_dispatch_stub_81(const GLfloat *v);
+void APIENTRY gl_dispatch_stub_82(GLint x, GLint y, GLint z, GLint w);
+void APIENTRY gl_dispatch_stub_83(const GLint *v);
+void APIENTRY gl_dispatch_stub_84(GLshort x, GLshort y, GLshort z, GLshort w);
+void APIENTRY gl_dispatch_stub_85(const GLshort *v);
+void APIENTRY gl_dispatch_stub_86(GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2);
+void APIENTRY gl_dispatch_stub_87(const GLdouble *v1, const GLdouble *v2);
+void APIENTRY gl_dispatch_stub_88(GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2);
+void APIENTRY gl_dispatch_stub_89(const GLfloat *v1, const GLfloat *v2);
+void APIENTRY gl_dispatch_stub_90(GLint x1, GLint y1, GLint x2, GLint y2);
+void APIENTRY gl_dispatch_stub_91(const GLint *v1, const GLint *v2);
+void APIENTRY gl_dispatch_stub_92(GLshort x1, GLshort y1, GLshort x2, GLshort y2);
+void APIENTRY gl_dispatch_stub_93(const GLshort *v1, const GLshort *v2);
+void APIENTRY gl_dispatch_stub_94(GLdouble s);
+void APIENTRY gl_dispatch_stub_95(const GLdouble *v);
+void APIENTRY gl_dispatch_stub_96(GLfloat s);
+void APIENTRY gl_dispatch_stub_97(const GLfloat *v);
+void APIENTRY gl_dispatch_stub_98(GLint s);
+void APIENTRY gl_dispatch_stub_99(const GLint *v);
+void APIENTRY gl_dispatch_stub_100(GLshort s);
+void APIENTRY gl_dispatch_stub_101(const GLshort *v);
+void APIENTRY gl_dispatch_stub_102(GLdouble s, GLdouble t);
+void APIENTRY gl_dispatch_stub_103(const GLdouble *v);
+void APIENTRY gl_dispatch_stub_104(GLfloat s, GLfloat t);
+void APIENTRY gl_dispatch_stub_105(const GLfloat *v);
+void APIENTRY gl_dispatch_stub_106(GLint s, GLint t);
+void APIENTRY gl_dispatch_stub_107(const GLint *v);
+void APIENTRY gl_dispatch_stub_108(GLshort s, GLshort t);
+void APIENTRY gl_dispatch_stub_109(const GLshort *v);
+void APIENTRY gl_dispatch_stub_110(GLdouble s, GLdouble t, GLdouble r);
+void APIENTRY gl_dispatch_stub_111(const GLdouble *v);
+void APIENTRY gl_dispatch_stub_112(GLfloat s, GLfloat t, GLfloat r);
+void APIENTRY gl_dispatch_stub_113(const GLfloat *v);
+void APIENTRY gl_dispatch_stub_114(GLint s, GLint t, GLint r);
+void APIENTRY gl_dispatch_stub_115(const GLint *v);
+void APIENTRY gl_dispatch_stub_116(GLshort s, GLshort t, GLshort r);
+void APIENTRY gl_dispatch_stub_117(const GLshort *v);
+void APIENTRY gl_dispatch_stub_118(GLdouble s, GLdouble t, GLdouble r, GLdouble q);
+void APIENTRY gl_dispatch_stub_119(const GLdouble *v);
+void APIENTRY gl_dispatch_stub_120(GLfloat s, GLfloat t, GLfloat r, GLfloat q);
+void APIENTRY gl_dispatch_stub_121(const GLfloat *v);
+void APIENTRY gl_dispatch_stub_122(GLint s, GLint t, GLint r, GLint q);
+void APIENTRY gl_dispatch_stub_123(const GLint *v);
+void APIENTRY gl_dispatch_stub_124(GLshort s, GLshort t, GLshort r, GLshort q);
+void APIENTRY gl_dispatch_stub_125(const GLshort *v);
+void APIENTRY gl_dispatch_stub_126(GLdouble x, GLdouble y);
+void APIENTRY gl_dispatch_stub_127(const GLdouble *v);
+void APIENTRY gl_dispatch_stub_128(GLfloat x, GLfloat y);
+void APIENTRY gl_dispatch_stub_129(const GLfloat *v);
+void APIENTRY gl_dispatch_stub_130(GLint x, GLint y);
+void APIENTRY gl_dispatch_stub_131(const GLint *v);
+void APIENTRY gl_dispatch_stub_132(GLshort x, GLshort y);
+void APIENTRY gl_dispatch_stub_133(const GLshort *v);
+void APIENTRY gl_dispatch_stub_134(GLdouble x, GLdouble y, GLdouble z);
+void APIENTRY gl_dispatch_stub_135(const GLdouble *v);
+void APIENTRY gl_dispatch_stub_136(GLfloat x, GLfloat y, GLfloat z);
+void APIENTRY gl_dispatch_stub_137(const GLfloat *v);
+void APIENTRY gl_dispatch_stub_138(GLint x, GLint y, GLint z);
+void APIENTRY gl_dispatch_stub_139(const GLint *v);
+void APIENTRY gl_dispatch_stub_140(GLshort x, GLshort y, GLshort z);
+void APIENTRY gl_dispatch_stub_141(const GLshort *v);
+void APIENTRY gl_dispatch_stub_142(GLdouble x, GLdouble y, GLdouble z, GLdouble w);
+void APIENTRY gl_dispatch_stub_143(const GLdouble *v);
+void APIENTRY gl_dispatch_stub_144(GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+void APIENTRY gl_dispatch_stub_145(const GLfloat *v);
+void APIENTRY gl_dispatch_stub_146(GLint x, GLint y, GLint z, GLint w);
+void APIENTRY gl_dispatch_stub_147(const GLint *v);
+void APIENTRY gl_dispatch_stub_148(GLshort x, GLshort y, GLshort z, GLshort w);
+void APIENTRY gl_dispatch_stub_149(const GLshort *v);
+void APIENTRY gl_dispatch_stub_150(GLenum plane, const GLdouble *equation);
+void APIENTRY gl_dispatch_stub_151(GLenum face, GLenum mode);
+GLAPI void APIENTRY glCullFace(GLenum mode);
+void APIENTRY gl_dispatch_stub_153(GLenum pname, GLfloat param);
+void APIENTRY gl_dispatch_stub_154(GLenum pname, const GLfloat *params);
+void APIENTRY gl_dispatch_stub_155(GLenum pname, GLint param);
+void APIENTRY gl_dispatch_stub_156(GLenum pname, const GLint *params);
+GLAPI void APIENTRY glFrontFace(GLenum mode);
+GLAPI void APIENTRY glHint(GLenum target, GLenum mode);
+void APIENTRY gl_dispatch_stub_159(GLenum light, GLenum pname, GLfloat param);
+void APIENTRY gl_dispatch_stub_160(GLenum light, GLenum pname, const GLfloat *params);
+void APIENTRY gl_dispatch_stub_161(GLenum light, GLenum pname, GLint param);
+void APIENTRY gl_dispatch_stub_162(GLenum light, GLenum pname, const GLint *params);
+void APIENTRY gl_dispatch_stub_163(GLenum pname, GLfloat param);
+void APIENTRY gl_dispatch_stub_164(GLenum pname, const GLfloat *params);
+void APIENTRY gl_dispatch_stub_165(GLenum pname, GLint param);
+void APIENTRY gl_dispatch_stub_166(GLenum pname, const GLint *params);
+void APIENTRY gl_dispatch_stub_167(GLint factor, GLushort pattern);
+GLAPI void APIENTRY glLineWidth(GLfloat width);
+void APIENTRY gl_dispatch_stub_169(GLenum face, GLenum pname, GLfloat param);
+void APIENTRY gl_dispatch_stub_170(GLenum face, GLenum pname, const GLfloat *params);
+void APIENTRY gl_dispatch_stub_171(GLenum face, GLenum pname, GLint param);
+void APIENTRY gl_dispatch_stub_172(GLenum face, GLenum pname, const GLint *params);
+void APIENTRY gl_dispatch_stub_173(GLfloat size);
+void APIENTRY gl_dispatch_stub_174(GLenum face, GLenum mode);
+void APIENTRY gl_dispatch_stub_175(const GLubyte *mask);
+GLAPI void APIENTRY glScissor(GLint x, GLint y, GLsizei width, GLsizei height);
+void APIENTRY gl_dispatch_stub_177(GLenum mode);
+GLAPI void APIENTRY glTexParameterf(GLenum target, GLenum pname, GLfloat param);
+GLAPI void APIENTRY glTexParameterfv(GLenum target, GLenum pname, const GLfloat *params);
+GLAPI void APIENTRY glTexParameteri(GLenum target, GLenum pname, GLint param);
+GLAPI void APIENTRY glTexParameteriv(GLenum target, GLenum pname, const GLint *params);
+void APIENTRY gl_dispatch_stub_182(GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid *pixels);
+GLAPI void APIENTRY glTexImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels);
+void APIENTRY gl_dispatch_stub_184(GLenum target, GLenum pname, GLfloat param);
+void APIENTRY gl_dispatch_stub_185(GLenum target, GLenum pname, const GLfloat *params);
+void APIENTRY gl_dispatch_stub_186(GLenum target, GLenum pname, GLint param);
+void APIENTRY gl_dispatch_stub_187(GLenum target, GLenum pname, const GLint *params);
+void APIENTRY gl_dispatch_stub_188(GLenum coord, GLenum pname, GLdouble param);
+void APIENTRY gl_dispatch_stub_189(GLenum coord, GLenum pname, const GLdouble *params);
+void APIENTRY gl_dispatch_stub_190(GLenum coord, GLenum pname, GLfloat param);
+void APIENTRY gl_dispatch_stub_191(GLenum coord, GLenum pname, const GLfloat *params);
+void APIENTRY gl_dispatch_stub_192(GLenum coord, GLenum pname, GLint param);
+void APIENTRY gl_dispatch_stub_193(GLenum coord, GLenum pname, const GLint *params);
+void APIENTRY gl_dispatch_stub_194(GLsizei size, GLenum type, GLfloat *buffer);
+void APIENTRY gl_dispatch_stub_195(GLsizei size, GLuint *buffer);
+GLint APIENTRY gl_dispatch_stub_196(GLenum mode);
+void APIENTRY gl_dispatch_stub_197(void);
+void APIENTRY gl_dispatch_stub_198(GLuint name);
+void APIENTRY gl_dispatch_stub_199(GLfloat token);
+void APIENTRY gl_dispatch_stub_200(void);
+void APIENTRY gl_dispatch_stub_201(GLuint name);
+void APIENTRY gl_dispatch_stub_202(GLenum mode);
+GLAPI void APIENTRY glClear(GLbitfield mask);
+void APIENTRY gl_dispatch_stub_204(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
+void APIENTRY gl_dispatch_stub_205(GLfloat c);
+GLAPI void APIENTRY glClearColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
+GLAPI void APIENTRY glClearStencil(GLint s);
+void APIENTRY gl_dispatch_stub_208(GLclampd depth);
+GLAPI void APIENTRY glStencilMask(GLuint mask);
+GLAPI void APIENTRY glColorMask(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
+GLAPI void APIENTRY glDepthMask(GLboolean flag);
+void APIENTRY gl_dispatch_stub_212(GLuint mask);
+void APIENTRY gl_dispatch_stub_213(GLenum op, GLfloat value);
+GLAPI void APIENTRY glDisable(GLenum cap);
+GLAPI void APIENTRY glEnable(GLenum cap);
+GLAPI void APIENTRY glFinish(void);
+GLAPI void APIENTRY glFlush(void);
+void APIENTRY gl_dispatch_stub_218(void);
+void APIENTRY gl_dispatch_stub_219(GLbitfield mask);
+void APIENTRY gl_dispatch_stub_220(GLenum target, GLdouble u1, GLdouble u2, GLint stride, GLint order, const GLdouble *points);
+void APIENTRY gl_dispatch_stub_221(GLenum target, GLfloat u1, GLfloat u2, GLint stride, GLint order, const GLfloat *points);
+void APIENTRY gl_dispatch_stub_222(GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, const GLdouble *points);
+void APIENTRY gl_dispatch_stub_223(GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, const GLfloat *points);
+void APIENTRY gl_dispatch_stub_224(GLint un, GLdouble u1, GLdouble u2);
+void APIENTRY gl_dispatch_stub_225(GLint un, GLfloat u1, GLfloat u2);
+void APIENTRY gl_dispatch_stub_226(GLint un, GLdouble u1, GLdouble u2, GLint vn, GLdouble v1, GLdouble v2);
+void APIENTRY gl_dispatch_stub_227(GLint un, GLfloat u1, GLfloat u2, GLint vn, GLfloat v1, GLfloat v2);
+void APIENTRY gl_dispatch_stub_228(GLdouble u);
+void APIENTRY gl_dispatch_stub_229(const GLdouble *u);
+void APIENTRY gl_dispatch_stub_230(GLfloat u);
+void APIENTRY gl_dispatch_stub_231(const GLfloat *u);
+void APIENTRY gl_dispatch_stub_232(GLdouble u, GLdouble v);
+void APIENTRY gl_dispatch_stub_233(const GLdouble *u);
+void APIENTRY gl_dispatch_stub_234(GLfloat u, GLfloat v);
+void APIENTRY gl_dispatch_stub_235(const GLfloat *u);
+void APIENTRY gl_dispatch_stub_236(GLenum mode, GLint i1, GLint i2);
+void APIENTRY gl_dispatch_stub_237(GLint i);
+void APIENTRY gl_dispatch_stub_238(GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2);
+void APIENTRY gl_dispatch_stub_239(GLint i, GLint j);
+void APIENTRY gl_dispatch_stub_240(GLenum func, GLclampf ref);
+GLAPI void APIENTRY glBlendFunc(GLenum sfactor, GLenum dfactor);
+void APIENTRY gl_dispatch_stub_242(GLenum opcode);
+GLAPI void APIENTRY glStencilFunc(GLenum func, GLint ref, GLuint mask);
+GLAPI void APIENTRY glStencilOp(GLenum fail, GLenum zfail, GLenum zpass);
+GLAPI void APIENTRY glDepthFunc(GLenum func);
+void APIENTRY gl_dispatch_stub_246(GLfloat xfactor, GLfloat yfactor);
+void APIENTRY gl_dispatch_stub_247(GLenum pname, GLfloat param);
+void APIENTRY gl_dispatch_stub_248(GLenum pname, GLint param);
+void APIENTRY gl_dispatch_stub_249(GLenum pname, GLfloat param);
+GLAPI void APIENTRY glPixelStorei(GLenum pname, GLint param);
+void APIENTRY gl_dispatch_stub_251(GLenum map, GLsizei mapsize, const GLfloat *values);
+void APIENTRY gl_dispatch_stub_252(GLenum map, GLsizei mapsize, const GLuint *values);
+void APIENTRY gl_dispatch_stub_253(GLenum map, GLsizei mapsize, const GLushort *values);
+void APIENTRY gl_dispatch_stub_254(GLenum mode);
+void APIENTRY gl_dispatch_stub_255(GLint x, GLint y, GLsizei width, GLsizei height, GLenum type);
+GLAPI void APIENTRY glReadPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels);
+void APIENTRY gl_dispatch_stub_257(GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels);
+GLAPI void APIENTRY glGetBooleanv(GLenum pname, GLboolean *params);
+void APIENTRY gl_dispatch_stub_259(GLenum plane, GLdouble *equation);
+void APIENTRY gl_dispatch_stub_260(GLenum pname, GLdouble *params);
+GLAPI GLenum APIENTRY glGetError(void);
+GLAPI void APIENTRY glGetFloatv(GLenum pname, GLfloat *params);
+GLAPI void APIENTRY glGetIntegerv(GLenum pname, GLint *params);
+void APIENTRY gl_dispatch_stub_264(GLenum light, GLenum pname, GLfloat *params);
+void APIENTRY gl_dispatch_stub_265(GLenum light, GLenum pname, GLint *params);
+void APIENTRY gl_dispatch_stub_266(GLenum target, GLenum query, GLdouble *v);
+void APIENTRY gl_dispatch_stub_267(GLenum target, GLenum query, GLfloat *v);
+void APIENTRY gl_dispatch_stub_268(GLenum target, GLenum query, GLint *v);
+void APIENTRY gl_dispatch_stub_269(GLenum face, GLenum pname, GLfloat *params);
+void APIENTRY gl_dispatch_stub_270(GLenum face, GLenum pname, GLint *params);
+void APIENTRY gl_dispatch_stub_271(GLenum map, GLfloat *values);
+void APIENTRY gl_dispatch_stub_272(GLenum map, GLuint *values);
+void APIENTRY gl_dispatch_stub_273(GLenum map, GLushort *values);
+void APIENTRY gl_dispatch_stub_274(GLubyte *mask);
+GLAPI const GLubyte * APIENTRY glGetString(GLenum name);
+void APIENTRY gl_dispatch_stub_276(GLenum target, GLenum pname, GLfloat *params);
+void APIENTRY gl_dispatch_stub_277(GLenum target, GLenum pname, GLint *params);
+void APIENTRY gl_dispatch_stub_278(GLenum coord, GLenum pname, GLdouble *params);
+void APIENTRY gl_dispatch_stub_279(GLenum coord, GLenum pname, GLfloat *params);
+void APIENTRY gl_dispatch_stub_280(GLenum coord, GLenum pname, GLint *params);
+void APIENTRY gl_dispatch_stub_281(GLenum target, GLint level, GLenum format, GLenum type, GLvoid *pixels);
+GLAPI void APIENTRY glGetTexParameterfv(GLenum target, GLenum pname, GLfloat *params);
+GLAPI void APIENTRY glGetTexParameteriv(GLenum target, GLenum pname, GLint *params);
+void APIENTRY gl_dispatch_stub_284(GLenum target, GLint level, GLenum pname, GLfloat *params);
+void APIENTRY gl_dispatch_stub_285(GLenum target, GLint level, GLenum pname, GLint *params);
+GLAPI GLboolean APIENTRY glIsEnabled(GLenum cap);
+GLboolean APIENTRY gl_dispatch_stub_287(GLuint list);
+void APIENTRY gl_dispatch_stub_288(GLclampd zNear, GLclampd zFar);
+void APIENTRY gl_dispatch_stub_289(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar);
+void APIENTRY gl_dispatch_stub_290(void);
+void APIENTRY gl_dispatch_stub_291(const GLfloat *m);
+void APIENTRY gl_dispatch_stub_292(const GLdouble *m);
+void APIENTRY gl_dispatch_stub_293(GLenum mode);
+void APIENTRY gl_dispatch_stub_294(const GLfloat *m);
+void APIENTRY gl_dispatch_stub_295(const GLdouble *m);
+void APIENTRY gl_dispatch_stub_296(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar);
+void APIENTRY gl_dispatch_stub_297(void);
+void APIENTRY gl_dispatch_stub_298(void);
+void APIENTRY gl_dispatch_stub_299(GLdouble angle, GLdouble x, GLdouble y, GLdouble z);
+void APIENTRY gl_dispatch_stub_300(GLfloat angle, GLfloat x, GLfloat y, GLfloat z);
+void APIENTRY gl_dispatch_stub_301(GLdouble x, GLdouble y, GLdouble z);
+void APIENTRY gl_dispatch_stub_302(GLfloat x, GLfloat y, GLfloat z);
+void APIENTRY gl_dispatch_stub_303(GLdouble x, GLdouble y, GLdouble z);
+void APIENTRY gl_dispatch_stub_304(GLfloat x, GLfloat y, GLfloat z);
+GLAPI void APIENTRY glViewport(GLint x, GLint y, GLsizei width, GLsizei height);
+void APIENTRY gl_dispatch_stub_306(GLint i);
+GLAPI void APIENTRY glBindTexture(GLenum target, GLuint texture);
+void APIENTRY gl_dispatch_stub_308(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
+void APIENTRY gl_dispatch_stub_309(GLenum array);
+GLAPI void APIENTRY glDrawArrays(GLenum mode, GLint first, GLsizei count);
+GLAPI void APIENTRY glDrawElements(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices);
+void APIENTRY gl_dispatch_stub_312(GLsizei stride, const GLvoid *pointer);
+void APIENTRY gl_dispatch_stub_313(GLenum array);
+void APIENTRY gl_dispatch_stub_314(GLenum type, GLsizei stride, const GLvoid *pointer);
+void APIENTRY gl_dispatch_stub_315(GLubyte c);
+void APIENTRY gl_dispatch_stub_316(const GLubyte *c);
+void APIENTRY gl_dispatch_stub_317(GLenum format, GLsizei stride, const GLvoid *pointer);
+void APIENTRY gl_dispatch_stub_318(GLenum type, GLsizei stride, const GLvoid *pointer);
+GLAPI void APIENTRY glPolygonOffset(GLfloat factor, GLfloat units);
+void APIENTRY gl_dispatch_stub_320(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
+void APIENTRY gl_dispatch_stub_321(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
+GLboolean APIENTRY gl_dispatch_stub_322(GLsizei n, const GLuint *textures, GLboolean *residences);
+void APIENTRY gl_dispatch_stub_323(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border);
+GLAPI void APIENTRY glCopyTexImage2D(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
+void APIENTRY gl_dispatch_stub_325(GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width);
+GLAPI void APIENTRY glCopyTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
+GLAPI void APIENTRY glDeleteTextures(GLsizei n, const GLuint *textures);
+GLAPI void APIENTRY glGenTextures(GLsizei n, GLuint *textures);
+void APIENTRY gl_dispatch_stub_329(GLenum pname, GLvoid **params);
+GLAPI GLboolean APIENTRY glIsTexture(GLuint texture);
+void APIENTRY gl_dispatch_stub_331(GLsizei n, const GLuint *textures, const GLclampf *priorities);
+void APIENTRY gl_dispatch_stub_332(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels);
+GLAPI void APIENTRY glTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels);
+void APIENTRY gl_dispatch_stub_334(void);
+void APIENTRY gl_dispatch_stub_335(GLbitfield mask);
+GLAPI void APIENTRY glBlendColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
+GLAPI void APIENTRY glBlendEquation(GLenum mode);
+void APIENTRY gl_dispatch_stub_338(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices);
+void APIENTRY gl_dispatch_stub_339(GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *table);
+void APIENTRY gl_dispatch_stub_340(GLenum target, GLenum pname, const GLfloat *params);
+void APIENTRY gl_dispatch_stub_341(GLenum target, GLenum pname, const GLint *params);
+void APIENTRY gl_dispatch_stub_342(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
+void APIENTRY gl_dispatch_stub_343(GLenum target, GLenum format, GLenum type, GLvoid *table);
+void APIENTRY gl_dispatch_stub_344(GLenum target, GLenum pname, GLfloat *params);
+void APIENTRY gl_dispatch_stub_345(GLenum target, GLenum pname, GLint *params);
+void APIENTRY gl_dispatch_stub_346(GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid *data);
+void APIENTRY gl_dispatch_stub_347(GLenum target, GLsizei start, GLint x, GLint y, GLsizei width);
+void APIENTRY gl_dispatch_stub_348(GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *image);
+void APIENTRY gl_dispatch_stub_349(GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *image);
+void APIENTRY gl_dispatch_stub_350(GLenum target, GLenum pname, GLfloat params);
+void APIENTRY gl_dispatch_stub_351(GLenum target, GLenum pname, const GLfloat *params);
+void APIENTRY gl_dispatch_stub_352(GLenum target, GLenum pname, GLint params);
+void APIENTRY gl_dispatch_stub_353(GLenum target, GLenum pname, const GLint *params);
+void APIENTRY gl_dispatch_stub_354(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
+void APIENTRY gl_dispatch_stub_355(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height);
+void APIENTRY gl_dispatch_stub_356(GLenum target, GLenum format, GLenum type, GLvoid *image);
+void APIENTRY gl_dispatch_stub_357(GLenum target, GLenum pname, GLfloat *params);
+void APIENTRY gl_dispatch_stub_358(GLenum target, GLenum pname, GLint *params);
+void APIENTRY gl_dispatch_stub_359(GLenum target, GLenum format, GLenum type, GLvoid *row, GLvoid *column, GLvoid *span);
+void APIENTRY gl_dispatch_stub_360(GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *row, const GLvoid *column);
+void APIENTRY gl_dispatch_stub_361(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values);
+void APIENTRY gl_dispatch_stub_362(GLenum target, GLenum pname, GLfloat *params);
+void APIENTRY gl_dispatch_stub_363(GLenum target, GLenum pname, GLint *params);
+void APIENTRY gl_dispatch_stub_364(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values);
+void APIENTRY gl_dispatch_stub_365(GLenum target, GLenum pname, GLfloat *params);
+void APIENTRY gl_dispatch_stub_366(GLenum target, GLenum pname, GLint *params);
+void APIENTRY gl_dispatch_stub_367(GLenum target, GLsizei width, GLenum internalformat, GLboolean sink);
+void APIENTRY gl_dispatch_stub_368(GLenum target, GLenum internalformat, GLboolean sink);
+void APIENTRY gl_dispatch_stub_369(GLenum target);
+void APIENTRY gl_dispatch_stub_370(GLenum target);
+void APIENTRY gl_dispatch_stub_371(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels);
+GLAPI void APIENTRY glTexImage3DOES(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels);
+void APIENTRY gl_dispatch_stub_372(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels);
+GLAPI void APIENTRY glTexSubImage3DOES(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels);
+void APIENTRY gl_dispatch_stub_373(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
+GLAPI void APIENTRY glCopyTexSubImage3DOES(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
+void APIENTRY gl_dispatch_stub_374(GLenum texture);
+GLAPI void APIENTRY glActiveTexture(GLenum texture);
+void APIENTRY gl_dispatch_stub_375(GLenum texture);
+void APIENTRY gl_dispatch_stub_376(GLenum target, GLdouble s);
+void APIENTRY gl_dispatch_stub_377(GLenum target, const GLdouble *v);
+void APIENTRY gl_dispatch_stub_378(GLenum target, GLfloat s);
+void APIENTRY gl_dispatch_stub_379(GLenum target, const GLfloat *v);
+void APIENTRY gl_dispatch_stub_380(GLenum target, GLint s);
+void APIENTRY gl_dispatch_stub_381(GLenum target, const GLint *v);
+void APIENTRY gl_dispatch_stub_382(GLenum target, GLshort s);
+void APIENTRY gl_dispatch_stub_383(GLenum target, const GLshort *v);
+void APIENTRY gl_dispatch_stub_384(GLenum target, GLdouble s, GLdouble t);
+void APIENTRY gl_dispatch_stub_385(GLenum target, const GLdouble *v);
+void APIENTRY gl_dispatch_stub_386(GLenum target, GLfloat s, GLfloat t);
+void APIENTRY gl_dispatch_stub_387(GLenum target, const GLfloat *v);
+void APIENTRY gl_dispatch_stub_388(GLenum target, GLint s, GLint t);
+void APIENTRY gl_dispatch_stub_389(GLenum target, const GLint *v);
+void APIENTRY gl_dispatch_stub_390(GLenum target, GLshort s, GLshort t);
+void APIENTRY gl_dispatch_stub_391(GLenum target, const GLshort *v);
+void APIENTRY gl_dispatch_stub_392(GLenum target, GLdouble s, GLdouble t, GLdouble r);
+void APIENTRY gl_dispatch_stub_393(GLenum target, const GLdouble *v);
+void APIENTRY gl_dispatch_stub_394(GLenum target, GLfloat s, GLfloat t, GLfloat r);
+void APIENTRY gl_dispatch_stub_395(GLenum target, const GLfloat *v);
+void APIENTRY gl_dispatch_stub_396(GLenum target, GLint s, GLint t, GLint r);
+void APIENTRY gl_dispatch_stub_397(GLenum target, const GLint *v);
+void APIENTRY gl_dispatch_stub_398(GLenum target, GLshort s, GLshort t, GLshort r);
+void APIENTRY gl_dispatch_stub_399(GLenum target, const GLshort *v);
+void APIENTRY gl_dispatch_stub_400(GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q);
+void APIENTRY gl_dispatch_stub_401(GLenum target, const GLdouble *v);
+void APIENTRY gl_dispatch_stub_402(GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);
+void APIENTRY gl_dispatch_stub_403(GLenum target, const GLfloat *v);
+void APIENTRY gl_dispatch_stub_404(GLenum target, GLint s, GLint t, GLint r, GLint q);
+void APIENTRY gl_dispatch_stub_405(GLenum target, const GLint *v);
+void APIENTRY gl_dispatch_stub_406(GLenum target, GLshort s, GLshort t, GLshort r, GLshort q);
+void APIENTRY gl_dispatch_stub_407(GLenum target, const GLshort *v);
+GLAPI void APIENTRY glAttachShader(GLuint program, GLuint shader);
+GLAPI GLuint APIENTRY glCreateProgram(void);
+GLAPI GLuint APIENTRY glCreateShader(GLenum type);
+GLAPI void APIENTRY glDeleteProgram(GLuint program);
+GLAPI void APIENTRY glDeleteShader(GLuint program);
+GLAPI void APIENTRY glDetachShader(GLuint program, GLuint shader);
+GLAPI void APIENTRY glGetAttachedShaders(GLuint program, GLsizei maxCount, GLsizei *count, GLuint *obj);
+GLAPI void APIENTRY glGetProgramInfoLog(GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
+GLAPI void APIENTRY glGetProgramiv(GLuint program, GLenum pname, GLint *params);
+GLAPI void APIENTRY glGetShaderInfoLog(GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
+GLAPI void APIENTRY glGetShaderiv(GLuint shader, GLenum pname, GLint *params);
+GLAPI GLboolean APIENTRY glIsProgram(GLuint program);
+GLAPI GLboolean APIENTRY glIsShader(GLuint shader);
+GLAPI void APIENTRY glStencilFuncSeparate(GLenum face, GLenum func, GLint ref, GLuint mask);
+GLAPI void APIENTRY glStencilMaskSeparate(GLenum face, GLuint mask);
+GLAPI void APIENTRY glStencilOpSeparate(GLenum face, GLenum sfail, GLenum zfail, GLenum zpass);
+void APIENTRY gl_dispatch_stub_424(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+void APIENTRY gl_dispatch_stub_425(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+void APIENTRY gl_dispatch_stub_426(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+void APIENTRY gl_dispatch_stub_427(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+void APIENTRY gl_dispatch_stub_428(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+void APIENTRY gl_dispatch_stub_429(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+void APIENTRY gl_dispatch_stub_430(GLenum target, GLenum clamp);
+void APIENTRY gl_dispatch_stub_431(GLenum buffer, GLint drawbuffer, const GLfloat depth, const GLint stencil);
+void APIENTRY gl_dispatch_stub_432(GLenum buffer, GLint drawbuffer, const GLfloat *value);
+void APIENTRY gl_dispatch_stub_433(GLenum buffer, GLint drawbuffer, const GLint *value);
+void APIENTRY gl_dispatch_stub_434(GLenum buffer, GLint drawbuffer, const GLuint *value);
+const GLubyte * APIENTRY gl_dispatch_stub_435(GLenum name, GLuint index);
+void APIENTRY gl_dispatch_stub_436(GLenum target, GLenum internalFormat, GLuint buffer);
+void APIENTRY gl_dispatch_stub_437(GLenum target, GLenum attachment, GLuint texture, GLint level);
+void APIENTRY gl_dispatch_stub_438(GLenum target, GLenum pname, GLint64 *params);
+void APIENTRY gl_dispatch_stub_439(GLenum cap, GLuint index, GLint64 *data);
+void APIENTRY gl_dispatch_stub_440(GLuint index, GLuint divisor);
+void APIENTRY gl_dispatch_stub_441(const GLdouble *m);
+void APIENTRY gl_dispatch_stub_442(const GLfloat *m);
+void APIENTRY gl_dispatch_stub_443(const GLdouble *m);
+void APIENTRY gl_dispatch_stub_444(const GLfloat *m);
+void APIENTRY gl_dispatch_stub_445(GLclampf value, GLboolean invert);
+GLAPI void APIENTRY glSampleCoverage(GLclampf value, GLboolean invert);
+void APIENTRY gl_dispatch_stub_446(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data);
+void APIENTRY gl_dispatch_stub_447(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data);
+GLAPI void APIENTRY glCompressedTexImage2D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data);
+void APIENTRY gl_dispatch_stub_448(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data);
+GLAPI void APIENTRY glCompressedTexImage3DOES(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data);
+void APIENTRY gl_dispatch_stub_449(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data);
+void APIENTRY gl_dispatch_stub_450(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data);
+GLAPI void APIENTRY glCompressedTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data);
+void APIENTRY gl_dispatch_stub_451(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data);
+GLAPI void APIENTRY glCompressedTexSubImage3DOES(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data);
+void APIENTRY gl_dispatch_stub_452(GLenum target, GLint level, GLvoid *img);
+void APIENTRY gl_dispatch_stub_453(GLuint index);
+GLAPI void APIENTRY glDisableVertexAttribArray(GLuint index);
+void APIENTRY gl_dispatch_stub_454(GLuint index);
+GLAPI void APIENTRY glEnableVertexAttribArray(GLuint index);
+void APIENTRY gl_dispatch_stub_455(GLenum target, GLuint index, GLdouble *params);
+void APIENTRY gl_dispatch_stub_456(GLenum target, GLuint index, GLfloat *params);
+void APIENTRY gl_dispatch_stub_457(GLenum target, GLuint index, GLdouble *params);
+void APIENTRY gl_dispatch_stub_458(GLenum target, GLuint index, GLfloat *params);
+void APIENTRY gl_dispatch_stub_459(GLenum target, GLenum pname, GLvoid *string);
+void APIENTRY gl_dispatch_stub_460(GLenum target, GLenum pname, GLint *params);
+void APIENTRY gl_dispatch_stub_461(GLuint index, GLenum pname, GLdouble *params);
+void APIENTRY gl_dispatch_stub_462(GLuint index, GLenum pname, GLfloat *params);
+GLAPI void APIENTRY glGetVertexAttribfv(GLuint index, GLenum pname, GLfloat *params);
+void APIENTRY gl_dispatch_stub_463(GLuint index, GLenum pname, GLint *params);
+GLAPI void APIENTRY glGetVertexAttribiv(GLuint index, GLenum pname, GLint *params);
+void APIENTRY gl_dispatch_stub_464(GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
+void APIENTRY gl_dispatch_stub_465(GLenum target, GLuint index, const GLdouble *params);
+void APIENTRY gl_dispatch_stub_466(GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+void APIENTRY gl_dispatch_stub_467(GLenum target, GLuint index, const GLfloat *params);
+void APIENTRY gl_dispatch_stub_468(GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
+void APIENTRY gl_dispatch_stub_469(GLenum target, GLuint index, const GLdouble *params);
+void APIENTRY gl_dispatch_stub_470(GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+void APIENTRY gl_dispatch_stub_471(GLenum target, GLuint index, const GLfloat *params);
+void APIENTRY gl_dispatch_stub_472(GLenum target, GLenum format, GLsizei len, const GLvoid *string);
+void APIENTRY gl_dispatch_stub_473(GLuint index, GLdouble x);
+void APIENTRY gl_dispatch_stub_474(GLuint index, const GLdouble *v);
+void APIENTRY gl_dispatch_stub_475(GLuint index, GLfloat x);
+GLAPI void APIENTRY glVertexAttrib1f(GLuint index, GLfloat x);
+void APIENTRY gl_dispatch_stub_476(GLuint index, const GLfloat *v);
+GLAPI void APIENTRY glVertexAttrib1fv(GLuint index, const GLfloat *v);
+void APIENTRY gl_dispatch_stub_477(GLuint index, GLshort x);
+void APIENTRY gl_dispatch_stub_478(GLuint index, const GLshort *v);
+void APIENTRY gl_dispatch_stub_479(GLuint index, GLdouble x, GLdouble y);
+void APIENTRY gl_dispatch_stub_480(GLuint index, const GLdouble *v);
+void APIENTRY gl_dispatch_stub_481(GLuint index, GLfloat x, GLfloat y);
+GLAPI void APIENTRY glVertexAttrib2f(GLuint index, GLfloat x, GLfloat y);
+void APIENTRY gl_dispatch_stub_482(GLuint index, const GLfloat *v);
+GLAPI void APIENTRY glVertexAttrib2fv(GLuint index, const GLfloat *v);
+void APIENTRY gl_dispatch_stub_483(GLuint index, GLshort x, GLshort y);
+void APIENTRY gl_dispatch_stub_484(GLuint index, const GLshort *v);
+void APIENTRY gl_dispatch_stub_485(GLuint index, GLdouble x, GLdouble y, GLdouble z);
+void APIENTRY gl_dispatch_stub_486(GLuint index, const GLdouble *v);
+void APIENTRY gl_dispatch_stub_487(GLuint index, GLfloat x, GLfloat y, GLfloat z);
+GLAPI void APIENTRY glVertexAttrib3f(GLuint index, GLfloat x, GLfloat y, GLfloat z);
+void APIENTRY gl_dispatch_stub_488(GLuint index, const GLfloat *v);
+GLAPI void APIENTRY glVertexAttrib3fv(GLuint index, const GLfloat *v);
+void APIENTRY gl_dispatch_stub_489(GLuint index, GLshort x, GLshort y, GLshort z);
+void APIENTRY gl_dispatch_stub_490(GLuint index, const GLshort *v);
+void APIENTRY gl_dispatch_stub_491(GLuint index, const GLbyte *v);
+void APIENTRY gl_dispatch_stub_492(GLuint index, const GLint *v);
+void APIENTRY gl_dispatch_stub_493(GLuint index, const GLshort *v);
+void APIENTRY gl_dispatch_stub_494(GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w);
+void APIENTRY gl_dispatch_stub_495(GLuint index, const GLubyte *v);
+void APIENTRY gl_dispatch_stub_496(GLuint index, const GLuint *v);
+void APIENTRY gl_dispatch_stub_497(GLuint index, const GLushort *v);
+void APIENTRY gl_dispatch_stub_498(GLuint index, const GLbyte *v);
+void APIENTRY gl_dispatch_stub_499(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
+void APIENTRY gl_dispatch_stub_500(GLuint index, const GLdouble *v);
+void APIENTRY gl_dispatch_stub_501(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+GLAPI void APIENTRY glVertexAttrib4f(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+void APIENTRY gl_dispatch_stub_502(GLuint index, const GLfloat *v);
+GLAPI void APIENTRY glVertexAttrib4fv(GLuint index, const GLfloat *v);
+void APIENTRY gl_dispatch_stub_503(GLuint index, const GLint *v);
+void APIENTRY gl_dispatch_stub_504(GLuint index, GLshort x, GLshort y, GLshort z, GLshort w);
+void APIENTRY gl_dispatch_stub_505(GLuint index, const GLshort *v);
+void APIENTRY gl_dispatch_stub_506(GLuint index, const GLubyte *v);
+void APIENTRY gl_dispatch_stub_507(GLuint index, const GLuint *v);
+void APIENTRY gl_dispatch_stub_508(GLuint index, const GLushort *v);
+void APIENTRY gl_dispatch_stub_509(GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *pointer);
+GLAPI void APIENTRY glVertexAttribPointer(GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *pointer);
+void APIENTRY gl_dispatch_stub_510(GLenum target, GLuint buffer);
+GLAPI void APIENTRY glBindBuffer(GLenum target, GLuint buffer);
+void APIENTRY gl_dispatch_stub_511(GLenum target, GLsizeiptrARB size, const GLvoid *data, GLenum usage);
+GLAPI void APIENTRY glBufferData(GLenum target, GLsizeiptr size, const GLvoid *data, GLenum usage);
+void APIENTRY gl_dispatch_stub_512(GLenum target, GLintptrARB offset, GLsizeiptrARB size, const GLvoid *data);
+GLAPI void APIENTRY glBufferSubData(GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid *data);
+void APIENTRY gl_dispatch_stub_513(GLsizei n, const GLuint *buffer);
+GLAPI void APIENTRY glDeleteBuffers(GLsizei n, const GLuint *buffer);
+void APIENTRY gl_dispatch_stub_514(GLsizei n, GLuint *buffer);
+GLAPI void APIENTRY glGenBuffers(GLsizei n, GLuint *buffer);
+void APIENTRY gl_dispatch_stub_515(GLenum target, GLenum pname, GLint *params);
+GLAPI void APIENTRY glGetBufferParameteriv(GLenum target, GLenum pname, GLint *params);
+void APIENTRY gl_dispatch_stub_516(GLenum target, GLenum pname, GLvoid **params);
+GLAPI void APIENTRY glGetBufferPointervOES(GLenum target, GLenum pname, GLvoid **params);
+void APIENTRY gl_dispatch_stub_517(GLenum target, GLintptrARB offset, GLsizeiptrARB size, GLvoid *data);
+GLboolean APIENTRY gl_dispatch_stub_518(GLuint buffer);
+GLAPI GLboolean APIENTRY glIsBuffer(GLuint buffer);
+GLvoid * APIENTRY gl_dispatch_stub_519(GLenum target, GLenum access);
+GLAPI GLvoid * APIENTRY glMapBufferOES(GLenum target, GLenum access);
+GLboolean APIENTRY gl_dispatch_stub_520(GLenum target);
+GLAPI GLboolean APIENTRY glUnmapBufferOES(GLenum target);
+void APIENTRY gl_dispatch_stub_521(GLenum target, GLuint id);
+void APIENTRY gl_dispatch_stub_522(GLsizei n, const GLuint *ids);
+void APIENTRY gl_dispatch_stub_523(GLenum target);
+void APIENTRY gl_dispatch_stub_524(GLsizei n, GLuint *ids);
+void APIENTRY gl_dispatch_stub_525(GLuint id, GLenum pname, GLint *params);
+void APIENTRY gl_dispatch_stub_526(GLuint id, GLenum pname, GLuint *params);
+void APIENTRY gl_dispatch_stub_527(GLenum target, GLenum pname, GLint *params);
+GLboolean APIENTRY gl_dispatch_stub_528(GLuint id);
+void APIENTRY gl_dispatch_stub_529(GLhandleARB containerObj, GLhandleARB obj);
+void APIENTRY gl_dispatch_stub_530(GLhandleARB shader);
+GLAPI void APIENTRY glCompileShader(GLuint shader);
+GLhandleARB APIENTRY gl_dispatch_stub_531(void);
+GLhandleARB APIENTRY gl_dispatch_stub_532(GLenum shaderType);
+void APIENTRY gl_dispatch_stub_533(GLhandleARB obj);
+void APIENTRY gl_dispatch_stub_534(GLhandleARB containerObj, GLhandleARB attachedObj);
+void APIENTRY gl_dispatch_stub_535(GLhandleARB program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name);
+GLAPI void APIENTRY glGetActiveUniform(GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name);
+void APIENTRY gl_dispatch_stub_536(GLhandleARB containerObj, GLsizei maxLength, GLsizei *length, GLhandleARB *infoLog);
+GLhandleARB APIENTRY gl_dispatch_stub_537(GLenum pname);
+void APIENTRY gl_dispatch_stub_538(GLhandleARB obj, GLsizei maxLength, GLsizei *length, GLcharARB *infoLog);
+void APIENTRY gl_dispatch_stub_539(GLhandleARB obj, GLenum pname, GLfloat *params);
+void APIENTRY gl_dispatch_stub_540(GLhandleARB obj, GLenum pname, GLint *params);
+void APIENTRY gl_dispatch_stub_541(GLhandleARB shader, GLsizei bufSize, GLsizei *length, GLcharARB *source);
+GLAPI void APIENTRY glGetShaderSource(GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source);
+GLint APIENTRY gl_dispatch_stub_542(GLhandleARB program, const GLcharARB *name);
+GLAPI GLint APIENTRY glGetUniformLocation(GLuint program, const GLchar *name);
+void APIENTRY gl_dispatch_stub_543(GLhandleARB program, GLint location, GLfloat *params);
+GLAPI void APIENTRY glGetUniformfv(GLuint program, GLint location, GLfloat *params);
+void APIENTRY gl_dispatch_stub_544(GLhandleARB program, GLint location, GLint *params);
+GLAPI void APIENTRY glGetUniformiv(GLuint program, GLint location, GLint *params);
+void APIENTRY gl_dispatch_stub_545(GLhandleARB program);
+GLAPI void APIENTRY glLinkProgram(GLuint program);
+void APIENTRY gl_dispatch_stub_546(GLhandleARB shader, GLsizei count, const GLcharARB **string, const GLint *length);
+GLAPI void APIENTRY glShaderSource(GLuint shader, GLsizei count, const GLchar **string, const GLint *length);
+void APIENTRY gl_dispatch_stub_547(GLint location, GLfloat v0);
+GLAPI void APIENTRY glUniform1f(GLint location, GLfloat v0);
+void APIENTRY gl_dispatch_stub_548(GLint location, GLsizei count, const GLfloat *value);
+GLAPI void APIENTRY glUniform1fv(GLint location, GLsizei count, const GLfloat *value);
+void APIENTRY gl_dispatch_stub_549(GLint location, GLint v0);
+GLAPI void APIENTRY glUniform1i(GLint location, GLint v0);
+void APIENTRY gl_dispatch_stub_550(GLint location, GLsizei count, const GLint *value);
+GLAPI void APIENTRY glUniform1iv(GLint location, GLsizei count, const GLint *value);
+void APIENTRY gl_dispatch_stub_551(GLint location, GLfloat v0, GLfloat v1);
+GLAPI void APIENTRY glUniform2f(GLint location, GLfloat v0, GLfloat v1);
+void APIENTRY gl_dispatch_stub_552(GLint location, GLsizei count, const GLfloat *value);
+GLAPI void APIENTRY glUniform2fv(GLint location, GLsizei count, const GLfloat *value);
+void APIENTRY gl_dispatch_stub_553(GLint location, GLint v0, GLint v1);
+GLAPI void APIENTRY glUniform2i(GLint location, GLint v0, GLint v1);
+void APIENTRY gl_dispatch_stub_554(GLint location, GLsizei count, const GLint *value);
+GLAPI void APIENTRY glUniform2iv(GLint location, GLsizei count, const GLint *value);
+void APIENTRY gl_dispatch_stub_555(GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
+GLAPI void APIENTRY glUniform3f(GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
+void APIENTRY gl_dispatch_stub_556(GLint location, GLsizei count, const GLfloat *value);
+GLAPI void APIENTRY glUniform3fv(GLint location, GLsizei count, const GLfloat *value);
+void APIENTRY gl_dispatch_stub_557(GLint location, GLint v0, GLint v1, GLint v2);
+GLAPI void APIENTRY glUniform3i(GLint location, GLint v0, GLint v1, GLint v2);
+void APIENTRY gl_dispatch_stub_558(GLint location, GLsizei count, const GLint *value);
+GLAPI void APIENTRY glUniform3iv(GLint location, GLsizei count, const GLint *value);
+void APIENTRY gl_dispatch_stub_559(GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
+GLAPI void APIENTRY glUniform4f(GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
+void APIENTRY gl_dispatch_stub_560(GLint location, GLsizei count, const GLfloat *value);
+GLAPI void APIENTRY glUniform4fv(GLint location, GLsizei count, const GLfloat *value);
+void APIENTRY gl_dispatch_stub_561(GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
+GLAPI void APIENTRY glUniform4i(GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
+void APIENTRY gl_dispatch_stub_562(GLint location, GLsizei count, const GLint *value);
+GLAPI void APIENTRY glUniform4iv(GLint location, GLsizei count, const GLint *value);
+void APIENTRY gl_dispatch_stub_563(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+GLAPI void APIENTRY glUniformMatrix2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+void APIENTRY gl_dispatch_stub_564(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+GLAPI void APIENTRY glUniformMatrix3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+void APIENTRY gl_dispatch_stub_565(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+GLAPI void APIENTRY glUniformMatrix4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+void APIENTRY gl_dispatch_stub_566(GLhandleARB program);
+GLAPI void APIENTRY glUseProgram(GLuint program);
+void APIENTRY gl_dispatch_stub_567(GLhandleARB program);
+GLAPI void APIENTRY glValidateProgram(GLuint program);
+void APIENTRY gl_dispatch_stub_568(GLhandleARB program, GLuint index, const GLcharARB *name);
+GLAPI void APIENTRY glBindAttribLocation(GLuint program, GLuint index, const GLchar *name);
+void APIENTRY gl_dispatch_stub_569(GLhandleARB program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name);
+GLAPI void APIENTRY glGetActiveAttrib(GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name);
+GLint APIENTRY gl_dispatch_stub_570(GLhandleARB program, const GLcharARB *name);
+GLAPI GLint APIENTRY glGetAttribLocation(GLuint program, const GLchar *name);
+void APIENTRY gl_dispatch_stub_571(GLsizei n, const GLenum *bufs);
+void APIENTRY gl_dispatch_stub_572(GLenum mode, GLint first, GLsizei count, GLsizei primcount);
+void APIENTRY gl_dispatch_stub_573(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount);
+void APIENTRY gl_dispatch_stub_574(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
+void APIENTRY gl_dispatch_stub_575(GLenum target, GLenum attachment, GLuint texture, GLint level);
+void APIENTRY gl_dispatch_stub_576(GLenum target, GLenum attachment, GLuint texture, GLint level, GLenum face);
+void APIENTRY gl_dispatch_stub_577(GLuint program, GLenum pname, GLint value);
+void APIENTRY gl_dispatch_stub_578(GLuint index, GLuint divisor);
+void APIENTRY gl_dispatch_stub_579(GLenum target, GLintptr offset, GLsizeiptr length);
+GLvoid * APIENTRY gl_dispatch_stub_580(GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access);
+void APIENTRY gl_dispatch_stub_581(GLuint array);
+void APIENTRY gl_dispatch_stub_582(GLsizei n, GLuint *arrays);
+void APIENTRY gl_dispatch_stub_583(GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size);
+GLenum APIENTRY gl_dispatch_stub_584(GLsync sync, GLbitfield flags, GLuint64 timeout);
+void APIENTRY gl_dispatch_stub_585(GLsync sync);
+GLsync APIENTRY gl_dispatch_stub_586(GLenum condition, GLbitfield flags);
+void APIENTRY gl_dispatch_stub_587(GLenum pname, GLint64 *params);
+void APIENTRY gl_dispatch_stub_588(GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values);
+GLboolean APIENTRY gl_dispatch_stub_589(GLsync sync);
+void APIENTRY gl_dispatch_stub_590(GLsync sync, GLbitfield flags, GLuint64 timeout);
+void APIENTRY gl_dispatch_stub_591(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLint basevertex);
+void APIENTRY gl_dispatch_stub_592(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices, GLint basevertex);
+void APIENTRY gl_dispatch_stub_593(GLenum mode, const GLsizei *count, GLenum type, const GLvoid **indices, GLsizei primcount, const GLint *basevertex);
+void APIENTRY gl_dispatch_stub_594(GLuint buf, GLenum modeRGB, GLenum modeA);
+void APIENTRY gl_dispatch_stub_595(GLuint buf, GLenum mode);
+void APIENTRY gl_dispatch_stub_596(GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcA, GLenum dstA);
+void APIENTRY gl_dispatch_stub_597(GLuint buf, GLenum src, GLenum dst);
+void APIENTRY gl_dispatch_stub_598(GLenum target, GLuint id);
+void APIENTRY gl_dispatch_stub_599(GLsizei n, const GLuint *ids);
+void APIENTRY gl_dispatch_stub_600(GLenum mode, GLuint id);
+void APIENTRY gl_dispatch_stub_601(GLsizei n, GLuint *ids);
+GLboolean APIENTRY gl_dispatch_stub_602(GLuint id);
+void APIENTRY gl_dispatch_stub_603(void);
+void APIENTRY gl_dispatch_stub_604(void);
+GLAPI void APIENTRY glClearDepthf(GLclampf depth);
+GLAPI void APIENTRY glDepthRangef(GLclampf zNear, GLclampf zFar);
+GLAPI void APIENTRY glGetShaderPrecisionFormat(GLenum shadertype, GLenum precisiontype, GLint *range, GLint *precision);
+GLAPI void APIENTRY glReleaseShaderCompiler(void);
+GLAPI void APIENTRY glShaderBinary(GLsizei n, const GLuint *shaders, GLenum binaryformat, const GLvoid *binary, GLsizei length);
+void APIENTRY gl_dispatch_stub_610(GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, GLvoid *binary);
+GLAPI void APIENTRY glGetProgramBinaryOES(GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, GLvoid *binary);
+void APIENTRY gl_dispatch_stub_611(GLuint program, GLenum binaryFormat, const GLvoid *binary, GLsizei length);
+GLAPI void APIENTRY glProgramBinaryOES(GLuint program, GLenum binaryFormat, const GLvoid *binary, GLint length);
+void APIENTRY gl_dispatch_stub_612(GLuint program, GLenum pname, GLint value);
+void APIENTRY gl_dispatch_stub_613(GLfloat factor, GLfloat bias);
+void APIENTRY gl_dispatch_stub_614(GLfloat x, GLfloat y, GLfloat z, GLfloat width, GLfloat height);
+void APIENTRY gl_dispatch_stub_615(const GLfloat *coords);
+void APIENTRY gl_dispatch_stub_616(GLint x, GLint y, GLint z, GLint width, GLint height);
+void APIENTRY gl_dispatch_stub_617(const GLint *coords);
+void APIENTRY gl_dispatch_stub_618(GLshort x, GLshort y, GLshort z, GLshort width, GLshort height);
+void APIENTRY gl_dispatch_stub_619(const GLshort *coords);
+void APIENTRY gl_dispatch_stub_620(GLfixed x, GLfixed y, GLfixed z, GLfixed width, GLfixed height);
+void APIENTRY gl_dispatch_stub_621(const GLfixed *coords);
+void APIENTRY gl_dispatch_stub_622(GLenum type, GLsizei stride, const GLvoid *pointer);
+void APIENTRY gl_dispatch_stub_623(GLenum pname, GLfloat *params);
+void APIENTRY gl_dispatch_stub_624(GLenum pname, GLint *params);
+void APIENTRY gl_dispatch_stub_625(GLenum pname, GLfloat param);
+void APIENTRY gl_dispatch_stub_626(GLenum pname, const GLfloat *params);
+void APIENTRY gl_dispatch_stub_627(GLenum pname, GLint param);
+void APIENTRY gl_dispatch_stub_628(GLenum pname, const GLint *params);
+GLbitfield APIENTRY gl_dispatch_stub_629(GLfixed *mantissa, GLint *exponent);
+void APIENTRY gl_dispatch_stub_630(GLclampf value, GLboolean invert);
+void APIENTRY gl_dispatch_stub_631(GLenum pattern);
+void APIENTRY gl_dispatch_stub_632(GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer);
+void APIENTRY gl_dispatch_stub_633(GLsizei stride, GLsizei count, const GLboolean *pointer);
+void APIENTRY gl_dispatch_stub_634(GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer);
+void APIENTRY gl_dispatch_stub_635(GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer);
+void APIENTRY gl_dispatch_stub_636(GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer);
+void APIENTRY gl_dispatch_stub_637(GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer);
+void APIENTRY gl_dispatch_stub_638(GLenum pname, GLfloat param);
+void APIENTRY gl_dispatch_stub_639(GLenum pname, const GLfloat *params);
+void APIENTRY gl_dispatch_stub_640(GLint first, GLsizei count);
+void APIENTRY gl_dispatch_stub_641(void);
+void APIENTRY gl_dispatch_stub_642(GLbyte red, GLbyte green, GLbyte blue);
+void APIENTRY gl_dispatch_stub_643(const GLbyte *v);
+void APIENTRY gl_dispatch_stub_644(GLdouble red, GLdouble green, GLdouble blue);
+void APIENTRY gl_dispatch_stub_645(const GLdouble *v);
+void APIENTRY gl_dispatch_stub_646(GLfloat red, GLfloat green, GLfloat blue);
+void APIENTRY gl_dispatch_stub_647(const GLfloat *v);
+void APIENTRY gl_dispatch_stub_648(GLint red, GLint green, GLint blue);
+void APIENTRY gl_dispatch_stub_649(const GLint *v);
+void APIENTRY gl_dispatch_stub_650(GLshort red, GLshort green, GLshort blue);
+void APIENTRY gl_dispatch_stub_651(const GLshort *v);
+void APIENTRY gl_dispatch_stub_652(GLubyte red, GLubyte green, GLubyte blue);
+void APIENTRY gl_dispatch_stub_653(const GLubyte *v);
+void APIENTRY gl_dispatch_stub_654(GLuint red, GLuint green, GLuint blue);
+void APIENTRY gl_dispatch_stub_655(const GLuint *v);
+void APIENTRY gl_dispatch_stub_656(GLushort red, GLushort green, GLushort blue);
+void APIENTRY gl_dispatch_stub_657(const GLushort *v);
+void APIENTRY gl_dispatch_stub_658(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
+GLAPI void APIENTRY glMultiDrawArraysEXT(GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount);
+GLAPI void APIENTRY glMultiDrawElementsEXT(GLenum mode, const GLsizei *count, GLenum type, const GLvoid **indices, GLsizei primcount);
+void APIENTRY gl_dispatch_stub_661(GLenum type, GLsizei stride, const GLvoid *pointer);
+void APIENTRY gl_dispatch_stub_662(GLdouble coord);
+void APIENTRY gl_dispatch_stub_663(const GLdouble *coord);
+void APIENTRY gl_dispatch_stub_664(GLfloat coord);
+void APIENTRY gl_dispatch_stub_665(const GLfloat *coord);
+void APIENTRY gl_dispatch_stub_666(GLenum mode);
+void APIENTRY gl_dispatch_stub_667(GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
+GLAPI void APIENTRY glBlendFuncSeparate(GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
+void APIENTRY gl_dispatch_stub_668(void);
+void APIENTRY gl_dispatch_stub_669(GLsizei length, const GLvoid *pointer);
+void APIENTRY gl_dispatch_stub_670(GLenum stage, GLenum portion, GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage);
+void APIENTRY gl_dispatch_stub_671(GLenum stage, GLenum portion, GLenum abOutput, GLenum cdOutput, GLenum sumOutput, GLenum scale, GLenum bias, GLboolean abDotProduct, GLboolean cdDotProduct, GLboolean muxSum);
+void APIENTRY gl_dispatch_stub_672(GLenum pname, GLfloat param);
+void APIENTRY gl_dispatch_stub_673(GLenum pname, const GLfloat *params);
+void APIENTRY gl_dispatch_stub_674(GLenum pname, GLint param);
+void APIENTRY gl_dispatch_stub_675(GLenum pname, const GLint *params);
+void APIENTRY gl_dispatch_stub_676(GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage);
+void APIENTRY gl_dispatch_stub_677(GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLfloat *params);
+void APIENTRY gl_dispatch_stub_678(GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLint *params);
+void APIENTRY gl_dispatch_stub_679(GLenum stage, GLenum portion, GLenum pname, GLfloat *params);
+void APIENTRY gl_dispatch_stub_680(GLenum stage, GLenum portion, GLenum pname, GLint *params);
+void APIENTRY gl_dispatch_stub_681(GLenum variable, GLenum pname, GLfloat *params);
+void APIENTRY gl_dispatch_stub_682(GLenum variable, GLenum pname, GLint *params);
+void APIENTRY gl_dispatch_stub_683(void);
+void APIENTRY gl_dispatch_stub_684(GLdouble x, GLdouble y);
+void APIENTRY gl_dispatch_stub_685(const GLdouble *v);
+void APIENTRY gl_dispatch_stub_686(GLfloat x, GLfloat y);
+void APIENTRY gl_dispatch_stub_687(const GLfloat *v);
+void APIENTRY gl_dispatch_stub_688(GLint x, GLint y);
+void APIENTRY gl_dispatch_stub_689(const GLint *v);
+void APIENTRY gl_dispatch_stub_690(GLshort x, GLshort y);
+void APIENTRY gl_dispatch_stub_691(const GLshort *v);
+void APIENTRY gl_dispatch_stub_692(GLdouble x, GLdouble y, GLdouble z);
+void APIENTRY gl_dispatch_stub_693(const GLdouble *v);
+void APIENTRY gl_dispatch_stub_694(GLfloat x, GLfloat y, GLfloat z);
+void APIENTRY gl_dispatch_stub_695(const GLfloat *v);
+void APIENTRY gl_dispatch_stub_696(GLint x, GLint y, GLint z);
+void APIENTRY gl_dispatch_stub_697(const GLint *v);
+void APIENTRY gl_dispatch_stub_698(GLshort x, GLshort y, GLshort z);
+void APIENTRY gl_dispatch_stub_699(const GLshort *v);
+void APIENTRY gl_dispatch_stub_700(GLdouble x, GLdouble y, GLdouble z, GLdouble w);
+void APIENTRY gl_dispatch_stub_701(const GLdouble *v);
+void APIENTRY gl_dispatch_stub_702(GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+void APIENTRY gl_dispatch_stub_703(const GLfloat *v);
+void APIENTRY gl_dispatch_stub_704(GLint x, GLint y, GLint z, GLint w);
+void APIENTRY gl_dispatch_stub_705(const GLint *v);
+void APIENTRY gl_dispatch_stub_706(GLshort x, GLshort y, GLshort z, GLshort w);
+void APIENTRY gl_dispatch_stub_707(const GLshort *v);
+void APIENTRY gl_dispatch_stub_708(const GLenum *mode, const GLint *first, const GLsizei *count, GLsizei primcount, GLint modestride);
+void APIENTRY gl_dispatch_stub_709(const GLenum *mode, const GLsizei *count, GLenum type, const GLvoid * const *indices, GLsizei primcount, GLint modestride);
+void APIENTRY gl_dispatch_stub_710(GLsizei n, const GLuint *fences);
+void APIENTRY gl_dispatch_stub_711(GLuint fence);
+void APIENTRY gl_dispatch_stub_712(GLsizei n, GLuint *fences);
+void APIENTRY gl_dispatch_stub_713(GLuint fence, GLenum pname, GLint *params);
+GLboolean APIENTRY gl_dispatch_stub_714(GLuint fence);
+void APIENTRY gl_dispatch_stub_715(GLuint fence, GLenum condition);
+GLboolean APIENTRY gl_dispatch_stub_716(GLuint fence);
+GLboolean APIENTRY gl_dispatch_stub_717(GLsizei n, const GLuint *ids, GLboolean *residences);
+void APIENTRY gl_dispatch_stub_718(GLenum target, GLuint program);
+void APIENTRY gl_dispatch_stub_719(GLsizei n, const GLuint *programs);
+void APIENTRY gl_dispatch_stub_720(GLenum target, GLuint id, const GLfloat *params);
+void APIENTRY gl_dispatch_stub_721(GLsizei n, GLuint *programs);
+void APIENTRY gl_dispatch_stub_722(GLenum target, GLuint index, GLenum pname, GLdouble *params);
+void APIENTRY gl_dispatch_stub_723(GLenum target, GLuint index, GLenum pname, GLfloat *params);
+void APIENTRY gl_dispatch_stub_724(GLuint id, GLenum pname, GLubyte *program);
+void APIENTRY gl_dispatch_stub_725(GLuint id, GLenum pname, GLint *params);
+void APIENTRY gl_dispatch_stub_726(GLenum target, GLuint address, GLenum pname, GLint *params);
+void APIENTRY gl_dispatch_stub_727(GLuint index, GLenum pname, GLvoid **pointer);
+GLAPI void APIENTRY glGetVertexAttribPointerv(GLuint index, GLenum pname, GLvoid **pointer);
+void APIENTRY gl_dispatch_stub_728(GLuint index, GLenum pname, GLdouble *params);
+void APIENTRY gl_dispatch_stub_729(GLuint index, GLenum pname, GLfloat *params);
+void APIENTRY gl_dispatch_stub_730(GLuint index, GLenum pname, GLint *params);
+GLboolean APIENTRY gl_dispatch_stub_731(GLuint program);
+void APIENTRY gl_dispatch_stub_732(GLenum target, GLuint id, GLsizei len, const GLubyte *program);
+void APIENTRY gl_dispatch_stub_733(GLenum target, GLuint index, GLsizei num, const GLdouble *params);
+void APIENTRY gl_dispatch_stub_734(GLenum target, GLuint index, GLsizei num, const GLfloat *params);
+void APIENTRY gl_dispatch_stub_735(GLsizei n, const GLuint *ids);
+void APIENTRY gl_dispatch_stub_736(GLenum target, GLuint address, GLenum matrix, GLenum transform);
+void APIENTRY gl_dispatch_stub_737(GLuint index, GLdouble x);
+void APIENTRY gl_dispatch_stub_738(GLuint index, const GLdouble *v);
+void APIENTRY gl_dispatch_stub_739(GLuint index, GLfloat x);
+void APIENTRY gl_dispatch_stub_740(GLuint index, const GLfloat *v);
+void APIENTRY gl_dispatch_stub_741(GLuint index, GLshort x);
+void APIENTRY gl_dispatch_stub_742(GLuint index, const GLshort *v);
+void APIENTRY gl_dispatch_stub_743(GLuint index, GLdouble x, GLdouble y);
+void APIENTRY gl_dispatch_stub_744(GLuint index, const GLdouble *v);
+void APIENTRY gl_dispatch_stub_745(GLuint index, GLfloat x, GLfloat y);
+void APIENTRY gl_dispatch_stub_746(GLuint index, const GLfloat *v);
+void APIENTRY gl_dispatch_stub_747(GLuint index, GLshort x, GLshort y);
+void APIENTRY gl_dispatch_stub_748(GLuint index, const GLshort *v);
+void APIENTRY gl_dispatch_stub_749(GLuint index, GLdouble x, GLdouble y, GLdouble z);
+void APIENTRY gl_dispatch_stub_750(GLuint index, const GLdouble *v);
+void APIENTRY gl_dispatch_stub_751(GLuint index, GLfloat x, GLfloat y, GLfloat z);
+void APIENTRY gl_dispatch_stub_752(GLuint index, const GLfloat *v);
+void APIENTRY gl_dispatch_stub_753(GLuint index, GLshort x, GLshort y, GLshort z);
+void APIENTRY gl_dispatch_stub_754(GLuint index, const GLshort *v);
+void APIENTRY gl_dispatch_stub_755(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
+void APIENTRY gl_dispatch_stub_756(GLuint index, const GLdouble *v);
+void APIENTRY gl_dispatch_stub_757(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+void APIENTRY gl_dispatch_stub_758(GLuint index, const GLfloat *v);
+void APIENTRY gl_dispatch_stub_759(GLuint index, GLshort x, GLshort y, GLshort z, GLshort w);
+void APIENTRY gl_dispatch_stub_760(GLuint index, const GLshort *v);
+void APIENTRY gl_dispatch_stub_761(GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w);
+void APIENTRY gl_dispatch_stub_762(GLuint index, const GLubyte *v);
+void APIENTRY gl_dispatch_stub_763(GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
+void APIENTRY gl_dispatch_stub_764(GLuint index, GLsizei n, const GLdouble *v);
+void APIENTRY gl_dispatch_stub_765(GLuint index, GLsizei n, const GLfloat *v);
+void APIENTRY gl_dispatch_stub_766(GLuint index, GLsizei n, const GLshort *v);
+void APIENTRY gl_dispatch_stub_767(GLuint index, GLsizei n, const GLdouble *v);
+void APIENTRY gl_dispatch_stub_768(GLuint index, GLsizei n, const GLfloat *v);
+void APIENTRY gl_dispatch_stub_769(GLuint index, GLsizei n, const GLshort *v);
+void APIENTRY gl_dispatch_stub_770(GLuint index, GLsizei n, const GLdouble *v);
+void APIENTRY gl_dispatch_stub_771(GLuint index, GLsizei n, const GLfloat *v);
+void APIENTRY gl_dispatch_stub_772(GLuint index, GLsizei n, const GLshort *v);
+void APIENTRY gl_dispatch_stub_773(GLuint index, GLsizei n, const GLdouble *v);
+void APIENTRY gl_dispatch_stub_774(GLuint index, GLsizei n, const GLfloat *v);
+void APIENTRY gl_dispatch_stub_775(GLuint index, GLsizei n, const GLshort *v);
+void APIENTRY gl_dispatch_stub_776(GLuint index, GLsizei n, const GLubyte *v);
+void APIENTRY gl_dispatch_stub_777(GLenum pname, GLfloat *param);
+void APIENTRY gl_dispatch_stub_778(GLenum pname, GLint *param);
+void APIENTRY gl_dispatch_stub_779(GLenum pname, const GLfloat *param);
+void APIENTRY gl_dispatch_stub_780(GLenum pname, const GLint *param);
+void APIENTRY gl_dispatch_stub_781(GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod);
+void APIENTRY gl_dispatch_stub_782(GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod);
+void APIENTRY gl_dispatch_stub_783(GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod);
+void APIENTRY gl_dispatch_stub_784(void);
+void APIENTRY gl_dispatch_stub_785(GLuint id);
+void APIENTRY gl_dispatch_stub_786(GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod);
+void APIENTRY gl_dispatch_stub_787(GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod);
+void APIENTRY gl_dispatch_stub_788(GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod);
+void APIENTRY gl_dispatch_stub_789(GLuint id);
+void APIENTRY gl_dispatch_stub_790(void);
+GLuint APIENTRY gl_dispatch_stub_791(GLuint range);
+void APIENTRY gl_dispatch_stub_792(GLuint dst, GLuint coord, GLenum swizzle);
+void APIENTRY gl_dispatch_stub_793(GLuint dst, GLuint interp, GLenum swizzle);
+void APIENTRY gl_dispatch_stub_794(GLuint dst, const GLfloat *value);
+void APIENTRY gl_dispatch_stub_795(GLenum pname, GLint param);
+void APIENTRY gl_dispatch_stub_796(GLenum pname, const GLint *params);
+void APIENTRY gl_dispatch_stub_797(GLenum face);
+void APIENTRY gl_dispatch_stub_798(GLuint array);
+void APIENTRY gl_dispatch_stub_799(GLsizei n, const GLuint *arrays);
+void APIENTRY gl_dispatch_stub_800(GLsizei n, GLuint *arrays);
+GLboolean APIENTRY gl_dispatch_stub_801(GLuint array);
+void APIENTRY gl_dispatch_stub_802(GLuint id, GLsizei len, const GLubyte *name, GLdouble *params);
+void APIENTRY gl_dispatch_stub_803(GLuint id, GLsizei len, const GLubyte *name, GLfloat *params);
+void APIENTRY gl_dispatch_stub_804(GLuint id, GLsizei len, const GLubyte *name, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
+void APIENTRY gl_dispatch_stub_805(GLuint id, GLsizei len, const GLubyte *name, const GLdouble *v);
+void APIENTRY gl_dispatch_stub_806(GLuint id, GLsizei len, const GLubyte *name, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+void APIENTRY gl_dispatch_stub_807(GLuint id, GLsizei len, const GLubyte *name, const GLfloat *v);
+void APIENTRY gl_dispatch_stub_808(GLuint index);
+void APIENTRY gl_dispatch_stub_809(void);
+void APIENTRY gl_dispatch_stub_810(GLenum func, GLclampx ref);
+void APIENTRY gl_dispatch_stub_811(GLclampx red, GLclampx green, GLclampx blue, GLclampx alpha);
+void APIENTRY gl_dispatch_stub_812(GLclampx depth);
+void APIENTRY gl_dispatch_stub_813(GLenum plane, const GLfixed *equation);
+void APIENTRY gl_dispatch_stub_814(GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha);
+void APIENTRY gl_dispatch_stub_815(GLclampx zNear, GLclampx zFar);
+void APIENTRY gl_dispatch_stub_816(GLenum pname, GLfixed param);
+void APIENTRY gl_dispatch_stub_817(GLenum pname, const GLfixed *params);
+void APIENTRY gl_dispatch_stub_818(GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar);
+void APIENTRY gl_dispatch_stub_819(GLenum plane, GLfixed *equation);
+void APIENTRY gl_dispatch_stub_820(GLenum pname, GLfixed *params);
+void APIENTRY gl_dispatch_stub_821(GLenum light, GLenum pname, GLfixed *params);
+void APIENTRY gl_dispatch_stub_822(GLenum face, GLenum pname, GLfixed *params);
+void APIENTRY gl_dispatch_stub_823(GLenum target, GLenum pname, GLfixed *params);
+void APIENTRY gl_dispatch_stub_824(GLenum coord, GLenum pname, GLfixed *params);
+void APIENTRY gl_dispatch_stub_825(GLenum target, GLenum pname, GLfixed *params);
+void APIENTRY gl_dispatch_stub_826(GLenum pname, GLfixed param);
+void APIENTRY gl_dispatch_stub_827(GLenum pname, const GLfixed *params);
+void APIENTRY gl_dispatch_stub_828(GLenum light, GLenum pname, GLfixed param);
+void APIENTRY gl_dispatch_stub_829(GLenum light, GLenum pname, const GLfixed *params);
+void APIENTRY gl_dispatch_stub_830(GLfixed width);
+void APIENTRY gl_dispatch_stub_831(const GLfixed *m);
+void APIENTRY gl_dispatch_stub_832(GLenum face, GLenum pname, GLfixed param);
+void APIENTRY gl_dispatch_stub_833(GLenum face, GLenum pname, const GLfixed *params);
+void APIENTRY gl_dispatch_stub_834(const GLfixed *m);
+void APIENTRY gl_dispatch_stub_835(GLenum target, GLfixed s, GLfixed t, GLfixed r, GLfixed q);
+void APIENTRY gl_dispatch_stub_836(GLfixed nx, GLfixed ny, GLfixed nz);
+void APIENTRY gl_dispatch_stub_837(GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar);
+void APIENTRY gl_dispatch_stub_838(GLenum pname, GLfixed param);
+void APIENTRY gl_dispatch_stub_839(GLenum pname, const GLfixed *params);
+void APIENTRY gl_dispatch_stub_840(GLfixed size);
+void APIENTRY gl_dispatch_stub_841(GLfixed factor, GLfixed units);
+void APIENTRY gl_dispatch_stub_842(GLfixed angle, GLfixed x, GLfixed y, GLfixed z);
+void APIENTRY gl_dispatch_stub_843(GLclampx value, GLboolean invert);
+void APIENTRY gl_dispatch_stub_844(GLfixed x, GLfixed y, GLfixed z);
+void APIENTRY gl_dispatch_stub_845(GLenum target, GLenum pname, GLfixed param);
+void APIENTRY gl_dispatch_stub_846(GLenum target, GLenum pname, const GLfixed *params);
+void APIENTRY gl_dispatch_stub_847(GLenum coord, GLenum pname, GLint param);
+void APIENTRY gl_dispatch_stub_848(GLenum coord, GLenum pname, const GLfixed *params);
+void APIENTRY gl_dispatch_stub_849(GLenum target, GLenum pname, GLfixed param);
+void APIENTRY gl_dispatch_stub_850(GLenum target, GLenum pname, const GLfixed *params);
+void APIENTRY gl_dispatch_stub_851(GLfixed x, GLfixed y, GLfixed z);
+void APIENTRY gl_dispatch_stub_852(GLenum plane, const GLfloat *equation);
+void APIENTRY gl_dispatch_stub_853(GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar);
+void APIENTRY gl_dispatch_stub_854(GLenum plane, GLfloat *equation);
+void APIENTRY gl_dispatch_stub_855(GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar);
+void APIENTRY gl_dispatch_stub_856(GLclampd zmin, GLclampd zmax);
+void APIENTRY gl_dispatch_stub_857(GLenum modeRGB, GLenum modeA);
+GLAPI void APIENTRY glBlendEquationSeparate(GLenum modeRGB, GLenum modeA);
+void APIENTRY gl_dispatch_stub_858(GLenum target, GLuint framebuffer);
+GLAPI void APIENTRY glBindFramebuffer(GLenum target, GLuint framebuffer);
+void APIENTRY gl_dispatch_stub_859(GLenum target, GLuint renderbuffer);
+GLAPI void APIENTRY glBindRenderbuffer(GLenum target, GLuint renderbuffer);
+GLenum APIENTRY gl_dispatch_stub_860(GLenum target);
+GLAPI GLenum APIENTRY glCheckFramebufferStatus(GLenum target);
+void APIENTRY gl_dispatch_stub_861(GLsizei n, const GLuint *framebuffers);
+GLAPI void APIENTRY glDeleteFramebuffers(GLsizei n, const GLuint *framebuffers);
+void APIENTRY gl_dispatch_stub_862(GLsizei n, const GLuint *renderbuffers);
+GLAPI void APIENTRY glDeleteRenderbuffers(GLsizei n, const GLuint *renderbuffers);
+void APIENTRY gl_dispatch_stub_863(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
+GLAPI void APIENTRY glFramebufferRenderbuffer(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
+void APIENTRY gl_dispatch_stub_864(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
+void APIENTRY gl_dispatch_stub_865(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
+GLAPI void APIENTRY glFramebufferTexture2D(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
+void APIENTRY gl_dispatch_stub_866(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);
+GLAPI void APIENTRY glFramebufferTexture3DOES(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);
+void APIENTRY gl_dispatch_stub_867(GLsizei n, GLuint *framebuffers);
+GLAPI void APIENTRY glGenFramebuffers(GLsizei n, GLuint *framebuffers);
+void APIENTRY gl_dispatch_stub_868(GLsizei n, GLuint *renderbuffers);
+GLAPI void APIENTRY glGenRenderbuffers(GLsizei n, GLuint *renderbuffers);
+void APIENTRY gl_dispatch_stub_869(GLenum target);
+GLAPI void APIENTRY glGenerateMipmap(GLenum target);
+void APIENTRY gl_dispatch_stub_870(GLenum target, GLenum attachment, GLenum pname, GLint *params);
+GLAPI void APIENTRY glGetFramebufferAttachmentParameteriv(GLenum target, GLenum attachment, GLenum pname, GLint *params);
+void APIENTRY gl_dispatch_stub_871(GLenum target, GLenum pname, GLint *params);
+GLAPI void APIENTRY glGetRenderbufferParameteriv(GLenum target, GLenum pname, GLint *params);
+GLboolean APIENTRY gl_dispatch_stub_872(GLuint framebuffer);
+GLAPI GLboolean APIENTRY glIsFramebuffer(GLuint framebuffer);
+GLboolean APIENTRY gl_dispatch_stub_873(GLuint renderbuffer);
+GLAPI GLboolean APIENTRY glIsRenderbuffer(GLuint renderbuffer);
+void APIENTRY gl_dispatch_stub_874(GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
+GLAPI void APIENTRY glRenderbufferStorage(GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
+void APIENTRY gl_dispatch_stub_875(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
+void APIENTRY gl_dispatch_stub_876(GLenum target, GLenum pname, GLint param);
+void APIENTRY gl_dispatch_stub_877(GLenum target, GLintptr offset, GLsizeiptr size);
+void APIENTRY gl_dispatch_stub_878(GLuint program, GLuint colorNumber, const GLchar *name);
+GLint APIENTRY gl_dispatch_stub_879(GLuint program, const GLchar *name);
+void APIENTRY gl_dispatch_stub_880(GLuint program, GLint location, GLuint *params);
+void APIENTRY gl_dispatch_stub_881(GLuint index, GLenum pname, GLint *params);
+void APIENTRY gl_dispatch_stub_882(GLuint index, GLenum pname, GLuint *params);
+void APIENTRY gl_dispatch_stub_883(GLint location, GLuint x);
+void APIENTRY gl_dispatch_stub_884(GLint location, GLsizei count, const GLuint *value);
+void APIENTRY gl_dispatch_stub_885(GLint location, GLuint x, GLuint y);
+void APIENTRY gl_dispatch_stub_886(GLint location, GLsizei count, const GLuint *value);
+void APIENTRY gl_dispatch_stub_887(GLint location, GLuint x, GLuint y, GLuint z);
+void APIENTRY gl_dispatch_stub_888(GLint location, GLsizei count, const GLuint *value);
+void APIENTRY gl_dispatch_stub_889(GLint location, GLuint x, GLuint y, GLuint z, GLuint w);
+void APIENTRY gl_dispatch_stub_890(GLint location, GLsizei count, const GLuint *value);
+void APIENTRY gl_dispatch_stub_891(GLuint index, GLint x);
+void APIENTRY gl_dispatch_stub_892(GLuint index, const GLint *v);
+void APIENTRY gl_dispatch_stub_893(GLuint index, GLuint x);
+void APIENTRY gl_dispatch_stub_894(GLuint index, const GLuint *v);
+void APIENTRY gl_dispatch_stub_895(GLuint index, GLint x, GLint y);
+void APIENTRY gl_dispatch_stub_896(GLuint index, const GLint *v);
+void APIENTRY gl_dispatch_stub_897(GLuint index, GLuint x, GLuint y);
+void APIENTRY gl_dispatch_stub_898(GLuint index, const GLuint *v);
+void APIENTRY gl_dispatch_stub_899(GLuint index, GLint x, GLint y, GLint z);
+void APIENTRY gl_dispatch_stub_900(GLuint index, const GLint *v);
+void APIENTRY gl_dispatch_stub_901(GLuint index, GLuint x, GLuint y, GLuint z);
+void APIENTRY gl_dispatch_stub_902(GLuint index, const GLuint *v);
+void APIENTRY gl_dispatch_stub_903(GLuint index, const GLbyte *v);
+void APIENTRY gl_dispatch_stub_904(GLuint index, GLint x, GLint y, GLint z, GLint w);
+void APIENTRY gl_dispatch_stub_905(GLuint index, const GLint *v);
+void APIENTRY gl_dispatch_stub_906(GLuint index, const GLshort *v);
+void APIENTRY gl_dispatch_stub_907(GLuint index, const GLubyte *v);
+void APIENTRY gl_dispatch_stub_908(GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
+void APIENTRY gl_dispatch_stub_909(GLuint index, const GLuint *v);
+void APIENTRY gl_dispatch_stub_910(GLuint index, const GLushort *v);
+void APIENTRY gl_dispatch_stub_911(GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
+void APIENTRY gl_dispatch_stub_912(GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer);
+void APIENTRY gl_dispatch_stub_913(GLuint buf, GLboolean r, GLboolean g, GLboolean b, GLboolean a);
+void APIENTRY gl_dispatch_stub_914(GLenum target, GLuint index);
+void APIENTRY gl_dispatch_stub_915(GLenum target, GLuint index);
+void APIENTRY gl_dispatch_stub_916(GLenum value, GLuint index, GLboolean *data);
+void APIENTRY gl_dispatch_stub_917(GLenum value, GLuint index, GLint *data);
+GLboolean APIENTRY gl_dispatch_stub_918(GLenum target, GLuint index);
+void APIENTRY gl_dispatch_stub_919(GLint r, GLint g, GLint b, GLint a);
+void APIENTRY gl_dispatch_stub_920(GLuint r, GLuint g, GLuint b, GLuint a);
+void APIENTRY gl_dispatch_stub_921(GLenum target, GLenum pname, GLint *params);
+void APIENTRY gl_dispatch_stub_922(GLenum target, GLenum pname, GLuint *params);
+void APIENTRY gl_dispatch_stub_923(GLenum target, GLenum pname, const GLint *params);
+void APIENTRY gl_dispatch_stub_924(GLenum target, GLenum pname, const GLuint *params);
+void APIENTRY gl_dispatch_stub_925(GLuint query, GLenum mode);
+void APIENTRY gl_dispatch_stub_926(void);
+void APIENTRY gl_dispatch_stub_927(GLenum mode);
+void APIENTRY gl_dispatch_stub_928(GLenum target, GLuint index, GLuint buffer);
+void APIENTRY gl_dispatch_stub_929(GLenum target, GLuint index, GLuint buffer, GLintptr offset);
+void APIENTRY gl_dispatch_stub_930(GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size);
+void APIENTRY gl_dispatch_stub_931(void);
+void APIENTRY gl_dispatch_stub_932(GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name);
+void APIENTRY gl_dispatch_stub_933(GLuint program, GLsizei count, const char **varyings, GLenum bufferMode);
+void APIENTRY gl_dispatch_stub_934(GLenum mode);
+void APIENTRY gl_dispatch_stub_935(GLenum target, GLenum pname, GLvoid **params);
+void APIENTRY gl_dispatch_stub_936(GLenum target, GLsizei length, GLvoid *pointer);
+void APIENTRY gl_dispatch_stub_937(GLenum objectType, GLuint name, GLenum pname, GLint *value);
+GLenum APIENTRY gl_dispatch_stub_938(GLenum objectType, GLuint name, GLenum option);
+GLenum APIENTRY gl_dispatch_stub_939(GLenum objectType, GLuint name, GLenum option);
+void APIENTRY gl_dispatch_stub_940(GLuint program);
+GLuint APIENTRY gl_dispatch_stub_941(GLenum type, const GLchar *string);
+void APIENTRY gl_dispatch_stub_942(GLenum type, GLuint program);
+void APIENTRY gl_dispatch_stub_943(void);
+void APIENTRY gl_dispatch_stub_944(GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask);
+void APIENTRY gl_dispatch_stub_945(GLenum target, GLuint index, GLsizei count, const GLfloat *params);
+void APIENTRY gl_dispatch_stub_946(GLenum target, GLuint index, GLsizei count, const GLfloat *params);
+void APIENTRY gl_dispatch_stub_947(GLuint id, GLenum pname, GLint64EXT *params);
+void APIENTRY gl_dispatch_stub_948(GLuint id, GLenum pname, GLuint64EXT *params);
+GLAPI void APIENTRY glEGLImageTargetRenderbufferStorageOES(GLenum target, GLvoid *writeOffset);
+GLAPI void APIENTRY glEGLImageTargetTexture2DOES(GLenum target, GLvoid *writeOffset);
+#undef MAPI_TMP_DEFINES
+#endif /* MAPI_TMP_DEFINES */
+
+#ifdef MAPI_TMP_PUBLIC_ENTRIES_NO_HIDDEN
+GLAPI void APIENTRY glCullFace(GLenum mode)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[152];
+ ((void (APIENTRY *)(GLenum mode)) _func)(mode);
+}
+
+GLAPI void APIENTRY glFrontFace(GLenum mode)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[157];
+ ((void (APIENTRY *)(GLenum mode)) _func)(mode);
+}
+
+GLAPI void APIENTRY glHint(GLenum target, GLenum mode)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[158];
+ ((void (APIENTRY *)(GLenum target, GLenum mode)) _func)(target, mode);
+}
+
+GLAPI void APIENTRY glLineWidth(GLfloat width)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[168];
+ ((void (APIENTRY *)(GLfloat width)) _func)(width);
+}
+
+GLAPI void APIENTRY glScissor(GLint x, GLint y, GLsizei width, GLsizei height)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[176];
+ ((void (APIENTRY *)(GLint x, GLint y, GLsizei width, GLsizei height)) _func)(x, y, width, height);
+}
+
+GLAPI void APIENTRY glTexParameterf(GLenum target, GLenum pname, GLfloat param)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[178];
+ ((void (APIENTRY *)(GLenum target, GLenum pname, GLfloat param)) _func)(target, pname, param);
+}
+
+GLAPI void APIENTRY glTexParameterfv(GLenum target, GLenum pname, const GLfloat *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[179];
+ ((void (APIENTRY *)(GLenum target, GLenum pname, const GLfloat *params)) _func)(target, pname, params);
+}
+
+GLAPI void APIENTRY glTexParameteri(GLenum target, GLenum pname, GLint param)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[180];
+ ((void (APIENTRY *)(GLenum target, GLenum pname, GLint param)) _func)(target, pname, param);
+}
+
+GLAPI void APIENTRY glTexParameteriv(GLenum target, GLenum pname, const GLint *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[181];
+ ((void (APIENTRY *)(GLenum target, GLenum pname, const GLint *params)) _func)(target, pname, params);
+}
+
+GLAPI void APIENTRY glTexImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[183];
+ ((void (APIENTRY *)(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels)) _func)(target, level, internalformat, width, height, border, format, type, pixels);
+}
+
+GLAPI void APIENTRY glClear(GLbitfield mask)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[203];
+ ((void (APIENTRY *)(GLbitfield mask)) _func)(mask);
+}
+
+GLAPI void APIENTRY glClearColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[206];
+ ((void (APIENTRY *)(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)) _func)(red, green, blue, alpha);
+}
+
+GLAPI void APIENTRY glClearStencil(GLint s)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[207];
+ ((void (APIENTRY *)(GLint s)) _func)(s);
+}
+
+GLAPI void APIENTRY glStencilMask(GLuint mask)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[209];
+ ((void (APIENTRY *)(GLuint mask)) _func)(mask);
+}
+
+GLAPI void APIENTRY glColorMask(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[210];
+ ((void (APIENTRY *)(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha)) _func)(red, green, blue, alpha);
+}
+
+GLAPI void APIENTRY glDepthMask(GLboolean flag)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[211];
+ ((void (APIENTRY *)(GLboolean flag)) _func)(flag);
+}
+
+GLAPI void APIENTRY glDisable(GLenum cap)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[214];
+ ((void (APIENTRY *)(GLenum cap)) _func)(cap);
+}
+
+GLAPI void APIENTRY glEnable(GLenum cap)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[215];
+ ((void (APIENTRY *)(GLenum cap)) _func)(cap);
+}
+
+GLAPI void APIENTRY glFinish(void)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[216];
+ ((void (APIENTRY *)(void)) _func)();
+}
+
+GLAPI void APIENTRY glFlush(void)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[217];
+ ((void (APIENTRY *)(void)) _func)();
+}
+
+GLAPI void APIENTRY glBlendFunc(GLenum sfactor, GLenum dfactor)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[241];
+ ((void (APIENTRY *)(GLenum sfactor, GLenum dfactor)) _func)(sfactor, dfactor);
+}
+
+GLAPI void APIENTRY glStencilFunc(GLenum func, GLint ref, GLuint mask)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[243];
+ ((void (APIENTRY *)(GLenum func, GLint ref, GLuint mask)) _func)(func, ref, mask);
+}
+
+GLAPI void APIENTRY glStencilOp(GLenum fail, GLenum zfail, GLenum zpass)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[244];
+ ((void (APIENTRY *)(GLenum fail, GLenum zfail, GLenum zpass)) _func)(fail, zfail, zpass);
+}
+
+GLAPI void APIENTRY glDepthFunc(GLenum func)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[245];
+ ((void (APIENTRY *)(GLenum func)) _func)(func);
+}
+
+GLAPI void APIENTRY glPixelStorei(GLenum pname, GLint param)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[250];
+ ((void (APIENTRY *)(GLenum pname, GLint param)) _func)(pname, param);
+}
+
+GLAPI void APIENTRY glReadPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[256];
+ ((void (APIENTRY *)(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels)) _func)(x, y, width, height, format, type, pixels);
+}
+
+GLAPI void APIENTRY glGetBooleanv(GLenum pname, GLboolean *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[258];
+ ((void (APIENTRY *)(GLenum pname, GLboolean *params)) _func)(pname, params);
+}
+
+GLAPI GLenum APIENTRY glGetError(void)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[261];
+ return ((GLenum (APIENTRY *)(void)) _func)();
+}
+
+GLAPI void APIENTRY glGetFloatv(GLenum pname, GLfloat *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[262];
+ ((void (APIENTRY *)(GLenum pname, GLfloat *params)) _func)(pname, params);
+}
+
+GLAPI void APIENTRY glGetIntegerv(GLenum pname, GLint *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[263];
+ ((void (APIENTRY *)(GLenum pname, GLint *params)) _func)(pname, params);
+}
+
+GLAPI const GLubyte * APIENTRY glGetString(GLenum name)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[275];
+ return ((const GLubyte * (APIENTRY *)(GLenum name)) _func)(name);
+}
+
+GLAPI void APIENTRY glGetTexParameterfv(GLenum target, GLenum pname, GLfloat *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[282];
+ ((void (APIENTRY *)(GLenum target, GLenum pname, GLfloat *params)) _func)(target, pname, params);
+}
+
+GLAPI void APIENTRY glGetTexParameteriv(GLenum target, GLenum pname, GLint *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[283];
+ ((void (APIENTRY *)(GLenum target, GLenum pname, GLint *params)) _func)(target, pname, params);
+}
+
+GLAPI GLboolean APIENTRY glIsEnabled(GLenum cap)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[286];
+ return ((GLboolean (APIENTRY *)(GLenum cap)) _func)(cap);
+}
+
+GLAPI void APIENTRY glViewport(GLint x, GLint y, GLsizei width, GLsizei height)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[305];
+ ((void (APIENTRY *)(GLint x, GLint y, GLsizei width, GLsizei height)) _func)(x, y, width, height);
+}
+
+GLAPI void APIENTRY glBindTexture(GLenum target, GLuint texture)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[307];
+ ((void (APIENTRY *)(GLenum target, GLuint texture)) _func)(target, texture);
+}
+
+GLAPI void APIENTRY glDrawArrays(GLenum mode, GLint first, GLsizei count)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[310];
+ ((void (APIENTRY *)(GLenum mode, GLint first, GLsizei count)) _func)(mode, first, count);
+}
+
+GLAPI void APIENTRY glDrawElements(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[311];
+ ((void (APIENTRY *)(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices)) _func)(mode, count, type, indices);
+}
+
+GLAPI void APIENTRY glPolygonOffset(GLfloat factor, GLfloat units)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[319];
+ ((void (APIENTRY *)(GLfloat factor, GLfloat units)) _func)(factor, units);
+}
+
+GLAPI void APIENTRY glCopyTexImage2D(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[324];
+ ((void (APIENTRY *)(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border)) _func)(target, level, internalformat, x, y, width, height, border);
+}
+
+GLAPI void APIENTRY glCopyTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[326];
+ ((void (APIENTRY *)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height)) _func)(target, level, xoffset, yoffset, x, y, width, height);
+}
+
+GLAPI void APIENTRY glDeleteTextures(GLsizei n, const GLuint *textures)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[327];
+ ((void (APIENTRY *)(GLsizei n, const GLuint *textures)) _func)(n, textures);
+}
+
+GLAPI void APIENTRY glGenTextures(GLsizei n, GLuint *textures)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[328];
+ ((void (APIENTRY *)(GLsizei n, GLuint *textures)) _func)(n, textures);
+}
+
+GLAPI GLboolean APIENTRY glIsTexture(GLuint texture)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[330];
+ return ((GLboolean (APIENTRY *)(GLuint texture)) _func)(texture);
+}
+
+GLAPI void APIENTRY glTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[333];
+ ((void (APIENTRY *)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels)) _func)(target, level, xoffset, yoffset, width, height, format, type, pixels);
+}
+
+GLAPI void APIENTRY glBlendColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[336];
+ ((void (APIENTRY *)(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)) _func)(red, green, blue, alpha);
+}
+
+GLAPI void APIENTRY glBlendEquation(GLenum mode)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[337];
+ ((void (APIENTRY *)(GLenum mode)) _func)(mode);
+}
+
+GLAPI void APIENTRY glTexImage3DOES(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[371];
+ ((void (APIENTRY *)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels)) _func)(target, level, internalformat, width, height, depth, border, format, type, pixels);
+}
+
+GLAPI void APIENTRY glTexSubImage3DOES(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[372];
+ ((void (APIENTRY *)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels)) _func)(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels);
+}
+
+GLAPI void APIENTRY glCopyTexSubImage3DOES(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[373];
+ ((void (APIENTRY *)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height)) _func)(target, level, xoffset, yoffset, zoffset, x, y, width, height);
+}
+
+GLAPI void APIENTRY glActiveTexture(GLenum texture)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[374];
+ ((void (APIENTRY *)(GLenum texture)) _func)(texture);
+}
+
+GLAPI void APIENTRY glAttachShader(GLuint program, GLuint shader)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[408];
+ ((void (APIENTRY *)(GLuint program, GLuint shader)) _func)(program, shader);
+}
+
+GLAPI GLuint APIENTRY glCreateProgram(void)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[409];
+ return ((GLuint (APIENTRY *)(void)) _func)();
+}
+
+GLAPI GLuint APIENTRY glCreateShader(GLenum type)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[410];
+ return ((GLuint (APIENTRY *)(GLenum type)) _func)(type);
+}
+
+GLAPI void APIENTRY glDeleteProgram(GLuint program)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[411];
+ ((void (APIENTRY *)(GLuint program)) _func)(program);
+}
+
+GLAPI void APIENTRY glDeleteShader(GLuint program)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[412];
+ ((void (APIENTRY *)(GLuint program)) _func)(program);
+}
+
+GLAPI void APIENTRY glDetachShader(GLuint program, GLuint shader)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[413];
+ ((void (APIENTRY *)(GLuint program, GLuint shader)) _func)(program, shader);
+}
+
+GLAPI void APIENTRY glGetAttachedShaders(GLuint program, GLsizei maxCount, GLsizei *count, GLuint *obj)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[414];
+ ((void (APIENTRY *)(GLuint program, GLsizei maxCount, GLsizei *count, GLuint *obj)) _func)(program, maxCount, count, obj);
+}
+
+GLAPI void APIENTRY glGetProgramInfoLog(GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[415];
+ ((void (APIENTRY *)(GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog)) _func)(program, bufSize, length, infoLog);
+}
+
+GLAPI void APIENTRY glGetProgramiv(GLuint program, GLenum pname, GLint *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[416];
+ ((void (APIENTRY *)(GLuint program, GLenum pname, GLint *params)) _func)(program, pname, params);
+}
+
+GLAPI void APIENTRY glGetShaderInfoLog(GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[417];
+ ((void (APIENTRY *)(GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog)) _func)(shader, bufSize, length, infoLog);
+}
+
+GLAPI void APIENTRY glGetShaderiv(GLuint shader, GLenum pname, GLint *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[418];
+ ((void (APIENTRY *)(GLuint shader, GLenum pname, GLint *params)) _func)(shader, pname, params);
+}
+
+GLAPI GLboolean APIENTRY glIsProgram(GLuint program)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[419];
+ return ((GLboolean (APIENTRY *)(GLuint program)) _func)(program);
+}
+
+GLAPI GLboolean APIENTRY glIsShader(GLuint shader)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[420];
+ return ((GLboolean (APIENTRY *)(GLuint shader)) _func)(shader);
+}
+
+GLAPI void APIENTRY glStencilFuncSeparate(GLenum face, GLenum func, GLint ref, GLuint mask)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[421];
+ ((void (APIENTRY *)(GLenum face, GLenum func, GLint ref, GLuint mask)) _func)(face, func, ref, mask);
+}
+
+GLAPI void APIENTRY glStencilMaskSeparate(GLenum face, GLuint mask)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[422];
+ ((void (APIENTRY *)(GLenum face, GLuint mask)) _func)(face, mask);
+}
+
+GLAPI void APIENTRY glStencilOpSeparate(GLenum face, GLenum sfail, GLenum zfail, GLenum zpass)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[423];
+ ((void (APIENTRY *)(GLenum face, GLenum sfail, GLenum zfail, GLenum zpass)) _func)(face, sfail, zfail, zpass);
+}
+
+GLAPI void APIENTRY glSampleCoverage(GLclampf value, GLboolean invert)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[445];
+ ((void (APIENTRY *)(GLclampf value, GLboolean invert)) _func)(value, invert);
+}
+
+GLAPI void APIENTRY glCompressedTexImage2D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[447];
+ ((void (APIENTRY *)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data)) _func)(target, level, internalformat, width, height, border, imageSize, data);
+}
+
+GLAPI void APIENTRY glCompressedTexImage3DOES(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[448];
+ ((void (APIENTRY *)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data)) _func)(target, level, internalformat, width, height, depth, border, imageSize, data);
+}
+
+GLAPI void APIENTRY glCompressedTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[450];
+ ((void (APIENTRY *)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data)) _func)(target, level, xoffset, yoffset, width, height, format, imageSize, data);
+}
+
+GLAPI void APIENTRY glCompressedTexSubImage3DOES(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[451];
+ ((void (APIENTRY *)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data)) _func)(target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data);
+}
+
+GLAPI void APIENTRY glDisableVertexAttribArray(GLuint index)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[453];
+ ((void (APIENTRY *)(GLuint index)) _func)(index);
+}
+
+GLAPI void APIENTRY glEnableVertexAttribArray(GLuint index)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[454];
+ ((void (APIENTRY *)(GLuint index)) _func)(index);
+}
+
+GLAPI void APIENTRY glGetVertexAttribfv(GLuint index, GLenum pname, GLfloat *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[462];
+ ((void (APIENTRY *)(GLuint index, GLenum pname, GLfloat *params)) _func)(index, pname, params);
+}
+
+GLAPI void APIENTRY glGetVertexAttribiv(GLuint index, GLenum pname, GLint *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[463];
+ ((void (APIENTRY *)(GLuint index, GLenum pname, GLint *params)) _func)(index, pname, params);
+}
+
+GLAPI void APIENTRY glVertexAttrib1f(GLuint index, GLfloat x)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[475];
+ ((void (APIENTRY *)(GLuint index, GLfloat x)) _func)(index, x);
+}
+
+GLAPI void APIENTRY glVertexAttrib1fv(GLuint index, const GLfloat *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[476];
+ ((void (APIENTRY *)(GLuint index, const GLfloat *v)) _func)(index, v);
+}
+
+GLAPI void APIENTRY glVertexAttrib2f(GLuint index, GLfloat x, GLfloat y)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[481];
+ ((void (APIENTRY *)(GLuint index, GLfloat x, GLfloat y)) _func)(index, x, y);
+}
+
+GLAPI void APIENTRY glVertexAttrib2fv(GLuint index, const GLfloat *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[482];
+ ((void (APIENTRY *)(GLuint index, const GLfloat *v)) _func)(index, v);
+}
+
+GLAPI void APIENTRY glVertexAttrib3f(GLuint index, GLfloat x, GLfloat y, GLfloat z)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[487];
+ ((void (APIENTRY *)(GLuint index, GLfloat x, GLfloat y, GLfloat z)) _func)(index, x, y, z);
+}
+
+GLAPI void APIENTRY glVertexAttrib3fv(GLuint index, const GLfloat *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[488];
+ ((void (APIENTRY *)(GLuint index, const GLfloat *v)) _func)(index, v);
+}
+
+GLAPI void APIENTRY glVertexAttrib4f(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[501];
+ ((void (APIENTRY *)(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w)) _func)(index, x, y, z, w);
+}
+
+GLAPI void APIENTRY glVertexAttrib4fv(GLuint index, const GLfloat *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[502];
+ ((void (APIENTRY *)(GLuint index, const GLfloat *v)) _func)(index, v);
+}
+
+GLAPI void APIENTRY glVertexAttribPointer(GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *pointer)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[509];
+ ((void (APIENTRY *)(GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *pointer)) _func)(index, size, type, normalized, stride, pointer);
+}
+
+GLAPI void APIENTRY glBindBuffer(GLenum target, GLuint buffer)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[510];
+ ((void (APIENTRY *)(GLenum target, GLuint buffer)) _func)(target, buffer);
+}
+
+GLAPI void APIENTRY glBufferData(GLenum target, GLsizeiptr size, const GLvoid *data, GLenum usage)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[511];
+ ((void (APIENTRY *)(GLenum target, GLsizeiptr size, const GLvoid *data, GLenum usage)) _func)(target, size, data, usage);
+}
+
+GLAPI void APIENTRY glBufferSubData(GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid *data)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[512];
+ ((void (APIENTRY *)(GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid *data)) _func)(target, offset, size, data);
+}
+
+GLAPI void APIENTRY glDeleteBuffers(GLsizei n, const GLuint *buffer)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[513];
+ ((void (APIENTRY *)(GLsizei n, const GLuint *buffer)) _func)(n, buffer);
+}
+
+GLAPI void APIENTRY glGenBuffers(GLsizei n, GLuint *buffer)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[514];
+ ((void (APIENTRY *)(GLsizei n, GLuint *buffer)) _func)(n, buffer);
+}
+
+GLAPI void APIENTRY glGetBufferParameteriv(GLenum target, GLenum pname, GLint *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[515];
+ ((void (APIENTRY *)(GLenum target, GLenum pname, GLint *params)) _func)(target, pname, params);
+}
+
+GLAPI void APIENTRY glGetBufferPointervOES(GLenum target, GLenum pname, GLvoid **params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[516];
+ ((void (APIENTRY *)(GLenum target, GLenum pname, GLvoid **params)) _func)(target, pname, params);
+}
+
+GLAPI GLboolean APIENTRY glIsBuffer(GLuint buffer)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[518];
+ return ((GLboolean (APIENTRY *)(GLuint buffer)) _func)(buffer);
+}
+
+GLAPI GLvoid * APIENTRY glMapBufferOES(GLenum target, GLenum access)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[519];
+ return ((GLvoid * (APIENTRY *)(GLenum target, GLenum access)) _func)(target, access);
+}
+
+GLAPI GLboolean APIENTRY glUnmapBufferOES(GLenum target)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[520];
+ return ((GLboolean (APIENTRY *)(GLenum target)) _func)(target);
+}
+
+GLAPI void APIENTRY glCompileShader(GLuint shader)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[530];
+ ((void (APIENTRY *)(GLuint shader)) _func)(shader);
+}
+
+GLAPI void APIENTRY glGetActiveUniform(GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[535];
+ ((void (APIENTRY *)(GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name)) _func)(program, index, bufSize, length, size, type, name);
+}
+
+GLAPI void APIENTRY glGetShaderSource(GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[541];
+ ((void (APIENTRY *)(GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source)) _func)(shader, bufSize, length, source);
+}
+
+GLAPI GLint APIENTRY glGetUniformLocation(GLuint program, const GLchar *name)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[542];
+ return ((GLint (APIENTRY *)(GLuint program, const GLchar *name)) _func)(program, name);
+}
+
+GLAPI void APIENTRY glGetUniformfv(GLuint program, GLint location, GLfloat *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[543];
+ ((void (APIENTRY *)(GLuint program, GLint location, GLfloat *params)) _func)(program, location, params);
+}
+
+GLAPI void APIENTRY glGetUniformiv(GLuint program, GLint location, GLint *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[544];
+ ((void (APIENTRY *)(GLuint program, GLint location, GLint *params)) _func)(program, location, params);
+}
+
+GLAPI void APIENTRY glLinkProgram(GLuint program)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[545];
+ ((void (APIENTRY *)(GLuint program)) _func)(program);
+}
+
+GLAPI void APIENTRY glShaderSource(GLuint shader, GLsizei count, const GLchar **string, const GLint *length)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[546];
+ ((void (APIENTRY *)(GLuint shader, GLsizei count, const GLchar **string, const GLint *length)) _func)(shader, count, string, length);
+}
+
+GLAPI void APIENTRY glUniform1f(GLint location, GLfloat v0)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[547];
+ ((void (APIENTRY *)(GLint location, GLfloat v0)) _func)(location, v0);
+}
+
+GLAPI void APIENTRY glUniform1fv(GLint location, GLsizei count, const GLfloat *value)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[548];
+ ((void (APIENTRY *)(GLint location, GLsizei count, const GLfloat *value)) _func)(location, count, value);
+}
+
+GLAPI void APIENTRY glUniform1i(GLint location, GLint v0)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[549];
+ ((void (APIENTRY *)(GLint location, GLint v0)) _func)(location, v0);
+}
+
+GLAPI void APIENTRY glUniform1iv(GLint location, GLsizei count, const GLint *value)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[550];
+ ((void (APIENTRY *)(GLint location, GLsizei count, const GLint *value)) _func)(location, count, value);
+}
+
+GLAPI void APIENTRY glUniform2f(GLint location, GLfloat v0, GLfloat v1)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[551];
+ ((void (APIENTRY *)(GLint location, GLfloat v0, GLfloat v1)) _func)(location, v0, v1);
+}
+
+GLAPI void APIENTRY glUniform2fv(GLint location, GLsizei count, const GLfloat *value)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[552];
+ ((void (APIENTRY *)(GLint location, GLsizei count, const GLfloat *value)) _func)(location, count, value);
+}
+
+GLAPI void APIENTRY glUniform2i(GLint location, GLint v0, GLint v1)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[553];
+ ((void (APIENTRY *)(GLint location, GLint v0, GLint v1)) _func)(location, v0, v1);
+}
+
+GLAPI void APIENTRY glUniform2iv(GLint location, GLsizei count, const GLint *value)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[554];
+ ((void (APIENTRY *)(GLint location, GLsizei count, const GLint *value)) _func)(location, count, value);
+}
+
+GLAPI void APIENTRY glUniform3f(GLint location, GLfloat v0, GLfloat v1, GLfloat v2)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[555];
+ ((void (APIENTRY *)(GLint location, GLfloat v0, GLfloat v1, GLfloat v2)) _func)(location, v0, v1, v2);
+}
+
+GLAPI void APIENTRY glUniform3fv(GLint location, GLsizei count, const GLfloat *value)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[556];
+ ((void (APIENTRY *)(GLint location, GLsizei count, const GLfloat *value)) _func)(location, count, value);
+}
+
+GLAPI void APIENTRY glUniform3i(GLint location, GLint v0, GLint v1, GLint v2)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[557];
+ ((void (APIENTRY *)(GLint location, GLint v0, GLint v1, GLint v2)) _func)(location, v0, v1, v2);
+}
+
+GLAPI void APIENTRY glUniform3iv(GLint location, GLsizei count, const GLint *value)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[558];
+ ((void (APIENTRY *)(GLint location, GLsizei count, const GLint *value)) _func)(location, count, value);
+}
+
+GLAPI void APIENTRY glUniform4f(GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[559];
+ ((void (APIENTRY *)(GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3)) _func)(location, v0, v1, v2, v3);
+}
+
+GLAPI void APIENTRY glUniform4fv(GLint location, GLsizei count, const GLfloat *value)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[560];
+ ((void (APIENTRY *)(GLint location, GLsizei count, const GLfloat *value)) _func)(location, count, value);
+}
+
+GLAPI void APIENTRY glUniform4i(GLint location, GLint v0, GLint v1, GLint v2, GLint v3)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[561];
+ ((void (APIENTRY *)(GLint location, GLint v0, GLint v1, GLint v2, GLint v3)) _func)(location, v0, v1, v2, v3);
+}
+
+GLAPI void APIENTRY glUniform4iv(GLint location, GLsizei count, const GLint *value)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[562];
+ ((void (APIENTRY *)(GLint location, GLsizei count, const GLint *value)) _func)(location, count, value);
+}
+
+GLAPI void APIENTRY glUniformMatrix2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[563];
+ ((void (APIENTRY *)(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)) _func)(location, count, transpose, value);
+}
+
+GLAPI void APIENTRY glUniformMatrix3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[564];
+ ((void (APIENTRY *)(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)) _func)(location, count, transpose, value);
+}
+
+GLAPI void APIENTRY glUniformMatrix4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[565];
+ ((void (APIENTRY *)(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)) _func)(location, count, transpose, value);
+}
+
+GLAPI void APIENTRY glUseProgram(GLuint program)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[566];
+ ((void (APIENTRY *)(GLuint program)) _func)(program);
+}
+
+GLAPI void APIENTRY glValidateProgram(GLuint program)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[567];
+ ((void (APIENTRY *)(GLuint program)) _func)(program);
+}
+
+GLAPI void APIENTRY glBindAttribLocation(GLuint program, GLuint index, const GLchar *name)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[568];
+ ((void (APIENTRY *)(GLuint program, GLuint index, const GLchar *name)) _func)(program, index, name);
+}
+
+GLAPI void APIENTRY glGetActiveAttrib(GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[569];
+ ((void (APIENTRY *)(GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name)) _func)(program, index, bufSize, length, size, type, name);
+}
+
+GLAPI GLint APIENTRY glGetAttribLocation(GLuint program, const GLchar *name)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[570];
+ return ((GLint (APIENTRY *)(GLuint program, const GLchar *name)) _func)(program, name);
+}
+
+GLAPI void APIENTRY glClearDepthf(GLclampf depth)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[605];
+ ((void (APIENTRY *)(GLclampf depth)) _func)(depth);
+}
+
+GLAPI void APIENTRY glDepthRangef(GLclampf zNear, GLclampf zFar)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[606];
+ ((void (APIENTRY *)(GLclampf zNear, GLclampf zFar)) _func)(zNear, zFar);
+}
+
+GLAPI void APIENTRY glGetShaderPrecisionFormat(GLenum shadertype, GLenum precisiontype, GLint *range, GLint *precision)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[607];
+ ((void (APIENTRY *)(GLenum shadertype, GLenum precisiontype, GLint *range, GLint *precision)) _func)(shadertype, precisiontype, range, precision);
+}
+
+GLAPI void APIENTRY glReleaseShaderCompiler(void)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[608];
+ ((void (APIENTRY *)(void)) _func)();
+}
+
+GLAPI void APIENTRY glShaderBinary(GLsizei n, const GLuint *shaders, GLenum binaryformat, const GLvoid *binary, GLsizei length)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[609];
+ ((void (APIENTRY *)(GLsizei n, const GLuint *shaders, GLenum binaryformat, const GLvoid *binary, GLsizei length)) _func)(n, shaders, binaryformat, binary, length);
+}
+
+GLAPI void APIENTRY glGetProgramBinaryOES(GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, GLvoid *binary)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[610];
+ ((void (APIENTRY *)(GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, GLvoid *binary)) _func)(program, bufSize, length, binaryFormat, binary);
+}
+
+GLAPI void APIENTRY glProgramBinaryOES(GLuint program, GLenum binaryFormat, const GLvoid *binary, GLint length)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[611];
+ ((void (APIENTRY *)(GLuint program, GLenum binaryFormat, const GLvoid *binary, GLint length)) _func)(program, binaryFormat, binary, length);
+}
+
+GLAPI void APIENTRY glMultiDrawArraysEXT(GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[659];
+ ((void (APIENTRY *)(GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount)) _func)(mode, first, count, primcount);
+}
+
+GLAPI void APIENTRY glMultiDrawElementsEXT(GLenum mode, const GLsizei *count, GLenum type, const GLvoid **indices, GLsizei primcount)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[660];
+ ((void (APIENTRY *)(GLenum mode, const GLsizei *count, GLenum type, const GLvoid **indices, GLsizei primcount)) _func)(mode, count, type, indices, primcount);
+}
+
+GLAPI void APIENTRY glBlendFuncSeparate(GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[667];
+ ((void (APIENTRY *)(GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha)) _func)(sfactorRGB, dfactorRGB, sfactorAlpha, dfactorAlpha);
+}
+
+GLAPI void APIENTRY glGetVertexAttribPointerv(GLuint index, GLenum pname, GLvoid **pointer)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[727];
+ ((void (APIENTRY *)(GLuint index, GLenum pname, GLvoid **pointer)) _func)(index, pname, pointer);
+}
+
+GLAPI void APIENTRY glBlendEquationSeparate(GLenum modeRGB, GLenum modeA)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[857];
+ ((void (APIENTRY *)(GLenum modeRGB, GLenum modeA)) _func)(modeRGB, modeA);
+}
+
+GLAPI void APIENTRY glBindFramebuffer(GLenum target, GLuint framebuffer)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[858];
+ ((void (APIENTRY *)(GLenum target, GLuint framebuffer)) _func)(target, framebuffer);
+}
+
+GLAPI void APIENTRY glBindRenderbuffer(GLenum target, GLuint renderbuffer)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[859];
+ ((void (APIENTRY *)(GLenum target, GLuint renderbuffer)) _func)(target, renderbuffer);
+}
+
+GLAPI GLenum APIENTRY glCheckFramebufferStatus(GLenum target)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[860];
+ return ((GLenum (APIENTRY *)(GLenum target)) _func)(target);
+}
+
+GLAPI void APIENTRY glDeleteFramebuffers(GLsizei n, const GLuint *framebuffers)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[861];
+ ((void (APIENTRY *)(GLsizei n, const GLuint *framebuffers)) _func)(n, framebuffers);
+}
+
+GLAPI void APIENTRY glDeleteRenderbuffers(GLsizei n, const GLuint *renderbuffers)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[862];
+ ((void (APIENTRY *)(GLsizei n, const GLuint *renderbuffers)) _func)(n, renderbuffers);
+}
+
+GLAPI void APIENTRY glFramebufferRenderbuffer(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[863];
+ ((void (APIENTRY *)(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer)) _func)(target, attachment, renderbuffertarget, renderbuffer);
+}
+
+GLAPI void APIENTRY glFramebufferTexture2D(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[865];
+ ((void (APIENTRY *)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level)) _func)(target, attachment, textarget, texture, level);
+}
+
+GLAPI void APIENTRY glFramebufferTexture3DOES(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[866];
+ ((void (APIENTRY *)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset)) _func)(target, attachment, textarget, texture, level, zoffset);
+}
+
+GLAPI void APIENTRY glGenFramebuffers(GLsizei n, GLuint *framebuffers)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[867];
+ ((void (APIENTRY *)(GLsizei n, GLuint *framebuffers)) _func)(n, framebuffers);
+}
+
+GLAPI void APIENTRY glGenRenderbuffers(GLsizei n, GLuint *renderbuffers)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[868];
+ ((void (APIENTRY *)(GLsizei n, GLuint *renderbuffers)) _func)(n, renderbuffers);
+}
+
+GLAPI void APIENTRY glGenerateMipmap(GLenum target)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[869];
+ ((void (APIENTRY *)(GLenum target)) _func)(target);
+}
+
+GLAPI void APIENTRY glGetFramebufferAttachmentParameteriv(GLenum target, GLenum attachment, GLenum pname, GLint *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[870];
+ ((void (APIENTRY *)(GLenum target, GLenum attachment, GLenum pname, GLint *params)) _func)(target, attachment, pname, params);
+}
+
+GLAPI void APIENTRY glGetRenderbufferParameteriv(GLenum target, GLenum pname, GLint *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[871];
+ ((void (APIENTRY *)(GLenum target, GLenum pname, GLint *params)) _func)(target, pname, params);
+}
+
+GLAPI GLboolean APIENTRY glIsFramebuffer(GLuint framebuffer)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[872];
+ return ((GLboolean (APIENTRY *)(GLuint framebuffer)) _func)(framebuffer);
+}
+
+GLAPI GLboolean APIENTRY glIsRenderbuffer(GLuint renderbuffer)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[873];
+ return ((GLboolean (APIENTRY *)(GLuint renderbuffer)) _func)(renderbuffer);
+}
+
+GLAPI void APIENTRY glRenderbufferStorage(GLenum target, GLenum internalformat, GLsizei width, GLsizei height)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[874];
+ ((void (APIENTRY *)(GLenum target, GLenum internalformat, GLsizei width, GLsizei height)) _func)(target, internalformat, width, height);
+}
+
+GLAPI void APIENTRY glEGLImageTargetRenderbufferStorageOES(GLenum target, GLvoid *writeOffset)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[949];
+ ((void (APIENTRY *)(GLenum target, GLvoid *writeOffset)) _func)(target, writeOffset);
+}
+
+GLAPI void APIENTRY glEGLImageTargetTexture2DOES(GLenum target, GLvoid *writeOffset)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[950];
+ ((void (APIENTRY *)(GLenum target, GLvoid *writeOffset)) _func)(target, writeOffset);
+}
+
+/* does not need public_entries */
+#undef MAPI_TMP_PUBLIC_ENTRIES_NO_HIDDEN
+#endif /* MAPI_TMP_PUBLIC_ENTRIES_NO_HIDDEN */
+
+#ifdef MAPI_TMP_STUB_ASM_GCC_NO_HIDDEN
+__asm__(
+STUB_ASM_ENTRY("glCullFace")"\n"
+"\t"STUB_ASM_CODE("152")"\n"
+
+STUB_ASM_ENTRY("glFrontFace")"\n"
+"\t"STUB_ASM_CODE("157")"\n"
+
+STUB_ASM_ENTRY("glHint")"\n"
+"\t"STUB_ASM_CODE("158")"\n"
+
+STUB_ASM_ENTRY("glLineWidth")"\n"
+"\t"STUB_ASM_CODE("168")"\n"
+
+STUB_ASM_ENTRY("glScissor")"\n"
+"\t"STUB_ASM_CODE("176")"\n"
+
+STUB_ASM_ENTRY("glTexParameterf")"\n"
+"\t"STUB_ASM_CODE("178")"\n"
+
+STUB_ASM_ENTRY("glTexParameterfv")"\n"
+"\t"STUB_ASM_CODE("179")"\n"
+
+STUB_ASM_ENTRY("glTexParameteri")"\n"
+"\t"STUB_ASM_CODE("180")"\n"
+
+STUB_ASM_ENTRY("glTexParameteriv")"\n"
+"\t"STUB_ASM_CODE("181")"\n"
+
+STUB_ASM_ENTRY("glTexImage2D")"\n"
+"\t"STUB_ASM_CODE("183")"\n"
+
+STUB_ASM_ENTRY("glClear")"\n"
+"\t"STUB_ASM_CODE("203")"\n"
+
+STUB_ASM_ENTRY("glClearColor")"\n"
+"\t"STUB_ASM_CODE("206")"\n"
+
+STUB_ASM_ENTRY("glClearStencil")"\n"
+"\t"STUB_ASM_CODE("207")"\n"
+
+STUB_ASM_ENTRY("glStencilMask")"\n"
+"\t"STUB_ASM_CODE("209")"\n"
+
+STUB_ASM_ENTRY("glColorMask")"\n"
+"\t"STUB_ASM_CODE("210")"\n"
+
+STUB_ASM_ENTRY("glDepthMask")"\n"
+"\t"STUB_ASM_CODE("211")"\n"
+
+STUB_ASM_ENTRY("glDisable")"\n"
+"\t"STUB_ASM_CODE("214")"\n"
+
+STUB_ASM_ENTRY("glEnable")"\n"
+"\t"STUB_ASM_CODE("215")"\n"
+
+STUB_ASM_ENTRY("glFinish")"\n"
+"\t"STUB_ASM_CODE("216")"\n"
+
+STUB_ASM_ENTRY("glFlush")"\n"
+"\t"STUB_ASM_CODE("217")"\n"
+
+STUB_ASM_ENTRY("glBlendFunc")"\n"
+"\t"STUB_ASM_CODE("241")"\n"
+
+STUB_ASM_ENTRY("glStencilFunc")"\n"
+"\t"STUB_ASM_CODE("243")"\n"
+
+STUB_ASM_ENTRY("glStencilOp")"\n"
+"\t"STUB_ASM_CODE("244")"\n"
+
+STUB_ASM_ENTRY("glDepthFunc")"\n"
+"\t"STUB_ASM_CODE("245")"\n"
+
+STUB_ASM_ENTRY("glPixelStorei")"\n"
+"\t"STUB_ASM_CODE("250")"\n"
+
+STUB_ASM_ENTRY("glReadPixels")"\n"
+"\t"STUB_ASM_CODE("256")"\n"
+
+STUB_ASM_ENTRY("glGetBooleanv")"\n"
+"\t"STUB_ASM_CODE("258")"\n"
+
+STUB_ASM_ENTRY("glGetError")"\n"
+"\t"STUB_ASM_CODE("261")"\n"
+
+STUB_ASM_ENTRY("glGetFloatv")"\n"
+"\t"STUB_ASM_CODE("262")"\n"
+
+STUB_ASM_ENTRY("glGetIntegerv")"\n"
+"\t"STUB_ASM_CODE("263")"\n"
+
+STUB_ASM_ENTRY("glGetString")"\n"
+"\t"STUB_ASM_CODE("275")"\n"
+
+STUB_ASM_ENTRY("glGetTexParameterfv")"\n"
+"\t"STUB_ASM_CODE("282")"\n"
+
+STUB_ASM_ENTRY("glGetTexParameteriv")"\n"
+"\t"STUB_ASM_CODE("283")"\n"
+
+STUB_ASM_ENTRY("glIsEnabled")"\n"
+"\t"STUB_ASM_CODE("286")"\n"
+
+STUB_ASM_ENTRY("glViewport")"\n"
+"\t"STUB_ASM_CODE("305")"\n"
+
+STUB_ASM_ENTRY("glBindTexture")"\n"
+"\t"STUB_ASM_CODE("307")"\n"
+
+STUB_ASM_ENTRY("glDrawArrays")"\n"
+"\t"STUB_ASM_CODE("310")"\n"
+
+STUB_ASM_ENTRY("glDrawElements")"\n"
+"\t"STUB_ASM_CODE("311")"\n"
+
+STUB_ASM_ENTRY("glPolygonOffset")"\n"
+"\t"STUB_ASM_CODE("319")"\n"
+
+STUB_ASM_ENTRY("glCopyTexImage2D")"\n"
+"\t"STUB_ASM_CODE("324")"\n"
+
+STUB_ASM_ENTRY("glCopyTexSubImage2D")"\n"
+"\t"STUB_ASM_CODE("326")"\n"
+
+STUB_ASM_ENTRY("glDeleteTextures")"\n"
+"\t"STUB_ASM_CODE("327")"\n"
+
+STUB_ASM_ENTRY("glGenTextures")"\n"
+"\t"STUB_ASM_CODE("328")"\n"
+
+STUB_ASM_ENTRY("glIsTexture")"\n"
+"\t"STUB_ASM_CODE("330")"\n"
+
+STUB_ASM_ENTRY("glTexSubImage2D")"\n"
+"\t"STUB_ASM_CODE("333")"\n"
+
+STUB_ASM_ENTRY("glBlendColor")"\n"
+"\t"STUB_ASM_CODE("336")"\n"
+
+STUB_ASM_ENTRY("glBlendEquation")"\n"
+"\t"STUB_ASM_CODE("337")"\n"
+
+STUB_ASM_ENTRY("glTexImage3DOES")"\n"
+"\t"STUB_ASM_CODE("371")"\n"
+
+STUB_ASM_ENTRY("glTexSubImage3DOES")"\n"
+"\t"STUB_ASM_CODE("372")"\n"
+
+STUB_ASM_ENTRY("glCopyTexSubImage3DOES")"\n"
+"\t"STUB_ASM_CODE("373")"\n"
+
+STUB_ASM_ENTRY("glActiveTexture")"\n"
+"\t"STUB_ASM_CODE("374")"\n"
+
+STUB_ASM_ENTRY("glAttachShader")"\n"
+"\t"STUB_ASM_CODE("408")"\n"
+
+STUB_ASM_ENTRY("glCreateProgram")"\n"
+"\t"STUB_ASM_CODE("409")"\n"
+
+STUB_ASM_ENTRY("glCreateShader")"\n"
+"\t"STUB_ASM_CODE("410")"\n"
+
+STUB_ASM_ENTRY("glDeleteProgram")"\n"
+"\t"STUB_ASM_CODE("411")"\n"
+
+STUB_ASM_ENTRY("glDeleteShader")"\n"
+"\t"STUB_ASM_CODE("412")"\n"
+
+STUB_ASM_ENTRY("glDetachShader")"\n"
+"\t"STUB_ASM_CODE("413")"\n"
+
+STUB_ASM_ENTRY("glGetAttachedShaders")"\n"
+"\t"STUB_ASM_CODE("414")"\n"
+
+STUB_ASM_ENTRY("glGetProgramInfoLog")"\n"
+"\t"STUB_ASM_CODE("415")"\n"
+
+STUB_ASM_ENTRY("glGetProgramiv")"\n"
+"\t"STUB_ASM_CODE("416")"\n"
+
+STUB_ASM_ENTRY("glGetShaderInfoLog")"\n"
+"\t"STUB_ASM_CODE("417")"\n"
+
+STUB_ASM_ENTRY("glGetShaderiv")"\n"
+"\t"STUB_ASM_CODE("418")"\n"
+
+STUB_ASM_ENTRY("glIsProgram")"\n"
+"\t"STUB_ASM_CODE("419")"\n"
+
+STUB_ASM_ENTRY("glIsShader")"\n"
+"\t"STUB_ASM_CODE("420")"\n"
+
+STUB_ASM_ENTRY("glStencilFuncSeparate")"\n"
+"\t"STUB_ASM_CODE("421")"\n"
+
+STUB_ASM_ENTRY("glStencilMaskSeparate")"\n"
+"\t"STUB_ASM_CODE("422")"\n"
+
+STUB_ASM_ENTRY("glStencilOpSeparate")"\n"
+"\t"STUB_ASM_CODE("423")"\n"
+
+STUB_ASM_ENTRY("glSampleCoverage")"\n"
+"\t"STUB_ASM_CODE("445")"\n"
+
+STUB_ASM_ENTRY("glCompressedTexImage2D")"\n"
+"\t"STUB_ASM_CODE("447")"\n"
+
+STUB_ASM_ENTRY("glCompressedTexImage3DOES")"\n"
+"\t"STUB_ASM_CODE("448")"\n"
+
+STUB_ASM_ENTRY("glCompressedTexSubImage2D")"\n"
+"\t"STUB_ASM_CODE("450")"\n"
+
+STUB_ASM_ENTRY("glCompressedTexSubImage3DOES")"\n"
+"\t"STUB_ASM_CODE("451")"\n"
+
+STUB_ASM_ENTRY("glDisableVertexAttribArray")"\n"
+"\t"STUB_ASM_CODE("453")"\n"
+
+STUB_ASM_ENTRY("glEnableVertexAttribArray")"\n"
+"\t"STUB_ASM_CODE("454")"\n"
+
+STUB_ASM_ENTRY("glGetVertexAttribfv")"\n"
+"\t"STUB_ASM_CODE("462")"\n"
+
+STUB_ASM_ENTRY("glGetVertexAttribiv")"\n"
+"\t"STUB_ASM_CODE("463")"\n"
+
+STUB_ASM_ENTRY("glVertexAttrib1f")"\n"
+"\t"STUB_ASM_CODE("475")"\n"
+
+STUB_ASM_ENTRY("glVertexAttrib1fv")"\n"
+"\t"STUB_ASM_CODE("476")"\n"
+
+STUB_ASM_ENTRY("glVertexAttrib2f")"\n"
+"\t"STUB_ASM_CODE("481")"\n"
+
+STUB_ASM_ENTRY("glVertexAttrib2fv")"\n"
+"\t"STUB_ASM_CODE("482")"\n"
+
+STUB_ASM_ENTRY("glVertexAttrib3f")"\n"
+"\t"STUB_ASM_CODE("487")"\n"
+
+STUB_ASM_ENTRY("glVertexAttrib3fv")"\n"
+"\t"STUB_ASM_CODE("488")"\n"
+
+STUB_ASM_ENTRY("glVertexAttrib4f")"\n"
+"\t"STUB_ASM_CODE("501")"\n"
+
+STUB_ASM_ENTRY("glVertexAttrib4fv")"\n"
+"\t"STUB_ASM_CODE("502")"\n"
+
+STUB_ASM_ENTRY("glVertexAttribPointer")"\n"
+"\t"STUB_ASM_CODE("509")"\n"
+
+STUB_ASM_ENTRY("glBindBuffer")"\n"
+"\t"STUB_ASM_CODE("510")"\n"
+
+STUB_ASM_ENTRY("glBufferData")"\n"
+"\t"STUB_ASM_CODE("511")"\n"
+
+STUB_ASM_ENTRY("glBufferSubData")"\n"
+"\t"STUB_ASM_CODE("512")"\n"
+
+STUB_ASM_ENTRY("glDeleteBuffers")"\n"
+"\t"STUB_ASM_CODE("513")"\n"
+
+STUB_ASM_ENTRY("glGenBuffers")"\n"
+"\t"STUB_ASM_CODE("514")"\n"
+
+STUB_ASM_ENTRY("glGetBufferParameteriv")"\n"
+"\t"STUB_ASM_CODE("515")"\n"
+
+STUB_ASM_ENTRY("glGetBufferPointervOES")"\n"
+"\t"STUB_ASM_CODE("516")"\n"
+
+STUB_ASM_ENTRY("glIsBuffer")"\n"
+"\t"STUB_ASM_CODE("518")"\n"
+
+STUB_ASM_ENTRY("glMapBufferOES")"\n"
+"\t"STUB_ASM_CODE("519")"\n"
+
+STUB_ASM_ENTRY("glUnmapBufferOES")"\n"
+"\t"STUB_ASM_CODE("520")"\n"
+
+STUB_ASM_ENTRY("glCompileShader")"\n"
+"\t"STUB_ASM_CODE("530")"\n"
+
+STUB_ASM_ENTRY("glGetActiveUniform")"\n"
+"\t"STUB_ASM_CODE("535")"\n"
+
+STUB_ASM_ENTRY("glGetShaderSource")"\n"
+"\t"STUB_ASM_CODE("541")"\n"
+
+STUB_ASM_ENTRY("glGetUniformLocation")"\n"
+"\t"STUB_ASM_CODE("542")"\n"
+
+STUB_ASM_ENTRY("glGetUniformfv")"\n"
+"\t"STUB_ASM_CODE("543")"\n"
+
+STUB_ASM_ENTRY("glGetUniformiv")"\n"
+"\t"STUB_ASM_CODE("544")"\n"
+
+STUB_ASM_ENTRY("glLinkProgram")"\n"
+"\t"STUB_ASM_CODE("545")"\n"
+
+STUB_ASM_ENTRY("glShaderSource")"\n"
+"\t"STUB_ASM_CODE("546")"\n"
+
+STUB_ASM_ENTRY("glUniform1f")"\n"
+"\t"STUB_ASM_CODE("547")"\n"
+
+STUB_ASM_ENTRY("glUniform1fv")"\n"
+"\t"STUB_ASM_CODE("548")"\n"
+
+STUB_ASM_ENTRY("glUniform1i")"\n"
+"\t"STUB_ASM_CODE("549")"\n"
+
+STUB_ASM_ENTRY("glUniform1iv")"\n"
+"\t"STUB_ASM_CODE("550")"\n"
+
+STUB_ASM_ENTRY("glUniform2f")"\n"
+"\t"STUB_ASM_CODE("551")"\n"
+
+STUB_ASM_ENTRY("glUniform2fv")"\n"
+"\t"STUB_ASM_CODE("552")"\n"
+
+STUB_ASM_ENTRY("glUniform2i")"\n"
+"\t"STUB_ASM_CODE("553")"\n"
+
+STUB_ASM_ENTRY("glUniform2iv")"\n"
+"\t"STUB_ASM_CODE("554")"\n"
+
+STUB_ASM_ENTRY("glUniform3f")"\n"
+"\t"STUB_ASM_CODE("555")"\n"
+
+STUB_ASM_ENTRY("glUniform3fv")"\n"
+"\t"STUB_ASM_CODE("556")"\n"
+
+STUB_ASM_ENTRY("glUniform3i")"\n"
+"\t"STUB_ASM_CODE("557")"\n"
+
+STUB_ASM_ENTRY("glUniform3iv")"\n"
+"\t"STUB_ASM_CODE("558")"\n"
+
+STUB_ASM_ENTRY("glUniform4f")"\n"
+"\t"STUB_ASM_CODE("559")"\n"
+
+STUB_ASM_ENTRY("glUniform4fv")"\n"
+"\t"STUB_ASM_CODE("560")"\n"
+
+STUB_ASM_ENTRY("glUniform4i")"\n"
+"\t"STUB_ASM_CODE("561")"\n"
+
+STUB_ASM_ENTRY("glUniform4iv")"\n"
+"\t"STUB_ASM_CODE("562")"\n"
+
+STUB_ASM_ENTRY("glUniformMatrix2fv")"\n"
+"\t"STUB_ASM_CODE("563")"\n"
+
+STUB_ASM_ENTRY("glUniformMatrix3fv")"\n"
+"\t"STUB_ASM_CODE("564")"\n"
+
+STUB_ASM_ENTRY("glUniformMatrix4fv")"\n"
+"\t"STUB_ASM_CODE("565")"\n"
+
+STUB_ASM_ENTRY("glUseProgram")"\n"
+"\t"STUB_ASM_CODE("566")"\n"
+
+STUB_ASM_ENTRY("glValidateProgram")"\n"
+"\t"STUB_ASM_CODE("567")"\n"
+
+STUB_ASM_ENTRY("glBindAttribLocation")"\n"
+"\t"STUB_ASM_CODE("568")"\n"
+
+STUB_ASM_ENTRY("glGetActiveAttrib")"\n"
+"\t"STUB_ASM_CODE("569")"\n"
+
+STUB_ASM_ENTRY("glGetAttribLocation")"\n"
+"\t"STUB_ASM_CODE("570")"\n"
+
+STUB_ASM_ENTRY("glClearDepthf")"\n"
+"\t"STUB_ASM_CODE("605")"\n"
+
+STUB_ASM_ENTRY("glDepthRangef")"\n"
+"\t"STUB_ASM_CODE("606")"\n"
+
+STUB_ASM_ENTRY("glGetShaderPrecisionFormat")"\n"
+"\t"STUB_ASM_CODE("607")"\n"
+
+STUB_ASM_ENTRY("glReleaseShaderCompiler")"\n"
+"\t"STUB_ASM_CODE("608")"\n"
+
+STUB_ASM_ENTRY("glShaderBinary")"\n"
+"\t"STUB_ASM_CODE("609")"\n"
+
+STUB_ASM_ENTRY("glGetProgramBinaryOES")"\n"
+"\t"STUB_ASM_CODE("610")"\n"
+
+STUB_ASM_ENTRY("glProgramBinaryOES")"\n"
+"\t"STUB_ASM_CODE("611")"\n"
+
+STUB_ASM_ENTRY("glMultiDrawArraysEXT")"\n"
+"\t"STUB_ASM_CODE("659")"\n"
+
+STUB_ASM_ENTRY("glMultiDrawElementsEXT")"\n"
+"\t"STUB_ASM_CODE("660")"\n"
+
+STUB_ASM_ENTRY("glBlendFuncSeparate")"\n"
+"\t"STUB_ASM_CODE("667")"\n"
+
+STUB_ASM_ENTRY("glGetVertexAttribPointerv")"\n"
+"\t"STUB_ASM_CODE("727")"\n"
+
+STUB_ASM_ENTRY("glBlendEquationSeparate")"\n"
+"\t"STUB_ASM_CODE("857")"\n"
+
+STUB_ASM_ENTRY("glBindFramebuffer")"\n"
+"\t"STUB_ASM_CODE("858")"\n"
+
+STUB_ASM_ENTRY("glBindRenderbuffer")"\n"
+"\t"STUB_ASM_CODE("859")"\n"
+
+STUB_ASM_ENTRY("glCheckFramebufferStatus")"\n"
+"\t"STUB_ASM_CODE("860")"\n"
+
+STUB_ASM_ENTRY("glDeleteFramebuffers")"\n"
+"\t"STUB_ASM_CODE("861")"\n"
+
+STUB_ASM_ENTRY("glDeleteRenderbuffers")"\n"
+"\t"STUB_ASM_CODE("862")"\n"
+
+STUB_ASM_ENTRY("glFramebufferRenderbuffer")"\n"
+"\t"STUB_ASM_CODE("863")"\n"
+
+STUB_ASM_ENTRY("glFramebufferTexture2D")"\n"
+"\t"STUB_ASM_CODE("865")"\n"
+
+STUB_ASM_ENTRY("glFramebufferTexture3DOES")"\n"
+"\t"STUB_ASM_CODE("866")"\n"
+
+STUB_ASM_ENTRY("glGenFramebuffers")"\n"
+"\t"STUB_ASM_CODE("867")"\n"
+
+STUB_ASM_ENTRY("glGenRenderbuffers")"\n"
+"\t"STUB_ASM_CODE("868")"\n"
+
+STUB_ASM_ENTRY("glGenerateMipmap")"\n"
+"\t"STUB_ASM_CODE("869")"\n"
+
+STUB_ASM_ENTRY("glGetFramebufferAttachmentParameteriv")"\n"
+"\t"STUB_ASM_CODE("870")"\n"
+
+STUB_ASM_ENTRY("glGetRenderbufferParameteriv")"\n"
+"\t"STUB_ASM_CODE("871")"\n"
+
+STUB_ASM_ENTRY("glIsFramebuffer")"\n"
+"\t"STUB_ASM_CODE("872")"\n"
+
+STUB_ASM_ENTRY("glIsRenderbuffer")"\n"
+"\t"STUB_ASM_CODE("873")"\n"
+
+STUB_ASM_ENTRY("glRenderbufferStorage")"\n"
+"\t"STUB_ASM_CODE("874")"\n"
+
+STUB_ASM_ENTRY("glEGLImageTargetRenderbufferStorageOES")"\n"
+"\t"STUB_ASM_CODE("949")"\n"
+
+STUB_ASM_ENTRY("glEGLImageTargetTexture2DOES")"\n"
+"\t"STUB_ASM_CODE("950")"\n"
+
+);
+#undef MAPI_TMP_STUB_ASM_GCC_NO_HIDDEN
+#endif /* MAPI_TMP_STUB_ASM_GCC_NO_HIDDEN */
diff --git a/src/mapi/generate_glapi.mk b/src/mapi/generate_glapi.mk
deleted file mode 100644
index 604983ea698..00000000000
--- a/src/mapi/generate_glapi.mk
+++ /dev/null
@@ -1,43 +0,0 @@
-GLAPI := $(LOCAL_PATH)/glapi/gen
-
-GEN := $(glapi_OUT)/glapi/glapidispatch.h
-$(GEN): PRIVATE_CUSTOM_TOOL := python $(GLAPI)/gl_table.py -f $(glapi_XML) -c -m remap_table > $(GEN)
-$(GEN): $(glapi_XML)
- $(transform-generated-source)
-
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-GEN := $(glapi_OUT)/glapi/glapioffsets.h
-$(GEN): PRIVATE_CUSTOM_TOOL := python $(GLAPI)/gl_offsets.py -f $(glapi_XML) -c > $(GEN)
-$(GEN): $(glapi_XML)
- $(transform-generated-source)
-
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-GEN := $(glapi_OUT)/glapi/glapitable.h
-$(GEN): PRIVATE_CUSTOM_TOOL := python $(GLAPI)/gl_table.py -f $(glapi_XML) -c > $(GEN)
-$(GEN): $(glapi_XML)
- $(transform-generated-source)
-
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-GEN := $(glapi_OUT)/glapi/glapitemp.h
-$(GEN): PRIVATE_CUSTOM_TOOL := python $(GLAPI)/gl_apitemp.py -f $(glapi_XML) -c > $(GEN)
-$(GEN): $(glapi_XML)
- $(transform-generated-source)
-
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-GEN := $(glapi_OUT)/glapi/glprocs.h
-$(GEN): PRIVATE_CUSTOM_TOOL := python $(GLAPI)/gl_procs.py -f $(glapi_XML) -c > $(GEN)
-$(GEN): $(glapi_XML)
- $(transform-generated-source)
-
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-GEN := $(glapi_OUT)/main/remap_helper.h
-$(GEN): PRIVATE_CUSTOM_TOOL := python $(GLAPI)/remap_helper.py -f $(glapi_XML) > $(GEN)
-$(GEN): $(glapi_XML)
- $(transform-generated-source)
-
-LOCAL_GENERATED_SOURCES += $(GEN)
diff --git a/src/mapi/glapi/Makefile b/src/mapi/glapi/Makefile
index ca9381d4253..bb4ed6585d9 100644
--- a/src/mapi/glapi/Makefile
+++ b/src/mapi/glapi/Makefile
@@ -8,46 +8,70 @@ TARGET = glapi
MAPI = $(TOP)/src/mapi/mapi
include sources.mak
-GLAPI_OBJECTS = $(GLAPI_SOURCES:.c=.o)
-GLAPI_ASM_OBJECTS = $(GLAPI_ASM_SOURCES:.S=.o)
-
include $(MAPI)/sources.mak
-MAPI_GLAPI_OBJECTS := $(MAPI_GLAPI_SOURCES:.c=.o)
-MAPI_GLAPI_SOURCES := $(addprefix $(MAPI)/, $(MAPI_GLAPI_SOURCES))
-
-TARGET_OBJECTS = $(GLAPI_OBJECTS) $(GLAPI_ASM_OBJECTS) $(MAPI_GLAPI_OBJECTS)
-INCLUDE_DIRS = \
+glapi_CPPFLAGS := \
-I$(TOP)/include \
-I$(TOP)/src/mapi \
-I$(TOP)/src/mesa
+ifeq ($(SHARED_GLAPI),1)
+glapi_CPPFLAGS += \
+ -DMAPI_MODE_BRIDGE \
+ -DMAPI_ABI_HEADER=\"glapi/glapi_mapi_tmp.h\"
+glapi_SOURCES := $(addprefix $(MAPI)/, $(MAPI_BRIDGE_SOURCES))
+
+glapi_GLAPI_OBJECTS :=
+glapi_ASM_OBJECTS :=
+glapi_MAPI_OBJECTS := $(MAPI_BRIDGE_SOURCES:.c=.o)
+else
+glapi_CPPFLAGS += -DMAPI_MODE_UTIL
+glapi_SOURCES := $(GLAPI_SOURCES) $(addprefix $(MAPI)/, $(MAPI_UTIL_SOURCES))
+
+glapi_GLAPI_OBJECTS := $(GLAPI_SOURCES:.c=.o)
+glapi_ASM_OBJECTS := $(GLAPI_ASM_SOURCES:.S=.o)
+glapi_MAPI_OBJECTS := $(MAPI_UTIL_SOURCES:.c=.o)
+endif # SHARED_GLAPI
+
+glapi_OBJECTS := \
+ $(glapi_GLAPI_OBJECTS) \
+ $(glapi_ASM_OBJECTS) \
+ $(glapi_MAPI_OBJECTS)
+
default: depend lib$(TARGET).a
-lib$(TARGET).a: $(TARGET_OBJECTS)
- @$(MKLIB) -o $(TARGET) -static $(TARGET_OBJECTS)
+lib$(TARGET).a: $(glapi_OBJECTS)
+ @$(MKLIB) -o $(TARGET) -static $(glapi_OBJECTS)
-$(GLAPI_OBJECTS): %.o: %.c
- $(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $< -o $@
+$(glapi_GLAPI_OBJECTS): %.o: %.c
+ $(CC) -c $(glapi_CPPFLAGS) $(CFLAGS) $< -o $@
-$(GLAPI_ASM_OBJECTS): %.o: %.S
- $(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $< -o $@
+$(glapi_ASM_OBJECTS): %.o: %.S
+ $(CC) -c $(glapi_CPPFLAGS) $(CFLAGS) $< -o $@
-$(MAPI_GLAPI_OBJECTS): %.o: $(MAPI)/%.c
- $(CC) -c $(INCLUDE_DIRS) $(CFLAGS) -DMAPI_GLAPI_CURRENT $< -o $@
+$(glapi_MAPI_OBJECTS): %.o: $(MAPI)/%.c
+ $(CC) -c $(glapi_CPPFLAGS) $(CFLAGS) $< -o $@
install:
clean:
- -rm -f $(TARGET_OBJECTS)
+ -rm -f $(glapi_OBJECTS)
-rm -f lib$(TARGET).a
-rm -f depend depend.bak
-depend: $(GLAPI_SOURCES) $(MAPI_GLAPI_SOURCES)
+ifeq ($(SHARED_GLAPI),1)
+# workaround a bug in makedepend
+makedepend_CPPFLAGS := \
+ $(filter-out -DMAPI_ABI_HEADER=%, $(glapi_CPPFLAGS))
+$(glapi_OBJECTS): glapi_mapi_tmp.h
+else
+makedepend_CPPFLAGS := $(glapi_CPPFLAGS)
+endif
+
+depend: $(glapi_SOURCES)
@ echo "running $(MKDEP)"
@ touch depend
- @$(MKDEP) $(MKDEP_OPTIONS) -f- $(DEFINES) $(INCLUDE_DIRS) \
- -DMAPI_GLAPI_CURRENT $(GLAPI_SOURCES) $(MAPI_GLAPI_SOURCES) \
- 2>/dev/null | sed -e 's,^$(MAPI)/,,' > depend
+ @$(MKDEP) $(MKDEP_OPTIONS) -f- $(DEFINES) $(makedepend_CPPFLAGS) \
+ $(glapi_SOURCES) 2>/dev/null | sed -e 's,^$(MAPI)/,,' > depend
-include depend
diff --git a/src/mapi/glapi/SConscript b/src/mapi/glapi/SConscript
index 4ef855fc350..276b2160246 100644
--- a/src/mapi/glapi/SConscript
+++ b/src/mapi/glapi/SConscript
@@ -9,7 +9,7 @@ if env['platform'] != 'winddk':
env = env.Clone()
env.Append(CPPDEFINES = [
- 'MAPI_GLAPI_CURRENT',
+ 'MAPI_MODE_UTIL',
])
if env['platform'] == 'windows':
@@ -17,6 +17,11 @@ if env['platform'] != 'winddk':
'_GDI32_', # prevent gl* being declared __declspec(dllimport) in MS headers
'BUILD_GL32', # declare gl* as __declspec(dllexport) in Mesa headers
])
+ if env['gles']:
+ env.Append(CPPDEFINES = ['_GLAPI_DLL_EXPORTS'])
+ else:
+ # prevent _glapi_* from being declared __declspec(dllimport)
+ env.Append(CPPDEFINES = ['_GLAPI_NO_EXPORTS'])
env.Append(CPPPATH = [
'#/src/mapi',
@@ -29,6 +34,7 @@ if env['platform'] != 'winddk':
'glapi_getproc.c',
'glapi_nop.c',
'glthread.c',
+ 'glapi.c',
]
mapi_sources = [
diff --git a/src/mapi/glapi/gen-es/Makefile b/src/mapi/glapi/gen-es/Makefile
index 837579248f7..7a5bb35ca11 100644
--- a/src/mapi/glapi/gen-es/Makefile
+++ b/src/mapi/glapi/gen-es/Makefile
@@ -1,18 +1,14 @@
TOP = ../../../..
+MAPI = $(TOP)/src/mapi/mapi
GLAPI = ../gen
include $(TOP)/configs/current
OUTPUTS := \
- glapi/glapitable.h \
- glapi/glapitemp.h \
- glapi/glprocs.h \
- glapi/glapi_sparc.S \
- glapi/glapi_x86-64.S \
- glapi/glapi_x86.S \
+ glapi_mapi_tmp.h \
main/glapidispatch.h \
main/remap_helper.h
-COMMON = gl_XML.py glX_XML.py license.py typeexpr.py
+COMMON = gl_and_es_API.xml gl_XML.py glX_XML.py license.py typeexpr.py
COMMON := $(addprefix $(GLAPI)/, $(COMMON))
ES1_APIXML := es1_API.xml
@@ -28,41 +24,41 @@ ES2_DEPS = $(ES2_APIXML) base2_API.xml es2_EXT.xml es_EXT.xml \
ES1_OUTPUTS := $(addprefix $(ES1_OUTPUT_DIR)/, $(OUTPUTS))
ES2_OUTPUTS := $(addprefix $(ES2_OUTPUT_DIR)/, $(OUTPUTS))
-all: es1 es2
+SHARED_GLAPI_APIXML := $(GLAPI)/gl_and_es_API.xml
+SHARED_GLAPI_OUTPUT_DIR := $(TOP)/src/mapi/shared-glapi
+SHARED_GLAPI_DEPS := $(SHARED_GLAPI_APIXML)
+SHARED_GLAPI_OUTPUTS = $(SHARED_GLAPI_OUTPUT_DIR)/glapi_mapi_tmp.h
+
+all: es1 es2 shared-glapi
es1: $(ES1_OUTPUTS)
es2: $(ES2_OUTPUTS)
+shared-glapi: $(SHARED_GLAPI_OUTPUTS)
$(ES1_OUTPUTS): APIXML := $(ES1_APIXML)
-$(ES2_OUTPUTS): APIXML := $(ES2_APIXML)
+$(ES1_OUTPUTS): PRINTER := es1api
$(ES1_OUTPUTS): $(ES1_DEPS)
+
+$(ES2_OUTPUTS): APIXML := $(ES2_APIXML)
+$(ES2_OUTPUTS): PRINTER := es2api
$(ES2_OUTPUTS): $(ES2_DEPS)
+$(SHARED_GLAPI_OUTPUTS): APIXML := $(SHARED_GLAPI_APIXML)
+$(SHARED_GLAPI_OUTPUTS): PRINTER := shared-glapi
+$(SHARED_GLAPI_OUTPUTS): $(SHARED_GLAPI_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)
-
-%/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)
-
-%/glapi_sparc.S: $(GLAPI)/gl_SPARC_asm.py $(COMMON)
- $(call gen-glapi)
-
-%/glapi_x86-64.S: $(GLAPI)/gl_x86-64_asm.py $(COMMON)
- $(call gen-glapi)
+%/glapi_mapi_tmp.h: $(MAPI)/mapi_abi.py $(COMMON)
+ @mkdir -p $(dir $@)
+ $(PYTHON2) $(PYTHON_FLAGS) $< \
+ --printer $(PRINTER) --mode lib $(GLAPI)/gl_and_es_API.xml > $@
-%/glapi_x86.S: $(GLAPI)/gl_x86_asm.py $(COMMON)
- $(call gen-glapi)
+%/main/glapidispatch.h: $(GLAPI)/gl_table.py $(COMMON)
+ $(call gen-glapi,-c -m remap_table)
%/main/remap_helper.h: $(GLAPI)/remap_helper.py $(COMMON)
$(call gen-glapi)
@@ -81,12 +77,15 @@ verify_xml:
@rm -f tmp.xml
clean-es1:
- -rm -rf $(ES1_OUTPUT_DIR)/glapi
+ -rm -f $(ES1_OUTPUTS)
-rm -rf $(ES1_OUTPUT_DIR)/main
clean-es2:
- -rm -rf $(ES2_OUTPUT_DIR)/glapi
+ -rm -f $(ES2_OUTPUTS)
-rm -rf $(ES2_OUTPUT_DIR)/main
-clean: clean-es1 clean-es2
+clean-shared-glapi:
+ -rm -f $(SHARED_GLAPI_OUTPUTS)
+
+clean: clean-es1 clean-es2 clean-shared-glapi
-rm -f *~ *.pyc *.pyo
diff --git a/src/mapi/glapi/gen/ARB_ES2_compatibility.xml b/src/mapi/glapi/gen/ARB_ES2_compatibility.xml
new file mode 100644
index 00000000000..d52a88c6036
--- /dev/null
+++ b/src/mapi/glapi/gen/ARB_ES2_compatibility.xml
@@ -0,0 +1,58 @@
+<?xml version="1.0"?>
+<!DOCTYPE OpenGLAPI SYSTEM "gl_API.dtd">
+
+<OpenGLAPI>
+
+<category name="GL_ARB_ES2_compatibility" number="95">
+ <enum name="FIXED" count="1" value="0x140C"/>
+ <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_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>
+
+</OpenGLAPI>
diff --git a/src/mapi/glapi/gen/ARB_draw_buffers_blend.xml b/src/mapi/glapi/gen/ARB_draw_buffers_blend.xml
new file mode 100644
index 00000000000..0b6947cc5f3
--- /dev/null
+++ b/src/mapi/glapi/gen/ARB_draw_buffers_blend.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<!DOCTYPE OpenGLAPI SYSTEM "gl_API.dtd">
+
+<!-- Note: no GLX protocol info yet. -->
+
+
+<OpenGLAPI>
+
+<category name="GL_ARB_draw_buffers_blend" number="69">
+
+ <function name="BlendEquationiARB" offset="assign">
+ <param name="buf" type="GLuint"/>
+ <param name="mode" type="GLenum"/>
+ </function>
+
+ <function name="BlendEquationSeparateiARB" offset="assign">
+ <param name="buf" type="GLuint"/>
+ <param name="modeRGB" type="GLenum"/>
+ <param name="modeA" type="GLenum"/>
+ </function>
+
+ <function name="BlendFunciARB" offset="assign">
+ <param name="buf" type="GLuint"/>
+ <param name="src" type="GLenum"/>
+ <param name="dst" type="GLenum"/>
+ </function>
+
+ <function name="BlendFuncSeparateiARB" offset="assign">
+ <param name="buf" type="GLuint"/>
+ <param name="srcRGB" type="GLenum"/>
+ <param name="dstRGB" type="GLenum"/>
+ <param name="srcA" type="GLenum"/>
+ <param name="dstA" type="GLenum"/>
+ </function>
+
+</category>
+
+</OpenGLAPI>
diff --git a/src/mapi/glapi/gen/ARB_get_program_binary.xml b/src/mapi/glapi/gen/ARB_get_program_binary.xml
new file mode 100644
index 00000000000..a3665e54021
--- /dev/null
+++ b/src/mapi/glapi/gen/ARB_get_program_binary.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<!DOCTYPE OpenGLAPI SYSTEM "gl_API.dtd">
+
+<!-- This is included by gl_and_es_API.xml. Could be moved to gl_API.xml. -->
+
+<OpenGLAPI>
+
+<category name="GL_ARB_get_program_binary " number="96">
+ <enum name="PROGRAM_BINARY_RETRIEVABLE_HINT" value="0x8257"/>
+ <enum name="PROGRAM_BINARY_LENGTH" value="0x8741"/>
+ <enum name="NUM_PROGRAM_BINARY_FORMATS" value="0x87FE"/>
+ <enum name="PROGRAM_BINARY_FORMATS" value="0x87FF"/>
+
+ <function name="GetProgramBinary" offset="assign" static_dispatch="false">
+ <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="ProgramBinary" offset="assign" static_dispatch="false">
+ <param name="program" type="GLuint"/>
+ <param name="binaryFormat" type="GLenum"/>
+ <param name="binary" type="const GLvoid *"/>
+ <param name="length" type="GLsizei"/>
+ </function>
+
+ <function name="ProgramParameteri" offset="assign" static_dispatch="false">
+ <param name="program" type="GLuint"/>
+ <param name="pname" type="GLenum"/>
+ <param name="value" type="GLint"/>
+ </function>
+</category>
+
+</OpenGLAPI>
diff --git a/src/mapi/glapi/gen/ARB_instanced_arrays.xml b/src/mapi/glapi/gen/ARB_instanced_arrays.xml
new file mode 100644
index 00000000000..822f5437494
--- /dev/null
+++ b/src/mapi/glapi/gen/ARB_instanced_arrays.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0"?>
+<!DOCTYPE OpenGLAPI SYSTEM "gl_API.dtd">
+
+<!-- Note: no GLX protocol info yet. -->
+
+
+<OpenGLAPI>
+
+<category name="GL_ARB_instanced_arrays" number="49">
+
+ <enum name="VERTEX_ATTRIB_ARRAY_DIVISOR_ARB" value="0x88FE"/>
+
+ <function name="VertexAttribDivisorARB" offset="assign">
+ <param name="index" type="GLuint"/>
+ <param name="divisor" type="GLuint"/>
+ </function>
+
+</category>
+
+
+</OpenGLAPI>
diff --git a/src/mapi/glapi/gen/Makefile b/src/mapi/glapi/gen/Makefile
index 5a9b6ac4a87..1f4642af559 100644
--- a/src/mapi/glapi/gen/Makefile
+++ b/src/mapi/glapi/gen/Makefile
@@ -9,9 +9,11 @@ include $(TOP)/configs/current
MESA_DIR = $(TOP)/src/mesa
MESA_GLAPI_DIR = $(TOP)/src/mapi/glapi
+MESA_MAPI_DIR = $(TOP)/src/mapi/mapi
MESA_GLX_DIR = $(TOP)/src/glx
MESA_GLAPI_OUTPUTS = \
+ $(MESA_GLAPI_DIR)/glapi_mapi_tmp.h \
$(MESA_GLAPI_DIR)/glprocs.h \
$(MESA_GLAPI_DIR)/glapitemp.h \
$(MESA_GLAPI_DIR)/glapitable.h
@@ -72,10 +74,13 @@ API_XML = \
gl_API.xml \
ARB_copy_buffer.xml \
ARB_depth_clamp.xml \
+ ARB_draw_buffers_blend.xml \
ARB_draw_elements_base_vertex.xml \
ARB_draw_instanced.xml \
+ ARB_ES2_compatibility.xml \
ARB_framebuffer_object.xml \
ARB_geometry_shader4.xml \
+ ARB_instanced_arrays.xml \
ARB_map_buffer_range.xml \
ARB_seamless_cube_map.xml \
ARB_sync.xml \
@@ -93,12 +98,22 @@ API_XML = \
EXT_transform_feedback.xml \
NV_conditional_render.xml \
NV_primitive_restart.xml \
+ NV_texture_barrier.xml \
OES_EGL_image.xml \
GL3x.xml
COMMON = $(API_XML) gl_XML.py glX_XML.py license.py typeexpr.py
+COMMON_ES = \
+ $(COMMON) \
+ gl_and_es_API.xml \
+ es_EXT.xml \
+ ARB_ES2_compatibility.xml \
+ ARB_get_program_binary.xml \
+ OES_fixed_point.xml \
+ OES_single_precision.xml
+
COMMON_GLX = $(COMMON) glX_API.xml glX_XML.py glX_proto_common.py
######################################################################
@@ -129,6 +144,10 @@ $(XORG_GLAPI_DIR)/%.h: $(MESA_GLAPI_DIR)/%.h
######################################################################
+$(MESA_GLAPI_DIR)/glapi_mapi_tmp.h: $(MESA_MAPI_DIR)/mapi_abi.py $(COMMON_ES)
+ $(PYTHON2) $(PYTHON_FLAGS) $< \
+ --printer glapi --mode lib gl_and_es_API.xml > $@
+
$(MESA_GLAPI_DIR)/glprocs.h: gl_procs.py $(COMMON)
$(PYTHON2) $(PYTHON_FLAGS) $< > $@
diff --git a/src/mapi/glapi/gen/NV_texture_barrier.xml b/src/mapi/glapi/gen/NV_texture_barrier.xml
new file mode 100644
index 00000000000..52b1a3c08da
--- /dev/null
+++ b/src/mapi/glapi/gen/NV_texture_barrier.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0"?>
+<!DOCTYPE OpenGLAPI SYSTEM "gl_API.dtd">
+
+<!-- Note: no GLX protocol info yet. -->
+
+
+<OpenGLAPI>
+
+<category name="GL_NV_texture_barrier" number="381">
+ <function name="TextureBarrierNV" offset="assign" />
+</category>
+
+</OpenGLAPI>
diff --git a/src/mapi/glapi/gen/OES_fixed_point.xml b/src/mapi/glapi/gen/OES_fixed_point.xml
new file mode 100644
index 00000000000..ee408f4f1a3
--- /dev/null
+++ b/src/mapi/glapi/gen/OES_fixed_point.xml
@@ -0,0 +1,259 @@
+<?xml version="1.0"?>
+<!DOCTYPE OpenGLAPI SYSTEM "gl_API.dtd">
+
+<!-- This is included by gl_and_es_API.xml. Could be moved to gl_API.xml. -->
+<!-- this extension is incomplete -->
+
+<OpenGLAPI>
+
+<category name="GL_OES_fixed_point" number="292">
+ <enum name="FIXED_OES" value="0x140C"/>
+
+ <type name="fixed" size="4" />
+ <type name="clampx" size="4" />
+
+ <!-- OpenGL ES 1.0 -->
+ <function name="AlphaFuncxOES" offset="assign" static_dispatch="false">
+ <param name="func" type="GLenum"/>
+ <param name="ref" type="GLclampx"/>
+ </function>
+
+ <function name="ClearColorxOES" offset="assign" static_dispatch="false">
+ <param name="red" type="GLclampx"/>
+ <param name="green" type="GLclampx"/>
+ <param name="blue" type="GLclampx"/>
+ <param name="alpha" type="GLclampx"/>
+ </function>
+
+ <function name="ClearDepthxOES" offset="assign" static_dispatch="false">
+ <param name="depth" type="GLclampx"/>
+ </function>
+
+ <function name="Color4xOES" offset="assign" static_dispatch="false">
+ <param name="red" type="GLfixed"/>
+ <param name="green" type="GLfixed"/>
+ <param name="blue" type="GLfixed"/>
+ <param name="alpha" type="GLfixed"/>
+ </function>
+
+ <function name="DepthRangexOES" offset="assign" static_dispatch="false">
+ <param name="zNear" type="GLclampx"/>
+ <param name="zFar" type="GLclampx"/>
+ </function>
+
+ <function name="FogxOES" offset="assign" static_dispatch="false">
+ <param name="pname" type="GLenum"/>
+ <param name="param" type="GLfixed"/>
+ </function>
+
+ <function name="FogxvOES" offset="assign" static_dispatch="false">
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="const GLfixed *" variable_param="pname"/>
+ </function>
+
+ <function name="FrustumxOES" offset="assign" static_dispatch="false">
+ <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" offset="assign" static_dispatch="false">
+ <param name="pname" type="GLenum"/>
+ <param name="param" type="GLfixed"/>
+ </function>
+
+ <function name="LightModelxvOES" offset="assign" static_dispatch="false">
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="const GLfixed *" variable_param="pname"/>
+ </function>
+
+ <function name="LightxOES" offset="assign" static_dispatch="false">
+ <param name="light" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="param" type="GLfixed"/>
+ </function>
+
+ <function name="LightxvOES" offset="assign" static_dispatch="false">
+ <param name="light" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="const GLfixed *" variable_param="pname"/>
+ </function>
+
+ <function name="LineWidthxOES" offset="assign" static_dispatch="false">
+ <param name="width" type="GLfixed"/>
+ </function>
+
+ <function name="LoadMatrixxOES" offset="assign" static_dispatch="false">
+ <param name="m" type="const GLfixed *" count="16"/>
+ </function>
+
+ <function name="MaterialxOES" offset="assign" static_dispatch="false">
+ <param name="face" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="param" type="GLfixed"/>
+ </function>
+
+ <function name="MaterialxvOES" offset="assign" static_dispatch="false">
+ <param name="face" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="const GLfixed *" variable_param="pname"/>
+ </function>
+
+ <function name="MultMatrixxOES" offset="assign" static_dispatch="false">
+ <param name="m" type="const GLfixed *" count="16"/>
+ </function>
+
+ <function name="MultiTexCoord4xOES" offset="assign" static_dispatch="false">
+ <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="Normal3xOES" offset="assign" static_dispatch="false">
+ <param name="nx" type="GLfixed"/>
+ <param name="ny" type="GLfixed"/>
+ <param name="nz" type="GLfixed"/>
+ </function>
+
+ <function name="OrthoxOES" offset="assign" static_dispatch="false">
+ <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" offset="assign" static_dispatch="false">
+ <param name="size" type="GLfixed"/>
+ </function>
+
+ <function name="PolygonOffsetxOES" offset="assign" static_dispatch="false">
+ <param name="factor" type="GLfixed"/>
+ <param name="units" type="GLfixed"/>
+ </function>
+
+ <function name="RotatexOES" offset="assign" static_dispatch="false">
+ <param name="angle" type="GLfixed"/>
+ <param name="x" type="GLfixed"/>
+ <param name="y" type="GLfixed"/>
+ <param name="z" type="GLfixed"/>
+ </function>
+
+ <function name="SampleCoveragexOES" offset="assign" static_dispatch="false">
+ <param name="value" type="GLclampx"/>
+ <param name="invert" type="GLboolean"/>
+ </function>
+
+ <function name="ScalexOES" offset="assign" static_dispatch="false">
+ <param name="x" type="GLfixed"/>
+ <param name="y" type="GLfixed"/>
+ <param name="z" type="GLfixed"/>
+ </function>
+
+ <function name="TexEnvxOES" offset="assign" static_dispatch="false">
+ <param name="target" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="param" type="GLfixed"/>
+ </function>
+
+ <function name="TexEnvxvOES" offset="assign" static_dispatch="false">
+ <param name="target" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="const GLfixed *" variable_param="pname"/>
+ </function>
+
+ <function name="TexParameterxOES" offset="assign" static_dispatch="false">
+ <param name="target" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="param" type="GLfixed"/>
+ </function>
+
+ <function name="TranslatexOES" offset="assign" static_dispatch="false">
+ <param name="x" type="GLfixed"/>
+ <param name="y" type="GLfixed"/>
+ <param name="z" type="GLfixed"/>
+ </function>
+
+ <!-- OpenGL ES 1.1 -->
+ <function name="ClipPlanexOES" offset="assign" static_dispatch="false">
+ <param name="plane" type="GLenum"/>
+ <param name="equation" type="const GLfixed *" count="4"/>
+ </function>
+
+ <function name="GetClipPlanexOES" offset="assign" static_dispatch="false">
+ <param name="plane" type="GLenum"/>
+ <param name="equation" type="GLfixed *" output="true" count="4"/>
+ </function>
+
+ <function name="GetFixedvOES" offset="assign" static_dispatch="false">
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="GLfixed *" output="true" variable_param="pname"/>
+ </function>
+
+ <function name="GetLightxvOES" offset="assign" static_dispatch="false">
+ <param name="light" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="GLfixed *" output="true" variable_param="pname"/>
+ </function>
+
+ <function name="GetMaterialxvOES" offset="assign" static_dispatch="false">
+ <param name="face" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="GLfixed *" output="true" variable_param="pname"/>
+ </function>
+
+ <function name="GetTexEnvxvOES" offset="assign" static_dispatch="false">
+ <param name="target" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="GLfixed *" output="true" variable_param="pname"/>
+ </function>
+
+ <function name="GetTexParameterxvOES" offset="assign" static_dispatch="false">
+ <param name="target" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="GLfixed *" output="true" variable_param="pname"/>
+ </function>
+
+ <function name="PointParameterxOES" offset="assign" static_dispatch="false">
+ <param name="pname" type="GLenum"/>
+ <param name="param" type="GLfixed"/>
+ </function>
+
+ <function name="PointParameterxvOES" offset="assign" static_dispatch="false">
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="const GLfixed *"/>
+ </function>
+
+ <function name="TexParameterxvOES" offset="assign" static_dispatch="false">
+ <param name="target" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="const GLfixed *" variable_param="pname"/>
+ </function>
+
+ <!-- texgen -->
+ <function name="GetTexGenxvOES" offset="assign" static_dispatch="false">
+ <param name="coord" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="GLfixed *" output="true" variable_param="pname"/>
+ </function>
+
+ <function name="TexGenxOES" offset="assign" static_dispatch="false">
+ <param name="coord" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="param" type="GLint"/>
+ </function>
+
+ <function name="TexGenxvOES" offset="assign" static_dispatch="false">
+ <param name="coord" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="const GLfixed *" variable_param="pname"/>
+ </function>
+</category>
+
+</OpenGLAPI>
diff --git a/src/mapi/glapi/gen/OES_single_precision.xml b/src/mapi/glapi/gen/OES_single_precision.xml
new file mode 100644
index 00000000000..df8efc8f809
--- /dev/null
+++ b/src/mapi/glapi/gen/OES_single_precision.xml
@@ -0,0 +1,47 @@
+<?xml version="1.0"?>
+<!DOCTYPE OpenGLAPI SYSTEM "gl_API.dtd">
+
+<!-- This is included by gl_and_es_API.xml. Could be moved to gl_API.xml. -->
+
+<OpenGLAPI>
+
+<category name="GL_OES_single_precision" number="293">
+ <function name="ClearDepthfOES" alias="ClearDepthf" static_dispatch="false">
+ <param name="depth" type="GLclampf"/>
+ </function>
+
+ <function name="ClipPlanefOES" offset="assign" static_dispatch="false">
+ <param name="plane" type="GLenum"/>
+ <param name="equation" type="const GLfloat *" count="4"/>
+ </function>
+
+ <function name="DepthRangefOES" alias="DepthRangef" static_dispatch="false">
+ <param name="zNear" type="GLclampf"/>
+ <param name="zFar" type="GLclampf"/>
+ </function>
+
+ <function name="GetClipPlanefOES" offset="assign" static_dispatch="false">
+ <param name="plane" type="GLenum"/>
+ <param name="equation" type="GLfloat *" output="true" count="4"/>
+ </function>
+
+ <function name="FrustumfOES" offset="assign" static_dispatch="false">
+ <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" offset="assign" static_dispatch="false">
+ <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>
+
+</OpenGLAPI>
diff --git a/src/mapi/glapi/gen/es_EXT.xml b/src/mapi/glapi/gen/es_EXT.xml
new file mode 100644
index 00000000000..1327bb60212
--- /dev/null
+++ b/src/mapi/glapi/gen/es_EXT.xml
@@ -0,0 +1,618 @@
+<?xml version="1.0"?>
+<!DOCTYPE OpenGLAPI SYSTEM "../gen/gl_API.dtd">
+
+<!-- OpenGL ES specific extensions -->
+
+<OpenGLAPI>
+
+<!-- part of es1.1 extension pack -->
+<category name="GL_OES_blend_equation_separate" number="1">
+ <enum name="BLEND_EQUATION_RGB_OES" value="0x8009"/>
+ <enum name="BLEND_EQUATION_ALPHA_OES" value="0x883D"/>
+
+ <function name="BlendEquationSeparateOES" alias="BlendEquationSeparateEXT" static_dispatch="false">
+ <param name="modeRGB" type="GLenum"/>
+ <param name="modeA" type="GLenum"/>
+ </function>
+</category>
+
+<!-- part of es1.1 extension pack -->
+<category name="GL_OES_blend_func_separate" number="2">
+ <enum name="BLEND_DST_RGB_OES" value="0x80C8"/>
+ <enum name="BLEND_SRC_RGB_OES" value="0x80C9"/>
+ <enum name="BLEND_DST_ALPHA_OES" value="0x80CA"/>
+ <enum name="BLEND_SRC_ALPHA_OES" value="0x80CB"/>
+
+ <function name="BlendFuncSeparateOES" alias="BlendFuncSeparateEXT" static_dispatch="false">
+ <param name="sfactorRGB" type="GLenum"/>
+ <param name="dfactorRGB" type="GLenum"/>
+ <param name="sfactorAlpha" type="GLenum"/>
+ <param name="dfactorAlpha" type="GLenum"/>
+ </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" value="0x8009"/>
+ <enum name="FUNC_SUBTRACT_OES" value="0x800A"/>
+ <enum name="FUNC_REVERSE_SUBTRACT_OES" value="0x800B"/>
+
+ <function name="BlendEquationOES" alias="BlendEquation" static_dispatch="false">
+ <param name="mode" type="GLenum"/>
+ </function>
+</category>
+
+<!-- core addition to es1.0 and later -->
+<category name="GL_OES_byte_coordinates" number="4">
+ <enum name="BYTE" value="0x1400"/>
+</category>
+
+<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>
+
+<!-- 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" static_dispatch="false">
+ <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" static_dispatch="false">
+ <param name="coords" type="const GLint *" count="5"/>
+ </function>
+
+ <function name="DrawTexfOES" offset="assign" static_dispatch="false">
+ <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" static_dispatch="false">
+ <param name="coords" type="const GLfloat *" count="5"/>
+ </function>
+
+ <function name="DrawTexsOES" offset="assign" static_dispatch="false">
+ <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" static_dispatch="false">
+ <param name="coords" type="const GLshort *" count="5"/>
+ </function>
+
+ <function name="DrawTexxOES" offset="assign" static_dispatch="false">
+ <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" static_dispatch="false">
+ <param name="coords" type="const GLfixed *" count="5"/>
+ </function>
+
+ <!-- TexParameter{ifx}v is skipped here -->
+</category>
+
+<!-- core addition to es1.0 and later -->
+<!-- 9. GL_OES_fixed_point -->
+
+<!-- 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" alias="BindFramebufferEXT" static_dispatch="false">
+ <param name="target" type="GLenum"/>
+ <param name="framebuffer" type="GLuint"/>
+ </function>
+
+ <function name="BindRenderbufferOES" alias="BindRenderbufferEXT" static_dispatch="false">
+ <param name="target" type="GLenum"/>
+ <param name="renderbuffer" type="GLuint"/>
+ </function>
+
+ <function name="CheckFramebufferStatusOES" alias="CheckFramebufferStatusEXT" static_dispatch="false">
+ <param name="target" type="GLenum"/>
+ <return type="GLenum"/>
+ </function>
+
+ <function name="DeleteFramebuffersOES" alias="DeleteFramebuffersEXT" static_dispatch="false">
+ <param name="n" type="GLsizei" counter="true"/>
+ <param name="framebuffers" type="const GLuint *" count="n"/>
+ </function>
+
+ <function name="DeleteRenderbuffersOES" alias="DeleteRenderbuffersEXT" static_dispatch="false">
+ <param name="n" type="GLsizei" counter="true"/>
+ <param name="renderbuffers" type="const GLuint *" count="n"/>
+ </function>
+
+ <function name="FramebufferRenderbufferOES" alias="FramebufferRenderbufferEXT" static_dispatch="false">
+ <param name="target" type="GLenum"/>
+ <param name="attachment" type="GLenum"/>
+ <param name="renderbuffertarget" type="GLenum"/>
+ <param name="renderbuffer" type="GLuint"/>
+ </function>
+
+ <function name="FramebufferTexture2DOES" alias="FramebufferTexture2DEXT" static_dispatch="false">
+ <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" alias="GenerateMipmapEXT" static_dispatch="false">
+ <param name="target" type="GLenum"/>
+ </function>
+
+ <function name="GenFramebuffersOES" alias="GenFramebuffersEXT" static_dispatch="false">
+ <param name="n" type="GLsizei" counter="true"/>
+ <param name="framebuffers" type="GLuint *" count="n" output="true"/>
+ </function>
+
+ <function name="GenRenderbuffersOES" alias="GenRenderbuffersEXT" static_dispatch="false">
+ <param name="n" type="GLsizei" counter="true"/>
+ <param name="renderbuffers" type="GLuint *" count="n" output="true"/>
+ </function>
+
+ <function name="GetFramebufferAttachmentParameterivOES" alias="GetFramebufferAttachmentParameterivEXT" static_dispatch="false">
+ <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" alias="GetRenderbufferParameterivEXT" static_dispatch="false">
+ <param name="target" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="GLint *" output="true"/>
+ </function>
+
+ <function name="IsFramebufferOES" alias="IsFramebufferEXT" static_dispatch="false">
+ <param name="framebuffer" type="GLuint"/>
+ <return type="GLboolean"/>
+ </function>
+
+ <function name="IsRenderbufferOES" alias="IsRenderbufferEXT" static_dispatch="false">
+ <param name="renderbuffer" type="GLuint"/>
+ <return type="GLboolean"/>
+ </function>
+
+ <function name="RenderbufferStorageOES" alias="RenderbufferStorageEXT" static_dispatch="false">
+ <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" alias="CurrentPaletteMatrixARB" static_dispatch="false">
+ <param name="matrixpaletteindex" type="GLuint"/>
+ </function>
+
+ <!-- no offset -->
+ <function name="LoadPaletteFromModelViewMatrixOES" static_dispatch="false">
+ </function>
+
+ <function name="MatrixIndexPointerOES" alias="MatrixIndexPointerARB" static_dispatch="false">
+ <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" alias="WeightPointerARB" static_dispatch="false">
+ <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" static_dispatch="false">
+ <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" static_dispatch="false">
+ <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 -->
+<!-- 17. GL_OES_read_format -->
+
+<!-- core addition to es1.0 and later -->
+<!-- 18. GL_OES_single_precision -->
+
+<!-- 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" alias="GetTexGenfv" static_dispatch="false">
+ <param name="coord" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="GLfloat *" output="true" variable_param="pname"/>
+ </function>
+
+ <function name="GetTexGenivOES" alias="GetTexGeniv" static_dispatch="false">
+ <param name="coord" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="GLint *" output="true" variable_param="pname"/>
+ </function>
+
+ <function name="TexGenfOES" alias="TexGenf" static_dispatch="false">
+ <param name="coord" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="param" type="GLfloat"/>
+ </function>
+
+ <function name="TexGenfvOES" alias="TexGenfv" static_dispatch="false">
+ <param name="coord" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="const GLfloat *" variable_param="pname"/>
+ </function>
+
+ <function name="TexGeniOES" alias="TexGeni" static_dispatch="false">
+ <param name="coord" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="param" type="GLint"/>
+ </function>
+
+ <function name="TexGenivOES" alias="TexGeniv" static_dispatch="false">
+ <param name="coord" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="const GLint *" 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>
+
+<!-- 23. GL_OES_EGL_image -->
+
+<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>
+
+<!-- 26. GL_OES_element_index_uint -->
+
+<!-- 27. GL_OES_fbo_render_mipmap -->
+
+<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" alias="GetBufferPointervARB" static_dispatch="false">
+ <param name="target" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="GLvoid **"/>
+ </function>
+
+ <function name="MapBufferOES" alias="MapBufferARB" static_dispatch="false">
+ <param name="target" type="GLenum"/>
+ <param name="access" type="GLenum"/>
+ <return type="GLvoid *"/>
+ </function>
+
+ <function name="UnmapBufferOES" alias="UnmapBufferARB" static_dispatch="false">
+ <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_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" alias="CompressedTexImage3DARB" static_dispatch="false">
+ <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"/>
+ </function>
+
+ <function name="CompressedTexSubImage3DOES" alias="CompressedTexSubImage3DARB" 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="imageSize" type="GLsizei" counter="true"/>
+ <param name="data" type="const GLvoid *" count="imageSize"/>
+ </function>
+
+ <function name="CopyTexSubImage3DOES" alias="CopyTexSubImage3D" 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"/>
+ </function>
+
+ <function name="FramebufferTexture3DOES" alias="FramebufferTexture3DEXT" static_dispatch="false">
+ <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"/>
+ </function>
+
+ <function name="TexImage3DOES" alias="TexImage3D" static_dispatch="false">
+ <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"/>
+ </function>
+
+ <function name="TexSubImage3DOES" alias="TexSubImage3D" 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"/>
+ </function>
+</category>
+
+<!-- the other name is OES_texture_float_linear -->
+<!-- 35. GL_OES_texture_half_float_linear -->
+
+<!-- the other name is OES_texture_float -->
+<category name="GL_OES_texture_half_float" number="36">
+ <enum name="HALF_FLOAT_OES" value="0x8D61"/>
+</category>
+
+<!-- 37. GL_OES_texture_npot -->
+
+<category name="GL_OES_vertex_half_float" number="38">
+ <enum name="HALF_FLOAT_OES" value="0x8D61"/>
+</category>
+
+<!-- 41. GL_EXT_texture_filter_anisotropic -->
+
+<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>
+
+<!-- 44. GL_OES_depth_texture -->
+
+<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" alias="GetProgramBinary" static_dispatch="false">
+ <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" alias="ProgramBinary" static_dispatch="false">
+ <param name="program" type="GLuint"/>
+ <param name="binaryFormat" type="GLenum"/>
+ <param name="binary" type="const GLvoid *"/>
+ <param name="length" type="GLint"/>
+ </function>
+</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_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>
+
+<!-- 65. GL_EXT_blend_minmax -->
+
+<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>
+
+<!-- 69. GL_EXT_multi_draw_arrays -->
+
+</OpenGLAPI>
diff --git a/src/mapi/glapi/gen/glX_API.xml b/src/mapi/glapi/gen/glX_API.xml
index 9e02aa498ee..b7f4a777081 100644
--- a/src/mapi/glapi/gen/glX_API.xml
+++ b/src/mapi/glapi/gen/glX_API.xml
@@ -217,4 +217,18 @@
</function>
</category>
+<category name="GLX_ARB_create_context" number="56">
+ <function name="SetClientInfoARB">
+ <glx sop="33"/>
+ </function>
+
+ <function name="CreateContextAttribsARB">
+ <glx sop="34"/>
+ </function>
+
+ <function name="SetClientInfo2ARB">
+ <glx sop="35"/>
+ </function>
+</category>
+
</OpenGLAPI>
diff --git a/src/mapi/glapi/gen/glX_proto_recv.py b/src/mapi/glapi/gen/glX_proto_recv.py
index 887f63191de..31745fcef77 100644
--- a/src/mapi/glapi/gen/glX_proto_recv.py
+++ b/src/mapi/glapi/gen/glX_proto_recv.py
@@ -384,9 +384,9 @@ class PrintGlxDispatchFunctions(glX_proto_common.glx_print_proto):
print ' int error;'
if self.do_swap:
- print ' struct glx_context * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);'
+ print ' __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);'
else:
- print ' struct glx_context * const cx = __glXForceCurrent(cl, req->contextTag, &error);'
+ print ' __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);'
print ''
if name not in f.glx_vendorpriv_names:
diff --git a/src/mapi/glapi/gen/glX_proto_send.py b/src/mapi/glapi/gen/glX_proto_send.py
index 17ebad0176c..6330d91f77a 100644
--- a/src/mapi/glapi/gen/glX_proto_send.py
+++ b/src/mapi/glapi/gen/glX_proto_send.py
@@ -350,6 +350,55 @@ const GLuint __glXDefaultPixelStore[9] = { 0, 0, 0, 0, 0, 0, 0, 0, 1 };
if func.glx_sop and func.glx_vendorpriv:
self.printFunction(func, func.glx_vendorpriv_names[0])
+ self.printGetProcAddress(api)
+ return
+
+ def printGetProcAddress(self, api):
+ procs = {}
+ for func in api.functionIterateGlx():
+ for n in func.entry_points:
+ if func.has_different_protocol(n):
+ procs[n] = func.static_glx_name(n)
+
+ print """
+#ifdef GLX_SHARED_GLAPI
+
+static const struct proc_pair
+{
+ const char *name;
+ _glapi_proc proc;
+} proc_pairs[%d] = {""" % len(procs)
+ names = procs.keys()
+ names.sort()
+ for i in xrange(len(names)):
+ comma = ',' if i < len(names) - 1 else ''
+ print ' { "%s", (_glapi_proc) gl%s }%s' % (names[i], procs[names[i]], comma)
+ print """};
+
+static int
+__indirect_get_proc_compare(const void *key, const void *memb)
+{
+ const struct proc_pair *pair = (const struct proc_pair *) memb;
+ return strcmp((const char *) key, pair->name);
+}
+
+_glapi_proc
+__indirect_get_proc_address(const char *name)
+{
+ const struct proc_pair *pair;
+
+ /* skip "gl" */
+ name += 2;
+
+ pair = (const struct proc_pair *) bsearch((const void *) name,
+ (const void *) proc_pairs, ARRAY_SIZE(proc_pairs), sizeof(proc_pairs[0]),
+ __indirect_get_proc_compare);
+
+ return (pair) ? pair->proc : NULL;
+}
+
+#endif /* GLX_SHARED_GLAPI */
+"""
return
@@ -1001,6 +1050,10 @@ extern HIDDEN NOINLINE FASTCALL GLubyte * __glXSetupVendorRequest(
break
+ print ''
+ print '#ifdef GLX_SHARED_GLAPI'
+ print 'extern HIDDEN void (*__indirect_get_proc_address(const char *name))(void);'
+ print '#endif'
def show_usage():
diff --git a/src/mapi/glapi/gen/gl_API.xml b/src/mapi/glapi/gen/gl_API.xml
index 2004647954c..56c0ec71b36 100644
--- a/src/mapi/glapi/gen/gl_API.xml
+++ b/src/mapi/glapi/gen/gl_API.xml
@@ -7949,6 +7949,8 @@
</enum>
</category>
+<xi:include href="ARB_ES2_compatibility.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
+
<xi:include href="ARB_framebuffer_object.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
<xi:include href="ARB_copy_buffer.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
@@ -7969,6 +7971,8 @@
<xi:include href="NV_primitive_restart.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
+<xi:include href="NV_texture_barrier.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
+
<xi:include href="EXT_transform_feedback.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
<xi:include href="ARB_draw_instanced.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
@@ -12521,5 +12525,8 @@
<xi:include href="EXT_gpu_shader4.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
<xi:include href="GL3x.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
+<xi:include href="ARB_instanced_arrays.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
+
+<xi:include href="ARB_draw_buffers_blend.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
</OpenGLAPI>
diff --git a/src/mapi/glapi/gen/gl_and_es_API.xml b/src/mapi/glapi/gen/gl_and_es_API.xml
new file mode 100644
index 00000000000..ac7d43ceda7
--- /dev/null
+++ b/src/mapi/glapi/gen/gl_and_es_API.xml
@@ -0,0 +1,286 @@
+<?xml version="1.0"?>
+<!DOCTYPE OpenGLAPI SYSTEM "gl_API.dtd">
+
+<!-- OpenGL + OpenGL ES -->
+
+<OpenGLAPI>
+
+<xi:include href="gl_API.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
+
+<!-- these can be moved to gl_API.xml -->
+<xi:include href="ARB_get_program_binary.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
+<xi:include href="OES_fixed_point.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
+<xi:include href="OES_single_precision.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
+
+<category name="es1.0">
+ <!-- from GL_OES_fixed_point -->
+ <enum name="FIXED" value="0x140C"/>
+
+ <type name="fixed" size="4" />
+ <type name="clampx" size="4" />
+
+ <function name="AlphaFuncx" alias="AlphaFuncxOES" static_dispatch="false">
+ <param name="func" type="GLenum"/>
+ <param name="ref" type="GLclampx"/>
+ </function>
+
+ <function name="ClearColorx" alias="ClearColorxOES" static_dispatch="false">
+ <param name="red" type="GLclampx"/>
+ <param name="green" type="GLclampx"/>
+ <param name="blue" type="GLclampx"/>
+ <param name="alpha" type="GLclampx"/>
+ </function>
+
+ <function name="ClearDepthx" alias="ClearDepthxOES" static_dispatch="false">
+ <param name="depth" type="GLclampx"/>
+ </function>
+
+ <function name="Color4x" alias="Color4xOES" static_dispatch="false">
+ <param name="red" type="GLfixed"/>
+ <param name="green" type="GLfixed"/>
+ <param name="blue" type="GLfixed"/>
+ <param name="alpha" type="GLfixed"/>
+ </function>
+
+ <function name="DepthRangex" alias="DepthRangexOES" static_dispatch="false">
+ <param name="zNear" type="GLclampx"/>
+ <param name="zFar" type="GLclampx"/>
+ </function>
+
+ <function name="Fogx" alias="FogxOES" static_dispatch="false">
+ <param name="pname" type="GLenum"/>
+ <param name="param" type="GLfixed"/>
+ </function>
+
+ <function name="Fogxv" alias="FogxvOES" static_dispatch="false">
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="const GLfixed *" variable_param="pname"/>
+ </function>
+
+ <function name="Frustumx" alias="FrustumxOES" static_dispatch="false">
+ <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" alias="LightModelxOES" static_dispatch="false">
+ <param name="pname" type="GLenum"/>
+ <param name="param" type="GLfixed"/>
+ </function>
+
+ <function name="LightModelxv" alias="LightModelxvOES" static_dispatch="false">
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="const GLfixed *" variable_param="pname"/>
+ </function>
+
+ <function name="Lightx" alias="LightxOES" static_dispatch="false">
+ <param name="light" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="param" type="GLfixed"/>
+ </function>
+
+ <function name="Lightxv" alias="LightxvOES" static_dispatch="false">
+ <param name="light" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="const GLfixed *" variable_param="pname"/>
+ </function>
+
+ <function name="LineWidthx" alias="LineWidthxOES" static_dispatch="false">
+ <param name="width" type="GLfixed"/>
+ </function>
+
+ <function name="LoadMatrixx" alias="LoadMatrixxOES" static_dispatch="false">
+ <param name="m" type="const GLfixed *" count="16"/>
+ </function>
+
+ <function name="Materialx" alias="MaterialxOES" static_dispatch="false">
+ <param name="face" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="param" type="GLfixed"/>
+ </function>
+
+ <function name="Materialxv" alias="MaterialxvOES" static_dispatch="false">
+ <param name="face" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="const GLfixed *" variable_param="pname"/>
+ </function>
+
+ <function name="MultMatrixx" alias="MultMatrixxOES" static_dispatch="false">
+ <param name="m" type="const GLfixed *" count="16"/>
+ </function>
+
+ <function name="MultiTexCoord4x" alias="MultiTexCoord4xOES" static_dispatch="false">
+ <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" alias="Normal3xOES" static_dispatch="false">
+ <param name="nx" type="GLfixed"/>
+ <param name="ny" type="GLfixed"/>
+ <param name="nz" type="GLfixed"/>
+ </function>
+
+ <function name="Orthox" alias="OrthoxOES" static_dispatch="false">
+ <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" alias="PointSizexOES" static_dispatch="false">
+ <param name="size" type="GLfixed"/>
+ </function>
+
+ <function name="PolygonOffsetx" alias="PolygonOffsetxOES" static_dispatch="false">
+ <param name="factor" type="GLfixed"/>
+ <param name="units" type="GLfixed"/>
+ </function>
+
+ <function name="Rotatex" alias="RotatexOES" static_dispatch="false">
+ <param name="angle" type="GLfixed"/>
+ <param name="x" type="GLfixed"/>
+ <param name="y" type="GLfixed"/>
+ <param name="z" type="GLfixed"/>
+ </function>
+
+ <function name="SampleCoveragex" alias="SampleCoveragexOES" static_dispatch="false">
+ <param name="value" type="GLclampx"/>
+ <param name="invert" type="GLboolean"/>
+ </function>
+
+ <function name="Scalex" alias="ScalexOES" static_dispatch="false">
+ <param name="x" type="GLfixed"/>
+ <param name="y" type="GLfixed"/>
+ <param name="z" type="GLfixed"/>
+ </function>
+
+ <function name="TexEnvx" alias="TexEnvxOES" static_dispatch="false">
+ <param name="target" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="param" type="GLfixed"/>
+ </function>
+
+ <function name="TexEnvxv" alias="TexEnvxvOES" static_dispatch="false">
+ <param name="target" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="const GLfixed *" variable_param="pname"/>
+ </function>
+
+ <function name="TexParameterx" alias="TexParameterxOES" static_dispatch="false">
+ <param name="target" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="param" type="GLfixed"/>
+ </function>
+
+ <function name="Translatex" alias="TranslatexOES" static_dispatch="false">
+ <param name="x" type="GLfixed"/>
+ <param name="y" type="GLfixed"/>
+ <param name="z" type="GLfixed"/>
+ </function>
+
+ <!-- from GL_OES_single_precision -->
+ <function name="Frustumf" alias="FrustumfOES" static_dispatch="false">
+ <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" alias="OrthofOES" static_dispatch="false">
+ <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>
+
+<category name="es1.1">
+ <!-- from GL_OES_fixed_point -->
+ <function name="ClipPlanex" alias="ClipPlanexOES" static_dispatch="false">
+ <param name="plane" type="GLenum"/>
+ <param name="equation" type="const GLfixed *" count="4"/>
+ </function>
+
+ <function name="GetClipPlanex" alias="GetClipPlanexOES" static_dispatch="false">
+ <param name="plane" type="GLenum"/>
+ <param name="equation" type="GLfixed *" output="true" count="4"/>
+ </function>
+
+ <function name="GetFixedv" alias="GetFixedvOES" static_dispatch="false">
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="GLfixed *" output="true" variable_param="pname"/>
+ </function>
+
+ <function name="GetLightxv" alias="GetLightxvOES" static_dispatch="false">
+ <param name="light" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="GLfixed *" output="true" variable_param="pname"/>
+ </function>
+
+ <function name="GetMaterialxv" alias="GetMaterialxvOES" static_dispatch="false">
+ <param name="face" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="GLfixed *" output="true" variable_param="pname"/>
+ </function>
+
+ <function name="GetTexEnvxv" alias="GetTexEnvxvOES" static_dispatch="false">
+ <param name="target" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="GLfixed *" output="true" variable_param="pname"/>
+ </function>
+
+ <function name="GetTexParameterxv" alias="GetTexParameterxvOES" static_dispatch="false">
+ <param name="target" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="GLfixed *" output="true" variable_param="pname"/>
+ </function>
+
+ <function name="PointParameterx" alias="PointParameterxOES" static_dispatch="false">
+ <param name="pname" type="GLenum"/>
+ <param name="param" type="GLfixed"/>
+ </function>
+
+ <function name="PointParameterxv" alias="PointParameterxvOES" static_dispatch="false">
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="const GLfixed *"/>
+ </function>
+
+ <function name="TexParameterxv" alias="TexParameterxvOES" static_dispatch="false">
+ <param name="target" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="const GLfixed *" variable_param="pname"/>
+ </function>
+
+ <!-- from GL_OES_single_precision -->
+ <function name="ClipPlanef" alias="ClipPlanefOES" static_dispatch="false">
+ <param name="plane" type="GLenum"/>
+ <param name="equation" type="const GLfloat *" count="4"/>
+ </function>
+
+ <function name="GetClipPlanef" alias="GetClipPlanefOES" static_dispatch="false">
+ <param name="plane" type="GLenum"/>
+ <param name="equation" type="GLfloat *" output="true" count="4"/>
+ </function>
+</category>
+
+<category name="es2.0">
+ <!-- enums missing from GL_ARB_framebuffer_object and GL_EXT_framebuffer_object -->
+ <enum name="FRAMEBUFFER_INCOMPLETE_DIMENSIONS" value="0x8CD9"/>
+ <enum name="RGB565" value="0x8D62"/>
+</category>
+
+<xi:include href="es_EXT.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
+
+</OpenGLAPI>
diff --git a/src/mapi/glapi/gen/gl_enums.py b/src/mapi/glapi/gen/gl_enums.py
index 0caa01030fa..d51b74a4a7c 100644
--- a/src/mapi/glapi/gen/gl_enums.py
+++ b/src/mapi/glapi/gen/gl_enums.py
@@ -46,6 +46,7 @@ class PrintGlEnums(gl_XML.gl_print_base):
print '#include "main/mfeatures.h"'
print '#include "main/enums.h"'
print '#include "main/imports.h"'
+ print '#include "main/mtypes.h"'
print ''
print 'typedef struct {'
print ' size_t offset;'
@@ -111,29 +112,39 @@ const char *_mesa_lookup_enum_by_nr( int nr )
}
}
+/**
+ * Primitive names
+ */
+static const char *prim_names[PRIM_UNKNOWN + 1] = {
+ "GL_POINTS",
+ "GL_LINES",
+ "GL_LINE_LOOP",
+ "GL_LINE_STRIP",
+ "GL_TRIANGLES",
+ "GL_TRIANGLE_STRIP",
+ "GL_TRIANGLE_FAN",
+ "GL_QUADS",
+ "GL_QUAD_STRIP",
+ "GL_POLYGON",
+ "outside begin/end",
+ "inside unknown primitive",
+ "unknown state"
+};
+
+
/* Get the name of an enum given that it is a primitive type. Avoids
* GL_FALSE/GL_POINTS ambiguity and others.
*/
-const char *_mesa_lookup_prim_by_nr( int nr )
+const char *
+_mesa_lookup_prim_by_nr(GLuint nr)
{
- switch (nr) {
- case GL_POINTS: return "GL_POINTS";
- case GL_LINES: return "GL_LINES";
- case GL_LINE_STRIP: return "GL_LINE_STRIP";
- case GL_LINE_LOOP: return "GL_LINE_LOOP";
- case GL_TRIANGLES: return "GL_TRIANGLES";
- case GL_TRIANGLE_STRIP: return "GL_TRIANGLE_STRIP";
- case GL_TRIANGLE_FAN: return "GL_TRIANGLE_FAN";
- case GL_QUADS: return "GL_QUADS";
- case GL_QUAD_STRIP: return "GL_QUAD_STRIP";
- case GL_POLYGON: return "GL_POLYGON";
- case GL_POLYGON+1: return "OUTSIDE_BEGIN_END";
- default: return "<invalid>";
- }
+ if (nr < Elements(prim_names))
+ return prim_names[nr];
+ else
+ return "invalid mode";
}
-
int _mesa_lookup_enum_by_name( const char *symbol )
{
enum_elt * f = NULL;
diff --git a/src/mapi/glapi/gen/gl_x86-64_asm.py b/src/mapi/glapi/gen/gl_x86-64_asm.py
index 2fa140dc308..11cd9af4061 100644
--- a/src/mapi/glapi/gen/gl_x86-64_asm.py
+++ b/src/mapi/glapi/gen/gl_x86-64_asm.py
@@ -166,7 +166,8 @@ class PrintGenericStubs(gl_XML.gl_print_base):
print ''
print '\t.p2align\t4,,15'
print '_x86_64_get_dispatch:'
- print '\tmovq\t_gl_DispatchTSD(%rip), %rdi'
+ print '\tmovq\t_gl_DispatchTSD@GOTPCREL(%rip), %rax'
+ print '\tmovl\t(%rax), %edi'
print '\tjmp\tpthread_getspecific@PLT'
print ''
print '#elif defined(THREADS)'
diff --git a/src/mapi/glapi/gen/gl_x86_asm.py b/src/mapi/glapi/gen/gl_x86_asm.py
index 21996a39421..4ef4acb564e 100644
--- a/src/mapi/glapi/gen/gl_x86_asm.py
+++ b/src/mapi/glapi/gen/gl_x86_asm.py
@@ -73,7 +73,7 @@ class PrintGenericStubs(gl_XML.gl_print_base):
print '#define GL_OFFSET(x) CODEPTR(REGOFF(4 * x, EAX))'
print ''
print '#if defined(GNU_ASSEMBLER) && !defined(__DJGPP__) && !defined(__MINGW32__) && !defined(__APPLE__)'
- print '#define GLOBL_FN(x) GLOBL x ; .type x, function'
+ print '#define GLOBL_FN(x) GLOBL x ; .type x, @function'
print '#else'
print '#define GLOBL_FN(x) GLOBL x'
print '#endif'
diff --git a/src/mapi/glapi/glapi.c b/src/mapi/glapi/glapi.c
new file mode 100644
index 00000000000..f7655c558c4
--- /dev/null
+++ b/src/mapi/glapi/glapi.c
@@ -0,0 +1,65 @@
+/*
+ * Mesa 3-D graphics library
+ * Version: 7.9
+ *
+ * Copyright (C) 2010 LunarG Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ * Authors:
+ * Chia-I Wu <olv@lunarg.com>
+ */
+
+#include "glapi/glapi.h"
+#include "mapi/u_current.h"
+
+/*
+ * Global variables, _glapi_get_context, and _glapi_get_dispatch are defined in
+ * u_current.c.
+ */
+
+#ifdef GLX_USE_TLS
+/* not used, but defined for compatibility */
+const struct _glapi_table *_glapi_Dispatch;
+const void *_glapi_Context;
+#endif /* GLX_USE_TLS */
+
+void
+_glapi_destroy_multithread(void)
+{
+ u_current_destroy();
+}
+
+void
+_glapi_check_multithread(void)
+{
+ u_current_init();
+}
+
+void
+_glapi_set_context(void *context)
+{
+ u_current_set_user((const void *) context);
+}
+
+void
+_glapi_set_dispatch(struct _glapi_table *dispatch)
+{
+ u_current_set((const struct mapi_table *) dispatch);
+}
diff --git a/src/mapi/glapi/glapi.h b/src/mapi/glapi/glapi.h
index 8cca50487c4..e909cf892ab 100644
--- a/src/mapi/glapi/glapi.h
+++ b/src/mapi/glapi/glapi.h
@@ -45,11 +45,6 @@
#define _GLAPI_H
-/* opengl.dll does not export _glapi_* */
-#if defined(_WIN32)
-#define _GLAPI_NO_EXPORTS
-#endif
-
#ifdef _GLAPI_NO_EXPORTS
# define _GLAPI_EXPORT
#else /* _GLAPI_NO_EXPORTS */
diff --git a/src/mapi/glapi/glapi_mapi_tmp.h b/src/mapi/glapi/glapi_mapi_tmp.h
new file mode 100644
index 00000000000..c3f9cd227ce
--- /dev/null
+++ b/src/mapi/glapi/glapi_mapi_tmp.h
@@ -0,0 +1,13116 @@
+/* This file is automatically generated by mapi_abi.py. Do not modify. */
+
+#ifndef _GLAPI_TMP_H_
+#define _GLAPI_TMP_H_
+#ifdef USE_MGL_NAMESPACE
+#define GLAPI_PREFIX(func) mgl##func
+#define GLAPI_PREFIX_STR(func) "mgl"#func
+#else
+#define GLAPI_PREFIX(func) gl##func
+#define GLAPI_PREFIX_STR(func) "gl"#func
+#endif /* USE_MGL_NAMESPACE */
+
+typedef int GLfixed;
+typedef int GLclampx;
+#endif /* _GLAPI_TMP_H_ */
+
+#ifdef MAPI_TMP_DEFINES
+#define GL_GLEXT_PROTOTYPES
+#include "GL/gl.h"
+#include "GL/glext.h"
+
+GLAPI void APIENTRY GLAPI_PREFIX(NewList)(GLuint list, GLenum mode);
+GLAPI void APIENTRY GLAPI_PREFIX(EndList)(void);
+GLAPI void APIENTRY GLAPI_PREFIX(CallList)(GLuint list);
+GLAPI void APIENTRY GLAPI_PREFIX(CallLists)(GLsizei n, GLenum type, const GLvoid *lists);
+GLAPI void APIENTRY GLAPI_PREFIX(DeleteLists)(GLuint list, GLsizei range);
+GLAPI GLuint APIENTRY GLAPI_PREFIX(GenLists)(GLsizei range);
+GLAPI void APIENTRY GLAPI_PREFIX(ListBase)(GLuint base);
+GLAPI void APIENTRY GLAPI_PREFIX(Begin)(GLenum mode);
+GLAPI void APIENTRY GLAPI_PREFIX(Bitmap)(GLsizei width, GLsizei height, GLfloat xorig, GLfloat yorig, GLfloat xmove, GLfloat ymove, const GLubyte *bitmap);
+GLAPI void APIENTRY GLAPI_PREFIX(Color3b)(GLbyte red, GLbyte green, GLbyte blue);
+GLAPI void APIENTRY GLAPI_PREFIX(Color3bv)(const GLbyte *v);
+GLAPI void APIENTRY GLAPI_PREFIX(Color3d)(GLdouble red, GLdouble green, GLdouble blue);
+GLAPI void APIENTRY GLAPI_PREFIX(Color3dv)(const GLdouble *v);
+GLAPI void APIENTRY GLAPI_PREFIX(Color3f)(GLfloat red, GLfloat green, GLfloat blue);
+GLAPI void APIENTRY GLAPI_PREFIX(Color3fv)(const GLfloat *v);
+GLAPI void APIENTRY GLAPI_PREFIX(Color3i)(GLint red, GLint green, GLint blue);
+GLAPI void APIENTRY GLAPI_PREFIX(Color3iv)(const GLint *v);
+GLAPI void APIENTRY GLAPI_PREFIX(Color3s)(GLshort red, GLshort green, GLshort blue);
+GLAPI void APIENTRY GLAPI_PREFIX(Color3sv)(const GLshort *v);
+GLAPI void APIENTRY GLAPI_PREFIX(Color3ub)(GLubyte red, GLubyte green, GLubyte blue);
+GLAPI void APIENTRY GLAPI_PREFIX(Color3ubv)(const GLubyte *v);
+GLAPI void APIENTRY GLAPI_PREFIX(Color3ui)(GLuint red, GLuint green, GLuint blue);
+GLAPI void APIENTRY GLAPI_PREFIX(Color3uiv)(const GLuint *v);
+GLAPI void APIENTRY GLAPI_PREFIX(Color3us)(GLushort red, GLushort green, GLushort blue);
+GLAPI void APIENTRY GLAPI_PREFIX(Color3usv)(const GLushort *v);
+GLAPI void APIENTRY GLAPI_PREFIX(Color4b)(GLbyte red, GLbyte green, GLbyte blue, GLbyte alpha);
+GLAPI void APIENTRY GLAPI_PREFIX(Color4bv)(const GLbyte *v);
+GLAPI void APIENTRY GLAPI_PREFIX(Color4d)(GLdouble red, GLdouble green, GLdouble blue, GLdouble alpha);
+GLAPI void APIENTRY GLAPI_PREFIX(Color4dv)(const GLdouble *v);
+GLAPI void APIENTRY GLAPI_PREFIX(Color4f)(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
+GLAPI void APIENTRY GLAPI_PREFIX(Color4fv)(const GLfloat *v);
+GLAPI void APIENTRY GLAPI_PREFIX(Color4i)(GLint red, GLint green, GLint blue, GLint alpha);
+GLAPI void APIENTRY GLAPI_PREFIX(Color4iv)(const GLint *v);
+GLAPI void APIENTRY GLAPI_PREFIX(Color4s)(GLshort red, GLshort green, GLshort blue, GLshort alpha);
+GLAPI void APIENTRY GLAPI_PREFIX(Color4sv)(const GLshort *v);
+GLAPI void APIENTRY GLAPI_PREFIX(Color4ub)(GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha);
+GLAPI void APIENTRY GLAPI_PREFIX(Color4ubv)(const GLubyte *v);
+GLAPI void APIENTRY GLAPI_PREFIX(Color4ui)(GLuint red, GLuint green, GLuint blue, GLuint alpha);
+GLAPI void APIENTRY GLAPI_PREFIX(Color4uiv)(const GLuint *v);
+GLAPI void APIENTRY GLAPI_PREFIX(Color4us)(GLushort red, GLushort green, GLushort blue, GLushort alpha);
+GLAPI void APIENTRY GLAPI_PREFIX(Color4usv)(const GLushort *v);
+GLAPI void APIENTRY GLAPI_PREFIX(EdgeFlag)(GLboolean flag);
+GLAPI void APIENTRY GLAPI_PREFIX(EdgeFlagv)(const GLboolean *flag);
+GLAPI void APIENTRY GLAPI_PREFIX(End)(void);
+GLAPI void APIENTRY GLAPI_PREFIX(Indexd)(GLdouble c);
+GLAPI void APIENTRY GLAPI_PREFIX(Indexdv)(const GLdouble *c);
+GLAPI void APIENTRY GLAPI_PREFIX(Indexf)(GLfloat c);
+GLAPI void APIENTRY GLAPI_PREFIX(Indexfv)(const GLfloat *c);
+GLAPI void APIENTRY GLAPI_PREFIX(Indexi)(GLint c);
+GLAPI void APIENTRY GLAPI_PREFIX(Indexiv)(const GLint *c);
+GLAPI void APIENTRY GLAPI_PREFIX(Indexs)(GLshort c);
+GLAPI void APIENTRY GLAPI_PREFIX(Indexsv)(const GLshort *c);
+GLAPI void APIENTRY GLAPI_PREFIX(Normal3b)(GLbyte nx, GLbyte ny, GLbyte nz);
+GLAPI void APIENTRY GLAPI_PREFIX(Normal3bv)(const GLbyte *v);
+GLAPI void APIENTRY GLAPI_PREFIX(Normal3d)(GLdouble nx, GLdouble ny, GLdouble nz);
+GLAPI void APIENTRY GLAPI_PREFIX(Normal3dv)(const GLdouble *v);
+GLAPI void APIENTRY GLAPI_PREFIX(Normal3f)(GLfloat nx, GLfloat ny, GLfloat nz);
+GLAPI void APIENTRY GLAPI_PREFIX(Normal3fv)(const GLfloat *v);
+GLAPI void APIENTRY GLAPI_PREFIX(Normal3i)(GLint nx, GLint ny, GLint nz);
+GLAPI void APIENTRY GLAPI_PREFIX(Normal3iv)(const GLint *v);
+GLAPI void APIENTRY GLAPI_PREFIX(Normal3s)(GLshort nx, GLshort ny, GLshort nz);
+GLAPI void APIENTRY GLAPI_PREFIX(Normal3sv)(const GLshort *v);
+GLAPI void APIENTRY GLAPI_PREFIX(RasterPos2d)(GLdouble x, GLdouble y);
+GLAPI void APIENTRY GLAPI_PREFIX(RasterPos2dv)(const GLdouble *v);
+GLAPI void APIENTRY GLAPI_PREFIX(RasterPos2f)(GLfloat x, GLfloat y);
+GLAPI void APIENTRY GLAPI_PREFIX(RasterPos2fv)(const GLfloat *v);
+GLAPI void APIENTRY GLAPI_PREFIX(RasterPos2i)(GLint x, GLint y);
+GLAPI void APIENTRY GLAPI_PREFIX(RasterPos2iv)(const GLint *v);
+GLAPI void APIENTRY GLAPI_PREFIX(RasterPos2s)(GLshort x, GLshort y);
+GLAPI void APIENTRY GLAPI_PREFIX(RasterPos2sv)(const GLshort *v);
+GLAPI void APIENTRY GLAPI_PREFIX(RasterPos3d)(GLdouble x, GLdouble y, GLdouble z);
+GLAPI void APIENTRY GLAPI_PREFIX(RasterPos3dv)(const GLdouble *v);
+GLAPI void APIENTRY GLAPI_PREFIX(RasterPos3f)(GLfloat x, GLfloat y, GLfloat z);
+GLAPI void APIENTRY GLAPI_PREFIX(RasterPos3fv)(const GLfloat *v);
+GLAPI void APIENTRY GLAPI_PREFIX(RasterPos3i)(GLint x, GLint y, GLint z);
+GLAPI void APIENTRY GLAPI_PREFIX(RasterPos3iv)(const GLint *v);
+GLAPI void APIENTRY GLAPI_PREFIX(RasterPos3s)(GLshort x, GLshort y, GLshort z);
+GLAPI void APIENTRY GLAPI_PREFIX(RasterPos3sv)(const GLshort *v);
+GLAPI void APIENTRY GLAPI_PREFIX(RasterPos4d)(GLdouble x, GLdouble y, GLdouble z, GLdouble w);
+GLAPI void APIENTRY GLAPI_PREFIX(RasterPos4dv)(const GLdouble *v);
+GLAPI void APIENTRY GLAPI_PREFIX(RasterPos4f)(GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+GLAPI void APIENTRY GLAPI_PREFIX(RasterPos4fv)(const GLfloat *v);
+GLAPI void APIENTRY GLAPI_PREFIX(RasterPos4i)(GLint x, GLint y, GLint z, GLint w);
+GLAPI void APIENTRY GLAPI_PREFIX(RasterPos4iv)(const GLint *v);
+GLAPI void APIENTRY GLAPI_PREFIX(RasterPos4s)(GLshort x, GLshort y, GLshort z, GLshort w);
+GLAPI void APIENTRY GLAPI_PREFIX(RasterPos4sv)(const GLshort *v);
+GLAPI void APIENTRY GLAPI_PREFIX(Rectd)(GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2);
+GLAPI void APIENTRY GLAPI_PREFIX(Rectdv)(const GLdouble *v1, const GLdouble *v2);
+GLAPI void APIENTRY GLAPI_PREFIX(Rectf)(GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2);
+GLAPI void APIENTRY GLAPI_PREFIX(Rectfv)(const GLfloat *v1, const GLfloat *v2);
+GLAPI void APIENTRY GLAPI_PREFIX(Recti)(GLint x1, GLint y1, GLint x2, GLint y2);
+GLAPI void APIENTRY GLAPI_PREFIX(Rectiv)(const GLint *v1, const GLint *v2);
+GLAPI void APIENTRY GLAPI_PREFIX(Rects)(GLshort x1, GLshort y1, GLshort x2, GLshort y2);
+GLAPI void APIENTRY GLAPI_PREFIX(Rectsv)(const GLshort *v1, const GLshort *v2);
+GLAPI void APIENTRY GLAPI_PREFIX(TexCoord1d)(GLdouble s);
+GLAPI void APIENTRY GLAPI_PREFIX(TexCoord1dv)(const GLdouble *v);
+GLAPI void APIENTRY GLAPI_PREFIX(TexCoord1f)(GLfloat s);
+GLAPI void APIENTRY GLAPI_PREFIX(TexCoord1fv)(const GLfloat *v);
+GLAPI void APIENTRY GLAPI_PREFIX(TexCoord1i)(GLint s);
+GLAPI void APIENTRY GLAPI_PREFIX(TexCoord1iv)(const GLint *v);
+GLAPI void APIENTRY GLAPI_PREFIX(TexCoord1s)(GLshort s);
+GLAPI void APIENTRY GLAPI_PREFIX(TexCoord1sv)(const GLshort *v);
+GLAPI void APIENTRY GLAPI_PREFIX(TexCoord2d)(GLdouble s, GLdouble t);
+GLAPI void APIENTRY GLAPI_PREFIX(TexCoord2dv)(const GLdouble *v);
+GLAPI void APIENTRY GLAPI_PREFIX(TexCoord2f)(GLfloat s, GLfloat t);
+GLAPI void APIENTRY GLAPI_PREFIX(TexCoord2fv)(const GLfloat *v);
+GLAPI void APIENTRY GLAPI_PREFIX(TexCoord2i)(GLint s, GLint t);
+GLAPI void APIENTRY GLAPI_PREFIX(TexCoord2iv)(const GLint *v);
+GLAPI void APIENTRY GLAPI_PREFIX(TexCoord2s)(GLshort s, GLshort t);
+GLAPI void APIENTRY GLAPI_PREFIX(TexCoord2sv)(const GLshort *v);
+GLAPI void APIENTRY GLAPI_PREFIX(TexCoord3d)(GLdouble s, GLdouble t, GLdouble r);
+GLAPI void APIENTRY GLAPI_PREFIX(TexCoord3dv)(const GLdouble *v);
+GLAPI void APIENTRY GLAPI_PREFIX(TexCoord3f)(GLfloat s, GLfloat t, GLfloat r);
+GLAPI void APIENTRY GLAPI_PREFIX(TexCoord3fv)(const GLfloat *v);
+GLAPI void APIENTRY GLAPI_PREFIX(TexCoord3i)(GLint s, GLint t, GLint r);
+GLAPI void APIENTRY GLAPI_PREFIX(TexCoord3iv)(const GLint *v);
+GLAPI void APIENTRY GLAPI_PREFIX(TexCoord3s)(GLshort s, GLshort t, GLshort r);
+GLAPI void APIENTRY GLAPI_PREFIX(TexCoord3sv)(const GLshort *v);
+GLAPI void APIENTRY GLAPI_PREFIX(TexCoord4d)(GLdouble s, GLdouble t, GLdouble r, GLdouble q);
+GLAPI void APIENTRY GLAPI_PREFIX(TexCoord4dv)(const GLdouble *v);
+GLAPI void APIENTRY GLAPI_PREFIX(TexCoord4f)(GLfloat s, GLfloat t, GLfloat r, GLfloat q);
+GLAPI void APIENTRY GLAPI_PREFIX(TexCoord4fv)(const GLfloat *v);
+GLAPI void APIENTRY GLAPI_PREFIX(TexCoord4i)(GLint s, GLint t, GLint r, GLint q);
+GLAPI void APIENTRY GLAPI_PREFIX(TexCoord4iv)(const GLint *v);
+GLAPI void APIENTRY GLAPI_PREFIX(TexCoord4s)(GLshort s, GLshort t, GLshort r, GLshort q);
+GLAPI void APIENTRY GLAPI_PREFIX(TexCoord4sv)(const GLshort *v);
+GLAPI void APIENTRY GLAPI_PREFIX(Vertex2d)(GLdouble x, GLdouble y);
+GLAPI void APIENTRY GLAPI_PREFIX(Vertex2dv)(const GLdouble *v);
+GLAPI void APIENTRY GLAPI_PREFIX(Vertex2f)(GLfloat x, GLfloat y);
+GLAPI void APIENTRY GLAPI_PREFIX(Vertex2fv)(const GLfloat *v);
+GLAPI void APIENTRY GLAPI_PREFIX(Vertex2i)(GLint x, GLint y);
+GLAPI void APIENTRY GLAPI_PREFIX(Vertex2iv)(const GLint *v);
+GLAPI void APIENTRY GLAPI_PREFIX(Vertex2s)(GLshort x, GLshort y);
+GLAPI void APIENTRY GLAPI_PREFIX(Vertex2sv)(const GLshort *v);
+GLAPI void APIENTRY GLAPI_PREFIX(Vertex3d)(GLdouble x, GLdouble y, GLdouble z);
+GLAPI void APIENTRY GLAPI_PREFIX(Vertex3dv)(const GLdouble *v);
+GLAPI void APIENTRY GLAPI_PREFIX(Vertex3f)(GLfloat x, GLfloat y, GLfloat z);
+GLAPI void APIENTRY GLAPI_PREFIX(Vertex3fv)(const GLfloat *v);
+GLAPI void APIENTRY GLAPI_PREFIX(Vertex3i)(GLint x, GLint y, GLint z);
+GLAPI void APIENTRY GLAPI_PREFIX(Vertex3iv)(const GLint *v);
+GLAPI void APIENTRY GLAPI_PREFIX(Vertex3s)(GLshort x, GLshort y, GLshort z);
+GLAPI void APIENTRY GLAPI_PREFIX(Vertex3sv)(const GLshort *v);
+GLAPI void APIENTRY GLAPI_PREFIX(Vertex4d)(GLdouble x, GLdouble y, GLdouble z, GLdouble w);
+GLAPI void APIENTRY GLAPI_PREFIX(Vertex4dv)(const GLdouble *v);
+GLAPI void APIENTRY GLAPI_PREFIX(Vertex4f)(GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+GLAPI void APIENTRY GLAPI_PREFIX(Vertex4fv)(const GLfloat *v);
+GLAPI void APIENTRY GLAPI_PREFIX(Vertex4i)(GLint x, GLint y, GLint z, GLint w);
+GLAPI void APIENTRY GLAPI_PREFIX(Vertex4iv)(const GLint *v);
+GLAPI void APIENTRY GLAPI_PREFIX(Vertex4s)(GLshort x, GLshort y, GLshort z, GLshort w);
+GLAPI void APIENTRY GLAPI_PREFIX(Vertex4sv)(const GLshort *v);
+GLAPI void APIENTRY GLAPI_PREFIX(ClipPlane)(GLenum plane, const GLdouble *equation);
+GLAPI void APIENTRY GLAPI_PREFIX(ColorMaterial)(GLenum face, GLenum mode);
+GLAPI void APIENTRY GLAPI_PREFIX(CullFace)(GLenum mode);
+GLAPI void APIENTRY GLAPI_PREFIX(Fogf)(GLenum pname, GLfloat param);
+GLAPI void APIENTRY GLAPI_PREFIX(Fogfv)(GLenum pname, const GLfloat *params);
+GLAPI void APIENTRY GLAPI_PREFIX(Fogi)(GLenum pname, GLint param);
+GLAPI void APIENTRY GLAPI_PREFIX(Fogiv)(GLenum pname, const GLint *params);
+GLAPI void APIENTRY GLAPI_PREFIX(FrontFace)(GLenum mode);
+GLAPI void APIENTRY GLAPI_PREFIX(Hint)(GLenum target, GLenum mode);
+GLAPI void APIENTRY GLAPI_PREFIX(Lightf)(GLenum light, GLenum pname, GLfloat param);
+GLAPI void APIENTRY GLAPI_PREFIX(Lightfv)(GLenum light, GLenum pname, const GLfloat *params);
+GLAPI void APIENTRY GLAPI_PREFIX(Lighti)(GLenum light, GLenum pname, GLint param);
+GLAPI void APIENTRY GLAPI_PREFIX(Lightiv)(GLenum light, GLenum pname, const GLint *params);
+GLAPI void APIENTRY GLAPI_PREFIX(LightModelf)(GLenum pname, GLfloat param);
+GLAPI void APIENTRY GLAPI_PREFIX(LightModelfv)(GLenum pname, const GLfloat *params);
+GLAPI void APIENTRY GLAPI_PREFIX(LightModeli)(GLenum pname, GLint param);
+GLAPI void APIENTRY GLAPI_PREFIX(LightModeliv)(GLenum pname, const GLint *params);
+GLAPI void APIENTRY GLAPI_PREFIX(LineStipple)(GLint factor, GLushort pattern);
+GLAPI void APIENTRY GLAPI_PREFIX(LineWidth)(GLfloat width);
+GLAPI void APIENTRY GLAPI_PREFIX(Materialf)(GLenum face, GLenum pname, GLfloat param);
+GLAPI void APIENTRY GLAPI_PREFIX(Materialfv)(GLenum face, GLenum pname, const GLfloat *params);
+GLAPI void APIENTRY GLAPI_PREFIX(Materiali)(GLenum face, GLenum pname, GLint param);
+GLAPI void APIENTRY GLAPI_PREFIX(Materialiv)(GLenum face, GLenum pname, const GLint *params);
+GLAPI void APIENTRY GLAPI_PREFIX(PointSize)(GLfloat size);
+GLAPI void APIENTRY GLAPI_PREFIX(PolygonMode)(GLenum face, GLenum mode);
+GLAPI void APIENTRY GLAPI_PREFIX(PolygonStipple)(const GLubyte *mask);
+GLAPI void APIENTRY GLAPI_PREFIX(Scissor)(GLint x, GLint y, GLsizei width, GLsizei height);
+GLAPI void APIENTRY GLAPI_PREFIX(ShadeModel)(GLenum mode);
+GLAPI void APIENTRY GLAPI_PREFIX(TexParameterf)(GLenum target, GLenum pname, GLfloat param);
+GLAPI void APIENTRY GLAPI_PREFIX(TexParameterfv)(GLenum target, GLenum pname, const GLfloat *params);
+GLAPI void APIENTRY GLAPI_PREFIX(TexParameteri)(GLenum target, GLenum pname, GLint param);
+GLAPI void APIENTRY GLAPI_PREFIX(TexParameteriv)(GLenum target, GLenum pname, const GLint *params);
+GLAPI void APIENTRY GLAPI_PREFIX(TexImage1D)(GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid *pixels);
+GLAPI void APIENTRY GLAPI_PREFIX(TexImage2D)(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels);
+GLAPI void APIENTRY GLAPI_PREFIX(TexEnvf)(GLenum target, GLenum pname, GLfloat param);
+GLAPI void APIENTRY GLAPI_PREFIX(TexEnvfv)(GLenum target, GLenum pname, const GLfloat *params);
+GLAPI void APIENTRY GLAPI_PREFIX(TexEnvi)(GLenum target, GLenum pname, GLint param);
+GLAPI void APIENTRY GLAPI_PREFIX(TexEnviv)(GLenum target, GLenum pname, const GLint *params);
+GLAPI void APIENTRY GLAPI_PREFIX(TexGend)(GLenum coord, GLenum pname, GLdouble param);
+GLAPI void APIENTRY GLAPI_PREFIX(TexGendv)(GLenum coord, GLenum pname, const GLdouble *params);
+GLAPI void APIENTRY GLAPI_PREFIX(TexGenf)(GLenum coord, GLenum pname, GLfloat param);
+GLAPI void APIENTRY GLAPI_PREFIX(TexGenfv)(GLenum coord, GLenum pname, const GLfloat *params);
+GLAPI void APIENTRY GLAPI_PREFIX(TexGeni)(GLenum coord, GLenum pname, GLint param);
+GLAPI void APIENTRY GLAPI_PREFIX(TexGeniv)(GLenum coord, GLenum pname, const GLint *params);
+GLAPI void APIENTRY GLAPI_PREFIX(FeedbackBuffer)(GLsizei size, GLenum type, GLfloat *buffer);
+GLAPI void APIENTRY GLAPI_PREFIX(SelectBuffer)(GLsizei size, GLuint *buffer);
+GLAPI GLint APIENTRY GLAPI_PREFIX(RenderMode)(GLenum mode);
+GLAPI void APIENTRY GLAPI_PREFIX(InitNames)(void);
+GLAPI void APIENTRY GLAPI_PREFIX(LoadName)(GLuint name);
+GLAPI void APIENTRY GLAPI_PREFIX(PassThrough)(GLfloat token);
+GLAPI void APIENTRY GLAPI_PREFIX(PopName)(void);
+GLAPI void APIENTRY GLAPI_PREFIX(PushName)(GLuint name);
+GLAPI void APIENTRY GLAPI_PREFIX(DrawBuffer)(GLenum mode);
+GLAPI void APIENTRY GLAPI_PREFIX(Clear)(GLbitfield mask);
+GLAPI void APIENTRY GLAPI_PREFIX(ClearAccum)(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
+GLAPI void APIENTRY GLAPI_PREFIX(ClearIndex)(GLfloat c);
+GLAPI void APIENTRY GLAPI_PREFIX(ClearColor)(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
+GLAPI void APIENTRY GLAPI_PREFIX(ClearStencil)(GLint s);
+GLAPI void APIENTRY GLAPI_PREFIX(ClearDepth)(GLclampd depth);
+GLAPI void APIENTRY GLAPI_PREFIX(StencilMask)(GLuint mask);
+GLAPI void APIENTRY GLAPI_PREFIX(ColorMask)(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
+GLAPI void APIENTRY GLAPI_PREFIX(DepthMask)(GLboolean flag);
+GLAPI void APIENTRY GLAPI_PREFIX(IndexMask)(GLuint mask);
+GLAPI void APIENTRY GLAPI_PREFIX(Accum)(GLenum op, GLfloat value);
+GLAPI void APIENTRY GLAPI_PREFIX(Disable)(GLenum cap);
+GLAPI void APIENTRY GLAPI_PREFIX(Enable)(GLenum cap);
+GLAPI void APIENTRY GLAPI_PREFIX(Finish)(void);
+GLAPI void APIENTRY GLAPI_PREFIX(Flush)(void);
+GLAPI void APIENTRY GLAPI_PREFIX(PopAttrib)(void);
+GLAPI void APIENTRY GLAPI_PREFIX(PushAttrib)(GLbitfield mask);
+GLAPI void APIENTRY GLAPI_PREFIX(Map1d)(GLenum target, GLdouble u1, GLdouble u2, GLint stride, GLint order, const GLdouble *points);
+GLAPI void APIENTRY GLAPI_PREFIX(Map1f)(GLenum target, GLfloat u1, GLfloat u2, GLint stride, GLint order, const GLfloat *points);
+GLAPI void APIENTRY GLAPI_PREFIX(Map2d)(GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, const GLdouble *points);
+GLAPI void APIENTRY GLAPI_PREFIX(Map2f)(GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, const GLfloat *points);
+GLAPI void APIENTRY GLAPI_PREFIX(MapGrid1d)(GLint un, GLdouble u1, GLdouble u2);
+GLAPI void APIENTRY GLAPI_PREFIX(MapGrid1f)(GLint un, GLfloat u1, GLfloat u2);
+GLAPI void APIENTRY GLAPI_PREFIX(MapGrid2d)(GLint un, GLdouble u1, GLdouble u2, GLint vn, GLdouble v1, GLdouble v2);
+GLAPI void APIENTRY GLAPI_PREFIX(MapGrid2f)(GLint un, GLfloat u1, GLfloat u2, GLint vn, GLfloat v1, GLfloat v2);
+GLAPI void APIENTRY GLAPI_PREFIX(EvalCoord1d)(GLdouble u);
+GLAPI void APIENTRY GLAPI_PREFIX(EvalCoord1dv)(const GLdouble *u);
+GLAPI void APIENTRY GLAPI_PREFIX(EvalCoord1f)(GLfloat u);
+GLAPI void APIENTRY GLAPI_PREFIX(EvalCoord1fv)(const GLfloat *u);
+GLAPI void APIENTRY GLAPI_PREFIX(EvalCoord2d)(GLdouble u, GLdouble v);
+GLAPI void APIENTRY GLAPI_PREFIX(EvalCoord2dv)(const GLdouble *u);
+GLAPI void APIENTRY GLAPI_PREFIX(EvalCoord2f)(GLfloat u, GLfloat v);
+GLAPI void APIENTRY GLAPI_PREFIX(EvalCoord2fv)(const GLfloat *u);
+GLAPI void APIENTRY GLAPI_PREFIX(EvalMesh1)(GLenum mode, GLint i1, GLint i2);
+GLAPI void APIENTRY GLAPI_PREFIX(EvalPoint1)(GLint i);
+GLAPI void APIENTRY GLAPI_PREFIX(EvalMesh2)(GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2);
+GLAPI void APIENTRY GLAPI_PREFIX(EvalPoint2)(GLint i, GLint j);
+GLAPI void APIENTRY GLAPI_PREFIX(AlphaFunc)(GLenum func, GLclampf ref);
+GLAPI void APIENTRY GLAPI_PREFIX(BlendFunc)(GLenum sfactor, GLenum dfactor);
+GLAPI void APIENTRY GLAPI_PREFIX(LogicOp)(GLenum opcode);
+GLAPI void APIENTRY GLAPI_PREFIX(StencilFunc)(GLenum func, GLint ref, GLuint mask);
+GLAPI void APIENTRY GLAPI_PREFIX(StencilOp)(GLenum fail, GLenum zfail, GLenum zpass);
+GLAPI void APIENTRY GLAPI_PREFIX(DepthFunc)(GLenum func);
+GLAPI void APIENTRY GLAPI_PREFIX(PixelZoom)(GLfloat xfactor, GLfloat yfactor);
+GLAPI void APIENTRY GLAPI_PREFIX(PixelTransferf)(GLenum pname, GLfloat param);
+GLAPI void APIENTRY GLAPI_PREFIX(PixelTransferi)(GLenum pname, GLint param);
+GLAPI void APIENTRY GLAPI_PREFIX(PixelStoref)(GLenum pname, GLfloat param);
+GLAPI void APIENTRY GLAPI_PREFIX(PixelStorei)(GLenum pname, GLint param);
+GLAPI void APIENTRY GLAPI_PREFIX(PixelMapfv)(GLenum map, GLsizei mapsize, const GLfloat *values);
+GLAPI void APIENTRY GLAPI_PREFIX(PixelMapuiv)(GLenum map, GLsizei mapsize, const GLuint *values);
+GLAPI void APIENTRY GLAPI_PREFIX(PixelMapusv)(GLenum map, GLsizei mapsize, const GLushort *values);
+GLAPI void APIENTRY GLAPI_PREFIX(ReadBuffer)(GLenum mode);
+GLAPI void APIENTRY GLAPI_PREFIX(CopyPixels)(GLint x, GLint y, GLsizei width, GLsizei height, GLenum type);
+GLAPI void APIENTRY GLAPI_PREFIX(ReadPixels)(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels);
+GLAPI void APIENTRY GLAPI_PREFIX(DrawPixels)(GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels);
+GLAPI void APIENTRY GLAPI_PREFIX(GetBooleanv)(GLenum pname, GLboolean *params);
+GLAPI void APIENTRY GLAPI_PREFIX(GetClipPlane)(GLenum plane, GLdouble *equation);
+GLAPI void APIENTRY GLAPI_PREFIX(GetDoublev)(GLenum pname, GLdouble *params);
+GLAPI GLenum APIENTRY GLAPI_PREFIX(GetError)(void);
+GLAPI void APIENTRY GLAPI_PREFIX(GetFloatv)(GLenum pname, GLfloat *params);
+GLAPI void APIENTRY GLAPI_PREFIX(GetIntegerv)(GLenum pname, GLint *params);
+GLAPI void APIENTRY GLAPI_PREFIX(GetLightfv)(GLenum light, GLenum pname, GLfloat *params);
+GLAPI void APIENTRY GLAPI_PREFIX(GetLightiv)(GLenum light, GLenum pname, GLint *params);
+GLAPI void APIENTRY GLAPI_PREFIX(GetMapdv)(GLenum target, GLenum query, GLdouble *v);
+GLAPI void APIENTRY GLAPI_PREFIX(GetMapfv)(GLenum target, GLenum query, GLfloat *v);
+GLAPI void APIENTRY GLAPI_PREFIX(GetMapiv)(GLenum target, GLenum query, GLint *v);
+GLAPI void APIENTRY GLAPI_PREFIX(GetMaterialfv)(GLenum face, GLenum pname, GLfloat *params);
+GLAPI void APIENTRY GLAPI_PREFIX(GetMaterialiv)(GLenum face, GLenum pname, GLint *params);
+GLAPI void APIENTRY GLAPI_PREFIX(GetPixelMapfv)(GLenum map, GLfloat *values);
+GLAPI void APIENTRY GLAPI_PREFIX(GetPixelMapuiv)(GLenum map, GLuint *values);
+GLAPI void APIENTRY GLAPI_PREFIX(GetPixelMapusv)(GLenum map, GLushort *values);
+GLAPI void APIENTRY GLAPI_PREFIX(GetPolygonStipple)(GLubyte *mask);
+GLAPI const GLubyte * APIENTRY GLAPI_PREFIX(GetString)(GLenum name);
+GLAPI void APIENTRY GLAPI_PREFIX(GetTexEnvfv)(GLenum target, GLenum pname, GLfloat *params);
+GLAPI void APIENTRY GLAPI_PREFIX(GetTexEnviv)(GLenum target, GLenum pname, GLint *params);
+GLAPI void APIENTRY GLAPI_PREFIX(GetTexGendv)(GLenum coord, GLenum pname, GLdouble *params);
+GLAPI void APIENTRY GLAPI_PREFIX(GetTexGenfv)(GLenum coord, GLenum pname, GLfloat *params);
+GLAPI void APIENTRY GLAPI_PREFIX(GetTexGeniv)(GLenum coord, GLenum pname, GLint *params);
+GLAPI void APIENTRY GLAPI_PREFIX(GetTexImage)(GLenum target, GLint level, GLenum format, GLenum type, GLvoid *pixels);
+GLAPI void APIENTRY GLAPI_PREFIX(GetTexParameterfv)(GLenum target, GLenum pname, GLfloat *params);
+GLAPI void APIENTRY GLAPI_PREFIX(GetTexParameteriv)(GLenum target, GLenum pname, GLint *params);
+GLAPI void APIENTRY GLAPI_PREFIX(GetTexLevelParameterfv)(GLenum target, GLint level, GLenum pname, GLfloat *params);
+GLAPI void APIENTRY GLAPI_PREFIX(GetTexLevelParameteriv)(GLenum target, GLint level, GLenum pname, GLint *params);
+GLAPI GLboolean APIENTRY GLAPI_PREFIX(IsEnabled)(GLenum cap);
+GLAPI GLboolean APIENTRY GLAPI_PREFIX(IsList)(GLuint list);
+GLAPI void APIENTRY GLAPI_PREFIX(DepthRange)(GLclampd zNear, GLclampd zFar);
+GLAPI void APIENTRY GLAPI_PREFIX(Frustum)(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar);
+GLAPI void APIENTRY GLAPI_PREFIX(LoadIdentity)(void);
+GLAPI void APIENTRY GLAPI_PREFIX(LoadMatrixf)(const GLfloat *m);
+GLAPI void APIENTRY GLAPI_PREFIX(LoadMatrixd)(const GLdouble *m);
+GLAPI void APIENTRY GLAPI_PREFIX(MatrixMode)(GLenum mode);
+GLAPI void APIENTRY GLAPI_PREFIX(MultMatrixf)(const GLfloat *m);
+GLAPI void APIENTRY GLAPI_PREFIX(MultMatrixd)(const GLdouble *m);
+GLAPI void APIENTRY GLAPI_PREFIX(Ortho)(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar);
+GLAPI void APIENTRY GLAPI_PREFIX(PopMatrix)(void);
+GLAPI void APIENTRY GLAPI_PREFIX(PushMatrix)(void);
+GLAPI void APIENTRY GLAPI_PREFIX(Rotated)(GLdouble angle, GLdouble x, GLdouble y, GLdouble z);
+GLAPI void APIENTRY GLAPI_PREFIX(Rotatef)(GLfloat angle, GLfloat x, GLfloat y, GLfloat z);
+GLAPI void APIENTRY GLAPI_PREFIX(Scaled)(GLdouble x, GLdouble y, GLdouble z);
+GLAPI void APIENTRY GLAPI_PREFIX(Scalef)(GLfloat x, GLfloat y, GLfloat z);
+GLAPI void APIENTRY GLAPI_PREFIX(Translated)(GLdouble x, GLdouble y, GLdouble z);
+GLAPI void APIENTRY GLAPI_PREFIX(Translatef)(GLfloat x, GLfloat y, GLfloat z);
+GLAPI void APIENTRY GLAPI_PREFIX(Viewport)(GLint x, GLint y, GLsizei width, GLsizei height);
+GLAPI void APIENTRY GLAPI_PREFIX(ArrayElement)(GLint i);
+GLAPI void APIENTRY GLAPI_PREFIX(ArrayElementEXT)(GLint i);
+GLAPI void APIENTRY GLAPI_PREFIX(BindTexture)(GLenum target, GLuint texture);
+GLAPI void APIENTRY GLAPI_PREFIX(BindTextureEXT)(GLenum target, GLuint texture);
+GLAPI void APIENTRY GLAPI_PREFIX(ColorPointer)(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
+GLAPI void APIENTRY GLAPI_PREFIX(DisableClientState)(GLenum array);
+GLAPI void APIENTRY GLAPI_PREFIX(DrawArrays)(GLenum mode, GLint first, GLsizei count);
+GLAPI void APIENTRY GLAPI_PREFIX(DrawArraysEXT)(GLenum mode, GLint first, GLsizei count);
+GLAPI void APIENTRY GLAPI_PREFIX(DrawElements)(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices);
+GLAPI void APIENTRY GLAPI_PREFIX(EdgeFlagPointer)(GLsizei stride, const GLvoid *pointer);
+GLAPI void APIENTRY GLAPI_PREFIX(EnableClientState)(GLenum array);
+GLAPI void APIENTRY GLAPI_PREFIX(IndexPointer)(GLenum type, GLsizei stride, const GLvoid *pointer);
+GLAPI void APIENTRY GLAPI_PREFIX(Indexub)(GLubyte c);
+GLAPI void APIENTRY GLAPI_PREFIX(Indexubv)(const GLubyte *c);
+GLAPI void APIENTRY GLAPI_PREFIX(InterleavedArrays)(GLenum format, GLsizei stride, const GLvoid *pointer);
+GLAPI void APIENTRY GLAPI_PREFIX(NormalPointer)(GLenum type, GLsizei stride, const GLvoid *pointer);
+GLAPI void APIENTRY GLAPI_PREFIX(PolygonOffset)(GLfloat factor, GLfloat units);
+GLAPI void APIENTRY GLAPI_PREFIX(TexCoordPointer)(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexPointer)(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
+GLAPI GLboolean APIENTRY GLAPI_PREFIX(AreTexturesResident)(GLsizei n, const GLuint *textures, GLboolean *residences);
+GLAPI GLboolean APIENTRY GLAPI_PREFIX(AreTexturesResidentEXT)(GLsizei n, const GLuint *textures, GLboolean *residences);
+GLAPI void APIENTRY GLAPI_PREFIX(CopyTexImage1D)(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border);
+GLAPI void APIENTRY GLAPI_PREFIX(CopyTexImage1DEXT)(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border);
+GLAPI void APIENTRY GLAPI_PREFIX(CopyTexImage2D)(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
+GLAPI void APIENTRY GLAPI_PREFIX(CopyTexImage2DEXT)(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
+GLAPI void APIENTRY GLAPI_PREFIX(CopyTexSubImage1D)(GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width);
+GLAPI void APIENTRY GLAPI_PREFIX(CopyTexSubImage1DEXT)(GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width);
+GLAPI void APIENTRY GLAPI_PREFIX(CopyTexSubImage2D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
+GLAPI void APIENTRY GLAPI_PREFIX(CopyTexSubImage2DEXT)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
+GLAPI void APIENTRY GLAPI_PREFIX(DeleteTextures)(GLsizei n, const GLuint *textures);
+GLAPI void APIENTRY GLAPI_PREFIX(DeleteTexturesEXT)(GLsizei n, const GLuint *textures);
+GLAPI void APIENTRY GLAPI_PREFIX(GenTextures)(GLsizei n, GLuint *textures);
+GLAPI void APIENTRY GLAPI_PREFIX(GenTexturesEXT)(GLsizei n, GLuint *textures);
+GLAPI void APIENTRY GLAPI_PREFIX(GetPointerv)(GLenum pname, GLvoid **params);
+GLAPI void APIENTRY GLAPI_PREFIX(GetPointervEXT)(GLenum pname, GLvoid **params);
+GLAPI GLboolean APIENTRY GLAPI_PREFIX(IsTexture)(GLuint texture);
+GLAPI GLboolean APIENTRY GLAPI_PREFIX(IsTextureEXT)(GLuint texture);
+GLAPI void APIENTRY GLAPI_PREFIX(PrioritizeTextures)(GLsizei n, const GLuint *textures, const GLclampf *priorities);
+GLAPI void APIENTRY GLAPI_PREFIX(PrioritizeTexturesEXT)(GLsizei n, const GLuint *textures, const GLclampf *priorities);
+GLAPI void APIENTRY GLAPI_PREFIX(TexSubImage1D)(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels);
+GLAPI void APIENTRY GLAPI_PREFIX(TexSubImage1DEXT)(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels);
+GLAPI void APIENTRY GLAPI_PREFIX(TexSubImage2D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels);
+GLAPI void APIENTRY GLAPI_PREFIX(TexSubImage2DEXT)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels);
+GLAPI void APIENTRY GLAPI_PREFIX(PopClientAttrib)(void);
+GLAPI void APIENTRY GLAPI_PREFIX(PushClientAttrib)(GLbitfield mask);
+GLAPI void APIENTRY GLAPI_PREFIX(BlendColor)(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
+GLAPI void APIENTRY GLAPI_PREFIX(BlendColorEXT)(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
+GLAPI void APIENTRY GLAPI_PREFIX(BlendEquation)(GLenum mode);
+GLAPI void APIENTRY GLAPI_PREFIX(BlendEquationEXT)(GLenum mode);
+GLAPI void APIENTRY GLAPI_PREFIX(DrawRangeElements)(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices);
+GLAPI void APIENTRY GLAPI_PREFIX(DrawRangeElementsEXT)(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices);
+GLAPI void APIENTRY GLAPI_PREFIX(ColorTable)(GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *table);
+GLAPI void APIENTRY GLAPI_PREFIX(ColorTableEXT)(GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *table);
+GLAPI void APIENTRY GLAPI_PREFIX(ColorTableParameterfv)(GLenum target, GLenum pname, const GLfloat *params);
+GLAPI void APIENTRY GLAPI_PREFIX(ColorTableParameteriv)(GLenum target, GLenum pname, const GLint *params);
+GLAPI void APIENTRY GLAPI_PREFIX(CopyColorTable)(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
+GLAPI void APIENTRY GLAPI_PREFIX(GetColorTable)(GLenum target, GLenum format, GLenum type, GLvoid *table);
+GLAPI void APIENTRY GLAPI_PREFIX(GetColorTableEXT)(GLenum target, GLenum format, GLenum type, GLvoid *table);
+void APIENTRY GLAPI_PREFIX(_dispatch_stub_343)(GLenum target, GLenum format, GLenum type, GLvoid *table);
+GLAPI void APIENTRY GLAPI_PREFIX(GetColorTableParameterfv)(GLenum target, GLenum pname, GLfloat *params);
+GLAPI void APIENTRY GLAPI_PREFIX(GetColorTableParameterfvEXT)(GLenum target, GLenum pname, GLfloat *params);
+void APIENTRY GLAPI_PREFIX(_dispatch_stub_344)(GLenum target, GLenum pname, GLfloat *params);
+GLAPI void APIENTRY GLAPI_PREFIX(GetColorTableParameteriv)(GLenum target, GLenum pname, GLint *params);
+GLAPI void APIENTRY GLAPI_PREFIX(GetColorTableParameterivEXT)(GLenum target, GLenum pname, GLint *params);
+void APIENTRY GLAPI_PREFIX(_dispatch_stub_345)(GLenum target, GLenum pname, GLint *params);
+GLAPI void APIENTRY GLAPI_PREFIX(ColorSubTable)(GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid *data);
+GLAPI void APIENTRY GLAPI_PREFIX(CopyColorSubTable)(GLenum target, GLsizei start, GLint x, GLint y, GLsizei width);
+GLAPI void APIENTRY GLAPI_PREFIX(ConvolutionFilter1D)(GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *image);
+GLAPI void APIENTRY GLAPI_PREFIX(ConvolutionFilter2D)(GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *image);
+GLAPI void APIENTRY GLAPI_PREFIX(ConvolutionParameterf)(GLenum target, GLenum pname, GLfloat params);
+GLAPI void APIENTRY GLAPI_PREFIX(ConvolutionParameterfv)(GLenum target, GLenum pname, const GLfloat *params);
+GLAPI void APIENTRY GLAPI_PREFIX(ConvolutionParameteri)(GLenum target, GLenum pname, GLint params);
+GLAPI void APIENTRY GLAPI_PREFIX(ConvolutionParameteriv)(GLenum target, GLenum pname, const GLint *params);
+GLAPI void APIENTRY GLAPI_PREFIX(CopyConvolutionFilter1D)(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
+GLAPI void APIENTRY GLAPI_PREFIX(CopyConvolutionFilter2D)(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height);
+GLAPI void APIENTRY GLAPI_PREFIX(GetConvolutionFilter)(GLenum target, GLenum format, GLenum type, GLvoid *image);
+void APIENTRY GLAPI_PREFIX(_dispatch_stub_356)(GLenum target, GLenum format, GLenum type, GLvoid *image);
+GLAPI void APIENTRY GLAPI_PREFIX(GetConvolutionParameterfv)(GLenum target, GLenum pname, GLfloat *params);
+void APIENTRY GLAPI_PREFIX(_dispatch_stub_357)(GLenum target, GLenum pname, GLfloat *params);
+GLAPI void APIENTRY GLAPI_PREFIX(GetConvolutionParameteriv)(GLenum target, GLenum pname, GLint *params);
+void APIENTRY GLAPI_PREFIX(_dispatch_stub_358)(GLenum target, GLenum pname, GLint *params);
+GLAPI void APIENTRY GLAPI_PREFIX(GetSeparableFilter)(GLenum target, GLenum format, GLenum type, GLvoid *row, GLvoid *column, GLvoid *span);
+void APIENTRY GLAPI_PREFIX(_dispatch_stub_359)(GLenum target, GLenum format, GLenum type, GLvoid *row, GLvoid *column, GLvoid *span);
+GLAPI void APIENTRY GLAPI_PREFIX(SeparableFilter2D)(GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *row, const GLvoid *column);
+GLAPI void APIENTRY GLAPI_PREFIX(GetHistogram)(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values);
+void APIENTRY GLAPI_PREFIX(_dispatch_stub_361)(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values);
+GLAPI void APIENTRY GLAPI_PREFIX(GetHistogramParameterfv)(GLenum target, GLenum pname, GLfloat *params);
+void APIENTRY GLAPI_PREFIX(_dispatch_stub_362)(GLenum target, GLenum pname, GLfloat *params);
+GLAPI void APIENTRY GLAPI_PREFIX(GetHistogramParameteriv)(GLenum target, GLenum pname, GLint *params);
+void APIENTRY GLAPI_PREFIX(_dispatch_stub_363)(GLenum target, GLenum pname, GLint *params);
+GLAPI void APIENTRY GLAPI_PREFIX(GetMinmax)(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values);
+void APIENTRY GLAPI_PREFIX(_dispatch_stub_364)(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values);
+GLAPI void APIENTRY GLAPI_PREFIX(GetMinmaxParameterfv)(GLenum target, GLenum pname, GLfloat *params);
+void APIENTRY GLAPI_PREFIX(_dispatch_stub_365)(GLenum target, GLenum pname, GLfloat *params);
+GLAPI void APIENTRY GLAPI_PREFIX(GetMinmaxParameteriv)(GLenum target, GLenum pname, GLint *params);
+void APIENTRY GLAPI_PREFIX(_dispatch_stub_366)(GLenum target, GLenum pname, GLint *params);
+GLAPI void APIENTRY GLAPI_PREFIX(Histogram)(GLenum target, GLsizei width, GLenum internalformat, GLboolean sink);
+GLAPI void APIENTRY GLAPI_PREFIX(Minmax)(GLenum target, GLenum internalformat, GLboolean sink);
+GLAPI void APIENTRY GLAPI_PREFIX(ResetHistogram)(GLenum target);
+GLAPI void APIENTRY GLAPI_PREFIX(ResetMinmax)(GLenum target);
+GLAPI void APIENTRY GLAPI_PREFIX(TexImage3D)(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels);
+GLAPI void APIENTRY GLAPI_PREFIX(TexImage3DEXT)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels);
+GLAPI void APIENTRY GLAPI_PREFIX(TexSubImage3D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels);
+GLAPI void APIENTRY GLAPI_PREFIX(TexSubImage3DEXT)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels);
+GLAPI void APIENTRY GLAPI_PREFIX(CopyTexSubImage3D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
+GLAPI void APIENTRY GLAPI_PREFIX(CopyTexSubImage3DEXT)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
+GLAPI void APIENTRY GLAPI_PREFIX(ActiveTextureARB)(GLenum texture);
+GLAPI void APIENTRY GLAPI_PREFIX(ActiveTexture)(GLenum texture);
+GLAPI void APIENTRY GLAPI_PREFIX(ClientActiveTextureARB)(GLenum texture);
+GLAPI void APIENTRY GLAPI_PREFIX(ClientActiveTexture)(GLenum texture);
+GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord1dARB)(GLenum target, GLdouble s);
+GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord1d)(GLenum target, GLdouble s);
+GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord1dvARB)(GLenum target, const GLdouble *v);
+GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord1dv)(GLenum target, const GLdouble *v);
+GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord1fARB)(GLenum target, GLfloat s);
+GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord1f)(GLenum target, GLfloat s);
+GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord1fvARB)(GLenum target, const GLfloat *v);
+GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord1fv)(GLenum target, const GLfloat *v);
+GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord1iARB)(GLenum target, GLint s);
+GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord1i)(GLenum target, GLint s);
+GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord1ivARB)(GLenum target, const GLint *v);
+GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord1iv)(GLenum target, const GLint *v);
+GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord1sARB)(GLenum target, GLshort s);
+GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord1s)(GLenum target, GLshort s);
+GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord1svARB)(GLenum target, const GLshort *v);
+GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord1sv)(GLenum target, const GLshort *v);
+GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord2dARB)(GLenum target, GLdouble s, GLdouble t);
+GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord2d)(GLenum target, GLdouble s, GLdouble t);
+GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord2dvARB)(GLenum target, const GLdouble *v);
+GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord2dv)(GLenum target, const GLdouble *v);
+GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord2fARB)(GLenum target, GLfloat s, GLfloat t);
+GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord2f)(GLenum target, GLfloat s, GLfloat t);
+GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord2fvARB)(GLenum target, const GLfloat *v);
+GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord2fv)(GLenum target, const GLfloat *v);
+GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord2iARB)(GLenum target, GLint s, GLint t);
+GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord2i)(GLenum target, GLint s, GLint t);
+GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord2ivARB)(GLenum target, const GLint *v);
+GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord2iv)(GLenum target, const GLint *v);
+GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord2sARB)(GLenum target, GLshort s, GLshort t);
+GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord2s)(GLenum target, GLshort s, GLshort t);
+GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord2svARB)(GLenum target, const GLshort *v);
+GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord2sv)(GLenum target, const GLshort *v);
+GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord3dARB)(GLenum target, GLdouble s, GLdouble t, GLdouble r);
+GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord3d)(GLenum target, GLdouble s, GLdouble t, GLdouble r);
+GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord3dvARB)(GLenum target, const GLdouble *v);
+GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord3dv)(GLenum target, const GLdouble *v);
+GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord3fARB)(GLenum target, GLfloat s, GLfloat t, GLfloat r);
+GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord3f)(GLenum target, GLfloat s, GLfloat t, GLfloat r);
+GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord3fvARB)(GLenum target, const GLfloat *v);
+GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord3fv)(GLenum target, const GLfloat *v);
+GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord3iARB)(GLenum target, GLint s, GLint t, GLint r);
+GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord3i)(GLenum target, GLint s, GLint t, GLint r);
+GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord3ivARB)(GLenum target, const GLint *v);
+GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord3iv)(GLenum target, const GLint *v);
+GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord3sARB)(GLenum target, GLshort s, GLshort t, GLshort r);
+GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord3s)(GLenum target, GLshort s, GLshort t, GLshort r);
+GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord3svARB)(GLenum target, const GLshort *v);
+GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord3sv)(GLenum target, const GLshort *v);
+GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord4dARB)(GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q);
+GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord4d)(GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q);
+GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord4dvARB)(GLenum target, const GLdouble *v);
+GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord4dv)(GLenum target, const GLdouble *v);
+GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord4fARB)(GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);
+GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord4f)(GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);
+GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord4fvARB)(GLenum target, const GLfloat *v);
+GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord4fv)(GLenum target, const GLfloat *v);
+GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord4iARB)(GLenum target, GLint s, GLint t, GLint r, GLint q);
+GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord4i)(GLenum target, GLint s, GLint t, GLint r, GLint q);
+GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord4ivARB)(GLenum target, const GLint *v);
+GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord4iv)(GLenum target, const GLint *v);
+GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord4sARB)(GLenum target, GLshort s, GLshort t, GLshort r, GLshort q);
+GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord4s)(GLenum target, GLshort s, GLshort t, GLshort r, GLshort q);
+GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord4svARB)(GLenum target, const GLshort *v);
+GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord4sv)(GLenum target, const GLshort *v);
+GLAPI void APIENTRY GLAPI_PREFIX(AttachShader)(GLuint program, GLuint shader);
+GLAPI GLuint APIENTRY GLAPI_PREFIX(CreateProgram)(void);
+GLAPI GLuint APIENTRY GLAPI_PREFIX(CreateShader)(GLenum type);
+GLAPI void APIENTRY GLAPI_PREFIX(DeleteProgram)(GLuint program);
+GLAPI void APIENTRY GLAPI_PREFIX(DeleteShader)(GLuint program);
+GLAPI void APIENTRY GLAPI_PREFIX(DetachShader)(GLuint program, GLuint shader);
+GLAPI void APIENTRY GLAPI_PREFIX(GetAttachedShaders)(GLuint program, GLsizei maxCount, GLsizei *count, GLuint *obj);
+GLAPI void APIENTRY GLAPI_PREFIX(GetProgramInfoLog)(GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
+GLAPI void APIENTRY GLAPI_PREFIX(GetProgramiv)(GLuint program, GLenum pname, GLint *params);
+GLAPI void APIENTRY GLAPI_PREFIX(GetShaderInfoLog)(GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
+GLAPI void APIENTRY GLAPI_PREFIX(GetShaderiv)(GLuint shader, GLenum pname, GLint *params);
+GLAPI GLboolean APIENTRY GLAPI_PREFIX(IsProgram)(GLuint program);
+GLAPI GLboolean APIENTRY GLAPI_PREFIX(IsShader)(GLuint shader);
+GLAPI void APIENTRY GLAPI_PREFIX(StencilFuncSeparate)(GLenum face, GLenum func, GLint ref, GLuint mask);
+GLAPI void APIENTRY GLAPI_PREFIX(StencilMaskSeparate)(GLenum face, GLuint mask);
+GLAPI void APIENTRY GLAPI_PREFIX(StencilOpSeparate)(GLenum face, GLenum sfail, GLenum zfail, GLenum zpass);
+GLAPI void APIENTRY GLAPI_PREFIX(UniformMatrix2x3fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+GLAPI void APIENTRY GLAPI_PREFIX(UniformMatrix2x4fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+GLAPI void APIENTRY GLAPI_PREFIX(UniformMatrix3x2fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+GLAPI void APIENTRY GLAPI_PREFIX(UniformMatrix3x4fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+GLAPI void APIENTRY GLAPI_PREFIX(UniformMatrix4x2fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+GLAPI void APIENTRY GLAPI_PREFIX(UniformMatrix4x3fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+GLAPI void APIENTRY GLAPI_PREFIX(ClampColor)(GLenum target, GLenum clamp);
+GLAPI void APIENTRY GLAPI_PREFIX(ClearBufferfi)(GLenum buffer, GLint drawbuffer, const GLfloat depth, const GLint stencil);
+GLAPI void APIENTRY GLAPI_PREFIX(ClearBufferfv)(GLenum buffer, GLint drawbuffer, const GLfloat *value);
+GLAPI void APIENTRY GLAPI_PREFIX(ClearBufferiv)(GLenum buffer, GLint drawbuffer, const GLint *value);
+GLAPI void APIENTRY GLAPI_PREFIX(ClearBufferuiv)(GLenum buffer, GLint drawbuffer, const GLuint *value);
+GLAPI const GLubyte * APIENTRY GLAPI_PREFIX(GetStringi)(GLenum name, GLuint index);
+GLAPI void APIENTRY GLAPI_PREFIX(TexBuffer)(GLenum target, GLenum internalFormat, GLuint buffer);
+GLAPI void APIENTRY GLAPI_PREFIX(FramebufferTexture)(GLenum target, GLenum attachment, GLuint texture, GLint level);
+GLAPI void APIENTRY GLAPI_PREFIX(GetBufferParameteri64v)(GLenum target, GLenum pname, GLint64 *params);
+GLAPI void APIENTRY GLAPI_PREFIX(GetInteger64i_v)(GLenum cap, GLuint index, GLint64 *data);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribDivisor)(GLuint index, GLuint divisor);
+GLAPI void APIENTRY GLAPI_PREFIX(LoadTransposeMatrixdARB)(const GLdouble *m);
+GLAPI void APIENTRY GLAPI_PREFIX(LoadTransposeMatrixd)(const GLdouble *m);
+GLAPI void APIENTRY GLAPI_PREFIX(LoadTransposeMatrixfARB)(const GLfloat *m);
+GLAPI void APIENTRY GLAPI_PREFIX(LoadTransposeMatrixf)(const GLfloat *m);
+GLAPI void APIENTRY GLAPI_PREFIX(MultTransposeMatrixdARB)(const GLdouble *m);
+GLAPI void APIENTRY GLAPI_PREFIX(MultTransposeMatrixd)(const GLdouble *m);
+GLAPI void APIENTRY GLAPI_PREFIX(MultTransposeMatrixfARB)(const GLfloat *m);
+GLAPI void APIENTRY GLAPI_PREFIX(MultTransposeMatrixf)(const GLfloat *m);
+GLAPI void APIENTRY GLAPI_PREFIX(SampleCoverageARB)(GLclampf value, GLboolean invert);
+GLAPI void APIENTRY GLAPI_PREFIX(SampleCoverage)(GLclampf value, GLboolean invert);
+GLAPI void APIENTRY GLAPI_PREFIX(CompressedTexImage1DARB)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data);
+GLAPI void APIENTRY GLAPI_PREFIX(CompressedTexImage1D)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data);
+GLAPI void APIENTRY GLAPI_PREFIX(CompressedTexImage2DARB)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data);
+GLAPI void APIENTRY GLAPI_PREFIX(CompressedTexImage2D)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data);
+GLAPI void APIENTRY GLAPI_PREFIX(CompressedTexImage3DARB)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data);
+GLAPI void APIENTRY GLAPI_PREFIX(CompressedTexImage3D)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data);
+GLAPI void APIENTRY GLAPI_PREFIX(CompressedTexSubImage1DARB)(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data);
+GLAPI void APIENTRY GLAPI_PREFIX(CompressedTexSubImage1D)(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data);
+GLAPI void APIENTRY GLAPI_PREFIX(CompressedTexSubImage2DARB)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data);
+GLAPI void APIENTRY GLAPI_PREFIX(CompressedTexSubImage2D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data);
+GLAPI void APIENTRY GLAPI_PREFIX(CompressedTexSubImage3DARB)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data);
+GLAPI void APIENTRY GLAPI_PREFIX(CompressedTexSubImage3D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data);
+GLAPI void APIENTRY GLAPI_PREFIX(GetCompressedTexImageARB)(GLenum target, GLint level, GLvoid *img);
+GLAPI void APIENTRY GLAPI_PREFIX(GetCompressedTexImage)(GLenum target, GLint level, GLvoid *img);
+GLAPI void APIENTRY GLAPI_PREFIX(DisableVertexAttribArrayARB)(GLuint index);
+GLAPI void APIENTRY GLAPI_PREFIX(DisableVertexAttribArray)(GLuint index);
+GLAPI void APIENTRY GLAPI_PREFIX(EnableVertexAttribArrayARB)(GLuint index);
+GLAPI void APIENTRY GLAPI_PREFIX(EnableVertexAttribArray)(GLuint index);
+GLAPI void APIENTRY GLAPI_PREFIX(GetProgramEnvParameterdvARB)(GLenum target, GLuint index, GLdouble *params);
+GLAPI void APIENTRY GLAPI_PREFIX(GetProgramEnvParameterfvARB)(GLenum target, GLuint index, GLfloat *params);
+GLAPI void APIENTRY GLAPI_PREFIX(GetProgramLocalParameterdvARB)(GLenum target, GLuint index, GLdouble *params);
+GLAPI void APIENTRY GLAPI_PREFIX(GetProgramLocalParameterfvARB)(GLenum target, GLuint index, GLfloat *params);
+GLAPI void APIENTRY GLAPI_PREFIX(GetProgramStringARB)(GLenum target, GLenum pname, GLvoid *string);
+GLAPI void APIENTRY GLAPI_PREFIX(GetProgramivARB)(GLenum target, GLenum pname, GLint *params);
+GLAPI void APIENTRY GLAPI_PREFIX(GetVertexAttribdvARB)(GLuint index, GLenum pname, GLdouble *params);
+GLAPI void APIENTRY GLAPI_PREFIX(GetVertexAttribdv)(GLuint index, GLenum pname, GLdouble *params);
+GLAPI void APIENTRY GLAPI_PREFIX(GetVertexAttribfvARB)(GLuint index, GLenum pname, GLfloat *params);
+GLAPI void APIENTRY GLAPI_PREFIX(GetVertexAttribfv)(GLuint index, GLenum pname, GLfloat *params);
+GLAPI void APIENTRY GLAPI_PREFIX(GetVertexAttribivARB)(GLuint index, GLenum pname, GLint *params);
+GLAPI void APIENTRY GLAPI_PREFIX(GetVertexAttribiv)(GLuint index, GLenum pname, GLint *params);
+GLAPI void APIENTRY GLAPI_PREFIX(ProgramEnvParameter4dARB)(GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
+GLAPI void APIENTRY GLAPI_PREFIX(ProgramParameter4dNV)(GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
+GLAPI void APIENTRY GLAPI_PREFIX(ProgramEnvParameter4dvARB)(GLenum target, GLuint index, const GLdouble *params);
+GLAPI void APIENTRY GLAPI_PREFIX(ProgramParameter4dvNV)(GLenum target, GLuint index, const GLdouble *params);
+GLAPI void APIENTRY GLAPI_PREFIX(ProgramEnvParameter4fARB)(GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+GLAPI void APIENTRY GLAPI_PREFIX(ProgramParameter4fNV)(GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+GLAPI void APIENTRY GLAPI_PREFIX(ProgramEnvParameter4fvARB)(GLenum target, GLuint index, const GLfloat *params);
+GLAPI void APIENTRY GLAPI_PREFIX(ProgramParameter4fvNV)(GLenum target, GLuint index, const GLfloat *params);
+GLAPI void APIENTRY GLAPI_PREFIX(ProgramLocalParameter4dARB)(GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
+GLAPI void APIENTRY GLAPI_PREFIX(ProgramLocalParameter4dvARB)(GLenum target, GLuint index, const GLdouble *params);
+GLAPI void APIENTRY GLAPI_PREFIX(ProgramLocalParameter4fARB)(GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+GLAPI void APIENTRY GLAPI_PREFIX(ProgramLocalParameter4fvARB)(GLenum target, GLuint index, const GLfloat *params);
+GLAPI void APIENTRY GLAPI_PREFIX(ProgramStringARB)(GLenum target, GLenum format, GLsizei len, const GLvoid *string);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib1dARB)(GLuint index, GLdouble x);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib1d)(GLuint index, GLdouble x);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib1dvARB)(GLuint index, const GLdouble *v);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib1dv)(GLuint index, const GLdouble *v);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib1fARB)(GLuint index, GLfloat x);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib1f)(GLuint index, GLfloat x);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib1fvARB)(GLuint index, const GLfloat *v);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib1fv)(GLuint index, const GLfloat *v);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib1sARB)(GLuint index, GLshort x);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib1s)(GLuint index, GLshort x);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib1svARB)(GLuint index, const GLshort *v);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib1sv)(GLuint index, const GLshort *v);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib2dARB)(GLuint index, GLdouble x, GLdouble y);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib2d)(GLuint index, GLdouble x, GLdouble y);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib2dvARB)(GLuint index, const GLdouble *v);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib2dv)(GLuint index, const GLdouble *v);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib2fARB)(GLuint index, GLfloat x, GLfloat y);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib2f)(GLuint index, GLfloat x, GLfloat y);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib2fvARB)(GLuint index, const GLfloat *v);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib2fv)(GLuint index, const GLfloat *v);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib2sARB)(GLuint index, GLshort x, GLshort y);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib2s)(GLuint index, GLshort x, GLshort y);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib2svARB)(GLuint index, const GLshort *v);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib2sv)(GLuint index, const GLshort *v);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib3dARB)(GLuint index, GLdouble x, GLdouble y, GLdouble z);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib3d)(GLuint index, GLdouble x, GLdouble y, GLdouble z);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib3dvARB)(GLuint index, const GLdouble *v);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib3dv)(GLuint index, const GLdouble *v);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib3fARB)(GLuint index, GLfloat x, GLfloat y, GLfloat z);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib3f)(GLuint index, GLfloat x, GLfloat y, GLfloat z);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib3fvARB)(GLuint index, const GLfloat *v);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib3fv)(GLuint index, const GLfloat *v);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib3sARB)(GLuint index, GLshort x, GLshort y, GLshort z);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib3s)(GLuint index, GLshort x, GLshort y, GLshort z);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib3svARB)(GLuint index, const GLshort *v);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib3sv)(GLuint index, const GLshort *v);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4NbvARB)(GLuint index, const GLbyte *v);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4Nbv)(GLuint index, const GLbyte *v);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4NivARB)(GLuint index, const GLint *v);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4Niv)(GLuint index, const GLint *v);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4NsvARB)(GLuint index, const GLshort *v);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4Nsv)(GLuint index, const GLshort *v);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4NubARB)(GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4Nub)(GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4NubvARB)(GLuint index, const GLubyte *v);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4Nubv)(GLuint index, const GLubyte *v);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4NuivARB)(GLuint index, const GLuint *v);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4Nuiv)(GLuint index, const GLuint *v);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4NusvARB)(GLuint index, const GLushort *v);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4Nusv)(GLuint index, const GLushort *v);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4bvARB)(GLuint index, const GLbyte *v);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4bv)(GLuint index, const GLbyte *v);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4dARB)(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4d)(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4dvARB)(GLuint index, const GLdouble *v);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4dv)(GLuint index, const GLdouble *v);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4fARB)(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4f)(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4fvARB)(GLuint index, const GLfloat *v);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4fv)(GLuint index, const GLfloat *v);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4ivARB)(GLuint index, const GLint *v);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4iv)(GLuint index, const GLint *v);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4sARB)(GLuint index, GLshort x, GLshort y, GLshort z, GLshort w);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4s)(GLuint index, GLshort x, GLshort y, GLshort z, GLshort w);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4svARB)(GLuint index, const GLshort *v);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4sv)(GLuint index, const GLshort *v);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4ubvARB)(GLuint index, const GLubyte *v);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4ubv)(GLuint index, const GLubyte *v);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4uivARB)(GLuint index, const GLuint *v);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4uiv)(GLuint index, const GLuint *v);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4usvARB)(GLuint index, const GLushort *v);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4usv)(GLuint index, const GLushort *v);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribPointerARB)(GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *pointer);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribPointer)(GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *pointer);
+GLAPI void APIENTRY GLAPI_PREFIX(BindBufferARB)(GLenum target, GLuint buffer);
+GLAPI void APIENTRY GLAPI_PREFIX(BindBuffer)(GLenum target, GLuint buffer);
+GLAPI void APIENTRY GLAPI_PREFIX(BufferDataARB)(GLenum target, GLsizeiptrARB size, const GLvoid *data, GLenum usage);
+GLAPI void APIENTRY GLAPI_PREFIX(BufferData)(GLenum target, GLsizeiptr size, const GLvoid *data, GLenum usage);
+GLAPI void APIENTRY GLAPI_PREFIX(BufferSubDataARB)(GLenum target, GLintptrARB offset, GLsizeiptrARB size, const GLvoid *data);
+GLAPI void APIENTRY GLAPI_PREFIX(BufferSubData)(GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid *data);
+GLAPI void APIENTRY GLAPI_PREFIX(DeleteBuffersARB)(GLsizei n, const GLuint *buffer);
+GLAPI void APIENTRY GLAPI_PREFIX(DeleteBuffers)(GLsizei n, const GLuint *buffer);
+GLAPI void APIENTRY GLAPI_PREFIX(GenBuffersARB)(GLsizei n, GLuint *buffer);
+GLAPI void APIENTRY GLAPI_PREFIX(GenBuffers)(GLsizei n, GLuint *buffer);
+GLAPI void APIENTRY GLAPI_PREFIX(GetBufferParameterivARB)(GLenum target, GLenum pname, GLint *params);
+GLAPI void APIENTRY GLAPI_PREFIX(GetBufferParameteriv)(GLenum target, GLenum pname, GLint *params);
+GLAPI void APIENTRY GLAPI_PREFIX(GetBufferPointervARB)(GLenum target, GLenum pname, GLvoid **params);
+GLAPI void APIENTRY GLAPI_PREFIX(GetBufferPointerv)(GLenum target, GLenum pname, GLvoid **params);
+GLAPI void APIENTRY GLAPI_PREFIX(GetBufferSubDataARB)(GLenum target, GLintptrARB offset, GLsizeiptrARB size, GLvoid *data);
+GLAPI void APIENTRY GLAPI_PREFIX(GetBufferSubData)(GLenum target, GLintptr offset, GLsizeiptr size, GLvoid *data);
+GLAPI GLboolean APIENTRY GLAPI_PREFIX(IsBufferARB)(GLuint buffer);
+GLAPI GLboolean APIENTRY GLAPI_PREFIX(IsBuffer)(GLuint buffer);
+GLAPI GLvoid * APIENTRY GLAPI_PREFIX(MapBufferARB)(GLenum target, GLenum access);
+GLAPI GLvoid * APIENTRY GLAPI_PREFIX(MapBuffer)(GLenum target, GLenum access);
+GLAPI GLboolean APIENTRY GLAPI_PREFIX(UnmapBufferARB)(GLenum target);
+GLAPI GLboolean APIENTRY GLAPI_PREFIX(UnmapBuffer)(GLenum target);
+GLAPI void APIENTRY GLAPI_PREFIX(BeginQueryARB)(GLenum target, GLuint id);
+GLAPI void APIENTRY GLAPI_PREFIX(BeginQuery)(GLenum target, GLuint id);
+GLAPI void APIENTRY GLAPI_PREFIX(DeleteQueriesARB)(GLsizei n, const GLuint *ids);
+GLAPI void APIENTRY GLAPI_PREFIX(DeleteQueries)(GLsizei n, const GLuint *ids);
+GLAPI void APIENTRY GLAPI_PREFIX(EndQueryARB)(GLenum target);
+GLAPI void APIENTRY GLAPI_PREFIX(EndQuery)(GLenum target);
+GLAPI void APIENTRY GLAPI_PREFIX(GenQueriesARB)(GLsizei n, GLuint *ids);
+GLAPI void APIENTRY GLAPI_PREFIX(GenQueries)(GLsizei n, GLuint *ids);
+GLAPI void APIENTRY GLAPI_PREFIX(GetQueryObjectivARB)(GLuint id, GLenum pname, GLint *params);
+GLAPI void APIENTRY GLAPI_PREFIX(GetQueryObjectiv)(GLuint id, GLenum pname, GLint *params);
+GLAPI void APIENTRY GLAPI_PREFIX(GetQueryObjectuivARB)(GLuint id, GLenum pname, GLuint *params);
+GLAPI void APIENTRY GLAPI_PREFIX(GetQueryObjectuiv)(GLuint id, GLenum pname, GLuint *params);
+GLAPI void APIENTRY GLAPI_PREFIX(GetQueryivARB)(GLenum target, GLenum pname, GLint *params);
+GLAPI void APIENTRY GLAPI_PREFIX(GetQueryiv)(GLenum target, GLenum pname, GLint *params);
+GLAPI GLboolean APIENTRY GLAPI_PREFIX(IsQueryARB)(GLuint id);
+GLAPI GLboolean APIENTRY GLAPI_PREFIX(IsQuery)(GLuint id);
+GLAPI void APIENTRY GLAPI_PREFIX(AttachObjectARB)(GLhandleARB containerObj, GLhandleARB obj);
+GLAPI void APIENTRY GLAPI_PREFIX(CompileShaderARB)(GLhandleARB shader);
+GLAPI void APIENTRY GLAPI_PREFIX(CompileShader)(GLuint shader);
+GLAPI GLhandleARB APIENTRY GLAPI_PREFIX(CreateProgramObjectARB)(void);
+GLAPI GLhandleARB APIENTRY GLAPI_PREFIX(CreateShaderObjectARB)(GLenum shaderType);
+GLAPI void APIENTRY GLAPI_PREFIX(DeleteObjectARB)(GLhandleARB obj);
+GLAPI void APIENTRY GLAPI_PREFIX(DetachObjectARB)(GLhandleARB containerObj, GLhandleARB attachedObj);
+GLAPI void APIENTRY GLAPI_PREFIX(GetActiveUniformARB)(GLhandleARB program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name);
+GLAPI void APIENTRY GLAPI_PREFIX(GetActiveUniform)(GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name);
+GLAPI void APIENTRY GLAPI_PREFIX(GetAttachedObjectsARB)(GLhandleARB containerObj, GLsizei maxLength, GLsizei *length, GLhandleARB *infoLog);
+GLAPI GLhandleARB APIENTRY GLAPI_PREFIX(GetHandleARB)(GLenum pname);
+GLAPI void APIENTRY GLAPI_PREFIX(GetInfoLogARB)(GLhandleARB obj, GLsizei maxLength, GLsizei *length, GLcharARB *infoLog);
+GLAPI void APIENTRY GLAPI_PREFIX(GetObjectParameterfvARB)(GLhandleARB obj, GLenum pname, GLfloat *params);
+GLAPI void APIENTRY GLAPI_PREFIX(GetObjectParameterivARB)(GLhandleARB obj, GLenum pname, GLint *params);
+GLAPI void APIENTRY GLAPI_PREFIX(GetShaderSourceARB)(GLhandleARB shader, GLsizei bufSize, GLsizei *length, GLcharARB *source);
+GLAPI void APIENTRY GLAPI_PREFIX(GetShaderSource)(GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source);
+GLAPI GLint APIENTRY GLAPI_PREFIX(GetUniformLocationARB)(GLhandleARB program, const GLcharARB *name);
+GLAPI GLint APIENTRY GLAPI_PREFIX(GetUniformLocation)(GLuint program, const GLchar *name);
+GLAPI void APIENTRY GLAPI_PREFIX(GetUniformfvARB)(GLhandleARB program, GLint location, GLfloat *params);
+GLAPI void APIENTRY GLAPI_PREFIX(GetUniformfv)(GLuint program, GLint location, GLfloat *params);
+GLAPI void APIENTRY GLAPI_PREFIX(GetUniformivARB)(GLhandleARB program, GLint location, GLint *params);
+GLAPI void APIENTRY GLAPI_PREFIX(GetUniformiv)(GLuint program, GLint location, GLint *params);
+GLAPI void APIENTRY GLAPI_PREFIX(LinkProgramARB)(GLhandleARB program);
+GLAPI void APIENTRY GLAPI_PREFIX(LinkProgram)(GLuint program);
+GLAPI void APIENTRY GLAPI_PREFIX(ShaderSourceARB)(GLhandleARB shader, GLsizei count, const GLcharARB **string, const GLint *length);
+GLAPI void APIENTRY GLAPI_PREFIX(ShaderSource)(GLuint shader, GLsizei count, const GLchar **string, const GLint *length);
+GLAPI void APIENTRY GLAPI_PREFIX(Uniform1fARB)(GLint location, GLfloat v0);
+GLAPI void APIENTRY GLAPI_PREFIX(Uniform1f)(GLint location, GLfloat v0);
+GLAPI void APIENTRY GLAPI_PREFIX(Uniform1fvARB)(GLint location, GLsizei count, const GLfloat *value);
+GLAPI void APIENTRY GLAPI_PREFIX(Uniform1fv)(GLint location, GLsizei count, const GLfloat *value);
+GLAPI void APIENTRY GLAPI_PREFIX(Uniform1iARB)(GLint location, GLint v0);
+GLAPI void APIENTRY GLAPI_PREFIX(Uniform1i)(GLint location, GLint v0);
+GLAPI void APIENTRY GLAPI_PREFIX(Uniform1ivARB)(GLint location, GLsizei count, const GLint *value);
+GLAPI void APIENTRY GLAPI_PREFIX(Uniform1iv)(GLint location, GLsizei count, const GLint *value);
+GLAPI void APIENTRY GLAPI_PREFIX(Uniform2fARB)(GLint location, GLfloat v0, GLfloat v1);
+GLAPI void APIENTRY GLAPI_PREFIX(Uniform2f)(GLint location, GLfloat v0, GLfloat v1);
+GLAPI void APIENTRY GLAPI_PREFIX(Uniform2fvARB)(GLint location, GLsizei count, const GLfloat *value);
+GLAPI void APIENTRY GLAPI_PREFIX(Uniform2fv)(GLint location, GLsizei count, const GLfloat *value);
+GLAPI void APIENTRY GLAPI_PREFIX(Uniform2iARB)(GLint location, GLint v0, GLint v1);
+GLAPI void APIENTRY GLAPI_PREFIX(Uniform2i)(GLint location, GLint v0, GLint v1);
+GLAPI void APIENTRY GLAPI_PREFIX(Uniform2ivARB)(GLint location, GLsizei count, const GLint *value);
+GLAPI void APIENTRY GLAPI_PREFIX(Uniform2iv)(GLint location, GLsizei count, const GLint *value);
+GLAPI void APIENTRY GLAPI_PREFIX(Uniform3fARB)(GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
+GLAPI void APIENTRY GLAPI_PREFIX(Uniform3f)(GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
+GLAPI void APIENTRY GLAPI_PREFIX(Uniform3fvARB)(GLint location, GLsizei count, const GLfloat *value);
+GLAPI void APIENTRY GLAPI_PREFIX(Uniform3fv)(GLint location, GLsizei count, const GLfloat *value);
+GLAPI void APIENTRY GLAPI_PREFIX(Uniform3iARB)(GLint location, GLint v0, GLint v1, GLint v2);
+GLAPI void APIENTRY GLAPI_PREFIX(Uniform3i)(GLint location, GLint v0, GLint v1, GLint v2);
+GLAPI void APIENTRY GLAPI_PREFIX(Uniform3ivARB)(GLint location, GLsizei count, const GLint *value);
+GLAPI void APIENTRY GLAPI_PREFIX(Uniform3iv)(GLint location, GLsizei count, const GLint *value);
+GLAPI void APIENTRY GLAPI_PREFIX(Uniform4fARB)(GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
+GLAPI void APIENTRY GLAPI_PREFIX(Uniform4f)(GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
+GLAPI void APIENTRY GLAPI_PREFIX(Uniform4fvARB)(GLint location, GLsizei count, const GLfloat *value);
+GLAPI void APIENTRY GLAPI_PREFIX(Uniform4fv)(GLint location, GLsizei count, const GLfloat *value);
+GLAPI void APIENTRY GLAPI_PREFIX(Uniform4iARB)(GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
+GLAPI void APIENTRY GLAPI_PREFIX(Uniform4i)(GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
+GLAPI void APIENTRY GLAPI_PREFIX(Uniform4ivARB)(GLint location, GLsizei count, const GLint *value);
+GLAPI void APIENTRY GLAPI_PREFIX(Uniform4iv)(GLint location, GLsizei count, const GLint *value);
+GLAPI void APIENTRY GLAPI_PREFIX(UniformMatrix2fvARB)(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+GLAPI void APIENTRY GLAPI_PREFIX(UniformMatrix2fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+GLAPI void APIENTRY GLAPI_PREFIX(UniformMatrix3fvARB)(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+GLAPI void APIENTRY GLAPI_PREFIX(UniformMatrix3fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+GLAPI void APIENTRY GLAPI_PREFIX(UniformMatrix4fvARB)(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+GLAPI void APIENTRY GLAPI_PREFIX(UniformMatrix4fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+GLAPI void APIENTRY GLAPI_PREFIX(UseProgramObjectARB)(GLhandleARB program);
+GLAPI void APIENTRY GLAPI_PREFIX(UseProgram)(GLuint program);
+GLAPI void APIENTRY GLAPI_PREFIX(ValidateProgramARB)(GLhandleARB program);
+GLAPI void APIENTRY GLAPI_PREFIX(ValidateProgram)(GLuint program);
+GLAPI void APIENTRY GLAPI_PREFIX(BindAttribLocationARB)(GLhandleARB program, GLuint index, const GLcharARB *name);
+GLAPI void APIENTRY GLAPI_PREFIX(BindAttribLocation)(GLuint program, GLuint index, const GLchar *name);
+GLAPI void APIENTRY GLAPI_PREFIX(GetActiveAttribARB)(GLhandleARB program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name);
+GLAPI void APIENTRY GLAPI_PREFIX(GetActiveAttrib)(GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name);
+GLAPI GLint APIENTRY GLAPI_PREFIX(GetAttribLocationARB)(GLhandleARB program, const GLcharARB *name);
+GLAPI GLint APIENTRY GLAPI_PREFIX(GetAttribLocation)(GLuint program, const GLchar *name);
+GLAPI void APIENTRY GLAPI_PREFIX(DrawBuffersARB)(GLsizei n, const GLenum *bufs);
+GLAPI void APIENTRY GLAPI_PREFIX(DrawBuffers)(GLsizei n, const GLenum *bufs);
+GLAPI void APIENTRY GLAPI_PREFIX(DrawBuffersATI)(GLsizei n, const GLenum *bufs);
+GLAPI void APIENTRY GLAPI_PREFIX(DrawArraysInstancedARB)(GLenum mode, GLint first, GLsizei count, GLsizei primcount);
+GLAPI void APIENTRY GLAPI_PREFIX(DrawArraysInstanced)(GLenum mode, GLint first, GLsizei count, GLsizei primcount);
+GLAPI void APIENTRY GLAPI_PREFIX(DrawArraysInstancedEXT)(GLenum mode, GLint first, GLsizei count, GLsizei primcount);
+GLAPI void APIENTRY GLAPI_PREFIX(DrawElementsInstancedARB)(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount);
+GLAPI void APIENTRY GLAPI_PREFIX(DrawElementsInstanced)(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount);
+GLAPI void APIENTRY GLAPI_PREFIX(DrawElementsInstancedEXT)(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount);
+GLAPI void APIENTRY GLAPI_PREFIX(RenderbufferStorageMultisample)(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
+GLAPI void APIENTRY GLAPI_PREFIX(RenderbufferStorageMultisampleEXT)(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
+GLAPI void APIENTRY GLAPI_PREFIX(FramebufferTextureARB)(GLenum target, GLenum attachment, GLuint texture, GLint level);
+GLAPI void APIENTRY GLAPI_PREFIX(FramebufferTextureFaceARB)(GLenum target, GLenum attachment, GLuint texture, GLint level, GLenum face);
+GLAPI void APIENTRY GLAPI_PREFIX(ProgramParameteriARB)(GLuint program, GLenum pname, GLint value);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribDivisorARB)(GLuint index, GLuint divisor);
+GLAPI void APIENTRY GLAPI_PREFIX(FlushMappedBufferRange)(GLenum target, GLintptr offset, GLsizeiptr length);
+GLAPI GLvoid * APIENTRY GLAPI_PREFIX(MapBufferRange)(GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access);
+GLAPI void APIENTRY GLAPI_PREFIX(BindVertexArray)(GLuint array);
+GLAPI void APIENTRY GLAPI_PREFIX(GenVertexArrays)(GLsizei n, GLuint *arrays);
+GLAPI void APIENTRY GLAPI_PREFIX(CopyBufferSubData)(GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size);
+GLAPI GLenum APIENTRY GLAPI_PREFIX(ClientWaitSync)(GLsync sync, GLbitfield flags, GLuint64 timeout);
+GLAPI void APIENTRY GLAPI_PREFIX(DeleteSync)(GLsync sync);
+GLAPI GLsync APIENTRY GLAPI_PREFIX(FenceSync)(GLenum condition, GLbitfield flags);
+GLAPI void APIENTRY GLAPI_PREFIX(GetInteger64v)(GLenum pname, GLint64 *params);
+GLAPI void APIENTRY GLAPI_PREFIX(GetSynciv)(GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values);
+GLAPI GLboolean APIENTRY GLAPI_PREFIX(IsSync)(GLsync sync);
+GLAPI void APIENTRY GLAPI_PREFIX(WaitSync)(GLsync sync, GLbitfield flags, GLuint64 timeout);
+GLAPI void APIENTRY GLAPI_PREFIX(DrawElementsBaseVertex)(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLint basevertex);
+GLAPI void APIENTRY GLAPI_PREFIX(DrawRangeElementsBaseVertex)(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices, GLint basevertex);
+GLAPI void APIENTRY GLAPI_PREFIX(MultiDrawElementsBaseVertex)(GLenum mode, const GLsizei *count, GLenum type, const GLvoid **indices, GLsizei primcount, const GLint *basevertex);
+GLAPI void APIENTRY GLAPI_PREFIX(BlendEquationSeparateiARB)(GLuint buf, GLenum modeRGB, GLenum modeA);
+GLAPI void APIENTRY GLAPI_PREFIX(BlendEquationiARB)(GLuint buf, GLenum mode);
+GLAPI void APIENTRY GLAPI_PREFIX(BlendFuncSeparateiARB)(GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcA, GLenum dstA);
+GLAPI void APIENTRY GLAPI_PREFIX(BlendFunciARB)(GLuint buf, GLenum src, GLenum dst);
+GLAPI void APIENTRY GLAPI_PREFIX(BindTransformFeedback)(GLenum target, GLuint id);
+GLAPI void APIENTRY GLAPI_PREFIX(DeleteTransformFeedbacks)(GLsizei n, const GLuint *ids);
+GLAPI void APIENTRY GLAPI_PREFIX(DrawTransformFeedback)(GLenum mode, GLuint id);
+GLAPI void APIENTRY GLAPI_PREFIX(GenTransformFeedbacks)(GLsizei n, GLuint *ids);
+GLAPI GLboolean APIENTRY GLAPI_PREFIX(IsTransformFeedback)(GLuint id);
+GLAPI void APIENTRY GLAPI_PREFIX(PauseTransformFeedback)(void);
+GLAPI void APIENTRY GLAPI_PREFIX(ResumeTransformFeedback)(void);
+GLAPI void APIENTRY GLAPI_PREFIX(ClearDepthf)(GLclampf depth);
+GLAPI void APIENTRY GLAPI_PREFIX(DepthRangef)(GLclampf zNear, GLclampf zFar);
+GLAPI void APIENTRY GLAPI_PREFIX(GetShaderPrecisionFormat)(GLenum shadertype, GLenum precisiontype, GLint *range, GLint *precision);
+GLAPI void APIENTRY GLAPI_PREFIX(ReleaseShaderCompiler)(void);
+GLAPI void APIENTRY GLAPI_PREFIX(ShaderBinary)(GLsizei n, const GLuint *shaders, GLenum binaryformat, const GLvoid *binary, GLsizei length);
+void APIENTRY GLAPI_PREFIX(_dispatch_stub_610)(GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, GLvoid *binary);
+void APIENTRY GLAPI_PREFIX(_dispatch_stub_611)(GLuint program, GLenum binaryFormat, const GLvoid *binary, GLsizei length);
+void APIENTRY GLAPI_PREFIX(_dispatch_stub_612)(GLuint program, GLenum pname, GLint value);
+GLAPI void APIENTRY GLAPI_PREFIX(PolygonOffsetEXT)(GLfloat factor, GLfloat bias);
+void APIENTRY GLAPI_PREFIX(_dispatch_stub_614)(GLfloat x, GLfloat y, GLfloat z, GLfloat width, GLfloat height);
+void APIENTRY GLAPI_PREFIX(_dispatch_stub_615)(const GLfloat *coords);
+void APIENTRY GLAPI_PREFIX(_dispatch_stub_616)(GLint x, GLint y, GLint z, GLint width, GLint height);
+void APIENTRY GLAPI_PREFIX(_dispatch_stub_617)(const GLint *coords);
+void APIENTRY GLAPI_PREFIX(_dispatch_stub_618)(GLshort x, GLshort y, GLshort z, GLshort width, GLshort height);
+void APIENTRY GLAPI_PREFIX(_dispatch_stub_619)(const GLshort *coords);
+void APIENTRY GLAPI_PREFIX(_dispatch_stub_620)(GLfixed x, GLfixed y, GLfixed z, GLfixed width, GLfixed height);
+void APIENTRY GLAPI_PREFIX(_dispatch_stub_621)(const GLfixed *coords);
+void APIENTRY GLAPI_PREFIX(_dispatch_stub_622)(GLenum type, GLsizei stride, const GLvoid *pointer);
+void APIENTRY GLAPI_PREFIX(_dispatch_stub_623)(GLenum pname, GLfloat *params);
+void APIENTRY GLAPI_PREFIX(_dispatch_stub_624)(GLenum pname, GLint *params);
+void APIENTRY GLAPI_PREFIX(_dispatch_stub_625)(GLenum pname, GLfloat param);
+void APIENTRY GLAPI_PREFIX(_dispatch_stub_626)(GLenum pname, const GLfloat *params);
+void APIENTRY GLAPI_PREFIX(_dispatch_stub_627)(GLenum pname, GLint param);
+void APIENTRY GLAPI_PREFIX(_dispatch_stub_628)(GLenum pname, const GLint *params);
+GLbitfield APIENTRY GLAPI_PREFIX(_dispatch_stub_629)(GLfixed *mantissa, GLint *exponent);
+void APIENTRY GLAPI_PREFIX(_dispatch_stub_630)(GLclampf value, GLboolean invert);
+void APIENTRY GLAPI_PREFIX(_dispatch_stub_631)(GLenum pattern);
+GLAPI void APIENTRY GLAPI_PREFIX(ColorPointerEXT)(GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer);
+GLAPI void APIENTRY GLAPI_PREFIX(EdgeFlagPointerEXT)(GLsizei stride, GLsizei count, const GLboolean *pointer);
+GLAPI void APIENTRY GLAPI_PREFIX(IndexPointerEXT)(GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer);
+GLAPI void APIENTRY GLAPI_PREFIX(NormalPointerEXT)(GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer);
+GLAPI void APIENTRY GLAPI_PREFIX(TexCoordPointerEXT)(GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexPointerEXT)(GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer);
+GLAPI void APIENTRY GLAPI_PREFIX(PointParameterfEXT)(GLenum pname, GLfloat param);
+GLAPI void APIENTRY GLAPI_PREFIX(PointParameterf)(GLenum pname, GLfloat param);
+GLAPI void APIENTRY GLAPI_PREFIX(PointParameterfARB)(GLenum pname, GLfloat param);
+GLAPI void APIENTRY GLAPI_PREFIX(PointParameterfvEXT)(GLenum pname, const GLfloat *params);
+GLAPI void APIENTRY GLAPI_PREFIX(PointParameterfv)(GLenum pname, const GLfloat *params);
+GLAPI void APIENTRY GLAPI_PREFIX(PointParameterfvARB)(GLenum pname, const GLfloat *params);
+GLAPI void APIENTRY GLAPI_PREFIX(LockArraysEXT)(GLint first, GLsizei count);
+GLAPI void APIENTRY GLAPI_PREFIX(UnlockArraysEXT)(void);
+GLAPI void APIENTRY GLAPI_PREFIX(SecondaryColor3bEXT)(GLbyte red, GLbyte green, GLbyte blue);
+GLAPI void APIENTRY GLAPI_PREFIX(SecondaryColor3b)(GLbyte red, GLbyte green, GLbyte blue);
+GLAPI void APIENTRY GLAPI_PREFIX(SecondaryColor3bvEXT)(const GLbyte *v);
+GLAPI void APIENTRY GLAPI_PREFIX(SecondaryColor3bv)(const GLbyte *v);
+GLAPI void APIENTRY GLAPI_PREFIX(SecondaryColor3dEXT)(GLdouble red, GLdouble green, GLdouble blue);
+GLAPI void APIENTRY GLAPI_PREFIX(SecondaryColor3d)(GLdouble red, GLdouble green, GLdouble blue);
+GLAPI void APIENTRY GLAPI_PREFIX(SecondaryColor3dvEXT)(const GLdouble *v);
+GLAPI void APIENTRY GLAPI_PREFIX(SecondaryColor3dv)(const GLdouble *v);
+GLAPI void APIENTRY GLAPI_PREFIX(SecondaryColor3fEXT)(GLfloat red, GLfloat green, GLfloat blue);
+GLAPI void APIENTRY GLAPI_PREFIX(SecondaryColor3f)(GLfloat red, GLfloat green, GLfloat blue);
+GLAPI void APIENTRY GLAPI_PREFIX(SecondaryColor3fvEXT)(const GLfloat *v);
+GLAPI void APIENTRY GLAPI_PREFIX(SecondaryColor3fv)(const GLfloat *v);
+GLAPI void APIENTRY GLAPI_PREFIX(SecondaryColor3iEXT)(GLint red, GLint green, GLint blue);
+GLAPI void APIENTRY GLAPI_PREFIX(SecondaryColor3i)(GLint red, GLint green, GLint blue);
+GLAPI void APIENTRY GLAPI_PREFIX(SecondaryColor3ivEXT)(const GLint *v);
+GLAPI void APIENTRY GLAPI_PREFIX(SecondaryColor3iv)(const GLint *v);
+GLAPI void APIENTRY GLAPI_PREFIX(SecondaryColor3sEXT)(GLshort red, GLshort green, GLshort blue);
+GLAPI void APIENTRY GLAPI_PREFIX(SecondaryColor3s)(GLshort red, GLshort green, GLshort blue);
+GLAPI void APIENTRY GLAPI_PREFIX(SecondaryColor3svEXT)(const GLshort *v);
+GLAPI void APIENTRY GLAPI_PREFIX(SecondaryColor3sv)(const GLshort *v);
+GLAPI void APIENTRY GLAPI_PREFIX(SecondaryColor3ubEXT)(GLubyte red, GLubyte green, GLubyte blue);
+GLAPI void APIENTRY GLAPI_PREFIX(SecondaryColor3ub)(GLubyte red, GLubyte green, GLubyte blue);
+GLAPI void APIENTRY GLAPI_PREFIX(SecondaryColor3ubvEXT)(const GLubyte *v);
+GLAPI void APIENTRY GLAPI_PREFIX(SecondaryColor3ubv)(const GLubyte *v);
+GLAPI void APIENTRY GLAPI_PREFIX(SecondaryColor3uiEXT)(GLuint red, GLuint green, GLuint blue);
+GLAPI void APIENTRY GLAPI_PREFIX(SecondaryColor3ui)(GLuint red, GLuint green, GLuint blue);
+GLAPI void APIENTRY GLAPI_PREFIX(SecondaryColor3uivEXT)(const GLuint *v);
+GLAPI void APIENTRY GLAPI_PREFIX(SecondaryColor3uiv)(const GLuint *v);
+GLAPI void APIENTRY GLAPI_PREFIX(SecondaryColor3usEXT)(GLushort red, GLushort green, GLushort blue);
+GLAPI void APIENTRY GLAPI_PREFIX(SecondaryColor3us)(GLushort red, GLushort green, GLushort blue);
+GLAPI void APIENTRY GLAPI_PREFIX(SecondaryColor3usvEXT)(const GLushort *v);
+GLAPI void APIENTRY GLAPI_PREFIX(SecondaryColor3usv)(const GLushort *v);
+GLAPI void APIENTRY GLAPI_PREFIX(SecondaryColorPointerEXT)(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
+GLAPI void APIENTRY GLAPI_PREFIX(SecondaryColorPointer)(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
+GLAPI void APIENTRY GLAPI_PREFIX(MultiDrawArraysEXT)(GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount);
+GLAPI void APIENTRY GLAPI_PREFIX(MultiDrawArrays)(GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount);
+GLAPI void APIENTRY GLAPI_PREFIX(MultiDrawElementsEXT)(GLenum mode, const GLsizei *count, GLenum type, const GLvoid **indices, GLsizei primcount);
+GLAPI void APIENTRY GLAPI_PREFIX(MultiDrawElements)(GLenum mode, const GLsizei *count, GLenum type, const GLvoid **indices, GLsizei primcount);
+GLAPI void APIENTRY GLAPI_PREFIX(FogCoordPointerEXT)(GLenum type, GLsizei stride, const GLvoid *pointer);
+GLAPI void APIENTRY GLAPI_PREFIX(FogCoordPointer)(GLenum type, GLsizei stride, const GLvoid *pointer);
+GLAPI void APIENTRY GLAPI_PREFIX(FogCoorddEXT)(GLdouble coord);
+GLAPI void APIENTRY GLAPI_PREFIX(FogCoordd)(GLdouble coord);
+GLAPI void APIENTRY GLAPI_PREFIX(FogCoorddvEXT)(const GLdouble *coord);
+GLAPI void APIENTRY GLAPI_PREFIX(FogCoorddv)(const GLdouble *coord);
+GLAPI void APIENTRY GLAPI_PREFIX(FogCoordfEXT)(GLfloat coord);
+GLAPI void APIENTRY GLAPI_PREFIX(FogCoordf)(GLfloat coord);
+GLAPI void APIENTRY GLAPI_PREFIX(FogCoordfvEXT)(const GLfloat *coord);
+GLAPI void APIENTRY GLAPI_PREFIX(FogCoordfv)(const GLfloat *coord);
+void APIENTRY GLAPI_PREFIX(_dispatch_stub_666)(GLenum mode);
+GLAPI void APIENTRY GLAPI_PREFIX(BlendFuncSeparateEXT)(GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
+GLAPI void APIENTRY GLAPI_PREFIX(BlendFuncSeparate)(GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
+GLAPI void APIENTRY GLAPI_PREFIX(FlushVertexArrayRangeNV)(void);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexArrayRangeNV)(GLsizei length, const GLvoid *pointer);
+GLAPI void APIENTRY GLAPI_PREFIX(CombinerInputNV)(GLenum stage, GLenum portion, GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage);
+GLAPI void APIENTRY GLAPI_PREFIX(CombinerOutputNV)(GLenum stage, GLenum portion, GLenum abOutput, GLenum cdOutput, GLenum sumOutput, GLenum scale, GLenum bias, GLboolean abDotProduct, GLboolean cdDotProduct, GLboolean muxSum);
+GLAPI void APIENTRY GLAPI_PREFIX(CombinerParameterfNV)(GLenum pname, GLfloat param);
+GLAPI void APIENTRY GLAPI_PREFIX(CombinerParameterfvNV)(GLenum pname, const GLfloat *params);
+GLAPI void APIENTRY GLAPI_PREFIX(CombinerParameteriNV)(GLenum pname, GLint param);
+GLAPI void APIENTRY GLAPI_PREFIX(CombinerParameterivNV)(GLenum pname, const GLint *params);
+GLAPI void APIENTRY GLAPI_PREFIX(FinalCombinerInputNV)(GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage);
+GLAPI void APIENTRY GLAPI_PREFIX(GetCombinerInputParameterfvNV)(GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLfloat *params);
+GLAPI void APIENTRY GLAPI_PREFIX(GetCombinerInputParameterivNV)(GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLint *params);
+GLAPI void APIENTRY GLAPI_PREFIX(GetCombinerOutputParameterfvNV)(GLenum stage, GLenum portion, GLenum pname, GLfloat *params);
+GLAPI void APIENTRY GLAPI_PREFIX(GetCombinerOutputParameterivNV)(GLenum stage, GLenum portion, GLenum pname, GLint *params);
+GLAPI void APIENTRY GLAPI_PREFIX(GetFinalCombinerInputParameterfvNV)(GLenum variable, GLenum pname, GLfloat *params);
+GLAPI void APIENTRY GLAPI_PREFIX(GetFinalCombinerInputParameterivNV)(GLenum variable, GLenum pname, GLint *params);
+GLAPI void APIENTRY GLAPI_PREFIX(ResizeBuffersMESA)(void);
+GLAPI void APIENTRY GLAPI_PREFIX(WindowPos2dMESA)(GLdouble x, GLdouble y);
+GLAPI void APIENTRY GLAPI_PREFIX(WindowPos2d)(GLdouble x, GLdouble y);
+GLAPI void APIENTRY GLAPI_PREFIX(WindowPos2dARB)(GLdouble x, GLdouble y);
+GLAPI void APIENTRY GLAPI_PREFIX(WindowPos2dvMESA)(const GLdouble *v);
+GLAPI void APIENTRY GLAPI_PREFIX(WindowPos2dv)(const GLdouble *v);
+GLAPI void APIENTRY GLAPI_PREFIX(WindowPos2dvARB)(const GLdouble *v);
+GLAPI void APIENTRY GLAPI_PREFIX(WindowPos2fMESA)(GLfloat x, GLfloat y);
+GLAPI void APIENTRY GLAPI_PREFIX(WindowPos2f)(GLfloat x, GLfloat y);
+GLAPI void APIENTRY GLAPI_PREFIX(WindowPos2fARB)(GLfloat x, GLfloat y);
+GLAPI void APIENTRY GLAPI_PREFIX(WindowPos2fvMESA)(const GLfloat *v);
+GLAPI void APIENTRY GLAPI_PREFIX(WindowPos2fv)(const GLfloat *v);
+GLAPI void APIENTRY GLAPI_PREFIX(WindowPos2fvARB)(const GLfloat *v);
+GLAPI void APIENTRY GLAPI_PREFIX(WindowPos2iMESA)(GLint x, GLint y);
+GLAPI void APIENTRY GLAPI_PREFIX(WindowPos2i)(GLint x, GLint y);
+GLAPI void APIENTRY GLAPI_PREFIX(WindowPos2iARB)(GLint x, GLint y);
+GLAPI void APIENTRY GLAPI_PREFIX(WindowPos2ivMESA)(const GLint *v);
+GLAPI void APIENTRY GLAPI_PREFIX(WindowPos2iv)(const GLint *v);
+GLAPI void APIENTRY GLAPI_PREFIX(WindowPos2ivARB)(const GLint *v);
+GLAPI void APIENTRY GLAPI_PREFIX(WindowPos2sMESA)(GLshort x, GLshort y);
+GLAPI void APIENTRY GLAPI_PREFIX(WindowPos2s)(GLshort x, GLshort y);
+GLAPI void APIENTRY GLAPI_PREFIX(WindowPos2sARB)(GLshort x, GLshort y);
+GLAPI void APIENTRY GLAPI_PREFIX(WindowPos2svMESA)(const GLshort *v);
+GLAPI void APIENTRY GLAPI_PREFIX(WindowPos2sv)(const GLshort *v);
+GLAPI void APIENTRY GLAPI_PREFIX(WindowPos2svARB)(const GLshort *v);
+GLAPI void APIENTRY GLAPI_PREFIX(WindowPos3dMESA)(GLdouble x, GLdouble y, GLdouble z);
+GLAPI void APIENTRY GLAPI_PREFIX(WindowPos3d)(GLdouble x, GLdouble y, GLdouble z);
+GLAPI void APIENTRY GLAPI_PREFIX(WindowPos3dARB)(GLdouble x, GLdouble y, GLdouble z);
+GLAPI void APIENTRY GLAPI_PREFIX(WindowPos3dvMESA)(const GLdouble *v);
+GLAPI void APIENTRY GLAPI_PREFIX(WindowPos3dv)(const GLdouble *v);
+GLAPI void APIENTRY GLAPI_PREFIX(WindowPos3dvARB)(const GLdouble *v);
+GLAPI void APIENTRY GLAPI_PREFIX(WindowPos3fMESA)(GLfloat x, GLfloat y, GLfloat z);
+GLAPI void APIENTRY GLAPI_PREFIX(WindowPos3f)(GLfloat x, GLfloat y, GLfloat z);
+GLAPI void APIENTRY GLAPI_PREFIX(WindowPos3fARB)(GLfloat x, GLfloat y, GLfloat z);
+GLAPI void APIENTRY GLAPI_PREFIX(WindowPos3fvMESA)(const GLfloat *v);
+GLAPI void APIENTRY GLAPI_PREFIX(WindowPos3fv)(const GLfloat *v);
+GLAPI void APIENTRY GLAPI_PREFIX(WindowPos3fvARB)(const GLfloat *v);
+GLAPI void APIENTRY GLAPI_PREFIX(WindowPos3iMESA)(GLint x, GLint y, GLint z);
+GLAPI void APIENTRY GLAPI_PREFIX(WindowPos3i)(GLint x, GLint y, GLint z);
+GLAPI void APIENTRY GLAPI_PREFIX(WindowPos3iARB)(GLint x, GLint y, GLint z);
+GLAPI void APIENTRY GLAPI_PREFIX(WindowPos3ivMESA)(const GLint *v);
+GLAPI void APIENTRY GLAPI_PREFIX(WindowPos3iv)(const GLint *v);
+GLAPI void APIENTRY GLAPI_PREFIX(WindowPos3ivARB)(const GLint *v);
+GLAPI void APIENTRY GLAPI_PREFIX(WindowPos3sMESA)(GLshort x, GLshort y, GLshort z);
+GLAPI void APIENTRY GLAPI_PREFIX(WindowPos3s)(GLshort x, GLshort y, GLshort z);
+GLAPI void APIENTRY GLAPI_PREFIX(WindowPos3sARB)(GLshort x, GLshort y, GLshort z);
+GLAPI void APIENTRY GLAPI_PREFIX(WindowPos3svMESA)(const GLshort *v);
+GLAPI void APIENTRY GLAPI_PREFIX(WindowPos3sv)(const GLshort *v);
+GLAPI void APIENTRY GLAPI_PREFIX(WindowPos3svARB)(const GLshort *v);
+GLAPI void APIENTRY GLAPI_PREFIX(WindowPos4dMESA)(GLdouble x, GLdouble y, GLdouble z, GLdouble w);
+GLAPI void APIENTRY GLAPI_PREFIX(WindowPos4dvMESA)(const GLdouble *v);
+GLAPI void APIENTRY GLAPI_PREFIX(WindowPos4fMESA)(GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+GLAPI void APIENTRY GLAPI_PREFIX(WindowPos4fvMESA)(const GLfloat *v);
+GLAPI void APIENTRY GLAPI_PREFIX(WindowPos4iMESA)(GLint x, GLint y, GLint z, GLint w);
+GLAPI void APIENTRY GLAPI_PREFIX(WindowPos4ivMESA)(const GLint *v);
+GLAPI void APIENTRY GLAPI_PREFIX(WindowPos4sMESA)(GLshort x, GLshort y, GLshort z, GLshort w);
+GLAPI void APIENTRY GLAPI_PREFIX(WindowPos4svMESA)(const GLshort *v);
+void APIENTRY GLAPI_PREFIX(_dispatch_stub_708)(const GLenum *mode, const GLint *first, const GLsizei *count, GLsizei primcount, GLint modestride);
+void APIENTRY GLAPI_PREFIX(_dispatch_stub_709)(const GLenum *mode, const GLsizei *count, GLenum type, const GLvoid * const *indices, GLsizei primcount, GLint modestride);
+void APIENTRY GLAPI_PREFIX(_dispatch_stub_710)(GLsizei n, const GLuint *fences);
+void APIENTRY GLAPI_PREFIX(_dispatch_stub_711)(GLuint fence);
+void APIENTRY GLAPI_PREFIX(_dispatch_stub_712)(GLsizei n, GLuint *fences);
+void APIENTRY GLAPI_PREFIX(_dispatch_stub_713)(GLuint fence, GLenum pname, GLint *params);
+GLboolean APIENTRY GLAPI_PREFIX(_dispatch_stub_714)(GLuint fence);
+void APIENTRY GLAPI_PREFIX(_dispatch_stub_715)(GLuint fence, GLenum condition);
+GLboolean APIENTRY GLAPI_PREFIX(_dispatch_stub_716)(GLuint fence);
+GLAPI GLboolean APIENTRY GLAPI_PREFIX(AreProgramsResidentNV)(GLsizei n, const GLuint *ids, GLboolean *residences);
+GLAPI void APIENTRY GLAPI_PREFIX(BindProgramNV)(GLenum target, GLuint program);
+GLAPI void APIENTRY GLAPI_PREFIX(BindProgramARB)(GLenum target, GLuint program);
+GLAPI void APIENTRY GLAPI_PREFIX(DeleteProgramsNV)(GLsizei n, const GLuint *programs);
+GLAPI void APIENTRY GLAPI_PREFIX(DeleteProgramsARB)(GLsizei n, const GLuint *programs);
+GLAPI void APIENTRY GLAPI_PREFIX(ExecuteProgramNV)(GLenum target, GLuint id, const GLfloat *params);
+GLAPI void APIENTRY GLAPI_PREFIX(GenProgramsNV)(GLsizei n, GLuint *programs);
+GLAPI void APIENTRY GLAPI_PREFIX(GenProgramsARB)(GLsizei n, GLuint *programs);
+GLAPI void APIENTRY GLAPI_PREFIX(GetProgramParameterdvNV)(GLenum target, GLuint index, GLenum pname, GLdouble *params);
+GLAPI void APIENTRY GLAPI_PREFIX(GetProgramParameterfvNV)(GLenum target, GLuint index, GLenum pname, GLfloat *params);
+GLAPI void APIENTRY GLAPI_PREFIX(GetProgramStringNV)(GLuint id, GLenum pname, GLubyte *program);
+GLAPI void APIENTRY GLAPI_PREFIX(GetProgramivNV)(GLuint id, GLenum pname, GLint *params);
+GLAPI void APIENTRY GLAPI_PREFIX(GetTrackMatrixivNV)(GLenum target, GLuint address, GLenum pname, GLint *params);
+GLAPI void APIENTRY GLAPI_PREFIX(GetVertexAttribPointervNV)(GLuint index, GLenum pname, GLvoid **pointer);
+GLAPI void APIENTRY GLAPI_PREFIX(GetVertexAttribPointerv)(GLuint index, GLenum pname, GLvoid **pointer);
+GLAPI void APIENTRY GLAPI_PREFIX(GetVertexAttribPointervARB)(GLuint index, GLenum pname, GLvoid **pointer);
+GLAPI void APIENTRY GLAPI_PREFIX(GetVertexAttribdvNV)(GLuint index, GLenum pname, GLdouble *params);
+GLAPI void APIENTRY GLAPI_PREFIX(GetVertexAttribfvNV)(GLuint index, GLenum pname, GLfloat *params);
+GLAPI void APIENTRY GLAPI_PREFIX(GetVertexAttribivNV)(GLuint index, GLenum pname, GLint *params);
+GLAPI GLboolean APIENTRY GLAPI_PREFIX(IsProgramNV)(GLuint program);
+GLAPI GLboolean APIENTRY GLAPI_PREFIX(IsProgramARB)(GLuint program);
+GLAPI void APIENTRY GLAPI_PREFIX(LoadProgramNV)(GLenum target, GLuint id, GLsizei len, const GLubyte *program);
+GLAPI void APIENTRY GLAPI_PREFIX(ProgramParameters4dvNV)(GLenum target, GLuint index, GLsizei num, const GLdouble *params);
+GLAPI void APIENTRY GLAPI_PREFIX(ProgramParameters4fvNV)(GLenum target, GLuint index, GLsizei num, const GLfloat *params);
+GLAPI void APIENTRY GLAPI_PREFIX(RequestResidentProgramsNV)(GLsizei n, const GLuint *ids);
+GLAPI void APIENTRY GLAPI_PREFIX(TrackMatrixNV)(GLenum target, GLuint address, GLenum matrix, GLenum transform);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib1dNV)(GLuint index, GLdouble x);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib1dvNV)(GLuint index, const GLdouble *v);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib1fNV)(GLuint index, GLfloat x);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib1fvNV)(GLuint index, const GLfloat *v);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib1sNV)(GLuint index, GLshort x);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib1svNV)(GLuint index, const GLshort *v);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib2dNV)(GLuint index, GLdouble x, GLdouble y);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib2dvNV)(GLuint index, const GLdouble *v);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib2fNV)(GLuint index, GLfloat x, GLfloat y);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib2fvNV)(GLuint index, const GLfloat *v);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib2sNV)(GLuint index, GLshort x, GLshort y);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib2svNV)(GLuint index, const GLshort *v);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib3dNV)(GLuint index, GLdouble x, GLdouble y, GLdouble z);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib3dvNV)(GLuint index, const GLdouble *v);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib3fNV)(GLuint index, GLfloat x, GLfloat y, GLfloat z);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib3fvNV)(GLuint index, const GLfloat *v);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib3sNV)(GLuint index, GLshort x, GLshort y, GLshort z);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib3svNV)(GLuint index, const GLshort *v);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4dNV)(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4dvNV)(GLuint index, const GLdouble *v);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4fNV)(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4fvNV)(GLuint index, const GLfloat *v);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4sNV)(GLuint index, GLshort x, GLshort y, GLshort z, GLshort w);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4svNV)(GLuint index, const GLshort *v);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4ubNV)(GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4ubvNV)(GLuint index, const GLubyte *v);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribPointerNV)(GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribs1dvNV)(GLuint index, GLsizei n, const GLdouble *v);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribs1fvNV)(GLuint index, GLsizei n, const GLfloat *v);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribs1svNV)(GLuint index, GLsizei n, const GLshort *v);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribs2dvNV)(GLuint index, GLsizei n, const GLdouble *v);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribs2fvNV)(GLuint index, GLsizei n, const GLfloat *v);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribs2svNV)(GLuint index, GLsizei n, const GLshort *v);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribs3dvNV)(GLuint index, GLsizei n, const GLdouble *v);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribs3fvNV)(GLuint index, GLsizei n, const GLfloat *v);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribs3svNV)(GLuint index, GLsizei n, const GLshort *v);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribs4dvNV)(GLuint index, GLsizei n, const GLdouble *v);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribs4fvNV)(GLuint index, GLsizei n, const GLfloat *v);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribs4svNV)(GLuint index, GLsizei n, const GLshort *v);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribs4ubvNV)(GLuint index, GLsizei n, const GLubyte *v);
+GLAPI void APIENTRY GLAPI_PREFIX(GetTexBumpParameterfvATI)(GLenum pname, GLfloat *param);
+GLAPI void APIENTRY GLAPI_PREFIX(GetTexBumpParameterivATI)(GLenum pname, GLint *param);
+GLAPI void APIENTRY GLAPI_PREFIX(TexBumpParameterfvATI)(GLenum pname, const GLfloat *param);
+GLAPI void APIENTRY GLAPI_PREFIX(TexBumpParameterivATI)(GLenum pname, const GLint *param);
+GLAPI void APIENTRY GLAPI_PREFIX(AlphaFragmentOp1ATI)(GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod);
+GLAPI void APIENTRY GLAPI_PREFIX(AlphaFragmentOp2ATI)(GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod);
+GLAPI void APIENTRY GLAPI_PREFIX(AlphaFragmentOp3ATI)(GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod);
+GLAPI void APIENTRY GLAPI_PREFIX(BeginFragmentShaderATI)(void);
+GLAPI void APIENTRY GLAPI_PREFIX(BindFragmentShaderATI)(GLuint id);
+GLAPI void APIENTRY GLAPI_PREFIX(ColorFragmentOp1ATI)(GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod);
+GLAPI void APIENTRY GLAPI_PREFIX(ColorFragmentOp2ATI)(GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod);
+GLAPI void APIENTRY GLAPI_PREFIX(ColorFragmentOp3ATI)(GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod);
+GLAPI void APIENTRY GLAPI_PREFIX(DeleteFragmentShaderATI)(GLuint id);
+GLAPI void APIENTRY GLAPI_PREFIX(EndFragmentShaderATI)(void);
+GLAPI GLuint APIENTRY GLAPI_PREFIX(GenFragmentShadersATI)(GLuint range);
+GLAPI void APIENTRY GLAPI_PREFIX(PassTexCoordATI)(GLuint dst, GLuint coord, GLenum swizzle);
+GLAPI void APIENTRY GLAPI_PREFIX(SampleMapATI)(GLuint dst, GLuint interp, GLenum swizzle);
+GLAPI void APIENTRY GLAPI_PREFIX(SetFragmentShaderConstantATI)(GLuint dst, const GLfloat *value);
+GLAPI void APIENTRY GLAPI_PREFIX(PointParameteriNV)(GLenum pname, GLint param);
+GLAPI void APIENTRY GLAPI_PREFIX(PointParameteri)(GLenum pname, GLint param);
+GLAPI void APIENTRY GLAPI_PREFIX(PointParameterivNV)(GLenum pname, const GLint *params);
+GLAPI void APIENTRY GLAPI_PREFIX(PointParameteriv)(GLenum pname, const GLint *params);
+void APIENTRY GLAPI_PREFIX(_dispatch_stub_797)(GLenum face);
+void APIENTRY GLAPI_PREFIX(_dispatch_stub_798)(GLuint array);
+void APIENTRY GLAPI_PREFIX(_dispatch_stub_799)(GLsizei n, const GLuint *arrays);
+GLAPI void APIENTRY GLAPI_PREFIX(DeleteVertexArrays)(GLsizei n, const GLuint *arrays);
+void APIENTRY GLAPI_PREFIX(_dispatch_stub_800)(GLsizei n, GLuint *arrays);
+GLboolean APIENTRY GLAPI_PREFIX(_dispatch_stub_801)(GLuint array);
+GLAPI GLboolean APIENTRY GLAPI_PREFIX(IsVertexArray)(GLuint array);
+GLAPI void APIENTRY GLAPI_PREFIX(GetProgramNamedParameterdvNV)(GLuint id, GLsizei len, const GLubyte *name, GLdouble *params);
+GLAPI void APIENTRY GLAPI_PREFIX(GetProgramNamedParameterfvNV)(GLuint id, GLsizei len, const GLubyte *name, GLfloat *params);
+GLAPI void APIENTRY GLAPI_PREFIX(ProgramNamedParameter4dNV)(GLuint id, GLsizei len, const GLubyte *name, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
+GLAPI void APIENTRY GLAPI_PREFIX(ProgramNamedParameter4dvNV)(GLuint id, GLsizei len, const GLubyte *name, const GLdouble *v);
+GLAPI void APIENTRY GLAPI_PREFIX(ProgramNamedParameter4fNV)(GLuint id, GLsizei len, const GLubyte *name, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+GLAPI void APIENTRY GLAPI_PREFIX(ProgramNamedParameter4fvNV)(GLuint id, GLsizei len, const GLubyte *name, const GLfloat *v);
+GLAPI void APIENTRY GLAPI_PREFIX(PrimitiveRestartIndexNV)(GLuint index);
+GLAPI void APIENTRY GLAPI_PREFIX(PrimitiveRestartIndex)(GLuint index);
+GLAPI void APIENTRY GLAPI_PREFIX(PrimitiveRestartNV)(void);
+void APIENTRY GLAPI_PREFIX(_dispatch_stub_810)(GLenum func, GLclampx ref);
+void APIENTRY GLAPI_PREFIX(_dispatch_stub_811)(GLclampx red, GLclampx green, GLclampx blue, GLclampx alpha);
+void APIENTRY GLAPI_PREFIX(_dispatch_stub_812)(GLclampx depth);
+void APIENTRY GLAPI_PREFIX(_dispatch_stub_813)(GLenum plane, const GLfixed *equation);
+void APIENTRY GLAPI_PREFIX(_dispatch_stub_814)(GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha);
+void APIENTRY GLAPI_PREFIX(_dispatch_stub_815)(GLclampx zNear, GLclampx zFar);
+void APIENTRY GLAPI_PREFIX(_dispatch_stub_816)(GLenum pname, GLfixed param);
+void APIENTRY GLAPI_PREFIX(_dispatch_stub_817)(GLenum pname, const GLfixed *params);
+void APIENTRY GLAPI_PREFIX(_dispatch_stub_818)(GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar);
+void APIENTRY GLAPI_PREFIX(_dispatch_stub_819)(GLenum plane, GLfixed *equation);
+void APIENTRY GLAPI_PREFIX(_dispatch_stub_820)(GLenum pname, GLfixed *params);
+void APIENTRY GLAPI_PREFIX(_dispatch_stub_821)(GLenum light, GLenum pname, GLfixed *params);
+void APIENTRY GLAPI_PREFIX(_dispatch_stub_822)(GLenum face, GLenum pname, GLfixed *params);
+void APIENTRY GLAPI_PREFIX(_dispatch_stub_823)(GLenum target, GLenum pname, GLfixed *params);
+void APIENTRY GLAPI_PREFIX(_dispatch_stub_824)(GLenum coord, GLenum pname, GLfixed *params);
+void APIENTRY GLAPI_PREFIX(_dispatch_stub_825)(GLenum target, GLenum pname, GLfixed *params);
+void APIENTRY GLAPI_PREFIX(_dispatch_stub_826)(GLenum pname, GLfixed param);
+void APIENTRY GLAPI_PREFIX(_dispatch_stub_827)(GLenum pname, const GLfixed *params);
+void APIENTRY GLAPI_PREFIX(_dispatch_stub_828)(GLenum light, GLenum pname, GLfixed param);
+void APIENTRY GLAPI_PREFIX(_dispatch_stub_829)(GLenum light, GLenum pname, const GLfixed *params);
+void APIENTRY GLAPI_PREFIX(_dispatch_stub_830)(GLfixed width);
+void APIENTRY GLAPI_PREFIX(_dispatch_stub_831)(const GLfixed *m);
+void APIENTRY GLAPI_PREFIX(_dispatch_stub_832)(GLenum face, GLenum pname, GLfixed param);
+void APIENTRY GLAPI_PREFIX(_dispatch_stub_833)(GLenum face, GLenum pname, const GLfixed *params);
+void APIENTRY GLAPI_PREFIX(_dispatch_stub_834)(const GLfixed *m);
+void APIENTRY GLAPI_PREFIX(_dispatch_stub_835)(GLenum target, GLfixed s, GLfixed t, GLfixed r, GLfixed q);
+void APIENTRY GLAPI_PREFIX(_dispatch_stub_836)(GLfixed nx, GLfixed ny, GLfixed nz);
+void APIENTRY GLAPI_PREFIX(_dispatch_stub_837)(GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar);
+void APIENTRY GLAPI_PREFIX(_dispatch_stub_838)(GLenum pname, GLfixed param);
+void APIENTRY GLAPI_PREFIX(_dispatch_stub_839)(GLenum pname, const GLfixed *params);
+void APIENTRY GLAPI_PREFIX(_dispatch_stub_840)(GLfixed size);
+void APIENTRY GLAPI_PREFIX(_dispatch_stub_841)(GLfixed factor, GLfixed units);
+void APIENTRY GLAPI_PREFIX(_dispatch_stub_842)(GLfixed angle, GLfixed x, GLfixed y, GLfixed z);
+void APIENTRY GLAPI_PREFIX(_dispatch_stub_843)(GLclampx value, GLboolean invert);
+void APIENTRY GLAPI_PREFIX(_dispatch_stub_844)(GLfixed x, GLfixed y, GLfixed z);
+void APIENTRY GLAPI_PREFIX(_dispatch_stub_845)(GLenum target, GLenum pname, GLfixed param);
+void APIENTRY GLAPI_PREFIX(_dispatch_stub_846)(GLenum target, GLenum pname, const GLfixed *params);
+void APIENTRY GLAPI_PREFIX(_dispatch_stub_847)(GLenum coord, GLenum pname, GLint param);
+void APIENTRY GLAPI_PREFIX(_dispatch_stub_848)(GLenum coord, GLenum pname, const GLfixed *params);
+void APIENTRY GLAPI_PREFIX(_dispatch_stub_849)(GLenum target, GLenum pname, GLfixed param);
+void APIENTRY GLAPI_PREFIX(_dispatch_stub_850)(GLenum target, GLenum pname, const GLfixed *params);
+void APIENTRY GLAPI_PREFIX(_dispatch_stub_851)(GLfixed x, GLfixed y, GLfixed z);
+void APIENTRY GLAPI_PREFIX(_dispatch_stub_852)(GLenum plane, const GLfloat *equation);
+void APIENTRY GLAPI_PREFIX(_dispatch_stub_853)(GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar);
+void APIENTRY GLAPI_PREFIX(_dispatch_stub_854)(GLenum plane, GLfloat *equation);
+void APIENTRY GLAPI_PREFIX(_dispatch_stub_855)(GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar);
+void APIENTRY GLAPI_PREFIX(_dispatch_stub_856)(GLclampd zmin, GLclampd zmax);
+void APIENTRY GLAPI_PREFIX(_dispatch_stub_857)(GLenum modeRGB, GLenum modeA);
+GLAPI void APIENTRY GLAPI_PREFIX(BlendEquationSeparate)(GLenum modeRGB, GLenum modeA);
+GLAPI void APIENTRY GLAPI_PREFIX(BindFramebufferEXT)(GLenum target, GLuint framebuffer);
+GLAPI void APIENTRY GLAPI_PREFIX(BindFramebuffer)(GLenum target, GLuint framebuffer);
+GLAPI void APIENTRY GLAPI_PREFIX(BindRenderbufferEXT)(GLenum target, GLuint renderbuffer);
+GLAPI void APIENTRY GLAPI_PREFIX(BindRenderbuffer)(GLenum target, GLuint renderbuffer);
+GLAPI GLenum APIENTRY GLAPI_PREFIX(CheckFramebufferStatusEXT)(GLenum target);
+GLAPI GLenum APIENTRY GLAPI_PREFIX(CheckFramebufferStatus)(GLenum target);
+GLAPI void APIENTRY GLAPI_PREFIX(DeleteFramebuffersEXT)(GLsizei n, const GLuint *framebuffers);
+GLAPI void APIENTRY GLAPI_PREFIX(DeleteFramebuffers)(GLsizei n, const GLuint *framebuffers);
+GLAPI void APIENTRY GLAPI_PREFIX(DeleteRenderbuffersEXT)(GLsizei n, const GLuint *renderbuffers);
+GLAPI void APIENTRY GLAPI_PREFIX(DeleteRenderbuffers)(GLsizei n, const GLuint *renderbuffers);
+GLAPI void APIENTRY GLAPI_PREFIX(FramebufferRenderbufferEXT)(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
+GLAPI void APIENTRY GLAPI_PREFIX(FramebufferRenderbuffer)(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
+GLAPI void APIENTRY GLAPI_PREFIX(FramebufferTexture1DEXT)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
+GLAPI void APIENTRY GLAPI_PREFIX(FramebufferTexture1D)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
+GLAPI void APIENTRY GLAPI_PREFIX(FramebufferTexture2DEXT)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
+GLAPI void APIENTRY GLAPI_PREFIX(FramebufferTexture2D)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
+GLAPI void APIENTRY GLAPI_PREFIX(FramebufferTexture3DEXT)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);
+GLAPI void APIENTRY GLAPI_PREFIX(FramebufferTexture3D)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);
+GLAPI void APIENTRY GLAPI_PREFIX(GenFramebuffersEXT)(GLsizei n, GLuint *framebuffers);
+GLAPI void APIENTRY GLAPI_PREFIX(GenFramebuffers)(GLsizei n, GLuint *framebuffers);
+GLAPI void APIENTRY GLAPI_PREFIX(GenRenderbuffersEXT)(GLsizei n, GLuint *renderbuffers);
+GLAPI void APIENTRY GLAPI_PREFIX(GenRenderbuffers)(GLsizei n, GLuint *renderbuffers);
+GLAPI void APIENTRY GLAPI_PREFIX(GenerateMipmapEXT)(GLenum target);
+GLAPI void APIENTRY GLAPI_PREFIX(GenerateMipmap)(GLenum target);
+GLAPI void APIENTRY GLAPI_PREFIX(GetFramebufferAttachmentParameterivEXT)(GLenum target, GLenum attachment, GLenum pname, GLint *params);
+GLAPI void APIENTRY GLAPI_PREFIX(GetFramebufferAttachmentParameteriv)(GLenum target, GLenum attachment, GLenum pname, GLint *params);
+GLAPI void APIENTRY GLAPI_PREFIX(GetRenderbufferParameterivEXT)(GLenum target, GLenum pname, GLint *params);
+GLAPI void APIENTRY GLAPI_PREFIX(GetRenderbufferParameteriv)(GLenum target, GLenum pname, GLint *params);
+GLAPI GLboolean APIENTRY GLAPI_PREFIX(IsFramebufferEXT)(GLuint framebuffer);
+GLAPI GLboolean APIENTRY GLAPI_PREFIX(IsFramebuffer)(GLuint framebuffer);
+GLAPI GLboolean APIENTRY GLAPI_PREFIX(IsRenderbufferEXT)(GLuint renderbuffer);
+GLAPI GLboolean APIENTRY GLAPI_PREFIX(IsRenderbuffer)(GLuint renderbuffer);
+GLAPI void APIENTRY GLAPI_PREFIX(RenderbufferStorageEXT)(GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
+GLAPI void APIENTRY GLAPI_PREFIX(RenderbufferStorage)(GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
+void APIENTRY GLAPI_PREFIX(_dispatch_stub_875)(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
+GLAPI void APIENTRY GLAPI_PREFIX(BlitFramebuffer)(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
+void APIENTRY GLAPI_PREFIX(_dispatch_stub_876)(GLenum target, GLenum pname, GLint param);
+void APIENTRY GLAPI_PREFIX(_dispatch_stub_877)(GLenum target, GLintptr offset, GLsizeiptr size);
+GLAPI void APIENTRY GLAPI_PREFIX(BindFragDataLocationEXT)(GLuint program, GLuint colorNumber, const GLchar *name);
+GLAPI void APIENTRY GLAPI_PREFIX(BindFragDataLocation)(GLuint program, GLuint colorNumber, const GLchar *name);
+GLAPI GLint APIENTRY GLAPI_PREFIX(GetFragDataLocationEXT)(GLuint program, const GLchar *name);
+GLAPI GLint APIENTRY GLAPI_PREFIX(GetFragDataLocation)(GLuint program, const GLchar *name);
+GLAPI void APIENTRY GLAPI_PREFIX(GetUniformuivEXT)(GLuint program, GLint location, GLuint *params);
+GLAPI void APIENTRY GLAPI_PREFIX(GetUniformuiv)(GLuint program, GLint location, GLuint *params);
+GLAPI void APIENTRY GLAPI_PREFIX(GetVertexAttribIivEXT)(GLuint index, GLenum pname, GLint *params);
+GLAPI void APIENTRY GLAPI_PREFIX(GetVertexAttribIiv)(GLuint index, GLenum pname, GLint *params);
+GLAPI void APIENTRY GLAPI_PREFIX(GetVertexAttribIuivEXT)(GLuint index, GLenum pname, GLuint *params);
+GLAPI void APIENTRY GLAPI_PREFIX(GetVertexAttribIuiv)(GLuint index, GLenum pname, GLuint *params);
+GLAPI void APIENTRY GLAPI_PREFIX(Uniform1uiEXT)(GLint location, GLuint x);
+GLAPI void APIENTRY GLAPI_PREFIX(Uniform1ui)(GLint location, GLuint x);
+GLAPI void APIENTRY GLAPI_PREFIX(Uniform1uivEXT)(GLint location, GLsizei count, const GLuint *value);
+GLAPI void APIENTRY GLAPI_PREFIX(Uniform1uiv)(GLint location, GLsizei count, const GLuint *value);
+GLAPI void APIENTRY GLAPI_PREFIX(Uniform2uiEXT)(GLint location, GLuint x, GLuint y);
+GLAPI void APIENTRY GLAPI_PREFIX(Uniform2ui)(GLint location, GLuint x, GLuint y);
+GLAPI void APIENTRY GLAPI_PREFIX(Uniform2uivEXT)(GLint location, GLsizei count, const GLuint *value);
+GLAPI void APIENTRY GLAPI_PREFIX(Uniform2uiv)(GLint location, GLsizei count, const GLuint *value);
+GLAPI void APIENTRY GLAPI_PREFIX(Uniform3uiEXT)(GLint location, GLuint x, GLuint y, GLuint z);
+GLAPI void APIENTRY GLAPI_PREFIX(Uniform3ui)(GLint location, GLuint x, GLuint y, GLuint z);
+GLAPI void APIENTRY GLAPI_PREFIX(Uniform3uivEXT)(GLint location, GLsizei count, const GLuint *value);
+GLAPI void APIENTRY GLAPI_PREFIX(Uniform3uiv)(GLint location, GLsizei count, const GLuint *value);
+GLAPI void APIENTRY GLAPI_PREFIX(Uniform4uiEXT)(GLint location, GLuint x, GLuint y, GLuint z, GLuint w);
+GLAPI void APIENTRY GLAPI_PREFIX(Uniform4ui)(GLint location, GLuint x, GLuint y, GLuint z, GLuint w);
+GLAPI void APIENTRY GLAPI_PREFIX(Uniform4uivEXT)(GLint location, GLsizei count, const GLuint *value);
+GLAPI void APIENTRY GLAPI_PREFIX(Uniform4uiv)(GLint location, GLsizei count, const GLuint *value);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribI1iEXT)(GLuint index, GLint x);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribI1i)(GLuint index, GLint x);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribI1ivEXT)(GLuint index, const GLint *v);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribI1iv)(GLuint index, const GLint *v);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribI1uiEXT)(GLuint index, GLuint x);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribI1ui)(GLuint index, GLuint x);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribI1uivEXT)(GLuint index, const GLuint *v);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribI1uiv)(GLuint index, const GLuint *v);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribI2iEXT)(GLuint index, GLint x, GLint y);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribI2i)(GLuint index, GLint x, GLint y);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribI2ivEXT)(GLuint index, const GLint *v);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribI2iv)(GLuint index, const GLint *v);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribI2uiEXT)(GLuint index, GLuint x, GLuint y);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribI2ui)(GLuint index, GLuint x, GLuint y);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribI2uivEXT)(GLuint index, const GLuint *v);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribI2uiv)(GLuint index, const GLuint *v);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribI3iEXT)(GLuint index, GLint x, GLint y, GLint z);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribI3i)(GLuint index, GLint x, GLint y, GLint z);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribI3ivEXT)(GLuint index, const GLint *v);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribI3iv)(GLuint index, const GLint *v);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribI3uiEXT)(GLuint index, GLuint x, GLuint y, GLuint z);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribI3ui)(GLuint index, GLuint x, GLuint y, GLuint z);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribI3uivEXT)(GLuint index, const GLuint *v);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribI3uiv)(GLuint index, const GLuint *v);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribI4bvEXT)(GLuint index, const GLbyte *v);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribI4bv)(GLuint index, const GLbyte *v);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribI4iEXT)(GLuint index, GLint x, GLint y, GLint z, GLint w);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribI4i)(GLuint index, GLint x, GLint y, GLint z, GLint w);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribI4ivEXT)(GLuint index, const GLint *v);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribI4iv)(GLuint index, const GLint *v);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribI4svEXT)(GLuint index, const GLshort *v);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribI4sv)(GLuint index, const GLshort *v);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribI4ubvEXT)(GLuint index, const GLubyte *v);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribI4ubv)(GLuint index, const GLubyte *v);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribI4uiEXT)(GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribI4ui)(GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribI4uivEXT)(GLuint index, const GLuint *v);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribI4uiv)(GLuint index, const GLuint *v);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribI4usvEXT)(GLuint index, const GLushort *v);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribI4usv)(GLuint index, const GLushort *v);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribIPointerEXT)(GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribIPointer)(GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
+GLAPI void APIENTRY GLAPI_PREFIX(FramebufferTextureLayerEXT)(GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer);
+GLAPI void APIENTRY GLAPI_PREFIX(FramebufferTextureLayer)(GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer);
+GLAPI void APIENTRY GLAPI_PREFIX(ColorMaskIndexedEXT)(GLuint buf, GLboolean r, GLboolean g, GLboolean b, GLboolean a);
+GLAPI void APIENTRY GLAPI_PREFIX(ColorMaski)(GLuint buf, GLboolean r, GLboolean g, GLboolean b, GLboolean a);
+GLAPI void APIENTRY GLAPI_PREFIX(DisableIndexedEXT)(GLenum target, GLuint index);
+GLAPI void APIENTRY GLAPI_PREFIX(Disablei)(GLenum target, GLuint index);
+GLAPI void APIENTRY GLAPI_PREFIX(EnableIndexedEXT)(GLenum target, GLuint index);
+GLAPI void APIENTRY GLAPI_PREFIX(Enablei)(GLenum target, GLuint index);
+GLAPI void APIENTRY GLAPI_PREFIX(GetBooleanIndexedvEXT)(GLenum value, GLuint index, GLboolean *data);
+GLAPI void APIENTRY GLAPI_PREFIX(GetBooleani_v)(GLenum value, GLuint index, GLboolean *data);
+GLAPI void APIENTRY GLAPI_PREFIX(GetIntegerIndexedvEXT)(GLenum value, GLuint index, GLint *data);
+GLAPI void APIENTRY GLAPI_PREFIX(GetIntegeri_v)(GLenum value, GLuint index, GLint *data);
+GLAPI GLboolean APIENTRY GLAPI_PREFIX(IsEnabledIndexedEXT)(GLenum target, GLuint index);
+GLAPI GLboolean APIENTRY GLAPI_PREFIX(IsEnabledi)(GLenum target, GLuint index);
+GLAPI void APIENTRY GLAPI_PREFIX(ClearColorIiEXT)(GLint r, GLint g, GLint b, GLint a);
+GLAPI void APIENTRY GLAPI_PREFIX(ClearColorIuiEXT)(GLuint r, GLuint g, GLuint b, GLuint a);
+GLAPI void APIENTRY GLAPI_PREFIX(GetTexParameterIivEXT)(GLenum target, GLenum pname, GLint *params);
+GLAPI void APIENTRY GLAPI_PREFIX(GetTexParameterIiv)(GLenum target, GLenum pname, GLint *params);
+GLAPI void APIENTRY GLAPI_PREFIX(GetTexParameterIuivEXT)(GLenum target, GLenum pname, GLuint *params);
+GLAPI void APIENTRY GLAPI_PREFIX(GetTexParameterIuiv)(GLenum target, GLenum pname, GLuint *params);
+GLAPI void APIENTRY GLAPI_PREFIX(TexParameterIivEXT)(GLenum target, GLenum pname, const GLint *params);
+GLAPI void APIENTRY GLAPI_PREFIX(TexParameterIiv)(GLenum target, GLenum pname, const GLint *params);
+GLAPI void APIENTRY GLAPI_PREFIX(TexParameterIuivEXT)(GLenum target, GLenum pname, const GLuint *params);
+GLAPI void APIENTRY GLAPI_PREFIX(TexParameterIuiv)(GLenum target, GLenum pname, const GLuint *params);
+GLAPI void APIENTRY GLAPI_PREFIX(BeginConditionalRenderNV)(GLuint query, GLenum mode);
+GLAPI void APIENTRY GLAPI_PREFIX(BeginConditionalRender)(GLuint query, GLenum mode);
+GLAPI void APIENTRY GLAPI_PREFIX(EndConditionalRenderNV)(void);
+GLAPI void APIENTRY GLAPI_PREFIX(EndConditionalRender)(void);
+GLAPI void APIENTRY GLAPI_PREFIX(BeginTransformFeedbackEXT)(GLenum mode);
+GLAPI void APIENTRY GLAPI_PREFIX(BeginTransformFeedback)(GLenum mode);
+GLAPI void APIENTRY GLAPI_PREFIX(BindBufferBaseEXT)(GLenum target, GLuint index, GLuint buffer);
+GLAPI void APIENTRY GLAPI_PREFIX(BindBufferBase)(GLenum target, GLuint index, GLuint buffer);
+GLAPI void APIENTRY GLAPI_PREFIX(BindBufferOffsetEXT)(GLenum target, GLuint index, GLuint buffer, GLintptr offset);
+GLAPI void APIENTRY GLAPI_PREFIX(BindBufferRangeEXT)(GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size);
+GLAPI void APIENTRY GLAPI_PREFIX(BindBufferRange)(GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size);
+GLAPI void APIENTRY GLAPI_PREFIX(EndTransformFeedbackEXT)(void);
+GLAPI void APIENTRY GLAPI_PREFIX(EndTransformFeedback)(void);
+GLAPI void APIENTRY GLAPI_PREFIX(GetTransformFeedbackVaryingEXT)(GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name);
+GLAPI void APIENTRY GLAPI_PREFIX(GetTransformFeedbackVarying)(GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name);
+GLAPI void APIENTRY GLAPI_PREFIX(TransformFeedbackVaryingsEXT)(GLuint program, GLsizei count, const char **varyings, GLenum bufferMode);
+GLAPI void APIENTRY GLAPI_PREFIX(TransformFeedbackVaryings)(GLuint program, GLsizei count, const GLchar* *varyings, GLenum bufferMode);
+GLAPI void APIENTRY GLAPI_PREFIX(ProvokingVertexEXT)(GLenum mode);
+GLAPI void APIENTRY GLAPI_PREFIX(ProvokingVertex)(GLenum mode);
+void APIENTRY GLAPI_PREFIX(_dispatch_stub_935)(GLenum target, GLenum pname, GLvoid **params);
+void APIENTRY GLAPI_PREFIX(_dispatch_stub_936)(GLenum target, GLsizei length, GLvoid *pointer);
+GLAPI void APIENTRY GLAPI_PREFIX(GetObjectParameterivAPPLE)(GLenum objectType, GLuint name, GLenum pname, GLint *value);
+GLAPI GLenum APIENTRY GLAPI_PREFIX(ObjectPurgeableAPPLE)(GLenum objectType, GLuint name, GLenum option);
+GLAPI GLenum APIENTRY GLAPI_PREFIX(ObjectUnpurgeableAPPLE)(GLenum objectType, GLuint name, GLenum option);
+GLAPI void APIENTRY GLAPI_PREFIX(ActiveProgramEXT)(GLuint program);
+GLAPI GLuint APIENTRY GLAPI_PREFIX(CreateShaderProgramEXT)(GLenum type, const GLchar *string);
+GLAPI void APIENTRY GLAPI_PREFIX(UseShaderProgramEXT)(GLenum type, GLuint program);
+GLAPI void APIENTRY GLAPI_PREFIX(TextureBarrierNV)(void);
+void APIENTRY GLAPI_PREFIX(_dispatch_stub_944)(GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask);
+void APIENTRY GLAPI_PREFIX(_dispatch_stub_945)(GLenum target, GLuint index, GLsizei count, const GLfloat *params);
+void APIENTRY GLAPI_PREFIX(_dispatch_stub_946)(GLenum target, GLuint index, GLsizei count, const GLfloat *params);
+void APIENTRY GLAPI_PREFIX(_dispatch_stub_947)(GLuint id, GLenum pname, GLint64EXT *params);
+void APIENTRY GLAPI_PREFIX(_dispatch_stub_948)(GLuint id, GLenum pname, GLuint64EXT *params);
+GLAPI void APIENTRY GLAPI_PREFIX(EGLImageTargetRenderbufferStorageOES)(GLenum target, GLvoid *writeOffset);
+GLAPI void APIENTRY GLAPI_PREFIX(EGLImageTargetTexture2DOES)(GLenum target, GLvoid *writeOffset);
+#undef MAPI_TMP_DEFINES
+#endif /* MAPI_TMP_DEFINES */
+
+#ifdef MAPI_TMP_PUBLIC_ENTRIES_NO_HIDDEN
+GLAPI void APIENTRY GLAPI_PREFIX(NewList)(GLuint list, GLenum mode)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[0];
+ ((void (APIENTRY *)(GLuint list, GLenum mode)) _func)(list, mode);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(EndList)(void)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[1];
+ ((void (APIENTRY *)(void)) _func)();
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(CallList)(GLuint list)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[2];
+ ((void (APIENTRY *)(GLuint list)) _func)(list);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(CallLists)(GLsizei n, GLenum type, const GLvoid *lists)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[3];
+ ((void (APIENTRY *)(GLsizei n, GLenum type, const GLvoid *lists)) _func)(n, type, lists);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(DeleteLists)(GLuint list, GLsizei range)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[4];
+ ((void (APIENTRY *)(GLuint list, GLsizei range)) _func)(list, range);
+}
+
+GLAPI GLuint APIENTRY GLAPI_PREFIX(GenLists)(GLsizei range)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[5];
+ return ((GLuint (APIENTRY *)(GLsizei range)) _func)(range);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(ListBase)(GLuint base)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[6];
+ ((void (APIENTRY *)(GLuint base)) _func)(base);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Begin)(GLenum mode)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[7];
+ ((void (APIENTRY *)(GLenum mode)) _func)(mode);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Bitmap)(GLsizei width, GLsizei height, GLfloat xorig, GLfloat yorig, GLfloat xmove, GLfloat ymove, const GLubyte *bitmap)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[8];
+ ((void (APIENTRY *)(GLsizei width, GLsizei height, GLfloat xorig, GLfloat yorig, GLfloat xmove, GLfloat ymove, const GLubyte *bitmap)) _func)(width, height, xorig, yorig, xmove, ymove, bitmap);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Color3b)(GLbyte red, GLbyte green, GLbyte blue)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[9];
+ ((void (APIENTRY *)(GLbyte red, GLbyte green, GLbyte blue)) _func)(red, green, blue);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Color3bv)(const GLbyte *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[10];
+ ((void (APIENTRY *)(const GLbyte *v)) _func)(v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Color3d)(GLdouble red, GLdouble green, GLdouble blue)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[11];
+ ((void (APIENTRY *)(GLdouble red, GLdouble green, GLdouble blue)) _func)(red, green, blue);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Color3dv)(const GLdouble *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[12];
+ ((void (APIENTRY *)(const GLdouble *v)) _func)(v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Color3f)(GLfloat red, GLfloat green, GLfloat blue)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[13];
+ ((void (APIENTRY *)(GLfloat red, GLfloat green, GLfloat blue)) _func)(red, green, blue);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Color3fv)(const GLfloat *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[14];
+ ((void (APIENTRY *)(const GLfloat *v)) _func)(v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Color3i)(GLint red, GLint green, GLint blue)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[15];
+ ((void (APIENTRY *)(GLint red, GLint green, GLint blue)) _func)(red, green, blue);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Color3iv)(const GLint *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[16];
+ ((void (APIENTRY *)(const GLint *v)) _func)(v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Color3s)(GLshort red, GLshort green, GLshort blue)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[17];
+ ((void (APIENTRY *)(GLshort red, GLshort green, GLshort blue)) _func)(red, green, blue);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Color3sv)(const GLshort *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[18];
+ ((void (APIENTRY *)(const GLshort *v)) _func)(v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Color3ub)(GLubyte red, GLubyte green, GLubyte blue)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[19];
+ ((void (APIENTRY *)(GLubyte red, GLubyte green, GLubyte blue)) _func)(red, green, blue);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Color3ubv)(const GLubyte *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[20];
+ ((void (APIENTRY *)(const GLubyte *v)) _func)(v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Color3ui)(GLuint red, GLuint green, GLuint blue)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[21];
+ ((void (APIENTRY *)(GLuint red, GLuint green, GLuint blue)) _func)(red, green, blue);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Color3uiv)(const GLuint *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[22];
+ ((void (APIENTRY *)(const GLuint *v)) _func)(v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Color3us)(GLushort red, GLushort green, GLushort blue)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[23];
+ ((void (APIENTRY *)(GLushort red, GLushort green, GLushort blue)) _func)(red, green, blue);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Color3usv)(const GLushort *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[24];
+ ((void (APIENTRY *)(const GLushort *v)) _func)(v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Color4b)(GLbyte red, GLbyte green, GLbyte blue, GLbyte alpha)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[25];
+ ((void (APIENTRY *)(GLbyte red, GLbyte green, GLbyte blue, GLbyte alpha)) _func)(red, green, blue, alpha);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Color4bv)(const GLbyte *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[26];
+ ((void (APIENTRY *)(const GLbyte *v)) _func)(v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Color4d)(GLdouble red, GLdouble green, GLdouble blue, GLdouble alpha)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[27];
+ ((void (APIENTRY *)(GLdouble red, GLdouble green, GLdouble blue, GLdouble alpha)) _func)(red, green, blue, alpha);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Color4dv)(const GLdouble *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[28];
+ ((void (APIENTRY *)(const GLdouble *v)) _func)(v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Color4f)(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[29];
+ ((void (APIENTRY *)(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha)) _func)(red, green, blue, alpha);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Color4fv)(const GLfloat *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[30];
+ ((void (APIENTRY *)(const GLfloat *v)) _func)(v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Color4i)(GLint red, GLint green, GLint blue, GLint alpha)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[31];
+ ((void (APIENTRY *)(GLint red, GLint green, GLint blue, GLint alpha)) _func)(red, green, blue, alpha);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Color4iv)(const GLint *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[32];
+ ((void (APIENTRY *)(const GLint *v)) _func)(v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Color4s)(GLshort red, GLshort green, GLshort blue, GLshort alpha)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[33];
+ ((void (APIENTRY *)(GLshort red, GLshort green, GLshort blue, GLshort alpha)) _func)(red, green, blue, alpha);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Color4sv)(const GLshort *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[34];
+ ((void (APIENTRY *)(const GLshort *v)) _func)(v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Color4ub)(GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[35];
+ ((void (APIENTRY *)(GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha)) _func)(red, green, blue, alpha);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Color4ubv)(const GLubyte *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[36];
+ ((void (APIENTRY *)(const GLubyte *v)) _func)(v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Color4ui)(GLuint red, GLuint green, GLuint blue, GLuint alpha)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[37];
+ ((void (APIENTRY *)(GLuint red, GLuint green, GLuint blue, GLuint alpha)) _func)(red, green, blue, alpha);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Color4uiv)(const GLuint *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[38];
+ ((void (APIENTRY *)(const GLuint *v)) _func)(v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Color4us)(GLushort red, GLushort green, GLushort blue, GLushort alpha)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[39];
+ ((void (APIENTRY *)(GLushort red, GLushort green, GLushort blue, GLushort alpha)) _func)(red, green, blue, alpha);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Color4usv)(const GLushort *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[40];
+ ((void (APIENTRY *)(const GLushort *v)) _func)(v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(EdgeFlag)(GLboolean flag)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[41];
+ ((void (APIENTRY *)(GLboolean flag)) _func)(flag);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(EdgeFlagv)(const GLboolean *flag)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[42];
+ ((void (APIENTRY *)(const GLboolean *flag)) _func)(flag);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(End)(void)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[43];
+ ((void (APIENTRY *)(void)) _func)();
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Indexd)(GLdouble c)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[44];
+ ((void (APIENTRY *)(GLdouble c)) _func)(c);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Indexdv)(const GLdouble *c)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[45];
+ ((void (APIENTRY *)(const GLdouble *c)) _func)(c);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Indexf)(GLfloat c)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[46];
+ ((void (APIENTRY *)(GLfloat c)) _func)(c);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Indexfv)(const GLfloat *c)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[47];
+ ((void (APIENTRY *)(const GLfloat *c)) _func)(c);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Indexi)(GLint c)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[48];
+ ((void (APIENTRY *)(GLint c)) _func)(c);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Indexiv)(const GLint *c)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[49];
+ ((void (APIENTRY *)(const GLint *c)) _func)(c);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Indexs)(GLshort c)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[50];
+ ((void (APIENTRY *)(GLshort c)) _func)(c);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Indexsv)(const GLshort *c)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[51];
+ ((void (APIENTRY *)(const GLshort *c)) _func)(c);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Normal3b)(GLbyte nx, GLbyte ny, GLbyte nz)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[52];
+ ((void (APIENTRY *)(GLbyte nx, GLbyte ny, GLbyte nz)) _func)(nx, ny, nz);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Normal3bv)(const GLbyte *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[53];
+ ((void (APIENTRY *)(const GLbyte *v)) _func)(v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Normal3d)(GLdouble nx, GLdouble ny, GLdouble nz)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[54];
+ ((void (APIENTRY *)(GLdouble nx, GLdouble ny, GLdouble nz)) _func)(nx, ny, nz);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Normal3dv)(const GLdouble *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[55];
+ ((void (APIENTRY *)(const GLdouble *v)) _func)(v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Normal3f)(GLfloat nx, GLfloat ny, GLfloat nz)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[56];
+ ((void (APIENTRY *)(GLfloat nx, GLfloat ny, GLfloat nz)) _func)(nx, ny, nz);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Normal3fv)(const GLfloat *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[57];
+ ((void (APIENTRY *)(const GLfloat *v)) _func)(v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Normal3i)(GLint nx, GLint ny, GLint nz)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[58];
+ ((void (APIENTRY *)(GLint nx, GLint ny, GLint nz)) _func)(nx, ny, nz);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Normal3iv)(const GLint *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[59];
+ ((void (APIENTRY *)(const GLint *v)) _func)(v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Normal3s)(GLshort nx, GLshort ny, GLshort nz)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[60];
+ ((void (APIENTRY *)(GLshort nx, GLshort ny, GLshort nz)) _func)(nx, ny, nz);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Normal3sv)(const GLshort *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[61];
+ ((void (APIENTRY *)(const GLshort *v)) _func)(v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(RasterPos2d)(GLdouble x, GLdouble y)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[62];
+ ((void (APIENTRY *)(GLdouble x, GLdouble y)) _func)(x, y);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(RasterPos2dv)(const GLdouble *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[63];
+ ((void (APIENTRY *)(const GLdouble *v)) _func)(v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(RasterPos2f)(GLfloat x, GLfloat y)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[64];
+ ((void (APIENTRY *)(GLfloat x, GLfloat y)) _func)(x, y);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(RasterPos2fv)(const GLfloat *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[65];
+ ((void (APIENTRY *)(const GLfloat *v)) _func)(v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(RasterPos2i)(GLint x, GLint y)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[66];
+ ((void (APIENTRY *)(GLint x, GLint y)) _func)(x, y);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(RasterPos2iv)(const GLint *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[67];
+ ((void (APIENTRY *)(const GLint *v)) _func)(v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(RasterPos2s)(GLshort x, GLshort y)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[68];
+ ((void (APIENTRY *)(GLshort x, GLshort y)) _func)(x, y);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(RasterPos2sv)(const GLshort *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[69];
+ ((void (APIENTRY *)(const GLshort *v)) _func)(v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(RasterPos3d)(GLdouble x, GLdouble y, GLdouble z)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[70];
+ ((void (APIENTRY *)(GLdouble x, GLdouble y, GLdouble z)) _func)(x, y, z);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(RasterPos3dv)(const GLdouble *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[71];
+ ((void (APIENTRY *)(const GLdouble *v)) _func)(v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(RasterPos3f)(GLfloat x, GLfloat y, GLfloat z)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[72];
+ ((void (APIENTRY *)(GLfloat x, GLfloat y, GLfloat z)) _func)(x, y, z);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(RasterPos3fv)(const GLfloat *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[73];
+ ((void (APIENTRY *)(const GLfloat *v)) _func)(v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(RasterPos3i)(GLint x, GLint y, GLint z)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[74];
+ ((void (APIENTRY *)(GLint x, GLint y, GLint z)) _func)(x, y, z);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(RasterPos3iv)(const GLint *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[75];
+ ((void (APIENTRY *)(const GLint *v)) _func)(v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(RasterPos3s)(GLshort x, GLshort y, GLshort z)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[76];
+ ((void (APIENTRY *)(GLshort x, GLshort y, GLshort z)) _func)(x, y, z);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(RasterPos3sv)(const GLshort *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[77];
+ ((void (APIENTRY *)(const GLshort *v)) _func)(v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(RasterPos4d)(GLdouble x, GLdouble y, GLdouble z, GLdouble w)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[78];
+ ((void (APIENTRY *)(GLdouble x, GLdouble y, GLdouble z, GLdouble w)) _func)(x, y, z, w);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(RasterPos4dv)(const GLdouble *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[79];
+ ((void (APIENTRY *)(const GLdouble *v)) _func)(v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(RasterPos4f)(GLfloat x, GLfloat y, GLfloat z, GLfloat w)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[80];
+ ((void (APIENTRY *)(GLfloat x, GLfloat y, GLfloat z, GLfloat w)) _func)(x, y, z, w);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(RasterPos4fv)(const GLfloat *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[81];
+ ((void (APIENTRY *)(const GLfloat *v)) _func)(v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(RasterPos4i)(GLint x, GLint y, GLint z, GLint w)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[82];
+ ((void (APIENTRY *)(GLint x, GLint y, GLint z, GLint w)) _func)(x, y, z, w);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(RasterPos4iv)(const GLint *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[83];
+ ((void (APIENTRY *)(const GLint *v)) _func)(v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(RasterPos4s)(GLshort x, GLshort y, GLshort z, GLshort w)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[84];
+ ((void (APIENTRY *)(GLshort x, GLshort y, GLshort z, GLshort w)) _func)(x, y, z, w);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(RasterPos4sv)(const GLshort *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[85];
+ ((void (APIENTRY *)(const GLshort *v)) _func)(v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Rectd)(GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[86];
+ ((void (APIENTRY *)(GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2)) _func)(x1, y1, x2, y2);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Rectdv)(const GLdouble *v1, const GLdouble *v2)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[87];
+ ((void (APIENTRY *)(const GLdouble *v1, const GLdouble *v2)) _func)(v1, v2);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Rectf)(GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[88];
+ ((void (APIENTRY *)(GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2)) _func)(x1, y1, x2, y2);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Rectfv)(const GLfloat *v1, const GLfloat *v2)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[89];
+ ((void (APIENTRY *)(const GLfloat *v1, const GLfloat *v2)) _func)(v1, v2);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Recti)(GLint x1, GLint y1, GLint x2, GLint y2)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[90];
+ ((void (APIENTRY *)(GLint x1, GLint y1, GLint x2, GLint y2)) _func)(x1, y1, x2, y2);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Rectiv)(const GLint *v1, const GLint *v2)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[91];
+ ((void (APIENTRY *)(const GLint *v1, const GLint *v2)) _func)(v1, v2);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Rects)(GLshort x1, GLshort y1, GLshort x2, GLshort y2)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[92];
+ ((void (APIENTRY *)(GLshort x1, GLshort y1, GLshort x2, GLshort y2)) _func)(x1, y1, x2, y2);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Rectsv)(const GLshort *v1, const GLshort *v2)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[93];
+ ((void (APIENTRY *)(const GLshort *v1, const GLshort *v2)) _func)(v1, v2);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(TexCoord1d)(GLdouble s)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[94];
+ ((void (APIENTRY *)(GLdouble s)) _func)(s);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(TexCoord1dv)(const GLdouble *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[95];
+ ((void (APIENTRY *)(const GLdouble *v)) _func)(v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(TexCoord1f)(GLfloat s)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[96];
+ ((void (APIENTRY *)(GLfloat s)) _func)(s);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(TexCoord1fv)(const GLfloat *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[97];
+ ((void (APIENTRY *)(const GLfloat *v)) _func)(v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(TexCoord1i)(GLint s)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[98];
+ ((void (APIENTRY *)(GLint s)) _func)(s);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(TexCoord1iv)(const GLint *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[99];
+ ((void (APIENTRY *)(const GLint *v)) _func)(v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(TexCoord1s)(GLshort s)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[100];
+ ((void (APIENTRY *)(GLshort s)) _func)(s);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(TexCoord1sv)(const GLshort *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[101];
+ ((void (APIENTRY *)(const GLshort *v)) _func)(v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(TexCoord2d)(GLdouble s, GLdouble t)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[102];
+ ((void (APIENTRY *)(GLdouble s, GLdouble t)) _func)(s, t);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(TexCoord2dv)(const GLdouble *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[103];
+ ((void (APIENTRY *)(const GLdouble *v)) _func)(v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(TexCoord2f)(GLfloat s, GLfloat t)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[104];
+ ((void (APIENTRY *)(GLfloat s, GLfloat t)) _func)(s, t);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(TexCoord2fv)(const GLfloat *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[105];
+ ((void (APIENTRY *)(const GLfloat *v)) _func)(v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(TexCoord2i)(GLint s, GLint t)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[106];
+ ((void (APIENTRY *)(GLint s, GLint t)) _func)(s, t);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(TexCoord2iv)(const GLint *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[107];
+ ((void (APIENTRY *)(const GLint *v)) _func)(v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(TexCoord2s)(GLshort s, GLshort t)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[108];
+ ((void (APIENTRY *)(GLshort s, GLshort t)) _func)(s, t);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(TexCoord2sv)(const GLshort *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[109];
+ ((void (APIENTRY *)(const GLshort *v)) _func)(v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(TexCoord3d)(GLdouble s, GLdouble t, GLdouble r)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[110];
+ ((void (APIENTRY *)(GLdouble s, GLdouble t, GLdouble r)) _func)(s, t, r);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(TexCoord3dv)(const GLdouble *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[111];
+ ((void (APIENTRY *)(const GLdouble *v)) _func)(v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(TexCoord3f)(GLfloat s, GLfloat t, GLfloat r)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[112];
+ ((void (APIENTRY *)(GLfloat s, GLfloat t, GLfloat r)) _func)(s, t, r);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(TexCoord3fv)(const GLfloat *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[113];
+ ((void (APIENTRY *)(const GLfloat *v)) _func)(v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(TexCoord3i)(GLint s, GLint t, GLint r)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[114];
+ ((void (APIENTRY *)(GLint s, GLint t, GLint r)) _func)(s, t, r);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(TexCoord3iv)(const GLint *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[115];
+ ((void (APIENTRY *)(const GLint *v)) _func)(v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(TexCoord3s)(GLshort s, GLshort t, GLshort r)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[116];
+ ((void (APIENTRY *)(GLshort s, GLshort t, GLshort r)) _func)(s, t, r);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(TexCoord3sv)(const GLshort *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[117];
+ ((void (APIENTRY *)(const GLshort *v)) _func)(v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(TexCoord4d)(GLdouble s, GLdouble t, GLdouble r, GLdouble q)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[118];
+ ((void (APIENTRY *)(GLdouble s, GLdouble t, GLdouble r, GLdouble q)) _func)(s, t, r, q);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(TexCoord4dv)(const GLdouble *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[119];
+ ((void (APIENTRY *)(const GLdouble *v)) _func)(v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(TexCoord4f)(GLfloat s, GLfloat t, GLfloat r, GLfloat q)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[120];
+ ((void (APIENTRY *)(GLfloat s, GLfloat t, GLfloat r, GLfloat q)) _func)(s, t, r, q);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(TexCoord4fv)(const GLfloat *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[121];
+ ((void (APIENTRY *)(const GLfloat *v)) _func)(v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(TexCoord4i)(GLint s, GLint t, GLint r, GLint q)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[122];
+ ((void (APIENTRY *)(GLint s, GLint t, GLint r, GLint q)) _func)(s, t, r, q);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(TexCoord4iv)(const GLint *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[123];
+ ((void (APIENTRY *)(const GLint *v)) _func)(v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(TexCoord4s)(GLshort s, GLshort t, GLshort r, GLshort q)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[124];
+ ((void (APIENTRY *)(GLshort s, GLshort t, GLshort r, GLshort q)) _func)(s, t, r, q);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(TexCoord4sv)(const GLshort *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[125];
+ ((void (APIENTRY *)(const GLshort *v)) _func)(v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Vertex2d)(GLdouble x, GLdouble y)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[126];
+ ((void (APIENTRY *)(GLdouble x, GLdouble y)) _func)(x, y);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Vertex2dv)(const GLdouble *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[127];
+ ((void (APIENTRY *)(const GLdouble *v)) _func)(v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Vertex2f)(GLfloat x, GLfloat y)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[128];
+ ((void (APIENTRY *)(GLfloat x, GLfloat y)) _func)(x, y);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Vertex2fv)(const GLfloat *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[129];
+ ((void (APIENTRY *)(const GLfloat *v)) _func)(v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Vertex2i)(GLint x, GLint y)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[130];
+ ((void (APIENTRY *)(GLint x, GLint y)) _func)(x, y);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Vertex2iv)(const GLint *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[131];
+ ((void (APIENTRY *)(const GLint *v)) _func)(v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Vertex2s)(GLshort x, GLshort y)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[132];
+ ((void (APIENTRY *)(GLshort x, GLshort y)) _func)(x, y);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Vertex2sv)(const GLshort *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[133];
+ ((void (APIENTRY *)(const GLshort *v)) _func)(v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Vertex3d)(GLdouble x, GLdouble y, GLdouble z)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[134];
+ ((void (APIENTRY *)(GLdouble x, GLdouble y, GLdouble z)) _func)(x, y, z);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Vertex3dv)(const GLdouble *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[135];
+ ((void (APIENTRY *)(const GLdouble *v)) _func)(v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Vertex3f)(GLfloat x, GLfloat y, GLfloat z)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[136];
+ ((void (APIENTRY *)(GLfloat x, GLfloat y, GLfloat z)) _func)(x, y, z);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Vertex3fv)(const GLfloat *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[137];
+ ((void (APIENTRY *)(const GLfloat *v)) _func)(v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Vertex3i)(GLint x, GLint y, GLint z)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[138];
+ ((void (APIENTRY *)(GLint x, GLint y, GLint z)) _func)(x, y, z);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Vertex3iv)(const GLint *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[139];
+ ((void (APIENTRY *)(const GLint *v)) _func)(v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Vertex3s)(GLshort x, GLshort y, GLshort z)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[140];
+ ((void (APIENTRY *)(GLshort x, GLshort y, GLshort z)) _func)(x, y, z);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Vertex3sv)(const GLshort *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[141];
+ ((void (APIENTRY *)(const GLshort *v)) _func)(v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Vertex4d)(GLdouble x, GLdouble y, GLdouble z, GLdouble w)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[142];
+ ((void (APIENTRY *)(GLdouble x, GLdouble y, GLdouble z, GLdouble w)) _func)(x, y, z, w);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Vertex4dv)(const GLdouble *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[143];
+ ((void (APIENTRY *)(const GLdouble *v)) _func)(v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Vertex4f)(GLfloat x, GLfloat y, GLfloat z, GLfloat w)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[144];
+ ((void (APIENTRY *)(GLfloat x, GLfloat y, GLfloat z, GLfloat w)) _func)(x, y, z, w);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Vertex4fv)(const GLfloat *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[145];
+ ((void (APIENTRY *)(const GLfloat *v)) _func)(v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Vertex4i)(GLint x, GLint y, GLint z, GLint w)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[146];
+ ((void (APIENTRY *)(GLint x, GLint y, GLint z, GLint w)) _func)(x, y, z, w);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Vertex4iv)(const GLint *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[147];
+ ((void (APIENTRY *)(const GLint *v)) _func)(v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Vertex4s)(GLshort x, GLshort y, GLshort z, GLshort w)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[148];
+ ((void (APIENTRY *)(GLshort x, GLshort y, GLshort z, GLshort w)) _func)(x, y, z, w);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Vertex4sv)(const GLshort *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[149];
+ ((void (APIENTRY *)(const GLshort *v)) _func)(v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(ClipPlane)(GLenum plane, const GLdouble *equation)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[150];
+ ((void (APIENTRY *)(GLenum plane, const GLdouble *equation)) _func)(plane, equation);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(ColorMaterial)(GLenum face, GLenum mode)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[151];
+ ((void (APIENTRY *)(GLenum face, GLenum mode)) _func)(face, mode);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(CullFace)(GLenum mode)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[152];
+ ((void (APIENTRY *)(GLenum mode)) _func)(mode);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Fogf)(GLenum pname, GLfloat param)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[153];
+ ((void (APIENTRY *)(GLenum pname, GLfloat param)) _func)(pname, param);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Fogfv)(GLenum pname, const GLfloat *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[154];
+ ((void (APIENTRY *)(GLenum pname, const GLfloat *params)) _func)(pname, params);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Fogi)(GLenum pname, GLint param)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[155];
+ ((void (APIENTRY *)(GLenum pname, GLint param)) _func)(pname, param);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Fogiv)(GLenum pname, const GLint *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[156];
+ ((void (APIENTRY *)(GLenum pname, const GLint *params)) _func)(pname, params);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(FrontFace)(GLenum mode)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[157];
+ ((void (APIENTRY *)(GLenum mode)) _func)(mode);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Hint)(GLenum target, GLenum mode)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[158];
+ ((void (APIENTRY *)(GLenum target, GLenum mode)) _func)(target, mode);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Lightf)(GLenum light, GLenum pname, GLfloat param)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[159];
+ ((void (APIENTRY *)(GLenum light, GLenum pname, GLfloat param)) _func)(light, pname, param);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Lightfv)(GLenum light, GLenum pname, const GLfloat *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[160];
+ ((void (APIENTRY *)(GLenum light, GLenum pname, const GLfloat *params)) _func)(light, pname, params);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Lighti)(GLenum light, GLenum pname, GLint param)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[161];
+ ((void (APIENTRY *)(GLenum light, GLenum pname, GLint param)) _func)(light, pname, param);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Lightiv)(GLenum light, GLenum pname, const GLint *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[162];
+ ((void (APIENTRY *)(GLenum light, GLenum pname, const GLint *params)) _func)(light, pname, params);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(LightModelf)(GLenum pname, GLfloat param)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[163];
+ ((void (APIENTRY *)(GLenum pname, GLfloat param)) _func)(pname, param);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(LightModelfv)(GLenum pname, const GLfloat *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[164];
+ ((void (APIENTRY *)(GLenum pname, const GLfloat *params)) _func)(pname, params);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(LightModeli)(GLenum pname, GLint param)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[165];
+ ((void (APIENTRY *)(GLenum pname, GLint param)) _func)(pname, param);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(LightModeliv)(GLenum pname, const GLint *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[166];
+ ((void (APIENTRY *)(GLenum pname, const GLint *params)) _func)(pname, params);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(LineStipple)(GLint factor, GLushort pattern)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[167];
+ ((void (APIENTRY *)(GLint factor, GLushort pattern)) _func)(factor, pattern);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(LineWidth)(GLfloat width)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[168];
+ ((void (APIENTRY *)(GLfloat width)) _func)(width);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Materialf)(GLenum face, GLenum pname, GLfloat param)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[169];
+ ((void (APIENTRY *)(GLenum face, GLenum pname, GLfloat param)) _func)(face, pname, param);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Materialfv)(GLenum face, GLenum pname, const GLfloat *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[170];
+ ((void (APIENTRY *)(GLenum face, GLenum pname, const GLfloat *params)) _func)(face, pname, params);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Materiali)(GLenum face, GLenum pname, GLint param)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[171];
+ ((void (APIENTRY *)(GLenum face, GLenum pname, GLint param)) _func)(face, pname, param);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Materialiv)(GLenum face, GLenum pname, const GLint *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[172];
+ ((void (APIENTRY *)(GLenum face, GLenum pname, const GLint *params)) _func)(face, pname, params);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(PointSize)(GLfloat size)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[173];
+ ((void (APIENTRY *)(GLfloat size)) _func)(size);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(PolygonMode)(GLenum face, GLenum mode)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[174];
+ ((void (APIENTRY *)(GLenum face, GLenum mode)) _func)(face, mode);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(PolygonStipple)(const GLubyte *mask)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[175];
+ ((void (APIENTRY *)(const GLubyte *mask)) _func)(mask);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Scissor)(GLint x, GLint y, GLsizei width, GLsizei height)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[176];
+ ((void (APIENTRY *)(GLint x, GLint y, GLsizei width, GLsizei height)) _func)(x, y, width, height);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(ShadeModel)(GLenum mode)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[177];
+ ((void (APIENTRY *)(GLenum mode)) _func)(mode);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(TexParameterf)(GLenum target, GLenum pname, GLfloat param)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[178];
+ ((void (APIENTRY *)(GLenum target, GLenum pname, GLfloat param)) _func)(target, pname, param);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(TexParameterfv)(GLenum target, GLenum pname, const GLfloat *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[179];
+ ((void (APIENTRY *)(GLenum target, GLenum pname, const GLfloat *params)) _func)(target, pname, params);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(TexParameteri)(GLenum target, GLenum pname, GLint param)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[180];
+ ((void (APIENTRY *)(GLenum target, GLenum pname, GLint param)) _func)(target, pname, param);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(TexParameteriv)(GLenum target, GLenum pname, const GLint *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[181];
+ ((void (APIENTRY *)(GLenum target, GLenum pname, const GLint *params)) _func)(target, pname, params);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(TexImage1D)(GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid *pixels)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[182];
+ ((void (APIENTRY *)(GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid *pixels)) _func)(target, level, internalformat, width, border, format, type, pixels);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(TexImage2D)(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[183];
+ ((void (APIENTRY *)(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels)) _func)(target, level, internalformat, width, height, border, format, type, pixels);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(TexEnvf)(GLenum target, GLenum pname, GLfloat param)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[184];
+ ((void (APIENTRY *)(GLenum target, GLenum pname, GLfloat param)) _func)(target, pname, param);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(TexEnvfv)(GLenum target, GLenum pname, const GLfloat *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[185];
+ ((void (APIENTRY *)(GLenum target, GLenum pname, const GLfloat *params)) _func)(target, pname, params);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(TexEnvi)(GLenum target, GLenum pname, GLint param)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[186];
+ ((void (APIENTRY *)(GLenum target, GLenum pname, GLint param)) _func)(target, pname, param);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(TexEnviv)(GLenum target, GLenum pname, const GLint *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[187];
+ ((void (APIENTRY *)(GLenum target, GLenum pname, const GLint *params)) _func)(target, pname, params);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(TexGend)(GLenum coord, GLenum pname, GLdouble param)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[188];
+ ((void (APIENTRY *)(GLenum coord, GLenum pname, GLdouble param)) _func)(coord, pname, param);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(TexGendv)(GLenum coord, GLenum pname, const GLdouble *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[189];
+ ((void (APIENTRY *)(GLenum coord, GLenum pname, const GLdouble *params)) _func)(coord, pname, params);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(TexGenf)(GLenum coord, GLenum pname, GLfloat param)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[190];
+ ((void (APIENTRY *)(GLenum coord, GLenum pname, GLfloat param)) _func)(coord, pname, param);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(TexGenfv)(GLenum coord, GLenum pname, const GLfloat *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[191];
+ ((void (APIENTRY *)(GLenum coord, GLenum pname, const GLfloat *params)) _func)(coord, pname, params);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(TexGeni)(GLenum coord, GLenum pname, GLint param)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[192];
+ ((void (APIENTRY *)(GLenum coord, GLenum pname, GLint param)) _func)(coord, pname, param);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(TexGeniv)(GLenum coord, GLenum pname, const GLint *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[193];
+ ((void (APIENTRY *)(GLenum coord, GLenum pname, const GLint *params)) _func)(coord, pname, params);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(FeedbackBuffer)(GLsizei size, GLenum type, GLfloat *buffer)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[194];
+ ((void (APIENTRY *)(GLsizei size, GLenum type, GLfloat *buffer)) _func)(size, type, buffer);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(SelectBuffer)(GLsizei size, GLuint *buffer)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[195];
+ ((void (APIENTRY *)(GLsizei size, GLuint *buffer)) _func)(size, buffer);
+}
+
+GLAPI GLint APIENTRY GLAPI_PREFIX(RenderMode)(GLenum mode)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[196];
+ return ((GLint (APIENTRY *)(GLenum mode)) _func)(mode);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(InitNames)(void)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[197];
+ ((void (APIENTRY *)(void)) _func)();
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(LoadName)(GLuint name)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[198];
+ ((void (APIENTRY *)(GLuint name)) _func)(name);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(PassThrough)(GLfloat token)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[199];
+ ((void (APIENTRY *)(GLfloat token)) _func)(token);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(PopName)(void)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[200];
+ ((void (APIENTRY *)(void)) _func)();
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(PushName)(GLuint name)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[201];
+ ((void (APIENTRY *)(GLuint name)) _func)(name);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(DrawBuffer)(GLenum mode)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[202];
+ ((void (APIENTRY *)(GLenum mode)) _func)(mode);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Clear)(GLbitfield mask)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[203];
+ ((void (APIENTRY *)(GLbitfield mask)) _func)(mask);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(ClearAccum)(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[204];
+ ((void (APIENTRY *)(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha)) _func)(red, green, blue, alpha);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(ClearIndex)(GLfloat c)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[205];
+ ((void (APIENTRY *)(GLfloat c)) _func)(c);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(ClearColor)(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[206];
+ ((void (APIENTRY *)(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)) _func)(red, green, blue, alpha);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(ClearStencil)(GLint s)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[207];
+ ((void (APIENTRY *)(GLint s)) _func)(s);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(ClearDepth)(GLclampd depth)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[208];
+ ((void (APIENTRY *)(GLclampd depth)) _func)(depth);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(StencilMask)(GLuint mask)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[209];
+ ((void (APIENTRY *)(GLuint mask)) _func)(mask);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(ColorMask)(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[210];
+ ((void (APIENTRY *)(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha)) _func)(red, green, blue, alpha);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(DepthMask)(GLboolean flag)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[211];
+ ((void (APIENTRY *)(GLboolean flag)) _func)(flag);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(IndexMask)(GLuint mask)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[212];
+ ((void (APIENTRY *)(GLuint mask)) _func)(mask);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Accum)(GLenum op, GLfloat value)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[213];
+ ((void (APIENTRY *)(GLenum op, GLfloat value)) _func)(op, value);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Disable)(GLenum cap)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[214];
+ ((void (APIENTRY *)(GLenum cap)) _func)(cap);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Enable)(GLenum cap)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[215];
+ ((void (APIENTRY *)(GLenum cap)) _func)(cap);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Finish)(void)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[216];
+ ((void (APIENTRY *)(void)) _func)();
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Flush)(void)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[217];
+ ((void (APIENTRY *)(void)) _func)();
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(PopAttrib)(void)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[218];
+ ((void (APIENTRY *)(void)) _func)();
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(PushAttrib)(GLbitfield mask)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[219];
+ ((void (APIENTRY *)(GLbitfield mask)) _func)(mask);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Map1d)(GLenum target, GLdouble u1, GLdouble u2, GLint stride, GLint order, const GLdouble *points)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[220];
+ ((void (APIENTRY *)(GLenum target, GLdouble u1, GLdouble u2, GLint stride, GLint order, const GLdouble *points)) _func)(target, u1, u2, stride, order, points);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Map1f)(GLenum target, GLfloat u1, GLfloat u2, GLint stride, GLint order, const GLfloat *points)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[221];
+ ((void (APIENTRY *)(GLenum target, GLfloat u1, GLfloat u2, GLint stride, GLint order, const GLfloat *points)) _func)(target, u1, u2, stride, order, points);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Map2d)(GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, const GLdouble *points)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[222];
+ ((void (APIENTRY *)(GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, const GLdouble *points)) _func)(target, u1, u2, ustride, uorder, v1, v2, vstride, vorder, points);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Map2f)(GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, const GLfloat *points)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[223];
+ ((void (APIENTRY *)(GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, const GLfloat *points)) _func)(target, u1, u2, ustride, uorder, v1, v2, vstride, vorder, points);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(MapGrid1d)(GLint un, GLdouble u1, GLdouble u2)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[224];
+ ((void (APIENTRY *)(GLint un, GLdouble u1, GLdouble u2)) _func)(un, u1, u2);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(MapGrid1f)(GLint un, GLfloat u1, GLfloat u2)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[225];
+ ((void (APIENTRY *)(GLint un, GLfloat u1, GLfloat u2)) _func)(un, u1, u2);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(MapGrid2d)(GLint un, GLdouble u1, GLdouble u2, GLint vn, GLdouble v1, GLdouble v2)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[226];
+ ((void (APIENTRY *)(GLint un, GLdouble u1, GLdouble u2, GLint vn, GLdouble v1, GLdouble v2)) _func)(un, u1, u2, vn, v1, v2);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(MapGrid2f)(GLint un, GLfloat u1, GLfloat u2, GLint vn, GLfloat v1, GLfloat v2)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[227];
+ ((void (APIENTRY *)(GLint un, GLfloat u1, GLfloat u2, GLint vn, GLfloat v1, GLfloat v2)) _func)(un, u1, u2, vn, v1, v2);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(EvalCoord1d)(GLdouble u)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[228];
+ ((void (APIENTRY *)(GLdouble u)) _func)(u);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(EvalCoord1dv)(const GLdouble *u)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[229];
+ ((void (APIENTRY *)(const GLdouble *u)) _func)(u);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(EvalCoord1f)(GLfloat u)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[230];
+ ((void (APIENTRY *)(GLfloat u)) _func)(u);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(EvalCoord1fv)(const GLfloat *u)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[231];
+ ((void (APIENTRY *)(const GLfloat *u)) _func)(u);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(EvalCoord2d)(GLdouble u, GLdouble v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[232];
+ ((void (APIENTRY *)(GLdouble u, GLdouble v)) _func)(u, v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(EvalCoord2dv)(const GLdouble *u)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[233];
+ ((void (APIENTRY *)(const GLdouble *u)) _func)(u);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(EvalCoord2f)(GLfloat u, GLfloat v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[234];
+ ((void (APIENTRY *)(GLfloat u, GLfloat v)) _func)(u, v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(EvalCoord2fv)(const GLfloat *u)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[235];
+ ((void (APIENTRY *)(const GLfloat *u)) _func)(u);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(EvalMesh1)(GLenum mode, GLint i1, GLint i2)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[236];
+ ((void (APIENTRY *)(GLenum mode, GLint i1, GLint i2)) _func)(mode, i1, i2);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(EvalPoint1)(GLint i)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[237];
+ ((void (APIENTRY *)(GLint i)) _func)(i);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(EvalMesh2)(GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[238];
+ ((void (APIENTRY *)(GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2)) _func)(mode, i1, i2, j1, j2);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(EvalPoint2)(GLint i, GLint j)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[239];
+ ((void (APIENTRY *)(GLint i, GLint j)) _func)(i, j);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(AlphaFunc)(GLenum func, GLclampf ref)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[240];
+ ((void (APIENTRY *)(GLenum func, GLclampf ref)) _func)(func, ref);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(BlendFunc)(GLenum sfactor, GLenum dfactor)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[241];
+ ((void (APIENTRY *)(GLenum sfactor, GLenum dfactor)) _func)(sfactor, dfactor);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(LogicOp)(GLenum opcode)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[242];
+ ((void (APIENTRY *)(GLenum opcode)) _func)(opcode);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(StencilFunc)(GLenum func, GLint ref, GLuint mask)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[243];
+ ((void (APIENTRY *)(GLenum func, GLint ref, GLuint mask)) _func)(func, ref, mask);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(StencilOp)(GLenum fail, GLenum zfail, GLenum zpass)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[244];
+ ((void (APIENTRY *)(GLenum fail, GLenum zfail, GLenum zpass)) _func)(fail, zfail, zpass);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(DepthFunc)(GLenum func)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[245];
+ ((void (APIENTRY *)(GLenum func)) _func)(func);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(PixelZoom)(GLfloat xfactor, GLfloat yfactor)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[246];
+ ((void (APIENTRY *)(GLfloat xfactor, GLfloat yfactor)) _func)(xfactor, yfactor);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(PixelTransferf)(GLenum pname, GLfloat param)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[247];
+ ((void (APIENTRY *)(GLenum pname, GLfloat param)) _func)(pname, param);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(PixelTransferi)(GLenum pname, GLint param)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[248];
+ ((void (APIENTRY *)(GLenum pname, GLint param)) _func)(pname, param);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(PixelStoref)(GLenum pname, GLfloat param)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[249];
+ ((void (APIENTRY *)(GLenum pname, GLfloat param)) _func)(pname, param);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(PixelStorei)(GLenum pname, GLint param)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[250];
+ ((void (APIENTRY *)(GLenum pname, GLint param)) _func)(pname, param);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(PixelMapfv)(GLenum map, GLsizei mapsize, const GLfloat *values)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[251];
+ ((void (APIENTRY *)(GLenum map, GLsizei mapsize, const GLfloat *values)) _func)(map, mapsize, values);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(PixelMapuiv)(GLenum map, GLsizei mapsize, const GLuint *values)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[252];
+ ((void (APIENTRY *)(GLenum map, GLsizei mapsize, const GLuint *values)) _func)(map, mapsize, values);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(PixelMapusv)(GLenum map, GLsizei mapsize, const GLushort *values)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[253];
+ ((void (APIENTRY *)(GLenum map, GLsizei mapsize, const GLushort *values)) _func)(map, mapsize, values);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(ReadBuffer)(GLenum mode)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[254];
+ ((void (APIENTRY *)(GLenum mode)) _func)(mode);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(CopyPixels)(GLint x, GLint y, GLsizei width, GLsizei height, GLenum type)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[255];
+ ((void (APIENTRY *)(GLint x, GLint y, GLsizei width, GLsizei height, GLenum type)) _func)(x, y, width, height, type);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(ReadPixels)(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[256];
+ ((void (APIENTRY *)(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels)) _func)(x, y, width, height, format, type, pixels);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(DrawPixels)(GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[257];
+ ((void (APIENTRY *)(GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels)) _func)(width, height, format, type, pixels);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(GetBooleanv)(GLenum pname, GLboolean *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[258];
+ ((void (APIENTRY *)(GLenum pname, GLboolean *params)) _func)(pname, params);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(GetClipPlane)(GLenum plane, GLdouble *equation)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[259];
+ ((void (APIENTRY *)(GLenum plane, GLdouble *equation)) _func)(plane, equation);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(GetDoublev)(GLenum pname, GLdouble *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[260];
+ ((void (APIENTRY *)(GLenum pname, GLdouble *params)) _func)(pname, params);
+}
+
+GLAPI GLenum APIENTRY GLAPI_PREFIX(GetError)(void)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[261];
+ return ((GLenum (APIENTRY *)(void)) _func)();
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(GetFloatv)(GLenum pname, GLfloat *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[262];
+ ((void (APIENTRY *)(GLenum pname, GLfloat *params)) _func)(pname, params);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(GetIntegerv)(GLenum pname, GLint *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[263];
+ ((void (APIENTRY *)(GLenum pname, GLint *params)) _func)(pname, params);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(GetLightfv)(GLenum light, GLenum pname, GLfloat *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[264];
+ ((void (APIENTRY *)(GLenum light, GLenum pname, GLfloat *params)) _func)(light, pname, params);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(GetLightiv)(GLenum light, GLenum pname, GLint *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[265];
+ ((void (APIENTRY *)(GLenum light, GLenum pname, GLint *params)) _func)(light, pname, params);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(GetMapdv)(GLenum target, GLenum query, GLdouble *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[266];
+ ((void (APIENTRY *)(GLenum target, GLenum query, GLdouble *v)) _func)(target, query, v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(GetMapfv)(GLenum target, GLenum query, GLfloat *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[267];
+ ((void (APIENTRY *)(GLenum target, GLenum query, GLfloat *v)) _func)(target, query, v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(GetMapiv)(GLenum target, GLenum query, GLint *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[268];
+ ((void (APIENTRY *)(GLenum target, GLenum query, GLint *v)) _func)(target, query, v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(GetMaterialfv)(GLenum face, GLenum pname, GLfloat *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[269];
+ ((void (APIENTRY *)(GLenum face, GLenum pname, GLfloat *params)) _func)(face, pname, params);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(GetMaterialiv)(GLenum face, GLenum pname, GLint *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[270];
+ ((void (APIENTRY *)(GLenum face, GLenum pname, GLint *params)) _func)(face, pname, params);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(GetPixelMapfv)(GLenum map, GLfloat *values)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[271];
+ ((void (APIENTRY *)(GLenum map, GLfloat *values)) _func)(map, values);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(GetPixelMapuiv)(GLenum map, GLuint *values)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[272];
+ ((void (APIENTRY *)(GLenum map, GLuint *values)) _func)(map, values);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(GetPixelMapusv)(GLenum map, GLushort *values)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[273];
+ ((void (APIENTRY *)(GLenum map, GLushort *values)) _func)(map, values);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(GetPolygonStipple)(GLubyte *mask)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[274];
+ ((void (APIENTRY *)(GLubyte *mask)) _func)(mask);
+}
+
+GLAPI const GLubyte * APIENTRY GLAPI_PREFIX(GetString)(GLenum name)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[275];
+ return ((const GLubyte * (APIENTRY *)(GLenum name)) _func)(name);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(GetTexEnvfv)(GLenum target, GLenum pname, GLfloat *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[276];
+ ((void (APIENTRY *)(GLenum target, GLenum pname, GLfloat *params)) _func)(target, pname, params);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(GetTexEnviv)(GLenum target, GLenum pname, GLint *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[277];
+ ((void (APIENTRY *)(GLenum target, GLenum pname, GLint *params)) _func)(target, pname, params);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(GetTexGendv)(GLenum coord, GLenum pname, GLdouble *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[278];
+ ((void (APIENTRY *)(GLenum coord, GLenum pname, GLdouble *params)) _func)(coord, pname, params);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(GetTexGenfv)(GLenum coord, GLenum pname, GLfloat *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[279];
+ ((void (APIENTRY *)(GLenum coord, GLenum pname, GLfloat *params)) _func)(coord, pname, params);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(GetTexGeniv)(GLenum coord, GLenum pname, GLint *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[280];
+ ((void (APIENTRY *)(GLenum coord, GLenum pname, GLint *params)) _func)(coord, pname, params);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(GetTexImage)(GLenum target, GLint level, GLenum format, GLenum type, GLvoid *pixels)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[281];
+ ((void (APIENTRY *)(GLenum target, GLint level, GLenum format, GLenum type, GLvoid *pixels)) _func)(target, level, format, type, pixels);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(GetTexParameterfv)(GLenum target, GLenum pname, GLfloat *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[282];
+ ((void (APIENTRY *)(GLenum target, GLenum pname, GLfloat *params)) _func)(target, pname, params);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(GetTexParameteriv)(GLenum target, GLenum pname, GLint *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[283];
+ ((void (APIENTRY *)(GLenum target, GLenum pname, GLint *params)) _func)(target, pname, params);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(GetTexLevelParameterfv)(GLenum target, GLint level, GLenum pname, GLfloat *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[284];
+ ((void (APIENTRY *)(GLenum target, GLint level, GLenum pname, GLfloat *params)) _func)(target, level, pname, params);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(GetTexLevelParameteriv)(GLenum target, GLint level, GLenum pname, GLint *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[285];
+ ((void (APIENTRY *)(GLenum target, GLint level, GLenum pname, GLint *params)) _func)(target, level, pname, params);
+}
+
+GLAPI GLboolean APIENTRY GLAPI_PREFIX(IsEnabled)(GLenum cap)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[286];
+ return ((GLboolean (APIENTRY *)(GLenum cap)) _func)(cap);
+}
+
+GLAPI GLboolean APIENTRY GLAPI_PREFIX(IsList)(GLuint list)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[287];
+ return ((GLboolean (APIENTRY *)(GLuint list)) _func)(list);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(DepthRange)(GLclampd zNear, GLclampd zFar)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[288];
+ ((void (APIENTRY *)(GLclampd zNear, GLclampd zFar)) _func)(zNear, zFar);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Frustum)(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[289];
+ ((void (APIENTRY *)(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar)) _func)(left, right, bottom, top, zNear, zFar);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(LoadIdentity)(void)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[290];
+ ((void (APIENTRY *)(void)) _func)();
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(LoadMatrixf)(const GLfloat *m)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[291];
+ ((void (APIENTRY *)(const GLfloat *m)) _func)(m);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(LoadMatrixd)(const GLdouble *m)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[292];
+ ((void (APIENTRY *)(const GLdouble *m)) _func)(m);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(MatrixMode)(GLenum mode)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[293];
+ ((void (APIENTRY *)(GLenum mode)) _func)(mode);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(MultMatrixf)(const GLfloat *m)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[294];
+ ((void (APIENTRY *)(const GLfloat *m)) _func)(m);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(MultMatrixd)(const GLdouble *m)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[295];
+ ((void (APIENTRY *)(const GLdouble *m)) _func)(m);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Ortho)(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[296];
+ ((void (APIENTRY *)(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar)) _func)(left, right, bottom, top, zNear, zFar);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(PopMatrix)(void)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[297];
+ ((void (APIENTRY *)(void)) _func)();
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(PushMatrix)(void)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[298];
+ ((void (APIENTRY *)(void)) _func)();
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Rotated)(GLdouble angle, GLdouble x, GLdouble y, GLdouble z)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[299];
+ ((void (APIENTRY *)(GLdouble angle, GLdouble x, GLdouble y, GLdouble z)) _func)(angle, x, y, z);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Rotatef)(GLfloat angle, GLfloat x, GLfloat y, GLfloat z)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[300];
+ ((void (APIENTRY *)(GLfloat angle, GLfloat x, GLfloat y, GLfloat z)) _func)(angle, x, y, z);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Scaled)(GLdouble x, GLdouble y, GLdouble z)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[301];
+ ((void (APIENTRY *)(GLdouble x, GLdouble y, GLdouble z)) _func)(x, y, z);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Scalef)(GLfloat x, GLfloat y, GLfloat z)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[302];
+ ((void (APIENTRY *)(GLfloat x, GLfloat y, GLfloat z)) _func)(x, y, z);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Translated)(GLdouble x, GLdouble y, GLdouble z)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[303];
+ ((void (APIENTRY *)(GLdouble x, GLdouble y, GLdouble z)) _func)(x, y, z);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Translatef)(GLfloat x, GLfloat y, GLfloat z)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[304];
+ ((void (APIENTRY *)(GLfloat x, GLfloat y, GLfloat z)) _func)(x, y, z);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Viewport)(GLint x, GLint y, GLsizei width, GLsizei height)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[305];
+ ((void (APIENTRY *)(GLint x, GLint y, GLsizei width, GLsizei height)) _func)(x, y, width, height);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(ArrayElement)(GLint i)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[306];
+ ((void (APIENTRY *)(GLint i)) _func)(i);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(ArrayElementEXT)(GLint i)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[306];
+ ((void (APIENTRY *)(GLint i)) _func)(i);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(BindTexture)(GLenum target, GLuint texture)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[307];
+ ((void (APIENTRY *)(GLenum target, GLuint texture)) _func)(target, texture);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(BindTextureEXT)(GLenum target, GLuint texture)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[307];
+ ((void (APIENTRY *)(GLenum target, GLuint texture)) _func)(target, texture);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(ColorPointer)(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[308];
+ ((void (APIENTRY *)(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer)) _func)(size, type, stride, pointer);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(DisableClientState)(GLenum array)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[309];
+ ((void (APIENTRY *)(GLenum array)) _func)(array);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(DrawArrays)(GLenum mode, GLint first, GLsizei count)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[310];
+ ((void (APIENTRY *)(GLenum mode, GLint first, GLsizei count)) _func)(mode, first, count);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(DrawArraysEXT)(GLenum mode, GLint first, GLsizei count)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[310];
+ ((void (APIENTRY *)(GLenum mode, GLint first, GLsizei count)) _func)(mode, first, count);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(DrawElements)(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[311];
+ ((void (APIENTRY *)(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices)) _func)(mode, count, type, indices);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(EdgeFlagPointer)(GLsizei stride, const GLvoid *pointer)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[312];
+ ((void (APIENTRY *)(GLsizei stride, const GLvoid *pointer)) _func)(stride, pointer);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(EnableClientState)(GLenum array)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[313];
+ ((void (APIENTRY *)(GLenum array)) _func)(array);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(IndexPointer)(GLenum type, GLsizei stride, const GLvoid *pointer)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[314];
+ ((void (APIENTRY *)(GLenum type, GLsizei stride, const GLvoid *pointer)) _func)(type, stride, pointer);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Indexub)(GLubyte c)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[315];
+ ((void (APIENTRY *)(GLubyte c)) _func)(c);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Indexubv)(const GLubyte *c)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[316];
+ ((void (APIENTRY *)(const GLubyte *c)) _func)(c);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(InterleavedArrays)(GLenum format, GLsizei stride, const GLvoid *pointer)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[317];
+ ((void (APIENTRY *)(GLenum format, GLsizei stride, const GLvoid *pointer)) _func)(format, stride, pointer);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(NormalPointer)(GLenum type, GLsizei stride, const GLvoid *pointer)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[318];
+ ((void (APIENTRY *)(GLenum type, GLsizei stride, const GLvoid *pointer)) _func)(type, stride, pointer);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(PolygonOffset)(GLfloat factor, GLfloat units)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[319];
+ ((void (APIENTRY *)(GLfloat factor, GLfloat units)) _func)(factor, units);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(TexCoordPointer)(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[320];
+ ((void (APIENTRY *)(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer)) _func)(size, type, stride, pointer);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexPointer)(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[321];
+ ((void (APIENTRY *)(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer)) _func)(size, type, stride, pointer);
+}
+
+GLAPI GLboolean APIENTRY GLAPI_PREFIX(AreTexturesResident)(GLsizei n, const GLuint *textures, GLboolean *residences)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[322];
+ return ((GLboolean (APIENTRY *)(GLsizei n, const GLuint *textures, GLboolean *residences)) _func)(n, textures, residences);
+}
+
+#if 0
+GLAPI GLboolean APIENTRY GLAPI_PREFIX(AreTexturesResidentEXT)(GLsizei n, const GLuint *textures, GLboolean *residences)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[322];
+ return ((GLboolean (APIENTRY *)(GLsizei n, const GLuint *textures, GLboolean *residences)) _func)(n, textures, residences);
+}
+#endif
+
+GLAPI void APIENTRY GLAPI_PREFIX(CopyTexImage1D)(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[323];
+ ((void (APIENTRY *)(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border)) _func)(target, level, internalformat, x, y, width, border);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(CopyTexImage1DEXT)(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[323];
+ ((void (APIENTRY *)(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border)) _func)(target, level, internalformat, x, y, width, border);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(CopyTexImage2D)(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[324];
+ ((void (APIENTRY *)(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border)) _func)(target, level, internalformat, x, y, width, height, border);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(CopyTexImage2DEXT)(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[324];
+ ((void (APIENTRY *)(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border)) _func)(target, level, internalformat, x, y, width, height, border);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(CopyTexSubImage1D)(GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[325];
+ ((void (APIENTRY *)(GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width)) _func)(target, level, xoffset, x, y, width);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(CopyTexSubImage1DEXT)(GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[325];
+ ((void (APIENTRY *)(GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width)) _func)(target, level, xoffset, x, y, width);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(CopyTexSubImage2D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[326];
+ ((void (APIENTRY *)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height)) _func)(target, level, xoffset, yoffset, x, y, width, height);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(CopyTexSubImage2DEXT)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[326];
+ ((void (APIENTRY *)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height)) _func)(target, level, xoffset, yoffset, x, y, width, height);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(DeleteTextures)(GLsizei n, const GLuint *textures)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[327];
+ ((void (APIENTRY *)(GLsizei n, const GLuint *textures)) _func)(n, textures);
+}
+
+#if 0
+GLAPI void APIENTRY GLAPI_PREFIX(DeleteTexturesEXT)(GLsizei n, const GLuint *textures)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[327];
+ ((void (APIENTRY *)(GLsizei n, const GLuint *textures)) _func)(n, textures);
+}
+#endif
+
+GLAPI void APIENTRY GLAPI_PREFIX(GenTextures)(GLsizei n, GLuint *textures)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[328];
+ ((void (APIENTRY *)(GLsizei n, GLuint *textures)) _func)(n, textures);
+}
+
+#if 0
+GLAPI void APIENTRY GLAPI_PREFIX(GenTexturesEXT)(GLsizei n, GLuint *textures)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[328];
+ ((void (APIENTRY *)(GLsizei n, GLuint *textures)) _func)(n, textures);
+}
+#endif
+
+GLAPI void APIENTRY GLAPI_PREFIX(GetPointerv)(GLenum pname, GLvoid **params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[329];
+ ((void (APIENTRY *)(GLenum pname, GLvoid **params)) _func)(pname, params);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(GetPointervEXT)(GLenum pname, GLvoid **params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[329];
+ ((void (APIENTRY *)(GLenum pname, GLvoid **params)) _func)(pname, params);
+}
+
+GLAPI GLboolean APIENTRY GLAPI_PREFIX(IsTexture)(GLuint texture)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[330];
+ return ((GLboolean (APIENTRY *)(GLuint texture)) _func)(texture);
+}
+
+#if 0
+GLAPI GLboolean APIENTRY GLAPI_PREFIX(IsTextureEXT)(GLuint texture)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[330];
+ return ((GLboolean (APIENTRY *)(GLuint texture)) _func)(texture);
+}
+#endif
+
+GLAPI void APIENTRY GLAPI_PREFIX(PrioritizeTextures)(GLsizei n, const GLuint *textures, const GLclampf *priorities)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[331];
+ ((void (APIENTRY *)(GLsizei n, const GLuint *textures, const GLclampf *priorities)) _func)(n, textures, priorities);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(PrioritizeTexturesEXT)(GLsizei n, const GLuint *textures, const GLclampf *priorities)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[331];
+ ((void (APIENTRY *)(GLsizei n, const GLuint *textures, const GLclampf *priorities)) _func)(n, textures, priorities);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(TexSubImage1D)(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[332];
+ ((void (APIENTRY *)(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels)) _func)(target, level, xoffset, width, format, type, pixels);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(TexSubImage1DEXT)(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[332];
+ ((void (APIENTRY *)(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels)) _func)(target, level, xoffset, width, format, type, pixels);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(TexSubImage2D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[333];
+ ((void (APIENTRY *)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels)) _func)(target, level, xoffset, yoffset, width, height, format, type, pixels);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(TexSubImage2DEXT)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[333];
+ ((void (APIENTRY *)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels)) _func)(target, level, xoffset, yoffset, width, height, format, type, pixels);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(PopClientAttrib)(void)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[334];
+ ((void (APIENTRY *)(void)) _func)();
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(PushClientAttrib)(GLbitfield mask)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[335];
+ ((void (APIENTRY *)(GLbitfield mask)) _func)(mask);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(BlendColor)(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[336];
+ ((void (APIENTRY *)(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)) _func)(red, green, blue, alpha);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(BlendColorEXT)(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[336];
+ ((void (APIENTRY *)(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)) _func)(red, green, blue, alpha);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(BlendEquation)(GLenum mode)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[337];
+ ((void (APIENTRY *)(GLenum mode)) _func)(mode);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(BlendEquationEXT)(GLenum mode)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[337];
+ ((void (APIENTRY *)(GLenum mode)) _func)(mode);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(DrawRangeElements)(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[338];
+ ((void (APIENTRY *)(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices)) _func)(mode, start, end, count, type, indices);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(DrawRangeElementsEXT)(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[338];
+ ((void (APIENTRY *)(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices)) _func)(mode, start, end, count, type, indices);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(ColorTable)(GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *table)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[339];
+ ((void (APIENTRY *)(GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *table)) _func)(target, internalformat, width, format, type, table);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(ColorTableEXT)(GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *table)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[339];
+ ((void (APIENTRY *)(GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *table)) _func)(target, internalformat, width, format, type, table);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(ColorTableParameterfv)(GLenum target, GLenum pname, const GLfloat *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[340];
+ ((void (APIENTRY *)(GLenum target, GLenum pname, const GLfloat *params)) _func)(target, pname, params);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(ColorTableParameteriv)(GLenum target, GLenum pname, const GLint *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[341];
+ ((void (APIENTRY *)(GLenum target, GLenum pname, const GLint *params)) _func)(target, pname, params);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(CopyColorTable)(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[342];
+ ((void (APIENTRY *)(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width)) _func)(target, internalformat, x, y, width);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(GetColorTable)(GLenum target, GLenum format, GLenum type, GLvoid *table)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[343];
+ ((void (APIENTRY *)(GLenum target, GLenum format, GLenum type, GLvoid *table)) _func)(target, format, type, table);
+}
+
+#if 0
+GLAPI void APIENTRY GLAPI_PREFIX(GetColorTableEXT)(GLenum target, GLenum format, GLenum type, GLvoid *table)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[343];
+ ((void (APIENTRY *)(GLenum target, GLenum format, GLenum type, GLvoid *table)) _func)(target, format, type, table);
+}
+#endif
+
+GLAPI void APIENTRY GLAPI_PREFIX(GetColorTableParameterfv)(GLenum target, GLenum pname, GLfloat *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[344];
+ ((void (APIENTRY *)(GLenum target, GLenum pname, GLfloat *params)) _func)(target, pname, params);
+}
+
+#if 0
+GLAPI void APIENTRY GLAPI_PREFIX(GetColorTableParameterfvEXT)(GLenum target, GLenum pname, GLfloat *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[344];
+ ((void (APIENTRY *)(GLenum target, GLenum pname, GLfloat *params)) _func)(target, pname, params);
+}
+#endif
+
+GLAPI void APIENTRY GLAPI_PREFIX(GetColorTableParameteriv)(GLenum target, GLenum pname, GLint *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[345];
+ ((void (APIENTRY *)(GLenum target, GLenum pname, GLint *params)) _func)(target, pname, params);
+}
+
+#if 0
+GLAPI void APIENTRY GLAPI_PREFIX(GetColorTableParameterivEXT)(GLenum target, GLenum pname, GLint *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[345];
+ ((void (APIENTRY *)(GLenum target, GLenum pname, GLint *params)) _func)(target, pname, params);
+}
+#endif
+
+GLAPI void APIENTRY GLAPI_PREFIX(ColorSubTable)(GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid *data)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[346];
+ ((void (APIENTRY *)(GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid *data)) _func)(target, start, count, format, type, data);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(CopyColorSubTable)(GLenum target, GLsizei start, GLint x, GLint y, GLsizei width)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[347];
+ ((void (APIENTRY *)(GLenum target, GLsizei start, GLint x, GLint y, GLsizei width)) _func)(target, start, x, y, width);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(ConvolutionFilter1D)(GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *image)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[348];
+ ((void (APIENTRY *)(GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *image)) _func)(target, internalformat, width, format, type, image);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(ConvolutionFilter2D)(GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *image)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[349];
+ ((void (APIENTRY *)(GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *image)) _func)(target, internalformat, width, height, format, type, image);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(ConvolutionParameterf)(GLenum target, GLenum pname, GLfloat params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[350];
+ ((void (APIENTRY *)(GLenum target, GLenum pname, GLfloat params)) _func)(target, pname, params);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(ConvolutionParameterfv)(GLenum target, GLenum pname, const GLfloat *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[351];
+ ((void (APIENTRY *)(GLenum target, GLenum pname, const GLfloat *params)) _func)(target, pname, params);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(ConvolutionParameteri)(GLenum target, GLenum pname, GLint params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[352];
+ ((void (APIENTRY *)(GLenum target, GLenum pname, GLint params)) _func)(target, pname, params);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(ConvolutionParameteriv)(GLenum target, GLenum pname, const GLint *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[353];
+ ((void (APIENTRY *)(GLenum target, GLenum pname, const GLint *params)) _func)(target, pname, params);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(CopyConvolutionFilter1D)(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[354];
+ ((void (APIENTRY *)(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width)) _func)(target, internalformat, x, y, width);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(CopyConvolutionFilter2D)(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[355];
+ ((void (APIENTRY *)(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height)) _func)(target, internalformat, x, y, width, height);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(GetConvolutionFilter)(GLenum target, GLenum format, GLenum type, GLvoid *image)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[356];
+ ((void (APIENTRY *)(GLenum target, GLenum format, GLenum type, GLvoid *image)) _func)(target, format, type, image);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(GetConvolutionParameterfv)(GLenum target, GLenum pname, GLfloat *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[357];
+ ((void (APIENTRY *)(GLenum target, GLenum pname, GLfloat *params)) _func)(target, pname, params);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(GetConvolutionParameteriv)(GLenum target, GLenum pname, GLint *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[358];
+ ((void (APIENTRY *)(GLenum target, GLenum pname, GLint *params)) _func)(target, pname, params);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(GetSeparableFilter)(GLenum target, GLenum format, GLenum type, GLvoid *row, GLvoid *column, GLvoid *span)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[359];
+ ((void (APIENTRY *)(GLenum target, GLenum format, GLenum type, GLvoid *row, GLvoid *column, GLvoid *span)) _func)(target, format, type, row, column, span);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(SeparableFilter2D)(GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *row, const GLvoid *column)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[360];
+ ((void (APIENTRY *)(GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *row, const GLvoid *column)) _func)(target, internalformat, width, height, format, type, row, column);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(GetHistogram)(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[361];
+ ((void (APIENTRY *)(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values)) _func)(target, reset, format, type, values);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(GetHistogramParameterfv)(GLenum target, GLenum pname, GLfloat *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[362];
+ ((void (APIENTRY *)(GLenum target, GLenum pname, GLfloat *params)) _func)(target, pname, params);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(GetHistogramParameteriv)(GLenum target, GLenum pname, GLint *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[363];
+ ((void (APIENTRY *)(GLenum target, GLenum pname, GLint *params)) _func)(target, pname, params);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(GetMinmax)(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[364];
+ ((void (APIENTRY *)(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values)) _func)(target, reset, format, type, values);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(GetMinmaxParameterfv)(GLenum target, GLenum pname, GLfloat *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[365];
+ ((void (APIENTRY *)(GLenum target, GLenum pname, GLfloat *params)) _func)(target, pname, params);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(GetMinmaxParameteriv)(GLenum target, GLenum pname, GLint *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[366];
+ ((void (APIENTRY *)(GLenum target, GLenum pname, GLint *params)) _func)(target, pname, params);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Histogram)(GLenum target, GLsizei width, GLenum internalformat, GLboolean sink)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[367];
+ ((void (APIENTRY *)(GLenum target, GLsizei width, GLenum internalformat, GLboolean sink)) _func)(target, width, internalformat, sink);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Minmax)(GLenum target, GLenum internalformat, GLboolean sink)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[368];
+ ((void (APIENTRY *)(GLenum target, GLenum internalformat, GLboolean sink)) _func)(target, internalformat, sink);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(ResetHistogram)(GLenum target)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[369];
+ ((void (APIENTRY *)(GLenum target)) _func)(target);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(ResetMinmax)(GLenum target)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[370];
+ ((void (APIENTRY *)(GLenum target)) _func)(target);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(TexImage3D)(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[371];
+ ((void (APIENTRY *)(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels)) _func)(target, level, internalformat, width, height, depth, border, format, type, pixels);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(TexImage3DEXT)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[371];
+ ((void (APIENTRY *)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels)) _func)(target, level, internalformat, width, height, depth, border, format, type, pixels);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(TexSubImage3D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[372];
+ ((void (APIENTRY *)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels)) _func)(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(TexSubImage3DEXT)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[372];
+ ((void (APIENTRY *)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels)) _func)(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(CopyTexSubImage3D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[373];
+ ((void (APIENTRY *)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height)) _func)(target, level, xoffset, yoffset, zoffset, x, y, width, height);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(CopyTexSubImage3DEXT)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[373];
+ ((void (APIENTRY *)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height)) _func)(target, level, xoffset, yoffset, zoffset, x, y, width, height);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(ActiveTextureARB)(GLenum texture)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[374];
+ ((void (APIENTRY *)(GLenum texture)) _func)(texture);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(ActiveTexture)(GLenum texture)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[374];
+ ((void (APIENTRY *)(GLenum texture)) _func)(texture);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(ClientActiveTextureARB)(GLenum texture)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[375];
+ ((void (APIENTRY *)(GLenum texture)) _func)(texture);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(ClientActiveTexture)(GLenum texture)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[375];
+ ((void (APIENTRY *)(GLenum texture)) _func)(texture);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord1dARB)(GLenum target, GLdouble s)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[376];
+ ((void (APIENTRY *)(GLenum target, GLdouble s)) _func)(target, s);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord1d)(GLenum target, GLdouble s)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[376];
+ ((void (APIENTRY *)(GLenum target, GLdouble s)) _func)(target, s);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord1dvARB)(GLenum target, const GLdouble *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[377];
+ ((void (APIENTRY *)(GLenum target, const GLdouble *v)) _func)(target, v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord1dv)(GLenum target, const GLdouble *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[377];
+ ((void (APIENTRY *)(GLenum target, const GLdouble *v)) _func)(target, v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord1fARB)(GLenum target, GLfloat s)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[378];
+ ((void (APIENTRY *)(GLenum target, GLfloat s)) _func)(target, s);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord1f)(GLenum target, GLfloat s)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[378];
+ ((void (APIENTRY *)(GLenum target, GLfloat s)) _func)(target, s);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord1fvARB)(GLenum target, const GLfloat *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[379];
+ ((void (APIENTRY *)(GLenum target, const GLfloat *v)) _func)(target, v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord1fv)(GLenum target, const GLfloat *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[379];
+ ((void (APIENTRY *)(GLenum target, const GLfloat *v)) _func)(target, v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord1iARB)(GLenum target, GLint s)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[380];
+ ((void (APIENTRY *)(GLenum target, GLint s)) _func)(target, s);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord1i)(GLenum target, GLint s)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[380];
+ ((void (APIENTRY *)(GLenum target, GLint s)) _func)(target, s);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord1ivARB)(GLenum target, const GLint *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[381];
+ ((void (APIENTRY *)(GLenum target, const GLint *v)) _func)(target, v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord1iv)(GLenum target, const GLint *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[381];
+ ((void (APIENTRY *)(GLenum target, const GLint *v)) _func)(target, v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord1sARB)(GLenum target, GLshort s)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[382];
+ ((void (APIENTRY *)(GLenum target, GLshort s)) _func)(target, s);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord1s)(GLenum target, GLshort s)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[382];
+ ((void (APIENTRY *)(GLenum target, GLshort s)) _func)(target, s);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord1svARB)(GLenum target, const GLshort *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[383];
+ ((void (APIENTRY *)(GLenum target, const GLshort *v)) _func)(target, v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord1sv)(GLenum target, const GLshort *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[383];
+ ((void (APIENTRY *)(GLenum target, const GLshort *v)) _func)(target, v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord2dARB)(GLenum target, GLdouble s, GLdouble t)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[384];
+ ((void (APIENTRY *)(GLenum target, GLdouble s, GLdouble t)) _func)(target, s, t);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord2d)(GLenum target, GLdouble s, GLdouble t)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[384];
+ ((void (APIENTRY *)(GLenum target, GLdouble s, GLdouble t)) _func)(target, s, t);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord2dvARB)(GLenum target, const GLdouble *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[385];
+ ((void (APIENTRY *)(GLenum target, const GLdouble *v)) _func)(target, v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord2dv)(GLenum target, const GLdouble *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[385];
+ ((void (APIENTRY *)(GLenum target, const GLdouble *v)) _func)(target, v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord2fARB)(GLenum target, GLfloat s, GLfloat t)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[386];
+ ((void (APIENTRY *)(GLenum target, GLfloat s, GLfloat t)) _func)(target, s, t);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord2f)(GLenum target, GLfloat s, GLfloat t)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[386];
+ ((void (APIENTRY *)(GLenum target, GLfloat s, GLfloat t)) _func)(target, s, t);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord2fvARB)(GLenum target, const GLfloat *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[387];
+ ((void (APIENTRY *)(GLenum target, const GLfloat *v)) _func)(target, v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord2fv)(GLenum target, const GLfloat *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[387];
+ ((void (APIENTRY *)(GLenum target, const GLfloat *v)) _func)(target, v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord2iARB)(GLenum target, GLint s, GLint t)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[388];
+ ((void (APIENTRY *)(GLenum target, GLint s, GLint t)) _func)(target, s, t);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord2i)(GLenum target, GLint s, GLint t)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[388];
+ ((void (APIENTRY *)(GLenum target, GLint s, GLint t)) _func)(target, s, t);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord2ivARB)(GLenum target, const GLint *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[389];
+ ((void (APIENTRY *)(GLenum target, const GLint *v)) _func)(target, v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord2iv)(GLenum target, const GLint *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[389];
+ ((void (APIENTRY *)(GLenum target, const GLint *v)) _func)(target, v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord2sARB)(GLenum target, GLshort s, GLshort t)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[390];
+ ((void (APIENTRY *)(GLenum target, GLshort s, GLshort t)) _func)(target, s, t);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord2s)(GLenum target, GLshort s, GLshort t)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[390];
+ ((void (APIENTRY *)(GLenum target, GLshort s, GLshort t)) _func)(target, s, t);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord2svARB)(GLenum target, const GLshort *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[391];
+ ((void (APIENTRY *)(GLenum target, const GLshort *v)) _func)(target, v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord2sv)(GLenum target, const GLshort *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[391];
+ ((void (APIENTRY *)(GLenum target, const GLshort *v)) _func)(target, v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord3dARB)(GLenum target, GLdouble s, GLdouble t, GLdouble r)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[392];
+ ((void (APIENTRY *)(GLenum target, GLdouble s, GLdouble t, GLdouble r)) _func)(target, s, t, r);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord3d)(GLenum target, GLdouble s, GLdouble t, GLdouble r)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[392];
+ ((void (APIENTRY *)(GLenum target, GLdouble s, GLdouble t, GLdouble r)) _func)(target, s, t, r);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord3dvARB)(GLenum target, const GLdouble *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[393];
+ ((void (APIENTRY *)(GLenum target, const GLdouble *v)) _func)(target, v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord3dv)(GLenum target, const GLdouble *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[393];
+ ((void (APIENTRY *)(GLenum target, const GLdouble *v)) _func)(target, v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord3fARB)(GLenum target, GLfloat s, GLfloat t, GLfloat r)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[394];
+ ((void (APIENTRY *)(GLenum target, GLfloat s, GLfloat t, GLfloat r)) _func)(target, s, t, r);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord3f)(GLenum target, GLfloat s, GLfloat t, GLfloat r)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[394];
+ ((void (APIENTRY *)(GLenum target, GLfloat s, GLfloat t, GLfloat r)) _func)(target, s, t, r);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord3fvARB)(GLenum target, const GLfloat *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[395];
+ ((void (APIENTRY *)(GLenum target, const GLfloat *v)) _func)(target, v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord3fv)(GLenum target, const GLfloat *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[395];
+ ((void (APIENTRY *)(GLenum target, const GLfloat *v)) _func)(target, v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord3iARB)(GLenum target, GLint s, GLint t, GLint r)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[396];
+ ((void (APIENTRY *)(GLenum target, GLint s, GLint t, GLint r)) _func)(target, s, t, r);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord3i)(GLenum target, GLint s, GLint t, GLint r)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[396];
+ ((void (APIENTRY *)(GLenum target, GLint s, GLint t, GLint r)) _func)(target, s, t, r);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord3ivARB)(GLenum target, const GLint *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[397];
+ ((void (APIENTRY *)(GLenum target, const GLint *v)) _func)(target, v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord3iv)(GLenum target, const GLint *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[397];
+ ((void (APIENTRY *)(GLenum target, const GLint *v)) _func)(target, v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord3sARB)(GLenum target, GLshort s, GLshort t, GLshort r)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[398];
+ ((void (APIENTRY *)(GLenum target, GLshort s, GLshort t, GLshort r)) _func)(target, s, t, r);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord3s)(GLenum target, GLshort s, GLshort t, GLshort r)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[398];
+ ((void (APIENTRY *)(GLenum target, GLshort s, GLshort t, GLshort r)) _func)(target, s, t, r);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord3svARB)(GLenum target, const GLshort *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[399];
+ ((void (APIENTRY *)(GLenum target, const GLshort *v)) _func)(target, v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord3sv)(GLenum target, const GLshort *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[399];
+ ((void (APIENTRY *)(GLenum target, const GLshort *v)) _func)(target, v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord4dARB)(GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[400];
+ ((void (APIENTRY *)(GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q)) _func)(target, s, t, r, q);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord4d)(GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[400];
+ ((void (APIENTRY *)(GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q)) _func)(target, s, t, r, q);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord4dvARB)(GLenum target, const GLdouble *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[401];
+ ((void (APIENTRY *)(GLenum target, const GLdouble *v)) _func)(target, v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord4dv)(GLenum target, const GLdouble *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[401];
+ ((void (APIENTRY *)(GLenum target, const GLdouble *v)) _func)(target, v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord4fARB)(GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[402];
+ ((void (APIENTRY *)(GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q)) _func)(target, s, t, r, q);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord4f)(GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[402];
+ ((void (APIENTRY *)(GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q)) _func)(target, s, t, r, q);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord4fvARB)(GLenum target, const GLfloat *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[403];
+ ((void (APIENTRY *)(GLenum target, const GLfloat *v)) _func)(target, v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord4fv)(GLenum target, const GLfloat *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[403];
+ ((void (APIENTRY *)(GLenum target, const GLfloat *v)) _func)(target, v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord4iARB)(GLenum target, GLint s, GLint t, GLint r, GLint q)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[404];
+ ((void (APIENTRY *)(GLenum target, GLint s, GLint t, GLint r, GLint q)) _func)(target, s, t, r, q);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord4i)(GLenum target, GLint s, GLint t, GLint r, GLint q)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[404];
+ ((void (APIENTRY *)(GLenum target, GLint s, GLint t, GLint r, GLint q)) _func)(target, s, t, r, q);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord4ivARB)(GLenum target, const GLint *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[405];
+ ((void (APIENTRY *)(GLenum target, const GLint *v)) _func)(target, v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord4iv)(GLenum target, const GLint *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[405];
+ ((void (APIENTRY *)(GLenum target, const GLint *v)) _func)(target, v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord4sARB)(GLenum target, GLshort s, GLshort t, GLshort r, GLshort q)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[406];
+ ((void (APIENTRY *)(GLenum target, GLshort s, GLshort t, GLshort r, GLshort q)) _func)(target, s, t, r, q);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord4s)(GLenum target, GLshort s, GLshort t, GLshort r, GLshort q)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[406];
+ ((void (APIENTRY *)(GLenum target, GLshort s, GLshort t, GLshort r, GLshort q)) _func)(target, s, t, r, q);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord4svARB)(GLenum target, const GLshort *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[407];
+ ((void (APIENTRY *)(GLenum target, const GLshort *v)) _func)(target, v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord4sv)(GLenum target, const GLshort *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[407];
+ ((void (APIENTRY *)(GLenum target, const GLshort *v)) _func)(target, v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(AttachShader)(GLuint program, GLuint shader)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[408];
+ ((void (APIENTRY *)(GLuint program, GLuint shader)) _func)(program, shader);
+}
+
+GLAPI GLuint APIENTRY GLAPI_PREFIX(CreateProgram)(void)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[409];
+ return ((GLuint (APIENTRY *)(void)) _func)();
+}
+
+GLAPI GLuint APIENTRY GLAPI_PREFIX(CreateShader)(GLenum type)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[410];
+ return ((GLuint (APIENTRY *)(GLenum type)) _func)(type);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(DeleteProgram)(GLuint program)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[411];
+ ((void (APIENTRY *)(GLuint program)) _func)(program);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(DeleteShader)(GLuint program)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[412];
+ ((void (APIENTRY *)(GLuint program)) _func)(program);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(DetachShader)(GLuint program, GLuint shader)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[413];
+ ((void (APIENTRY *)(GLuint program, GLuint shader)) _func)(program, shader);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(GetAttachedShaders)(GLuint program, GLsizei maxCount, GLsizei *count, GLuint *obj)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[414];
+ ((void (APIENTRY *)(GLuint program, GLsizei maxCount, GLsizei *count, GLuint *obj)) _func)(program, maxCount, count, obj);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(GetProgramInfoLog)(GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[415];
+ ((void (APIENTRY *)(GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog)) _func)(program, bufSize, length, infoLog);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(GetProgramiv)(GLuint program, GLenum pname, GLint *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[416];
+ ((void (APIENTRY *)(GLuint program, GLenum pname, GLint *params)) _func)(program, pname, params);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(GetShaderInfoLog)(GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[417];
+ ((void (APIENTRY *)(GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog)) _func)(shader, bufSize, length, infoLog);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(GetShaderiv)(GLuint shader, GLenum pname, GLint *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[418];
+ ((void (APIENTRY *)(GLuint shader, GLenum pname, GLint *params)) _func)(shader, pname, params);
+}
+
+GLAPI GLboolean APIENTRY GLAPI_PREFIX(IsProgram)(GLuint program)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[419];
+ return ((GLboolean (APIENTRY *)(GLuint program)) _func)(program);
+}
+
+GLAPI GLboolean APIENTRY GLAPI_PREFIX(IsShader)(GLuint shader)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[420];
+ return ((GLboolean (APIENTRY *)(GLuint shader)) _func)(shader);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(StencilFuncSeparate)(GLenum face, GLenum func, GLint ref, GLuint mask)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[421];
+ ((void (APIENTRY *)(GLenum face, GLenum func, GLint ref, GLuint mask)) _func)(face, func, ref, mask);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(StencilMaskSeparate)(GLenum face, GLuint mask)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[422];
+ ((void (APIENTRY *)(GLenum face, GLuint mask)) _func)(face, mask);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(StencilOpSeparate)(GLenum face, GLenum sfail, GLenum zfail, GLenum zpass)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[423];
+ ((void (APIENTRY *)(GLenum face, GLenum sfail, GLenum zfail, GLenum zpass)) _func)(face, sfail, zfail, zpass);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(UniformMatrix2x3fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[424];
+ ((void (APIENTRY *)(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)) _func)(location, count, transpose, value);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(UniformMatrix2x4fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[425];
+ ((void (APIENTRY *)(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)) _func)(location, count, transpose, value);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(UniformMatrix3x2fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[426];
+ ((void (APIENTRY *)(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)) _func)(location, count, transpose, value);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(UniformMatrix3x4fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[427];
+ ((void (APIENTRY *)(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)) _func)(location, count, transpose, value);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(UniformMatrix4x2fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[428];
+ ((void (APIENTRY *)(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)) _func)(location, count, transpose, value);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(UniformMatrix4x3fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[429];
+ ((void (APIENTRY *)(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)) _func)(location, count, transpose, value);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(ClampColor)(GLenum target, GLenum clamp)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[430];
+ ((void (APIENTRY *)(GLenum target, GLenum clamp)) _func)(target, clamp);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(ClearBufferfi)(GLenum buffer, GLint drawbuffer, const GLfloat depth, const GLint stencil)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[431];
+ ((void (APIENTRY *)(GLenum buffer, GLint drawbuffer, const GLfloat depth, const GLint stencil)) _func)(buffer, drawbuffer, depth, stencil);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(ClearBufferfv)(GLenum buffer, GLint drawbuffer, const GLfloat *value)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[432];
+ ((void (APIENTRY *)(GLenum buffer, GLint drawbuffer, const GLfloat *value)) _func)(buffer, drawbuffer, value);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(ClearBufferiv)(GLenum buffer, GLint drawbuffer, const GLint *value)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[433];
+ ((void (APIENTRY *)(GLenum buffer, GLint drawbuffer, const GLint *value)) _func)(buffer, drawbuffer, value);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(ClearBufferuiv)(GLenum buffer, GLint drawbuffer, const GLuint *value)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[434];
+ ((void (APIENTRY *)(GLenum buffer, GLint drawbuffer, const GLuint *value)) _func)(buffer, drawbuffer, value);
+}
+
+GLAPI const GLubyte * APIENTRY GLAPI_PREFIX(GetStringi)(GLenum name, GLuint index)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[435];
+ return ((const GLubyte * (APIENTRY *)(GLenum name, GLuint index)) _func)(name, index);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(TexBuffer)(GLenum target, GLenum internalFormat, GLuint buffer)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[436];
+ ((void (APIENTRY *)(GLenum target, GLenum internalFormat, GLuint buffer)) _func)(target, internalFormat, buffer);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(FramebufferTexture)(GLenum target, GLenum attachment, GLuint texture, GLint level)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[437];
+ ((void (APIENTRY *)(GLenum target, GLenum attachment, GLuint texture, GLint level)) _func)(target, attachment, texture, level);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(GetBufferParameteri64v)(GLenum target, GLenum pname, GLint64 *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[438];
+ ((void (APIENTRY *)(GLenum target, GLenum pname, GLint64 *params)) _func)(target, pname, params);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(GetInteger64i_v)(GLenum cap, GLuint index, GLint64 *data)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[439];
+ ((void (APIENTRY *)(GLenum cap, GLuint index, GLint64 *data)) _func)(cap, index, data);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribDivisor)(GLuint index, GLuint divisor)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[440];
+ ((void (APIENTRY *)(GLuint index, GLuint divisor)) _func)(index, divisor);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(LoadTransposeMatrixdARB)(const GLdouble *m)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[441];
+ ((void (APIENTRY *)(const GLdouble *m)) _func)(m);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(LoadTransposeMatrixd)(const GLdouble *m)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[441];
+ ((void (APIENTRY *)(const GLdouble *m)) _func)(m);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(LoadTransposeMatrixfARB)(const GLfloat *m)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[442];
+ ((void (APIENTRY *)(const GLfloat *m)) _func)(m);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(LoadTransposeMatrixf)(const GLfloat *m)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[442];
+ ((void (APIENTRY *)(const GLfloat *m)) _func)(m);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(MultTransposeMatrixdARB)(const GLdouble *m)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[443];
+ ((void (APIENTRY *)(const GLdouble *m)) _func)(m);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(MultTransposeMatrixd)(const GLdouble *m)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[443];
+ ((void (APIENTRY *)(const GLdouble *m)) _func)(m);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(MultTransposeMatrixfARB)(const GLfloat *m)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[444];
+ ((void (APIENTRY *)(const GLfloat *m)) _func)(m);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(MultTransposeMatrixf)(const GLfloat *m)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[444];
+ ((void (APIENTRY *)(const GLfloat *m)) _func)(m);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(SampleCoverageARB)(GLclampf value, GLboolean invert)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[445];
+ ((void (APIENTRY *)(GLclampf value, GLboolean invert)) _func)(value, invert);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(SampleCoverage)(GLclampf value, GLboolean invert)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[445];
+ ((void (APIENTRY *)(GLclampf value, GLboolean invert)) _func)(value, invert);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(CompressedTexImage1DARB)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[446];
+ ((void (APIENTRY *)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data)) _func)(target, level, internalformat, width, border, imageSize, data);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(CompressedTexImage1D)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[446];
+ ((void (APIENTRY *)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data)) _func)(target, level, internalformat, width, border, imageSize, data);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(CompressedTexImage2DARB)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[447];
+ ((void (APIENTRY *)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data)) _func)(target, level, internalformat, width, height, border, imageSize, data);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(CompressedTexImage2D)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[447];
+ ((void (APIENTRY *)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data)) _func)(target, level, internalformat, width, height, border, imageSize, data);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(CompressedTexImage3DARB)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[448];
+ ((void (APIENTRY *)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data)) _func)(target, level, internalformat, width, height, depth, border, imageSize, data);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(CompressedTexImage3D)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[448];
+ ((void (APIENTRY *)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data)) _func)(target, level, internalformat, width, height, depth, border, imageSize, data);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(CompressedTexSubImage1DARB)(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[449];
+ ((void (APIENTRY *)(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data)) _func)(target, level, xoffset, width, format, imageSize, data);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(CompressedTexSubImage1D)(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[449];
+ ((void (APIENTRY *)(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data)) _func)(target, level, xoffset, width, format, imageSize, data);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(CompressedTexSubImage2DARB)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[450];
+ ((void (APIENTRY *)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data)) _func)(target, level, xoffset, yoffset, width, height, format, imageSize, data);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(CompressedTexSubImage2D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[450];
+ ((void (APIENTRY *)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data)) _func)(target, level, xoffset, yoffset, width, height, format, imageSize, data);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(CompressedTexSubImage3DARB)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[451];
+ ((void (APIENTRY *)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data)) _func)(target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(CompressedTexSubImage3D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[451];
+ ((void (APIENTRY *)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data)) _func)(target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(GetCompressedTexImageARB)(GLenum target, GLint level, GLvoid *img)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[452];
+ ((void (APIENTRY *)(GLenum target, GLint level, GLvoid *img)) _func)(target, level, img);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(GetCompressedTexImage)(GLenum target, GLint level, GLvoid *img)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[452];
+ ((void (APIENTRY *)(GLenum target, GLint level, GLvoid *img)) _func)(target, level, img);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(DisableVertexAttribArrayARB)(GLuint index)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[453];
+ ((void (APIENTRY *)(GLuint index)) _func)(index);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(DisableVertexAttribArray)(GLuint index)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[453];
+ ((void (APIENTRY *)(GLuint index)) _func)(index);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(EnableVertexAttribArrayARB)(GLuint index)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[454];
+ ((void (APIENTRY *)(GLuint index)) _func)(index);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(EnableVertexAttribArray)(GLuint index)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[454];
+ ((void (APIENTRY *)(GLuint index)) _func)(index);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(GetProgramEnvParameterdvARB)(GLenum target, GLuint index, GLdouble *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[455];
+ ((void (APIENTRY *)(GLenum target, GLuint index, GLdouble *params)) _func)(target, index, params);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(GetProgramEnvParameterfvARB)(GLenum target, GLuint index, GLfloat *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[456];
+ ((void (APIENTRY *)(GLenum target, GLuint index, GLfloat *params)) _func)(target, index, params);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(GetProgramLocalParameterdvARB)(GLenum target, GLuint index, GLdouble *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[457];
+ ((void (APIENTRY *)(GLenum target, GLuint index, GLdouble *params)) _func)(target, index, params);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(GetProgramLocalParameterfvARB)(GLenum target, GLuint index, GLfloat *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[458];
+ ((void (APIENTRY *)(GLenum target, GLuint index, GLfloat *params)) _func)(target, index, params);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(GetProgramStringARB)(GLenum target, GLenum pname, GLvoid *string)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[459];
+ ((void (APIENTRY *)(GLenum target, GLenum pname, GLvoid *string)) _func)(target, pname, string);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(GetProgramivARB)(GLenum target, GLenum pname, GLint *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[460];
+ ((void (APIENTRY *)(GLenum target, GLenum pname, GLint *params)) _func)(target, pname, params);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(GetVertexAttribdvARB)(GLuint index, GLenum pname, GLdouble *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[461];
+ ((void (APIENTRY *)(GLuint index, GLenum pname, GLdouble *params)) _func)(index, pname, params);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(GetVertexAttribdv)(GLuint index, GLenum pname, GLdouble *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[461];
+ ((void (APIENTRY *)(GLuint index, GLenum pname, GLdouble *params)) _func)(index, pname, params);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(GetVertexAttribfvARB)(GLuint index, GLenum pname, GLfloat *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[462];
+ ((void (APIENTRY *)(GLuint index, GLenum pname, GLfloat *params)) _func)(index, pname, params);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(GetVertexAttribfv)(GLuint index, GLenum pname, GLfloat *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[462];
+ ((void (APIENTRY *)(GLuint index, GLenum pname, GLfloat *params)) _func)(index, pname, params);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(GetVertexAttribivARB)(GLuint index, GLenum pname, GLint *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[463];
+ ((void (APIENTRY *)(GLuint index, GLenum pname, GLint *params)) _func)(index, pname, params);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(GetVertexAttribiv)(GLuint index, GLenum pname, GLint *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[463];
+ ((void (APIENTRY *)(GLuint index, GLenum pname, GLint *params)) _func)(index, pname, params);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(ProgramEnvParameter4dARB)(GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[464];
+ ((void (APIENTRY *)(GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w)) _func)(target, index, x, y, z, w);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(ProgramParameter4dNV)(GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[464];
+ ((void (APIENTRY *)(GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w)) _func)(target, index, x, y, z, w);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(ProgramEnvParameter4dvARB)(GLenum target, GLuint index, const GLdouble *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[465];
+ ((void (APIENTRY *)(GLenum target, GLuint index, const GLdouble *params)) _func)(target, index, params);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(ProgramParameter4dvNV)(GLenum target, GLuint index, const GLdouble *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[465];
+ ((void (APIENTRY *)(GLenum target, GLuint index, const GLdouble *params)) _func)(target, index, params);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(ProgramEnvParameter4fARB)(GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[466];
+ ((void (APIENTRY *)(GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w)) _func)(target, index, x, y, z, w);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(ProgramParameter4fNV)(GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[466];
+ ((void (APIENTRY *)(GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w)) _func)(target, index, x, y, z, w);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(ProgramEnvParameter4fvARB)(GLenum target, GLuint index, const GLfloat *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[467];
+ ((void (APIENTRY *)(GLenum target, GLuint index, const GLfloat *params)) _func)(target, index, params);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(ProgramParameter4fvNV)(GLenum target, GLuint index, const GLfloat *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[467];
+ ((void (APIENTRY *)(GLenum target, GLuint index, const GLfloat *params)) _func)(target, index, params);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(ProgramLocalParameter4dARB)(GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[468];
+ ((void (APIENTRY *)(GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w)) _func)(target, index, x, y, z, w);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(ProgramLocalParameter4dvARB)(GLenum target, GLuint index, const GLdouble *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[469];
+ ((void (APIENTRY *)(GLenum target, GLuint index, const GLdouble *params)) _func)(target, index, params);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(ProgramLocalParameter4fARB)(GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[470];
+ ((void (APIENTRY *)(GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w)) _func)(target, index, x, y, z, w);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(ProgramLocalParameter4fvARB)(GLenum target, GLuint index, const GLfloat *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[471];
+ ((void (APIENTRY *)(GLenum target, GLuint index, const GLfloat *params)) _func)(target, index, params);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(ProgramStringARB)(GLenum target, GLenum format, GLsizei len, const GLvoid *string)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[472];
+ ((void (APIENTRY *)(GLenum target, GLenum format, GLsizei len, const GLvoid *string)) _func)(target, format, len, string);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib1dARB)(GLuint index, GLdouble x)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[473];
+ ((void (APIENTRY *)(GLuint index, GLdouble x)) _func)(index, x);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib1d)(GLuint index, GLdouble x)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[473];
+ ((void (APIENTRY *)(GLuint index, GLdouble x)) _func)(index, x);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib1dvARB)(GLuint index, const GLdouble *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[474];
+ ((void (APIENTRY *)(GLuint index, const GLdouble *v)) _func)(index, v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib1dv)(GLuint index, const GLdouble *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[474];
+ ((void (APIENTRY *)(GLuint index, const GLdouble *v)) _func)(index, v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib1fARB)(GLuint index, GLfloat x)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[475];
+ ((void (APIENTRY *)(GLuint index, GLfloat x)) _func)(index, x);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib1f)(GLuint index, GLfloat x)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[475];
+ ((void (APIENTRY *)(GLuint index, GLfloat x)) _func)(index, x);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib1fvARB)(GLuint index, const GLfloat *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[476];
+ ((void (APIENTRY *)(GLuint index, const GLfloat *v)) _func)(index, v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib1fv)(GLuint index, const GLfloat *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[476];
+ ((void (APIENTRY *)(GLuint index, const GLfloat *v)) _func)(index, v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib1sARB)(GLuint index, GLshort x)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[477];
+ ((void (APIENTRY *)(GLuint index, GLshort x)) _func)(index, x);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib1s)(GLuint index, GLshort x)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[477];
+ ((void (APIENTRY *)(GLuint index, GLshort x)) _func)(index, x);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib1svARB)(GLuint index, const GLshort *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[478];
+ ((void (APIENTRY *)(GLuint index, const GLshort *v)) _func)(index, v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib1sv)(GLuint index, const GLshort *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[478];
+ ((void (APIENTRY *)(GLuint index, const GLshort *v)) _func)(index, v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib2dARB)(GLuint index, GLdouble x, GLdouble y)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[479];
+ ((void (APIENTRY *)(GLuint index, GLdouble x, GLdouble y)) _func)(index, x, y);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib2d)(GLuint index, GLdouble x, GLdouble y)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[479];
+ ((void (APIENTRY *)(GLuint index, GLdouble x, GLdouble y)) _func)(index, x, y);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib2dvARB)(GLuint index, const GLdouble *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[480];
+ ((void (APIENTRY *)(GLuint index, const GLdouble *v)) _func)(index, v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib2dv)(GLuint index, const GLdouble *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[480];
+ ((void (APIENTRY *)(GLuint index, const GLdouble *v)) _func)(index, v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib2fARB)(GLuint index, GLfloat x, GLfloat y)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[481];
+ ((void (APIENTRY *)(GLuint index, GLfloat x, GLfloat y)) _func)(index, x, y);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib2f)(GLuint index, GLfloat x, GLfloat y)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[481];
+ ((void (APIENTRY *)(GLuint index, GLfloat x, GLfloat y)) _func)(index, x, y);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib2fvARB)(GLuint index, const GLfloat *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[482];
+ ((void (APIENTRY *)(GLuint index, const GLfloat *v)) _func)(index, v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib2fv)(GLuint index, const GLfloat *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[482];
+ ((void (APIENTRY *)(GLuint index, const GLfloat *v)) _func)(index, v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib2sARB)(GLuint index, GLshort x, GLshort y)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[483];
+ ((void (APIENTRY *)(GLuint index, GLshort x, GLshort y)) _func)(index, x, y);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib2s)(GLuint index, GLshort x, GLshort y)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[483];
+ ((void (APIENTRY *)(GLuint index, GLshort x, GLshort y)) _func)(index, x, y);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib2svARB)(GLuint index, const GLshort *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[484];
+ ((void (APIENTRY *)(GLuint index, const GLshort *v)) _func)(index, v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib2sv)(GLuint index, const GLshort *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[484];
+ ((void (APIENTRY *)(GLuint index, const GLshort *v)) _func)(index, v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib3dARB)(GLuint index, GLdouble x, GLdouble y, GLdouble z)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[485];
+ ((void (APIENTRY *)(GLuint index, GLdouble x, GLdouble y, GLdouble z)) _func)(index, x, y, z);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib3d)(GLuint index, GLdouble x, GLdouble y, GLdouble z)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[485];
+ ((void (APIENTRY *)(GLuint index, GLdouble x, GLdouble y, GLdouble z)) _func)(index, x, y, z);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib3dvARB)(GLuint index, const GLdouble *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[486];
+ ((void (APIENTRY *)(GLuint index, const GLdouble *v)) _func)(index, v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib3dv)(GLuint index, const GLdouble *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[486];
+ ((void (APIENTRY *)(GLuint index, const GLdouble *v)) _func)(index, v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib3fARB)(GLuint index, GLfloat x, GLfloat y, GLfloat z)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[487];
+ ((void (APIENTRY *)(GLuint index, GLfloat x, GLfloat y, GLfloat z)) _func)(index, x, y, z);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib3f)(GLuint index, GLfloat x, GLfloat y, GLfloat z)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[487];
+ ((void (APIENTRY *)(GLuint index, GLfloat x, GLfloat y, GLfloat z)) _func)(index, x, y, z);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib3fvARB)(GLuint index, const GLfloat *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[488];
+ ((void (APIENTRY *)(GLuint index, const GLfloat *v)) _func)(index, v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib3fv)(GLuint index, const GLfloat *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[488];
+ ((void (APIENTRY *)(GLuint index, const GLfloat *v)) _func)(index, v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib3sARB)(GLuint index, GLshort x, GLshort y, GLshort z)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[489];
+ ((void (APIENTRY *)(GLuint index, GLshort x, GLshort y, GLshort z)) _func)(index, x, y, z);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib3s)(GLuint index, GLshort x, GLshort y, GLshort z)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[489];
+ ((void (APIENTRY *)(GLuint index, GLshort x, GLshort y, GLshort z)) _func)(index, x, y, z);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib3svARB)(GLuint index, const GLshort *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[490];
+ ((void (APIENTRY *)(GLuint index, const GLshort *v)) _func)(index, v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib3sv)(GLuint index, const GLshort *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[490];
+ ((void (APIENTRY *)(GLuint index, const GLshort *v)) _func)(index, v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4NbvARB)(GLuint index, const GLbyte *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[491];
+ ((void (APIENTRY *)(GLuint index, const GLbyte *v)) _func)(index, v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4Nbv)(GLuint index, const GLbyte *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[491];
+ ((void (APIENTRY *)(GLuint index, const GLbyte *v)) _func)(index, v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4NivARB)(GLuint index, const GLint *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[492];
+ ((void (APIENTRY *)(GLuint index, const GLint *v)) _func)(index, v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4Niv)(GLuint index, const GLint *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[492];
+ ((void (APIENTRY *)(GLuint index, const GLint *v)) _func)(index, v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4NsvARB)(GLuint index, const GLshort *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[493];
+ ((void (APIENTRY *)(GLuint index, const GLshort *v)) _func)(index, v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4Nsv)(GLuint index, const GLshort *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[493];
+ ((void (APIENTRY *)(GLuint index, const GLshort *v)) _func)(index, v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4NubARB)(GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[494];
+ ((void (APIENTRY *)(GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w)) _func)(index, x, y, z, w);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4Nub)(GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[494];
+ ((void (APIENTRY *)(GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w)) _func)(index, x, y, z, w);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4NubvARB)(GLuint index, const GLubyte *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[495];
+ ((void (APIENTRY *)(GLuint index, const GLubyte *v)) _func)(index, v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4Nubv)(GLuint index, const GLubyte *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[495];
+ ((void (APIENTRY *)(GLuint index, const GLubyte *v)) _func)(index, v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4NuivARB)(GLuint index, const GLuint *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[496];
+ ((void (APIENTRY *)(GLuint index, const GLuint *v)) _func)(index, v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4Nuiv)(GLuint index, const GLuint *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[496];
+ ((void (APIENTRY *)(GLuint index, const GLuint *v)) _func)(index, v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4NusvARB)(GLuint index, const GLushort *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[497];
+ ((void (APIENTRY *)(GLuint index, const GLushort *v)) _func)(index, v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4Nusv)(GLuint index, const GLushort *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[497];
+ ((void (APIENTRY *)(GLuint index, const GLushort *v)) _func)(index, v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4bvARB)(GLuint index, const GLbyte *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[498];
+ ((void (APIENTRY *)(GLuint index, const GLbyte *v)) _func)(index, v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4bv)(GLuint index, const GLbyte *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[498];
+ ((void (APIENTRY *)(GLuint index, const GLbyte *v)) _func)(index, v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4dARB)(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[499];
+ ((void (APIENTRY *)(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w)) _func)(index, x, y, z, w);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4d)(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[499];
+ ((void (APIENTRY *)(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w)) _func)(index, x, y, z, w);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4dvARB)(GLuint index, const GLdouble *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[500];
+ ((void (APIENTRY *)(GLuint index, const GLdouble *v)) _func)(index, v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4dv)(GLuint index, const GLdouble *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[500];
+ ((void (APIENTRY *)(GLuint index, const GLdouble *v)) _func)(index, v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4fARB)(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[501];
+ ((void (APIENTRY *)(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w)) _func)(index, x, y, z, w);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4f)(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[501];
+ ((void (APIENTRY *)(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w)) _func)(index, x, y, z, w);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4fvARB)(GLuint index, const GLfloat *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[502];
+ ((void (APIENTRY *)(GLuint index, const GLfloat *v)) _func)(index, v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4fv)(GLuint index, const GLfloat *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[502];
+ ((void (APIENTRY *)(GLuint index, const GLfloat *v)) _func)(index, v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4ivARB)(GLuint index, const GLint *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[503];
+ ((void (APIENTRY *)(GLuint index, const GLint *v)) _func)(index, v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4iv)(GLuint index, const GLint *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[503];
+ ((void (APIENTRY *)(GLuint index, const GLint *v)) _func)(index, v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4sARB)(GLuint index, GLshort x, GLshort y, GLshort z, GLshort w)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[504];
+ ((void (APIENTRY *)(GLuint index, GLshort x, GLshort y, GLshort z, GLshort w)) _func)(index, x, y, z, w);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4s)(GLuint index, GLshort x, GLshort y, GLshort z, GLshort w)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[504];
+ ((void (APIENTRY *)(GLuint index, GLshort x, GLshort y, GLshort z, GLshort w)) _func)(index, x, y, z, w);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4svARB)(GLuint index, const GLshort *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[505];
+ ((void (APIENTRY *)(GLuint index, const GLshort *v)) _func)(index, v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4sv)(GLuint index, const GLshort *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[505];
+ ((void (APIENTRY *)(GLuint index, const GLshort *v)) _func)(index, v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4ubvARB)(GLuint index, const GLubyte *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[506];
+ ((void (APIENTRY *)(GLuint index, const GLubyte *v)) _func)(index, v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4ubv)(GLuint index, const GLubyte *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[506];
+ ((void (APIENTRY *)(GLuint index, const GLubyte *v)) _func)(index, v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4uivARB)(GLuint index, const GLuint *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[507];
+ ((void (APIENTRY *)(GLuint index, const GLuint *v)) _func)(index, v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4uiv)(GLuint index, const GLuint *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[507];
+ ((void (APIENTRY *)(GLuint index, const GLuint *v)) _func)(index, v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4usvARB)(GLuint index, const GLushort *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[508];
+ ((void (APIENTRY *)(GLuint index, const GLushort *v)) _func)(index, v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4usv)(GLuint index, const GLushort *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[508];
+ ((void (APIENTRY *)(GLuint index, const GLushort *v)) _func)(index, v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribPointerARB)(GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *pointer)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[509];
+ ((void (APIENTRY *)(GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *pointer)) _func)(index, size, type, normalized, stride, pointer);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribPointer)(GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *pointer)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[509];
+ ((void (APIENTRY *)(GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *pointer)) _func)(index, size, type, normalized, stride, pointer);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(BindBufferARB)(GLenum target, GLuint buffer)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[510];
+ ((void (APIENTRY *)(GLenum target, GLuint buffer)) _func)(target, buffer);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(BindBuffer)(GLenum target, GLuint buffer)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[510];
+ ((void (APIENTRY *)(GLenum target, GLuint buffer)) _func)(target, buffer);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(BufferDataARB)(GLenum target, GLsizeiptrARB size, const GLvoid *data, GLenum usage)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[511];
+ ((void (APIENTRY *)(GLenum target, GLsizeiptrARB size, const GLvoid *data, GLenum usage)) _func)(target, size, data, usage);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(BufferData)(GLenum target, GLsizeiptr size, const GLvoid *data, GLenum usage)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[511];
+ ((void (APIENTRY *)(GLenum target, GLsizeiptr size, const GLvoid *data, GLenum usage)) _func)(target, size, data, usage);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(BufferSubDataARB)(GLenum target, GLintptrARB offset, GLsizeiptrARB size, const GLvoid *data)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[512];
+ ((void (APIENTRY *)(GLenum target, GLintptrARB offset, GLsizeiptrARB size, const GLvoid *data)) _func)(target, offset, size, data);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(BufferSubData)(GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid *data)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[512];
+ ((void (APIENTRY *)(GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid *data)) _func)(target, offset, size, data);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(DeleteBuffersARB)(GLsizei n, const GLuint *buffer)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[513];
+ ((void (APIENTRY *)(GLsizei n, const GLuint *buffer)) _func)(n, buffer);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(DeleteBuffers)(GLsizei n, const GLuint *buffer)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[513];
+ ((void (APIENTRY *)(GLsizei n, const GLuint *buffer)) _func)(n, buffer);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(GenBuffersARB)(GLsizei n, GLuint *buffer)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[514];
+ ((void (APIENTRY *)(GLsizei n, GLuint *buffer)) _func)(n, buffer);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(GenBuffers)(GLsizei n, GLuint *buffer)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[514];
+ ((void (APIENTRY *)(GLsizei n, GLuint *buffer)) _func)(n, buffer);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(GetBufferParameterivARB)(GLenum target, GLenum pname, GLint *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[515];
+ ((void (APIENTRY *)(GLenum target, GLenum pname, GLint *params)) _func)(target, pname, params);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(GetBufferParameteriv)(GLenum target, GLenum pname, GLint *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[515];
+ ((void (APIENTRY *)(GLenum target, GLenum pname, GLint *params)) _func)(target, pname, params);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(GetBufferPointervARB)(GLenum target, GLenum pname, GLvoid **params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[516];
+ ((void (APIENTRY *)(GLenum target, GLenum pname, GLvoid **params)) _func)(target, pname, params);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(GetBufferPointerv)(GLenum target, GLenum pname, GLvoid **params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[516];
+ ((void (APIENTRY *)(GLenum target, GLenum pname, GLvoid **params)) _func)(target, pname, params);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(GetBufferSubDataARB)(GLenum target, GLintptrARB offset, GLsizeiptrARB size, GLvoid *data)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[517];
+ ((void (APIENTRY *)(GLenum target, GLintptrARB offset, GLsizeiptrARB size, GLvoid *data)) _func)(target, offset, size, data);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(GetBufferSubData)(GLenum target, GLintptr offset, GLsizeiptr size, GLvoid *data)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[517];
+ ((void (APIENTRY *)(GLenum target, GLintptr offset, GLsizeiptr size, GLvoid *data)) _func)(target, offset, size, data);
+}
+
+GLAPI GLboolean APIENTRY GLAPI_PREFIX(IsBufferARB)(GLuint buffer)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[518];
+ return ((GLboolean (APIENTRY *)(GLuint buffer)) _func)(buffer);
+}
+
+GLAPI GLboolean APIENTRY GLAPI_PREFIX(IsBuffer)(GLuint buffer)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[518];
+ return ((GLboolean (APIENTRY *)(GLuint buffer)) _func)(buffer);
+}
+
+GLAPI GLvoid * APIENTRY GLAPI_PREFIX(MapBufferARB)(GLenum target, GLenum access)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[519];
+ return ((GLvoid * (APIENTRY *)(GLenum target, GLenum access)) _func)(target, access);
+}
+
+GLAPI GLvoid * APIENTRY GLAPI_PREFIX(MapBuffer)(GLenum target, GLenum access)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[519];
+ return ((GLvoid * (APIENTRY *)(GLenum target, GLenum access)) _func)(target, access);
+}
+
+GLAPI GLboolean APIENTRY GLAPI_PREFIX(UnmapBufferARB)(GLenum target)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[520];
+ return ((GLboolean (APIENTRY *)(GLenum target)) _func)(target);
+}
+
+GLAPI GLboolean APIENTRY GLAPI_PREFIX(UnmapBuffer)(GLenum target)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[520];
+ return ((GLboolean (APIENTRY *)(GLenum target)) _func)(target);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(BeginQueryARB)(GLenum target, GLuint id)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[521];
+ ((void (APIENTRY *)(GLenum target, GLuint id)) _func)(target, id);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(BeginQuery)(GLenum target, GLuint id)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[521];
+ ((void (APIENTRY *)(GLenum target, GLuint id)) _func)(target, id);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(DeleteQueriesARB)(GLsizei n, const GLuint *ids)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[522];
+ ((void (APIENTRY *)(GLsizei n, const GLuint *ids)) _func)(n, ids);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(DeleteQueries)(GLsizei n, const GLuint *ids)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[522];
+ ((void (APIENTRY *)(GLsizei n, const GLuint *ids)) _func)(n, ids);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(EndQueryARB)(GLenum target)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[523];
+ ((void (APIENTRY *)(GLenum target)) _func)(target);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(EndQuery)(GLenum target)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[523];
+ ((void (APIENTRY *)(GLenum target)) _func)(target);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(GenQueriesARB)(GLsizei n, GLuint *ids)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[524];
+ ((void (APIENTRY *)(GLsizei n, GLuint *ids)) _func)(n, ids);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(GenQueries)(GLsizei n, GLuint *ids)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[524];
+ ((void (APIENTRY *)(GLsizei n, GLuint *ids)) _func)(n, ids);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(GetQueryObjectivARB)(GLuint id, GLenum pname, GLint *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[525];
+ ((void (APIENTRY *)(GLuint id, GLenum pname, GLint *params)) _func)(id, pname, params);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(GetQueryObjectiv)(GLuint id, GLenum pname, GLint *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[525];
+ ((void (APIENTRY *)(GLuint id, GLenum pname, GLint *params)) _func)(id, pname, params);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(GetQueryObjectuivARB)(GLuint id, GLenum pname, GLuint *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[526];
+ ((void (APIENTRY *)(GLuint id, GLenum pname, GLuint *params)) _func)(id, pname, params);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(GetQueryObjectuiv)(GLuint id, GLenum pname, GLuint *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[526];
+ ((void (APIENTRY *)(GLuint id, GLenum pname, GLuint *params)) _func)(id, pname, params);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(GetQueryivARB)(GLenum target, GLenum pname, GLint *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[527];
+ ((void (APIENTRY *)(GLenum target, GLenum pname, GLint *params)) _func)(target, pname, params);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(GetQueryiv)(GLenum target, GLenum pname, GLint *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[527];
+ ((void (APIENTRY *)(GLenum target, GLenum pname, GLint *params)) _func)(target, pname, params);
+}
+
+GLAPI GLboolean APIENTRY GLAPI_PREFIX(IsQueryARB)(GLuint id)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[528];
+ return ((GLboolean (APIENTRY *)(GLuint id)) _func)(id);
+}
+
+GLAPI GLboolean APIENTRY GLAPI_PREFIX(IsQuery)(GLuint id)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[528];
+ return ((GLboolean (APIENTRY *)(GLuint id)) _func)(id);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(AttachObjectARB)(GLhandleARB containerObj, GLhandleARB obj)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[529];
+ ((void (APIENTRY *)(GLhandleARB containerObj, GLhandleARB obj)) _func)(containerObj, obj);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(CompileShaderARB)(GLhandleARB shader)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[530];
+ ((void (APIENTRY *)(GLhandleARB shader)) _func)(shader);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(CompileShader)(GLuint shader)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[530];
+ ((void (APIENTRY *)(GLuint shader)) _func)(shader);
+}
+
+GLAPI GLhandleARB APIENTRY GLAPI_PREFIX(CreateProgramObjectARB)(void)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[531];
+ return ((GLhandleARB (APIENTRY *)(void)) _func)();
+}
+
+GLAPI GLhandleARB APIENTRY GLAPI_PREFIX(CreateShaderObjectARB)(GLenum shaderType)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[532];
+ return ((GLhandleARB (APIENTRY *)(GLenum shaderType)) _func)(shaderType);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(DeleteObjectARB)(GLhandleARB obj)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[533];
+ ((void (APIENTRY *)(GLhandleARB obj)) _func)(obj);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(DetachObjectARB)(GLhandleARB containerObj, GLhandleARB attachedObj)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[534];
+ ((void (APIENTRY *)(GLhandleARB containerObj, GLhandleARB attachedObj)) _func)(containerObj, attachedObj);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(GetActiveUniformARB)(GLhandleARB program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[535];
+ ((void (APIENTRY *)(GLhandleARB program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name)) _func)(program, index, bufSize, length, size, type, name);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(GetActiveUniform)(GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[535];
+ ((void (APIENTRY *)(GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name)) _func)(program, index, bufSize, length, size, type, name);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(GetAttachedObjectsARB)(GLhandleARB containerObj, GLsizei maxLength, GLsizei *length, GLhandleARB *infoLog)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[536];
+ ((void (APIENTRY *)(GLhandleARB containerObj, GLsizei maxLength, GLsizei *length, GLhandleARB *infoLog)) _func)(containerObj, maxLength, length, infoLog);
+}
+
+GLAPI GLhandleARB APIENTRY GLAPI_PREFIX(GetHandleARB)(GLenum pname)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[537];
+ return ((GLhandleARB (APIENTRY *)(GLenum pname)) _func)(pname);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(GetInfoLogARB)(GLhandleARB obj, GLsizei maxLength, GLsizei *length, GLcharARB *infoLog)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[538];
+ ((void (APIENTRY *)(GLhandleARB obj, GLsizei maxLength, GLsizei *length, GLcharARB *infoLog)) _func)(obj, maxLength, length, infoLog);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(GetObjectParameterfvARB)(GLhandleARB obj, GLenum pname, GLfloat *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[539];
+ ((void (APIENTRY *)(GLhandleARB obj, GLenum pname, GLfloat *params)) _func)(obj, pname, params);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(GetObjectParameterivARB)(GLhandleARB obj, GLenum pname, GLint *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[540];
+ ((void (APIENTRY *)(GLhandleARB obj, GLenum pname, GLint *params)) _func)(obj, pname, params);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(GetShaderSourceARB)(GLhandleARB shader, GLsizei bufSize, GLsizei *length, GLcharARB *source)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[541];
+ ((void (APIENTRY *)(GLhandleARB shader, GLsizei bufSize, GLsizei *length, GLcharARB *source)) _func)(shader, bufSize, length, source);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(GetShaderSource)(GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[541];
+ ((void (APIENTRY *)(GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source)) _func)(shader, bufSize, length, source);
+}
+
+GLAPI GLint APIENTRY GLAPI_PREFIX(GetUniformLocationARB)(GLhandleARB program, const GLcharARB *name)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[542];
+ return ((GLint (APIENTRY *)(GLhandleARB program, const GLcharARB *name)) _func)(program, name);
+}
+
+GLAPI GLint APIENTRY GLAPI_PREFIX(GetUniformLocation)(GLuint program, const GLchar *name)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[542];
+ return ((GLint (APIENTRY *)(GLuint program, const GLchar *name)) _func)(program, name);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(GetUniformfvARB)(GLhandleARB program, GLint location, GLfloat *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[543];
+ ((void (APIENTRY *)(GLhandleARB program, GLint location, GLfloat *params)) _func)(program, location, params);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(GetUniformfv)(GLuint program, GLint location, GLfloat *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[543];
+ ((void (APIENTRY *)(GLuint program, GLint location, GLfloat *params)) _func)(program, location, params);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(GetUniformivARB)(GLhandleARB program, GLint location, GLint *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[544];
+ ((void (APIENTRY *)(GLhandleARB program, GLint location, GLint *params)) _func)(program, location, params);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(GetUniformiv)(GLuint program, GLint location, GLint *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[544];
+ ((void (APIENTRY *)(GLuint program, GLint location, GLint *params)) _func)(program, location, params);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(LinkProgramARB)(GLhandleARB program)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[545];
+ ((void (APIENTRY *)(GLhandleARB program)) _func)(program);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(LinkProgram)(GLuint program)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[545];
+ ((void (APIENTRY *)(GLuint program)) _func)(program);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(ShaderSourceARB)(GLhandleARB shader, GLsizei count, const GLcharARB **string, const GLint *length)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[546];
+ ((void (APIENTRY *)(GLhandleARB shader, GLsizei count, const GLcharARB **string, const GLint *length)) _func)(shader, count, string, length);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(ShaderSource)(GLuint shader, GLsizei count, const GLchar **string, const GLint *length)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[546];
+ ((void (APIENTRY *)(GLuint shader, GLsizei count, const GLchar **string, const GLint *length)) _func)(shader, count, string, length);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Uniform1fARB)(GLint location, GLfloat v0)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[547];
+ ((void (APIENTRY *)(GLint location, GLfloat v0)) _func)(location, v0);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Uniform1f)(GLint location, GLfloat v0)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[547];
+ ((void (APIENTRY *)(GLint location, GLfloat v0)) _func)(location, v0);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Uniform1fvARB)(GLint location, GLsizei count, const GLfloat *value)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[548];
+ ((void (APIENTRY *)(GLint location, GLsizei count, const GLfloat *value)) _func)(location, count, value);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Uniform1fv)(GLint location, GLsizei count, const GLfloat *value)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[548];
+ ((void (APIENTRY *)(GLint location, GLsizei count, const GLfloat *value)) _func)(location, count, value);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Uniform1iARB)(GLint location, GLint v0)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[549];
+ ((void (APIENTRY *)(GLint location, GLint v0)) _func)(location, v0);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Uniform1i)(GLint location, GLint v0)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[549];
+ ((void (APIENTRY *)(GLint location, GLint v0)) _func)(location, v0);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Uniform1ivARB)(GLint location, GLsizei count, const GLint *value)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[550];
+ ((void (APIENTRY *)(GLint location, GLsizei count, const GLint *value)) _func)(location, count, value);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Uniform1iv)(GLint location, GLsizei count, const GLint *value)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[550];
+ ((void (APIENTRY *)(GLint location, GLsizei count, const GLint *value)) _func)(location, count, value);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Uniform2fARB)(GLint location, GLfloat v0, GLfloat v1)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[551];
+ ((void (APIENTRY *)(GLint location, GLfloat v0, GLfloat v1)) _func)(location, v0, v1);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Uniform2f)(GLint location, GLfloat v0, GLfloat v1)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[551];
+ ((void (APIENTRY *)(GLint location, GLfloat v0, GLfloat v1)) _func)(location, v0, v1);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Uniform2fvARB)(GLint location, GLsizei count, const GLfloat *value)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[552];
+ ((void (APIENTRY *)(GLint location, GLsizei count, const GLfloat *value)) _func)(location, count, value);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Uniform2fv)(GLint location, GLsizei count, const GLfloat *value)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[552];
+ ((void (APIENTRY *)(GLint location, GLsizei count, const GLfloat *value)) _func)(location, count, value);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Uniform2iARB)(GLint location, GLint v0, GLint v1)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[553];
+ ((void (APIENTRY *)(GLint location, GLint v0, GLint v1)) _func)(location, v0, v1);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Uniform2i)(GLint location, GLint v0, GLint v1)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[553];
+ ((void (APIENTRY *)(GLint location, GLint v0, GLint v1)) _func)(location, v0, v1);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Uniform2ivARB)(GLint location, GLsizei count, const GLint *value)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[554];
+ ((void (APIENTRY *)(GLint location, GLsizei count, const GLint *value)) _func)(location, count, value);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Uniform2iv)(GLint location, GLsizei count, const GLint *value)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[554];
+ ((void (APIENTRY *)(GLint location, GLsizei count, const GLint *value)) _func)(location, count, value);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Uniform3fARB)(GLint location, GLfloat v0, GLfloat v1, GLfloat v2)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[555];
+ ((void (APIENTRY *)(GLint location, GLfloat v0, GLfloat v1, GLfloat v2)) _func)(location, v0, v1, v2);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Uniform3f)(GLint location, GLfloat v0, GLfloat v1, GLfloat v2)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[555];
+ ((void (APIENTRY *)(GLint location, GLfloat v0, GLfloat v1, GLfloat v2)) _func)(location, v0, v1, v2);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Uniform3fvARB)(GLint location, GLsizei count, const GLfloat *value)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[556];
+ ((void (APIENTRY *)(GLint location, GLsizei count, const GLfloat *value)) _func)(location, count, value);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Uniform3fv)(GLint location, GLsizei count, const GLfloat *value)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[556];
+ ((void (APIENTRY *)(GLint location, GLsizei count, const GLfloat *value)) _func)(location, count, value);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Uniform3iARB)(GLint location, GLint v0, GLint v1, GLint v2)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[557];
+ ((void (APIENTRY *)(GLint location, GLint v0, GLint v1, GLint v2)) _func)(location, v0, v1, v2);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Uniform3i)(GLint location, GLint v0, GLint v1, GLint v2)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[557];
+ ((void (APIENTRY *)(GLint location, GLint v0, GLint v1, GLint v2)) _func)(location, v0, v1, v2);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Uniform3ivARB)(GLint location, GLsizei count, const GLint *value)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[558];
+ ((void (APIENTRY *)(GLint location, GLsizei count, const GLint *value)) _func)(location, count, value);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Uniform3iv)(GLint location, GLsizei count, const GLint *value)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[558];
+ ((void (APIENTRY *)(GLint location, GLsizei count, const GLint *value)) _func)(location, count, value);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Uniform4fARB)(GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[559];
+ ((void (APIENTRY *)(GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3)) _func)(location, v0, v1, v2, v3);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Uniform4f)(GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[559];
+ ((void (APIENTRY *)(GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3)) _func)(location, v0, v1, v2, v3);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Uniform4fvARB)(GLint location, GLsizei count, const GLfloat *value)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[560];
+ ((void (APIENTRY *)(GLint location, GLsizei count, const GLfloat *value)) _func)(location, count, value);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Uniform4fv)(GLint location, GLsizei count, const GLfloat *value)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[560];
+ ((void (APIENTRY *)(GLint location, GLsizei count, const GLfloat *value)) _func)(location, count, value);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Uniform4iARB)(GLint location, GLint v0, GLint v1, GLint v2, GLint v3)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[561];
+ ((void (APIENTRY *)(GLint location, GLint v0, GLint v1, GLint v2, GLint v3)) _func)(location, v0, v1, v2, v3);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Uniform4i)(GLint location, GLint v0, GLint v1, GLint v2, GLint v3)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[561];
+ ((void (APIENTRY *)(GLint location, GLint v0, GLint v1, GLint v2, GLint v3)) _func)(location, v0, v1, v2, v3);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Uniform4ivARB)(GLint location, GLsizei count, const GLint *value)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[562];
+ ((void (APIENTRY *)(GLint location, GLsizei count, const GLint *value)) _func)(location, count, value);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Uniform4iv)(GLint location, GLsizei count, const GLint *value)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[562];
+ ((void (APIENTRY *)(GLint location, GLsizei count, const GLint *value)) _func)(location, count, value);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(UniformMatrix2fvARB)(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[563];
+ ((void (APIENTRY *)(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)) _func)(location, count, transpose, value);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(UniformMatrix2fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[563];
+ ((void (APIENTRY *)(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)) _func)(location, count, transpose, value);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(UniformMatrix3fvARB)(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[564];
+ ((void (APIENTRY *)(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)) _func)(location, count, transpose, value);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(UniformMatrix3fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[564];
+ ((void (APIENTRY *)(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)) _func)(location, count, transpose, value);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(UniformMatrix4fvARB)(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[565];
+ ((void (APIENTRY *)(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)) _func)(location, count, transpose, value);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(UniformMatrix4fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[565];
+ ((void (APIENTRY *)(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)) _func)(location, count, transpose, value);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(UseProgramObjectARB)(GLhandleARB program)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[566];
+ ((void (APIENTRY *)(GLhandleARB program)) _func)(program);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(UseProgram)(GLuint program)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[566];
+ ((void (APIENTRY *)(GLuint program)) _func)(program);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(ValidateProgramARB)(GLhandleARB program)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[567];
+ ((void (APIENTRY *)(GLhandleARB program)) _func)(program);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(ValidateProgram)(GLuint program)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[567];
+ ((void (APIENTRY *)(GLuint program)) _func)(program);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(BindAttribLocationARB)(GLhandleARB program, GLuint index, const GLcharARB *name)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[568];
+ ((void (APIENTRY *)(GLhandleARB program, GLuint index, const GLcharARB *name)) _func)(program, index, name);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(BindAttribLocation)(GLuint program, GLuint index, const GLchar *name)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[568];
+ ((void (APIENTRY *)(GLuint program, GLuint index, const GLchar *name)) _func)(program, index, name);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(GetActiveAttribARB)(GLhandleARB program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[569];
+ ((void (APIENTRY *)(GLhandleARB program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name)) _func)(program, index, bufSize, length, size, type, name);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(GetActiveAttrib)(GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[569];
+ ((void (APIENTRY *)(GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name)) _func)(program, index, bufSize, length, size, type, name);
+}
+
+GLAPI GLint APIENTRY GLAPI_PREFIX(GetAttribLocationARB)(GLhandleARB program, const GLcharARB *name)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[570];
+ return ((GLint (APIENTRY *)(GLhandleARB program, const GLcharARB *name)) _func)(program, name);
+}
+
+GLAPI GLint APIENTRY GLAPI_PREFIX(GetAttribLocation)(GLuint program, const GLchar *name)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[570];
+ return ((GLint (APIENTRY *)(GLuint program, const GLchar *name)) _func)(program, name);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(DrawBuffersARB)(GLsizei n, const GLenum *bufs)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[571];
+ ((void (APIENTRY *)(GLsizei n, const GLenum *bufs)) _func)(n, bufs);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(DrawBuffers)(GLsizei n, const GLenum *bufs)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[571];
+ ((void (APIENTRY *)(GLsizei n, const GLenum *bufs)) _func)(n, bufs);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(DrawBuffersATI)(GLsizei n, const GLenum *bufs)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[571];
+ ((void (APIENTRY *)(GLsizei n, const GLenum *bufs)) _func)(n, bufs);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(DrawArraysInstancedARB)(GLenum mode, GLint first, GLsizei count, GLsizei primcount)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[572];
+ ((void (APIENTRY *)(GLenum mode, GLint first, GLsizei count, GLsizei primcount)) _func)(mode, first, count, primcount);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(DrawArraysInstanced)(GLenum mode, GLint first, GLsizei count, GLsizei primcount)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[572];
+ ((void (APIENTRY *)(GLenum mode, GLint first, GLsizei count, GLsizei primcount)) _func)(mode, first, count, primcount);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(DrawArraysInstancedEXT)(GLenum mode, GLint first, GLsizei count, GLsizei primcount)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[572];
+ ((void (APIENTRY *)(GLenum mode, GLint first, GLsizei count, GLsizei primcount)) _func)(mode, first, count, primcount);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(DrawElementsInstancedARB)(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[573];
+ ((void (APIENTRY *)(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount)) _func)(mode, count, type, indices, primcount);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(DrawElementsInstanced)(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[573];
+ ((void (APIENTRY *)(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount)) _func)(mode, count, type, indices, primcount);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(DrawElementsInstancedEXT)(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[573];
+ ((void (APIENTRY *)(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount)) _func)(mode, count, type, indices, primcount);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(RenderbufferStorageMultisample)(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[574];
+ ((void (APIENTRY *)(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height)) _func)(target, samples, internalformat, width, height);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(RenderbufferStorageMultisampleEXT)(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[574];
+ ((void (APIENTRY *)(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height)) _func)(target, samples, internalformat, width, height);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(FramebufferTextureARB)(GLenum target, GLenum attachment, GLuint texture, GLint level)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[575];
+ ((void (APIENTRY *)(GLenum target, GLenum attachment, GLuint texture, GLint level)) _func)(target, attachment, texture, level);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(FramebufferTextureFaceARB)(GLenum target, GLenum attachment, GLuint texture, GLint level, GLenum face)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[576];
+ ((void (APIENTRY *)(GLenum target, GLenum attachment, GLuint texture, GLint level, GLenum face)) _func)(target, attachment, texture, level, face);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(ProgramParameteriARB)(GLuint program, GLenum pname, GLint value)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[577];
+ ((void (APIENTRY *)(GLuint program, GLenum pname, GLint value)) _func)(program, pname, value);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribDivisorARB)(GLuint index, GLuint divisor)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[578];
+ ((void (APIENTRY *)(GLuint index, GLuint divisor)) _func)(index, divisor);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(FlushMappedBufferRange)(GLenum target, GLintptr offset, GLsizeiptr length)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[579];
+ ((void (APIENTRY *)(GLenum target, GLintptr offset, GLsizeiptr length)) _func)(target, offset, length);
+}
+
+GLAPI GLvoid * APIENTRY GLAPI_PREFIX(MapBufferRange)(GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[580];
+ return ((GLvoid * (APIENTRY *)(GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access)) _func)(target, offset, length, access);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(BindVertexArray)(GLuint array)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[581];
+ ((void (APIENTRY *)(GLuint array)) _func)(array);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(GenVertexArrays)(GLsizei n, GLuint *arrays)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[582];
+ ((void (APIENTRY *)(GLsizei n, GLuint *arrays)) _func)(n, arrays);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(CopyBufferSubData)(GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[583];
+ ((void (APIENTRY *)(GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size)) _func)(readTarget, writeTarget, readOffset, writeOffset, size);
+}
+
+GLAPI GLenum APIENTRY GLAPI_PREFIX(ClientWaitSync)(GLsync sync, GLbitfield flags, GLuint64 timeout)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[584];
+ return ((GLenum (APIENTRY *)(GLsync sync, GLbitfield flags, GLuint64 timeout)) _func)(sync, flags, timeout);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(DeleteSync)(GLsync sync)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[585];
+ ((void (APIENTRY *)(GLsync sync)) _func)(sync);
+}
+
+GLAPI GLsync APIENTRY GLAPI_PREFIX(FenceSync)(GLenum condition, GLbitfield flags)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[586];
+ return ((GLsync (APIENTRY *)(GLenum condition, GLbitfield flags)) _func)(condition, flags);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(GetInteger64v)(GLenum pname, GLint64 *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[587];
+ ((void (APIENTRY *)(GLenum pname, GLint64 *params)) _func)(pname, params);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(GetSynciv)(GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[588];
+ ((void (APIENTRY *)(GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values)) _func)(sync, pname, bufSize, length, values);
+}
+
+GLAPI GLboolean APIENTRY GLAPI_PREFIX(IsSync)(GLsync sync)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[589];
+ return ((GLboolean (APIENTRY *)(GLsync sync)) _func)(sync);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(WaitSync)(GLsync sync, GLbitfield flags, GLuint64 timeout)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[590];
+ ((void (APIENTRY *)(GLsync sync, GLbitfield flags, GLuint64 timeout)) _func)(sync, flags, timeout);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(DrawElementsBaseVertex)(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLint basevertex)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[591];
+ ((void (APIENTRY *)(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLint basevertex)) _func)(mode, count, type, indices, basevertex);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(DrawRangeElementsBaseVertex)(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices, GLint basevertex)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[592];
+ ((void (APIENTRY *)(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices, GLint basevertex)) _func)(mode, start, end, count, type, indices, basevertex);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(MultiDrawElementsBaseVertex)(GLenum mode, const GLsizei *count, GLenum type, const GLvoid **indices, GLsizei primcount, const GLint *basevertex)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[593];
+ ((void (APIENTRY *)(GLenum mode, const GLsizei *count, GLenum type, const GLvoid **indices, GLsizei primcount, const GLint *basevertex)) _func)(mode, count, type, indices, primcount, basevertex);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(BlendEquationSeparateiARB)(GLuint buf, GLenum modeRGB, GLenum modeA)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[594];
+ ((void (APIENTRY *)(GLuint buf, GLenum modeRGB, GLenum modeA)) _func)(buf, modeRGB, modeA);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(BlendEquationiARB)(GLuint buf, GLenum mode)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[595];
+ ((void (APIENTRY *)(GLuint buf, GLenum mode)) _func)(buf, mode);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(BlendFuncSeparateiARB)(GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcA, GLenum dstA)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[596];
+ ((void (APIENTRY *)(GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcA, GLenum dstA)) _func)(buf, srcRGB, dstRGB, srcA, dstA);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(BlendFunciARB)(GLuint buf, GLenum src, GLenum dst)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[597];
+ ((void (APIENTRY *)(GLuint buf, GLenum src, GLenum dst)) _func)(buf, src, dst);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(BindTransformFeedback)(GLenum target, GLuint id)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[598];
+ ((void (APIENTRY *)(GLenum target, GLuint id)) _func)(target, id);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(DeleteTransformFeedbacks)(GLsizei n, const GLuint *ids)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[599];
+ ((void (APIENTRY *)(GLsizei n, const GLuint *ids)) _func)(n, ids);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(DrawTransformFeedback)(GLenum mode, GLuint id)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[600];
+ ((void (APIENTRY *)(GLenum mode, GLuint id)) _func)(mode, id);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(GenTransformFeedbacks)(GLsizei n, GLuint *ids)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[601];
+ ((void (APIENTRY *)(GLsizei n, GLuint *ids)) _func)(n, ids);
+}
+
+GLAPI GLboolean APIENTRY GLAPI_PREFIX(IsTransformFeedback)(GLuint id)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[602];
+ return ((GLboolean (APIENTRY *)(GLuint id)) _func)(id);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(PauseTransformFeedback)(void)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[603];
+ ((void (APIENTRY *)(void)) _func)();
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(ResumeTransformFeedback)(void)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[604];
+ ((void (APIENTRY *)(void)) _func)();
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(ClearDepthf)(GLclampf depth)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[605];
+ ((void (APIENTRY *)(GLclampf depth)) _func)(depth);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(DepthRangef)(GLclampf zNear, GLclampf zFar)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[606];
+ ((void (APIENTRY *)(GLclampf zNear, GLclampf zFar)) _func)(zNear, zFar);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(GetShaderPrecisionFormat)(GLenum shadertype, GLenum precisiontype, GLint *range, GLint *precision)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[607];
+ ((void (APIENTRY *)(GLenum shadertype, GLenum precisiontype, GLint *range, GLint *precision)) _func)(shadertype, precisiontype, range, precision);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(ReleaseShaderCompiler)(void)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[608];
+ ((void (APIENTRY *)(void)) _func)();
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(ShaderBinary)(GLsizei n, const GLuint *shaders, GLenum binaryformat, const GLvoid *binary, GLsizei length)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[609];
+ ((void (APIENTRY *)(GLsizei n, const GLuint *shaders, GLenum binaryformat, const GLvoid *binary, GLsizei length)) _func)(n, shaders, binaryformat, binary, length);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(PolygonOffsetEXT)(GLfloat factor, GLfloat bias)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[613];
+ ((void (APIENTRY *)(GLfloat factor, GLfloat bias)) _func)(factor, bias);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(ColorPointerEXT)(GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[632];
+ ((void (APIENTRY *)(GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer)) _func)(size, type, stride, count, pointer);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(EdgeFlagPointerEXT)(GLsizei stride, GLsizei count, const GLboolean *pointer)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[633];
+ ((void (APIENTRY *)(GLsizei stride, GLsizei count, const GLboolean *pointer)) _func)(stride, count, pointer);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(IndexPointerEXT)(GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[634];
+ ((void (APIENTRY *)(GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer)) _func)(type, stride, count, pointer);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(NormalPointerEXT)(GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[635];
+ ((void (APIENTRY *)(GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer)) _func)(type, stride, count, pointer);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(TexCoordPointerEXT)(GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[636];
+ ((void (APIENTRY *)(GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer)) _func)(size, type, stride, count, pointer);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexPointerEXT)(GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[637];
+ ((void (APIENTRY *)(GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer)) _func)(size, type, stride, count, pointer);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(PointParameterfEXT)(GLenum pname, GLfloat param)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[638];
+ ((void (APIENTRY *)(GLenum pname, GLfloat param)) _func)(pname, param);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(PointParameterf)(GLenum pname, GLfloat param)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[638];
+ ((void (APIENTRY *)(GLenum pname, GLfloat param)) _func)(pname, param);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(PointParameterfARB)(GLenum pname, GLfloat param)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[638];
+ ((void (APIENTRY *)(GLenum pname, GLfloat param)) _func)(pname, param);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(PointParameterfvEXT)(GLenum pname, const GLfloat *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[639];
+ ((void (APIENTRY *)(GLenum pname, const GLfloat *params)) _func)(pname, params);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(PointParameterfv)(GLenum pname, const GLfloat *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[639];
+ ((void (APIENTRY *)(GLenum pname, const GLfloat *params)) _func)(pname, params);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(PointParameterfvARB)(GLenum pname, const GLfloat *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[639];
+ ((void (APIENTRY *)(GLenum pname, const GLfloat *params)) _func)(pname, params);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(LockArraysEXT)(GLint first, GLsizei count)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[640];
+ ((void (APIENTRY *)(GLint first, GLsizei count)) _func)(first, count);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(UnlockArraysEXT)(void)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[641];
+ ((void (APIENTRY *)(void)) _func)();
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(SecondaryColor3bEXT)(GLbyte red, GLbyte green, GLbyte blue)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[642];
+ ((void (APIENTRY *)(GLbyte red, GLbyte green, GLbyte blue)) _func)(red, green, blue);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(SecondaryColor3b)(GLbyte red, GLbyte green, GLbyte blue)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[642];
+ ((void (APIENTRY *)(GLbyte red, GLbyte green, GLbyte blue)) _func)(red, green, blue);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(SecondaryColor3bvEXT)(const GLbyte *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[643];
+ ((void (APIENTRY *)(const GLbyte *v)) _func)(v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(SecondaryColor3bv)(const GLbyte *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[643];
+ ((void (APIENTRY *)(const GLbyte *v)) _func)(v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(SecondaryColor3dEXT)(GLdouble red, GLdouble green, GLdouble blue)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[644];
+ ((void (APIENTRY *)(GLdouble red, GLdouble green, GLdouble blue)) _func)(red, green, blue);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(SecondaryColor3d)(GLdouble red, GLdouble green, GLdouble blue)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[644];
+ ((void (APIENTRY *)(GLdouble red, GLdouble green, GLdouble blue)) _func)(red, green, blue);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(SecondaryColor3dvEXT)(const GLdouble *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[645];
+ ((void (APIENTRY *)(const GLdouble *v)) _func)(v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(SecondaryColor3dv)(const GLdouble *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[645];
+ ((void (APIENTRY *)(const GLdouble *v)) _func)(v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(SecondaryColor3fEXT)(GLfloat red, GLfloat green, GLfloat blue)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[646];
+ ((void (APIENTRY *)(GLfloat red, GLfloat green, GLfloat blue)) _func)(red, green, blue);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(SecondaryColor3f)(GLfloat red, GLfloat green, GLfloat blue)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[646];
+ ((void (APIENTRY *)(GLfloat red, GLfloat green, GLfloat blue)) _func)(red, green, blue);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(SecondaryColor3fvEXT)(const GLfloat *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[647];
+ ((void (APIENTRY *)(const GLfloat *v)) _func)(v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(SecondaryColor3fv)(const GLfloat *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[647];
+ ((void (APIENTRY *)(const GLfloat *v)) _func)(v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(SecondaryColor3iEXT)(GLint red, GLint green, GLint blue)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[648];
+ ((void (APIENTRY *)(GLint red, GLint green, GLint blue)) _func)(red, green, blue);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(SecondaryColor3i)(GLint red, GLint green, GLint blue)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[648];
+ ((void (APIENTRY *)(GLint red, GLint green, GLint blue)) _func)(red, green, blue);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(SecondaryColor3ivEXT)(const GLint *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[649];
+ ((void (APIENTRY *)(const GLint *v)) _func)(v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(SecondaryColor3iv)(const GLint *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[649];
+ ((void (APIENTRY *)(const GLint *v)) _func)(v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(SecondaryColor3sEXT)(GLshort red, GLshort green, GLshort blue)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[650];
+ ((void (APIENTRY *)(GLshort red, GLshort green, GLshort blue)) _func)(red, green, blue);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(SecondaryColor3s)(GLshort red, GLshort green, GLshort blue)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[650];
+ ((void (APIENTRY *)(GLshort red, GLshort green, GLshort blue)) _func)(red, green, blue);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(SecondaryColor3svEXT)(const GLshort *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[651];
+ ((void (APIENTRY *)(const GLshort *v)) _func)(v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(SecondaryColor3sv)(const GLshort *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[651];
+ ((void (APIENTRY *)(const GLshort *v)) _func)(v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(SecondaryColor3ubEXT)(GLubyte red, GLubyte green, GLubyte blue)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[652];
+ ((void (APIENTRY *)(GLubyte red, GLubyte green, GLubyte blue)) _func)(red, green, blue);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(SecondaryColor3ub)(GLubyte red, GLubyte green, GLubyte blue)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[652];
+ ((void (APIENTRY *)(GLubyte red, GLubyte green, GLubyte blue)) _func)(red, green, blue);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(SecondaryColor3ubvEXT)(const GLubyte *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[653];
+ ((void (APIENTRY *)(const GLubyte *v)) _func)(v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(SecondaryColor3ubv)(const GLubyte *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[653];
+ ((void (APIENTRY *)(const GLubyte *v)) _func)(v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(SecondaryColor3uiEXT)(GLuint red, GLuint green, GLuint blue)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[654];
+ ((void (APIENTRY *)(GLuint red, GLuint green, GLuint blue)) _func)(red, green, blue);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(SecondaryColor3ui)(GLuint red, GLuint green, GLuint blue)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[654];
+ ((void (APIENTRY *)(GLuint red, GLuint green, GLuint blue)) _func)(red, green, blue);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(SecondaryColor3uivEXT)(const GLuint *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[655];
+ ((void (APIENTRY *)(const GLuint *v)) _func)(v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(SecondaryColor3uiv)(const GLuint *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[655];
+ ((void (APIENTRY *)(const GLuint *v)) _func)(v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(SecondaryColor3usEXT)(GLushort red, GLushort green, GLushort blue)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[656];
+ ((void (APIENTRY *)(GLushort red, GLushort green, GLushort blue)) _func)(red, green, blue);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(SecondaryColor3us)(GLushort red, GLushort green, GLushort blue)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[656];
+ ((void (APIENTRY *)(GLushort red, GLushort green, GLushort blue)) _func)(red, green, blue);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(SecondaryColor3usvEXT)(const GLushort *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[657];
+ ((void (APIENTRY *)(const GLushort *v)) _func)(v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(SecondaryColor3usv)(const GLushort *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[657];
+ ((void (APIENTRY *)(const GLushort *v)) _func)(v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(SecondaryColorPointerEXT)(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[658];
+ ((void (APIENTRY *)(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer)) _func)(size, type, stride, pointer);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(SecondaryColorPointer)(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[658];
+ ((void (APIENTRY *)(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer)) _func)(size, type, stride, pointer);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(MultiDrawArraysEXT)(GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[659];
+ ((void (APIENTRY *)(GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount)) _func)(mode, first, count, primcount);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(MultiDrawArrays)(GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[659];
+ ((void (APIENTRY *)(GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount)) _func)(mode, first, count, primcount);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(MultiDrawElementsEXT)(GLenum mode, const GLsizei *count, GLenum type, const GLvoid **indices, GLsizei primcount)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[660];
+ ((void (APIENTRY *)(GLenum mode, const GLsizei *count, GLenum type, const GLvoid **indices, GLsizei primcount)) _func)(mode, count, type, indices, primcount);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(MultiDrawElements)(GLenum mode, const GLsizei *count, GLenum type, const GLvoid **indices, GLsizei primcount)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[660];
+ ((void (APIENTRY *)(GLenum mode, const GLsizei *count, GLenum type, const GLvoid **indices, GLsizei primcount)) _func)(mode, count, type, indices, primcount);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(FogCoordPointerEXT)(GLenum type, GLsizei stride, const GLvoid *pointer)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[661];
+ ((void (APIENTRY *)(GLenum type, GLsizei stride, const GLvoid *pointer)) _func)(type, stride, pointer);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(FogCoordPointer)(GLenum type, GLsizei stride, const GLvoid *pointer)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[661];
+ ((void (APIENTRY *)(GLenum type, GLsizei stride, const GLvoid *pointer)) _func)(type, stride, pointer);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(FogCoorddEXT)(GLdouble coord)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[662];
+ ((void (APIENTRY *)(GLdouble coord)) _func)(coord);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(FogCoordd)(GLdouble coord)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[662];
+ ((void (APIENTRY *)(GLdouble coord)) _func)(coord);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(FogCoorddvEXT)(const GLdouble *coord)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[663];
+ ((void (APIENTRY *)(const GLdouble *coord)) _func)(coord);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(FogCoorddv)(const GLdouble *coord)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[663];
+ ((void (APIENTRY *)(const GLdouble *coord)) _func)(coord);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(FogCoordfEXT)(GLfloat coord)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[664];
+ ((void (APIENTRY *)(GLfloat coord)) _func)(coord);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(FogCoordf)(GLfloat coord)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[664];
+ ((void (APIENTRY *)(GLfloat coord)) _func)(coord);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(FogCoordfvEXT)(const GLfloat *coord)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[665];
+ ((void (APIENTRY *)(const GLfloat *coord)) _func)(coord);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(FogCoordfv)(const GLfloat *coord)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[665];
+ ((void (APIENTRY *)(const GLfloat *coord)) _func)(coord);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(BlendFuncSeparateEXT)(GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[667];
+ ((void (APIENTRY *)(GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha)) _func)(sfactorRGB, dfactorRGB, sfactorAlpha, dfactorAlpha);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(BlendFuncSeparate)(GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[667];
+ ((void (APIENTRY *)(GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha)) _func)(sfactorRGB, dfactorRGB, sfactorAlpha, dfactorAlpha);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(FlushVertexArrayRangeNV)(void)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[668];
+ ((void (APIENTRY *)(void)) _func)();
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexArrayRangeNV)(GLsizei length, const GLvoid *pointer)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[669];
+ ((void (APIENTRY *)(GLsizei length, const GLvoid *pointer)) _func)(length, pointer);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(CombinerInputNV)(GLenum stage, GLenum portion, GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[670];
+ ((void (APIENTRY *)(GLenum stage, GLenum portion, GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage)) _func)(stage, portion, variable, input, mapping, componentUsage);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(CombinerOutputNV)(GLenum stage, GLenum portion, GLenum abOutput, GLenum cdOutput, GLenum sumOutput, GLenum scale, GLenum bias, GLboolean abDotProduct, GLboolean cdDotProduct, GLboolean muxSum)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[671];
+ ((void (APIENTRY *)(GLenum stage, GLenum portion, GLenum abOutput, GLenum cdOutput, GLenum sumOutput, GLenum scale, GLenum bias, GLboolean abDotProduct, GLboolean cdDotProduct, GLboolean muxSum)) _func)(stage, portion, abOutput, cdOutput, sumOutput, scale, bias, abDotProduct, cdDotProduct, muxSum);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(CombinerParameterfNV)(GLenum pname, GLfloat param)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[672];
+ ((void (APIENTRY *)(GLenum pname, GLfloat param)) _func)(pname, param);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(CombinerParameterfvNV)(GLenum pname, const GLfloat *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[673];
+ ((void (APIENTRY *)(GLenum pname, const GLfloat *params)) _func)(pname, params);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(CombinerParameteriNV)(GLenum pname, GLint param)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[674];
+ ((void (APIENTRY *)(GLenum pname, GLint param)) _func)(pname, param);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(CombinerParameterivNV)(GLenum pname, const GLint *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[675];
+ ((void (APIENTRY *)(GLenum pname, const GLint *params)) _func)(pname, params);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(FinalCombinerInputNV)(GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[676];
+ ((void (APIENTRY *)(GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage)) _func)(variable, input, mapping, componentUsage);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(GetCombinerInputParameterfvNV)(GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLfloat *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[677];
+ ((void (APIENTRY *)(GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLfloat *params)) _func)(stage, portion, variable, pname, params);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(GetCombinerInputParameterivNV)(GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLint *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[678];
+ ((void (APIENTRY *)(GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLint *params)) _func)(stage, portion, variable, pname, params);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(GetCombinerOutputParameterfvNV)(GLenum stage, GLenum portion, GLenum pname, GLfloat *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[679];
+ ((void (APIENTRY *)(GLenum stage, GLenum portion, GLenum pname, GLfloat *params)) _func)(stage, portion, pname, params);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(GetCombinerOutputParameterivNV)(GLenum stage, GLenum portion, GLenum pname, GLint *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[680];
+ ((void (APIENTRY *)(GLenum stage, GLenum portion, GLenum pname, GLint *params)) _func)(stage, portion, pname, params);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(GetFinalCombinerInputParameterfvNV)(GLenum variable, GLenum pname, GLfloat *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[681];
+ ((void (APIENTRY *)(GLenum variable, GLenum pname, GLfloat *params)) _func)(variable, pname, params);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(GetFinalCombinerInputParameterivNV)(GLenum variable, GLenum pname, GLint *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[682];
+ ((void (APIENTRY *)(GLenum variable, GLenum pname, GLint *params)) _func)(variable, pname, params);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(ResizeBuffersMESA)(void)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[683];
+ ((void (APIENTRY *)(void)) _func)();
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(WindowPos2dMESA)(GLdouble x, GLdouble y)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[684];
+ ((void (APIENTRY *)(GLdouble x, GLdouble y)) _func)(x, y);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(WindowPos2d)(GLdouble x, GLdouble y)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[684];
+ ((void (APIENTRY *)(GLdouble x, GLdouble y)) _func)(x, y);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(WindowPos2dARB)(GLdouble x, GLdouble y)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[684];
+ ((void (APIENTRY *)(GLdouble x, GLdouble y)) _func)(x, y);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(WindowPos2dvMESA)(const GLdouble *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[685];
+ ((void (APIENTRY *)(const GLdouble *v)) _func)(v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(WindowPos2dv)(const GLdouble *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[685];
+ ((void (APIENTRY *)(const GLdouble *v)) _func)(v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(WindowPos2dvARB)(const GLdouble *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[685];
+ ((void (APIENTRY *)(const GLdouble *v)) _func)(v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(WindowPos2fMESA)(GLfloat x, GLfloat y)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[686];
+ ((void (APIENTRY *)(GLfloat x, GLfloat y)) _func)(x, y);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(WindowPos2f)(GLfloat x, GLfloat y)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[686];
+ ((void (APIENTRY *)(GLfloat x, GLfloat y)) _func)(x, y);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(WindowPos2fARB)(GLfloat x, GLfloat y)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[686];
+ ((void (APIENTRY *)(GLfloat x, GLfloat y)) _func)(x, y);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(WindowPos2fvMESA)(const GLfloat *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[687];
+ ((void (APIENTRY *)(const GLfloat *v)) _func)(v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(WindowPos2fv)(const GLfloat *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[687];
+ ((void (APIENTRY *)(const GLfloat *v)) _func)(v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(WindowPos2fvARB)(const GLfloat *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[687];
+ ((void (APIENTRY *)(const GLfloat *v)) _func)(v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(WindowPos2iMESA)(GLint x, GLint y)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[688];
+ ((void (APIENTRY *)(GLint x, GLint y)) _func)(x, y);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(WindowPos2i)(GLint x, GLint y)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[688];
+ ((void (APIENTRY *)(GLint x, GLint y)) _func)(x, y);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(WindowPos2iARB)(GLint x, GLint y)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[688];
+ ((void (APIENTRY *)(GLint x, GLint y)) _func)(x, y);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(WindowPos2ivMESA)(const GLint *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[689];
+ ((void (APIENTRY *)(const GLint *v)) _func)(v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(WindowPos2iv)(const GLint *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[689];
+ ((void (APIENTRY *)(const GLint *v)) _func)(v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(WindowPos2ivARB)(const GLint *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[689];
+ ((void (APIENTRY *)(const GLint *v)) _func)(v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(WindowPos2sMESA)(GLshort x, GLshort y)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[690];
+ ((void (APIENTRY *)(GLshort x, GLshort y)) _func)(x, y);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(WindowPos2s)(GLshort x, GLshort y)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[690];
+ ((void (APIENTRY *)(GLshort x, GLshort y)) _func)(x, y);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(WindowPos2sARB)(GLshort x, GLshort y)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[690];
+ ((void (APIENTRY *)(GLshort x, GLshort y)) _func)(x, y);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(WindowPos2svMESA)(const GLshort *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[691];
+ ((void (APIENTRY *)(const GLshort *v)) _func)(v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(WindowPos2sv)(const GLshort *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[691];
+ ((void (APIENTRY *)(const GLshort *v)) _func)(v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(WindowPos2svARB)(const GLshort *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[691];
+ ((void (APIENTRY *)(const GLshort *v)) _func)(v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(WindowPos3dMESA)(GLdouble x, GLdouble y, GLdouble z)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[692];
+ ((void (APIENTRY *)(GLdouble x, GLdouble y, GLdouble z)) _func)(x, y, z);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(WindowPos3d)(GLdouble x, GLdouble y, GLdouble z)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[692];
+ ((void (APIENTRY *)(GLdouble x, GLdouble y, GLdouble z)) _func)(x, y, z);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(WindowPos3dARB)(GLdouble x, GLdouble y, GLdouble z)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[692];
+ ((void (APIENTRY *)(GLdouble x, GLdouble y, GLdouble z)) _func)(x, y, z);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(WindowPos3dvMESA)(const GLdouble *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[693];
+ ((void (APIENTRY *)(const GLdouble *v)) _func)(v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(WindowPos3dv)(const GLdouble *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[693];
+ ((void (APIENTRY *)(const GLdouble *v)) _func)(v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(WindowPos3dvARB)(const GLdouble *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[693];
+ ((void (APIENTRY *)(const GLdouble *v)) _func)(v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(WindowPos3fMESA)(GLfloat x, GLfloat y, GLfloat z)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[694];
+ ((void (APIENTRY *)(GLfloat x, GLfloat y, GLfloat z)) _func)(x, y, z);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(WindowPos3f)(GLfloat x, GLfloat y, GLfloat z)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[694];
+ ((void (APIENTRY *)(GLfloat x, GLfloat y, GLfloat z)) _func)(x, y, z);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(WindowPos3fARB)(GLfloat x, GLfloat y, GLfloat z)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[694];
+ ((void (APIENTRY *)(GLfloat x, GLfloat y, GLfloat z)) _func)(x, y, z);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(WindowPos3fvMESA)(const GLfloat *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[695];
+ ((void (APIENTRY *)(const GLfloat *v)) _func)(v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(WindowPos3fv)(const GLfloat *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[695];
+ ((void (APIENTRY *)(const GLfloat *v)) _func)(v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(WindowPos3fvARB)(const GLfloat *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[695];
+ ((void (APIENTRY *)(const GLfloat *v)) _func)(v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(WindowPos3iMESA)(GLint x, GLint y, GLint z)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[696];
+ ((void (APIENTRY *)(GLint x, GLint y, GLint z)) _func)(x, y, z);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(WindowPos3i)(GLint x, GLint y, GLint z)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[696];
+ ((void (APIENTRY *)(GLint x, GLint y, GLint z)) _func)(x, y, z);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(WindowPos3iARB)(GLint x, GLint y, GLint z)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[696];
+ ((void (APIENTRY *)(GLint x, GLint y, GLint z)) _func)(x, y, z);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(WindowPos3ivMESA)(const GLint *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[697];
+ ((void (APIENTRY *)(const GLint *v)) _func)(v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(WindowPos3iv)(const GLint *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[697];
+ ((void (APIENTRY *)(const GLint *v)) _func)(v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(WindowPos3ivARB)(const GLint *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[697];
+ ((void (APIENTRY *)(const GLint *v)) _func)(v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(WindowPos3sMESA)(GLshort x, GLshort y, GLshort z)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[698];
+ ((void (APIENTRY *)(GLshort x, GLshort y, GLshort z)) _func)(x, y, z);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(WindowPos3s)(GLshort x, GLshort y, GLshort z)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[698];
+ ((void (APIENTRY *)(GLshort x, GLshort y, GLshort z)) _func)(x, y, z);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(WindowPos3sARB)(GLshort x, GLshort y, GLshort z)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[698];
+ ((void (APIENTRY *)(GLshort x, GLshort y, GLshort z)) _func)(x, y, z);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(WindowPos3svMESA)(const GLshort *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[699];
+ ((void (APIENTRY *)(const GLshort *v)) _func)(v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(WindowPos3sv)(const GLshort *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[699];
+ ((void (APIENTRY *)(const GLshort *v)) _func)(v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(WindowPos3svARB)(const GLshort *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[699];
+ ((void (APIENTRY *)(const GLshort *v)) _func)(v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(WindowPos4dMESA)(GLdouble x, GLdouble y, GLdouble z, GLdouble w)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[700];
+ ((void (APIENTRY *)(GLdouble x, GLdouble y, GLdouble z, GLdouble w)) _func)(x, y, z, w);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(WindowPos4dvMESA)(const GLdouble *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[701];
+ ((void (APIENTRY *)(const GLdouble *v)) _func)(v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(WindowPos4fMESA)(GLfloat x, GLfloat y, GLfloat z, GLfloat w)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[702];
+ ((void (APIENTRY *)(GLfloat x, GLfloat y, GLfloat z, GLfloat w)) _func)(x, y, z, w);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(WindowPos4fvMESA)(const GLfloat *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[703];
+ ((void (APIENTRY *)(const GLfloat *v)) _func)(v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(WindowPos4iMESA)(GLint x, GLint y, GLint z, GLint w)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[704];
+ ((void (APIENTRY *)(GLint x, GLint y, GLint z, GLint w)) _func)(x, y, z, w);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(WindowPos4ivMESA)(const GLint *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[705];
+ ((void (APIENTRY *)(const GLint *v)) _func)(v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(WindowPos4sMESA)(GLshort x, GLshort y, GLshort z, GLshort w)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[706];
+ ((void (APIENTRY *)(GLshort x, GLshort y, GLshort z, GLshort w)) _func)(x, y, z, w);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(WindowPos4svMESA)(const GLshort *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[707];
+ ((void (APIENTRY *)(const GLshort *v)) _func)(v);
+}
+
+GLAPI GLboolean APIENTRY GLAPI_PREFIX(AreProgramsResidentNV)(GLsizei n, const GLuint *ids, GLboolean *residences)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[717];
+ return ((GLboolean (APIENTRY *)(GLsizei n, const GLuint *ids, GLboolean *residences)) _func)(n, ids, residences);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(BindProgramNV)(GLenum target, GLuint program)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[718];
+ ((void (APIENTRY *)(GLenum target, GLuint program)) _func)(target, program);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(BindProgramARB)(GLenum target, GLuint program)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[718];
+ ((void (APIENTRY *)(GLenum target, GLuint program)) _func)(target, program);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(DeleteProgramsNV)(GLsizei n, const GLuint *programs)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[719];
+ ((void (APIENTRY *)(GLsizei n, const GLuint *programs)) _func)(n, programs);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(DeleteProgramsARB)(GLsizei n, const GLuint *programs)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[719];
+ ((void (APIENTRY *)(GLsizei n, const GLuint *programs)) _func)(n, programs);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(ExecuteProgramNV)(GLenum target, GLuint id, const GLfloat *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[720];
+ ((void (APIENTRY *)(GLenum target, GLuint id, const GLfloat *params)) _func)(target, id, params);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(GenProgramsNV)(GLsizei n, GLuint *programs)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[721];
+ ((void (APIENTRY *)(GLsizei n, GLuint *programs)) _func)(n, programs);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(GenProgramsARB)(GLsizei n, GLuint *programs)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[721];
+ ((void (APIENTRY *)(GLsizei n, GLuint *programs)) _func)(n, programs);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(GetProgramParameterdvNV)(GLenum target, GLuint index, GLenum pname, GLdouble *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[722];
+ ((void (APIENTRY *)(GLenum target, GLuint index, GLenum pname, GLdouble *params)) _func)(target, index, pname, params);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(GetProgramParameterfvNV)(GLenum target, GLuint index, GLenum pname, GLfloat *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[723];
+ ((void (APIENTRY *)(GLenum target, GLuint index, GLenum pname, GLfloat *params)) _func)(target, index, pname, params);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(GetProgramStringNV)(GLuint id, GLenum pname, GLubyte *program)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[724];
+ ((void (APIENTRY *)(GLuint id, GLenum pname, GLubyte *program)) _func)(id, pname, program);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(GetProgramivNV)(GLuint id, GLenum pname, GLint *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[725];
+ ((void (APIENTRY *)(GLuint id, GLenum pname, GLint *params)) _func)(id, pname, params);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(GetTrackMatrixivNV)(GLenum target, GLuint address, GLenum pname, GLint *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[726];
+ ((void (APIENTRY *)(GLenum target, GLuint address, GLenum pname, GLint *params)) _func)(target, address, pname, params);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(GetVertexAttribPointervNV)(GLuint index, GLenum pname, GLvoid **pointer)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[727];
+ ((void (APIENTRY *)(GLuint index, GLenum pname, GLvoid **pointer)) _func)(index, pname, pointer);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(GetVertexAttribPointerv)(GLuint index, GLenum pname, GLvoid **pointer)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[727];
+ ((void (APIENTRY *)(GLuint index, GLenum pname, GLvoid **pointer)) _func)(index, pname, pointer);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(GetVertexAttribPointervARB)(GLuint index, GLenum pname, GLvoid **pointer)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[727];
+ ((void (APIENTRY *)(GLuint index, GLenum pname, GLvoid **pointer)) _func)(index, pname, pointer);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(GetVertexAttribdvNV)(GLuint index, GLenum pname, GLdouble *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[728];
+ ((void (APIENTRY *)(GLuint index, GLenum pname, GLdouble *params)) _func)(index, pname, params);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(GetVertexAttribfvNV)(GLuint index, GLenum pname, GLfloat *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[729];
+ ((void (APIENTRY *)(GLuint index, GLenum pname, GLfloat *params)) _func)(index, pname, params);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(GetVertexAttribivNV)(GLuint index, GLenum pname, GLint *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[730];
+ ((void (APIENTRY *)(GLuint index, GLenum pname, GLint *params)) _func)(index, pname, params);
+}
+
+GLAPI GLboolean APIENTRY GLAPI_PREFIX(IsProgramNV)(GLuint program)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[731];
+ return ((GLboolean (APIENTRY *)(GLuint program)) _func)(program);
+}
+
+GLAPI GLboolean APIENTRY GLAPI_PREFIX(IsProgramARB)(GLuint program)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[731];
+ return ((GLboolean (APIENTRY *)(GLuint program)) _func)(program);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(LoadProgramNV)(GLenum target, GLuint id, GLsizei len, const GLubyte *program)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[732];
+ ((void (APIENTRY *)(GLenum target, GLuint id, GLsizei len, const GLubyte *program)) _func)(target, id, len, program);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(ProgramParameters4dvNV)(GLenum target, GLuint index, GLsizei num, const GLdouble *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[733];
+ ((void (APIENTRY *)(GLenum target, GLuint index, GLsizei num, const GLdouble *params)) _func)(target, index, num, params);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(ProgramParameters4fvNV)(GLenum target, GLuint index, GLsizei num, const GLfloat *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[734];
+ ((void (APIENTRY *)(GLenum target, GLuint index, GLsizei num, const GLfloat *params)) _func)(target, index, num, params);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(RequestResidentProgramsNV)(GLsizei n, const GLuint *ids)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[735];
+ ((void (APIENTRY *)(GLsizei n, const GLuint *ids)) _func)(n, ids);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(TrackMatrixNV)(GLenum target, GLuint address, GLenum matrix, GLenum transform)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[736];
+ ((void (APIENTRY *)(GLenum target, GLuint address, GLenum matrix, GLenum transform)) _func)(target, address, matrix, transform);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib1dNV)(GLuint index, GLdouble x)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[737];
+ ((void (APIENTRY *)(GLuint index, GLdouble x)) _func)(index, x);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib1dvNV)(GLuint index, const GLdouble *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[738];
+ ((void (APIENTRY *)(GLuint index, const GLdouble *v)) _func)(index, v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib1fNV)(GLuint index, GLfloat x)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[739];
+ ((void (APIENTRY *)(GLuint index, GLfloat x)) _func)(index, x);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib1fvNV)(GLuint index, const GLfloat *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[740];
+ ((void (APIENTRY *)(GLuint index, const GLfloat *v)) _func)(index, v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib1sNV)(GLuint index, GLshort x)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[741];
+ ((void (APIENTRY *)(GLuint index, GLshort x)) _func)(index, x);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib1svNV)(GLuint index, const GLshort *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[742];
+ ((void (APIENTRY *)(GLuint index, const GLshort *v)) _func)(index, v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib2dNV)(GLuint index, GLdouble x, GLdouble y)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[743];
+ ((void (APIENTRY *)(GLuint index, GLdouble x, GLdouble y)) _func)(index, x, y);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib2dvNV)(GLuint index, const GLdouble *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[744];
+ ((void (APIENTRY *)(GLuint index, const GLdouble *v)) _func)(index, v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib2fNV)(GLuint index, GLfloat x, GLfloat y)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[745];
+ ((void (APIENTRY *)(GLuint index, GLfloat x, GLfloat y)) _func)(index, x, y);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib2fvNV)(GLuint index, const GLfloat *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[746];
+ ((void (APIENTRY *)(GLuint index, const GLfloat *v)) _func)(index, v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib2sNV)(GLuint index, GLshort x, GLshort y)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[747];
+ ((void (APIENTRY *)(GLuint index, GLshort x, GLshort y)) _func)(index, x, y);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib2svNV)(GLuint index, const GLshort *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[748];
+ ((void (APIENTRY *)(GLuint index, const GLshort *v)) _func)(index, v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib3dNV)(GLuint index, GLdouble x, GLdouble y, GLdouble z)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[749];
+ ((void (APIENTRY *)(GLuint index, GLdouble x, GLdouble y, GLdouble z)) _func)(index, x, y, z);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib3dvNV)(GLuint index, const GLdouble *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[750];
+ ((void (APIENTRY *)(GLuint index, const GLdouble *v)) _func)(index, v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib3fNV)(GLuint index, GLfloat x, GLfloat y, GLfloat z)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[751];
+ ((void (APIENTRY *)(GLuint index, GLfloat x, GLfloat y, GLfloat z)) _func)(index, x, y, z);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib3fvNV)(GLuint index, const GLfloat *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[752];
+ ((void (APIENTRY *)(GLuint index, const GLfloat *v)) _func)(index, v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib3sNV)(GLuint index, GLshort x, GLshort y, GLshort z)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[753];
+ ((void (APIENTRY *)(GLuint index, GLshort x, GLshort y, GLshort z)) _func)(index, x, y, z);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib3svNV)(GLuint index, const GLshort *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[754];
+ ((void (APIENTRY *)(GLuint index, const GLshort *v)) _func)(index, v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4dNV)(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[755];
+ ((void (APIENTRY *)(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w)) _func)(index, x, y, z, w);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4dvNV)(GLuint index, const GLdouble *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[756];
+ ((void (APIENTRY *)(GLuint index, const GLdouble *v)) _func)(index, v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4fNV)(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[757];
+ ((void (APIENTRY *)(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w)) _func)(index, x, y, z, w);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4fvNV)(GLuint index, const GLfloat *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[758];
+ ((void (APIENTRY *)(GLuint index, const GLfloat *v)) _func)(index, v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4sNV)(GLuint index, GLshort x, GLshort y, GLshort z, GLshort w)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[759];
+ ((void (APIENTRY *)(GLuint index, GLshort x, GLshort y, GLshort z, GLshort w)) _func)(index, x, y, z, w);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4svNV)(GLuint index, const GLshort *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[760];
+ ((void (APIENTRY *)(GLuint index, const GLshort *v)) _func)(index, v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4ubNV)(GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[761];
+ ((void (APIENTRY *)(GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w)) _func)(index, x, y, z, w);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4ubvNV)(GLuint index, const GLubyte *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[762];
+ ((void (APIENTRY *)(GLuint index, const GLubyte *v)) _func)(index, v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribPointerNV)(GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[763];
+ ((void (APIENTRY *)(GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer)) _func)(index, size, type, stride, pointer);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribs1dvNV)(GLuint index, GLsizei n, const GLdouble *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[764];
+ ((void (APIENTRY *)(GLuint index, GLsizei n, const GLdouble *v)) _func)(index, n, v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribs1fvNV)(GLuint index, GLsizei n, const GLfloat *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[765];
+ ((void (APIENTRY *)(GLuint index, GLsizei n, const GLfloat *v)) _func)(index, n, v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribs1svNV)(GLuint index, GLsizei n, const GLshort *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[766];
+ ((void (APIENTRY *)(GLuint index, GLsizei n, const GLshort *v)) _func)(index, n, v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribs2dvNV)(GLuint index, GLsizei n, const GLdouble *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[767];
+ ((void (APIENTRY *)(GLuint index, GLsizei n, const GLdouble *v)) _func)(index, n, v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribs2fvNV)(GLuint index, GLsizei n, const GLfloat *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[768];
+ ((void (APIENTRY *)(GLuint index, GLsizei n, const GLfloat *v)) _func)(index, n, v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribs2svNV)(GLuint index, GLsizei n, const GLshort *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[769];
+ ((void (APIENTRY *)(GLuint index, GLsizei n, const GLshort *v)) _func)(index, n, v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribs3dvNV)(GLuint index, GLsizei n, const GLdouble *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[770];
+ ((void (APIENTRY *)(GLuint index, GLsizei n, const GLdouble *v)) _func)(index, n, v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribs3fvNV)(GLuint index, GLsizei n, const GLfloat *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[771];
+ ((void (APIENTRY *)(GLuint index, GLsizei n, const GLfloat *v)) _func)(index, n, v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribs3svNV)(GLuint index, GLsizei n, const GLshort *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[772];
+ ((void (APIENTRY *)(GLuint index, GLsizei n, const GLshort *v)) _func)(index, n, v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribs4dvNV)(GLuint index, GLsizei n, const GLdouble *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[773];
+ ((void (APIENTRY *)(GLuint index, GLsizei n, const GLdouble *v)) _func)(index, n, v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribs4fvNV)(GLuint index, GLsizei n, const GLfloat *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[774];
+ ((void (APIENTRY *)(GLuint index, GLsizei n, const GLfloat *v)) _func)(index, n, v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribs4svNV)(GLuint index, GLsizei n, const GLshort *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[775];
+ ((void (APIENTRY *)(GLuint index, GLsizei n, const GLshort *v)) _func)(index, n, v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribs4ubvNV)(GLuint index, GLsizei n, const GLubyte *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[776];
+ ((void (APIENTRY *)(GLuint index, GLsizei n, const GLubyte *v)) _func)(index, n, v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(GetTexBumpParameterfvATI)(GLenum pname, GLfloat *param)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[777];
+ ((void (APIENTRY *)(GLenum pname, GLfloat *param)) _func)(pname, param);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(GetTexBumpParameterivATI)(GLenum pname, GLint *param)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[778];
+ ((void (APIENTRY *)(GLenum pname, GLint *param)) _func)(pname, param);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(TexBumpParameterfvATI)(GLenum pname, const GLfloat *param)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[779];
+ ((void (APIENTRY *)(GLenum pname, const GLfloat *param)) _func)(pname, param);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(TexBumpParameterivATI)(GLenum pname, const GLint *param)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[780];
+ ((void (APIENTRY *)(GLenum pname, const GLint *param)) _func)(pname, param);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(AlphaFragmentOp1ATI)(GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[781];
+ ((void (APIENTRY *)(GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod)) _func)(op, dst, dstMod, arg1, arg1Rep, arg1Mod);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(AlphaFragmentOp2ATI)(GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[782];
+ ((void (APIENTRY *)(GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod)) _func)(op, dst, dstMod, arg1, arg1Rep, arg1Mod, arg2, arg2Rep, arg2Mod);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(AlphaFragmentOp3ATI)(GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[783];
+ ((void (APIENTRY *)(GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod)) _func)(op, dst, dstMod, arg1, arg1Rep, arg1Mod, arg2, arg2Rep, arg2Mod, arg3, arg3Rep, arg3Mod);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(BeginFragmentShaderATI)(void)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[784];
+ ((void (APIENTRY *)(void)) _func)();
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(BindFragmentShaderATI)(GLuint id)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[785];
+ ((void (APIENTRY *)(GLuint id)) _func)(id);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(ColorFragmentOp1ATI)(GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[786];
+ ((void (APIENTRY *)(GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod)) _func)(op, dst, dstMask, dstMod, arg1, arg1Rep, arg1Mod);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(ColorFragmentOp2ATI)(GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[787];
+ ((void (APIENTRY *)(GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod)) _func)(op, dst, dstMask, dstMod, arg1, arg1Rep, arg1Mod, arg2, arg2Rep, arg2Mod);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(ColorFragmentOp3ATI)(GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[788];
+ ((void (APIENTRY *)(GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod)) _func)(op, dst, dstMask, dstMod, arg1, arg1Rep, arg1Mod, arg2, arg2Rep, arg2Mod, arg3, arg3Rep, arg3Mod);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(DeleteFragmentShaderATI)(GLuint id)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[789];
+ ((void (APIENTRY *)(GLuint id)) _func)(id);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(EndFragmentShaderATI)(void)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[790];
+ ((void (APIENTRY *)(void)) _func)();
+}
+
+GLAPI GLuint APIENTRY GLAPI_PREFIX(GenFragmentShadersATI)(GLuint range)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[791];
+ return ((GLuint (APIENTRY *)(GLuint range)) _func)(range);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(PassTexCoordATI)(GLuint dst, GLuint coord, GLenum swizzle)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[792];
+ ((void (APIENTRY *)(GLuint dst, GLuint coord, GLenum swizzle)) _func)(dst, coord, swizzle);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(SampleMapATI)(GLuint dst, GLuint interp, GLenum swizzle)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[793];
+ ((void (APIENTRY *)(GLuint dst, GLuint interp, GLenum swizzle)) _func)(dst, interp, swizzle);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(SetFragmentShaderConstantATI)(GLuint dst, const GLfloat *value)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[794];
+ ((void (APIENTRY *)(GLuint dst, const GLfloat *value)) _func)(dst, value);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(PointParameteriNV)(GLenum pname, GLint param)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[795];
+ ((void (APIENTRY *)(GLenum pname, GLint param)) _func)(pname, param);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(PointParameteri)(GLenum pname, GLint param)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[795];
+ ((void (APIENTRY *)(GLenum pname, GLint param)) _func)(pname, param);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(PointParameterivNV)(GLenum pname, const GLint *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[796];
+ ((void (APIENTRY *)(GLenum pname, const GLint *params)) _func)(pname, params);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(PointParameteriv)(GLenum pname, const GLint *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[796];
+ ((void (APIENTRY *)(GLenum pname, const GLint *params)) _func)(pname, params);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(DeleteVertexArrays)(GLsizei n, const GLuint *arrays)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[799];
+ ((void (APIENTRY *)(GLsizei n, const GLuint *arrays)) _func)(n, arrays);
+}
+
+GLAPI GLboolean APIENTRY GLAPI_PREFIX(IsVertexArray)(GLuint array)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[801];
+ return ((GLboolean (APIENTRY *)(GLuint array)) _func)(array);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(GetProgramNamedParameterdvNV)(GLuint id, GLsizei len, const GLubyte *name, GLdouble *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[802];
+ ((void (APIENTRY *)(GLuint id, GLsizei len, const GLubyte *name, GLdouble *params)) _func)(id, len, name, params);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(GetProgramNamedParameterfvNV)(GLuint id, GLsizei len, const GLubyte *name, GLfloat *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[803];
+ ((void (APIENTRY *)(GLuint id, GLsizei len, const GLubyte *name, GLfloat *params)) _func)(id, len, name, params);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(ProgramNamedParameter4dNV)(GLuint id, GLsizei len, const GLubyte *name, GLdouble x, GLdouble y, GLdouble z, GLdouble w)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[804];
+ ((void (APIENTRY *)(GLuint id, GLsizei len, const GLubyte *name, GLdouble x, GLdouble y, GLdouble z, GLdouble w)) _func)(id, len, name, x, y, z, w);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(ProgramNamedParameter4dvNV)(GLuint id, GLsizei len, const GLubyte *name, const GLdouble *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[805];
+ ((void (APIENTRY *)(GLuint id, GLsizei len, const GLubyte *name, const GLdouble *v)) _func)(id, len, name, v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(ProgramNamedParameter4fNV)(GLuint id, GLsizei len, const GLubyte *name, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[806];
+ ((void (APIENTRY *)(GLuint id, GLsizei len, const GLubyte *name, GLfloat x, GLfloat y, GLfloat z, GLfloat w)) _func)(id, len, name, x, y, z, w);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(ProgramNamedParameter4fvNV)(GLuint id, GLsizei len, const GLubyte *name, const GLfloat *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[807];
+ ((void (APIENTRY *)(GLuint id, GLsizei len, const GLubyte *name, const GLfloat *v)) _func)(id, len, name, v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(PrimitiveRestartIndexNV)(GLuint index)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[808];
+ ((void (APIENTRY *)(GLuint index)) _func)(index);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(PrimitiveRestartIndex)(GLuint index)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[808];
+ ((void (APIENTRY *)(GLuint index)) _func)(index);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(PrimitiveRestartNV)(void)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[809];
+ ((void (APIENTRY *)(void)) _func)();
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(BlendEquationSeparate)(GLenum modeRGB, GLenum modeA)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[857];
+ ((void (APIENTRY *)(GLenum modeRGB, GLenum modeA)) _func)(modeRGB, modeA);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(BindFramebufferEXT)(GLenum target, GLuint framebuffer)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[858];
+ ((void (APIENTRY *)(GLenum target, GLuint framebuffer)) _func)(target, framebuffer);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(BindFramebuffer)(GLenum target, GLuint framebuffer)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[858];
+ ((void (APIENTRY *)(GLenum target, GLuint framebuffer)) _func)(target, framebuffer);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(BindRenderbufferEXT)(GLenum target, GLuint renderbuffer)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[859];
+ ((void (APIENTRY *)(GLenum target, GLuint renderbuffer)) _func)(target, renderbuffer);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(BindRenderbuffer)(GLenum target, GLuint renderbuffer)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[859];
+ ((void (APIENTRY *)(GLenum target, GLuint renderbuffer)) _func)(target, renderbuffer);
+}
+
+GLAPI GLenum APIENTRY GLAPI_PREFIX(CheckFramebufferStatusEXT)(GLenum target)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[860];
+ return ((GLenum (APIENTRY *)(GLenum target)) _func)(target);
+}
+
+GLAPI GLenum APIENTRY GLAPI_PREFIX(CheckFramebufferStatus)(GLenum target)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[860];
+ return ((GLenum (APIENTRY *)(GLenum target)) _func)(target);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(DeleteFramebuffersEXT)(GLsizei n, const GLuint *framebuffers)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[861];
+ ((void (APIENTRY *)(GLsizei n, const GLuint *framebuffers)) _func)(n, framebuffers);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(DeleteFramebuffers)(GLsizei n, const GLuint *framebuffers)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[861];
+ ((void (APIENTRY *)(GLsizei n, const GLuint *framebuffers)) _func)(n, framebuffers);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(DeleteRenderbuffersEXT)(GLsizei n, const GLuint *renderbuffers)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[862];
+ ((void (APIENTRY *)(GLsizei n, const GLuint *renderbuffers)) _func)(n, renderbuffers);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(DeleteRenderbuffers)(GLsizei n, const GLuint *renderbuffers)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[862];
+ ((void (APIENTRY *)(GLsizei n, const GLuint *renderbuffers)) _func)(n, renderbuffers);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(FramebufferRenderbufferEXT)(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[863];
+ ((void (APIENTRY *)(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer)) _func)(target, attachment, renderbuffertarget, renderbuffer);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(FramebufferRenderbuffer)(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[863];
+ ((void (APIENTRY *)(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer)) _func)(target, attachment, renderbuffertarget, renderbuffer);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(FramebufferTexture1DEXT)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[864];
+ ((void (APIENTRY *)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level)) _func)(target, attachment, textarget, texture, level);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(FramebufferTexture1D)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[864];
+ ((void (APIENTRY *)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level)) _func)(target, attachment, textarget, texture, level);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(FramebufferTexture2DEXT)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[865];
+ ((void (APIENTRY *)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level)) _func)(target, attachment, textarget, texture, level);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(FramebufferTexture2D)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[865];
+ ((void (APIENTRY *)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level)) _func)(target, attachment, textarget, texture, level);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(FramebufferTexture3DEXT)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[866];
+ ((void (APIENTRY *)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset)) _func)(target, attachment, textarget, texture, level, zoffset);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(FramebufferTexture3D)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[866];
+ ((void (APIENTRY *)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset)) _func)(target, attachment, textarget, texture, level, zoffset);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(GenFramebuffersEXT)(GLsizei n, GLuint *framebuffers)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[867];
+ ((void (APIENTRY *)(GLsizei n, GLuint *framebuffers)) _func)(n, framebuffers);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(GenFramebuffers)(GLsizei n, GLuint *framebuffers)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[867];
+ ((void (APIENTRY *)(GLsizei n, GLuint *framebuffers)) _func)(n, framebuffers);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(GenRenderbuffersEXT)(GLsizei n, GLuint *renderbuffers)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[868];
+ ((void (APIENTRY *)(GLsizei n, GLuint *renderbuffers)) _func)(n, renderbuffers);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(GenRenderbuffers)(GLsizei n, GLuint *renderbuffers)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[868];
+ ((void (APIENTRY *)(GLsizei n, GLuint *renderbuffers)) _func)(n, renderbuffers);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(GenerateMipmapEXT)(GLenum target)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[869];
+ ((void (APIENTRY *)(GLenum target)) _func)(target);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(GenerateMipmap)(GLenum target)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[869];
+ ((void (APIENTRY *)(GLenum target)) _func)(target);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(GetFramebufferAttachmentParameterivEXT)(GLenum target, GLenum attachment, GLenum pname, GLint *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[870];
+ ((void (APIENTRY *)(GLenum target, GLenum attachment, GLenum pname, GLint *params)) _func)(target, attachment, pname, params);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(GetFramebufferAttachmentParameteriv)(GLenum target, GLenum attachment, GLenum pname, GLint *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[870];
+ ((void (APIENTRY *)(GLenum target, GLenum attachment, GLenum pname, GLint *params)) _func)(target, attachment, pname, params);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(GetRenderbufferParameterivEXT)(GLenum target, GLenum pname, GLint *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[871];
+ ((void (APIENTRY *)(GLenum target, GLenum pname, GLint *params)) _func)(target, pname, params);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(GetRenderbufferParameteriv)(GLenum target, GLenum pname, GLint *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[871];
+ ((void (APIENTRY *)(GLenum target, GLenum pname, GLint *params)) _func)(target, pname, params);
+}
+
+GLAPI GLboolean APIENTRY GLAPI_PREFIX(IsFramebufferEXT)(GLuint framebuffer)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[872];
+ return ((GLboolean (APIENTRY *)(GLuint framebuffer)) _func)(framebuffer);
+}
+
+GLAPI GLboolean APIENTRY GLAPI_PREFIX(IsFramebuffer)(GLuint framebuffer)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[872];
+ return ((GLboolean (APIENTRY *)(GLuint framebuffer)) _func)(framebuffer);
+}
+
+GLAPI GLboolean APIENTRY GLAPI_PREFIX(IsRenderbufferEXT)(GLuint renderbuffer)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[873];
+ return ((GLboolean (APIENTRY *)(GLuint renderbuffer)) _func)(renderbuffer);
+}
+
+GLAPI GLboolean APIENTRY GLAPI_PREFIX(IsRenderbuffer)(GLuint renderbuffer)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[873];
+ return ((GLboolean (APIENTRY *)(GLuint renderbuffer)) _func)(renderbuffer);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(RenderbufferStorageEXT)(GLenum target, GLenum internalformat, GLsizei width, GLsizei height)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[874];
+ ((void (APIENTRY *)(GLenum target, GLenum internalformat, GLsizei width, GLsizei height)) _func)(target, internalformat, width, height);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(RenderbufferStorage)(GLenum target, GLenum internalformat, GLsizei width, GLsizei height)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[874];
+ ((void (APIENTRY *)(GLenum target, GLenum internalformat, GLsizei width, GLsizei height)) _func)(target, internalformat, width, height);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(BlitFramebuffer)(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[875];
+ ((void (APIENTRY *)(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter)) _func)(srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(BindFragDataLocationEXT)(GLuint program, GLuint colorNumber, const GLchar *name)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[878];
+ ((void (APIENTRY *)(GLuint program, GLuint colorNumber, const GLchar *name)) _func)(program, colorNumber, name);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(BindFragDataLocation)(GLuint program, GLuint colorNumber, const GLchar *name)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[878];
+ ((void (APIENTRY *)(GLuint program, GLuint colorNumber, const GLchar *name)) _func)(program, colorNumber, name);
+}
+
+GLAPI GLint APIENTRY GLAPI_PREFIX(GetFragDataLocationEXT)(GLuint program, const GLchar *name)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[879];
+ return ((GLint (APIENTRY *)(GLuint program, const GLchar *name)) _func)(program, name);
+}
+
+GLAPI GLint APIENTRY GLAPI_PREFIX(GetFragDataLocation)(GLuint program, const GLchar *name)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[879];
+ return ((GLint (APIENTRY *)(GLuint program, const GLchar *name)) _func)(program, name);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(GetUniformuivEXT)(GLuint program, GLint location, GLuint *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[880];
+ ((void (APIENTRY *)(GLuint program, GLint location, GLuint *params)) _func)(program, location, params);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(GetUniformuiv)(GLuint program, GLint location, GLuint *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[880];
+ ((void (APIENTRY *)(GLuint program, GLint location, GLuint *params)) _func)(program, location, params);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(GetVertexAttribIivEXT)(GLuint index, GLenum pname, GLint *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[881];
+ ((void (APIENTRY *)(GLuint index, GLenum pname, GLint *params)) _func)(index, pname, params);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(GetVertexAttribIiv)(GLuint index, GLenum pname, GLint *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[881];
+ ((void (APIENTRY *)(GLuint index, GLenum pname, GLint *params)) _func)(index, pname, params);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(GetVertexAttribIuivEXT)(GLuint index, GLenum pname, GLuint *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[882];
+ ((void (APIENTRY *)(GLuint index, GLenum pname, GLuint *params)) _func)(index, pname, params);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(GetVertexAttribIuiv)(GLuint index, GLenum pname, GLuint *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[882];
+ ((void (APIENTRY *)(GLuint index, GLenum pname, GLuint *params)) _func)(index, pname, params);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Uniform1uiEXT)(GLint location, GLuint x)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[883];
+ ((void (APIENTRY *)(GLint location, GLuint x)) _func)(location, x);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Uniform1ui)(GLint location, GLuint x)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[883];
+ ((void (APIENTRY *)(GLint location, GLuint x)) _func)(location, x);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Uniform1uivEXT)(GLint location, GLsizei count, const GLuint *value)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[884];
+ ((void (APIENTRY *)(GLint location, GLsizei count, const GLuint *value)) _func)(location, count, value);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Uniform1uiv)(GLint location, GLsizei count, const GLuint *value)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[884];
+ ((void (APIENTRY *)(GLint location, GLsizei count, const GLuint *value)) _func)(location, count, value);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Uniform2uiEXT)(GLint location, GLuint x, GLuint y)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[885];
+ ((void (APIENTRY *)(GLint location, GLuint x, GLuint y)) _func)(location, x, y);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Uniform2ui)(GLint location, GLuint x, GLuint y)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[885];
+ ((void (APIENTRY *)(GLint location, GLuint x, GLuint y)) _func)(location, x, y);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Uniform2uivEXT)(GLint location, GLsizei count, const GLuint *value)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[886];
+ ((void (APIENTRY *)(GLint location, GLsizei count, const GLuint *value)) _func)(location, count, value);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Uniform2uiv)(GLint location, GLsizei count, const GLuint *value)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[886];
+ ((void (APIENTRY *)(GLint location, GLsizei count, const GLuint *value)) _func)(location, count, value);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Uniform3uiEXT)(GLint location, GLuint x, GLuint y, GLuint z)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[887];
+ ((void (APIENTRY *)(GLint location, GLuint x, GLuint y, GLuint z)) _func)(location, x, y, z);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Uniform3ui)(GLint location, GLuint x, GLuint y, GLuint z)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[887];
+ ((void (APIENTRY *)(GLint location, GLuint x, GLuint y, GLuint z)) _func)(location, x, y, z);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Uniform3uivEXT)(GLint location, GLsizei count, const GLuint *value)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[888];
+ ((void (APIENTRY *)(GLint location, GLsizei count, const GLuint *value)) _func)(location, count, value);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Uniform3uiv)(GLint location, GLsizei count, const GLuint *value)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[888];
+ ((void (APIENTRY *)(GLint location, GLsizei count, const GLuint *value)) _func)(location, count, value);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Uniform4uiEXT)(GLint location, GLuint x, GLuint y, GLuint z, GLuint w)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[889];
+ ((void (APIENTRY *)(GLint location, GLuint x, GLuint y, GLuint z, GLuint w)) _func)(location, x, y, z, w);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Uniform4ui)(GLint location, GLuint x, GLuint y, GLuint z, GLuint w)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[889];
+ ((void (APIENTRY *)(GLint location, GLuint x, GLuint y, GLuint z, GLuint w)) _func)(location, x, y, z, w);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Uniform4uivEXT)(GLint location, GLsizei count, const GLuint *value)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[890];
+ ((void (APIENTRY *)(GLint location, GLsizei count, const GLuint *value)) _func)(location, count, value);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Uniform4uiv)(GLint location, GLsizei count, const GLuint *value)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[890];
+ ((void (APIENTRY *)(GLint location, GLsizei count, const GLuint *value)) _func)(location, count, value);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribI1iEXT)(GLuint index, GLint x)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[891];
+ ((void (APIENTRY *)(GLuint index, GLint x)) _func)(index, x);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribI1i)(GLuint index, GLint x)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[891];
+ ((void (APIENTRY *)(GLuint index, GLint x)) _func)(index, x);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribI1ivEXT)(GLuint index, const GLint *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[892];
+ ((void (APIENTRY *)(GLuint index, const GLint *v)) _func)(index, v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribI1iv)(GLuint index, const GLint *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[892];
+ ((void (APIENTRY *)(GLuint index, const GLint *v)) _func)(index, v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribI1uiEXT)(GLuint index, GLuint x)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[893];
+ ((void (APIENTRY *)(GLuint index, GLuint x)) _func)(index, x);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribI1ui)(GLuint index, GLuint x)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[893];
+ ((void (APIENTRY *)(GLuint index, GLuint x)) _func)(index, x);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribI1uivEXT)(GLuint index, const GLuint *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[894];
+ ((void (APIENTRY *)(GLuint index, const GLuint *v)) _func)(index, v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribI1uiv)(GLuint index, const GLuint *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[894];
+ ((void (APIENTRY *)(GLuint index, const GLuint *v)) _func)(index, v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribI2iEXT)(GLuint index, GLint x, GLint y)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[895];
+ ((void (APIENTRY *)(GLuint index, GLint x, GLint y)) _func)(index, x, y);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribI2i)(GLuint index, GLint x, GLint y)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[895];
+ ((void (APIENTRY *)(GLuint index, GLint x, GLint y)) _func)(index, x, y);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribI2ivEXT)(GLuint index, const GLint *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[896];
+ ((void (APIENTRY *)(GLuint index, const GLint *v)) _func)(index, v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribI2iv)(GLuint index, const GLint *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[896];
+ ((void (APIENTRY *)(GLuint index, const GLint *v)) _func)(index, v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribI2uiEXT)(GLuint index, GLuint x, GLuint y)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[897];
+ ((void (APIENTRY *)(GLuint index, GLuint x, GLuint y)) _func)(index, x, y);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribI2ui)(GLuint index, GLuint x, GLuint y)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[897];
+ ((void (APIENTRY *)(GLuint index, GLuint x, GLuint y)) _func)(index, x, y);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribI2uivEXT)(GLuint index, const GLuint *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[898];
+ ((void (APIENTRY *)(GLuint index, const GLuint *v)) _func)(index, v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribI2uiv)(GLuint index, const GLuint *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[898];
+ ((void (APIENTRY *)(GLuint index, const GLuint *v)) _func)(index, v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribI3iEXT)(GLuint index, GLint x, GLint y, GLint z)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[899];
+ ((void (APIENTRY *)(GLuint index, GLint x, GLint y, GLint z)) _func)(index, x, y, z);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribI3i)(GLuint index, GLint x, GLint y, GLint z)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[899];
+ ((void (APIENTRY *)(GLuint index, GLint x, GLint y, GLint z)) _func)(index, x, y, z);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribI3ivEXT)(GLuint index, const GLint *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[900];
+ ((void (APIENTRY *)(GLuint index, const GLint *v)) _func)(index, v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribI3iv)(GLuint index, const GLint *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[900];
+ ((void (APIENTRY *)(GLuint index, const GLint *v)) _func)(index, v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribI3uiEXT)(GLuint index, GLuint x, GLuint y, GLuint z)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[901];
+ ((void (APIENTRY *)(GLuint index, GLuint x, GLuint y, GLuint z)) _func)(index, x, y, z);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribI3ui)(GLuint index, GLuint x, GLuint y, GLuint z)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[901];
+ ((void (APIENTRY *)(GLuint index, GLuint x, GLuint y, GLuint z)) _func)(index, x, y, z);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribI3uivEXT)(GLuint index, const GLuint *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[902];
+ ((void (APIENTRY *)(GLuint index, const GLuint *v)) _func)(index, v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribI3uiv)(GLuint index, const GLuint *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[902];
+ ((void (APIENTRY *)(GLuint index, const GLuint *v)) _func)(index, v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribI4bvEXT)(GLuint index, const GLbyte *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[903];
+ ((void (APIENTRY *)(GLuint index, const GLbyte *v)) _func)(index, v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribI4bv)(GLuint index, const GLbyte *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[903];
+ ((void (APIENTRY *)(GLuint index, const GLbyte *v)) _func)(index, v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribI4iEXT)(GLuint index, GLint x, GLint y, GLint z, GLint w)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[904];
+ ((void (APIENTRY *)(GLuint index, GLint x, GLint y, GLint z, GLint w)) _func)(index, x, y, z, w);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribI4i)(GLuint index, GLint x, GLint y, GLint z, GLint w)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[904];
+ ((void (APIENTRY *)(GLuint index, GLint x, GLint y, GLint z, GLint w)) _func)(index, x, y, z, w);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribI4ivEXT)(GLuint index, const GLint *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[905];
+ ((void (APIENTRY *)(GLuint index, const GLint *v)) _func)(index, v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribI4iv)(GLuint index, const GLint *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[905];
+ ((void (APIENTRY *)(GLuint index, const GLint *v)) _func)(index, v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribI4svEXT)(GLuint index, const GLshort *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[906];
+ ((void (APIENTRY *)(GLuint index, const GLshort *v)) _func)(index, v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribI4sv)(GLuint index, const GLshort *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[906];
+ ((void (APIENTRY *)(GLuint index, const GLshort *v)) _func)(index, v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribI4ubvEXT)(GLuint index, const GLubyte *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[907];
+ ((void (APIENTRY *)(GLuint index, const GLubyte *v)) _func)(index, v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribI4ubv)(GLuint index, const GLubyte *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[907];
+ ((void (APIENTRY *)(GLuint index, const GLubyte *v)) _func)(index, v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribI4uiEXT)(GLuint index, GLuint x, GLuint y, GLuint z, GLuint w)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[908];
+ ((void (APIENTRY *)(GLuint index, GLuint x, GLuint y, GLuint z, GLuint w)) _func)(index, x, y, z, w);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribI4ui)(GLuint index, GLuint x, GLuint y, GLuint z, GLuint w)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[908];
+ ((void (APIENTRY *)(GLuint index, GLuint x, GLuint y, GLuint z, GLuint w)) _func)(index, x, y, z, w);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribI4uivEXT)(GLuint index, const GLuint *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[909];
+ ((void (APIENTRY *)(GLuint index, const GLuint *v)) _func)(index, v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribI4uiv)(GLuint index, const GLuint *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[909];
+ ((void (APIENTRY *)(GLuint index, const GLuint *v)) _func)(index, v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribI4usvEXT)(GLuint index, const GLushort *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[910];
+ ((void (APIENTRY *)(GLuint index, const GLushort *v)) _func)(index, v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribI4usv)(GLuint index, const GLushort *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[910];
+ ((void (APIENTRY *)(GLuint index, const GLushort *v)) _func)(index, v);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribIPointerEXT)(GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[911];
+ ((void (APIENTRY *)(GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer)) _func)(index, size, type, stride, pointer);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribIPointer)(GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[911];
+ ((void (APIENTRY *)(GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer)) _func)(index, size, type, stride, pointer);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(FramebufferTextureLayerEXT)(GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[912];
+ ((void (APIENTRY *)(GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer)) _func)(target, attachment, texture, level, layer);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(FramebufferTextureLayer)(GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[912];
+ ((void (APIENTRY *)(GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer)) _func)(target, attachment, texture, level, layer);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(ColorMaskIndexedEXT)(GLuint buf, GLboolean r, GLboolean g, GLboolean b, GLboolean a)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[913];
+ ((void (APIENTRY *)(GLuint buf, GLboolean r, GLboolean g, GLboolean b, GLboolean a)) _func)(buf, r, g, b, a);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(ColorMaski)(GLuint buf, GLboolean r, GLboolean g, GLboolean b, GLboolean a)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[913];
+ ((void (APIENTRY *)(GLuint buf, GLboolean r, GLboolean g, GLboolean b, GLboolean a)) _func)(buf, r, g, b, a);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(DisableIndexedEXT)(GLenum target, GLuint index)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[914];
+ ((void (APIENTRY *)(GLenum target, GLuint index)) _func)(target, index);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Disablei)(GLenum target, GLuint index)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[914];
+ ((void (APIENTRY *)(GLenum target, GLuint index)) _func)(target, index);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(EnableIndexedEXT)(GLenum target, GLuint index)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[915];
+ ((void (APIENTRY *)(GLenum target, GLuint index)) _func)(target, index);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(Enablei)(GLenum target, GLuint index)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[915];
+ ((void (APIENTRY *)(GLenum target, GLuint index)) _func)(target, index);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(GetBooleanIndexedvEXT)(GLenum value, GLuint index, GLboolean *data)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[916];
+ ((void (APIENTRY *)(GLenum value, GLuint index, GLboolean *data)) _func)(value, index, data);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(GetBooleani_v)(GLenum value, GLuint index, GLboolean *data)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[916];
+ ((void (APIENTRY *)(GLenum value, GLuint index, GLboolean *data)) _func)(value, index, data);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(GetIntegerIndexedvEXT)(GLenum value, GLuint index, GLint *data)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[917];
+ ((void (APIENTRY *)(GLenum value, GLuint index, GLint *data)) _func)(value, index, data);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(GetIntegeri_v)(GLenum value, GLuint index, GLint *data)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[917];
+ ((void (APIENTRY *)(GLenum value, GLuint index, GLint *data)) _func)(value, index, data);
+}
+
+GLAPI GLboolean APIENTRY GLAPI_PREFIX(IsEnabledIndexedEXT)(GLenum target, GLuint index)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[918];
+ return ((GLboolean (APIENTRY *)(GLenum target, GLuint index)) _func)(target, index);
+}
+
+GLAPI GLboolean APIENTRY GLAPI_PREFIX(IsEnabledi)(GLenum target, GLuint index)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[918];
+ return ((GLboolean (APIENTRY *)(GLenum target, GLuint index)) _func)(target, index);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(ClearColorIiEXT)(GLint r, GLint g, GLint b, GLint a)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[919];
+ ((void (APIENTRY *)(GLint r, GLint g, GLint b, GLint a)) _func)(r, g, b, a);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(ClearColorIuiEXT)(GLuint r, GLuint g, GLuint b, GLuint a)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[920];
+ ((void (APIENTRY *)(GLuint r, GLuint g, GLuint b, GLuint a)) _func)(r, g, b, a);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(GetTexParameterIivEXT)(GLenum target, GLenum pname, GLint *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[921];
+ ((void (APIENTRY *)(GLenum target, GLenum pname, GLint *params)) _func)(target, pname, params);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(GetTexParameterIiv)(GLenum target, GLenum pname, GLint *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[921];
+ ((void (APIENTRY *)(GLenum target, GLenum pname, GLint *params)) _func)(target, pname, params);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(GetTexParameterIuivEXT)(GLenum target, GLenum pname, GLuint *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[922];
+ ((void (APIENTRY *)(GLenum target, GLenum pname, GLuint *params)) _func)(target, pname, params);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(GetTexParameterIuiv)(GLenum target, GLenum pname, GLuint *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[922];
+ ((void (APIENTRY *)(GLenum target, GLenum pname, GLuint *params)) _func)(target, pname, params);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(TexParameterIivEXT)(GLenum target, GLenum pname, const GLint *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[923];
+ ((void (APIENTRY *)(GLenum target, GLenum pname, const GLint *params)) _func)(target, pname, params);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(TexParameterIiv)(GLenum target, GLenum pname, const GLint *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[923];
+ ((void (APIENTRY *)(GLenum target, GLenum pname, const GLint *params)) _func)(target, pname, params);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(TexParameterIuivEXT)(GLenum target, GLenum pname, const GLuint *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[924];
+ ((void (APIENTRY *)(GLenum target, GLenum pname, const GLuint *params)) _func)(target, pname, params);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(TexParameterIuiv)(GLenum target, GLenum pname, const GLuint *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[924];
+ ((void (APIENTRY *)(GLenum target, GLenum pname, const GLuint *params)) _func)(target, pname, params);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(BeginConditionalRenderNV)(GLuint query, GLenum mode)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[925];
+ ((void (APIENTRY *)(GLuint query, GLenum mode)) _func)(query, mode);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(BeginConditionalRender)(GLuint query, GLenum mode)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[925];
+ ((void (APIENTRY *)(GLuint query, GLenum mode)) _func)(query, mode);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(EndConditionalRenderNV)(void)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[926];
+ ((void (APIENTRY *)(void)) _func)();
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(EndConditionalRender)(void)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[926];
+ ((void (APIENTRY *)(void)) _func)();
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(BeginTransformFeedbackEXT)(GLenum mode)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[927];
+ ((void (APIENTRY *)(GLenum mode)) _func)(mode);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(BeginTransformFeedback)(GLenum mode)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[927];
+ ((void (APIENTRY *)(GLenum mode)) _func)(mode);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(BindBufferBaseEXT)(GLenum target, GLuint index, GLuint buffer)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[928];
+ ((void (APIENTRY *)(GLenum target, GLuint index, GLuint buffer)) _func)(target, index, buffer);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(BindBufferBase)(GLenum target, GLuint index, GLuint buffer)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[928];
+ ((void (APIENTRY *)(GLenum target, GLuint index, GLuint buffer)) _func)(target, index, buffer);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(BindBufferOffsetEXT)(GLenum target, GLuint index, GLuint buffer, GLintptr offset)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[929];
+ ((void (APIENTRY *)(GLenum target, GLuint index, GLuint buffer, GLintptr offset)) _func)(target, index, buffer, offset);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(BindBufferRangeEXT)(GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[930];
+ ((void (APIENTRY *)(GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size)) _func)(target, index, buffer, offset, size);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(BindBufferRange)(GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[930];
+ ((void (APIENTRY *)(GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size)) _func)(target, index, buffer, offset, size);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(EndTransformFeedbackEXT)(void)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[931];
+ ((void (APIENTRY *)(void)) _func)();
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(EndTransformFeedback)(void)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[931];
+ ((void (APIENTRY *)(void)) _func)();
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(GetTransformFeedbackVaryingEXT)(GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[932];
+ ((void (APIENTRY *)(GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name)) _func)(program, index, bufSize, length, size, type, name);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(GetTransformFeedbackVarying)(GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[932];
+ ((void (APIENTRY *)(GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name)) _func)(program, index, bufSize, length, size, type, name);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(TransformFeedbackVaryingsEXT)(GLuint program, GLsizei count, const char **varyings, GLenum bufferMode)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[933];
+ ((void (APIENTRY *)(GLuint program, GLsizei count, const char **varyings, GLenum bufferMode)) _func)(program, count, varyings, bufferMode);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(TransformFeedbackVaryings)(GLuint program, GLsizei count, const GLchar* *varyings, GLenum bufferMode)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[933];
+ ((void (APIENTRY *)(GLuint program, GLsizei count, const GLchar* *varyings, GLenum bufferMode)) _func)(program, count, varyings, bufferMode);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(ProvokingVertexEXT)(GLenum mode)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[934];
+ ((void (APIENTRY *)(GLenum mode)) _func)(mode);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(ProvokingVertex)(GLenum mode)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[934];
+ ((void (APIENTRY *)(GLenum mode)) _func)(mode);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(GetObjectParameterivAPPLE)(GLenum objectType, GLuint name, GLenum pname, GLint *value)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[937];
+ ((void (APIENTRY *)(GLenum objectType, GLuint name, GLenum pname, GLint *value)) _func)(objectType, name, pname, value);
+}
+
+GLAPI GLenum APIENTRY GLAPI_PREFIX(ObjectPurgeableAPPLE)(GLenum objectType, GLuint name, GLenum option)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[938];
+ return ((GLenum (APIENTRY *)(GLenum objectType, GLuint name, GLenum option)) _func)(objectType, name, option);
+}
+
+GLAPI GLenum APIENTRY GLAPI_PREFIX(ObjectUnpurgeableAPPLE)(GLenum objectType, GLuint name, GLenum option)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[939];
+ return ((GLenum (APIENTRY *)(GLenum objectType, GLuint name, GLenum option)) _func)(objectType, name, option);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(ActiveProgramEXT)(GLuint program)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[940];
+ ((void (APIENTRY *)(GLuint program)) _func)(program);
+}
+
+GLAPI GLuint APIENTRY GLAPI_PREFIX(CreateShaderProgramEXT)(GLenum type, const GLchar *string)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[941];
+ return ((GLuint (APIENTRY *)(GLenum type, const GLchar *string)) _func)(type, string);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(UseShaderProgramEXT)(GLenum type, GLuint program)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[942];
+ ((void (APIENTRY *)(GLenum type, GLuint program)) _func)(type, program);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(TextureBarrierNV)(void)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[943];
+ ((void (APIENTRY *)(void)) _func)();
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(EGLImageTargetRenderbufferStorageOES)(GLenum target, GLvoid *writeOffset)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[949];
+ ((void (APIENTRY *)(GLenum target, GLvoid *writeOffset)) _func)(target, writeOffset);
+}
+
+GLAPI void APIENTRY GLAPI_PREFIX(EGLImageTargetTexture2DOES)(GLenum target, GLvoid *writeOffset)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[950];
+ ((void (APIENTRY *)(GLenum target, GLvoid *writeOffset)) _func)(target, writeOffset);
+}
+
+/* does not need public_entries */
+#undef MAPI_TMP_PUBLIC_ENTRIES_NO_HIDDEN
+#endif /* MAPI_TMP_PUBLIC_ENTRIES_NO_HIDDEN */
+
+#ifdef MAPI_TMP_STUB_ASM_GCC_NO_HIDDEN
+__asm__(
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(NewList))"\n"
+"\t"STUB_ASM_CODE("0")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(EndList))"\n"
+"\t"STUB_ASM_CODE("1")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(CallList))"\n"
+"\t"STUB_ASM_CODE("2")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(CallLists))"\n"
+"\t"STUB_ASM_CODE("3")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(DeleteLists))"\n"
+"\t"STUB_ASM_CODE("4")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GenLists))"\n"
+"\t"STUB_ASM_CODE("5")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(ListBase))"\n"
+"\t"STUB_ASM_CODE("6")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Begin))"\n"
+"\t"STUB_ASM_CODE("7")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Bitmap))"\n"
+"\t"STUB_ASM_CODE("8")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Color3b))"\n"
+"\t"STUB_ASM_CODE("9")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Color3bv))"\n"
+"\t"STUB_ASM_CODE("10")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Color3d))"\n"
+"\t"STUB_ASM_CODE("11")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Color3dv))"\n"
+"\t"STUB_ASM_CODE("12")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Color3f))"\n"
+"\t"STUB_ASM_CODE("13")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Color3fv))"\n"
+"\t"STUB_ASM_CODE("14")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Color3i))"\n"
+"\t"STUB_ASM_CODE("15")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Color3iv))"\n"
+"\t"STUB_ASM_CODE("16")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Color3s))"\n"
+"\t"STUB_ASM_CODE("17")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Color3sv))"\n"
+"\t"STUB_ASM_CODE("18")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Color3ub))"\n"
+"\t"STUB_ASM_CODE("19")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Color3ubv))"\n"
+"\t"STUB_ASM_CODE("20")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Color3ui))"\n"
+"\t"STUB_ASM_CODE("21")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Color3uiv))"\n"
+"\t"STUB_ASM_CODE("22")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Color3us))"\n"
+"\t"STUB_ASM_CODE("23")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Color3usv))"\n"
+"\t"STUB_ASM_CODE("24")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Color4b))"\n"
+"\t"STUB_ASM_CODE("25")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Color4bv))"\n"
+"\t"STUB_ASM_CODE("26")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Color4d))"\n"
+"\t"STUB_ASM_CODE("27")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Color4dv))"\n"
+"\t"STUB_ASM_CODE("28")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Color4f))"\n"
+"\t"STUB_ASM_CODE("29")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Color4fv))"\n"
+"\t"STUB_ASM_CODE("30")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Color4i))"\n"
+"\t"STUB_ASM_CODE("31")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Color4iv))"\n"
+"\t"STUB_ASM_CODE("32")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Color4s))"\n"
+"\t"STUB_ASM_CODE("33")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Color4sv))"\n"
+"\t"STUB_ASM_CODE("34")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Color4ub))"\n"
+"\t"STUB_ASM_CODE("35")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Color4ubv))"\n"
+"\t"STUB_ASM_CODE("36")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Color4ui))"\n"
+"\t"STUB_ASM_CODE("37")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Color4uiv))"\n"
+"\t"STUB_ASM_CODE("38")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Color4us))"\n"
+"\t"STUB_ASM_CODE("39")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Color4usv))"\n"
+"\t"STUB_ASM_CODE("40")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(EdgeFlag))"\n"
+"\t"STUB_ASM_CODE("41")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(EdgeFlagv))"\n"
+"\t"STUB_ASM_CODE("42")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(End))"\n"
+"\t"STUB_ASM_CODE("43")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Indexd))"\n"
+"\t"STUB_ASM_CODE("44")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Indexdv))"\n"
+"\t"STUB_ASM_CODE("45")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Indexf))"\n"
+"\t"STUB_ASM_CODE("46")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Indexfv))"\n"
+"\t"STUB_ASM_CODE("47")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Indexi))"\n"
+"\t"STUB_ASM_CODE("48")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Indexiv))"\n"
+"\t"STUB_ASM_CODE("49")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Indexs))"\n"
+"\t"STUB_ASM_CODE("50")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Indexsv))"\n"
+"\t"STUB_ASM_CODE("51")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Normal3b))"\n"
+"\t"STUB_ASM_CODE("52")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Normal3bv))"\n"
+"\t"STUB_ASM_CODE("53")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Normal3d))"\n"
+"\t"STUB_ASM_CODE("54")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Normal3dv))"\n"
+"\t"STUB_ASM_CODE("55")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Normal3f))"\n"
+"\t"STUB_ASM_CODE("56")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Normal3fv))"\n"
+"\t"STUB_ASM_CODE("57")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Normal3i))"\n"
+"\t"STUB_ASM_CODE("58")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Normal3iv))"\n"
+"\t"STUB_ASM_CODE("59")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Normal3s))"\n"
+"\t"STUB_ASM_CODE("60")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Normal3sv))"\n"
+"\t"STUB_ASM_CODE("61")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(RasterPos2d))"\n"
+"\t"STUB_ASM_CODE("62")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(RasterPos2dv))"\n"
+"\t"STUB_ASM_CODE("63")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(RasterPos2f))"\n"
+"\t"STUB_ASM_CODE("64")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(RasterPos2fv))"\n"
+"\t"STUB_ASM_CODE("65")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(RasterPos2i))"\n"
+"\t"STUB_ASM_CODE("66")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(RasterPos2iv))"\n"
+"\t"STUB_ASM_CODE("67")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(RasterPos2s))"\n"
+"\t"STUB_ASM_CODE("68")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(RasterPos2sv))"\n"
+"\t"STUB_ASM_CODE("69")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(RasterPos3d))"\n"
+"\t"STUB_ASM_CODE("70")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(RasterPos3dv))"\n"
+"\t"STUB_ASM_CODE("71")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(RasterPos3f))"\n"
+"\t"STUB_ASM_CODE("72")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(RasterPos3fv))"\n"
+"\t"STUB_ASM_CODE("73")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(RasterPos3i))"\n"
+"\t"STUB_ASM_CODE("74")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(RasterPos3iv))"\n"
+"\t"STUB_ASM_CODE("75")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(RasterPos3s))"\n"
+"\t"STUB_ASM_CODE("76")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(RasterPos3sv))"\n"
+"\t"STUB_ASM_CODE("77")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(RasterPos4d))"\n"
+"\t"STUB_ASM_CODE("78")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(RasterPos4dv))"\n"
+"\t"STUB_ASM_CODE("79")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(RasterPos4f))"\n"
+"\t"STUB_ASM_CODE("80")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(RasterPos4fv))"\n"
+"\t"STUB_ASM_CODE("81")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(RasterPos4i))"\n"
+"\t"STUB_ASM_CODE("82")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(RasterPos4iv))"\n"
+"\t"STUB_ASM_CODE("83")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(RasterPos4s))"\n"
+"\t"STUB_ASM_CODE("84")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(RasterPos4sv))"\n"
+"\t"STUB_ASM_CODE("85")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Rectd))"\n"
+"\t"STUB_ASM_CODE("86")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Rectdv))"\n"
+"\t"STUB_ASM_CODE("87")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Rectf))"\n"
+"\t"STUB_ASM_CODE("88")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Rectfv))"\n"
+"\t"STUB_ASM_CODE("89")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Recti))"\n"
+"\t"STUB_ASM_CODE("90")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Rectiv))"\n"
+"\t"STUB_ASM_CODE("91")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Rects))"\n"
+"\t"STUB_ASM_CODE("92")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Rectsv))"\n"
+"\t"STUB_ASM_CODE("93")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(TexCoord1d))"\n"
+"\t"STUB_ASM_CODE("94")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(TexCoord1dv))"\n"
+"\t"STUB_ASM_CODE("95")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(TexCoord1f))"\n"
+"\t"STUB_ASM_CODE("96")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(TexCoord1fv))"\n"
+"\t"STUB_ASM_CODE("97")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(TexCoord1i))"\n"
+"\t"STUB_ASM_CODE("98")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(TexCoord1iv))"\n"
+"\t"STUB_ASM_CODE("99")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(TexCoord1s))"\n"
+"\t"STUB_ASM_CODE("100")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(TexCoord1sv))"\n"
+"\t"STUB_ASM_CODE("101")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(TexCoord2d))"\n"
+"\t"STUB_ASM_CODE("102")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(TexCoord2dv))"\n"
+"\t"STUB_ASM_CODE("103")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(TexCoord2f))"\n"
+"\t"STUB_ASM_CODE("104")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(TexCoord2fv))"\n"
+"\t"STUB_ASM_CODE("105")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(TexCoord2i))"\n"
+"\t"STUB_ASM_CODE("106")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(TexCoord2iv))"\n"
+"\t"STUB_ASM_CODE("107")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(TexCoord2s))"\n"
+"\t"STUB_ASM_CODE("108")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(TexCoord2sv))"\n"
+"\t"STUB_ASM_CODE("109")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(TexCoord3d))"\n"
+"\t"STUB_ASM_CODE("110")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(TexCoord3dv))"\n"
+"\t"STUB_ASM_CODE("111")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(TexCoord3f))"\n"
+"\t"STUB_ASM_CODE("112")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(TexCoord3fv))"\n"
+"\t"STUB_ASM_CODE("113")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(TexCoord3i))"\n"
+"\t"STUB_ASM_CODE("114")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(TexCoord3iv))"\n"
+"\t"STUB_ASM_CODE("115")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(TexCoord3s))"\n"
+"\t"STUB_ASM_CODE("116")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(TexCoord3sv))"\n"
+"\t"STUB_ASM_CODE("117")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(TexCoord4d))"\n"
+"\t"STUB_ASM_CODE("118")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(TexCoord4dv))"\n"
+"\t"STUB_ASM_CODE("119")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(TexCoord4f))"\n"
+"\t"STUB_ASM_CODE("120")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(TexCoord4fv))"\n"
+"\t"STUB_ASM_CODE("121")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(TexCoord4i))"\n"
+"\t"STUB_ASM_CODE("122")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(TexCoord4iv))"\n"
+"\t"STUB_ASM_CODE("123")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(TexCoord4s))"\n"
+"\t"STUB_ASM_CODE("124")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(TexCoord4sv))"\n"
+"\t"STUB_ASM_CODE("125")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Vertex2d))"\n"
+"\t"STUB_ASM_CODE("126")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Vertex2dv))"\n"
+"\t"STUB_ASM_CODE("127")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Vertex2f))"\n"
+"\t"STUB_ASM_CODE("128")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Vertex2fv))"\n"
+"\t"STUB_ASM_CODE("129")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Vertex2i))"\n"
+"\t"STUB_ASM_CODE("130")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Vertex2iv))"\n"
+"\t"STUB_ASM_CODE("131")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Vertex2s))"\n"
+"\t"STUB_ASM_CODE("132")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Vertex2sv))"\n"
+"\t"STUB_ASM_CODE("133")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Vertex3d))"\n"
+"\t"STUB_ASM_CODE("134")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Vertex3dv))"\n"
+"\t"STUB_ASM_CODE("135")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Vertex3f))"\n"
+"\t"STUB_ASM_CODE("136")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Vertex3fv))"\n"
+"\t"STUB_ASM_CODE("137")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Vertex3i))"\n"
+"\t"STUB_ASM_CODE("138")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Vertex3iv))"\n"
+"\t"STUB_ASM_CODE("139")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Vertex3s))"\n"
+"\t"STUB_ASM_CODE("140")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Vertex3sv))"\n"
+"\t"STUB_ASM_CODE("141")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Vertex4d))"\n"
+"\t"STUB_ASM_CODE("142")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Vertex4dv))"\n"
+"\t"STUB_ASM_CODE("143")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Vertex4f))"\n"
+"\t"STUB_ASM_CODE("144")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Vertex4fv))"\n"
+"\t"STUB_ASM_CODE("145")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Vertex4i))"\n"
+"\t"STUB_ASM_CODE("146")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Vertex4iv))"\n"
+"\t"STUB_ASM_CODE("147")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Vertex4s))"\n"
+"\t"STUB_ASM_CODE("148")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Vertex4sv))"\n"
+"\t"STUB_ASM_CODE("149")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(ClipPlane))"\n"
+"\t"STUB_ASM_CODE("150")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(ColorMaterial))"\n"
+"\t"STUB_ASM_CODE("151")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(CullFace))"\n"
+"\t"STUB_ASM_CODE("152")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Fogf))"\n"
+"\t"STUB_ASM_CODE("153")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Fogfv))"\n"
+"\t"STUB_ASM_CODE("154")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Fogi))"\n"
+"\t"STUB_ASM_CODE("155")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Fogiv))"\n"
+"\t"STUB_ASM_CODE("156")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(FrontFace))"\n"
+"\t"STUB_ASM_CODE("157")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Hint))"\n"
+"\t"STUB_ASM_CODE("158")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Lightf))"\n"
+"\t"STUB_ASM_CODE("159")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Lightfv))"\n"
+"\t"STUB_ASM_CODE("160")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Lighti))"\n"
+"\t"STUB_ASM_CODE("161")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Lightiv))"\n"
+"\t"STUB_ASM_CODE("162")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(LightModelf))"\n"
+"\t"STUB_ASM_CODE("163")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(LightModelfv))"\n"
+"\t"STUB_ASM_CODE("164")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(LightModeli))"\n"
+"\t"STUB_ASM_CODE("165")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(LightModeliv))"\n"
+"\t"STUB_ASM_CODE("166")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(LineStipple))"\n"
+"\t"STUB_ASM_CODE("167")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(LineWidth))"\n"
+"\t"STUB_ASM_CODE("168")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Materialf))"\n"
+"\t"STUB_ASM_CODE("169")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Materialfv))"\n"
+"\t"STUB_ASM_CODE("170")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Materiali))"\n"
+"\t"STUB_ASM_CODE("171")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Materialiv))"\n"
+"\t"STUB_ASM_CODE("172")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(PointSize))"\n"
+"\t"STUB_ASM_CODE("173")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(PolygonMode))"\n"
+"\t"STUB_ASM_CODE("174")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(PolygonStipple))"\n"
+"\t"STUB_ASM_CODE("175")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Scissor))"\n"
+"\t"STUB_ASM_CODE("176")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(ShadeModel))"\n"
+"\t"STUB_ASM_CODE("177")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(TexParameterf))"\n"
+"\t"STUB_ASM_CODE("178")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(TexParameterfv))"\n"
+"\t"STUB_ASM_CODE("179")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(TexParameteri))"\n"
+"\t"STUB_ASM_CODE("180")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(TexParameteriv))"\n"
+"\t"STUB_ASM_CODE("181")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(TexImage1D))"\n"
+"\t"STUB_ASM_CODE("182")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(TexImage2D))"\n"
+"\t"STUB_ASM_CODE("183")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(TexEnvf))"\n"
+"\t"STUB_ASM_CODE("184")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(TexEnvfv))"\n"
+"\t"STUB_ASM_CODE("185")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(TexEnvi))"\n"
+"\t"STUB_ASM_CODE("186")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(TexEnviv))"\n"
+"\t"STUB_ASM_CODE("187")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(TexGend))"\n"
+"\t"STUB_ASM_CODE("188")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(TexGendv))"\n"
+"\t"STUB_ASM_CODE("189")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(TexGenf))"\n"
+"\t"STUB_ASM_CODE("190")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(TexGenfv))"\n"
+"\t"STUB_ASM_CODE("191")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(TexGeni))"\n"
+"\t"STUB_ASM_CODE("192")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(TexGeniv))"\n"
+"\t"STUB_ASM_CODE("193")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(FeedbackBuffer))"\n"
+"\t"STUB_ASM_CODE("194")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(SelectBuffer))"\n"
+"\t"STUB_ASM_CODE("195")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(RenderMode))"\n"
+"\t"STUB_ASM_CODE("196")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(InitNames))"\n"
+"\t"STUB_ASM_CODE("197")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(LoadName))"\n"
+"\t"STUB_ASM_CODE("198")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(PassThrough))"\n"
+"\t"STUB_ASM_CODE("199")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(PopName))"\n"
+"\t"STUB_ASM_CODE("200")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(PushName))"\n"
+"\t"STUB_ASM_CODE("201")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(DrawBuffer))"\n"
+"\t"STUB_ASM_CODE("202")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Clear))"\n"
+"\t"STUB_ASM_CODE("203")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(ClearAccum))"\n"
+"\t"STUB_ASM_CODE("204")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(ClearIndex))"\n"
+"\t"STUB_ASM_CODE("205")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(ClearColor))"\n"
+"\t"STUB_ASM_CODE("206")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(ClearStencil))"\n"
+"\t"STUB_ASM_CODE("207")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(ClearDepth))"\n"
+"\t"STUB_ASM_CODE("208")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(StencilMask))"\n"
+"\t"STUB_ASM_CODE("209")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(ColorMask))"\n"
+"\t"STUB_ASM_CODE("210")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(DepthMask))"\n"
+"\t"STUB_ASM_CODE("211")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(IndexMask))"\n"
+"\t"STUB_ASM_CODE("212")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Accum))"\n"
+"\t"STUB_ASM_CODE("213")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Disable))"\n"
+"\t"STUB_ASM_CODE("214")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Enable))"\n"
+"\t"STUB_ASM_CODE("215")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Finish))"\n"
+"\t"STUB_ASM_CODE("216")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Flush))"\n"
+"\t"STUB_ASM_CODE("217")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(PopAttrib))"\n"
+"\t"STUB_ASM_CODE("218")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(PushAttrib))"\n"
+"\t"STUB_ASM_CODE("219")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Map1d))"\n"
+"\t"STUB_ASM_CODE("220")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Map1f))"\n"
+"\t"STUB_ASM_CODE("221")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Map2d))"\n"
+"\t"STUB_ASM_CODE("222")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Map2f))"\n"
+"\t"STUB_ASM_CODE("223")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(MapGrid1d))"\n"
+"\t"STUB_ASM_CODE("224")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(MapGrid1f))"\n"
+"\t"STUB_ASM_CODE("225")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(MapGrid2d))"\n"
+"\t"STUB_ASM_CODE("226")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(MapGrid2f))"\n"
+"\t"STUB_ASM_CODE("227")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(EvalCoord1d))"\n"
+"\t"STUB_ASM_CODE("228")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(EvalCoord1dv))"\n"
+"\t"STUB_ASM_CODE("229")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(EvalCoord1f))"\n"
+"\t"STUB_ASM_CODE("230")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(EvalCoord1fv))"\n"
+"\t"STUB_ASM_CODE("231")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(EvalCoord2d))"\n"
+"\t"STUB_ASM_CODE("232")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(EvalCoord2dv))"\n"
+"\t"STUB_ASM_CODE("233")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(EvalCoord2f))"\n"
+"\t"STUB_ASM_CODE("234")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(EvalCoord2fv))"\n"
+"\t"STUB_ASM_CODE("235")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(EvalMesh1))"\n"
+"\t"STUB_ASM_CODE("236")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(EvalPoint1))"\n"
+"\t"STUB_ASM_CODE("237")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(EvalMesh2))"\n"
+"\t"STUB_ASM_CODE("238")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(EvalPoint2))"\n"
+"\t"STUB_ASM_CODE("239")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(AlphaFunc))"\n"
+"\t"STUB_ASM_CODE("240")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(BlendFunc))"\n"
+"\t"STUB_ASM_CODE("241")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(LogicOp))"\n"
+"\t"STUB_ASM_CODE("242")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(StencilFunc))"\n"
+"\t"STUB_ASM_CODE("243")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(StencilOp))"\n"
+"\t"STUB_ASM_CODE("244")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(DepthFunc))"\n"
+"\t"STUB_ASM_CODE("245")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(PixelZoom))"\n"
+"\t"STUB_ASM_CODE("246")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(PixelTransferf))"\n"
+"\t"STUB_ASM_CODE("247")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(PixelTransferi))"\n"
+"\t"STUB_ASM_CODE("248")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(PixelStoref))"\n"
+"\t"STUB_ASM_CODE("249")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(PixelStorei))"\n"
+"\t"STUB_ASM_CODE("250")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(PixelMapfv))"\n"
+"\t"STUB_ASM_CODE("251")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(PixelMapuiv))"\n"
+"\t"STUB_ASM_CODE("252")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(PixelMapusv))"\n"
+"\t"STUB_ASM_CODE("253")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(ReadBuffer))"\n"
+"\t"STUB_ASM_CODE("254")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(CopyPixels))"\n"
+"\t"STUB_ASM_CODE("255")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(ReadPixels))"\n"
+"\t"STUB_ASM_CODE("256")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(DrawPixels))"\n"
+"\t"STUB_ASM_CODE("257")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetBooleanv))"\n"
+"\t"STUB_ASM_CODE("258")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetClipPlane))"\n"
+"\t"STUB_ASM_CODE("259")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetDoublev))"\n"
+"\t"STUB_ASM_CODE("260")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetError))"\n"
+"\t"STUB_ASM_CODE("261")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetFloatv))"\n"
+"\t"STUB_ASM_CODE("262")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetIntegerv))"\n"
+"\t"STUB_ASM_CODE("263")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetLightfv))"\n"
+"\t"STUB_ASM_CODE("264")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetLightiv))"\n"
+"\t"STUB_ASM_CODE("265")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetMapdv))"\n"
+"\t"STUB_ASM_CODE("266")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetMapfv))"\n"
+"\t"STUB_ASM_CODE("267")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetMapiv))"\n"
+"\t"STUB_ASM_CODE("268")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetMaterialfv))"\n"
+"\t"STUB_ASM_CODE("269")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetMaterialiv))"\n"
+"\t"STUB_ASM_CODE("270")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetPixelMapfv))"\n"
+"\t"STUB_ASM_CODE("271")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetPixelMapuiv))"\n"
+"\t"STUB_ASM_CODE("272")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetPixelMapusv))"\n"
+"\t"STUB_ASM_CODE("273")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetPolygonStipple))"\n"
+"\t"STUB_ASM_CODE("274")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetString))"\n"
+"\t"STUB_ASM_CODE("275")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetTexEnvfv))"\n"
+"\t"STUB_ASM_CODE("276")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetTexEnviv))"\n"
+"\t"STUB_ASM_CODE("277")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetTexGendv))"\n"
+"\t"STUB_ASM_CODE("278")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetTexGenfv))"\n"
+"\t"STUB_ASM_CODE("279")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetTexGeniv))"\n"
+"\t"STUB_ASM_CODE("280")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetTexImage))"\n"
+"\t"STUB_ASM_CODE("281")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetTexParameterfv))"\n"
+"\t"STUB_ASM_CODE("282")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetTexParameteriv))"\n"
+"\t"STUB_ASM_CODE("283")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetTexLevelParameterfv))"\n"
+"\t"STUB_ASM_CODE("284")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetTexLevelParameteriv))"\n"
+"\t"STUB_ASM_CODE("285")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(IsEnabled))"\n"
+"\t"STUB_ASM_CODE("286")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(IsList))"\n"
+"\t"STUB_ASM_CODE("287")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(DepthRange))"\n"
+"\t"STUB_ASM_CODE("288")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Frustum))"\n"
+"\t"STUB_ASM_CODE("289")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(LoadIdentity))"\n"
+"\t"STUB_ASM_CODE("290")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(LoadMatrixf))"\n"
+"\t"STUB_ASM_CODE("291")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(LoadMatrixd))"\n"
+"\t"STUB_ASM_CODE("292")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(MatrixMode))"\n"
+"\t"STUB_ASM_CODE("293")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(MultMatrixf))"\n"
+"\t"STUB_ASM_CODE("294")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(MultMatrixd))"\n"
+"\t"STUB_ASM_CODE("295")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Ortho))"\n"
+"\t"STUB_ASM_CODE("296")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(PopMatrix))"\n"
+"\t"STUB_ASM_CODE("297")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(PushMatrix))"\n"
+"\t"STUB_ASM_CODE("298")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Rotated))"\n"
+"\t"STUB_ASM_CODE("299")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Rotatef))"\n"
+"\t"STUB_ASM_CODE("300")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Scaled))"\n"
+"\t"STUB_ASM_CODE("301")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Scalef))"\n"
+"\t"STUB_ASM_CODE("302")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Translated))"\n"
+"\t"STUB_ASM_CODE("303")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Translatef))"\n"
+"\t"STUB_ASM_CODE("304")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Viewport))"\n"
+"\t"STUB_ASM_CODE("305")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(ArrayElement))"\n"
+"\t"STUB_ASM_CODE("306")"\n"
+
+".globl "GLAPI_PREFIX_STR(ArrayElementEXT)"\n"
+".set "GLAPI_PREFIX_STR(ArrayElementEXT)", "GLAPI_PREFIX_STR(ArrayElement)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(BindTexture))"\n"
+"\t"STUB_ASM_CODE("307")"\n"
+
+".globl "GLAPI_PREFIX_STR(BindTextureEXT)"\n"
+".set "GLAPI_PREFIX_STR(BindTextureEXT)", "GLAPI_PREFIX_STR(BindTexture)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(ColorPointer))"\n"
+"\t"STUB_ASM_CODE("308")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(DisableClientState))"\n"
+"\t"STUB_ASM_CODE("309")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(DrawArrays))"\n"
+"\t"STUB_ASM_CODE("310")"\n"
+
+".globl "GLAPI_PREFIX_STR(DrawArraysEXT)"\n"
+".set "GLAPI_PREFIX_STR(DrawArraysEXT)", "GLAPI_PREFIX_STR(DrawArrays)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(DrawElements))"\n"
+"\t"STUB_ASM_CODE("311")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(EdgeFlagPointer))"\n"
+"\t"STUB_ASM_CODE("312")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(EnableClientState))"\n"
+"\t"STUB_ASM_CODE("313")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(IndexPointer))"\n"
+"\t"STUB_ASM_CODE("314")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Indexub))"\n"
+"\t"STUB_ASM_CODE("315")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Indexubv))"\n"
+"\t"STUB_ASM_CODE("316")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(InterleavedArrays))"\n"
+"\t"STUB_ASM_CODE("317")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(NormalPointer))"\n"
+"\t"STUB_ASM_CODE("318")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(PolygonOffset))"\n"
+"\t"STUB_ASM_CODE("319")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(TexCoordPointer))"\n"
+"\t"STUB_ASM_CODE("320")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexPointer))"\n"
+"\t"STUB_ASM_CODE("321")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(AreTexturesResident))"\n"
+"\t"STUB_ASM_CODE("322")"\n"
+
+#if 0
+".globl "GLAPI_PREFIX_STR(AreTexturesResidentEXT)"\n"
+".set "GLAPI_PREFIX_STR(AreTexturesResidentEXT)", "GLAPI_PREFIX_STR(AreTexturesResident)"\n"
+#endif
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(CopyTexImage1D))"\n"
+"\t"STUB_ASM_CODE("323")"\n"
+
+".globl "GLAPI_PREFIX_STR(CopyTexImage1DEXT)"\n"
+".set "GLAPI_PREFIX_STR(CopyTexImage1DEXT)", "GLAPI_PREFIX_STR(CopyTexImage1D)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(CopyTexImage2D))"\n"
+"\t"STUB_ASM_CODE("324")"\n"
+
+".globl "GLAPI_PREFIX_STR(CopyTexImage2DEXT)"\n"
+".set "GLAPI_PREFIX_STR(CopyTexImage2DEXT)", "GLAPI_PREFIX_STR(CopyTexImage2D)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(CopyTexSubImage1D))"\n"
+"\t"STUB_ASM_CODE("325")"\n"
+
+".globl "GLAPI_PREFIX_STR(CopyTexSubImage1DEXT)"\n"
+".set "GLAPI_PREFIX_STR(CopyTexSubImage1DEXT)", "GLAPI_PREFIX_STR(CopyTexSubImage1D)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(CopyTexSubImage2D))"\n"
+"\t"STUB_ASM_CODE("326")"\n"
+
+".globl "GLAPI_PREFIX_STR(CopyTexSubImage2DEXT)"\n"
+".set "GLAPI_PREFIX_STR(CopyTexSubImage2DEXT)", "GLAPI_PREFIX_STR(CopyTexSubImage2D)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(DeleteTextures))"\n"
+"\t"STUB_ASM_CODE("327")"\n"
+
+#if 0
+".globl "GLAPI_PREFIX_STR(DeleteTexturesEXT)"\n"
+".set "GLAPI_PREFIX_STR(DeleteTexturesEXT)", "GLAPI_PREFIX_STR(DeleteTextures)"\n"
+#endif
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GenTextures))"\n"
+"\t"STUB_ASM_CODE("328")"\n"
+
+#if 0
+".globl "GLAPI_PREFIX_STR(GenTexturesEXT)"\n"
+".set "GLAPI_PREFIX_STR(GenTexturesEXT)", "GLAPI_PREFIX_STR(GenTextures)"\n"
+#endif
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetPointerv))"\n"
+"\t"STUB_ASM_CODE("329")"\n"
+
+".globl "GLAPI_PREFIX_STR(GetPointervEXT)"\n"
+".set "GLAPI_PREFIX_STR(GetPointervEXT)", "GLAPI_PREFIX_STR(GetPointerv)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(IsTexture))"\n"
+"\t"STUB_ASM_CODE("330")"\n"
+
+#if 0
+".globl "GLAPI_PREFIX_STR(IsTextureEXT)"\n"
+".set "GLAPI_PREFIX_STR(IsTextureEXT)", "GLAPI_PREFIX_STR(IsTexture)"\n"
+#endif
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(PrioritizeTextures))"\n"
+"\t"STUB_ASM_CODE("331")"\n"
+
+".globl "GLAPI_PREFIX_STR(PrioritizeTexturesEXT)"\n"
+".set "GLAPI_PREFIX_STR(PrioritizeTexturesEXT)", "GLAPI_PREFIX_STR(PrioritizeTextures)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(TexSubImage1D))"\n"
+"\t"STUB_ASM_CODE("332")"\n"
+
+".globl "GLAPI_PREFIX_STR(TexSubImage1DEXT)"\n"
+".set "GLAPI_PREFIX_STR(TexSubImage1DEXT)", "GLAPI_PREFIX_STR(TexSubImage1D)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(TexSubImage2D))"\n"
+"\t"STUB_ASM_CODE("333")"\n"
+
+".globl "GLAPI_PREFIX_STR(TexSubImage2DEXT)"\n"
+".set "GLAPI_PREFIX_STR(TexSubImage2DEXT)", "GLAPI_PREFIX_STR(TexSubImage2D)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(PopClientAttrib))"\n"
+"\t"STUB_ASM_CODE("334")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(PushClientAttrib))"\n"
+"\t"STUB_ASM_CODE("335")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(BlendColor))"\n"
+"\t"STUB_ASM_CODE("336")"\n"
+
+".globl "GLAPI_PREFIX_STR(BlendColorEXT)"\n"
+".set "GLAPI_PREFIX_STR(BlendColorEXT)", "GLAPI_PREFIX_STR(BlendColor)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(BlendEquation))"\n"
+"\t"STUB_ASM_CODE("337")"\n"
+
+".globl "GLAPI_PREFIX_STR(BlendEquationEXT)"\n"
+".set "GLAPI_PREFIX_STR(BlendEquationEXT)", "GLAPI_PREFIX_STR(BlendEquation)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(DrawRangeElements))"\n"
+"\t"STUB_ASM_CODE("338")"\n"
+
+".globl "GLAPI_PREFIX_STR(DrawRangeElementsEXT)"\n"
+".set "GLAPI_PREFIX_STR(DrawRangeElementsEXT)", "GLAPI_PREFIX_STR(DrawRangeElements)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(ColorTable))"\n"
+"\t"STUB_ASM_CODE("339")"\n"
+
+".globl "GLAPI_PREFIX_STR(ColorTableEXT)"\n"
+".set "GLAPI_PREFIX_STR(ColorTableEXT)", "GLAPI_PREFIX_STR(ColorTable)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(ColorTableParameterfv))"\n"
+"\t"STUB_ASM_CODE("340")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(ColorTableParameteriv))"\n"
+"\t"STUB_ASM_CODE("341")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(CopyColorTable))"\n"
+"\t"STUB_ASM_CODE("342")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetColorTable))"\n"
+"\t"STUB_ASM_CODE("343")"\n"
+
+#if 0
+".globl "GLAPI_PREFIX_STR(GetColorTableEXT)"\n"
+".set "GLAPI_PREFIX_STR(GetColorTableEXT)", "GLAPI_PREFIX_STR(GetColorTable)"\n"
+#endif
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetColorTableParameterfv))"\n"
+"\t"STUB_ASM_CODE("344")"\n"
+
+#if 0
+".globl "GLAPI_PREFIX_STR(GetColorTableParameterfvEXT)"\n"
+".set "GLAPI_PREFIX_STR(GetColorTableParameterfvEXT)", "GLAPI_PREFIX_STR(GetColorTableParameterfv)"\n"
+#endif
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetColorTableParameteriv))"\n"
+"\t"STUB_ASM_CODE("345")"\n"
+
+#if 0
+".globl "GLAPI_PREFIX_STR(GetColorTableParameterivEXT)"\n"
+".set "GLAPI_PREFIX_STR(GetColorTableParameterivEXT)", "GLAPI_PREFIX_STR(GetColorTableParameteriv)"\n"
+#endif
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(ColorSubTable))"\n"
+"\t"STUB_ASM_CODE("346")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(CopyColorSubTable))"\n"
+"\t"STUB_ASM_CODE("347")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(ConvolutionFilter1D))"\n"
+"\t"STUB_ASM_CODE("348")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(ConvolutionFilter2D))"\n"
+"\t"STUB_ASM_CODE("349")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(ConvolutionParameterf))"\n"
+"\t"STUB_ASM_CODE("350")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(ConvolutionParameterfv))"\n"
+"\t"STUB_ASM_CODE("351")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(ConvolutionParameteri))"\n"
+"\t"STUB_ASM_CODE("352")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(ConvolutionParameteriv))"\n"
+"\t"STUB_ASM_CODE("353")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(CopyConvolutionFilter1D))"\n"
+"\t"STUB_ASM_CODE("354")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(CopyConvolutionFilter2D))"\n"
+"\t"STUB_ASM_CODE("355")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetConvolutionFilter))"\n"
+"\t"STUB_ASM_CODE("356")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetConvolutionParameterfv))"\n"
+"\t"STUB_ASM_CODE("357")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetConvolutionParameteriv))"\n"
+"\t"STUB_ASM_CODE("358")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetSeparableFilter))"\n"
+"\t"STUB_ASM_CODE("359")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(SeparableFilter2D))"\n"
+"\t"STUB_ASM_CODE("360")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetHistogram))"\n"
+"\t"STUB_ASM_CODE("361")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetHistogramParameterfv))"\n"
+"\t"STUB_ASM_CODE("362")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetHistogramParameteriv))"\n"
+"\t"STUB_ASM_CODE("363")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetMinmax))"\n"
+"\t"STUB_ASM_CODE("364")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetMinmaxParameterfv))"\n"
+"\t"STUB_ASM_CODE("365")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetMinmaxParameteriv))"\n"
+"\t"STUB_ASM_CODE("366")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Histogram))"\n"
+"\t"STUB_ASM_CODE("367")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Minmax))"\n"
+"\t"STUB_ASM_CODE("368")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(ResetHistogram))"\n"
+"\t"STUB_ASM_CODE("369")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(ResetMinmax))"\n"
+"\t"STUB_ASM_CODE("370")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(TexImage3D))"\n"
+"\t"STUB_ASM_CODE("371")"\n"
+
+".globl "GLAPI_PREFIX_STR(TexImage3DEXT)"\n"
+".set "GLAPI_PREFIX_STR(TexImage3DEXT)", "GLAPI_PREFIX_STR(TexImage3D)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(TexSubImage3D))"\n"
+"\t"STUB_ASM_CODE("372")"\n"
+
+".globl "GLAPI_PREFIX_STR(TexSubImage3DEXT)"\n"
+".set "GLAPI_PREFIX_STR(TexSubImage3DEXT)", "GLAPI_PREFIX_STR(TexSubImage3D)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(CopyTexSubImage3D))"\n"
+"\t"STUB_ASM_CODE("373")"\n"
+
+".globl "GLAPI_PREFIX_STR(CopyTexSubImage3DEXT)"\n"
+".set "GLAPI_PREFIX_STR(CopyTexSubImage3DEXT)", "GLAPI_PREFIX_STR(CopyTexSubImage3D)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(ActiveTextureARB))"\n"
+"\t"STUB_ASM_CODE("374")"\n"
+
+".globl "GLAPI_PREFIX_STR(ActiveTexture)"\n"
+".set "GLAPI_PREFIX_STR(ActiveTexture)", "GLAPI_PREFIX_STR(ActiveTextureARB)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(ClientActiveTextureARB))"\n"
+"\t"STUB_ASM_CODE("375")"\n"
+
+".globl "GLAPI_PREFIX_STR(ClientActiveTexture)"\n"
+".set "GLAPI_PREFIX_STR(ClientActiveTexture)", "GLAPI_PREFIX_STR(ClientActiveTextureARB)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(MultiTexCoord1dARB))"\n"
+"\t"STUB_ASM_CODE("376")"\n"
+
+".globl "GLAPI_PREFIX_STR(MultiTexCoord1d)"\n"
+".set "GLAPI_PREFIX_STR(MultiTexCoord1d)", "GLAPI_PREFIX_STR(MultiTexCoord1dARB)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(MultiTexCoord1dvARB))"\n"
+"\t"STUB_ASM_CODE("377")"\n"
+
+".globl "GLAPI_PREFIX_STR(MultiTexCoord1dv)"\n"
+".set "GLAPI_PREFIX_STR(MultiTexCoord1dv)", "GLAPI_PREFIX_STR(MultiTexCoord1dvARB)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(MultiTexCoord1fARB))"\n"
+"\t"STUB_ASM_CODE("378")"\n"
+
+".globl "GLAPI_PREFIX_STR(MultiTexCoord1f)"\n"
+".set "GLAPI_PREFIX_STR(MultiTexCoord1f)", "GLAPI_PREFIX_STR(MultiTexCoord1fARB)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(MultiTexCoord1fvARB))"\n"
+"\t"STUB_ASM_CODE("379")"\n"
+
+".globl "GLAPI_PREFIX_STR(MultiTexCoord1fv)"\n"
+".set "GLAPI_PREFIX_STR(MultiTexCoord1fv)", "GLAPI_PREFIX_STR(MultiTexCoord1fvARB)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(MultiTexCoord1iARB))"\n"
+"\t"STUB_ASM_CODE("380")"\n"
+
+".globl "GLAPI_PREFIX_STR(MultiTexCoord1i)"\n"
+".set "GLAPI_PREFIX_STR(MultiTexCoord1i)", "GLAPI_PREFIX_STR(MultiTexCoord1iARB)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(MultiTexCoord1ivARB))"\n"
+"\t"STUB_ASM_CODE("381")"\n"
+
+".globl "GLAPI_PREFIX_STR(MultiTexCoord1iv)"\n"
+".set "GLAPI_PREFIX_STR(MultiTexCoord1iv)", "GLAPI_PREFIX_STR(MultiTexCoord1ivARB)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(MultiTexCoord1sARB))"\n"
+"\t"STUB_ASM_CODE("382")"\n"
+
+".globl "GLAPI_PREFIX_STR(MultiTexCoord1s)"\n"
+".set "GLAPI_PREFIX_STR(MultiTexCoord1s)", "GLAPI_PREFIX_STR(MultiTexCoord1sARB)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(MultiTexCoord1svARB))"\n"
+"\t"STUB_ASM_CODE("383")"\n"
+
+".globl "GLAPI_PREFIX_STR(MultiTexCoord1sv)"\n"
+".set "GLAPI_PREFIX_STR(MultiTexCoord1sv)", "GLAPI_PREFIX_STR(MultiTexCoord1svARB)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(MultiTexCoord2dARB))"\n"
+"\t"STUB_ASM_CODE("384")"\n"
+
+".globl "GLAPI_PREFIX_STR(MultiTexCoord2d)"\n"
+".set "GLAPI_PREFIX_STR(MultiTexCoord2d)", "GLAPI_PREFIX_STR(MultiTexCoord2dARB)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(MultiTexCoord2dvARB))"\n"
+"\t"STUB_ASM_CODE("385")"\n"
+
+".globl "GLAPI_PREFIX_STR(MultiTexCoord2dv)"\n"
+".set "GLAPI_PREFIX_STR(MultiTexCoord2dv)", "GLAPI_PREFIX_STR(MultiTexCoord2dvARB)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(MultiTexCoord2fARB))"\n"
+"\t"STUB_ASM_CODE("386")"\n"
+
+".globl "GLAPI_PREFIX_STR(MultiTexCoord2f)"\n"
+".set "GLAPI_PREFIX_STR(MultiTexCoord2f)", "GLAPI_PREFIX_STR(MultiTexCoord2fARB)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(MultiTexCoord2fvARB))"\n"
+"\t"STUB_ASM_CODE("387")"\n"
+
+".globl "GLAPI_PREFIX_STR(MultiTexCoord2fv)"\n"
+".set "GLAPI_PREFIX_STR(MultiTexCoord2fv)", "GLAPI_PREFIX_STR(MultiTexCoord2fvARB)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(MultiTexCoord2iARB))"\n"
+"\t"STUB_ASM_CODE("388")"\n"
+
+".globl "GLAPI_PREFIX_STR(MultiTexCoord2i)"\n"
+".set "GLAPI_PREFIX_STR(MultiTexCoord2i)", "GLAPI_PREFIX_STR(MultiTexCoord2iARB)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(MultiTexCoord2ivARB))"\n"
+"\t"STUB_ASM_CODE("389")"\n"
+
+".globl "GLAPI_PREFIX_STR(MultiTexCoord2iv)"\n"
+".set "GLAPI_PREFIX_STR(MultiTexCoord2iv)", "GLAPI_PREFIX_STR(MultiTexCoord2ivARB)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(MultiTexCoord2sARB))"\n"
+"\t"STUB_ASM_CODE("390")"\n"
+
+".globl "GLAPI_PREFIX_STR(MultiTexCoord2s)"\n"
+".set "GLAPI_PREFIX_STR(MultiTexCoord2s)", "GLAPI_PREFIX_STR(MultiTexCoord2sARB)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(MultiTexCoord2svARB))"\n"
+"\t"STUB_ASM_CODE("391")"\n"
+
+".globl "GLAPI_PREFIX_STR(MultiTexCoord2sv)"\n"
+".set "GLAPI_PREFIX_STR(MultiTexCoord2sv)", "GLAPI_PREFIX_STR(MultiTexCoord2svARB)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(MultiTexCoord3dARB))"\n"
+"\t"STUB_ASM_CODE("392")"\n"
+
+".globl "GLAPI_PREFIX_STR(MultiTexCoord3d)"\n"
+".set "GLAPI_PREFIX_STR(MultiTexCoord3d)", "GLAPI_PREFIX_STR(MultiTexCoord3dARB)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(MultiTexCoord3dvARB))"\n"
+"\t"STUB_ASM_CODE("393")"\n"
+
+".globl "GLAPI_PREFIX_STR(MultiTexCoord3dv)"\n"
+".set "GLAPI_PREFIX_STR(MultiTexCoord3dv)", "GLAPI_PREFIX_STR(MultiTexCoord3dvARB)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(MultiTexCoord3fARB))"\n"
+"\t"STUB_ASM_CODE("394")"\n"
+
+".globl "GLAPI_PREFIX_STR(MultiTexCoord3f)"\n"
+".set "GLAPI_PREFIX_STR(MultiTexCoord3f)", "GLAPI_PREFIX_STR(MultiTexCoord3fARB)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(MultiTexCoord3fvARB))"\n"
+"\t"STUB_ASM_CODE("395")"\n"
+
+".globl "GLAPI_PREFIX_STR(MultiTexCoord3fv)"\n"
+".set "GLAPI_PREFIX_STR(MultiTexCoord3fv)", "GLAPI_PREFIX_STR(MultiTexCoord3fvARB)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(MultiTexCoord3iARB))"\n"
+"\t"STUB_ASM_CODE("396")"\n"
+
+".globl "GLAPI_PREFIX_STR(MultiTexCoord3i)"\n"
+".set "GLAPI_PREFIX_STR(MultiTexCoord3i)", "GLAPI_PREFIX_STR(MultiTexCoord3iARB)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(MultiTexCoord3ivARB))"\n"
+"\t"STUB_ASM_CODE("397")"\n"
+
+".globl "GLAPI_PREFIX_STR(MultiTexCoord3iv)"\n"
+".set "GLAPI_PREFIX_STR(MultiTexCoord3iv)", "GLAPI_PREFIX_STR(MultiTexCoord3ivARB)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(MultiTexCoord3sARB))"\n"
+"\t"STUB_ASM_CODE("398")"\n"
+
+".globl "GLAPI_PREFIX_STR(MultiTexCoord3s)"\n"
+".set "GLAPI_PREFIX_STR(MultiTexCoord3s)", "GLAPI_PREFIX_STR(MultiTexCoord3sARB)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(MultiTexCoord3svARB))"\n"
+"\t"STUB_ASM_CODE("399")"\n"
+
+".globl "GLAPI_PREFIX_STR(MultiTexCoord3sv)"\n"
+".set "GLAPI_PREFIX_STR(MultiTexCoord3sv)", "GLAPI_PREFIX_STR(MultiTexCoord3svARB)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(MultiTexCoord4dARB))"\n"
+"\t"STUB_ASM_CODE("400")"\n"
+
+".globl "GLAPI_PREFIX_STR(MultiTexCoord4d)"\n"
+".set "GLAPI_PREFIX_STR(MultiTexCoord4d)", "GLAPI_PREFIX_STR(MultiTexCoord4dARB)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(MultiTexCoord4dvARB))"\n"
+"\t"STUB_ASM_CODE("401")"\n"
+
+".globl "GLAPI_PREFIX_STR(MultiTexCoord4dv)"\n"
+".set "GLAPI_PREFIX_STR(MultiTexCoord4dv)", "GLAPI_PREFIX_STR(MultiTexCoord4dvARB)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(MultiTexCoord4fARB))"\n"
+"\t"STUB_ASM_CODE("402")"\n"
+
+".globl "GLAPI_PREFIX_STR(MultiTexCoord4f)"\n"
+".set "GLAPI_PREFIX_STR(MultiTexCoord4f)", "GLAPI_PREFIX_STR(MultiTexCoord4fARB)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(MultiTexCoord4fvARB))"\n"
+"\t"STUB_ASM_CODE("403")"\n"
+
+".globl "GLAPI_PREFIX_STR(MultiTexCoord4fv)"\n"
+".set "GLAPI_PREFIX_STR(MultiTexCoord4fv)", "GLAPI_PREFIX_STR(MultiTexCoord4fvARB)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(MultiTexCoord4iARB))"\n"
+"\t"STUB_ASM_CODE("404")"\n"
+
+".globl "GLAPI_PREFIX_STR(MultiTexCoord4i)"\n"
+".set "GLAPI_PREFIX_STR(MultiTexCoord4i)", "GLAPI_PREFIX_STR(MultiTexCoord4iARB)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(MultiTexCoord4ivARB))"\n"
+"\t"STUB_ASM_CODE("405")"\n"
+
+".globl "GLAPI_PREFIX_STR(MultiTexCoord4iv)"\n"
+".set "GLAPI_PREFIX_STR(MultiTexCoord4iv)", "GLAPI_PREFIX_STR(MultiTexCoord4ivARB)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(MultiTexCoord4sARB))"\n"
+"\t"STUB_ASM_CODE("406")"\n"
+
+".globl "GLAPI_PREFIX_STR(MultiTexCoord4s)"\n"
+".set "GLAPI_PREFIX_STR(MultiTexCoord4s)", "GLAPI_PREFIX_STR(MultiTexCoord4sARB)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(MultiTexCoord4svARB))"\n"
+"\t"STUB_ASM_CODE("407")"\n"
+
+".globl "GLAPI_PREFIX_STR(MultiTexCoord4sv)"\n"
+".set "GLAPI_PREFIX_STR(MultiTexCoord4sv)", "GLAPI_PREFIX_STR(MultiTexCoord4svARB)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(AttachShader))"\n"
+"\t"STUB_ASM_CODE("408")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(CreateProgram))"\n"
+"\t"STUB_ASM_CODE("409")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(CreateShader))"\n"
+"\t"STUB_ASM_CODE("410")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(DeleteProgram))"\n"
+"\t"STUB_ASM_CODE("411")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(DeleteShader))"\n"
+"\t"STUB_ASM_CODE("412")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(DetachShader))"\n"
+"\t"STUB_ASM_CODE("413")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetAttachedShaders))"\n"
+"\t"STUB_ASM_CODE("414")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetProgramInfoLog))"\n"
+"\t"STUB_ASM_CODE("415")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetProgramiv))"\n"
+"\t"STUB_ASM_CODE("416")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetShaderInfoLog))"\n"
+"\t"STUB_ASM_CODE("417")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetShaderiv))"\n"
+"\t"STUB_ASM_CODE("418")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(IsProgram))"\n"
+"\t"STUB_ASM_CODE("419")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(IsShader))"\n"
+"\t"STUB_ASM_CODE("420")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(StencilFuncSeparate))"\n"
+"\t"STUB_ASM_CODE("421")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(StencilMaskSeparate))"\n"
+"\t"STUB_ASM_CODE("422")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(StencilOpSeparate))"\n"
+"\t"STUB_ASM_CODE("423")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(UniformMatrix2x3fv))"\n"
+"\t"STUB_ASM_CODE("424")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(UniformMatrix2x4fv))"\n"
+"\t"STUB_ASM_CODE("425")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(UniformMatrix3x2fv))"\n"
+"\t"STUB_ASM_CODE("426")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(UniformMatrix3x4fv))"\n"
+"\t"STUB_ASM_CODE("427")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(UniformMatrix4x2fv))"\n"
+"\t"STUB_ASM_CODE("428")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(UniformMatrix4x3fv))"\n"
+"\t"STUB_ASM_CODE("429")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(ClampColor))"\n"
+"\t"STUB_ASM_CODE("430")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(ClearBufferfi))"\n"
+"\t"STUB_ASM_CODE("431")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(ClearBufferfv))"\n"
+"\t"STUB_ASM_CODE("432")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(ClearBufferiv))"\n"
+"\t"STUB_ASM_CODE("433")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(ClearBufferuiv))"\n"
+"\t"STUB_ASM_CODE("434")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetStringi))"\n"
+"\t"STUB_ASM_CODE("435")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(TexBuffer))"\n"
+"\t"STUB_ASM_CODE("436")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(FramebufferTexture))"\n"
+"\t"STUB_ASM_CODE("437")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetBufferParameteri64v))"\n"
+"\t"STUB_ASM_CODE("438")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetInteger64i_v))"\n"
+"\t"STUB_ASM_CODE("439")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttribDivisor))"\n"
+"\t"STUB_ASM_CODE("440")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(LoadTransposeMatrixdARB))"\n"
+"\t"STUB_ASM_CODE("441")"\n"
+
+".globl "GLAPI_PREFIX_STR(LoadTransposeMatrixd)"\n"
+".set "GLAPI_PREFIX_STR(LoadTransposeMatrixd)", "GLAPI_PREFIX_STR(LoadTransposeMatrixdARB)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(LoadTransposeMatrixfARB))"\n"
+"\t"STUB_ASM_CODE("442")"\n"
+
+".globl "GLAPI_PREFIX_STR(LoadTransposeMatrixf)"\n"
+".set "GLAPI_PREFIX_STR(LoadTransposeMatrixf)", "GLAPI_PREFIX_STR(LoadTransposeMatrixfARB)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(MultTransposeMatrixdARB))"\n"
+"\t"STUB_ASM_CODE("443")"\n"
+
+".globl "GLAPI_PREFIX_STR(MultTransposeMatrixd)"\n"
+".set "GLAPI_PREFIX_STR(MultTransposeMatrixd)", "GLAPI_PREFIX_STR(MultTransposeMatrixdARB)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(MultTransposeMatrixfARB))"\n"
+"\t"STUB_ASM_CODE("444")"\n"
+
+".globl "GLAPI_PREFIX_STR(MultTransposeMatrixf)"\n"
+".set "GLAPI_PREFIX_STR(MultTransposeMatrixf)", "GLAPI_PREFIX_STR(MultTransposeMatrixfARB)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(SampleCoverageARB))"\n"
+"\t"STUB_ASM_CODE("445")"\n"
+
+".globl "GLAPI_PREFIX_STR(SampleCoverage)"\n"
+".set "GLAPI_PREFIX_STR(SampleCoverage)", "GLAPI_PREFIX_STR(SampleCoverageARB)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(CompressedTexImage1DARB))"\n"
+"\t"STUB_ASM_CODE("446")"\n"
+
+".globl "GLAPI_PREFIX_STR(CompressedTexImage1D)"\n"
+".set "GLAPI_PREFIX_STR(CompressedTexImage1D)", "GLAPI_PREFIX_STR(CompressedTexImage1DARB)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(CompressedTexImage2DARB))"\n"
+"\t"STUB_ASM_CODE("447")"\n"
+
+".globl "GLAPI_PREFIX_STR(CompressedTexImage2D)"\n"
+".set "GLAPI_PREFIX_STR(CompressedTexImage2D)", "GLAPI_PREFIX_STR(CompressedTexImage2DARB)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(CompressedTexImage3DARB))"\n"
+"\t"STUB_ASM_CODE("448")"\n"
+
+".globl "GLAPI_PREFIX_STR(CompressedTexImage3D)"\n"
+".set "GLAPI_PREFIX_STR(CompressedTexImage3D)", "GLAPI_PREFIX_STR(CompressedTexImage3DARB)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(CompressedTexSubImage1DARB))"\n"
+"\t"STUB_ASM_CODE("449")"\n"
+
+".globl "GLAPI_PREFIX_STR(CompressedTexSubImage1D)"\n"
+".set "GLAPI_PREFIX_STR(CompressedTexSubImage1D)", "GLAPI_PREFIX_STR(CompressedTexSubImage1DARB)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(CompressedTexSubImage2DARB))"\n"
+"\t"STUB_ASM_CODE("450")"\n"
+
+".globl "GLAPI_PREFIX_STR(CompressedTexSubImage2D)"\n"
+".set "GLAPI_PREFIX_STR(CompressedTexSubImage2D)", "GLAPI_PREFIX_STR(CompressedTexSubImage2DARB)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(CompressedTexSubImage3DARB))"\n"
+"\t"STUB_ASM_CODE("451")"\n"
+
+".globl "GLAPI_PREFIX_STR(CompressedTexSubImage3D)"\n"
+".set "GLAPI_PREFIX_STR(CompressedTexSubImage3D)", "GLAPI_PREFIX_STR(CompressedTexSubImage3DARB)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetCompressedTexImageARB))"\n"
+"\t"STUB_ASM_CODE("452")"\n"
+
+".globl "GLAPI_PREFIX_STR(GetCompressedTexImage)"\n"
+".set "GLAPI_PREFIX_STR(GetCompressedTexImage)", "GLAPI_PREFIX_STR(GetCompressedTexImageARB)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(DisableVertexAttribArrayARB))"\n"
+"\t"STUB_ASM_CODE("453")"\n"
+
+".globl "GLAPI_PREFIX_STR(DisableVertexAttribArray)"\n"
+".set "GLAPI_PREFIX_STR(DisableVertexAttribArray)", "GLAPI_PREFIX_STR(DisableVertexAttribArrayARB)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(EnableVertexAttribArrayARB))"\n"
+"\t"STUB_ASM_CODE("454")"\n"
+
+".globl "GLAPI_PREFIX_STR(EnableVertexAttribArray)"\n"
+".set "GLAPI_PREFIX_STR(EnableVertexAttribArray)", "GLAPI_PREFIX_STR(EnableVertexAttribArrayARB)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetProgramEnvParameterdvARB))"\n"
+"\t"STUB_ASM_CODE("455")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetProgramEnvParameterfvARB))"\n"
+"\t"STUB_ASM_CODE("456")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetProgramLocalParameterdvARB))"\n"
+"\t"STUB_ASM_CODE("457")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetProgramLocalParameterfvARB))"\n"
+"\t"STUB_ASM_CODE("458")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetProgramStringARB))"\n"
+"\t"STUB_ASM_CODE("459")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetProgramivARB))"\n"
+"\t"STUB_ASM_CODE("460")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetVertexAttribdvARB))"\n"
+"\t"STUB_ASM_CODE("461")"\n"
+
+".globl "GLAPI_PREFIX_STR(GetVertexAttribdv)"\n"
+".set "GLAPI_PREFIX_STR(GetVertexAttribdv)", "GLAPI_PREFIX_STR(GetVertexAttribdvARB)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetVertexAttribfvARB))"\n"
+"\t"STUB_ASM_CODE("462")"\n"
+
+".globl "GLAPI_PREFIX_STR(GetVertexAttribfv)"\n"
+".set "GLAPI_PREFIX_STR(GetVertexAttribfv)", "GLAPI_PREFIX_STR(GetVertexAttribfvARB)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetVertexAttribivARB))"\n"
+"\t"STUB_ASM_CODE("463")"\n"
+
+".globl "GLAPI_PREFIX_STR(GetVertexAttribiv)"\n"
+".set "GLAPI_PREFIX_STR(GetVertexAttribiv)", "GLAPI_PREFIX_STR(GetVertexAttribivARB)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(ProgramEnvParameter4dARB))"\n"
+"\t"STUB_ASM_CODE("464")"\n"
+
+".globl "GLAPI_PREFIX_STR(ProgramParameter4dNV)"\n"
+".set "GLAPI_PREFIX_STR(ProgramParameter4dNV)", "GLAPI_PREFIX_STR(ProgramEnvParameter4dARB)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(ProgramEnvParameter4dvARB))"\n"
+"\t"STUB_ASM_CODE("465")"\n"
+
+".globl "GLAPI_PREFIX_STR(ProgramParameter4dvNV)"\n"
+".set "GLAPI_PREFIX_STR(ProgramParameter4dvNV)", "GLAPI_PREFIX_STR(ProgramEnvParameter4dvARB)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(ProgramEnvParameter4fARB))"\n"
+"\t"STUB_ASM_CODE("466")"\n"
+
+".globl "GLAPI_PREFIX_STR(ProgramParameter4fNV)"\n"
+".set "GLAPI_PREFIX_STR(ProgramParameter4fNV)", "GLAPI_PREFIX_STR(ProgramEnvParameter4fARB)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(ProgramEnvParameter4fvARB))"\n"
+"\t"STUB_ASM_CODE("467")"\n"
+
+".globl "GLAPI_PREFIX_STR(ProgramParameter4fvNV)"\n"
+".set "GLAPI_PREFIX_STR(ProgramParameter4fvNV)", "GLAPI_PREFIX_STR(ProgramEnvParameter4fvARB)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(ProgramLocalParameter4dARB))"\n"
+"\t"STUB_ASM_CODE("468")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(ProgramLocalParameter4dvARB))"\n"
+"\t"STUB_ASM_CODE("469")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(ProgramLocalParameter4fARB))"\n"
+"\t"STUB_ASM_CODE("470")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(ProgramLocalParameter4fvARB))"\n"
+"\t"STUB_ASM_CODE("471")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(ProgramStringARB))"\n"
+"\t"STUB_ASM_CODE("472")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttrib1dARB))"\n"
+"\t"STUB_ASM_CODE("473")"\n"
+
+".globl "GLAPI_PREFIX_STR(VertexAttrib1d)"\n"
+".set "GLAPI_PREFIX_STR(VertexAttrib1d)", "GLAPI_PREFIX_STR(VertexAttrib1dARB)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttrib1dvARB))"\n"
+"\t"STUB_ASM_CODE("474")"\n"
+
+".globl "GLAPI_PREFIX_STR(VertexAttrib1dv)"\n"
+".set "GLAPI_PREFIX_STR(VertexAttrib1dv)", "GLAPI_PREFIX_STR(VertexAttrib1dvARB)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttrib1fARB))"\n"
+"\t"STUB_ASM_CODE("475")"\n"
+
+".globl "GLAPI_PREFIX_STR(VertexAttrib1f)"\n"
+".set "GLAPI_PREFIX_STR(VertexAttrib1f)", "GLAPI_PREFIX_STR(VertexAttrib1fARB)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttrib1fvARB))"\n"
+"\t"STUB_ASM_CODE("476")"\n"
+
+".globl "GLAPI_PREFIX_STR(VertexAttrib1fv)"\n"
+".set "GLAPI_PREFIX_STR(VertexAttrib1fv)", "GLAPI_PREFIX_STR(VertexAttrib1fvARB)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttrib1sARB))"\n"
+"\t"STUB_ASM_CODE("477")"\n"
+
+".globl "GLAPI_PREFIX_STR(VertexAttrib1s)"\n"
+".set "GLAPI_PREFIX_STR(VertexAttrib1s)", "GLAPI_PREFIX_STR(VertexAttrib1sARB)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttrib1svARB))"\n"
+"\t"STUB_ASM_CODE("478")"\n"
+
+".globl "GLAPI_PREFIX_STR(VertexAttrib1sv)"\n"
+".set "GLAPI_PREFIX_STR(VertexAttrib1sv)", "GLAPI_PREFIX_STR(VertexAttrib1svARB)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttrib2dARB))"\n"
+"\t"STUB_ASM_CODE("479")"\n"
+
+".globl "GLAPI_PREFIX_STR(VertexAttrib2d)"\n"
+".set "GLAPI_PREFIX_STR(VertexAttrib2d)", "GLAPI_PREFIX_STR(VertexAttrib2dARB)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttrib2dvARB))"\n"
+"\t"STUB_ASM_CODE("480")"\n"
+
+".globl "GLAPI_PREFIX_STR(VertexAttrib2dv)"\n"
+".set "GLAPI_PREFIX_STR(VertexAttrib2dv)", "GLAPI_PREFIX_STR(VertexAttrib2dvARB)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttrib2fARB))"\n"
+"\t"STUB_ASM_CODE("481")"\n"
+
+".globl "GLAPI_PREFIX_STR(VertexAttrib2f)"\n"
+".set "GLAPI_PREFIX_STR(VertexAttrib2f)", "GLAPI_PREFIX_STR(VertexAttrib2fARB)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttrib2fvARB))"\n"
+"\t"STUB_ASM_CODE("482")"\n"
+
+".globl "GLAPI_PREFIX_STR(VertexAttrib2fv)"\n"
+".set "GLAPI_PREFIX_STR(VertexAttrib2fv)", "GLAPI_PREFIX_STR(VertexAttrib2fvARB)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttrib2sARB))"\n"
+"\t"STUB_ASM_CODE("483")"\n"
+
+".globl "GLAPI_PREFIX_STR(VertexAttrib2s)"\n"
+".set "GLAPI_PREFIX_STR(VertexAttrib2s)", "GLAPI_PREFIX_STR(VertexAttrib2sARB)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttrib2svARB))"\n"
+"\t"STUB_ASM_CODE("484")"\n"
+
+".globl "GLAPI_PREFIX_STR(VertexAttrib2sv)"\n"
+".set "GLAPI_PREFIX_STR(VertexAttrib2sv)", "GLAPI_PREFIX_STR(VertexAttrib2svARB)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttrib3dARB))"\n"
+"\t"STUB_ASM_CODE("485")"\n"
+
+".globl "GLAPI_PREFIX_STR(VertexAttrib3d)"\n"
+".set "GLAPI_PREFIX_STR(VertexAttrib3d)", "GLAPI_PREFIX_STR(VertexAttrib3dARB)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttrib3dvARB))"\n"
+"\t"STUB_ASM_CODE("486")"\n"
+
+".globl "GLAPI_PREFIX_STR(VertexAttrib3dv)"\n"
+".set "GLAPI_PREFIX_STR(VertexAttrib3dv)", "GLAPI_PREFIX_STR(VertexAttrib3dvARB)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttrib3fARB))"\n"
+"\t"STUB_ASM_CODE("487")"\n"
+
+".globl "GLAPI_PREFIX_STR(VertexAttrib3f)"\n"
+".set "GLAPI_PREFIX_STR(VertexAttrib3f)", "GLAPI_PREFIX_STR(VertexAttrib3fARB)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttrib3fvARB))"\n"
+"\t"STUB_ASM_CODE("488")"\n"
+
+".globl "GLAPI_PREFIX_STR(VertexAttrib3fv)"\n"
+".set "GLAPI_PREFIX_STR(VertexAttrib3fv)", "GLAPI_PREFIX_STR(VertexAttrib3fvARB)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttrib3sARB))"\n"
+"\t"STUB_ASM_CODE("489")"\n"
+
+".globl "GLAPI_PREFIX_STR(VertexAttrib3s)"\n"
+".set "GLAPI_PREFIX_STR(VertexAttrib3s)", "GLAPI_PREFIX_STR(VertexAttrib3sARB)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttrib3svARB))"\n"
+"\t"STUB_ASM_CODE("490")"\n"
+
+".globl "GLAPI_PREFIX_STR(VertexAttrib3sv)"\n"
+".set "GLAPI_PREFIX_STR(VertexAttrib3sv)", "GLAPI_PREFIX_STR(VertexAttrib3svARB)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttrib4NbvARB))"\n"
+"\t"STUB_ASM_CODE("491")"\n"
+
+".globl "GLAPI_PREFIX_STR(VertexAttrib4Nbv)"\n"
+".set "GLAPI_PREFIX_STR(VertexAttrib4Nbv)", "GLAPI_PREFIX_STR(VertexAttrib4NbvARB)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttrib4NivARB))"\n"
+"\t"STUB_ASM_CODE("492")"\n"
+
+".globl "GLAPI_PREFIX_STR(VertexAttrib4Niv)"\n"
+".set "GLAPI_PREFIX_STR(VertexAttrib4Niv)", "GLAPI_PREFIX_STR(VertexAttrib4NivARB)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttrib4NsvARB))"\n"
+"\t"STUB_ASM_CODE("493")"\n"
+
+".globl "GLAPI_PREFIX_STR(VertexAttrib4Nsv)"\n"
+".set "GLAPI_PREFIX_STR(VertexAttrib4Nsv)", "GLAPI_PREFIX_STR(VertexAttrib4NsvARB)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttrib4NubARB))"\n"
+"\t"STUB_ASM_CODE("494")"\n"
+
+".globl "GLAPI_PREFIX_STR(VertexAttrib4Nub)"\n"
+".set "GLAPI_PREFIX_STR(VertexAttrib4Nub)", "GLAPI_PREFIX_STR(VertexAttrib4NubARB)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttrib4NubvARB))"\n"
+"\t"STUB_ASM_CODE("495")"\n"
+
+".globl "GLAPI_PREFIX_STR(VertexAttrib4Nubv)"\n"
+".set "GLAPI_PREFIX_STR(VertexAttrib4Nubv)", "GLAPI_PREFIX_STR(VertexAttrib4NubvARB)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttrib4NuivARB))"\n"
+"\t"STUB_ASM_CODE("496")"\n"
+
+".globl "GLAPI_PREFIX_STR(VertexAttrib4Nuiv)"\n"
+".set "GLAPI_PREFIX_STR(VertexAttrib4Nuiv)", "GLAPI_PREFIX_STR(VertexAttrib4NuivARB)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttrib4NusvARB))"\n"
+"\t"STUB_ASM_CODE("497")"\n"
+
+".globl "GLAPI_PREFIX_STR(VertexAttrib4Nusv)"\n"
+".set "GLAPI_PREFIX_STR(VertexAttrib4Nusv)", "GLAPI_PREFIX_STR(VertexAttrib4NusvARB)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttrib4bvARB))"\n"
+"\t"STUB_ASM_CODE("498")"\n"
+
+".globl "GLAPI_PREFIX_STR(VertexAttrib4bv)"\n"
+".set "GLAPI_PREFIX_STR(VertexAttrib4bv)", "GLAPI_PREFIX_STR(VertexAttrib4bvARB)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttrib4dARB))"\n"
+"\t"STUB_ASM_CODE("499")"\n"
+
+".globl "GLAPI_PREFIX_STR(VertexAttrib4d)"\n"
+".set "GLAPI_PREFIX_STR(VertexAttrib4d)", "GLAPI_PREFIX_STR(VertexAttrib4dARB)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttrib4dvARB))"\n"
+"\t"STUB_ASM_CODE("500")"\n"
+
+".globl "GLAPI_PREFIX_STR(VertexAttrib4dv)"\n"
+".set "GLAPI_PREFIX_STR(VertexAttrib4dv)", "GLAPI_PREFIX_STR(VertexAttrib4dvARB)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttrib4fARB))"\n"
+"\t"STUB_ASM_CODE("501")"\n"
+
+".globl "GLAPI_PREFIX_STR(VertexAttrib4f)"\n"
+".set "GLAPI_PREFIX_STR(VertexAttrib4f)", "GLAPI_PREFIX_STR(VertexAttrib4fARB)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttrib4fvARB))"\n"
+"\t"STUB_ASM_CODE("502")"\n"
+
+".globl "GLAPI_PREFIX_STR(VertexAttrib4fv)"\n"
+".set "GLAPI_PREFIX_STR(VertexAttrib4fv)", "GLAPI_PREFIX_STR(VertexAttrib4fvARB)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttrib4ivARB))"\n"
+"\t"STUB_ASM_CODE("503")"\n"
+
+".globl "GLAPI_PREFIX_STR(VertexAttrib4iv)"\n"
+".set "GLAPI_PREFIX_STR(VertexAttrib4iv)", "GLAPI_PREFIX_STR(VertexAttrib4ivARB)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttrib4sARB))"\n"
+"\t"STUB_ASM_CODE("504")"\n"
+
+".globl "GLAPI_PREFIX_STR(VertexAttrib4s)"\n"
+".set "GLAPI_PREFIX_STR(VertexAttrib4s)", "GLAPI_PREFIX_STR(VertexAttrib4sARB)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttrib4svARB))"\n"
+"\t"STUB_ASM_CODE("505")"\n"
+
+".globl "GLAPI_PREFIX_STR(VertexAttrib4sv)"\n"
+".set "GLAPI_PREFIX_STR(VertexAttrib4sv)", "GLAPI_PREFIX_STR(VertexAttrib4svARB)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttrib4ubvARB))"\n"
+"\t"STUB_ASM_CODE("506")"\n"
+
+".globl "GLAPI_PREFIX_STR(VertexAttrib4ubv)"\n"
+".set "GLAPI_PREFIX_STR(VertexAttrib4ubv)", "GLAPI_PREFIX_STR(VertexAttrib4ubvARB)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttrib4uivARB))"\n"
+"\t"STUB_ASM_CODE("507")"\n"
+
+".globl "GLAPI_PREFIX_STR(VertexAttrib4uiv)"\n"
+".set "GLAPI_PREFIX_STR(VertexAttrib4uiv)", "GLAPI_PREFIX_STR(VertexAttrib4uivARB)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttrib4usvARB))"\n"
+"\t"STUB_ASM_CODE("508")"\n"
+
+".globl "GLAPI_PREFIX_STR(VertexAttrib4usv)"\n"
+".set "GLAPI_PREFIX_STR(VertexAttrib4usv)", "GLAPI_PREFIX_STR(VertexAttrib4usvARB)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttribPointerARB))"\n"
+"\t"STUB_ASM_CODE("509")"\n"
+
+".globl "GLAPI_PREFIX_STR(VertexAttribPointer)"\n"
+".set "GLAPI_PREFIX_STR(VertexAttribPointer)", "GLAPI_PREFIX_STR(VertexAttribPointerARB)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(BindBufferARB))"\n"
+"\t"STUB_ASM_CODE("510")"\n"
+
+".globl "GLAPI_PREFIX_STR(BindBuffer)"\n"
+".set "GLAPI_PREFIX_STR(BindBuffer)", "GLAPI_PREFIX_STR(BindBufferARB)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(BufferDataARB))"\n"
+"\t"STUB_ASM_CODE("511")"\n"
+
+".globl "GLAPI_PREFIX_STR(BufferData)"\n"
+".set "GLAPI_PREFIX_STR(BufferData)", "GLAPI_PREFIX_STR(BufferDataARB)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(BufferSubDataARB))"\n"
+"\t"STUB_ASM_CODE("512")"\n"
+
+".globl "GLAPI_PREFIX_STR(BufferSubData)"\n"
+".set "GLAPI_PREFIX_STR(BufferSubData)", "GLAPI_PREFIX_STR(BufferSubDataARB)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(DeleteBuffersARB))"\n"
+"\t"STUB_ASM_CODE("513")"\n"
+
+".globl "GLAPI_PREFIX_STR(DeleteBuffers)"\n"
+".set "GLAPI_PREFIX_STR(DeleteBuffers)", "GLAPI_PREFIX_STR(DeleteBuffersARB)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GenBuffersARB))"\n"
+"\t"STUB_ASM_CODE("514")"\n"
+
+".globl "GLAPI_PREFIX_STR(GenBuffers)"\n"
+".set "GLAPI_PREFIX_STR(GenBuffers)", "GLAPI_PREFIX_STR(GenBuffersARB)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetBufferParameterivARB))"\n"
+"\t"STUB_ASM_CODE("515")"\n"
+
+".globl "GLAPI_PREFIX_STR(GetBufferParameteriv)"\n"
+".set "GLAPI_PREFIX_STR(GetBufferParameteriv)", "GLAPI_PREFIX_STR(GetBufferParameterivARB)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetBufferPointervARB))"\n"
+"\t"STUB_ASM_CODE("516")"\n"
+
+".globl "GLAPI_PREFIX_STR(GetBufferPointerv)"\n"
+".set "GLAPI_PREFIX_STR(GetBufferPointerv)", "GLAPI_PREFIX_STR(GetBufferPointervARB)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetBufferSubDataARB))"\n"
+"\t"STUB_ASM_CODE("517")"\n"
+
+".globl "GLAPI_PREFIX_STR(GetBufferSubData)"\n"
+".set "GLAPI_PREFIX_STR(GetBufferSubData)", "GLAPI_PREFIX_STR(GetBufferSubDataARB)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(IsBufferARB))"\n"
+"\t"STUB_ASM_CODE("518")"\n"
+
+".globl "GLAPI_PREFIX_STR(IsBuffer)"\n"
+".set "GLAPI_PREFIX_STR(IsBuffer)", "GLAPI_PREFIX_STR(IsBufferARB)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(MapBufferARB))"\n"
+"\t"STUB_ASM_CODE("519")"\n"
+
+".globl "GLAPI_PREFIX_STR(MapBuffer)"\n"
+".set "GLAPI_PREFIX_STR(MapBuffer)", "GLAPI_PREFIX_STR(MapBufferARB)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(UnmapBufferARB))"\n"
+"\t"STUB_ASM_CODE("520")"\n"
+
+".globl "GLAPI_PREFIX_STR(UnmapBuffer)"\n"
+".set "GLAPI_PREFIX_STR(UnmapBuffer)", "GLAPI_PREFIX_STR(UnmapBufferARB)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(BeginQueryARB))"\n"
+"\t"STUB_ASM_CODE("521")"\n"
+
+".globl "GLAPI_PREFIX_STR(BeginQuery)"\n"
+".set "GLAPI_PREFIX_STR(BeginQuery)", "GLAPI_PREFIX_STR(BeginQueryARB)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(DeleteQueriesARB))"\n"
+"\t"STUB_ASM_CODE("522")"\n"
+
+".globl "GLAPI_PREFIX_STR(DeleteQueries)"\n"
+".set "GLAPI_PREFIX_STR(DeleteQueries)", "GLAPI_PREFIX_STR(DeleteQueriesARB)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(EndQueryARB))"\n"
+"\t"STUB_ASM_CODE("523")"\n"
+
+".globl "GLAPI_PREFIX_STR(EndQuery)"\n"
+".set "GLAPI_PREFIX_STR(EndQuery)", "GLAPI_PREFIX_STR(EndQueryARB)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GenQueriesARB))"\n"
+"\t"STUB_ASM_CODE("524")"\n"
+
+".globl "GLAPI_PREFIX_STR(GenQueries)"\n"
+".set "GLAPI_PREFIX_STR(GenQueries)", "GLAPI_PREFIX_STR(GenQueriesARB)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetQueryObjectivARB))"\n"
+"\t"STUB_ASM_CODE("525")"\n"
+
+".globl "GLAPI_PREFIX_STR(GetQueryObjectiv)"\n"
+".set "GLAPI_PREFIX_STR(GetQueryObjectiv)", "GLAPI_PREFIX_STR(GetQueryObjectivARB)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetQueryObjectuivARB))"\n"
+"\t"STUB_ASM_CODE("526")"\n"
+
+".globl "GLAPI_PREFIX_STR(GetQueryObjectuiv)"\n"
+".set "GLAPI_PREFIX_STR(GetQueryObjectuiv)", "GLAPI_PREFIX_STR(GetQueryObjectuivARB)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetQueryivARB))"\n"
+"\t"STUB_ASM_CODE("527")"\n"
+
+".globl "GLAPI_PREFIX_STR(GetQueryiv)"\n"
+".set "GLAPI_PREFIX_STR(GetQueryiv)", "GLAPI_PREFIX_STR(GetQueryivARB)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(IsQueryARB))"\n"
+"\t"STUB_ASM_CODE("528")"\n"
+
+".globl "GLAPI_PREFIX_STR(IsQuery)"\n"
+".set "GLAPI_PREFIX_STR(IsQuery)", "GLAPI_PREFIX_STR(IsQueryARB)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(AttachObjectARB))"\n"
+"\t"STUB_ASM_CODE("529")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(CompileShaderARB))"\n"
+"\t"STUB_ASM_CODE("530")"\n"
+
+".globl "GLAPI_PREFIX_STR(CompileShader)"\n"
+".set "GLAPI_PREFIX_STR(CompileShader)", "GLAPI_PREFIX_STR(CompileShaderARB)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(CreateProgramObjectARB))"\n"
+"\t"STUB_ASM_CODE("531")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(CreateShaderObjectARB))"\n"
+"\t"STUB_ASM_CODE("532")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(DeleteObjectARB))"\n"
+"\t"STUB_ASM_CODE("533")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(DetachObjectARB))"\n"
+"\t"STUB_ASM_CODE("534")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetActiveUniformARB))"\n"
+"\t"STUB_ASM_CODE("535")"\n"
+
+".globl "GLAPI_PREFIX_STR(GetActiveUniform)"\n"
+".set "GLAPI_PREFIX_STR(GetActiveUniform)", "GLAPI_PREFIX_STR(GetActiveUniformARB)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetAttachedObjectsARB))"\n"
+"\t"STUB_ASM_CODE("536")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetHandleARB))"\n"
+"\t"STUB_ASM_CODE("537")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetInfoLogARB))"\n"
+"\t"STUB_ASM_CODE("538")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetObjectParameterfvARB))"\n"
+"\t"STUB_ASM_CODE("539")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetObjectParameterivARB))"\n"
+"\t"STUB_ASM_CODE("540")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetShaderSourceARB))"\n"
+"\t"STUB_ASM_CODE("541")"\n"
+
+".globl "GLAPI_PREFIX_STR(GetShaderSource)"\n"
+".set "GLAPI_PREFIX_STR(GetShaderSource)", "GLAPI_PREFIX_STR(GetShaderSourceARB)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetUniformLocationARB))"\n"
+"\t"STUB_ASM_CODE("542")"\n"
+
+".globl "GLAPI_PREFIX_STR(GetUniformLocation)"\n"
+".set "GLAPI_PREFIX_STR(GetUniformLocation)", "GLAPI_PREFIX_STR(GetUniformLocationARB)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetUniformfvARB))"\n"
+"\t"STUB_ASM_CODE("543")"\n"
+
+".globl "GLAPI_PREFIX_STR(GetUniformfv)"\n"
+".set "GLAPI_PREFIX_STR(GetUniformfv)", "GLAPI_PREFIX_STR(GetUniformfvARB)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetUniformivARB))"\n"
+"\t"STUB_ASM_CODE("544")"\n"
+
+".globl "GLAPI_PREFIX_STR(GetUniformiv)"\n"
+".set "GLAPI_PREFIX_STR(GetUniformiv)", "GLAPI_PREFIX_STR(GetUniformivARB)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(LinkProgramARB))"\n"
+"\t"STUB_ASM_CODE("545")"\n"
+
+".globl "GLAPI_PREFIX_STR(LinkProgram)"\n"
+".set "GLAPI_PREFIX_STR(LinkProgram)", "GLAPI_PREFIX_STR(LinkProgramARB)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(ShaderSourceARB))"\n"
+"\t"STUB_ASM_CODE("546")"\n"
+
+".globl "GLAPI_PREFIX_STR(ShaderSource)"\n"
+".set "GLAPI_PREFIX_STR(ShaderSource)", "GLAPI_PREFIX_STR(ShaderSourceARB)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Uniform1fARB))"\n"
+"\t"STUB_ASM_CODE("547")"\n"
+
+".globl "GLAPI_PREFIX_STR(Uniform1f)"\n"
+".set "GLAPI_PREFIX_STR(Uniform1f)", "GLAPI_PREFIX_STR(Uniform1fARB)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Uniform1fvARB))"\n"
+"\t"STUB_ASM_CODE("548")"\n"
+
+".globl "GLAPI_PREFIX_STR(Uniform1fv)"\n"
+".set "GLAPI_PREFIX_STR(Uniform1fv)", "GLAPI_PREFIX_STR(Uniform1fvARB)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Uniform1iARB))"\n"
+"\t"STUB_ASM_CODE("549")"\n"
+
+".globl "GLAPI_PREFIX_STR(Uniform1i)"\n"
+".set "GLAPI_PREFIX_STR(Uniform1i)", "GLAPI_PREFIX_STR(Uniform1iARB)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Uniform1ivARB))"\n"
+"\t"STUB_ASM_CODE("550")"\n"
+
+".globl "GLAPI_PREFIX_STR(Uniform1iv)"\n"
+".set "GLAPI_PREFIX_STR(Uniform1iv)", "GLAPI_PREFIX_STR(Uniform1ivARB)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Uniform2fARB))"\n"
+"\t"STUB_ASM_CODE("551")"\n"
+
+".globl "GLAPI_PREFIX_STR(Uniform2f)"\n"
+".set "GLAPI_PREFIX_STR(Uniform2f)", "GLAPI_PREFIX_STR(Uniform2fARB)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Uniform2fvARB))"\n"
+"\t"STUB_ASM_CODE("552")"\n"
+
+".globl "GLAPI_PREFIX_STR(Uniform2fv)"\n"
+".set "GLAPI_PREFIX_STR(Uniform2fv)", "GLAPI_PREFIX_STR(Uniform2fvARB)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Uniform2iARB))"\n"
+"\t"STUB_ASM_CODE("553")"\n"
+
+".globl "GLAPI_PREFIX_STR(Uniform2i)"\n"
+".set "GLAPI_PREFIX_STR(Uniform2i)", "GLAPI_PREFIX_STR(Uniform2iARB)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Uniform2ivARB))"\n"
+"\t"STUB_ASM_CODE("554")"\n"
+
+".globl "GLAPI_PREFIX_STR(Uniform2iv)"\n"
+".set "GLAPI_PREFIX_STR(Uniform2iv)", "GLAPI_PREFIX_STR(Uniform2ivARB)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Uniform3fARB))"\n"
+"\t"STUB_ASM_CODE("555")"\n"
+
+".globl "GLAPI_PREFIX_STR(Uniform3f)"\n"
+".set "GLAPI_PREFIX_STR(Uniform3f)", "GLAPI_PREFIX_STR(Uniform3fARB)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Uniform3fvARB))"\n"
+"\t"STUB_ASM_CODE("556")"\n"
+
+".globl "GLAPI_PREFIX_STR(Uniform3fv)"\n"
+".set "GLAPI_PREFIX_STR(Uniform3fv)", "GLAPI_PREFIX_STR(Uniform3fvARB)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Uniform3iARB))"\n"
+"\t"STUB_ASM_CODE("557")"\n"
+
+".globl "GLAPI_PREFIX_STR(Uniform3i)"\n"
+".set "GLAPI_PREFIX_STR(Uniform3i)", "GLAPI_PREFIX_STR(Uniform3iARB)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Uniform3ivARB))"\n"
+"\t"STUB_ASM_CODE("558")"\n"
+
+".globl "GLAPI_PREFIX_STR(Uniform3iv)"\n"
+".set "GLAPI_PREFIX_STR(Uniform3iv)", "GLAPI_PREFIX_STR(Uniform3ivARB)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Uniform4fARB))"\n"
+"\t"STUB_ASM_CODE("559")"\n"
+
+".globl "GLAPI_PREFIX_STR(Uniform4f)"\n"
+".set "GLAPI_PREFIX_STR(Uniform4f)", "GLAPI_PREFIX_STR(Uniform4fARB)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Uniform4fvARB))"\n"
+"\t"STUB_ASM_CODE("560")"\n"
+
+".globl "GLAPI_PREFIX_STR(Uniform4fv)"\n"
+".set "GLAPI_PREFIX_STR(Uniform4fv)", "GLAPI_PREFIX_STR(Uniform4fvARB)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Uniform4iARB))"\n"
+"\t"STUB_ASM_CODE("561")"\n"
+
+".globl "GLAPI_PREFIX_STR(Uniform4i)"\n"
+".set "GLAPI_PREFIX_STR(Uniform4i)", "GLAPI_PREFIX_STR(Uniform4iARB)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Uniform4ivARB))"\n"
+"\t"STUB_ASM_CODE("562")"\n"
+
+".globl "GLAPI_PREFIX_STR(Uniform4iv)"\n"
+".set "GLAPI_PREFIX_STR(Uniform4iv)", "GLAPI_PREFIX_STR(Uniform4ivARB)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(UniformMatrix2fvARB))"\n"
+"\t"STUB_ASM_CODE("563")"\n"
+
+".globl "GLAPI_PREFIX_STR(UniformMatrix2fv)"\n"
+".set "GLAPI_PREFIX_STR(UniformMatrix2fv)", "GLAPI_PREFIX_STR(UniformMatrix2fvARB)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(UniformMatrix3fvARB))"\n"
+"\t"STUB_ASM_CODE("564")"\n"
+
+".globl "GLAPI_PREFIX_STR(UniformMatrix3fv)"\n"
+".set "GLAPI_PREFIX_STR(UniformMatrix3fv)", "GLAPI_PREFIX_STR(UniformMatrix3fvARB)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(UniformMatrix4fvARB))"\n"
+"\t"STUB_ASM_CODE("565")"\n"
+
+".globl "GLAPI_PREFIX_STR(UniformMatrix4fv)"\n"
+".set "GLAPI_PREFIX_STR(UniformMatrix4fv)", "GLAPI_PREFIX_STR(UniformMatrix4fvARB)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(UseProgramObjectARB))"\n"
+"\t"STUB_ASM_CODE("566")"\n"
+
+".globl "GLAPI_PREFIX_STR(UseProgram)"\n"
+".set "GLAPI_PREFIX_STR(UseProgram)", "GLAPI_PREFIX_STR(UseProgramObjectARB)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(ValidateProgramARB))"\n"
+"\t"STUB_ASM_CODE("567")"\n"
+
+".globl "GLAPI_PREFIX_STR(ValidateProgram)"\n"
+".set "GLAPI_PREFIX_STR(ValidateProgram)", "GLAPI_PREFIX_STR(ValidateProgramARB)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(BindAttribLocationARB))"\n"
+"\t"STUB_ASM_CODE("568")"\n"
+
+".globl "GLAPI_PREFIX_STR(BindAttribLocation)"\n"
+".set "GLAPI_PREFIX_STR(BindAttribLocation)", "GLAPI_PREFIX_STR(BindAttribLocationARB)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetActiveAttribARB))"\n"
+"\t"STUB_ASM_CODE("569")"\n"
+
+".globl "GLAPI_PREFIX_STR(GetActiveAttrib)"\n"
+".set "GLAPI_PREFIX_STR(GetActiveAttrib)", "GLAPI_PREFIX_STR(GetActiveAttribARB)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetAttribLocationARB))"\n"
+"\t"STUB_ASM_CODE("570")"\n"
+
+".globl "GLAPI_PREFIX_STR(GetAttribLocation)"\n"
+".set "GLAPI_PREFIX_STR(GetAttribLocation)", "GLAPI_PREFIX_STR(GetAttribLocationARB)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(DrawBuffersARB))"\n"
+"\t"STUB_ASM_CODE("571")"\n"
+
+".globl "GLAPI_PREFIX_STR(DrawBuffers)"\n"
+".set "GLAPI_PREFIX_STR(DrawBuffers)", "GLAPI_PREFIX_STR(DrawBuffersARB)"\n"
+
+".globl "GLAPI_PREFIX_STR(DrawBuffersATI)"\n"
+".set "GLAPI_PREFIX_STR(DrawBuffersATI)", "GLAPI_PREFIX_STR(DrawBuffersARB)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(DrawArraysInstancedARB))"\n"
+"\t"STUB_ASM_CODE("572")"\n"
+
+".globl "GLAPI_PREFIX_STR(DrawArraysInstanced)"\n"
+".set "GLAPI_PREFIX_STR(DrawArraysInstanced)", "GLAPI_PREFIX_STR(DrawArraysInstancedARB)"\n"
+
+".globl "GLAPI_PREFIX_STR(DrawArraysInstancedEXT)"\n"
+".set "GLAPI_PREFIX_STR(DrawArraysInstancedEXT)", "GLAPI_PREFIX_STR(DrawArraysInstancedARB)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(DrawElementsInstancedARB))"\n"
+"\t"STUB_ASM_CODE("573")"\n"
+
+".globl "GLAPI_PREFIX_STR(DrawElementsInstanced)"\n"
+".set "GLAPI_PREFIX_STR(DrawElementsInstanced)", "GLAPI_PREFIX_STR(DrawElementsInstancedARB)"\n"
+
+".globl "GLAPI_PREFIX_STR(DrawElementsInstancedEXT)"\n"
+".set "GLAPI_PREFIX_STR(DrawElementsInstancedEXT)", "GLAPI_PREFIX_STR(DrawElementsInstancedARB)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(RenderbufferStorageMultisample))"\n"
+"\t"STUB_ASM_CODE("574")"\n"
+
+".globl "GLAPI_PREFIX_STR(RenderbufferStorageMultisampleEXT)"\n"
+".set "GLAPI_PREFIX_STR(RenderbufferStorageMultisampleEXT)", "GLAPI_PREFIX_STR(RenderbufferStorageMultisample)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(FramebufferTextureARB))"\n"
+"\t"STUB_ASM_CODE("575")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(FramebufferTextureFaceARB))"\n"
+"\t"STUB_ASM_CODE("576")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(ProgramParameteriARB))"\n"
+"\t"STUB_ASM_CODE("577")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttribDivisorARB))"\n"
+"\t"STUB_ASM_CODE("578")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(FlushMappedBufferRange))"\n"
+"\t"STUB_ASM_CODE("579")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(MapBufferRange))"\n"
+"\t"STUB_ASM_CODE("580")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(BindVertexArray))"\n"
+"\t"STUB_ASM_CODE("581")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GenVertexArrays))"\n"
+"\t"STUB_ASM_CODE("582")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(CopyBufferSubData))"\n"
+"\t"STUB_ASM_CODE("583")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(ClientWaitSync))"\n"
+"\t"STUB_ASM_CODE("584")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(DeleteSync))"\n"
+"\t"STUB_ASM_CODE("585")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(FenceSync))"\n"
+"\t"STUB_ASM_CODE("586")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetInteger64v))"\n"
+"\t"STUB_ASM_CODE("587")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetSynciv))"\n"
+"\t"STUB_ASM_CODE("588")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(IsSync))"\n"
+"\t"STUB_ASM_CODE("589")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(WaitSync))"\n"
+"\t"STUB_ASM_CODE("590")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(DrawElementsBaseVertex))"\n"
+"\t"STUB_ASM_CODE("591")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(DrawRangeElementsBaseVertex))"\n"
+"\t"STUB_ASM_CODE("592")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(MultiDrawElementsBaseVertex))"\n"
+"\t"STUB_ASM_CODE("593")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(BlendEquationSeparateiARB))"\n"
+"\t"STUB_ASM_CODE("594")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(BlendEquationiARB))"\n"
+"\t"STUB_ASM_CODE("595")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(BlendFuncSeparateiARB))"\n"
+"\t"STUB_ASM_CODE("596")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(BlendFunciARB))"\n"
+"\t"STUB_ASM_CODE("597")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(BindTransformFeedback))"\n"
+"\t"STUB_ASM_CODE("598")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(DeleteTransformFeedbacks))"\n"
+"\t"STUB_ASM_CODE("599")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(DrawTransformFeedback))"\n"
+"\t"STUB_ASM_CODE("600")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GenTransformFeedbacks))"\n"
+"\t"STUB_ASM_CODE("601")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(IsTransformFeedback))"\n"
+"\t"STUB_ASM_CODE("602")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(PauseTransformFeedback))"\n"
+"\t"STUB_ASM_CODE("603")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(ResumeTransformFeedback))"\n"
+"\t"STUB_ASM_CODE("604")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(ClearDepthf))"\n"
+"\t"STUB_ASM_CODE("605")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(DepthRangef))"\n"
+"\t"STUB_ASM_CODE("606")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetShaderPrecisionFormat))"\n"
+"\t"STUB_ASM_CODE("607")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(ReleaseShaderCompiler))"\n"
+"\t"STUB_ASM_CODE("608")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(ShaderBinary))"\n"
+"\t"STUB_ASM_CODE("609")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(PolygonOffsetEXT))"\n"
+"\t"STUB_ASM_CODE("613")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(ColorPointerEXT))"\n"
+"\t"STUB_ASM_CODE("632")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(EdgeFlagPointerEXT))"\n"
+"\t"STUB_ASM_CODE("633")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(IndexPointerEXT))"\n"
+"\t"STUB_ASM_CODE("634")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(NormalPointerEXT))"\n"
+"\t"STUB_ASM_CODE("635")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(TexCoordPointerEXT))"\n"
+"\t"STUB_ASM_CODE("636")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexPointerEXT))"\n"
+"\t"STUB_ASM_CODE("637")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(PointParameterfEXT))"\n"
+"\t"STUB_ASM_CODE("638")"\n"
+
+".globl "GLAPI_PREFIX_STR(PointParameterf)"\n"
+".set "GLAPI_PREFIX_STR(PointParameterf)", "GLAPI_PREFIX_STR(PointParameterfEXT)"\n"
+
+".globl "GLAPI_PREFIX_STR(PointParameterfARB)"\n"
+".set "GLAPI_PREFIX_STR(PointParameterfARB)", "GLAPI_PREFIX_STR(PointParameterfEXT)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(PointParameterfvEXT))"\n"
+"\t"STUB_ASM_CODE("639")"\n"
+
+".globl "GLAPI_PREFIX_STR(PointParameterfv)"\n"
+".set "GLAPI_PREFIX_STR(PointParameterfv)", "GLAPI_PREFIX_STR(PointParameterfvEXT)"\n"
+
+".globl "GLAPI_PREFIX_STR(PointParameterfvARB)"\n"
+".set "GLAPI_PREFIX_STR(PointParameterfvARB)", "GLAPI_PREFIX_STR(PointParameterfvEXT)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(LockArraysEXT))"\n"
+"\t"STUB_ASM_CODE("640")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(UnlockArraysEXT))"\n"
+"\t"STUB_ASM_CODE("641")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(SecondaryColor3bEXT))"\n"
+"\t"STUB_ASM_CODE("642")"\n"
+
+".globl "GLAPI_PREFIX_STR(SecondaryColor3b)"\n"
+".set "GLAPI_PREFIX_STR(SecondaryColor3b)", "GLAPI_PREFIX_STR(SecondaryColor3bEXT)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(SecondaryColor3bvEXT))"\n"
+"\t"STUB_ASM_CODE("643")"\n"
+
+".globl "GLAPI_PREFIX_STR(SecondaryColor3bv)"\n"
+".set "GLAPI_PREFIX_STR(SecondaryColor3bv)", "GLAPI_PREFIX_STR(SecondaryColor3bvEXT)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(SecondaryColor3dEXT))"\n"
+"\t"STUB_ASM_CODE("644")"\n"
+
+".globl "GLAPI_PREFIX_STR(SecondaryColor3d)"\n"
+".set "GLAPI_PREFIX_STR(SecondaryColor3d)", "GLAPI_PREFIX_STR(SecondaryColor3dEXT)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(SecondaryColor3dvEXT))"\n"
+"\t"STUB_ASM_CODE("645")"\n"
+
+".globl "GLAPI_PREFIX_STR(SecondaryColor3dv)"\n"
+".set "GLAPI_PREFIX_STR(SecondaryColor3dv)", "GLAPI_PREFIX_STR(SecondaryColor3dvEXT)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(SecondaryColor3fEXT))"\n"
+"\t"STUB_ASM_CODE("646")"\n"
+
+".globl "GLAPI_PREFIX_STR(SecondaryColor3f)"\n"
+".set "GLAPI_PREFIX_STR(SecondaryColor3f)", "GLAPI_PREFIX_STR(SecondaryColor3fEXT)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(SecondaryColor3fvEXT))"\n"
+"\t"STUB_ASM_CODE("647")"\n"
+
+".globl "GLAPI_PREFIX_STR(SecondaryColor3fv)"\n"
+".set "GLAPI_PREFIX_STR(SecondaryColor3fv)", "GLAPI_PREFIX_STR(SecondaryColor3fvEXT)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(SecondaryColor3iEXT))"\n"
+"\t"STUB_ASM_CODE("648")"\n"
+
+".globl "GLAPI_PREFIX_STR(SecondaryColor3i)"\n"
+".set "GLAPI_PREFIX_STR(SecondaryColor3i)", "GLAPI_PREFIX_STR(SecondaryColor3iEXT)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(SecondaryColor3ivEXT))"\n"
+"\t"STUB_ASM_CODE("649")"\n"
+
+".globl "GLAPI_PREFIX_STR(SecondaryColor3iv)"\n"
+".set "GLAPI_PREFIX_STR(SecondaryColor3iv)", "GLAPI_PREFIX_STR(SecondaryColor3ivEXT)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(SecondaryColor3sEXT))"\n"
+"\t"STUB_ASM_CODE("650")"\n"
+
+".globl "GLAPI_PREFIX_STR(SecondaryColor3s)"\n"
+".set "GLAPI_PREFIX_STR(SecondaryColor3s)", "GLAPI_PREFIX_STR(SecondaryColor3sEXT)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(SecondaryColor3svEXT))"\n"
+"\t"STUB_ASM_CODE("651")"\n"
+
+".globl "GLAPI_PREFIX_STR(SecondaryColor3sv)"\n"
+".set "GLAPI_PREFIX_STR(SecondaryColor3sv)", "GLAPI_PREFIX_STR(SecondaryColor3svEXT)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(SecondaryColor3ubEXT))"\n"
+"\t"STUB_ASM_CODE("652")"\n"
+
+".globl "GLAPI_PREFIX_STR(SecondaryColor3ub)"\n"
+".set "GLAPI_PREFIX_STR(SecondaryColor3ub)", "GLAPI_PREFIX_STR(SecondaryColor3ubEXT)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(SecondaryColor3ubvEXT))"\n"
+"\t"STUB_ASM_CODE("653")"\n"
+
+".globl "GLAPI_PREFIX_STR(SecondaryColor3ubv)"\n"
+".set "GLAPI_PREFIX_STR(SecondaryColor3ubv)", "GLAPI_PREFIX_STR(SecondaryColor3ubvEXT)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(SecondaryColor3uiEXT))"\n"
+"\t"STUB_ASM_CODE("654")"\n"
+
+".globl "GLAPI_PREFIX_STR(SecondaryColor3ui)"\n"
+".set "GLAPI_PREFIX_STR(SecondaryColor3ui)", "GLAPI_PREFIX_STR(SecondaryColor3uiEXT)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(SecondaryColor3uivEXT))"\n"
+"\t"STUB_ASM_CODE("655")"\n"
+
+".globl "GLAPI_PREFIX_STR(SecondaryColor3uiv)"\n"
+".set "GLAPI_PREFIX_STR(SecondaryColor3uiv)", "GLAPI_PREFIX_STR(SecondaryColor3uivEXT)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(SecondaryColor3usEXT))"\n"
+"\t"STUB_ASM_CODE("656")"\n"
+
+".globl "GLAPI_PREFIX_STR(SecondaryColor3us)"\n"
+".set "GLAPI_PREFIX_STR(SecondaryColor3us)", "GLAPI_PREFIX_STR(SecondaryColor3usEXT)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(SecondaryColor3usvEXT))"\n"
+"\t"STUB_ASM_CODE("657")"\n"
+
+".globl "GLAPI_PREFIX_STR(SecondaryColor3usv)"\n"
+".set "GLAPI_PREFIX_STR(SecondaryColor3usv)", "GLAPI_PREFIX_STR(SecondaryColor3usvEXT)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(SecondaryColorPointerEXT))"\n"
+"\t"STUB_ASM_CODE("658")"\n"
+
+".globl "GLAPI_PREFIX_STR(SecondaryColorPointer)"\n"
+".set "GLAPI_PREFIX_STR(SecondaryColorPointer)", "GLAPI_PREFIX_STR(SecondaryColorPointerEXT)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(MultiDrawArraysEXT))"\n"
+"\t"STUB_ASM_CODE("659")"\n"
+
+".globl "GLAPI_PREFIX_STR(MultiDrawArrays)"\n"
+".set "GLAPI_PREFIX_STR(MultiDrawArrays)", "GLAPI_PREFIX_STR(MultiDrawArraysEXT)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(MultiDrawElementsEXT))"\n"
+"\t"STUB_ASM_CODE("660")"\n"
+
+".globl "GLAPI_PREFIX_STR(MultiDrawElements)"\n"
+".set "GLAPI_PREFIX_STR(MultiDrawElements)", "GLAPI_PREFIX_STR(MultiDrawElementsEXT)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(FogCoordPointerEXT))"\n"
+"\t"STUB_ASM_CODE("661")"\n"
+
+".globl "GLAPI_PREFIX_STR(FogCoordPointer)"\n"
+".set "GLAPI_PREFIX_STR(FogCoordPointer)", "GLAPI_PREFIX_STR(FogCoordPointerEXT)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(FogCoorddEXT))"\n"
+"\t"STUB_ASM_CODE("662")"\n"
+
+".globl "GLAPI_PREFIX_STR(FogCoordd)"\n"
+".set "GLAPI_PREFIX_STR(FogCoordd)", "GLAPI_PREFIX_STR(FogCoorddEXT)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(FogCoorddvEXT))"\n"
+"\t"STUB_ASM_CODE("663")"\n"
+
+".globl "GLAPI_PREFIX_STR(FogCoorddv)"\n"
+".set "GLAPI_PREFIX_STR(FogCoorddv)", "GLAPI_PREFIX_STR(FogCoorddvEXT)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(FogCoordfEXT))"\n"
+"\t"STUB_ASM_CODE("664")"\n"
+
+".globl "GLAPI_PREFIX_STR(FogCoordf)"\n"
+".set "GLAPI_PREFIX_STR(FogCoordf)", "GLAPI_PREFIX_STR(FogCoordfEXT)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(FogCoordfvEXT))"\n"
+"\t"STUB_ASM_CODE("665")"\n"
+
+".globl "GLAPI_PREFIX_STR(FogCoordfv)"\n"
+".set "GLAPI_PREFIX_STR(FogCoordfv)", "GLAPI_PREFIX_STR(FogCoordfvEXT)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(BlendFuncSeparateEXT))"\n"
+"\t"STUB_ASM_CODE("667")"\n"
+
+".globl "GLAPI_PREFIX_STR(BlendFuncSeparate)"\n"
+".set "GLAPI_PREFIX_STR(BlendFuncSeparate)", "GLAPI_PREFIX_STR(BlendFuncSeparateEXT)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(FlushVertexArrayRangeNV))"\n"
+"\t"STUB_ASM_CODE("668")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexArrayRangeNV))"\n"
+"\t"STUB_ASM_CODE("669")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(CombinerInputNV))"\n"
+"\t"STUB_ASM_CODE("670")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(CombinerOutputNV))"\n"
+"\t"STUB_ASM_CODE("671")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(CombinerParameterfNV))"\n"
+"\t"STUB_ASM_CODE("672")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(CombinerParameterfvNV))"\n"
+"\t"STUB_ASM_CODE("673")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(CombinerParameteriNV))"\n"
+"\t"STUB_ASM_CODE("674")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(CombinerParameterivNV))"\n"
+"\t"STUB_ASM_CODE("675")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(FinalCombinerInputNV))"\n"
+"\t"STUB_ASM_CODE("676")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetCombinerInputParameterfvNV))"\n"
+"\t"STUB_ASM_CODE("677")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetCombinerInputParameterivNV))"\n"
+"\t"STUB_ASM_CODE("678")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetCombinerOutputParameterfvNV))"\n"
+"\t"STUB_ASM_CODE("679")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetCombinerOutputParameterivNV))"\n"
+"\t"STUB_ASM_CODE("680")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetFinalCombinerInputParameterfvNV))"\n"
+"\t"STUB_ASM_CODE("681")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetFinalCombinerInputParameterivNV))"\n"
+"\t"STUB_ASM_CODE("682")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(ResizeBuffersMESA))"\n"
+"\t"STUB_ASM_CODE("683")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(WindowPos2dMESA))"\n"
+"\t"STUB_ASM_CODE("684")"\n"
+
+".globl "GLAPI_PREFIX_STR(WindowPos2d)"\n"
+".set "GLAPI_PREFIX_STR(WindowPos2d)", "GLAPI_PREFIX_STR(WindowPos2dMESA)"\n"
+
+".globl "GLAPI_PREFIX_STR(WindowPos2dARB)"\n"
+".set "GLAPI_PREFIX_STR(WindowPos2dARB)", "GLAPI_PREFIX_STR(WindowPos2dMESA)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(WindowPos2dvMESA))"\n"
+"\t"STUB_ASM_CODE("685")"\n"
+
+".globl "GLAPI_PREFIX_STR(WindowPos2dv)"\n"
+".set "GLAPI_PREFIX_STR(WindowPos2dv)", "GLAPI_PREFIX_STR(WindowPos2dvMESA)"\n"
+
+".globl "GLAPI_PREFIX_STR(WindowPos2dvARB)"\n"
+".set "GLAPI_PREFIX_STR(WindowPos2dvARB)", "GLAPI_PREFIX_STR(WindowPos2dvMESA)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(WindowPos2fMESA))"\n"
+"\t"STUB_ASM_CODE("686")"\n"
+
+".globl "GLAPI_PREFIX_STR(WindowPos2f)"\n"
+".set "GLAPI_PREFIX_STR(WindowPos2f)", "GLAPI_PREFIX_STR(WindowPos2fMESA)"\n"
+
+".globl "GLAPI_PREFIX_STR(WindowPos2fARB)"\n"
+".set "GLAPI_PREFIX_STR(WindowPos2fARB)", "GLAPI_PREFIX_STR(WindowPos2fMESA)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(WindowPos2fvMESA))"\n"
+"\t"STUB_ASM_CODE("687")"\n"
+
+".globl "GLAPI_PREFIX_STR(WindowPos2fv)"\n"
+".set "GLAPI_PREFIX_STR(WindowPos2fv)", "GLAPI_PREFIX_STR(WindowPos2fvMESA)"\n"
+
+".globl "GLAPI_PREFIX_STR(WindowPos2fvARB)"\n"
+".set "GLAPI_PREFIX_STR(WindowPos2fvARB)", "GLAPI_PREFIX_STR(WindowPos2fvMESA)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(WindowPos2iMESA))"\n"
+"\t"STUB_ASM_CODE("688")"\n"
+
+".globl "GLAPI_PREFIX_STR(WindowPos2i)"\n"
+".set "GLAPI_PREFIX_STR(WindowPos2i)", "GLAPI_PREFIX_STR(WindowPos2iMESA)"\n"
+
+".globl "GLAPI_PREFIX_STR(WindowPos2iARB)"\n"
+".set "GLAPI_PREFIX_STR(WindowPos2iARB)", "GLAPI_PREFIX_STR(WindowPos2iMESA)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(WindowPos2ivMESA))"\n"
+"\t"STUB_ASM_CODE("689")"\n"
+
+".globl "GLAPI_PREFIX_STR(WindowPos2iv)"\n"
+".set "GLAPI_PREFIX_STR(WindowPos2iv)", "GLAPI_PREFIX_STR(WindowPos2ivMESA)"\n"
+
+".globl "GLAPI_PREFIX_STR(WindowPos2ivARB)"\n"
+".set "GLAPI_PREFIX_STR(WindowPos2ivARB)", "GLAPI_PREFIX_STR(WindowPos2ivMESA)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(WindowPos2sMESA))"\n"
+"\t"STUB_ASM_CODE("690")"\n"
+
+".globl "GLAPI_PREFIX_STR(WindowPos2s)"\n"
+".set "GLAPI_PREFIX_STR(WindowPos2s)", "GLAPI_PREFIX_STR(WindowPos2sMESA)"\n"
+
+".globl "GLAPI_PREFIX_STR(WindowPos2sARB)"\n"
+".set "GLAPI_PREFIX_STR(WindowPos2sARB)", "GLAPI_PREFIX_STR(WindowPos2sMESA)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(WindowPos2svMESA))"\n"
+"\t"STUB_ASM_CODE("691")"\n"
+
+".globl "GLAPI_PREFIX_STR(WindowPos2sv)"\n"
+".set "GLAPI_PREFIX_STR(WindowPos2sv)", "GLAPI_PREFIX_STR(WindowPos2svMESA)"\n"
+
+".globl "GLAPI_PREFIX_STR(WindowPos2svARB)"\n"
+".set "GLAPI_PREFIX_STR(WindowPos2svARB)", "GLAPI_PREFIX_STR(WindowPos2svMESA)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(WindowPos3dMESA))"\n"
+"\t"STUB_ASM_CODE("692")"\n"
+
+".globl "GLAPI_PREFIX_STR(WindowPos3d)"\n"
+".set "GLAPI_PREFIX_STR(WindowPos3d)", "GLAPI_PREFIX_STR(WindowPos3dMESA)"\n"
+
+".globl "GLAPI_PREFIX_STR(WindowPos3dARB)"\n"
+".set "GLAPI_PREFIX_STR(WindowPos3dARB)", "GLAPI_PREFIX_STR(WindowPos3dMESA)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(WindowPos3dvMESA))"\n"
+"\t"STUB_ASM_CODE("693")"\n"
+
+".globl "GLAPI_PREFIX_STR(WindowPos3dv)"\n"
+".set "GLAPI_PREFIX_STR(WindowPos3dv)", "GLAPI_PREFIX_STR(WindowPos3dvMESA)"\n"
+
+".globl "GLAPI_PREFIX_STR(WindowPos3dvARB)"\n"
+".set "GLAPI_PREFIX_STR(WindowPos3dvARB)", "GLAPI_PREFIX_STR(WindowPos3dvMESA)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(WindowPos3fMESA))"\n"
+"\t"STUB_ASM_CODE("694")"\n"
+
+".globl "GLAPI_PREFIX_STR(WindowPos3f)"\n"
+".set "GLAPI_PREFIX_STR(WindowPos3f)", "GLAPI_PREFIX_STR(WindowPos3fMESA)"\n"
+
+".globl "GLAPI_PREFIX_STR(WindowPos3fARB)"\n"
+".set "GLAPI_PREFIX_STR(WindowPos3fARB)", "GLAPI_PREFIX_STR(WindowPos3fMESA)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(WindowPos3fvMESA))"\n"
+"\t"STUB_ASM_CODE("695")"\n"
+
+".globl "GLAPI_PREFIX_STR(WindowPos3fv)"\n"
+".set "GLAPI_PREFIX_STR(WindowPos3fv)", "GLAPI_PREFIX_STR(WindowPos3fvMESA)"\n"
+
+".globl "GLAPI_PREFIX_STR(WindowPos3fvARB)"\n"
+".set "GLAPI_PREFIX_STR(WindowPos3fvARB)", "GLAPI_PREFIX_STR(WindowPos3fvMESA)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(WindowPos3iMESA))"\n"
+"\t"STUB_ASM_CODE("696")"\n"
+
+".globl "GLAPI_PREFIX_STR(WindowPos3i)"\n"
+".set "GLAPI_PREFIX_STR(WindowPos3i)", "GLAPI_PREFIX_STR(WindowPos3iMESA)"\n"
+
+".globl "GLAPI_PREFIX_STR(WindowPos3iARB)"\n"
+".set "GLAPI_PREFIX_STR(WindowPos3iARB)", "GLAPI_PREFIX_STR(WindowPos3iMESA)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(WindowPos3ivMESA))"\n"
+"\t"STUB_ASM_CODE("697")"\n"
+
+".globl "GLAPI_PREFIX_STR(WindowPos3iv)"\n"
+".set "GLAPI_PREFIX_STR(WindowPos3iv)", "GLAPI_PREFIX_STR(WindowPos3ivMESA)"\n"
+
+".globl "GLAPI_PREFIX_STR(WindowPos3ivARB)"\n"
+".set "GLAPI_PREFIX_STR(WindowPos3ivARB)", "GLAPI_PREFIX_STR(WindowPos3ivMESA)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(WindowPos3sMESA))"\n"
+"\t"STUB_ASM_CODE("698")"\n"
+
+".globl "GLAPI_PREFIX_STR(WindowPos3s)"\n"
+".set "GLAPI_PREFIX_STR(WindowPos3s)", "GLAPI_PREFIX_STR(WindowPos3sMESA)"\n"
+
+".globl "GLAPI_PREFIX_STR(WindowPos3sARB)"\n"
+".set "GLAPI_PREFIX_STR(WindowPos3sARB)", "GLAPI_PREFIX_STR(WindowPos3sMESA)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(WindowPos3svMESA))"\n"
+"\t"STUB_ASM_CODE("699")"\n"
+
+".globl "GLAPI_PREFIX_STR(WindowPos3sv)"\n"
+".set "GLAPI_PREFIX_STR(WindowPos3sv)", "GLAPI_PREFIX_STR(WindowPos3svMESA)"\n"
+
+".globl "GLAPI_PREFIX_STR(WindowPos3svARB)"\n"
+".set "GLAPI_PREFIX_STR(WindowPos3svARB)", "GLAPI_PREFIX_STR(WindowPos3svMESA)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(WindowPos4dMESA))"\n"
+"\t"STUB_ASM_CODE("700")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(WindowPos4dvMESA))"\n"
+"\t"STUB_ASM_CODE("701")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(WindowPos4fMESA))"\n"
+"\t"STUB_ASM_CODE("702")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(WindowPos4fvMESA))"\n"
+"\t"STUB_ASM_CODE("703")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(WindowPos4iMESA))"\n"
+"\t"STUB_ASM_CODE("704")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(WindowPos4ivMESA))"\n"
+"\t"STUB_ASM_CODE("705")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(WindowPos4sMESA))"\n"
+"\t"STUB_ASM_CODE("706")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(WindowPos4svMESA))"\n"
+"\t"STUB_ASM_CODE("707")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(AreProgramsResidentNV))"\n"
+"\t"STUB_ASM_CODE("717")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(BindProgramNV))"\n"
+"\t"STUB_ASM_CODE("718")"\n"
+
+".globl "GLAPI_PREFIX_STR(BindProgramARB)"\n"
+".set "GLAPI_PREFIX_STR(BindProgramARB)", "GLAPI_PREFIX_STR(BindProgramNV)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(DeleteProgramsNV))"\n"
+"\t"STUB_ASM_CODE("719")"\n"
+
+".globl "GLAPI_PREFIX_STR(DeleteProgramsARB)"\n"
+".set "GLAPI_PREFIX_STR(DeleteProgramsARB)", "GLAPI_PREFIX_STR(DeleteProgramsNV)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(ExecuteProgramNV))"\n"
+"\t"STUB_ASM_CODE("720")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GenProgramsNV))"\n"
+"\t"STUB_ASM_CODE("721")"\n"
+
+".globl "GLAPI_PREFIX_STR(GenProgramsARB)"\n"
+".set "GLAPI_PREFIX_STR(GenProgramsARB)", "GLAPI_PREFIX_STR(GenProgramsNV)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetProgramParameterdvNV))"\n"
+"\t"STUB_ASM_CODE("722")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetProgramParameterfvNV))"\n"
+"\t"STUB_ASM_CODE("723")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetProgramStringNV))"\n"
+"\t"STUB_ASM_CODE("724")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetProgramivNV))"\n"
+"\t"STUB_ASM_CODE("725")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetTrackMatrixivNV))"\n"
+"\t"STUB_ASM_CODE("726")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetVertexAttribPointervNV))"\n"
+"\t"STUB_ASM_CODE("727")"\n"
+
+".globl "GLAPI_PREFIX_STR(GetVertexAttribPointerv)"\n"
+".set "GLAPI_PREFIX_STR(GetVertexAttribPointerv)", "GLAPI_PREFIX_STR(GetVertexAttribPointervNV)"\n"
+
+".globl "GLAPI_PREFIX_STR(GetVertexAttribPointervARB)"\n"
+".set "GLAPI_PREFIX_STR(GetVertexAttribPointervARB)", "GLAPI_PREFIX_STR(GetVertexAttribPointervNV)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetVertexAttribdvNV))"\n"
+"\t"STUB_ASM_CODE("728")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetVertexAttribfvNV))"\n"
+"\t"STUB_ASM_CODE("729")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetVertexAttribivNV))"\n"
+"\t"STUB_ASM_CODE("730")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(IsProgramNV))"\n"
+"\t"STUB_ASM_CODE("731")"\n"
+
+".globl "GLAPI_PREFIX_STR(IsProgramARB)"\n"
+".set "GLAPI_PREFIX_STR(IsProgramARB)", "GLAPI_PREFIX_STR(IsProgramNV)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(LoadProgramNV))"\n"
+"\t"STUB_ASM_CODE("732")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(ProgramParameters4dvNV))"\n"
+"\t"STUB_ASM_CODE("733")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(ProgramParameters4fvNV))"\n"
+"\t"STUB_ASM_CODE("734")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(RequestResidentProgramsNV))"\n"
+"\t"STUB_ASM_CODE("735")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(TrackMatrixNV))"\n"
+"\t"STUB_ASM_CODE("736")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttrib1dNV))"\n"
+"\t"STUB_ASM_CODE("737")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttrib1dvNV))"\n"
+"\t"STUB_ASM_CODE("738")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttrib1fNV))"\n"
+"\t"STUB_ASM_CODE("739")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttrib1fvNV))"\n"
+"\t"STUB_ASM_CODE("740")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttrib1sNV))"\n"
+"\t"STUB_ASM_CODE("741")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttrib1svNV))"\n"
+"\t"STUB_ASM_CODE("742")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttrib2dNV))"\n"
+"\t"STUB_ASM_CODE("743")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttrib2dvNV))"\n"
+"\t"STUB_ASM_CODE("744")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttrib2fNV))"\n"
+"\t"STUB_ASM_CODE("745")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttrib2fvNV))"\n"
+"\t"STUB_ASM_CODE("746")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttrib2sNV))"\n"
+"\t"STUB_ASM_CODE("747")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttrib2svNV))"\n"
+"\t"STUB_ASM_CODE("748")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttrib3dNV))"\n"
+"\t"STUB_ASM_CODE("749")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttrib3dvNV))"\n"
+"\t"STUB_ASM_CODE("750")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttrib3fNV))"\n"
+"\t"STUB_ASM_CODE("751")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttrib3fvNV))"\n"
+"\t"STUB_ASM_CODE("752")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttrib3sNV))"\n"
+"\t"STUB_ASM_CODE("753")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttrib3svNV))"\n"
+"\t"STUB_ASM_CODE("754")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttrib4dNV))"\n"
+"\t"STUB_ASM_CODE("755")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttrib4dvNV))"\n"
+"\t"STUB_ASM_CODE("756")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttrib4fNV))"\n"
+"\t"STUB_ASM_CODE("757")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttrib4fvNV))"\n"
+"\t"STUB_ASM_CODE("758")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttrib4sNV))"\n"
+"\t"STUB_ASM_CODE("759")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttrib4svNV))"\n"
+"\t"STUB_ASM_CODE("760")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttrib4ubNV))"\n"
+"\t"STUB_ASM_CODE("761")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttrib4ubvNV))"\n"
+"\t"STUB_ASM_CODE("762")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttribPointerNV))"\n"
+"\t"STUB_ASM_CODE("763")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttribs1dvNV))"\n"
+"\t"STUB_ASM_CODE("764")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttribs1fvNV))"\n"
+"\t"STUB_ASM_CODE("765")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttribs1svNV))"\n"
+"\t"STUB_ASM_CODE("766")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttribs2dvNV))"\n"
+"\t"STUB_ASM_CODE("767")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttribs2fvNV))"\n"
+"\t"STUB_ASM_CODE("768")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttribs2svNV))"\n"
+"\t"STUB_ASM_CODE("769")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttribs3dvNV))"\n"
+"\t"STUB_ASM_CODE("770")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttribs3fvNV))"\n"
+"\t"STUB_ASM_CODE("771")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttribs3svNV))"\n"
+"\t"STUB_ASM_CODE("772")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttribs4dvNV))"\n"
+"\t"STUB_ASM_CODE("773")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttribs4fvNV))"\n"
+"\t"STUB_ASM_CODE("774")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttribs4svNV))"\n"
+"\t"STUB_ASM_CODE("775")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttribs4ubvNV))"\n"
+"\t"STUB_ASM_CODE("776")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetTexBumpParameterfvATI))"\n"
+"\t"STUB_ASM_CODE("777")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetTexBumpParameterivATI))"\n"
+"\t"STUB_ASM_CODE("778")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(TexBumpParameterfvATI))"\n"
+"\t"STUB_ASM_CODE("779")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(TexBumpParameterivATI))"\n"
+"\t"STUB_ASM_CODE("780")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(AlphaFragmentOp1ATI))"\n"
+"\t"STUB_ASM_CODE("781")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(AlphaFragmentOp2ATI))"\n"
+"\t"STUB_ASM_CODE("782")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(AlphaFragmentOp3ATI))"\n"
+"\t"STUB_ASM_CODE("783")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(BeginFragmentShaderATI))"\n"
+"\t"STUB_ASM_CODE("784")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(BindFragmentShaderATI))"\n"
+"\t"STUB_ASM_CODE("785")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(ColorFragmentOp1ATI))"\n"
+"\t"STUB_ASM_CODE("786")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(ColorFragmentOp2ATI))"\n"
+"\t"STUB_ASM_CODE("787")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(ColorFragmentOp3ATI))"\n"
+"\t"STUB_ASM_CODE("788")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(DeleteFragmentShaderATI))"\n"
+"\t"STUB_ASM_CODE("789")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(EndFragmentShaderATI))"\n"
+"\t"STUB_ASM_CODE("790")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GenFragmentShadersATI))"\n"
+"\t"STUB_ASM_CODE("791")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(PassTexCoordATI))"\n"
+"\t"STUB_ASM_CODE("792")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(SampleMapATI))"\n"
+"\t"STUB_ASM_CODE("793")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(SetFragmentShaderConstantATI))"\n"
+"\t"STUB_ASM_CODE("794")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(PointParameteriNV))"\n"
+"\t"STUB_ASM_CODE("795")"\n"
+
+".globl "GLAPI_PREFIX_STR(PointParameteri)"\n"
+".set "GLAPI_PREFIX_STR(PointParameteri)", "GLAPI_PREFIX_STR(PointParameteriNV)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(PointParameterivNV))"\n"
+"\t"STUB_ASM_CODE("796")"\n"
+
+".globl "GLAPI_PREFIX_STR(PointParameteriv)"\n"
+".set "GLAPI_PREFIX_STR(PointParameteriv)", "GLAPI_PREFIX_STR(PointParameterivNV)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(DeleteVertexArrays))"\n"
+"\t"STUB_ASM_CODE("799")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(IsVertexArray))"\n"
+"\t"STUB_ASM_CODE("801")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetProgramNamedParameterdvNV))"\n"
+"\t"STUB_ASM_CODE("802")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetProgramNamedParameterfvNV))"\n"
+"\t"STUB_ASM_CODE("803")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(ProgramNamedParameter4dNV))"\n"
+"\t"STUB_ASM_CODE("804")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(ProgramNamedParameter4dvNV))"\n"
+"\t"STUB_ASM_CODE("805")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(ProgramNamedParameter4fNV))"\n"
+"\t"STUB_ASM_CODE("806")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(ProgramNamedParameter4fvNV))"\n"
+"\t"STUB_ASM_CODE("807")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(PrimitiveRestartIndexNV))"\n"
+"\t"STUB_ASM_CODE("808")"\n"
+
+".globl "GLAPI_PREFIX_STR(PrimitiveRestartIndex)"\n"
+".set "GLAPI_PREFIX_STR(PrimitiveRestartIndex)", "GLAPI_PREFIX_STR(PrimitiveRestartIndexNV)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(PrimitiveRestartNV))"\n"
+"\t"STUB_ASM_CODE("809")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(BlendEquationSeparate))"\n"
+"\t"STUB_ASM_CODE("857")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(BindFramebufferEXT))"\n"
+"\t"STUB_ASM_CODE("858")"\n"
+
+".globl "GLAPI_PREFIX_STR(BindFramebuffer)"\n"
+".set "GLAPI_PREFIX_STR(BindFramebuffer)", "GLAPI_PREFIX_STR(BindFramebufferEXT)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(BindRenderbufferEXT))"\n"
+"\t"STUB_ASM_CODE("859")"\n"
+
+".globl "GLAPI_PREFIX_STR(BindRenderbuffer)"\n"
+".set "GLAPI_PREFIX_STR(BindRenderbuffer)", "GLAPI_PREFIX_STR(BindRenderbufferEXT)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(CheckFramebufferStatusEXT))"\n"
+"\t"STUB_ASM_CODE("860")"\n"
+
+".globl "GLAPI_PREFIX_STR(CheckFramebufferStatus)"\n"
+".set "GLAPI_PREFIX_STR(CheckFramebufferStatus)", "GLAPI_PREFIX_STR(CheckFramebufferStatusEXT)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(DeleteFramebuffersEXT))"\n"
+"\t"STUB_ASM_CODE("861")"\n"
+
+".globl "GLAPI_PREFIX_STR(DeleteFramebuffers)"\n"
+".set "GLAPI_PREFIX_STR(DeleteFramebuffers)", "GLAPI_PREFIX_STR(DeleteFramebuffersEXT)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(DeleteRenderbuffersEXT))"\n"
+"\t"STUB_ASM_CODE("862")"\n"
+
+".globl "GLAPI_PREFIX_STR(DeleteRenderbuffers)"\n"
+".set "GLAPI_PREFIX_STR(DeleteRenderbuffers)", "GLAPI_PREFIX_STR(DeleteRenderbuffersEXT)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(FramebufferRenderbufferEXT))"\n"
+"\t"STUB_ASM_CODE("863")"\n"
+
+".globl "GLAPI_PREFIX_STR(FramebufferRenderbuffer)"\n"
+".set "GLAPI_PREFIX_STR(FramebufferRenderbuffer)", "GLAPI_PREFIX_STR(FramebufferRenderbufferEXT)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(FramebufferTexture1DEXT))"\n"
+"\t"STUB_ASM_CODE("864")"\n"
+
+".globl "GLAPI_PREFIX_STR(FramebufferTexture1D)"\n"
+".set "GLAPI_PREFIX_STR(FramebufferTexture1D)", "GLAPI_PREFIX_STR(FramebufferTexture1DEXT)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(FramebufferTexture2DEXT))"\n"
+"\t"STUB_ASM_CODE("865")"\n"
+
+".globl "GLAPI_PREFIX_STR(FramebufferTexture2D)"\n"
+".set "GLAPI_PREFIX_STR(FramebufferTexture2D)", "GLAPI_PREFIX_STR(FramebufferTexture2DEXT)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(FramebufferTexture3DEXT))"\n"
+"\t"STUB_ASM_CODE("866")"\n"
+
+".globl "GLAPI_PREFIX_STR(FramebufferTexture3D)"\n"
+".set "GLAPI_PREFIX_STR(FramebufferTexture3D)", "GLAPI_PREFIX_STR(FramebufferTexture3DEXT)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GenFramebuffersEXT))"\n"
+"\t"STUB_ASM_CODE("867")"\n"
+
+".globl "GLAPI_PREFIX_STR(GenFramebuffers)"\n"
+".set "GLAPI_PREFIX_STR(GenFramebuffers)", "GLAPI_PREFIX_STR(GenFramebuffersEXT)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GenRenderbuffersEXT))"\n"
+"\t"STUB_ASM_CODE("868")"\n"
+
+".globl "GLAPI_PREFIX_STR(GenRenderbuffers)"\n"
+".set "GLAPI_PREFIX_STR(GenRenderbuffers)", "GLAPI_PREFIX_STR(GenRenderbuffersEXT)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GenerateMipmapEXT))"\n"
+"\t"STUB_ASM_CODE("869")"\n"
+
+".globl "GLAPI_PREFIX_STR(GenerateMipmap)"\n"
+".set "GLAPI_PREFIX_STR(GenerateMipmap)", "GLAPI_PREFIX_STR(GenerateMipmapEXT)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetFramebufferAttachmentParameterivEXT))"\n"
+"\t"STUB_ASM_CODE("870")"\n"
+
+".globl "GLAPI_PREFIX_STR(GetFramebufferAttachmentParameteriv)"\n"
+".set "GLAPI_PREFIX_STR(GetFramebufferAttachmentParameteriv)", "GLAPI_PREFIX_STR(GetFramebufferAttachmentParameterivEXT)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetRenderbufferParameterivEXT))"\n"
+"\t"STUB_ASM_CODE("871")"\n"
+
+".globl "GLAPI_PREFIX_STR(GetRenderbufferParameteriv)"\n"
+".set "GLAPI_PREFIX_STR(GetRenderbufferParameteriv)", "GLAPI_PREFIX_STR(GetRenderbufferParameterivEXT)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(IsFramebufferEXT))"\n"
+"\t"STUB_ASM_CODE("872")"\n"
+
+".globl "GLAPI_PREFIX_STR(IsFramebuffer)"\n"
+".set "GLAPI_PREFIX_STR(IsFramebuffer)", "GLAPI_PREFIX_STR(IsFramebufferEXT)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(IsRenderbufferEXT))"\n"
+"\t"STUB_ASM_CODE("873")"\n"
+
+".globl "GLAPI_PREFIX_STR(IsRenderbuffer)"\n"
+".set "GLAPI_PREFIX_STR(IsRenderbuffer)", "GLAPI_PREFIX_STR(IsRenderbufferEXT)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(RenderbufferStorageEXT))"\n"
+"\t"STUB_ASM_CODE("874")"\n"
+
+".globl "GLAPI_PREFIX_STR(RenderbufferStorage)"\n"
+".set "GLAPI_PREFIX_STR(RenderbufferStorage)", "GLAPI_PREFIX_STR(RenderbufferStorageEXT)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(BlitFramebuffer))"\n"
+"\t"STUB_ASM_CODE("875")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(BindFragDataLocationEXT))"\n"
+"\t"STUB_ASM_CODE("878")"\n"
+
+".globl "GLAPI_PREFIX_STR(BindFragDataLocation)"\n"
+".set "GLAPI_PREFIX_STR(BindFragDataLocation)", "GLAPI_PREFIX_STR(BindFragDataLocationEXT)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetFragDataLocationEXT))"\n"
+"\t"STUB_ASM_CODE("879")"\n"
+
+".globl "GLAPI_PREFIX_STR(GetFragDataLocation)"\n"
+".set "GLAPI_PREFIX_STR(GetFragDataLocation)", "GLAPI_PREFIX_STR(GetFragDataLocationEXT)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetUniformuivEXT))"\n"
+"\t"STUB_ASM_CODE("880")"\n"
+
+".globl "GLAPI_PREFIX_STR(GetUniformuiv)"\n"
+".set "GLAPI_PREFIX_STR(GetUniformuiv)", "GLAPI_PREFIX_STR(GetUniformuivEXT)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetVertexAttribIivEXT))"\n"
+"\t"STUB_ASM_CODE("881")"\n"
+
+".globl "GLAPI_PREFIX_STR(GetVertexAttribIiv)"\n"
+".set "GLAPI_PREFIX_STR(GetVertexAttribIiv)", "GLAPI_PREFIX_STR(GetVertexAttribIivEXT)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetVertexAttribIuivEXT))"\n"
+"\t"STUB_ASM_CODE("882")"\n"
+
+".globl "GLAPI_PREFIX_STR(GetVertexAttribIuiv)"\n"
+".set "GLAPI_PREFIX_STR(GetVertexAttribIuiv)", "GLAPI_PREFIX_STR(GetVertexAttribIuivEXT)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Uniform1uiEXT))"\n"
+"\t"STUB_ASM_CODE("883")"\n"
+
+".globl "GLAPI_PREFIX_STR(Uniform1ui)"\n"
+".set "GLAPI_PREFIX_STR(Uniform1ui)", "GLAPI_PREFIX_STR(Uniform1uiEXT)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Uniform1uivEXT))"\n"
+"\t"STUB_ASM_CODE("884")"\n"
+
+".globl "GLAPI_PREFIX_STR(Uniform1uiv)"\n"
+".set "GLAPI_PREFIX_STR(Uniform1uiv)", "GLAPI_PREFIX_STR(Uniform1uivEXT)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Uniform2uiEXT))"\n"
+"\t"STUB_ASM_CODE("885")"\n"
+
+".globl "GLAPI_PREFIX_STR(Uniform2ui)"\n"
+".set "GLAPI_PREFIX_STR(Uniform2ui)", "GLAPI_PREFIX_STR(Uniform2uiEXT)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Uniform2uivEXT))"\n"
+"\t"STUB_ASM_CODE("886")"\n"
+
+".globl "GLAPI_PREFIX_STR(Uniform2uiv)"\n"
+".set "GLAPI_PREFIX_STR(Uniform2uiv)", "GLAPI_PREFIX_STR(Uniform2uivEXT)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Uniform3uiEXT))"\n"
+"\t"STUB_ASM_CODE("887")"\n"
+
+".globl "GLAPI_PREFIX_STR(Uniform3ui)"\n"
+".set "GLAPI_PREFIX_STR(Uniform3ui)", "GLAPI_PREFIX_STR(Uniform3uiEXT)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Uniform3uivEXT))"\n"
+"\t"STUB_ASM_CODE("888")"\n"
+
+".globl "GLAPI_PREFIX_STR(Uniform3uiv)"\n"
+".set "GLAPI_PREFIX_STR(Uniform3uiv)", "GLAPI_PREFIX_STR(Uniform3uivEXT)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Uniform4uiEXT))"\n"
+"\t"STUB_ASM_CODE("889")"\n"
+
+".globl "GLAPI_PREFIX_STR(Uniform4ui)"\n"
+".set "GLAPI_PREFIX_STR(Uniform4ui)", "GLAPI_PREFIX_STR(Uniform4uiEXT)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Uniform4uivEXT))"\n"
+"\t"STUB_ASM_CODE("890")"\n"
+
+".globl "GLAPI_PREFIX_STR(Uniform4uiv)"\n"
+".set "GLAPI_PREFIX_STR(Uniform4uiv)", "GLAPI_PREFIX_STR(Uniform4uivEXT)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttribI1iEXT))"\n"
+"\t"STUB_ASM_CODE("891")"\n"
+
+".globl "GLAPI_PREFIX_STR(VertexAttribI1i)"\n"
+".set "GLAPI_PREFIX_STR(VertexAttribI1i)", "GLAPI_PREFIX_STR(VertexAttribI1iEXT)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttribI1ivEXT))"\n"
+"\t"STUB_ASM_CODE("892")"\n"
+
+".globl "GLAPI_PREFIX_STR(VertexAttribI1iv)"\n"
+".set "GLAPI_PREFIX_STR(VertexAttribI1iv)", "GLAPI_PREFIX_STR(VertexAttribI1ivEXT)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttribI1uiEXT))"\n"
+"\t"STUB_ASM_CODE("893")"\n"
+
+".globl "GLAPI_PREFIX_STR(VertexAttribI1ui)"\n"
+".set "GLAPI_PREFIX_STR(VertexAttribI1ui)", "GLAPI_PREFIX_STR(VertexAttribI1uiEXT)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttribI1uivEXT))"\n"
+"\t"STUB_ASM_CODE("894")"\n"
+
+".globl "GLAPI_PREFIX_STR(VertexAttribI1uiv)"\n"
+".set "GLAPI_PREFIX_STR(VertexAttribI1uiv)", "GLAPI_PREFIX_STR(VertexAttribI1uivEXT)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttribI2iEXT))"\n"
+"\t"STUB_ASM_CODE("895")"\n"
+
+".globl "GLAPI_PREFIX_STR(VertexAttribI2i)"\n"
+".set "GLAPI_PREFIX_STR(VertexAttribI2i)", "GLAPI_PREFIX_STR(VertexAttribI2iEXT)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttribI2ivEXT))"\n"
+"\t"STUB_ASM_CODE("896")"\n"
+
+".globl "GLAPI_PREFIX_STR(VertexAttribI2iv)"\n"
+".set "GLAPI_PREFIX_STR(VertexAttribI2iv)", "GLAPI_PREFIX_STR(VertexAttribI2ivEXT)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttribI2uiEXT))"\n"
+"\t"STUB_ASM_CODE("897")"\n"
+
+".globl "GLAPI_PREFIX_STR(VertexAttribI2ui)"\n"
+".set "GLAPI_PREFIX_STR(VertexAttribI2ui)", "GLAPI_PREFIX_STR(VertexAttribI2uiEXT)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttribI2uivEXT))"\n"
+"\t"STUB_ASM_CODE("898")"\n"
+
+".globl "GLAPI_PREFIX_STR(VertexAttribI2uiv)"\n"
+".set "GLAPI_PREFIX_STR(VertexAttribI2uiv)", "GLAPI_PREFIX_STR(VertexAttribI2uivEXT)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttribI3iEXT))"\n"
+"\t"STUB_ASM_CODE("899")"\n"
+
+".globl "GLAPI_PREFIX_STR(VertexAttribI3i)"\n"
+".set "GLAPI_PREFIX_STR(VertexAttribI3i)", "GLAPI_PREFIX_STR(VertexAttribI3iEXT)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttribI3ivEXT))"\n"
+"\t"STUB_ASM_CODE("900")"\n"
+
+".globl "GLAPI_PREFIX_STR(VertexAttribI3iv)"\n"
+".set "GLAPI_PREFIX_STR(VertexAttribI3iv)", "GLAPI_PREFIX_STR(VertexAttribI3ivEXT)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttribI3uiEXT))"\n"
+"\t"STUB_ASM_CODE("901")"\n"
+
+".globl "GLAPI_PREFIX_STR(VertexAttribI3ui)"\n"
+".set "GLAPI_PREFIX_STR(VertexAttribI3ui)", "GLAPI_PREFIX_STR(VertexAttribI3uiEXT)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttribI3uivEXT))"\n"
+"\t"STUB_ASM_CODE("902")"\n"
+
+".globl "GLAPI_PREFIX_STR(VertexAttribI3uiv)"\n"
+".set "GLAPI_PREFIX_STR(VertexAttribI3uiv)", "GLAPI_PREFIX_STR(VertexAttribI3uivEXT)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttribI4bvEXT))"\n"
+"\t"STUB_ASM_CODE("903")"\n"
+
+".globl "GLAPI_PREFIX_STR(VertexAttribI4bv)"\n"
+".set "GLAPI_PREFIX_STR(VertexAttribI4bv)", "GLAPI_PREFIX_STR(VertexAttribI4bvEXT)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttribI4iEXT))"\n"
+"\t"STUB_ASM_CODE("904")"\n"
+
+".globl "GLAPI_PREFIX_STR(VertexAttribI4i)"\n"
+".set "GLAPI_PREFIX_STR(VertexAttribI4i)", "GLAPI_PREFIX_STR(VertexAttribI4iEXT)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttribI4ivEXT))"\n"
+"\t"STUB_ASM_CODE("905")"\n"
+
+".globl "GLAPI_PREFIX_STR(VertexAttribI4iv)"\n"
+".set "GLAPI_PREFIX_STR(VertexAttribI4iv)", "GLAPI_PREFIX_STR(VertexAttribI4ivEXT)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttribI4svEXT))"\n"
+"\t"STUB_ASM_CODE("906")"\n"
+
+".globl "GLAPI_PREFIX_STR(VertexAttribI4sv)"\n"
+".set "GLAPI_PREFIX_STR(VertexAttribI4sv)", "GLAPI_PREFIX_STR(VertexAttribI4svEXT)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttribI4ubvEXT))"\n"
+"\t"STUB_ASM_CODE("907")"\n"
+
+".globl "GLAPI_PREFIX_STR(VertexAttribI4ubv)"\n"
+".set "GLAPI_PREFIX_STR(VertexAttribI4ubv)", "GLAPI_PREFIX_STR(VertexAttribI4ubvEXT)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttribI4uiEXT))"\n"
+"\t"STUB_ASM_CODE("908")"\n"
+
+".globl "GLAPI_PREFIX_STR(VertexAttribI4ui)"\n"
+".set "GLAPI_PREFIX_STR(VertexAttribI4ui)", "GLAPI_PREFIX_STR(VertexAttribI4uiEXT)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttribI4uivEXT))"\n"
+"\t"STUB_ASM_CODE("909")"\n"
+
+".globl "GLAPI_PREFIX_STR(VertexAttribI4uiv)"\n"
+".set "GLAPI_PREFIX_STR(VertexAttribI4uiv)", "GLAPI_PREFIX_STR(VertexAttribI4uivEXT)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttribI4usvEXT))"\n"
+"\t"STUB_ASM_CODE("910")"\n"
+
+".globl "GLAPI_PREFIX_STR(VertexAttribI4usv)"\n"
+".set "GLAPI_PREFIX_STR(VertexAttribI4usv)", "GLAPI_PREFIX_STR(VertexAttribI4usvEXT)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttribIPointerEXT))"\n"
+"\t"STUB_ASM_CODE("911")"\n"
+
+".globl "GLAPI_PREFIX_STR(VertexAttribIPointer)"\n"
+".set "GLAPI_PREFIX_STR(VertexAttribIPointer)", "GLAPI_PREFIX_STR(VertexAttribIPointerEXT)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(FramebufferTextureLayerEXT))"\n"
+"\t"STUB_ASM_CODE("912")"\n"
+
+".globl "GLAPI_PREFIX_STR(FramebufferTextureLayer)"\n"
+".set "GLAPI_PREFIX_STR(FramebufferTextureLayer)", "GLAPI_PREFIX_STR(FramebufferTextureLayerEXT)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(ColorMaskIndexedEXT))"\n"
+"\t"STUB_ASM_CODE("913")"\n"
+
+".globl "GLAPI_PREFIX_STR(ColorMaski)"\n"
+".set "GLAPI_PREFIX_STR(ColorMaski)", "GLAPI_PREFIX_STR(ColorMaskIndexedEXT)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(DisableIndexedEXT))"\n"
+"\t"STUB_ASM_CODE("914")"\n"
+
+".globl "GLAPI_PREFIX_STR(Disablei)"\n"
+".set "GLAPI_PREFIX_STR(Disablei)", "GLAPI_PREFIX_STR(DisableIndexedEXT)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(EnableIndexedEXT))"\n"
+"\t"STUB_ASM_CODE("915")"\n"
+
+".globl "GLAPI_PREFIX_STR(Enablei)"\n"
+".set "GLAPI_PREFIX_STR(Enablei)", "GLAPI_PREFIX_STR(EnableIndexedEXT)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetBooleanIndexedvEXT))"\n"
+"\t"STUB_ASM_CODE("916")"\n"
+
+".globl "GLAPI_PREFIX_STR(GetBooleani_v)"\n"
+".set "GLAPI_PREFIX_STR(GetBooleani_v)", "GLAPI_PREFIX_STR(GetBooleanIndexedvEXT)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetIntegerIndexedvEXT))"\n"
+"\t"STUB_ASM_CODE("917")"\n"
+
+".globl "GLAPI_PREFIX_STR(GetIntegeri_v)"\n"
+".set "GLAPI_PREFIX_STR(GetIntegeri_v)", "GLAPI_PREFIX_STR(GetIntegerIndexedvEXT)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(IsEnabledIndexedEXT))"\n"
+"\t"STUB_ASM_CODE("918")"\n"
+
+".globl "GLAPI_PREFIX_STR(IsEnabledi)"\n"
+".set "GLAPI_PREFIX_STR(IsEnabledi)", "GLAPI_PREFIX_STR(IsEnabledIndexedEXT)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(ClearColorIiEXT))"\n"
+"\t"STUB_ASM_CODE("919")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(ClearColorIuiEXT))"\n"
+"\t"STUB_ASM_CODE("920")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetTexParameterIivEXT))"\n"
+"\t"STUB_ASM_CODE("921")"\n"
+
+".globl "GLAPI_PREFIX_STR(GetTexParameterIiv)"\n"
+".set "GLAPI_PREFIX_STR(GetTexParameterIiv)", "GLAPI_PREFIX_STR(GetTexParameterIivEXT)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetTexParameterIuivEXT))"\n"
+"\t"STUB_ASM_CODE("922")"\n"
+
+".globl "GLAPI_PREFIX_STR(GetTexParameterIuiv)"\n"
+".set "GLAPI_PREFIX_STR(GetTexParameterIuiv)", "GLAPI_PREFIX_STR(GetTexParameterIuivEXT)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(TexParameterIivEXT))"\n"
+"\t"STUB_ASM_CODE("923")"\n"
+
+".globl "GLAPI_PREFIX_STR(TexParameterIiv)"\n"
+".set "GLAPI_PREFIX_STR(TexParameterIiv)", "GLAPI_PREFIX_STR(TexParameterIivEXT)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(TexParameterIuivEXT))"\n"
+"\t"STUB_ASM_CODE("924")"\n"
+
+".globl "GLAPI_PREFIX_STR(TexParameterIuiv)"\n"
+".set "GLAPI_PREFIX_STR(TexParameterIuiv)", "GLAPI_PREFIX_STR(TexParameterIuivEXT)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(BeginConditionalRenderNV))"\n"
+"\t"STUB_ASM_CODE("925")"\n"
+
+".globl "GLAPI_PREFIX_STR(BeginConditionalRender)"\n"
+".set "GLAPI_PREFIX_STR(BeginConditionalRender)", "GLAPI_PREFIX_STR(BeginConditionalRenderNV)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(EndConditionalRenderNV))"\n"
+"\t"STUB_ASM_CODE("926")"\n"
+
+".globl "GLAPI_PREFIX_STR(EndConditionalRender)"\n"
+".set "GLAPI_PREFIX_STR(EndConditionalRender)", "GLAPI_PREFIX_STR(EndConditionalRenderNV)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(BeginTransformFeedbackEXT))"\n"
+"\t"STUB_ASM_CODE("927")"\n"
+
+".globl "GLAPI_PREFIX_STR(BeginTransformFeedback)"\n"
+".set "GLAPI_PREFIX_STR(BeginTransformFeedback)", "GLAPI_PREFIX_STR(BeginTransformFeedbackEXT)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(BindBufferBaseEXT))"\n"
+"\t"STUB_ASM_CODE("928")"\n"
+
+".globl "GLAPI_PREFIX_STR(BindBufferBase)"\n"
+".set "GLAPI_PREFIX_STR(BindBufferBase)", "GLAPI_PREFIX_STR(BindBufferBaseEXT)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(BindBufferOffsetEXT))"\n"
+"\t"STUB_ASM_CODE("929")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(BindBufferRangeEXT))"\n"
+"\t"STUB_ASM_CODE("930")"\n"
+
+".globl "GLAPI_PREFIX_STR(BindBufferRange)"\n"
+".set "GLAPI_PREFIX_STR(BindBufferRange)", "GLAPI_PREFIX_STR(BindBufferRangeEXT)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(EndTransformFeedbackEXT))"\n"
+"\t"STUB_ASM_CODE("931")"\n"
+
+".globl "GLAPI_PREFIX_STR(EndTransformFeedback)"\n"
+".set "GLAPI_PREFIX_STR(EndTransformFeedback)", "GLAPI_PREFIX_STR(EndTransformFeedbackEXT)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetTransformFeedbackVaryingEXT))"\n"
+"\t"STUB_ASM_CODE("932")"\n"
+
+".globl "GLAPI_PREFIX_STR(GetTransformFeedbackVarying)"\n"
+".set "GLAPI_PREFIX_STR(GetTransformFeedbackVarying)", "GLAPI_PREFIX_STR(GetTransformFeedbackVaryingEXT)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(TransformFeedbackVaryingsEXT))"\n"
+"\t"STUB_ASM_CODE("933")"\n"
+
+".globl "GLAPI_PREFIX_STR(TransformFeedbackVaryings)"\n"
+".set "GLAPI_PREFIX_STR(TransformFeedbackVaryings)", "GLAPI_PREFIX_STR(TransformFeedbackVaryingsEXT)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(ProvokingVertexEXT))"\n"
+"\t"STUB_ASM_CODE("934")"\n"
+
+".globl "GLAPI_PREFIX_STR(ProvokingVertex)"\n"
+".set "GLAPI_PREFIX_STR(ProvokingVertex)", "GLAPI_PREFIX_STR(ProvokingVertexEXT)"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetObjectParameterivAPPLE))"\n"
+"\t"STUB_ASM_CODE("937")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(ObjectPurgeableAPPLE))"\n"
+"\t"STUB_ASM_CODE("938")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(ObjectUnpurgeableAPPLE))"\n"
+"\t"STUB_ASM_CODE("939")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(ActiveProgramEXT))"\n"
+"\t"STUB_ASM_CODE("940")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(CreateShaderProgramEXT))"\n"
+"\t"STUB_ASM_CODE("941")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(UseShaderProgramEXT))"\n"
+"\t"STUB_ASM_CODE("942")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(TextureBarrierNV))"\n"
+"\t"STUB_ASM_CODE("943")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(EGLImageTargetRenderbufferStorageOES))"\n"
+"\t"STUB_ASM_CODE("949")"\n"
+
+STUB_ASM_ENTRY(GLAPI_PREFIX_STR(EGLImageTargetTexture2DOES))"\n"
+"\t"STUB_ASM_CODE("950")"\n"
+
+);
+#undef MAPI_TMP_STUB_ASM_GCC_NO_HIDDEN
+#endif /* MAPI_TMP_STUB_ASM_GCC_NO_HIDDEN */
diff --git a/src/mapi/glapi/glapi_sparc.S b/src/mapi/glapi/glapi_sparc.S
index 969769a310c..ca39b175d81 100644
--- a/src/mapi/glapi/glapi_sparc.S
+++ b/src/mapi/glapi/glapi_sparc.S
@@ -773,344 +773,355 @@ gl_dispatch_functions_start:
GL_STUB(glFramebufferTextureARB, 575)
GL_STUB(glFramebufferTextureFaceARB, 576)
GL_STUB(glProgramParameteriARB, 577)
- GL_STUB(glFlushMappedBufferRange, 578)
- GL_STUB(glMapBufferRange, 579)
- GL_STUB(glBindVertexArray, 580)
- GL_STUB(glGenVertexArrays, 581)
- GL_STUB(glCopyBufferSubData, 582)
- GL_STUB(glClientWaitSync, 583)
- GL_STUB(glDeleteSync, 584)
- GL_STUB(glFenceSync, 585)
- GL_STUB(glGetInteger64v, 586)
- GL_STUB(glGetSynciv, 587)
- GL_STUB(glIsSync, 588)
- GL_STUB(glWaitSync, 589)
- GL_STUB(glDrawElementsBaseVertex, 590)
- GL_STUB(glDrawRangeElementsBaseVertex, 591)
- GL_STUB(glMultiDrawElementsBaseVertex, 592)
- GL_STUB(glBindTransformFeedback, 593)
- GL_STUB(glDeleteTransformFeedbacks, 594)
- GL_STUB(glDrawTransformFeedback, 595)
- GL_STUB(glGenTransformFeedbacks, 596)
- GL_STUB(glIsTransformFeedback, 597)
- GL_STUB(glPauseTransformFeedback, 598)
- GL_STUB(glResumeTransformFeedback, 599)
- GL_STUB(glPolygonOffsetEXT, 600)
- GL_STUB(gl_dispatch_stub_601, 601)
- HIDDEN(gl_dispatch_stub_601)
- GL_STUB(gl_dispatch_stub_602, 602)
- HIDDEN(gl_dispatch_stub_602)
- GL_STUB(gl_dispatch_stub_603, 603)
- HIDDEN(gl_dispatch_stub_603)
- GL_STUB(gl_dispatch_stub_604, 604)
- HIDDEN(gl_dispatch_stub_604)
- GL_STUB(gl_dispatch_stub_605, 605)
- HIDDEN(gl_dispatch_stub_605)
- GL_STUB(gl_dispatch_stub_606, 606)
- HIDDEN(gl_dispatch_stub_606)
- GL_STUB(gl_dispatch_stub_607, 607)
- HIDDEN(gl_dispatch_stub_607)
- GL_STUB(gl_dispatch_stub_608, 608)
- HIDDEN(gl_dispatch_stub_608)
- GL_STUB(glColorPointerEXT, 609)
- GL_STUB(glEdgeFlagPointerEXT, 610)
- GL_STUB(glIndexPointerEXT, 611)
- GL_STUB(glNormalPointerEXT, 612)
- GL_STUB(glTexCoordPointerEXT, 613)
- GL_STUB(glVertexPointerEXT, 614)
- GL_STUB(glPointParameterfEXT, 615)
- GL_STUB(glPointParameterfvEXT, 616)
- GL_STUB(glLockArraysEXT, 617)
- GL_STUB(glUnlockArraysEXT, 618)
- GL_STUB(glSecondaryColor3bEXT, 619)
- GL_STUB(glSecondaryColor3bvEXT, 620)
- GL_STUB(glSecondaryColor3dEXT, 621)
- GL_STUB(glSecondaryColor3dvEXT, 622)
- GL_STUB(glSecondaryColor3fEXT, 623)
- GL_STUB(glSecondaryColor3fvEXT, 624)
- GL_STUB(glSecondaryColor3iEXT, 625)
- GL_STUB(glSecondaryColor3ivEXT, 626)
- GL_STUB(glSecondaryColor3sEXT, 627)
- GL_STUB(glSecondaryColor3svEXT, 628)
- GL_STUB(glSecondaryColor3ubEXT, 629)
- GL_STUB(glSecondaryColor3ubvEXT, 630)
- GL_STUB(glSecondaryColor3uiEXT, 631)
- GL_STUB(glSecondaryColor3uivEXT, 632)
- GL_STUB(glSecondaryColor3usEXT, 633)
- GL_STUB(glSecondaryColor3usvEXT, 634)
- GL_STUB(glSecondaryColorPointerEXT, 635)
- GL_STUB(glMultiDrawArraysEXT, 636)
- GL_STUB(glMultiDrawElementsEXT, 637)
- GL_STUB(glFogCoordPointerEXT, 638)
- GL_STUB(glFogCoorddEXT, 639)
- GL_STUB(glFogCoorddvEXT, 640)
- GL_STUB(glFogCoordfEXT, 641)
- GL_STUB(glFogCoordfvEXT, 642)
- GL_STUB(gl_dispatch_stub_643, 643)
- HIDDEN(gl_dispatch_stub_643)
- GL_STUB(glBlendFuncSeparateEXT, 644)
- GL_STUB(glFlushVertexArrayRangeNV, 645)
- GL_STUB(glVertexArrayRangeNV, 646)
- GL_STUB(glCombinerInputNV, 647)
- GL_STUB(glCombinerOutputNV, 648)
- GL_STUB(glCombinerParameterfNV, 649)
- GL_STUB(glCombinerParameterfvNV, 650)
- GL_STUB(glCombinerParameteriNV, 651)
- GL_STUB(glCombinerParameterivNV, 652)
- GL_STUB(glFinalCombinerInputNV, 653)
- GL_STUB(glGetCombinerInputParameterfvNV, 654)
- GL_STUB(glGetCombinerInputParameterivNV, 655)
- GL_STUB(glGetCombinerOutputParameterfvNV, 656)
- GL_STUB(glGetCombinerOutputParameterivNV, 657)
- GL_STUB(glGetFinalCombinerInputParameterfvNV, 658)
- GL_STUB(glGetFinalCombinerInputParameterivNV, 659)
- GL_STUB(glResizeBuffersMESA, 660)
- GL_STUB(glWindowPos2dMESA, 661)
- GL_STUB(glWindowPos2dvMESA, 662)
- GL_STUB(glWindowPos2fMESA, 663)
- GL_STUB(glWindowPos2fvMESA, 664)
- GL_STUB(glWindowPos2iMESA, 665)
- GL_STUB(glWindowPos2ivMESA, 666)
- GL_STUB(glWindowPos2sMESA, 667)
- GL_STUB(glWindowPos2svMESA, 668)
- GL_STUB(glWindowPos3dMESA, 669)
- GL_STUB(glWindowPos3dvMESA, 670)
- GL_STUB(glWindowPos3fMESA, 671)
- GL_STUB(glWindowPos3fvMESA, 672)
- GL_STUB(glWindowPos3iMESA, 673)
- GL_STUB(glWindowPos3ivMESA, 674)
- GL_STUB(glWindowPos3sMESA, 675)
- GL_STUB(glWindowPos3svMESA, 676)
- GL_STUB(glWindowPos4dMESA, 677)
- GL_STUB(glWindowPos4dvMESA, 678)
- GL_STUB(glWindowPos4fMESA, 679)
- GL_STUB(glWindowPos4fvMESA, 680)
- GL_STUB(glWindowPos4iMESA, 681)
- GL_STUB(glWindowPos4ivMESA, 682)
- GL_STUB(glWindowPos4sMESA, 683)
- GL_STUB(glWindowPos4svMESA, 684)
- GL_STUB(gl_dispatch_stub_685, 685)
- HIDDEN(gl_dispatch_stub_685)
- GL_STUB(gl_dispatch_stub_686, 686)
- HIDDEN(gl_dispatch_stub_686)
- GL_STUB(gl_dispatch_stub_687, 687)
- HIDDEN(gl_dispatch_stub_687)
- GL_STUB(gl_dispatch_stub_688, 688)
- HIDDEN(gl_dispatch_stub_688)
- GL_STUB(gl_dispatch_stub_689, 689)
- HIDDEN(gl_dispatch_stub_689)
- GL_STUB(gl_dispatch_stub_690, 690)
- HIDDEN(gl_dispatch_stub_690)
- GL_STUB(gl_dispatch_stub_691, 691)
- HIDDEN(gl_dispatch_stub_691)
- GL_STUB(gl_dispatch_stub_692, 692)
- HIDDEN(gl_dispatch_stub_692)
- GL_STUB(gl_dispatch_stub_693, 693)
- HIDDEN(gl_dispatch_stub_693)
- GL_STUB(glAreProgramsResidentNV, 694)
- GL_STUB(glBindProgramNV, 695)
- GL_STUB(glDeleteProgramsNV, 696)
- GL_STUB(glExecuteProgramNV, 697)
- GL_STUB(glGenProgramsNV, 698)
- GL_STUB(glGetProgramParameterdvNV, 699)
- GL_STUB(glGetProgramParameterfvNV, 700)
- GL_STUB(glGetProgramStringNV, 701)
- GL_STUB(glGetProgramivNV, 702)
- GL_STUB(glGetTrackMatrixivNV, 703)
- GL_STUB(glGetVertexAttribPointervNV, 704)
- GL_STUB(glGetVertexAttribdvNV, 705)
- GL_STUB(glGetVertexAttribfvNV, 706)
- GL_STUB(glGetVertexAttribivNV, 707)
- GL_STUB(glIsProgramNV, 708)
- GL_STUB(glLoadProgramNV, 709)
- GL_STUB(glProgramParameters4dvNV, 710)
- GL_STUB(glProgramParameters4fvNV, 711)
- GL_STUB(glRequestResidentProgramsNV, 712)
- GL_STUB(glTrackMatrixNV, 713)
- GL_STUB(glVertexAttrib1dNV, 714)
- GL_STUB(glVertexAttrib1dvNV, 715)
- GL_STUB(glVertexAttrib1fNV, 716)
- GL_STUB(glVertexAttrib1fvNV, 717)
- GL_STUB(glVertexAttrib1sNV, 718)
- GL_STUB(glVertexAttrib1svNV, 719)
- GL_STUB(glVertexAttrib2dNV, 720)
- GL_STUB(glVertexAttrib2dvNV, 721)
- GL_STUB(glVertexAttrib2fNV, 722)
- GL_STUB(glVertexAttrib2fvNV, 723)
- GL_STUB(glVertexAttrib2sNV, 724)
- GL_STUB(glVertexAttrib2svNV, 725)
- GL_STUB(glVertexAttrib3dNV, 726)
- GL_STUB(glVertexAttrib3dvNV, 727)
- GL_STUB(glVertexAttrib3fNV, 728)
- GL_STUB(glVertexAttrib3fvNV, 729)
- GL_STUB(glVertexAttrib3sNV, 730)
- GL_STUB(glVertexAttrib3svNV, 731)
- GL_STUB(glVertexAttrib4dNV, 732)
- GL_STUB(glVertexAttrib4dvNV, 733)
- GL_STUB(glVertexAttrib4fNV, 734)
- GL_STUB(glVertexAttrib4fvNV, 735)
- GL_STUB(glVertexAttrib4sNV, 736)
- GL_STUB(glVertexAttrib4svNV, 737)
- GL_STUB(glVertexAttrib4ubNV, 738)
- GL_STUB(glVertexAttrib4ubvNV, 739)
- GL_STUB(glVertexAttribPointerNV, 740)
- GL_STUB(glVertexAttribs1dvNV, 741)
- GL_STUB(glVertexAttribs1fvNV, 742)
- GL_STUB(glVertexAttribs1svNV, 743)
- GL_STUB(glVertexAttribs2dvNV, 744)
- GL_STUB(glVertexAttribs2fvNV, 745)
- GL_STUB(glVertexAttribs2svNV, 746)
- GL_STUB(glVertexAttribs3dvNV, 747)
- GL_STUB(glVertexAttribs3fvNV, 748)
- GL_STUB(glVertexAttribs3svNV, 749)
- GL_STUB(glVertexAttribs4dvNV, 750)
- GL_STUB(glVertexAttribs4fvNV, 751)
- GL_STUB(glVertexAttribs4svNV, 752)
- GL_STUB(glVertexAttribs4ubvNV, 753)
- GL_STUB(glGetTexBumpParameterfvATI, 754)
- GL_STUB(glGetTexBumpParameterivATI, 755)
- GL_STUB(glTexBumpParameterfvATI, 756)
- GL_STUB(glTexBumpParameterivATI, 757)
- GL_STUB(glAlphaFragmentOp1ATI, 758)
- GL_STUB(glAlphaFragmentOp2ATI, 759)
- GL_STUB(glAlphaFragmentOp3ATI, 760)
- GL_STUB(glBeginFragmentShaderATI, 761)
- GL_STUB(glBindFragmentShaderATI, 762)
- GL_STUB(glColorFragmentOp1ATI, 763)
- GL_STUB(glColorFragmentOp2ATI, 764)
- GL_STUB(glColorFragmentOp3ATI, 765)
- GL_STUB(glDeleteFragmentShaderATI, 766)
- GL_STUB(glEndFragmentShaderATI, 767)
- GL_STUB(glGenFragmentShadersATI, 768)
- GL_STUB(glPassTexCoordATI, 769)
- GL_STUB(glSampleMapATI, 770)
- GL_STUB(glSetFragmentShaderConstantATI, 771)
- GL_STUB(glPointParameteriNV, 772)
- GL_STUB(glPointParameterivNV, 773)
- GL_STUB(gl_dispatch_stub_774, 774)
- HIDDEN(gl_dispatch_stub_774)
- GL_STUB(gl_dispatch_stub_775, 775)
- HIDDEN(gl_dispatch_stub_775)
- GL_STUB(gl_dispatch_stub_776, 776)
- HIDDEN(gl_dispatch_stub_776)
- GL_STUB(gl_dispatch_stub_777, 777)
- HIDDEN(gl_dispatch_stub_777)
- GL_STUB(gl_dispatch_stub_778, 778)
- HIDDEN(gl_dispatch_stub_778)
- GL_STUB(glGetProgramNamedParameterdvNV, 779)
- GL_STUB(glGetProgramNamedParameterfvNV, 780)
- GL_STUB(glProgramNamedParameter4dNV, 781)
- GL_STUB(glProgramNamedParameter4dvNV, 782)
- GL_STUB(glProgramNamedParameter4fNV, 783)
- GL_STUB(glProgramNamedParameter4fvNV, 784)
- GL_STUB(glPrimitiveRestartIndexNV, 785)
- GL_STUB(glPrimitiveRestartNV, 786)
+ GL_STUB(glVertexAttribDivisorARB, 578)
+ GL_STUB(glFlushMappedBufferRange, 579)
+ GL_STUB(glMapBufferRange, 580)
+ GL_STUB(glBindVertexArray, 581)
+ GL_STUB(glGenVertexArrays, 582)
+ GL_STUB(glCopyBufferSubData, 583)
+ GL_STUB(glClientWaitSync, 584)
+ GL_STUB(glDeleteSync, 585)
+ GL_STUB(glFenceSync, 586)
+ GL_STUB(glGetInteger64v, 587)
+ GL_STUB(glGetSynciv, 588)
+ GL_STUB(glIsSync, 589)
+ GL_STUB(glWaitSync, 590)
+ GL_STUB(glDrawElementsBaseVertex, 591)
+ GL_STUB(glDrawRangeElementsBaseVertex, 592)
+ GL_STUB(glMultiDrawElementsBaseVertex, 593)
+ GL_STUB(glBlendEquationSeparateiARB, 594)
+ GL_STUB(glBlendEquationiARB, 595)
+ GL_STUB(glBlendFuncSeparateiARB, 596)
+ GL_STUB(glBlendFunciARB, 597)
+ GL_STUB(glBindTransformFeedback, 598)
+ GL_STUB(glDeleteTransformFeedbacks, 599)
+ GL_STUB(glDrawTransformFeedback, 600)
+ GL_STUB(glGenTransformFeedbacks, 601)
+ GL_STUB(glIsTransformFeedback, 602)
+ GL_STUB(glPauseTransformFeedback, 603)
+ GL_STUB(glResumeTransformFeedback, 604)
+ GL_STUB(glClearDepthf, 605)
+ GL_STUB(glDepthRangef, 606)
+ GL_STUB(glGetShaderPrecisionFormat, 607)
+ GL_STUB(glReleaseShaderCompiler, 608)
+ GL_STUB(glShaderBinary, 609)
+ GL_STUB(glPolygonOffsetEXT, 610)
+ GL_STUB(gl_dispatch_stub_611, 611)
+ HIDDEN(gl_dispatch_stub_611)
+ GL_STUB(gl_dispatch_stub_612, 612)
+ HIDDEN(gl_dispatch_stub_612)
+ GL_STUB(gl_dispatch_stub_613, 613)
+ HIDDEN(gl_dispatch_stub_613)
+ GL_STUB(gl_dispatch_stub_614, 614)
+ HIDDEN(gl_dispatch_stub_614)
+ GL_STUB(gl_dispatch_stub_615, 615)
+ HIDDEN(gl_dispatch_stub_615)
+ GL_STUB(gl_dispatch_stub_616, 616)
+ HIDDEN(gl_dispatch_stub_616)
+ GL_STUB(gl_dispatch_stub_617, 617)
+ HIDDEN(gl_dispatch_stub_617)
+ GL_STUB(gl_dispatch_stub_618, 618)
+ HIDDEN(gl_dispatch_stub_618)
+ GL_STUB(glColorPointerEXT, 619)
+ GL_STUB(glEdgeFlagPointerEXT, 620)
+ GL_STUB(glIndexPointerEXT, 621)
+ GL_STUB(glNormalPointerEXT, 622)
+ GL_STUB(glTexCoordPointerEXT, 623)
+ GL_STUB(glVertexPointerEXT, 624)
+ GL_STUB(glPointParameterfEXT, 625)
+ GL_STUB(glPointParameterfvEXT, 626)
+ GL_STUB(glLockArraysEXT, 627)
+ GL_STUB(glUnlockArraysEXT, 628)
+ GL_STUB(glSecondaryColor3bEXT, 629)
+ GL_STUB(glSecondaryColor3bvEXT, 630)
+ GL_STUB(glSecondaryColor3dEXT, 631)
+ GL_STUB(glSecondaryColor3dvEXT, 632)
+ GL_STUB(glSecondaryColor3fEXT, 633)
+ GL_STUB(glSecondaryColor3fvEXT, 634)
+ GL_STUB(glSecondaryColor3iEXT, 635)
+ GL_STUB(glSecondaryColor3ivEXT, 636)
+ GL_STUB(glSecondaryColor3sEXT, 637)
+ GL_STUB(glSecondaryColor3svEXT, 638)
+ GL_STUB(glSecondaryColor3ubEXT, 639)
+ GL_STUB(glSecondaryColor3ubvEXT, 640)
+ GL_STUB(glSecondaryColor3uiEXT, 641)
+ GL_STUB(glSecondaryColor3uivEXT, 642)
+ GL_STUB(glSecondaryColor3usEXT, 643)
+ GL_STUB(glSecondaryColor3usvEXT, 644)
+ GL_STUB(glSecondaryColorPointerEXT, 645)
+ GL_STUB(glMultiDrawArraysEXT, 646)
+ GL_STUB(glMultiDrawElementsEXT, 647)
+ GL_STUB(glFogCoordPointerEXT, 648)
+ GL_STUB(glFogCoorddEXT, 649)
+ GL_STUB(glFogCoorddvEXT, 650)
+ GL_STUB(glFogCoordfEXT, 651)
+ GL_STUB(glFogCoordfvEXT, 652)
+ GL_STUB(gl_dispatch_stub_653, 653)
+ HIDDEN(gl_dispatch_stub_653)
+ GL_STUB(glBlendFuncSeparateEXT, 654)
+ GL_STUB(glFlushVertexArrayRangeNV, 655)
+ GL_STUB(glVertexArrayRangeNV, 656)
+ GL_STUB(glCombinerInputNV, 657)
+ GL_STUB(glCombinerOutputNV, 658)
+ GL_STUB(glCombinerParameterfNV, 659)
+ GL_STUB(glCombinerParameterfvNV, 660)
+ GL_STUB(glCombinerParameteriNV, 661)
+ GL_STUB(glCombinerParameterivNV, 662)
+ GL_STUB(glFinalCombinerInputNV, 663)
+ GL_STUB(glGetCombinerInputParameterfvNV, 664)
+ GL_STUB(glGetCombinerInputParameterivNV, 665)
+ GL_STUB(glGetCombinerOutputParameterfvNV, 666)
+ GL_STUB(glGetCombinerOutputParameterivNV, 667)
+ GL_STUB(glGetFinalCombinerInputParameterfvNV, 668)
+ GL_STUB(glGetFinalCombinerInputParameterivNV, 669)
+ GL_STUB(glResizeBuffersMESA, 670)
+ GL_STUB(glWindowPos2dMESA, 671)
+ GL_STUB(glWindowPos2dvMESA, 672)
+ GL_STUB(glWindowPos2fMESA, 673)
+ GL_STUB(glWindowPos2fvMESA, 674)
+ GL_STUB(glWindowPos2iMESA, 675)
+ GL_STUB(glWindowPos2ivMESA, 676)
+ GL_STUB(glWindowPos2sMESA, 677)
+ GL_STUB(glWindowPos2svMESA, 678)
+ GL_STUB(glWindowPos3dMESA, 679)
+ GL_STUB(glWindowPos3dvMESA, 680)
+ GL_STUB(glWindowPos3fMESA, 681)
+ GL_STUB(glWindowPos3fvMESA, 682)
+ GL_STUB(glWindowPos3iMESA, 683)
+ GL_STUB(glWindowPos3ivMESA, 684)
+ GL_STUB(glWindowPos3sMESA, 685)
+ GL_STUB(glWindowPos3svMESA, 686)
+ GL_STUB(glWindowPos4dMESA, 687)
+ GL_STUB(glWindowPos4dvMESA, 688)
+ GL_STUB(glWindowPos4fMESA, 689)
+ GL_STUB(glWindowPos4fvMESA, 690)
+ GL_STUB(glWindowPos4iMESA, 691)
+ GL_STUB(glWindowPos4ivMESA, 692)
+ GL_STUB(glWindowPos4sMESA, 693)
+ GL_STUB(glWindowPos4svMESA, 694)
+ GL_STUB(gl_dispatch_stub_695, 695)
+ HIDDEN(gl_dispatch_stub_695)
+ GL_STUB(gl_dispatch_stub_696, 696)
+ HIDDEN(gl_dispatch_stub_696)
+ GL_STUB(gl_dispatch_stub_697, 697)
+ HIDDEN(gl_dispatch_stub_697)
+ GL_STUB(gl_dispatch_stub_698, 698)
+ HIDDEN(gl_dispatch_stub_698)
+ GL_STUB(gl_dispatch_stub_699, 699)
+ HIDDEN(gl_dispatch_stub_699)
+ GL_STUB(gl_dispatch_stub_700, 700)
+ HIDDEN(gl_dispatch_stub_700)
+ GL_STUB(gl_dispatch_stub_701, 701)
+ HIDDEN(gl_dispatch_stub_701)
+ GL_STUB(gl_dispatch_stub_702, 702)
+ HIDDEN(gl_dispatch_stub_702)
+ GL_STUB(gl_dispatch_stub_703, 703)
+ HIDDEN(gl_dispatch_stub_703)
+ GL_STUB(glAreProgramsResidentNV, 704)
+ GL_STUB(glBindProgramNV, 705)
+ GL_STUB(glDeleteProgramsNV, 706)
+ GL_STUB(glExecuteProgramNV, 707)
+ GL_STUB(glGenProgramsNV, 708)
+ GL_STUB(glGetProgramParameterdvNV, 709)
+ GL_STUB(glGetProgramParameterfvNV, 710)
+ GL_STUB(glGetProgramStringNV, 711)
+ GL_STUB(glGetProgramivNV, 712)
+ GL_STUB(glGetTrackMatrixivNV, 713)
+ GL_STUB(glGetVertexAttribPointervNV, 714)
+ GL_STUB(glGetVertexAttribdvNV, 715)
+ GL_STUB(glGetVertexAttribfvNV, 716)
+ GL_STUB(glGetVertexAttribivNV, 717)
+ GL_STUB(glIsProgramNV, 718)
+ GL_STUB(glLoadProgramNV, 719)
+ GL_STUB(glProgramParameters4dvNV, 720)
+ GL_STUB(glProgramParameters4fvNV, 721)
+ GL_STUB(glRequestResidentProgramsNV, 722)
+ GL_STUB(glTrackMatrixNV, 723)
+ GL_STUB(glVertexAttrib1dNV, 724)
+ GL_STUB(glVertexAttrib1dvNV, 725)
+ GL_STUB(glVertexAttrib1fNV, 726)
+ GL_STUB(glVertexAttrib1fvNV, 727)
+ GL_STUB(glVertexAttrib1sNV, 728)
+ GL_STUB(glVertexAttrib1svNV, 729)
+ GL_STUB(glVertexAttrib2dNV, 730)
+ GL_STUB(glVertexAttrib2dvNV, 731)
+ GL_STUB(glVertexAttrib2fNV, 732)
+ GL_STUB(glVertexAttrib2fvNV, 733)
+ GL_STUB(glVertexAttrib2sNV, 734)
+ GL_STUB(glVertexAttrib2svNV, 735)
+ GL_STUB(glVertexAttrib3dNV, 736)
+ GL_STUB(glVertexAttrib3dvNV, 737)
+ GL_STUB(glVertexAttrib3fNV, 738)
+ GL_STUB(glVertexAttrib3fvNV, 739)
+ GL_STUB(glVertexAttrib3sNV, 740)
+ GL_STUB(glVertexAttrib3svNV, 741)
+ GL_STUB(glVertexAttrib4dNV, 742)
+ GL_STUB(glVertexAttrib4dvNV, 743)
+ GL_STUB(glVertexAttrib4fNV, 744)
+ GL_STUB(glVertexAttrib4fvNV, 745)
+ GL_STUB(glVertexAttrib4sNV, 746)
+ GL_STUB(glVertexAttrib4svNV, 747)
+ GL_STUB(glVertexAttrib4ubNV, 748)
+ GL_STUB(glVertexAttrib4ubvNV, 749)
+ GL_STUB(glVertexAttribPointerNV, 750)
+ GL_STUB(glVertexAttribs1dvNV, 751)
+ GL_STUB(glVertexAttribs1fvNV, 752)
+ GL_STUB(glVertexAttribs1svNV, 753)
+ GL_STUB(glVertexAttribs2dvNV, 754)
+ GL_STUB(glVertexAttribs2fvNV, 755)
+ GL_STUB(glVertexAttribs2svNV, 756)
+ GL_STUB(glVertexAttribs3dvNV, 757)
+ GL_STUB(glVertexAttribs3fvNV, 758)
+ GL_STUB(glVertexAttribs3svNV, 759)
+ GL_STUB(glVertexAttribs4dvNV, 760)
+ GL_STUB(glVertexAttribs4fvNV, 761)
+ GL_STUB(glVertexAttribs4svNV, 762)
+ GL_STUB(glVertexAttribs4ubvNV, 763)
+ GL_STUB(glGetTexBumpParameterfvATI, 764)
+ GL_STUB(glGetTexBumpParameterivATI, 765)
+ GL_STUB(glTexBumpParameterfvATI, 766)
+ GL_STUB(glTexBumpParameterivATI, 767)
+ GL_STUB(glAlphaFragmentOp1ATI, 768)
+ GL_STUB(glAlphaFragmentOp2ATI, 769)
+ GL_STUB(glAlphaFragmentOp3ATI, 770)
+ GL_STUB(glBeginFragmentShaderATI, 771)
+ GL_STUB(glBindFragmentShaderATI, 772)
+ GL_STUB(glColorFragmentOp1ATI, 773)
+ GL_STUB(glColorFragmentOp2ATI, 774)
+ GL_STUB(glColorFragmentOp3ATI, 775)
+ GL_STUB(glDeleteFragmentShaderATI, 776)
+ GL_STUB(glEndFragmentShaderATI, 777)
+ GL_STUB(glGenFragmentShadersATI, 778)
+ GL_STUB(glPassTexCoordATI, 779)
+ GL_STUB(glSampleMapATI, 780)
+ GL_STUB(glSetFragmentShaderConstantATI, 781)
+ GL_STUB(glPointParameteriNV, 782)
+ GL_STUB(glPointParameterivNV, 783)
+ GL_STUB(gl_dispatch_stub_784, 784)
+ HIDDEN(gl_dispatch_stub_784)
+ GL_STUB(gl_dispatch_stub_785, 785)
+ HIDDEN(gl_dispatch_stub_785)
+ GL_STUB(gl_dispatch_stub_786, 786)
+ HIDDEN(gl_dispatch_stub_786)
GL_STUB(gl_dispatch_stub_787, 787)
HIDDEN(gl_dispatch_stub_787)
GL_STUB(gl_dispatch_stub_788, 788)
HIDDEN(gl_dispatch_stub_788)
- GL_STUB(glBindFramebufferEXT, 789)
- GL_STUB(glBindRenderbufferEXT, 790)
- GL_STUB(glCheckFramebufferStatusEXT, 791)
- GL_STUB(glDeleteFramebuffersEXT, 792)
- GL_STUB(glDeleteRenderbuffersEXT, 793)
- GL_STUB(glFramebufferRenderbufferEXT, 794)
- GL_STUB(glFramebufferTexture1DEXT, 795)
- GL_STUB(glFramebufferTexture2DEXT, 796)
- GL_STUB(glFramebufferTexture3DEXT, 797)
- GL_STUB(glGenFramebuffersEXT, 798)
- GL_STUB(glGenRenderbuffersEXT, 799)
- GL_STUB(glGenerateMipmapEXT, 800)
- GL_STUB(glGetFramebufferAttachmentParameterivEXT, 801)
- GL_STUB(glGetRenderbufferParameterivEXT, 802)
- GL_STUB(glIsFramebufferEXT, 803)
- GL_STUB(glIsRenderbufferEXT, 804)
- GL_STUB(glRenderbufferStorageEXT, 805)
- GL_STUB(gl_dispatch_stub_806, 806)
- HIDDEN(gl_dispatch_stub_806)
- GL_STUB(gl_dispatch_stub_807, 807)
- HIDDEN(gl_dispatch_stub_807)
- GL_STUB(gl_dispatch_stub_808, 808)
- HIDDEN(gl_dispatch_stub_808)
- GL_STUB(glBindFragDataLocationEXT, 809)
- GL_STUB(glGetFragDataLocationEXT, 810)
- GL_STUB(glGetUniformuivEXT, 811)
- GL_STUB(glGetVertexAttribIivEXT, 812)
- GL_STUB(glGetVertexAttribIuivEXT, 813)
- GL_STUB(glUniform1uiEXT, 814)
- GL_STUB(glUniform1uivEXT, 815)
- GL_STUB(glUniform2uiEXT, 816)
- GL_STUB(glUniform2uivEXT, 817)
- GL_STUB(glUniform3uiEXT, 818)
- GL_STUB(glUniform3uivEXT, 819)
- GL_STUB(glUniform4uiEXT, 820)
- GL_STUB(glUniform4uivEXT, 821)
- GL_STUB(glVertexAttribI1iEXT, 822)
- GL_STUB(glVertexAttribI1ivEXT, 823)
- GL_STUB(glVertexAttribI1uiEXT, 824)
- GL_STUB(glVertexAttribI1uivEXT, 825)
- GL_STUB(glVertexAttribI2iEXT, 826)
- GL_STUB(glVertexAttribI2ivEXT, 827)
- GL_STUB(glVertexAttribI2uiEXT, 828)
- GL_STUB(glVertexAttribI2uivEXT, 829)
- GL_STUB(glVertexAttribI3iEXT, 830)
- GL_STUB(glVertexAttribI3ivEXT, 831)
- GL_STUB(glVertexAttribI3uiEXT, 832)
- GL_STUB(glVertexAttribI3uivEXT, 833)
- GL_STUB(glVertexAttribI4bvEXT, 834)
- GL_STUB(glVertexAttribI4iEXT, 835)
- GL_STUB(glVertexAttribI4ivEXT, 836)
- GL_STUB(glVertexAttribI4svEXT, 837)
- GL_STUB(glVertexAttribI4ubvEXT, 838)
- GL_STUB(glVertexAttribI4uiEXT, 839)
- GL_STUB(glVertexAttribI4uivEXT, 840)
- GL_STUB(glVertexAttribI4usvEXT, 841)
- GL_STUB(glVertexAttribIPointerEXT, 842)
- GL_STUB(glFramebufferTextureLayerEXT, 843)
- GL_STUB(glColorMaskIndexedEXT, 844)
- GL_STUB(glDisableIndexedEXT, 845)
- GL_STUB(glEnableIndexedEXT, 846)
- GL_STUB(glGetBooleanIndexedvEXT, 847)
- GL_STUB(glGetIntegerIndexedvEXT, 848)
- GL_STUB(glIsEnabledIndexedEXT, 849)
- GL_STUB(glClearColorIiEXT, 850)
- GL_STUB(glClearColorIuiEXT, 851)
- GL_STUB(glGetTexParameterIivEXT, 852)
- GL_STUB(glGetTexParameterIuivEXT, 853)
- GL_STUB(glTexParameterIivEXT, 854)
- GL_STUB(glTexParameterIuivEXT, 855)
- GL_STUB(glBeginConditionalRenderNV, 856)
- GL_STUB(glEndConditionalRenderNV, 857)
- GL_STUB(glBeginTransformFeedbackEXT, 858)
- GL_STUB(glBindBufferBaseEXT, 859)
- GL_STUB(glBindBufferOffsetEXT, 860)
- GL_STUB(glBindBufferRangeEXT, 861)
- GL_STUB(glEndTransformFeedbackEXT, 862)
- GL_STUB(glGetTransformFeedbackVaryingEXT, 863)
- GL_STUB(glTransformFeedbackVaryingsEXT, 864)
- GL_STUB(glProvokingVertexEXT, 865)
- GL_STUB(gl_dispatch_stub_866, 866)
- HIDDEN(gl_dispatch_stub_866)
- GL_STUB(gl_dispatch_stub_867, 867)
- HIDDEN(gl_dispatch_stub_867)
- GL_STUB(glGetObjectParameterivAPPLE, 868)
- GL_STUB(glObjectPurgeableAPPLE, 869)
- GL_STUB(glObjectUnpurgeableAPPLE, 870)
- GL_STUB(glActiveProgramEXT, 871)
- GL_STUB(glCreateShaderProgramEXT, 872)
- GL_STUB(glUseShaderProgramEXT, 873)
- GL_STUB(gl_dispatch_stub_874, 874)
- HIDDEN(gl_dispatch_stub_874)
- GL_STUB(gl_dispatch_stub_875, 875)
- HIDDEN(gl_dispatch_stub_875)
+ GL_STUB(glGetProgramNamedParameterdvNV, 789)
+ GL_STUB(glGetProgramNamedParameterfvNV, 790)
+ GL_STUB(glProgramNamedParameter4dNV, 791)
+ GL_STUB(glProgramNamedParameter4dvNV, 792)
+ GL_STUB(glProgramNamedParameter4fNV, 793)
+ GL_STUB(glProgramNamedParameter4fvNV, 794)
+ GL_STUB(glPrimitiveRestartIndexNV, 795)
+ GL_STUB(glPrimitiveRestartNV, 796)
+ GL_STUB(gl_dispatch_stub_797, 797)
+ HIDDEN(gl_dispatch_stub_797)
+ GL_STUB(gl_dispatch_stub_798, 798)
+ HIDDEN(gl_dispatch_stub_798)
+ GL_STUB(glBindFramebufferEXT, 799)
+ GL_STUB(glBindRenderbufferEXT, 800)
+ GL_STUB(glCheckFramebufferStatusEXT, 801)
+ GL_STUB(glDeleteFramebuffersEXT, 802)
+ GL_STUB(glDeleteRenderbuffersEXT, 803)
+ GL_STUB(glFramebufferRenderbufferEXT, 804)
+ GL_STUB(glFramebufferTexture1DEXT, 805)
+ GL_STUB(glFramebufferTexture2DEXT, 806)
+ GL_STUB(glFramebufferTexture3DEXT, 807)
+ GL_STUB(glGenFramebuffersEXT, 808)
+ GL_STUB(glGenRenderbuffersEXT, 809)
+ GL_STUB(glGenerateMipmapEXT, 810)
+ GL_STUB(glGetFramebufferAttachmentParameterivEXT, 811)
+ GL_STUB(glGetRenderbufferParameterivEXT, 812)
+ GL_STUB(glIsFramebufferEXT, 813)
+ GL_STUB(glIsRenderbufferEXT, 814)
+ GL_STUB(glRenderbufferStorageEXT, 815)
+ GL_STUB(gl_dispatch_stub_816, 816)
+ HIDDEN(gl_dispatch_stub_816)
+ GL_STUB(gl_dispatch_stub_817, 817)
+ HIDDEN(gl_dispatch_stub_817)
+ GL_STUB(gl_dispatch_stub_818, 818)
+ HIDDEN(gl_dispatch_stub_818)
+ GL_STUB(glBindFragDataLocationEXT, 819)
+ GL_STUB(glGetFragDataLocationEXT, 820)
+ GL_STUB(glGetUniformuivEXT, 821)
+ GL_STUB(glGetVertexAttribIivEXT, 822)
+ GL_STUB(glGetVertexAttribIuivEXT, 823)
+ GL_STUB(glUniform1uiEXT, 824)
+ GL_STUB(glUniform1uivEXT, 825)
+ GL_STUB(glUniform2uiEXT, 826)
+ GL_STUB(glUniform2uivEXT, 827)
+ GL_STUB(glUniform3uiEXT, 828)
+ GL_STUB(glUniform3uivEXT, 829)
+ GL_STUB(glUniform4uiEXT, 830)
+ GL_STUB(glUniform4uivEXT, 831)
+ GL_STUB(glVertexAttribI1iEXT, 832)
+ GL_STUB(glVertexAttribI1ivEXT, 833)
+ GL_STUB(glVertexAttribI1uiEXT, 834)
+ GL_STUB(glVertexAttribI1uivEXT, 835)
+ GL_STUB(glVertexAttribI2iEXT, 836)
+ GL_STUB(glVertexAttribI2ivEXT, 837)
+ GL_STUB(glVertexAttribI2uiEXT, 838)
+ GL_STUB(glVertexAttribI2uivEXT, 839)
+ GL_STUB(glVertexAttribI3iEXT, 840)
+ GL_STUB(glVertexAttribI3ivEXT, 841)
+ GL_STUB(glVertexAttribI3uiEXT, 842)
+ GL_STUB(glVertexAttribI3uivEXT, 843)
+ GL_STUB(glVertexAttribI4bvEXT, 844)
+ GL_STUB(glVertexAttribI4iEXT, 845)
+ GL_STUB(glVertexAttribI4ivEXT, 846)
+ GL_STUB(glVertexAttribI4svEXT, 847)
+ GL_STUB(glVertexAttribI4ubvEXT, 848)
+ GL_STUB(glVertexAttribI4uiEXT, 849)
+ GL_STUB(glVertexAttribI4uivEXT, 850)
+ GL_STUB(glVertexAttribI4usvEXT, 851)
+ GL_STUB(glVertexAttribIPointerEXT, 852)
+ GL_STUB(glFramebufferTextureLayerEXT, 853)
+ GL_STUB(glColorMaskIndexedEXT, 854)
+ GL_STUB(glDisableIndexedEXT, 855)
+ GL_STUB(glEnableIndexedEXT, 856)
+ GL_STUB(glGetBooleanIndexedvEXT, 857)
+ GL_STUB(glGetIntegerIndexedvEXT, 858)
+ GL_STUB(glIsEnabledIndexedEXT, 859)
+ GL_STUB(glClearColorIiEXT, 860)
+ GL_STUB(glClearColorIuiEXT, 861)
+ GL_STUB(glGetTexParameterIivEXT, 862)
+ GL_STUB(glGetTexParameterIuivEXT, 863)
+ GL_STUB(glTexParameterIivEXT, 864)
+ GL_STUB(glTexParameterIuivEXT, 865)
+ GL_STUB(glBeginConditionalRenderNV, 866)
+ GL_STUB(glEndConditionalRenderNV, 867)
+ GL_STUB(glBeginTransformFeedbackEXT, 868)
+ GL_STUB(glBindBufferBaseEXT, 869)
+ GL_STUB(glBindBufferOffsetEXT, 870)
+ GL_STUB(glBindBufferRangeEXT, 871)
+ GL_STUB(glEndTransformFeedbackEXT, 872)
+ GL_STUB(glGetTransformFeedbackVaryingEXT, 873)
+ GL_STUB(glTransformFeedbackVaryingsEXT, 874)
+ GL_STUB(glProvokingVertexEXT, 875)
GL_STUB(gl_dispatch_stub_876, 876)
HIDDEN(gl_dispatch_stub_876)
GL_STUB(gl_dispatch_stub_877, 877)
HIDDEN(gl_dispatch_stub_877)
- GL_STUB(gl_dispatch_stub_878, 878)
- HIDDEN(gl_dispatch_stub_878)
- GL_STUB(glEGLImageTargetRenderbufferStorageOES, 879)
- GL_STUB(glEGLImageTargetTexture2DOES, 880)
+ GL_STUB(glGetObjectParameterivAPPLE, 878)
+ GL_STUB(glObjectPurgeableAPPLE, 879)
+ GL_STUB(glObjectUnpurgeableAPPLE, 880)
+ GL_STUB(glActiveProgramEXT, 881)
+ GL_STUB(glCreateShaderProgramEXT, 882)
+ GL_STUB(glUseShaderProgramEXT, 883)
+ GL_STUB(glTextureBarrierNV, 884)
+ GL_STUB(gl_dispatch_stub_885, 885)
+ HIDDEN(gl_dispatch_stub_885)
+ GL_STUB(gl_dispatch_stub_886, 886)
+ HIDDEN(gl_dispatch_stub_886)
+ GL_STUB(gl_dispatch_stub_887, 887)
+ HIDDEN(gl_dispatch_stub_887)
+ GL_STUB(gl_dispatch_stub_888, 888)
+ HIDDEN(gl_dispatch_stub_888)
+ GL_STUB(gl_dispatch_stub_889, 889)
+ HIDDEN(gl_dispatch_stub_889)
+ GL_STUB(glEGLImageTargetRenderbufferStorageOES, 890)
+ GL_STUB(glEGLImageTargetTexture2DOES, 891)
GL_STUB_ALIAS(glArrayElementEXT, glArrayElement)
GL_STUB_ALIAS(glBindTextureEXT, glBindTexture)
GL_STUB_ALIAS(glDrawArraysEXT, glDrawArrays)
diff --git a/src/mapi/glapi/glapi_x86-64.S b/src/mapi/glapi/glapi_x86-64.S
index af46f2b337e..2dec611c5df 100644
--- a/src/mapi/glapi/glapi_x86-64.S
+++ b/src/mapi/glapi/glapi_x86-64.S
@@ -73,7 +73,8 @@ _x86_64_get_dispatch:
.p2align 4,,15
_x86_64_get_dispatch:
- movq _gl_DispatchTSD(%rip), %rdi
+ movq _gl_DispatchTSD@GOTPCREL(%rip), %rax
+ movl (%rax), %edi
jmp pthread_getspecific@PLT
#elif defined(THREADS)
@@ -21797,12 +21798,49 @@ GL_PREFIX(ProgramParameteriARB):
.size GL_PREFIX(ProgramParameteriARB), .-GL_PREFIX(ProgramParameteriARB)
.p2align 4,,15
+ .globl GL_PREFIX(VertexAttribDivisorARB)
+ .type GL_PREFIX(VertexAttribDivisorARB), @function
+GL_PREFIX(VertexAttribDivisorARB):
+#if defined(GLX_USE_TLS)
+ call _x86_64_get_dispatch@PLT
+ movq 4624(%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 4624(%rax), %r11
+ jmp *%r11
+#else
+ movq _glapi_Dispatch(%rip), %rax
+ testq %rax, %rax
+ je 1f
+ movq 4624(%rax), %r11
+ jmp *%r11
+1:
+ pushq %rdi
+ pushq %rsi
+ pushq %rbp
+ call _glapi_get_dispatch
+ popq %rbp
+ popq %rsi
+ popq %rdi
+ movq 4624(%rax), %r11
+ jmp *%r11
+#endif /* defined(GLX_USE_TLS) */
+ .size GL_PREFIX(VertexAttribDivisorARB), .-GL_PREFIX(VertexAttribDivisorARB)
+
+ .p2align 4,,15
.globl GL_PREFIX(FlushMappedBufferRange)
.type GL_PREFIX(FlushMappedBufferRange), @function
GL_PREFIX(FlushMappedBufferRange):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 4624(%rax), %r11
+ movq 4632(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -21812,13 +21850,13 @@ GL_PREFIX(FlushMappedBufferRange):
popq %rdx
popq %rsi
popq %rdi
- movq 4624(%rax), %r11
+ movq 4632(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 4624(%rax), %r11
+ movq 4632(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -21828,7 +21866,7 @@ GL_PREFIX(FlushMappedBufferRange):
popq %rdx
popq %rsi
popq %rdi
- movq 4624(%rax), %r11
+ movq 4632(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(FlushMappedBufferRange), .-GL_PREFIX(FlushMappedBufferRange)
@@ -21839,7 +21877,7 @@ GL_PREFIX(FlushMappedBufferRange):
GL_PREFIX(MapBufferRange):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 4632(%rax), %r11
+ movq 4640(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -21853,13 +21891,13 @@ GL_PREFIX(MapBufferRange):
popq %rdx
popq %rsi
popq %rdi
- movq 4632(%rax), %r11
+ movq 4640(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 4632(%rax), %r11
+ movq 4640(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -21873,7 +21911,7 @@ GL_PREFIX(MapBufferRange):
popq %rdx
popq %rsi
popq %rdi
- movq 4632(%rax), %r11
+ movq 4640(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(MapBufferRange), .-GL_PREFIX(MapBufferRange)
@@ -21884,25 +21922,25 @@ GL_PREFIX(MapBufferRange):
GL_PREFIX(BindVertexArray):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 4640(%rax), %r11
+ movq 4648(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
call _x86_64_get_dispatch@PLT
popq %rdi
- movq 4640(%rax), %r11
+ movq 4648(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 4640(%rax), %r11
+ movq 4648(%rax), %r11
jmp *%r11
1:
pushq %rdi
call _glapi_get_dispatch
popq %rdi
- movq 4640(%rax), %r11
+ movq 4648(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(BindVertexArray), .-GL_PREFIX(BindVertexArray)
@@ -21913,7 +21951,7 @@ GL_PREFIX(BindVertexArray):
GL_PREFIX(GenVertexArrays):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 4648(%rax), %r11
+ movq 4656(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -21923,13 +21961,13 @@ GL_PREFIX(GenVertexArrays):
popq %rbp
popq %rsi
popq %rdi
- movq 4648(%rax), %r11
+ movq 4656(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 4648(%rax), %r11
+ movq 4656(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -21939,7 +21977,7 @@ GL_PREFIX(GenVertexArrays):
popq %rbp
popq %rsi
popq %rdi
- movq 4648(%rax), %r11
+ movq 4656(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(GenVertexArrays), .-GL_PREFIX(GenVertexArrays)
@@ -21950,7 +21988,7 @@ GL_PREFIX(GenVertexArrays):
GL_PREFIX(CopyBufferSubData):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 4656(%rax), %r11
+ movq 4664(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -21964,13 +22002,13 @@ GL_PREFIX(CopyBufferSubData):
popq %rdx
popq %rsi
popq %rdi
- movq 4656(%rax), %r11
+ movq 4664(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 4656(%rax), %r11
+ movq 4664(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -21984,7 +22022,7 @@ GL_PREFIX(CopyBufferSubData):
popq %rdx
popq %rsi
popq %rdi
- movq 4656(%rax), %r11
+ movq 4664(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(CopyBufferSubData), .-GL_PREFIX(CopyBufferSubData)
@@ -21995,7 +22033,7 @@ GL_PREFIX(CopyBufferSubData):
GL_PREFIX(ClientWaitSync):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 4664(%rax), %r11
+ movq 4672(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -22005,13 +22043,13 @@ GL_PREFIX(ClientWaitSync):
popq %rdx
popq %rsi
popq %rdi
- movq 4664(%rax), %r11
+ movq 4672(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 4664(%rax), %r11
+ movq 4672(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -22021,7 +22059,7 @@ GL_PREFIX(ClientWaitSync):
popq %rdx
popq %rsi
popq %rdi
- movq 4664(%rax), %r11
+ movq 4672(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(ClientWaitSync), .-GL_PREFIX(ClientWaitSync)
@@ -22032,25 +22070,25 @@ GL_PREFIX(ClientWaitSync):
GL_PREFIX(DeleteSync):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 4672(%rax), %r11
+ movq 4680(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
call _x86_64_get_dispatch@PLT
popq %rdi
- movq 4672(%rax), %r11
+ movq 4680(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 4672(%rax), %r11
+ movq 4680(%rax), %r11
jmp *%r11
1:
pushq %rdi
call _glapi_get_dispatch
popq %rdi
- movq 4672(%rax), %r11
+ movq 4680(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(DeleteSync), .-GL_PREFIX(DeleteSync)
@@ -22061,7 +22099,7 @@ GL_PREFIX(DeleteSync):
GL_PREFIX(FenceSync):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 4680(%rax), %r11
+ movq 4688(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -22071,13 +22109,13 @@ GL_PREFIX(FenceSync):
popq %rbp
popq %rsi
popq %rdi
- movq 4680(%rax), %r11
+ movq 4688(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 4680(%rax), %r11
+ movq 4688(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -22087,7 +22125,7 @@ GL_PREFIX(FenceSync):
popq %rbp
popq %rsi
popq %rdi
- movq 4680(%rax), %r11
+ movq 4688(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(FenceSync), .-GL_PREFIX(FenceSync)
@@ -22098,7 +22136,7 @@ GL_PREFIX(FenceSync):
GL_PREFIX(GetInteger64v):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 4688(%rax), %r11
+ movq 4696(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -22108,13 +22146,13 @@ GL_PREFIX(GetInteger64v):
popq %rbp
popq %rsi
popq %rdi
- movq 4688(%rax), %r11
+ movq 4696(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 4688(%rax), %r11
+ movq 4696(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -22124,7 +22162,7 @@ GL_PREFIX(GetInteger64v):
popq %rbp
popq %rsi
popq %rdi
- movq 4688(%rax), %r11
+ movq 4696(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(GetInteger64v), .-GL_PREFIX(GetInteger64v)
@@ -22135,7 +22173,7 @@ GL_PREFIX(GetInteger64v):
GL_PREFIX(GetSynciv):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 4696(%rax), %r11
+ movq 4704(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -22149,13 +22187,13 @@ GL_PREFIX(GetSynciv):
popq %rdx
popq %rsi
popq %rdi
- movq 4696(%rax), %r11
+ movq 4704(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 4696(%rax), %r11
+ movq 4704(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -22169,7 +22207,7 @@ GL_PREFIX(GetSynciv):
popq %rdx
popq %rsi
popq %rdi
- movq 4696(%rax), %r11
+ movq 4704(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(GetSynciv), .-GL_PREFIX(GetSynciv)
@@ -22180,25 +22218,25 @@ GL_PREFIX(GetSynciv):
GL_PREFIX(IsSync):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 4704(%rax), %r11
+ movq 4712(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
call _x86_64_get_dispatch@PLT
popq %rdi
- movq 4704(%rax), %r11
+ movq 4712(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 4704(%rax), %r11
+ movq 4712(%rax), %r11
jmp *%r11
1:
pushq %rdi
call _glapi_get_dispatch
popq %rdi
- movq 4704(%rax), %r11
+ movq 4712(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(IsSync), .-GL_PREFIX(IsSync)
@@ -22209,7 +22247,7 @@ GL_PREFIX(IsSync):
GL_PREFIX(WaitSync):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 4712(%rax), %r11
+ movq 4720(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -22219,13 +22257,13 @@ GL_PREFIX(WaitSync):
popq %rdx
popq %rsi
popq %rdi
- movq 4712(%rax), %r11
+ movq 4720(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 4712(%rax), %r11
+ movq 4720(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -22235,7 +22273,7 @@ GL_PREFIX(WaitSync):
popq %rdx
popq %rsi
popq %rdi
- movq 4712(%rax), %r11
+ movq 4720(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(WaitSync), .-GL_PREFIX(WaitSync)
@@ -22246,7 +22284,7 @@ GL_PREFIX(WaitSync):
GL_PREFIX(DrawElementsBaseVertex):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 4720(%rax), %r11
+ movq 4728(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -22260,13 +22298,13 @@ GL_PREFIX(DrawElementsBaseVertex):
popq %rdx
popq %rsi
popq %rdi
- movq 4720(%rax), %r11
+ movq 4728(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 4720(%rax), %r11
+ movq 4728(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -22280,7 +22318,7 @@ GL_PREFIX(DrawElementsBaseVertex):
popq %rdx
popq %rsi
popq %rdi
- movq 4720(%rax), %r11
+ movq 4728(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(DrawElementsBaseVertex), .-GL_PREFIX(DrawElementsBaseVertex)
@@ -22291,7 +22329,7 @@ GL_PREFIX(DrawElementsBaseVertex):
GL_PREFIX(DrawRangeElementsBaseVertex):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 4728(%rax), %r11
+ movq 4736(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -22309,13 +22347,13 @@ GL_PREFIX(DrawRangeElementsBaseVertex):
popq %rdx
popq %rsi
popq %rdi
- movq 4728(%rax), %r11
+ movq 4736(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 4728(%rax), %r11
+ movq 4736(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -22333,7 +22371,7 @@ GL_PREFIX(DrawRangeElementsBaseVertex):
popq %rdx
popq %rsi
popq %rdi
- movq 4728(%rax), %r11
+ movq 4736(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(DrawRangeElementsBaseVertex), .-GL_PREFIX(DrawRangeElementsBaseVertex)
@@ -22344,7 +22382,7 @@ GL_PREFIX(DrawRangeElementsBaseVertex):
GL_PREFIX(MultiDrawElementsBaseVertex):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 4736(%rax), %r11
+ movq 4744(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -22362,13 +22400,13 @@ GL_PREFIX(MultiDrawElementsBaseVertex):
popq %rdx
popq %rsi
popq %rdi
- movq 4736(%rax), %r11
+ movq 4744(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 4736(%rax), %r11
+ movq 4744(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -22386,18 +22424,174 @@ GL_PREFIX(MultiDrawElementsBaseVertex):
popq %rdx
popq %rsi
popq %rdi
- movq 4736(%rax), %r11
+ movq 4744(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(MultiDrawElementsBaseVertex), .-GL_PREFIX(MultiDrawElementsBaseVertex)
.p2align 4,,15
+ .globl GL_PREFIX(BlendEquationSeparateiARB)
+ .type GL_PREFIX(BlendEquationSeparateiARB), @function
+GL_PREFIX(BlendEquationSeparateiARB):
+#if defined(GLX_USE_TLS)
+ call _x86_64_get_dispatch@PLT
+ movq 4752(%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 4752(%rax), %r11
+ jmp *%r11
+#else
+ movq _glapi_Dispatch(%rip), %rax
+ testq %rax, %rax
+ je 1f
+ movq 4752(%rax), %r11
+ jmp *%r11
+1:
+ pushq %rdi
+ pushq %rsi
+ pushq %rdx
+ call _glapi_get_dispatch
+ popq %rdx
+ popq %rsi
+ popq %rdi
+ movq 4752(%rax), %r11
+ jmp *%r11
+#endif /* defined(GLX_USE_TLS) */
+ .size GL_PREFIX(BlendEquationSeparateiARB), .-GL_PREFIX(BlendEquationSeparateiARB)
+
+ .p2align 4,,15
+ .globl GL_PREFIX(BlendEquationiARB)
+ .type GL_PREFIX(BlendEquationiARB), @function
+GL_PREFIX(BlendEquationiARB):
+#if defined(GLX_USE_TLS)
+ call _x86_64_get_dispatch@PLT
+ movq 4760(%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 4760(%rax), %r11
+ jmp *%r11
+#else
+ movq _glapi_Dispatch(%rip), %rax
+ testq %rax, %rax
+ je 1f
+ movq 4760(%rax), %r11
+ jmp *%r11
+1:
+ pushq %rdi
+ pushq %rsi
+ pushq %rbp
+ call _glapi_get_dispatch
+ popq %rbp
+ popq %rsi
+ popq %rdi
+ movq 4760(%rax), %r11
+ jmp *%r11
+#endif /* defined(GLX_USE_TLS) */
+ .size GL_PREFIX(BlendEquationiARB), .-GL_PREFIX(BlendEquationiARB)
+
+ .p2align 4,,15
+ .globl GL_PREFIX(BlendFuncSeparateiARB)
+ .type GL_PREFIX(BlendFuncSeparateiARB), @function
+GL_PREFIX(BlendFuncSeparateiARB):
+#if defined(GLX_USE_TLS)
+ call _x86_64_get_dispatch@PLT
+ movq 4768(%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 4768(%rax), %r11
+ jmp *%r11
+#else
+ movq _glapi_Dispatch(%rip), %rax
+ testq %rax, %rax
+ je 1f
+ movq 4768(%rax), %r11
+ 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 4768(%rax), %r11
+ jmp *%r11
+#endif /* defined(GLX_USE_TLS) */
+ .size GL_PREFIX(BlendFuncSeparateiARB), .-GL_PREFIX(BlendFuncSeparateiARB)
+
+ .p2align 4,,15
+ .globl GL_PREFIX(BlendFunciARB)
+ .type GL_PREFIX(BlendFunciARB), @function
+GL_PREFIX(BlendFunciARB):
+#if defined(GLX_USE_TLS)
+ call _x86_64_get_dispatch@PLT
+ movq 4776(%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 4776(%rax), %r11
+ jmp *%r11
+#else
+ movq _glapi_Dispatch(%rip), %rax
+ testq %rax, %rax
+ je 1f
+ movq 4776(%rax), %r11
+ jmp *%r11
+1:
+ pushq %rdi
+ pushq %rsi
+ pushq %rdx
+ call _glapi_get_dispatch
+ popq %rdx
+ popq %rsi
+ popq %rdi
+ movq 4776(%rax), %r11
+ jmp *%r11
+#endif /* defined(GLX_USE_TLS) */
+ .size GL_PREFIX(BlendFunciARB), .-GL_PREFIX(BlendFunciARB)
+
+ .p2align 4,,15
.globl GL_PREFIX(BindTransformFeedback)
.type GL_PREFIX(BindTransformFeedback), @function
GL_PREFIX(BindTransformFeedback):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 4744(%rax), %r11
+ movq 4784(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -22407,13 +22601,13 @@ GL_PREFIX(BindTransformFeedback):
popq %rbp
popq %rsi
popq %rdi
- movq 4744(%rax), %r11
+ movq 4784(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 4744(%rax), %r11
+ movq 4784(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -22423,7 +22617,7 @@ GL_PREFIX(BindTransformFeedback):
popq %rbp
popq %rsi
popq %rdi
- movq 4744(%rax), %r11
+ movq 4784(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(BindTransformFeedback), .-GL_PREFIX(BindTransformFeedback)
@@ -22434,7 +22628,7 @@ GL_PREFIX(BindTransformFeedback):
GL_PREFIX(DeleteTransformFeedbacks):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 4752(%rax), %r11
+ movq 4792(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -22444,13 +22638,13 @@ GL_PREFIX(DeleteTransformFeedbacks):
popq %rbp
popq %rsi
popq %rdi
- movq 4752(%rax), %r11
+ movq 4792(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 4752(%rax), %r11
+ movq 4792(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -22460,7 +22654,7 @@ GL_PREFIX(DeleteTransformFeedbacks):
popq %rbp
popq %rsi
popq %rdi
- movq 4752(%rax), %r11
+ movq 4792(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(DeleteTransformFeedbacks), .-GL_PREFIX(DeleteTransformFeedbacks)
@@ -22471,7 +22665,7 @@ GL_PREFIX(DeleteTransformFeedbacks):
GL_PREFIX(DrawTransformFeedback):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 4760(%rax), %r11
+ movq 4800(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -22481,13 +22675,13 @@ GL_PREFIX(DrawTransformFeedback):
popq %rbp
popq %rsi
popq %rdi
- movq 4760(%rax), %r11
+ movq 4800(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 4760(%rax), %r11
+ movq 4800(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -22497,7 +22691,7 @@ GL_PREFIX(DrawTransformFeedback):
popq %rbp
popq %rsi
popq %rdi
- movq 4760(%rax), %r11
+ movq 4800(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(DrawTransformFeedback), .-GL_PREFIX(DrawTransformFeedback)
@@ -22508,7 +22702,7 @@ GL_PREFIX(DrawTransformFeedback):
GL_PREFIX(GenTransformFeedbacks):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 4768(%rax), %r11
+ movq 4808(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -22518,13 +22712,13 @@ GL_PREFIX(GenTransformFeedbacks):
popq %rbp
popq %rsi
popq %rdi
- movq 4768(%rax), %r11
+ movq 4808(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 4768(%rax), %r11
+ movq 4808(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -22534,7 +22728,7 @@ GL_PREFIX(GenTransformFeedbacks):
popq %rbp
popq %rsi
popq %rdi
- movq 4768(%rax), %r11
+ movq 4808(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(GenTransformFeedbacks), .-GL_PREFIX(GenTransformFeedbacks)
@@ -22545,25 +22739,25 @@ GL_PREFIX(GenTransformFeedbacks):
GL_PREFIX(IsTransformFeedback):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 4776(%rax), %r11
+ movq 4816(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
call _x86_64_get_dispatch@PLT
popq %rdi
- movq 4776(%rax), %r11
+ movq 4816(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 4776(%rax), %r11
+ movq 4816(%rax), %r11
jmp *%r11
1:
pushq %rdi
call _glapi_get_dispatch
popq %rdi
- movq 4776(%rax), %r11
+ movq 4816(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(IsTransformFeedback), .-GL_PREFIX(IsTransformFeedback)
@@ -22574,25 +22768,25 @@ GL_PREFIX(IsTransformFeedback):
GL_PREFIX(PauseTransformFeedback):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 4784(%rax), %r11
+ movq 4824(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rbp
call _x86_64_get_dispatch@PLT
popq %rbp
- movq 4784(%rax), %r11
+ movq 4824(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 4784(%rax), %r11
+ movq 4824(%rax), %r11
jmp *%r11
1:
pushq %rbp
call _glapi_get_dispatch
popq %rbp
- movq 4784(%rax), %r11
+ movq 4824(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(PauseTransformFeedback), .-GL_PREFIX(PauseTransformFeedback)
@@ -22603,36 +22797,221 @@ GL_PREFIX(PauseTransformFeedback):
GL_PREFIX(ResumeTransformFeedback):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 4792(%rax), %r11
+ movq 4832(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rbp
call _x86_64_get_dispatch@PLT
popq %rbp
- movq 4792(%rax), %r11
+ movq 4832(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 4792(%rax), %r11
+ movq 4832(%rax), %r11
jmp *%r11
1:
pushq %rbp
call _glapi_get_dispatch
popq %rbp
- movq 4792(%rax), %r11
+ movq 4832(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(ResumeTransformFeedback), .-GL_PREFIX(ResumeTransformFeedback)
.p2align 4,,15
+ .globl GL_PREFIX(ClearDepthf)
+ .type GL_PREFIX(ClearDepthf), @function
+GL_PREFIX(ClearDepthf):
+#if defined(GLX_USE_TLS)
+ call _x86_64_get_dispatch@PLT
+ movq 4840(%rax), %r11
+ jmp *%r11
+#elif defined(PTHREADS)
+ pushq %rdi
+ call _x86_64_get_dispatch@PLT
+ popq %rdi
+ movq 4840(%rax), %r11
+ jmp *%r11
+#else
+ movq _glapi_Dispatch(%rip), %rax
+ testq %rax, %rax
+ je 1f
+ movq 4840(%rax), %r11
+ jmp *%r11
+1:
+ pushq %rdi
+ call _glapi_get_dispatch
+ popq %rdi
+ movq 4840(%rax), %r11
+ jmp *%r11
+#endif /* defined(GLX_USE_TLS) */
+ .size GL_PREFIX(ClearDepthf), .-GL_PREFIX(ClearDepthf)
+
+ .p2align 4,,15
+ .globl GL_PREFIX(DepthRangef)
+ .type GL_PREFIX(DepthRangef), @function
+GL_PREFIX(DepthRangef):
+#if defined(GLX_USE_TLS)
+ call _x86_64_get_dispatch@PLT
+ movq 4848(%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 4848(%rax), %r11
+ jmp *%r11
+#else
+ movq _glapi_Dispatch(%rip), %rax
+ testq %rax, %rax
+ je 1f
+ movq 4848(%rax), %r11
+ jmp *%r11
+1:
+ pushq %rdi
+ pushq %rsi
+ pushq %rbp
+ call _glapi_get_dispatch
+ popq %rbp
+ popq %rsi
+ popq %rdi
+ movq 4848(%rax), %r11
+ jmp *%r11
+#endif /* defined(GLX_USE_TLS) */
+ .size GL_PREFIX(DepthRangef), .-GL_PREFIX(DepthRangef)
+
+ .p2align 4,,15
+ .globl GL_PREFIX(GetShaderPrecisionFormat)
+ .type GL_PREFIX(GetShaderPrecisionFormat), @function
+GL_PREFIX(GetShaderPrecisionFormat):
+#if defined(GLX_USE_TLS)
+ call _x86_64_get_dispatch@PLT
+ movq 4856(%rax), %r11
+ jmp *%r11
+#elif defined(PTHREADS)
+ pushq %rdi
+ pushq %rsi
+ pushq %rdx
+ pushq %rcx
+ pushq %rbp
+ call _x86_64_get_dispatch@PLT
+ popq %rbp
+ popq %rcx
+ popq %rdx
+ popq %rsi
+ popq %rdi
+ movq 4856(%rax), %r11
+ jmp *%r11
+#else
+ movq _glapi_Dispatch(%rip), %rax
+ testq %rax, %rax
+ je 1f
+ movq 4856(%rax), %r11
+ jmp *%r11
+1:
+ pushq %rdi
+ pushq %rsi
+ pushq %rdx
+ pushq %rcx
+ pushq %rbp
+ call _glapi_get_dispatch
+ popq %rbp
+ popq %rcx
+ popq %rdx
+ popq %rsi
+ popq %rdi
+ movq 4856(%rax), %r11
+ jmp *%r11
+#endif /* defined(GLX_USE_TLS) */
+ .size GL_PREFIX(GetShaderPrecisionFormat), .-GL_PREFIX(GetShaderPrecisionFormat)
+
+ .p2align 4,,15
+ .globl GL_PREFIX(ReleaseShaderCompiler)
+ .type GL_PREFIX(ReleaseShaderCompiler), @function
+GL_PREFIX(ReleaseShaderCompiler):
+#if defined(GLX_USE_TLS)
+ call _x86_64_get_dispatch@PLT
+ movq 4864(%rax), %r11
+ jmp *%r11
+#elif defined(PTHREADS)
+ pushq %rbp
+ call _x86_64_get_dispatch@PLT
+ popq %rbp
+ movq 4864(%rax), %r11
+ jmp *%r11
+#else
+ movq _glapi_Dispatch(%rip), %rax
+ testq %rax, %rax
+ je 1f
+ movq 4864(%rax), %r11
+ jmp *%r11
+1:
+ pushq %rbp
+ call _glapi_get_dispatch
+ popq %rbp
+ movq 4864(%rax), %r11
+ jmp *%r11
+#endif /* defined(GLX_USE_TLS) */
+ .size GL_PREFIX(ReleaseShaderCompiler), .-GL_PREFIX(ReleaseShaderCompiler)
+
+ .p2align 4,,15
+ .globl GL_PREFIX(ShaderBinary)
+ .type GL_PREFIX(ShaderBinary), @function
+GL_PREFIX(ShaderBinary):
+#if defined(GLX_USE_TLS)
+ call _x86_64_get_dispatch@PLT
+ movq 4872(%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 4872(%rax), %r11
+ jmp *%r11
+#else
+ movq _glapi_Dispatch(%rip), %rax
+ testq %rax, %rax
+ je 1f
+ movq 4872(%rax), %r11
+ 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 4872(%rax), %r11
+ jmp *%r11
+#endif /* defined(GLX_USE_TLS) */
+ .size GL_PREFIX(ShaderBinary), .-GL_PREFIX(ShaderBinary)
+
+ .p2align 4,,15
.globl GL_PREFIX(PolygonOffsetEXT)
.type GL_PREFIX(PolygonOffsetEXT), @function
GL_PREFIX(PolygonOffsetEXT):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 4800(%rax), %r11
+ movq 4880(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
subq $24, %rsp
@@ -22642,13 +23021,13 @@ GL_PREFIX(PolygonOffsetEXT):
movq 8(%rsp), %xmm1
movq (%rsp), %xmm0
addq $24, %rsp
- movq 4800(%rax), %r11
+ movq 4880(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 4800(%rax), %r11
+ movq 4880(%rax), %r11
jmp *%r11
1:
subq $24, %rsp
@@ -22658,19 +23037,19 @@ GL_PREFIX(PolygonOffsetEXT):
movq 8(%rsp), %xmm1
movq (%rsp), %xmm0
addq $24, %rsp
- movq 4800(%rax), %r11
+ movq 4880(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(PolygonOffsetEXT), .-GL_PREFIX(PolygonOffsetEXT)
.p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_601)
- .type GL_PREFIX(_dispatch_stub_601), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_601))
-GL_PREFIX(_dispatch_stub_601):
+ .globl GL_PREFIX(_dispatch_stub_611)
+ .type GL_PREFIX(_dispatch_stub_611), @function
+ HIDDEN(GL_PREFIX(_dispatch_stub_611))
+GL_PREFIX(_dispatch_stub_611):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 4808(%rax), %r11
+ movq 4888(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -22680,13 +23059,13 @@ GL_PREFIX(_dispatch_stub_601):
popq %rbp
popq %rsi
popq %rdi
- movq 4808(%rax), %r11
+ movq 4888(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 4808(%rax), %r11
+ movq 4888(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -22696,19 +23075,19 @@ GL_PREFIX(_dispatch_stub_601):
popq %rbp
popq %rsi
popq %rdi
- movq 4808(%rax), %r11
+ movq 4888(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_601), .-GL_PREFIX(_dispatch_stub_601)
+ .size GL_PREFIX(_dispatch_stub_611), .-GL_PREFIX(_dispatch_stub_611)
.p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_602)
- .type GL_PREFIX(_dispatch_stub_602), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_602))
-GL_PREFIX(_dispatch_stub_602):
+ .globl GL_PREFIX(_dispatch_stub_612)
+ .type GL_PREFIX(_dispatch_stub_612), @function
+ HIDDEN(GL_PREFIX(_dispatch_stub_612))
+GL_PREFIX(_dispatch_stub_612):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 4816(%rax), %r11
+ movq 4896(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -22718,13 +23097,13 @@ GL_PREFIX(_dispatch_stub_602):
popq %rbp
popq %rsi
popq %rdi
- movq 4816(%rax), %r11
+ movq 4896(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 4816(%rax), %r11
+ movq 4896(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -22734,19 +23113,19 @@ GL_PREFIX(_dispatch_stub_602):
popq %rbp
popq %rsi
popq %rdi
- movq 4816(%rax), %r11
+ movq 4896(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_602), .-GL_PREFIX(_dispatch_stub_602)
+ .size GL_PREFIX(_dispatch_stub_612), .-GL_PREFIX(_dispatch_stub_612)
.p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_603)
- .type GL_PREFIX(_dispatch_stub_603), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_603))
-GL_PREFIX(_dispatch_stub_603):
+ .globl GL_PREFIX(_dispatch_stub_613)
+ .type GL_PREFIX(_dispatch_stub_613), @function
+ HIDDEN(GL_PREFIX(_dispatch_stub_613))
+GL_PREFIX(_dispatch_stub_613):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 4824(%rax), %r11
+ movq 4904(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
subq $24, %rsp
@@ -22756,13 +23135,13 @@ GL_PREFIX(_dispatch_stub_603):
movq 8(%rsp), %xmm0
movq (%rsp), %rdi
addq $24, %rsp
- movq 4824(%rax), %r11
+ movq 4904(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 4824(%rax), %r11
+ movq 4904(%rax), %r11
jmp *%r11
1:
subq $24, %rsp
@@ -22772,19 +23151,19 @@ GL_PREFIX(_dispatch_stub_603):
movq 8(%rsp), %xmm0
movq (%rsp), %rdi
addq $24, %rsp
- movq 4824(%rax), %r11
+ movq 4904(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_603), .-GL_PREFIX(_dispatch_stub_603)
+ .size GL_PREFIX(_dispatch_stub_613), .-GL_PREFIX(_dispatch_stub_613)
.p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_604)
- .type GL_PREFIX(_dispatch_stub_604), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_604))
-GL_PREFIX(_dispatch_stub_604):
+ .globl GL_PREFIX(_dispatch_stub_614)
+ .type GL_PREFIX(_dispatch_stub_614), @function
+ HIDDEN(GL_PREFIX(_dispatch_stub_614))
+GL_PREFIX(_dispatch_stub_614):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 4832(%rax), %r11
+ movq 4912(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -22794,13 +23173,13 @@ GL_PREFIX(_dispatch_stub_604):
popq %rbp
popq %rsi
popq %rdi
- movq 4832(%rax), %r11
+ movq 4912(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 4832(%rax), %r11
+ movq 4912(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -22810,19 +23189,19 @@ GL_PREFIX(_dispatch_stub_604):
popq %rbp
popq %rsi
popq %rdi
- movq 4832(%rax), %r11
+ movq 4912(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_604), .-GL_PREFIX(_dispatch_stub_604)
+ .size GL_PREFIX(_dispatch_stub_614), .-GL_PREFIX(_dispatch_stub_614)
.p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_605)
- .type GL_PREFIX(_dispatch_stub_605), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_605))
-GL_PREFIX(_dispatch_stub_605):
+ .globl GL_PREFIX(_dispatch_stub_615)
+ .type GL_PREFIX(_dispatch_stub_615), @function
+ HIDDEN(GL_PREFIX(_dispatch_stub_615))
+GL_PREFIX(_dispatch_stub_615):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 4840(%rax), %r11
+ movq 4920(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -22832,13 +23211,13 @@ GL_PREFIX(_dispatch_stub_605):
popq %rbp
popq %rsi
popq %rdi
- movq 4840(%rax), %r11
+ movq 4920(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 4840(%rax), %r11
+ movq 4920(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -22848,19 +23227,19 @@ GL_PREFIX(_dispatch_stub_605):
popq %rbp
popq %rsi
popq %rdi
- movq 4840(%rax), %r11
+ movq 4920(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_605), .-GL_PREFIX(_dispatch_stub_605)
+ .size GL_PREFIX(_dispatch_stub_615), .-GL_PREFIX(_dispatch_stub_615)
.p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_606)
- .type GL_PREFIX(_dispatch_stub_606), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_606))
-GL_PREFIX(_dispatch_stub_606):
+ .globl GL_PREFIX(_dispatch_stub_616)
+ .type GL_PREFIX(_dispatch_stub_616), @function
+ HIDDEN(GL_PREFIX(_dispatch_stub_616))
+GL_PREFIX(_dispatch_stub_616):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 4848(%rax), %r11
+ movq 4928(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -22870,13 +23249,13 @@ GL_PREFIX(_dispatch_stub_606):
popq %rbp
popq %rsi
popq %rdi
- movq 4848(%rax), %r11
+ movq 4928(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 4848(%rax), %r11
+ movq 4928(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -22886,19 +23265,19 @@ GL_PREFIX(_dispatch_stub_606):
popq %rbp
popq %rsi
popq %rdi
- movq 4848(%rax), %r11
+ movq 4928(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_606), .-GL_PREFIX(_dispatch_stub_606)
+ .size GL_PREFIX(_dispatch_stub_616), .-GL_PREFIX(_dispatch_stub_616)
.p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_607)
- .type GL_PREFIX(_dispatch_stub_607), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_607))
-GL_PREFIX(_dispatch_stub_607):
+ .globl GL_PREFIX(_dispatch_stub_617)
+ .type GL_PREFIX(_dispatch_stub_617), @function
+ HIDDEN(GL_PREFIX(_dispatch_stub_617))
+GL_PREFIX(_dispatch_stub_617):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 4856(%rax), %r11
+ movq 4936(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -22908,13 +23287,13 @@ GL_PREFIX(_dispatch_stub_607):
popq %rbp
popq %rsi
popq %rdi
- movq 4856(%rax), %r11
+ movq 4936(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 4856(%rax), %r11
+ movq 4936(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -22924,40 +23303,40 @@ GL_PREFIX(_dispatch_stub_607):
popq %rbp
popq %rsi
popq %rdi
- movq 4856(%rax), %r11
+ movq 4936(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_607), .-GL_PREFIX(_dispatch_stub_607)
+ .size GL_PREFIX(_dispatch_stub_617), .-GL_PREFIX(_dispatch_stub_617)
.p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_608)
- .type GL_PREFIX(_dispatch_stub_608), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_608))
-GL_PREFIX(_dispatch_stub_608):
+ .globl GL_PREFIX(_dispatch_stub_618)
+ .type GL_PREFIX(_dispatch_stub_618), @function
+ HIDDEN(GL_PREFIX(_dispatch_stub_618))
+GL_PREFIX(_dispatch_stub_618):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 4864(%rax), %r11
+ movq 4944(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
call _x86_64_get_dispatch@PLT
popq %rdi
- movq 4864(%rax), %r11
+ movq 4944(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 4864(%rax), %r11
+ movq 4944(%rax), %r11
jmp *%r11
1:
pushq %rdi
call _glapi_get_dispatch
popq %rdi
- movq 4864(%rax), %r11
+ movq 4944(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_608), .-GL_PREFIX(_dispatch_stub_608)
+ .size GL_PREFIX(_dispatch_stub_618), .-GL_PREFIX(_dispatch_stub_618)
.p2align 4,,15
.globl GL_PREFIX(ColorPointerEXT)
@@ -22965,7 +23344,7 @@ GL_PREFIX(_dispatch_stub_608):
GL_PREFIX(ColorPointerEXT):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 4872(%rax), %r11
+ movq 4952(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -22979,13 +23358,13 @@ GL_PREFIX(ColorPointerEXT):
popq %rdx
popq %rsi
popq %rdi
- movq 4872(%rax), %r11
+ movq 4952(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 4872(%rax), %r11
+ movq 4952(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -22999,7 +23378,7 @@ GL_PREFIX(ColorPointerEXT):
popq %rdx
popq %rsi
popq %rdi
- movq 4872(%rax), %r11
+ movq 4952(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(ColorPointerEXT), .-GL_PREFIX(ColorPointerEXT)
@@ -23010,7 +23389,7 @@ GL_PREFIX(ColorPointerEXT):
GL_PREFIX(EdgeFlagPointerEXT):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 4880(%rax), %r11
+ movq 4960(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -23020,13 +23399,13 @@ GL_PREFIX(EdgeFlagPointerEXT):
popq %rdx
popq %rsi
popq %rdi
- movq 4880(%rax), %r11
+ movq 4960(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 4880(%rax), %r11
+ movq 4960(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -23036,7 +23415,7 @@ GL_PREFIX(EdgeFlagPointerEXT):
popq %rdx
popq %rsi
popq %rdi
- movq 4880(%rax), %r11
+ movq 4960(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(EdgeFlagPointerEXT), .-GL_PREFIX(EdgeFlagPointerEXT)
@@ -23047,7 +23426,7 @@ GL_PREFIX(EdgeFlagPointerEXT):
GL_PREFIX(IndexPointerEXT):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 4888(%rax), %r11
+ movq 4968(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -23061,13 +23440,13 @@ GL_PREFIX(IndexPointerEXT):
popq %rdx
popq %rsi
popq %rdi
- movq 4888(%rax), %r11
+ movq 4968(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 4888(%rax), %r11
+ movq 4968(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -23081,7 +23460,7 @@ GL_PREFIX(IndexPointerEXT):
popq %rdx
popq %rsi
popq %rdi
- movq 4888(%rax), %r11
+ movq 4968(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(IndexPointerEXT), .-GL_PREFIX(IndexPointerEXT)
@@ -23092,7 +23471,7 @@ GL_PREFIX(IndexPointerEXT):
GL_PREFIX(NormalPointerEXT):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 4896(%rax), %r11
+ movq 4976(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -23106,13 +23485,13 @@ GL_PREFIX(NormalPointerEXT):
popq %rdx
popq %rsi
popq %rdi
- movq 4896(%rax), %r11
+ movq 4976(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 4896(%rax), %r11
+ movq 4976(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -23126,7 +23505,7 @@ GL_PREFIX(NormalPointerEXT):
popq %rdx
popq %rsi
popq %rdi
- movq 4896(%rax), %r11
+ movq 4976(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(NormalPointerEXT), .-GL_PREFIX(NormalPointerEXT)
@@ -23137,7 +23516,7 @@ GL_PREFIX(NormalPointerEXT):
GL_PREFIX(TexCoordPointerEXT):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 4904(%rax), %r11
+ movq 4984(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -23151,13 +23530,13 @@ GL_PREFIX(TexCoordPointerEXT):
popq %rdx
popq %rsi
popq %rdi
- movq 4904(%rax), %r11
+ movq 4984(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 4904(%rax), %r11
+ movq 4984(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -23171,7 +23550,7 @@ GL_PREFIX(TexCoordPointerEXT):
popq %rdx
popq %rsi
popq %rdi
- movq 4904(%rax), %r11
+ movq 4984(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(TexCoordPointerEXT), .-GL_PREFIX(TexCoordPointerEXT)
@@ -23182,7 +23561,7 @@ GL_PREFIX(TexCoordPointerEXT):
GL_PREFIX(VertexPointerEXT):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 4912(%rax), %r11
+ movq 4992(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -23196,13 +23575,13 @@ GL_PREFIX(VertexPointerEXT):
popq %rdx
popq %rsi
popq %rdi
- movq 4912(%rax), %r11
+ movq 4992(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 4912(%rax), %r11
+ movq 4992(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -23216,7 +23595,7 @@ GL_PREFIX(VertexPointerEXT):
popq %rdx
popq %rsi
popq %rdi
- movq 4912(%rax), %r11
+ movq 4992(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(VertexPointerEXT), .-GL_PREFIX(VertexPointerEXT)
@@ -23227,7 +23606,7 @@ GL_PREFIX(VertexPointerEXT):
GL_PREFIX(PointParameterfEXT):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 4920(%rax), %r11
+ movq 5000(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
subq $24, %rsp
@@ -23237,13 +23616,13 @@ GL_PREFIX(PointParameterfEXT):
movq 8(%rsp), %xmm0
movq (%rsp), %rdi
addq $24, %rsp
- movq 4920(%rax), %r11
+ movq 5000(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 4920(%rax), %r11
+ movq 5000(%rax), %r11
jmp *%r11
1:
subq $24, %rsp
@@ -23253,7 +23632,7 @@ GL_PREFIX(PointParameterfEXT):
movq 8(%rsp), %xmm0
movq (%rsp), %rdi
addq $24, %rsp
- movq 4920(%rax), %r11
+ movq 5000(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(PointParameterfEXT), .-GL_PREFIX(PointParameterfEXT)
@@ -23264,7 +23643,7 @@ GL_PREFIX(PointParameterfEXT):
GL_PREFIX(PointParameterfvEXT):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 4928(%rax), %r11
+ movq 5008(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -23274,13 +23653,13 @@ GL_PREFIX(PointParameterfvEXT):
popq %rbp
popq %rsi
popq %rdi
- movq 4928(%rax), %r11
+ movq 5008(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 4928(%rax), %r11
+ movq 5008(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -23290,7 +23669,7 @@ GL_PREFIX(PointParameterfvEXT):
popq %rbp
popq %rsi
popq %rdi
- movq 4928(%rax), %r11
+ movq 5008(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(PointParameterfvEXT), .-GL_PREFIX(PointParameterfvEXT)
@@ -23301,7 +23680,7 @@ GL_PREFIX(PointParameterfvEXT):
GL_PREFIX(LockArraysEXT):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 4936(%rax), %r11
+ movq 5016(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -23311,13 +23690,13 @@ GL_PREFIX(LockArraysEXT):
popq %rbp
popq %rsi
popq %rdi
- movq 4936(%rax), %r11
+ movq 5016(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 4936(%rax), %r11
+ movq 5016(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -23327,7 +23706,7 @@ GL_PREFIX(LockArraysEXT):
popq %rbp
popq %rsi
popq %rdi
- movq 4936(%rax), %r11
+ movq 5016(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(LockArraysEXT), .-GL_PREFIX(LockArraysEXT)
@@ -23338,25 +23717,25 @@ GL_PREFIX(LockArraysEXT):
GL_PREFIX(UnlockArraysEXT):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 4944(%rax), %r11
+ movq 5024(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rbp
call _x86_64_get_dispatch@PLT
popq %rbp
- movq 4944(%rax), %r11
+ movq 5024(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 4944(%rax), %r11
+ movq 5024(%rax), %r11
jmp *%r11
1:
pushq %rbp
call _glapi_get_dispatch
popq %rbp
- movq 4944(%rax), %r11
+ movq 5024(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(UnlockArraysEXT), .-GL_PREFIX(UnlockArraysEXT)
@@ -23367,7 +23746,7 @@ GL_PREFIX(UnlockArraysEXT):
GL_PREFIX(SecondaryColor3bEXT):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 4952(%rax), %r11
+ movq 5032(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -23377,13 +23756,13 @@ GL_PREFIX(SecondaryColor3bEXT):
popq %rdx
popq %rsi
popq %rdi
- movq 4952(%rax), %r11
+ movq 5032(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 4952(%rax), %r11
+ movq 5032(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -23393,7 +23772,7 @@ GL_PREFIX(SecondaryColor3bEXT):
popq %rdx
popq %rsi
popq %rdi
- movq 4952(%rax), %r11
+ movq 5032(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(SecondaryColor3bEXT), .-GL_PREFIX(SecondaryColor3bEXT)
@@ -23404,25 +23783,25 @@ GL_PREFIX(SecondaryColor3bEXT):
GL_PREFIX(SecondaryColor3bvEXT):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 4960(%rax), %r11
+ movq 5040(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
call _x86_64_get_dispatch@PLT
popq %rdi
- movq 4960(%rax), %r11
+ movq 5040(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 4960(%rax), %r11
+ movq 5040(%rax), %r11
jmp *%r11
1:
pushq %rdi
call _glapi_get_dispatch
popq %rdi
- movq 4960(%rax), %r11
+ movq 5040(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(SecondaryColor3bvEXT), .-GL_PREFIX(SecondaryColor3bvEXT)
@@ -23433,7 +23812,7 @@ GL_PREFIX(SecondaryColor3bvEXT):
GL_PREFIX(SecondaryColor3dEXT):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 4968(%rax), %r11
+ movq 5048(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
subq $24, %rsp
@@ -23445,13 +23824,13 @@ GL_PREFIX(SecondaryColor3dEXT):
movq 8(%rsp), %xmm1
movq (%rsp), %xmm0
addq $24, %rsp
- movq 4968(%rax), %r11
+ movq 5048(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 4968(%rax), %r11
+ movq 5048(%rax), %r11
jmp *%r11
1:
subq $24, %rsp
@@ -23463,7 +23842,7 @@ GL_PREFIX(SecondaryColor3dEXT):
movq 8(%rsp), %xmm1
movq (%rsp), %xmm0
addq $24, %rsp
- movq 4968(%rax), %r11
+ movq 5048(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(SecondaryColor3dEXT), .-GL_PREFIX(SecondaryColor3dEXT)
@@ -23474,25 +23853,25 @@ GL_PREFIX(SecondaryColor3dEXT):
GL_PREFIX(SecondaryColor3dvEXT):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 4976(%rax), %r11
+ movq 5056(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
call _x86_64_get_dispatch@PLT
popq %rdi
- movq 4976(%rax), %r11
+ movq 5056(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 4976(%rax), %r11
+ movq 5056(%rax), %r11
jmp *%r11
1:
pushq %rdi
call _glapi_get_dispatch
popq %rdi
- movq 4976(%rax), %r11
+ movq 5056(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(SecondaryColor3dvEXT), .-GL_PREFIX(SecondaryColor3dvEXT)
@@ -23503,7 +23882,7 @@ GL_PREFIX(SecondaryColor3dvEXT):
GL_PREFIX(SecondaryColor3fEXT):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 4984(%rax), %r11
+ movq 5064(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
subq $24, %rsp
@@ -23515,13 +23894,13 @@ GL_PREFIX(SecondaryColor3fEXT):
movq 8(%rsp), %xmm1
movq (%rsp), %xmm0
addq $24, %rsp
- movq 4984(%rax), %r11
+ movq 5064(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 4984(%rax), %r11
+ movq 5064(%rax), %r11
jmp *%r11
1:
subq $24, %rsp
@@ -23533,7 +23912,7 @@ GL_PREFIX(SecondaryColor3fEXT):
movq 8(%rsp), %xmm1
movq (%rsp), %xmm0
addq $24, %rsp
- movq 4984(%rax), %r11
+ movq 5064(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(SecondaryColor3fEXT), .-GL_PREFIX(SecondaryColor3fEXT)
@@ -23544,25 +23923,25 @@ GL_PREFIX(SecondaryColor3fEXT):
GL_PREFIX(SecondaryColor3fvEXT):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 4992(%rax), %r11
+ movq 5072(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
call _x86_64_get_dispatch@PLT
popq %rdi
- movq 4992(%rax), %r11
+ movq 5072(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 4992(%rax), %r11
+ movq 5072(%rax), %r11
jmp *%r11
1:
pushq %rdi
call _glapi_get_dispatch
popq %rdi
- movq 4992(%rax), %r11
+ movq 5072(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(SecondaryColor3fvEXT), .-GL_PREFIX(SecondaryColor3fvEXT)
@@ -23573,7 +23952,7 @@ GL_PREFIX(SecondaryColor3fvEXT):
GL_PREFIX(SecondaryColor3iEXT):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 5000(%rax), %r11
+ movq 5080(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -23583,13 +23962,13 @@ GL_PREFIX(SecondaryColor3iEXT):
popq %rdx
popq %rsi
popq %rdi
- movq 5000(%rax), %r11
+ movq 5080(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 5000(%rax), %r11
+ movq 5080(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -23599,7 +23978,7 @@ GL_PREFIX(SecondaryColor3iEXT):
popq %rdx
popq %rsi
popq %rdi
- movq 5000(%rax), %r11
+ movq 5080(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(SecondaryColor3iEXT), .-GL_PREFIX(SecondaryColor3iEXT)
@@ -23610,25 +23989,25 @@ GL_PREFIX(SecondaryColor3iEXT):
GL_PREFIX(SecondaryColor3ivEXT):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 5008(%rax), %r11
+ movq 5088(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
call _x86_64_get_dispatch@PLT
popq %rdi
- movq 5008(%rax), %r11
+ movq 5088(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 5008(%rax), %r11
+ movq 5088(%rax), %r11
jmp *%r11
1:
pushq %rdi
call _glapi_get_dispatch
popq %rdi
- movq 5008(%rax), %r11
+ movq 5088(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(SecondaryColor3ivEXT), .-GL_PREFIX(SecondaryColor3ivEXT)
@@ -23639,7 +24018,7 @@ GL_PREFIX(SecondaryColor3ivEXT):
GL_PREFIX(SecondaryColor3sEXT):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 5016(%rax), %r11
+ movq 5096(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -23649,13 +24028,13 @@ GL_PREFIX(SecondaryColor3sEXT):
popq %rdx
popq %rsi
popq %rdi
- movq 5016(%rax), %r11
+ movq 5096(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 5016(%rax), %r11
+ movq 5096(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -23665,7 +24044,7 @@ GL_PREFIX(SecondaryColor3sEXT):
popq %rdx
popq %rsi
popq %rdi
- movq 5016(%rax), %r11
+ movq 5096(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(SecondaryColor3sEXT), .-GL_PREFIX(SecondaryColor3sEXT)
@@ -23676,25 +24055,25 @@ GL_PREFIX(SecondaryColor3sEXT):
GL_PREFIX(SecondaryColor3svEXT):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 5024(%rax), %r11
+ movq 5104(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
call _x86_64_get_dispatch@PLT
popq %rdi
- movq 5024(%rax), %r11
+ movq 5104(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 5024(%rax), %r11
+ movq 5104(%rax), %r11
jmp *%r11
1:
pushq %rdi
call _glapi_get_dispatch
popq %rdi
- movq 5024(%rax), %r11
+ movq 5104(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(SecondaryColor3svEXT), .-GL_PREFIX(SecondaryColor3svEXT)
@@ -23705,7 +24084,7 @@ GL_PREFIX(SecondaryColor3svEXT):
GL_PREFIX(SecondaryColor3ubEXT):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 5032(%rax), %r11
+ movq 5112(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -23715,13 +24094,13 @@ GL_PREFIX(SecondaryColor3ubEXT):
popq %rdx
popq %rsi
popq %rdi
- movq 5032(%rax), %r11
+ movq 5112(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 5032(%rax), %r11
+ movq 5112(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -23731,7 +24110,7 @@ GL_PREFIX(SecondaryColor3ubEXT):
popq %rdx
popq %rsi
popq %rdi
- movq 5032(%rax), %r11
+ movq 5112(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(SecondaryColor3ubEXT), .-GL_PREFIX(SecondaryColor3ubEXT)
@@ -23742,25 +24121,25 @@ GL_PREFIX(SecondaryColor3ubEXT):
GL_PREFIX(SecondaryColor3ubvEXT):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 5040(%rax), %r11
+ movq 5120(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
call _x86_64_get_dispatch@PLT
popq %rdi
- movq 5040(%rax), %r11
+ movq 5120(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 5040(%rax), %r11
+ movq 5120(%rax), %r11
jmp *%r11
1:
pushq %rdi
call _glapi_get_dispatch
popq %rdi
- movq 5040(%rax), %r11
+ movq 5120(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(SecondaryColor3ubvEXT), .-GL_PREFIX(SecondaryColor3ubvEXT)
@@ -23771,7 +24150,7 @@ GL_PREFIX(SecondaryColor3ubvEXT):
GL_PREFIX(SecondaryColor3uiEXT):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 5048(%rax), %r11
+ movq 5128(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -23781,13 +24160,13 @@ GL_PREFIX(SecondaryColor3uiEXT):
popq %rdx
popq %rsi
popq %rdi
- movq 5048(%rax), %r11
+ movq 5128(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 5048(%rax), %r11
+ movq 5128(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -23797,7 +24176,7 @@ GL_PREFIX(SecondaryColor3uiEXT):
popq %rdx
popq %rsi
popq %rdi
- movq 5048(%rax), %r11
+ movq 5128(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(SecondaryColor3uiEXT), .-GL_PREFIX(SecondaryColor3uiEXT)
@@ -23808,25 +24187,25 @@ GL_PREFIX(SecondaryColor3uiEXT):
GL_PREFIX(SecondaryColor3uivEXT):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 5056(%rax), %r11
+ movq 5136(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
call _x86_64_get_dispatch@PLT
popq %rdi
- movq 5056(%rax), %r11
+ movq 5136(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 5056(%rax), %r11
+ movq 5136(%rax), %r11
jmp *%r11
1:
pushq %rdi
call _glapi_get_dispatch
popq %rdi
- movq 5056(%rax), %r11
+ movq 5136(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(SecondaryColor3uivEXT), .-GL_PREFIX(SecondaryColor3uivEXT)
@@ -23837,7 +24216,7 @@ GL_PREFIX(SecondaryColor3uivEXT):
GL_PREFIX(SecondaryColor3usEXT):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 5064(%rax), %r11
+ movq 5144(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -23847,13 +24226,13 @@ GL_PREFIX(SecondaryColor3usEXT):
popq %rdx
popq %rsi
popq %rdi
- movq 5064(%rax), %r11
+ movq 5144(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 5064(%rax), %r11
+ movq 5144(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -23863,7 +24242,7 @@ GL_PREFIX(SecondaryColor3usEXT):
popq %rdx
popq %rsi
popq %rdi
- movq 5064(%rax), %r11
+ movq 5144(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(SecondaryColor3usEXT), .-GL_PREFIX(SecondaryColor3usEXT)
@@ -23874,25 +24253,25 @@ GL_PREFIX(SecondaryColor3usEXT):
GL_PREFIX(SecondaryColor3usvEXT):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 5072(%rax), %r11
+ movq 5152(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
call _x86_64_get_dispatch@PLT
popq %rdi
- movq 5072(%rax), %r11
+ movq 5152(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 5072(%rax), %r11
+ movq 5152(%rax), %r11
jmp *%r11
1:
pushq %rdi
call _glapi_get_dispatch
popq %rdi
- movq 5072(%rax), %r11
+ movq 5152(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(SecondaryColor3usvEXT), .-GL_PREFIX(SecondaryColor3usvEXT)
@@ -23903,7 +24282,7 @@ GL_PREFIX(SecondaryColor3usvEXT):
GL_PREFIX(SecondaryColorPointerEXT):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 5080(%rax), %r11
+ movq 5160(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -23917,13 +24296,13 @@ GL_PREFIX(SecondaryColorPointerEXT):
popq %rdx
popq %rsi
popq %rdi
- movq 5080(%rax), %r11
+ movq 5160(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 5080(%rax), %r11
+ movq 5160(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -23937,7 +24316,7 @@ GL_PREFIX(SecondaryColorPointerEXT):
popq %rdx
popq %rsi
popq %rdi
- movq 5080(%rax), %r11
+ movq 5160(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(SecondaryColorPointerEXT), .-GL_PREFIX(SecondaryColorPointerEXT)
@@ -23948,7 +24327,7 @@ GL_PREFIX(SecondaryColorPointerEXT):
GL_PREFIX(MultiDrawArraysEXT):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 5088(%rax), %r11
+ movq 5168(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -23962,13 +24341,13 @@ GL_PREFIX(MultiDrawArraysEXT):
popq %rdx
popq %rsi
popq %rdi
- movq 5088(%rax), %r11
+ movq 5168(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 5088(%rax), %r11
+ movq 5168(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -23982,7 +24361,7 @@ GL_PREFIX(MultiDrawArraysEXT):
popq %rdx
popq %rsi
popq %rdi
- movq 5088(%rax), %r11
+ movq 5168(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(MultiDrawArraysEXT), .-GL_PREFIX(MultiDrawArraysEXT)
@@ -23993,7 +24372,7 @@ GL_PREFIX(MultiDrawArraysEXT):
GL_PREFIX(MultiDrawElementsEXT):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 5096(%rax), %r11
+ movq 5176(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -24007,13 +24386,13 @@ GL_PREFIX(MultiDrawElementsEXT):
popq %rdx
popq %rsi
popq %rdi
- movq 5096(%rax), %r11
+ movq 5176(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 5096(%rax), %r11
+ movq 5176(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -24027,7 +24406,7 @@ GL_PREFIX(MultiDrawElementsEXT):
popq %rdx
popq %rsi
popq %rdi
- movq 5096(%rax), %r11
+ movq 5176(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(MultiDrawElementsEXT), .-GL_PREFIX(MultiDrawElementsEXT)
@@ -24038,7 +24417,7 @@ GL_PREFIX(MultiDrawElementsEXT):
GL_PREFIX(FogCoordPointerEXT):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 5104(%rax), %r11
+ movq 5184(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -24048,13 +24427,13 @@ GL_PREFIX(FogCoordPointerEXT):
popq %rdx
popq %rsi
popq %rdi
- movq 5104(%rax), %r11
+ movq 5184(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 5104(%rax), %r11
+ movq 5184(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -24064,7 +24443,7 @@ GL_PREFIX(FogCoordPointerEXT):
popq %rdx
popq %rsi
popq %rdi
- movq 5104(%rax), %r11
+ movq 5184(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(FogCoordPointerEXT), .-GL_PREFIX(FogCoordPointerEXT)
@@ -24075,7 +24454,7 @@ GL_PREFIX(FogCoordPointerEXT):
GL_PREFIX(FogCoorddEXT):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 5112(%rax), %r11
+ movq 5192(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
subq $8, %rsp
@@ -24083,13 +24462,13 @@ GL_PREFIX(FogCoorddEXT):
call _x86_64_get_dispatch@PLT
movq (%rsp), %xmm0
addq $8, %rsp
- movq 5112(%rax), %r11
+ movq 5192(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 5112(%rax), %r11
+ movq 5192(%rax), %r11
jmp *%r11
1:
subq $8, %rsp
@@ -24097,7 +24476,7 @@ GL_PREFIX(FogCoorddEXT):
call _glapi_get_dispatch
movq (%rsp), %xmm0
addq $8, %rsp
- movq 5112(%rax), %r11
+ movq 5192(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(FogCoorddEXT), .-GL_PREFIX(FogCoorddEXT)
@@ -24108,25 +24487,25 @@ GL_PREFIX(FogCoorddEXT):
GL_PREFIX(FogCoorddvEXT):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 5120(%rax), %r11
+ movq 5200(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
call _x86_64_get_dispatch@PLT
popq %rdi
- movq 5120(%rax), %r11
+ movq 5200(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 5120(%rax), %r11
+ movq 5200(%rax), %r11
jmp *%r11
1:
pushq %rdi
call _glapi_get_dispatch
popq %rdi
- movq 5120(%rax), %r11
+ movq 5200(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(FogCoorddvEXT), .-GL_PREFIX(FogCoorddvEXT)
@@ -24137,7 +24516,7 @@ GL_PREFIX(FogCoorddvEXT):
GL_PREFIX(FogCoordfEXT):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 5128(%rax), %r11
+ movq 5208(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
subq $8, %rsp
@@ -24145,13 +24524,13 @@ GL_PREFIX(FogCoordfEXT):
call _x86_64_get_dispatch@PLT
movq (%rsp), %xmm0
addq $8, %rsp
- movq 5128(%rax), %r11
+ movq 5208(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 5128(%rax), %r11
+ movq 5208(%rax), %r11
jmp *%r11
1:
subq $8, %rsp
@@ -24159,7 +24538,7 @@ GL_PREFIX(FogCoordfEXT):
call _glapi_get_dispatch
movq (%rsp), %xmm0
addq $8, %rsp
- movq 5128(%rax), %r11
+ movq 5208(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(FogCoordfEXT), .-GL_PREFIX(FogCoordfEXT)
@@ -24170,58 +24549,58 @@ GL_PREFIX(FogCoordfEXT):
GL_PREFIX(FogCoordfvEXT):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 5136(%rax), %r11
+ movq 5216(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
call _x86_64_get_dispatch@PLT
popq %rdi
- movq 5136(%rax), %r11
+ movq 5216(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 5136(%rax), %r11
+ movq 5216(%rax), %r11
jmp *%r11
1:
pushq %rdi
call _glapi_get_dispatch
popq %rdi
- movq 5136(%rax), %r11
+ movq 5216(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(FogCoordfvEXT), .-GL_PREFIX(FogCoordfvEXT)
.p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_643)
- .type GL_PREFIX(_dispatch_stub_643), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_643))
-GL_PREFIX(_dispatch_stub_643):
+ .globl GL_PREFIX(_dispatch_stub_653)
+ .type GL_PREFIX(_dispatch_stub_653), @function
+ HIDDEN(GL_PREFIX(_dispatch_stub_653))
+GL_PREFIX(_dispatch_stub_653):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 5144(%rax), %r11
+ movq 5224(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
call _x86_64_get_dispatch@PLT
popq %rdi
- movq 5144(%rax), %r11
+ movq 5224(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 5144(%rax), %r11
+ movq 5224(%rax), %r11
jmp *%r11
1:
pushq %rdi
call _glapi_get_dispatch
popq %rdi
- movq 5144(%rax), %r11
+ movq 5224(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_643), .-GL_PREFIX(_dispatch_stub_643)
+ .size GL_PREFIX(_dispatch_stub_653), .-GL_PREFIX(_dispatch_stub_653)
.p2align 4,,15
.globl GL_PREFIX(BlendFuncSeparateEXT)
@@ -24229,7 +24608,7 @@ GL_PREFIX(_dispatch_stub_643):
GL_PREFIX(BlendFuncSeparateEXT):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 5152(%rax), %r11
+ movq 5232(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -24243,13 +24622,13 @@ GL_PREFIX(BlendFuncSeparateEXT):
popq %rdx
popq %rsi
popq %rdi
- movq 5152(%rax), %r11
+ movq 5232(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 5152(%rax), %r11
+ movq 5232(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -24263,7 +24642,7 @@ GL_PREFIX(BlendFuncSeparateEXT):
popq %rdx
popq %rsi
popq %rdi
- movq 5152(%rax), %r11
+ movq 5232(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(BlendFuncSeparateEXT), .-GL_PREFIX(BlendFuncSeparateEXT)
@@ -24274,25 +24653,25 @@ GL_PREFIX(BlendFuncSeparateEXT):
GL_PREFIX(FlushVertexArrayRangeNV):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 5160(%rax), %r11
+ movq 5240(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rbp
call _x86_64_get_dispatch@PLT
popq %rbp
- movq 5160(%rax), %r11
+ movq 5240(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 5160(%rax), %r11
+ movq 5240(%rax), %r11
jmp *%r11
1:
pushq %rbp
call _glapi_get_dispatch
popq %rbp
- movq 5160(%rax), %r11
+ movq 5240(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(FlushVertexArrayRangeNV), .-GL_PREFIX(FlushVertexArrayRangeNV)
@@ -24303,7 +24682,7 @@ GL_PREFIX(FlushVertexArrayRangeNV):
GL_PREFIX(VertexArrayRangeNV):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 5168(%rax), %r11
+ movq 5248(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -24313,13 +24692,13 @@ GL_PREFIX(VertexArrayRangeNV):
popq %rbp
popq %rsi
popq %rdi
- movq 5168(%rax), %r11
+ movq 5248(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 5168(%rax), %r11
+ movq 5248(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -24329,7 +24708,7 @@ GL_PREFIX(VertexArrayRangeNV):
popq %rbp
popq %rsi
popq %rdi
- movq 5168(%rax), %r11
+ movq 5248(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(VertexArrayRangeNV), .-GL_PREFIX(VertexArrayRangeNV)
@@ -24340,7 +24719,7 @@ GL_PREFIX(VertexArrayRangeNV):
GL_PREFIX(CombinerInputNV):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 5176(%rax), %r11
+ movq 5256(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -24358,13 +24737,13 @@ GL_PREFIX(CombinerInputNV):
popq %rdx
popq %rsi
popq %rdi
- movq 5176(%rax), %r11
+ movq 5256(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 5176(%rax), %r11
+ movq 5256(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -24382,7 +24761,7 @@ GL_PREFIX(CombinerInputNV):
popq %rdx
popq %rsi
popq %rdi
- movq 5176(%rax), %r11
+ movq 5256(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(CombinerInputNV), .-GL_PREFIX(CombinerInputNV)
@@ -24393,7 +24772,7 @@ GL_PREFIX(CombinerInputNV):
GL_PREFIX(CombinerOutputNV):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 5184(%rax), %r11
+ movq 5264(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -24411,13 +24790,13 @@ GL_PREFIX(CombinerOutputNV):
popq %rdx
popq %rsi
popq %rdi
- movq 5184(%rax), %r11
+ movq 5264(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 5184(%rax), %r11
+ movq 5264(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -24435,7 +24814,7 @@ GL_PREFIX(CombinerOutputNV):
popq %rdx
popq %rsi
popq %rdi
- movq 5184(%rax), %r11
+ movq 5264(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(CombinerOutputNV), .-GL_PREFIX(CombinerOutputNV)
@@ -24446,7 +24825,7 @@ GL_PREFIX(CombinerOutputNV):
GL_PREFIX(CombinerParameterfNV):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 5192(%rax), %r11
+ movq 5272(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
subq $24, %rsp
@@ -24456,13 +24835,13 @@ GL_PREFIX(CombinerParameterfNV):
movq 8(%rsp), %xmm0
movq (%rsp), %rdi
addq $24, %rsp
- movq 5192(%rax), %r11
+ movq 5272(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 5192(%rax), %r11
+ movq 5272(%rax), %r11
jmp *%r11
1:
subq $24, %rsp
@@ -24472,7 +24851,7 @@ GL_PREFIX(CombinerParameterfNV):
movq 8(%rsp), %xmm0
movq (%rsp), %rdi
addq $24, %rsp
- movq 5192(%rax), %r11
+ movq 5272(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(CombinerParameterfNV), .-GL_PREFIX(CombinerParameterfNV)
@@ -24483,7 +24862,7 @@ GL_PREFIX(CombinerParameterfNV):
GL_PREFIX(CombinerParameterfvNV):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 5200(%rax), %r11
+ movq 5280(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -24493,13 +24872,13 @@ GL_PREFIX(CombinerParameterfvNV):
popq %rbp
popq %rsi
popq %rdi
- movq 5200(%rax), %r11
+ movq 5280(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 5200(%rax), %r11
+ movq 5280(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -24509,7 +24888,7 @@ GL_PREFIX(CombinerParameterfvNV):
popq %rbp
popq %rsi
popq %rdi
- movq 5200(%rax), %r11
+ movq 5280(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(CombinerParameterfvNV), .-GL_PREFIX(CombinerParameterfvNV)
@@ -24520,7 +24899,7 @@ GL_PREFIX(CombinerParameterfvNV):
GL_PREFIX(CombinerParameteriNV):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 5208(%rax), %r11
+ movq 5288(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -24530,13 +24909,13 @@ GL_PREFIX(CombinerParameteriNV):
popq %rbp
popq %rsi
popq %rdi
- movq 5208(%rax), %r11
+ movq 5288(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 5208(%rax), %r11
+ movq 5288(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -24546,7 +24925,7 @@ GL_PREFIX(CombinerParameteriNV):
popq %rbp
popq %rsi
popq %rdi
- movq 5208(%rax), %r11
+ movq 5288(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(CombinerParameteriNV), .-GL_PREFIX(CombinerParameteriNV)
@@ -24557,7 +24936,7 @@ GL_PREFIX(CombinerParameteriNV):
GL_PREFIX(CombinerParameterivNV):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 5216(%rax), %r11
+ movq 5296(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -24567,13 +24946,13 @@ GL_PREFIX(CombinerParameterivNV):
popq %rbp
popq %rsi
popq %rdi
- movq 5216(%rax), %r11
+ movq 5296(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 5216(%rax), %r11
+ movq 5296(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -24583,7 +24962,7 @@ GL_PREFIX(CombinerParameterivNV):
popq %rbp
popq %rsi
popq %rdi
- movq 5216(%rax), %r11
+ movq 5296(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(CombinerParameterivNV), .-GL_PREFIX(CombinerParameterivNV)
@@ -24594,7 +24973,7 @@ GL_PREFIX(CombinerParameterivNV):
GL_PREFIX(FinalCombinerInputNV):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 5224(%rax), %r11
+ movq 5304(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -24608,13 +24987,13 @@ GL_PREFIX(FinalCombinerInputNV):
popq %rdx
popq %rsi
popq %rdi
- movq 5224(%rax), %r11
+ movq 5304(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 5224(%rax), %r11
+ movq 5304(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -24628,7 +25007,7 @@ GL_PREFIX(FinalCombinerInputNV):
popq %rdx
popq %rsi
popq %rdi
- movq 5224(%rax), %r11
+ movq 5304(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(FinalCombinerInputNV), .-GL_PREFIX(FinalCombinerInputNV)
@@ -24639,7 +25018,7 @@ GL_PREFIX(FinalCombinerInputNV):
GL_PREFIX(GetCombinerInputParameterfvNV):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 5232(%rax), %r11
+ movq 5312(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -24653,13 +25032,13 @@ GL_PREFIX(GetCombinerInputParameterfvNV):
popq %rdx
popq %rsi
popq %rdi
- movq 5232(%rax), %r11
+ movq 5312(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 5232(%rax), %r11
+ movq 5312(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -24673,7 +25052,7 @@ GL_PREFIX(GetCombinerInputParameterfvNV):
popq %rdx
popq %rsi
popq %rdi
- movq 5232(%rax), %r11
+ movq 5312(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(GetCombinerInputParameterfvNV), .-GL_PREFIX(GetCombinerInputParameterfvNV)
@@ -24684,7 +25063,7 @@ GL_PREFIX(GetCombinerInputParameterfvNV):
GL_PREFIX(GetCombinerInputParameterivNV):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 5240(%rax), %r11
+ movq 5320(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -24698,13 +25077,13 @@ GL_PREFIX(GetCombinerInputParameterivNV):
popq %rdx
popq %rsi
popq %rdi
- movq 5240(%rax), %r11
+ movq 5320(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 5240(%rax), %r11
+ movq 5320(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -24718,7 +25097,7 @@ GL_PREFIX(GetCombinerInputParameterivNV):
popq %rdx
popq %rsi
popq %rdi
- movq 5240(%rax), %r11
+ movq 5320(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(GetCombinerInputParameterivNV), .-GL_PREFIX(GetCombinerInputParameterivNV)
@@ -24729,7 +25108,7 @@ GL_PREFIX(GetCombinerInputParameterivNV):
GL_PREFIX(GetCombinerOutputParameterfvNV):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 5248(%rax), %r11
+ movq 5328(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -24743,13 +25122,13 @@ GL_PREFIX(GetCombinerOutputParameterfvNV):
popq %rdx
popq %rsi
popq %rdi
- movq 5248(%rax), %r11
+ movq 5328(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 5248(%rax), %r11
+ movq 5328(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -24763,7 +25142,7 @@ GL_PREFIX(GetCombinerOutputParameterfvNV):
popq %rdx
popq %rsi
popq %rdi
- movq 5248(%rax), %r11
+ movq 5328(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(GetCombinerOutputParameterfvNV), .-GL_PREFIX(GetCombinerOutputParameterfvNV)
@@ -24774,7 +25153,7 @@ GL_PREFIX(GetCombinerOutputParameterfvNV):
GL_PREFIX(GetCombinerOutputParameterivNV):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 5256(%rax), %r11
+ movq 5336(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -24788,13 +25167,13 @@ GL_PREFIX(GetCombinerOutputParameterivNV):
popq %rdx
popq %rsi
popq %rdi
- movq 5256(%rax), %r11
+ movq 5336(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 5256(%rax), %r11
+ movq 5336(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -24808,7 +25187,7 @@ GL_PREFIX(GetCombinerOutputParameterivNV):
popq %rdx
popq %rsi
popq %rdi
- movq 5256(%rax), %r11
+ movq 5336(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(GetCombinerOutputParameterivNV), .-GL_PREFIX(GetCombinerOutputParameterivNV)
@@ -24819,7 +25198,7 @@ GL_PREFIX(GetCombinerOutputParameterivNV):
GL_PREFIX(GetFinalCombinerInputParameterfvNV):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 5264(%rax), %r11
+ movq 5344(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -24829,13 +25208,13 @@ GL_PREFIX(GetFinalCombinerInputParameterfvNV):
popq %rdx
popq %rsi
popq %rdi
- movq 5264(%rax), %r11
+ movq 5344(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 5264(%rax), %r11
+ movq 5344(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -24845,7 +25224,7 @@ GL_PREFIX(GetFinalCombinerInputParameterfvNV):
popq %rdx
popq %rsi
popq %rdi
- movq 5264(%rax), %r11
+ movq 5344(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(GetFinalCombinerInputParameterfvNV), .-GL_PREFIX(GetFinalCombinerInputParameterfvNV)
@@ -24856,7 +25235,7 @@ GL_PREFIX(GetFinalCombinerInputParameterfvNV):
GL_PREFIX(GetFinalCombinerInputParameterivNV):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 5272(%rax), %r11
+ movq 5352(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -24866,13 +25245,13 @@ GL_PREFIX(GetFinalCombinerInputParameterivNV):
popq %rdx
popq %rsi
popq %rdi
- movq 5272(%rax), %r11
+ movq 5352(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 5272(%rax), %r11
+ movq 5352(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -24882,7 +25261,7 @@ GL_PREFIX(GetFinalCombinerInputParameterivNV):
popq %rdx
popq %rsi
popq %rdi
- movq 5272(%rax), %r11
+ movq 5352(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(GetFinalCombinerInputParameterivNV), .-GL_PREFIX(GetFinalCombinerInputParameterivNV)
@@ -24893,25 +25272,25 @@ GL_PREFIX(GetFinalCombinerInputParameterivNV):
GL_PREFIX(ResizeBuffersMESA):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 5280(%rax), %r11
+ movq 5360(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rbp
call _x86_64_get_dispatch@PLT
popq %rbp
- movq 5280(%rax), %r11
+ movq 5360(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 5280(%rax), %r11
+ movq 5360(%rax), %r11
jmp *%r11
1:
pushq %rbp
call _glapi_get_dispatch
popq %rbp
- movq 5280(%rax), %r11
+ movq 5360(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(ResizeBuffersMESA), .-GL_PREFIX(ResizeBuffersMESA)
@@ -24922,7 +25301,7 @@ GL_PREFIX(ResizeBuffersMESA):
GL_PREFIX(WindowPos2dMESA):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 5288(%rax), %r11
+ movq 5368(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
subq $24, %rsp
@@ -24932,13 +25311,13 @@ GL_PREFIX(WindowPos2dMESA):
movq 8(%rsp), %xmm1
movq (%rsp), %xmm0
addq $24, %rsp
- movq 5288(%rax), %r11
+ movq 5368(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 5288(%rax), %r11
+ movq 5368(%rax), %r11
jmp *%r11
1:
subq $24, %rsp
@@ -24948,7 +25327,7 @@ GL_PREFIX(WindowPos2dMESA):
movq 8(%rsp), %xmm1
movq (%rsp), %xmm0
addq $24, %rsp
- movq 5288(%rax), %r11
+ movq 5368(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(WindowPos2dMESA), .-GL_PREFIX(WindowPos2dMESA)
@@ -24959,25 +25338,25 @@ GL_PREFIX(WindowPos2dMESA):
GL_PREFIX(WindowPos2dvMESA):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 5296(%rax), %r11
+ movq 5376(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
call _x86_64_get_dispatch@PLT
popq %rdi
- movq 5296(%rax), %r11
+ movq 5376(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 5296(%rax), %r11
+ movq 5376(%rax), %r11
jmp *%r11
1:
pushq %rdi
call _glapi_get_dispatch
popq %rdi
- movq 5296(%rax), %r11
+ movq 5376(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(WindowPos2dvMESA), .-GL_PREFIX(WindowPos2dvMESA)
@@ -24988,7 +25367,7 @@ GL_PREFIX(WindowPos2dvMESA):
GL_PREFIX(WindowPos2fMESA):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 5304(%rax), %r11
+ movq 5384(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
subq $24, %rsp
@@ -24998,13 +25377,13 @@ GL_PREFIX(WindowPos2fMESA):
movq 8(%rsp), %xmm1
movq (%rsp), %xmm0
addq $24, %rsp
- movq 5304(%rax), %r11
+ movq 5384(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 5304(%rax), %r11
+ movq 5384(%rax), %r11
jmp *%r11
1:
subq $24, %rsp
@@ -25014,7 +25393,7 @@ GL_PREFIX(WindowPos2fMESA):
movq 8(%rsp), %xmm1
movq (%rsp), %xmm0
addq $24, %rsp
- movq 5304(%rax), %r11
+ movq 5384(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(WindowPos2fMESA), .-GL_PREFIX(WindowPos2fMESA)
@@ -25025,25 +25404,25 @@ GL_PREFIX(WindowPos2fMESA):
GL_PREFIX(WindowPos2fvMESA):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 5312(%rax), %r11
+ movq 5392(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
call _x86_64_get_dispatch@PLT
popq %rdi
- movq 5312(%rax), %r11
+ movq 5392(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 5312(%rax), %r11
+ movq 5392(%rax), %r11
jmp *%r11
1:
pushq %rdi
call _glapi_get_dispatch
popq %rdi
- movq 5312(%rax), %r11
+ movq 5392(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(WindowPos2fvMESA), .-GL_PREFIX(WindowPos2fvMESA)
@@ -25054,7 +25433,7 @@ GL_PREFIX(WindowPos2fvMESA):
GL_PREFIX(WindowPos2iMESA):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 5320(%rax), %r11
+ movq 5400(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -25064,13 +25443,13 @@ GL_PREFIX(WindowPos2iMESA):
popq %rbp
popq %rsi
popq %rdi
- movq 5320(%rax), %r11
+ movq 5400(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 5320(%rax), %r11
+ movq 5400(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -25080,7 +25459,7 @@ GL_PREFIX(WindowPos2iMESA):
popq %rbp
popq %rsi
popq %rdi
- movq 5320(%rax), %r11
+ movq 5400(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(WindowPos2iMESA), .-GL_PREFIX(WindowPos2iMESA)
@@ -25091,25 +25470,25 @@ GL_PREFIX(WindowPos2iMESA):
GL_PREFIX(WindowPos2ivMESA):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 5328(%rax), %r11
+ movq 5408(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
call _x86_64_get_dispatch@PLT
popq %rdi
- movq 5328(%rax), %r11
+ movq 5408(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 5328(%rax), %r11
+ movq 5408(%rax), %r11
jmp *%r11
1:
pushq %rdi
call _glapi_get_dispatch
popq %rdi
- movq 5328(%rax), %r11
+ movq 5408(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(WindowPos2ivMESA), .-GL_PREFIX(WindowPos2ivMESA)
@@ -25120,7 +25499,7 @@ GL_PREFIX(WindowPos2ivMESA):
GL_PREFIX(WindowPos2sMESA):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 5336(%rax), %r11
+ movq 5416(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -25130,13 +25509,13 @@ GL_PREFIX(WindowPos2sMESA):
popq %rbp
popq %rsi
popq %rdi
- movq 5336(%rax), %r11
+ movq 5416(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 5336(%rax), %r11
+ movq 5416(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -25146,7 +25525,7 @@ GL_PREFIX(WindowPos2sMESA):
popq %rbp
popq %rsi
popq %rdi
- movq 5336(%rax), %r11
+ movq 5416(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(WindowPos2sMESA), .-GL_PREFIX(WindowPos2sMESA)
@@ -25157,25 +25536,25 @@ GL_PREFIX(WindowPos2sMESA):
GL_PREFIX(WindowPos2svMESA):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 5344(%rax), %r11
+ movq 5424(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
call _x86_64_get_dispatch@PLT
popq %rdi
- movq 5344(%rax), %r11
+ movq 5424(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 5344(%rax), %r11
+ movq 5424(%rax), %r11
jmp *%r11
1:
pushq %rdi
call _glapi_get_dispatch
popq %rdi
- movq 5344(%rax), %r11
+ movq 5424(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(WindowPos2svMESA), .-GL_PREFIX(WindowPos2svMESA)
@@ -25186,7 +25565,7 @@ GL_PREFIX(WindowPos2svMESA):
GL_PREFIX(WindowPos3dMESA):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 5352(%rax), %r11
+ movq 5432(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
subq $24, %rsp
@@ -25198,13 +25577,13 @@ GL_PREFIX(WindowPos3dMESA):
movq 8(%rsp), %xmm1
movq (%rsp), %xmm0
addq $24, %rsp
- movq 5352(%rax), %r11
+ movq 5432(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 5352(%rax), %r11
+ movq 5432(%rax), %r11
jmp *%r11
1:
subq $24, %rsp
@@ -25216,7 +25595,7 @@ GL_PREFIX(WindowPos3dMESA):
movq 8(%rsp), %xmm1
movq (%rsp), %xmm0
addq $24, %rsp
- movq 5352(%rax), %r11
+ movq 5432(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(WindowPos3dMESA), .-GL_PREFIX(WindowPos3dMESA)
@@ -25227,25 +25606,25 @@ GL_PREFIX(WindowPos3dMESA):
GL_PREFIX(WindowPos3dvMESA):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 5360(%rax), %r11
+ movq 5440(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
call _x86_64_get_dispatch@PLT
popq %rdi
- movq 5360(%rax), %r11
+ movq 5440(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 5360(%rax), %r11
+ movq 5440(%rax), %r11
jmp *%r11
1:
pushq %rdi
call _glapi_get_dispatch
popq %rdi
- movq 5360(%rax), %r11
+ movq 5440(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(WindowPos3dvMESA), .-GL_PREFIX(WindowPos3dvMESA)
@@ -25256,7 +25635,7 @@ GL_PREFIX(WindowPos3dvMESA):
GL_PREFIX(WindowPos3fMESA):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 5368(%rax), %r11
+ movq 5448(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
subq $24, %rsp
@@ -25268,13 +25647,13 @@ GL_PREFIX(WindowPos3fMESA):
movq 8(%rsp), %xmm1
movq (%rsp), %xmm0
addq $24, %rsp
- movq 5368(%rax), %r11
+ movq 5448(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 5368(%rax), %r11
+ movq 5448(%rax), %r11
jmp *%r11
1:
subq $24, %rsp
@@ -25286,7 +25665,7 @@ GL_PREFIX(WindowPos3fMESA):
movq 8(%rsp), %xmm1
movq (%rsp), %xmm0
addq $24, %rsp
- movq 5368(%rax), %r11
+ movq 5448(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(WindowPos3fMESA), .-GL_PREFIX(WindowPos3fMESA)
@@ -25297,25 +25676,25 @@ GL_PREFIX(WindowPos3fMESA):
GL_PREFIX(WindowPos3fvMESA):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 5376(%rax), %r11
+ movq 5456(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
call _x86_64_get_dispatch@PLT
popq %rdi
- movq 5376(%rax), %r11
+ movq 5456(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 5376(%rax), %r11
+ movq 5456(%rax), %r11
jmp *%r11
1:
pushq %rdi
call _glapi_get_dispatch
popq %rdi
- movq 5376(%rax), %r11
+ movq 5456(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(WindowPos3fvMESA), .-GL_PREFIX(WindowPos3fvMESA)
@@ -25326,7 +25705,7 @@ GL_PREFIX(WindowPos3fvMESA):
GL_PREFIX(WindowPos3iMESA):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 5384(%rax), %r11
+ movq 5464(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -25336,13 +25715,13 @@ GL_PREFIX(WindowPos3iMESA):
popq %rdx
popq %rsi
popq %rdi
- movq 5384(%rax), %r11
+ movq 5464(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 5384(%rax), %r11
+ movq 5464(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -25352,7 +25731,7 @@ GL_PREFIX(WindowPos3iMESA):
popq %rdx
popq %rsi
popq %rdi
- movq 5384(%rax), %r11
+ movq 5464(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(WindowPos3iMESA), .-GL_PREFIX(WindowPos3iMESA)
@@ -25363,25 +25742,25 @@ GL_PREFIX(WindowPos3iMESA):
GL_PREFIX(WindowPos3ivMESA):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 5392(%rax), %r11
+ movq 5472(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
call _x86_64_get_dispatch@PLT
popq %rdi
- movq 5392(%rax), %r11
+ movq 5472(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 5392(%rax), %r11
+ movq 5472(%rax), %r11
jmp *%r11
1:
pushq %rdi
call _glapi_get_dispatch
popq %rdi
- movq 5392(%rax), %r11
+ movq 5472(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(WindowPos3ivMESA), .-GL_PREFIX(WindowPos3ivMESA)
@@ -25392,7 +25771,7 @@ GL_PREFIX(WindowPos3ivMESA):
GL_PREFIX(WindowPos3sMESA):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 5400(%rax), %r11
+ movq 5480(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -25402,13 +25781,13 @@ GL_PREFIX(WindowPos3sMESA):
popq %rdx
popq %rsi
popq %rdi
- movq 5400(%rax), %r11
+ movq 5480(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 5400(%rax), %r11
+ movq 5480(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -25418,7 +25797,7 @@ GL_PREFIX(WindowPos3sMESA):
popq %rdx
popq %rsi
popq %rdi
- movq 5400(%rax), %r11
+ movq 5480(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(WindowPos3sMESA), .-GL_PREFIX(WindowPos3sMESA)
@@ -25429,25 +25808,25 @@ GL_PREFIX(WindowPos3sMESA):
GL_PREFIX(WindowPos3svMESA):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 5408(%rax), %r11
+ movq 5488(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
call _x86_64_get_dispatch@PLT
popq %rdi
- movq 5408(%rax), %r11
+ movq 5488(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 5408(%rax), %r11
+ movq 5488(%rax), %r11
jmp *%r11
1:
pushq %rdi
call _glapi_get_dispatch
popq %rdi
- movq 5408(%rax), %r11
+ movq 5488(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(WindowPos3svMESA), .-GL_PREFIX(WindowPos3svMESA)
@@ -25458,7 +25837,7 @@ GL_PREFIX(WindowPos3svMESA):
GL_PREFIX(WindowPos4dMESA):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 5416(%rax), %r11
+ movq 5496(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
subq $40, %rsp
@@ -25472,13 +25851,13 @@ GL_PREFIX(WindowPos4dMESA):
movq 8(%rsp), %xmm1
movq (%rsp), %xmm0
addq $40, %rsp
- movq 5416(%rax), %r11
+ movq 5496(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 5416(%rax), %r11
+ movq 5496(%rax), %r11
jmp *%r11
1:
subq $40, %rsp
@@ -25492,7 +25871,7 @@ GL_PREFIX(WindowPos4dMESA):
movq 8(%rsp), %xmm1
movq (%rsp), %xmm0
addq $40, %rsp
- movq 5416(%rax), %r11
+ movq 5496(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(WindowPos4dMESA), .-GL_PREFIX(WindowPos4dMESA)
@@ -25503,25 +25882,25 @@ GL_PREFIX(WindowPos4dMESA):
GL_PREFIX(WindowPos4dvMESA):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 5424(%rax), %r11
+ movq 5504(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
call _x86_64_get_dispatch@PLT
popq %rdi
- movq 5424(%rax), %r11
+ movq 5504(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 5424(%rax), %r11
+ movq 5504(%rax), %r11
jmp *%r11
1:
pushq %rdi
call _glapi_get_dispatch
popq %rdi
- movq 5424(%rax), %r11
+ movq 5504(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(WindowPos4dvMESA), .-GL_PREFIX(WindowPos4dvMESA)
@@ -25532,7 +25911,7 @@ GL_PREFIX(WindowPos4dvMESA):
GL_PREFIX(WindowPos4fMESA):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 5432(%rax), %r11
+ movq 5512(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
subq $40, %rsp
@@ -25546,13 +25925,13 @@ GL_PREFIX(WindowPos4fMESA):
movq 8(%rsp), %xmm1
movq (%rsp), %xmm0
addq $40, %rsp
- movq 5432(%rax), %r11
+ movq 5512(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 5432(%rax), %r11
+ movq 5512(%rax), %r11
jmp *%r11
1:
subq $40, %rsp
@@ -25566,7 +25945,7 @@ GL_PREFIX(WindowPos4fMESA):
movq 8(%rsp), %xmm1
movq (%rsp), %xmm0
addq $40, %rsp
- movq 5432(%rax), %r11
+ movq 5512(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(WindowPos4fMESA), .-GL_PREFIX(WindowPos4fMESA)
@@ -25577,25 +25956,25 @@ GL_PREFIX(WindowPos4fMESA):
GL_PREFIX(WindowPos4fvMESA):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 5440(%rax), %r11
+ movq 5520(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
call _x86_64_get_dispatch@PLT
popq %rdi
- movq 5440(%rax), %r11
+ movq 5520(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 5440(%rax), %r11
+ movq 5520(%rax), %r11
jmp *%r11
1:
pushq %rdi
call _glapi_get_dispatch
popq %rdi
- movq 5440(%rax), %r11
+ movq 5520(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(WindowPos4fvMESA), .-GL_PREFIX(WindowPos4fvMESA)
@@ -25606,7 +25985,7 @@ GL_PREFIX(WindowPos4fvMESA):
GL_PREFIX(WindowPos4iMESA):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 5448(%rax), %r11
+ movq 5528(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -25620,13 +25999,13 @@ GL_PREFIX(WindowPos4iMESA):
popq %rdx
popq %rsi
popq %rdi
- movq 5448(%rax), %r11
+ movq 5528(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 5448(%rax), %r11
+ movq 5528(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -25640,7 +26019,7 @@ GL_PREFIX(WindowPos4iMESA):
popq %rdx
popq %rsi
popq %rdi
- movq 5448(%rax), %r11
+ movq 5528(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(WindowPos4iMESA), .-GL_PREFIX(WindowPos4iMESA)
@@ -25651,25 +26030,25 @@ GL_PREFIX(WindowPos4iMESA):
GL_PREFIX(WindowPos4ivMESA):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 5456(%rax), %r11
+ movq 5536(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
call _x86_64_get_dispatch@PLT
popq %rdi
- movq 5456(%rax), %r11
+ movq 5536(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 5456(%rax), %r11
+ movq 5536(%rax), %r11
jmp *%r11
1:
pushq %rdi
call _glapi_get_dispatch
popq %rdi
- movq 5456(%rax), %r11
+ movq 5536(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(WindowPos4ivMESA), .-GL_PREFIX(WindowPos4ivMESA)
@@ -25680,7 +26059,7 @@ GL_PREFIX(WindowPos4ivMESA):
GL_PREFIX(WindowPos4sMESA):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 5464(%rax), %r11
+ movq 5544(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -25694,13 +26073,13 @@ GL_PREFIX(WindowPos4sMESA):
popq %rdx
popq %rsi
popq %rdi
- movq 5464(%rax), %r11
+ movq 5544(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 5464(%rax), %r11
+ movq 5544(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -25714,7 +26093,7 @@ GL_PREFIX(WindowPos4sMESA):
popq %rdx
popq %rsi
popq %rdi
- movq 5464(%rax), %r11
+ movq 5544(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(WindowPos4sMESA), .-GL_PREFIX(WindowPos4sMESA)
@@ -25725,37 +26104,37 @@ GL_PREFIX(WindowPos4sMESA):
GL_PREFIX(WindowPos4svMESA):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 5472(%rax), %r11
+ movq 5552(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
call _x86_64_get_dispatch@PLT
popq %rdi
- movq 5472(%rax), %r11
+ movq 5552(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 5472(%rax), %r11
+ movq 5552(%rax), %r11
jmp *%r11
1:
pushq %rdi
call _glapi_get_dispatch
popq %rdi
- movq 5472(%rax), %r11
+ movq 5552(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(WindowPos4svMESA), .-GL_PREFIX(WindowPos4svMESA)
.p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_685)
- .type GL_PREFIX(_dispatch_stub_685), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_685))
-GL_PREFIX(_dispatch_stub_685):
+ .globl GL_PREFIX(_dispatch_stub_695)
+ .type GL_PREFIX(_dispatch_stub_695), @function
+ HIDDEN(GL_PREFIX(_dispatch_stub_695))
+GL_PREFIX(_dispatch_stub_695):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 5480(%rax), %r11
+ movq 5560(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -25769,13 +26148,13 @@ GL_PREFIX(_dispatch_stub_685):
popq %rdx
popq %rsi
popq %rdi
- movq 5480(%rax), %r11
+ movq 5560(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 5480(%rax), %r11
+ movq 5560(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -25789,19 +26168,19 @@ GL_PREFIX(_dispatch_stub_685):
popq %rdx
popq %rsi
popq %rdi
- movq 5480(%rax), %r11
+ movq 5560(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_685), .-GL_PREFIX(_dispatch_stub_685)
+ .size GL_PREFIX(_dispatch_stub_695), .-GL_PREFIX(_dispatch_stub_695)
.p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_686)
- .type GL_PREFIX(_dispatch_stub_686), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_686))
-GL_PREFIX(_dispatch_stub_686):
+ .globl GL_PREFIX(_dispatch_stub_696)
+ .type GL_PREFIX(_dispatch_stub_696), @function
+ HIDDEN(GL_PREFIX(_dispatch_stub_696))
+GL_PREFIX(_dispatch_stub_696):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 5488(%rax), %r11
+ movq 5568(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -25819,13 +26198,13 @@ GL_PREFIX(_dispatch_stub_686):
popq %rdx
popq %rsi
popq %rdi
- movq 5488(%rax), %r11
+ movq 5568(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 5488(%rax), %r11
+ movq 5568(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -25843,19 +26222,19 @@ GL_PREFIX(_dispatch_stub_686):
popq %rdx
popq %rsi
popq %rdi
- movq 5488(%rax), %r11
+ movq 5568(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_686), .-GL_PREFIX(_dispatch_stub_686)
+ .size GL_PREFIX(_dispatch_stub_696), .-GL_PREFIX(_dispatch_stub_696)
.p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_687)
- .type GL_PREFIX(_dispatch_stub_687), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_687))
-GL_PREFIX(_dispatch_stub_687):
+ .globl GL_PREFIX(_dispatch_stub_697)
+ .type GL_PREFIX(_dispatch_stub_697), @function
+ HIDDEN(GL_PREFIX(_dispatch_stub_697))
+GL_PREFIX(_dispatch_stub_697):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 5496(%rax), %r11
+ movq 5576(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -25865,13 +26244,13 @@ GL_PREFIX(_dispatch_stub_687):
popq %rbp
popq %rsi
popq %rdi
- movq 5496(%rax), %r11
+ movq 5576(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 5496(%rax), %r11
+ movq 5576(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -25881,49 +26260,49 @@ GL_PREFIX(_dispatch_stub_687):
popq %rbp
popq %rsi
popq %rdi
- movq 5496(%rax), %r11
+ movq 5576(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_687), .-GL_PREFIX(_dispatch_stub_687)
+ .size GL_PREFIX(_dispatch_stub_697), .-GL_PREFIX(_dispatch_stub_697)
.p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_688)
- .type GL_PREFIX(_dispatch_stub_688), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_688))
-GL_PREFIX(_dispatch_stub_688):
+ .globl GL_PREFIX(_dispatch_stub_698)
+ .type GL_PREFIX(_dispatch_stub_698), @function
+ HIDDEN(GL_PREFIX(_dispatch_stub_698))
+GL_PREFIX(_dispatch_stub_698):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 5504(%rax), %r11
+ movq 5584(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
call _x86_64_get_dispatch@PLT
popq %rdi
- movq 5504(%rax), %r11
+ movq 5584(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 5504(%rax), %r11
+ movq 5584(%rax), %r11
jmp *%r11
1:
pushq %rdi
call _glapi_get_dispatch
popq %rdi
- movq 5504(%rax), %r11
+ movq 5584(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_688), .-GL_PREFIX(_dispatch_stub_688)
+ .size GL_PREFIX(_dispatch_stub_698), .-GL_PREFIX(_dispatch_stub_698)
.p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_689)
- .type GL_PREFIX(_dispatch_stub_689), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_689))
-GL_PREFIX(_dispatch_stub_689):
+ .globl GL_PREFIX(_dispatch_stub_699)
+ .type GL_PREFIX(_dispatch_stub_699), @function
+ HIDDEN(GL_PREFIX(_dispatch_stub_699))
+GL_PREFIX(_dispatch_stub_699):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 5512(%rax), %r11
+ movq 5592(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -25933,13 +26312,13 @@ GL_PREFIX(_dispatch_stub_689):
popq %rbp
popq %rsi
popq %rdi
- movq 5512(%rax), %r11
+ movq 5592(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 5512(%rax), %r11
+ movq 5592(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -25949,19 +26328,19 @@ GL_PREFIX(_dispatch_stub_689):
popq %rbp
popq %rsi
popq %rdi
- movq 5512(%rax), %r11
+ movq 5592(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_689), .-GL_PREFIX(_dispatch_stub_689)
+ .size GL_PREFIX(_dispatch_stub_699), .-GL_PREFIX(_dispatch_stub_699)
.p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_690)
- .type GL_PREFIX(_dispatch_stub_690), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_690))
-GL_PREFIX(_dispatch_stub_690):
+ .globl GL_PREFIX(_dispatch_stub_700)
+ .type GL_PREFIX(_dispatch_stub_700), @function
+ HIDDEN(GL_PREFIX(_dispatch_stub_700))
+GL_PREFIX(_dispatch_stub_700):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 5520(%rax), %r11
+ movq 5600(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -25971,13 +26350,13 @@ GL_PREFIX(_dispatch_stub_690):
popq %rdx
popq %rsi
popq %rdi
- movq 5520(%rax), %r11
+ movq 5600(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 5520(%rax), %r11
+ movq 5600(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -25987,49 +26366,49 @@ GL_PREFIX(_dispatch_stub_690):
popq %rdx
popq %rsi
popq %rdi
- movq 5520(%rax), %r11
+ movq 5600(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_690), .-GL_PREFIX(_dispatch_stub_690)
+ .size GL_PREFIX(_dispatch_stub_700), .-GL_PREFIX(_dispatch_stub_700)
.p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_691)
- .type GL_PREFIX(_dispatch_stub_691), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_691))
-GL_PREFIX(_dispatch_stub_691):
+ .globl GL_PREFIX(_dispatch_stub_701)
+ .type GL_PREFIX(_dispatch_stub_701), @function
+ HIDDEN(GL_PREFIX(_dispatch_stub_701))
+GL_PREFIX(_dispatch_stub_701):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 5528(%rax), %r11
+ movq 5608(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
call _x86_64_get_dispatch@PLT
popq %rdi
- movq 5528(%rax), %r11
+ movq 5608(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 5528(%rax), %r11
+ movq 5608(%rax), %r11
jmp *%r11
1:
pushq %rdi
call _glapi_get_dispatch
popq %rdi
- movq 5528(%rax), %r11
+ movq 5608(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_691), .-GL_PREFIX(_dispatch_stub_691)
+ .size GL_PREFIX(_dispatch_stub_701), .-GL_PREFIX(_dispatch_stub_701)
.p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_692)
- .type GL_PREFIX(_dispatch_stub_692), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_692))
-GL_PREFIX(_dispatch_stub_692):
+ .globl GL_PREFIX(_dispatch_stub_702)
+ .type GL_PREFIX(_dispatch_stub_702), @function
+ HIDDEN(GL_PREFIX(_dispatch_stub_702))
+GL_PREFIX(_dispatch_stub_702):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 5536(%rax), %r11
+ movq 5616(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -26039,13 +26418,13 @@ GL_PREFIX(_dispatch_stub_692):
popq %rbp
popq %rsi
popq %rdi
- movq 5536(%rax), %r11
+ movq 5616(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 5536(%rax), %r11
+ movq 5616(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -26055,40 +26434,40 @@ GL_PREFIX(_dispatch_stub_692):
popq %rbp
popq %rsi
popq %rdi
- movq 5536(%rax), %r11
+ movq 5616(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_692), .-GL_PREFIX(_dispatch_stub_692)
+ .size GL_PREFIX(_dispatch_stub_702), .-GL_PREFIX(_dispatch_stub_702)
.p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_693)
- .type GL_PREFIX(_dispatch_stub_693), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_693))
-GL_PREFIX(_dispatch_stub_693):
+ .globl GL_PREFIX(_dispatch_stub_703)
+ .type GL_PREFIX(_dispatch_stub_703), @function
+ HIDDEN(GL_PREFIX(_dispatch_stub_703))
+GL_PREFIX(_dispatch_stub_703):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 5544(%rax), %r11
+ movq 5624(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
call _x86_64_get_dispatch@PLT
popq %rdi
- movq 5544(%rax), %r11
+ movq 5624(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 5544(%rax), %r11
+ movq 5624(%rax), %r11
jmp *%r11
1:
pushq %rdi
call _glapi_get_dispatch
popq %rdi
- movq 5544(%rax), %r11
+ movq 5624(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_693), .-GL_PREFIX(_dispatch_stub_693)
+ .size GL_PREFIX(_dispatch_stub_703), .-GL_PREFIX(_dispatch_stub_703)
.p2align 4,,15
.globl GL_PREFIX(AreProgramsResidentNV)
@@ -26096,7 +26475,7 @@ GL_PREFIX(_dispatch_stub_693):
GL_PREFIX(AreProgramsResidentNV):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 5552(%rax), %r11
+ movq 5632(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -26106,13 +26485,13 @@ GL_PREFIX(AreProgramsResidentNV):
popq %rdx
popq %rsi
popq %rdi
- movq 5552(%rax), %r11
+ movq 5632(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 5552(%rax), %r11
+ movq 5632(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -26122,7 +26501,7 @@ GL_PREFIX(AreProgramsResidentNV):
popq %rdx
popq %rsi
popq %rdi
- movq 5552(%rax), %r11
+ movq 5632(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(AreProgramsResidentNV), .-GL_PREFIX(AreProgramsResidentNV)
@@ -26133,7 +26512,7 @@ GL_PREFIX(AreProgramsResidentNV):
GL_PREFIX(BindProgramNV):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 5560(%rax), %r11
+ movq 5640(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -26143,13 +26522,13 @@ GL_PREFIX(BindProgramNV):
popq %rbp
popq %rsi
popq %rdi
- movq 5560(%rax), %r11
+ movq 5640(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 5560(%rax), %r11
+ movq 5640(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -26159,7 +26538,7 @@ GL_PREFIX(BindProgramNV):
popq %rbp
popq %rsi
popq %rdi
- movq 5560(%rax), %r11
+ movq 5640(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(BindProgramNV), .-GL_PREFIX(BindProgramNV)
@@ -26170,7 +26549,7 @@ GL_PREFIX(BindProgramNV):
GL_PREFIX(DeleteProgramsNV):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 5568(%rax), %r11
+ movq 5648(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -26180,13 +26559,13 @@ GL_PREFIX(DeleteProgramsNV):
popq %rbp
popq %rsi
popq %rdi
- movq 5568(%rax), %r11
+ movq 5648(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 5568(%rax), %r11
+ movq 5648(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -26196,7 +26575,7 @@ GL_PREFIX(DeleteProgramsNV):
popq %rbp
popq %rsi
popq %rdi
- movq 5568(%rax), %r11
+ movq 5648(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(DeleteProgramsNV), .-GL_PREFIX(DeleteProgramsNV)
@@ -26207,7 +26586,7 @@ GL_PREFIX(DeleteProgramsNV):
GL_PREFIX(ExecuteProgramNV):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 5576(%rax), %r11
+ movq 5656(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -26217,13 +26596,13 @@ GL_PREFIX(ExecuteProgramNV):
popq %rdx
popq %rsi
popq %rdi
- movq 5576(%rax), %r11
+ movq 5656(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 5576(%rax), %r11
+ movq 5656(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -26233,7 +26612,7 @@ GL_PREFIX(ExecuteProgramNV):
popq %rdx
popq %rsi
popq %rdi
- movq 5576(%rax), %r11
+ movq 5656(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(ExecuteProgramNV), .-GL_PREFIX(ExecuteProgramNV)
@@ -26244,7 +26623,7 @@ GL_PREFIX(ExecuteProgramNV):
GL_PREFIX(GenProgramsNV):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 5584(%rax), %r11
+ movq 5664(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -26254,13 +26633,13 @@ GL_PREFIX(GenProgramsNV):
popq %rbp
popq %rsi
popq %rdi
- movq 5584(%rax), %r11
+ movq 5664(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 5584(%rax), %r11
+ movq 5664(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -26270,7 +26649,7 @@ GL_PREFIX(GenProgramsNV):
popq %rbp
popq %rsi
popq %rdi
- movq 5584(%rax), %r11
+ movq 5664(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(GenProgramsNV), .-GL_PREFIX(GenProgramsNV)
@@ -26281,7 +26660,7 @@ GL_PREFIX(GenProgramsNV):
GL_PREFIX(GetProgramParameterdvNV):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 5592(%rax), %r11
+ movq 5672(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -26295,13 +26674,13 @@ GL_PREFIX(GetProgramParameterdvNV):
popq %rdx
popq %rsi
popq %rdi
- movq 5592(%rax), %r11
+ movq 5672(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 5592(%rax), %r11
+ movq 5672(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -26315,7 +26694,7 @@ GL_PREFIX(GetProgramParameterdvNV):
popq %rdx
popq %rsi
popq %rdi
- movq 5592(%rax), %r11
+ movq 5672(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(GetProgramParameterdvNV), .-GL_PREFIX(GetProgramParameterdvNV)
@@ -26326,7 +26705,7 @@ GL_PREFIX(GetProgramParameterdvNV):
GL_PREFIX(GetProgramParameterfvNV):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 5600(%rax), %r11
+ movq 5680(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -26340,13 +26719,13 @@ GL_PREFIX(GetProgramParameterfvNV):
popq %rdx
popq %rsi
popq %rdi
- movq 5600(%rax), %r11
+ movq 5680(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 5600(%rax), %r11
+ movq 5680(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -26360,7 +26739,7 @@ GL_PREFIX(GetProgramParameterfvNV):
popq %rdx
popq %rsi
popq %rdi
- movq 5600(%rax), %r11
+ movq 5680(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(GetProgramParameterfvNV), .-GL_PREFIX(GetProgramParameterfvNV)
@@ -26371,7 +26750,7 @@ GL_PREFIX(GetProgramParameterfvNV):
GL_PREFIX(GetProgramStringNV):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 5608(%rax), %r11
+ movq 5688(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -26381,13 +26760,13 @@ GL_PREFIX(GetProgramStringNV):
popq %rdx
popq %rsi
popq %rdi
- movq 5608(%rax), %r11
+ movq 5688(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 5608(%rax), %r11
+ movq 5688(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -26397,7 +26776,7 @@ GL_PREFIX(GetProgramStringNV):
popq %rdx
popq %rsi
popq %rdi
- movq 5608(%rax), %r11
+ movq 5688(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(GetProgramStringNV), .-GL_PREFIX(GetProgramStringNV)
@@ -26408,7 +26787,7 @@ GL_PREFIX(GetProgramStringNV):
GL_PREFIX(GetProgramivNV):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 5616(%rax), %r11
+ movq 5696(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -26418,13 +26797,13 @@ GL_PREFIX(GetProgramivNV):
popq %rdx
popq %rsi
popq %rdi
- movq 5616(%rax), %r11
+ movq 5696(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 5616(%rax), %r11
+ movq 5696(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -26434,7 +26813,7 @@ GL_PREFIX(GetProgramivNV):
popq %rdx
popq %rsi
popq %rdi
- movq 5616(%rax), %r11
+ movq 5696(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(GetProgramivNV), .-GL_PREFIX(GetProgramivNV)
@@ -26445,7 +26824,7 @@ GL_PREFIX(GetProgramivNV):
GL_PREFIX(GetTrackMatrixivNV):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 5624(%rax), %r11
+ movq 5704(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -26459,13 +26838,13 @@ GL_PREFIX(GetTrackMatrixivNV):
popq %rdx
popq %rsi
popq %rdi
- movq 5624(%rax), %r11
+ movq 5704(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 5624(%rax), %r11
+ movq 5704(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -26479,7 +26858,7 @@ GL_PREFIX(GetTrackMatrixivNV):
popq %rdx
popq %rsi
popq %rdi
- movq 5624(%rax), %r11
+ movq 5704(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(GetTrackMatrixivNV), .-GL_PREFIX(GetTrackMatrixivNV)
@@ -26490,7 +26869,7 @@ GL_PREFIX(GetTrackMatrixivNV):
GL_PREFIX(GetVertexAttribPointervNV):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 5632(%rax), %r11
+ movq 5712(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -26500,13 +26879,13 @@ GL_PREFIX(GetVertexAttribPointervNV):
popq %rdx
popq %rsi
popq %rdi
- movq 5632(%rax), %r11
+ movq 5712(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 5632(%rax), %r11
+ movq 5712(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -26516,7 +26895,7 @@ GL_PREFIX(GetVertexAttribPointervNV):
popq %rdx
popq %rsi
popq %rdi
- movq 5632(%rax), %r11
+ movq 5712(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(GetVertexAttribPointervNV), .-GL_PREFIX(GetVertexAttribPointervNV)
@@ -26527,7 +26906,7 @@ GL_PREFIX(GetVertexAttribPointervNV):
GL_PREFIX(GetVertexAttribdvNV):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 5640(%rax), %r11
+ movq 5720(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -26537,13 +26916,13 @@ GL_PREFIX(GetVertexAttribdvNV):
popq %rdx
popq %rsi
popq %rdi
- movq 5640(%rax), %r11
+ movq 5720(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 5640(%rax), %r11
+ movq 5720(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -26553,7 +26932,7 @@ GL_PREFIX(GetVertexAttribdvNV):
popq %rdx
popq %rsi
popq %rdi
- movq 5640(%rax), %r11
+ movq 5720(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(GetVertexAttribdvNV), .-GL_PREFIX(GetVertexAttribdvNV)
@@ -26564,7 +26943,7 @@ GL_PREFIX(GetVertexAttribdvNV):
GL_PREFIX(GetVertexAttribfvNV):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 5648(%rax), %r11
+ movq 5728(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -26574,13 +26953,13 @@ GL_PREFIX(GetVertexAttribfvNV):
popq %rdx
popq %rsi
popq %rdi
- movq 5648(%rax), %r11
+ movq 5728(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 5648(%rax), %r11
+ movq 5728(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -26590,7 +26969,7 @@ GL_PREFIX(GetVertexAttribfvNV):
popq %rdx
popq %rsi
popq %rdi
- movq 5648(%rax), %r11
+ movq 5728(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(GetVertexAttribfvNV), .-GL_PREFIX(GetVertexAttribfvNV)
@@ -26601,7 +26980,7 @@ GL_PREFIX(GetVertexAttribfvNV):
GL_PREFIX(GetVertexAttribivNV):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 5656(%rax), %r11
+ movq 5736(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -26611,13 +26990,13 @@ GL_PREFIX(GetVertexAttribivNV):
popq %rdx
popq %rsi
popq %rdi
- movq 5656(%rax), %r11
+ movq 5736(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 5656(%rax), %r11
+ movq 5736(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -26627,7 +27006,7 @@ GL_PREFIX(GetVertexAttribivNV):
popq %rdx
popq %rsi
popq %rdi
- movq 5656(%rax), %r11
+ movq 5736(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(GetVertexAttribivNV), .-GL_PREFIX(GetVertexAttribivNV)
@@ -26638,25 +27017,25 @@ GL_PREFIX(GetVertexAttribivNV):
GL_PREFIX(IsProgramNV):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 5664(%rax), %r11
+ movq 5744(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
call _x86_64_get_dispatch@PLT
popq %rdi
- movq 5664(%rax), %r11
+ movq 5744(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 5664(%rax), %r11
+ movq 5744(%rax), %r11
jmp *%r11
1:
pushq %rdi
call _glapi_get_dispatch
popq %rdi
- movq 5664(%rax), %r11
+ movq 5744(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(IsProgramNV), .-GL_PREFIX(IsProgramNV)
@@ -26667,7 +27046,7 @@ GL_PREFIX(IsProgramNV):
GL_PREFIX(LoadProgramNV):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 5672(%rax), %r11
+ movq 5752(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -26681,13 +27060,13 @@ GL_PREFIX(LoadProgramNV):
popq %rdx
popq %rsi
popq %rdi
- movq 5672(%rax), %r11
+ movq 5752(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 5672(%rax), %r11
+ movq 5752(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -26701,7 +27080,7 @@ GL_PREFIX(LoadProgramNV):
popq %rdx
popq %rsi
popq %rdi
- movq 5672(%rax), %r11
+ movq 5752(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(LoadProgramNV), .-GL_PREFIX(LoadProgramNV)
@@ -26712,7 +27091,7 @@ GL_PREFIX(LoadProgramNV):
GL_PREFIX(ProgramParameters4dvNV):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 5680(%rax), %r11
+ movq 5760(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -26726,13 +27105,13 @@ GL_PREFIX(ProgramParameters4dvNV):
popq %rdx
popq %rsi
popq %rdi
- movq 5680(%rax), %r11
+ movq 5760(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 5680(%rax), %r11
+ movq 5760(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -26746,7 +27125,7 @@ GL_PREFIX(ProgramParameters4dvNV):
popq %rdx
popq %rsi
popq %rdi
- movq 5680(%rax), %r11
+ movq 5760(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(ProgramParameters4dvNV), .-GL_PREFIX(ProgramParameters4dvNV)
@@ -26757,7 +27136,7 @@ GL_PREFIX(ProgramParameters4dvNV):
GL_PREFIX(ProgramParameters4fvNV):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 5688(%rax), %r11
+ movq 5768(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -26771,13 +27150,13 @@ GL_PREFIX(ProgramParameters4fvNV):
popq %rdx
popq %rsi
popq %rdi
- movq 5688(%rax), %r11
+ movq 5768(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 5688(%rax), %r11
+ movq 5768(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -26791,7 +27170,7 @@ GL_PREFIX(ProgramParameters4fvNV):
popq %rdx
popq %rsi
popq %rdi
- movq 5688(%rax), %r11
+ movq 5768(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(ProgramParameters4fvNV), .-GL_PREFIX(ProgramParameters4fvNV)
@@ -26802,7 +27181,7 @@ GL_PREFIX(ProgramParameters4fvNV):
GL_PREFIX(RequestResidentProgramsNV):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 5696(%rax), %r11
+ movq 5776(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -26812,13 +27191,13 @@ GL_PREFIX(RequestResidentProgramsNV):
popq %rbp
popq %rsi
popq %rdi
- movq 5696(%rax), %r11
+ movq 5776(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 5696(%rax), %r11
+ movq 5776(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -26828,7 +27207,7 @@ GL_PREFIX(RequestResidentProgramsNV):
popq %rbp
popq %rsi
popq %rdi
- movq 5696(%rax), %r11
+ movq 5776(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(RequestResidentProgramsNV), .-GL_PREFIX(RequestResidentProgramsNV)
@@ -26839,7 +27218,7 @@ GL_PREFIX(RequestResidentProgramsNV):
GL_PREFIX(TrackMatrixNV):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 5704(%rax), %r11
+ movq 5784(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -26853,13 +27232,13 @@ GL_PREFIX(TrackMatrixNV):
popq %rdx
popq %rsi
popq %rdi
- movq 5704(%rax), %r11
+ movq 5784(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 5704(%rax), %r11
+ movq 5784(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -26873,7 +27252,7 @@ GL_PREFIX(TrackMatrixNV):
popq %rdx
popq %rsi
popq %rdi
- movq 5704(%rax), %r11
+ movq 5784(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(TrackMatrixNV), .-GL_PREFIX(TrackMatrixNV)
@@ -26884,7 +27263,7 @@ GL_PREFIX(TrackMatrixNV):
GL_PREFIX(VertexAttrib1dNV):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 5712(%rax), %r11
+ movq 5792(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
subq $24, %rsp
@@ -26894,13 +27273,13 @@ GL_PREFIX(VertexAttrib1dNV):
movq 8(%rsp), %xmm0
movq (%rsp), %rdi
addq $24, %rsp
- movq 5712(%rax), %r11
+ movq 5792(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 5712(%rax), %r11
+ movq 5792(%rax), %r11
jmp *%r11
1:
subq $24, %rsp
@@ -26910,7 +27289,7 @@ GL_PREFIX(VertexAttrib1dNV):
movq 8(%rsp), %xmm0
movq (%rsp), %rdi
addq $24, %rsp
- movq 5712(%rax), %r11
+ movq 5792(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(VertexAttrib1dNV), .-GL_PREFIX(VertexAttrib1dNV)
@@ -26921,7 +27300,7 @@ GL_PREFIX(VertexAttrib1dNV):
GL_PREFIX(VertexAttrib1dvNV):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 5720(%rax), %r11
+ movq 5800(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -26931,13 +27310,13 @@ GL_PREFIX(VertexAttrib1dvNV):
popq %rbp
popq %rsi
popq %rdi
- movq 5720(%rax), %r11
+ movq 5800(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 5720(%rax), %r11
+ movq 5800(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -26947,7 +27326,7 @@ GL_PREFIX(VertexAttrib1dvNV):
popq %rbp
popq %rsi
popq %rdi
- movq 5720(%rax), %r11
+ movq 5800(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(VertexAttrib1dvNV), .-GL_PREFIX(VertexAttrib1dvNV)
@@ -26958,7 +27337,7 @@ GL_PREFIX(VertexAttrib1dvNV):
GL_PREFIX(VertexAttrib1fNV):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 5728(%rax), %r11
+ movq 5808(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
subq $24, %rsp
@@ -26968,13 +27347,13 @@ GL_PREFIX(VertexAttrib1fNV):
movq 8(%rsp), %xmm0
movq (%rsp), %rdi
addq $24, %rsp
- movq 5728(%rax), %r11
+ movq 5808(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 5728(%rax), %r11
+ movq 5808(%rax), %r11
jmp *%r11
1:
subq $24, %rsp
@@ -26984,7 +27363,7 @@ GL_PREFIX(VertexAttrib1fNV):
movq 8(%rsp), %xmm0
movq (%rsp), %rdi
addq $24, %rsp
- movq 5728(%rax), %r11
+ movq 5808(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(VertexAttrib1fNV), .-GL_PREFIX(VertexAttrib1fNV)
@@ -26995,7 +27374,7 @@ GL_PREFIX(VertexAttrib1fNV):
GL_PREFIX(VertexAttrib1fvNV):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 5736(%rax), %r11
+ movq 5816(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -27005,13 +27384,13 @@ GL_PREFIX(VertexAttrib1fvNV):
popq %rbp
popq %rsi
popq %rdi
- movq 5736(%rax), %r11
+ movq 5816(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 5736(%rax), %r11
+ movq 5816(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -27021,7 +27400,7 @@ GL_PREFIX(VertexAttrib1fvNV):
popq %rbp
popq %rsi
popq %rdi
- movq 5736(%rax), %r11
+ movq 5816(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(VertexAttrib1fvNV), .-GL_PREFIX(VertexAttrib1fvNV)
@@ -27032,7 +27411,7 @@ GL_PREFIX(VertexAttrib1fvNV):
GL_PREFIX(VertexAttrib1sNV):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 5744(%rax), %r11
+ movq 5824(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -27042,13 +27421,13 @@ GL_PREFIX(VertexAttrib1sNV):
popq %rbp
popq %rsi
popq %rdi
- movq 5744(%rax), %r11
+ movq 5824(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 5744(%rax), %r11
+ movq 5824(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -27058,7 +27437,7 @@ GL_PREFIX(VertexAttrib1sNV):
popq %rbp
popq %rsi
popq %rdi
- movq 5744(%rax), %r11
+ movq 5824(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(VertexAttrib1sNV), .-GL_PREFIX(VertexAttrib1sNV)
@@ -27069,7 +27448,7 @@ GL_PREFIX(VertexAttrib1sNV):
GL_PREFIX(VertexAttrib1svNV):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 5752(%rax), %r11
+ movq 5832(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -27079,13 +27458,13 @@ GL_PREFIX(VertexAttrib1svNV):
popq %rbp
popq %rsi
popq %rdi
- movq 5752(%rax), %r11
+ movq 5832(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 5752(%rax), %r11
+ movq 5832(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -27095,7 +27474,7 @@ GL_PREFIX(VertexAttrib1svNV):
popq %rbp
popq %rsi
popq %rdi
- movq 5752(%rax), %r11
+ movq 5832(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(VertexAttrib1svNV), .-GL_PREFIX(VertexAttrib1svNV)
@@ -27106,7 +27485,7 @@ GL_PREFIX(VertexAttrib1svNV):
GL_PREFIX(VertexAttrib2dNV):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 5760(%rax), %r11
+ movq 5840(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
subq $24, %rsp
@@ -27118,13 +27497,13 @@ GL_PREFIX(VertexAttrib2dNV):
movq 8(%rsp), %xmm0
movq (%rsp), %rdi
addq $24, %rsp
- movq 5760(%rax), %r11
+ movq 5840(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 5760(%rax), %r11
+ movq 5840(%rax), %r11
jmp *%r11
1:
subq $24, %rsp
@@ -27136,7 +27515,7 @@ GL_PREFIX(VertexAttrib2dNV):
movq 8(%rsp), %xmm0
movq (%rsp), %rdi
addq $24, %rsp
- movq 5760(%rax), %r11
+ movq 5840(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(VertexAttrib2dNV), .-GL_PREFIX(VertexAttrib2dNV)
@@ -27147,7 +27526,7 @@ GL_PREFIX(VertexAttrib2dNV):
GL_PREFIX(VertexAttrib2dvNV):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 5768(%rax), %r11
+ movq 5848(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -27157,13 +27536,13 @@ GL_PREFIX(VertexAttrib2dvNV):
popq %rbp
popq %rsi
popq %rdi
- movq 5768(%rax), %r11
+ movq 5848(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 5768(%rax), %r11
+ movq 5848(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -27173,7 +27552,7 @@ GL_PREFIX(VertexAttrib2dvNV):
popq %rbp
popq %rsi
popq %rdi
- movq 5768(%rax), %r11
+ movq 5848(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(VertexAttrib2dvNV), .-GL_PREFIX(VertexAttrib2dvNV)
@@ -27184,7 +27563,7 @@ GL_PREFIX(VertexAttrib2dvNV):
GL_PREFIX(VertexAttrib2fNV):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 5776(%rax), %r11
+ movq 5856(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
subq $24, %rsp
@@ -27196,13 +27575,13 @@ GL_PREFIX(VertexAttrib2fNV):
movq 8(%rsp), %xmm0
movq (%rsp), %rdi
addq $24, %rsp
- movq 5776(%rax), %r11
+ movq 5856(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 5776(%rax), %r11
+ movq 5856(%rax), %r11
jmp *%r11
1:
subq $24, %rsp
@@ -27214,7 +27593,7 @@ GL_PREFIX(VertexAttrib2fNV):
movq 8(%rsp), %xmm0
movq (%rsp), %rdi
addq $24, %rsp
- movq 5776(%rax), %r11
+ movq 5856(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(VertexAttrib2fNV), .-GL_PREFIX(VertexAttrib2fNV)
@@ -27225,7 +27604,7 @@ GL_PREFIX(VertexAttrib2fNV):
GL_PREFIX(VertexAttrib2fvNV):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 5784(%rax), %r11
+ movq 5864(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -27235,13 +27614,13 @@ GL_PREFIX(VertexAttrib2fvNV):
popq %rbp
popq %rsi
popq %rdi
- movq 5784(%rax), %r11
+ movq 5864(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 5784(%rax), %r11
+ movq 5864(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -27251,7 +27630,7 @@ GL_PREFIX(VertexAttrib2fvNV):
popq %rbp
popq %rsi
popq %rdi
- movq 5784(%rax), %r11
+ movq 5864(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(VertexAttrib2fvNV), .-GL_PREFIX(VertexAttrib2fvNV)
@@ -27262,7 +27641,7 @@ GL_PREFIX(VertexAttrib2fvNV):
GL_PREFIX(VertexAttrib2sNV):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 5792(%rax), %r11
+ movq 5872(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -27272,13 +27651,13 @@ GL_PREFIX(VertexAttrib2sNV):
popq %rdx
popq %rsi
popq %rdi
- movq 5792(%rax), %r11
+ movq 5872(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 5792(%rax), %r11
+ movq 5872(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -27288,7 +27667,7 @@ GL_PREFIX(VertexAttrib2sNV):
popq %rdx
popq %rsi
popq %rdi
- movq 5792(%rax), %r11
+ movq 5872(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(VertexAttrib2sNV), .-GL_PREFIX(VertexAttrib2sNV)
@@ -27299,7 +27678,7 @@ GL_PREFIX(VertexAttrib2sNV):
GL_PREFIX(VertexAttrib2svNV):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 5800(%rax), %r11
+ movq 5880(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -27309,13 +27688,13 @@ GL_PREFIX(VertexAttrib2svNV):
popq %rbp
popq %rsi
popq %rdi
- movq 5800(%rax), %r11
+ movq 5880(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 5800(%rax), %r11
+ movq 5880(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -27325,7 +27704,7 @@ GL_PREFIX(VertexAttrib2svNV):
popq %rbp
popq %rsi
popq %rdi
- movq 5800(%rax), %r11
+ movq 5880(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(VertexAttrib2svNV), .-GL_PREFIX(VertexAttrib2svNV)
@@ -27336,7 +27715,7 @@ GL_PREFIX(VertexAttrib2svNV):
GL_PREFIX(VertexAttrib3dNV):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 5808(%rax), %r11
+ movq 5888(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
subq $40, %rsp
@@ -27350,13 +27729,13 @@ GL_PREFIX(VertexAttrib3dNV):
movq 8(%rsp), %xmm0
movq (%rsp), %rdi
addq $40, %rsp
- movq 5808(%rax), %r11
+ movq 5888(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 5808(%rax), %r11
+ movq 5888(%rax), %r11
jmp *%r11
1:
subq $40, %rsp
@@ -27370,7 +27749,7 @@ GL_PREFIX(VertexAttrib3dNV):
movq 8(%rsp), %xmm0
movq (%rsp), %rdi
addq $40, %rsp
- movq 5808(%rax), %r11
+ movq 5888(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(VertexAttrib3dNV), .-GL_PREFIX(VertexAttrib3dNV)
@@ -27381,7 +27760,7 @@ GL_PREFIX(VertexAttrib3dNV):
GL_PREFIX(VertexAttrib3dvNV):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 5816(%rax), %r11
+ movq 5896(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -27391,13 +27770,13 @@ GL_PREFIX(VertexAttrib3dvNV):
popq %rbp
popq %rsi
popq %rdi
- movq 5816(%rax), %r11
+ movq 5896(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 5816(%rax), %r11
+ movq 5896(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -27407,7 +27786,7 @@ GL_PREFIX(VertexAttrib3dvNV):
popq %rbp
popq %rsi
popq %rdi
- movq 5816(%rax), %r11
+ movq 5896(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(VertexAttrib3dvNV), .-GL_PREFIX(VertexAttrib3dvNV)
@@ -27418,7 +27797,7 @@ GL_PREFIX(VertexAttrib3dvNV):
GL_PREFIX(VertexAttrib3fNV):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 5824(%rax), %r11
+ movq 5904(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
subq $40, %rsp
@@ -27432,13 +27811,13 @@ GL_PREFIX(VertexAttrib3fNV):
movq 8(%rsp), %xmm0
movq (%rsp), %rdi
addq $40, %rsp
- movq 5824(%rax), %r11
+ movq 5904(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 5824(%rax), %r11
+ movq 5904(%rax), %r11
jmp *%r11
1:
subq $40, %rsp
@@ -27452,7 +27831,7 @@ GL_PREFIX(VertexAttrib3fNV):
movq 8(%rsp), %xmm0
movq (%rsp), %rdi
addq $40, %rsp
- movq 5824(%rax), %r11
+ movq 5904(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(VertexAttrib3fNV), .-GL_PREFIX(VertexAttrib3fNV)
@@ -27463,7 +27842,7 @@ GL_PREFIX(VertexAttrib3fNV):
GL_PREFIX(VertexAttrib3fvNV):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 5832(%rax), %r11
+ movq 5912(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -27473,13 +27852,13 @@ GL_PREFIX(VertexAttrib3fvNV):
popq %rbp
popq %rsi
popq %rdi
- movq 5832(%rax), %r11
+ movq 5912(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 5832(%rax), %r11
+ movq 5912(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -27489,7 +27868,7 @@ GL_PREFIX(VertexAttrib3fvNV):
popq %rbp
popq %rsi
popq %rdi
- movq 5832(%rax), %r11
+ movq 5912(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(VertexAttrib3fvNV), .-GL_PREFIX(VertexAttrib3fvNV)
@@ -27500,7 +27879,7 @@ GL_PREFIX(VertexAttrib3fvNV):
GL_PREFIX(VertexAttrib3sNV):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 5840(%rax), %r11
+ movq 5920(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -27514,13 +27893,13 @@ GL_PREFIX(VertexAttrib3sNV):
popq %rdx
popq %rsi
popq %rdi
- movq 5840(%rax), %r11
+ movq 5920(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 5840(%rax), %r11
+ movq 5920(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -27534,7 +27913,7 @@ GL_PREFIX(VertexAttrib3sNV):
popq %rdx
popq %rsi
popq %rdi
- movq 5840(%rax), %r11
+ movq 5920(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(VertexAttrib3sNV), .-GL_PREFIX(VertexAttrib3sNV)
@@ -27545,7 +27924,7 @@ GL_PREFIX(VertexAttrib3sNV):
GL_PREFIX(VertexAttrib3svNV):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 5848(%rax), %r11
+ movq 5928(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -27555,13 +27934,13 @@ GL_PREFIX(VertexAttrib3svNV):
popq %rbp
popq %rsi
popq %rdi
- movq 5848(%rax), %r11
+ movq 5928(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 5848(%rax), %r11
+ movq 5928(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -27571,7 +27950,7 @@ GL_PREFIX(VertexAttrib3svNV):
popq %rbp
popq %rsi
popq %rdi
- movq 5848(%rax), %r11
+ movq 5928(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(VertexAttrib3svNV), .-GL_PREFIX(VertexAttrib3svNV)
@@ -27582,7 +27961,7 @@ GL_PREFIX(VertexAttrib3svNV):
GL_PREFIX(VertexAttrib4dNV):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 5856(%rax), %r11
+ movq 5936(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
subq $40, %rsp
@@ -27598,13 +27977,13 @@ GL_PREFIX(VertexAttrib4dNV):
movq 8(%rsp), %xmm0
movq (%rsp), %rdi
addq $40, %rsp
- movq 5856(%rax), %r11
+ movq 5936(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 5856(%rax), %r11
+ movq 5936(%rax), %r11
jmp *%r11
1:
subq $40, %rsp
@@ -27620,7 +27999,7 @@ GL_PREFIX(VertexAttrib4dNV):
movq 8(%rsp), %xmm0
movq (%rsp), %rdi
addq $40, %rsp
- movq 5856(%rax), %r11
+ movq 5936(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(VertexAttrib4dNV), .-GL_PREFIX(VertexAttrib4dNV)
@@ -27631,7 +28010,7 @@ GL_PREFIX(VertexAttrib4dNV):
GL_PREFIX(VertexAttrib4dvNV):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 5864(%rax), %r11
+ movq 5944(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -27641,13 +28020,13 @@ GL_PREFIX(VertexAttrib4dvNV):
popq %rbp
popq %rsi
popq %rdi
- movq 5864(%rax), %r11
+ movq 5944(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 5864(%rax), %r11
+ movq 5944(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -27657,7 +28036,7 @@ GL_PREFIX(VertexAttrib4dvNV):
popq %rbp
popq %rsi
popq %rdi
- movq 5864(%rax), %r11
+ movq 5944(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(VertexAttrib4dvNV), .-GL_PREFIX(VertexAttrib4dvNV)
@@ -27668,7 +28047,7 @@ GL_PREFIX(VertexAttrib4dvNV):
GL_PREFIX(VertexAttrib4fNV):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 5872(%rax), %r11
+ movq 5952(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
subq $40, %rsp
@@ -27684,13 +28063,13 @@ GL_PREFIX(VertexAttrib4fNV):
movq 8(%rsp), %xmm0
movq (%rsp), %rdi
addq $40, %rsp
- movq 5872(%rax), %r11
+ movq 5952(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 5872(%rax), %r11
+ movq 5952(%rax), %r11
jmp *%r11
1:
subq $40, %rsp
@@ -27706,7 +28085,7 @@ GL_PREFIX(VertexAttrib4fNV):
movq 8(%rsp), %xmm0
movq (%rsp), %rdi
addq $40, %rsp
- movq 5872(%rax), %r11
+ movq 5952(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(VertexAttrib4fNV), .-GL_PREFIX(VertexAttrib4fNV)
@@ -27717,7 +28096,7 @@ GL_PREFIX(VertexAttrib4fNV):
GL_PREFIX(VertexAttrib4fvNV):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 5880(%rax), %r11
+ movq 5960(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -27727,13 +28106,13 @@ GL_PREFIX(VertexAttrib4fvNV):
popq %rbp
popq %rsi
popq %rdi
- movq 5880(%rax), %r11
+ movq 5960(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 5880(%rax), %r11
+ movq 5960(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -27743,7 +28122,7 @@ GL_PREFIX(VertexAttrib4fvNV):
popq %rbp
popq %rsi
popq %rdi
- movq 5880(%rax), %r11
+ movq 5960(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(VertexAttrib4fvNV), .-GL_PREFIX(VertexAttrib4fvNV)
@@ -27754,7 +28133,7 @@ GL_PREFIX(VertexAttrib4fvNV):
GL_PREFIX(VertexAttrib4sNV):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 5888(%rax), %r11
+ movq 5968(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -27768,13 +28147,13 @@ GL_PREFIX(VertexAttrib4sNV):
popq %rdx
popq %rsi
popq %rdi
- movq 5888(%rax), %r11
+ movq 5968(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 5888(%rax), %r11
+ movq 5968(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -27788,7 +28167,7 @@ GL_PREFIX(VertexAttrib4sNV):
popq %rdx
popq %rsi
popq %rdi
- movq 5888(%rax), %r11
+ movq 5968(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(VertexAttrib4sNV), .-GL_PREFIX(VertexAttrib4sNV)
@@ -27799,7 +28178,7 @@ GL_PREFIX(VertexAttrib4sNV):
GL_PREFIX(VertexAttrib4svNV):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 5896(%rax), %r11
+ movq 5976(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -27809,13 +28188,13 @@ GL_PREFIX(VertexAttrib4svNV):
popq %rbp
popq %rsi
popq %rdi
- movq 5896(%rax), %r11
+ movq 5976(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 5896(%rax), %r11
+ movq 5976(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -27825,7 +28204,7 @@ GL_PREFIX(VertexAttrib4svNV):
popq %rbp
popq %rsi
popq %rdi
- movq 5896(%rax), %r11
+ movq 5976(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(VertexAttrib4svNV), .-GL_PREFIX(VertexAttrib4svNV)
@@ -27836,7 +28215,7 @@ GL_PREFIX(VertexAttrib4svNV):
GL_PREFIX(VertexAttrib4ubNV):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 5904(%rax), %r11
+ movq 5984(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -27850,13 +28229,13 @@ GL_PREFIX(VertexAttrib4ubNV):
popq %rdx
popq %rsi
popq %rdi
- movq 5904(%rax), %r11
+ movq 5984(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 5904(%rax), %r11
+ movq 5984(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -27870,7 +28249,7 @@ GL_PREFIX(VertexAttrib4ubNV):
popq %rdx
popq %rsi
popq %rdi
- movq 5904(%rax), %r11
+ movq 5984(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(VertexAttrib4ubNV), .-GL_PREFIX(VertexAttrib4ubNV)
@@ -27881,7 +28260,7 @@ GL_PREFIX(VertexAttrib4ubNV):
GL_PREFIX(VertexAttrib4ubvNV):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 5912(%rax), %r11
+ movq 5992(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -27891,13 +28270,13 @@ GL_PREFIX(VertexAttrib4ubvNV):
popq %rbp
popq %rsi
popq %rdi
- movq 5912(%rax), %r11
+ movq 5992(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 5912(%rax), %r11
+ movq 5992(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -27907,7 +28286,7 @@ GL_PREFIX(VertexAttrib4ubvNV):
popq %rbp
popq %rsi
popq %rdi
- movq 5912(%rax), %r11
+ movq 5992(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(VertexAttrib4ubvNV), .-GL_PREFIX(VertexAttrib4ubvNV)
@@ -27918,7 +28297,7 @@ GL_PREFIX(VertexAttrib4ubvNV):
GL_PREFIX(VertexAttribPointerNV):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 5920(%rax), %r11
+ movq 6000(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -27932,13 +28311,13 @@ GL_PREFIX(VertexAttribPointerNV):
popq %rdx
popq %rsi
popq %rdi
- movq 5920(%rax), %r11
+ movq 6000(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 5920(%rax), %r11
+ movq 6000(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -27952,7 +28331,7 @@ GL_PREFIX(VertexAttribPointerNV):
popq %rdx
popq %rsi
popq %rdi
- movq 5920(%rax), %r11
+ movq 6000(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(VertexAttribPointerNV), .-GL_PREFIX(VertexAttribPointerNV)
@@ -27963,7 +28342,7 @@ GL_PREFIX(VertexAttribPointerNV):
GL_PREFIX(VertexAttribs1dvNV):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 5928(%rax), %r11
+ movq 6008(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -27973,13 +28352,13 @@ GL_PREFIX(VertexAttribs1dvNV):
popq %rdx
popq %rsi
popq %rdi
- movq 5928(%rax), %r11
+ movq 6008(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 5928(%rax), %r11
+ movq 6008(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -27989,7 +28368,7 @@ GL_PREFIX(VertexAttribs1dvNV):
popq %rdx
popq %rsi
popq %rdi
- movq 5928(%rax), %r11
+ movq 6008(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(VertexAttribs1dvNV), .-GL_PREFIX(VertexAttribs1dvNV)
@@ -28000,7 +28379,7 @@ GL_PREFIX(VertexAttribs1dvNV):
GL_PREFIX(VertexAttribs1fvNV):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 5936(%rax), %r11
+ movq 6016(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -28010,13 +28389,13 @@ GL_PREFIX(VertexAttribs1fvNV):
popq %rdx
popq %rsi
popq %rdi
- movq 5936(%rax), %r11
+ movq 6016(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 5936(%rax), %r11
+ movq 6016(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -28026,7 +28405,7 @@ GL_PREFIX(VertexAttribs1fvNV):
popq %rdx
popq %rsi
popq %rdi
- movq 5936(%rax), %r11
+ movq 6016(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(VertexAttribs1fvNV), .-GL_PREFIX(VertexAttribs1fvNV)
@@ -28037,7 +28416,7 @@ GL_PREFIX(VertexAttribs1fvNV):
GL_PREFIX(VertexAttribs1svNV):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 5944(%rax), %r11
+ movq 6024(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -28047,13 +28426,13 @@ GL_PREFIX(VertexAttribs1svNV):
popq %rdx
popq %rsi
popq %rdi
- movq 5944(%rax), %r11
+ movq 6024(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 5944(%rax), %r11
+ movq 6024(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -28063,7 +28442,7 @@ GL_PREFIX(VertexAttribs1svNV):
popq %rdx
popq %rsi
popq %rdi
- movq 5944(%rax), %r11
+ movq 6024(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(VertexAttribs1svNV), .-GL_PREFIX(VertexAttribs1svNV)
@@ -28074,7 +28453,7 @@ GL_PREFIX(VertexAttribs1svNV):
GL_PREFIX(VertexAttribs2dvNV):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 5952(%rax), %r11
+ movq 6032(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -28084,13 +28463,13 @@ GL_PREFIX(VertexAttribs2dvNV):
popq %rdx
popq %rsi
popq %rdi
- movq 5952(%rax), %r11
+ movq 6032(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 5952(%rax), %r11
+ movq 6032(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -28100,7 +28479,7 @@ GL_PREFIX(VertexAttribs2dvNV):
popq %rdx
popq %rsi
popq %rdi
- movq 5952(%rax), %r11
+ movq 6032(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(VertexAttribs2dvNV), .-GL_PREFIX(VertexAttribs2dvNV)
@@ -28111,7 +28490,7 @@ GL_PREFIX(VertexAttribs2dvNV):
GL_PREFIX(VertexAttribs2fvNV):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 5960(%rax), %r11
+ movq 6040(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -28121,13 +28500,13 @@ GL_PREFIX(VertexAttribs2fvNV):
popq %rdx
popq %rsi
popq %rdi
- movq 5960(%rax), %r11
+ movq 6040(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 5960(%rax), %r11
+ movq 6040(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -28137,7 +28516,7 @@ GL_PREFIX(VertexAttribs2fvNV):
popq %rdx
popq %rsi
popq %rdi
- movq 5960(%rax), %r11
+ movq 6040(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(VertexAttribs2fvNV), .-GL_PREFIX(VertexAttribs2fvNV)
@@ -28148,7 +28527,7 @@ GL_PREFIX(VertexAttribs2fvNV):
GL_PREFIX(VertexAttribs2svNV):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 5968(%rax), %r11
+ movq 6048(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -28158,13 +28537,13 @@ GL_PREFIX(VertexAttribs2svNV):
popq %rdx
popq %rsi
popq %rdi
- movq 5968(%rax), %r11
+ movq 6048(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 5968(%rax), %r11
+ movq 6048(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -28174,7 +28553,7 @@ GL_PREFIX(VertexAttribs2svNV):
popq %rdx
popq %rsi
popq %rdi
- movq 5968(%rax), %r11
+ movq 6048(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(VertexAttribs2svNV), .-GL_PREFIX(VertexAttribs2svNV)
@@ -28185,7 +28564,7 @@ GL_PREFIX(VertexAttribs2svNV):
GL_PREFIX(VertexAttribs3dvNV):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 5976(%rax), %r11
+ movq 6056(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -28195,13 +28574,13 @@ GL_PREFIX(VertexAttribs3dvNV):
popq %rdx
popq %rsi
popq %rdi
- movq 5976(%rax), %r11
+ movq 6056(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 5976(%rax), %r11
+ movq 6056(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -28211,7 +28590,7 @@ GL_PREFIX(VertexAttribs3dvNV):
popq %rdx
popq %rsi
popq %rdi
- movq 5976(%rax), %r11
+ movq 6056(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(VertexAttribs3dvNV), .-GL_PREFIX(VertexAttribs3dvNV)
@@ -28222,7 +28601,7 @@ GL_PREFIX(VertexAttribs3dvNV):
GL_PREFIX(VertexAttribs3fvNV):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 5984(%rax), %r11
+ movq 6064(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -28232,13 +28611,13 @@ GL_PREFIX(VertexAttribs3fvNV):
popq %rdx
popq %rsi
popq %rdi
- movq 5984(%rax), %r11
+ movq 6064(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 5984(%rax), %r11
+ movq 6064(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -28248,7 +28627,7 @@ GL_PREFIX(VertexAttribs3fvNV):
popq %rdx
popq %rsi
popq %rdi
- movq 5984(%rax), %r11
+ movq 6064(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(VertexAttribs3fvNV), .-GL_PREFIX(VertexAttribs3fvNV)
@@ -28259,7 +28638,7 @@ GL_PREFIX(VertexAttribs3fvNV):
GL_PREFIX(VertexAttribs3svNV):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 5992(%rax), %r11
+ movq 6072(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -28269,13 +28648,13 @@ GL_PREFIX(VertexAttribs3svNV):
popq %rdx
popq %rsi
popq %rdi
- movq 5992(%rax), %r11
+ movq 6072(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 5992(%rax), %r11
+ movq 6072(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -28285,7 +28664,7 @@ GL_PREFIX(VertexAttribs3svNV):
popq %rdx
popq %rsi
popq %rdi
- movq 5992(%rax), %r11
+ movq 6072(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(VertexAttribs3svNV), .-GL_PREFIX(VertexAttribs3svNV)
@@ -28296,7 +28675,7 @@ GL_PREFIX(VertexAttribs3svNV):
GL_PREFIX(VertexAttribs4dvNV):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 6000(%rax), %r11
+ movq 6080(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -28306,13 +28685,13 @@ GL_PREFIX(VertexAttribs4dvNV):
popq %rdx
popq %rsi
popq %rdi
- movq 6000(%rax), %r11
+ movq 6080(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 6000(%rax), %r11
+ movq 6080(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -28322,7 +28701,7 @@ GL_PREFIX(VertexAttribs4dvNV):
popq %rdx
popq %rsi
popq %rdi
- movq 6000(%rax), %r11
+ movq 6080(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(VertexAttribs4dvNV), .-GL_PREFIX(VertexAttribs4dvNV)
@@ -28333,7 +28712,7 @@ GL_PREFIX(VertexAttribs4dvNV):
GL_PREFIX(VertexAttribs4fvNV):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 6008(%rax), %r11
+ movq 6088(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -28343,13 +28722,13 @@ GL_PREFIX(VertexAttribs4fvNV):
popq %rdx
popq %rsi
popq %rdi
- movq 6008(%rax), %r11
+ movq 6088(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 6008(%rax), %r11
+ movq 6088(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -28359,7 +28738,7 @@ GL_PREFIX(VertexAttribs4fvNV):
popq %rdx
popq %rsi
popq %rdi
- movq 6008(%rax), %r11
+ movq 6088(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(VertexAttribs4fvNV), .-GL_PREFIX(VertexAttribs4fvNV)
@@ -28370,7 +28749,7 @@ GL_PREFIX(VertexAttribs4fvNV):
GL_PREFIX(VertexAttribs4svNV):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 6016(%rax), %r11
+ movq 6096(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -28380,13 +28759,13 @@ GL_PREFIX(VertexAttribs4svNV):
popq %rdx
popq %rsi
popq %rdi
- movq 6016(%rax), %r11
+ movq 6096(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 6016(%rax), %r11
+ movq 6096(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -28396,7 +28775,7 @@ GL_PREFIX(VertexAttribs4svNV):
popq %rdx
popq %rsi
popq %rdi
- movq 6016(%rax), %r11
+ movq 6096(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(VertexAttribs4svNV), .-GL_PREFIX(VertexAttribs4svNV)
@@ -28407,7 +28786,7 @@ GL_PREFIX(VertexAttribs4svNV):
GL_PREFIX(VertexAttribs4ubvNV):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 6024(%rax), %r11
+ movq 6104(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -28417,13 +28796,13 @@ GL_PREFIX(VertexAttribs4ubvNV):
popq %rdx
popq %rsi
popq %rdi
- movq 6024(%rax), %r11
+ movq 6104(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 6024(%rax), %r11
+ movq 6104(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -28433,7 +28812,7 @@ GL_PREFIX(VertexAttribs4ubvNV):
popq %rdx
popq %rsi
popq %rdi
- movq 6024(%rax), %r11
+ movq 6104(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(VertexAttribs4ubvNV), .-GL_PREFIX(VertexAttribs4ubvNV)
@@ -28444,7 +28823,7 @@ GL_PREFIX(VertexAttribs4ubvNV):
GL_PREFIX(GetTexBumpParameterfvATI):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 6032(%rax), %r11
+ movq 6112(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -28454,13 +28833,13 @@ GL_PREFIX(GetTexBumpParameterfvATI):
popq %rbp
popq %rsi
popq %rdi
- movq 6032(%rax), %r11
+ movq 6112(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 6032(%rax), %r11
+ movq 6112(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -28470,7 +28849,7 @@ GL_PREFIX(GetTexBumpParameterfvATI):
popq %rbp
popq %rsi
popq %rdi
- movq 6032(%rax), %r11
+ movq 6112(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(GetTexBumpParameterfvATI), .-GL_PREFIX(GetTexBumpParameterfvATI)
@@ -28481,7 +28860,7 @@ GL_PREFIX(GetTexBumpParameterfvATI):
GL_PREFIX(GetTexBumpParameterivATI):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 6040(%rax), %r11
+ movq 6120(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -28491,13 +28870,13 @@ GL_PREFIX(GetTexBumpParameterivATI):
popq %rbp
popq %rsi
popq %rdi
- movq 6040(%rax), %r11
+ movq 6120(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 6040(%rax), %r11
+ movq 6120(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -28507,7 +28886,7 @@ GL_PREFIX(GetTexBumpParameterivATI):
popq %rbp
popq %rsi
popq %rdi
- movq 6040(%rax), %r11
+ movq 6120(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(GetTexBumpParameterivATI), .-GL_PREFIX(GetTexBumpParameterivATI)
@@ -28518,7 +28897,7 @@ GL_PREFIX(GetTexBumpParameterivATI):
GL_PREFIX(TexBumpParameterfvATI):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 6048(%rax), %r11
+ movq 6128(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -28528,13 +28907,13 @@ GL_PREFIX(TexBumpParameterfvATI):
popq %rbp
popq %rsi
popq %rdi
- movq 6048(%rax), %r11
+ movq 6128(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 6048(%rax), %r11
+ movq 6128(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -28544,7 +28923,7 @@ GL_PREFIX(TexBumpParameterfvATI):
popq %rbp
popq %rsi
popq %rdi
- movq 6048(%rax), %r11
+ movq 6128(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(TexBumpParameterfvATI), .-GL_PREFIX(TexBumpParameterfvATI)
@@ -28555,7 +28934,7 @@ GL_PREFIX(TexBumpParameterfvATI):
GL_PREFIX(TexBumpParameterivATI):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 6056(%rax), %r11
+ movq 6136(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -28565,13 +28944,13 @@ GL_PREFIX(TexBumpParameterivATI):
popq %rbp
popq %rsi
popq %rdi
- movq 6056(%rax), %r11
+ movq 6136(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 6056(%rax), %r11
+ movq 6136(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -28581,7 +28960,7 @@ GL_PREFIX(TexBumpParameterivATI):
popq %rbp
popq %rsi
popq %rdi
- movq 6056(%rax), %r11
+ movq 6136(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(TexBumpParameterivATI), .-GL_PREFIX(TexBumpParameterivATI)
@@ -28592,7 +28971,7 @@ GL_PREFIX(TexBumpParameterivATI):
GL_PREFIX(AlphaFragmentOp1ATI):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 6064(%rax), %r11
+ movq 6144(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -28610,13 +28989,13 @@ GL_PREFIX(AlphaFragmentOp1ATI):
popq %rdx
popq %rsi
popq %rdi
- movq 6064(%rax), %r11
+ movq 6144(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 6064(%rax), %r11
+ movq 6144(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -28634,7 +29013,7 @@ GL_PREFIX(AlphaFragmentOp1ATI):
popq %rdx
popq %rsi
popq %rdi
- movq 6064(%rax), %r11
+ movq 6144(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(AlphaFragmentOp1ATI), .-GL_PREFIX(AlphaFragmentOp1ATI)
@@ -28645,7 +29024,7 @@ GL_PREFIX(AlphaFragmentOp1ATI):
GL_PREFIX(AlphaFragmentOp2ATI):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 6072(%rax), %r11
+ movq 6152(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -28663,13 +29042,13 @@ GL_PREFIX(AlphaFragmentOp2ATI):
popq %rdx
popq %rsi
popq %rdi
- movq 6072(%rax), %r11
+ movq 6152(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 6072(%rax), %r11
+ movq 6152(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -28687,7 +29066,7 @@ GL_PREFIX(AlphaFragmentOp2ATI):
popq %rdx
popq %rsi
popq %rdi
- movq 6072(%rax), %r11
+ movq 6152(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(AlphaFragmentOp2ATI), .-GL_PREFIX(AlphaFragmentOp2ATI)
@@ -28698,7 +29077,7 @@ GL_PREFIX(AlphaFragmentOp2ATI):
GL_PREFIX(AlphaFragmentOp3ATI):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 6080(%rax), %r11
+ movq 6160(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -28716,13 +29095,13 @@ GL_PREFIX(AlphaFragmentOp3ATI):
popq %rdx
popq %rsi
popq %rdi
- movq 6080(%rax), %r11
+ movq 6160(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 6080(%rax), %r11
+ movq 6160(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -28740,7 +29119,7 @@ GL_PREFIX(AlphaFragmentOp3ATI):
popq %rdx
popq %rsi
popq %rdi
- movq 6080(%rax), %r11
+ movq 6160(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(AlphaFragmentOp3ATI), .-GL_PREFIX(AlphaFragmentOp3ATI)
@@ -28751,25 +29130,25 @@ GL_PREFIX(AlphaFragmentOp3ATI):
GL_PREFIX(BeginFragmentShaderATI):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 6088(%rax), %r11
+ movq 6168(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rbp
call _x86_64_get_dispatch@PLT
popq %rbp
- movq 6088(%rax), %r11
+ movq 6168(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 6088(%rax), %r11
+ movq 6168(%rax), %r11
jmp *%r11
1:
pushq %rbp
call _glapi_get_dispatch
popq %rbp
- movq 6088(%rax), %r11
+ movq 6168(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(BeginFragmentShaderATI), .-GL_PREFIX(BeginFragmentShaderATI)
@@ -28780,25 +29159,25 @@ GL_PREFIX(BeginFragmentShaderATI):
GL_PREFIX(BindFragmentShaderATI):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 6096(%rax), %r11
+ movq 6176(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
call _x86_64_get_dispatch@PLT
popq %rdi
- movq 6096(%rax), %r11
+ movq 6176(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 6096(%rax), %r11
+ movq 6176(%rax), %r11
jmp *%r11
1:
pushq %rdi
call _glapi_get_dispatch
popq %rdi
- movq 6096(%rax), %r11
+ movq 6176(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(BindFragmentShaderATI), .-GL_PREFIX(BindFragmentShaderATI)
@@ -28809,7 +29188,7 @@ GL_PREFIX(BindFragmentShaderATI):
GL_PREFIX(ColorFragmentOp1ATI):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 6104(%rax), %r11
+ movq 6184(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -28827,13 +29206,13 @@ GL_PREFIX(ColorFragmentOp1ATI):
popq %rdx
popq %rsi
popq %rdi
- movq 6104(%rax), %r11
+ movq 6184(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 6104(%rax), %r11
+ movq 6184(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -28851,7 +29230,7 @@ GL_PREFIX(ColorFragmentOp1ATI):
popq %rdx
popq %rsi
popq %rdi
- movq 6104(%rax), %r11
+ movq 6184(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(ColorFragmentOp1ATI), .-GL_PREFIX(ColorFragmentOp1ATI)
@@ -28862,7 +29241,7 @@ GL_PREFIX(ColorFragmentOp1ATI):
GL_PREFIX(ColorFragmentOp2ATI):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 6112(%rax), %r11
+ movq 6192(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -28880,13 +29259,13 @@ GL_PREFIX(ColorFragmentOp2ATI):
popq %rdx
popq %rsi
popq %rdi
- movq 6112(%rax), %r11
+ movq 6192(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 6112(%rax), %r11
+ movq 6192(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -28904,7 +29283,7 @@ GL_PREFIX(ColorFragmentOp2ATI):
popq %rdx
popq %rsi
popq %rdi
- movq 6112(%rax), %r11
+ movq 6192(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(ColorFragmentOp2ATI), .-GL_PREFIX(ColorFragmentOp2ATI)
@@ -28915,7 +29294,7 @@ GL_PREFIX(ColorFragmentOp2ATI):
GL_PREFIX(ColorFragmentOp3ATI):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 6120(%rax), %r11
+ movq 6200(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -28933,13 +29312,13 @@ GL_PREFIX(ColorFragmentOp3ATI):
popq %rdx
popq %rsi
popq %rdi
- movq 6120(%rax), %r11
+ movq 6200(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 6120(%rax), %r11
+ movq 6200(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -28957,7 +29336,7 @@ GL_PREFIX(ColorFragmentOp3ATI):
popq %rdx
popq %rsi
popq %rdi
- movq 6120(%rax), %r11
+ movq 6200(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(ColorFragmentOp3ATI), .-GL_PREFIX(ColorFragmentOp3ATI)
@@ -28968,25 +29347,25 @@ GL_PREFIX(ColorFragmentOp3ATI):
GL_PREFIX(DeleteFragmentShaderATI):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 6128(%rax), %r11
+ movq 6208(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
call _x86_64_get_dispatch@PLT
popq %rdi
- movq 6128(%rax), %r11
+ movq 6208(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 6128(%rax), %r11
+ movq 6208(%rax), %r11
jmp *%r11
1:
pushq %rdi
call _glapi_get_dispatch
popq %rdi
- movq 6128(%rax), %r11
+ movq 6208(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(DeleteFragmentShaderATI), .-GL_PREFIX(DeleteFragmentShaderATI)
@@ -28997,25 +29376,25 @@ GL_PREFIX(DeleteFragmentShaderATI):
GL_PREFIX(EndFragmentShaderATI):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 6136(%rax), %r11
+ movq 6216(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rbp
call _x86_64_get_dispatch@PLT
popq %rbp
- movq 6136(%rax), %r11
+ movq 6216(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 6136(%rax), %r11
+ movq 6216(%rax), %r11
jmp *%r11
1:
pushq %rbp
call _glapi_get_dispatch
popq %rbp
- movq 6136(%rax), %r11
+ movq 6216(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(EndFragmentShaderATI), .-GL_PREFIX(EndFragmentShaderATI)
@@ -29026,25 +29405,25 @@ GL_PREFIX(EndFragmentShaderATI):
GL_PREFIX(GenFragmentShadersATI):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 6144(%rax), %r11
+ movq 6224(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
call _x86_64_get_dispatch@PLT
popq %rdi
- movq 6144(%rax), %r11
+ movq 6224(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 6144(%rax), %r11
+ movq 6224(%rax), %r11
jmp *%r11
1:
pushq %rdi
call _glapi_get_dispatch
popq %rdi
- movq 6144(%rax), %r11
+ movq 6224(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(GenFragmentShadersATI), .-GL_PREFIX(GenFragmentShadersATI)
@@ -29055,7 +29434,7 @@ GL_PREFIX(GenFragmentShadersATI):
GL_PREFIX(PassTexCoordATI):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 6152(%rax), %r11
+ movq 6232(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -29065,13 +29444,13 @@ GL_PREFIX(PassTexCoordATI):
popq %rdx
popq %rsi
popq %rdi
- movq 6152(%rax), %r11
+ movq 6232(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 6152(%rax), %r11
+ movq 6232(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -29081,7 +29460,7 @@ GL_PREFIX(PassTexCoordATI):
popq %rdx
popq %rsi
popq %rdi
- movq 6152(%rax), %r11
+ movq 6232(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(PassTexCoordATI), .-GL_PREFIX(PassTexCoordATI)
@@ -29092,7 +29471,7 @@ GL_PREFIX(PassTexCoordATI):
GL_PREFIX(SampleMapATI):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 6160(%rax), %r11
+ movq 6240(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -29102,13 +29481,13 @@ GL_PREFIX(SampleMapATI):
popq %rdx
popq %rsi
popq %rdi
- movq 6160(%rax), %r11
+ movq 6240(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 6160(%rax), %r11
+ movq 6240(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -29118,7 +29497,7 @@ GL_PREFIX(SampleMapATI):
popq %rdx
popq %rsi
popq %rdi
- movq 6160(%rax), %r11
+ movq 6240(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(SampleMapATI), .-GL_PREFIX(SampleMapATI)
@@ -29129,7 +29508,7 @@ GL_PREFIX(SampleMapATI):
GL_PREFIX(SetFragmentShaderConstantATI):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 6168(%rax), %r11
+ movq 6248(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -29139,13 +29518,13 @@ GL_PREFIX(SetFragmentShaderConstantATI):
popq %rbp
popq %rsi
popq %rdi
- movq 6168(%rax), %r11
+ movq 6248(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 6168(%rax), %r11
+ movq 6248(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -29155,7 +29534,7 @@ GL_PREFIX(SetFragmentShaderConstantATI):
popq %rbp
popq %rsi
popq %rdi
- movq 6168(%rax), %r11
+ movq 6248(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(SetFragmentShaderConstantATI), .-GL_PREFIX(SetFragmentShaderConstantATI)
@@ -29166,7 +29545,7 @@ GL_PREFIX(SetFragmentShaderConstantATI):
GL_PREFIX(PointParameteriNV):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 6176(%rax), %r11
+ movq 6256(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -29176,13 +29555,13 @@ GL_PREFIX(PointParameteriNV):
popq %rbp
popq %rsi
popq %rdi
- movq 6176(%rax), %r11
+ movq 6256(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 6176(%rax), %r11
+ movq 6256(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -29192,7 +29571,7 @@ GL_PREFIX(PointParameteriNV):
popq %rbp
popq %rsi
popq %rdi
- movq 6176(%rax), %r11
+ movq 6256(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(PointParameteriNV), .-GL_PREFIX(PointParameteriNV)
@@ -29203,7 +29582,7 @@ GL_PREFIX(PointParameteriNV):
GL_PREFIX(PointParameterivNV):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 6184(%rax), %r11
+ movq 6264(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -29213,13 +29592,13 @@ GL_PREFIX(PointParameterivNV):
popq %rbp
popq %rsi
popq %rdi
- movq 6184(%rax), %r11
+ movq 6264(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 6184(%rax), %r11
+ movq 6264(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -29229,79 +29608,79 @@ GL_PREFIX(PointParameterivNV):
popq %rbp
popq %rsi
popq %rdi
- movq 6184(%rax), %r11
+ movq 6264(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(PointParameterivNV), .-GL_PREFIX(PointParameterivNV)
.p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_774)
- .type GL_PREFIX(_dispatch_stub_774), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_774))
-GL_PREFIX(_dispatch_stub_774):
+ .globl GL_PREFIX(_dispatch_stub_784)
+ .type GL_PREFIX(_dispatch_stub_784), @function
+ HIDDEN(GL_PREFIX(_dispatch_stub_784))
+GL_PREFIX(_dispatch_stub_784):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 6192(%rax), %r11
+ movq 6272(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
call _x86_64_get_dispatch@PLT
popq %rdi
- movq 6192(%rax), %r11
+ movq 6272(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 6192(%rax), %r11
+ movq 6272(%rax), %r11
jmp *%r11
1:
pushq %rdi
call _glapi_get_dispatch
popq %rdi
- movq 6192(%rax), %r11
+ movq 6272(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_774), .-GL_PREFIX(_dispatch_stub_774)
+ .size GL_PREFIX(_dispatch_stub_784), .-GL_PREFIX(_dispatch_stub_784)
.p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_775)
- .type GL_PREFIX(_dispatch_stub_775), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_775))
-GL_PREFIX(_dispatch_stub_775):
+ .globl GL_PREFIX(_dispatch_stub_785)
+ .type GL_PREFIX(_dispatch_stub_785), @function
+ HIDDEN(GL_PREFIX(_dispatch_stub_785))
+GL_PREFIX(_dispatch_stub_785):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 6200(%rax), %r11
+ movq 6280(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
call _x86_64_get_dispatch@PLT
popq %rdi
- movq 6200(%rax), %r11
+ movq 6280(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 6200(%rax), %r11
+ movq 6280(%rax), %r11
jmp *%r11
1:
pushq %rdi
call _glapi_get_dispatch
popq %rdi
- movq 6200(%rax), %r11
+ movq 6280(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_775), .-GL_PREFIX(_dispatch_stub_775)
+ .size GL_PREFIX(_dispatch_stub_785), .-GL_PREFIX(_dispatch_stub_785)
.p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_776)
- .type GL_PREFIX(_dispatch_stub_776), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_776))
-GL_PREFIX(_dispatch_stub_776):
+ .globl GL_PREFIX(_dispatch_stub_786)
+ .type GL_PREFIX(_dispatch_stub_786), @function
+ HIDDEN(GL_PREFIX(_dispatch_stub_786))
+GL_PREFIX(_dispatch_stub_786):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 6208(%rax), %r11
+ movq 6288(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -29311,13 +29690,13 @@ GL_PREFIX(_dispatch_stub_776):
popq %rbp
popq %rsi
popq %rdi
- movq 6208(%rax), %r11
+ movq 6288(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 6208(%rax), %r11
+ movq 6288(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -29327,19 +29706,19 @@ GL_PREFIX(_dispatch_stub_776):
popq %rbp
popq %rsi
popq %rdi
- movq 6208(%rax), %r11
+ movq 6288(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_776), .-GL_PREFIX(_dispatch_stub_776)
+ .size GL_PREFIX(_dispatch_stub_786), .-GL_PREFIX(_dispatch_stub_786)
.p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_777)
- .type GL_PREFIX(_dispatch_stub_777), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_777))
-GL_PREFIX(_dispatch_stub_777):
+ .globl GL_PREFIX(_dispatch_stub_787)
+ .type GL_PREFIX(_dispatch_stub_787), @function
+ HIDDEN(GL_PREFIX(_dispatch_stub_787))
+GL_PREFIX(_dispatch_stub_787):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 6216(%rax), %r11
+ movq 6296(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -29349,13 +29728,13 @@ GL_PREFIX(_dispatch_stub_777):
popq %rbp
popq %rsi
popq %rdi
- movq 6216(%rax), %r11
+ movq 6296(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 6216(%rax), %r11
+ movq 6296(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -29365,40 +29744,40 @@ GL_PREFIX(_dispatch_stub_777):
popq %rbp
popq %rsi
popq %rdi
- movq 6216(%rax), %r11
+ movq 6296(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_777), .-GL_PREFIX(_dispatch_stub_777)
+ .size GL_PREFIX(_dispatch_stub_787), .-GL_PREFIX(_dispatch_stub_787)
.p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_778)
- .type GL_PREFIX(_dispatch_stub_778), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_778))
-GL_PREFIX(_dispatch_stub_778):
+ .globl GL_PREFIX(_dispatch_stub_788)
+ .type GL_PREFIX(_dispatch_stub_788), @function
+ HIDDEN(GL_PREFIX(_dispatch_stub_788))
+GL_PREFIX(_dispatch_stub_788):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 6224(%rax), %r11
+ movq 6304(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
call _x86_64_get_dispatch@PLT
popq %rdi
- movq 6224(%rax), %r11
+ movq 6304(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 6224(%rax), %r11
+ movq 6304(%rax), %r11
jmp *%r11
1:
pushq %rdi
call _glapi_get_dispatch
popq %rdi
- movq 6224(%rax), %r11
+ movq 6304(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_778), .-GL_PREFIX(_dispatch_stub_778)
+ .size GL_PREFIX(_dispatch_stub_788), .-GL_PREFIX(_dispatch_stub_788)
.p2align 4,,15
.globl GL_PREFIX(GetProgramNamedParameterdvNV)
@@ -29406,7 +29785,7 @@ GL_PREFIX(_dispatch_stub_778):
GL_PREFIX(GetProgramNamedParameterdvNV):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 6232(%rax), %r11
+ movq 6312(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -29420,13 +29799,13 @@ GL_PREFIX(GetProgramNamedParameterdvNV):
popq %rdx
popq %rsi
popq %rdi
- movq 6232(%rax), %r11
+ movq 6312(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 6232(%rax), %r11
+ movq 6312(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -29440,7 +29819,7 @@ GL_PREFIX(GetProgramNamedParameterdvNV):
popq %rdx
popq %rsi
popq %rdi
- movq 6232(%rax), %r11
+ movq 6312(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(GetProgramNamedParameterdvNV), .-GL_PREFIX(GetProgramNamedParameterdvNV)
@@ -29451,7 +29830,7 @@ GL_PREFIX(GetProgramNamedParameterdvNV):
GL_PREFIX(GetProgramNamedParameterfvNV):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 6240(%rax), %r11
+ movq 6320(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -29465,13 +29844,13 @@ GL_PREFIX(GetProgramNamedParameterfvNV):
popq %rdx
popq %rsi
popq %rdi
- movq 6240(%rax), %r11
+ movq 6320(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 6240(%rax), %r11
+ movq 6320(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -29485,7 +29864,7 @@ GL_PREFIX(GetProgramNamedParameterfvNV):
popq %rdx
popq %rsi
popq %rdi
- movq 6240(%rax), %r11
+ movq 6320(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(GetProgramNamedParameterfvNV), .-GL_PREFIX(GetProgramNamedParameterfvNV)
@@ -29496,7 +29875,7 @@ GL_PREFIX(GetProgramNamedParameterfvNV):
GL_PREFIX(ProgramNamedParameter4dNV):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 6248(%rax), %r11
+ movq 6328(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
subq $56, %rsp
@@ -29516,13 +29895,13 @@ GL_PREFIX(ProgramNamedParameter4dNV):
movq 8(%rsp), %rsi
movq (%rsp), %rdi
addq $56, %rsp
- movq 6248(%rax), %r11
+ movq 6328(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 6248(%rax), %r11
+ movq 6328(%rax), %r11
jmp *%r11
1:
subq $56, %rsp
@@ -29542,7 +29921,7 @@ GL_PREFIX(ProgramNamedParameter4dNV):
movq 8(%rsp), %rsi
movq (%rsp), %rdi
addq $56, %rsp
- movq 6248(%rax), %r11
+ movq 6328(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(ProgramNamedParameter4dNV), .-GL_PREFIX(ProgramNamedParameter4dNV)
@@ -29553,7 +29932,7 @@ GL_PREFIX(ProgramNamedParameter4dNV):
GL_PREFIX(ProgramNamedParameter4dvNV):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 6256(%rax), %r11
+ movq 6336(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -29567,13 +29946,13 @@ GL_PREFIX(ProgramNamedParameter4dvNV):
popq %rdx
popq %rsi
popq %rdi
- movq 6256(%rax), %r11
+ movq 6336(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 6256(%rax), %r11
+ movq 6336(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -29587,7 +29966,7 @@ GL_PREFIX(ProgramNamedParameter4dvNV):
popq %rdx
popq %rsi
popq %rdi
- movq 6256(%rax), %r11
+ movq 6336(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(ProgramNamedParameter4dvNV), .-GL_PREFIX(ProgramNamedParameter4dvNV)
@@ -29598,7 +29977,7 @@ GL_PREFIX(ProgramNamedParameter4dvNV):
GL_PREFIX(ProgramNamedParameter4fNV):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 6264(%rax), %r11
+ movq 6344(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
subq $56, %rsp
@@ -29618,13 +29997,13 @@ GL_PREFIX(ProgramNamedParameter4fNV):
movq 8(%rsp), %rsi
movq (%rsp), %rdi
addq $56, %rsp
- movq 6264(%rax), %r11
+ movq 6344(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 6264(%rax), %r11
+ movq 6344(%rax), %r11
jmp *%r11
1:
subq $56, %rsp
@@ -29644,7 +30023,7 @@ GL_PREFIX(ProgramNamedParameter4fNV):
movq 8(%rsp), %rsi
movq (%rsp), %rdi
addq $56, %rsp
- movq 6264(%rax), %r11
+ movq 6344(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(ProgramNamedParameter4fNV), .-GL_PREFIX(ProgramNamedParameter4fNV)
@@ -29655,7 +30034,7 @@ GL_PREFIX(ProgramNamedParameter4fNV):
GL_PREFIX(ProgramNamedParameter4fvNV):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 6272(%rax), %r11
+ movq 6352(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -29669,13 +30048,13 @@ GL_PREFIX(ProgramNamedParameter4fvNV):
popq %rdx
popq %rsi
popq %rdi
- movq 6272(%rax), %r11
+ movq 6352(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 6272(%rax), %r11
+ movq 6352(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -29689,7 +30068,7 @@ GL_PREFIX(ProgramNamedParameter4fvNV):
popq %rdx
popq %rsi
popq %rdi
- movq 6272(%rax), %r11
+ movq 6352(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(ProgramNamedParameter4fvNV), .-GL_PREFIX(ProgramNamedParameter4fvNV)
@@ -29700,25 +30079,25 @@ GL_PREFIX(ProgramNamedParameter4fvNV):
GL_PREFIX(PrimitiveRestartIndexNV):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 6280(%rax), %r11
+ movq 6360(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
call _x86_64_get_dispatch@PLT
popq %rdi
- movq 6280(%rax), %r11
+ movq 6360(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 6280(%rax), %r11
+ movq 6360(%rax), %r11
jmp *%r11
1:
pushq %rdi
call _glapi_get_dispatch
popq %rdi
- movq 6280(%rax), %r11
+ movq 6360(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(PrimitiveRestartIndexNV), .-GL_PREFIX(PrimitiveRestartIndexNV)
@@ -29729,37 +30108,37 @@ GL_PREFIX(PrimitiveRestartIndexNV):
GL_PREFIX(PrimitiveRestartNV):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 6288(%rax), %r11
+ movq 6368(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rbp
call _x86_64_get_dispatch@PLT
popq %rbp
- movq 6288(%rax), %r11
+ movq 6368(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 6288(%rax), %r11
+ movq 6368(%rax), %r11
jmp *%r11
1:
pushq %rbp
call _glapi_get_dispatch
popq %rbp
- movq 6288(%rax), %r11
+ movq 6368(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(PrimitiveRestartNV), .-GL_PREFIX(PrimitiveRestartNV)
.p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_787)
- .type GL_PREFIX(_dispatch_stub_787), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_787))
-GL_PREFIX(_dispatch_stub_787):
+ .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 6296(%rax), %r11
+ movq 6376(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -29769,13 +30148,13 @@ GL_PREFIX(_dispatch_stub_787):
popq %rbp
popq %rsi
popq %rdi
- movq 6296(%rax), %r11
+ movq 6376(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 6296(%rax), %r11
+ movq 6376(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -29785,19 +30164,19 @@ GL_PREFIX(_dispatch_stub_787):
popq %rbp
popq %rsi
popq %rdi
- movq 6296(%rax), %r11
+ movq 6376(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_787), .-GL_PREFIX(_dispatch_stub_787)
+ .size GL_PREFIX(_dispatch_stub_797), .-GL_PREFIX(_dispatch_stub_797)
.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(_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 6304(%rax), %r11
+ movq 6384(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -29807,13 +30186,13 @@ GL_PREFIX(_dispatch_stub_788):
popq %rbp
popq %rsi
popq %rdi
- movq 6304(%rax), %r11
+ movq 6384(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 6304(%rax), %r11
+ movq 6384(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -29823,10 +30202,10 @@ GL_PREFIX(_dispatch_stub_788):
popq %rbp
popq %rsi
popq %rdi
- movq 6304(%rax), %r11
+ movq 6384(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_788), .-GL_PREFIX(_dispatch_stub_788)
+ .size GL_PREFIX(_dispatch_stub_798), .-GL_PREFIX(_dispatch_stub_798)
.p2align 4,,15
.globl GL_PREFIX(BindFramebufferEXT)
@@ -29834,7 +30213,7 @@ GL_PREFIX(_dispatch_stub_788):
GL_PREFIX(BindFramebufferEXT):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 6312(%rax), %r11
+ movq 6392(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -29844,13 +30223,13 @@ GL_PREFIX(BindFramebufferEXT):
popq %rbp
popq %rsi
popq %rdi
- movq 6312(%rax), %r11
+ movq 6392(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 6312(%rax), %r11
+ movq 6392(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -29860,7 +30239,7 @@ GL_PREFIX(BindFramebufferEXT):
popq %rbp
popq %rsi
popq %rdi
- movq 6312(%rax), %r11
+ movq 6392(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(BindFramebufferEXT), .-GL_PREFIX(BindFramebufferEXT)
@@ -29871,7 +30250,7 @@ GL_PREFIX(BindFramebufferEXT):
GL_PREFIX(BindRenderbufferEXT):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 6320(%rax), %r11
+ movq 6400(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -29881,13 +30260,13 @@ GL_PREFIX(BindRenderbufferEXT):
popq %rbp
popq %rsi
popq %rdi
- movq 6320(%rax), %r11
+ movq 6400(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 6320(%rax), %r11
+ movq 6400(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -29897,7 +30276,7 @@ GL_PREFIX(BindRenderbufferEXT):
popq %rbp
popq %rsi
popq %rdi
- movq 6320(%rax), %r11
+ movq 6400(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(BindRenderbufferEXT), .-GL_PREFIX(BindRenderbufferEXT)
@@ -29908,25 +30287,25 @@ GL_PREFIX(BindRenderbufferEXT):
GL_PREFIX(CheckFramebufferStatusEXT):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 6328(%rax), %r11
+ movq 6408(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
call _x86_64_get_dispatch@PLT
popq %rdi
- movq 6328(%rax), %r11
+ movq 6408(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 6328(%rax), %r11
+ movq 6408(%rax), %r11
jmp *%r11
1:
pushq %rdi
call _glapi_get_dispatch
popq %rdi
- movq 6328(%rax), %r11
+ movq 6408(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(CheckFramebufferStatusEXT), .-GL_PREFIX(CheckFramebufferStatusEXT)
@@ -29937,7 +30316,7 @@ GL_PREFIX(CheckFramebufferStatusEXT):
GL_PREFIX(DeleteFramebuffersEXT):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 6336(%rax), %r11
+ movq 6416(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -29947,13 +30326,13 @@ GL_PREFIX(DeleteFramebuffersEXT):
popq %rbp
popq %rsi
popq %rdi
- movq 6336(%rax), %r11
+ movq 6416(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 6336(%rax), %r11
+ movq 6416(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -29963,7 +30342,7 @@ GL_PREFIX(DeleteFramebuffersEXT):
popq %rbp
popq %rsi
popq %rdi
- movq 6336(%rax), %r11
+ movq 6416(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(DeleteFramebuffersEXT), .-GL_PREFIX(DeleteFramebuffersEXT)
@@ -29974,7 +30353,7 @@ GL_PREFIX(DeleteFramebuffersEXT):
GL_PREFIX(DeleteRenderbuffersEXT):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 6344(%rax), %r11
+ movq 6424(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -29984,13 +30363,13 @@ GL_PREFIX(DeleteRenderbuffersEXT):
popq %rbp
popq %rsi
popq %rdi
- movq 6344(%rax), %r11
+ movq 6424(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 6344(%rax), %r11
+ movq 6424(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -30000,7 +30379,7 @@ GL_PREFIX(DeleteRenderbuffersEXT):
popq %rbp
popq %rsi
popq %rdi
- movq 6344(%rax), %r11
+ movq 6424(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(DeleteRenderbuffersEXT), .-GL_PREFIX(DeleteRenderbuffersEXT)
@@ -30011,7 +30390,7 @@ GL_PREFIX(DeleteRenderbuffersEXT):
GL_PREFIX(FramebufferRenderbufferEXT):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 6352(%rax), %r11
+ movq 6432(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -30025,13 +30404,13 @@ GL_PREFIX(FramebufferRenderbufferEXT):
popq %rdx
popq %rsi
popq %rdi
- movq 6352(%rax), %r11
+ movq 6432(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 6352(%rax), %r11
+ movq 6432(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -30045,7 +30424,7 @@ GL_PREFIX(FramebufferRenderbufferEXT):
popq %rdx
popq %rsi
popq %rdi
- movq 6352(%rax), %r11
+ movq 6432(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(FramebufferRenderbufferEXT), .-GL_PREFIX(FramebufferRenderbufferEXT)
@@ -30056,7 +30435,7 @@ GL_PREFIX(FramebufferRenderbufferEXT):
GL_PREFIX(FramebufferTexture1DEXT):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 6360(%rax), %r11
+ movq 6440(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -30070,13 +30449,13 @@ GL_PREFIX(FramebufferTexture1DEXT):
popq %rdx
popq %rsi
popq %rdi
- movq 6360(%rax), %r11
+ movq 6440(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 6360(%rax), %r11
+ movq 6440(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -30090,7 +30469,7 @@ GL_PREFIX(FramebufferTexture1DEXT):
popq %rdx
popq %rsi
popq %rdi
- movq 6360(%rax), %r11
+ movq 6440(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(FramebufferTexture1DEXT), .-GL_PREFIX(FramebufferTexture1DEXT)
@@ -30101,7 +30480,7 @@ GL_PREFIX(FramebufferTexture1DEXT):
GL_PREFIX(FramebufferTexture2DEXT):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 6368(%rax), %r11
+ movq 6448(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -30115,13 +30494,13 @@ GL_PREFIX(FramebufferTexture2DEXT):
popq %rdx
popq %rsi
popq %rdi
- movq 6368(%rax), %r11
+ movq 6448(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 6368(%rax), %r11
+ movq 6448(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -30135,7 +30514,7 @@ GL_PREFIX(FramebufferTexture2DEXT):
popq %rdx
popq %rsi
popq %rdi
- movq 6368(%rax), %r11
+ movq 6448(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(FramebufferTexture2DEXT), .-GL_PREFIX(FramebufferTexture2DEXT)
@@ -30146,7 +30525,7 @@ GL_PREFIX(FramebufferTexture2DEXT):
GL_PREFIX(FramebufferTexture3DEXT):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 6376(%rax), %r11
+ movq 6456(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -30164,13 +30543,13 @@ GL_PREFIX(FramebufferTexture3DEXT):
popq %rdx
popq %rsi
popq %rdi
- movq 6376(%rax), %r11
+ movq 6456(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 6376(%rax), %r11
+ movq 6456(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -30188,7 +30567,7 @@ GL_PREFIX(FramebufferTexture3DEXT):
popq %rdx
popq %rsi
popq %rdi
- movq 6376(%rax), %r11
+ movq 6456(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(FramebufferTexture3DEXT), .-GL_PREFIX(FramebufferTexture3DEXT)
@@ -30199,7 +30578,7 @@ GL_PREFIX(FramebufferTexture3DEXT):
GL_PREFIX(GenFramebuffersEXT):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 6384(%rax), %r11
+ movq 6464(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -30209,13 +30588,13 @@ GL_PREFIX(GenFramebuffersEXT):
popq %rbp
popq %rsi
popq %rdi
- movq 6384(%rax), %r11
+ movq 6464(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 6384(%rax), %r11
+ movq 6464(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -30225,7 +30604,7 @@ GL_PREFIX(GenFramebuffersEXT):
popq %rbp
popq %rsi
popq %rdi
- movq 6384(%rax), %r11
+ movq 6464(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(GenFramebuffersEXT), .-GL_PREFIX(GenFramebuffersEXT)
@@ -30236,7 +30615,7 @@ GL_PREFIX(GenFramebuffersEXT):
GL_PREFIX(GenRenderbuffersEXT):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 6392(%rax), %r11
+ movq 6472(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -30246,13 +30625,13 @@ GL_PREFIX(GenRenderbuffersEXT):
popq %rbp
popq %rsi
popq %rdi
- movq 6392(%rax), %r11
+ movq 6472(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 6392(%rax), %r11
+ movq 6472(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -30262,7 +30641,7 @@ GL_PREFIX(GenRenderbuffersEXT):
popq %rbp
popq %rsi
popq %rdi
- movq 6392(%rax), %r11
+ movq 6472(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(GenRenderbuffersEXT), .-GL_PREFIX(GenRenderbuffersEXT)
@@ -30273,25 +30652,25 @@ GL_PREFIX(GenRenderbuffersEXT):
GL_PREFIX(GenerateMipmapEXT):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 6400(%rax), %r11
+ movq 6480(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
call _x86_64_get_dispatch@PLT
popq %rdi
- movq 6400(%rax), %r11
+ movq 6480(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 6400(%rax), %r11
+ movq 6480(%rax), %r11
jmp *%r11
1:
pushq %rdi
call _glapi_get_dispatch
popq %rdi
- movq 6400(%rax), %r11
+ movq 6480(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(GenerateMipmapEXT), .-GL_PREFIX(GenerateMipmapEXT)
@@ -30302,7 +30681,7 @@ GL_PREFIX(GenerateMipmapEXT):
GL_PREFIX(GetFramebufferAttachmentParameterivEXT):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 6408(%rax), %r11
+ movq 6488(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -30316,13 +30695,13 @@ GL_PREFIX(GetFramebufferAttachmentParameterivEXT):
popq %rdx
popq %rsi
popq %rdi
- movq 6408(%rax), %r11
+ movq 6488(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 6408(%rax), %r11
+ movq 6488(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -30336,7 +30715,7 @@ GL_PREFIX(GetFramebufferAttachmentParameterivEXT):
popq %rdx
popq %rsi
popq %rdi
- movq 6408(%rax), %r11
+ movq 6488(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(GetFramebufferAttachmentParameterivEXT), .-GL_PREFIX(GetFramebufferAttachmentParameterivEXT)
@@ -30347,7 +30726,7 @@ GL_PREFIX(GetFramebufferAttachmentParameterivEXT):
GL_PREFIX(GetRenderbufferParameterivEXT):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 6416(%rax), %r11
+ movq 6496(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -30357,13 +30736,13 @@ GL_PREFIX(GetRenderbufferParameterivEXT):
popq %rdx
popq %rsi
popq %rdi
- movq 6416(%rax), %r11
+ movq 6496(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 6416(%rax), %r11
+ movq 6496(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -30373,7 +30752,7 @@ GL_PREFIX(GetRenderbufferParameterivEXT):
popq %rdx
popq %rsi
popq %rdi
- movq 6416(%rax), %r11
+ movq 6496(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(GetRenderbufferParameterivEXT), .-GL_PREFIX(GetRenderbufferParameterivEXT)
@@ -30384,25 +30763,25 @@ GL_PREFIX(GetRenderbufferParameterivEXT):
GL_PREFIX(IsFramebufferEXT):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 6424(%rax), %r11
+ movq 6504(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
call _x86_64_get_dispatch@PLT
popq %rdi
- movq 6424(%rax), %r11
+ movq 6504(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 6424(%rax), %r11
+ movq 6504(%rax), %r11
jmp *%r11
1:
pushq %rdi
call _glapi_get_dispatch
popq %rdi
- movq 6424(%rax), %r11
+ movq 6504(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(IsFramebufferEXT), .-GL_PREFIX(IsFramebufferEXT)
@@ -30413,25 +30792,25 @@ GL_PREFIX(IsFramebufferEXT):
GL_PREFIX(IsRenderbufferEXT):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 6432(%rax), %r11
+ movq 6512(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
call _x86_64_get_dispatch@PLT
popq %rdi
- movq 6432(%rax), %r11
+ movq 6512(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 6432(%rax), %r11
+ movq 6512(%rax), %r11
jmp *%r11
1:
pushq %rdi
call _glapi_get_dispatch
popq %rdi
- movq 6432(%rax), %r11
+ movq 6512(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(IsRenderbufferEXT), .-GL_PREFIX(IsRenderbufferEXT)
@@ -30442,7 +30821,7 @@ GL_PREFIX(IsRenderbufferEXT):
GL_PREFIX(RenderbufferStorageEXT):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 6440(%rax), %r11
+ movq 6520(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -30456,13 +30835,13 @@ GL_PREFIX(RenderbufferStorageEXT):
popq %rdx
popq %rsi
popq %rdi
- movq 6440(%rax), %r11
+ movq 6520(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 6440(%rax), %r11
+ movq 6520(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -30476,19 +30855,19 @@ GL_PREFIX(RenderbufferStorageEXT):
popq %rdx
popq %rsi
popq %rdi
- movq 6440(%rax), %r11
+ movq 6520(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(RenderbufferStorageEXT), .-GL_PREFIX(RenderbufferStorageEXT)
.p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_806)
- .type GL_PREFIX(_dispatch_stub_806), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_806))
-GL_PREFIX(_dispatch_stub_806):
+ .globl GL_PREFIX(_dispatch_stub_816)
+ .type GL_PREFIX(_dispatch_stub_816), @function
+ HIDDEN(GL_PREFIX(_dispatch_stub_816))
+GL_PREFIX(_dispatch_stub_816):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 6448(%rax), %r11
+ movq 6528(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -30506,13 +30885,13 @@ GL_PREFIX(_dispatch_stub_806):
popq %rdx
popq %rsi
popq %rdi
- movq 6448(%rax), %r11
+ movq 6528(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 6448(%rax), %r11
+ movq 6528(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -30530,19 +30909,19 @@ GL_PREFIX(_dispatch_stub_806):
popq %rdx
popq %rsi
popq %rdi
- movq 6448(%rax), %r11
+ movq 6528(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_806), .-GL_PREFIX(_dispatch_stub_806)
+ .size GL_PREFIX(_dispatch_stub_816), .-GL_PREFIX(_dispatch_stub_816)
.p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_807)
- .type GL_PREFIX(_dispatch_stub_807), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_807))
-GL_PREFIX(_dispatch_stub_807):
+ .globl GL_PREFIX(_dispatch_stub_817)
+ .type GL_PREFIX(_dispatch_stub_817), @function
+ HIDDEN(GL_PREFIX(_dispatch_stub_817))
+GL_PREFIX(_dispatch_stub_817):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 6456(%rax), %r11
+ movq 6536(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -30552,13 +30931,13 @@ GL_PREFIX(_dispatch_stub_807):
popq %rdx
popq %rsi
popq %rdi
- movq 6456(%rax), %r11
+ movq 6536(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 6456(%rax), %r11
+ movq 6536(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -30568,19 +30947,19 @@ GL_PREFIX(_dispatch_stub_807):
popq %rdx
popq %rsi
popq %rdi
- movq 6456(%rax), %r11
+ movq 6536(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_807), .-GL_PREFIX(_dispatch_stub_807)
+ .size GL_PREFIX(_dispatch_stub_817), .-GL_PREFIX(_dispatch_stub_817)
.p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_808)
- .type GL_PREFIX(_dispatch_stub_808), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_808))
-GL_PREFIX(_dispatch_stub_808):
+ .globl GL_PREFIX(_dispatch_stub_818)
+ .type GL_PREFIX(_dispatch_stub_818), @function
+ HIDDEN(GL_PREFIX(_dispatch_stub_818))
+GL_PREFIX(_dispatch_stub_818):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 6464(%rax), %r11
+ movq 6544(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -30590,13 +30969,13 @@ GL_PREFIX(_dispatch_stub_808):
popq %rdx
popq %rsi
popq %rdi
- movq 6464(%rax), %r11
+ movq 6544(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 6464(%rax), %r11
+ movq 6544(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -30606,10 +30985,10 @@ GL_PREFIX(_dispatch_stub_808):
popq %rdx
popq %rsi
popq %rdi
- movq 6464(%rax), %r11
+ movq 6544(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_808), .-GL_PREFIX(_dispatch_stub_808)
+ .size GL_PREFIX(_dispatch_stub_818), .-GL_PREFIX(_dispatch_stub_818)
.p2align 4,,15
.globl GL_PREFIX(BindFragDataLocationEXT)
@@ -30617,7 +30996,7 @@ GL_PREFIX(_dispatch_stub_808):
GL_PREFIX(BindFragDataLocationEXT):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 6472(%rax), %r11
+ movq 6552(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -30627,13 +31006,13 @@ GL_PREFIX(BindFragDataLocationEXT):
popq %rdx
popq %rsi
popq %rdi
- movq 6472(%rax), %r11
+ movq 6552(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 6472(%rax), %r11
+ movq 6552(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -30643,7 +31022,7 @@ GL_PREFIX(BindFragDataLocationEXT):
popq %rdx
popq %rsi
popq %rdi
- movq 6472(%rax), %r11
+ movq 6552(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(BindFragDataLocationEXT), .-GL_PREFIX(BindFragDataLocationEXT)
@@ -30654,7 +31033,7 @@ GL_PREFIX(BindFragDataLocationEXT):
GL_PREFIX(GetFragDataLocationEXT):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 6480(%rax), %r11
+ movq 6560(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -30664,13 +31043,13 @@ GL_PREFIX(GetFragDataLocationEXT):
popq %rbp
popq %rsi
popq %rdi
- movq 6480(%rax), %r11
+ movq 6560(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 6480(%rax), %r11
+ movq 6560(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -30680,7 +31059,7 @@ GL_PREFIX(GetFragDataLocationEXT):
popq %rbp
popq %rsi
popq %rdi
- movq 6480(%rax), %r11
+ movq 6560(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(GetFragDataLocationEXT), .-GL_PREFIX(GetFragDataLocationEXT)
@@ -30691,7 +31070,7 @@ GL_PREFIX(GetFragDataLocationEXT):
GL_PREFIX(GetUniformuivEXT):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 6488(%rax), %r11
+ movq 6568(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -30701,13 +31080,13 @@ GL_PREFIX(GetUniformuivEXT):
popq %rdx
popq %rsi
popq %rdi
- movq 6488(%rax), %r11
+ movq 6568(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 6488(%rax), %r11
+ movq 6568(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -30717,7 +31096,7 @@ GL_PREFIX(GetUniformuivEXT):
popq %rdx
popq %rsi
popq %rdi
- movq 6488(%rax), %r11
+ movq 6568(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(GetUniformuivEXT), .-GL_PREFIX(GetUniformuivEXT)
@@ -30728,7 +31107,7 @@ GL_PREFIX(GetUniformuivEXT):
GL_PREFIX(GetVertexAttribIivEXT):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 6496(%rax), %r11
+ movq 6576(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -30738,13 +31117,13 @@ GL_PREFIX(GetVertexAttribIivEXT):
popq %rdx
popq %rsi
popq %rdi
- movq 6496(%rax), %r11
+ movq 6576(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 6496(%rax), %r11
+ movq 6576(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -30754,7 +31133,7 @@ GL_PREFIX(GetVertexAttribIivEXT):
popq %rdx
popq %rsi
popq %rdi
- movq 6496(%rax), %r11
+ movq 6576(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(GetVertexAttribIivEXT), .-GL_PREFIX(GetVertexAttribIivEXT)
@@ -30765,7 +31144,7 @@ GL_PREFIX(GetVertexAttribIivEXT):
GL_PREFIX(GetVertexAttribIuivEXT):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 6504(%rax), %r11
+ movq 6584(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -30775,13 +31154,13 @@ GL_PREFIX(GetVertexAttribIuivEXT):
popq %rdx
popq %rsi
popq %rdi
- movq 6504(%rax), %r11
+ movq 6584(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 6504(%rax), %r11
+ movq 6584(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -30791,7 +31170,7 @@ GL_PREFIX(GetVertexAttribIuivEXT):
popq %rdx
popq %rsi
popq %rdi
- movq 6504(%rax), %r11
+ movq 6584(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(GetVertexAttribIuivEXT), .-GL_PREFIX(GetVertexAttribIuivEXT)
@@ -30802,7 +31181,7 @@ GL_PREFIX(GetVertexAttribIuivEXT):
GL_PREFIX(Uniform1uiEXT):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 6512(%rax), %r11
+ movq 6592(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -30812,13 +31191,13 @@ GL_PREFIX(Uniform1uiEXT):
popq %rbp
popq %rsi
popq %rdi
- movq 6512(%rax), %r11
+ movq 6592(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 6512(%rax), %r11
+ movq 6592(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -30828,7 +31207,7 @@ GL_PREFIX(Uniform1uiEXT):
popq %rbp
popq %rsi
popq %rdi
- movq 6512(%rax), %r11
+ movq 6592(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(Uniform1uiEXT), .-GL_PREFIX(Uniform1uiEXT)
@@ -30839,7 +31218,7 @@ GL_PREFIX(Uniform1uiEXT):
GL_PREFIX(Uniform1uivEXT):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 6520(%rax), %r11
+ movq 6600(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -30849,13 +31228,13 @@ GL_PREFIX(Uniform1uivEXT):
popq %rdx
popq %rsi
popq %rdi
- movq 6520(%rax), %r11
+ movq 6600(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 6520(%rax), %r11
+ movq 6600(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -30865,7 +31244,7 @@ GL_PREFIX(Uniform1uivEXT):
popq %rdx
popq %rsi
popq %rdi
- movq 6520(%rax), %r11
+ movq 6600(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(Uniform1uivEXT), .-GL_PREFIX(Uniform1uivEXT)
@@ -30876,7 +31255,7 @@ GL_PREFIX(Uniform1uivEXT):
GL_PREFIX(Uniform2uiEXT):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 6528(%rax), %r11
+ movq 6608(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -30886,13 +31265,13 @@ GL_PREFIX(Uniform2uiEXT):
popq %rdx
popq %rsi
popq %rdi
- movq 6528(%rax), %r11
+ movq 6608(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 6528(%rax), %r11
+ movq 6608(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -30902,7 +31281,7 @@ GL_PREFIX(Uniform2uiEXT):
popq %rdx
popq %rsi
popq %rdi
- movq 6528(%rax), %r11
+ movq 6608(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(Uniform2uiEXT), .-GL_PREFIX(Uniform2uiEXT)
@@ -30913,7 +31292,7 @@ GL_PREFIX(Uniform2uiEXT):
GL_PREFIX(Uniform2uivEXT):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 6536(%rax), %r11
+ movq 6616(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -30923,13 +31302,13 @@ GL_PREFIX(Uniform2uivEXT):
popq %rdx
popq %rsi
popq %rdi
- movq 6536(%rax), %r11
+ movq 6616(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 6536(%rax), %r11
+ movq 6616(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -30939,7 +31318,7 @@ GL_PREFIX(Uniform2uivEXT):
popq %rdx
popq %rsi
popq %rdi
- movq 6536(%rax), %r11
+ movq 6616(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(Uniform2uivEXT), .-GL_PREFIX(Uniform2uivEXT)
@@ -30950,7 +31329,7 @@ GL_PREFIX(Uniform2uivEXT):
GL_PREFIX(Uniform3uiEXT):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 6544(%rax), %r11
+ movq 6624(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -30964,13 +31343,13 @@ GL_PREFIX(Uniform3uiEXT):
popq %rdx
popq %rsi
popq %rdi
- movq 6544(%rax), %r11
+ movq 6624(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 6544(%rax), %r11
+ movq 6624(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -30984,7 +31363,7 @@ GL_PREFIX(Uniform3uiEXT):
popq %rdx
popq %rsi
popq %rdi
- movq 6544(%rax), %r11
+ movq 6624(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(Uniform3uiEXT), .-GL_PREFIX(Uniform3uiEXT)
@@ -30995,7 +31374,7 @@ GL_PREFIX(Uniform3uiEXT):
GL_PREFIX(Uniform3uivEXT):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 6552(%rax), %r11
+ movq 6632(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -31005,13 +31384,13 @@ GL_PREFIX(Uniform3uivEXT):
popq %rdx
popq %rsi
popq %rdi
- movq 6552(%rax), %r11
+ movq 6632(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 6552(%rax), %r11
+ movq 6632(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -31021,7 +31400,7 @@ GL_PREFIX(Uniform3uivEXT):
popq %rdx
popq %rsi
popq %rdi
- movq 6552(%rax), %r11
+ movq 6632(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(Uniform3uivEXT), .-GL_PREFIX(Uniform3uivEXT)
@@ -31032,7 +31411,7 @@ GL_PREFIX(Uniform3uivEXT):
GL_PREFIX(Uniform4uiEXT):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 6560(%rax), %r11
+ movq 6640(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -31046,13 +31425,13 @@ GL_PREFIX(Uniform4uiEXT):
popq %rdx
popq %rsi
popq %rdi
- movq 6560(%rax), %r11
+ movq 6640(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 6560(%rax), %r11
+ movq 6640(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -31066,7 +31445,7 @@ GL_PREFIX(Uniform4uiEXT):
popq %rdx
popq %rsi
popq %rdi
- movq 6560(%rax), %r11
+ movq 6640(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(Uniform4uiEXT), .-GL_PREFIX(Uniform4uiEXT)
@@ -31077,7 +31456,7 @@ GL_PREFIX(Uniform4uiEXT):
GL_PREFIX(Uniform4uivEXT):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 6568(%rax), %r11
+ movq 6648(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -31087,13 +31466,13 @@ GL_PREFIX(Uniform4uivEXT):
popq %rdx
popq %rsi
popq %rdi
- movq 6568(%rax), %r11
+ movq 6648(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 6568(%rax), %r11
+ movq 6648(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -31103,7 +31482,7 @@ GL_PREFIX(Uniform4uivEXT):
popq %rdx
popq %rsi
popq %rdi
- movq 6568(%rax), %r11
+ movq 6648(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(Uniform4uivEXT), .-GL_PREFIX(Uniform4uivEXT)
@@ -31114,7 +31493,7 @@ GL_PREFIX(Uniform4uivEXT):
GL_PREFIX(VertexAttribI1iEXT):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 6576(%rax), %r11
+ movq 6656(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -31124,13 +31503,13 @@ GL_PREFIX(VertexAttribI1iEXT):
popq %rbp
popq %rsi
popq %rdi
- movq 6576(%rax), %r11
+ movq 6656(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 6576(%rax), %r11
+ movq 6656(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -31140,7 +31519,7 @@ GL_PREFIX(VertexAttribI1iEXT):
popq %rbp
popq %rsi
popq %rdi
- movq 6576(%rax), %r11
+ movq 6656(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(VertexAttribI1iEXT), .-GL_PREFIX(VertexAttribI1iEXT)
@@ -31151,7 +31530,7 @@ GL_PREFIX(VertexAttribI1iEXT):
GL_PREFIX(VertexAttribI1ivEXT):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 6584(%rax), %r11
+ movq 6664(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -31161,13 +31540,13 @@ GL_PREFIX(VertexAttribI1ivEXT):
popq %rbp
popq %rsi
popq %rdi
- movq 6584(%rax), %r11
+ movq 6664(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 6584(%rax), %r11
+ movq 6664(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -31177,7 +31556,7 @@ GL_PREFIX(VertexAttribI1ivEXT):
popq %rbp
popq %rsi
popq %rdi
- movq 6584(%rax), %r11
+ movq 6664(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(VertexAttribI1ivEXT), .-GL_PREFIX(VertexAttribI1ivEXT)
@@ -31188,7 +31567,7 @@ GL_PREFIX(VertexAttribI1ivEXT):
GL_PREFIX(VertexAttribI1uiEXT):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 6592(%rax), %r11
+ movq 6672(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -31198,13 +31577,13 @@ GL_PREFIX(VertexAttribI1uiEXT):
popq %rbp
popq %rsi
popq %rdi
- movq 6592(%rax), %r11
+ movq 6672(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 6592(%rax), %r11
+ movq 6672(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -31214,7 +31593,7 @@ GL_PREFIX(VertexAttribI1uiEXT):
popq %rbp
popq %rsi
popq %rdi
- movq 6592(%rax), %r11
+ movq 6672(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(VertexAttribI1uiEXT), .-GL_PREFIX(VertexAttribI1uiEXT)
@@ -31225,7 +31604,7 @@ GL_PREFIX(VertexAttribI1uiEXT):
GL_PREFIX(VertexAttribI1uivEXT):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 6600(%rax), %r11
+ movq 6680(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -31235,13 +31614,13 @@ GL_PREFIX(VertexAttribI1uivEXT):
popq %rbp
popq %rsi
popq %rdi
- movq 6600(%rax), %r11
+ movq 6680(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 6600(%rax), %r11
+ movq 6680(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -31251,7 +31630,7 @@ GL_PREFIX(VertexAttribI1uivEXT):
popq %rbp
popq %rsi
popq %rdi
- movq 6600(%rax), %r11
+ movq 6680(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(VertexAttribI1uivEXT), .-GL_PREFIX(VertexAttribI1uivEXT)
@@ -31262,7 +31641,7 @@ GL_PREFIX(VertexAttribI1uivEXT):
GL_PREFIX(VertexAttribI2iEXT):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 6608(%rax), %r11
+ movq 6688(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -31272,13 +31651,13 @@ GL_PREFIX(VertexAttribI2iEXT):
popq %rdx
popq %rsi
popq %rdi
- movq 6608(%rax), %r11
+ movq 6688(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 6608(%rax), %r11
+ movq 6688(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -31288,7 +31667,7 @@ GL_PREFIX(VertexAttribI2iEXT):
popq %rdx
popq %rsi
popq %rdi
- movq 6608(%rax), %r11
+ movq 6688(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(VertexAttribI2iEXT), .-GL_PREFIX(VertexAttribI2iEXT)
@@ -31299,7 +31678,7 @@ GL_PREFIX(VertexAttribI2iEXT):
GL_PREFIX(VertexAttribI2ivEXT):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 6616(%rax), %r11
+ movq 6696(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -31309,13 +31688,13 @@ GL_PREFIX(VertexAttribI2ivEXT):
popq %rbp
popq %rsi
popq %rdi
- movq 6616(%rax), %r11
+ movq 6696(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 6616(%rax), %r11
+ movq 6696(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -31325,7 +31704,7 @@ GL_PREFIX(VertexAttribI2ivEXT):
popq %rbp
popq %rsi
popq %rdi
- movq 6616(%rax), %r11
+ movq 6696(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(VertexAttribI2ivEXT), .-GL_PREFIX(VertexAttribI2ivEXT)
@@ -31336,7 +31715,7 @@ GL_PREFIX(VertexAttribI2ivEXT):
GL_PREFIX(VertexAttribI2uiEXT):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 6624(%rax), %r11
+ movq 6704(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -31346,13 +31725,13 @@ GL_PREFIX(VertexAttribI2uiEXT):
popq %rdx
popq %rsi
popq %rdi
- movq 6624(%rax), %r11
+ movq 6704(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 6624(%rax), %r11
+ movq 6704(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -31362,7 +31741,7 @@ GL_PREFIX(VertexAttribI2uiEXT):
popq %rdx
popq %rsi
popq %rdi
- movq 6624(%rax), %r11
+ movq 6704(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(VertexAttribI2uiEXT), .-GL_PREFIX(VertexAttribI2uiEXT)
@@ -31373,7 +31752,7 @@ GL_PREFIX(VertexAttribI2uiEXT):
GL_PREFIX(VertexAttribI2uivEXT):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 6632(%rax), %r11
+ movq 6712(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -31383,13 +31762,13 @@ GL_PREFIX(VertexAttribI2uivEXT):
popq %rbp
popq %rsi
popq %rdi
- movq 6632(%rax), %r11
+ movq 6712(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 6632(%rax), %r11
+ movq 6712(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -31399,7 +31778,7 @@ GL_PREFIX(VertexAttribI2uivEXT):
popq %rbp
popq %rsi
popq %rdi
- movq 6632(%rax), %r11
+ movq 6712(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(VertexAttribI2uivEXT), .-GL_PREFIX(VertexAttribI2uivEXT)
@@ -31410,7 +31789,7 @@ GL_PREFIX(VertexAttribI2uivEXT):
GL_PREFIX(VertexAttribI3iEXT):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 6640(%rax), %r11
+ movq 6720(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -31424,13 +31803,13 @@ GL_PREFIX(VertexAttribI3iEXT):
popq %rdx
popq %rsi
popq %rdi
- movq 6640(%rax), %r11
+ movq 6720(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 6640(%rax), %r11
+ movq 6720(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -31444,7 +31823,7 @@ GL_PREFIX(VertexAttribI3iEXT):
popq %rdx
popq %rsi
popq %rdi
- movq 6640(%rax), %r11
+ movq 6720(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(VertexAttribI3iEXT), .-GL_PREFIX(VertexAttribI3iEXT)
@@ -31455,7 +31834,7 @@ GL_PREFIX(VertexAttribI3iEXT):
GL_PREFIX(VertexAttribI3ivEXT):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 6648(%rax), %r11
+ movq 6728(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -31465,13 +31844,13 @@ GL_PREFIX(VertexAttribI3ivEXT):
popq %rbp
popq %rsi
popq %rdi
- movq 6648(%rax), %r11
+ movq 6728(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 6648(%rax), %r11
+ movq 6728(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -31481,7 +31860,7 @@ GL_PREFIX(VertexAttribI3ivEXT):
popq %rbp
popq %rsi
popq %rdi
- movq 6648(%rax), %r11
+ movq 6728(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(VertexAttribI3ivEXT), .-GL_PREFIX(VertexAttribI3ivEXT)
@@ -31492,7 +31871,7 @@ GL_PREFIX(VertexAttribI3ivEXT):
GL_PREFIX(VertexAttribI3uiEXT):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 6656(%rax), %r11
+ movq 6736(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -31506,13 +31885,13 @@ GL_PREFIX(VertexAttribI3uiEXT):
popq %rdx
popq %rsi
popq %rdi
- movq 6656(%rax), %r11
+ movq 6736(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 6656(%rax), %r11
+ movq 6736(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -31526,7 +31905,7 @@ GL_PREFIX(VertexAttribI3uiEXT):
popq %rdx
popq %rsi
popq %rdi
- movq 6656(%rax), %r11
+ movq 6736(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(VertexAttribI3uiEXT), .-GL_PREFIX(VertexAttribI3uiEXT)
@@ -31537,7 +31916,7 @@ GL_PREFIX(VertexAttribI3uiEXT):
GL_PREFIX(VertexAttribI3uivEXT):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 6664(%rax), %r11
+ movq 6744(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -31547,13 +31926,13 @@ GL_PREFIX(VertexAttribI3uivEXT):
popq %rbp
popq %rsi
popq %rdi
- movq 6664(%rax), %r11
+ movq 6744(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 6664(%rax), %r11
+ movq 6744(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -31563,7 +31942,7 @@ GL_PREFIX(VertexAttribI3uivEXT):
popq %rbp
popq %rsi
popq %rdi
- movq 6664(%rax), %r11
+ movq 6744(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(VertexAttribI3uivEXT), .-GL_PREFIX(VertexAttribI3uivEXT)
@@ -31574,7 +31953,7 @@ GL_PREFIX(VertexAttribI3uivEXT):
GL_PREFIX(VertexAttribI4bvEXT):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 6672(%rax), %r11
+ movq 6752(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -31584,13 +31963,13 @@ GL_PREFIX(VertexAttribI4bvEXT):
popq %rbp
popq %rsi
popq %rdi
- movq 6672(%rax), %r11
+ movq 6752(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 6672(%rax), %r11
+ movq 6752(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -31600,7 +31979,7 @@ GL_PREFIX(VertexAttribI4bvEXT):
popq %rbp
popq %rsi
popq %rdi
- movq 6672(%rax), %r11
+ movq 6752(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(VertexAttribI4bvEXT), .-GL_PREFIX(VertexAttribI4bvEXT)
@@ -31611,7 +31990,7 @@ GL_PREFIX(VertexAttribI4bvEXT):
GL_PREFIX(VertexAttribI4iEXT):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 6680(%rax), %r11
+ movq 6760(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -31625,13 +32004,13 @@ GL_PREFIX(VertexAttribI4iEXT):
popq %rdx
popq %rsi
popq %rdi
- movq 6680(%rax), %r11
+ movq 6760(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 6680(%rax), %r11
+ movq 6760(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -31645,7 +32024,7 @@ GL_PREFIX(VertexAttribI4iEXT):
popq %rdx
popq %rsi
popq %rdi
- movq 6680(%rax), %r11
+ movq 6760(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(VertexAttribI4iEXT), .-GL_PREFIX(VertexAttribI4iEXT)
@@ -31656,7 +32035,7 @@ GL_PREFIX(VertexAttribI4iEXT):
GL_PREFIX(VertexAttribI4ivEXT):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 6688(%rax), %r11
+ movq 6768(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -31666,13 +32045,13 @@ GL_PREFIX(VertexAttribI4ivEXT):
popq %rbp
popq %rsi
popq %rdi
- movq 6688(%rax), %r11
+ movq 6768(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 6688(%rax), %r11
+ movq 6768(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -31682,7 +32061,7 @@ GL_PREFIX(VertexAttribI4ivEXT):
popq %rbp
popq %rsi
popq %rdi
- movq 6688(%rax), %r11
+ movq 6768(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(VertexAttribI4ivEXT), .-GL_PREFIX(VertexAttribI4ivEXT)
@@ -31693,7 +32072,7 @@ GL_PREFIX(VertexAttribI4ivEXT):
GL_PREFIX(VertexAttribI4svEXT):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 6696(%rax), %r11
+ movq 6776(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -31703,13 +32082,13 @@ GL_PREFIX(VertexAttribI4svEXT):
popq %rbp
popq %rsi
popq %rdi
- movq 6696(%rax), %r11
+ movq 6776(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 6696(%rax), %r11
+ movq 6776(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -31719,7 +32098,7 @@ GL_PREFIX(VertexAttribI4svEXT):
popq %rbp
popq %rsi
popq %rdi
- movq 6696(%rax), %r11
+ movq 6776(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(VertexAttribI4svEXT), .-GL_PREFIX(VertexAttribI4svEXT)
@@ -31730,7 +32109,7 @@ GL_PREFIX(VertexAttribI4svEXT):
GL_PREFIX(VertexAttribI4ubvEXT):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 6704(%rax), %r11
+ movq 6784(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -31740,13 +32119,13 @@ GL_PREFIX(VertexAttribI4ubvEXT):
popq %rbp
popq %rsi
popq %rdi
- movq 6704(%rax), %r11
+ movq 6784(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 6704(%rax), %r11
+ movq 6784(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -31756,7 +32135,7 @@ GL_PREFIX(VertexAttribI4ubvEXT):
popq %rbp
popq %rsi
popq %rdi
- movq 6704(%rax), %r11
+ movq 6784(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(VertexAttribI4ubvEXT), .-GL_PREFIX(VertexAttribI4ubvEXT)
@@ -31767,7 +32146,7 @@ GL_PREFIX(VertexAttribI4ubvEXT):
GL_PREFIX(VertexAttribI4uiEXT):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 6712(%rax), %r11
+ movq 6792(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -31781,13 +32160,13 @@ GL_PREFIX(VertexAttribI4uiEXT):
popq %rdx
popq %rsi
popq %rdi
- movq 6712(%rax), %r11
+ movq 6792(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 6712(%rax), %r11
+ movq 6792(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -31801,7 +32180,7 @@ GL_PREFIX(VertexAttribI4uiEXT):
popq %rdx
popq %rsi
popq %rdi
- movq 6712(%rax), %r11
+ movq 6792(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(VertexAttribI4uiEXT), .-GL_PREFIX(VertexAttribI4uiEXT)
@@ -31812,7 +32191,7 @@ GL_PREFIX(VertexAttribI4uiEXT):
GL_PREFIX(VertexAttribI4uivEXT):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 6720(%rax), %r11
+ movq 6800(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -31822,13 +32201,13 @@ GL_PREFIX(VertexAttribI4uivEXT):
popq %rbp
popq %rsi
popq %rdi
- movq 6720(%rax), %r11
+ movq 6800(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 6720(%rax), %r11
+ movq 6800(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -31838,7 +32217,7 @@ GL_PREFIX(VertexAttribI4uivEXT):
popq %rbp
popq %rsi
popq %rdi
- movq 6720(%rax), %r11
+ movq 6800(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(VertexAttribI4uivEXT), .-GL_PREFIX(VertexAttribI4uivEXT)
@@ -31849,7 +32228,7 @@ GL_PREFIX(VertexAttribI4uivEXT):
GL_PREFIX(VertexAttribI4usvEXT):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 6728(%rax), %r11
+ movq 6808(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -31859,13 +32238,13 @@ GL_PREFIX(VertexAttribI4usvEXT):
popq %rbp
popq %rsi
popq %rdi
- movq 6728(%rax), %r11
+ movq 6808(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 6728(%rax), %r11
+ movq 6808(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -31875,7 +32254,7 @@ GL_PREFIX(VertexAttribI4usvEXT):
popq %rbp
popq %rsi
popq %rdi
- movq 6728(%rax), %r11
+ movq 6808(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(VertexAttribI4usvEXT), .-GL_PREFIX(VertexAttribI4usvEXT)
@@ -31886,7 +32265,7 @@ GL_PREFIX(VertexAttribI4usvEXT):
GL_PREFIX(VertexAttribIPointerEXT):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 6736(%rax), %r11
+ movq 6816(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -31900,13 +32279,13 @@ GL_PREFIX(VertexAttribIPointerEXT):
popq %rdx
popq %rsi
popq %rdi
- movq 6736(%rax), %r11
+ movq 6816(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 6736(%rax), %r11
+ movq 6816(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -31920,7 +32299,7 @@ GL_PREFIX(VertexAttribIPointerEXT):
popq %rdx
popq %rsi
popq %rdi
- movq 6736(%rax), %r11
+ movq 6816(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(VertexAttribIPointerEXT), .-GL_PREFIX(VertexAttribIPointerEXT)
@@ -31931,7 +32310,7 @@ GL_PREFIX(VertexAttribIPointerEXT):
GL_PREFIX(FramebufferTextureLayerEXT):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 6744(%rax), %r11
+ movq 6824(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -31945,13 +32324,13 @@ GL_PREFIX(FramebufferTextureLayerEXT):
popq %rdx
popq %rsi
popq %rdi
- movq 6744(%rax), %r11
+ movq 6824(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 6744(%rax), %r11
+ movq 6824(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -31965,7 +32344,7 @@ GL_PREFIX(FramebufferTextureLayerEXT):
popq %rdx
popq %rsi
popq %rdi
- movq 6744(%rax), %r11
+ movq 6824(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(FramebufferTextureLayerEXT), .-GL_PREFIX(FramebufferTextureLayerEXT)
@@ -31976,7 +32355,7 @@ GL_PREFIX(FramebufferTextureLayerEXT):
GL_PREFIX(ColorMaskIndexedEXT):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 6752(%rax), %r11
+ movq 6832(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -31990,13 +32369,13 @@ GL_PREFIX(ColorMaskIndexedEXT):
popq %rdx
popq %rsi
popq %rdi
- movq 6752(%rax), %r11
+ movq 6832(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 6752(%rax), %r11
+ movq 6832(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -32010,7 +32389,7 @@ GL_PREFIX(ColorMaskIndexedEXT):
popq %rdx
popq %rsi
popq %rdi
- movq 6752(%rax), %r11
+ movq 6832(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(ColorMaskIndexedEXT), .-GL_PREFIX(ColorMaskIndexedEXT)
@@ -32021,7 +32400,7 @@ GL_PREFIX(ColorMaskIndexedEXT):
GL_PREFIX(DisableIndexedEXT):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 6760(%rax), %r11
+ movq 6840(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -32031,13 +32410,13 @@ GL_PREFIX(DisableIndexedEXT):
popq %rbp
popq %rsi
popq %rdi
- movq 6760(%rax), %r11
+ movq 6840(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 6760(%rax), %r11
+ movq 6840(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -32047,7 +32426,7 @@ GL_PREFIX(DisableIndexedEXT):
popq %rbp
popq %rsi
popq %rdi
- movq 6760(%rax), %r11
+ movq 6840(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(DisableIndexedEXT), .-GL_PREFIX(DisableIndexedEXT)
@@ -32058,7 +32437,7 @@ GL_PREFIX(DisableIndexedEXT):
GL_PREFIX(EnableIndexedEXT):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 6768(%rax), %r11
+ movq 6848(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -32068,13 +32447,13 @@ GL_PREFIX(EnableIndexedEXT):
popq %rbp
popq %rsi
popq %rdi
- movq 6768(%rax), %r11
+ movq 6848(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 6768(%rax), %r11
+ movq 6848(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -32084,7 +32463,7 @@ GL_PREFIX(EnableIndexedEXT):
popq %rbp
popq %rsi
popq %rdi
- movq 6768(%rax), %r11
+ movq 6848(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(EnableIndexedEXT), .-GL_PREFIX(EnableIndexedEXT)
@@ -32095,7 +32474,7 @@ GL_PREFIX(EnableIndexedEXT):
GL_PREFIX(GetBooleanIndexedvEXT):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 6776(%rax), %r11
+ movq 6856(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -32105,13 +32484,13 @@ GL_PREFIX(GetBooleanIndexedvEXT):
popq %rdx
popq %rsi
popq %rdi
- movq 6776(%rax), %r11
+ movq 6856(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 6776(%rax), %r11
+ movq 6856(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -32121,7 +32500,7 @@ GL_PREFIX(GetBooleanIndexedvEXT):
popq %rdx
popq %rsi
popq %rdi
- movq 6776(%rax), %r11
+ movq 6856(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(GetBooleanIndexedvEXT), .-GL_PREFIX(GetBooleanIndexedvEXT)
@@ -32132,7 +32511,7 @@ GL_PREFIX(GetBooleanIndexedvEXT):
GL_PREFIX(GetIntegerIndexedvEXT):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 6784(%rax), %r11
+ movq 6864(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -32142,13 +32521,13 @@ GL_PREFIX(GetIntegerIndexedvEXT):
popq %rdx
popq %rsi
popq %rdi
- movq 6784(%rax), %r11
+ movq 6864(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 6784(%rax), %r11
+ movq 6864(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -32158,7 +32537,7 @@ GL_PREFIX(GetIntegerIndexedvEXT):
popq %rdx
popq %rsi
popq %rdi
- movq 6784(%rax), %r11
+ movq 6864(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(GetIntegerIndexedvEXT), .-GL_PREFIX(GetIntegerIndexedvEXT)
@@ -32169,7 +32548,7 @@ GL_PREFIX(GetIntegerIndexedvEXT):
GL_PREFIX(IsEnabledIndexedEXT):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 6792(%rax), %r11
+ movq 6872(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -32179,13 +32558,13 @@ GL_PREFIX(IsEnabledIndexedEXT):
popq %rbp
popq %rsi
popq %rdi
- movq 6792(%rax), %r11
+ movq 6872(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 6792(%rax), %r11
+ movq 6872(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -32195,7 +32574,7 @@ GL_PREFIX(IsEnabledIndexedEXT):
popq %rbp
popq %rsi
popq %rdi
- movq 6792(%rax), %r11
+ movq 6872(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(IsEnabledIndexedEXT), .-GL_PREFIX(IsEnabledIndexedEXT)
@@ -32206,7 +32585,7 @@ GL_PREFIX(IsEnabledIndexedEXT):
GL_PREFIX(ClearColorIiEXT):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 6800(%rax), %r11
+ movq 6880(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -32220,13 +32599,13 @@ GL_PREFIX(ClearColorIiEXT):
popq %rdx
popq %rsi
popq %rdi
- movq 6800(%rax), %r11
+ movq 6880(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 6800(%rax), %r11
+ movq 6880(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -32240,7 +32619,7 @@ GL_PREFIX(ClearColorIiEXT):
popq %rdx
popq %rsi
popq %rdi
- movq 6800(%rax), %r11
+ movq 6880(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(ClearColorIiEXT), .-GL_PREFIX(ClearColorIiEXT)
@@ -32251,7 +32630,7 @@ GL_PREFIX(ClearColorIiEXT):
GL_PREFIX(ClearColorIuiEXT):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 6808(%rax), %r11
+ movq 6888(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -32265,13 +32644,13 @@ GL_PREFIX(ClearColorIuiEXT):
popq %rdx
popq %rsi
popq %rdi
- movq 6808(%rax), %r11
+ movq 6888(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 6808(%rax), %r11
+ movq 6888(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -32285,7 +32664,7 @@ GL_PREFIX(ClearColorIuiEXT):
popq %rdx
popq %rsi
popq %rdi
- movq 6808(%rax), %r11
+ movq 6888(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(ClearColorIuiEXT), .-GL_PREFIX(ClearColorIuiEXT)
@@ -32296,7 +32675,7 @@ GL_PREFIX(ClearColorIuiEXT):
GL_PREFIX(GetTexParameterIivEXT):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 6816(%rax), %r11
+ movq 6896(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -32306,13 +32685,13 @@ GL_PREFIX(GetTexParameterIivEXT):
popq %rdx
popq %rsi
popq %rdi
- movq 6816(%rax), %r11
+ movq 6896(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 6816(%rax), %r11
+ movq 6896(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -32322,7 +32701,7 @@ GL_PREFIX(GetTexParameterIivEXT):
popq %rdx
popq %rsi
popq %rdi
- movq 6816(%rax), %r11
+ movq 6896(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(GetTexParameterIivEXT), .-GL_PREFIX(GetTexParameterIivEXT)
@@ -32333,7 +32712,7 @@ GL_PREFIX(GetTexParameterIivEXT):
GL_PREFIX(GetTexParameterIuivEXT):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 6824(%rax), %r11
+ movq 6904(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -32343,13 +32722,13 @@ GL_PREFIX(GetTexParameterIuivEXT):
popq %rdx
popq %rsi
popq %rdi
- movq 6824(%rax), %r11
+ movq 6904(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 6824(%rax), %r11
+ movq 6904(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -32359,7 +32738,7 @@ GL_PREFIX(GetTexParameterIuivEXT):
popq %rdx
popq %rsi
popq %rdi
- movq 6824(%rax), %r11
+ movq 6904(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(GetTexParameterIuivEXT), .-GL_PREFIX(GetTexParameterIuivEXT)
@@ -32370,7 +32749,7 @@ GL_PREFIX(GetTexParameterIuivEXT):
GL_PREFIX(TexParameterIivEXT):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 6832(%rax), %r11
+ movq 6912(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -32380,13 +32759,13 @@ GL_PREFIX(TexParameterIivEXT):
popq %rdx
popq %rsi
popq %rdi
- movq 6832(%rax), %r11
+ movq 6912(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 6832(%rax), %r11
+ movq 6912(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -32396,7 +32775,7 @@ GL_PREFIX(TexParameterIivEXT):
popq %rdx
popq %rsi
popq %rdi
- movq 6832(%rax), %r11
+ movq 6912(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(TexParameterIivEXT), .-GL_PREFIX(TexParameterIivEXT)
@@ -32407,7 +32786,7 @@ GL_PREFIX(TexParameterIivEXT):
GL_PREFIX(TexParameterIuivEXT):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 6840(%rax), %r11
+ movq 6920(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -32417,13 +32796,13 @@ GL_PREFIX(TexParameterIuivEXT):
popq %rdx
popq %rsi
popq %rdi
- movq 6840(%rax), %r11
+ movq 6920(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 6840(%rax), %r11
+ movq 6920(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -32433,7 +32812,7 @@ GL_PREFIX(TexParameterIuivEXT):
popq %rdx
popq %rsi
popq %rdi
- movq 6840(%rax), %r11
+ movq 6920(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(TexParameterIuivEXT), .-GL_PREFIX(TexParameterIuivEXT)
@@ -32444,7 +32823,7 @@ GL_PREFIX(TexParameterIuivEXT):
GL_PREFIX(BeginConditionalRenderNV):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 6848(%rax), %r11
+ movq 6928(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -32454,13 +32833,13 @@ GL_PREFIX(BeginConditionalRenderNV):
popq %rbp
popq %rsi
popq %rdi
- movq 6848(%rax), %r11
+ movq 6928(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 6848(%rax), %r11
+ movq 6928(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -32470,7 +32849,7 @@ GL_PREFIX(BeginConditionalRenderNV):
popq %rbp
popq %rsi
popq %rdi
- movq 6848(%rax), %r11
+ movq 6928(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(BeginConditionalRenderNV), .-GL_PREFIX(BeginConditionalRenderNV)
@@ -32481,25 +32860,25 @@ GL_PREFIX(BeginConditionalRenderNV):
GL_PREFIX(EndConditionalRenderNV):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 6856(%rax), %r11
+ movq 6936(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rbp
call _x86_64_get_dispatch@PLT
popq %rbp
- movq 6856(%rax), %r11
+ movq 6936(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 6856(%rax), %r11
+ movq 6936(%rax), %r11
jmp *%r11
1:
pushq %rbp
call _glapi_get_dispatch
popq %rbp
- movq 6856(%rax), %r11
+ movq 6936(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(EndConditionalRenderNV), .-GL_PREFIX(EndConditionalRenderNV)
@@ -32510,25 +32889,25 @@ GL_PREFIX(EndConditionalRenderNV):
GL_PREFIX(BeginTransformFeedbackEXT):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 6864(%rax), %r11
+ movq 6944(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
call _x86_64_get_dispatch@PLT
popq %rdi
- movq 6864(%rax), %r11
+ movq 6944(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 6864(%rax), %r11
+ movq 6944(%rax), %r11
jmp *%r11
1:
pushq %rdi
call _glapi_get_dispatch
popq %rdi
- movq 6864(%rax), %r11
+ movq 6944(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(BeginTransformFeedbackEXT), .-GL_PREFIX(BeginTransformFeedbackEXT)
@@ -32539,7 +32918,7 @@ GL_PREFIX(BeginTransformFeedbackEXT):
GL_PREFIX(BindBufferBaseEXT):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 6872(%rax), %r11
+ movq 6952(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -32549,13 +32928,13 @@ GL_PREFIX(BindBufferBaseEXT):
popq %rdx
popq %rsi
popq %rdi
- movq 6872(%rax), %r11
+ movq 6952(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 6872(%rax), %r11
+ movq 6952(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -32565,7 +32944,7 @@ GL_PREFIX(BindBufferBaseEXT):
popq %rdx
popq %rsi
popq %rdi
- movq 6872(%rax), %r11
+ movq 6952(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(BindBufferBaseEXT), .-GL_PREFIX(BindBufferBaseEXT)
@@ -32576,7 +32955,7 @@ GL_PREFIX(BindBufferBaseEXT):
GL_PREFIX(BindBufferOffsetEXT):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 6880(%rax), %r11
+ movq 6960(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -32590,13 +32969,13 @@ GL_PREFIX(BindBufferOffsetEXT):
popq %rdx
popq %rsi
popq %rdi
- movq 6880(%rax), %r11
+ movq 6960(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 6880(%rax), %r11
+ movq 6960(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -32610,7 +32989,7 @@ GL_PREFIX(BindBufferOffsetEXT):
popq %rdx
popq %rsi
popq %rdi
- movq 6880(%rax), %r11
+ movq 6960(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(BindBufferOffsetEXT), .-GL_PREFIX(BindBufferOffsetEXT)
@@ -32621,7 +33000,7 @@ GL_PREFIX(BindBufferOffsetEXT):
GL_PREFIX(BindBufferRangeEXT):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 6888(%rax), %r11
+ movq 6968(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -32635,13 +33014,13 @@ GL_PREFIX(BindBufferRangeEXT):
popq %rdx
popq %rsi
popq %rdi
- movq 6888(%rax), %r11
+ movq 6968(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 6888(%rax), %r11
+ movq 6968(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -32655,7 +33034,7 @@ GL_PREFIX(BindBufferRangeEXT):
popq %rdx
popq %rsi
popq %rdi
- movq 6888(%rax), %r11
+ movq 6968(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(BindBufferRangeEXT), .-GL_PREFIX(BindBufferRangeEXT)
@@ -32666,25 +33045,25 @@ GL_PREFIX(BindBufferRangeEXT):
GL_PREFIX(EndTransformFeedbackEXT):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 6896(%rax), %r11
+ movq 6976(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rbp
call _x86_64_get_dispatch@PLT
popq %rbp
- movq 6896(%rax), %r11
+ movq 6976(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 6896(%rax), %r11
+ movq 6976(%rax), %r11
jmp *%r11
1:
pushq %rbp
call _glapi_get_dispatch
popq %rbp
- movq 6896(%rax), %r11
+ movq 6976(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(EndTransformFeedbackEXT), .-GL_PREFIX(EndTransformFeedbackEXT)
@@ -32695,7 +33074,7 @@ GL_PREFIX(EndTransformFeedbackEXT):
GL_PREFIX(GetTransformFeedbackVaryingEXT):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 6904(%rax), %r11
+ movq 6984(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -32713,13 +33092,13 @@ GL_PREFIX(GetTransformFeedbackVaryingEXT):
popq %rdx
popq %rsi
popq %rdi
- movq 6904(%rax), %r11
+ movq 6984(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 6904(%rax), %r11
+ movq 6984(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -32737,7 +33116,7 @@ GL_PREFIX(GetTransformFeedbackVaryingEXT):
popq %rdx
popq %rsi
popq %rdi
- movq 6904(%rax), %r11
+ movq 6984(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(GetTransformFeedbackVaryingEXT), .-GL_PREFIX(GetTransformFeedbackVaryingEXT)
@@ -32748,7 +33127,7 @@ GL_PREFIX(GetTransformFeedbackVaryingEXT):
GL_PREFIX(TransformFeedbackVaryingsEXT):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 6912(%rax), %r11
+ movq 6992(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -32762,13 +33141,13 @@ GL_PREFIX(TransformFeedbackVaryingsEXT):
popq %rdx
popq %rsi
popq %rdi
- movq 6912(%rax), %r11
+ movq 6992(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 6912(%rax), %r11
+ movq 6992(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -32782,7 +33161,7 @@ GL_PREFIX(TransformFeedbackVaryingsEXT):
popq %rdx
popq %rsi
popq %rdi
- movq 6912(%rax), %r11
+ movq 6992(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(TransformFeedbackVaryingsEXT), .-GL_PREFIX(TransformFeedbackVaryingsEXT)
@@ -32793,37 +33172,37 @@ GL_PREFIX(TransformFeedbackVaryingsEXT):
GL_PREFIX(ProvokingVertexEXT):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 6920(%rax), %r11
+ movq 7000(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
call _x86_64_get_dispatch@PLT
popq %rdi
- movq 6920(%rax), %r11
+ movq 7000(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 6920(%rax), %r11
+ movq 7000(%rax), %r11
jmp *%r11
1:
pushq %rdi
call _glapi_get_dispatch
popq %rdi
- movq 6920(%rax), %r11
+ movq 7000(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(ProvokingVertexEXT), .-GL_PREFIX(ProvokingVertexEXT)
.p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_866)
- .type GL_PREFIX(_dispatch_stub_866), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_866))
-GL_PREFIX(_dispatch_stub_866):
+ .globl GL_PREFIX(_dispatch_stub_876)
+ .type GL_PREFIX(_dispatch_stub_876), @function
+ HIDDEN(GL_PREFIX(_dispatch_stub_876))
+GL_PREFIX(_dispatch_stub_876):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 6928(%rax), %r11
+ movq 7008(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -32833,13 +33212,13 @@ GL_PREFIX(_dispatch_stub_866):
popq %rdx
popq %rsi
popq %rdi
- movq 6928(%rax), %r11
+ movq 7008(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 6928(%rax), %r11
+ movq 7008(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -32849,19 +33228,19 @@ GL_PREFIX(_dispatch_stub_866):
popq %rdx
popq %rsi
popq %rdi
- movq 6928(%rax), %r11
+ movq 7008(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_866), .-GL_PREFIX(_dispatch_stub_866)
+ .size GL_PREFIX(_dispatch_stub_876), .-GL_PREFIX(_dispatch_stub_876)
.p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_867)
- .type GL_PREFIX(_dispatch_stub_867), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_867))
-GL_PREFIX(_dispatch_stub_867):
+ .globl GL_PREFIX(_dispatch_stub_877)
+ .type GL_PREFIX(_dispatch_stub_877), @function
+ HIDDEN(GL_PREFIX(_dispatch_stub_877))
+GL_PREFIX(_dispatch_stub_877):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 6936(%rax), %r11
+ movq 7016(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -32871,13 +33250,13 @@ GL_PREFIX(_dispatch_stub_867):
popq %rdx
popq %rsi
popq %rdi
- movq 6936(%rax), %r11
+ movq 7016(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 6936(%rax), %r11
+ movq 7016(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -32887,10 +33266,10 @@ GL_PREFIX(_dispatch_stub_867):
popq %rdx
popq %rsi
popq %rdi
- movq 6936(%rax), %r11
+ movq 7016(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_867), .-GL_PREFIX(_dispatch_stub_867)
+ .size GL_PREFIX(_dispatch_stub_877), .-GL_PREFIX(_dispatch_stub_877)
.p2align 4,,15
.globl GL_PREFIX(GetObjectParameterivAPPLE)
@@ -32898,7 +33277,7 @@ GL_PREFIX(_dispatch_stub_867):
GL_PREFIX(GetObjectParameterivAPPLE):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 6944(%rax), %r11
+ movq 7024(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -32912,13 +33291,13 @@ GL_PREFIX(GetObjectParameterivAPPLE):
popq %rdx
popq %rsi
popq %rdi
- movq 6944(%rax), %r11
+ movq 7024(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 6944(%rax), %r11
+ movq 7024(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -32932,7 +33311,7 @@ GL_PREFIX(GetObjectParameterivAPPLE):
popq %rdx
popq %rsi
popq %rdi
- movq 6944(%rax), %r11
+ movq 7024(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(GetObjectParameterivAPPLE), .-GL_PREFIX(GetObjectParameterivAPPLE)
@@ -32943,7 +33322,7 @@ GL_PREFIX(GetObjectParameterivAPPLE):
GL_PREFIX(ObjectPurgeableAPPLE):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 6952(%rax), %r11
+ movq 7032(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -32953,13 +33332,13 @@ GL_PREFIX(ObjectPurgeableAPPLE):
popq %rdx
popq %rsi
popq %rdi
- movq 6952(%rax), %r11
+ movq 7032(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 6952(%rax), %r11
+ movq 7032(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -32969,7 +33348,7 @@ GL_PREFIX(ObjectPurgeableAPPLE):
popq %rdx
popq %rsi
popq %rdi
- movq 6952(%rax), %r11
+ movq 7032(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(ObjectPurgeableAPPLE), .-GL_PREFIX(ObjectPurgeableAPPLE)
@@ -32980,7 +33359,7 @@ GL_PREFIX(ObjectPurgeableAPPLE):
GL_PREFIX(ObjectUnpurgeableAPPLE):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 6960(%rax), %r11
+ movq 7040(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -32990,13 +33369,13 @@ GL_PREFIX(ObjectUnpurgeableAPPLE):
popq %rdx
popq %rsi
popq %rdi
- movq 6960(%rax), %r11
+ movq 7040(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 6960(%rax), %r11
+ movq 7040(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -33006,7 +33385,7 @@ GL_PREFIX(ObjectUnpurgeableAPPLE):
popq %rdx
popq %rsi
popq %rdi
- movq 6960(%rax), %r11
+ movq 7040(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(ObjectUnpurgeableAPPLE), .-GL_PREFIX(ObjectUnpurgeableAPPLE)
@@ -33017,25 +33396,25 @@ GL_PREFIX(ObjectUnpurgeableAPPLE):
GL_PREFIX(ActiveProgramEXT):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 6968(%rax), %r11
+ movq 7048(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
call _x86_64_get_dispatch@PLT
popq %rdi
- movq 6968(%rax), %r11
+ movq 7048(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 6968(%rax), %r11
+ movq 7048(%rax), %r11
jmp *%r11
1:
pushq %rdi
call _glapi_get_dispatch
popq %rdi
- movq 6968(%rax), %r11
+ movq 7048(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(ActiveProgramEXT), .-GL_PREFIX(ActiveProgramEXT)
@@ -33046,7 +33425,7 @@ GL_PREFIX(ActiveProgramEXT):
GL_PREFIX(CreateShaderProgramEXT):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 6976(%rax), %r11
+ movq 7056(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -33056,13 +33435,13 @@ GL_PREFIX(CreateShaderProgramEXT):
popq %rbp
popq %rsi
popq %rdi
- movq 6976(%rax), %r11
+ movq 7056(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 6976(%rax), %r11
+ movq 7056(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -33072,7 +33451,7 @@ GL_PREFIX(CreateShaderProgramEXT):
popq %rbp
popq %rsi
popq %rdi
- movq 6976(%rax), %r11
+ movq 7056(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(CreateShaderProgramEXT), .-GL_PREFIX(CreateShaderProgramEXT)
@@ -33083,7 +33462,7 @@ GL_PREFIX(CreateShaderProgramEXT):
GL_PREFIX(UseShaderProgramEXT):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 6984(%rax), %r11
+ movq 7064(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -33093,13 +33472,13 @@ GL_PREFIX(UseShaderProgramEXT):
popq %rbp
popq %rsi
popq %rdi
- movq 6984(%rax), %r11
+ movq 7064(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 6984(%rax), %r11
+ movq 7064(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -33109,19 +33488,48 @@ GL_PREFIX(UseShaderProgramEXT):
popq %rbp
popq %rsi
popq %rdi
- movq 6984(%rax), %r11
+ movq 7064(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(UseShaderProgramEXT), .-GL_PREFIX(UseShaderProgramEXT)
.p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_874)
- .type GL_PREFIX(_dispatch_stub_874), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_874))
-GL_PREFIX(_dispatch_stub_874):
+ .globl GL_PREFIX(TextureBarrierNV)
+ .type GL_PREFIX(TextureBarrierNV), @function
+GL_PREFIX(TextureBarrierNV):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 6992(%rax), %r11
+ movq 7072(%rax), %r11
+ jmp *%r11
+#elif defined(PTHREADS)
+ pushq %rbp
+ call _x86_64_get_dispatch@PLT
+ popq %rbp
+ movq 7072(%rax), %r11
+ jmp *%r11
+#else
+ movq _glapi_Dispatch(%rip), %rax
+ testq %rax, %rax
+ je 1f
+ movq 7072(%rax), %r11
+ jmp *%r11
+1:
+ pushq %rbp
+ call _glapi_get_dispatch
+ popq %rbp
+ movq 7072(%rax), %r11
+ jmp *%r11
+#endif /* defined(GLX_USE_TLS) */
+ .size GL_PREFIX(TextureBarrierNV), .-GL_PREFIX(TextureBarrierNV)
+
+ .p2align 4,,15
+ .globl GL_PREFIX(_dispatch_stub_885)
+ .type GL_PREFIX(_dispatch_stub_885), @function
+ HIDDEN(GL_PREFIX(_dispatch_stub_885))
+GL_PREFIX(_dispatch_stub_885):
+#if defined(GLX_USE_TLS)
+ call _x86_64_get_dispatch@PLT
+ movq 7080(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -33135,13 +33543,13 @@ GL_PREFIX(_dispatch_stub_874):
popq %rdx
popq %rsi
popq %rdi
- movq 6992(%rax), %r11
+ movq 7080(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 6992(%rax), %r11
+ movq 7080(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -33155,19 +33563,19 @@ GL_PREFIX(_dispatch_stub_874):
popq %rdx
popq %rsi
popq %rdi
- movq 6992(%rax), %r11
+ movq 7080(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_874), .-GL_PREFIX(_dispatch_stub_874)
+ .size GL_PREFIX(_dispatch_stub_885), .-GL_PREFIX(_dispatch_stub_885)
.p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_875)
- .type GL_PREFIX(_dispatch_stub_875), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_875))
-GL_PREFIX(_dispatch_stub_875):
+ .globl GL_PREFIX(_dispatch_stub_886)
+ .type GL_PREFIX(_dispatch_stub_886), @function
+ HIDDEN(GL_PREFIX(_dispatch_stub_886))
+GL_PREFIX(_dispatch_stub_886):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 7000(%rax), %r11
+ movq 7088(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -33181,13 +33589,13 @@ GL_PREFIX(_dispatch_stub_875):
popq %rdx
popq %rsi
popq %rdi
- movq 7000(%rax), %r11
+ movq 7088(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 7000(%rax), %r11
+ movq 7088(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -33201,19 +33609,19 @@ GL_PREFIX(_dispatch_stub_875):
popq %rdx
popq %rsi
popq %rdi
- movq 7000(%rax), %r11
+ movq 7088(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_875), .-GL_PREFIX(_dispatch_stub_875)
+ .size GL_PREFIX(_dispatch_stub_886), .-GL_PREFIX(_dispatch_stub_886)
.p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_876)
- .type GL_PREFIX(_dispatch_stub_876), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_876))
-GL_PREFIX(_dispatch_stub_876):
+ .globl GL_PREFIX(_dispatch_stub_887)
+ .type GL_PREFIX(_dispatch_stub_887), @function
+ HIDDEN(GL_PREFIX(_dispatch_stub_887))
+GL_PREFIX(_dispatch_stub_887):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 7008(%rax), %r11
+ movq 7096(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -33227,13 +33635,13 @@ GL_PREFIX(_dispatch_stub_876):
popq %rdx
popq %rsi
popq %rdi
- movq 7008(%rax), %r11
+ movq 7096(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 7008(%rax), %r11
+ movq 7096(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -33247,19 +33655,19 @@ GL_PREFIX(_dispatch_stub_876):
popq %rdx
popq %rsi
popq %rdi
- movq 7008(%rax), %r11
+ movq 7096(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_876), .-GL_PREFIX(_dispatch_stub_876)
+ .size GL_PREFIX(_dispatch_stub_887), .-GL_PREFIX(_dispatch_stub_887)
.p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_877)
- .type GL_PREFIX(_dispatch_stub_877), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_877))
-GL_PREFIX(_dispatch_stub_877):
+ .globl GL_PREFIX(_dispatch_stub_888)
+ .type GL_PREFIX(_dispatch_stub_888), @function
+ HIDDEN(GL_PREFIX(_dispatch_stub_888))
+GL_PREFIX(_dispatch_stub_888):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 7016(%rax), %r11
+ movq 7104(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -33269,13 +33677,13 @@ GL_PREFIX(_dispatch_stub_877):
popq %rdx
popq %rsi
popq %rdi
- movq 7016(%rax), %r11
+ movq 7104(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 7016(%rax), %r11
+ movq 7104(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -33285,19 +33693,19 @@ GL_PREFIX(_dispatch_stub_877):
popq %rdx
popq %rsi
popq %rdi
- movq 7016(%rax), %r11
+ movq 7104(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_877), .-GL_PREFIX(_dispatch_stub_877)
+ .size GL_PREFIX(_dispatch_stub_888), .-GL_PREFIX(_dispatch_stub_888)
.p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_878)
- .type GL_PREFIX(_dispatch_stub_878), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_878))
-GL_PREFIX(_dispatch_stub_878):
+ .globl GL_PREFIX(_dispatch_stub_889)
+ .type GL_PREFIX(_dispatch_stub_889), @function
+ HIDDEN(GL_PREFIX(_dispatch_stub_889))
+GL_PREFIX(_dispatch_stub_889):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 7024(%rax), %r11
+ movq 7112(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -33307,13 +33715,13 @@ GL_PREFIX(_dispatch_stub_878):
popq %rdx
popq %rsi
popq %rdi
- movq 7024(%rax), %r11
+ movq 7112(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 7024(%rax), %r11
+ movq 7112(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -33323,10 +33731,10 @@ GL_PREFIX(_dispatch_stub_878):
popq %rdx
popq %rsi
popq %rdi
- movq 7024(%rax), %r11
+ movq 7112(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_878), .-GL_PREFIX(_dispatch_stub_878)
+ .size GL_PREFIX(_dispatch_stub_889), .-GL_PREFIX(_dispatch_stub_889)
.p2align 4,,15
.globl GL_PREFIX(EGLImageTargetRenderbufferStorageOES)
@@ -33334,7 +33742,7 @@ GL_PREFIX(_dispatch_stub_878):
GL_PREFIX(EGLImageTargetRenderbufferStorageOES):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 7032(%rax), %r11
+ movq 7120(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -33344,13 +33752,13 @@ GL_PREFIX(EGLImageTargetRenderbufferStorageOES):
popq %rbp
popq %rsi
popq %rdi
- movq 7032(%rax), %r11
+ movq 7120(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 7032(%rax), %r11
+ movq 7120(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -33360,7 +33768,7 @@ GL_PREFIX(EGLImageTargetRenderbufferStorageOES):
popq %rbp
popq %rsi
popq %rdi
- movq 7032(%rax), %r11
+ movq 7120(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(EGLImageTargetRenderbufferStorageOES), .-GL_PREFIX(EGLImageTargetRenderbufferStorageOES)
@@ -33371,7 +33779,7 @@ GL_PREFIX(EGLImageTargetRenderbufferStorageOES):
GL_PREFIX(EGLImageTargetTexture2DOES):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 7040(%rax), %r11
+ movq 7128(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -33381,13 +33789,13 @@ GL_PREFIX(EGLImageTargetTexture2DOES):
popq %rbp
popq %rsi
popq %rdi
- movq 7040(%rax), %r11
+ movq 7128(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 7040(%rax), %r11
+ movq 7128(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -33397,7 +33805,7 @@ GL_PREFIX(EGLImageTargetTexture2DOES):
popq %rbp
popq %rsi
popq %rdi
- movq 7040(%rax), %r11
+ movq 7128(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(EGLImageTargetTexture2DOES), .-GL_PREFIX(EGLImageTargetTexture2DOES)
@@ -33660,10 +34068,10 @@ GL_PREFIX(EGLImageTargetTexture2DOES):
.globl GL_PREFIX(IsProgramARB) ; .set GL_PREFIX(IsProgramARB), GL_PREFIX(IsProgramNV)
.globl GL_PREFIX(PointParameteri) ; .set GL_PREFIX(PointParameteri), GL_PREFIX(PointParameteriNV)
.globl GL_PREFIX(PointParameteriv) ; .set GL_PREFIX(PointParameteriv), GL_PREFIX(PointParameterivNV)
- .globl GL_PREFIX(DeleteVertexArrays) ; .set GL_PREFIX(DeleteVertexArrays), GL_PREFIX(_dispatch_stub_776)
- .globl GL_PREFIX(IsVertexArray) ; .set GL_PREFIX(IsVertexArray), GL_PREFIX(_dispatch_stub_778)
+ .globl GL_PREFIX(DeleteVertexArrays) ; .set GL_PREFIX(DeleteVertexArrays), GL_PREFIX(_dispatch_stub_786)
+ .globl GL_PREFIX(IsVertexArray) ; .set GL_PREFIX(IsVertexArray), GL_PREFIX(_dispatch_stub_788)
.globl GL_PREFIX(PrimitiveRestartIndex) ; .set GL_PREFIX(PrimitiveRestartIndex), GL_PREFIX(PrimitiveRestartIndexNV)
- .globl GL_PREFIX(BlendEquationSeparate) ; .set GL_PREFIX(BlendEquationSeparate), GL_PREFIX(_dispatch_stub_788)
+ .globl GL_PREFIX(BlendEquationSeparate) ; .set GL_PREFIX(BlendEquationSeparate), GL_PREFIX(_dispatch_stub_798)
.globl GL_PREFIX(BindFramebuffer) ; .set GL_PREFIX(BindFramebuffer), GL_PREFIX(BindFramebufferEXT)
.globl GL_PREFIX(BindRenderbuffer) ; .set GL_PREFIX(BindRenderbuffer), GL_PREFIX(BindRenderbufferEXT)
.globl GL_PREFIX(CheckFramebufferStatus) ; .set GL_PREFIX(CheckFramebufferStatus), GL_PREFIX(CheckFramebufferStatusEXT)
@@ -33681,7 +34089,7 @@ GL_PREFIX(EGLImageTargetTexture2DOES):
.globl GL_PREFIX(IsFramebuffer) ; .set GL_PREFIX(IsFramebuffer), GL_PREFIX(IsFramebufferEXT)
.globl GL_PREFIX(IsRenderbuffer) ; .set GL_PREFIX(IsRenderbuffer), GL_PREFIX(IsRenderbufferEXT)
.globl GL_PREFIX(RenderbufferStorage) ; .set GL_PREFIX(RenderbufferStorage), GL_PREFIX(RenderbufferStorageEXT)
- .globl GL_PREFIX(BlitFramebuffer) ; .set GL_PREFIX(BlitFramebuffer), GL_PREFIX(_dispatch_stub_806)
+ .globl GL_PREFIX(BlitFramebuffer) ; .set GL_PREFIX(BlitFramebuffer), GL_PREFIX(_dispatch_stub_816)
.globl GL_PREFIX(BindFragDataLocation) ; .set GL_PREFIX(BindFragDataLocation), GL_PREFIX(BindFragDataLocationEXT)
.globl GL_PREFIX(GetFragDataLocation) ; .set GL_PREFIX(GetFragDataLocation), GL_PREFIX(GetFragDataLocationEXT)
.globl GL_PREFIX(GetUniformuiv) ; .set GL_PREFIX(GetUniformuiv), GL_PREFIX(GetUniformuivEXT)
diff --git a/src/mapi/glapi/glapi_x86.S b/src/mapi/glapi/glapi_x86.S
index 215295d69b2..2ef45f3b734 100644
--- a/src/mapi/glapi/glapi_x86.S
+++ b/src/mapi/glapi/glapi_x86.S
@@ -46,7 +46,7 @@
#define GL_OFFSET(x) CODEPTR(REGOFF(4 * x, EAX))
#if defined(GNU_ASSEMBLER) && !defined(__DJGPP__) && !defined(__MINGW32__) && !defined(__APPLE__)
-#define GLOBL_FN(x) GLOBL x ; .type x, function
+#define GLOBL_FN(x) GLOBL x ; .type x, @function
#else
#define GLOBL_FN(x) GLOBL x
#endif
@@ -728,344 +728,355 @@ GLNAME(gl_dispatch_functions_start):
GL_STUB(FramebufferTextureARB, 575, FramebufferTextureARB@16)
GL_STUB(FramebufferTextureFaceARB, 576, FramebufferTextureFaceARB@20)
GL_STUB(ProgramParameteriARB, 577, ProgramParameteriARB@12)
- GL_STUB(FlushMappedBufferRange, 578, FlushMappedBufferRange@12)
- GL_STUB(MapBufferRange, 579, MapBufferRange@16)
- GL_STUB(BindVertexArray, 580, BindVertexArray@4)
- GL_STUB(GenVertexArrays, 581, GenVertexArrays@8)
- GL_STUB(CopyBufferSubData, 582, CopyBufferSubData@20)
- GL_STUB(ClientWaitSync, 583, ClientWaitSync@12)
- GL_STUB(DeleteSync, 584, DeleteSync@4)
- GL_STUB(FenceSync, 585, FenceSync@8)
- GL_STUB(GetInteger64v, 586, GetInteger64v@8)
- GL_STUB(GetSynciv, 587, GetSynciv@20)
- GL_STUB(IsSync, 588, IsSync@4)
- GL_STUB(WaitSync, 589, WaitSync@12)
- GL_STUB(DrawElementsBaseVertex, 590, DrawElementsBaseVertex@20)
- GL_STUB(DrawRangeElementsBaseVertex, 591, DrawRangeElementsBaseVertex@28)
- GL_STUB(MultiDrawElementsBaseVertex, 592, MultiDrawElementsBaseVertex@24)
- GL_STUB(BindTransformFeedback, 593, BindTransformFeedback@8)
- GL_STUB(DeleteTransformFeedbacks, 594, DeleteTransformFeedbacks@8)
- GL_STUB(DrawTransformFeedback, 595, DrawTransformFeedback@8)
- GL_STUB(GenTransformFeedbacks, 596, GenTransformFeedbacks@8)
- GL_STUB(IsTransformFeedback, 597, IsTransformFeedback@4)
- GL_STUB(PauseTransformFeedback, 598, PauseTransformFeedback@0)
- GL_STUB(ResumeTransformFeedback, 599, ResumeTransformFeedback@0)
- GL_STUB(PolygonOffsetEXT, 600, PolygonOffsetEXT@8)
- GL_STUB(_dispatch_stub_601, 601, _dispatch_stub_601@8)
- HIDDEN(GL_PREFIX(_dispatch_stub_601, _dispatch_stub_601@8))
- GL_STUB(_dispatch_stub_602, 602, _dispatch_stub_602@8)
- HIDDEN(GL_PREFIX(_dispatch_stub_602, _dispatch_stub_602@8))
- GL_STUB(_dispatch_stub_603, 603, _dispatch_stub_603@8)
- HIDDEN(GL_PREFIX(_dispatch_stub_603, _dispatch_stub_603@8))
- GL_STUB(_dispatch_stub_604, 604, _dispatch_stub_604@8)
- HIDDEN(GL_PREFIX(_dispatch_stub_604, _dispatch_stub_604@8))
- GL_STUB(_dispatch_stub_605, 605, _dispatch_stub_605@8)
- HIDDEN(GL_PREFIX(_dispatch_stub_605, _dispatch_stub_605@8))
- GL_STUB(_dispatch_stub_606, 606, _dispatch_stub_606@8)
- HIDDEN(GL_PREFIX(_dispatch_stub_606, _dispatch_stub_606@8))
- GL_STUB(_dispatch_stub_607, 607, _dispatch_stub_607@8)
- HIDDEN(GL_PREFIX(_dispatch_stub_607, _dispatch_stub_607@8))
- GL_STUB(_dispatch_stub_608, 608, _dispatch_stub_608@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_608, _dispatch_stub_608@4))
- GL_STUB(ColorPointerEXT, 609, ColorPointerEXT@20)
- GL_STUB(EdgeFlagPointerEXT, 610, EdgeFlagPointerEXT@12)
- GL_STUB(IndexPointerEXT, 611, IndexPointerEXT@16)
- GL_STUB(NormalPointerEXT, 612, NormalPointerEXT@16)
- GL_STUB(TexCoordPointerEXT, 613, TexCoordPointerEXT@20)
- GL_STUB(VertexPointerEXT, 614, VertexPointerEXT@20)
- GL_STUB(PointParameterfEXT, 615, PointParameterfEXT@8)
- GL_STUB(PointParameterfvEXT, 616, PointParameterfvEXT@8)
- GL_STUB(LockArraysEXT, 617, LockArraysEXT@8)
- GL_STUB(UnlockArraysEXT, 618, UnlockArraysEXT@0)
- GL_STUB(SecondaryColor3bEXT, 619, SecondaryColor3bEXT@12)
- GL_STUB(SecondaryColor3bvEXT, 620, SecondaryColor3bvEXT@4)
- GL_STUB(SecondaryColor3dEXT, 621, SecondaryColor3dEXT@24)
- GL_STUB(SecondaryColor3dvEXT, 622, SecondaryColor3dvEXT@4)
- GL_STUB(SecondaryColor3fEXT, 623, SecondaryColor3fEXT@12)
- GL_STUB(SecondaryColor3fvEXT, 624, SecondaryColor3fvEXT@4)
- GL_STUB(SecondaryColor3iEXT, 625, SecondaryColor3iEXT@12)
- GL_STUB(SecondaryColor3ivEXT, 626, SecondaryColor3ivEXT@4)
- GL_STUB(SecondaryColor3sEXT, 627, SecondaryColor3sEXT@12)
- GL_STUB(SecondaryColor3svEXT, 628, SecondaryColor3svEXT@4)
- GL_STUB(SecondaryColor3ubEXT, 629, SecondaryColor3ubEXT@12)
- GL_STUB(SecondaryColor3ubvEXT, 630, SecondaryColor3ubvEXT@4)
- GL_STUB(SecondaryColor3uiEXT, 631, SecondaryColor3uiEXT@12)
- GL_STUB(SecondaryColor3uivEXT, 632, SecondaryColor3uivEXT@4)
- GL_STUB(SecondaryColor3usEXT, 633, SecondaryColor3usEXT@12)
- GL_STUB(SecondaryColor3usvEXT, 634, SecondaryColor3usvEXT@4)
- GL_STUB(SecondaryColorPointerEXT, 635, SecondaryColorPointerEXT@16)
- GL_STUB(MultiDrawArraysEXT, 636, MultiDrawArraysEXT@16)
- GL_STUB(MultiDrawElementsEXT, 637, MultiDrawElementsEXT@20)
- GL_STUB(FogCoordPointerEXT, 638, FogCoordPointerEXT@12)
- GL_STUB(FogCoorddEXT, 639, FogCoorddEXT@8)
- GL_STUB(FogCoorddvEXT, 640, FogCoorddvEXT@4)
- GL_STUB(FogCoordfEXT, 641, FogCoordfEXT@4)
- GL_STUB(FogCoordfvEXT, 642, FogCoordfvEXT@4)
- GL_STUB(_dispatch_stub_643, 643, _dispatch_stub_643@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_643, _dispatch_stub_643@4))
- GL_STUB(BlendFuncSeparateEXT, 644, BlendFuncSeparateEXT@16)
- GL_STUB(FlushVertexArrayRangeNV, 645, FlushVertexArrayRangeNV@0)
- GL_STUB(VertexArrayRangeNV, 646, VertexArrayRangeNV@8)
- GL_STUB(CombinerInputNV, 647, CombinerInputNV@24)
- GL_STUB(CombinerOutputNV, 648, CombinerOutputNV@40)
- GL_STUB(CombinerParameterfNV, 649, CombinerParameterfNV@8)
- GL_STUB(CombinerParameterfvNV, 650, CombinerParameterfvNV@8)
- GL_STUB(CombinerParameteriNV, 651, CombinerParameteriNV@8)
- GL_STUB(CombinerParameterivNV, 652, CombinerParameterivNV@8)
- GL_STUB(FinalCombinerInputNV, 653, FinalCombinerInputNV@16)
- GL_STUB(GetCombinerInputParameterfvNV, 654, GetCombinerInputParameterfvNV@20)
- GL_STUB(GetCombinerInputParameterivNV, 655, GetCombinerInputParameterivNV@20)
- GL_STUB(GetCombinerOutputParameterfvNV, 656, GetCombinerOutputParameterfvNV@16)
- GL_STUB(GetCombinerOutputParameterivNV, 657, GetCombinerOutputParameterivNV@16)
- GL_STUB(GetFinalCombinerInputParameterfvNV, 658, GetFinalCombinerInputParameterfvNV@12)
- GL_STUB(GetFinalCombinerInputParameterivNV, 659, GetFinalCombinerInputParameterivNV@12)
- GL_STUB(ResizeBuffersMESA, 660, ResizeBuffersMESA@0)
- GL_STUB(WindowPos2dMESA, 661, WindowPos2dMESA@16)
- GL_STUB(WindowPos2dvMESA, 662, WindowPos2dvMESA@4)
- GL_STUB(WindowPos2fMESA, 663, WindowPos2fMESA@8)
- GL_STUB(WindowPos2fvMESA, 664, WindowPos2fvMESA@4)
- GL_STUB(WindowPos2iMESA, 665, WindowPos2iMESA@8)
- GL_STUB(WindowPos2ivMESA, 666, WindowPos2ivMESA@4)
- GL_STUB(WindowPos2sMESA, 667, WindowPos2sMESA@8)
- GL_STUB(WindowPos2svMESA, 668, WindowPos2svMESA@4)
- GL_STUB(WindowPos3dMESA, 669, WindowPos3dMESA@24)
- GL_STUB(WindowPos3dvMESA, 670, WindowPos3dvMESA@4)
- GL_STUB(WindowPos3fMESA, 671, WindowPos3fMESA@12)
- GL_STUB(WindowPos3fvMESA, 672, WindowPos3fvMESA@4)
- GL_STUB(WindowPos3iMESA, 673, WindowPos3iMESA@12)
- GL_STUB(WindowPos3ivMESA, 674, WindowPos3ivMESA@4)
- GL_STUB(WindowPos3sMESA, 675, WindowPos3sMESA@12)
- GL_STUB(WindowPos3svMESA, 676, WindowPos3svMESA@4)
- GL_STUB(WindowPos4dMESA, 677, WindowPos4dMESA@32)
- GL_STUB(WindowPos4dvMESA, 678, WindowPos4dvMESA@4)
- GL_STUB(WindowPos4fMESA, 679, WindowPos4fMESA@16)
- GL_STUB(WindowPos4fvMESA, 680, WindowPos4fvMESA@4)
- GL_STUB(WindowPos4iMESA, 681, WindowPos4iMESA@16)
- GL_STUB(WindowPos4ivMESA, 682, WindowPos4ivMESA@4)
- GL_STUB(WindowPos4sMESA, 683, WindowPos4sMESA@16)
- GL_STUB(WindowPos4svMESA, 684, WindowPos4svMESA@4)
- GL_STUB(_dispatch_stub_685, 685, _dispatch_stub_685@20)
- HIDDEN(GL_PREFIX(_dispatch_stub_685, _dispatch_stub_685@20))
- GL_STUB(_dispatch_stub_686, 686, _dispatch_stub_686@24)
- HIDDEN(GL_PREFIX(_dispatch_stub_686, _dispatch_stub_686@24))
- GL_STUB(_dispatch_stub_687, 687, _dispatch_stub_687@8)
- HIDDEN(GL_PREFIX(_dispatch_stub_687, _dispatch_stub_687@8))
- GL_STUB(_dispatch_stub_688, 688, _dispatch_stub_688@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_688, _dispatch_stub_688@4))
- GL_STUB(_dispatch_stub_689, 689, _dispatch_stub_689@8)
- HIDDEN(GL_PREFIX(_dispatch_stub_689, _dispatch_stub_689@8))
- GL_STUB(_dispatch_stub_690, 690, _dispatch_stub_690@12)
- HIDDEN(GL_PREFIX(_dispatch_stub_690, _dispatch_stub_690@12))
- GL_STUB(_dispatch_stub_691, 691, _dispatch_stub_691@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_691, _dispatch_stub_691@4))
- GL_STUB(_dispatch_stub_692, 692, _dispatch_stub_692@8)
- HIDDEN(GL_PREFIX(_dispatch_stub_692, _dispatch_stub_692@8))
- GL_STUB(_dispatch_stub_693, 693, _dispatch_stub_693@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_693, _dispatch_stub_693@4))
- GL_STUB(AreProgramsResidentNV, 694, AreProgramsResidentNV@12)
- GL_STUB(BindProgramNV, 695, BindProgramNV@8)
- GL_STUB(DeleteProgramsNV, 696, DeleteProgramsNV@8)
- GL_STUB(ExecuteProgramNV, 697, ExecuteProgramNV@12)
- GL_STUB(GenProgramsNV, 698, GenProgramsNV@8)
- GL_STUB(GetProgramParameterdvNV, 699, GetProgramParameterdvNV@16)
- GL_STUB(GetProgramParameterfvNV, 700, GetProgramParameterfvNV@16)
- GL_STUB(GetProgramStringNV, 701, GetProgramStringNV@12)
- GL_STUB(GetProgramivNV, 702, GetProgramivNV@12)
- GL_STUB(GetTrackMatrixivNV, 703, GetTrackMatrixivNV@16)
- GL_STUB(GetVertexAttribPointervNV, 704, GetVertexAttribPointervNV@12)
- GL_STUB(GetVertexAttribdvNV, 705, GetVertexAttribdvNV@12)
- GL_STUB(GetVertexAttribfvNV, 706, GetVertexAttribfvNV@12)
- GL_STUB(GetVertexAttribivNV, 707, GetVertexAttribivNV@12)
- GL_STUB(IsProgramNV, 708, IsProgramNV@4)
- GL_STUB(LoadProgramNV, 709, LoadProgramNV@16)
- GL_STUB(ProgramParameters4dvNV, 710, ProgramParameters4dvNV@16)
- GL_STUB(ProgramParameters4fvNV, 711, ProgramParameters4fvNV@16)
- GL_STUB(RequestResidentProgramsNV, 712, RequestResidentProgramsNV@8)
- GL_STUB(TrackMatrixNV, 713, TrackMatrixNV@16)
- GL_STUB(VertexAttrib1dNV, 714, VertexAttrib1dNV@12)
- GL_STUB(VertexAttrib1dvNV, 715, VertexAttrib1dvNV@8)
- GL_STUB(VertexAttrib1fNV, 716, VertexAttrib1fNV@8)
- GL_STUB(VertexAttrib1fvNV, 717, VertexAttrib1fvNV@8)
- GL_STUB(VertexAttrib1sNV, 718, VertexAttrib1sNV@8)
- GL_STUB(VertexAttrib1svNV, 719, VertexAttrib1svNV@8)
- GL_STUB(VertexAttrib2dNV, 720, VertexAttrib2dNV@20)
- GL_STUB(VertexAttrib2dvNV, 721, VertexAttrib2dvNV@8)
- GL_STUB(VertexAttrib2fNV, 722, VertexAttrib2fNV@12)
- GL_STUB(VertexAttrib2fvNV, 723, VertexAttrib2fvNV@8)
- GL_STUB(VertexAttrib2sNV, 724, VertexAttrib2sNV@12)
- GL_STUB(VertexAttrib2svNV, 725, VertexAttrib2svNV@8)
- GL_STUB(VertexAttrib3dNV, 726, VertexAttrib3dNV@28)
- GL_STUB(VertexAttrib3dvNV, 727, VertexAttrib3dvNV@8)
- GL_STUB(VertexAttrib3fNV, 728, VertexAttrib3fNV@16)
- GL_STUB(VertexAttrib3fvNV, 729, VertexAttrib3fvNV@8)
- GL_STUB(VertexAttrib3sNV, 730, VertexAttrib3sNV@16)
- GL_STUB(VertexAttrib3svNV, 731, VertexAttrib3svNV@8)
- GL_STUB(VertexAttrib4dNV, 732, VertexAttrib4dNV@36)
- GL_STUB(VertexAttrib4dvNV, 733, VertexAttrib4dvNV@8)
- GL_STUB(VertexAttrib4fNV, 734, VertexAttrib4fNV@20)
- GL_STUB(VertexAttrib4fvNV, 735, VertexAttrib4fvNV@8)
- GL_STUB(VertexAttrib4sNV, 736, VertexAttrib4sNV@20)
- GL_STUB(VertexAttrib4svNV, 737, VertexAttrib4svNV@8)
- GL_STUB(VertexAttrib4ubNV, 738, VertexAttrib4ubNV@20)
- GL_STUB(VertexAttrib4ubvNV, 739, VertexAttrib4ubvNV@8)
- GL_STUB(VertexAttribPointerNV, 740, VertexAttribPointerNV@20)
- GL_STUB(VertexAttribs1dvNV, 741, VertexAttribs1dvNV@12)
- GL_STUB(VertexAttribs1fvNV, 742, VertexAttribs1fvNV@12)
- GL_STUB(VertexAttribs1svNV, 743, VertexAttribs1svNV@12)
- GL_STUB(VertexAttribs2dvNV, 744, VertexAttribs2dvNV@12)
- GL_STUB(VertexAttribs2fvNV, 745, VertexAttribs2fvNV@12)
- GL_STUB(VertexAttribs2svNV, 746, VertexAttribs2svNV@12)
- GL_STUB(VertexAttribs3dvNV, 747, VertexAttribs3dvNV@12)
- GL_STUB(VertexAttribs3fvNV, 748, VertexAttribs3fvNV@12)
- GL_STUB(VertexAttribs3svNV, 749, VertexAttribs3svNV@12)
- GL_STUB(VertexAttribs4dvNV, 750, VertexAttribs4dvNV@12)
- GL_STUB(VertexAttribs4fvNV, 751, VertexAttribs4fvNV@12)
- GL_STUB(VertexAttribs4svNV, 752, VertexAttribs4svNV@12)
- GL_STUB(VertexAttribs4ubvNV, 753, VertexAttribs4ubvNV@12)
- GL_STUB(GetTexBumpParameterfvATI, 754, GetTexBumpParameterfvATI@8)
- GL_STUB(GetTexBumpParameterivATI, 755, GetTexBumpParameterivATI@8)
- GL_STUB(TexBumpParameterfvATI, 756, TexBumpParameterfvATI@8)
- GL_STUB(TexBumpParameterivATI, 757, TexBumpParameterivATI@8)
- GL_STUB(AlphaFragmentOp1ATI, 758, AlphaFragmentOp1ATI@24)
- GL_STUB(AlphaFragmentOp2ATI, 759, AlphaFragmentOp2ATI@36)
- GL_STUB(AlphaFragmentOp3ATI, 760, AlphaFragmentOp3ATI@48)
- GL_STUB(BeginFragmentShaderATI, 761, BeginFragmentShaderATI@0)
- GL_STUB(BindFragmentShaderATI, 762, BindFragmentShaderATI@4)
- GL_STUB(ColorFragmentOp1ATI, 763, ColorFragmentOp1ATI@28)
- GL_STUB(ColorFragmentOp2ATI, 764, ColorFragmentOp2ATI@40)
- GL_STUB(ColorFragmentOp3ATI, 765, ColorFragmentOp3ATI@52)
- GL_STUB(DeleteFragmentShaderATI, 766, DeleteFragmentShaderATI@4)
- GL_STUB(EndFragmentShaderATI, 767, EndFragmentShaderATI@0)
- GL_STUB(GenFragmentShadersATI, 768, GenFragmentShadersATI@4)
- GL_STUB(PassTexCoordATI, 769, PassTexCoordATI@12)
- GL_STUB(SampleMapATI, 770, SampleMapATI@12)
- GL_STUB(SetFragmentShaderConstantATI, 771, SetFragmentShaderConstantATI@8)
- GL_STUB(PointParameteriNV, 772, PointParameteriNV@8)
- GL_STUB(PointParameterivNV, 773, PointParameterivNV@8)
- GL_STUB(_dispatch_stub_774, 774, _dispatch_stub_774@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_774, _dispatch_stub_774@4))
- GL_STUB(_dispatch_stub_775, 775, _dispatch_stub_775@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_775, _dispatch_stub_775@4))
- GL_STUB(_dispatch_stub_776, 776, _dispatch_stub_776@8)
- HIDDEN(GL_PREFIX(_dispatch_stub_776, _dispatch_stub_776@8))
- GL_STUB(_dispatch_stub_777, 777, _dispatch_stub_777@8)
- HIDDEN(GL_PREFIX(_dispatch_stub_777, _dispatch_stub_777@8))
- GL_STUB(_dispatch_stub_778, 778, _dispatch_stub_778@4)
- HIDDEN(GL_PREFIX(_dispatch_stub_778, _dispatch_stub_778@4))
- GL_STUB(GetProgramNamedParameterdvNV, 779, GetProgramNamedParameterdvNV@16)
- GL_STUB(GetProgramNamedParameterfvNV, 780, GetProgramNamedParameterfvNV@16)
- GL_STUB(ProgramNamedParameter4dNV, 781, ProgramNamedParameter4dNV@44)
- GL_STUB(ProgramNamedParameter4dvNV, 782, ProgramNamedParameter4dvNV@16)
- GL_STUB(ProgramNamedParameter4fNV, 783, ProgramNamedParameter4fNV@28)
- GL_STUB(ProgramNamedParameter4fvNV, 784, ProgramNamedParameter4fvNV@16)
- GL_STUB(PrimitiveRestartIndexNV, 785, PrimitiveRestartIndexNV@4)
- GL_STUB(PrimitiveRestartNV, 786, PrimitiveRestartNV@0)
- GL_STUB(_dispatch_stub_787, 787, _dispatch_stub_787@16)
- HIDDEN(GL_PREFIX(_dispatch_stub_787, _dispatch_stub_787@16))
- GL_STUB(_dispatch_stub_788, 788, _dispatch_stub_788@8)
- HIDDEN(GL_PREFIX(_dispatch_stub_788, _dispatch_stub_788@8))
- GL_STUB(BindFramebufferEXT, 789, BindFramebufferEXT@8)
- GL_STUB(BindRenderbufferEXT, 790, BindRenderbufferEXT@8)
- GL_STUB(CheckFramebufferStatusEXT, 791, CheckFramebufferStatusEXT@4)
- GL_STUB(DeleteFramebuffersEXT, 792, DeleteFramebuffersEXT@8)
- GL_STUB(DeleteRenderbuffersEXT, 793, DeleteRenderbuffersEXT@8)
- GL_STUB(FramebufferRenderbufferEXT, 794, FramebufferRenderbufferEXT@16)
- GL_STUB(FramebufferTexture1DEXT, 795, FramebufferTexture1DEXT@20)
- GL_STUB(FramebufferTexture2DEXT, 796, FramebufferTexture2DEXT@20)
- GL_STUB(FramebufferTexture3DEXT, 797, FramebufferTexture3DEXT@24)
- GL_STUB(GenFramebuffersEXT, 798, GenFramebuffersEXT@8)
- GL_STUB(GenRenderbuffersEXT, 799, GenRenderbuffersEXT@8)
- GL_STUB(GenerateMipmapEXT, 800, GenerateMipmapEXT@4)
- GL_STUB(GetFramebufferAttachmentParameterivEXT, 801, GetFramebufferAttachmentParameterivEXT@16)
- GL_STUB(GetRenderbufferParameterivEXT, 802, GetRenderbufferParameterivEXT@12)
- GL_STUB(IsFramebufferEXT, 803, IsFramebufferEXT@4)
- GL_STUB(IsRenderbufferEXT, 804, IsRenderbufferEXT@4)
- GL_STUB(RenderbufferStorageEXT, 805, RenderbufferStorageEXT@16)
- GL_STUB(_dispatch_stub_806, 806, _dispatch_stub_806@40)
- HIDDEN(GL_PREFIX(_dispatch_stub_806, _dispatch_stub_806@40))
- GL_STUB(_dispatch_stub_807, 807, _dispatch_stub_807@12)
- HIDDEN(GL_PREFIX(_dispatch_stub_807, _dispatch_stub_807@12))
- GL_STUB(_dispatch_stub_808, 808, _dispatch_stub_808@12)
- HIDDEN(GL_PREFIX(_dispatch_stub_808, _dispatch_stub_808@12))
- GL_STUB(BindFragDataLocationEXT, 809, BindFragDataLocationEXT@12)
- GL_STUB(GetFragDataLocationEXT, 810, GetFragDataLocationEXT@8)
- GL_STUB(GetUniformuivEXT, 811, GetUniformuivEXT@12)
- GL_STUB(GetVertexAttribIivEXT, 812, GetVertexAttribIivEXT@12)
- GL_STUB(GetVertexAttribIuivEXT, 813, GetVertexAttribIuivEXT@12)
- GL_STUB(Uniform1uiEXT, 814, Uniform1uiEXT@8)
- GL_STUB(Uniform1uivEXT, 815, Uniform1uivEXT@12)
- GL_STUB(Uniform2uiEXT, 816, Uniform2uiEXT@12)
- GL_STUB(Uniform2uivEXT, 817, Uniform2uivEXT@12)
- GL_STUB(Uniform3uiEXT, 818, Uniform3uiEXT@16)
- GL_STUB(Uniform3uivEXT, 819, Uniform3uivEXT@12)
- GL_STUB(Uniform4uiEXT, 820, Uniform4uiEXT@20)
- GL_STUB(Uniform4uivEXT, 821, Uniform4uivEXT@12)
- GL_STUB(VertexAttribI1iEXT, 822, VertexAttribI1iEXT@8)
- GL_STUB(VertexAttribI1ivEXT, 823, VertexAttribI1ivEXT@8)
- GL_STUB(VertexAttribI1uiEXT, 824, VertexAttribI1uiEXT@8)
- GL_STUB(VertexAttribI1uivEXT, 825, VertexAttribI1uivEXT@8)
- GL_STUB(VertexAttribI2iEXT, 826, VertexAttribI2iEXT@12)
- GL_STUB(VertexAttribI2ivEXT, 827, VertexAttribI2ivEXT@8)
- GL_STUB(VertexAttribI2uiEXT, 828, VertexAttribI2uiEXT@12)
- GL_STUB(VertexAttribI2uivEXT, 829, VertexAttribI2uivEXT@8)
- GL_STUB(VertexAttribI3iEXT, 830, VertexAttribI3iEXT@16)
- GL_STUB(VertexAttribI3ivEXT, 831, VertexAttribI3ivEXT@8)
- GL_STUB(VertexAttribI3uiEXT, 832, VertexAttribI3uiEXT@16)
- GL_STUB(VertexAttribI3uivEXT, 833, VertexAttribI3uivEXT@8)
- GL_STUB(VertexAttribI4bvEXT, 834, VertexAttribI4bvEXT@8)
- GL_STUB(VertexAttribI4iEXT, 835, VertexAttribI4iEXT@20)
- GL_STUB(VertexAttribI4ivEXT, 836, VertexAttribI4ivEXT@8)
- GL_STUB(VertexAttribI4svEXT, 837, VertexAttribI4svEXT@8)
- GL_STUB(VertexAttribI4ubvEXT, 838, VertexAttribI4ubvEXT@8)
- GL_STUB(VertexAttribI4uiEXT, 839, VertexAttribI4uiEXT@20)
- GL_STUB(VertexAttribI4uivEXT, 840, VertexAttribI4uivEXT@8)
- GL_STUB(VertexAttribI4usvEXT, 841, VertexAttribI4usvEXT@8)
- GL_STUB(VertexAttribIPointerEXT, 842, VertexAttribIPointerEXT@20)
- GL_STUB(FramebufferTextureLayerEXT, 843, FramebufferTextureLayerEXT@20)
- GL_STUB(ColorMaskIndexedEXT, 844, ColorMaskIndexedEXT@20)
- GL_STUB(DisableIndexedEXT, 845, DisableIndexedEXT@8)
- GL_STUB(EnableIndexedEXT, 846, EnableIndexedEXT@8)
- GL_STUB(GetBooleanIndexedvEXT, 847, GetBooleanIndexedvEXT@12)
- GL_STUB(GetIntegerIndexedvEXT, 848, GetIntegerIndexedvEXT@12)
- GL_STUB(IsEnabledIndexedEXT, 849, IsEnabledIndexedEXT@8)
- GL_STUB(ClearColorIiEXT, 850, ClearColorIiEXT@16)
- GL_STUB(ClearColorIuiEXT, 851, ClearColorIuiEXT@16)
- GL_STUB(GetTexParameterIivEXT, 852, GetTexParameterIivEXT@12)
- GL_STUB(GetTexParameterIuivEXT, 853, GetTexParameterIuivEXT@12)
- GL_STUB(TexParameterIivEXT, 854, TexParameterIivEXT@12)
- GL_STUB(TexParameterIuivEXT, 855, TexParameterIuivEXT@12)
- GL_STUB(BeginConditionalRenderNV, 856, BeginConditionalRenderNV@8)
- GL_STUB(EndConditionalRenderNV, 857, EndConditionalRenderNV@0)
- GL_STUB(BeginTransformFeedbackEXT, 858, BeginTransformFeedbackEXT@4)
- GL_STUB(BindBufferBaseEXT, 859, BindBufferBaseEXT@12)
- GL_STUB(BindBufferOffsetEXT, 860, BindBufferOffsetEXT@16)
- GL_STUB(BindBufferRangeEXT, 861, BindBufferRangeEXT@20)
- GL_STUB(EndTransformFeedbackEXT, 862, EndTransformFeedbackEXT@0)
- GL_STUB(GetTransformFeedbackVaryingEXT, 863, GetTransformFeedbackVaryingEXT@28)
- GL_STUB(TransformFeedbackVaryingsEXT, 864, TransformFeedbackVaryingsEXT@16)
- GL_STUB(ProvokingVertexEXT, 865, ProvokingVertexEXT@4)
- GL_STUB(_dispatch_stub_866, 866, _dispatch_stub_866@12)
- HIDDEN(GL_PREFIX(_dispatch_stub_866, _dispatch_stub_866@12))
- GL_STUB(_dispatch_stub_867, 867, _dispatch_stub_867@12)
- HIDDEN(GL_PREFIX(_dispatch_stub_867, _dispatch_stub_867@12))
- GL_STUB(GetObjectParameterivAPPLE, 868, GetObjectParameterivAPPLE@16)
- GL_STUB(ObjectPurgeableAPPLE, 869, ObjectPurgeableAPPLE@12)
- GL_STUB(ObjectUnpurgeableAPPLE, 870, ObjectUnpurgeableAPPLE@12)
- GL_STUB(ActiveProgramEXT, 871, ActiveProgramEXT@4)
- GL_STUB(CreateShaderProgramEXT, 872, CreateShaderProgramEXT@8)
- GL_STUB(UseShaderProgramEXT, 873, UseShaderProgramEXT@8)
- GL_STUB(_dispatch_stub_874, 874, _dispatch_stub_874@16)
- HIDDEN(GL_PREFIX(_dispatch_stub_874, _dispatch_stub_874@16))
- GL_STUB(_dispatch_stub_875, 875, _dispatch_stub_875@16)
- HIDDEN(GL_PREFIX(_dispatch_stub_875, _dispatch_stub_875@16))
- GL_STUB(_dispatch_stub_876, 876, _dispatch_stub_876@16)
- HIDDEN(GL_PREFIX(_dispatch_stub_876, _dispatch_stub_876@16))
+ GL_STUB(VertexAttribDivisorARB, 578, VertexAttribDivisorARB@8)
+ GL_STUB(FlushMappedBufferRange, 579, FlushMappedBufferRange@12)
+ GL_STUB(MapBufferRange, 580, MapBufferRange@16)
+ GL_STUB(BindVertexArray, 581, BindVertexArray@4)
+ GL_STUB(GenVertexArrays, 582, GenVertexArrays@8)
+ GL_STUB(CopyBufferSubData, 583, CopyBufferSubData@20)
+ GL_STUB(ClientWaitSync, 584, ClientWaitSync@12)
+ GL_STUB(DeleteSync, 585, DeleteSync@4)
+ GL_STUB(FenceSync, 586, FenceSync@8)
+ GL_STUB(GetInteger64v, 587, GetInteger64v@8)
+ GL_STUB(GetSynciv, 588, GetSynciv@20)
+ GL_STUB(IsSync, 589, IsSync@4)
+ GL_STUB(WaitSync, 590, WaitSync@12)
+ GL_STUB(DrawElementsBaseVertex, 591, DrawElementsBaseVertex@20)
+ GL_STUB(DrawRangeElementsBaseVertex, 592, DrawRangeElementsBaseVertex@28)
+ GL_STUB(MultiDrawElementsBaseVertex, 593, MultiDrawElementsBaseVertex@24)
+ GL_STUB(BlendEquationSeparateiARB, 594, BlendEquationSeparateiARB@12)
+ GL_STUB(BlendEquationiARB, 595, BlendEquationiARB@8)
+ GL_STUB(BlendFuncSeparateiARB, 596, BlendFuncSeparateiARB@20)
+ GL_STUB(BlendFunciARB, 597, BlendFunciARB@12)
+ GL_STUB(BindTransformFeedback, 598, BindTransformFeedback@8)
+ GL_STUB(DeleteTransformFeedbacks, 599, DeleteTransformFeedbacks@8)
+ GL_STUB(DrawTransformFeedback, 600, DrawTransformFeedback@8)
+ GL_STUB(GenTransformFeedbacks, 601, GenTransformFeedbacks@8)
+ GL_STUB(IsTransformFeedback, 602, IsTransformFeedback@4)
+ GL_STUB(PauseTransformFeedback, 603, PauseTransformFeedback@0)
+ GL_STUB(ResumeTransformFeedback, 604, ResumeTransformFeedback@0)
+ GL_STUB(ClearDepthf, 605, ClearDepthf@4)
+ GL_STUB(DepthRangef, 606, DepthRangef@8)
+ GL_STUB(GetShaderPrecisionFormat, 607, GetShaderPrecisionFormat@16)
+ GL_STUB(ReleaseShaderCompiler, 608, ReleaseShaderCompiler@0)
+ GL_STUB(ShaderBinary, 609, ShaderBinary@20)
+ GL_STUB(PolygonOffsetEXT, 610, PolygonOffsetEXT@8)
+ GL_STUB(_dispatch_stub_611, 611, _dispatch_stub_611@8)
+ HIDDEN(GL_PREFIX(_dispatch_stub_611, _dispatch_stub_611@8))
+ GL_STUB(_dispatch_stub_612, 612, _dispatch_stub_612@8)
+ HIDDEN(GL_PREFIX(_dispatch_stub_612, _dispatch_stub_612@8))
+ GL_STUB(_dispatch_stub_613, 613, _dispatch_stub_613@8)
+ HIDDEN(GL_PREFIX(_dispatch_stub_613, _dispatch_stub_613@8))
+ GL_STUB(_dispatch_stub_614, 614, _dispatch_stub_614@8)
+ HIDDEN(GL_PREFIX(_dispatch_stub_614, _dispatch_stub_614@8))
+ GL_STUB(_dispatch_stub_615, 615, _dispatch_stub_615@8)
+ HIDDEN(GL_PREFIX(_dispatch_stub_615, _dispatch_stub_615@8))
+ GL_STUB(_dispatch_stub_616, 616, _dispatch_stub_616@8)
+ HIDDEN(GL_PREFIX(_dispatch_stub_616, _dispatch_stub_616@8))
+ GL_STUB(_dispatch_stub_617, 617, _dispatch_stub_617@8)
+ HIDDEN(GL_PREFIX(_dispatch_stub_617, _dispatch_stub_617@8))
+ GL_STUB(_dispatch_stub_618, 618, _dispatch_stub_618@4)
+ HIDDEN(GL_PREFIX(_dispatch_stub_618, _dispatch_stub_618@4))
+ GL_STUB(ColorPointerEXT, 619, ColorPointerEXT@20)
+ GL_STUB(EdgeFlagPointerEXT, 620, EdgeFlagPointerEXT@12)
+ GL_STUB(IndexPointerEXT, 621, IndexPointerEXT@16)
+ GL_STUB(NormalPointerEXT, 622, NormalPointerEXT@16)
+ GL_STUB(TexCoordPointerEXT, 623, TexCoordPointerEXT@20)
+ GL_STUB(VertexPointerEXT, 624, VertexPointerEXT@20)
+ GL_STUB(PointParameterfEXT, 625, PointParameterfEXT@8)
+ GL_STUB(PointParameterfvEXT, 626, PointParameterfvEXT@8)
+ GL_STUB(LockArraysEXT, 627, LockArraysEXT@8)
+ GL_STUB(UnlockArraysEXT, 628, UnlockArraysEXT@0)
+ GL_STUB(SecondaryColor3bEXT, 629, SecondaryColor3bEXT@12)
+ GL_STUB(SecondaryColor3bvEXT, 630, SecondaryColor3bvEXT@4)
+ GL_STUB(SecondaryColor3dEXT, 631, SecondaryColor3dEXT@24)
+ GL_STUB(SecondaryColor3dvEXT, 632, SecondaryColor3dvEXT@4)
+ GL_STUB(SecondaryColor3fEXT, 633, SecondaryColor3fEXT@12)
+ GL_STUB(SecondaryColor3fvEXT, 634, SecondaryColor3fvEXT@4)
+ GL_STUB(SecondaryColor3iEXT, 635, SecondaryColor3iEXT@12)
+ GL_STUB(SecondaryColor3ivEXT, 636, SecondaryColor3ivEXT@4)
+ GL_STUB(SecondaryColor3sEXT, 637, SecondaryColor3sEXT@12)
+ GL_STUB(SecondaryColor3svEXT, 638, SecondaryColor3svEXT@4)
+ GL_STUB(SecondaryColor3ubEXT, 639, SecondaryColor3ubEXT@12)
+ GL_STUB(SecondaryColor3ubvEXT, 640, SecondaryColor3ubvEXT@4)
+ GL_STUB(SecondaryColor3uiEXT, 641, SecondaryColor3uiEXT@12)
+ GL_STUB(SecondaryColor3uivEXT, 642, SecondaryColor3uivEXT@4)
+ GL_STUB(SecondaryColor3usEXT, 643, SecondaryColor3usEXT@12)
+ GL_STUB(SecondaryColor3usvEXT, 644, SecondaryColor3usvEXT@4)
+ GL_STUB(SecondaryColorPointerEXT, 645, SecondaryColorPointerEXT@16)
+ GL_STUB(MultiDrawArraysEXT, 646, MultiDrawArraysEXT@16)
+ GL_STUB(MultiDrawElementsEXT, 647, MultiDrawElementsEXT@20)
+ GL_STUB(FogCoordPointerEXT, 648, FogCoordPointerEXT@12)
+ GL_STUB(FogCoorddEXT, 649, FogCoorddEXT@8)
+ GL_STUB(FogCoorddvEXT, 650, FogCoorddvEXT@4)
+ GL_STUB(FogCoordfEXT, 651, FogCoordfEXT@4)
+ GL_STUB(FogCoordfvEXT, 652, FogCoordfvEXT@4)
+ GL_STUB(_dispatch_stub_653, 653, _dispatch_stub_653@4)
+ HIDDEN(GL_PREFIX(_dispatch_stub_653, _dispatch_stub_653@4))
+ GL_STUB(BlendFuncSeparateEXT, 654, BlendFuncSeparateEXT@16)
+ GL_STUB(FlushVertexArrayRangeNV, 655, FlushVertexArrayRangeNV@0)
+ GL_STUB(VertexArrayRangeNV, 656, VertexArrayRangeNV@8)
+ GL_STUB(CombinerInputNV, 657, CombinerInputNV@24)
+ GL_STUB(CombinerOutputNV, 658, CombinerOutputNV@40)
+ GL_STUB(CombinerParameterfNV, 659, CombinerParameterfNV@8)
+ GL_STUB(CombinerParameterfvNV, 660, CombinerParameterfvNV@8)
+ GL_STUB(CombinerParameteriNV, 661, CombinerParameteriNV@8)
+ GL_STUB(CombinerParameterivNV, 662, CombinerParameterivNV@8)
+ GL_STUB(FinalCombinerInputNV, 663, FinalCombinerInputNV@16)
+ GL_STUB(GetCombinerInputParameterfvNV, 664, GetCombinerInputParameterfvNV@20)
+ GL_STUB(GetCombinerInputParameterivNV, 665, GetCombinerInputParameterivNV@20)
+ GL_STUB(GetCombinerOutputParameterfvNV, 666, GetCombinerOutputParameterfvNV@16)
+ GL_STUB(GetCombinerOutputParameterivNV, 667, GetCombinerOutputParameterivNV@16)
+ GL_STUB(GetFinalCombinerInputParameterfvNV, 668, GetFinalCombinerInputParameterfvNV@12)
+ GL_STUB(GetFinalCombinerInputParameterivNV, 669, GetFinalCombinerInputParameterivNV@12)
+ GL_STUB(ResizeBuffersMESA, 670, ResizeBuffersMESA@0)
+ GL_STUB(WindowPos2dMESA, 671, WindowPos2dMESA@16)
+ GL_STUB(WindowPos2dvMESA, 672, WindowPos2dvMESA@4)
+ GL_STUB(WindowPos2fMESA, 673, WindowPos2fMESA@8)
+ GL_STUB(WindowPos2fvMESA, 674, WindowPos2fvMESA@4)
+ GL_STUB(WindowPos2iMESA, 675, WindowPos2iMESA@8)
+ GL_STUB(WindowPos2ivMESA, 676, WindowPos2ivMESA@4)
+ GL_STUB(WindowPos2sMESA, 677, WindowPos2sMESA@8)
+ GL_STUB(WindowPos2svMESA, 678, WindowPos2svMESA@4)
+ GL_STUB(WindowPos3dMESA, 679, WindowPos3dMESA@24)
+ GL_STUB(WindowPos3dvMESA, 680, WindowPos3dvMESA@4)
+ GL_STUB(WindowPos3fMESA, 681, WindowPos3fMESA@12)
+ GL_STUB(WindowPos3fvMESA, 682, WindowPos3fvMESA@4)
+ GL_STUB(WindowPos3iMESA, 683, WindowPos3iMESA@12)
+ GL_STUB(WindowPos3ivMESA, 684, WindowPos3ivMESA@4)
+ GL_STUB(WindowPos3sMESA, 685, WindowPos3sMESA@12)
+ GL_STUB(WindowPos3svMESA, 686, WindowPos3svMESA@4)
+ GL_STUB(WindowPos4dMESA, 687, WindowPos4dMESA@32)
+ GL_STUB(WindowPos4dvMESA, 688, WindowPos4dvMESA@4)
+ GL_STUB(WindowPos4fMESA, 689, WindowPos4fMESA@16)
+ GL_STUB(WindowPos4fvMESA, 690, WindowPos4fvMESA@4)
+ GL_STUB(WindowPos4iMESA, 691, WindowPos4iMESA@16)
+ GL_STUB(WindowPos4ivMESA, 692, WindowPos4ivMESA@4)
+ GL_STUB(WindowPos4sMESA, 693, WindowPos4sMESA@16)
+ GL_STUB(WindowPos4svMESA, 694, WindowPos4svMESA@4)
+ GL_STUB(_dispatch_stub_695, 695, _dispatch_stub_695@20)
+ HIDDEN(GL_PREFIX(_dispatch_stub_695, _dispatch_stub_695@20))
+ GL_STUB(_dispatch_stub_696, 696, _dispatch_stub_696@24)
+ HIDDEN(GL_PREFIX(_dispatch_stub_696, _dispatch_stub_696@24))
+ GL_STUB(_dispatch_stub_697, 697, _dispatch_stub_697@8)
+ HIDDEN(GL_PREFIX(_dispatch_stub_697, _dispatch_stub_697@8))
+ GL_STUB(_dispatch_stub_698, 698, _dispatch_stub_698@4)
+ HIDDEN(GL_PREFIX(_dispatch_stub_698, _dispatch_stub_698@4))
+ GL_STUB(_dispatch_stub_699, 699, _dispatch_stub_699@8)
+ HIDDEN(GL_PREFIX(_dispatch_stub_699, _dispatch_stub_699@8))
+ GL_STUB(_dispatch_stub_700, 700, _dispatch_stub_700@12)
+ HIDDEN(GL_PREFIX(_dispatch_stub_700, _dispatch_stub_700@12))
+ GL_STUB(_dispatch_stub_701, 701, _dispatch_stub_701@4)
+ HIDDEN(GL_PREFIX(_dispatch_stub_701, _dispatch_stub_701@4))
+ GL_STUB(_dispatch_stub_702, 702, _dispatch_stub_702@8)
+ HIDDEN(GL_PREFIX(_dispatch_stub_702, _dispatch_stub_702@8))
+ GL_STUB(_dispatch_stub_703, 703, _dispatch_stub_703@4)
+ HIDDEN(GL_PREFIX(_dispatch_stub_703, _dispatch_stub_703@4))
+ GL_STUB(AreProgramsResidentNV, 704, AreProgramsResidentNV@12)
+ GL_STUB(BindProgramNV, 705, BindProgramNV@8)
+ GL_STUB(DeleteProgramsNV, 706, DeleteProgramsNV@8)
+ GL_STUB(ExecuteProgramNV, 707, ExecuteProgramNV@12)
+ GL_STUB(GenProgramsNV, 708, GenProgramsNV@8)
+ GL_STUB(GetProgramParameterdvNV, 709, GetProgramParameterdvNV@16)
+ GL_STUB(GetProgramParameterfvNV, 710, GetProgramParameterfvNV@16)
+ GL_STUB(GetProgramStringNV, 711, GetProgramStringNV@12)
+ GL_STUB(GetProgramivNV, 712, GetProgramivNV@12)
+ GL_STUB(GetTrackMatrixivNV, 713, GetTrackMatrixivNV@16)
+ GL_STUB(GetVertexAttribPointervNV, 714, GetVertexAttribPointervNV@12)
+ GL_STUB(GetVertexAttribdvNV, 715, GetVertexAttribdvNV@12)
+ GL_STUB(GetVertexAttribfvNV, 716, GetVertexAttribfvNV@12)
+ GL_STUB(GetVertexAttribivNV, 717, GetVertexAttribivNV@12)
+ GL_STUB(IsProgramNV, 718, IsProgramNV@4)
+ GL_STUB(LoadProgramNV, 719, LoadProgramNV@16)
+ GL_STUB(ProgramParameters4dvNV, 720, ProgramParameters4dvNV@16)
+ GL_STUB(ProgramParameters4fvNV, 721, ProgramParameters4fvNV@16)
+ GL_STUB(RequestResidentProgramsNV, 722, RequestResidentProgramsNV@8)
+ GL_STUB(TrackMatrixNV, 723, TrackMatrixNV@16)
+ GL_STUB(VertexAttrib1dNV, 724, VertexAttrib1dNV@12)
+ GL_STUB(VertexAttrib1dvNV, 725, VertexAttrib1dvNV@8)
+ GL_STUB(VertexAttrib1fNV, 726, VertexAttrib1fNV@8)
+ GL_STUB(VertexAttrib1fvNV, 727, VertexAttrib1fvNV@8)
+ GL_STUB(VertexAttrib1sNV, 728, VertexAttrib1sNV@8)
+ GL_STUB(VertexAttrib1svNV, 729, VertexAttrib1svNV@8)
+ GL_STUB(VertexAttrib2dNV, 730, VertexAttrib2dNV@20)
+ GL_STUB(VertexAttrib2dvNV, 731, VertexAttrib2dvNV@8)
+ GL_STUB(VertexAttrib2fNV, 732, VertexAttrib2fNV@12)
+ GL_STUB(VertexAttrib2fvNV, 733, VertexAttrib2fvNV@8)
+ GL_STUB(VertexAttrib2sNV, 734, VertexAttrib2sNV@12)
+ GL_STUB(VertexAttrib2svNV, 735, VertexAttrib2svNV@8)
+ GL_STUB(VertexAttrib3dNV, 736, VertexAttrib3dNV@28)
+ GL_STUB(VertexAttrib3dvNV, 737, VertexAttrib3dvNV@8)
+ GL_STUB(VertexAttrib3fNV, 738, VertexAttrib3fNV@16)
+ GL_STUB(VertexAttrib3fvNV, 739, VertexAttrib3fvNV@8)
+ GL_STUB(VertexAttrib3sNV, 740, VertexAttrib3sNV@16)
+ GL_STUB(VertexAttrib3svNV, 741, VertexAttrib3svNV@8)
+ GL_STUB(VertexAttrib4dNV, 742, VertexAttrib4dNV@36)
+ GL_STUB(VertexAttrib4dvNV, 743, VertexAttrib4dvNV@8)
+ GL_STUB(VertexAttrib4fNV, 744, VertexAttrib4fNV@20)
+ GL_STUB(VertexAttrib4fvNV, 745, VertexAttrib4fvNV@8)
+ GL_STUB(VertexAttrib4sNV, 746, VertexAttrib4sNV@20)
+ GL_STUB(VertexAttrib4svNV, 747, VertexAttrib4svNV@8)
+ GL_STUB(VertexAttrib4ubNV, 748, VertexAttrib4ubNV@20)
+ GL_STUB(VertexAttrib4ubvNV, 749, VertexAttrib4ubvNV@8)
+ GL_STUB(VertexAttribPointerNV, 750, VertexAttribPointerNV@20)
+ GL_STUB(VertexAttribs1dvNV, 751, VertexAttribs1dvNV@12)
+ GL_STUB(VertexAttribs1fvNV, 752, VertexAttribs1fvNV@12)
+ GL_STUB(VertexAttribs1svNV, 753, VertexAttribs1svNV@12)
+ GL_STUB(VertexAttribs2dvNV, 754, VertexAttribs2dvNV@12)
+ GL_STUB(VertexAttribs2fvNV, 755, VertexAttribs2fvNV@12)
+ GL_STUB(VertexAttribs2svNV, 756, VertexAttribs2svNV@12)
+ GL_STUB(VertexAttribs3dvNV, 757, VertexAttribs3dvNV@12)
+ GL_STUB(VertexAttribs3fvNV, 758, VertexAttribs3fvNV@12)
+ GL_STUB(VertexAttribs3svNV, 759, VertexAttribs3svNV@12)
+ GL_STUB(VertexAttribs4dvNV, 760, VertexAttribs4dvNV@12)
+ GL_STUB(VertexAttribs4fvNV, 761, VertexAttribs4fvNV@12)
+ GL_STUB(VertexAttribs4svNV, 762, VertexAttribs4svNV@12)
+ GL_STUB(VertexAttribs4ubvNV, 763, VertexAttribs4ubvNV@12)
+ GL_STUB(GetTexBumpParameterfvATI, 764, GetTexBumpParameterfvATI@8)
+ GL_STUB(GetTexBumpParameterivATI, 765, GetTexBumpParameterivATI@8)
+ GL_STUB(TexBumpParameterfvATI, 766, TexBumpParameterfvATI@8)
+ GL_STUB(TexBumpParameterivATI, 767, TexBumpParameterivATI@8)
+ GL_STUB(AlphaFragmentOp1ATI, 768, AlphaFragmentOp1ATI@24)
+ GL_STUB(AlphaFragmentOp2ATI, 769, AlphaFragmentOp2ATI@36)
+ GL_STUB(AlphaFragmentOp3ATI, 770, AlphaFragmentOp3ATI@48)
+ GL_STUB(BeginFragmentShaderATI, 771, BeginFragmentShaderATI@0)
+ GL_STUB(BindFragmentShaderATI, 772, BindFragmentShaderATI@4)
+ GL_STUB(ColorFragmentOp1ATI, 773, ColorFragmentOp1ATI@28)
+ GL_STUB(ColorFragmentOp2ATI, 774, ColorFragmentOp2ATI@40)
+ GL_STUB(ColorFragmentOp3ATI, 775, ColorFragmentOp3ATI@52)
+ GL_STUB(DeleteFragmentShaderATI, 776, DeleteFragmentShaderATI@4)
+ GL_STUB(EndFragmentShaderATI, 777, EndFragmentShaderATI@0)
+ GL_STUB(GenFragmentShadersATI, 778, GenFragmentShadersATI@4)
+ GL_STUB(PassTexCoordATI, 779, PassTexCoordATI@12)
+ GL_STUB(SampleMapATI, 780, SampleMapATI@12)
+ GL_STUB(SetFragmentShaderConstantATI, 781, SetFragmentShaderConstantATI@8)
+ GL_STUB(PointParameteriNV, 782, PointParameteriNV@8)
+ GL_STUB(PointParameterivNV, 783, PointParameterivNV@8)
+ GL_STUB(_dispatch_stub_784, 784, _dispatch_stub_784@4)
+ HIDDEN(GL_PREFIX(_dispatch_stub_784, _dispatch_stub_784@4))
+ GL_STUB(_dispatch_stub_785, 785, _dispatch_stub_785@4)
+ HIDDEN(GL_PREFIX(_dispatch_stub_785, _dispatch_stub_785@4))
+ GL_STUB(_dispatch_stub_786, 786, _dispatch_stub_786@8)
+ HIDDEN(GL_PREFIX(_dispatch_stub_786, _dispatch_stub_786@8))
+ GL_STUB(_dispatch_stub_787, 787, _dispatch_stub_787@8)
+ HIDDEN(GL_PREFIX(_dispatch_stub_787, _dispatch_stub_787@8))
+ GL_STUB(_dispatch_stub_788, 788, _dispatch_stub_788@4)
+ HIDDEN(GL_PREFIX(_dispatch_stub_788, _dispatch_stub_788@4))
+ GL_STUB(GetProgramNamedParameterdvNV, 789, GetProgramNamedParameterdvNV@16)
+ GL_STUB(GetProgramNamedParameterfvNV, 790, GetProgramNamedParameterfvNV@16)
+ GL_STUB(ProgramNamedParameter4dNV, 791, ProgramNamedParameter4dNV@44)
+ GL_STUB(ProgramNamedParameter4dvNV, 792, ProgramNamedParameter4dvNV@16)
+ GL_STUB(ProgramNamedParameter4fNV, 793, ProgramNamedParameter4fNV@28)
+ GL_STUB(ProgramNamedParameter4fvNV, 794, ProgramNamedParameter4fvNV@16)
+ GL_STUB(PrimitiveRestartIndexNV, 795, PrimitiveRestartIndexNV@4)
+ GL_STUB(PrimitiveRestartNV, 796, PrimitiveRestartNV@0)
+ GL_STUB(_dispatch_stub_797, 797, _dispatch_stub_797@16)
+ HIDDEN(GL_PREFIX(_dispatch_stub_797, _dispatch_stub_797@16))
+ GL_STUB(_dispatch_stub_798, 798, _dispatch_stub_798@8)
+ HIDDEN(GL_PREFIX(_dispatch_stub_798, _dispatch_stub_798@8))
+ GL_STUB(BindFramebufferEXT, 799, BindFramebufferEXT@8)
+ GL_STUB(BindRenderbufferEXT, 800, BindRenderbufferEXT@8)
+ GL_STUB(CheckFramebufferStatusEXT, 801, CheckFramebufferStatusEXT@4)
+ GL_STUB(DeleteFramebuffersEXT, 802, DeleteFramebuffersEXT@8)
+ GL_STUB(DeleteRenderbuffersEXT, 803, DeleteRenderbuffersEXT@8)
+ GL_STUB(FramebufferRenderbufferEXT, 804, FramebufferRenderbufferEXT@16)
+ GL_STUB(FramebufferTexture1DEXT, 805, FramebufferTexture1DEXT@20)
+ GL_STUB(FramebufferTexture2DEXT, 806, FramebufferTexture2DEXT@20)
+ GL_STUB(FramebufferTexture3DEXT, 807, FramebufferTexture3DEXT@24)
+ GL_STUB(GenFramebuffersEXT, 808, GenFramebuffersEXT@8)
+ GL_STUB(GenRenderbuffersEXT, 809, GenRenderbuffersEXT@8)
+ GL_STUB(GenerateMipmapEXT, 810, GenerateMipmapEXT@4)
+ GL_STUB(GetFramebufferAttachmentParameterivEXT, 811, GetFramebufferAttachmentParameterivEXT@16)
+ GL_STUB(GetRenderbufferParameterivEXT, 812, GetRenderbufferParameterivEXT@12)
+ GL_STUB(IsFramebufferEXT, 813, IsFramebufferEXT@4)
+ GL_STUB(IsRenderbufferEXT, 814, IsRenderbufferEXT@4)
+ GL_STUB(RenderbufferStorageEXT, 815, RenderbufferStorageEXT@16)
+ GL_STUB(_dispatch_stub_816, 816, _dispatch_stub_816@40)
+ HIDDEN(GL_PREFIX(_dispatch_stub_816, _dispatch_stub_816@40))
+ GL_STUB(_dispatch_stub_817, 817, _dispatch_stub_817@12)
+ HIDDEN(GL_PREFIX(_dispatch_stub_817, _dispatch_stub_817@12))
+ GL_STUB(_dispatch_stub_818, 818, _dispatch_stub_818@12)
+ HIDDEN(GL_PREFIX(_dispatch_stub_818, _dispatch_stub_818@12))
+ GL_STUB(BindFragDataLocationEXT, 819, BindFragDataLocationEXT@12)
+ GL_STUB(GetFragDataLocationEXT, 820, GetFragDataLocationEXT@8)
+ GL_STUB(GetUniformuivEXT, 821, GetUniformuivEXT@12)
+ GL_STUB(GetVertexAttribIivEXT, 822, GetVertexAttribIivEXT@12)
+ GL_STUB(GetVertexAttribIuivEXT, 823, GetVertexAttribIuivEXT@12)
+ GL_STUB(Uniform1uiEXT, 824, Uniform1uiEXT@8)
+ GL_STUB(Uniform1uivEXT, 825, Uniform1uivEXT@12)
+ GL_STUB(Uniform2uiEXT, 826, Uniform2uiEXT@12)
+ GL_STUB(Uniform2uivEXT, 827, Uniform2uivEXT@12)
+ GL_STUB(Uniform3uiEXT, 828, Uniform3uiEXT@16)
+ GL_STUB(Uniform3uivEXT, 829, Uniform3uivEXT@12)
+ GL_STUB(Uniform4uiEXT, 830, Uniform4uiEXT@20)
+ GL_STUB(Uniform4uivEXT, 831, Uniform4uivEXT@12)
+ GL_STUB(VertexAttribI1iEXT, 832, VertexAttribI1iEXT@8)
+ GL_STUB(VertexAttribI1ivEXT, 833, VertexAttribI1ivEXT@8)
+ GL_STUB(VertexAttribI1uiEXT, 834, VertexAttribI1uiEXT@8)
+ GL_STUB(VertexAttribI1uivEXT, 835, VertexAttribI1uivEXT@8)
+ GL_STUB(VertexAttribI2iEXT, 836, VertexAttribI2iEXT@12)
+ GL_STUB(VertexAttribI2ivEXT, 837, VertexAttribI2ivEXT@8)
+ GL_STUB(VertexAttribI2uiEXT, 838, VertexAttribI2uiEXT@12)
+ GL_STUB(VertexAttribI2uivEXT, 839, VertexAttribI2uivEXT@8)
+ GL_STUB(VertexAttribI3iEXT, 840, VertexAttribI3iEXT@16)
+ GL_STUB(VertexAttribI3ivEXT, 841, VertexAttribI3ivEXT@8)
+ GL_STUB(VertexAttribI3uiEXT, 842, VertexAttribI3uiEXT@16)
+ GL_STUB(VertexAttribI3uivEXT, 843, VertexAttribI3uivEXT@8)
+ GL_STUB(VertexAttribI4bvEXT, 844, VertexAttribI4bvEXT@8)
+ GL_STUB(VertexAttribI4iEXT, 845, VertexAttribI4iEXT@20)
+ GL_STUB(VertexAttribI4ivEXT, 846, VertexAttribI4ivEXT@8)
+ GL_STUB(VertexAttribI4svEXT, 847, VertexAttribI4svEXT@8)
+ GL_STUB(VertexAttribI4ubvEXT, 848, VertexAttribI4ubvEXT@8)
+ GL_STUB(VertexAttribI4uiEXT, 849, VertexAttribI4uiEXT@20)
+ GL_STUB(VertexAttribI4uivEXT, 850, VertexAttribI4uivEXT@8)
+ GL_STUB(VertexAttribI4usvEXT, 851, VertexAttribI4usvEXT@8)
+ GL_STUB(VertexAttribIPointerEXT, 852, VertexAttribIPointerEXT@20)
+ GL_STUB(FramebufferTextureLayerEXT, 853, FramebufferTextureLayerEXT@20)
+ GL_STUB(ColorMaskIndexedEXT, 854, ColorMaskIndexedEXT@20)
+ GL_STUB(DisableIndexedEXT, 855, DisableIndexedEXT@8)
+ GL_STUB(EnableIndexedEXT, 856, EnableIndexedEXT@8)
+ GL_STUB(GetBooleanIndexedvEXT, 857, GetBooleanIndexedvEXT@12)
+ GL_STUB(GetIntegerIndexedvEXT, 858, GetIntegerIndexedvEXT@12)
+ GL_STUB(IsEnabledIndexedEXT, 859, IsEnabledIndexedEXT@8)
+ GL_STUB(ClearColorIiEXT, 860, ClearColorIiEXT@16)
+ GL_STUB(ClearColorIuiEXT, 861, ClearColorIuiEXT@16)
+ GL_STUB(GetTexParameterIivEXT, 862, GetTexParameterIivEXT@12)
+ GL_STUB(GetTexParameterIuivEXT, 863, GetTexParameterIuivEXT@12)
+ GL_STUB(TexParameterIivEXT, 864, TexParameterIivEXT@12)
+ GL_STUB(TexParameterIuivEXT, 865, TexParameterIuivEXT@12)
+ GL_STUB(BeginConditionalRenderNV, 866, BeginConditionalRenderNV@8)
+ GL_STUB(EndConditionalRenderNV, 867, EndConditionalRenderNV@0)
+ GL_STUB(BeginTransformFeedbackEXT, 868, BeginTransformFeedbackEXT@4)
+ GL_STUB(BindBufferBaseEXT, 869, BindBufferBaseEXT@12)
+ GL_STUB(BindBufferOffsetEXT, 870, BindBufferOffsetEXT@16)
+ GL_STUB(BindBufferRangeEXT, 871, BindBufferRangeEXT@20)
+ GL_STUB(EndTransformFeedbackEXT, 872, EndTransformFeedbackEXT@0)
+ GL_STUB(GetTransformFeedbackVaryingEXT, 873, GetTransformFeedbackVaryingEXT@28)
+ GL_STUB(TransformFeedbackVaryingsEXT, 874, TransformFeedbackVaryingsEXT@16)
+ GL_STUB(ProvokingVertexEXT, 875, ProvokingVertexEXT@4)
+ GL_STUB(_dispatch_stub_876, 876, _dispatch_stub_876@12)
+ HIDDEN(GL_PREFIX(_dispatch_stub_876, _dispatch_stub_876@12))
GL_STUB(_dispatch_stub_877, 877, _dispatch_stub_877@12)
HIDDEN(GL_PREFIX(_dispatch_stub_877, _dispatch_stub_877@12))
- GL_STUB(_dispatch_stub_878, 878, _dispatch_stub_878@12)
- HIDDEN(GL_PREFIX(_dispatch_stub_878, _dispatch_stub_878@12))
- GL_STUB(EGLImageTargetRenderbufferStorageOES, 879, EGLImageTargetRenderbufferStorageOES@8)
- GL_STUB(EGLImageTargetTexture2DOES, 880, EGLImageTargetTexture2DOES@8)
+ GL_STUB(GetObjectParameterivAPPLE, 878, GetObjectParameterivAPPLE@16)
+ GL_STUB(ObjectPurgeableAPPLE, 879, ObjectPurgeableAPPLE@12)
+ GL_STUB(ObjectUnpurgeableAPPLE, 880, ObjectUnpurgeableAPPLE@12)
+ GL_STUB(ActiveProgramEXT, 881, ActiveProgramEXT@4)
+ GL_STUB(CreateShaderProgramEXT, 882, CreateShaderProgramEXT@8)
+ GL_STUB(UseShaderProgramEXT, 883, UseShaderProgramEXT@8)
+ GL_STUB(TextureBarrierNV, 884, TextureBarrierNV@0)
+ GL_STUB(_dispatch_stub_885, 885, _dispatch_stub_885@16)
+ HIDDEN(GL_PREFIX(_dispatch_stub_885, _dispatch_stub_885@16))
+ GL_STUB(_dispatch_stub_886, 886, _dispatch_stub_886@16)
+ HIDDEN(GL_PREFIX(_dispatch_stub_886, _dispatch_stub_886@16))
+ GL_STUB(_dispatch_stub_887, 887, _dispatch_stub_887@16)
+ HIDDEN(GL_PREFIX(_dispatch_stub_887, _dispatch_stub_887@16))
+ GL_STUB(_dispatch_stub_888, 888, _dispatch_stub_888@12)
+ HIDDEN(GL_PREFIX(_dispatch_stub_888, _dispatch_stub_888@12))
+ GL_STUB(_dispatch_stub_889, 889, _dispatch_stub_889@12)
+ HIDDEN(GL_PREFIX(_dispatch_stub_889, _dispatch_stub_889@12))
+ GL_STUB(EGLImageTargetRenderbufferStorageOES, 890, EGLImageTargetRenderbufferStorageOES@8)
+ GL_STUB(EGLImageTargetTexture2DOES, 891, EGLImageTargetTexture2DOES@8)
GL_STUB_ALIAS(ArrayElementEXT, 306, ArrayElementEXT@4, ArrayElement, ArrayElement@4)
GL_STUB_ALIAS(BindTextureEXT, 307, BindTextureEXT@8, BindTexture, BindTexture@8)
GL_STUB_ALIAS(DrawArraysEXT, 310, DrawArraysEXT@12, DrawArrays, DrawArrays@12)
@@ -1255,151 +1266,151 @@ GLNAME(gl_dispatch_functions_start):
GL_STUB_ALIAS(DrawElementsInstancedEXT, 573, DrawElementsInstancedEXT@20, DrawElementsInstancedARB, DrawElementsInstancedARB@20)
GL_STUB_ALIAS(DrawElementsInstanced, 573, DrawElementsInstanced@20, DrawElementsInstancedARB, DrawElementsInstancedARB@20)
GL_STUB_ALIAS(RenderbufferStorageMultisampleEXT, 574, RenderbufferStorageMultisampleEXT@20, RenderbufferStorageMultisample, RenderbufferStorageMultisample@20)
- GL_STUB_ALIAS(PointParameterf, 615, PointParameterf@8, PointParameterfEXT, PointParameterfEXT@8)
- GL_STUB_ALIAS(PointParameterfARB, 615, PointParameterfARB@8, PointParameterfEXT, PointParameterfEXT@8)
- GL_STUB_ALIAS(PointParameterfv, 616, PointParameterfv@8, PointParameterfvEXT, PointParameterfvEXT@8)
- GL_STUB_ALIAS(PointParameterfvARB, 616, PointParameterfvARB@8, PointParameterfvEXT, PointParameterfvEXT@8)
- GL_STUB_ALIAS(SecondaryColor3b, 619, SecondaryColor3b@12, SecondaryColor3bEXT, SecondaryColor3bEXT@12)
- GL_STUB_ALIAS(SecondaryColor3bv, 620, SecondaryColor3bv@4, SecondaryColor3bvEXT, SecondaryColor3bvEXT@4)
- GL_STUB_ALIAS(SecondaryColor3d, 621, SecondaryColor3d@24, SecondaryColor3dEXT, SecondaryColor3dEXT@24)
- GL_STUB_ALIAS(SecondaryColor3dv, 622, SecondaryColor3dv@4, SecondaryColor3dvEXT, SecondaryColor3dvEXT@4)
- GL_STUB_ALIAS(SecondaryColor3f, 623, SecondaryColor3f@12, SecondaryColor3fEXT, SecondaryColor3fEXT@12)
- GL_STUB_ALIAS(SecondaryColor3fv, 624, SecondaryColor3fv@4, SecondaryColor3fvEXT, SecondaryColor3fvEXT@4)
- GL_STUB_ALIAS(SecondaryColor3i, 625, SecondaryColor3i@12, SecondaryColor3iEXT, SecondaryColor3iEXT@12)
- GL_STUB_ALIAS(SecondaryColor3iv, 626, SecondaryColor3iv@4, SecondaryColor3ivEXT, SecondaryColor3ivEXT@4)
- GL_STUB_ALIAS(SecondaryColor3s, 627, SecondaryColor3s@12, SecondaryColor3sEXT, SecondaryColor3sEXT@12)
- GL_STUB_ALIAS(SecondaryColor3sv, 628, SecondaryColor3sv@4, SecondaryColor3svEXT, SecondaryColor3svEXT@4)
- GL_STUB_ALIAS(SecondaryColor3ub, 629, SecondaryColor3ub@12, SecondaryColor3ubEXT, SecondaryColor3ubEXT@12)
- GL_STUB_ALIAS(SecondaryColor3ubv, 630, SecondaryColor3ubv@4, SecondaryColor3ubvEXT, SecondaryColor3ubvEXT@4)
- GL_STUB_ALIAS(SecondaryColor3ui, 631, SecondaryColor3ui@12, SecondaryColor3uiEXT, SecondaryColor3uiEXT@12)
- GL_STUB_ALIAS(SecondaryColor3uiv, 632, SecondaryColor3uiv@4, SecondaryColor3uivEXT, SecondaryColor3uivEXT@4)
- GL_STUB_ALIAS(SecondaryColor3us, 633, SecondaryColor3us@12, SecondaryColor3usEXT, SecondaryColor3usEXT@12)
- GL_STUB_ALIAS(SecondaryColor3usv, 634, SecondaryColor3usv@4, SecondaryColor3usvEXT, SecondaryColor3usvEXT@4)
- GL_STUB_ALIAS(SecondaryColorPointer, 635, SecondaryColorPointer@16, SecondaryColorPointerEXT, SecondaryColorPointerEXT@16)
- GL_STUB_ALIAS(MultiDrawArrays, 636, MultiDrawArrays@16, MultiDrawArraysEXT, MultiDrawArraysEXT@16)
- GL_STUB_ALIAS(MultiDrawElements, 637, MultiDrawElements@20, MultiDrawElementsEXT, MultiDrawElementsEXT@20)
- GL_STUB_ALIAS(FogCoordPointer, 638, FogCoordPointer@12, FogCoordPointerEXT, FogCoordPointerEXT@12)
- GL_STUB_ALIAS(FogCoordd, 639, FogCoordd@8, FogCoorddEXT, FogCoorddEXT@8)
- GL_STUB_ALIAS(FogCoorddv, 640, FogCoorddv@4, FogCoorddvEXT, FogCoorddvEXT@4)
- GL_STUB_ALIAS(FogCoordf, 641, FogCoordf@4, FogCoordfEXT, FogCoordfEXT@4)
- GL_STUB_ALIAS(FogCoordfv, 642, FogCoordfv@4, FogCoordfvEXT, FogCoordfvEXT@4)
- GL_STUB_ALIAS(BlendFuncSeparate, 644, BlendFuncSeparate@16, BlendFuncSeparateEXT, BlendFuncSeparateEXT@16)
- GL_STUB_ALIAS(WindowPos2d, 661, WindowPos2d@16, WindowPos2dMESA, WindowPos2dMESA@16)
- GL_STUB_ALIAS(WindowPos2dARB, 661, WindowPos2dARB@16, WindowPos2dMESA, WindowPos2dMESA@16)
- GL_STUB_ALIAS(WindowPos2dv, 662, WindowPos2dv@4, WindowPos2dvMESA, WindowPos2dvMESA@4)
- GL_STUB_ALIAS(WindowPos2dvARB, 662, WindowPos2dvARB@4, WindowPos2dvMESA, WindowPos2dvMESA@4)
- GL_STUB_ALIAS(WindowPos2f, 663, WindowPos2f@8, WindowPos2fMESA, WindowPos2fMESA@8)
- GL_STUB_ALIAS(WindowPos2fARB, 663, WindowPos2fARB@8, WindowPos2fMESA, WindowPos2fMESA@8)
- GL_STUB_ALIAS(WindowPos2fv, 664, WindowPos2fv@4, WindowPos2fvMESA, WindowPos2fvMESA@4)
- GL_STUB_ALIAS(WindowPos2fvARB, 664, WindowPos2fvARB@4, WindowPos2fvMESA, WindowPos2fvMESA@4)
- GL_STUB_ALIAS(WindowPos2i, 665, WindowPos2i@8, WindowPos2iMESA, WindowPos2iMESA@8)
- GL_STUB_ALIAS(WindowPos2iARB, 665, WindowPos2iARB@8, WindowPos2iMESA, WindowPos2iMESA@8)
- GL_STUB_ALIAS(WindowPos2iv, 666, WindowPos2iv@4, WindowPos2ivMESA, WindowPos2ivMESA@4)
- GL_STUB_ALIAS(WindowPos2ivARB, 666, WindowPos2ivARB@4, WindowPos2ivMESA, WindowPos2ivMESA@4)
- GL_STUB_ALIAS(WindowPos2s, 667, WindowPos2s@8, WindowPos2sMESA, WindowPos2sMESA@8)
- GL_STUB_ALIAS(WindowPos2sARB, 667, WindowPos2sARB@8, WindowPos2sMESA, WindowPos2sMESA@8)
- GL_STUB_ALIAS(WindowPos2sv, 668, WindowPos2sv@4, WindowPos2svMESA, WindowPos2svMESA@4)
- GL_STUB_ALIAS(WindowPos2svARB, 668, WindowPos2svARB@4, WindowPos2svMESA, WindowPos2svMESA@4)
- GL_STUB_ALIAS(WindowPos3d, 669, WindowPos3d@24, WindowPos3dMESA, WindowPos3dMESA@24)
- GL_STUB_ALIAS(WindowPos3dARB, 669, WindowPos3dARB@24, WindowPos3dMESA, WindowPos3dMESA@24)
- GL_STUB_ALIAS(WindowPos3dv, 670, WindowPos3dv@4, WindowPos3dvMESA, WindowPos3dvMESA@4)
- GL_STUB_ALIAS(WindowPos3dvARB, 670, WindowPos3dvARB@4, WindowPos3dvMESA, WindowPos3dvMESA@4)
- GL_STUB_ALIAS(WindowPos3f, 671, WindowPos3f@12, WindowPos3fMESA, WindowPos3fMESA@12)
- GL_STUB_ALIAS(WindowPos3fARB, 671, WindowPos3fARB@12, WindowPos3fMESA, WindowPos3fMESA@12)
- GL_STUB_ALIAS(WindowPos3fv, 672, WindowPos3fv@4, WindowPos3fvMESA, WindowPos3fvMESA@4)
- GL_STUB_ALIAS(WindowPos3fvARB, 672, WindowPos3fvARB@4, WindowPos3fvMESA, WindowPos3fvMESA@4)
- GL_STUB_ALIAS(WindowPos3i, 673, WindowPos3i@12, WindowPos3iMESA, WindowPos3iMESA@12)
- GL_STUB_ALIAS(WindowPos3iARB, 673, WindowPos3iARB@12, WindowPos3iMESA, WindowPos3iMESA@12)
- GL_STUB_ALIAS(WindowPos3iv, 674, WindowPos3iv@4, WindowPos3ivMESA, WindowPos3ivMESA@4)
- GL_STUB_ALIAS(WindowPos3ivARB, 674, WindowPos3ivARB@4, WindowPos3ivMESA, WindowPos3ivMESA@4)
- GL_STUB_ALIAS(WindowPos3s, 675, WindowPos3s@12, WindowPos3sMESA, WindowPos3sMESA@12)
- GL_STUB_ALIAS(WindowPos3sARB, 675, WindowPos3sARB@12, WindowPos3sMESA, WindowPos3sMESA@12)
- GL_STUB_ALIAS(WindowPos3sv, 676, WindowPos3sv@4, WindowPos3svMESA, WindowPos3svMESA@4)
- GL_STUB_ALIAS(WindowPos3svARB, 676, WindowPos3svARB@4, WindowPos3svMESA, WindowPos3svMESA@4)
- GL_STUB_ALIAS(BindProgramARB, 695, BindProgramARB@8, BindProgramNV, BindProgramNV@8)
- GL_STUB_ALIAS(DeleteProgramsARB, 696, DeleteProgramsARB@8, DeleteProgramsNV, DeleteProgramsNV@8)
- GL_STUB_ALIAS(GenProgramsARB, 698, GenProgramsARB@8, GenProgramsNV, GenProgramsNV@8)
- GL_STUB_ALIAS(GetVertexAttribPointerv, 704, GetVertexAttribPointerv@12, GetVertexAttribPointervNV, GetVertexAttribPointervNV@12)
- GL_STUB_ALIAS(GetVertexAttribPointervARB, 704, GetVertexAttribPointervARB@12, GetVertexAttribPointervNV, GetVertexAttribPointervNV@12)
- GL_STUB_ALIAS(IsProgramARB, 708, IsProgramARB@4, IsProgramNV, IsProgramNV@4)
- GL_STUB_ALIAS(PointParameteri, 772, PointParameteri@8, PointParameteriNV, PointParameteriNV@8)
- GL_STUB_ALIAS(PointParameteriv, 773, PointParameteriv@8, PointParameterivNV, PointParameterivNV@8)
- GL_STUB_ALIAS(DeleteVertexArrays, 776, DeleteVertexArrays@8, _dispatch_stub_776, _dispatch_stub_776@8)
- GL_STUB_ALIAS(IsVertexArray, 778, IsVertexArray@4, _dispatch_stub_778, _dispatch_stub_778@4)
- GL_STUB_ALIAS(PrimitiveRestartIndex, 785, PrimitiveRestartIndex@4, PrimitiveRestartIndexNV, PrimitiveRestartIndexNV@4)
- GL_STUB_ALIAS(BlendEquationSeparate, 788, BlendEquationSeparate@8, _dispatch_stub_788, _dispatch_stub_788@8)
- GL_STUB_ALIAS(BindFramebuffer, 789, BindFramebuffer@8, BindFramebufferEXT, BindFramebufferEXT@8)
- GL_STUB_ALIAS(BindRenderbuffer, 790, BindRenderbuffer@8, BindRenderbufferEXT, BindRenderbufferEXT@8)
- GL_STUB_ALIAS(CheckFramebufferStatus, 791, CheckFramebufferStatus@4, CheckFramebufferStatusEXT, CheckFramebufferStatusEXT@4)
- GL_STUB_ALIAS(DeleteFramebuffers, 792, DeleteFramebuffers@8, DeleteFramebuffersEXT, DeleteFramebuffersEXT@8)
- GL_STUB_ALIAS(DeleteRenderbuffers, 793, DeleteRenderbuffers@8, DeleteRenderbuffersEXT, DeleteRenderbuffersEXT@8)
- GL_STUB_ALIAS(FramebufferRenderbuffer, 794, FramebufferRenderbuffer@16, FramebufferRenderbufferEXT, FramebufferRenderbufferEXT@16)
- GL_STUB_ALIAS(FramebufferTexture1D, 795, FramebufferTexture1D@20, FramebufferTexture1DEXT, FramebufferTexture1DEXT@20)
- GL_STUB_ALIAS(FramebufferTexture2D, 796, FramebufferTexture2D@20, FramebufferTexture2DEXT, FramebufferTexture2DEXT@20)
- GL_STUB_ALIAS(FramebufferTexture3D, 797, FramebufferTexture3D@24, FramebufferTexture3DEXT, FramebufferTexture3DEXT@24)
- GL_STUB_ALIAS(GenFramebuffers, 798, GenFramebuffers@8, GenFramebuffersEXT, GenFramebuffersEXT@8)
- GL_STUB_ALIAS(GenRenderbuffers, 799, GenRenderbuffers@8, GenRenderbuffersEXT, GenRenderbuffersEXT@8)
- GL_STUB_ALIAS(GenerateMipmap, 800, GenerateMipmap@4, GenerateMipmapEXT, GenerateMipmapEXT@4)
- GL_STUB_ALIAS(GetFramebufferAttachmentParameteriv, 801, GetFramebufferAttachmentParameteriv@16, GetFramebufferAttachmentParameterivEXT, GetFramebufferAttachmentParameterivEXT@16)
- GL_STUB_ALIAS(GetRenderbufferParameteriv, 802, GetRenderbufferParameteriv@12, GetRenderbufferParameterivEXT, GetRenderbufferParameterivEXT@12)
- GL_STUB_ALIAS(IsFramebuffer, 803, IsFramebuffer@4, IsFramebufferEXT, IsFramebufferEXT@4)
- GL_STUB_ALIAS(IsRenderbuffer, 804, IsRenderbuffer@4, IsRenderbufferEXT, IsRenderbufferEXT@4)
- GL_STUB_ALIAS(RenderbufferStorage, 805, RenderbufferStorage@16, RenderbufferStorageEXT, RenderbufferStorageEXT@16)
- GL_STUB_ALIAS(BlitFramebuffer, 806, BlitFramebuffer@40, _dispatch_stub_806, _dispatch_stub_806@40)
- GL_STUB_ALIAS(BindFragDataLocation, 809, BindFragDataLocation@12, BindFragDataLocationEXT, BindFragDataLocationEXT@12)
- GL_STUB_ALIAS(GetFragDataLocation, 810, GetFragDataLocation@8, GetFragDataLocationEXT, GetFragDataLocationEXT@8)
- GL_STUB_ALIAS(GetUniformuiv, 811, GetUniformuiv@12, GetUniformuivEXT, GetUniformuivEXT@12)
- GL_STUB_ALIAS(GetVertexAttribIiv, 812, GetVertexAttribIiv@12, GetVertexAttribIivEXT, GetVertexAttribIivEXT@12)
- GL_STUB_ALIAS(GetVertexAttribIuiv, 813, GetVertexAttribIuiv@12, GetVertexAttribIuivEXT, GetVertexAttribIuivEXT@12)
- GL_STUB_ALIAS(Uniform1ui, 814, Uniform1ui@8, Uniform1uiEXT, Uniform1uiEXT@8)
- GL_STUB_ALIAS(Uniform1uiv, 815, Uniform1uiv@12, Uniform1uivEXT, Uniform1uivEXT@12)
- GL_STUB_ALIAS(Uniform2ui, 816, Uniform2ui@12, Uniform2uiEXT, Uniform2uiEXT@12)
- GL_STUB_ALIAS(Uniform2uiv, 817, Uniform2uiv@12, Uniform2uivEXT, Uniform2uivEXT@12)
- GL_STUB_ALIAS(Uniform3ui, 818, Uniform3ui@16, Uniform3uiEXT, Uniform3uiEXT@16)
- GL_STUB_ALIAS(Uniform3uiv, 819, Uniform3uiv@12, Uniform3uivEXT, Uniform3uivEXT@12)
- GL_STUB_ALIAS(Uniform4ui, 820, Uniform4ui@20, Uniform4uiEXT, Uniform4uiEXT@20)
- GL_STUB_ALIAS(Uniform4uiv, 821, Uniform4uiv@12, Uniform4uivEXT, Uniform4uivEXT@12)
- GL_STUB_ALIAS(VertexAttribI1i, 822, VertexAttribI1i@8, VertexAttribI1iEXT, VertexAttribI1iEXT@8)
- GL_STUB_ALIAS(VertexAttribI1iv, 823, VertexAttribI1iv@8, VertexAttribI1ivEXT, VertexAttribI1ivEXT@8)
- GL_STUB_ALIAS(VertexAttribI1ui, 824, VertexAttribI1ui@8, VertexAttribI1uiEXT, VertexAttribI1uiEXT@8)
- GL_STUB_ALIAS(VertexAttribI1uiv, 825, VertexAttribI1uiv@8, VertexAttribI1uivEXT, VertexAttribI1uivEXT@8)
- GL_STUB_ALIAS(VertexAttribI2i, 826, VertexAttribI2i@12, VertexAttribI2iEXT, VertexAttribI2iEXT@12)
- GL_STUB_ALIAS(VertexAttribI2iv, 827, VertexAttribI2iv@8, VertexAttribI2ivEXT, VertexAttribI2ivEXT@8)
- GL_STUB_ALIAS(VertexAttribI2ui, 828, VertexAttribI2ui@12, VertexAttribI2uiEXT, VertexAttribI2uiEXT@12)
- GL_STUB_ALIAS(VertexAttribI2uiv, 829, VertexAttribI2uiv@8, VertexAttribI2uivEXT, VertexAttribI2uivEXT@8)
- GL_STUB_ALIAS(VertexAttribI3i, 830, VertexAttribI3i@16, VertexAttribI3iEXT, VertexAttribI3iEXT@16)
- GL_STUB_ALIAS(VertexAttribI3iv, 831, VertexAttribI3iv@8, VertexAttribI3ivEXT, VertexAttribI3ivEXT@8)
- GL_STUB_ALIAS(VertexAttribI3ui, 832, VertexAttribI3ui@16, VertexAttribI3uiEXT, VertexAttribI3uiEXT@16)
- GL_STUB_ALIAS(VertexAttribI3uiv, 833, VertexAttribI3uiv@8, VertexAttribI3uivEXT, VertexAttribI3uivEXT@8)
- GL_STUB_ALIAS(VertexAttribI4bv, 834, VertexAttribI4bv@8, VertexAttribI4bvEXT, VertexAttribI4bvEXT@8)
- GL_STUB_ALIAS(VertexAttribI4i, 835, VertexAttribI4i@20, VertexAttribI4iEXT, VertexAttribI4iEXT@20)
- GL_STUB_ALIAS(VertexAttribI4iv, 836, VertexAttribI4iv@8, VertexAttribI4ivEXT, VertexAttribI4ivEXT@8)
- GL_STUB_ALIAS(VertexAttribI4sv, 837, VertexAttribI4sv@8, VertexAttribI4svEXT, VertexAttribI4svEXT@8)
- GL_STUB_ALIAS(VertexAttribI4ubv, 838, VertexAttribI4ubv@8, VertexAttribI4ubvEXT, VertexAttribI4ubvEXT@8)
- GL_STUB_ALIAS(VertexAttribI4ui, 839, VertexAttribI4ui@20, VertexAttribI4uiEXT, VertexAttribI4uiEXT@20)
- GL_STUB_ALIAS(VertexAttribI4uiv, 840, VertexAttribI4uiv@8, VertexAttribI4uivEXT, VertexAttribI4uivEXT@8)
- GL_STUB_ALIAS(VertexAttribI4usv, 841, VertexAttribI4usv@8, VertexAttribI4usvEXT, VertexAttribI4usvEXT@8)
- GL_STUB_ALIAS(VertexAttribIPointer, 842, VertexAttribIPointer@20, VertexAttribIPointerEXT, VertexAttribIPointerEXT@20)
- GL_STUB_ALIAS(FramebufferTextureLayer, 843, FramebufferTextureLayer@20, FramebufferTextureLayerEXT, FramebufferTextureLayerEXT@20)
- GL_STUB_ALIAS(ColorMaski, 844, ColorMaski@20, ColorMaskIndexedEXT, ColorMaskIndexedEXT@20)
- GL_STUB_ALIAS(Disablei, 845, Disablei@8, DisableIndexedEXT, DisableIndexedEXT@8)
- GL_STUB_ALIAS(Enablei, 846, Enablei@8, EnableIndexedEXT, EnableIndexedEXT@8)
- GL_STUB_ALIAS(GetBooleani_v, 847, GetBooleani_v@12, GetBooleanIndexedvEXT, GetBooleanIndexedvEXT@12)
- GL_STUB_ALIAS(GetIntegeri_v, 848, GetIntegeri_v@12, GetIntegerIndexedvEXT, GetIntegerIndexedvEXT@12)
- GL_STUB_ALIAS(IsEnabledi, 849, IsEnabledi@8, IsEnabledIndexedEXT, IsEnabledIndexedEXT@8)
- GL_STUB_ALIAS(GetTexParameterIiv, 852, GetTexParameterIiv@12, GetTexParameterIivEXT, GetTexParameterIivEXT@12)
- GL_STUB_ALIAS(GetTexParameterIuiv, 853, GetTexParameterIuiv@12, GetTexParameterIuivEXT, GetTexParameterIuivEXT@12)
- GL_STUB_ALIAS(TexParameterIiv, 854, TexParameterIiv@12, TexParameterIivEXT, TexParameterIivEXT@12)
- GL_STUB_ALIAS(TexParameterIuiv, 855, TexParameterIuiv@12, TexParameterIuivEXT, TexParameterIuivEXT@12)
- GL_STUB_ALIAS(BeginConditionalRender, 856, BeginConditionalRender@8, BeginConditionalRenderNV, BeginConditionalRenderNV@8)
- GL_STUB_ALIAS(EndConditionalRender, 857, EndConditionalRender@0, EndConditionalRenderNV, EndConditionalRenderNV@0)
- GL_STUB_ALIAS(BeginTransformFeedback, 858, BeginTransformFeedback@4, BeginTransformFeedbackEXT, BeginTransformFeedbackEXT@4)
- GL_STUB_ALIAS(BindBufferBase, 859, BindBufferBase@12, BindBufferBaseEXT, BindBufferBaseEXT@12)
- GL_STUB_ALIAS(BindBufferRange, 861, BindBufferRange@20, BindBufferRangeEXT, BindBufferRangeEXT@20)
- GL_STUB_ALIAS(EndTransformFeedback, 862, EndTransformFeedback@0, EndTransformFeedbackEXT, EndTransformFeedbackEXT@0)
- GL_STUB_ALIAS(GetTransformFeedbackVarying, 863, GetTransformFeedbackVarying@28, GetTransformFeedbackVaryingEXT, GetTransformFeedbackVaryingEXT@28)
- GL_STUB_ALIAS(TransformFeedbackVaryings, 864, TransformFeedbackVaryings@16, TransformFeedbackVaryingsEXT, TransformFeedbackVaryingsEXT@16)
- GL_STUB_ALIAS(ProvokingVertex, 865, ProvokingVertex@4, ProvokingVertexEXT, ProvokingVertexEXT@4)
+ GL_STUB_ALIAS(PointParameterf, 625, PointParameterf@8, PointParameterfEXT, PointParameterfEXT@8)
+ GL_STUB_ALIAS(PointParameterfARB, 625, PointParameterfARB@8, PointParameterfEXT, PointParameterfEXT@8)
+ GL_STUB_ALIAS(PointParameterfv, 626, PointParameterfv@8, PointParameterfvEXT, PointParameterfvEXT@8)
+ GL_STUB_ALIAS(PointParameterfvARB, 626, PointParameterfvARB@8, PointParameterfvEXT, PointParameterfvEXT@8)
+ GL_STUB_ALIAS(SecondaryColor3b, 629, SecondaryColor3b@12, SecondaryColor3bEXT, SecondaryColor3bEXT@12)
+ GL_STUB_ALIAS(SecondaryColor3bv, 630, SecondaryColor3bv@4, SecondaryColor3bvEXT, SecondaryColor3bvEXT@4)
+ GL_STUB_ALIAS(SecondaryColor3d, 631, SecondaryColor3d@24, SecondaryColor3dEXT, SecondaryColor3dEXT@24)
+ GL_STUB_ALIAS(SecondaryColor3dv, 632, SecondaryColor3dv@4, SecondaryColor3dvEXT, SecondaryColor3dvEXT@4)
+ GL_STUB_ALIAS(SecondaryColor3f, 633, SecondaryColor3f@12, SecondaryColor3fEXT, SecondaryColor3fEXT@12)
+ GL_STUB_ALIAS(SecondaryColor3fv, 634, SecondaryColor3fv@4, SecondaryColor3fvEXT, SecondaryColor3fvEXT@4)
+ GL_STUB_ALIAS(SecondaryColor3i, 635, SecondaryColor3i@12, SecondaryColor3iEXT, SecondaryColor3iEXT@12)
+ GL_STUB_ALIAS(SecondaryColor3iv, 636, SecondaryColor3iv@4, SecondaryColor3ivEXT, SecondaryColor3ivEXT@4)
+ GL_STUB_ALIAS(SecondaryColor3s, 637, SecondaryColor3s@12, SecondaryColor3sEXT, SecondaryColor3sEXT@12)
+ GL_STUB_ALIAS(SecondaryColor3sv, 638, SecondaryColor3sv@4, SecondaryColor3svEXT, SecondaryColor3svEXT@4)
+ GL_STUB_ALIAS(SecondaryColor3ub, 639, SecondaryColor3ub@12, SecondaryColor3ubEXT, SecondaryColor3ubEXT@12)
+ GL_STUB_ALIAS(SecondaryColor3ubv, 640, SecondaryColor3ubv@4, SecondaryColor3ubvEXT, SecondaryColor3ubvEXT@4)
+ GL_STUB_ALIAS(SecondaryColor3ui, 641, SecondaryColor3ui@12, SecondaryColor3uiEXT, SecondaryColor3uiEXT@12)
+ GL_STUB_ALIAS(SecondaryColor3uiv, 642, SecondaryColor3uiv@4, SecondaryColor3uivEXT, SecondaryColor3uivEXT@4)
+ GL_STUB_ALIAS(SecondaryColor3us, 643, SecondaryColor3us@12, SecondaryColor3usEXT, SecondaryColor3usEXT@12)
+ GL_STUB_ALIAS(SecondaryColor3usv, 644, SecondaryColor3usv@4, SecondaryColor3usvEXT, SecondaryColor3usvEXT@4)
+ GL_STUB_ALIAS(SecondaryColorPointer, 645, SecondaryColorPointer@16, SecondaryColorPointerEXT, SecondaryColorPointerEXT@16)
+ GL_STUB_ALIAS(MultiDrawArrays, 646, MultiDrawArrays@16, MultiDrawArraysEXT, MultiDrawArraysEXT@16)
+ GL_STUB_ALIAS(MultiDrawElements, 647, MultiDrawElements@20, MultiDrawElementsEXT, MultiDrawElementsEXT@20)
+ GL_STUB_ALIAS(FogCoordPointer, 648, FogCoordPointer@12, FogCoordPointerEXT, FogCoordPointerEXT@12)
+ GL_STUB_ALIAS(FogCoordd, 649, FogCoordd@8, FogCoorddEXT, FogCoorddEXT@8)
+ GL_STUB_ALIAS(FogCoorddv, 650, FogCoorddv@4, FogCoorddvEXT, FogCoorddvEXT@4)
+ GL_STUB_ALIAS(FogCoordf, 651, FogCoordf@4, FogCoordfEXT, FogCoordfEXT@4)
+ GL_STUB_ALIAS(FogCoordfv, 652, FogCoordfv@4, FogCoordfvEXT, FogCoordfvEXT@4)
+ GL_STUB_ALIAS(BlendFuncSeparate, 654, BlendFuncSeparate@16, BlendFuncSeparateEXT, BlendFuncSeparateEXT@16)
+ GL_STUB_ALIAS(WindowPos2d, 671, WindowPos2d@16, WindowPos2dMESA, WindowPos2dMESA@16)
+ GL_STUB_ALIAS(WindowPos2dARB, 671, WindowPos2dARB@16, WindowPos2dMESA, WindowPos2dMESA@16)
+ GL_STUB_ALIAS(WindowPos2dv, 672, WindowPos2dv@4, WindowPos2dvMESA, WindowPos2dvMESA@4)
+ GL_STUB_ALIAS(WindowPos2dvARB, 672, WindowPos2dvARB@4, WindowPos2dvMESA, WindowPos2dvMESA@4)
+ GL_STUB_ALIAS(WindowPos2f, 673, WindowPos2f@8, WindowPos2fMESA, WindowPos2fMESA@8)
+ GL_STUB_ALIAS(WindowPos2fARB, 673, WindowPos2fARB@8, WindowPos2fMESA, WindowPos2fMESA@8)
+ GL_STUB_ALIAS(WindowPos2fv, 674, WindowPos2fv@4, WindowPos2fvMESA, WindowPos2fvMESA@4)
+ GL_STUB_ALIAS(WindowPos2fvARB, 674, WindowPos2fvARB@4, WindowPos2fvMESA, WindowPos2fvMESA@4)
+ GL_STUB_ALIAS(WindowPos2i, 675, WindowPos2i@8, WindowPos2iMESA, WindowPos2iMESA@8)
+ GL_STUB_ALIAS(WindowPos2iARB, 675, WindowPos2iARB@8, WindowPos2iMESA, WindowPos2iMESA@8)
+ GL_STUB_ALIAS(WindowPos2iv, 676, WindowPos2iv@4, WindowPos2ivMESA, WindowPos2ivMESA@4)
+ GL_STUB_ALIAS(WindowPos2ivARB, 676, WindowPos2ivARB@4, WindowPos2ivMESA, WindowPos2ivMESA@4)
+ GL_STUB_ALIAS(WindowPos2s, 677, WindowPos2s@8, WindowPos2sMESA, WindowPos2sMESA@8)
+ GL_STUB_ALIAS(WindowPos2sARB, 677, WindowPos2sARB@8, WindowPos2sMESA, WindowPos2sMESA@8)
+ GL_STUB_ALIAS(WindowPos2sv, 678, WindowPos2sv@4, WindowPos2svMESA, WindowPos2svMESA@4)
+ GL_STUB_ALIAS(WindowPos2svARB, 678, WindowPos2svARB@4, WindowPos2svMESA, WindowPos2svMESA@4)
+ GL_STUB_ALIAS(WindowPos3d, 679, WindowPos3d@24, WindowPos3dMESA, WindowPos3dMESA@24)
+ GL_STUB_ALIAS(WindowPos3dARB, 679, WindowPos3dARB@24, WindowPos3dMESA, WindowPos3dMESA@24)
+ GL_STUB_ALIAS(WindowPos3dv, 680, WindowPos3dv@4, WindowPos3dvMESA, WindowPos3dvMESA@4)
+ GL_STUB_ALIAS(WindowPos3dvARB, 680, WindowPos3dvARB@4, WindowPos3dvMESA, WindowPos3dvMESA@4)
+ GL_STUB_ALIAS(WindowPos3f, 681, WindowPos3f@12, WindowPos3fMESA, WindowPos3fMESA@12)
+ GL_STUB_ALIAS(WindowPos3fARB, 681, WindowPos3fARB@12, WindowPos3fMESA, WindowPos3fMESA@12)
+ GL_STUB_ALIAS(WindowPos3fv, 682, WindowPos3fv@4, WindowPos3fvMESA, WindowPos3fvMESA@4)
+ GL_STUB_ALIAS(WindowPos3fvARB, 682, WindowPos3fvARB@4, WindowPos3fvMESA, WindowPos3fvMESA@4)
+ GL_STUB_ALIAS(WindowPos3i, 683, WindowPos3i@12, WindowPos3iMESA, WindowPos3iMESA@12)
+ GL_STUB_ALIAS(WindowPos3iARB, 683, WindowPos3iARB@12, WindowPos3iMESA, WindowPos3iMESA@12)
+ GL_STUB_ALIAS(WindowPos3iv, 684, WindowPos3iv@4, WindowPos3ivMESA, WindowPos3ivMESA@4)
+ GL_STUB_ALIAS(WindowPos3ivARB, 684, WindowPos3ivARB@4, WindowPos3ivMESA, WindowPos3ivMESA@4)
+ GL_STUB_ALIAS(WindowPos3s, 685, WindowPos3s@12, WindowPos3sMESA, WindowPos3sMESA@12)
+ GL_STUB_ALIAS(WindowPos3sARB, 685, WindowPos3sARB@12, WindowPos3sMESA, WindowPos3sMESA@12)
+ GL_STUB_ALIAS(WindowPos3sv, 686, WindowPos3sv@4, WindowPos3svMESA, WindowPos3svMESA@4)
+ GL_STUB_ALIAS(WindowPos3svARB, 686, WindowPos3svARB@4, WindowPos3svMESA, WindowPos3svMESA@4)
+ GL_STUB_ALIAS(BindProgramARB, 705, BindProgramARB@8, BindProgramNV, BindProgramNV@8)
+ GL_STUB_ALIAS(DeleteProgramsARB, 706, DeleteProgramsARB@8, DeleteProgramsNV, DeleteProgramsNV@8)
+ GL_STUB_ALIAS(GenProgramsARB, 708, GenProgramsARB@8, GenProgramsNV, GenProgramsNV@8)
+ GL_STUB_ALIAS(GetVertexAttribPointerv, 714, GetVertexAttribPointerv@12, GetVertexAttribPointervNV, GetVertexAttribPointervNV@12)
+ GL_STUB_ALIAS(GetVertexAttribPointervARB, 714, GetVertexAttribPointervARB@12, GetVertexAttribPointervNV, GetVertexAttribPointervNV@12)
+ GL_STUB_ALIAS(IsProgramARB, 718, IsProgramARB@4, IsProgramNV, IsProgramNV@4)
+ GL_STUB_ALIAS(PointParameteri, 782, PointParameteri@8, PointParameteriNV, PointParameteriNV@8)
+ GL_STUB_ALIAS(PointParameteriv, 783, PointParameteriv@8, PointParameterivNV, PointParameterivNV@8)
+ GL_STUB_ALIAS(DeleteVertexArrays, 786, DeleteVertexArrays@8, _dispatch_stub_786, _dispatch_stub_786@8)
+ GL_STUB_ALIAS(IsVertexArray, 788, IsVertexArray@4, _dispatch_stub_788, _dispatch_stub_788@4)
+ GL_STUB_ALIAS(PrimitiveRestartIndex, 795, PrimitiveRestartIndex@4, PrimitiveRestartIndexNV, PrimitiveRestartIndexNV@4)
+ GL_STUB_ALIAS(BlendEquationSeparate, 798, BlendEquationSeparate@8, _dispatch_stub_798, _dispatch_stub_798@8)
+ GL_STUB_ALIAS(BindFramebuffer, 799, BindFramebuffer@8, BindFramebufferEXT, BindFramebufferEXT@8)
+ GL_STUB_ALIAS(BindRenderbuffer, 800, BindRenderbuffer@8, BindRenderbufferEXT, BindRenderbufferEXT@8)
+ GL_STUB_ALIAS(CheckFramebufferStatus, 801, CheckFramebufferStatus@4, CheckFramebufferStatusEXT, CheckFramebufferStatusEXT@4)
+ GL_STUB_ALIAS(DeleteFramebuffers, 802, DeleteFramebuffers@8, DeleteFramebuffersEXT, DeleteFramebuffersEXT@8)
+ GL_STUB_ALIAS(DeleteRenderbuffers, 803, DeleteRenderbuffers@8, DeleteRenderbuffersEXT, DeleteRenderbuffersEXT@8)
+ GL_STUB_ALIAS(FramebufferRenderbuffer, 804, FramebufferRenderbuffer@16, FramebufferRenderbufferEXT, FramebufferRenderbufferEXT@16)
+ GL_STUB_ALIAS(FramebufferTexture1D, 805, FramebufferTexture1D@20, FramebufferTexture1DEXT, FramebufferTexture1DEXT@20)
+ GL_STUB_ALIAS(FramebufferTexture2D, 806, FramebufferTexture2D@20, FramebufferTexture2DEXT, FramebufferTexture2DEXT@20)
+ GL_STUB_ALIAS(FramebufferTexture3D, 807, FramebufferTexture3D@24, FramebufferTexture3DEXT, FramebufferTexture3DEXT@24)
+ GL_STUB_ALIAS(GenFramebuffers, 808, GenFramebuffers@8, GenFramebuffersEXT, GenFramebuffersEXT@8)
+ GL_STUB_ALIAS(GenRenderbuffers, 809, GenRenderbuffers@8, GenRenderbuffersEXT, GenRenderbuffersEXT@8)
+ GL_STUB_ALIAS(GenerateMipmap, 810, GenerateMipmap@4, GenerateMipmapEXT, GenerateMipmapEXT@4)
+ GL_STUB_ALIAS(GetFramebufferAttachmentParameteriv, 811, GetFramebufferAttachmentParameteriv@16, GetFramebufferAttachmentParameterivEXT, GetFramebufferAttachmentParameterivEXT@16)
+ GL_STUB_ALIAS(GetRenderbufferParameteriv, 812, GetRenderbufferParameteriv@12, GetRenderbufferParameterivEXT, GetRenderbufferParameterivEXT@12)
+ GL_STUB_ALIAS(IsFramebuffer, 813, IsFramebuffer@4, IsFramebufferEXT, IsFramebufferEXT@4)
+ GL_STUB_ALIAS(IsRenderbuffer, 814, IsRenderbuffer@4, IsRenderbufferEXT, IsRenderbufferEXT@4)
+ GL_STUB_ALIAS(RenderbufferStorage, 815, RenderbufferStorage@16, RenderbufferStorageEXT, RenderbufferStorageEXT@16)
+ GL_STUB_ALIAS(BlitFramebuffer, 816, BlitFramebuffer@40, _dispatch_stub_816, _dispatch_stub_816@40)
+ GL_STUB_ALIAS(BindFragDataLocation, 819, BindFragDataLocation@12, BindFragDataLocationEXT, BindFragDataLocationEXT@12)
+ GL_STUB_ALIAS(GetFragDataLocation, 820, GetFragDataLocation@8, GetFragDataLocationEXT, GetFragDataLocationEXT@8)
+ GL_STUB_ALIAS(GetUniformuiv, 821, GetUniformuiv@12, GetUniformuivEXT, GetUniformuivEXT@12)
+ GL_STUB_ALIAS(GetVertexAttribIiv, 822, GetVertexAttribIiv@12, GetVertexAttribIivEXT, GetVertexAttribIivEXT@12)
+ GL_STUB_ALIAS(GetVertexAttribIuiv, 823, GetVertexAttribIuiv@12, GetVertexAttribIuivEXT, GetVertexAttribIuivEXT@12)
+ GL_STUB_ALIAS(Uniform1ui, 824, Uniform1ui@8, Uniform1uiEXT, Uniform1uiEXT@8)
+ GL_STUB_ALIAS(Uniform1uiv, 825, Uniform1uiv@12, Uniform1uivEXT, Uniform1uivEXT@12)
+ GL_STUB_ALIAS(Uniform2ui, 826, Uniform2ui@12, Uniform2uiEXT, Uniform2uiEXT@12)
+ GL_STUB_ALIAS(Uniform2uiv, 827, Uniform2uiv@12, Uniform2uivEXT, Uniform2uivEXT@12)
+ GL_STUB_ALIAS(Uniform3ui, 828, Uniform3ui@16, Uniform3uiEXT, Uniform3uiEXT@16)
+ GL_STUB_ALIAS(Uniform3uiv, 829, Uniform3uiv@12, Uniform3uivEXT, Uniform3uivEXT@12)
+ GL_STUB_ALIAS(Uniform4ui, 830, Uniform4ui@20, Uniform4uiEXT, Uniform4uiEXT@20)
+ GL_STUB_ALIAS(Uniform4uiv, 831, Uniform4uiv@12, Uniform4uivEXT, Uniform4uivEXT@12)
+ GL_STUB_ALIAS(VertexAttribI1i, 832, VertexAttribI1i@8, VertexAttribI1iEXT, VertexAttribI1iEXT@8)
+ GL_STUB_ALIAS(VertexAttribI1iv, 833, VertexAttribI1iv@8, VertexAttribI1ivEXT, VertexAttribI1ivEXT@8)
+ GL_STUB_ALIAS(VertexAttribI1ui, 834, VertexAttribI1ui@8, VertexAttribI1uiEXT, VertexAttribI1uiEXT@8)
+ GL_STUB_ALIAS(VertexAttribI1uiv, 835, VertexAttribI1uiv@8, VertexAttribI1uivEXT, VertexAttribI1uivEXT@8)
+ GL_STUB_ALIAS(VertexAttribI2i, 836, VertexAttribI2i@12, VertexAttribI2iEXT, VertexAttribI2iEXT@12)
+ GL_STUB_ALIAS(VertexAttribI2iv, 837, VertexAttribI2iv@8, VertexAttribI2ivEXT, VertexAttribI2ivEXT@8)
+ GL_STUB_ALIAS(VertexAttribI2ui, 838, VertexAttribI2ui@12, VertexAttribI2uiEXT, VertexAttribI2uiEXT@12)
+ GL_STUB_ALIAS(VertexAttribI2uiv, 839, VertexAttribI2uiv@8, VertexAttribI2uivEXT, VertexAttribI2uivEXT@8)
+ GL_STUB_ALIAS(VertexAttribI3i, 840, VertexAttribI3i@16, VertexAttribI3iEXT, VertexAttribI3iEXT@16)
+ GL_STUB_ALIAS(VertexAttribI3iv, 841, VertexAttribI3iv@8, VertexAttribI3ivEXT, VertexAttribI3ivEXT@8)
+ GL_STUB_ALIAS(VertexAttribI3ui, 842, VertexAttribI3ui@16, VertexAttribI3uiEXT, VertexAttribI3uiEXT@16)
+ GL_STUB_ALIAS(VertexAttribI3uiv, 843, VertexAttribI3uiv@8, VertexAttribI3uivEXT, VertexAttribI3uivEXT@8)
+ GL_STUB_ALIAS(VertexAttribI4bv, 844, VertexAttribI4bv@8, VertexAttribI4bvEXT, VertexAttribI4bvEXT@8)
+ GL_STUB_ALIAS(VertexAttribI4i, 845, VertexAttribI4i@20, VertexAttribI4iEXT, VertexAttribI4iEXT@20)
+ GL_STUB_ALIAS(VertexAttribI4iv, 846, VertexAttribI4iv@8, VertexAttribI4ivEXT, VertexAttribI4ivEXT@8)
+ GL_STUB_ALIAS(VertexAttribI4sv, 847, VertexAttribI4sv@8, VertexAttribI4svEXT, VertexAttribI4svEXT@8)
+ GL_STUB_ALIAS(VertexAttribI4ubv, 848, VertexAttribI4ubv@8, VertexAttribI4ubvEXT, VertexAttribI4ubvEXT@8)
+ GL_STUB_ALIAS(VertexAttribI4ui, 849, VertexAttribI4ui@20, VertexAttribI4uiEXT, VertexAttribI4uiEXT@20)
+ GL_STUB_ALIAS(VertexAttribI4uiv, 850, VertexAttribI4uiv@8, VertexAttribI4uivEXT, VertexAttribI4uivEXT@8)
+ GL_STUB_ALIAS(VertexAttribI4usv, 851, VertexAttribI4usv@8, VertexAttribI4usvEXT, VertexAttribI4usvEXT@8)
+ GL_STUB_ALIAS(VertexAttribIPointer, 852, VertexAttribIPointer@20, VertexAttribIPointerEXT, VertexAttribIPointerEXT@20)
+ GL_STUB_ALIAS(FramebufferTextureLayer, 853, FramebufferTextureLayer@20, FramebufferTextureLayerEXT, FramebufferTextureLayerEXT@20)
+ GL_STUB_ALIAS(ColorMaski, 854, ColorMaski@20, ColorMaskIndexedEXT, ColorMaskIndexedEXT@20)
+ GL_STUB_ALIAS(Disablei, 855, Disablei@8, DisableIndexedEXT, DisableIndexedEXT@8)
+ GL_STUB_ALIAS(Enablei, 856, Enablei@8, EnableIndexedEXT, EnableIndexedEXT@8)
+ GL_STUB_ALIAS(GetBooleani_v, 857, GetBooleani_v@12, GetBooleanIndexedvEXT, GetBooleanIndexedvEXT@12)
+ GL_STUB_ALIAS(GetIntegeri_v, 858, GetIntegeri_v@12, GetIntegerIndexedvEXT, GetIntegerIndexedvEXT@12)
+ GL_STUB_ALIAS(IsEnabledi, 859, IsEnabledi@8, IsEnabledIndexedEXT, IsEnabledIndexedEXT@8)
+ GL_STUB_ALIAS(GetTexParameterIiv, 862, GetTexParameterIiv@12, GetTexParameterIivEXT, GetTexParameterIivEXT@12)
+ GL_STUB_ALIAS(GetTexParameterIuiv, 863, GetTexParameterIuiv@12, GetTexParameterIuivEXT, GetTexParameterIuivEXT@12)
+ GL_STUB_ALIAS(TexParameterIiv, 864, TexParameterIiv@12, TexParameterIivEXT, TexParameterIivEXT@12)
+ GL_STUB_ALIAS(TexParameterIuiv, 865, TexParameterIuiv@12, TexParameterIuivEXT, TexParameterIuivEXT@12)
+ GL_STUB_ALIAS(BeginConditionalRender, 866, BeginConditionalRender@8, BeginConditionalRenderNV, BeginConditionalRenderNV@8)
+ GL_STUB_ALIAS(EndConditionalRender, 867, EndConditionalRender@0, EndConditionalRenderNV, EndConditionalRenderNV@0)
+ GL_STUB_ALIAS(BeginTransformFeedback, 868, BeginTransformFeedback@4, BeginTransformFeedbackEXT, BeginTransformFeedbackEXT@4)
+ GL_STUB_ALIAS(BindBufferBase, 869, BindBufferBase@12, BindBufferBaseEXT, BindBufferBaseEXT@12)
+ GL_STUB_ALIAS(BindBufferRange, 871, BindBufferRange@20, BindBufferRangeEXT, BindBufferRangeEXT@20)
+ GL_STUB_ALIAS(EndTransformFeedback, 872, EndTransformFeedback@0, EndTransformFeedbackEXT, EndTransformFeedbackEXT@0)
+ GL_STUB_ALIAS(GetTransformFeedbackVarying, 873, GetTransformFeedbackVarying@28, GetTransformFeedbackVaryingEXT, GetTransformFeedbackVaryingEXT@28)
+ GL_STUB_ALIAS(TransformFeedbackVaryings, 874, TransformFeedbackVaryings@16, TransformFeedbackVaryingsEXT, TransformFeedbackVaryingsEXT@16)
+ GL_STUB_ALIAS(ProvokingVertex, 875, ProvokingVertex@4, ProvokingVertexEXT, ProvokingVertexEXT@4)
GLOBL GLNAME(gl_dispatch_functions_end)
HIDDEN(GLNAME(gl_dispatch_functions_end))
diff --git a/src/mapi/glapi/glapitable.h b/src/mapi/glapi/glapitable.h
index af6b3461740..1de71b97daf 100644
--- a/src/mapi/glapi/glapitable.h
+++ b/src/mapi/glapi/glapitable.h
@@ -618,309 +618,320 @@ struct _glapi_table
void (GLAPIENTRYP FramebufferTextureARB)(GLenum target, GLenum attachment, GLuint texture, GLint level); /* 575 */
void (GLAPIENTRYP FramebufferTextureFaceARB)(GLenum target, GLenum attachment, GLuint texture, GLint level, GLenum face); /* 576 */
void (GLAPIENTRYP ProgramParameteriARB)(GLuint program, GLenum pname, GLint value); /* 577 */
- void (GLAPIENTRYP FlushMappedBufferRange)(GLenum target, GLintptr offset, GLsizeiptr length); /* 578 */
- GLvoid * (GLAPIENTRYP MapBufferRange)(GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access); /* 579 */
- void (GLAPIENTRYP BindVertexArray)(GLuint array); /* 580 */
- void (GLAPIENTRYP GenVertexArrays)(GLsizei n, GLuint * arrays); /* 581 */
- void (GLAPIENTRYP CopyBufferSubData)(GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size); /* 582 */
- GLenum (GLAPIENTRYP ClientWaitSync)(GLsync sync, GLbitfield flags, GLuint64 timeout); /* 583 */
- void (GLAPIENTRYP DeleteSync)(GLsync sync); /* 584 */
- GLsync (GLAPIENTRYP FenceSync)(GLenum condition, GLbitfield flags); /* 585 */
- void (GLAPIENTRYP GetInteger64v)(GLenum pname, GLint64 * params); /* 586 */
- void (GLAPIENTRYP GetSynciv)(GLsync sync, GLenum pname, GLsizei bufSize, GLsizei * length, GLint * values); /* 587 */
- GLboolean (GLAPIENTRYP IsSync)(GLsync sync); /* 588 */
- void (GLAPIENTRYP WaitSync)(GLsync sync, GLbitfield flags, GLuint64 timeout); /* 589 */
- void (GLAPIENTRYP DrawElementsBaseVertex)(GLenum mode, GLsizei count, GLenum type, const GLvoid * indices, GLint basevertex); /* 590 */
- void (GLAPIENTRYP DrawRangeElementsBaseVertex)(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid * indices, GLint basevertex); /* 591 */
- void (GLAPIENTRYP MultiDrawElementsBaseVertex)(GLenum mode, const GLsizei * count, GLenum type, const GLvoid ** indices, GLsizei primcount, const GLint * basevertex); /* 592 */
- void (GLAPIENTRYP BindTransformFeedback)(GLenum target, GLuint id); /* 593 */
- void (GLAPIENTRYP DeleteTransformFeedbacks)(GLsizei n, const GLuint * ids); /* 594 */
- void (GLAPIENTRYP DrawTransformFeedback)(GLenum mode, GLuint id); /* 595 */
- void (GLAPIENTRYP GenTransformFeedbacks)(GLsizei n, GLuint * ids); /* 596 */
- GLboolean (GLAPIENTRYP IsTransformFeedback)(GLuint id); /* 597 */
- void (GLAPIENTRYP PauseTransformFeedback)(void); /* 598 */
- void (GLAPIENTRYP ResumeTransformFeedback)(void); /* 599 */
- void (GLAPIENTRYP PolygonOffsetEXT)(GLfloat factor, GLfloat bias); /* 600 */
- void (GLAPIENTRYP GetPixelTexGenParameterfvSGIS)(GLenum pname, GLfloat * params); /* 601 */
- void (GLAPIENTRYP GetPixelTexGenParameterivSGIS)(GLenum pname, GLint * params); /* 602 */
- void (GLAPIENTRYP PixelTexGenParameterfSGIS)(GLenum pname, GLfloat param); /* 603 */
- void (GLAPIENTRYP PixelTexGenParameterfvSGIS)(GLenum pname, const GLfloat * params); /* 604 */
- void (GLAPIENTRYP PixelTexGenParameteriSGIS)(GLenum pname, GLint param); /* 605 */
- void (GLAPIENTRYP PixelTexGenParameterivSGIS)(GLenum pname, const GLint * params); /* 606 */
- void (GLAPIENTRYP SampleMaskSGIS)(GLclampf value, GLboolean invert); /* 607 */
- void (GLAPIENTRYP SamplePatternSGIS)(GLenum pattern); /* 608 */
- void (GLAPIENTRYP ColorPointerEXT)(GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid * pointer); /* 609 */
- void (GLAPIENTRYP EdgeFlagPointerEXT)(GLsizei stride, GLsizei count, const GLboolean * pointer); /* 610 */
- void (GLAPIENTRYP IndexPointerEXT)(GLenum type, GLsizei stride, GLsizei count, const GLvoid * pointer); /* 611 */
- void (GLAPIENTRYP NormalPointerEXT)(GLenum type, GLsizei stride, GLsizei count, const GLvoid * pointer); /* 612 */
- void (GLAPIENTRYP TexCoordPointerEXT)(GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid * pointer); /* 613 */
- void (GLAPIENTRYP VertexPointerEXT)(GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid * pointer); /* 614 */
- void (GLAPIENTRYP PointParameterfEXT)(GLenum pname, GLfloat param); /* 615 */
- void (GLAPIENTRYP PointParameterfvEXT)(GLenum pname, const GLfloat * params); /* 616 */
- void (GLAPIENTRYP LockArraysEXT)(GLint first, GLsizei count); /* 617 */
- void (GLAPIENTRYP UnlockArraysEXT)(void); /* 618 */
- void (GLAPIENTRYP SecondaryColor3bEXT)(GLbyte red, GLbyte green, GLbyte blue); /* 619 */
- void (GLAPIENTRYP SecondaryColor3bvEXT)(const GLbyte * v); /* 620 */
- void (GLAPIENTRYP SecondaryColor3dEXT)(GLdouble red, GLdouble green, GLdouble blue); /* 621 */
- void (GLAPIENTRYP SecondaryColor3dvEXT)(const GLdouble * v); /* 622 */
- void (GLAPIENTRYP SecondaryColor3fEXT)(GLfloat red, GLfloat green, GLfloat blue); /* 623 */
- void (GLAPIENTRYP SecondaryColor3fvEXT)(const GLfloat * v); /* 624 */
- void (GLAPIENTRYP SecondaryColor3iEXT)(GLint red, GLint green, GLint blue); /* 625 */
- void (GLAPIENTRYP SecondaryColor3ivEXT)(const GLint * v); /* 626 */
- void (GLAPIENTRYP SecondaryColor3sEXT)(GLshort red, GLshort green, GLshort blue); /* 627 */
- void (GLAPIENTRYP SecondaryColor3svEXT)(const GLshort * v); /* 628 */
- void (GLAPIENTRYP SecondaryColor3ubEXT)(GLubyte red, GLubyte green, GLubyte blue); /* 629 */
- void (GLAPIENTRYP SecondaryColor3ubvEXT)(const GLubyte * v); /* 630 */
- void (GLAPIENTRYP SecondaryColor3uiEXT)(GLuint red, GLuint green, GLuint blue); /* 631 */
- void (GLAPIENTRYP SecondaryColor3uivEXT)(const GLuint * v); /* 632 */
- void (GLAPIENTRYP SecondaryColor3usEXT)(GLushort red, GLushort green, GLushort blue); /* 633 */
- void (GLAPIENTRYP SecondaryColor3usvEXT)(const GLushort * v); /* 634 */
- void (GLAPIENTRYP SecondaryColorPointerEXT)(GLint size, GLenum type, GLsizei stride, const GLvoid * pointer); /* 635 */
- void (GLAPIENTRYP MultiDrawArraysEXT)(GLenum mode, const GLint * first, const GLsizei * count, GLsizei primcount); /* 636 */
- void (GLAPIENTRYP MultiDrawElementsEXT)(GLenum mode, const GLsizei * count, GLenum type, const GLvoid ** indices, GLsizei primcount); /* 637 */
- void (GLAPIENTRYP FogCoordPointerEXT)(GLenum type, GLsizei stride, const GLvoid * pointer); /* 638 */
- void (GLAPIENTRYP FogCoorddEXT)(GLdouble coord); /* 639 */
- void (GLAPIENTRYP FogCoorddvEXT)(const GLdouble * coord); /* 640 */
- void (GLAPIENTRYP FogCoordfEXT)(GLfloat coord); /* 641 */
- void (GLAPIENTRYP FogCoordfvEXT)(const GLfloat * coord); /* 642 */
- void (GLAPIENTRYP PixelTexGenSGIX)(GLenum mode); /* 643 */
- void (GLAPIENTRYP BlendFuncSeparateEXT)(GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); /* 644 */
- void (GLAPIENTRYP FlushVertexArrayRangeNV)(void); /* 645 */
- void (GLAPIENTRYP VertexArrayRangeNV)(GLsizei length, const GLvoid * pointer); /* 646 */
- void (GLAPIENTRYP CombinerInputNV)(GLenum stage, GLenum portion, GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage); /* 647 */
- void (GLAPIENTRYP CombinerOutputNV)(GLenum stage, GLenum portion, GLenum abOutput, GLenum cdOutput, GLenum sumOutput, GLenum scale, GLenum bias, GLboolean abDotProduct, GLboolean cdDotProduct, GLboolean muxSum); /* 648 */
- void (GLAPIENTRYP CombinerParameterfNV)(GLenum pname, GLfloat param); /* 649 */
- void (GLAPIENTRYP CombinerParameterfvNV)(GLenum pname, const GLfloat * params); /* 650 */
- void (GLAPIENTRYP CombinerParameteriNV)(GLenum pname, GLint param); /* 651 */
- void (GLAPIENTRYP CombinerParameterivNV)(GLenum pname, const GLint * params); /* 652 */
- void (GLAPIENTRYP FinalCombinerInputNV)(GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage); /* 653 */
- void (GLAPIENTRYP GetCombinerInputParameterfvNV)(GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLfloat * params); /* 654 */
- void (GLAPIENTRYP GetCombinerInputParameterivNV)(GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLint * params); /* 655 */
- void (GLAPIENTRYP GetCombinerOutputParameterfvNV)(GLenum stage, GLenum portion, GLenum pname, GLfloat * params); /* 656 */
- void (GLAPIENTRYP GetCombinerOutputParameterivNV)(GLenum stage, GLenum portion, GLenum pname, GLint * params); /* 657 */
- void (GLAPIENTRYP GetFinalCombinerInputParameterfvNV)(GLenum variable, GLenum pname, GLfloat * params); /* 658 */
- void (GLAPIENTRYP GetFinalCombinerInputParameterivNV)(GLenum variable, GLenum pname, GLint * params); /* 659 */
- void (GLAPIENTRYP ResizeBuffersMESA)(void); /* 660 */
- void (GLAPIENTRYP WindowPos2dMESA)(GLdouble x, GLdouble y); /* 661 */
- void (GLAPIENTRYP WindowPos2dvMESA)(const GLdouble * v); /* 662 */
- void (GLAPIENTRYP WindowPos2fMESA)(GLfloat x, GLfloat y); /* 663 */
- void (GLAPIENTRYP WindowPos2fvMESA)(const GLfloat * v); /* 664 */
- void (GLAPIENTRYP WindowPos2iMESA)(GLint x, GLint y); /* 665 */
- void (GLAPIENTRYP WindowPos2ivMESA)(const GLint * v); /* 666 */
- void (GLAPIENTRYP WindowPos2sMESA)(GLshort x, GLshort y); /* 667 */
- void (GLAPIENTRYP WindowPos2svMESA)(const GLshort * v); /* 668 */
- void (GLAPIENTRYP WindowPos3dMESA)(GLdouble x, GLdouble y, GLdouble z); /* 669 */
- void (GLAPIENTRYP WindowPos3dvMESA)(const GLdouble * v); /* 670 */
- void (GLAPIENTRYP WindowPos3fMESA)(GLfloat x, GLfloat y, GLfloat z); /* 671 */
- void (GLAPIENTRYP WindowPos3fvMESA)(const GLfloat * v); /* 672 */
- void (GLAPIENTRYP WindowPos3iMESA)(GLint x, GLint y, GLint z); /* 673 */
- void (GLAPIENTRYP WindowPos3ivMESA)(const GLint * v); /* 674 */
- void (GLAPIENTRYP WindowPos3sMESA)(GLshort x, GLshort y, GLshort z); /* 675 */
- void (GLAPIENTRYP WindowPos3svMESA)(const GLshort * v); /* 676 */
- void (GLAPIENTRYP WindowPos4dMESA)(GLdouble x, GLdouble y, GLdouble z, GLdouble w); /* 677 */
- void (GLAPIENTRYP WindowPos4dvMESA)(const GLdouble * v); /* 678 */
- void (GLAPIENTRYP WindowPos4fMESA)(GLfloat x, GLfloat y, GLfloat z, GLfloat w); /* 679 */
- void (GLAPIENTRYP WindowPos4fvMESA)(const GLfloat * v); /* 680 */
- void (GLAPIENTRYP WindowPos4iMESA)(GLint x, GLint y, GLint z, GLint w); /* 681 */
- void (GLAPIENTRYP WindowPos4ivMESA)(const GLint * v); /* 682 */
- void (GLAPIENTRYP WindowPos4sMESA)(GLshort x, GLshort y, GLshort z, GLshort w); /* 683 */
- void (GLAPIENTRYP WindowPos4svMESA)(const GLshort * v); /* 684 */
- void (GLAPIENTRYP MultiModeDrawArraysIBM)(const GLenum * mode, const GLint * first, const GLsizei * count, GLsizei primcount, GLint modestride); /* 685 */
- void (GLAPIENTRYP MultiModeDrawElementsIBM)(const GLenum * mode, const GLsizei * count, GLenum type, const GLvoid * const * indices, GLsizei primcount, GLint modestride); /* 686 */
- void (GLAPIENTRYP DeleteFencesNV)(GLsizei n, const GLuint * fences); /* 687 */
- void (GLAPIENTRYP FinishFenceNV)(GLuint fence); /* 688 */
- void (GLAPIENTRYP GenFencesNV)(GLsizei n, GLuint * fences); /* 689 */
- void (GLAPIENTRYP GetFenceivNV)(GLuint fence, GLenum pname, GLint * params); /* 690 */
- GLboolean (GLAPIENTRYP IsFenceNV)(GLuint fence); /* 691 */
- void (GLAPIENTRYP SetFenceNV)(GLuint fence, GLenum condition); /* 692 */
- GLboolean (GLAPIENTRYP TestFenceNV)(GLuint fence); /* 693 */
- GLboolean (GLAPIENTRYP AreProgramsResidentNV)(GLsizei n, const GLuint * ids, GLboolean * residences); /* 694 */
- void (GLAPIENTRYP BindProgramNV)(GLenum target, GLuint program); /* 695 */
- void (GLAPIENTRYP DeleteProgramsNV)(GLsizei n, const GLuint * programs); /* 696 */
- void (GLAPIENTRYP ExecuteProgramNV)(GLenum target, GLuint id, const GLfloat * params); /* 697 */
- void (GLAPIENTRYP GenProgramsNV)(GLsizei n, GLuint * programs); /* 698 */
- void (GLAPIENTRYP GetProgramParameterdvNV)(GLenum target, GLuint index, GLenum pname, GLdouble * params); /* 699 */
- void (GLAPIENTRYP GetProgramParameterfvNV)(GLenum target, GLuint index, GLenum pname, GLfloat * params); /* 700 */
- void (GLAPIENTRYP GetProgramStringNV)(GLuint id, GLenum pname, GLubyte * program); /* 701 */
- void (GLAPIENTRYP GetProgramivNV)(GLuint id, GLenum pname, GLint * params); /* 702 */
- void (GLAPIENTRYP GetTrackMatrixivNV)(GLenum target, GLuint address, GLenum pname, GLint * params); /* 703 */
- void (GLAPIENTRYP GetVertexAttribPointervNV)(GLuint index, GLenum pname, GLvoid ** pointer); /* 704 */
- void (GLAPIENTRYP GetVertexAttribdvNV)(GLuint index, GLenum pname, GLdouble * params); /* 705 */
- void (GLAPIENTRYP GetVertexAttribfvNV)(GLuint index, GLenum pname, GLfloat * params); /* 706 */
- void (GLAPIENTRYP GetVertexAttribivNV)(GLuint index, GLenum pname, GLint * params); /* 707 */
- GLboolean (GLAPIENTRYP IsProgramNV)(GLuint program); /* 708 */
- void (GLAPIENTRYP LoadProgramNV)(GLenum target, GLuint id, GLsizei len, const GLubyte * program); /* 709 */
- void (GLAPIENTRYP ProgramParameters4dvNV)(GLenum target, GLuint index, GLsizei num, const GLdouble * params); /* 710 */
- void (GLAPIENTRYP ProgramParameters4fvNV)(GLenum target, GLuint index, GLsizei num, const GLfloat * params); /* 711 */
- void (GLAPIENTRYP RequestResidentProgramsNV)(GLsizei n, const GLuint * ids); /* 712 */
- void (GLAPIENTRYP TrackMatrixNV)(GLenum target, GLuint address, GLenum matrix, GLenum transform); /* 713 */
- void (GLAPIENTRYP VertexAttrib1dNV)(GLuint index, GLdouble x); /* 714 */
- void (GLAPIENTRYP VertexAttrib1dvNV)(GLuint index, const GLdouble * v); /* 715 */
- void (GLAPIENTRYP VertexAttrib1fNV)(GLuint index, GLfloat x); /* 716 */
- void (GLAPIENTRYP VertexAttrib1fvNV)(GLuint index, const GLfloat * v); /* 717 */
- void (GLAPIENTRYP VertexAttrib1sNV)(GLuint index, GLshort x); /* 718 */
- void (GLAPIENTRYP VertexAttrib1svNV)(GLuint index, const GLshort * v); /* 719 */
- void (GLAPIENTRYP VertexAttrib2dNV)(GLuint index, GLdouble x, GLdouble y); /* 720 */
- void (GLAPIENTRYP VertexAttrib2dvNV)(GLuint index, const GLdouble * v); /* 721 */
- void (GLAPIENTRYP VertexAttrib2fNV)(GLuint index, GLfloat x, GLfloat y); /* 722 */
- void (GLAPIENTRYP VertexAttrib2fvNV)(GLuint index, const GLfloat * v); /* 723 */
- void (GLAPIENTRYP VertexAttrib2sNV)(GLuint index, GLshort x, GLshort y); /* 724 */
- void (GLAPIENTRYP VertexAttrib2svNV)(GLuint index, const GLshort * v); /* 725 */
- void (GLAPIENTRYP VertexAttrib3dNV)(GLuint index, GLdouble x, GLdouble y, GLdouble z); /* 726 */
- void (GLAPIENTRYP VertexAttrib3dvNV)(GLuint index, const GLdouble * v); /* 727 */
- void (GLAPIENTRYP VertexAttrib3fNV)(GLuint index, GLfloat x, GLfloat y, GLfloat z); /* 728 */
- void (GLAPIENTRYP VertexAttrib3fvNV)(GLuint index, const GLfloat * v); /* 729 */
- void (GLAPIENTRYP VertexAttrib3sNV)(GLuint index, GLshort x, GLshort y, GLshort z); /* 730 */
- void (GLAPIENTRYP VertexAttrib3svNV)(GLuint index, const GLshort * v); /* 731 */
- void (GLAPIENTRYP VertexAttrib4dNV)(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); /* 732 */
- void (GLAPIENTRYP VertexAttrib4dvNV)(GLuint index, const GLdouble * v); /* 733 */
- void (GLAPIENTRYP VertexAttrib4fNV)(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); /* 734 */
- void (GLAPIENTRYP VertexAttrib4fvNV)(GLuint index, const GLfloat * v); /* 735 */
- void (GLAPIENTRYP VertexAttrib4sNV)(GLuint index, GLshort x, GLshort y, GLshort z, GLshort w); /* 736 */
- void (GLAPIENTRYP VertexAttrib4svNV)(GLuint index, const GLshort * v); /* 737 */
- void (GLAPIENTRYP VertexAttrib4ubNV)(GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w); /* 738 */
- void (GLAPIENTRYP VertexAttrib4ubvNV)(GLuint index, const GLubyte * v); /* 739 */
- void (GLAPIENTRYP VertexAttribPointerNV)(GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid * pointer); /* 740 */
- void (GLAPIENTRYP VertexAttribs1dvNV)(GLuint index, GLsizei n, const GLdouble * v); /* 741 */
- void (GLAPIENTRYP VertexAttribs1fvNV)(GLuint index, GLsizei n, const GLfloat * v); /* 742 */
- void (GLAPIENTRYP VertexAttribs1svNV)(GLuint index, GLsizei n, const GLshort * v); /* 743 */
- void (GLAPIENTRYP VertexAttribs2dvNV)(GLuint index, GLsizei n, const GLdouble * v); /* 744 */
- void (GLAPIENTRYP VertexAttribs2fvNV)(GLuint index, GLsizei n, const GLfloat * v); /* 745 */
- void (GLAPIENTRYP VertexAttribs2svNV)(GLuint index, GLsizei n, const GLshort * v); /* 746 */
- void (GLAPIENTRYP VertexAttribs3dvNV)(GLuint index, GLsizei n, const GLdouble * v); /* 747 */
- void (GLAPIENTRYP VertexAttribs3fvNV)(GLuint index, GLsizei n, const GLfloat * v); /* 748 */
- void (GLAPIENTRYP VertexAttribs3svNV)(GLuint index, GLsizei n, const GLshort * v); /* 749 */
- void (GLAPIENTRYP VertexAttribs4dvNV)(GLuint index, GLsizei n, const GLdouble * v); /* 750 */
- void (GLAPIENTRYP VertexAttribs4fvNV)(GLuint index, GLsizei n, const GLfloat * v); /* 751 */
- void (GLAPIENTRYP VertexAttribs4svNV)(GLuint index, GLsizei n, const GLshort * v); /* 752 */
- void (GLAPIENTRYP VertexAttribs4ubvNV)(GLuint index, GLsizei n, const GLubyte * v); /* 753 */
- void (GLAPIENTRYP GetTexBumpParameterfvATI)(GLenum pname, GLfloat * param); /* 754 */
- void (GLAPIENTRYP GetTexBumpParameterivATI)(GLenum pname, GLint * param); /* 755 */
- void (GLAPIENTRYP TexBumpParameterfvATI)(GLenum pname, const GLfloat * param); /* 756 */
- void (GLAPIENTRYP TexBumpParameterivATI)(GLenum pname, const GLint * param); /* 757 */
- void (GLAPIENTRYP AlphaFragmentOp1ATI)(GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod); /* 758 */
- void (GLAPIENTRYP AlphaFragmentOp2ATI)(GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod); /* 759 */
- void (GLAPIENTRYP AlphaFragmentOp3ATI)(GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod); /* 760 */
- void (GLAPIENTRYP BeginFragmentShaderATI)(void); /* 761 */
- void (GLAPIENTRYP BindFragmentShaderATI)(GLuint id); /* 762 */
- void (GLAPIENTRYP ColorFragmentOp1ATI)(GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod); /* 763 */
- void (GLAPIENTRYP ColorFragmentOp2ATI)(GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod); /* 764 */
- void (GLAPIENTRYP ColorFragmentOp3ATI)(GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod); /* 765 */
- void (GLAPIENTRYP DeleteFragmentShaderATI)(GLuint id); /* 766 */
- void (GLAPIENTRYP EndFragmentShaderATI)(void); /* 767 */
- GLuint (GLAPIENTRYP GenFragmentShadersATI)(GLuint range); /* 768 */
- void (GLAPIENTRYP PassTexCoordATI)(GLuint dst, GLuint coord, GLenum swizzle); /* 769 */
- void (GLAPIENTRYP SampleMapATI)(GLuint dst, GLuint interp, GLenum swizzle); /* 770 */
- void (GLAPIENTRYP SetFragmentShaderConstantATI)(GLuint dst, const GLfloat * value); /* 771 */
- void (GLAPIENTRYP PointParameteriNV)(GLenum pname, GLint param); /* 772 */
- void (GLAPIENTRYP PointParameterivNV)(GLenum pname, const GLint * params); /* 773 */
- void (GLAPIENTRYP ActiveStencilFaceEXT)(GLenum face); /* 774 */
- void (GLAPIENTRYP BindVertexArrayAPPLE)(GLuint array); /* 775 */
- void (GLAPIENTRYP DeleteVertexArraysAPPLE)(GLsizei n, const GLuint * arrays); /* 776 */
- void (GLAPIENTRYP GenVertexArraysAPPLE)(GLsizei n, GLuint * arrays); /* 777 */
- GLboolean (GLAPIENTRYP IsVertexArrayAPPLE)(GLuint array); /* 778 */
- void (GLAPIENTRYP GetProgramNamedParameterdvNV)(GLuint id, GLsizei len, const GLubyte * name, GLdouble * params); /* 779 */
- void (GLAPIENTRYP GetProgramNamedParameterfvNV)(GLuint id, GLsizei len, const GLubyte * name, GLfloat * params); /* 780 */
- void (GLAPIENTRYP ProgramNamedParameter4dNV)(GLuint id, GLsizei len, const GLubyte * name, GLdouble x, GLdouble y, GLdouble z, GLdouble w); /* 781 */
- void (GLAPIENTRYP ProgramNamedParameter4dvNV)(GLuint id, GLsizei len, const GLubyte * name, const GLdouble * v); /* 782 */
- void (GLAPIENTRYP ProgramNamedParameter4fNV)(GLuint id, GLsizei len, const GLubyte * name, GLfloat x, GLfloat y, GLfloat z, GLfloat w); /* 783 */
- void (GLAPIENTRYP ProgramNamedParameter4fvNV)(GLuint id, GLsizei len, const GLubyte * name, const GLfloat * v); /* 784 */
- void (GLAPIENTRYP PrimitiveRestartIndexNV)(GLuint index); /* 785 */
- void (GLAPIENTRYP PrimitiveRestartNV)(void); /* 786 */
- void (GLAPIENTRYP DepthBoundsEXT)(GLclampd zmin, GLclampd zmax); /* 787 */
- void (GLAPIENTRYP BlendEquationSeparateEXT)(GLenum modeRGB, GLenum modeA); /* 788 */
- void (GLAPIENTRYP BindFramebufferEXT)(GLenum target, GLuint framebuffer); /* 789 */
- void (GLAPIENTRYP BindRenderbufferEXT)(GLenum target, GLuint renderbuffer); /* 790 */
- GLenum (GLAPIENTRYP CheckFramebufferStatusEXT)(GLenum target); /* 791 */
- void (GLAPIENTRYP DeleteFramebuffersEXT)(GLsizei n, const GLuint * framebuffers); /* 792 */
- void (GLAPIENTRYP DeleteRenderbuffersEXT)(GLsizei n, const GLuint * renderbuffers); /* 793 */
- void (GLAPIENTRYP FramebufferRenderbufferEXT)(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); /* 794 */
- void (GLAPIENTRYP FramebufferTexture1DEXT)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); /* 795 */
- void (GLAPIENTRYP FramebufferTexture2DEXT)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); /* 796 */
- void (GLAPIENTRYP FramebufferTexture3DEXT)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset); /* 797 */
- void (GLAPIENTRYP GenFramebuffersEXT)(GLsizei n, GLuint * framebuffers); /* 798 */
- void (GLAPIENTRYP GenRenderbuffersEXT)(GLsizei n, GLuint * renderbuffers); /* 799 */
- void (GLAPIENTRYP GenerateMipmapEXT)(GLenum target); /* 800 */
- void (GLAPIENTRYP GetFramebufferAttachmentParameterivEXT)(GLenum target, GLenum attachment, GLenum pname, GLint * params); /* 801 */
- void (GLAPIENTRYP GetRenderbufferParameterivEXT)(GLenum target, GLenum pname, GLint * params); /* 802 */
- GLboolean (GLAPIENTRYP IsFramebufferEXT)(GLuint framebuffer); /* 803 */
- GLboolean (GLAPIENTRYP IsRenderbufferEXT)(GLuint renderbuffer); /* 804 */
- void (GLAPIENTRYP RenderbufferStorageEXT)(GLenum target, GLenum internalformat, GLsizei width, GLsizei height); /* 805 */
- void (GLAPIENTRYP BlitFramebufferEXT)(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); /* 806 */
- void (GLAPIENTRYP BufferParameteriAPPLE)(GLenum target, GLenum pname, GLint param); /* 807 */
- void (GLAPIENTRYP FlushMappedBufferRangeAPPLE)(GLenum target, GLintptr offset, GLsizeiptr size); /* 808 */
- void (GLAPIENTRYP BindFragDataLocationEXT)(GLuint program, GLuint colorNumber, const GLchar * name); /* 809 */
- GLint (GLAPIENTRYP GetFragDataLocationEXT)(GLuint program, const GLchar * name); /* 810 */
- void (GLAPIENTRYP GetUniformuivEXT)(GLuint program, GLint location, GLuint * params); /* 811 */
- void (GLAPIENTRYP GetVertexAttribIivEXT)(GLuint index, GLenum pname, GLint * params); /* 812 */
- void (GLAPIENTRYP GetVertexAttribIuivEXT)(GLuint index, GLenum pname, GLuint * params); /* 813 */
- void (GLAPIENTRYP Uniform1uiEXT)(GLint location, GLuint x); /* 814 */
- void (GLAPIENTRYP Uniform1uivEXT)(GLint location, GLsizei count, const GLuint * value); /* 815 */
- void (GLAPIENTRYP Uniform2uiEXT)(GLint location, GLuint x, GLuint y); /* 816 */
- void (GLAPIENTRYP Uniform2uivEXT)(GLint location, GLsizei count, const GLuint * value); /* 817 */
- void (GLAPIENTRYP Uniform3uiEXT)(GLint location, GLuint x, GLuint y, GLuint z); /* 818 */
- void (GLAPIENTRYP Uniform3uivEXT)(GLint location, GLsizei count, const GLuint * value); /* 819 */
- void (GLAPIENTRYP Uniform4uiEXT)(GLint location, GLuint x, GLuint y, GLuint z, GLuint w); /* 820 */
- void (GLAPIENTRYP Uniform4uivEXT)(GLint location, GLsizei count, const GLuint * value); /* 821 */
- void (GLAPIENTRYP VertexAttribI1iEXT)(GLuint index, GLint x); /* 822 */
- void (GLAPIENTRYP VertexAttribI1ivEXT)(GLuint index, const GLint * v); /* 823 */
- void (GLAPIENTRYP VertexAttribI1uiEXT)(GLuint index, GLuint x); /* 824 */
- void (GLAPIENTRYP VertexAttribI1uivEXT)(GLuint index, const GLuint * v); /* 825 */
- void (GLAPIENTRYP VertexAttribI2iEXT)(GLuint index, GLint x, GLint y); /* 826 */
- void (GLAPIENTRYP VertexAttribI2ivEXT)(GLuint index, const GLint * v); /* 827 */
- void (GLAPIENTRYP VertexAttribI2uiEXT)(GLuint index, GLuint x, GLuint y); /* 828 */
- void (GLAPIENTRYP VertexAttribI2uivEXT)(GLuint index, const GLuint * v); /* 829 */
- void (GLAPIENTRYP VertexAttribI3iEXT)(GLuint index, GLint x, GLint y, GLint z); /* 830 */
- void (GLAPIENTRYP VertexAttribI3ivEXT)(GLuint index, const GLint * v); /* 831 */
- void (GLAPIENTRYP VertexAttribI3uiEXT)(GLuint index, GLuint x, GLuint y, GLuint z); /* 832 */
- void (GLAPIENTRYP VertexAttribI3uivEXT)(GLuint index, const GLuint * v); /* 833 */
- void (GLAPIENTRYP VertexAttribI4bvEXT)(GLuint index, const GLbyte * v); /* 834 */
- void (GLAPIENTRYP VertexAttribI4iEXT)(GLuint index, GLint x, GLint y, GLint z, GLint w); /* 835 */
- void (GLAPIENTRYP VertexAttribI4ivEXT)(GLuint index, const GLint * v); /* 836 */
- void (GLAPIENTRYP VertexAttribI4svEXT)(GLuint index, const GLshort * v); /* 837 */
- void (GLAPIENTRYP VertexAttribI4ubvEXT)(GLuint index, const GLubyte * v); /* 838 */
- void (GLAPIENTRYP VertexAttribI4uiEXT)(GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); /* 839 */
- void (GLAPIENTRYP VertexAttribI4uivEXT)(GLuint index, const GLuint * v); /* 840 */
- void (GLAPIENTRYP VertexAttribI4usvEXT)(GLuint index, const GLushort * v); /* 841 */
- void (GLAPIENTRYP VertexAttribIPointerEXT)(GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid * pointer); /* 842 */
- void (GLAPIENTRYP FramebufferTextureLayerEXT)(GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer); /* 843 */
- void (GLAPIENTRYP ColorMaskIndexedEXT)(GLuint buf, GLboolean r, GLboolean g, GLboolean b, GLboolean a); /* 844 */
- void (GLAPIENTRYP DisableIndexedEXT)(GLenum target, GLuint index); /* 845 */
- void (GLAPIENTRYP EnableIndexedEXT)(GLenum target, GLuint index); /* 846 */
- void (GLAPIENTRYP GetBooleanIndexedvEXT)(GLenum value, GLuint index, GLboolean * data); /* 847 */
- void (GLAPIENTRYP GetIntegerIndexedvEXT)(GLenum value, GLuint index, GLint * data); /* 848 */
- GLboolean (GLAPIENTRYP IsEnabledIndexedEXT)(GLenum target, GLuint index); /* 849 */
- void (GLAPIENTRYP ClearColorIiEXT)(GLint r, GLint g, GLint b, GLint a); /* 850 */
- void (GLAPIENTRYP ClearColorIuiEXT)(GLuint r, GLuint g, GLuint b, GLuint a); /* 851 */
- void (GLAPIENTRYP GetTexParameterIivEXT)(GLenum target, GLenum pname, GLint * params); /* 852 */
- void (GLAPIENTRYP GetTexParameterIuivEXT)(GLenum target, GLenum pname, GLuint * params); /* 853 */
- void (GLAPIENTRYP TexParameterIivEXT)(GLenum target, GLenum pname, const GLint * params); /* 854 */
- void (GLAPIENTRYP TexParameterIuivEXT)(GLenum target, GLenum pname, const GLuint * params); /* 855 */
- void (GLAPIENTRYP BeginConditionalRenderNV)(GLuint query, GLenum mode); /* 856 */
- void (GLAPIENTRYP EndConditionalRenderNV)(void); /* 857 */
- void (GLAPIENTRYP BeginTransformFeedbackEXT)(GLenum mode); /* 858 */
- void (GLAPIENTRYP BindBufferBaseEXT)(GLenum target, GLuint index, GLuint buffer); /* 859 */
- void (GLAPIENTRYP BindBufferOffsetEXT)(GLenum target, GLuint index, GLuint buffer, GLintptr offset); /* 860 */
- void (GLAPIENTRYP BindBufferRangeEXT)(GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size); /* 861 */
- void (GLAPIENTRYP EndTransformFeedbackEXT)(void); /* 862 */
- void (GLAPIENTRYP GetTransformFeedbackVaryingEXT)(GLuint program, GLuint index, GLsizei bufSize, GLsizei * length, GLsizei * size, GLenum * type, GLchar * name); /* 863 */
- void (GLAPIENTRYP TransformFeedbackVaryingsEXT)(GLuint program, GLsizei count, const char ** varyings, GLenum bufferMode); /* 864 */
- void (GLAPIENTRYP ProvokingVertexEXT)(GLenum mode); /* 865 */
- void (GLAPIENTRYP GetTexParameterPointervAPPLE)(GLenum target, GLenum pname, GLvoid ** params); /* 866 */
- void (GLAPIENTRYP TextureRangeAPPLE)(GLenum target, GLsizei length, GLvoid * pointer); /* 867 */
- void (GLAPIENTRYP GetObjectParameterivAPPLE)(GLenum objectType, GLuint name, GLenum pname, GLint * value); /* 868 */
- GLenum (GLAPIENTRYP ObjectPurgeableAPPLE)(GLenum objectType, GLuint name, GLenum option); /* 869 */
- GLenum (GLAPIENTRYP ObjectUnpurgeableAPPLE)(GLenum objectType, GLuint name, GLenum option); /* 870 */
- void (GLAPIENTRYP ActiveProgramEXT)(GLuint program); /* 871 */
- GLuint (GLAPIENTRYP CreateShaderProgramEXT)(GLenum type, const GLchar * string); /* 872 */
- void (GLAPIENTRYP UseShaderProgramEXT)(GLenum type, GLuint program); /* 873 */
- void (GLAPIENTRYP StencilFuncSeparateATI)(GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask); /* 874 */
- void (GLAPIENTRYP ProgramEnvParameters4fvEXT)(GLenum target, GLuint index, GLsizei count, const GLfloat * params); /* 875 */
- void (GLAPIENTRYP ProgramLocalParameters4fvEXT)(GLenum target, GLuint index, GLsizei count, const GLfloat * params); /* 876 */
- void (GLAPIENTRYP GetQueryObjecti64vEXT)(GLuint id, GLenum pname, GLint64EXT * params); /* 877 */
- void (GLAPIENTRYP GetQueryObjectui64vEXT)(GLuint id, GLenum pname, GLuint64EXT * params); /* 878 */
- void (GLAPIENTRYP EGLImageTargetRenderbufferStorageOES)(GLenum target, GLvoid * writeOffset); /* 879 */
- void (GLAPIENTRYP EGLImageTargetTexture2DOES)(GLenum target, GLvoid * writeOffset); /* 880 */
+ void (GLAPIENTRYP VertexAttribDivisorARB)(GLuint index, GLuint divisor); /* 578 */
+ void (GLAPIENTRYP FlushMappedBufferRange)(GLenum target, GLintptr offset, GLsizeiptr length); /* 579 */
+ GLvoid * (GLAPIENTRYP MapBufferRange)(GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access); /* 580 */
+ void (GLAPIENTRYP BindVertexArray)(GLuint array); /* 581 */
+ void (GLAPIENTRYP GenVertexArrays)(GLsizei n, GLuint * arrays); /* 582 */
+ void (GLAPIENTRYP CopyBufferSubData)(GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size); /* 583 */
+ GLenum (GLAPIENTRYP ClientWaitSync)(GLsync sync, GLbitfield flags, GLuint64 timeout); /* 584 */
+ void (GLAPIENTRYP DeleteSync)(GLsync sync); /* 585 */
+ GLsync (GLAPIENTRYP FenceSync)(GLenum condition, GLbitfield flags); /* 586 */
+ void (GLAPIENTRYP GetInteger64v)(GLenum pname, GLint64 * params); /* 587 */
+ void (GLAPIENTRYP GetSynciv)(GLsync sync, GLenum pname, GLsizei bufSize, GLsizei * length, GLint * values); /* 588 */
+ GLboolean (GLAPIENTRYP IsSync)(GLsync sync); /* 589 */
+ void (GLAPIENTRYP WaitSync)(GLsync sync, GLbitfield flags, GLuint64 timeout); /* 590 */
+ void (GLAPIENTRYP DrawElementsBaseVertex)(GLenum mode, GLsizei count, GLenum type, const GLvoid * indices, GLint basevertex); /* 591 */
+ void (GLAPIENTRYP DrawRangeElementsBaseVertex)(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid * indices, GLint basevertex); /* 592 */
+ void (GLAPIENTRYP MultiDrawElementsBaseVertex)(GLenum mode, const GLsizei * count, GLenum type, const GLvoid ** indices, GLsizei primcount, const GLint * basevertex); /* 593 */
+ void (GLAPIENTRYP BlendEquationSeparateiARB)(GLuint buf, GLenum modeRGB, GLenum modeA); /* 594 */
+ void (GLAPIENTRYP BlendEquationiARB)(GLuint buf, GLenum mode); /* 595 */
+ void (GLAPIENTRYP BlendFuncSeparateiARB)(GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcA, GLenum dstA); /* 596 */
+ void (GLAPIENTRYP BlendFunciARB)(GLuint buf, GLenum src, GLenum dst); /* 597 */
+ void (GLAPIENTRYP BindTransformFeedback)(GLenum target, GLuint id); /* 598 */
+ void (GLAPIENTRYP DeleteTransformFeedbacks)(GLsizei n, const GLuint * ids); /* 599 */
+ void (GLAPIENTRYP DrawTransformFeedback)(GLenum mode, GLuint id); /* 600 */
+ void (GLAPIENTRYP GenTransformFeedbacks)(GLsizei n, GLuint * ids); /* 601 */
+ GLboolean (GLAPIENTRYP IsTransformFeedback)(GLuint id); /* 602 */
+ void (GLAPIENTRYP PauseTransformFeedback)(void); /* 603 */
+ void (GLAPIENTRYP ResumeTransformFeedback)(void); /* 604 */
+ void (GLAPIENTRYP ClearDepthf)(GLclampf depth); /* 605 */
+ void (GLAPIENTRYP DepthRangef)(GLclampf zNear, GLclampf zFar); /* 606 */
+ void (GLAPIENTRYP GetShaderPrecisionFormat)(GLenum shadertype, GLenum precisiontype, GLint * range, GLint * precision); /* 607 */
+ void (GLAPIENTRYP ReleaseShaderCompiler)(void); /* 608 */
+ void (GLAPIENTRYP ShaderBinary)(GLsizei n, const GLuint * shaders, GLenum binaryformat, const GLvoid * binary, GLsizei length); /* 609 */
+ void (GLAPIENTRYP PolygonOffsetEXT)(GLfloat factor, GLfloat bias); /* 610 */
+ void (GLAPIENTRYP GetPixelTexGenParameterfvSGIS)(GLenum pname, GLfloat * params); /* 611 */
+ void (GLAPIENTRYP GetPixelTexGenParameterivSGIS)(GLenum pname, GLint * params); /* 612 */
+ void (GLAPIENTRYP PixelTexGenParameterfSGIS)(GLenum pname, GLfloat param); /* 613 */
+ void (GLAPIENTRYP PixelTexGenParameterfvSGIS)(GLenum pname, const GLfloat * params); /* 614 */
+ void (GLAPIENTRYP PixelTexGenParameteriSGIS)(GLenum pname, GLint param); /* 615 */
+ void (GLAPIENTRYP PixelTexGenParameterivSGIS)(GLenum pname, const GLint * params); /* 616 */
+ void (GLAPIENTRYP SampleMaskSGIS)(GLclampf value, GLboolean invert); /* 617 */
+ void (GLAPIENTRYP SamplePatternSGIS)(GLenum pattern); /* 618 */
+ void (GLAPIENTRYP ColorPointerEXT)(GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid * pointer); /* 619 */
+ void (GLAPIENTRYP EdgeFlagPointerEXT)(GLsizei stride, GLsizei count, const GLboolean * pointer); /* 620 */
+ void (GLAPIENTRYP IndexPointerEXT)(GLenum type, GLsizei stride, GLsizei count, const GLvoid * pointer); /* 621 */
+ void (GLAPIENTRYP NormalPointerEXT)(GLenum type, GLsizei stride, GLsizei count, const GLvoid * pointer); /* 622 */
+ void (GLAPIENTRYP TexCoordPointerEXT)(GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid * pointer); /* 623 */
+ void (GLAPIENTRYP VertexPointerEXT)(GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid * pointer); /* 624 */
+ void (GLAPIENTRYP PointParameterfEXT)(GLenum pname, GLfloat param); /* 625 */
+ void (GLAPIENTRYP PointParameterfvEXT)(GLenum pname, const GLfloat * params); /* 626 */
+ void (GLAPIENTRYP LockArraysEXT)(GLint first, GLsizei count); /* 627 */
+ void (GLAPIENTRYP UnlockArraysEXT)(void); /* 628 */
+ void (GLAPIENTRYP SecondaryColor3bEXT)(GLbyte red, GLbyte green, GLbyte blue); /* 629 */
+ void (GLAPIENTRYP SecondaryColor3bvEXT)(const GLbyte * v); /* 630 */
+ void (GLAPIENTRYP SecondaryColor3dEXT)(GLdouble red, GLdouble green, GLdouble blue); /* 631 */
+ void (GLAPIENTRYP SecondaryColor3dvEXT)(const GLdouble * v); /* 632 */
+ void (GLAPIENTRYP SecondaryColor3fEXT)(GLfloat red, GLfloat green, GLfloat blue); /* 633 */
+ void (GLAPIENTRYP SecondaryColor3fvEXT)(const GLfloat * v); /* 634 */
+ void (GLAPIENTRYP SecondaryColor3iEXT)(GLint red, GLint green, GLint blue); /* 635 */
+ void (GLAPIENTRYP SecondaryColor3ivEXT)(const GLint * v); /* 636 */
+ void (GLAPIENTRYP SecondaryColor3sEXT)(GLshort red, GLshort green, GLshort blue); /* 637 */
+ void (GLAPIENTRYP SecondaryColor3svEXT)(const GLshort * v); /* 638 */
+ void (GLAPIENTRYP SecondaryColor3ubEXT)(GLubyte red, GLubyte green, GLubyte blue); /* 639 */
+ void (GLAPIENTRYP SecondaryColor3ubvEXT)(const GLubyte * v); /* 640 */
+ void (GLAPIENTRYP SecondaryColor3uiEXT)(GLuint red, GLuint green, GLuint blue); /* 641 */
+ void (GLAPIENTRYP SecondaryColor3uivEXT)(const GLuint * v); /* 642 */
+ void (GLAPIENTRYP SecondaryColor3usEXT)(GLushort red, GLushort green, GLushort blue); /* 643 */
+ void (GLAPIENTRYP SecondaryColor3usvEXT)(const GLushort * v); /* 644 */
+ void (GLAPIENTRYP SecondaryColorPointerEXT)(GLint size, GLenum type, GLsizei stride, const GLvoid * pointer); /* 645 */
+ void (GLAPIENTRYP MultiDrawArraysEXT)(GLenum mode, const GLint * first, const GLsizei * count, GLsizei primcount); /* 646 */
+ void (GLAPIENTRYP MultiDrawElementsEXT)(GLenum mode, const GLsizei * count, GLenum type, const GLvoid ** indices, GLsizei primcount); /* 647 */
+ void (GLAPIENTRYP FogCoordPointerEXT)(GLenum type, GLsizei stride, const GLvoid * pointer); /* 648 */
+ void (GLAPIENTRYP FogCoorddEXT)(GLdouble coord); /* 649 */
+ void (GLAPIENTRYP FogCoorddvEXT)(const GLdouble * coord); /* 650 */
+ void (GLAPIENTRYP FogCoordfEXT)(GLfloat coord); /* 651 */
+ void (GLAPIENTRYP FogCoordfvEXT)(const GLfloat * coord); /* 652 */
+ void (GLAPIENTRYP PixelTexGenSGIX)(GLenum mode); /* 653 */
+ void (GLAPIENTRYP BlendFuncSeparateEXT)(GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); /* 654 */
+ void (GLAPIENTRYP FlushVertexArrayRangeNV)(void); /* 655 */
+ void (GLAPIENTRYP VertexArrayRangeNV)(GLsizei length, const GLvoid * pointer); /* 656 */
+ void (GLAPIENTRYP CombinerInputNV)(GLenum stage, GLenum portion, GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage); /* 657 */
+ void (GLAPIENTRYP CombinerOutputNV)(GLenum stage, GLenum portion, GLenum abOutput, GLenum cdOutput, GLenum sumOutput, GLenum scale, GLenum bias, GLboolean abDotProduct, GLboolean cdDotProduct, GLboolean muxSum); /* 658 */
+ void (GLAPIENTRYP CombinerParameterfNV)(GLenum pname, GLfloat param); /* 659 */
+ void (GLAPIENTRYP CombinerParameterfvNV)(GLenum pname, const GLfloat * params); /* 660 */
+ void (GLAPIENTRYP CombinerParameteriNV)(GLenum pname, GLint param); /* 661 */
+ void (GLAPIENTRYP CombinerParameterivNV)(GLenum pname, const GLint * params); /* 662 */
+ void (GLAPIENTRYP FinalCombinerInputNV)(GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage); /* 663 */
+ void (GLAPIENTRYP GetCombinerInputParameterfvNV)(GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLfloat * params); /* 664 */
+ void (GLAPIENTRYP GetCombinerInputParameterivNV)(GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLint * params); /* 665 */
+ void (GLAPIENTRYP GetCombinerOutputParameterfvNV)(GLenum stage, GLenum portion, GLenum pname, GLfloat * params); /* 666 */
+ void (GLAPIENTRYP GetCombinerOutputParameterivNV)(GLenum stage, GLenum portion, GLenum pname, GLint * params); /* 667 */
+ void (GLAPIENTRYP GetFinalCombinerInputParameterfvNV)(GLenum variable, GLenum pname, GLfloat * params); /* 668 */
+ void (GLAPIENTRYP GetFinalCombinerInputParameterivNV)(GLenum variable, GLenum pname, GLint * params); /* 669 */
+ void (GLAPIENTRYP ResizeBuffersMESA)(void); /* 670 */
+ void (GLAPIENTRYP WindowPos2dMESA)(GLdouble x, GLdouble y); /* 671 */
+ void (GLAPIENTRYP WindowPos2dvMESA)(const GLdouble * v); /* 672 */
+ void (GLAPIENTRYP WindowPos2fMESA)(GLfloat x, GLfloat y); /* 673 */
+ void (GLAPIENTRYP WindowPos2fvMESA)(const GLfloat * v); /* 674 */
+ void (GLAPIENTRYP WindowPos2iMESA)(GLint x, GLint y); /* 675 */
+ void (GLAPIENTRYP WindowPos2ivMESA)(const GLint * v); /* 676 */
+ void (GLAPIENTRYP WindowPos2sMESA)(GLshort x, GLshort y); /* 677 */
+ void (GLAPIENTRYP WindowPos2svMESA)(const GLshort * v); /* 678 */
+ void (GLAPIENTRYP WindowPos3dMESA)(GLdouble x, GLdouble y, GLdouble z); /* 679 */
+ void (GLAPIENTRYP WindowPos3dvMESA)(const GLdouble * v); /* 680 */
+ void (GLAPIENTRYP WindowPos3fMESA)(GLfloat x, GLfloat y, GLfloat z); /* 681 */
+ void (GLAPIENTRYP WindowPos3fvMESA)(const GLfloat * v); /* 682 */
+ void (GLAPIENTRYP WindowPos3iMESA)(GLint x, GLint y, GLint z); /* 683 */
+ void (GLAPIENTRYP WindowPos3ivMESA)(const GLint * v); /* 684 */
+ void (GLAPIENTRYP WindowPos3sMESA)(GLshort x, GLshort y, GLshort z); /* 685 */
+ void (GLAPIENTRYP WindowPos3svMESA)(const GLshort * v); /* 686 */
+ void (GLAPIENTRYP WindowPos4dMESA)(GLdouble x, GLdouble y, GLdouble z, GLdouble w); /* 687 */
+ void (GLAPIENTRYP WindowPos4dvMESA)(const GLdouble * v); /* 688 */
+ void (GLAPIENTRYP WindowPos4fMESA)(GLfloat x, GLfloat y, GLfloat z, GLfloat w); /* 689 */
+ void (GLAPIENTRYP WindowPos4fvMESA)(const GLfloat * v); /* 690 */
+ void (GLAPIENTRYP WindowPos4iMESA)(GLint x, GLint y, GLint z, GLint w); /* 691 */
+ void (GLAPIENTRYP WindowPos4ivMESA)(const GLint * v); /* 692 */
+ void (GLAPIENTRYP WindowPos4sMESA)(GLshort x, GLshort y, GLshort z, GLshort w); /* 693 */
+ void (GLAPIENTRYP WindowPos4svMESA)(const GLshort * v); /* 694 */
+ void (GLAPIENTRYP MultiModeDrawArraysIBM)(const GLenum * mode, const GLint * first, const GLsizei * count, GLsizei primcount, GLint modestride); /* 695 */
+ void (GLAPIENTRYP MultiModeDrawElementsIBM)(const GLenum * mode, const GLsizei * count, GLenum type, const GLvoid * const * indices, GLsizei primcount, GLint modestride); /* 696 */
+ void (GLAPIENTRYP DeleteFencesNV)(GLsizei n, const GLuint * fences); /* 697 */
+ void (GLAPIENTRYP FinishFenceNV)(GLuint fence); /* 698 */
+ void (GLAPIENTRYP GenFencesNV)(GLsizei n, GLuint * fences); /* 699 */
+ void (GLAPIENTRYP GetFenceivNV)(GLuint fence, GLenum pname, GLint * params); /* 700 */
+ GLboolean (GLAPIENTRYP IsFenceNV)(GLuint fence); /* 701 */
+ void (GLAPIENTRYP SetFenceNV)(GLuint fence, GLenum condition); /* 702 */
+ GLboolean (GLAPIENTRYP TestFenceNV)(GLuint fence); /* 703 */
+ GLboolean (GLAPIENTRYP AreProgramsResidentNV)(GLsizei n, const GLuint * ids, GLboolean * residences); /* 704 */
+ void (GLAPIENTRYP BindProgramNV)(GLenum target, GLuint program); /* 705 */
+ void (GLAPIENTRYP DeleteProgramsNV)(GLsizei n, const GLuint * programs); /* 706 */
+ void (GLAPIENTRYP ExecuteProgramNV)(GLenum target, GLuint id, const GLfloat * params); /* 707 */
+ void (GLAPIENTRYP GenProgramsNV)(GLsizei n, GLuint * programs); /* 708 */
+ void (GLAPIENTRYP GetProgramParameterdvNV)(GLenum target, GLuint index, GLenum pname, GLdouble * params); /* 709 */
+ void (GLAPIENTRYP GetProgramParameterfvNV)(GLenum target, GLuint index, GLenum pname, GLfloat * params); /* 710 */
+ void (GLAPIENTRYP GetProgramStringNV)(GLuint id, GLenum pname, GLubyte * program); /* 711 */
+ void (GLAPIENTRYP GetProgramivNV)(GLuint id, GLenum pname, GLint * params); /* 712 */
+ void (GLAPIENTRYP GetTrackMatrixivNV)(GLenum target, GLuint address, GLenum pname, GLint * params); /* 713 */
+ void (GLAPIENTRYP GetVertexAttribPointervNV)(GLuint index, GLenum pname, GLvoid ** pointer); /* 714 */
+ void (GLAPIENTRYP GetVertexAttribdvNV)(GLuint index, GLenum pname, GLdouble * params); /* 715 */
+ void (GLAPIENTRYP GetVertexAttribfvNV)(GLuint index, GLenum pname, GLfloat * params); /* 716 */
+ void (GLAPIENTRYP GetVertexAttribivNV)(GLuint index, GLenum pname, GLint * params); /* 717 */
+ GLboolean (GLAPIENTRYP IsProgramNV)(GLuint program); /* 718 */
+ void (GLAPIENTRYP LoadProgramNV)(GLenum target, GLuint id, GLsizei len, const GLubyte * program); /* 719 */
+ void (GLAPIENTRYP ProgramParameters4dvNV)(GLenum target, GLuint index, GLsizei num, const GLdouble * params); /* 720 */
+ void (GLAPIENTRYP ProgramParameters4fvNV)(GLenum target, GLuint index, GLsizei num, const GLfloat * params); /* 721 */
+ void (GLAPIENTRYP RequestResidentProgramsNV)(GLsizei n, const GLuint * ids); /* 722 */
+ void (GLAPIENTRYP TrackMatrixNV)(GLenum target, GLuint address, GLenum matrix, GLenum transform); /* 723 */
+ void (GLAPIENTRYP VertexAttrib1dNV)(GLuint index, GLdouble x); /* 724 */
+ void (GLAPIENTRYP VertexAttrib1dvNV)(GLuint index, const GLdouble * v); /* 725 */
+ void (GLAPIENTRYP VertexAttrib1fNV)(GLuint index, GLfloat x); /* 726 */
+ void (GLAPIENTRYP VertexAttrib1fvNV)(GLuint index, const GLfloat * v); /* 727 */
+ void (GLAPIENTRYP VertexAttrib1sNV)(GLuint index, GLshort x); /* 728 */
+ void (GLAPIENTRYP VertexAttrib1svNV)(GLuint index, const GLshort * v); /* 729 */
+ void (GLAPIENTRYP VertexAttrib2dNV)(GLuint index, GLdouble x, GLdouble y); /* 730 */
+ void (GLAPIENTRYP VertexAttrib2dvNV)(GLuint index, const GLdouble * v); /* 731 */
+ void (GLAPIENTRYP VertexAttrib2fNV)(GLuint index, GLfloat x, GLfloat y); /* 732 */
+ void (GLAPIENTRYP VertexAttrib2fvNV)(GLuint index, const GLfloat * v); /* 733 */
+ void (GLAPIENTRYP VertexAttrib2sNV)(GLuint index, GLshort x, GLshort y); /* 734 */
+ void (GLAPIENTRYP VertexAttrib2svNV)(GLuint index, const GLshort * v); /* 735 */
+ void (GLAPIENTRYP VertexAttrib3dNV)(GLuint index, GLdouble x, GLdouble y, GLdouble z); /* 736 */
+ void (GLAPIENTRYP VertexAttrib3dvNV)(GLuint index, const GLdouble * v); /* 737 */
+ void (GLAPIENTRYP VertexAttrib3fNV)(GLuint index, GLfloat x, GLfloat y, GLfloat z); /* 738 */
+ void (GLAPIENTRYP VertexAttrib3fvNV)(GLuint index, const GLfloat * v); /* 739 */
+ void (GLAPIENTRYP VertexAttrib3sNV)(GLuint index, GLshort x, GLshort y, GLshort z); /* 740 */
+ void (GLAPIENTRYP VertexAttrib3svNV)(GLuint index, const GLshort * v); /* 741 */
+ void (GLAPIENTRYP VertexAttrib4dNV)(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); /* 742 */
+ void (GLAPIENTRYP VertexAttrib4dvNV)(GLuint index, const GLdouble * v); /* 743 */
+ void (GLAPIENTRYP VertexAttrib4fNV)(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); /* 744 */
+ void (GLAPIENTRYP VertexAttrib4fvNV)(GLuint index, const GLfloat * v); /* 745 */
+ void (GLAPIENTRYP VertexAttrib4sNV)(GLuint index, GLshort x, GLshort y, GLshort z, GLshort w); /* 746 */
+ void (GLAPIENTRYP VertexAttrib4svNV)(GLuint index, const GLshort * v); /* 747 */
+ void (GLAPIENTRYP VertexAttrib4ubNV)(GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w); /* 748 */
+ void (GLAPIENTRYP VertexAttrib4ubvNV)(GLuint index, const GLubyte * v); /* 749 */
+ void (GLAPIENTRYP VertexAttribPointerNV)(GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid * pointer); /* 750 */
+ void (GLAPIENTRYP VertexAttribs1dvNV)(GLuint index, GLsizei n, const GLdouble * v); /* 751 */
+ void (GLAPIENTRYP VertexAttribs1fvNV)(GLuint index, GLsizei n, const GLfloat * v); /* 752 */
+ void (GLAPIENTRYP VertexAttribs1svNV)(GLuint index, GLsizei n, const GLshort * v); /* 753 */
+ void (GLAPIENTRYP VertexAttribs2dvNV)(GLuint index, GLsizei n, const GLdouble * v); /* 754 */
+ void (GLAPIENTRYP VertexAttribs2fvNV)(GLuint index, GLsizei n, const GLfloat * v); /* 755 */
+ void (GLAPIENTRYP VertexAttribs2svNV)(GLuint index, GLsizei n, const GLshort * v); /* 756 */
+ void (GLAPIENTRYP VertexAttribs3dvNV)(GLuint index, GLsizei n, const GLdouble * v); /* 757 */
+ void (GLAPIENTRYP VertexAttribs3fvNV)(GLuint index, GLsizei n, const GLfloat * v); /* 758 */
+ void (GLAPIENTRYP VertexAttribs3svNV)(GLuint index, GLsizei n, const GLshort * v); /* 759 */
+ void (GLAPIENTRYP VertexAttribs4dvNV)(GLuint index, GLsizei n, const GLdouble * v); /* 760 */
+ void (GLAPIENTRYP VertexAttribs4fvNV)(GLuint index, GLsizei n, const GLfloat * v); /* 761 */
+ void (GLAPIENTRYP VertexAttribs4svNV)(GLuint index, GLsizei n, const GLshort * v); /* 762 */
+ void (GLAPIENTRYP VertexAttribs4ubvNV)(GLuint index, GLsizei n, const GLubyte * v); /* 763 */
+ void (GLAPIENTRYP GetTexBumpParameterfvATI)(GLenum pname, GLfloat * param); /* 764 */
+ void (GLAPIENTRYP GetTexBumpParameterivATI)(GLenum pname, GLint * param); /* 765 */
+ void (GLAPIENTRYP TexBumpParameterfvATI)(GLenum pname, const GLfloat * param); /* 766 */
+ void (GLAPIENTRYP TexBumpParameterivATI)(GLenum pname, const GLint * param); /* 767 */
+ void (GLAPIENTRYP AlphaFragmentOp1ATI)(GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod); /* 768 */
+ void (GLAPIENTRYP AlphaFragmentOp2ATI)(GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod); /* 769 */
+ void (GLAPIENTRYP AlphaFragmentOp3ATI)(GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod); /* 770 */
+ void (GLAPIENTRYP BeginFragmentShaderATI)(void); /* 771 */
+ void (GLAPIENTRYP BindFragmentShaderATI)(GLuint id); /* 772 */
+ void (GLAPIENTRYP ColorFragmentOp1ATI)(GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod); /* 773 */
+ void (GLAPIENTRYP ColorFragmentOp2ATI)(GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod); /* 774 */
+ void (GLAPIENTRYP ColorFragmentOp3ATI)(GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod); /* 775 */
+ void (GLAPIENTRYP DeleteFragmentShaderATI)(GLuint id); /* 776 */
+ void (GLAPIENTRYP EndFragmentShaderATI)(void); /* 777 */
+ GLuint (GLAPIENTRYP GenFragmentShadersATI)(GLuint range); /* 778 */
+ void (GLAPIENTRYP PassTexCoordATI)(GLuint dst, GLuint coord, GLenum swizzle); /* 779 */
+ void (GLAPIENTRYP SampleMapATI)(GLuint dst, GLuint interp, GLenum swizzle); /* 780 */
+ void (GLAPIENTRYP SetFragmentShaderConstantATI)(GLuint dst, const GLfloat * value); /* 781 */
+ void (GLAPIENTRYP PointParameteriNV)(GLenum pname, GLint param); /* 782 */
+ void (GLAPIENTRYP PointParameterivNV)(GLenum pname, const GLint * params); /* 783 */
+ void (GLAPIENTRYP ActiveStencilFaceEXT)(GLenum face); /* 784 */
+ void (GLAPIENTRYP BindVertexArrayAPPLE)(GLuint array); /* 785 */
+ void (GLAPIENTRYP DeleteVertexArraysAPPLE)(GLsizei n, const GLuint * arrays); /* 786 */
+ void (GLAPIENTRYP GenVertexArraysAPPLE)(GLsizei n, GLuint * arrays); /* 787 */
+ GLboolean (GLAPIENTRYP IsVertexArrayAPPLE)(GLuint array); /* 788 */
+ void (GLAPIENTRYP GetProgramNamedParameterdvNV)(GLuint id, GLsizei len, const GLubyte * name, GLdouble * params); /* 789 */
+ void (GLAPIENTRYP GetProgramNamedParameterfvNV)(GLuint id, GLsizei len, const GLubyte * name, GLfloat * params); /* 790 */
+ void (GLAPIENTRYP ProgramNamedParameter4dNV)(GLuint id, GLsizei len, const GLubyte * name, GLdouble x, GLdouble y, GLdouble z, GLdouble w); /* 791 */
+ void (GLAPIENTRYP ProgramNamedParameter4dvNV)(GLuint id, GLsizei len, const GLubyte * name, const GLdouble * v); /* 792 */
+ void (GLAPIENTRYP ProgramNamedParameter4fNV)(GLuint id, GLsizei len, const GLubyte * name, GLfloat x, GLfloat y, GLfloat z, GLfloat w); /* 793 */
+ void (GLAPIENTRYP ProgramNamedParameter4fvNV)(GLuint id, GLsizei len, const GLubyte * name, const GLfloat * v); /* 794 */
+ void (GLAPIENTRYP PrimitiveRestartIndexNV)(GLuint index); /* 795 */
+ void (GLAPIENTRYP PrimitiveRestartNV)(void); /* 796 */
+ void (GLAPIENTRYP DepthBoundsEXT)(GLclampd zmin, GLclampd zmax); /* 797 */
+ void (GLAPIENTRYP BlendEquationSeparateEXT)(GLenum modeRGB, GLenum modeA); /* 798 */
+ void (GLAPIENTRYP BindFramebufferEXT)(GLenum target, GLuint framebuffer); /* 799 */
+ void (GLAPIENTRYP BindRenderbufferEXT)(GLenum target, GLuint renderbuffer); /* 800 */
+ GLenum (GLAPIENTRYP CheckFramebufferStatusEXT)(GLenum target); /* 801 */
+ void (GLAPIENTRYP DeleteFramebuffersEXT)(GLsizei n, const GLuint * framebuffers); /* 802 */
+ void (GLAPIENTRYP DeleteRenderbuffersEXT)(GLsizei n, const GLuint * renderbuffers); /* 803 */
+ void (GLAPIENTRYP FramebufferRenderbufferEXT)(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); /* 804 */
+ void (GLAPIENTRYP FramebufferTexture1DEXT)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); /* 805 */
+ void (GLAPIENTRYP FramebufferTexture2DEXT)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); /* 806 */
+ void (GLAPIENTRYP FramebufferTexture3DEXT)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset); /* 807 */
+ void (GLAPIENTRYP GenFramebuffersEXT)(GLsizei n, GLuint * framebuffers); /* 808 */
+ void (GLAPIENTRYP GenRenderbuffersEXT)(GLsizei n, GLuint * renderbuffers); /* 809 */
+ void (GLAPIENTRYP GenerateMipmapEXT)(GLenum target); /* 810 */
+ void (GLAPIENTRYP GetFramebufferAttachmentParameterivEXT)(GLenum target, GLenum attachment, GLenum pname, GLint * params); /* 811 */
+ void (GLAPIENTRYP GetRenderbufferParameterivEXT)(GLenum target, GLenum pname, GLint * params); /* 812 */
+ GLboolean (GLAPIENTRYP IsFramebufferEXT)(GLuint framebuffer); /* 813 */
+ GLboolean (GLAPIENTRYP IsRenderbufferEXT)(GLuint renderbuffer); /* 814 */
+ void (GLAPIENTRYP RenderbufferStorageEXT)(GLenum target, GLenum internalformat, GLsizei width, GLsizei height); /* 815 */
+ void (GLAPIENTRYP BlitFramebufferEXT)(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); /* 816 */
+ void (GLAPIENTRYP BufferParameteriAPPLE)(GLenum target, GLenum pname, GLint param); /* 817 */
+ void (GLAPIENTRYP FlushMappedBufferRangeAPPLE)(GLenum target, GLintptr offset, GLsizeiptr size); /* 818 */
+ void (GLAPIENTRYP BindFragDataLocationEXT)(GLuint program, GLuint colorNumber, const GLchar * name); /* 819 */
+ GLint (GLAPIENTRYP GetFragDataLocationEXT)(GLuint program, const GLchar * name); /* 820 */
+ void (GLAPIENTRYP GetUniformuivEXT)(GLuint program, GLint location, GLuint * params); /* 821 */
+ void (GLAPIENTRYP GetVertexAttribIivEXT)(GLuint index, GLenum pname, GLint * params); /* 822 */
+ void (GLAPIENTRYP GetVertexAttribIuivEXT)(GLuint index, GLenum pname, GLuint * params); /* 823 */
+ void (GLAPIENTRYP Uniform1uiEXT)(GLint location, GLuint x); /* 824 */
+ void (GLAPIENTRYP Uniform1uivEXT)(GLint location, GLsizei count, const GLuint * value); /* 825 */
+ void (GLAPIENTRYP Uniform2uiEXT)(GLint location, GLuint x, GLuint y); /* 826 */
+ void (GLAPIENTRYP Uniform2uivEXT)(GLint location, GLsizei count, const GLuint * value); /* 827 */
+ void (GLAPIENTRYP Uniform3uiEXT)(GLint location, GLuint x, GLuint y, GLuint z); /* 828 */
+ void (GLAPIENTRYP Uniform3uivEXT)(GLint location, GLsizei count, const GLuint * value); /* 829 */
+ void (GLAPIENTRYP Uniform4uiEXT)(GLint location, GLuint x, GLuint y, GLuint z, GLuint w); /* 830 */
+ void (GLAPIENTRYP Uniform4uivEXT)(GLint location, GLsizei count, const GLuint * value); /* 831 */
+ void (GLAPIENTRYP VertexAttribI1iEXT)(GLuint index, GLint x); /* 832 */
+ void (GLAPIENTRYP VertexAttribI1ivEXT)(GLuint index, const GLint * v); /* 833 */
+ void (GLAPIENTRYP VertexAttribI1uiEXT)(GLuint index, GLuint x); /* 834 */
+ void (GLAPIENTRYP VertexAttribI1uivEXT)(GLuint index, const GLuint * v); /* 835 */
+ void (GLAPIENTRYP VertexAttribI2iEXT)(GLuint index, GLint x, GLint y); /* 836 */
+ void (GLAPIENTRYP VertexAttribI2ivEXT)(GLuint index, const GLint * v); /* 837 */
+ void (GLAPIENTRYP VertexAttribI2uiEXT)(GLuint index, GLuint x, GLuint y); /* 838 */
+ void (GLAPIENTRYP VertexAttribI2uivEXT)(GLuint index, const GLuint * v); /* 839 */
+ void (GLAPIENTRYP VertexAttribI3iEXT)(GLuint index, GLint x, GLint y, GLint z); /* 840 */
+ void (GLAPIENTRYP VertexAttribI3ivEXT)(GLuint index, const GLint * v); /* 841 */
+ void (GLAPIENTRYP VertexAttribI3uiEXT)(GLuint index, GLuint x, GLuint y, GLuint z); /* 842 */
+ void (GLAPIENTRYP VertexAttribI3uivEXT)(GLuint index, const GLuint * v); /* 843 */
+ void (GLAPIENTRYP VertexAttribI4bvEXT)(GLuint index, const GLbyte * v); /* 844 */
+ void (GLAPIENTRYP VertexAttribI4iEXT)(GLuint index, GLint x, GLint y, GLint z, GLint w); /* 845 */
+ void (GLAPIENTRYP VertexAttribI4ivEXT)(GLuint index, const GLint * v); /* 846 */
+ void (GLAPIENTRYP VertexAttribI4svEXT)(GLuint index, const GLshort * v); /* 847 */
+ void (GLAPIENTRYP VertexAttribI4ubvEXT)(GLuint index, const GLubyte * v); /* 848 */
+ void (GLAPIENTRYP VertexAttribI4uiEXT)(GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); /* 849 */
+ void (GLAPIENTRYP VertexAttribI4uivEXT)(GLuint index, const GLuint * v); /* 850 */
+ void (GLAPIENTRYP VertexAttribI4usvEXT)(GLuint index, const GLushort * v); /* 851 */
+ void (GLAPIENTRYP VertexAttribIPointerEXT)(GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid * pointer); /* 852 */
+ void (GLAPIENTRYP FramebufferTextureLayerEXT)(GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer); /* 853 */
+ void (GLAPIENTRYP ColorMaskIndexedEXT)(GLuint buf, GLboolean r, GLboolean g, GLboolean b, GLboolean a); /* 854 */
+ void (GLAPIENTRYP DisableIndexedEXT)(GLenum target, GLuint index); /* 855 */
+ void (GLAPIENTRYP EnableIndexedEXT)(GLenum target, GLuint index); /* 856 */
+ void (GLAPIENTRYP GetBooleanIndexedvEXT)(GLenum value, GLuint index, GLboolean * data); /* 857 */
+ void (GLAPIENTRYP GetIntegerIndexedvEXT)(GLenum value, GLuint index, GLint * data); /* 858 */
+ GLboolean (GLAPIENTRYP IsEnabledIndexedEXT)(GLenum target, GLuint index); /* 859 */
+ void (GLAPIENTRYP ClearColorIiEXT)(GLint r, GLint g, GLint b, GLint a); /* 860 */
+ void (GLAPIENTRYP ClearColorIuiEXT)(GLuint r, GLuint g, GLuint b, GLuint a); /* 861 */
+ void (GLAPIENTRYP GetTexParameterIivEXT)(GLenum target, GLenum pname, GLint * params); /* 862 */
+ void (GLAPIENTRYP GetTexParameterIuivEXT)(GLenum target, GLenum pname, GLuint * params); /* 863 */
+ void (GLAPIENTRYP TexParameterIivEXT)(GLenum target, GLenum pname, const GLint * params); /* 864 */
+ void (GLAPIENTRYP TexParameterIuivEXT)(GLenum target, GLenum pname, const GLuint * params); /* 865 */
+ void (GLAPIENTRYP BeginConditionalRenderNV)(GLuint query, GLenum mode); /* 866 */
+ void (GLAPIENTRYP EndConditionalRenderNV)(void); /* 867 */
+ void (GLAPIENTRYP BeginTransformFeedbackEXT)(GLenum mode); /* 868 */
+ void (GLAPIENTRYP BindBufferBaseEXT)(GLenum target, GLuint index, GLuint buffer); /* 869 */
+ void (GLAPIENTRYP BindBufferOffsetEXT)(GLenum target, GLuint index, GLuint buffer, GLintptr offset); /* 870 */
+ void (GLAPIENTRYP BindBufferRangeEXT)(GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size); /* 871 */
+ void (GLAPIENTRYP EndTransformFeedbackEXT)(void); /* 872 */
+ void (GLAPIENTRYP GetTransformFeedbackVaryingEXT)(GLuint program, GLuint index, GLsizei bufSize, GLsizei * length, GLsizei * size, GLenum * type, GLchar * name); /* 873 */
+ void (GLAPIENTRYP TransformFeedbackVaryingsEXT)(GLuint program, GLsizei count, const char ** varyings, GLenum bufferMode); /* 874 */
+ void (GLAPIENTRYP ProvokingVertexEXT)(GLenum mode); /* 875 */
+ void (GLAPIENTRYP GetTexParameterPointervAPPLE)(GLenum target, GLenum pname, GLvoid ** params); /* 876 */
+ void (GLAPIENTRYP TextureRangeAPPLE)(GLenum target, GLsizei length, GLvoid * pointer); /* 877 */
+ void (GLAPIENTRYP GetObjectParameterivAPPLE)(GLenum objectType, GLuint name, GLenum pname, GLint * value); /* 878 */
+ GLenum (GLAPIENTRYP ObjectPurgeableAPPLE)(GLenum objectType, GLuint name, GLenum option); /* 879 */
+ GLenum (GLAPIENTRYP ObjectUnpurgeableAPPLE)(GLenum objectType, GLuint name, GLenum option); /* 880 */
+ void (GLAPIENTRYP ActiveProgramEXT)(GLuint program); /* 881 */
+ GLuint (GLAPIENTRYP CreateShaderProgramEXT)(GLenum type, const GLchar * string); /* 882 */
+ void (GLAPIENTRYP UseShaderProgramEXT)(GLenum type, GLuint program); /* 883 */
+ void (GLAPIENTRYP TextureBarrierNV)(void); /* 884 */
+ void (GLAPIENTRYP StencilFuncSeparateATI)(GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask); /* 885 */
+ void (GLAPIENTRYP ProgramEnvParameters4fvEXT)(GLenum target, GLuint index, GLsizei count, const GLfloat * params); /* 886 */
+ void (GLAPIENTRYP ProgramLocalParameters4fvEXT)(GLenum target, GLuint index, GLsizei count, const GLfloat * params); /* 887 */
+ void (GLAPIENTRYP GetQueryObjecti64vEXT)(GLuint id, GLenum pname, GLint64EXT * params); /* 888 */
+ void (GLAPIENTRYP GetQueryObjectui64vEXT)(GLuint id, GLenum pname, GLuint64EXT * params); /* 889 */
+ void (GLAPIENTRYP EGLImageTargetRenderbufferStorageOES)(GLenum target, GLvoid * writeOffset); /* 890 */
+ void (GLAPIENTRYP EGLImageTargetTexture2DOES)(GLenum target, GLvoid * writeOffset); /* 891 */
};
#endif /* !defined( _GLAPI_TABLE_H_ ) */
diff --git a/src/mapi/glapi/glapitemp.h b/src/mapi/glapi/glapitemp.h
index cf844dc90c5..941532046e0 100644
--- a/src/mapi/glapi/glapitemp.h
+++ b/src/mapi/glapi/glapitemp.h
@@ -3952,6 +3952,11 @@ KEYWORD1 void KEYWORD2 NAME(ProgramParameteriARB)(GLuint program, GLenum pname,
DISPATCH(ProgramParameteriARB, (program, pname, value), (F, "glProgramParameteriARB(%d, 0x%x, %d);\n", program, pname, value));
}
+KEYWORD1 void KEYWORD2 NAME(VertexAttribDivisorARB)(GLuint index, GLuint divisor)
+{
+ DISPATCH(VertexAttribDivisorARB, (index, divisor), (F, "glVertexAttribDivisorARB(%d, %d);\n", index, divisor));
+}
+
KEYWORD1 void KEYWORD2 NAME(FlushMappedBufferRange)(GLenum target, GLintptr offset, GLsizeiptr length)
{
DISPATCH(FlushMappedBufferRange, (target, offset, length), (F, "glFlushMappedBufferRange(0x%x, %d, %d);\n", target, offset, length));
@@ -4027,6 +4032,26 @@ KEYWORD1 void KEYWORD2 NAME(MultiDrawElementsBaseVertex)(GLenum mode, const GLsi
DISPATCH(MultiDrawElementsBaseVertex, (mode, count, type, indices, primcount, basevertex), (F, "glMultiDrawElementsBaseVertex(0x%x, %p, 0x%x, %p, %d, %p);\n", mode, (const void *) count, type, (const void *) indices, primcount, (const void *) basevertex));
}
+KEYWORD1 void KEYWORD2 NAME(BlendEquationSeparateiARB)(GLuint buf, GLenum modeRGB, GLenum modeA)
+{
+ DISPATCH(BlendEquationSeparateiARB, (buf, modeRGB, modeA), (F, "glBlendEquationSeparateiARB(%d, 0x%x, 0x%x);\n", buf, modeRGB, modeA));
+}
+
+KEYWORD1 void KEYWORD2 NAME(BlendEquationiARB)(GLuint buf, GLenum mode)
+{
+ DISPATCH(BlendEquationiARB, (buf, mode), (F, "glBlendEquationiARB(%d, 0x%x);\n", buf, mode));
+}
+
+KEYWORD1 void KEYWORD2 NAME(BlendFuncSeparateiARB)(GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcA, GLenum dstA)
+{
+ DISPATCH(BlendFuncSeparateiARB, (buf, srcRGB, dstRGB, srcA, dstA), (F, "glBlendFuncSeparateiARB(%d, 0x%x, 0x%x, 0x%x, 0x%x);\n", buf, srcRGB, dstRGB, srcA, dstA));
+}
+
+KEYWORD1 void KEYWORD2 NAME(BlendFunciARB)(GLuint buf, GLenum src, GLenum dst)
+{
+ DISPATCH(BlendFunciARB, (buf, src, dst), (F, "glBlendFunciARB(%d, 0x%x, 0x%x);\n", buf, src, dst));
+}
+
KEYWORD1 void KEYWORD2 NAME(BindTransformFeedback)(GLenum target, GLuint id)
{
DISPATCH(BindTransformFeedback, (target, id), (F, "glBindTransformFeedback(0x%x, %d);\n", target, id));
@@ -4062,63 +4087,88 @@ KEYWORD1 void KEYWORD2 NAME(ResumeTransformFeedback)(void)
DISPATCH(ResumeTransformFeedback, (), (F, "glResumeTransformFeedback();\n"));
}
+KEYWORD1 void KEYWORD2 NAME(ClearDepthf)(GLclampf depth)
+{
+ DISPATCH(ClearDepthf, (depth), (F, "glClearDepthf(%f);\n", depth));
+}
+
+KEYWORD1 void KEYWORD2 NAME(DepthRangef)(GLclampf zNear, GLclampf zFar)
+{
+ DISPATCH(DepthRangef, (zNear, zFar), (F, "glDepthRangef(%f, %f);\n", zNear, zFar));
+}
+
+KEYWORD1 void KEYWORD2 NAME(GetShaderPrecisionFormat)(GLenum shadertype, GLenum precisiontype, GLint * range, GLint * precision)
+{
+ DISPATCH(GetShaderPrecisionFormat, (shadertype, precisiontype, range, precision), (F, "glGetShaderPrecisionFormat(0x%x, 0x%x, %p, %p);\n", shadertype, precisiontype, (const void *) range, (const void *) precision));
+}
+
+KEYWORD1 void KEYWORD2 NAME(ReleaseShaderCompiler)(void)
+{
+ DISPATCH(ReleaseShaderCompiler, (), (F, "glReleaseShaderCompiler();\n"));
+}
+
+KEYWORD1 void KEYWORD2 NAME(ShaderBinary)(GLsizei n, const GLuint * shaders, GLenum binaryformat, const GLvoid * binary, GLsizei length)
+{
+ DISPATCH(ShaderBinary, (n, shaders, binaryformat, binary, length), (F, "glShaderBinary(%d, %p, 0x%x, %p, %d);\n", n, (const void *) shaders, binaryformat, (const void *) binary, length));
+}
+
KEYWORD1 void KEYWORD2 NAME(PolygonOffsetEXT)(GLfloat factor, GLfloat bias)
{
DISPATCH(PolygonOffsetEXT, (factor, bias), (F, "glPolygonOffsetEXT(%f, %f);\n", factor, bias));
}
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_601)(GLenum pname, GLfloat * params);
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_611)(GLenum pname, GLfloat * params);
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_601)(GLenum pname, GLfloat * params)
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_611)(GLenum pname, GLfloat * params)
{
DISPATCH(GetPixelTexGenParameterfvSGIS, (pname, params), (F, "glGetPixelTexGenParameterfvSGIS(0x%x, %p);\n", pname, (const void *) params));
}
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_602)(GLenum pname, GLint * params);
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_612)(GLenum pname, GLint * params);
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_602)(GLenum pname, GLint * params)
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_612)(GLenum pname, GLint * params)
{
DISPATCH(GetPixelTexGenParameterivSGIS, (pname, params), (F, "glGetPixelTexGenParameterivSGIS(0x%x, %p);\n", pname, (const void *) params));
}
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_603)(GLenum pname, GLfloat param);
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_613)(GLenum pname, GLfloat param);
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_603)(GLenum pname, GLfloat param)
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_613)(GLenum pname, GLfloat param)
{
DISPATCH(PixelTexGenParameterfSGIS, (pname, param), (F, "glPixelTexGenParameterfSGIS(0x%x, %f);\n", pname, param));
}
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_604)(GLenum pname, const GLfloat * params);
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_614)(GLenum pname, const GLfloat * params);
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_604)(GLenum pname, const GLfloat * params)
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_614)(GLenum pname, const GLfloat * params)
{
DISPATCH(PixelTexGenParameterfvSGIS, (pname, params), (F, "glPixelTexGenParameterfvSGIS(0x%x, %p);\n", pname, (const void *) params));
}
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_605)(GLenum pname, GLint param);
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_615)(GLenum pname, GLint param);
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_605)(GLenum pname, GLint param)
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_615)(GLenum pname, GLint param)
{
DISPATCH(PixelTexGenParameteriSGIS, (pname, param), (F, "glPixelTexGenParameteriSGIS(0x%x, %d);\n", pname, param));
}
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_606)(GLenum pname, const GLint * params);
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_616)(GLenum pname, const GLint * params);
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_606)(GLenum pname, const GLint * params)
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_616)(GLenum pname, const GLint * params)
{
DISPATCH(PixelTexGenParameterivSGIS, (pname, params), (F, "glPixelTexGenParameterivSGIS(0x%x, %p);\n", pname, (const void *) params));
}
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_607)(GLclampf value, GLboolean invert);
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_617)(GLclampf value, GLboolean invert);
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_607)(GLclampf value, GLboolean invert)
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_617)(GLclampf value, GLboolean invert)
{
DISPATCH(SampleMaskSGIS, (value, invert), (F, "glSampleMaskSGIS(%f, %d);\n", value, invert));
}
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_608)(GLenum pattern);
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_618)(GLenum pattern);
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_608)(GLenum pattern)
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_618)(GLenum pattern)
{
DISPATCH(SamplePatternSGIS, (pattern), (F, "glSamplePatternSGIS(0x%x);\n", pattern));
}
@@ -4168,9 +4218,9 @@ KEYWORD1 void KEYWORD2 NAME(PointParameterfEXT)(GLenum pname, GLfloat param)
DISPATCH(PointParameterfEXT, (pname, param), (F, "glPointParameterfEXT(0x%x, %f);\n", pname, param));
}
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_615)(GLenum pname, GLfloat param);
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_625)(GLenum pname, GLfloat param);
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_615)(GLenum pname, GLfloat param)
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_625)(GLenum pname, GLfloat param)
{
DISPATCH(PointParameterfEXT, (pname, param), (F, "glPointParameterfSGIS(0x%x, %f);\n", pname, param));
}
@@ -4190,9 +4240,9 @@ KEYWORD1 void KEYWORD2 NAME(PointParameterfvEXT)(GLenum pname, const GLfloat * p
DISPATCH(PointParameterfvEXT, (pname, params), (F, "glPointParameterfvEXT(0x%x, %p);\n", pname, (const void *) params));
}
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_616)(GLenum pname, const GLfloat * params);
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_626)(GLenum pname, const GLfloat * params);
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_616)(GLenum pname, const GLfloat * params)
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_626)(GLenum pname, const GLfloat * params)
{
DISPATCH(PointParameterfvEXT, (pname, params), (F, "glPointParameterfvSGIS(0x%x, %p);\n", pname, (const void *) params));
}
@@ -4447,9 +4497,9 @@ KEYWORD1 void KEYWORD2 NAME(FogCoordfvEXT)(const GLfloat * coord)
DISPATCH(FogCoordfvEXT, (coord), (F, "glFogCoordfvEXT(%p);\n", (const void *) coord));
}
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_643)(GLenum mode);
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_653)(GLenum mode);
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_643)(GLenum mode)
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_653)(GLenum mode)
{
DISPATCH(PixelTexGenSGIX, (mode), (F, "glPixelTexGenSGIX(0x%x);\n", mode));
}
@@ -4464,9 +4514,9 @@ KEYWORD1 void KEYWORD2 NAME(BlendFuncSeparateEXT)(GLenum sfactorRGB, GLenum dfac
DISPATCH(BlendFuncSeparateEXT, (sfactorRGB, dfactorRGB, sfactorAlpha, dfactorAlpha), (F, "glBlendFuncSeparateEXT(0x%x, 0x%x, 0x%x, 0x%x);\n", sfactorRGB, dfactorRGB, sfactorAlpha, dfactorAlpha));
}
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_644)(GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_654)(GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_644)(GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha)
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_654)(GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha)
{
DISPATCH(BlendFuncSeparateEXT, (sfactorRGB, dfactorRGB, sfactorAlpha, dfactorAlpha), (F, "glBlendFuncSeparateINGR(0x%x, 0x%x, 0x%x, 0x%x);\n", sfactorRGB, dfactorRGB, sfactorAlpha, dfactorAlpha));
}
@@ -4831,65 +4881,65 @@ KEYWORD1 void KEYWORD2 NAME(WindowPos4svMESA)(const GLshort * v)
DISPATCH(WindowPos4svMESA, (v), (F, "glWindowPos4svMESA(%p);\n", (const void *) v));
}
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_685)(const GLenum * mode, const GLint * first, const GLsizei * count, GLsizei primcount, GLint modestride);
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_695)(const GLenum * mode, const GLint * first, const GLsizei * count, GLsizei primcount, GLint modestride);
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_685)(const GLenum * mode, const GLint * first, const GLsizei * count, GLsizei primcount, GLint modestride)
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_695)(const GLenum * mode, const GLint * first, const GLsizei * count, GLsizei primcount, GLint modestride)
{
DISPATCH(MultiModeDrawArraysIBM, (mode, first, count, primcount, modestride), (F, "glMultiModeDrawArraysIBM(%p, %p, %p, %d, %d);\n", (const void *) mode, (const void *) first, (const void *) count, primcount, modestride));
}
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_686)(const GLenum * mode, const GLsizei * count, GLenum type, const GLvoid * const * indices, GLsizei primcount, GLint modestride);
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_696)(const GLenum * mode, const GLsizei * count, GLenum type, const GLvoid * const * indices, GLsizei primcount, GLint modestride);
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_686)(const GLenum * mode, const GLsizei * count, GLenum type, const GLvoid * const * indices, GLsizei primcount, GLint modestride)
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_696)(const GLenum * mode, const GLsizei * count, GLenum type, const GLvoid * const * indices, GLsizei primcount, GLint modestride)
{
DISPATCH(MultiModeDrawElementsIBM, (mode, count, type, indices, primcount, modestride), (F, "glMultiModeDrawElementsIBM(%p, %p, 0x%x, %p, %d, %d);\n", (const void *) mode, (const void *) count, type, (const void *) indices, primcount, modestride));
}
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_687)(GLsizei n, const GLuint * fences);
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_697)(GLsizei n, const GLuint * fences);
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_687)(GLsizei n, const GLuint * fences)
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_697)(GLsizei n, const GLuint * fences)
{
DISPATCH(DeleteFencesNV, (n, fences), (F, "glDeleteFencesNV(%d, %p);\n", n, (const void *) fences));
}
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_688)(GLuint fence);
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_698)(GLuint fence);
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_688)(GLuint fence)
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_698)(GLuint fence)
{
DISPATCH(FinishFenceNV, (fence), (F, "glFinishFenceNV(%d);\n", fence));
}
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_689)(GLsizei n, GLuint * fences);
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_699)(GLsizei n, GLuint * fences);
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_689)(GLsizei n, GLuint * fences)
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_699)(GLsizei n, GLuint * fences)
{
DISPATCH(GenFencesNV, (n, fences), (F, "glGenFencesNV(%d, %p);\n", n, (const void *) fences));
}
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_690)(GLuint fence, GLenum pname, GLint * params);
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_700)(GLuint fence, GLenum pname, GLint * params);
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_690)(GLuint fence, GLenum pname, GLint * params)
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_700)(GLuint fence, GLenum pname, GLint * params)
{
DISPATCH(GetFenceivNV, (fence, pname, params), (F, "glGetFenceivNV(%d, 0x%x, %p);\n", fence, pname, (const void *) params));
}
-KEYWORD1_ALT GLboolean KEYWORD2 NAME(_dispatch_stub_691)(GLuint fence);
+KEYWORD1_ALT GLboolean KEYWORD2 NAME(_dispatch_stub_701)(GLuint fence);
-KEYWORD1_ALT GLboolean KEYWORD2 NAME(_dispatch_stub_691)(GLuint fence)
+KEYWORD1_ALT GLboolean KEYWORD2 NAME(_dispatch_stub_701)(GLuint fence)
{
RETURN_DISPATCH(IsFenceNV, (fence), (F, "glIsFenceNV(%d);\n", fence));
}
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_692)(GLuint fence, GLenum condition);
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_702)(GLuint fence, GLenum condition);
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_692)(GLuint fence, GLenum condition)
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_702)(GLuint fence, GLenum condition)
{
DISPATCH(SetFenceNV, (fence, condition), (F, "glSetFenceNV(%d, 0x%x);\n", fence, condition));
}
-KEYWORD1_ALT GLboolean KEYWORD2 NAME(_dispatch_stub_693)(GLuint fence);
+KEYWORD1_ALT GLboolean KEYWORD2 NAME(_dispatch_stub_703)(GLuint fence);
-KEYWORD1_ALT GLboolean KEYWORD2 NAME(_dispatch_stub_693)(GLuint fence)
+KEYWORD1_ALT GLboolean KEYWORD2 NAME(_dispatch_stub_703)(GLuint fence)
{
RETURN_DISPATCH(TestFenceNV, (fence), (F, "glTestFenceNV(%d);\n", fence));
}
@@ -5334,16 +5384,16 @@ KEYWORD1 void KEYWORD2 NAME(PointParameterivNV)(GLenum pname, const GLint * para
DISPATCH(PointParameterivNV, (pname, params), (F, "glPointParameterivNV(0x%x, %p);\n", pname, (const void *) params));
}
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_774)(GLenum face);
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_784)(GLenum face);
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_774)(GLenum face)
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_784)(GLenum face)
{
DISPATCH(ActiveStencilFaceEXT, (face), (F, "glActiveStencilFaceEXT(0x%x);\n", face));
}
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_775)(GLuint array);
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_785)(GLuint array);
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_775)(GLuint array)
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_785)(GLuint array)
{
DISPATCH(BindVertexArrayAPPLE, (array), (F, "glBindVertexArrayAPPLE(%d);\n", array));
}
@@ -5353,16 +5403,16 @@ KEYWORD1 void KEYWORD2 NAME(DeleteVertexArrays)(GLsizei n, const GLuint * arrays
DISPATCH(DeleteVertexArraysAPPLE, (n, arrays), (F, "glDeleteVertexArrays(%d, %p);\n", n, (const void *) arrays));
}
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_776)(GLsizei n, const GLuint * arrays);
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_786)(GLsizei n, const GLuint * arrays);
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_776)(GLsizei n, const GLuint * arrays)
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_786)(GLsizei n, const GLuint * arrays)
{
DISPATCH(DeleteVertexArraysAPPLE, (n, arrays), (F, "glDeleteVertexArraysAPPLE(%d, %p);\n", n, (const void *) arrays));
}
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_777)(GLsizei n, GLuint * arrays);
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_787)(GLsizei n, GLuint * arrays);
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_777)(GLsizei n, GLuint * arrays)
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_787)(GLsizei n, GLuint * arrays)
{
DISPATCH(GenVertexArraysAPPLE, (n, arrays), (F, "glGenVertexArraysAPPLE(%d, %p);\n", n, (const void *) arrays));
}
@@ -5372,9 +5422,9 @@ KEYWORD1 GLboolean KEYWORD2 NAME(IsVertexArray)(GLuint array)
RETURN_DISPATCH(IsVertexArrayAPPLE, (array), (F, "glIsVertexArray(%d);\n", array));
}
-KEYWORD1_ALT GLboolean KEYWORD2 NAME(_dispatch_stub_778)(GLuint array);
+KEYWORD1_ALT GLboolean KEYWORD2 NAME(_dispatch_stub_788)(GLuint array);
-KEYWORD1_ALT GLboolean KEYWORD2 NAME(_dispatch_stub_778)(GLuint array)
+KEYWORD1_ALT GLboolean KEYWORD2 NAME(_dispatch_stub_788)(GLuint array)
{
RETURN_DISPATCH(IsVertexArrayAPPLE, (array), (F, "glIsVertexArrayAPPLE(%d);\n", array));
}
@@ -5424,9 +5474,9 @@ KEYWORD1 void KEYWORD2 NAME(PrimitiveRestartNV)(void)
DISPATCH(PrimitiveRestartNV, (), (F, "glPrimitiveRestartNV();\n"));
}
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_787)(GLclampd zmin, GLclampd zmax);
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_797)(GLclampd zmin, GLclampd zmax);
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_787)(GLclampd zmin, GLclampd zmax)
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_797)(GLclampd zmin, GLclampd zmax)
{
DISPATCH(DepthBoundsEXT, (zmin, zmax), (F, "glDepthBoundsEXT(%f, %f);\n", zmin, zmax));
}
@@ -5436,9 +5486,9 @@ KEYWORD1 void KEYWORD2 NAME(BlendEquationSeparate)(GLenum modeRGB, GLenum modeA)
DISPATCH(BlendEquationSeparateEXT, (modeRGB, modeA), (F, "glBlendEquationSeparate(0x%x, 0x%x);\n", modeRGB, modeA));
}
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_788)(GLenum modeRGB, GLenum modeA);
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_798)(GLenum modeRGB, GLenum modeA);
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_788)(GLenum modeRGB, GLenum modeA)
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_798)(GLenum modeRGB, GLenum modeA)
{
DISPATCH(BlendEquationSeparateEXT, (modeRGB, modeA), (F, "glBlendEquationSeparateEXT(0x%x, 0x%x);\n", modeRGB, modeA));
}
@@ -5618,23 +5668,23 @@ KEYWORD1 void KEYWORD2 NAME(BlitFramebuffer)(GLint srcX0, GLint srcY0, GLint src
DISPATCH(BlitFramebufferEXT, (srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter), (F, "glBlitFramebuffer(%d, %d, %d, %d, %d, %d, %d, %d, %d, 0x%x);\n", srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter));
}
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_806)(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_816)(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_806)(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter)
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_816)(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter)
{
DISPATCH(BlitFramebufferEXT, (srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter), (F, "glBlitFramebufferEXT(%d, %d, %d, %d, %d, %d, %d, %d, %d, 0x%x);\n", srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter));
}
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_807)(GLenum target, GLenum pname, GLint param);
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_817)(GLenum target, GLenum pname, GLint param);
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_807)(GLenum target, GLenum pname, GLint param)
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_817)(GLenum target, GLenum pname, GLint param)
{
DISPATCH(BufferParameteriAPPLE, (target, pname, param), (F, "glBufferParameteriAPPLE(0x%x, 0x%x, %d);\n", target, pname, param));
}
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_808)(GLenum target, GLintptr offset, GLsizeiptr size);
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_818)(GLenum target, GLintptr offset, GLsizeiptr size);
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_808)(GLenum target, GLintptr offset, GLsizeiptr size)
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_818)(GLenum target, GLintptr offset, GLsizeiptr size)
{
DISPATCH(FlushMappedBufferRangeAPPLE, (target, offset, size), (F, "glFlushMappedBufferRangeAPPLE(0x%x, %d, %d);\n", target, offset, size));
}
@@ -6194,16 +6244,16 @@ KEYWORD1 void KEYWORD2 NAME(ProvokingVertex)(GLenum mode)
DISPATCH(ProvokingVertexEXT, (mode), (F, "glProvokingVertex(0x%x);\n", mode));
}
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_866)(GLenum target, GLenum pname, GLvoid ** params);
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_876)(GLenum target, GLenum pname, GLvoid ** params);
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_866)(GLenum target, GLenum pname, GLvoid ** params)
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_876)(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_867)(GLenum target, GLsizei length, GLvoid * pointer);
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_877)(GLenum target, GLsizei length, GLvoid * pointer);
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_867)(GLenum target, GLsizei length, GLvoid * pointer)
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_877)(GLenum target, GLsizei length, GLvoid * pointer)
{
DISPATCH(TextureRangeAPPLE, (target, length, pointer), (F, "glTextureRangeAPPLE(0x%x, %d, %p);\n", target, length, (const void *) pointer));
}
@@ -6238,37 +6288,42 @@ KEYWORD1 void KEYWORD2 NAME(UseShaderProgramEXT)(GLenum type, GLuint program)
DISPATCH(UseShaderProgramEXT, (type, program), (F, "glUseShaderProgramEXT(0x%x, %d);\n", type, program));
}
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_874)(GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask);
+KEYWORD1 void KEYWORD2 NAME(TextureBarrierNV)(void)
+{
+ DISPATCH(TextureBarrierNV, (), (F, "glTextureBarrierNV();\n"));
+}
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_874)(GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask)
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_885)(GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask);
+
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_885)(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_875)(GLenum target, GLuint index, GLsizei count, const GLfloat * params);
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_886)(GLenum target, GLuint index, GLsizei count, const GLfloat * params);
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_875)(GLenum target, GLuint index, GLsizei count, const GLfloat * params)
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_886)(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_876)(GLenum target, GLuint index, GLsizei count, const GLfloat * params);
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_887)(GLenum target, GLuint index, GLsizei count, const GLfloat * params);
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_876)(GLenum target, GLuint index, GLsizei count, const GLfloat * params)
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_887)(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_877)(GLuint id, GLenum pname, GLint64EXT * params);
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_888)(GLuint id, GLenum pname, GLint64EXT * params);
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_877)(GLuint id, GLenum pname, GLint64EXT * params)
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_888)(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_878)(GLuint id, GLenum pname, GLuint64EXT * params);
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_889)(GLuint id, GLenum pname, GLuint64EXT * params);
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_878)(GLuint id, GLenum pname, GLuint64EXT * params)
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_889)(GLuint id, GLenum pname, GLuint64EXT * params)
{
DISPATCH(GetQueryObjectui64vEXT, (id, pname, params), (F, "glGetQueryObjectui64vEXT(%d, 0x%x, %p);\n", id, pname, (const void *) params));
}
@@ -7014,6 +7069,7 @@ _glapi_proc DISPATCH_TABLE_NAME[] = {
TABLE_ENTRY(FramebufferTextureARB),
TABLE_ENTRY(FramebufferTextureFaceARB),
TABLE_ENTRY(ProgramParameteriARB),
+ TABLE_ENTRY(VertexAttribDivisorARB),
TABLE_ENTRY(FlushMappedBufferRange),
TABLE_ENTRY(MapBufferRange),
TABLE_ENTRY(BindVertexArray),
@@ -7029,6 +7085,10 @@ _glapi_proc DISPATCH_TABLE_NAME[] = {
TABLE_ENTRY(DrawElementsBaseVertex),
TABLE_ENTRY(DrawRangeElementsBaseVertex),
TABLE_ENTRY(MultiDrawElementsBaseVertex),
+ TABLE_ENTRY(BlendEquationSeparateiARB),
+ TABLE_ENTRY(BlendEquationiARB),
+ TABLE_ENTRY(BlendFuncSeparateiARB),
+ TABLE_ENTRY(BlendFunciARB),
TABLE_ENTRY(BindTransformFeedback),
TABLE_ENTRY(DeleteTransformFeedbacks),
TABLE_ENTRY(DrawTransformFeedback),
@@ -7036,15 +7096,20 @@ _glapi_proc DISPATCH_TABLE_NAME[] = {
TABLE_ENTRY(IsTransformFeedback),
TABLE_ENTRY(PauseTransformFeedback),
TABLE_ENTRY(ResumeTransformFeedback),
+ TABLE_ENTRY(ClearDepthf),
+ TABLE_ENTRY(DepthRangef),
+ TABLE_ENTRY(GetShaderPrecisionFormat),
+ TABLE_ENTRY(ReleaseShaderCompiler),
+ TABLE_ENTRY(ShaderBinary),
TABLE_ENTRY(PolygonOffsetEXT),
- TABLE_ENTRY(_dispatch_stub_601),
- TABLE_ENTRY(_dispatch_stub_602),
- TABLE_ENTRY(_dispatch_stub_603),
- TABLE_ENTRY(_dispatch_stub_604),
- TABLE_ENTRY(_dispatch_stub_605),
- TABLE_ENTRY(_dispatch_stub_606),
- TABLE_ENTRY(_dispatch_stub_607),
- TABLE_ENTRY(_dispatch_stub_608),
+ TABLE_ENTRY(_dispatch_stub_611),
+ TABLE_ENTRY(_dispatch_stub_612),
+ TABLE_ENTRY(_dispatch_stub_613),
+ TABLE_ENTRY(_dispatch_stub_614),
+ TABLE_ENTRY(_dispatch_stub_615),
+ TABLE_ENTRY(_dispatch_stub_616),
+ TABLE_ENTRY(_dispatch_stub_617),
+ TABLE_ENTRY(_dispatch_stub_618),
TABLE_ENTRY(ColorPointerEXT),
TABLE_ENTRY(EdgeFlagPointerEXT),
TABLE_ENTRY(IndexPointerEXT),
@@ -7079,7 +7144,7 @@ _glapi_proc DISPATCH_TABLE_NAME[] = {
TABLE_ENTRY(FogCoorddvEXT),
TABLE_ENTRY(FogCoordfEXT),
TABLE_ENTRY(FogCoordfvEXT),
- TABLE_ENTRY(_dispatch_stub_643),
+ TABLE_ENTRY(_dispatch_stub_653),
TABLE_ENTRY(BlendFuncSeparateEXT),
TABLE_ENTRY(FlushVertexArrayRangeNV),
TABLE_ENTRY(VertexArrayRangeNV),
@@ -7121,15 +7186,15 @@ _glapi_proc DISPATCH_TABLE_NAME[] = {
TABLE_ENTRY(WindowPos4ivMESA),
TABLE_ENTRY(WindowPos4sMESA),
TABLE_ENTRY(WindowPos4svMESA),
- TABLE_ENTRY(_dispatch_stub_685),
- TABLE_ENTRY(_dispatch_stub_686),
- TABLE_ENTRY(_dispatch_stub_687),
- TABLE_ENTRY(_dispatch_stub_688),
- TABLE_ENTRY(_dispatch_stub_689),
- TABLE_ENTRY(_dispatch_stub_690),
- TABLE_ENTRY(_dispatch_stub_691),
- TABLE_ENTRY(_dispatch_stub_692),
- TABLE_ENTRY(_dispatch_stub_693),
+ TABLE_ENTRY(_dispatch_stub_695),
+ TABLE_ENTRY(_dispatch_stub_696),
+ TABLE_ENTRY(_dispatch_stub_697),
+ TABLE_ENTRY(_dispatch_stub_698),
+ TABLE_ENTRY(_dispatch_stub_699),
+ TABLE_ENTRY(_dispatch_stub_700),
+ TABLE_ENTRY(_dispatch_stub_701),
+ TABLE_ENTRY(_dispatch_stub_702),
+ TABLE_ENTRY(_dispatch_stub_703),
TABLE_ENTRY(AreProgramsResidentNV),
TABLE_ENTRY(BindProgramNV),
TABLE_ENTRY(DeleteProgramsNV),
@@ -7210,11 +7275,11 @@ _glapi_proc DISPATCH_TABLE_NAME[] = {
TABLE_ENTRY(SetFragmentShaderConstantATI),
TABLE_ENTRY(PointParameteriNV),
TABLE_ENTRY(PointParameterivNV),
- TABLE_ENTRY(_dispatch_stub_774),
- TABLE_ENTRY(_dispatch_stub_775),
- TABLE_ENTRY(_dispatch_stub_776),
- TABLE_ENTRY(_dispatch_stub_777),
- TABLE_ENTRY(_dispatch_stub_778),
+ TABLE_ENTRY(_dispatch_stub_784),
+ TABLE_ENTRY(_dispatch_stub_785),
+ TABLE_ENTRY(_dispatch_stub_786),
+ TABLE_ENTRY(_dispatch_stub_787),
+ TABLE_ENTRY(_dispatch_stub_788),
TABLE_ENTRY(GetProgramNamedParameterdvNV),
TABLE_ENTRY(GetProgramNamedParameterfvNV),
TABLE_ENTRY(ProgramNamedParameter4dNV),
@@ -7223,8 +7288,8 @@ _glapi_proc DISPATCH_TABLE_NAME[] = {
TABLE_ENTRY(ProgramNamedParameter4fvNV),
TABLE_ENTRY(PrimitiveRestartIndexNV),
TABLE_ENTRY(PrimitiveRestartNV),
- TABLE_ENTRY(_dispatch_stub_787),
- TABLE_ENTRY(_dispatch_stub_788),
+ TABLE_ENTRY(_dispatch_stub_797),
+ TABLE_ENTRY(_dispatch_stub_798),
TABLE_ENTRY(BindFramebufferEXT),
TABLE_ENTRY(BindRenderbufferEXT),
TABLE_ENTRY(CheckFramebufferStatusEXT),
@@ -7242,9 +7307,9 @@ _glapi_proc DISPATCH_TABLE_NAME[] = {
TABLE_ENTRY(IsFramebufferEXT),
TABLE_ENTRY(IsRenderbufferEXT),
TABLE_ENTRY(RenderbufferStorageEXT),
- TABLE_ENTRY(_dispatch_stub_806),
- TABLE_ENTRY(_dispatch_stub_807),
- TABLE_ENTRY(_dispatch_stub_808),
+ TABLE_ENTRY(_dispatch_stub_816),
+ TABLE_ENTRY(_dispatch_stub_817),
+ TABLE_ENTRY(_dispatch_stub_818),
TABLE_ENTRY(BindFragDataLocationEXT),
TABLE_ENTRY(GetFragDataLocationEXT),
TABLE_ENTRY(GetUniformuivEXT),
@@ -7302,19 +7367,20 @@ _glapi_proc DISPATCH_TABLE_NAME[] = {
TABLE_ENTRY(GetTransformFeedbackVaryingEXT),
TABLE_ENTRY(TransformFeedbackVaryingsEXT),
TABLE_ENTRY(ProvokingVertexEXT),
- TABLE_ENTRY(_dispatch_stub_866),
- TABLE_ENTRY(_dispatch_stub_867),
+ TABLE_ENTRY(_dispatch_stub_876),
+ TABLE_ENTRY(_dispatch_stub_877),
TABLE_ENTRY(GetObjectParameterivAPPLE),
TABLE_ENTRY(ObjectPurgeableAPPLE),
TABLE_ENTRY(ObjectUnpurgeableAPPLE),
TABLE_ENTRY(ActiveProgramEXT),
TABLE_ENTRY(CreateShaderProgramEXT),
TABLE_ENTRY(UseShaderProgramEXT),
- TABLE_ENTRY(_dispatch_stub_874),
- TABLE_ENTRY(_dispatch_stub_875),
- TABLE_ENTRY(_dispatch_stub_876),
- TABLE_ENTRY(_dispatch_stub_877),
- TABLE_ENTRY(_dispatch_stub_878),
+ TABLE_ENTRY(TextureBarrierNV),
+ TABLE_ENTRY(_dispatch_stub_885),
+ TABLE_ENTRY(_dispatch_stub_886),
+ TABLE_ENTRY(_dispatch_stub_887),
+ TABLE_ENTRY(_dispatch_stub_888),
+ TABLE_ENTRY(_dispatch_stub_889),
TABLE_ENTRY(EGLImageTargetRenderbufferStorageOES),
TABLE_ENTRY(EGLImageTargetTexture2DOES),
/* A whole bunch of no-op functions. These might be called
@@ -7621,10 +7687,10 @@ _glapi_proc UNUSED_TABLE_NAME[] = {
TABLE_ENTRY(RenderbufferStorageMultisampleEXT),
TABLE_ENTRY(PointParameterf),
TABLE_ENTRY(PointParameterfARB),
- TABLE_ENTRY(_dispatch_stub_615),
+ TABLE_ENTRY(_dispatch_stub_625),
TABLE_ENTRY(PointParameterfv),
TABLE_ENTRY(PointParameterfvARB),
- TABLE_ENTRY(_dispatch_stub_616),
+ TABLE_ENTRY(_dispatch_stub_626),
TABLE_ENTRY(SecondaryColor3b),
TABLE_ENTRY(SecondaryColor3bv),
TABLE_ENTRY(SecondaryColor3d),
@@ -7650,7 +7716,7 @@ _glapi_proc UNUSED_TABLE_NAME[] = {
TABLE_ENTRY(FogCoordf),
TABLE_ENTRY(FogCoordfv),
TABLE_ENTRY(BlendFuncSeparate),
- TABLE_ENTRY(_dispatch_stub_644),
+ TABLE_ENTRY(_dispatch_stub_654),
TABLE_ENTRY(WindowPos2d),
TABLE_ENTRY(WindowPos2dARB),
TABLE_ENTRY(WindowPos2dv),
diff --git a/src/mapi/glapi/glprocs.h b/src/mapi/glapi/glprocs.h
index c0a98e622a2..b66ae381218 100644
--- a/src/mapi/glapi/glprocs.h
+++ b/src/mapi/glapi/glprocs.h
@@ -630,6 +630,7 @@ static const char gl_string_table[] =
"glFramebufferTextureARB\0"
"glFramebufferTextureFaceARB\0"
"glProgramParameteriARB\0"
+ "glVertexAttribDivisorARB\0"
"glFlushMappedBufferRange\0"
"glMapBufferRange\0"
"glBindVertexArray\0"
@@ -645,6 +646,10 @@ static const char gl_string_table[] =
"glDrawElementsBaseVertex\0"
"glDrawRangeElementsBaseVertex\0"
"glMultiDrawElementsBaseVertex\0"
+ "glBlendEquationSeparateiARB\0"
+ "glBlendEquationiARB\0"
+ "glBlendFuncSeparateiARB\0"
+ "glBlendFunciARB\0"
"glBindTransformFeedback\0"
"glDeleteTransformFeedbacks\0"
"glDrawTransformFeedback\0"
@@ -652,6 +657,11 @@ static const char gl_string_table[] =
"glIsTransformFeedback\0"
"glPauseTransformFeedback\0"
"glResumeTransformFeedback\0"
+ "glClearDepthf\0"
+ "glDepthRangef\0"
+ "glGetShaderPrecisionFormat\0"
+ "glReleaseShaderCompiler\0"
+ "glShaderBinary\0"
"glPolygonOffsetEXT\0"
"glGetPixelTexGenParameterfvSGIS\0"
"glGetPixelTexGenParameterivSGIS\0"
@@ -926,6 +936,7 @@ static const char gl_string_table[] =
"glActiveProgramEXT\0"
"glCreateShaderProgramEXT\0"
"glUseShaderProgramEXT\0"
+ "glTextureBarrierNV\0"
"glStencilFuncSeparateATI\0"
"glProgramEnvParameters4fvEXT\0"
"glProgramLocalParameters4fvEXT\0"
@@ -1309,41 +1320,41 @@ static const char gl_string_table[] =
#define gl_dispatch_stub_364 mgl_dispatch_stub_364
#define gl_dispatch_stub_365 mgl_dispatch_stub_365
#define gl_dispatch_stub_366 mgl_dispatch_stub_366
-#define gl_dispatch_stub_601 mgl_dispatch_stub_601
-#define gl_dispatch_stub_602 mgl_dispatch_stub_602
-#define gl_dispatch_stub_603 mgl_dispatch_stub_603
-#define gl_dispatch_stub_604 mgl_dispatch_stub_604
-#define gl_dispatch_stub_605 mgl_dispatch_stub_605
-#define gl_dispatch_stub_606 mgl_dispatch_stub_606
-#define gl_dispatch_stub_607 mgl_dispatch_stub_607
-#define gl_dispatch_stub_608 mgl_dispatch_stub_608
-#define gl_dispatch_stub_643 mgl_dispatch_stub_643
-#define gl_dispatch_stub_685 mgl_dispatch_stub_685
-#define gl_dispatch_stub_686 mgl_dispatch_stub_686
-#define gl_dispatch_stub_687 mgl_dispatch_stub_687
-#define gl_dispatch_stub_688 mgl_dispatch_stub_688
-#define gl_dispatch_stub_689 mgl_dispatch_stub_689
-#define gl_dispatch_stub_690 mgl_dispatch_stub_690
-#define gl_dispatch_stub_691 mgl_dispatch_stub_691
-#define gl_dispatch_stub_692 mgl_dispatch_stub_692
-#define gl_dispatch_stub_693 mgl_dispatch_stub_693
-#define gl_dispatch_stub_774 mgl_dispatch_stub_774
-#define gl_dispatch_stub_775 mgl_dispatch_stub_775
-#define gl_dispatch_stub_776 mgl_dispatch_stub_776
-#define gl_dispatch_stub_777 mgl_dispatch_stub_777
-#define gl_dispatch_stub_778 mgl_dispatch_stub_778
+#define gl_dispatch_stub_611 mgl_dispatch_stub_611
+#define gl_dispatch_stub_612 mgl_dispatch_stub_612
+#define gl_dispatch_stub_613 mgl_dispatch_stub_613
+#define gl_dispatch_stub_614 mgl_dispatch_stub_614
+#define gl_dispatch_stub_615 mgl_dispatch_stub_615
+#define gl_dispatch_stub_616 mgl_dispatch_stub_616
+#define gl_dispatch_stub_617 mgl_dispatch_stub_617
+#define gl_dispatch_stub_618 mgl_dispatch_stub_618
+#define gl_dispatch_stub_653 mgl_dispatch_stub_653
+#define gl_dispatch_stub_695 mgl_dispatch_stub_695
+#define gl_dispatch_stub_696 mgl_dispatch_stub_696
+#define gl_dispatch_stub_697 mgl_dispatch_stub_697
+#define gl_dispatch_stub_698 mgl_dispatch_stub_698
+#define gl_dispatch_stub_699 mgl_dispatch_stub_699
+#define gl_dispatch_stub_700 mgl_dispatch_stub_700
+#define gl_dispatch_stub_701 mgl_dispatch_stub_701
+#define gl_dispatch_stub_702 mgl_dispatch_stub_702
+#define gl_dispatch_stub_703 mgl_dispatch_stub_703
+#define gl_dispatch_stub_784 mgl_dispatch_stub_784
+#define gl_dispatch_stub_785 mgl_dispatch_stub_785
+#define gl_dispatch_stub_786 mgl_dispatch_stub_786
#define gl_dispatch_stub_787 mgl_dispatch_stub_787
#define gl_dispatch_stub_788 mgl_dispatch_stub_788
-#define gl_dispatch_stub_806 mgl_dispatch_stub_806
-#define gl_dispatch_stub_807 mgl_dispatch_stub_807
-#define gl_dispatch_stub_808 mgl_dispatch_stub_808
-#define gl_dispatch_stub_866 mgl_dispatch_stub_866
-#define gl_dispatch_stub_867 mgl_dispatch_stub_867
-#define gl_dispatch_stub_874 mgl_dispatch_stub_874
-#define gl_dispatch_stub_875 mgl_dispatch_stub_875
+#define gl_dispatch_stub_797 mgl_dispatch_stub_797
+#define gl_dispatch_stub_798 mgl_dispatch_stub_798
+#define gl_dispatch_stub_816 mgl_dispatch_stub_816
+#define gl_dispatch_stub_817 mgl_dispatch_stub_817
+#define gl_dispatch_stub_818 mgl_dispatch_stub_818
#define gl_dispatch_stub_876 mgl_dispatch_stub_876
#define gl_dispatch_stub_877 mgl_dispatch_stub_877
-#define gl_dispatch_stub_878 mgl_dispatch_stub_878
+#define gl_dispatch_stub_885 mgl_dispatch_stub_885
+#define gl_dispatch_stub_886 mgl_dispatch_stub_886
+#define gl_dispatch_stub_887 mgl_dispatch_stub_887
+#define gl_dispatch_stub_888 mgl_dispatch_stub_888
+#define gl_dispatch_stub_889 mgl_dispatch_stub_889
#endif /* USE_MGL_NAMESPACE */
@@ -1361,41 +1372,41 @@ void GLAPIENTRY gl_dispatch_stub_363(GLenum target, GLenum pname, GLint * params
void GLAPIENTRY gl_dispatch_stub_364(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid * values);
void GLAPIENTRY gl_dispatch_stub_365(GLenum target, GLenum pname, GLfloat * params);
void GLAPIENTRY gl_dispatch_stub_366(GLenum target, GLenum pname, GLint * params);
-void GLAPIENTRY gl_dispatch_stub_601(GLenum pname, GLfloat * params);
-void GLAPIENTRY gl_dispatch_stub_602(GLenum pname, GLint * params);
-void GLAPIENTRY gl_dispatch_stub_603(GLenum pname, GLfloat param);
-void GLAPIENTRY gl_dispatch_stub_604(GLenum pname, const GLfloat * params);
-void GLAPIENTRY gl_dispatch_stub_605(GLenum pname, GLint param);
-void GLAPIENTRY gl_dispatch_stub_606(GLenum pname, const GLint * params);
-void GLAPIENTRY gl_dispatch_stub_607(GLclampf value, GLboolean invert);
-void GLAPIENTRY gl_dispatch_stub_608(GLenum pattern);
-void GLAPIENTRY gl_dispatch_stub_643(GLenum mode);
-void GLAPIENTRY gl_dispatch_stub_685(const GLenum * mode, const GLint * first, const GLsizei * count, GLsizei primcount, GLint modestride);
-void GLAPIENTRY gl_dispatch_stub_686(const GLenum * mode, const GLsizei * count, GLenum type, const GLvoid * const * indices, GLsizei primcount, GLint modestride);
-void GLAPIENTRY gl_dispatch_stub_687(GLsizei n, const GLuint * fences);
-void GLAPIENTRY gl_dispatch_stub_688(GLuint fence);
-void GLAPIENTRY gl_dispatch_stub_689(GLsizei n, GLuint * fences);
-void GLAPIENTRY gl_dispatch_stub_690(GLuint fence, GLenum pname, GLint * params);
-GLboolean GLAPIENTRY gl_dispatch_stub_691(GLuint fence);
-void GLAPIENTRY gl_dispatch_stub_692(GLuint fence, GLenum condition);
-GLboolean GLAPIENTRY gl_dispatch_stub_693(GLuint fence);
-void GLAPIENTRY gl_dispatch_stub_774(GLenum face);
-void GLAPIENTRY gl_dispatch_stub_775(GLuint array);
-void GLAPIENTRY gl_dispatch_stub_776(GLsizei n, const GLuint * arrays);
-void GLAPIENTRY gl_dispatch_stub_777(GLsizei n, GLuint * arrays);
-GLboolean GLAPIENTRY gl_dispatch_stub_778(GLuint array);
-void GLAPIENTRY gl_dispatch_stub_787(GLclampd zmin, GLclampd zmax);
-void GLAPIENTRY gl_dispatch_stub_788(GLenum modeRGB, GLenum modeA);
-void GLAPIENTRY gl_dispatch_stub_806(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_807(GLenum target, GLenum pname, GLint param);
-void GLAPIENTRY gl_dispatch_stub_808(GLenum target, GLintptr offset, GLsizeiptr size);
-void GLAPIENTRY gl_dispatch_stub_866(GLenum target, GLenum pname, GLvoid ** params);
-void GLAPIENTRY gl_dispatch_stub_867(GLenum target, GLsizei length, GLvoid * pointer);
-void GLAPIENTRY gl_dispatch_stub_874(GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask);
-void GLAPIENTRY gl_dispatch_stub_875(GLenum target, GLuint index, GLsizei count, const GLfloat * params);
-void GLAPIENTRY gl_dispatch_stub_876(GLenum target, GLuint index, GLsizei count, const GLfloat * params);
-void GLAPIENTRY gl_dispatch_stub_877(GLuint id, GLenum pname, GLint64EXT * params);
-void GLAPIENTRY gl_dispatch_stub_878(GLuint id, GLenum pname, GLuint64EXT * params);
+void GLAPIENTRY gl_dispatch_stub_611(GLenum pname, GLfloat * params);
+void GLAPIENTRY gl_dispatch_stub_612(GLenum pname, GLint * params);
+void GLAPIENTRY gl_dispatch_stub_613(GLenum pname, GLfloat param);
+void GLAPIENTRY gl_dispatch_stub_614(GLenum pname, const GLfloat * params);
+void GLAPIENTRY gl_dispatch_stub_615(GLenum pname, GLint param);
+void GLAPIENTRY gl_dispatch_stub_616(GLenum pname, const GLint * params);
+void GLAPIENTRY gl_dispatch_stub_617(GLclampf value, GLboolean invert);
+void GLAPIENTRY gl_dispatch_stub_618(GLenum pattern);
+void GLAPIENTRY gl_dispatch_stub_653(GLenum mode);
+void GLAPIENTRY gl_dispatch_stub_695(const GLenum * mode, const GLint * first, const GLsizei * count, GLsizei primcount, GLint modestride);
+void GLAPIENTRY gl_dispatch_stub_696(const GLenum * mode, const GLsizei * count, GLenum type, const GLvoid * const * indices, GLsizei primcount, GLint modestride);
+void GLAPIENTRY gl_dispatch_stub_697(GLsizei n, const GLuint * fences);
+void GLAPIENTRY gl_dispatch_stub_698(GLuint fence);
+void GLAPIENTRY gl_dispatch_stub_699(GLsizei n, GLuint * fences);
+void GLAPIENTRY gl_dispatch_stub_700(GLuint fence, GLenum pname, GLint * params);
+GLboolean GLAPIENTRY gl_dispatch_stub_701(GLuint fence);
+void GLAPIENTRY gl_dispatch_stub_702(GLuint fence, GLenum condition);
+GLboolean GLAPIENTRY gl_dispatch_stub_703(GLuint fence);
+void GLAPIENTRY gl_dispatch_stub_784(GLenum face);
+void GLAPIENTRY gl_dispatch_stub_785(GLuint array);
+void GLAPIENTRY gl_dispatch_stub_786(GLsizei n, const GLuint * arrays);
+void GLAPIENTRY gl_dispatch_stub_787(GLsizei n, GLuint * arrays);
+GLboolean GLAPIENTRY gl_dispatch_stub_788(GLuint array);
+void GLAPIENTRY gl_dispatch_stub_797(GLclampd zmin, GLclampd zmax);
+void GLAPIENTRY gl_dispatch_stub_798(GLenum modeRGB, GLenum modeA);
+void GLAPIENTRY gl_dispatch_stub_816(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_817(GLenum target, GLenum pname, GLint param);
+void GLAPIENTRY gl_dispatch_stub_818(GLenum target, GLintptr offset, GLsizeiptr size);
+void GLAPIENTRY gl_dispatch_stub_876(GLenum target, GLenum pname, GLvoid ** params);
+void GLAPIENTRY gl_dispatch_stub_877(GLenum target, GLsizei length, GLvoid * pointer);
+void GLAPIENTRY gl_dispatch_stub_885(GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask);
+void GLAPIENTRY gl_dispatch_stub_886(GLenum target, GLuint index, GLsizei count, const GLfloat * params);
+void GLAPIENTRY gl_dispatch_stub_887(GLenum target, GLuint index, GLsizei count, const GLfloat * params);
+void GLAPIENTRY gl_dispatch_stub_888(GLuint id, GLenum pname, GLint64EXT * params);
+void GLAPIENTRY gl_dispatch_stub_889(GLuint id, GLenum pname, GLuint64EXT * params);
#endif /* defined(NEED_FUNCTION_POINTER) || defined(GLX_INDIRECT_RENDERING) */
static const glprocs_table_t static_functions[] = {
@@ -1977,668 +1988,679 @@ static const glprocs_table_t static_functions[] = {
NAME_FUNC_OFFSET( 9225, glFramebufferTextureARB, glFramebufferTextureARB, NULL, 575),
NAME_FUNC_OFFSET( 9249, glFramebufferTextureFaceARB, glFramebufferTextureFaceARB, NULL, 576),
NAME_FUNC_OFFSET( 9277, glProgramParameteriARB, glProgramParameteriARB, NULL, 577),
- NAME_FUNC_OFFSET( 9300, glFlushMappedBufferRange, glFlushMappedBufferRange, NULL, 578),
- NAME_FUNC_OFFSET( 9325, glMapBufferRange, glMapBufferRange, NULL, 579),
- NAME_FUNC_OFFSET( 9342, glBindVertexArray, glBindVertexArray, NULL, 580),
- NAME_FUNC_OFFSET( 9360, glGenVertexArrays, glGenVertexArrays, NULL, 581),
- NAME_FUNC_OFFSET( 9378, glCopyBufferSubData, glCopyBufferSubData, NULL, 582),
- NAME_FUNC_OFFSET( 9398, glClientWaitSync, glClientWaitSync, NULL, 583),
- NAME_FUNC_OFFSET( 9415, glDeleteSync, glDeleteSync, NULL, 584),
- NAME_FUNC_OFFSET( 9428, glFenceSync, glFenceSync, NULL, 585),
- NAME_FUNC_OFFSET( 9440, glGetInteger64v, glGetInteger64v, NULL, 586),
- NAME_FUNC_OFFSET( 9456, glGetSynciv, glGetSynciv, NULL, 587),
- NAME_FUNC_OFFSET( 9468, glIsSync, glIsSync, NULL, 588),
- NAME_FUNC_OFFSET( 9477, glWaitSync, glWaitSync, NULL, 589),
- NAME_FUNC_OFFSET( 9488, glDrawElementsBaseVertex, glDrawElementsBaseVertex, NULL, 590),
- NAME_FUNC_OFFSET( 9513, glDrawRangeElementsBaseVertex, glDrawRangeElementsBaseVertex, NULL, 591),
- NAME_FUNC_OFFSET( 9543, glMultiDrawElementsBaseVertex, glMultiDrawElementsBaseVertex, NULL, 592),
- NAME_FUNC_OFFSET( 9573, glBindTransformFeedback, glBindTransformFeedback, NULL, 593),
- NAME_FUNC_OFFSET( 9597, glDeleteTransformFeedbacks, glDeleteTransformFeedbacks, NULL, 594),
- NAME_FUNC_OFFSET( 9624, glDrawTransformFeedback, glDrawTransformFeedback, NULL, 595),
- NAME_FUNC_OFFSET( 9648, glGenTransformFeedbacks, glGenTransformFeedbacks, NULL, 596),
- NAME_FUNC_OFFSET( 9672, glIsTransformFeedback, glIsTransformFeedback, NULL, 597),
- NAME_FUNC_OFFSET( 9694, glPauseTransformFeedback, glPauseTransformFeedback, NULL, 598),
- NAME_FUNC_OFFSET( 9719, glResumeTransformFeedback, glResumeTransformFeedback, NULL, 599),
- NAME_FUNC_OFFSET( 9745, glPolygonOffsetEXT, glPolygonOffsetEXT, NULL, 600),
- NAME_FUNC_OFFSET( 9764, gl_dispatch_stub_601, gl_dispatch_stub_601, NULL, 601),
- NAME_FUNC_OFFSET( 9796, gl_dispatch_stub_602, gl_dispatch_stub_602, NULL, 602),
- NAME_FUNC_OFFSET( 9828, gl_dispatch_stub_603, gl_dispatch_stub_603, NULL, 603),
- NAME_FUNC_OFFSET( 9856, gl_dispatch_stub_604, gl_dispatch_stub_604, NULL, 604),
- NAME_FUNC_OFFSET( 9885, gl_dispatch_stub_605, gl_dispatch_stub_605, NULL, 605),
- NAME_FUNC_OFFSET( 9913, gl_dispatch_stub_606, gl_dispatch_stub_606, NULL, 606),
- NAME_FUNC_OFFSET( 9942, gl_dispatch_stub_607, gl_dispatch_stub_607, NULL, 607),
- NAME_FUNC_OFFSET( 9959, gl_dispatch_stub_608, gl_dispatch_stub_608, NULL, 608),
- NAME_FUNC_OFFSET( 9979, glColorPointerEXT, glColorPointerEXT, NULL, 609),
- NAME_FUNC_OFFSET( 9997, glEdgeFlagPointerEXT, glEdgeFlagPointerEXT, NULL, 610),
- NAME_FUNC_OFFSET(10018, glIndexPointerEXT, glIndexPointerEXT, NULL, 611),
- NAME_FUNC_OFFSET(10036, glNormalPointerEXT, glNormalPointerEXT, NULL, 612),
- NAME_FUNC_OFFSET(10055, glTexCoordPointerEXT, glTexCoordPointerEXT, NULL, 613),
- NAME_FUNC_OFFSET(10076, glVertexPointerEXT, glVertexPointerEXT, NULL, 614),
- NAME_FUNC_OFFSET(10095, glPointParameterfEXT, glPointParameterfEXT, NULL, 615),
- NAME_FUNC_OFFSET(10116, glPointParameterfvEXT, glPointParameterfvEXT, NULL, 616),
- NAME_FUNC_OFFSET(10138, glLockArraysEXT, glLockArraysEXT, NULL, 617),
- NAME_FUNC_OFFSET(10154, glUnlockArraysEXT, glUnlockArraysEXT, NULL, 618),
- NAME_FUNC_OFFSET(10172, glSecondaryColor3bEXT, glSecondaryColor3bEXT, NULL, 619),
- NAME_FUNC_OFFSET(10194, glSecondaryColor3bvEXT, glSecondaryColor3bvEXT, NULL, 620),
- NAME_FUNC_OFFSET(10217, glSecondaryColor3dEXT, glSecondaryColor3dEXT, NULL, 621),
- NAME_FUNC_OFFSET(10239, glSecondaryColor3dvEXT, glSecondaryColor3dvEXT, NULL, 622),
- NAME_FUNC_OFFSET(10262, glSecondaryColor3fEXT, glSecondaryColor3fEXT, NULL, 623),
- NAME_FUNC_OFFSET(10284, glSecondaryColor3fvEXT, glSecondaryColor3fvEXT, NULL, 624),
- NAME_FUNC_OFFSET(10307, glSecondaryColor3iEXT, glSecondaryColor3iEXT, NULL, 625),
- NAME_FUNC_OFFSET(10329, glSecondaryColor3ivEXT, glSecondaryColor3ivEXT, NULL, 626),
- NAME_FUNC_OFFSET(10352, glSecondaryColor3sEXT, glSecondaryColor3sEXT, NULL, 627),
- NAME_FUNC_OFFSET(10374, glSecondaryColor3svEXT, glSecondaryColor3svEXT, NULL, 628),
- NAME_FUNC_OFFSET(10397, glSecondaryColor3ubEXT, glSecondaryColor3ubEXT, NULL, 629),
- NAME_FUNC_OFFSET(10420, glSecondaryColor3ubvEXT, glSecondaryColor3ubvEXT, NULL, 630),
- NAME_FUNC_OFFSET(10444, glSecondaryColor3uiEXT, glSecondaryColor3uiEXT, NULL, 631),
- NAME_FUNC_OFFSET(10467, glSecondaryColor3uivEXT, glSecondaryColor3uivEXT, NULL, 632),
- NAME_FUNC_OFFSET(10491, glSecondaryColor3usEXT, glSecondaryColor3usEXT, NULL, 633),
- NAME_FUNC_OFFSET(10514, glSecondaryColor3usvEXT, glSecondaryColor3usvEXT, NULL, 634),
- NAME_FUNC_OFFSET(10538, glSecondaryColorPointerEXT, glSecondaryColorPointerEXT, NULL, 635),
- NAME_FUNC_OFFSET(10565, glMultiDrawArraysEXT, glMultiDrawArraysEXT, NULL, 636),
- NAME_FUNC_OFFSET(10586, glMultiDrawElementsEXT, glMultiDrawElementsEXT, NULL, 637),
- NAME_FUNC_OFFSET(10609, glFogCoordPointerEXT, glFogCoordPointerEXT, NULL, 638),
- NAME_FUNC_OFFSET(10630, glFogCoorddEXT, glFogCoorddEXT, NULL, 639),
- NAME_FUNC_OFFSET(10645, glFogCoorddvEXT, glFogCoorddvEXT, NULL, 640),
- NAME_FUNC_OFFSET(10661, glFogCoordfEXT, glFogCoordfEXT, NULL, 641),
- NAME_FUNC_OFFSET(10676, glFogCoordfvEXT, glFogCoordfvEXT, NULL, 642),
- NAME_FUNC_OFFSET(10692, gl_dispatch_stub_643, gl_dispatch_stub_643, NULL, 643),
- NAME_FUNC_OFFSET(10710, glBlendFuncSeparateEXT, glBlendFuncSeparateEXT, NULL, 644),
- NAME_FUNC_OFFSET(10733, glFlushVertexArrayRangeNV, glFlushVertexArrayRangeNV, NULL, 645),
- NAME_FUNC_OFFSET(10759, glVertexArrayRangeNV, glVertexArrayRangeNV, NULL, 646),
- NAME_FUNC_OFFSET(10780, glCombinerInputNV, glCombinerInputNV, NULL, 647),
- NAME_FUNC_OFFSET(10798, glCombinerOutputNV, glCombinerOutputNV, NULL, 648),
- NAME_FUNC_OFFSET(10817, glCombinerParameterfNV, glCombinerParameterfNV, NULL, 649),
- NAME_FUNC_OFFSET(10840, glCombinerParameterfvNV, glCombinerParameterfvNV, NULL, 650),
- NAME_FUNC_OFFSET(10864, glCombinerParameteriNV, glCombinerParameteriNV, NULL, 651),
- NAME_FUNC_OFFSET(10887, glCombinerParameterivNV, glCombinerParameterivNV, NULL, 652),
- NAME_FUNC_OFFSET(10911, glFinalCombinerInputNV, glFinalCombinerInputNV, NULL, 653),
- NAME_FUNC_OFFSET(10934, glGetCombinerInputParameterfvNV, glGetCombinerInputParameterfvNV, NULL, 654),
- NAME_FUNC_OFFSET(10966, glGetCombinerInputParameterivNV, glGetCombinerInputParameterivNV, NULL, 655),
- NAME_FUNC_OFFSET(10998, glGetCombinerOutputParameterfvNV, glGetCombinerOutputParameterfvNV, NULL, 656),
- NAME_FUNC_OFFSET(11031, glGetCombinerOutputParameterivNV, glGetCombinerOutputParameterivNV, NULL, 657),
- NAME_FUNC_OFFSET(11064, glGetFinalCombinerInputParameterfvNV, glGetFinalCombinerInputParameterfvNV, NULL, 658),
- NAME_FUNC_OFFSET(11101, glGetFinalCombinerInputParameterivNV, glGetFinalCombinerInputParameterivNV, NULL, 659),
- NAME_FUNC_OFFSET(11138, glResizeBuffersMESA, glResizeBuffersMESA, NULL, 660),
- NAME_FUNC_OFFSET(11158, glWindowPos2dMESA, glWindowPos2dMESA, NULL, 661),
- NAME_FUNC_OFFSET(11176, glWindowPos2dvMESA, glWindowPos2dvMESA, NULL, 662),
- NAME_FUNC_OFFSET(11195, glWindowPos2fMESA, glWindowPos2fMESA, NULL, 663),
- NAME_FUNC_OFFSET(11213, glWindowPos2fvMESA, glWindowPos2fvMESA, NULL, 664),
- NAME_FUNC_OFFSET(11232, glWindowPos2iMESA, glWindowPos2iMESA, NULL, 665),
- NAME_FUNC_OFFSET(11250, glWindowPos2ivMESA, glWindowPos2ivMESA, NULL, 666),
- NAME_FUNC_OFFSET(11269, glWindowPos2sMESA, glWindowPos2sMESA, NULL, 667),
- NAME_FUNC_OFFSET(11287, glWindowPos2svMESA, glWindowPos2svMESA, NULL, 668),
- NAME_FUNC_OFFSET(11306, glWindowPos3dMESA, glWindowPos3dMESA, NULL, 669),
- NAME_FUNC_OFFSET(11324, glWindowPos3dvMESA, glWindowPos3dvMESA, NULL, 670),
- NAME_FUNC_OFFSET(11343, glWindowPos3fMESA, glWindowPos3fMESA, NULL, 671),
- NAME_FUNC_OFFSET(11361, glWindowPos3fvMESA, glWindowPos3fvMESA, NULL, 672),
- NAME_FUNC_OFFSET(11380, glWindowPos3iMESA, glWindowPos3iMESA, NULL, 673),
- NAME_FUNC_OFFSET(11398, glWindowPos3ivMESA, glWindowPos3ivMESA, NULL, 674),
- NAME_FUNC_OFFSET(11417, glWindowPos3sMESA, glWindowPos3sMESA, NULL, 675),
- NAME_FUNC_OFFSET(11435, glWindowPos3svMESA, glWindowPos3svMESA, NULL, 676),
- NAME_FUNC_OFFSET(11454, glWindowPos4dMESA, glWindowPos4dMESA, NULL, 677),
- NAME_FUNC_OFFSET(11472, glWindowPos4dvMESA, glWindowPos4dvMESA, NULL, 678),
- NAME_FUNC_OFFSET(11491, glWindowPos4fMESA, glWindowPos4fMESA, NULL, 679),
- NAME_FUNC_OFFSET(11509, glWindowPos4fvMESA, glWindowPos4fvMESA, NULL, 680),
- NAME_FUNC_OFFSET(11528, glWindowPos4iMESA, glWindowPos4iMESA, NULL, 681),
- NAME_FUNC_OFFSET(11546, glWindowPos4ivMESA, glWindowPos4ivMESA, NULL, 682),
- NAME_FUNC_OFFSET(11565, glWindowPos4sMESA, glWindowPos4sMESA, NULL, 683),
- NAME_FUNC_OFFSET(11583, glWindowPos4svMESA, glWindowPos4svMESA, NULL, 684),
- NAME_FUNC_OFFSET(11602, gl_dispatch_stub_685, gl_dispatch_stub_685, NULL, 685),
- NAME_FUNC_OFFSET(11627, gl_dispatch_stub_686, gl_dispatch_stub_686, NULL, 686),
- NAME_FUNC_OFFSET(11654, gl_dispatch_stub_687, gl_dispatch_stub_687, NULL, 687),
- NAME_FUNC_OFFSET(11671, gl_dispatch_stub_688, gl_dispatch_stub_688, NULL, 688),
- NAME_FUNC_OFFSET(11687, gl_dispatch_stub_689, gl_dispatch_stub_689, NULL, 689),
- NAME_FUNC_OFFSET(11701, gl_dispatch_stub_690, gl_dispatch_stub_690, NULL, 690),
- NAME_FUNC_OFFSET(11716, gl_dispatch_stub_691, gl_dispatch_stub_691, NULL, 691),
- NAME_FUNC_OFFSET(11728, gl_dispatch_stub_692, gl_dispatch_stub_692, NULL, 692),
- NAME_FUNC_OFFSET(11741, gl_dispatch_stub_693, gl_dispatch_stub_693, NULL, 693),
- NAME_FUNC_OFFSET(11755, glAreProgramsResidentNV, glAreProgramsResidentNV, NULL, 694),
- NAME_FUNC_OFFSET(11779, glBindProgramNV, glBindProgramNV, NULL, 695),
- NAME_FUNC_OFFSET(11795, glDeleteProgramsNV, glDeleteProgramsNV, NULL, 696),
- NAME_FUNC_OFFSET(11814, glExecuteProgramNV, glExecuteProgramNV, NULL, 697),
- NAME_FUNC_OFFSET(11833, glGenProgramsNV, glGenProgramsNV, NULL, 698),
- NAME_FUNC_OFFSET(11849, glGetProgramParameterdvNV, glGetProgramParameterdvNV, NULL, 699),
- NAME_FUNC_OFFSET(11875, glGetProgramParameterfvNV, glGetProgramParameterfvNV, NULL, 700),
- NAME_FUNC_OFFSET(11901, glGetProgramStringNV, glGetProgramStringNV, NULL, 701),
- NAME_FUNC_OFFSET(11922, glGetProgramivNV, glGetProgramivNV, NULL, 702),
- NAME_FUNC_OFFSET(11939, glGetTrackMatrixivNV, glGetTrackMatrixivNV, NULL, 703),
- NAME_FUNC_OFFSET(11960, glGetVertexAttribPointervNV, glGetVertexAttribPointervNV, NULL, 704),
- NAME_FUNC_OFFSET(11988, glGetVertexAttribdvNV, glGetVertexAttribdvNV, NULL, 705),
- NAME_FUNC_OFFSET(12010, glGetVertexAttribfvNV, glGetVertexAttribfvNV, NULL, 706),
- NAME_FUNC_OFFSET(12032, glGetVertexAttribivNV, glGetVertexAttribivNV, NULL, 707),
- NAME_FUNC_OFFSET(12054, glIsProgramNV, glIsProgramNV, NULL, 708),
- NAME_FUNC_OFFSET(12068, glLoadProgramNV, glLoadProgramNV, NULL, 709),
- NAME_FUNC_OFFSET(12084, glProgramParameters4dvNV, glProgramParameters4dvNV, NULL, 710),
- NAME_FUNC_OFFSET(12109, glProgramParameters4fvNV, glProgramParameters4fvNV, NULL, 711),
- NAME_FUNC_OFFSET(12134, glRequestResidentProgramsNV, glRequestResidentProgramsNV, NULL, 712),
- NAME_FUNC_OFFSET(12162, glTrackMatrixNV, glTrackMatrixNV, NULL, 713),
- NAME_FUNC_OFFSET(12178, glVertexAttrib1dNV, glVertexAttrib1dNV, NULL, 714),
- NAME_FUNC_OFFSET(12197, glVertexAttrib1dvNV, glVertexAttrib1dvNV, NULL, 715),
- NAME_FUNC_OFFSET(12217, glVertexAttrib1fNV, glVertexAttrib1fNV, NULL, 716),
- NAME_FUNC_OFFSET(12236, glVertexAttrib1fvNV, glVertexAttrib1fvNV, NULL, 717),
- NAME_FUNC_OFFSET(12256, glVertexAttrib1sNV, glVertexAttrib1sNV, NULL, 718),
- NAME_FUNC_OFFSET(12275, glVertexAttrib1svNV, glVertexAttrib1svNV, NULL, 719),
- NAME_FUNC_OFFSET(12295, glVertexAttrib2dNV, glVertexAttrib2dNV, NULL, 720),
- NAME_FUNC_OFFSET(12314, glVertexAttrib2dvNV, glVertexAttrib2dvNV, NULL, 721),
- NAME_FUNC_OFFSET(12334, glVertexAttrib2fNV, glVertexAttrib2fNV, NULL, 722),
- NAME_FUNC_OFFSET(12353, glVertexAttrib2fvNV, glVertexAttrib2fvNV, NULL, 723),
- NAME_FUNC_OFFSET(12373, glVertexAttrib2sNV, glVertexAttrib2sNV, NULL, 724),
- NAME_FUNC_OFFSET(12392, glVertexAttrib2svNV, glVertexAttrib2svNV, NULL, 725),
- NAME_FUNC_OFFSET(12412, glVertexAttrib3dNV, glVertexAttrib3dNV, NULL, 726),
- NAME_FUNC_OFFSET(12431, glVertexAttrib3dvNV, glVertexAttrib3dvNV, NULL, 727),
- NAME_FUNC_OFFSET(12451, glVertexAttrib3fNV, glVertexAttrib3fNV, NULL, 728),
- NAME_FUNC_OFFSET(12470, glVertexAttrib3fvNV, glVertexAttrib3fvNV, NULL, 729),
- NAME_FUNC_OFFSET(12490, glVertexAttrib3sNV, glVertexAttrib3sNV, NULL, 730),
- NAME_FUNC_OFFSET(12509, glVertexAttrib3svNV, glVertexAttrib3svNV, NULL, 731),
- NAME_FUNC_OFFSET(12529, glVertexAttrib4dNV, glVertexAttrib4dNV, NULL, 732),
- NAME_FUNC_OFFSET(12548, glVertexAttrib4dvNV, glVertexAttrib4dvNV, NULL, 733),
- NAME_FUNC_OFFSET(12568, glVertexAttrib4fNV, glVertexAttrib4fNV, NULL, 734),
- NAME_FUNC_OFFSET(12587, glVertexAttrib4fvNV, glVertexAttrib4fvNV, NULL, 735),
- NAME_FUNC_OFFSET(12607, glVertexAttrib4sNV, glVertexAttrib4sNV, NULL, 736),
- NAME_FUNC_OFFSET(12626, glVertexAttrib4svNV, glVertexAttrib4svNV, NULL, 737),
- NAME_FUNC_OFFSET(12646, glVertexAttrib4ubNV, glVertexAttrib4ubNV, NULL, 738),
- NAME_FUNC_OFFSET(12666, glVertexAttrib4ubvNV, glVertexAttrib4ubvNV, NULL, 739),
- NAME_FUNC_OFFSET(12687, glVertexAttribPointerNV, glVertexAttribPointerNV, NULL, 740),
- NAME_FUNC_OFFSET(12711, glVertexAttribs1dvNV, glVertexAttribs1dvNV, NULL, 741),
- NAME_FUNC_OFFSET(12732, glVertexAttribs1fvNV, glVertexAttribs1fvNV, NULL, 742),
- NAME_FUNC_OFFSET(12753, glVertexAttribs1svNV, glVertexAttribs1svNV, NULL, 743),
- NAME_FUNC_OFFSET(12774, glVertexAttribs2dvNV, glVertexAttribs2dvNV, NULL, 744),
- NAME_FUNC_OFFSET(12795, glVertexAttribs2fvNV, glVertexAttribs2fvNV, NULL, 745),
- NAME_FUNC_OFFSET(12816, glVertexAttribs2svNV, glVertexAttribs2svNV, NULL, 746),
- NAME_FUNC_OFFSET(12837, glVertexAttribs3dvNV, glVertexAttribs3dvNV, NULL, 747),
- NAME_FUNC_OFFSET(12858, glVertexAttribs3fvNV, glVertexAttribs3fvNV, NULL, 748),
- NAME_FUNC_OFFSET(12879, glVertexAttribs3svNV, glVertexAttribs3svNV, NULL, 749),
- NAME_FUNC_OFFSET(12900, glVertexAttribs4dvNV, glVertexAttribs4dvNV, NULL, 750),
- NAME_FUNC_OFFSET(12921, glVertexAttribs4fvNV, glVertexAttribs4fvNV, NULL, 751),
- NAME_FUNC_OFFSET(12942, glVertexAttribs4svNV, glVertexAttribs4svNV, NULL, 752),
- NAME_FUNC_OFFSET(12963, glVertexAttribs4ubvNV, glVertexAttribs4ubvNV, NULL, 753),
- NAME_FUNC_OFFSET(12985, glGetTexBumpParameterfvATI, glGetTexBumpParameterfvATI, NULL, 754),
- NAME_FUNC_OFFSET(13012, glGetTexBumpParameterivATI, glGetTexBumpParameterivATI, NULL, 755),
- NAME_FUNC_OFFSET(13039, glTexBumpParameterfvATI, glTexBumpParameterfvATI, NULL, 756),
- NAME_FUNC_OFFSET(13063, glTexBumpParameterivATI, glTexBumpParameterivATI, NULL, 757),
- NAME_FUNC_OFFSET(13087, glAlphaFragmentOp1ATI, glAlphaFragmentOp1ATI, NULL, 758),
- NAME_FUNC_OFFSET(13109, glAlphaFragmentOp2ATI, glAlphaFragmentOp2ATI, NULL, 759),
- NAME_FUNC_OFFSET(13131, glAlphaFragmentOp3ATI, glAlphaFragmentOp3ATI, NULL, 760),
- NAME_FUNC_OFFSET(13153, glBeginFragmentShaderATI, glBeginFragmentShaderATI, NULL, 761),
- NAME_FUNC_OFFSET(13178, glBindFragmentShaderATI, glBindFragmentShaderATI, NULL, 762),
- NAME_FUNC_OFFSET(13202, glColorFragmentOp1ATI, glColorFragmentOp1ATI, NULL, 763),
- NAME_FUNC_OFFSET(13224, glColorFragmentOp2ATI, glColorFragmentOp2ATI, NULL, 764),
- NAME_FUNC_OFFSET(13246, glColorFragmentOp3ATI, glColorFragmentOp3ATI, NULL, 765),
- NAME_FUNC_OFFSET(13268, glDeleteFragmentShaderATI, glDeleteFragmentShaderATI, NULL, 766),
- NAME_FUNC_OFFSET(13294, glEndFragmentShaderATI, glEndFragmentShaderATI, NULL, 767),
- NAME_FUNC_OFFSET(13317, glGenFragmentShadersATI, glGenFragmentShadersATI, NULL, 768),
- NAME_FUNC_OFFSET(13341, glPassTexCoordATI, glPassTexCoordATI, NULL, 769),
- NAME_FUNC_OFFSET(13359, glSampleMapATI, glSampleMapATI, NULL, 770),
- NAME_FUNC_OFFSET(13374, glSetFragmentShaderConstantATI, glSetFragmentShaderConstantATI, NULL, 771),
- NAME_FUNC_OFFSET(13405, glPointParameteriNV, glPointParameteriNV, NULL, 772),
- NAME_FUNC_OFFSET(13425, glPointParameterivNV, glPointParameterivNV, NULL, 773),
- NAME_FUNC_OFFSET(13446, gl_dispatch_stub_774, gl_dispatch_stub_774, NULL, 774),
- NAME_FUNC_OFFSET(13469, gl_dispatch_stub_775, gl_dispatch_stub_775, NULL, 775),
- NAME_FUNC_OFFSET(13492, gl_dispatch_stub_776, gl_dispatch_stub_776, NULL, 776),
- NAME_FUNC_OFFSET(13518, gl_dispatch_stub_777, gl_dispatch_stub_777, NULL, 777),
- NAME_FUNC_OFFSET(13541, gl_dispatch_stub_778, gl_dispatch_stub_778, NULL, 778),
- NAME_FUNC_OFFSET(13562, glGetProgramNamedParameterdvNV, glGetProgramNamedParameterdvNV, NULL, 779),
- NAME_FUNC_OFFSET(13593, glGetProgramNamedParameterfvNV, glGetProgramNamedParameterfvNV, NULL, 780),
- NAME_FUNC_OFFSET(13624, glProgramNamedParameter4dNV, glProgramNamedParameter4dNV, NULL, 781),
- NAME_FUNC_OFFSET(13652, glProgramNamedParameter4dvNV, glProgramNamedParameter4dvNV, NULL, 782),
- NAME_FUNC_OFFSET(13681, glProgramNamedParameter4fNV, glProgramNamedParameter4fNV, NULL, 783),
- NAME_FUNC_OFFSET(13709, glProgramNamedParameter4fvNV, glProgramNamedParameter4fvNV, NULL, 784),
- NAME_FUNC_OFFSET(13738, glPrimitiveRestartIndexNV, glPrimitiveRestartIndexNV, NULL, 785),
- NAME_FUNC_OFFSET(13764, glPrimitiveRestartNV, glPrimitiveRestartNV, NULL, 786),
- NAME_FUNC_OFFSET(13785, gl_dispatch_stub_787, gl_dispatch_stub_787, NULL, 787),
- NAME_FUNC_OFFSET(13802, gl_dispatch_stub_788, gl_dispatch_stub_788, NULL, 788),
- NAME_FUNC_OFFSET(13829, glBindFramebufferEXT, glBindFramebufferEXT, NULL, 789),
- NAME_FUNC_OFFSET(13850, glBindRenderbufferEXT, glBindRenderbufferEXT, NULL, 790),
- NAME_FUNC_OFFSET(13872, glCheckFramebufferStatusEXT, glCheckFramebufferStatusEXT, NULL, 791),
- NAME_FUNC_OFFSET(13900, glDeleteFramebuffersEXT, glDeleteFramebuffersEXT, NULL, 792),
- NAME_FUNC_OFFSET(13924, glDeleteRenderbuffersEXT, glDeleteRenderbuffersEXT, NULL, 793),
- NAME_FUNC_OFFSET(13949, glFramebufferRenderbufferEXT, glFramebufferRenderbufferEXT, NULL, 794),
- NAME_FUNC_OFFSET(13978, glFramebufferTexture1DEXT, glFramebufferTexture1DEXT, NULL, 795),
- NAME_FUNC_OFFSET(14004, glFramebufferTexture2DEXT, glFramebufferTexture2DEXT, NULL, 796),
- NAME_FUNC_OFFSET(14030, glFramebufferTexture3DEXT, glFramebufferTexture3DEXT, NULL, 797),
- NAME_FUNC_OFFSET(14056, glGenFramebuffersEXT, glGenFramebuffersEXT, NULL, 798),
- NAME_FUNC_OFFSET(14077, glGenRenderbuffersEXT, glGenRenderbuffersEXT, NULL, 799),
- NAME_FUNC_OFFSET(14099, glGenerateMipmapEXT, glGenerateMipmapEXT, NULL, 800),
- NAME_FUNC_OFFSET(14119, glGetFramebufferAttachmentParameterivEXT, glGetFramebufferAttachmentParameterivEXT, NULL, 801),
- NAME_FUNC_OFFSET(14160, glGetRenderbufferParameterivEXT, glGetRenderbufferParameterivEXT, NULL, 802),
- NAME_FUNC_OFFSET(14192, glIsFramebufferEXT, glIsFramebufferEXT, NULL, 803),
- NAME_FUNC_OFFSET(14211, glIsRenderbufferEXT, glIsRenderbufferEXT, NULL, 804),
- NAME_FUNC_OFFSET(14231, glRenderbufferStorageEXT, glRenderbufferStorageEXT, NULL, 805),
- NAME_FUNC_OFFSET(14256, gl_dispatch_stub_806, gl_dispatch_stub_806, NULL, 806),
- NAME_FUNC_OFFSET(14277, gl_dispatch_stub_807, gl_dispatch_stub_807, NULL, 807),
- NAME_FUNC_OFFSET(14301, gl_dispatch_stub_808, gl_dispatch_stub_808, NULL, 808),
- NAME_FUNC_OFFSET(14331, glBindFragDataLocationEXT, glBindFragDataLocationEXT, NULL, 809),
- NAME_FUNC_OFFSET(14357, glGetFragDataLocationEXT, glGetFragDataLocationEXT, NULL, 810),
- NAME_FUNC_OFFSET(14382, glGetUniformuivEXT, glGetUniformuivEXT, NULL, 811),
- NAME_FUNC_OFFSET(14401, glGetVertexAttribIivEXT, glGetVertexAttribIivEXT, NULL, 812),
- NAME_FUNC_OFFSET(14425, glGetVertexAttribIuivEXT, glGetVertexAttribIuivEXT, NULL, 813),
- NAME_FUNC_OFFSET(14450, glUniform1uiEXT, glUniform1uiEXT, NULL, 814),
- NAME_FUNC_OFFSET(14466, glUniform1uivEXT, glUniform1uivEXT, NULL, 815),
- NAME_FUNC_OFFSET(14483, glUniform2uiEXT, glUniform2uiEXT, NULL, 816),
- NAME_FUNC_OFFSET(14499, glUniform2uivEXT, glUniform2uivEXT, NULL, 817),
- NAME_FUNC_OFFSET(14516, glUniform3uiEXT, glUniform3uiEXT, NULL, 818),
- NAME_FUNC_OFFSET(14532, glUniform3uivEXT, glUniform3uivEXT, NULL, 819),
- NAME_FUNC_OFFSET(14549, glUniform4uiEXT, glUniform4uiEXT, NULL, 820),
- NAME_FUNC_OFFSET(14565, glUniform4uivEXT, glUniform4uivEXT, NULL, 821),
- NAME_FUNC_OFFSET(14582, glVertexAttribI1iEXT, glVertexAttribI1iEXT, NULL, 822),
- NAME_FUNC_OFFSET(14603, glVertexAttribI1ivEXT, glVertexAttribI1ivEXT, NULL, 823),
- NAME_FUNC_OFFSET(14625, glVertexAttribI1uiEXT, glVertexAttribI1uiEXT, NULL, 824),
- NAME_FUNC_OFFSET(14647, glVertexAttribI1uivEXT, glVertexAttribI1uivEXT, NULL, 825),
- NAME_FUNC_OFFSET(14670, glVertexAttribI2iEXT, glVertexAttribI2iEXT, NULL, 826),
- NAME_FUNC_OFFSET(14691, glVertexAttribI2ivEXT, glVertexAttribI2ivEXT, NULL, 827),
- NAME_FUNC_OFFSET(14713, glVertexAttribI2uiEXT, glVertexAttribI2uiEXT, NULL, 828),
- NAME_FUNC_OFFSET(14735, glVertexAttribI2uivEXT, glVertexAttribI2uivEXT, NULL, 829),
- NAME_FUNC_OFFSET(14758, glVertexAttribI3iEXT, glVertexAttribI3iEXT, NULL, 830),
- NAME_FUNC_OFFSET(14779, glVertexAttribI3ivEXT, glVertexAttribI3ivEXT, NULL, 831),
- NAME_FUNC_OFFSET(14801, glVertexAttribI3uiEXT, glVertexAttribI3uiEXT, NULL, 832),
- NAME_FUNC_OFFSET(14823, glVertexAttribI3uivEXT, glVertexAttribI3uivEXT, NULL, 833),
- NAME_FUNC_OFFSET(14846, glVertexAttribI4bvEXT, glVertexAttribI4bvEXT, NULL, 834),
- NAME_FUNC_OFFSET(14868, glVertexAttribI4iEXT, glVertexAttribI4iEXT, NULL, 835),
- NAME_FUNC_OFFSET(14889, glVertexAttribI4ivEXT, glVertexAttribI4ivEXT, NULL, 836),
- NAME_FUNC_OFFSET(14911, glVertexAttribI4svEXT, glVertexAttribI4svEXT, NULL, 837),
- NAME_FUNC_OFFSET(14933, glVertexAttribI4ubvEXT, glVertexAttribI4ubvEXT, NULL, 838),
- NAME_FUNC_OFFSET(14956, glVertexAttribI4uiEXT, glVertexAttribI4uiEXT, NULL, 839),
- NAME_FUNC_OFFSET(14978, glVertexAttribI4uivEXT, glVertexAttribI4uivEXT, NULL, 840),
- NAME_FUNC_OFFSET(15001, glVertexAttribI4usvEXT, glVertexAttribI4usvEXT, NULL, 841),
- NAME_FUNC_OFFSET(15024, glVertexAttribIPointerEXT, glVertexAttribIPointerEXT, NULL, 842),
- NAME_FUNC_OFFSET(15050, glFramebufferTextureLayerEXT, glFramebufferTextureLayerEXT, NULL, 843),
- NAME_FUNC_OFFSET(15079, glColorMaskIndexedEXT, glColorMaskIndexedEXT, NULL, 844),
- NAME_FUNC_OFFSET(15101, glDisableIndexedEXT, glDisableIndexedEXT, NULL, 845),
- NAME_FUNC_OFFSET(15121, glEnableIndexedEXT, glEnableIndexedEXT, NULL, 846),
- NAME_FUNC_OFFSET(15140, glGetBooleanIndexedvEXT, glGetBooleanIndexedvEXT, NULL, 847),
- NAME_FUNC_OFFSET(15164, glGetIntegerIndexedvEXT, glGetIntegerIndexedvEXT, NULL, 848),
- NAME_FUNC_OFFSET(15188, glIsEnabledIndexedEXT, glIsEnabledIndexedEXT, NULL, 849),
- NAME_FUNC_OFFSET(15210, glClearColorIiEXT, glClearColorIiEXT, NULL, 850),
- NAME_FUNC_OFFSET(15228, glClearColorIuiEXT, glClearColorIuiEXT, NULL, 851),
- NAME_FUNC_OFFSET(15247, glGetTexParameterIivEXT, glGetTexParameterIivEXT, NULL, 852),
- NAME_FUNC_OFFSET(15271, glGetTexParameterIuivEXT, glGetTexParameterIuivEXT, NULL, 853),
- NAME_FUNC_OFFSET(15296, glTexParameterIivEXT, glTexParameterIivEXT, NULL, 854),
- NAME_FUNC_OFFSET(15317, glTexParameterIuivEXT, glTexParameterIuivEXT, NULL, 855),
- NAME_FUNC_OFFSET(15339, glBeginConditionalRenderNV, glBeginConditionalRenderNV, NULL, 856),
- NAME_FUNC_OFFSET(15366, glEndConditionalRenderNV, glEndConditionalRenderNV, NULL, 857),
- NAME_FUNC_OFFSET(15391, glBeginTransformFeedbackEXT, glBeginTransformFeedbackEXT, NULL, 858),
- NAME_FUNC_OFFSET(15419, glBindBufferBaseEXT, glBindBufferBaseEXT, NULL, 859),
- NAME_FUNC_OFFSET(15439, glBindBufferOffsetEXT, glBindBufferOffsetEXT, NULL, 860),
- NAME_FUNC_OFFSET(15461, glBindBufferRangeEXT, glBindBufferRangeEXT, NULL, 861),
- NAME_FUNC_OFFSET(15482, glEndTransformFeedbackEXT, glEndTransformFeedbackEXT, NULL, 862),
- NAME_FUNC_OFFSET(15508, glGetTransformFeedbackVaryingEXT, glGetTransformFeedbackVaryingEXT, NULL, 863),
- NAME_FUNC_OFFSET(15541, glTransformFeedbackVaryingsEXT, glTransformFeedbackVaryingsEXT, NULL, 864),
- NAME_FUNC_OFFSET(15572, glProvokingVertexEXT, glProvokingVertexEXT, NULL, 865),
- NAME_FUNC_OFFSET(15593, gl_dispatch_stub_866, gl_dispatch_stub_866, NULL, 866),
- NAME_FUNC_OFFSET(15624, gl_dispatch_stub_867, gl_dispatch_stub_867, NULL, 867),
- NAME_FUNC_OFFSET(15644, glGetObjectParameterivAPPLE, glGetObjectParameterivAPPLE, NULL, 868),
- NAME_FUNC_OFFSET(15672, glObjectPurgeableAPPLE, glObjectPurgeableAPPLE, NULL, 869),
- NAME_FUNC_OFFSET(15695, glObjectUnpurgeableAPPLE, glObjectUnpurgeableAPPLE, NULL, 870),
- NAME_FUNC_OFFSET(15720, glActiveProgramEXT, glActiveProgramEXT, NULL, 871),
- NAME_FUNC_OFFSET(15739, glCreateShaderProgramEXT, glCreateShaderProgramEXT, NULL, 872),
- NAME_FUNC_OFFSET(15764, glUseShaderProgramEXT, glUseShaderProgramEXT, NULL, 873),
- NAME_FUNC_OFFSET(15786, gl_dispatch_stub_874, gl_dispatch_stub_874, NULL, 874),
- NAME_FUNC_OFFSET(15811, gl_dispatch_stub_875, gl_dispatch_stub_875, NULL, 875),
- NAME_FUNC_OFFSET(15840, gl_dispatch_stub_876, gl_dispatch_stub_876, NULL, 876),
- NAME_FUNC_OFFSET(15871, gl_dispatch_stub_877, gl_dispatch_stub_877, NULL, 877),
- NAME_FUNC_OFFSET(15895, gl_dispatch_stub_878, gl_dispatch_stub_878, NULL, 878),
- NAME_FUNC_OFFSET(15920, glEGLImageTargetRenderbufferStorageOES, glEGLImageTargetRenderbufferStorageOES, NULL, 879),
- NAME_FUNC_OFFSET(15959, glEGLImageTargetTexture2DOES, glEGLImageTargetTexture2DOES, NULL, 880),
- NAME_FUNC_OFFSET(15988, glArrayElement, glArrayElement, NULL, 306),
- NAME_FUNC_OFFSET(16006, glBindTexture, glBindTexture, NULL, 307),
- NAME_FUNC_OFFSET(16023, glDrawArrays, glDrawArrays, NULL, 310),
- NAME_FUNC_OFFSET(16039, glAreTexturesResident, glAreTexturesResidentEXT, glAreTexturesResidentEXT, 322),
- NAME_FUNC_OFFSET(16064, glCopyTexImage1D, glCopyTexImage1D, NULL, 323),
- NAME_FUNC_OFFSET(16084, glCopyTexImage2D, glCopyTexImage2D, NULL, 324),
- NAME_FUNC_OFFSET(16104, glCopyTexSubImage1D, glCopyTexSubImage1D, NULL, 325),
- NAME_FUNC_OFFSET(16127, glCopyTexSubImage2D, glCopyTexSubImage2D, NULL, 326),
- NAME_FUNC_OFFSET(16150, glDeleteTextures, glDeleteTexturesEXT, glDeleteTexturesEXT, 327),
- NAME_FUNC_OFFSET(16170, glGenTextures, glGenTexturesEXT, glGenTexturesEXT, 328),
- NAME_FUNC_OFFSET(16187, glGetPointerv, glGetPointerv, NULL, 329),
- NAME_FUNC_OFFSET(16204, glIsTexture, glIsTextureEXT, glIsTextureEXT, 330),
- NAME_FUNC_OFFSET(16219, glPrioritizeTextures, glPrioritizeTextures, NULL, 331),
- NAME_FUNC_OFFSET(16243, glTexSubImage1D, glTexSubImage1D, NULL, 332),
- NAME_FUNC_OFFSET(16262, glTexSubImage2D, glTexSubImage2D, NULL, 333),
- NAME_FUNC_OFFSET(16281, glBlendColor, glBlendColor, NULL, 336),
- NAME_FUNC_OFFSET(16297, glBlendEquation, glBlendEquation, NULL, 337),
- NAME_FUNC_OFFSET(16316, glDrawRangeElements, glDrawRangeElements, NULL, 338),
- NAME_FUNC_OFFSET(16339, glColorTable, glColorTable, NULL, 339),
- NAME_FUNC_OFFSET(16355, glColorTable, glColorTable, NULL, 339),
- NAME_FUNC_OFFSET(16371, glColorTableParameterfv, glColorTableParameterfv, NULL, 340),
- NAME_FUNC_OFFSET(16398, glColorTableParameteriv, glColorTableParameteriv, NULL, 341),
- NAME_FUNC_OFFSET(16425, glCopyColorTable, glCopyColorTable, NULL, 342),
- NAME_FUNC_OFFSET(16445, glGetColorTable, glGetColorTableEXT, glGetColorTableEXT, 343),
- NAME_FUNC_OFFSET(16464, glGetColorTable, glGetColorTableEXT, glGetColorTableEXT, 343),
- NAME_FUNC_OFFSET(16483, glGetColorTableParameterfv, glGetColorTableParameterfvEXT, glGetColorTableParameterfvEXT, 344),
- NAME_FUNC_OFFSET(16513, glGetColorTableParameterfv, glGetColorTableParameterfvEXT, glGetColorTableParameterfvEXT, 344),
- NAME_FUNC_OFFSET(16543, glGetColorTableParameteriv, glGetColorTableParameterivEXT, glGetColorTableParameterivEXT, 345),
- NAME_FUNC_OFFSET(16573, glGetColorTableParameteriv, glGetColorTableParameterivEXT, glGetColorTableParameterivEXT, 345),
- NAME_FUNC_OFFSET(16603, glColorSubTable, glColorSubTable, NULL, 346),
- NAME_FUNC_OFFSET(16622, glCopyColorSubTable, glCopyColorSubTable, NULL, 347),
- NAME_FUNC_OFFSET(16645, glConvolutionFilter1D, glConvolutionFilter1D, NULL, 348),
- NAME_FUNC_OFFSET(16670, glConvolutionFilter2D, glConvolutionFilter2D, NULL, 349),
- NAME_FUNC_OFFSET(16695, glConvolutionParameterf, glConvolutionParameterf, NULL, 350),
- NAME_FUNC_OFFSET(16722, glConvolutionParameterfv, glConvolutionParameterfv, NULL, 351),
- NAME_FUNC_OFFSET(16750, glConvolutionParameteri, glConvolutionParameteri, NULL, 352),
- NAME_FUNC_OFFSET(16777, glConvolutionParameteriv, glConvolutionParameteriv, NULL, 353),
- NAME_FUNC_OFFSET(16805, glCopyConvolutionFilter1D, glCopyConvolutionFilter1D, NULL, 354),
- NAME_FUNC_OFFSET(16834, glCopyConvolutionFilter2D, glCopyConvolutionFilter2D, NULL, 355),
- NAME_FUNC_OFFSET(16863, glGetConvolutionFilter, gl_dispatch_stub_356, gl_dispatch_stub_356, 356),
- NAME_FUNC_OFFSET(16889, glGetConvolutionParameterfv, gl_dispatch_stub_357, gl_dispatch_stub_357, 357),
- NAME_FUNC_OFFSET(16920, glGetConvolutionParameteriv, gl_dispatch_stub_358, gl_dispatch_stub_358, 358),
- NAME_FUNC_OFFSET(16951, glGetSeparableFilter, gl_dispatch_stub_359, gl_dispatch_stub_359, 359),
- NAME_FUNC_OFFSET(16975, glSeparableFilter2D, glSeparableFilter2D, NULL, 360),
- NAME_FUNC_OFFSET(16998, glGetHistogram, gl_dispatch_stub_361, gl_dispatch_stub_361, 361),
- NAME_FUNC_OFFSET(17016, glGetHistogramParameterfv, gl_dispatch_stub_362, gl_dispatch_stub_362, 362),
- NAME_FUNC_OFFSET(17045, glGetHistogramParameteriv, gl_dispatch_stub_363, gl_dispatch_stub_363, 363),
- NAME_FUNC_OFFSET(17074, glGetMinmax, gl_dispatch_stub_364, gl_dispatch_stub_364, 364),
- NAME_FUNC_OFFSET(17089, glGetMinmaxParameterfv, gl_dispatch_stub_365, gl_dispatch_stub_365, 365),
- NAME_FUNC_OFFSET(17115, glGetMinmaxParameteriv, gl_dispatch_stub_366, gl_dispatch_stub_366, 366),
- NAME_FUNC_OFFSET(17141, glHistogram, glHistogram, NULL, 367),
- NAME_FUNC_OFFSET(17156, glMinmax, glMinmax, NULL, 368),
- NAME_FUNC_OFFSET(17168, glResetHistogram, glResetHistogram, NULL, 369),
- NAME_FUNC_OFFSET(17188, glResetMinmax, glResetMinmax, NULL, 370),
- NAME_FUNC_OFFSET(17205, glTexImage3D, glTexImage3D, NULL, 371),
- NAME_FUNC_OFFSET(17221, glTexSubImage3D, glTexSubImage3D, NULL, 372),
- NAME_FUNC_OFFSET(17240, glCopyTexSubImage3D, glCopyTexSubImage3D, NULL, 373),
- NAME_FUNC_OFFSET(17263, glActiveTextureARB, glActiveTextureARB, NULL, 374),
- NAME_FUNC_OFFSET(17279, glClientActiveTextureARB, glClientActiveTextureARB, NULL, 375),
- NAME_FUNC_OFFSET(17301, glMultiTexCoord1dARB, glMultiTexCoord1dARB, NULL, 376),
- NAME_FUNC_OFFSET(17319, glMultiTexCoord1dvARB, glMultiTexCoord1dvARB, NULL, 377),
- NAME_FUNC_OFFSET(17338, glMultiTexCoord1fARB, glMultiTexCoord1fARB, NULL, 378),
- NAME_FUNC_OFFSET(17356, glMultiTexCoord1fvARB, glMultiTexCoord1fvARB, NULL, 379),
- NAME_FUNC_OFFSET(17375, glMultiTexCoord1iARB, glMultiTexCoord1iARB, NULL, 380),
- NAME_FUNC_OFFSET(17393, glMultiTexCoord1ivARB, glMultiTexCoord1ivARB, NULL, 381),
- NAME_FUNC_OFFSET(17412, glMultiTexCoord1sARB, glMultiTexCoord1sARB, NULL, 382),
- NAME_FUNC_OFFSET(17430, glMultiTexCoord1svARB, glMultiTexCoord1svARB, NULL, 383),
- NAME_FUNC_OFFSET(17449, glMultiTexCoord2dARB, glMultiTexCoord2dARB, NULL, 384),
- NAME_FUNC_OFFSET(17467, glMultiTexCoord2dvARB, glMultiTexCoord2dvARB, NULL, 385),
- NAME_FUNC_OFFSET(17486, glMultiTexCoord2fARB, glMultiTexCoord2fARB, NULL, 386),
- NAME_FUNC_OFFSET(17504, glMultiTexCoord2fvARB, glMultiTexCoord2fvARB, NULL, 387),
- NAME_FUNC_OFFSET(17523, glMultiTexCoord2iARB, glMultiTexCoord2iARB, NULL, 388),
- NAME_FUNC_OFFSET(17541, glMultiTexCoord2ivARB, glMultiTexCoord2ivARB, NULL, 389),
- NAME_FUNC_OFFSET(17560, glMultiTexCoord2sARB, glMultiTexCoord2sARB, NULL, 390),
- NAME_FUNC_OFFSET(17578, glMultiTexCoord2svARB, glMultiTexCoord2svARB, NULL, 391),
- NAME_FUNC_OFFSET(17597, glMultiTexCoord3dARB, glMultiTexCoord3dARB, NULL, 392),
- NAME_FUNC_OFFSET(17615, glMultiTexCoord3dvARB, glMultiTexCoord3dvARB, NULL, 393),
- NAME_FUNC_OFFSET(17634, glMultiTexCoord3fARB, glMultiTexCoord3fARB, NULL, 394),
- NAME_FUNC_OFFSET(17652, glMultiTexCoord3fvARB, glMultiTexCoord3fvARB, NULL, 395),
- NAME_FUNC_OFFSET(17671, glMultiTexCoord3iARB, glMultiTexCoord3iARB, NULL, 396),
- NAME_FUNC_OFFSET(17689, glMultiTexCoord3ivARB, glMultiTexCoord3ivARB, NULL, 397),
- NAME_FUNC_OFFSET(17708, glMultiTexCoord3sARB, glMultiTexCoord3sARB, NULL, 398),
- NAME_FUNC_OFFSET(17726, glMultiTexCoord3svARB, glMultiTexCoord3svARB, NULL, 399),
- NAME_FUNC_OFFSET(17745, glMultiTexCoord4dARB, glMultiTexCoord4dARB, NULL, 400),
- NAME_FUNC_OFFSET(17763, glMultiTexCoord4dvARB, glMultiTexCoord4dvARB, NULL, 401),
- NAME_FUNC_OFFSET(17782, glMultiTexCoord4fARB, glMultiTexCoord4fARB, NULL, 402),
- NAME_FUNC_OFFSET(17800, glMultiTexCoord4fvARB, glMultiTexCoord4fvARB, NULL, 403),
- NAME_FUNC_OFFSET(17819, glMultiTexCoord4iARB, glMultiTexCoord4iARB, NULL, 404),
- NAME_FUNC_OFFSET(17837, glMultiTexCoord4ivARB, glMultiTexCoord4ivARB, NULL, 405),
- NAME_FUNC_OFFSET(17856, glMultiTexCoord4sARB, glMultiTexCoord4sARB, NULL, 406),
- NAME_FUNC_OFFSET(17874, glMultiTexCoord4svARB, glMultiTexCoord4svARB, NULL, 407),
- NAME_FUNC_OFFSET(17893, glStencilOpSeparate, glStencilOpSeparate, NULL, 423),
- NAME_FUNC_OFFSET(17916, glLoadTransposeMatrixdARB, glLoadTransposeMatrixdARB, NULL, 441),
- NAME_FUNC_OFFSET(17939, glLoadTransposeMatrixfARB, glLoadTransposeMatrixfARB, NULL, 442),
- NAME_FUNC_OFFSET(17962, glMultTransposeMatrixdARB, glMultTransposeMatrixdARB, NULL, 443),
- NAME_FUNC_OFFSET(17985, glMultTransposeMatrixfARB, glMultTransposeMatrixfARB, NULL, 444),
- NAME_FUNC_OFFSET(18008, glSampleCoverageARB, glSampleCoverageARB, NULL, 445),
- NAME_FUNC_OFFSET(18025, glCompressedTexImage1DARB, glCompressedTexImage1DARB, NULL, 446),
- NAME_FUNC_OFFSET(18048, glCompressedTexImage2DARB, glCompressedTexImage2DARB, NULL, 447),
- NAME_FUNC_OFFSET(18071, glCompressedTexImage3DARB, glCompressedTexImage3DARB, NULL, 448),
- NAME_FUNC_OFFSET(18094, glCompressedTexSubImage1DARB, glCompressedTexSubImage1DARB, NULL, 449),
- NAME_FUNC_OFFSET(18120, glCompressedTexSubImage2DARB, glCompressedTexSubImage2DARB, NULL, 450),
- NAME_FUNC_OFFSET(18146, glCompressedTexSubImage3DARB, glCompressedTexSubImage3DARB, NULL, 451),
- NAME_FUNC_OFFSET(18172, glGetCompressedTexImageARB, glGetCompressedTexImageARB, NULL, 452),
- NAME_FUNC_OFFSET(18196, glDisableVertexAttribArrayARB, glDisableVertexAttribArrayARB, NULL, 453),
- NAME_FUNC_OFFSET(18223, glEnableVertexAttribArrayARB, glEnableVertexAttribArrayARB, NULL, 454),
- NAME_FUNC_OFFSET(18249, glGetVertexAttribdvARB, glGetVertexAttribdvARB, NULL, 461),
- NAME_FUNC_OFFSET(18269, glGetVertexAttribfvARB, glGetVertexAttribfvARB, NULL, 462),
- NAME_FUNC_OFFSET(18289, glGetVertexAttribivARB, glGetVertexAttribivARB, NULL, 463),
- NAME_FUNC_OFFSET(18309, glProgramEnvParameter4dARB, glProgramEnvParameter4dARB, NULL, 464),
- NAME_FUNC_OFFSET(18332, glProgramEnvParameter4dvARB, glProgramEnvParameter4dvARB, NULL, 465),
- NAME_FUNC_OFFSET(18356, glProgramEnvParameter4fARB, glProgramEnvParameter4fARB, NULL, 466),
- NAME_FUNC_OFFSET(18379, glProgramEnvParameter4fvARB, glProgramEnvParameter4fvARB, NULL, 467),
- NAME_FUNC_OFFSET(18403, glVertexAttrib1dARB, glVertexAttrib1dARB, NULL, 473),
- NAME_FUNC_OFFSET(18420, glVertexAttrib1dvARB, glVertexAttrib1dvARB, NULL, 474),
- NAME_FUNC_OFFSET(18438, glVertexAttrib1fARB, glVertexAttrib1fARB, NULL, 475),
- NAME_FUNC_OFFSET(18455, glVertexAttrib1fvARB, glVertexAttrib1fvARB, NULL, 476),
- NAME_FUNC_OFFSET(18473, glVertexAttrib1sARB, glVertexAttrib1sARB, NULL, 477),
- NAME_FUNC_OFFSET(18490, glVertexAttrib1svARB, glVertexAttrib1svARB, NULL, 478),
- NAME_FUNC_OFFSET(18508, glVertexAttrib2dARB, glVertexAttrib2dARB, NULL, 479),
- NAME_FUNC_OFFSET(18525, glVertexAttrib2dvARB, glVertexAttrib2dvARB, NULL, 480),
- NAME_FUNC_OFFSET(18543, glVertexAttrib2fARB, glVertexAttrib2fARB, NULL, 481),
- NAME_FUNC_OFFSET(18560, glVertexAttrib2fvARB, glVertexAttrib2fvARB, NULL, 482),
- NAME_FUNC_OFFSET(18578, glVertexAttrib2sARB, glVertexAttrib2sARB, NULL, 483),
- NAME_FUNC_OFFSET(18595, glVertexAttrib2svARB, glVertexAttrib2svARB, NULL, 484),
- NAME_FUNC_OFFSET(18613, glVertexAttrib3dARB, glVertexAttrib3dARB, NULL, 485),
- NAME_FUNC_OFFSET(18630, glVertexAttrib3dvARB, glVertexAttrib3dvARB, NULL, 486),
- NAME_FUNC_OFFSET(18648, glVertexAttrib3fARB, glVertexAttrib3fARB, NULL, 487),
- NAME_FUNC_OFFSET(18665, glVertexAttrib3fvARB, glVertexAttrib3fvARB, NULL, 488),
- NAME_FUNC_OFFSET(18683, glVertexAttrib3sARB, glVertexAttrib3sARB, NULL, 489),
- NAME_FUNC_OFFSET(18700, glVertexAttrib3svARB, glVertexAttrib3svARB, NULL, 490),
- NAME_FUNC_OFFSET(18718, glVertexAttrib4NbvARB, glVertexAttrib4NbvARB, NULL, 491),
- NAME_FUNC_OFFSET(18737, glVertexAttrib4NivARB, glVertexAttrib4NivARB, NULL, 492),
- NAME_FUNC_OFFSET(18756, glVertexAttrib4NsvARB, glVertexAttrib4NsvARB, NULL, 493),
- NAME_FUNC_OFFSET(18775, glVertexAttrib4NubARB, glVertexAttrib4NubARB, NULL, 494),
- NAME_FUNC_OFFSET(18794, glVertexAttrib4NubvARB, glVertexAttrib4NubvARB, NULL, 495),
- NAME_FUNC_OFFSET(18814, glVertexAttrib4NuivARB, glVertexAttrib4NuivARB, NULL, 496),
- NAME_FUNC_OFFSET(18834, glVertexAttrib4NusvARB, glVertexAttrib4NusvARB, NULL, 497),
- NAME_FUNC_OFFSET(18854, glVertexAttrib4bvARB, glVertexAttrib4bvARB, NULL, 498),
- NAME_FUNC_OFFSET(18872, glVertexAttrib4dARB, glVertexAttrib4dARB, NULL, 499),
- NAME_FUNC_OFFSET(18889, glVertexAttrib4dvARB, glVertexAttrib4dvARB, NULL, 500),
- NAME_FUNC_OFFSET(18907, glVertexAttrib4fARB, glVertexAttrib4fARB, NULL, 501),
- NAME_FUNC_OFFSET(18924, glVertexAttrib4fvARB, glVertexAttrib4fvARB, NULL, 502),
- NAME_FUNC_OFFSET(18942, glVertexAttrib4ivARB, glVertexAttrib4ivARB, NULL, 503),
- NAME_FUNC_OFFSET(18960, glVertexAttrib4sARB, glVertexAttrib4sARB, NULL, 504),
- NAME_FUNC_OFFSET(18977, glVertexAttrib4svARB, glVertexAttrib4svARB, NULL, 505),
- NAME_FUNC_OFFSET(18995, glVertexAttrib4ubvARB, glVertexAttrib4ubvARB, NULL, 506),
- NAME_FUNC_OFFSET(19014, glVertexAttrib4uivARB, glVertexAttrib4uivARB, NULL, 507),
- NAME_FUNC_OFFSET(19033, glVertexAttrib4usvARB, glVertexAttrib4usvARB, NULL, 508),
- NAME_FUNC_OFFSET(19052, glVertexAttribPointerARB, glVertexAttribPointerARB, NULL, 509),
- NAME_FUNC_OFFSET(19074, glBindBufferARB, glBindBufferARB, NULL, 510),
- NAME_FUNC_OFFSET(19087, glBufferDataARB, glBufferDataARB, NULL, 511),
- NAME_FUNC_OFFSET(19100, glBufferSubDataARB, glBufferSubDataARB, NULL, 512),
- NAME_FUNC_OFFSET(19116, glDeleteBuffersARB, glDeleteBuffersARB, NULL, 513),
- NAME_FUNC_OFFSET(19132, glGenBuffersARB, glGenBuffersARB, NULL, 514),
- NAME_FUNC_OFFSET(19145, glGetBufferParameterivARB, glGetBufferParameterivARB, NULL, 515),
- NAME_FUNC_OFFSET(19168, glGetBufferPointervARB, glGetBufferPointervARB, NULL, 516),
- NAME_FUNC_OFFSET(19188, glGetBufferSubDataARB, glGetBufferSubDataARB, NULL, 517),
- NAME_FUNC_OFFSET(19207, glIsBufferARB, glIsBufferARB, NULL, 518),
- NAME_FUNC_OFFSET(19218, glMapBufferARB, glMapBufferARB, NULL, 519),
- NAME_FUNC_OFFSET(19230, glUnmapBufferARB, glUnmapBufferARB, NULL, 520),
- NAME_FUNC_OFFSET(19244, glBeginQueryARB, glBeginQueryARB, NULL, 521),
- NAME_FUNC_OFFSET(19257, glDeleteQueriesARB, glDeleteQueriesARB, NULL, 522),
- NAME_FUNC_OFFSET(19273, glEndQueryARB, glEndQueryARB, NULL, 523),
- NAME_FUNC_OFFSET(19284, glGenQueriesARB, glGenQueriesARB, NULL, 524),
- NAME_FUNC_OFFSET(19297, glGetQueryObjectivARB, glGetQueryObjectivARB, NULL, 525),
- NAME_FUNC_OFFSET(19316, glGetQueryObjectuivARB, glGetQueryObjectuivARB, NULL, 526),
- NAME_FUNC_OFFSET(19336, glGetQueryivARB, glGetQueryivARB, NULL, 527),
- NAME_FUNC_OFFSET(19349, glIsQueryARB, glIsQueryARB, NULL, 528),
- NAME_FUNC_OFFSET(19359, glCompileShaderARB, glCompileShaderARB, NULL, 530),
- NAME_FUNC_OFFSET(19375, glGetActiveUniformARB, glGetActiveUniformARB, NULL, 535),
- NAME_FUNC_OFFSET(19394, glGetShaderSourceARB, glGetShaderSourceARB, NULL, 541),
- NAME_FUNC_OFFSET(19412, glGetUniformLocationARB, glGetUniformLocationARB, NULL, 542),
- NAME_FUNC_OFFSET(19433, glGetUniformfvARB, glGetUniformfvARB, NULL, 543),
- NAME_FUNC_OFFSET(19448, glGetUniformivARB, glGetUniformivARB, NULL, 544),
- NAME_FUNC_OFFSET(19463, glLinkProgramARB, glLinkProgramARB, NULL, 545),
- NAME_FUNC_OFFSET(19477, glShaderSourceARB, glShaderSourceARB, NULL, 546),
- NAME_FUNC_OFFSET(19492, glUniform1fARB, glUniform1fARB, NULL, 547),
- NAME_FUNC_OFFSET(19504, glUniform1fvARB, glUniform1fvARB, NULL, 548),
- NAME_FUNC_OFFSET(19517, glUniform1iARB, glUniform1iARB, NULL, 549),
- NAME_FUNC_OFFSET(19529, glUniform1ivARB, glUniform1ivARB, NULL, 550),
- NAME_FUNC_OFFSET(19542, glUniform2fARB, glUniform2fARB, NULL, 551),
- NAME_FUNC_OFFSET(19554, glUniform2fvARB, glUniform2fvARB, NULL, 552),
- NAME_FUNC_OFFSET(19567, glUniform2iARB, glUniform2iARB, NULL, 553),
- NAME_FUNC_OFFSET(19579, glUniform2ivARB, glUniform2ivARB, NULL, 554),
- NAME_FUNC_OFFSET(19592, glUniform3fARB, glUniform3fARB, NULL, 555),
- NAME_FUNC_OFFSET(19604, glUniform3fvARB, glUniform3fvARB, NULL, 556),
- NAME_FUNC_OFFSET(19617, glUniform3iARB, glUniform3iARB, NULL, 557),
- NAME_FUNC_OFFSET(19629, glUniform3ivARB, glUniform3ivARB, NULL, 558),
- NAME_FUNC_OFFSET(19642, glUniform4fARB, glUniform4fARB, NULL, 559),
- NAME_FUNC_OFFSET(19654, glUniform4fvARB, glUniform4fvARB, NULL, 560),
- NAME_FUNC_OFFSET(19667, glUniform4iARB, glUniform4iARB, NULL, 561),
- NAME_FUNC_OFFSET(19679, glUniform4ivARB, glUniform4ivARB, NULL, 562),
- NAME_FUNC_OFFSET(19692, glUniformMatrix2fvARB, glUniformMatrix2fvARB, NULL, 563),
- NAME_FUNC_OFFSET(19711, glUniformMatrix3fvARB, glUniformMatrix3fvARB, NULL, 564),
- NAME_FUNC_OFFSET(19730, glUniformMatrix4fvARB, glUniformMatrix4fvARB, NULL, 565),
- NAME_FUNC_OFFSET(19749, glUseProgramObjectARB, glUseProgramObjectARB, NULL, 566),
- NAME_FUNC_OFFSET(19762, glValidateProgramARB, glValidateProgramARB, NULL, 567),
- NAME_FUNC_OFFSET(19780, glBindAttribLocationARB, glBindAttribLocationARB, NULL, 568),
- NAME_FUNC_OFFSET(19801, glGetActiveAttribARB, glGetActiveAttribARB, NULL, 569),
- NAME_FUNC_OFFSET(19819, glGetAttribLocationARB, glGetAttribLocationARB, NULL, 570),
- NAME_FUNC_OFFSET(19839, glDrawBuffersARB, glDrawBuffersARB, NULL, 571),
- NAME_FUNC_OFFSET(19853, glDrawBuffersARB, glDrawBuffersARB, NULL, 571),
- NAME_FUNC_OFFSET(19870, glDrawArraysInstancedARB, glDrawArraysInstancedARB, NULL, 572),
- NAME_FUNC_OFFSET(19895, glDrawArraysInstancedARB, glDrawArraysInstancedARB, NULL, 572),
- NAME_FUNC_OFFSET(19917, glDrawElementsInstancedARB, glDrawElementsInstancedARB, NULL, 573),
- NAME_FUNC_OFFSET(19944, glDrawElementsInstancedARB, glDrawElementsInstancedARB, NULL, 573),
- NAME_FUNC_OFFSET(19968, glRenderbufferStorageMultisample, glRenderbufferStorageMultisample, NULL, 574),
- NAME_FUNC_OFFSET(20004, gl_dispatch_stub_607, gl_dispatch_stub_607, NULL, 607),
- NAME_FUNC_OFFSET(20020, gl_dispatch_stub_608, gl_dispatch_stub_608, NULL, 608),
- NAME_FUNC_OFFSET(20039, glPointParameterfEXT, glPointParameterfEXT, NULL, 615),
- NAME_FUNC_OFFSET(20057, glPointParameterfEXT, glPointParameterfEXT, NULL, 615),
- NAME_FUNC_OFFSET(20078, glPointParameterfEXT, glPointParameterfEXT, NULL, 615),
- NAME_FUNC_OFFSET(20100, glPointParameterfvEXT, glPointParameterfvEXT, NULL, 616),
- NAME_FUNC_OFFSET(20119, glPointParameterfvEXT, glPointParameterfvEXT, NULL, 616),
- NAME_FUNC_OFFSET(20141, glPointParameterfvEXT, glPointParameterfvEXT, NULL, 616),
- NAME_FUNC_OFFSET(20164, glSecondaryColor3bEXT, glSecondaryColor3bEXT, NULL, 619),
- NAME_FUNC_OFFSET(20183, glSecondaryColor3bvEXT, glSecondaryColor3bvEXT, NULL, 620),
- NAME_FUNC_OFFSET(20203, glSecondaryColor3dEXT, glSecondaryColor3dEXT, NULL, 621),
- NAME_FUNC_OFFSET(20222, glSecondaryColor3dvEXT, glSecondaryColor3dvEXT, NULL, 622),
- NAME_FUNC_OFFSET(20242, glSecondaryColor3fEXT, glSecondaryColor3fEXT, NULL, 623),
- NAME_FUNC_OFFSET(20261, glSecondaryColor3fvEXT, glSecondaryColor3fvEXT, NULL, 624),
- NAME_FUNC_OFFSET(20281, glSecondaryColor3iEXT, glSecondaryColor3iEXT, NULL, 625),
- NAME_FUNC_OFFSET(20300, glSecondaryColor3ivEXT, glSecondaryColor3ivEXT, NULL, 626),
- NAME_FUNC_OFFSET(20320, glSecondaryColor3sEXT, glSecondaryColor3sEXT, NULL, 627),
- NAME_FUNC_OFFSET(20339, glSecondaryColor3svEXT, glSecondaryColor3svEXT, NULL, 628),
- NAME_FUNC_OFFSET(20359, glSecondaryColor3ubEXT, glSecondaryColor3ubEXT, NULL, 629),
- NAME_FUNC_OFFSET(20379, glSecondaryColor3ubvEXT, glSecondaryColor3ubvEXT, NULL, 630),
- NAME_FUNC_OFFSET(20400, glSecondaryColor3uiEXT, glSecondaryColor3uiEXT, NULL, 631),
- NAME_FUNC_OFFSET(20420, glSecondaryColor3uivEXT, glSecondaryColor3uivEXT, NULL, 632),
- NAME_FUNC_OFFSET(20441, glSecondaryColor3usEXT, glSecondaryColor3usEXT, NULL, 633),
- NAME_FUNC_OFFSET(20461, glSecondaryColor3usvEXT, glSecondaryColor3usvEXT, NULL, 634),
- NAME_FUNC_OFFSET(20482, glSecondaryColorPointerEXT, glSecondaryColorPointerEXT, NULL, 635),
- NAME_FUNC_OFFSET(20506, glMultiDrawArraysEXT, glMultiDrawArraysEXT, NULL, 636),
- NAME_FUNC_OFFSET(20524, glMultiDrawElementsEXT, glMultiDrawElementsEXT, NULL, 637),
- NAME_FUNC_OFFSET(20544, glFogCoordPointerEXT, glFogCoordPointerEXT, NULL, 638),
- NAME_FUNC_OFFSET(20562, glFogCoorddEXT, glFogCoorddEXT, NULL, 639),
- NAME_FUNC_OFFSET(20574, glFogCoorddvEXT, glFogCoorddvEXT, NULL, 640),
- NAME_FUNC_OFFSET(20587, glFogCoordfEXT, glFogCoordfEXT, NULL, 641),
- NAME_FUNC_OFFSET(20599, glFogCoordfvEXT, glFogCoordfvEXT, NULL, 642),
- NAME_FUNC_OFFSET(20612, glBlendFuncSeparateEXT, glBlendFuncSeparateEXT, NULL, 644),
- NAME_FUNC_OFFSET(20632, glBlendFuncSeparateEXT, glBlendFuncSeparateEXT, NULL, 644),
- NAME_FUNC_OFFSET(20656, glWindowPos2dMESA, glWindowPos2dMESA, NULL, 661),
- NAME_FUNC_OFFSET(20670, glWindowPos2dMESA, glWindowPos2dMESA, NULL, 661),
- NAME_FUNC_OFFSET(20687, glWindowPos2dvMESA, glWindowPos2dvMESA, NULL, 662),
- NAME_FUNC_OFFSET(20702, glWindowPos2dvMESA, glWindowPos2dvMESA, NULL, 662),
- NAME_FUNC_OFFSET(20720, glWindowPos2fMESA, glWindowPos2fMESA, NULL, 663),
- NAME_FUNC_OFFSET(20734, glWindowPos2fMESA, glWindowPos2fMESA, NULL, 663),
- NAME_FUNC_OFFSET(20751, glWindowPos2fvMESA, glWindowPos2fvMESA, NULL, 664),
- NAME_FUNC_OFFSET(20766, glWindowPos2fvMESA, glWindowPos2fvMESA, NULL, 664),
- NAME_FUNC_OFFSET(20784, glWindowPos2iMESA, glWindowPos2iMESA, NULL, 665),
- NAME_FUNC_OFFSET(20798, glWindowPos2iMESA, glWindowPos2iMESA, NULL, 665),
- NAME_FUNC_OFFSET(20815, glWindowPos2ivMESA, glWindowPos2ivMESA, NULL, 666),
- NAME_FUNC_OFFSET(20830, glWindowPos2ivMESA, glWindowPos2ivMESA, NULL, 666),
- NAME_FUNC_OFFSET(20848, glWindowPos2sMESA, glWindowPos2sMESA, NULL, 667),
- NAME_FUNC_OFFSET(20862, glWindowPos2sMESA, glWindowPos2sMESA, NULL, 667),
- NAME_FUNC_OFFSET(20879, glWindowPos2svMESA, glWindowPos2svMESA, NULL, 668),
- NAME_FUNC_OFFSET(20894, glWindowPos2svMESA, glWindowPos2svMESA, NULL, 668),
- NAME_FUNC_OFFSET(20912, glWindowPos3dMESA, glWindowPos3dMESA, NULL, 669),
- NAME_FUNC_OFFSET(20926, glWindowPos3dMESA, glWindowPos3dMESA, NULL, 669),
- NAME_FUNC_OFFSET(20943, glWindowPos3dvMESA, glWindowPos3dvMESA, NULL, 670),
- NAME_FUNC_OFFSET(20958, glWindowPos3dvMESA, glWindowPos3dvMESA, NULL, 670),
- NAME_FUNC_OFFSET(20976, glWindowPos3fMESA, glWindowPos3fMESA, NULL, 671),
- NAME_FUNC_OFFSET(20990, glWindowPos3fMESA, glWindowPos3fMESA, NULL, 671),
- NAME_FUNC_OFFSET(21007, glWindowPos3fvMESA, glWindowPos3fvMESA, NULL, 672),
- NAME_FUNC_OFFSET(21022, glWindowPos3fvMESA, glWindowPos3fvMESA, NULL, 672),
- NAME_FUNC_OFFSET(21040, glWindowPos3iMESA, glWindowPos3iMESA, NULL, 673),
- NAME_FUNC_OFFSET(21054, glWindowPos3iMESA, glWindowPos3iMESA, NULL, 673),
- NAME_FUNC_OFFSET(21071, glWindowPos3ivMESA, glWindowPos3ivMESA, NULL, 674),
- NAME_FUNC_OFFSET(21086, glWindowPos3ivMESA, glWindowPos3ivMESA, NULL, 674),
- NAME_FUNC_OFFSET(21104, glWindowPos3sMESA, glWindowPos3sMESA, NULL, 675),
- NAME_FUNC_OFFSET(21118, glWindowPos3sMESA, glWindowPos3sMESA, NULL, 675),
- NAME_FUNC_OFFSET(21135, glWindowPos3svMESA, glWindowPos3svMESA, NULL, 676),
- NAME_FUNC_OFFSET(21150, glWindowPos3svMESA, glWindowPos3svMESA, NULL, 676),
- NAME_FUNC_OFFSET(21168, glBindProgramNV, glBindProgramNV, NULL, 695),
- NAME_FUNC_OFFSET(21185, glDeleteProgramsNV, glDeleteProgramsNV, NULL, 696),
- NAME_FUNC_OFFSET(21205, glGenProgramsNV, glGenProgramsNV, NULL, 698),
- NAME_FUNC_OFFSET(21222, glGetVertexAttribPointervNV, glGetVertexAttribPointervNV, NULL, 704),
- NAME_FUNC_OFFSET(21248, glGetVertexAttribPointervNV, glGetVertexAttribPointervNV, NULL, 704),
- NAME_FUNC_OFFSET(21277, glIsProgramNV, glIsProgramNV, NULL, 708),
- NAME_FUNC_OFFSET(21292, glPointParameteriNV, glPointParameteriNV, NULL, 772),
- NAME_FUNC_OFFSET(21310, glPointParameterivNV, glPointParameterivNV, NULL, 773),
- NAME_FUNC_OFFSET(21329, gl_dispatch_stub_776, gl_dispatch_stub_776, NULL, 776),
- NAME_FUNC_OFFSET(21350, gl_dispatch_stub_778, gl_dispatch_stub_778, NULL, 778),
- NAME_FUNC_OFFSET(21366, glPrimitiveRestartIndexNV, glPrimitiveRestartIndexNV, NULL, 785),
- NAME_FUNC_OFFSET(21390, gl_dispatch_stub_788, gl_dispatch_stub_788, NULL, 788),
- NAME_FUNC_OFFSET(21414, gl_dispatch_stub_788, gl_dispatch_stub_788, NULL, 788),
- NAME_FUNC_OFFSET(21441, glBindFramebufferEXT, glBindFramebufferEXT, NULL, 789),
- NAME_FUNC_OFFSET(21459, glBindRenderbufferEXT, glBindRenderbufferEXT, NULL, 790),
- NAME_FUNC_OFFSET(21478, glCheckFramebufferStatusEXT, glCheckFramebufferStatusEXT, NULL, 791),
- NAME_FUNC_OFFSET(21503, glDeleteFramebuffersEXT, glDeleteFramebuffersEXT, NULL, 792),
- NAME_FUNC_OFFSET(21524, glDeleteRenderbuffersEXT, glDeleteRenderbuffersEXT, NULL, 793),
- NAME_FUNC_OFFSET(21546, glFramebufferRenderbufferEXT, glFramebufferRenderbufferEXT, NULL, 794),
- NAME_FUNC_OFFSET(21572, glFramebufferTexture1DEXT, glFramebufferTexture1DEXT, NULL, 795),
- NAME_FUNC_OFFSET(21595, glFramebufferTexture2DEXT, glFramebufferTexture2DEXT, NULL, 796),
- NAME_FUNC_OFFSET(21618, glFramebufferTexture3DEXT, glFramebufferTexture3DEXT, NULL, 797),
- NAME_FUNC_OFFSET(21641, glGenFramebuffersEXT, glGenFramebuffersEXT, NULL, 798),
- NAME_FUNC_OFFSET(21659, glGenRenderbuffersEXT, glGenRenderbuffersEXT, NULL, 799),
- NAME_FUNC_OFFSET(21678, glGenerateMipmapEXT, glGenerateMipmapEXT, NULL, 800),
- NAME_FUNC_OFFSET(21695, glGetFramebufferAttachmentParameterivEXT, glGetFramebufferAttachmentParameterivEXT, NULL, 801),
- NAME_FUNC_OFFSET(21733, glGetRenderbufferParameterivEXT, glGetRenderbufferParameterivEXT, NULL, 802),
- NAME_FUNC_OFFSET(21762, glIsFramebufferEXT, glIsFramebufferEXT, NULL, 803),
- NAME_FUNC_OFFSET(21778, glIsRenderbufferEXT, glIsRenderbufferEXT, NULL, 804),
- NAME_FUNC_OFFSET(21795, glRenderbufferStorageEXT, glRenderbufferStorageEXT, NULL, 805),
- NAME_FUNC_OFFSET(21817, gl_dispatch_stub_806, gl_dispatch_stub_806, NULL, 806),
- NAME_FUNC_OFFSET(21835, glBindFragDataLocationEXT, glBindFragDataLocationEXT, NULL, 809),
- NAME_FUNC_OFFSET(21858, glGetFragDataLocationEXT, glGetFragDataLocationEXT, NULL, 810),
- NAME_FUNC_OFFSET(21880, glGetUniformuivEXT, glGetUniformuivEXT, NULL, 811),
- NAME_FUNC_OFFSET(21896, glGetVertexAttribIivEXT, glGetVertexAttribIivEXT, NULL, 812),
- NAME_FUNC_OFFSET(21917, glGetVertexAttribIuivEXT, glGetVertexAttribIuivEXT, NULL, 813),
- NAME_FUNC_OFFSET(21939, glUniform1uiEXT, glUniform1uiEXT, NULL, 814),
- NAME_FUNC_OFFSET(21952, glUniform1uivEXT, glUniform1uivEXT, NULL, 815),
- NAME_FUNC_OFFSET(21966, glUniform2uiEXT, glUniform2uiEXT, NULL, 816),
- NAME_FUNC_OFFSET(21979, glUniform2uivEXT, glUniform2uivEXT, NULL, 817),
- NAME_FUNC_OFFSET(21993, glUniform3uiEXT, glUniform3uiEXT, NULL, 818),
- NAME_FUNC_OFFSET(22006, glUniform3uivEXT, glUniform3uivEXT, NULL, 819),
- NAME_FUNC_OFFSET(22020, glUniform4uiEXT, glUniform4uiEXT, NULL, 820),
- NAME_FUNC_OFFSET(22033, glUniform4uivEXT, glUniform4uivEXT, NULL, 821),
- NAME_FUNC_OFFSET(22047, glVertexAttribI1iEXT, glVertexAttribI1iEXT, NULL, 822),
- NAME_FUNC_OFFSET(22065, glVertexAttribI1ivEXT, glVertexAttribI1ivEXT, NULL, 823),
- NAME_FUNC_OFFSET(22084, glVertexAttribI1uiEXT, glVertexAttribI1uiEXT, NULL, 824),
- NAME_FUNC_OFFSET(22103, glVertexAttribI1uivEXT, glVertexAttribI1uivEXT, NULL, 825),
- NAME_FUNC_OFFSET(22123, glVertexAttribI2iEXT, glVertexAttribI2iEXT, NULL, 826),
- NAME_FUNC_OFFSET(22141, glVertexAttribI2ivEXT, glVertexAttribI2ivEXT, NULL, 827),
- NAME_FUNC_OFFSET(22160, glVertexAttribI2uiEXT, glVertexAttribI2uiEXT, NULL, 828),
- NAME_FUNC_OFFSET(22179, glVertexAttribI2uivEXT, glVertexAttribI2uivEXT, NULL, 829),
- NAME_FUNC_OFFSET(22199, glVertexAttribI3iEXT, glVertexAttribI3iEXT, NULL, 830),
- NAME_FUNC_OFFSET(22217, glVertexAttribI3ivEXT, glVertexAttribI3ivEXT, NULL, 831),
- NAME_FUNC_OFFSET(22236, glVertexAttribI3uiEXT, glVertexAttribI3uiEXT, NULL, 832),
- NAME_FUNC_OFFSET(22255, glVertexAttribI3uivEXT, glVertexAttribI3uivEXT, NULL, 833),
- NAME_FUNC_OFFSET(22275, glVertexAttribI4bvEXT, glVertexAttribI4bvEXT, NULL, 834),
- NAME_FUNC_OFFSET(22294, glVertexAttribI4iEXT, glVertexAttribI4iEXT, NULL, 835),
- NAME_FUNC_OFFSET(22312, glVertexAttribI4ivEXT, glVertexAttribI4ivEXT, NULL, 836),
- NAME_FUNC_OFFSET(22331, glVertexAttribI4svEXT, glVertexAttribI4svEXT, NULL, 837),
- NAME_FUNC_OFFSET(22350, glVertexAttribI4ubvEXT, glVertexAttribI4ubvEXT, NULL, 838),
- NAME_FUNC_OFFSET(22370, glVertexAttribI4uiEXT, glVertexAttribI4uiEXT, NULL, 839),
- NAME_FUNC_OFFSET(22389, glVertexAttribI4uivEXT, glVertexAttribI4uivEXT, NULL, 840),
- NAME_FUNC_OFFSET(22409, glVertexAttribI4usvEXT, glVertexAttribI4usvEXT, NULL, 841),
- NAME_FUNC_OFFSET(22429, glVertexAttribIPointerEXT, glVertexAttribIPointerEXT, NULL, 842),
- NAME_FUNC_OFFSET(22452, glFramebufferTextureLayerEXT, glFramebufferTextureLayerEXT, NULL, 843),
- NAME_FUNC_OFFSET(22478, glColorMaskIndexedEXT, glColorMaskIndexedEXT, NULL, 844),
- NAME_FUNC_OFFSET(22491, glDisableIndexedEXT, glDisableIndexedEXT, NULL, 845),
- NAME_FUNC_OFFSET(22502, glEnableIndexedEXT, glEnableIndexedEXT, NULL, 846),
- NAME_FUNC_OFFSET(22512, glGetBooleanIndexedvEXT, glGetBooleanIndexedvEXT, NULL, 847),
- NAME_FUNC_OFFSET(22528, glGetIntegerIndexedvEXT, glGetIntegerIndexedvEXT, NULL, 848),
- NAME_FUNC_OFFSET(22544, glIsEnabledIndexedEXT, glIsEnabledIndexedEXT, NULL, 849),
- NAME_FUNC_OFFSET(22557, glGetTexParameterIivEXT, glGetTexParameterIivEXT, NULL, 852),
- NAME_FUNC_OFFSET(22578, glGetTexParameterIuivEXT, glGetTexParameterIuivEXT, NULL, 853),
- NAME_FUNC_OFFSET(22600, glTexParameterIivEXT, glTexParameterIivEXT, NULL, 854),
- NAME_FUNC_OFFSET(22618, glTexParameterIuivEXT, glTexParameterIuivEXT, NULL, 855),
- NAME_FUNC_OFFSET(22637, glBeginConditionalRenderNV, glBeginConditionalRenderNV, NULL, 856),
- NAME_FUNC_OFFSET(22662, glEndConditionalRenderNV, glEndConditionalRenderNV, NULL, 857),
- NAME_FUNC_OFFSET(22685, glBeginTransformFeedbackEXT, glBeginTransformFeedbackEXT, NULL, 858),
- NAME_FUNC_OFFSET(22710, glBindBufferBaseEXT, glBindBufferBaseEXT, NULL, 859),
- NAME_FUNC_OFFSET(22727, glBindBufferRangeEXT, glBindBufferRangeEXT, NULL, 861),
- NAME_FUNC_OFFSET(22745, glEndTransformFeedbackEXT, glEndTransformFeedbackEXT, NULL, 862),
- NAME_FUNC_OFFSET(22768, glGetTransformFeedbackVaryingEXT, glGetTransformFeedbackVaryingEXT, NULL, 863),
- NAME_FUNC_OFFSET(22798, glTransformFeedbackVaryingsEXT, glTransformFeedbackVaryingsEXT, NULL, 864),
- NAME_FUNC_OFFSET(22826, glProvokingVertexEXT, glProvokingVertexEXT, NULL, 865),
+ NAME_FUNC_OFFSET( 9300, glVertexAttribDivisorARB, glVertexAttribDivisorARB, NULL, 578),
+ NAME_FUNC_OFFSET( 9325, glFlushMappedBufferRange, glFlushMappedBufferRange, NULL, 579),
+ NAME_FUNC_OFFSET( 9350, glMapBufferRange, glMapBufferRange, NULL, 580),
+ NAME_FUNC_OFFSET( 9367, glBindVertexArray, glBindVertexArray, NULL, 581),
+ NAME_FUNC_OFFSET( 9385, glGenVertexArrays, glGenVertexArrays, NULL, 582),
+ NAME_FUNC_OFFSET( 9403, glCopyBufferSubData, glCopyBufferSubData, NULL, 583),
+ NAME_FUNC_OFFSET( 9423, glClientWaitSync, glClientWaitSync, NULL, 584),
+ NAME_FUNC_OFFSET( 9440, glDeleteSync, glDeleteSync, NULL, 585),
+ NAME_FUNC_OFFSET( 9453, glFenceSync, glFenceSync, NULL, 586),
+ NAME_FUNC_OFFSET( 9465, glGetInteger64v, glGetInteger64v, NULL, 587),
+ NAME_FUNC_OFFSET( 9481, glGetSynciv, glGetSynciv, NULL, 588),
+ NAME_FUNC_OFFSET( 9493, glIsSync, glIsSync, NULL, 589),
+ NAME_FUNC_OFFSET( 9502, glWaitSync, glWaitSync, NULL, 590),
+ NAME_FUNC_OFFSET( 9513, glDrawElementsBaseVertex, glDrawElementsBaseVertex, NULL, 591),
+ NAME_FUNC_OFFSET( 9538, glDrawRangeElementsBaseVertex, glDrawRangeElementsBaseVertex, NULL, 592),
+ NAME_FUNC_OFFSET( 9568, glMultiDrawElementsBaseVertex, glMultiDrawElementsBaseVertex, NULL, 593),
+ NAME_FUNC_OFFSET( 9598, glBlendEquationSeparateiARB, glBlendEquationSeparateiARB, NULL, 594),
+ NAME_FUNC_OFFSET( 9626, glBlendEquationiARB, glBlendEquationiARB, NULL, 595),
+ NAME_FUNC_OFFSET( 9646, glBlendFuncSeparateiARB, glBlendFuncSeparateiARB, NULL, 596),
+ NAME_FUNC_OFFSET( 9670, glBlendFunciARB, glBlendFunciARB, NULL, 597),
+ NAME_FUNC_OFFSET( 9686, glBindTransformFeedback, glBindTransformFeedback, NULL, 598),
+ NAME_FUNC_OFFSET( 9710, glDeleteTransformFeedbacks, glDeleteTransformFeedbacks, NULL, 599),
+ NAME_FUNC_OFFSET( 9737, glDrawTransformFeedback, glDrawTransformFeedback, NULL, 600),
+ NAME_FUNC_OFFSET( 9761, glGenTransformFeedbacks, glGenTransformFeedbacks, NULL, 601),
+ NAME_FUNC_OFFSET( 9785, glIsTransformFeedback, glIsTransformFeedback, NULL, 602),
+ NAME_FUNC_OFFSET( 9807, glPauseTransformFeedback, glPauseTransformFeedback, NULL, 603),
+ NAME_FUNC_OFFSET( 9832, glResumeTransformFeedback, glResumeTransformFeedback, NULL, 604),
+ NAME_FUNC_OFFSET( 9858, glClearDepthf, glClearDepthf, NULL, 605),
+ NAME_FUNC_OFFSET( 9872, glDepthRangef, glDepthRangef, NULL, 606),
+ NAME_FUNC_OFFSET( 9886, glGetShaderPrecisionFormat, glGetShaderPrecisionFormat, NULL, 607),
+ NAME_FUNC_OFFSET( 9913, glReleaseShaderCompiler, glReleaseShaderCompiler, NULL, 608),
+ NAME_FUNC_OFFSET( 9937, glShaderBinary, glShaderBinary, NULL, 609),
+ NAME_FUNC_OFFSET( 9952, glPolygonOffsetEXT, glPolygonOffsetEXT, NULL, 610),
+ NAME_FUNC_OFFSET( 9971, gl_dispatch_stub_611, gl_dispatch_stub_611, NULL, 611),
+ NAME_FUNC_OFFSET(10003, gl_dispatch_stub_612, gl_dispatch_stub_612, NULL, 612),
+ NAME_FUNC_OFFSET(10035, gl_dispatch_stub_613, gl_dispatch_stub_613, NULL, 613),
+ NAME_FUNC_OFFSET(10063, gl_dispatch_stub_614, gl_dispatch_stub_614, NULL, 614),
+ NAME_FUNC_OFFSET(10092, gl_dispatch_stub_615, gl_dispatch_stub_615, NULL, 615),
+ NAME_FUNC_OFFSET(10120, gl_dispatch_stub_616, gl_dispatch_stub_616, NULL, 616),
+ NAME_FUNC_OFFSET(10149, gl_dispatch_stub_617, gl_dispatch_stub_617, NULL, 617),
+ NAME_FUNC_OFFSET(10166, gl_dispatch_stub_618, gl_dispatch_stub_618, NULL, 618),
+ NAME_FUNC_OFFSET(10186, glColorPointerEXT, glColorPointerEXT, NULL, 619),
+ NAME_FUNC_OFFSET(10204, glEdgeFlagPointerEXT, glEdgeFlagPointerEXT, NULL, 620),
+ NAME_FUNC_OFFSET(10225, glIndexPointerEXT, glIndexPointerEXT, NULL, 621),
+ NAME_FUNC_OFFSET(10243, glNormalPointerEXT, glNormalPointerEXT, NULL, 622),
+ NAME_FUNC_OFFSET(10262, glTexCoordPointerEXT, glTexCoordPointerEXT, NULL, 623),
+ NAME_FUNC_OFFSET(10283, glVertexPointerEXT, glVertexPointerEXT, NULL, 624),
+ NAME_FUNC_OFFSET(10302, glPointParameterfEXT, glPointParameterfEXT, NULL, 625),
+ NAME_FUNC_OFFSET(10323, glPointParameterfvEXT, glPointParameterfvEXT, NULL, 626),
+ NAME_FUNC_OFFSET(10345, glLockArraysEXT, glLockArraysEXT, NULL, 627),
+ NAME_FUNC_OFFSET(10361, glUnlockArraysEXT, glUnlockArraysEXT, NULL, 628),
+ NAME_FUNC_OFFSET(10379, glSecondaryColor3bEXT, glSecondaryColor3bEXT, NULL, 629),
+ NAME_FUNC_OFFSET(10401, glSecondaryColor3bvEXT, glSecondaryColor3bvEXT, NULL, 630),
+ NAME_FUNC_OFFSET(10424, glSecondaryColor3dEXT, glSecondaryColor3dEXT, NULL, 631),
+ NAME_FUNC_OFFSET(10446, glSecondaryColor3dvEXT, glSecondaryColor3dvEXT, NULL, 632),
+ NAME_FUNC_OFFSET(10469, glSecondaryColor3fEXT, glSecondaryColor3fEXT, NULL, 633),
+ NAME_FUNC_OFFSET(10491, glSecondaryColor3fvEXT, glSecondaryColor3fvEXT, NULL, 634),
+ NAME_FUNC_OFFSET(10514, glSecondaryColor3iEXT, glSecondaryColor3iEXT, NULL, 635),
+ NAME_FUNC_OFFSET(10536, glSecondaryColor3ivEXT, glSecondaryColor3ivEXT, NULL, 636),
+ NAME_FUNC_OFFSET(10559, glSecondaryColor3sEXT, glSecondaryColor3sEXT, NULL, 637),
+ NAME_FUNC_OFFSET(10581, glSecondaryColor3svEXT, glSecondaryColor3svEXT, NULL, 638),
+ NAME_FUNC_OFFSET(10604, glSecondaryColor3ubEXT, glSecondaryColor3ubEXT, NULL, 639),
+ NAME_FUNC_OFFSET(10627, glSecondaryColor3ubvEXT, glSecondaryColor3ubvEXT, NULL, 640),
+ NAME_FUNC_OFFSET(10651, glSecondaryColor3uiEXT, glSecondaryColor3uiEXT, NULL, 641),
+ NAME_FUNC_OFFSET(10674, glSecondaryColor3uivEXT, glSecondaryColor3uivEXT, NULL, 642),
+ NAME_FUNC_OFFSET(10698, glSecondaryColor3usEXT, glSecondaryColor3usEXT, NULL, 643),
+ NAME_FUNC_OFFSET(10721, glSecondaryColor3usvEXT, glSecondaryColor3usvEXT, NULL, 644),
+ NAME_FUNC_OFFSET(10745, glSecondaryColorPointerEXT, glSecondaryColorPointerEXT, NULL, 645),
+ NAME_FUNC_OFFSET(10772, glMultiDrawArraysEXT, glMultiDrawArraysEXT, NULL, 646),
+ NAME_FUNC_OFFSET(10793, glMultiDrawElementsEXT, glMultiDrawElementsEXT, NULL, 647),
+ NAME_FUNC_OFFSET(10816, glFogCoordPointerEXT, glFogCoordPointerEXT, NULL, 648),
+ NAME_FUNC_OFFSET(10837, glFogCoorddEXT, glFogCoorddEXT, NULL, 649),
+ NAME_FUNC_OFFSET(10852, glFogCoorddvEXT, glFogCoorddvEXT, NULL, 650),
+ NAME_FUNC_OFFSET(10868, glFogCoordfEXT, glFogCoordfEXT, NULL, 651),
+ NAME_FUNC_OFFSET(10883, glFogCoordfvEXT, glFogCoordfvEXT, NULL, 652),
+ NAME_FUNC_OFFSET(10899, gl_dispatch_stub_653, gl_dispatch_stub_653, NULL, 653),
+ NAME_FUNC_OFFSET(10917, glBlendFuncSeparateEXT, glBlendFuncSeparateEXT, NULL, 654),
+ NAME_FUNC_OFFSET(10940, glFlushVertexArrayRangeNV, glFlushVertexArrayRangeNV, NULL, 655),
+ NAME_FUNC_OFFSET(10966, glVertexArrayRangeNV, glVertexArrayRangeNV, NULL, 656),
+ NAME_FUNC_OFFSET(10987, glCombinerInputNV, glCombinerInputNV, NULL, 657),
+ NAME_FUNC_OFFSET(11005, glCombinerOutputNV, glCombinerOutputNV, NULL, 658),
+ NAME_FUNC_OFFSET(11024, glCombinerParameterfNV, glCombinerParameterfNV, NULL, 659),
+ NAME_FUNC_OFFSET(11047, glCombinerParameterfvNV, glCombinerParameterfvNV, NULL, 660),
+ NAME_FUNC_OFFSET(11071, glCombinerParameteriNV, glCombinerParameteriNV, NULL, 661),
+ NAME_FUNC_OFFSET(11094, glCombinerParameterivNV, glCombinerParameterivNV, NULL, 662),
+ NAME_FUNC_OFFSET(11118, glFinalCombinerInputNV, glFinalCombinerInputNV, NULL, 663),
+ NAME_FUNC_OFFSET(11141, glGetCombinerInputParameterfvNV, glGetCombinerInputParameterfvNV, NULL, 664),
+ NAME_FUNC_OFFSET(11173, glGetCombinerInputParameterivNV, glGetCombinerInputParameterivNV, NULL, 665),
+ NAME_FUNC_OFFSET(11205, glGetCombinerOutputParameterfvNV, glGetCombinerOutputParameterfvNV, NULL, 666),
+ NAME_FUNC_OFFSET(11238, glGetCombinerOutputParameterivNV, glGetCombinerOutputParameterivNV, NULL, 667),
+ NAME_FUNC_OFFSET(11271, glGetFinalCombinerInputParameterfvNV, glGetFinalCombinerInputParameterfvNV, NULL, 668),
+ NAME_FUNC_OFFSET(11308, glGetFinalCombinerInputParameterivNV, glGetFinalCombinerInputParameterivNV, NULL, 669),
+ NAME_FUNC_OFFSET(11345, glResizeBuffersMESA, glResizeBuffersMESA, NULL, 670),
+ NAME_FUNC_OFFSET(11365, glWindowPos2dMESA, glWindowPos2dMESA, NULL, 671),
+ NAME_FUNC_OFFSET(11383, glWindowPos2dvMESA, glWindowPos2dvMESA, NULL, 672),
+ NAME_FUNC_OFFSET(11402, glWindowPos2fMESA, glWindowPos2fMESA, NULL, 673),
+ NAME_FUNC_OFFSET(11420, glWindowPos2fvMESA, glWindowPos2fvMESA, NULL, 674),
+ NAME_FUNC_OFFSET(11439, glWindowPos2iMESA, glWindowPos2iMESA, NULL, 675),
+ NAME_FUNC_OFFSET(11457, glWindowPos2ivMESA, glWindowPos2ivMESA, NULL, 676),
+ NAME_FUNC_OFFSET(11476, glWindowPos2sMESA, glWindowPos2sMESA, NULL, 677),
+ NAME_FUNC_OFFSET(11494, glWindowPos2svMESA, glWindowPos2svMESA, NULL, 678),
+ NAME_FUNC_OFFSET(11513, glWindowPos3dMESA, glWindowPos3dMESA, NULL, 679),
+ NAME_FUNC_OFFSET(11531, glWindowPos3dvMESA, glWindowPos3dvMESA, NULL, 680),
+ NAME_FUNC_OFFSET(11550, glWindowPos3fMESA, glWindowPos3fMESA, NULL, 681),
+ NAME_FUNC_OFFSET(11568, glWindowPos3fvMESA, glWindowPos3fvMESA, NULL, 682),
+ NAME_FUNC_OFFSET(11587, glWindowPos3iMESA, glWindowPos3iMESA, NULL, 683),
+ NAME_FUNC_OFFSET(11605, glWindowPos3ivMESA, glWindowPos3ivMESA, NULL, 684),
+ NAME_FUNC_OFFSET(11624, glWindowPos3sMESA, glWindowPos3sMESA, NULL, 685),
+ NAME_FUNC_OFFSET(11642, glWindowPos3svMESA, glWindowPos3svMESA, NULL, 686),
+ NAME_FUNC_OFFSET(11661, glWindowPos4dMESA, glWindowPos4dMESA, NULL, 687),
+ NAME_FUNC_OFFSET(11679, glWindowPos4dvMESA, glWindowPos4dvMESA, NULL, 688),
+ NAME_FUNC_OFFSET(11698, glWindowPos4fMESA, glWindowPos4fMESA, NULL, 689),
+ NAME_FUNC_OFFSET(11716, glWindowPos4fvMESA, glWindowPos4fvMESA, NULL, 690),
+ NAME_FUNC_OFFSET(11735, glWindowPos4iMESA, glWindowPos4iMESA, NULL, 691),
+ NAME_FUNC_OFFSET(11753, glWindowPos4ivMESA, glWindowPos4ivMESA, NULL, 692),
+ NAME_FUNC_OFFSET(11772, glWindowPos4sMESA, glWindowPos4sMESA, NULL, 693),
+ NAME_FUNC_OFFSET(11790, glWindowPos4svMESA, glWindowPos4svMESA, NULL, 694),
+ NAME_FUNC_OFFSET(11809, gl_dispatch_stub_695, gl_dispatch_stub_695, NULL, 695),
+ NAME_FUNC_OFFSET(11834, gl_dispatch_stub_696, gl_dispatch_stub_696, NULL, 696),
+ NAME_FUNC_OFFSET(11861, gl_dispatch_stub_697, gl_dispatch_stub_697, NULL, 697),
+ NAME_FUNC_OFFSET(11878, gl_dispatch_stub_698, gl_dispatch_stub_698, NULL, 698),
+ NAME_FUNC_OFFSET(11894, gl_dispatch_stub_699, gl_dispatch_stub_699, NULL, 699),
+ NAME_FUNC_OFFSET(11908, gl_dispatch_stub_700, gl_dispatch_stub_700, NULL, 700),
+ NAME_FUNC_OFFSET(11923, gl_dispatch_stub_701, gl_dispatch_stub_701, NULL, 701),
+ NAME_FUNC_OFFSET(11935, gl_dispatch_stub_702, gl_dispatch_stub_702, NULL, 702),
+ NAME_FUNC_OFFSET(11948, gl_dispatch_stub_703, gl_dispatch_stub_703, NULL, 703),
+ NAME_FUNC_OFFSET(11962, glAreProgramsResidentNV, glAreProgramsResidentNV, NULL, 704),
+ NAME_FUNC_OFFSET(11986, glBindProgramNV, glBindProgramNV, NULL, 705),
+ NAME_FUNC_OFFSET(12002, glDeleteProgramsNV, glDeleteProgramsNV, NULL, 706),
+ NAME_FUNC_OFFSET(12021, glExecuteProgramNV, glExecuteProgramNV, NULL, 707),
+ NAME_FUNC_OFFSET(12040, glGenProgramsNV, glGenProgramsNV, NULL, 708),
+ NAME_FUNC_OFFSET(12056, glGetProgramParameterdvNV, glGetProgramParameterdvNV, NULL, 709),
+ NAME_FUNC_OFFSET(12082, glGetProgramParameterfvNV, glGetProgramParameterfvNV, NULL, 710),
+ NAME_FUNC_OFFSET(12108, glGetProgramStringNV, glGetProgramStringNV, NULL, 711),
+ NAME_FUNC_OFFSET(12129, glGetProgramivNV, glGetProgramivNV, NULL, 712),
+ NAME_FUNC_OFFSET(12146, glGetTrackMatrixivNV, glGetTrackMatrixivNV, NULL, 713),
+ NAME_FUNC_OFFSET(12167, glGetVertexAttribPointervNV, glGetVertexAttribPointervNV, NULL, 714),
+ NAME_FUNC_OFFSET(12195, glGetVertexAttribdvNV, glGetVertexAttribdvNV, NULL, 715),
+ NAME_FUNC_OFFSET(12217, glGetVertexAttribfvNV, glGetVertexAttribfvNV, NULL, 716),
+ NAME_FUNC_OFFSET(12239, glGetVertexAttribivNV, glGetVertexAttribivNV, NULL, 717),
+ NAME_FUNC_OFFSET(12261, glIsProgramNV, glIsProgramNV, NULL, 718),
+ NAME_FUNC_OFFSET(12275, glLoadProgramNV, glLoadProgramNV, NULL, 719),
+ NAME_FUNC_OFFSET(12291, glProgramParameters4dvNV, glProgramParameters4dvNV, NULL, 720),
+ NAME_FUNC_OFFSET(12316, glProgramParameters4fvNV, glProgramParameters4fvNV, NULL, 721),
+ NAME_FUNC_OFFSET(12341, glRequestResidentProgramsNV, glRequestResidentProgramsNV, NULL, 722),
+ NAME_FUNC_OFFSET(12369, glTrackMatrixNV, glTrackMatrixNV, NULL, 723),
+ NAME_FUNC_OFFSET(12385, glVertexAttrib1dNV, glVertexAttrib1dNV, NULL, 724),
+ NAME_FUNC_OFFSET(12404, glVertexAttrib1dvNV, glVertexAttrib1dvNV, NULL, 725),
+ NAME_FUNC_OFFSET(12424, glVertexAttrib1fNV, glVertexAttrib1fNV, NULL, 726),
+ NAME_FUNC_OFFSET(12443, glVertexAttrib1fvNV, glVertexAttrib1fvNV, NULL, 727),
+ NAME_FUNC_OFFSET(12463, glVertexAttrib1sNV, glVertexAttrib1sNV, NULL, 728),
+ NAME_FUNC_OFFSET(12482, glVertexAttrib1svNV, glVertexAttrib1svNV, NULL, 729),
+ NAME_FUNC_OFFSET(12502, glVertexAttrib2dNV, glVertexAttrib2dNV, NULL, 730),
+ NAME_FUNC_OFFSET(12521, glVertexAttrib2dvNV, glVertexAttrib2dvNV, NULL, 731),
+ NAME_FUNC_OFFSET(12541, glVertexAttrib2fNV, glVertexAttrib2fNV, NULL, 732),
+ NAME_FUNC_OFFSET(12560, glVertexAttrib2fvNV, glVertexAttrib2fvNV, NULL, 733),
+ NAME_FUNC_OFFSET(12580, glVertexAttrib2sNV, glVertexAttrib2sNV, NULL, 734),
+ NAME_FUNC_OFFSET(12599, glVertexAttrib2svNV, glVertexAttrib2svNV, NULL, 735),
+ NAME_FUNC_OFFSET(12619, glVertexAttrib3dNV, glVertexAttrib3dNV, NULL, 736),
+ NAME_FUNC_OFFSET(12638, glVertexAttrib3dvNV, glVertexAttrib3dvNV, NULL, 737),
+ NAME_FUNC_OFFSET(12658, glVertexAttrib3fNV, glVertexAttrib3fNV, NULL, 738),
+ NAME_FUNC_OFFSET(12677, glVertexAttrib3fvNV, glVertexAttrib3fvNV, NULL, 739),
+ NAME_FUNC_OFFSET(12697, glVertexAttrib3sNV, glVertexAttrib3sNV, NULL, 740),
+ NAME_FUNC_OFFSET(12716, glVertexAttrib3svNV, glVertexAttrib3svNV, NULL, 741),
+ NAME_FUNC_OFFSET(12736, glVertexAttrib4dNV, glVertexAttrib4dNV, NULL, 742),
+ NAME_FUNC_OFFSET(12755, glVertexAttrib4dvNV, glVertexAttrib4dvNV, NULL, 743),
+ NAME_FUNC_OFFSET(12775, glVertexAttrib4fNV, glVertexAttrib4fNV, NULL, 744),
+ NAME_FUNC_OFFSET(12794, glVertexAttrib4fvNV, glVertexAttrib4fvNV, NULL, 745),
+ NAME_FUNC_OFFSET(12814, glVertexAttrib4sNV, glVertexAttrib4sNV, NULL, 746),
+ NAME_FUNC_OFFSET(12833, glVertexAttrib4svNV, glVertexAttrib4svNV, NULL, 747),
+ NAME_FUNC_OFFSET(12853, glVertexAttrib4ubNV, glVertexAttrib4ubNV, NULL, 748),
+ NAME_FUNC_OFFSET(12873, glVertexAttrib4ubvNV, glVertexAttrib4ubvNV, NULL, 749),
+ NAME_FUNC_OFFSET(12894, glVertexAttribPointerNV, glVertexAttribPointerNV, NULL, 750),
+ NAME_FUNC_OFFSET(12918, glVertexAttribs1dvNV, glVertexAttribs1dvNV, NULL, 751),
+ NAME_FUNC_OFFSET(12939, glVertexAttribs1fvNV, glVertexAttribs1fvNV, NULL, 752),
+ NAME_FUNC_OFFSET(12960, glVertexAttribs1svNV, glVertexAttribs1svNV, NULL, 753),
+ NAME_FUNC_OFFSET(12981, glVertexAttribs2dvNV, glVertexAttribs2dvNV, NULL, 754),
+ NAME_FUNC_OFFSET(13002, glVertexAttribs2fvNV, glVertexAttribs2fvNV, NULL, 755),
+ NAME_FUNC_OFFSET(13023, glVertexAttribs2svNV, glVertexAttribs2svNV, NULL, 756),
+ NAME_FUNC_OFFSET(13044, glVertexAttribs3dvNV, glVertexAttribs3dvNV, NULL, 757),
+ NAME_FUNC_OFFSET(13065, glVertexAttribs3fvNV, glVertexAttribs3fvNV, NULL, 758),
+ NAME_FUNC_OFFSET(13086, glVertexAttribs3svNV, glVertexAttribs3svNV, NULL, 759),
+ NAME_FUNC_OFFSET(13107, glVertexAttribs4dvNV, glVertexAttribs4dvNV, NULL, 760),
+ NAME_FUNC_OFFSET(13128, glVertexAttribs4fvNV, glVertexAttribs4fvNV, NULL, 761),
+ NAME_FUNC_OFFSET(13149, glVertexAttribs4svNV, glVertexAttribs4svNV, NULL, 762),
+ NAME_FUNC_OFFSET(13170, glVertexAttribs4ubvNV, glVertexAttribs4ubvNV, NULL, 763),
+ NAME_FUNC_OFFSET(13192, glGetTexBumpParameterfvATI, glGetTexBumpParameterfvATI, NULL, 764),
+ NAME_FUNC_OFFSET(13219, glGetTexBumpParameterivATI, glGetTexBumpParameterivATI, NULL, 765),
+ NAME_FUNC_OFFSET(13246, glTexBumpParameterfvATI, glTexBumpParameterfvATI, NULL, 766),
+ NAME_FUNC_OFFSET(13270, glTexBumpParameterivATI, glTexBumpParameterivATI, NULL, 767),
+ NAME_FUNC_OFFSET(13294, glAlphaFragmentOp1ATI, glAlphaFragmentOp1ATI, NULL, 768),
+ NAME_FUNC_OFFSET(13316, glAlphaFragmentOp2ATI, glAlphaFragmentOp2ATI, NULL, 769),
+ NAME_FUNC_OFFSET(13338, glAlphaFragmentOp3ATI, glAlphaFragmentOp3ATI, NULL, 770),
+ NAME_FUNC_OFFSET(13360, glBeginFragmentShaderATI, glBeginFragmentShaderATI, NULL, 771),
+ NAME_FUNC_OFFSET(13385, glBindFragmentShaderATI, glBindFragmentShaderATI, NULL, 772),
+ NAME_FUNC_OFFSET(13409, glColorFragmentOp1ATI, glColorFragmentOp1ATI, NULL, 773),
+ NAME_FUNC_OFFSET(13431, glColorFragmentOp2ATI, glColorFragmentOp2ATI, NULL, 774),
+ NAME_FUNC_OFFSET(13453, glColorFragmentOp3ATI, glColorFragmentOp3ATI, NULL, 775),
+ NAME_FUNC_OFFSET(13475, glDeleteFragmentShaderATI, glDeleteFragmentShaderATI, NULL, 776),
+ NAME_FUNC_OFFSET(13501, glEndFragmentShaderATI, glEndFragmentShaderATI, NULL, 777),
+ NAME_FUNC_OFFSET(13524, glGenFragmentShadersATI, glGenFragmentShadersATI, NULL, 778),
+ NAME_FUNC_OFFSET(13548, glPassTexCoordATI, glPassTexCoordATI, NULL, 779),
+ NAME_FUNC_OFFSET(13566, glSampleMapATI, glSampleMapATI, NULL, 780),
+ NAME_FUNC_OFFSET(13581, glSetFragmentShaderConstantATI, glSetFragmentShaderConstantATI, NULL, 781),
+ NAME_FUNC_OFFSET(13612, glPointParameteriNV, glPointParameteriNV, NULL, 782),
+ NAME_FUNC_OFFSET(13632, glPointParameterivNV, glPointParameterivNV, NULL, 783),
+ NAME_FUNC_OFFSET(13653, gl_dispatch_stub_784, gl_dispatch_stub_784, NULL, 784),
+ NAME_FUNC_OFFSET(13676, gl_dispatch_stub_785, gl_dispatch_stub_785, NULL, 785),
+ NAME_FUNC_OFFSET(13699, gl_dispatch_stub_786, gl_dispatch_stub_786, NULL, 786),
+ NAME_FUNC_OFFSET(13725, gl_dispatch_stub_787, gl_dispatch_stub_787, NULL, 787),
+ NAME_FUNC_OFFSET(13748, gl_dispatch_stub_788, gl_dispatch_stub_788, NULL, 788),
+ NAME_FUNC_OFFSET(13769, glGetProgramNamedParameterdvNV, glGetProgramNamedParameterdvNV, NULL, 789),
+ NAME_FUNC_OFFSET(13800, glGetProgramNamedParameterfvNV, glGetProgramNamedParameterfvNV, NULL, 790),
+ NAME_FUNC_OFFSET(13831, glProgramNamedParameter4dNV, glProgramNamedParameter4dNV, NULL, 791),
+ NAME_FUNC_OFFSET(13859, glProgramNamedParameter4dvNV, glProgramNamedParameter4dvNV, NULL, 792),
+ NAME_FUNC_OFFSET(13888, glProgramNamedParameter4fNV, glProgramNamedParameter4fNV, NULL, 793),
+ NAME_FUNC_OFFSET(13916, glProgramNamedParameter4fvNV, glProgramNamedParameter4fvNV, NULL, 794),
+ NAME_FUNC_OFFSET(13945, glPrimitiveRestartIndexNV, glPrimitiveRestartIndexNV, NULL, 795),
+ NAME_FUNC_OFFSET(13971, glPrimitiveRestartNV, glPrimitiveRestartNV, NULL, 796),
+ NAME_FUNC_OFFSET(13992, gl_dispatch_stub_797, gl_dispatch_stub_797, NULL, 797),
+ NAME_FUNC_OFFSET(14009, gl_dispatch_stub_798, gl_dispatch_stub_798, NULL, 798),
+ NAME_FUNC_OFFSET(14036, glBindFramebufferEXT, glBindFramebufferEXT, NULL, 799),
+ NAME_FUNC_OFFSET(14057, glBindRenderbufferEXT, glBindRenderbufferEXT, NULL, 800),
+ NAME_FUNC_OFFSET(14079, glCheckFramebufferStatusEXT, glCheckFramebufferStatusEXT, NULL, 801),
+ NAME_FUNC_OFFSET(14107, glDeleteFramebuffersEXT, glDeleteFramebuffersEXT, NULL, 802),
+ NAME_FUNC_OFFSET(14131, glDeleteRenderbuffersEXT, glDeleteRenderbuffersEXT, NULL, 803),
+ NAME_FUNC_OFFSET(14156, glFramebufferRenderbufferEXT, glFramebufferRenderbufferEXT, NULL, 804),
+ NAME_FUNC_OFFSET(14185, glFramebufferTexture1DEXT, glFramebufferTexture1DEXT, NULL, 805),
+ NAME_FUNC_OFFSET(14211, glFramebufferTexture2DEXT, glFramebufferTexture2DEXT, NULL, 806),
+ NAME_FUNC_OFFSET(14237, glFramebufferTexture3DEXT, glFramebufferTexture3DEXT, NULL, 807),
+ NAME_FUNC_OFFSET(14263, glGenFramebuffersEXT, glGenFramebuffersEXT, NULL, 808),
+ NAME_FUNC_OFFSET(14284, glGenRenderbuffersEXT, glGenRenderbuffersEXT, NULL, 809),
+ NAME_FUNC_OFFSET(14306, glGenerateMipmapEXT, glGenerateMipmapEXT, NULL, 810),
+ NAME_FUNC_OFFSET(14326, glGetFramebufferAttachmentParameterivEXT, glGetFramebufferAttachmentParameterivEXT, NULL, 811),
+ NAME_FUNC_OFFSET(14367, glGetRenderbufferParameterivEXT, glGetRenderbufferParameterivEXT, NULL, 812),
+ NAME_FUNC_OFFSET(14399, glIsFramebufferEXT, glIsFramebufferEXT, NULL, 813),
+ NAME_FUNC_OFFSET(14418, glIsRenderbufferEXT, glIsRenderbufferEXT, NULL, 814),
+ NAME_FUNC_OFFSET(14438, glRenderbufferStorageEXT, glRenderbufferStorageEXT, NULL, 815),
+ NAME_FUNC_OFFSET(14463, gl_dispatch_stub_816, gl_dispatch_stub_816, NULL, 816),
+ NAME_FUNC_OFFSET(14484, gl_dispatch_stub_817, gl_dispatch_stub_817, NULL, 817),
+ NAME_FUNC_OFFSET(14508, gl_dispatch_stub_818, gl_dispatch_stub_818, NULL, 818),
+ NAME_FUNC_OFFSET(14538, glBindFragDataLocationEXT, glBindFragDataLocationEXT, NULL, 819),
+ NAME_FUNC_OFFSET(14564, glGetFragDataLocationEXT, glGetFragDataLocationEXT, NULL, 820),
+ NAME_FUNC_OFFSET(14589, glGetUniformuivEXT, glGetUniformuivEXT, NULL, 821),
+ NAME_FUNC_OFFSET(14608, glGetVertexAttribIivEXT, glGetVertexAttribIivEXT, NULL, 822),
+ NAME_FUNC_OFFSET(14632, glGetVertexAttribIuivEXT, glGetVertexAttribIuivEXT, NULL, 823),
+ NAME_FUNC_OFFSET(14657, glUniform1uiEXT, glUniform1uiEXT, NULL, 824),
+ NAME_FUNC_OFFSET(14673, glUniform1uivEXT, glUniform1uivEXT, NULL, 825),
+ NAME_FUNC_OFFSET(14690, glUniform2uiEXT, glUniform2uiEXT, NULL, 826),
+ NAME_FUNC_OFFSET(14706, glUniform2uivEXT, glUniform2uivEXT, NULL, 827),
+ NAME_FUNC_OFFSET(14723, glUniform3uiEXT, glUniform3uiEXT, NULL, 828),
+ NAME_FUNC_OFFSET(14739, glUniform3uivEXT, glUniform3uivEXT, NULL, 829),
+ NAME_FUNC_OFFSET(14756, glUniform4uiEXT, glUniform4uiEXT, NULL, 830),
+ NAME_FUNC_OFFSET(14772, glUniform4uivEXT, glUniform4uivEXT, NULL, 831),
+ NAME_FUNC_OFFSET(14789, glVertexAttribI1iEXT, glVertexAttribI1iEXT, NULL, 832),
+ NAME_FUNC_OFFSET(14810, glVertexAttribI1ivEXT, glVertexAttribI1ivEXT, NULL, 833),
+ NAME_FUNC_OFFSET(14832, glVertexAttribI1uiEXT, glVertexAttribI1uiEXT, NULL, 834),
+ NAME_FUNC_OFFSET(14854, glVertexAttribI1uivEXT, glVertexAttribI1uivEXT, NULL, 835),
+ NAME_FUNC_OFFSET(14877, glVertexAttribI2iEXT, glVertexAttribI2iEXT, NULL, 836),
+ NAME_FUNC_OFFSET(14898, glVertexAttribI2ivEXT, glVertexAttribI2ivEXT, NULL, 837),
+ NAME_FUNC_OFFSET(14920, glVertexAttribI2uiEXT, glVertexAttribI2uiEXT, NULL, 838),
+ NAME_FUNC_OFFSET(14942, glVertexAttribI2uivEXT, glVertexAttribI2uivEXT, NULL, 839),
+ NAME_FUNC_OFFSET(14965, glVertexAttribI3iEXT, glVertexAttribI3iEXT, NULL, 840),
+ NAME_FUNC_OFFSET(14986, glVertexAttribI3ivEXT, glVertexAttribI3ivEXT, NULL, 841),
+ NAME_FUNC_OFFSET(15008, glVertexAttribI3uiEXT, glVertexAttribI3uiEXT, NULL, 842),
+ NAME_FUNC_OFFSET(15030, glVertexAttribI3uivEXT, glVertexAttribI3uivEXT, NULL, 843),
+ NAME_FUNC_OFFSET(15053, glVertexAttribI4bvEXT, glVertexAttribI4bvEXT, NULL, 844),
+ NAME_FUNC_OFFSET(15075, glVertexAttribI4iEXT, glVertexAttribI4iEXT, NULL, 845),
+ NAME_FUNC_OFFSET(15096, glVertexAttribI4ivEXT, glVertexAttribI4ivEXT, NULL, 846),
+ NAME_FUNC_OFFSET(15118, glVertexAttribI4svEXT, glVertexAttribI4svEXT, NULL, 847),
+ NAME_FUNC_OFFSET(15140, glVertexAttribI4ubvEXT, glVertexAttribI4ubvEXT, NULL, 848),
+ NAME_FUNC_OFFSET(15163, glVertexAttribI4uiEXT, glVertexAttribI4uiEXT, NULL, 849),
+ NAME_FUNC_OFFSET(15185, glVertexAttribI4uivEXT, glVertexAttribI4uivEXT, NULL, 850),
+ NAME_FUNC_OFFSET(15208, glVertexAttribI4usvEXT, glVertexAttribI4usvEXT, NULL, 851),
+ NAME_FUNC_OFFSET(15231, glVertexAttribIPointerEXT, glVertexAttribIPointerEXT, NULL, 852),
+ NAME_FUNC_OFFSET(15257, glFramebufferTextureLayerEXT, glFramebufferTextureLayerEXT, NULL, 853),
+ NAME_FUNC_OFFSET(15286, glColorMaskIndexedEXT, glColorMaskIndexedEXT, NULL, 854),
+ NAME_FUNC_OFFSET(15308, glDisableIndexedEXT, glDisableIndexedEXT, NULL, 855),
+ NAME_FUNC_OFFSET(15328, glEnableIndexedEXT, glEnableIndexedEXT, NULL, 856),
+ NAME_FUNC_OFFSET(15347, glGetBooleanIndexedvEXT, glGetBooleanIndexedvEXT, NULL, 857),
+ NAME_FUNC_OFFSET(15371, glGetIntegerIndexedvEXT, glGetIntegerIndexedvEXT, NULL, 858),
+ NAME_FUNC_OFFSET(15395, glIsEnabledIndexedEXT, glIsEnabledIndexedEXT, NULL, 859),
+ NAME_FUNC_OFFSET(15417, glClearColorIiEXT, glClearColorIiEXT, NULL, 860),
+ NAME_FUNC_OFFSET(15435, glClearColorIuiEXT, glClearColorIuiEXT, NULL, 861),
+ NAME_FUNC_OFFSET(15454, glGetTexParameterIivEXT, glGetTexParameterIivEXT, NULL, 862),
+ NAME_FUNC_OFFSET(15478, glGetTexParameterIuivEXT, glGetTexParameterIuivEXT, NULL, 863),
+ NAME_FUNC_OFFSET(15503, glTexParameterIivEXT, glTexParameterIivEXT, NULL, 864),
+ NAME_FUNC_OFFSET(15524, glTexParameterIuivEXT, glTexParameterIuivEXT, NULL, 865),
+ NAME_FUNC_OFFSET(15546, glBeginConditionalRenderNV, glBeginConditionalRenderNV, NULL, 866),
+ NAME_FUNC_OFFSET(15573, glEndConditionalRenderNV, glEndConditionalRenderNV, NULL, 867),
+ NAME_FUNC_OFFSET(15598, glBeginTransformFeedbackEXT, glBeginTransformFeedbackEXT, NULL, 868),
+ NAME_FUNC_OFFSET(15626, glBindBufferBaseEXT, glBindBufferBaseEXT, NULL, 869),
+ NAME_FUNC_OFFSET(15646, glBindBufferOffsetEXT, glBindBufferOffsetEXT, NULL, 870),
+ NAME_FUNC_OFFSET(15668, glBindBufferRangeEXT, glBindBufferRangeEXT, NULL, 871),
+ NAME_FUNC_OFFSET(15689, glEndTransformFeedbackEXT, glEndTransformFeedbackEXT, NULL, 872),
+ NAME_FUNC_OFFSET(15715, glGetTransformFeedbackVaryingEXT, glGetTransformFeedbackVaryingEXT, NULL, 873),
+ NAME_FUNC_OFFSET(15748, glTransformFeedbackVaryingsEXT, glTransformFeedbackVaryingsEXT, NULL, 874),
+ NAME_FUNC_OFFSET(15779, glProvokingVertexEXT, glProvokingVertexEXT, NULL, 875),
+ NAME_FUNC_OFFSET(15800, gl_dispatch_stub_876, gl_dispatch_stub_876, NULL, 876),
+ NAME_FUNC_OFFSET(15831, gl_dispatch_stub_877, gl_dispatch_stub_877, NULL, 877),
+ NAME_FUNC_OFFSET(15851, glGetObjectParameterivAPPLE, glGetObjectParameterivAPPLE, NULL, 878),
+ NAME_FUNC_OFFSET(15879, glObjectPurgeableAPPLE, glObjectPurgeableAPPLE, NULL, 879),
+ NAME_FUNC_OFFSET(15902, glObjectUnpurgeableAPPLE, glObjectUnpurgeableAPPLE, NULL, 880),
+ NAME_FUNC_OFFSET(15927, glActiveProgramEXT, glActiveProgramEXT, NULL, 881),
+ NAME_FUNC_OFFSET(15946, glCreateShaderProgramEXT, glCreateShaderProgramEXT, NULL, 882),
+ NAME_FUNC_OFFSET(15971, glUseShaderProgramEXT, glUseShaderProgramEXT, NULL, 883),
+ NAME_FUNC_OFFSET(15993, glTextureBarrierNV, glTextureBarrierNV, NULL, 884),
+ NAME_FUNC_OFFSET(16012, gl_dispatch_stub_885, gl_dispatch_stub_885, NULL, 885),
+ NAME_FUNC_OFFSET(16037, gl_dispatch_stub_886, gl_dispatch_stub_886, NULL, 886),
+ NAME_FUNC_OFFSET(16066, gl_dispatch_stub_887, gl_dispatch_stub_887, NULL, 887),
+ NAME_FUNC_OFFSET(16097, gl_dispatch_stub_888, gl_dispatch_stub_888, NULL, 888),
+ NAME_FUNC_OFFSET(16121, gl_dispatch_stub_889, gl_dispatch_stub_889, NULL, 889),
+ NAME_FUNC_OFFSET(16146, glEGLImageTargetRenderbufferStorageOES, glEGLImageTargetRenderbufferStorageOES, NULL, 890),
+ NAME_FUNC_OFFSET(16185, glEGLImageTargetTexture2DOES, glEGLImageTargetTexture2DOES, NULL, 891),
+ NAME_FUNC_OFFSET(16214, glArrayElement, glArrayElement, NULL, 306),
+ NAME_FUNC_OFFSET(16232, glBindTexture, glBindTexture, NULL, 307),
+ NAME_FUNC_OFFSET(16249, glDrawArrays, glDrawArrays, NULL, 310),
+ NAME_FUNC_OFFSET(16265, glAreTexturesResident, glAreTexturesResidentEXT, glAreTexturesResidentEXT, 322),
+ NAME_FUNC_OFFSET(16290, glCopyTexImage1D, glCopyTexImage1D, NULL, 323),
+ NAME_FUNC_OFFSET(16310, glCopyTexImage2D, glCopyTexImage2D, NULL, 324),
+ NAME_FUNC_OFFSET(16330, glCopyTexSubImage1D, glCopyTexSubImage1D, NULL, 325),
+ NAME_FUNC_OFFSET(16353, glCopyTexSubImage2D, glCopyTexSubImage2D, NULL, 326),
+ NAME_FUNC_OFFSET(16376, glDeleteTextures, glDeleteTexturesEXT, glDeleteTexturesEXT, 327),
+ NAME_FUNC_OFFSET(16396, glGenTextures, glGenTexturesEXT, glGenTexturesEXT, 328),
+ NAME_FUNC_OFFSET(16413, glGetPointerv, glGetPointerv, NULL, 329),
+ NAME_FUNC_OFFSET(16430, glIsTexture, glIsTextureEXT, glIsTextureEXT, 330),
+ NAME_FUNC_OFFSET(16445, glPrioritizeTextures, glPrioritizeTextures, NULL, 331),
+ NAME_FUNC_OFFSET(16469, glTexSubImage1D, glTexSubImage1D, NULL, 332),
+ NAME_FUNC_OFFSET(16488, glTexSubImage2D, glTexSubImage2D, NULL, 333),
+ NAME_FUNC_OFFSET(16507, glBlendColor, glBlendColor, NULL, 336),
+ NAME_FUNC_OFFSET(16523, glBlendEquation, glBlendEquation, NULL, 337),
+ NAME_FUNC_OFFSET(16542, glDrawRangeElements, glDrawRangeElements, NULL, 338),
+ NAME_FUNC_OFFSET(16565, glColorTable, glColorTable, NULL, 339),
+ NAME_FUNC_OFFSET(16581, glColorTable, glColorTable, NULL, 339),
+ NAME_FUNC_OFFSET(16597, glColorTableParameterfv, glColorTableParameterfv, NULL, 340),
+ NAME_FUNC_OFFSET(16624, glColorTableParameteriv, glColorTableParameteriv, NULL, 341),
+ NAME_FUNC_OFFSET(16651, glCopyColorTable, glCopyColorTable, NULL, 342),
+ NAME_FUNC_OFFSET(16671, glGetColorTable, glGetColorTableEXT, glGetColorTableEXT, 343),
+ NAME_FUNC_OFFSET(16690, glGetColorTable, glGetColorTableEXT, glGetColorTableEXT, 343),
+ NAME_FUNC_OFFSET(16709, glGetColorTableParameterfv, glGetColorTableParameterfvEXT, glGetColorTableParameterfvEXT, 344),
+ NAME_FUNC_OFFSET(16739, glGetColorTableParameterfv, glGetColorTableParameterfvEXT, glGetColorTableParameterfvEXT, 344),
+ NAME_FUNC_OFFSET(16769, glGetColorTableParameteriv, glGetColorTableParameterivEXT, glGetColorTableParameterivEXT, 345),
+ NAME_FUNC_OFFSET(16799, glGetColorTableParameteriv, glGetColorTableParameterivEXT, glGetColorTableParameterivEXT, 345),
+ NAME_FUNC_OFFSET(16829, glColorSubTable, glColorSubTable, NULL, 346),
+ NAME_FUNC_OFFSET(16848, glCopyColorSubTable, glCopyColorSubTable, NULL, 347),
+ NAME_FUNC_OFFSET(16871, glConvolutionFilter1D, glConvolutionFilter1D, NULL, 348),
+ NAME_FUNC_OFFSET(16896, glConvolutionFilter2D, glConvolutionFilter2D, NULL, 349),
+ NAME_FUNC_OFFSET(16921, glConvolutionParameterf, glConvolutionParameterf, NULL, 350),
+ NAME_FUNC_OFFSET(16948, glConvolutionParameterfv, glConvolutionParameterfv, NULL, 351),
+ NAME_FUNC_OFFSET(16976, glConvolutionParameteri, glConvolutionParameteri, NULL, 352),
+ NAME_FUNC_OFFSET(17003, glConvolutionParameteriv, glConvolutionParameteriv, NULL, 353),
+ NAME_FUNC_OFFSET(17031, glCopyConvolutionFilter1D, glCopyConvolutionFilter1D, NULL, 354),
+ NAME_FUNC_OFFSET(17060, glCopyConvolutionFilter2D, glCopyConvolutionFilter2D, NULL, 355),
+ NAME_FUNC_OFFSET(17089, glGetConvolutionFilter, gl_dispatch_stub_356, gl_dispatch_stub_356, 356),
+ NAME_FUNC_OFFSET(17115, glGetConvolutionParameterfv, gl_dispatch_stub_357, gl_dispatch_stub_357, 357),
+ NAME_FUNC_OFFSET(17146, glGetConvolutionParameteriv, gl_dispatch_stub_358, gl_dispatch_stub_358, 358),
+ NAME_FUNC_OFFSET(17177, glGetSeparableFilter, gl_dispatch_stub_359, gl_dispatch_stub_359, 359),
+ NAME_FUNC_OFFSET(17201, glSeparableFilter2D, glSeparableFilter2D, NULL, 360),
+ NAME_FUNC_OFFSET(17224, glGetHistogram, gl_dispatch_stub_361, gl_dispatch_stub_361, 361),
+ NAME_FUNC_OFFSET(17242, glGetHistogramParameterfv, gl_dispatch_stub_362, gl_dispatch_stub_362, 362),
+ NAME_FUNC_OFFSET(17271, glGetHistogramParameteriv, gl_dispatch_stub_363, gl_dispatch_stub_363, 363),
+ NAME_FUNC_OFFSET(17300, glGetMinmax, gl_dispatch_stub_364, gl_dispatch_stub_364, 364),
+ NAME_FUNC_OFFSET(17315, glGetMinmaxParameterfv, gl_dispatch_stub_365, gl_dispatch_stub_365, 365),
+ NAME_FUNC_OFFSET(17341, glGetMinmaxParameteriv, gl_dispatch_stub_366, gl_dispatch_stub_366, 366),
+ NAME_FUNC_OFFSET(17367, glHistogram, glHistogram, NULL, 367),
+ NAME_FUNC_OFFSET(17382, glMinmax, glMinmax, NULL, 368),
+ NAME_FUNC_OFFSET(17394, glResetHistogram, glResetHistogram, NULL, 369),
+ NAME_FUNC_OFFSET(17414, glResetMinmax, glResetMinmax, NULL, 370),
+ NAME_FUNC_OFFSET(17431, glTexImage3D, glTexImage3D, NULL, 371),
+ NAME_FUNC_OFFSET(17447, glTexSubImage3D, glTexSubImage3D, NULL, 372),
+ NAME_FUNC_OFFSET(17466, glCopyTexSubImage3D, glCopyTexSubImage3D, NULL, 373),
+ NAME_FUNC_OFFSET(17489, glActiveTextureARB, glActiveTextureARB, NULL, 374),
+ NAME_FUNC_OFFSET(17505, glClientActiveTextureARB, glClientActiveTextureARB, NULL, 375),
+ NAME_FUNC_OFFSET(17527, glMultiTexCoord1dARB, glMultiTexCoord1dARB, NULL, 376),
+ NAME_FUNC_OFFSET(17545, glMultiTexCoord1dvARB, glMultiTexCoord1dvARB, NULL, 377),
+ NAME_FUNC_OFFSET(17564, glMultiTexCoord1fARB, glMultiTexCoord1fARB, NULL, 378),
+ NAME_FUNC_OFFSET(17582, glMultiTexCoord1fvARB, glMultiTexCoord1fvARB, NULL, 379),
+ NAME_FUNC_OFFSET(17601, glMultiTexCoord1iARB, glMultiTexCoord1iARB, NULL, 380),
+ NAME_FUNC_OFFSET(17619, glMultiTexCoord1ivARB, glMultiTexCoord1ivARB, NULL, 381),
+ NAME_FUNC_OFFSET(17638, glMultiTexCoord1sARB, glMultiTexCoord1sARB, NULL, 382),
+ NAME_FUNC_OFFSET(17656, glMultiTexCoord1svARB, glMultiTexCoord1svARB, NULL, 383),
+ NAME_FUNC_OFFSET(17675, glMultiTexCoord2dARB, glMultiTexCoord2dARB, NULL, 384),
+ NAME_FUNC_OFFSET(17693, glMultiTexCoord2dvARB, glMultiTexCoord2dvARB, NULL, 385),
+ NAME_FUNC_OFFSET(17712, glMultiTexCoord2fARB, glMultiTexCoord2fARB, NULL, 386),
+ NAME_FUNC_OFFSET(17730, glMultiTexCoord2fvARB, glMultiTexCoord2fvARB, NULL, 387),
+ NAME_FUNC_OFFSET(17749, glMultiTexCoord2iARB, glMultiTexCoord2iARB, NULL, 388),
+ NAME_FUNC_OFFSET(17767, glMultiTexCoord2ivARB, glMultiTexCoord2ivARB, NULL, 389),
+ NAME_FUNC_OFFSET(17786, glMultiTexCoord2sARB, glMultiTexCoord2sARB, NULL, 390),
+ NAME_FUNC_OFFSET(17804, glMultiTexCoord2svARB, glMultiTexCoord2svARB, NULL, 391),
+ NAME_FUNC_OFFSET(17823, glMultiTexCoord3dARB, glMultiTexCoord3dARB, NULL, 392),
+ NAME_FUNC_OFFSET(17841, glMultiTexCoord3dvARB, glMultiTexCoord3dvARB, NULL, 393),
+ NAME_FUNC_OFFSET(17860, glMultiTexCoord3fARB, glMultiTexCoord3fARB, NULL, 394),
+ NAME_FUNC_OFFSET(17878, glMultiTexCoord3fvARB, glMultiTexCoord3fvARB, NULL, 395),
+ NAME_FUNC_OFFSET(17897, glMultiTexCoord3iARB, glMultiTexCoord3iARB, NULL, 396),
+ NAME_FUNC_OFFSET(17915, glMultiTexCoord3ivARB, glMultiTexCoord3ivARB, NULL, 397),
+ NAME_FUNC_OFFSET(17934, glMultiTexCoord3sARB, glMultiTexCoord3sARB, NULL, 398),
+ NAME_FUNC_OFFSET(17952, glMultiTexCoord3svARB, glMultiTexCoord3svARB, NULL, 399),
+ NAME_FUNC_OFFSET(17971, glMultiTexCoord4dARB, glMultiTexCoord4dARB, NULL, 400),
+ NAME_FUNC_OFFSET(17989, glMultiTexCoord4dvARB, glMultiTexCoord4dvARB, NULL, 401),
+ NAME_FUNC_OFFSET(18008, glMultiTexCoord4fARB, glMultiTexCoord4fARB, NULL, 402),
+ NAME_FUNC_OFFSET(18026, glMultiTexCoord4fvARB, glMultiTexCoord4fvARB, NULL, 403),
+ NAME_FUNC_OFFSET(18045, glMultiTexCoord4iARB, glMultiTexCoord4iARB, NULL, 404),
+ NAME_FUNC_OFFSET(18063, glMultiTexCoord4ivARB, glMultiTexCoord4ivARB, NULL, 405),
+ NAME_FUNC_OFFSET(18082, glMultiTexCoord4sARB, glMultiTexCoord4sARB, NULL, 406),
+ NAME_FUNC_OFFSET(18100, glMultiTexCoord4svARB, glMultiTexCoord4svARB, NULL, 407),
+ NAME_FUNC_OFFSET(18119, glStencilOpSeparate, glStencilOpSeparate, NULL, 423),
+ NAME_FUNC_OFFSET(18142, glLoadTransposeMatrixdARB, glLoadTransposeMatrixdARB, NULL, 441),
+ NAME_FUNC_OFFSET(18165, glLoadTransposeMatrixfARB, glLoadTransposeMatrixfARB, NULL, 442),
+ NAME_FUNC_OFFSET(18188, glMultTransposeMatrixdARB, glMultTransposeMatrixdARB, NULL, 443),
+ NAME_FUNC_OFFSET(18211, glMultTransposeMatrixfARB, glMultTransposeMatrixfARB, NULL, 444),
+ NAME_FUNC_OFFSET(18234, glSampleCoverageARB, glSampleCoverageARB, NULL, 445),
+ NAME_FUNC_OFFSET(18251, glCompressedTexImage1DARB, glCompressedTexImage1DARB, NULL, 446),
+ NAME_FUNC_OFFSET(18274, glCompressedTexImage2DARB, glCompressedTexImage2DARB, NULL, 447),
+ NAME_FUNC_OFFSET(18297, glCompressedTexImage3DARB, glCompressedTexImage3DARB, NULL, 448),
+ NAME_FUNC_OFFSET(18320, glCompressedTexSubImage1DARB, glCompressedTexSubImage1DARB, NULL, 449),
+ NAME_FUNC_OFFSET(18346, glCompressedTexSubImage2DARB, glCompressedTexSubImage2DARB, NULL, 450),
+ NAME_FUNC_OFFSET(18372, glCompressedTexSubImage3DARB, glCompressedTexSubImage3DARB, NULL, 451),
+ NAME_FUNC_OFFSET(18398, glGetCompressedTexImageARB, glGetCompressedTexImageARB, NULL, 452),
+ NAME_FUNC_OFFSET(18422, glDisableVertexAttribArrayARB, glDisableVertexAttribArrayARB, NULL, 453),
+ NAME_FUNC_OFFSET(18449, glEnableVertexAttribArrayARB, glEnableVertexAttribArrayARB, NULL, 454),
+ NAME_FUNC_OFFSET(18475, glGetVertexAttribdvARB, glGetVertexAttribdvARB, NULL, 461),
+ NAME_FUNC_OFFSET(18495, glGetVertexAttribfvARB, glGetVertexAttribfvARB, NULL, 462),
+ NAME_FUNC_OFFSET(18515, glGetVertexAttribivARB, glGetVertexAttribivARB, NULL, 463),
+ NAME_FUNC_OFFSET(18535, glProgramEnvParameter4dARB, glProgramEnvParameter4dARB, NULL, 464),
+ NAME_FUNC_OFFSET(18558, glProgramEnvParameter4dvARB, glProgramEnvParameter4dvARB, NULL, 465),
+ NAME_FUNC_OFFSET(18582, glProgramEnvParameter4fARB, glProgramEnvParameter4fARB, NULL, 466),
+ NAME_FUNC_OFFSET(18605, glProgramEnvParameter4fvARB, glProgramEnvParameter4fvARB, NULL, 467),
+ NAME_FUNC_OFFSET(18629, glVertexAttrib1dARB, glVertexAttrib1dARB, NULL, 473),
+ NAME_FUNC_OFFSET(18646, glVertexAttrib1dvARB, glVertexAttrib1dvARB, NULL, 474),
+ NAME_FUNC_OFFSET(18664, glVertexAttrib1fARB, glVertexAttrib1fARB, NULL, 475),
+ NAME_FUNC_OFFSET(18681, glVertexAttrib1fvARB, glVertexAttrib1fvARB, NULL, 476),
+ NAME_FUNC_OFFSET(18699, glVertexAttrib1sARB, glVertexAttrib1sARB, NULL, 477),
+ NAME_FUNC_OFFSET(18716, glVertexAttrib1svARB, glVertexAttrib1svARB, NULL, 478),
+ NAME_FUNC_OFFSET(18734, glVertexAttrib2dARB, glVertexAttrib2dARB, NULL, 479),
+ NAME_FUNC_OFFSET(18751, glVertexAttrib2dvARB, glVertexAttrib2dvARB, NULL, 480),
+ NAME_FUNC_OFFSET(18769, glVertexAttrib2fARB, glVertexAttrib2fARB, NULL, 481),
+ NAME_FUNC_OFFSET(18786, glVertexAttrib2fvARB, glVertexAttrib2fvARB, NULL, 482),
+ NAME_FUNC_OFFSET(18804, glVertexAttrib2sARB, glVertexAttrib2sARB, NULL, 483),
+ NAME_FUNC_OFFSET(18821, glVertexAttrib2svARB, glVertexAttrib2svARB, NULL, 484),
+ NAME_FUNC_OFFSET(18839, glVertexAttrib3dARB, glVertexAttrib3dARB, NULL, 485),
+ NAME_FUNC_OFFSET(18856, glVertexAttrib3dvARB, glVertexAttrib3dvARB, NULL, 486),
+ NAME_FUNC_OFFSET(18874, glVertexAttrib3fARB, glVertexAttrib3fARB, NULL, 487),
+ NAME_FUNC_OFFSET(18891, glVertexAttrib3fvARB, glVertexAttrib3fvARB, NULL, 488),
+ NAME_FUNC_OFFSET(18909, glVertexAttrib3sARB, glVertexAttrib3sARB, NULL, 489),
+ NAME_FUNC_OFFSET(18926, glVertexAttrib3svARB, glVertexAttrib3svARB, NULL, 490),
+ NAME_FUNC_OFFSET(18944, glVertexAttrib4NbvARB, glVertexAttrib4NbvARB, NULL, 491),
+ NAME_FUNC_OFFSET(18963, glVertexAttrib4NivARB, glVertexAttrib4NivARB, NULL, 492),
+ NAME_FUNC_OFFSET(18982, glVertexAttrib4NsvARB, glVertexAttrib4NsvARB, NULL, 493),
+ NAME_FUNC_OFFSET(19001, glVertexAttrib4NubARB, glVertexAttrib4NubARB, NULL, 494),
+ NAME_FUNC_OFFSET(19020, glVertexAttrib4NubvARB, glVertexAttrib4NubvARB, NULL, 495),
+ NAME_FUNC_OFFSET(19040, glVertexAttrib4NuivARB, glVertexAttrib4NuivARB, NULL, 496),
+ NAME_FUNC_OFFSET(19060, glVertexAttrib4NusvARB, glVertexAttrib4NusvARB, NULL, 497),
+ NAME_FUNC_OFFSET(19080, glVertexAttrib4bvARB, glVertexAttrib4bvARB, NULL, 498),
+ NAME_FUNC_OFFSET(19098, glVertexAttrib4dARB, glVertexAttrib4dARB, NULL, 499),
+ NAME_FUNC_OFFSET(19115, glVertexAttrib4dvARB, glVertexAttrib4dvARB, NULL, 500),
+ NAME_FUNC_OFFSET(19133, glVertexAttrib4fARB, glVertexAttrib4fARB, NULL, 501),
+ NAME_FUNC_OFFSET(19150, glVertexAttrib4fvARB, glVertexAttrib4fvARB, NULL, 502),
+ NAME_FUNC_OFFSET(19168, glVertexAttrib4ivARB, glVertexAttrib4ivARB, NULL, 503),
+ NAME_FUNC_OFFSET(19186, glVertexAttrib4sARB, glVertexAttrib4sARB, NULL, 504),
+ NAME_FUNC_OFFSET(19203, glVertexAttrib4svARB, glVertexAttrib4svARB, NULL, 505),
+ NAME_FUNC_OFFSET(19221, glVertexAttrib4ubvARB, glVertexAttrib4ubvARB, NULL, 506),
+ NAME_FUNC_OFFSET(19240, glVertexAttrib4uivARB, glVertexAttrib4uivARB, NULL, 507),
+ NAME_FUNC_OFFSET(19259, glVertexAttrib4usvARB, glVertexAttrib4usvARB, NULL, 508),
+ NAME_FUNC_OFFSET(19278, glVertexAttribPointerARB, glVertexAttribPointerARB, NULL, 509),
+ NAME_FUNC_OFFSET(19300, glBindBufferARB, glBindBufferARB, NULL, 510),
+ NAME_FUNC_OFFSET(19313, glBufferDataARB, glBufferDataARB, NULL, 511),
+ NAME_FUNC_OFFSET(19326, glBufferSubDataARB, glBufferSubDataARB, NULL, 512),
+ NAME_FUNC_OFFSET(19342, glDeleteBuffersARB, glDeleteBuffersARB, NULL, 513),
+ NAME_FUNC_OFFSET(19358, glGenBuffersARB, glGenBuffersARB, NULL, 514),
+ NAME_FUNC_OFFSET(19371, glGetBufferParameterivARB, glGetBufferParameterivARB, NULL, 515),
+ NAME_FUNC_OFFSET(19394, glGetBufferPointervARB, glGetBufferPointervARB, NULL, 516),
+ NAME_FUNC_OFFSET(19414, glGetBufferSubDataARB, glGetBufferSubDataARB, NULL, 517),
+ NAME_FUNC_OFFSET(19433, glIsBufferARB, glIsBufferARB, NULL, 518),
+ NAME_FUNC_OFFSET(19444, glMapBufferARB, glMapBufferARB, NULL, 519),
+ NAME_FUNC_OFFSET(19456, glUnmapBufferARB, glUnmapBufferARB, NULL, 520),
+ NAME_FUNC_OFFSET(19470, glBeginQueryARB, glBeginQueryARB, NULL, 521),
+ NAME_FUNC_OFFSET(19483, glDeleteQueriesARB, glDeleteQueriesARB, NULL, 522),
+ NAME_FUNC_OFFSET(19499, glEndQueryARB, glEndQueryARB, NULL, 523),
+ NAME_FUNC_OFFSET(19510, glGenQueriesARB, glGenQueriesARB, NULL, 524),
+ NAME_FUNC_OFFSET(19523, glGetQueryObjectivARB, glGetQueryObjectivARB, NULL, 525),
+ NAME_FUNC_OFFSET(19542, glGetQueryObjectuivARB, glGetQueryObjectuivARB, NULL, 526),
+ NAME_FUNC_OFFSET(19562, glGetQueryivARB, glGetQueryivARB, NULL, 527),
+ NAME_FUNC_OFFSET(19575, glIsQueryARB, glIsQueryARB, NULL, 528),
+ NAME_FUNC_OFFSET(19585, glCompileShaderARB, glCompileShaderARB, NULL, 530),
+ NAME_FUNC_OFFSET(19601, glGetActiveUniformARB, glGetActiveUniformARB, NULL, 535),
+ NAME_FUNC_OFFSET(19620, glGetShaderSourceARB, glGetShaderSourceARB, NULL, 541),
+ NAME_FUNC_OFFSET(19638, glGetUniformLocationARB, glGetUniformLocationARB, NULL, 542),
+ NAME_FUNC_OFFSET(19659, glGetUniformfvARB, glGetUniformfvARB, NULL, 543),
+ NAME_FUNC_OFFSET(19674, glGetUniformivARB, glGetUniformivARB, NULL, 544),
+ NAME_FUNC_OFFSET(19689, glLinkProgramARB, glLinkProgramARB, NULL, 545),
+ NAME_FUNC_OFFSET(19703, glShaderSourceARB, glShaderSourceARB, NULL, 546),
+ NAME_FUNC_OFFSET(19718, glUniform1fARB, glUniform1fARB, NULL, 547),
+ NAME_FUNC_OFFSET(19730, glUniform1fvARB, glUniform1fvARB, NULL, 548),
+ NAME_FUNC_OFFSET(19743, glUniform1iARB, glUniform1iARB, NULL, 549),
+ NAME_FUNC_OFFSET(19755, glUniform1ivARB, glUniform1ivARB, NULL, 550),
+ NAME_FUNC_OFFSET(19768, glUniform2fARB, glUniform2fARB, NULL, 551),
+ NAME_FUNC_OFFSET(19780, glUniform2fvARB, glUniform2fvARB, NULL, 552),
+ NAME_FUNC_OFFSET(19793, glUniform2iARB, glUniform2iARB, NULL, 553),
+ NAME_FUNC_OFFSET(19805, glUniform2ivARB, glUniform2ivARB, NULL, 554),
+ NAME_FUNC_OFFSET(19818, glUniform3fARB, glUniform3fARB, NULL, 555),
+ NAME_FUNC_OFFSET(19830, glUniform3fvARB, glUniform3fvARB, NULL, 556),
+ NAME_FUNC_OFFSET(19843, glUniform3iARB, glUniform3iARB, NULL, 557),
+ NAME_FUNC_OFFSET(19855, glUniform3ivARB, glUniform3ivARB, NULL, 558),
+ NAME_FUNC_OFFSET(19868, glUniform4fARB, glUniform4fARB, NULL, 559),
+ NAME_FUNC_OFFSET(19880, glUniform4fvARB, glUniform4fvARB, NULL, 560),
+ NAME_FUNC_OFFSET(19893, glUniform4iARB, glUniform4iARB, NULL, 561),
+ NAME_FUNC_OFFSET(19905, glUniform4ivARB, glUniform4ivARB, NULL, 562),
+ NAME_FUNC_OFFSET(19918, glUniformMatrix2fvARB, glUniformMatrix2fvARB, NULL, 563),
+ NAME_FUNC_OFFSET(19937, glUniformMatrix3fvARB, glUniformMatrix3fvARB, NULL, 564),
+ NAME_FUNC_OFFSET(19956, glUniformMatrix4fvARB, glUniformMatrix4fvARB, NULL, 565),
+ NAME_FUNC_OFFSET(19975, glUseProgramObjectARB, glUseProgramObjectARB, NULL, 566),
+ NAME_FUNC_OFFSET(19988, glValidateProgramARB, glValidateProgramARB, NULL, 567),
+ NAME_FUNC_OFFSET(20006, glBindAttribLocationARB, glBindAttribLocationARB, NULL, 568),
+ NAME_FUNC_OFFSET(20027, glGetActiveAttribARB, glGetActiveAttribARB, NULL, 569),
+ NAME_FUNC_OFFSET(20045, glGetAttribLocationARB, glGetAttribLocationARB, NULL, 570),
+ NAME_FUNC_OFFSET(20065, glDrawBuffersARB, glDrawBuffersARB, NULL, 571),
+ NAME_FUNC_OFFSET(20079, glDrawBuffersARB, glDrawBuffersARB, NULL, 571),
+ NAME_FUNC_OFFSET(20096, glDrawArraysInstancedARB, glDrawArraysInstancedARB, NULL, 572),
+ NAME_FUNC_OFFSET(20121, glDrawArraysInstancedARB, glDrawArraysInstancedARB, NULL, 572),
+ NAME_FUNC_OFFSET(20143, glDrawElementsInstancedARB, glDrawElementsInstancedARB, NULL, 573),
+ NAME_FUNC_OFFSET(20170, glDrawElementsInstancedARB, glDrawElementsInstancedARB, NULL, 573),
+ NAME_FUNC_OFFSET(20194, glRenderbufferStorageMultisample, glRenderbufferStorageMultisample, NULL, 574),
+ NAME_FUNC_OFFSET(20230, gl_dispatch_stub_617, gl_dispatch_stub_617, NULL, 617),
+ NAME_FUNC_OFFSET(20246, gl_dispatch_stub_618, gl_dispatch_stub_618, NULL, 618),
+ NAME_FUNC_OFFSET(20265, glPointParameterfEXT, glPointParameterfEXT, NULL, 625),
+ NAME_FUNC_OFFSET(20283, glPointParameterfEXT, glPointParameterfEXT, NULL, 625),
+ NAME_FUNC_OFFSET(20304, glPointParameterfEXT, glPointParameterfEXT, NULL, 625),
+ NAME_FUNC_OFFSET(20326, glPointParameterfvEXT, glPointParameterfvEXT, NULL, 626),
+ NAME_FUNC_OFFSET(20345, glPointParameterfvEXT, glPointParameterfvEXT, NULL, 626),
+ NAME_FUNC_OFFSET(20367, glPointParameterfvEXT, glPointParameterfvEXT, NULL, 626),
+ NAME_FUNC_OFFSET(20390, glSecondaryColor3bEXT, glSecondaryColor3bEXT, NULL, 629),
+ NAME_FUNC_OFFSET(20409, glSecondaryColor3bvEXT, glSecondaryColor3bvEXT, NULL, 630),
+ NAME_FUNC_OFFSET(20429, glSecondaryColor3dEXT, glSecondaryColor3dEXT, NULL, 631),
+ NAME_FUNC_OFFSET(20448, glSecondaryColor3dvEXT, glSecondaryColor3dvEXT, NULL, 632),
+ NAME_FUNC_OFFSET(20468, glSecondaryColor3fEXT, glSecondaryColor3fEXT, NULL, 633),
+ NAME_FUNC_OFFSET(20487, glSecondaryColor3fvEXT, glSecondaryColor3fvEXT, NULL, 634),
+ NAME_FUNC_OFFSET(20507, glSecondaryColor3iEXT, glSecondaryColor3iEXT, NULL, 635),
+ NAME_FUNC_OFFSET(20526, glSecondaryColor3ivEXT, glSecondaryColor3ivEXT, NULL, 636),
+ NAME_FUNC_OFFSET(20546, glSecondaryColor3sEXT, glSecondaryColor3sEXT, NULL, 637),
+ NAME_FUNC_OFFSET(20565, glSecondaryColor3svEXT, glSecondaryColor3svEXT, NULL, 638),
+ NAME_FUNC_OFFSET(20585, glSecondaryColor3ubEXT, glSecondaryColor3ubEXT, NULL, 639),
+ NAME_FUNC_OFFSET(20605, glSecondaryColor3ubvEXT, glSecondaryColor3ubvEXT, NULL, 640),
+ NAME_FUNC_OFFSET(20626, glSecondaryColor3uiEXT, glSecondaryColor3uiEXT, NULL, 641),
+ NAME_FUNC_OFFSET(20646, glSecondaryColor3uivEXT, glSecondaryColor3uivEXT, NULL, 642),
+ NAME_FUNC_OFFSET(20667, glSecondaryColor3usEXT, glSecondaryColor3usEXT, NULL, 643),
+ NAME_FUNC_OFFSET(20687, glSecondaryColor3usvEXT, glSecondaryColor3usvEXT, NULL, 644),
+ NAME_FUNC_OFFSET(20708, glSecondaryColorPointerEXT, glSecondaryColorPointerEXT, NULL, 645),
+ NAME_FUNC_OFFSET(20732, glMultiDrawArraysEXT, glMultiDrawArraysEXT, NULL, 646),
+ NAME_FUNC_OFFSET(20750, glMultiDrawElementsEXT, glMultiDrawElementsEXT, NULL, 647),
+ NAME_FUNC_OFFSET(20770, glFogCoordPointerEXT, glFogCoordPointerEXT, NULL, 648),
+ NAME_FUNC_OFFSET(20788, glFogCoorddEXT, glFogCoorddEXT, NULL, 649),
+ NAME_FUNC_OFFSET(20800, glFogCoorddvEXT, glFogCoorddvEXT, NULL, 650),
+ NAME_FUNC_OFFSET(20813, glFogCoordfEXT, glFogCoordfEXT, NULL, 651),
+ NAME_FUNC_OFFSET(20825, glFogCoordfvEXT, glFogCoordfvEXT, NULL, 652),
+ NAME_FUNC_OFFSET(20838, glBlendFuncSeparateEXT, glBlendFuncSeparateEXT, NULL, 654),
+ NAME_FUNC_OFFSET(20858, glBlendFuncSeparateEXT, glBlendFuncSeparateEXT, NULL, 654),
+ NAME_FUNC_OFFSET(20882, glWindowPos2dMESA, glWindowPos2dMESA, NULL, 671),
+ NAME_FUNC_OFFSET(20896, glWindowPos2dMESA, glWindowPos2dMESA, NULL, 671),
+ NAME_FUNC_OFFSET(20913, glWindowPos2dvMESA, glWindowPos2dvMESA, NULL, 672),
+ NAME_FUNC_OFFSET(20928, glWindowPos2dvMESA, glWindowPos2dvMESA, NULL, 672),
+ NAME_FUNC_OFFSET(20946, glWindowPos2fMESA, glWindowPos2fMESA, NULL, 673),
+ NAME_FUNC_OFFSET(20960, glWindowPos2fMESA, glWindowPos2fMESA, NULL, 673),
+ NAME_FUNC_OFFSET(20977, glWindowPos2fvMESA, glWindowPos2fvMESA, NULL, 674),
+ NAME_FUNC_OFFSET(20992, glWindowPos2fvMESA, glWindowPos2fvMESA, NULL, 674),
+ NAME_FUNC_OFFSET(21010, glWindowPos2iMESA, glWindowPos2iMESA, NULL, 675),
+ NAME_FUNC_OFFSET(21024, glWindowPos2iMESA, glWindowPos2iMESA, NULL, 675),
+ NAME_FUNC_OFFSET(21041, glWindowPos2ivMESA, glWindowPos2ivMESA, NULL, 676),
+ NAME_FUNC_OFFSET(21056, glWindowPos2ivMESA, glWindowPos2ivMESA, NULL, 676),
+ NAME_FUNC_OFFSET(21074, glWindowPos2sMESA, glWindowPos2sMESA, NULL, 677),
+ NAME_FUNC_OFFSET(21088, glWindowPos2sMESA, glWindowPos2sMESA, NULL, 677),
+ NAME_FUNC_OFFSET(21105, glWindowPos2svMESA, glWindowPos2svMESA, NULL, 678),
+ NAME_FUNC_OFFSET(21120, glWindowPos2svMESA, glWindowPos2svMESA, NULL, 678),
+ NAME_FUNC_OFFSET(21138, glWindowPos3dMESA, glWindowPos3dMESA, NULL, 679),
+ NAME_FUNC_OFFSET(21152, glWindowPos3dMESA, glWindowPos3dMESA, NULL, 679),
+ NAME_FUNC_OFFSET(21169, glWindowPos3dvMESA, glWindowPos3dvMESA, NULL, 680),
+ NAME_FUNC_OFFSET(21184, glWindowPos3dvMESA, glWindowPos3dvMESA, NULL, 680),
+ NAME_FUNC_OFFSET(21202, glWindowPos3fMESA, glWindowPos3fMESA, NULL, 681),
+ NAME_FUNC_OFFSET(21216, glWindowPos3fMESA, glWindowPos3fMESA, NULL, 681),
+ NAME_FUNC_OFFSET(21233, glWindowPos3fvMESA, glWindowPos3fvMESA, NULL, 682),
+ NAME_FUNC_OFFSET(21248, glWindowPos3fvMESA, glWindowPos3fvMESA, NULL, 682),
+ NAME_FUNC_OFFSET(21266, glWindowPos3iMESA, glWindowPos3iMESA, NULL, 683),
+ NAME_FUNC_OFFSET(21280, glWindowPos3iMESA, glWindowPos3iMESA, NULL, 683),
+ NAME_FUNC_OFFSET(21297, glWindowPos3ivMESA, glWindowPos3ivMESA, NULL, 684),
+ NAME_FUNC_OFFSET(21312, glWindowPos3ivMESA, glWindowPos3ivMESA, NULL, 684),
+ NAME_FUNC_OFFSET(21330, glWindowPos3sMESA, glWindowPos3sMESA, NULL, 685),
+ NAME_FUNC_OFFSET(21344, glWindowPos3sMESA, glWindowPos3sMESA, NULL, 685),
+ NAME_FUNC_OFFSET(21361, glWindowPos3svMESA, glWindowPos3svMESA, NULL, 686),
+ NAME_FUNC_OFFSET(21376, glWindowPos3svMESA, glWindowPos3svMESA, NULL, 686),
+ NAME_FUNC_OFFSET(21394, glBindProgramNV, glBindProgramNV, NULL, 705),
+ NAME_FUNC_OFFSET(21411, glDeleteProgramsNV, glDeleteProgramsNV, NULL, 706),
+ NAME_FUNC_OFFSET(21431, glGenProgramsNV, glGenProgramsNV, NULL, 708),
+ NAME_FUNC_OFFSET(21448, glGetVertexAttribPointervNV, glGetVertexAttribPointervNV, NULL, 714),
+ NAME_FUNC_OFFSET(21474, glGetVertexAttribPointervNV, glGetVertexAttribPointervNV, NULL, 714),
+ NAME_FUNC_OFFSET(21503, glIsProgramNV, glIsProgramNV, NULL, 718),
+ NAME_FUNC_OFFSET(21518, glPointParameteriNV, glPointParameteriNV, NULL, 782),
+ NAME_FUNC_OFFSET(21536, glPointParameterivNV, glPointParameterivNV, NULL, 783),
+ NAME_FUNC_OFFSET(21555, gl_dispatch_stub_786, gl_dispatch_stub_786, NULL, 786),
+ NAME_FUNC_OFFSET(21576, gl_dispatch_stub_788, gl_dispatch_stub_788, NULL, 788),
+ NAME_FUNC_OFFSET(21592, glPrimitiveRestartIndexNV, glPrimitiveRestartIndexNV, NULL, 795),
+ NAME_FUNC_OFFSET(21616, gl_dispatch_stub_798, gl_dispatch_stub_798, NULL, 798),
+ NAME_FUNC_OFFSET(21640, gl_dispatch_stub_798, gl_dispatch_stub_798, NULL, 798),
+ NAME_FUNC_OFFSET(21667, glBindFramebufferEXT, glBindFramebufferEXT, NULL, 799),
+ NAME_FUNC_OFFSET(21685, glBindRenderbufferEXT, glBindRenderbufferEXT, NULL, 800),
+ NAME_FUNC_OFFSET(21704, glCheckFramebufferStatusEXT, glCheckFramebufferStatusEXT, NULL, 801),
+ NAME_FUNC_OFFSET(21729, glDeleteFramebuffersEXT, glDeleteFramebuffersEXT, NULL, 802),
+ NAME_FUNC_OFFSET(21750, glDeleteRenderbuffersEXT, glDeleteRenderbuffersEXT, NULL, 803),
+ NAME_FUNC_OFFSET(21772, glFramebufferRenderbufferEXT, glFramebufferRenderbufferEXT, NULL, 804),
+ NAME_FUNC_OFFSET(21798, glFramebufferTexture1DEXT, glFramebufferTexture1DEXT, NULL, 805),
+ NAME_FUNC_OFFSET(21821, glFramebufferTexture2DEXT, glFramebufferTexture2DEXT, NULL, 806),
+ NAME_FUNC_OFFSET(21844, glFramebufferTexture3DEXT, glFramebufferTexture3DEXT, NULL, 807),
+ NAME_FUNC_OFFSET(21867, glGenFramebuffersEXT, glGenFramebuffersEXT, NULL, 808),
+ NAME_FUNC_OFFSET(21885, glGenRenderbuffersEXT, glGenRenderbuffersEXT, NULL, 809),
+ NAME_FUNC_OFFSET(21904, glGenerateMipmapEXT, glGenerateMipmapEXT, NULL, 810),
+ NAME_FUNC_OFFSET(21921, glGetFramebufferAttachmentParameterivEXT, glGetFramebufferAttachmentParameterivEXT, NULL, 811),
+ NAME_FUNC_OFFSET(21959, glGetRenderbufferParameterivEXT, glGetRenderbufferParameterivEXT, NULL, 812),
+ NAME_FUNC_OFFSET(21988, glIsFramebufferEXT, glIsFramebufferEXT, NULL, 813),
+ NAME_FUNC_OFFSET(22004, glIsRenderbufferEXT, glIsRenderbufferEXT, NULL, 814),
+ NAME_FUNC_OFFSET(22021, glRenderbufferStorageEXT, glRenderbufferStorageEXT, NULL, 815),
+ NAME_FUNC_OFFSET(22043, gl_dispatch_stub_816, gl_dispatch_stub_816, NULL, 816),
+ NAME_FUNC_OFFSET(22061, glBindFragDataLocationEXT, glBindFragDataLocationEXT, NULL, 819),
+ NAME_FUNC_OFFSET(22084, glGetFragDataLocationEXT, glGetFragDataLocationEXT, NULL, 820),
+ NAME_FUNC_OFFSET(22106, glGetUniformuivEXT, glGetUniformuivEXT, NULL, 821),
+ NAME_FUNC_OFFSET(22122, glGetVertexAttribIivEXT, glGetVertexAttribIivEXT, NULL, 822),
+ NAME_FUNC_OFFSET(22143, glGetVertexAttribIuivEXT, glGetVertexAttribIuivEXT, NULL, 823),
+ NAME_FUNC_OFFSET(22165, glUniform1uiEXT, glUniform1uiEXT, NULL, 824),
+ NAME_FUNC_OFFSET(22178, glUniform1uivEXT, glUniform1uivEXT, NULL, 825),
+ NAME_FUNC_OFFSET(22192, glUniform2uiEXT, glUniform2uiEXT, NULL, 826),
+ NAME_FUNC_OFFSET(22205, glUniform2uivEXT, glUniform2uivEXT, NULL, 827),
+ NAME_FUNC_OFFSET(22219, glUniform3uiEXT, glUniform3uiEXT, NULL, 828),
+ NAME_FUNC_OFFSET(22232, glUniform3uivEXT, glUniform3uivEXT, NULL, 829),
+ NAME_FUNC_OFFSET(22246, glUniform4uiEXT, glUniform4uiEXT, NULL, 830),
+ NAME_FUNC_OFFSET(22259, glUniform4uivEXT, glUniform4uivEXT, NULL, 831),
+ NAME_FUNC_OFFSET(22273, glVertexAttribI1iEXT, glVertexAttribI1iEXT, NULL, 832),
+ NAME_FUNC_OFFSET(22291, glVertexAttribI1ivEXT, glVertexAttribI1ivEXT, NULL, 833),
+ NAME_FUNC_OFFSET(22310, glVertexAttribI1uiEXT, glVertexAttribI1uiEXT, NULL, 834),
+ NAME_FUNC_OFFSET(22329, glVertexAttribI1uivEXT, glVertexAttribI1uivEXT, NULL, 835),
+ NAME_FUNC_OFFSET(22349, glVertexAttribI2iEXT, glVertexAttribI2iEXT, NULL, 836),
+ NAME_FUNC_OFFSET(22367, glVertexAttribI2ivEXT, glVertexAttribI2ivEXT, NULL, 837),
+ NAME_FUNC_OFFSET(22386, glVertexAttribI2uiEXT, glVertexAttribI2uiEXT, NULL, 838),
+ NAME_FUNC_OFFSET(22405, glVertexAttribI2uivEXT, glVertexAttribI2uivEXT, NULL, 839),
+ NAME_FUNC_OFFSET(22425, glVertexAttribI3iEXT, glVertexAttribI3iEXT, NULL, 840),
+ NAME_FUNC_OFFSET(22443, glVertexAttribI3ivEXT, glVertexAttribI3ivEXT, NULL, 841),
+ NAME_FUNC_OFFSET(22462, glVertexAttribI3uiEXT, glVertexAttribI3uiEXT, NULL, 842),
+ NAME_FUNC_OFFSET(22481, glVertexAttribI3uivEXT, glVertexAttribI3uivEXT, NULL, 843),
+ NAME_FUNC_OFFSET(22501, glVertexAttribI4bvEXT, glVertexAttribI4bvEXT, NULL, 844),
+ NAME_FUNC_OFFSET(22520, glVertexAttribI4iEXT, glVertexAttribI4iEXT, NULL, 845),
+ NAME_FUNC_OFFSET(22538, glVertexAttribI4ivEXT, glVertexAttribI4ivEXT, NULL, 846),
+ NAME_FUNC_OFFSET(22557, glVertexAttribI4svEXT, glVertexAttribI4svEXT, NULL, 847),
+ NAME_FUNC_OFFSET(22576, glVertexAttribI4ubvEXT, glVertexAttribI4ubvEXT, NULL, 848),
+ NAME_FUNC_OFFSET(22596, glVertexAttribI4uiEXT, glVertexAttribI4uiEXT, NULL, 849),
+ NAME_FUNC_OFFSET(22615, glVertexAttribI4uivEXT, glVertexAttribI4uivEXT, NULL, 850),
+ NAME_FUNC_OFFSET(22635, glVertexAttribI4usvEXT, glVertexAttribI4usvEXT, NULL, 851),
+ NAME_FUNC_OFFSET(22655, glVertexAttribIPointerEXT, glVertexAttribIPointerEXT, NULL, 852),
+ NAME_FUNC_OFFSET(22678, glFramebufferTextureLayerEXT, glFramebufferTextureLayerEXT, NULL, 853),
+ NAME_FUNC_OFFSET(22704, glColorMaskIndexedEXT, glColorMaskIndexedEXT, NULL, 854),
+ NAME_FUNC_OFFSET(22717, glDisableIndexedEXT, glDisableIndexedEXT, NULL, 855),
+ NAME_FUNC_OFFSET(22728, glEnableIndexedEXT, glEnableIndexedEXT, NULL, 856),
+ NAME_FUNC_OFFSET(22738, glGetBooleanIndexedvEXT, glGetBooleanIndexedvEXT, NULL, 857),
+ NAME_FUNC_OFFSET(22754, glGetIntegerIndexedvEXT, glGetIntegerIndexedvEXT, NULL, 858),
+ NAME_FUNC_OFFSET(22770, glIsEnabledIndexedEXT, glIsEnabledIndexedEXT, NULL, 859),
+ NAME_FUNC_OFFSET(22783, glGetTexParameterIivEXT, glGetTexParameterIivEXT, NULL, 862),
+ NAME_FUNC_OFFSET(22804, glGetTexParameterIuivEXT, glGetTexParameterIuivEXT, NULL, 863),
+ NAME_FUNC_OFFSET(22826, glTexParameterIivEXT, glTexParameterIivEXT, NULL, 864),
+ NAME_FUNC_OFFSET(22844, glTexParameterIuivEXT, glTexParameterIuivEXT, NULL, 865),
+ NAME_FUNC_OFFSET(22863, glBeginConditionalRenderNV, glBeginConditionalRenderNV, NULL, 866),
+ NAME_FUNC_OFFSET(22888, glEndConditionalRenderNV, glEndConditionalRenderNV, NULL, 867),
+ NAME_FUNC_OFFSET(22911, glBeginTransformFeedbackEXT, glBeginTransformFeedbackEXT, NULL, 868),
+ NAME_FUNC_OFFSET(22936, glBindBufferBaseEXT, glBindBufferBaseEXT, NULL, 869),
+ NAME_FUNC_OFFSET(22953, glBindBufferRangeEXT, glBindBufferRangeEXT, NULL, 871),
+ NAME_FUNC_OFFSET(22971, glEndTransformFeedbackEXT, glEndTransformFeedbackEXT, NULL, 872),
+ NAME_FUNC_OFFSET(22994, glGetTransformFeedbackVaryingEXT, glGetTransformFeedbackVaryingEXT, NULL, 873),
+ NAME_FUNC_OFFSET(23024, glTransformFeedbackVaryingsEXT, glTransformFeedbackVaryingsEXT, NULL, 874),
+ NAME_FUNC_OFFSET(23052, glProvokingVertexEXT, glProvokingVertexEXT, NULL, 875),
NAME_FUNC_OFFSET(-1, NULL, NULL, NULL, 0)
};
diff --git a/src/mapi/glapi/sources.mak b/src/mapi/glapi/sources.mak
index cdcfa36e51f..0b4d8cf65df 100644
--- a/src/mapi/glapi/sources.mak
+++ b/src/mapi/glapi/sources.mak
@@ -5,7 +5,8 @@ GLAPI_SOURCES = \
glapi_entrypoint.c \
glapi_getproc.c \
glapi_nop.c \
- glthread.c
+ glthread.c \
+ glapi.c
X86_API = \
glapi_x86.S
diff --git a/src/mapi/mapi/entry.c b/src/mapi/mapi/entry.c
index fdf2a89c52f..3d9168a7243 100644
--- a/src/mapi/mapi/entry.c
+++ b/src/mapi/mapi/entry.c
@@ -27,6 +27,18 @@
*/
#include "entry.h"
+#include "u_current.h"
+#include "u_macros.h"
+
+/* define macros for use by assembly dispatchers */
+#define ENTRY_CURRENT_TABLE U_STRINGIFY(u_current_table)
+
+/* in bridge mode, mapi is a user of glapi */
+#ifdef MAPI_MODE_BRIDGE
+#define ENTRY_CURRENT_TABLE_GET "_glapi_get_dispatch"
+#else
+#define ENTRY_CURRENT_TABLE_GET U_STRINGIFY(u_current_get_internal)
+#endif
#if defined(USE_X86_ASM) && defined(__GNUC__)
# ifdef GLX_USE_TLS
@@ -39,19 +51,38 @@
#else
#include <stdlib.h>
-#include "u_current.h"
-#include "table.h"
+
+static INLINE const struct mapi_table *
+entry_current_get(void)
+{
+#ifdef MAPI_MODE_BRIDGE
+ return GET_DISPATCH();
+#else
+ return u_current_get();
+#endif
+}
/* C version of the public entries */
+#define MAPI_TMP_DEFINES
+#define MAPI_TMP_PUBLIC_DECLARES
#define MAPI_TMP_PUBLIC_ENTRIES
#include "mapi_tmp.h"
+#ifndef MAPI_MODE_BRIDGE
+
void
entry_patch_public(void)
{
}
mapi_func
+entry_get_public(int slot)
+{
+ /* pubic_entries are defined by MAPI_TMP_PUBLIC_ENTRIES */
+ return public_entries[slot];
+}
+
+mapi_func
entry_generate(int slot)
{
return NULL;
@@ -62,4 +93,6 @@ entry_patch(mapi_func entry, int slot)
{
}
+#endif /* MAPI_MODE_BRIDGE */
+
#endif /* asm */
diff --git a/src/mapi/mapi/entry.h b/src/mapi/mapi/entry.h
index 48ed3f9ec4a..9df81000470 100644
--- a/src/mapi/mapi/entry.h
+++ b/src/mapi/mapi/entry.h
@@ -30,17 +30,16 @@
#define _ENTRY_H_
#include "u_compiler.h"
-#include "stub.h"
-/* declare public entries */
-#define MAPI_TMP_DEFINES
-#define MAPI_TMP_PUBLIC_DECLARES
-#include "mapi_tmp.h"
+typedef void (*mapi_func)(void);
void
entry_patch_public(void);
mapi_func
+entry_get_public(int slot);
+
+mapi_func
entry_generate(int slot);
void
diff --git a/src/mapi/mapi/entry_x86-64_tls.h b/src/mapi/mapi/entry_x86-64_tls.h
index 2fbe73b5b32..d3b606c8ac5 100644
--- a/src/mapi/mapi/entry_x86-64_tls.h
+++ b/src/mapi/mapi/entry_x86-64_tls.h
@@ -26,15 +26,24 @@
* Chia-I Wu <olv@lunarg.com>
*/
-#include <string.h>
-#include "u_execmem.h"
#include "u_macros.h"
-__asm__(".text");
+#ifdef __linux__
+__asm__(".section .note.ABI-tag, \"a\"\n\t"
+ ".p2align 2\n\t"
+ ".long 1f - 0f\n\t" /* name length */
+ ".long 3f - 2f\n\t" /* data length */
+ ".long 1\n\t" /* note length */
+ "0: .asciz \"GNU\"\n\t" /* vendor name */
+ "1: .p2align 2\n\t"
+ "2: .long 0\n\t" /* note data: the ABI tag */
+ ".long 2,4,20\n\t" /* Minimum kernel version w/TLS */
+ "3: .p2align 2\n\t"); /* pad out section */
+#endif /* __linux__ */
-__asm__("x86_64_current_tls:\n\t"
- "movq u_current_table_tls@GOTTPOFF(%rip), %rax\n\t"
- "ret");
+__asm__(".text\n"
+ ".balign 32\n"
+ "x86_64_entry_start:");
#define STUB_ASM_ENTRY(func) \
".globl " func "\n" \
@@ -43,21 +52,37 @@ __asm__("x86_64_current_tls:\n\t"
func ":"
#define STUB_ASM_CODE(slot) \
- "movq u_current_table_tls@GOTTPOFF(%rip), %rax\n\t" \
+ "movq " ENTRY_CURRENT_TABLE "@GOTTPOFF(%rip), %rax\n\t" \
"movq %fs:(%rax), %r11\n\t" \
"jmp *(8 * " slot ")(%r11)"
#define MAPI_TMP_STUB_ASM_GCC
#include "mapi_tmp.h"
+#ifndef MAPI_MODE_BRIDGE
+
+__asm__("x86_64_current_tls:\n\t"
+ "movq " ENTRY_CURRENT_TABLE "@GOTTPOFF(%rip), %rax\n\t"
+ "ret");
+
extern unsigned long
x86_64_current_tls();
+#include <string.h>
+#include "u_execmem.h"
+
void
entry_patch_public(void)
{
}
+mapi_func
+entry_get_public(int slot)
+{
+ extern char x86_64_entry_start[];
+ return (mapi_func) (x86_64_entry_start + slot * 32);
+}
+
void
entry_patch(mapi_func entry, int slot)
{
@@ -95,3 +120,5 @@ entry_generate(int slot)
return entry;
}
+
+#endif /* MAPI_MODE_BRIDGE */
diff --git a/src/mapi/mapi/entry_x86_tls.h b/src/mapi/mapi/entry_x86_tls.h
index d4f7d98cf12..5169069a132 100644
--- a/src/mapi/mapi/entry_x86_tls.h
+++ b/src/mapi/mapi/entry_x86_tls.h
@@ -27,9 +27,21 @@
*/
#include <string.h>
-#include "u_execmem.h"
#include "u_macros.h"
+#ifdef __linux__
+__asm__(".section .note.ABI-tag, \"a\"\n\t"
+ ".p2align 2\n\t"
+ ".long 1f - 0f\n\t" /* name length */
+ ".long 3f - 2f\n\t" /* data length */
+ ".long 1\n\t" /* note length */
+ "0: .asciz \"GNU\"\n\t" /* vendor name */
+ "1: .p2align 2\n\t"
+ "2: .long 0\n\t" /* note data: the ABI tag */
+ ".long 2,4,20\n\t" /* Minimum kernel version w/TLS */
+ "3: .p2align 2\n\t"); /* pad out section */
+#endif /* __linux__ */
+
__asm__(".text");
__asm__("x86_current_tls:\n\t"
@@ -37,15 +49,16 @@ __asm__("x86_current_tls:\n\t"
"1:\n\t"
"popl %eax\n\t"
"addl $_GLOBAL_OFFSET_TABLE_+[.-1b], %eax\n\t"
- "movl u_current_table_tls@GOTNTPOFF(%eax), %eax\n\t"
+ "movl " ENTRY_CURRENT_TABLE "@GOTNTPOFF(%eax), %eax\n\t"
"ret");
#ifndef GLX_X86_READONLY_TEXT
-__asm__(".section wtext, \"awx\", @progbits\n"
- ".balign 16\n"
- "x86_entry_start:");
+__asm__(".section wtext, \"awx\", @progbits");
#endif /* GLX_X86_READONLY_TEXT */
+__asm__(".balign 16\n"
+ "x86_entry_start:");
+
#define STUB_ASM_ENTRY(func) \
".globl " func "\n" \
".type " func ", @function\n" \
@@ -66,6 +79,10 @@ __asm__(".balign 16\n"
__asm__(".text");
#endif /* GLX_X86_READONLY_TEXT */
+#ifndef MAPI_MODE_BRIDGE
+
+#include "u_execmem.h"
+
extern unsigned long
x86_current_tls();
@@ -88,6 +105,13 @@ entry_patch_public(void)
#endif
}
+mapi_func
+entry_get_public(int slot)
+{
+ extern char x86_entry_start[];
+ return (mapi_func) (x86_entry_start + slot * 16);
+}
+
void
entry_patch(mapi_func entry, int slot)
{
@@ -118,3 +142,5 @@ entry_generate(int slot)
return entry;
}
+
+#endif /* MAPI_MODE_BRIDGE */
diff --git a/src/mapi/mapi/entry_x86_tsd.h b/src/mapi/mapi/entry_x86_tsd.h
index f37c7473a6f..1491478d470 100644
--- a/src/mapi/mapi/entry_x86_tsd.h
+++ b/src/mapi/mapi/entry_x86_tsd.h
@@ -26,13 +26,13 @@
* Chia-I Wu <olv@lunarg.com>
*/
-#include <string.h>
-#include "u_execmem.h"
#include "u_macros.h"
#define X86_ENTRY_SIZE 32
-__asm__(".text");
+__asm__(".text\n"
+ ".balign 32\n"
+ "x86_entry_start:");
#define STUB_ASM_ENTRY(func) \
".globl " func "\n" \
@@ -41,25 +41,37 @@ __asm__(".text");
func ":"
#define STUB_ASM_CODE(slot) \
- "movl u_current_table, %eax\n\t" \
+ "movl " ENTRY_CURRENT_TABLE ", %eax\n\t" \
"testl %eax, %eax\n\t" \
"je 1f\n\t" \
"jmp *(4 * " slot ")(%eax)\n" \
"1:\n\t" \
- "call u_current_get_internal\n\t"\
+ "call " ENTRY_CURRENT_TABLE_GET "\n\t" \
"jmp *(4 * " slot ")(%eax)"
#define MAPI_TMP_STUB_ASM_GCC
#include "mapi_tmp.h"
+#ifndef MAPI_MODE_BRIDGE
+
__asm__(".balign 32\n"
"x86_entry_end:");
+#include <string.h>
+#include "u_execmem.h"
+
void
entry_patch_public(void)
{
}
+mapi_func
+entry_get_public(int slot)
+{
+ extern const char x86_entry_start[];
+ return (mapi_func) (x86_entry_start + slot * X86_ENTRY_SIZE);
+}
+
void
entry_patch(mapi_func entry, int slot)
{
@@ -87,3 +99,5 @@ entry_generate(int slot)
return entry;
}
+
+#endif /* MAPI_MODE_BRIDGE */
diff --git a/src/mapi/mapi/mapi.c b/src/mapi/mapi/mapi.c
index 5476d37fdc9..b471c40b144 100644
--- a/src/mapi/mapi/mapi.c
+++ b/src/mapi/mapi/mapi.c
@@ -132,7 +132,7 @@ mapi_get_proc_address(const char *name)
if (!stub)
stub = stub_find_dynamic(name, 0);
- return (stub) ? (mapi_proc) stub->addr : NULL;
+ return (stub) ? (mapi_proc) stub_get_addr(stub) : NULL;
}
/**
@@ -172,11 +172,12 @@ mapi_table_fill(struct mapi_table *tbl, const mapi_proc *procs)
for (i = 0; i < mapi_num_stubs; i++) {
const struct mapi_stub *stub = mapi_stub_map[i];
+ int slot = stub_get_slot(stub);
mapi_func func = (mapi_func) procs[i];
if (!func)
- func = table_get_func(noop, stub);
- table_set_func(tbl, stub, func);
+ func = table_get_func(noop, slot);
+ table_set_func(tbl, slot, func);
}
}
diff --git a/src/mapi/mapi/mapi_abi.py b/src/mapi/mapi/mapi_abi.py
index 3a872666f96..cb9fc0ef841 100644
--- a/src/mapi/mapi/mapi_abi.py
+++ b/src/mapi/mapi/mapi_abi.py
@@ -45,6 +45,7 @@ class ABIEntry(object):
self.slot = attrs['slot']
self.hidden = attrs['hidden']
self.alias = attrs['alias']
+ self.handcode = attrs['handcode']
def c_prototype(self):
return '%s %s(%s)' % (self.c_return(), self.name, self.c_params())
@@ -125,6 +126,61 @@ class ABIEntry(object):
return res
+def abi_parse_xml(xml):
+ """Parse a GLAPI XML file for ABI entries."""
+ import os
+ GLAPI = "./%s/../glapi/gen" % (os.path.dirname(sys.argv[0]))
+ sys.path.append(GLAPI)
+ import gl_XML, glX_XML
+
+ api = gl_XML.parse_GL_API(xml, glX_XML.glx_item_factory())
+
+ entry_dict = {}
+ for func in api.functionIterateByOffset():
+ # make sure func.name appear first
+ entry_points = func.entry_points[:]
+ entry_points.remove(func.name)
+ entry_points.insert(0, func.name)
+
+ for name in entry_points:
+ attrs = {
+ 'slot': func.offset,
+ 'hidden': not func.is_static_entry_point(name),
+ 'alias': None if name == func.name else func.name,
+ 'handcode': bool(func.has_different_protocol(name)),
+ }
+
+ # post-process attrs
+ if attrs['alias']:
+ try:
+ alias = entry_dict[attrs['alias']]
+ except KeyError:
+ raise Exception('failed to alias %s' % attrs['alias'])
+ if alias.alias:
+ raise Exception('recursive alias %s' % ent.name)
+ attrs['alias'] = alias
+ if attrs['handcode']:
+ attrs['handcode'] = func.static_glx_name(name)
+ else:
+ attrs['handcode'] = None
+
+ if entry_dict.has_key(name):
+ raise Exception('%s is duplicated' % (name))
+
+ cols = []
+ cols.append(func.return_type)
+ cols.append(name)
+ params = func.get_parameter_string(name)
+ cols.extend([p.strip() for p in params.split(',')])
+
+ ent = ABIEntry(cols, attrs)
+ entry_dict[ent.name] = ent
+
+ entries = entry_dict.values()
+ entries.sort()
+
+ return entries
+
def abi_parse_line(line):
cols = [col.strip() for col in line.split(',')]
@@ -132,6 +188,7 @@ def abi_parse_line(line):
'slot': -1,
'hidden': False,
'alias': None,
+ 'handcode': None,
}
# extract attributes from the first column
@@ -144,6 +201,8 @@ def abi_parse_line(line):
attrs['hidden'] = True
elif val.startswith('alias='):
attrs['alias'] = val[6:]
+ elif val.startswith('handcode='):
+ attrs['handcode'] = val[9:]
elif not val:
pass
else:
@@ -166,10 +225,13 @@ def abi_parse(filename):
# post-process attributes
if attrs['alias']:
try:
- ent = entry_dict[attrs['alias']]
- slot = ent.slot
+ alias = entry_dict[attrs['alias']]
except KeyError:
raise Exception('failed to alias %s' % attrs['alias'])
+ if alias.alias:
+ raise Exception('recursive alias %s' % ent.name)
+ slot = alias.slot
+ attrs['alias'] = alias
else:
slot = next_slot
next_slot += 1
@@ -187,21 +249,39 @@ def abi_parse(filename):
entries = entry_dict.values()
entries.sort()
- # sanity check
+ return entries
+
+def abi_sanity_check(entries):
+ if not entries:
+ return
+
+ all_names = []
+ last_slot = entries[-1].slot
i = 0
- for slot in xrange(next_slot):
+ for slot in xrange(last_slot + 1):
if entries[i].slot != slot:
raise Exception('entries are not ordered by slots')
if entries[i].alias:
raise Exception('first entry of slot %d aliases %s'
- % (slot, entries[i].alias))
+ % (slot, entries[i].alias.name))
+ handcode = None
while i < len(entries) and entries[i].slot == slot:
+ ent = entries[i]
+ if not handcode and ent.handcode:
+ handcode = ent.handcode
+ elif ent.handcode != handcode:
+ raise Exception('two aliases with handcode %s != %s',
+ ent.handcode, handcode)
+
+ if ent.name in all_names:
+ raise Exception('%s is duplicated' % (ent.name))
+ if ent.alias and ent.alias.name not in all_names:
+ raise Exception('failed to alias %s' % (ent.alias.name))
+ all_names.append(ent.name)
i += 1
if i < len(entries):
raise Exception('there are %d invalid entries' % (len(entries) - 1))
- return entries
-
class ABIPrinter(object):
"""MAPI Printer"""
@@ -215,6 +295,7 @@ class ABIPrinter(object):
self.indent = ' ' * 3
self.noop_warn = 'noop_warn'
self.noop_generic = 'noop_generic'
+ self.current_get = 'entry_current_get'
self.api_defines = []
self.api_headers = ['"KHR/khrplatform.h"']
@@ -222,30 +303,52 @@ class ABIPrinter(object):
self.api_entry = 'KHRONOS_APIENTRY'
self.api_attrs = 'KHRONOS_APIATTRIBUTES'
- def c_header(self):
+ self.c_header = ''
+
+ self.lib_need_table_size = True
+ self.lib_need_noop_array = True
+ self.lib_need_stubs = True
+ self.lib_need_all_entries = True
+ self.lib_need_non_hidden_entries = False
+
+ def c_notice(self):
return '/* This file is automatically generated by mapi_abi.py. Do not modify. */'
- def c_includes(self):
+ def c_public_includes(self):
"""Return includes of the client API headers."""
defines = ['#define ' + d for d in self.api_defines]
includes = ['#include ' + h for h in self.api_headers]
return "\n".join(defines + includes)
- def c_mapi_table(self):
- """Return defines of the dispatch table size."""
- num_static_entries = 0
+ def need_entry_point(self, ent):
+ """Return True if an entry point is needed for the entry."""
+ # non-handcode hidden aliases may share the entry they alias
+ use_alias = (ent.hidden and ent.alias and not ent.handcode)
+ return not use_alias
+
+ def c_public_declarations(self, prefix):
+ """Return the declarations of public entry points."""
+ decls = []
for ent in self.entries:
- if not ent.alias:
- num_static_entries += 1
+ if not self.need_entry_point(ent):
+ continue
+ export = self.api_call if not ent.hidden else ''
+ decls.append(self._c_decl(ent, prefix, True, export) + ';')
+ return "\n".join(decls)
+
+ def c_mapi_table(self):
+ """Return defines of the dispatch table size."""
+ num_static_entries = self.entries[-1].slot + 1
return ('#define MAPI_TABLE_NUM_STATIC %d\n' + \
'#define MAPI_TABLE_NUM_DYNAMIC %d') % (
num_static_entries, ABI_NUM_DYNAMIC_ENTRIES)
def c_mapi_table_initializer(self, prefix):
"""Return the array initializer for mapi_table_fill."""
- entries = [ent.name for ent in self.entries if not ent.alias]
- pre = self.indent + '(mapi_proc) ' + prefix
+ entries = [self._c_function(ent, prefix)
+ for ent in self.entries if not ent.alias]
+ pre = self.indent + '(mapi_proc) '
return pre + (',\n' + pre).join(entries)
def c_mapi_table_spec(self):
@@ -263,11 +366,38 @@ class ABIPrinter(object):
return self.indent + self.indent.join(specv1)
- def _c_decl(self, ent, prefix, need_attr=True):
+ def _c_function(self, ent, prefix, mangle=False, stringify=False):
+ """Return the function name of an entry."""
+ formats = {
+ True: { True: '%s_STR(%s)', False: '%s(%s)' },
+ False: { True: '"%s%s"', False: '%s%s' },
+ }
+ fmt = formats[prefix.isupper()][stringify]
+ name = ent.name
+ if mangle and ent.hidden:
+ name = '_dispatch_stub_' + str(ent.slot)
+ return fmt % (prefix, name)
+
+ def _c_function_call(self, ent, prefix):
+ """Return the function name used for calling."""
+ if ent.handcode:
+ # _c_function does not handle this case
+ formats = { True: '%s(%s)', False: '%s%s' }
+ fmt = formats[prefix.isupper()]
+ name = fmt % (prefix, ent.handcode)
+ elif self.need_entry_point(ent):
+ name = self._c_function(ent, prefix, True)
+ else:
+ name = self._c_function(ent.alias, prefix, True)
+ return name
+
+ def _c_decl(self, ent, prefix, mangle=False, export=''):
"""Return the C declaration for the entry."""
- decl = '%s %s %s%s(%s)' % (ent.c_return(), self.api_entry,
- prefix, ent.name, ent.c_params())
- if need_attr and self.api_attrs:
+ decl = '%s %s %s(%s)' % (ent.c_return(), self.api_entry,
+ self._c_function(ent, prefix, mangle), ent.c_params())
+ if export:
+ decl = export + ' ' + decl
+ if self.api_attrs:
decl += ' ' + self.api_attrs
return decl
@@ -281,37 +411,60 @@ class ABIPrinter(object):
def c_private_declarations(self, prefix):
"""Return the declarations of private functions."""
- decls = [self._c_decl(ent, prefix)
+ decls = [self._c_decl(ent, prefix) + ';'
for ent in self.entries if not ent.alias]
- return ";\n".join(decls) + ";"
+ return "\n".join(decls)
- def c_public_dispatches(self, prefix):
+ def c_public_dispatches(self, prefix, no_hidden):
"""Return the public dispatch functions."""
dispatches = []
for ent in self.entries:
- if ent.hidden:
+ if ent.hidden and no_hidden:
continue
- proto = self.api_call + ' ' + self._c_decl(ent, prefix)
+ if not self.need_entry_point(ent):
+ continue
+
+ export = self.api_call if not ent.hidden else ''
+
+ proto = self._c_decl(ent, prefix, True, export)
cast = self._c_cast(ent)
ret = ''
if ent.ret:
ret = 'return '
stmt1 = self.indent
- stmt1 += 'const struct mapi_table *tbl = u_current_get();'
+ stmt1 += 'const struct mapi_table *_tbl = %s();' % (
+ self.current_get)
stmt2 = self.indent
- stmt2 += 'mapi_func func = ((const mapi_func *) tbl)[%d];' % (
+ stmt2 += 'mapi_func _func = ((const mapi_func *) _tbl)[%d];' % (
ent.slot)
stmt3 = self.indent
- stmt3 += '%s((%s) func)(%s);' % (ret, cast, ent.c_args())
+ stmt3 += '%s((%s) _func)(%s);' % (ret, cast, ent.c_args())
disp = '%s\n{\n%s\n%s\n%s\n}' % (proto, stmt1, stmt2, stmt3)
+
+ if ent.handcode:
+ disp = '#if 0\n' + disp + '\n#endif'
+
dispatches.append(disp)
return '\n\n'.join(dispatches)
+ def c_public_initializer(self, prefix):
+ """Return the initializer for public dispatch functions."""
+ names = []
+ for ent in self.entries:
+ if ent.alias:
+ continue
+
+ name = '%s(mapi_func) %s' % (self.indent,
+ self._c_function_call(ent, prefix))
+ names.append(name)
+
+ return ',\n'.join(names)
+
def c_stub_string_pool(self):
"""Return the string pool for use by stubs."""
# sort entries by their names
@@ -334,8 +487,8 @@ class ABIPrinter(object):
"""Return the initializer for struct mapi_stub array."""
stubs = []
for ent in self.entries_sorted_by_names:
- stubs.append('%s{ (mapi_func) %s%s, %d, (void *) %d }' % (
- self.indent, prefix, ent.name, ent.slot, pool_offsets[ent]))
+ stubs.append('%s{ (void *) %d, %d, NULL }' % (
+ self.indent, pool_offsets[ent], ent.slot))
return ',\n'.join(stubs)
@@ -346,10 +499,10 @@ class ABIPrinter(object):
if ent.alias:
continue
- proto = 'static ' + self._c_decl(ent, prefix)
+ proto = self._c_decl(ent, prefix, False, 'static')
- stmt1 = self.indent + '%s("%s%s");' % (
- self.noop_warn, warn_prefix, ent.name)
+ stmt1 = self.indent + '%s(%s);' % (self.noop_warn,
+ self._c_function(ent, warn_prefix, False, True))
if ent.ret:
stmt2 = self.indent + 'return (%s) 0;' % (ent.ret)
@@ -363,7 +516,8 @@ class ABIPrinter(object):
def c_noop_initializer(self, prefix, use_generic):
"""Return an initializer for the noop dispatch table."""
- entries = [prefix + ent.name for ent in self.entries if not ent.alias]
+ entries = [self._c_function(ent, prefix)
+ for ent in self.entries if not ent.alias]
if use_generic:
entries = [self.noop_generic] * len(entries)
@@ -372,86 +526,138 @@ class ABIPrinter(object):
pre = self.indent + '(mapi_func) '
return pre + (',\n' + pre).join(entries)
- def c_asm_gcc(self, prefix):
+ def c_asm_gcc(self, prefix, no_hidden):
asm = []
- to_name = None
- asm.append('__asm__(')
for ent in self.entries:
- name = prefix + ent.name
+ if ent.hidden and no_hidden:
+ continue
+
+ if not self.need_entry_point(ent):
+ continue
+
+ name = self._c_function(ent, prefix, True, True)
+
+ if ent.handcode:
+ asm.append('#if 0')
if ent.hidden:
- asm.append('".hidden %s\\n"' % (name))
+ asm.append('".hidden "%s"\\n"' % (name))
- if ent.alias:
- asm.append('".globl %s\\n"' % (name))
- asm.append('".set %s, %s\\n"' % (name, to_name))
+ if ent.alias and not (ent.alias.hidden and no_hidden):
+ asm.append('".globl "%s"\\n"' % (name))
+ asm.append('".set "%s", "%s"\\n"' % (name,
+ self._c_function(ent.alias, prefix, True, True)))
else:
- asm.append('STUB_ASM_ENTRY("%s")"\\n"' % (name))
+ asm.append('STUB_ASM_ENTRY(%s)"\\n"' % (name))
asm.append('"\\t"STUB_ASM_CODE("%d")"\\n"' % (ent.slot))
- to_name = name
- asm.append(');')
+
+ if ent.handcode:
+ asm.append('#endif')
+ asm.append('')
return "\n".join(asm)
def output_for_lib(self):
- print self.c_header()
- print
- print '#ifdef MAPI_TMP_DEFINES'
- print self.c_includes()
- print '#undef MAPI_TMP_DEFINES'
- print '#endif /* MAPI_TMP_DEFINES */'
- print
- print '#ifdef MAPI_TMP_TABLE'
- print self.c_mapi_table()
- print '#undef MAPI_TMP_TABLE'
- print '#endif /* MAPI_TMP_TABLE */'
- print
+ print self.c_notice()
- pool, pool_offsets = self.c_stub_string_pool()
- print '#ifdef MAPI_TMP_PUBLIC_STUBS'
- print 'static const char public_string_pool[] ='
- print pool
- print
- print 'static const struct mapi_stub public_stubs[] = {'
- print self.c_stub_initializer(self.prefix_lib, pool_offsets)
- print '};'
- print '#undef MAPI_TMP_PUBLIC_STUBS'
- print '#endif /* MAPI_TMP_PUBLIC_STUBS */'
- print
+ if self.c_header:
+ print
+ print self.c_header
- print '#ifdef MAPI_TMP_PUBLIC_ENTRIES'
- print self.c_public_dispatches(self.prefix_lib)
- print '#undef MAPI_TMP_PUBLIC_ENTRIES'
- print '#endif /* MAPI_TMP_PUBLIC_ENTRIES */'
- print
-
- print '#ifdef MAPI_TMP_NOOP_ARRAY'
- print '#ifdef DEBUG'
- print
- print self.c_noop_functions(self.prefix_noop, self.prefix_lib)
print
- print 'const mapi_func table_%s_array[] = {' % (self.prefix_noop)
- print self.c_noop_initializer(self.prefix_noop, False)
- print '};'
- print
- print '#else /* DEBUG */'
- print
- print 'const mapi_func table_%s_array[] = {' % (self.prefix_noop)
- print self.c_noop_initializer(self.prefix_noop, True)
- print '};'
- print '#endif /* DEBUG */'
- print '#undef MAPI_TMP_NOOP_ARRAY'
- print '#endif /* MAPI_TMP_NOOP_ARRAY */'
+ print '#ifdef MAPI_TMP_DEFINES'
+ print self.c_public_includes()
print
+ print self.c_public_declarations(self.prefix_lib)
+ print '#undef MAPI_TMP_DEFINES'
+ print '#endif /* MAPI_TMP_DEFINES */'
- print '#ifdef MAPI_TMP_STUB_ASM_GCC'
- print self.c_asm_gcc(self.prefix_lib)
- print '#undef MAPI_TMP_STUB_ASM_GCC'
- print '#endif /* MAPI_TMP_STUB_ASM_GCC */'
+ if self.lib_need_table_size:
+ print
+ print '#ifdef MAPI_TMP_TABLE'
+ print self.c_mapi_table()
+ print '#undef MAPI_TMP_TABLE'
+ print '#endif /* MAPI_TMP_TABLE */'
+
+ if self.lib_need_noop_array:
+ print
+ print '#ifdef MAPI_TMP_NOOP_ARRAY'
+ print '#ifdef DEBUG'
+ print
+ print self.c_noop_functions(self.prefix_noop, self.prefix_warn)
+ print
+ print 'const mapi_func table_%s_array[] = {' % (self.prefix_noop)
+ print self.c_noop_initializer(self.prefix_noop, False)
+ print '};'
+ print
+ print '#else /* DEBUG */'
+ print
+ print 'const mapi_func table_%s_array[] = {' % (self.prefix_noop)
+ print self.c_noop_initializer(self.prefix_noop, True)
+ print '};'
+ print
+ print '#endif /* DEBUG */'
+ print '#undef MAPI_TMP_NOOP_ARRAY'
+ print '#endif /* MAPI_TMP_NOOP_ARRAY */'
+
+ if self.lib_need_stubs:
+ pool, pool_offsets = self.c_stub_string_pool()
+ print
+ print '#ifdef MAPI_TMP_PUBLIC_STUBS'
+ print 'static const char public_string_pool[] ='
+ print pool
+ print
+ print 'static const struct mapi_stub public_stubs[] = {'
+ print self.c_stub_initializer(self.prefix_lib, pool_offsets)
+ print '};'
+ print '#undef MAPI_TMP_PUBLIC_STUBS'
+ print '#endif /* MAPI_TMP_PUBLIC_STUBS */'
+
+ if self.lib_need_all_entries:
+ print
+ print '#ifdef MAPI_TMP_PUBLIC_ENTRIES'
+ print self.c_public_dispatches(self.prefix_lib, False)
+ print
+ print 'static const mapi_func public_entries[] = {'
+ print self.c_public_initializer(self.prefix_lib)
+ print '};'
+ print '#undef MAPI_TMP_PUBLIC_ENTRIES'
+ print '#endif /* MAPI_TMP_PUBLIC_ENTRIES */'
+
+ print
+ print '#ifdef MAPI_TMP_STUB_ASM_GCC'
+ print '__asm__('
+ print self.c_asm_gcc(self.prefix_lib, False)
+ print ');'
+ print '#undef MAPI_TMP_STUB_ASM_GCC'
+ print '#endif /* MAPI_TMP_STUB_ASM_GCC */'
+
+ if self.lib_need_non_hidden_entries:
+ all_hidden = True
+ for ent in self.entries:
+ if not ent.hidden:
+ all_hidden = False
+ break
+ if not all_hidden:
+ print
+ print '#ifdef MAPI_TMP_PUBLIC_ENTRIES_NO_HIDDEN'
+ print self.c_public_dispatches(self.prefix_lib, True)
+ print
+ print '/* does not need public_entries */'
+ print '#undef MAPI_TMP_PUBLIC_ENTRIES_NO_HIDDEN'
+ print '#endif /* MAPI_TMP_PUBLIC_ENTRIES_NO_HIDDEN */'
+
+ print
+ print '#ifdef MAPI_TMP_STUB_ASM_GCC_NO_HIDDEN'
+ print '__asm__('
+ print self.c_asm_gcc(self.prefix_lib, True)
+ print ');'
+ print '#undef MAPI_TMP_STUB_ASM_GCC_NO_HIDDEN'
+ print '#endif /* MAPI_TMP_STUB_ASM_GCC_NO_HIDDEN */'
def output_for_app(self):
- print self.c_header()
+ print self.c_notice()
print
print self.c_private_declarations(self.prefix_app)
print
@@ -469,8 +675,9 @@ class ABIPrinter(object):
class GLAPIPrinter(ABIPrinter):
"""OpenGL API Printer"""
- def __init__(self, entries):
- super(GLAPIPrinter, self).__init__(entries)
+ def __init__(self, entries, api=None):
+ api_entries = self._get_api_entries(entries, api)
+ super(GLAPIPrinter, self).__init__(api_entries)
self.api_defines = ['GL_GLEXT_PROTOTYPES']
self.api_headers = ['"GL/gl.h"', '"GL/glext.h"']
@@ -478,33 +685,539 @@ class GLAPIPrinter(ABIPrinter):
self.api_entry = 'APIENTRY'
self.api_attrs = ''
- self.prefix_lib = 'gl'
+ self.lib_need_table_size = False
+ self.lib_need_noop_array = False
+ self.lib_need_stubs = False
+ self.lib_need_all_entries = False
+ self.lib_need_non_hidden_entries = True
+
+ self.prefix_lib = 'GLAPI_PREFIX'
self.prefix_app = '_mesa_'
self.prefix_noop = 'noop'
+ self.prefix_warn = self.prefix_lib
- def output_for_app(self):
- # not used
- pass
+ self.c_header = self._get_c_header()
+
+ def _get_api_entries(self, entries, api):
+ """Override the entry attributes according to API."""
+ import copy
+
+ # no override
+ if api is None:
+ return entries
+
+ api_entries = {}
+ for ent in entries:
+ ent = copy.copy(ent)
+
+ # override 'hidden' and 'handcode'
+ ent.hidden = ent.name not in api
+ ent.handcode = False
+ if ent.alias:
+ ent.alias = api_entries[ent.alias.name]
+
+ api_entries[ent.name] = ent
+
+ # sanity check
+ missed = [name for name in api if name not in api_entries]
+ if missed:
+ raise Exception('%s is missing' % str(missed))
+
+ entries = api_entries.values()
+ entries.sort()
+
+ return entries
+
+ def _get_c_header(self):
+ header = """#ifndef _GLAPI_TMP_H_
+#define _GLAPI_TMP_H_
+#ifdef USE_MGL_NAMESPACE
+#define GLAPI_PREFIX(func) mgl##func
+#define GLAPI_PREFIX_STR(func) "mgl"#func
+#else
+#define GLAPI_PREFIX(func) gl##func
+#define GLAPI_PREFIX_STR(func) "gl"#func
+#endif /* USE_MGL_NAMESPACE */
+
+typedef int GLfixed;
+typedef int GLclampx;
+#endif /* _GLAPI_TMP_H_ */"""
+
+ return header
class ES1APIPrinter(GLAPIPrinter):
"""OpenGL ES 1.x API Printer"""
def __init__(self, entries):
- super(ES1APIPrinter, self).__init__(entries)
+ es1_api = [
+ # OpenGL ES 1.1
+ 'ActiveTexture',
+ 'AlphaFunc',
+ 'AlphaFuncx',
+ 'BindBuffer',
+ 'BindTexture',
+ 'BlendFunc',
+ 'BufferData',
+ 'BufferSubData',
+ 'Clear',
+ 'ClearColor',
+ 'ClearColorx',
+ 'ClearDepthf',
+ 'ClearDepthx',
+ 'ClearStencil',
+ 'ClientActiveTexture',
+ 'ClipPlanef',
+ 'ClipPlanex',
+ 'Color4f',
+ 'Color4ub',
+ 'Color4x',
+ 'ColorMask',
+ 'ColorPointer',
+ 'CompressedTexImage2D',
+ 'CompressedTexSubImage2D',
+ 'CopyTexImage2D',
+ 'CopyTexSubImage2D',
+ 'CullFace',
+ 'DeleteBuffers',
+ 'DeleteTextures',
+ 'DepthFunc',
+ 'DepthMask',
+ 'DepthRangef',
+ 'DepthRangex',
+ 'Disable',
+ 'DisableClientState',
+ 'DrawArrays',
+ 'DrawElements',
+ 'Enable',
+ 'EnableClientState',
+ 'Finish',
+ 'Flush',
+ 'Fogf',
+ 'Fogfv',
+ 'Fogx',
+ 'Fogxv',
+ 'FrontFace',
+ 'Frustumf',
+ 'Frustumx',
+ 'GenBuffers',
+ 'GenTextures',
+ 'GetBooleanv',
+ 'GetBufferParameteriv',
+ 'GetClipPlanef',
+ 'GetClipPlanex',
+ 'GetError',
+ 'GetFixedv',
+ 'GetFloatv',
+ 'GetIntegerv',
+ 'GetLightfv',
+ 'GetLightxv',
+ 'GetMaterialfv',
+ 'GetMaterialxv',
+ 'GetPointerv',
+ 'GetString',
+ 'GetTexEnvfv',
+ 'GetTexEnviv',
+ 'GetTexEnvxv',
+ 'GetTexParameterfv',
+ 'GetTexParameteriv',
+ 'GetTexParameterxv',
+ 'Hint',
+ 'IsBuffer',
+ 'IsEnabled',
+ 'IsTexture',
+ 'Lightf',
+ 'Lightfv',
+ 'LightModelf',
+ 'LightModelfv',
+ 'LightModelx',
+ 'LightModelxv',
+ 'Lightx',
+ 'Lightxv',
+ 'LineWidth',
+ 'LineWidthx',
+ 'LoadIdentity',
+ 'LoadMatrixf',
+ 'LoadMatrixx',
+ 'LogicOp',
+ 'Materialf',
+ 'Materialfv',
+ 'Materialx',
+ 'Materialxv',
+ 'MatrixMode',
+ 'MultiTexCoord4f',
+ 'MultiTexCoord4x',
+ 'MultMatrixf',
+ 'MultMatrixx',
+ 'Normal3f',
+ 'Normal3x',
+ 'NormalPointer',
+ 'Orthof',
+ 'Orthox',
+ 'PixelStorei',
+ 'PointParameterf',
+ 'PointParameterfv',
+ 'PointParameterx',
+ 'PointParameterxv',
+ 'PointSize',
+ 'PointSizex',
+ 'PolygonOffset',
+ 'PolygonOffsetx',
+ 'PopMatrix',
+ 'PushMatrix',
+ 'ReadPixels',
+ 'Rotatef',
+ 'Rotatex',
+ 'SampleCoverage',
+ 'SampleCoveragex',
+ 'Scalef',
+ 'Scalex',
+ 'Scissor',
+ 'ShadeModel',
+ 'StencilFunc',
+ 'StencilMask',
+ 'StencilOp',
+ 'TexCoordPointer',
+ 'TexEnvf',
+ 'TexEnvfv',
+ 'TexEnvi',
+ 'TexEnviv',
+ 'TexEnvx',
+ 'TexEnvxv',
+ 'TexImage2D',
+ 'TexParameterf',
+ 'TexParameterfv',
+ 'TexParameteri',
+ 'TexParameteriv',
+ 'TexParameterx',
+ 'TexParameterxv',
+ 'TexSubImage2D',
+ 'Translatef',
+ 'Translatex',
+ 'VertexPointer',
+ 'Viewport',
+ # GL_OES_EGL_image
+ 'EGLImageTargetTexture2DOES',
+ 'EGLImageTargetRenderbufferStorageOES',
+ # GL_OES_mapbuffer
+ 'GetBufferPointervOES',
+ 'MapBufferOES',
+ 'UnmapBufferOES',
+ # GL_EXT_multi_draw_arrays
+ 'MultiDrawArraysEXT',
+ 'MultiDrawElementsEXT',
+ # GL_OES_blend_equation_separate
+ 'BlendEquationSeparateOES',
+ # GL_OES_blend_func_separate
+ 'BlendFuncSeparateOES',
+ # GL_OES_blend_subtract
+ 'BlendEquationOES',
+ # GL_OES_draw_texture
+ 'DrawTexiOES',
+ 'DrawTexivOES',
+ 'DrawTexfOES',
+ 'DrawTexfvOES',
+ 'DrawTexsOES',
+ 'DrawTexsvOES',
+ 'DrawTexxOES',
+ 'DrawTexxvOES',
+ # GL_OES_fixed_point
+ 'AlphaFuncxOES',
+ 'ClearColorxOES',
+ 'ClearDepthxOES',
+ 'Color4xOES',
+ 'DepthRangexOES',
+ 'FogxOES',
+ 'FogxvOES',
+ 'FrustumxOES',
+ 'LightModelxOES',
+ 'LightModelxvOES',
+ 'LightxOES',
+ 'LightxvOES',
+ 'LineWidthxOES',
+ 'LoadMatrixxOES',
+ 'MaterialxOES',
+ 'MaterialxvOES',
+ 'MultiTexCoord4xOES',
+ 'MultMatrixxOES',
+ 'Normal3xOES',
+ 'OrthoxOES',
+ 'PointSizexOES',
+ 'PolygonOffsetxOES',
+ 'RotatexOES',
+ 'SampleCoveragexOES',
+ 'ScalexOES',
+ 'TexEnvxOES',
+ 'TexEnvxvOES',
+ 'TexParameterxOES',
+ 'TranslatexOES',
+ 'ClipPlanexOES',
+ 'GetClipPlanexOES',
+ 'GetFixedvOES',
+ 'GetLightxvOES',
+ 'GetMaterialxvOES',
+ 'GetTexEnvxvOES',
+ 'GetTexParameterxvOES',
+ 'PointParameterxOES',
+ 'PointParameterxvOES',
+ 'TexParameterxvOES',
+ # GL_OES_framebuffer_object
+ 'BindFramebufferOES',
+ 'BindRenderbufferOES',
+ 'CheckFramebufferStatusOES',
+ 'DeleteFramebuffersOES',
+ 'DeleteRenderbuffersOES',
+ 'FramebufferRenderbufferOES',
+ 'FramebufferTexture2DOES',
+ 'GenerateMipmapOES',
+ 'GenFramebuffersOES',
+ 'GenRenderbuffersOES',
+ 'GetFramebufferAttachmentParameterivOES',
+ 'GetRenderbufferParameterivOES',
+ 'IsFramebufferOES',
+ 'IsRenderbufferOES',
+ 'RenderbufferStorageOES',
+ # GL_OES_point_size_array
+ 'PointSizePointerOES',
+ # GL_OES_query_matrix
+ 'QueryMatrixxOES',
+ # GL_OES_single_precision
+ 'ClearDepthfOES',
+ 'DepthRangefOES',
+ 'FrustumfOES',
+ 'OrthofOES',
+ 'ClipPlanefOES',
+ 'GetClipPlanefOES',
+ # GL_OES_texture_cube_map
+ 'GetTexGenfvOES',
+ 'GetTexGenivOES',
+ 'GetTexGenxvOES',
+ 'TexGenfOES',
+ 'TexGenfvOES',
+ 'TexGeniOES',
+ 'TexGenivOES',
+ 'TexGenxOES',
+ 'TexGenxvOES',
+ ]
+
+ super(ES1APIPrinter, self).__init__(entries, es1_api)
+ self.prefix_lib = 'gl'
+ self.prefix_warn = 'gl'
- self.api_headers = ['"GLES/gl.h"', '"GLES/glext.h"']
- self.api_call = 'GL_API'
- self.api_entry = 'GL_APIENTRY'
+ def _get_c_header(self):
+ header = """#ifndef _GLAPI_TMP_H_
+#define _GLAPI_TMP_H_
+typedef int GLfixed;
+typedef int GLclampx;
+#endif /* _GLAPI_TMP_H_ */"""
+
+ return header
class ES2APIPrinter(GLAPIPrinter):
"""OpenGL ES 2.x API Printer"""
def __init__(self, entries):
- super(ES2APIPrinter, self).__init__(entries)
+ es2_api = [
+ # OpenGL ES 2.0
+ "ActiveTexture",
+ "AttachShader",
+ "BindAttribLocation",
+ "BindBuffer",
+ "BindFramebuffer",
+ "BindRenderbuffer",
+ "BindTexture",
+ "BlendColor",
+ "BlendEquation",
+ "BlendEquationSeparate",
+ "BlendFunc",
+ "BlendFuncSeparate",
+ "BufferData",
+ "BufferSubData",
+ "CheckFramebufferStatus",
+ "Clear",
+ "ClearColor",
+ "ClearDepthf",
+ "ClearStencil",
+ "ColorMask",
+ "CompileShader",
+ "CompressedTexImage2D",
+ "CompressedTexSubImage2D",
+ "CopyTexImage2D",
+ "CopyTexSubImage2D",
+ "CreateProgram",
+ "CreateShader",
+ "CullFace",
+ "DeleteBuffers",
+ "DeleteFramebuffers",
+ "DeleteProgram",
+ "DeleteRenderbuffers",
+ "DeleteShader",
+ "DeleteTextures",
+ "DepthFunc",
+ "DepthMask",
+ "DepthRangef",
+ "DetachShader",
+ "Disable",
+ "DisableVertexAttribArray",
+ "DrawArrays",
+ "DrawElements",
+ "Enable",
+ "EnableVertexAttribArray",
+ "Finish",
+ "Flush",
+ "FramebufferRenderbuffer",
+ "FramebufferTexture2D",
+ "FrontFace",
+ "GenBuffers",
+ "GenerateMipmap",
+ "GenFramebuffers",
+ "GenRenderbuffers",
+ "GenTextures",
+ "GetActiveAttrib",
+ "GetActiveUniform",
+ "GetAttachedShaders",
+ "GetAttribLocation",
+ "GetBooleanv",
+ "GetBufferParameteriv",
+ "GetError",
+ "GetFloatv",
+ "GetFramebufferAttachmentParameteriv",
+ "GetIntegerv",
+ "GetProgramInfoLog",
+ "GetProgramiv",
+ "GetRenderbufferParameteriv",
+ "GetShaderInfoLog",
+ "GetShaderiv",
+ "GetShaderPrecisionFormat",
+ "GetShaderSource",
+ "GetString",
+ "GetTexParameterfv",
+ "GetTexParameteriv",
+ "GetUniformfv",
+ "GetUniformiv",
+ "GetUniformLocation",
+ "GetVertexAttribfv",
+ "GetVertexAttribiv",
+ "GetVertexAttribPointerv",
+ "Hint",
+ "IsBuffer",
+ "IsEnabled",
+ "IsFramebuffer",
+ "IsProgram",
+ "IsRenderbuffer",
+ "IsShader",
+ "IsTexture",
+ "LineWidth",
+ "LinkProgram",
+ "PixelStorei",
+ "PolygonOffset",
+ "ReadPixels",
+ "ReleaseShaderCompiler",
+ "RenderbufferStorage",
+ "SampleCoverage",
+ "Scissor",
+ "ShaderBinary",
+ "ShaderSource",
+ "StencilFunc",
+ "StencilFuncSeparate",
+ "StencilMask",
+ "StencilMaskSeparate",
+ "StencilOp",
+ "StencilOpSeparate",
+ "TexImage2D",
+ "TexParameterf",
+ "TexParameterfv",
+ "TexParameteri",
+ "TexParameteriv",
+ "TexSubImage2D",
+ "Uniform1f",
+ "Uniform1fv",
+ "Uniform1i",
+ "Uniform1iv",
+ "Uniform2f",
+ "Uniform2fv",
+ "Uniform2i",
+ "Uniform2iv",
+ "Uniform3f",
+ "Uniform3fv",
+ "Uniform3i",
+ "Uniform3iv",
+ "Uniform4f",
+ "Uniform4fv",
+ "Uniform4i",
+ "Uniform4iv",
+ "UniformMatrix2fv",
+ "UniformMatrix3fv",
+ "UniformMatrix4fv",
+ "UseProgram",
+ "ValidateProgram",
+ "VertexAttrib1f",
+ "VertexAttrib1fv",
+ "VertexAttrib2f",
+ "VertexAttrib2fv",
+ "VertexAttrib3f",
+ "VertexAttrib3fv",
+ "VertexAttrib4f",
+ "VertexAttrib4fv",
+ "VertexAttribPointer",
+ "Viewport",
+ # GL_OES_EGL_image
+ 'EGLImageTargetTexture2DOES',
+ 'EGLImageTargetRenderbufferStorageOES',
+ # GL_OES_mapbuffer
+ 'GetBufferPointervOES',
+ 'MapBufferOES',
+ 'UnmapBufferOES',
+ # GL_EXT_multi_draw_arrays
+ 'MultiDrawArraysEXT',
+ 'MultiDrawElementsEXT',
+ # GL_OES_texture_3D
+ 'CompressedTexImage3DOES',
+ 'CompressedTexSubImage3DOES',
+ 'CopyTexSubImage3DOES',
+ 'FramebufferTexture3DOES',
+ 'TexImage3DOES',
+ 'TexSubImage3DOES',
+ # GL_OES_get_program_binary
+ 'GetProgramBinaryOES',
+ 'ProgramBinaryOES',
+ ]
+
+ super(ES2APIPrinter, self).__init__(entries, es2_api)
+ self.prefix_lib = 'gl'
+ self.prefix_warn = 'gl'
+
+ def _get_c_header(self):
+ header = """#ifndef _GLAPI_TMP_H_
+#define _GLAPI_TMP_H_
+typedef int GLfixed;
+typedef int GLclampx;
+#endif /* _GLAPI_TMP_H_ */"""
+
+ return header
+
+class SharedGLAPIPrinter(GLAPIPrinter):
+ """Shared GLAPI API Printer"""
+
+ def __init__(self, entries):
+ super(SharedGLAPIPrinter, self).__init__(entries, [])
+
+ self.lib_need_table_size = True
+ self.lib_need_noop_array = True
+ self.lib_need_stubs = True
+ self.lib_need_all_entries = True
+ self.lib_need_non_hidden_entries = False
+
+ self.prefix_lib = 'shared'
+ self.prefix_warn = 'gl'
- self.api_headers = ['"GLES2/gl2.h"', '"GLES2/gl2ext.h"']
- self.api_call = 'GL_APICALL'
- self.api_entry = 'GL_APIENTRY'
+ def _get_c_header(self):
+ header = """#ifndef _GLAPI_TMP_H_
+#define _GLAPI_TMP_H_
+typedef int GLfixed;
+typedef int GLclampx;
+#endif /* _GLAPI_TMP_H_ */"""
+
+ return header
class VGAPIPrinter(ABIPrinter):
"""OpenVG API Printer"""
@@ -521,9 +1234,10 @@ class VGAPIPrinter(ABIPrinter):
self.prefix_lib = 'vg'
self.prefix_app = 'vega'
self.prefix_noop = 'noop'
+ self.prefix_warn = 'vg'
def parse_args():
- printers = ['glapi', 'es1api', 'es2api', 'vgapi']
+ printers = ['vgapi', 'glapi', 'es1api', 'es2api', 'shared-glapi']
modes = ['lib', 'app']
parser = OptionParser(usage='usage: %prog [options] <filename>')
@@ -545,12 +1259,18 @@ def main():
'vgapi': VGAPIPrinter,
'glapi': GLAPIPrinter,
'es1api': ES1APIPrinter,
- 'es2api': ES2APIPrinter
+ 'es2api': ES2APIPrinter,
+ 'shared-glapi': SharedGLAPIPrinter,
}
filename, options = parse_args()
- entries = abi_parse(filename)
+ if filename.endswith('.xml'):
+ entries = abi_parse_xml(filename)
+ else:
+ entries = abi_parse(filename)
+ abi_sanity_check(entries)
+
printer = printers[options.printer](entries)
if options.mode == 'lib':
printer.output_for_lib()
diff --git a/src/mapi/mapi/mapi_glapi.c b/src/mapi/mapi/mapi_glapi.c
new file mode 100644
index 00000000000..adfc0cbcc9f
--- /dev/null
+++ b/src/mapi/mapi/mapi_glapi.c
@@ -0,0 +1,240 @@
+/*
+ * Mesa 3-D graphics library
+ * Version: 7.9
+ *
+ * Copyright (C) 1999-2008 Brian Paul All Rights Reserved.
+ * Copyright (C) 2010 LunarG Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ * Authors:
+ * Chia-I Wu <olv@lunarg.com>
+ */
+
+#include <string.h>
+#include "glapi/glapi.h"
+#include "mapi/u_current.h"
+#include "mapi/table.h" /* for MAPI_TABLE_NUM_SLOTS */
+#include "mapi/stub.h"
+
+/*
+ * Global variables, _glapi_get_context, and _glapi_get_dispatch are defined in
+ * u_current.c.
+ */
+
+#ifdef GLX_USE_TLS
+/* not used, but defined for compatibility */
+const struct _glapi_table *_glapi_Dispatch;
+const void *_glapi_Context;
+#endif /* GLX_USE_TLS */
+
+void
+_glapi_destroy_multithread(void)
+{
+ u_current_destroy();
+}
+
+void
+_glapi_check_multithread(void)
+{
+ u_current_init();
+}
+
+void
+_glapi_set_context(void *context)
+{
+ u_current_set_user((const void *) context);
+}
+
+void
+_glapi_set_dispatch(struct _glapi_table *dispatch)
+{
+ u_current_set((const struct mapi_table *) dispatch);
+}
+
+/**
+ * Return size of dispatch table struct as number of functions (or
+ * slots).
+ */
+unsigned int
+_glapi_get_dispatch_table_size(void)
+{
+ return MAPI_TABLE_NUM_SLOTS;
+}
+
+/**
+ * Fill-in the dispatch stub for the named function.
+ *
+ * This function is intended to be called by a hardware driver. When called,
+ * a dispatch stub may be created created for the function. A pointer to this
+ * dispatch function will be returned by glXGetProcAddress.
+ *
+ * \param function_names Array of pointers to function names that should
+ * share a common dispatch offset.
+ * \param parameter_signature String representing the types of the parameters
+ * passed to the named function. Parameter types
+ * are converted to characters using the following
+ * rules:
+ * - 'i' for \c GLint, \c GLuint, and \c GLenum
+ * - 'p' for any pointer type
+ * - 'f' for \c GLfloat and \c GLclampf
+ * - 'd' for \c GLdouble and \c GLclampd
+ *
+ * \returns
+ * The offset in the dispatch table of the named function. A pointer to the
+ * driver's implementation of the named function should be stored at
+ * \c dispatch_table[\c offset]. Return -1 if error/problem.
+ *
+ * \sa glXGetProcAddress
+ *
+ * \warning
+ * This function can only handle up to 8 names at a time. As far as I know,
+ * the maximum number of names ever associated with an existing GL function is
+ * 4 (\c glPointParameterfSGIS, \c glPointParameterfEXT,
+ * \c glPointParameterfARB, and \c glPointParameterf), so this should not be
+ * too painful of a limitation.
+ *
+ * \todo
+ * Check parameter_signature.
+ */
+int
+_glapi_add_dispatch( const char * const * function_names,
+ const char * parameter_signature )
+{
+ const struct mapi_stub *function_stubs[8];
+ const struct mapi_stub *alias = NULL;
+ unsigned i;
+
+ (void) memset(function_stubs, 0, sizeof(function_stubs));
+
+ /* find the missing stubs, and decide the alias */
+ for (i = 0; function_names[i] != NULL && i < 8; i++) {
+ const char * funcName = function_names[i];
+ const struct mapi_stub *stub;
+ int slot;
+
+ if (!funcName || funcName[0] != 'g' || funcName[1] != 'l')
+ return -1;
+ funcName += 2;
+
+ stub = stub_find_public(funcName);
+ if (!stub)
+ stub = stub_find_dynamic(funcName, 0);
+
+ slot = (stub) ? stub_get_slot(stub) : -1;
+ if (slot >= 0) {
+ if (alias && stub_get_slot(alias) != slot)
+ return -1;
+ /* use the first existing stub as the alias */
+ if (!alias)
+ alias = stub;
+
+ function_stubs[i] = stub;
+ }
+ }
+
+ /* generate missing stubs */
+ for (i = 0; function_names[i] != NULL && i < 8; i++) {
+ const char * funcName = function_names[i] + 2;
+ struct mapi_stub *stub;
+
+ if (function_stubs[i])
+ continue;
+
+ stub = stub_find_dynamic(funcName, 1);
+ if (!stub)
+ return -1;
+
+ stub_fix_dynamic(stub, alias);
+ if (!alias)
+ alias = stub;
+ }
+
+ return (alias) ? stub_get_slot(alias) : -1;
+}
+
+static const struct mapi_stub *
+_glapi_get_stub(const char *name, int generate)
+{
+ const struct mapi_stub *stub;
+
+#ifdef USE_MGL_NAMESPACE
+ if (name)
+ name++;
+#endif
+
+ if (!name || name[0] != 'g' || name[1] != 'l')
+ return NULL;
+ name += 2;
+
+ stub = stub_find_public(name);
+ if (!stub)
+ stub = stub_find_dynamic(name, generate);
+
+ return stub;
+}
+
+/**
+ * Return offset of entrypoint for named function within dispatch table.
+ */
+int
+_glapi_get_proc_offset(const char *funcName)
+{
+ const struct mapi_stub *stub = _glapi_get_stub(funcName, 0);
+ return (stub) ? stub_get_slot(stub) : -1;
+}
+
+/**
+ * Return pointer to the named function. If the function name isn't found
+ * in the name of static functions, try generating a new API entrypoint on
+ * the fly with assembly language.
+ */
+_glapi_proc
+_glapi_get_proc_address(const char *funcName)
+{
+ const struct mapi_stub *stub = _glapi_get_stub(funcName, 1);
+ return (stub) ? (_glapi_proc) stub_get_addr(stub) : NULL;
+}
+
+/**
+ * Return the name of the function at the given dispatch offset.
+ * This is only intended for debugging.
+ */
+const char *
+_glapi_get_proc_name(unsigned int offset)
+{
+ /* not implemented */
+ return NULL;
+}
+
+unsigned long
+_glthread_GetID(void)
+{
+ return u_thread_self();
+}
+
+void
+_glapi_noop_enable_warnings(unsigned char enable)
+{
+}
+
+void
+_glapi_set_warning_func(_glapi_proc func)
+{
+}
diff --git a/src/mapi/mapi/mapi_tmp.h b/src/mapi/mapi/mapi_tmp.h
index a1b067fb73c..f326b4a4e14 100644
--- a/src/mapi/mapi/mapi_tmp.h
+++ b/src/mapi/mapi/mapi_tmp.h
@@ -30,4 +30,19 @@
#error "MAPI_ABI_HEADER must be defined"
#endif
+/* does not need hidden entries in bridge mode */
+#ifdef MAPI_MODE_BRIDGE
+
+#ifdef MAPI_TMP_PUBLIC_ENTRIES
+#undef MAPI_TMP_PUBLIC_ENTRIES
+#define MAPI_TMP_PUBLIC_ENTRIES_NO_HIDDEN
+#endif
+
+#ifdef MAPI_TMP_STUB_ASM_GCC
+#undef MAPI_TMP_STUB_ASM_GCC
+#define MAPI_TMP_STUB_ASM_GCC_NO_HIDDEN
+#endif
+
+#endif /* MAPI_MODE_BRIDGE */
+
#include MAPI_ABI_HEADER
diff --git a/src/mapi/mapi/sources.mak b/src/mapi/mapi/sources.mak
index 5f327f3df62..c50234b5789 100644
--- a/src/mapi/mapi/sources.mak
+++ b/src/mapi/mapi/sources.mak
@@ -1,12 +1,20 @@
# src/mapi/mapi/sources.mak
#
-# When MAPI_GLAPI_CURRENT is defined, MAPI_GLAPI_SOURCES can be built without
-# MAPI_SOURCES and it is used by glapi.
+# mapi may be used in several ways
#
-# Otherwise, MAPI_ABI_HEADER must be defined. It should expand to the header
-# generated by mapi_abi.py.
+# - In default mode, mapi implements the interface defined by mapi.h. To use
+# this mode, compile MAPI_SOURCES.
+#
+# - In util mode, mapi provides utility functions for use with glapi. To use
+# this mode, compile MAPI_UTIL_SOURCES with MAPI_MODE_UTIL defined.
+#
+# - In glapi mode, mapi implements the interface defined by glapi.h. To use
+# this mode, compile MAPI_GLAPI_SOURCES with MAPI_MODE_GLAPI defined.
+#
+# - In bridge mode, mapi provides entry points calling into glapi. To use
+# this mode, compile MAPI_BRIDGE_SOURCES with MAPI_MODE_BRIDGE defined.
-MAPI_GLAPI_SOURCES = \
+MAPI_UTIL_SOURCES = \
u_current.c \
u_execmem.c \
u_thread.c
@@ -16,4 +24,14 @@ MAPI_SOURCES = \
mapi.c \
stub.c \
table.c \
- $(MAPI_GLAPI_SOURCES)
+ $(MAPI_UTIL_SOURCES)
+
+MAPI_GLAPI_SOURCES = \
+ entry.c \
+ mapi_glapi.c \
+ stub.c \
+ table.c \
+ $(MAPI_UTIL_SOURCES)
+
+MAPI_BRIDGE_SOURCES = \
+ entry.c
diff --git a/src/mapi/mapi/stub.c b/src/mapi/mapi/stub.c
index 3594eacb4ec..99b475a3b4b 100644
--- a/src/mapi/mapi/stub.c
+++ b/src/mapi/mapi/stub.c
@@ -27,7 +27,6 @@
*/
#include <stdlib.h>
-#include <stddef.h> /* for offsetof */
#include <string.h>
#include <assert.h>
@@ -39,6 +38,12 @@
#define ARRAY_SIZE(x) (sizeof(x)/sizeof((x)[0]))
+struct mapi_stub {
+ const void *name;
+ int slot;
+ mapi_func addr;
+};
+
/* define public_string_pool and public_stubs */
#define MAPI_TMP_PUBLIC_STUBS
#include "mapi_tmp.h"
@@ -164,3 +169,39 @@ stub_fix_dynamic(struct mapi_stub *stub, const struct mapi_stub *alias)
entry_patch(stub->addr, slot);
stub->slot = slot;
}
+
+/**
+ * Return the name of a stub.
+ */
+const char *
+stub_get_name(const struct mapi_stub *stub)
+{
+ const char *name;
+
+ if (stub >= public_stubs &&
+ stub < public_stubs + ARRAY_SIZE(public_stubs))
+ name = &public_string_pool[(unsigned long) stub->name];
+ else
+ name = (const char *) stub->name;
+
+ return name;
+}
+
+/**
+ * Return the slot of a stub.
+ */
+int
+stub_get_slot(const struct mapi_stub *stub)
+{
+ return stub->slot;
+}
+
+/**
+ * Return the address of a stub.
+ */
+mapi_func
+stub_get_addr(const struct mapi_stub *stub)
+{
+ assert(stub->addr || (unsigned int) stub->slot < MAPI_TABLE_NUM_STATIC);
+ return (stub->addr) ? stub->addr : entry_get_public(stub->slot);
+}
diff --git a/src/mapi/mapi/stub.h b/src/mapi/mapi/stub.h
index c7e194cf4fc..b2b6f1839c6 100644
--- a/src/mapi/mapi/stub.h
+++ b/src/mapi/mapi/stub.h
@@ -29,13 +29,9 @@
#ifndef _STUB_H_
#define _STUB_H_
-typedef void (*mapi_func)(void);
+#include "entry.h"
-struct mapi_stub {
- mapi_func addr;
- int slot;
- const void *name;
-};
+struct mapi_stub;
void
stub_init_once(void);
@@ -49,4 +45,13 @@ stub_find_dynamic(const char *name, int generate);
void
stub_fix_dynamic(struct mapi_stub *stub, const struct mapi_stub *alias);
+const char *
+stub_get_name(const struct mapi_stub *stub);
+
+int
+stub_get_slot(const struct mapi_stub *stub);
+
+mapi_func
+stub_get_addr(const struct mapi_stub *stub);
+
#endif /* _STUB_H_ */
diff --git a/src/mapi/mapi/table.c b/src/mapi/mapi/table.c
index 8f4f700b920..9bb9f654a2a 100644
--- a/src/mapi/mapi/table.c
+++ b/src/mapi/mapi/table.c
@@ -29,7 +29,6 @@
#include <stdlib.h>
#include <stdio.h>
-#include "stub.h"
#include "table.h"
static void
@@ -41,7 +40,7 @@ noop_warn(const char *name)
debug = (getenv("MESA_DEBUG") || getenv("LIBGL_DEBUG"));
if (debug)
- fprintf(stderr, "%s is no-op", name);
+ fprintf(stderr, "%s is no-op\n", name);
}
static int
@@ -52,5 +51,6 @@ noop_generic(void)
}
/* define noop_array */
+#define MAPI_TMP_DEFINES
#define MAPI_TMP_NOOP_ARRAY
#include "mapi_tmp.h"
diff --git a/src/mapi/mapi/table.h b/src/mapi/mapi/table.h
index ca2be568c70..d84523f7777 100644
--- a/src/mapi/mapi/table.h
+++ b/src/mapi/mapi/table.h
@@ -30,9 +30,8 @@
#define _TABLE_H_
#include "u_compiler.h"
-#include "stub.h"
+#include "entry.h"
-#define MAPI_TMP_DEFINES
#define MAPI_TMP_TABLE
#include "mapi_tmp.h"
@@ -51,24 +50,23 @@ table_get_noop(void)
}
/**
- * Update the dispatch table to dispatch a stub to the given function.
+ * Set the function of a slot.
*/
static INLINE void
-table_set_func(struct mapi_table *tbl,
- const struct mapi_stub *stub, mapi_func func)
+table_set_func(struct mapi_table *tbl, int slot, mapi_func func)
{
mapi_func *funcs = (mapi_func *) tbl;
- funcs[stub->slot] = func;
+ funcs[slot] = func;
}
/**
- * Return the dispatched function of a stub.
+ * Return the function of a slot.
*/
static INLINE mapi_func
-table_get_func(const struct mapi_table *tbl, const struct mapi_stub *stub)
+table_get_func(const struct mapi_table *tbl, int slot)
{
const mapi_func *funcs = (const mapi_func *) tbl;
- return funcs[stub->slot];
+ return funcs[slot];
}
#endif /* _TABLE_H_ */
diff --git a/src/mapi/mapi/u_current.c b/src/mapi/mapi/u_current.c
index 77a593b330c..21a07abbae5 100644
--- a/src/mapi/mapi/u_current.c
+++ b/src/mapi/mapi/u_current.c
@@ -51,7 +51,7 @@
#include "u_current.h"
#include "u_thread.h"
-#ifndef MAPI_GLAPI_CURRENT
+#ifndef MAPI_MODE_UTIL
#include "table.h"
#include "stub.h"
@@ -99,16 +99,13 @@ extern void (*__glapi_noop_table[])(void);
/*@{*/
#if defined(GLX_USE_TLS)
-__thread struct mapi_table *u_current_table_tls
+__thread struct mapi_table *u_current_table
__attribute__((tls_model("initial-exec")))
= (struct mapi_table *) table_noop_array;
-__thread void *u_current_user_tls
+__thread void *u_current_user
__attribute__((tls_model("initial-exec")));
-const struct mapi_table *u_current_table;
-const void *u_current_user;
-
#else
struct mapi_table *u_current_table =
@@ -147,15 +144,7 @@ u_current_init_tsd(void)
/**
* Mutex for multithread check.
*/
-#ifdef WIN32
-/* _glthread_DECLARE_STATIC_MUTEX is broken on windows. There will be race! */
-#define CHECK_MULTITHREAD_LOCK()
-#define CHECK_MULTITHREAD_UNLOCK()
-#else
u_mutex_declare_static(ThreadCheckMutex);
-#define CHECK_MULTITHREAD_LOCK() u_mutex_lock(ThreadCheckMutex)
-#define CHECK_MULTITHREAD_UNLOCK() u_mutex_unlock(ThreadCheckMutex)
-#endif
/**
* We should call this periodically from a function such as glXMakeCurrent
@@ -170,7 +159,7 @@ u_current_init(void)
if (ThreadSafe)
return;
- CHECK_MULTITHREAD_LOCK();
+ u_mutex_lock(ThreadCheckMutex);
if (firstCall) {
u_current_init_tsd();
@@ -179,10 +168,10 @@ u_current_init(void)
}
else if (knownID != u_thread_self()) {
ThreadSafe = 1;
- u_current_set_internal(NULL);
- u_current_set_user_internal(NULL);
+ u_current_set(NULL);
+ u_current_set_user(NULL);
}
- CHECK_MULTITHREAD_UNLOCK();
+ u_mutex_unlock(ThreadCheckMutex);
}
#else
@@ -202,17 +191,17 @@ u_current_init(void)
* void from the real context pointer type.
*/
void
-u_current_set_user_internal(void *ptr)
+u_current_set_user(const void *ptr)
{
u_current_init();
#if defined(GLX_USE_TLS)
- u_current_user_tls = ptr;
+ u_current_user = (void *) ptr;
#elif defined(THREADS)
- u_tsd_set(&u_current_user_tsd, ptr);
- u_current_user = (ThreadSafe) ? NULL : ptr;
+ u_tsd_set(&u_current_user_tsd, (void *) ptr);
+ u_current_user = (ThreadSafe) ? NULL : (void *) ptr;
#else
- u_current_user = ptr;
+ u_current_user = (void *) ptr;
#endif
}
@@ -225,7 +214,7 @@ void *
u_current_get_user_internal(void)
{
#if defined(GLX_USE_TLS)
- return u_current_user_tls;
+ return u_current_user;
#elif defined(THREADS)
return (ThreadSafe)
? u_tsd_get(&u_current_user_tsd)
@@ -241,22 +230,22 @@ u_current_get_user_internal(void)
* table (__glapi_noop_table).
*/
void
-u_current_set_internal(struct mapi_table *tbl)
+u_current_set(const struct mapi_table *tbl)
{
u_current_init();
stub_init_once();
if (!tbl)
- tbl = (struct mapi_table *) table_noop_array;
+ tbl = (const struct mapi_table *) table_noop_array;
#if defined(GLX_USE_TLS)
- u_current_table_tls = tbl;
+ u_current_table = (struct mapi_table *) tbl;
#elif defined(THREADS)
u_tsd_set(&u_current_table_tsd, (void *) tbl);
- u_current_table = (ThreadSafe) ? NULL : tbl;
+ u_current_table = (ThreadSafe) ? NULL : (void *) tbl;
#else
- u_current_table = tbl;
+ u_current_table = (struct mapi_table *) tbl;
#endif
}
@@ -267,7 +256,7 @@ struct mapi_table *
u_current_get_internal(void)
{
#if defined(GLX_USE_TLS)
- return u_current_table_tls;
+ return u_current_table;
#elif defined(THREADS)
return (struct mapi_table *) ((ThreadSafe) ?
u_tsd_get(&u_current_table_tsd) : (void *) u_current_table);
diff --git a/src/mapi/mapi/u_current.h b/src/mapi/mapi/u_current.h
index 62e54c6c93d..f9cffd8c3d0 100644
--- a/src/mapi/mapi/u_current.h
+++ b/src/mapi/mapi/u_current.h
@@ -1,28 +1,28 @@
#ifndef _U_CURRENT_H_
#define _U_CURRENT_H_
-#ifdef MAPI_GLAPI_CURRENT
+#if defined(MAPI_MODE_UTIL) || defined(MAPI_MODE_GLAPI) || \
+ defined(MAPI_MODE_BRIDGE)
#include "glapi/glapi.h"
/* ugly renames to match glapi.h */
#define mapi_table _glapi_table
-#define u_current_table_tls _glapi_tls_Dispatch
-#define u_current_user_tls _glapi_tls_Context
+#ifdef GLX_USE_TLS
+#define u_current_table _glapi_tls_Dispatch
+#define u_current_user _glapi_tls_Context
+#else
#define u_current_table _glapi_Dispatch
#define u_current_user _glapi_Context
+#endif
-#define u_current_destroy _glapi_destroy_multithread
-#define u_current_init _glapi_check_multithread
-#define u_current_set_internal _glapi_set_dispatch
#define u_current_get_internal _glapi_get_dispatch
-#define u_current_set_user_internal _glapi_set_context
#define u_current_get_user_internal _glapi_get_context
#define u_current_table_tsd _gl_DispatchTSD
-#else /* MAPI_GLAPI_CURRENT */
+#else /* MAPI_MODE_UTIL || MAPI_MODE_GLAPI || MAPI_MODE_BRIDGE */
#include "u_compiler.h"
@@ -30,15 +30,12 @@ struct mapi_table;
#ifdef GLX_USE_TLS
-extern __thread struct mapi_table *u_current_table_tls
+extern __thread struct mapi_table *u_current_table
__attribute__((tls_model("initial-exec")));
-extern __thread void *u_current_user_tls
+extern __thread void *u_current_user
__attribute__((tls_model("initial-exec")));
-extern const struct mapi_table *u_current_table;
-extern const void *u_current_user;
-
#else /* GLX_USE_TLS */
extern struct mapi_table *u_current_table;
@@ -46,6 +43,8 @@ extern void *u_current_user;
#endif /* GLX_USE_TLS */
+#endif /* MAPI_MODE_UTIL || MAPI_MODE_GLAPI || MAPI_MODE_BRIDGE */
+
void
u_current_init(void);
@@ -53,50 +52,36 @@ void
u_current_destroy(void);
void
-u_current_set_internal(struct mapi_table *tbl);
+u_current_set(const struct mapi_table *tbl);
struct mapi_table *
u_current_get_internal(void);
void
-u_current_set_user_internal(void *ptr);
+u_current_set_user(const void *ptr);
void *
u_current_get_user_internal(void);
-static INLINE void
-u_current_set(const struct mapi_table *tbl)
-{
- u_current_set_internal((struct mapi_table *) tbl);
-}
-
static INLINE const struct mapi_table *
u_current_get(void)
{
#ifdef GLX_USE_TLS
- return (const struct mapi_table *) u_current_table_tls;
+ return u_current_table;
#else
return (likely(u_current_table) ?
- (const struct mapi_table *) u_current_table : u_current_get_internal());
+ u_current_table : u_current_get_internal());
#endif
}
-static INLINE void
-u_current_set_user(void *ptr)
-{
- u_current_set_internal(ptr);
-}
-
-static INLINE void *
+static INLINE const void *
u_current_get_user(void)
{
#ifdef GLX_USE_TLS
- return u_current_user_tls;
+ return u_current_user;
#else
return likely(u_current_user) ? u_current_user : u_current_get_user_internal();
#endif
}
-#endif /* MAPI_GLAPI_CURRENT */
-
#endif /* _U_CURRENT_H_ */
diff --git a/src/mapi/mapi/u_thread.c b/src/mapi/mapi/u_thread.c
index e9eae55364b..12e748fe8ba 100644
--- a/src/mapi/mapi/u_thread.c
+++ b/src/mapi/mapi/u_thread.c
@@ -113,11 +113,6 @@ u_tsd_set(struct u_tsd *tsd, void *ptr)
*/
#ifdef WIN32
-static void InsteadOf_exit(int nCode)
-{
- DWORD dwErr = GetLastError();
-}
-
unsigned long
u_thread_self(void)
{
@@ -131,7 +126,7 @@ u_tsd_init(struct u_tsd *tsd)
tsd->key = TlsAlloc();
if (tsd->key == TLS_OUT_OF_INDEXES) {
perror(INIT_TSD_ERROR);
- InsteadOf_exit(-1);
+ exit(-1);
}
tsd->initMagic = INIT_MAGIC;
}
@@ -168,7 +163,7 @@ u_tsd_set(struct u_tsd *tsd, void *ptr)
}
if (TlsSetValue(tsd->key, ptr) == 0) {
perror(SET_TSD_ERROR);
- InsteadOf_exit(-1);
+ exit(-1);
}
}
@@ -222,7 +217,7 @@ u_tsd_set(struct u_tsd *tsd, void *ptr)
*/
unsigned long
-_glthread_GetID(void)
+u_thread_self(void)
{
return 0;
}
diff --git a/src/mapi/mapi/u_thread.h b/src/mapi/mapi/u_thread.h
index 92a0a3916d0..1cc8be3fa3f 100644
--- a/src/mapi/mapi/u_thread.h
+++ b/src/mapi/mapi/u_thread.h
@@ -97,7 +97,7 @@ typedef CRITICAL_SECTION u_mutex;
/* http://locklessinc.com/articles/pthreads_on_windows/ */
#define u_mutex_declare_static(name) \
- /* static */ u_mutex name = {(void*)-1, -1, 0, 0, 0, 0}
+ static u_mutex name = {(PCRITICAL_SECTION_DEBUG)-1, -1, 0, 0, 0, 0}
#define u_mutex_init(name) InitializeCriticalSection(&name)
#define u_mutex_destroy(name) DeleteCriticalSection(&name)
diff --git a/src/mapi/shared-glapi/.gitignore b/src/mapi/shared-glapi/.gitignore
new file mode 100644
index 00000000000..c3e0647dd81
--- /dev/null
+++ b/src/mapi/shared-glapi/.gitignore
@@ -0,0 +1,2 @@
+glapi_mapi_tmp.h
+
diff --git a/src/mapi/shared-glapi/Makefile b/src/mapi/shared-glapi/Makefile
new file mode 100644
index 00000000000..c928f822c81
--- /dev/null
+++ b/src/mapi/shared-glapi/Makefile
@@ -0,0 +1,66 @@
+# src/mapi/shared-glapi/Makefile
+#
+# Used by OpenGL ES or when --enable-shared-glapi is specified
+#
+
+TOP := ../../..
+include $(TOP)/configs/current
+
+GLAPI := $(TOP)/src/mapi/glapi
+MAPI := $(TOP)/src/mapi/mapi
+
+glapi_CPPFLAGS := \
+ -I$(TOP)/include \
+ -I$(TOP)/src/mapi \
+ -DMAPI_MODE_GLAPI \
+ -DMAPI_ABI_HEADER=\"shared-glapi/glapi_mapi_tmp.h\"
+
+include $(MAPI)/sources.mak
+glapi_SOURCES := $(addprefix $(MAPI)/, $(MAPI_GLAPI_SOURCES))
+glapi_OBJECTS := $(MAPI_GLAPI_SOURCES:.c=.o)
+
+.PHONY: default
+default: depend $(TOP)/$(LIB_DIR)/$(GLAPI_LIB_NAME)
+
+$(TOP)/$(LIB_DIR)/$(GLAPI_LIB_NAME): $(glapi_OBJECTS)
+ $(MKLIB) -o $(GLAPI_LIB) -linker '$(CC)' -ldflags '$(LDFLAGS)' \
+ -major 0 -minor 0 -patch 0 \
+ -id $(INSTALL_LIB_DIR)/lib$(GLAPI_LIB).0.dylib \
+ $(MKLIB_OPTIONS) -install $(TOP)/$(LIB_DIR) \
+ $(glapi_OBJECTS) $(GLAPI_LIB_DEPS)
+
+$(glapi_OBJECTS): %.o: $(MAPI)/%.c
+ $(CC) -c $(glapi_CPPFLAGS) $(CFLAGS) $< -o $@
+
+$(glapi_SOURCES): glapi_mapi_tmp.h
+
+.PHONY: glapi_mapi_tmp.h
+glapi_mapi_tmp.h:
+ @$(MAKE) -C $(GLAPI)/gen-es shared-glapi
+
+.PHONY: clean
+clean:
+ -rm -f $(TOP)/$(LIB_DIR)/$(GLAPI_LIB_NAME)
+ -rm -f $(glapi_OBJECTS)
+ -rm -f depend depend.bak
+ @# clean generated sources/headers
+ @$(MAKE) -C $(GLAPI)/gen-es clean-shared-glapi
+
+install:
+ $(INSTALL) -d $(DESTDIR)$(INSTALL_LIB_DIR)
+ $(MINSTALL) $(TOP)/$(LIB_DIR)/$(GLAPI_LIB_GLOB) \
+ $(DESTDIR)$(INSTALL_LIB_DIR)
+
+# workaround a bug in makedepend
+makedepend_CPPFLAGS := \
+ $(filter-out -DMAPI_ABI_HEADER=%, $(glapi_CPPFLAGS))
+$(glapi_OBJECTS): glapi_mapi_tmp.h
+
+depend: $(glapi_SOURCES)
+ @echo "running $(MKDEP)"
+ @touch depend
+ @$(MKDEP) $(MKDEP_OPTIONS) -f- $(DEFINES) $(makedepend_CPPFLAGS) \
+ $(glapi_SOURCES) 2>/dev/null | sed -e 's,^$(MAPI)/,,' \
+ > depend
+
+-include depend
diff --git a/src/mapi/shared-glapi/SConscript b/src/mapi/shared-glapi/SConscript
new file mode 100644
index 00000000000..b7c43a73476
--- /dev/null
+++ b/src/mapi/shared-glapi/SConscript
@@ -0,0 +1,116 @@
+#######################################################################
+# SConscript for shared-glapi/es1api/es2api
+
+from sys import executable as python_cmd
+
+Import('*')
+
+def mapi_objects(env, printer, mode):
+ """Return mapi objects built for the given printer and mode."""
+ mapi_sources = {
+ 'glapi': ['entry.c', 'mapi_glapi.c', 'stub.c', 'table.c',
+ 'u_current.c', 'u_execmem.c', 'u_thread.c'],
+ 'bridge': ['entry.c'],
+ }
+ mapi_defines = {
+ 'glapi': ['MAPI_MODE_GLAPI'],
+ 'bridge': ['MAPI_MODE_BRIDGE'],
+ }
+
+ header_name = '%s-tmp.h' % (printer)
+
+ # generate ABI header
+ header = env.CodeGenerate(
+ target = header_name,
+ script = '../mapi/mapi_abi.py',
+ source = '../glapi/gen/gl_and_es_API.xml',
+ command = python_cmd + ' $SCRIPT ' + \
+ '--printer %s --mode lib $SOURCE > $TARGET' % (printer),
+ )
+
+ cpppath = [
+ header[0].dir,
+ '#/include',
+ '#/src/mapi',
+ ]
+
+ cppdefines = mapi_defines[mode] + [
+ 'MAPI_ABI_HEADER=\\"%s\\"' % (header_name),
+ ]
+
+ if env['platform'] == 'windows':
+ if mode == 'glapi':
+ cppdefines += [
+ '_GLAPI_DLL_EXPORTS', # declare _glapi_* as __declspec(dllexport) in glapi.h
+ ]
+ else:
+ cppdefines += [
+ '_GDI32_', # prevent gl* being declared __declspec(dllimport) in MS headers
+ 'BUILD_GL32', # declare gl* as __declspec(dllexport) in Mesa headers
+ ]
+
+ objects = []
+ for s in mapi_sources[mode]:
+ o = env.SharedObject(
+ target = '%s-%s' % (printer, s[:-2]),
+ source = '../mapi/' + s,
+ CPPPATH = cpppath,
+ CPPDEFINES = cppdefines,
+ )
+ objects.append(o[0])
+
+ env.Depends(objects, header)
+
+ return objects
+
+if env['platform'] != 'winddk':
+ env = env.Clone()
+
+ env['SHLIBPREFIX'] = 'lib'
+ env['LIBPREFIX'] = 'lib'
+
+ shared_glapi_objects = mapi_objects(env, 'shared-glapi', 'glapi')
+ shared_glapi = env.SharedLibrary(
+ target = 'glapi',
+ source = shared_glapi_objects,
+ )
+
+ # manually add LIBPREFIX on windows
+ if env['platform'] == 'windows':
+ libs = ['libglapi']
+ else:
+ libs = ['glapi']
+
+ es1api_objects = mapi_objects(env, 'es1api', 'bridge')
+ es1api = env.SharedLibrary(
+ target = 'GLESv1_CM',
+ source = es1api_objects,
+ LIBPATH = ['.'],
+ LIBS = libs,
+ )
+
+ es2api_objects = mapi_objects(env, 'es2api', 'bridge')
+ es2api = env.SharedLibrary(
+ target = 'GLESv2',
+ source = es2api_objects,
+ LIBPATH = ['.'],
+ LIBS = libs,
+ )
+
+ env.InstallSharedLibrary(shared_glapi, version=(0, 0, 0))
+ env.InstallSharedLibrary(es1api, version=(1, 0, 0))
+ env.InstallSharedLibrary(es2api, version=(2, 0, 0))
+
+ if env['platform'] == 'windows':
+ shared_glapi = env.FindIxes(shared_glapi, 'LIBPREFIX', 'LIBSUFFIX')
+ else:
+ shared_glapi = env.FindIxes(shared_glapi, 'SHLIBPREFIX', 'SHLIBSUFFIX')
+
+ # build glapi bridge as a convenience libarary for libgl-xlib/libgl-gdi
+ bridge_glapi_objects = mapi_objects(env, 'glapi', 'bridge')
+ bridge_glapi = env.ConvenienceLibrary(
+ target = 'glapi_bridge',
+ source = bridge_glapi_objects,
+ )
+
+ Export(['shared_glapi', 'bridge_glapi'])
diff --git a/src/mapi/shared-glapi/glapi_mapi_tmp.h b/src/mapi/shared-glapi/glapi_mapi_tmp.h
new file mode 100644
index 00000000000..340b7657576
--- /dev/null
+++ b/src/mapi/shared-glapi/glapi_mapi_tmp.h
@@ -0,0 +1,22410 @@
+/* This file is automatically generated by mapi_abi.py. Do not modify. */
+
+#ifndef _GLAPI_TMP_H_
+#define _GLAPI_TMP_H_
+typedef int GLfixed;
+typedef int GLclampx;
+#endif /* _GLAPI_TMP_H_ */
+
+#ifdef MAPI_TMP_DEFINES
+#define GL_GLEXT_PROTOTYPES
+#include "GL/gl.h"
+#include "GL/glext.h"
+
+void APIENTRY shared_dispatch_stub_0(GLuint list, GLenum mode);
+void APIENTRY shared_dispatch_stub_1(void);
+void APIENTRY shared_dispatch_stub_2(GLuint list);
+void APIENTRY shared_dispatch_stub_3(GLsizei n, GLenum type, const GLvoid *lists);
+void APIENTRY shared_dispatch_stub_4(GLuint list, GLsizei range);
+GLuint APIENTRY shared_dispatch_stub_5(GLsizei range);
+void APIENTRY shared_dispatch_stub_6(GLuint base);
+void APIENTRY shared_dispatch_stub_7(GLenum mode);
+void APIENTRY shared_dispatch_stub_8(GLsizei width, GLsizei height, GLfloat xorig, GLfloat yorig, GLfloat xmove, GLfloat ymove, const GLubyte *bitmap);
+void APIENTRY shared_dispatch_stub_9(GLbyte red, GLbyte green, GLbyte blue);
+void APIENTRY shared_dispatch_stub_10(const GLbyte *v);
+void APIENTRY shared_dispatch_stub_11(GLdouble red, GLdouble green, GLdouble blue);
+void APIENTRY shared_dispatch_stub_12(const GLdouble *v);
+void APIENTRY shared_dispatch_stub_13(GLfloat red, GLfloat green, GLfloat blue);
+void APIENTRY shared_dispatch_stub_14(const GLfloat *v);
+void APIENTRY shared_dispatch_stub_15(GLint red, GLint green, GLint blue);
+void APIENTRY shared_dispatch_stub_16(const GLint *v);
+void APIENTRY shared_dispatch_stub_17(GLshort red, GLshort green, GLshort blue);
+void APIENTRY shared_dispatch_stub_18(const GLshort *v);
+void APIENTRY shared_dispatch_stub_19(GLubyte red, GLubyte green, GLubyte blue);
+void APIENTRY shared_dispatch_stub_20(const GLubyte *v);
+void APIENTRY shared_dispatch_stub_21(GLuint red, GLuint green, GLuint blue);
+void APIENTRY shared_dispatch_stub_22(const GLuint *v);
+void APIENTRY shared_dispatch_stub_23(GLushort red, GLushort green, GLushort blue);
+void APIENTRY shared_dispatch_stub_24(const GLushort *v);
+void APIENTRY shared_dispatch_stub_25(GLbyte red, GLbyte green, GLbyte blue, GLbyte alpha);
+void APIENTRY shared_dispatch_stub_26(const GLbyte *v);
+void APIENTRY shared_dispatch_stub_27(GLdouble red, GLdouble green, GLdouble blue, GLdouble alpha);
+void APIENTRY shared_dispatch_stub_28(const GLdouble *v);
+void APIENTRY shared_dispatch_stub_29(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
+void APIENTRY shared_dispatch_stub_30(const GLfloat *v);
+void APIENTRY shared_dispatch_stub_31(GLint red, GLint green, GLint blue, GLint alpha);
+void APIENTRY shared_dispatch_stub_32(const GLint *v);
+void APIENTRY shared_dispatch_stub_33(GLshort red, GLshort green, GLshort blue, GLshort alpha);
+void APIENTRY shared_dispatch_stub_34(const GLshort *v);
+void APIENTRY shared_dispatch_stub_35(GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha);
+void APIENTRY shared_dispatch_stub_36(const GLubyte *v);
+void APIENTRY shared_dispatch_stub_37(GLuint red, GLuint green, GLuint blue, GLuint alpha);
+void APIENTRY shared_dispatch_stub_38(const GLuint *v);
+void APIENTRY shared_dispatch_stub_39(GLushort red, GLushort green, GLushort blue, GLushort alpha);
+void APIENTRY shared_dispatch_stub_40(const GLushort *v);
+void APIENTRY shared_dispatch_stub_41(GLboolean flag);
+void APIENTRY shared_dispatch_stub_42(const GLboolean *flag);
+void APIENTRY shared_dispatch_stub_43(void);
+void APIENTRY shared_dispatch_stub_44(GLdouble c);
+void APIENTRY shared_dispatch_stub_45(const GLdouble *c);
+void APIENTRY shared_dispatch_stub_46(GLfloat c);
+void APIENTRY shared_dispatch_stub_47(const GLfloat *c);
+void APIENTRY shared_dispatch_stub_48(GLint c);
+void APIENTRY shared_dispatch_stub_49(const GLint *c);
+void APIENTRY shared_dispatch_stub_50(GLshort c);
+void APIENTRY shared_dispatch_stub_51(const GLshort *c);
+void APIENTRY shared_dispatch_stub_52(GLbyte nx, GLbyte ny, GLbyte nz);
+void APIENTRY shared_dispatch_stub_53(const GLbyte *v);
+void APIENTRY shared_dispatch_stub_54(GLdouble nx, GLdouble ny, GLdouble nz);
+void APIENTRY shared_dispatch_stub_55(const GLdouble *v);
+void APIENTRY shared_dispatch_stub_56(GLfloat nx, GLfloat ny, GLfloat nz);
+void APIENTRY shared_dispatch_stub_57(const GLfloat *v);
+void APIENTRY shared_dispatch_stub_58(GLint nx, GLint ny, GLint nz);
+void APIENTRY shared_dispatch_stub_59(const GLint *v);
+void APIENTRY shared_dispatch_stub_60(GLshort nx, GLshort ny, GLshort nz);
+void APIENTRY shared_dispatch_stub_61(const GLshort *v);
+void APIENTRY shared_dispatch_stub_62(GLdouble x, GLdouble y);
+void APIENTRY shared_dispatch_stub_63(const GLdouble *v);
+void APIENTRY shared_dispatch_stub_64(GLfloat x, GLfloat y);
+void APIENTRY shared_dispatch_stub_65(const GLfloat *v);
+void APIENTRY shared_dispatch_stub_66(GLint x, GLint y);
+void APIENTRY shared_dispatch_stub_67(const GLint *v);
+void APIENTRY shared_dispatch_stub_68(GLshort x, GLshort y);
+void APIENTRY shared_dispatch_stub_69(const GLshort *v);
+void APIENTRY shared_dispatch_stub_70(GLdouble x, GLdouble y, GLdouble z);
+void APIENTRY shared_dispatch_stub_71(const GLdouble *v);
+void APIENTRY shared_dispatch_stub_72(GLfloat x, GLfloat y, GLfloat z);
+void APIENTRY shared_dispatch_stub_73(const GLfloat *v);
+void APIENTRY shared_dispatch_stub_74(GLint x, GLint y, GLint z);
+void APIENTRY shared_dispatch_stub_75(const GLint *v);
+void APIENTRY shared_dispatch_stub_76(GLshort x, GLshort y, GLshort z);
+void APIENTRY shared_dispatch_stub_77(const GLshort *v);
+void APIENTRY shared_dispatch_stub_78(GLdouble x, GLdouble y, GLdouble z, GLdouble w);
+void APIENTRY shared_dispatch_stub_79(const GLdouble *v);
+void APIENTRY shared_dispatch_stub_80(GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+void APIENTRY shared_dispatch_stub_81(const GLfloat *v);
+void APIENTRY shared_dispatch_stub_82(GLint x, GLint y, GLint z, GLint w);
+void APIENTRY shared_dispatch_stub_83(const GLint *v);
+void APIENTRY shared_dispatch_stub_84(GLshort x, GLshort y, GLshort z, GLshort w);
+void APIENTRY shared_dispatch_stub_85(const GLshort *v);
+void APIENTRY shared_dispatch_stub_86(GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2);
+void APIENTRY shared_dispatch_stub_87(const GLdouble *v1, const GLdouble *v2);
+void APIENTRY shared_dispatch_stub_88(GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2);
+void APIENTRY shared_dispatch_stub_89(const GLfloat *v1, const GLfloat *v2);
+void APIENTRY shared_dispatch_stub_90(GLint x1, GLint y1, GLint x2, GLint y2);
+void APIENTRY shared_dispatch_stub_91(const GLint *v1, const GLint *v2);
+void APIENTRY shared_dispatch_stub_92(GLshort x1, GLshort y1, GLshort x2, GLshort y2);
+void APIENTRY shared_dispatch_stub_93(const GLshort *v1, const GLshort *v2);
+void APIENTRY shared_dispatch_stub_94(GLdouble s);
+void APIENTRY shared_dispatch_stub_95(const GLdouble *v);
+void APIENTRY shared_dispatch_stub_96(GLfloat s);
+void APIENTRY shared_dispatch_stub_97(const GLfloat *v);
+void APIENTRY shared_dispatch_stub_98(GLint s);
+void APIENTRY shared_dispatch_stub_99(const GLint *v);
+void APIENTRY shared_dispatch_stub_100(GLshort s);
+void APIENTRY shared_dispatch_stub_101(const GLshort *v);
+void APIENTRY shared_dispatch_stub_102(GLdouble s, GLdouble t);
+void APIENTRY shared_dispatch_stub_103(const GLdouble *v);
+void APIENTRY shared_dispatch_stub_104(GLfloat s, GLfloat t);
+void APIENTRY shared_dispatch_stub_105(const GLfloat *v);
+void APIENTRY shared_dispatch_stub_106(GLint s, GLint t);
+void APIENTRY shared_dispatch_stub_107(const GLint *v);
+void APIENTRY shared_dispatch_stub_108(GLshort s, GLshort t);
+void APIENTRY shared_dispatch_stub_109(const GLshort *v);
+void APIENTRY shared_dispatch_stub_110(GLdouble s, GLdouble t, GLdouble r);
+void APIENTRY shared_dispatch_stub_111(const GLdouble *v);
+void APIENTRY shared_dispatch_stub_112(GLfloat s, GLfloat t, GLfloat r);
+void APIENTRY shared_dispatch_stub_113(const GLfloat *v);
+void APIENTRY shared_dispatch_stub_114(GLint s, GLint t, GLint r);
+void APIENTRY shared_dispatch_stub_115(const GLint *v);
+void APIENTRY shared_dispatch_stub_116(GLshort s, GLshort t, GLshort r);
+void APIENTRY shared_dispatch_stub_117(const GLshort *v);
+void APIENTRY shared_dispatch_stub_118(GLdouble s, GLdouble t, GLdouble r, GLdouble q);
+void APIENTRY shared_dispatch_stub_119(const GLdouble *v);
+void APIENTRY shared_dispatch_stub_120(GLfloat s, GLfloat t, GLfloat r, GLfloat q);
+void APIENTRY shared_dispatch_stub_121(const GLfloat *v);
+void APIENTRY shared_dispatch_stub_122(GLint s, GLint t, GLint r, GLint q);
+void APIENTRY shared_dispatch_stub_123(const GLint *v);
+void APIENTRY shared_dispatch_stub_124(GLshort s, GLshort t, GLshort r, GLshort q);
+void APIENTRY shared_dispatch_stub_125(const GLshort *v);
+void APIENTRY shared_dispatch_stub_126(GLdouble x, GLdouble y);
+void APIENTRY shared_dispatch_stub_127(const GLdouble *v);
+void APIENTRY shared_dispatch_stub_128(GLfloat x, GLfloat y);
+void APIENTRY shared_dispatch_stub_129(const GLfloat *v);
+void APIENTRY shared_dispatch_stub_130(GLint x, GLint y);
+void APIENTRY shared_dispatch_stub_131(const GLint *v);
+void APIENTRY shared_dispatch_stub_132(GLshort x, GLshort y);
+void APIENTRY shared_dispatch_stub_133(const GLshort *v);
+void APIENTRY shared_dispatch_stub_134(GLdouble x, GLdouble y, GLdouble z);
+void APIENTRY shared_dispatch_stub_135(const GLdouble *v);
+void APIENTRY shared_dispatch_stub_136(GLfloat x, GLfloat y, GLfloat z);
+void APIENTRY shared_dispatch_stub_137(const GLfloat *v);
+void APIENTRY shared_dispatch_stub_138(GLint x, GLint y, GLint z);
+void APIENTRY shared_dispatch_stub_139(const GLint *v);
+void APIENTRY shared_dispatch_stub_140(GLshort x, GLshort y, GLshort z);
+void APIENTRY shared_dispatch_stub_141(const GLshort *v);
+void APIENTRY shared_dispatch_stub_142(GLdouble x, GLdouble y, GLdouble z, GLdouble w);
+void APIENTRY shared_dispatch_stub_143(const GLdouble *v);
+void APIENTRY shared_dispatch_stub_144(GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+void APIENTRY shared_dispatch_stub_145(const GLfloat *v);
+void APIENTRY shared_dispatch_stub_146(GLint x, GLint y, GLint z, GLint w);
+void APIENTRY shared_dispatch_stub_147(const GLint *v);
+void APIENTRY shared_dispatch_stub_148(GLshort x, GLshort y, GLshort z, GLshort w);
+void APIENTRY shared_dispatch_stub_149(const GLshort *v);
+void APIENTRY shared_dispatch_stub_150(GLenum plane, const GLdouble *equation);
+void APIENTRY shared_dispatch_stub_151(GLenum face, GLenum mode);
+void APIENTRY shared_dispatch_stub_152(GLenum mode);
+void APIENTRY shared_dispatch_stub_153(GLenum pname, GLfloat param);
+void APIENTRY shared_dispatch_stub_154(GLenum pname, const GLfloat *params);
+void APIENTRY shared_dispatch_stub_155(GLenum pname, GLint param);
+void APIENTRY shared_dispatch_stub_156(GLenum pname, const GLint *params);
+void APIENTRY shared_dispatch_stub_157(GLenum mode);
+void APIENTRY shared_dispatch_stub_158(GLenum target, GLenum mode);
+void APIENTRY shared_dispatch_stub_159(GLenum light, GLenum pname, GLfloat param);
+void APIENTRY shared_dispatch_stub_160(GLenum light, GLenum pname, const GLfloat *params);
+void APIENTRY shared_dispatch_stub_161(GLenum light, GLenum pname, GLint param);
+void APIENTRY shared_dispatch_stub_162(GLenum light, GLenum pname, const GLint *params);
+void APIENTRY shared_dispatch_stub_163(GLenum pname, GLfloat param);
+void APIENTRY shared_dispatch_stub_164(GLenum pname, const GLfloat *params);
+void APIENTRY shared_dispatch_stub_165(GLenum pname, GLint param);
+void APIENTRY shared_dispatch_stub_166(GLenum pname, const GLint *params);
+void APIENTRY shared_dispatch_stub_167(GLint factor, GLushort pattern);
+void APIENTRY shared_dispatch_stub_168(GLfloat width);
+void APIENTRY shared_dispatch_stub_169(GLenum face, GLenum pname, GLfloat param);
+void APIENTRY shared_dispatch_stub_170(GLenum face, GLenum pname, const GLfloat *params);
+void APIENTRY shared_dispatch_stub_171(GLenum face, GLenum pname, GLint param);
+void APIENTRY shared_dispatch_stub_172(GLenum face, GLenum pname, const GLint *params);
+void APIENTRY shared_dispatch_stub_173(GLfloat size);
+void APIENTRY shared_dispatch_stub_174(GLenum face, GLenum mode);
+void APIENTRY shared_dispatch_stub_175(const GLubyte *mask);
+void APIENTRY shared_dispatch_stub_176(GLint x, GLint y, GLsizei width, GLsizei height);
+void APIENTRY shared_dispatch_stub_177(GLenum mode);
+void APIENTRY shared_dispatch_stub_178(GLenum target, GLenum pname, GLfloat param);
+void APIENTRY shared_dispatch_stub_179(GLenum target, GLenum pname, const GLfloat *params);
+void APIENTRY shared_dispatch_stub_180(GLenum target, GLenum pname, GLint param);
+void APIENTRY shared_dispatch_stub_181(GLenum target, GLenum pname, const GLint *params);
+void APIENTRY shared_dispatch_stub_182(GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid *pixels);
+void APIENTRY shared_dispatch_stub_183(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels);
+void APIENTRY shared_dispatch_stub_184(GLenum target, GLenum pname, GLfloat param);
+void APIENTRY shared_dispatch_stub_185(GLenum target, GLenum pname, const GLfloat *params);
+void APIENTRY shared_dispatch_stub_186(GLenum target, GLenum pname, GLint param);
+void APIENTRY shared_dispatch_stub_187(GLenum target, GLenum pname, const GLint *params);
+void APIENTRY shared_dispatch_stub_188(GLenum coord, GLenum pname, GLdouble param);
+void APIENTRY shared_dispatch_stub_189(GLenum coord, GLenum pname, const GLdouble *params);
+void APIENTRY shared_dispatch_stub_190(GLenum coord, GLenum pname, GLfloat param);
+void APIENTRY shared_dispatch_stub_191(GLenum coord, GLenum pname, const GLfloat *params);
+void APIENTRY shared_dispatch_stub_192(GLenum coord, GLenum pname, GLint param);
+void APIENTRY shared_dispatch_stub_193(GLenum coord, GLenum pname, const GLint *params);
+void APIENTRY shared_dispatch_stub_194(GLsizei size, GLenum type, GLfloat *buffer);
+void APIENTRY shared_dispatch_stub_195(GLsizei size, GLuint *buffer);
+GLint APIENTRY shared_dispatch_stub_196(GLenum mode);
+void APIENTRY shared_dispatch_stub_197(void);
+void APIENTRY shared_dispatch_stub_198(GLuint name);
+void APIENTRY shared_dispatch_stub_199(GLfloat token);
+void APIENTRY shared_dispatch_stub_200(void);
+void APIENTRY shared_dispatch_stub_201(GLuint name);
+void APIENTRY shared_dispatch_stub_202(GLenum mode);
+void APIENTRY shared_dispatch_stub_203(GLbitfield mask);
+void APIENTRY shared_dispatch_stub_204(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
+void APIENTRY shared_dispatch_stub_205(GLfloat c);
+void APIENTRY shared_dispatch_stub_206(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
+void APIENTRY shared_dispatch_stub_207(GLint s);
+void APIENTRY shared_dispatch_stub_208(GLclampd depth);
+void APIENTRY shared_dispatch_stub_209(GLuint mask);
+void APIENTRY shared_dispatch_stub_210(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
+void APIENTRY shared_dispatch_stub_211(GLboolean flag);
+void APIENTRY shared_dispatch_stub_212(GLuint mask);
+void APIENTRY shared_dispatch_stub_213(GLenum op, GLfloat value);
+void APIENTRY shared_dispatch_stub_214(GLenum cap);
+void APIENTRY shared_dispatch_stub_215(GLenum cap);
+void APIENTRY shared_dispatch_stub_216(void);
+void APIENTRY shared_dispatch_stub_217(void);
+void APIENTRY shared_dispatch_stub_218(void);
+void APIENTRY shared_dispatch_stub_219(GLbitfield mask);
+void APIENTRY shared_dispatch_stub_220(GLenum target, GLdouble u1, GLdouble u2, GLint stride, GLint order, const GLdouble *points);
+void APIENTRY shared_dispatch_stub_221(GLenum target, GLfloat u1, GLfloat u2, GLint stride, GLint order, const GLfloat *points);
+void APIENTRY shared_dispatch_stub_222(GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, const GLdouble *points);
+void APIENTRY shared_dispatch_stub_223(GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, const GLfloat *points);
+void APIENTRY shared_dispatch_stub_224(GLint un, GLdouble u1, GLdouble u2);
+void APIENTRY shared_dispatch_stub_225(GLint un, GLfloat u1, GLfloat u2);
+void APIENTRY shared_dispatch_stub_226(GLint un, GLdouble u1, GLdouble u2, GLint vn, GLdouble v1, GLdouble v2);
+void APIENTRY shared_dispatch_stub_227(GLint un, GLfloat u1, GLfloat u2, GLint vn, GLfloat v1, GLfloat v2);
+void APIENTRY shared_dispatch_stub_228(GLdouble u);
+void APIENTRY shared_dispatch_stub_229(const GLdouble *u);
+void APIENTRY shared_dispatch_stub_230(GLfloat u);
+void APIENTRY shared_dispatch_stub_231(const GLfloat *u);
+void APIENTRY shared_dispatch_stub_232(GLdouble u, GLdouble v);
+void APIENTRY shared_dispatch_stub_233(const GLdouble *u);
+void APIENTRY shared_dispatch_stub_234(GLfloat u, GLfloat v);
+void APIENTRY shared_dispatch_stub_235(const GLfloat *u);
+void APIENTRY shared_dispatch_stub_236(GLenum mode, GLint i1, GLint i2);
+void APIENTRY shared_dispatch_stub_237(GLint i);
+void APIENTRY shared_dispatch_stub_238(GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2);
+void APIENTRY shared_dispatch_stub_239(GLint i, GLint j);
+void APIENTRY shared_dispatch_stub_240(GLenum func, GLclampf ref);
+void APIENTRY shared_dispatch_stub_241(GLenum sfactor, GLenum dfactor);
+void APIENTRY shared_dispatch_stub_242(GLenum opcode);
+void APIENTRY shared_dispatch_stub_243(GLenum func, GLint ref, GLuint mask);
+void APIENTRY shared_dispatch_stub_244(GLenum fail, GLenum zfail, GLenum zpass);
+void APIENTRY shared_dispatch_stub_245(GLenum func);
+void APIENTRY shared_dispatch_stub_246(GLfloat xfactor, GLfloat yfactor);
+void APIENTRY shared_dispatch_stub_247(GLenum pname, GLfloat param);
+void APIENTRY shared_dispatch_stub_248(GLenum pname, GLint param);
+void APIENTRY shared_dispatch_stub_249(GLenum pname, GLfloat param);
+void APIENTRY shared_dispatch_stub_250(GLenum pname, GLint param);
+void APIENTRY shared_dispatch_stub_251(GLenum map, GLsizei mapsize, const GLfloat *values);
+void APIENTRY shared_dispatch_stub_252(GLenum map, GLsizei mapsize, const GLuint *values);
+void APIENTRY shared_dispatch_stub_253(GLenum map, GLsizei mapsize, const GLushort *values);
+void APIENTRY shared_dispatch_stub_254(GLenum mode);
+void APIENTRY shared_dispatch_stub_255(GLint x, GLint y, GLsizei width, GLsizei height, GLenum type);
+void APIENTRY shared_dispatch_stub_256(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels);
+void APIENTRY shared_dispatch_stub_257(GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels);
+void APIENTRY shared_dispatch_stub_258(GLenum pname, GLboolean *params);
+void APIENTRY shared_dispatch_stub_259(GLenum plane, GLdouble *equation);
+void APIENTRY shared_dispatch_stub_260(GLenum pname, GLdouble *params);
+GLenum APIENTRY shared_dispatch_stub_261(void);
+void APIENTRY shared_dispatch_stub_262(GLenum pname, GLfloat *params);
+void APIENTRY shared_dispatch_stub_263(GLenum pname, GLint *params);
+void APIENTRY shared_dispatch_stub_264(GLenum light, GLenum pname, GLfloat *params);
+void APIENTRY shared_dispatch_stub_265(GLenum light, GLenum pname, GLint *params);
+void APIENTRY shared_dispatch_stub_266(GLenum target, GLenum query, GLdouble *v);
+void APIENTRY shared_dispatch_stub_267(GLenum target, GLenum query, GLfloat *v);
+void APIENTRY shared_dispatch_stub_268(GLenum target, GLenum query, GLint *v);
+void APIENTRY shared_dispatch_stub_269(GLenum face, GLenum pname, GLfloat *params);
+void APIENTRY shared_dispatch_stub_270(GLenum face, GLenum pname, GLint *params);
+void APIENTRY shared_dispatch_stub_271(GLenum map, GLfloat *values);
+void APIENTRY shared_dispatch_stub_272(GLenum map, GLuint *values);
+void APIENTRY shared_dispatch_stub_273(GLenum map, GLushort *values);
+void APIENTRY shared_dispatch_stub_274(GLubyte *mask);
+const GLubyte * APIENTRY shared_dispatch_stub_275(GLenum name);
+void APIENTRY shared_dispatch_stub_276(GLenum target, GLenum pname, GLfloat *params);
+void APIENTRY shared_dispatch_stub_277(GLenum target, GLenum pname, GLint *params);
+void APIENTRY shared_dispatch_stub_278(GLenum coord, GLenum pname, GLdouble *params);
+void APIENTRY shared_dispatch_stub_279(GLenum coord, GLenum pname, GLfloat *params);
+void APIENTRY shared_dispatch_stub_280(GLenum coord, GLenum pname, GLint *params);
+void APIENTRY shared_dispatch_stub_281(GLenum target, GLint level, GLenum format, GLenum type, GLvoid *pixels);
+void APIENTRY shared_dispatch_stub_282(GLenum target, GLenum pname, GLfloat *params);
+void APIENTRY shared_dispatch_stub_283(GLenum target, GLenum pname, GLint *params);
+void APIENTRY shared_dispatch_stub_284(GLenum target, GLint level, GLenum pname, GLfloat *params);
+void APIENTRY shared_dispatch_stub_285(GLenum target, GLint level, GLenum pname, GLint *params);
+GLboolean APIENTRY shared_dispatch_stub_286(GLenum cap);
+GLboolean APIENTRY shared_dispatch_stub_287(GLuint list);
+void APIENTRY shared_dispatch_stub_288(GLclampd zNear, GLclampd zFar);
+void APIENTRY shared_dispatch_stub_289(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar);
+void APIENTRY shared_dispatch_stub_290(void);
+void APIENTRY shared_dispatch_stub_291(const GLfloat *m);
+void APIENTRY shared_dispatch_stub_292(const GLdouble *m);
+void APIENTRY shared_dispatch_stub_293(GLenum mode);
+void APIENTRY shared_dispatch_stub_294(const GLfloat *m);
+void APIENTRY shared_dispatch_stub_295(const GLdouble *m);
+void APIENTRY shared_dispatch_stub_296(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar);
+void APIENTRY shared_dispatch_stub_297(void);
+void APIENTRY shared_dispatch_stub_298(void);
+void APIENTRY shared_dispatch_stub_299(GLdouble angle, GLdouble x, GLdouble y, GLdouble z);
+void APIENTRY shared_dispatch_stub_300(GLfloat angle, GLfloat x, GLfloat y, GLfloat z);
+void APIENTRY shared_dispatch_stub_301(GLdouble x, GLdouble y, GLdouble z);
+void APIENTRY shared_dispatch_stub_302(GLfloat x, GLfloat y, GLfloat z);
+void APIENTRY shared_dispatch_stub_303(GLdouble x, GLdouble y, GLdouble z);
+void APIENTRY shared_dispatch_stub_304(GLfloat x, GLfloat y, GLfloat z);
+void APIENTRY shared_dispatch_stub_305(GLint x, GLint y, GLsizei width, GLsizei height);
+void APIENTRY shared_dispatch_stub_306(GLint i);
+void APIENTRY shared_dispatch_stub_307(GLenum target, GLuint texture);
+void APIENTRY shared_dispatch_stub_308(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
+void APIENTRY shared_dispatch_stub_309(GLenum array);
+void APIENTRY shared_dispatch_stub_310(GLenum mode, GLint first, GLsizei count);
+void APIENTRY shared_dispatch_stub_311(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices);
+void APIENTRY shared_dispatch_stub_312(GLsizei stride, const GLvoid *pointer);
+void APIENTRY shared_dispatch_stub_313(GLenum array);
+void APIENTRY shared_dispatch_stub_314(GLenum type, GLsizei stride, const GLvoid *pointer);
+void APIENTRY shared_dispatch_stub_315(GLubyte c);
+void APIENTRY shared_dispatch_stub_316(const GLubyte *c);
+void APIENTRY shared_dispatch_stub_317(GLenum format, GLsizei stride, const GLvoid *pointer);
+void APIENTRY shared_dispatch_stub_318(GLenum type, GLsizei stride, const GLvoid *pointer);
+void APIENTRY shared_dispatch_stub_319(GLfloat factor, GLfloat units);
+void APIENTRY shared_dispatch_stub_320(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
+void APIENTRY shared_dispatch_stub_321(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
+GLboolean APIENTRY shared_dispatch_stub_322(GLsizei n, const GLuint *textures, GLboolean *residences);
+void APIENTRY shared_dispatch_stub_323(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border);
+void APIENTRY shared_dispatch_stub_324(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
+void APIENTRY shared_dispatch_stub_325(GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width);
+void APIENTRY shared_dispatch_stub_326(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
+void APIENTRY shared_dispatch_stub_327(GLsizei n, const GLuint *textures);
+void APIENTRY shared_dispatch_stub_328(GLsizei n, GLuint *textures);
+void APIENTRY shared_dispatch_stub_329(GLenum pname, GLvoid **params);
+GLboolean APIENTRY shared_dispatch_stub_330(GLuint texture);
+void APIENTRY shared_dispatch_stub_331(GLsizei n, const GLuint *textures, const GLclampf *priorities);
+void APIENTRY shared_dispatch_stub_332(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels);
+void APIENTRY shared_dispatch_stub_333(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels);
+void APIENTRY shared_dispatch_stub_334(void);
+void APIENTRY shared_dispatch_stub_335(GLbitfield mask);
+void APIENTRY shared_dispatch_stub_336(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
+void APIENTRY shared_dispatch_stub_337(GLenum mode);
+void APIENTRY shared_dispatch_stub_338(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices);
+void APIENTRY shared_dispatch_stub_339(GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *table);
+void APIENTRY shared_dispatch_stub_340(GLenum target, GLenum pname, const GLfloat *params);
+void APIENTRY shared_dispatch_stub_341(GLenum target, GLenum pname, const GLint *params);
+void APIENTRY shared_dispatch_stub_342(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
+void APIENTRY shared_dispatch_stub_343(GLenum target, GLenum format, GLenum type, GLvoid *table);
+void APIENTRY shared_dispatch_stub_344(GLenum target, GLenum pname, GLfloat *params);
+void APIENTRY shared_dispatch_stub_345(GLenum target, GLenum pname, GLint *params);
+void APIENTRY shared_dispatch_stub_346(GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid *data);
+void APIENTRY shared_dispatch_stub_347(GLenum target, GLsizei start, GLint x, GLint y, GLsizei width);
+void APIENTRY shared_dispatch_stub_348(GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *image);
+void APIENTRY shared_dispatch_stub_349(GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *image);
+void APIENTRY shared_dispatch_stub_350(GLenum target, GLenum pname, GLfloat params);
+void APIENTRY shared_dispatch_stub_351(GLenum target, GLenum pname, const GLfloat *params);
+void APIENTRY shared_dispatch_stub_352(GLenum target, GLenum pname, GLint params);
+void APIENTRY shared_dispatch_stub_353(GLenum target, GLenum pname, const GLint *params);
+void APIENTRY shared_dispatch_stub_354(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
+void APIENTRY shared_dispatch_stub_355(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height);
+void APIENTRY shared_dispatch_stub_356(GLenum target, GLenum format, GLenum type, GLvoid *image);
+void APIENTRY shared_dispatch_stub_357(GLenum target, GLenum pname, GLfloat *params);
+void APIENTRY shared_dispatch_stub_358(GLenum target, GLenum pname, GLint *params);
+void APIENTRY shared_dispatch_stub_359(GLenum target, GLenum format, GLenum type, GLvoid *row, GLvoid *column, GLvoid *span);
+void APIENTRY shared_dispatch_stub_360(GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *row, const GLvoid *column);
+void APIENTRY shared_dispatch_stub_361(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values);
+void APIENTRY shared_dispatch_stub_362(GLenum target, GLenum pname, GLfloat *params);
+void APIENTRY shared_dispatch_stub_363(GLenum target, GLenum pname, GLint *params);
+void APIENTRY shared_dispatch_stub_364(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values);
+void APIENTRY shared_dispatch_stub_365(GLenum target, GLenum pname, GLfloat *params);
+void APIENTRY shared_dispatch_stub_366(GLenum target, GLenum pname, GLint *params);
+void APIENTRY shared_dispatch_stub_367(GLenum target, GLsizei width, GLenum internalformat, GLboolean sink);
+void APIENTRY shared_dispatch_stub_368(GLenum target, GLenum internalformat, GLboolean sink);
+void APIENTRY shared_dispatch_stub_369(GLenum target);
+void APIENTRY shared_dispatch_stub_370(GLenum target);
+void APIENTRY shared_dispatch_stub_371(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels);
+void APIENTRY shared_dispatch_stub_372(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels);
+void APIENTRY shared_dispatch_stub_373(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
+void APIENTRY shared_dispatch_stub_374(GLenum texture);
+void APIENTRY shared_dispatch_stub_375(GLenum texture);
+void APIENTRY shared_dispatch_stub_376(GLenum target, GLdouble s);
+void APIENTRY shared_dispatch_stub_377(GLenum target, const GLdouble *v);
+void APIENTRY shared_dispatch_stub_378(GLenum target, GLfloat s);
+void APIENTRY shared_dispatch_stub_379(GLenum target, const GLfloat *v);
+void APIENTRY shared_dispatch_stub_380(GLenum target, GLint s);
+void APIENTRY shared_dispatch_stub_381(GLenum target, const GLint *v);
+void APIENTRY shared_dispatch_stub_382(GLenum target, GLshort s);
+void APIENTRY shared_dispatch_stub_383(GLenum target, const GLshort *v);
+void APIENTRY shared_dispatch_stub_384(GLenum target, GLdouble s, GLdouble t);
+void APIENTRY shared_dispatch_stub_385(GLenum target, const GLdouble *v);
+void APIENTRY shared_dispatch_stub_386(GLenum target, GLfloat s, GLfloat t);
+void APIENTRY shared_dispatch_stub_387(GLenum target, const GLfloat *v);
+void APIENTRY shared_dispatch_stub_388(GLenum target, GLint s, GLint t);
+void APIENTRY shared_dispatch_stub_389(GLenum target, const GLint *v);
+void APIENTRY shared_dispatch_stub_390(GLenum target, GLshort s, GLshort t);
+void APIENTRY shared_dispatch_stub_391(GLenum target, const GLshort *v);
+void APIENTRY shared_dispatch_stub_392(GLenum target, GLdouble s, GLdouble t, GLdouble r);
+void APIENTRY shared_dispatch_stub_393(GLenum target, const GLdouble *v);
+void APIENTRY shared_dispatch_stub_394(GLenum target, GLfloat s, GLfloat t, GLfloat r);
+void APIENTRY shared_dispatch_stub_395(GLenum target, const GLfloat *v);
+void APIENTRY shared_dispatch_stub_396(GLenum target, GLint s, GLint t, GLint r);
+void APIENTRY shared_dispatch_stub_397(GLenum target, const GLint *v);
+void APIENTRY shared_dispatch_stub_398(GLenum target, GLshort s, GLshort t, GLshort r);
+void APIENTRY shared_dispatch_stub_399(GLenum target, const GLshort *v);
+void APIENTRY shared_dispatch_stub_400(GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q);
+void APIENTRY shared_dispatch_stub_401(GLenum target, const GLdouble *v);
+void APIENTRY shared_dispatch_stub_402(GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);
+void APIENTRY shared_dispatch_stub_403(GLenum target, const GLfloat *v);
+void APIENTRY shared_dispatch_stub_404(GLenum target, GLint s, GLint t, GLint r, GLint q);
+void APIENTRY shared_dispatch_stub_405(GLenum target, const GLint *v);
+void APIENTRY shared_dispatch_stub_406(GLenum target, GLshort s, GLshort t, GLshort r, GLshort q);
+void APIENTRY shared_dispatch_stub_407(GLenum target, const GLshort *v);
+void APIENTRY shared_dispatch_stub_408(GLuint program, GLuint shader);
+GLuint APIENTRY shared_dispatch_stub_409(void);
+GLuint APIENTRY shared_dispatch_stub_410(GLenum type);
+void APIENTRY shared_dispatch_stub_411(GLuint program);
+void APIENTRY shared_dispatch_stub_412(GLuint program);
+void APIENTRY shared_dispatch_stub_413(GLuint program, GLuint shader);
+void APIENTRY shared_dispatch_stub_414(GLuint program, GLsizei maxCount, GLsizei *count, GLuint *obj);
+void APIENTRY shared_dispatch_stub_415(GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
+void APIENTRY shared_dispatch_stub_416(GLuint program, GLenum pname, GLint *params);
+void APIENTRY shared_dispatch_stub_417(GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
+void APIENTRY shared_dispatch_stub_418(GLuint shader, GLenum pname, GLint *params);
+GLboolean APIENTRY shared_dispatch_stub_419(GLuint program);
+GLboolean APIENTRY shared_dispatch_stub_420(GLuint shader);
+void APIENTRY shared_dispatch_stub_421(GLenum face, GLenum func, GLint ref, GLuint mask);
+void APIENTRY shared_dispatch_stub_422(GLenum face, GLuint mask);
+void APIENTRY shared_dispatch_stub_423(GLenum face, GLenum sfail, GLenum zfail, GLenum zpass);
+void APIENTRY shared_dispatch_stub_424(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+void APIENTRY shared_dispatch_stub_425(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+void APIENTRY shared_dispatch_stub_426(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+void APIENTRY shared_dispatch_stub_427(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+void APIENTRY shared_dispatch_stub_428(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+void APIENTRY shared_dispatch_stub_429(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+void APIENTRY shared_dispatch_stub_430(GLenum target, GLenum clamp);
+void APIENTRY shared_dispatch_stub_431(GLenum buffer, GLint drawbuffer, const GLfloat depth, const GLint stencil);
+void APIENTRY shared_dispatch_stub_432(GLenum buffer, GLint drawbuffer, const GLfloat *value);
+void APIENTRY shared_dispatch_stub_433(GLenum buffer, GLint drawbuffer, const GLint *value);
+void APIENTRY shared_dispatch_stub_434(GLenum buffer, GLint drawbuffer, const GLuint *value);
+const GLubyte * APIENTRY shared_dispatch_stub_435(GLenum name, GLuint index);
+void APIENTRY shared_dispatch_stub_436(GLenum target, GLenum internalFormat, GLuint buffer);
+void APIENTRY shared_dispatch_stub_437(GLenum target, GLenum attachment, GLuint texture, GLint level);
+void APIENTRY shared_dispatch_stub_438(GLenum target, GLenum pname, GLint64 *params);
+void APIENTRY shared_dispatch_stub_439(GLenum cap, GLuint index, GLint64 *data);
+void APIENTRY shared_dispatch_stub_440(GLuint index, GLuint divisor);
+void APIENTRY shared_dispatch_stub_441(const GLdouble *m);
+void APIENTRY shared_dispatch_stub_442(const GLfloat *m);
+void APIENTRY shared_dispatch_stub_443(const GLdouble *m);
+void APIENTRY shared_dispatch_stub_444(const GLfloat *m);
+void APIENTRY shared_dispatch_stub_445(GLclampf value, GLboolean invert);
+void APIENTRY shared_dispatch_stub_446(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data);
+void APIENTRY shared_dispatch_stub_447(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data);
+void APIENTRY shared_dispatch_stub_448(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data);
+void APIENTRY shared_dispatch_stub_449(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data);
+void APIENTRY shared_dispatch_stub_450(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data);
+void APIENTRY shared_dispatch_stub_451(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data);
+void APIENTRY shared_dispatch_stub_452(GLenum target, GLint level, GLvoid *img);
+void APIENTRY shared_dispatch_stub_453(GLuint index);
+void APIENTRY shared_dispatch_stub_454(GLuint index);
+void APIENTRY shared_dispatch_stub_455(GLenum target, GLuint index, GLdouble *params);
+void APIENTRY shared_dispatch_stub_456(GLenum target, GLuint index, GLfloat *params);
+void APIENTRY shared_dispatch_stub_457(GLenum target, GLuint index, GLdouble *params);
+void APIENTRY shared_dispatch_stub_458(GLenum target, GLuint index, GLfloat *params);
+void APIENTRY shared_dispatch_stub_459(GLenum target, GLenum pname, GLvoid *string);
+void APIENTRY shared_dispatch_stub_460(GLenum target, GLenum pname, GLint *params);
+void APIENTRY shared_dispatch_stub_461(GLuint index, GLenum pname, GLdouble *params);
+void APIENTRY shared_dispatch_stub_462(GLuint index, GLenum pname, GLfloat *params);
+void APIENTRY shared_dispatch_stub_463(GLuint index, GLenum pname, GLint *params);
+void APIENTRY shared_dispatch_stub_464(GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
+void APIENTRY shared_dispatch_stub_465(GLenum target, GLuint index, const GLdouble *params);
+void APIENTRY shared_dispatch_stub_466(GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+void APIENTRY shared_dispatch_stub_467(GLenum target, GLuint index, const GLfloat *params);
+void APIENTRY shared_dispatch_stub_468(GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
+void APIENTRY shared_dispatch_stub_469(GLenum target, GLuint index, const GLdouble *params);
+void APIENTRY shared_dispatch_stub_470(GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+void APIENTRY shared_dispatch_stub_471(GLenum target, GLuint index, const GLfloat *params);
+void APIENTRY shared_dispatch_stub_472(GLenum target, GLenum format, GLsizei len, const GLvoid *string);
+void APIENTRY shared_dispatch_stub_473(GLuint index, GLdouble x);
+void APIENTRY shared_dispatch_stub_474(GLuint index, const GLdouble *v);
+void APIENTRY shared_dispatch_stub_475(GLuint index, GLfloat x);
+void APIENTRY shared_dispatch_stub_476(GLuint index, const GLfloat *v);
+void APIENTRY shared_dispatch_stub_477(GLuint index, GLshort x);
+void APIENTRY shared_dispatch_stub_478(GLuint index, const GLshort *v);
+void APIENTRY shared_dispatch_stub_479(GLuint index, GLdouble x, GLdouble y);
+void APIENTRY shared_dispatch_stub_480(GLuint index, const GLdouble *v);
+void APIENTRY shared_dispatch_stub_481(GLuint index, GLfloat x, GLfloat y);
+void APIENTRY shared_dispatch_stub_482(GLuint index, const GLfloat *v);
+void APIENTRY shared_dispatch_stub_483(GLuint index, GLshort x, GLshort y);
+void APIENTRY shared_dispatch_stub_484(GLuint index, const GLshort *v);
+void APIENTRY shared_dispatch_stub_485(GLuint index, GLdouble x, GLdouble y, GLdouble z);
+void APIENTRY shared_dispatch_stub_486(GLuint index, const GLdouble *v);
+void APIENTRY shared_dispatch_stub_487(GLuint index, GLfloat x, GLfloat y, GLfloat z);
+void APIENTRY shared_dispatch_stub_488(GLuint index, const GLfloat *v);
+void APIENTRY shared_dispatch_stub_489(GLuint index, GLshort x, GLshort y, GLshort z);
+void APIENTRY shared_dispatch_stub_490(GLuint index, const GLshort *v);
+void APIENTRY shared_dispatch_stub_491(GLuint index, const GLbyte *v);
+void APIENTRY shared_dispatch_stub_492(GLuint index, const GLint *v);
+void APIENTRY shared_dispatch_stub_493(GLuint index, const GLshort *v);
+void APIENTRY shared_dispatch_stub_494(GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w);
+void APIENTRY shared_dispatch_stub_495(GLuint index, const GLubyte *v);
+void APIENTRY shared_dispatch_stub_496(GLuint index, const GLuint *v);
+void APIENTRY shared_dispatch_stub_497(GLuint index, const GLushort *v);
+void APIENTRY shared_dispatch_stub_498(GLuint index, const GLbyte *v);
+void APIENTRY shared_dispatch_stub_499(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
+void APIENTRY shared_dispatch_stub_500(GLuint index, const GLdouble *v);
+void APIENTRY shared_dispatch_stub_501(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+void APIENTRY shared_dispatch_stub_502(GLuint index, const GLfloat *v);
+void APIENTRY shared_dispatch_stub_503(GLuint index, const GLint *v);
+void APIENTRY shared_dispatch_stub_504(GLuint index, GLshort x, GLshort y, GLshort z, GLshort w);
+void APIENTRY shared_dispatch_stub_505(GLuint index, const GLshort *v);
+void APIENTRY shared_dispatch_stub_506(GLuint index, const GLubyte *v);
+void APIENTRY shared_dispatch_stub_507(GLuint index, const GLuint *v);
+void APIENTRY shared_dispatch_stub_508(GLuint index, const GLushort *v);
+void APIENTRY shared_dispatch_stub_509(GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *pointer);
+void APIENTRY shared_dispatch_stub_510(GLenum target, GLuint buffer);
+void APIENTRY shared_dispatch_stub_511(GLenum target, GLsizeiptrARB size, const GLvoid *data, GLenum usage);
+void APIENTRY shared_dispatch_stub_512(GLenum target, GLintptrARB offset, GLsizeiptrARB size, const GLvoid *data);
+void APIENTRY shared_dispatch_stub_513(GLsizei n, const GLuint *buffer);
+void APIENTRY shared_dispatch_stub_514(GLsizei n, GLuint *buffer);
+void APIENTRY shared_dispatch_stub_515(GLenum target, GLenum pname, GLint *params);
+void APIENTRY shared_dispatch_stub_516(GLenum target, GLenum pname, GLvoid **params);
+void APIENTRY shared_dispatch_stub_517(GLenum target, GLintptrARB offset, GLsizeiptrARB size, GLvoid *data);
+GLboolean APIENTRY shared_dispatch_stub_518(GLuint buffer);
+GLvoid * APIENTRY shared_dispatch_stub_519(GLenum target, GLenum access);
+GLboolean APIENTRY shared_dispatch_stub_520(GLenum target);
+void APIENTRY shared_dispatch_stub_521(GLenum target, GLuint id);
+void APIENTRY shared_dispatch_stub_522(GLsizei n, const GLuint *ids);
+void APIENTRY shared_dispatch_stub_523(GLenum target);
+void APIENTRY shared_dispatch_stub_524(GLsizei n, GLuint *ids);
+void APIENTRY shared_dispatch_stub_525(GLuint id, GLenum pname, GLint *params);
+void APIENTRY shared_dispatch_stub_526(GLuint id, GLenum pname, GLuint *params);
+void APIENTRY shared_dispatch_stub_527(GLenum target, GLenum pname, GLint *params);
+GLboolean APIENTRY shared_dispatch_stub_528(GLuint id);
+void APIENTRY shared_dispatch_stub_529(GLhandleARB containerObj, GLhandleARB obj);
+void APIENTRY shared_dispatch_stub_530(GLhandleARB shader);
+GLhandleARB APIENTRY shared_dispatch_stub_531(void);
+GLhandleARB APIENTRY shared_dispatch_stub_532(GLenum shaderType);
+void APIENTRY shared_dispatch_stub_533(GLhandleARB obj);
+void APIENTRY shared_dispatch_stub_534(GLhandleARB containerObj, GLhandleARB attachedObj);
+void APIENTRY shared_dispatch_stub_535(GLhandleARB program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name);
+void APIENTRY shared_dispatch_stub_536(GLhandleARB containerObj, GLsizei maxLength, GLsizei *length, GLhandleARB *infoLog);
+GLhandleARB APIENTRY shared_dispatch_stub_537(GLenum pname);
+void APIENTRY shared_dispatch_stub_538(GLhandleARB obj, GLsizei maxLength, GLsizei *length, GLcharARB *infoLog);
+void APIENTRY shared_dispatch_stub_539(GLhandleARB obj, GLenum pname, GLfloat *params);
+void APIENTRY shared_dispatch_stub_540(GLhandleARB obj, GLenum pname, GLint *params);
+void APIENTRY shared_dispatch_stub_541(GLhandleARB shader, GLsizei bufSize, GLsizei *length, GLcharARB *source);
+GLint APIENTRY shared_dispatch_stub_542(GLhandleARB program, const GLcharARB *name);
+void APIENTRY shared_dispatch_stub_543(GLhandleARB program, GLint location, GLfloat *params);
+void APIENTRY shared_dispatch_stub_544(GLhandleARB program, GLint location, GLint *params);
+void APIENTRY shared_dispatch_stub_545(GLhandleARB program);
+void APIENTRY shared_dispatch_stub_546(GLhandleARB shader, GLsizei count, const GLcharARB **string, const GLint *length);
+void APIENTRY shared_dispatch_stub_547(GLint location, GLfloat v0);
+void APIENTRY shared_dispatch_stub_548(GLint location, GLsizei count, const GLfloat *value);
+void APIENTRY shared_dispatch_stub_549(GLint location, GLint v0);
+void APIENTRY shared_dispatch_stub_550(GLint location, GLsizei count, const GLint *value);
+void APIENTRY shared_dispatch_stub_551(GLint location, GLfloat v0, GLfloat v1);
+void APIENTRY shared_dispatch_stub_552(GLint location, GLsizei count, const GLfloat *value);
+void APIENTRY shared_dispatch_stub_553(GLint location, GLint v0, GLint v1);
+void APIENTRY shared_dispatch_stub_554(GLint location, GLsizei count, const GLint *value);
+void APIENTRY shared_dispatch_stub_555(GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
+void APIENTRY shared_dispatch_stub_556(GLint location, GLsizei count, const GLfloat *value);
+void APIENTRY shared_dispatch_stub_557(GLint location, GLint v0, GLint v1, GLint v2);
+void APIENTRY shared_dispatch_stub_558(GLint location, GLsizei count, const GLint *value);
+void APIENTRY shared_dispatch_stub_559(GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
+void APIENTRY shared_dispatch_stub_560(GLint location, GLsizei count, const GLfloat *value);
+void APIENTRY shared_dispatch_stub_561(GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
+void APIENTRY shared_dispatch_stub_562(GLint location, GLsizei count, const GLint *value);
+void APIENTRY shared_dispatch_stub_563(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+void APIENTRY shared_dispatch_stub_564(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+void APIENTRY shared_dispatch_stub_565(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+void APIENTRY shared_dispatch_stub_566(GLhandleARB program);
+void APIENTRY shared_dispatch_stub_567(GLhandleARB program);
+void APIENTRY shared_dispatch_stub_568(GLhandleARB program, GLuint index, const GLcharARB *name);
+void APIENTRY shared_dispatch_stub_569(GLhandleARB program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name);
+GLint APIENTRY shared_dispatch_stub_570(GLhandleARB program, const GLcharARB *name);
+void APIENTRY shared_dispatch_stub_571(GLsizei n, const GLenum *bufs);
+void APIENTRY shared_dispatch_stub_572(GLenum mode, GLint first, GLsizei count, GLsizei primcount);
+void APIENTRY shared_dispatch_stub_573(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount);
+void APIENTRY shared_dispatch_stub_574(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
+void APIENTRY shared_dispatch_stub_575(GLenum target, GLenum attachment, GLuint texture, GLint level);
+void APIENTRY shared_dispatch_stub_576(GLenum target, GLenum attachment, GLuint texture, GLint level, GLenum face);
+void APIENTRY shared_dispatch_stub_577(GLuint program, GLenum pname, GLint value);
+void APIENTRY shared_dispatch_stub_578(GLuint index, GLuint divisor);
+void APIENTRY shared_dispatch_stub_579(GLenum target, GLintptr offset, GLsizeiptr length);
+GLvoid * APIENTRY shared_dispatch_stub_580(GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access);
+void APIENTRY shared_dispatch_stub_581(GLuint array);
+void APIENTRY shared_dispatch_stub_582(GLsizei n, GLuint *arrays);
+void APIENTRY shared_dispatch_stub_583(GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size);
+GLenum APIENTRY shared_dispatch_stub_584(GLsync sync, GLbitfield flags, GLuint64 timeout);
+void APIENTRY shared_dispatch_stub_585(GLsync sync);
+GLsync APIENTRY shared_dispatch_stub_586(GLenum condition, GLbitfield flags);
+void APIENTRY shared_dispatch_stub_587(GLenum pname, GLint64 *params);
+void APIENTRY shared_dispatch_stub_588(GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values);
+GLboolean APIENTRY shared_dispatch_stub_589(GLsync sync);
+void APIENTRY shared_dispatch_stub_590(GLsync sync, GLbitfield flags, GLuint64 timeout);
+void APIENTRY shared_dispatch_stub_591(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLint basevertex);
+void APIENTRY shared_dispatch_stub_592(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices, GLint basevertex);
+void APIENTRY shared_dispatch_stub_593(GLenum mode, const GLsizei *count, GLenum type, const GLvoid **indices, GLsizei primcount, const GLint *basevertex);
+void APIENTRY shared_dispatch_stub_594(GLuint buf, GLenum modeRGB, GLenum modeA);
+void APIENTRY shared_dispatch_stub_595(GLuint buf, GLenum mode);
+void APIENTRY shared_dispatch_stub_596(GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcA, GLenum dstA);
+void APIENTRY shared_dispatch_stub_597(GLuint buf, GLenum src, GLenum dst);
+void APIENTRY shared_dispatch_stub_598(GLenum target, GLuint id);
+void APIENTRY shared_dispatch_stub_599(GLsizei n, const GLuint *ids);
+void APIENTRY shared_dispatch_stub_600(GLenum mode, GLuint id);
+void APIENTRY shared_dispatch_stub_601(GLsizei n, GLuint *ids);
+GLboolean APIENTRY shared_dispatch_stub_602(GLuint id);
+void APIENTRY shared_dispatch_stub_603(void);
+void APIENTRY shared_dispatch_stub_604(void);
+void APIENTRY shared_dispatch_stub_605(GLclampf depth);
+void APIENTRY shared_dispatch_stub_606(GLclampf zNear, GLclampf zFar);
+void APIENTRY shared_dispatch_stub_607(GLenum shadertype, GLenum precisiontype, GLint *range, GLint *precision);
+void APIENTRY shared_dispatch_stub_608(void);
+void APIENTRY shared_dispatch_stub_609(GLsizei n, const GLuint *shaders, GLenum binaryformat, const GLvoid *binary, GLsizei length);
+void APIENTRY shared_dispatch_stub_610(GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, GLvoid *binary);
+void APIENTRY shared_dispatch_stub_611(GLuint program, GLenum binaryFormat, const GLvoid *binary, GLsizei length);
+void APIENTRY shared_dispatch_stub_612(GLuint program, GLenum pname, GLint value);
+void APIENTRY shared_dispatch_stub_613(GLfloat factor, GLfloat bias);
+void APIENTRY shared_dispatch_stub_614(GLfloat x, GLfloat y, GLfloat z, GLfloat width, GLfloat height);
+void APIENTRY shared_dispatch_stub_615(const GLfloat *coords);
+void APIENTRY shared_dispatch_stub_616(GLint x, GLint y, GLint z, GLint width, GLint height);
+void APIENTRY shared_dispatch_stub_617(const GLint *coords);
+void APIENTRY shared_dispatch_stub_618(GLshort x, GLshort y, GLshort z, GLshort width, GLshort height);
+void APIENTRY shared_dispatch_stub_619(const GLshort *coords);
+void APIENTRY shared_dispatch_stub_620(GLfixed x, GLfixed y, GLfixed z, GLfixed width, GLfixed height);
+void APIENTRY shared_dispatch_stub_621(const GLfixed *coords);
+void APIENTRY shared_dispatch_stub_622(GLenum type, GLsizei stride, const GLvoid *pointer);
+void APIENTRY shared_dispatch_stub_623(GLenum pname, GLfloat *params);
+void APIENTRY shared_dispatch_stub_624(GLenum pname, GLint *params);
+void APIENTRY shared_dispatch_stub_625(GLenum pname, GLfloat param);
+void APIENTRY shared_dispatch_stub_626(GLenum pname, const GLfloat *params);
+void APIENTRY shared_dispatch_stub_627(GLenum pname, GLint param);
+void APIENTRY shared_dispatch_stub_628(GLenum pname, const GLint *params);
+GLbitfield APIENTRY shared_dispatch_stub_629(GLfixed *mantissa, GLint *exponent);
+void APIENTRY shared_dispatch_stub_630(GLclampf value, GLboolean invert);
+void APIENTRY shared_dispatch_stub_631(GLenum pattern);
+void APIENTRY shared_dispatch_stub_632(GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer);
+void APIENTRY shared_dispatch_stub_633(GLsizei stride, GLsizei count, const GLboolean *pointer);
+void APIENTRY shared_dispatch_stub_634(GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer);
+void APIENTRY shared_dispatch_stub_635(GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer);
+void APIENTRY shared_dispatch_stub_636(GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer);
+void APIENTRY shared_dispatch_stub_637(GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer);
+void APIENTRY shared_dispatch_stub_638(GLenum pname, GLfloat param);
+void APIENTRY shared_dispatch_stub_639(GLenum pname, const GLfloat *params);
+void APIENTRY shared_dispatch_stub_640(GLint first, GLsizei count);
+void APIENTRY shared_dispatch_stub_641(void);
+void APIENTRY shared_dispatch_stub_642(GLbyte red, GLbyte green, GLbyte blue);
+void APIENTRY shared_dispatch_stub_643(const GLbyte *v);
+void APIENTRY shared_dispatch_stub_644(GLdouble red, GLdouble green, GLdouble blue);
+void APIENTRY shared_dispatch_stub_645(const GLdouble *v);
+void APIENTRY shared_dispatch_stub_646(GLfloat red, GLfloat green, GLfloat blue);
+void APIENTRY shared_dispatch_stub_647(const GLfloat *v);
+void APIENTRY shared_dispatch_stub_648(GLint red, GLint green, GLint blue);
+void APIENTRY shared_dispatch_stub_649(const GLint *v);
+void APIENTRY shared_dispatch_stub_650(GLshort red, GLshort green, GLshort blue);
+void APIENTRY shared_dispatch_stub_651(const GLshort *v);
+void APIENTRY shared_dispatch_stub_652(GLubyte red, GLubyte green, GLubyte blue);
+void APIENTRY shared_dispatch_stub_653(const GLubyte *v);
+void APIENTRY shared_dispatch_stub_654(GLuint red, GLuint green, GLuint blue);
+void APIENTRY shared_dispatch_stub_655(const GLuint *v);
+void APIENTRY shared_dispatch_stub_656(GLushort red, GLushort green, GLushort blue);
+void APIENTRY shared_dispatch_stub_657(const GLushort *v);
+void APIENTRY shared_dispatch_stub_658(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
+void APIENTRY shared_dispatch_stub_659(GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount);
+void APIENTRY shared_dispatch_stub_660(GLenum mode, const GLsizei *count, GLenum type, const GLvoid **indices, GLsizei primcount);
+void APIENTRY shared_dispatch_stub_661(GLenum type, GLsizei stride, const GLvoid *pointer);
+void APIENTRY shared_dispatch_stub_662(GLdouble coord);
+void APIENTRY shared_dispatch_stub_663(const GLdouble *coord);
+void APIENTRY shared_dispatch_stub_664(GLfloat coord);
+void APIENTRY shared_dispatch_stub_665(const GLfloat *coord);
+void APIENTRY shared_dispatch_stub_666(GLenum mode);
+void APIENTRY shared_dispatch_stub_667(GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
+void APIENTRY shared_dispatch_stub_668(void);
+void APIENTRY shared_dispatch_stub_669(GLsizei length, const GLvoid *pointer);
+void APIENTRY shared_dispatch_stub_670(GLenum stage, GLenum portion, GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage);
+void APIENTRY shared_dispatch_stub_671(GLenum stage, GLenum portion, GLenum abOutput, GLenum cdOutput, GLenum sumOutput, GLenum scale, GLenum bias, GLboolean abDotProduct, GLboolean cdDotProduct, GLboolean muxSum);
+void APIENTRY shared_dispatch_stub_672(GLenum pname, GLfloat param);
+void APIENTRY shared_dispatch_stub_673(GLenum pname, const GLfloat *params);
+void APIENTRY shared_dispatch_stub_674(GLenum pname, GLint param);
+void APIENTRY shared_dispatch_stub_675(GLenum pname, const GLint *params);
+void APIENTRY shared_dispatch_stub_676(GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage);
+void APIENTRY shared_dispatch_stub_677(GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLfloat *params);
+void APIENTRY shared_dispatch_stub_678(GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLint *params);
+void APIENTRY shared_dispatch_stub_679(GLenum stage, GLenum portion, GLenum pname, GLfloat *params);
+void APIENTRY shared_dispatch_stub_680(GLenum stage, GLenum portion, GLenum pname, GLint *params);
+void APIENTRY shared_dispatch_stub_681(GLenum variable, GLenum pname, GLfloat *params);
+void APIENTRY shared_dispatch_stub_682(GLenum variable, GLenum pname, GLint *params);
+void APIENTRY shared_dispatch_stub_683(void);
+void APIENTRY shared_dispatch_stub_684(GLdouble x, GLdouble y);
+void APIENTRY shared_dispatch_stub_685(const GLdouble *v);
+void APIENTRY shared_dispatch_stub_686(GLfloat x, GLfloat y);
+void APIENTRY shared_dispatch_stub_687(const GLfloat *v);
+void APIENTRY shared_dispatch_stub_688(GLint x, GLint y);
+void APIENTRY shared_dispatch_stub_689(const GLint *v);
+void APIENTRY shared_dispatch_stub_690(GLshort x, GLshort y);
+void APIENTRY shared_dispatch_stub_691(const GLshort *v);
+void APIENTRY shared_dispatch_stub_692(GLdouble x, GLdouble y, GLdouble z);
+void APIENTRY shared_dispatch_stub_693(const GLdouble *v);
+void APIENTRY shared_dispatch_stub_694(GLfloat x, GLfloat y, GLfloat z);
+void APIENTRY shared_dispatch_stub_695(const GLfloat *v);
+void APIENTRY shared_dispatch_stub_696(GLint x, GLint y, GLint z);
+void APIENTRY shared_dispatch_stub_697(const GLint *v);
+void APIENTRY shared_dispatch_stub_698(GLshort x, GLshort y, GLshort z);
+void APIENTRY shared_dispatch_stub_699(const GLshort *v);
+void APIENTRY shared_dispatch_stub_700(GLdouble x, GLdouble y, GLdouble z, GLdouble w);
+void APIENTRY shared_dispatch_stub_701(const GLdouble *v);
+void APIENTRY shared_dispatch_stub_702(GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+void APIENTRY shared_dispatch_stub_703(const GLfloat *v);
+void APIENTRY shared_dispatch_stub_704(GLint x, GLint y, GLint z, GLint w);
+void APIENTRY shared_dispatch_stub_705(const GLint *v);
+void APIENTRY shared_dispatch_stub_706(GLshort x, GLshort y, GLshort z, GLshort w);
+void APIENTRY shared_dispatch_stub_707(const GLshort *v);
+void APIENTRY shared_dispatch_stub_708(const GLenum *mode, const GLint *first, const GLsizei *count, GLsizei primcount, GLint modestride);
+void APIENTRY shared_dispatch_stub_709(const GLenum *mode, const GLsizei *count, GLenum type, const GLvoid * const *indices, GLsizei primcount, GLint modestride);
+void APIENTRY shared_dispatch_stub_710(GLsizei n, const GLuint *fences);
+void APIENTRY shared_dispatch_stub_711(GLuint fence);
+void APIENTRY shared_dispatch_stub_712(GLsizei n, GLuint *fences);
+void APIENTRY shared_dispatch_stub_713(GLuint fence, GLenum pname, GLint *params);
+GLboolean APIENTRY shared_dispatch_stub_714(GLuint fence);
+void APIENTRY shared_dispatch_stub_715(GLuint fence, GLenum condition);
+GLboolean APIENTRY shared_dispatch_stub_716(GLuint fence);
+GLboolean APIENTRY shared_dispatch_stub_717(GLsizei n, const GLuint *ids, GLboolean *residences);
+void APIENTRY shared_dispatch_stub_718(GLenum target, GLuint program);
+void APIENTRY shared_dispatch_stub_719(GLsizei n, const GLuint *programs);
+void APIENTRY shared_dispatch_stub_720(GLenum target, GLuint id, const GLfloat *params);
+void APIENTRY shared_dispatch_stub_721(GLsizei n, GLuint *programs);
+void APIENTRY shared_dispatch_stub_722(GLenum target, GLuint index, GLenum pname, GLdouble *params);
+void APIENTRY shared_dispatch_stub_723(GLenum target, GLuint index, GLenum pname, GLfloat *params);
+void APIENTRY shared_dispatch_stub_724(GLuint id, GLenum pname, GLubyte *program);
+void APIENTRY shared_dispatch_stub_725(GLuint id, GLenum pname, GLint *params);
+void APIENTRY shared_dispatch_stub_726(GLenum target, GLuint address, GLenum pname, GLint *params);
+void APIENTRY shared_dispatch_stub_727(GLuint index, GLenum pname, GLvoid **pointer);
+void APIENTRY shared_dispatch_stub_728(GLuint index, GLenum pname, GLdouble *params);
+void APIENTRY shared_dispatch_stub_729(GLuint index, GLenum pname, GLfloat *params);
+void APIENTRY shared_dispatch_stub_730(GLuint index, GLenum pname, GLint *params);
+GLboolean APIENTRY shared_dispatch_stub_731(GLuint program);
+void APIENTRY shared_dispatch_stub_732(GLenum target, GLuint id, GLsizei len, const GLubyte *program);
+void APIENTRY shared_dispatch_stub_733(GLenum target, GLuint index, GLsizei num, const GLdouble *params);
+void APIENTRY shared_dispatch_stub_734(GLenum target, GLuint index, GLsizei num, const GLfloat *params);
+void APIENTRY shared_dispatch_stub_735(GLsizei n, const GLuint *ids);
+void APIENTRY shared_dispatch_stub_736(GLenum target, GLuint address, GLenum matrix, GLenum transform);
+void APIENTRY shared_dispatch_stub_737(GLuint index, GLdouble x);
+void APIENTRY shared_dispatch_stub_738(GLuint index, const GLdouble *v);
+void APIENTRY shared_dispatch_stub_739(GLuint index, GLfloat x);
+void APIENTRY shared_dispatch_stub_740(GLuint index, const GLfloat *v);
+void APIENTRY shared_dispatch_stub_741(GLuint index, GLshort x);
+void APIENTRY shared_dispatch_stub_742(GLuint index, const GLshort *v);
+void APIENTRY shared_dispatch_stub_743(GLuint index, GLdouble x, GLdouble y);
+void APIENTRY shared_dispatch_stub_744(GLuint index, const GLdouble *v);
+void APIENTRY shared_dispatch_stub_745(GLuint index, GLfloat x, GLfloat y);
+void APIENTRY shared_dispatch_stub_746(GLuint index, const GLfloat *v);
+void APIENTRY shared_dispatch_stub_747(GLuint index, GLshort x, GLshort y);
+void APIENTRY shared_dispatch_stub_748(GLuint index, const GLshort *v);
+void APIENTRY shared_dispatch_stub_749(GLuint index, GLdouble x, GLdouble y, GLdouble z);
+void APIENTRY shared_dispatch_stub_750(GLuint index, const GLdouble *v);
+void APIENTRY shared_dispatch_stub_751(GLuint index, GLfloat x, GLfloat y, GLfloat z);
+void APIENTRY shared_dispatch_stub_752(GLuint index, const GLfloat *v);
+void APIENTRY shared_dispatch_stub_753(GLuint index, GLshort x, GLshort y, GLshort z);
+void APIENTRY shared_dispatch_stub_754(GLuint index, const GLshort *v);
+void APIENTRY shared_dispatch_stub_755(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
+void APIENTRY shared_dispatch_stub_756(GLuint index, const GLdouble *v);
+void APIENTRY shared_dispatch_stub_757(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+void APIENTRY shared_dispatch_stub_758(GLuint index, const GLfloat *v);
+void APIENTRY shared_dispatch_stub_759(GLuint index, GLshort x, GLshort y, GLshort z, GLshort w);
+void APIENTRY shared_dispatch_stub_760(GLuint index, const GLshort *v);
+void APIENTRY shared_dispatch_stub_761(GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w);
+void APIENTRY shared_dispatch_stub_762(GLuint index, const GLubyte *v);
+void APIENTRY shared_dispatch_stub_763(GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
+void APIENTRY shared_dispatch_stub_764(GLuint index, GLsizei n, const GLdouble *v);
+void APIENTRY shared_dispatch_stub_765(GLuint index, GLsizei n, const GLfloat *v);
+void APIENTRY shared_dispatch_stub_766(GLuint index, GLsizei n, const GLshort *v);
+void APIENTRY shared_dispatch_stub_767(GLuint index, GLsizei n, const GLdouble *v);
+void APIENTRY shared_dispatch_stub_768(GLuint index, GLsizei n, const GLfloat *v);
+void APIENTRY shared_dispatch_stub_769(GLuint index, GLsizei n, const GLshort *v);
+void APIENTRY shared_dispatch_stub_770(GLuint index, GLsizei n, const GLdouble *v);
+void APIENTRY shared_dispatch_stub_771(GLuint index, GLsizei n, const GLfloat *v);
+void APIENTRY shared_dispatch_stub_772(GLuint index, GLsizei n, const GLshort *v);
+void APIENTRY shared_dispatch_stub_773(GLuint index, GLsizei n, const GLdouble *v);
+void APIENTRY shared_dispatch_stub_774(GLuint index, GLsizei n, const GLfloat *v);
+void APIENTRY shared_dispatch_stub_775(GLuint index, GLsizei n, const GLshort *v);
+void APIENTRY shared_dispatch_stub_776(GLuint index, GLsizei n, const GLubyte *v);
+void APIENTRY shared_dispatch_stub_777(GLenum pname, GLfloat *param);
+void APIENTRY shared_dispatch_stub_778(GLenum pname, GLint *param);
+void APIENTRY shared_dispatch_stub_779(GLenum pname, const GLfloat *param);
+void APIENTRY shared_dispatch_stub_780(GLenum pname, const GLint *param);
+void APIENTRY shared_dispatch_stub_781(GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod);
+void APIENTRY shared_dispatch_stub_782(GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod);
+void APIENTRY shared_dispatch_stub_783(GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod);
+void APIENTRY shared_dispatch_stub_784(void);
+void APIENTRY shared_dispatch_stub_785(GLuint id);
+void APIENTRY shared_dispatch_stub_786(GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod);
+void APIENTRY shared_dispatch_stub_787(GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod);
+void APIENTRY shared_dispatch_stub_788(GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod);
+void APIENTRY shared_dispatch_stub_789(GLuint id);
+void APIENTRY shared_dispatch_stub_790(void);
+GLuint APIENTRY shared_dispatch_stub_791(GLuint range);
+void APIENTRY shared_dispatch_stub_792(GLuint dst, GLuint coord, GLenum swizzle);
+void APIENTRY shared_dispatch_stub_793(GLuint dst, GLuint interp, GLenum swizzle);
+void APIENTRY shared_dispatch_stub_794(GLuint dst, const GLfloat *value);
+void APIENTRY shared_dispatch_stub_795(GLenum pname, GLint param);
+void APIENTRY shared_dispatch_stub_796(GLenum pname, const GLint *params);
+void APIENTRY shared_dispatch_stub_797(GLenum face);
+void APIENTRY shared_dispatch_stub_798(GLuint array);
+void APIENTRY shared_dispatch_stub_799(GLsizei n, const GLuint *arrays);
+void APIENTRY shared_dispatch_stub_800(GLsizei n, GLuint *arrays);
+GLboolean APIENTRY shared_dispatch_stub_801(GLuint array);
+void APIENTRY shared_dispatch_stub_802(GLuint id, GLsizei len, const GLubyte *name, GLdouble *params);
+void APIENTRY shared_dispatch_stub_803(GLuint id, GLsizei len, const GLubyte *name, GLfloat *params);
+void APIENTRY shared_dispatch_stub_804(GLuint id, GLsizei len, const GLubyte *name, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
+void APIENTRY shared_dispatch_stub_805(GLuint id, GLsizei len, const GLubyte *name, const GLdouble *v);
+void APIENTRY shared_dispatch_stub_806(GLuint id, GLsizei len, const GLubyte *name, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+void APIENTRY shared_dispatch_stub_807(GLuint id, GLsizei len, const GLubyte *name, const GLfloat *v);
+void APIENTRY shared_dispatch_stub_808(GLuint index);
+void APIENTRY shared_dispatch_stub_809(void);
+void APIENTRY shared_dispatch_stub_810(GLenum func, GLclampx ref);
+void APIENTRY shared_dispatch_stub_811(GLclampx red, GLclampx green, GLclampx blue, GLclampx alpha);
+void APIENTRY shared_dispatch_stub_812(GLclampx depth);
+void APIENTRY shared_dispatch_stub_813(GLenum plane, const GLfixed *equation);
+void APIENTRY shared_dispatch_stub_814(GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha);
+void APIENTRY shared_dispatch_stub_815(GLclampx zNear, GLclampx zFar);
+void APIENTRY shared_dispatch_stub_816(GLenum pname, GLfixed param);
+void APIENTRY shared_dispatch_stub_817(GLenum pname, const GLfixed *params);
+void APIENTRY shared_dispatch_stub_818(GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar);
+void APIENTRY shared_dispatch_stub_819(GLenum plane, GLfixed *equation);
+void APIENTRY shared_dispatch_stub_820(GLenum pname, GLfixed *params);
+void APIENTRY shared_dispatch_stub_821(GLenum light, GLenum pname, GLfixed *params);
+void APIENTRY shared_dispatch_stub_822(GLenum face, GLenum pname, GLfixed *params);
+void APIENTRY shared_dispatch_stub_823(GLenum target, GLenum pname, GLfixed *params);
+void APIENTRY shared_dispatch_stub_824(GLenum coord, GLenum pname, GLfixed *params);
+void APIENTRY shared_dispatch_stub_825(GLenum target, GLenum pname, GLfixed *params);
+void APIENTRY shared_dispatch_stub_826(GLenum pname, GLfixed param);
+void APIENTRY shared_dispatch_stub_827(GLenum pname, const GLfixed *params);
+void APIENTRY shared_dispatch_stub_828(GLenum light, GLenum pname, GLfixed param);
+void APIENTRY shared_dispatch_stub_829(GLenum light, GLenum pname, const GLfixed *params);
+void APIENTRY shared_dispatch_stub_830(GLfixed width);
+void APIENTRY shared_dispatch_stub_831(const GLfixed *m);
+void APIENTRY shared_dispatch_stub_832(GLenum face, GLenum pname, GLfixed param);
+void APIENTRY shared_dispatch_stub_833(GLenum face, GLenum pname, const GLfixed *params);
+void APIENTRY shared_dispatch_stub_834(const GLfixed *m);
+void APIENTRY shared_dispatch_stub_835(GLenum target, GLfixed s, GLfixed t, GLfixed r, GLfixed q);
+void APIENTRY shared_dispatch_stub_836(GLfixed nx, GLfixed ny, GLfixed nz);
+void APIENTRY shared_dispatch_stub_837(GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar);
+void APIENTRY shared_dispatch_stub_838(GLenum pname, GLfixed param);
+void APIENTRY shared_dispatch_stub_839(GLenum pname, const GLfixed *params);
+void APIENTRY shared_dispatch_stub_840(GLfixed size);
+void APIENTRY shared_dispatch_stub_841(GLfixed factor, GLfixed units);
+void APIENTRY shared_dispatch_stub_842(GLfixed angle, GLfixed x, GLfixed y, GLfixed z);
+void APIENTRY shared_dispatch_stub_843(GLclampx value, GLboolean invert);
+void APIENTRY shared_dispatch_stub_844(GLfixed x, GLfixed y, GLfixed z);
+void APIENTRY shared_dispatch_stub_845(GLenum target, GLenum pname, GLfixed param);
+void APIENTRY shared_dispatch_stub_846(GLenum target, GLenum pname, const GLfixed *params);
+void APIENTRY shared_dispatch_stub_847(GLenum coord, GLenum pname, GLint param);
+void APIENTRY shared_dispatch_stub_848(GLenum coord, GLenum pname, const GLfixed *params);
+void APIENTRY shared_dispatch_stub_849(GLenum target, GLenum pname, GLfixed param);
+void APIENTRY shared_dispatch_stub_850(GLenum target, GLenum pname, const GLfixed *params);
+void APIENTRY shared_dispatch_stub_851(GLfixed x, GLfixed y, GLfixed z);
+void APIENTRY shared_dispatch_stub_852(GLenum plane, const GLfloat *equation);
+void APIENTRY shared_dispatch_stub_853(GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar);
+void APIENTRY shared_dispatch_stub_854(GLenum plane, GLfloat *equation);
+void APIENTRY shared_dispatch_stub_855(GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar);
+void APIENTRY shared_dispatch_stub_856(GLclampd zmin, GLclampd zmax);
+void APIENTRY shared_dispatch_stub_857(GLenum modeRGB, GLenum modeA);
+void APIENTRY shared_dispatch_stub_858(GLenum target, GLuint framebuffer);
+void APIENTRY shared_dispatch_stub_859(GLenum target, GLuint renderbuffer);
+GLenum APIENTRY shared_dispatch_stub_860(GLenum target);
+void APIENTRY shared_dispatch_stub_861(GLsizei n, const GLuint *framebuffers);
+void APIENTRY shared_dispatch_stub_862(GLsizei n, const GLuint *renderbuffers);
+void APIENTRY shared_dispatch_stub_863(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
+void APIENTRY shared_dispatch_stub_864(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
+void APIENTRY shared_dispatch_stub_865(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
+void APIENTRY shared_dispatch_stub_866(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);
+void APIENTRY shared_dispatch_stub_867(GLsizei n, GLuint *framebuffers);
+void APIENTRY shared_dispatch_stub_868(GLsizei n, GLuint *renderbuffers);
+void APIENTRY shared_dispatch_stub_869(GLenum target);
+void APIENTRY shared_dispatch_stub_870(GLenum target, GLenum attachment, GLenum pname, GLint *params);
+void APIENTRY shared_dispatch_stub_871(GLenum target, GLenum pname, GLint *params);
+GLboolean APIENTRY shared_dispatch_stub_872(GLuint framebuffer);
+GLboolean APIENTRY shared_dispatch_stub_873(GLuint renderbuffer);
+void APIENTRY shared_dispatch_stub_874(GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
+void APIENTRY shared_dispatch_stub_875(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
+void APIENTRY shared_dispatch_stub_876(GLenum target, GLenum pname, GLint param);
+void APIENTRY shared_dispatch_stub_877(GLenum target, GLintptr offset, GLsizeiptr size);
+void APIENTRY shared_dispatch_stub_878(GLuint program, GLuint colorNumber, const GLchar *name);
+GLint APIENTRY shared_dispatch_stub_879(GLuint program, const GLchar *name);
+void APIENTRY shared_dispatch_stub_880(GLuint program, GLint location, GLuint *params);
+void APIENTRY shared_dispatch_stub_881(GLuint index, GLenum pname, GLint *params);
+void APIENTRY shared_dispatch_stub_882(GLuint index, GLenum pname, GLuint *params);
+void APIENTRY shared_dispatch_stub_883(GLint location, GLuint x);
+void APIENTRY shared_dispatch_stub_884(GLint location, GLsizei count, const GLuint *value);
+void APIENTRY shared_dispatch_stub_885(GLint location, GLuint x, GLuint y);
+void APIENTRY shared_dispatch_stub_886(GLint location, GLsizei count, const GLuint *value);
+void APIENTRY shared_dispatch_stub_887(GLint location, GLuint x, GLuint y, GLuint z);
+void APIENTRY shared_dispatch_stub_888(GLint location, GLsizei count, const GLuint *value);
+void APIENTRY shared_dispatch_stub_889(GLint location, GLuint x, GLuint y, GLuint z, GLuint w);
+void APIENTRY shared_dispatch_stub_890(GLint location, GLsizei count, const GLuint *value);
+void APIENTRY shared_dispatch_stub_891(GLuint index, GLint x);
+void APIENTRY shared_dispatch_stub_892(GLuint index, const GLint *v);
+void APIENTRY shared_dispatch_stub_893(GLuint index, GLuint x);
+void APIENTRY shared_dispatch_stub_894(GLuint index, const GLuint *v);
+void APIENTRY shared_dispatch_stub_895(GLuint index, GLint x, GLint y);
+void APIENTRY shared_dispatch_stub_896(GLuint index, const GLint *v);
+void APIENTRY shared_dispatch_stub_897(GLuint index, GLuint x, GLuint y);
+void APIENTRY shared_dispatch_stub_898(GLuint index, const GLuint *v);
+void APIENTRY shared_dispatch_stub_899(GLuint index, GLint x, GLint y, GLint z);
+void APIENTRY shared_dispatch_stub_900(GLuint index, const GLint *v);
+void APIENTRY shared_dispatch_stub_901(GLuint index, GLuint x, GLuint y, GLuint z);
+void APIENTRY shared_dispatch_stub_902(GLuint index, const GLuint *v);
+void APIENTRY shared_dispatch_stub_903(GLuint index, const GLbyte *v);
+void APIENTRY shared_dispatch_stub_904(GLuint index, GLint x, GLint y, GLint z, GLint w);
+void APIENTRY shared_dispatch_stub_905(GLuint index, const GLint *v);
+void APIENTRY shared_dispatch_stub_906(GLuint index, const GLshort *v);
+void APIENTRY shared_dispatch_stub_907(GLuint index, const GLubyte *v);
+void APIENTRY shared_dispatch_stub_908(GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
+void APIENTRY shared_dispatch_stub_909(GLuint index, const GLuint *v);
+void APIENTRY shared_dispatch_stub_910(GLuint index, const GLushort *v);
+void APIENTRY shared_dispatch_stub_911(GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
+void APIENTRY shared_dispatch_stub_912(GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer);
+void APIENTRY shared_dispatch_stub_913(GLuint buf, GLboolean r, GLboolean g, GLboolean b, GLboolean a);
+void APIENTRY shared_dispatch_stub_914(GLenum target, GLuint index);
+void APIENTRY shared_dispatch_stub_915(GLenum target, GLuint index);
+void APIENTRY shared_dispatch_stub_916(GLenum value, GLuint index, GLboolean *data);
+void APIENTRY shared_dispatch_stub_917(GLenum value, GLuint index, GLint *data);
+GLboolean APIENTRY shared_dispatch_stub_918(GLenum target, GLuint index);
+void APIENTRY shared_dispatch_stub_919(GLint r, GLint g, GLint b, GLint a);
+void APIENTRY shared_dispatch_stub_920(GLuint r, GLuint g, GLuint b, GLuint a);
+void APIENTRY shared_dispatch_stub_921(GLenum target, GLenum pname, GLint *params);
+void APIENTRY shared_dispatch_stub_922(GLenum target, GLenum pname, GLuint *params);
+void APIENTRY shared_dispatch_stub_923(GLenum target, GLenum pname, const GLint *params);
+void APIENTRY shared_dispatch_stub_924(GLenum target, GLenum pname, const GLuint *params);
+void APIENTRY shared_dispatch_stub_925(GLuint query, GLenum mode);
+void APIENTRY shared_dispatch_stub_926(void);
+void APIENTRY shared_dispatch_stub_927(GLenum mode);
+void APIENTRY shared_dispatch_stub_928(GLenum target, GLuint index, GLuint buffer);
+void APIENTRY shared_dispatch_stub_929(GLenum target, GLuint index, GLuint buffer, GLintptr offset);
+void APIENTRY shared_dispatch_stub_930(GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size);
+void APIENTRY shared_dispatch_stub_931(void);
+void APIENTRY shared_dispatch_stub_932(GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name);
+void APIENTRY shared_dispatch_stub_933(GLuint program, GLsizei count, const char **varyings, GLenum bufferMode);
+void APIENTRY shared_dispatch_stub_934(GLenum mode);
+void APIENTRY shared_dispatch_stub_935(GLenum target, GLenum pname, GLvoid **params);
+void APIENTRY shared_dispatch_stub_936(GLenum target, GLsizei length, GLvoid *pointer);
+void APIENTRY shared_dispatch_stub_937(GLenum objectType, GLuint name, GLenum pname, GLint *value);
+GLenum APIENTRY shared_dispatch_stub_938(GLenum objectType, GLuint name, GLenum option);
+GLenum APIENTRY shared_dispatch_stub_939(GLenum objectType, GLuint name, GLenum option);
+void APIENTRY shared_dispatch_stub_940(GLuint program);
+GLuint APIENTRY shared_dispatch_stub_941(GLenum type, const GLchar *string);
+void APIENTRY shared_dispatch_stub_942(GLenum type, GLuint program);
+void APIENTRY shared_dispatch_stub_943(void);
+void APIENTRY shared_dispatch_stub_944(GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask);
+void APIENTRY shared_dispatch_stub_945(GLenum target, GLuint index, GLsizei count, const GLfloat *params);
+void APIENTRY shared_dispatch_stub_946(GLenum target, GLuint index, GLsizei count, const GLfloat *params);
+void APIENTRY shared_dispatch_stub_947(GLuint id, GLenum pname, GLint64EXT *params);
+void APIENTRY shared_dispatch_stub_948(GLuint id, GLenum pname, GLuint64EXT *params);
+void APIENTRY shared_dispatch_stub_949(GLenum target, GLvoid *writeOffset);
+void APIENTRY shared_dispatch_stub_950(GLenum target, GLvoid *writeOffset);
+#undef MAPI_TMP_DEFINES
+#endif /* MAPI_TMP_DEFINES */
+
+#ifdef MAPI_TMP_TABLE
+#define MAPI_TABLE_NUM_STATIC 951
+#define MAPI_TABLE_NUM_DYNAMIC 256
+#undef MAPI_TMP_TABLE
+#endif /* MAPI_TMP_TABLE */
+
+#ifdef MAPI_TMP_NOOP_ARRAY
+#ifdef DEBUG
+
+static void APIENTRY noopNewList(GLuint list, GLenum mode)
+{
+ noop_warn("glNewList");
+}
+
+static void APIENTRY noopEndList(void)
+{
+ noop_warn("glEndList");
+}
+
+static void APIENTRY noopCallList(GLuint list)
+{
+ noop_warn("glCallList");
+}
+
+static void APIENTRY noopCallLists(GLsizei n, GLenum type, const GLvoid *lists)
+{
+ noop_warn("glCallLists");
+}
+
+static void APIENTRY noopDeleteLists(GLuint list, GLsizei range)
+{
+ noop_warn("glDeleteLists");
+}
+
+static GLuint APIENTRY noopGenLists(GLsizei range)
+{
+ noop_warn("glGenLists");
+ return (GLuint) 0;
+}
+
+static void APIENTRY noopListBase(GLuint base)
+{
+ noop_warn("glListBase");
+}
+
+static void APIENTRY noopBegin(GLenum mode)
+{
+ noop_warn("glBegin");
+}
+
+static void APIENTRY noopBitmap(GLsizei width, GLsizei height, GLfloat xorig, GLfloat yorig, GLfloat xmove, GLfloat ymove, const GLubyte *bitmap)
+{
+ noop_warn("glBitmap");
+}
+
+static void APIENTRY noopColor3b(GLbyte red, GLbyte green, GLbyte blue)
+{
+ noop_warn("glColor3b");
+}
+
+static void APIENTRY noopColor3bv(const GLbyte *v)
+{
+ noop_warn("glColor3bv");
+}
+
+static void APIENTRY noopColor3d(GLdouble red, GLdouble green, GLdouble blue)
+{
+ noop_warn("glColor3d");
+}
+
+static void APIENTRY noopColor3dv(const GLdouble *v)
+{
+ noop_warn("glColor3dv");
+}
+
+static void APIENTRY noopColor3f(GLfloat red, GLfloat green, GLfloat blue)
+{
+ noop_warn("glColor3f");
+}
+
+static void APIENTRY noopColor3fv(const GLfloat *v)
+{
+ noop_warn("glColor3fv");
+}
+
+static void APIENTRY noopColor3i(GLint red, GLint green, GLint blue)
+{
+ noop_warn("glColor3i");
+}
+
+static void APIENTRY noopColor3iv(const GLint *v)
+{
+ noop_warn("glColor3iv");
+}
+
+static void APIENTRY noopColor3s(GLshort red, GLshort green, GLshort blue)
+{
+ noop_warn("glColor3s");
+}
+
+static void APIENTRY noopColor3sv(const GLshort *v)
+{
+ noop_warn("glColor3sv");
+}
+
+static void APIENTRY noopColor3ub(GLubyte red, GLubyte green, GLubyte blue)
+{
+ noop_warn("glColor3ub");
+}
+
+static void APIENTRY noopColor3ubv(const GLubyte *v)
+{
+ noop_warn("glColor3ubv");
+}
+
+static void APIENTRY noopColor3ui(GLuint red, GLuint green, GLuint blue)
+{
+ noop_warn("glColor3ui");
+}
+
+static void APIENTRY noopColor3uiv(const GLuint *v)
+{
+ noop_warn("glColor3uiv");
+}
+
+static void APIENTRY noopColor3us(GLushort red, GLushort green, GLushort blue)
+{
+ noop_warn("glColor3us");
+}
+
+static void APIENTRY noopColor3usv(const GLushort *v)
+{
+ noop_warn("glColor3usv");
+}
+
+static void APIENTRY noopColor4b(GLbyte red, GLbyte green, GLbyte blue, GLbyte alpha)
+{
+ noop_warn("glColor4b");
+}
+
+static void APIENTRY noopColor4bv(const GLbyte *v)
+{
+ noop_warn("glColor4bv");
+}
+
+static void APIENTRY noopColor4d(GLdouble red, GLdouble green, GLdouble blue, GLdouble alpha)
+{
+ noop_warn("glColor4d");
+}
+
+static void APIENTRY noopColor4dv(const GLdouble *v)
+{
+ noop_warn("glColor4dv");
+}
+
+static void APIENTRY noopColor4f(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha)
+{
+ noop_warn("glColor4f");
+}
+
+static void APIENTRY noopColor4fv(const GLfloat *v)
+{
+ noop_warn("glColor4fv");
+}
+
+static void APIENTRY noopColor4i(GLint red, GLint green, GLint blue, GLint alpha)
+{
+ noop_warn("glColor4i");
+}
+
+static void APIENTRY noopColor4iv(const GLint *v)
+{
+ noop_warn("glColor4iv");
+}
+
+static void APIENTRY noopColor4s(GLshort red, GLshort green, GLshort blue, GLshort alpha)
+{
+ noop_warn("glColor4s");
+}
+
+static void APIENTRY noopColor4sv(const GLshort *v)
+{
+ noop_warn("glColor4sv");
+}
+
+static void APIENTRY noopColor4ub(GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha)
+{
+ noop_warn("glColor4ub");
+}
+
+static void APIENTRY noopColor4ubv(const GLubyte *v)
+{
+ noop_warn("glColor4ubv");
+}
+
+static void APIENTRY noopColor4ui(GLuint red, GLuint green, GLuint blue, GLuint alpha)
+{
+ noop_warn("glColor4ui");
+}
+
+static void APIENTRY noopColor4uiv(const GLuint *v)
+{
+ noop_warn("glColor4uiv");
+}
+
+static void APIENTRY noopColor4us(GLushort red, GLushort green, GLushort blue, GLushort alpha)
+{
+ noop_warn("glColor4us");
+}
+
+static void APIENTRY noopColor4usv(const GLushort *v)
+{
+ noop_warn("glColor4usv");
+}
+
+static void APIENTRY noopEdgeFlag(GLboolean flag)
+{
+ noop_warn("glEdgeFlag");
+}
+
+static void APIENTRY noopEdgeFlagv(const GLboolean *flag)
+{
+ noop_warn("glEdgeFlagv");
+}
+
+static void APIENTRY noopEnd(void)
+{
+ noop_warn("glEnd");
+}
+
+static void APIENTRY noopIndexd(GLdouble c)
+{
+ noop_warn("glIndexd");
+}
+
+static void APIENTRY noopIndexdv(const GLdouble *c)
+{
+ noop_warn("glIndexdv");
+}
+
+static void APIENTRY noopIndexf(GLfloat c)
+{
+ noop_warn("glIndexf");
+}
+
+static void APIENTRY noopIndexfv(const GLfloat *c)
+{
+ noop_warn("glIndexfv");
+}
+
+static void APIENTRY noopIndexi(GLint c)
+{
+ noop_warn("glIndexi");
+}
+
+static void APIENTRY noopIndexiv(const GLint *c)
+{
+ noop_warn("glIndexiv");
+}
+
+static void APIENTRY noopIndexs(GLshort c)
+{
+ noop_warn("glIndexs");
+}
+
+static void APIENTRY noopIndexsv(const GLshort *c)
+{
+ noop_warn("glIndexsv");
+}
+
+static void APIENTRY noopNormal3b(GLbyte nx, GLbyte ny, GLbyte nz)
+{
+ noop_warn("glNormal3b");
+}
+
+static void APIENTRY noopNormal3bv(const GLbyte *v)
+{
+ noop_warn("glNormal3bv");
+}
+
+static void APIENTRY noopNormal3d(GLdouble nx, GLdouble ny, GLdouble nz)
+{
+ noop_warn("glNormal3d");
+}
+
+static void APIENTRY noopNormal3dv(const GLdouble *v)
+{
+ noop_warn("glNormal3dv");
+}
+
+static void APIENTRY noopNormal3f(GLfloat nx, GLfloat ny, GLfloat nz)
+{
+ noop_warn("glNormal3f");
+}
+
+static void APIENTRY noopNormal3fv(const GLfloat *v)
+{
+ noop_warn("glNormal3fv");
+}
+
+static void APIENTRY noopNormal3i(GLint nx, GLint ny, GLint nz)
+{
+ noop_warn("glNormal3i");
+}
+
+static void APIENTRY noopNormal3iv(const GLint *v)
+{
+ noop_warn("glNormal3iv");
+}
+
+static void APIENTRY noopNormal3s(GLshort nx, GLshort ny, GLshort nz)
+{
+ noop_warn("glNormal3s");
+}
+
+static void APIENTRY noopNormal3sv(const GLshort *v)
+{
+ noop_warn("glNormal3sv");
+}
+
+static void APIENTRY noopRasterPos2d(GLdouble x, GLdouble y)
+{
+ noop_warn("glRasterPos2d");
+}
+
+static void APIENTRY noopRasterPos2dv(const GLdouble *v)
+{
+ noop_warn("glRasterPos2dv");
+}
+
+static void APIENTRY noopRasterPos2f(GLfloat x, GLfloat y)
+{
+ noop_warn("glRasterPos2f");
+}
+
+static void APIENTRY noopRasterPos2fv(const GLfloat *v)
+{
+ noop_warn("glRasterPos2fv");
+}
+
+static void APIENTRY noopRasterPos2i(GLint x, GLint y)
+{
+ noop_warn("glRasterPos2i");
+}
+
+static void APIENTRY noopRasterPos2iv(const GLint *v)
+{
+ noop_warn("glRasterPos2iv");
+}
+
+static void APIENTRY noopRasterPos2s(GLshort x, GLshort y)
+{
+ noop_warn("glRasterPos2s");
+}
+
+static void APIENTRY noopRasterPos2sv(const GLshort *v)
+{
+ noop_warn("glRasterPos2sv");
+}
+
+static void APIENTRY noopRasterPos3d(GLdouble x, GLdouble y, GLdouble z)
+{
+ noop_warn("glRasterPos3d");
+}
+
+static void APIENTRY noopRasterPos3dv(const GLdouble *v)
+{
+ noop_warn("glRasterPos3dv");
+}
+
+static void APIENTRY noopRasterPos3f(GLfloat x, GLfloat y, GLfloat z)
+{
+ noop_warn("glRasterPos3f");
+}
+
+static void APIENTRY noopRasterPos3fv(const GLfloat *v)
+{
+ noop_warn("glRasterPos3fv");
+}
+
+static void APIENTRY noopRasterPos3i(GLint x, GLint y, GLint z)
+{
+ noop_warn("glRasterPos3i");
+}
+
+static void APIENTRY noopRasterPos3iv(const GLint *v)
+{
+ noop_warn("glRasterPos3iv");
+}
+
+static void APIENTRY noopRasterPos3s(GLshort x, GLshort y, GLshort z)
+{
+ noop_warn("glRasterPos3s");
+}
+
+static void APIENTRY noopRasterPos3sv(const GLshort *v)
+{
+ noop_warn("glRasterPos3sv");
+}
+
+static void APIENTRY noopRasterPos4d(GLdouble x, GLdouble y, GLdouble z, GLdouble w)
+{
+ noop_warn("glRasterPos4d");
+}
+
+static void APIENTRY noopRasterPos4dv(const GLdouble *v)
+{
+ noop_warn("glRasterPos4dv");
+}
+
+static void APIENTRY noopRasterPos4f(GLfloat x, GLfloat y, GLfloat z, GLfloat w)
+{
+ noop_warn("glRasterPos4f");
+}
+
+static void APIENTRY noopRasterPos4fv(const GLfloat *v)
+{
+ noop_warn("glRasterPos4fv");
+}
+
+static void APIENTRY noopRasterPos4i(GLint x, GLint y, GLint z, GLint w)
+{
+ noop_warn("glRasterPos4i");
+}
+
+static void APIENTRY noopRasterPos4iv(const GLint *v)
+{
+ noop_warn("glRasterPos4iv");
+}
+
+static void APIENTRY noopRasterPos4s(GLshort x, GLshort y, GLshort z, GLshort w)
+{
+ noop_warn("glRasterPos4s");
+}
+
+static void APIENTRY noopRasterPos4sv(const GLshort *v)
+{
+ noop_warn("glRasterPos4sv");
+}
+
+static void APIENTRY noopRectd(GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2)
+{
+ noop_warn("glRectd");
+}
+
+static void APIENTRY noopRectdv(const GLdouble *v1, const GLdouble *v2)
+{
+ noop_warn("glRectdv");
+}
+
+static void APIENTRY noopRectf(GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2)
+{
+ noop_warn("glRectf");
+}
+
+static void APIENTRY noopRectfv(const GLfloat *v1, const GLfloat *v2)
+{
+ noop_warn("glRectfv");
+}
+
+static void APIENTRY noopRecti(GLint x1, GLint y1, GLint x2, GLint y2)
+{
+ noop_warn("glRecti");
+}
+
+static void APIENTRY noopRectiv(const GLint *v1, const GLint *v2)
+{
+ noop_warn("glRectiv");
+}
+
+static void APIENTRY noopRects(GLshort x1, GLshort y1, GLshort x2, GLshort y2)
+{
+ noop_warn("glRects");
+}
+
+static void APIENTRY noopRectsv(const GLshort *v1, const GLshort *v2)
+{
+ noop_warn("glRectsv");
+}
+
+static void APIENTRY noopTexCoord1d(GLdouble s)
+{
+ noop_warn("glTexCoord1d");
+}
+
+static void APIENTRY noopTexCoord1dv(const GLdouble *v)
+{
+ noop_warn("glTexCoord1dv");
+}
+
+static void APIENTRY noopTexCoord1f(GLfloat s)
+{
+ noop_warn("glTexCoord1f");
+}
+
+static void APIENTRY noopTexCoord1fv(const GLfloat *v)
+{
+ noop_warn("glTexCoord1fv");
+}
+
+static void APIENTRY noopTexCoord1i(GLint s)
+{
+ noop_warn("glTexCoord1i");
+}
+
+static void APIENTRY noopTexCoord1iv(const GLint *v)
+{
+ noop_warn("glTexCoord1iv");
+}
+
+static void APIENTRY noopTexCoord1s(GLshort s)
+{
+ noop_warn("glTexCoord1s");
+}
+
+static void APIENTRY noopTexCoord1sv(const GLshort *v)
+{
+ noop_warn("glTexCoord1sv");
+}
+
+static void APIENTRY noopTexCoord2d(GLdouble s, GLdouble t)
+{
+ noop_warn("glTexCoord2d");
+}
+
+static void APIENTRY noopTexCoord2dv(const GLdouble *v)
+{
+ noop_warn("glTexCoord2dv");
+}
+
+static void APIENTRY noopTexCoord2f(GLfloat s, GLfloat t)
+{
+ noop_warn("glTexCoord2f");
+}
+
+static void APIENTRY noopTexCoord2fv(const GLfloat *v)
+{
+ noop_warn("glTexCoord2fv");
+}
+
+static void APIENTRY noopTexCoord2i(GLint s, GLint t)
+{
+ noop_warn("glTexCoord2i");
+}
+
+static void APIENTRY noopTexCoord2iv(const GLint *v)
+{
+ noop_warn("glTexCoord2iv");
+}
+
+static void APIENTRY noopTexCoord2s(GLshort s, GLshort t)
+{
+ noop_warn("glTexCoord2s");
+}
+
+static void APIENTRY noopTexCoord2sv(const GLshort *v)
+{
+ noop_warn("glTexCoord2sv");
+}
+
+static void APIENTRY noopTexCoord3d(GLdouble s, GLdouble t, GLdouble r)
+{
+ noop_warn("glTexCoord3d");
+}
+
+static void APIENTRY noopTexCoord3dv(const GLdouble *v)
+{
+ noop_warn("glTexCoord3dv");
+}
+
+static void APIENTRY noopTexCoord3f(GLfloat s, GLfloat t, GLfloat r)
+{
+ noop_warn("glTexCoord3f");
+}
+
+static void APIENTRY noopTexCoord3fv(const GLfloat *v)
+{
+ noop_warn("glTexCoord3fv");
+}
+
+static void APIENTRY noopTexCoord3i(GLint s, GLint t, GLint r)
+{
+ noop_warn("glTexCoord3i");
+}
+
+static void APIENTRY noopTexCoord3iv(const GLint *v)
+{
+ noop_warn("glTexCoord3iv");
+}
+
+static void APIENTRY noopTexCoord3s(GLshort s, GLshort t, GLshort r)
+{
+ noop_warn("glTexCoord3s");
+}
+
+static void APIENTRY noopTexCoord3sv(const GLshort *v)
+{
+ noop_warn("glTexCoord3sv");
+}
+
+static void APIENTRY noopTexCoord4d(GLdouble s, GLdouble t, GLdouble r, GLdouble q)
+{
+ noop_warn("glTexCoord4d");
+}
+
+static void APIENTRY noopTexCoord4dv(const GLdouble *v)
+{
+ noop_warn("glTexCoord4dv");
+}
+
+static void APIENTRY noopTexCoord4f(GLfloat s, GLfloat t, GLfloat r, GLfloat q)
+{
+ noop_warn("glTexCoord4f");
+}
+
+static void APIENTRY noopTexCoord4fv(const GLfloat *v)
+{
+ noop_warn("glTexCoord4fv");
+}
+
+static void APIENTRY noopTexCoord4i(GLint s, GLint t, GLint r, GLint q)
+{
+ noop_warn("glTexCoord4i");
+}
+
+static void APIENTRY noopTexCoord4iv(const GLint *v)
+{
+ noop_warn("glTexCoord4iv");
+}
+
+static void APIENTRY noopTexCoord4s(GLshort s, GLshort t, GLshort r, GLshort q)
+{
+ noop_warn("glTexCoord4s");
+}
+
+static void APIENTRY noopTexCoord4sv(const GLshort *v)
+{
+ noop_warn("glTexCoord4sv");
+}
+
+static void APIENTRY noopVertex2d(GLdouble x, GLdouble y)
+{
+ noop_warn("glVertex2d");
+}
+
+static void APIENTRY noopVertex2dv(const GLdouble *v)
+{
+ noop_warn("glVertex2dv");
+}
+
+static void APIENTRY noopVertex2f(GLfloat x, GLfloat y)
+{
+ noop_warn("glVertex2f");
+}
+
+static void APIENTRY noopVertex2fv(const GLfloat *v)
+{
+ noop_warn("glVertex2fv");
+}
+
+static void APIENTRY noopVertex2i(GLint x, GLint y)
+{
+ noop_warn("glVertex2i");
+}
+
+static void APIENTRY noopVertex2iv(const GLint *v)
+{
+ noop_warn("glVertex2iv");
+}
+
+static void APIENTRY noopVertex2s(GLshort x, GLshort y)
+{
+ noop_warn("glVertex2s");
+}
+
+static void APIENTRY noopVertex2sv(const GLshort *v)
+{
+ noop_warn("glVertex2sv");
+}
+
+static void APIENTRY noopVertex3d(GLdouble x, GLdouble y, GLdouble z)
+{
+ noop_warn("glVertex3d");
+}
+
+static void APIENTRY noopVertex3dv(const GLdouble *v)
+{
+ noop_warn("glVertex3dv");
+}
+
+static void APIENTRY noopVertex3f(GLfloat x, GLfloat y, GLfloat z)
+{
+ noop_warn("glVertex3f");
+}
+
+static void APIENTRY noopVertex3fv(const GLfloat *v)
+{
+ noop_warn("glVertex3fv");
+}
+
+static void APIENTRY noopVertex3i(GLint x, GLint y, GLint z)
+{
+ noop_warn("glVertex3i");
+}
+
+static void APIENTRY noopVertex3iv(const GLint *v)
+{
+ noop_warn("glVertex3iv");
+}
+
+static void APIENTRY noopVertex3s(GLshort x, GLshort y, GLshort z)
+{
+ noop_warn("glVertex3s");
+}
+
+static void APIENTRY noopVertex3sv(const GLshort *v)
+{
+ noop_warn("glVertex3sv");
+}
+
+static void APIENTRY noopVertex4d(GLdouble x, GLdouble y, GLdouble z, GLdouble w)
+{
+ noop_warn("glVertex4d");
+}
+
+static void APIENTRY noopVertex4dv(const GLdouble *v)
+{
+ noop_warn("glVertex4dv");
+}
+
+static void APIENTRY noopVertex4f(GLfloat x, GLfloat y, GLfloat z, GLfloat w)
+{
+ noop_warn("glVertex4f");
+}
+
+static void APIENTRY noopVertex4fv(const GLfloat *v)
+{
+ noop_warn("glVertex4fv");
+}
+
+static void APIENTRY noopVertex4i(GLint x, GLint y, GLint z, GLint w)
+{
+ noop_warn("glVertex4i");
+}
+
+static void APIENTRY noopVertex4iv(const GLint *v)
+{
+ noop_warn("glVertex4iv");
+}
+
+static void APIENTRY noopVertex4s(GLshort x, GLshort y, GLshort z, GLshort w)
+{
+ noop_warn("glVertex4s");
+}
+
+static void APIENTRY noopVertex4sv(const GLshort *v)
+{
+ noop_warn("glVertex4sv");
+}
+
+static void APIENTRY noopClipPlane(GLenum plane, const GLdouble *equation)
+{
+ noop_warn("glClipPlane");
+}
+
+static void APIENTRY noopColorMaterial(GLenum face, GLenum mode)
+{
+ noop_warn("glColorMaterial");
+}
+
+static void APIENTRY noopCullFace(GLenum mode)
+{
+ noop_warn("glCullFace");
+}
+
+static void APIENTRY noopFogf(GLenum pname, GLfloat param)
+{
+ noop_warn("glFogf");
+}
+
+static void APIENTRY noopFogfv(GLenum pname, const GLfloat *params)
+{
+ noop_warn("glFogfv");
+}
+
+static void APIENTRY noopFogi(GLenum pname, GLint param)
+{
+ noop_warn("glFogi");
+}
+
+static void APIENTRY noopFogiv(GLenum pname, const GLint *params)
+{
+ noop_warn("glFogiv");
+}
+
+static void APIENTRY noopFrontFace(GLenum mode)
+{
+ noop_warn("glFrontFace");
+}
+
+static void APIENTRY noopHint(GLenum target, GLenum mode)
+{
+ noop_warn("glHint");
+}
+
+static void APIENTRY noopLightf(GLenum light, GLenum pname, GLfloat param)
+{
+ noop_warn("glLightf");
+}
+
+static void APIENTRY noopLightfv(GLenum light, GLenum pname, const GLfloat *params)
+{
+ noop_warn("glLightfv");
+}
+
+static void APIENTRY noopLighti(GLenum light, GLenum pname, GLint param)
+{
+ noop_warn("glLighti");
+}
+
+static void APIENTRY noopLightiv(GLenum light, GLenum pname, const GLint *params)
+{
+ noop_warn("glLightiv");
+}
+
+static void APIENTRY noopLightModelf(GLenum pname, GLfloat param)
+{
+ noop_warn("glLightModelf");
+}
+
+static void APIENTRY noopLightModelfv(GLenum pname, const GLfloat *params)
+{
+ noop_warn("glLightModelfv");
+}
+
+static void APIENTRY noopLightModeli(GLenum pname, GLint param)
+{
+ noop_warn("glLightModeli");
+}
+
+static void APIENTRY noopLightModeliv(GLenum pname, const GLint *params)
+{
+ noop_warn("glLightModeliv");
+}
+
+static void APIENTRY noopLineStipple(GLint factor, GLushort pattern)
+{
+ noop_warn("glLineStipple");
+}
+
+static void APIENTRY noopLineWidth(GLfloat width)
+{
+ noop_warn("glLineWidth");
+}
+
+static void APIENTRY noopMaterialf(GLenum face, GLenum pname, GLfloat param)
+{
+ noop_warn("glMaterialf");
+}
+
+static void APIENTRY noopMaterialfv(GLenum face, GLenum pname, const GLfloat *params)
+{
+ noop_warn("glMaterialfv");
+}
+
+static void APIENTRY noopMateriali(GLenum face, GLenum pname, GLint param)
+{
+ noop_warn("glMateriali");
+}
+
+static void APIENTRY noopMaterialiv(GLenum face, GLenum pname, const GLint *params)
+{
+ noop_warn("glMaterialiv");
+}
+
+static void APIENTRY noopPointSize(GLfloat size)
+{
+ noop_warn("glPointSize");
+}
+
+static void APIENTRY noopPolygonMode(GLenum face, GLenum mode)
+{
+ noop_warn("glPolygonMode");
+}
+
+static void APIENTRY noopPolygonStipple(const GLubyte *mask)
+{
+ noop_warn("glPolygonStipple");
+}
+
+static void APIENTRY noopScissor(GLint x, GLint y, GLsizei width, GLsizei height)
+{
+ noop_warn("glScissor");
+}
+
+static void APIENTRY noopShadeModel(GLenum mode)
+{
+ noop_warn("glShadeModel");
+}
+
+static void APIENTRY noopTexParameterf(GLenum target, GLenum pname, GLfloat param)
+{
+ noop_warn("glTexParameterf");
+}
+
+static void APIENTRY noopTexParameterfv(GLenum target, GLenum pname, const GLfloat *params)
+{
+ noop_warn("glTexParameterfv");
+}
+
+static void APIENTRY noopTexParameteri(GLenum target, GLenum pname, GLint param)
+{
+ noop_warn("glTexParameteri");
+}
+
+static void APIENTRY noopTexParameteriv(GLenum target, GLenum pname, const GLint *params)
+{
+ noop_warn("glTexParameteriv");
+}
+
+static void APIENTRY noopTexImage1D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid *pixels)
+{
+ noop_warn("glTexImage1D");
+}
+
+static void APIENTRY noopTexImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels)
+{
+ noop_warn("glTexImage2D");
+}
+
+static void APIENTRY noopTexEnvf(GLenum target, GLenum pname, GLfloat param)
+{
+ noop_warn("glTexEnvf");
+}
+
+static void APIENTRY noopTexEnvfv(GLenum target, GLenum pname, const GLfloat *params)
+{
+ noop_warn("glTexEnvfv");
+}
+
+static void APIENTRY noopTexEnvi(GLenum target, GLenum pname, GLint param)
+{
+ noop_warn("glTexEnvi");
+}
+
+static void APIENTRY noopTexEnviv(GLenum target, GLenum pname, const GLint *params)
+{
+ noop_warn("glTexEnviv");
+}
+
+static void APIENTRY noopTexGend(GLenum coord, GLenum pname, GLdouble param)
+{
+ noop_warn("glTexGend");
+}
+
+static void APIENTRY noopTexGendv(GLenum coord, GLenum pname, const GLdouble *params)
+{
+ noop_warn("glTexGendv");
+}
+
+static void APIENTRY noopTexGenf(GLenum coord, GLenum pname, GLfloat param)
+{
+ noop_warn("glTexGenf");
+}
+
+static void APIENTRY noopTexGenfv(GLenum coord, GLenum pname, const GLfloat *params)
+{
+ noop_warn("glTexGenfv");
+}
+
+static void APIENTRY noopTexGeni(GLenum coord, GLenum pname, GLint param)
+{
+ noop_warn("glTexGeni");
+}
+
+static void APIENTRY noopTexGeniv(GLenum coord, GLenum pname, const GLint *params)
+{
+ noop_warn("glTexGeniv");
+}
+
+static void APIENTRY noopFeedbackBuffer(GLsizei size, GLenum type, GLfloat *buffer)
+{
+ noop_warn("glFeedbackBuffer");
+}
+
+static void APIENTRY noopSelectBuffer(GLsizei size, GLuint *buffer)
+{
+ noop_warn("glSelectBuffer");
+}
+
+static GLint APIENTRY noopRenderMode(GLenum mode)
+{
+ noop_warn("glRenderMode");
+ return (GLint) 0;
+}
+
+static void APIENTRY noopInitNames(void)
+{
+ noop_warn("glInitNames");
+}
+
+static void APIENTRY noopLoadName(GLuint name)
+{
+ noop_warn("glLoadName");
+}
+
+static void APIENTRY noopPassThrough(GLfloat token)
+{
+ noop_warn("glPassThrough");
+}
+
+static void APIENTRY noopPopName(void)
+{
+ noop_warn("glPopName");
+}
+
+static void APIENTRY noopPushName(GLuint name)
+{
+ noop_warn("glPushName");
+}
+
+static void APIENTRY noopDrawBuffer(GLenum mode)
+{
+ noop_warn("glDrawBuffer");
+}
+
+static void APIENTRY noopClear(GLbitfield mask)
+{
+ noop_warn("glClear");
+}
+
+static void APIENTRY noopClearAccum(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha)
+{
+ noop_warn("glClearAccum");
+}
+
+static void APIENTRY noopClearIndex(GLfloat c)
+{
+ noop_warn("glClearIndex");
+}
+
+static void APIENTRY noopClearColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)
+{
+ noop_warn("glClearColor");
+}
+
+static void APIENTRY noopClearStencil(GLint s)
+{
+ noop_warn("glClearStencil");
+}
+
+static void APIENTRY noopClearDepth(GLclampd depth)
+{
+ noop_warn("glClearDepth");
+}
+
+static void APIENTRY noopStencilMask(GLuint mask)
+{
+ noop_warn("glStencilMask");
+}
+
+static void APIENTRY noopColorMask(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha)
+{
+ noop_warn("glColorMask");
+}
+
+static void APIENTRY noopDepthMask(GLboolean flag)
+{
+ noop_warn("glDepthMask");
+}
+
+static void APIENTRY noopIndexMask(GLuint mask)
+{
+ noop_warn("glIndexMask");
+}
+
+static void APIENTRY noopAccum(GLenum op, GLfloat value)
+{
+ noop_warn("glAccum");
+}
+
+static void APIENTRY noopDisable(GLenum cap)
+{
+ noop_warn("glDisable");
+}
+
+static void APIENTRY noopEnable(GLenum cap)
+{
+ noop_warn("glEnable");
+}
+
+static void APIENTRY noopFinish(void)
+{
+ noop_warn("glFinish");
+}
+
+static void APIENTRY noopFlush(void)
+{
+ noop_warn("glFlush");
+}
+
+static void APIENTRY noopPopAttrib(void)
+{
+ noop_warn("glPopAttrib");
+}
+
+static void APIENTRY noopPushAttrib(GLbitfield mask)
+{
+ noop_warn("glPushAttrib");
+}
+
+static void APIENTRY noopMap1d(GLenum target, GLdouble u1, GLdouble u2, GLint stride, GLint order, const GLdouble *points)
+{
+ noop_warn("glMap1d");
+}
+
+static void APIENTRY noopMap1f(GLenum target, GLfloat u1, GLfloat u2, GLint stride, GLint order, const GLfloat *points)
+{
+ noop_warn("glMap1f");
+}
+
+static void APIENTRY noopMap2d(GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, const GLdouble *points)
+{
+ noop_warn("glMap2d");
+}
+
+static void APIENTRY noopMap2f(GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, const GLfloat *points)
+{
+ noop_warn("glMap2f");
+}
+
+static void APIENTRY noopMapGrid1d(GLint un, GLdouble u1, GLdouble u2)
+{
+ noop_warn("glMapGrid1d");
+}
+
+static void APIENTRY noopMapGrid1f(GLint un, GLfloat u1, GLfloat u2)
+{
+ noop_warn("glMapGrid1f");
+}
+
+static void APIENTRY noopMapGrid2d(GLint un, GLdouble u1, GLdouble u2, GLint vn, GLdouble v1, GLdouble v2)
+{
+ noop_warn("glMapGrid2d");
+}
+
+static void APIENTRY noopMapGrid2f(GLint un, GLfloat u1, GLfloat u2, GLint vn, GLfloat v1, GLfloat v2)
+{
+ noop_warn("glMapGrid2f");
+}
+
+static void APIENTRY noopEvalCoord1d(GLdouble u)
+{
+ noop_warn("glEvalCoord1d");
+}
+
+static void APIENTRY noopEvalCoord1dv(const GLdouble *u)
+{
+ noop_warn("glEvalCoord1dv");
+}
+
+static void APIENTRY noopEvalCoord1f(GLfloat u)
+{
+ noop_warn("glEvalCoord1f");
+}
+
+static void APIENTRY noopEvalCoord1fv(const GLfloat *u)
+{
+ noop_warn("glEvalCoord1fv");
+}
+
+static void APIENTRY noopEvalCoord2d(GLdouble u, GLdouble v)
+{
+ noop_warn("glEvalCoord2d");
+}
+
+static void APIENTRY noopEvalCoord2dv(const GLdouble *u)
+{
+ noop_warn("glEvalCoord2dv");
+}
+
+static void APIENTRY noopEvalCoord2f(GLfloat u, GLfloat v)
+{
+ noop_warn("glEvalCoord2f");
+}
+
+static void APIENTRY noopEvalCoord2fv(const GLfloat *u)
+{
+ noop_warn("glEvalCoord2fv");
+}
+
+static void APIENTRY noopEvalMesh1(GLenum mode, GLint i1, GLint i2)
+{
+ noop_warn("glEvalMesh1");
+}
+
+static void APIENTRY noopEvalPoint1(GLint i)
+{
+ noop_warn("glEvalPoint1");
+}
+
+static void APIENTRY noopEvalMesh2(GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2)
+{
+ noop_warn("glEvalMesh2");
+}
+
+static void APIENTRY noopEvalPoint2(GLint i, GLint j)
+{
+ noop_warn("glEvalPoint2");
+}
+
+static void APIENTRY noopAlphaFunc(GLenum func, GLclampf ref)
+{
+ noop_warn("glAlphaFunc");
+}
+
+static void APIENTRY noopBlendFunc(GLenum sfactor, GLenum dfactor)
+{
+ noop_warn("glBlendFunc");
+}
+
+static void APIENTRY noopLogicOp(GLenum opcode)
+{
+ noop_warn("glLogicOp");
+}
+
+static void APIENTRY noopStencilFunc(GLenum func, GLint ref, GLuint mask)
+{
+ noop_warn("glStencilFunc");
+}
+
+static void APIENTRY noopStencilOp(GLenum fail, GLenum zfail, GLenum zpass)
+{
+ noop_warn("glStencilOp");
+}
+
+static void APIENTRY noopDepthFunc(GLenum func)
+{
+ noop_warn("glDepthFunc");
+}
+
+static void APIENTRY noopPixelZoom(GLfloat xfactor, GLfloat yfactor)
+{
+ noop_warn("glPixelZoom");
+}
+
+static void APIENTRY noopPixelTransferf(GLenum pname, GLfloat param)
+{
+ noop_warn("glPixelTransferf");
+}
+
+static void APIENTRY noopPixelTransferi(GLenum pname, GLint param)
+{
+ noop_warn("glPixelTransferi");
+}
+
+static void APIENTRY noopPixelStoref(GLenum pname, GLfloat param)
+{
+ noop_warn("glPixelStoref");
+}
+
+static void APIENTRY noopPixelStorei(GLenum pname, GLint param)
+{
+ noop_warn("glPixelStorei");
+}
+
+static void APIENTRY noopPixelMapfv(GLenum map, GLsizei mapsize, const GLfloat *values)
+{
+ noop_warn("glPixelMapfv");
+}
+
+static void APIENTRY noopPixelMapuiv(GLenum map, GLsizei mapsize, const GLuint *values)
+{
+ noop_warn("glPixelMapuiv");
+}
+
+static void APIENTRY noopPixelMapusv(GLenum map, GLsizei mapsize, const GLushort *values)
+{
+ noop_warn("glPixelMapusv");
+}
+
+static void APIENTRY noopReadBuffer(GLenum mode)
+{
+ noop_warn("glReadBuffer");
+}
+
+static void APIENTRY noopCopyPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum type)
+{
+ noop_warn("glCopyPixels");
+}
+
+static void APIENTRY noopReadPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels)
+{
+ noop_warn("glReadPixels");
+}
+
+static void APIENTRY noopDrawPixels(GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels)
+{
+ noop_warn("glDrawPixels");
+}
+
+static void APIENTRY noopGetBooleanv(GLenum pname, GLboolean *params)
+{
+ noop_warn("glGetBooleanv");
+}
+
+static void APIENTRY noopGetClipPlane(GLenum plane, GLdouble *equation)
+{
+ noop_warn("glGetClipPlane");
+}
+
+static void APIENTRY noopGetDoublev(GLenum pname, GLdouble *params)
+{
+ noop_warn("glGetDoublev");
+}
+
+static GLenum APIENTRY noopGetError(void)
+{
+ noop_warn("glGetError");
+ return (GLenum) 0;
+}
+
+static void APIENTRY noopGetFloatv(GLenum pname, GLfloat *params)
+{
+ noop_warn("glGetFloatv");
+}
+
+static void APIENTRY noopGetIntegerv(GLenum pname, GLint *params)
+{
+ noop_warn("glGetIntegerv");
+}
+
+static void APIENTRY noopGetLightfv(GLenum light, GLenum pname, GLfloat *params)
+{
+ noop_warn("glGetLightfv");
+}
+
+static void APIENTRY noopGetLightiv(GLenum light, GLenum pname, GLint *params)
+{
+ noop_warn("glGetLightiv");
+}
+
+static void APIENTRY noopGetMapdv(GLenum target, GLenum query, GLdouble *v)
+{
+ noop_warn("glGetMapdv");
+}
+
+static void APIENTRY noopGetMapfv(GLenum target, GLenum query, GLfloat *v)
+{
+ noop_warn("glGetMapfv");
+}
+
+static void APIENTRY noopGetMapiv(GLenum target, GLenum query, GLint *v)
+{
+ noop_warn("glGetMapiv");
+}
+
+static void APIENTRY noopGetMaterialfv(GLenum face, GLenum pname, GLfloat *params)
+{
+ noop_warn("glGetMaterialfv");
+}
+
+static void APIENTRY noopGetMaterialiv(GLenum face, GLenum pname, GLint *params)
+{
+ noop_warn("glGetMaterialiv");
+}
+
+static void APIENTRY noopGetPixelMapfv(GLenum map, GLfloat *values)
+{
+ noop_warn("glGetPixelMapfv");
+}
+
+static void APIENTRY noopGetPixelMapuiv(GLenum map, GLuint *values)
+{
+ noop_warn("glGetPixelMapuiv");
+}
+
+static void APIENTRY noopGetPixelMapusv(GLenum map, GLushort *values)
+{
+ noop_warn("glGetPixelMapusv");
+}
+
+static void APIENTRY noopGetPolygonStipple(GLubyte *mask)
+{
+ noop_warn("glGetPolygonStipple");
+}
+
+static const GLubyte * APIENTRY noopGetString(GLenum name)
+{
+ noop_warn("glGetString");
+ return (const GLubyte *) 0;
+}
+
+static void APIENTRY noopGetTexEnvfv(GLenum target, GLenum pname, GLfloat *params)
+{
+ noop_warn("glGetTexEnvfv");
+}
+
+static void APIENTRY noopGetTexEnviv(GLenum target, GLenum pname, GLint *params)
+{
+ noop_warn("glGetTexEnviv");
+}
+
+static void APIENTRY noopGetTexGendv(GLenum coord, GLenum pname, GLdouble *params)
+{
+ noop_warn("glGetTexGendv");
+}
+
+static void APIENTRY noopGetTexGenfv(GLenum coord, GLenum pname, GLfloat *params)
+{
+ noop_warn("glGetTexGenfv");
+}
+
+static void APIENTRY noopGetTexGeniv(GLenum coord, GLenum pname, GLint *params)
+{
+ noop_warn("glGetTexGeniv");
+}
+
+static void APIENTRY noopGetTexImage(GLenum target, GLint level, GLenum format, GLenum type, GLvoid *pixels)
+{
+ noop_warn("glGetTexImage");
+}
+
+static void APIENTRY noopGetTexParameterfv(GLenum target, GLenum pname, GLfloat *params)
+{
+ noop_warn("glGetTexParameterfv");
+}
+
+static void APIENTRY noopGetTexParameteriv(GLenum target, GLenum pname, GLint *params)
+{
+ noop_warn("glGetTexParameteriv");
+}
+
+static void APIENTRY noopGetTexLevelParameterfv(GLenum target, GLint level, GLenum pname, GLfloat *params)
+{
+ noop_warn("glGetTexLevelParameterfv");
+}
+
+static void APIENTRY noopGetTexLevelParameteriv(GLenum target, GLint level, GLenum pname, GLint *params)
+{
+ noop_warn("glGetTexLevelParameteriv");
+}
+
+static GLboolean APIENTRY noopIsEnabled(GLenum cap)
+{
+ noop_warn("glIsEnabled");
+ return (GLboolean) 0;
+}
+
+static GLboolean APIENTRY noopIsList(GLuint list)
+{
+ noop_warn("glIsList");
+ return (GLboolean) 0;
+}
+
+static void APIENTRY noopDepthRange(GLclampd zNear, GLclampd zFar)
+{
+ noop_warn("glDepthRange");
+}
+
+static void APIENTRY noopFrustum(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar)
+{
+ noop_warn("glFrustum");
+}
+
+static void APIENTRY noopLoadIdentity(void)
+{
+ noop_warn("glLoadIdentity");
+}
+
+static void APIENTRY noopLoadMatrixf(const GLfloat *m)
+{
+ noop_warn("glLoadMatrixf");
+}
+
+static void APIENTRY noopLoadMatrixd(const GLdouble *m)
+{
+ noop_warn("glLoadMatrixd");
+}
+
+static void APIENTRY noopMatrixMode(GLenum mode)
+{
+ noop_warn("glMatrixMode");
+}
+
+static void APIENTRY noopMultMatrixf(const GLfloat *m)
+{
+ noop_warn("glMultMatrixf");
+}
+
+static void APIENTRY noopMultMatrixd(const GLdouble *m)
+{
+ noop_warn("glMultMatrixd");
+}
+
+static void APIENTRY noopOrtho(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar)
+{
+ noop_warn("glOrtho");
+}
+
+static void APIENTRY noopPopMatrix(void)
+{
+ noop_warn("glPopMatrix");
+}
+
+static void APIENTRY noopPushMatrix(void)
+{
+ noop_warn("glPushMatrix");
+}
+
+static void APIENTRY noopRotated(GLdouble angle, GLdouble x, GLdouble y, GLdouble z)
+{
+ noop_warn("glRotated");
+}
+
+static void APIENTRY noopRotatef(GLfloat angle, GLfloat x, GLfloat y, GLfloat z)
+{
+ noop_warn("glRotatef");
+}
+
+static void APIENTRY noopScaled(GLdouble x, GLdouble y, GLdouble z)
+{
+ noop_warn("glScaled");
+}
+
+static void APIENTRY noopScalef(GLfloat x, GLfloat y, GLfloat z)
+{
+ noop_warn("glScalef");
+}
+
+static void APIENTRY noopTranslated(GLdouble x, GLdouble y, GLdouble z)
+{
+ noop_warn("glTranslated");
+}
+
+static void APIENTRY noopTranslatef(GLfloat x, GLfloat y, GLfloat z)
+{
+ noop_warn("glTranslatef");
+}
+
+static void APIENTRY noopViewport(GLint x, GLint y, GLsizei width, GLsizei height)
+{
+ noop_warn("glViewport");
+}
+
+static void APIENTRY noopArrayElement(GLint i)
+{
+ noop_warn("glArrayElement");
+}
+
+static void APIENTRY noopBindTexture(GLenum target, GLuint texture)
+{
+ noop_warn("glBindTexture");
+}
+
+static void APIENTRY noopColorPointer(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer)
+{
+ noop_warn("glColorPointer");
+}
+
+static void APIENTRY noopDisableClientState(GLenum array)
+{
+ noop_warn("glDisableClientState");
+}
+
+static void APIENTRY noopDrawArrays(GLenum mode, GLint first, GLsizei count)
+{
+ noop_warn("glDrawArrays");
+}
+
+static void APIENTRY noopDrawElements(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices)
+{
+ noop_warn("glDrawElements");
+}
+
+static void APIENTRY noopEdgeFlagPointer(GLsizei stride, const GLvoid *pointer)
+{
+ noop_warn("glEdgeFlagPointer");
+}
+
+static void APIENTRY noopEnableClientState(GLenum array)
+{
+ noop_warn("glEnableClientState");
+}
+
+static void APIENTRY noopIndexPointer(GLenum type, GLsizei stride, const GLvoid *pointer)
+{
+ noop_warn("glIndexPointer");
+}
+
+static void APIENTRY noopIndexub(GLubyte c)
+{
+ noop_warn("glIndexub");
+}
+
+static void APIENTRY noopIndexubv(const GLubyte *c)
+{
+ noop_warn("glIndexubv");
+}
+
+static void APIENTRY noopInterleavedArrays(GLenum format, GLsizei stride, const GLvoid *pointer)
+{
+ noop_warn("glInterleavedArrays");
+}
+
+static void APIENTRY noopNormalPointer(GLenum type, GLsizei stride, const GLvoid *pointer)
+{
+ noop_warn("glNormalPointer");
+}
+
+static void APIENTRY noopPolygonOffset(GLfloat factor, GLfloat units)
+{
+ noop_warn("glPolygonOffset");
+}
+
+static void APIENTRY noopTexCoordPointer(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer)
+{
+ noop_warn("glTexCoordPointer");
+}
+
+static void APIENTRY noopVertexPointer(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer)
+{
+ noop_warn("glVertexPointer");
+}
+
+static GLboolean APIENTRY noopAreTexturesResident(GLsizei n, const GLuint *textures, GLboolean *residences)
+{
+ noop_warn("glAreTexturesResident");
+ return (GLboolean) 0;
+}
+
+static void APIENTRY noopCopyTexImage1D(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border)
+{
+ noop_warn("glCopyTexImage1D");
+}
+
+static void APIENTRY noopCopyTexImage2D(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border)
+{
+ noop_warn("glCopyTexImage2D");
+}
+
+static void APIENTRY noopCopyTexSubImage1D(GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width)
+{
+ noop_warn("glCopyTexSubImage1D");
+}
+
+static void APIENTRY noopCopyTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height)
+{
+ noop_warn("glCopyTexSubImage2D");
+}
+
+static void APIENTRY noopDeleteTextures(GLsizei n, const GLuint *textures)
+{
+ noop_warn("glDeleteTextures");
+}
+
+static void APIENTRY noopGenTextures(GLsizei n, GLuint *textures)
+{
+ noop_warn("glGenTextures");
+}
+
+static void APIENTRY noopGetPointerv(GLenum pname, GLvoid **params)
+{
+ noop_warn("glGetPointerv");
+}
+
+static GLboolean APIENTRY noopIsTexture(GLuint texture)
+{
+ noop_warn("glIsTexture");
+ return (GLboolean) 0;
+}
+
+static void APIENTRY noopPrioritizeTextures(GLsizei n, const GLuint *textures, const GLclampf *priorities)
+{
+ noop_warn("glPrioritizeTextures");
+}
+
+static void APIENTRY noopTexSubImage1D(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels)
+{
+ noop_warn("glTexSubImage1D");
+}
+
+static void APIENTRY noopTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels)
+{
+ noop_warn("glTexSubImage2D");
+}
+
+static void APIENTRY noopPopClientAttrib(void)
+{
+ noop_warn("glPopClientAttrib");
+}
+
+static void APIENTRY noopPushClientAttrib(GLbitfield mask)
+{
+ noop_warn("glPushClientAttrib");
+}
+
+static void APIENTRY noopBlendColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)
+{
+ noop_warn("glBlendColor");
+}
+
+static void APIENTRY noopBlendEquation(GLenum mode)
+{
+ noop_warn("glBlendEquation");
+}
+
+static void APIENTRY noopDrawRangeElements(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices)
+{
+ noop_warn("glDrawRangeElements");
+}
+
+static void APIENTRY noopColorTable(GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *table)
+{
+ noop_warn("glColorTable");
+}
+
+static void APIENTRY noopColorTableParameterfv(GLenum target, GLenum pname, const GLfloat *params)
+{
+ noop_warn("glColorTableParameterfv");
+}
+
+static void APIENTRY noopColorTableParameteriv(GLenum target, GLenum pname, const GLint *params)
+{
+ noop_warn("glColorTableParameteriv");
+}
+
+static void APIENTRY noopCopyColorTable(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width)
+{
+ noop_warn("glCopyColorTable");
+}
+
+static void APIENTRY noopGetColorTable(GLenum target, GLenum format, GLenum type, GLvoid *table)
+{
+ noop_warn("glGetColorTable");
+}
+
+static void APIENTRY noopGetColorTableParameterfv(GLenum target, GLenum pname, GLfloat *params)
+{
+ noop_warn("glGetColorTableParameterfv");
+}
+
+static void APIENTRY noopGetColorTableParameteriv(GLenum target, GLenum pname, GLint *params)
+{
+ noop_warn("glGetColorTableParameteriv");
+}
+
+static void APIENTRY noopColorSubTable(GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid *data)
+{
+ noop_warn("glColorSubTable");
+}
+
+static void APIENTRY noopCopyColorSubTable(GLenum target, GLsizei start, GLint x, GLint y, GLsizei width)
+{
+ noop_warn("glCopyColorSubTable");
+}
+
+static void APIENTRY noopConvolutionFilter1D(GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *image)
+{
+ noop_warn("glConvolutionFilter1D");
+}
+
+static void APIENTRY noopConvolutionFilter2D(GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *image)
+{
+ noop_warn("glConvolutionFilter2D");
+}
+
+static void APIENTRY noopConvolutionParameterf(GLenum target, GLenum pname, GLfloat params)
+{
+ noop_warn("glConvolutionParameterf");
+}
+
+static void APIENTRY noopConvolutionParameterfv(GLenum target, GLenum pname, const GLfloat *params)
+{
+ noop_warn("glConvolutionParameterfv");
+}
+
+static void APIENTRY noopConvolutionParameteri(GLenum target, GLenum pname, GLint params)
+{
+ noop_warn("glConvolutionParameteri");
+}
+
+static void APIENTRY noopConvolutionParameteriv(GLenum target, GLenum pname, const GLint *params)
+{
+ noop_warn("glConvolutionParameteriv");
+}
+
+static void APIENTRY noopCopyConvolutionFilter1D(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width)
+{
+ noop_warn("glCopyConvolutionFilter1D");
+}
+
+static void APIENTRY noopCopyConvolutionFilter2D(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height)
+{
+ noop_warn("glCopyConvolutionFilter2D");
+}
+
+static void APIENTRY noopGetConvolutionFilter(GLenum target, GLenum format, GLenum type, GLvoid *image)
+{
+ noop_warn("glGetConvolutionFilter");
+}
+
+static void APIENTRY noopGetConvolutionParameterfv(GLenum target, GLenum pname, GLfloat *params)
+{
+ noop_warn("glGetConvolutionParameterfv");
+}
+
+static void APIENTRY noopGetConvolutionParameteriv(GLenum target, GLenum pname, GLint *params)
+{
+ noop_warn("glGetConvolutionParameteriv");
+}
+
+static void APIENTRY noopGetSeparableFilter(GLenum target, GLenum format, GLenum type, GLvoid *row, GLvoid *column, GLvoid *span)
+{
+ noop_warn("glGetSeparableFilter");
+}
+
+static void APIENTRY noopSeparableFilter2D(GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *row, const GLvoid *column)
+{
+ noop_warn("glSeparableFilter2D");
+}
+
+static void APIENTRY noopGetHistogram(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values)
+{
+ noop_warn("glGetHistogram");
+}
+
+static void APIENTRY noopGetHistogramParameterfv(GLenum target, GLenum pname, GLfloat *params)
+{
+ noop_warn("glGetHistogramParameterfv");
+}
+
+static void APIENTRY noopGetHistogramParameteriv(GLenum target, GLenum pname, GLint *params)
+{
+ noop_warn("glGetHistogramParameteriv");
+}
+
+static void APIENTRY noopGetMinmax(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values)
+{
+ noop_warn("glGetMinmax");
+}
+
+static void APIENTRY noopGetMinmaxParameterfv(GLenum target, GLenum pname, GLfloat *params)
+{
+ noop_warn("glGetMinmaxParameterfv");
+}
+
+static void APIENTRY noopGetMinmaxParameteriv(GLenum target, GLenum pname, GLint *params)
+{
+ noop_warn("glGetMinmaxParameteriv");
+}
+
+static void APIENTRY noopHistogram(GLenum target, GLsizei width, GLenum internalformat, GLboolean sink)
+{
+ noop_warn("glHistogram");
+}
+
+static void APIENTRY noopMinmax(GLenum target, GLenum internalformat, GLboolean sink)
+{
+ noop_warn("glMinmax");
+}
+
+static void APIENTRY noopResetHistogram(GLenum target)
+{
+ noop_warn("glResetHistogram");
+}
+
+static void APIENTRY noopResetMinmax(GLenum target)
+{
+ noop_warn("glResetMinmax");
+}
+
+static void APIENTRY noopTexImage3D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels)
+{
+ noop_warn("glTexImage3D");
+}
+
+static void APIENTRY noopTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels)
+{
+ noop_warn("glTexSubImage3D");
+}
+
+static void APIENTRY noopCopyTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height)
+{
+ noop_warn("glCopyTexSubImage3D");
+}
+
+static void APIENTRY noopActiveTextureARB(GLenum texture)
+{
+ noop_warn("glActiveTextureARB");
+}
+
+static void APIENTRY noopClientActiveTextureARB(GLenum texture)
+{
+ noop_warn("glClientActiveTextureARB");
+}
+
+static void APIENTRY noopMultiTexCoord1dARB(GLenum target, GLdouble s)
+{
+ noop_warn("glMultiTexCoord1dARB");
+}
+
+static void APIENTRY noopMultiTexCoord1dvARB(GLenum target, const GLdouble *v)
+{
+ noop_warn("glMultiTexCoord1dvARB");
+}
+
+static void APIENTRY noopMultiTexCoord1fARB(GLenum target, GLfloat s)
+{
+ noop_warn("glMultiTexCoord1fARB");
+}
+
+static void APIENTRY noopMultiTexCoord1fvARB(GLenum target, const GLfloat *v)
+{
+ noop_warn("glMultiTexCoord1fvARB");
+}
+
+static void APIENTRY noopMultiTexCoord1iARB(GLenum target, GLint s)
+{
+ noop_warn("glMultiTexCoord1iARB");
+}
+
+static void APIENTRY noopMultiTexCoord1ivARB(GLenum target, const GLint *v)
+{
+ noop_warn("glMultiTexCoord1ivARB");
+}
+
+static void APIENTRY noopMultiTexCoord1sARB(GLenum target, GLshort s)
+{
+ noop_warn("glMultiTexCoord1sARB");
+}
+
+static void APIENTRY noopMultiTexCoord1svARB(GLenum target, const GLshort *v)
+{
+ noop_warn("glMultiTexCoord1svARB");
+}
+
+static void APIENTRY noopMultiTexCoord2dARB(GLenum target, GLdouble s, GLdouble t)
+{
+ noop_warn("glMultiTexCoord2dARB");
+}
+
+static void APIENTRY noopMultiTexCoord2dvARB(GLenum target, const GLdouble *v)
+{
+ noop_warn("glMultiTexCoord2dvARB");
+}
+
+static void APIENTRY noopMultiTexCoord2fARB(GLenum target, GLfloat s, GLfloat t)
+{
+ noop_warn("glMultiTexCoord2fARB");
+}
+
+static void APIENTRY noopMultiTexCoord2fvARB(GLenum target, const GLfloat *v)
+{
+ noop_warn("glMultiTexCoord2fvARB");
+}
+
+static void APIENTRY noopMultiTexCoord2iARB(GLenum target, GLint s, GLint t)
+{
+ noop_warn("glMultiTexCoord2iARB");
+}
+
+static void APIENTRY noopMultiTexCoord2ivARB(GLenum target, const GLint *v)
+{
+ noop_warn("glMultiTexCoord2ivARB");
+}
+
+static void APIENTRY noopMultiTexCoord2sARB(GLenum target, GLshort s, GLshort t)
+{
+ noop_warn("glMultiTexCoord2sARB");
+}
+
+static void APIENTRY noopMultiTexCoord2svARB(GLenum target, const GLshort *v)
+{
+ noop_warn("glMultiTexCoord2svARB");
+}
+
+static void APIENTRY noopMultiTexCoord3dARB(GLenum target, GLdouble s, GLdouble t, GLdouble r)
+{
+ noop_warn("glMultiTexCoord3dARB");
+}
+
+static void APIENTRY noopMultiTexCoord3dvARB(GLenum target, const GLdouble *v)
+{
+ noop_warn("glMultiTexCoord3dvARB");
+}
+
+static void APIENTRY noopMultiTexCoord3fARB(GLenum target, GLfloat s, GLfloat t, GLfloat r)
+{
+ noop_warn("glMultiTexCoord3fARB");
+}
+
+static void APIENTRY noopMultiTexCoord3fvARB(GLenum target, const GLfloat *v)
+{
+ noop_warn("glMultiTexCoord3fvARB");
+}
+
+static void APIENTRY noopMultiTexCoord3iARB(GLenum target, GLint s, GLint t, GLint r)
+{
+ noop_warn("glMultiTexCoord3iARB");
+}
+
+static void APIENTRY noopMultiTexCoord3ivARB(GLenum target, const GLint *v)
+{
+ noop_warn("glMultiTexCoord3ivARB");
+}
+
+static void APIENTRY noopMultiTexCoord3sARB(GLenum target, GLshort s, GLshort t, GLshort r)
+{
+ noop_warn("glMultiTexCoord3sARB");
+}
+
+static void APIENTRY noopMultiTexCoord3svARB(GLenum target, const GLshort *v)
+{
+ noop_warn("glMultiTexCoord3svARB");
+}
+
+static void APIENTRY noopMultiTexCoord4dARB(GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q)
+{
+ noop_warn("glMultiTexCoord4dARB");
+}
+
+static void APIENTRY noopMultiTexCoord4dvARB(GLenum target, const GLdouble *v)
+{
+ noop_warn("glMultiTexCoord4dvARB");
+}
+
+static void APIENTRY noopMultiTexCoord4fARB(GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q)
+{
+ noop_warn("glMultiTexCoord4fARB");
+}
+
+static void APIENTRY noopMultiTexCoord4fvARB(GLenum target, const GLfloat *v)
+{
+ noop_warn("glMultiTexCoord4fvARB");
+}
+
+static void APIENTRY noopMultiTexCoord4iARB(GLenum target, GLint s, GLint t, GLint r, GLint q)
+{
+ noop_warn("glMultiTexCoord4iARB");
+}
+
+static void APIENTRY noopMultiTexCoord4ivARB(GLenum target, const GLint *v)
+{
+ noop_warn("glMultiTexCoord4ivARB");
+}
+
+static void APIENTRY noopMultiTexCoord4sARB(GLenum target, GLshort s, GLshort t, GLshort r, GLshort q)
+{
+ noop_warn("glMultiTexCoord4sARB");
+}
+
+static void APIENTRY noopMultiTexCoord4svARB(GLenum target, const GLshort *v)
+{
+ noop_warn("glMultiTexCoord4svARB");
+}
+
+static void APIENTRY noopAttachShader(GLuint program, GLuint shader)
+{
+ noop_warn("glAttachShader");
+}
+
+static GLuint APIENTRY noopCreateProgram(void)
+{
+ noop_warn("glCreateProgram");
+ return (GLuint) 0;
+}
+
+static GLuint APIENTRY noopCreateShader(GLenum type)
+{
+ noop_warn("glCreateShader");
+ return (GLuint) 0;
+}
+
+static void APIENTRY noopDeleteProgram(GLuint program)
+{
+ noop_warn("glDeleteProgram");
+}
+
+static void APIENTRY noopDeleteShader(GLuint program)
+{
+ noop_warn("glDeleteShader");
+}
+
+static void APIENTRY noopDetachShader(GLuint program, GLuint shader)
+{
+ noop_warn("glDetachShader");
+}
+
+static void APIENTRY noopGetAttachedShaders(GLuint program, GLsizei maxCount, GLsizei *count, GLuint *obj)
+{
+ noop_warn("glGetAttachedShaders");
+}
+
+static void APIENTRY noopGetProgramInfoLog(GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog)
+{
+ noop_warn("glGetProgramInfoLog");
+}
+
+static void APIENTRY noopGetProgramiv(GLuint program, GLenum pname, GLint *params)
+{
+ noop_warn("glGetProgramiv");
+}
+
+static void APIENTRY noopGetShaderInfoLog(GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog)
+{
+ noop_warn("glGetShaderInfoLog");
+}
+
+static void APIENTRY noopGetShaderiv(GLuint shader, GLenum pname, GLint *params)
+{
+ noop_warn("glGetShaderiv");
+}
+
+static GLboolean APIENTRY noopIsProgram(GLuint program)
+{
+ noop_warn("glIsProgram");
+ return (GLboolean) 0;
+}
+
+static GLboolean APIENTRY noopIsShader(GLuint shader)
+{
+ noop_warn("glIsShader");
+ return (GLboolean) 0;
+}
+
+static void APIENTRY noopStencilFuncSeparate(GLenum face, GLenum func, GLint ref, GLuint mask)
+{
+ noop_warn("glStencilFuncSeparate");
+}
+
+static void APIENTRY noopStencilMaskSeparate(GLenum face, GLuint mask)
+{
+ noop_warn("glStencilMaskSeparate");
+}
+
+static void APIENTRY noopStencilOpSeparate(GLenum face, GLenum sfail, GLenum zfail, GLenum zpass)
+{
+ noop_warn("glStencilOpSeparate");
+}
+
+static void APIENTRY noopUniformMatrix2x3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
+{
+ noop_warn("glUniformMatrix2x3fv");
+}
+
+static void APIENTRY noopUniformMatrix2x4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
+{
+ noop_warn("glUniformMatrix2x4fv");
+}
+
+static void APIENTRY noopUniformMatrix3x2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
+{
+ noop_warn("glUniformMatrix3x2fv");
+}
+
+static void APIENTRY noopUniformMatrix3x4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
+{
+ noop_warn("glUniformMatrix3x4fv");
+}
+
+static void APIENTRY noopUniformMatrix4x2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
+{
+ noop_warn("glUniformMatrix4x2fv");
+}
+
+static void APIENTRY noopUniformMatrix4x3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
+{
+ noop_warn("glUniformMatrix4x3fv");
+}
+
+static void APIENTRY noopClampColor(GLenum target, GLenum clamp)
+{
+ noop_warn("glClampColor");
+}
+
+static void APIENTRY noopClearBufferfi(GLenum buffer, GLint drawbuffer, const GLfloat depth, const GLint stencil)
+{
+ noop_warn("glClearBufferfi");
+}
+
+static void APIENTRY noopClearBufferfv(GLenum buffer, GLint drawbuffer, const GLfloat *value)
+{
+ noop_warn("glClearBufferfv");
+}
+
+static void APIENTRY noopClearBufferiv(GLenum buffer, GLint drawbuffer, const GLint *value)
+{
+ noop_warn("glClearBufferiv");
+}
+
+static void APIENTRY noopClearBufferuiv(GLenum buffer, GLint drawbuffer, const GLuint *value)
+{
+ noop_warn("glClearBufferuiv");
+}
+
+static const GLubyte * APIENTRY noopGetStringi(GLenum name, GLuint index)
+{
+ noop_warn("glGetStringi");
+ return (const GLubyte *) 0;
+}
+
+static void APIENTRY noopTexBuffer(GLenum target, GLenum internalFormat, GLuint buffer)
+{
+ noop_warn("glTexBuffer");
+}
+
+static void APIENTRY noopFramebufferTexture(GLenum target, GLenum attachment, GLuint texture, GLint level)
+{
+ noop_warn("glFramebufferTexture");
+}
+
+static void APIENTRY noopGetBufferParameteri64v(GLenum target, GLenum pname, GLint64 *params)
+{
+ noop_warn("glGetBufferParameteri64v");
+}
+
+static void APIENTRY noopGetInteger64i_v(GLenum cap, GLuint index, GLint64 *data)
+{
+ noop_warn("glGetInteger64i_v");
+}
+
+static void APIENTRY noopVertexAttribDivisor(GLuint index, GLuint divisor)
+{
+ noop_warn("glVertexAttribDivisor");
+}
+
+static void APIENTRY noopLoadTransposeMatrixdARB(const GLdouble *m)
+{
+ noop_warn("glLoadTransposeMatrixdARB");
+}
+
+static void APIENTRY noopLoadTransposeMatrixfARB(const GLfloat *m)
+{
+ noop_warn("glLoadTransposeMatrixfARB");
+}
+
+static void APIENTRY noopMultTransposeMatrixdARB(const GLdouble *m)
+{
+ noop_warn("glMultTransposeMatrixdARB");
+}
+
+static void APIENTRY noopMultTransposeMatrixfARB(const GLfloat *m)
+{
+ noop_warn("glMultTransposeMatrixfARB");
+}
+
+static void APIENTRY noopSampleCoverageARB(GLclampf value, GLboolean invert)
+{
+ noop_warn("glSampleCoverageARB");
+}
+
+static void APIENTRY noopCompressedTexImage1DARB(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data)
+{
+ noop_warn("glCompressedTexImage1DARB");
+}
+
+static void APIENTRY noopCompressedTexImage2DARB(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data)
+{
+ noop_warn("glCompressedTexImage2DARB");
+}
+
+static void APIENTRY noopCompressedTexImage3DARB(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data)
+{
+ noop_warn("glCompressedTexImage3DARB");
+}
+
+static void APIENTRY noopCompressedTexSubImage1DARB(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data)
+{
+ noop_warn("glCompressedTexSubImage1DARB");
+}
+
+static void APIENTRY noopCompressedTexSubImage2DARB(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data)
+{
+ noop_warn("glCompressedTexSubImage2DARB");
+}
+
+static void APIENTRY noopCompressedTexSubImage3DARB(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data)
+{
+ noop_warn("glCompressedTexSubImage3DARB");
+}
+
+static void APIENTRY noopGetCompressedTexImageARB(GLenum target, GLint level, GLvoid *img)
+{
+ noop_warn("glGetCompressedTexImageARB");
+}
+
+static void APIENTRY noopDisableVertexAttribArrayARB(GLuint index)
+{
+ noop_warn("glDisableVertexAttribArrayARB");
+}
+
+static void APIENTRY noopEnableVertexAttribArrayARB(GLuint index)
+{
+ noop_warn("glEnableVertexAttribArrayARB");
+}
+
+static void APIENTRY noopGetProgramEnvParameterdvARB(GLenum target, GLuint index, GLdouble *params)
+{
+ noop_warn("glGetProgramEnvParameterdvARB");
+}
+
+static void APIENTRY noopGetProgramEnvParameterfvARB(GLenum target, GLuint index, GLfloat *params)
+{
+ noop_warn("glGetProgramEnvParameterfvARB");
+}
+
+static void APIENTRY noopGetProgramLocalParameterdvARB(GLenum target, GLuint index, GLdouble *params)
+{
+ noop_warn("glGetProgramLocalParameterdvARB");
+}
+
+static void APIENTRY noopGetProgramLocalParameterfvARB(GLenum target, GLuint index, GLfloat *params)
+{
+ noop_warn("glGetProgramLocalParameterfvARB");
+}
+
+static void APIENTRY noopGetProgramStringARB(GLenum target, GLenum pname, GLvoid *string)
+{
+ noop_warn("glGetProgramStringARB");
+}
+
+static void APIENTRY noopGetProgramivARB(GLenum target, GLenum pname, GLint *params)
+{
+ noop_warn("glGetProgramivARB");
+}
+
+static void APIENTRY noopGetVertexAttribdvARB(GLuint index, GLenum pname, GLdouble *params)
+{
+ noop_warn("glGetVertexAttribdvARB");
+}
+
+static void APIENTRY noopGetVertexAttribfvARB(GLuint index, GLenum pname, GLfloat *params)
+{
+ noop_warn("glGetVertexAttribfvARB");
+}
+
+static void APIENTRY noopGetVertexAttribivARB(GLuint index, GLenum pname, GLint *params)
+{
+ noop_warn("glGetVertexAttribivARB");
+}
+
+static void APIENTRY noopProgramEnvParameter4dARB(GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w)
+{
+ noop_warn("glProgramEnvParameter4dARB");
+}
+
+static void APIENTRY noopProgramEnvParameter4dvARB(GLenum target, GLuint index, const GLdouble *params)
+{
+ noop_warn("glProgramEnvParameter4dvARB");
+}
+
+static void APIENTRY noopProgramEnvParameter4fARB(GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
+{
+ noop_warn("glProgramEnvParameter4fARB");
+}
+
+static void APIENTRY noopProgramEnvParameter4fvARB(GLenum target, GLuint index, const GLfloat *params)
+{
+ noop_warn("glProgramEnvParameter4fvARB");
+}
+
+static void APIENTRY noopProgramLocalParameter4dARB(GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w)
+{
+ noop_warn("glProgramLocalParameter4dARB");
+}
+
+static void APIENTRY noopProgramLocalParameter4dvARB(GLenum target, GLuint index, const GLdouble *params)
+{
+ noop_warn("glProgramLocalParameter4dvARB");
+}
+
+static void APIENTRY noopProgramLocalParameter4fARB(GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
+{
+ noop_warn("glProgramLocalParameter4fARB");
+}
+
+static void APIENTRY noopProgramLocalParameter4fvARB(GLenum target, GLuint index, const GLfloat *params)
+{
+ noop_warn("glProgramLocalParameter4fvARB");
+}
+
+static void APIENTRY noopProgramStringARB(GLenum target, GLenum format, GLsizei len, const GLvoid *string)
+{
+ noop_warn("glProgramStringARB");
+}
+
+static void APIENTRY noopVertexAttrib1dARB(GLuint index, GLdouble x)
+{
+ noop_warn("glVertexAttrib1dARB");
+}
+
+static void APIENTRY noopVertexAttrib1dvARB(GLuint index, const GLdouble *v)
+{
+ noop_warn("glVertexAttrib1dvARB");
+}
+
+static void APIENTRY noopVertexAttrib1fARB(GLuint index, GLfloat x)
+{
+ noop_warn("glVertexAttrib1fARB");
+}
+
+static void APIENTRY noopVertexAttrib1fvARB(GLuint index, const GLfloat *v)
+{
+ noop_warn("glVertexAttrib1fvARB");
+}
+
+static void APIENTRY noopVertexAttrib1sARB(GLuint index, GLshort x)
+{
+ noop_warn("glVertexAttrib1sARB");
+}
+
+static void APIENTRY noopVertexAttrib1svARB(GLuint index, const GLshort *v)
+{
+ noop_warn("glVertexAttrib1svARB");
+}
+
+static void APIENTRY noopVertexAttrib2dARB(GLuint index, GLdouble x, GLdouble y)
+{
+ noop_warn("glVertexAttrib2dARB");
+}
+
+static void APIENTRY noopVertexAttrib2dvARB(GLuint index, const GLdouble *v)
+{
+ noop_warn("glVertexAttrib2dvARB");
+}
+
+static void APIENTRY noopVertexAttrib2fARB(GLuint index, GLfloat x, GLfloat y)
+{
+ noop_warn("glVertexAttrib2fARB");
+}
+
+static void APIENTRY noopVertexAttrib2fvARB(GLuint index, const GLfloat *v)
+{
+ noop_warn("glVertexAttrib2fvARB");
+}
+
+static void APIENTRY noopVertexAttrib2sARB(GLuint index, GLshort x, GLshort y)
+{
+ noop_warn("glVertexAttrib2sARB");
+}
+
+static void APIENTRY noopVertexAttrib2svARB(GLuint index, const GLshort *v)
+{
+ noop_warn("glVertexAttrib2svARB");
+}
+
+static void APIENTRY noopVertexAttrib3dARB(GLuint index, GLdouble x, GLdouble y, GLdouble z)
+{
+ noop_warn("glVertexAttrib3dARB");
+}
+
+static void APIENTRY noopVertexAttrib3dvARB(GLuint index, const GLdouble *v)
+{
+ noop_warn("glVertexAttrib3dvARB");
+}
+
+static void APIENTRY noopVertexAttrib3fARB(GLuint index, GLfloat x, GLfloat y, GLfloat z)
+{
+ noop_warn("glVertexAttrib3fARB");
+}
+
+static void APIENTRY noopVertexAttrib3fvARB(GLuint index, const GLfloat *v)
+{
+ noop_warn("glVertexAttrib3fvARB");
+}
+
+static void APIENTRY noopVertexAttrib3sARB(GLuint index, GLshort x, GLshort y, GLshort z)
+{
+ noop_warn("glVertexAttrib3sARB");
+}
+
+static void APIENTRY noopVertexAttrib3svARB(GLuint index, const GLshort *v)
+{
+ noop_warn("glVertexAttrib3svARB");
+}
+
+static void APIENTRY noopVertexAttrib4NbvARB(GLuint index, const GLbyte *v)
+{
+ noop_warn("glVertexAttrib4NbvARB");
+}
+
+static void APIENTRY noopVertexAttrib4NivARB(GLuint index, const GLint *v)
+{
+ noop_warn("glVertexAttrib4NivARB");
+}
+
+static void APIENTRY noopVertexAttrib4NsvARB(GLuint index, const GLshort *v)
+{
+ noop_warn("glVertexAttrib4NsvARB");
+}
+
+static void APIENTRY noopVertexAttrib4NubARB(GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w)
+{
+ noop_warn("glVertexAttrib4NubARB");
+}
+
+static void APIENTRY noopVertexAttrib4NubvARB(GLuint index, const GLubyte *v)
+{
+ noop_warn("glVertexAttrib4NubvARB");
+}
+
+static void APIENTRY noopVertexAttrib4NuivARB(GLuint index, const GLuint *v)
+{
+ noop_warn("glVertexAttrib4NuivARB");
+}
+
+static void APIENTRY noopVertexAttrib4NusvARB(GLuint index, const GLushort *v)
+{
+ noop_warn("glVertexAttrib4NusvARB");
+}
+
+static void APIENTRY noopVertexAttrib4bvARB(GLuint index, const GLbyte *v)
+{
+ noop_warn("glVertexAttrib4bvARB");
+}
+
+static void APIENTRY noopVertexAttrib4dARB(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w)
+{
+ noop_warn("glVertexAttrib4dARB");
+}
+
+static void APIENTRY noopVertexAttrib4dvARB(GLuint index, const GLdouble *v)
+{
+ noop_warn("glVertexAttrib4dvARB");
+}
+
+static void APIENTRY noopVertexAttrib4fARB(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
+{
+ noop_warn("glVertexAttrib4fARB");
+}
+
+static void APIENTRY noopVertexAttrib4fvARB(GLuint index, const GLfloat *v)
+{
+ noop_warn("glVertexAttrib4fvARB");
+}
+
+static void APIENTRY noopVertexAttrib4ivARB(GLuint index, const GLint *v)
+{
+ noop_warn("glVertexAttrib4ivARB");
+}
+
+static void APIENTRY noopVertexAttrib4sARB(GLuint index, GLshort x, GLshort y, GLshort z, GLshort w)
+{
+ noop_warn("glVertexAttrib4sARB");
+}
+
+static void APIENTRY noopVertexAttrib4svARB(GLuint index, const GLshort *v)
+{
+ noop_warn("glVertexAttrib4svARB");
+}
+
+static void APIENTRY noopVertexAttrib4ubvARB(GLuint index, const GLubyte *v)
+{
+ noop_warn("glVertexAttrib4ubvARB");
+}
+
+static void APIENTRY noopVertexAttrib4uivARB(GLuint index, const GLuint *v)
+{
+ noop_warn("glVertexAttrib4uivARB");
+}
+
+static void APIENTRY noopVertexAttrib4usvARB(GLuint index, const GLushort *v)
+{
+ noop_warn("glVertexAttrib4usvARB");
+}
+
+static void APIENTRY noopVertexAttribPointerARB(GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *pointer)
+{
+ noop_warn("glVertexAttribPointerARB");
+}
+
+static void APIENTRY noopBindBufferARB(GLenum target, GLuint buffer)
+{
+ noop_warn("glBindBufferARB");
+}
+
+static void APIENTRY noopBufferDataARB(GLenum target, GLsizeiptrARB size, const GLvoid *data, GLenum usage)
+{
+ noop_warn("glBufferDataARB");
+}
+
+static void APIENTRY noopBufferSubDataARB(GLenum target, GLintptrARB offset, GLsizeiptrARB size, const GLvoid *data)
+{
+ noop_warn("glBufferSubDataARB");
+}
+
+static void APIENTRY noopDeleteBuffersARB(GLsizei n, const GLuint *buffer)
+{
+ noop_warn("glDeleteBuffersARB");
+}
+
+static void APIENTRY noopGenBuffersARB(GLsizei n, GLuint *buffer)
+{
+ noop_warn("glGenBuffersARB");
+}
+
+static void APIENTRY noopGetBufferParameterivARB(GLenum target, GLenum pname, GLint *params)
+{
+ noop_warn("glGetBufferParameterivARB");
+}
+
+static void APIENTRY noopGetBufferPointervARB(GLenum target, GLenum pname, GLvoid **params)
+{
+ noop_warn("glGetBufferPointervARB");
+}
+
+static void APIENTRY noopGetBufferSubDataARB(GLenum target, GLintptrARB offset, GLsizeiptrARB size, GLvoid *data)
+{
+ noop_warn("glGetBufferSubDataARB");
+}
+
+static GLboolean APIENTRY noopIsBufferARB(GLuint buffer)
+{
+ noop_warn("glIsBufferARB");
+ return (GLboolean) 0;
+}
+
+static GLvoid * APIENTRY noopMapBufferARB(GLenum target, GLenum access)
+{
+ noop_warn("glMapBufferARB");
+ return (GLvoid *) 0;
+}
+
+static GLboolean APIENTRY noopUnmapBufferARB(GLenum target)
+{
+ noop_warn("glUnmapBufferARB");
+ return (GLboolean) 0;
+}
+
+static void APIENTRY noopBeginQueryARB(GLenum target, GLuint id)
+{
+ noop_warn("glBeginQueryARB");
+}
+
+static void APIENTRY noopDeleteQueriesARB(GLsizei n, const GLuint *ids)
+{
+ noop_warn("glDeleteQueriesARB");
+}
+
+static void APIENTRY noopEndQueryARB(GLenum target)
+{
+ noop_warn("glEndQueryARB");
+}
+
+static void APIENTRY noopGenQueriesARB(GLsizei n, GLuint *ids)
+{
+ noop_warn("glGenQueriesARB");
+}
+
+static void APIENTRY noopGetQueryObjectivARB(GLuint id, GLenum pname, GLint *params)
+{
+ noop_warn("glGetQueryObjectivARB");
+}
+
+static void APIENTRY noopGetQueryObjectuivARB(GLuint id, GLenum pname, GLuint *params)
+{
+ noop_warn("glGetQueryObjectuivARB");
+}
+
+static void APIENTRY noopGetQueryivARB(GLenum target, GLenum pname, GLint *params)
+{
+ noop_warn("glGetQueryivARB");
+}
+
+static GLboolean APIENTRY noopIsQueryARB(GLuint id)
+{
+ noop_warn("glIsQueryARB");
+ return (GLboolean) 0;
+}
+
+static void APIENTRY noopAttachObjectARB(GLhandleARB containerObj, GLhandleARB obj)
+{
+ noop_warn("glAttachObjectARB");
+}
+
+static void APIENTRY noopCompileShaderARB(GLhandleARB shader)
+{
+ noop_warn("glCompileShaderARB");
+}
+
+static GLhandleARB APIENTRY noopCreateProgramObjectARB(void)
+{
+ noop_warn("glCreateProgramObjectARB");
+ return (GLhandleARB) 0;
+}
+
+static GLhandleARB APIENTRY noopCreateShaderObjectARB(GLenum shaderType)
+{
+ noop_warn("glCreateShaderObjectARB");
+ return (GLhandleARB) 0;
+}
+
+static void APIENTRY noopDeleteObjectARB(GLhandleARB obj)
+{
+ noop_warn("glDeleteObjectARB");
+}
+
+static void APIENTRY noopDetachObjectARB(GLhandleARB containerObj, GLhandleARB attachedObj)
+{
+ noop_warn("glDetachObjectARB");
+}
+
+static void APIENTRY noopGetActiveUniformARB(GLhandleARB program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name)
+{
+ noop_warn("glGetActiveUniformARB");
+}
+
+static void APIENTRY noopGetAttachedObjectsARB(GLhandleARB containerObj, GLsizei maxLength, GLsizei *length, GLhandleARB *infoLog)
+{
+ noop_warn("glGetAttachedObjectsARB");
+}
+
+static GLhandleARB APIENTRY noopGetHandleARB(GLenum pname)
+{
+ noop_warn("glGetHandleARB");
+ return (GLhandleARB) 0;
+}
+
+static void APIENTRY noopGetInfoLogARB(GLhandleARB obj, GLsizei maxLength, GLsizei *length, GLcharARB *infoLog)
+{
+ noop_warn("glGetInfoLogARB");
+}
+
+static void APIENTRY noopGetObjectParameterfvARB(GLhandleARB obj, GLenum pname, GLfloat *params)
+{
+ noop_warn("glGetObjectParameterfvARB");
+}
+
+static void APIENTRY noopGetObjectParameterivARB(GLhandleARB obj, GLenum pname, GLint *params)
+{
+ noop_warn("glGetObjectParameterivARB");
+}
+
+static void APIENTRY noopGetShaderSourceARB(GLhandleARB shader, GLsizei bufSize, GLsizei *length, GLcharARB *source)
+{
+ noop_warn("glGetShaderSourceARB");
+}
+
+static GLint APIENTRY noopGetUniformLocationARB(GLhandleARB program, const GLcharARB *name)
+{
+ noop_warn("glGetUniformLocationARB");
+ return (GLint) 0;
+}
+
+static void APIENTRY noopGetUniformfvARB(GLhandleARB program, GLint location, GLfloat *params)
+{
+ noop_warn("glGetUniformfvARB");
+}
+
+static void APIENTRY noopGetUniformivARB(GLhandleARB program, GLint location, GLint *params)
+{
+ noop_warn("glGetUniformivARB");
+}
+
+static void APIENTRY noopLinkProgramARB(GLhandleARB program)
+{
+ noop_warn("glLinkProgramARB");
+}
+
+static void APIENTRY noopShaderSourceARB(GLhandleARB shader, GLsizei count, const GLcharARB **string, const GLint *length)
+{
+ noop_warn("glShaderSourceARB");
+}
+
+static void APIENTRY noopUniform1fARB(GLint location, GLfloat v0)
+{
+ noop_warn("glUniform1fARB");
+}
+
+static void APIENTRY noopUniform1fvARB(GLint location, GLsizei count, const GLfloat *value)
+{
+ noop_warn("glUniform1fvARB");
+}
+
+static void APIENTRY noopUniform1iARB(GLint location, GLint v0)
+{
+ noop_warn("glUniform1iARB");
+}
+
+static void APIENTRY noopUniform1ivARB(GLint location, GLsizei count, const GLint *value)
+{
+ noop_warn("glUniform1ivARB");
+}
+
+static void APIENTRY noopUniform2fARB(GLint location, GLfloat v0, GLfloat v1)
+{
+ noop_warn("glUniform2fARB");
+}
+
+static void APIENTRY noopUniform2fvARB(GLint location, GLsizei count, const GLfloat *value)
+{
+ noop_warn("glUniform2fvARB");
+}
+
+static void APIENTRY noopUniform2iARB(GLint location, GLint v0, GLint v1)
+{
+ noop_warn("glUniform2iARB");
+}
+
+static void APIENTRY noopUniform2ivARB(GLint location, GLsizei count, const GLint *value)
+{
+ noop_warn("glUniform2ivARB");
+}
+
+static void APIENTRY noopUniform3fARB(GLint location, GLfloat v0, GLfloat v1, GLfloat v2)
+{
+ noop_warn("glUniform3fARB");
+}
+
+static void APIENTRY noopUniform3fvARB(GLint location, GLsizei count, const GLfloat *value)
+{
+ noop_warn("glUniform3fvARB");
+}
+
+static void APIENTRY noopUniform3iARB(GLint location, GLint v0, GLint v1, GLint v2)
+{
+ noop_warn("glUniform3iARB");
+}
+
+static void APIENTRY noopUniform3ivARB(GLint location, GLsizei count, const GLint *value)
+{
+ noop_warn("glUniform3ivARB");
+}
+
+static void APIENTRY noopUniform4fARB(GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3)
+{
+ noop_warn("glUniform4fARB");
+}
+
+static void APIENTRY noopUniform4fvARB(GLint location, GLsizei count, const GLfloat *value)
+{
+ noop_warn("glUniform4fvARB");
+}
+
+static void APIENTRY noopUniform4iARB(GLint location, GLint v0, GLint v1, GLint v2, GLint v3)
+{
+ noop_warn("glUniform4iARB");
+}
+
+static void APIENTRY noopUniform4ivARB(GLint location, GLsizei count, const GLint *value)
+{
+ noop_warn("glUniform4ivARB");
+}
+
+static void APIENTRY noopUniformMatrix2fvARB(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
+{
+ noop_warn("glUniformMatrix2fvARB");
+}
+
+static void APIENTRY noopUniformMatrix3fvARB(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
+{
+ noop_warn("glUniformMatrix3fvARB");
+}
+
+static void APIENTRY noopUniformMatrix4fvARB(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
+{
+ noop_warn("glUniformMatrix4fvARB");
+}
+
+static void APIENTRY noopUseProgramObjectARB(GLhandleARB program)
+{
+ noop_warn("glUseProgramObjectARB");
+}
+
+static void APIENTRY noopValidateProgramARB(GLhandleARB program)
+{
+ noop_warn("glValidateProgramARB");
+}
+
+static void APIENTRY noopBindAttribLocationARB(GLhandleARB program, GLuint index, const GLcharARB *name)
+{
+ noop_warn("glBindAttribLocationARB");
+}
+
+static void APIENTRY noopGetActiveAttribARB(GLhandleARB program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name)
+{
+ noop_warn("glGetActiveAttribARB");
+}
+
+static GLint APIENTRY noopGetAttribLocationARB(GLhandleARB program, const GLcharARB *name)
+{
+ noop_warn("glGetAttribLocationARB");
+ return (GLint) 0;
+}
+
+static void APIENTRY noopDrawBuffersARB(GLsizei n, const GLenum *bufs)
+{
+ noop_warn("glDrawBuffersARB");
+}
+
+static void APIENTRY noopDrawArraysInstancedARB(GLenum mode, GLint first, GLsizei count, GLsizei primcount)
+{
+ noop_warn("glDrawArraysInstancedARB");
+}
+
+static void APIENTRY noopDrawElementsInstancedARB(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount)
+{
+ noop_warn("glDrawElementsInstancedARB");
+}
+
+static void APIENTRY noopRenderbufferStorageMultisample(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height)
+{
+ noop_warn("glRenderbufferStorageMultisample");
+}
+
+static void APIENTRY noopFramebufferTextureARB(GLenum target, GLenum attachment, GLuint texture, GLint level)
+{
+ noop_warn("glFramebufferTextureARB");
+}
+
+static void APIENTRY noopFramebufferTextureFaceARB(GLenum target, GLenum attachment, GLuint texture, GLint level, GLenum face)
+{
+ noop_warn("glFramebufferTextureFaceARB");
+}
+
+static void APIENTRY noopProgramParameteriARB(GLuint program, GLenum pname, GLint value)
+{
+ noop_warn("glProgramParameteriARB");
+}
+
+static void APIENTRY noopVertexAttribDivisorARB(GLuint index, GLuint divisor)
+{
+ noop_warn("glVertexAttribDivisorARB");
+}
+
+static void APIENTRY noopFlushMappedBufferRange(GLenum target, GLintptr offset, GLsizeiptr length)
+{
+ noop_warn("glFlushMappedBufferRange");
+}
+
+static GLvoid * APIENTRY noopMapBufferRange(GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access)
+{
+ noop_warn("glMapBufferRange");
+ return (GLvoid *) 0;
+}
+
+static void APIENTRY noopBindVertexArray(GLuint array)
+{
+ noop_warn("glBindVertexArray");
+}
+
+static void APIENTRY noopGenVertexArrays(GLsizei n, GLuint *arrays)
+{
+ noop_warn("glGenVertexArrays");
+}
+
+static void APIENTRY noopCopyBufferSubData(GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size)
+{
+ noop_warn("glCopyBufferSubData");
+}
+
+static GLenum APIENTRY noopClientWaitSync(GLsync sync, GLbitfield flags, GLuint64 timeout)
+{
+ noop_warn("glClientWaitSync");
+ return (GLenum) 0;
+}
+
+static void APIENTRY noopDeleteSync(GLsync sync)
+{
+ noop_warn("glDeleteSync");
+}
+
+static GLsync APIENTRY noopFenceSync(GLenum condition, GLbitfield flags)
+{
+ noop_warn("glFenceSync");
+ return (GLsync) 0;
+}
+
+static void APIENTRY noopGetInteger64v(GLenum pname, GLint64 *params)
+{
+ noop_warn("glGetInteger64v");
+}
+
+static void APIENTRY noopGetSynciv(GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values)
+{
+ noop_warn("glGetSynciv");
+}
+
+static GLboolean APIENTRY noopIsSync(GLsync sync)
+{
+ noop_warn("glIsSync");
+ return (GLboolean) 0;
+}
+
+static void APIENTRY noopWaitSync(GLsync sync, GLbitfield flags, GLuint64 timeout)
+{
+ noop_warn("glWaitSync");
+}
+
+static void APIENTRY noopDrawElementsBaseVertex(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLint basevertex)
+{
+ noop_warn("glDrawElementsBaseVertex");
+}
+
+static void APIENTRY noopDrawRangeElementsBaseVertex(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices, GLint basevertex)
+{
+ noop_warn("glDrawRangeElementsBaseVertex");
+}
+
+static void APIENTRY noopMultiDrawElementsBaseVertex(GLenum mode, const GLsizei *count, GLenum type, const GLvoid **indices, GLsizei primcount, const GLint *basevertex)
+{
+ noop_warn("glMultiDrawElementsBaseVertex");
+}
+
+static void APIENTRY noopBlendEquationSeparateiARB(GLuint buf, GLenum modeRGB, GLenum modeA)
+{
+ noop_warn("glBlendEquationSeparateiARB");
+}
+
+static void APIENTRY noopBlendEquationiARB(GLuint buf, GLenum mode)
+{
+ noop_warn("glBlendEquationiARB");
+}
+
+static void APIENTRY noopBlendFuncSeparateiARB(GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcA, GLenum dstA)
+{
+ noop_warn("glBlendFuncSeparateiARB");
+}
+
+static void APIENTRY noopBlendFunciARB(GLuint buf, GLenum src, GLenum dst)
+{
+ noop_warn("glBlendFunciARB");
+}
+
+static void APIENTRY noopBindTransformFeedback(GLenum target, GLuint id)
+{
+ noop_warn("glBindTransformFeedback");
+}
+
+static void APIENTRY noopDeleteTransformFeedbacks(GLsizei n, const GLuint *ids)
+{
+ noop_warn("glDeleteTransformFeedbacks");
+}
+
+static void APIENTRY noopDrawTransformFeedback(GLenum mode, GLuint id)
+{
+ noop_warn("glDrawTransformFeedback");
+}
+
+static void APIENTRY noopGenTransformFeedbacks(GLsizei n, GLuint *ids)
+{
+ noop_warn("glGenTransformFeedbacks");
+}
+
+static GLboolean APIENTRY noopIsTransformFeedback(GLuint id)
+{
+ noop_warn("glIsTransformFeedback");
+ return (GLboolean) 0;
+}
+
+static void APIENTRY noopPauseTransformFeedback(void)
+{
+ noop_warn("glPauseTransformFeedback");
+}
+
+static void APIENTRY noopResumeTransformFeedback(void)
+{
+ noop_warn("glResumeTransformFeedback");
+}
+
+static void APIENTRY noopClearDepthf(GLclampf depth)
+{
+ noop_warn("glClearDepthf");
+}
+
+static void APIENTRY noopDepthRangef(GLclampf zNear, GLclampf zFar)
+{
+ noop_warn("glDepthRangef");
+}
+
+static void APIENTRY noopGetShaderPrecisionFormat(GLenum shadertype, GLenum precisiontype, GLint *range, GLint *precision)
+{
+ noop_warn("glGetShaderPrecisionFormat");
+}
+
+static void APIENTRY noopReleaseShaderCompiler(void)
+{
+ noop_warn("glReleaseShaderCompiler");
+}
+
+static void APIENTRY noopShaderBinary(GLsizei n, const GLuint *shaders, GLenum binaryformat, const GLvoid *binary, GLsizei length)
+{
+ noop_warn("glShaderBinary");
+}
+
+static void APIENTRY noopGetProgramBinary(GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, GLvoid *binary)
+{
+ noop_warn("glGetProgramBinary");
+}
+
+static void APIENTRY noopProgramBinary(GLuint program, GLenum binaryFormat, const GLvoid *binary, GLsizei length)
+{
+ noop_warn("glProgramBinary");
+}
+
+static void APIENTRY noopProgramParameteri(GLuint program, GLenum pname, GLint value)
+{
+ noop_warn("glProgramParameteri");
+}
+
+static void APIENTRY noopPolygonOffsetEXT(GLfloat factor, GLfloat bias)
+{
+ noop_warn("glPolygonOffsetEXT");
+}
+
+static void APIENTRY noopDrawTexfOES(GLfloat x, GLfloat y, GLfloat z, GLfloat width, GLfloat height)
+{
+ noop_warn("glDrawTexfOES");
+}
+
+static void APIENTRY noopDrawTexfvOES(const GLfloat *coords)
+{
+ noop_warn("glDrawTexfvOES");
+}
+
+static void APIENTRY noopDrawTexiOES(GLint x, GLint y, GLint z, GLint width, GLint height)
+{
+ noop_warn("glDrawTexiOES");
+}
+
+static void APIENTRY noopDrawTexivOES(const GLint *coords)
+{
+ noop_warn("glDrawTexivOES");
+}
+
+static void APIENTRY noopDrawTexsOES(GLshort x, GLshort y, GLshort z, GLshort width, GLshort height)
+{
+ noop_warn("glDrawTexsOES");
+}
+
+static void APIENTRY noopDrawTexsvOES(const GLshort *coords)
+{
+ noop_warn("glDrawTexsvOES");
+}
+
+static void APIENTRY noopDrawTexxOES(GLfixed x, GLfixed y, GLfixed z, GLfixed width, GLfixed height)
+{
+ noop_warn("glDrawTexxOES");
+}
+
+static void APIENTRY noopDrawTexxvOES(const GLfixed *coords)
+{
+ noop_warn("glDrawTexxvOES");
+}
+
+static void APIENTRY noopPointSizePointerOES(GLenum type, GLsizei stride, const GLvoid *pointer)
+{
+ noop_warn("glPointSizePointerOES");
+}
+
+static void APIENTRY noopGetPixelTexGenParameterfvSGIS(GLenum pname, GLfloat *params)
+{
+ noop_warn("glGetPixelTexGenParameterfvSGIS");
+}
+
+static void APIENTRY noopGetPixelTexGenParameterivSGIS(GLenum pname, GLint *params)
+{
+ noop_warn("glGetPixelTexGenParameterivSGIS");
+}
+
+static void APIENTRY noopPixelTexGenParameterfSGIS(GLenum pname, GLfloat param)
+{
+ noop_warn("glPixelTexGenParameterfSGIS");
+}
+
+static void APIENTRY noopPixelTexGenParameterfvSGIS(GLenum pname, const GLfloat *params)
+{
+ noop_warn("glPixelTexGenParameterfvSGIS");
+}
+
+static void APIENTRY noopPixelTexGenParameteriSGIS(GLenum pname, GLint param)
+{
+ noop_warn("glPixelTexGenParameteriSGIS");
+}
+
+static void APIENTRY noopPixelTexGenParameterivSGIS(GLenum pname, const GLint *params)
+{
+ noop_warn("glPixelTexGenParameterivSGIS");
+}
+
+static GLbitfield APIENTRY noopQueryMatrixxOES(GLfixed *mantissa, GLint *exponent)
+{
+ noop_warn("glQueryMatrixxOES");
+ return (GLbitfield) 0;
+}
+
+static void APIENTRY noopSampleMaskSGIS(GLclampf value, GLboolean invert)
+{
+ noop_warn("glSampleMaskSGIS");
+}
+
+static void APIENTRY noopSamplePatternSGIS(GLenum pattern)
+{
+ noop_warn("glSamplePatternSGIS");
+}
+
+static void APIENTRY noopColorPointerEXT(GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer)
+{
+ noop_warn("glColorPointerEXT");
+}
+
+static void APIENTRY noopEdgeFlagPointerEXT(GLsizei stride, GLsizei count, const GLboolean *pointer)
+{
+ noop_warn("glEdgeFlagPointerEXT");
+}
+
+static void APIENTRY noopIndexPointerEXT(GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer)
+{
+ noop_warn("glIndexPointerEXT");
+}
+
+static void APIENTRY noopNormalPointerEXT(GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer)
+{
+ noop_warn("glNormalPointerEXT");
+}
+
+static void APIENTRY noopTexCoordPointerEXT(GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer)
+{
+ noop_warn("glTexCoordPointerEXT");
+}
+
+static void APIENTRY noopVertexPointerEXT(GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer)
+{
+ noop_warn("glVertexPointerEXT");
+}
+
+static void APIENTRY noopPointParameterfEXT(GLenum pname, GLfloat param)
+{
+ noop_warn("glPointParameterfEXT");
+}
+
+static void APIENTRY noopPointParameterfvEXT(GLenum pname, const GLfloat *params)
+{
+ noop_warn("glPointParameterfvEXT");
+}
+
+static void APIENTRY noopLockArraysEXT(GLint first, GLsizei count)
+{
+ noop_warn("glLockArraysEXT");
+}
+
+static void APIENTRY noopUnlockArraysEXT(void)
+{
+ noop_warn("glUnlockArraysEXT");
+}
+
+static void APIENTRY noopSecondaryColor3bEXT(GLbyte red, GLbyte green, GLbyte blue)
+{
+ noop_warn("glSecondaryColor3bEXT");
+}
+
+static void APIENTRY noopSecondaryColor3bvEXT(const GLbyte *v)
+{
+ noop_warn("glSecondaryColor3bvEXT");
+}
+
+static void APIENTRY noopSecondaryColor3dEXT(GLdouble red, GLdouble green, GLdouble blue)
+{
+ noop_warn("glSecondaryColor3dEXT");
+}
+
+static void APIENTRY noopSecondaryColor3dvEXT(const GLdouble *v)
+{
+ noop_warn("glSecondaryColor3dvEXT");
+}
+
+static void APIENTRY noopSecondaryColor3fEXT(GLfloat red, GLfloat green, GLfloat blue)
+{
+ noop_warn("glSecondaryColor3fEXT");
+}
+
+static void APIENTRY noopSecondaryColor3fvEXT(const GLfloat *v)
+{
+ noop_warn("glSecondaryColor3fvEXT");
+}
+
+static void APIENTRY noopSecondaryColor3iEXT(GLint red, GLint green, GLint blue)
+{
+ noop_warn("glSecondaryColor3iEXT");
+}
+
+static void APIENTRY noopSecondaryColor3ivEXT(const GLint *v)
+{
+ noop_warn("glSecondaryColor3ivEXT");
+}
+
+static void APIENTRY noopSecondaryColor3sEXT(GLshort red, GLshort green, GLshort blue)
+{
+ noop_warn("glSecondaryColor3sEXT");
+}
+
+static void APIENTRY noopSecondaryColor3svEXT(const GLshort *v)
+{
+ noop_warn("glSecondaryColor3svEXT");
+}
+
+static void APIENTRY noopSecondaryColor3ubEXT(GLubyte red, GLubyte green, GLubyte blue)
+{
+ noop_warn("glSecondaryColor3ubEXT");
+}
+
+static void APIENTRY noopSecondaryColor3ubvEXT(const GLubyte *v)
+{
+ noop_warn("glSecondaryColor3ubvEXT");
+}
+
+static void APIENTRY noopSecondaryColor3uiEXT(GLuint red, GLuint green, GLuint blue)
+{
+ noop_warn("glSecondaryColor3uiEXT");
+}
+
+static void APIENTRY noopSecondaryColor3uivEXT(const GLuint *v)
+{
+ noop_warn("glSecondaryColor3uivEXT");
+}
+
+static void APIENTRY noopSecondaryColor3usEXT(GLushort red, GLushort green, GLushort blue)
+{
+ noop_warn("glSecondaryColor3usEXT");
+}
+
+static void APIENTRY noopSecondaryColor3usvEXT(const GLushort *v)
+{
+ noop_warn("glSecondaryColor3usvEXT");
+}
+
+static void APIENTRY noopSecondaryColorPointerEXT(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer)
+{
+ noop_warn("glSecondaryColorPointerEXT");
+}
+
+static void APIENTRY noopMultiDrawArraysEXT(GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount)
+{
+ noop_warn("glMultiDrawArraysEXT");
+}
+
+static void APIENTRY noopMultiDrawElementsEXT(GLenum mode, const GLsizei *count, GLenum type, const GLvoid **indices, GLsizei primcount)
+{
+ noop_warn("glMultiDrawElementsEXT");
+}
+
+static void APIENTRY noopFogCoordPointerEXT(GLenum type, GLsizei stride, const GLvoid *pointer)
+{
+ noop_warn("glFogCoordPointerEXT");
+}
+
+static void APIENTRY noopFogCoorddEXT(GLdouble coord)
+{
+ noop_warn("glFogCoorddEXT");
+}
+
+static void APIENTRY noopFogCoorddvEXT(const GLdouble *coord)
+{
+ noop_warn("glFogCoorddvEXT");
+}
+
+static void APIENTRY noopFogCoordfEXT(GLfloat coord)
+{
+ noop_warn("glFogCoordfEXT");
+}
+
+static void APIENTRY noopFogCoordfvEXT(const GLfloat *coord)
+{
+ noop_warn("glFogCoordfvEXT");
+}
+
+static void APIENTRY noopPixelTexGenSGIX(GLenum mode)
+{
+ noop_warn("glPixelTexGenSGIX");
+}
+
+static void APIENTRY noopBlendFuncSeparateEXT(GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha)
+{
+ noop_warn("glBlendFuncSeparateEXT");
+}
+
+static void APIENTRY noopFlushVertexArrayRangeNV(void)
+{
+ noop_warn("glFlushVertexArrayRangeNV");
+}
+
+static void APIENTRY noopVertexArrayRangeNV(GLsizei length, const GLvoid *pointer)
+{
+ noop_warn("glVertexArrayRangeNV");
+}
+
+static void APIENTRY noopCombinerInputNV(GLenum stage, GLenum portion, GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage)
+{
+ noop_warn("glCombinerInputNV");
+}
+
+static void APIENTRY noopCombinerOutputNV(GLenum stage, GLenum portion, GLenum abOutput, GLenum cdOutput, GLenum sumOutput, GLenum scale, GLenum bias, GLboolean abDotProduct, GLboolean cdDotProduct, GLboolean muxSum)
+{
+ noop_warn("glCombinerOutputNV");
+}
+
+static void APIENTRY noopCombinerParameterfNV(GLenum pname, GLfloat param)
+{
+ noop_warn("glCombinerParameterfNV");
+}
+
+static void APIENTRY noopCombinerParameterfvNV(GLenum pname, const GLfloat *params)
+{
+ noop_warn("glCombinerParameterfvNV");
+}
+
+static void APIENTRY noopCombinerParameteriNV(GLenum pname, GLint param)
+{
+ noop_warn("glCombinerParameteriNV");
+}
+
+static void APIENTRY noopCombinerParameterivNV(GLenum pname, const GLint *params)
+{
+ noop_warn("glCombinerParameterivNV");
+}
+
+static void APIENTRY noopFinalCombinerInputNV(GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage)
+{
+ noop_warn("glFinalCombinerInputNV");
+}
+
+static void APIENTRY noopGetCombinerInputParameterfvNV(GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLfloat *params)
+{
+ noop_warn("glGetCombinerInputParameterfvNV");
+}
+
+static void APIENTRY noopGetCombinerInputParameterivNV(GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLint *params)
+{
+ noop_warn("glGetCombinerInputParameterivNV");
+}
+
+static void APIENTRY noopGetCombinerOutputParameterfvNV(GLenum stage, GLenum portion, GLenum pname, GLfloat *params)
+{
+ noop_warn("glGetCombinerOutputParameterfvNV");
+}
+
+static void APIENTRY noopGetCombinerOutputParameterivNV(GLenum stage, GLenum portion, GLenum pname, GLint *params)
+{
+ noop_warn("glGetCombinerOutputParameterivNV");
+}
+
+static void APIENTRY noopGetFinalCombinerInputParameterfvNV(GLenum variable, GLenum pname, GLfloat *params)
+{
+ noop_warn("glGetFinalCombinerInputParameterfvNV");
+}
+
+static void APIENTRY noopGetFinalCombinerInputParameterivNV(GLenum variable, GLenum pname, GLint *params)
+{
+ noop_warn("glGetFinalCombinerInputParameterivNV");
+}
+
+static void APIENTRY noopResizeBuffersMESA(void)
+{
+ noop_warn("glResizeBuffersMESA");
+}
+
+static void APIENTRY noopWindowPos2dMESA(GLdouble x, GLdouble y)
+{
+ noop_warn("glWindowPos2dMESA");
+}
+
+static void APIENTRY noopWindowPos2dvMESA(const GLdouble *v)
+{
+ noop_warn("glWindowPos2dvMESA");
+}
+
+static void APIENTRY noopWindowPos2fMESA(GLfloat x, GLfloat y)
+{
+ noop_warn("glWindowPos2fMESA");
+}
+
+static void APIENTRY noopWindowPos2fvMESA(const GLfloat *v)
+{
+ noop_warn("glWindowPos2fvMESA");
+}
+
+static void APIENTRY noopWindowPos2iMESA(GLint x, GLint y)
+{
+ noop_warn("glWindowPos2iMESA");
+}
+
+static void APIENTRY noopWindowPos2ivMESA(const GLint *v)
+{
+ noop_warn("glWindowPos2ivMESA");
+}
+
+static void APIENTRY noopWindowPos2sMESA(GLshort x, GLshort y)
+{
+ noop_warn("glWindowPos2sMESA");
+}
+
+static void APIENTRY noopWindowPos2svMESA(const GLshort *v)
+{
+ noop_warn("glWindowPos2svMESA");
+}
+
+static void APIENTRY noopWindowPos3dMESA(GLdouble x, GLdouble y, GLdouble z)
+{
+ noop_warn("glWindowPos3dMESA");
+}
+
+static void APIENTRY noopWindowPos3dvMESA(const GLdouble *v)
+{
+ noop_warn("glWindowPos3dvMESA");
+}
+
+static void APIENTRY noopWindowPos3fMESA(GLfloat x, GLfloat y, GLfloat z)
+{
+ noop_warn("glWindowPos3fMESA");
+}
+
+static void APIENTRY noopWindowPos3fvMESA(const GLfloat *v)
+{
+ noop_warn("glWindowPos3fvMESA");
+}
+
+static void APIENTRY noopWindowPos3iMESA(GLint x, GLint y, GLint z)
+{
+ noop_warn("glWindowPos3iMESA");
+}
+
+static void APIENTRY noopWindowPos3ivMESA(const GLint *v)
+{
+ noop_warn("glWindowPos3ivMESA");
+}
+
+static void APIENTRY noopWindowPos3sMESA(GLshort x, GLshort y, GLshort z)
+{
+ noop_warn("glWindowPos3sMESA");
+}
+
+static void APIENTRY noopWindowPos3svMESA(const GLshort *v)
+{
+ noop_warn("glWindowPos3svMESA");
+}
+
+static void APIENTRY noopWindowPos4dMESA(GLdouble x, GLdouble y, GLdouble z, GLdouble w)
+{
+ noop_warn("glWindowPos4dMESA");
+}
+
+static void APIENTRY noopWindowPos4dvMESA(const GLdouble *v)
+{
+ noop_warn("glWindowPos4dvMESA");
+}
+
+static void APIENTRY noopWindowPos4fMESA(GLfloat x, GLfloat y, GLfloat z, GLfloat w)
+{
+ noop_warn("glWindowPos4fMESA");
+}
+
+static void APIENTRY noopWindowPos4fvMESA(const GLfloat *v)
+{
+ noop_warn("glWindowPos4fvMESA");
+}
+
+static void APIENTRY noopWindowPos4iMESA(GLint x, GLint y, GLint z, GLint w)
+{
+ noop_warn("glWindowPos4iMESA");
+}
+
+static void APIENTRY noopWindowPos4ivMESA(const GLint *v)
+{
+ noop_warn("glWindowPos4ivMESA");
+}
+
+static void APIENTRY noopWindowPos4sMESA(GLshort x, GLshort y, GLshort z, GLshort w)
+{
+ noop_warn("glWindowPos4sMESA");
+}
+
+static void APIENTRY noopWindowPos4svMESA(const GLshort *v)
+{
+ noop_warn("glWindowPos4svMESA");
+}
+
+static void APIENTRY noopMultiModeDrawArraysIBM(const GLenum *mode, const GLint *first, const GLsizei *count, GLsizei primcount, GLint modestride)
+{
+ noop_warn("glMultiModeDrawArraysIBM");
+}
+
+static void APIENTRY noopMultiModeDrawElementsIBM(const GLenum *mode, const GLsizei *count, GLenum type, const GLvoid * const *indices, GLsizei primcount, GLint modestride)
+{
+ noop_warn("glMultiModeDrawElementsIBM");
+}
+
+static void APIENTRY noopDeleteFencesNV(GLsizei n, const GLuint *fences)
+{
+ noop_warn("glDeleteFencesNV");
+}
+
+static void APIENTRY noopFinishFenceNV(GLuint fence)
+{
+ noop_warn("glFinishFenceNV");
+}
+
+static void APIENTRY noopGenFencesNV(GLsizei n, GLuint *fences)
+{
+ noop_warn("glGenFencesNV");
+}
+
+static void APIENTRY noopGetFenceivNV(GLuint fence, GLenum pname, GLint *params)
+{
+ noop_warn("glGetFenceivNV");
+}
+
+static GLboolean APIENTRY noopIsFenceNV(GLuint fence)
+{
+ noop_warn("glIsFenceNV");
+ return (GLboolean) 0;
+}
+
+static void APIENTRY noopSetFenceNV(GLuint fence, GLenum condition)
+{
+ noop_warn("glSetFenceNV");
+}
+
+static GLboolean APIENTRY noopTestFenceNV(GLuint fence)
+{
+ noop_warn("glTestFenceNV");
+ return (GLboolean) 0;
+}
+
+static GLboolean APIENTRY noopAreProgramsResidentNV(GLsizei n, const GLuint *ids, GLboolean *residences)
+{
+ noop_warn("glAreProgramsResidentNV");
+ return (GLboolean) 0;
+}
+
+static void APIENTRY noopBindProgramNV(GLenum target, GLuint program)
+{
+ noop_warn("glBindProgramNV");
+}
+
+static void APIENTRY noopDeleteProgramsNV(GLsizei n, const GLuint *programs)
+{
+ noop_warn("glDeleteProgramsNV");
+}
+
+static void APIENTRY noopExecuteProgramNV(GLenum target, GLuint id, const GLfloat *params)
+{
+ noop_warn("glExecuteProgramNV");
+}
+
+static void APIENTRY noopGenProgramsNV(GLsizei n, GLuint *programs)
+{
+ noop_warn("glGenProgramsNV");
+}
+
+static void APIENTRY noopGetProgramParameterdvNV(GLenum target, GLuint index, GLenum pname, GLdouble *params)
+{
+ noop_warn("glGetProgramParameterdvNV");
+}
+
+static void APIENTRY noopGetProgramParameterfvNV(GLenum target, GLuint index, GLenum pname, GLfloat *params)
+{
+ noop_warn("glGetProgramParameterfvNV");
+}
+
+static void APIENTRY noopGetProgramStringNV(GLuint id, GLenum pname, GLubyte *program)
+{
+ noop_warn("glGetProgramStringNV");
+}
+
+static void APIENTRY noopGetProgramivNV(GLuint id, GLenum pname, GLint *params)
+{
+ noop_warn("glGetProgramivNV");
+}
+
+static void APIENTRY noopGetTrackMatrixivNV(GLenum target, GLuint address, GLenum pname, GLint *params)
+{
+ noop_warn("glGetTrackMatrixivNV");
+}
+
+static void APIENTRY noopGetVertexAttribPointervNV(GLuint index, GLenum pname, GLvoid **pointer)
+{
+ noop_warn("glGetVertexAttribPointervNV");
+}
+
+static void APIENTRY noopGetVertexAttribdvNV(GLuint index, GLenum pname, GLdouble *params)
+{
+ noop_warn("glGetVertexAttribdvNV");
+}
+
+static void APIENTRY noopGetVertexAttribfvNV(GLuint index, GLenum pname, GLfloat *params)
+{
+ noop_warn("glGetVertexAttribfvNV");
+}
+
+static void APIENTRY noopGetVertexAttribivNV(GLuint index, GLenum pname, GLint *params)
+{
+ noop_warn("glGetVertexAttribivNV");
+}
+
+static GLboolean APIENTRY noopIsProgramNV(GLuint program)
+{
+ noop_warn("glIsProgramNV");
+ return (GLboolean) 0;
+}
+
+static void APIENTRY noopLoadProgramNV(GLenum target, GLuint id, GLsizei len, const GLubyte *program)
+{
+ noop_warn("glLoadProgramNV");
+}
+
+static void APIENTRY noopProgramParameters4dvNV(GLenum target, GLuint index, GLsizei num, const GLdouble *params)
+{
+ noop_warn("glProgramParameters4dvNV");
+}
+
+static void APIENTRY noopProgramParameters4fvNV(GLenum target, GLuint index, GLsizei num, const GLfloat *params)
+{
+ noop_warn("glProgramParameters4fvNV");
+}
+
+static void APIENTRY noopRequestResidentProgramsNV(GLsizei n, const GLuint *ids)
+{
+ noop_warn("glRequestResidentProgramsNV");
+}
+
+static void APIENTRY noopTrackMatrixNV(GLenum target, GLuint address, GLenum matrix, GLenum transform)
+{
+ noop_warn("glTrackMatrixNV");
+}
+
+static void APIENTRY noopVertexAttrib1dNV(GLuint index, GLdouble x)
+{
+ noop_warn("glVertexAttrib1dNV");
+}
+
+static void APIENTRY noopVertexAttrib1dvNV(GLuint index, const GLdouble *v)
+{
+ noop_warn("glVertexAttrib1dvNV");
+}
+
+static void APIENTRY noopVertexAttrib1fNV(GLuint index, GLfloat x)
+{
+ noop_warn("glVertexAttrib1fNV");
+}
+
+static void APIENTRY noopVertexAttrib1fvNV(GLuint index, const GLfloat *v)
+{
+ noop_warn("glVertexAttrib1fvNV");
+}
+
+static void APIENTRY noopVertexAttrib1sNV(GLuint index, GLshort x)
+{
+ noop_warn("glVertexAttrib1sNV");
+}
+
+static void APIENTRY noopVertexAttrib1svNV(GLuint index, const GLshort *v)
+{
+ noop_warn("glVertexAttrib1svNV");
+}
+
+static void APIENTRY noopVertexAttrib2dNV(GLuint index, GLdouble x, GLdouble y)
+{
+ noop_warn("glVertexAttrib2dNV");
+}
+
+static void APIENTRY noopVertexAttrib2dvNV(GLuint index, const GLdouble *v)
+{
+ noop_warn("glVertexAttrib2dvNV");
+}
+
+static void APIENTRY noopVertexAttrib2fNV(GLuint index, GLfloat x, GLfloat y)
+{
+ noop_warn("glVertexAttrib2fNV");
+}
+
+static void APIENTRY noopVertexAttrib2fvNV(GLuint index, const GLfloat *v)
+{
+ noop_warn("glVertexAttrib2fvNV");
+}
+
+static void APIENTRY noopVertexAttrib2sNV(GLuint index, GLshort x, GLshort y)
+{
+ noop_warn("glVertexAttrib2sNV");
+}
+
+static void APIENTRY noopVertexAttrib2svNV(GLuint index, const GLshort *v)
+{
+ noop_warn("glVertexAttrib2svNV");
+}
+
+static void APIENTRY noopVertexAttrib3dNV(GLuint index, GLdouble x, GLdouble y, GLdouble z)
+{
+ noop_warn("glVertexAttrib3dNV");
+}
+
+static void APIENTRY noopVertexAttrib3dvNV(GLuint index, const GLdouble *v)
+{
+ noop_warn("glVertexAttrib3dvNV");
+}
+
+static void APIENTRY noopVertexAttrib3fNV(GLuint index, GLfloat x, GLfloat y, GLfloat z)
+{
+ noop_warn("glVertexAttrib3fNV");
+}
+
+static void APIENTRY noopVertexAttrib3fvNV(GLuint index, const GLfloat *v)
+{
+ noop_warn("glVertexAttrib3fvNV");
+}
+
+static void APIENTRY noopVertexAttrib3sNV(GLuint index, GLshort x, GLshort y, GLshort z)
+{
+ noop_warn("glVertexAttrib3sNV");
+}
+
+static void APIENTRY noopVertexAttrib3svNV(GLuint index, const GLshort *v)
+{
+ noop_warn("glVertexAttrib3svNV");
+}
+
+static void APIENTRY noopVertexAttrib4dNV(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w)
+{
+ noop_warn("glVertexAttrib4dNV");
+}
+
+static void APIENTRY noopVertexAttrib4dvNV(GLuint index, const GLdouble *v)
+{
+ noop_warn("glVertexAttrib4dvNV");
+}
+
+static void APIENTRY noopVertexAttrib4fNV(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
+{
+ noop_warn("glVertexAttrib4fNV");
+}
+
+static void APIENTRY noopVertexAttrib4fvNV(GLuint index, const GLfloat *v)
+{
+ noop_warn("glVertexAttrib4fvNV");
+}
+
+static void APIENTRY noopVertexAttrib4sNV(GLuint index, GLshort x, GLshort y, GLshort z, GLshort w)
+{
+ noop_warn("glVertexAttrib4sNV");
+}
+
+static void APIENTRY noopVertexAttrib4svNV(GLuint index, const GLshort *v)
+{
+ noop_warn("glVertexAttrib4svNV");
+}
+
+static void APIENTRY noopVertexAttrib4ubNV(GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w)
+{
+ noop_warn("glVertexAttrib4ubNV");
+}
+
+static void APIENTRY noopVertexAttrib4ubvNV(GLuint index, const GLubyte *v)
+{
+ noop_warn("glVertexAttrib4ubvNV");
+}
+
+static void APIENTRY noopVertexAttribPointerNV(GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer)
+{
+ noop_warn("glVertexAttribPointerNV");
+}
+
+static void APIENTRY noopVertexAttribs1dvNV(GLuint index, GLsizei n, const GLdouble *v)
+{
+ noop_warn("glVertexAttribs1dvNV");
+}
+
+static void APIENTRY noopVertexAttribs1fvNV(GLuint index, GLsizei n, const GLfloat *v)
+{
+ noop_warn("glVertexAttribs1fvNV");
+}
+
+static void APIENTRY noopVertexAttribs1svNV(GLuint index, GLsizei n, const GLshort *v)
+{
+ noop_warn("glVertexAttribs1svNV");
+}
+
+static void APIENTRY noopVertexAttribs2dvNV(GLuint index, GLsizei n, const GLdouble *v)
+{
+ noop_warn("glVertexAttribs2dvNV");
+}
+
+static void APIENTRY noopVertexAttribs2fvNV(GLuint index, GLsizei n, const GLfloat *v)
+{
+ noop_warn("glVertexAttribs2fvNV");
+}
+
+static void APIENTRY noopVertexAttribs2svNV(GLuint index, GLsizei n, const GLshort *v)
+{
+ noop_warn("glVertexAttribs2svNV");
+}
+
+static void APIENTRY noopVertexAttribs3dvNV(GLuint index, GLsizei n, const GLdouble *v)
+{
+ noop_warn("glVertexAttribs3dvNV");
+}
+
+static void APIENTRY noopVertexAttribs3fvNV(GLuint index, GLsizei n, const GLfloat *v)
+{
+ noop_warn("glVertexAttribs3fvNV");
+}
+
+static void APIENTRY noopVertexAttribs3svNV(GLuint index, GLsizei n, const GLshort *v)
+{
+ noop_warn("glVertexAttribs3svNV");
+}
+
+static void APIENTRY noopVertexAttribs4dvNV(GLuint index, GLsizei n, const GLdouble *v)
+{
+ noop_warn("glVertexAttribs4dvNV");
+}
+
+static void APIENTRY noopVertexAttribs4fvNV(GLuint index, GLsizei n, const GLfloat *v)
+{
+ noop_warn("glVertexAttribs4fvNV");
+}
+
+static void APIENTRY noopVertexAttribs4svNV(GLuint index, GLsizei n, const GLshort *v)
+{
+ noop_warn("glVertexAttribs4svNV");
+}
+
+static void APIENTRY noopVertexAttribs4ubvNV(GLuint index, GLsizei n, const GLubyte *v)
+{
+ noop_warn("glVertexAttribs4ubvNV");
+}
+
+static void APIENTRY noopGetTexBumpParameterfvATI(GLenum pname, GLfloat *param)
+{
+ noop_warn("glGetTexBumpParameterfvATI");
+}
+
+static void APIENTRY noopGetTexBumpParameterivATI(GLenum pname, GLint *param)
+{
+ noop_warn("glGetTexBumpParameterivATI");
+}
+
+static void APIENTRY noopTexBumpParameterfvATI(GLenum pname, const GLfloat *param)
+{
+ noop_warn("glTexBumpParameterfvATI");
+}
+
+static void APIENTRY noopTexBumpParameterivATI(GLenum pname, const GLint *param)
+{
+ noop_warn("glTexBumpParameterivATI");
+}
+
+static void APIENTRY noopAlphaFragmentOp1ATI(GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod)
+{
+ noop_warn("glAlphaFragmentOp1ATI");
+}
+
+static void APIENTRY noopAlphaFragmentOp2ATI(GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod)
+{
+ noop_warn("glAlphaFragmentOp2ATI");
+}
+
+static void APIENTRY noopAlphaFragmentOp3ATI(GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod)
+{
+ noop_warn("glAlphaFragmentOp3ATI");
+}
+
+static void APIENTRY noopBeginFragmentShaderATI(void)
+{
+ noop_warn("glBeginFragmentShaderATI");
+}
+
+static void APIENTRY noopBindFragmentShaderATI(GLuint id)
+{
+ noop_warn("glBindFragmentShaderATI");
+}
+
+static void APIENTRY noopColorFragmentOp1ATI(GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod)
+{
+ noop_warn("glColorFragmentOp1ATI");
+}
+
+static void APIENTRY noopColorFragmentOp2ATI(GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod)
+{
+ noop_warn("glColorFragmentOp2ATI");
+}
+
+static void APIENTRY noopColorFragmentOp3ATI(GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod)
+{
+ noop_warn("glColorFragmentOp3ATI");
+}
+
+static void APIENTRY noopDeleteFragmentShaderATI(GLuint id)
+{
+ noop_warn("glDeleteFragmentShaderATI");
+}
+
+static void APIENTRY noopEndFragmentShaderATI(void)
+{
+ noop_warn("glEndFragmentShaderATI");
+}
+
+static GLuint APIENTRY noopGenFragmentShadersATI(GLuint range)
+{
+ noop_warn("glGenFragmentShadersATI");
+ return (GLuint) 0;
+}
+
+static void APIENTRY noopPassTexCoordATI(GLuint dst, GLuint coord, GLenum swizzle)
+{
+ noop_warn("glPassTexCoordATI");
+}
+
+static void APIENTRY noopSampleMapATI(GLuint dst, GLuint interp, GLenum swizzle)
+{
+ noop_warn("glSampleMapATI");
+}
+
+static void APIENTRY noopSetFragmentShaderConstantATI(GLuint dst, const GLfloat *value)
+{
+ noop_warn("glSetFragmentShaderConstantATI");
+}
+
+static void APIENTRY noopPointParameteriNV(GLenum pname, GLint param)
+{
+ noop_warn("glPointParameteriNV");
+}
+
+static void APIENTRY noopPointParameterivNV(GLenum pname, const GLint *params)
+{
+ noop_warn("glPointParameterivNV");
+}
+
+static void APIENTRY noopActiveStencilFaceEXT(GLenum face)
+{
+ noop_warn("glActiveStencilFaceEXT");
+}
+
+static void APIENTRY noopBindVertexArrayAPPLE(GLuint array)
+{
+ noop_warn("glBindVertexArrayAPPLE");
+}
+
+static void APIENTRY noopDeleteVertexArraysAPPLE(GLsizei n, const GLuint *arrays)
+{
+ noop_warn("glDeleteVertexArraysAPPLE");
+}
+
+static void APIENTRY noopGenVertexArraysAPPLE(GLsizei n, GLuint *arrays)
+{
+ noop_warn("glGenVertexArraysAPPLE");
+}
+
+static GLboolean APIENTRY noopIsVertexArrayAPPLE(GLuint array)
+{
+ noop_warn("glIsVertexArrayAPPLE");
+ return (GLboolean) 0;
+}
+
+static void APIENTRY noopGetProgramNamedParameterdvNV(GLuint id, GLsizei len, const GLubyte *name, GLdouble *params)
+{
+ noop_warn("glGetProgramNamedParameterdvNV");
+}
+
+static void APIENTRY noopGetProgramNamedParameterfvNV(GLuint id, GLsizei len, const GLubyte *name, GLfloat *params)
+{
+ noop_warn("glGetProgramNamedParameterfvNV");
+}
+
+static void APIENTRY noopProgramNamedParameter4dNV(GLuint id, GLsizei len, const GLubyte *name, GLdouble x, GLdouble y, GLdouble z, GLdouble w)
+{
+ noop_warn("glProgramNamedParameter4dNV");
+}
+
+static void APIENTRY noopProgramNamedParameter4dvNV(GLuint id, GLsizei len, const GLubyte *name, const GLdouble *v)
+{
+ noop_warn("glProgramNamedParameter4dvNV");
+}
+
+static void APIENTRY noopProgramNamedParameter4fNV(GLuint id, GLsizei len, const GLubyte *name, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
+{
+ noop_warn("glProgramNamedParameter4fNV");
+}
+
+static void APIENTRY noopProgramNamedParameter4fvNV(GLuint id, GLsizei len, const GLubyte *name, const GLfloat *v)
+{
+ noop_warn("glProgramNamedParameter4fvNV");
+}
+
+static void APIENTRY noopPrimitiveRestartIndexNV(GLuint index)
+{
+ noop_warn("glPrimitiveRestartIndexNV");
+}
+
+static void APIENTRY noopPrimitiveRestartNV(void)
+{
+ noop_warn("glPrimitiveRestartNV");
+}
+
+static void APIENTRY noopAlphaFuncxOES(GLenum func, GLclampx ref)
+{
+ noop_warn("glAlphaFuncxOES");
+}
+
+static void APIENTRY noopClearColorxOES(GLclampx red, GLclampx green, GLclampx blue, GLclampx alpha)
+{
+ noop_warn("glClearColorxOES");
+}
+
+static void APIENTRY noopClearDepthxOES(GLclampx depth)
+{
+ noop_warn("glClearDepthxOES");
+}
+
+static void APIENTRY noopClipPlanexOES(GLenum plane, const GLfixed *equation)
+{
+ noop_warn("glClipPlanexOES");
+}
+
+static void APIENTRY noopColor4xOES(GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha)
+{
+ noop_warn("glColor4xOES");
+}
+
+static void APIENTRY noopDepthRangexOES(GLclampx zNear, GLclampx zFar)
+{
+ noop_warn("glDepthRangexOES");
+}
+
+static void APIENTRY noopFogxOES(GLenum pname, GLfixed param)
+{
+ noop_warn("glFogxOES");
+}
+
+static void APIENTRY noopFogxvOES(GLenum pname, const GLfixed *params)
+{
+ noop_warn("glFogxvOES");
+}
+
+static void APIENTRY noopFrustumxOES(GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar)
+{
+ noop_warn("glFrustumxOES");
+}
+
+static void APIENTRY noopGetClipPlanexOES(GLenum plane, GLfixed *equation)
+{
+ noop_warn("glGetClipPlanexOES");
+}
+
+static void APIENTRY noopGetFixedvOES(GLenum pname, GLfixed *params)
+{
+ noop_warn("glGetFixedvOES");
+}
+
+static void APIENTRY noopGetLightxvOES(GLenum light, GLenum pname, GLfixed *params)
+{
+ noop_warn("glGetLightxvOES");
+}
+
+static void APIENTRY noopGetMaterialxvOES(GLenum face, GLenum pname, GLfixed *params)
+{
+ noop_warn("glGetMaterialxvOES");
+}
+
+static void APIENTRY noopGetTexEnvxvOES(GLenum target, GLenum pname, GLfixed *params)
+{
+ noop_warn("glGetTexEnvxvOES");
+}
+
+static void APIENTRY noopGetTexGenxvOES(GLenum coord, GLenum pname, GLfixed *params)
+{
+ noop_warn("glGetTexGenxvOES");
+}
+
+static void APIENTRY noopGetTexParameterxvOES(GLenum target, GLenum pname, GLfixed *params)
+{
+ noop_warn("glGetTexParameterxvOES");
+}
+
+static void APIENTRY noopLightModelxOES(GLenum pname, GLfixed param)
+{
+ noop_warn("glLightModelxOES");
+}
+
+static void APIENTRY noopLightModelxvOES(GLenum pname, const GLfixed *params)
+{
+ noop_warn("glLightModelxvOES");
+}
+
+static void APIENTRY noopLightxOES(GLenum light, GLenum pname, GLfixed param)
+{
+ noop_warn("glLightxOES");
+}
+
+static void APIENTRY noopLightxvOES(GLenum light, GLenum pname, const GLfixed *params)
+{
+ noop_warn("glLightxvOES");
+}
+
+static void APIENTRY noopLineWidthxOES(GLfixed width)
+{
+ noop_warn("glLineWidthxOES");
+}
+
+static void APIENTRY noopLoadMatrixxOES(const GLfixed *m)
+{
+ noop_warn("glLoadMatrixxOES");
+}
+
+static void APIENTRY noopMaterialxOES(GLenum face, GLenum pname, GLfixed param)
+{
+ noop_warn("glMaterialxOES");
+}
+
+static void APIENTRY noopMaterialxvOES(GLenum face, GLenum pname, const GLfixed *params)
+{
+ noop_warn("glMaterialxvOES");
+}
+
+static void APIENTRY noopMultMatrixxOES(const GLfixed *m)
+{
+ noop_warn("glMultMatrixxOES");
+}
+
+static void APIENTRY noopMultiTexCoord4xOES(GLenum target, GLfixed s, GLfixed t, GLfixed r, GLfixed q)
+{
+ noop_warn("glMultiTexCoord4xOES");
+}
+
+static void APIENTRY noopNormal3xOES(GLfixed nx, GLfixed ny, GLfixed nz)
+{
+ noop_warn("glNormal3xOES");
+}
+
+static void APIENTRY noopOrthoxOES(GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar)
+{
+ noop_warn("glOrthoxOES");
+}
+
+static void APIENTRY noopPointParameterxOES(GLenum pname, GLfixed param)
+{
+ noop_warn("glPointParameterxOES");
+}
+
+static void APIENTRY noopPointParameterxvOES(GLenum pname, const GLfixed *params)
+{
+ noop_warn("glPointParameterxvOES");
+}
+
+static void APIENTRY noopPointSizexOES(GLfixed size)
+{
+ noop_warn("glPointSizexOES");
+}
+
+static void APIENTRY noopPolygonOffsetxOES(GLfixed factor, GLfixed units)
+{
+ noop_warn("glPolygonOffsetxOES");
+}
+
+static void APIENTRY noopRotatexOES(GLfixed angle, GLfixed x, GLfixed y, GLfixed z)
+{
+ noop_warn("glRotatexOES");
+}
+
+static void APIENTRY noopSampleCoveragexOES(GLclampx value, GLboolean invert)
+{
+ noop_warn("glSampleCoveragexOES");
+}
+
+static void APIENTRY noopScalexOES(GLfixed x, GLfixed y, GLfixed z)
+{
+ noop_warn("glScalexOES");
+}
+
+static void APIENTRY noopTexEnvxOES(GLenum target, GLenum pname, GLfixed param)
+{
+ noop_warn("glTexEnvxOES");
+}
+
+static void APIENTRY noopTexEnvxvOES(GLenum target, GLenum pname, const GLfixed *params)
+{
+ noop_warn("glTexEnvxvOES");
+}
+
+static void APIENTRY noopTexGenxOES(GLenum coord, GLenum pname, GLint param)
+{
+ noop_warn("glTexGenxOES");
+}
+
+static void APIENTRY noopTexGenxvOES(GLenum coord, GLenum pname, const GLfixed *params)
+{
+ noop_warn("glTexGenxvOES");
+}
+
+static void APIENTRY noopTexParameterxOES(GLenum target, GLenum pname, GLfixed param)
+{
+ noop_warn("glTexParameterxOES");
+}
+
+static void APIENTRY noopTexParameterxvOES(GLenum target, GLenum pname, const GLfixed *params)
+{
+ noop_warn("glTexParameterxvOES");
+}
+
+static void APIENTRY noopTranslatexOES(GLfixed x, GLfixed y, GLfixed z)
+{
+ noop_warn("glTranslatexOES");
+}
+
+static void APIENTRY noopClipPlanefOES(GLenum plane, const GLfloat *equation)
+{
+ noop_warn("glClipPlanefOES");
+}
+
+static void APIENTRY noopFrustumfOES(GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar)
+{
+ noop_warn("glFrustumfOES");
+}
+
+static void APIENTRY noopGetClipPlanefOES(GLenum plane, GLfloat *equation)
+{
+ noop_warn("glGetClipPlanefOES");
+}
+
+static void APIENTRY noopOrthofOES(GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar)
+{
+ noop_warn("glOrthofOES");
+}
+
+static void APIENTRY noopDepthBoundsEXT(GLclampd zmin, GLclampd zmax)
+{
+ noop_warn("glDepthBoundsEXT");
+}
+
+static void APIENTRY noopBlendEquationSeparateEXT(GLenum modeRGB, GLenum modeA)
+{
+ noop_warn("glBlendEquationSeparateEXT");
+}
+
+static void APIENTRY noopBindFramebufferEXT(GLenum target, GLuint framebuffer)
+{
+ noop_warn("glBindFramebufferEXT");
+}
+
+static void APIENTRY noopBindRenderbufferEXT(GLenum target, GLuint renderbuffer)
+{
+ noop_warn("glBindRenderbufferEXT");
+}
+
+static GLenum APIENTRY noopCheckFramebufferStatusEXT(GLenum target)
+{
+ noop_warn("glCheckFramebufferStatusEXT");
+ return (GLenum) 0;
+}
+
+static void APIENTRY noopDeleteFramebuffersEXT(GLsizei n, const GLuint *framebuffers)
+{
+ noop_warn("glDeleteFramebuffersEXT");
+}
+
+static void APIENTRY noopDeleteRenderbuffersEXT(GLsizei n, const GLuint *renderbuffers)
+{
+ noop_warn("glDeleteRenderbuffersEXT");
+}
+
+static void APIENTRY noopFramebufferRenderbufferEXT(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer)
+{
+ noop_warn("glFramebufferRenderbufferEXT");
+}
+
+static void APIENTRY noopFramebufferTexture1DEXT(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level)
+{
+ noop_warn("glFramebufferTexture1DEXT");
+}
+
+static void APIENTRY noopFramebufferTexture2DEXT(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level)
+{
+ noop_warn("glFramebufferTexture2DEXT");
+}
+
+static void APIENTRY noopFramebufferTexture3DEXT(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset)
+{
+ noop_warn("glFramebufferTexture3DEXT");
+}
+
+static void APIENTRY noopGenFramebuffersEXT(GLsizei n, GLuint *framebuffers)
+{
+ noop_warn("glGenFramebuffersEXT");
+}
+
+static void APIENTRY noopGenRenderbuffersEXT(GLsizei n, GLuint *renderbuffers)
+{
+ noop_warn("glGenRenderbuffersEXT");
+}
+
+static void APIENTRY noopGenerateMipmapEXT(GLenum target)
+{
+ noop_warn("glGenerateMipmapEXT");
+}
+
+static void APIENTRY noopGetFramebufferAttachmentParameterivEXT(GLenum target, GLenum attachment, GLenum pname, GLint *params)
+{
+ noop_warn("glGetFramebufferAttachmentParameterivEXT");
+}
+
+static void APIENTRY noopGetRenderbufferParameterivEXT(GLenum target, GLenum pname, GLint *params)
+{
+ noop_warn("glGetRenderbufferParameterivEXT");
+}
+
+static GLboolean APIENTRY noopIsFramebufferEXT(GLuint framebuffer)
+{
+ noop_warn("glIsFramebufferEXT");
+ return (GLboolean) 0;
+}
+
+static GLboolean APIENTRY noopIsRenderbufferEXT(GLuint renderbuffer)
+{
+ noop_warn("glIsRenderbufferEXT");
+ return (GLboolean) 0;
+}
+
+static void APIENTRY noopRenderbufferStorageEXT(GLenum target, GLenum internalformat, GLsizei width, GLsizei height)
+{
+ noop_warn("glRenderbufferStorageEXT");
+}
+
+static void APIENTRY noopBlitFramebufferEXT(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter)
+{
+ noop_warn("glBlitFramebufferEXT");
+}
+
+static void APIENTRY noopBufferParameteriAPPLE(GLenum target, GLenum pname, GLint param)
+{
+ noop_warn("glBufferParameteriAPPLE");
+}
+
+static void APIENTRY noopFlushMappedBufferRangeAPPLE(GLenum target, GLintptr offset, GLsizeiptr size)
+{
+ noop_warn("glFlushMappedBufferRangeAPPLE");
+}
+
+static void APIENTRY noopBindFragDataLocationEXT(GLuint program, GLuint colorNumber, const GLchar *name)
+{
+ noop_warn("glBindFragDataLocationEXT");
+}
+
+static GLint APIENTRY noopGetFragDataLocationEXT(GLuint program, const GLchar *name)
+{
+ noop_warn("glGetFragDataLocationEXT");
+ return (GLint) 0;
+}
+
+static void APIENTRY noopGetUniformuivEXT(GLuint program, GLint location, GLuint *params)
+{
+ noop_warn("glGetUniformuivEXT");
+}
+
+static void APIENTRY noopGetVertexAttribIivEXT(GLuint index, GLenum pname, GLint *params)
+{
+ noop_warn("glGetVertexAttribIivEXT");
+}
+
+static void APIENTRY noopGetVertexAttribIuivEXT(GLuint index, GLenum pname, GLuint *params)
+{
+ noop_warn("glGetVertexAttribIuivEXT");
+}
+
+static void APIENTRY noopUniform1uiEXT(GLint location, GLuint x)
+{
+ noop_warn("glUniform1uiEXT");
+}
+
+static void APIENTRY noopUniform1uivEXT(GLint location, GLsizei count, const GLuint *value)
+{
+ noop_warn("glUniform1uivEXT");
+}
+
+static void APIENTRY noopUniform2uiEXT(GLint location, GLuint x, GLuint y)
+{
+ noop_warn("glUniform2uiEXT");
+}
+
+static void APIENTRY noopUniform2uivEXT(GLint location, GLsizei count, const GLuint *value)
+{
+ noop_warn("glUniform2uivEXT");
+}
+
+static void APIENTRY noopUniform3uiEXT(GLint location, GLuint x, GLuint y, GLuint z)
+{
+ noop_warn("glUniform3uiEXT");
+}
+
+static void APIENTRY noopUniform3uivEXT(GLint location, GLsizei count, const GLuint *value)
+{
+ noop_warn("glUniform3uivEXT");
+}
+
+static void APIENTRY noopUniform4uiEXT(GLint location, GLuint x, GLuint y, GLuint z, GLuint w)
+{
+ noop_warn("glUniform4uiEXT");
+}
+
+static void APIENTRY noopUniform4uivEXT(GLint location, GLsizei count, const GLuint *value)
+{
+ noop_warn("glUniform4uivEXT");
+}
+
+static void APIENTRY noopVertexAttribI1iEXT(GLuint index, GLint x)
+{
+ noop_warn("glVertexAttribI1iEXT");
+}
+
+static void APIENTRY noopVertexAttribI1ivEXT(GLuint index, const GLint *v)
+{
+ noop_warn("glVertexAttribI1ivEXT");
+}
+
+static void APIENTRY noopVertexAttribI1uiEXT(GLuint index, GLuint x)
+{
+ noop_warn("glVertexAttribI1uiEXT");
+}
+
+static void APIENTRY noopVertexAttribI1uivEXT(GLuint index, const GLuint *v)
+{
+ noop_warn("glVertexAttribI1uivEXT");
+}
+
+static void APIENTRY noopVertexAttribI2iEXT(GLuint index, GLint x, GLint y)
+{
+ noop_warn("glVertexAttribI2iEXT");
+}
+
+static void APIENTRY noopVertexAttribI2ivEXT(GLuint index, const GLint *v)
+{
+ noop_warn("glVertexAttribI2ivEXT");
+}
+
+static void APIENTRY noopVertexAttribI2uiEXT(GLuint index, GLuint x, GLuint y)
+{
+ noop_warn("glVertexAttribI2uiEXT");
+}
+
+static void APIENTRY noopVertexAttribI2uivEXT(GLuint index, const GLuint *v)
+{
+ noop_warn("glVertexAttribI2uivEXT");
+}
+
+static void APIENTRY noopVertexAttribI3iEXT(GLuint index, GLint x, GLint y, GLint z)
+{
+ noop_warn("glVertexAttribI3iEXT");
+}
+
+static void APIENTRY noopVertexAttribI3ivEXT(GLuint index, const GLint *v)
+{
+ noop_warn("glVertexAttribI3ivEXT");
+}
+
+static void APIENTRY noopVertexAttribI3uiEXT(GLuint index, GLuint x, GLuint y, GLuint z)
+{
+ noop_warn("glVertexAttribI3uiEXT");
+}
+
+static void APIENTRY noopVertexAttribI3uivEXT(GLuint index, const GLuint *v)
+{
+ noop_warn("glVertexAttribI3uivEXT");
+}
+
+static void APIENTRY noopVertexAttribI4bvEXT(GLuint index, const GLbyte *v)
+{
+ noop_warn("glVertexAttribI4bvEXT");
+}
+
+static void APIENTRY noopVertexAttribI4iEXT(GLuint index, GLint x, GLint y, GLint z, GLint w)
+{
+ noop_warn("glVertexAttribI4iEXT");
+}
+
+static void APIENTRY noopVertexAttribI4ivEXT(GLuint index, const GLint *v)
+{
+ noop_warn("glVertexAttribI4ivEXT");
+}
+
+static void APIENTRY noopVertexAttribI4svEXT(GLuint index, const GLshort *v)
+{
+ noop_warn("glVertexAttribI4svEXT");
+}
+
+static void APIENTRY noopVertexAttribI4ubvEXT(GLuint index, const GLubyte *v)
+{
+ noop_warn("glVertexAttribI4ubvEXT");
+}
+
+static void APIENTRY noopVertexAttribI4uiEXT(GLuint index, GLuint x, GLuint y, GLuint z, GLuint w)
+{
+ noop_warn("glVertexAttribI4uiEXT");
+}
+
+static void APIENTRY noopVertexAttribI4uivEXT(GLuint index, const GLuint *v)
+{
+ noop_warn("glVertexAttribI4uivEXT");
+}
+
+static void APIENTRY noopVertexAttribI4usvEXT(GLuint index, const GLushort *v)
+{
+ noop_warn("glVertexAttribI4usvEXT");
+}
+
+static void APIENTRY noopVertexAttribIPointerEXT(GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer)
+{
+ noop_warn("glVertexAttribIPointerEXT");
+}
+
+static void APIENTRY noopFramebufferTextureLayerEXT(GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer)
+{
+ noop_warn("glFramebufferTextureLayerEXT");
+}
+
+static void APIENTRY noopColorMaskIndexedEXT(GLuint buf, GLboolean r, GLboolean g, GLboolean b, GLboolean a)
+{
+ noop_warn("glColorMaskIndexedEXT");
+}
+
+static void APIENTRY noopDisableIndexedEXT(GLenum target, GLuint index)
+{
+ noop_warn("glDisableIndexedEXT");
+}
+
+static void APIENTRY noopEnableIndexedEXT(GLenum target, GLuint index)
+{
+ noop_warn("glEnableIndexedEXT");
+}
+
+static void APIENTRY noopGetBooleanIndexedvEXT(GLenum value, GLuint index, GLboolean *data)
+{
+ noop_warn("glGetBooleanIndexedvEXT");
+}
+
+static void APIENTRY noopGetIntegerIndexedvEXT(GLenum value, GLuint index, GLint *data)
+{
+ noop_warn("glGetIntegerIndexedvEXT");
+}
+
+static GLboolean APIENTRY noopIsEnabledIndexedEXT(GLenum target, GLuint index)
+{
+ noop_warn("glIsEnabledIndexedEXT");
+ return (GLboolean) 0;
+}
+
+static void APIENTRY noopClearColorIiEXT(GLint r, GLint g, GLint b, GLint a)
+{
+ noop_warn("glClearColorIiEXT");
+}
+
+static void APIENTRY noopClearColorIuiEXT(GLuint r, GLuint g, GLuint b, GLuint a)
+{
+ noop_warn("glClearColorIuiEXT");
+}
+
+static void APIENTRY noopGetTexParameterIivEXT(GLenum target, GLenum pname, GLint *params)
+{
+ noop_warn("glGetTexParameterIivEXT");
+}
+
+static void APIENTRY noopGetTexParameterIuivEXT(GLenum target, GLenum pname, GLuint *params)
+{
+ noop_warn("glGetTexParameterIuivEXT");
+}
+
+static void APIENTRY noopTexParameterIivEXT(GLenum target, GLenum pname, const GLint *params)
+{
+ noop_warn("glTexParameterIivEXT");
+}
+
+static void APIENTRY noopTexParameterIuivEXT(GLenum target, GLenum pname, const GLuint *params)
+{
+ noop_warn("glTexParameterIuivEXT");
+}
+
+static void APIENTRY noopBeginConditionalRenderNV(GLuint query, GLenum mode)
+{
+ noop_warn("glBeginConditionalRenderNV");
+}
+
+static void APIENTRY noopEndConditionalRenderNV(void)
+{
+ noop_warn("glEndConditionalRenderNV");
+}
+
+static void APIENTRY noopBeginTransformFeedbackEXT(GLenum mode)
+{
+ noop_warn("glBeginTransformFeedbackEXT");
+}
+
+static void APIENTRY noopBindBufferBaseEXT(GLenum target, GLuint index, GLuint buffer)
+{
+ noop_warn("glBindBufferBaseEXT");
+}
+
+static void APIENTRY noopBindBufferOffsetEXT(GLenum target, GLuint index, GLuint buffer, GLintptr offset)
+{
+ noop_warn("glBindBufferOffsetEXT");
+}
+
+static void APIENTRY noopBindBufferRangeEXT(GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size)
+{
+ noop_warn("glBindBufferRangeEXT");
+}
+
+static void APIENTRY noopEndTransformFeedbackEXT(void)
+{
+ noop_warn("glEndTransformFeedbackEXT");
+}
+
+static void APIENTRY noopGetTransformFeedbackVaryingEXT(GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name)
+{
+ noop_warn("glGetTransformFeedbackVaryingEXT");
+}
+
+static void APIENTRY noopTransformFeedbackVaryingsEXT(GLuint program, GLsizei count, const char **varyings, GLenum bufferMode)
+{
+ noop_warn("glTransformFeedbackVaryingsEXT");
+}
+
+static void APIENTRY noopProvokingVertexEXT(GLenum mode)
+{
+ noop_warn("glProvokingVertexEXT");
+}
+
+static void APIENTRY noopGetTexParameterPointervAPPLE(GLenum target, GLenum pname, GLvoid **params)
+{
+ noop_warn("glGetTexParameterPointervAPPLE");
+}
+
+static void APIENTRY noopTextureRangeAPPLE(GLenum target, GLsizei length, GLvoid *pointer)
+{
+ noop_warn("glTextureRangeAPPLE");
+}
+
+static void APIENTRY noopGetObjectParameterivAPPLE(GLenum objectType, GLuint name, GLenum pname, GLint *value)
+{
+ noop_warn("glGetObjectParameterivAPPLE");
+}
+
+static GLenum APIENTRY noopObjectPurgeableAPPLE(GLenum objectType, GLuint name, GLenum option)
+{
+ noop_warn("glObjectPurgeableAPPLE");
+ return (GLenum) 0;
+}
+
+static GLenum APIENTRY noopObjectUnpurgeableAPPLE(GLenum objectType, GLuint name, GLenum option)
+{
+ noop_warn("glObjectUnpurgeableAPPLE");
+ return (GLenum) 0;
+}
+
+static void APIENTRY noopActiveProgramEXT(GLuint program)
+{
+ noop_warn("glActiveProgramEXT");
+}
+
+static GLuint APIENTRY noopCreateShaderProgramEXT(GLenum type, const GLchar *string)
+{
+ noop_warn("glCreateShaderProgramEXT");
+ return (GLuint) 0;
+}
+
+static void APIENTRY noopUseShaderProgramEXT(GLenum type, GLuint program)
+{
+ noop_warn("glUseShaderProgramEXT");
+}
+
+static void APIENTRY noopTextureBarrierNV(void)
+{
+ noop_warn("glTextureBarrierNV");
+}
+
+static void APIENTRY noopStencilFuncSeparateATI(GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask)
+{
+ noop_warn("glStencilFuncSeparateATI");
+}
+
+static void APIENTRY noopProgramEnvParameters4fvEXT(GLenum target, GLuint index, GLsizei count, const GLfloat *params)
+{
+ noop_warn("glProgramEnvParameters4fvEXT");
+}
+
+static void APIENTRY noopProgramLocalParameters4fvEXT(GLenum target, GLuint index, GLsizei count, const GLfloat *params)
+{
+ noop_warn("glProgramLocalParameters4fvEXT");
+}
+
+static void APIENTRY noopGetQueryObjecti64vEXT(GLuint id, GLenum pname, GLint64EXT *params)
+{
+ noop_warn("glGetQueryObjecti64vEXT");
+}
+
+static void APIENTRY noopGetQueryObjectui64vEXT(GLuint id, GLenum pname, GLuint64EXT *params)
+{
+ noop_warn("glGetQueryObjectui64vEXT");
+}
+
+static void APIENTRY noopEGLImageTargetRenderbufferStorageOES(GLenum target, GLvoid *writeOffset)
+{
+ noop_warn("glEGLImageTargetRenderbufferStorageOES");
+}
+
+static void APIENTRY noopEGLImageTargetTexture2DOES(GLenum target, GLvoid *writeOffset)
+{
+ noop_warn("glEGLImageTargetTexture2DOES");
+}
+
+const mapi_func table_noop_array[] = {
+ (mapi_func) noopNewList,
+ (mapi_func) noopEndList,
+ (mapi_func) noopCallList,
+ (mapi_func) noopCallLists,
+ (mapi_func) noopDeleteLists,
+ (mapi_func) noopGenLists,
+ (mapi_func) noopListBase,
+ (mapi_func) noopBegin,
+ (mapi_func) noopBitmap,
+ (mapi_func) noopColor3b,
+ (mapi_func) noopColor3bv,
+ (mapi_func) noopColor3d,
+ (mapi_func) noopColor3dv,
+ (mapi_func) noopColor3f,
+ (mapi_func) noopColor3fv,
+ (mapi_func) noopColor3i,
+ (mapi_func) noopColor3iv,
+ (mapi_func) noopColor3s,
+ (mapi_func) noopColor3sv,
+ (mapi_func) noopColor3ub,
+ (mapi_func) noopColor3ubv,
+ (mapi_func) noopColor3ui,
+ (mapi_func) noopColor3uiv,
+ (mapi_func) noopColor3us,
+ (mapi_func) noopColor3usv,
+ (mapi_func) noopColor4b,
+ (mapi_func) noopColor4bv,
+ (mapi_func) noopColor4d,
+ (mapi_func) noopColor4dv,
+ (mapi_func) noopColor4f,
+ (mapi_func) noopColor4fv,
+ (mapi_func) noopColor4i,
+ (mapi_func) noopColor4iv,
+ (mapi_func) noopColor4s,
+ (mapi_func) noopColor4sv,
+ (mapi_func) noopColor4ub,
+ (mapi_func) noopColor4ubv,
+ (mapi_func) noopColor4ui,
+ (mapi_func) noopColor4uiv,
+ (mapi_func) noopColor4us,
+ (mapi_func) noopColor4usv,
+ (mapi_func) noopEdgeFlag,
+ (mapi_func) noopEdgeFlagv,
+ (mapi_func) noopEnd,
+ (mapi_func) noopIndexd,
+ (mapi_func) noopIndexdv,
+ (mapi_func) noopIndexf,
+ (mapi_func) noopIndexfv,
+ (mapi_func) noopIndexi,
+ (mapi_func) noopIndexiv,
+ (mapi_func) noopIndexs,
+ (mapi_func) noopIndexsv,
+ (mapi_func) noopNormal3b,
+ (mapi_func) noopNormal3bv,
+ (mapi_func) noopNormal3d,
+ (mapi_func) noopNormal3dv,
+ (mapi_func) noopNormal3f,
+ (mapi_func) noopNormal3fv,
+ (mapi_func) noopNormal3i,
+ (mapi_func) noopNormal3iv,
+ (mapi_func) noopNormal3s,
+ (mapi_func) noopNormal3sv,
+ (mapi_func) noopRasterPos2d,
+ (mapi_func) noopRasterPos2dv,
+ (mapi_func) noopRasterPos2f,
+ (mapi_func) noopRasterPos2fv,
+ (mapi_func) noopRasterPos2i,
+ (mapi_func) noopRasterPos2iv,
+ (mapi_func) noopRasterPos2s,
+ (mapi_func) noopRasterPos2sv,
+ (mapi_func) noopRasterPos3d,
+ (mapi_func) noopRasterPos3dv,
+ (mapi_func) noopRasterPos3f,
+ (mapi_func) noopRasterPos3fv,
+ (mapi_func) noopRasterPos3i,
+ (mapi_func) noopRasterPos3iv,
+ (mapi_func) noopRasterPos3s,
+ (mapi_func) noopRasterPos3sv,
+ (mapi_func) noopRasterPos4d,
+ (mapi_func) noopRasterPos4dv,
+ (mapi_func) noopRasterPos4f,
+ (mapi_func) noopRasterPos4fv,
+ (mapi_func) noopRasterPos4i,
+ (mapi_func) noopRasterPos4iv,
+ (mapi_func) noopRasterPos4s,
+ (mapi_func) noopRasterPos4sv,
+ (mapi_func) noopRectd,
+ (mapi_func) noopRectdv,
+ (mapi_func) noopRectf,
+ (mapi_func) noopRectfv,
+ (mapi_func) noopRecti,
+ (mapi_func) noopRectiv,
+ (mapi_func) noopRects,
+ (mapi_func) noopRectsv,
+ (mapi_func) noopTexCoord1d,
+ (mapi_func) noopTexCoord1dv,
+ (mapi_func) noopTexCoord1f,
+ (mapi_func) noopTexCoord1fv,
+ (mapi_func) noopTexCoord1i,
+ (mapi_func) noopTexCoord1iv,
+ (mapi_func) noopTexCoord1s,
+ (mapi_func) noopTexCoord1sv,
+ (mapi_func) noopTexCoord2d,
+ (mapi_func) noopTexCoord2dv,
+ (mapi_func) noopTexCoord2f,
+ (mapi_func) noopTexCoord2fv,
+ (mapi_func) noopTexCoord2i,
+ (mapi_func) noopTexCoord2iv,
+ (mapi_func) noopTexCoord2s,
+ (mapi_func) noopTexCoord2sv,
+ (mapi_func) noopTexCoord3d,
+ (mapi_func) noopTexCoord3dv,
+ (mapi_func) noopTexCoord3f,
+ (mapi_func) noopTexCoord3fv,
+ (mapi_func) noopTexCoord3i,
+ (mapi_func) noopTexCoord3iv,
+ (mapi_func) noopTexCoord3s,
+ (mapi_func) noopTexCoord3sv,
+ (mapi_func) noopTexCoord4d,
+ (mapi_func) noopTexCoord4dv,
+ (mapi_func) noopTexCoord4f,
+ (mapi_func) noopTexCoord4fv,
+ (mapi_func) noopTexCoord4i,
+ (mapi_func) noopTexCoord4iv,
+ (mapi_func) noopTexCoord4s,
+ (mapi_func) noopTexCoord4sv,
+ (mapi_func) noopVertex2d,
+ (mapi_func) noopVertex2dv,
+ (mapi_func) noopVertex2f,
+ (mapi_func) noopVertex2fv,
+ (mapi_func) noopVertex2i,
+ (mapi_func) noopVertex2iv,
+ (mapi_func) noopVertex2s,
+ (mapi_func) noopVertex2sv,
+ (mapi_func) noopVertex3d,
+ (mapi_func) noopVertex3dv,
+ (mapi_func) noopVertex3f,
+ (mapi_func) noopVertex3fv,
+ (mapi_func) noopVertex3i,
+ (mapi_func) noopVertex3iv,
+ (mapi_func) noopVertex3s,
+ (mapi_func) noopVertex3sv,
+ (mapi_func) noopVertex4d,
+ (mapi_func) noopVertex4dv,
+ (mapi_func) noopVertex4f,
+ (mapi_func) noopVertex4fv,
+ (mapi_func) noopVertex4i,
+ (mapi_func) noopVertex4iv,
+ (mapi_func) noopVertex4s,
+ (mapi_func) noopVertex4sv,
+ (mapi_func) noopClipPlane,
+ (mapi_func) noopColorMaterial,
+ (mapi_func) noopCullFace,
+ (mapi_func) noopFogf,
+ (mapi_func) noopFogfv,
+ (mapi_func) noopFogi,
+ (mapi_func) noopFogiv,
+ (mapi_func) noopFrontFace,
+ (mapi_func) noopHint,
+ (mapi_func) noopLightf,
+ (mapi_func) noopLightfv,
+ (mapi_func) noopLighti,
+ (mapi_func) noopLightiv,
+ (mapi_func) noopLightModelf,
+ (mapi_func) noopLightModelfv,
+ (mapi_func) noopLightModeli,
+ (mapi_func) noopLightModeliv,
+ (mapi_func) noopLineStipple,
+ (mapi_func) noopLineWidth,
+ (mapi_func) noopMaterialf,
+ (mapi_func) noopMaterialfv,
+ (mapi_func) noopMateriali,
+ (mapi_func) noopMaterialiv,
+ (mapi_func) noopPointSize,
+ (mapi_func) noopPolygonMode,
+ (mapi_func) noopPolygonStipple,
+ (mapi_func) noopScissor,
+ (mapi_func) noopShadeModel,
+ (mapi_func) noopTexParameterf,
+ (mapi_func) noopTexParameterfv,
+ (mapi_func) noopTexParameteri,
+ (mapi_func) noopTexParameteriv,
+ (mapi_func) noopTexImage1D,
+ (mapi_func) noopTexImage2D,
+ (mapi_func) noopTexEnvf,
+ (mapi_func) noopTexEnvfv,
+ (mapi_func) noopTexEnvi,
+ (mapi_func) noopTexEnviv,
+ (mapi_func) noopTexGend,
+ (mapi_func) noopTexGendv,
+ (mapi_func) noopTexGenf,
+ (mapi_func) noopTexGenfv,
+ (mapi_func) noopTexGeni,
+ (mapi_func) noopTexGeniv,
+ (mapi_func) noopFeedbackBuffer,
+ (mapi_func) noopSelectBuffer,
+ (mapi_func) noopRenderMode,
+ (mapi_func) noopInitNames,
+ (mapi_func) noopLoadName,
+ (mapi_func) noopPassThrough,
+ (mapi_func) noopPopName,
+ (mapi_func) noopPushName,
+ (mapi_func) noopDrawBuffer,
+ (mapi_func) noopClear,
+ (mapi_func) noopClearAccum,
+ (mapi_func) noopClearIndex,
+ (mapi_func) noopClearColor,
+ (mapi_func) noopClearStencil,
+ (mapi_func) noopClearDepth,
+ (mapi_func) noopStencilMask,
+ (mapi_func) noopColorMask,
+ (mapi_func) noopDepthMask,
+ (mapi_func) noopIndexMask,
+ (mapi_func) noopAccum,
+ (mapi_func) noopDisable,
+ (mapi_func) noopEnable,
+ (mapi_func) noopFinish,
+ (mapi_func) noopFlush,
+ (mapi_func) noopPopAttrib,
+ (mapi_func) noopPushAttrib,
+ (mapi_func) noopMap1d,
+ (mapi_func) noopMap1f,
+ (mapi_func) noopMap2d,
+ (mapi_func) noopMap2f,
+ (mapi_func) noopMapGrid1d,
+ (mapi_func) noopMapGrid1f,
+ (mapi_func) noopMapGrid2d,
+ (mapi_func) noopMapGrid2f,
+ (mapi_func) noopEvalCoord1d,
+ (mapi_func) noopEvalCoord1dv,
+ (mapi_func) noopEvalCoord1f,
+ (mapi_func) noopEvalCoord1fv,
+ (mapi_func) noopEvalCoord2d,
+ (mapi_func) noopEvalCoord2dv,
+ (mapi_func) noopEvalCoord2f,
+ (mapi_func) noopEvalCoord2fv,
+ (mapi_func) noopEvalMesh1,
+ (mapi_func) noopEvalPoint1,
+ (mapi_func) noopEvalMesh2,
+ (mapi_func) noopEvalPoint2,
+ (mapi_func) noopAlphaFunc,
+ (mapi_func) noopBlendFunc,
+ (mapi_func) noopLogicOp,
+ (mapi_func) noopStencilFunc,
+ (mapi_func) noopStencilOp,
+ (mapi_func) noopDepthFunc,
+ (mapi_func) noopPixelZoom,
+ (mapi_func) noopPixelTransferf,
+ (mapi_func) noopPixelTransferi,
+ (mapi_func) noopPixelStoref,
+ (mapi_func) noopPixelStorei,
+ (mapi_func) noopPixelMapfv,
+ (mapi_func) noopPixelMapuiv,
+ (mapi_func) noopPixelMapusv,
+ (mapi_func) noopReadBuffer,
+ (mapi_func) noopCopyPixels,
+ (mapi_func) noopReadPixels,
+ (mapi_func) noopDrawPixels,
+ (mapi_func) noopGetBooleanv,
+ (mapi_func) noopGetClipPlane,
+ (mapi_func) noopGetDoublev,
+ (mapi_func) noopGetError,
+ (mapi_func) noopGetFloatv,
+ (mapi_func) noopGetIntegerv,
+ (mapi_func) noopGetLightfv,
+ (mapi_func) noopGetLightiv,
+ (mapi_func) noopGetMapdv,
+ (mapi_func) noopGetMapfv,
+ (mapi_func) noopGetMapiv,
+ (mapi_func) noopGetMaterialfv,
+ (mapi_func) noopGetMaterialiv,
+ (mapi_func) noopGetPixelMapfv,
+ (mapi_func) noopGetPixelMapuiv,
+ (mapi_func) noopGetPixelMapusv,
+ (mapi_func) noopGetPolygonStipple,
+ (mapi_func) noopGetString,
+ (mapi_func) noopGetTexEnvfv,
+ (mapi_func) noopGetTexEnviv,
+ (mapi_func) noopGetTexGendv,
+ (mapi_func) noopGetTexGenfv,
+ (mapi_func) noopGetTexGeniv,
+ (mapi_func) noopGetTexImage,
+ (mapi_func) noopGetTexParameterfv,
+ (mapi_func) noopGetTexParameteriv,
+ (mapi_func) noopGetTexLevelParameterfv,
+ (mapi_func) noopGetTexLevelParameteriv,
+ (mapi_func) noopIsEnabled,
+ (mapi_func) noopIsList,
+ (mapi_func) noopDepthRange,
+ (mapi_func) noopFrustum,
+ (mapi_func) noopLoadIdentity,
+ (mapi_func) noopLoadMatrixf,
+ (mapi_func) noopLoadMatrixd,
+ (mapi_func) noopMatrixMode,
+ (mapi_func) noopMultMatrixf,
+ (mapi_func) noopMultMatrixd,
+ (mapi_func) noopOrtho,
+ (mapi_func) noopPopMatrix,
+ (mapi_func) noopPushMatrix,
+ (mapi_func) noopRotated,
+ (mapi_func) noopRotatef,
+ (mapi_func) noopScaled,
+ (mapi_func) noopScalef,
+ (mapi_func) noopTranslated,
+ (mapi_func) noopTranslatef,
+ (mapi_func) noopViewport,
+ (mapi_func) noopArrayElement,
+ (mapi_func) noopBindTexture,
+ (mapi_func) noopColorPointer,
+ (mapi_func) noopDisableClientState,
+ (mapi_func) noopDrawArrays,
+ (mapi_func) noopDrawElements,
+ (mapi_func) noopEdgeFlagPointer,
+ (mapi_func) noopEnableClientState,
+ (mapi_func) noopIndexPointer,
+ (mapi_func) noopIndexub,
+ (mapi_func) noopIndexubv,
+ (mapi_func) noopInterleavedArrays,
+ (mapi_func) noopNormalPointer,
+ (mapi_func) noopPolygonOffset,
+ (mapi_func) noopTexCoordPointer,
+ (mapi_func) noopVertexPointer,
+ (mapi_func) noopAreTexturesResident,
+ (mapi_func) noopCopyTexImage1D,
+ (mapi_func) noopCopyTexImage2D,
+ (mapi_func) noopCopyTexSubImage1D,
+ (mapi_func) noopCopyTexSubImage2D,
+ (mapi_func) noopDeleteTextures,
+ (mapi_func) noopGenTextures,
+ (mapi_func) noopGetPointerv,
+ (mapi_func) noopIsTexture,
+ (mapi_func) noopPrioritizeTextures,
+ (mapi_func) noopTexSubImage1D,
+ (mapi_func) noopTexSubImage2D,
+ (mapi_func) noopPopClientAttrib,
+ (mapi_func) noopPushClientAttrib,
+ (mapi_func) noopBlendColor,
+ (mapi_func) noopBlendEquation,
+ (mapi_func) noopDrawRangeElements,
+ (mapi_func) noopColorTable,
+ (mapi_func) noopColorTableParameterfv,
+ (mapi_func) noopColorTableParameteriv,
+ (mapi_func) noopCopyColorTable,
+ (mapi_func) noopGetColorTable,
+ (mapi_func) noopGetColorTableParameterfv,
+ (mapi_func) noopGetColorTableParameteriv,
+ (mapi_func) noopColorSubTable,
+ (mapi_func) noopCopyColorSubTable,
+ (mapi_func) noopConvolutionFilter1D,
+ (mapi_func) noopConvolutionFilter2D,
+ (mapi_func) noopConvolutionParameterf,
+ (mapi_func) noopConvolutionParameterfv,
+ (mapi_func) noopConvolutionParameteri,
+ (mapi_func) noopConvolutionParameteriv,
+ (mapi_func) noopCopyConvolutionFilter1D,
+ (mapi_func) noopCopyConvolutionFilter2D,
+ (mapi_func) noopGetConvolutionFilter,
+ (mapi_func) noopGetConvolutionParameterfv,
+ (mapi_func) noopGetConvolutionParameteriv,
+ (mapi_func) noopGetSeparableFilter,
+ (mapi_func) noopSeparableFilter2D,
+ (mapi_func) noopGetHistogram,
+ (mapi_func) noopGetHistogramParameterfv,
+ (mapi_func) noopGetHistogramParameteriv,
+ (mapi_func) noopGetMinmax,
+ (mapi_func) noopGetMinmaxParameterfv,
+ (mapi_func) noopGetMinmaxParameteriv,
+ (mapi_func) noopHistogram,
+ (mapi_func) noopMinmax,
+ (mapi_func) noopResetHistogram,
+ (mapi_func) noopResetMinmax,
+ (mapi_func) noopTexImage3D,
+ (mapi_func) noopTexSubImage3D,
+ (mapi_func) noopCopyTexSubImage3D,
+ (mapi_func) noopActiveTextureARB,
+ (mapi_func) noopClientActiveTextureARB,
+ (mapi_func) noopMultiTexCoord1dARB,
+ (mapi_func) noopMultiTexCoord1dvARB,
+ (mapi_func) noopMultiTexCoord1fARB,
+ (mapi_func) noopMultiTexCoord1fvARB,
+ (mapi_func) noopMultiTexCoord1iARB,
+ (mapi_func) noopMultiTexCoord1ivARB,
+ (mapi_func) noopMultiTexCoord1sARB,
+ (mapi_func) noopMultiTexCoord1svARB,
+ (mapi_func) noopMultiTexCoord2dARB,
+ (mapi_func) noopMultiTexCoord2dvARB,
+ (mapi_func) noopMultiTexCoord2fARB,
+ (mapi_func) noopMultiTexCoord2fvARB,
+ (mapi_func) noopMultiTexCoord2iARB,
+ (mapi_func) noopMultiTexCoord2ivARB,
+ (mapi_func) noopMultiTexCoord2sARB,
+ (mapi_func) noopMultiTexCoord2svARB,
+ (mapi_func) noopMultiTexCoord3dARB,
+ (mapi_func) noopMultiTexCoord3dvARB,
+ (mapi_func) noopMultiTexCoord3fARB,
+ (mapi_func) noopMultiTexCoord3fvARB,
+ (mapi_func) noopMultiTexCoord3iARB,
+ (mapi_func) noopMultiTexCoord3ivARB,
+ (mapi_func) noopMultiTexCoord3sARB,
+ (mapi_func) noopMultiTexCoord3svARB,
+ (mapi_func) noopMultiTexCoord4dARB,
+ (mapi_func) noopMultiTexCoord4dvARB,
+ (mapi_func) noopMultiTexCoord4fARB,
+ (mapi_func) noopMultiTexCoord4fvARB,
+ (mapi_func) noopMultiTexCoord4iARB,
+ (mapi_func) noopMultiTexCoord4ivARB,
+ (mapi_func) noopMultiTexCoord4sARB,
+ (mapi_func) noopMultiTexCoord4svARB,
+ (mapi_func) noopAttachShader,
+ (mapi_func) noopCreateProgram,
+ (mapi_func) noopCreateShader,
+ (mapi_func) noopDeleteProgram,
+ (mapi_func) noopDeleteShader,
+ (mapi_func) noopDetachShader,
+ (mapi_func) noopGetAttachedShaders,
+ (mapi_func) noopGetProgramInfoLog,
+ (mapi_func) noopGetProgramiv,
+ (mapi_func) noopGetShaderInfoLog,
+ (mapi_func) noopGetShaderiv,
+ (mapi_func) noopIsProgram,
+ (mapi_func) noopIsShader,
+ (mapi_func) noopStencilFuncSeparate,
+ (mapi_func) noopStencilMaskSeparate,
+ (mapi_func) noopStencilOpSeparate,
+ (mapi_func) noopUniformMatrix2x3fv,
+ (mapi_func) noopUniformMatrix2x4fv,
+ (mapi_func) noopUniformMatrix3x2fv,
+ (mapi_func) noopUniformMatrix3x4fv,
+ (mapi_func) noopUniformMatrix4x2fv,
+ (mapi_func) noopUniformMatrix4x3fv,
+ (mapi_func) noopClampColor,
+ (mapi_func) noopClearBufferfi,
+ (mapi_func) noopClearBufferfv,
+ (mapi_func) noopClearBufferiv,
+ (mapi_func) noopClearBufferuiv,
+ (mapi_func) noopGetStringi,
+ (mapi_func) noopTexBuffer,
+ (mapi_func) noopFramebufferTexture,
+ (mapi_func) noopGetBufferParameteri64v,
+ (mapi_func) noopGetInteger64i_v,
+ (mapi_func) noopVertexAttribDivisor,
+ (mapi_func) noopLoadTransposeMatrixdARB,
+ (mapi_func) noopLoadTransposeMatrixfARB,
+ (mapi_func) noopMultTransposeMatrixdARB,
+ (mapi_func) noopMultTransposeMatrixfARB,
+ (mapi_func) noopSampleCoverageARB,
+ (mapi_func) noopCompressedTexImage1DARB,
+ (mapi_func) noopCompressedTexImage2DARB,
+ (mapi_func) noopCompressedTexImage3DARB,
+ (mapi_func) noopCompressedTexSubImage1DARB,
+ (mapi_func) noopCompressedTexSubImage2DARB,
+ (mapi_func) noopCompressedTexSubImage3DARB,
+ (mapi_func) noopGetCompressedTexImageARB,
+ (mapi_func) noopDisableVertexAttribArrayARB,
+ (mapi_func) noopEnableVertexAttribArrayARB,
+ (mapi_func) noopGetProgramEnvParameterdvARB,
+ (mapi_func) noopGetProgramEnvParameterfvARB,
+ (mapi_func) noopGetProgramLocalParameterdvARB,
+ (mapi_func) noopGetProgramLocalParameterfvARB,
+ (mapi_func) noopGetProgramStringARB,
+ (mapi_func) noopGetProgramivARB,
+ (mapi_func) noopGetVertexAttribdvARB,
+ (mapi_func) noopGetVertexAttribfvARB,
+ (mapi_func) noopGetVertexAttribivARB,
+ (mapi_func) noopProgramEnvParameter4dARB,
+ (mapi_func) noopProgramEnvParameter4dvARB,
+ (mapi_func) noopProgramEnvParameter4fARB,
+ (mapi_func) noopProgramEnvParameter4fvARB,
+ (mapi_func) noopProgramLocalParameter4dARB,
+ (mapi_func) noopProgramLocalParameter4dvARB,
+ (mapi_func) noopProgramLocalParameter4fARB,
+ (mapi_func) noopProgramLocalParameter4fvARB,
+ (mapi_func) noopProgramStringARB,
+ (mapi_func) noopVertexAttrib1dARB,
+ (mapi_func) noopVertexAttrib1dvARB,
+ (mapi_func) noopVertexAttrib1fARB,
+ (mapi_func) noopVertexAttrib1fvARB,
+ (mapi_func) noopVertexAttrib1sARB,
+ (mapi_func) noopVertexAttrib1svARB,
+ (mapi_func) noopVertexAttrib2dARB,
+ (mapi_func) noopVertexAttrib2dvARB,
+ (mapi_func) noopVertexAttrib2fARB,
+ (mapi_func) noopVertexAttrib2fvARB,
+ (mapi_func) noopVertexAttrib2sARB,
+ (mapi_func) noopVertexAttrib2svARB,
+ (mapi_func) noopVertexAttrib3dARB,
+ (mapi_func) noopVertexAttrib3dvARB,
+ (mapi_func) noopVertexAttrib3fARB,
+ (mapi_func) noopVertexAttrib3fvARB,
+ (mapi_func) noopVertexAttrib3sARB,
+ (mapi_func) noopVertexAttrib3svARB,
+ (mapi_func) noopVertexAttrib4NbvARB,
+ (mapi_func) noopVertexAttrib4NivARB,
+ (mapi_func) noopVertexAttrib4NsvARB,
+ (mapi_func) noopVertexAttrib4NubARB,
+ (mapi_func) noopVertexAttrib4NubvARB,
+ (mapi_func) noopVertexAttrib4NuivARB,
+ (mapi_func) noopVertexAttrib4NusvARB,
+ (mapi_func) noopVertexAttrib4bvARB,
+ (mapi_func) noopVertexAttrib4dARB,
+ (mapi_func) noopVertexAttrib4dvARB,
+ (mapi_func) noopVertexAttrib4fARB,
+ (mapi_func) noopVertexAttrib4fvARB,
+ (mapi_func) noopVertexAttrib4ivARB,
+ (mapi_func) noopVertexAttrib4sARB,
+ (mapi_func) noopVertexAttrib4svARB,
+ (mapi_func) noopVertexAttrib4ubvARB,
+ (mapi_func) noopVertexAttrib4uivARB,
+ (mapi_func) noopVertexAttrib4usvARB,
+ (mapi_func) noopVertexAttribPointerARB,
+ (mapi_func) noopBindBufferARB,
+ (mapi_func) noopBufferDataARB,
+ (mapi_func) noopBufferSubDataARB,
+ (mapi_func) noopDeleteBuffersARB,
+ (mapi_func) noopGenBuffersARB,
+ (mapi_func) noopGetBufferParameterivARB,
+ (mapi_func) noopGetBufferPointervARB,
+ (mapi_func) noopGetBufferSubDataARB,
+ (mapi_func) noopIsBufferARB,
+ (mapi_func) noopMapBufferARB,
+ (mapi_func) noopUnmapBufferARB,
+ (mapi_func) noopBeginQueryARB,
+ (mapi_func) noopDeleteQueriesARB,
+ (mapi_func) noopEndQueryARB,
+ (mapi_func) noopGenQueriesARB,
+ (mapi_func) noopGetQueryObjectivARB,
+ (mapi_func) noopGetQueryObjectuivARB,
+ (mapi_func) noopGetQueryivARB,
+ (mapi_func) noopIsQueryARB,
+ (mapi_func) noopAttachObjectARB,
+ (mapi_func) noopCompileShaderARB,
+ (mapi_func) noopCreateProgramObjectARB,
+ (mapi_func) noopCreateShaderObjectARB,
+ (mapi_func) noopDeleteObjectARB,
+ (mapi_func) noopDetachObjectARB,
+ (mapi_func) noopGetActiveUniformARB,
+ (mapi_func) noopGetAttachedObjectsARB,
+ (mapi_func) noopGetHandleARB,
+ (mapi_func) noopGetInfoLogARB,
+ (mapi_func) noopGetObjectParameterfvARB,
+ (mapi_func) noopGetObjectParameterivARB,
+ (mapi_func) noopGetShaderSourceARB,
+ (mapi_func) noopGetUniformLocationARB,
+ (mapi_func) noopGetUniformfvARB,
+ (mapi_func) noopGetUniformivARB,
+ (mapi_func) noopLinkProgramARB,
+ (mapi_func) noopShaderSourceARB,
+ (mapi_func) noopUniform1fARB,
+ (mapi_func) noopUniform1fvARB,
+ (mapi_func) noopUniform1iARB,
+ (mapi_func) noopUniform1ivARB,
+ (mapi_func) noopUniform2fARB,
+ (mapi_func) noopUniform2fvARB,
+ (mapi_func) noopUniform2iARB,
+ (mapi_func) noopUniform2ivARB,
+ (mapi_func) noopUniform3fARB,
+ (mapi_func) noopUniform3fvARB,
+ (mapi_func) noopUniform3iARB,
+ (mapi_func) noopUniform3ivARB,
+ (mapi_func) noopUniform4fARB,
+ (mapi_func) noopUniform4fvARB,
+ (mapi_func) noopUniform4iARB,
+ (mapi_func) noopUniform4ivARB,
+ (mapi_func) noopUniformMatrix2fvARB,
+ (mapi_func) noopUniformMatrix3fvARB,
+ (mapi_func) noopUniformMatrix4fvARB,
+ (mapi_func) noopUseProgramObjectARB,
+ (mapi_func) noopValidateProgramARB,
+ (mapi_func) noopBindAttribLocationARB,
+ (mapi_func) noopGetActiveAttribARB,
+ (mapi_func) noopGetAttribLocationARB,
+ (mapi_func) noopDrawBuffersARB,
+ (mapi_func) noopDrawArraysInstancedARB,
+ (mapi_func) noopDrawElementsInstancedARB,
+ (mapi_func) noopRenderbufferStorageMultisample,
+ (mapi_func) noopFramebufferTextureARB,
+ (mapi_func) noopFramebufferTextureFaceARB,
+ (mapi_func) noopProgramParameteriARB,
+ (mapi_func) noopVertexAttribDivisorARB,
+ (mapi_func) noopFlushMappedBufferRange,
+ (mapi_func) noopMapBufferRange,
+ (mapi_func) noopBindVertexArray,
+ (mapi_func) noopGenVertexArrays,
+ (mapi_func) noopCopyBufferSubData,
+ (mapi_func) noopClientWaitSync,
+ (mapi_func) noopDeleteSync,
+ (mapi_func) noopFenceSync,
+ (mapi_func) noopGetInteger64v,
+ (mapi_func) noopGetSynciv,
+ (mapi_func) noopIsSync,
+ (mapi_func) noopWaitSync,
+ (mapi_func) noopDrawElementsBaseVertex,
+ (mapi_func) noopDrawRangeElementsBaseVertex,
+ (mapi_func) noopMultiDrawElementsBaseVertex,
+ (mapi_func) noopBlendEquationSeparateiARB,
+ (mapi_func) noopBlendEquationiARB,
+ (mapi_func) noopBlendFuncSeparateiARB,
+ (mapi_func) noopBlendFunciARB,
+ (mapi_func) noopBindTransformFeedback,
+ (mapi_func) noopDeleteTransformFeedbacks,
+ (mapi_func) noopDrawTransformFeedback,
+ (mapi_func) noopGenTransformFeedbacks,
+ (mapi_func) noopIsTransformFeedback,
+ (mapi_func) noopPauseTransformFeedback,
+ (mapi_func) noopResumeTransformFeedback,
+ (mapi_func) noopClearDepthf,
+ (mapi_func) noopDepthRangef,
+ (mapi_func) noopGetShaderPrecisionFormat,
+ (mapi_func) noopReleaseShaderCompiler,
+ (mapi_func) noopShaderBinary,
+ (mapi_func) noopGetProgramBinary,
+ (mapi_func) noopProgramBinary,
+ (mapi_func) noopProgramParameteri,
+ (mapi_func) noopPolygonOffsetEXT,
+ (mapi_func) noopDrawTexfOES,
+ (mapi_func) noopDrawTexfvOES,
+ (mapi_func) noopDrawTexiOES,
+ (mapi_func) noopDrawTexivOES,
+ (mapi_func) noopDrawTexsOES,
+ (mapi_func) noopDrawTexsvOES,
+ (mapi_func) noopDrawTexxOES,
+ (mapi_func) noopDrawTexxvOES,
+ (mapi_func) noopPointSizePointerOES,
+ (mapi_func) noopGetPixelTexGenParameterfvSGIS,
+ (mapi_func) noopGetPixelTexGenParameterivSGIS,
+ (mapi_func) noopPixelTexGenParameterfSGIS,
+ (mapi_func) noopPixelTexGenParameterfvSGIS,
+ (mapi_func) noopPixelTexGenParameteriSGIS,
+ (mapi_func) noopPixelTexGenParameterivSGIS,
+ (mapi_func) noopQueryMatrixxOES,
+ (mapi_func) noopSampleMaskSGIS,
+ (mapi_func) noopSamplePatternSGIS,
+ (mapi_func) noopColorPointerEXT,
+ (mapi_func) noopEdgeFlagPointerEXT,
+ (mapi_func) noopIndexPointerEXT,
+ (mapi_func) noopNormalPointerEXT,
+ (mapi_func) noopTexCoordPointerEXT,
+ (mapi_func) noopVertexPointerEXT,
+ (mapi_func) noopPointParameterfEXT,
+ (mapi_func) noopPointParameterfvEXT,
+ (mapi_func) noopLockArraysEXT,
+ (mapi_func) noopUnlockArraysEXT,
+ (mapi_func) noopSecondaryColor3bEXT,
+ (mapi_func) noopSecondaryColor3bvEXT,
+ (mapi_func) noopSecondaryColor3dEXT,
+ (mapi_func) noopSecondaryColor3dvEXT,
+ (mapi_func) noopSecondaryColor3fEXT,
+ (mapi_func) noopSecondaryColor3fvEXT,
+ (mapi_func) noopSecondaryColor3iEXT,
+ (mapi_func) noopSecondaryColor3ivEXT,
+ (mapi_func) noopSecondaryColor3sEXT,
+ (mapi_func) noopSecondaryColor3svEXT,
+ (mapi_func) noopSecondaryColor3ubEXT,
+ (mapi_func) noopSecondaryColor3ubvEXT,
+ (mapi_func) noopSecondaryColor3uiEXT,
+ (mapi_func) noopSecondaryColor3uivEXT,
+ (mapi_func) noopSecondaryColor3usEXT,
+ (mapi_func) noopSecondaryColor3usvEXT,
+ (mapi_func) noopSecondaryColorPointerEXT,
+ (mapi_func) noopMultiDrawArraysEXT,
+ (mapi_func) noopMultiDrawElementsEXT,
+ (mapi_func) noopFogCoordPointerEXT,
+ (mapi_func) noopFogCoorddEXT,
+ (mapi_func) noopFogCoorddvEXT,
+ (mapi_func) noopFogCoordfEXT,
+ (mapi_func) noopFogCoordfvEXT,
+ (mapi_func) noopPixelTexGenSGIX,
+ (mapi_func) noopBlendFuncSeparateEXT,
+ (mapi_func) noopFlushVertexArrayRangeNV,
+ (mapi_func) noopVertexArrayRangeNV,
+ (mapi_func) noopCombinerInputNV,
+ (mapi_func) noopCombinerOutputNV,
+ (mapi_func) noopCombinerParameterfNV,
+ (mapi_func) noopCombinerParameterfvNV,
+ (mapi_func) noopCombinerParameteriNV,
+ (mapi_func) noopCombinerParameterivNV,
+ (mapi_func) noopFinalCombinerInputNV,
+ (mapi_func) noopGetCombinerInputParameterfvNV,
+ (mapi_func) noopGetCombinerInputParameterivNV,
+ (mapi_func) noopGetCombinerOutputParameterfvNV,
+ (mapi_func) noopGetCombinerOutputParameterivNV,
+ (mapi_func) noopGetFinalCombinerInputParameterfvNV,
+ (mapi_func) noopGetFinalCombinerInputParameterivNV,
+ (mapi_func) noopResizeBuffersMESA,
+ (mapi_func) noopWindowPos2dMESA,
+ (mapi_func) noopWindowPos2dvMESA,
+ (mapi_func) noopWindowPos2fMESA,
+ (mapi_func) noopWindowPos2fvMESA,
+ (mapi_func) noopWindowPos2iMESA,
+ (mapi_func) noopWindowPos2ivMESA,
+ (mapi_func) noopWindowPos2sMESA,
+ (mapi_func) noopWindowPos2svMESA,
+ (mapi_func) noopWindowPos3dMESA,
+ (mapi_func) noopWindowPos3dvMESA,
+ (mapi_func) noopWindowPos3fMESA,
+ (mapi_func) noopWindowPos3fvMESA,
+ (mapi_func) noopWindowPos3iMESA,
+ (mapi_func) noopWindowPos3ivMESA,
+ (mapi_func) noopWindowPos3sMESA,
+ (mapi_func) noopWindowPos3svMESA,
+ (mapi_func) noopWindowPos4dMESA,
+ (mapi_func) noopWindowPos4dvMESA,
+ (mapi_func) noopWindowPos4fMESA,
+ (mapi_func) noopWindowPos4fvMESA,
+ (mapi_func) noopWindowPos4iMESA,
+ (mapi_func) noopWindowPos4ivMESA,
+ (mapi_func) noopWindowPos4sMESA,
+ (mapi_func) noopWindowPos4svMESA,
+ (mapi_func) noopMultiModeDrawArraysIBM,
+ (mapi_func) noopMultiModeDrawElementsIBM,
+ (mapi_func) noopDeleteFencesNV,
+ (mapi_func) noopFinishFenceNV,
+ (mapi_func) noopGenFencesNV,
+ (mapi_func) noopGetFenceivNV,
+ (mapi_func) noopIsFenceNV,
+ (mapi_func) noopSetFenceNV,
+ (mapi_func) noopTestFenceNV,
+ (mapi_func) noopAreProgramsResidentNV,
+ (mapi_func) noopBindProgramNV,
+ (mapi_func) noopDeleteProgramsNV,
+ (mapi_func) noopExecuteProgramNV,
+ (mapi_func) noopGenProgramsNV,
+ (mapi_func) noopGetProgramParameterdvNV,
+ (mapi_func) noopGetProgramParameterfvNV,
+ (mapi_func) noopGetProgramStringNV,
+ (mapi_func) noopGetProgramivNV,
+ (mapi_func) noopGetTrackMatrixivNV,
+ (mapi_func) noopGetVertexAttribPointervNV,
+ (mapi_func) noopGetVertexAttribdvNV,
+ (mapi_func) noopGetVertexAttribfvNV,
+ (mapi_func) noopGetVertexAttribivNV,
+ (mapi_func) noopIsProgramNV,
+ (mapi_func) noopLoadProgramNV,
+ (mapi_func) noopProgramParameters4dvNV,
+ (mapi_func) noopProgramParameters4fvNV,
+ (mapi_func) noopRequestResidentProgramsNV,
+ (mapi_func) noopTrackMatrixNV,
+ (mapi_func) noopVertexAttrib1dNV,
+ (mapi_func) noopVertexAttrib1dvNV,
+ (mapi_func) noopVertexAttrib1fNV,
+ (mapi_func) noopVertexAttrib1fvNV,
+ (mapi_func) noopVertexAttrib1sNV,
+ (mapi_func) noopVertexAttrib1svNV,
+ (mapi_func) noopVertexAttrib2dNV,
+ (mapi_func) noopVertexAttrib2dvNV,
+ (mapi_func) noopVertexAttrib2fNV,
+ (mapi_func) noopVertexAttrib2fvNV,
+ (mapi_func) noopVertexAttrib2sNV,
+ (mapi_func) noopVertexAttrib2svNV,
+ (mapi_func) noopVertexAttrib3dNV,
+ (mapi_func) noopVertexAttrib3dvNV,
+ (mapi_func) noopVertexAttrib3fNV,
+ (mapi_func) noopVertexAttrib3fvNV,
+ (mapi_func) noopVertexAttrib3sNV,
+ (mapi_func) noopVertexAttrib3svNV,
+ (mapi_func) noopVertexAttrib4dNV,
+ (mapi_func) noopVertexAttrib4dvNV,
+ (mapi_func) noopVertexAttrib4fNV,
+ (mapi_func) noopVertexAttrib4fvNV,
+ (mapi_func) noopVertexAttrib4sNV,
+ (mapi_func) noopVertexAttrib4svNV,
+ (mapi_func) noopVertexAttrib4ubNV,
+ (mapi_func) noopVertexAttrib4ubvNV,
+ (mapi_func) noopVertexAttribPointerNV,
+ (mapi_func) noopVertexAttribs1dvNV,
+ (mapi_func) noopVertexAttribs1fvNV,
+ (mapi_func) noopVertexAttribs1svNV,
+ (mapi_func) noopVertexAttribs2dvNV,
+ (mapi_func) noopVertexAttribs2fvNV,
+ (mapi_func) noopVertexAttribs2svNV,
+ (mapi_func) noopVertexAttribs3dvNV,
+ (mapi_func) noopVertexAttribs3fvNV,
+ (mapi_func) noopVertexAttribs3svNV,
+ (mapi_func) noopVertexAttribs4dvNV,
+ (mapi_func) noopVertexAttribs4fvNV,
+ (mapi_func) noopVertexAttribs4svNV,
+ (mapi_func) noopVertexAttribs4ubvNV,
+ (mapi_func) noopGetTexBumpParameterfvATI,
+ (mapi_func) noopGetTexBumpParameterivATI,
+ (mapi_func) noopTexBumpParameterfvATI,
+ (mapi_func) noopTexBumpParameterivATI,
+ (mapi_func) noopAlphaFragmentOp1ATI,
+ (mapi_func) noopAlphaFragmentOp2ATI,
+ (mapi_func) noopAlphaFragmentOp3ATI,
+ (mapi_func) noopBeginFragmentShaderATI,
+ (mapi_func) noopBindFragmentShaderATI,
+ (mapi_func) noopColorFragmentOp1ATI,
+ (mapi_func) noopColorFragmentOp2ATI,
+ (mapi_func) noopColorFragmentOp3ATI,
+ (mapi_func) noopDeleteFragmentShaderATI,
+ (mapi_func) noopEndFragmentShaderATI,
+ (mapi_func) noopGenFragmentShadersATI,
+ (mapi_func) noopPassTexCoordATI,
+ (mapi_func) noopSampleMapATI,
+ (mapi_func) noopSetFragmentShaderConstantATI,
+ (mapi_func) noopPointParameteriNV,
+ (mapi_func) noopPointParameterivNV,
+ (mapi_func) noopActiveStencilFaceEXT,
+ (mapi_func) noopBindVertexArrayAPPLE,
+ (mapi_func) noopDeleteVertexArraysAPPLE,
+ (mapi_func) noopGenVertexArraysAPPLE,
+ (mapi_func) noopIsVertexArrayAPPLE,
+ (mapi_func) noopGetProgramNamedParameterdvNV,
+ (mapi_func) noopGetProgramNamedParameterfvNV,
+ (mapi_func) noopProgramNamedParameter4dNV,
+ (mapi_func) noopProgramNamedParameter4dvNV,
+ (mapi_func) noopProgramNamedParameter4fNV,
+ (mapi_func) noopProgramNamedParameter4fvNV,
+ (mapi_func) noopPrimitiveRestartIndexNV,
+ (mapi_func) noopPrimitiveRestartNV,
+ (mapi_func) noopAlphaFuncxOES,
+ (mapi_func) noopClearColorxOES,
+ (mapi_func) noopClearDepthxOES,
+ (mapi_func) noopClipPlanexOES,
+ (mapi_func) noopColor4xOES,
+ (mapi_func) noopDepthRangexOES,
+ (mapi_func) noopFogxOES,
+ (mapi_func) noopFogxvOES,
+ (mapi_func) noopFrustumxOES,
+ (mapi_func) noopGetClipPlanexOES,
+ (mapi_func) noopGetFixedvOES,
+ (mapi_func) noopGetLightxvOES,
+ (mapi_func) noopGetMaterialxvOES,
+ (mapi_func) noopGetTexEnvxvOES,
+ (mapi_func) noopGetTexGenxvOES,
+ (mapi_func) noopGetTexParameterxvOES,
+ (mapi_func) noopLightModelxOES,
+ (mapi_func) noopLightModelxvOES,
+ (mapi_func) noopLightxOES,
+ (mapi_func) noopLightxvOES,
+ (mapi_func) noopLineWidthxOES,
+ (mapi_func) noopLoadMatrixxOES,
+ (mapi_func) noopMaterialxOES,
+ (mapi_func) noopMaterialxvOES,
+ (mapi_func) noopMultMatrixxOES,
+ (mapi_func) noopMultiTexCoord4xOES,
+ (mapi_func) noopNormal3xOES,
+ (mapi_func) noopOrthoxOES,
+ (mapi_func) noopPointParameterxOES,
+ (mapi_func) noopPointParameterxvOES,
+ (mapi_func) noopPointSizexOES,
+ (mapi_func) noopPolygonOffsetxOES,
+ (mapi_func) noopRotatexOES,
+ (mapi_func) noopSampleCoveragexOES,
+ (mapi_func) noopScalexOES,
+ (mapi_func) noopTexEnvxOES,
+ (mapi_func) noopTexEnvxvOES,
+ (mapi_func) noopTexGenxOES,
+ (mapi_func) noopTexGenxvOES,
+ (mapi_func) noopTexParameterxOES,
+ (mapi_func) noopTexParameterxvOES,
+ (mapi_func) noopTranslatexOES,
+ (mapi_func) noopClipPlanefOES,
+ (mapi_func) noopFrustumfOES,
+ (mapi_func) noopGetClipPlanefOES,
+ (mapi_func) noopOrthofOES,
+ (mapi_func) noopDepthBoundsEXT,
+ (mapi_func) noopBlendEquationSeparateEXT,
+ (mapi_func) noopBindFramebufferEXT,
+ (mapi_func) noopBindRenderbufferEXT,
+ (mapi_func) noopCheckFramebufferStatusEXT,
+ (mapi_func) noopDeleteFramebuffersEXT,
+ (mapi_func) noopDeleteRenderbuffersEXT,
+ (mapi_func) noopFramebufferRenderbufferEXT,
+ (mapi_func) noopFramebufferTexture1DEXT,
+ (mapi_func) noopFramebufferTexture2DEXT,
+ (mapi_func) noopFramebufferTexture3DEXT,
+ (mapi_func) noopGenFramebuffersEXT,
+ (mapi_func) noopGenRenderbuffersEXT,
+ (mapi_func) noopGenerateMipmapEXT,
+ (mapi_func) noopGetFramebufferAttachmentParameterivEXT,
+ (mapi_func) noopGetRenderbufferParameterivEXT,
+ (mapi_func) noopIsFramebufferEXT,
+ (mapi_func) noopIsRenderbufferEXT,
+ (mapi_func) noopRenderbufferStorageEXT,
+ (mapi_func) noopBlitFramebufferEXT,
+ (mapi_func) noopBufferParameteriAPPLE,
+ (mapi_func) noopFlushMappedBufferRangeAPPLE,
+ (mapi_func) noopBindFragDataLocationEXT,
+ (mapi_func) noopGetFragDataLocationEXT,
+ (mapi_func) noopGetUniformuivEXT,
+ (mapi_func) noopGetVertexAttribIivEXT,
+ (mapi_func) noopGetVertexAttribIuivEXT,
+ (mapi_func) noopUniform1uiEXT,
+ (mapi_func) noopUniform1uivEXT,
+ (mapi_func) noopUniform2uiEXT,
+ (mapi_func) noopUniform2uivEXT,
+ (mapi_func) noopUniform3uiEXT,
+ (mapi_func) noopUniform3uivEXT,
+ (mapi_func) noopUniform4uiEXT,
+ (mapi_func) noopUniform4uivEXT,
+ (mapi_func) noopVertexAttribI1iEXT,
+ (mapi_func) noopVertexAttribI1ivEXT,
+ (mapi_func) noopVertexAttribI1uiEXT,
+ (mapi_func) noopVertexAttribI1uivEXT,
+ (mapi_func) noopVertexAttribI2iEXT,
+ (mapi_func) noopVertexAttribI2ivEXT,
+ (mapi_func) noopVertexAttribI2uiEXT,
+ (mapi_func) noopVertexAttribI2uivEXT,
+ (mapi_func) noopVertexAttribI3iEXT,
+ (mapi_func) noopVertexAttribI3ivEXT,
+ (mapi_func) noopVertexAttribI3uiEXT,
+ (mapi_func) noopVertexAttribI3uivEXT,
+ (mapi_func) noopVertexAttribI4bvEXT,
+ (mapi_func) noopVertexAttribI4iEXT,
+ (mapi_func) noopVertexAttribI4ivEXT,
+ (mapi_func) noopVertexAttribI4svEXT,
+ (mapi_func) noopVertexAttribI4ubvEXT,
+ (mapi_func) noopVertexAttribI4uiEXT,
+ (mapi_func) noopVertexAttribI4uivEXT,
+ (mapi_func) noopVertexAttribI4usvEXT,
+ (mapi_func) noopVertexAttribIPointerEXT,
+ (mapi_func) noopFramebufferTextureLayerEXT,
+ (mapi_func) noopColorMaskIndexedEXT,
+ (mapi_func) noopDisableIndexedEXT,
+ (mapi_func) noopEnableIndexedEXT,
+ (mapi_func) noopGetBooleanIndexedvEXT,
+ (mapi_func) noopGetIntegerIndexedvEXT,
+ (mapi_func) noopIsEnabledIndexedEXT,
+ (mapi_func) noopClearColorIiEXT,
+ (mapi_func) noopClearColorIuiEXT,
+ (mapi_func) noopGetTexParameterIivEXT,
+ (mapi_func) noopGetTexParameterIuivEXT,
+ (mapi_func) noopTexParameterIivEXT,
+ (mapi_func) noopTexParameterIuivEXT,
+ (mapi_func) noopBeginConditionalRenderNV,
+ (mapi_func) noopEndConditionalRenderNV,
+ (mapi_func) noopBeginTransformFeedbackEXT,
+ (mapi_func) noopBindBufferBaseEXT,
+ (mapi_func) noopBindBufferOffsetEXT,
+ (mapi_func) noopBindBufferRangeEXT,
+ (mapi_func) noopEndTransformFeedbackEXT,
+ (mapi_func) noopGetTransformFeedbackVaryingEXT,
+ (mapi_func) noopTransformFeedbackVaryingsEXT,
+ (mapi_func) noopProvokingVertexEXT,
+ (mapi_func) noopGetTexParameterPointervAPPLE,
+ (mapi_func) noopTextureRangeAPPLE,
+ (mapi_func) noopGetObjectParameterivAPPLE,
+ (mapi_func) noopObjectPurgeableAPPLE,
+ (mapi_func) noopObjectUnpurgeableAPPLE,
+ (mapi_func) noopActiveProgramEXT,
+ (mapi_func) noopCreateShaderProgramEXT,
+ (mapi_func) noopUseShaderProgramEXT,
+ (mapi_func) noopTextureBarrierNV,
+ (mapi_func) noopStencilFuncSeparateATI,
+ (mapi_func) noopProgramEnvParameters4fvEXT,
+ (mapi_func) noopProgramLocalParameters4fvEXT,
+ (mapi_func) noopGetQueryObjecti64vEXT,
+ (mapi_func) noopGetQueryObjectui64vEXT,
+ (mapi_func) noopEGLImageTargetRenderbufferStorageOES,
+ (mapi_func) noopEGLImageTargetTexture2DOES,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic
+};
+
+#else /* DEBUG */
+
+const mapi_func table_noop_array[] = {
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic,
+ (mapi_func) noop_generic
+};
+
+#endif /* DEBUG */
+#undef MAPI_TMP_NOOP_ARRAY
+#endif /* MAPI_TMP_NOOP_ARRAY */
+
+#ifdef MAPI_TMP_PUBLIC_STUBS
+static const char public_string_pool[] =
+ "Accum\0"
+ "ActiveProgramEXT\0"
+ "ActiveStencilFaceEXT\0"
+ "ActiveTexture\0"
+ "ActiveTextureARB\0"
+ "AlphaFragmentOp1ATI\0"
+ "AlphaFragmentOp2ATI\0"
+ "AlphaFragmentOp3ATI\0"
+ "AlphaFunc\0"
+ "AlphaFuncx\0"
+ "AlphaFuncxOES\0"
+ "AreProgramsResidentNV\0"
+ "AreTexturesResident\0"
+ "AreTexturesResidentEXT\0"
+ "ArrayElement\0"
+ "ArrayElementEXT\0"
+ "AttachObjectARB\0"
+ "AttachShader\0"
+ "Begin\0"
+ "BeginConditionalRender\0"
+ "BeginConditionalRenderNV\0"
+ "BeginFragmentShaderATI\0"
+ "BeginQuery\0"
+ "BeginQueryARB\0"
+ "BeginTransformFeedback\0"
+ "BeginTransformFeedbackEXT\0"
+ "BindAttribLocation\0"
+ "BindAttribLocationARB\0"
+ "BindBuffer\0"
+ "BindBufferARB\0"
+ "BindBufferBase\0"
+ "BindBufferBaseEXT\0"
+ "BindBufferOffsetEXT\0"
+ "BindBufferRange\0"
+ "BindBufferRangeEXT\0"
+ "BindFragDataLocation\0"
+ "BindFragDataLocationEXT\0"
+ "BindFragmentShaderATI\0"
+ "BindFramebuffer\0"
+ "BindFramebufferEXT\0"
+ "BindFramebufferOES\0"
+ "BindProgramARB\0"
+ "BindProgramNV\0"
+ "BindRenderbuffer\0"
+ "BindRenderbufferEXT\0"
+ "BindRenderbufferOES\0"
+ "BindTexture\0"
+ "BindTextureEXT\0"
+ "BindTransformFeedback\0"
+ "BindVertexArray\0"
+ "BindVertexArrayAPPLE\0"
+ "Bitmap\0"
+ "BlendColor\0"
+ "BlendColorEXT\0"
+ "BlendEquation\0"
+ "BlendEquationEXT\0"
+ "BlendEquationOES\0"
+ "BlendEquationSeparate\0"
+ "BlendEquationSeparateATI\0"
+ "BlendEquationSeparateEXT\0"
+ "BlendEquationSeparateOES\0"
+ "BlendEquationSeparateiARB\0"
+ "BlendEquationiARB\0"
+ "BlendFunc\0"
+ "BlendFuncSeparate\0"
+ "BlendFuncSeparateEXT\0"
+ "BlendFuncSeparateINGR\0"
+ "BlendFuncSeparateOES\0"
+ "BlendFuncSeparateiARB\0"
+ "BlendFunciARB\0"
+ "BlitFramebuffer\0"
+ "BlitFramebufferEXT\0"
+ "BufferData\0"
+ "BufferDataARB\0"
+ "BufferParameteriAPPLE\0"
+ "BufferSubData\0"
+ "BufferSubDataARB\0"
+ "CallList\0"
+ "CallLists\0"
+ "CheckFramebufferStatus\0"
+ "CheckFramebufferStatusEXT\0"
+ "CheckFramebufferStatusOES\0"
+ "ClampColor\0"
+ "Clear\0"
+ "ClearAccum\0"
+ "ClearBufferfi\0"
+ "ClearBufferfv\0"
+ "ClearBufferiv\0"
+ "ClearBufferuiv\0"
+ "ClearColor\0"
+ "ClearColorIiEXT\0"
+ "ClearColorIuiEXT\0"
+ "ClearColorx\0"
+ "ClearColorxOES\0"
+ "ClearDepth\0"
+ "ClearDepthf\0"
+ "ClearDepthfOES\0"
+ "ClearDepthx\0"
+ "ClearDepthxOES\0"
+ "ClearIndex\0"
+ "ClearStencil\0"
+ "ClientActiveTexture\0"
+ "ClientActiveTextureARB\0"
+ "ClientWaitSync\0"
+ "ClipPlane\0"
+ "ClipPlanef\0"
+ "ClipPlanefOES\0"
+ "ClipPlanex\0"
+ "ClipPlanexOES\0"
+ "Color3b\0"
+ "Color3bv\0"
+ "Color3d\0"
+ "Color3dv\0"
+ "Color3f\0"
+ "Color3fv\0"
+ "Color3i\0"
+ "Color3iv\0"
+ "Color3s\0"
+ "Color3sv\0"
+ "Color3ub\0"
+ "Color3ubv\0"
+ "Color3ui\0"
+ "Color3uiv\0"
+ "Color3us\0"
+ "Color3usv\0"
+ "Color4b\0"
+ "Color4bv\0"
+ "Color4d\0"
+ "Color4dv\0"
+ "Color4f\0"
+ "Color4fv\0"
+ "Color4i\0"
+ "Color4iv\0"
+ "Color4s\0"
+ "Color4sv\0"
+ "Color4ub\0"
+ "Color4ubv\0"
+ "Color4ui\0"
+ "Color4uiv\0"
+ "Color4us\0"
+ "Color4usv\0"
+ "Color4x\0"
+ "Color4xOES\0"
+ "ColorFragmentOp1ATI\0"
+ "ColorFragmentOp2ATI\0"
+ "ColorFragmentOp3ATI\0"
+ "ColorMask\0"
+ "ColorMaskIndexedEXT\0"
+ "ColorMaski\0"
+ "ColorMaterial\0"
+ "ColorPointer\0"
+ "ColorPointerEXT\0"
+ "ColorSubTable\0"
+ "ColorSubTableEXT\0"
+ "ColorTable\0"
+ "ColorTableEXT\0"
+ "ColorTableParameterfv\0"
+ "ColorTableParameterfvSGI\0"
+ "ColorTableParameteriv\0"
+ "ColorTableParameterivSGI\0"
+ "ColorTableSGI\0"
+ "CombinerInputNV\0"
+ "CombinerOutputNV\0"
+ "CombinerParameterfNV\0"
+ "CombinerParameterfvNV\0"
+ "CombinerParameteriNV\0"
+ "CombinerParameterivNV\0"
+ "CompileShader\0"
+ "CompileShaderARB\0"
+ "CompressedTexImage1D\0"
+ "CompressedTexImage1DARB\0"
+ "CompressedTexImage2D\0"
+ "CompressedTexImage2DARB\0"
+ "CompressedTexImage3D\0"
+ "CompressedTexImage3DARB\0"
+ "CompressedTexImage3DOES\0"
+ "CompressedTexSubImage1D\0"
+ "CompressedTexSubImage1DARB\0"
+ "CompressedTexSubImage2D\0"
+ "CompressedTexSubImage2DARB\0"
+ "CompressedTexSubImage3D\0"
+ "CompressedTexSubImage3DARB\0"
+ "CompressedTexSubImage3DOES\0"
+ "ConvolutionFilter1D\0"
+ "ConvolutionFilter1DEXT\0"
+ "ConvolutionFilter2D\0"
+ "ConvolutionFilter2DEXT\0"
+ "ConvolutionParameterf\0"
+ "ConvolutionParameterfEXT\0"
+ "ConvolutionParameterfv\0"
+ "ConvolutionParameterfvEXT\0"
+ "ConvolutionParameteri\0"
+ "ConvolutionParameteriEXT\0"
+ "ConvolutionParameteriv\0"
+ "ConvolutionParameterivEXT\0"
+ "CopyBufferSubData\0"
+ "CopyColorSubTable\0"
+ "CopyColorSubTableEXT\0"
+ "CopyColorTable\0"
+ "CopyColorTableSGI\0"
+ "CopyConvolutionFilter1D\0"
+ "CopyConvolutionFilter1DEXT\0"
+ "CopyConvolutionFilter2D\0"
+ "CopyConvolutionFilter2DEXT\0"
+ "CopyPixels\0"
+ "CopyTexImage1D\0"
+ "CopyTexImage1DEXT\0"
+ "CopyTexImage2D\0"
+ "CopyTexImage2DEXT\0"
+ "CopyTexSubImage1D\0"
+ "CopyTexSubImage1DEXT\0"
+ "CopyTexSubImage2D\0"
+ "CopyTexSubImage2DEXT\0"
+ "CopyTexSubImage3D\0"
+ "CopyTexSubImage3DEXT\0"
+ "CopyTexSubImage3DOES\0"
+ "CreateProgram\0"
+ "CreateProgramObjectARB\0"
+ "CreateShader\0"
+ "CreateShaderObjectARB\0"
+ "CreateShaderProgramEXT\0"
+ "CullFace\0"
+ "DeleteBuffers\0"
+ "DeleteBuffersARB\0"
+ "DeleteFencesNV\0"
+ "DeleteFragmentShaderATI\0"
+ "DeleteFramebuffers\0"
+ "DeleteFramebuffersEXT\0"
+ "DeleteFramebuffersOES\0"
+ "DeleteLists\0"
+ "DeleteObjectARB\0"
+ "DeleteProgram\0"
+ "DeleteProgramsARB\0"
+ "DeleteProgramsNV\0"
+ "DeleteQueries\0"
+ "DeleteQueriesARB\0"
+ "DeleteRenderbuffers\0"
+ "DeleteRenderbuffersEXT\0"
+ "DeleteRenderbuffersOES\0"
+ "DeleteShader\0"
+ "DeleteSync\0"
+ "DeleteTextures\0"
+ "DeleteTexturesEXT\0"
+ "DeleteTransformFeedbacks\0"
+ "DeleteVertexArrays\0"
+ "DeleteVertexArraysAPPLE\0"
+ "DepthBoundsEXT\0"
+ "DepthFunc\0"
+ "DepthMask\0"
+ "DepthRange\0"
+ "DepthRangef\0"
+ "DepthRangefOES\0"
+ "DepthRangex\0"
+ "DepthRangexOES\0"
+ "DetachObjectARB\0"
+ "DetachShader\0"
+ "Disable\0"
+ "DisableClientState\0"
+ "DisableIndexedEXT\0"
+ "DisableVertexAttribArray\0"
+ "DisableVertexAttribArrayARB\0"
+ "Disablei\0"
+ "DrawArrays\0"
+ "DrawArraysEXT\0"
+ "DrawArraysInstanced\0"
+ "DrawArraysInstancedARB\0"
+ "DrawArraysInstancedEXT\0"
+ "DrawBuffer\0"
+ "DrawBuffers\0"
+ "DrawBuffersARB\0"
+ "DrawBuffersATI\0"
+ "DrawElements\0"
+ "DrawElementsBaseVertex\0"
+ "DrawElementsInstanced\0"
+ "DrawElementsInstancedARB\0"
+ "DrawElementsInstancedEXT\0"
+ "DrawPixels\0"
+ "DrawRangeElements\0"
+ "DrawRangeElementsBaseVertex\0"
+ "DrawRangeElementsEXT\0"
+ "DrawTexfOES\0"
+ "DrawTexfvOES\0"
+ "DrawTexiOES\0"
+ "DrawTexivOES\0"
+ "DrawTexsOES\0"
+ "DrawTexsvOES\0"
+ "DrawTexxOES\0"
+ "DrawTexxvOES\0"
+ "DrawTransformFeedback\0"
+ "EGLImageTargetRenderbufferStorageOES\0"
+ "EGLImageTargetTexture2DOES\0"
+ "EdgeFlag\0"
+ "EdgeFlagPointer\0"
+ "EdgeFlagPointerEXT\0"
+ "EdgeFlagv\0"
+ "Enable\0"
+ "EnableClientState\0"
+ "EnableIndexedEXT\0"
+ "EnableVertexAttribArray\0"
+ "EnableVertexAttribArrayARB\0"
+ "Enablei\0"
+ "End\0"
+ "EndConditionalRender\0"
+ "EndConditionalRenderNV\0"
+ "EndFragmentShaderATI\0"
+ "EndList\0"
+ "EndQuery\0"
+ "EndQueryARB\0"
+ "EndTransformFeedback\0"
+ "EndTransformFeedbackEXT\0"
+ "EvalCoord1d\0"
+ "EvalCoord1dv\0"
+ "EvalCoord1f\0"
+ "EvalCoord1fv\0"
+ "EvalCoord2d\0"
+ "EvalCoord2dv\0"
+ "EvalCoord2f\0"
+ "EvalCoord2fv\0"
+ "EvalMesh1\0"
+ "EvalMesh2\0"
+ "EvalPoint1\0"
+ "EvalPoint2\0"
+ "ExecuteProgramNV\0"
+ "FeedbackBuffer\0"
+ "FenceSync\0"
+ "FinalCombinerInputNV\0"
+ "Finish\0"
+ "FinishFenceNV\0"
+ "Flush\0"
+ "FlushMappedBufferRange\0"
+ "FlushMappedBufferRangeAPPLE\0"
+ "FlushVertexArrayRangeNV\0"
+ "FogCoordPointer\0"
+ "FogCoordPointerEXT\0"
+ "FogCoordd\0"
+ "FogCoorddEXT\0"
+ "FogCoorddv\0"
+ "FogCoorddvEXT\0"
+ "FogCoordf\0"
+ "FogCoordfEXT\0"
+ "FogCoordfv\0"
+ "FogCoordfvEXT\0"
+ "Fogf\0"
+ "Fogfv\0"
+ "Fogi\0"
+ "Fogiv\0"
+ "Fogx\0"
+ "FogxOES\0"
+ "Fogxv\0"
+ "FogxvOES\0"
+ "FramebufferRenderbuffer\0"
+ "FramebufferRenderbufferEXT\0"
+ "FramebufferRenderbufferOES\0"
+ "FramebufferTexture\0"
+ "FramebufferTexture1D\0"
+ "FramebufferTexture1DEXT\0"
+ "FramebufferTexture2D\0"
+ "FramebufferTexture2DEXT\0"
+ "FramebufferTexture2DOES\0"
+ "FramebufferTexture3D\0"
+ "FramebufferTexture3DEXT\0"
+ "FramebufferTexture3DOES\0"
+ "FramebufferTextureARB\0"
+ "FramebufferTextureFaceARB\0"
+ "FramebufferTextureLayer\0"
+ "FramebufferTextureLayerEXT\0"
+ "FrontFace\0"
+ "Frustum\0"
+ "Frustumf\0"
+ "FrustumfOES\0"
+ "Frustumx\0"
+ "FrustumxOES\0"
+ "GenBuffers\0"
+ "GenBuffersARB\0"
+ "GenFencesNV\0"
+ "GenFragmentShadersATI\0"
+ "GenFramebuffers\0"
+ "GenFramebuffersEXT\0"
+ "GenFramebuffersOES\0"
+ "GenLists\0"
+ "GenProgramsARB\0"
+ "GenProgramsNV\0"
+ "GenQueries\0"
+ "GenQueriesARB\0"
+ "GenRenderbuffers\0"
+ "GenRenderbuffersEXT\0"
+ "GenRenderbuffersOES\0"
+ "GenTextures\0"
+ "GenTexturesEXT\0"
+ "GenTransformFeedbacks\0"
+ "GenVertexArrays\0"
+ "GenVertexArraysAPPLE\0"
+ "GenerateMipmap\0"
+ "GenerateMipmapEXT\0"
+ "GenerateMipmapOES\0"
+ "GetActiveAttrib\0"
+ "GetActiveAttribARB\0"
+ "GetActiveUniform\0"
+ "GetActiveUniformARB\0"
+ "GetAttachedObjectsARB\0"
+ "GetAttachedShaders\0"
+ "GetAttribLocation\0"
+ "GetAttribLocationARB\0"
+ "GetBooleanIndexedvEXT\0"
+ "GetBooleani_v\0"
+ "GetBooleanv\0"
+ "GetBufferParameteri64v\0"
+ "GetBufferParameteriv\0"
+ "GetBufferParameterivARB\0"
+ "GetBufferPointerv\0"
+ "GetBufferPointervARB\0"
+ "GetBufferPointervOES\0"
+ "GetBufferSubData\0"
+ "GetBufferSubDataARB\0"
+ "GetClipPlane\0"
+ "GetClipPlanef\0"
+ "GetClipPlanefOES\0"
+ "GetClipPlanex\0"
+ "GetClipPlanexOES\0"
+ "GetColorTable\0"
+ "GetColorTableEXT\0"
+ "GetColorTableParameterfv\0"
+ "GetColorTableParameterfvEXT\0"
+ "GetColorTableParameterfvSGI\0"
+ "GetColorTableParameteriv\0"
+ "GetColorTableParameterivEXT\0"
+ "GetColorTableParameterivSGI\0"
+ "GetColorTableSGI\0"
+ "GetCombinerInputParameterfvNV\0"
+ "GetCombinerInputParameterivNV\0"
+ "GetCombinerOutputParameterfvNV\0"
+ "GetCombinerOutputParameterivNV\0"
+ "GetCompressedTexImage\0"
+ "GetCompressedTexImageARB\0"
+ "GetConvolutionFilter\0"
+ "GetConvolutionFilterEXT\0"
+ "GetConvolutionParameterfv\0"
+ "GetConvolutionParameterfvEXT\0"
+ "GetConvolutionParameteriv\0"
+ "GetConvolutionParameterivEXT\0"
+ "GetDoublev\0"
+ "GetError\0"
+ "GetFenceivNV\0"
+ "GetFinalCombinerInputParameterfvNV\0"
+ "GetFinalCombinerInputParameterivNV\0"
+ "GetFixedv\0"
+ "GetFixedvOES\0"
+ "GetFloatv\0"
+ "GetFragDataLocation\0"
+ "GetFragDataLocationEXT\0"
+ "GetFramebufferAttachmentParameteriv\0"
+ "GetFramebufferAttachmentParameterivEXT\0"
+ "GetFramebufferAttachmentParameterivOES\0"
+ "GetHandleARB\0"
+ "GetHistogram\0"
+ "GetHistogramEXT\0"
+ "GetHistogramParameterfv\0"
+ "GetHistogramParameterfvEXT\0"
+ "GetHistogramParameteriv\0"
+ "GetHistogramParameterivEXT\0"
+ "GetInfoLogARB\0"
+ "GetInteger64i_v\0"
+ "GetInteger64v\0"
+ "GetIntegerIndexedvEXT\0"
+ "GetIntegeri_v\0"
+ "GetIntegerv\0"
+ "GetLightfv\0"
+ "GetLightiv\0"
+ "GetLightxv\0"
+ "GetLightxvOES\0"
+ "GetMapdv\0"
+ "GetMapfv\0"
+ "GetMapiv\0"
+ "GetMaterialfv\0"
+ "GetMaterialiv\0"
+ "GetMaterialxv\0"
+ "GetMaterialxvOES\0"
+ "GetMinmax\0"
+ "GetMinmaxEXT\0"
+ "GetMinmaxParameterfv\0"
+ "GetMinmaxParameterfvEXT\0"
+ "GetMinmaxParameteriv\0"
+ "GetMinmaxParameterivEXT\0"
+ "GetObjectParameterfvARB\0"
+ "GetObjectParameterivAPPLE\0"
+ "GetObjectParameterivARB\0"
+ "GetPixelMapfv\0"
+ "GetPixelMapuiv\0"
+ "GetPixelMapusv\0"
+ "GetPixelTexGenParameterfvSGIS\0"
+ "GetPixelTexGenParameterivSGIS\0"
+ "GetPointerv\0"
+ "GetPointervEXT\0"
+ "GetPolygonStipple\0"
+ "GetProgramBinary\0"
+ "GetProgramBinaryOES\0"
+ "GetProgramEnvParameterdvARB\0"
+ "GetProgramEnvParameterfvARB\0"
+ "GetProgramInfoLog\0"
+ "GetProgramLocalParameterdvARB\0"
+ "GetProgramLocalParameterfvARB\0"
+ "GetProgramNamedParameterdvNV\0"
+ "GetProgramNamedParameterfvNV\0"
+ "GetProgramParameterdvNV\0"
+ "GetProgramParameterfvNV\0"
+ "GetProgramStringARB\0"
+ "GetProgramStringNV\0"
+ "GetProgramiv\0"
+ "GetProgramivARB\0"
+ "GetProgramivNV\0"
+ "GetQueryObjecti64vEXT\0"
+ "GetQueryObjectiv\0"
+ "GetQueryObjectivARB\0"
+ "GetQueryObjectui64vEXT\0"
+ "GetQueryObjectuiv\0"
+ "GetQueryObjectuivARB\0"
+ "GetQueryiv\0"
+ "GetQueryivARB\0"
+ "GetRenderbufferParameteriv\0"
+ "GetRenderbufferParameterivEXT\0"
+ "GetRenderbufferParameterivOES\0"
+ "GetSeparableFilter\0"
+ "GetSeparableFilterEXT\0"
+ "GetShaderInfoLog\0"
+ "GetShaderPrecisionFormat\0"
+ "GetShaderSource\0"
+ "GetShaderSourceARB\0"
+ "GetShaderiv\0"
+ "GetString\0"
+ "GetStringi\0"
+ "GetSynciv\0"
+ "GetTexBumpParameterfvATI\0"
+ "GetTexBumpParameterivATI\0"
+ "GetTexEnvfv\0"
+ "GetTexEnviv\0"
+ "GetTexEnvxv\0"
+ "GetTexEnvxvOES\0"
+ "GetTexGendv\0"
+ "GetTexGenfv\0"
+ "GetTexGenfvOES\0"
+ "GetTexGeniv\0"
+ "GetTexGenivOES\0"
+ "GetTexGenxvOES\0"
+ "GetTexImage\0"
+ "GetTexLevelParameterfv\0"
+ "GetTexLevelParameteriv\0"
+ "GetTexParameterIiv\0"
+ "GetTexParameterIivEXT\0"
+ "GetTexParameterIuiv\0"
+ "GetTexParameterIuivEXT\0"
+ "GetTexParameterPointervAPPLE\0"
+ "GetTexParameterfv\0"
+ "GetTexParameteriv\0"
+ "GetTexParameterxv\0"
+ "GetTexParameterxvOES\0"
+ "GetTrackMatrixivNV\0"
+ "GetTransformFeedbackVarying\0"
+ "GetTransformFeedbackVaryingEXT\0"
+ "GetUniformLocation\0"
+ "GetUniformLocationARB\0"
+ "GetUniformfv\0"
+ "GetUniformfvARB\0"
+ "GetUniformiv\0"
+ "GetUniformivARB\0"
+ "GetUniformuiv\0"
+ "GetUniformuivEXT\0"
+ "GetVertexAttribIiv\0"
+ "GetVertexAttribIivEXT\0"
+ "GetVertexAttribIuiv\0"
+ "GetVertexAttribIuivEXT\0"
+ "GetVertexAttribPointerv\0"
+ "GetVertexAttribPointervARB\0"
+ "GetVertexAttribPointervNV\0"
+ "GetVertexAttribdv\0"
+ "GetVertexAttribdvARB\0"
+ "GetVertexAttribdvNV\0"
+ "GetVertexAttribfv\0"
+ "GetVertexAttribfvARB\0"
+ "GetVertexAttribfvNV\0"
+ "GetVertexAttribiv\0"
+ "GetVertexAttribivARB\0"
+ "GetVertexAttribivNV\0"
+ "Hint\0"
+ "Histogram\0"
+ "HistogramEXT\0"
+ "IndexMask\0"
+ "IndexPointer\0"
+ "IndexPointerEXT\0"
+ "Indexd\0"
+ "Indexdv\0"
+ "Indexf\0"
+ "Indexfv\0"
+ "Indexi\0"
+ "Indexiv\0"
+ "Indexs\0"
+ "Indexsv\0"
+ "Indexub\0"
+ "Indexubv\0"
+ "InitNames\0"
+ "InterleavedArrays\0"
+ "IsBuffer\0"
+ "IsBufferARB\0"
+ "IsEnabled\0"
+ "IsEnabledIndexedEXT\0"
+ "IsEnabledi\0"
+ "IsFenceNV\0"
+ "IsFramebuffer\0"
+ "IsFramebufferEXT\0"
+ "IsFramebufferOES\0"
+ "IsList\0"
+ "IsProgram\0"
+ "IsProgramARB\0"
+ "IsProgramNV\0"
+ "IsQuery\0"
+ "IsQueryARB\0"
+ "IsRenderbuffer\0"
+ "IsRenderbufferEXT\0"
+ "IsRenderbufferOES\0"
+ "IsShader\0"
+ "IsSync\0"
+ "IsTexture\0"
+ "IsTextureEXT\0"
+ "IsTransformFeedback\0"
+ "IsVertexArray\0"
+ "IsVertexArrayAPPLE\0"
+ "LightModelf\0"
+ "LightModelfv\0"
+ "LightModeli\0"
+ "LightModeliv\0"
+ "LightModelx\0"
+ "LightModelxOES\0"
+ "LightModelxv\0"
+ "LightModelxvOES\0"
+ "Lightf\0"
+ "Lightfv\0"
+ "Lighti\0"
+ "Lightiv\0"
+ "Lightx\0"
+ "LightxOES\0"
+ "Lightxv\0"
+ "LightxvOES\0"
+ "LineStipple\0"
+ "LineWidth\0"
+ "LineWidthx\0"
+ "LineWidthxOES\0"
+ "LinkProgram\0"
+ "LinkProgramARB\0"
+ "ListBase\0"
+ "LoadIdentity\0"
+ "LoadMatrixd\0"
+ "LoadMatrixf\0"
+ "LoadMatrixx\0"
+ "LoadMatrixxOES\0"
+ "LoadName\0"
+ "LoadProgramNV\0"
+ "LoadTransposeMatrixd\0"
+ "LoadTransposeMatrixdARB\0"
+ "LoadTransposeMatrixf\0"
+ "LoadTransposeMatrixfARB\0"
+ "LockArraysEXT\0"
+ "LogicOp\0"
+ "Map1d\0"
+ "Map1f\0"
+ "Map2d\0"
+ "Map2f\0"
+ "MapBuffer\0"
+ "MapBufferARB\0"
+ "MapBufferOES\0"
+ "MapBufferRange\0"
+ "MapGrid1d\0"
+ "MapGrid1f\0"
+ "MapGrid2d\0"
+ "MapGrid2f\0"
+ "Materialf\0"
+ "Materialfv\0"
+ "Materiali\0"
+ "Materialiv\0"
+ "Materialx\0"
+ "MaterialxOES\0"
+ "Materialxv\0"
+ "MaterialxvOES\0"
+ "MatrixMode\0"
+ "Minmax\0"
+ "MinmaxEXT\0"
+ "MultMatrixd\0"
+ "MultMatrixf\0"
+ "MultMatrixx\0"
+ "MultMatrixxOES\0"
+ "MultTransposeMatrixd\0"
+ "MultTransposeMatrixdARB\0"
+ "MultTransposeMatrixf\0"
+ "MultTransposeMatrixfARB\0"
+ "MultiDrawArrays\0"
+ "MultiDrawArraysEXT\0"
+ "MultiDrawElements\0"
+ "MultiDrawElementsBaseVertex\0"
+ "MultiDrawElementsEXT\0"
+ "MultiModeDrawArraysIBM\0"
+ "MultiModeDrawElementsIBM\0"
+ "MultiTexCoord1d\0"
+ "MultiTexCoord1dARB\0"
+ "MultiTexCoord1dv\0"
+ "MultiTexCoord1dvARB\0"
+ "MultiTexCoord1f\0"
+ "MultiTexCoord1fARB\0"
+ "MultiTexCoord1fv\0"
+ "MultiTexCoord1fvARB\0"
+ "MultiTexCoord1i\0"
+ "MultiTexCoord1iARB\0"
+ "MultiTexCoord1iv\0"
+ "MultiTexCoord1ivARB\0"
+ "MultiTexCoord1s\0"
+ "MultiTexCoord1sARB\0"
+ "MultiTexCoord1sv\0"
+ "MultiTexCoord1svARB\0"
+ "MultiTexCoord2d\0"
+ "MultiTexCoord2dARB\0"
+ "MultiTexCoord2dv\0"
+ "MultiTexCoord2dvARB\0"
+ "MultiTexCoord2f\0"
+ "MultiTexCoord2fARB\0"
+ "MultiTexCoord2fv\0"
+ "MultiTexCoord2fvARB\0"
+ "MultiTexCoord2i\0"
+ "MultiTexCoord2iARB\0"
+ "MultiTexCoord2iv\0"
+ "MultiTexCoord2ivARB\0"
+ "MultiTexCoord2s\0"
+ "MultiTexCoord2sARB\0"
+ "MultiTexCoord2sv\0"
+ "MultiTexCoord2svARB\0"
+ "MultiTexCoord3d\0"
+ "MultiTexCoord3dARB\0"
+ "MultiTexCoord3dv\0"
+ "MultiTexCoord3dvARB\0"
+ "MultiTexCoord3f\0"
+ "MultiTexCoord3fARB\0"
+ "MultiTexCoord3fv\0"
+ "MultiTexCoord3fvARB\0"
+ "MultiTexCoord3i\0"
+ "MultiTexCoord3iARB\0"
+ "MultiTexCoord3iv\0"
+ "MultiTexCoord3ivARB\0"
+ "MultiTexCoord3s\0"
+ "MultiTexCoord3sARB\0"
+ "MultiTexCoord3sv\0"
+ "MultiTexCoord3svARB\0"
+ "MultiTexCoord4d\0"
+ "MultiTexCoord4dARB\0"
+ "MultiTexCoord4dv\0"
+ "MultiTexCoord4dvARB\0"
+ "MultiTexCoord4f\0"
+ "MultiTexCoord4fARB\0"
+ "MultiTexCoord4fv\0"
+ "MultiTexCoord4fvARB\0"
+ "MultiTexCoord4i\0"
+ "MultiTexCoord4iARB\0"
+ "MultiTexCoord4iv\0"
+ "MultiTexCoord4ivARB\0"
+ "MultiTexCoord4s\0"
+ "MultiTexCoord4sARB\0"
+ "MultiTexCoord4sv\0"
+ "MultiTexCoord4svARB\0"
+ "MultiTexCoord4x\0"
+ "MultiTexCoord4xOES\0"
+ "NewList\0"
+ "Normal3b\0"
+ "Normal3bv\0"
+ "Normal3d\0"
+ "Normal3dv\0"
+ "Normal3f\0"
+ "Normal3fv\0"
+ "Normal3i\0"
+ "Normal3iv\0"
+ "Normal3s\0"
+ "Normal3sv\0"
+ "Normal3x\0"
+ "Normal3xOES\0"
+ "NormalPointer\0"
+ "NormalPointerEXT\0"
+ "ObjectPurgeableAPPLE\0"
+ "ObjectUnpurgeableAPPLE\0"
+ "Ortho\0"
+ "Orthof\0"
+ "OrthofOES\0"
+ "Orthox\0"
+ "OrthoxOES\0"
+ "PassTexCoordATI\0"
+ "PassThrough\0"
+ "PauseTransformFeedback\0"
+ "PixelMapfv\0"
+ "PixelMapuiv\0"
+ "PixelMapusv\0"
+ "PixelStoref\0"
+ "PixelStorei\0"
+ "PixelTexGenParameterfSGIS\0"
+ "PixelTexGenParameterfvSGIS\0"
+ "PixelTexGenParameteriSGIS\0"
+ "PixelTexGenParameterivSGIS\0"
+ "PixelTexGenSGIX\0"
+ "PixelTransferf\0"
+ "PixelTransferi\0"
+ "PixelZoom\0"
+ "PointParameterf\0"
+ "PointParameterfARB\0"
+ "PointParameterfEXT\0"
+ "PointParameterfSGIS\0"
+ "PointParameterfv\0"
+ "PointParameterfvARB\0"
+ "PointParameterfvEXT\0"
+ "PointParameterfvSGIS\0"
+ "PointParameteri\0"
+ "PointParameteriNV\0"
+ "PointParameteriv\0"
+ "PointParameterivNV\0"
+ "PointParameterx\0"
+ "PointParameterxOES\0"
+ "PointParameterxv\0"
+ "PointParameterxvOES\0"
+ "PointSize\0"
+ "PointSizePointerOES\0"
+ "PointSizex\0"
+ "PointSizexOES\0"
+ "PolygonMode\0"
+ "PolygonOffset\0"
+ "PolygonOffsetEXT\0"
+ "PolygonOffsetx\0"
+ "PolygonOffsetxOES\0"
+ "PolygonStipple\0"
+ "PopAttrib\0"
+ "PopClientAttrib\0"
+ "PopMatrix\0"
+ "PopName\0"
+ "PrimitiveRestartIndex\0"
+ "PrimitiveRestartIndexNV\0"
+ "PrimitiveRestartNV\0"
+ "PrioritizeTextures\0"
+ "PrioritizeTexturesEXT\0"
+ "ProgramBinary\0"
+ "ProgramBinaryOES\0"
+ "ProgramEnvParameter4dARB\0"
+ "ProgramEnvParameter4dvARB\0"
+ "ProgramEnvParameter4fARB\0"
+ "ProgramEnvParameter4fvARB\0"
+ "ProgramEnvParameters4fvEXT\0"
+ "ProgramLocalParameter4dARB\0"
+ "ProgramLocalParameter4dvARB\0"
+ "ProgramLocalParameter4fARB\0"
+ "ProgramLocalParameter4fvARB\0"
+ "ProgramLocalParameters4fvEXT\0"
+ "ProgramNamedParameter4dNV\0"
+ "ProgramNamedParameter4dvNV\0"
+ "ProgramNamedParameter4fNV\0"
+ "ProgramNamedParameter4fvNV\0"
+ "ProgramParameter4dNV\0"
+ "ProgramParameter4dvNV\0"
+ "ProgramParameter4fNV\0"
+ "ProgramParameter4fvNV\0"
+ "ProgramParameteri\0"
+ "ProgramParameteriARB\0"
+ "ProgramParameters4dvNV\0"
+ "ProgramParameters4fvNV\0"
+ "ProgramStringARB\0"
+ "ProvokingVertex\0"
+ "ProvokingVertexEXT\0"
+ "PushAttrib\0"
+ "PushClientAttrib\0"
+ "PushMatrix\0"
+ "PushName\0"
+ "QueryMatrixxOES\0"
+ "RasterPos2d\0"
+ "RasterPos2dv\0"
+ "RasterPos2f\0"
+ "RasterPos2fv\0"
+ "RasterPos2i\0"
+ "RasterPos2iv\0"
+ "RasterPos2s\0"
+ "RasterPos2sv\0"
+ "RasterPos3d\0"
+ "RasterPos3dv\0"
+ "RasterPos3f\0"
+ "RasterPos3fv\0"
+ "RasterPos3i\0"
+ "RasterPos3iv\0"
+ "RasterPos3s\0"
+ "RasterPos3sv\0"
+ "RasterPos4d\0"
+ "RasterPos4dv\0"
+ "RasterPos4f\0"
+ "RasterPos4fv\0"
+ "RasterPos4i\0"
+ "RasterPos4iv\0"
+ "RasterPos4s\0"
+ "RasterPos4sv\0"
+ "ReadBuffer\0"
+ "ReadPixels\0"
+ "Rectd\0"
+ "Rectdv\0"
+ "Rectf\0"
+ "Rectfv\0"
+ "Recti\0"
+ "Rectiv\0"
+ "Rects\0"
+ "Rectsv\0"
+ "ReleaseShaderCompiler\0"
+ "RenderMode\0"
+ "RenderbufferStorage\0"
+ "RenderbufferStorageEXT\0"
+ "RenderbufferStorageMultisample\0"
+ "RenderbufferStorageMultisampleEXT\0"
+ "RenderbufferStorageOES\0"
+ "RequestResidentProgramsNV\0"
+ "ResetHistogram\0"
+ "ResetHistogramEXT\0"
+ "ResetMinmax\0"
+ "ResetMinmaxEXT\0"
+ "ResizeBuffersMESA\0"
+ "ResumeTransformFeedback\0"
+ "Rotated\0"
+ "Rotatef\0"
+ "Rotatex\0"
+ "RotatexOES\0"
+ "SampleCoverage\0"
+ "SampleCoverageARB\0"
+ "SampleCoveragex\0"
+ "SampleCoveragexOES\0"
+ "SampleMapATI\0"
+ "SampleMaskEXT\0"
+ "SampleMaskSGIS\0"
+ "SamplePatternEXT\0"
+ "SamplePatternSGIS\0"
+ "Scaled\0"
+ "Scalef\0"
+ "Scalex\0"
+ "ScalexOES\0"
+ "Scissor\0"
+ "SecondaryColor3b\0"
+ "SecondaryColor3bEXT\0"
+ "SecondaryColor3bv\0"
+ "SecondaryColor3bvEXT\0"
+ "SecondaryColor3d\0"
+ "SecondaryColor3dEXT\0"
+ "SecondaryColor3dv\0"
+ "SecondaryColor3dvEXT\0"
+ "SecondaryColor3f\0"
+ "SecondaryColor3fEXT\0"
+ "SecondaryColor3fv\0"
+ "SecondaryColor3fvEXT\0"
+ "SecondaryColor3i\0"
+ "SecondaryColor3iEXT\0"
+ "SecondaryColor3iv\0"
+ "SecondaryColor3ivEXT\0"
+ "SecondaryColor3s\0"
+ "SecondaryColor3sEXT\0"
+ "SecondaryColor3sv\0"
+ "SecondaryColor3svEXT\0"
+ "SecondaryColor3ub\0"
+ "SecondaryColor3ubEXT\0"
+ "SecondaryColor3ubv\0"
+ "SecondaryColor3ubvEXT\0"
+ "SecondaryColor3ui\0"
+ "SecondaryColor3uiEXT\0"
+ "SecondaryColor3uiv\0"
+ "SecondaryColor3uivEXT\0"
+ "SecondaryColor3us\0"
+ "SecondaryColor3usEXT\0"
+ "SecondaryColor3usv\0"
+ "SecondaryColor3usvEXT\0"
+ "SecondaryColorPointer\0"
+ "SecondaryColorPointerEXT\0"
+ "SelectBuffer\0"
+ "SeparableFilter2D\0"
+ "SeparableFilter2DEXT\0"
+ "SetFenceNV\0"
+ "SetFragmentShaderConstantATI\0"
+ "ShadeModel\0"
+ "ShaderBinary\0"
+ "ShaderSource\0"
+ "ShaderSourceARB\0"
+ "StencilFunc\0"
+ "StencilFuncSeparate\0"
+ "StencilFuncSeparateATI\0"
+ "StencilMask\0"
+ "StencilMaskSeparate\0"
+ "StencilOp\0"
+ "StencilOpSeparate\0"
+ "StencilOpSeparateATI\0"
+ "TestFenceNV\0"
+ "TexBuffer\0"
+ "TexBumpParameterfvATI\0"
+ "TexBumpParameterivATI\0"
+ "TexCoord1d\0"
+ "TexCoord1dv\0"
+ "TexCoord1f\0"
+ "TexCoord1fv\0"
+ "TexCoord1i\0"
+ "TexCoord1iv\0"
+ "TexCoord1s\0"
+ "TexCoord1sv\0"
+ "TexCoord2d\0"
+ "TexCoord2dv\0"
+ "TexCoord2f\0"
+ "TexCoord2fv\0"
+ "TexCoord2i\0"
+ "TexCoord2iv\0"
+ "TexCoord2s\0"
+ "TexCoord2sv\0"
+ "TexCoord3d\0"
+ "TexCoord3dv\0"
+ "TexCoord3f\0"
+ "TexCoord3fv\0"
+ "TexCoord3i\0"
+ "TexCoord3iv\0"
+ "TexCoord3s\0"
+ "TexCoord3sv\0"
+ "TexCoord4d\0"
+ "TexCoord4dv\0"
+ "TexCoord4f\0"
+ "TexCoord4fv\0"
+ "TexCoord4i\0"
+ "TexCoord4iv\0"
+ "TexCoord4s\0"
+ "TexCoord4sv\0"
+ "TexCoordPointer\0"
+ "TexCoordPointerEXT\0"
+ "TexEnvf\0"
+ "TexEnvfv\0"
+ "TexEnvi\0"
+ "TexEnviv\0"
+ "TexEnvx\0"
+ "TexEnvxOES\0"
+ "TexEnvxv\0"
+ "TexEnvxvOES\0"
+ "TexGend\0"
+ "TexGendv\0"
+ "TexGenf\0"
+ "TexGenfOES\0"
+ "TexGenfv\0"
+ "TexGenfvOES\0"
+ "TexGeni\0"
+ "TexGeniOES\0"
+ "TexGeniv\0"
+ "TexGenivOES\0"
+ "TexGenxOES\0"
+ "TexGenxvOES\0"
+ "TexImage1D\0"
+ "TexImage2D\0"
+ "TexImage3D\0"
+ "TexImage3DEXT\0"
+ "TexImage3DOES\0"
+ "TexParameterIiv\0"
+ "TexParameterIivEXT\0"
+ "TexParameterIuiv\0"
+ "TexParameterIuivEXT\0"
+ "TexParameterf\0"
+ "TexParameterfv\0"
+ "TexParameteri\0"
+ "TexParameteriv\0"
+ "TexParameterx\0"
+ "TexParameterxOES\0"
+ "TexParameterxv\0"
+ "TexParameterxvOES\0"
+ "TexSubImage1D\0"
+ "TexSubImage1DEXT\0"
+ "TexSubImage2D\0"
+ "TexSubImage2DEXT\0"
+ "TexSubImage3D\0"
+ "TexSubImage3DEXT\0"
+ "TexSubImage3DOES\0"
+ "TextureBarrierNV\0"
+ "TextureRangeAPPLE\0"
+ "TrackMatrixNV\0"
+ "TransformFeedbackVaryings\0"
+ "TransformFeedbackVaryingsEXT\0"
+ "Translated\0"
+ "Translatef\0"
+ "Translatex\0"
+ "TranslatexOES\0"
+ "Uniform1f\0"
+ "Uniform1fARB\0"
+ "Uniform1fv\0"
+ "Uniform1fvARB\0"
+ "Uniform1i\0"
+ "Uniform1iARB\0"
+ "Uniform1iv\0"
+ "Uniform1ivARB\0"
+ "Uniform1ui\0"
+ "Uniform1uiEXT\0"
+ "Uniform1uiv\0"
+ "Uniform1uivEXT\0"
+ "Uniform2f\0"
+ "Uniform2fARB\0"
+ "Uniform2fv\0"
+ "Uniform2fvARB\0"
+ "Uniform2i\0"
+ "Uniform2iARB\0"
+ "Uniform2iv\0"
+ "Uniform2ivARB\0"
+ "Uniform2ui\0"
+ "Uniform2uiEXT\0"
+ "Uniform2uiv\0"
+ "Uniform2uivEXT\0"
+ "Uniform3f\0"
+ "Uniform3fARB\0"
+ "Uniform3fv\0"
+ "Uniform3fvARB\0"
+ "Uniform3i\0"
+ "Uniform3iARB\0"
+ "Uniform3iv\0"
+ "Uniform3ivARB\0"
+ "Uniform3ui\0"
+ "Uniform3uiEXT\0"
+ "Uniform3uiv\0"
+ "Uniform3uivEXT\0"
+ "Uniform4f\0"
+ "Uniform4fARB\0"
+ "Uniform4fv\0"
+ "Uniform4fvARB\0"
+ "Uniform4i\0"
+ "Uniform4iARB\0"
+ "Uniform4iv\0"
+ "Uniform4ivARB\0"
+ "Uniform4ui\0"
+ "Uniform4uiEXT\0"
+ "Uniform4uiv\0"
+ "Uniform4uivEXT\0"
+ "UniformMatrix2fv\0"
+ "UniformMatrix2fvARB\0"
+ "UniformMatrix2x3fv\0"
+ "UniformMatrix2x4fv\0"
+ "UniformMatrix3fv\0"
+ "UniformMatrix3fvARB\0"
+ "UniformMatrix3x2fv\0"
+ "UniformMatrix3x4fv\0"
+ "UniformMatrix4fv\0"
+ "UniformMatrix4fvARB\0"
+ "UniformMatrix4x2fv\0"
+ "UniformMatrix4x3fv\0"
+ "UnlockArraysEXT\0"
+ "UnmapBuffer\0"
+ "UnmapBufferARB\0"
+ "UnmapBufferOES\0"
+ "UseProgram\0"
+ "UseProgramObjectARB\0"
+ "UseShaderProgramEXT\0"
+ "ValidateProgram\0"
+ "ValidateProgramARB\0"
+ "Vertex2d\0"
+ "Vertex2dv\0"
+ "Vertex2f\0"
+ "Vertex2fv\0"
+ "Vertex2i\0"
+ "Vertex2iv\0"
+ "Vertex2s\0"
+ "Vertex2sv\0"
+ "Vertex3d\0"
+ "Vertex3dv\0"
+ "Vertex3f\0"
+ "Vertex3fv\0"
+ "Vertex3i\0"
+ "Vertex3iv\0"
+ "Vertex3s\0"
+ "Vertex3sv\0"
+ "Vertex4d\0"
+ "Vertex4dv\0"
+ "Vertex4f\0"
+ "Vertex4fv\0"
+ "Vertex4i\0"
+ "Vertex4iv\0"
+ "Vertex4s\0"
+ "Vertex4sv\0"
+ "VertexArrayRangeNV\0"
+ "VertexAttrib1d\0"
+ "VertexAttrib1dARB\0"
+ "VertexAttrib1dNV\0"
+ "VertexAttrib1dv\0"
+ "VertexAttrib1dvARB\0"
+ "VertexAttrib1dvNV\0"
+ "VertexAttrib1f\0"
+ "VertexAttrib1fARB\0"
+ "VertexAttrib1fNV\0"
+ "VertexAttrib1fv\0"
+ "VertexAttrib1fvARB\0"
+ "VertexAttrib1fvNV\0"
+ "VertexAttrib1s\0"
+ "VertexAttrib1sARB\0"
+ "VertexAttrib1sNV\0"
+ "VertexAttrib1sv\0"
+ "VertexAttrib1svARB\0"
+ "VertexAttrib1svNV\0"
+ "VertexAttrib2d\0"
+ "VertexAttrib2dARB\0"
+ "VertexAttrib2dNV\0"
+ "VertexAttrib2dv\0"
+ "VertexAttrib2dvARB\0"
+ "VertexAttrib2dvNV\0"
+ "VertexAttrib2f\0"
+ "VertexAttrib2fARB\0"
+ "VertexAttrib2fNV\0"
+ "VertexAttrib2fv\0"
+ "VertexAttrib2fvARB\0"
+ "VertexAttrib2fvNV\0"
+ "VertexAttrib2s\0"
+ "VertexAttrib2sARB\0"
+ "VertexAttrib2sNV\0"
+ "VertexAttrib2sv\0"
+ "VertexAttrib2svARB\0"
+ "VertexAttrib2svNV\0"
+ "VertexAttrib3d\0"
+ "VertexAttrib3dARB\0"
+ "VertexAttrib3dNV\0"
+ "VertexAttrib3dv\0"
+ "VertexAttrib3dvARB\0"
+ "VertexAttrib3dvNV\0"
+ "VertexAttrib3f\0"
+ "VertexAttrib3fARB\0"
+ "VertexAttrib3fNV\0"
+ "VertexAttrib3fv\0"
+ "VertexAttrib3fvARB\0"
+ "VertexAttrib3fvNV\0"
+ "VertexAttrib3s\0"
+ "VertexAttrib3sARB\0"
+ "VertexAttrib3sNV\0"
+ "VertexAttrib3sv\0"
+ "VertexAttrib3svARB\0"
+ "VertexAttrib3svNV\0"
+ "VertexAttrib4Nbv\0"
+ "VertexAttrib4NbvARB\0"
+ "VertexAttrib4Niv\0"
+ "VertexAttrib4NivARB\0"
+ "VertexAttrib4Nsv\0"
+ "VertexAttrib4NsvARB\0"
+ "VertexAttrib4Nub\0"
+ "VertexAttrib4NubARB\0"
+ "VertexAttrib4Nubv\0"
+ "VertexAttrib4NubvARB\0"
+ "VertexAttrib4Nuiv\0"
+ "VertexAttrib4NuivARB\0"
+ "VertexAttrib4Nusv\0"
+ "VertexAttrib4NusvARB\0"
+ "VertexAttrib4bv\0"
+ "VertexAttrib4bvARB\0"
+ "VertexAttrib4d\0"
+ "VertexAttrib4dARB\0"
+ "VertexAttrib4dNV\0"
+ "VertexAttrib4dv\0"
+ "VertexAttrib4dvARB\0"
+ "VertexAttrib4dvNV\0"
+ "VertexAttrib4f\0"
+ "VertexAttrib4fARB\0"
+ "VertexAttrib4fNV\0"
+ "VertexAttrib4fv\0"
+ "VertexAttrib4fvARB\0"
+ "VertexAttrib4fvNV\0"
+ "VertexAttrib4iv\0"
+ "VertexAttrib4ivARB\0"
+ "VertexAttrib4s\0"
+ "VertexAttrib4sARB\0"
+ "VertexAttrib4sNV\0"
+ "VertexAttrib4sv\0"
+ "VertexAttrib4svARB\0"
+ "VertexAttrib4svNV\0"
+ "VertexAttrib4ubNV\0"
+ "VertexAttrib4ubv\0"
+ "VertexAttrib4ubvARB\0"
+ "VertexAttrib4ubvNV\0"
+ "VertexAttrib4uiv\0"
+ "VertexAttrib4uivARB\0"
+ "VertexAttrib4usv\0"
+ "VertexAttrib4usvARB\0"
+ "VertexAttribDivisor\0"
+ "VertexAttribDivisorARB\0"
+ "VertexAttribI1i\0"
+ "VertexAttribI1iEXT\0"
+ "VertexAttribI1iv\0"
+ "VertexAttribI1ivEXT\0"
+ "VertexAttribI1ui\0"
+ "VertexAttribI1uiEXT\0"
+ "VertexAttribI1uiv\0"
+ "VertexAttribI1uivEXT\0"
+ "VertexAttribI2i\0"
+ "VertexAttribI2iEXT\0"
+ "VertexAttribI2iv\0"
+ "VertexAttribI2ivEXT\0"
+ "VertexAttribI2ui\0"
+ "VertexAttribI2uiEXT\0"
+ "VertexAttribI2uiv\0"
+ "VertexAttribI2uivEXT\0"
+ "VertexAttribI3i\0"
+ "VertexAttribI3iEXT\0"
+ "VertexAttribI3iv\0"
+ "VertexAttribI3ivEXT\0"
+ "VertexAttribI3ui\0"
+ "VertexAttribI3uiEXT\0"
+ "VertexAttribI3uiv\0"
+ "VertexAttribI3uivEXT\0"
+ "VertexAttribI4bv\0"
+ "VertexAttribI4bvEXT\0"
+ "VertexAttribI4i\0"
+ "VertexAttribI4iEXT\0"
+ "VertexAttribI4iv\0"
+ "VertexAttribI4ivEXT\0"
+ "VertexAttribI4sv\0"
+ "VertexAttribI4svEXT\0"
+ "VertexAttribI4ubv\0"
+ "VertexAttribI4ubvEXT\0"
+ "VertexAttribI4ui\0"
+ "VertexAttribI4uiEXT\0"
+ "VertexAttribI4uiv\0"
+ "VertexAttribI4uivEXT\0"
+ "VertexAttribI4usv\0"
+ "VertexAttribI4usvEXT\0"
+ "VertexAttribIPointer\0"
+ "VertexAttribIPointerEXT\0"
+ "VertexAttribPointer\0"
+ "VertexAttribPointerARB\0"
+ "VertexAttribPointerNV\0"
+ "VertexAttribs1dvNV\0"
+ "VertexAttribs1fvNV\0"
+ "VertexAttribs1svNV\0"
+ "VertexAttribs2dvNV\0"
+ "VertexAttribs2fvNV\0"
+ "VertexAttribs2svNV\0"
+ "VertexAttribs3dvNV\0"
+ "VertexAttribs3fvNV\0"
+ "VertexAttribs3svNV\0"
+ "VertexAttribs4dvNV\0"
+ "VertexAttribs4fvNV\0"
+ "VertexAttribs4svNV\0"
+ "VertexAttribs4ubvNV\0"
+ "VertexPointer\0"
+ "VertexPointerEXT\0"
+ "Viewport\0"
+ "WaitSync\0"
+ "WindowPos2d\0"
+ "WindowPos2dARB\0"
+ "WindowPos2dMESA\0"
+ "WindowPos2dv\0"
+ "WindowPos2dvARB\0"
+ "WindowPos2dvMESA\0"
+ "WindowPos2f\0"
+ "WindowPos2fARB\0"
+ "WindowPos2fMESA\0"
+ "WindowPos2fv\0"
+ "WindowPos2fvARB\0"
+ "WindowPos2fvMESA\0"
+ "WindowPos2i\0"
+ "WindowPos2iARB\0"
+ "WindowPos2iMESA\0"
+ "WindowPos2iv\0"
+ "WindowPos2ivARB\0"
+ "WindowPos2ivMESA\0"
+ "WindowPos2s\0"
+ "WindowPos2sARB\0"
+ "WindowPos2sMESA\0"
+ "WindowPos2sv\0"
+ "WindowPos2svARB\0"
+ "WindowPos2svMESA\0"
+ "WindowPos3d\0"
+ "WindowPos3dARB\0"
+ "WindowPos3dMESA\0"
+ "WindowPos3dv\0"
+ "WindowPos3dvARB\0"
+ "WindowPos3dvMESA\0"
+ "WindowPos3f\0"
+ "WindowPos3fARB\0"
+ "WindowPos3fMESA\0"
+ "WindowPos3fv\0"
+ "WindowPos3fvARB\0"
+ "WindowPos3fvMESA\0"
+ "WindowPos3i\0"
+ "WindowPos3iARB\0"
+ "WindowPos3iMESA\0"
+ "WindowPos3iv\0"
+ "WindowPos3ivARB\0"
+ "WindowPos3ivMESA\0"
+ "WindowPos3s\0"
+ "WindowPos3sARB\0"
+ "WindowPos3sMESA\0"
+ "WindowPos3sv\0"
+ "WindowPos3svARB\0"
+ "WindowPos3svMESA\0"
+ "WindowPos4dMESA\0"
+ "WindowPos4dvMESA\0"
+ "WindowPos4fMESA\0"
+ "WindowPos4fvMESA\0"
+ "WindowPos4iMESA\0"
+ "WindowPos4ivMESA\0"
+ "WindowPos4sMESA\0"
+ "WindowPos4svMESA";
+
+static const struct mapi_stub public_stubs[] = {
+ { (void *) 0, 213, NULL },
+ { (void *) 6, 940, NULL },
+ { (void *) 23, 797, NULL },
+ { (void *) 44, 374, NULL },
+ { (void *) 58, 374, NULL },
+ { (void *) 75, 781, NULL },
+ { (void *) 95, 782, NULL },
+ { (void *) 115, 783, NULL },
+ { (void *) 135, 240, NULL },
+ { (void *) 145, 810, NULL },
+ { (void *) 156, 810, NULL },
+ { (void *) 170, 717, NULL },
+ { (void *) 192, 322, NULL },
+ { (void *) 212, 322, NULL },
+ { (void *) 235, 306, NULL },
+ { (void *) 248, 306, NULL },
+ { (void *) 264, 529, NULL },
+ { (void *) 280, 408, NULL },
+ { (void *) 293, 7, NULL },
+ { (void *) 299, 925, NULL },
+ { (void *) 322, 925, NULL },
+ { (void *) 347, 784, NULL },
+ { (void *) 370, 521, NULL },
+ { (void *) 381, 521, NULL },
+ { (void *) 395, 927, NULL },
+ { (void *) 418, 927, NULL },
+ { (void *) 444, 568, NULL },
+ { (void *) 463, 568, NULL },
+ { (void *) 485, 510, NULL },
+ { (void *) 496, 510, NULL },
+ { (void *) 510, 928, NULL },
+ { (void *) 525, 928, NULL },
+ { (void *) 543, 929, NULL },
+ { (void *) 563, 930, NULL },
+ { (void *) 579, 930, NULL },
+ { (void *) 598, 878, NULL },
+ { (void *) 619, 878, NULL },
+ { (void *) 643, 785, NULL },
+ { (void *) 665, 858, NULL },
+ { (void *) 681, 858, NULL },
+ { (void *) 700, 858, NULL },
+ { (void *) 719, 718, NULL },
+ { (void *) 734, 718, NULL },
+ { (void *) 748, 859, NULL },
+ { (void *) 765, 859, NULL },
+ { (void *) 785, 859, NULL },
+ { (void *) 805, 307, NULL },
+ { (void *) 817, 307, NULL },
+ { (void *) 832, 598, NULL },
+ { (void *) 854, 581, NULL },
+ { (void *) 870, 798, NULL },
+ { (void *) 891, 8, NULL },
+ { (void *) 898, 336, NULL },
+ { (void *) 909, 336, NULL },
+ { (void *) 923, 337, NULL },
+ { (void *) 937, 337, NULL },
+ { (void *) 954, 337, NULL },
+ { (void *) 971, 857, NULL },
+ { (void *) 993, 857, NULL },
+ { (void *) 1018, 857, NULL },
+ { (void *) 1043, 857, NULL },
+ { (void *) 1068, 594, NULL },
+ { (void *) 1094, 595, NULL },
+ { (void *) 1112, 241, NULL },
+ { (void *) 1122, 667, NULL },
+ { (void *) 1140, 667, NULL },
+ { (void *) 1161, 667, NULL },
+ { (void *) 1183, 667, NULL },
+ { (void *) 1204, 596, NULL },
+ { (void *) 1226, 597, NULL },
+ { (void *) 1240, 875, NULL },
+ { (void *) 1256, 875, NULL },
+ { (void *) 1275, 511, NULL },
+ { (void *) 1286, 511, NULL },
+ { (void *) 1300, 876, NULL },
+ { (void *) 1322, 512, NULL },
+ { (void *) 1336, 512, NULL },
+ { (void *) 1353, 2, NULL },
+ { (void *) 1362, 3, NULL },
+ { (void *) 1372, 860, NULL },
+ { (void *) 1395, 860, NULL },
+ { (void *) 1421, 860, NULL },
+ { (void *) 1447, 430, NULL },
+ { (void *) 1458, 203, NULL },
+ { (void *) 1464, 204, NULL },
+ { (void *) 1475, 431, NULL },
+ { (void *) 1489, 432, NULL },
+ { (void *) 1503, 433, NULL },
+ { (void *) 1517, 434, NULL },
+ { (void *) 1532, 206, NULL },
+ { (void *) 1543, 919, NULL },
+ { (void *) 1559, 920, NULL },
+ { (void *) 1576, 811, NULL },
+ { (void *) 1588, 811, NULL },
+ { (void *) 1603, 208, NULL },
+ { (void *) 1614, 605, NULL },
+ { (void *) 1626, 605, NULL },
+ { (void *) 1641, 812, NULL },
+ { (void *) 1653, 812, NULL },
+ { (void *) 1668, 205, NULL },
+ { (void *) 1679, 207, NULL },
+ { (void *) 1692, 375, NULL },
+ { (void *) 1712, 375, NULL },
+ { (void *) 1735, 584, NULL },
+ { (void *) 1750, 150, NULL },
+ { (void *) 1760, 852, NULL },
+ { (void *) 1771, 852, NULL },
+ { (void *) 1785, 813, NULL },
+ { (void *) 1796, 813, NULL },
+ { (void *) 1810, 9, NULL },
+ { (void *) 1818, 10, NULL },
+ { (void *) 1827, 11, NULL },
+ { (void *) 1835, 12, NULL },
+ { (void *) 1844, 13, NULL },
+ { (void *) 1852, 14, NULL },
+ { (void *) 1861, 15, NULL },
+ { (void *) 1869, 16, NULL },
+ { (void *) 1878, 17, NULL },
+ { (void *) 1886, 18, NULL },
+ { (void *) 1895, 19, NULL },
+ { (void *) 1904, 20, NULL },
+ { (void *) 1914, 21, NULL },
+ { (void *) 1923, 22, NULL },
+ { (void *) 1933, 23, NULL },
+ { (void *) 1942, 24, NULL },
+ { (void *) 1952, 25, NULL },
+ { (void *) 1960, 26, NULL },
+ { (void *) 1969, 27, NULL },
+ { (void *) 1977, 28, NULL },
+ { (void *) 1986, 29, NULL },
+ { (void *) 1994, 30, NULL },
+ { (void *) 2003, 31, NULL },
+ { (void *) 2011, 32, NULL },
+ { (void *) 2020, 33, NULL },
+ { (void *) 2028, 34, NULL },
+ { (void *) 2037, 35, NULL },
+ { (void *) 2046, 36, NULL },
+ { (void *) 2056, 37, NULL },
+ { (void *) 2065, 38, NULL },
+ { (void *) 2075, 39, NULL },
+ { (void *) 2084, 40, NULL },
+ { (void *) 2094, 814, NULL },
+ { (void *) 2102, 814, NULL },
+ { (void *) 2113, 786, NULL },
+ { (void *) 2133, 787, NULL },
+ { (void *) 2153, 788, NULL },
+ { (void *) 2173, 210, NULL },
+ { (void *) 2183, 913, NULL },
+ { (void *) 2203, 913, NULL },
+ { (void *) 2214, 151, NULL },
+ { (void *) 2228, 308, NULL },
+ { (void *) 2241, 632, NULL },
+ { (void *) 2257, 346, NULL },
+ { (void *) 2271, 346, NULL },
+ { (void *) 2288, 339, NULL },
+ { (void *) 2299, 339, NULL },
+ { (void *) 2313, 340, NULL },
+ { (void *) 2335, 340, NULL },
+ { (void *) 2360, 341, NULL },
+ { (void *) 2382, 341, NULL },
+ { (void *) 2407, 339, NULL },
+ { (void *) 2421, 670, NULL },
+ { (void *) 2437, 671, NULL },
+ { (void *) 2454, 672, NULL },
+ { (void *) 2475, 673, NULL },
+ { (void *) 2497, 674, NULL },
+ { (void *) 2518, 675, NULL },
+ { (void *) 2540, 530, NULL },
+ { (void *) 2554, 530, NULL },
+ { (void *) 2571, 446, NULL },
+ { (void *) 2592, 446, NULL },
+ { (void *) 2616, 447, NULL },
+ { (void *) 2637, 447, NULL },
+ { (void *) 2661, 448, NULL },
+ { (void *) 2682, 448, NULL },
+ { (void *) 2706, 448, NULL },
+ { (void *) 2730, 449, NULL },
+ { (void *) 2754, 449, NULL },
+ { (void *) 2781, 450, NULL },
+ { (void *) 2805, 450, NULL },
+ { (void *) 2832, 451, NULL },
+ { (void *) 2856, 451, NULL },
+ { (void *) 2883, 451, NULL },
+ { (void *) 2910, 348, NULL },
+ { (void *) 2930, 348, NULL },
+ { (void *) 2953, 349, NULL },
+ { (void *) 2973, 349, NULL },
+ { (void *) 2996, 350, NULL },
+ { (void *) 3018, 350, NULL },
+ { (void *) 3043, 351, NULL },
+ { (void *) 3066, 351, NULL },
+ { (void *) 3092, 352, NULL },
+ { (void *) 3114, 352, NULL },
+ { (void *) 3139, 353, NULL },
+ { (void *) 3162, 353, NULL },
+ { (void *) 3188, 583, NULL },
+ { (void *) 3206, 347, NULL },
+ { (void *) 3224, 347, NULL },
+ { (void *) 3245, 342, NULL },
+ { (void *) 3260, 342, NULL },
+ { (void *) 3278, 354, NULL },
+ { (void *) 3302, 354, NULL },
+ { (void *) 3329, 355, NULL },
+ { (void *) 3353, 355, NULL },
+ { (void *) 3380, 255, NULL },
+ { (void *) 3391, 323, NULL },
+ { (void *) 3406, 323, NULL },
+ { (void *) 3424, 324, NULL },
+ { (void *) 3439, 324, NULL },
+ { (void *) 3457, 325, NULL },
+ { (void *) 3475, 325, NULL },
+ { (void *) 3496, 326, NULL },
+ { (void *) 3514, 326, NULL },
+ { (void *) 3535, 373, NULL },
+ { (void *) 3553, 373, NULL },
+ { (void *) 3574, 373, NULL },
+ { (void *) 3595, 409, NULL },
+ { (void *) 3609, 531, NULL },
+ { (void *) 3632, 410, NULL },
+ { (void *) 3645, 532, NULL },
+ { (void *) 3667, 941, NULL },
+ { (void *) 3690, 152, NULL },
+ { (void *) 3699, 513, NULL },
+ { (void *) 3713, 513, NULL },
+ { (void *) 3730, 710, NULL },
+ { (void *) 3745, 789, NULL },
+ { (void *) 3769, 861, NULL },
+ { (void *) 3788, 861, NULL },
+ { (void *) 3810, 861, NULL },
+ { (void *) 3832, 4, NULL },
+ { (void *) 3844, 533, NULL },
+ { (void *) 3860, 411, NULL },
+ { (void *) 3874, 719, NULL },
+ { (void *) 3892, 719, NULL },
+ { (void *) 3909, 522, NULL },
+ { (void *) 3923, 522, NULL },
+ { (void *) 3940, 862, NULL },
+ { (void *) 3960, 862, NULL },
+ { (void *) 3983, 862, NULL },
+ { (void *) 4006, 412, NULL },
+ { (void *) 4019, 585, NULL },
+ { (void *) 4030, 327, NULL },
+ { (void *) 4045, 327, NULL },
+ { (void *) 4063, 599, NULL },
+ { (void *) 4088, 799, NULL },
+ { (void *) 4107, 799, NULL },
+ { (void *) 4131, 856, NULL },
+ { (void *) 4146, 245, NULL },
+ { (void *) 4156, 211, NULL },
+ { (void *) 4166, 288, NULL },
+ { (void *) 4177, 606, NULL },
+ { (void *) 4189, 606, NULL },
+ { (void *) 4204, 815, NULL },
+ { (void *) 4216, 815, NULL },
+ { (void *) 4231, 534, NULL },
+ { (void *) 4247, 413, NULL },
+ { (void *) 4260, 214, NULL },
+ { (void *) 4268, 309, NULL },
+ { (void *) 4287, 914, NULL },
+ { (void *) 4305, 453, NULL },
+ { (void *) 4330, 453, NULL },
+ { (void *) 4358, 914, NULL },
+ { (void *) 4367, 310, NULL },
+ { (void *) 4378, 310, NULL },
+ { (void *) 4392, 572, NULL },
+ { (void *) 4412, 572, NULL },
+ { (void *) 4435, 572, NULL },
+ { (void *) 4458, 202, NULL },
+ { (void *) 4469, 571, NULL },
+ { (void *) 4481, 571, NULL },
+ { (void *) 4496, 571, NULL },
+ { (void *) 4511, 311, NULL },
+ { (void *) 4524, 591, NULL },
+ { (void *) 4547, 573, NULL },
+ { (void *) 4569, 573, NULL },
+ { (void *) 4594, 573, NULL },
+ { (void *) 4619, 257, NULL },
+ { (void *) 4630, 338, NULL },
+ { (void *) 4648, 592, NULL },
+ { (void *) 4676, 338, NULL },
+ { (void *) 4697, 614, NULL },
+ { (void *) 4709, 615, NULL },
+ { (void *) 4722, 616, NULL },
+ { (void *) 4734, 617, NULL },
+ { (void *) 4747, 618, NULL },
+ { (void *) 4759, 619, NULL },
+ { (void *) 4772, 620, NULL },
+ { (void *) 4784, 621, NULL },
+ { (void *) 4797, 600, NULL },
+ { (void *) 4819, 949, NULL },
+ { (void *) 4856, 950, NULL },
+ { (void *) 4883, 41, NULL },
+ { (void *) 4892, 312, NULL },
+ { (void *) 4908, 633, NULL },
+ { (void *) 4927, 42, NULL },
+ { (void *) 4937, 215, NULL },
+ { (void *) 4944, 313, NULL },
+ { (void *) 4962, 915, NULL },
+ { (void *) 4979, 454, NULL },
+ { (void *) 5003, 454, NULL },
+ { (void *) 5030, 915, NULL },
+ { (void *) 5038, 43, NULL },
+ { (void *) 5042, 926, NULL },
+ { (void *) 5063, 926, NULL },
+ { (void *) 5086, 790, NULL },
+ { (void *) 5107, 1, NULL },
+ { (void *) 5115, 523, NULL },
+ { (void *) 5124, 523, NULL },
+ { (void *) 5136, 931, NULL },
+ { (void *) 5157, 931, NULL },
+ { (void *) 5181, 228, NULL },
+ { (void *) 5193, 229, NULL },
+ { (void *) 5206, 230, NULL },
+ { (void *) 5218, 231, NULL },
+ { (void *) 5231, 232, NULL },
+ { (void *) 5243, 233, NULL },
+ { (void *) 5256, 234, NULL },
+ { (void *) 5268, 235, NULL },
+ { (void *) 5281, 236, NULL },
+ { (void *) 5291, 238, NULL },
+ { (void *) 5301, 237, NULL },
+ { (void *) 5312, 239, NULL },
+ { (void *) 5323, 720, NULL },
+ { (void *) 5340, 194, NULL },
+ { (void *) 5355, 586, NULL },
+ { (void *) 5365, 676, NULL },
+ { (void *) 5386, 216, NULL },
+ { (void *) 5393, 711, NULL },
+ { (void *) 5407, 217, NULL },
+ { (void *) 5413, 579, NULL },
+ { (void *) 5436, 877, NULL },
+ { (void *) 5464, 668, NULL },
+ { (void *) 5488, 661, NULL },
+ { (void *) 5504, 661, NULL },
+ { (void *) 5523, 662, NULL },
+ { (void *) 5533, 662, NULL },
+ { (void *) 5546, 663, NULL },
+ { (void *) 5557, 663, NULL },
+ { (void *) 5571, 664, NULL },
+ { (void *) 5581, 664, NULL },
+ { (void *) 5594, 665, NULL },
+ { (void *) 5605, 665, NULL },
+ { (void *) 5619, 153, NULL },
+ { (void *) 5624, 154, NULL },
+ { (void *) 5630, 155, NULL },
+ { (void *) 5635, 156, NULL },
+ { (void *) 5641, 816, NULL },
+ { (void *) 5646, 816, NULL },
+ { (void *) 5654, 817, NULL },
+ { (void *) 5660, 817, NULL },
+ { (void *) 5669, 863, NULL },
+ { (void *) 5693, 863, NULL },
+ { (void *) 5720, 863, NULL },
+ { (void *) 5747, 437, NULL },
+ { (void *) 5766, 864, NULL },
+ { (void *) 5787, 864, NULL },
+ { (void *) 5811, 865, NULL },
+ { (void *) 5832, 865, NULL },
+ { (void *) 5856, 865, NULL },
+ { (void *) 5880, 866, NULL },
+ { (void *) 5901, 866, NULL },
+ { (void *) 5925, 866, NULL },
+ { (void *) 5949, 575, NULL },
+ { (void *) 5971, 576, NULL },
+ { (void *) 5997, 912, NULL },
+ { (void *) 6021, 912, NULL },
+ { (void *) 6048, 157, NULL },
+ { (void *) 6058, 289, NULL },
+ { (void *) 6066, 853, NULL },
+ { (void *) 6075, 853, NULL },
+ { (void *) 6087, 818, NULL },
+ { (void *) 6096, 818, NULL },
+ { (void *) 6108, 514, NULL },
+ { (void *) 6119, 514, NULL },
+ { (void *) 6133, 712, NULL },
+ { (void *) 6145, 791, NULL },
+ { (void *) 6167, 867, NULL },
+ { (void *) 6183, 867, NULL },
+ { (void *) 6202, 867, NULL },
+ { (void *) 6221, 5, NULL },
+ { (void *) 6230, 721, NULL },
+ { (void *) 6245, 721, NULL },
+ { (void *) 6259, 524, NULL },
+ { (void *) 6270, 524, NULL },
+ { (void *) 6284, 868, NULL },
+ { (void *) 6301, 868, NULL },
+ { (void *) 6321, 868, NULL },
+ { (void *) 6341, 328, NULL },
+ { (void *) 6353, 328, NULL },
+ { (void *) 6368, 601, NULL },
+ { (void *) 6390, 582, NULL },
+ { (void *) 6406, 800, NULL },
+ { (void *) 6427, 869, NULL },
+ { (void *) 6442, 869, NULL },
+ { (void *) 6460, 869, NULL },
+ { (void *) 6478, 569, NULL },
+ { (void *) 6494, 569, NULL },
+ { (void *) 6513, 535, NULL },
+ { (void *) 6530, 535, NULL },
+ { (void *) 6550, 536, NULL },
+ { (void *) 6572, 414, NULL },
+ { (void *) 6591, 570, NULL },
+ { (void *) 6609, 570, NULL },
+ { (void *) 6630, 916, NULL },
+ { (void *) 6652, 916, NULL },
+ { (void *) 6666, 258, NULL },
+ { (void *) 6678, 438, NULL },
+ { (void *) 6701, 515, NULL },
+ { (void *) 6722, 515, NULL },
+ { (void *) 6746, 516, NULL },
+ { (void *) 6764, 516, NULL },
+ { (void *) 6785, 516, NULL },
+ { (void *) 6806, 517, NULL },
+ { (void *) 6823, 517, NULL },
+ { (void *) 6843, 259, NULL },
+ { (void *) 6856, 854, NULL },
+ { (void *) 6870, 854, NULL },
+ { (void *) 6887, 819, NULL },
+ { (void *) 6901, 819, NULL },
+ { (void *) 6918, 343, NULL },
+ { (void *) 6932, 343, NULL },
+ { (void *) 6949, 344, NULL },
+ { (void *) 6974, 344, NULL },
+ { (void *) 7002, 344, NULL },
+ { (void *) 7030, 345, NULL },
+ { (void *) 7055, 345, NULL },
+ { (void *) 7083, 345, NULL },
+ { (void *) 7111, 343, NULL },
+ { (void *) 7128, 677, NULL },
+ { (void *) 7158, 678, NULL },
+ { (void *) 7188, 679, NULL },
+ { (void *) 7219, 680, NULL },
+ { (void *) 7250, 452, NULL },
+ { (void *) 7272, 452, NULL },
+ { (void *) 7297, 356, NULL },
+ { (void *) 7318, 356, NULL },
+ { (void *) 7342, 357, NULL },
+ { (void *) 7368, 357, NULL },
+ { (void *) 7397, 358, NULL },
+ { (void *) 7423, 358, NULL },
+ { (void *) 7452, 260, NULL },
+ { (void *) 7463, 261, NULL },
+ { (void *) 7472, 713, NULL },
+ { (void *) 7485, 681, NULL },
+ { (void *) 7520, 682, NULL },
+ { (void *) 7555, 820, NULL },
+ { (void *) 7565, 820, NULL },
+ { (void *) 7578, 262, NULL },
+ { (void *) 7588, 879, NULL },
+ { (void *) 7608, 879, NULL },
+ { (void *) 7631, 870, NULL },
+ { (void *) 7667, 870, NULL },
+ { (void *) 7706, 870, NULL },
+ { (void *) 7745, 537, NULL },
+ { (void *) 7758, 361, NULL },
+ { (void *) 7771, 361, NULL },
+ { (void *) 7787, 362, NULL },
+ { (void *) 7811, 362, NULL },
+ { (void *) 7838, 363, NULL },
+ { (void *) 7862, 363, NULL },
+ { (void *) 7889, 538, NULL },
+ { (void *) 7903, 439, NULL },
+ { (void *) 7919, 587, NULL },
+ { (void *) 7933, 917, NULL },
+ { (void *) 7955, 917, NULL },
+ { (void *) 7969, 263, NULL },
+ { (void *) 7981, 264, NULL },
+ { (void *) 7992, 265, NULL },
+ { (void *) 8003, 821, NULL },
+ { (void *) 8014, 821, NULL },
+ { (void *) 8028, 266, NULL },
+ { (void *) 8037, 267, NULL },
+ { (void *) 8046, 268, NULL },
+ { (void *) 8055, 269, NULL },
+ { (void *) 8069, 270, NULL },
+ { (void *) 8083, 822, NULL },
+ { (void *) 8097, 822, NULL },
+ { (void *) 8114, 364, NULL },
+ { (void *) 8124, 364, NULL },
+ { (void *) 8137, 365, NULL },
+ { (void *) 8158, 365, NULL },
+ { (void *) 8182, 366, NULL },
+ { (void *) 8203, 366, NULL },
+ { (void *) 8227, 539, NULL },
+ { (void *) 8251, 937, NULL },
+ { (void *) 8277, 540, NULL },
+ { (void *) 8301, 271, NULL },
+ { (void *) 8315, 272, NULL },
+ { (void *) 8330, 273, NULL },
+ { (void *) 8345, 623, NULL },
+ { (void *) 8375, 624, NULL },
+ { (void *) 8405, 329, NULL },
+ { (void *) 8417, 329, NULL },
+ { (void *) 8432, 274, NULL },
+ { (void *) 8450, 610, NULL },
+ { (void *) 8467, 610, NULL },
+ { (void *) 8487, 455, NULL },
+ { (void *) 8515, 456, NULL },
+ { (void *) 8543, 415, NULL },
+ { (void *) 8561, 457, NULL },
+ { (void *) 8591, 458, NULL },
+ { (void *) 8621, 802, NULL },
+ { (void *) 8650, 803, NULL },
+ { (void *) 8679, 722, NULL },
+ { (void *) 8703, 723, NULL },
+ { (void *) 8727, 459, NULL },
+ { (void *) 8747, 724, NULL },
+ { (void *) 8766, 416, NULL },
+ { (void *) 8779, 460, NULL },
+ { (void *) 8795, 725, NULL },
+ { (void *) 8810, 947, NULL },
+ { (void *) 8832, 525, NULL },
+ { (void *) 8849, 525, NULL },
+ { (void *) 8869, 948, NULL },
+ { (void *) 8892, 526, NULL },
+ { (void *) 8910, 526, NULL },
+ { (void *) 8931, 527, NULL },
+ { (void *) 8942, 527, NULL },
+ { (void *) 8956, 871, NULL },
+ { (void *) 8983, 871, NULL },
+ { (void *) 9013, 871, NULL },
+ { (void *) 9043, 359, NULL },
+ { (void *) 9062, 359, NULL },
+ { (void *) 9084, 417, NULL },
+ { (void *) 9101, 607, NULL },
+ { (void *) 9126, 541, NULL },
+ { (void *) 9142, 541, NULL },
+ { (void *) 9161, 418, NULL },
+ { (void *) 9173, 275, NULL },
+ { (void *) 9183, 435, NULL },
+ { (void *) 9194, 588, NULL },
+ { (void *) 9204, 777, NULL },
+ { (void *) 9229, 778, NULL },
+ { (void *) 9254, 276, NULL },
+ { (void *) 9266, 277, NULL },
+ { (void *) 9278, 823, NULL },
+ { (void *) 9290, 823, NULL },
+ { (void *) 9305, 278, NULL },
+ { (void *) 9317, 279, NULL },
+ { (void *) 9329, 279, NULL },
+ { (void *) 9344, 280, NULL },
+ { (void *) 9356, 280, NULL },
+ { (void *) 9371, 824, NULL },
+ { (void *) 9386, 281, NULL },
+ { (void *) 9398, 284, NULL },
+ { (void *) 9421, 285, NULL },
+ { (void *) 9444, 921, NULL },
+ { (void *) 9463, 921, NULL },
+ { (void *) 9485, 922, NULL },
+ { (void *) 9505, 922, NULL },
+ { (void *) 9528, 935, NULL },
+ { (void *) 9557, 282, NULL },
+ { (void *) 9575, 283, NULL },
+ { (void *) 9593, 825, NULL },
+ { (void *) 9611, 825, NULL },
+ { (void *) 9632, 726, NULL },
+ { (void *) 9651, 932, NULL },
+ { (void *) 9679, 932, NULL },
+ { (void *) 9710, 542, NULL },
+ { (void *) 9729, 542, NULL },
+ { (void *) 9751, 543, NULL },
+ { (void *) 9764, 543, NULL },
+ { (void *) 9780, 544, NULL },
+ { (void *) 9793, 544, NULL },
+ { (void *) 9809, 880, NULL },
+ { (void *) 9823, 880, NULL },
+ { (void *) 9840, 881, NULL },
+ { (void *) 9859, 881, NULL },
+ { (void *) 9881, 882, NULL },
+ { (void *) 9901, 882, NULL },
+ { (void *) 9924, 727, NULL },
+ { (void *) 9948, 727, NULL },
+ { (void *) 9975, 727, NULL },
+ { (void *) 10001, 461, NULL },
+ { (void *) 10019, 461, NULL },
+ { (void *) 10040, 728, NULL },
+ { (void *) 10060, 462, NULL },
+ { (void *) 10078, 462, NULL },
+ { (void *) 10099, 729, NULL },
+ { (void *) 10119, 463, NULL },
+ { (void *) 10137, 463, NULL },
+ { (void *) 10158, 730, NULL },
+ { (void *) 10178, 158, NULL },
+ { (void *) 10183, 367, NULL },
+ { (void *) 10193, 367, NULL },
+ { (void *) 10206, 212, NULL },
+ { (void *) 10216, 314, NULL },
+ { (void *) 10229, 634, NULL },
+ { (void *) 10245, 44, NULL },
+ { (void *) 10252, 45, NULL },
+ { (void *) 10260, 46, NULL },
+ { (void *) 10267, 47, NULL },
+ { (void *) 10275, 48, NULL },
+ { (void *) 10282, 49, NULL },
+ { (void *) 10290, 50, NULL },
+ { (void *) 10297, 51, NULL },
+ { (void *) 10305, 315, NULL },
+ { (void *) 10313, 316, NULL },
+ { (void *) 10322, 197, NULL },
+ { (void *) 10332, 317, NULL },
+ { (void *) 10350, 518, NULL },
+ { (void *) 10359, 518, NULL },
+ { (void *) 10371, 286, NULL },
+ { (void *) 10381, 918, NULL },
+ { (void *) 10401, 918, NULL },
+ { (void *) 10412, 714, NULL },
+ { (void *) 10422, 872, NULL },
+ { (void *) 10436, 872, NULL },
+ { (void *) 10453, 872, NULL },
+ { (void *) 10470, 287, NULL },
+ { (void *) 10477, 419, NULL },
+ { (void *) 10487, 731, NULL },
+ { (void *) 10500, 731, NULL },
+ { (void *) 10512, 528, NULL },
+ { (void *) 10520, 528, NULL },
+ { (void *) 10531, 873, NULL },
+ { (void *) 10546, 873, NULL },
+ { (void *) 10564, 873, NULL },
+ { (void *) 10582, 420, NULL },
+ { (void *) 10591, 589, NULL },
+ { (void *) 10598, 330, NULL },
+ { (void *) 10608, 330, NULL },
+ { (void *) 10621, 602, NULL },
+ { (void *) 10641, 801, NULL },
+ { (void *) 10655, 801, NULL },
+ { (void *) 10674, 163, NULL },
+ { (void *) 10686, 164, NULL },
+ { (void *) 10699, 165, NULL },
+ { (void *) 10711, 166, NULL },
+ { (void *) 10724, 826, NULL },
+ { (void *) 10736, 826, NULL },
+ { (void *) 10751, 827, NULL },
+ { (void *) 10764, 827, NULL },
+ { (void *) 10780, 159, NULL },
+ { (void *) 10787, 160, NULL },
+ { (void *) 10795, 161, NULL },
+ { (void *) 10802, 162, NULL },
+ { (void *) 10810, 828, NULL },
+ { (void *) 10817, 828, NULL },
+ { (void *) 10827, 829, NULL },
+ { (void *) 10835, 829, NULL },
+ { (void *) 10846, 167, NULL },
+ { (void *) 10858, 168, NULL },
+ { (void *) 10868, 830, NULL },
+ { (void *) 10879, 830, NULL },
+ { (void *) 10893, 545, NULL },
+ { (void *) 10905, 545, NULL },
+ { (void *) 10920, 6, NULL },
+ { (void *) 10929, 290, NULL },
+ { (void *) 10942, 292, NULL },
+ { (void *) 10954, 291, NULL },
+ { (void *) 10966, 831, NULL },
+ { (void *) 10978, 831, NULL },
+ { (void *) 10993, 198, NULL },
+ { (void *) 11002, 732, NULL },
+ { (void *) 11016, 441, NULL },
+ { (void *) 11037, 441, NULL },
+ { (void *) 11061, 442, NULL },
+ { (void *) 11082, 442, NULL },
+ { (void *) 11106, 640, NULL },
+ { (void *) 11120, 242, NULL },
+ { (void *) 11128, 220, NULL },
+ { (void *) 11134, 221, NULL },
+ { (void *) 11140, 222, NULL },
+ { (void *) 11146, 223, NULL },
+ { (void *) 11152, 519, NULL },
+ { (void *) 11162, 519, NULL },
+ { (void *) 11175, 519, NULL },
+ { (void *) 11188, 580, NULL },
+ { (void *) 11203, 224, NULL },
+ { (void *) 11213, 225, NULL },
+ { (void *) 11223, 226, NULL },
+ { (void *) 11233, 227, NULL },
+ { (void *) 11243, 169, NULL },
+ { (void *) 11253, 170, NULL },
+ { (void *) 11264, 171, NULL },
+ { (void *) 11274, 172, NULL },
+ { (void *) 11285, 832, NULL },
+ { (void *) 11295, 832, NULL },
+ { (void *) 11308, 833, NULL },
+ { (void *) 11319, 833, NULL },
+ { (void *) 11333, 293, NULL },
+ { (void *) 11344, 368, NULL },
+ { (void *) 11351, 368, NULL },
+ { (void *) 11361, 295, NULL },
+ { (void *) 11373, 294, NULL },
+ { (void *) 11385, 834, NULL },
+ { (void *) 11397, 834, NULL },
+ { (void *) 11412, 443, NULL },
+ { (void *) 11433, 443, NULL },
+ { (void *) 11457, 444, NULL },
+ { (void *) 11478, 444, NULL },
+ { (void *) 11502, 659, NULL },
+ { (void *) 11518, 659, NULL },
+ { (void *) 11537, 660, NULL },
+ { (void *) 11555, 593, NULL },
+ { (void *) 11583, 660, NULL },
+ { (void *) 11604, 708, NULL },
+ { (void *) 11627, 709, NULL },
+ { (void *) 11652, 376, NULL },
+ { (void *) 11668, 376, NULL },
+ { (void *) 11687, 377, NULL },
+ { (void *) 11704, 377, NULL },
+ { (void *) 11724, 378, NULL },
+ { (void *) 11740, 378, NULL },
+ { (void *) 11759, 379, NULL },
+ { (void *) 11776, 379, NULL },
+ { (void *) 11796, 380, NULL },
+ { (void *) 11812, 380, NULL },
+ { (void *) 11831, 381, NULL },
+ { (void *) 11848, 381, NULL },
+ { (void *) 11868, 382, NULL },
+ { (void *) 11884, 382, NULL },
+ { (void *) 11903, 383, NULL },
+ { (void *) 11920, 383, NULL },
+ { (void *) 11940, 384, NULL },
+ { (void *) 11956, 384, NULL },
+ { (void *) 11975, 385, NULL },
+ { (void *) 11992, 385, NULL },
+ { (void *) 12012, 386, NULL },
+ { (void *) 12028, 386, NULL },
+ { (void *) 12047, 387, NULL },
+ { (void *) 12064, 387, NULL },
+ { (void *) 12084, 388, NULL },
+ { (void *) 12100, 388, NULL },
+ { (void *) 12119, 389, NULL },
+ { (void *) 12136, 389, NULL },
+ { (void *) 12156, 390, NULL },
+ { (void *) 12172, 390, NULL },
+ { (void *) 12191, 391, NULL },
+ { (void *) 12208, 391, NULL },
+ { (void *) 12228, 392, NULL },
+ { (void *) 12244, 392, NULL },
+ { (void *) 12263, 393, NULL },
+ { (void *) 12280, 393, NULL },
+ { (void *) 12300, 394, NULL },
+ { (void *) 12316, 394, NULL },
+ { (void *) 12335, 395, NULL },
+ { (void *) 12352, 395, NULL },
+ { (void *) 12372, 396, NULL },
+ { (void *) 12388, 396, NULL },
+ { (void *) 12407, 397, NULL },
+ { (void *) 12424, 397, NULL },
+ { (void *) 12444, 398, NULL },
+ { (void *) 12460, 398, NULL },
+ { (void *) 12479, 399, NULL },
+ { (void *) 12496, 399, NULL },
+ { (void *) 12516, 400, NULL },
+ { (void *) 12532, 400, NULL },
+ { (void *) 12551, 401, NULL },
+ { (void *) 12568, 401, NULL },
+ { (void *) 12588, 402, NULL },
+ { (void *) 12604, 402, NULL },
+ { (void *) 12623, 403, NULL },
+ { (void *) 12640, 403, NULL },
+ { (void *) 12660, 404, NULL },
+ { (void *) 12676, 404, NULL },
+ { (void *) 12695, 405, NULL },
+ { (void *) 12712, 405, NULL },
+ { (void *) 12732, 406, NULL },
+ { (void *) 12748, 406, NULL },
+ { (void *) 12767, 407, NULL },
+ { (void *) 12784, 407, NULL },
+ { (void *) 12804, 835, NULL },
+ { (void *) 12820, 835, NULL },
+ { (void *) 12839, 0, NULL },
+ { (void *) 12847, 52, NULL },
+ { (void *) 12856, 53, NULL },
+ { (void *) 12866, 54, NULL },
+ { (void *) 12875, 55, NULL },
+ { (void *) 12885, 56, NULL },
+ { (void *) 12894, 57, NULL },
+ { (void *) 12904, 58, NULL },
+ { (void *) 12913, 59, NULL },
+ { (void *) 12923, 60, NULL },
+ { (void *) 12932, 61, NULL },
+ { (void *) 12942, 836, NULL },
+ { (void *) 12951, 836, NULL },
+ { (void *) 12963, 318, NULL },
+ { (void *) 12977, 635, NULL },
+ { (void *) 12994, 938, NULL },
+ { (void *) 13015, 939, NULL },
+ { (void *) 13038, 296, NULL },
+ { (void *) 13044, 855, NULL },
+ { (void *) 13051, 855, NULL },
+ { (void *) 13061, 837, NULL },
+ { (void *) 13068, 837, NULL },
+ { (void *) 13078, 792, NULL },
+ { (void *) 13094, 199, NULL },
+ { (void *) 13106, 603, NULL },
+ { (void *) 13129, 251, NULL },
+ { (void *) 13140, 252, NULL },
+ { (void *) 13152, 253, NULL },
+ { (void *) 13164, 249, NULL },
+ { (void *) 13176, 250, NULL },
+ { (void *) 13188, 625, NULL },
+ { (void *) 13214, 626, NULL },
+ { (void *) 13241, 627, NULL },
+ { (void *) 13267, 628, NULL },
+ { (void *) 13294, 666, NULL },
+ { (void *) 13310, 247, NULL },
+ { (void *) 13325, 248, NULL },
+ { (void *) 13340, 246, NULL },
+ { (void *) 13350, 638, NULL },
+ { (void *) 13366, 638, NULL },
+ { (void *) 13385, 638, NULL },
+ { (void *) 13404, 638, NULL },
+ { (void *) 13424, 639, NULL },
+ { (void *) 13441, 639, NULL },
+ { (void *) 13461, 639, NULL },
+ { (void *) 13481, 639, NULL },
+ { (void *) 13502, 795, NULL },
+ { (void *) 13518, 795, NULL },
+ { (void *) 13536, 796, NULL },
+ { (void *) 13553, 796, NULL },
+ { (void *) 13572, 838, NULL },
+ { (void *) 13588, 838, NULL },
+ { (void *) 13607, 839, NULL },
+ { (void *) 13624, 839, NULL },
+ { (void *) 13644, 173, NULL },
+ { (void *) 13654, 622, NULL },
+ { (void *) 13674, 840, NULL },
+ { (void *) 13685, 840, NULL },
+ { (void *) 13699, 174, NULL },
+ { (void *) 13711, 319, NULL },
+ { (void *) 13725, 613, NULL },
+ { (void *) 13742, 841, NULL },
+ { (void *) 13757, 841, NULL },
+ { (void *) 13775, 175, NULL },
+ { (void *) 13790, 218, NULL },
+ { (void *) 13800, 334, NULL },
+ { (void *) 13816, 297, NULL },
+ { (void *) 13826, 200, NULL },
+ { (void *) 13834, 808, NULL },
+ { (void *) 13856, 808, NULL },
+ { (void *) 13880, 809, NULL },
+ { (void *) 13899, 331, NULL },
+ { (void *) 13918, 331, NULL },
+ { (void *) 13940, 611, NULL },
+ { (void *) 13954, 611, NULL },
+ { (void *) 13971, 464, NULL },
+ { (void *) 13996, 465, NULL },
+ { (void *) 14022, 466, NULL },
+ { (void *) 14047, 467, NULL },
+ { (void *) 14073, 945, NULL },
+ { (void *) 14100, 468, NULL },
+ { (void *) 14127, 469, NULL },
+ { (void *) 14155, 470, NULL },
+ { (void *) 14182, 471, NULL },
+ { (void *) 14210, 946, NULL },
+ { (void *) 14239, 804, NULL },
+ { (void *) 14265, 805, NULL },
+ { (void *) 14292, 806, NULL },
+ { (void *) 14318, 807, NULL },
+ { (void *) 14345, 464, NULL },
+ { (void *) 14366, 465, NULL },
+ { (void *) 14388, 466, NULL },
+ { (void *) 14409, 467, NULL },
+ { (void *) 14431, 612, NULL },
+ { (void *) 14449, 577, NULL },
+ { (void *) 14470, 733, NULL },
+ { (void *) 14493, 734, NULL },
+ { (void *) 14516, 472, NULL },
+ { (void *) 14533, 934, NULL },
+ { (void *) 14549, 934, NULL },
+ { (void *) 14568, 219, NULL },
+ { (void *) 14579, 335, NULL },
+ { (void *) 14596, 298, NULL },
+ { (void *) 14607, 201, NULL },
+ { (void *) 14616, 629, NULL },
+ { (void *) 14632, 62, NULL },
+ { (void *) 14644, 63, NULL },
+ { (void *) 14657, 64, NULL },
+ { (void *) 14669, 65, NULL },
+ { (void *) 14682, 66, NULL },
+ { (void *) 14694, 67, NULL },
+ { (void *) 14707, 68, NULL },
+ { (void *) 14719, 69, NULL },
+ { (void *) 14732, 70, NULL },
+ { (void *) 14744, 71, NULL },
+ { (void *) 14757, 72, NULL },
+ { (void *) 14769, 73, NULL },
+ { (void *) 14782, 74, NULL },
+ { (void *) 14794, 75, NULL },
+ { (void *) 14807, 76, NULL },
+ { (void *) 14819, 77, NULL },
+ { (void *) 14832, 78, NULL },
+ { (void *) 14844, 79, NULL },
+ { (void *) 14857, 80, NULL },
+ { (void *) 14869, 81, NULL },
+ { (void *) 14882, 82, NULL },
+ { (void *) 14894, 83, NULL },
+ { (void *) 14907, 84, NULL },
+ { (void *) 14919, 85, NULL },
+ { (void *) 14932, 254, NULL },
+ { (void *) 14943, 256, NULL },
+ { (void *) 14954, 86, NULL },
+ { (void *) 14960, 87, NULL },
+ { (void *) 14967, 88, NULL },
+ { (void *) 14973, 89, NULL },
+ { (void *) 14980, 90, NULL },
+ { (void *) 14986, 91, NULL },
+ { (void *) 14993, 92, NULL },
+ { (void *) 14999, 93, NULL },
+ { (void *) 15006, 608, NULL },
+ { (void *) 15028, 196, NULL },
+ { (void *) 15039, 874, NULL },
+ { (void *) 15059, 874, NULL },
+ { (void *) 15082, 574, NULL },
+ { (void *) 15113, 574, NULL },
+ { (void *) 15147, 874, NULL },
+ { (void *) 15170, 735, NULL },
+ { (void *) 15196, 369, NULL },
+ { (void *) 15211, 369, NULL },
+ { (void *) 15229, 370, NULL },
+ { (void *) 15241, 370, NULL },
+ { (void *) 15256, 683, NULL },
+ { (void *) 15274, 604, NULL },
+ { (void *) 15298, 299, NULL },
+ { (void *) 15306, 300, NULL },
+ { (void *) 15314, 842, NULL },
+ { (void *) 15322, 842, NULL },
+ { (void *) 15333, 445, NULL },
+ { (void *) 15348, 445, NULL },
+ { (void *) 15366, 843, NULL },
+ { (void *) 15382, 843, NULL },
+ { (void *) 15401, 793, NULL },
+ { (void *) 15414, 630, NULL },
+ { (void *) 15428, 630, NULL },
+ { (void *) 15443, 631, NULL },
+ { (void *) 15460, 631, NULL },
+ { (void *) 15478, 301, NULL },
+ { (void *) 15485, 302, NULL },
+ { (void *) 15492, 844, NULL },
+ { (void *) 15499, 844, NULL },
+ { (void *) 15509, 176, NULL },
+ { (void *) 15517, 642, NULL },
+ { (void *) 15534, 642, NULL },
+ { (void *) 15554, 643, NULL },
+ { (void *) 15572, 643, NULL },
+ { (void *) 15593, 644, NULL },
+ { (void *) 15610, 644, NULL },
+ { (void *) 15630, 645, NULL },
+ { (void *) 15648, 645, NULL },
+ { (void *) 15669, 646, NULL },
+ { (void *) 15686, 646, NULL },
+ { (void *) 15706, 647, NULL },
+ { (void *) 15724, 647, NULL },
+ { (void *) 15745, 648, NULL },
+ { (void *) 15762, 648, NULL },
+ { (void *) 15782, 649, NULL },
+ { (void *) 15800, 649, NULL },
+ { (void *) 15821, 650, NULL },
+ { (void *) 15838, 650, NULL },
+ { (void *) 15858, 651, NULL },
+ { (void *) 15876, 651, NULL },
+ { (void *) 15897, 652, NULL },
+ { (void *) 15915, 652, NULL },
+ { (void *) 15936, 653, NULL },
+ { (void *) 15955, 653, NULL },
+ { (void *) 15977, 654, NULL },
+ { (void *) 15995, 654, NULL },
+ { (void *) 16016, 655, NULL },
+ { (void *) 16035, 655, NULL },
+ { (void *) 16057, 656, NULL },
+ { (void *) 16075, 656, NULL },
+ { (void *) 16096, 657, NULL },
+ { (void *) 16115, 657, NULL },
+ { (void *) 16137, 658, NULL },
+ { (void *) 16159, 658, NULL },
+ { (void *) 16184, 195, NULL },
+ { (void *) 16197, 360, NULL },
+ { (void *) 16215, 360, NULL },
+ { (void *) 16236, 715, NULL },
+ { (void *) 16247, 794, NULL },
+ { (void *) 16276, 177, NULL },
+ { (void *) 16287, 609, NULL },
+ { (void *) 16300, 546, NULL },
+ { (void *) 16313, 546, NULL },
+ { (void *) 16329, 243, NULL },
+ { (void *) 16341, 421, NULL },
+ { (void *) 16361, 944, NULL },
+ { (void *) 16384, 209, NULL },
+ { (void *) 16396, 422, NULL },
+ { (void *) 16416, 244, NULL },
+ { (void *) 16426, 423, NULL },
+ { (void *) 16444, 423, NULL },
+ { (void *) 16465, 716, NULL },
+ { (void *) 16477, 436, NULL },
+ { (void *) 16487, 779, NULL },
+ { (void *) 16509, 780, NULL },
+ { (void *) 16531, 94, NULL },
+ { (void *) 16542, 95, NULL },
+ { (void *) 16554, 96, NULL },
+ { (void *) 16565, 97, NULL },
+ { (void *) 16577, 98, NULL },
+ { (void *) 16588, 99, NULL },
+ { (void *) 16600, 100, NULL },
+ { (void *) 16611, 101, NULL },
+ { (void *) 16623, 102, NULL },
+ { (void *) 16634, 103, NULL },
+ { (void *) 16646, 104, NULL },
+ { (void *) 16657, 105, NULL },
+ { (void *) 16669, 106, NULL },
+ { (void *) 16680, 107, NULL },
+ { (void *) 16692, 108, NULL },
+ { (void *) 16703, 109, NULL },
+ { (void *) 16715, 110, NULL },
+ { (void *) 16726, 111, NULL },
+ { (void *) 16738, 112, NULL },
+ { (void *) 16749, 113, NULL },
+ { (void *) 16761, 114, NULL },
+ { (void *) 16772, 115, NULL },
+ { (void *) 16784, 116, NULL },
+ { (void *) 16795, 117, NULL },
+ { (void *) 16807, 118, NULL },
+ { (void *) 16818, 119, NULL },
+ { (void *) 16830, 120, NULL },
+ { (void *) 16841, 121, NULL },
+ { (void *) 16853, 122, NULL },
+ { (void *) 16864, 123, NULL },
+ { (void *) 16876, 124, NULL },
+ { (void *) 16887, 125, NULL },
+ { (void *) 16899, 320, NULL },
+ { (void *) 16915, 636, NULL },
+ { (void *) 16934, 184, NULL },
+ { (void *) 16942, 185, NULL },
+ { (void *) 16951, 186, NULL },
+ { (void *) 16959, 187, NULL },
+ { (void *) 16968, 845, NULL },
+ { (void *) 16976, 845, NULL },
+ { (void *) 16987, 846, NULL },
+ { (void *) 16996, 846, NULL },
+ { (void *) 17008, 188, NULL },
+ { (void *) 17016, 189, NULL },
+ { (void *) 17025, 190, NULL },
+ { (void *) 17033, 190, NULL },
+ { (void *) 17044, 191, NULL },
+ { (void *) 17053, 191, NULL },
+ { (void *) 17065, 192, NULL },
+ { (void *) 17073, 192, NULL },
+ { (void *) 17084, 193, NULL },
+ { (void *) 17093, 193, NULL },
+ { (void *) 17105, 847, NULL },
+ { (void *) 17116, 848, NULL },
+ { (void *) 17128, 182, NULL },
+ { (void *) 17139, 183, NULL },
+ { (void *) 17150, 371, NULL },
+ { (void *) 17161, 371, NULL },
+ { (void *) 17175, 371, NULL },
+ { (void *) 17189, 923, NULL },
+ { (void *) 17205, 923, NULL },
+ { (void *) 17224, 924, NULL },
+ { (void *) 17241, 924, NULL },
+ { (void *) 17261, 178, NULL },
+ { (void *) 17275, 179, NULL },
+ { (void *) 17290, 180, NULL },
+ { (void *) 17304, 181, NULL },
+ { (void *) 17319, 849, NULL },
+ { (void *) 17333, 849, NULL },
+ { (void *) 17350, 850, NULL },
+ { (void *) 17365, 850, NULL },
+ { (void *) 17383, 332, NULL },
+ { (void *) 17397, 332, NULL },
+ { (void *) 17414, 333, NULL },
+ { (void *) 17428, 333, NULL },
+ { (void *) 17445, 372, NULL },
+ { (void *) 17459, 372, NULL },
+ { (void *) 17476, 372, NULL },
+ { (void *) 17493, 943, NULL },
+ { (void *) 17510, 936, NULL },
+ { (void *) 17528, 736, NULL },
+ { (void *) 17542, 933, NULL },
+ { (void *) 17568, 933, NULL },
+ { (void *) 17597, 303, NULL },
+ { (void *) 17608, 304, NULL },
+ { (void *) 17619, 851, NULL },
+ { (void *) 17630, 851, NULL },
+ { (void *) 17644, 547, NULL },
+ { (void *) 17654, 547, NULL },
+ { (void *) 17667, 548, NULL },
+ { (void *) 17678, 548, NULL },
+ { (void *) 17692, 549, NULL },
+ { (void *) 17702, 549, NULL },
+ { (void *) 17715, 550, NULL },
+ { (void *) 17726, 550, NULL },
+ { (void *) 17740, 883, NULL },
+ { (void *) 17751, 883, NULL },
+ { (void *) 17765, 884, NULL },
+ { (void *) 17777, 884, NULL },
+ { (void *) 17792, 551, NULL },
+ { (void *) 17802, 551, NULL },
+ { (void *) 17815, 552, NULL },
+ { (void *) 17826, 552, NULL },
+ { (void *) 17840, 553, NULL },
+ { (void *) 17850, 553, NULL },
+ { (void *) 17863, 554, NULL },
+ { (void *) 17874, 554, NULL },
+ { (void *) 17888, 885, NULL },
+ { (void *) 17899, 885, NULL },
+ { (void *) 17913, 886, NULL },
+ { (void *) 17925, 886, NULL },
+ { (void *) 17940, 555, NULL },
+ { (void *) 17950, 555, NULL },
+ { (void *) 17963, 556, NULL },
+ { (void *) 17974, 556, NULL },
+ { (void *) 17988, 557, NULL },
+ { (void *) 17998, 557, NULL },
+ { (void *) 18011, 558, NULL },
+ { (void *) 18022, 558, NULL },
+ { (void *) 18036, 887, NULL },
+ { (void *) 18047, 887, NULL },
+ { (void *) 18061, 888, NULL },
+ { (void *) 18073, 888, NULL },
+ { (void *) 18088, 559, NULL },
+ { (void *) 18098, 559, NULL },
+ { (void *) 18111, 560, NULL },
+ { (void *) 18122, 560, NULL },
+ { (void *) 18136, 561, NULL },
+ { (void *) 18146, 561, NULL },
+ { (void *) 18159, 562, NULL },
+ { (void *) 18170, 562, NULL },
+ { (void *) 18184, 889, NULL },
+ { (void *) 18195, 889, NULL },
+ { (void *) 18209, 890, NULL },
+ { (void *) 18221, 890, NULL },
+ { (void *) 18236, 563, NULL },
+ { (void *) 18253, 563, NULL },
+ { (void *) 18273, 424, NULL },
+ { (void *) 18292, 425, NULL },
+ { (void *) 18311, 564, NULL },
+ { (void *) 18328, 564, NULL },
+ { (void *) 18348, 426, NULL },
+ { (void *) 18367, 427, NULL },
+ { (void *) 18386, 565, NULL },
+ { (void *) 18403, 565, NULL },
+ { (void *) 18423, 428, NULL },
+ { (void *) 18442, 429, NULL },
+ { (void *) 18461, 641, NULL },
+ { (void *) 18477, 520, NULL },
+ { (void *) 18489, 520, NULL },
+ { (void *) 18504, 520, NULL },
+ { (void *) 18519, 566, NULL },
+ { (void *) 18530, 566, NULL },
+ { (void *) 18550, 942, NULL },
+ { (void *) 18570, 567, NULL },
+ { (void *) 18586, 567, NULL },
+ { (void *) 18605, 126, NULL },
+ { (void *) 18614, 127, NULL },
+ { (void *) 18624, 128, NULL },
+ { (void *) 18633, 129, NULL },
+ { (void *) 18643, 130, NULL },
+ { (void *) 18652, 131, NULL },
+ { (void *) 18662, 132, NULL },
+ { (void *) 18671, 133, NULL },
+ { (void *) 18681, 134, NULL },
+ { (void *) 18690, 135, NULL },
+ { (void *) 18700, 136, NULL },
+ { (void *) 18709, 137, NULL },
+ { (void *) 18719, 138, NULL },
+ { (void *) 18728, 139, NULL },
+ { (void *) 18738, 140, NULL },
+ { (void *) 18747, 141, NULL },
+ { (void *) 18757, 142, NULL },
+ { (void *) 18766, 143, NULL },
+ { (void *) 18776, 144, NULL },
+ { (void *) 18785, 145, NULL },
+ { (void *) 18795, 146, NULL },
+ { (void *) 18804, 147, NULL },
+ { (void *) 18814, 148, NULL },
+ { (void *) 18823, 149, NULL },
+ { (void *) 18833, 669, NULL },
+ { (void *) 18852, 473, NULL },
+ { (void *) 18867, 473, NULL },
+ { (void *) 18885, 737, NULL },
+ { (void *) 18902, 474, NULL },
+ { (void *) 18918, 474, NULL },
+ { (void *) 18937, 738, NULL },
+ { (void *) 18955, 475, NULL },
+ { (void *) 18970, 475, NULL },
+ { (void *) 18988, 739, NULL },
+ { (void *) 19005, 476, NULL },
+ { (void *) 19021, 476, NULL },
+ { (void *) 19040, 740, NULL },
+ { (void *) 19058, 477, NULL },
+ { (void *) 19073, 477, NULL },
+ { (void *) 19091, 741, NULL },
+ { (void *) 19108, 478, NULL },
+ { (void *) 19124, 478, NULL },
+ { (void *) 19143, 742, NULL },
+ { (void *) 19161, 479, NULL },
+ { (void *) 19176, 479, NULL },
+ { (void *) 19194, 743, NULL },
+ { (void *) 19211, 480, NULL },
+ { (void *) 19227, 480, NULL },
+ { (void *) 19246, 744, NULL },
+ { (void *) 19264, 481, NULL },
+ { (void *) 19279, 481, NULL },
+ { (void *) 19297, 745, NULL },
+ { (void *) 19314, 482, NULL },
+ { (void *) 19330, 482, NULL },
+ { (void *) 19349, 746, NULL },
+ { (void *) 19367, 483, NULL },
+ { (void *) 19382, 483, NULL },
+ { (void *) 19400, 747, NULL },
+ { (void *) 19417, 484, NULL },
+ { (void *) 19433, 484, NULL },
+ { (void *) 19452, 748, NULL },
+ { (void *) 19470, 485, NULL },
+ { (void *) 19485, 485, NULL },
+ { (void *) 19503, 749, NULL },
+ { (void *) 19520, 486, NULL },
+ { (void *) 19536, 486, NULL },
+ { (void *) 19555, 750, NULL },
+ { (void *) 19573, 487, NULL },
+ { (void *) 19588, 487, NULL },
+ { (void *) 19606, 751, NULL },
+ { (void *) 19623, 488, NULL },
+ { (void *) 19639, 488, NULL },
+ { (void *) 19658, 752, NULL },
+ { (void *) 19676, 489, NULL },
+ { (void *) 19691, 489, NULL },
+ { (void *) 19709, 753, NULL },
+ { (void *) 19726, 490, NULL },
+ { (void *) 19742, 490, NULL },
+ { (void *) 19761, 754, NULL },
+ { (void *) 19779, 491, NULL },
+ { (void *) 19796, 491, NULL },
+ { (void *) 19816, 492, NULL },
+ { (void *) 19833, 492, NULL },
+ { (void *) 19853, 493, NULL },
+ { (void *) 19870, 493, NULL },
+ { (void *) 19890, 494, NULL },
+ { (void *) 19907, 494, NULL },
+ { (void *) 19927, 495, NULL },
+ { (void *) 19945, 495, NULL },
+ { (void *) 19966, 496, NULL },
+ { (void *) 19984, 496, NULL },
+ { (void *) 20005, 497, NULL },
+ { (void *) 20023, 497, NULL },
+ { (void *) 20044, 498, NULL },
+ { (void *) 20060, 498, NULL },
+ { (void *) 20079, 499, NULL },
+ { (void *) 20094, 499, NULL },
+ { (void *) 20112, 755, NULL },
+ { (void *) 20129, 500, NULL },
+ { (void *) 20145, 500, NULL },
+ { (void *) 20164, 756, NULL },
+ { (void *) 20182, 501, NULL },
+ { (void *) 20197, 501, NULL },
+ { (void *) 20215, 757, NULL },
+ { (void *) 20232, 502, NULL },
+ { (void *) 20248, 502, NULL },
+ { (void *) 20267, 758, NULL },
+ { (void *) 20285, 503, NULL },
+ { (void *) 20301, 503, NULL },
+ { (void *) 20320, 504, NULL },
+ { (void *) 20335, 504, NULL },
+ { (void *) 20353, 759, NULL },
+ { (void *) 20370, 505, NULL },
+ { (void *) 20386, 505, NULL },
+ { (void *) 20405, 760, NULL },
+ { (void *) 20423, 761, NULL },
+ { (void *) 20441, 506, NULL },
+ { (void *) 20458, 506, NULL },
+ { (void *) 20478, 762, NULL },
+ { (void *) 20497, 507, NULL },
+ { (void *) 20514, 507, NULL },
+ { (void *) 20534, 508, NULL },
+ { (void *) 20551, 508, NULL },
+ { (void *) 20571, 440, NULL },
+ { (void *) 20591, 578, NULL },
+ { (void *) 20614, 891, NULL },
+ { (void *) 20630, 891, NULL },
+ { (void *) 20649, 892, NULL },
+ { (void *) 20666, 892, NULL },
+ { (void *) 20686, 893, NULL },
+ { (void *) 20703, 893, NULL },
+ { (void *) 20723, 894, NULL },
+ { (void *) 20741, 894, NULL },
+ { (void *) 20762, 895, NULL },
+ { (void *) 20778, 895, NULL },
+ { (void *) 20797, 896, NULL },
+ { (void *) 20814, 896, NULL },
+ { (void *) 20834, 897, NULL },
+ { (void *) 20851, 897, NULL },
+ { (void *) 20871, 898, NULL },
+ { (void *) 20889, 898, NULL },
+ { (void *) 20910, 899, NULL },
+ { (void *) 20926, 899, NULL },
+ { (void *) 20945, 900, NULL },
+ { (void *) 20962, 900, NULL },
+ { (void *) 20982, 901, NULL },
+ { (void *) 20999, 901, NULL },
+ { (void *) 21019, 902, NULL },
+ { (void *) 21037, 902, NULL },
+ { (void *) 21058, 903, NULL },
+ { (void *) 21075, 903, NULL },
+ { (void *) 21095, 904, NULL },
+ { (void *) 21111, 904, NULL },
+ { (void *) 21130, 905, NULL },
+ { (void *) 21147, 905, NULL },
+ { (void *) 21167, 906, NULL },
+ { (void *) 21184, 906, NULL },
+ { (void *) 21204, 907, NULL },
+ { (void *) 21222, 907, NULL },
+ { (void *) 21243, 908, NULL },
+ { (void *) 21260, 908, NULL },
+ { (void *) 21280, 909, NULL },
+ { (void *) 21298, 909, NULL },
+ { (void *) 21319, 910, NULL },
+ { (void *) 21337, 910, NULL },
+ { (void *) 21358, 911, NULL },
+ { (void *) 21379, 911, NULL },
+ { (void *) 21403, 509, NULL },
+ { (void *) 21423, 509, NULL },
+ { (void *) 21446, 763, NULL },
+ { (void *) 21468, 764, NULL },
+ { (void *) 21487, 765, NULL },
+ { (void *) 21506, 766, NULL },
+ { (void *) 21525, 767, NULL },
+ { (void *) 21544, 768, NULL },
+ { (void *) 21563, 769, NULL },
+ { (void *) 21582, 770, NULL },
+ { (void *) 21601, 771, NULL },
+ { (void *) 21620, 772, NULL },
+ { (void *) 21639, 773, NULL },
+ { (void *) 21658, 774, NULL },
+ { (void *) 21677, 775, NULL },
+ { (void *) 21696, 776, NULL },
+ { (void *) 21716, 321, NULL },
+ { (void *) 21730, 637, NULL },
+ { (void *) 21747, 305, NULL },
+ { (void *) 21756, 590, NULL },
+ { (void *) 21765, 684, NULL },
+ { (void *) 21777, 684, NULL },
+ { (void *) 21792, 684, NULL },
+ { (void *) 21808, 685, NULL },
+ { (void *) 21821, 685, NULL },
+ { (void *) 21837, 685, NULL },
+ { (void *) 21854, 686, NULL },
+ { (void *) 21866, 686, NULL },
+ { (void *) 21881, 686, NULL },
+ { (void *) 21897, 687, NULL },
+ { (void *) 21910, 687, NULL },
+ { (void *) 21926, 687, NULL },
+ { (void *) 21943, 688, NULL },
+ { (void *) 21955, 688, NULL },
+ { (void *) 21970, 688, NULL },
+ { (void *) 21986, 689, NULL },
+ { (void *) 21999, 689, NULL },
+ { (void *) 22015, 689, NULL },
+ { (void *) 22032, 690, NULL },
+ { (void *) 22044, 690, NULL },
+ { (void *) 22059, 690, NULL },
+ { (void *) 22075, 691, NULL },
+ { (void *) 22088, 691, NULL },
+ { (void *) 22104, 691, NULL },
+ { (void *) 22121, 692, NULL },
+ { (void *) 22133, 692, NULL },
+ { (void *) 22148, 692, NULL },
+ { (void *) 22164, 693, NULL },
+ { (void *) 22177, 693, NULL },
+ { (void *) 22193, 693, NULL },
+ { (void *) 22210, 694, NULL },
+ { (void *) 22222, 694, NULL },
+ { (void *) 22237, 694, NULL },
+ { (void *) 22253, 695, NULL },
+ { (void *) 22266, 695, NULL },
+ { (void *) 22282, 695, NULL },
+ { (void *) 22299, 696, NULL },
+ { (void *) 22311, 696, NULL },
+ { (void *) 22326, 696, NULL },
+ { (void *) 22342, 697, NULL },
+ { (void *) 22355, 697, NULL },
+ { (void *) 22371, 697, NULL },
+ { (void *) 22388, 698, NULL },
+ { (void *) 22400, 698, NULL },
+ { (void *) 22415, 698, NULL },
+ { (void *) 22431, 699, NULL },
+ { (void *) 22444, 699, NULL },
+ { (void *) 22460, 699, NULL },
+ { (void *) 22477, 700, NULL },
+ { (void *) 22493, 701, NULL },
+ { (void *) 22510, 702, NULL },
+ { (void *) 22526, 703, NULL },
+ { (void *) 22543, 704, NULL },
+ { (void *) 22559, 705, NULL },
+ { (void *) 22576, 706, NULL },
+ { (void *) 22592, 707, NULL }
+};
+#undef MAPI_TMP_PUBLIC_STUBS
+#endif /* MAPI_TMP_PUBLIC_STUBS */
+
+#ifdef MAPI_TMP_PUBLIC_ENTRIES
+void APIENTRY shared_dispatch_stub_0(GLuint list, GLenum mode)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[0];
+ ((void (APIENTRY *)(GLuint list, GLenum mode)) _func)(list, mode);
+}
+
+void APIENTRY shared_dispatch_stub_1(void)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[1];
+ ((void (APIENTRY *)(void)) _func)();
+}
+
+void APIENTRY shared_dispatch_stub_2(GLuint list)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[2];
+ ((void (APIENTRY *)(GLuint list)) _func)(list);
+}
+
+void APIENTRY shared_dispatch_stub_3(GLsizei n, GLenum type, const GLvoid *lists)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[3];
+ ((void (APIENTRY *)(GLsizei n, GLenum type, const GLvoid *lists)) _func)(n, type, lists);
+}
+
+void APIENTRY shared_dispatch_stub_4(GLuint list, GLsizei range)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[4];
+ ((void (APIENTRY *)(GLuint list, GLsizei range)) _func)(list, range);
+}
+
+GLuint APIENTRY shared_dispatch_stub_5(GLsizei range)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[5];
+ return ((GLuint (APIENTRY *)(GLsizei range)) _func)(range);
+}
+
+void APIENTRY shared_dispatch_stub_6(GLuint base)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[6];
+ ((void (APIENTRY *)(GLuint base)) _func)(base);
+}
+
+void APIENTRY shared_dispatch_stub_7(GLenum mode)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[7];
+ ((void (APIENTRY *)(GLenum mode)) _func)(mode);
+}
+
+void APIENTRY shared_dispatch_stub_8(GLsizei width, GLsizei height, GLfloat xorig, GLfloat yorig, GLfloat xmove, GLfloat ymove, const GLubyte *bitmap)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[8];
+ ((void (APIENTRY *)(GLsizei width, GLsizei height, GLfloat xorig, GLfloat yorig, GLfloat xmove, GLfloat ymove, const GLubyte *bitmap)) _func)(width, height, xorig, yorig, xmove, ymove, bitmap);
+}
+
+void APIENTRY shared_dispatch_stub_9(GLbyte red, GLbyte green, GLbyte blue)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[9];
+ ((void (APIENTRY *)(GLbyte red, GLbyte green, GLbyte blue)) _func)(red, green, blue);
+}
+
+void APIENTRY shared_dispatch_stub_10(const GLbyte *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[10];
+ ((void (APIENTRY *)(const GLbyte *v)) _func)(v);
+}
+
+void APIENTRY shared_dispatch_stub_11(GLdouble red, GLdouble green, GLdouble blue)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[11];
+ ((void (APIENTRY *)(GLdouble red, GLdouble green, GLdouble blue)) _func)(red, green, blue);
+}
+
+void APIENTRY shared_dispatch_stub_12(const GLdouble *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[12];
+ ((void (APIENTRY *)(const GLdouble *v)) _func)(v);
+}
+
+void APIENTRY shared_dispatch_stub_13(GLfloat red, GLfloat green, GLfloat blue)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[13];
+ ((void (APIENTRY *)(GLfloat red, GLfloat green, GLfloat blue)) _func)(red, green, blue);
+}
+
+void APIENTRY shared_dispatch_stub_14(const GLfloat *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[14];
+ ((void (APIENTRY *)(const GLfloat *v)) _func)(v);
+}
+
+void APIENTRY shared_dispatch_stub_15(GLint red, GLint green, GLint blue)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[15];
+ ((void (APIENTRY *)(GLint red, GLint green, GLint blue)) _func)(red, green, blue);
+}
+
+void APIENTRY shared_dispatch_stub_16(const GLint *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[16];
+ ((void (APIENTRY *)(const GLint *v)) _func)(v);
+}
+
+void APIENTRY shared_dispatch_stub_17(GLshort red, GLshort green, GLshort blue)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[17];
+ ((void (APIENTRY *)(GLshort red, GLshort green, GLshort blue)) _func)(red, green, blue);
+}
+
+void APIENTRY shared_dispatch_stub_18(const GLshort *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[18];
+ ((void (APIENTRY *)(const GLshort *v)) _func)(v);
+}
+
+void APIENTRY shared_dispatch_stub_19(GLubyte red, GLubyte green, GLubyte blue)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[19];
+ ((void (APIENTRY *)(GLubyte red, GLubyte green, GLubyte blue)) _func)(red, green, blue);
+}
+
+void APIENTRY shared_dispatch_stub_20(const GLubyte *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[20];
+ ((void (APIENTRY *)(const GLubyte *v)) _func)(v);
+}
+
+void APIENTRY shared_dispatch_stub_21(GLuint red, GLuint green, GLuint blue)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[21];
+ ((void (APIENTRY *)(GLuint red, GLuint green, GLuint blue)) _func)(red, green, blue);
+}
+
+void APIENTRY shared_dispatch_stub_22(const GLuint *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[22];
+ ((void (APIENTRY *)(const GLuint *v)) _func)(v);
+}
+
+void APIENTRY shared_dispatch_stub_23(GLushort red, GLushort green, GLushort blue)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[23];
+ ((void (APIENTRY *)(GLushort red, GLushort green, GLushort blue)) _func)(red, green, blue);
+}
+
+void APIENTRY shared_dispatch_stub_24(const GLushort *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[24];
+ ((void (APIENTRY *)(const GLushort *v)) _func)(v);
+}
+
+void APIENTRY shared_dispatch_stub_25(GLbyte red, GLbyte green, GLbyte blue, GLbyte alpha)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[25];
+ ((void (APIENTRY *)(GLbyte red, GLbyte green, GLbyte blue, GLbyte alpha)) _func)(red, green, blue, alpha);
+}
+
+void APIENTRY shared_dispatch_stub_26(const GLbyte *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[26];
+ ((void (APIENTRY *)(const GLbyte *v)) _func)(v);
+}
+
+void APIENTRY shared_dispatch_stub_27(GLdouble red, GLdouble green, GLdouble blue, GLdouble alpha)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[27];
+ ((void (APIENTRY *)(GLdouble red, GLdouble green, GLdouble blue, GLdouble alpha)) _func)(red, green, blue, alpha);
+}
+
+void APIENTRY shared_dispatch_stub_28(const GLdouble *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[28];
+ ((void (APIENTRY *)(const GLdouble *v)) _func)(v);
+}
+
+void APIENTRY shared_dispatch_stub_29(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[29];
+ ((void (APIENTRY *)(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha)) _func)(red, green, blue, alpha);
+}
+
+void APIENTRY shared_dispatch_stub_30(const GLfloat *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[30];
+ ((void (APIENTRY *)(const GLfloat *v)) _func)(v);
+}
+
+void APIENTRY shared_dispatch_stub_31(GLint red, GLint green, GLint blue, GLint alpha)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[31];
+ ((void (APIENTRY *)(GLint red, GLint green, GLint blue, GLint alpha)) _func)(red, green, blue, alpha);
+}
+
+void APIENTRY shared_dispatch_stub_32(const GLint *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[32];
+ ((void (APIENTRY *)(const GLint *v)) _func)(v);
+}
+
+void APIENTRY shared_dispatch_stub_33(GLshort red, GLshort green, GLshort blue, GLshort alpha)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[33];
+ ((void (APIENTRY *)(GLshort red, GLshort green, GLshort blue, GLshort alpha)) _func)(red, green, blue, alpha);
+}
+
+void APIENTRY shared_dispatch_stub_34(const GLshort *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[34];
+ ((void (APIENTRY *)(const GLshort *v)) _func)(v);
+}
+
+void APIENTRY shared_dispatch_stub_35(GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[35];
+ ((void (APIENTRY *)(GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha)) _func)(red, green, blue, alpha);
+}
+
+void APIENTRY shared_dispatch_stub_36(const GLubyte *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[36];
+ ((void (APIENTRY *)(const GLubyte *v)) _func)(v);
+}
+
+void APIENTRY shared_dispatch_stub_37(GLuint red, GLuint green, GLuint blue, GLuint alpha)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[37];
+ ((void (APIENTRY *)(GLuint red, GLuint green, GLuint blue, GLuint alpha)) _func)(red, green, blue, alpha);
+}
+
+void APIENTRY shared_dispatch_stub_38(const GLuint *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[38];
+ ((void (APIENTRY *)(const GLuint *v)) _func)(v);
+}
+
+void APIENTRY shared_dispatch_stub_39(GLushort red, GLushort green, GLushort blue, GLushort alpha)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[39];
+ ((void (APIENTRY *)(GLushort red, GLushort green, GLushort blue, GLushort alpha)) _func)(red, green, blue, alpha);
+}
+
+void APIENTRY shared_dispatch_stub_40(const GLushort *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[40];
+ ((void (APIENTRY *)(const GLushort *v)) _func)(v);
+}
+
+void APIENTRY shared_dispatch_stub_41(GLboolean flag)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[41];
+ ((void (APIENTRY *)(GLboolean flag)) _func)(flag);
+}
+
+void APIENTRY shared_dispatch_stub_42(const GLboolean *flag)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[42];
+ ((void (APIENTRY *)(const GLboolean *flag)) _func)(flag);
+}
+
+void APIENTRY shared_dispatch_stub_43(void)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[43];
+ ((void (APIENTRY *)(void)) _func)();
+}
+
+void APIENTRY shared_dispatch_stub_44(GLdouble c)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[44];
+ ((void (APIENTRY *)(GLdouble c)) _func)(c);
+}
+
+void APIENTRY shared_dispatch_stub_45(const GLdouble *c)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[45];
+ ((void (APIENTRY *)(const GLdouble *c)) _func)(c);
+}
+
+void APIENTRY shared_dispatch_stub_46(GLfloat c)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[46];
+ ((void (APIENTRY *)(GLfloat c)) _func)(c);
+}
+
+void APIENTRY shared_dispatch_stub_47(const GLfloat *c)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[47];
+ ((void (APIENTRY *)(const GLfloat *c)) _func)(c);
+}
+
+void APIENTRY shared_dispatch_stub_48(GLint c)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[48];
+ ((void (APIENTRY *)(GLint c)) _func)(c);
+}
+
+void APIENTRY shared_dispatch_stub_49(const GLint *c)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[49];
+ ((void (APIENTRY *)(const GLint *c)) _func)(c);
+}
+
+void APIENTRY shared_dispatch_stub_50(GLshort c)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[50];
+ ((void (APIENTRY *)(GLshort c)) _func)(c);
+}
+
+void APIENTRY shared_dispatch_stub_51(const GLshort *c)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[51];
+ ((void (APIENTRY *)(const GLshort *c)) _func)(c);
+}
+
+void APIENTRY shared_dispatch_stub_52(GLbyte nx, GLbyte ny, GLbyte nz)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[52];
+ ((void (APIENTRY *)(GLbyte nx, GLbyte ny, GLbyte nz)) _func)(nx, ny, nz);
+}
+
+void APIENTRY shared_dispatch_stub_53(const GLbyte *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[53];
+ ((void (APIENTRY *)(const GLbyte *v)) _func)(v);
+}
+
+void APIENTRY shared_dispatch_stub_54(GLdouble nx, GLdouble ny, GLdouble nz)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[54];
+ ((void (APIENTRY *)(GLdouble nx, GLdouble ny, GLdouble nz)) _func)(nx, ny, nz);
+}
+
+void APIENTRY shared_dispatch_stub_55(const GLdouble *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[55];
+ ((void (APIENTRY *)(const GLdouble *v)) _func)(v);
+}
+
+void APIENTRY shared_dispatch_stub_56(GLfloat nx, GLfloat ny, GLfloat nz)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[56];
+ ((void (APIENTRY *)(GLfloat nx, GLfloat ny, GLfloat nz)) _func)(nx, ny, nz);
+}
+
+void APIENTRY shared_dispatch_stub_57(const GLfloat *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[57];
+ ((void (APIENTRY *)(const GLfloat *v)) _func)(v);
+}
+
+void APIENTRY shared_dispatch_stub_58(GLint nx, GLint ny, GLint nz)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[58];
+ ((void (APIENTRY *)(GLint nx, GLint ny, GLint nz)) _func)(nx, ny, nz);
+}
+
+void APIENTRY shared_dispatch_stub_59(const GLint *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[59];
+ ((void (APIENTRY *)(const GLint *v)) _func)(v);
+}
+
+void APIENTRY shared_dispatch_stub_60(GLshort nx, GLshort ny, GLshort nz)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[60];
+ ((void (APIENTRY *)(GLshort nx, GLshort ny, GLshort nz)) _func)(nx, ny, nz);
+}
+
+void APIENTRY shared_dispatch_stub_61(const GLshort *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[61];
+ ((void (APIENTRY *)(const GLshort *v)) _func)(v);
+}
+
+void APIENTRY shared_dispatch_stub_62(GLdouble x, GLdouble y)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[62];
+ ((void (APIENTRY *)(GLdouble x, GLdouble y)) _func)(x, y);
+}
+
+void APIENTRY shared_dispatch_stub_63(const GLdouble *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[63];
+ ((void (APIENTRY *)(const GLdouble *v)) _func)(v);
+}
+
+void APIENTRY shared_dispatch_stub_64(GLfloat x, GLfloat y)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[64];
+ ((void (APIENTRY *)(GLfloat x, GLfloat y)) _func)(x, y);
+}
+
+void APIENTRY shared_dispatch_stub_65(const GLfloat *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[65];
+ ((void (APIENTRY *)(const GLfloat *v)) _func)(v);
+}
+
+void APIENTRY shared_dispatch_stub_66(GLint x, GLint y)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[66];
+ ((void (APIENTRY *)(GLint x, GLint y)) _func)(x, y);
+}
+
+void APIENTRY shared_dispatch_stub_67(const GLint *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[67];
+ ((void (APIENTRY *)(const GLint *v)) _func)(v);
+}
+
+void APIENTRY shared_dispatch_stub_68(GLshort x, GLshort y)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[68];
+ ((void (APIENTRY *)(GLshort x, GLshort y)) _func)(x, y);
+}
+
+void APIENTRY shared_dispatch_stub_69(const GLshort *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[69];
+ ((void (APIENTRY *)(const GLshort *v)) _func)(v);
+}
+
+void APIENTRY shared_dispatch_stub_70(GLdouble x, GLdouble y, GLdouble z)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[70];
+ ((void (APIENTRY *)(GLdouble x, GLdouble y, GLdouble z)) _func)(x, y, z);
+}
+
+void APIENTRY shared_dispatch_stub_71(const GLdouble *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[71];
+ ((void (APIENTRY *)(const GLdouble *v)) _func)(v);
+}
+
+void APIENTRY shared_dispatch_stub_72(GLfloat x, GLfloat y, GLfloat z)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[72];
+ ((void (APIENTRY *)(GLfloat x, GLfloat y, GLfloat z)) _func)(x, y, z);
+}
+
+void APIENTRY shared_dispatch_stub_73(const GLfloat *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[73];
+ ((void (APIENTRY *)(const GLfloat *v)) _func)(v);
+}
+
+void APIENTRY shared_dispatch_stub_74(GLint x, GLint y, GLint z)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[74];
+ ((void (APIENTRY *)(GLint x, GLint y, GLint z)) _func)(x, y, z);
+}
+
+void APIENTRY shared_dispatch_stub_75(const GLint *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[75];
+ ((void (APIENTRY *)(const GLint *v)) _func)(v);
+}
+
+void APIENTRY shared_dispatch_stub_76(GLshort x, GLshort y, GLshort z)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[76];
+ ((void (APIENTRY *)(GLshort x, GLshort y, GLshort z)) _func)(x, y, z);
+}
+
+void APIENTRY shared_dispatch_stub_77(const GLshort *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[77];
+ ((void (APIENTRY *)(const GLshort *v)) _func)(v);
+}
+
+void APIENTRY shared_dispatch_stub_78(GLdouble x, GLdouble y, GLdouble z, GLdouble w)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[78];
+ ((void (APIENTRY *)(GLdouble x, GLdouble y, GLdouble z, GLdouble w)) _func)(x, y, z, w);
+}
+
+void APIENTRY shared_dispatch_stub_79(const GLdouble *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[79];
+ ((void (APIENTRY *)(const GLdouble *v)) _func)(v);
+}
+
+void APIENTRY shared_dispatch_stub_80(GLfloat x, GLfloat y, GLfloat z, GLfloat w)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[80];
+ ((void (APIENTRY *)(GLfloat x, GLfloat y, GLfloat z, GLfloat w)) _func)(x, y, z, w);
+}
+
+void APIENTRY shared_dispatch_stub_81(const GLfloat *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[81];
+ ((void (APIENTRY *)(const GLfloat *v)) _func)(v);
+}
+
+void APIENTRY shared_dispatch_stub_82(GLint x, GLint y, GLint z, GLint w)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[82];
+ ((void (APIENTRY *)(GLint x, GLint y, GLint z, GLint w)) _func)(x, y, z, w);
+}
+
+void APIENTRY shared_dispatch_stub_83(const GLint *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[83];
+ ((void (APIENTRY *)(const GLint *v)) _func)(v);
+}
+
+void APIENTRY shared_dispatch_stub_84(GLshort x, GLshort y, GLshort z, GLshort w)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[84];
+ ((void (APIENTRY *)(GLshort x, GLshort y, GLshort z, GLshort w)) _func)(x, y, z, w);
+}
+
+void APIENTRY shared_dispatch_stub_85(const GLshort *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[85];
+ ((void (APIENTRY *)(const GLshort *v)) _func)(v);
+}
+
+void APIENTRY shared_dispatch_stub_86(GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[86];
+ ((void (APIENTRY *)(GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2)) _func)(x1, y1, x2, y2);
+}
+
+void APIENTRY shared_dispatch_stub_87(const GLdouble *v1, const GLdouble *v2)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[87];
+ ((void (APIENTRY *)(const GLdouble *v1, const GLdouble *v2)) _func)(v1, v2);
+}
+
+void APIENTRY shared_dispatch_stub_88(GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[88];
+ ((void (APIENTRY *)(GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2)) _func)(x1, y1, x2, y2);
+}
+
+void APIENTRY shared_dispatch_stub_89(const GLfloat *v1, const GLfloat *v2)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[89];
+ ((void (APIENTRY *)(const GLfloat *v1, const GLfloat *v2)) _func)(v1, v2);
+}
+
+void APIENTRY shared_dispatch_stub_90(GLint x1, GLint y1, GLint x2, GLint y2)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[90];
+ ((void (APIENTRY *)(GLint x1, GLint y1, GLint x2, GLint y2)) _func)(x1, y1, x2, y2);
+}
+
+void APIENTRY shared_dispatch_stub_91(const GLint *v1, const GLint *v2)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[91];
+ ((void (APIENTRY *)(const GLint *v1, const GLint *v2)) _func)(v1, v2);
+}
+
+void APIENTRY shared_dispatch_stub_92(GLshort x1, GLshort y1, GLshort x2, GLshort y2)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[92];
+ ((void (APIENTRY *)(GLshort x1, GLshort y1, GLshort x2, GLshort y2)) _func)(x1, y1, x2, y2);
+}
+
+void APIENTRY shared_dispatch_stub_93(const GLshort *v1, const GLshort *v2)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[93];
+ ((void (APIENTRY *)(const GLshort *v1, const GLshort *v2)) _func)(v1, v2);
+}
+
+void APIENTRY shared_dispatch_stub_94(GLdouble s)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[94];
+ ((void (APIENTRY *)(GLdouble s)) _func)(s);
+}
+
+void APIENTRY shared_dispatch_stub_95(const GLdouble *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[95];
+ ((void (APIENTRY *)(const GLdouble *v)) _func)(v);
+}
+
+void APIENTRY shared_dispatch_stub_96(GLfloat s)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[96];
+ ((void (APIENTRY *)(GLfloat s)) _func)(s);
+}
+
+void APIENTRY shared_dispatch_stub_97(const GLfloat *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[97];
+ ((void (APIENTRY *)(const GLfloat *v)) _func)(v);
+}
+
+void APIENTRY shared_dispatch_stub_98(GLint s)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[98];
+ ((void (APIENTRY *)(GLint s)) _func)(s);
+}
+
+void APIENTRY shared_dispatch_stub_99(const GLint *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[99];
+ ((void (APIENTRY *)(const GLint *v)) _func)(v);
+}
+
+void APIENTRY shared_dispatch_stub_100(GLshort s)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[100];
+ ((void (APIENTRY *)(GLshort s)) _func)(s);
+}
+
+void APIENTRY shared_dispatch_stub_101(const GLshort *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[101];
+ ((void (APIENTRY *)(const GLshort *v)) _func)(v);
+}
+
+void APIENTRY shared_dispatch_stub_102(GLdouble s, GLdouble t)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[102];
+ ((void (APIENTRY *)(GLdouble s, GLdouble t)) _func)(s, t);
+}
+
+void APIENTRY shared_dispatch_stub_103(const GLdouble *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[103];
+ ((void (APIENTRY *)(const GLdouble *v)) _func)(v);
+}
+
+void APIENTRY shared_dispatch_stub_104(GLfloat s, GLfloat t)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[104];
+ ((void (APIENTRY *)(GLfloat s, GLfloat t)) _func)(s, t);
+}
+
+void APIENTRY shared_dispatch_stub_105(const GLfloat *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[105];
+ ((void (APIENTRY *)(const GLfloat *v)) _func)(v);
+}
+
+void APIENTRY shared_dispatch_stub_106(GLint s, GLint t)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[106];
+ ((void (APIENTRY *)(GLint s, GLint t)) _func)(s, t);
+}
+
+void APIENTRY shared_dispatch_stub_107(const GLint *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[107];
+ ((void (APIENTRY *)(const GLint *v)) _func)(v);
+}
+
+void APIENTRY shared_dispatch_stub_108(GLshort s, GLshort t)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[108];
+ ((void (APIENTRY *)(GLshort s, GLshort t)) _func)(s, t);
+}
+
+void APIENTRY shared_dispatch_stub_109(const GLshort *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[109];
+ ((void (APIENTRY *)(const GLshort *v)) _func)(v);
+}
+
+void APIENTRY shared_dispatch_stub_110(GLdouble s, GLdouble t, GLdouble r)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[110];
+ ((void (APIENTRY *)(GLdouble s, GLdouble t, GLdouble r)) _func)(s, t, r);
+}
+
+void APIENTRY shared_dispatch_stub_111(const GLdouble *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[111];
+ ((void (APIENTRY *)(const GLdouble *v)) _func)(v);
+}
+
+void APIENTRY shared_dispatch_stub_112(GLfloat s, GLfloat t, GLfloat r)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[112];
+ ((void (APIENTRY *)(GLfloat s, GLfloat t, GLfloat r)) _func)(s, t, r);
+}
+
+void APIENTRY shared_dispatch_stub_113(const GLfloat *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[113];
+ ((void (APIENTRY *)(const GLfloat *v)) _func)(v);
+}
+
+void APIENTRY shared_dispatch_stub_114(GLint s, GLint t, GLint r)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[114];
+ ((void (APIENTRY *)(GLint s, GLint t, GLint r)) _func)(s, t, r);
+}
+
+void APIENTRY shared_dispatch_stub_115(const GLint *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[115];
+ ((void (APIENTRY *)(const GLint *v)) _func)(v);
+}
+
+void APIENTRY shared_dispatch_stub_116(GLshort s, GLshort t, GLshort r)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[116];
+ ((void (APIENTRY *)(GLshort s, GLshort t, GLshort r)) _func)(s, t, r);
+}
+
+void APIENTRY shared_dispatch_stub_117(const GLshort *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[117];
+ ((void (APIENTRY *)(const GLshort *v)) _func)(v);
+}
+
+void APIENTRY shared_dispatch_stub_118(GLdouble s, GLdouble t, GLdouble r, GLdouble q)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[118];
+ ((void (APIENTRY *)(GLdouble s, GLdouble t, GLdouble r, GLdouble q)) _func)(s, t, r, q);
+}
+
+void APIENTRY shared_dispatch_stub_119(const GLdouble *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[119];
+ ((void (APIENTRY *)(const GLdouble *v)) _func)(v);
+}
+
+void APIENTRY shared_dispatch_stub_120(GLfloat s, GLfloat t, GLfloat r, GLfloat q)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[120];
+ ((void (APIENTRY *)(GLfloat s, GLfloat t, GLfloat r, GLfloat q)) _func)(s, t, r, q);
+}
+
+void APIENTRY shared_dispatch_stub_121(const GLfloat *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[121];
+ ((void (APIENTRY *)(const GLfloat *v)) _func)(v);
+}
+
+void APIENTRY shared_dispatch_stub_122(GLint s, GLint t, GLint r, GLint q)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[122];
+ ((void (APIENTRY *)(GLint s, GLint t, GLint r, GLint q)) _func)(s, t, r, q);
+}
+
+void APIENTRY shared_dispatch_stub_123(const GLint *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[123];
+ ((void (APIENTRY *)(const GLint *v)) _func)(v);
+}
+
+void APIENTRY shared_dispatch_stub_124(GLshort s, GLshort t, GLshort r, GLshort q)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[124];
+ ((void (APIENTRY *)(GLshort s, GLshort t, GLshort r, GLshort q)) _func)(s, t, r, q);
+}
+
+void APIENTRY shared_dispatch_stub_125(const GLshort *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[125];
+ ((void (APIENTRY *)(const GLshort *v)) _func)(v);
+}
+
+void APIENTRY shared_dispatch_stub_126(GLdouble x, GLdouble y)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[126];
+ ((void (APIENTRY *)(GLdouble x, GLdouble y)) _func)(x, y);
+}
+
+void APIENTRY shared_dispatch_stub_127(const GLdouble *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[127];
+ ((void (APIENTRY *)(const GLdouble *v)) _func)(v);
+}
+
+void APIENTRY shared_dispatch_stub_128(GLfloat x, GLfloat y)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[128];
+ ((void (APIENTRY *)(GLfloat x, GLfloat y)) _func)(x, y);
+}
+
+void APIENTRY shared_dispatch_stub_129(const GLfloat *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[129];
+ ((void (APIENTRY *)(const GLfloat *v)) _func)(v);
+}
+
+void APIENTRY shared_dispatch_stub_130(GLint x, GLint y)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[130];
+ ((void (APIENTRY *)(GLint x, GLint y)) _func)(x, y);
+}
+
+void APIENTRY shared_dispatch_stub_131(const GLint *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[131];
+ ((void (APIENTRY *)(const GLint *v)) _func)(v);
+}
+
+void APIENTRY shared_dispatch_stub_132(GLshort x, GLshort y)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[132];
+ ((void (APIENTRY *)(GLshort x, GLshort y)) _func)(x, y);
+}
+
+void APIENTRY shared_dispatch_stub_133(const GLshort *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[133];
+ ((void (APIENTRY *)(const GLshort *v)) _func)(v);
+}
+
+void APIENTRY shared_dispatch_stub_134(GLdouble x, GLdouble y, GLdouble z)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[134];
+ ((void (APIENTRY *)(GLdouble x, GLdouble y, GLdouble z)) _func)(x, y, z);
+}
+
+void APIENTRY shared_dispatch_stub_135(const GLdouble *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[135];
+ ((void (APIENTRY *)(const GLdouble *v)) _func)(v);
+}
+
+void APIENTRY shared_dispatch_stub_136(GLfloat x, GLfloat y, GLfloat z)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[136];
+ ((void (APIENTRY *)(GLfloat x, GLfloat y, GLfloat z)) _func)(x, y, z);
+}
+
+void APIENTRY shared_dispatch_stub_137(const GLfloat *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[137];
+ ((void (APIENTRY *)(const GLfloat *v)) _func)(v);
+}
+
+void APIENTRY shared_dispatch_stub_138(GLint x, GLint y, GLint z)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[138];
+ ((void (APIENTRY *)(GLint x, GLint y, GLint z)) _func)(x, y, z);
+}
+
+void APIENTRY shared_dispatch_stub_139(const GLint *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[139];
+ ((void (APIENTRY *)(const GLint *v)) _func)(v);
+}
+
+void APIENTRY shared_dispatch_stub_140(GLshort x, GLshort y, GLshort z)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[140];
+ ((void (APIENTRY *)(GLshort x, GLshort y, GLshort z)) _func)(x, y, z);
+}
+
+void APIENTRY shared_dispatch_stub_141(const GLshort *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[141];
+ ((void (APIENTRY *)(const GLshort *v)) _func)(v);
+}
+
+void APIENTRY shared_dispatch_stub_142(GLdouble x, GLdouble y, GLdouble z, GLdouble w)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[142];
+ ((void (APIENTRY *)(GLdouble x, GLdouble y, GLdouble z, GLdouble w)) _func)(x, y, z, w);
+}
+
+void APIENTRY shared_dispatch_stub_143(const GLdouble *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[143];
+ ((void (APIENTRY *)(const GLdouble *v)) _func)(v);
+}
+
+void APIENTRY shared_dispatch_stub_144(GLfloat x, GLfloat y, GLfloat z, GLfloat w)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[144];
+ ((void (APIENTRY *)(GLfloat x, GLfloat y, GLfloat z, GLfloat w)) _func)(x, y, z, w);
+}
+
+void APIENTRY shared_dispatch_stub_145(const GLfloat *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[145];
+ ((void (APIENTRY *)(const GLfloat *v)) _func)(v);
+}
+
+void APIENTRY shared_dispatch_stub_146(GLint x, GLint y, GLint z, GLint w)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[146];
+ ((void (APIENTRY *)(GLint x, GLint y, GLint z, GLint w)) _func)(x, y, z, w);
+}
+
+void APIENTRY shared_dispatch_stub_147(const GLint *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[147];
+ ((void (APIENTRY *)(const GLint *v)) _func)(v);
+}
+
+void APIENTRY shared_dispatch_stub_148(GLshort x, GLshort y, GLshort z, GLshort w)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[148];
+ ((void (APIENTRY *)(GLshort x, GLshort y, GLshort z, GLshort w)) _func)(x, y, z, w);
+}
+
+void APIENTRY shared_dispatch_stub_149(const GLshort *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[149];
+ ((void (APIENTRY *)(const GLshort *v)) _func)(v);
+}
+
+void APIENTRY shared_dispatch_stub_150(GLenum plane, const GLdouble *equation)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[150];
+ ((void (APIENTRY *)(GLenum plane, const GLdouble *equation)) _func)(plane, equation);
+}
+
+void APIENTRY shared_dispatch_stub_151(GLenum face, GLenum mode)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[151];
+ ((void (APIENTRY *)(GLenum face, GLenum mode)) _func)(face, mode);
+}
+
+void APIENTRY shared_dispatch_stub_152(GLenum mode)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[152];
+ ((void (APIENTRY *)(GLenum mode)) _func)(mode);
+}
+
+void APIENTRY shared_dispatch_stub_153(GLenum pname, GLfloat param)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[153];
+ ((void (APIENTRY *)(GLenum pname, GLfloat param)) _func)(pname, param);
+}
+
+void APIENTRY shared_dispatch_stub_154(GLenum pname, const GLfloat *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[154];
+ ((void (APIENTRY *)(GLenum pname, const GLfloat *params)) _func)(pname, params);
+}
+
+void APIENTRY shared_dispatch_stub_155(GLenum pname, GLint param)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[155];
+ ((void (APIENTRY *)(GLenum pname, GLint param)) _func)(pname, param);
+}
+
+void APIENTRY shared_dispatch_stub_156(GLenum pname, const GLint *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[156];
+ ((void (APIENTRY *)(GLenum pname, const GLint *params)) _func)(pname, params);
+}
+
+void APIENTRY shared_dispatch_stub_157(GLenum mode)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[157];
+ ((void (APIENTRY *)(GLenum mode)) _func)(mode);
+}
+
+void APIENTRY shared_dispatch_stub_158(GLenum target, GLenum mode)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[158];
+ ((void (APIENTRY *)(GLenum target, GLenum mode)) _func)(target, mode);
+}
+
+void APIENTRY shared_dispatch_stub_159(GLenum light, GLenum pname, GLfloat param)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[159];
+ ((void (APIENTRY *)(GLenum light, GLenum pname, GLfloat param)) _func)(light, pname, param);
+}
+
+void APIENTRY shared_dispatch_stub_160(GLenum light, GLenum pname, const GLfloat *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[160];
+ ((void (APIENTRY *)(GLenum light, GLenum pname, const GLfloat *params)) _func)(light, pname, params);
+}
+
+void APIENTRY shared_dispatch_stub_161(GLenum light, GLenum pname, GLint param)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[161];
+ ((void (APIENTRY *)(GLenum light, GLenum pname, GLint param)) _func)(light, pname, param);
+}
+
+void APIENTRY shared_dispatch_stub_162(GLenum light, GLenum pname, const GLint *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[162];
+ ((void (APIENTRY *)(GLenum light, GLenum pname, const GLint *params)) _func)(light, pname, params);
+}
+
+void APIENTRY shared_dispatch_stub_163(GLenum pname, GLfloat param)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[163];
+ ((void (APIENTRY *)(GLenum pname, GLfloat param)) _func)(pname, param);
+}
+
+void APIENTRY shared_dispatch_stub_164(GLenum pname, const GLfloat *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[164];
+ ((void (APIENTRY *)(GLenum pname, const GLfloat *params)) _func)(pname, params);
+}
+
+void APIENTRY shared_dispatch_stub_165(GLenum pname, GLint param)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[165];
+ ((void (APIENTRY *)(GLenum pname, GLint param)) _func)(pname, param);
+}
+
+void APIENTRY shared_dispatch_stub_166(GLenum pname, const GLint *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[166];
+ ((void (APIENTRY *)(GLenum pname, const GLint *params)) _func)(pname, params);
+}
+
+void APIENTRY shared_dispatch_stub_167(GLint factor, GLushort pattern)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[167];
+ ((void (APIENTRY *)(GLint factor, GLushort pattern)) _func)(factor, pattern);
+}
+
+void APIENTRY shared_dispatch_stub_168(GLfloat width)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[168];
+ ((void (APIENTRY *)(GLfloat width)) _func)(width);
+}
+
+void APIENTRY shared_dispatch_stub_169(GLenum face, GLenum pname, GLfloat param)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[169];
+ ((void (APIENTRY *)(GLenum face, GLenum pname, GLfloat param)) _func)(face, pname, param);
+}
+
+void APIENTRY shared_dispatch_stub_170(GLenum face, GLenum pname, const GLfloat *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[170];
+ ((void (APIENTRY *)(GLenum face, GLenum pname, const GLfloat *params)) _func)(face, pname, params);
+}
+
+void APIENTRY shared_dispatch_stub_171(GLenum face, GLenum pname, GLint param)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[171];
+ ((void (APIENTRY *)(GLenum face, GLenum pname, GLint param)) _func)(face, pname, param);
+}
+
+void APIENTRY shared_dispatch_stub_172(GLenum face, GLenum pname, const GLint *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[172];
+ ((void (APIENTRY *)(GLenum face, GLenum pname, const GLint *params)) _func)(face, pname, params);
+}
+
+void APIENTRY shared_dispatch_stub_173(GLfloat size)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[173];
+ ((void (APIENTRY *)(GLfloat size)) _func)(size);
+}
+
+void APIENTRY shared_dispatch_stub_174(GLenum face, GLenum mode)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[174];
+ ((void (APIENTRY *)(GLenum face, GLenum mode)) _func)(face, mode);
+}
+
+void APIENTRY shared_dispatch_stub_175(const GLubyte *mask)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[175];
+ ((void (APIENTRY *)(const GLubyte *mask)) _func)(mask);
+}
+
+void APIENTRY shared_dispatch_stub_176(GLint x, GLint y, GLsizei width, GLsizei height)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[176];
+ ((void (APIENTRY *)(GLint x, GLint y, GLsizei width, GLsizei height)) _func)(x, y, width, height);
+}
+
+void APIENTRY shared_dispatch_stub_177(GLenum mode)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[177];
+ ((void (APIENTRY *)(GLenum mode)) _func)(mode);
+}
+
+void APIENTRY shared_dispatch_stub_178(GLenum target, GLenum pname, GLfloat param)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[178];
+ ((void (APIENTRY *)(GLenum target, GLenum pname, GLfloat param)) _func)(target, pname, param);
+}
+
+void APIENTRY shared_dispatch_stub_179(GLenum target, GLenum pname, const GLfloat *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[179];
+ ((void (APIENTRY *)(GLenum target, GLenum pname, const GLfloat *params)) _func)(target, pname, params);
+}
+
+void APIENTRY shared_dispatch_stub_180(GLenum target, GLenum pname, GLint param)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[180];
+ ((void (APIENTRY *)(GLenum target, GLenum pname, GLint param)) _func)(target, pname, param);
+}
+
+void APIENTRY shared_dispatch_stub_181(GLenum target, GLenum pname, const GLint *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[181];
+ ((void (APIENTRY *)(GLenum target, GLenum pname, const GLint *params)) _func)(target, pname, params);
+}
+
+void APIENTRY shared_dispatch_stub_182(GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid *pixels)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[182];
+ ((void (APIENTRY *)(GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid *pixels)) _func)(target, level, internalformat, width, border, format, type, pixels);
+}
+
+void APIENTRY shared_dispatch_stub_183(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[183];
+ ((void (APIENTRY *)(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels)) _func)(target, level, internalformat, width, height, border, format, type, pixels);
+}
+
+void APIENTRY shared_dispatch_stub_184(GLenum target, GLenum pname, GLfloat param)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[184];
+ ((void (APIENTRY *)(GLenum target, GLenum pname, GLfloat param)) _func)(target, pname, param);
+}
+
+void APIENTRY shared_dispatch_stub_185(GLenum target, GLenum pname, const GLfloat *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[185];
+ ((void (APIENTRY *)(GLenum target, GLenum pname, const GLfloat *params)) _func)(target, pname, params);
+}
+
+void APIENTRY shared_dispatch_stub_186(GLenum target, GLenum pname, GLint param)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[186];
+ ((void (APIENTRY *)(GLenum target, GLenum pname, GLint param)) _func)(target, pname, param);
+}
+
+void APIENTRY shared_dispatch_stub_187(GLenum target, GLenum pname, const GLint *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[187];
+ ((void (APIENTRY *)(GLenum target, GLenum pname, const GLint *params)) _func)(target, pname, params);
+}
+
+void APIENTRY shared_dispatch_stub_188(GLenum coord, GLenum pname, GLdouble param)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[188];
+ ((void (APIENTRY *)(GLenum coord, GLenum pname, GLdouble param)) _func)(coord, pname, param);
+}
+
+void APIENTRY shared_dispatch_stub_189(GLenum coord, GLenum pname, const GLdouble *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[189];
+ ((void (APIENTRY *)(GLenum coord, GLenum pname, const GLdouble *params)) _func)(coord, pname, params);
+}
+
+void APIENTRY shared_dispatch_stub_190(GLenum coord, GLenum pname, GLfloat param)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[190];
+ ((void (APIENTRY *)(GLenum coord, GLenum pname, GLfloat param)) _func)(coord, pname, param);
+}
+
+void APIENTRY shared_dispatch_stub_191(GLenum coord, GLenum pname, const GLfloat *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[191];
+ ((void (APIENTRY *)(GLenum coord, GLenum pname, const GLfloat *params)) _func)(coord, pname, params);
+}
+
+void APIENTRY shared_dispatch_stub_192(GLenum coord, GLenum pname, GLint param)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[192];
+ ((void (APIENTRY *)(GLenum coord, GLenum pname, GLint param)) _func)(coord, pname, param);
+}
+
+void APIENTRY shared_dispatch_stub_193(GLenum coord, GLenum pname, const GLint *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[193];
+ ((void (APIENTRY *)(GLenum coord, GLenum pname, const GLint *params)) _func)(coord, pname, params);
+}
+
+void APIENTRY shared_dispatch_stub_194(GLsizei size, GLenum type, GLfloat *buffer)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[194];
+ ((void (APIENTRY *)(GLsizei size, GLenum type, GLfloat *buffer)) _func)(size, type, buffer);
+}
+
+void APIENTRY shared_dispatch_stub_195(GLsizei size, GLuint *buffer)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[195];
+ ((void (APIENTRY *)(GLsizei size, GLuint *buffer)) _func)(size, buffer);
+}
+
+GLint APIENTRY shared_dispatch_stub_196(GLenum mode)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[196];
+ return ((GLint (APIENTRY *)(GLenum mode)) _func)(mode);
+}
+
+void APIENTRY shared_dispatch_stub_197(void)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[197];
+ ((void (APIENTRY *)(void)) _func)();
+}
+
+void APIENTRY shared_dispatch_stub_198(GLuint name)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[198];
+ ((void (APIENTRY *)(GLuint name)) _func)(name);
+}
+
+void APIENTRY shared_dispatch_stub_199(GLfloat token)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[199];
+ ((void (APIENTRY *)(GLfloat token)) _func)(token);
+}
+
+void APIENTRY shared_dispatch_stub_200(void)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[200];
+ ((void (APIENTRY *)(void)) _func)();
+}
+
+void APIENTRY shared_dispatch_stub_201(GLuint name)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[201];
+ ((void (APIENTRY *)(GLuint name)) _func)(name);
+}
+
+void APIENTRY shared_dispatch_stub_202(GLenum mode)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[202];
+ ((void (APIENTRY *)(GLenum mode)) _func)(mode);
+}
+
+void APIENTRY shared_dispatch_stub_203(GLbitfield mask)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[203];
+ ((void (APIENTRY *)(GLbitfield mask)) _func)(mask);
+}
+
+void APIENTRY shared_dispatch_stub_204(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[204];
+ ((void (APIENTRY *)(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha)) _func)(red, green, blue, alpha);
+}
+
+void APIENTRY shared_dispatch_stub_205(GLfloat c)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[205];
+ ((void (APIENTRY *)(GLfloat c)) _func)(c);
+}
+
+void APIENTRY shared_dispatch_stub_206(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[206];
+ ((void (APIENTRY *)(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)) _func)(red, green, blue, alpha);
+}
+
+void APIENTRY shared_dispatch_stub_207(GLint s)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[207];
+ ((void (APIENTRY *)(GLint s)) _func)(s);
+}
+
+void APIENTRY shared_dispatch_stub_208(GLclampd depth)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[208];
+ ((void (APIENTRY *)(GLclampd depth)) _func)(depth);
+}
+
+void APIENTRY shared_dispatch_stub_209(GLuint mask)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[209];
+ ((void (APIENTRY *)(GLuint mask)) _func)(mask);
+}
+
+void APIENTRY shared_dispatch_stub_210(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[210];
+ ((void (APIENTRY *)(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha)) _func)(red, green, blue, alpha);
+}
+
+void APIENTRY shared_dispatch_stub_211(GLboolean flag)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[211];
+ ((void (APIENTRY *)(GLboolean flag)) _func)(flag);
+}
+
+void APIENTRY shared_dispatch_stub_212(GLuint mask)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[212];
+ ((void (APIENTRY *)(GLuint mask)) _func)(mask);
+}
+
+void APIENTRY shared_dispatch_stub_213(GLenum op, GLfloat value)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[213];
+ ((void (APIENTRY *)(GLenum op, GLfloat value)) _func)(op, value);
+}
+
+void APIENTRY shared_dispatch_stub_214(GLenum cap)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[214];
+ ((void (APIENTRY *)(GLenum cap)) _func)(cap);
+}
+
+void APIENTRY shared_dispatch_stub_215(GLenum cap)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[215];
+ ((void (APIENTRY *)(GLenum cap)) _func)(cap);
+}
+
+void APIENTRY shared_dispatch_stub_216(void)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[216];
+ ((void (APIENTRY *)(void)) _func)();
+}
+
+void APIENTRY shared_dispatch_stub_217(void)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[217];
+ ((void (APIENTRY *)(void)) _func)();
+}
+
+void APIENTRY shared_dispatch_stub_218(void)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[218];
+ ((void (APIENTRY *)(void)) _func)();
+}
+
+void APIENTRY shared_dispatch_stub_219(GLbitfield mask)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[219];
+ ((void (APIENTRY *)(GLbitfield mask)) _func)(mask);
+}
+
+void APIENTRY shared_dispatch_stub_220(GLenum target, GLdouble u1, GLdouble u2, GLint stride, GLint order, const GLdouble *points)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[220];
+ ((void (APIENTRY *)(GLenum target, GLdouble u1, GLdouble u2, GLint stride, GLint order, const GLdouble *points)) _func)(target, u1, u2, stride, order, points);
+}
+
+void APIENTRY shared_dispatch_stub_221(GLenum target, GLfloat u1, GLfloat u2, GLint stride, GLint order, const GLfloat *points)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[221];
+ ((void (APIENTRY *)(GLenum target, GLfloat u1, GLfloat u2, GLint stride, GLint order, const GLfloat *points)) _func)(target, u1, u2, stride, order, points);
+}
+
+void APIENTRY shared_dispatch_stub_222(GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, const GLdouble *points)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[222];
+ ((void (APIENTRY *)(GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, const GLdouble *points)) _func)(target, u1, u2, ustride, uorder, v1, v2, vstride, vorder, points);
+}
+
+void APIENTRY shared_dispatch_stub_223(GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, const GLfloat *points)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[223];
+ ((void (APIENTRY *)(GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, const GLfloat *points)) _func)(target, u1, u2, ustride, uorder, v1, v2, vstride, vorder, points);
+}
+
+void APIENTRY shared_dispatch_stub_224(GLint un, GLdouble u1, GLdouble u2)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[224];
+ ((void (APIENTRY *)(GLint un, GLdouble u1, GLdouble u2)) _func)(un, u1, u2);
+}
+
+void APIENTRY shared_dispatch_stub_225(GLint un, GLfloat u1, GLfloat u2)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[225];
+ ((void (APIENTRY *)(GLint un, GLfloat u1, GLfloat u2)) _func)(un, u1, u2);
+}
+
+void APIENTRY shared_dispatch_stub_226(GLint un, GLdouble u1, GLdouble u2, GLint vn, GLdouble v1, GLdouble v2)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[226];
+ ((void (APIENTRY *)(GLint un, GLdouble u1, GLdouble u2, GLint vn, GLdouble v1, GLdouble v2)) _func)(un, u1, u2, vn, v1, v2);
+}
+
+void APIENTRY shared_dispatch_stub_227(GLint un, GLfloat u1, GLfloat u2, GLint vn, GLfloat v1, GLfloat v2)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[227];
+ ((void (APIENTRY *)(GLint un, GLfloat u1, GLfloat u2, GLint vn, GLfloat v1, GLfloat v2)) _func)(un, u1, u2, vn, v1, v2);
+}
+
+void APIENTRY shared_dispatch_stub_228(GLdouble u)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[228];
+ ((void (APIENTRY *)(GLdouble u)) _func)(u);
+}
+
+void APIENTRY shared_dispatch_stub_229(const GLdouble *u)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[229];
+ ((void (APIENTRY *)(const GLdouble *u)) _func)(u);
+}
+
+void APIENTRY shared_dispatch_stub_230(GLfloat u)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[230];
+ ((void (APIENTRY *)(GLfloat u)) _func)(u);
+}
+
+void APIENTRY shared_dispatch_stub_231(const GLfloat *u)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[231];
+ ((void (APIENTRY *)(const GLfloat *u)) _func)(u);
+}
+
+void APIENTRY shared_dispatch_stub_232(GLdouble u, GLdouble v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[232];
+ ((void (APIENTRY *)(GLdouble u, GLdouble v)) _func)(u, v);
+}
+
+void APIENTRY shared_dispatch_stub_233(const GLdouble *u)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[233];
+ ((void (APIENTRY *)(const GLdouble *u)) _func)(u);
+}
+
+void APIENTRY shared_dispatch_stub_234(GLfloat u, GLfloat v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[234];
+ ((void (APIENTRY *)(GLfloat u, GLfloat v)) _func)(u, v);
+}
+
+void APIENTRY shared_dispatch_stub_235(const GLfloat *u)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[235];
+ ((void (APIENTRY *)(const GLfloat *u)) _func)(u);
+}
+
+void APIENTRY shared_dispatch_stub_236(GLenum mode, GLint i1, GLint i2)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[236];
+ ((void (APIENTRY *)(GLenum mode, GLint i1, GLint i2)) _func)(mode, i1, i2);
+}
+
+void APIENTRY shared_dispatch_stub_237(GLint i)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[237];
+ ((void (APIENTRY *)(GLint i)) _func)(i);
+}
+
+void APIENTRY shared_dispatch_stub_238(GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[238];
+ ((void (APIENTRY *)(GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2)) _func)(mode, i1, i2, j1, j2);
+}
+
+void APIENTRY shared_dispatch_stub_239(GLint i, GLint j)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[239];
+ ((void (APIENTRY *)(GLint i, GLint j)) _func)(i, j);
+}
+
+void APIENTRY shared_dispatch_stub_240(GLenum func, GLclampf ref)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[240];
+ ((void (APIENTRY *)(GLenum func, GLclampf ref)) _func)(func, ref);
+}
+
+void APIENTRY shared_dispatch_stub_241(GLenum sfactor, GLenum dfactor)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[241];
+ ((void (APIENTRY *)(GLenum sfactor, GLenum dfactor)) _func)(sfactor, dfactor);
+}
+
+void APIENTRY shared_dispatch_stub_242(GLenum opcode)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[242];
+ ((void (APIENTRY *)(GLenum opcode)) _func)(opcode);
+}
+
+void APIENTRY shared_dispatch_stub_243(GLenum func, GLint ref, GLuint mask)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[243];
+ ((void (APIENTRY *)(GLenum func, GLint ref, GLuint mask)) _func)(func, ref, mask);
+}
+
+void APIENTRY shared_dispatch_stub_244(GLenum fail, GLenum zfail, GLenum zpass)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[244];
+ ((void (APIENTRY *)(GLenum fail, GLenum zfail, GLenum zpass)) _func)(fail, zfail, zpass);
+}
+
+void APIENTRY shared_dispatch_stub_245(GLenum func)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[245];
+ ((void (APIENTRY *)(GLenum func)) _func)(func);
+}
+
+void APIENTRY shared_dispatch_stub_246(GLfloat xfactor, GLfloat yfactor)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[246];
+ ((void (APIENTRY *)(GLfloat xfactor, GLfloat yfactor)) _func)(xfactor, yfactor);
+}
+
+void APIENTRY shared_dispatch_stub_247(GLenum pname, GLfloat param)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[247];
+ ((void (APIENTRY *)(GLenum pname, GLfloat param)) _func)(pname, param);
+}
+
+void APIENTRY shared_dispatch_stub_248(GLenum pname, GLint param)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[248];
+ ((void (APIENTRY *)(GLenum pname, GLint param)) _func)(pname, param);
+}
+
+void APIENTRY shared_dispatch_stub_249(GLenum pname, GLfloat param)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[249];
+ ((void (APIENTRY *)(GLenum pname, GLfloat param)) _func)(pname, param);
+}
+
+void APIENTRY shared_dispatch_stub_250(GLenum pname, GLint param)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[250];
+ ((void (APIENTRY *)(GLenum pname, GLint param)) _func)(pname, param);
+}
+
+void APIENTRY shared_dispatch_stub_251(GLenum map, GLsizei mapsize, const GLfloat *values)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[251];
+ ((void (APIENTRY *)(GLenum map, GLsizei mapsize, const GLfloat *values)) _func)(map, mapsize, values);
+}
+
+void APIENTRY shared_dispatch_stub_252(GLenum map, GLsizei mapsize, const GLuint *values)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[252];
+ ((void (APIENTRY *)(GLenum map, GLsizei mapsize, const GLuint *values)) _func)(map, mapsize, values);
+}
+
+void APIENTRY shared_dispatch_stub_253(GLenum map, GLsizei mapsize, const GLushort *values)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[253];
+ ((void (APIENTRY *)(GLenum map, GLsizei mapsize, const GLushort *values)) _func)(map, mapsize, values);
+}
+
+void APIENTRY shared_dispatch_stub_254(GLenum mode)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[254];
+ ((void (APIENTRY *)(GLenum mode)) _func)(mode);
+}
+
+void APIENTRY shared_dispatch_stub_255(GLint x, GLint y, GLsizei width, GLsizei height, GLenum type)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[255];
+ ((void (APIENTRY *)(GLint x, GLint y, GLsizei width, GLsizei height, GLenum type)) _func)(x, y, width, height, type);
+}
+
+void APIENTRY shared_dispatch_stub_256(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[256];
+ ((void (APIENTRY *)(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels)) _func)(x, y, width, height, format, type, pixels);
+}
+
+void APIENTRY shared_dispatch_stub_257(GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[257];
+ ((void (APIENTRY *)(GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels)) _func)(width, height, format, type, pixels);
+}
+
+void APIENTRY shared_dispatch_stub_258(GLenum pname, GLboolean *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[258];
+ ((void (APIENTRY *)(GLenum pname, GLboolean *params)) _func)(pname, params);
+}
+
+void APIENTRY shared_dispatch_stub_259(GLenum plane, GLdouble *equation)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[259];
+ ((void (APIENTRY *)(GLenum plane, GLdouble *equation)) _func)(plane, equation);
+}
+
+void APIENTRY shared_dispatch_stub_260(GLenum pname, GLdouble *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[260];
+ ((void (APIENTRY *)(GLenum pname, GLdouble *params)) _func)(pname, params);
+}
+
+GLenum APIENTRY shared_dispatch_stub_261(void)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[261];
+ return ((GLenum (APIENTRY *)(void)) _func)();
+}
+
+void APIENTRY shared_dispatch_stub_262(GLenum pname, GLfloat *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[262];
+ ((void (APIENTRY *)(GLenum pname, GLfloat *params)) _func)(pname, params);
+}
+
+void APIENTRY shared_dispatch_stub_263(GLenum pname, GLint *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[263];
+ ((void (APIENTRY *)(GLenum pname, GLint *params)) _func)(pname, params);
+}
+
+void APIENTRY shared_dispatch_stub_264(GLenum light, GLenum pname, GLfloat *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[264];
+ ((void (APIENTRY *)(GLenum light, GLenum pname, GLfloat *params)) _func)(light, pname, params);
+}
+
+void APIENTRY shared_dispatch_stub_265(GLenum light, GLenum pname, GLint *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[265];
+ ((void (APIENTRY *)(GLenum light, GLenum pname, GLint *params)) _func)(light, pname, params);
+}
+
+void APIENTRY shared_dispatch_stub_266(GLenum target, GLenum query, GLdouble *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[266];
+ ((void (APIENTRY *)(GLenum target, GLenum query, GLdouble *v)) _func)(target, query, v);
+}
+
+void APIENTRY shared_dispatch_stub_267(GLenum target, GLenum query, GLfloat *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[267];
+ ((void (APIENTRY *)(GLenum target, GLenum query, GLfloat *v)) _func)(target, query, v);
+}
+
+void APIENTRY shared_dispatch_stub_268(GLenum target, GLenum query, GLint *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[268];
+ ((void (APIENTRY *)(GLenum target, GLenum query, GLint *v)) _func)(target, query, v);
+}
+
+void APIENTRY shared_dispatch_stub_269(GLenum face, GLenum pname, GLfloat *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[269];
+ ((void (APIENTRY *)(GLenum face, GLenum pname, GLfloat *params)) _func)(face, pname, params);
+}
+
+void APIENTRY shared_dispatch_stub_270(GLenum face, GLenum pname, GLint *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[270];
+ ((void (APIENTRY *)(GLenum face, GLenum pname, GLint *params)) _func)(face, pname, params);
+}
+
+void APIENTRY shared_dispatch_stub_271(GLenum map, GLfloat *values)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[271];
+ ((void (APIENTRY *)(GLenum map, GLfloat *values)) _func)(map, values);
+}
+
+void APIENTRY shared_dispatch_stub_272(GLenum map, GLuint *values)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[272];
+ ((void (APIENTRY *)(GLenum map, GLuint *values)) _func)(map, values);
+}
+
+void APIENTRY shared_dispatch_stub_273(GLenum map, GLushort *values)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[273];
+ ((void (APIENTRY *)(GLenum map, GLushort *values)) _func)(map, values);
+}
+
+void APIENTRY shared_dispatch_stub_274(GLubyte *mask)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[274];
+ ((void (APIENTRY *)(GLubyte *mask)) _func)(mask);
+}
+
+const GLubyte * APIENTRY shared_dispatch_stub_275(GLenum name)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[275];
+ return ((const GLubyte * (APIENTRY *)(GLenum name)) _func)(name);
+}
+
+void APIENTRY shared_dispatch_stub_276(GLenum target, GLenum pname, GLfloat *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[276];
+ ((void (APIENTRY *)(GLenum target, GLenum pname, GLfloat *params)) _func)(target, pname, params);
+}
+
+void APIENTRY shared_dispatch_stub_277(GLenum target, GLenum pname, GLint *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[277];
+ ((void (APIENTRY *)(GLenum target, GLenum pname, GLint *params)) _func)(target, pname, params);
+}
+
+void APIENTRY shared_dispatch_stub_278(GLenum coord, GLenum pname, GLdouble *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[278];
+ ((void (APIENTRY *)(GLenum coord, GLenum pname, GLdouble *params)) _func)(coord, pname, params);
+}
+
+void APIENTRY shared_dispatch_stub_279(GLenum coord, GLenum pname, GLfloat *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[279];
+ ((void (APIENTRY *)(GLenum coord, GLenum pname, GLfloat *params)) _func)(coord, pname, params);
+}
+
+void APIENTRY shared_dispatch_stub_280(GLenum coord, GLenum pname, GLint *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[280];
+ ((void (APIENTRY *)(GLenum coord, GLenum pname, GLint *params)) _func)(coord, pname, params);
+}
+
+void APIENTRY shared_dispatch_stub_281(GLenum target, GLint level, GLenum format, GLenum type, GLvoid *pixels)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[281];
+ ((void (APIENTRY *)(GLenum target, GLint level, GLenum format, GLenum type, GLvoid *pixels)) _func)(target, level, format, type, pixels);
+}
+
+void APIENTRY shared_dispatch_stub_282(GLenum target, GLenum pname, GLfloat *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[282];
+ ((void (APIENTRY *)(GLenum target, GLenum pname, GLfloat *params)) _func)(target, pname, params);
+}
+
+void APIENTRY shared_dispatch_stub_283(GLenum target, GLenum pname, GLint *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[283];
+ ((void (APIENTRY *)(GLenum target, GLenum pname, GLint *params)) _func)(target, pname, params);
+}
+
+void APIENTRY shared_dispatch_stub_284(GLenum target, GLint level, GLenum pname, GLfloat *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[284];
+ ((void (APIENTRY *)(GLenum target, GLint level, GLenum pname, GLfloat *params)) _func)(target, level, pname, params);
+}
+
+void APIENTRY shared_dispatch_stub_285(GLenum target, GLint level, GLenum pname, GLint *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[285];
+ ((void (APIENTRY *)(GLenum target, GLint level, GLenum pname, GLint *params)) _func)(target, level, pname, params);
+}
+
+GLboolean APIENTRY shared_dispatch_stub_286(GLenum cap)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[286];
+ return ((GLboolean (APIENTRY *)(GLenum cap)) _func)(cap);
+}
+
+GLboolean APIENTRY shared_dispatch_stub_287(GLuint list)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[287];
+ return ((GLboolean (APIENTRY *)(GLuint list)) _func)(list);
+}
+
+void APIENTRY shared_dispatch_stub_288(GLclampd zNear, GLclampd zFar)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[288];
+ ((void (APIENTRY *)(GLclampd zNear, GLclampd zFar)) _func)(zNear, zFar);
+}
+
+void APIENTRY shared_dispatch_stub_289(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[289];
+ ((void (APIENTRY *)(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar)) _func)(left, right, bottom, top, zNear, zFar);
+}
+
+void APIENTRY shared_dispatch_stub_290(void)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[290];
+ ((void (APIENTRY *)(void)) _func)();
+}
+
+void APIENTRY shared_dispatch_stub_291(const GLfloat *m)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[291];
+ ((void (APIENTRY *)(const GLfloat *m)) _func)(m);
+}
+
+void APIENTRY shared_dispatch_stub_292(const GLdouble *m)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[292];
+ ((void (APIENTRY *)(const GLdouble *m)) _func)(m);
+}
+
+void APIENTRY shared_dispatch_stub_293(GLenum mode)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[293];
+ ((void (APIENTRY *)(GLenum mode)) _func)(mode);
+}
+
+void APIENTRY shared_dispatch_stub_294(const GLfloat *m)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[294];
+ ((void (APIENTRY *)(const GLfloat *m)) _func)(m);
+}
+
+void APIENTRY shared_dispatch_stub_295(const GLdouble *m)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[295];
+ ((void (APIENTRY *)(const GLdouble *m)) _func)(m);
+}
+
+void APIENTRY shared_dispatch_stub_296(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[296];
+ ((void (APIENTRY *)(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar)) _func)(left, right, bottom, top, zNear, zFar);
+}
+
+void APIENTRY shared_dispatch_stub_297(void)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[297];
+ ((void (APIENTRY *)(void)) _func)();
+}
+
+void APIENTRY shared_dispatch_stub_298(void)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[298];
+ ((void (APIENTRY *)(void)) _func)();
+}
+
+void APIENTRY shared_dispatch_stub_299(GLdouble angle, GLdouble x, GLdouble y, GLdouble z)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[299];
+ ((void (APIENTRY *)(GLdouble angle, GLdouble x, GLdouble y, GLdouble z)) _func)(angle, x, y, z);
+}
+
+void APIENTRY shared_dispatch_stub_300(GLfloat angle, GLfloat x, GLfloat y, GLfloat z)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[300];
+ ((void (APIENTRY *)(GLfloat angle, GLfloat x, GLfloat y, GLfloat z)) _func)(angle, x, y, z);
+}
+
+void APIENTRY shared_dispatch_stub_301(GLdouble x, GLdouble y, GLdouble z)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[301];
+ ((void (APIENTRY *)(GLdouble x, GLdouble y, GLdouble z)) _func)(x, y, z);
+}
+
+void APIENTRY shared_dispatch_stub_302(GLfloat x, GLfloat y, GLfloat z)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[302];
+ ((void (APIENTRY *)(GLfloat x, GLfloat y, GLfloat z)) _func)(x, y, z);
+}
+
+void APIENTRY shared_dispatch_stub_303(GLdouble x, GLdouble y, GLdouble z)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[303];
+ ((void (APIENTRY *)(GLdouble x, GLdouble y, GLdouble z)) _func)(x, y, z);
+}
+
+void APIENTRY shared_dispatch_stub_304(GLfloat x, GLfloat y, GLfloat z)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[304];
+ ((void (APIENTRY *)(GLfloat x, GLfloat y, GLfloat z)) _func)(x, y, z);
+}
+
+void APIENTRY shared_dispatch_stub_305(GLint x, GLint y, GLsizei width, GLsizei height)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[305];
+ ((void (APIENTRY *)(GLint x, GLint y, GLsizei width, GLsizei height)) _func)(x, y, width, height);
+}
+
+void APIENTRY shared_dispatch_stub_306(GLint i)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[306];
+ ((void (APIENTRY *)(GLint i)) _func)(i);
+}
+
+void APIENTRY shared_dispatch_stub_307(GLenum target, GLuint texture)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[307];
+ ((void (APIENTRY *)(GLenum target, GLuint texture)) _func)(target, texture);
+}
+
+void APIENTRY shared_dispatch_stub_308(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[308];
+ ((void (APIENTRY *)(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer)) _func)(size, type, stride, pointer);
+}
+
+void APIENTRY shared_dispatch_stub_309(GLenum array)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[309];
+ ((void (APIENTRY *)(GLenum array)) _func)(array);
+}
+
+void APIENTRY shared_dispatch_stub_310(GLenum mode, GLint first, GLsizei count)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[310];
+ ((void (APIENTRY *)(GLenum mode, GLint first, GLsizei count)) _func)(mode, first, count);
+}
+
+void APIENTRY shared_dispatch_stub_311(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[311];
+ ((void (APIENTRY *)(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices)) _func)(mode, count, type, indices);
+}
+
+void APIENTRY shared_dispatch_stub_312(GLsizei stride, const GLvoid *pointer)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[312];
+ ((void (APIENTRY *)(GLsizei stride, const GLvoid *pointer)) _func)(stride, pointer);
+}
+
+void APIENTRY shared_dispatch_stub_313(GLenum array)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[313];
+ ((void (APIENTRY *)(GLenum array)) _func)(array);
+}
+
+void APIENTRY shared_dispatch_stub_314(GLenum type, GLsizei stride, const GLvoid *pointer)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[314];
+ ((void (APIENTRY *)(GLenum type, GLsizei stride, const GLvoid *pointer)) _func)(type, stride, pointer);
+}
+
+void APIENTRY shared_dispatch_stub_315(GLubyte c)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[315];
+ ((void (APIENTRY *)(GLubyte c)) _func)(c);
+}
+
+void APIENTRY shared_dispatch_stub_316(const GLubyte *c)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[316];
+ ((void (APIENTRY *)(const GLubyte *c)) _func)(c);
+}
+
+void APIENTRY shared_dispatch_stub_317(GLenum format, GLsizei stride, const GLvoid *pointer)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[317];
+ ((void (APIENTRY *)(GLenum format, GLsizei stride, const GLvoid *pointer)) _func)(format, stride, pointer);
+}
+
+void APIENTRY shared_dispatch_stub_318(GLenum type, GLsizei stride, const GLvoid *pointer)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[318];
+ ((void (APIENTRY *)(GLenum type, GLsizei stride, const GLvoid *pointer)) _func)(type, stride, pointer);
+}
+
+void APIENTRY shared_dispatch_stub_319(GLfloat factor, GLfloat units)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[319];
+ ((void (APIENTRY *)(GLfloat factor, GLfloat units)) _func)(factor, units);
+}
+
+void APIENTRY shared_dispatch_stub_320(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[320];
+ ((void (APIENTRY *)(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer)) _func)(size, type, stride, pointer);
+}
+
+void APIENTRY shared_dispatch_stub_321(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[321];
+ ((void (APIENTRY *)(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer)) _func)(size, type, stride, pointer);
+}
+
+GLboolean APIENTRY shared_dispatch_stub_322(GLsizei n, const GLuint *textures, GLboolean *residences)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[322];
+ return ((GLboolean (APIENTRY *)(GLsizei n, const GLuint *textures, GLboolean *residences)) _func)(n, textures, residences);
+}
+
+void APIENTRY shared_dispatch_stub_323(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[323];
+ ((void (APIENTRY *)(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border)) _func)(target, level, internalformat, x, y, width, border);
+}
+
+void APIENTRY shared_dispatch_stub_324(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[324];
+ ((void (APIENTRY *)(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border)) _func)(target, level, internalformat, x, y, width, height, border);
+}
+
+void APIENTRY shared_dispatch_stub_325(GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[325];
+ ((void (APIENTRY *)(GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width)) _func)(target, level, xoffset, x, y, width);
+}
+
+void APIENTRY shared_dispatch_stub_326(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[326];
+ ((void (APIENTRY *)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height)) _func)(target, level, xoffset, yoffset, x, y, width, height);
+}
+
+void APIENTRY shared_dispatch_stub_327(GLsizei n, const GLuint *textures)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[327];
+ ((void (APIENTRY *)(GLsizei n, const GLuint *textures)) _func)(n, textures);
+}
+
+void APIENTRY shared_dispatch_stub_328(GLsizei n, GLuint *textures)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[328];
+ ((void (APIENTRY *)(GLsizei n, GLuint *textures)) _func)(n, textures);
+}
+
+void APIENTRY shared_dispatch_stub_329(GLenum pname, GLvoid **params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[329];
+ ((void (APIENTRY *)(GLenum pname, GLvoid **params)) _func)(pname, params);
+}
+
+GLboolean APIENTRY shared_dispatch_stub_330(GLuint texture)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[330];
+ return ((GLboolean (APIENTRY *)(GLuint texture)) _func)(texture);
+}
+
+void APIENTRY shared_dispatch_stub_331(GLsizei n, const GLuint *textures, const GLclampf *priorities)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[331];
+ ((void (APIENTRY *)(GLsizei n, const GLuint *textures, const GLclampf *priorities)) _func)(n, textures, priorities);
+}
+
+void APIENTRY shared_dispatch_stub_332(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[332];
+ ((void (APIENTRY *)(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels)) _func)(target, level, xoffset, width, format, type, pixels);
+}
+
+void APIENTRY shared_dispatch_stub_333(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[333];
+ ((void (APIENTRY *)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels)) _func)(target, level, xoffset, yoffset, width, height, format, type, pixels);
+}
+
+void APIENTRY shared_dispatch_stub_334(void)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[334];
+ ((void (APIENTRY *)(void)) _func)();
+}
+
+void APIENTRY shared_dispatch_stub_335(GLbitfield mask)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[335];
+ ((void (APIENTRY *)(GLbitfield mask)) _func)(mask);
+}
+
+void APIENTRY shared_dispatch_stub_336(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[336];
+ ((void (APIENTRY *)(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)) _func)(red, green, blue, alpha);
+}
+
+void APIENTRY shared_dispatch_stub_337(GLenum mode)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[337];
+ ((void (APIENTRY *)(GLenum mode)) _func)(mode);
+}
+
+void APIENTRY shared_dispatch_stub_338(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[338];
+ ((void (APIENTRY *)(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices)) _func)(mode, start, end, count, type, indices);
+}
+
+void APIENTRY shared_dispatch_stub_339(GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *table)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[339];
+ ((void (APIENTRY *)(GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *table)) _func)(target, internalformat, width, format, type, table);
+}
+
+void APIENTRY shared_dispatch_stub_340(GLenum target, GLenum pname, const GLfloat *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[340];
+ ((void (APIENTRY *)(GLenum target, GLenum pname, const GLfloat *params)) _func)(target, pname, params);
+}
+
+void APIENTRY shared_dispatch_stub_341(GLenum target, GLenum pname, const GLint *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[341];
+ ((void (APIENTRY *)(GLenum target, GLenum pname, const GLint *params)) _func)(target, pname, params);
+}
+
+void APIENTRY shared_dispatch_stub_342(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[342];
+ ((void (APIENTRY *)(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width)) _func)(target, internalformat, x, y, width);
+}
+
+void APIENTRY shared_dispatch_stub_343(GLenum target, GLenum format, GLenum type, GLvoid *table)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[343];
+ ((void (APIENTRY *)(GLenum target, GLenum format, GLenum type, GLvoid *table)) _func)(target, format, type, table);
+}
+
+void APIENTRY shared_dispatch_stub_344(GLenum target, GLenum pname, GLfloat *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[344];
+ ((void (APIENTRY *)(GLenum target, GLenum pname, GLfloat *params)) _func)(target, pname, params);
+}
+
+void APIENTRY shared_dispatch_stub_345(GLenum target, GLenum pname, GLint *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[345];
+ ((void (APIENTRY *)(GLenum target, GLenum pname, GLint *params)) _func)(target, pname, params);
+}
+
+void APIENTRY shared_dispatch_stub_346(GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid *data)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[346];
+ ((void (APIENTRY *)(GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid *data)) _func)(target, start, count, format, type, data);
+}
+
+void APIENTRY shared_dispatch_stub_347(GLenum target, GLsizei start, GLint x, GLint y, GLsizei width)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[347];
+ ((void (APIENTRY *)(GLenum target, GLsizei start, GLint x, GLint y, GLsizei width)) _func)(target, start, x, y, width);
+}
+
+void APIENTRY shared_dispatch_stub_348(GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *image)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[348];
+ ((void (APIENTRY *)(GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *image)) _func)(target, internalformat, width, format, type, image);
+}
+
+void APIENTRY shared_dispatch_stub_349(GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *image)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[349];
+ ((void (APIENTRY *)(GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *image)) _func)(target, internalformat, width, height, format, type, image);
+}
+
+void APIENTRY shared_dispatch_stub_350(GLenum target, GLenum pname, GLfloat params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[350];
+ ((void (APIENTRY *)(GLenum target, GLenum pname, GLfloat params)) _func)(target, pname, params);
+}
+
+void APIENTRY shared_dispatch_stub_351(GLenum target, GLenum pname, const GLfloat *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[351];
+ ((void (APIENTRY *)(GLenum target, GLenum pname, const GLfloat *params)) _func)(target, pname, params);
+}
+
+void APIENTRY shared_dispatch_stub_352(GLenum target, GLenum pname, GLint params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[352];
+ ((void (APIENTRY *)(GLenum target, GLenum pname, GLint params)) _func)(target, pname, params);
+}
+
+void APIENTRY shared_dispatch_stub_353(GLenum target, GLenum pname, const GLint *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[353];
+ ((void (APIENTRY *)(GLenum target, GLenum pname, const GLint *params)) _func)(target, pname, params);
+}
+
+void APIENTRY shared_dispatch_stub_354(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[354];
+ ((void (APIENTRY *)(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width)) _func)(target, internalformat, x, y, width);
+}
+
+void APIENTRY shared_dispatch_stub_355(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[355];
+ ((void (APIENTRY *)(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height)) _func)(target, internalformat, x, y, width, height);
+}
+
+void APIENTRY shared_dispatch_stub_356(GLenum target, GLenum format, GLenum type, GLvoid *image)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[356];
+ ((void (APIENTRY *)(GLenum target, GLenum format, GLenum type, GLvoid *image)) _func)(target, format, type, image);
+}
+
+void APIENTRY shared_dispatch_stub_357(GLenum target, GLenum pname, GLfloat *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[357];
+ ((void (APIENTRY *)(GLenum target, GLenum pname, GLfloat *params)) _func)(target, pname, params);
+}
+
+void APIENTRY shared_dispatch_stub_358(GLenum target, GLenum pname, GLint *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[358];
+ ((void (APIENTRY *)(GLenum target, GLenum pname, GLint *params)) _func)(target, pname, params);
+}
+
+void APIENTRY shared_dispatch_stub_359(GLenum target, GLenum format, GLenum type, GLvoid *row, GLvoid *column, GLvoid *span)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[359];
+ ((void (APIENTRY *)(GLenum target, GLenum format, GLenum type, GLvoid *row, GLvoid *column, GLvoid *span)) _func)(target, format, type, row, column, span);
+}
+
+void APIENTRY shared_dispatch_stub_360(GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *row, const GLvoid *column)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[360];
+ ((void (APIENTRY *)(GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *row, const GLvoid *column)) _func)(target, internalformat, width, height, format, type, row, column);
+}
+
+void APIENTRY shared_dispatch_stub_361(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[361];
+ ((void (APIENTRY *)(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values)) _func)(target, reset, format, type, values);
+}
+
+void APIENTRY shared_dispatch_stub_362(GLenum target, GLenum pname, GLfloat *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[362];
+ ((void (APIENTRY *)(GLenum target, GLenum pname, GLfloat *params)) _func)(target, pname, params);
+}
+
+void APIENTRY shared_dispatch_stub_363(GLenum target, GLenum pname, GLint *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[363];
+ ((void (APIENTRY *)(GLenum target, GLenum pname, GLint *params)) _func)(target, pname, params);
+}
+
+void APIENTRY shared_dispatch_stub_364(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[364];
+ ((void (APIENTRY *)(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values)) _func)(target, reset, format, type, values);
+}
+
+void APIENTRY shared_dispatch_stub_365(GLenum target, GLenum pname, GLfloat *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[365];
+ ((void (APIENTRY *)(GLenum target, GLenum pname, GLfloat *params)) _func)(target, pname, params);
+}
+
+void APIENTRY shared_dispatch_stub_366(GLenum target, GLenum pname, GLint *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[366];
+ ((void (APIENTRY *)(GLenum target, GLenum pname, GLint *params)) _func)(target, pname, params);
+}
+
+void APIENTRY shared_dispatch_stub_367(GLenum target, GLsizei width, GLenum internalformat, GLboolean sink)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[367];
+ ((void (APIENTRY *)(GLenum target, GLsizei width, GLenum internalformat, GLboolean sink)) _func)(target, width, internalformat, sink);
+}
+
+void APIENTRY shared_dispatch_stub_368(GLenum target, GLenum internalformat, GLboolean sink)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[368];
+ ((void (APIENTRY *)(GLenum target, GLenum internalformat, GLboolean sink)) _func)(target, internalformat, sink);
+}
+
+void APIENTRY shared_dispatch_stub_369(GLenum target)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[369];
+ ((void (APIENTRY *)(GLenum target)) _func)(target);
+}
+
+void APIENTRY shared_dispatch_stub_370(GLenum target)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[370];
+ ((void (APIENTRY *)(GLenum target)) _func)(target);
+}
+
+void APIENTRY shared_dispatch_stub_371(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[371];
+ ((void (APIENTRY *)(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels)) _func)(target, level, internalformat, width, height, depth, border, format, type, pixels);
+}
+
+void APIENTRY shared_dispatch_stub_372(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[372];
+ ((void (APIENTRY *)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels)) _func)(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels);
+}
+
+void APIENTRY shared_dispatch_stub_373(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[373];
+ ((void (APIENTRY *)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height)) _func)(target, level, xoffset, yoffset, zoffset, x, y, width, height);
+}
+
+void APIENTRY shared_dispatch_stub_374(GLenum texture)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[374];
+ ((void (APIENTRY *)(GLenum texture)) _func)(texture);
+}
+
+void APIENTRY shared_dispatch_stub_375(GLenum texture)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[375];
+ ((void (APIENTRY *)(GLenum texture)) _func)(texture);
+}
+
+void APIENTRY shared_dispatch_stub_376(GLenum target, GLdouble s)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[376];
+ ((void (APIENTRY *)(GLenum target, GLdouble s)) _func)(target, s);
+}
+
+void APIENTRY shared_dispatch_stub_377(GLenum target, const GLdouble *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[377];
+ ((void (APIENTRY *)(GLenum target, const GLdouble *v)) _func)(target, v);
+}
+
+void APIENTRY shared_dispatch_stub_378(GLenum target, GLfloat s)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[378];
+ ((void (APIENTRY *)(GLenum target, GLfloat s)) _func)(target, s);
+}
+
+void APIENTRY shared_dispatch_stub_379(GLenum target, const GLfloat *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[379];
+ ((void (APIENTRY *)(GLenum target, const GLfloat *v)) _func)(target, v);
+}
+
+void APIENTRY shared_dispatch_stub_380(GLenum target, GLint s)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[380];
+ ((void (APIENTRY *)(GLenum target, GLint s)) _func)(target, s);
+}
+
+void APIENTRY shared_dispatch_stub_381(GLenum target, const GLint *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[381];
+ ((void (APIENTRY *)(GLenum target, const GLint *v)) _func)(target, v);
+}
+
+void APIENTRY shared_dispatch_stub_382(GLenum target, GLshort s)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[382];
+ ((void (APIENTRY *)(GLenum target, GLshort s)) _func)(target, s);
+}
+
+void APIENTRY shared_dispatch_stub_383(GLenum target, const GLshort *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[383];
+ ((void (APIENTRY *)(GLenum target, const GLshort *v)) _func)(target, v);
+}
+
+void APIENTRY shared_dispatch_stub_384(GLenum target, GLdouble s, GLdouble t)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[384];
+ ((void (APIENTRY *)(GLenum target, GLdouble s, GLdouble t)) _func)(target, s, t);
+}
+
+void APIENTRY shared_dispatch_stub_385(GLenum target, const GLdouble *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[385];
+ ((void (APIENTRY *)(GLenum target, const GLdouble *v)) _func)(target, v);
+}
+
+void APIENTRY shared_dispatch_stub_386(GLenum target, GLfloat s, GLfloat t)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[386];
+ ((void (APIENTRY *)(GLenum target, GLfloat s, GLfloat t)) _func)(target, s, t);
+}
+
+void APIENTRY shared_dispatch_stub_387(GLenum target, const GLfloat *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[387];
+ ((void (APIENTRY *)(GLenum target, const GLfloat *v)) _func)(target, v);
+}
+
+void APIENTRY shared_dispatch_stub_388(GLenum target, GLint s, GLint t)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[388];
+ ((void (APIENTRY *)(GLenum target, GLint s, GLint t)) _func)(target, s, t);
+}
+
+void APIENTRY shared_dispatch_stub_389(GLenum target, const GLint *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[389];
+ ((void (APIENTRY *)(GLenum target, const GLint *v)) _func)(target, v);
+}
+
+void APIENTRY shared_dispatch_stub_390(GLenum target, GLshort s, GLshort t)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[390];
+ ((void (APIENTRY *)(GLenum target, GLshort s, GLshort t)) _func)(target, s, t);
+}
+
+void APIENTRY shared_dispatch_stub_391(GLenum target, const GLshort *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[391];
+ ((void (APIENTRY *)(GLenum target, const GLshort *v)) _func)(target, v);
+}
+
+void APIENTRY shared_dispatch_stub_392(GLenum target, GLdouble s, GLdouble t, GLdouble r)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[392];
+ ((void (APIENTRY *)(GLenum target, GLdouble s, GLdouble t, GLdouble r)) _func)(target, s, t, r);
+}
+
+void APIENTRY shared_dispatch_stub_393(GLenum target, const GLdouble *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[393];
+ ((void (APIENTRY *)(GLenum target, const GLdouble *v)) _func)(target, v);
+}
+
+void APIENTRY shared_dispatch_stub_394(GLenum target, GLfloat s, GLfloat t, GLfloat r)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[394];
+ ((void (APIENTRY *)(GLenum target, GLfloat s, GLfloat t, GLfloat r)) _func)(target, s, t, r);
+}
+
+void APIENTRY shared_dispatch_stub_395(GLenum target, const GLfloat *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[395];
+ ((void (APIENTRY *)(GLenum target, const GLfloat *v)) _func)(target, v);
+}
+
+void APIENTRY shared_dispatch_stub_396(GLenum target, GLint s, GLint t, GLint r)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[396];
+ ((void (APIENTRY *)(GLenum target, GLint s, GLint t, GLint r)) _func)(target, s, t, r);
+}
+
+void APIENTRY shared_dispatch_stub_397(GLenum target, const GLint *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[397];
+ ((void (APIENTRY *)(GLenum target, const GLint *v)) _func)(target, v);
+}
+
+void APIENTRY shared_dispatch_stub_398(GLenum target, GLshort s, GLshort t, GLshort r)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[398];
+ ((void (APIENTRY *)(GLenum target, GLshort s, GLshort t, GLshort r)) _func)(target, s, t, r);
+}
+
+void APIENTRY shared_dispatch_stub_399(GLenum target, const GLshort *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[399];
+ ((void (APIENTRY *)(GLenum target, const GLshort *v)) _func)(target, v);
+}
+
+void APIENTRY shared_dispatch_stub_400(GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[400];
+ ((void (APIENTRY *)(GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q)) _func)(target, s, t, r, q);
+}
+
+void APIENTRY shared_dispatch_stub_401(GLenum target, const GLdouble *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[401];
+ ((void (APIENTRY *)(GLenum target, const GLdouble *v)) _func)(target, v);
+}
+
+void APIENTRY shared_dispatch_stub_402(GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[402];
+ ((void (APIENTRY *)(GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q)) _func)(target, s, t, r, q);
+}
+
+void APIENTRY shared_dispatch_stub_403(GLenum target, const GLfloat *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[403];
+ ((void (APIENTRY *)(GLenum target, const GLfloat *v)) _func)(target, v);
+}
+
+void APIENTRY shared_dispatch_stub_404(GLenum target, GLint s, GLint t, GLint r, GLint q)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[404];
+ ((void (APIENTRY *)(GLenum target, GLint s, GLint t, GLint r, GLint q)) _func)(target, s, t, r, q);
+}
+
+void APIENTRY shared_dispatch_stub_405(GLenum target, const GLint *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[405];
+ ((void (APIENTRY *)(GLenum target, const GLint *v)) _func)(target, v);
+}
+
+void APIENTRY shared_dispatch_stub_406(GLenum target, GLshort s, GLshort t, GLshort r, GLshort q)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[406];
+ ((void (APIENTRY *)(GLenum target, GLshort s, GLshort t, GLshort r, GLshort q)) _func)(target, s, t, r, q);
+}
+
+void APIENTRY shared_dispatch_stub_407(GLenum target, const GLshort *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[407];
+ ((void (APIENTRY *)(GLenum target, const GLshort *v)) _func)(target, v);
+}
+
+void APIENTRY shared_dispatch_stub_408(GLuint program, GLuint shader)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[408];
+ ((void (APIENTRY *)(GLuint program, GLuint shader)) _func)(program, shader);
+}
+
+GLuint APIENTRY shared_dispatch_stub_409(void)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[409];
+ return ((GLuint (APIENTRY *)(void)) _func)();
+}
+
+GLuint APIENTRY shared_dispatch_stub_410(GLenum type)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[410];
+ return ((GLuint (APIENTRY *)(GLenum type)) _func)(type);
+}
+
+void APIENTRY shared_dispatch_stub_411(GLuint program)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[411];
+ ((void (APIENTRY *)(GLuint program)) _func)(program);
+}
+
+void APIENTRY shared_dispatch_stub_412(GLuint program)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[412];
+ ((void (APIENTRY *)(GLuint program)) _func)(program);
+}
+
+void APIENTRY shared_dispatch_stub_413(GLuint program, GLuint shader)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[413];
+ ((void (APIENTRY *)(GLuint program, GLuint shader)) _func)(program, shader);
+}
+
+void APIENTRY shared_dispatch_stub_414(GLuint program, GLsizei maxCount, GLsizei *count, GLuint *obj)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[414];
+ ((void (APIENTRY *)(GLuint program, GLsizei maxCount, GLsizei *count, GLuint *obj)) _func)(program, maxCount, count, obj);
+}
+
+void APIENTRY shared_dispatch_stub_415(GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[415];
+ ((void (APIENTRY *)(GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog)) _func)(program, bufSize, length, infoLog);
+}
+
+void APIENTRY shared_dispatch_stub_416(GLuint program, GLenum pname, GLint *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[416];
+ ((void (APIENTRY *)(GLuint program, GLenum pname, GLint *params)) _func)(program, pname, params);
+}
+
+void APIENTRY shared_dispatch_stub_417(GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[417];
+ ((void (APIENTRY *)(GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog)) _func)(shader, bufSize, length, infoLog);
+}
+
+void APIENTRY shared_dispatch_stub_418(GLuint shader, GLenum pname, GLint *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[418];
+ ((void (APIENTRY *)(GLuint shader, GLenum pname, GLint *params)) _func)(shader, pname, params);
+}
+
+GLboolean APIENTRY shared_dispatch_stub_419(GLuint program)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[419];
+ return ((GLboolean (APIENTRY *)(GLuint program)) _func)(program);
+}
+
+GLboolean APIENTRY shared_dispatch_stub_420(GLuint shader)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[420];
+ return ((GLboolean (APIENTRY *)(GLuint shader)) _func)(shader);
+}
+
+void APIENTRY shared_dispatch_stub_421(GLenum face, GLenum func, GLint ref, GLuint mask)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[421];
+ ((void (APIENTRY *)(GLenum face, GLenum func, GLint ref, GLuint mask)) _func)(face, func, ref, mask);
+}
+
+void APIENTRY shared_dispatch_stub_422(GLenum face, GLuint mask)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[422];
+ ((void (APIENTRY *)(GLenum face, GLuint mask)) _func)(face, mask);
+}
+
+void APIENTRY shared_dispatch_stub_423(GLenum face, GLenum sfail, GLenum zfail, GLenum zpass)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[423];
+ ((void (APIENTRY *)(GLenum face, GLenum sfail, GLenum zfail, GLenum zpass)) _func)(face, sfail, zfail, zpass);
+}
+
+void APIENTRY shared_dispatch_stub_424(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[424];
+ ((void (APIENTRY *)(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)) _func)(location, count, transpose, value);
+}
+
+void APIENTRY shared_dispatch_stub_425(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[425];
+ ((void (APIENTRY *)(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)) _func)(location, count, transpose, value);
+}
+
+void APIENTRY shared_dispatch_stub_426(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[426];
+ ((void (APIENTRY *)(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)) _func)(location, count, transpose, value);
+}
+
+void APIENTRY shared_dispatch_stub_427(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[427];
+ ((void (APIENTRY *)(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)) _func)(location, count, transpose, value);
+}
+
+void APIENTRY shared_dispatch_stub_428(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[428];
+ ((void (APIENTRY *)(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)) _func)(location, count, transpose, value);
+}
+
+void APIENTRY shared_dispatch_stub_429(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[429];
+ ((void (APIENTRY *)(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)) _func)(location, count, transpose, value);
+}
+
+void APIENTRY shared_dispatch_stub_430(GLenum target, GLenum clamp)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[430];
+ ((void (APIENTRY *)(GLenum target, GLenum clamp)) _func)(target, clamp);
+}
+
+void APIENTRY shared_dispatch_stub_431(GLenum buffer, GLint drawbuffer, const GLfloat depth, const GLint stencil)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[431];
+ ((void (APIENTRY *)(GLenum buffer, GLint drawbuffer, const GLfloat depth, const GLint stencil)) _func)(buffer, drawbuffer, depth, stencil);
+}
+
+void APIENTRY shared_dispatch_stub_432(GLenum buffer, GLint drawbuffer, const GLfloat *value)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[432];
+ ((void (APIENTRY *)(GLenum buffer, GLint drawbuffer, const GLfloat *value)) _func)(buffer, drawbuffer, value);
+}
+
+void APIENTRY shared_dispatch_stub_433(GLenum buffer, GLint drawbuffer, const GLint *value)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[433];
+ ((void (APIENTRY *)(GLenum buffer, GLint drawbuffer, const GLint *value)) _func)(buffer, drawbuffer, value);
+}
+
+void APIENTRY shared_dispatch_stub_434(GLenum buffer, GLint drawbuffer, const GLuint *value)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[434];
+ ((void (APIENTRY *)(GLenum buffer, GLint drawbuffer, const GLuint *value)) _func)(buffer, drawbuffer, value);
+}
+
+const GLubyte * APIENTRY shared_dispatch_stub_435(GLenum name, GLuint index)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[435];
+ return ((const GLubyte * (APIENTRY *)(GLenum name, GLuint index)) _func)(name, index);
+}
+
+void APIENTRY shared_dispatch_stub_436(GLenum target, GLenum internalFormat, GLuint buffer)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[436];
+ ((void (APIENTRY *)(GLenum target, GLenum internalFormat, GLuint buffer)) _func)(target, internalFormat, buffer);
+}
+
+void APIENTRY shared_dispatch_stub_437(GLenum target, GLenum attachment, GLuint texture, GLint level)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[437];
+ ((void (APIENTRY *)(GLenum target, GLenum attachment, GLuint texture, GLint level)) _func)(target, attachment, texture, level);
+}
+
+void APIENTRY shared_dispatch_stub_438(GLenum target, GLenum pname, GLint64 *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[438];
+ ((void (APIENTRY *)(GLenum target, GLenum pname, GLint64 *params)) _func)(target, pname, params);
+}
+
+void APIENTRY shared_dispatch_stub_439(GLenum cap, GLuint index, GLint64 *data)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[439];
+ ((void (APIENTRY *)(GLenum cap, GLuint index, GLint64 *data)) _func)(cap, index, data);
+}
+
+void APIENTRY shared_dispatch_stub_440(GLuint index, GLuint divisor)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[440];
+ ((void (APIENTRY *)(GLuint index, GLuint divisor)) _func)(index, divisor);
+}
+
+void APIENTRY shared_dispatch_stub_441(const GLdouble *m)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[441];
+ ((void (APIENTRY *)(const GLdouble *m)) _func)(m);
+}
+
+void APIENTRY shared_dispatch_stub_442(const GLfloat *m)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[442];
+ ((void (APIENTRY *)(const GLfloat *m)) _func)(m);
+}
+
+void APIENTRY shared_dispatch_stub_443(const GLdouble *m)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[443];
+ ((void (APIENTRY *)(const GLdouble *m)) _func)(m);
+}
+
+void APIENTRY shared_dispatch_stub_444(const GLfloat *m)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[444];
+ ((void (APIENTRY *)(const GLfloat *m)) _func)(m);
+}
+
+void APIENTRY shared_dispatch_stub_445(GLclampf value, GLboolean invert)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[445];
+ ((void (APIENTRY *)(GLclampf value, GLboolean invert)) _func)(value, invert);
+}
+
+void APIENTRY shared_dispatch_stub_446(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[446];
+ ((void (APIENTRY *)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data)) _func)(target, level, internalformat, width, border, imageSize, data);
+}
+
+void APIENTRY shared_dispatch_stub_447(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[447];
+ ((void (APIENTRY *)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data)) _func)(target, level, internalformat, width, height, border, imageSize, data);
+}
+
+void APIENTRY shared_dispatch_stub_448(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[448];
+ ((void (APIENTRY *)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data)) _func)(target, level, internalformat, width, height, depth, border, imageSize, data);
+}
+
+void APIENTRY shared_dispatch_stub_449(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[449];
+ ((void (APIENTRY *)(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data)) _func)(target, level, xoffset, width, format, imageSize, data);
+}
+
+void APIENTRY shared_dispatch_stub_450(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[450];
+ ((void (APIENTRY *)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data)) _func)(target, level, xoffset, yoffset, width, height, format, imageSize, data);
+}
+
+void APIENTRY shared_dispatch_stub_451(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[451];
+ ((void (APIENTRY *)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data)) _func)(target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data);
+}
+
+void APIENTRY shared_dispatch_stub_452(GLenum target, GLint level, GLvoid *img)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[452];
+ ((void (APIENTRY *)(GLenum target, GLint level, GLvoid *img)) _func)(target, level, img);
+}
+
+void APIENTRY shared_dispatch_stub_453(GLuint index)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[453];
+ ((void (APIENTRY *)(GLuint index)) _func)(index);
+}
+
+void APIENTRY shared_dispatch_stub_454(GLuint index)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[454];
+ ((void (APIENTRY *)(GLuint index)) _func)(index);
+}
+
+void APIENTRY shared_dispatch_stub_455(GLenum target, GLuint index, GLdouble *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[455];
+ ((void (APIENTRY *)(GLenum target, GLuint index, GLdouble *params)) _func)(target, index, params);
+}
+
+void APIENTRY shared_dispatch_stub_456(GLenum target, GLuint index, GLfloat *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[456];
+ ((void (APIENTRY *)(GLenum target, GLuint index, GLfloat *params)) _func)(target, index, params);
+}
+
+void APIENTRY shared_dispatch_stub_457(GLenum target, GLuint index, GLdouble *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[457];
+ ((void (APIENTRY *)(GLenum target, GLuint index, GLdouble *params)) _func)(target, index, params);
+}
+
+void APIENTRY shared_dispatch_stub_458(GLenum target, GLuint index, GLfloat *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[458];
+ ((void (APIENTRY *)(GLenum target, GLuint index, GLfloat *params)) _func)(target, index, params);
+}
+
+void APIENTRY shared_dispatch_stub_459(GLenum target, GLenum pname, GLvoid *string)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[459];
+ ((void (APIENTRY *)(GLenum target, GLenum pname, GLvoid *string)) _func)(target, pname, string);
+}
+
+void APIENTRY shared_dispatch_stub_460(GLenum target, GLenum pname, GLint *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[460];
+ ((void (APIENTRY *)(GLenum target, GLenum pname, GLint *params)) _func)(target, pname, params);
+}
+
+void APIENTRY shared_dispatch_stub_461(GLuint index, GLenum pname, GLdouble *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[461];
+ ((void (APIENTRY *)(GLuint index, GLenum pname, GLdouble *params)) _func)(index, pname, params);
+}
+
+void APIENTRY shared_dispatch_stub_462(GLuint index, GLenum pname, GLfloat *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[462];
+ ((void (APIENTRY *)(GLuint index, GLenum pname, GLfloat *params)) _func)(index, pname, params);
+}
+
+void APIENTRY shared_dispatch_stub_463(GLuint index, GLenum pname, GLint *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[463];
+ ((void (APIENTRY *)(GLuint index, GLenum pname, GLint *params)) _func)(index, pname, params);
+}
+
+void APIENTRY shared_dispatch_stub_464(GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[464];
+ ((void (APIENTRY *)(GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w)) _func)(target, index, x, y, z, w);
+}
+
+void APIENTRY shared_dispatch_stub_465(GLenum target, GLuint index, const GLdouble *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[465];
+ ((void (APIENTRY *)(GLenum target, GLuint index, const GLdouble *params)) _func)(target, index, params);
+}
+
+void APIENTRY shared_dispatch_stub_466(GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[466];
+ ((void (APIENTRY *)(GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w)) _func)(target, index, x, y, z, w);
+}
+
+void APIENTRY shared_dispatch_stub_467(GLenum target, GLuint index, const GLfloat *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[467];
+ ((void (APIENTRY *)(GLenum target, GLuint index, const GLfloat *params)) _func)(target, index, params);
+}
+
+void APIENTRY shared_dispatch_stub_468(GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[468];
+ ((void (APIENTRY *)(GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w)) _func)(target, index, x, y, z, w);
+}
+
+void APIENTRY shared_dispatch_stub_469(GLenum target, GLuint index, const GLdouble *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[469];
+ ((void (APIENTRY *)(GLenum target, GLuint index, const GLdouble *params)) _func)(target, index, params);
+}
+
+void APIENTRY shared_dispatch_stub_470(GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[470];
+ ((void (APIENTRY *)(GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w)) _func)(target, index, x, y, z, w);
+}
+
+void APIENTRY shared_dispatch_stub_471(GLenum target, GLuint index, const GLfloat *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[471];
+ ((void (APIENTRY *)(GLenum target, GLuint index, const GLfloat *params)) _func)(target, index, params);
+}
+
+void APIENTRY shared_dispatch_stub_472(GLenum target, GLenum format, GLsizei len, const GLvoid *string)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[472];
+ ((void (APIENTRY *)(GLenum target, GLenum format, GLsizei len, const GLvoid *string)) _func)(target, format, len, string);
+}
+
+void APIENTRY shared_dispatch_stub_473(GLuint index, GLdouble x)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[473];
+ ((void (APIENTRY *)(GLuint index, GLdouble x)) _func)(index, x);
+}
+
+void APIENTRY shared_dispatch_stub_474(GLuint index, const GLdouble *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[474];
+ ((void (APIENTRY *)(GLuint index, const GLdouble *v)) _func)(index, v);
+}
+
+void APIENTRY shared_dispatch_stub_475(GLuint index, GLfloat x)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[475];
+ ((void (APIENTRY *)(GLuint index, GLfloat x)) _func)(index, x);
+}
+
+void APIENTRY shared_dispatch_stub_476(GLuint index, const GLfloat *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[476];
+ ((void (APIENTRY *)(GLuint index, const GLfloat *v)) _func)(index, v);
+}
+
+void APIENTRY shared_dispatch_stub_477(GLuint index, GLshort x)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[477];
+ ((void (APIENTRY *)(GLuint index, GLshort x)) _func)(index, x);
+}
+
+void APIENTRY shared_dispatch_stub_478(GLuint index, const GLshort *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[478];
+ ((void (APIENTRY *)(GLuint index, const GLshort *v)) _func)(index, v);
+}
+
+void APIENTRY shared_dispatch_stub_479(GLuint index, GLdouble x, GLdouble y)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[479];
+ ((void (APIENTRY *)(GLuint index, GLdouble x, GLdouble y)) _func)(index, x, y);
+}
+
+void APIENTRY shared_dispatch_stub_480(GLuint index, const GLdouble *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[480];
+ ((void (APIENTRY *)(GLuint index, const GLdouble *v)) _func)(index, v);
+}
+
+void APIENTRY shared_dispatch_stub_481(GLuint index, GLfloat x, GLfloat y)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[481];
+ ((void (APIENTRY *)(GLuint index, GLfloat x, GLfloat y)) _func)(index, x, y);
+}
+
+void APIENTRY shared_dispatch_stub_482(GLuint index, const GLfloat *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[482];
+ ((void (APIENTRY *)(GLuint index, const GLfloat *v)) _func)(index, v);
+}
+
+void APIENTRY shared_dispatch_stub_483(GLuint index, GLshort x, GLshort y)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[483];
+ ((void (APIENTRY *)(GLuint index, GLshort x, GLshort y)) _func)(index, x, y);
+}
+
+void APIENTRY shared_dispatch_stub_484(GLuint index, const GLshort *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[484];
+ ((void (APIENTRY *)(GLuint index, const GLshort *v)) _func)(index, v);
+}
+
+void APIENTRY shared_dispatch_stub_485(GLuint index, GLdouble x, GLdouble y, GLdouble z)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[485];
+ ((void (APIENTRY *)(GLuint index, GLdouble x, GLdouble y, GLdouble z)) _func)(index, x, y, z);
+}
+
+void APIENTRY shared_dispatch_stub_486(GLuint index, const GLdouble *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[486];
+ ((void (APIENTRY *)(GLuint index, const GLdouble *v)) _func)(index, v);
+}
+
+void APIENTRY shared_dispatch_stub_487(GLuint index, GLfloat x, GLfloat y, GLfloat z)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[487];
+ ((void (APIENTRY *)(GLuint index, GLfloat x, GLfloat y, GLfloat z)) _func)(index, x, y, z);
+}
+
+void APIENTRY shared_dispatch_stub_488(GLuint index, const GLfloat *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[488];
+ ((void (APIENTRY *)(GLuint index, const GLfloat *v)) _func)(index, v);
+}
+
+void APIENTRY shared_dispatch_stub_489(GLuint index, GLshort x, GLshort y, GLshort z)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[489];
+ ((void (APIENTRY *)(GLuint index, GLshort x, GLshort y, GLshort z)) _func)(index, x, y, z);
+}
+
+void APIENTRY shared_dispatch_stub_490(GLuint index, const GLshort *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[490];
+ ((void (APIENTRY *)(GLuint index, const GLshort *v)) _func)(index, v);
+}
+
+void APIENTRY shared_dispatch_stub_491(GLuint index, const GLbyte *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[491];
+ ((void (APIENTRY *)(GLuint index, const GLbyte *v)) _func)(index, v);
+}
+
+void APIENTRY shared_dispatch_stub_492(GLuint index, const GLint *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[492];
+ ((void (APIENTRY *)(GLuint index, const GLint *v)) _func)(index, v);
+}
+
+void APIENTRY shared_dispatch_stub_493(GLuint index, const GLshort *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[493];
+ ((void (APIENTRY *)(GLuint index, const GLshort *v)) _func)(index, v);
+}
+
+void APIENTRY shared_dispatch_stub_494(GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[494];
+ ((void (APIENTRY *)(GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w)) _func)(index, x, y, z, w);
+}
+
+void APIENTRY shared_dispatch_stub_495(GLuint index, const GLubyte *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[495];
+ ((void (APIENTRY *)(GLuint index, const GLubyte *v)) _func)(index, v);
+}
+
+void APIENTRY shared_dispatch_stub_496(GLuint index, const GLuint *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[496];
+ ((void (APIENTRY *)(GLuint index, const GLuint *v)) _func)(index, v);
+}
+
+void APIENTRY shared_dispatch_stub_497(GLuint index, const GLushort *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[497];
+ ((void (APIENTRY *)(GLuint index, const GLushort *v)) _func)(index, v);
+}
+
+void APIENTRY shared_dispatch_stub_498(GLuint index, const GLbyte *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[498];
+ ((void (APIENTRY *)(GLuint index, const GLbyte *v)) _func)(index, v);
+}
+
+void APIENTRY shared_dispatch_stub_499(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[499];
+ ((void (APIENTRY *)(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w)) _func)(index, x, y, z, w);
+}
+
+void APIENTRY shared_dispatch_stub_500(GLuint index, const GLdouble *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[500];
+ ((void (APIENTRY *)(GLuint index, const GLdouble *v)) _func)(index, v);
+}
+
+void APIENTRY shared_dispatch_stub_501(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[501];
+ ((void (APIENTRY *)(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w)) _func)(index, x, y, z, w);
+}
+
+void APIENTRY shared_dispatch_stub_502(GLuint index, const GLfloat *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[502];
+ ((void (APIENTRY *)(GLuint index, const GLfloat *v)) _func)(index, v);
+}
+
+void APIENTRY shared_dispatch_stub_503(GLuint index, const GLint *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[503];
+ ((void (APIENTRY *)(GLuint index, const GLint *v)) _func)(index, v);
+}
+
+void APIENTRY shared_dispatch_stub_504(GLuint index, GLshort x, GLshort y, GLshort z, GLshort w)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[504];
+ ((void (APIENTRY *)(GLuint index, GLshort x, GLshort y, GLshort z, GLshort w)) _func)(index, x, y, z, w);
+}
+
+void APIENTRY shared_dispatch_stub_505(GLuint index, const GLshort *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[505];
+ ((void (APIENTRY *)(GLuint index, const GLshort *v)) _func)(index, v);
+}
+
+void APIENTRY shared_dispatch_stub_506(GLuint index, const GLubyte *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[506];
+ ((void (APIENTRY *)(GLuint index, const GLubyte *v)) _func)(index, v);
+}
+
+void APIENTRY shared_dispatch_stub_507(GLuint index, const GLuint *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[507];
+ ((void (APIENTRY *)(GLuint index, const GLuint *v)) _func)(index, v);
+}
+
+void APIENTRY shared_dispatch_stub_508(GLuint index, const GLushort *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[508];
+ ((void (APIENTRY *)(GLuint index, const GLushort *v)) _func)(index, v);
+}
+
+void APIENTRY shared_dispatch_stub_509(GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *pointer)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[509];
+ ((void (APIENTRY *)(GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *pointer)) _func)(index, size, type, normalized, stride, pointer);
+}
+
+void APIENTRY shared_dispatch_stub_510(GLenum target, GLuint buffer)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[510];
+ ((void (APIENTRY *)(GLenum target, GLuint buffer)) _func)(target, buffer);
+}
+
+void APIENTRY shared_dispatch_stub_511(GLenum target, GLsizeiptrARB size, const GLvoid *data, GLenum usage)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[511];
+ ((void (APIENTRY *)(GLenum target, GLsizeiptrARB size, const GLvoid *data, GLenum usage)) _func)(target, size, data, usage);
+}
+
+void APIENTRY shared_dispatch_stub_512(GLenum target, GLintptrARB offset, GLsizeiptrARB size, const GLvoid *data)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[512];
+ ((void (APIENTRY *)(GLenum target, GLintptrARB offset, GLsizeiptrARB size, const GLvoid *data)) _func)(target, offset, size, data);
+}
+
+void APIENTRY shared_dispatch_stub_513(GLsizei n, const GLuint *buffer)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[513];
+ ((void (APIENTRY *)(GLsizei n, const GLuint *buffer)) _func)(n, buffer);
+}
+
+void APIENTRY shared_dispatch_stub_514(GLsizei n, GLuint *buffer)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[514];
+ ((void (APIENTRY *)(GLsizei n, GLuint *buffer)) _func)(n, buffer);
+}
+
+void APIENTRY shared_dispatch_stub_515(GLenum target, GLenum pname, GLint *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[515];
+ ((void (APIENTRY *)(GLenum target, GLenum pname, GLint *params)) _func)(target, pname, params);
+}
+
+void APIENTRY shared_dispatch_stub_516(GLenum target, GLenum pname, GLvoid **params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[516];
+ ((void (APIENTRY *)(GLenum target, GLenum pname, GLvoid **params)) _func)(target, pname, params);
+}
+
+void APIENTRY shared_dispatch_stub_517(GLenum target, GLintptrARB offset, GLsizeiptrARB size, GLvoid *data)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[517];
+ ((void (APIENTRY *)(GLenum target, GLintptrARB offset, GLsizeiptrARB size, GLvoid *data)) _func)(target, offset, size, data);
+}
+
+GLboolean APIENTRY shared_dispatch_stub_518(GLuint buffer)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[518];
+ return ((GLboolean (APIENTRY *)(GLuint buffer)) _func)(buffer);
+}
+
+GLvoid * APIENTRY shared_dispatch_stub_519(GLenum target, GLenum access)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[519];
+ return ((GLvoid * (APIENTRY *)(GLenum target, GLenum access)) _func)(target, access);
+}
+
+GLboolean APIENTRY shared_dispatch_stub_520(GLenum target)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[520];
+ return ((GLboolean (APIENTRY *)(GLenum target)) _func)(target);
+}
+
+void APIENTRY shared_dispatch_stub_521(GLenum target, GLuint id)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[521];
+ ((void (APIENTRY *)(GLenum target, GLuint id)) _func)(target, id);
+}
+
+void APIENTRY shared_dispatch_stub_522(GLsizei n, const GLuint *ids)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[522];
+ ((void (APIENTRY *)(GLsizei n, const GLuint *ids)) _func)(n, ids);
+}
+
+void APIENTRY shared_dispatch_stub_523(GLenum target)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[523];
+ ((void (APIENTRY *)(GLenum target)) _func)(target);
+}
+
+void APIENTRY shared_dispatch_stub_524(GLsizei n, GLuint *ids)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[524];
+ ((void (APIENTRY *)(GLsizei n, GLuint *ids)) _func)(n, ids);
+}
+
+void APIENTRY shared_dispatch_stub_525(GLuint id, GLenum pname, GLint *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[525];
+ ((void (APIENTRY *)(GLuint id, GLenum pname, GLint *params)) _func)(id, pname, params);
+}
+
+void APIENTRY shared_dispatch_stub_526(GLuint id, GLenum pname, GLuint *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[526];
+ ((void (APIENTRY *)(GLuint id, GLenum pname, GLuint *params)) _func)(id, pname, params);
+}
+
+void APIENTRY shared_dispatch_stub_527(GLenum target, GLenum pname, GLint *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[527];
+ ((void (APIENTRY *)(GLenum target, GLenum pname, GLint *params)) _func)(target, pname, params);
+}
+
+GLboolean APIENTRY shared_dispatch_stub_528(GLuint id)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[528];
+ return ((GLboolean (APIENTRY *)(GLuint id)) _func)(id);
+}
+
+void APIENTRY shared_dispatch_stub_529(GLhandleARB containerObj, GLhandleARB obj)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[529];
+ ((void (APIENTRY *)(GLhandleARB containerObj, GLhandleARB obj)) _func)(containerObj, obj);
+}
+
+void APIENTRY shared_dispatch_stub_530(GLhandleARB shader)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[530];
+ ((void (APIENTRY *)(GLhandleARB shader)) _func)(shader);
+}
+
+GLhandleARB APIENTRY shared_dispatch_stub_531(void)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[531];
+ return ((GLhandleARB (APIENTRY *)(void)) _func)();
+}
+
+GLhandleARB APIENTRY shared_dispatch_stub_532(GLenum shaderType)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[532];
+ return ((GLhandleARB (APIENTRY *)(GLenum shaderType)) _func)(shaderType);
+}
+
+void APIENTRY shared_dispatch_stub_533(GLhandleARB obj)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[533];
+ ((void (APIENTRY *)(GLhandleARB obj)) _func)(obj);
+}
+
+void APIENTRY shared_dispatch_stub_534(GLhandleARB containerObj, GLhandleARB attachedObj)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[534];
+ ((void (APIENTRY *)(GLhandleARB containerObj, GLhandleARB attachedObj)) _func)(containerObj, attachedObj);
+}
+
+void APIENTRY shared_dispatch_stub_535(GLhandleARB program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[535];
+ ((void (APIENTRY *)(GLhandleARB program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name)) _func)(program, index, bufSize, length, size, type, name);
+}
+
+void APIENTRY shared_dispatch_stub_536(GLhandleARB containerObj, GLsizei maxLength, GLsizei *length, GLhandleARB *infoLog)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[536];
+ ((void (APIENTRY *)(GLhandleARB containerObj, GLsizei maxLength, GLsizei *length, GLhandleARB *infoLog)) _func)(containerObj, maxLength, length, infoLog);
+}
+
+GLhandleARB APIENTRY shared_dispatch_stub_537(GLenum pname)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[537];
+ return ((GLhandleARB (APIENTRY *)(GLenum pname)) _func)(pname);
+}
+
+void APIENTRY shared_dispatch_stub_538(GLhandleARB obj, GLsizei maxLength, GLsizei *length, GLcharARB *infoLog)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[538];
+ ((void (APIENTRY *)(GLhandleARB obj, GLsizei maxLength, GLsizei *length, GLcharARB *infoLog)) _func)(obj, maxLength, length, infoLog);
+}
+
+void APIENTRY shared_dispatch_stub_539(GLhandleARB obj, GLenum pname, GLfloat *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[539];
+ ((void (APIENTRY *)(GLhandleARB obj, GLenum pname, GLfloat *params)) _func)(obj, pname, params);
+}
+
+void APIENTRY shared_dispatch_stub_540(GLhandleARB obj, GLenum pname, GLint *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[540];
+ ((void (APIENTRY *)(GLhandleARB obj, GLenum pname, GLint *params)) _func)(obj, pname, params);
+}
+
+void APIENTRY shared_dispatch_stub_541(GLhandleARB shader, GLsizei bufSize, GLsizei *length, GLcharARB *source)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[541];
+ ((void (APIENTRY *)(GLhandleARB shader, GLsizei bufSize, GLsizei *length, GLcharARB *source)) _func)(shader, bufSize, length, source);
+}
+
+GLint APIENTRY shared_dispatch_stub_542(GLhandleARB program, const GLcharARB *name)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[542];
+ return ((GLint (APIENTRY *)(GLhandleARB program, const GLcharARB *name)) _func)(program, name);
+}
+
+void APIENTRY shared_dispatch_stub_543(GLhandleARB program, GLint location, GLfloat *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[543];
+ ((void (APIENTRY *)(GLhandleARB program, GLint location, GLfloat *params)) _func)(program, location, params);
+}
+
+void APIENTRY shared_dispatch_stub_544(GLhandleARB program, GLint location, GLint *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[544];
+ ((void (APIENTRY *)(GLhandleARB program, GLint location, GLint *params)) _func)(program, location, params);
+}
+
+void APIENTRY shared_dispatch_stub_545(GLhandleARB program)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[545];
+ ((void (APIENTRY *)(GLhandleARB program)) _func)(program);
+}
+
+void APIENTRY shared_dispatch_stub_546(GLhandleARB shader, GLsizei count, const GLcharARB **string, const GLint *length)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[546];
+ ((void (APIENTRY *)(GLhandleARB shader, GLsizei count, const GLcharARB **string, const GLint *length)) _func)(shader, count, string, length);
+}
+
+void APIENTRY shared_dispatch_stub_547(GLint location, GLfloat v0)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[547];
+ ((void (APIENTRY *)(GLint location, GLfloat v0)) _func)(location, v0);
+}
+
+void APIENTRY shared_dispatch_stub_548(GLint location, GLsizei count, const GLfloat *value)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[548];
+ ((void (APIENTRY *)(GLint location, GLsizei count, const GLfloat *value)) _func)(location, count, value);
+}
+
+void APIENTRY shared_dispatch_stub_549(GLint location, GLint v0)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[549];
+ ((void (APIENTRY *)(GLint location, GLint v0)) _func)(location, v0);
+}
+
+void APIENTRY shared_dispatch_stub_550(GLint location, GLsizei count, const GLint *value)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[550];
+ ((void (APIENTRY *)(GLint location, GLsizei count, const GLint *value)) _func)(location, count, value);
+}
+
+void APIENTRY shared_dispatch_stub_551(GLint location, GLfloat v0, GLfloat v1)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[551];
+ ((void (APIENTRY *)(GLint location, GLfloat v0, GLfloat v1)) _func)(location, v0, v1);
+}
+
+void APIENTRY shared_dispatch_stub_552(GLint location, GLsizei count, const GLfloat *value)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[552];
+ ((void (APIENTRY *)(GLint location, GLsizei count, const GLfloat *value)) _func)(location, count, value);
+}
+
+void APIENTRY shared_dispatch_stub_553(GLint location, GLint v0, GLint v1)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[553];
+ ((void (APIENTRY *)(GLint location, GLint v0, GLint v1)) _func)(location, v0, v1);
+}
+
+void APIENTRY shared_dispatch_stub_554(GLint location, GLsizei count, const GLint *value)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[554];
+ ((void (APIENTRY *)(GLint location, GLsizei count, const GLint *value)) _func)(location, count, value);
+}
+
+void APIENTRY shared_dispatch_stub_555(GLint location, GLfloat v0, GLfloat v1, GLfloat v2)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[555];
+ ((void (APIENTRY *)(GLint location, GLfloat v0, GLfloat v1, GLfloat v2)) _func)(location, v0, v1, v2);
+}
+
+void APIENTRY shared_dispatch_stub_556(GLint location, GLsizei count, const GLfloat *value)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[556];
+ ((void (APIENTRY *)(GLint location, GLsizei count, const GLfloat *value)) _func)(location, count, value);
+}
+
+void APIENTRY shared_dispatch_stub_557(GLint location, GLint v0, GLint v1, GLint v2)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[557];
+ ((void (APIENTRY *)(GLint location, GLint v0, GLint v1, GLint v2)) _func)(location, v0, v1, v2);
+}
+
+void APIENTRY shared_dispatch_stub_558(GLint location, GLsizei count, const GLint *value)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[558];
+ ((void (APIENTRY *)(GLint location, GLsizei count, const GLint *value)) _func)(location, count, value);
+}
+
+void APIENTRY shared_dispatch_stub_559(GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[559];
+ ((void (APIENTRY *)(GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3)) _func)(location, v0, v1, v2, v3);
+}
+
+void APIENTRY shared_dispatch_stub_560(GLint location, GLsizei count, const GLfloat *value)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[560];
+ ((void (APIENTRY *)(GLint location, GLsizei count, const GLfloat *value)) _func)(location, count, value);
+}
+
+void APIENTRY shared_dispatch_stub_561(GLint location, GLint v0, GLint v1, GLint v2, GLint v3)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[561];
+ ((void (APIENTRY *)(GLint location, GLint v0, GLint v1, GLint v2, GLint v3)) _func)(location, v0, v1, v2, v3);
+}
+
+void APIENTRY shared_dispatch_stub_562(GLint location, GLsizei count, const GLint *value)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[562];
+ ((void (APIENTRY *)(GLint location, GLsizei count, const GLint *value)) _func)(location, count, value);
+}
+
+void APIENTRY shared_dispatch_stub_563(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[563];
+ ((void (APIENTRY *)(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)) _func)(location, count, transpose, value);
+}
+
+void APIENTRY shared_dispatch_stub_564(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[564];
+ ((void (APIENTRY *)(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)) _func)(location, count, transpose, value);
+}
+
+void APIENTRY shared_dispatch_stub_565(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[565];
+ ((void (APIENTRY *)(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)) _func)(location, count, transpose, value);
+}
+
+void APIENTRY shared_dispatch_stub_566(GLhandleARB program)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[566];
+ ((void (APIENTRY *)(GLhandleARB program)) _func)(program);
+}
+
+void APIENTRY shared_dispatch_stub_567(GLhandleARB program)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[567];
+ ((void (APIENTRY *)(GLhandleARB program)) _func)(program);
+}
+
+void APIENTRY shared_dispatch_stub_568(GLhandleARB program, GLuint index, const GLcharARB *name)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[568];
+ ((void (APIENTRY *)(GLhandleARB program, GLuint index, const GLcharARB *name)) _func)(program, index, name);
+}
+
+void APIENTRY shared_dispatch_stub_569(GLhandleARB program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[569];
+ ((void (APIENTRY *)(GLhandleARB program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name)) _func)(program, index, bufSize, length, size, type, name);
+}
+
+GLint APIENTRY shared_dispatch_stub_570(GLhandleARB program, const GLcharARB *name)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[570];
+ return ((GLint (APIENTRY *)(GLhandleARB program, const GLcharARB *name)) _func)(program, name);
+}
+
+void APIENTRY shared_dispatch_stub_571(GLsizei n, const GLenum *bufs)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[571];
+ ((void (APIENTRY *)(GLsizei n, const GLenum *bufs)) _func)(n, bufs);
+}
+
+void APIENTRY shared_dispatch_stub_572(GLenum mode, GLint first, GLsizei count, GLsizei primcount)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[572];
+ ((void (APIENTRY *)(GLenum mode, GLint first, GLsizei count, GLsizei primcount)) _func)(mode, first, count, primcount);
+}
+
+void APIENTRY shared_dispatch_stub_573(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[573];
+ ((void (APIENTRY *)(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount)) _func)(mode, count, type, indices, primcount);
+}
+
+void APIENTRY shared_dispatch_stub_574(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[574];
+ ((void (APIENTRY *)(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height)) _func)(target, samples, internalformat, width, height);
+}
+
+void APIENTRY shared_dispatch_stub_575(GLenum target, GLenum attachment, GLuint texture, GLint level)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[575];
+ ((void (APIENTRY *)(GLenum target, GLenum attachment, GLuint texture, GLint level)) _func)(target, attachment, texture, level);
+}
+
+void APIENTRY shared_dispatch_stub_576(GLenum target, GLenum attachment, GLuint texture, GLint level, GLenum face)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[576];
+ ((void (APIENTRY *)(GLenum target, GLenum attachment, GLuint texture, GLint level, GLenum face)) _func)(target, attachment, texture, level, face);
+}
+
+void APIENTRY shared_dispatch_stub_577(GLuint program, GLenum pname, GLint value)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[577];
+ ((void (APIENTRY *)(GLuint program, GLenum pname, GLint value)) _func)(program, pname, value);
+}
+
+void APIENTRY shared_dispatch_stub_578(GLuint index, GLuint divisor)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[578];
+ ((void (APIENTRY *)(GLuint index, GLuint divisor)) _func)(index, divisor);
+}
+
+void APIENTRY shared_dispatch_stub_579(GLenum target, GLintptr offset, GLsizeiptr length)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[579];
+ ((void (APIENTRY *)(GLenum target, GLintptr offset, GLsizeiptr length)) _func)(target, offset, length);
+}
+
+GLvoid * APIENTRY shared_dispatch_stub_580(GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[580];
+ return ((GLvoid * (APIENTRY *)(GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access)) _func)(target, offset, length, access);
+}
+
+void APIENTRY shared_dispatch_stub_581(GLuint array)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[581];
+ ((void (APIENTRY *)(GLuint array)) _func)(array);
+}
+
+void APIENTRY shared_dispatch_stub_582(GLsizei n, GLuint *arrays)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[582];
+ ((void (APIENTRY *)(GLsizei n, GLuint *arrays)) _func)(n, arrays);
+}
+
+void APIENTRY shared_dispatch_stub_583(GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[583];
+ ((void (APIENTRY *)(GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size)) _func)(readTarget, writeTarget, readOffset, writeOffset, size);
+}
+
+GLenum APIENTRY shared_dispatch_stub_584(GLsync sync, GLbitfield flags, GLuint64 timeout)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[584];
+ return ((GLenum (APIENTRY *)(GLsync sync, GLbitfield flags, GLuint64 timeout)) _func)(sync, flags, timeout);
+}
+
+void APIENTRY shared_dispatch_stub_585(GLsync sync)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[585];
+ ((void (APIENTRY *)(GLsync sync)) _func)(sync);
+}
+
+GLsync APIENTRY shared_dispatch_stub_586(GLenum condition, GLbitfield flags)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[586];
+ return ((GLsync (APIENTRY *)(GLenum condition, GLbitfield flags)) _func)(condition, flags);
+}
+
+void APIENTRY shared_dispatch_stub_587(GLenum pname, GLint64 *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[587];
+ ((void (APIENTRY *)(GLenum pname, GLint64 *params)) _func)(pname, params);
+}
+
+void APIENTRY shared_dispatch_stub_588(GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[588];
+ ((void (APIENTRY *)(GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values)) _func)(sync, pname, bufSize, length, values);
+}
+
+GLboolean APIENTRY shared_dispatch_stub_589(GLsync sync)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[589];
+ return ((GLboolean (APIENTRY *)(GLsync sync)) _func)(sync);
+}
+
+void APIENTRY shared_dispatch_stub_590(GLsync sync, GLbitfield flags, GLuint64 timeout)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[590];
+ ((void (APIENTRY *)(GLsync sync, GLbitfield flags, GLuint64 timeout)) _func)(sync, flags, timeout);
+}
+
+void APIENTRY shared_dispatch_stub_591(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLint basevertex)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[591];
+ ((void (APIENTRY *)(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLint basevertex)) _func)(mode, count, type, indices, basevertex);
+}
+
+void APIENTRY shared_dispatch_stub_592(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices, GLint basevertex)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[592];
+ ((void (APIENTRY *)(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices, GLint basevertex)) _func)(mode, start, end, count, type, indices, basevertex);
+}
+
+void APIENTRY shared_dispatch_stub_593(GLenum mode, const GLsizei *count, GLenum type, const GLvoid **indices, GLsizei primcount, const GLint *basevertex)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[593];
+ ((void (APIENTRY *)(GLenum mode, const GLsizei *count, GLenum type, const GLvoid **indices, GLsizei primcount, const GLint *basevertex)) _func)(mode, count, type, indices, primcount, basevertex);
+}
+
+void APIENTRY shared_dispatch_stub_594(GLuint buf, GLenum modeRGB, GLenum modeA)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[594];
+ ((void (APIENTRY *)(GLuint buf, GLenum modeRGB, GLenum modeA)) _func)(buf, modeRGB, modeA);
+}
+
+void APIENTRY shared_dispatch_stub_595(GLuint buf, GLenum mode)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[595];
+ ((void (APIENTRY *)(GLuint buf, GLenum mode)) _func)(buf, mode);
+}
+
+void APIENTRY shared_dispatch_stub_596(GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcA, GLenum dstA)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[596];
+ ((void (APIENTRY *)(GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcA, GLenum dstA)) _func)(buf, srcRGB, dstRGB, srcA, dstA);
+}
+
+void APIENTRY shared_dispatch_stub_597(GLuint buf, GLenum src, GLenum dst)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[597];
+ ((void (APIENTRY *)(GLuint buf, GLenum src, GLenum dst)) _func)(buf, src, dst);
+}
+
+void APIENTRY shared_dispatch_stub_598(GLenum target, GLuint id)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[598];
+ ((void (APIENTRY *)(GLenum target, GLuint id)) _func)(target, id);
+}
+
+void APIENTRY shared_dispatch_stub_599(GLsizei n, const GLuint *ids)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[599];
+ ((void (APIENTRY *)(GLsizei n, const GLuint *ids)) _func)(n, ids);
+}
+
+void APIENTRY shared_dispatch_stub_600(GLenum mode, GLuint id)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[600];
+ ((void (APIENTRY *)(GLenum mode, GLuint id)) _func)(mode, id);
+}
+
+void APIENTRY shared_dispatch_stub_601(GLsizei n, GLuint *ids)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[601];
+ ((void (APIENTRY *)(GLsizei n, GLuint *ids)) _func)(n, ids);
+}
+
+GLboolean APIENTRY shared_dispatch_stub_602(GLuint id)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[602];
+ return ((GLboolean (APIENTRY *)(GLuint id)) _func)(id);
+}
+
+void APIENTRY shared_dispatch_stub_603(void)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[603];
+ ((void (APIENTRY *)(void)) _func)();
+}
+
+void APIENTRY shared_dispatch_stub_604(void)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[604];
+ ((void (APIENTRY *)(void)) _func)();
+}
+
+void APIENTRY shared_dispatch_stub_605(GLclampf depth)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[605];
+ ((void (APIENTRY *)(GLclampf depth)) _func)(depth);
+}
+
+void APIENTRY shared_dispatch_stub_606(GLclampf zNear, GLclampf zFar)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[606];
+ ((void (APIENTRY *)(GLclampf zNear, GLclampf zFar)) _func)(zNear, zFar);
+}
+
+void APIENTRY shared_dispatch_stub_607(GLenum shadertype, GLenum precisiontype, GLint *range, GLint *precision)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[607];
+ ((void (APIENTRY *)(GLenum shadertype, GLenum precisiontype, GLint *range, GLint *precision)) _func)(shadertype, precisiontype, range, precision);
+}
+
+void APIENTRY shared_dispatch_stub_608(void)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[608];
+ ((void (APIENTRY *)(void)) _func)();
+}
+
+void APIENTRY shared_dispatch_stub_609(GLsizei n, const GLuint *shaders, GLenum binaryformat, const GLvoid *binary, GLsizei length)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[609];
+ ((void (APIENTRY *)(GLsizei n, const GLuint *shaders, GLenum binaryformat, const GLvoid *binary, GLsizei length)) _func)(n, shaders, binaryformat, binary, length);
+}
+
+void APIENTRY shared_dispatch_stub_610(GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, GLvoid *binary)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[610];
+ ((void (APIENTRY *)(GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, GLvoid *binary)) _func)(program, bufSize, length, binaryFormat, binary);
+}
+
+void APIENTRY shared_dispatch_stub_611(GLuint program, GLenum binaryFormat, const GLvoid *binary, GLsizei length)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[611];
+ ((void (APIENTRY *)(GLuint program, GLenum binaryFormat, const GLvoid *binary, GLsizei length)) _func)(program, binaryFormat, binary, length);
+}
+
+void APIENTRY shared_dispatch_stub_612(GLuint program, GLenum pname, GLint value)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[612];
+ ((void (APIENTRY *)(GLuint program, GLenum pname, GLint value)) _func)(program, pname, value);
+}
+
+void APIENTRY shared_dispatch_stub_613(GLfloat factor, GLfloat bias)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[613];
+ ((void (APIENTRY *)(GLfloat factor, GLfloat bias)) _func)(factor, bias);
+}
+
+void APIENTRY shared_dispatch_stub_614(GLfloat x, GLfloat y, GLfloat z, GLfloat width, GLfloat height)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[614];
+ ((void (APIENTRY *)(GLfloat x, GLfloat y, GLfloat z, GLfloat width, GLfloat height)) _func)(x, y, z, width, height);
+}
+
+void APIENTRY shared_dispatch_stub_615(const GLfloat *coords)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[615];
+ ((void (APIENTRY *)(const GLfloat *coords)) _func)(coords);
+}
+
+void APIENTRY shared_dispatch_stub_616(GLint x, GLint y, GLint z, GLint width, GLint height)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[616];
+ ((void (APIENTRY *)(GLint x, GLint y, GLint z, GLint width, GLint height)) _func)(x, y, z, width, height);
+}
+
+void APIENTRY shared_dispatch_stub_617(const GLint *coords)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[617];
+ ((void (APIENTRY *)(const GLint *coords)) _func)(coords);
+}
+
+void APIENTRY shared_dispatch_stub_618(GLshort x, GLshort y, GLshort z, GLshort width, GLshort height)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[618];
+ ((void (APIENTRY *)(GLshort x, GLshort y, GLshort z, GLshort width, GLshort height)) _func)(x, y, z, width, height);
+}
+
+void APIENTRY shared_dispatch_stub_619(const GLshort *coords)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[619];
+ ((void (APIENTRY *)(const GLshort *coords)) _func)(coords);
+}
+
+void APIENTRY shared_dispatch_stub_620(GLfixed x, GLfixed y, GLfixed z, GLfixed width, GLfixed height)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[620];
+ ((void (APIENTRY *)(GLfixed x, GLfixed y, GLfixed z, GLfixed width, GLfixed height)) _func)(x, y, z, width, height);
+}
+
+void APIENTRY shared_dispatch_stub_621(const GLfixed *coords)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[621];
+ ((void (APIENTRY *)(const GLfixed *coords)) _func)(coords);
+}
+
+void APIENTRY shared_dispatch_stub_622(GLenum type, GLsizei stride, const GLvoid *pointer)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[622];
+ ((void (APIENTRY *)(GLenum type, GLsizei stride, const GLvoid *pointer)) _func)(type, stride, pointer);
+}
+
+void APIENTRY shared_dispatch_stub_623(GLenum pname, GLfloat *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[623];
+ ((void (APIENTRY *)(GLenum pname, GLfloat *params)) _func)(pname, params);
+}
+
+void APIENTRY shared_dispatch_stub_624(GLenum pname, GLint *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[624];
+ ((void (APIENTRY *)(GLenum pname, GLint *params)) _func)(pname, params);
+}
+
+void APIENTRY shared_dispatch_stub_625(GLenum pname, GLfloat param)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[625];
+ ((void (APIENTRY *)(GLenum pname, GLfloat param)) _func)(pname, param);
+}
+
+void APIENTRY shared_dispatch_stub_626(GLenum pname, const GLfloat *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[626];
+ ((void (APIENTRY *)(GLenum pname, const GLfloat *params)) _func)(pname, params);
+}
+
+void APIENTRY shared_dispatch_stub_627(GLenum pname, GLint param)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[627];
+ ((void (APIENTRY *)(GLenum pname, GLint param)) _func)(pname, param);
+}
+
+void APIENTRY shared_dispatch_stub_628(GLenum pname, const GLint *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[628];
+ ((void (APIENTRY *)(GLenum pname, const GLint *params)) _func)(pname, params);
+}
+
+GLbitfield APIENTRY shared_dispatch_stub_629(GLfixed *mantissa, GLint *exponent)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[629];
+ return ((GLbitfield (APIENTRY *)(GLfixed *mantissa, GLint *exponent)) _func)(mantissa, exponent);
+}
+
+void APIENTRY shared_dispatch_stub_630(GLclampf value, GLboolean invert)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[630];
+ ((void (APIENTRY *)(GLclampf value, GLboolean invert)) _func)(value, invert);
+}
+
+void APIENTRY shared_dispatch_stub_631(GLenum pattern)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[631];
+ ((void (APIENTRY *)(GLenum pattern)) _func)(pattern);
+}
+
+void APIENTRY shared_dispatch_stub_632(GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[632];
+ ((void (APIENTRY *)(GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer)) _func)(size, type, stride, count, pointer);
+}
+
+void APIENTRY shared_dispatch_stub_633(GLsizei stride, GLsizei count, const GLboolean *pointer)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[633];
+ ((void (APIENTRY *)(GLsizei stride, GLsizei count, const GLboolean *pointer)) _func)(stride, count, pointer);
+}
+
+void APIENTRY shared_dispatch_stub_634(GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[634];
+ ((void (APIENTRY *)(GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer)) _func)(type, stride, count, pointer);
+}
+
+void APIENTRY shared_dispatch_stub_635(GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[635];
+ ((void (APIENTRY *)(GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer)) _func)(type, stride, count, pointer);
+}
+
+void APIENTRY shared_dispatch_stub_636(GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[636];
+ ((void (APIENTRY *)(GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer)) _func)(size, type, stride, count, pointer);
+}
+
+void APIENTRY shared_dispatch_stub_637(GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[637];
+ ((void (APIENTRY *)(GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer)) _func)(size, type, stride, count, pointer);
+}
+
+void APIENTRY shared_dispatch_stub_638(GLenum pname, GLfloat param)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[638];
+ ((void (APIENTRY *)(GLenum pname, GLfloat param)) _func)(pname, param);
+}
+
+void APIENTRY shared_dispatch_stub_639(GLenum pname, const GLfloat *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[639];
+ ((void (APIENTRY *)(GLenum pname, const GLfloat *params)) _func)(pname, params);
+}
+
+void APIENTRY shared_dispatch_stub_640(GLint first, GLsizei count)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[640];
+ ((void (APIENTRY *)(GLint first, GLsizei count)) _func)(first, count);
+}
+
+void APIENTRY shared_dispatch_stub_641(void)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[641];
+ ((void (APIENTRY *)(void)) _func)();
+}
+
+void APIENTRY shared_dispatch_stub_642(GLbyte red, GLbyte green, GLbyte blue)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[642];
+ ((void (APIENTRY *)(GLbyte red, GLbyte green, GLbyte blue)) _func)(red, green, blue);
+}
+
+void APIENTRY shared_dispatch_stub_643(const GLbyte *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[643];
+ ((void (APIENTRY *)(const GLbyte *v)) _func)(v);
+}
+
+void APIENTRY shared_dispatch_stub_644(GLdouble red, GLdouble green, GLdouble blue)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[644];
+ ((void (APIENTRY *)(GLdouble red, GLdouble green, GLdouble blue)) _func)(red, green, blue);
+}
+
+void APIENTRY shared_dispatch_stub_645(const GLdouble *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[645];
+ ((void (APIENTRY *)(const GLdouble *v)) _func)(v);
+}
+
+void APIENTRY shared_dispatch_stub_646(GLfloat red, GLfloat green, GLfloat blue)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[646];
+ ((void (APIENTRY *)(GLfloat red, GLfloat green, GLfloat blue)) _func)(red, green, blue);
+}
+
+void APIENTRY shared_dispatch_stub_647(const GLfloat *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[647];
+ ((void (APIENTRY *)(const GLfloat *v)) _func)(v);
+}
+
+void APIENTRY shared_dispatch_stub_648(GLint red, GLint green, GLint blue)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[648];
+ ((void (APIENTRY *)(GLint red, GLint green, GLint blue)) _func)(red, green, blue);
+}
+
+void APIENTRY shared_dispatch_stub_649(const GLint *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[649];
+ ((void (APIENTRY *)(const GLint *v)) _func)(v);
+}
+
+void APIENTRY shared_dispatch_stub_650(GLshort red, GLshort green, GLshort blue)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[650];
+ ((void (APIENTRY *)(GLshort red, GLshort green, GLshort blue)) _func)(red, green, blue);
+}
+
+void APIENTRY shared_dispatch_stub_651(const GLshort *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[651];
+ ((void (APIENTRY *)(const GLshort *v)) _func)(v);
+}
+
+void APIENTRY shared_dispatch_stub_652(GLubyte red, GLubyte green, GLubyte blue)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[652];
+ ((void (APIENTRY *)(GLubyte red, GLubyte green, GLubyte blue)) _func)(red, green, blue);
+}
+
+void APIENTRY shared_dispatch_stub_653(const GLubyte *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[653];
+ ((void (APIENTRY *)(const GLubyte *v)) _func)(v);
+}
+
+void APIENTRY shared_dispatch_stub_654(GLuint red, GLuint green, GLuint blue)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[654];
+ ((void (APIENTRY *)(GLuint red, GLuint green, GLuint blue)) _func)(red, green, blue);
+}
+
+void APIENTRY shared_dispatch_stub_655(const GLuint *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[655];
+ ((void (APIENTRY *)(const GLuint *v)) _func)(v);
+}
+
+void APIENTRY shared_dispatch_stub_656(GLushort red, GLushort green, GLushort blue)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[656];
+ ((void (APIENTRY *)(GLushort red, GLushort green, GLushort blue)) _func)(red, green, blue);
+}
+
+void APIENTRY shared_dispatch_stub_657(const GLushort *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[657];
+ ((void (APIENTRY *)(const GLushort *v)) _func)(v);
+}
+
+void APIENTRY shared_dispatch_stub_658(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[658];
+ ((void (APIENTRY *)(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer)) _func)(size, type, stride, pointer);
+}
+
+void APIENTRY shared_dispatch_stub_659(GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[659];
+ ((void (APIENTRY *)(GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount)) _func)(mode, first, count, primcount);
+}
+
+void APIENTRY shared_dispatch_stub_660(GLenum mode, const GLsizei *count, GLenum type, const GLvoid **indices, GLsizei primcount)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[660];
+ ((void (APIENTRY *)(GLenum mode, const GLsizei *count, GLenum type, const GLvoid **indices, GLsizei primcount)) _func)(mode, count, type, indices, primcount);
+}
+
+void APIENTRY shared_dispatch_stub_661(GLenum type, GLsizei stride, const GLvoid *pointer)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[661];
+ ((void (APIENTRY *)(GLenum type, GLsizei stride, const GLvoid *pointer)) _func)(type, stride, pointer);
+}
+
+void APIENTRY shared_dispatch_stub_662(GLdouble coord)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[662];
+ ((void (APIENTRY *)(GLdouble coord)) _func)(coord);
+}
+
+void APIENTRY shared_dispatch_stub_663(const GLdouble *coord)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[663];
+ ((void (APIENTRY *)(const GLdouble *coord)) _func)(coord);
+}
+
+void APIENTRY shared_dispatch_stub_664(GLfloat coord)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[664];
+ ((void (APIENTRY *)(GLfloat coord)) _func)(coord);
+}
+
+void APIENTRY shared_dispatch_stub_665(const GLfloat *coord)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[665];
+ ((void (APIENTRY *)(const GLfloat *coord)) _func)(coord);
+}
+
+void APIENTRY shared_dispatch_stub_666(GLenum mode)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[666];
+ ((void (APIENTRY *)(GLenum mode)) _func)(mode);
+}
+
+void APIENTRY shared_dispatch_stub_667(GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[667];
+ ((void (APIENTRY *)(GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha)) _func)(sfactorRGB, dfactorRGB, sfactorAlpha, dfactorAlpha);
+}
+
+void APIENTRY shared_dispatch_stub_668(void)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[668];
+ ((void (APIENTRY *)(void)) _func)();
+}
+
+void APIENTRY shared_dispatch_stub_669(GLsizei length, const GLvoid *pointer)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[669];
+ ((void (APIENTRY *)(GLsizei length, const GLvoid *pointer)) _func)(length, pointer);
+}
+
+void APIENTRY shared_dispatch_stub_670(GLenum stage, GLenum portion, GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[670];
+ ((void (APIENTRY *)(GLenum stage, GLenum portion, GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage)) _func)(stage, portion, variable, input, mapping, componentUsage);
+}
+
+void APIENTRY shared_dispatch_stub_671(GLenum stage, GLenum portion, GLenum abOutput, GLenum cdOutput, GLenum sumOutput, GLenum scale, GLenum bias, GLboolean abDotProduct, GLboolean cdDotProduct, GLboolean muxSum)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[671];
+ ((void (APIENTRY *)(GLenum stage, GLenum portion, GLenum abOutput, GLenum cdOutput, GLenum sumOutput, GLenum scale, GLenum bias, GLboolean abDotProduct, GLboolean cdDotProduct, GLboolean muxSum)) _func)(stage, portion, abOutput, cdOutput, sumOutput, scale, bias, abDotProduct, cdDotProduct, muxSum);
+}
+
+void APIENTRY shared_dispatch_stub_672(GLenum pname, GLfloat param)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[672];
+ ((void (APIENTRY *)(GLenum pname, GLfloat param)) _func)(pname, param);
+}
+
+void APIENTRY shared_dispatch_stub_673(GLenum pname, const GLfloat *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[673];
+ ((void (APIENTRY *)(GLenum pname, const GLfloat *params)) _func)(pname, params);
+}
+
+void APIENTRY shared_dispatch_stub_674(GLenum pname, GLint param)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[674];
+ ((void (APIENTRY *)(GLenum pname, GLint param)) _func)(pname, param);
+}
+
+void APIENTRY shared_dispatch_stub_675(GLenum pname, const GLint *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[675];
+ ((void (APIENTRY *)(GLenum pname, const GLint *params)) _func)(pname, params);
+}
+
+void APIENTRY shared_dispatch_stub_676(GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[676];
+ ((void (APIENTRY *)(GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage)) _func)(variable, input, mapping, componentUsage);
+}
+
+void APIENTRY shared_dispatch_stub_677(GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLfloat *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[677];
+ ((void (APIENTRY *)(GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLfloat *params)) _func)(stage, portion, variable, pname, params);
+}
+
+void APIENTRY shared_dispatch_stub_678(GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLint *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[678];
+ ((void (APIENTRY *)(GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLint *params)) _func)(stage, portion, variable, pname, params);
+}
+
+void APIENTRY shared_dispatch_stub_679(GLenum stage, GLenum portion, GLenum pname, GLfloat *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[679];
+ ((void (APIENTRY *)(GLenum stage, GLenum portion, GLenum pname, GLfloat *params)) _func)(stage, portion, pname, params);
+}
+
+void APIENTRY shared_dispatch_stub_680(GLenum stage, GLenum portion, GLenum pname, GLint *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[680];
+ ((void (APIENTRY *)(GLenum stage, GLenum portion, GLenum pname, GLint *params)) _func)(stage, portion, pname, params);
+}
+
+void APIENTRY shared_dispatch_stub_681(GLenum variable, GLenum pname, GLfloat *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[681];
+ ((void (APIENTRY *)(GLenum variable, GLenum pname, GLfloat *params)) _func)(variable, pname, params);
+}
+
+void APIENTRY shared_dispatch_stub_682(GLenum variable, GLenum pname, GLint *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[682];
+ ((void (APIENTRY *)(GLenum variable, GLenum pname, GLint *params)) _func)(variable, pname, params);
+}
+
+void APIENTRY shared_dispatch_stub_683(void)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[683];
+ ((void (APIENTRY *)(void)) _func)();
+}
+
+void APIENTRY shared_dispatch_stub_684(GLdouble x, GLdouble y)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[684];
+ ((void (APIENTRY *)(GLdouble x, GLdouble y)) _func)(x, y);
+}
+
+void APIENTRY shared_dispatch_stub_685(const GLdouble *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[685];
+ ((void (APIENTRY *)(const GLdouble *v)) _func)(v);
+}
+
+void APIENTRY shared_dispatch_stub_686(GLfloat x, GLfloat y)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[686];
+ ((void (APIENTRY *)(GLfloat x, GLfloat y)) _func)(x, y);
+}
+
+void APIENTRY shared_dispatch_stub_687(const GLfloat *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[687];
+ ((void (APIENTRY *)(const GLfloat *v)) _func)(v);
+}
+
+void APIENTRY shared_dispatch_stub_688(GLint x, GLint y)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[688];
+ ((void (APIENTRY *)(GLint x, GLint y)) _func)(x, y);
+}
+
+void APIENTRY shared_dispatch_stub_689(const GLint *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[689];
+ ((void (APIENTRY *)(const GLint *v)) _func)(v);
+}
+
+void APIENTRY shared_dispatch_stub_690(GLshort x, GLshort y)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[690];
+ ((void (APIENTRY *)(GLshort x, GLshort y)) _func)(x, y);
+}
+
+void APIENTRY shared_dispatch_stub_691(const GLshort *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[691];
+ ((void (APIENTRY *)(const GLshort *v)) _func)(v);
+}
+
+void APIENTRY shared_dispatch_stub_692(GLdouble x, GLdouble y, GLdouble z)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[692];
+ ((void (APIENTRY *)(GLdouble x, GLdouble y, GLdouble z)) _func)(x, y, z);
+}
+
+void APIENTRY shared_dispatch_stub_693(const GLdouble *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[693];
+ ((void (APIENTRY *)(const GLdouble *v)) _func)(v);
+}
+
+void APIENTRY shared_dispatch_stub_694(GLfloat x, GLfloat y, GLfloat z)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[694];
+ ((void (APIENTRY *)(GLfloat x, GLfloat y, GLfloat z)) _func)(x, y, z);
+}
+
+void APIENTRY shared_dispatch_stub_695(const GLfloat *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[695];
+ ((void (APIENTRY *)(const GLfloat *v)) _func)(v);
+}
+
+void APIENTRY shared_dispatch_stub_696(GLint x, GLint y, GLint z)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[696];
+ ((void (APIENTRY *)(GLint x, GLint y, GLint z)) _func)(x, y, z);
+}
+
+void APIENTRY shared_dispatch_stub_697(const GLint *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[697];
+ ((void (APIENTRY *)(const GLint *v)) _func)(v);
+}
+
+void APIENTRY shared_dispatch_stub_698(GLshort x, GLshort y, GLshort z)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[698];
+ ((void (APIENTRY *)(GLshort x, GLshort y, GLshort z)) _func)(x, y, z);
+}
+
+void APIENTRY shared_dispatch_stub_699(const GLshort *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[699];
+ ((void (APIENTRY *)(const GLshort *v)) _func)(v);
+}
+
+void APIENTRY shared_dispatch_stub_700(GLdouble x, GLdouble y, GLdouble z, GLdouble w)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[700];
+ ((void (APIENTRY *)(GLdouble x, GLdouble y, GLdouble z, GLdouble w)) _func)(x, y, z, w);
+}
+
+void APIENTRY shared_dispatch_stub_701(const GLdouble *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[701];
+ ((void (APIENTRY *)(const GLdouble *v)) _func)(v);
+}
+
+void APIENTRY shared_dispatch_stub_702(GLfloat x, GLfloat y, GLfloat z, GLfloat w)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[702];
+ ((void (APIENTRY *)(GLfloat x, GLfloat y, GLfloat z, GLfloat w)) _func)(x, y, z, w);
+}
+
+void APIENTRY shared_dispatch_stub_703(const GLfloat *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[703];
+ ((void (APIENTRY *)(const GLfloat *v)) _func)(v);
+}
+
+void APIENTRY shared_dispatch_stub_704(GLint x, GLint y, GLint z, GLint w)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[704];
+ ((void (APIENTRY *)(GLint x, GLint y, GLint z, GLint w)) _func)(x, y, z, w);
+}
+
+void APIENTRY shared_dispatch_stub_705(const GLint *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[705];
+ ((void (APIENTRY *)(const GLint *v)) _func)(v);
+}
+
+void APIENTRY shared_dispatch_stub_706(GLshort x, GLshort y, GLshort z, GLshort w)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[706];
+ ((void (APIENTRY *)(GLshort x, GLshort y, GLshort z, GLshort w)) _func)(x, y, z, w);
+}
+
+void APIENTRY shared_dispatch_stub_707(const GLshort *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[707];
+ ((void (APIENTRY *)(const GLshort *v)) _func)(v);
+}
+
+void APIENTRY shared_dispatch_stub_708(const GLenum *mode, const GLint *first, const GLsizei *count, GLsizei primcount, GLint modestride)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[708];
+ ((void (APIENTRY *)(const GLenum *mode, const GLint *first, const GLsizei *count, GLsizei primcount, GLint modestride)) _func)(mode, first, count, primcount, modestride);
+}
+
+void APIENTRY shared_dispatch_stub_709(const GLenum *mode, const GLsizei *count, GLenum type, const GLvoid * const *indices, GLsizei primcount, GLint modestride)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[709];
+ ((void (APIENTRY *)(const GLenum *mode, const GLsizei *count, GLenum type, const GLvoid * const *indices, GLsizei primcount, GLint modestride)) _func)(mode, count, type, indices, primcount, modestride);
+}
+
+void APIENTRY shared_dispatch_stub_710(GLsizei n, const GLuint *fences)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[710];
+ ((void (APIENTRY *)(GLsizei n, const GLuint *fences)) _func)(n, fences);
+}
+
+void APIENTRY shared_dispatch_stub_711(GLuint fence)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[711];
+ ((void (APIENTRY *)(GLuint fence)) _func)(fence);
+}
+
+void APIENTRY shared_dispatch_stub_712(GLsizei n, GLuint *fences)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[712];
+ ((void (APIENTRY *)(GLsizei n, GLuint *fences)) _func)(n, fences);
+}
+
+void APIENTRY shared_dispatch_stub_713(GLuint fence, GLenum pname, GLint *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[713];
+ ((void (APIENTRY *)(GLuint fence, GLenum pname, GLint *params)) _func)(fence, pname, params);
+}
+
+GLboolean APIENTRY shared_dispatch_stub_714(GLuint fence)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[714];
+ return ((GLboolean (APIENTRY *)(GLuint fence)) _func)(fence);
+}
+
+void APIENTRY shared_dispatch_stub_715(GLuint fence, GLenum condition)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[715];
+ ((void (APIENTRY *)(GLuint fence, GLenum condition)) _func)(fence, condition);
+}
+
+GLboolean APIENTRY shared_dispatch_stub_716(GLuint fence)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[716];
+ return ((GLboolean (APIENTRY *)(GLuint fence)) _func)(fence);
+}
+
+GLboolean APIENTRY shared_dispatch_stub_717(GLsizei n, const GLuint *ids, GLboolean *residences)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[717];
+ return ((GLboolean (APIENTRY *)(GLsizei n, const GLuint *ids, GLboolean *residences)) _func)(n, ids, residences);
+}
+
+void APIENTRY shared_dispatch_stub_718(GLenum target, GLuint program)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[718];
+ ((void (APIENTRY *)(GLenum target, GLuint program)) _func)(target, program);
+}
+
+void APIENTRY shared_dispatch_stub_719(GLsizei n, const GLuint *programs)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[719];
+ ((void (APIENTRY *)(GLsizei n, const GLuint *programs)) _func)(n, programs);
+}
+
+void APIENTRY shared_dispatch_stub_720(GLenum target, GLuint id, const GLfloat *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[720];
+ ((void (APIENTRY *)(GLenum target, GLuint id, const GLfloat *params)) _func)(target, id, params);
+}
+
+void APIENTRY shared_dispatch_stub_721(GLsizei n, GLuint *programs)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[721];
+ ((void (APIENTRY *)(GLsizei n, GLuint *programs)) _func)(n, programs);
+}
+
+void APIENTRY shared_dispatch_stub_722(GLenum target, GLuint index, GLenum pname, GLdouble *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[722];
+ ((void (APIENTRY *)(GLenum target, GLuint index, GLenum pname, GLdouble *params)) _func)(target, index, pname, params);
+}
+
+void APIENTRY shared_dispatch_stub_723(GLenum target, GLuint index, GLenum pname, GLfloat *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[723];
+ ((void (APIENTRY *)(GLenum target, GLuint index, GLenum pname, GLfloat *params)) _func)(target, index, pname, params);
+}
+
+void APIENTRY shared_dispatch_stub_724(GLuint id, GLenum pname, GLubyte *program)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[724];
+ ((void (APIENTRY *)(GLuint id, GLenum pname, GLubyte *program)) _func)(id, pname, program);
+}
+
+void APIENTRY shared_dispatch_stub_725(GLuint id, GLenum pname, GLint *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[725];
+ ((void (APIENTRY *)(GLuint id, GLenum pname, GLint *params)) _func)(id, pname, params);
+}
+
+void APIENTRY shared_dispatch_stub_726(GLenum target, GLuint address, GLenum pname, GLint *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[726];
+ ((void (APIENTRY *)(GLenum target, GLuint address, GLenum pname, GLint *params)) _func)(target, address, pname, params);
+}
+
+void APIENTRY shared_dispatch_stub_727(GLuint index, GLenum pname, GLvoid **pointer)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[727];
+ ((void (APIENTRY *)(GLuint index, GLenum pname, GLvoid **pointer)) _func)(index, pname, pointer);
+}
+
+void APIENTRY shared_dispatch_stub_728(GLuint index, GLenum pname, GLdouble *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[728];
+ ((void (APIENTRY *)(GLuint index, GLenum pname, GLdouble *params)) _func)(index, pname, params);
+}
+
+void APIENTRY shared_dispatch_stub_729(GLuint index, GLenum pname, GLfloat *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[729];
+ ((void (APIENTRY *)(GLuint index, GLenum pname, GLfloat *params)) _func)(index, pname, params);
+}
+
+void APIENTRY shared_dispatch_stub_730(GLuint index, GLenum pname, GLint *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[730];
+ ((void (APIENTRY *)(GLuint index, GLenum pname, GLint *params)) _func)(index, pname, params);
+}
+
+GLboolean APIENTRY shared_dispatch_stub_731(GLuint program)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[731];
+ return ((GLboolean (APIENTRY *)(GLuint program)) _func)(program);
+}
+
+void APIENTRY shared_dispatch_stub_732(GLenum target, GLuint id, GLsizei len, const GLubyte *program)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[732];
+ ((void (APIENTRY *)(GLenum target, GLuint id, GLsizei len, const GLubyte *program)) _func)(target, id, len, program);
+}
+
+void APIENTRY shared_dispatch_stub_733(GLenum target, GLuint index, GLsizei num, const GLdouble *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[733];
+ ((void (APIENTRY *)(GLenum target, GLuint index, GLsizei num, const GLdouble *params)) _func)(target, index, num, params);
+}
+
+void APIENTRY shared_dispatch_stub_734(GLenum target, GLuint index, GLsizei num, const GLfloat *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[734];
+ ((void (APIENTRY *)(GLenum target, GLuint index, GLsizei num, const GLfloat *params)) _func)(target, index, num, params);
+}
+
+void APIENTRY shared_dispatch_stub_735(GLsizei n, const GLuint *ids)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[735];
+ ((void (APIENTRY *)(GLsizei n, const GLuint *ids)) _func)(n, ids);
+}
+
+void APIENTRY shared_dispatch_stub_736(GLenum target, GLuint address, GLenum matrix, GLenum transform)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[736];
+ ((void (APIENTRY *)(GLenum target, GLuint address, GLenum matrix, GLenum transform)) _func)(target, address, matrix, transform);
+}
+
+void APIENTRY shared_dispatch_stub_737(GLuint index, GLdouble x)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[737];
+ ((void (APIENTRY *)(GLuint index, GLdouble x)) _func)(index, x);
+}
+
+void APIENTRY shared_dispatch_stub_738(GLuint index, const GLdouble *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[738];
+ ((void (APIENTRY *)(GLuint index, const GLdouble *v)) _func)(index, v);
+}
+
+void APIENTRY shared_dispatch_stub_739(GLuint index, GLfloat x)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[739];
+ ((void (APIENTRY *)(GLuint index, GLfloat x)) _func)(index, x);
+}
+
+void APIENTRY shared_dispatch_stub_740(GLuint index, const GLfloat *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[740];
+ ((void (APIENTRY *)(GLuint index, const GLfloat *v)) _func)(index, v);
+}
+
+void APIENTRY shared_dispatch_stub_741(GLuint index, GLshort x)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[741];
+ ((void (APIENTRY *)(GLuint index, GLshort x)) _func)(index, x);
+}
+
+void APIENTRY shared_dispatch_stub_742(GLuint index, const GLshort *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[742];
+ ((void (APIENTRY *)(GLuint index, const GLshort *v)) _func)(index, v);
+}
+
+void APIENTRY shared_dispatch_stub_743(GLuint index, GLdouble x, GLdouble y)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[743];
+ ((void (APIENTRY *)(GLuint index, GLdouble x, GLdouble y)) _func)(index, x, y);
+}
+
+void APIENTRY shared_dispatch_stub_744(GLuint index, const GLdouble *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[744];
+ ((void (APIENTRY *)(GLuint index, const GLdouble *v)) _func)(index, v);
+}
+
+void APIENTRY shared_dispatch_stub_745(GLuint index, GLfloat x, GLfloat y)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[745];
+ ((void (APIENTRY *)(GLuint index, GLfloat x, GLfloat y)) _func)(index, x, y);
+}
+
+void APIENTRY shared_dispatch_stub_746(GLuint index, const GLfloat *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[746];
+ ((void (APIENTRY *)(GLuint index, const GLfloat *v)) _func)(index, v);
+}
+
+void APIENTRY shared_dispatch_stub_747(GLuint index, GLshort x, GLshort y)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[747];
+ ((void (APIENTRY *)(GLuint index, GLshort x, GLshort y)) _func)(index, x, y);
+}
+
+void APIENTRY shared_dispatch_stub_748(GLuint index, const GLshort *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[748];
+ ((void (APIENTRY *)(GLuint index, const GLshort *v)) _func)(index, v);
+}
+
+void APIENTRY shared_dispatch_stub_749(GLuint index, GLdouble x, GLdouble y, GLdouble z)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[749];
+ ((void (APIENTRY *)(GLuint index, GLdouble x, GLdouble y, GLdouble z)) _func)(index, x, y, z);
+}
+
+void APIENTRY shared_dispatch_stub_750(GLuint index, const GLdouble *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[750];
+ ((void (APIENTRY *)(GLuint index, const GLdouble *v)) _func)(index, v);
+}
+
+void APIENTRY shared_dispatch_stub_751(GLuint index, GLfloat x, GLfloat y, GLfloat z)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[751];
+ ((void (APIENTRY *)(GLuint index, GLfloat x, GLfloat y, GLfloat z)) _func)(index, x, y, z);
+}
+
+void APIENTRY shared_dispatch_stub_752(GLuint index, const GLfloat *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[752];
+ ((void (APIENTRY *)(GLuint index, const GLfloat *v)) _func)(index, v);
+}
+
+void APIENTRY shared_dispatch_stub_753(GLuint index, GLshort x, GLshort y, GLshort z)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[753];
+ ((void (APIENTRY *)(GLuint index, GLshort x, GLshort y, GLshort z)) _func)(index, x, y, z);
+}
+
+void APIENTRY shared_dispatch_stub_754(GLuint index, const GLshort *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[754];
+ ((void (APIENTRY *)(GLuint index, const GLshort *v)) _func)(index, v);
+}
+
+void APIENTRY shared_dispatch_stub_755(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[755];
+ ((void (APIENTRY *)(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w)) _func)(index, x, y, z, w);
+}
+
+void APIENTRY shared_dispatch_stub_756(GLuint index, const GLdouble *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[756];
+ ((void (APIENTRY *)(GLuint index, const GLdouble *v)) _func)(index, v);
+}
+
+void APIENTRY shared_dispatch_stub_757(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[757];
+ ((void (APIENTRY *)(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w)) _func)(index, x, y, z, w);
+}
+
+void APIENTRY shared_dispatch_stub_758(GLuint index, const GLfloat *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[758];
+ ((void (APIENTRY *)(GLuint index, const GLfloat *v)) _func)(index, v);
+}
+
+void APIENTRY shared_dispatch_stub_759(GLuint index, GLshort x, GLshort y, GLshort z, GLshort w)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[759];
+ ((void (APIENTRY *)(GLuint index, GLshort x, GLshort y, GLshort z, GLshort w)) _func)(index, x, y, z, w);
+}
+
+void APIENTRY shared_dispatch_stub_760(GLuint index, const GLshort *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[760];
+ ((void (APIENTRY *)(GLuint index, const GLshort *v)) _func)(index, v);
+}
+
+void APIENTRY shared_dispatch_stub_761(GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[761];
+ ((void (APIENTRY *)(GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w)) _func)(index, x, y, z, w);
+}
+
+void APIENTRY shared_dispatch_stub_762(GLuint index, const GLubyte *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[762];
+ ((void (APIENTRY *)(GLuint index, const GLubyte *v)) _func)(index, v);
+}
+
+void APIENTRY shared_dispatch_stub_763(GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[763];
+ ((void (APIENTRY *)(GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer)) _func)(index, size, type, stride, pointer);
+}
+
+void APIENTRY shared_dispatch_stub_764(GLuint index, GLsizei n, const GLdouble *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[764];
+ ((void (APIENTRY *)(GLuint index, GLsizei n, const GLdouble *v)) _func)(index, n, v);
+}
+
+void APIENTRY shared_dispatch_stub_765(GLuint index, GLsizei n, const GLfloat *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[765];
+ ((void (APIENTRY *)(GLuint index, GLsizei n, const GLfloat *v)) _func)(index, n, v);
+}
+
+void APIENTRY shared_dispatch_stub_766(GLuint index, GLsizei n, const GLshort *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[766];
+ ((void (APIENTRY *)(GLuint index, GLsizei n, const GLshort *v)) _func)(index, n, v);
+}
+
+void APIENTRY shared_dispatch_stub_767(GLuint index, GLsizei n, const GLdouble *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[767];
+ ((void (APIENTRY *)(GLuint index, GLsizei n, const GLdouble *v)) _func)(index, n, v);
+}
+
+void APIENTRY shared_dispatch_stub_768(GLuint index, GLsizei n, const GLfloat *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[768];
+ ((void (APIENTRY *)(GLuint index, GLsizei n, const GLfloat *v)) _func)(index, n, v);
+}
+
+void APIENTRY shared_dispatch_stub_769(GLuint index, GLsizei n, const GLshort *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[769];
+ ((void (APIENTRY *)(GLuint index, GLsizei n, const GLshort *v)) _func)(index, n, v);
+}
+
+void APIENTRY shared_dispatch_stub_770(GLuint index, GLsizei n, const GLdouble *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[770];
+ ((void (APIENTRY *)(GLuint index, GLsizei n, const GLdouble *v)) _func)(index, n, v);
+}
+
+void APIENTRY shared_dispatch_stub_771(GLuint index, GLsizei n, const GLfloat *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[771];
+ ((void (APIENTRY *)(GLuint index, GLsizei n, const GLfloat *v)) _func)(index, n, v);
+}
+
+void APIENTRY shared_dispatch_stub_772(GLuint index, GLsizei n, const GLshort *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[772];
+ ((void (APIENTRY *)(GLuint index, GLsizei n, const GLshort *v)) _func)(index, n, v);
+}
+
+void APIENTRY shared_dispatch_stub_773(GLuint index, GLsizei n, const GLdouble *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[773];
+ ((void (APIENTRY *)(GLuint index, GLsizei n, const GLdouble *v)) _func)(index, n, v);
+}
+
+void APIENTRY shared_dispatch_stub_774(GLuint index, GLsizei n, const GLfloat *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[774];
+ ((void (APIENTRY *)(GLuint index, GLsizei n, const GLfloat *v)) _func)(index, n, v);
+}
+
+void APIENTRY shared_dispatch_stub_775(GLuint index, GLsizei n, const GLshort *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[775];
+ ((void (APIENTRY *)(GLuint index, GLsizei n, const GLshort *v)) _func)(index, n, v);
+}
+
+void APIENTRY shared_dispatch_stub_776(GLuint index, GLsizei n, const GLubyte *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[776];
+ ((void (APIENTRY *)(GLuint index, GLsizei n, const GLubyte *v)) _func)(index, n, v);
+}
+
+void APIENTRY shared_dispatch_stub_777(GLenum pname, GLfloat *param)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[777];
+ ((void (APIENTRY *)(GLenum pname, GLfloat *param)) _func)(pname, param);
+}
+
+void APIENTRY shared_dispatch_stub_778(GLenum pname, GLint *param)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[778];
+ ((void (APIENTRY *)(GLenum pname, GLint *param)) _func)(pname, param);
+}
+
+void APIENTRY shared_dispatch_stub_779(GLenum pname, const GLfloat *param)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[779];
+ ((void (APIENTRY *)(GLenum pname, const GLfloat *param)) _func)(pname, param);
+}
+
+void APIENTRY shared_dispatch_stub_780(GLenum pname, const GLint *param)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[780];
+ ((void (APIENTRY *)(GLenum pname, const GLint *param)) _func)(pname, param);
+}
+
+void APIENTRY shared_dispatch_stub_781(GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[781];
+ ((void (APIENTRY *)(GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod)) _func)(op, dst, dstMod, arg1, arg1Rep, arg1Mod);
+}
+
+void APIENTRY shared_dispatch_stub_782(GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[782];
+ ((void (APIENTRY *)(GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod)) _func)(op, dst, dstMod, arg1, arg1Rep, arg1Mod, arg2, arg2Rep, arg2Mod);
+}
+
+void APIENTRY shared_dispatch_stub_783(GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[783];
+ ((void (APIENTRY *)(GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod)) _func)(op, dst, dstMod, arg1, arg1Rep, arg1Mod, arg2, arg2Rep, arg2Mod, arg3, arg3Rep, arg3Mod);
+}
+
+void APIENTRY shared_dispatch_stub_784(void)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[784];
+ ((void (APIENTRY *)(void)) _func)();
+}
+
+void APIENTRY shared_dispatch_stub_785(GLuint id)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[785];
+ ((void (APIENTRY *)(GLuint id)) _func)(id);
+}
+
+void APIENTRY shared_dispatch_stub_786(GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[786];
+ ((void (APIENTRY *)(GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod)) _func)(op, dst, dstMask, dstMod, arg1, arg1Rep, arg1Mod);
+}
+
+void APIENTRY shared_dispatch_stub_787(GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[787];
+ ((void (APIENTRY *)(GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod)) _func)(op, dst, dstMask, dstMod, arg1, arg1Rep, arg1Mod, arg2, arg2Rep, arg2Mod);
+}
+
+void APIENTRY shared_dispatch_stub_788(GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[788];
+ ((void (APIENTRY *)(GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod)) _func)(op, dst, dstMask, dstMod, arg1, arg1Rep, arg1Mod, arg2, arg2Rep, arg2Mod, arg3, arg3Rep, arg3Mod);
+}
+
+void APIENTRY shared_dispatch_stub_789(GLuint id)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[789];
+ ((void (APIENTRY *)(GLuint id)) _func)(id);
+}
+
+void APIENTRY shared_dispatch_stub_790(void)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[790];
+ ((void (APIENTRY *)(void)) _func)();
+}
+
+GLuint APIENTRY shared_dispatch_stub_791(GLuint range)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[791];
+ return ((GLuint (APIENTRY *)(GLuint range)) _func)(range);
+}
+
+void APIENTRY shared_dispatch_stub_792(GLuint dst, GLuint coord, GLenum swizzle)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[792];
+ ((void (APIENTRY *)(GLuint dst, GLuint coord, GLenum swizzle)) _func)(dst, coord, swizzle);
+}
+
+void APIENTRY shared_dispatch_stub_793(GLuint dst, GLuint interp, GLenum swizzle)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[793];
+ ((void (APIENTRY *)(GLuint dst, GLuint interp, GLenum swizzle)) _func)(dst, interp, swizzle);
+}
+
+void APIENTRY shared_dispatch_stub_794(GLuint dst, const GLfloat *value)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[794];
+ ((void (APIENTRY *)(GLuint dst, const GLfloat *value)) _func)(dst, value);
+}
+
+void APIENTRY shared_dispatch_stub_795(GLenum pname, GLint param)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[795];
+ ((void (APIENTRY *)(GLenum pname, GLint param)) _func)(pname, param);
+}
+
+void APIENTRY shared_dispatch_stub_796(GLenum pname, const GLint *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[796];
+ ((void (APIENTRY *)(GLenum pname, const GLint *params)) _func)(pname, params);
+}
+
+void APIENTRY shared_dispatch_stub_797(GLenum face)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[797];
+ ((void (APIENTRY *)(GLenum face)) _func)(face);
+}
+
+void APIENTRY shared_dispatch_stub_798(GLuint array)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[798];
+ ((void (APIENTRY *)(GLuint array)) _func)(array);
+}
+
+void APIENTRY shared_dispatch_stub_799(GLsizei n, const GLuint *arrays)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[799];
+ ((void (APIENTRY *)(GLsizei n, const GLuint *arrays)) _func)(n, arrays);
+}
+
+void APIENTRY shared_dispatch_stub_800(GLsizei n, GLuint *arrays)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[800];
+ ((void (APIENTRY *)(GLsizei n, GLuint *arrays)) _func)(n, arrays);
+}
+
+GLboolean APIENTRY shared_dispatch_stub_801(GLuint array)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[801];
+ return ((GLboolean (APIENTRY *)(GLuint array)) _func)(array);
+}
+
+void APIENTRY shared_dispatch_stub_802(GLuint id, GLsizei len, const GLubyte *name, GLdouble *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[802];
+ ((void (APIENTRY *)(GLuint id, GLsizei len, const GLubyte *name, GLdouble *params)) _func)(id, len, name, params);
+}
+
+void APIENTRY shared_dispatch_stub_803(GLuint id, GLsizei len, const GLubyte *name, GLfloat *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[803];
+ ((void (APIENTRY *)(GLuint id, GLsizei len, const GLubyte *name, GLfloat *params)) _func)(id, len, name, params);
+}
+
+void APIENTRY shared_dispatch_stub_804(GLuint id, GLsizei len, const GLubyte *name, GLdouble x, GLdouble y, GLdouble z, GLdouble w)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[804];
+ ((void (APIENTRY *)(GLuint id, GLsizei len, const GLubyte *name, GLdouble x, GLdouble y, GLdouble z, GLdouble w)) _func)(id, len, name, x, y, z, w);
+}
+
+void APIENTRY shared_dispatch_stub_805(GLuint id, GLsizei len, const GLubyte *name, const GLdouble *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[805];
+ ((void (APIENTRY *)(GLuint id, GLsizei len, const GLubyte *name, const GLdouble *v)) _func)(id, len, name, v);
+}
+
+void APIENTRY shared_dispatch_stub_806(GLuint id, GLsizei len, const GLubyte *name, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[806];
+ ((void (APIENTRY *)(GLuint id, GLsizei len, const GLubyte *name, GLfloat x, GLfloat y, GLfloat z, GLfloat w)) _func)(id, len, name, x, y, z, w);
+}
+
+void APIENTRY shared_dispatch_stub_807(GLuint id, GLsizei len, const GLubyte *name, const GLfloat *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[807];
+ ((void (APIENTRY *)(GLuint id, GLsizei len, const GLubyte *name, const GLfloat *v)) _func)(id, len, name, v);
+}
+
+void APIENTRY shared_dispatch_stub_808(GLuint index)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[808];
+ ((void (APIENTRY *)(GLuint index)) _func)(index);
+}
+
+void APIENTRY shared_dispatch_stub_809(void)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[809];
+ ((void (APIENTRY *)(void)) _func)();
+}
+
+void APIENTRY shared_dispatch_stub_810(GLenum func, GLclampx ref)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[810];
+ ((void (APIENTRY *)(GLenum func, GLclampx ref)) _func)(func, ref);
+}
+
+void APIENTRY shared_dispatch_stub_811(GLclampx red, GLclampx green, GLclampx blue, GLclampx alpha)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[811];
+ ((void (APIENTRY *)(GLclampx red, GLclampx green, GLclampx blue, GLclampx alpha)) _func)(red, green, blue, alpha);
+}
+
+void APIENTRY shared_dispatch_stub_812(GLclampx depth)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[812];
+ ((void (APIENTRY *)(GLclampx depth)) _func)(depth);
+}
+
+void APIENTRY shared_dispatch_stub_813(GLenum plane, const GLfixed *equation)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[813];
+ ((void (APIENTRY *)(GLenum plane, const GLfixed *equation)) _func)(plane, equation);
+}
+
+void APIENTRY shared_dispatch_stub_814(GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[814];
+ ((void (APIENTRY *)(GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha)) _func)(red, green, blue, alpha);
+}
+
+void APIENTRY shared_dispatch_stub_815(GLclampx zNear, GLclampx zFar)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[815];
+ ((void (APIENTRY *)(GLclampx zNear, GLclampx zFar)) _func)(zNear, zFar);
+}
+
+void APIENTRY shared_dispatch_stub_816(GLenum pname, GLfixed param)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[816];
+ ((void (APIENTRY *)(GLenum pname, GLfixed param)) _func)(pname, param);
+}
+
+void APIENTRY shared_dispatch_stub_817(GLenum pname, const GLfixed *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[817];
+ ((void (APIENTRY *)(GLenum pname, const GLfixed *params)) _func)(pname, params);
+}
+
+void APIENTRY shared_dispatch_stub_818(GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[818];
+ ((void (APIENTRY *)(GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar)) _func)(left, right, bottom, top, zNear, zFar);
+}
+
+void APIENTRY shared_dispatch_stub_819(GLenum plane, GLfixed *equation)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[819];
+ ((void (APIENTRY *)(GLenum plane, GLfixed *equation)) _func)(plane, equation);
+}
+
+void APIENTRY shared_dispatch_stub_820(GLenum pname, GLfixed *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[820];
+ ((void (APIENTRY *)(GLenum pname, GLfixed *params)) _func)(pname, params);
+}
+
+void APIENTRY shared_dispatch_stub_821(GLenum light, GLenum pname, GLfixed *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[821];
+ ((void (APIENTRY *)(GLenum light, GLenum pname, GLfixed *params)) _func)(light, pname, params);
+}
+
+void APIENTRY shared_dispatch_stub_822(GLenum face, GLenum pname, GLfixed *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[822];
+ ((void (APIENTRY *)(GLenum face, GLenum pname, GLfixed *params)) _func)(face, pname, params);
+}
+
+void APIENTRY shared_dispatch_stub_823(GLenum target, GLenum pname, GLfixed *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[823];
+ ((void (APIENTRY *)(GLenum target, GLenum pname, GLfixed *params)) _func)(target, pname, params);
+}
+
+void APIENTRY shared_dispatch_stub_824(GLenum coord, GLenum pname, GLfixed *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[824];
+ ((void (APIENTRY *)(GLenum coord, GLenum pname, GLfixed *params)) _func)(coord, pname, params);
+}
+
+void APIENTRY shared_dispatch_stub_825(GLenum target, GLenum pname, GLfixed *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[825];
+ ((void (APIENTRY *)(GLenum target, GLenum pname, GLfixed *params)) _func)(target, pname, params);
+}
+
+void APIENTRY shared_dispatch_stub_826(GLenum pname, GLfixed param)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[826];
+ ((void (APIENTRY *)(GLenum pname, GLfixed param)) _func)(pname, param);
+}
+
+void APIENTRY shared_dispatch_stub_827(GLenum pname, const GLfixed *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[827];
+ ((void (APIENTRY *)(GLenum pname, const GLfixed *params)) _func)(pname, params);
+}
+
+void APIENTRY shared_dispatch_stub_828(GLenum light, GLenum pname, GLfixed param)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[828];
+ ((void (APIENTRY *)(GLenum light, GLenum pname, GLfixed param)) _func)(light, pname, param);
+}
+
+void APIENTRY shared_dispatch_stub_829(GLenum light, GLenum pname, const GLfixed *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[829];
+ ((void (APIENTRY *)(GLenum light, GLenum pname, const GLfixed *params)) _func)(light, pname, params);
+}
+
+void APIENTRY shared_dispatch_stub_830(GLfixed width)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[830];
+ ((void (APIENTRY *)(GLfixed width)) _func)(width);
+}
+
+void APIENTRY shared_dispatch_stub_831(const GLfixed *m)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[831];
+ ((void (APIENTRY *)(const GLfixed *m)) _func)(m);
+}
+
+void APIENTRY shared_dispatch_stub_832(GLenum face, GLenum pname, GLfixed param)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[832];
+ ((void (APIENTRY *)(GLenum face, GLenum pname, GLfixed param)) _func)(face, pname, param);
+}
+
+void APIENTRY shared_dispatch_stub_833(GLenum face, GLenum pname, const GLfixed *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[833];
+ ((void (APIENTRY *)(GLenum face, GLenum pname, const GLfixed *params)) _func)(face, pname, params);
+}
+
+void APIENTRY shared_dispatch_stub_834(const GLfixed *m)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[834];
+ ((void (APIENTRY *)(const GLfixed *m)) _func)(m);
+}
+
+void APIENTRY shared_dispatch_stub_835(GLenum target, GLfixed s, GLfixed t, GLfixed r, GLfixed q)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[835];
+ ((void (APIENTRY *)(GLenum target, GLfixed s, GLfixed t, GLfixed r, GLfixed q)) _func)(target, s, t, r, q);
+}
+
+void APIENTRY shared_dispatch_stub_836(GLfixed nx, GLfixed ny, GLfixed nz)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[836];
+ ((void (APIENTRY *)(GLfixed nx, GLfixed ny, GLfixed nz)) _func)(nx, ny, nz);
+}
+
+void APIENTRY shared_dispatch_stub_837(GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[837];
+ ((void (APIENTRY *)(GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar)) _func)(left, right, bottom, top, zNear, zFar);
+}
+
+void APIENTRY shared_dispatch_stub_838(GLenum pname, GLfixed param)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[838];
+ ((void (APIENTRY *)(GLenum pname, GLfixed param)) _func)(pname, param);
+}
+
+void APIENTRY shared_dispatch_stub_839(GLenum pname, const GLfixed *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[839];
+ ((void (APIENTRY *)(GLenum pname, const GLfixed *params)) _func)(pname, params);
+}
+
+void APIENTRY shared_dispatch_stub_840(GLfixed size)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[840];
+ ((void (APIENTRY *)(GLfixed size)) _func)(size);
+}
+
+void APIENTRY shared_dispatch_stub_841(GLfixed factor, GLfixed units)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[841];
+ ((void (APIENTRY *)(GLfixed factor, GLfixed units)) _func)(factor, units);
+}
+
+void APIENTRY shared_dispatch_stub_842(GLfixed angle, GLfixed x, GLfixed y, GLfixed z)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[842];
+ ((void (APIENTRY *)(GLfixed angle, GLfixed x, GLfixed y, GLfixed z)) _func)(angle, x, y, z);
+}
+
+void APIENTRY shared_dispatch_stub_843(GLclampx value, GLboolean invert)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[843];
+ ((void (APIENTRY *)(GLclampx value, GLboolean invert)) _func)(value, invert);
+}
+
+void APIENTRY shared_dispatch_stub_844(GLfixed x, GLfixed y, GLfixed z)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[844];
+ ((void (APIENTRY *)(GLfixed x, GLfixed y, GLfixed z)) _func)(x, y, z);
+}
+
+void APIENTRY shared_dispatch_stub_845(GLenum target, GLenum pname, GLfixed param)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[845];
+ ((void (APIENTRY *)(GLenum target, GLenum pname, GLfixed param)) _func)(target, pname, param);
+}
+
+void APIENTRY shared_dispatch_stub_846(GLenum target, GLenum pname, const GLfixed *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[846];
+ ((void (APIENTRY *)(GLenum target, GLenum pname, const GLfixed *params)) _func)(target, pname, params);
+}
+
+void APIENTRY shared_dispatch_stub_847(GLenum coord, GLenum pname, GLint param)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[847];
+ ((void (APIENTRY *)(GLenum coord, GLenum pname, GLint param)) _func)(coord, pname, param);
+}
+
+void APIENTRY shared_dispatch_stub_848(GLenum coord, GLenum pname, const GLfixed *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[848];
+ ((void (APIENTRY *)(GLenum coord, GLenum pname, const GLfixed *params)) _func)(coord, pname, params);
+}
+
+void APIENTRY shared_dispatch_stub_849(GLenum target, GLenum pname, GLfixed param)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[849];
+ ((void (APIENTRY *)(GLenum target, GLenum pname, GLfixed param)) _func)(target, pname, param);
+}
+
+void APIENTRY shared_dispatch_stub_850(GLenum target, GLenum pname, const GLfixed *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[850];
+ ((void (APIENTRY *)(GLenum target, GLenum pname, const GLfixed *params)) _func)(target, pname, params);
+}
+
+void APIENTRY shared_dispatch_stub_851(GLfixed x, GLfixed y, GLfixed z)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[851];
+ ((void (APIENTRY *)(GLfixed x, GLfixed y, GLfixed z)) _func)(x, y, z);
+}
+
+void APIENTRY shared_dispatch_stub_852(GLenum plane, const GLfloat *equation)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[852];
+ ((void (APIENTRY *)(GLenum plane, const GLfloat *equation)) _func)(plane, equation);
+}
+
+void APIENTRY shared_dispatch_stub_853(GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[853];
+ ((void (APIENTRY *)(GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar)) _func)(left, right, bottom, top, zNear, zFar);
+}
+
+void APIENTRY shared_dispatch_stub_854(GLenum plane, GLfloat *equation)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[854];
+ ((void (APIENTRY *)(GLenum plane, GLfloat *equation)) _func)(plane, equation);
+}
+
+void APIENTRY shared_dispatch_stub_855(GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[855];
+ ((void (APIENTRY *)(GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar)) _func)(left, right, bottom, top, zNear, zFar);
+}
+
+void APIENTRY shared_dispatch_stub_856(GLclampd zmin, GLclampd zmax)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[856];
+ ((void (APIENTRY *)(GLclampd zmin, GLclampd zmax)) _func)(zmin, zmax);
+}
+
+void APIENTRY shared_dispatch_stub_857(GLenum modeRGB, GLenum modeA)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[857];
+ ((void (APIENTRY *)(GLenum modeRGB, GLenum modeA)) _func)(modeRGB, modeA);
+}
+
+void APIENTRY shared_dispatch_stub_858(GLenum target, GLuint framebuffer)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[858];
+ ((void (APIENTRY *)(GLenum target, GLuint framebuffer)) _func)(target, framebuffer);
+}
+
+void APIENTRY shared_dispatch_stub_859(GLenum target, GLuint renderbuffer)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[859];
+ ((void (APIENTRY *)(GLenum target, GLuint renderbuffer)) _func)(target, renderbuffer);
+}
+
+GLenum APIENTRY shared_dispatch_stub_860(GLenum target)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[860];
+ return ((GLenum (APIENTRY *)(GLenum target)) _func)(target);
+}
+
+void APIENTRY shared_dispatch_stub_861(GLsizei n, const GLuint *framebuffers)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[861];
+ ((void (APIENTRY *)(GLsizei n, const GLuint *framebuffers)) _func)(n, framebuffers);
+}
+
+void APIENTRY shared_dispatch_stub_862(GLsizei n, const GLuint *renderbuffers)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[862];
+ ((void (APIENTRY *)(GLsizei n, const GLuint *renderbuffers)) _func)(n, renderbuffers);
+}
+
+void APIENTRY shared_dispatch_stub_863(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[863];
+ ((void (APIENTRY *)(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer)) _func)(target, attachment, renderbuffertarget, renderbuffer);
+}
+
+void APIENTRY shared_dispatch_stub_864(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[864];
+ ((void (APIENTRY *)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level)) _func)(target, attachment, textarget, texture, level);
+}
+
+void APIENTRY shared_dispatch_stub_865(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[865];
+ ((void (APIENTRY *)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level)) _func)(target, attachment, textarget, texture, level);
+}
+
+void APIENTRY shared_dispatch_stub_866(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[866];
+ ((void (APIENTRY *)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset)) _func)(target, attachment, textarget, texture, level, zoffset);
+}
+
+void APIENTRY shared_dispatch_stub_867(GLsizei n, GLuint *framebuffers)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[867];
+ ((void (APIENTRY *)(GLsizei n, GLuint *framebuffers)) _func)(n, framebuffers);
+}
+
+void APIENTRY shared_dispatch_stub_868(GLsizei n, GLuint *renderbuffers)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[868];
+ ((void (APIENTRY *)(GLsizei n, GLuint *renderbuffers)) _func)(n, renderbuffers);
+}
+
+void APIENTRY shared_dispatch_stub_869(GLenum target)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[869];
+ ((void (APIENTRY *)(GLenum target)) _func)(target);
+}
+
+void APIENTRY shared_dispatch_stub_870(GLenum target, GLenum attachment, GLenum pname, GLint *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[870];
+ ((void (APIENTRY *)(GLenum target, GLenum attachment, GLenum pname, GLint *params)) _func)(target, attachment, pname, params);
+}
+
+void APIENTRY shared_dispatch_stub_871(GLenum target, GLenum pname, GLint *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[871];
+ ((void (APIENTRY *)(GLenum target, GLenum pname, GLint *params)) _func)(target, pname, params);
+}
+
+GLboolean APIENTRY shared_dispatch_stub_872(GLuint framebuffer)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[872];
+ return ((GLboolean (APIENTRY *)(GLuint framebuffer)) _func)(framebuffer);
+}
+
+GLboolean APIENTRY shared_dispatch_stub_873(GLuint renderbuffer)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[873];
+ return ((GLboolean (APIENTRY *)(GLuint renderbuffer)) _func)(renderbuffer);
+}
+
+void APIENTRY shared_dispatch_stub_874(GLenum target, GLenum internalformat, GLsizei width, GLsizei height)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[874];
+ ((void (APIENTRY *)(GLenum target, GLenum internalformat, GLsizei width, GLsizei height)) _func)(target, internalformat, width, height);
+}
+
+void APIENTRY shared_dispatch_stub_875(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[875];
+ ((void (APIENTRY *)(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter)) _func)(srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter);
+}
+
+void APIENTRY shared_dispatch_stub_876(GLenum target, GLenum pname, GLint param)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[876];
+ ((void (APIENTRY *)(GLenum target, GLenum pname, GLint param)) _func)(target, pname, param);
+}
+
+void APIENTRY shared_dispatch_stub_877(GLenum target, GLintptr offset, GLsizeiptr size)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[877];
+ ((void (APIENTRY *)(GLenum target, GLintptr offset, GLsizeiptr size)) _func)(target, offset, size);
+}
+
+void APIENTRY shared_dispatch_stub_878(GLuint program, GLuint colorNumber, const GLchar *name)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[878];
+ ((void (APIENTRY *)(GLuint program, GLuint colorNumber, const GLchar *name)) _func)(program, colorNumber, name);
+}
+
+GLint APIENTRY shared_dispatch_stub_879(GLuint program, const GLchar *name)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[879];
+ return ((GLint (APIENTRY *)(GLuint program, const GLchar *name)) _func)(program, name);
+}
+
+void APIENTRY shared_dispatch_stub_880(GLuint program, GLint location, GLuint *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[880];
+ ((void (APIENTRY *)(GLuint program, GLint location, GLuint *params)) _func)(program, location, params);
+}
+
+void APIENTRY shared_dispatch_stub_881(GLuint index, GLenum pname, GLint *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[881];
+ ((void (APIENTRY *)(GLuint index, GLenum pname, GLint *params)) _func)(index, pname, params);
+}
+
+void APIENTRY shared_dispatch_stub_882(GLuint index, GLenum pname, GLuint *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[882];
+ ((void (APIENTRY *)(GLuint index, GLenum pname, GLuint *params)) _func)(index, pname, params);
+}
+
+void APIENTRY shared_dispatch_stub_883(GLint location, GLuint x)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[883];
+ ((void (APIENTRY *)(GLint location, GLuint x)) _func)(location, x);
+}
+
+void APIENTRY shared_dispatch_stub_884(GLint location, GLsizei count, const GLuint *value)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[884];
+ ((void (APIENTRY *)(GLint location, GLsizei count, const GLuint *value)) _func)(location, count, value);
+}
+
+void APIENTRY shared_dispatch_stub_885(GLint location, GLuint x, GLuint y)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[885];
+ ((void (APIENTRY *)(GLint location, GLuint x, GLuint y)) _func)(location, x, y);
+}
+
+void APIENTRY shared_dispatch_stub_886(GLint location, GLsizei count, const GLuint *value)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[886];
+ ((void (APIENTRY *)(GLint location, GLsizei count, const GLuint *value)) _func)(location, count, value);
+}
+
+void APIENTRY shared_dispatch_stub_887(GLint location, GLuint x, GLuint y, GLuint z)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[887];
+ ((void (APIENTRY *)(GLint location, GLuint x, GLuint y, GLuint z)) _func)(location, x, y, z);
+}
+
+void APIENTRY shared_dispatch_stub_888(GLint location, GLsizei count, const GLuint *value)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[888];
+ ((void (APIENTRY *)(GLint location, GLsizei count, const GLuint *value)) _func)(location, count, value);
+}
+
+void APIENTRY shared_dispatch_stub_889(GLint location, GLuint x, GLuint y, GLuint z, GLuint w)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[889];
+ ((void (APIENTRY *)(GLint location, GLuint x, GLuint y, GLuint z, GLuint w)) _func)(location, x, y, z, w);
+}
+
+void APIENTRY shared_dispatch_stub_890(GLint location, GLsizei count, const GLuint *value)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[890];
+ ((void (APIENTRY *)(GLint location, GLsizei count, const GLuint *value)) _func)(location, count, value);
+}
+
+void APIENTRY shared_dispatch_stub_891(GLuint index, GLint x)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[891];
+ ((void (APIENTRY *)(GLuint index, GLint x)) _func)(index, x);
+}
+
+void APIENTRY shared_dispatch_stub_892(GLuint index, const GLint *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[892];
+ ((void (APIENTRY *)(GLuint index, const GLint *v)) _func)(index, v);
+}
+
+void APIENTRY shared_dispatch_stub_893(GLuint index, GLuint x)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[893];
+ ((void (APIENTRY *)(GLuint index, GLuint x)) _func)(index, x);
+}
+
+void APIENTRY shared_dispatch_stub_894(GLuint index, const GLuint *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[894];
+ ((void (APIENTRY *)(GLuint index, const GLuint *v)) _func)(index, v);
+}
+
+void APIENTRY shared_dispatch_stub_895(GLuint index, GLint x, GLint y)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[895];
+ ((void (APIENTRY *)(GLuint index, GLint x, GLint y)) _func)(index, x, y);
+}
+
+void APIENTRY shared_dispatch_stub_896(GLuint index, const GLint *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[896];
+ ((void (APIENTRY *)(GLuint index, const GLint *v)) _func)(index, v);
+}
+
+void APIENTRY shared_dispatch_stub_897(GLuint index, GLuint x, GLuint y)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[897];
+ ((void (APIENTRY *)(GLuint index, GLuint x, GLuint y)) _func)(index, x, y);
+}
+
+void APIENTRY shared_dispatch_stub_898(GLuint index, const GLuint *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[898];
+ ((void (APIENTRY *)(GLuint index, const GLuint *v)) _func)(index, v);
+}
+
+void APIENTRY shared_dispatch_stub_899(GLuint index, GLint x, GLint y, GLint z)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[899];
+ ((void (APIENTRY *)(GLuint index, GLint x, GLint y, GLint z)) _func)(index, x, y, z);
+}
+
+void APIENTRY shared_dispatch_stub_900(GLuint index, const GLint *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[900];
+ ((void (APIENTRY *)(GLuint index, const GLint *v)) _func)(index, v);
+}
+
+void APIENTRY shared_dispatch_stub_901(GLuint index, GLuint x, GLuint y, GLuint z)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[901];
+ ((void (APIENTRY *)(GLuint index, GLuint x, GLuint y, GLuint z)) _func)(index, x, y, z);
+}
+
+void APIENTRY shared_dispatch_stub_902(GLuint index, const GLuint *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[902];
+ ((void (APIENTRY *)(GLuint index, const GLuint *v)) _func)(index, v);
+}
+
+void APIENTRY shared_dispatch_stub_903(GLuint index, const GLbyte *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[903];
+ ((void (APIENTRY *)(GLuint index, const GLbyte *v)) _func)(index, v);
+}
+
+void APIENTRY shared_dispatch_stub_904(GLuint index, GLint x, GLint y, GLint z, GLint w)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[904];
+ ((void (APIENTRY *)(GLuint index, GLint x, GLint y, GLint z, GLint w)) _func)(index, x, y, z, w);
+}
+
+void APIENTRY shared_dispatch_stub_905(GLuint index, const GLint *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[905];
+ ((void (APIENTRY *)(GLuint index, const GLint *v)) _func)(index, v);
+}
+
+void APIENTRY shared_dispatch_stub_906(GLuint index, const GLshort *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[906];
+ ((void (APIENTRY *)(GLuint index, const GLshort *v)) _func)(index, v);
+}
+
+void APIENTRY shared_dispatch_stub_907(GLuint index, const GLubyte *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[907];
+ ((void (APIENTRY *)(GLuint index, const GLubyte *v)) _func)(index, v);
+}
+
+void APIENTRY shared_dispatch_stub_908(GLuint index, GLuint x, GLuint y, GLuint z, GLuint w)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[908];
+ ((void (APIENTRY *)(GLuint index, GLuint x, GLuint y, GLuint z, GLuint w)) _func)(index, x, y, z, w);
+}
+
+void APIENTRY shared_dispatch_stub_909(GLuint index, const GLuint *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[909];
+ ((void (APIENTRY *)(GLuint index, const GLuint *v)) _func)(index, v);
+}
+
+void APIENTRY shared_dispatch_stub_910(GLuint index, const GLushort *v)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[910];
+ ((void (APIENTRY *)(GLuint index, const GLushort *v)) _func)(index, v);
+}
+
+void APIENTRY shared_dispatch_stub_911(GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[911];
+ ((void (APIENTRY *)(GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer)) _func)(index, size, type, stride, pointer);
+}
+
+void APIENTRY shared_dispatch_stub_912(GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[912];
+ ((void (APIENTRY *)(GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer)) _func)(target, attachment, texture, level, layer);
+}
+
+void APIENTRY shared_dispatch_stub_913(GLuint buf, GLboolean r, GLboolean g, GLboolean b, GLboolean a)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[913];
+ ((void (APIENTRY *)(GLuint buf, GLboolean r, GLboolean g, GLboolean b, GLboolean a)) _func)(buf, r, g, b, a);
+}
+
+void APIENTRY shared_dispatch_stub_914(GLenum target, GLuint index)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[914];
+ ((void (APIENTRY *)(GLenum target, GLuint index)) _func)(target, index);
+}
+
+void APIENTRY shared_dispatch_stub_915(GLenum target, GLuint index)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[915];
+ ((void (APIENTRY *)(GLenum target, GLuint index)) _func)(target, index);
+}
+
+void APIENTRY shared_dispatch_stub_916(GLenum value, GLuint index, GLboolean *data)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[916];
+ ((void (APIENTRY *)(GLenum value, GLuint index, GLboolean *data)) _func)(value, index, data);
+}
+
+void APIENTRY shared_dispatch_stub_917(GLenum value, GLuint index, GLint *data)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[917];
+ ((void (APIENTRY *)(GLenum value, GLuint index, GLint *data)) _func)(value, index, data);
+}
+
+GLboolean APIENTRY shared_dispatch_stub_918(GLenum target, GLuint index)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[918];
+ return ((GLboolean (APIENTRY *)(GLenum target, GLuint index)) _func)(target, index);
+}
+
+void APIENTRY shared_dispatch_stub_919(GLint r, GLint g, GLint b, GLint a)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[919];
+ ((void (APIENTRY *)(GLint r, GLint g, GLint b, GLint a)) _func)(r, g, b, a);
+}
+
+void APIENTRY shared_dispatch_stub_920(GLuint r, GLuint g, GLuint b, GLuint a)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[920];
+ ((void (APIENTRY *)(GLuint r, GLuint g, GLuint b, GLuint a)) _func)(r, g, b, a);
+}
+
+void APIENTRY shared_dispatch_stub_921(GLenum target, GLenum pname, GLint *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[921];
+ ((void (APIENTRY *)(GLenum target, GLenum pname, GLint *params)) _func)(target, pname, params);
+}
+
+void APIENTRY shared_dispatch_stub_922(GLenum target, GLenum pname, GLuint *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[922];
+ ((void (APIENTRY *)(GLenum target, GLenum pname, GLuint *params)) _func)(target, pname, params);
+}
+
+void APIENTRY shared_dispatch_stub_923(GLenum target, GLenum pname, const GLint *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[923];
+ ((void (APIENTRY *)(GLenum target, GLenum pname, const GLint *params)) _func)(target, pname, params);
+}
+
+void APIENTRY shared_dispatch_stub_924(GLenum target, GLenum pname, const GLuint *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[924];
+ ((void (APIENTRY *)(GLenum target, GLenum pname, const GLuint *params)) _func)(target, pname, params);
+}
+
+void APIENTRY shared_dispatch_stub_925(GLuint query, GLenum mode)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[925];
+ ((void (APIENTRY *)(GLuint query, GLenum mode)) _func)(query, mode);
+}
+
+void APIENTRY shared_dispatch_stub_926(void)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[926];
+ ((void (APIENTRY *)(void)) _func)();
+}
+
+void APIENTRY shared_dispatch_stub_927(GLenum mode)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[927];
+ ((void (APIENTRY *)(GLenum mode)) _func)(mode);
+}
+
+void APIENTRY shared_dispatch_stub_928(GLenum target, GLuint index, GLuint buffer)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[928];
+ ((void (APIENTRY *)(GLenum target, GLuint index, GLuint buffer)) _func)(target, index, buffer);
+}
+
+void APIENTRY shared_dispatch_stub_929(GLenum target, GLuint index, GLuint buffer, GLintptr offset)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[929];
+ ((void (APIENTRY *)(GLenum target, GLuint index, GLuint buffer, GLintptr offset)) _func)(target, index, buffer, offset);
+}
+
+void APIENTRY shared_dispatch_stub_930(GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[930];
+ ((void (APIENTRY *)(GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size)) _func)(target, index, buffer, offset, size);
+}
+
+void APIENTRY shared_dispatch_stub_931(void)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[931];
+ ((void (APIENTRY *)(void)) _func)();
+}
+
+void APIENTRY shared_dispatch_stub_932(GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[932];
+ ((void (APIENTRY *)(GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name)) _func)(program, index, bufSize, length, size, type, name);
+}
+
+void APIENTRY shared_dispatch_stub_933(GLuint program, GLsizei count, const char **varyings, GLenum bufferMode)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[933];
+ ((void (APIENTRY *)(GLuint program, GLsizei count, const char **varyings, GLenum bufferMode)) _func)(program, count, varyings, bufferMode);
+}
+
+void APIENTRY shared_dispatch_stub_934(GLenum mode)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[934];
+ ((void (APIENTRY *)(GLenum mode)) _func)(mode);
+}
+
+void APIENTRY shared_dispatch_stub_935(GLenum target, GLenum pname, GLvoid **params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[935];
+ ((void (APIENTRY *)(GLenum target, GLenum pname, GLvoid **params)) _func)(target, pname, params);
+}
+
+void APIENTRY shared_dispatch_stub_936(GLenum target, GLsizei length, GLvoid *pointer)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[936];
+ ((void (APIENTRY *)(GLenum target, GLsizei length, GLvoid *pointer)) _func)(target, length, pointer);
+}
+
+void APIENTRY shared_dispatch_stub_937(GLenum objectType, GLuint name, GLenum pname, GLint *value)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[937];
+ ((void (APIENTRY *)(GLenum objectType, GLuint name, GLenum pname, GLint *value)) _func)(objectType, name, pname, value);
+}
+
+GLenum APIENTRY shared_dispatch_stub_938(GLenum objectType, GLuint name, GLenum option)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[938];
+ return ((GLenum (APIENTRY *)(GLenum objectType, GLuint name, GLenum option)) _func)(objectType, name, option);
+}
+
+GLenum APIENTRY shared_dispatch_stub_939(GLenum objectType, GLuint name, GLenum option)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[939];
+ return ((GLenum (APIENTRY *)(GLenum objectType, GLuint name, GLenum option)) _func)(objectType, name, option);
+}
+
+void APIENTRY shared_dispatch_stub_940(GLuint program)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[940];
+ ((void (APIENTRY *)(GLuint program)) _func)(program);
+}
+
+GLuint APIENTRY shared_dispatch_stub_941(GLenum type, const GLchar *string)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[941];
+ return ((GLuint (APIENTRY *)(GLenum type, const GLchar *string)) _func)(type, string);
+}
+
+void APIENTRY shared_dispatch_stub_942(GLenum type, GLuint program)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[942];
+ ((void (APIENTRY *)(GLenum type, GLuint program)) _func)(type, program);
+}
+
+void APIENTRY shared_dispatch_stub_943(void)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[943];
+ ((void (APIENTRY *)(void)) _func)();
+}
+
+void APIENTRY shared_dispatch_stub_944(GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[944];
+ ((void (APIENTRY *)(GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask)) _func)(frontfunc, backfunc, ref, mask);
+}
+
+void APIENTRY shared_dispatch_stub_945(GLenum target, GLuint index, GLsizei count, const GLfloat *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[945];
+ ((void (APIENTRY *)(GLenum target, GLuint index, GLsizei count, const GLfloat *params)) _func)(target, index, count, params);
+}
+
+void APIENTRY shared_dispatch_stub_946(GLenum target, GLuint index, GLsizei count, const GLfloat *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[946];
+ ((void (APIENTRY *)(GLenum target, GLuint index, GLsizei count, const GLfloat *params)) _func)(target, index, count, params);
+}
+
+void APIENTRY shared_dispatch_stub_947(GLuint id, GLenum pname, GLint64EXT *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[947];
+ ((void (APIENTRY *)(GLuint id, GLenum pname, GLint64EXT *params)) _func)(id, pname, params);
+}
+
+void APIENTRY shared_dispatch_stub_948(GLuint id, GLenum pname, GLuint64EXT *params)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[948];
+ ((void (APIENTRY *)(GLuint id, GLenum pname, GLuint64EXT *params)) _func)(id, pname, params);
+}
+
+void APIENTRY shared_dispatch_stub_949(GLenum target, GLvoid *writeOffset)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[949];
+ ((void (APIENTRY *)(GLenum target, GLvoid *writeOffset)) _func)(target, writeOffset);
+}
+
+void APIENTRY shared_dispatch_stub_950(GLenum target, GLvoid *writeOffset)
+{
+ const struct mapi_table *_tbl = entry_current_get();
+ mapi_func _func = ((const mapi_func *) _tbl)[950];
+ ((void (APIENTRY *)(GLenum target, GLvoid *writeOffset)) _func)(target, writeOffset);
+}
+
+static const mapi_func public_entries[] = {
+ (mapi_func) shared_dispatch_stub_0,
+ (mapi_func) shared_dispatch_stub_1,
+ (mapi_func) shared_dispatch_stub_2,
+ (mapi_func) shared_dispatch_stub_3,
+ (mapi_func) shared_dispatch_stub_4,
+ (mapi_func) shared_dispatch_stub_5,
+ (mapi_func) shared_dispatch_stub_6,
+ (mapi_func) shared_dispatch_stub_7,
+ (mapi_func) shared_dispatch_stub_8,
+ (mapi_func) shared_dispatch_stub_9,
+ (mapi_func) shared_dispatch_stub_10,
+ (mapi_func) shared_dispatch_stub_11,
+ (mapi_func) shared_dispatch_stub_12,
+ (mapi_func) shared_dispatch_stub_13,
+ (mapi_func) shared_dispatch_stub_14,
+ (mapi_func) shared_dispatch_stub_15,
+ (mapi_func) shared_dispatch_stub_16,
+ (mapi_func) shared_dispatch_stub_17,
+ (mapi_func) shared_dispatch_stub_18,
+ (mapi_func) shared_dispatch_stub_19,
+ (mapi_func) shared_dispatch_stub_20,
+ (mapi_func) shared_dispatch_stub_21,
+ (mapi_func) shared_dispatch_stub_22,
+ (mapi_func) shared_dispatch_stub_23,
+ (mapi_func) shared_dispatch_stub_24,
+ (mapi_func) shared_dispatch_stub_25,
+ (mapi_func) shared_dispatch_stub_26,
+ (mapi_func) shared_dispatch_stub_27,
+ (mapi_func) shared_dispatch_stub_28,
+ (mapi_func) shared_dispatch_stub_29,
+ (mapi_func) shared_dispatch_stub_30,
+ (mapi_func) shared_dispatch_stub_31,
+ (mapi_func) shared_dispatch_stub_32,
+ (mapi_func) shared_dispatch_stub_33,
+ (mapi_func) shared_dispatch_stub_34,
+ (mapi_func) shared_dispatch_stub_35,
+ (mapi_func) shared_dispatch_stub_36,
+ (mapi_func) shared_dispatch_stub_37,
+ (mapi_func) shared_dispatch_stub_38,
+ (mapi_func) shared_dispatch_stub_39,
+ (mapi_func) shared_dispatch_stub_40,
+ (mapi_func) shared_dispatch_stub_41,
+ (mapi_func) shared_dispatch_stub_42,
+ (mapi_func) shared_dispatch_stub_43,
+ (mapi_func) shared_dispatch_stub_44,
+ (mapi_func) shared_dispatch_stub_45,
+ (mapi_func) shared_dispatch_stub_46,
+ (mapi_func) shared_dispatch_stub_47,
+ (mapi_func) shared_dispatch_stub_48,
+ (mapi_func) shared_dispatch_stub_49,
+ (mapi_func) shared_dispatch_stub_50,
+ (mapi_func) shared_dispatch_stub_51,
+ (mapi_func) shared_dispatch_stub_52,
+ (mapi_func) shared_dispatch_stub_53,
+ (mapi_func) shared_dispatch_stub_54,
+ (mapi_func) shared_dispatch_stub_55,
+ (mapi_func) shared_dispatch_stub_56,
+ (mapi_func) shared_dispatch_stub_57,
+ (mapi_func) shared_dispatch_stub_58,
+ (mapi_func) shared_dispatch_stub_59,
+ (mapi_func) shared_dispatch_stub_60,
+ (mapi_func) shared_dispatch_stub_61,
+ (mapi_func) shared_dispatch_stub_62,
+ (mapi_func) shared_dispatch_stub_63,
+ (mapi_func) shared_dispatch_stub_64,
+ (mapi_func) shared_dispatch_stub_65,
+ (mapi_func) shared_dispatch_stub_66,
+ (mapi_func) shared_dispatch_stub_67,
+ (mapi_func) shared_dispatch_stub_68,
+ (mapi_func) shared_dispatch_stub_69,
+ (mapi_func) shared_dispatch_stub_70,
+ (mapi_func) shared_dispatch_stub_71,
+ (mapi_func) shared_dispatch_stub_72,
+ (mapi_func) shared_dispatch_stub_73,
+ (mapi_func) shared_dispatch_stub_74,
+ (mapi_func) shared_dispatch_stub_75,
+ (mapi_func) shared_dispatch_stub_76,
+ (mapi_func) shared_dispatch_stub_77,
+ (mapi_func) shared_dispatch_stub_78,
+ (mapi_func) shared_dispatch_stub_79,
+ (mapi_func) shared_dispatch_stub_80,
+ (mapi_func) shared_dispatch_stub_81,
+ (mapi_func) shared_dispatch_stub_82,
+ (mapi_func) shared_dispatch_stub_83,
+ (mapi_func) shared_dispatch_stub_84,
+ (mapi_func) shared_dispatch_stub_85,
+ (mapi_func) shared_dispatch_stub_86,
+ (mapi_func) shared_dispatch_stub_87,
+ (mapi_func) shared_dispatch_stub_88,
+ (mapi_func) shared_dispatch_stub_89,
+ (mapi_func) shared_dispatch_stub_90,
+ (mapi_func) shared_dispatch_stub_91,
+ (mapi_func) shared_dispatch_stub_92,
+ (mapi_func) shared_dispatch_stub_93,
+ (mapi_func) shared_dispatch_stub_94,
+ (mapi_func) shared_dispatch_stub_95,
+ (mapi_func) shared_dispatch_stub_96,
+ (mapi_func) shared_dispatch_stub_97,
+ (mapi_func) shared_dispatch_stub_98,
+ (mapi_func) shared_dispatch_stub_99,
+ (mapi_func) shared_dispatch_stub_100,
+ (mapi_func) shared_dispatch_stub_101,
+ (mapi_func) shared_dispatch_stub_102,
+ (mapi_func) shared_dispatch_stub_103,
+ (mapi_func) shared_dispatch_stub_104,
+ (mapi_func) shared_dispatch_stub_105,
+ (mapi_func) shared_dispatch_stub_106,
+ (mapi_func) shared_dispatch_stub_107,
+ (mapi_func) shared_dispatch_stub_108,
+ (mapi_func) shared_dispatch_stub_109,
+ (mapi_func) shared_dispatch_stub_110,
+ (mapi_func) shared_dispatch_stub_111,
+ (mapi_func) shared_dispatch_stub_112,
+ (mapi_func) shared_dispatch_stub_113,
+ (mapi_func) shared_dispatch_stub_114,
+ (mapi_func) shared_dispatch_stub_115,
+ (mapi_func) shared_dispatch_stub_116,
+ (mapi_func) shared_dispatch_stub_117,
+ (mapi_func) shared_dispatch_stub_118,
+ (mapi_func) shared_dispatch_stub_119,
+ (mapi_func) shared_dispatch_stub_120,
+ (mapi_func) shared_dispatch_stub_121,
+ (mapi_func) shared_dispatch_stub_122,
+ (mapi_func) shared_dispatch_stub_123,
+ (mapi_func) shared_dispatch_stub_124,
+ (mapi_func) shared_dispatch_stub_125,
+ (mapi_func) shared_dispatch_stub_126,
+ (mapi_func) shared_dispatch_stub_127,
+ (mapi_func) shared_dispatch_stub_128,
+ (mapi_func) shared_dispatch_stub_129,
+ (mapi_func) shared_dispatch_stub_130,
+ (mapi_func) shared_dispatch_stub_131,
+ (mapi_func) shared_dispatch_stub_132,
+ (mapi_func) shared_dispatch_stub_133,
+ (mapi_func) shared_dispatch_stub_134,
+ (mapi_func) shared_dispatch_stub_135,
+ (mapi_func) shared_dispatch_stub_136,
+ (mapi_func) shared_dispatch_stub_137,
+ (mapi_func) shared_dispatch_stub_138,
+ (mapi_func) shared_dispatch_stub_139,
+ (mapi_func) shared_dispatch_stub_140,
+ (mapi_func) shared_dispatch_stub_141,
+ (mapi_func) shared_dispatch_stub_142,
+ (mapi_func) shared_dispatch_stub_143,
+ (mapi_func) shared_dispatch_stub_144,
+ (mapi_func) shared_dispatch_stub_145,
+ (mapi_func) shared_dispatch_stub_146,
+ (mapi_func) shared_dispatch_stub_147,
+ (mapi_func) shared_dispatch_stub_148,
+ (mapi_func) shared_dispatch_stub_149,
+ (mapi_func) shared_dispatch_stub_150,
+ (mapi_func) shared_dispatch_stub_151,
+ (mapi_func) shared_dispatch_stub_152,
+ (mapi_func) shared_dispatch_stub_153,
+ (mapi_func) shared_dispatch_stub_154,
+ (mapi_func) shared_dispatch_stub_155,
+ (mapi_func) shared_dispatch_stub_156,
+ (mapi_func) shared_dispatch_stub_157,
+ (mapi_func) shared_dispatch_stub_158,
+ (mapi_func) shared_dispatch_stub_159,
+ (mapi_func) shared_dispatch_stub_160,
+ (mapi_func) shared_dispatch_stub_161,
+ (mapi_func) shared_dispatch_stub_162,
+ (mapi_func) shared_dispatch_stub_163,
+ (mapi_func) shared_dispatch_stub_164,
+ (mapi_func) shared_dispatch_stub_165,
+ (mapi_func) shared_dispatch_stub_166,
+ (mapi_func) shared_dispatch_stub_167,
+ (mapi_func) shared_dispatch_stub_168,
+ (mapi_func) shared_dispatch_stub_169,
+ (mapi_func) shared_dispatch_stub_170,
+ (mapi_func) shared_dispatch_stub_171,
+ (mapi_func) shared_dispatch_stub_172,
+ (mapi_func) shared_dispatch_stub_173,
+ (mapi_func) shared_dispatch_stub_174,
+ (mapi_func) shared_dispatch_stub_175,
+ (mapi_func) shared_dispatch_stub_176,
+ (mapi_func) shared_dispatch_stub_177,
+ (mapi_func) shared_dispatch_stub_178,
+ (mapi_func) shared_dispatch_stub_179,
+ (mapi_func) shared_dispatch_stub_180,
+ (mapi_func) shared_dispatch_stub_181,
+ (mapi_func) shared_dispatch_stub_182,
+ (mapi_func) shared_dispatch_stub_183,
+ (mapi_func) shared_dispatch_stub_184,
+ (mapi_func) shared_dispatch_stub_185,
+ (mapi_func) shared_dispatch_stub_186,
+ (mapi_func) shared_dispatch_stub_187,
+ (mapi_func) shared_dispatch_stub_188,
+ (mapi_func) shared_dispatch_stub_189,
+ (mapi_func) shared_dispatch_stub_190,
+ (mapi_func) shared_dispatch_stub_191,
+ (mapi_func) shared_dispatch_stub_192,
+ (mapi_func) shared_dispatch_stub_193,
+ (mapi_func) shared_dispatch_stub_194,
+ (mapi_func) shared_dispatch_stub_195,
+ (mapi_func) shared_dispatch_stub_196,
+ (mapi_func) shared_dispatch_stub_197,
+ (mapi_func) shared_dispatch_stub_198,
+ (mapi_func) shared_dispatch_stub_199,
+ (mapi_func) shared_dispatch_stub_200,
+ (mapi_func) shared_dispatch_stub_201,
+ (mapi_func) shared_dispatch_stub_202,
+ (mapi_func) shared_dispatch_stub_203,
+ (mapi_func) shared_dispatch_stub_204,
+ (mapi_func) shared_dispatch_stub_205,
+ (mapi_func) shared_dispatch_stub_206,
+ (mapi_func) shared_dispatch_stub_207,
+ (mapi_func) shared_dispatch_stub_208,
+ (mapi_func) shared_dispatch_stub_209,
+ (mapi_func) shared_dispatch_stub_210,
+ (mapi_func) shared_dispatch_stub_211,
+ (mapi_func) shared_dispatch_stub_212,
+ (mapi_func) shared_dispatch_stub_213,
+ (mapi_func) shared_dispatch_stub_214,
+ (mapi_func) shared_dispatch_stub_215,
+ (mapi_func) shared_dispatch_stub_216,
+ (mapi_func) shared_dispatch_stub_217,
+ (mapi_func) shared_dispatch_stub_218,
+ (mapi_func) shared_dispatch_stub_219,
+ (mapi_func) shared_dispatch_stub_220,
+ (mapi_func) shared_dispatch_stub_221,
+ (mapi_func) shared_dispatch_stub_222,
+ (mapi_func) shared_dispatch_stub_223,
+ (mapi_func) shared_dispatch_stub_224,
+ (mapi_func) shared_dispatch_stub_225,
+ (mapi_func) shared_dispatch_stub_226,
+ (mapi_func) shared_dispatch_stub_227,
+ (mapi_func) shared_dispatch_stub_228,
+ (mapi_func) shared_dispatch_stub_229,
+ (mapi_func) shared_dispatch_stub_230,
+ (mapi_func) shared_dispatch_stub_231,
+ (mapi_func) shared_dispatch_stub_232,
+ (mapi_func) shared_dispatch_stub_233,
+ (mapi_func) shared_dispatch_stub_234,
+ (mapi_func) shared_dispatch_stub_235,
+ (mapi_func) shared_dispatch_stub_236,
+ (mapi_func) shared_dispatch_stub_237,
+ (mapi_func) shared_dispatch_stub_238,
+ (mapi_func) shared_dispatch_stub_239,
+ (mapi_func) shared_dispatch_stub_240,
+ (mapi_func) shared_dispatch_stub_241,
+ (mapi_func) shared_dispatch_stub_242,
+ (mapi_func) shared_dispatch_stub_243,
+ (mapi_func) shared_dispatch_stub_244,
+ (mapi_func) shared_dispatch_stub_245,
+ (mapi_func) shared_dispatch_stub_246,
+ (mapi_func) shared_dispatch_stub_247,
+ (mapi_func) shared_dispatch_stub_248,
+ (mapi_func) shared_dispatch_stub_249,
+ (mapi_func) shared_dispatch_stub_250,
+ (mapi_func) shared_dispatch_stub_251,
+ (mapi_func) shared_dispatch_stub_252,
+ (mapi_func) shared_dispatch_stub_253,
+ (mapi_func) shared_dispatch_stub_254,
+ (mapi_func) shared_dispatch_stub_255,
+ (mapi_func) shared_dispatch_stub_256,
+ (mapi_func) shared_dispatch_stub_257,
+ (mapi_func) shared_dispatch_stub_258,
+ (mapi_func) shared_dispatch_stub_259,
+ (mapi_func) shared_dispatch_stub_260,
+ (mapi_func) shared_dispatch_stub_261,
+ (mapi_func) shared_dispatch_stub_262,
+ (mapi_func) shared_dispatch_stub_263,
+ (mapi_func) shared_dispatch_stub_264,
+ (mapi_func) shared_dispatch_stub_265,
+ (mapi_func) shared_dispatch_stub_266,
+ (mapi_func) shared_dispatch_stub_267,
+ (mapi_func) shared_dispatch_stub_268,
+ (mapi_func) shared_dispatch_stub_269,
+ (mapi_func) shared_dispatch_stub_270,
+ (mapi_func) shared_dispatch_stub_271,
+ (mapi_func) shared_dispatch_stub_272,
+ (mapi_func) shared_dispatch_stub_273,
+ (mapi_func) shared_dispatch_stub_274,
+ (mapi_func) shared_dispatch_stub_275,
+ (mapi_func) shared_dispatch_stub_276,
+ (mapi_func) shared_dispatch_stub_277,
+ (mapi_func) shared_dispatch_stub_278,
+ (mapi_func) shared_dispatch_stub_279,
+ (mapi_func) shared_dispatch_stub_280,
+ (mapi_func) shared_dispatch_stub_281,
+ (mapi_func) shared_dispatch_stub_282,
+ (mapi_func) shared_dispatch_stub_283,
+ (mapi_func) shared_dispatch_stub_284,
+ (mapi_func) shared_dispatch_stub_285,
+ (mapi_func) shared_dispatch_stub_286,
+ (mapi_func) shared_dispatch_stub_287,
+ (mapi_func) shared_dispatch_stub_288,
+ (mapi_func) shared_dispatch_stub_289,
+ (mapi_func) shared_dispatch_stub_290,
+ (mapi_func) shared_dispatch_stub_291,
+ (mapi_func) shared_dispatch_stub_292,
+ (mapi_func) shared_dispatch_stub_293,
+ (mapi_func) shared_dispatch_stub_294,
+ (mapi_func) shared_dispatch_stub_295,
+ (mapi_func) shared_dispatch_stub_296,
+ (mapi_func) shared_dispatch_stub_297,
+ (mapi_func) shared_dispatch_stub_298,
+ (mapi_func) shared_dispatch_stub_299,
+ (mapi_func) shared_dispatch_stub_300,
+ (mapi_func) shared_dispatch_stub_301,
+ (mapi_func) shared_dispatch_stub_302,
+ (mapi_func) shared_dispatch_stub_303,
+ (mapi_func) shared_dispatch_stub_304,
+ (mapi_func) shared_dispatch_stub_305,
+ (mapi_func) shared_dispatch_stub_306,
+ (mapi_func) shared_dispatch_stub_307,
+ (mapi_func) shared_dispatch_stub_308,
+ (mapi_func) shared_dispatch_stub_309,
+ (mapi_func) shared_dispatch_stub_310,
+ (mapi_func) shared_dispatch_stub_311,
+ (mapi_func) shared_dispatch_stub_312,
+ (mapi_func) shared_dispatch_stub_313,
+ (mapi_func) shared_dispatch_stub_314,
+ (mapi_func) shared_dispatch_stub_315,
+ (mapi_func) shared_dispatch_stub_316,
+ (mapi_func) shared_dispatch_stub_317,
+ (mapi_func) shared_dispatch_stub_318,
+ (mapi_func) shared_dispatch_stub_319,
+ (mapi_func) shared_dispatch_stub_320,
+ (mapi_func) shared_dispatch_stub_321,
+ (mapi_func) shared_dispatch_stub_322,
+ (mapi_func) shared_dispatch_stub_323,
+ (mapi_func) shared_dispatch_stub_324,
+ (mapi_func) shared_dispatch_stub_325,
+ (mapi_func) shared_dispatch_stub_326,
+ (mapi_func) shared_dispatch_stub_327,
+ (mapi_func) shared_dispatch_stub_328,
+ (mapi_func) shared_dispatch_stub_329,
+ (mapi_func) shared_dispatch_stub_330,
+ (mapi_func) shared_dispatch_stub_331,
+ (mapi_func) shared_dispatch_stub_332,
+ (mapi_func) shared_dispatch_stub_333,
+ (mapi_func) shared_dispatch_stub_334,
+ (mapi_func) shared_dispatch_stub_335,
+ (mapi_func) shared_dispatch_stub_336,
+ (mapi_func) shared_dispatch_stub_337,
+ (mapi_func) shared_dispatch_stub_338,
+ (mapi_func) shared_dispatch_stub_339,
+ (mapi_func) shared_dispatch_stub_340,
+ (mapi_func) shared_dispatch_stub_341,
+ (mapi_func) shared_dispatch_stub_342,
+ (mapi_func) shared_dispatch_stub_343,
+ (mapi_func) shared_dispatch_stub_344,
+ (mapi_func) shared_dispatch_stub_345,
+ (mapi_func) shared_dispatch_stub_346,
+ (mapi_func) shared_dispatch_stub_347,
+ (mapi_func) shared_dispatch_stub_348,
+ (mapi_func) shared_dispatch_stub_349,
+ (mapi_func) shared_dispatch_stub_350,
+ (mapi_func) shared_dispatch_stub_351,
+ (mapi_func) shared_dispatch_stub_352,
+ (mapi_func) shared_dispatch_stub_353,
+ (mapi_func) shared_dispatch_stub_354,
+ (mapi_func) shared_dispatch_stub_355,
+ (mapi_func) shared_dispatch_stub_356,
+ (mapi_func) shared_dispatch_stub_357,
+ (mapi_func) shared_dispatch_stub_358,
+ (mapi_func) shared_dispatch_stub_359,
+ (mapi_func) shared_dispatch_stub_360,
+ (mapi_func) shared_dispatch_stub_361,
+ (mapi_func) shared_dispatch_stub_362,
+ (mapi_func) shared_dispatch_stub_363,
+ (mapi_func) shared_dispatch_stub_364,
+ (mapi_func) shared_dispatch_stub_365,
+ (mapi_func) shared_dispatch_stub_366,
+ (mapi_func) shared_dispatch_stub_367,
+ (mapi_func) shared_dispatch_stub_368,
+ (mapi_func) shared_dispatch_stub_369,
+ (mapi_func) shared_dispatch_stub_370,
+ (mapi_func) shared_dispatch_stub_371,
+ (mapi_func) shared_dispatch_stub_372,
+ (mapi_func) shared_dispatch_stub_373,
+ (mapi_func) shared_dispatch_stub_374,
+ (mapi_func) shared_dispatch_stub_375,
+ (mapi_func) shared_dispatch_stub_376,
+ (mapi_func) shared_dispatch_stub_377,
+ (mapi_func) shared_dispatch_stub_378,
+ (mapi_func) shared_dispatch_stub_379,
+ (mapi_func) shared_dispatch_stub_380,
+ (mapi_func) shared_dispatch_stub_381,
+ (mapi_func) shared_dispatch_stub_382,
+ (mapi_func) shared_dispatch_stub_383,
+ (mapi_func) shared_dispatch_stub_384,
+ (mapi_func) shared_dispatch_stub_385,
+ (mapi_func) shared_dispatch_stub_386,
+ (mapi_func) shared_dispatch_stub_387,
+ (mapi_func) shared_dispatch_stub_388,
+ (mapi_func) shared_dispatch_stub_389,
+ (mapi_func) shared_dispatch_stub_390,
+ (mapi_func) shared_dispatch_stub_391,
+ (mapi_func) shared_dispatch_stub_392,
+ (mapi_func) shared_dispatch_stub_393,
+ (mapi_func) shared_dispatch_stub_394,
+ (mapi_func) shared_dispatch_stub_395,
+ (mapi_func) shared_dispatch_stub_396,
+ (mapi_func) shared_dispatch_stub_397,
+ (mapi_func) shared_dispatch_stub_398,
+ (mapi_func) shared_dispatch_stub_399,
+ (mapi_func) shared_dispatch_stub_400,
+ (mapi_func) shared_dispatch_stub_401,
+ (mapi_func) shared_dispatch_stub_402,
+ (mapi_func) shared_dispatch_stub_403,
+ (mapi_func) shared_dispatch_stub_404,
+ (mapi_func) shared_dispatch_stub_405,
+ (mapi_func) shared_dispatch_stub_406,
+ (mapi_func) shared_dispatch_stub_407,
+ (mapi_func) shared_dispatch_stub_408,
+ (mapi_func) shared_dispatch_stub_409,
+ (mapi_func) shared_dispatch_stub_410,
+ (mapi_func) shared_dispatch_stub_411,
+ (mapi_func) shared_dispatch_stub_412,
+ (mapi_func) shared_dispatch_stub_413,
+ (mapi_func) shared_dispatch_stub_414,
+ (mapi_func) shared_dispatch_stub_415,
+ (mapi_func) shared_dispatch_stub_416,
+ (mapi_func) shared_dispatch_stub_417,
+ (mapi_func) shared_dispatch_stub_418,
+ (mapi_func) shared_dispatch_stub_419,
+ (mapi_func) shared_dispatch_stub_420,
+ (mapi_func) shared_dispatch_stub_421,
+ (mapi_func) shared_dispatch_stub_422,
+ (mapi_func) shared_dispatch_stub_423,
+ (mapi_func) shared_dispatch_stub_424,
+ (mapi_func) shared_dispatch_stub_425,
+ (mapi_func) shared_dispatch_stub_426,
+ (mapi_func) shared_dispatch_stub_427,
+ (mapi_func) shared_dispatch_stub_428,
+ (mapi_func) shared_dispatch_stub_429,
+ (mapi_func) shared_dispatch_stub_430,
+ (mapi_func) shared_dispatch_stub_431,
+ (mapi_func) shared_dispatch_stub_432,
+ (mapi_func) shared_dispatch_stub_433,
+ (mapi_func) shared_dispatch_stub_434,
+ (mapi_func) shared_dispatch_stub_435,
+ (mapi_func) shared_dispatch_stub_436,
+ (mapi_func) shared_dispatch_stub_437,
+ (mapi_func) shared_dispatch_stub_438,
+ (mapi_func) shared_dispatch_stub_439,
+ (mapi_func) shared_dispatch_stub_440,
+ (mapi_func) shared_dispatch_stub_441,
+ (mapi_func) shared_dispatch_stub_442,
+ (mapi_func) shared_dispatch_stub_443,
+ (mapi_func) shared_dispatch_stub_444,
+ (mapi_func) shared_dispatch_stub_445,
+ (mapi_func) shared_dispatch_stub_446,
+ (mapi_func) shared_dispatch_stub_447,
+ (mapi_func) shared_dispatch_stub_448,
+ (mapi_func) shared_dispatch_stub_449,
+ (mapi_func) shared_dispatch_stub_450,
+ (mapi_func) shared_dispatch_stub_451,
+ (mapi_func) shared_dispatch_stub_452,
+ (mapi_func) shared_dispatch_stub_453,
+ (mapi_func) shared_dispatch_stub_454,
+ (mapi_func) shared_dispatch_stub_455,
+ (mapi_func) shared_dispatch_stub_456,
+ (mapi_func) shared_dispatch_stub_457,
+ (mapi_func) shared_dispatch_stub_458,
+ (mapi_func) shared_dispatch_stub_459,
+ (mapi_func) shared_dispatch_stub_460,
+ (mapi_func) shared_dispatch_stub_461,
+ (mapi_func) shared_dispatch_stub_462,
+ (mapi_func) shared_dispatch_stub_463,
+ (mapi_func) shared_dispatch_stub_464,
+ (mapi_func) shared_dispatch_stub_465,
+ (mapi_func) shared_dispatch_stub_466,
+ (mapi_func) shared_dispatch_stub_467,
+ (mapi_func) shared_dispatch_stub_468,
+ (mapi_func) shared_dispatch_stub_469,
+ (mapi_func) shared_dispatch_stub_470,
+ (mapi_func) shared_dispatch_stub_471,
+ (mapi_func) shared_dispatch_stub_472,
+ (mapi_func) shared_dispatch_stub_473,
+ (mapi_func) shared_dispatch_stub_474,
+ (mapi_func) shared_dispatch_stub_475,
+ (mapi_func) shared_dispatch_stub_476,
+ (mapi_func) shared_dispatch_stub_477,
+ (mapi_func) shared_dispatch_stub_478,
+ (mapi_func) shared_dispatch_stub_479,
+ (mapi_func) shared_dispatch_stub_480,
+ (mapi_func) shared_dispatch_stub_481,
+ (mapi_func) shared_dispatch_stub_482,
+ (mapi_func) shared_dispatch_stub_483,
+ (mapi_func) shared_dispatch_stub_484,
+ (mapi_func) shared_dispatch_stub_485,
+ (mapi_func) shared_dispatch_stub_486,
+ (mapi_func) shared_dispatch_stub_487,
+ (mapi_func) shared_dispatch_stub_488,
+ (mapi_func) shared_dispatch_stub_489,
+ (mapi_func) shared_dispatch_stub_490,
+ (mapi_func) shared_dispatch_stub_491,
+ (mapi_func) shared_dispatch_stub_492,
+ (mapi_func) shared_dispatch_stub_493,
+ (mapi_func) shared_dispatch_stub_494,
+ (mapi_func) shared_dispatch_stub_495,
+ (mapi_func) shared_dispatch_stub_496,
+ (mapi_func) shared_dispatch_stub_497,
+ (mapi_func) shared_dispatch_stub_498,
+ (mapi_func) shared_dispatch_stub_499,
+ (mapi_func) shared_dispatch_stub_500,
+ (mapi_func) shared_dispatch_stub_501,
+ (mapi_func) shared_dispatch_stub_502,
+ (mapi_func) shared_dispatch_stub_503,
+ (mapi_func) shared_dispatch_stub_504,
+ (mapi_func) shared_dispatch_stub_505,
+ (mapi_func) shared_dispatch_stub_506,
+ (mapi_func) shared_dispatch_stub_507,
+ (mapi_func) shared_dispatch_stub_508,
+ (mapi_func) shared_dispatch_stub_509,
+ (mapi_func) shared_dispatch_stub_510,
+ (mapi_func) shared_dispatch_stub_511,
+ (mapi_func) shared_dispatch_stub_512,
+ (mapi_func) shared_dispatch_stub_513,
+ (mapi_func) shared_dispatch_stub_514,
+ (mapi_func) shared_dispatch_stub_515,
+ (mapi_func) shared_dispatch_stub_516,
+ (mapi_func) shared_dispatch_stub_517,
+ (mapi_func) shared_dispatch_stub_518,
+ (mapi_func) shared_dispatch_stub_519,
+ (mapi_func) shared_dispatch_stub_520,
+ (mapi_func) shared_dispatch_stub_521,
+ (mapi_func) shared_dispatch_stub_522,
+ (mapi_func) shared_dispatch_stub_523,
+ (mapi_func) shared_dispatch_stub_524,
+ (mapi_func) shared_dispatch_stub_525,
+ (mapi_func) shared_dispatch_stub_526,
+ (mapi_func) shared_dispatch_stub_527,
+ (mapi_func) shared_dispatch_stub_528,
+ (mapi_func) shared_dispatch_stub_529,
+ (mapi_func) shared_dispatch_stub_530,
+ (mapi_func) shared_dispatch_stub_531,
+ (mapi_func) shared_dispatch_stub_532,
+ (mapi_func) shared_dispatch_stub_533,
+ (mapi_func) shared_dispatch_stub_534,
+ (mapi_func) shared_dispatch_stub_535,
+ (mapi_func) shared_dispatch_stub_536,
+ (mapi_func) shared_dispatch_stub_537,
+ (mapi_func) shared_dispatch_stub_538,
+ (mapi_func) shared_dispatch_stub_539,
+ (mapi_func) shared_dispatch_stub_540,
+ (mapi_func) shared_dispatch_stub_541,
+ (mapi_func) shared_dispatch_stub_542,
+ (mapi_func) shared_dispatch_stub_543,
+ (mapi_func) shared_dispatch_stub_544,
+ (mapi_func) shared_dispatch_stub_545,
+ (mapi_func) shared_dispatch_stub_546,
+ (mapi_func) shared_dispatch_stub_547,
+ (mapi_func) shared_dispatch_stub_548,
+ (mapi_func) shared_dispatch_stub_549,
+ (mapi_func) shared_dispatch_stub_550,
+ (mapi_func) shared_dispatch_stub_551,
+ (mapi_func) shared_dispatch_stub_552,
+ (mapi_func) shared_dispatch_stub_553,
+ (mapi_func) shared_dispatch_stub_554,
+ (mapi_func) shared_dispatch_stub_555,
+ (mapi_func) shared_dispatch_stub_556,
+ (mapi_func) shared_dispatch_stub_557,
+ (mapi_func) shared_dispatch_stub_558,
+ (mapi_func) shared_dispatch_stub_559,
+ (mapi_func) shared_dispatch_stub_560,
+ (mapi_func) shared_dispatch_stub_561,
+ (mapi_func) shared_dispatch_stub_562,
+ (mapi_func) shared_dispatch_stub_563,
+ (mapi_func) shared_dispatch_stub_564,
+ (mapi_func) shared_dispatch_stub_565,
+ (mapi_func) shared_dispatch_stub_566,
+ (mapi_func) shared_dispatch_stub_567,
+ (mapi_func) shared_dispatch_stub_568,
+ (mapi_func) shared_dispatch_stub_569,
+ (mapi_func) shared_dispatch_stub_570,
+ (mapi_func) shared_dispatch_stub_571,
+ (mapi_func) shared_dispatch_stub_572,
+ (mapi_func) shared_dispatch_stub_573,
+ (mapi_func) shared_dispatch_stub_574,
+ (mapi_func) shared_dispatch_stub_575,
+ (mapi_func) shared_dispatch_stub_576,
+ (mapi_func) shared_dispatch_stub_577,
+ (mapi_func) shared_dispatch_stub_578,
+ (mapi_func) shared_dispatch_stub_579,
+ (mapi_func) shared_dispatch_stub_580,
+ (mapi_func) shared_dispatch_stub_581,
+ (mapi_func) shared_dispatch_stub_582,
+ (mapi_func) shared_dispatch_stub_583,
+ (mapi_func) shared_dispatch_stub_584,
+ (mapi_func) shared_dispatch_stub_585,
+ (mapi_func) shared_dispatch_stub_586,
+ (mapi_func) shared_dispatch_stub_587,
+ (mapi_func) shared_dispatch_stub_588,
+ (mapi_func) shared_dispatch_stub_589,
+ (mapi_func) shared_dispatch_stub_590,
+ (mapi_func) shared_dispatch_stub_591,
+ (mapi_func) shared_dispatch_stub_592,
+ (mapi_func) shared_dispatch_stub_593,
+ (mapi_func) shared_dispatch_stub_594,
+ (mapi_func) shared_dispatch_stub_595,
+ (mapi_func) shared_dispatch_stub_596,
+ (mapi_func) shared_dispatch_stub_597,
+ (mapi_func) shared_dispatch_stub_598,
+ (mapi_func) shared_dispatch_stub_599,
+ (mapi_func) shared_dispatch_stub_600,
+ (mapi_func) shared_dispatch_stub_601,
+ (mapi_func) shared_dispatch_stub_602,
+ (mapi_func) shared_dispatch_stub_603,
+ (mapi_func) shared_dispatch_stub_604,
+ (mapi_func) shared_dispatch_stub_605,
+ (mapi_func) shared_dispatch_stub_606,
+ (mapi_func) shared_dispatch_stub_607,
+ (mapi_func) shared_dispatch_stub_608,
+ (mapi_func) shared_dispatch_stub_609,
+ (mapi_func) shared_dispatch_stub_610,
+ (mapi_func) shared_dispatch_stub_611,
+ (mapi_func) shared_dispatch_stub_612,
+ (mapi_func) shared_dispatch_stub_613,
+ (mapi_func) shared_dispatch_stub_614,
+ (mapi_func) shared_dispatch_stub_615,
+ (mapi_func) shared_dispatch_stub_616,
+ (mapi_func) shared_dispatch_stub_617,
+ (mapi_func) shared_dispatch_stub_618,
+ (mapi_func) shared_dispatch_stub_619,
+ (mapi_func) shared_dispatch_stub_620,
+ (mapi_func) shared_dispatch_stub_621,
+ (mapi_func) shared_dispatch_stub_622,
+ (mapi_func) shared_dispatch_stub_623,
+ (mapi_func) shared_dispatch_stub_624,
+ (mapi_func) shared_dispatch_stub_625,
+ (mapi_func) shared_dispatch_stub_626,
+ (mapi_func) shared_dispatch_stub_627,
+ (mapi_func) shared_dispatch_stub_628,
+ (mapi_func) shared_dispatch_stub_629,
+ (mapi_func) shared_dispatch_stub_630,
+ (mapi_func) shared_dispatch_stub_631,
+ (mapi_func) shared_dispatch_stub_632,
+ (mapi_func) shared_dispatch_stub_633,
+ (mapi_func) shared_dispatch_stub_634,
+ (mapi_func) shared_dispatch_stub_635,
+ (mapi_func) shared_dispatch_stub_636,
+ (mapi_func) shared_dispatch_stub_637,
+ (mapi_func) shared_dispatch_stub_638,
+ (mapi_func) shared_dispatch_stub_639,
+ (mapi_func) shared_dispatch_stub_640,
+ (mapi_func) shared_dispatch_stub_641,
+ (mapi_func) shared_dispatch_stub_642,
+ (mapi_func) shared_dispatch_stub_643,
+ (mapi_func) shared_dispatch_stub_644,
+ (mapi_func) shared_dispatch_stub_645,
+ (mapi_func) shared_dispatch_stub_646,
+ (mapi_func) shared_dispatch_stub_647,
+ (mapi_func) shared_dispatch_stub_648,
+ (mapi_func) shared_dispatch_stub_649,
+ (mapi_func) shared_dispatch_stub_650,
+ (mapi_func) shared_dispatch_stub_651,
+ (mapi_func) shared_dispatch_stub_652,
+ (mapi_func) shared_dispatch_stub_653,
+ (mapi_func) shared_dispatch_stub_654,
+ (mapi_func) shared_dispatch_stub_655,
+ (mapi_func) shared_dispatch_stub_656,
+ (mapi_func) shared_dispatch_stub_657,
+ (mapi_func) shared_dispatch_stub_658,
+ (mapi_func) shared_dispatch_stub_659,
+ (mapi_func) shared_dispatch_stub_660,
+ (mapi_func) shared_dispatch_stub_661,
+ (mapi_func) shared_dispatch_stub_662,
+ (mapi_func) shared_dispatch_stub_663,
+ (mapi_func) shared_dispatch_stub_664,
+ (mapi_func) shared_dispatch_stub_665,
+ (mapi_func) shared_dispatch_stub_666,
+ (mapi_func) shared_dispatch_stub_667,
+ (mapi_func) shared_dispatch_stub_668,
+ (mapi_func) shared_dispatch_stub_669,
+ (mapi_func) shared_dispatch_stub_670,
+ (mapi_func) shared_dispatch_stub_671,
+ (mapi_func) shared_dispatch_stub_672,
+ (mapi_func) shared_dispatch_stub_673,
+ (mapi_func) shared_dispatch_stub_674,
+ (mapi_func) shared_dispatch_stub_675,
+ (mapi_func) shared_dispatch_stub_676,
+ (mapi_func) shared_dispatch_stub_677,
+ (mapi_func) shared_dispatch_stub_678,
+ (mapi_func) shared_dispatch_stub_679,
+ (mapi_func) shared_dispatch_stub_680,
+ (mapi_func) shared_dispatch_stub_681,
+ (mapi_func) shared_dispatch_stub_682,
+ (mapi_func) shared_dispatch_stub_683,
+ (mapi_func) shared_dispatch_stub_684,
+ (mapi_func) shared_dispatch_stub_685,
+ (mapi_func) shared_dispatch_stub_686,
+ (mapi_func) shared_dispatch_stub_687,
+ (mapi_func) shared_dispatch_stub_688,
+ (mapi_func) shared_dispatch_stub_689,
+ (mapi_func) shared_dispatch_stub_690,
+ (mapi_func) shared_dispatch_stub_691,
+ (mapi_func) shared_dispatch_stub_692,
+ (mapi_func) shared_dispatch_stub_693,
+ (mapi_func) shared_dispatch_stub_694,
+ (mapi_func) shared_dispatch_stub_695,
+ (mapi_func) shared_dispatch_stub_696,
+ (mapi_func) shared_dispatch_stub_697,
+ (mapi_func) shared_dispatch_stub_698,
+ (mapi_func) shared_dispatch_stub_699,
+ (mapi_func) shared_dispatch_stub_700,
+ (mapi_func) shared_dispatch_stub_701,
+ (mapi_func) shared_dispatch_stub_702,
+ (mapi_func) shared_dispatch_stub_703,
+ (mapi_func) shared_dispatch_stub_704,
+ (mapi_func) shared_dispatch_stub_705,
+ (mapi_func) shared_dispatch_stub_706,
+ (mapi_func) shared_dispatch_stub_707,
+ (mapi_func) shared_dispatch_stub_708,
+ (mapi_func) shared_dispatch_stub_709,
+ (mapi_func) shared_dispatch_stub_710,
+ (mapi_func) shared_dispatch_stub_711,
+ (mapi_func) shared_dispatch_stub_712,
+ (mapi_func) shared_dispatch_stub_713,
+ (mapi_func) shared_dispatch_stub_714,
+ (mapi_func) shared_dispatch_stub_715,
+ (mapi_func) shared_dispatch_stub_716,
+ (mapi_func) shared_dispatch_stub_717,
+ (mapi_func) shared_dispatch_stub_718,
+ (mapi_func) shared_dispatch_stub_719,
+ (mapi_func) shared_dispatch_stub_720,
+ (mapi_func) shared_dispatch_stub_721,
+ (mapi_func) shared_dispatch_stub_722,
+ (mapi_func) shared_dispatch_stub_723,
+ (mapi_func) shared_dispatch_stub_724,
+ (mapi_func) shared_dispatch_stub_725,
+ (mapi_func) shared_dispatch_stub_726,
+ (mapi_func) shared_dispatch_stub_727,
+ (mapi_func) shared_dispatch_stub_728,
+ (mapi_func) shared_dispatch_stub_729,
+ (mapi_func) shared_dispatch_stub_730,
+ (mapi_func) shared_dispatch_stub_731,
+ (mapi_func) shared_dispatch_stub_732,
+ (mapi_func) shared_dispatch_stub_733,
+ (mapi_func) shared_dispatch_stub_734,
+ (mapi_func) shared_dispatch_stub_735,
+ (mapi_func) shared_dispatch_stub_736,
+ (mapi_func) shared_dispatch_stub_737,
+ (mapi_func) shared_dispatch_stub_738,
+ (mapi_func) shared_dispatch_stub_739,
+ (mapi_func) shared_dispatch_stub_740,
+ (mapi_func) shared_dispatch_stub_741,
+ (mapi_func) shared_dispatch_stub_742,
+ (mapi_func) shared_dispatch_stub_743,
+ (mapi_func) shared_dispatch_stub_744,
+ (mapi_func) shared_dispatch_stub_745,
+ (mapi_func) shared_dispatch_stub_746,
+ (mapi_func) shared_dispatch_stub_747,
+ (mapi_func) shared_dispatch_stub_748,
+ (mapi_func) shared_dispatch_stub_749,
+ (mapi_func) shared_dispatch_stub_750,
+ (mapi_func) shared_dispatch_stub_751,
+ (mapi_func) shared_dispatch_stub_752,
+ (mapi_func) shared_dispatch_stub_753,
+ (mapi_func) shared_dispatch_stub_754,
+ (mapi_func) shared_dispatch_stub_755,
+ (mapi_func) shared_dispatch_stub_756,
+ (mapi_func) shared_dispatch_stub_757,
+ (mapi_func) shared_dispatch_stub_758,
+ (mapi_func) shared_dispatch_stub_759,
+ (mapi_func) shared_dispatch_stub_760,
+ (mapi_func) shared_dispatch_stub_761,
+ (mapi_func) shared_dispatch_stub_762,
+ (mapi_func) shared_dispatch_stub_763,
+ (mapi_func) shared_dispatch_stub_764,
+ (mapi_func) shared_dispatch_stub_765,
+ (mapi_func) shared_dispatch_stub_766,
+ (mapi_func) shared_dispatch_stub_767,
+ (mapi_func) shared_dispatch_stub_768,
+ (mapi_func) shared_dispatch_stub_769,
+ (mapi_func) shared_dispatch_stub_770,
+ (mapi_func) shared_dispatch_stub_771,
+ (mapi_func) shared_dispatch_stub_772,
+ (mapi_func) shared_dispatch_stub_773,
+ (mapi_func) shared_dispatch_stub_774,
+ (mapi_func) shared_dispatch_stub_775,
+ (mapi_func) shared_dispatch_stub_776,
+ (mapi_func) shared_dispatch_stub_777,
+ (mapi_func) shared_dispatch_stub_778,
+ (mapi_func) shared_dispatch_stub_779,
+ (mapi_func) shared_dispatch_stub_780,
+ (mapi_func) shared_dispatch_stub_781,
+ (mapi_func) shared_dispatch_stub_782,
+ (mapi_func) shared_dispatch_stub_783,
+ (mapi_func) shared_dispatch_stub_784,
+ (mapi_func) shared_dispatch_stub_785,
+ (mapi_func) shared_dispatch_stub_786,
+ (mapi_func) shared_dispatch_stub_787,
+ (mapi_func) shared_dispatch_stub_788,
+ (mapi_func) shared_dispatch_stub_789,
+ (mapi_func) shared_dispatch_stub_790,
+ (mapi_func) shared_dispatch_stub_791,
+ (mapi_func) shared_dispatch_stub_792,
+ (mapi_func) shared_dispatch_stub_793,
+ (mapi_func) shared_dispatch_stub_794,
+ (mapi_func) shared_dispatch_stub_795,
+ (mapi_func) shared_dispatch_stub_796,
+ (mapi_func) shared_dispatch_stub_797,
+ (mapi_func) shared_dispatch_stub_798,
+ (mapi_func) shared_dispatch_stub_799,
+ (mapi_func) shared_dispatch_stub_800,
+ (mapi_func) shared_dispatch_stub_801,
+ (mapi_func) shared_dispatch_stub_802,
+ (mapi_func) shared_dispatch_stub_803,
+ (mapi_func) shared_dispatch_stub_804,
+ (mapi_func) shared_dispatch_stub_805,
+ (mapi_func) shared_dispatch_stub_806,
+ (mapi_func) shared_dispatch_stub_807,
+ (mapi_func) shared_dispatch_stub_808,
+ (mapi_func) shared_dispatch_stub_809,
+ (mapi_func) shared_dispatch_stub_810,
+ (mapi_func) shared_dispatch_stub_811,
+ (mapi_func) shared_dispatch_stub_812,
+ (mapi_func) shared_dispatch_stub_813,
+ (mapi_func) shared_dispatch_stub_814,
+ (mapi_func) shared_dispatch_stub_815,
+ (mapi_func) shared_dispatch_stub_816,
+ (mapi_func) shared_dispatch_stub_817,
+ (mapi_func) shared_dispatch_stub_818,
+ (mapi_func) shared_dispatch_stub_819,
+ (mapi_func) shared_dispatch_stub_820,
+ (mapi_func) shared_dispatch_stub_821,
+ (mapi_func) shared_dispatch_stub_822,
+ (mapi_func) shared_dispatch_stub_823,
+ (mapi_func) shared_dispatch_stub_824,
+ (mapi_func) shared_dispatch_stub_825,
+ (mapi_func) shared_dispatch_stub_826,
+ (mapi_func) shared_dispatch_stub_827,
+ (mapi_func) shared_dispatch_stub_828,
+ (mapi_func) shared_dispatch_stub_829,
+ (mapi_func) shared_dispatch_stub_830,
+ (mapi_func) shared_dispatch_stub_831,
+ (mapi_func) shared_dispatch_stub_832,
+ (mapi_func) shared_dispatch_stub_833,
+ (mapi_func) shared_dispatch_stub_834,
+ (mapi_func) shared_dispatch_stub_835,
+ (mapi_func) shared_dispatch_stub_836,
+ (mapi_func) shared_dispatch_stub_837,
+ (mapi_func) shared_dispatch_stub_838,
+ (mapi_func) shared_dispatch_stub_839,
+ (mapi_func) shared_dispatch_stub_840,
+ (mapi_func) shared_dispatch_stub_841,
+ (mapi_func) shared_dispatch_stub_842,
+ (mapi_func) shared_dispatch_stub_843,
+ (mapi_func) shared_dispatch_stub_844,
+ (mapi_func) shared_dispatch_stub_845,
+ (mapi_func) shared_dispatch_stub_846,
+ (mapi_func) shared_dispatch_stub_847,
+ (mapi_func) shared_dispatch_stub_848,
+ (mapi_func) shared_dispatch_stub_849,
+ (mapi_func) shared_dispatch_stub_850,
+ (mapi_func) shared_dispatch_stub_851,
+ (mapi_func) shared_dispatch_stub_852,
+ (mapi_func) shared_dispatch_stub_853,
+ (mapi_func) shared_dispatch_stub_854,
+ (mapi_func) shared_dispatch_stub_855,
+ (mapi_func) shared_dispatch_stub_856,
+ (mapi_func) shared_dispatch_stub_857,
+ (mapi_func) shared_dispatch_stub_858,
+ (mapi_func) shared_dispatch_stub_859,
+ (mapi_func) shared_dispatch_stub_860,
+ (mapi_func) shared_dispatch_stub_861,
+ (mapi_func) shared_dispatch_stub_862,
+ (mapi_func) shared_dispatch_stub_863,
+ (mapi_func) shared_dispatch_stub_864,
+ (mapi_func) shared_dispatch_stub_865,
+ (mapi_func) shared_dispatch_stub_866,
+ (mapi_func) shared_dispatch_stub_867,
+ (mapi_func) shared_dispatch_stub_868,
+ (mapi_func) shared_dispatch_stub_869,
+ (mapi_func) shared_dispatch_stub_870,
+ (mapi_func) shared_dispatch_stub_871,
+ (mapi_func) shared_dispatch_stub_872,
+ (mapi_func) shared_dispatch_stub_873,
+ (mapi_func) shared_dispatch_stub_874,
+ (mapi_func) shared_dispatch_stub_875,
+ (mapi_func) shared_dispatch_stub_876,
+ (mapi_func) shared_dispatch_stub_877,
+ (mapi_func) shared_dispatch_stub_878,
+ (mapi_func) shared_dispatch_stub_879,
+ (mapi_func) shared_dispatch_stub_880,
+ (mapi_func) shared_dispatch_stub_881,
+ (mapi_func) shared_dispatch_stub_882,
+ (mapi_func) shared_dispatch_stub_883,
+ (mapi_func) shared_dispatch_stub_884,
+ (mapi_func) shared_dispatch_stub_885,
+ (mapi_func) shared_dispatch_stub_886,
+ (mapi_func) shared_dispatch_stub_887,
+ (mapi_func) shared_dispatch_stub_888,
+ (mapi_func) shared_dispatch_stub_889,
+ (mapi_func) shared_dispatch_stub_890,
+ (mapi_func) shared_dispatch_stub_891,
+ (mapi_func) shared_dispatch_stub_892,
+ (mapi_func) shared_dispatch_stub_893,
+ (mapi_func) shared_dispatch_stub_894,
+ (mapi_func) shared_dispatch_stub_895,
+ (mapi_func) shared_dispatch_stub_896,
+ (mapi_func) shared_dispatch_stub_897,
+ (mapi_func) shared_dispatch_stub_898,
+ (mapi_func) shared_dispatch_stub_899,
+ (mapi_func) shared_dispatch_stub_900,
+ (mapi_func) shared_dispatch_stub_901,
+ (mapi_func) shared_dispatch_stub_902,
+ (mapi_func) shared_dispatch_stub_903,
+ (mapi_func) shared_dispatch_stub_904,
+ (mapi_func) shared_dispatch_stub_905,
+ (mapi_func) shared_dispatch_stub_906,
+ (mapi_func) shared_dispatch_stub_907,
+ (mapi_func) shared_dispatch_stub_908,
+ (mapi_func) shared_dispatch_stub_909,
+ (mapi_func) shared_dispatch_stub_910,
+ (mapi_func) shared_dispatch_stub_911,
+ (mapi_func) shared_dispatch_stub_912,
+ (mapi_func) shared_dispatch_stub_913,
+ (mapi_func) shared_dispatch_stub_914,
+ (mapi_func) shared_dispatch_stub_915,
+ (mapi_func) shared_dispatch_stub_916,
+ (mapi_func) shared_dispatch_stub_917,
+ (mapi_func) shared_dispatch_stub_918,
+ (mapi_func) shared_dispatch_stub_919,
+ (mapi_func) shared_dispatch_stub_920,
+ (mapi_func) shared_dispatch_stub_921,
+ (mapi_func) shared_dispatch_stub_922,
+ (mapi_func) shared_dispatch_stub_923,
+ (mapi_func) shared_dispatch_stub_924,
+ (mapi_func) shared_dispatch_stub_925,
+ (mapi_func) shared_dispatch_stub_926,
+ (mapi_func) shared_dispatch_stub_927,
+ (mapi_func) shared_dispatch_stub_928,
+ (mapi_func) shared_dispatch_stub_929,
+ (mapi_func) shared_dispatch_stub_930,
+ (mapi_func) shared_dispatch_stub_931,
+ (mapi_func) shared_dispatch_stub_932,
+ (mapi_func) shared_dispatch_stub_933,
+ (mapi_func) shared_dispatch_stub_934,
+ (mapi_func) shared_dispatch_stub_935,
+ (mapi_func) shared_dispatch_stub_936,
+ (mapi_func) shared_dispatch_stub_937,
+ (mapi_func) shared_dispatch_stub_938,
+ (mapi_func) shared_dispatch_stub_939,
+ (mapi_func) shared_dispatch_stub_940,
+ (mapi_func) shared_dispatch_stub_941,
+ (mapi_func) shared_dispatch_stub_942,
+ (mapi_func) shared_dispatch_stub_943,
+ (mapi_func) shared_dispatch_stub_944,
+ (mapi_func) shared_dispatch_stub_945,
+ (mapi_func) shared_dispatch_stub_946,
+ (mapi_func) shared_dispatch_stub_947,
+ (mapi_func) shared_dispatch_stub_948,
+ (mapi_func) shared_dispatch_stub_949,
+ (mapi_func) shared_dispatch_stub_950
+};
+#undef MAPI_TMP_PUBLIC_ENTRIES
+#endif /* MAPI_TMP_PUBLIC_ENTRIES */
+
+#ifdef MAPI_TMP_STUB_ASM_GCC
+__asm__(
+".hidden ""shared_dispatch_stub_0""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_0")"\n"
+"\t"STUB_ASM_CODE("0")"\n"
+
+".hidden ""shared_dispatch_stub_1""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_1")"\n"
+"\t"STUB_ASM_CODE("1")"\n"
+
+".hidden ""shared_dispatch_stub_2""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_2")"\n"
+"\t"STUB_ASM_CODE("2")"\n"
+
+".hidden ""shared_dispatch_stub_3""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_3")"\n"
+"\t"STUB_ASM_CODE("3")"\n"
+
+".hidden ""shared_dispatch_stub_4""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_4")"\n"
+"\t"STUB_ASM_CODE("4")"\n"
+
+".hidden ""shared_dispatch_stub_5""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_5")"\n"
+"\t"STUB_ASM_CODE("5")"\n"
+
+".hidden ""shared_dispatch_stub_6""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_6")"\n"
+"\t"STUB_ASM_CODE("6")"\n"
+
+".hidden ""shared_dispatch_stub_7""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_7")"\n"
+"\t"STUB_ASM_CODE("7")"\n"
+
+".hidden ""shared_dispatch_stub_8""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_8")"\n"
+"\t"STUB_ASM_CODE("8")"\n"
+
+".hidden ""shared_dispatch_stub_9""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_9")"\n"
+"\t"STUB_ASM_CODE("9")"\n"
+
+".hidden ""shared_dispatch_stub_10""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_10")"\n"
+"\t"STUB_ASM_CODE("10")"\n"
+
+".hidden ""shared_dispatch_stub_11""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_11")"\n"
+"\t"STUB_ASM_CODE("11")"\n"
+
+".hidden ""shared_dispatch_stub_12""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_12")"\n"
+"\t"STUB_ASM_CODE("12")"\n"
+
+".hidden ""shared_dispatch_stub_13""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_13")"\n"
+"\t"STUB_ASM_CODE("13")"\n"
+
+".hidden ""shared_dispatch_stub_14""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_14")"\n"
+"\t"STUB_ASM_CODE("14")"\n"
+
+".hidden ""shared_dispatch_stub_15""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_15")"\n"
+"\t"STUB_ASM_CODE("15")"\n"
+
+".hidden ""shared_dispatch_stub_16""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_16")"\n"
+"\t"STUB_ASM_CODE("16")"\n"
+
+".hidden ""shared_dispatch_stub_17""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_17")"\n"
+"\t"STUB_ASM_CODE("17")"\n"
+
+".hidden ""shared_dispatch_stub_18""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_18")"\n"
+"\t"STUB_ASM_CODE("18")"\n"
+
+".hidden ""shared_dispatch_stub_19""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_19")"\n"
+"\t"STUB_ASM_CODE("19")"\n"
+
+".hidden ""shared_dispatch_stub_20""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_20")"\n"
+"\t"STUB_ASM_CODE("20")"\n"
+
+".hidden ""shared_dispatch_stub_21""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_21")"\n"
+"\t"STUB_ASM_CODE("21")"\n"
+
+".hidden ""shared_dispatch_stub_22""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_22")"\n"
+"\t"STUB_ASM_CODE("22")"\n"
+
+".hidden ""shared_dispatch_stub_23""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_23")"\n"
+"\t"STUB_ASM_CODE("23")"\n"
+
+".hidden ""shared_dispatch_stub_24""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_24")"\n"
+"\t"STUB_ASM_CODE("24")"\n"
+
+".hidden ""shared_dispatch_stub_25""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_25")"\n"
+"\t"STUB_ASM_CODE("25")"\n"
+
+".hidden ""shared_dispatch_stub_26""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_26")"\n"
+"\t"STUB_ASM_CODE("26")"\n"
+
+".hidden ""shared_dispatch_stub_27""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_27")"\n"
+"\t"STUB_ASM_CODE("27")"\n"
+
+".hidden ""shared_dispatch_stub_28""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_28")"\n"
+"\t"STUB_ASM_CODE("28")"\n"
+
+".hidden ""shared_dispatch_stub_29""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_29")"\n"
+"\t"STUB_ASM_CODE("29")"\n"
+
+".hidden ""shared_dispatch_stub_30""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_30")"\n"
+"\t"STUB_ASM_CODE("30")"\n"
+
+".hidden ""shared_dispatch_stub_31""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_31")"\n"
+"\t"STUB_ASM_CODE("31")"\n"
+
+".hidden ""shared_dispatch_stub_32""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_32")"\n"
+"\t"STUB_ASM_CODE("32")"\n"
+
+".hidden ""shared_dispatch_stub_33""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_33")"\n"
+"\t"STUB_ASM_CODE("33")"\n"
+
+".hidden ""shared_dispatch_stub_34""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_34")"\n"
+"\t"STUB_ASM_CODE("34")"\n"
+
+".hidden ""shared_dispatch_stub_35""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_35")"\n"
+"\t"STUB_ASM_CODE("35")"\n"
+
+".hidden ""shared_dispatch_stub_36""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_36")"\n"
+"\t"STUB_ASM_CODE("36")"\n"
+
+".hidden ""shared_dispatch_stub_37""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_37")"\n"
+"\t"STUB_ASM_CODE("37")"\n"
+
+".hidden ""shared_dispatch_stub_38""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_38")"\n"
+"\t"STUB_ASM_CODE("38")"\n"
+
+".hidden ""shared_dispatch_stub_39""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_39")"\n"
+"\t"STUB_ASM_CODE("39")"\n"
+
+".hidden ""shared_dispatch_stub_40""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_40")"\n"
+"\t"STUB_ASM_CODE("40")"\n"
+
+".hidden ""shared_dispatch_stub_41""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_41")"\n"
+"\t"STUB_ASM_CODE("41")"\n"
+
+".hidden ""shared_dispatch_stub_42""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_42")"\n"
+"\t"STUB_ASM_CODE("42")"\n"
+
+".hidden ""shared_dispatch_stub_43""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_43")"\n"
+"\t"STUB_ASM_CODE("43")"\n"
+
+".hidden ""shared_dispatch_stub_44""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_44")"\n"
+"\t"STUB_ASM_CODE("44")"\n"
+
+".hidden ""shared_dispatch_stub_45""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_45")"\n"
+"\t"STUB_ASM_CODE("45")"\n"
+
+".hidden ""shared_dispatch_stub_46""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_46")"\n"
+"\t"STUB_ASM_CODE("46")"\n"
+
+".hidden ""shared_dispatch_stub_47""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_47")"\n"
+"\t"STUB_ASM_CODE("47")"\n"
+
+".hidden ""shared_dispatch_stub_48""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_48")"\n"
+"\t"STUB_ASM_CODE("48")"\n"
+
+".hidden ""shared_dispatch_stub_49""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_49")"\n"
+"\t"STUB_ASM_CODE("49")"\n"
+
+".hidden ""shared_dispatch_stub_50""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_50")"\n"
+"\t"STUB_ASM_CODE("50")"\n"
+
+".hidden ""shared_dispatch_stub_51""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_51")"\n"
+"\t"STUB_ASM_CODE("51")"\n"
+
+".hidden ""shared_dispatch_stub_52""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_52")"\n"
+"\t"STUB_ASM_CODE("52")"\n"
+
+".hidden ""shared_dispatch_stub_53""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_53")"\n"
+"\t"STUB_ASM_CODE("53")"\n"
+
+".hidden ""shared_dispatch_stub_54""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_54")"\n"
+"\t"STUB_ASM_CODE("54")"\n"
+
+".hidden ""shared_dispatch_stub_55""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_55")"\n"
+"\t"STUB_ASM_CODE("55")"\n"
+
+".hidden ""shared_dispatch_stub_56""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_56")"\n"
+"\t"STUB_ASM_CODE("56")"\n"
+
+".hidden ""shared_dispatch_stub_57""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_57")"\n"
+"\t"STUB_ASM_CODE("57")"\n"
+
+".hidden ""shared_dispatch_stub_58""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_58")"\n"
+"\t"STUB_ASM_CODE("58")"\n"
+
+".hidden ""shared_dispatch_stub_59""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_59")"\n"
+"\t"STUB_ASM_CODE("59")"\n"
+
+".hidden ""shared_dispatch_stub_60""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_60")"\n"
+"\t"STUB_ASM_CODE("60")"\n"
+
+".hidden ""shared_dispatch_stub_61""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_61")"\n"
+"\t"STUB_ASM_CODE("61")"\n"
+
+".hidden ""shared_dispatch_stub_62""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_62")"\n"
+"\t"STUB_ASM_CODE("62")"\n"
+
+".hidden ""shared_dispatch_stub_63""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_63")"\n"
+"\t"STUB_ASM_CODE("63")"\n"
+
+".hidden ""shared_dispatch_stub_64""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_64")"\n"
+"\t"STUB_ASM_CODE("64")"\n"
+
+".hidden ""shared_dispatch_stub_65""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_65")"\n"
+"\t"STUB_ASM_CODE("65")"\n"
+
+".hidden ""shared_dispatch_stub_66""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_66")"\n"
+"\t"STUB_ASM_CODE("66")"\n"
+
+".hidden ""shared_dispatch_stub_67""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_67")"\n"
+"\t"STUB_ASM_CODE("67")"\n"
+
+".hidden ""shared_dispatch_stub_68""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_68")"\n"
+"\t"STUB_ASM_CODE("68")"\n"
+
+".hidden ""shared_dispatch_stub_69""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_69")"\n"
+"\t"STUB_ASM_CODE("69")"\n"
+
+".hidden ""shared_dispatch_stub_70""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_70")"\n"
+"\t"STUB_ASM_CODE("70")"\n"
+
+".hidden ""shared_dispatch_stub_71""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_71")"\n"
+"\t"STUB_ASM_CODE("71")"\n"
+
+".hidden ""shared_dispatch_stub_72""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_72")"\n"
+"\t"STUB_ASM_CODE("72")"\n"
+
+".hidden ""shared_dispatch_stub_73""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_73")"\n"
+"\t"STUB_ASM_CODE("73")"\n"
+
+".hidden ""shared_dispatch_stub_74""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_74")"\n"
+"\t"STUB_ASM_CODE("74")"\n"
+
+".hidden ""shared_dispatch_stub_75""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_75")"\n"
+"\t"STUB_ASM_CODE("75")"\n"
+
+".hidden ""shared_dispatch_stub_76""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_76")"\n"
+"\t"STUB_ASM_CODE("76")"\n"
+
+".hidden ""shared_dispatch_stub_77""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_77")"\n"
+"\t"STUB_ASM_CODE("77")"\n"
+
+".hidden ""shared_dispatch_stub_78""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_78")"\n"
+"\t"STUB_ASM_CODE("78")"\n"
+
+".hidden ""shared_dispatch_stub_79""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_79")"\n"
+"\t"STUB_ASM_CODE("79")"\n"
+
+".hidden ""shared_dispatch_stub_80""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_80")"\n"
+"\t"STUB_ASM_CODE("80")"\n"
+
+".hidden ""shared_dispatch_stub_81""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_81")"\n"
+"\t"STUB_ASM_CODE("81")"\n"
+
+".hidden ""shared_dispatch_stub_82""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_82")"\n"
+"\t"STUB_ASM_CODE("82")"\n"
+
+".hidden ""shared_dispatch_stub_83""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_83")"\n"
+"\t"STUB_ASM_CODE("83")"\n"
+
+".hidden ""shared_dispatch_stub_84""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_84")"\n"
+"\t"STUB_ASM_CODE("84")"\n"
+
+".hidden ""shared_dispatch_stub_85""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_85")"\n"
+"\t"STUB_ASM_CODE("85")"\n"
+
+".hidden ""shared_dispatch_stub_86""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_86")"\n"
+"\t"STUB_ASM_CODE("86")"\n"
+
+".hidden ""shared_dispatch_stub_87""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_87")"\n"
+"\t"STUB_ASM_CODE("87")"\n"
+
+".hidden ""shared_dispatch_stub_88""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_88")"\n"
+"\t"STUB_ASM_CODE("88")"\n"
+
+".hidden ""shared_dispatch_stub_89""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_89")"\n"
+"\t"STUB_ASM_CODE("89")"\n"
+
+".hidden ""shared_dispatch_stub_90""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_90")"\n"
+"\t"STUB_ASM_CODE("90")"\n"
+
+".hidden ""shared_dispatch_stub_91""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_91")"\n"
+"\t"STUB_ASM_CODE("91")"\n"
+
+".hidden ""shared_dispatch_stub_92""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_92")"\n"
+"\t"STUB_ASM_CODE("92")"\n"
+
+".hidden ""shared_dispatch_stub_93""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_93")"\n"
+"\t"STUB_ASM_CODE("93")"\n"
+
+".hidden ""shared_dispatch_stub_94""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_94")"\n"
+"\t"STUB_ASM_CODE("94")"\n"
+
+".hidden ""shared_dispatch_stub_95""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_95")"\n"
+"\t"STUB_ASM_CODE("95")"\n"
+
+".hidden ""shared_dispatch_stub_96""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_96")"\n"
+"\t"STUB_ASM_CODE("96")"\n"
+
+".hidden ""shared_dispatch_stub_97""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_97")"\n"
+"\t"STUB_ASM_CODE("97")"\n"
+
+".hidden ""shared_dispatch_stub_98""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_98")"\n"
+"\t"STUB_ASM_CODE("98")"\n"
+
+".hidden ""shared_dispatch_stub_99""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_99")"\n"
+"\t"STUB_ASM_CODE("99")"\n"
+
+".hidden ""shared_dispatch_stub_100""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_100")"\n"
+"\t"STUB_ASM_CODE("100")"\n"
+
+".hidden ""shared_dispatch_stub_101""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_101")"\n"
+"\t"STUB_ASM_CODE("101")"\n"
+
+".hidden ""shared_dispatch_stub_102""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_102")"\n"
+"\t"STUB_ASM_CODE("102")"\n"
+
+".hidden ""shared_dispatch_stub_103""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_103")"\n"
+"\t"STUB_ASM_CODE("103")"\n"
+
+".hidden ""shared_dispatch_stub_104""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_104")"\n"
+"\t"STUB_ASM_CODE("104")"\n"
+
+".hidden ""shared_dispatch_stub_105""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_105")"\n"
+"\t"STUB_ASM_CODE("105")"\n"
+
+".hidden ""shared_dispatch_stub_106""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_106")"\n"
+"\t"STUB_ASM_CODE("106")"\n"
+
+".hidden ""shared_dispatch_stub_107""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_107")"\n"
+"\t"STUB_ASM_CODE("107")"\n"
+
+".hidden ""shared_dispatch_stub_108""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_108")"\n"
+"\t"STUB_ASM_CODE("108")"\n"
+
+".hidden ""shared_dispatch_stub_109""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_109")"\n"
+"\t"STUB_ASM_CODE("109")"\n"
+
+".hidden ""shared_dispatch_stub_110""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_110")"\n"
+"\t"STUB_ASM_CODE("110")"\n"
+
+".hidden ""shared_dispatch_stub_111""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_111")"\n"
+"\t"STUB_ASM_CODE("111")"\n"
+
+".hidden ""shared_dispatch_stub_112""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_112")"\n"
+"\t"STUB_ASM_CODE("112")"\n"
+
+".hidden ""shared_dispatch_stub_113""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_113")"\n"
+"\t"STUB_ASM_CODE("113")"\n"
+
+".hidden ""shared_dispatch_stub_114""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_114")"\n"
+"\t"STUB_ASM_CODE("114")"\n"
+
+".hidden ""shared_dispatch_stub_115""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_115")"\n"
+"\t"STUB_ASM_CODE("115")"\n"
+
+".hidden ""shared_dispatch_stub_116""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_116")"\n"
+"\t"STUB_ASM_CODE("116")"\n"
+
+".hidden ""shared_dispatch_stub_117""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_117")"\n"
+"\t"STUB_ASM_CODE("117")"\n"
+
+".hidden ""shared_dispatch_stub_118""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_118")"\n"
+"\t"STUB_ASM_CODE("118")"\n"
+
+".hidden ""shared_dispatch_stub_119""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_119")"\n"
+"\t"STUB_ASM_CODE("119")"\n"
+
+".hidden ""shared_dispatch_stub_120""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_120")"\n"
+"\t"STUB_ASM_CODE("120")"\n"
+
+".hidden ""shared_dispatch_stub_121""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_121")"\n"
+"\t"STUB_ASM_CODE("121")"\n"
+
+".hidden ""shared_dispatch_stub_122""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_122")"\n"
+"\t"STUB_ASM_CODE("122")"\n"
+
+".hidden ""shared_dispatch_stub_123""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_123")"\n"
+"\t"STUB_ASM_CODE("123")"\n"
+
+".hidden ""shared_dispatch_stub_124""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_124")"\n"
+"\t"STUB_ASM_CODE("124")"\n"
+
+".hidden ""shared_dispatch_stub_125""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_125")"\n"
+"\t"STUB_ASM_CODE("125")"\n"
+
+".hidden ""shared_dispatch_stub_126""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_126")"\n"
+"\t"STUB_ASM_CODE("126")"\n"
+
+".hidden ""shared_dispatch_stub_127""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_127")"\n"
+"\t"STUB_ASM_CODE("127")"\n"
+
+".hidden ""shared_dispatch_stub_128""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_128")"\n"
+"\t"STUB_ASM_CODE("128")"\n"
+
+".hidden ""shared_dispatch_stub_129""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_129")"\n"
+"\t"STUB_ASM_CODE("129")"\n"
+
+".hidden ""shared_dispatch_stub_130""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_130")"\n"
+"\t"STUB_ASM_CODE("130")"\n"
+
+".hidden ""shared_dispatch_stub_131""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_131")"\n"
+"\t"STUB_ASM_CODE("131")"\n"
+
+".hidden ""shared_dispatch_stub_132""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_132")"\n"
+"\t"STUB_ASM_CODE("132")"\n"
+
+".hidden ""shared_dispatch_stub_133""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_133")"\n"
+"\t"STUB_ASM_CODE("133")"\n"
+
+".hidden ""shared_dispatch_stub_134""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_134")"\n"
+"\t"STUB_ASM_CODE("134")"\n"
+
+".hidden ""shared_dispatch_stub_135""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_135")"\n"
+"\t"STUB_ASM_CODE("135")"\n"
+
+".hidden ""shared_dispatch_stub_136""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_136")"\n"
+"\t"STUB_ASM_CODE("136")"\n"
+
+".hidden ""shared_dispatch_stub_137""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_137")"\n"
+"\t"STUB_ASM_CODE("137")"\n"
+
+".hidden ""shared_dispatch_stub_138""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_138")"\n"
+"\t"STUB_ASM_CODE("138")"\n"
+
+".hidden ""shared_dispatch_stub_139""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_139")"\n"
+"\t"STUB_ASM_CODE("139")"\n"
+
+".hidden ""shared_dispatch_stub_140""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_140")"\n"
+"\t"STUB_ASM_CODE("140")"\n"
+
+".hidden ""shared_dispatch_stub_141""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_141")"\n"
+"\t"STUB_ASM_CODE("141")"\n"
+
+".hidden ""shared_dispatch_stub_142""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_142")"\n"
+"\t"STUB_ASM_CODE("142")"\n"
+
+".hidden ""shared_dispatch_stub_143""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_143")"\n"
+"\t"STUB_ASM_CODE("143")"\n"
+
+".hidden ""shared_dispatch_stub_144""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_144")"\n"
+"\t"STUB_ASM_CODE("144")"\n"
+
+".hidden ""shared_dispatch_stub_145""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_145")"\n"
+"\t"STUB_ASM_CODE("145")"\n"
+
+".hidden ""shared_dispatch_stub_146""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_146")"\n"
+"\t"STUB_ASM_CODE("146")"\n"
+
+".hidden ""shared_dispatch_stub_147""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_147")"\n"
+"\t"STUB_ASM_CODE("147")"\n"
+
+".hidden ""shared_dispatch_stub_148""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_148")"\n"
+"\t"STUB_ASM_CODE("148")"\n"
+
+".hidden ""shared_dispatch_stub_149""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_149")"\n"
+"\t"STUB_ASM_CODE("149")"\n"
+
+".hidden ""shared_dispatch_stub_150""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_150")"\n"
+"\t"STUB_ASM_CODE("150")"\n"
+
+".hidden ""shared_dispatch_stub_151""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_151")"\n"
+"\t"STUB_ASM_CODE("151")"\n"
+
+".hidden ""shared_dispatch_stub_152""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_152")"\n"
+"\t"STUB_ASM_CODE("152")"\n"
+
+".hidden ""shared_dispatch_stub_153""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_153")"\n"
+"\t"STUB_ASM_CODE("153")"\n"
+
+".hidden ""shared_dispatch_stub_154""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_154")"\n"
+"\t"STUB_ASM_CODE("154")"\n"
+
+".hidden ""shared_dispatch_stub_155""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_155")"\n"
+"\t"STUB_ASM_CODE("155")"\n"
+
+".hidden ""shared_dispatch_stub_156""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_156")"\n"
+"\t"STUB_ASM_CODE("156")"\n"
+
+".hidden ""shared_dispatch_stub_157""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_157")"\n"
+"\t"STUB_ASM_CODE("157")"\n"
+
+".hidden ""shared_dispatch_stub_158""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_158")"\n"
+"\t"STUB_ASM_CODE("158")"\n"
+
+".hidden ""shared_dispatch_stub_159""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_159")"\n"
+"\t"STUB_ASM_CODE("159")"\n"
+
+".hidden ""shared_dispatch_stub_160""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_160")"\n"
+"\t"STUB_ASM_CODE("160")"\n"
+
+".hidden ""shared_dispatch_stub_161""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_161")"\n"
+"\t"STUB_ASM_CODE("161")"\n"
+
+".hidden ""shared_dispatch_stub_162""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_162")"\n"
+"\t"STUB_ASM_CODE("162")"\n"
+
+".hidden ""shared_dispatch_stub_163""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_163")"\n"
+"\t"STUB_ASM_CODE("163")"\n"
+
+".hidden ""shared_dispatch_stub_164""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_164")"\n"
+"\t"STUB_ASM_CODE("164")"\n"
+
+".hidden ""shared_dispatch_stub_165""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_165")"\n"
+"\t"STUB_ASM_CODE("165")"\n"
+
+".hidden ""shared_dispatch_stub_166""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_166")"\n"
+"\t"STUB_ASM_CODE("166")"\n"
+
+".hidden ""shared_dispatch_stub_167""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_167")"\n"
+"\t"STUB_ASM_CODE("167")"\n"
+
+".hidden ""shared_dispatch_stub_168""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_168")"\n"
+"\t"STUB_ASM_CODE("168")"\n"
+
+".hidden ""shared_dispatch_stub_169""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_169")"\n"
+"\t"STUB_ASM_CODE("169")"\n"
+
+".hidden ""shared_dispatch_stub_170""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_170")"\n"
+"\t"STUB_ASM_CODE("170")"\n"
+
+".hidden ""shared_dispatch_stub_171""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_171")"\n"
+"\t"STUB_ASM_CODE("171")"\n"
+
+".hidden ""shared_dispatch_stub_172""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_172")"\n"
+"\t"STUB_ASM_CODE("172")"\n"
+
+".hidden ""shared_dispatch_stub_173""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_173")"\n"
+"\t"STUB_ASM_CODE("173")"\n"
+
+".hidden ""shared_dispatch_stub_174""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_174")"\n"
+"\t"STUB_ASM_CODE("174")"\n"
+
+".hidden ""shared_dispatch_stub_175""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_175")"\n"
+"\t"STUB_ASM_CODE("175")"\n"
+
+".hidden ""shared_dispatch_stub_176""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_176")"\n"
+"\t"STUB_ASM_CODE("176")"\n"
+
+".hidden ""shared_dispatch_stub_177""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_177")"\n"
+"\t"STUB_ASM_CODE("177")"\n"
+
+".hidden ""shared_dispatch_stub_178""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_178")"\n"
+"\t"STUB_ASM_CODE("178")"\n"
+
+".hidden ""shared_dispatch_stub_179""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_179")"\n"
+"\t"STUB_ASM_CODE("179")"\n"
+
+".hidden ""shared_dispatch_stub_180""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_180")"\n"
+"\t"STUB_ASM_CODE("180")"\n"
+
+".hidden ""shared_dispatch_stub_181""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_181")"\n"
+"\t"STUB_ASM_CODE("181")"\n"
+
+".hidden ""shared_dispatch_stub_182""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_182")"\n"
+"\t"STUB_ASM_CODE("182")"\n"
+
+".hidden ""shared_dispatch_stub_183""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_183")"\n"
+"\t"STUB_ASM_CODE("183")"\n"
+
+".hidden ""shared_dispatch_stub_184""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_184")"\n"
+"\t"STUB_ASM_CODE("184")"\n"
+
+".hidden ""shared_dispatch_stub_185""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_185")"\n"
+"\t"STUB_ASM_CODE("185")"\n"
+
+".hidden ""shared_dispatch_stub_186""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_186")"\n"
+"\t"STUB_ASM_CODE("186")"\n"
+
+".hidden ""shared_dispatch_stub_187""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_187")"\n"
+"\t"STUB_ASM_CODE("187")"\n"
+
+".hidden ""shared_dispatch_stub_188""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_188")"\n"
+"\t"STUB_ASM_CODE("188")"\n"
+
+".hidden ""shared_dispatch_stub_189""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_189")"\n"
+"\t"STUB_ASM_CODE("189")"\n"
+
+".hidden ""shared_dispatch_stub_190""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_190")"\n"
+"\t"STUB_ASM_CODE("190")"\n"
+
+".hidden ""shared_dispatch_stub_191""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_191")"\n"
+"\t"STUB_ASM_CODE("191")"\n"
+
+".hidden ""shared_dispatch_stub_192""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_192")"\n"
+"\t"STUB_ASM_CODE("192")"\n"
+
+".hidden ""shared_dispatch_stub_193""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_193")"\n"
+"\t"STUB_ASM_CODE("193")"\n"
+
+".hidden ""shared_dispatch_stub_194""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_194")"\n"
+"\t"STUB_ASM_CODE("194")"\n"
+
+".hidden ""shared_dispatch_stub_195""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_195")"\n"
+"\t"STUB_ASM_CODE("195")"\n"
+
+".hidden ""shared_dispatch_stub_196""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_196")"\n"
+"\t"STUB_ASM_CODE("196")"\n"
+
+".hidden ""shared_dispatch_stub_197""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_197")"\n"
+"\t"STUB_ASM_CODE("197")"\n"
+
+".hidden ""shared_dispatch_stub_198""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_198")"\n"
+"\t"STUB_ASM_CODE("198")"\n"
+
+".hidden ""shared_dispatch_stub_199""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_199")"\n"
+"\t"STUB_ASM_CODE("199")"\n"
+
+".hidden ""shared_dispatch_stub_200""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_200")"\n"
+"\t"STUB_ASM_CODE("200")"\n"
+
+".hidden ""shared_dispatch_stub_201""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_201")"\n"
+"\t"STUB_ASM_CODE("201")"\n"
+
+".hidden ""shared_dispatch_stub_202""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_202")"\n"
+"\t"STUB_ASM_CODE("202")"\n"
+
+".hidden ""shared_dispatch_stub_203""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_203")"\n"
+"\t"STUB_ASM_CODE("203")"\n"
+
+".hidden ""shared_dispatch_stub_204""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_204")"\n"
+"\t"STUB_ASM_CODE("204")"\n"
+
+".hidden ""shared_dispatch_stub_205""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_205")"\n"
+"\t"STUB_ASM_CODE("205")"\n"
+
+".hidden ""shared_dispatch_stub_206""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_206")"\n"
+"\t"STUB_ASM_CODE("206")"\n"
+
+".hidden ""shared_dispatch_stub_207""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_207")"\n"
+"\t"STUB_ASM_CODE("207")"\n"
+
+".hidden ""shared_dispatch_stub_208""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_208")"\n"
+"\t"STUB_ASM_CODE("208")"\n"
+
+".hidden ""shared_dispatch_stub_209""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_209")"\n"
+"\t"STUB_ASM_CODE("209")"\n"
+
+".hidden ""shared_dispatch_stub_210""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_210")"\n"
+"\t"STUB_ASM_CODE("210")"\n"
+
+".hidden ""shared_dispatch_stub_211""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_211")"\n"
+"\t"STUB_ASM_CODE("211")"\n"
+
+".hidden ""shared_dispatch_stub_212""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_212")"\n"
+"\t"STUB_ASM_CODE("212")"\n"
+
+".hidden ""shared_dispatch_stub_213""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_213")"\n"
+"\t"STUB_ASM_CODE("213")"\n"
+
+".hidden ""shared_dispatch_stub_214""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_214")"\n"
+"\t"STUB_ASM_CODE("214")"\n"
+
+".hidden ""shared_dispatch_stub_215""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_215")"\n"
+"\t"STUB_ASM_CODE("215")"\n"
+
+".hidden ""shared_dispatch_stub_216""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_216")"\n"
+"\t"STUB_ASM_CODE("216")"\n"
+
+".hidden ""shared_dispatch_stub_217""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_217")"\n"
+"\t"STUB_ASM_CODE("217")"\n"
+
+".hidden ""shared_dispatch_stub_218""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_218")"\n"
+"\t"STUB_ASM_CODE("218")"\n"
+
+".hidden ""shared_dispatch_stub_219""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_219")"\n"
+"\t"STUB_ASM_CODE("219")"\n"
+
+".hidden ""shared_dispatch_stub_220""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_220")"\n"
+"\t"STUB_ASM_CODE("220")"\n"
+
+".hidden ""shared_dispatch_stub_221""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_221")"\n"
+"\t"STUB_ASM_CODE("221")"\n"
+
+".hidden ""shared_dispatch_stub_222""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_222")"\n"
+"\t"STUB_ASM_CODE("222")"\n"
+
+".hidden ""shared_dispatch_stub_223""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_223")"\n"
+"\t"STUB_ASM_CODE("223")"\n"
+
+".hidden ""shared_dispatch_stub_224""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_224")"\n"
+"\t"STUB_ASM_CODE("224")"\n"
+
+".hidden ""shared_dispatch_stub_225""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_225")"\n"
+"\t"STUB_ASM_CODE("225")"\n"
+
+".hidden ""shared_dispatch_stub_226""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_226")"\n"
+"\t"STUB_ASM_CODE("226")"\n"
+
+".hidden ""shared_dispatch_stub_227""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_227")"\n"
+"\t"STUB_ASM_CODE("227")"\n"
+
+".hidden ""shared_dispatch_stub_228""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_228")"\n"
+"\t"STUB_ASM_CODE("228")"\n"
+
+".hidden ""shared_dispatch_stub_229""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_229")"\n"
+"\t"STUB_ASM_CODE("229")"\n"
+
+".hidden ""shared_dispatch_stub_230""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_230")"\n"
+"\t"STUB_ASM_CODE("230")"\n"
+
+".hidden ""shared_dispatch_stub_231""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_231")"\n"
+"\t"STUB_ASM_CODE("231")"\n"
+
+".hidden ""shared_dispatch_stub_232""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_232")"\n"
+"\t"STUB_ASM_CODE("232")"\n"
+
+".hidden ""shared_dispatch_stub_233""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_233")"\n"
+"\t"STUB_ASM_CODE("233")"\n"
+
+".hidden ""shared_dispatch_stub_234""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_234")"\n"
+"\t"STUB_ASM_CODE("234")"\n"
+
+".hidden ""shared_dispatch_stub_235""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_235")"\n"
+"\t"STUB_ASM_CODE("235")"\n"
+
+".hidden ""shared_dispatch_stub_236""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_236")"\n"
+"\t"STUB_ASM_CODE("236")"\n"
+
+".hidden ""shared_dispatch_stub_237""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_237")"\n"
+"\t"STUB_ASM_CODE("237")"\n"
+
+".hidden ""shared_dispatch_stub_238""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_238")"\n"
+"\t"STUB_ASM_CODE("238")"\n"
+
+".hidden ""shared_dispatch_stub_239""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_239")"\n"
+"\t"STUB_ASM_CODE("239")"\n"
+
+".hidden ""shared_dispatch_stub_240""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_240")"\n"
+"\t"STUB_ASM_CODE("240")"\n"
+
+".hidden ""shared_dispatch_stub_241""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_241")"\n"
+"\t"STUB_ASM_CODE("241")"\n"
+
+".hidden ""shared_dispatch_stub_242""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_242")"\n"
+"\t"STUB_ASM_CODE("242")"\n"
+
+".hidden ""shared_dispatch_stub_243""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_243")"\n"
+"\t"STUB_ASM_CODE("243")"\n"
+
+".hidden ""shared_dispatch_stub_244""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_244")"\n"
+"\t"STUB_ASM_CODE("244")"\n"
+
+".hidden ""shared_dispatch_stub_245""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_245")"\n"
+"\t"STUB_ASM_CODE("245")"\n"
+
+".hidden ""shared_dispatch_stub_246""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_246")"\n"
+"\t"STUB_ASM_CODE("246")"\n"
+
+".hidden ""shared_dispatch_stub_247""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_247")"\n"
+"\t"STUB_ASM_CODE("247")"\n"
+
+".hidden ""shared_dispatch_stub_248""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_248")"\n"
+"\t"STUB_ASM_CODE("248")"\n"
+
+".hidden ""shared_dispatch_stub_249""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_249")"\n"
+"\t"STUB_ASM_CODE("249")"\n"
+
+".hidden ""shared_dispatch_stub_250""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_250")"\n"
+"\t"STUB_ASM_CODE("250")"\n"
+
+".hidden ""shared_dispatch_stub_251""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_251")"\n"
+"\t"STUB_ASM_CODE("251")"\n"
+
+".hidden ""shared_dispatch_stub_252""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_252")"\n"
+"\t"STUB_ASM_CODE("252")"\n"
+
+".hidden ""shared_dispatch_stub_253""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_253")"\n"
+"\t"STUB_ASM_CODE("253")"\n"
+
+".hidden ""shared_dispatch_stub_254""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_254")"\n"
+"\t"STUB_ASM_CODE("254")"\n"
+
+".hidden ""shared_dispatch_stub_255""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_255")"\n"
+"\t"STUB_ASM_CODE("255")"\n"
+
+".hidden ""shared_dispatch_stub_256""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_256")"\n"
+"\t"STUB_ASM_CODE("256")"\n"
+
+".hidden ""shared_dispatch_stub_257""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_257")"\n"
+"\t"STUB_ASM_CODE("257")"\n"
+
+".hidden ""shared_dispatch_stub_258""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_258")"\n"
+"\t"STUB_ASM_CODE("258")"\n"
+
+".hidden ""shared_dispatch_stub_259""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_259")"\n"
+"\t"STUB_ASM_CODE("259")"\n"
+
+".hidden ""shared_dispatch_stub_260""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_260")"\n"
+"\t"STUB_ASM_CODE("260")"\n"
+
+".hidden ""shared_dispatch_stub_261""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_261")"\n"
+"\t"STUB_ASM_CODE("261")"\n"
+
+".hidden ""shared_dispatch_stub_262""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_262")"\n"
+"\t"STUB_ASM_CODE("262")"\n"
+
+".hidden ""shared_dispatch_stub_263""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_263")"\n"
+"\t"STUB_ASM_CODE("263")"\n"
+
+".hidden ""shared_dispatch_stub_264""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_264")"\n"
+"\t"STUB_ASM_CODE("264")"\n"
+
+".hidden ""shared_dispatch_stub_265""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_265")"\n"
+"\t"STUB_ASM_CODE("265")"\n"
+
+".hidden ""shared_dispatch_stub_266""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_266")"\n"
+"\t"STUB_ASM_CODE("266")"\n"
+
+".hidden ""shared_dispatch_stub_267""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_267")"\n"
+"\t"STUB_ASM_CODE("267")"\n"
+
+".hidden ""shared_dispatch_stub_268""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_268")"\n"
+"\t"STUB_ASM_CODE("268")"\n"
+
+".hidden ""shared_dispatch_stub_269""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_269")"\n"
+"\t"STUB_ASM_CODE("269")"\n"
+
+".hidden ""shared_dispatch_stub_270""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_270")"\n"
+"\t"STUB_ASM_CODE("270")"\n"
+
+".hidden ""shared_dispatch_stub_271""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_271")"\n"
+"\t"STUB_ASM_CODE("271")"\n"
+
+".hidden ""shared_dispatch_stub_272""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_272")"\n"
+"\t"STUB_ASM_CODE("272")"\n"
+
+".hidden ""shared_dispatch_stub_273""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_273")"\n"
+"\t"STUB_ASM_CODE("273")"\n"
+
+".hidden ""shared_dispatch_stub_274""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_274")"\n"
+"\t"STUB_ASM_CODE("274")"\n"
+
+".hidden ""shared_dispatch_stub_275""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_275")"\n"
+"\t"STUB_ASM_CODE("275")"\n"
+
+".hidden ""shared_dispatch_stub_276""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_276")"\n"
+"\t"STUB_ASM_CODE("276")"\n"
+
+".hidden ""shared_dispatch_stub_277""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_277")"\n"
+"\t"STUB_ASM_CODE("277")"\n"
+
+".hidden ""shared_dispatch_stub_278""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_278")"\n"
+"\t"STUB_ASM_CODE("278")"\n"
+
+".hidden ""shared_dispatch_stub_279""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_279")"\n"
+"\t"STUB_ASM_CODE("279")"\n"
+
+".hidden ""shared_dispatch_stub_280""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_280")"\n"
+"\t"STUB_ASM_CODE("280")"\n"
+
+".hidden ""shared_dispatch_stub_281""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_281")"\n"
+"\t"STUB_ASM_CODE("281")"\n"
+
+".hidden ""shared_dispatch_stub_282""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_282")"\n"
+"\t"STUB_ASM_CODE("282")"\n"
+
+".hidden ""shared_dispatch_stub_283""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_283")"\n"
+"\t"STUB_ASM_CODE("283")"\n"
+
+".hidden ""shared_dispatch_stub_284""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_284")"\n"
+"\t"STUB_ASM_CODE("284")"\n"
+
+".hidden ""shared_dispatch_stub_285""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_285")"\n"
+"\t"STUB_ASM_CODE("285")"\n"
+
+".hidden ""shared_dispatch_stub_286""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_286")"\n"
+"\t"STUB_ASM_CODE("286")"\n"
+
+".hidden ""shared_dispatch_stub_287""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_287")"\n"
+"\t"STUB_ASM_CODE("287")"\n"
+
+".hidden ""shared_dispatch_stub_288""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_288")"\n"
+"\t"STUB_ASM_CODE("288")"\n"
+
+".hidden ""shared_dispatch_stub_289""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_289")"\n"
+"\t"STUB_ASM_CODE("289")"\n"
+
+".hidden ""shared_dispatch_stub_290""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_290")"\n"
+"\t"STUB_ASM_CODE("290")"\n"
+
+".hidden ""shared_dispatch_stub_291""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_291")"\n"
+"\t"STUB_ASM_CODE("291")"\n"
+
+".hidden ""shared_dispatch_stub_292""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_292")"\n"
+"\t"STUB_ASM_CODE("292")"\n"
+
+".hidden ""shared_dispatch_stub_293""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_293")"\n"
+"\t"STUB_ASM_CODE("293")"\n"
+
+".hidden ""shared_dispatch_stub_294""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_294")"\n"
+"\t"STUB_ASM_CODE("294")"\n"
+
+".hidden ""shared_dispatch_stub_295""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_295")"\n"
+"\t"STUB_ASM_CODE("295")"\n"
+
+".hidden ""shared_dispatch_stub_296""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_296")"\n"
+"\t"STUB_ASM_CODE("296")"\n"
+
+".hidden ""shared_dispatch_stub_297""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_297")"\n"
+"\t"STUB_ASM_CODE("297")"\n"
+
+".hidden ""shared_dispatch_stub_298""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_298")"\n"
+"\t"STUB_ASM_CODE("298")"\n"
+
+".hidden ""shared_dispatch_stub_299""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_299")"\n"
+"\t"STUB_ASM_CODE("299")"\n"
+
+".hidden ""shared_dispatch_stub_300""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_300")"\n"
+"\t"STUB_ASM_CODE("300")"\n"
+
+".hidden ""shared_dispatch_stub_301""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_301")"\n"
+"\t"STUB_ASM_CODE("301")"\n"
+
+".hidden ""shared_dispatch_stub_302""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_302")"\n"
+"\t"STUB_ASM_CODE("302")"\n"
+
+".hidden ""shared_dispatch_stub_303""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_303")"\n"
+"\t"STUB_ASM_CODE("303")"\n"
+
+".hidden ""shared_dispatch_stub_304""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_304")"\n"
+"\t"STUB_ASM_CODE("304")"\n"
+
+".hidden ""shared_dispatch_stub_305""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_305")"\n"
+"\t"STUB_ASM_CODE("305")"\n"
+
+".hidden ""shared_dispatch_stub_306""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_306")"\n"
+"\t"STUB_ASM_CODE("306")"\n"
+
+".hidden ""shared_dispatch_stub_307""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_307")"\n"
+"\t"STUB_ASM_CODE("307")"\n"
+
+".hidden ""shared_dispatch_stub_308""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_308")"\n"
+"\t"STUB_ASM_CODE("308")"\n"
+
+".hidden ""shared_dispatch_stub_309""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_309")"\n"
+"\t"STUB_ASM_CODE("309")"\n"
+
+".hidden ""shared_dispatch_stub_310""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_310")"\n"
+"\t"STUB_ASM_CODE("310")"\n"
+
+".hidden ""shared_dispatch_stub_311""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_311")"\n"
+"\t"STUB_ASM_CODE("311")"\n"
+
+".hidden ""shared_dispatch_stub_312""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_312")"\n"
+"\t"STUB_ASM_CODE("312")"\n"
+
+".hidden ""shared_dispatch_stub_313""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_313")"\n"
+"\t"STUB_ASM_CODE("313")"\n"
+
+".hidden ""shared_dispatch_stub_314""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_314")"\n"
+"\t"STUB_ASM_CODE("314")"\n"
+
+".hidden ""shared_dispatch_stub_315""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_315")"\n"
+"\t"STUB_ASM_CODE("315")"\n"
+
+".hidden ""shared_dispatch_stub_316""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_316")"\n"
+"\t"STUB_ASM_CODE("316")"\n"
+
+".hidden ""shared_dispatch_stub_317""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_317")"\n"
+"\t"STUB_ASM_CODE("317")"\n"
+
+".hidden ""shared_dispatch_stub_318""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_318")"\n"
+"\t"STUB_ASM_CODE("318")"\n"
+
+".hidden ""shared_dispatch_stub_319""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_319")"\n"
+"\t"STUB_ASM_CODE("319")"\n"
+
+".hidden ""shared_dispatch_stub_320""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_320")"\n"
+"\t"STUB_ASM_CODE("320")"\n"
+
+".hidden ""shared_dispatch_stub_321""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_321")"\n"
+"\t"STUB_ASM_CODE("321")"\n"
+
+".hidden ""shared_dispatch_stub_322""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_322")"\n"
+"\t"STUB_ASM_CODE("322")"\n"
+
+".hidden ""shared_dispatch_stub_323""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_323")"\n"
+"\t"STUB_ASM_CODE("323")"\n"
+
+".hidden ""shared_dispatch_stub_324""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_324")"\n"
+"\t"STUB_ASM_CODE("324")"\n"
+
+".hidden ""shared_dispatch_stub_325""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_325")"\n"
+"\t"STUB_ASM_CODE("325")"\n"
+
+".hidden ""shared_dispatch_stub_326""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_326")"\n"
+"\t"STUB_ASM_CODE("326")"\n"
+
+".hidden ""shared_dispatch_stub_327""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_327")"\n"
+"\t"STUB_ASM_CODE("327")"\n"
+
+".hidden ""shared_dispatch_stub_328""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_328")"\n"
+"\t"STUB_ASM_CODE("328")"\n"
+
+".hidden ""shared_dispatch_stub_329""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_329")"\n"
+"\t"STUB_ASM_CODE("329")"\n"
+
+".hidden ""shared_dispatch_stub_330""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_330")"\n"
+"\t"STUB_ASM_CODE("330")"\n"
+
+".hidden ""shared_dispatch_stub_331""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_331")"\n"
+"\t"STUB_ASM_CODE("331")"\n"
+
+".hidden ""shared_dispatch_stub_332""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_332")"\n"
+"\t"STUB_ASM_CODE("332")"\n"
+
+".hidden ""shared_dispatch_stub_333""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_333")"\n"
+"\t"STUB_ASM_CODE("333")"\n"
+
+".hidden ""shared_dispatch_stub_334""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_334")"\n"
+"\t"STUB_ASM_CODE("334")"\n"
+
+".hidden ""shared_dispatch_stub_335""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_335")"\n"
+"\t"STUB_ASM_CODE("335")"\n"
+
+".hidden ""shared_dispatch_stub_336""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_336")"\n"
+"\t"STUB_ASM_CODE("336")"\n"
+
+".hidden ""shared_dispatch_stub_337""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_337")"\n"
+"\t"STUB_ASM_CODE("337")"\n"
+
+".hidden ""shared_dispatch_stub_338""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_338")"\n"
+"\t"STUB_ASM_CODE("338")"\n"
+
+".hidden ""shared_dispatch_stub_339""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_339")"\n"
+"\t"STUB_ASM_CODE("339")"\n"
+
+".hidden ""shared_dispatch_stub_340""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_340")"\n"
+"\t"STUB_ASM_CODE("340")"\n"
+
+".hidden ""shared_dispatch_stub_341""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_341")"\n"
+"\t"STUB_ASM_CODE("341")"\n"
+
+".hidden ""shared_dispatch_stub_342""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_342")"\n"
+"\t"STUB_ASM_CODE("342")"\n"
+
+".hidden ""shared_dispatch_stub_343""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_343")"\n"
+"\t"STUB_ASM_CODE("343")"\n"
+
+".hidden ""shared_dispatch_stub_344""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_344")"\n"
+"\t"STUB_ASM_CODE("344")"\n"
+
+".hidden ""shared_dispatch_stub_345""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_345")"\n"
+"\t"STUB_ASM_CODE("345")"\n"
+
+".hidden ""shared_dispatch_stub_346""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_346")"\n"
+"\t"STUB_ASM_CODE("346")"\n"
+
+".hidden ""shared_dispatch_stub_347""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_347")"\n"
+"\t"STUB_ASM_CODE("347")"\n"
+
+".hidden ""shared_dispatch_stub_348""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_348")"\n"
+"\t"STUB_ASM_CODE("348")"\n"
+
+".hidden ""shared_dispatch_stub_349""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_349")"\n"
+"\t"STUB_ASM_CODE("349")"\n"
+
+".hidden ""shared_dispatch_stub_350""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_350")"\n"
+"\t"STUB_ASM_CODE("350")"\n"
+
+".hidden ""shared_dispatch_stub_351""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_351")"\n"
+"\t"STUB_ASM_CODE("351")"\n"
+
+".hidden ""shared_dispatch_stub_352""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_352")"\n"
+"\t"STUB_ASM_CODE("352")"\n"
+
+".hidden ""shared_dispatch_stub_353""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_353")"\n"
+"\t"STUB_ASM_CODE("353")"\n"
+
+".hidden ""shared_dispatch_stub_354""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_354")"\n"
+"\t"STUB_ASM_CODE("354")"\n"
+
+".hidden ""shared_dispatch_stub_355""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_355")"\n"
+"\t"STUB_ASM_CODE("355")"\n"
+
+".hidden ""shared_dispatch_stub_356""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_356")"\n"
+"\t"STUB_ASM_CODE("356")"\n"
+
+".hidden ""shared_dispatch_stub_357""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_357")"\n"
+"\t"STUB_ASM_CODE("357")"\n"
+
+".hidden ""shared_dispatch_stub_358""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_358")"\n"
+"\t"STUB_ASM_CODE("358")"\n"
+
+".hidden ""shared_dispatch_stub_359""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_359")"\n"
+"\t"STUB_ASM_CODE("359")"\n"
+
+".hidden ""shared_dispatch_stub_360""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_360")"\n"
+"\t"STUB_ASM_CODE("360")"\n"
+
+".hidden ""shared_dispatch_stub_361""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_361")"\n"
+"\t"STUB_ASM_CODE("361")"\n"
+
+".hidden ""shared_dispatch_stub_362""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_362")"\n"
+"\t"STUB_ASM_CODE("362")"\n"
+
+".hidden ""shared_dispatch_stub_363""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_363")"\n"
+"\t"STUB_ASM_CODE("363")"\n"
+
+".hidden ""shared_dispatch_stub_364""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_364")"\n"
+"\t"STUB_ASM_CODE("364")"\n"
+
+".hidden ""shared_dispatch_stub_365""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_365")"\n"
+"\t"STUB_ASM_CODE("365")"\n"
+
+".hidden ""shared_dispatch_stub_366""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_366")"\n"
+"\t"STUB_ASM_CODE("366")"\n"
+
+".hidden ""shared_dispatch_stub_367""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_367")"\n"
+"\t"STUB_ASM_CODE("367")"\n"
+
+".hidden ""shared_dispatch_stub_368""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_368")"\n"
+"\t"STUB_ASM_CODE("368")"\n"
+
+".hidden ""shared_dispatch_stub_369""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_369")"\n"
+"\t"STUB_ASM_CODE("369")"\n"
+
+".hidden ""shared_dispatch_stub_370""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_370")"\n"
+"\t"STUB_ASM_CODE("370")"\n"
+
+".hidden ""shared_dispatch_stub_371""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_371")"\n"
+"\t"STUB_ASM_CODE("371")"\n"
+
+".hidden ""shared_dispatch_stub_372""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_372")"\n"
+"\t"STUB_ASM_CODE("372")"\n"
+
+".hidden ""shared_dispatch_stub_373""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_373")"\n"
+"\t"STUB_ASM_CODE("373")"\n"
+
+".hidden ""shared_dispatch_stub_374""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_374")"\n"
+"\t"STUB_ASM_CODE("374")"\n"
+
+".hidden ""shared_dispatch_stub_375""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_375")"\n"
+"\t"STUB_ASM_CODE("375")"\n"
+
+".hidden ""shared_dispatch_stub_376""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_376")"\n"
+"\t"STUB_ASM_CODE("376")"\n"
+
+".hidden ""shared_dispatch_stub_377""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_377")"\n"
+"\t"STUB_ASM_CODE("377")"\n"
+
+".hidden ""shared_dispatch_stub_378""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_378")"\n"
+"\t"STUB_ASM_CODE("378")"\n"
+
+".hidden ""shared_dispatch_stub_379""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_379")"\n"
+"\t"STUB_ASM_CODE("379")"\n"
+
+".hidden ""shared_dispatch_stub_380""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_380")"\n"
+"\t"STUB_ASM_CODE("380")"\n"
+
+".hidden ""shared_dispatch_stub_381""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_381")"\n"
+"\t"STUB_ASM_CODE("381")"\n"
+
+".hidden ""shared_dispatch_stub_382""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_382")"\n"
+"\t"STUB_ASM_CODE("382")"\n"
+
+".hidden ""shared_dispatch_stub_383""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_383")"\n"
+"\t"STUB_ASM_CODE("383")"\n"
+
+".hidden ""shared_dispatch_stub_384""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_384")"\n"
+"\t"STUB_ASM_CODE("384")"\n"
+
+".hidden ""shared_dispatch_stub_385""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_385")"\n"
+"\t"STUB_ASM_CODE("385")"\n"
+
+".hidden ""shared_dispatch_stub_386""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_386")"\n"
+"\t"STUB_ASM_CODE("386")"\n"
+
+".hidden ""shared_dispatch_stub_387""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_387")"\n"
+"\t"STUB_ASM_CODE("387")"\n"
+
+".hidden ""shared_dispatch_stub_388""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_388")"\n"
+"\t"STUB_ASM_CODE("388")"\n"
+
+".hidden ""shared_dispatch_stub_389""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_389")"\n"
+"\t"STUB_ASM_CODE("389")"\n"
+
+".hidden ""shared_dispatch_stub_390""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_390")"\n"
+"\t"STUB_ASM_CODE("390")"\n"
+
+".hidden ""shared_dispatch_stub_391""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_391")"\n"
+"\t"STUB_ASM_CODE("391")"\n"
+
+".hidden ""shared_dispatch_stub_392""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_392")"\n"
+"\t"STUB_ASM_CODE("392")"\n"
+
+".hidden ""shared_dispatch_stub_393""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_393")"\n"
+"\t"STUB_ASM_CODE("393")"\n"
+
+".hidden ""shared_dispatch_stub_394""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_394")"\n"
+"\t"STUB_ASM_CODE("394")"\n"
+
+".hidden ""shared_dispatch_stub_395""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_395")"\n"
+"\t"STUB_ASM_CODE("395")"\n"
+
+".hidden ""shared_dispatch_stub_396""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_396")"\n"
+"\t"STUB_ASM_CODE("396")"\n"
+
+".hidden ""shared_dispatch_stub_397""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_397")"\n"
+"\t"STUB_ASM_CODE("397")"\n"
+
+".hidden ""shared_dispatch_stub_398""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_398")"\n"
+"\t"STUB_ASM_CODE("398")"\n"
+
+".hidden ""shared_dispatch_stub_399""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_399")"\n"
+"\t"STUB_ASM_CODE("399")"\n"
+
+".hidden ""shared_dispatch_stub_400""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_400")"\n"
+"\t"STUB_ASM_CODE("400")"\n"
+
+".hidden ""shared_dispatch_stub_401""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_401")"\n"
+"\t"STUB_ASM_CODE("401")"\n"
+
+".hidden ""shared_dispatch_stub_402""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_402")"\n"
+"\t"STUB_ASM_CODE("402")"\n"
+
+".hidden ""shared_dispatch_stub_403""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_403")"\n"
+"\t"STUB_ASM_CODE("403")"\n"
+
+".hidden ""shared_dispatch_stub_404""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_404")"\n"
+"\t"STUB_ASM_CODE("404")"\n"
+
+".hidden ""shared_dispatch_stub_405""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_405")"\n"
+"\t"STUB_ASM_CODE("405")"\n"
+
+".hidden ""shared_dispatch_stub_406""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_406")"\n"
+"\t"STUB_ASM_CODE("406")"\n"
+
+".hidden ""shared_dispatch_stub_407""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_407")"\n"
+"\t"STUB_ASM_CODE("407")"\n"
+
+".hidden ""shared_dispatch_stub_408""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_408")"\n"
+"\t"STUB_ASM_CODE("408")"\n"
+
+".hidden ""shared_dispatch_stub_409""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_409")"\n"
+"\t"STUB_ASM_CODE("409")"\n"
+
+".hidden ""shared_dispatch_stub_410""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_410")"\n"
+"\t"STUB_ASM_CODE("410")"\n"
+
+".hidden ""shared_dispatch_stub_411""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_411")"\n"
+"\t"STUB_ASM_CODE("411")"\n"
+
+".hidden ""shared_dispatch_stub_412""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_412")"\n"
+"\t"STUB_ASM_CODE("412")"\n"
+
+".hidden ""shared_dispatch_stub_413""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_413")"\n"
+"\t"STUB_ASM_CODE("413")"\n"
+
+".hidden ""shared_dispatch_stub_414""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_414")"\n"
+"\t"STUB_ASM_CODE("414")"\n"
+
+".hidden ""shared_dispatch_stub_415""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_415")"\n"
+"\t"STUB_ASM_CODE("415")"\n"
+
+".hidden ""shared_dispatch_stub_416""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_416")"\n"
+"\t"STUB_ASM_CODE("416")"\n"
+
+".hidden ""shared_dispatch_stub_417""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_417")"\n"
+"\t"STUB_ASM_CODE("417")"\n"
+
+".hidden ""shared_dispatch_stub_418""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_418")"\n"
+"\t"STUB_ASM_CODE("418")"\n"
+
+".hidden ""shared_dispatch_stub_419""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_419")"\n"
+"\t"STUB_ASM_CODE("419")"\n"
+
+".hidden ""shared_dispatch_stub_420""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_420")"\n"
+"\t"STUB_ASM_CODE("420")"\n"
+
+".hidden ""shared_dispatch_stub_421""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_421")"\n"
+"\t"STUB_ASM_CODE("421")"\n"
+
+".hidden ""shared_dispatch_stub_422""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_422")"\n"
+"\t"STUB_ASM_CODE("422")"\n"
+
+".hidden ""shared_dispatch_stub_423""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_423")"\n"
+"\t"STUB_ASM_CODE("423")"\n"
+
+".hidden ""shared_dispatch_stub_424""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_424")"\n"
+"\t"STUB_ASM_CODE("424")"\n"
+
+".hidden ""shared_dispatch_stub_425""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_425")"\n"
+"\t"STUB_ASM_CODE("425")"\n"
+
+".hidden ""shared_dispatch_stub_426""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_426")"\n"
+"\t"STUB_ASM_CODE("426")"\n"
+
+".hidden ""shared_dispatch_stub_427""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_427")"\n"
+"\t"STUB_ASM_CODE("427")"\n"
+
+".hidden ""shared_dispatch_stub_428""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_428")"\n"
+"\t"STUB_ASM_CODE("428")"\n"
+
+".hidden ""shared_dispatch_stub_429""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_429")"\n"
+"\t"STUB_ASM_CODE("429")"\n"
+
+".hidden ""shared_dispatch_stub_430""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_430")"\n"
+"\t"STUB_ASM_CODE("430")"\n"
+
+".hidden ""shared_dispatch_stub_431""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_431")"\n"
+"\t"STUB_ASM_CODE("431")"\n"
+
+".hidden ""shared_dispatch_stub_432""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_432")"\n"
+"\t"STUB_ASM_CODE("432")"\n"
+
+".hidden ""shared_dispatch_stub_433""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_433")"\n"
+"\t"STUB_ASM_CODE("433")"\n"
+
+".hidden ""shared_dispatch_stub_434""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_434")"\n"
+"\t"STUB_ASM_CODE("434")"\n"
+
+".hidden ""shared_dispatch_stub_435""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_435")"\n"
+"\t"STUB_ASM_CODE("435")"\n"
+
+".hidden ""shared_dispatch_stub_436""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_436")"\n"
+"\t"STUB_ASM_CODE("436")"\n"
+
+".hidden ""shared_dispatch_stub_437""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_437")"\n"
+"\t"STUB_ASM_CODE("437")"\n"
+
+".hidden ""shared_dispatch_stub_438""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_438")"\n"
+"\t"STUB_ASM_CODE("438")"\n"
+
+".hidden ""shared_dispatch_stub_439""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_439")"\n"
+"\t"STUB_ASM_CODE("439")"\n"
+
+".hidden ""shared_dispatch_stub_440""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_440")"\n"
+"\t"STUB_ASM_CODE("440")"\n"
+
+".hidden ""shared_dispatch_stub_441""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_441")"\n"
+"\t"STUB_ASM_CODE("441")"\n"
+
+".hidden ""shared_dispatch_stub_442""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_442")"\n"
+"\t"STUB_ASM_CODE("442")"\n"
+
+".hidden ""shared_dispatch_stub_443""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_443")"\n"
+"\t"STUB_ASM_CODE("443")"\n"
+
+".hidden ""shared_dispatch_stub_444""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_444")"\n"
+"\t"STUB_ASM_CODE("444")"\n"
+
+".hidden ""shared_dispatch_stub_445""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_445")"\n"
+"\t"STUB_ASM_CODE("445")"\n"
+
+".hidden ""shared_dispatch_stub_446""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_446")"\n"
+"\t"STUB_ASM_CODE("446")"\n"
+
+".hidden ""shared_dispatch_stub_447""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_447")"\n"
+"\t"STUB_ASM_CODE("447")"\n"
+
+".hidden ""shared_dispatch_stub_448""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_448")"\n"
+"\t"STUB_ASM_CODE("448")"\n"
+
+".hidden ""shared_dispatch_stub_449""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_449")"\n"
+"\t"STUB_ASM_CODE("449")"\n"
+
+".hidden ""shared_dispatch_stub_450""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_450")"\n"
+"\t"STUB_ASM_CODE("450")"\n"
+
+".hidden ""shared_dispatch_stub_451""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_451")"\n"
+"\t"STUB_ASM_CODE("451")"\n"
+
+".hidden ""shared_dispatch_stub_452""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_452")"\n"
+"\t"STUB_ASM_CODE("452")"\n"
+
+".hidden ""shared_dispatch_stub_453""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_453")"\n"
+"\t"STUB_ASM_CODE("453")"\n"
+
+".hidden ""shared_dispatch_stub_454""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_454")"\n"
+"\t"STUB_ASM_CODE("454")"\n"
+
+".hidden ""shared_dispatch_stub_455""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_455")"\n"
+"\t"STUB_ASM_CODE("455")"\n"
+
+".hidden ""shared_dispatch_stub_456""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_456")"\n"
+"\t"STUB_ASM_CODE("456")"\n"
+
+".hidden ""shared_dispatch_stub_457""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_457")"\n"
+"\t"STUB_ASM_CODE("457")"\n"
+
+".hidden ""shared_dispatch_stub_458""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_458")"\n"
+"\t"STUB_ASM_CODE("458")"\n"
+
+".hidden ""shared_dispatch_stub_459""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_459")"\n"
+"\t"STUB_ASM_CODE("459")"\n"
+
+".hidden ""shared_dispatch_stub_460""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_460")"\n"
+"\t"STUB_ASM_CODE("460")"\n"
+
+".hidden ""shared_dispatch_stub_461""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_461")"\n"
+"\t"STUB_ASM_CODE("461")"\n"
+
+".hidden ""shared_dispatch_stub_462""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_462")"\n"
+"\t"STUB_ASM_CODE("462")"\n"
+
+".hidden ""shared_dispatch_stub_463""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_463")"\n"
+"\t"STUB_ASM_CODE("463")"\n"
+
+".hidden ""shared_dispatch_stub_464""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_464")"\n"
+"\t"STUB_ASM_CODE("464")"\n"
+
+".hidden ""shared_dispatch_stub_465""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_465")"\n"
+"\t"STUB_ASM_CODE("465")"\n"
+
+".hidden ""shared_dispatch_stub_466""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_466")"\n"
+"\t"STUB_ASM_CODE("466")"\n"
+
+".hidden ""shared_dispatch_stub_467""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_467")"\n"
+"\t"STUB_ASM_CODE("467")"\n"
+
+".hidden ""shared_dispatch_stub_468""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_468")"\n"
+"\t"STUB_ASM_CODE("468")"\n"
+
+".hidden ""shared_dispatch_stub_469""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_469")"\n"
+"\t"STUB_ASM_CODE("469")"\n"
+
+".hidden ""shared_dispatch_stub_470""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_470")"\n"
+"\t"STUB_ASM_CODE("470")"\n"
+
+".hidden ""shared_dispatch_stub_471""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_471")"\n"
+"\t"STUB_ASM_CODE("471")"\n"
+
+".hidden ""shared_dispatch_stub_472""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_472")"\n"
+"\t"STUB_ASM_CODE("472")"\n"
+
+".hidden ""shared_dispatch_stub_473""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_473")"\n"
+"\t"STUB_ASM_CODE("473")"\n"
+
+".hidden ""shared_dispatch_stub_474""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_474")"\n"
+"\t"STUB_ASM_CODE("474")"\n"
+
+".hidden ""shared_dispatch_stub_475""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_475")"\n"
+"\t"STUB_ASM_CODE("475")"\n"
+
+".hidden ""shared_dispatch_stub_476""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_476")"\n"
+"\t"STUB_ASM_CODE("476")"\n"
+
+".hidden ""shared_dispatch_stub_477""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_477")"\n"
+"\t"STUB_ASM_CODE("477")"\n"
+
+".hidden ""shared_dispatch_stub_478""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_478")"\n"
+"\t"STUB_ASM_CODE("478")"\n"
+
+".hidden ""shared_dispatch_stub_479""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_479")"\n"
+"\t"STUB_ASM_CODE("479")"\n"
+
+".hidden ""shared_dispatch_stub_480""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_480")"\n"
+"\t"STUB_ASM_CODE("480")"\n"
+
+".hidden ""shared_dispatch_stub_481""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_481")"\n"
+"\t"STUB_ASM_CODE("481")"\n"
+
+".hidden ""shared_dispatch_stub_482""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_482")"\n"
+"\t"STUB_ASM_CODE("482")"\n"
+
+".hidden ""shared_dispatch_stub_483""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_483")"\n"
+"\t"STUB_ASM_CODE("483")"\n"
+
+".hidden ""shared_dispatch_stub_484""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_484")"\n"
+"\t"STUB_ASM_CODE("484")"\n"
+
+".hidden ""shared_dispatch_stub_485""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_485")"\n"
+"\t"STUB_ASM_CODE("485")"\n"
+
+".hidden ""shared_dispatch_stub_486""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_486")"\n"
+"\t"STUB_ASM_CODE("486")"\n"
+
+".hidden ""shared_dispatch_stub_487""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_487")"\n"
+"\t"STUB_ASM_CODE("487")"\n"
+
+".hidden ""shared_dispatch_stub_488""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_488")"\n"
+"\t"STUB_ASM_CODE("488")"\n"
+
+".hidden ""shared_dispatch_stub_489""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_489")"\n"
+"\t"STUB_ASM_CODE("489")"\n"
+
+".hidden ""shared_dispatch_stub_490""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_490")"\n"
+"\t"STUB_ASM_CODE("490")"\n"
+
+".hidden ""shared_dispatch_stub_491""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_491")"\n"
+"\t"STUB_ASM_CODE("491")"\n"
+
+".hidden ""shared_dispatch_stub_492""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_492")"\n"
+"\t"STUB_ASM_CODE("492")"\n"
+
+".hidden ""shared_dispatch_stub_493""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_493")"\n"
+"\t"STUB_ASM_CODE("493")"\n"
+
+".hidden ""shared_dispatch_stub_494""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_494")"\n"
+"\t"STUB_ASM_CODE("494")"\n"
+
+".hidden ""shared_dispatch_stub_495""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_495")"\n"
+"\t"STUB_ASM_CODE("495")"\n"
+
+".hidden ""shared_dispatch_stub_496""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_496")"\n"
+"\t"STUB_ASM_CODE("496")"\n"
+
+".hidden ""shared_dispatch_stub_497""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_497")"\n"
+"\t"STUB_ASM_CODE("497")"\n"
+
+".hidden ""shared_dispatch_stub_498""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_498")"\n"
+"\t"STUB_ASM_CODE("498")"\n"
+
+".hidden ""shared_dispatch_stub_499""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_499")"\n"
+"\t"STUB_ASM_CODE("499")"\n"
+
+".hidden ""shared_dispatch_stub_500""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_500")"\n"
+"\t"STUB_ASM_CODE("500")"\n"
+
+".hidden ""shared_dispatch_stub_501""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_501")"\n"
+"\t"STUB_ASM_CODE("501")"\n"
+
+".hidden ""shared_dispatch_stub_502""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_502")"\n"
+"\t"STUB_ASM_CODE("502")"\n"
+
+".hidden ""shared_dispatch_stub_503""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_503")"\n"
+"\t"STUB_ASM_CODE("503")"\n"
+
+".hidden ""shared_dispatch_stub_504""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_504")"\n"
+"\t"STUB_ASM_CODE("504")"\n"
+
+".hidden ""shared_dispatch_stub_505""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_505")"\n"
+"\t"STUB_ASM_CODE("505")"\n"
+
+".hidden ""shared_dispatch_stub_506""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_506")"\n"
+"\t"STUB_ASM_CODE("506")"\n"
+
+".hidden ""shared_dispatch_stub_507""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_507")"\n"
+"\t"STUB_ASM_CODE("507")"\n"
+
+".hidden ""shared_dispatch_stub_508""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_508")"\n"
+"\t"STUB_ASM_CODE("508")"\n"
+
+".hidden ""shared_dispatch_stub_509""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_509")"\n"
+"\t"STUB_ASM_CODE("509")"\n"
+
+".hidden ""shared_dispatch_stub_510""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_510")"\n"
+"\t"STUB_ASM_CODE("510")"\n"
+
+".hidden ""shared_dispatch_stub_511""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_511")"\n"
+"\t"STUB_ASM_CODE("511")"\n"
+
+".hidden ""shared_dispatch_stub_512""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_512")"\n"
+"\t"STUB_ASM_CODE("512")"\n"
+
+".hidden ""shared_dispatch_stub_513""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_513")"\n"
+"\t"STUB_ASM_CODE("513")"\n"
+
+".hidden ""shared_dispatch_stub_514""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_514")"\n"
+"\t"STUB_ASM_CODE("514")"\n"
+
+".hidden ""shared_dispatch_stub_515""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_515")"\n"
+"\t"STUB_ASM_CODE("515")"\n"
+
+".hidden ""shared_dispatch_stub_516""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_516")"\n"
+"\t"STUB_ASM_CODE("516")"\n"
+
+".hidden ""shared_dispatch_stub_517""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_517")"\n"
+"\t"STUB_ASM_CODE("517")"\n"
+
+".hidden ""shared_dispatch_stub_518""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_518")"\n"
+"\t"STUB_ASM_CODE("518")"\n"
+
+".hidden ""shared_dispatch_stub_519""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_519")"\n"
+"\t"STUB_ASM_CODE("519")"\n"
+
+".hidden ""shared_dispatch_stub_520""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_520")"\n"
+"\t"STUB_ASM_CODE("520")"\n"
+
+".hidden ""shared_dispatch_stub_521""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_521")"\n"
+"\t"STUB_ASM_CODE("521")"\n"
+
+".hidden ""shared_dispatch_stub_522""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_522")"\n"
+"\t"STUB_ASM_CODE("522")"\n"
+
+".hidden ""shared_dispatch_stub_523""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_523")"\n"
+"\t"STUB_ASM_CODE("523")"\n"
+
+".hidden ""shared_dispatch_stub_524""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_524")"\n"
+"\t"STUB_ASM_CODE("524")"\n"
+
+".hidden ""shared_dispatch_stub_525""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_525")"\n"
+"\t"STUB_ASM_CODE("525")"\n"
+
+".hidden ""shared_dispatch_stub_526""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_526")"\n"
+"\t"STUB_ASM_CODE("526")"\n"
+
+".hidden ""shared_dispatch_stub_527""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_527")"\n"
+"\t"STUB_ASM_CODE("527")"\n"
+
+".hidden ""shared_dispatch_stub_528""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_528")"\n"
+"\t"STUB_ASM_CODE("528")"\n"
+
+".hidden ""shared_dispatch_stub_529""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_529")"\n"
+"\t"STUB_ASM_CODE("529")"\n"
+
+".hidden ""shared_dispatch_stub_530""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_530")"\n"
+"\t"STUB_ASM_CODE("530")"\n"
+
+".hidden ""shared_dispatch_stub_531""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_531")"\n"
+"\t"STUB_ASM_CODE("531")"\n"
+
+".hidden ""shared_dispatch_stub_532""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_532")"\n"
+"\t"STUB_ASM_CODE("532")"\n"
+
+".hidden ""shared_dispatch_stub_533""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_533")"\n"
+"\t"STUB_ASM_CODE("533")"\n"
+
+".hidden ""shared_dispatch_stub_534""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_534")"\n"
+"\t"STUB_ASM_CODE("534")"\n"
+
+".hidden ""shared_dispatch_stub_535""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_535")"\n"
+"\t"STUB_ASM_CODE("535")"\n"
+
+".hidden ""shared_dispatch_stub_536""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_536")"\n"
+"\t"STUB_ASM_CODE("536")"\n"
+
+".hidden ""shared_dispatch_stub_537""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_537")"\n"
+"\t"STUB_ASM_CODE("537")"\n"
+
+".hidden ""shared_dispatch_stub_538""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_538")"\n"
+"\t"STUB_ASM_CODE("538")"\n"
+
+".hidden ""shared_dispatch_stub_539""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_539")"\n"
+"\t"STUB_ASM_CODE("539")"\n"
+
+".hidden ""shared_dispatch_stub_540""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_540")"\n"
+"\t"STUB_ASM_CODE("540")"\n"
+
+".hidden ""shared_dispatch_stub_541""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_541")"\n"
+"\t"STUB_ASM_CODE("541")"\n"
+
+".hidden ""shared_dispatch_stub_542""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_542")"\n"
+"\t"STUB_ASM_CODE("542")"\n"
+
+".hidden ""shared_dispatch_stub_543""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_543")"\n"
+"\t"STUB_ASM_CODE("543")"\n"
+
+".hidden ""shared_dispatch_stub_544""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_544")"\n"
+"\t"STUB_ASM_CODE("544")"\n"
+
+".hidden ""shared_dispatch_stub_545""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_545")"\n"
+"\t"STUB_ASM_CODE("545")"\n"
+
+".hidden ""shared_dispatch_stub_546""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_546")"\n"
+"\t"STUB_ASM_CODE("546")"\n"
+
+".hidden ""shared_dispatch_stub_547""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_547")"\n"
+"\t"STUB_ASM_CODE("547")"\n"
+
+".hidden ""shared_dispatch_stub_548""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_548")"\n"
+"\t"STUB_ASM_CODE("548")"\n"
+
+".hidden ""shared_dispatch_stub_549""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_549")"\n"
+"\t"STUB_ASM_CODE("549")"\n"
+
+".hidden ""shared_dispatch_stub_550""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_550")"\n"
+"\t"STUB_ASM_CODE("550")"\n"
+
+".hidden ""shared_dispatch_stub_551""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_551")"\n"
+"\t"STUB_ASM_CODE("551")"\n"
+
+".hidden ""shared_dispatch_stub_552""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_552")"\n"
+"\t"STUB_ASM_CODE("552")"\n"
+
+".hidden ""shared_dispatch_stub_553""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_553")"\n"
+"\t"STUB_ASM_CODE("553")"\n"
+
+".hidden ""shared_dispatch_stub_554""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_554")"\n"
+"\t"STUB_ASM_CODE("554")"\n"
+
+".hidden ""shared_dispatch_stub_555""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_555")"\n"
+"\t"STUB_ASM_CODE("555")"\n"
+
+".hidden ""shared_dispatch_stub_556""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_556")"\n"
+"\t"STUB_ASM_CODE("556")"\n"
+
+".hidden ""shared_dispatch_stub_557""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_557")"\n"
+"\t"STUB_ASM_CODE("557")"\n"
+
+".hidden ""shared_dispatch_stub_558""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_558")"\n"
+"\t"STUB_ASM_CODE("558")"\n"
+
+".hidden ""shared_dispatch_stub_559""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_559")"\n"
+"\t"STUB_ASM_CODE("559")"\n"
+
+".hidden ""shared_dispatch_stub_560""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_560")"\n"
+"\t"STUB_ASM_CODE("560")"\n"
+
+".hidden ""shared_dispatch_stub_561""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_561")"\n"
+"\t"STUB_ASM_CODE("561")"\n"
+
+".hidden ""shared_dispatch_stub_562""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_562")"\n"
+"\t"STUB_ASM_CODE("562")"\n"
+
+".hidden ""shared_dispatch_stub_563""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_563")"\n"
+"\t"STUB_ASM_CODE("563")"\n"
+
+".hidden ""shared_dispatch_stub_564""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_564")"\n"
+"\t"STUB_ASM_CODE("564")"\n"
+
+".hidden ""shared_dispatch_stub_565""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_565")"\n"
+"\t"STUB_ASM_CODE("565")"\n"
+
+".hidden ""shared_dispatch_stub_566""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_566")"\n"
+"\t"STUB_ASM_CODE("566")"\n"
+
+".hidden ""shared_dispatch_stub_567""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_567")"\n"
+"\t"STUB_ASM_CODE("567")"\n"
+
+".hidden ""shared_dispatch_stub_568""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_568")"\n"
+"\t"STUB_ASM_CODE("568")"\n"
+
+".hidden ""shared_dispatch_stub_569""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_569")"\n"
+"\t"STUB_ASM_CODE("569")"\n"
+
+".hidden ""shared_dispatch_stub_570""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_570")"\n"
+"\t"STUB_ASM_CODE("570")"\n"
+
+".hidden ""shared_dispatch_stub_571""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_571")"\n"
+"\t"STUB_ASM_CODE("571")"\n"
+
+".hidden ""shared_dispatch_stub_572""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_572")"\n"
+"\t"STUB_ASM_CODE("572")"\n"
+
+".hidden ""shared_dispatch_stub_573""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_573")"\n"
+"\t"STUB_ASM_CODE("573")"\n"
+
+".hidden ""shared_dispatch_stub_574""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_574")"\n"
+"\t"STUB_ASM_CODE("574")"\n"
+
+".hidden ""shared_dispatch_stub_575""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_575")"\n"
+"\t"STUB_ASM_CODE("575")"\n"
+
+".hidden ""shared_dispatch_stub_576""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_576")"\n"
+"\t"STUB_ASM_CODE("576")"\n"
+
+".hidden ""shared_dispatch_stub_577""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_577")"\n"
+"\t"STUB_ASM_CODE("577")"\n"
+
+".hidden ""shared_dispatch_stub_578""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_578")"\n"
+"\t"STUB_ASM_CODE("578")"\n"
+
+".hidden ""shared_dispatch_stub_579""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_579")"\n"
+"\t"STUB_ASM_CODE("579")"\n"
+
+".hidden ""shared_dispatch_stub_580""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_580")"\n"
+"\t"STUB_ASM_CODE("580")"\n"
+
+".hidden ""shared_dispatch_stub_581""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_581")"\n"
+"\t"STUB_ASM_CODE("581")"\n"
+
+".hidden ""shared_dispatch_stub_582""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_582")"\n"
+"\t"STUB_ASM_CODE("582")"\n"
+
+".hidden ""shared_dispatch_stub_583""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_583")"\n"
+"\t"STUB_ASM_CODE("583")"\n"
+
+".hidden ""shared_dispatch_stub_584""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_584")"\n"
+"\t"STUB_ASM_CODE("584")"\n"
+
+".hidden ""shared_dispatch_stub_585""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_585")"\n"
+"\t"STUB_ASM_CODE("585")"\n"
+
+".hidden ""shared_dispatch_stub_586""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_586")"\n"
+"\t"STUB_ASM_CODE("586")"\n"
+
+".hidden ""shared_dispatch_stub_587""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_587")"\n"
+"\t"STUB_ASM_CODE("587")"\n"
+
+".hidden ""shared_dispatch_stub_588""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_588")"\n"
+"\t"STUB_ASM_CODE("588")"\n"
+
+".hidden ""shared_dispatch_stub_589""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_589")"\n"
+"\t"STUB_ASM_CODE("589")"\n"
+
+".hidden ""shared_dispatch_stub_590""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_590")"\n"
+"\t"STUB_ASM_CODE("590")"\n"
+
+".hidden ""shared_dispatch_stub_591""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_591")"\n"
+"\t"STUB_ASM_CODE("591")"\n"
+
+".hidden ""shared_dispatch_stub_592""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_592")"\n"
+"\t"STUB_ASM_CODE("592")"\n"
+
+".hidden ""shared_dispatch_stub_593""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_593")"\n"
+"\t"STUB_ASM_CODE("593")"\n"
+
+".hidden ""shared_dispatch_stub_594""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_594")"\n"
+"\t"STUB_ASM_CODE("594")"\n"
+
+".hidden ""shared_dispatch_stub_595""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_595")"\n"
+"\t"STUB_ASM_CODE("595")"\n"
+
+".hidden ""shared_dispatch_stub_596""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_596")"\n"
+"\t"STUB_ASM_CODE("596")"\n"
+
+".hidden ""shared_dispatch_stub_597""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_597")"\n"
+"\t"STUB_ASM_CODE("597")"\n"
+
+".hidden ""shared_dispatch_stub_598""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_598")"\n"
+"\t"STUB_ASM_CODE("598")"\n"
+
+".hidden ""shared_dispatch_stub_599""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_599")"\n"
+"\t"STUB_ASM_CODE("599")"\n"
+
+".hidden ""shared_dispatch_stub_600""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_600")"\n"
+"\t"STUB_ASM_CODE("600")"\n"
+
+".hidden ""shared_dispatch_stub_601""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_601")"\n"
+"\t"STUB_ASM_CODE("601")"\n"
+
+".hidden ""shared_dispatch_stub_602""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_602")"\n"
+"\t"STUB_ASM_CODE("602")"\n"
+
+".hidden ""shared_dispatch_stub_603""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_603")"\n"
+"\t"STUB_ASM_CODE("603")"\n"
+
+".hidden ""shared_dispatch_stub_604""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_604")"\n"
+"\t"STUB_ASM_CODE("604")"\n"
+
+".hidden ""shared_dispatch_stub_605""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_605")"\n"
+"\t"STUB_ASM_CODE("605")"\n"
+
+".hidden ""shared_dispatch_stub_606""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_606")"\n"
+"\t"STUB_ASM_CODE("606")"\n"
+
+".hidden ""shared_dispatch_stub_607""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_607")"\n"
+"\t"STUB_ASM_CODE("607")"\n"
+
+".hidden ""shared_dispatch_stub_608""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_608")"\n"
+"\t"STUB_ASM_CODE("608")"\n"
+
+".hidden ""shared_dispatch_stub_609""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_609")"\n"
+"\t"STUB_ASM_CODE("609")"\n"
+
+".hidden ""shared_dispatch_stub_610""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_610")"\n"
+"\t"STUB_ASM_CODE("610")"\n"
+
+".hidden ""shared_dispatch_stub_611""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_611")"\n"
+"\t"STUB_ASM_CODE("611")"\n"
+
+".hidden ""shared_dispatch_stub_612""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_612")"\n"
+"\t"STUB_ASM_CODE("612")"\n"
+
+".hidden ""shared_dispatch_stub_613""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_613")"\n"
+"\t"STUB_ASM_CODE("613")"\n"
+
+".hidden ""shared_dispatch_stub_614""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_614")"\n"
+"\t"STUB_ASM_CODE("614")"\n"
+
+".hidden ""shared_dispatch_stub_615""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_615")"\n"
+"\t"STUB_ASM_CODE("615")"\n"
+
+".hidden ""shared_dispatch_stub_616""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_616")"\n"
+"\t"STUB_ASM_CODE("616")"\n"
+
+".hidden ""shared_dispatch_stub_617""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_617")"\n"
+"\t"STUB_ASM_CODE("617")"\n"
+
+".hidden ""shared_dispatch_stub_618""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_618")"\n"
+"\t"STUB_ASM_CODE("618")"\n"
+
+".hidden ""shared_dispatch_stub_619""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_619")"\n"
+"\t"STUB_ASM_CODE("619")"\n"
+
+".hidden ""shared_dispatch_stub_620""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_620")"\n"
+"\t"STUB_ASM_CODE("620")"\n"
+
+".hidden ""shared_dispatch_stub_621""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_621")"\n"
+"\t"STUB_ASM_CODE("621")"\n"
+
+".hidden ""shared_dispatch_stub_622""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_622")"\n"
+"\t"STUB_ASM_CODE("622")"\n"
+
+".hidden ""shared_dispatch_stub_623""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_623")"\n"
+"\t"STUB_ASM_CODE("623")"\n"
+
+".hidden ""shared_dispatch_stub_624""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_624")"\n"
+"\t"STUB_ASM_CODE("624")"\n"
+
+".hidden ""shared_dispatch_stub_625""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_625")"\n"
+"\t"STUB_ASM_CODE("625")"\n"
+
+".hidden ""shared_dispatch_stub_626""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_626")"\n"
+"\t"STUB_ASM_CODE("626")"\n"
+
+".hidden ""shared_dispatch_stub_627""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_627")"\n"
+"\t"STUB_ASM_CODE("627")"\n"
+
+".hidden ""shared_dispatch_stub_628""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_628")"\n"
+"\t"STUB_ASM_CODE("628")"\n"
+
+".hidden ""shared_dispatch_stub_629""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_629")"\n"
+"\t"STUB_ASM_CODE("629")"\n"
+
+".hidden ""shared_dispatch_stub_630""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_630")"\n"
+"\t"STUB_ASM_CODE("630")"\n"
+
+".hidden ""shared_dispatch_stub_631""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_631")"\n"
+"\t"STUB_ASM_CODE("631")"\n"
+
+".hidden ""shared_dispatch_stub_632""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_632")"\n"
+"\t"STUB_ASM_CODE("632")"\n"
+
+".hidden ""shared_dispatch_stub_633""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_633")"\n"
+"\t"STUB_ASM_CODE("633")"\n"
+
+".hidden ""shared_dispatch_stub_634""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_634")"\n"
+"\t"STUB_ASM_CODE("634")"\n"
+
+".hidden ""shared_dispatch_stub_635""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_635")"\n"
+"\t"STUB_ASM_CODE("635")"\n"
+
+".hidden ""shared_dispatch_stub_636""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_636")"\n"
+"\t"STUB_ASM_CODE("636")"\n"
+
+".hidden ""shared_dispatch_stub_637""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_637")"\n"
+"\t"STUB_ASM_CODE("637")"\n"
+
+".hidden ""shared_dispatch_stub_638""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_638")"\n"
+"\t"STUB_ASM_CODE("638")"\n"
+
+".hidden ""shared_dispatch_stub_639""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_639")"\n"
+"\t"STUB_ASM_CODE("639")"\n"
+
+".hidden ""shared_dispatch_stub_640""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_640")"\n"
+"\t"STUB_ASM_CODE("640")"\n"
+
+".hidden ""shared_dispatch_stub_641""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_641")"\n"
+"\t"STUB_ASM_CODE("641")"\n"
+
+".hidden ""shared_dispatch_stub_642""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_642")"\n"
+"\t"STUB_ASM_CODE("642")"\n"
+
+".hidden ""shared_dispatch_stub_643""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_643")"\n"
+"\t"STUB_ASM_CODE("643")"\n"
+
+".hidden ""shared_dispatch_stub_644""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_644")"\n"
+"\t"STUB_ASM_CODE("644")"\n"
+
+".hidden ""shared_dispatch_stub_645""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_645")"\n"
+"\t"STUB_ASM_CODE("645")"\n"
+
+".hidden ""shared_dispatch_stub_646""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_646")"\n"
+"\t"STUB_ASM_CODE("646")"\n"
+
+".hidden ""shared_dispatch_stub_647""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_647")"\n"
+"\t"STUB_ASM_CODE("647")"\n"
+
+".hidden ""shared_dispatch_stub_648""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_648")"\n"
+"\t"STUB_ASM_CODE("648")"\n"
+
+".hidden ""shared_dispatch_stub_649""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_649")"\n"
+"\t"STUB_ASM_CODE("649")"\n"
+
+".hidden ""shared_dispatch_stub_650""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_650")"\n"
+"\t"STUB_ASM_CODE("650")"\n"
+
+".hidden ""shared_dispatch_stub_651""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_651")"\n"
+"\t"STUB_ASM_CODE("651")"\n"
+
+".hidden ""shared_dispatch_stub_652""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_652")"\n"
+"\t"STUB_ASM_CODE("652")"\n"
+
+".hidden ""shared_dispatch_stub_653""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_653")"\n"
+"\t"STUB_ASM_CODE("653")"\n"
+
+".hidden ""shared_dispatch_stub_654""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_654")"\n"
+"\t"STUB_ASM_CODE("654")"\n"
+
+".hidden ""shared_dispatch_stub_655""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_655")"\n"
+"\t"STUB_ASM_CODE("655")"\n"
+
+".hidden ""shared_dispatch_stub_656""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_656")"\n"
+"\t"STUB_ASM_CODE("656")"\n"
+
+".hidden ""shared_dispatch_stub_657""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_657")"\n"
+"\t"STUB_ASM_CODE("657")"\n"
+
+".hidden ""shared_dispatch_stub_658""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_658")"\n"
+"\t"STUB_ASM_CODE("658")"\n"
+
+".hidden ""shared_dispatch_stub_659""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_659")"\n"
+"\t"STUB_ASM_CODE("659")"\n"
+
+".hidden ""shared_dispatch_stub_660""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_660")"\n"
+"\t"STUB_ASM_CODE("660")"\n"
+
+".hidden ""shared_dispatch_stub_661""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_661")"\n"
+"\t"STUB_ASM_CODE("661")"\n"
+
+".hidden ""shared_dispatch_stub_662""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_662")"\n"
+"\t"STUB_ASM_CODE("662")"\n"
+
+".hidden ""shared_dispatch_stub_663""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_663")"\n"
+"\t"STUB_ASM_CODE("663")"\n"
+
+".hidden ""shared_dispatch_stub_664""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_664")"\n"
+"\t"STUB_ASM_CODE("664")"\n"
+
+".hidden ""shared_dispatch_stub_665""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_665")"\n"
+"\t"STUB_ASM_CODE("665")"\n"
+
+".hidden ""shared_dispatch_stub_666""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_666")"\n"
+"\t"STUB_ASM_CODE("666")"\n"
+
+".hidden ""shared_dispatch_stub_667""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_667")"\n"
+"\t"STUB_ASM_CODE("667")"\n"
+
+".hidden ""shared_dispatch_stub_668""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_668")"\n"
+"\t"STUB_ASM_CODE("668")"\n"
+
+".hidden ""shared_dispatch_stub_669""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_669")"\n"
+"\t"STUB_ASM_CODE("669")"\n"
+
+".hidden ""shared_dispatch_stub_670""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_670")"\n"
+"\t"STUB_ASM_CODE("670")"\n"
+
+".hidden ""shared_dispatch_stub_671""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_671")"\n"
+"\t"STUB_ASM_CODE("671")"\n"
+
+".hidden ""shared_dispatch_stub_672""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_672")"\n"
+"\t"STUB_ASM_CODE("672")"\n"
+
+".hidden ""shared_dispatch_stub_673""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_673")"\n"
+"\t"STUB_ASM_CODE("673")"\n"
+
+".hidden ""shared_dispatch_stub_674""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_674")"\n"
+"\t"STUB_ASM_CODE("674")"\n"
+
+".hidden ""shared_dispatch_stub_675""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_675")"\n"
+"\t"STUB_ASM_CODE("675")"\n"
+
+".hidden ""shared_dispatch_stub_676""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_676")"\n"
+"\t"STUB_ASM_CODE("676")"\n"
+
+".hidden ""shared_dispatch_stub_677""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_677")"\n"
+"\t"STUB_ASM_CODE("677")"\n"
+
+".hidden ""shared_dispatch_stub_678""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_678")"\n"
+"\t"STUB_ASM_CODE("678")"\n"
+
+".hidden ""shared_dispatch_stub_679""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_679")"\n"
+"\t"STUB_ASM_CODE("679")"\n"
+
+".hidden ""shared_dispatch_stub_680""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_680")"\n"
+"\t"STUB_ASM_CODE("680")"\n"
+
+".hidden ""shared_dispatch_stub_681""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_681")"\n"
+"\t"STUB_ASM_CODE("681")"\n"
+
+".hidden ""shared_dispatch_stub_682""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_682")"\n"
+"\t"STUB_ASM_CODE("682")"\n"
+
+".hidden ""shared_dispatch_stub_683""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_683")"\n"
+"\t"STUB_ASM_CODE("683")"\n"
+
+".hidden ""shared_dispatch_stub_684""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_684")"\n"
+"\t"STUB_ASM_CODE("684")"\n"
+
+".hidden ""shared_dispatch_stub_685""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_685")"\n"
+"\t"STUB_ASM_CODE("685")"\n"
+
+".hidden ""shared_dispatch_stub_686""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_686")"\n"
+"\t"STUB_ASM_CODE("686")"\n"
+
+".hidden ""shared_dispatch_stub_687""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_687")"\n"
+"\t"STUB_ASM_CODE("687")"\n"
+
+".hidden ""shared_dispatch_stub_688""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_688")"\n"
+"\t"STUB_ASM_CODE("688")"\n"
+
+".hidden ""shared_dispatch_stub_689""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_689")"\n"
+"\t"STUB_ASM_CODE("689")"\n"
+
+".hidden ""shared_dispatch_stub_690""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_690")"\n"
+"\t"STUB_ASM_CODE("690")"\n"
+
+".hidden ""shared_dispatch_stub_691""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_691")"\n"
+"\t"STUB_ASM_CODE("691")"\n"
+
+".hidden ""shared_dispatch_stub_692""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_692")"\n"
+"\t"STUB_ASM_CODE("692")"\n"
+
+".hidden ""shared_dispatch_stub_693""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_693")"\n"
+"\t"STUB_ASM_CODE("693")"\n"
+
+".hidden ""shared_dispatch_stub_694""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_694")"\n"
+"\t"STUB_ASM_CODE("694")"\n"
+
+".hidden ""shared_dispatch_stub_695""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_695")"\n"
+"\t"STUB_ASM_CODE("695")"\n"
+
+".hidden ""shared_dispatch_stub_696""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_696")"\n"
+"\t"STUB_ASM_CODE("696")"\n"
+
+".hidden ""shared_dispatch_stub_697""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_697")"\n"
+"\t"STUB_ASM_CODE("697")"\n"
+
+".hidden ""shared_dispatch_stub_698""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_698")"\n"
+"\t"STUB_ASM_CODE("698")"\n"
+
+".hidden ""shared_dispatch_stub_699""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_699")"\n"
+"\t"STUB_ASM_CODE("699")"\n"
+
+".hidden ""shared_dispatch_stub_700""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_700")"\n"
+"\t"STUB_ASM_CODE("700")"\n"
+
+".hidden ""shared_dispatch_stub_701""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_701")"\n"
+"\t"STUB_ASM_CODE("701")"\n"
+
+".hidden ""shared_dispatch_stub_702""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_702")"\n"
+"\t"STUB_ASM_CODE("702")"\n"
+
+".hidden ""shared_dispatch_stub_703""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_703")"\n"
+"\t"STUB_ASM_CODE("703")"\n"
+
+".hidden ""shared_dispatch_stub_704""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_704")"\n"
+"\t"STUB_ASM_CODE("704")"\n"
+
+".hidden ""shared_dispatch_stub_705""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_705")"\n"
+"\t"STUB_ASM_CODE("705")"\n"
+
+".hidden ""shared_dispatch_stub_706""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_706")"\n"
+"\t"STUB_ASM_CODE("706")"\n"
+
+".hidden ""shared_dispatch_stub_707""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_707")"\n"
+"\t"STUB_ASM_CODE("707")"\n"
+
+".hidden ""shared_dispatch_stub_708""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_708")"\n"
+"\t"STUB_ASM_CODE("708")"\n"
+
+".hidden ""shared_dispatch_stub_709""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_709")"\n"
+"\t"STUB_ASM_CODE("709")"\n"
+
+".hidden ""shared_dispatch_stub_710""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_710")"\n"
+"\t"STUB_ASM_CODE("710")"\n"
+
+".hidden ""shared_dispatch_stub_711""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_711")"\n"
+"\t"STUB_ASM_CODE("711")"\n"
+
+".hidden ""shared_dispatch_stub_712""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_712")"\n"
+"\t"STUB_ASM_CODE("712")"\n"
+
+".hidden ""shared_dispatch_stub_713""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_713")"\n"
+"\t"STUB_ASM_CODE("713")"\n"
+
+".hidden ""shared_dispatch_stub_714""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_714")"\n"
+"\t"STUB_ASM_CODE("714")"\n"
+
+".hidden ""shared_dispatch_stub_715""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_715")"\n"
+"\t"STUB_ASM_CODE("715")"\n"
+
+".hidden ""shared_dispatch_stub_716""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_716")"\n"
+"\t"STUB_ASM_CODE("716")"\n"
+
+".hidden ""shared_dispatch_stub_717""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_717")"\n"
+"\t"STUB_ASM_CODE("717")"\n"
+
+".hidden ""shared_dispatch_stub_718""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_718")"\n"
+"\t"STUB_ASM_CODE("718")"\n"
+
+".hidden ""shared_dispatch_stub_719""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_719")"\n"
+"\t"STUB_ASM_CODE("719")"\n"
+
+".hidden ""shared_dispatch_stub_720""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_720")"\n"
+"\t"STUB_ASM_CODE("720")"\n"
+
+".hidden ""shared_dispatch_stub_721""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_721")"\n"
+"\t"STUB_ASM_CODE("721")"\n"
+
+".hidden ""shared_dispatch_stub_722""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_722")"\n"
+"\t"STUB_ASM_CODE("722")"\n"
+
+".hidden ""shared_dispatch_stub_723""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_723")"\n"
+"\t"STUB_ASM_CODE("723")"\n"
+
+".hidden ""shared_dispatch_stub_724""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_724")"\n"
+"\t"STUB_ASM_CODE("724")"\n"
+
+".hidden ""shared_dispatch_stub_725""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_725")"\n"
+"\t"STUB_ASM_CODE("725")"\n"
+
+".hidden ""shared_dispatch_stub_726""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_726")"\n"
+"\t"STUB_ASM_CODE("726")"\n"
+
+".hidden ""shared_dispatch_stub_727""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_727")"\n"
+"\t"STUB_ASM_CODE("727")"\n"
+
+".hidden ""shared_dispatch_stub_728""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_728")"\n"
+"\t"STUB_ASM_CODE("728")"\n"
+
+".hidden ""shared_dispatch_stub_729""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_729")"\n"
+"\t"STUB_ASM_CODE("729")"\n"
+
+".hidden ""shared_dispatch_stub_730""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_730")"\n"
+"\t"STUB_ASM_CODE("730")"\n"
+
+".hidden ""shared_dispatch_stub_731""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_731")"\n"
+"\t"STUB_ASM_CODE("731")"\n"
+
+".hidden ""shared_dispatch_stub_732""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_732")"\n"
+"\t"STUB_ASM_CODE("732")"\n"
+
+".hidden ""shared_dispatch_stub_733""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_733")"\n"
+"\t"STUB_ASM_CODE("733")"\n"
+
+".hidden ""shared_dispatch_stub_734""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_734")"\n"
+"\t"STUB_ASM_CODE("734")"\n"
+
+".hidden ""shared_dispatch_stub_735""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_735")"\n"
+"\t"STUB_ASM_CODE("735")"\n"
+
+".hidden ""shared_dispatch_stub_736""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_736")"\n"
+"\t"STUB_ASM_CODE("736")"\n"
+
+".hidden ""shared_dispatch_stub_737""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_737")"\n"
+"\t"STUB_ASM_CODE("737")"\n"
+
+".hidden ""shared_dispatch_stub_738""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_738")"\n"
+"\t"STUB_ASM_CODE("738")"\n"
+
+".hidden ""shared_dispatch_stub_739""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_739")"\n"
+"\t"STUB_ASM_CODE("739")"\n"
+
+".hidden ""shared_dispatch_stub_740""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_740")"\n"
+"\t"STUB_ASM_CODE("740")"\n"
+
+".hidden ""shared_dispatch_stub_741""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_741")"\n"
+"\t"STUB_ASM_CODE("741")"\n"
+
+".hidden ""shared_dispatch_stub_742""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_742")"\n"
+"\t"STUB_ASM_CODE("742")"\n"
+
+".hidden ""shared_dispatch_stub_743""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_743")"\n"
+"\t"STUB_ASM_CODE("743")"\n"
+
+".hidden ""shared_dispatch_stub_744""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_744")"\n"
+"\t"STUB_ASM_CODE("744")"\n"
+
+".hidden ""shared_dispatch_stub_745""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_745")"\n"
+"\t"STUB_ASM_CODE("745")"\n"
+
+".hidden ""shared_dispatch_stub_746""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_746")"\n"
+"\t"STUB_ASM_CODE("746")"\n"
+
+".hidden ""shared_dispatch_stub_747""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_747")"\n"
+"\t"STUB_ASM_CODE("747")"\n"
+
+".hidden ""shared_dispatch_stub_748""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_748")"\n"
+"\t"STUB_ASM_CODE("748")"\n"
+
+".hidden ""shared_dispatch_stub_749""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_749")"\n"
+"\t"STUB_ASM_CODE("749")"\n"
+
+".hidden ""shared_dispatch_stub_750""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_750")"\n"
+"\t"STUB_ASM_CODE("750")"\n"
+
+".hidden ""shared_dispatch_stub_751""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_751")"\n"
+"\t"STUB_ASM_CODE("751")"\n"
+
+".hidden ""shared_dispatch_stub_752""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_752")"\n"
+"\t"STUB_ASM_CODE("752")"\n"
+
+".hidden ""shared_dispatch_stub_753""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_753")"\n"
+"\t"STUB_ASM_CODE("753")"\n"
+
+".hidden ""shared_dispatch_stub_754""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_754")"\n"
+"\t"STUB_ASM_CODE("754")"\n"
+
+".hidden ""shared_dispatch_stub_755""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_755")"\n"
+"\t"STUB_ASM_CODE("755")"\n"
+
+".hidden ""shared_dispatch_stub_756""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_756")"\n"
+"\t"STUB_ASM_CODE("756")"\n"
+
+".hidden ""shared_dispatch_stub_757""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_757")"\n"
+"\t"STUB_ASM_CODE("757")"\n"
+
+".hidden ""shared_dispatch_stub_758""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_758")"\n"
+"\t"STUB_ASM_CODE("758")"\n"
+
+".hidden ""shared_dispatch_stub_759""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_759")"\n"
+"\t"STUB_ASM_CODE("759")"\n"
+
+".hidden ""shared_dispatch_stub_760""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_760")"\n"
+"\t"STUB_ASM_CODE("760")"\n"
+
+".hidden ""shared_dispatch_stub_761""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_761")"\n"
+"\t"STUB_ASM_CODE("761")"\n"
+
+".hidden ""shared_dispatch_stub_762""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_762")"\n"
+"\t"STUB_ASM_CODE("762")"\n"
+
+".hidden ""shared_dispatch_stub_763""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_763")"\n"
+"\t"STUB_ASM_CODE("763")"\n"
+
+".hidden ""shared_dispatch_stub_764""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_764")"\n"
+"\t"STUB_ASM_CODE("764")"\n"
+
+".hidden ""shared_dispatch_stub_765""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_765")"\n"
+"\t"STUB_ASM_CODE("765")"\n"
+
+".hidden ""shared_dispatch_stub_766""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_766")"\n"
+"\t"STUB_ASM_CODE("766")"\n"
+
+".hidden ""shared_dispatch_stub_767""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_767")"\n"
+"\t"STUB_ASM_CODE("767")"\n"
+
+".hidden ""shared_dispatch_stub_768""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_768")"\n"
+"\t"STUB_ASM_CODE("768")"\n"
+
+".hidden ""shared_dispatch_stub_769""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_769")"\n"
+"\t"STUB_ASM_CODE("769")"\n"
+
+".hidden ""shared_dispatch_stub_770""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_770")"\n"
+"\t"STUB_ASM_CODE("770")"\n"
+
+".hidden ""shared_dispatch_stub_771""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_771")"\n"
+"\t"STUB_ASM_CODE("771")"\n"
+
+".hidden ""shared_dispatch_stub_772""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_772")"\n"
+"\t"STUB_ASM_CODE("772")"\n"
+
+".hidden ""shared_dispatch_stub_773""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_773")"\n"
+"\t"STUB_ASM_CODE("773")"\n"
+
+".hidden ""shared_dispatch_stub_774""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_774")"\n"
+"\t"STUB_ASM_CODE("774")"\n"
+
+".hidden ""shared_dispatch_stub_775""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_775")"\n"
+"\t"STUB_ASM_CODE("775")"\n"
+
+".hidden ""shared_dispatch_stub_776""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_776")"\n"
+"\t"STUB_ASM_CODE("776")"\n"
+
+".hidden ""shared_dispatch_stub_777""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_777")"\n"
+"\t"STUB_ASM_CODE("777")"\n"
+
+".hidden ""shared_dispatch_stub_778""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_778")"\n"
+"\t"STUB_ASM_CODE("778")"\n"
+
+".hidden ""shared_dispatch_stub_779""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_779")"\n"
+"\t"STUB_ASM_CODE("779")"\n"
+
+".hidden ""shared_dispatch_stub_780""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_780")"\n"
+"\t"STUB_ASM_CODE("780")"\n"
+
+".hidden ""shared_dispatch_stub_781""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_781")"\n"
+"\t"STUB_ASM_CODE("781")"\n"
+
+".hidden ""shared_dispatch_stub_782""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_782")"\n"
+"\t"STUB_ASM_CODE("782")"\n"
+
+".hidden ""shared_dispatch_stub_783""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_783")"\n"
+"\t"STUB_ASM_CODE("783")"\n"
+
+".hidden ""shared_dispatch_stub_784""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_784")"\n"
+"\t"STUB_ASM_CODE("784")"\n"
+
+".hidden ""shared_dispatch_stub_785""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_785")"\n"
+"\t"STUB_ASM_CODE("785")"\n"
+
+".hidden ""shared_dispatch_stub_786""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_786")"\n"
+"\t"STUB_ASM_CODE("786")"\n"
+
+".hidden ""shared_dispatch_stub_787""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_787")"\n"
+"\t"STUB_ASM_CODE("787")"\n"
+
+".hidden ""shared_dispatch_stub_788""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_788")"\n"
+"\t"STUB_ASM_CODE("788")"\n"
+
+".hidden ""shared_dispatch_stub_789""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_789")"\n"
+"\t"STUB_ASM_CODE("789")"\n"
+
+".hidden ""shared_dispatch_stub_790""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_790")"\n"
+"\t"STUB_ASM_CODE("790")"\n"
+
+".hidden ""shared_dispatch_stub_791""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_791")"\n"
+"\t"STUB_ASM_CODE("791")"\n"
+
+".hidden ""shared_dispatch_stub_792""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_792")"\n"
+"\t"STUB_ASM_CODE("792")"\n"
+
+".hidden ""shared_dispatch_stub_793""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_793")"\n"
+"\t"STUB_ASM_CODE("793")"\n"
+
+".hidden ""shared_dispatch_stub_794""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_794")"\n"
+"\t"STUB_ASM_CODE("794")"\n"
+
+".hidden ""shared_dispatch_stub_795""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_795")"\n"
+"\t"STUB_ASM_CODE("795")"\n"
+
+".hidden ""shared_dispatch_stub_796""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_796")"\n"
+"\t"STUB_ASM_CODE("796")"\n"
+
+".hidden ""shared_dispatch_stub_797""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_797")"\n"
+"\t"STUB_ASM_CODE("797")"\n"
+
+".hidden ""shared_dispatch_stub_798""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_798")"\n"
+"\t"STUB_ASM_CODE("798")"\n"
+
+".hidden ""shared_dispatch_stub_799""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_799")"\n"
+"\t"STUB_ASM_CODE("799")"\n"
+
+".hidden ""shared_dispatch_stub_800""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_800")"\n"
+"\t"STUB_ASM_CODE("800")"\n"
+
+".hidden ""shared_dispatch_stub_801""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_801")"\n"
+"\t"STUB_ASM_CODE("801")"\n"
+
+".hidden ""shared_dispatch_stub_802""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_802")"\n"
+"\t"STUB_ASM_CODE("802")"\n"
+
+".hidden ""shared_dispatch_stub_803""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_803")"\n"
+"\t"STUB_ASM_CODE("803")"\n"
+
+".hidden ""shared_dispatch_stub_804""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_804")"\n"
+"\t"STUB_ASM_CODE("804")"\n"
+
+".hidden ""shared_dispatch_stub_805""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_805")"\n"
+"\t"STUB_ASM_CODE("805")"\n"
+
+".hidden ""shared_dispatch_stub_806""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_806")"\n"
+"\t"STUB_ASM_CODE("806")"\n"
+
+".hidden ""shared_dispatch_stub_807""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_807")"\n"
+"\t"STUB_ASM_CODE("807")"\n"
+
+".hidden ""shared_dispatch_stub_808""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_808")"\n"
+"\t"STUB_ASM_CODE("808")"\n"
+
+".hidden ""shared_dispatch_stub_809""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_809")"\n"
+"\t"STUB_ASM_CODE("809")"\n"
+
+".hidden ""shared_dispatch_stub_810""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_810")"\n"
+"\t"STUB_ASM_CODE("810")"\n"
+
+".hidden ""shared_dispatch_stub_811""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_811")"\n"
+"\t"STUB_ASM_CODE("811")"\n"
+
+".hidden ""shared_dispatch_stub_812""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_812")"\n"
+"\t"STUB_ASM_CODE("812")"\n"
+
+".hidden ""shared_dispatch_stub_813""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_813")"\n"
+"\t"STUB_ASM_CODE("813")"\n"
+
+".hidden ""shared_dispatch_stub_814""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_814")"\n"
+"\t"STUB_ASM_CODE("814")"\n"
+
+".hidden ""shared_dispatch_stub_815""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_815")"\n"
+"\t"STUB_ASM_CODE("815")"\n"
+
+".hidden ""shared_dispatch_stub_816""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_816")"\n"
+"\t"STUB_ASM_CODE("816")"\n"
+
+".hidden ""shared_dispatch_stub_817""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_817")"\n"
+"\t"STUB_ASM_CODE("817")"\n"
+
+".hidden ""shared_dispatch_stub_818""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_818")"\n"
+"\t"STUB_ASM_CODE("818")"\n"
+
+".hidden ""shared_dispatch_stub_819""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_819")"\n"
+"\t"STUB_ASM_CODE("819")"\n"
+
+".hidden ""shared_dispatch_stub_820""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_820")"\n"
+"\t"STUB_ASM_CODE("820")"\n"
+
+".hidden ""shared_dispatch_stub_821""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_821")"\n"
+"\t"STUB_ASM_CODE("821")"\n"
+
+".hidden ""shared_dispatch_stub_822""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_822")"\n"
+"\t"STUB_ASM_CODE("822")"\n"
+
+".hidden ""shared_dispatch_stub_823""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_823")"\n"
+"\t"STUB_ASM_CODE("823")"\n"
+
+".hidden ""shared_dispatch_stub_824""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_824")"\n"
+"\t"STUB_ASM_CODE("824")"\n"
+
+".hidden ""shared_dispatch_stub_825""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_825")"\n"
+"\t"STUB_ASM_CODE("825")"\n"
+
+".hidden ""shared_dispatch_stub_826""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_826")"\n"
+"\t"STUB_ASM_CODE("826")"\n"
+
+".hidden ""shared_dispatch_stub_827""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_827")"\n"
+"\t"STUB_ASM_CODE("827")"\n"
+
+".hidden ""shared_dispatch_stub_828""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_828")"\n"
+"\t"STUB_ASM_CODE("828")"\n"
+
+".hidden ""shared_dispatch_stub_829""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_829")"\n"
+"\t"STUB_ASM_CODE("829")"\n"
+
+".hidden ""shared_dispatch_stub_830""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_830")"\n"
+"\t"STUB_ASM_CODE("830")"\n"
+
+".hidden ""shared_dispatch_stub_831""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_831")"\n"
+"\t"STUB_ASM_CODE("831")"\n"
+
+".hidden ""shared_dispatch_stub_832""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_832")"\n"
+"\t"STUB_ASM_CODE("832")"\n"
+
+".hidden ""shared_dispatch_stub_833""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_833")"\n"
+"\t"STUB_ASM_CODE("833")"\n"
+
+".hidden ""shared_dispatch_stub_834""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_834")"\n"
+"\t"STUB_ASM_CODE("834")"\n"
+
+".hidden ""shared_dispatch_stub_835""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_835")"\n"
+"\t"STUB_ASM_CODE("835")"\n"
+
+".hidden ""shared_dispatch_stub_836""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_836")"\n"
+"\t"STUB_ASM_CODE("836")"\n"
+
+".hidden ""shared_dispatch_stub_837""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_837")"\n"
+"\t"STUB_ASM_CODE("837")"\n"
+
+".hidden ""shared_dispatch_stub_838""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_838")"\n"
+"\t"STUB_ASM_CODE("838")"\n"
+
+".hidden ""shared_dispatch_stub_839""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_839")"\n"
+"\t"STUB_ASM_CODE("839")"\n"
+
+".hidden ""shared_dispatch_stub_840""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_840")"\n"
+"\t"STUB_ASM_CODE("840")"\n"
+
+".hidden ""shared_dispatch_stub_841""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_841")"\n"
+"\t"STUB_ASM_CODE("841")"\n"
+
+".hidden ""shared_dispatch_stub_842""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_842")"\n"
+"\t"STUB_ASM_CODE("842")"\n"
+
+".hidden ""shared_dispatch_stub_843""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_843")"\n"
+"\t"STUB_ASM_CODE("843")"\n"
+
+".hidden ""shared_dispatch_stub_844""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_844")"\n"
+"\t"STUB_ASM_CODE("844")"\n"
+
+".hidden ""shared_dispatch_stub_845""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_845")"\n"
+"\t"STUB_ASM_CODE("845")"\n"
+
+".hidden ""shared_dispatch_stub_846""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_846")"\n"
+"\t"STUB_ASM_CODE("846")"\n"
+
+".hidden ""shared_dispatch_stub_847""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_847")"\n"
+"\t"STUB_ASM_CODE("847")"\n"
+
+".hidden ""shared_dispatch_stub_848""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_848")"\n"
+"\t"STUB_ASM_CODE("848")"\n"
+
+".hidden ""shared_dispatch_stub_849""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_849")"\n"
+"\t"STUB_ASM_CODE("849")"\n"
+
+".hidden ""shared_dispatch_stub_850""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_850")"\n"
+"\t"STUB_ASM_CODE("850")"\n"
+
+".hidden ""shared_dispatch_stub_851""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_851")"\n"
+"\t"STUB_ASM_CODE("851")"\n"
+
+".hidden ""shared_dispatch_stub_852""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_852")"\n"
+"\t"STUB_ASM_CODE("852")"\n"
+
+".hidden ""shared_dispatch_stub_853""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_853")"\n"
+"\t"STUB_ASM_CODE("853")"\n"
+
+".hidden ""shared_dispatch_stub_854""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_854")"\n"
+"\t"STUB_ASM_CODE("854")"\n"
+
+".hidden ""shared_dispatch_stub_855""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_855")"\n"
+"\t"STUB_ASM_CODE("855")"\n"
+
+".hidden ""shared_dispatch_stub_856""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_856")"\n"
+"\t"STUB_ASM_CODE("856")"\n"
+
+".hidden ""shared_dispatch_stub_857""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_857")"\n"
+"\t"STUB_ASM_CODE("857")"\n"
+
+".hidden ""shared_dispatch_stub_858""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_858")"\n"
+"\t"STUB_ASM_CODE("858")"\n"
+
+".hidden ""shared_dispatch_stub_859""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_859")"\n"
+"\t"STUB_ASM_CODE("859")"\n"
+
+".hidden ""shared_dispatch_stub_860""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_860")"\n"
+"\t"STUB_ASM_CODE("860")"\n"
+
+".hidden ""shared_dispatch_stub_861""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_861")"\n"
+"\t"STUB_ASM_CODE("861")"\n"
+
+".hidden ""shared_dispatch_stub_862""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_862")"\n"
+"\t"STUB_ASM_CODE("862")"\n"
+
+".hidden ""shared_dispatch_stub_863""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_863")"\n"
+"\t"STUB_ASM_CODE("863")"\n"
+
+".hidden ""shared_dispatch_stub_864""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_864")"\n"
+"\t"STUB_ASM_CODE("864")"\n"
+
+".hidden ""shared_dispatch_stub_865""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_865")"\n"
+"\t"STUB_ASM_CODE("865")"\n"
+
+".hidden ""shared_dispatch_stub_866""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_866")"\n"
+"\t"STUB_ASM_CODE("866")"\n"
+
+".hidden ""shared_dispatch_stub_867""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_867")"\n"
+"\t"STUB_ASM_CODE("867")"\n"
+
+".hidden ""shared_dispatch_stub_868""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_868")"\n"
+"\t"STUB_ASM_CODE("868")"\n"
+
+".hidden ""shared_dispatch_stub_869""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_869")"\n"
+"\t"STUB_ASM_CODE("869")"\n"
+
+".hidden ""shared_dispatch_stub_870""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_870")"\n"
+"\t"STUB_ASM_CODE("870")"\n"
+
+".hidden ""shared_dispatch_stub_871""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_871")"\n"
+"\t"STUB_ASM_CODE("871")"\n"
+
+".hidden ""shared_dispatch_stub_872""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_872")"\n"
+"\t"STUB_ASM_CODE("872")"\n"
+
+".hidden ""shared_dispatch_stub_873""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_873")"\n"
+"\t"STUB_ASM_CODE("873")"\n"
+
+".hidden ""shared_dispatch_stub_874""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_874")"\n"
+"\t"STUB_ASM_CODE("874")"\n"
+
+".hidden ""shared_dispatch_stub_875""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_875")"\n"
+"\t"STUB_ASM_CODE("875")"\n"
+
+".hidden ""shared_dispatch_stub_876""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_876")"\n"
+"\t"STUB_ASM_CODE("876")"\n"
+
+".hidden ""shared_dispatch_stub_877""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_877")"\n"
+"\t"STUB_ASM_CODE("877")"\n"
+
+".hidden ""shared_dispatch_stub_878""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_878")"\n"
+"\t"STUB_ASM_CODE("878")"\n"
+
+".hidden ""shared_dispatch_stub_879""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_879")"\n"
+"\t"STUB_ASM_CODE("879")"\n"
+
+".hidden ""shared_dispatch_stub_880""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_880")"\n"
+"\t"STUB_ASM_CODE("880")"\n"
+
+".hidden ""shared_dispatch_stub_881""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_881")"\n"
+"\t"STUB_ASM_CODE("881")"\n"
+
+".hidden ""shared_dispatch_stub_882""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_882")"\n"
+"\t"STUB_ASM_CODE("882")"\n"
+
+".hidden ""shared_dispatch_stub_883""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_883")"\n"
+"\t"STUB_ASM_CODE("883")"\n"
+
+".hidden ""shared_dispatch_stub_884""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_884")"\n"
+"\t"STUB_ASM_CODE("884")"\n"
+
+".hidden ""shared_dispatch_stub_885""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_885")"\n"
+"\t"STUB_ASM_CODE("885")"\n"
+
+".hidden ""shared_dispatch_stub_886""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_886")"\n"
+"\t"STUB_ASM_CODE("886")"\n"
+
+".hidden ""shared_dispatch_stub_887""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_887")"\n"
+"\t"STUB_ASM_CODE("887")"\n"
+
+".hidden ""shared_dispatch_stub_888""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_888")"\n"
+"\t"STUB_ASM_CODE("888")"\n"
+
+".hidden ""shared_dispatch_stub_889""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_889")"\n"
+"\t"STUB_ASM_CODE("889")"\n"
+
+".hidden ""shared_dispatch_stub_890""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_890")"\n"
+"\t"STUB_ASM_CODE("890")"\n"
+
+".hidden ""shared_dispatch_stub_891""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_891")"\n"
+"\t"STUB_ASM_CODE("891")"\n"
+
+".hidden ""shared_dispatch_stub_892""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_892")"\n"
+"\t"STUB_ASM_CODE("892")"\n"
+
+".hidden ""shared_dispatch_stub_893""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_893")"\n"
+"\t"STUB_ASM_CODE("893")"\n"
+
+".hidden ""shared_dispatch_stub_894""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_894")"\n"
+"\t"STUB_ASM_CODE("894")"\n"
+
+".hidden ""shared_dispatch_stub_895""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_895")"\n"
+"\t"STUB_ASM_CODE("895")"\n"
+
+".hidden ""shared_dispatch_stub_896""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_896")"\n"
+"\t"STUB_ASM_CODE("896")"\n"
+
+".hidden ""shared_dispatch_stub_897""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_897")"\n"
+"\t"STUB_ASM_CODE("897")"\n"
+
+".hidden ""shared_dispatch_stub_898""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_898")"\n"
+"\t"STUB_ASM_CODE("898")"\n"
+
+".hidden ""shared_dispatch_stub_899""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_899")"\n"
+"\t"STUB_ASM_CODE("899")"\n"
+
+".hidden ""shared_dispatch_stub_900""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_900")"\n"
+"\t"STUB_ASM_CODE("900")"\n"
+
+".hidden ""shared_dispatch_stub_901""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_901")"\n"
+"\t"STUB_ASM_CODE("901")"\n"
+
+".hidden ""shared_dispatch_stub_902""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_902")"\n"
+"\t"STUB_ASM_CODE("902")"\n"
+
+".hidden ""shared_dispatch_stub_903""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_903")"\n"
+"\t"STUB_ASM_CODE("903")"\n"
+
+".hidden ""shared_dispatch_stub_904""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_904")"\n"
+"\t"STUB_ASM_CODE("904")"\n"
+
+".hidden ""shared_dispatch_stub_905""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_905")"\n"
+"\t"STUB_ASM_CODE("905")"\n"
+
+".hidden ""shared_dispatch_stub_906""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_906")"\n"
+"\t"STUB_ASM_CODE("906")"\n"
+
+".hidden ""shared_dispatch_stub_907""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_907")"\n"
+"\t"STUB_ASM_CODE("907")"\n"
+
+".hidden ""shared_dispatch_stub_908""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_908")"\n"
+"\t"STUB_ASM_CODE("908")"\n"
+
+".hidden ""shared_dispatch_stub_909""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_909")"\n"
+"\t"STUB_ASM_CODE("909")"\n"
+
+".hidden ""shared_dispatch_stub_910""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_910")"\n"
+"\t"STUB_ASM_CODE("910")"\n"
+
+".hidden ""shared_dispatch_stub_911""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_911")"\n"
+"\t"STUB_ASM_CODE("911")"\n"
+
+".hidden ""shared_dispatch_stub_912""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_912")"\n"
+"\t"STUB_ASM_CODE("912")"\n"
+
+".hidden ""shared_dispatch_stub_913""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_913")"\n"
+"\t"STUB_ASM_CODE("913")"\n"
+
+".hidden ""shared_dispatch_stub_914""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_914")"\n"
+"\t"STUB_ASM_CODE("914")"\n"
+
+".hidden ""shared_dispatch_stub_915""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_915")"\n"
+"\t"STUB_ASM_CODE("915")"\n"
+
+".hidden ""shared_dispatch_stub_916""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_916")"\n"
+"\t"STUB_ASM_CODE("916")"\n"
+
+".hidden ""shared_dispatch_stub_917""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_917")"\n"
+"\t"STUB_ASM_CODE("917")"\n"
+
+".hidden ""shared_dispatch_stub_918""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_918")"\n"
+"\t"STUB_ASM_CODE("918")"\n"
+
+".hidden ""shared_dispatch_stub_919""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_919")"\n"
+"\t"STUB_ASM_CODE("919")"\n"
+
+".hidden ""shared_dispatch_stub_920""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_920")"\n"
+"\t"STUB_ASM_CODE("920")"\n"
+
+".hidden ""shared_dispatch_stub_921""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_921")"\n"
+"\t"STUB_ASM_CODE("921")"\n"
+
+".hidden ""shared_dispatch_stub_922""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_922")"\n"
+"\t"STUB_ASM_CODE("922")"\n"
+
+".hidden ""shared_dispatch_stub_923""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_923")"\n"
+"\t"STUB_ASM_CODE("923")"\n"
+
+".hidden ""shared_dispatch_stub_924""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_924")"\n"
+"\t"STUB_ASM_CODE("924")"\n"
+
+".hidden ""shared_dispatch_stub_925""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_925")"\n"
+"\t"STUB_ASM_CODE("925")"\n"
+
+".hidden ""shared_dispatch_stub_926""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_926")"\n"
+"\t"STUB_ASM_CODE("926")"\n"
+
+".hidden ""shared_dispatch_stub_927""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_927")"\n"
+"\t"STUB_ASM_CODE("927")"\n"
+
+".hidden ""shared_dispatch_stub_928""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_928")"\n"
+"\t"STUB_ASM_CODE("928")"\n"
+
+".hidden ""shared_dispatch_stub_929""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_929")"\n"
+"\t"STUB_ASM_CODE("929")"\n"
+
+".hidden ""shared_dispatch_stub_930""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_930")"\n"
+"\t"STUB_ASM_CODE("930")"\n"
+
+".hidden ""shared_dispatch_stub_931""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_931")"\n"
+"\t"STUB_ASM_CODE("931")"\n"
+
+".hidden ""shared_dispatch_stub_932""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_932")"\n"
+"\t"STUB_ASM_CODE("932")"\n"
+
+".hidden ""shared_dispatch_stub_933""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_933")"\n"
+"\t"STUB_ASM_CODE("933")"\n"
+
+".hidden ""shared_dispatch_stub_934""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_934")"\n"
+"\t"STUB_ASM_CODE("934")"\n"
+
+".hidden ""shared_dispatch_stub_935""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_935")"\n"
+"\t"STUB_ASM_CODE("935")"\n"
+
+".hidden ""shared_dispatch_stub_936""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_936")"\n"
+"\t"STUB_ASM_CODE("936")"\n"
+
+".hidden ""shared_dispatch_stub_937""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_937")"\n"
+"\t"STUB_ASM_CODE("937")"\n"
+
+".hidden ""shared_dispatch_stub_938""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_938")"\n"
+"\t"STUB_ASM_CODE("938")"\n"
+
+".hidden ""shared_dispatch_stub_939""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_939")"\n"
+"\t"STUB_ASM_CODE("939")"\n"
+
+".hidden ""shared_dispatch_stub_940""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_940")"\n"
+"\t"STUB_ASM_CODE("940")"\n"
+
+".hidden ""shared_dispatch_stub_941""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_941")"\n"
+"\t"STUB_ASM_CODE("941")"\n"
+
+".hidden ""shared_dispatch_stub_942""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_942")"\n"
+"\t"STUB_ASM_CODE("942")"\n"
+
+".hidden ""shared_dispatch_stub_943""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_943")"\n"
+"\t"STUB_ASM_CODE("943")"\n"
+
+".hidden ""shared_dispatch_stub_944""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_944")"\n"
+"\t"STUB_ASM_CODE("944")"\n"
+
+".hidden ""shared_dispatch_stub_945""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_945")"\n"
+"\t"STUB_ASM_CODE("945")"\n"
+
+".hidden ""shared_dispatch_stub_946""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_946")"\n"
+"\t"STUB_ASM_CODE("946")"\n"
+
+".hidden ""shared_dispatch_stub_947""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_947")"\n"
+"\t"STUB_ASM_CODE("947")"\n"
+
+".hidden ""shared_dispatch_stub_948""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_948")"\n"
+"\t"STUB_ASM_CODE("948")"\n"
+
+".hidden ""shared_dispatch_stub_949""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_949")"\n"
+"\t"STUB_ASM_CODE("949")"\n"
+
+".hidden ""shared_dispatch_stub_950""\n"
+STUB_ASM_ENTRY("shared_dispatch_stub_950")"\n"
+"\t"STUB_ASM_CODE("950")"\n"
+
+);
+#undef MAPI_TMP_STUB_ASM_GCC
+#endif /* MAPI_TMP_STUB_ASM_GCC */
diff --git a/src/mapi/vgapi/Makefile b/src/mapi/vgapi/Makefile
index e239e20987e..68cf26e83c3 100644
--- a/src/mapi/vgapi/Makefile
+++ b/src/mapi/vgapi/Makefile
@@ -81,11 +81,14 @@ install: default install-headers install-pc
$(MINSTALL) $(TOP)/$(LIB_DIR)/$(VG_LIB_GLOB) \
$(DESTDIR)$(INSTALL_LIB_DIR)
+# due to a bug in makedepend, cannot pass VGAPI_CPPFLAGS to it
+$(VGAPI_OBJECTS): vgapi_tmp.h
+
depend: $(VGAPI_SOURCES)
@echo "running $(MKDEP)"
@touch depend
@$(MKDEP) $(MKDEP_OPTIONS) -f- $(DEFINES) $(INCLUDE_DIRS) \
- $(VGAPI_CPPFLAGS) $(VGAPI_SOURCES) 2>/dev/null | \
+ $(VGAPI_SOURCES) 2>/dev/null | \
sed -e 's,^$(MAPI)/,,' > depend
-include depend
diff --git a/src/mapi/vgapi/SConscript b/src/mapi/vgapi/SConscript
index 42d86b69eef..ee6d9fb827c 100644
--- a/src/mapi/vgapi/SConscript
+++ b/src/mapi/vgapi/SConscript
@@ -44,13 +44,20 @@ if env['platform'] != 'winddk':
env.Depends(vgapi_objects, vgapi_header)
+ # libOpenVG.dll
+ env['LIBPREFIX'] = 'lib'
+ env['SHLIBPREFIX'] = 'lib'
+
openvg = env.SharedLibrary(
- target = 'libOpenVG',
+ target = 'OpenVG',
source = vgapi_objects,
)
env.InstallSharedLibrary(openvg, version=(1, 0, 0))
- vgapi = [env.FindIxes(openvg, 'LIBPREFIX', 'LIBSUFFIX')]
+ if env['platform'] == 'windows':
+ openvg = env.FindIxes(openvg, 'LIBPREFIX', 'LIBSUFFIX')
+ else:
+ openvg = env.FindIxes(openvg, 'SHLIBPREFIX', 'SHLIBSUFFIX')
- Export(['vgapi'])
+ Export(['openvg'])
diff --git a/src/mesa/Android.mk b/src/mesa/Android.mk
index 5f1b1341f92..f361aca3e4c 100644
--- a/src/mesa/Android.mk
+++ b/src/mesa/Android.mk
@@ -9,21 +9,23 @@ common_CFLAGS := \
-fvisibility=hidden \
-Wno-sign-compare
+ifeq ($(strip $(MESA_BUILD_CLASSIC)),true)
+common_CFLAGS += -DFEATURE_GL=1
+endif
+
common_C_INCLUDES := \
external/mesa/include \
external/mesa/src/mapi \
- external/mesa/src/glsl \
- external/mesa/src/talloc
+ external/mesa/src/glsl
ifeq ($(strip $(MESA_BUILD_GALLIUM)),true)
include $(CLEAR_VARS)
LOCAL_SRC_FILES := \
- $(filter-out $(MAIN_ES_SOURCES), $(MESA_GALLIUM_SOURCES)) \
+ $(MESA_GALLIUM_SOURCES) \
$(MESA_GALLIUM_CXX_SOURCES)
-LOCAL_CFLAGS := \
- $(common_CFLAGS)
+LOCAL_CFLAGS := $(common_CFLAGS)
LOCAL_C_INCLUDES := \
$(common_C_INCLUDES) \
@@ -31,29 +33,6 @@ LOCAL_C_INCLUDES := \
external/mesa/src/gallium/auxiliary
LOCAL_MODULE := libmesa_st_mesa
-LOCAL_MODULE_CLASS := STATIC_LIBRARIES
-
-#GEN_SCRIPT := python $(LOCAL_PATH)/main/es_generator.py
-#intermediates := $(call local-intermediates-dir)
-#
-#GEN := $(intermediates)/main/api_exec_es1.c
-#$(GEN): PRIVATE_CUSTOM_TOOL = $(GEN_SCRIPT) -S $< -V GLES1.1 > $@
-#$(GEN): $(LOCAL_PATH)/main/APIspec.xml
-# $(transform-generated-source)
-#
-#LOCAL_GENERATED_SOURCES += $(GEN)
-#
-#GEN := $(intermediates)/main/api_exec_es2.c
-#$(GEN): PRIVATE_CUSTOM_TOOL = $(GEN_SCRIPT) -S $< -V GLES2.0 > $@
-#$(GEN): $(LOCAL_PATH)/main/APIspec.xml
-# $(transform-generated-source)
-#
-#LOCAL_GENERATED_SOURCES += $(GEN)
-#
-#LOCAL_C_INCLUDES += \
-# $(call intermediates-dir-for,SHARED_LIBRARIES,libGLESv1_CM_mesa) \
-# $(call intermediates-dir-for,SHARED_LIBRARIES,libGLESv2_mesa)
-LOCAL_SRC_FILES += $(MAIN_ES_SOURCES)
include $(BUILD_STATIC_LIBRARY)
endif # MESA_BUILD_GALLIUM
@@ -65,12 +44,8 @@ LOCAL_SRC_FILES := \
$(MESA_SOURCES) \
$(MESA_CXX_SOURCES)
-LOCAL_CFLAGS := \
- $(common_CFLAGS) \
- -DFEATURE_GL=1
-
-LOCAL_C_INCLUDES := \
- $(common_C_INCLUDES)
+LOCAL_CFLAGS := $(common_CFLAGS)
+LOCAL_C_INCLUDES := $(common_C_INCLUDES)
LOCAL_MODULE := libmesa_classic_mesa
diff --git a/src/mesa/Makefile b/src/mesa/Makefile
index 8b0756b84ec..10d73f000e3 100644
--- a/src/mesa/Makefile
+++ b/src/mesa/Makefile
@@ -6,55 +6,44 @@ include $(TOP)/configs/current
MESA_LIBS := libmesa.a libmesagallium.a
DEPENDS := depend
-ifeq ($(GLES_OVERLAY),1)
-ES1_LIBS := libes1gallium.a
-ES2_LIBS := libes2gallium.a
-DEPENDS += depend.es1 depend.es2
-endif
-
MESA_OBJ_DIR := .
-ES1_OBJ_DIR := objs-es1
-ES2_OBJ_DIR := objs-es2
-
+DRICORE_OBJ_DIR := objs-dricore
include sources.mak
# adjust object dirs
-ES1_OBJECTS := $(addprefix $(ES1_OBJ_DIR)/, $(MESA_OBJECTS))
-ES2_OBJECTS := $(addprefix $(ES2_OBJ_DIR)/, $(MESA_OBJECTS))
MESA_OBJECTS := $(addprefix $(MESA_OBJ_DIR)/, $(MESA_OBJECTS))
-
-ES1_GALLIUM_OBJECTS := $(addprefix $(ES1_OBJ_DIR)/, $(MESA_GALLIUM_OBJECTS))
-ES2_GALLIUM_OBJECTS := $(addprefix $(ES2_OBJ_DIR)/, $(MESA_GALLIUM_OBJECTS))
MESA_GALLIUM_OBJECTS := $(addprefix $(MESA_OBJ_DIR)/, $(MESA_GALLIUM_OBJECTS))
+DRICORE_OBJECTS := $(addprefix $(DRICORE_OBJ_DIR)/, $(MESA_OBJECTS))
+
# define preprocessor flags
MESA_CPPFLAGS := $(API_DEFINES) $(DEFINES)
-ES1_CPPFLAGS := -DFEATURE_ES1=1 $(DEFINES)
-ES2_CPPFLAGS := -DFEATURE_ES2=1 $(DEFINES)
# append include dirs
-MESA_CPPFLAGS += $(INCLUDE_DIRS) $(TALLOC_CFLAGS)
-ES1_CPPFLAGS += -I$(TOP)/src/mapi/es1api $(INCLUDE_DIRS) $(TALLOC_CFLAGS)
-ES2_CPPFLAGS += -I$(TOP)/src/mapi/es2api $(INCLUDE_DIRS) $(TALLOC_CFLAGS)
+MESA_CPPFLAGS += $(INCLUDE_DIRS)
+
+DRICORE_CPPFLAGS = $(MESA_CPPFLAGS)
# tidy compiler flags
CFLAGS := $(filter-out $(DEFINES), $(CFLAGS))
CXXFLAGS := $(filter-out $(DEFINES), $(CXXFLAGS))
# LLVM is needed for the state tracker
-MESA_CFLAGS := $(LLVM_CFLAGS)
-ES1_CFLAGS := $(LLVM_CFLAGS)
-ES2_CFLAGS := $(LLVM_CFLAGS)
+MESA_CFLAGS := $(LLVM_CFLAGS) $(CFLAGS)
+DRICORE_CFLAGS := $(LLVM_CFLAGS) $(DRI_CFLAGS)
+
+MESA_CXXFLAGS := $(LLVM_CFLAGS) $(CXXFLAGS)
+DRICORE_CXXFLAGS := $(LLVM_CFLAGS) $(DRI_CXXFLAGS)
define mesa-cc-c
@mkdir -p $(dir $@)
- $(CC) -c -o $@ $< $($(1)_CPPFLAGS) $($(1)_CFLAGS) $(CFLAGS)
+ $(CC) -c -o $@ $< $($(1)_CPPFLAGS) $($(1)_CFLAGS)
endef
define mesa-cxx-c
@mkdir -p $(dir $@)
- $(CXX) -c -o $@ $< $($(1)_CPPFLAGS) $($(1)_CFLAGS) $(CXXFLAGS)
+ $(CXX) -c -o $@ $< $($(1)_CPPFLAGS) $($(1)_CFLAGS) $($(1)_CXXFLAGS)
endef
$(MESA_OBJ_DIR)/%.o: %.c
@@ -66,29 +55,18 @@ $(MESA_OBJ_DIR)/%.o: %.cpp
$(MESA_OBJ_DIR)/%.o: %.S
$(call mesa-cc-c,MESA)
-$(ES1_OBJ_DIR)/%.o: %.c
- $(call mesa-cc-c,ES1)
-
-$(ES1_OBJ_DIR)/%.o: %.cpp
- $(call mesa-cxx-c,ES1)
-
-$(ES1_OBJ_DIR)/%.o: %.S
- $(call mesa-cc-c,ES1)
-
-$(ES2_OBJ_DIR)/%.o: %.c
- $(call mesa-cc-c,ES2)
-
-$(ES2_OBJ_DIR)/%.o: %.cpp
- $(call mesa-cxx-c,ES2)
+$(DRICORE_OBJ_DIR)/%.o: %.c
+ $(call mesa-cc-c,DRICORE)
-$(ES2_OBJ_DIR)/%.o: %.S
- $(call mesa-cc-c,ES2)
+$(DRICORE_OBJ_DIR)/%.o: %.cpp
+ $(call mesa-cxx-c,DRICORE)
+$(DRICORE_OBJ_DIR)/%.o: %.S
+ $(call mesa-cc-c,DRICORE)
# Default: build dependencies, then asm_subdirs, GLSL built-in lib,
# then convenience libs (.a) and finally the device drivers:
-default: $(DEPENDS) asm_subdirs \
- $(MESA_LIBS) $(ES1_LIBS) $(ES2_LIBS) driver_subdirs
+default: $(DEPENDS) asm_subdirs $(MESA_LIBS) $(DRICORE_LIBS) driver_subdirs
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 > $@
@@ -96,6 +74,12 @@ main/api_exec_es1.c: main/APIspec.xml main/es_generator.py main/APIspecutil.py m
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 > $@
+program/program_parse.tab.c program/program_parse.tab.h: program/program_parse.y
+ bison -v -d --output=program/program_parse.tab.c $<
+
+program/lex.yy.c: program/program_lexer.l
+ flex --never-interactive --outfile=$@ $<
+
######################################################################
# Helper libraries used by many drivers:
@@ -103,25 +87,20 @@ main/api_exec_es2.c: main/APIspec.xml main/es_generator.py main/APIspecutil.py m
libmesa.a: $(MESA_OBJECTS) $(GLSL_LIBS)
@ $(MKLIB) -o mesa -static $(MESA_OBJECTS) $(GLSL_LIBS)
-libes1.a: $(ES1_OBJECTS) $(GLSL_LIBS)
- @$(MKLIB) -o es1 -static $(ES1_OBJECTS) $(GLSL_LIBS)
-
-libes2.a: $(ES2_OBJECTS) $(GLSL_LIBS)
- @$(MKLIB) -o es2 -static $(ES2_OBJECTS) $(GLSL_LIBS)
+# Shared dricore library for classic DRI drivers
+$(TOP)/$(LIB_DIR)/libdricore.so: $(DRICORE_OBJECTS) $(DRICORE_GLSL_LIBS)
+ @$(MKLIB) -o $@ -linker '$(CXX)' -ldflags '$(LDFLAGS)' \
+ -cplusplus -noprefix \
+ -install $(TOP)/$(LIB_DIR) -id $(DRI_DRIVER_INSTALL_DIR)/$@.dylib \
+ $(DRICORE_LIB_DEPS) $(DRICORE_OBJECTS)
# Make archive of subset of core mesa object files for gallium
libmesagallium.a: $(MESA_GALLIUM_OBJECTS) $(GLSL_LIBS)
@ $(MKLIB) -o mesagallium -static $(MESA_GALLIUM_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)
-
######################################################################
# Device drivers
-driver_subdirs: $(MESA_LIBS)
+driver_subdirs: $(MESA_LIBS) $(DRICORE_LIBS)
@ (cd drivers && $(MAKE))
@@ -146,18 +125,6 @@ depend: $(ALL_SOURCES)
@$(MKDEP) $(MKDEP_OPTIONS) -p$(MESA_OBJ_DIR)/ $(MESA_CPPFLAGS) \
$(ALL_SOURCES) > /dev/null 2>/dev/null
-depend.es1: $(ALL_SOURCES)
- @echo "running $(MKDEP) for ES1"
- @touch $@
- @$(MKDEP) $(MKDEP_OPTIONS) -f$@ -p$(ES1_OBJ_DIR)/ $(ES1_CPPFLAGS) \
- $(ALL_SOURCES) > /dev/null 2>/dev/null
-
-depend.es2: $(ALL_SOURCES)
- @echo "running $(MKDEP) for ES2"
- @touch $@
- @$(MKDEP) $(MKDEP_OPTIONS) -f$@ -p$(ES2_OBJ_DIR)/ $(ES2_CPPFLAGS) \
- $(ALL_SOURCES) > /dev/null 2>/dev/null
-
######################################################################
# Installation rules
@@ -165,9 +132,12 @@ depend.es2: $(ALL_SOURCES)
new_install:
(cd drivers && $(MAKE) install)
+ifneq (,$(DRICORE_LIBS))
+DRICORE_INSTALL_TARGET = install-dricore
+endif
# XXX replace this with new_install above someday
-install: default
+install: default $(DRICORE_INSTALL_TARGET)
@for driver in $(DRIVER_DIRS) ; do \
case "$$driver" in \
osmesa) if [ "$(DRIVER_DIRS)" = osmesa ]; then \
@@ -192,6 +162,7 @@ gl_pcedit = sed \
-e 's,@GL_PC_REQ_PRIV@,$(GL_PC_REQ_PRIV),' \
-e 's,@GL_PC_LIB_PRIV@,$(GL_PC_LIB_PRIV),' \
-e 's,@GL_PC_CFLAGS@,$(GL_PC_CFLAGS),' \
+ -e 's,@GLX_TLS@,$(GLX_TLS),' \
-e 's,@GL_LIB@,$(GL_LIB),'
gl.pc: gl.pc.in
@@ -228,23 +199,22 @@ install-osmesa: default osmesa.pc
install-dri: default
cd drivers/dri && $(MAKE) install
+# We don't need MINSTALL here because we're not installing symbolic links
+install-dricore: default
+ $(INSTALL) -d $(DESTDIR)$(DRI_DRIVER_INSTALL_DIR)
+ $(INSTALL) -m 755 $(DRICORE_LIBS) $(DESTDIR)$(DRI_DRIVER_INSTALL_DIR)
# Emacs tags
tags:
etags `find . -name \*.[ch]` $(TOP)/include/GL/*.h
-clean-es1:
- -rm -f $(ES1_LIBS)
- -rm -rf $(ES1_OBJ_DIR)
- -rm -f depend.es1 depend.es1.bak
-
-clean-es2:
- -rm -f $(ES2_LIBS)
- -rm -rf $(ES2_OBJ_DIR)
- -rm -f depend.es2 depend.es2.bak
+clean-dricore:
+ -rm -f libdricore.so
+ -rm -f $(DRICORE_LIBS)
+ -rm -rf $(DRICORE_OBJ_DIR)
-clean: clean-es1 clean-es2
+clean: clean-dricore
-rm -f */*.o
-rm -f */*/*.o
-rm -f depend depend.bak libmesa.a libmesagallium.a
diff --git a/src/mesa/SConscript b/src/mesa/SConscript
index cc4ad09fa33..261242f6fc9 100644
--- a/src/mesa/SConscript
+++ b/src/mesa/SConscript
@@ -12,12 +12,18 @@ env.Append(CPPPATH = [
'#/src/mesa',
])
+env.Append(CPPDEFINES = [
+ 'FEATURE_GL=1',
+])
+
if env['platform'] == 'windows':
env.Append(CPPDEFINES = [
'_GDI32_', # prevent gl* being declared __declspec(dllimport) in MS headers
'BUILD_GL32', # declare gl* as __declspec(dllexport) in Mesa headers
])
- env.Prepend(CPPPATH = ['#src/talloc'])
+ if not env['gles']:
+ # prevent _glapi_* from being declared __declspec(dllimport)
+ env.Append(CPPDEFINES = ['_GLAPI_NO_EXPORTS'])
else:
env.Append(CPPDEFINES = [
'IN_DRI_DRIVER', # enable the remap table (for DRI drivers)
@@ -62,6 +68,7 @@ main_sources = [
'main/extensions.c',
'main/fbobject.c',
'main/feedback.c',
+ 'main/ff_fragment_shader.cpp',
'main/ffvertex_prog.c',
'main/fog.c',
'main/formats.c',
@@ -81,6 +88,7 @@ main_sources = [
'main/multisample.c',
'main/nvprogram.c',
'main/pack.c',
+ 'main/pbo.c',
'main/pixel.c',
'main/pixelstore.c',
'main/pixeltransfer.c',
@@ -100,10 +108,10 @@ main_sources = [
'main/stencil.c',
'main/syncobj.c',
'main/texcompress.c',
+ 'main/texcompress_rgtc.c',
'main/texcompress_s3tc.c',
'main/texcompress_fxt1.c',
'main/texenv.c',
- 'main/texenvprogram.c',
'main/texfetch.c',
'main/texformat.c',
'main/texgen.c',
@@ -115,6 +123,7 @@ main_sources = [
'main/texrender.c',
'main/texstate.c',
'main/texstore.c',
+ 'main/texturebarrier.c',
'main/transformfeedback.c',
'main/uniforms.c',
'main/varray.c',
@@ -189,8 +198,10 @@ statetracker_sources = [
'state_tracker/st_cb_queryobj.c',
'state_tracker/st_cb_rasterpos.c',
'state_tracker/st_cb_readpixels.c',
+ 'state_tracker/st_cb_syncobj.c',
'state_tracker/st_cb_strings.c',
'state_tracker/st_cb_texture.c',
+ 'state_tracker/st_cb_texturebarrier.c',
'state_tracker/st_cb_viewport.c',
'state_tracker/st_cb_xformfb.c',
'state_tracker/st_context.c',
@@ -206,15 +217,21 @@ statetracker_sources = [
'state_tracker/st_texture.c',
]
+env.Append(YACCFLAGS = '-d')
+program_lex = env.CFile('program/lex.yy.c', 'program/program_lexer.l')
+program_parse = env.CFile('program/program_parse.tab.c',
+ 'program/program_parse.y')
+
+# Make program/program_parse.tab.h reacheable from the include path
+env.Append(CPPPATH = [Dir('.').abspath])
+
program_sources = [
'program/arbprogparse.c',
'program/hash_table.c',
'program/ir_to_mesa.cpp',
- 'program/lex.yy.c',
'program/nvfragparse.c',
'program/nvvertparse.c',
'program/program.c',
- 'program/program_parse.tab.c',
'program/program_parse_extra.c',
'program/prog_cache.c',
'program/prog_execute.c',
@@ -229,6 +246,8 @@ program_sources = [
'program/programopt.c',
'program/sampler.cpp',
'program/symbol_table.c',
+ program_lex,
+ program_parse[0],
]
mesa_sources = (
@@ -240,6 +259,61 @@ mesa_sources = (
statetracker_sources
)
+if env['gles']:
+ from sys import executable as python_cmd
+
+ env.Append(CPPDEFINES = ['FEATURE_ES1=1', 'FEATURE_ES2=1'])
+
+ # generate GLES sources
+ gles_sources = []
+ gles_sources += env.CodeGenerate(
+ target = 'main/api_exec_es1.c',
+ script = 'main/es_generator.py',
+ source = 'main/APIspec.xml',
+ command = python_cmd + ' $SCRIPT -S $SOURCE -V GLES1.1 > $TARGET'
+ )
+ gles_sources += env.CodeGenerate(
+ target = 'main/api_exec_es2.c',
+ script = 'main/es_generator.py',
+ source = 'main/APIspec.xml',
+ command = python_cmd + ' $SCRIPT -S $SOURCE -V GLES2.0 > $TARGET'
+ )
+
+ # generate GLES headers
+ GLAPI = '#src/mapi/glapi/'
+ gles_headers = []
+ gles_headers += env.CodeGenerate(
+ target = 'es1api/main/glapidispatch.h',
+ script = GLAPI + 'gen/gl_table.py',
+ source = GLAPI + 'gen-es/es1_API.xml',
+ command = python_cmd + ' $SCRIPT -c -m remap_table -f $SOURCE > $TARGET',
+ )
+ gles_headers += env.CodeGenerate(
+ target = 'es1api/main/remap_helper.h',
+ script = GLAPI + 'gen/remap_helper.py',
+ source = GLAPI + 'gen-es/es1_API.xml',
+ command = python_cmd + ' $SCRIPT -f $SOURCE > $TARGET',
+ )
+ gles_headers += env.CodeGenerate(
+ target = 'es2api/main/glapidispatch.h',
+ script = GLAPI + 'gen/gl_table.py',
+ source = GLAPI + 'gen-es/es2_API.xml',
+ command = python_cmd + ' $SCRIPT -c -m remap_table -f $SOURCE > $TARGET',
+ )
+ gles_headers += env.CodeGenerate(
+ target = 'es2api/main/remap_helper.h',
+ script = GLAPI + 'gen/remap_helper.py',
+ source = GLAPI + 'gen-es/es2_API.xml',
+ command = python_cmd + ' $SCRIPT -f $SOURCE > $TARGET',
+ )
+
+ env.Depends(gles_sources, gles_headers)
+
+ # gles_sources #include gles_headers with full path
+ env.Append(CPPPATH = [gles_headers[0].dir.up().up()])
+
+ mesa_sources += gles_sources
+
#
# Assembly sources
#
diff --git a/src/mesa/drivers/Android.mk b/src/mesa/drivers/Android.mk
index 00de3c1a82f..7fb540af11c 100644
--- a/src/mesa/drivers/Android.mk
+++ b/src/mesa/drivers/Android.mk
@@ -1,15 +1,6 @@
-LOCAL_PATH := $(call my-dir)
+# Android.mk for DRI drivers
-# from dri/Makefile.template
-COMMON_SOURCES = \
- dri/common/utils.c \
- dri/common/vblank.c \
- dri/common/dri_util.c \
- dri/common/xmlconfig.c \
- dri/common/texmem.c \
- dri/common/drirenderbuffer.c \
- dri/common/dri_metaops.c \
- common/driverfuncs.c
+LOCAL_PATH := $(call my-dir)
# from dri/i915/Makefile
i915_DRIVER_SOURCES = \
@@ -59,6 +50,7 @@ i915_DRIVER_SOURCES = \
intel_fbo.c
i915_DRIVER_SOURCES := $(addprefix dri/i915/, $(i915_DRIVER_SOURCES))
+# from dri/i965/Makefile
i965_DRIVER_SOURCES = \
intel_batchbuffer.c \
intel_blit.c \
@@ -158,11 +150,22 @@ i965_CXX_SOURCES = \
brw_fs.cpp \
brw_fs_channel_expressions.cpp \
brw_fs_reg_allocate.cpp \
+ brw_fs_schedule_instructions.cpp \
brw_fs_vector_splitting.cpp
i965_DRIVER_SOURCES := \
$(addprefix dri/i965/, $(i965_DRIVER_SOURCES)) \
$(addprefix dri/i965/, $(i965_CXX_SOURCES))
+# from dri/Makefile.template
+common_SOURCES = \
+ dri/common/utils.c \
+ dri/common/vblank.c \
+ dri/common/dri_util.c \
+ dri/common/xmlconfig.c \
+ dri/common/texmem.c \
+ dri/common/drirenderbuffer.c \
+ common/driverfuncs.c
+
common_CFLAGS := \
-DPTHREADS \
-DFEATURE_GL=1 \
@@ -175,7 +178,6 @@ common_C_INCLUDES := \
external/mesa/include \
external/mesa/src/mapi \
external/mesa/src/glsl \
- external/mesa/src/talloc \
external/mesa/src/mesa \
external/mesa/src/mesa/drivers/dri/common \
external/drm/ \
@@ -185,27 +187,23 @@ common_C_INCLUDES := \
common_STATIC_LIBRARIES := \
libmesa_classic_mesa \
libmesa_glsl \
- libmesa_classic_mesa \
- libmesa_talloc \
- libmesa_classic_egl
-
-common_WHOLE_STATIC_LIBRARIES := \
- libmesa_egl \
- libmesa_glapi
+ libmesa_classic_mesa
common_SHARED_LIBRARIES := \
+ libglapi \
libdl \
libdrm \
libexpat \
- libhardware \
liblog \
libcutils
+common_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)/dri
+
ifeq ($(strip $(MESA_BUILD_I915C)),true)
include $(CLEAR_VARS)
LOCAL_SRC_FILES := \
- $(COMMON_SOURCES) \
+ $(common_SOURCES) \
$(i915_DRIVER_SOURCES)
LOCAL_CFLAGS := \
@@ -220,15 +218,12 @@ LOCAL_C_INCLUDES := \
LOCAL_STATIC_LIBRARIES := \
$(common_STATIC_LIBRARIES)
-LOCAL_WHOLE_STATIC_LIBRARIES := \
- $(common_WHOLE_STATIC_LIBRARIES)
-
LOCAL_SHARED_LIBRARIES := \
$(common_SHARED_LIBRARIES) \
libdrm_intel
-LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)/egl
-LOCAL_MODULE := libGLES_i915c
+LOCAL_MODULE := i915_dri
+LOCAL_MODULE_PATH := $(common_MODULE_PATH)
include $(BUILD_SHARED_LIBRARY)
endif # MESA_BUILD_I915C
@@ -237,7 +232,7 @@ ifeq ($(strip $(MESA_BUILD_I965C)),true)
include $(CLEAR_VARS)
LOCAL_SRC_FILES := \
- $(COMMON_SOURCES) \
+ $(common_SOURCES) \
$(i965_DRIVER_SOURCES)
LOCAL_CFLAGS := \
@@ -252,15 +247,12 @@ LOCAL_C_INCLUDES := \
LOCAL_STATIC_LIBRARIES := \
$(common_STATIC_LIBRARIES)
-LOCAL_WHOLE_STATIC_LIBRARIES := \
- $(common_WHOLE_STATIC_LIBRARIES)
-
LOCAL_SHARED_LIBRARIES := \
$(common_SHARED_LIBRARIES) \
libdrm_intel
-LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)/egl
-LOCAL_MODULE := libGLES_i965c
+LOCAL_MODULE := i965_dri
+LOCAL_MODULE_PATH := $(common_MODULE_PATH)
include $(BUILD_SHARED_LIBRARY)
endif # MESA_BUILD_I965C
diff --git a/src/mesa/drivers/beos/GLView.cpp b/src/mesa/drivers/beos/GLView.cpp
index ee3415b3d1a..57c4614f32d 100644
--- a/src/mesa/drivers/beos/GLView.cpp
+++ b/src/mesa/drivers/beos/GLView.cpp
@@ -50,7 +50,6 @@ extern "C" {
#include "swrast/s_depth.h"
#include "swrast/s_lines.h"
#include "swrast/s_triangle.h"
-#include "swrast/s_trispan.h"
#include "tnl/tnl.h"
#include "tnl/t_context.h"
#include "tnl/t_pipeline.h"
@@ -319,7 +318,8 @@ BGLView::BGLView(BRect rect, char *name,
functions.Viewport = md->Viewport;
// create core context
- struct gl_context *ctx = _mesa_create_context(visual, NULL, &functions, md);
+ struct gl_context *ctx = _mesa_create_context(API_OPENGL, visual,
+ NULL, &functions, md);
if (! ctx) {
_mesa_destroy_visual(visual);
delete md;
diff --git a/src/mesa/drivers/common/driverfuncs.c b/src/mesa/drivers/common/driverfuncs.c
index fc67bee98c6..854dea94504 100644
--- a/src/mesa/drivers/common/driverfuncs.c
+++ b/src/mesa/drivers/common/driverfuncs.c
@@ -42,6 +42,7 @@
#include "main/fbobject.h"
#include "main/texrender.h"
#include "main/syncobj.h"
+#include "main/texturebarrier.h"
#include "main/transformfeedback.h"
#include "program/program.h"
@@ -184,9 +185,12 @@ _mesa_init_driver_functions(struct dd_function_table *driver)
driver->RenderTexture = _mesa_render_texture;
driver->FinishRenderTexture = _mesa_finish_render_texture;
driver->FramebufferRenderbuffer = _mesa_framebuffer_renderbuffer;
+ driver->ValidateFramebuffer = _mesa_validate_framebuffer;
driver->BlitFramebuffer = _swrast_BlitFramebuffer;
+ _mesa_init_texture_barrier_functions(driver);
+
/* APPLE_vertex_array_object */
driver->NewArrayObject = _mesa_new_array_object;
driver->DeleteArrayObject = _mesa_delete_array_object;
@@ -231,13 +235,14 @@ _mesa_init_driver_state(struct gl_context *ctx)
ctx->Driver.BlendColor(ctx, ctx->Color.BlendColor);
ctx->Driver.BlendEquationSeparate(ctx,
- ctx->Color.BlendEquationRGB,
- ctx->Color.BlendEquationA);
+ ctx->Color.Blend[0].EquationRGB,
+ ctx->Color.Blend[0].EquationA);
ctx->Driver.BlendFuncSeparate(ctx,
- ctx->Color.BlendSrcRGB,
- ctx->Color.BlendDstRGB,
- ctx->Color.BlendSrcA, ctx->Color.BlendDstA);
+ ctx->Color.Blend[0].SrcRGB,
+ ctx->Color.Blend[0].DstRGB,
+ ctx->Color.Blend[0].SrcA,
+ ctx->Color.Blend[0].DstA);
if (ctx->Driver.ColorMaskIndexed) {
GLuint i;
diff --git a/src/mesa/drivers/common/meta.c b/src/mesa/drivers/common/meta.c
index 5e0e9a12df2..f71aac5e54f 100644
--- a/src/mesa/drivers/common/meta.c
+++ b/src/mesa/drivers/common/meta.c
@@ -48,6 +48,7 @@
#include "main/macros.h"
#include "main/matrix.h"
#include "main/mipmap.h"
+#include "main/pbo.h"
#include "main/polygon.h"
#include "main/readpix.h"
#include "main/scissor.h"
@@ -266,7 +267,7 @@ struct gen_mipmap_state
GLuint FBO;
};
-
+#define MAX_META_OPS_DEPTH 2
/**
* State for glDrawTex()
*/
@@ -282,7 +283,10 @@ struct drawtex_state
*/
struct gl_meta_state
{
- struct save_state Save; /**< state saved during meta-ops */
+ /** Stack of state saved during meta-ops */
+ struct save_state Save[MAX_META_OPS_DEPTH];
+ /** Save stack depth */
+ GLuint SaveStackDepth;
struct temp_texture TempTex;
@@ -335,8 +339,13 @@ _mesa_meta_free(struct gl_context *ctx)
static void
_mesa_meta_begin(struct gl_context *ctx, GLbitfield state)
{
- struct save_state *save = &ctx->Meta->Save;
+ struct save_state *save;
+
+ /* hope MAX_META_OPS_DEPTH is large enough */
+ assert(ctx->Meta->SaveStackDepth < MAX_META_OPS_DEPTH);
+ save = &ctx->Meta->Save[ctx->Meta->SaveStackDepth++];
+ memset(save, 0, sizeof(*save));
save->SavedState = state;
if (state & META_ALPHA_TEST) {
@@ -586,7 +595,7 @@ _mesa_meta_begin(struct gl_context *ctx, GLbitfield state)
static void
_mesa_meta_end(struct gl_context *ctx)
{
- struct save_state *save = &ctx->Meta->Save;
+ struct save_state *save = &ctx->Meta->Save[--ctx->Meta->SaveStackDepth];
const GLbitfield state = save->SavedState;
if (state & META_ALPHA_TEST) {
@@ -2263,7 +2272,6 @@ _mesa_meta_GenerateMipmap(struct gl_context *ctx, GLenum target,
const GLuint maxLevel = texObj->MaxLevel;
const GLenum minFilterSave = texObj->MinFilter;
const GLenum magFilterSave = texObj->MagFilter;
- const GLint baseLevelSave = texObj->BaseLevel;
const GLint maxLevelSave = texObj->MaxLevel;
const GLboolean genMipmapSave = texObj->GenerateMipmap;
const GLenum wrapSSave = texObj->WrapS;
@@ -2323,7 +2331,7 @@ _mesa_meta_GenerateMipmap(struct gl_context *ctx, GLenum target,
}
_mesa_BindFramebufferEXT(GL_FRAMEBUFFER_EXT, mipmap->FBO);
- _mesa_TexParameteri(target, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
+ _mesa_TexParameteri(target, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR);
_mesa_TexParameteri(target, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
_mesa_TexParameteri(target, GL_GENERATE_MIPMAP, GL_FALSE);
_mesa_TexParameteri(target, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
@@ -2499,8 +2507,7 @@ _mesa_meta_GenerateMipmap(struct gl_context *ctx, GLenum target,
}
}
- /* limit sampling to src level */
- _mesa_TexParameteri(target, GL_TEXTURE_BASE_LEVEL, srcLevel);
+ /* limit minification to src level */
_mesa_TexParameteri(target, GL_TEXTURE_MAX_LEVEL, srcLevel);
/* Set to draw into the current dstLevel */
@@ -2552,7 +2559,6 @@ _mesa_meta_GenerateMipmap(struct gl_context *ctx, GLenum target,
_mesa_TexParameteri(target, GL_TEXTURE_MIN_FILTER, minFilterSave);
_mesa_TexParameteri(target, GL_TEXTURE_MAG_FILTER, magFilterSave);
- _mesa_TexParameteri(target, GL_TEXTURE_BASE_LEVEL, baseLevelSave);
_mesa_TexParameteri(target, GL_TEXTURE_MAX_LEVEL, maxLevelSave);
_mesa_TexParameteri(target, GL_GENERATE_MIPMAP, genMipmapSave);
_mesa_TexParameteri(target, GL_TEXTURE_WRAP_S, wrapSSave);
diff --git a/src/mesa/drivers/dri/Makefile.template b/src/mesa/drivers/dri/Makefile.template
index 4ecddbc0483..d1a119379ed 100644
--- a/src/mesa/drivers/dri/Makefile.template
+++ b/src/mesa/drivers/dri/Makefile.template
@@ -1,7 +1,5 @@
# -*-makefile-*-
-MESA_MODULES = $(TOP)/src/mesa/libmesa.a
-
COMMON_GALLIUM_SOURCES = \
../common/utils.c \
../common/vblank.c \
@@ -11,8 +9,7 @@ COMMON_GALLIUM_SOURCES = \
COMMON_SOURCES = $(COMMON_GALLIUM_SOURCES) \
../../common/driverfuncs.c \
../common/texmem.c \
- ../common/drirenderbuffer.c \
- ../common/dri_metaops.c
+ ../common/drirenderbuffer.c
INCLUDES = $(SHARED_INCLUDES) $(EXPAT_INCLUDES)
@@ -39,13 +36,13 @@ CXXFLAGS += $(API_DEFINES)
##### RULES #####
.c.o:
- $(CC) -c $(INCLUDES) $(CFLAGS) $(DRIVER_DEFINES) $< -o $@
+ $(CC) -c $(INCLUDES) $(DRI_CFLAGS) $(DRIVER_DEFINES) $< -o $@
.cpp.o:
- $(CC) -c $(INCLUDES) $(CXXFLAGS) $(DRIVER_DEFINES) $< -o $@
+ $(CC) -c $(INCLUDES) $(DRI_CXXFLAGS) $(DRIVER_DEFINES) $< -o $@
.S.o:
- $(CC) -c $(INCLUDES) $(CFLAGS) $(DRIVER_DEFINES) $< -o $@
+ $(CC) -c $(INCLUDES) $(DRI_CFLAGS) $(DRIVER_DEFINES) $< -o $@
##### TARGETS #####
@@ -57,10 +54,10 @@ default: subdirs lib
lib: symlinks subdirs depend
@$(MAKE) $(LIBNAME) $(TOP)/$(LIB_DIR)/$(LIBNAME)
-$(LIBNAME): $(OBJECTS) $(MESA_MODULES) $(EXTRA_MODULES) Makefile \
+$(LIBNAME): $(OBJECTS) $(EXTRA_MODULES) $(MESA_MODULES) Makefile \
$(TOP)/src/mesa/drivers/dri/Makefile.template $(TOP)/src/mesa/drivers/dri/common/dri_test.o
$(MKLIB) -o $@.tmp -noprefix -linker '$(CXX)' -ldflags '$(LDFLAGS)' \
- $(OBJECTS) $(MESA_MODULES) $(EXTRA_MODULES) $(DRI_LIB_DEPS)
+ $(OBJECTS) $(EXTRA_MODULES) $(DRI_LIB_DEPS)
$(CXX) $(CFLAGS) -o $@.test $(TOP)/src/mesa/drivers/dri/common/dri_test.o $@.tmp $(DRI_LIB_DEPS)
@rm -f $@.test
mv -f $@.tmp $@
diff --git a/src/mesa/drivers/dri/common/dri_metaops.c b/src/mesa/drivers/dri/common/dri_metaops.c
deleted file mode 100644
index e0bc3b88ecd..00000000000
--- a/src/mesa/drivers/dri/common/dri_metaops.c
+++ /dev/null
@@ -1,291 +0,0 @@
-/**************************************************************************
- *
- * Copyright 2006 Tungsten Graphics, Inc., Cedar Park, Texas.
- * Copyright 2009 Intel Corporation.
- * 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 "main/arbprogram.h"
-#include "main/arrayobj.h"
-#include "main/bufferobj.h"
-#include "main/context.h"
-#include "main/enable.h"
-#include "main/matrix.h"
-#include "main/texstate.h"
-#include "main/varray.h"
-#include "main/viewport.h"
-#include "program/program.h"
-#include "dri_metaops.h"
-
-void
-meta_set_passthrough_transform(struct dri_metaops *meta)
-{
- struct gl_context *ctx = meta->ctx;
-
- meta->saved_vp_x = ctx->Viewport.X;
- meta->saved_vp_y = ctx->Viewport.Y;
- meta->saved_vp_width = ctx->Viewport.Width;
- meta->saved_vp_height = ctx->Viewport.Height;
- meta->saved_matrix_mode = ctx->Transform.MatrixMode;
-
- meta->internal_viewport_call = GL_TRUE;
- _mesa_Viewport(0, 0, ctx->DrawBuffer->Width, ctx->DrawBuffer->Height);
- meta->internal_viewport_call = GL_FALSE;
-
- _mesa_MatrixMode(GL_PROJECTION);
- _mesa_PushMatrix();
- _mesa_LoadIdentity();
- _mesa_Ortho(0, ctx->DrawBuffer->Width, 0, ctx->DrawBuffer->Height, 1, -1);
-
- _mesa_MatrixMode(GL_MODELVIEW);
- _mesa_PushMatrix();
- _mesa_LoadIdentity();
-}
-
-void
-meta_restore_transform(struct dri_metaops *meta)
-{
- _mesa_MatrixMode(GL_PROJECTION);
- _mesa_PopMatrix();
- _mesa_MatrixMode(GL_MODELVIEW);
- _mesa_PopMatrix();
-
- _mesa_MatrixMode(meta->saved_matrix_mode);
-
- meta->internal_viewport_call = GL_TRUE;
- _mesa_Viewport(meta->saved_vp_x, meta->saved_vp_y,
- meta->saved_vp_width, meta->saved_vp_height);
- meta->internal_viewport_call = GL_FALSE;
-}
-
-
-/**
- * Set up a vertex program to pass through the position and first texcoord
- * for pixel path.
- */
-void
-meta_set_passthrough_vertex_program(struct dri_metaops *meta)
-{
- struct gl_context *ctx = meta->ctx;
- static const char *vp =
- "!!ARBvp1.0\n"
- "TEMP vertexClip;\n"
- "DP4 vertexClip.x, state.matrix.mvp.row[0], vertex.position;\n"
- "DP4 vertexClip.y, state.matrix.mvp.row[1], vertex.position;\n"
- "DP4 vertexClip.z, state.matrix.mvp.row[2], vertex.position;\n"
- "DP4 vertexClip.w, state.matrix.mvp.row[3], vertex.position;\n"
- "MOV result.position, vertexClip;\n"
- "MOV result.texcoord[0], vertex.texcoord[0];\n"
- "MOV result.color, vertex.color;\n"
- "END\n";
-
- assert(meta->saved_vp == NULL);
-
- _mesa_reference_vertprog(ctx, &meta->saved_vp,
- ctx->VertexProgram.Current);
- if (meta->passthrough_vp == NULL) {
- GLuint prog_name;
- _mesa_GenPrograms(1, &prog_name);
- _mesa_BindProgram(GL_VERTEX_PROGRAM_ARB, prog_name);
- _mesa_ProgramStringARB(GL_VERTEX_PROGRAM_ARB,
- GL_PROGRAM_FORMAT_ASCII_ARB,
- strlen(vp), (const GLubyte *)vp);
- _mesa_reference_vertprog(ctx, &meta->passthrough_vp,
- ctx->VertexProgram.Current);
- _mesa_DeletePrograms(1, &prog_name);
- }
-
- FLUSH_VERTICES(ctx, _NEW_PROGRAM);
- _mesa_reference_vertprog(ctx, &ctx->VertexProgram.Current,
- meta->passthrough_vp);
- ctx->Driver.BindProgram(ctx, GL_VERTEX_PROGRAM_ARB,
- &meta->passthrough_vp->Base);
-
- meta->saved_vp_enable = ctx->VertexProgram.Enabled;
- _mesa_Enable(GL_VERTEX_PROGRAM_ARB);
-}
-
-/**
- * Restores the previous vertex program after
- * meta_set_passthrough_vertex_program()
- */
-void
-meta_restore_vertex_program(struct dri_metaops *meta)
-{
- struct gl_context *ctx = meta->ctx;
-
- FLUSH_VERTICES(ctx, _NEW_PROGRAM);
- _mesa_reference_vertprog(ctx, &ctx->VertexProgram.Current,
- meta->saved_vp);
- _mesa_reference_vertprog(ctx, &meta->saved_vp, NULL);
- ctx->Driver.BindProgram(ctx, GL_VERTEX_PROGRAM_ARB,
- &ctx->VertexProgram.Current->Base);
-
- if (!meta->saved_vp_enable)
- _mesa_Disable(GL_VERTEX_PROGRAM_ARB);
-}
-
-/**
- * Binds the given program string to GL_FRAGMENT_PROGRAM_ARB, caching the
- * program object.
- */
-void
-meta_set_fragment_program(struct dri_metaops *meta,
- struct gl_fragment_program **prog,
- const char *prog_string)
-{
- struct gl_context *ctx = meta->ctx;
- assert(meta->saved_fp == NULL);
-
- _mesa_reference_fragprog(ctx, &meta->saved_fp,
- ctx->FragmentProgram.Current);
- if (*prog == NULL) {
- GLuint prog_name;
- _mesa_GenPrograms(1, &prog_name);
- _mesa_BindProgram(GL_FRAGMENT_PROGRAM_ARB, prog_name);
- _mesa_ProgramStringARB(GL_FRAGMENT_PROGRAM_ARB,
- GL_PROGRAM_FORMAT_ASCII_ARB,
- strlen(prog_string), (const GLubyte *)prog_string);
- _mesa_reference_fragprog(ctx, prog, ctx->FragmentProgram.Current);
- /* Note that DeletePrograms unbinds the program on us */
- _mesa_DeletePrograms(1, &prog_name);
- }
-
- FLUSH_VERTICES(ctx, _NEW_PROGRAM);
- _mesa_reference_fragprog(ctx, &ctx->FragmentProgram.Current, *prog);
- ctx->Driver.BindProgram(ctx, GL_FRAGMENT_PROGRAM_ARB, &((*prog)->Base));
-
- meta->saved_fp_enable = ctx->FragmentProgram.Enabled;
- _mesa_Enable(GL_FRAGMENT_PROGRAM_ARB);
-}
-
-/**
- * Restores the previous fragment program after
- * meta_set_fragment_program()
- */
-void
-meta_restore_fragment_program(struct dri_metaops *meta)
-{
- struct gl_context *ctx = meta->ctx;
-
- FLUSH_VERTICES(ctx, _NEW_PROGRAM);
- _mesa_reference_fragprog(ctx, &ctx->FragmentProgram.Current,
- meta->saved_fp);
- _mesa_reference_fragprog(ctx, &meta->saved_fp, NULL);
- ctx->Driver.BindProgram(ctx, GL_FRAGMENT_PROGRAM_ARB,
- &ctx->FragmentProgram.Current->Base);
-
- if (!meta->saved_fp_enable)
- _mesa_Disable(GL_FRAGMENT_PROGRAM_ARB);
-}
-
-static const float default_texcoords[4][2] = { { 0.0, 0.0 },
- { 1.0, 0.0 },
- { 1.0, 1.0 },
- { 0.0, 1.0 } };
-
-void
-meta_set_default_texrect(struct dri_metaops *meta)
-{
- struct gl_context *ctx = meta->ctx;
- struct gl_client_array *old_texcoord_array;
-
- meta->saved_active_texture = ctx->Texture.CurrentUnit;
- if (meta->saved_array_vbo == NULL) {
- _mesa_reference_buffer_object(ctx, &meta->saved_array_vbo,
- ctx->Array.ArrayBufferObj);
- }
-
- old_texcoord_array = &ctx->Array.ArrayObj->TexCoord[0];
- meta->saved_texcoord_type = old_texcoord_array->Type;
- meta->saved_texcoord_size = old_texcoord_array->Size;
- meta->saved_texcoord_stride = old_texcoord_array->Stride;
- meta->saved_texcoord_enable = old_texcoord_array->Enabled;
- meta->saved_texcoord_ptr = old_texcoord_array->Ptr;
- _mesa_reference_buffer_object(ctx, &meta->saved_texcoord_vbo,
- old_texcoord_array->BufferObj);
-
- _mesa_ClientActiveTextureARB(GL_TEXTURE0);
-
- if (meta->texcoord_vbo == NULL) {
- GLuint vbo_name;
-
- _mesa_GenBuffersARB(1, &vbo_name);
- _mesa_BindBufferARB(GL_ARRAY_BUFFER_ARB, vbo_name);
- _mesa_BufferDataARB(GL_ARRAY_BUFFER_ARB, sizeof(default_texcoords),
- default_texcoords, GL_STATIC_DRAW_ARB);
- _mesa_reference_buffer_object(ctx, &meta->texcoord_vbo,
- ctx->Array.ArrayBufferObj);
- } else {
- _mesa_BindBufferARB(GL_ARRAY_BUFFER_ARB,
- meta->texcoord_vbo->Name);
- }
- _mesa_TexCoordPointer(2, GL_FLOAT, 2 * sizeof(GLfloat), NULL);
-
- _mesa_Enable(GL_TEXTURE_COORD_ARRAY);
-}
-
-void
-meta_restore_texcoords(struct dri_metaops *meta)
-{
- struct gl_context *ctx = meta->ctx;
-
- /* Restore the old TexCoordPointer */
- if (meta->saved_texcoord_vbo) {
- _mesa_BindBufferARB(GL_ARRAY_BUFFER_ARB,
- meta->saved_texcoord_vbo->Name);
- _mesa_reference_buffer_object(ctx, &meta->saved_texcoord_vbo, NULL);
- } else {
- _mesa_BindBufferARB(GL_ARRAY_BUFFER_ARB, 0);
- }
-
- _mesa_TexCoordPointer(meta->saved_texcoord_size,
- meta->saved_texcoord_type,
- meta->saved_texcoord_stride,
- meta->saved_texcoord_ptr);
- if (!meta->saved_texcoord_enable)
- _mesa_Disable(GL_TEXTURE_COORD_ARRAY);
-
- _mesa_ClientActiveTextureARB(GL_TEXTURE0 +
- meta->saved_active_texture);
-
- if (meta->saved_array_vbo) {
- _mesa_BindBufferARB(GL_ARRAY_BUFFER_ARB,
- meta->saved_array_vbo->Name);
- _mesa_reference_buffer_object(ctx, &meta->saved_array_vbo, NULL);
- } else {
- _mesa_BindBufferARB(GL_ARRAY_BUFFER_ARB, 0);
- }
-}
-
-
-void meta_init_metaops(struct gl_context *ctx, struct dri_metaops *meta)
-{
- meta->ctx = ctx;
-}
-
-void meta_destroy_metaops(struct dri_metaops *meta)
-{
-
-}
diff --git a/src/mesa/drivers/dri/common/dri_metaops.h b/src/mesa/drivers/dri/common/dri_metaops.h
deleted file mode 100644
index aa7d4baa6e9..00000000000
--- a/src/mesa/drivers/dri/common/dri_metaops.h
+++ /dev/null
@@ -1,81 +0,0 @@
-/**************************************************************************
- *
- * Copyright 2006 Tungsten Graphics, Inc., Cedar Park, Texas.
- * Copyright 2009 Intel Corporation.
- * 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 DRI_METAOPS_H
-#define DRI_METAOPS_H
-
-
-struct dri_metaops {
- struct gl_context *ctx;
- GLboolean internal_viewport_call;
- struct gl_fragment_program *bitmap_fp;
- struct gl_vertex_program *passthrough_vp;
- struct gl_buffer_object *texcoord_vbo;
-
- struct gl_fragment_program *saved_fp;
- GLboolean saved_fp_enable;
- struct gl_vertex_program *saved_vp;
- GLboolean saved_vp_enable;
-
- struct gl_fragment_program *tex2d_fp;
-
- GLboolean saved_texcoord_enable;
- struct gl_buffer_object *saved_array_vbo, *saved_texcoord_vbo;
- GLenum saved_texcoord_type;
- GLsizei saved_texcoord_size, saved_texcoord_stride;
- const void *saved_texcoord_ptr;
- int saved_active_texture;
-
- GLint saved_vp_x, saved_vp_y;
- GLsizei saved_vp_width, saved_vp_height;
- GLenum saved_matrix_mode;
-};
-
-
-void meta_set_passthrough_transform(struct dri_metaops *meta);
-
-void meta_restore_transform(struct dri_metaops *meta);
-
-void meta_set_passthrough_vertex_program(struct dri_metaops *meta);
-
-void meta_restore_vertex_program(struct dri_metaops *meta);
-
-void meta_set_fragment_program(struct dri_metaops *meta,
- struct gl_fragment_program **prog,
- const char *prog_string);
-
-void meta_restore_fragment_program(struct dri_metaops *meta);
-
-void meta_set_default_texrect(struct dri_metaops *meta);
-
-void meta_restore_texcoords(struct dri_metaops *meta);
-
-void meta_init_metaops(struct gl_context *ctx, struct dri_metaops *meta);
-void meta_destroy_metaops(struct dri_metaops *meta);
-
-#endif
diff --git a/src/mesa/drivers/dri/common/dri_util.c b/src/mesa/drivers/dri/common/dri_util.c
index a5b71bd40ad..82638fa7207 100644
--- a/src/mesa/drivers/dri/common/dri_util.c
+++ b/src/mesa/drivers/dri/common/dri_util.c
@@ -481,6 +481,22 @@ dri2CreateNewDrawable(__DRIscreen *screen,
return pdraw;
}
+static __DRIbuffer *
+dri2AllocateBuffer(__DRIscreen *screen,
+ unsigned int attachment, unsigned int format,
+ int width, int height)
+{
+ return (*screen->DriverAPI.AllocateBuffer)(screen, attachment, format,
+ width, height);
+}
+
+static void
+dri2ReleaseBuffer(__DRIscreen *screen, __DRIbuffer *buffer)
+{
+ (*screen->DriverAPI.ReleaseBuffer)(screen, buffer);
+}
+
+
static int
dri2ConfigQueryb(__DRIscreen *screen, const char *var, GLboolean *val)
{
@@ -790,6 +806,9 @@ driCreateNewScreen(int scrn,
static const __DRIextension *emptyExtensionList[] = { NULL };
__DRIscreen *psp;
+ if (driDriverAPI.InitScreen == NULL)
+ return NULL;
+
psp = calloc(1, sizeof *psp);
if (!psp)
return NULL;
@@ -927,7 +946,9 @@ const __DRIdri2Extension driDRI2Extension = {
dri2CreateNewDrawable,
dri2CreateNewContext,
dri2GetAPIMask,
- dri2CreateNewContextForAPI
+ dri2CreateNewContextForAPI,
+ dri2AllocateBuffer,
+ dri2ReleaseBuffer
};
const __DRI2configQueryExtension dri2ConfigQueryExtension = {
diff --git a/src/mesa/drivers/dri/common/dri_util.h b/src/mesa/drivers/dri/common/dri_util.h
index ffffb99b301..3d3d5c9cd24 100644
--- a/src/mesa/drivers/dri/common/dri_util.h
+++ b/src/mesa/drivers/dri/common/dri_util.h
@@ -223,6 +223,12 @@ struct __DriverAPIRec {
/* DRI2 Entry point */
const __DRIconfig **(*InitScreen2) (__DRIscreen * priv);
+
+ __DRIbuffer *(*AllocateBuffer) (__DRIscreen *screenPrivate,
+ unsigned int attachment,
+ unsigned int format,
+ int width, int height);
+ void (*ReleaseBuffer) (__DRIscreen *screenPrivate, __DRIbuffer *buffer);
};
extern const struct __DriverAPIRec driDriverAPI;
diff --git a/src/mesa/drivers/dri/common/drisw_util.c b/src/mesa/drivers/dri/common/drisw_util.c
index 1529c23b16d..1bdb6d8939e 100644
--- a/src/mesa/drivers/dri/common/drisw_util.c
+++ b/src/mesa/drivers/dri/common/drisw_util.c
@@ -121,6 +121,48 @@ driCreateNewContext(__DRIscreen *psp, const __DRIconfig *config,
return pcp;
}
+static __DRIcontext *
+driCreateNewContextForAPI(__DRIscreen *psp, int api,
+ const __DRIconfig *config,
+ __DRIcontext *shared, void *data)
+{
+ __DRIcontext *pcp;
+ void * const shareCtx = (shared != NULL) ? shared->driverPrivate : NULL;
+ gl_api mesa_api;
+
+ switch (api) {
+ case __DRI_API_OPENGL:
+ mesa_api = API_OPENGL;
+ break;
+ case __DRI_API_GLES:
+ mesa_api = API_OPENGLES;
+ break;
+ case __DRI_API_GLES2:
+ mesa_api = API_OPENGLES2;
+ break;
+ default:
+ return NULL;
+ }
+
+ pcp = CALLOC_STRUCT(__DRIcontextRec);
+ if (!pcp)
+ return NULL;
+
+ pcp->loaderPrivate = data;
+
+ pcp->driScreenPriv = psp;
+ pcp->driDrawablePriv = NULL;
+ pcp->driReadablePriv = NULL;
+
+ if (!driDriverAPI.CreateContext(mesa_api,
+ &config->modes, pcp, shareCtx)) {
+ FREE(pcp);
+ return NULL;
+ }
+
+ return pcp;
+}
+
static void
driDestroyContext(__DRIcontext *pcp)
{
@@ -269,5 +311,6 @@ const __DRIcoreExtension driCoreExtension = {
const __DRIswrastExtension driSWRastExtension = {
{ __DRI_SWRAST, __DRI_SWRAST_VERSION },
driCreateNewScreen,
- driCreateNewDrawable
+ driCreateNewDrawable,
+ driCreateNewContextForAPI
};
diff --git a/src/mesa/drivers/dri/common/spantmp2.h b/src/mesa/drivers/dri/common/spantmp2.h
index abd79562f98..f436d1398c2 100644
--- a/src/mesa/drivers/dri/common/spantmp2.h
+++ b/src/mesa/drivers/dri/common/spantmp2.h
@@ -48,6 +48,15 @@
#define HW_WRITE_CLIPLOOP() HW_CLIPLOOP()
#endif
+#ifdef SPANTMP_MESA_FMT
+#define SPANTMP_PIXEL_FMT GL_NONE
+#define SPANTMP_PIXEL_TYPE GL_NONE
+#endif
+
+#ifndef SPANTMP_MESA_FMT
+#define SPANTMP_MESA_FMT MESA_FORMAT_COUNT
+#endif
+
#if (SPANTMP_PIXEL_FMT == GL_RGB) && (SPANTMP_PIXEL_TYPE == GL_UNSIGNED_SHORT_5_6_5)
/**
@@ -445,6 +454,118 @@
rgba[3] = p; \
} while (0)
+#elif (SPANTMP_MESA_FMT == MESA_FORMAT_R8)
+
+#ifndef GET_VALUE
+#ifndef GET_PTR
+#define GET_PTR(_x, _y) ( buf + (_x) + (_y) * pitch)
+#endif
+
+#define GET_VALUE(_x, _y) *(volatile GLubyte *)(GET_PTR(_x, _y))
+#define PUT_VALUE(_x, _y, _v) *(volatile GLubyte *)(GET_PTR(_x, _y)) = (_v)
+#endif /* GET_VALUE */
+
+# define INIT_MONO_PIXEL(p, color) \
+ p = color[0]
+
+# define WRITE_RGBA(_x, _y, r, g, b, a) \
+ PUT_VALUE(_x, _y, r)
+
+#define WRITE_PIXEL(_x, _y, p) PUT_VALUE(_x, _y, p)
+
+#define READ_RGBA( rgba, _x, _y ) \
+ do { \
+ GLubyte p = GET_VALUE(_x, _y); \
+ rgba[0] = p; \
+ rgba[1] = 0; \
+ rgba[2] = 0; \
+ rgba[3] = 0; \
+ } while (0)
+
+#elif (SPANTMP_MESA_FMT == MESA_FORMAT_RG88)
+
+#ifndef GET_VALUE
+#ifndef GET_PTR
+#define GET_PTR(_x, _y) ( buf + (_x) * 2 + (_y) * pitch)
+#endif
+
+#define GET_VALUE(_x, _y) *(volatile GLushort *)(GET_PTR(_x, _y))
+#define PUT_VALUE(_x, _y, _v) *(volatile GLushort *)(GET_PTR(_x, _y)) = (_v)
+#endif /* GET_VALUE */
+
+# define INIT_MONO_PIXEL(p, color) \
+ PACK_COLOR_8888(color[0], color[1], 0, 0)
+
+# define WRITE_RGBA(_x, _y, r, g, b, a) \
+ PUT_VALUE(_x, _y, r)
+
+#define WRITE_PIXEL(_x, _y, p) PUT_VALUE(_x, _y, p)
+
+#define READ_RGBA( rgba, _x, _y ) \
+ do { \
+ GLushort p = GET_VALUE(_x, _y); \
+ rgba[0] = p & 0xff; \
+ rgba[1] = (p >> 8) & 0xff; \
+ rgba[2] = 0; \
+ rgba[3] = 0; \
+ } while (0)
+
+#elif (SPANTMP_MESA_FMT == MESA_FORMAT_R16)
+
+#ifndef GET_VALUE
+#ifndef GET_PTR
+#define GET_PTR(_x, _y) ( buf + (_x) * 2 + (_y) * pitch)
+#endif
+
+#define GET_VALUE(_x, _y) *(volatile GLushort *)(GET_PTR(_x, _y))
+#define PUT_VALUE(_x, _y, _v) *(volatile GLushort *)(GET_PTR(_x, _y)) = (_v)
+#endif /* GET_VALUE */
+
+# define INIT_MONO_PIXEL(p, color) \
+ p = color[0]
+
+# define WRITE_RGBA(_x, _y, r, g, b, a) \
+ PUT_VALUE(_x, _y, r)
+
+#define WRITE_PIXEL(_x, _y, p) PUT_VALUE(_x, _y, p)
+
+#define READ_RGBA( rgba, _x, _y ) \
+ do { \
+ GLushort p = GET_VALUE(_x, _y); \
+ rgba[0] = p; \
+ rgba[1] = 0; \
+ rgba[2] = 0; \
+ rgba[3] = 0; \
+ } while (0)
+
+#elif (SPANTMP_MESA_FMT == MESA_FORMAT_RG1616)
+
+#ifndef GET_VALUE
+#ifndef GET_PTR
+#define GET_PTR(_x, _y) ( buf + (_x) * 4 + (_y) * pitch)
+#endif
+
+#define GET_VALUE(_x, _y) *(volatile GLuint *)(GET_PTR(_x, _y))
+#define PUT_VALUE(_x, _y, _v) *(volatile GLuint *)(GET_PTR(_x, _y)) = (_v)
+#endif /* GET_VALUE */
+
+# define INIT_MONO_PIXEL(p, color) \
+ ((color[1] << 16) | (color[0]))
+
+# define WRITE_RGBA(_x, _y, r, g, b, a) \
+ PUT_VALUE(_x, _y, r)
+
+#define WRITE_PIXEL(_x, _y, p) PUT_VALUE(_x, _y, p)
+
+#define READ_RGBA( rgba, _x, _y ) \
+ do { \
+ GLuint p = GET_VALUE(_x, _y); \
+ rgba[0] = p & 0xffff; \
+ rgba[1] = (p >> 16) & 0xffff; \
+ rgba[2] = 0; \
+ rgba[3] = 0; \
+ } while (0)
+
#else
#error SPANTMP_PIXEL_FMT must be set to a valid value!
#endif
@@ -914,3 +1035,4 @@ static void TAG(InitPointers)(struct gl_renderbuffer *rb)
#undef GET_PTR
#undef SPANTMP_PIXEL_FMT
#undef SPANTMP_PIXEL_TYPE
+#undef SPANTMP_MESA_FMT
diff --git a/src/mesa/drivers/dri/common/utils.c b/src/mesa/drivers/dri/common/utils.c
index 42be77fd7c4..083edfaa9b4 100644
--- a/src/mesa/drivers/dri/common/utils.c
+++ b/src/mesa/drivers/dri/common/utils.c
@@ -648,6 +648,8 @@ driCreateConfigs(GLenum fb_format, GLenum fb_type,
__DRI_ATTRIB_TEXTURE_1D_BIT |
__DRI_ATTRIB_TEXTURE_2D_BIT |
__DRI_ATTRIB_TEXTURE_RECTANGLE_BIT;
+
+ modes->sRGBCapable = GL_FALSE;
}
}
}
@@ -727,6 +729,7 @@ static const struct { unsigned int attrib, offset; } attribMap[] = {
__ATTRIB(__DRI_ATTRIB_BIND_TO_MIPMAP_TEXTURE, bindToMipmapTexture),
__ATTRIB(__DRI_ATTRIB_BIND_TO_TEXTURE_TARGETS, bindToTextureTargets),
__ATTRIB(__DRI_ATTRIB_YINVERTED, yInverted),
+ __ATTRIB(__DRI_ATTRIB_FRAMEBUFFER_SRGB_CAPABLE, sRGBCapable),
/* The struct field doesn't matter here, these are handled by the
* switch in driGetConfigAttribIndex. We need them in the array
diff --git a/src/mesa/drivers/dri/i810/i810context.c b/src/mesa/drivers/dri/i810/i810context.c
index dc58e91e8c1..90dbb6bbe80 100644
--- a/src/mesa/drivers/dri/i810/i810context.c
+++ b/src/mesa/drivers/dri/i810/i810context.c
@@ -204,7 +204,7 @@ i810CreateContext( gl_api api,
shareCtx = ((i810ContextPtr) sharedContextPrivate)->glCtx;
else
shareCtx = NULL;
- imesa->glCtx = _mesa_create_context(mesaVis, shareCtx,
+ imesa->glCtx = _mesa_create_context(API_OPENGL, mesaVis, shareCtx,
&functions, (void*) imesa);
if (!imesa->glCtx) {
FREE(imesa);
diff --git a/src/mesa/drivers/dri/i810/i810state.c b/src/mesa/drivers/dri/i810/i810state.c
index 7c3fbb1424d..6040abf7fac 100644
--- a/src/mesa/drivers/dri/i810/i810state.c
+++ b/src/mesa/drivers/dri/i810/i810state.c
@@ -95,7 +95,7 @@ static void i810BlendFuncSeparate( struct gl_context *ctx, GLenum sfactorRGB,
GLuint a = SDM_UPDATE_SRC_BLEND | SDM_UPDATE_DST_BLEND;
GLboolean fallback = GL_FALSE;
- switch (ctx->Color.BlendSrcRGB) {
+ switch (ctx->Color.Blend[0].SrcRGB) {
case GL_ZERO: a |= SDM_SRC_ZERO; break;
case GL_ONE: a |= SDM_SRC_ONE; break;
case GL_SRC_COLOR: a |= SDM_SRC_SRC_COLOR; break;
@@ -124,7 +124,7 @@ static void i810BlendFuncSeparate( struct gl_context *ctx, GLenum sfactorRGB,
return;
}
- switch (ctx->Color.BlendDstRGB) {
+ switch (ctx->Color.Blend[0].DstRGB) {
case GL_ZERO: a |= SDM_DST_ZERO; break;
case GL_ONE: a |= SDM_DST_ONE; break;
case GL_SRC_COLOR: a |= SDM_DST_SRC_COLOR; break;
diff --git a/src/mesa/drivers/dri/i915/i830_reg.h b/src/mesa/drivers/dri/i915/i830_reg.h
index ae1317029a2..99ee1bb4e90 100644
--- a/src/mesa/drivers/dri/i915/i830_reg.h
+++ b/src/mesa/drivers/dri/i915/i830_reg.h
@@ -585,6 +585,8 @@
#define TM0S2_VERITCAL_LINE_STRIDE_OFF (1<<12)
#define TM0S2_OUTPUT_CHAN_SHIFT 10
#define TM0S2_OUTPUT_CHAN_MASK (3<<10)
+#define TM0S2_BASE_MIP_LEVEL_SHIFT 1
+#define TM0S2_LOD_PRECLAMP (1 << 0)
#define TM0S3_MIP_FILTER_MASK (0x3<<30)
#define TM0S3_MIP_FILTER_SHIFT 30
@@ -605,6 +607,8 @@
#define TM0S3_MAX_MIP_MASK (0xff<<9)
#define TM0S3_MIN_MIP_SHIFT 3
#define TM0S3_MIN_MIP_MASK (0x3f<<3)
+#define TM0S3_MIN_MIP_SHIFT_830 5
+#define TM0S3_MIN_MIP_MASK_830 (0x3f<<5)
#define TM0S3_KILL_PIXEL (1<<2)
#define TM0S3_KEYED_FILTER (1<<1)
#define TM0S3_CHROMA_KEY (1<<0)
diff --git a/src/mesa/drivers/dri/i915/i830_state.c b/src/mesa/drivers/dri/i915/i830_state.c
index 147192adc7a..9fecab10db9 100644
--- a/src/mesa/drivers/dri/i915/i830_state.c
+++ b/src/mesa/drivers/dri/i915/i830_state.c
@@ -31,6 +31,7 @@
#include "main/macros.h"
#include "main/enums.h"
#include "main/dd.h"
+#include "main/state.h"
#include "texmem.h"
@@ -234,7 +235,7 @@ i830EvalLogicOpBlendState(struct gl_context * ctx)
I830_STATECHANGE(i830, I830_UPLOAD_CTX);
- if (RGBA_LOGICOP_ENABLED(ctx)) {
+ if (_mesa_rgba_logicop_enabled(ctx)) {
i830->state.Ctx[I830_CTXREG_ENABLES_1] &= ~(ENABLE_COLOR_BLEND |
ENABLE_LOGIC_OP_MASK);
i830->state.Ctx[I830_CTXREG_ENABLES_1] |= (DISABLE_COLOR_BLEND |
@@ -291,10 +292,10 @@ i830_set_blend_state(struct gl_context * ctx)
funcRGB =
- SRC_BLND_FACT(intel_translate_blend_factor(ctx->Color.BlendSrcRGB))
- | DST_BLND_FACT(intel_translate_blend_factor(ctx->Color.BlendDstRGB));
+ SRC_BLND_FACT(intel_translate_blend_factor(ctx->Color.Blend[0].SrcRGB))
+ | DST_BLND_FACT(intel_translate_blend_factor(ctx->Color.Blend[0].DstRGB));
- switch (ctx->Color.BlendEquationRGB) {
+ switch (ctx->Color.Blend[0].EquationRGB) {
case GL_FUNC_ADD:
eqnRGB = BLENDFUNC_ADD;
break;
@@ -314,15 +315,15 @@ i830_set_blend_state(struct gl_context * ctx)
break;
default:
fprintf(stderr, "[%s:%u] Invalid RGB blend equation (0x%04x).\n",
- __FUNCTION__, __LINE__, ctx->Color.BlendEquationRGB);
+ __FUNCTION__, __LINE__, ctx->Color.Blend[0].EquationRGB);
return;
}
- funcA = SRC_ABLEND_FACT(intel_translate_blend_factor(ctx->Color.BlendSrcA))
- | DST_ABLEND_FACT(intel_translate_blend_factor(ctx->Color.BlendDstA));
+ funcA = SRC_ABLEND_FACT(intel_translate_blend_factor(ctx->Color.Blend[0].SrcA))
+ | DST_ABLEND_FACT(intel_translate_blend_factor(ctx->Color.Blend[0].DstA));
- switch (ctx->Color.BlendEquationA) {
+ switch (ctx->Color.Blend[0].EquationA) {
case GL_FUNC_ADD:
eqnA = BLENDFUNC_ADD;
break;
@@ -342,7 +343,7 @@ i830_set_blend_state(struct gl_context * ctx)
break;
default:
fprintf(stderr, "[%s:%u] Invalid alpha blend equation (0x%04x).\n",
- __FUNCTION__, __LINE__, ctx->Color.BlendEquationA);
+ __FUNCTION__, __LINE__, ctx->Color.Blend[0].EquationA);
return;
}
@@ -679,7 +680,7 @@ update_specular(struct gl_context * ctx)
I830_STATECHANGE(i830, I830_UPLOAD_CTX);
i830->state.Ctx[I830_CTXREG_ENABLES_1] &= ~ENABLE_SPEC_ADD_MASK;
- if (NEED_SECONDARY_COLOR(ctx))
+ if (_mesa_need_secondary_color(ctx))
i830->state.Ctx[I830_CTXREG_ENABLES_1] |= ENABLE_SPEC_ADD;
else
i830->state.Ctx[I830_CTXREG_ENABLES_1] |= DISABLE_SPEC_ADD;
diff --git a/src/mesa/drivers/dri/i915/i830_texstate.c b/src/mesa/drivers/dri/i915/i830_texstate.c
index b3bb8837cca..c35b4b5ed06 100644
--- a/src/mesa/drivers/dri/i915/i830_texstate.c
+++ b/src/mesa/drivers/dri/i915/i830_texstate.c
@@ -28,13 +28,14 @@
#include "main/mtypes.h"
#include "main/enums.h"
#include "main/colormac.h"
+#include "main/macros.h"
#include "intel_mipmap_tree.h"
#include "intel_tex.h"
#include "i830_context.h"
#include "i830_reg.h"
-
+#include "intel_chipset.h"
static GLuint
@@ -139,9 +140,9 @@ i830_update_tex_unit(struct intel_context *intel, GLuint unit, GLuint ss3)
/* Get first image here, since intelObj->firstLevel will get set in
* the intel_finalize_mipmap_tree() call above.
*/
- firstImage = tObj->Image[0][intelObj->firstLevel];
+ firstImage = tObj->Image[0][tObj->BaseLevel];
- intel_miptree_get_image_offset(intelObj->mt, intelObj->firstLevel, 0, 0,
+ intel_miptree_get_image_offset(intelObj->mt, tObj->BaseLevel, 0, 0,
&dst_x, &dst_y);
drm_intel_bo_reference(intelObj->mt->region->buffer);
@@ -189,6 +190,8 @@ i830_update_tex_unit(struct intel_context *intel, GLuint unit, GLuint ss3)
{
GLuint minFilt, mipFilt, magFilt;
+ float maxlod;
+ uint32_t minlod_fixed, maxlod_fixed;
switch (tObj->MinFilter) {
case GL_NEAREST:
@@ -252,10 +255,24 @@ i830_update_tex_unit(struct intel_context *intel, GLuint unit, GLuint ss3)
state[I830_TEXREG_TM0S3] |= SS2_COLORSPACE_CONVERSION;
#endif
- state[I830_TEXREG_TM0S3] |= ((intelObj->lastLevel -
- intelObj->firstLevel) *
- 4) << TM0S3_MIN_MIP_SHIFT;
-
+ /* We get one field with fraction bits for the maximum
+ * addressable (smallest resolution) LOD. Use it to cover both
+ * MAX_LEVEL and MAX_LOD.
+ */
+ minlod_fixed = U_FIXED(CLAMP(tObj->MinLod, 0.0, 11), 4);
+ maxlod = MIN2(tObj->MaxLod, tObj->_MaxLevel - tObj->BaseLevel);
+ if (intel->intelScreen->deviceID == PCI_CHIP_I855_GM ||
+ intel->intelScreen->deviceID == PCI_CHIP_I865_G) {
+ maxlod_fixed = U_FIXED(CLAMP(maxlod, 0.0, 11.75), 2);
+ maxlod_fixed = MAX2(maxlod_fixed, (minlod_fixed + 3) >> 2);
+ state[I830_TEXREG_TM0S3] |= maxlod_fixed << TM0S3_MIN_MIP_SHIFT;
+ state[I830_TEXREG_TM0S2] |= TM0S2_LOD_PRECLAMP;
+ } else {
+ maxlod_fixed = U_FIXED(CLAMP(maxlod, 0.0, 11), 0);
+ maxlod_fixed = MAX2(maxlod_fixed, (minlod_fixed + 15) >> 4);
+ state[I830_TEXREG_TM0S3] |= maxlod_fixed << TM0S3_MIN_MIP_SHIFT_830;
+ }
+ state[I830_TEXREG_TM0S3] |= minlod_fixed << TM0S3_MAX_MIP_SHIFT;
state[I830_TEXREG_TM0S3] |= ((minFilt << TM0S3_MIN_FILTER_SHIFT) |
(mipFilt << TM0S3_MIP_FILTER_SHIFT) |
(magFilt << TM0S3_MAG_FILTER_SHIFT));
diff --git a/src/mesa/drivers/dri/i915/i830_vtbl.c b/src/mesa/drivers/dri/i915/i830_vtbl.c
index f7fdb78d059..19f08077599 100644
--- a/src/mesa/drivers/dri/i915/i830_vtbl.c
+++ b/src/mesa/drivers/dri/i915/i830_vtbl.c
@@ -364,7 +364,7 @@ i830_emit_invarient_state(struct intel_context *intel)
#define emit( intel, state, size ) \
- intel_batchbuffer_data(intel->batch, state, size )
+ intel_batchbuffer_data(intel, state, size, false)
static GLuint
get_dirty(struct i830_hw_state *state)
@@ -428,14 +428,15 @@ i830_emit_state(struct intel_context *intel)
* scheduling is allowed, rather than assume that it is whenever a
* batchbuffer fills up.
*/
- intel_batchbuffer_require_space(intel->batch,
- get_state_size(state) + INTEL_PRIM_EMIT_SIZE);
+ intel_batchbuffer_require_space(intel,
+ get_state_size(state) + INTEL_PRIM_EMIT_SIZE,
+ false);
count = 0;
again:
aper_count = 0;
dirty = get_dirty(state);
- aper_array[aper_count++] = intel->batch->buf;
+ aper_array[aper_count++] = intel->batch.bo;
if (dirty & I830_UPLOAD_BUFFERS) {
aper_array[aper_count++] = state->draw_region->buffer;
if (state->depth_region)
@@ -452,7 +453,7 @@ i830_emit_state(struct intel_context *intel)
if (dri_bufmgr_check_aperture_space(aper_array, aper_count)) {
if (count == 0) {
count++;
- intel_batchbuffer_flush(intel->batch);
+ intel_batchbuffer_flush(intel);
goto again;
} else {
_mesa_error(ctx, GL_OUT_OF_MEMORY, "i830 emit state");
@@ -534,14 +535,9 @@ i830_emit_state(struct intel_context *intel)
BEGIN_BATCH(I830_TEX_SETUP_SIZE + 1);
OUT_BATCH(state->Tex[i][I830_TEXREG_TM0LI]);
- if (state->tex_buffer[i]) {
- OUT_RELOC(state->tex_buffer[i],
- I915_GEM_DOMAIN_SAMPLER, 0,
- state->tex_offset[i]);
- }
- else {
- OUT_BATCH(state->tex_offset[i]);
- }
+ OUT_RELOC(state->tex_buffer[i],
+ I915_GEM_DOMAIN_SAMPLER, 0,
+ state->tex_offset[i]);
OUT_BATCH(state->Tex[i][I830_TEXREG_TM0S1]);
OUT_BATCH(state->Tex[i][I830_TEXREG_TM0S2]);
@@ -560,9 +556,7 @@ i830_emit_state(struct intel_context *intel)
}
}
- intel->batch->dirty_state &= ~dirty;
assert(get_dirty(state) == 0);
- assert((intel->batch->dirty_state & (1<<1)) == 0);
}
static void
@@ -584,6 +578,27 @@ i830_destroy_context(struct intel_context *intel)
_tnl_free_vertices(&intel->ctx);
}
+static uint32_t i830_render_target_format_for_mesa_format[MESA_FORMAT_COUNT] =
+{
+ [MESA_FORMAT_ARGB8888] = DV_PF_8888,
+ [MESA_FORMAT_XRGB8888] = DV_PF_8888,
+ [MESA_FORMAT_RGB565] = DV_PF_565,
+ [MESA_FORMAT_ARGB1555] = DV_PF_1555,
+ [MESA_FORMAT_ARGB4444] = DV_PF_4444,
+};
+
+static bool
+i830_render_target_supported(gl_format format)
+{
+ if (format == MESA_FORMAT_S8_Z24 ||
+ format == MESA_FORMAT_X8_Z24 ||
+ format == MESA_FORMAT_Z16) {
+ return true;
+ }
+
+ return i830_render_target_format_for_mesa_format[format] != 0;
+}
+
static void
i830_set_draw_region(struct intel_context *intel,
struct intel_region *color_regions[],
@@ -623,24 +638,7 @@ i830_set_draw_region(struct intel_context *intel,
DSTORG_VERT_BIAS(0x8) | DEPTH_IS_Z); /* .5 */
if (irb != NULL) {
- switch (irb->Base.Format) {
- case MESA_FORMAT_ARGB8888:
- case MESA_FORMAT_XRGB8888:
- value |= DV_PF_8888;
- break;
- case MESA_FORMAT_RGB565:
- value |= DV_PF_565;
- break;
- case MESA_FORMAT_ARGB1555:
- value |= DV_PF_1555;
- break;
- case MESA_FORMAT_ARGB4444:
- value |= DV_PF_4444;
- break;
- default:
- _mesa_problem(ctx, "Bad renderbuffer format: %d\n",
- irb->Base.Format);
- }
+ value |= i830_render_target_format_for_mesa_format[irb->Base.Format];
}
if (depth_region && depth_region->cpp == 4) {
@@ -728,4 +726,5 @@ i830InitVtbl(struct i830_context *i830)
i830->intel.vtbl.assert_not_dirty = i830_assert_not_dirty;
i830->intel.vtbl.finish_batch = intel_finish_vb;
i830->intel.vtbl.invalidate_state = i830_invalidate_state;
+ i830->intel.vtbl.render_target_supported = i830_render_target_supported;
}
diff --git a/src/mesa/drivers/dri/i915/i915_context.c b/src/mesa/drivers/dri/i915/i915_context.c
index f32f3cf6020..7389a1d57a9 100644
--- a/src/mesa/drivers/dri/i915/i915_context.c
+++ b/src/mesa/drivers/dri/i915/i915_context.c
@@ -168,15 +168,37 @@ i915CreateContext(int api,
MIN2(ctx->Const.FragmentProgram.MaxNativeParameters,
ctx->Const.FragmentProgram.MaxEnvParams);
+ /* i915 stores all values in single-precision floats. Values aren't set
+ * for other program targets because software is used for those targets.
+ */
+ ctx->Const.FragmentProgram.MediumFloat.RangeMin = 127;
+ ctx->Const.FragmentProgram.MediumFloat.RangeMax = 127;
+ ctx->Const.FragmentProgram.MediumFloat.Precision = 23;
+ ctx->Const.FragmentProgram.LowFloat = ctx->Const.FragmentProgram.HighFloat =
+ ctx->Const.FragmentProgram.MediumFloat;
+ ctx->Const.FragmentProgram.MediumInt.RangeMin = 24;
+ ctx->Const.FragmentProgram.MediumInt.RangeMax = 24;
+ ctx->Const.FragmentProgram.MediumInt.Precision = 0;
+ ctx->Const.FragmentProgram.LowInt = ctx->Const.FragmentProgram.HighInt =
+ ctx->Const.FragmentProgram.MediumInt;
+
ctx->FragmentProgram._MaintainTexEnvProgram = GL_TRUE;
/* FINISHME: Are there other options that should be enabled for software
* FINISHME: vertex shaders?
*/
ctx->ShaderCompilerOptions[MESA_SHADER_VERTEX].EmitCondCodes = GL_TRUE;
- ctx->ShaderCompilerOptions[MESA_SHADER_FRAGMENT].EmitNoIfs = GL_TRUE;
- ctx->ShaderCompilerOptions[MESA_SHADER_FRAGMENT].EmitNoNoise = GL_TRUE;
- ctx->ShaderCompilerOptions[MESA_SHADER_FRAGMENT].EmitNoPow = GL_TRUE;
+
+ struct gl_shader_compiler_options *const fs_options =
+ & ctx->ShaderCompilerOptions[MESA_SHADER_FRAGMENT];
+ fs_options->EmitNoIfs = GL_TRUE;
+ fs_options->EmitNoNoise = GL_TRUE;
+ fs_options->EmitNoPow = GL_TRUE;
+ fs_options->EmitNoMainReturn = GL_TRUE;
+ fs_options->EmitNoIndirectInput = GL_TRUE;
+ fs_options->EmitNoIndirectOutput = GL_TRUE;
+ fs_options->EmitNoIndirectUniform = GL_TRUE;
+ fs_options->EmitNoIndirectTemp = GL_TRUE;
ctx->Const.MaxDrawBuffers = 1;
diff --git a/src/mesa/drivers/dri/i915/i915_context.h b/src/mesa/drivers/dri/i915/i915_context.h
index 2c80ded075b..601620275f4 100644
--- a/src/mesa/drivers/dri/i915/i915_context.h
+++ b/src/mesa/drivers/dri/i915/i915_context.h
@@ -29,7 +29,6 @@
#define I915CONTEXT_INC
#include "intel_context.h"
-#include "i915_reg.h"
#define I915_FALLBACK_TEXTURE 0x1000
#define I915_FALLBACK_COLORMASK 0x2000
@@ -51,6 +50,7 @@
#define I915_UPLOAD_INVARIENT 0x40
#define I915_UPLOAD_DEFAULTS 0x80
#define I915_UPLOAD_RASTER_RULES 0x100
+#define I915_UPLOAD_BLEND 0x200
#define I915_UPLOAD_TEX(i) (0x00010000<<(i))
#define I915_UPLOAD_TEX_ALL (0x00ff0000)
#define I915_UPLOAD_TEX_0_SHIFT 16
@@ -77,17 +77,19 @@
#define I915_DEST_SETUP_SIZE 18
#define I915_CTXREG_STATE4 0
-#define I915_CTXREG_LI 1
-#define I915_CTXREG_LIS2 2
-#define I915_CTXREG_LIS4 3
-#define I915_CTXREG_LIS5 4
-#define I915_CTXREG_LIS6 5
-#define I915_CTXREG_IAB 6
-#define I915_CTXREG_BLENDCOLOR0 7
-#define I915_CTXREG_BLENDCOLOR1 8
-#define I915_CTXREG_BF_STENCIL_OPS 9
-#define I915_CTXREG_BF_STENCIL_MASKS 10
-#define I915_CTX_SETUP_SIZE 11
+#define I915_CTXREG_LI 1
+#define I915_CTXREG_LIS2 2
+#define I915_CTXREG_LIS4 3
+#define I915_CTXREG_LIS5 4
+#define I915_CTXREG_LIS6 5
+#define I915_CTXREG_BF_STENCIL_OPS 6
+#define I915_CTXREG_BF_STENCIL_MASKS 7
+#define I915_CTX_SETUP_SIZE 8
+
+#define I915_BLENDREG_IAB 0
+#define I915_BLENDREG_BLENDCOLOR0 1
+#define I915_BLENDREG_BLENDCOLOR1 2
+#define I915_BLEND_SETUP_SIZE 3
#define I915_FOGREG_COLOR 0
#define I915_FOGREG_MODE0 1
@@ -123,6 +125,12 @@ enum {
#define I915_MAX_CONSTANT 32
#define I915_CONSTANT_SIZE (2+(4*I915_MAX_CONSTANT))
+#define I915_MAX_TEX_INDIRECT 4
+#define I915_MAX_TEX_INSN 32
+#define I915_MAX_ALU_INSN 64
+#define I915_MAX_DECL_INSN 27
+#define I915_MAX_TEMPORARY 16
+
#define I915_MAX_INSN (I915_MAX_DECL_INSN + \
I915_MAX_TEX_INSN + \
I915_MAX_ALU_INSN)
@@ -216,6 +224,7 @@ struct i915_fragment_program
struct i915_hw_state
{
GLuint Ctx[I915_CTX_SETUP_SIZE];
+ GLuint Blend[I915_BLEND_SETUP_SIZE];
GLuint Buffer[I915_DEST_SETUP_SIZE];
GLuint Stipple[I915_STP_SETUP_SIZE];
GLuint Fog[I915_FOG_SETUP_SIZE];
@@ -260,8 +269,12 @@ struct i915_context
struct i915_fragment_program *current_program;
+ drm_intel_bo *current_vb_bo;
+ unsigned int current_vertex_size;
+
struct i915_hw_state state;
uint32_t last_draw_offset;
+ GLuint last_sampler;
};
diff --git a/src/mesa/drivers/dri/i915/i915_fragprog.c b/src/mesa/drivers/dri/i915/i915_fragprog.c
index 7a9fb7f088b..2bfe665cb65 100644
--- a/src/mesa/drivers/dri/i915/i915_fragprog.c
+++ b/src/mesa/drivers/dri/i915/i915_fragprog.c
@@ -269,7 +269,7 @@ translate_tex_src_target(struct i915_fragment_program *p, GLubyte bit)
#define EMIT_TEX( OP ) \
do { \
GLuint dim = translate_tex_src_target( p, inst->TexSrcTarget ); \
- const struct gl_fragment_program *program = p->ctx->FragmentProgram._Current; \
+ const struct gl_fragment_program *program = &p->FragProg; \
GLuint unit = program->Base.SamplerUnits[inst->TexSrcUnit]; \
GLuint sampler = i915_emit_decl(p, REG_TYPE_S, \
unit, dim); \
@@ -304,8 +304,9 @@ do { \
*/
static void calc_live_regs( struct i915_fragment_program *p )
{
- const struct gl_fragment_program *program = p->ctx->FragmentProgram._Current;
+ const struct gl_fragment_program *program = &p->FragProg;
GLuint regsUsed = 0xffff0000;
+ uint8_t live_components[16] = { 0, };
GLint i;
for (i = program->Base.NumInstructions - 1; i >= 0; i--) {
@@ -314,13 +315,26 @@ static void calc_live_regs( struct i915_fragment_program *p )
int a;
/* Register is written to: unmark as live for this and preceeding ops */
- if (inst->DstReg.File == PROGRAM_TEMPORARY)
- regsUsed &= ~(1 << inst->DstReg.Index);
+ if (inst->DstReg.File == PROGRAM_TEMPORARY) {
+ live_components[inst->DstReg.Index] &= ~inst->DstReg.WriteMask;
+ if (live_components[inst->DstReg.Index] == 0)
+ regsUsed &= ~(1 << inst->DstReg.Index);
+ }
for (a = 0; a < opArgs; a++) {
/* Register is read from: mark as live for this and preceeding ops */
- if (inst->SrcReg[a].File == PROGRAM_TEMPORARY)
+ if (inst->SrcReg[a].File == PROGRAM_TEMPORARY) {
+ unsigned c;
+
regsUsed |= 1 << inst->SrcReg[a].Index;
+
+ for (c = 0; c < 4; c++) {
+ const unsigned field = GET_SWZ(inst->SrcReg[a].Swizzle, c);
+
+ if (field <= SWIZZLE_W)
+ live_components[inst->SrcReg[a].Index] |= (1U << field);
+ }
+ }
}
p->usedRegs[i] = regsUsed;
@@ -330,7 +344,7 @@ static void calc_live_regs( struct i915_fragment_program *p )
static GLuint get_live_regs( struct i915_fragment_program *p,
const struct prog_instruction *inst )
{
- const struct gl_fragment_program *program = p->ctx->FragmentProgram._Current;
+ const struct gl_fragment_program *program = &p->FragProg;
GLuint nr = inst - program->Base.Instructions;
return p->usedRegs[nr];
@@ -351,8 +365,7 @@ static GLuint get_live_regs( struct i915_fragment_program *p,
static void
upload_program(struct i915_fragment_program *p)
{
- const struct gl_fragment_program *program =
- p->ctx->FragmentProgram._Current;
+ const struct gl_fragment_program *program = &p->FragProg;
const struct prog_instruction *inst = program->Base.Instructions;
if (INTEL_DEBUG & DEBUG_WM)
@@ -795,18 +808,18 @@ upload_program(struct i915_fragment_program *p)
flags = get_result_flags(inst);
dst = get_result_vector(p, inst);
- /* dst = src1 >= src2 */
+ /* tmp = src1 >= src2 */
i915_emit_arith(p,
A0_SGE,
- dst,
+ tmp,
flags, 0,
src_vector(p, &inst->SrcReg[0], program),
src_vector(p, &inst->SrcReg[1], program),
0);
- /* tmp = src1 <= src2 */
+ /* dst = src1 <= src2 */
i915_emit_arith(p,
A0_SGE,
- tmp,
+ dst,
flags, 0,
negate(src_vector(p, &inst->SrcReg[0], program),
1, 1, 1, 1),
@@ -944,18 +957,18 @@ upload_program(struct i915_fragment_program *p)
flags = get_result_flags(inst);
dst = get_result_vector(p, inst);
- /* dst = src1 < src2 */
+ /* tmp = src1 < src2 */
i915_emit_arith(p,
A0_SLT,
- dst,
+ tmp,
flags, 0,
src_vector(p, &inst->SrcReg[0], program),
src_vector(p, &inst->SrcReg[1], program),
0);
- /* tmp = src1 > src2 */
+ /* dst = src1 > src2 */
i915_emit_arith(p,
A0_SLT,
- tmp,
+ dst,
flags, 0,
negate(src_vector(p, &inst->SrcReg[0], program),
1, 1, 1, 1),
@@ -1152,7 +1165,7 @@ translate_program(struct i915_fragment_program *p)
if (INTEL_DEBUG & DEBUG_WM) {
printf("fp:\n");
- _mesa_print_program(&p->ctx->FragmentProgram._Current->Base);
+ _mesa_print_program(&p->FragProg.Base);
printf("\n");
}
@@ -1162,11 +1175,6 @@ translate_program(struct i915_fragment_program *p)
fixup_depth_write(p);
i915_fini_program(p);
- if (INTEL_DEBUG & DEBUG_WM) {
- printf("i915:\n");
- i915_disassemble_program(i915->state.Program, i915->state.ProgramSize);
- }
-
p->translated = 1;
}
@@ -1413,6 +1421,10 @@ i915ValidateFragmentProgram(struct i915_context *i915)
intel->vertex_attr_count,
intel->ViewportMatrix.m, 0);
+ assert(intel->prim.current_offset == intel->prim.start_offset);
+ intel->prim.start_offset = (intel->prim.current_offset + intel->vertex_size-1) / intel->vertex_size * intel->vertex_size;
+ intel->prim.current_offset = intel->prim.start_offset;
+
intel->vertex_size >>= 2;
i915->state.Ctx[I915_CTXREG_LIS2] = s2;
@@ -1427,6 +1439,11 @@ i915ValidateFragmentProgram(struct i915_context *i915)
if (!p->on_hardware)
i915_upload_program(i915, p);
+
+ if (INTEL_DEBUG & DEBUG_WM) {
+ printf("i915:\n");
+ i915_disassemble_program(i915->state.Program, i915->state.ProgramSize);
+ }
}
void
diff --git a/src/mesa/drivers/dri/i915/i915_program.c b/src/mesa/drivers/dri/i915/i915_program.c
index ca1949b223e..507adf1d3dc 100644
--- a/src/mesa/drivers/dri/i915/i915_program.c
+++ b/src/mesa/drivers/dri/i915/i915_program.c
@@ -538,6 +538,7 @@ i915_upload_program(struct i915_context *i915,
{
GLuint program_size = p->csr - p->program;
GLuint decl_size = p->decl - p->declarations;
+ GLuint nr;
if (p->error)
return;
@@ -554,32 +555,32 @@ i915_upload_program(struct i915_context *i915,
i915->state.ProgramSize = decl_size + program_size;
}
- /* Always seemed to get a failure if I used memcmp() to
- * shortcircuit this state upload. Needs further investigation?
- */
- if (p->nr_constants) {
- GLuint nr = p->nr_constants;
-
- I915_ACTIVESTATE(i915, I915_UPLOAD_CONSTANTS, 1);
- I915_STATECHANGE(i915, I915_UPLOAD_CONSTANTS);
-
- i915->state.Constant[0] = _3DSTATE_PIXEL_SHADER_CONSTANTS | ((nr) * 4);
- i915->state.Constant[1] = (1 << (nr - 1)) | ((1 << (nr - 1)) - 1);
-
- memcpy(&i915->state.Constant[2], p->constant, 4 * sizeof(int) * (nr));
- i915->state.ConstantSize = 2 + (nr) * 4;
-
- if (0) {
- GLuint i;
- for (i = 0; i < nr; i++) {
- fprintf(stderr, "const[%d]: %f %f %f %f\n", i,
- p->constant[i][0],
- p->constant[i][1], p->constant[i][2], p->constant[i][3]);
- }
+ nr = p->nr_constants;
+ if (i915->state.ConstantSize != 2 + nr*4 ||
+ memcmp(i915->state.Constant + 2,
+ p->constant, 4*sizeof(int)*nr)) {
+ if (nr) {
+ I915_ACTIVESTATE(i915, I915_UPLOAD_CONSTANTS, 1);
+ I915_STATECHANGE(i915, I915_UPLOAD_CONSTANTS);
+
+ i915->state.Constant[0] = _3DSTATE_PIXEL_SHADER_CONSTANTS | (nr * 4);
+ i915->state.Constant[1] = (1 << nr) -1;
+
+ memcpy(&i915->state.Constant[2], p->constant, 4 * sizeof(int) * nr);
+ i915->state.ConstantSize = 2 + nr * 4;
+
+ if (0) {
+ GLuint i;
+ for (i = 0; i < nr; i++) {
+ fprintf(stderr, "const[%d]: %f %f %f %f\n", i,
+ p->constant[i][0],
+ p->constant[i][1], p->constant[i][2], p->constant[i][3]);
+ }
+ }
+ }
+ else {
+ I915_ACTIVESTATE(i915, I915_UPLOAD_CONSTANTS, 0);
}
- }
- else {
- I915_ACTIVESTATE(i915, I915_UPLOAD_CONSTANTS, 0);
}
p->on_hardware = 1;
diff --git a/src/mesa/drivers/dri/i915/i915_reg.h b/src/mesa/drivers/dri/i915/i915_reg.h
index 7f31ff674f2..766547a4c6a 100644
--- a/src/mesa/drivers/dri/i915/i915_reg.h
+++ b/src/mesa/drivers/dri/i915/i915_reg.h
@@ -361,13 +361,6 @@
/* p222 */
-#define I915_MAX_TEX_INDIRECT 4
-#define I915_MAX_TEX_INSN 32
-#define I915_MAX_ALU_INSN 64
-#define I915_MAX_DECL_INSN 27
-#define I915_MAX_TEMPORARY 16
-
-
/* Each instruction is 3 dwords long, though most don't require all
* this space. Maximum of 123 instructions. Smaller maxes per insn
* type.
diff --git a/src/mesa/drivers/dri/i915/i915_state.c b/src/mesa/drivers/dri/i915/i915_state.c
index 9508fbaf942..3b1af4c455e 100644
--- a/src/mesa/drivers/dri/i915/i915_state.c
+++ b/src/mesa/drivers/dri/i915/i915_state.c
@@ -31,6 +31,7 @@
#include "main/macros.h"
#include "main/enums.h"
#include "main/dd.h"
+#include "main/state.h"
#include "tnl/tnl.h"
#include "tnl/t_context.h"
@@ -56,8 +57,7 @@ i915_update_stencil(struct gl_context * ctx)
GLenum front_func, front_fail, front_pass_z_fail, front_pass_z_pass;
GLuint back_ref, back_writemask, back_mask;
GLenum back_func, back_fail, back_pass_z_fail, back_pass_z_pass;
-
- I915_STATECHANGE(i915, I915_UPLOAD_CTX);
+ GLuint dirty = 0;
/* The 915 considers CW to be "front" for two-sided stencil, so choose
* appropriately.
@@ -94,56 +94,68 @@ i915_update_stencil(struct gl_context * ctx)
back_pass_z_fail = ctx->Stencil.ZFailFunc[0];
back_pass_z_pass = ctx->Stencil.ZPassFunc[0];
}
+#define set_ctx_bits(reg, mask, set) do{ \
+ GLuint dw = i915->state.Ctx[reg]; \
+ dw &= ~(mask); \
+ dw |= (set); \
+ dirty |= dw != i915->state.Ctx[reg]; \
+ i915->state.Ctx[reg] = dw; \
+} while(0)
/* Set front state. */
- i915->state.Ctx[I915_CTXREG_STATE4] &= ~(MODE4_ENABLE_STENCIL_TEST_MASK |
- MODE4_ENABLE_STENCIL_WRITE_MASK);
- i915->state.Ctx[I915_CTXREG_STATE4] |= (ENABLE_STENCIL_TEST_MASK |
- ENABLE_STENCIL_WRITE_MASK |
- STENCIL_TEST_MASK(front_mask) |
- STENCIL_WRITE_MASK(front_writemask));
-
- i915->state.Ctx[I915_CTXREG_LIS5] &= ~(S5_STENCIL_REF_MASK |
- S5_STENCIL_TEST_FUNC_MASK |
- S5_STENCIL_FAIL_MASK |
- S5_STENCIL_PASS_Z_FAIL_MASK |
- S5_STENCIL_PASS_Z_PASS_MASK);
-
- i915->state.Ctx[I915_CTXREG_LIS5] |=
- (front_ref << S5_STENCIL_REF_SHIFT) |
- (intel_translate_compare_func(front_func) << S5_STENCIL_TEST_FUNC_SHIFT) |
- (intel_translate_stencil_op(front_fail) << S5_STENCIL_FAIL_SHIFT) |
- (intel_translate_stencil_op(front_pass_z_fail) <<
- S5_STENCIL_PASS_Z_FAIL_SHIFT) |
- (intel_translate_stencil_op(front_pass_z_pass) <<
- S5_STENCIL_PASS_Z_PASS_SHIFT);
+ set_ctx_bits(I915_CTXREG_STATE4,
+ MODE4_ENABLE_STENCIL_TEST_MASK |
+ MODE4_ENABLE_STENCIL_WRITE_MASK,
+ ENABLE_STENCIL_TEST_MASK |
+ ENABLE_STENCIL_WRITE_MASK |
+ STENCIL_TEST_MASK(front_mask) |
+ STENCIL_WRITE_MASK(front_writemask));
+
+ set_ctx_bits(I915_CTXREG_LIS5,
+ S5_STENCIL_REF_MASK |
+ S5_STENCIL_TEST_FUNC_MASK |
+ S5_STENCIL_FAIL_MASK |
+ S5_STENCIL_PASS_Z_FAIL_MASK |
+ S5_STENCIL_PASS_Z_PASS_MASK,
+ (front_ref << S5_STENCIL_REF_SHIFT) |
+ (intel_translate_compare_func(front_func) << S5_STENCIL_TEST_FUNC_SHIFT) |
+ (intel_translate_stencil_op(front_fail) << S5_STENCIL_FAIL_SHIFT) |
+ (intel_translate_stencil_op(front_pass_z_fail) <<
+ S5_STENCIL_PASS_Z_FAIL_SHIFT) |
+ (intel_translate_stencil_op(front_pass_z_pass) <<
+ S5_STENCIL_PASS_Z_PASS_SHIFT));
/* Set back state if different from front. */
if (ctx->Stencil._TestTwoSide) {
- i915->state.Ctx[I915_CTXREG_BF_STENCIL_OPS] &=
- ~(BFO_STENCIL_REF_MASK |
- BFO_STENCIL_TEST_MASK |
- BFO_STENCIL_FAIL_MASK |
- BFO_STENCIL_PASS_Z_FAIL_MASK |
- BFO_STENCIL_PASS_Z_PASS_MASK);
- i915->state.Ctx[I915_CTXREG_BF_STENCIL_OPS] |= BFO_STENCIL_TWO_SIDE |
- (back_ref << BFO_STENCIL_REF_SHIFT) |
- (intel_translate_compare_func(back_func) << BFO_STENCIL_TEST_SHIFT) |
- (intel_translate_stencil_op(back_fail) << BFO_STENCIL_FAIL_SHIFT) |
- (intel_translate_stencil_op(back_pass_z_fail) <<
- BFO_STENCIL_PASS_Z_FAIL_SHIFT) |
- (intel_translate_stencil_op(back_pass_z_pass) <<
- BFO_STENCIL_PASS_Z_PASS_SHIFT);
-
- i915->state.Ctx[I915_CTXREG_BF_STENCIL_MASKS] &=
- ~(BFM_STENCIL_TEST_MASK_MASK |
- BFM_STENCIL_WRITE_MASK_MASK);
- i915->state.Ctx[I915_CTXREG_BF_STENCIL_MASKS] |=
- BFM_STENCIL_TEST_MASK(back_mask) |
- BFM_STENCIL_WRITE_MASK(back_writemask);
+ set_ctx_bits(I915_CTXREG_BF_STENCIL_OPS,
+ BFO_STENCIL_REF_MASK |
+ BFO_STENCIL_TEST_MASK |
+ BFO_STENCIL_FAIL_MASK |
+ BFO_STENCIL_PASS_Z_FAIL_MASK |
+ BFO_STENCIL_PASS_Z_PASS_MASK,
+ BFO_STENCIL_TWO_SIDE |
+ (back_ref << BFO_STENCIL_REF_SHIFT) |
+ (intel_translate_compare_func(back_func) << BFO_STENCIL_TEST_SHIFT) |
+ (intel_translate_stencil_op(back_fail) << BFO_STENCIL_FAIL_SHIFT) |
+ (intel_translate_stencil_op(back_pass_z_fail) <<
+ BFO_STENCIL_PASS_Z_FAIL_SHIFT) |
+ (intel_translate_stencil_op(back_pass_z_pass) <<
+ BFO_STENCIL_PASS_Z_PASS_SHIFT));
+
+ set_ctx_bits(I915_CTXREG_BF_STENCIL_MASKS,
+ BFM_STENCIL_TEST_MASK_MASK |
+ BFM_STENCIL_WRITE_MASK_MASK,
+ BFM_STENCIL_TEST_MASK(back_mask) |
+ BFM_STENCIL_WRITE_MASK(back_writemask));
} else {
- i915->state.Ctx[I915_CTXREG_BF_STENCIL_OPS] &= ~BFO_STENCIL_TWO_SIDE;
+ set_ctx_bits(I915_CTXREG_BF_STENCIL_OPS,
+ BFO_STENCIL_TWO_SIDE, 0);
}
+
+#undef set_ctx_bits
+
+ if (dirty)
+ I915_STATECHANGE(i915, I915_UPLOAD_CTX);
}
static void
@@ -169,15 +181,18 @@ i915AlphaFunc(struct gl_context * ctx, GLenum func, GLfloat ref)
struct i915_context *i915 = I915_CONTEXT(ctx);
int test = intel_translate_compare_func(func);
GLubyte refByte;
+ GLuint dw;
UNCLAMPED_FLOAT_TO_UBYTE(refByte, ref);
- I915_STATECHANGE(i915, I915_UPLOAD_CTX);
- i915->state.Ctx[I915_CTXREG_LIS6] &= ~(S6_ALPHA_TEST_FUNC_MASK |
- S6_ALPHA_REF_MASK);
- i915->state.Ctx[I915_CTXREG_LIS6] |= ((test << S6_ALPHA_TEST_FUNC_SHIFT) |
- (((GLuint) refByte) <<
- S6_ALPHA_REF_SHIFT));
+ dw = i915->state.Ctx[I915_CTXREG_LIS6];
+ dw &= ~(S6_ALPHA_TEST_FUNC_MASK | S6_ALPHA_REF_MASK);
+ dw |= ((test << S6_ALPHA_TEST_FUNC_SHIFT) |
+ (((GLuint) refByte) << S6_ALPHA_REF_SHIFT));
+ if (dw != i915->state.Ctx[I915_CTXREG_LIS6]) {
+ i915->state.Ctx[I915_CTXREG_LIS6] = dw;
+ I915_STATECHANGE(i915, I915_UPLOAD_CTX);
+ }
}
/* This function makes sure that the proper enables are
@@ -190,23 +205,32 @@ static void
i915EvalLogicOpBlendState(struct gl_context * ctx)
{
struct i915_context *i915 = I915_CONTEXT(ctx);
+ GLuint dw0, dw1;
- I915_STATECHANGE(i915, I915_UPLOAD_CTX);
+ dw0 = i915->state.Ctx[I915_CTXREG_LIS5];
+ dw1 = i915->state.Ctx[I915_CTXREG_LIS6];
- if (RGBA_LOGICOP_ENABLED(ctx)) {
- i915->state.Ctx[I915_CTXREG_LIS5] |= S5_LOGICOP_ENABLE;
- i915->state.Ctx[I915_CTXREG_LIS6] &= ~S6_CBUF_BLEND_ENABLE;
+ if (_mesa_rgba_logicop_enabled(ctx)) {
+ dw0 |= S5_LOGICOP_ENABLE;
+ dw1 &= ~S6_CBUF_BLEND_ENABLE;
}
else {
- i915->state.Ctx[I915_CTXREG_LIS5] &= ~S5_LOGICOP_ENABLE;
+ dw0 &= ~S5_LOGICOP_ENABLE;
if (ctx->Color.BlendEnabled) {
- i915->state.Ctx[I915_CTXREG_LIS6] |= S6_CBUF_BLEND_ENABLE;
+ dw1 |= S6_CBUF_BLEND_ENABLE;
}
else {
- i915->state.Ctx[I915_CTXREG_LIS6] &= ~S6_CBUF_BLEND_ENABLE;
+ dw1 &= ~S6_CBUF_BLEND_ENABLE;
}
}
+ if (dw0 != i915->state.Ctx[I915_CTXREG_LIS5] ||
+ dw1 != i915->state.Ctx[I915_CTXREG_LIS6]) {
+ i915->state.Ctx[I915_CTXREG_LIS5] = dw0;
+ i915->state.Ctx[I915_CTXREG_LIS6] = dw1;
+
+ I915_STATECHANGE(i915, I915_UPLOAD_CTX);
+ }
}
static void
@@ -214,6 +238,7 @@ i915BlendColor(struct gl_context * ctx, const GLfloat color[4])
{
struct i915_context *i915 = I915_CONTEXT(ctx);
GLubyte r, g, b, a;
+ GLuint dw;
DBG("%s\n", __FUNCTION__);
@@ -222,9 +247,11 @@ i915BlendColor(struct gl_context * ctx, const GLfloat color[4])
UNCLAMPED_FLOAT_TO_UBYTE(b, color[BCOMP]);
UNCLAMPED_FLOAT_TO_UBYTE(a, color[ACOMP]);
- I915_STATECHANGE(i915, I915_UPLOAD_CTX);
- i915->state.Ctx[I915_CTXREG_BLENDCOLOR1] =
- (a << 24) | (r << 16) | (g << 8) | b;
+ dw = (a << 24) | (r << 16) | (g << 8) | b;
+ if (dw != i915->state.Blend[I915_BLENDREG_BLENDCOLOR1]) {
+ i915->state.Blend[I915_BLENDREG_BLENDCOLOR1] = dw;
+ I915_STATECHANGE(i915, I915_UPLOAD_BLEND);
+ }
}
@@ -258,7 +285,7 @@ static void
i915UpdateBlendState(struct gl_context * ctx)
{
struct i915_context *i915 = I915_CONTEXT(ctx);
- GLuint iab = (i915->state.Ctx[I915_CTXREG_IAB] &
+ GLuint iab = (i915->state.Blend[I915_BLENDREG_IAB] &
~(IAB_SRC_FACTOR_MASK |
IAB_DST_FACTOR_MASK |
(BLENDFUNC_MASK << IAB_FUNC_SHIFT) | IAB_ENABLE));
@@ -267,12 +294,12 @@ i915UpdateBlendState(struct gl_context * ctx)
~(S6_CBUF_SRC_BLEND_FACT_MASK |
S6_CBUF_DST_BLEND_FACT_MASK | S6_CBUF_BLEND_FUNC_MASK));
- GLuint eqRGB = ctx->Color.BlendEquationRGB;
- GLuint eqA = ctx->Color.BlendEquationA;
- GLuint srcRGB = ctx->Color.BlendSrcRGB;
- GLuint dstRGB = ctx->Color.BlendDstRGB;
- GLuint srcA = ctx->Color.BlendSrcA;
- GLuint dstA = ctx->Color.BlendDstA;
+ GLuint eqRGB = ctx->Color.Blend[0].EquationRGB;
+ GLuint eqA = ctx->Color.Blend[0].EquationA;
+ GLuint srcRGB = ctx->Color.Blend[0].SrcRGB;
+ GLuint dstRGB = ctx->Color.Blend[0].DstRGB;
+ GLuint srcA = ctx->Color.Blend[0].SrcA;
+ GLuint dstA = ctx->Color.Blend[0].DstA;
if (eqRGB == GL_MIN || eqRGB == GL_MAX) {
srcRGB = dstRGB = GL_ONE;
@@ -293,11 +320,13 @@ i915UpdateBlendState(struct gl_context * ctx)
if (srcA != srcRGB || dstA != dstRGB || eqA != eqRGB)
iab |= IAB_ENABLE;
- if (iab != i915->state.Ctx[I915_CTXREG_IAB] ||
- lis6 != i915->state.Ctx[I915_CTXREG_LIS6]) {
- I915_STATECHANGE(i915, I915_UPLOAD_CTX);
- i915->state.Ctx[I915_CTXREG_IAB] = iab;
+ if (iab != i915->state.Blend[I915_BLENDREG_IAB]) {
+ i915->state.Blend[I915_BLENDREG_IAB] = iab;
+ I915_STATECHANGE(i915, I915_UPLOAD_BLEND);
+ }
+ if (lis6 != i915->state.Ctx[I915_CTXREG_LIS6]) {
i915->state.Ctx[I915_CTXREG_LIS6] = lis6;
+ I915_STATECHANGE(i915, I915_UPLOAD_CTX);
}
/* This will catch a logicop blend equation */
@@ -325,27 +354,36 @@ i915DepthFunc(struct gl_context * ctx, GLenum func)
{
struct i915_context *i915 = I915_CONTEXT(ctx);
int test = intel_translate_compare_func(func);
+ GLuint dw;
DBG("%s\n", __FUNCTION__);
- I915_STATECHANGE(i915, I915_UPLOAD_CTX);
- i915->state.Ctx[I915_CTXREG_LIS6] &= ~S6_DEPTH_TEST_FUNC_MASK;
- i915->state.Ctx[I915_CTXREG_LIS6] |= test << S6_DEPTH_TEST_FUNC_SHIFT;
+ dw = i915->state.Ctx[I915_CTXREG_LIS6];
+ dw &= ~S6_DEPTH_TEST_FUNC_MASK;
+ dw |= test << S6_DEPTH_TEST_FUNC_SHIFT;
+ if (dw != i915->state.Ctx[I915_CTXREG_LIS6]) {
+ I915_STATECHANGE(i915, I915_UPLOAD_CTX);
+ i915->state.Ctx[I915_CTXREG_LIS6] = dw;
+ }
}
static void
i915DepthMask(struct gl_context * ctx, GLboolean flag)
{
struct i915_context *i915 = I915_CONTEXT(ctx);
+ GLuint dw;
DBG("%s flag (%d)\n", __FUNCTION__, flag);
-
- I915_STATECHANGE(i915, I915_UPLOAD_CTX);
+ dw = i915->state.Ctx[I915_CTXREG_LIS6];
if (flag && ctx->Depth.Test)
- i915->state.Ctx[I915_CTXREG_LIS6] |= S6_DEPTH_WRITE_ENABLE;
+ dw |= S6_DEPTH_WRITE_ENABLE;
else
- i915->state.Ctx[I915_CTXREG_LIS6] &= ~S6_DEPTH_WRITE_ENABLE;
+ dw &= ~S6_DEPTH_WRITE_ENABLE;
+ if (dw != i915->state.Ctx[I915_CTXREG_LIS6]) {
+ I915_STATECHANGE(i915, I915_UPLOAD_CTX);
+ i915->state.Ctx[I915_CTXREG_LIS6] = dw;
+ }
}
@@ -532,7 +570,7 @@ static void
i915CullFaceFrontFace(struct gl_context * ctx, GLenum unused)
{
struct i915_context *i915 = I915_CONTEXT(ctx);
- GLuint mode;
+ GLuint mode, dw;
DBG("%s %d\n", __FUNCTION__,
ctx->DrawBuffer ? ctx->DrawBuffer->Name : 0);
@@ -554,9 +592,13 @@ i915CullFaceFrontFace(struct gl_context * ctx, GLenum unused)
mode = S4_CULLMODE_BOTH;
}
- I915_STATECHANGE(i915, I915_UPLOAD_CTX);
- i915->state.Ctx[I915_CTXREG_LIS4] &= ~S4_CULLMODE_MASK;
- i915->state.Ctx[I915_CTXREG_LIS4] |= mode;
+ dw = i915->state.Ctx[I915_CTXREG_LIS4];
+ dw &= ~S4_CULLMODE_MASK;
+ dw |= mode;
+ if (dw != i915->state.Ctx[I915_CTXREG_LIS4]) {
+ i915->state.Ctx[I915_CTXREG_LIS4] = dw;
+ I915_STATECHANGE(i915, I915_UPLOAD_CTX);
+ }
}
static void
@@ -690,6 +732,7 @@ i915_update_fog(struct gl_context * ctx)
GLenum mode;
GLboolean enabled;
GLboolean try_pixel_fog;
+ GLuint dw;
if (ctx->FragmentProgram._Current) {
/* Pull in static fog state from program */
@@ -765,12 +808,16 @@ i915_update_fog(struct gl_context * ctx)
i915->vertex_fog = I915_FOG_VERTEX;
}
- I915_STATECHANGE(i915, I915_UPLOAD_CTX);
I915_ACTIVESTATE(i915, I915_UPLOAD_FOG, enabled);
+ dw = i915->state.Ctx[I915_CTXREG_LIS5];
if (enabled)
- i915->state.Ctx[I915_CTXREG_LIS5] |= S5_FOG_ENABLE;
+ dw |= S5_FOG_ENABLE;
else
- i915->state.Ctx[I915_CTXREG_LIS5] &= ~S5_FOG_ENABLE;
+ dw &= ~S5_FOG_ENABLE;
+ if (dw != i915->state.Ctx[I915_CTXREG_LIS5]) {
+ i915->state.Ctx[I915_CTXREG_LIS5] = dw;
+ I915_STATECHANGE(i915, I915_UPLOAD_CTX);
+ }
/* Always enable pixel fog. Vertex fog using fog coord will conflict
* with fog code appended onto fragment program.
@@ -837,6 +884,7 @@ static void
i915Enable(struct gl_context * ctx, GLenum cap, GLboolean state)
{
struct i915_context *i915 = I915_CONTEXT(ctx);
+ GLuint dw;
switch (cap) {
case GL_TEXTURE_2D:
@@ -848,11 +896,15 @@ i915Enable(struct gl_context * ctx, GLenum cap, GLboolean state)
break;
case GL_ALPHA_TEST:
- I915_STATECHANGE(i915, I915_UPLOAD_CTX);
+ dw = i915->state.Ctx[I915_CTXREG_LIS6];
if (state)
- i915->state.Ctx[I915_CTXREG_LIS6] |= S6_ALPHA_TEST_ENABLE;
+ dw |= S6_ALPHA_TEST_ENABLE;
else
- i915->state.Ctx[I915_CTXREG_LIS6] &= ~S6_ALPHA_TEST_ENABLE;
+ dw &= ~S6_ALPHA_TEST_ENABLE;
+ if (dw != i915->state.Ctx[I915_CTXREG_LIS6]) {
+ i915->state.Ctx[I915_CTXREG_LIS6] = dw;
+ I915_STATECHANGE(i915, I915_UPLOAD_CTX);
+ }
break;
case GL_BLEND:
@@ -872,19 +924,27 @@ i915Enable(struct gl_context * ctx, GLenum cap, GLboolean state)
break;
case GL_DITHER:
- I915_STATECHANGE(i915, I915_UPLOAD_CTX);
+ dw = i915->state.Ctx[I915_CTXREG_LIS5];
if (state)
- i915->state.Ctx[I915_CTXREG_LIS5] |= S5_COLOR_DITHER_ENABLE;
+ dw |= S5_COLOR_DITHER_ENABLE;
else
- i915->state.Ctx[I915_CTXREG_LIS5] &= ~S5_COLOR_DITHER_ENABLE;
+ dw &= ~S5_COLOR_DITHER_ENABLE;
+ if (dw != i915->state.Ctx[I915_CTXREG_LIS5]) {
+ i915->state.Ctx[I915_CTXREG_LIS5] = dw;
+ I915_STATECHANGE(i915, I915_UPLOAD_CTX);
+ }
break;
case GL_DEPTH_TEST:
- I915_STATECHANGE(i915, I915_UPLOAD_CTX);
+ dw = i915->state.Ctx[I915_CTXREG_LIS6];
if (state)
- i915->state.Ctx[I915_CTXREG_LIS6] |= S6_DEPTH_TEST_ENABLE;
+ dw |= S6_DEPTH_TEST_ENABLE;
else
- i915->state.Ctx[I915_CTXREG_LIS6] &= ~S6_DEPTH_TEST_ENABLE;
+ dw &= ~S6_DEPTH_TEST_ENABLE;
+ if (dw != i915->state.Ctx[I915_CTXREG_LIS6]) {
+ i915->state.Ctx[I915_CTXREG_LIS6] = dw;
+ I915_STATECHANGE(i915, I915_UPLOAD_CTX);
+ }
i915DepthMask(ctx, ctx->Depth.Mask);
break;
@@ -900,11 +960,15 @@ i915Enable(struct gl_context * ctx, GLenum cap, GLboolean state)
break;
case GL_LINE_SMOOTH:
- I915_STATECHANGE(i915, I915_UPLOAD_CTX);
+ dw = i915->state.Ctx[I915_CTXREG_LIS4];
if (state)
- i915->state.Ctx[I915_CTXREG_LIS4] |= S4_LINE_ANTIALIAS_ENABLE;
+ dw |= S4_LINE_ANTIALIAS_ENABLE;
else
- i915->state.Ctx[I915_CTXREG_LIS4] &= ~S4_LINE_ANTIALIAS_ENABLE;
+ dw &= ~S4_LINE_ANTIALIAS_ENABLE;
+ if (dw != i915->state.Ctx[I915_CTXREG_LIS4]) {
+ i915->state.Ctx[I915_CTXREG_LIS4] = dw;
+ I915_STATECHANGE(i915, I915_UPLOAD_CTX);
+ }
break;
case GL_FOG:
@@ -923,13 +987,15 @@ i915Enable(struct gl_context * ctx, GLenum cap, GLboolean state)
hw_stencil = (irbStencil && irbStencil->region);
}
if (hw_stencil) {
- I915_STATECHANGE(i915, I915_UPLOAD_CTX);
+ dw = i915->state.Ctx[I915_CTXREG_LIS5];
if (state)
- i915->state.Ctx[I915_CTXREG_LIS5] |= (S5_STENCIL_TEST_ENABLE |
- S5_STENCIL_WRITE_ENABLE);
+ dw |= (S5_STENCIL_TEST_ENABLE | S5_STENCIL_WRITE_ENABLE);
else
- i915->state.Ctx[I915_CTXREG_LIS5] &= ~(S5_STENCIL_TEST_ENABLE |
- S5_STENCIL_WRITE_ENABLE);
+ dw &= ~(S5_STENCIL_TEST_ENABLE | S5_STENCIL_WRITE_ENABLE);
+ if (dw != i915->state.Ctx[I915_CTXREG_LIS5]) {
+ i915->state.Ctx[I915_CTXREG_LIS5] = dw;
+ I915_STATECHANGE(i915, I915_UPLOAD_CTX);
+ }
}
else {
FALLBACK(&i915->intel, I915_FALLBACK_STENCIL, state);
@@ -959,11 +1025,15 @@ i915Enable(struct gl_context * ctx, GLenum cap, GLboolean state)
/* This state change is handled in i915_reduced_primitive_state because
* the hardware bit should only be set when rendering points.
*/
- I915_STATECHANGE(i915, I915_UPLOAD_CTX);
+ dw = i915->state.Ctx[I915_CTXREG_LIS4];
if (state)
- i915->state.Ctx[I915_CTXREG_LIS4] |= S4_SPRITE_POINT_ENABLE;
+ dw |= S4_SPRITE_POINT_ENABLE;
else
- i915->state.Ctx[I915_CTXREG_LIS4] &= ~S4_SPRITE_POINT_ENABLE;
+ dw &= ~S4_SPRITE_POINT_ENABLE;
+ if (dw != i915->state.Ctx[I915_CTXREG_LIS4]) {
+ i915->state.Ctx[I915_CTXREG_LIS4] = dw;
+ I915_STATECHANGE(i915, I915_UPLOAD_CTX);
+ }
break;
case GL_POINT_SMOOTH:
@@ -984,6 +1054,7 @@ i915_init_packets(struct i915_context *i915)
{
I915_STATECHANGE(i915, I915_UPLOAD_CTX);
+ I915_STATECHANGE(i915, I915_UPLOAD_BLEND);
/* Probably don't want to upload all this stuff every time one
* piece changes.
*/
@@ -1010,13 +1081,13 @@ i915_init_packets(struct i915_context *i915)
ENABLE_STENCIL_WRITE_MASK |
STENCIL_WRITE_MASK(0xff));
- i915->state.Ctx[I915_CTXREG_IAB] =
+ i915->state.Blend[I915_BLENDREG_IAB] =
(_3DSTATE_INDEPENDENT_ALPHA_BLEND_CMD | IAB_MODIFY_ENABLE |
IAB_MODIFY_FUNC | IAB_MODIFY_SRC_FACTOR | IAB_MODIFY_DST_FACTOR);
- i915->state.Ctx[I915_CTXREG_BLENDCOLOR0] =
+ i915->state.Blend[I915_BLENDREG_BLENDCOLOR0] =
_3DSTATE_CONST_BLEND_COLOR_CMD;
- i915->state.Ctx[I915_CTXREG_BLENDCOLOR1] = 0;
+ i915->state.Blend[I915_BLENDREG_BLENDCOLOR1] = 0;
i915->state.Ctx[I915_CTXREG_BF_STENCIL_MASKS] =
_3DSTATE_BACKFACE_STENCIL_MASKS |
@@ -1087,6 +1158,7 @@ i915_init_packets(struct i915_context *i915)
i915->state.active = (I915_UPLOAD_PROGRAM |
I915_UPLOAD_STIPPLE |
I915_UPLOAD_CTX |
+ I915_UPLOAD_BLEND |
I915_UPLOAD_BUFFERS |
I915_UPLOAD_INVARIENT |
I915_UPLOAD_RASTER_RULES);
diff --git a/src/mesa/drivers/dri/i915/i915_texstate.c b/src/mesa/drivers/dri/i915/i915_texstate.c
index bc05a5687c7..442adbb63cf 100644
--- a/src/mesa/drivers/dri/i915/i915_texstate.c
+++ b/src/mesa/drivers/dri/i915/i915_texstate.c
@@ -158,7 +158,7 @@ i915_update_tex_unit(struct intel_context *intel, GLuint unit, GLuint ss3)
/* Get first image here, since intelObj->firstLevel will get set in
* the intel_finalize_mipmap_tree() call above.
*/
- firstImage = tObj->Image[0][intelObj->firstLevel];
+ firstImage = tObj->Image[0][tObj->BaseLevel];
drm_intel_bo_reference(intelObj->mt->region->buffer);
i915->state.tex_buffer[unit] = intelObj->mt->region->buffer;
diff --git a/src/mesa/drivers/dri/i915/i915_vtbl.c b/src/mesa/drivers/dri/i915/i915_vtbl.c
index 59dfe085632..921183b81df 100644
--- a/src/mesa/drivers/dri/i915/i915_vtbl.c
+++ b/src/mesa/drivers/dri/i915/i915_vtbl.c
@@ -217,7 +217,7 @@ i915_emit_invarient_state(struct intel_context *intel)
#define emit(intel, state, size ) \
- intel_batchbuffer_data(intel->batch, state, size)
+ intel_batchbuffer_data(intel, state, size, false)
static GLuint
get_dirty(struct i915_hw_state *state)
@@ -251,6 +251,9 @@ get_state_size(struct i915_hw_state *state)
if (dirty & I915_UPLOAD_CTX)
sz += sizeof(state->Ctx);
+ if (dirty & I915_UPLOAD_BLEND)
+ sz += sizeof(state->Blend);
+
if (dirty & I915_UPLOAD_BUFFERS)
sz += sizeof(state->Buffer);
@@ -299,14 +302,15 @@ i915_emit_state(struct intel_context *intel)
* scheduling is allowed, rather than assume that it is whenever a
* batchbuffer fills up.
*/
- intel_batchbuffer_require_space(intel->batch,
- get_state_size(state) + INTEL_PRIM_EMIT_SIZE);
+ intel_batchbuffer_require_space(intel,
+ get_state_size(state) + INTEL_PRIM_EMIT_SIZE,
+ false);
count = 0;
again:
aper_count = 0;
dirty = get_dirty(state);
- aper_array[aper_count++] = intel->batch->buf;
+ aper_array[aper_count++] = intel->batch.bo;
if (dirty & I915_UPLOAD_BUFFERS) {
aper_array[aper_count++] = state->draw_region->buffer;
if (state->depth_region)
@@ -326,7 +330,7 @@ i915_emit_state(struct intel_context *intel)
if (dri_bufmgr_check_aperture_space(aper_array, aper_count)) {
if (count == 0) {
count++;
- intel_batchbuffer_flush(intel->batch);
+ intel_batchbuffer_flush(intel);
goto again;
} else {
_mesa_error(ctx, GL_OUT_OF_MEMORY, "i915 emit state");
@@ -365,6 +369,13 @@ i915_emit_state(struct intel_context *intel)
emit(intel, state->Ctx, sizeof(state->Ctx));
}
+ if (dirty & I915_UPLOAD_BLEND) {
+ if (INTEL_DEBUG & DEBUG_STATE)
+ fprintf(stderr, "I915_UPLOAD_BLEND:\n");
+
+ emit(intel, state->Blend, sizeof(state->Blend));
+ }
+
if (dirty & I915_UPLOAD_BUFFERS) {
GLuint count;
@@ -425,6 +436,7 @@ i915_emit_state(struct intel_context *intel)
*/
if (dirty & I915_UPLOAD_TEX_ALL) {
int nr = 0;
+ GLuint unwind;
for (i = 0; i < I915_TEX_UNITS; i++)
if (dirty & I915_UPLOAD_TEX(i))
@@ -435,21 +447,16 @@ i915_emit_state(struct intel_context *intel)
OUT_BATCH((dirty & I915_UPLOAD_TEX_ALL) >> I915_UPLOAD_TEX_0_SHIFT);
for (i = 0; i < I915_TEX_UNITS; i++)
if (dirty & I915_UPLOAD_TEX(i)) {
-
- if (state->tex_buffer[i]) {
- OUT_RELOC(state->tex_buffer[i],
- I915_GEM_DOMAIN_SAMPLER, 0,
- state->tex_offset[i]);
- }
- else {
- OUT_BATCH(state->tex_offset[i]);
- }
+ OUT_RELOC(state->tex_buffer[i],
+ I915_GEM_DOMAIN_SAMPLER, 0,
+ state->tex_offset[i]);
OUT_BATCH(state->Tex[i][I915_TEXREG_MS3]);
OUT_BATCH(state->Tex[i][I915_TEXREG_MS4]);
}
ADVANCE_BATCH();
+ unwind = intel->batch.used;
BEGIN_BATCH(2 + nr * 3);
OUT_BATCH(_3DSTATE_SAMPLER_STATE | (3 * nr));
OUT_BATCH((dirty & I915_UPLOAD_TEX_ALL) >> I915_UPLOAD_TEX_0_SHIFT);
@@ -460,6 +467,13 @@ i915_emit_state(struct intel_context *intel)
OUT_BATCH(state->Tex[i][I915_TEXREG_SS4]);
}
ADVANCE_BATCH();
+ if (i915->last_sampler &&
+ memcmp(intel->batch.map + i915->last_sampler,
+ intel->batch.map + unwind,
+ (2 + nr*3)*sizeof(int)) == 0)
+ intel->batch.used = unwind;
+ else
+ i915->last_sampler = unwind;
}
if (dirty & I915_UPLOAD_CONSTANTS) {
@@ -481,9 +495,7 @@ i915_emit_state(struct intel_context *intel)
}
}
- intel->batch->dirty_state &= ~dirty;
assert(get_dirty(state) == 0);
- assert((intel->batch->dirty_state & (1<<1)) == 0);
}
static void
@@ -523,6 +535,27 @@ i915_set_buf_info_for_region(uint32_t *state, struct intel_region *region,
}
}
+static uint32_t i915_render_target_format_for_mesa_format[MESA_FORMAT_COUNT] =
+{
+ [MESA_FORMAT_ARGB8888] = DV_PF_8888,
+ [MESA_FORMAT_XRGB8888] = DV_PF_8888,
+ [MESA_FORMAT_RGB565] = DV_PF_565 | DITHER_FULL_ALWAYS,
+ [MESA_FORMAT_ARGB1555] = DV_PF_1555 | DITHER_FULL_ALWAYS,
+ [MESA_FORMAT_ARGB4444] = DV_PF_4444 | DITHER_FULL_ALWAYS,
+};
+
+static bool
+i915_render_target_supported(gl_format format)
+{
+ if (format == MESA_FORMAT_S8_Z24 ||
+ format == MESA_FORMAT_X8_Z24 ||
+ format == MESA_FORMAT_Z16) {
+ return true;
+ }
+
+ return i915_render_target_format_for_mesa_format[format] != 0;
+}
+
static void
i915_set_draw_region(struct intel_context *intel,
struct intel_region *color_regions[],
@@ -562,24 +595,7 @@ i915_set_draw_region(struct intel_context *intel,
DSTORG_VERT_BIAS(0x8) | /* .5 */
LOD_PRECLAMP_OGL | TEX_DEFAULT_COLOR_OGL);
if (irb != NULL) {
- switch (irb->Base.Format) {
- case MESA_FORMAT_ARGB8888:
- case MESA_FORMAT_XRGB8888:
- value |= DV_PF_8888;
- break;
- case MESA_FORMAT_RGB565:
- value |= DV_PF_565 | DITHER_FULL_ALWAYS;
- break;
- case MESA_FORMAT_ARGB1555:
- value |= DV_PF_1555 | DITHER_FULL_ALWAYS;
- break;
- case MESA_FORMAT_ARGB4444:
- value |= DV_PF_4444 | DITHER_FULL_ALWAYS;
- break;
- default:
- _mesa_problem(ctx, "Bad renderbuffer format: %d\n",
- irb->Base.Format);
- }
+ value |= i915_render_target_format_for_mesa_format[irb->Base.Format];
}
/* This isn't quite safe, thus being hidden behind an option. When changing
@@ -661,6 +677,10 @@ i915_new_batch(struct intel_context *intel)
*/
i915->state.emitted = 0;
i915->last_draw_offset = 0;
+ i915->last_sampler = 0;
+
+ i915->current_vb_bo = NULL;
+ i915->current_vertex_size = 0;
}
static void
@@ -686,4 +706,5 @@ i915InitVtbl(struct i915_context *i915)
i915->intel.vtbl.update_texture_state = i915UpdateTextureState;
i915->intel.vtbl.assert_not_dirty = i915_assert_not_dirty;
i915->intel.vtbl.finish_batch = intel_finish_vb;
+ i915->intel.vtbl.render_target_supported = i915_render_target_supported;
}
diff --git a/src/mesa/drivers/dri/i915/intel_render.c b/src/mesa/drivers/dri/i915/intel_render.c
index 0d8ab4b507e..2d361ca0a9a 100644
--- a/src/mesa/drivers/dri/i915/intel_render.c
+++ b/src/mesa/drivers/dri/i915/intel_render.c
@@ -124,7 +124,7 @@ static INLINE GLuint intel_get_vb_max(struct intel_context *intel)
GLuint ret;
if (intel->intelScreen->no_vbo)
- ret = intel->batch->size - 1500;
+ ret = sizeof(intel->batch.map) - 1500;
else
ret = INTEL_VB_SIZE;
ret /= (intel->vertex_size * 4);
diff --git a/src/mesa/drivers/dri/i915/intel_tris.c b/src/mesa/drivers/dri/i915/intel_tris.c
index b9a8aeb12f2..7bcb72f42d0 100644
--- a/src/mesa/drivers/dri/i915/intel_tris.c
+++ b/src/mesa/drivers/dri/i915/intel_tris.c
@@ -54,6 +54,7 @@
#include "intel_span.h"
#include "i830_context.h"
#include "i830_reg.h"
+#include "i915_context.h"
static void intelRenderPrimitive(struct gl_context * ctx, GLenum prim);
static void intelRasterPrimitive(struct gl_context * ctx, GLenum rprim,
@@ -62,22 +63,22 @@ static void intelRasterPrimitive(struct gl_context * ctx, GLenum rprim,
static void
intel_flush_inline_primitive(struct intel_context *intel)
{
- GLuint used = intel->batch->ptr - intel->prim.start_ptr;
+ GLuint used = intel->batch.used - intel->prim.start_ptr;
assert(intel->prim.primitive != ~0);
/* printf("/\n"); */
- if (used < 8)
+ if (used < 2)
goto do_discard;
- *(int *) intel->prim.start_ptr = (_3DPRIMITIVE |
- intel->prim.primitive | (used / 4 - 2));
+ intel->batch.map[intel->prim.start_ptr] =
+ _3DPRIMITIVE | intel->prim.primitive | (used - 2);
goto finished;
do_discard:
- intel->batch->ptr -= used;
+ intel->batch.used = intel->prim.start_ptr;
finished:
intel->prim.primitive = ~0;
@@ -100,9 +101,7 @@ static void intel_start_inline(struct intel_context *intel, uint32_t prim)
*/
BEGIN_BATCH(1);
- assert((intel->batch->dirty_state & (1<<1)) == 0);
-
- intel->prim.start_ptr = intel->batch->ptr;
+ intel->prim.start_ptr = intel->batch.used;
intel->prim.primitive = prim;
intel->prim.flush = intel_flush_inline_primitive;
@@ -118,26 +117,25 @@ static void intel_wrap_inline(struct intel_context *intel)
GLuint prim = intel->prim.primitive;
intel_flush_inline_primitive(intel);
- intel_batchbuffer_flush(intel->batch);
+ intel_batchbuffer_flush(intel);
intel_start_inline(intel, prim); /* ??? */
}
static GLuint *intel_extend_inline(struct intel_context *intel, GLuint dwords)
{
- GLuint sz = dwords * sizeof(GLuint);
GLuint *ptr;
assert(intel->prim.flush == intel_flush_inline_primitive);
- if (intel_batchbuffer_space(intel->batch) < sz)
+ if (intel_batchbuffer_space(intel) < dwords * sizeof(GLuint))
intel_wrap_inline(intel);
/* printf("."); */
intel->vtbl.assert_not_dirty(intel);
- ptr = (GLuint *) intel->batch->ptr;
- intel->batch->ptr += sz;
+ ptr = intel->batch.map + intel->batch.used;
+ intel->batch.used += dwords;
return ptr;
}
@@ -218,15 +216,15 @@ void intel_flush_prim(struct intel_context *intel)
offset = intel->prim.start_offset;
intel->prim.start_offset = intel->prim.current_offset;
if (intel->gen < 3)
- intel->prim.start_offset = ALIGN(intel->prim.start_offset, 128);
+ intel->prim.current_offset = intel->prim.start_offset = ALIGN(intel->prim.start_offset, 128);
intel->prim.flush = NULL;
intel->vtbl.emit_state(intel);
- aper_array[0] = intel->batch->buf;
+ aper_array[0] = intel->batch.bo;
aper_array[1] = vb_bo;
if (dri_bufmgr_check_aperture_space(aper_array, 2)) {
- intel_batchbuffer_flush(intel->batch);
+ intel_batchbuffer_flush(intel);
intel->vtbl.emit_state(intel);
}
@@ -236,11 +234,6 @@ void intel_flush_prim(struct intel_context *intel)
*/
intel->no_batch_wrap = GL_TRUE;
- /* Check that we actually emitted the state into this batch, using the
- * UPLOAD_CTX bit as the signal.
- */
- assert((intel->batch->dirty_state & (1<<1)) == 0);
-
#if 0
printf("emitting %d..%d=%d vertices size %d\n", offset,
intel->prim.current_offset, count,
@@ -248,20 +241,39 @@ void intel_flush_prim(struct intel_context *intel)
#endif
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);
- OUT_RELOC(vb_bo, I915_GEM_DOMAIN_VERTEX, 0, offset);
- OUT_BATCH((intel->vertex_size << S1_VERTEX_WIDTH_SHIFT) |
- (intel->vertex_size << S1_VERTEX_PITCH_SHIFT));
+ struct i915_context *i915 = i915_context(&intel->ctx);
+ unsigned int cmd = 0, len = 0;
+
+ if (vb_bo != i915->current_vb_bo) {
+ cmd |= I1_LOAD_S(0);
+ len++;
+ }
+ if (intel->vertex_size != i915->current_vertex_size) {
+ cmd |= I1_LOAD_S(1);
+ len++;
+ }
+ if (len)
+ len++;
+
+ BEGIN_BATCH(2+len);
+ if (cmd)
+ OUT_BATCH(_3DSTATE_LOAD_STATE_IMMEDIATE_1 | cmd | (len - 2));
+ if (vb_bo != i915->current_vb_bo) {
+ OUT_RELOC(vb_bo, I915_GEM_DOMAIN_VERTEX, 0, 0);
+ i915->current_vb_bo = vb_bo;
+ }
+ if (intel->vertex_size != i915->current_vertex_size) {
+ OUT_BATCH((intel->vertex_size << S1_VERTEX_WIDTH_SHIFT) |
+ (intel->vertex_size << S1_VERTEX_PITCH_SHIFT));
+ i915->current_vertex_size = intel->vertex_size;
+ }
OUT_BATCH(_3DPRIMITIVE |
PRIM_INDIRECT |
PRIM_INDIRECT_SEQUENTIAL |
intel->prim.primitive |
count);
- OUT_BATCH(0); /* Beginning vertex index */
+ OUT_BATCH(offset / (intel->vertex_size * 4));
ADVANCE_BATCH();
} else {
struct i830_context *i830 = i830_context(&intel->ctx);
@@ -478,6 +490,7 @@ static void
intel_wpos_triangle(struct intel_context *intel,
intelVertexPtr v0, intelVertexPtr v1, intelVertexPtr v2)
{
+ const struct gl_framebuffer *fb = intel->ctx.DrawBuffer;
GLuint offset = intel->wpos_offset;
GLuint size = intel->wpos_size;
GLfloat *v0_wpos = (GLfloat *)((char *)v0 + offset);
@@ -488,10 +501,11 @@ intel_wpos_triangle(struct intel_context *intel,
__memcpy(v1_wpos, v1, size);
__memcpy(v2_wpos, v2, size);
- v0_wpos[1] = -v0_wpos[1] + intel->ctx.DrawBuffer->Height;
- v1_wpos[1] = -v1_wpos[1] + intel->ctx.DrawBuffer->Height;
- v2_wpos[1] = -v2_wpos[1] + intel->ctx.DrawBuffer->Height;
-
+ if (!fb->Name) {
+ v0_wpos[1] = -v0_wpos[1] + fb->Height;
+ v1_wpos[1] = -v1_wpos[1] + fb->Height;
+ v2_wpos[1] = -v2_wpos[1] + fb->Height;
+ }
intel_draw_triangle(intel, v0, v1, v2);
}
@@ -501,6 +515,7 @@ static void
intel_wpos_line(struct intel_context *intel,
intelVertexPtr v0, intelVertexPtr v1)
{
+ const struct gl_framebuffer *fb = intel->ctx.DrawBuffer;
GLuint offset = intel->wpos_offset;
GLuint size = intel->wpos_size;
GLfloat *v0_wpos = (GLfloat *)((char *)v0 + offset);
@@ -509,8 +524,10 @@ intel_wpos_line(struct intel_context *intel,
__memcpy(v0_wpos, v0, size);
__memcpy(v1_wpos, v1, size);
- v0_wpos[1] = -v0_wpos[1] + intel->ctx.DrawBuffer->Height;
- v1_wpos[1] = -v1_wpos[1] + intel->ctx.DrawBuffer->Height;
+ if (!fb->Name) {
+ v0_wpos[1] = -v0_wpos[1] + fb->Height;
+ v1_wpos[1] = -v1_wpos[1] + fb->Height;
+ }
intel_draw_line(intel, v0, v1);
}
@@ -519,12 +536,15 @@ intel_wpos_line(struct intel_context *intel,
static void
intel_wpos_point(struct intel_context *intel, intelVertexPtr v0)
{
+ const struct gl_framebuffer *fb = intel->ctx.DrawBuffer;
GLuint offset = intel->wpos_offset;
GLuint size = intel->wpos_size;
GLfloat *v0_wpos = (GLfloat *)((char *)v0 + offset);
__memcpy(v0_wpos, v0, size);
- v0_wpos[1] = -v0_wpos[1] + intel->ctx.DrawBuffer->Height;
+
+ if (!fb->Name)
+ v0_wpos[1] = -v0_wpos[1] + fb->Height;
intel_draw_point(intel, v0);
}
diff --git a/src/mesa/drivers/dri/i965/Makefile b/src/mesa/drivers/dri/i965/Makefile
index 7c3ac0c14ef..b05ba35d65f 100644
--- a/src/mesa/drivers/dri/i965/Makefile
+++ b/src/mesa/drivers/dri/i965/Makefile
@@ -108,6 +108,7 @@ CXX_SOURCES = \
brw_fs.cpp \
brw_fs_channel_expressions.cpp \
brw_fs_reg_allocate.cpp \
+ brw_fs_schedule_instructions.cpp \
brw_fs_vector_splitting.cpp
ASM_SOURCES =
diff --git a/src/mesa/drivers/dri/i965/brw_cc.c b/src/mesa/drivers/dri/i965/brw_cc.c
index d3a1233aac0..412d82ab3ca 100644
--- a/src/mesa/drivers/dri/i965/brw_cc.c
+++ b/src/mesa/drivers/dri/i965/brw_cc.c
@@ -35,6 +35,7 @@
#include "brw_defines.h"
#include "brw_util.h"
#include "main/macros.h"
+#include "intel_batchbuffer.h"
void
brw_update_cc_vp(struct brw_context *brw)
@@ -92,61 +93,61 @@ static void upload_cc_unit(struct brw_context *brw)
{
struct intel_context *intel = &brw->intel;
struct gl_context *ctx = &brw->intel.ctx;
- struct brw_cc_unit_state cc;
- void *map;
+ struct brw_cc_unit_state *cc;
- memset(&cc, 0, sizeof(cc));
+ cc = brw_state_batch(brw, sizeof(*cc), 64, &brw->cc.state_offset);
+ memset(cc, 0, sizeof(*cc));
/* _NEW_STENCIL */
if (ctx->Stencil._Enabled) {
const unsigned back = ctx->Stencil._BackFace;
- cc.cc0.stencil_enable = 1;
- cc.cc0.stencil_func =
+ cc->cc0.stencil_enable = 1;
+ cc->cc0.stencil_func =
intel_translate_compare_func(ctx->Stencil.Function[0]);
- cc.cc0.stencil_fail_op =
+ cc->cc0.stencil_fail_op =
intel_translate_stencil_op(ctx->Stencil.FailFunc[0]);
- cc.cc0.stencil_pass_depth_fail_op =
+ cc->cc0.stencil_pass_depth_fail_op =
intel_translate_stencil_op(ctx->Stencil.ZFailFunc[0]);
- cc.cc0.stencil_pass_depth_pass_op =
+ cc->cc0.stencil_pass_depth_pass_op =
intel_translate_stencil_op(ctx->Stencil.ZPassFunc[0]);
- cc.cc1.stencil_ref = ctx->Stencil.Ref[0];
- cc.cc1.stencil_write_mask = ctx->Stencil.WriteMask[0];
- cc.cc1.stencil_test_mask = ctx->Stencil.ValueMask[0];
+ cc->cc1.stencil_ref = ctx->Stencil.Ref[0];
+ cc->cc1.stencil_write_mask = ctx->Stencil.WriteMask[0];
+ cc->cc1.stencil_test_mask = ctx->Stencil.ValueMask[0];
if (ctx->Stencil._TestTwoSide) {
- cc.cc0.bf_stencil_enable = 1;
- cc.cc0.bf_stencil_func =
+ cc->cc0.bf_stencil_enable = 1;
+ cc->cc0.bf_stencil_func =
intel_translate_compare_func(ctx->Stencil.Function[back]);
- cc.cc0.bf_stencil_fail_op =
+ cc->cc0.bf_stencil_fail_op =
intel_translate_stencil_op(ctx->Stencil.FailFunc[back]);
- cc.cc0.bf_stencil_pass_depth_fail_op =
+ cc->cc0.bf_stencil_pass_depth_fail_op =
intel_translate_stencil_op(ctx->Stencil.ZFailFunc[back]);
- cc.cc0.bf_stencil_pass_depth_pass_op =
+ cc->cc0.bf_stencil_pass_depth_pass_op =
intel_translate_stencil_op(ctx->Stencil.ZPassFunc[back]);
- cc.cc1.bf_stencil_ref = ctx->Stencil.Ref[back];
- cc.cc2.bf_stencil_write_mask = ctx->Stencil.WriteMask[back];
- cc.cc2.bf_stencil_test_mask = ctx->Stencil.ValueMask[back];
+ cc->cc1.bf_stencil_ref = ctx->Stencil.Ref[back];
+ cc->cc2.bf_stencil_write_mask = ctx->Stencil.WriteMask[back];
+ cc->cc2.bf_stencil_test_mask = ctx->Stencil.ValueMask[back];
}
/* Not really sure about this:
*/
if (ctx->Stencil.WriteMask[0] ||
(ctx->Stencil._TestTwoSide && ctx->Stencil.WriteMask[back]))
- cc.cc0.stencil_write_enable = 1;
+ cc->cc0.stencil_write_enable = 1;
}
/* _NEW_COLOR */
if (ctx->Color._LogicOpEnabled && ctx->Color.LogicOp != GL_COPY) {
- cc.cc2.logicop_enable = 1;
- cc.cc5.logicop_func = intel_translate_logic_op(ctx->Color.LogicOp);
+ cc->cc2.logicop_enable = 1;
+ cc->cc5.logicop_func = intel_translate_logic_op(ctx->Color.LogicOp);
} else if (ctx->Color.BlendEnabled) {
- GLenum eqRGB = ctx->Color.BlendEquationRGB;
- GLenum eqA = ctx->Color.BlendEquationA;
- GLenum srcRGB = ctx->Color.BlendSrcRGB;
- GLenum dstRGB = ctx->Color.BlendDstRGB;
- GLenum srcA = ctx->Color.BlendSrcA;
- GLenum dstA = ctx->Color.BlendDstA;
+ GLenum eqRGB = ctx->Color.Blend[0].EquationRGB;
+ GLenum eqA = ctx->Color.Blend[0].EquationA;
+ GLenum srcRGB = ctx->Color.Blend[0].SrcRGB;
+ GLenum dstRGB = ctx->Color.Blend[0].DstRGB;
+ GLenum srcA = ctx->Color.Blend[0].SrcA;
+ GLenum dstA = ctx->Color.Blend[0].DstA;
/* If the renderbuffer is XRGB, we have to frob the blend function to
* force the destination alpha to 1.0. This means replacing GL_DST_ALPHA
@@ -167,58 +168,55 @@ static void upload_cc_unit(struct brw_context *brw)
srcA = dstA = GL_ONE;
}
- cc.cc6.dest_blend_factor = brw_translate_blend_factor(dstRGB);
- cc.cc6.src_blend_factor = brw_translate_blend_factor(srcRGB);
- cc.cc6.blend_function = brw_translate_blend_equation(eqRGB);
+ cc->cc6.dest_blend_factor = brw_translate_blend_factor(dstRGB);
+ cc->cc6.src_blend_factor = brw_translate_blend_factor(srcRGB);
+ cc->cc6.blend_function = brw_translate_blend_equation(eqRGB);
- cc.cc5.ia_dest_blend_factor = brw_translate_blend_factor(dstA);
- cc.cc5.ia_src_blend_factor = brw_translate_blend_factor(srcA);
- cc.cc5.ia_blend_function = brw_translate_blend_equation(eqA);
+ cc->cc5.ia_dest_blend_factor = brw_translate_blend_factor(dstA);
+ cc->cc5.ia_src_blend_factor = brw_translate_blend_factor(srcA);
+ cc->cc5.ia_blend_function = brw_translate_blend_equation(eqA);
- cc.cc3.blend_enable = 1;
- cc.cc3.ia_blend_enable = (srcA != srcRGB ||
+ cc->cc3.blend_enable = 1;
+ cc->cc3.ia_blend_enable = (srcA != srcRGB ||
dstA != dstRGB ||
eqA != eqRGB);
}
if (ctx->Color.AlphaEnabled) {
- cc.cc3.alpha_test = 1;
- cc.cc3.alpha_test_func =
+ cc->cc3.alpha_test = 1;
+ cc->cc3.alpha_test_func =
intel_translate_compare_func(ctx->Color.AlphaFunc);
- cc.cc3.alpha_test_format = BRW_ALPHATEST_FORMAT_UNORM8;
+ cc->cc3.alpha_test_format = BRW_ALPHATEST_FORMAT_UNORM8;
- UNCLAMPED_FLOAT_TO_UBYTE(cc.cc7.alpha_ref.ub[0], ctx->Color.AlphaRef);
+ UNCLAMPED_FLOAT_TO_UBYTE(cc->cc7.alpha_ref.ub[0], ctx->Color.AlphaRef);
}
if (ctx->Color.DitherFlag) {
- cc.cc5.dither_enable = 1;
- cc.cc6.y_dither_offset = 0;
- cc.cc6.x_dither_offset = 0;
+ cc->cc5.dither_enable = 1;
+ cc->cc6.y_dither_offset = 0;
+ cc->cc6.x_dither_offset = 0;
}
/* _NEW_DEPTH */
if (ctx->Depth.Test) {
- cc.cc2.depth_test = 1;
- cc.cc2.depth_test_function =
+ cc->cc2.depth_test = 1;
+ cc->cc2.depth_test_function =
intel_translate_compare_func(ctx->Depth.Func);
- cc.cc2.depth_write_enable = ctx->Depth.Mask;
+ cc->cc2.depth_write_enable = ctx->Depth.Mask;
}
if (intel->stats_wm || unlikely(INTEL_DEBUG & DEBUG_STATS))
- cc.cc5.statistics_enable = 1;
+ cc->cc5.statistics_enable = 1;
/* CACHE_NEW_CC_VP */
- cc.cc4.cc_viewport_state_offset = brw->cc.vp_bo->offset >> 5; /* reloc */
+ cc->cc4.cc_viewport_state_offset = brw->cc.vp_bo->offset >> 5; /* reloc */
- map = brw_state_batch(brw, sizeof(cc), 64,
- &brw->cc.state_bo, &brw->cc.state_offset);
- memcpy(map, &cc, sizeof(cc));
brw->state.dirty.cache |= CACHE_NEW_CC_UNIT;
/* Emit CC viewport relocation */
- drm_intel_bo_emit_reloc(brw->cc.state_bo, (brw->cc.state_offset +
- offsetof(struct brw_cc_unit_state,
- cc4)),
+ drm_intel_bo_emit_reloc(brw->intel.batch.bo,
+ (brw->cc.state_offset +
+ offsetof(struct brw_cc_unit_state, cc4)),
brw->cc.vp_bo, 0,
I915_GEM_DOMAIN_INSTRUCTION, 0);
}
@@ -235,18 +233,16 @@ const struct brw_tracked_state brw_cc_unit = {
static void upload_blend_constant_color(struct brw_context *brw)
{
- struct gl_context *ctx = &brw->intel.ctx;
- struct brw_blend_constant_color bcc;
-
- memset(&bcc, 0, sizeof(bcc));
- bcc.header.opcode = CMD_BLEND_CONSTANT_COLOR;
- bcc.header.length = sizeof(bcc)/4-2;
- bcc.blend_constant_color[0] = ctx->Color.BlendColor[0];
- bcc.blend_constant_color[1] = ctx->Color.BlendColor[1];
- bcc.blend_constant_color[2] = ctx->Color.BlendColor[2];
- bcc.blend_constant_color[3] = ctx->Color.BlendColor[3];
-
- BRW_CACHED_BATCH_STRUCT(brw, &bcc);
+ struct intel_context *intel = &brw->intel;
+ struct gl_context *ctx = &intel->ctx;
+
+ BEGIN_BATCH(5);
+ OUT_BATCH(_3DSTATE_BLEND_CONSTANT_COLOR << 16 | (5-2));
+ OUT_BATCH_F(ctx->Color.BlendColor[0]);
+ OUT_BATCH_F(ctx->Color.BlendColor[1]);
+ OUT_BATCH_F(ctx->Color.BlendColor[2]);
+ OUT_BATCH_F(ctx->Color.BlendColor[3]);
+ CACHED_BATCH();
}
const struct brw_tracked_state brw_blend_constant_color = {
diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c
index 28549f2574a..9483ec69d96 100644
--- a/src/mesa/drivers/dri/i965/brw_context.c
+++ b/src/mesa/drivers/dri/i965/brw_context.c
@@ -151,6 +151,22 @@ GLboolean brwCreateContext( int api,
MIN2(ctx->Const.FragmentProgram.MaxNativeParameters,
ctx->Const.FragmentProgram.MaxEnvParams);
+ /* Fragment shaders use real, 32-bit twos-complement integers for all
+ * integer types.
+ */
+ ctx->Const.FragmentProgram.LowInt.RangeMin = 31;
+ ctx->Const.FragmentProgram.LowInt.RangeMax = 30;
+ ctx->Const.FragmentProgram.LowInt.Precision = 0;
+ ctx->Const.FragmentProgram.HighInt = ctx->Const.FragmentProgram.MediumInt
+ = ctx->Const.FragmentProgram.LowInt;
+
+ /* Gen6 converts quads to polygon in beginning of 3D pipeline,
+ but we're not sure how it's actually done for vertex order,
+ that affect provoking vertex decision. Always use last vertex
+ convention for quad primitive which works as expected for now. */
+ if (intel->gen == 6)
+ ctx->Const.QuadsFollowProvokingVertexConvention = GL_FALSE;
+
if (intel->is_g4x || intel->gen >= 5) {
brw->CMD_VF_STATISTICS = CMD_VF_STATISTICS_GM45;
brw->CMD_PIPELINE_SELECT = CMD_PIPELINE_SELECT_GM45;
diff --git a/src/mesa/drivers/dri/i965/brw_context.h b/src/mesa/drivers/dri/i965/brw_context.h
index 7069724466a..7b0551a92bc 100644
--- a/src/mesa/drivers/dri/i965/brw_context.h
+++ b/src/mesa/drivers/dri/i965/brw_context.h
@@ -145,7 +145,7 @@ struct brw_context;
#define BRW_NEW_NR_VS_SURFACES 0x80000
#define BRW_NEW_INDEX_BUFFER 0x100000
#define BRW_NEW_VS_CONSTBUF 0x200000
-#define BRW_NEW_WM_CONSTBUF 0x200000
+#define BRW_NEW_WM_CONSTBUF 0x400000
struct brw_state_flags {
/** State update flags signalled by mesa internals */
@@ -408,21 +408,24 @@ struct brw_cached_batch_item {
*/
#define ATTRIB_BIT_DWORDS ((VERT_ATTRIB_MAX+31)/32)
+struct brw_vertex_buffer {
+ /** Buffer object containing the uploaded vertex data */
+ drm_intel_bo *bo;
+ uint32_t offset;
+ /** Byte stride between elements in the uploaded array */
+ GLuint stride;
+};
struct brw_vertex_element {
const struct gl_client_array *glarray;
+ int buffer;
+
/** The corresponding Mesa vertex attribute */
gl_vert_attrib attrib;
/** Size of a complete element */
GLuint element_size;
- /** Number of uploaded elements for this input. */
- GLuint count;
- /** Byte stride between elements in the uploaded array */
- GLuint stride;
/** Offset of the first element within the buffer object */
unsigned int offset;
- /** Buffer object containing the uploaded vertex data */
- drm_intel_bo *bo;
};
@@ -457,12 +460,10 @@ struct brw_context
GLboolean has_negative_rhw_bug;
GLboolean has_aa_line_parameters;
GLboolean has_pln;
-;
+
struct {
struct brw_state_flags dirty;
- GLuint nr_color_regions;
- struct intel_region *color_regions[MAX_DRAW_BUFFERS];
struct intel_region *depth_region;
/**
@@ -485,23 +486,27 @@ struct brw_context
struct {
struct brw_vertex_element inputs[VERT_ATTRIB_MAX];
+ struct brw_vertex_buffer buffers[VERT_ATTRIB_MAX];
+ struct {
+ uint32_t handle;
+ uint32_t offset;
+ uint32_t stride;
+ } current_buffers[VERT_ATTRIB_MAX];
struct brw_vertex_element *enabled[VERT_ATTRIB_MAX];
GLuint nr_enabled;
-
-#define BRW_NR_UPLOAD_BUFS 17
-#define BRW_UPLOAD_INIT_SIZE (128*1024)
-
- struct {
- drm_intel_bo *bo;
- GLuint offset;
- } upload;
+ GLuint nr_buffers, nr_current_buffers;
/* Summary of size and varying of active arrays, so we can check
* for changes to this state:
*/
struct brw_vertex_info info;
unsigned int min_index, max_index;
+
+ /* Offset from start of vertex buffer so we can avoid redefining
+ * the same VB packed over and over again.
+ */
+ unsigned int start_vertex_bias;
} vb;
struct {
@@ -512,10 +517,10 @@ struct brw_context
*/
const struct _mesa_index_buffer *ib;
- /* Updates to these fields are signaled by BRW_NEW_INDEX_BUFFER. */
+ /* Updates are signaled by BRW_NEW_INDEX_BUFFER. */
drm_intel_bo *bo;
- unsigned int offset;
- unsigned int size;
+ GLuint type;
+
/* Offset to index buffer index to use in CMD_3D_PRIM so that we can
* avoid re-uploading the IB packet over and over if we're actually
* referencing the same index buffer.
@@ -528,11 +533,6 @@ struct brw_context
const struct gl_vertex_program *vertex_program;
const struct gl_fragment_program *fragment_program;
-
- /* For populating the gtt:
- */
- GLuint next_free_page;
-
/* hw-dependent 3DSTATE_VF_STATISTICS opcode */
uint32_t CMD_VF_STATISTICS;
/* hw-dependent 3DSTATE_PIPELINE_SELECT opcode */
@@ -612,9 +612,7 @@ struct brw_context
drm_intel_bo *const_bo;
/** Binding table of pointers to surf_bo entries */
- drm_intel_bo *bind_bo;
uint32_t bind_bo_offset;
- drm_intel_bo *surf_bo[BRW_VS_MAX_SURF];
uint32_t surf_offset[BRW_VS_MAX_SURF];
GLuint nr_surfaces;
} vs;
@@ -666,9 +664,7 @@ struct brw_context
drm_intel_bo *sampler_bo;
/** Binding table of pointers to surf_bo entries */
- drm_intel_bo *bind_bo;
uint32_t bind_bo_offset;
- drm_intel_bo *surf_bo[BRW_WM_MAX_SURF];
uint32_t surf_offset[BRW_WM_MAX_SURF];
drm_intel_bo *prog_bo;
@@ -693,7 +689,6 @@ struct brw_context
drm_intel_bo *depth_stencil_state_bo;
drm_intel_bo *color_calc_state_bo;
- drm_intel_bo *state_bo;
uint32_t state_offset;
} cc;
@@ -706,6 +701,9 @@ struct brw_context
/* Used to give every program string a unique id
*/
GLuint program_id;
+
+ int num_prepare_atoms, num_emit_atoms;
+ struct brw_tracked_state prepare_atoms[64], emit_atoms[64];
};
@@ -841,4 +839,3 @@ float convert_param(enum param_conversion conversion, float param)
GLboolean brw_do_cubemap_normalize(struct exec_list *instructions);
#endif
-
diff --git a/src/mesa/drivers/dri/i965/brw_cubemap_normalize.cpp b/src/mesa/drivers/dri/i965/brw_cubemap_normalize.cpp
index 35bea681214..8574169e472 100644
--- a/src/mesa/drivers/dri/i965/brw_cubemap_normalize.cpp
+++ b/src/mesa/drivers/dri/i965/brw_cubemap_normalize.cpp
@@ -51,7 +51,7 @@ brw_cubemap_normalize_visitor::visit_leave(ir_texture *ir)
if (ir->sampler->type->sampler_dimensionality != GLSL_SAMPLER_DIM_CUBE)
return visit_continue;
- void *mem_ctx = talloc_parent(ir);
+ void *mem_ctx = ralloc_parent(ir);
ir_variable *var = new(mem_ctx) ir_variable(ir->coordinate->type,
"coordinate", ir_var_auto);
diff --git a/src/mesa/drivers/dri/i965/brw_curbe.c b/src/mesa/drivers/dri/i965/brw_curbe.c
index 877b22fec19..ae11c487a2c 100644
--- a/src/mesa/drivers/dri/i965/brw_curbe.c
+++ b/src/mesa/drivers/dri/i965/brw_curbe.c
@@ -146,22 +146,24 @@ const struct brw_tracked_state brw_curbe_offsets = {
*/
void brw_upload_cs_urb_state(struct brw_context *brw)
{
- struct brw_cs_urb_state cs_urb;
- memset(&cs_urb, 0, sizeof(cs_urb));
+ struct intel_context *intel = &brw->intel;
+ BEGIN_BATCH(2);
/* It appears that this is the state packet for the CS unit, ie. the
* urb entries detailed here are housed in the CS range from the
* URB_FENCE command.
*/
- cs_urb.header.opcode = CMD_CS_URB_STATE;
- cs_urb.header.length = sizeof(cs_urb)/4 - 2;
+ OUT_BATCH(CMD_CS_URB_STATE << 16 | (2-2));
/* BRW_NEW_URB_FENCE */
- cs_urb.bits0.nr_urb_entries = brw->urb.nr_cs_entries;
- cs_urb.bits0.urb_entry_size = brw->urb.csize - 1;
-
- assert(brw->urb.nr_cs_entries);
- BRW_CACHED_BATCH_STRUCT(brw, &cs_urb);
+ if (brw->urb.csize == 0) {
+ OUT_BATCH(0);
+ } else {
+ /* BRW_NEW_URB_FENCE */
+ assert(brw->urb.nr_cs_entries);
+ OUT_BATCH((brw->urb.csize - 1) << 4 | brw->urb.nr_cs_entries);
+ }
+ CACHED_BATCH();
}
static GLfloat fixed_plane[6][4] = {
diff --git a/src/mesa/drivers/dri/i965/brw_defines.h b/src/mesa/drivers/dri/i965/brw_defines.h
index 5c5b8259e13..5496b4fdd3b 100644
--- a/src/mesa/drivers/dri/i965/brw_defines.h
+++ b/src/mesa/drivers/dri/i965/brw_defines.h
@@ -35,28 +35,6 @@
/* 3D state:
*/
-#define _3DOP_3DSTATE_PIPELINED 0x0
-#define _3DOP_3DSTATE_NONPIPELINED 0x1
-#define _3DOP_3DCONTROL 0x2
-#define _3DOP_3DPRIMITIVE 0x3
-
-#define _3DSTATE_PIPELINED_POINTERS 0x00
-#define _3DSTATE_BINDING_TABLE_POINTERS 0x01
-#define _3DSTATE_VERTEX_BUFFERS 0x08
-#define _3DSTATE_VERTEX_ELEMENTS 0x09
-#define _3DSTATE_INDEX_BUFFER 0x0A
-#define _3DSTATE_VF_STATISTICS 0x0B
-#define _3DSTATE_DRAWING_RECTANGLE 0x00
-#define _3DSTATE_CONSTANT_COLOR 0x01
-#define _3DSTATE_SAMPLER_PALETTE_LOAD 0x02
-#define _3DSTATE_CHROMA_KEY 0x04
-#define _3DSTATE_DEPTH_BUFFER 0x05
-#define _3DSTATE_POLY_STIPPLE_OFFSET 0x06
-#define _3DSTATE_POLY_STIPPLE_PATTERN 0x07
-#define _3DSTATE_LINE_STIPPLE 0x08
-#define _3DSTATE_GLOBAL_DEPTH_OFFSET_CLAMP 0x09
-#define _3DCONTROL 0x00
-
#define PIPE_CONTROL_NOWRITE 0x00
#define PIPE_CONTROL_WRITEIMMEDIATE 0x01
#define PIPE_CONTROL_WRITEDEPTH 0x02
@@ -389,6 +367,7 @@
#define BRW_SURFACEFORMAT_R8_SSCALED 0x149
#define BRW_SURFACEFORMAT_R8_USCALED 0x14A
#define BRW_SURFACEFORMAT_L8_UNORM_SRGB 0x14C
+#define BRW_SURFACEFORMAT_DXT1_RGB_SRGB 0x180
#define BRW_SURFACEFORMAT_R1_UINT 0x181
#define BRW_SURFACEFORMAT_YCRCB_NORMAL 0x182
#define BRW_SURFACEFORMAT_YCRCB_SWAPUVY 0x183
@@ -700,6 +679,8 @@
#define BRW_SAMPLER_MESSAGE_SIMD8_SAMPLE_GRADIENTS 2
#define BRW_SAMPLER_MESSAGE_SIMD4X2_SAMPLE_COMPARE 0
#define BRW_SAMPLER_MESSAGE_SIMD16_SAMPLE_COMPARE 2
+#define BRW_SAMPLER_MESSAGE_SIMD8_SAMPLE_BIAS_COMPARE 0
+#define BRW_SAMPLER_MESSAGE_SIMD8_SAMPLE_LOD_COMPARE 1
#define BRW_SAMPLER_MESSAGE_SIMD4X2_RESINFO 2
#define BRW_SAMPLER_MESSAGE_SIMD8_RESINFO 2
#define BRW_SAMPLER_MESSAGE_SIMD16_RESINFO 2
@@ -838,13 +819,13 @@
#define CMD_PIPELINE_SELECT_965 0x6104
#define CMD_PIPELINE_SELECT_GM45 0x6904
-#define CMD_PIPELINED_STATE_POINTERS 0x7800
-#define CMD_BINDING_TABLE_PTRS 0x7801
+#define _3DSTATE_PIPELINED_POINTERS 0x7800
+#define _3DSTATE_BINDING_TABLE_POINTERS 0x7801
# define GEN6_BINDING_TABLE_MODIFY_VS (1 << 8)
# define GEN6_BINDING_TABLE_MODIFY_GS (1 << 9)
# define GEN6_BINDING_TABLE_MODIFY_PS (1 << 12)
-#define CMD_3D_SAMPLER_STATE_POINTERS 0x7802 /* SNB+ */
+#define _3DSTATE_SAMPLER_STATE_POINTERS 0x7802 /* GEN6+ */
# define PS_SAMPLER_STATE_CHANGE (1 << 12)
# define GS_SAMPLER_STATE_CHANGE (1 << 9)
# define VS_SAMPLER_STATE_CHANGE (1 << 8)
@@ -885,27 +866,29 @@
#define CMD_INDEX_BUFFER 0x780a
#define CMD_VF_STATISTICS_965 0x780b
#define CMD_VF_STATISTICS_GM45 0x680b
-#define CMD_3D_CC_STATE_POINTERS 0x780e /* GEN6+ */
+#define _3DSTATE_CC_STATE_POINTERS 0x780e /* GEN6+ */
-#define CMD_URB 0x7805 /* GEN6+ */
+#define _3DSTATE_URB 0x7805 /* GEN6+ */
# define GEN6_URB_VS_SIZE_SHIFT 16
# define GEN6_URB_VS_ENTRIES_SHIFT 0
# define GEN6_URB_GS_ENTRIES_SHIFT 8
# define GEN6_URB_GS_SIZE_SHIFT 0
-#define CMD_VIEWPORT_STATE_POINTERS 0x780d /* GEN6+ */
+#define _3DSTATE_VIEWPORT_STATE_POINTERS 0x780d /* GEN6+ */
# define GEN6_CC_VIEWPORT_MODIFY (1 << 12)
# define GEN6_SF_VIEWPORT_MODIFY (1 << 11)
# define GEN6_CLIP_VIEWPORT_MODIFY (1 << 10)
-#define CMD_3D_SCISSOR_STATE_POINTERS 0x780f /* GEN6+ */
+#define _3DSTATE_SCISSOR_STATE_POINTERS 0x780f /* GEN6+ */
-#define CMD_3D_VS_STATE 0x7810 /* GEN6+ */
+#define _3DSTATE_VS 0x7810 /* GEN6+ */
/* DW2 */
# define GEN6_VS_SPF_MODE (1 << 31)
# define GEN6_VS_VECTOR_MASK_ENABLE (1 << 30)
# define GEN6_VS_SAMPLER_COUNT_SHIFT 27
# define GEN6_VS_BINDING_TABLE_ENTRY_COUNT_SHIFT 18
+# define GEN6_VS_FLOATING_POINT_MODE_IEEE_754 (0 << 16)
+# define GEN6_VS_FLOATING_POINT_MODE_ALT (1 << 16)
/* DW4 */
# define GEN6_VS_DISPATCH_START_GRF_SHIFT 20
# define GEN6_VS_URB_READ_LENGTH_SHIFT 11
@@ -916,7 +899,7 @@
# define GEN6_VS_CACHE_DISABLE (1 << 1)
# define GEN6_VS_ENABLE (1 << 0)
-#define CMD_3D_GS_STATE 0x7811 /* GEN6+ */
+#define _3DSTATE_GS 0x7811 /* GEN6+ */
/* DW2 */
# define GEN6_GS_SPF_MODE (1 << 31)
# define GEN6_GS_VECTOR_MASK_ENABLE (1 << 30)
@@ -934,7 +917,7 @@
/* DW6 */
# define GEN6_GS_ENABLE (1 << 15)
-#define CMD_3D_CLIP_STATE 0x7812 /* GEN6+ */
+#define _3DSTATE_CLIP 0x7812 /* GEN6+ */
/* DW1 */
# define GEN6_CLIP_STATISTICS_ENABLE (1 << 10)
/**
@@ -964,7 +947,7 @@
# define GEN6_CLIP_MAX_POINT_WIDTH_SHIFT 6
# define GEN6_CLIP_FORCE_ZERO_RTAINDEX (1 << 5)
-#define CMD_3D_SF_STATE 0x7813 /* GEN6+ */
+#define _3DSTATE_SF 0x7813 /* GEN6+ */
/* DW1 */
# define GEN6_SF_NUM_OUTPUTS_SHIFT 22
# define GEN6_SF_SWIZZLE_ENABLE (1 << 21)
@@ -1029,18 +1012,27 @@
# define ATTRIBUTE_0_CONST_SOURCE_SHIFT 9
# define ATTRIBUTE_0_SWIZZLE_SHIFT 6
# define ATTRIBUTE_0_SOURCE_SHIFT 0
+
+# define ATTRIBUTE_SWIZZLE_INPUTATTR 0
+# define ATTRIBUTE_SWIZZLE_INPUTATTR_FACING 1
+# define ATTRIBUTE_SWIZZLE_INPUTATTR_W 2
+# define ATTRIBUTE_SWIZZLE_INPUTATTR_FACING_W 3
+# define ATTRIBUTE_SWIZZLE_SHIFT 6
+
/* DW16: Point sprite texture coordinate enables */
/* DW17: Constant interpolation enables */
/* DW18: attr 0-7 wrap shortest enables */
/* DW19: attr 8-16 wrap shortest enables */
-#define CMD_3D_WM_STATE 0x7814 /* GEN6+ */
+#define _3DSTATE_WM 0x7814 /* GEN6+ */
/* DW1: kernel pointer */
/* DW2 */
# define GEN6_WM_SPF_MODE (1 << 31)
# define GEN6_WM_VECTOR_MASK_ENABLE (1 << 30)
# define GEN6_WM_SAMPLER_COUNT_SHIFT 27
# define GEN6_WM_BINDING_TABLE_ENTRY_COUNT_SHIFT 18
+# define GEN6_WM_FLOATING_POINT_MODE_IEEE_754 (0 << 16)
+# define GEN6_WM_FLOATING_POINT_MODE_ALT (1 << 16)
/* DW3: scratch space */
/* DW4 */
# define GEN6_WM_STATISTICS_ENABLE (1 << 31)
@@ -1095,34 +1087,34 @@
/* DW7: kernel 1 pointer */
/* DW8: kernel 2 pointer */
-#define CMD_3D_CONSTANT_VS_STATE 0x7815 /* GEN6+ */
-#define CMD_3D_CONSTANT_GS_STATE 0x7816 /* GEN6+ */
-#define CMD_3D_CONSTANT_PS_STATE 0x7817 /* GEN6+ */
+#define _3DSTATE_CONSTANT_VS 0x7815 /* GEN6+ */
+#define _3DSTATE_CONSTANT_GS 0x7816 /* GEN6+ */
+#define _3DSTATE_CONSTANT_PS 0x7817 /* GEN6+ */
# define GEN6_CONSTANT_BUFFER_3_ENABLE (1 << 15)
# define GEN6_CONSTANT_BUFFER_2_ENABLE (1 << 14)
# define GEN6_CONSTANT_BUFFER_1_ENABLE (1 << 13)
# define GEN6_CONSTANT_BUFFER_0_ENABLE (1 << 12)
-#define CMD_3D_SAMPLE_MASK 0x7818 /* GEN6+ */
+#define _3DSTATE_SAMPLE_MASK 0x7818 /* GEN6+ */
-#define CMD_DRAW_RECT 0x7900
-#define CMD_BLEND_CONSTANT_COLOR 0x7901
-#define CMD_CHROMA_KEY 0x7904
-#define CMD_DEPTH_BUFFER 0x7905
-#define CMD_POLY_STIPPLE_OFFSET 0x7906
-#define CMD_POLY_STIPPLE_PATTERN 0x7907
-#define CMD_LINE_STIPPLE_PATTERN 0x7908
-#define CMD_GLOBAL_DEPTH_OFFSET_CLAMP 0x7909
-#define CMD_AA_LINE_PARAMETERS 0x790a
+#define _3DSTATE_DRAWING_RECTANGLE 0x7900
+#define _3DSTATE_BLEND_CONSTANT_COLOR 0x7901
+#define _3DSTATE_CHROMA_KEY 0x7904
+#define _3DSTATE_DEPTH_BUFFER 0x7905
+#define _3DSTATE_POLY_STIPPLE_OFFSET 0x7906
+#define _3DSTATE_POLY_STIPPLE_PATTERN 0x7907
+#define _3DSTATE_LINE_STIPPLE_PATTERN 0x7908
+#define _3DSTATE_GLOBAL_DEPTH_OFFSET_CLAMP 0x7909
+#define _3DSTATE_AA_LINE_PARAMETERS 0x790a /* G45+ */
-#define CMD_GS_SVB_INDEX 0x790b /* CTG+ */
+#define _3DSTATE_GS_SVB_INDEX 0x790b /* CTG+ */
/* DW1 */
# define SVB_INDEX_SHIFT 29
# define SVB_LOAD_INTERNAL_VERTEX_COUNT (1 << 0) /* SNB+ */
/* DW2: SVB index */
/* DW3: SVB maximum index */
-#define CMD_3D_MULTISAMPLE 0x790d /* SNB+ */
+#define _3DSTATE_MULTISAMPLE 0x790d /* GEN6+ */
/* DW1 */
# define MS_PIXEL_LOCATION_CENTER (0 << 4)
# define MS_PIXEL_LOCATION_UPPER_LEFT (1 << 4)
@@ -1130,7 +1122,10 @@
# define MS_NUMSAMPLES_4 (2 << 1)
# define MS_NUMSAMPLES_8 (3 << 1)
-#define CMD_3D_CLEAR_PARAMS 0x7910 /* ILK+ */
+#define _3DSTATE_STENCIL_BUFFER 0x790e /* ILK, SNB */
+#define _3DSTATE_HIER_DEPTH_BUFFER 0x790f /* ILK, SNB */
+
+#define _3DSTATE_CLEAR_PARAMS 0x7910 /* ILK+ */
# define DEPTH_CLEAR_VALID (1 << 15)
/* DW1: depth clear value */
diff --git a/src/mesa/drivers/dri/i965/brw_disasm.c b/src/mesa/drivers/dri/i965/brw_disasm.c
index 6b61f7af15d..111cb9974e1 100644
--- a/src/mesa/drivers/dri/i965/brw_disasm.c
+++ b/src/mesa/drivers/dri/i965/brw_disasm.c
@@ -973,7 +973,7 @@ int brw_disasm (FILE *file, struct brw_instruction *inst, int gen)
inst->bits3.dp_render_cache.send_commit_msg,
inst->bits3.dp_render_cache.msg_length,
inst->bits3.dp_render_cache.response_length);
- } else if (gen >= 5) {
+ } else if (gen >= 5 /* FINISHME: || is_g4x */) {
format (file, " (%d, %d, %d)",
inst->bits3.dp_read_gen5.binding_table_index,
inst->bits3.dp_read_gen5.msg_control,
diff --git a/src/mesa/drivers/dri/i965/brw_draw.c b/src/mesa/drivers/dri/i965/brw_draw.c
index a1f403ca4e6..f5abe021c43 100644
--- a/src/mesa/drivers/dri/i965/brw_draw.c
+++ b/src/mesa/drivers/dri/i965/brw_draw.c
@@ -145,9 +145,14 @@ static void brw_emit_prim(struct brw_context *brw,
prim_packet.start_vert_location = prim->start;
if (prim->indexed)
prim_packet.start_vert_location += brw->ib.start_vertex_offset;
+ else
+ prim_packet.start_vert_location += brw->vb.start_vertex_bias;
prim_packet.instance_count = 1;
prim_packet.start_instance_location = 0;
prim_packet.base_vert_location = prim->basevertex;
+ if (prim->indexed)
+ prim_packet.base_vert_location += brw->vb.start_vertex_bias;
+
/* 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,14 +160,14 @@ static void brw_emit_prim(struct brw_context *brw,
* the besides the draw code.
*/
if (intel->always_flush_cache) {
- intel_batchbuffer_emit_mi_flush(intel->batch);
+ intel_batchbuffer_emit_mi_flush(intel);
}
if (prim_packet.verts_per_instance) {
- intel_batchbuffer_data( brw->intel.batch, &prim_packet,
- sizeof(prim_packet));
+ intel_batchbuffer_data(&brw->intel, &prim_packet,
+ sizeof(prim_packet), false);
}
if (intel->always_flush_cache) {
- intel_batchbuffer_emit_mi_flush(intel->batch);
+ intel_batchbuffer_emit_mi_flush(intel);
}
}
@@ -172,13 +177,16 @@ static void brw_merge_inputs( struct brw_context *brw,
struct brw_vertex_info old = brw->vb.info;
GLuint i;
- for (i = 0; i < VERT_ATTRIB_MAX; i++)
- drm_intel_bo_unreference(brw->vb.inputs[i].bo);
+ for (i = 0; i < brw->vb.nr_buffers; i++) {
+ drm_intel_bo_unreference(brw->vb.buffers[i].bo);
+ brw->vb.buffers[i].bo = NULL;
+ }
+ brw->vb.nr_buffers = 0;
- memset(&brw->vb.inputs, 0, sizeof(brw->vb.inputs));
memset(&brw->vb.info, 0, sizeof(brw->vb.info));
for (i = 0; i < VERT_ATTRIB_MAX; i++) {
+ brw->vb.inputs[i].buffer = -1;
brw->vb.inputs[i].glarray = arrays[i];
brw->vb.inputs[i].attrib = (gl_vert_attrib) i;
@@ -303,7 +311,6 @@ static GLboolean brw_try_draw_prims( struct gl_context *ctx,
struct brw_context *brw = brw_context(ctx);
GLboolean retval = GL_FALSE;
GLboolean warn = GL_FALSE;
- GLboolean first_time = GL_TRUE;
GLuint i;
if (ctx->NewState)
@@ -351,13 +358,10 @@ static GLboolean brw_try_draw_prims( struct gl_context *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);
+ intel_batchbuffer_require_space(intel, 1024, false);
hw_prim = brw_set_prim(brw, &prim[i]);
-
- if (first_time || (brw->state.dirty.brw & BRW_NEW_PRIMITIVE)) {
- first_time = GL_FALSE;
-
+ if (brw->state.dirty.brw) {
brw_validate_state(brw);
/* Various fallback checks: */
@@ -370,7 +374,7 @@ static GLboolean brw_try_draw_prims( struct gl_context *ctx,
if (dri_bufmgr_check_aperture_space(brw->state.validated_bos,
brw->state.validated_bo_count)) {
static GLboolean warned;
- intel_batchbuffer_flush(intel->batch);
+ intel_batchbuffer_flush(intel);
/* Validate the state after we flushed the batch (which would have
* changed the set of dirty state). If we still fail to
@@ -399,7 +403,7 @@ static GLboolean brw_try_draw_prims( struct gl_context *ctx,
}
if (intel->always_flush_batch)
- intel_batchbuffer_flush(intel->batch);
+ intel_batchbuffer_flush(intel);
out:
brw_state_cache_check_size(brw);
@@ -460,25 +464,32 @@ void brw_draw_init( struct brw_context *brw )
{
struct gl_context *ctx = &brw->intel.ctx;
struct vbo_context *vbo = vbo_context(ctx);
+ int i;
/* Register our drawing function:
*/
vbo->draw_prims = brw_draw_prims;
+
+ for (i = 0; i < VERT_ATTRIB_MAX; i++)
+ brw->vb.inputs[i].buffer = -1;
+ brw->vb.nr_buffers = 0;
+ brw->vb.nr_enabled = 0;
}
void brw_draw_destroy( struct brw_context *brw )
{
int i;
- if (brw->vb.upload.bo != NULL) {
- drm_intel_bo_unreference(brw->vb.upload.bo);
- brw->vb.upload.bo = NULL;
+ for (i = 0; i < brw->vb.nr_buffers; i++) {
+ drm_intel_bo_unreference(brw->vb.buffers[i].bo);
+ brw->vb.buffers[i].bo = NULL;
}
+ brw->vb.nr_buffers = 0;
- for (i = 0; i < VERT_ATTRIB_MAX; i++) {
- drm_intel_bo_unreference(brw->vb.inputs[i].bo);
- brw->vb.inputs[i].bo = NULL;
+ for (i = 0; i < brw->vb.nr_enabled; i++) {
+ brw->vb.enabled[i]->buffer = -1;
}
+ brw->vb.nr_enabled = 0;
drm_intel_bo_unreference(brw->ib.bo);
brw->ib.bo = NULL;
diff --git a/src/mesa/drivers/dri/i965/brw_draw_upload.c b/src/mesa/drivers/dri/i965/brw_draw_upload.c
index 405e161bdbb..78885b58a8d 100644
--- a/src/mesa/drivers/dri/i965/brw_draw_upload.c
+++ b/src/mesa/drivers/dri/i965/brw_draw_upload.c
@@ -25,6 +25,7 @@
*
**************************************************************************/
+#undef NDEBUG
#include "main/glheader.h"
#include "main/bufferobj.h"
@@ -209,7 +210,7 @@ static GLuint get_surface_type( GLenum type, GLuint size,
case GL_UNSIGNED_BYTE: return ubyte_types_scale[size];
case GL_FIXED: return float_types[size]; /* was uploaded as floats */
default: assert(0); return 0;
- }
+ }
}
}
@@ -227,11 +228,11 @@ static GLuint get_size( GLenum type )
case GL_UNSIGNED_SHORT: return sizeof(GLushort);
case GL_UNSIGNED_BYTE: return sizeof(GLubyte);
case GL_FIXED: return sizeof(GLfloat); /* will be uploaded as floats */
- default: return 0;
- }
+ default: assert(0); return 0;
+ }
}
-static GLuint get_index_type(GLenum type)
+static GLuint get_index_type(GLenum type)
{
switch (type) {
case GL_UNSIGNED_BYTE: return BRW_INDEX_BYTE;
@@ -241,60 +242,23 @@ static GLuint get_index_type(GLenum type)
}
}
-static void wrap_buffers( struct brw_context *brw,
- GLuint size )
-{
- if (size < BRW_UPLOAD_INIT_SIZE)
- size = BRW_UPLOAD_INIT_SIZE;
-
- brw->vb.upload.offset = 0;
-
- if (brw->vb.upload.bo != NULL)
- drm_intel_bo_unreference(brw->vb.upload.bo);
- brw->vb.upload.bo = drm_intel_bo_alloc(brw->intel.bufmgr, "temporary VBO",
- size, 1);
-}
-
-static void get_space( struct brw_context *brw,
- GLuint size,
- drm_intel_bo **bo_return,
- GLuint *offset_return )
-{
- size = ALIGN(size, 64);
-
- if (brw->vb.upload.bo == NULL ||
- brw->vb.upload.offset + size > brw->vb.upload.bo->size) {
- wrap_buffers(brw, size);
- }
-
- assert(*bo_return == NULL);
- drm_intel_bo_reference(brw->vb.upload.bo);
- *bo_return = brw->vb.upload.bo;
- *offset_return = brw->vb.upload.offset;
- brw->vb.upload.offset += size;
-}
-
static void
-copy_array_to_vbo_array( struct brw_context *brw,
- struct brw_vertex_element *element,
- GLuint dst_stride)
+copy_array_to_vbo_array(struct brw_context *brw,
+ struct brw_vertex_element *element,
+ int min, int max,
+ struct brw_vertex_buffer *buffer,
+ GLuint dst_stride)
{
- GLuint size = element->count * dst_stride;
-
- get_space(brw, size, &element->bo, &element->offset);
-
- if (element->glarray->StrideB == 0) {
- assert(element->count == 1);
- element->stride = 0;
- } else {
- element->stride = dst_stride;
- }
+ int src_stride = element->glarray->StrideB;
+ const unsigned char *src = element->glarray->Ptr + min * src_stride;
+ int count = max - min + 1;
+ GLuint size = count * dst_stride;
/* upload as floats */
if (element->glarray->Type == GL_FIXED) {
+ char * const map = intel_upload_map(&brw->intel, size, dst_stride);
+ char *dst = map;
drm_intel_bo *src_bo = NULL;
- const char *src;
- char *dst;
GLint i, j;
/* map source bo */
@@ -305,68 +269,58 @@ copy_array_to_vbo_array( struct brw_context *brw,
src_bo = intel_bufferobj_buffer(&brw->intel, intel_buffer, INTEL_READ);
drm_intel_gem_bo_map_gtt(src_bo);
- src = (const char *) element->bo->virtual +
- (unsigned long) element->glarray->Ptr;
- }
- else {
- src = (const char *) element->glarray->Ptr;
+ src = (const unsigned char *) src_bo->virtual + (unsigned long) src;
}
- drm_intel_gem_bo_map_gtt(element->bo);
- dst = (char *) element->bo->virtual + element->offset;
-
- for (i = 0; i < element->count; i++) {
+ while (count--) {
const GLint *s = (GLint *) src;
GLfloat *d = (GLfloat *) dst;
+ int i;
- for (j = 0; j < element->glarray->Size; j++)
- d[j] = s[j] / 65536.0f;
+ for (i = 0; i < element->glarray->Size; i++)
+ d[i] = s[i] / 65536.0f;
- src += element->glarray->StrideB;
- dst += dst_stride;
+ src += src_stride;
+ dst += dst_stride;
}
- drm_intel_gem_bo_unmap_gtt(element->bo);
+ intel_upload_unmap(&brw->intel, map, size, dst_stride,
+ &buffer->bo, &buffer->offset);
+
if (src_bo)
drm_intel_gem_bo_unmap_gtt(src_bo);
return;
}
- if (dst_stride == element->glarray->StrideB) {
- drm_intel_gem_bo_map_gtt(element->bo);
- memcpy((char *)element->bo->virtual + element->offset,
- element->glarray->Ptr, size);
- drm_intel_gem_bo_unmap_gtt(element->bo);
+ if (dst_stride == src_stride) {
+ intel_upload_data(&brw->intel, src, size, dst_stride,
+ &buffer->bo, &buffer->offset);
} else {
- char *dest;
- const unsigned char *src = element->glarray->Ptr;
- int i;
-
- drm_intel_gem_bo_map_gtt(element->bo);
- dest = element->bo->virtual;
- dest += element->offset;
-
- for (i = 0; i < element->count; i++) {
- memcpy(dest, src, dst_stride);
- src += element->glarray->StrideB;
- dest += dst_stride;
- }
+ char * const map = intel_upload_map(&brw->intel, size, dst_stride);
+ char *dst = map;
- drm_intel_gem_bo_unmap_gtt(element->bo);
+ while (count--) {
+ memcpy(dst, src, dst_stride);
+ src += src_stride;
+ dst += dst_stride;
+ }
+ intel_upload_unmap(&brw->intel, map, size, dst_stride,
+ &buffer->bo, &buffer->offset);
}
+ buffer->stride = dst_stride;
}
static void brw_prepare_vertices(struct brw_context *brw)
{
struct gl_context *ctx = &brw->intel.ctx;
struct intel_context *intel = intel_context(ctx);
- GLbitfield vs_inputs = brw->vs.prog_data->inputs_read;
- GLuint i;
+ GLbitfield vs_inputs = brw->vs.prog_data->inputs_read;
const unsigned char *ptr = NULL;
- GLuint interleave = 0;
+ GLuint interleaved = 0, total_size = 0;
unsigned int min_index = brw->vb.min_index;
unsigned int max_index = brw->vb.max_index;
+ int delta, i, j;
struct brw_vertex_element *upload[VERT_ATTRIB_MAX];
GLuint nr_uploads = 0;
@@ -379,13 +333,20 @@ static void brw_prepare_vertices(struct brw_context *brw)
/* Accumulate the list of enabled arrays. */
brw->vb.nr_enabled = 0;
while (vs_inputs) {
- GLuint i = _mesa_ffsll(vs_inputs) - 1;
+ GLuint i = ffs(vs_inputs) - 1;
struct brw_vertex_element *input = &brw->vb.inputs[i];
vs_inputs &= ~(1 << i);
- brw->vb.enabled[brw->vb.nr_enabled++] = input;
+ if (input->glarray->Size && get_size(input->glarray->Type))
+ brw->vb.enabled[brw->vb.nr_enabled++] = input;
}
+ if (brw->vb.nr_enabled == 0)
+ return;
+
+ if (brw->vb.nr_buffers)
+ goto validate;
+
/* XXX: In the rare cases where this happens we fallback all
* the way to software rasterization, although a tnl fallback
* would be sufficient. I don't know of *any* real world
@@ -397,24 +358,44 @@ static void brw_prepare_vertices(struct brw_context *brw)
return;
}
- for (i = 0; i < brw->vb.nr_enabled; i++) {
+ for (i = j = 0; i < brw->vb.nr_enabled; i++) {
struct brw_vertex_element *input = brw->vb.enabled[i];
+ const struct gl_client_array *glarray = input->glarray;
+ int type_size = get_size(glarray->Type);
- input->element_size = get_size(input->glarray->Type) * input->glarray->Size;
+ input->element_size = type_size * glarray->Size;
- if (_mesa_is_bufferobj(input->glarray->BufferObj) &&
- input->glarray->Type != GL_FIXED) {
+ if (_mesa_is_bufferobj(glarray->BufferObj) &&
+ glarray->Type != GL_FIXED) {
struct intel_buffer_object *intel_buffer =
- intel_buffer_object(input->glarray->BufferObj);
-
- /* Named buffer object: Just reference its contents directly. */
- drm_intel_bo_unreference(input->bo);
- input->bo = intel_bufferobj_buffer(intel, intel_buffer,
- INTEL_READ);
- drm_intel_bo_reference(input->bo);
- input->offset = (unsigned long)input->glarray->Ptr;
- input->stride = input->glarray->StrideB;
- input->count = input->glarray->_MaxElement;
+ intel_buffer_object(glarray->BufferObj);
+ int k;
+
+ for (k = 0; k < i; k++) {
+ const struct gl_client_array *other = brw->vb.enabled[k]->glarray;
+ if (glarray->BufferObj == other->BufferObj &&
+ glarray->StrideB == other->StrideB &&
+ (uintptr_t)(glarray->Ptr - other->Ptr) < glarray->StrideB)
+ {
+ input->buffer = brw->vb.enabled[k]->buffer;
+ input->offset = glarray->Ptr - other->Ptr;
+ break;
+ }
+ }
+ if (k == i) {
+ struct brw_vertex_buffer *buffer = &brw->vb.buffers[j];
+
+ /* Named buffer object: Just reference its contents directly. */
+ buffer->bo = intel_bufferobj_source(intel,
+ intel_buffer, type_size,
+ &buffer->offset);
+ drm_intel_bo_reference(buffer->bo);
+ buffer->offset += (uintptr_t)glarray->Ptr;
+ buffer->stride = glarray->StrideB;
+
+ input->buffer = j++;
+ input->offset = 0;
+ }
/* This is a common place to reach if the user mistakenly supplies
* a pointer in place of a VBO offset. If we just let it go through,
@@ -428,71 +409,170 @@ static void brw_prepare_vertices(struct brw_context *brw)
* probably a service to the poor programmer to do so rather than
* trying to just not render.
*/
- assert(input->offset < input->bo->size);
+ assert(input->offset < brw->vb.buffers[input->buffer].bo->size);
} else {
- input->count = input->glarray->StrideB ? max_index + 1 : 1;
- if (input->bo != NULL) {
- /* Already-uploaded vertex data is present from a previous
- * prepare_vertices, but we had to re-validate state due to
- * check_aperture failing and a new batch being produced.
- */
- continue;
- }
-
/* Queue the buffer object up to be uploaded in the next pass,
* when we've decided if we're doing interleaved or not.
*/
- if (input->attrib == VERT_ATTRIB_POS) {
+ if (nr_uploads == 0) {
/* Position array not properly enabled:
*/
- if (input->glarray->StrideB == 0) {
+ if (input->attrib == VERT_ATTRIB_POS && glarray->StrideB == 0) {
intel->Fallback = GL_TRUE; /* boolean, not bitfield */
return;
}
- interleave = input->glarray->StrideB;
- ptr = input->glarray->Ptr;
+ interleaved = glarray->StrideB;
+ ptr = glarray->Ptr;
+ }
+ else if (interleaved != glarray->StrideB ||
+ (uintptr_t)(glarray->Ptr - ptr) > interleaved)
+ {
+ interleaved = 0;
}
- else if (interleave != input->glarray->StrideB ||
- (const unsigned char *)input->glarray->Ptr - ptr < 0 ||
- (const unsigned char *)input->glarray->Ptr - ptr > interleave)
+ else if ((uintptr_t)(glarray->Ptr - ptr) & (type_size -1))
{
- interleave = 0;
+ /* enforce natural alignment (for doubles) */
+ interleaved = 0;
}
upload[nr_uploads++] = input;
+ total_size = ALIGN(total_size, type_size);
+ total_size += input->element_size;
}
}
+ /* If we need to upload all the arrays, then we can trim those arrays to
+ * only the used elements [min_index, max_index] so long as we adjust all
+ * the values used in the 3DPRIMITIVE i.e. by setting the vertex bias.
+ */
+ brw->vb.start_vertex_bias = 0;
+ delta = min_index;
+ if (nr_uploads == brw->vb.nr_enabled) {
+ brw->vb.start_vertex_bias = -delta;
+ delta = 0;
+ }
+ if (delta && !brw->intel.intelScreen->relaxed_relocations)
+ min_index = delta = 0;
+
/* Handle any arrays to be uploaded. */
- if (nr_uploads > 1 && interleave && interleave <= 256) {
- /* All uploads are interleaved, so upload the arrays together as
- * interleaved. First, upload the contents and set up upload[0].
- */
- copy_array_to_vbo_array(brw, upload[0], interleave);
-
- for (i = 1; i < nr_uploads; i++) {
- /* Then, just point upload[i] at upload[0]'s buffer. */
- upload[i]->stride = interleave;
- upload[i]->offset = upload[0]->offset +
- ((const unsigned char *)upload[i]->glarray->Ptr - ptr);
- upload[i]->bo = upload[0]->bo;
- drm_intel_bo_reference(upload[i]->bo);
+ if (nr_uploads > 1) {
+ if (interleaved && interleaved <= 2*total_size) {
+ struct brw_vertex_buffer *buffer = &brw->vb.buffers[j];
+ /* All uploads are interleaved, so upload the arrays together as
+ * interleaved. First, upload the contents and set up upload[0].
+ */
+ copy_array_to_vbo_array(brw, upload[0], min_index, max_index,
+ buffer, interleaved);
+ buffer->offset -= delta * interleaved;
+
+ for (i = 0; i < nr_uploads; i++) {
+ /* Then, just point upload[i] at upload[0]'s buffer. */
+ upload[i]->offset =
+ ((const unsigned char *)upload[i]->glarray->Ptr - ptr);
+ upload[i]->buffer = j;
+ }
+ j++;
+
+ nr_uploads = 0;
}
- }
- else {
- /* Upload non-interleaved arrays */
- for (i = 0; i < nr_uploads; i++) {
- copy_array_to_vbo_array(brw, upload[i], upload[i]->element_size);
+ else if (total_size < 2048) {
+ /* Upload non-interleaved arrays into a single interleaved array */
+ struct brw_vertex_buffer *buffer;
+ int count = max_index - min_index + 1;
+ int offset;
+ char *map;
+
+ map = intel_upload_map(&brw->intel, total_size * count, total_size);
+ for (i = offset = 0; i < nr_uploads; i++) {
+ const unsigned char *src = upload[i]->glarray->Ptr;
+ int size = upload[i]->element_size;
+ int stride = upload[i]->glarray->StrideB;
+ char *dst;
+ int n;
+
+ offset = ALIGN(offset, get_size(upload[i]->glarray->Type));
+ dst = map + offset;
+ src += min_index * stride;
+
+ if (upload[i]->glarray->Type == GL_FIXED) {
+ for (n = 0; n < count; n++) {
+ const GLint *s = (GLint *) src;
+ GLfloat *d = (GLfloat *) dst;
+ int k;
+
+ for (k = 0; k < upload[i]->glarray->Size; k++) {
+ d[k] = s[k] / 65536.0f;
+ }
+
+ src += stride;
+ dst += total_size;
+ }
+ }
+ else {
+ for (n = 0; n < count; n++) {
+ memcpy(dst, src, size);
+ src += stride;
+ dst += total_size;
+ }
+ }
+
+ upload[i]->offset = offset;
+ upload[i]->buffer = j;
+
+ offset += size;
+ }
+ assert(offset == total_size);
+ buffer = &brw->vb.buffers[j++];
+ intel_upload_unmap(&brw->intel, map, offset * count, offset,
+ &buffer->bo, &buffer->offset);
+ buffer->stride = offset;
+ buffer->offset -= delta * offset;
+
+ nr_uploads = 0;
}
}
+ /* Upload non-interleaved arrays */
+ for (i = 0; i < nr_uploads; i++) {
+ struct brw_vertex_buffer *buffer = &brw->vb.buffers[j];
+ copy_array_to_vbo_array(brw, upload[i], min_index, max_index,
+ buffer, upload[i]->element_size);
+ buffer->offset -= delta * buffer->stride;
+ upload[i]->buffer = j++;
+ upload[i]->offset = 0;
+ }
- brw_prepare_query_begin(brw);
+ /* can we simply extend the current vb? */
+ if (j == brw->vb.nr_current_buffers) {
+ int delta = 0;
+ for (i = 0; i < j; i++) {
+ int d;
+
+ if (brw->vb.current_buffers[i].handle != brw->vb.buffers[i].bo->handle ||
+ brw->vb.current_buffers[i].stride != brw->vb.buffers[i].stride)
+ break;
+
+ d = brw->vb.buffers[i].offset - brw->vb.current_buffers[i].offset;
+ if (i == 0)
+ delta = d / brw->vb.current_buffers[i].stride;
+ if (delta * brw->vb.current_buffers[i].stride != d)
+ break;
+ }
- for (i = 0; i < brw->vb.nr_enabled; i++) {
- struct brw_vertex_element *input = brw->vb.enabled[i];
+ if (i == j) {
+ brw->vb.start_vertex_bias += delta;
+ while (--j >= 0)
+ drm_intel_bo_unreference(brw->vb.buffers[j].bo);
+ j = 0;
+ }
+ }
- brw_add_validated_bo(brw, input->bo);
+ brw->vb.nr_buffers = j;
+
+validate:
+ brw_prepare_query_begin(brw);
+ for (i = 0; i < brw->vb.nr_buffers; i++) {
+ brw_add_validated_bo(brw, brw->vb.buffers[i].bo);
}
}
@@ -529,49 +609,44 @@ static void brw_emit_vertices(struct brw_context *brw)
(BRW_VE1_COMPONENT_STORE_0 << BRW_VE1_COMPONENT_1_SHIFT) |
(BRW_VE1_COMPONENT_STORE_0 << BRW_VE1_COMPONENT_2_SHIFT) |
(BRW_VE1_COMPONENT_STORE_1_FLT << BRW_VE1_COMPONENT_3_SHIFT));
- ADVANCE_BATCH();
+ CACHED_BATCH();
return;
}
/* Now emit VB and VEP state packets.
- *
- * This still defines a hardware VB for each input, even if they
- * are interleaved or from the same VBO. TBD if this makes a
- * performance difference.
*/
- BEGIN_BATCH(1 + brw->vb.nr_enabled * 4);
- OUT_BATCH((CMD_VERTEX_BUFFER << 16) |
- ((1 + brw->vb.nr_enabled * 4) - 2));
- for (i = 0; i < brw->vb.nr_enabled; i++) {
- struct brw_vertex_element *input = brw->vb.enabled[i];
- uint32_t dw0;
+ if (brw->vb.nr_buffers) {
+ BEGIN_BATCH(1 + 4*brw->vb.nr_buffers);
+ OUT_BATCH((CMD_VERTEX_BUFFER << 16) | (4*brw->vb.nr_buffers - 1));
+ for (i = 0; i < brw->vb.nr_buffers; i++) {
+ struct brw_vertex_buffer *buffer = &brw->vb.buffers[i];
+ uint32_t dw0;
+
+ if (intel->gen >= 6) {
+ dw0 = GEN6_VB0_ACCESS_VERTEXDATA | (i << GEN6_VB0_INDEX_SHIFT);
+ } else {
+ dw0 = BRW_VB0_ACCESS_VERTEXDATA | (i << BRW_VB0_INDEX_SHIFT);
+ }
- if (intel->gen >= 6) {
- dw0 = GEN6_VB0_ACCESS_VERTEXDATA |
- (i << GEN6_VB0_INDEX_SHIFT);
- } else {
- dw0 = BRW_VB0_ACCESS_VERTEXDATA |
- (i << BRW_VB0_INDEX_SHIFT);
+ OUT_BATCH(dw0 | (buffer->stride << BRW_VB0_PITCH_SHIFT));
+ OUT_RELOC(buffer->bo, I915_GEM_DOMAIN_VERTEX, 0, buffer->offset);
+ if (intel->gen >= 5) {
+ OUT_RELOC(buffer->bo, I915_GEM_DOMAIN_VERTEX, 0, buffer->bo->size - 1);
+ } else
+ OUT_BATCH(buffer->bo->size / buffer->stride);
+ OUT_BATCH(0); /* Instance data step rate */
+
+ brw->vb.current_buffers[i].handle = buffer->bo->handle;
+ brw->vb.current_buffers[i].offset = buffer->offset;
+ brw->vb.current_buffers[i].stride = buffer->stride;
}
-
- OUT_BATCH(dw0 |
- (input->stride << BRW_VB0_PITCH_SHIFT));
- OUT_RELOC(input->bo,
- I915_GEM_DOMAIN_VERTEX, 0,
- input->offset);
- if (intel->gen >= 5) {
- OUT_RELOC(input->bo,
- I915_GEM_DOMAIN_VERTEX, 0,
- input->bo->size - 1);
- } else
- OUT_BATCH(input->stride ? input->count : 0);
- OUT_BATCH(0); /* Instance data step rate */
+ brw->vb.nr_current_buffers = i;
+ ADVANCE_BATCH();
}
- ADVANCE_BATCH();
BEGIN_BATCH(1 + brw->vb.nr_enabled * 2);
- OUT_BATCH((CMD_VERTEX_ELEMENT << 16) | ((1 + brw->vb.nr_enabled * 2) - 2));
+ OUT_BATCH((CMD_VERTEX_ELEMENT << 16) | (2*brw->vb.nr_enabled - 1));
for (i = 0; i < brw->vb.nr_enabled; i++) {
struct brw_vertex_element *input = brw->vb.enabled[i];
uint32_t format = get_surface_type(input->glarray->Type,
@@ -592,15 +667,15 @@ static void brw_emit_vertices(struct brw_context *brw)
}
if (intel->gen >= 6) {
- OUT_BATCH((i << GEN6_VE0_INDEX_SHIFT) |
+ OUT_BATCH((input->buffer << GEN6_VE0_INDEX_SHIFT) |
GEN6_VE0_VALID |
(format << BRW_VE0_FORMAT_SHIFT) |
- (0 << BRW_VE0_SRC_OFFSET_SHIFT));
+ (input->offset << BRW_VE0_SRC_OFFSET_SHIFT));
} else {
- OUT_BATCH((i << BRW_VE0_INDEX_SHIFT) |
+ OUT_BATCH((input->buffer << BRW_VE0_INDEX_SHIFT) |
BRW_VE0_VALID |
(format << BRW_VE0_FORMAT_SHIFT) |
- (0 << BRW_VE0_SRC_OFFSET_SHIFT));
+ (input->offset << BRW_VE0_SRC_OFFSET_SHIFT));
}
if (intel->gen >= 5)
@@ -615,7 +690,7 @@ static void brw_emit_vertices(struct brw_context *brw)
(comp3 << BRW_VE1_COMPONENT_3_SHIFT) |
((i * 4) << BRW_VE1_DST_OFFSET_SHIFT));
}
- ADVANCE_BATCH();
+ CACHED_BATCH();
}
const struct brw_tracked_state brw_vertices = {
@@ -644,25 +719,19 @@ static void brw_prepare_indices(struct brw_context *brw)
ib_type_size = get_size(index_buffer->type);
ib_size = ib_type_size * index_buffer->count;
- bufferobj = index_buffer->obj;;
+ bufferobj = index_buffer->obj;
/* Turn into a proper VBO:
*/
if (!_mesa_is_bufferobj(bufferobj)) {
- brw->ib.start_vertex_offset = 0;
/* Get new bufferobj, offset:
*/
- get_space(brw, ib_size, &bo, &offset);
-
- /* Straight upload
- */
- drm_intel_gem_bo_map_gtt(bo);
- memcpy((char *)bo->virtual + offset, index_buffer->ptr, ib_size);
- drm_intel_gem_bo_unmap_gtt(bo);
+ intel_upload_data(&brw->intel, index_buffer->ptr, ib_size, ib_type_size,
+ &bo, &offset);
+ brw->ib.start_vertex_offset = offset / ib_type_size;
} else {
offset = (GLuint) (unsigned long) index_buffer->ptr;
- brw->ib.start_vertex_offset = 0;
/* If the index buffer isn't aligned to its element size, we have to
* rebase it into a temporary.
@@ -674,41 +743,42 @@ static void brw_prepare_indices(struct brw_context *brw)
bufferobj);
map += offset;
- get_space(brw, ib_size, &bo, &offset);
-
- drm_intel_bo_subdata(bo, offset, ib_size, map);
+ intel_upload_data(&brw->intel, map, ib_size, ib_type_size,
+ &bo, &offset);
+ brw->ib.start_vertex_offset = offset / ib_type_size;
ctx->Driver.UnmapBuffer(ctx, GL_ELEMENT_ARRAY_BUFFER_ARB, bufferobj);
} else {
- bo = intel_bufferobj_buffer(intel, intel_buffer_object(bufferobj),
- INTEL_READ);
- drm_intel_bo_reference(bo);
-
/* Use CMD_3D_PRIM's start_vertex_offset to avoid re-uploading
* the index buffer state when we're just moving the start index
* of our drawing.
*/
brw->ib.start_vertex_offset = offset / ib_type_size;
- offset = 0;
- ib_size = bo->size;
+
+ bo = intel_bufferobj_source(intel,
+ intel_buffer_object(bufferobj),
+ ib_type_size,
+ &offset);
+ drm_intel_bo_reference(bo);
+
+ brw->ib.start_vertex_offset += offset / ib_type_size;
}
}
- if (brw->ib.bo != bo ||
- brw->ib.offset != offset ||
- brw->ib.size != ib_size)
- {
+ if (brw->ib.bo != bo) {
drm_intel_bo_unreference(brw->ib.bo);
brw->ib.bo = bo;
- brw->ib.offset = offset;
- brw->ib.size = ib_size;
+ brw_add_validated_bo(brw, brw->ib.bo);
brw->state.dirty.brw |= BRW_NEW_INDEX_BUFFER;
} else {
drm_intel_bo_unreference(bo);
}
- brw_add_validated_bo(brw, brw->ib.bo);
+ if (index_buffer->type != brw->ib.type) {
+ brw->ib.type = index_buffer->type;
+ brw->state.dirty.brw |= BRW_NEW_INDEX_BUFFER;
+ }
}
const struct brw_tracked_state brw_indices = {
@@ -728,29 +798,18 @@ static void brw_emit_index_buffer(struct brw_context *brw)
if (index_buffer == NULL)
return;
- /* Emit the indexbuffer packet:
- */
- {
- struct brw_indexbuffer ib;
-
- memset(&ib, 0, sizeof(ib));
-
- ib.header.bits.opcode = CMD_INDEX_BUFFER;
- ib.header.bits.length = sizeof(ib)/4 - 2;
- ib.header.bits.index_format = get_index_type(index_buffer->type);
- ib.header.bits.cut_index_enable = 0;
-
- BEGIN_BATCH(4);
- OUT_BATCH( ib.header.dword );
- OUT_RELOC(brw->ib.bo,
- I915_GEM_DOMAIN_VERTEX, 0,
- brw->ib.offset);
- OUT_RELOC(brw->ib.bo,
- I915_GEM_DOMAIN_VERTEX, 0,
- brw->ib.offset + brw->ib.size - 1);
- OUT_BATCH( 0 );
- ADVANCE_BATCH();
- }
+ BEGIN_BATCH(3);
+ OUT_BATCH(CMD_INDEX_BUFFER << 16 |
+ /* cut index enable << 10 */
+ get_index_type(index_buffer->type) << 8 |
+ 1);
+ OUT_RELOC(brw->ib.bo,
+ I915_GEM_DOMAIN_VERTEX, 0,
+ 0);
+ OUT_RELOC(brw->ib.bo,
+ I915_GEM_DOMAIN_VERTEX, 0,
+ brw->ib.bo->size - 1);
+ ADVANCE_BATCH();
}
const struct brw_tracked_state brw_index_buffer = {
diff --git a/src/mesa/drivers/dri/i965/brw_eu.h b/src/mesa/drivers/dri/i965/brw_eu.h
index 4dbdc522100..119ffc72370 100644
--- a/src/mesa/drivers/dri/i965/brw_eu.h
+++ b/src/mesa/drivers/dri/i965/brw_eu.h
@@ -861,7 +861,8 @@ void brw_fb_WRITE(struct brw_compile *p,
GLuint binding_table_index,
GLuint msg_length,
GLuint response_length,
- GLboolean eot);
+ GLboolean eot,
+ GLboolean header_present);
void brw_SAMPLE(struct brw_compile *p,
struct brw_reg dest,
diff --git a/src/mesa/drivers/dri/i965/brw_eu_emit.c b/src/mesa/drivers/dri/i965/brw_eu_emit.c
index f62fc7ebfb5..88131c432ec 100644
--- a/src/mesa/drivers/dri/i965/brw_eu_emit.c
+++ b/src/mesa/drivers/dri/i965/brw_eu_emit.c
@@ -536,6 +536,16 @@ brw_set_dp_read_message(struct brw_context *brw,
insn->bits3.dp_read_gen5.end_of_thread = 0;
insn->bits2.send_gen5.sfid = BRW_MESSAGE_TARGET_DATAPORT_READ;
insn->bits2.send_gen5.end_of_thread = 0;
+ } else if (intel->is_g4x) {
+ insn->bits3.dp_read_g4x.binding_table_index = binding_table_index; /*0:7*/
+ insn->bits3.dp_read_g4x.msg_control = msg_control; /*8:10*/
+ insn->bits3.dp_read_g4x.msg_type = msg_type; /*11:13*/
+ insn->bits3.dp_read_g4x.target_cache = target_cache; /*14:15*/
+ insn->bits3.dp_read_g4x.response_length = response_length; /*16:19*/
+ insn->bits3.dp_read_g4x.msg_length = msg_length; /*20:23*/
+ insn->bits3.dp_read_g4x.msg_target = BRW_MESSAGE_TARGET_DATAPORT_READ; /*24:27*/
+ insn->bits3.dp_read_g4x.pad1 = 0;
+ insn->bits3.dp_read_g4x.end_of_thread = 0;
} else {
insn->bits3.dp_read.binding_table_index = binding_table_index; /*0:7*/
insn->bits3.dp_read.msg_control = msg_control; /*8:11*/
@@ -1708,29 +1718,22 @@ void brw_dp_READ_4_vs(struct brw_compile *p,
GLuint location,
GLuint bind_table_index)
{
+ struct intel_context *intel = &p->brw->intel;
struct brw_instruction *insn;
GLuint msg_reg_nr = 1;
- struct brw_reg b;
- /*
- printf("vs const read msg, location %u, msg_reg_nr %d\n",
- location, msg_reg_nr);
- */
+ if (intel->gen >= 6)
+ location /= 16;
/* Setup MRF[1] with location/offset into const buffer */
brw_push_insn_state(p);
+ brw_set_access_mode(p, BRW_ALIGN_1);
brw_set_compression_control(p, BRW_COMPRESSION_NONE);
brw_set_mask_control(p, BRW_MASK_DISABLE);
brw_set_predicate_control(p, BRW_PREDICATE_NONE);
-
- /* XXX I think we're setting all the dwords of MRF[1] to 'location'.
- * when the docs say only dword[2] should be set. Hmmm. But it works.
- */
- b = brw_message_reg(msg_reg_nr);
- b = retype(b, BRW_REGISTER_TYPE_UD);
- /*b = get_element_ud(b, 2);*/
- brw_MOV(p, b, brw_imm_ud(location));
-
+ brw_MOV(p, retype(brw_vec1_reg(BRW_MESSAGE_REGISTER_FILE, msg_reg_nr, 2),
+ BRW_REGISTER_TYPE_UD),
+ brw_imm_ud(location));
brw_pop_insn_state(p);
insn = next_insn(p, BRW_OPCODE_SEND);
@@ -1741,7 +1744,11 @@ void brw_dp_READ_4_vs(struct brw_compile *p,
insn->header.mask_control = BRW_MASK_DISABLE;
brw_set_dest(p, insn, dest);
- brw_set_src0(insn, brw_null_reg());
+ if (intel->gen >= 6) {
+ brw_set_src0(insn, brw_message_reg(msg_reg_nr));
+ } else {
+ brw_set_src0(insn, brw_null_reg());
+ }
brw_set_dp_read_message(p->brw,
insn,
@@ -1768,6 +1775,7 @@ void brw_dp_READ_4_vs_relative(struct brw_compile *p,
/* Setup MRF[1] with offset into const buffer */
brw_push_insn_state(p);
+ brw_set_access_mode(p, BRW_ALIGN_1);
brw_set_compression_control(p, BRW_COMPRESSION_NONE);
brw_set_mask_control(p, BRW_MASK_DISABLE);
brw_set_predicate_control(p, BRW_PREDICATE_NONE);
@@ -1775,7 +1783,7 @@ void brw_dp_READ_4_vs_relative(struct brw_compile *p,
/* M1.0 is block offset 0, M1.4 is block offset 1, all other
* fields ignored.
*/
- brw_ADD(p, retype(brw_message_reg(1), BRW_REGISTER_TYPE_UD),
+ brw_ADD(p, retype(brw_message_reg(1), BRW_REGISTER_TYPE_D),
addr_reg, brw_imm_d(offset));
brw_pop_insn_state(p);
@@ -1816,12 +1824,12 @@ void brw_fb_WRITE(struct brw_compile *p,
GLuint binding_table_index,
GLuint msg_length,
GLuint response_length,
- GLboolean eot)
+ GLboolean eot,
+ GLboolean header_present)
{
struct intel_context *intel = &p->brw->intel;
struct brw_instruction *insn;
GLuint msg_control, msg_type;
- GLboolean header_present = GL_TRUE;
if (intel->gen >= 6 && binding_table_index == 0) {
insn = next_insn(p, BRW_OPCODE_SENDC);
@@ -1833,9 +1841,6 @@ void brw_fb_WRITE(struct brw_compile *p,
insn->header.compression_control = BRW_COMPRESSION_NONE;
if (intel->gen >= 6) {
- if (msg_length == 4)
- header_present = GL_FALSE;
-
/* headerless version, just submit color payload */
src0 = brw_message_reg(msg_reg_nr);
@@ -1940,7 +1945,8 @@ void brw_SAMPLE(struct brw_compile *p,
brw_set_compression_control(p, BRW_COMPRESSION_NONE);
brw_set_mask_control(p, BRW_MASK_DISABLE);
- brw_MOV(p, m1, brw_vec8_grf(0,0));
+ brw_MOV(p, retype(m1, BRW_REGISTER_TYPE_UD),
+ retype(brw_vec8_grf(0,0), BRW_REGISTER_TYPE_UD));
brw_MOV(p, get_element_ud(m1, 2), brw_imm_ud(newmask << 12));
brw_pop_insn_state(p);
@@ -2001,7 +2007,8 @@ void brw_SAMPLE(struct brw_compile *p,
*/
brw_push_insn_state(p);
brw_set_compression_control(p, BRW_COMPRESSION_NONE);
- brw_MOV(p, reg, reg);
+ brw_MOV(p, retype(reg, BRW_REGISTER_TYPE_UD),
+ retype(reg, BRW_REGISTER_TYPE_UD));
brw_pop_insn_state(p);
}
@@ -2033,7 +2040,8 @@ void brw_urb_WRITE(struct brw_compile *p,
if (intel->gen >= 6) {
brw_push_insn_state(p);
brw_set_mask_control( p, BRW_MASK_DISABLE );
- brw_MOV(p, brw_message_reg(msg_reg_nr), src0);
+ brw_MOV(p, retype(brw_message_reg(msg_reg_nr), BRW_REGISTER_TYPE_UD),
+ retype(src0, BRW_REGISTER_TYPE_UD));
brw_pop_insn_state(p);
src0 = brw_message_reg(msg_reg_nr);
}
diff --git a/src/mesa/drivers/dri/i965/brw_fallback.c b/src/mesa/drivers/dri/i965/brw_fallback.c
index 6796fb208dc..d0b0c22abf6 100644
--- a/src/mesa/drivers/dri/i965/brw_fallback.c
+++ b/src/mesa/drivers/dri/i965/brw_fallback.c
@@ -36,8 +36,6 @@
#include "swrast/swrast.h"
#include "tnl/tnl.h"
#include "brw_context.h"
-#include "intel_fbo.h"
-#include "intel_regions.h"
#define FILE_DEBUG_FLAG DEBUG_FALLBACKS
@@ -63,49 +61,14 @@ static GLboolean do_check_fallback(struct brw_context *brw)
for (i = 0; i < BRW_MAX_TEX_UNIT; i++) {
struct gl_texture_unit *texUnit = &ctx->Texture.Unit[i];
if (texUnit->_ReallyEnabled) {
- struct intel_texture_object *intelObj = intel_texture_object(texUnit->_Current);
- struct gl_texture_image *texImage = intelObj->base.Image[0][intelObj->firstLevel];
+ struct gl_texture_object *tex_obj = texUnit->_Current;
+ struct gl_texture_image *texImage = tex_obj->Image[0][tex_obj->BaseLevel];
if (texImage->Border) {
DBG("FALLBACK: texture border\n");
return GL_TRUE;
}
}
}
-
- /* _NEW_STENCIL
- */
- if (ctx->Stencil._Enabled &&
- (ctx->DrawBuffer->Name == 0 && !brw->intel.hw_stencil)) {
- DBG("FALLBACK: stencil\n");
- return GL_TRUE;
- }
-
- /* _NEW_BUFFERS */
- 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);
-
- /* The original gen4 hardware couldn't set up WM surfaces pointing
- * at an offset within a tile, which can happen when rendering to
- * anything but the base level of a texture or the +X face/0 depth.
- * This was fixed with the 4 Series hardware.
- *
- * For these original chips, you would have to make the depth and
- * color destination surfaces include information on the texture
- * type, LOD, face, and various limits to use them as a destination.
- * I would have done this, but there's also a nasty requirement that
- * the depth and the color surfaces all be of the same LOD, which
- * may be a worse requirement than this alignment. (Also, we may
- * want to just demote the texture to untiled, instead).
- */
- if (irb->region && irb->region->tiling != I915_TILING_NONE &&
- (irb->region->draw_offset & 4095)) {
- DBG("FALLBACK: non-tile-aligned destination for tiled FBO\n");
- return GL_TRUE;
- }
- }
- }
return GL_FALSE;
}
@@ -117,7 +80,7 @@ static void check_fallback(struct brw_context *brw)
const struct brw_tracked_state brw_check_fallback = {
.dirty = {
- .mesa = _NEW_BUFFERS | _NEW_RENDERMODE | _NEW_TEXTURE | _NEW_STENCIL,
+ .mesa = _NEW_RENDERMODE | _NEW_TEXTURE | _NEW_STENCIL,
.brw = 0,
.cache = 0
},
diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp
index 6bb195b4877..2c997b4eb3a 100644
--- a/src/mesa/drivers/dri/i965/brw_fs.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs.cpp
@@ -41,13 +41,13 @@ extern "C" {
#include "brw_context.h"
#include "brw_eu.h"
#include "brw_wm.h"
-#include "talloc.h"
}
#include "brw_fs.h"
#include "../glsl/glsl_types.h"
#include "../glsl/ir_optimization.h"
#include "../glsl/ir_print_visitor.h"
+#define MAX_INSTRUCTION (1 << 30)
static struct brw_reg brw_reg_from_fs_reg(class fs_reg *reg);
struct gl_shader *
@@ -55,7 +55,7 @@ brw_new_shader(struct gl_context *ctx, GLuint name, GLuint type)
{
struct brw_shader *shader;
- shader = talloc_zero(NULL, struct brw_shader);
+ shader = rzalloc(NULL, struct brw_shader);
if (shader) {
shader->base.Type = type;
shader->base.Name = name;
@@ -69,7 +69,7 @@ struct gl_shader_program *
brw_new_shader_program(struct gl_context *ctx, GLuint name)
{
struct brw_shader_program *prog;
- prog = talloc_zero(NULL, struct brw_shader_program);
+ prog = rzalloc(NULL, struct brw_shader_program);
if (prog) {
prog->base.Name = name;
_mesa_init_shader_program(ctx, &prog->base);
@@ -89,14 +89,17 @@ brw_compile_shader(struct gl_context *ctx, struct gl_shader *shader)
GLboolean
brw_link_shader(struct gl_context *ctx, struct gl_shader_program *prog)
{
+ struct brw_context *brw = brw_context(ctx);
+ struct intel_context *intel = &brw->intel;
+
struct brw_shader *shader =
(struct brw_shader *)prog->_LinkedShaders[MESA_SHADER_FRAGMENT];
if (shader != NULL) {
- void *mem_ctx = talloc_new(NULL);
+ void *mem_ctx = ralloc_context(NULL);
bool progress;
if (shader->ir)
- talloc_free(shader->ir);
+ ralloc_free(shader->ir);
shader->ir = new(shader) exec_list;
clone_ir_list(mem_ctx, shader->ir, shader->base.ir);
@@ -107,8 +110,24 @@ brw_link_shader(struct gl_context *ctx, struct gl_shader_program *prog)
SUB_TO_ADD_NEG |
EXP_TO_EXP2 |
LOG_TO_LOG2);
+
+ /* Pre-gen6 HW can only nest if-statements 16 deep. Beyond this,
+ * if-statements need to be flattened.
+ */
+ if (intel->gen < 6)
+ lower_if_to_cond_assign(shader->ir, 16);
+
do_lower_texture_projection(shader->ir);
+ do_vec_index_to_cond_assign(shader->ir);
brw_do_cubemap_normalize(shader->ir);
+ lower_noise(shader->ir);
+ lower_quadop_vector(shader->ir, false);
+ lower_variable_index_to_cond_assign(shader->ir,
+ GL_TRUE, /* input */
+ GL_TRUE, /* output */
+ GL_TRUE, /* temp */
+ GL_TRUE /* uniform */
+ );
do {
progress = false;
@@ -123,22 +142,12 @@ brw_link_shader(struct gl_context *ctx, struct gl_shader_program *prog)
) || progress;
progress = do_common_optimization(shader->ir, true, 32) || progress;
-
- progress = lower_noise(shader->ir) || progress;
- progress =
- lower_variable_index_to_cond_assign(shader->ir,
- GL_TRUE, /* input */
- GL_TRUE, /* output */
- GL_TRUE, /* temp */
- GL_TRUE /* uniform */
- ) || progress;
- progress = lower_quadop_vector(shader->ir, false) || progress;
} while (progress);
validate_ir_tree(shader->ir);
reparent_ir(shader->ir, shader->ir);
- talloc_free(mem_ctx);
+ ralloc_free(mem_ctx);
}
if (!_mesa_ir_link_shader(ctx, prog))
@@ -202,6 +211,7 @@ fs_visitor::implied_mrf_writes(fs_inst *inst)
return 2;
case FS_OPCODE_TEX:
case FS_OPCODE_TXB:
+ case FS_OPCODE_TXD:
case FS_OPCODE_TXL:
return 1;
case FS_OPCODE_FB_WRITE:
@@ -225,8 +235,8 @@ fs_visitor::virtual_grf_alloc(int size)
virtual_grf_array_size = 16;
else
virtual_grf_array_size *= 2;
- virtual_grf_sizes = talloc_realloc(mem_ctx, virtual_grf_sizes,
- int, virtual_grf_array_size);
+ virtual_grf_sizes = reralloc(mem_ctx, virtual_grf_sizes, int,
+ virtual_grf_array_size);
/* This slot is always unused. */
virtual_grf_sizes[0] = 0;
@@ -304,7 +314,6 @@ int
fs_visitor::setup_uniform_values(int loc, const glsl_type *type)
{
unsigned int offset = 0;
- float *vec_values;
if (type->is_matrix()) {
const glsl_type *column = glsl_type::get_instance(GLSL_TYPE_FLOAT,
@@ -323,7 +332,6 @@ fs_visitor::setup_uniform_values(int loc, const glsl_type *type)
case GLSL_TYPE_UINT:
case GLSL_TYPE_INT:
case GLSL_TYPE_BOOL:
- vec_values = fp->Base.Parameters->ParameterValues[loc];
for (unsigned int i = 0; i < type->vector_elements; i++) {
unsigned int param = c->prog_data.nr_params++;
@@ -347,8 +355,8 @@ fs_visitor::setup_uniform_values(int loc, const glsl_type *type)
c->prog_data.param_convert[param] = PARAM_NO_CONVERT;
break;
}
-
- c->prog_data.param[param] = &vec_values[i];
+ this->param_index[param] = loc;
+ this->param_offset[param] = i;
}
return 1;
@@ -419,7 +427,6 @@ fs_visitor::setup_builtin_uniform_values(ir_variable *ir)
*/
int index = _mesa_add_state_reference(this->fp->Base.Parameters,
(gl_state_index *)tokens);
- float *vec_values = this->fp->Base.Parameters->ParameterValues[index];
/* Add each of the unique swizzles of the element as a
* parameter. This'll end up matching the expected layout of
@@ -434,7 +441,9 @@ fs_visitor::setup_builtin_uniform_values(ir_variable *ir)
c->prog_data.param_convert[c->prog_data.nr_params] =
PARAM_NO_CONVERT;
- c->prog_data.param[c->prog_data.nr_params++] = &vec_values[swiz];
+ this->param_index[c->prog_data.nr_params] = index;
+ this->param_offset[c->prog_data.nr_params] = swiz;
+ c->prog_data.nr_params++;
}
}
}
@@ -474,8 +483,13 @@ fs_visitor::emit_fragcoord_interpolation(ir_variable *ir)
wpos.reg_offset++;
/* gl_FragCoord.z */
- emit(fs_inst(FS_OPCODE_LINTERP, wpos, this->delta_x, this->delta_y,
- interp_reg(FRAG_ATTRIB_WPOS, 2)));
+ if (intel->gen >= 6) {
+ emit(fs_inst(BRW_OPCODE_MOV, wpos,
+ fs_reg(brw_vec8_grf(c->source_depth_reg, 0))));
+ } else {
+ emit(fs_inst(FS_OPCODE_LINTERP, wpos, this->delta_x, this->delta_y,
+ interp_reg(FRAG_ATTRIB_WPOS, 2)));
+ }
wpos.reg_offset++;
/* gl_FragCoord.w: Already set up in emit_interpolation */
@@ -518,25 +532,40 @@ fs_visitor::emit_general_interpolation(ir_variable *ir)
continue;
}
- for (unsigned int c = 0; c < type->vector_elements; c++) {
- struct brw_reg interp = interp_reg(location, c);
- emit(fs_inst(FS_OPCODE_LINTERP,
- attr,
- this->delta_x,
- this->delta_y,
- fs_reg(interp)));
- attr.reg_offset++;
- }
-
- if (intel->gen < 6) {
- attr.reg_offset -= type->vector_elements;
+ if (c->key.flat_shade && (location == FRAG_ATTRIB_COL0 ||
+ location == FRAG_ATTRIB_COL1)) {
+ /* Constant interpolation (flat shading) case. The SF has
+ * handed us defined values in only the constant offset
+ * field of the setup reg.
+ */
for (unsigned int c = 0; c < type->vector_elements; c++) {
- emit(fs_inst(BRW_OPCODE_MUL,
- attr,
+ struct brw_reg interp = interp_reg(location, c);
+ interp = suboffset(interp, 3);
+ emit(fs_inst(FS_OPCODE_CINTERP, attr, fs_reg(interp)));
+ attr.reg_offset++;
+ }
+ } else {
+ /* Perspective interpolation case. */
+ for (unsigned int c = 0; c < type->vector_elements; c++) {
+ struct brw_reg interp = interp_reg(location, c);
+ emit(fs_inst(FS_OPCODE_LINTERP,
attr,
- this->pixel_w));
+ this->delta_x,
+ this->delta_y,
+ fs_reg(interp)));
attr.reg_offset++;
}
+
+ if (intel->gen < 6) {
+ attr.reg_offset -= type->vector_elements;
+ for (unsigned int c = 0; c < type->vector_elements; c++) {
+ emit(fs_inst(BRW_OPCODE_MUL,
+ attr,
+ attr,
+ this->pixel_w));
+ attr.reg_offset++;
+ }
+ }
}
location++;
}
@@ -631,14 +660,18 @@ fs_visitor::emit_math(fs_opcodes opcode, fs_reg dst, fs_reg src0, fs_reg src1)
assert(opcode == FS_OPCODE_POW);
if (intel->gen >= 6) {
- /* Can't do hstride == 0 args to gen6 math, so expand it out. */
- if (src0.file == UNIFORM) {
+ /* Can't do hstride == 0 args to gen6 math, so expand it out.
+ *
+ * The hardware ignores source modifiers (negate and abs) on math
+ * instructions, so we also move to a temp to set those up.
+ */
+ if (src0.file == UNIFORM || src0.abs || src0.negate) {
fs_reg expanded = fs_reg(this, glsl_type::float_type);
emit(fs_inst(BRW_OPCODE_MOV, expanded, src0));
src0 = expanded;
}
- if (src1.file == UNIFORM) {
+ if (src1.file == UNIFORM || src1.abs || src1.negate) {
fs_reg expanded = fs_reg(this, glsl_type::float_type);
emit(fs_inst(BRW_OPCODE_MOV, expanded, src1));
src1 = expanded;
@@ -770,6 +803,30 @@ fs_visitor::try_emit_saturate(ir_expression *ir)
return true;
}
+static uint32_t
+brw_conditional_for_comparison(unsigned int op)
+{
+ switch (op) {
+ case ir_binop_less:
+ return BRW_CONDITIONAL_L;
+ case ir_binop_greater:
+ return BRW_CONDITIONAL_G;
+ case ir_binop_lequal:
+ return BRW_CONDITIONAL_LE;
+ case ir_binop_gequal:
+ return BRW_CONDITIONAL_GE;
+ case ir_binop_equal:
+ case ir_binop_all_equal: /* same as equal for scalars */
+ return BRW_CONDITIONAL_Z;
+ case ir_binop_nequal:
+ case ir_binop_any_nequal: /* same as nequal for scalars */
+ return BRW_CONDITIONAL_NZ;
+ default:
+ assert(!"not reached: bad operation for comparison");
+ return BRW_CONDITIONAL_NZ;
+ }
+}
+
void
fs_visitor::visit(ir_expression *ir)
{
@@ -819,6 +876,7 @@ fs_visitor::visit(ir_expression *ir)
break;
case ir_unop_abs:
op[0].abs = true;
+ op[0].negate = false;
this->result = op[0];
break;
case ir_unop_sign:
@@ -885,35 +943,20 @@ fs_visitor::visit(ir_expression *ir)
break;
case ir_binop_less:
- inst = emit(fs_inst(BRW_OPCODE_CMP, this->result, op[0], op[1]));
- inst->conditional_mod = BRW_CONDITIONAL_L;
- emit(fs_inst(BRW_OPCODE_AND, this->result, this->result, fs_reg(0x1)));
- break;
case ir_binop_greater:
- inst = emit(fs_inst(BRW_OPCODE_CMP, this->result, op[0], op[1]));
- inst->conditional_mod = BRW_CONDITIONAL_G;
- emit(fs_inst(BRW_OPCODE_AND, this->result, this->result, fs_reg(0x1)));
- break;
case ir_binop_lequal:
- inst = emit(fs_inst(BRW_OPCODE_CMP, this->result, op[0], op[1]));
- inst->conditional_mod = BRW_CONDITIONAL_LE;
- emit(fs_inst(BRW_OPCODE_AND, this->result, this->result, fs_reg(0x1)));
- break;
case ir_binop_gequal:
- inst = emit(fs_inst(BRW_OPCODE_CMP, this->result, op[0], op[1]));
- inst->conditional_mod = BRW_CONDITIONAL_GE;
- emit(fs_inst(BRW_OPCODE_AND, this->result, this->result, fs_reg(0x1)));
- break;
case ir_binop_equal:
- case ir_binop_all_equal: /* same as nequal for scalars */
- inst = emit(fs_inst(BRW_OPCODE_CMP, this->result, op[0], op[1]));
- inst->conditional_mod = BRW_CONDITIONAL_Z;
- emit(fs_inst(BRW_OPCODE_AND, this->result, this->result, fs_reg(0x1)));
- break;
+ case ir_binop_all_equal:
case ir_binop_nequal:
- case ir_binop_any_nequal: /* same as nequal for scalars */
- inst = emit(fs_inst(BRW_OPCODE_CMP, this->result, op[0], op[1]));
- inst->conditional_mod = BRW_CONDITIONAL_NZ;
+ case ir_binop_any_nequal:
+ temp = this->result;
+ /* original gen4 does implicit conversion before comparison. */
+ if (intel->gen < 5)
+ temp.type = op[0].type;
+
+ inst = emit(fs_inst(BRW_OPCODE_CMP, temp, op[0], op[1]));
+ inst->conditional_mod = brw_conditional_for_comparison(ir->operation);
emit(fs_inst(BRW_OPCODE_AND, this->result, this->result, fs_reg(0x1)));
break;
@@ -958,7 +1001,12 @@ fs_visitor::visit(ir_expression *ir)
break;
case ir_unop_f2b:
case ir_unop_i2b:
- inst = emit(fs_inst(BRW_OPCODE_CMP, this->result, op[0], fs_reg(0.0f)));
+ temp = this->result;
+ /* original gen4 does implicit conversion before comparison. */
+ if (intel->gen < 5)
+ temp.type = op[0].type;
+
+ inst = emit(fs_inst(BRW_OPCODE_CMP, temp, op[0], fs_reg(0.0f)));
inst->conditional_mod = BRW_CONDITIONAL_NZ;
inst = emit(fs_inst(BRW_OPCODE_AND, this->result,
this->result, fs_reg(1)));
@@ -1151,6 +1199,8 @@ fs_visitor::emit_texture_gen4(ir_texture *ir, fs_reg dst, fs_reg coordinate)
}
/* gen4's SIMD8 sampler always has the slots for u,v,r present. */
mlen += 3;
+ } else if (ir->op == ir_txd) {
+ assert(!"TXD isn't supported on gen4 yet.");
} else {
/* Oh joy. gen4 doesn't have SIMD8 non-shadow-compare bias/lod
* instructions. We'll need to do SIMD16 here.
@@ -1204,6 +1254,8 @@ fs_visitor::emit_texture_gen4(ir_texture *ir, fs_reg dst, fs_reg coordinate)
inst = emit(fs_inst(FS_OPCODE_TXL, dst));
break;
case ir_txd:
+ inst = emit(fs_inst(FS_OPCODE_TXD, dst));
+ break;
case ir_txf:
assert(!"GLSL 1.30 features unsupported");
break;
@@ -1292,6 +1344,37 @@ fs_visitor::visit(ir_texture *ir)
ir->coordinate->accept(this);
fs_reg coordinate = this->result;
+ if (ir->offset != NULL) {
+ ir_constant *offset = ir->offset->as_constant();
+ assert(offset != NULL);
+
+ signed char offsets[3];
+ for (unsigned i = 0; i < ir->offset->type->vector_elements; i++)
+ offsets[i] = (signed char) offset->value.i[i];
+
+ /* Combine all three offsets into a single unsigned dword:
+ *
+ * bits 11:8 - U Offset (X component)
+ * bits 7:4 - V Offset (Y component)
+ * bits 3:0 - R Offset (Z component)
+ */
+ unsigned offset_bits = 0;
+ for (unsigned i = 0; i < ir->offset->type->vector_elements; i++) {
+ const unsigned shift = 4 * (2 - i);
+ offset_bits |= (offsets[i] << shift) & (0xF << shift);
+ }
+
+ /* Explicitly set up the message header by copying g0 to msg reg m1. */
+ emit(fs_inst(BRW_OPCODE_MOV, fs_reg(MRF, 1, BRW_REGISTER_TYPE_UD),
+ fs_reg(GRF, 0, BRW_REGISTER_TYPE_UD)));
+
+ /* Then set the offset bits in DWord 2 of the message header. */
+ emit(fs_inst(BRW_OPCODE_MOV,
+ fs_reg(retype(brw_vec1_reg(BRW_MESSAGE_REGISTER_FILE, 1, 2),
+ BRW_REGISTER_TYPE_UD)),
+ fs_reg(brw_imm_uw(offset_bits))));
+ }
+
/* Should be lowered by do_lower_texture_projection */
assert(!ir->projector);
@@ -1323,10 +1406,13 @@ fs_visitor::visit(ir_texture *ir)
fs_reg scale_y = fs_reg(UNIFORM, c->prog_data.nr_params + 1);
GLuint index = _mesa_add_state_reference(params,
(gl_state_index *)tokens);
- float *vec_values = this->fp->Base.Parameters->ParameterValues[index];
- c->prog_data.param[c->prog_data.nr_params++] = &vec_values[0];
- c->prog_data.param[c->prog_data.nr_params++] = &vec_values[1];
+ this->param_index[c->prog_data.nr_params] = index;
+ this->param_offset[c->prog_data.nr_params] = 0;
+ c->prog_data.nr_params++;
+ this->param_index[c->prog_data.nr_params] = index;
+ this->param_offset[c->prog_data.nr_params] = 1;
+ c->prog_data.nr_params++;
fs_reg dst = fs_reg(this, ir->coordinate->type);
fs_reg src = coordinate;
@@ -1349,6 +1435,14 @@ fs_visitor::visit(ir_texture *ir)
inst = emit_texture_gen5(ir, dst, coordinate);
}
+ /* If there's an offset, we already set up m1. To avoid the implied move,
+ * use the null register. Otherwise, we want an implied move from g0.
+ */
+ if (ir->offset != NULL)
+ inst->src[0] = fs_reg(brw_null_reg());
+ else
+ inst->src[0] = fs_reg(retype(brw_vec8_grf(0, 0), BRW_REGISTER_TYPE_UW));
+
inst->sampler = sampler;
this->result = dst;
@@ -1356,7 +1450,10 @@ fs_visitor::visit(ir_texture *ir)
if (ir->shadow_comparitor)
inst->shadow_compare = true;
- if (c->key.tex_swizzles[inst->sampler] != SWIZZLE_NOOP) {
+ if (ir->type == glsl_type::float_type) {
+ /* Ignore DEPTH_TEXTURE_MODE swizzling. */
+ assert(ir->sampler->type->sampler_shadow);
+ } else if (c->key.tex_swizzles[inst->sampler] != SWIZZLE_NOOP) {
fs_reg swizzle_dst = fs_reg(this, glsl_type::vec4_type);
for (int i = 0; i < 4; i++) {
@@ -1541,7 +1638,7 @@ fs_visitor::emit_bool_to_cond_code(ir_rvalue *ir)
inst = emit(fs_inst(BRW_OPCODE_CMP, reg_null_d,
op[0], fs_reg(0.0f)));
} else {
- inst = emit(fs_inst(BRW_OPCODE_MOV, reg_null_d, op[0]));
+ inst = emit(fs_inst(BRW_OPCODE_MOV, reg_null_f, op[0]));
}
inst->conditional_mod = BRW_CONDITIONAL_NZ;
break;
@@ -1556,31 +1653,18 @@ fs_visitor::emit_bool_to_cond_code(ir_rvalue *ir)
break;
case ir_binop_greater:
- inst = emit(fs_inst(BRW_OPCODE_CMP, reg_null_d, op[0], op[1]));
- inst->conditional_mod = BRW_CONDITIONAL_G;
- break;
case ir_binop_gequal:
- inst = emit(fs_inst(BRW_OPCODE_CMP, reg_null_d, op[0], op[1]));
- inst->conditional_mod = BRW_CONDITIONAL_GE;
- break;
case ir_binop_less:
- inst = emit(fs_inst(BRW_OPCODE_CMP, reg_null_d, op[0], op[1]));
- inst->conditional_mod = BRW_CONDITIONAL_L;
- break;
case ir_binop_lequal:
- inst = emit(fs_inst(BRW_OPCODE_CMP, reg_null_d, op[0], op[1]));
- inst->conditional_mod = BRW_CONDITIONAL_LE;
- break;
case ir_binop_equal:
case ir_binop_all_equal:
- inst = emit(fs_inst(BRW_OPCODE_CMP, reg_null_d, op[0], op[1]));
- inst->conditional_mod = BRW_CONDITIONAL_Z;
- break;
case ir_binop_nequal:
case ir_binop_any_nequal:
- inst = emit(fs_inst(BRW_OPCODE_CMP, reg_null_d, op[0], op[1]));
- inst->conditional_mod = BRW_CONDITIONAL_NZ;
+ inst = emit(fs_inst(BRW_OPCODE_CMP, reg_null_cmp, op[0], op[1]));
+ inst->conditional_mod =
+ brw_conditional_for_comparison(expr->operation);
break;
+
default:
assert(!"not reached");
this->fail = true;
@@ -1659,30 +1743,16 @@ fs_visitor::emit_if_gen6(ir_if *ir)
return;
case ir_binop_greater:
- inst = emit(fs_inst(BRW_OPCODE_IF, reg_null_d, op[0], op[1]));
- inst->conditional_mod = BRW_CONDITIONAL_G;
- return;
case ir_binop_gequal:
- inst = emit(fs_inst(BRW_OPCODE_IF, reg_null_d, op[0], op[1]));
- inst->conditional_mod = BRW_CONDITIONAL_GE;
- return;
case ir_binop_less:
- inst = emit(fs_inst(BRW_OPCODE_IF, reg_null_d, op[0], op[1]));
- inst->conditional_mod = BRW_CONDITIONAL_L;
- return;
case ir_binop_lequal:
- inst = emit(fs_inst(BRW_OPCODE_IF, reg_null_d, op[0], op[1]));
- inst->conditional_mod = BRW_CONDITIONAL_LE;
- return;
case ir_binop_equal:
case ir_binop_all_equal:
- inst = emit(fs_inst(BRW_OPCODE_IF, reg_null_d, op[0], op[1]));
- inst->conditional_mod = BRW_CONDITIONAL_Z;
- return;
case ir_binop_nequal:
case ir_binop_any_nequal:
inst = emit(fs_inst(BRW_OPCODE_IF, reg_null_d, op[0], op[1]));
- inst->conditional_mod = BRW_CONDITIONAL_NZ;
+ inst->conditional_mod =
+ brw_conditional_for_comparison(expr->operation);
return;
default:
assert(!"not reached");
@@ -1764,32 +1834,9 @@ fs_visitor::visit(ir_loop *ir)
this->base_ir = ir->to;
ir->to->accept(this);
- fs_inst *inst = emit(fs_inst(BRW_OPCODE_CMP, reg_null_d,
+ fs_inst *inst = emit(fs_inst(BRW_OPCODE_CMP, reg_null_cmp,
counter, this->result));
- switch (ir->cmp) {
- case ir_binop_equal:
- inst->conditional_mod = BRW_CONDITIONAL_Z;
- break;
- case ir_binop_nequal:
- inst->conditional_mod = BRW_CONDITIONAL_NZ;
- break;
- case ir_binop_gequal:
- inst->conditional_mod = BRW_CONDITIONAL_GE;
- break;
- case ir_binop_lequal:
- inst->conditional_mod = BRW_CONDITIONAL_LE;
- break;
- case ir_binop_greater:
- inst->conditional_mod = BRW_CONDITIONAL_G;
- break;
- case ir_binop_less:
- inst->conditional_mod = BRW_CONDITIONAL_L;
- break;
- default:
- assert(!"not reached: unknown loop condition");
- this->fail = true;
- break;
- }
+ inst->conditional_mod = brw_conditional_for_comparison(ir->cmp);
inst = emit(fs_inst(BRW_OPCODE_BREAK));
inst->predicated = true;
@@ -2067,7 +2114,7 @@ fs_visitor::emit_fb_writes()
}
for (int target = 0; target < c->key.nr_color_regions; target++) {
- this->current_annotation = talloc_asprintf(this->mem_ctx,
+ this->current_annotation = ralloc_asprintf(this->mem_ctx,
"FB write target %d",
target);
if (this->frag_color || this->frag_data) {
@@ -2093,6 +2140,17 @@ fs_visitor::emit_fb_writes()
}
if (c->key.nr_color_regions == 0) {
+ if (c->key.alpha_test && (this->frag_color || this->frag_data)) {
+ /* If the alpha test is enabled but there's no color buffer,
+ * we still need to send alpha out the pipeline to our null
+ * renderbuffer.
+ */
+ color.reg_offset += 3;
+ emit(fs_inst(BRW_OPCODE_MOV,
+ fs_reg(MRF, color_mrf + 3),
+ color));
+ }
+
fs_inst *inst = emit(fs_inst(FS_OPCODE_FB_WRITE,
reg_undef, reg_undef));
inst->base_mrf = 0;
@@ -2158,7 +2216,8 @@ fs_visitor::generate_fb_write(fs_inst *inst)
inst->target,
inst->mlen,
0,
- eot);
+ eot,
+ inst->header_present);
}
void
@@ -2244,7 +2303,7 @@ fs_visitor::generate_math(fs_inst *inst,
}
void
-fs_visitor::generate_tex(fs_inst *inst, struct brw_reg dst)
+fs_visitor::generate_tex(fs_inst *inst, struct brw_reg dst, struct brw_reg src)
{
int msg_type = -1;
int rlen = 4;
@@ -2266,6 +2325,16 @@ fs_visitor::generate_tex(fs_inst *inst, struct brw_reg dst)
msg_type = BRW_SAMPLER_MESSAGE_SAMPLE_BIAS_GEN5;
}
break;
+ case FS_OPCODE_TXL:
+ if (inst->shadow_compare) {
+ msg_type = BRW_SAMPLER_MESSAGE_SAMPLE_LOD_COMPARE_GEN5;
+ } else {
+ msg_type = BRW_SAMPLER_MESSAGE_SAMPLE_LOD_GEN5;
+ }
+ break;
+ case FS_OPCODE_TXD:
+ assert(!"TXD isn't supported on gen5+ yet.");
+ break;
}
} else {
switch (inst->opcode) {
@@ -2283,13 +2352,26 @@ fs_visitor::generate_tex(fs_inst *inst, struct brw_reg dst)
case FS_OPCODE_TXB:
if (inst->shadow_compare) {
assert(inst->mlen == 6);
- msg_type = BRW_SAMPLER_MESSAGE_SIMD8_SAMPLE;
+ msg_type = BRW_SAMPLER_MESSAGE_SIMD8_SAMPLE_BIAS_COMPARE;
} else {
assert(inst->mlen == 9);
msg_type = BRW_SAMPLER_MESSAGE_SIMD16_SAMPLE_BIAS;
simd_mode = BRW_SAMPLER_SIMD_MODE_SIMD16;
}
break;
+ case FS_OPCODE_TXL:
+ if (inst->shadow_compare) {
+ assert(inst->mlen == 6);
+ msg_type = BRW_SAMPLER_MESSAGE_SIMD8_SAMPLE_LOD_COMPARE;
+ } else {
+ assert(inst->mlen == 9);
+ msg_type = BRW_SAMPLER_MESSAGE_SIMD16_SAMPLE_LOD;
+ simd_mode = BRW_SAMPLER_SIMD_MODE_SIMD16;
+ }
+ break;
+ case FS_OPCODE_TXD:
+ assert(!"TXD isn't supported on gen4 yet.");
+ break;
}
}
assert(msg_type != -1);
@@ -2302,7 +2384,7 @@ fs_visitor::generate_tex(fs_inst *inst, struct brw_reg dst)
brw_SAMPLE(p,
retype(dst, BRW_REGISTER_TYPE_UW),
inst->base_mrf,
- retype(brw_vec8_grf(0, 0), BRW_REGISTER_TYPE_UW),
+ src,
SURF_INDEX_TEXTURE(inst->sampler),
inst->sampler,
WRITEMASK_XYZW,
@@ -2502,6 +2584,22 @@ fs_visitor::generate_pull_constant_load(fs_inst *inst, struct brw_reg dst)
}
}
+/**
+ * To be called after the last _mesa_add_state_reference() call, to
+ * set up prog_data.param[] for assign_curb_setup() and
+ * setup_pull_constants().
+ */
+void
+fs_visitor::setup_paramvalues_refs()
+{
+ /* Set up the pointers to ParamValues now that that array is finalized. */
+ for (unsigned int i = 0; i < c->prog_data.nr_params; i++) {
+ c->prog_data.param[i] =
+ fp->Base.Parameters->ParameterValues[this->param_index[i]] +
+ this->param_offset[i];
+ }
+}
+
void
fs_visitor::assign_curb_setup()
{
@@ -2575,12 +2673,15 @@ fs_visitor::assign_urb_setup()
foreach_iter(exec_list_iterator, iter, this->instructions) {
fs_inst *inst = (fs_inst *)iter.get();
- if (inst->opcode != FS_OPCODE_LINTERP)
- continue;
-
- assert(inst->src[2].file == FIXED_HW_REG);
+ if (inst->opcode == FS_OPCODE_LINTERP) {
+ assert(inst->src[2].file == FIXED_HW_REG);
+ inst->src[2].fixed_hw_reg.nr += urb_start;
+ }
- inst->src[2].fixed_hw_reg.nr += urb_start;
+ if (inst->opcode == FS_OPCODE_CINTERP) {
+ assert(inst->src[0].file == FIXED_HW_REG);
+ inst->src[0].fixed_hw_reg.nr += urb_start;
+ }
}
this->first_non_payload_grf = urb_start + c->prog_data.urb_read_length;
@@ -2628,10 +2729,7 @@ fs_visitor::split_virtual_grfs()
fs_inst *inst = (fs_inst *)iter.get();
/* Texturing produces 4 contiguous registers, so no splitting. */
- if ((inst->opcode == FS_OPCODE_TEX ||
- inst->opcode == FS_OPCODE_TXB ||
- inst->opcode == FS_OPCODE_TXL) &&
- inst->dst.file == GRF) {
+ if (inst->is_tex()) {
split_grf[inst->dst.reg] = false;
}
}
@@ -2671,6 +2769,7 @@ fs_visitor::split_virtual_grfs()
}
}
}
+ this->live_intervals_valid = false;
}
/**
@@ -2739,14 +2838,17 @@ void
fs_visitor::calculate_live_intervals()
{
int num_vars = this->virtual_grf_next;
- int *def = talloc_array(mem_ctx, int, num_vars);
- int *use = talloc_array(mem_ctx, int, num_vars);
+ int *def = ralloc_array(mem_ctx, int, num_vars);
+ int *use = ralloc_array(mem_ctx, int, num_vars);
int loop_depth = 0;
int loop_start = 0;
int bb_header_ip = 0;
+ if (this->live_intervals_valid)
+ return;
+
for (int i = 0; i < num_vars; i++) {
- def[i] = 1 << 30;
+ def[i] = MAX_INSTRUCTION;
use[i] = -1;
}
@@ -2820,10 +2922,12 @@ fs_visitor::calculate_live_intervals()
}
}
- talloc_free(this->virtual_grf_def);
- talloc_free(this->virtual_grf_use);
+ ralloc_free(this->virtual_grf_def);
+ ralloc_free(this->virtual_grf_use);
this->virtual_grf_def = def;
this->virtual_grf_use = use;
+
+ this->live_intervals_valid = true;
}
/**
@@ -2839,6 +2943,8 @@ fs_visitor::propagate_constants()
{
bool progress = false;
+ calculate_live_intervals();
+
foreach_iter(exec_list_iterator, iter, this->instructions) {
fs_inst *inst = (fs_inst *)iter.get();
@@ -2896,6 +3002,7 @@ fs_visitor::propagate_constants()
/* Fit this constant in by commuting the operands */
scan_inst->src[0] = scan_inst->src[1];
scan_inst->src[1] = inst->src[0];
+ progress = true;
}
break;
case BRW_OPCODE_CMP:
@@ -2910,12 +3017,15 @@ fs_visitor::propagate_constants()
if (scan_inst->dst.file == GRF &&
scan_inst->dst.reg == inst->dst.reg &&
(scan_inst->dst.reg_offset == inst->dst.reg_offset ||
- scan_inst->opcode == FS_OPCODE_TEX)) {
+ scan_inst->is_tex())) {
break;
}
}
}
+ if (progress)
+ this->live_intervals_valid = false;
+
return progress;
}
/**
@@ -2930,6 +3040,8 @@ fs_visitor::dead_code_eliminate()
bool progress = false;
int pc = 0;
+ calculate_live_intervals();
+
foreach_iter(exec_list_iterator, iter, this->instructions) {
fs_inst *inst = (fs_inst *)iter.get();
@@ -2941,6 +3053,9 @@ fs_visitor::dead_code_eliminate()
pc++;
}
+ if (progress)
+ live_intervals_valid = false;
+
return progress;
}
@@ -2948,10 +3063,35 @@ bool
fs_visitor::register_coalesce()
{
bool progress = false;
+ int if_depth = 0;
+ int loop_depth = 0;
foreach_iter(exec_list_iterator, iter, this->instructions) {
fs_inst *inst = (fs_inst *)iter.get();
+ /* Make sure that we dominate the instructions we're going to
+ * scan for interfering with our coalescing, or we won't have
+ * scanned enough to see if anything interferes with our
+ * coalescing. We don't dominate the following instructions if
+ * we're in a loop or an if block.
+ */
+ switch (inst->opcode) {
+ case BRW_OPCODE_DO:
+ loop_depth++;
+ break;
+ case BRW_OPCODE_WHILE:
+ loop_depth--;
+ break;
+ case BRW_OPCODE_IF:
+ if_depth++;
+ break;
+ case BRW_OPCODE_ENDIF:
+ if_depth--;
+ break;
+ }
+ if (loop_depth || if_depth)
+ continue;
+
if (inst->opcode != BRW_OPCODE_MOV ||
inst->predicated ||
inst->saturate ||
@@ -2959,6 +3099,8 @@ fs_visitor::register_coalesce()
inst->dst.type != inst->src[0].type)
continue;
+ bool has_source_modifiers = inst->src[0].abs || inst->src[0].negate;
+
/* Found a move of a GRF to a GRF. Let's see if we can coalesce
* them: check for no writes to either one until the exit of the
* program.
@@ -2969,37 +3111,33 @@ fs_visitor::register_coalesce()
for (; scan_iter.has_next(); scan_iter.next()) {
fs_inst *scan_inst = (fs_inst *)scan_iter.get();
- if (scan_inst->opcode == BRW_OPCODE_DO ||
- scan_inst->opcode == BRW_OPCODE_WHILE ||
- scan_inst->opcode == BRW_OPCODE_ENDIF) {
- interfered = true;
- iter = scan_iter;
- break;
- }
-
if (scan_inst->dst.file == GRF) {
if (scan_inst->dst.reg == inst->dst.reg &&
(scan_inst->dst.reg_offset == inst->dst.reg_offset ||
- scan_inst->opcode == FS_OPCODE_TEX)) {
+ scan_inst->is_tex())) {
interfered = true;
break;
}
if (scan_inst->dst.reg == inst->src[0].reg &&
(scan_inst->dst.reg_offset == inst->src[0].reg_offset ||
- scan_inst->opcode == FS_OPCODE_TEX)) {
+ scan_inst->is_tex())) {
interfered = true;
break;
}
}
+
+ /* The gen6 MATH instruction can't handle source modifiers, so avoid
+ * coalescing those for now. We should do something more specific.
+ */
+ if (intel->gen == 6 && scan_inst->is_math() && has_source_modifiers) {
+ interfered = true;
+ break;
+ }
}
if (interfered) {
continue;
}
- /* Update live interval so we don't have to recalculate. */
- this->virtual_grf_use[inst->src[0].reg] = MAX2(virtual_grf_use[inst->src[0].reg],
- virtual_grf_use[inst->dst.reg]);
-
/* Rewrite the later usage to point at the source of the move to
* be removed.
*/
@@ -3024,6 +3162,9 @@ fs_visitor::register_coalesce()
progress = true;
}
+ if (progress)
+ live_intervals_valid = false;
+
return progress;
}
@@ -3034,6 +3175,8 @@ fs_visitor::compute_to_mrf()
bool progress = false;
int next_ip = 0;
+ calculate_live_intervals();
+
foreach_iter(exec_list_iterator, iter, this->instructions) {
fs_inst *inst = (fs_inst *)iter.get();
@@ -3066,7 +3209,7 @@ fs_visitor::compute_to_mrf()
* into a compute-to-MRF.
*/
- if (scan_inst->opcode == FS_OPCODE_TEX) {
+ if (scan_inst->is_tex()) {
/* texturing writes several continuous regs, so we can't
* compute-to-mrf that.
*/
@@ -3087,14 +3230,7 @@ fs_visitor::compute_to_mrf()
/* gen6 math instructions must have the destination be
* GRF, so no compute-to-MRF for them.
*/
- if (scan_inst->opcode == FS_OPCODE_RCP ||
- scan_inst->opcode == FS_OPCODE_RSQ ||
- scan_inst->opcode == FS_OPCODE_SQRT ||
- scan_inst->opcode == FS_OPCODE_EXP2 ||
- scan_inst->opcode == FS_OPCODE_LOG2 ||
- scan_inst->opcode == FS_OPCODE_SIN ||
- scan_inst->opcode == FS_OPCODE_COS ||
- scan_inst->opcode == FS_OPCODE_POW) {
+ if (scan_inst->is_math()) {
break;
}
}
@@ -3116,6 +3252,7 @@ fs_visitor::compute_to_mrf()
*/
if (scan_inst->opcode == BRW_OPCODE_DO ||
scan_inst->opcode == BRW_OPCODE_WHILE ||
+ scan_inst->opcode == BRW_OPCODE_ELSE ||
scan_inst->opcode == BRW_OPCODE_ENDIF) {
break;
}
@@ -3202,7 +3339,7 @@ fs_visitor::remove_duplicate_mrf_writes()
}
if (inst->mlen > 0) {
- /* Found a SEND instruction, which will include two of fewer
+ /* Found a SEND instruction, which will include two or fewer
* implied MRF writes. We could do better here.
*/
for (int i = 0; i < implied_mrf_writes(inst); i++) {
@@ -3237,15 +3374,16 @@ fs_visitor::virtual_grf_interferes(int a, int b)
int start = MAX2(this->virtual_grf_def[a], this->virtual_grf_def[b]);
int end = MIN2(this->virtual_grf_use[a], this->virtual_grf_use[b]);
- /* For dead code, just check if the def interferes with the other range. */
- if (this->virtual_grf_use[a] == -1) {
- return (this->virtual_grf_def[a] >= this->virtual_grf_def[b] &&
- this->virtual_grf_def[a] < this->virtual_grf_use[b]);
- }
- if (this->virtual_grf_use[b] == -1) {
- return (this->virtual_grf_def[b] >= this->virtual_grf_def[a] &&
- this->virtual_grf_def[b] < this->virtual_grf_use[a]);
- }
+ /* We can't handle dead register writes here, without iterating
+ * over the whole instruction stream to find every single dead
+ * write to that register to compare to the live interval of the
+ * other register. Just assert that dead_code_eliminate() has been
+ * called.
+ */
+ assert((this->virtual_grf_use[a] != -1 ||
+ this->virtual_grf_def[a] == MAX_INSTRUCTION) &&
+ (this->virtual_grf_use[b] != -1 ||
+ this->virtual_grf_def[b] == MAX_INSTRUCTION));
return start < end;
}
@@ -3280,6 +3418,7 @@ static struct brw_reg brw_reg_from_fs_reg(fs_reg *reg)
break;
default:
assert(!"not reached");
+ brw_reg = brw_null_reg();
break;
}
break;
@@ -3294,6 +3433,10 @@ static struct brw_reg brw_reg_from_fs_reg(fs_reg *reg)
assert(!"not reached");
brw_reg = brw_null_reg();
break;
+ default:
+ assert(!"not reached");
+ brw_reg = brw_null_reg();
+ break;
}
if (reg->abs)
brw_reg = brw_abs(brw_reg);
@@ -3307,20 +3450,25 @@ void
fs_visitor::generate_code()
{
int last_native_inst = 0;
- struct brw_instruction *if_stack[16], *loop_stack[16];
- int if_stack_depth = 0, loop_stack_depth = 0;
- int if_depth_in_loop[16];
const char *last_annotation_string = NULL;
ir_instruction *last_annotation_ir = NULL;
+ int if_stack_array_size = 16;
+ int loop_stack_array_size = 16;
+ int if_stack_depth = 0, loop_stack_depth = 0;
+ brw_instruction **if_stack =
+ rzalloc_array(this->mem_ctx, brw_instruction *, if_stack_array_size);
+ brw_instruction **loop_stack =
+ rzalloc_array(this->mem_ctx, brw_instruction *, loop_stack_array_size);
+ int *if_depth_in_loop =
+ rzalloc_array(this->mem_ctx, int, loop_stack_array_size);
+
+
if (unlikely(INTEL_DEBUG & DEBUG_WM)) {
printf("Native code for fragment shader %d:\n",
ctx->Shader.CurrentFragmentProgram->Name);
}
- if_depth_in_loop[loop_stack_depth] = 0;
-
- memset(&if_stack, 0, sizeof(if_stack));
foreach_iter(exec_list_iterator, iter, this->instructions) {
fs_inst *inst = (fs_inst *)iter.get();
struct brw_reg src[3], dst;
@@ -3404,7 +3552,6 @@ fs_visitor::generate_code()
break;
case BRW_OPCODE_IF:
- assert(if_stack_depth < 16);
if (inst->src[0].file != BAD_FILE) {
assert(intel->gen >= 6);
if_stack[if_stack_depth] = brw_IF_gen6(p, inst->conditional_mod, src[0], src[1]);
@@ -3413,6 +3560,11 @@ fs_visitor::generate_code()
}
if_depth_in_loop[loop_stack_depth]++;
if_stack_depth++;
+ if (if_stack_array_size <= if_stack_depth) {
+ if_stack_array_size *= 2;
+ if_stack = reralloc(this->mem_ctx, if_stack, brw_instruction *,
+ if_stack_array_size);
+ }
break;
case BRW_OPCODE_ELSE:
@@ -3427,6 +3579,13 @@ fs_visitor::generate_code()
case BRW_OPCODE_DO:
loop_stack[loop_stack_depth++] = brw_DO(p, BRW_EXECUTE_8);
+ if (loop_stack_array_size <= loop_stack_depth) {
+ loop_stack_array_size *= 2;
+ loop_stack = reralloc(this->mem_ctx, loop_stack, brw_instruction *,
+ loop_stack_array_size);
+ if_depth_in_loop = reralloc(this->mem_ctx, if_depth_in_loop, int,
+ loop_stack_array_size);
+ }
if_depth_in_loop[loop_stack_depth] = 0;
break;
@@ -3480,13 +3639,17 @@ fs_visitor::generate_code()
case FS_OPCODE_COS:
generate_math(inst, dst, src);
break;
+ case FS_OPCODE_CINTERP:
+ brw_MOV(p, dst, src[0]);
+ break;
case FS_OPCODE_LINTERP:
generate_linterp(inst, dst, src);
break;
case FS_OPCODE_TEX:
case FS_OPCODE_TXB:
+ case FS_OPCODE_TXD:
case FS_OPCODE_TXL:
- generate_tex(inst, dst);
+ generate_tex(inst, dst, src[0]);
break;
case FS_OPCODE_DISCARD_NOT:
generate_discard_not(inst, dst);
@@ -3542,6 +3705,10 @@ fs_visitor::generate_code()
last_native_inst = p->nr_insn;
}
+ ralloc_free(if_stack);
+ ralloc_free(loop_stack);
+ ralloc_free(if_depth_in_loop);
+
brw_set_uip_jip(p);
/* OK, while the INTEL_DEBUG=wm above is very nice for debugging FS
@@ -3617,10 +3784,9 @@ brw_wm_fs_emit(struct brw_context *brw, struct brw_wm_compile *c)
v.emit_fb_writes();
v.split_virtual_grfs();
- v.setup_pull_constants();
- v.assign_curb_setup();
- v.assign_urb_setup();
+ v.setup_paramvalues_refs();
+ v.setup_pull_constants();
bool progress;
do {
@@ -3628,20 +3794,23 @@ brw_wm_fs_emit(struct brw_context *brw, struct brw_wm_compile *c)
progress = v.remove_duplicate_mrf_writes() || progress;
- v.calculate_live_intervals();
progress = v.propagate_constants() || progress;
progress = v.register_coalesce() || progress;
progress = v.compute_to_mrf() || progress;
progress = v.dead_code_eliminate() || progress;
} while (progress);
+ v.schedule_instructions();
+
+ v.assign_curb_setup();
+ v.assign_urb_setup();
+
if (0) {
/* Debug of register spilling: Go spill everything. */
int virtual_grf_count = v.virtual_grf_next;
for (int i = 1; i < virtual_grf_count; i++) {
v.spill_reg(i);
}
- v.calculate_live_intervals();
}
if (0)
@@ -3650,8 +3819,6 @@ brw_wm_fs_emit(struct brw_context *brw, struct brw_wm_compile *c)
while (!v.assign_regs()) {
if (v.fail)
break;
-
- v.calculate_live_intervals();
}
}
}
diff --git a/src/mesa/drivers/dri/i965/brw_fs.h b/src/mesa/drivers/dri/i965/brw_fs.h
index de7b15312a5..dc030ae5b50 100644
--- a/src/mesa/drivers/dri/i965/brw_fs.h
+++ b/src/mesa/drivers/dri/i965/brw_fs.h
@@ -41,7 +41,6 @@ extern "C" {
#include "brw_context.h"
#include "brw_eu.h"
#include "brw_wm.h"
-#include "talloc.h"
}
#include "../glsl/glsl_types.h"
#include "../glsl/ir.h"
@@ -68,9 +67,11 @@ enum fs_opcodes {
FS_OPCODE_COS,
FS_OPCODE_DDX,
FS_OPCODE_DDY,
+ FS_OPCODE_CINTERP,
FS_OPCODE_LINTERP,
FS_OPCODE_TEX,
FS_OPCODE_TXB,
+ FS_OPCODE_TXD,
FS_OPCODE_TXL,
FS_OPCODE_DISCARD_NOT,
FS_OPCODE_DISCARD_AND,
@@ -82,13 +83,13 @@ enum fs_opcodes {
class fs_reg {
public:
- /* Callers of this talloc-based new need not call delete. It's
- * easier to just talloc_free 'ctx' (or any of its ancestors). */
+ /* Callers of this ralloc-based new need not call delete. It's
+ * easier to just ralloc_free 'ctx' (or any of its ancestors). */
static void* operator new(size_t size, void *ctx)
{
void *node;
- node = talloc_size(ctx, size);
+ node = ralloc_size(ctx, size);
assert(node != NULL);
return node;
@@ -192,13 +193,13 @@ static const fs_reg reg_null_d(ARF, BRW_ARF_NULL, BRW_REGISTER_TYPE_D);
class fs_inst : public exec_node {
public:
- /* Callers of this talloc-based new need not call delete. It's
- * easier to just talloc_free 'ctx' (or any of its ancestors). */
+ /* Callers of this ralloc-based new need not call delete. It's
+ * easier to just ralloc_free 'ctx' (or any of its ancestors). */
static void* operator new(size_t size, void *ctx)
{
void *node;
- node = talloc_zero_size(ctx, size);
+ node = rzalloc_size(ctx, size);
assert(node != NULL);
return node;
@@ -305,6 +306,26 @@ public:
offset == inst->offset);
}
+ bool is_tex()
+ {
+ return (opcode == FS_OPCODE_TEX ||
+ opcode == FS_OPCODE_TXB ||
+ opcode == FS_OPCODE_TXD ||
+ opcode == FS_OPCODE_TXL);
+ }
+
+ bool is_math()
+ {
+ return (opcode == FS_OPCODE_RCP ||
+ opcode == FS_OPCODE_RSQ ||
+ opcode == FS_OPCODE_SQRT ||
+ opcode == FS_OPCODE_EXP2 ||
+ opcode == FS_OPCODE_LOG2 ||
+ opcode == FS_OPCODE_SIN ||
+ opcode == FS_OPCODE_COS ||
+ opcode == FS_OPCODE_POW);
+ }
+
int opcode; /* BRW_OPCODE_* or FS_OPCODE_* */
fs_reg dst;
fs_reg src[3];
@@ -341,13 +362,30 @@ public:
this->fp = brw->fragment_program;
this->intel = &brw->intel;
this->ctx = &intel->ctx;
- this->mem_ctx = talloc_new(NULL);
+ this->mem_ctx = ralloc_context(NULL);
this->shader = shader;
this->fail = false;
this->variable_ht = hash_table_ctor(0,
hash_table_pointer_hash,
hash_table_pointer_compare);
+ /* There's a question that appears to be left open in the spec:
+ * How do implicit dst conversions interact with the CMP
+ * instruction or conditional mods? On gen6, the instruction:
+ *
+ * CMP null<d> src0<f> src1<f>
+ *
+ * will do src1 - src0 and compare that result as if it was an
+ * integer. On gen4, it will do src1 - src0 as float, convert
+ * the result to int, and compare as int. In between, it
+ * appears that it does src1 - src0 and does the compare in the
+ * execution type so dst type doesn't matter.
+ */
+ if (this->intel->gen > 4)
+ this->reg_null_cmp = reg_null_d;
+ else
+ this->reg_null_cmp = reg_null_f;
+
this->frag_color = NULL;
this->frag_data = NULL;
this->frag_depth = NULL;
@@ -361,13 +399,14 @@ public:
this->virtual_grf_array_size = 0;
this->virtual_grf_def = NULL;
this->virtual_grf_use = NULL;
+ this->live_intervals_valid = false;
this->kill_emitted = false;
}
~fs_visitor()
{
- talloc_free(this->mem_ctx);
+ ralloc_free(this->mem_ctx);
hash_table_dtor(this->variable_ht);
}
@@ -393,6 +432,7 @@ public:
void visit(ir_function_signature *ir);
fs_inst *emit(fs_inst inst);
+ void setup_paramvalues_refs();
void assign_curb_setup();
void calculate_urb_setup();
void assign_urb_setup();
@@ -409,11 +449,13 @@ public:
bool dead_code_eliminate();
bool remove_duplicate_mrf_writes();
bool virtual_grf_interferes(int a, int b);
+ void schedule_instructions();
+
void generate_code();
void generate_fb_write(fs_inst *inst);
void generate_linterp(fs_inst *inst, struct brw_reg dst,
struct brw_reg *src);
- void generate_tex(fs_inst *inst, struct brw_reg dst);
+ void generate_tex(fs_inst *inst, struct brw_reg dst, struct brw_reg src);
void generate_math(fs_inst *inst, struct brw_reg dst, struct brw_reg *src);
void generate_discard_not(fs_inst *inst, struct brw_reg temp);
void generate_discard_and(fs_inst *inst, struct brw_reg temp);
@@ -457,11 +499,18 @@ public:
void *mem_ctx;
exec_list instructions;
+ /* Delayed setup of c->prog_data.params[] due to realloc of
+ * ParamValues[] during compile.
+ */
+ int param_index[MAX_UNIFORMS * 4];
+ int param_offset[MAX_UNIFORMS * 4];
+
int *virtual_grf_sizes;
int virtual_grf_next;
int virtual_grf_array_size;
int *virtual_grf_def;
int *virtual_grf_use;
+ bool live_intervals_valid;
struct hash_table *variable_ht;
ir_variable *frag_color, *frag_data, *frag_depth;
@@ -485,6 +534,7 @@ public:
fs_reg pixel_w;
fs_reg delta_x;
fs_reg delta_y;
+ fs_reg reg_null_cmp;
int grf_used;
};
diff --git a/src/mesa/drivers/dri/i965/brw_fs_channel_expressions.cpp b/src/mesa/drivers/dri/i965/brw_fs_channel_expressions.cpp
index 20bfa4c3ea3..7f3f52854d2 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_channel_expressions.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_channel_expressions.cpp
@@ -141,7 +141,7 @@ ir_channel_expressions_visitor::visit_leave(ir_assignment *ir)
return visit_continue;
if (!this->mem_ctx)
- this->mem_ctx = talloc_parent(ir);
+ this->mem_ctx = ralloc_parent(ir);
for (i = 0; i < expr->get_num_operands(); i++) {
if (expr->operands[i]->type->is_vector()) {
diff --git a/src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp b/src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp
index bbb210cd449..f0277423170 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp
@@ -41,7 +41,6 @@ extern "C" {
#include "brw_context.h"
#include "brw_eu.h"
#include "brw_wm.h"
-#include "talloc.h"
}
#include "brw_fs.h"
#include "../glsl/glsl_types.h"
@@ -94,6 +93,8 @@ fs_visitor::assign_regs()
int class_count = 0;
int aligned_pair_class = -1;
+ calculate_live_intervals();
+
/* Set up the register classes.
*
* The base registers store a scalar value. For texture samples,
@@ -232,8 +233,8 @@ fs_visitor::assign_regs()
}
- talloc_free(g);
- talloc_free(regs);
+ ralloc_free(g);
+ ralloc_free(regs);
return false;
}
@@ -271,8 +272,8 @@ fs_visitor::assign_regs()
this->grf_used = last_grf + 1;
- talloc_free(g);
- talloc_free(regs);
+ ralloc_free(g);
+ ralloc_free(regs);
return true;
}
@@ -416,4 +417,6 @@ fs_visitor::spill_reg(int spill_reg)
}
}
}
+
+ this->live_intervals_valid = false;
}
diff --git a/src/mesa/drivers/dri/i965/brw_fs_schedule_instructions.cpp b/src/mesa/drivers/dri/i965/brw_fs_schedule_instructions.cpp
new file mode 100644
index 00000000000..bff8f82f3f7
--- /dev/null
+++ b/src/mesa/drivers/dri/i965/brw_fs_schedule_instructions.cpp
@@ -0,0 +1,488 @@
+/*
+ * Copyright © 2010 Intel Corporation
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+ * IN THE SOFTWARE.
+ *
+ * Authors:
+ * Eric Anholt <eric@anholt.net>
+ *
+ */
+
+extern "C" {
+
+#include <sys/types.h>
+
+#include "main/macros.h"
+#include "main/shaderobj.h"
+#include "main/uniforms.h"
+#include "program/prog_optimize.h"
+#include "program/register_allocate.h"
+#include "program/sampler.h"
+#include "program/hash_table.h"
+#include "brw_context.h"
+#include "brw_eu.h"
+#include "brw_wm.h"
+}
+#include "brw_fs.h"
+#include "../glsl/glsl_types.h"
+#include "../glsl/ir_optimization.h"
+#include "../glsl/ir_print_visitor.h"
+
+/** @file brw_fs_schedule_instructions.cpp
+ *
+ * List scheduling of FS instructions.
+ *
+ * The basic model of the list scheduler is to take a basic block,
+ * compute a DAG of the dependencies (RAW ordering with latency, WAW
+ * ordering, WAR ordering), and make a list of the DAG heads.
+ * Heuristically pick a DAG head, then put all the children that are
+ * now DAG heads into the list of things to schedule.
+ *
+ * The heuristic is the important part. We're trying to be cheap,
+ * since actually computing the optimal scheduling is NP complete.
+ * What we do is track a "current clock". When we schedule a node, we
+ * update the earliest-unblocked clock time of its children, and
+ * increment the clock. Then, when trying to schedule, we just pick
+ * the earliest-unblocked instruction to schedule.
+ *
+ * Note that often there will be many things which could execute
+ * immediately, and there are a range of heuristic options to choose
+ * from in picking among those.
+ */
+
+class schedule_node : public exec_node
+{
+public:
+ schedule_node(fs_inst *inst)
+ {
+ this->inst = inst;
+ this->child_array_size = 0;
+ this->children = NULL;
+ this->child_latency = NULL;
+ this->child_count = 0;
+ this->parent_count = 0;
+ this->unblocked_time = 0;
+
+ int chans = 8;
+ int math_latency = 22;
+
+ switch (inst->opcode) {
+ case FS_OPCODE_RCP:
+ this->latency = 1 * chans * math_latency;
+ break;
+ case FS_OPCODE_RSQ:
+ this->latency = 2 * chans * math_latency;
+ break;
+ case FS_OPCODE_SQRT:
+ case FS_OPCODE_LOG2:
+ /* full precision log. partial is 2. */
+ this->latency = 3 * chans * math_latency;
+ break;
+ case FS_OPCODE_EXP2:
+ /* full precision. partial is 3, same throughput. */
+ this->latency = 4 * chans * math_latency;
+ break;
+ case FS_OPCODE_POW:
+ this->latency = 8 * chans * math_latency;
+ break;
+ case FS_OPCODE_SIN:
+ case FS_OPCODE_COS:
+ /* minimum latency, max is 12 rounds. */
+ this->latency = 5 * chans * math_latency;
+ break;
+ default:
+ this->latency = 2;
+ break;
+ }
+ }
+
+ fs_inst *inst;
+ schedule_node **children;
+ int *child_latency;
+ int child_count;
+ int parent_count;
+ int child_array_size;
+ int unblocked_time;
+ int latency;
+};
+
+class instruction_scheduler {
+public:
+ instruction_scheduler(fs_visitor *v, void *mem_ctx, int virtual_grf_count)
+ {
+ this->v = v;
+ this->mem_ctx = ralloc_context(mem_ctx);
+ this->virtual_grf_count = virtual_grf_count;
+ this->instructions.make_empty();
+ this->instructions_to_schedule = 0;
+ }
+
+ ~instruction_scheduler()
+ {
+ ralloc_free(this->mem_ctx);
+ }
+ void add_barrier_deps(schedule_node *n);
+ void add_dep(schedule_node *before, schedule_node *after, int latency);
+
+ void add_inst(fs_inst *inst);
+ void calculate_deps();
+ void schedule_instructions(fs_inst *next_block_header);
+
+ void *mem_ctx;
+
+ int instructions_to_schedule;
+ int virtual_grf_count;
+ exec_list instructions;
+ fs_visitor *v;
+};
+
+void
+instruction_scheduler::add_inst(fs_inst *inst)
+{
+ schedule_node *n = new(mem_ctx) schedule_node(inst);
+
+ assert(!inst->is_head_sentinel());
+ assert(!inst->is_tail_sentinel());
+
+ this->instructions_to_schedule++;
+
+ inst->remove();
+ instructions.push_tail(n);
+}
+
+/**
+ * Add a dependency between two instruction nodes.
+ *
+ * The @after node will be scheduled after @before. We will try to
+ * schedule it @latency cycles after @before, but no guarantees there.
+ */
+void
+instruction_scheduler::add_dep(schedule_node *before, schedule_node *after,
+ int latency)
+{
+ if (!before || !after)
+ return;
+
+ assert(before != after);
+
+ for (int i = 0; i < before->child_count; i++) {
+ if (before->children[i] == after) {
+ before->child_latency[i] = MAX2(before->child_latency[i], latency);
+ return;
+ }
+ }
+
+ if (before->child_array_size <= before->child_count) {
+ if (before->child_array_size < 16)
+ before->child_array_size = 16;
+ else
+ before->child_array_size *= 2;
+
+ before->children = reralloc(mem_ctx, before->children,
+ schedule_node *,
+ before->child_array_size);
+ before->child_latency = reralloc(mem_ctx, before->child_latency,
+ int, before->child_array_size);
+ }
+
+ before->children[before->child_count] = after;
+ before->child_latency[before->child_count] = latency;
+ before->child_count++;
+ after->parent_count++;
+}
+
+/**
+ * Sometimes we really want this node to execute after everything that
+ * was before it and before everything that followed it. This adds
+ * the deps to do so.
+ */
+void
+instruction_scheduler::add_barrier_deps(schedule_node *n)
+{
+ schedule_node *prev = (schedule_node *)n->prev;
+ schedule_node *next = (schedule_node *)n->next;
+
+ if (prev) {
+ while (!prev->is_head_sentinel()) {
+ add_dep(prev, n, 0);
+ prev = (schedule_node *)prev->prev;
+ }
+ }
+
+ if (next) {
+ while (!next->is_tail_sentinel()) {
+ add_dep(n, next, 0);
+ next = (schedule_node *)next->next;
+ }
+ }
+}
+
+void
+instruction_scheduler::calculate_deps()
+{
+ schedule_node *last_grf_write[virtual_grf_count];
+ schedule_node *last_mrf_write[BRW_MAX_MRF];
+ schedule_node *last_conditional_mod = NULL;
+
+ /* The last instruction always needs to still be the last
+ * instruction. Either it's flow control (IF, ELSE, ENDIF, DO,
+ * WHILE) and scheduling other things after it would disturb the
+ * basic block, or it's FB_WRITE and we should do a better job at
+ * dead code elimination anyway.
+ */
+ schedule_node *last = (schedule_node *)instructions.get_tail();
+ add_barrier_deps(last);
+
+ memset(last_grf_write, 0, sizeof(last_grf_write));
+ memset(last_mrf_write, 0, sizeof(last_mrf_write));
+
+ /* top-to-bottom dependencies: RAW and WAW. */
+ foreach_iter(exec_list_iterator, iter, instructions) {
+ schedule_node *n = (schedule_node *)iter.get();
+ fs_inst *inst = n->inst;
+
+ /* read-after-write deps. */
+ for (int i = 0; i < 3; i++) {
+ if (inst->src[i].file == GRF) {
+ if (last_grf_write[inst->src[i].reg]) {
+ add_dep(last_grf_write[inst->src[i].reg], n,
+ last_grf_write[inst->src[i].reg]->latency);
+ }
+ } else if (inst->src[i].file != BAD_FILE &&
+ inst->src[i].file != IMM &&
+ inst->src[i].file != UNIFORM) {
+ assert(inst->src[i].file != MRF);
+ add_barrier_deps(n);
+ }
+ }
+
+ for (int i = 0; i < inst->mlen; i++) {
+ /* It looks like the MRF regs are released in the send
+ * instruction once it's sent, not when the result comes
+ * back.
+ */
+ if (last_mrf_write[inst->base_mrf + i]) {
+ add_dep(last_mrf_write[inst->base_mrf + i], n,
+ last_mrf_write[inst->base_mrf + i]->latency);
+ }
+ }
+
+ if (inst->predicated) {
+ assert(last_conditional_mod);
+ add_dep(last_conditional_mod, n, last_conditional_mod->latency);
+ }
+
+ /* write-after-write deps. */
+ if (inst->dst.file == GRF) {
+ if (last_grf_write[inst->dst.reg]) {
+ add_dep(last_grf_write[inst->dst.reg], n,
+ last_grf_write[inst->dst.reg]->latency);
+ }
+ last_grf_write[inst->dst.reg] = n;
+ } else if (inst->dst.file == MRF) {
+ if (last_mrf_write[inst->dst.hw_reg]) {
+ add_dep(last_mrf_write[inst->dst.hw_reg], n,
+ last_mrf_write[inst->dst.hw_reg]->latency);
+ }
+ last_mrf_write[inst->dst.hw_reg] = n;
+ } else if (inst->dst.file != BAD_FILE) {
+ add_barrier_deps(n);
+ }
+
+ if (inst->mlen > 0) {
+ for (int i = 0; i < v->implied_mrf_writes(inst); i++) {
+ if (last_mrf_write[inst->base_mrf + i]) {
+ add_dep(last_mrf_write[inst->base_mrf + i], n,
+ last_mrf_write[inst->base_mrf + i]->latency);
+ }
+ last_mrf_write[inst->base_mrf + i] = n;
+ }
+ }
+
+ if (inst->conditional_mod) {
+ add_dep(last_conditional_mod, n, 0);
+ last_conditional_mod = n;
+ }
+ }
+
+ /* bottom-to-top dependencies: WAR */
+ memset(last_grf_write, 0, sizeof(last_grf_write));
+ memset(last_mrf_write, 0, sizeof(last_mrf_write));
+ last_conditional_mod = NULL;
+
+ exec_node *node;
+ exec_node *prev;
+ for (node = instructions.get_tail(), prev = node->prev;
+ !node->is_head_sentinel();
+ node = prev, prev = node->prev) {
+ schedule_node *n = (schedule_node *)node;
+ fs_inst *inst = n->inst;
+
+ /* write-after-read deps. */
+ for (int i = 0; i < 3; i++) {
+ if (inst->src[i].file == GRF) {
+ if (last_grf_write[inst->src[i].reg]) {
+ add_dep(n, last_grf_write[inst->src[i].reg], n->latency);
+ }
+ } else if (inst->src[i].file != BAD_FILE &&
+ inst->src[i].file != IMM &&
+ inst->src[i].file != UNIFORM) {
+ assert(inst->src[i].file != MRF);
+ add_barrier_deps(n);
+ }
+ }
+
+ for (int i = 0; i < inst->mlen; i++) {
+ /* It looks like the MRF regs are released in the send
+ * instruction once it's sent, not when the result comes
+ * back.
+ */
+ add_dep(n, last_mrf_write[inst->base_mrf + i], 2);
+ }
+
+ if (inst->predicated) {
+ if (last_conditional_mod) {
+ add_dep(n, last_conditional_mod, n->latency);
+ }
+ }
+
+ /* Update the things this instruction wrote, so earlier reads
+ * can mark this as WAR dependency.
+ */
+ if (inst->dst.file == GRF) {
+ last_grf_write[inst->dst.reg] = n;
+ } else if (inst->dst.file == MRF) {
+ last_mrf_write[inst->dst.hw_reg] = n;
+ } else if (inst->dst.file != BAD_FILE) {
+ add_barrier_deps(n);
+ }
+
+ if (inst->mlen > 0) {
+ for (int i = 0; i < v->implied_mrf_writes(inst); i++) {
+ last_mrf_write[inst->base_mrf + i] = n;
+ }
+ }
+
+ if (inst->conditional_mod)
+ last_conditional_mod = n;
+ }
+}
+
+void
+instruction_scheduler::schedule_instructions(fs_inst *next_block_header)
+{
+ int time = 0;
+
+ /* Remove non-DAG heads from the list. */
+ foreach_iter(exec_list_iterator, iter, instructions) {
+ schedule_node *n = (schedule_node *)iter.get();
+ if (n->parent_count != 0)
+ n->remove();
+ }
+
+ while (!instructions.is_empty()) {
+ schedule_node *chosen = NULL;
+ int chosen_time = 0;
+
+ foreach_iter(exec_list_iterator, iter, instructions) {
+ schedule_node *n = (schedule_node *)iter.get();
+
+ if (!chosen || n->unblocked_time < chosen_time) {
+ chosen = n;
+ chosen_time = n->unblocked_time;
+ }
+ }
+
+ /* Schedule this instruction. */
+ assert(chosen);
+ chosen->remove();
+ next_block_header->insert_before(chosen->inst);
+ instructions_to_schedule--;
+
+ /* Bump the clock. If we expected a delay for scheduling, then
+ * bump the clock to reflect that.
+ */
+ time = MAX2(time + 1, chosen_time);
+
+ /* Now that we've scheduled a new instruction, some of its
+ * children can be promoted to the list of instructions ready to
+ * be scheduled. Update the children's unblocked time for this
+ * DAG edge as we do so.
+ */
+ for (int i = 0; i < chosen->child_count; i++) {
+ schedule_node *child = chosen->children[i];
+
+ child->unblocked_time = MAX2(child->unblocked_time,
+ time + chosen->child_latency[i]);
+
+ child->parent_count--;
+ if (child->parent_count == 0) {
+ instructions.push_tail(child);
+ }
+ }
+
+ /* Shared resource: the mathbox. There's one per EU (on later
+ * generations, it's even more limited pre-gen6), so if we send
+ * something off to it then the next math isn't going to make
+ * progress until the first is done.
+ */
+ if (chosen->inst->is_math()) {
+ foreach_iter(exec_list_iterator, iter, instructions) {
+ schedule_node *n = (schedule_node *)iter.get();
+
+ if (n->inst->is_math())
+ n->unblocked_time = MAX2(n->unblocked_time,
+ time + chosen->latency);
+ }
+ }
+ }
+
+ assert(instructions_to_schedule == 0);
+}
+
+void
+fs_visitor::schedule_instructions()
+{
+ fs_inst *next_block_header = (fs_inst *)instructions.head;
+ instruction_scheduler sched(this, mem_ctx, this->virtual_grf_next);
+
+ while (!next_block_header->is_tail_sentinel()) {
+ /* Add things to be scheduled until we get to a new BB. */
+ while (!next_block_header->is_tail_sentinel()) {
+ fs_inst *inst = next_block_header;
+ next_block_header = (fs_inst *)next_block_header->next;
+
+ sched.add_inst(inst);
+ if (inst->opcode == BRW_OPCODE_IF ||
+ inst->opcode == BRW_OPCODE_ELSE ||
+ inst->opcode == BRW_OPCODE_ENDIF ||
+ inst->opcode == BRW_OPCODE_DO ||
+ inst->opcode == BRW_OPCODE_WHILE ||
+ inst->opcode == BRW_OPCODE_BREAK ||
+ inst->opcode == BRW_OPCODE_CONTINUE) {
+ break;
+ }
+ }
+ sched.calculate_deps();
+ sched.schedule_instructions(next_block_header);
+ }
+
+ this->live_intervals_valid = false;
+}
diff --git a/src/mesa/drivers/dri/i965/brw_fs_vector_splitting.cpp b/src/mesa/drivers/dri/i965/brw_fs_vector_splitting.cpp
index 2be6b08b5c7..530ffa26580 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_vector_splitting.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_vector_splitting.cpp
@@ -69,7 +69,7 @@ public:
ir_variable *components[4];
- /** talloc_parent(this->var) -- the shader's talloc context. */
+ /** ralloc_parent(this->var) -- the shader's ralloc context. */
void *mem_ctx;
};
@@ -77,13 +77,13 @@ class ir_vector_reference_visitor : public ir_hierarchical_visitor {
public:
ir_vector_reference_visitor(void)
{
- this->mem_ctx = talloc_new(NULL);
+ this->mem_ctx = ralloc_context(NULL);
this->variable_list.make_empty();
}
~ir_vector_reference_visitor(void)
{
- talloc_free(mem_ctx);
+ ralloc_free(mem_ctx);
}
virtual ir_visitor_status visit(ir_variable *);
@@ -358,7 +358,7 @@ brw_do_vector_splitting(exec_list *instructions)
if (refs.variable_list.is_empty())
return false;
- void *mem_ctx = talloc_new(NULL);
+ void *mem_ctx = ralloc_context(NULL);
/* Replace the decls of the vectors to be split with their split
* components.
@@ -368,10 +368,10 @@ brw_do_vector_splitting(exec_list *instructions)
const struct glsl_type *type;
type = glsl_type::get_instance(entry->var->type->base_type, 1, 1);
- entry->mem_ctx = talloc_parent(entry->var);
+ entry->mem_ctx = ralloc_parent(entry->var);
for (unsigned int i = 0; i < entry->var->type->vector_elements; i++) {
- const char *name = talloc_asprintf(mem_ctx, "%s_%c",
+ const char *name = ralloc_asprintf(mem_ctx, "%s_%c",
entry->var->name,
"xyzw"[i]);
@@ -386,7 +386,7 @@ brw_do_vector_splitting(exec_list *instructions)
ir_vector_splitting_visitor split(&refs.variable_list);
visit_list_elements(&split, instructions);
- talloc_free(mem_ctx);
+ ralloc_free(mem_ctx);
return true;
}
diff --git a/src/mesa/drivers/dri/i965/brw_gs.c b/src/mesa/drivers/dri/i965/brw_gs.c
index 73b41fdbcef..70c451d071d 100644
--- a/src/mesa/drivers/dri/i965/brw_gs.c
+++ b/src/mesa/drivers/dri/i965/brw_gs.c
@@ -96,6 +96,9 @@ static void compile_gs_prog( struct brw_context *brw,
brw_gs_quad_strip( &c, key );
break;
case GL_LINE_LOOP:
+ /* Gen6: LINELOOP is converted to LINESTRIP at the beginning of the 3D pipeline */
+ if (intel->gen == 6)
+ return;
brw_gs_lines( &c );
break;
case GL_LINES:
@@ -189,7 +192,7 @@ static void populate_key( struct brw_context *brw,
}
if (intel->gen == 6)
- prim_gs_always = brw->primitive == GL_LINE_LOOP;
+ prim_gs_always = 0;
else
prim_gs_always = brw->primitive == GL_QUADS ||
brw->primitive == GL_QUAD_STRIP ||
diff --git a/src/mesa/drivers/dri/i965/brw_misc_state.c b/src/mesa/drivers/dri/i965/brw_misc_state.c
index a91b0528fac..c768be23fa7 100644
--- a/src/mesa/drivers/dri/i965/brw_misc_state.c
+++ b/src/mesa/drivers/dri/i965/brw_misc_state.c
@@ -74,7 +74,7 @@ static void upload_binding_table_pointers(struct brw_context *brw)
struct intel_context *intel = &brw->intel;
BEGIN_BATCH(6);
- OUT_BATCH(CMD_BINDING_TABLE_PTRS << 16 | (6 - 2));
+ OUT_BATCH(_3DSTATE_BINDING_TABLE_POINTERS << 16 | (6 - 2));
OUT_BATCH(brw->vs.bind_bo_offset);
OUT_BATCH(0); /* gs */
OUT_BATCH(0); /* clip */
@@ -104,7 +104,7 @@ static void upload_gen6_binding_table_pointers(struct brw_context *brw)
struct intel_context *intel = &brw->intel;
BEGIN_BATCH(4);
- OUT_BATCH(CMD_BINDING_TABLE_PTRS << 16 |
+ OUT_BATCH(_3DSTATE_BINDING_TABLE_POINTERS << 16 |
GEN6_BINDING_TABLE_MODIFY_VS |
GEN6_BINDING_TABLE_MODIFY_GS |
GEN6_BINDING_TABLE_MODIFY_PS |
@@ -142,7 +142,7 @@ static void upload_pipelined_state_pointers(struct brw_context *brw )
}
BEGIN_BATCH(7);
- OUT_BATCH(CMD_PIPELINED_STATE_POINTERS << 16 | (7 - 2));
+ OUT_BATCH(_3DSTATE_PIPELINED_POINTERS << 16 | (7 - 2));
OUT_RELOC(brw->vs.state_bo, I915_GEM_DOMAIN_INSTRUCTION, 0, 0);
if (brw->gs.prog_active)
OUT_RELOC(brw->gs.state_bo, I915_GEM_DOMAIN_INSTRUCTION, 0, 1);
@@ -151,7 +151,7 @@ static void upload_pipelined_state_pointers(struct brw_context *brw )
OUT_RELOC(brw->clip.state_bo, I915_GEM_DOMAIN_INSTRUCTION, 0, 1);
OUT_RELOC(brw->sf.state_bo, I915_GEM_DOMAIN_INSTRUCTION, 0, 0);
OUT_RELOC(brw->wm.state_bo, I915_GEM_DOMAIN_INSTRUCTION, 0, 0);
- OUT_RELOC(brw->cc.state_bo, I915_GEM_DOMAIN_INSTRUCTION, 0,
+ OUT_RELOC(brw->intel.batch.bo, I915_GEM_DOMAIN_INSTRUCTION, 0,
brw->cc.state_offset);
ADVANCE_BATCH();
@@ -214,7 +214,7 @@ static void emit_depthbuffer(struct brw_context *brw)
if (region == NULL) {
BEGIN_BATCH(len);
- OUT_BATCH(CMD_DEPTH_BUFFER << 16 | (len - 2));
+ OUT_BATCH(_3DSTATE_DEPTH_BUFFER << 16 | (len - 2));
OUT_BATCH((BRW_DEPTHFORMAT_D32_FLOAT << 18) |
(BRW_SURFACE_NULL << 29));
OUT_BATCH(0);
@@ -251,7 +251,7 @@ static void emit_depthbuffer(struct brw_context *brw)
assert(region->tiling != I915_TILING_NONE);
BEGIN_BATCH(len);
- OUT_BATCH(CMD_DEPTH_BUFFER << 16 | (len - 2));
+ OUT_BATCH(_3DSTATE_DEPTH_BUFFER << 16 | (len - 2));
OUT_BATCH(((region->pitch * region->cpp) - 1) |
(format << 18) |
(BRW_TILEWALK_YMAJOR << 26) |
@@ -277,7 +277,7 @@ static void emit_depthbuffer(struct brw_context *brw)
/* Initialize it for safety. */
if (intel->gen >= 6) {
BEGIN_BATCH(2);
- OUT_BATCH(CMD_3D_CLEAR_PARAMS << 16 | (2 - 2));
+ OUT_BATCH(_3DSTATE_CLEAR_PARAMS << 16 | (2 - 2));
OUT_BATCH(0);
ADVANCE_BATCH();
}
@@ -301,16 +301,15 @@ const struct brw_tracked_state brw_depthbuffer = {
static void upload_polygon_stipple(struct brw_context *brw)
{
+ struct intel_context *intel = &brw->intel;
struct gl_context *ctx = &brw->intel.ctx;
- struct brw_polygon_stipple bps;
GLuint i;
if (!ctx->Polygon.StippleFlag)
return;
- memset(&bps, 0, sizeof(bps));
- bps.header.opcode = CMD_POLY_STIPPLE_PATTERN;
- bps.header.length = sizeof(bps)/4-2;
+ BEGIN_BATCH(33);
+ OUT_BATCH(_3DSTATE_POLY_STIPPLE_PATTERN << 16 | (33 - 2));
/* Polygon stipple is provided in OpenGL order, i.e. bottom
* row first. If we're rendering to a window (i.e. the
@@ -321,14 +320,13 @@ static void upload_polygon_stipple(struct brw_context *brw)
*/
if (ctx->DrawBuffer->Name == 0) {
for (i = 0; i < 32; i++)
- bps.stipple[i] = ctx->PolygonStipple[31 - i]; /* invert */
+ OUT_BATCH(ctx->PolygonStipple[31 - i]); /* invert */
}
else {
for (i = 0; i < 32; i++)
- bps.stipple[i] = ctx->PolygonStipple[i]; /* don't invert */
+ OUT_BATCH(ctx->PolygonStipple[i]);
}
-
- BRW_CACHED_BATCH_STRUCT(brw, &bps);
+ CACHED_BATCH();
}
const struct brw_tracked_state brw_polygon_stipple = {
@@ -347,15 +345,14 @@ const struct brw_tracked_state brw_polygon_stipple = {
static void upload_polygon_stipple_offset(struct brw_context *brw)
{
+ struct intel_context *intel = &brw->intel;
struct gl_context *ctx = &brw->intel.ctx;
- struct brw_polygon_stipple_offset bpso;
if (!ctx->Polygon.StippleFlag)
return;
- memset(&bpso, 0, sizeof(bpso));
- bpso.header.opcode = CMD_POLY_STIPPLE_OFFSET;
- bpso.header.length = sizeof(bpso)/4-2;
+ BEGIN_BATCH(2);
+ OUT_BATCH(_3DSTATE_POLY_STIPPLE_OFFSET << 16 | (2-2));
/* If we're drawing to a system window (ctx->DrawBuffer->Name == 0),
* we have to invert the Y axis in order to match the OpenGL
@@ -365,16 +362,11 @@ static void upload_polygon_stipple_offset(struct brw_context *brw)
* system works just fine, and there's no window system to
* worry about.
*/
- if (brw->intel.ctx.DrawBuffer->Name == 0) {
- bpso.bits0.x_offset = 0;
- bpso.bits0.y_offset = (32 - (ctx->DrawBuffer->Height & 31)) & 31;
- }
- else {
- bpso.bits0.y_offset = 0;
- bpso.bits0.x_offset = 0;
- }
-
- BRW_CACHED_BATCH_STRUCT(brw, &bpso);
+ if (brw->intel.ctx.DrawBuffer->Name == 0)
+ OUT_BATCH((32 - (ctx->DrawBuffer->Height & 31)) & 31);
+ else
+ OUT_BATCH(0);
+ CACHED_BATCH();
}
#define _NEW_WINDOW_POS 0x40000000
@@ -393,18 +385,17 @@ const struct brw_tracked_state brw_polygon_stipple_offset = {
*/
static void upload_aa_line_parameters(struct brw_context *brw)
{
+ struct intel_context *intel = &brw->intel;
struct gl_context *ctx = &brw->intel.ctx;
- struct brw_aa_line_parameters balp;
if (!ctx->Line.SmoothFlag || !brw->has_aa_line_parameters)
return;
+ OUT_BATCH(_3DSTATE_AA_LINE_PARAMETERS << 16 | (3 - 2));
/* use legacy aa line coverage computation */
- memset(&balp, 0, sizeof(balp));
- balp.header.opcode = CMD_AA_LINE_PARAMETERS;
- balp.header.length = sizeof(balp) / 4 - 2;
-
- BRW_CACHED_BATCH_STRUCT(brw, &balp);
+ OUT_BATCH(0);
+ OUT_BATCH(0);
+ CACHED_BATCH();
}
const struct brw_tracked_state brw_aa_line_parameters = {
@@ -422,28 +413,21 @@ const struct brw_tracked_state brw_aa_line_parameters = {
static void upload_line_stipple(struct brw_context *brw)
{
+ struct intel_context *intel = &brw->intel;
struct gl_context *ctx = &brw->intel.ctx;
- struct brw_line_stipple bls;
GLfloat tmp;
GLint tmpi;
if (!ctx->Line.StippleFlag)
return;
- memset(&bls, 0, sizeof(bls));
- bls.header.opcode = CMD_LINE_STIPPLE_PATTERN;
- bls.header.length = sizeof(bls)/4 - 2;
-
- bls.bits0.pattern = ctx->Line.StipplePattern;
- bls.bits1.repeat_count = ctx->Line.StippleFactor;
-
+ BEGIN_BATCH(3);
+ OUT_BATCH(_3DSTATE_LINE_STIPPLE_PATTERN << 16 | (3 - 2));
+ OUT_BATCH(ctx->Line.StipplePattern);
tmp = 1.0 / (GLfloat) ctx->Line.StippleFactor;
tmpi = tmp * (1<<13);
-
-
- bls.bits1.inverse_repeat_count = tmpi;
-
- BRW_CACHED_BATCH_STRUCT(brw, &bls);
+ OUT_BATCH(tmpi << 16 | ctx->Line.StippleFactor);
+ CACHED_BATCH();
}
const struct brw_tracked_state brw_line_stipple = {
@@ -481,7 +465,7 @@ static void upload_invarient_state( struct brw_context *brw )
/* Disable depth offset clamping.
*/
- gdo.header.opcode = CMD_GLOBAL_DEPTH_OFFSET_CLAMP;
+ gdo.header.opcode = _3DSTATE_GLOBAL_DEPTH_OFFSET_CLAMP;
gdo.header.length = sizeof(gdo)/4 - 2;
gdo.depth_offset_clamp = 0.0;
@@ -492,20 +476,20 @@ static void upload_invarient_state( struct brw_context *brw )
int i;
BEGIN_BATCH(3);
- OUT_BATCH(CMD_3D_MULTISAMPLE << 16 | (3 - 2));
+ OUT_BATCH(_3DSTATE_MULTISAMPLE << 16 | (3 - 2));
OUT_BATCH(MS_PIXEL_LOCATION_CENTER |
MS_NUMSAMPLES_1);
OUT_BATCH(0); /* positions for 4/8-sample */
ADVANCE_BATCH();
BEGIN_BATCH(2);
- OUT_BATCH(CMD_3D_SAMPLE_MASK << 16 | (2 - 2));
+ OUT_BATCH(_3DSTATE_SAMPLE_MASK << 16 | (2 - 2));
OUT_BATCH(1);
ADVANCE_BATCH();
for (i = 0; i < 4; i++) {
BEGIN_BATCH(4);
- OUT_BATCH(CMD_GS_SVB_INDEX << 16 | (4 - 2));
+ OUT_BATCH(_3DSTATE_GS_SVB_INDEX << 16 | (4 - 2));
OUT_BATCH(i << SVB_INDEX_SHIFT);
OUT_BATCH(0);
OUT_BATCH(0xffffffff);
@@ -565,7 +549,7 @@ static void upload_state_base_address( struct brw_context *brw )
BEGIN_BATCH(10);
OUT_BATCH(CMD_STATE_BASE_ADDRESS << 16 | (10 - 2));
OUT_BATCH(1); /* General state base address */
- OUT_RELOC(intel->batch->buf, I915_GEM_DOMAIN_SAMPLER, 0,
+ OUT_RELOC(intel->batch.bo, I915_GEM_DOMAIN_SAMPLER, 0,
1); /* Surface state base address */
OUT_BATCH(1); /* Dynamic state base address */
OUT_BATCH(1); /* Indirect object base address */
@@ -579,7 +563,7 @@ static void upload_state_base_address( struct brw_context *brw )
BEGIN_BATCH(8);
OUT_BATCH(CMD_STATE_BASE_ADDRESS << 16 | (8 - 2));
OUT_BATCH(1); /* General state base address */
- OUT_RELOC(intel->batch->buf, I915_GEM_DOMAIN_SAMPLER, 0,
+ OUT_RELOC(intel->batch.bo, I915_GEM_DOMAIN_SAMPLER, 0,
1); /* Surface state base address */
OUT_BATCH(1); /* Indirect object base address */
OUT_BATCH(1); /* Instruction base address */
@@ -591,7 +575,7 @@ static void upload_state_base_address( struct brw_context *brw )
BEGIN_BATCH(6);
OUT_BATCH(CMD_STATE_BASE_ADDRESS << 16 | (6 - 2));
OUT_BATCH(1); /* General state base address */
- OUT_RELOC(intel->batch->buf, I915_GEM_DOMAIN_SAMPLER, 0,
+ OUT_RELOC(intel->batch.bo, I915_GEM_DOMAIN_SAMPLER, 0,
1); /* Surface state base address */
OUT_BATCH(1); /* Indirect object base address */
OUT_BATCH(1); /* General state upper bound */
diff --git a/src/mesa/drivers/dri/i965/brw_program.c b/src/mesa/drivers/dri/i965/brw_program.c
index 94efa791091..7d653327e30 100644
--- a/src/mesa/drivers/dri/i965/brw_program.c
+++ b/src/mesa/drivers/dri/i965/brw_program.c
@@ -36,7 +36,7 @@
#include "program/program.h"
#include "program/programopt.h"
#include "tnl/tnl.h"
-#include "talloc.h"
+#include "../glsl/ralloc.h"
#include "brw_context.h"
#include "brw_wm.h"
@@ -115,7 +115,7 @@ shader_error(struct gl_context *ctx, struct gl_program *prog, const char *msg)
shader = _mesa_lookup_shader_program(ctx, prog->Id);
if (shader) {
- shader->InfoLog = talloc_strdup_append(shader->InfoLog, msg);
+ ralloc_strcat(&shader->InfoLog, msg);
shader->LinkStatus = GL_FALSE;
}
}
diff --git a/src/mesa/drivers/dri/i965/brw_queryobj.c b/src/mesa/drivers/dri/i965/brw_queryobj.c
index f28f28663ea..b41d05dd438 100644
--- a/src/mesa/drivers/dri/i965/brw_queryobj.c
+++ b/src/mesa/drivers/dri/i965/brw_queryobj.c
@@ -177,7 +177,7 @@ brw_end_query(struct gl_context *ctx, struct gl_query_object *q)
ADVANCE_BATCH();
}
- intel_batchbuffer_flush(intel->batch);
+ intel_batchbuffer_flush(intel);
} else {
/* Flush the batchbuffer in case it has writes to our query BO.
* Have later queries write to a new query BO so that further rendering
@@ -185,7 +185,7 @@ brw_end_query(struct gl_context *ctx, struct gl_query_object *q)
*/
if (query->bo) {
brw_emit_query_end(brw);
- intel_batchbuffer_flush(intel->batch);
+ intel_batchbuffer_flush(intel);
drm_intel_bo_unreference(brw->query.bo);
brw->query.bo = NULL;
@@ -232,6 +232,12 @@ brw_prepare_query_begin(struct brw_context *brw)
brw->query.bo = NULL;
brw->query.bo = drm_intel_bo_alloc(intel->bufmgr, "query", 4096, 1);
+
+ /* clear target buffer */
+ drm_intel_bo_map(brw->query.bo, GL_TRUE);
+ memset((char *)brw->query.bo->virtual, 0, 4096);
+ drm_intel_bo_unmap(brw->query.bo);
+
brw->query.index = 0;
}
diff --git a/src/mesa/drivers/dri/i965/brw_state.h b/src/mesa/drivers/dri/i965/brw_state.h
index 3beed16945b..86b0caa4a4e 100644
--- a/src/mesa/drivers/dri/i965/brw_state.h
+++ b/src/mesa/drivers/dri/i965/brw_state.h
@@ -164,25 +164,18 @@ void brw_destroy_caches( struct brw_context *brw );
/***********************************************************************
* brw_state_batch.c
*/
-#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,
- const void *data,
- GLuint sz );
-void brw_destroy_batch_cache( struct brw_context *brw );
-void brw_clear_batch_cache( struct brw_context *brw );
+#define BRW_BATCH_STRUCT(brw, s) intel_batchbuffer_data(&brw->intel, (s), \
+ sizeof(*(s)), false)
+
void *brw_state_batch(struct brw_context *brw,
int size,
int alignment,
- drm_intel_bo **out_bo,
uint32_t *out_offset);
/* brw_wm_surface_state.c */
void brw_create_constant_surface(struct brw_context *brw,
drm_intel_bo *bo,
int width,
- drm_intel_bo **out_bo,
uint32_t *out_offset);
#endif
diff --git a/src/mesa/drivers/dri/i965/brw_state_batch.c b/src/mesa/drivers/dri/i965/brw_state_batch.c
index be3989eb7db..213c7a38d8c 100644
--- a/src/mesa/drivers/dri/i965/brw_state_batch.c
+++ b/src/mesa/drivers/dri/i965/brw_state_batch.c
@@ -29,75 +29,10 @@
* Keith Whitwell <keith@tungstengraphics.com>
*/
-
-
#include "brw_state.h"
#include "intel_batchbuffer.h"
#include "main/imports.h"
-
-
-/* A facility similar to the data caching code above, which aims to
- * prevent identical commands being issued repeatedly.
- */
-GLboolean brw_cached_batch_struct( struct brw_context *brw,
- const void *data,
- GLuint sz )
-{
- struct brw_cached_batch_item *item = brw->cached_batch_items;
- struct header *newheader = (struct header *)data;
-
- if (brw->emit_state_always) {
- intel_batchbuffer_data(brw->intel.batch, data, sz);
- return GL_TRUE;
- }
-
- while (item) {
- if (item->header->opcode == newheader->opcode) {
- if (item->sz == sz && memcmp(item->header, newheader, sz) == 0)
- return GL_FALSE;
- if (item->sz != sz) {
- free(item->header);
- item->header = malloc(sz);
- item->sz = sz;
- }
- goto emit;
- }
- item = item->next;
- }
-
- assert(!item);
- item = CALLOC_STRUCT(brw_cached_batch_item);
- item->header = malloc(sz);
- item->sz = sz;
- item->next = brw->cached_batch_items;
- brw->cached_batch_items = item;
-
- emit:
- memcpy(item->header, newheader, sz);
- intel_batchbuffer_data(brw->intel.batch, data, sz);
- return GL_TRUE;
-}
-
-void brw_clear_batch_cache( struct brw_context *brw )
-{
- struct brw_cached_batch_item *item = brw->cached_batch_items;
-
- while (item) {
- struct brw_cached_batch_item *next = item->next;
- free((void *)item->header);
- free(item);
- item = next;
- }
-
- brw->cached_batch_items = NULL;
-}
-
-void brw_destroy_batch_cache( struct brw_context *brw )
-{
- brw_clear_batch_cache(brw);
-}
-
/**
* Allocates a block of space in the batchbuffer for indirect state.
*
@@ -116,13 +51,12 @@ void *
brw_state_batch(struct brw_context *brw,
int size,
int alignment,
- drm_intel_bo **out_bo,
uint32_t *out_offset)
{
- struct intel_batchbuffer *batch = brw->intel.batch;
+ struct intel_batchbuffer *batch = &brw->intel.batch;
uint32_t offset;
- assert(size < batch->buf->size);
+ assert(size < batch->bo->size);
offset = ROUND_DOWN_TO(batch->state_batch_offset - size, alignment);
/* If allocating from the top would wrap below the batchbuffer, or
@@ -130,19 +64,13 @@ brw_state_batch(struct brw_context *brw,
* space, then flush and try again.
*/
if (batch->state_batch_offset < size ||
- offset < batch->ptr - batch->map + batch->reserved_space) {
- intel_batchbuffer_flush(batch);
+ offset < 4*batch->used + batch->reserved_space) {
+ intel_batchbuffer_flush(&brw->intel);
offset = ROUND_DOWN_TO(batch->state_batch_offset - size, alignment);
}
batch->state_batch_offset = offset;
- if (*out_bo != batch->buf) {
- drm_intel_bo_unreference(*out_bo);
- drm_intel_bo_reference(batch->buf);
- *out_bo = batch->buf;
- }
-
*out_offset = offset;
- return batch->map + offset;
+ return batch->map + (offset>>2);
}
diff --git a/src/mesa/drivers/dri/i965/brw_state_cache.c b/src/mesa/drivers/dri/i965/brw_state_cache.c
index 58ff528d44b..01eeb19a684 100644
--- a/src/mesa/drivers/dri/i965/brw_state_cache.c
+++ b/src/mesa/drivers/dri/i965/brw_state_cache.c
@@ -58,8 +58,6 @@
#include "main/imports.h"
#include "brw_state.h"
-#include "intel_batchbuffer.h"
-#include "brw_wm.h"
#define FILE_DEBUG_FLAG DEBUG_STATE
@@ -433,8 +431,6 @@ brw_clear_cache(struct brw_context *brw, struct brw_cache *cache)
void
brw_state_cache_check_size(struct brw_context *brw)
{
- DBG("%s (n_items=%d)\n", __FUNCTION__, brw->cache.n_items);
-
/* un-tuned guess. Each object is generally a page, so 1000 of them is 4 MB of
* state cache.
*/
diff --git a/src/mesa/drivers/dri/i965/brw_state_dump.c b/src/mesa/drivers/dri/i965/brw_state_dump.c
index e2628874712..fdce79da2f4 100644
--- a/src/mesa/drivers/dri/i965/brw_state_dump.c
+++ b/src/mesa/drivers/dri/i965/brw_state_dump.c
@@ -26,6 +26,7 @@
*/
#include "main/mtypes.h"
+#include "intel_batchbuffer.h"
#include "brw_context.h"
#include "brw_defines.h"
@@ -54,7 +55,8 @@ state_out(const char *name, void *data, uint32_t hw_offset, int index,
/** Generic, undecoded state buffer debug printout */
static void
-state_struct_out(const char *name, drm_intel_bo *buffer, unsigned int state_size)
+state_struct_out(const char *name, drm_intel_bo *buffer,
+ unsigned int offset, unsigned int size)
{
int i;
@@ -62,8 +64,8 @@ state_struct_out(const char *name, drm_intel_bo *buffer, unsigned int state_size
return;
drm_intel_bo_map(buffer, GL_FALSE);
- for (i = 0; i < state_size / 4; i++) {
- state_out(name, buffer->virtual, buffer->offset, i,
+ for (i = 0; i < size / 4; i++) {
+ state_out(name, buffer->virtual + offset, buffer->offset + offset, i,
"dword %d\n", i);
}
drm_intel_bo_unmap(buffer);
@@ -98,21 +100,25 @@ get_965_surface_format(unsigned int surface_format)
static void dump_wm_surface_state(struct brw_context *brw)
{
+ dri_bo *bo;
+ GLubyte *base;
int i;
+ bo = brw->intel.batch.bo;
+ drm_intel_bo_map(bo, GL_FALSE);
+ base = bo->virtual;
+
for (i = 0; i < brw->wm.nr_surfaces; i++) {
- drm_intel_bo *surf_bo = brw->wm.surf_bo[i];
unsigned int surfoff;
struct brw_surface_state *surf;
char name[20];
- if (surf_bo == NULL) {
+ if (brw->wm.surf_offset[i] == 0) {
fprintf(stderr, "WM SURF%d: NULL\n", i);
continue;
}
- drm_intel_bo_map(surf_bo, GL_FALSE);
- surfoff = surf_bo->offset + brw->wm.surf_offset[i];
- surf = (struct brw_surface_state *)(surf_bo->virtual + brw->wm.surf_offset[i]);
+ surfoff = bo->offset + brw->wm.surf_offset[i];
+ surf = (struct brw_surface_state *)(base + brw->wm.surf_offset[i]);
sprintf(name, "WM SURF%d", i);
state_out(name, surf, surfoff, 0, "%s %s\n",
@@ -127,9 +133,8 @@ static void dump_wm_surface_state(struct brw_context *brw)
surf->ss4.min_lod);
state_out(name, surf, surfoff, 5, "x,y offset: %d,%d\n",
surf->ss5.x_offset, surf->ss5.y_offset);
-
- drm_intel_bo_unmap(surf_bo);
}
+ drm_intel_bo_unmap(bo);
}
@@ -280,13 +285,14 @@ static void dump_cc_state(struct brw_context *brw)
const char *name = "CC";
struct gen6_color_calc_state *cc;
uint32_t cc_off;
+ dri_bo *bo = brw->intel.batch.bo;
- if (brw->cc.state_bo == NULL)
+ if (brw->cc.state_offset == 0)
return;
- drm_intel_bo_map(brw->cc.state_bo, GL_FALSE);
- cc = brw->cc.state_bo->virtual;
- cc_off = brw->cc.state_bo->offset;
+ drm_intel_bo_map(bo, GL_FALSE);
+ cc = bo->virtual;
+ cc_off = bo->offset;
state_out(name, cc, cc_off, 0, "alpha test format %s, round disable %d, stencil ref %d,"
"bf stencil ref %d\n",
@@ -300,7 +306,7 @@ static void dump_cc_state(struct brw_context *brw)
state_out(name, cc, cc_off, 4, "constant blue %f\n", cc->constant_b);
state_out(name, cc, cc_off, 5, "constant alpha %f\n", cc->constant_a);
- drm_intel_bo_unmap(brw->cc.state_bo);
+ drm_intel_bo_unmap(bo);
}
@@ -369,26 +375,29 @@ void brw_debug_batch(struct intel_context *intel)
{
struct brw_context *brw = brw_context(&intel->ctx);
- state_struct_out("WM bind", brw->wm.bind_bo, 4 * brw->wm.nr_surfaces);
+ state_struct_out("WM bind",
+ brw->intel.batch.bo,
+ brw->wm.bind_bo_offset,
+ 4 * brw->wm.nr_surfaces);
dump_wm_surface_state(brw);
dump_wm_sampler_state(brw);
if (intel->gen < 6)
- state_struct_out("VS", brw->vs.state_bo, sizeof(struct brw_vs_unit_state));
+ state_struct_out("VS", brw->vs.state_bo, 0, sizeof(struct brw_vs_unit_state));
brw_debug_prog("VS prog", brw->vs.prog_bo);
if (intel->gen < 6)
- state_struct_out("GS", brw->gs.state_bo, sizeof(struct brw_gs_unit_state));
+ state_struct_out("GS", brw->gs.state_bo, 0, sizeof(struct brw_gs_unit_state));
brw_debug_prog("GS prog", brw->gs.prog_bo);
if (intel->gen < 6) {
- state_struct_out("SF", brw->sf.state_bo, sizeof(struct brw_sf_unit_state));
+ state_struct_out("SF", brw->sf.state_bo, 0, sizeof(struct brw_sf_unit_state));
brw_debug_prog("SF prog", brw->sf.prog_bo);
}
dump_sf_viewport_state(brw);
if (intel->gen < 6)
- state_struct_out("WM", brw->wm.state_bo, sizeof(struct brw_wm_unit_state));
+ state_struct_out("WM", brw->wm.state_bo, 0, sizeof(struct brw_wm_unit_state));
brw_debug_prog("WM prog", brw->wm.prog_bo);
if (intel->gen >= 6) {
diff --git a/src/mesa/drivers/dri/i965/brw_state_upload.c b/src/mesa/drivers/dri/i965/brw_state_upload.c
index eba4411ca70..6f521be6599 100644
--- a/src/mesa/drivers/dri/i965/brw_state_upload.c
+++ b/src/mesa/drivers/dri/i965/brw_state_upload.c
@@ -104,7 +104,7 @@ static const struct brw_tracked_state *gen4_atoms[] =
&brw_constant_buffer
};
-const struct brw_tracked_state *gen6_atoms[] =
+static const struct brw_tracked_state *gen6_atoms[] =
{
&brw_check_fallback,
@@ -169,25 +169,49 @@ const struct brw_tracked_state *gen6_atoms[] =
void brw_init_state( struct brw_context *brw )
{
+ const struct brw_tracked_state **atoms;
+ int num_atoms;
+
brw_init_caches(brw);
+
+ if (brw->intel.gen >= 6) {
+ atoms = gen6_atoms;
+ num_atoms = ARRAY_SIZE(gen6_atoms);
+ } else {
+ atoms = gen4_atoms;
+ num_atoms = ARRAY_SIZE(gen4_atoms);
+ }
+
+ while (num_atoms--) {
+ assert((*atoms)->dirty.mesa |
+ (*atoms)->dirty.brw |
+ (*atoms)->dirty.cache);
+
+ if ((*atoms)->prepare)
+ brw->prepare_atoms[brw->num_prepare_atoms++] = **atoms;
+ if ((*atoms)->emit)
+ brw->emit_atoms[brw->num_emit_atoms++] = **atoms;
+ atoms++;
+ }
+ assert(brw->num_emit_atoms <= ARRAY_SIZE(brw->emit_atoms));
+ assert(brw->num_prepare_atoms <= ARRAY_SIZE(brw->prepare_atoms));
}
void brw_destroy_state( struct brw_context *brw )
{
brw_destroy_caches(brw);
- brw_destroy_batch_cache(brw);
}
/***********************************************************************
*/
-static GLboolean check_state( const struct brw_state_flags *a,
- const struct brw_state_flags *b )
+static GLuint check_state( const struct brw_state_flags *a,
+ const struct brw_state_flags *b )
{
- return ((a->mesa & b->mesa) ||
- (a->brw & b->brw) ||
- (a->cache & b->cache));
+ return ((a->mesa & b->mesa) |
+ (a->brw & b->brw) |
+ (a->cache & b->cache)) != 0;
}
static void accumulate_state( struct brw_state_flags *a,
@@ -233,7 +257,6 @@ static struct dirty_bit_map mesa_bits[] = {
DEFINE_BIT(_NEW_MODELVIEW),
DEFINE_BIT(_NEW_PROJECTION),
DEFINE_BIT(_NEW_TEXTURE_MATRIX),
- DEFINE_BIT(_NEW_ACCUM),
DEFINE_BIT(_NEW_COLOR),
DEFINE_BIT(_NEW_DEPTH),
DEFINE_BIT(_NEW_EVAL),
@@ -279,6 +302,10 @@ static struct dirty_bit_map brw_bits[] = {
DEFINE_BIT(BRW_NEW_VERTICES),
DEFINE_BIT(BRW_NEW_BATCH),
DEFINE_BIT(BRW_NEW_DEPTH_BUFFER),
+ DEFINE_BIT(BRW_NEW_NR_WM_SURFACES),
+ DEFINE_BIT(BRW_NEW_NR_VS_SURFACES),
+ DEFINE_BIT(BRW_NEW_VS_CONSTBUF),
+ DEFINE_BIT(BRW_NEW_WM_CONSTBUF),
{0, 0, 0}
};
@@ -340,24 +367,16 @@ void brw_validate_state( struct brw_context *brw )
struct gl_context *ctx = &brw->intel.ctx;
struct intel_context *intel = &brw->intel;
struct brw_state_flags *state = &brw->state.dirty;
+ const struct brw_tracked_state *atoms = brw->prepare_atoms;
+ int num_atoms = brw->num_prepare_atoms;
GLuint i;
- const struct brw_tracked_state **atoms;
- int num_atoms;
brw_clear_validated_bos(brw);
state->mesa |= brw->intel.NewGLState;
brw->intel.NewGLState = 0;
- brw_add_validated_bo(brw, intel->batch->buf);
-
- if (intel->gen >= 6) {
- atoms = gen6_atoms;
- num_atoms = ARRAY_SIZE(gen6_atoms);
- } else {
- atoms = gen4_atoms;
- num_atoms = ARRAY_SIZE(gen4_atoms);
- }
+ brw_add_validated_bo(brw, intel->batch.bo);
if (brw->emit_state_always) {
state->mesa |= ~0;
@@ -375,27 +394,20 @@ void brw_validate_state( struct brw_context *brw )
brw->state.dirty.brw |= BRW_NEW_VERTEX_PROGRAM;
}
- if (state->mesa == 0 &&
- state->cache == 0 &&
- state->brw == 0)
+ if ((state->mesa | state->cache | state->brw) == 0)
return;
- if (brw->state.dirty.brw & BRW_NEW_CONTEXT)
- brw_clear_batch_cache(brw);
-
brw->intel.Fallback = GL_FALSE; /* boolean, not bitfield */
/* do prepare stage for all atoms */
for (i = 0; i < num_atoms; i++) {
- const struct brw_tracked_state *atom = atoms[i];
-
- if (brw->intel.Fallback)
- break;
+ const struct brw_tracked_state *atom = &atoms[i];
if (check_state(state, &atom->dirty)) {
- if (atom->prepare) {
- atom->prepare(brw);
- }
+ atom->prepare(brw);
+
+ if (brw->intel.Fallback)
+ break;
}
}
@@ -418,20 +430,11 @@ void brw_validate_state( struct brw_context *brw )
void brw_upload_state(struct brw_context *brw)
{
- struct intel_context *intel = &brw->intel;
struct brw_state_flags *state = &brw->state.dirty;
+ const struct brw_tracked_state *atoms = brw->emit_atoms;
+ int num_atoms = brw->num_emit_atoms;
int i;
static int dirty_count = 0;
- const struct brw_tracked_state **atoms;
- int num_atoms;
-
- if (intel->gen >= 6) {
- atoms = gen6_atoms;
- num_atoms = ARRAY_SIZE(gen6_atoms);
- } else {
- atoms = gen4_atoms;
- num_atoms = ARRAY_SIZE(gen4_atoms);
- }
brw_clear_validated_bos(brw);
@@ -445,20 +448,14 @@ void brw_upload_state(struct brw_context *brw)
prev = *state;
for (i = 0; i < num_atoms; i++) {
- const struct brw_tracked_state *atom = atoms[i];
+ const struct brw_tracked_state *atom = &atoms[i];
struct brw_state_flags generated;
- assert(atom->dirty.mesa ||
- atom->dirty.brw ||
- atom->dirty.cache);
-
if (brw->intel.Fallback)
break;
if (check_state(state, &atom->dirty)) {
- if (atom->emit) {
- atom->emit( brw );
- }
+ atom->emit(brw);
}
accumulate_state(&examined, &atom->dirty);
@@ -474,15 +471,13 @@ void brw_upload_state(struct brw_context *brw)
}
else {
for (i = 0; i < num_atoms; i++) {
- const struct brw_tracked_state *atom = atoms[i];
+ const struct brw_tracked_state *atom = &atoms[i];
if (brw->intel.Fallback)
break;
if (check_state(state, &atom->dirty)) {
- if (atom->emit) {
- atom->emit( brw );
- }
+ atom->emit(brw);
}
}
}
diff --git a/src/mesa/drivers/dri/i965/brw_structs.h b/src/mesa/drivers/dri/i965/brw_structs.h
index 8f97bd136fd..6687a89e80a 100644
--- a/src/mesa/drivers/dri/i965/brw_structs.h
+++ b/src/mesa/drivers/dri/i965/brw_structs.h
@@ -1017,7 +1017,14 @@ struct brw_wm_unit_state
GLuint enable_32_pix:1;
GLuint enable_con_32_pix:1;
GLuint enable_con_64_pix:1;
- GLuint pad0:5;
+ GLuint pad0:1;
+
+ /* These next four bits are for Ironlake+ */
+ GLuint fast_span_coverage_enable:1;
+ GLuint depth_buffer_clear:1;
+ GLuint depth_buffer_resolve_enable:1;
+ GLuint hierarchical_depth_buffer_resolve_enable:1;
+
GLuint legacy_global_depth_bias:1;
GLuint line_stipple:1;
GLuint depth_offset:1;
@@ -1064,6 +1071,15 @@ struct brw_sampler_default_color {
GLfloat color[4];
};
+struct gen5_sampler_default_color {
+ uint8_t ub[4];
+ float f[4];
+ uint16_t hf[4];
+ uint16_t us[4];
+ int16_t s[4];
+ uint8_t b[4];
+};
+
struct brw_sampler_state
{
@@ -1169,7 +1185,12 @@ struct brw_surface_state
GLuint cube_neg_y:1;
GLuint cube_pos_x:1;
GLuint cube_neg_x:1;
- GLuint pad:4;
+ GLuint pad:2;
+ /* Required on gen6 for surfaces accessed through render cache messages.
+ */
+ GLuint render_cache_read_write:1;
+ /* Ironlake and newer: instead of replicating one of the texels */
+ GLuint cube_corner_average:1;
GLuint mipmap_layout_mode:1;
GLuint vert_line_stride_ofs:1;
GLuint vert_line_stride:1;
@@ -1651,6 +1672,18 @@ struct brw_instruction
struct {
GLuint binding_table_index:8;
+ GLuint msg_control:3;
+ GLuint msg_type:3;
+ GLuint target_cache:2;
+ GLuint response_length:4;
+ GLuint msg_length:4;
+ GLuint msg_target:4;
+ GLuint pad1:3;
+ GLuint end_of_thread:1;
+ } dp_read_g4x;
+
+ struct {
+ GLuint binding_table_index:8;
GLuint msg_control:3;
GLuint msg_type:3;
GLuint target_cache:2;
diff --git a/src/mesa/drivers/dri/i965/brw_urb.c b/src/mesa/drivers/dri/i965/brw_urb.c
index dfc1551aca6..b0419d8a420 100644
--- a/src/mesa/drivers/dri/i965/brw_urb.c
+++ b/src/mesa/drivers/dri/i965/brw_urb.c
@@ -248,5 +248,13 @@ void brw_upload_urb_fence(struct brw_context *brw)
uf.bits1.sf_fence = brw->urb.cs_start;
uf.bits1.cs_fence = brw->urb.size;
+ /* erratum: URB_FENCE must not cross a 64byte cacheline */
+ if ((brw->intel.batch.used & 15) > 12) {
+ int pad = 16 - (brw->intel.batch.used & 15);
+ do
+ brw->intel.batch.map[brw->intel.batch.used++] = MI_NOOP;
+ while (--pad);
+ }
+
BRW_BATCH_STRUCT(brw, &uf);
}
diff --git a/src/mesa/drivers/dri/i965/brw_util.c b/src/mesa/drivers/dri/i965/brw_util.c
index e878da3850d..d28d9abcb33 100644
--- a/src/mesa/drivers/dri/i965/brw_util.c
+++ b/src/mesa/drivers/dri/i965/brw_util.c
@@ -37,16 +37,6 @@
#include "brw_util.h"
#include "brw_defines.h"
-GLuint brw_count_bits(uint64_t val)
-{
- GLuint i;
- for (i = 0; val ; val >>= 1)
- if (val & 1)
- i++;
- return i;
-}
-
-
GLuint brw_translate_blend_equation( GLenum mode )
{
switch (mode) {
diff --git a/src/mesa/drivers/dri/i965/brw_util.h b/src/mesa/drivers/dri/i965/brw_util.h
index 04f3175d3e1..940a8715502 100644
--- a/src/mesa/drivers/dri/i965/brw_util.h
+++ b/src/mesa/drivers/dri/i965/brw_util.h
@@ -35,7 +35,14 @@
#include "main/mtypes.h"
-extern GLuint brw_count_bits(uint64_t val);
+#ifdef __GNUC__
+#define brw_count_bits(v) __builtin_popcount(v)
+#else
+static inline GLuint brw_count_bits(uint64_t v)
+{
+ return _mesa_popcount(v>>32) + _mesa_popcount(v&0xffffffff);
+}
+#endif
extern GLuint brw_parameter_list_state_flags(struct gl_program_parameter_list *paramList);
extern GLuint brw_translate_blend_factor( GLenum factor );
extern GLuint brw_translate_blend_equation( GLenum mode );
diff --git a/src/mesa/drivers/dri/i965/brw_vs.c b/src/mesa/drivers/dri/i965/brw_vs.c
index 59f270d6753..6ae75d22c14 100644
--- a/src/mesa/drivers/dri/i965/brw_vs.c
+++ b/src/mesa/drivers/dri/i965/brw_vs.c
@@ -130,6 +130,7 @@ static void brw_upload_vs_prog(struct brw_context *brw)
key.nr_userclip = brw_count_bits(ctx->Transform.ClipPlanesEnabled);
key.copy_edgeflag = (ctx->Polygon.FrontMode != GL_FILL ||
ctx->Polygon.BackMode != GL_FILL);
+ key.two_side_color = (ctx->Light.Enabled && ctx->Light.Model.TwoSide);
/* _NEW_POINT */
if (ctx->Point.PointSprite) {
@@ -157,7 +158,7 @@ static void brw_upload_vs_prog(struct brw_context *brw)
*/
const struct brw_tracked_state brw_vs_prog = {
.dirty = {
- .mesa = _NEW_TRANSFORM | _NEW_POLYGON | _NEW_POINT,
+ .mesa = _NEW_TRANSFORM | _NEW_POLYGON | _NEW_POINT | _NEW_LIGHT,
.brw = BRW_NEW_VERTEX_PROGRAM,
.cache = 0
},
diff --git a/src/mesa/drivers/dri/i965/brw_vs.h b/src/mesa/drivers/dri/i965/brw_vs.h
index 9338a6b7dbf..0b88cc1ec76 100644
--- a/src/mesa/drivers/dri/i965/brw_vs.h
+++ b/src/mesa/drivers/dri/i965/brw_vs.h
@@ -44,6 +44,7 @@ struct brw_vs_prog_key {
GLuint nr_userclip:4;
GLuint copy_edgeflag:1;
GLuint point_coord_replace:8;
+ GLuint two_side_color: 1;
};
diff --git a/src/mesa/drivers/dri/i965/brw_vs_emit.c b/src/mesa/drivers/dri/i965/brw_vs_emit.c
index e1a3f333932..6ec62554cc4 100644
--- a/src/mesa/drivers/dri/i965/brw_vs_emit.c
+++ b/src/mesa/drivers/dri/i965/brw_vs_emit.c
@@ -140,11 +140,13 @@ clear_current_const(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;
+ GLuint i, reg = 0, mrf, j;
int attributes_in_vue;
int first_reladdr_output;
int max_constant;
int constant = 0;
+ int vert_result_reoder[VERT_RESULT_MAX];
+ int bfc = 0;
/* Determine whether to use a real constant buffer or use a block
* of GRF registers for constants. The later is faster but only
@@ -254,7 +256,7 @@ static void brw_vs_alloc_regs( struct brw_vs_compile *c )
}
reg += (constant + 1) / 2;
c->prog_data.curb_read_length = reg - 1;
- c->prog_data.nr_params = constant;
+ c->prog_data.nr_params = constant * 4;
/* XXX 0 causes a bug elsewhere... */
if (intel->gen < 6 && c->prog_data.nr_params == 0)
c->prog_data.nr_params = 4;
@@ -291,7 +293,36 @@ static void brw_vs_alloc_regs( struct brw_vs_compile *c )
mrf = 4;
first_reladdr_output = get_first_reladdr_output(&c->vp->program);
- for (i = 0; i < VERT_RESULT_MAX; i++) {
+
+ for (i = 0; i < VERT_RESULT_MAX; i++)
+ vert_result_reoder[i] = i;
+
+ /* adjust attribute order in VUE for BFC0/BFC1 on Gen6+ */
+ if (intel->gen >= 6 && c->key.two_side_color) {
+ if ((c->prog_data.outputs_written & BITFIELD64_BIT(VERT_RESULT_COL1)) &&
+ (c->prog_data.outputs_written & BITFIELD64_BIT(VERT_RESULT_BFC1))) {
+ assert(c->prog_data.outputs_written & BITFIELD64_BIT(VERT_RESULT_COL0));
+ assert(c->prog_data.outputs_written & BITFIELD64_BIT(VERT_RESULT_BFC0));
+ bfc = 2;
+ } else if ((c->prog_data.outputs_written & BITFIELD64_BIT(VERT_RESULT_COL0)) &&
+ (c->prog_data.outputs_written & BITFIELD64_BIT(VERT_RESULT_BFC0)))
+ bfc = 1;
+
+ if (bfc) {
+ for (i = 0; i < bfc; i++) {
+ vert_result_reoder[VERT_RESULT_COL0 + i * 2 + 0] = VERT_RESULT_COL0 + i;
+ vert_result_reoder[VERT_RESULT_COL0 + i * 2 + 1] = VERT_RESULT_BFC0 + i;
+ }
+
+ for (i = VERT_RESULT_COL0 + bfc * 2; i < VERT_RESULT_BFC0 + bfc; i++) {
+ vert_result_reoder[i] = i - bfc;
+ }
+ }
+ }
+
+ for (j = 0; j < VERT_RESULT_MAX; j++) {
+ i = vert_result_reoder[j];
+
if (c->prog_data.outputs_written & BITFIELD64_BIT(i)) {
c->nr_outputs++;
assert(i < Elements(c->regs[PROGRAM_OUTPUT]));
@@ -627,6 +658,22 @@ static void emit_min( struct brw_compile *p,
}
}
+static void emit_arl(struct brw_compile *p,
+ struct brw_reg dst,
+ struct brw_reg src)
+{
+ struct intel_context *intel = &p->brw->intel;
+
+ if (intel->gen >= 6) {
+ struct brw_reg dst_f = retype(dst, BRW_REGISTER_TYPE_F);
+
+ brw_RNDD(p, dst_f, src);
+ brw_MOV(p, dst, dst_f);
+ } else {
+ brw_RNDD(p, dst, src);
+ }
+}
+
static void emit_math1_gen4(struct brw_vs_compile *c,
GLuint function,
struct brw_reg dst,
@@ -1072,8 +1119,6 @@ get_constant(struct brw_vs_compile *c,
assert(argIndex < 3);
- assert(c->func.brw->intel.gen < 6); /* FINISHME */
-
if (c->current_const[argIndex].index != src->Index) {
/* Keep track of the last constant loaded in this slot, for reuse. */
c->current_const[argIndex].index = src->Index;
@@ -1091,7 +1136,7 @@ get_constant(struct brw_vs_compile *c,
}
/* replicate lower four floats into upper half (to get XYZWXYZW) */
- const_reg = stride(const_reg, 0, 4, 0);
+ const_reg = stride(const_reg, 0, 4, 1);
const_reg.subnr = 0;
return const_reg;
@@ -1104,14 +1149,14 @@ get_reladdr_constant(struct brw_vs_compile *c,
{
const struct prog_src_register *src = &inst->SrcReg[argIndex];
struct brw_compile *p = &c->func;
+ struct brw_context *brw = p->brw;
+ struct intel_context *intel = &brw->intel;
struct brw_reg const_reg = c->current_const[argIndex].reg;
- struct brw_reg addrReg = c->regs[PROGRAM_ADDRESS][0];
- struct brw_reg byte_addr_reg = retype(get_tmp(c), BRW_REGISTER_TYPE_D);
+ struct brw_reg addr_reg = c->regs[PROGRAM_ADDRESS][0];
+ uint32_t offset;
assert(argIndex < 3);
- assert(c->func.brw->intel.gen < 6); /* FINISHME */
-
/* Can't reuse a reladdr constant load. */
c->current_const[argIndex].index = -1;
@@ -1120,15 +1165,21 @@ get_reladdr_constant(struct brw_vs_compile *c,
src->Index, argIndex, c->current_const[argIndex].reg.nr);
#endif
- brw_MUL(p, byte_addr_reg, addrReg, brw_imm_ud(16));
+ if (intel->gen >= 6) {
+ offset = src->Index;
+ } else {
+ struct brw_reg byte_addr_reg = retype(get_tmp(c), BRW_REGISTER_TYPE_D);
+ brw_MUL(p, byte_addr_reg, addr_reg, brw_imm_d(16));
+ addr_reg = byte_addr_reg;
+ offset = 16 * src->Index;
+ }
/* fetch the first vec4 */
brw_dp_READ_4_vs_relative(p,
- const_reg, /* writeback dest */
- byte_addr_reg, /* address register */
- 16 * src->Index, /* byte offset */
- SURF_INDEX_VERT_CONST_BUFFER /* binding table index */
- );
+ const_reg,
+ addr_reg,
+ offset,
+ SURF_INDEX_VERT_CONST_BUFFER);
return const_reg;
}
@@ -1375,11 +1426,10 @@ static struct brw_reg get_arg( struct brw_vs_compile *c,
GET_SWZ(src->Swizzle, 1),
GET_SWZ(src->Swizzle, 2),
GET_SWZ(src->Swizzle, 3));
- }
- /* Note this is ok for non-swizzle instructions:
- */
- reg.negate = src->Negate ? 1 : 0;
+ /* Note this is ok for non-swizzle ARB_vp instructions */
+ reg.negate = src->Negate ? 1 : 0;
+ }
return reg;
}
@@ -1511,6 +1561,7 @@ static void emit_vertex_write( struct brw_vs_compile *c)
int eot;
GLuint len_vertex_header = 2;
int next_mrf, i;
+ int msg_len;
if (c->key.copy_edgeflag) {
brw_MOV(p,
@@ -1677,13 +1728,20 @@ static void emit_vertex_write( struct brw_vs_compile *c)
eot = (c->first_overflow_output == 0);
+ msg_len = c->nr_outputs + 2 + len_vertex_header;
+ if (intel->gen >= 6) {
+ /* interleaved urb write message length for gen6 should be multiple of 2 */
+ if ((msg_len % 2) != 0)
+ msg_len++;
+ }
+
brw_urb_WRITE(p,
brw_null_reg(), /* dest */
0, /* starting mrf reg nr */
c->r0, /* src */
0, /* allocate */
1, /* used */
- MIN2(c->nr_outputs + 1 + len_vertex_header, (BRW_MAX_MRF-1)), /* msg len */
+ MIN2(msg_len - 1, (BRW_MAX_MRF - 1)), /* msg len */
0, /* response len */
eot, /* eot */
eot, /* writes complete */
@@ -1892,6 +1950,7 @@ void brw_vs_emit(struct brw_vs_compile *c )
switch (inst->Opcode) {
case OPCODE_ABS:
+ args[0].negate = false;
brw_MOV(p, dst, brw_abs(args[0]));
break;
case OPCODE_ADD:
@@ -1928,7 +1987,7 @@ void brw_vs_emit(struct brw_vs_compile *c )
emit_math1(c, BRW_MATH_FUNCTION_EXP, dst, args[0], BRW_MATH_PRECISION_FULL);
break;
case OPCODE_ARL:
- brw_RNDD(p, dst, args[0]);
+ emit_arl(p, dst, args[0]);
break;
case OPCODE_FLR:
brw_RNDD(p, dst, args[0]);
diff --git a/src/mesa/drivers/dri/i965/brw_vs_state.c b/src/mesa/drivers/dri/i965/brw_vs_state.c
index be923138617..c3a7cc247c5 100644
--- a/src/mesa/drivers/dri/i965/brw_vs_state.c
+++ b/src/mesa/drivers/dri/i965/brw_vs_state.c
@@ -96,7 +96,14 @@ vs_unit_create_from_key(struct brw_context *brw, struct brw_vs_unit_key *key)
* and those dwords will be written to the second URB handle when we
* brw_urb_WRITE() results.
*/
- vs.thread1.single_program_flow = 0;
+ /* Disable single program flow on Ironlake. We cannot reliably get
+ * all applications working without it. See:
+ * https://bugs.freedesktop.org/show_bug.cgi?id=29172
+ *
+ * The most notable and reliably failing application is the Humus
+ * demo "CelShading"
+ */
+ vs.thread1.single_program_flow = (intel->gen == 5);
if (intel->gen == 5)
vs.thread1.binding_table_entry_count = 0; /* hardware requirement */
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 eabac511602..48cf265e51b 100644
--- a/src/mesa/drivers/dri/i965/brw_vs_surface_state.c
+++ b/src/mesa/drivers/dri/i965/brw_vs_surface_state.c
@@ -82,6 +82,15 @@ prepare_vs_constants(struct brw_context *brw)
params->ParameterValues[i],
4 * sizeof(float));
}
+
+ if (0) {
+ for (i = 0; i < params->NumParameters; i++) {
+ float *row = (float *)brw->vs.const_bo->virtual + i * 4;
+ printf("vs const surface %3d: %4.3f %4.3f %4.3f %4.3f\n",
+ i, row[0], row[1], row[2], row[3]);
+ }
+ }
+
drm_intel_gem_bo_unmap_gtt(brw->vs.const_bo);
brw->state.dirty.brw |= BRW_NEW_VS_CONSTBUF;
}
@@ -115,13 +124,11 @@ brw_update_vs_constant_surface( struct gl_context *ctx,
* it.
*/
if (brw->vs.const_bo == NULL) {
- drm_intel_bo_unreference(brw->vs.surf_bo[surf]);
- brw->vs.surf_bo[surf] = NULL;
+ brw->vs.surf_offset[surf] = 0;
return;
}
brw_create_constant_surface(brw, brw->vs.const_bo, params->NumParameters,
- &brw->vs.surf_bo[surf],
&brw->vs.surf_offset[surf]);
}
@@ -157,11 +164,10 @@ static void upload_vs_surfaces(struct brw_context *brw)
/* BRW_NEW_NR_VS_SURFACES */
if (brw->vs.nr_surfaces == 0) {
- if (brw->vs.bind_bo) {
- drm_intel_bo_unreference(brw->vs.bind_bo);
- brw->vs.bind_bo = NULL;
+ if (brw->vs.bind_bo_offset) {
brw->state.dirty.brw |= BRW_NEW_BINDING_TABLE;
}
+ brw->vs.bind_bo_offset = 0;
return;
}
@@ -171,15 +177,11 @@ static void upload_vs_surfaces(struct brw_context *brw)
* space for the binding table. (once we have vs samplers)
*/
bind = brw_state_batch(brw, sizeof(uint32_t) * BRW_VS_MAX_SURF,
- 32, &brw->vs.bind_bo, &brw->vs.bind_bo_offset);
+ 32, &brw->vs.bind_bo_offset);
for (i = 0; i < BRW_VS_MAX_SURF; i++) {
/* BRW_NEW_VS_CONSTBUF */
- if (brw->vs.surf_bo[i]) {
- bind[i] = brw->vs.surf_offset[i];
- } else {
- bind[i] = 0;
- }
+ bind[i] = brw->vs.surf_offset[i];
}
brw->state.dirty.brw |= BRW_NEW_BINDING_TABLE;
diff --git a/src/mesa/drivers/dri/i965/brw_vtbl.c b/src/mesa/drivers/dri/i965/brw_vtbl.c
index 3d7a98c9812..152ee141568 100644
--- a/src/mesa/drivers/dri/i965/brw_vtbl.c
+++ b/src/mesa/drivers/dri/i965/brw_vtbl.c
@@ -73,15 +73,11 @@ static void brw_destroy_context( struct intel_context *intel )
free(brw->wm.compile_data);
}
- for (i = 0; i < brw->state.nr_color_regions; i++)
- intel_region_release(&brw->state.color_regions[i]);
- brw->state.nr_color_regions = 0;
intel_region_release(&brw->state.depth_region);
dri_bo_release(&brw->curbe.curbe_bo);
dri_bo_release(&brw->vs.prog_bo);
dri_bo_release(&brw->vs.state_bo);
- dri_bo_release(&brw->vs.bind_bo);
dri_bo_release(&brw->vs.const_bo);
dri_bo_release(&brw->gs.prog_bo);
dri_bo_release(&brw->gs.state_bo);
@@ -93,16 +89,12 @@ static void brw_destroy_context( struct intel_context *intel )
dri_bo_release(&brw->sf.vp_bo);
for (i = 0; i < BRW_MAX_TEX_UNIT; i++)
dri_bo_release(&brw->wm.sdc_bo[i]);
- dri_bo_release(&brw->wm.bind_bo);
- for (i = 0; i < BRW_WM_MAX_SURF; i++)
- dri_bo_release(&brw->wm.surf_bo[i]);
dri_bo_release(&brw->wm.sampler_bo);
dri_bo_release(&brw->wm.prog_bo);
dri_bo_release(&brw->wm.state_bo);
dri_bo_release(&brw->wm.const_bo);
dri_bo_release(&brw->wm.push_const_bo);
dri_bo_release(&brw->cc.prog_bo);
- dri_bo_release(&brw->cc.state_bo);
dri_bo_release(&brw->cc.vp_bo);
dri_bo_release(&brw->cc.blend_state_bo);
dri_bo_release(&brw->cc.depth_stencil_state_bo);
@@ -122,20 +114,14 @@ static void brw_set_draw_region( struct intel_context *intel,
GLuint num_color_regions)
{
struct brw_context *brw = brw_context(&intel->ctx);
- GLuint i;
/* release old color/depth regions */
if (brw->state.depth_region != depth_region)
brw->state.dirty.brw |= BRW_NEW_DEPTH_BUFFER;
- for (i = 0; i < brw->state.nr_color_regions; i++)
- intel_region_release(&brw->state.color_regions[i]);
intel_region_release(&brw->state.depth_region);
/* reference new color/depth regions */
- for (i = 0; i < num_color_regions; i++)
- intel_region_reference(&brw->state.color_regions[i], color_regions[i]);
intel_region_reference(&brw->state.depth_region, depth_region);
- brw->state.nr_color_regions = num_color_regions;
}
@@ -173,14 +159,7 @@ static void brw_new_batch( struct intel_context *intel )
brw->state.dirty.brw |= ~0;
brw->state.dirty.cache |= ~0;
- /* Move to the end of the current upload buffer so that we'll force choosing
- * a new buffer next time.
- */
- if (brw->vb.upload.bo != NULL) {
- drm_intel_bo_unreference(brw->vb.upload.bo);
- brw->vb.upload.bo = NULL;
- brw->vb.upload.offset = 0;
- }
+ brw->vb.nr_current_buffers = 0;
}
static void brw_invalidate_state( struct intel_context *intel, GLuint new_state )
@@ -203,4 +182,5 @@ void brwInitVtbl( struct brw_context *brw )
brw->intel.vtbl.destroy = brw_destroy_context;
brw->intel.vtbl.set_draw_region = brw_set_draw_region;
brw->intel.vtbl.debug_batch = brw_debug_batch;
+ brw->intel.vtbl.render_target_supported = brw_render_target_supported;
}
diff --git a/src/mesa/drivers/dri/i965/brw_wm.c b/src/mesa/drivers/dri/i965/brw_wm.c
index e0aa3fd7f26..ca51d1599a4 100644
--- a/src/mesa/drivers/dri/i965/brw_wm.c
+++ b/src/mesa/drivers/dri/i965/brw_wm.c
@@ -284,6 +284,7 @@ static void brw_wm_populate_key( struct brw_context *brw,
/* Build the index for table lookup
*/
/* _NEW_COLOR */
+ key->alpha_test = ctx->Color.AlphaEnabled;
if (fp->program.UsesKill ||
ctx->Color.AlphaEnabled)
lookup |= IZ_PS_KILL_ALPHATEST_BIT;
@@ -364,8 +365,6 @@ static void brw_wm_populate_key( struct brw_context *brw,
SWIZZLE_NIL
};
- key->tex_swizzles[i] = SWIZZLE_NOOP;
-
/* GL_DEPTH_TEXTURE_MODE is normally handled through
* brw_wm_surface_state, but it applies to shadow compares as
* well and our shadow compares always return the result in
@@ -378,6 +377,11 @@ static void brw_wm_populate_key( struct brw_context *brw,
swizzles[2] = SWIZZLE_ZERO;
} else if (t->DepthMode == GL_LUMINANCE) {
swizzles[3] = SWIZZLE_ONE;
+ } else if (t->DepthMode == GL_RED) {
+ /* See table 3.23 of the GL 3.0 spec. */
+ swizzles[1] = SWIZZLE_ZERO;
+ swizzles[2] = SWIZZLE_ZERO;
+ swizzles[3] = SWIZZLE_ONE;
}
}
@@ -427,7 +431,8 @@ static void brw_wm_populate_key( struct brw_context *brw,
key->render_to_fbo = ctx->DrawBuffer->Name != 0;
}
- key->nr_color_regions = brw->state.nr_color_regions;
+ /* _NEW_BUFFERS */
+ key->nr_color_regions = ctx->DrawBuffer->_NumColorDrawBuffers;
/* CACHE_NEW_VS_PROG */
key->vp_outputs_written = brw->vs.prog_data->outputs_written;
diff --git a/src/mesa/drivers/dri/i965/brw_wm.h b/src/mesa/drivers/dri/i965/brw_wm.h
index e7f3cfbb75f..90771e1f503 100644
--- a/src/mesa/drivers/dri/i965/brw_wm.h
+++ b/src/mesa/drivers/dri/i965/brw_wm.h
@@ -64,6 +64,7 @@ struct brw_wm_prog_key {
GLuint linear_color:1; /**< linear interpolation vs perspective interp */
GLuint nr_color_regions:5;
GLuint render_to_fbo:1;
+ GLuint alpha_test:1;
GLbitfield proj_attrib_mask; /**< one bit per fragment program attribute */
GLuint shadowtex_mask:16;
@@ -474,5 +475,6 @@ struct gl_shader *brw_new_shader(struct gl_context *ctx, GLuint name, GLuint typ
struct gl_shader_program *brw_new_shader_program(struct gl_context *ctx, GLuint name);
bool brw_color_buffer_write_enabled(struct brw_context *brw);
+bool brw_render_target_supported(gl_format format);
#endif
diff --git a/src/mesa/drivers/dri/i965/brw_wm_emit.c b/src/mesa/drivers/dri/i965/brw_wm_emit.c
index a0e86034e1e..2336e27c1ef 100644
--- a/src/mesa/drivers/dri/i965/brw_wm_emit.c
+++ b/src/mesa/drivers/dri/i965/brw_wm_emit.c
@@ -219,43 +219,45 @@ void emit_wpos_xy(struct brw_wm_compile *c,
const struct brw_reg *arg0)
{
struct brw_compile *p = &c->func;
+ struct intel_context *intel = &p->brw->intel;
+ struct brw_reg delta_x = retype(arg0[0], BRW_REGISTER_TYPE_W);
+ struct brw_reg delta_y = retype(arg0[1], BRW_REGISTER_TYPE_W);
if (mask & WRITEMASK_X) {
+ if (intel->gen >= 6) {
+ struct brw_reg delta_x_f = retype(delta_x, BRW_REGISTER_TYPE_F);
+ brw_MOV(p, delta_x_f, delta_x);
+ delta_x = delta_x_f;
+ }
+
if (c->fp->program.PixelCenterInteger) {
/* X' = X */
- brw_MOV(p,
- dst[0],
- retype(arg0[0], BRW_REGISTER_TYPE_W));
+ brw_MOV(p, dst[0], delta_x);
} else {
/* X' = X + 0.5 */
- brw_ADD(p,
- dst[0],
- retype(arg0[0], BRW_REGISTER_TYPE_W),
- brw_imm_f(0.5));
+ brw_ADD(p, dst[0], delta_x, brw_imm_f(0.5));
}
}
if (mask & WRITEMASK_Y) {
+ if (intel->gen >= 6) {
+ struct brw_reg delta_y_f = retype(delta_y, BRW_REGISTER_TYPE_F);
+ brw_MOV(p, delta_y_f, delta_y);
+ delta_y = delta_y_f;
+ }
+
if (c->fp->program.OriginUpperLeft) {
if (c->fp->program.PixelCenterInteger) {
/* Y' = Y */
- brw_MOV(p,
- dst[1],
- retype(arg0[1], BRW_REGISTER_TYPE_W));
+ brw_MOV(p, dst[1], delta_y);
} else {
- /* Y' = Y + 0.5 */
- brw_ADD(p,
- dst[1],
- retype(arg0[1], BRW_REGISTER_TYPE_W),
- brw_imm_f(0.5));
+ brw_ADD(p, dst[1], delta_y, brw_imm_f(0.5));
}
} else {
float center_offset = c->fp->program.PixelCenterInteger ? 0.0 : 0.5;
/* Y' = (height - 1) - Y + center */
- brw_ADD(p,
- dst[1],
- negate(retype(arg0[1], BRW_REGISTER_TYPE_W)),
+ brw_ADD(p, dst[1], negate(delta_y),
brw_imm_f(c->key.drawable_height - 1 + center_offset));
}
}
@@ -971,34 +973,23 @@ void emit_math2(struct brw_wm_compile *c,
struct brw_reg temp_dst = dst[dst_chan];
if (arg0[0].hstride == BRW_HORIZONTAL_STRIDE_0) {
- if (arg1[0].hstride == BRW_HORIZONTAL_STRIDE_0) {
- /* Both scalar arguments. Do scalar calc. */
- src0.hstride = BRW_HORIZONTAL_STRIDE_1;
- src1.hstride = BRW_HORIZONTAL_STRIDE_1;
- temp_dst.hstride = BRW_HORIZONTAL_STRIDE_1;
- temp_dst.width = BRW_WIDTH_1;
-
- if (arg0[0].subnr != 0) {
- brw_MOV(p, temp_dst, src0);
- src0 = temp_dst;
-
- /* Ouch. We've used the temp as a dst, and we still
- * need a temp to store arg1 in, because src and dst
- * offsets have to be equal. Leaving this up to
- * glsl2-965 to handle correctly.
- */
- assert(arg1[0].subnr == 0);
- } else if (arg1[0].subnr != 0) {
- brw_MOV(p, temp_dst, src1);
- src1 = temp_dst;
- }
- } else {
- brw_MOV(p, temp_dst, src0);
- src0 = temp_dst;
- }
- } else if (arg1[0].hstride == BRW_HORIZONTAL_STRIDE_0) {
- brw_MOV(p, temp_dst, src1);
- src1 = temp_dst;
+ brw_MOV(p, temp_dst, src0);
+ src0 = temp_dst;
+ }
+
+ if (arg1[0].hstride == BRW_HORIZONTAL_STRIDE_0) {
+ /* This is a heinous hack to get a temporary register for use
+ * in case both arg0 and arg1 are constants. Why you're
+ * doing exponentiation on constant values in the shader, we
+ * don't know.
+ *
+ * max_wm_grf is almost surely less than the maximum GRF, and
+ * gen6 doesn't care about the number of GRFs used in a
+ * shader like pre-gen6 did.
+ */
+ struct brw_reg temp = brw_vec8_grf(c->max_wm_grf, 0);
+ brw_MOV(p, temp, src1);
+ src1 = temp;
}
brw_set_saturate(p, (mask & SATURATE) ? 1 : 0);
@@ -1016,14 +1007,6 @@ void emit_math2(struct brw_wm_compile *c,
sechalf(src0),
sechalf(src1));
}
-
- /* Splat a scalar result into all the channels. */
- if (arg0[0].hstride == BRW_HORIZONTAL_STRIDE_0 &&
- arg1[0].hstride == BRW_HORIZONTAL_STRIDE_0) {
- temp_dst.hstride = BRW_HORIZONTAL_STRIDE_0;
- temp_dst.vstride = BRW_VERTICAL_STRIDE_0;
- brw_MOV(p, dst[dst_chan], temp_dst);
- }
} else {
GLuint saturate = ((mask & SATURATE) ?
BRW_MATH_SATURATE_SATURATE :
@@ -1350,9 +1333,11 @@ static void fire_fb_write( struct brw_wm_compile *c,
dst = retype(vec8(brw_null_reg()), BRW_REGISTER_TYPE_UW);
/* Pass through control information:
+ *
+ * Gen6 has done m1 mov in emit_fb_write() for current SIMD16 case.
*/
/* mov (8) m1.0<1>:ud r1.0<8;8,1>:ud { Align1 NoMask } */
- if (intel->gen < 6) /* gen6, use headerless for fb write */
+ if (intel->gen < 6)
{
brw_push_insn_state(p);
brw_set_mask_control(p, BRW_MASK_DISABLE); /* ? */
@@ -1373,7 +1358,8 @@ static void fire_fb_write( struct brw_wm_compile *c,
target,
nr,
0,
- eot);
+ eot,
+ GL_TRUE);
}
@@ -1518,7 +1504,8 @@ void emit_fb_write(struct brw_wm_compile *c,
*/
brw_push_insn_state(p);
brw_set_mask_control(p, BRW_MASK_DISABLE);
- brw_MOV(p, brw_message_reg(0), brw_vec8_grf(0, 0));
+ brw_MOV(p, retype(brw_message_reg(0), BRW_REGISTER_TYPE_UD),
+ retype(brw_vec8_grf(0, 0), BRW_REGISTER_TYPE_UD));
brw_pop_insn_state(p);
if (target != 0) {
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 fea96d35381..30672b4251b 100644
--- a/src/mesa/drivers/dri/i965/brw_wm_sampler_state.c
+++ b/src/mesa/drivers/dri/i965/brw_wm_sampler_state.c
@@ -69,12 +69,43 @@ static GLuint translate_wrap_mode( GLenum wrap )
static drm_intel_bo *upload_default_color( struct brw_context *brw,
const GLfloat *color )
{
- struct brw_sampler_default_color sdc;
+ struct intel_context *intel = &brw->intel;
- COPY_4V(sdc.color, color);
-
- return brw_cache_data(&brw->cache, BRW_SAMPLER_DEFAULT_COLOR,
- &sdc, sizeof(sdc));
+ if (intel->gen >= 5) {
+ struct gen5_sampler_default_color sdc;
+
+ memset(&sdc, 0, sizeof(sdc));
+
+ UNCLAMPED_FLOAT_TO_UBYTE(sdc.ub[0], color[0]);
+ UNCLAMPED_FLOAT_TO_UBYTE(sdc.ub[1], color[1]);
+ UNCLAMPED_FLOAT_TO_UBYTE(sdc.ub[2], color[2]);
+ UNCLAMPED_FLOAT_TO_UBYTE(sdc.ub[3], color[3]);
+
+ UNCLAMPED_FLOAT_TO_USHORT(sdc.us[0], color[0]);
+ UNCLAMPED_FLOAT_TO_USHORT(sdc.us[1], color[1]);
+ UNCLAMPED_FLOAT_TO_USHORT(sdc.us[2], color[2]);
+ UNCLAMPED_FLOAT_TO_USHORT(sdc.us[3], color[3]);
+
+ UNCLAMPED_FLOAT_TO_SHORT(sdc.s[0], color[0]);
+ UNCLAMPED_FLOAT_TO_SHORT(sdc.s[1], color[1]);
+ UNCLAMPED_FLOAT_TO_SHORT(sdc.s[2], color[2]);
+ UNCLAMPED_FLOAT_TO_SHORT(sdc.s[3], color[3]);
+
+ /* XXX: Fill in half floats */
+ /* XXX: Fill in signed bytes */
+
+ COPY_4V(sdc.f, color);
+
+ return brw_cache_data(&brw->cache, BRW_SAMPLER_DEFAULT_COLOR,
+ &sdc, sizeof(sdc));
+ } else {
+ struct brw_sampler_default_color sdc;
+
+ COPY_4V(sdc.color, color);
+
+ return brw_cache_data(&brw->cache, BRW_SAMPLER_DEFAULT_COLOR,
+ &sdc, sizeof(sdc));
+ }
}
@@ -245,9 +276,8 @@ brw_wm_sampler_populate_key(struct brw_context *brw,
struct wm_sampler_entry *entry = &key->sampler[unit];
struct gl_texture_unit *texUnit = &ctx->Texture.Unit[unit];
struct gl_texture_object *texObj = texUnit->_Current;
- struct intel_texture_object *intelObj = intel_texture_object(texObj);
struct gl_texture_image *firstImage =
- texObj->Image[0][intelObj->firstLevel];
+ texObj->Image[0][texObj->BaseLevel];
memset(last_entry_end, 0,
(char*)entry - last_entry_end + sizeof(*entry));
diff --git a/src/mesa/drivers/dri/i965/brw_wm_state.c b/src/mesa/drivers/dri/i965/brw_wm_state.c
index 82835470a3e..5b5afc4626b 100644
--- a/src/mesa/drivers/dri/i965/brw_wm_state.c
+++ b/src/mesa/drivers/dri/i965/brw_wm_state.c
@@ -47,7 +47,6 @@ struct brw_wm_unit_key {
unsigned int dispatch_grf_start_reg;
unsigned int curbe_offset;
- unsigned int urb_size;
unsigned int nr_surfaces, sampler_count;
GLboolean uses_depth, computes_depth, uses_kill, is_glsl;
@@ -87,7 +86,6 @@ wm_unit_populate_key(struct brw_context *brw, struct brw_wm_unit_key *key)
{
struct gl_context *ctx = &brw->intel.ctx;
const struct gl_fragment_program *fp = brw->fragment_program;
- const struct brw_fragment_program *bfp = (struct brw_fragment_program *) fp;
struct intel_context *intel = &brw->intel;
memset(key, 0, sizeof(*key));
@@ -99,9 +97,6 @@ wm_unit_populate_key(struct brw_context *brw, struct brw_wm_unit_key *key)
key->dispatch_grf_start_reg = brw->wm.prog_data->first_curbe_grf;
key->total_scratch = brw->wm.prog_data->total_scratch;
- /* BRW_NEW_URB_FENCE */
- key->urb_size = brw->urb.vsize;
-
/* BRW_NEW_CURBE_OFFSETS */
key->curbe_offset = brw->curbe.wm_start;
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 76fc94df1f6..e1f8f57a9df 100644
--- a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
+++ b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
@@ -42,7 +42,7 @@
#include "brw_context.h"
#include "brw_state.h"
#include "brw_defines.h"
-
+#include "brw_wm.h"
static GLuint translate_tex_target( GLenum target )
{
@@ -68,104 +68,74 @@ static GLuint translate_tex_target( GLenum target )
}
}
+static uint32_t brw_format_for_mesa_format[MESA_FORMAT_COUNT] =
+{
+ [MESA_FORMAT_L8] = BRW_SURFACEFORMAT_L8_UNORM,
+ [MESA_FORMAT_I8] = BRW_SURFACEFORMAT_I8_UNORM,
+ [MESA_FORMAT_A8] = BRW_SURFACEFORMAT_A8_UNORM,
+ [MESA_FORMAT_AL88] = BRW_SURFACEFORMAT_L8A8_UNORM,
+ [MESA_FORMAT_AL1616] = BRW_SURFACEFORMAT_L16A16_UNORM,
+ [MESA_FORMAT_R8] = BRW_SURFACEFORMAT_R8_UNORM,
+ [MESA_FORMAT_R16] = BRW_SURFACEFORMAT_R16_UNORM,
+ [MESA_FORMAT_RG88] = BRW_SURFACEFORMAT_R8G8_UNORM,
+ [MESA_FORMAT_RG1616] = BRW_SURFACEFORMAT_R16G16_UNORM,
+ [MESA_FORMAT_ARGB8888] = BRW_SURFACEFORMAT_B8G8R8A8_UNORM,
+ [MESA_FORMAT_XRGB8888] = BRW_SURFACEFORMAT_B8G8R8X8_UNORM,
+ [MESA_FORMAT_RGB565] = BRW_SURFACEFORMAT_B5G6R5_UNORM,
+ [MESA_FORMAT_ARGB1555] = BRW_SURFACEFORMAT_B5G5R5A1_UNORM,
+ [MESA_FORMAT_ARGB4444] = BRW_SURFACEFORMAT_B4G4R4A4_UNORM,
+ [MESA_FORMAT_YCBCR_REV] = BRW_SURFACEFORMAT_YCRCB_NORMAL,
+ [MESA_FORMAT_YCBCR] = BRW_SURFACEFORMAT_YCRCB_SWAPUVY,
+ [MESA_FORMAT_RGB_FXT1] = BRW_SURFACEFORMAT_FXT1,
+ [MESA_FORMAT_RGBA_FXT1] = BRW_SURFACEFORMAT_FXT1,
+ [MESA_FORMAT_RGB_DXT1] = BRW_SURFACEFORMAT_DXT1_RGB,
+ [MESA_FORMAT_RGBA_DXT1] = BRW_SURFACEFORMAT_BC1_UNORM,
+ [MESA_FORMAT_RGBA_DXT3] = BRW_SURFACEFORMAT_BC2_UNORM,
+ [MESA_FORMAT_RGBA_DXT5] = BRW_SURFACEFORMAT_BC3_UNORM,
+ [MESA_FORMAT_SRGB_DXT1] = BRW_SURFACEFORMAT_DXT1_RGB_SRGB,
+ [MESA_FORMAT_SRGBA_DXT1] = BRW_SURFACEFORMAT_BC1_UNORM_SRGB,
+ [MESA_FORMAT_SRGBA_DXT3] = BRW_SURFACEFORMAT_BC2_UNORM_SRGB,
+ [MESA_FORMAT_SRGBA_DXT5] = BRW_SURFACEFORMAT_BC3_UNORM_SRGB,
+ [MESA_FORMAT_SARGB8] = BRW_SURFACEFORMAT_B8G8R8A8_UNORM_SRGB,
+ [MESA_FORMAT_SLA8] = BRW_SURFACEFORMAT_L8A8_UNORM_SRGB,
+ [MESA_FORMAT_SL8] = BRW_SURFACEFORMAT_L8_UNORM_SRGB,
+ [MESA_FORMAT_DUDV8] = BRW_SURFACEFORMAT_R8G8_SNORM,
+ [MESA_FORMAT_SIGNED_RGBA8888_REV] = BRW_SURFACEFORMAT_R8G8B8A8_SNORM,
+ [MESA_FORMAT_RGBA8888_REV] = BRW_SURFACEFORMAT_R8G8B8A8_UNORM,
+};
+
+bool
+brw_render_target_supported(gl_format format)
+{
+ if (format == MESA_FORMAT_S8_Z24 ||
+ format == MESA_FORMAT_X8_Z24 ||
+ format == MESA_FORMAT_Z16) {
+ return true;
+ }
+
+ /* Not exactly true, as some of those formats are not renderable.
+ * But at least we know how to translate them.
+ */
+ return brw_format_for_mesa_format[format] != 0;
+}
static GLuint translate_tex_format( gl_format mesa_format,
GLenum internal_format,
- GLenum depth_mode )
+ GLenum depth_mode,
+ GLenum srgb_decode )
{
switch( mesa_format ) {
- case MESA_FORMAT_L8:
- return BRW_SURFACEFORMAT_L8_UNORM;
-
- case MESA_FORMAT_I8:
- return BRW_SURFACEFORMAT_I8_UNORM;
-
- case MESA_FORMAT_A8:
- return BRW_SURFACEFORMAT_A8_UNORM;
-
- case MESA_FORMAT_AL88:
- return BRW_SURFACEFORMAT_L8A8_UNORM;
-
- case MESA_FORMAT_AL1616:
- return BRW_SURFACEFORMAT_L16A16_UNORM;
-
- case MESA_FORMAT_R8:
- return BRW_SURFACEFORMAT_R8_UNORM;
-
- case MESA_FORMAT_R16:
- return BRW_SURFACEFORMAT_R16_UNORM;
-
- case MESA_FORMAT_RG88:
- return BRW_SURFACEFORMAT_R8G8_UNORM;
-
- case MESA_FORMAT_RG1616:
- return BRW_SURFACEFORMAT_R16G16_UNORM;
-
- case MESA_FORMAT_RGB888:
- assert(0); /* not supported for sampling */
- return BRW_SURFACEFORMAT_R8G8B8_UNORM;
-
- case MESA_FORMAT_ARGB8888:
- return BRW_SURFACEFORMAT_B8G8R8A8_UNORM;
-
- case MESA_FORMAT_XRGB8888:
- return BRW_SURFACEFORMAT_B8G8R8X8_UNORM;
-
- case MESA_FORMAT_RGBA8888_REV:
- _mesa_problem(NULL, "unexpected format in i965:translate_tex_format()");
- return BRW_SURFACEFORMAT_R8G8B8A8_UNORM;
-
- case MESA_FORMAT_RGB565:
- return BRW_SURFACEFORMAT_B5G6R5_UNORM;
-
- case MESA_FORMAT_ARGB1555:
- return BRW_SURFACEFORMAT_B5G5R5A1_UNORM;
-
- case MESA_FORMAT_ARGB4444:
- return BRW_SURFACEFORMAT_B4G4R4A4_UNORM;
-
- case MESA_FORMAT_YCBCR_REV:
- return BRW_SURFACEFORMAT_YCRCB_NORMAL;
-
- case MESA_FORMAT_YCBCR:
- return BRW_SURFACEFORMAT_YCRCB_SWAPUVY;
-
- case MESA_FORMAT_RGB_FXT1:
- case MESA_FORMAT_RGBA_FXT1:
- return BRW_SURFACEFORMAT_FXT1;
case MESA_FORMAT_Z16:
if (depth_mode == GL_INTENSITY)
return BRW_SURFACEFORMAT_I16_UNORM;
else if (depth_mode == GL_ALPHA)
return BRW_SURFACEFORMAT_A16_UNORM;
+ else if (depth_mode == GL_RED)
+ return BRW_SURFACEFORMAT_R16_UNORM;
else
return BRW_SURFACEFORMAT_L16_UNORM;
- case MESA_FORMAT_RGB_DXT1:
- return BRW_SURFACEFORMAT_DXT1_RGB;
-
- case MESA_FORMAT_RGBA_DXT1:
- return BRW_SURFACEFORMAT_BC1_UNORM;
-
- case MESA_FORMAT_RGBA_DXT3:
- return BRW_SURFACEFORMAT_BC2_UNORM;
-
- case MESA_FORMAT_RGBA_DXT5:
- return BRW_SURFACEFORMAT_BC3_UNORM;
-
- case MESA_FORMAT_SARGB8:
- return BRW_SURFACEFORMAT_B8G8R8A8_UNORM_SRGB;
-
- case MESA_FORMAT_SLA8:
- return BRW_SURFACEFORMAT_L8A8_UNORM_SRGB;
-
- case MESA_FORMAT_SL8:
- return BRW_SURFACEFORMAT_L8_UNORM_SRGB;
-
- case MESA_FORMAT_SRGB_DXT1:
- return BRW_SURFACEFORMAT_BC1_UNORM_SRGB;
-
case MESA_FORMAT_S8_Z24:
/* XXX: these different surface formats don't seem to
* make any difference for shadow sampler/compares.
@@ -174,18 +144,21 @@ static GLuint translate_tex_format( gl_format mesa_format,
return BRW_SURFACEFORMAT_I24X8_UNORM;
else if (depth_mode == GL_ALPHA)
return BRW_SURFACEFORMAT_A24X8_UNORM;
+ else if (depth_mode == GL_RED)
+ return BRW_SURFACEFORMAT_R24_UNORM_X8_TYPELESS;
else
return BRW_SURFACEFORMAT_L24X8_UNORM;
-
- case MESA_FORMAT_DUDV8:
- return BRW_SURFACEFORMAT_R8G8_SNORM;
-
- case MESA_FORMAT_SIGNED_RGBA8888_REV:
- return BRW_SURFACEFORMAT_R8G8B8A8_SNORM;
-
+
+ case MESA_FORMAT_SARGB8:
+ case MESA_FORMAT_SLA8:
+ case MESA_FORMAT_SL8:
+ if (srgb_decode == GL_DECODE_EXT)
+ return brw_format_for_mesa_format[mesa_format];
+ else if (srgb_decode == GL_SKIP_DECODE_EXT)
+ return brw_format_for_mesa_format[_mesa_get_srgb_format_linear(mesa_format)];
default:
- assert(0);
- return 0;
+ assert(brw_format_for_mesa_format[mesa_format] != 0);
+ return brw_format_for_mesa_format[mesa_format];
}
}
@@ -214,49 +187,45 @@ brw_update_texture_surface( struct gl_context *ctx, GLuint unit )
struct brw_context *brw = brw_context(ctx);
struct gl_texture_object *tObj = ctx->Texture.Unit[unit]._Current;
struct intel_texture_object *intelObj = intel_texture_object(tObj);
- struct gl_texture_image *firstImage = tObj->Image[0][intelObj->firstLevel];
+ struct gl_texture_image *firstImage = tObj->Image[0][tObj->BaseLevel];
const GLuint surf_index = SURF_INDEX_TEXTURE(unit);
- struct brw_surface_state surf;
- void *map;
+ struct brw_surface_state *surf;
- memset(&surf, 0, sizeof(surf));
+ surf = brw_state_batch(brw, sizeof(*surf), 32,
+ &brw->wm.surf_offset[surf_index]);
+ memset(surf, 0, sizeof(*surf));
- surf.ss0.mipmap_layout_mode = BRW_SURFACE_MIPMAPLAYOUT_BELOW;
- surf.ss0.surface_type = translate_tex_target(tObj->Target);
- surf.ss0.surface_format = translate_tex_format(firstImage->TexFormat,
+ surf->ss0.mipmap_layout_mode = BRW_SURFACE_MIPMAPLAYOUT_BELOW;
+ surf->ss0.surface_type = translate_tex_target(tObj->Target);
+ surf->ss0.surface_format = translate_tex_format(firstImage->TexFormat,
firstImage->InternalFormat,
- tObj->DepthMode);
+ tObj->DepthMode, tObj->sRGBDecode);
/* This is ok for all textures with channel width 8bit or less:
*/
-/* surf.ss0.data_return_format = BRW_SURFACERETURNFORMAT_S1; */
- surf.ss1.base_addr = intelObj->mt->region->buffer->offset; /* reloc */
+/* surf->ss0.data_return_format = BRW_SURFACERETURNFORMAT_S1; */
+ surf->ss1.base_addr = intelObj->mt->region->buffer->offset; /* reloc */
- surf.ss2.mip_count = intelObj->lastLevel - intelObj->firstLevel;
- surf.ss2.width = firstImage->Width - 1;
- surf.ss2.height = firstImage->Height - 1;
- brw_set_surface_tiling(&surf, intelObj->mt->region->tiling);
- surf.ss3.pitch = (intelObj->mt->region->pitch * intelObj->mt->cpp) - 1;
- surf.ss3.depth = firstImage->Depth - 1;
+ surf->ss2.mip_count = intelObj->_MaxLevel - tObj->BaseLevel;
+ surf->ss2.width = firstImage->Width - 1;
+ surf->ss2.height = firstImage->Height - 1;
+ brw_set_surface_tiling(surf, intelObj->mt->region->tiling);
+ surf->ss3.pitch = (intelObj->mt->region->pitch * intelObj->mt->cpp) - 1;
+ surf->ss3.depth = firstImage->Depth - 1;
- surf.ss4.min_lod = 0;
+ surf->ss4.min_lod = 0;
if (tObj->Target == GL_TEXTURE_CUBE_MAP) {
- surf.ss0.cube_pos_x = 1;
- surf.ss0.cube_pos_y = 1;
- surf.ss0.cube_pos_z = 1;
- surf.ss0.cube_neg_x = 1;
- surf.ss0.cube_neg_y = 1;
- surf.ss0.cube_neg_z = 1;
+ surf->ss0.cube_pos_x = 1;
+ surf->ss0.cube_pos_y = 1;
+ surf->ss0.cube_pos_z = 1;
+ surf->ss0.cube_neg_x = 1;
+ surf->ss0.cube_neg_y = 1;
+ surf->ss0.cube_neg_z = 1;
}
- map = brw_state_batch(brw, sizeof(surf), 32,
- &brw->wm.surf_bo[surf_index],
- &brw->wm.surf_offset[surf_index]);
- memcpy(map, &surf, sizeof(surf));
-
/* Emit relocation to surface contents */
- drm_intel_bo_emit_reloc(brw->wm.surf_bo[surf_index],
+ drm_intel_bo_emit_reloc(brw->intel.batch.bo,
brw->wm.surf_offset[surf_index] +
offsetof(struct brw_surface_state, ss1),
intelObj->mt->region->buffer, 0,
@@ -271,37 +240,38 @@ void
brw_create_constant_surface(struct brw_context *brw,
drm_intel_bo *bo,
int width,
- drm_intel_bo **out_bo,
uint32_t *out_offset)
{
+ struct intel_context *intel = &brw->intel;
const GLint w = width - 1;
- struct brw_surface_state surf;
- void *map;
+ struct brw_surface_state *surf;
- memset(&surf, 0, sizeof(surf));
+ surf = brw_state_batch(brw, sizeof(*surf), 32, out_offset);
+ memset(surf, 0, sizeof(*surf));
- surf.ss0.mipmap_layout_mode = BRW_SURFACE_MIPMAPLAYOUT_BELOW;
- surf.ss0.surface_type = BRW_SURFACE_BUFFER;
- surf.ss0.surface_format = BRW_SURFACEFORMAT_R32G32B32A32_FLOAT;
+ surf->ss0.mipmap_layout_mode = BRW_SURFACE_MIPMAPLAYOUT_BELOW;
+ surf->ss0.surface_type = BRW_SURFACE_BUFFER;
+ surf->ss0.surface_format = BRW_SURFACEFORMAT_R32G32B32A32_FLOAT;
- assert(bo);
- surf.ss1.base_addr = bo->offset; /* reloc */
+ if (intel->gen >= 6)
+ surf->ss0.render_cache_read_write = 1;
- surf.ss2.width = w & 0x7f; /* bits 6:0 of size or width */
- surf.ss2.height = (w >> 7) & 0x1fff; /* bits 19:7 of size or width */
- surf.ss3.depth = (w >> 20) & 0x7f; /* bits 26:20 of size or width */
- surf.ss3.pitch = (width * 16) - 1; /* ignored?? */
- brw_set_surface_tiling(&surf, I915_TILING_NONE); /* tiling now allowed */
+ assert(bo);
+ surf->ss1.base_addr = bo->offset; /* reloc */
- map = brw_state_batch(brw, sizeof(surf), 32, out_bo, out_offset);
- memcpy(map, &surf, sizeof(surf));
+ surf->ss2.width = w & 0x7f; /* bits 6:0 of size or width */
+ surf->ss2.height = (w >> 7) & 0x1fff; /* bits 19:7 of size or width */
+ surf->ss3.depth = (w >> 20) & 0x7f; /* bits 26:20 of size or width */
+ surf->ss3.pitch = (width * 16) - 1; /* ignored?? */
+ brw_set_surface_tiling(surf, I915_TILING_NONE); /* tiling now allowed */
/* Emit relocation to surface contents. Section 5.1.1 of the gen4
* bspec ("Data Cache") says that the data cache does not exist as
* a separate cache and is just the sampler cache.
*/
- drm_intel_bo_emit_reloc(*out_bo, (*out_offset +
- offsetof(struct brw_surface_state, ss1)),
+ drm_intel_bo_emit_reloc(brw->intel.batch.bo,
+ (*out_offset +
+ offsetof(struct brw_surface_state, ss1)),
bo, 0,
I915_GEM_DOMAIN_SAMPLER, 0);
}
@@ -380,16 +350,14 @@ static void upload_wm_constant_surface(struct brw_context *brw )
* it.
*/
if (brw->wm.const_bo == 0) {
- if (brw->wm.surf_bo[surf] != NULL) {
- drm_intel_bo_unreference(brw->wm.surf_bo[surf]);
- brw->wm.surf_bo[surf] = NULL;
+ if (brw->wm.surf_offset[surf]) {
brw->state.dirty.brw |= BRW_NEW_WM_SURFACES;
+ brw->wm.surf_offset[surf] = 0;
}
return;
}
brw_create_constant_surface(brw, brw->wm.const_bo, params->NumParameters,
- &brw->wm.surf_bo[surf],
&brw->wm.surf_offset[surf]);
brw->state.dirty.brw |= BRW_NEW_WM_SURFACES;
}
@@ -404,6 +372,28 @@ const struct brw_tracked_state brw_wm_constant_surface = {
.emit = upload_wm_constant_surface,
};
+static void
+brw_update_null_renderbuffer_surface(struct brw_context *brw, unsigned int unit)
+{
+ struct intel_context *intel = &brw->intel;
+ struct brw_surface_state *surf;
+
+ surf = brw_state_batch(brw, sizeof(*surf), 32,
+ &brw->wm.surf_offset[unit]);
+ memset(surf, 0, sizeof(*surf));
+
+ surf->ss0.surface_type = BRW_SURFACE_NULL;
+ surf->ss0.surface_format = BRW_SURFACEFORMAT_B8G8R8A8_UNORM;
+
+ if (intel->gen < 6) {
+ /* _NEW_COLOR */
+ surf->ss0.color_blend = 0;
+ surf->ss0.writedisable_red = 1;
+ surf->ss0.writedisable_green = 1;
+ surf->ss0.writedisable_blue = 1;
+ surf->ss0.writedisable_alpha = 1;
+ }
+}
/**
* Sets up a surface state structure to point at the given region.
@@ -417,123 +407,57 @@ brw_update_renderbuffer_surface(struct brw_context *brw,
{
struct intel_context *intel = &brw->intel;
struct gl_context *ctx = &intel->ctx;
- drm_intel_bo *region_bo = NULL;
struct intel_renderbuffer *irb = intel_renderbuffer(rb);
- struct intel_region *region = irb ? irb->region : NULL;
- struct {
- unsigned int surface_type;
- unsigned int surface_format;
- unsigned int width, height, pitch, cpp;
- GLubyte color_mask[4];
- GLboolean color_blend;
- uint32_t tiling;
- uint32_t draw_x;
- uint32_t draw_y;
- } key;
- struct brw_surface_state surf;
- void *map;
-
- memset(&key, 0, sizeof(key));
-
- if (region != NULL) {
- region_bo = region->buffer;
-
- key.surface_type = BRW_SURFACE_2D;
- switch (irb->Base.Format) {
- /* XRGB and ARGB are treated the same here because the chips in this
- * family cannot render to XRGB targets. This means that we have to
- * mask writes to alpha (ala glColorMask) and reconfigure the alpha
- * blending hardware to use GL_ONE (or GL_ZERO) for cases where
- * GL_DST_ALPHA (or GL_ONE_MINUS_DST_ALPHA) is used.
- */
- case MESA_FORMAT_ARGB8888:
- case MESA_FORMAT_XRGB8888:
- key.surface_format = BRW_SURFACEFORMAT_B8G8R8A8_UNORM;
- break;
- case MESA_FORMAT_SARGB8:
- key.surface_format = BRW_SURFACEFORMAT_B8G8R8A8_UNORM_SRGB;
- break;
- case MESA_FORMAT_RGB565:
- key.surface_format = BRW_SURFACEFORMAT_B5G6R5_UNORM;
- break;
- case MESA_FORMAT_ARGB1555:
- key.surface_format = BRW_SURFACEFORMAT_B5G5R5A1_UNORM;
- break;
- case MESA_FORMAT_ARGB4444:
- key.surface_format = BRW_SURFACEFORMAT_B4G4R4A4_UNORM;
- break;
- case MESA_FORMAT_A8:
- key.surface_format = BRW_SURFACEFORMAT_A8_UNORM;
- break;
- case MESA_FORMAT_R8:
- key.surface_format = BRW_SURFACEFORMAT_R8_UNORM;
- break;
- case MESA_FORMAT_R16:
- key.surface_format = BRW_SURFACEFORMAT_R16_UNORM;
- break;
- case MESA_FORMAT_RG88:
- key.surface_format = BRW_SURFACEFORMAT_R8G8_UNORM;
- break;
- case MESA_FORMAT_RG1616:
- key.surface_format = BRW_SURFACEFORMAT_R16G16_UNORM;
- break;
- default:
- _mesa_problem(ctx, "Bad renderbuffer format: %d\n", irb->Base.Format);
- }
- key.tiling = region->tiling;
- key.width = rb->Width;
- key.height = rb->Height;
- key.pitch = region->pitch;
- key.cpp = region->cpp;
- key.draw_x = region->draw_x;
- key.draw_y = region->draw_y;
- } else {
- key.surface_type = BRW_SURFACE_NULL;
- key.surface_format = BRW_SURFACEFORMAT_B8G8R8A8_UNORM;
- key.tiling = I915_TILING_X;
- key.width = 1;
- key.height = 1;
- key.cpp = 4;
- key.draw_x = 0;
- key.draw_y = 0;
- }
+ struct intel_region *region = irb->region;
+ struct brw_surface_state *surf;
- if (intel->gen < 6) {
- /* _NEW_COLOR */
- memcpy(key.color_mask, ctx->Color.ColorMask[unit],
- sizeof(key.color_mask));
+ surf = brw_state_batch(brw, sizeof(*surf), 32,
+ &brw->wm.surf_offset[unit]);
+ memset(surf, 0, sizeof(*surf));
- /* As mentioned above, disable writes to the alpha component when the
- * renderbuffer is XRGB.
+ switch (irb->Base.Format) {
+ case MESA_FORMAT_XRGB8888:
+ /* XRGB is handled as ARGB because the chips in this family
+ * cannot render to XRGB targets. This means that we have to
+ * mask writes to alpha (ala glColorMask) and reconfigure the
+ * alpha blending hardware to use GL_ONE (or GL_ZERO) for
+ * cases where GL_DST_ALPHA (or GL_ONE_MINUS_DST_ALPHA) is
+ * used.
*/
- if (ctx->DrawBuffer->Visual.alphaBits == 0)
- key.color_mask[3] = GL_FALSE;
-
- key.color_blend = (!ctx->Color._LogicOpEnabled &&
- (ctx->Color.BlendEnabled & (1 << unit)));
+ surf->ss0.surface_format = BRW_SURFACEFORMAT_B8G8R8A8_UNORM;
+ break;
+ case MESA_FORMAT_SARGB8:
+ /* without GL_EXT_framebuffer_sRGB we shouldn't bind sRGB
+ surfaces to the blend/update as sRGB */
+ if (ctx->Color.sRGBEnabled)
+ surf->ss0.surface_format = brw_format_for_mesa_format[irb->Base.Format];
+ else
+ surf->ss0.surface_format = BRW_SURFACEFORMAT_B8G8R8A8_UNORM;
+ break;
+ default:
+ surf->ss0.surface_format = brw_format_for_mesa_format[irb->Base.Format];
+ assert(surf->ss0.surface_format != 0);
}
- memset(&surf, 0, sizeof(surf));
-
- surf.ss0.surface_format = key.surface_format;
- surf.ss0.surface_type = key.surface_type;
- if (key.tiling == I915_TILING_NONE) {
- surf.ss1.base_addr = (key.draw_x + key.draw_y * key.pitch) * key.cpp;
+ surf->ss0.surface_type = BRW_SURFACE_2D;
+ if (region->tiling == I915_TILING_NONE) {
+ surf->ss1.base_addr = (region->draw_x +
+ region->draw_y * region->pitch) * region->cpp;
} else {
uint32_t tile_base, tile_x, tile_y;
- uint32_t pitch = key.pitch * key.cpp;
+ uint32_t pitch = region->pitch * region->cpp;
- if (key.tiling == I915_TILING_X) {
- tile_x = key.draw_x % (512 / key.cpp);
- tile_y = key.draw_y % 8;
- tile_base = ((key.draw_y / 8) * (8 * pitch));
- tile_base += (key.draw_x - tile_x) / (512 / key.cpp) * 4096;
+ if (region->tiling == I915_TILING_X) {
+ tile_x = region->draw_x % (512 / region->cpp);
+ tile_y = region->draw_y % 8;
+ tile_base = ((region->draw_y / 8) * (8 * pitch));
+ tile_base += (region->draw_x - tile_x) / (512 / region->cpp) * 4096;
} else {
/* Y */
- tile_x = key.draw_x % (128 / key.cpp);
- tile_y = key.draw_y % 32;
- tile_base = ((key.draw_y / 32) * (32 * pitch));
- tile_base += (key.draw_x - tile_x) / (128 / key.cpp) * 4096;
+ tile_x = region->draw_x % (128 / region->cpp);
+ tile_y = region->draw_y % 32;
+ tile_base = ((region->draw_y / 32) * (32 * pitch));
+ tile_base += (region->draw_x - tile_x) / (128 / region->cpp) * 4096;
}
assert(brw->has_surface_tile_offset || (tile_x == 0 && tile_y == 0));
assert(tile_x % 4 == 0);
@@ -541,41 +465,40 @@ brw_update_renderbuffer_surface(struct brw_context *brw,
/* Note that the low bits of these fields are missing, so
* there's the possibility of getting in trouble.
*/
- surf.ss1.base_addr = tile_base;
- surf.ss5.x_offset = tile_x / 4;
- surf.ss5.y_offset = tile_y / 2;
+ surf->ss1.base_addr = tile_base;
+ surf->ss5.x_offset = tile_x / 4;
+ surf->ss5.y_offset = tile_y / 2;
}
- if (region_bo != NULL)
- surf.ss1.base_addr += region_bo->offset; /* reloc */
+ surf->ss1.base_addr += region->buffer->offset; /* reloc */
- surf.ss2.width = key.width - 1;
- surf.ss2.height = key.height - 1;
- brw_set_surface_tiling(&surf, key.tiling);
- surf.ss3.pitch = (key.pitch * key.cpp) - 1;
+ surf->ss2.width = rb->Width - 1;
+ surf->ss2.height = rb->Height - 1;
+ brw_set_surface_tiling(surf, region->tiling);
+ surf->ss3.pitch = (region->pitch * region->cpp) - 1;
if (intel->gen < 6) {
/* _NEW_COLOR */
- surf.ss0.color_blend = key.color_blend;
- surf.ss0.writedisable_red = !key.color_mask[0];
- surf.ss0.writedisable_green = !key.color_mask[1];
- surf.ss0.writedisable_blue = !key.color_mask[2];
- surf.ss0.writedisable_alpha = !key.color_mask[3];
+ surf->ss0.color_blend = (!ctx->Color._LogicOpEnabled &&
+ (ctx->Color.BlendEnabled & (1 << unit)));
+ surf->ss0.writedisable_red = !ctx->Color.ColorMask[unit][0];
+ surf->ss0.writedisable_green = !ctx->Color.ColorMask[unit][1];
+ surf->ss0.writedisable_blue = !ctx->Color.ColorMask[unit][2];
+ /* As mentioned above, disable writes to the alpha component when the
+ * renderbuffer is XRGB.
+ */
+ if (ctx->DrawBuffer->Visual.alphaBits == 0)
+ surf->ss0.writedisable_alpha = 1;
+ else
+ surf->ss0.writedisable_alpha = !ctx->Color.ColorMask[unit][3];
}
- map = brw_state_batch(brw, sizeof(surf), 32,
- &brw->wm.surf_bo[unit],
- &brw->wm.surf_offset[unit]);
- memcpy(map, &surf, sizeof(surf));
-
- if (region_bo != NULL) {
- drm_intel_bo_emit_reloc(brw->wm.surf_bo[unit],
- brw->wm.surf_offset[unit] +
- offsetof(struct brw_surface_state, ss1),
- region_bo,
- surf.ss1.base_addr - region_bo->offset,
- I915_GEM_DOMAIN_RENDER,
- I915_GEM_DOMAIN_RENDER);
- }
+ drm_intel_bo_emit_reloc(brw->intel.batch.bo,
+ brw->wm.surf_offset[unit] +
+ offsetof(struct brw_surface_state, ss1),
+ region->buffer,
+ surf->ss1.base_addr - region->buffer->offset,
+ I915_GEM_DOMAIN_RENDER,
+ I915_GEM_DOMAIN_RENDER);
}
static void
@@ -591,6 +514,11 @@ prepare_wm_surfaces(struct brw_context *brw)
struct intel_renderbuffer *irb = intel_renderbuffer(rb);
struct intel_region *region = irb ? irb->region : NULL;
+ if (region == NULL || region->buffer == NULL) {
+ brw->intel.Fallback = GL_TRUE; /* boolean, not bitfield */
+ return;
+ }
+
brw_add_validated_bo(brw, region->buffer);
nr_surfaces = SURF_INDEX_DRAW(i) + 1;
}
@@ -635,12 +563,16 @@ upload_wm_surfaces(struct brw_context *brw)
/* Update surfaces for drawing buffers */
if (ctx->DrawBuffer->_NumColorDrawBuffers >= 1) {
for (i = 0; i < ctx->DrawBuffer->_NumColorDrawBuffers; i++) {
- brw_update_renderbuffer_surface(brw,
- ctx->DrawBuffer->_ColorDrawBuffers[i],
- i);
+ if (intel_renderbuffer(ctx->DrawBuffer->_ColorDrawBuffers[i])) {
+ brw_update_renderbuffer_surface(brw,
+ ctx->DrawBuffer->_ColorDrawBuffers[i],
+ i);
+ } else {
+ brw_update_null_renderbuffer_surface(brw, i);
+ }
}
} else {
- brw_update_renderbuffer_surface(brw, NULL, 0);
+ brw_update_null_renderbuffer_surface(brw, 0);
}
/* Update surfaces for textures */
@@ -652,8 +584,7 @@ upload_wm_surfaces(struct brw_context *brw)
if (texUnit->_ReallyEnabled) {
brw_update_texture_surface(ctx, i);
} else {
- drm_intel_bo_unreference(brw->wm.surf_bo[surf]);
- brw->wm.surf_bo[surf] = NULL;
+ brw->wm.surf_offset[surf] = 0;
}
}
@@ -686,16 +617,11 @@ brw_wm_upload_binding_table(struct brw_context *brw)
* space for the binding table.
*/
bind = brw_state_batch(brw, sizeof(uint32_t) * BRW_WM_MAX_SURF,
- 32, &brw->wm.bind_bo, &brw->wm.bind_bo_offset);
+ 32, &brw->wm.bind_bo_offset);
for (i = 0; i < BRW_WM_MAX_SURF; i++) {
/* BRW_NEW_WM_SURFACES */
bind[i] = brw->wm.surf_offset[i];
- if (brw->wm.surf_bo[i]) {
- bind[i] = brw->wm.surf_offset[i];
- } else {
- bind[i] = 0;
- }
}
brw->state.dirty.brw |= BRW_NEW_BINDING_TABLE;
diff --git a/src/mesa/drivers/dri/i965/gen6_cc.c b/src/mesa/drivers/dri/i965/gen6_cc.c
index c2631a7b4df..d1648a102d4 100644
--- a/src/mesa/drivers/dri/i965/gen6_cc.c
+++ b/src/mesa/drivers/dri/i965/gen6_cc.c
@@ -66,12 +66,12 @@ blend_state_populate_key(struct brw_context *brw,
/* _NEW_COLOR */
key->color_blend = ctx->Color.BlendEnabled;
if (key->color_blend) {
- key->blend_eq_rgb = ctx->Color.BlendEquationRGB;
- key->blend_eq_a = ctx->Color.BlendEquationA;
- key->blend_src_rgb = ctx->Color.BlendSrcRGB;
- key->blend_dst_rgb = ctx->Color.BlendDstRGB;
- key->blend_src_a = ctx->Color.BlendSrcA;
- key->blend_dst_a = ctx->Color.BlendDstA;
+ key->blend_eq_rgb = ctx->Color.Blend[0].EquationRGB;
+ key->blend_eq_a = ctx->Color.Blend[0].EquationA;
+ key->blend_src_rgb = ctx->Color.Blend[0].SrcRGB;
+ key->blend_dst_rgb = ctx->Color.Blend[0].DstRGB;
+ key->blend_src_a = ctx->Color.Blend[0].SrcA;
+ key->blend_dst_a = ctx->Color.Blend[0].DstA;
}
/* _NEW_COLOR */
@@ -254,14 +254,14 @@ prepare_color_calc_state(struct brw_context *brw)
color_calc_state_populate_key(brw, &key);
- drm_intel_bo_unreference(brw->cc.state_bo);
- brw->cc.state_bo = brw_search_cache(&brw->cache, BRW_COLOR_CALC_STATE,
+ drm_intel_bo_unreference(brw->cc.color_calc_state_bo);
+ brw->cc.color_calc_state_bo = brw_search_cache(&brw->cache, BRW_COLOR_CALC_STATE,
&key, sizeof(key),
NULL, 0,
NULL);
- if (brw->cc.state_bo == NULL)
- brw->cc.state_bo = color_calc_state_create_from_key(brw, &key);
+ if (brw->cc.color_calc_state_bo == NULL)
+ brw->cc.color_calc_state_bo = color_calc_state_create_from_key(brw, &key);
}
const struct brw_tracked_state gen6_color_calc_state = {
@@ -278,17 +278,17 @@ static void upload_cc_state_pointers(struct brw_context *brw)
struct intel_context *intel = &brw->intel;
BEGIN_BATCH(4);
- OUT_BATCH(CMD_3D_CC_STATE_POINTERS << 16 | (4 - 2));
+ OUT_BATCH(_3DSTATE_CC_STATE_POINTERS << 16 | (4 - 2));
OUT_RELOC(brw->cc.blend_state_bo, I915_GEM_DOMAIN_INSTRUCTION, 0, 1);
OUT_RELOC(brw->cc.depth_stencil_state_bo, I915_GEM_DOMAIN_INSTRUCTION, 0, 1);
- OUT_RELOC(brw->cc.state_bo, I915_GEM_DOMAIN_INSTRUCTION, 0, 1);
+ OUT_RELOC(brw->cc.color_calc_state_bo, I915_GEM_DOMAIN_INSTRUCTION, 0, 1);
ADVANCE_BATCH();
}
static void prepare_cc_state_pointers(struct brw_context *brw)
{
- brw_add_validated_bo(brw, brw->cc.state_bo);
+ brw_add_validated_bo(brw, brw->cc.color_calc_state_bo);
brw_add_validated_bo(brw, brw->cc.blend_state_bo);
brw_add_validated_bo(brw, brw->cc.depth_stencil_state_bo);
}
diff --git a/src/mesa/drivers/dri/i965/gen6_clip_state.c b/src/mesa/drivers/dri/i965/gen6_clip_state.c
index c7c4eb1f27d..d6c1f1c893d 100644
--- a/src/mesa/drivers/dri/i965/gen6_clip_state.c
+++ b/src/mesa/drivers/dri/i965/gen6_clip_state.c
@@ -43,7 +43,10 @@ upload_clip_state(struct brw_context *brw)
depth_clamp = GEN6_CLIP_Z_TEST;
if (ctx->Light.ProvokingVertex == GL_FIRST_VERTEX_CONVENTION) {
- provoking = 0;
+ provoking =
+ (0 << GEN6_CLIP_TRI_PROVOKE_SHIFT) |
+ (1 << GEN6_CLIP_TRIFAN_PROVOKE_SHIFT) |
+ (0 << GEN6_CLIP_LINE_PROVOKE_SHIFT);
} else {
provoking =
(2 << GEN6_CLIP_TRI_PROVOKE_SHIFT) |
@@ -55,7 +58,7 @@ upload_clip_state(struct brw_context *brw)
userclip = (1 << brw_count_bits(ctx->Transform.ClipPlanesEnabled)) - 1;
BEGIN_BATCH(4);
- OUT_BATCH(CMD_3D_CLIP_STATE << 16 | (4 - 2));
+ OUT_BATCH(_3DSTATE_CLIP << 16 | (4 - 2));
OUT_BATCH(GEN6_CLIP_STATISTICS_ENABLE);
OUT_BATCH(GEN6_CLIP_ENABLE |
GEN6_CLIP_API_OGL |
@@ -65,7 +68,7 @@ upload_clip_state(struct brw_context *brw)
depth_clamp |
provoking);
OUT_BATCH(U_FIXED(0.125, 3) << GEN6_CLIP_MIN_POINT_WIDTH_SHIFT |
- U_FIXED(225.875, 3) << GEN6_CLIP_MAX_POINT_WIDTH_SHIFT |
+ U_FIXED(255.875, 3) << GEN6_CLIP_MAX_POINT_WIDTH_SHIFT |
GEN6_CLIP_FORCE_ZERO_RTAINDEX);
ADVANCE_BATCH();
}
diff --git a/src/mesa/drivers/dri/i965/gen6_gs_state.c b/src/mesa/drivers/dri/i965/gen6_gs_state.c
index 6127b9197a1..7296c7cd1b0 100644
--- a/src/mesa/drivers/dri/i965/gen6_gs_state.c
+++ b/src/mesa/drivers/dri/i965/gen6_gs_state.c
@@ -37,7 +37,7 @@ upload_gs_state(struct brw_context *brw)
/* Disable all the constant buffers. */
BEGIN_BATCH(5);
- OUT_BATCH(CMD_3D_CONSTANT_GS_STATE << 16 | (5 - 2));
+ OUT_BATCH(_3DSTATE_CONSTANT_GS << 16 | (5 - 2));
OUT_BATCH(0);
OUT_BATCH(0);
OUT_BATCH(0);
@@ -46,7 +46,7 @@ upload_gs_state(struct brw_context *brw)
if (brw->gs.prog_bo) {
BEGIN_BATCH(7);
- OUT_BATCH(CMD_3D_GS_STATE << 16 | (7 - 2));
+ OUT_BATCH(_3DSTATE_GS << 16 | (7 - 2));
OUT_RELOC(brw->gs.prog_bo, I915_GEM_DOMAIN_INSTRUCTION, 0, 0);
OUT_BATCH(GEN6_GS_SPF_MODE |
(0 << GEN6_GS_SAMPLER_COUNT_SHIFT) |
@@ -62,7 +62,7 @@ upload_gs_state(struct brw_context *brw)
ADVANCE_BATCH();
} else {
BEGIN_BATCH(7);
- OUT_BATCH(CMD_3D_GS_STATE << 16 | (7 - 2));
+ OUT_BATCH(_3DSTATE_GS << 16 | (7 - 2));
OUT_BATCH(0); /* prog_bo */
OUT_BATCH((0 << GEN6_GS_SAMPLER_COUNT_SHIFT) |
(0 << GEN6_GS_BINDING_TABLE_ENTRY_COUNT_SHIFT));
diff --git a/src/mesa/drivers/dri/i965/gen6_sampler_state.c b/src/mesa/drivers/dri/i965/gen6_sampler_state.c
index fc5d391c3cf..f65c651bdff 100644
--- a/src/mesa/drivers/dri/i965/gen6_sampler_state.c
+++ b/src/mesa/drivers/dri/i965/gen6_sampler_state.c
@@ -36,7 +36,7 @@ upload_sampler_state_pointers(struct brw_context *brw)
struct intel_context *intel = &brw->intel;
BEGIN_BATCH(4);
- OUT_BATCH(CMD_3D_SAMPLER_STATE_POINTERS << 16 |
+ OUT_BATCH(_3DSTATE_SAMPLER_STATE_POINTERS << 16 |
VS_SAMPLER_STATE_CHANGE |
GS_SAMPLER_STATE_CHANGE |
PS_SAMPLER_STATE_CHANGE |
diff --git a/src/mesa/drivers/dri/i965/gen6_scissor_state.c b/src/mesa/drivers/dri/i965/gen6_scissor_state.c
index b57126c7938..12b65826ae9 100644
--- a/src/mesa/drivers/dri/i965/gen6_scissor_state.c
+++ b/src/mesa/drivers/dri/i965/gen6_scissor_state.c
@@ -92,7 +92,7 @@ static void upload_scissor_state_pointers(struct brw_context *brw)
struct intel_context *intel = &brw->intel;
BEGIN_BATCH(2);
- OUT_BATCH(CMD_3D_SCISSOR_STATE_POINTERS << 16 | (2 - 2));
+ OUT_BATCH(_3DSTATE_SCISSOR_STATE_POINTERS << 16 | (2 - 2));
OUT_RELOC(brw->sf.state_bo, I915_GEM_DOMAIN_INSTRUCTION, 0, 0);
ADVANCE_BATCH();
diff --git a/src/mesa/drivers/dri/i965/gen6_sf_state.c b/src/mesa/drivers/dri/i965/gen6_sf_state.c
index 4cd2d695835..50a5ad38c6f 100644
--- a/src/mesa/drivers/dri/i965/gen6_sf_state.c
+++ b/src/mesa/drivers/dri/i965/gen6_sf_state.c
@@ -33,9 +33,10 @@
#include "intel_batchbuffer.h"
static uint32_t
-get_attr_override(struct brw_context *brw, int fs_attr)
+get_attr_override(struct brw_context *brw, int fs_attr, int two_side_color)
{
int attr_index = 0, i, vs_attr;
+ int bfc = 0;
if (fs_attr <= FRAG_ATTRIB_TEX7)
vs_attr = fs_attr;
@@ -53,10 +54,36 @@ get_attr_override(struct brw_context *brw, int fs_attr)
* be FRAG_ATTRIB_*.
*/
for (i = 1; i < vs_attr; i++) {
+ if (i == VERT_RESULT_PSIZ)
+ continue;
if (brw->vs.prog_data->outputs_written & BITFIELD64_BIT(i))
attr_index++;
}
+ assert(attr_index < 32);
+
+ if (two_side_color) {
+ if ((brw->vs.prog_data->outputs_written & BITFIELD64_BIT(VERT_RESULT_COL1)) &&
+ (brw->vs.prog_data->outputs_written & BITFIELD64_BIT(VERT_RESULT_BFC1))) {
+ assert(brw->vs.prog_data->outputs_written & BITFIELD64_BIT(VERT_RESULT_COL0));
+ assert(brw->vs.prog_data->outputs_written & BITFIELD64_BIT(VERT_RESULT_BFC0));
+ bfc = 2;
+ } else if ((brw->vs.prog_data->outputs_written & BITFIELD64_BIT(VERT_RESULT_COL0)) &&
+ (brw->vs.prog_data->outputs_written & BITFIELD64_BIT(VERT_RESULT_BFC0)))
+ bfc = 1;
+ }
+
+ if (bfc && (fs_attr <= FRAG_ATTRIB_TEX7 && fs_attr > FRAG_ATTRIB_WPOS)) {
+ if (fs_attr == FRAG_ATTRIB_COL0)
+ attr_index |= (ATTRIBUTE_SWIZZLE_INPUTATTR_FACING << ATTRIBUTE_SWIZZLE_SHIFT);
+ else if (fs_attr == FRAG_ATTRIB_COL1 && bfc == 2) {
+ attr_index++;
+ attr_index |= (ATTRIBUTE_SWIZZLE_INPUTATTR_FACING << ATTRIBUTE_SWIZZLE_SHIFT);
+ } else {
+ attr_index += bfc;
+ }
+ }
+
return attr_index;
}
@@ -75,6 +102,7 @@ upload_sf_state(struct brw_context *brw)
GLboolean render_to_fbo = brw->intel.ctx.DrawBuffer->Name != 0;
int attr = 0;
int urb_start;
+ int two_side_color = (ctx->Light.Enabled && ctx->Light.Model.TwoSide);
/* _NEW_TRANSFORM */
if (ctx->Transform.ClipPlanesEnabled)
@@ -181,7 +209,7 @@ upload_sf_state(struct brw_context *brw)
ctx->Point._Attenuated))
dw4 |= GEN6_SF_USE_STATE_POINT_WIDTH;
- dw4 |= U_FIXED(CLAMP(ctx->Point.Size, 0.125, 225.875), 3) <<
+ dw4 |= U_FIXED(CLAMP(ctx->Point.Size, 0.125, 255.875), 3) <<
GEN6_SF_POINT_WIDTH_SHIFT;
if (ctx->Point.SpriteOrigin == GL_LOWER_LEFT)
dw1 |= GEN6_SF_POINT_SPRITE_LOWERLEFT;
@@ -211,7 +239,7 @@ upload_sf_state(struct brw_context *brw)
}
BEGIN_BATCH(20);
- OUT_BATCH(CMD_3D_SF_STATE << 16 | (20 - 2));
+ OUT_BATCH(_3DSTATE_SF << 16 | (20 - 2));
OUT_BATCH(dw1);
OUT_BATCH(dw2);
OUT_BATCH(dw3);
@@ -224,7 +252,7 @@ upload_sf_state(struct brw_context *brw)
for (; attr < 64; attr++) {
if (brw->fragment_program->Base.InputsRead & BITFIELD64_BIT(attr)) {
- attr_overrides |= get_attr_override(brw, attr);
+ attr_overrides |= get_attr_override(brw, attr, two_side_color);
attr++;
break;
}
@@ -232,7 +260,7 @@ upload_sf_state(struct brw_context *brw)
for (; attr < 64; attr++) {
if (brw->fragment_program->Base.InputsRead & BITFIELD64_BIT(attr)) {
- attr_overrides |= get_attr_override(brw, attr) << 16;
+ attr_overrides |= get_attr_override(brw, attr, two_side_color) << 16;
attr++;
break;
}
diff --git a/src/mesa/drivers/dri/i965/gen6_urb.c b/src/mesa/drivers/dri/i965/gen6_urb.c
index de97fd3783d..c3819f9b360 100644
--- a/src/mesa/drivers/dri/i965/gen6_urb.c
+++ b/src/mesa/drivers/dri/i965/gen6_urb.c
@@ -34,19 +34,26 @@
static void
prepare_urb( struct brw_context *brw )
{
- brw->urb.nr_vs_entries = 24;
- if (brw->gs.prog_bo)
- brw->urb.nr_gs_entries = 4;
- else
- brw->urb.nr_gs_entries = 0;
+ int urb_size, max_urb_entry;
+ struct intel_context *intel = &brw->intel;
+
+ if (IS_GT1(intel->intelScreen->deviceID)) {
+ urb_size = 32 * 1024;
+ max_urb_entry = 128;
+ } else {
+ urb_size = 64 * 1024;
+ max_urb_entry = 256;
+ }
+
+ brw->urb.nr_vs_entries = max_urb_entry;
+ brw->urb.nr_gs_entries = max_urb_entry;
+
/* CACHE_NEW_VS_PROG */
brw->urb.vs_size = MAX2(brw->vs.prog_data->urb_entry_size, 1);
- /* Check that the number of URB rows (8 floats each) allocated is less
- * than the URB space.
- */
- assert((brw->urb.nr_vs_entries +
- brw->urb.nr_gs_entries) * brw->urb.vs_size * 8 < 64 * 1024);
+ if (2 * brw->urb.vs_size > urb_size)
+ brw->urb.nr_vs_entries = brw->urb.nr_gs_entries =
+ (urb_size ) / (2 * brw->urb.vs_size);
}
static void
@@ -60,7 +67,7 @@ upload_urb(struct brw_context *brw)
assert(!brw->gs.prog_bo || brw->urb.vs_size < 5);
BEGIN_BATCH(3);
- OUT_BATCH(CMD_URB << 16 | (3 - 2));
+ OUT_BATCH(_3DSTATE_URB << 16 | (3 - 2));
OUT_BATCH(((brw->urb.vs_size - 1) << GEN6_URB_VS_SIZE_SHIFT) |
((brw->urb.nr_vs_entries) << GEN6_URB_VS_ENTRIES_SHIFT));
OUT_BATCH(((brw->urb.vs_size - 1) << GEN6_URB_GS_SIZE_SHIFT) |
diff --git a/src/mesa/drivers/dri/i965/gen6_viewport_state.c b/src/mesa/drivers/dri/i965/gen6_viewport_state.c
index d691bbebc83..cd7d209e3ea 100644
--- a/src/mesa/drivers/dri/i965/gen6_viewport_state.c
+++ b/src/mesa/drivers/dri/i965/gen6_viewport_state.c
@@ -117,7 +117,7 @@ static void upload_viewport_state_pointers(struct brw_context *brw)
struct intel_context *intel = &brw->intel;
BEGIN_BATCH(4);
- OUT_BATCH(CMD_VIEWPORT_STATE_POINTERS << 16 | (4 - 2) |
+ OUT_BATCH(_3DSTATE_VIEWPORT_STATE_POINTERS << 16 | (4 - 2) |
GEN6_CC_VIEWPORT_MODIFY |
GEN6_SF_VIEWPORT_MODIFY |
GEN6_CLIP_VIEWPORT_MODIFY);
diff --git a/src/mesa/drivers/dri/i965/gen6_vs_state.c b/src/mesa/drivers/dri/i965/gen6_vs_state.c
index 4ef9e2e6072..ce0b8ea7eaa 100644
--- a/src/mesa/drivers/dri/i965/gen6_vs_state.c
+++ b/src/mesa/drivers/dri/i965/gen6_vs_state.c
@@ -47,7 +47,7 @@ upload_vs_state(struct brw_context *brw)
if (brw->vs.prog_data->nr_params == 0 && !ctx->Transform.ClipPlanesEnabled) {
/* Disable the push constant buffers. */
BEGIN_BATCH(5);
- OUT_BATCH(CMD_3D_CONSTANT_VS_STATE << 16 | (5 - 2));
+ OUT_BATCH(_3DSTATE_CONSTANT_VS << 16 | (5 - 2));
OUT_BATCH(0);
OUT_BATCH(0);
OUT_BATCH(0);
@@ -112,7 +112,7 @@ upload_vs_state(struct brw_context *brw)
assert(param_regs <= 32);
BEGIN_BATCH(5);
- OUT_BATCH(CMD_3D_CONSTANT_VS_STATE << 16 |
+ OUT_BATCH(_3DSTATE_CONSTANT_VS << 16 |
GEN6_CONSTANT_BUFFER_0_ENABLE |
(5 - 2));
OUT_RELOC(constant_bo,
@@ -127,15 +127,17 @@ upload_vs_state(struct brw_context *brw)
}
BEGIN_BATCH(6);
- OUT_BATCH(CMD_3D_VS_STATE << 16 | (6 - 2));
+ OUT_BATCH(_3DSTATE_VS << 16 | (6 - 2));
OUT_RELOC(brw->vs.prog_bo, I915_GEM_DOMAIN_INSTRUCTION, 0, 0);
OUT_BATCH((0 << GEN6_VS_SAMPLER_COUNT_SHIFT) |
+ GEN6_VS_FLOATING_POINT_MODE_ALT |
(brw->vs.nr_surfaces << GEN6_VS_BINDING_TABLE_ENTRY_COUNT_SHIFT));
OUT_BATCH(0); /* scratch space base offset */
OUT_BATCH((1 << GEN6_VS_DISPATCH_START_GRF_SHIFT) |
(brw->vs.prog_data->urb_read_length << GEN6_VS_URB_READ_LENGTH_SHIFT) |
(0 << GEN6_VS_URB_ENTRY_READ_OFFSET_SHIFT));
- OUT_BATCH((0 << GEN6_VS_MAX_THREADS_SHIFT) |
+
+ OUT_BATCH(((60 - 1) << GEN6_VS_MAX_THREADS_SHIFT) | /* max 60 threads for gen6 */
GEN6_VS_STATISTICS_ENABLE |
GEN6_VS_ENABLE);
ADVANCE_BATCH();
diff --git a/src/mesa/drivers/dri/i965/gen6_wm_state.c b/src/mesa/drivers/dri/i965/gen6_wm_state.c
index d80df4e254b..78901ecac57 100644
--- a/src/mesa/drivers/dri/i965/gen6_wm_state.c
+++ b/src/mesa/drivers/dri/i965/gen6_wm_state.c
@@ -107,7 +107,7 @@ upload_wm_state(struct brw_context *brw)
if (brw->wm.prog_data->nr_params == 0) {
/* Disable the push constant buffers. */
BEGIN_BATCH(5);
- OUT_BATCH(CMD_3D_CONSTANT_PS_STATE << 16 | (5 - 2));
+ OUT_BATCH(_3DSTATE_CONSTANT_PS << 16 | (5 - 2));
OUT_BATCH(0);
OUT_BATCH(0);
OUT_BATCH(0);
@@ -115,7 +115,7 @@ upload_wm_state(struct brw_context *brw)
ADVANCE_BATCH();
} else {
BEGIN_BATCH(5);
- OUT_BATCH(CMD_3D_CONSTANT_PS_STATE << 16 |
+ OUT_BATCH(_3DSTATE_CONSTANT_PS << 16 |
GEN6_CONSTANT_BUFFER_0_ENABLE |
(5 - 2));
OUT_RELOC(brw->wm.push_const_bo,
@@ -133,6 +133,9 @@ upload_wm_state(struct brw_context *brw)
dw5 |= GEN6_WM_LINE_AA_WIDTH_1_0;
dw5 |= GEN6_WM_LINE_END_CAP_AA_WIDTH_0_5;
+ /* OpenGL non-ieee floating point mode */
+ dw2 |= GEN6_WM_FLOATING_POINT_MODE_ALT;
+
/* BRW_NEW_NR_WM_SURFACES */
dw2 |= brw->wm.nr_surfaces << GEN6_WM_BINDING_TABLE_ENTRY_COUNT_SHIFT;
@@ -178,7 +181,7 @@ upload_wm_state(struct brw_context *brw)
GEN6_WM_NUM_SF_OUTPUTS_SHIFT;
BEGIN_BATCH(9);
- OUT_BATCH(CMD_3D_WM_STATE << 16 | (9 - 2));
+ OUT_BATCH(_3DSTATE_WM << 16 | (9 - 2));
OUT_RELOC(brw->wm.prog_bo, I915_GEM_DOMAIN_INSTRUCTION, 0, 0);
OUT_BATCH(dw2);
OUT_BATCH(0); /* scratch space base offset */
diff --git a/src/mesa/drivers/dri/intel/intel_batchbuffer.c b/src/mesa/drivers/dri/intel/intel_batchbuffer.c
index 21fc9ece886..42b4f923e0c 100644
--- a/src/mesa/drivers/dri/intel/intel_batchbuffer.c
+++ b/src/mesa/drivers/dri/intel/intel_batchbuffer.c
@@ -27,81 +27,89 @@
#include "intel_context.h"
#include "intel_batchbuffer.h"
+#include "intel_buffer_objects.h"
#include "intel_decode.h"
#include "intel_reg.h"
#include "intel_bufmgr.h"
#include "intel_buffers.h"
-void
-intel_batchbuffer_reset(struct intel_batchbuffer *batch)
+struct cached_batch_item {
+ struct cached_batch_item *next;
+ uint16_t header;
+ uint16_t size;
+};
+
+static void clear_cache( struct intel_context *intel )
{
- struct intel_context *intel = batch->intel;
+ struct cached_batch_item *item = intel->batch.cached_items;
- if (batch->buf != NULL) {
- drm_intel_bo_unreference(batch->buf);
- batch->buf = NULL;
+ while (item) {
+ struct cached_batch_item *next = item->next;
+ free(item);
+ item = next;
}
- batch->buf = drm_intel_bo_alloc(intel->bufmgr, "batchbuffer",
- intel->maxBatchSize, 4096);
- drm_intel_gem_bo_map_gtt(batch->buf);
- batch->map = batch->buf->virtual;
-
- batch->size = intel->maxBatchSize;
- batch->ptr = batch->map;
- batch->reserved_space = BATCH_RESERVED;
- batch->dirty_state = ~0;
- batch->state_batch_offset = batch->size;
+ intel->batch.cached_items = NULL;
}
-struct intel_batchbuffer *
-intel_batchbuffer_alloc(struct intel_context *intel)
+void
+intel_batchbuffer_reset(struct intel_context *intel)
{
- struct intel_batchbuffer *batch = calloc(sizeof(*batch), 1);
+ if (intel->batch.bo != NULL) {
+ drm_intel_bo_unreference(intel->batch.bo);
+ intel->batch.bo = NULL;
+ }
+ clear_cache(intel);
- batch->intel = intel;
- intel_batchbuffer_reset(batch);
+ intel->batch.bo = drm_intel_bo_alloc(intel->bufmgr, "batchbuffer",
+ intel->maxBatchSize, 4096);
- return batch;
+ intel->batch.reserved_space = BATCH_RESERVED;
+ intel->batch.state_batch_offset = intel->batch.bo->size;
+ intel->batch.used = 0;
}
void
-intel_batchbuffer_free(struct intel_batchbuffer *batch)
+intel_batchbuffer_free(struct intel_context *intel)
{
- if (batch->map) {
- drm_intel_gem_bo_unmap_gtt(batch->buf);
- batch->map = NULL;
- }
- dri_bo_unreference(batch->buf);
- batch->buf = NULL;
- free(batch);
+ drm_intel_bo_unreference(intel->batch.bo);
+ clear_cache(intel);
}
-
/* TODO: Push this whole function into bufmgr.
*/
static void
-do_flush_locked(struct intel_batchbuffer *batch, GLuint used)
+do_flush_locked(struct intel_context *intel)
{
- struct intel_context *intel = batch->intel;
+ struct intel_batchbuffer *batch = &intel->batch;
int ret = 0;
- int x_off = 0, y_off = 0;
-
- drm_intel_gem_bo_unmap_gtt(batch->buf);
-
- batch->ptr = NULL;
if (!intel->intelScreen->no_hw) {
- drm_intel_bo_exec(batch->buf, used, NULL, 0,
- (x_off & 0xffff) | (y_off << 16));
+ int ring;
+
+ if (intel->gen < 6 || !batch->is_blit) {
+ ring = I915_EXEC_RENDER;
+ } else {
+ ring = I915_EXEC_BLT;
+ }
+
+ ret = drm_intel_bo_subdata(batch->bo, 0, 4*batch->used, batch->map);
+ if (ret == 0 && batch->state_batch_offset != batch->bo->size) {
+ ret = drm_intel_bo_subdata(batch->bo,
+ batch->state_batch_offset,
+ batch->bo->size - batch->state_batch_offset,
+ (char *)batch->map + batch->state_batch_offset);
+ }
+
+ if (ret == 0)
+ ret = drm_intel_bo_mrb_exec(batch->bo, 4*batch->used, NULL, 0, 0, ring);
}
if (unlikely(INTEL_DEBUG & DEBUG_BATCH)) {
- drm_intel_bo_map(batch->buf, GL_FALSE);
- intel_decode(batch->buf->virtual, used / 4, batch->buf->offset,
+ intel_decode(batch->map, batch->used,
+ batch->bo->offset,
intel->intelScreen->deviceID, GL_TRUE);
- drm_intel_bo_unmap(batch->buf);
if (intel->vtbl.debug_batch != NULL)
intel->vtbl.debug_batch(intel);
@@ -114,80 +122,54 @@ do_flush_locked(struct intel_batchbuffer *batch, GLuint used)
}
void
-_intel_batchbuffer_flush(struct intel_batchbuffer *batch, const char *file,
- int line)
+_intel_batchbuffer_flush(struct intel_context *intel,
+ const char *file, int line)
{
- struct intel_context *intel = batch->intel;
- GLuint used = batch->ptr - batch->map;
-
- if (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)
+ if (intel->batch.used == 0)
return;
if (unlikely(INTEL_DEBUG & DEBUG_BATCH))
fprintf(stderr, "%s:%d: Batchbuffer flush with %db used\n", file, line,
- used);
+ 4*intel->batch.used);
- batch->reserved_space = 0;
+ intel->batch.reserved_space = 0;
if (intel->always_flush_cache) {
- intel_batchbuffer_emit_mi_flush(batch);
- used = batch->ptr - batch->map;
- }
-
- /* Round batchbuffer usage to 2 DWORDs. */
-
- if ((used & 4) == 0) {
- *(GLuint *) (batch->ptr) = 0; /* noop */
- batch->ptr += 4;
- used = batch->ptr - batch->map;
+ intel_batchbuffer_emit_mi_flush(intel);
}
/* Mark the end of the buffer. */
- *(GLuint *) (batch->ptr) = MI_BATCH_BUFFER_END;
- batch->ptr += 4;
- used = batch->ptr - batch->map;
- assert (used <= batch->buf->size);
-
- /* Workaround for recursive batchbuffer flushing: If the window is
- * moved, we can get into a case where we try to flush during a
- * flush. What happens is that when we try to grab the lock for
- * the first flush, we detect that the window moved which then
- * causes another flush (from the intel_draw_buffer() call in
- * intelUpdatePageFlipping()). To work around this we reset the
- * batchbuffer tail pointer before trying to get the lock. This
- * prevent the nested buffer flush, but a better fix would be to
- * avoid that in the first place. */
- batch->ptr = batch->map;
+ intel_batchbuffer_emit_dword(intel, MI_BATCH_BUFFER_END);
+ if (intel->batch.used & 1) {
+ /* Round batchbuffer usage to 2 DWORDs. */
+ intel_batchbuffer_emit_dword(intel, MI_NOOP);
+ }
if (intel->vtbl.finish_batch)
intel->vtbl.finish_batch(intel);
+ intel_upload_finish(intel);
+
/* Check that we didn't just wrap our batchbuffer at a bad time. */
assert(!intel->no_batch_wrap);
- do_flush_locked(batch, used);
+ do_flush_locked(intel);
if (unlikely(INTEL_DEBUG & DEBUG_SYNC)) {
fprintf(stderr, "waiting for idle\n");
- drm_intel_bo_map(batch->buf, GL_TRUE);
- drm_intel_bo_unmap(batch->buf);
+ drm_intel_bo_wait_rendering(intel->batch.bo);
}
/* Reset the buffer:
*/
- intel_batchbuffer_reset(batch);
+ intel_batchbuffer_reset(intel);
}
/* This is the only way buffers get added to the validate list.
*/
GLboolean
-intel_batchbuffer_emit_reloc(struct intel_batchbuffer *batch,
+intel_batchbuffer_emit_reloc(struct intel_context *intel,
drm_intel_bo *buffer,
uint32_t read_domains, uint32_t write_domain,
uint32_t delta)
@@ -196,58 +178,98 @@ intel_batchbuffer_emit_reloc(struct intel_batchbuffer *batch,
assert(delta < buffer->size);
- if (batch->ptr - batch->map > batch->buf->size)
- printf ("bad relocation ptr %p map %p offset %d size %lu\n",
- batch->ptr, batch->map, batch->ptr - batch->map, batch->buf->size);
- ret = drm_intel_bo_emit_reloc(batch->buf, batch->ptr - batch->map,
+ ret = drm_intel_bo_emit_reloc(intel->batch.bo, 4*intel->batch.used,
buffer, delta,
read_domains, write_domain);
+ assert(ret == 0);
+ (void)ret;
/*
* Using the old buffer offset, write in what the right data would be, in case
* the buffer doesn't move and we can short-circuit the relocation processing
* in the kernel
*/
- intel_batchbuffer_emit_dword (batch, buffer->offset + delta);
+ intel_batchbuffer_emit_dword(intel, buffer->offset + delta);
return GL_TRUE;
}
GLboolean
-intel_batchbuffer_emit_reloc_fenced(struct intel_batchbuffer *batch,
+intel_batchbuffer_emit_reloc_fenced(struct intel_context *intel,
drm_intel_bo *buffer,
- uint32_t read_domains, uint32_t write_domain,
+ uint32_t read_domains,
+ uint32_t write_domain,
uint32_t delta)
{
int ret;
assert(delta < buffer->size);
- if (batch->ptr - batch->map > batch->buf->size)
- printf ("bad relocation ptr %p map %p offset %d size %lu\n",
- batch->ptr, batch->map, batch->ptr - batch->map, batch->buf->size);
- ret = drm_intel_bo_emit_reloc_fence(batch->buf, batch->ptr - batch->map,
+ ret = drm_intel_bo_emit_reloc_fence(intel->batch.bo, 4*intel->batch.used,
buffer, delta,
read_domains, write_domain);
+ assert(ret == 0);
+ (void)ret;
/*
* Using the old buffer offset, write in what the right data would
* be, in case the buffer doesn't move and we can short-circuit the
* relocation processing in the kernel
*/
- intel_batchbuffer_emit_dword (batch, buffer->offset + delta);
+ intel_batchbuffer_emit_dword(intel, buffer->offset + delta);
return GL_TRUE;
}
void
-intel_batchbuffer_data(struct intel_batchbuffer *batch,
- const void *data, GLuint bytes)
+intel_batchbuffer_data(struct intel_context *intel,
+ const void *data, GLuint bytes, bool is_blit)
{
assert((bytes & 3) == 0);
- intel_batchbuffer_require_space(batch, bytes);
- __memcpy(batch->ptr, data, bytes);
- batch->ptr += bytes;
+ intel_batchbuffer_require_space(intel, bytes, is_blit);
+ __memcpy(intel->batch.map + intel->batch.used, data, bytes);
+ intel->batch.used += bytes >> 2;
+}
+
+void
+intel_batchbuffer_cached_advance(struct intel_context *intel)
+{
+ struct cached_batch_item **prev = &intel->batch.cached_items, *item;
+ uint32_t sz = (intel->batch.used - intel->batch.emit) * sizeof(uint32_t);
+ uint32_t *start = intel->batch.map + intel->batch.emit;
+ uint16_t op = *start >> 16;
+
+ while (*prev) {
+ uint32_t *old;
+
+ item = *prev;
+ old = intel->batch.map + item->header;
+ if (op == *old >> 16) {
+ if (item->size == sz && memcmp(old, start, sz) == 0) {
+ if (prev != &intel->batch.cached_items) {
+ *prev = item->next;
+ item->next = intel->batch.cached_items;
+ intel->batch.cached_items = item;
+ }
+ intel->batch.used = intel->batch.emit;
+ return;
+ }
+
+ goto emit;
+ }
+ prev = &item->next;
+ }
+
+ item = malloc(sizeof(struct cached_batch_item));
+ if (item == NULL)
+ return;
+
+ item->next = intel->batch.cached_items;
+ intel->batch.cached_items = item;
+
+emit:
+ item->size = sz;
+ item->header = intel->batch.emit;
}
/* Emit a pipelined flush to either flush render and texture cache for
@@ -257,27 +279,35 @@ intel_batchbuffer_data(struct intel_batchbuffer *batch,
* This is also used for the always_flush_cache driconf debug option.
*/
void
-intel_batchbuffer_emit_mi_flush(struct intel_batchbuffer *batch)
+intel_batchbuffer_emit_mi_flush(struct intel_context *intel)
{
- struct intel_context *intel = batch->intel;
-
if (intel->gen >= 6) {
- BEGIN_BATCH(8);
-
- /* XXX workaround: issue any post sync != 0 before write cache flush = 1 */
- OUT_BATCH(_3DSTATE_PIPE_CONTROL);
- OUT_BATCH(PIPE_CONTROL_WRITE_IMMEDIATE);
- OUT_BATCH(0); /* write address */
- OUT_BATCH(0); /* write data */
-
- OUT_BATCH(_3DSTATE_PIPE_CONTROL);
- OUT_BATCH(PIPE_CONTROL_INSTRUCTION_FLUSH |
- PIPE_CONTROL_WRITE_FLUSH |
- PIPE_CONTROL_DEPTH_CACHE_FLUSH |
- PIPE_CONTROL_NO_WRITE);
- OUT_BATCH(0); /* write address */
- OUT_BATCH(0); /* write data */
- ADVANCE_BATCH();
+ if (intel->batch.is_blit) {
+ BEGIN_BATCH_BLT(4);
+ OUT_BATCH(MI_FLUSH_DW);
+ OUT_BATCH(0);
+ OUT_BATCH(0);
+ OUT_BATCH(0);
+ ADVANCE_BATCH();
+ } else {
+ BEGIN_BATCH(8);
+ /* XXX workaround: issue any post sync != 0 before write
+ * cache flush = 1
+ */
+ OUT_BATCH(_3DSTATE_PIPE_CONTROL);
+ OUT_BATCH(PIPE_CONTROL_WRITE_IMMEDIATE);
+ OUT_BATCH(0); /* write address */
+ OUT_BATCH(0); /* write data */
+
+ OUT_BATCH(_3DSTATE_PIPE_CONTROL);
+ OUT_BATCH(PIPE_CONTROL_INSTRUCTION_FLUSH |
+ PIPE_CONTROL_WRITE_FLUSH |
+ PIPE_CONTROL_DEPTH_CACHE_FLUSH |
+ PIPE_CONTROL_NO_WRITE);
+ OUT_BATCH(0); /* write address */
+ OUT_BATCH(0); /* write data */
+ ADVANCE_BATCH();
+ }
} else if (intel->gen >= 4) {
BEGIN_BATCH(4);
OUT_BATCH(_3DSTATE_PIPE_CONTROL |
diff --git a/src/mesa/drivers/dri/intel/intel_batchbuffer.h b/src/mesa/drivers/dri/intel/intel_batchbuffer.h
index 428c027c2f1..a0a5c9841c6 100644
--- a/src/mesa/drivers/dri/intel/intel_batchbuffer.h
+++ b/src/mesa/drivers/dri/intel/intel_batchbuffer.h
@@ -7,70 +7,37 @@
#include "intel_bufmgr.h"
#include "intel_reg.h"
-#define BATCH_SZ 16384
#define BATCH_RESERVED 16
+void intel_batchbuffer_reset(struct intel_context *intel);
+void intel_batchbuffer_free(struct intel_context *intel);
-struct intel_batchbuffer
-{
- struct intel_context *intel;
-
- drm_intel_bo *buf;
-
- GLubyte *map;
- GLubyte *ptr;
-
- GLuint size;
- uint32_t state_batch_offset;
-
-#ifdef DEBUG
- /** Tracking of BEGIN_BATCH()/OUT_BATCH()/ADVANCE_BATCH() debugging */
- struct {
- GLuint total;
- GLubyte *start_ptr;
- } emit;
-#endif
-
- GLuint dirty_state;
- GLuint reserved_space;
-};
-
-struct intel_batchbuffer *intel_batchbuffer_alloc(struct intel_context
- *intel);
-
-void intel_batchbuffer_free(struct intel_batchbuffer *batch);
-
-
-void _intel_batchbuffer_flush(struct intel_batchbuffer *batch,
+void _intel_batchbuffer_flush(struct intel_context *intel,
const char *file, int line);
-#define intel_batchbuffer_flush(batch) \
- _intel_batchbuffer_flush(batch, __FILE__, __LINE__)
+#define intel_batchbuffer_flush(intel) \
+ _intel_batchbuffer_flush(intel, __FILE__, __LINE__)
-void intel_batchbuffer_reset(struct intel_batchbuffer *batch);
/* Unlike bmBufferData, this currently requires the buffer be mapped.
* Consider it a convenience function wrapping multple
* intel_buffer_dword() calls.
*/
-void intel_batchbuffer_data(struct intel_batchbuffer *batch,
- const void *data, GLuint bytes);
-
-void intel_batchbuffer_release_space(struct intel_batchbuffer *batch,
- GLuint bytes);
+void intel_batchbuffer_data(struct intel_context *intel,
+ const void *data, GLuint bytes, bool is_blit);
-GLboolean intel_batchbuffer_emit_reloc(struct intel_batchbuffer *batch,
+GLboolean intel_batchbuffer_emit_reloc(struct intel_context *intel,
drm_intel_bo *buffer,
uint32_t read_domains,
uint32_t write_domain,
uint32_t offset);
-GLboolean intel_batchbuffer_emit_reloc_fenced(struct intel_batchbuffer *batch,
+GLboolean intel_batchbuffer_emit_reloc_fenced(struct intel_context *intel,
drm_intel_bo *buffer,
uint32_t read_domains,
uint32_t write_domain,
uint32_t offset);
-void intel_batchbuffer_emit_mi_flush(struct intel_batchbuffer *batch);
+void intel_batchbuffer_emit_mi_flush(struct intel_context *intel);
static INLINE uint32_t float_as_int(float f)
{
@@ -89,83 +56,93 @@ static INLINE uint32_t float_as_int(float f)
* work...
*/
static INLINE GLint
-intel_batchbuffer_space(struct intel_batchbuffer *batch)
+intel_batchbuffer_space(struct intel_context *intel)
{
- return (batch->state_batch_offset - batch->reserved_space) -
- (batch->ptr - batch->map);
+ return (intel->batch.state_batch_offset - intel->batch.reserved_space) - intel->batch.used*4;
}
static INLINE void
-intel_batchbuffer_emit_dword(struct intel_batchbuffer *batch, GLuint dword)
+intel_batchbuffer_emit_dword(struct intel_context *intel, GLuint dword)
{
#ifdef DEBUG
- assert(intel_batchbuffer_space(batch) >= 4);
+ assert(intel_batchbuffer_space(intel) >= 4);
#endif
- *(GLuint *) (batch->ptr) = dword;
- batch->ptr += 4;
+ intel->batch.map[intel->batch.used++] = dword;
}
static INLINE void
-intel_batchbuffer_emit_float(struct intel_batchbuffer *batch, float f)
+intel_batchbuffer_emit_float(struct intel_context *intel, float f)
{
- intel_batchbuffer_emit_dword(batch, float_as_int(f));
+ intel_batchbuffer_emit_dword(intel, float_as_int(f));
}
static INLINE void
-intel_batchbuffer_require_space(struct intel_batchbuffer *batch,
- GLuint sz)
+intel_batchbuffer_require_space(struct intel_context *intel,
+ GLuint sz, int is_blit)
{
+
+ if (intel->gen >= 6 &&
+ intel->batch.is_blit != is_blit && intel->batch.used) {
+ intel_batchbuffer_flush(intel);
+ }
+
+ intel->batch.is_blit = is_blit;
+
#ifdef DEBUG
- assert(sz < batch->size - 8);
+ assert(sz < sizeof(intel->batch.map) - BATCH_RESERVED);
#endif
- if (intel_batchbuffer_space(batch) < sz)
- intel_batchbuffer_flush(batch);
+ if (intel_batchbuffer_space(intel) < sz)
+ intel_batchbuffer_flush(intel);
}
static INLINE void
-intel_batchbuffer_begin(struct intel_batchbuffer *batch, int n)
+intel_batchbuffer_begin(struct intel_context *intel, int n, bool is_blit)
{
- intel_batchbuffer_require_space(batch, n * 4);
+ intel_batchbuffer_require_space(intel, n * 4, is_blit);
+
+ intel->batch.emit = intel->batch.used;
#ifdef DEBUG
- assert(batch->map);
- assert(batch->emit.start_ptr == NULL);
- batch->emit.total = n * 4;
- batch->emit.start_ptr = batch->ptr;
+ intel->batch.total = n;
#endif
}
static INLINE void
-intel_batchbuffer_advance(struct intel_batchbuffer *batch)
+intel_batchbuffer_advance(struct intel_context *intel)
{
#ifdef DEBUG
- unsigned int _n = batch->ptr - batch->emit.start_ptr;
- assert(batch->emit.start_ptr != NULL);
- if (_n != batch->emit.total) {
+ struct intel_batchbuffer *batch = &intel->batch;
+ unsigned int _n = batch->used - batch->emit;
+ assert(batch->total != 0);
+ if (_n != batch->total) {
fprintf(stderr, "ADVANCE_BATCH: %d of %d dwords emitted\n",
- _n, batch->emit.total);
+ _n, batch->total);
abort();
}
- batch->emit.start_ptr = NULL;
+ batch->total = 0;
#endif
}
+void intel_batchbuffer_cached_advance(struct intel_context *intel);
+
/* Here are the crusty old macros, to be removed:
*/
#define BATCH_LOCALS
-#define BEGIN_BATCH(n) intel_batchbuffer_begin(intel->batch, n)
-#define OUT_BATCH(d) intel_batchbuffer_emit_dword(intel->batch, d)
-#define OUT_BATCH_F(f) intel_batchbuffer_emit_float(intel->batch,f)
+#define BEGIN_BATCH(n) intel_batchbuffer_begin(intel, n, false)
+#define BEGIN_BATCH_BLT(n) intel_batchbuffer_begin(intel, n, true)
+#define OUT_BATCH(d) intel_batchbuffer_emit_dword(intel, d)
+#define OUT_BATCH_F(f) intel_batchbuffer_emit_float(intel,f)
#define OUT_RELOC(buf, read_domains, write_domain, delta) do { \
- intel_batchbuffer_emit_reloc(intel->batch, buf, \
+ intel_batchbuffer_emit_reloc(intel, buf, \
read_domains, write_domain, delta); \
} while (0)
#define OUT_RELOC_FENCED(buf, read_domains, write_domain, delta) do { \
- intel_batchbuffer_emit_reloc_fenced(intel->batch, buf, \
+ intel_batchbuffer_emit_reloc_fenced(intel, buf, \
read_domains, write_domain, delta); \
} while (0)
-#define ADVANCE_BATCH() intel_batchbuffer_advance(intel->batch);
+#define ADVANCE_BATCH() intel_batchbuffer_advance(intel);
+#define CACHED_BATCH() intel_batchbuffer_cached_advance(intel);
#endif
diff --git a/src/mesa/drivers/dri/intel/intel_blit.c b/src/mesa/drivers/dri/intel/intel_blit.c
index c2917e9b07e..e1ab7f16371 100644
--- a/src/mesa/drivers/dri/intel/intel_blit.c
+++ b/src/mesa/drivers/dri/intel/intel_blit.c
@@ -38,6 +38,7 @@
#include "intel_reg.h"
#include "intel_regions.h"
#include "intel_batchbuffer.h"
+#include "intel_mipmap_tree.h"
#define FILE_DEBUG_FLAG DEBUG_BLIT
@@ -107,10 +108,6 @@ intelEmitCopyBlit(struct intel_context *intel,
drm_intel_bo *aper_array[3];
BATCH_LOCALS;
- /* Blits are in a different ringbuffer so we don't use them. */
- if (intel->gen >= 6)
- return GL_FALSE;
-
if (dst_tiling != I915_TILING_NONE) {
if (dst_offset & 4095)
return GL_FALSE;
@@ -126,12 +123,12 @@ intelEmitCopyBlit(struct intel_context *intel,
/* do space check before going any further */
do {
- aper_array[0] = intel->batch->buf;
+ aper_array[0] = intel->batch.bo;
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);
+ intel_batchbuffer_flush(intel);
pass++;
} else
break;
@@ -140,7 +137,7 @@ intelEmitCopyBlit(struct intel_context *intel,
if (pass >= 2)
return GL_FALSE;
- intel_batchbuffer_require_space(intel->batch, 8 * 4);
+ intel_batchbuffer_require_space(intel, 8 * 4, true);
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,
@@ -181,7 +178,7 @@ intelEmitCopyBlit(struct intel_context *intel,
assert(dst_x < dst_x2);
assert(dst_y < dst_y2);
- BEGIN_BATCH(8);
+ BEGIN_BATCH_BLT(8);
OUT_BATCH(CMD);
OUT_BATCH(BR13 | (uint16_t)dst_pitch);
OUT_BATCH((dst_y << 16) | dst_x);
@@ -196,7 +193,7 @@ intelEmitCopyBlit(struct intel_context *intel,
src_offset);
ADVANCE_BATCH();
- intel_batchbuffer_emit_mi_flush(intel->batch);
+ intel_batchbuffer_emit_mi_flush(intel);
return GL_TRUE;
}
@@ -209,7 +206,7 @@ intelEmitCopyBlit(struct intel_context *intel,
* which we're clearing with triangles.
* \param mask bitmask of BUFFER_BIT_* values indicating buffers to clear
*/
-void
+GLbitfield
intelClearWithBlit(struct gl_context *ctx, GLbitfield mask)
{
struct intel_context *intel = intel_context(ctx);
@@ -217,11 +214,9 @@ intelClearWithBlit(struct gl_context *ctx, GLbitfield mask)
GLuint clear_depth;
GLboolean all;
GLint cx, cy, cw, ch;
+ GLbitfield fail_mask = 0;
BATCH_LOCALS;
- /* Blits are in a different ringbuffer so we don't use them. */
- assert(intel->gen < 6);
-
/*
* Compute values for clearing the buffers.
*/
@@ -242,7 +237,7 @@ intelClearWithBlit(struct gl_context *ctx, GLbitfield mask)
ch = fb->_Ymax - fb->_Ymin;
if (cw == 0 || ch == 0)
- return;
+ return 0;
GLuint buf;
all = (cw == fb->Width && ch == fb->Height);
@@ -338,9 +333,9 @@ intelClearWithBlit(struct gl_context *ctx, GLbitfield mask)
clear[3], clear[3]);
break;
default:
- _mesa_problem(ctx, "Unexpected renderbuffer format: %d\n",
- irb->Base.Format);
- clear_val = 0;
+ fail_mask |= bufBit;
+ mask &= ~bufBit;
+ continue;
}
}
@@ -348,15 +343,15 @@ intelClearWithBlit(struct gl_context *ctx, GLbitfield mask)
assert(y1 < y2);
/* do space check before going any further */
- aper_array[0] = intel->batch->buf;
+ aper_array[0] = intel->batch.bo;
aper_array[1] = write_buffer;
if (drm_intel_bufmgr_check_aperture_space(aper_array,
ARRAY_SIZE(aper_array)) != 0) {
- intel_batchbuffer_flush(intel->batch);
+ intel_batchbuffer_flush(intel);
}
- BEGIN_BATCH(6);
+ BEGIN_BATCH_BLT(6);
OUT_BATCH(CMD);
OUT_BATCH(BR13);
OUT_BATCH((y1 << 16) | x1);
@@ -368,13 +363,15 @@ intelClearWithBlit(struct gl_context *ctx, GLbitfield mask)
ADVANCE_BATCH();
if (intel->always_flush_cache)
- intel_batchbuffer_emit_mi_flush(intel->batch);
+ intel_batchbuffer_emit_mi_flush(intel);
if (buf == BUFFER_DEPTH || buf == BUFFER_STENCIL)
mask &= ~(BUFFER_BIT_DEPTH | BUFFER_BIT_STENCIL);
else
mask &= ~bufBit; /* turn off bit, for faster loop exit */
}
+
+ return fail_mask;
}
GLboolean
@@ -393,10 +390,6 @@ intelEmitImmediateColorExpandBlit(struct intel_context *intel,
int dwords = ALIGN(src_size, 8) / 4;
uint32_t opcode, br13, blit_cmd;
- /* Blits are in a different ringbuffer so we don't use them. */
- if (intel->gen >= 6)
- return GL_FALSE;
-
if (dst_tiling != I915_TILING_NONE) {
if (dst_offset & 4095)
return GL_FALSE;
@@ -417,10 +410,10 @@ intelEmitImmediateColorExpandBlit(struct intel_context *intel,
__FUNCTION__,
dst_buffer, dst_pitch, dst_offset, x, y, w, h, src_size, dwords);
- intel_batchbuffer_require_space( intel->batch,
- (8 * 4) +
- (3 * 4) +
- dwords * 4 );
+ intel_batchbuffer_require_space(intel,
+ (8 * 4) +
+ (3 * 4) +
+ dwords * 4, true);
opcode = XY_SETUP_BLT_CMD;
if (cpp == 4)
@@ -439,7 +432,7 @@ intelEmitImmediateColorExpandBlit(struct intel_context *intel,
if (dst_tiling != I915_TILING_NONE)
blit_cmd |= XY_DST_TILED;
- BEGIN_BATCH(8 + 3);
+ BEGIN_BATCH_BLT(8 + 3);
OUT_BATCH(opcode);
OUT_BATCH(br13);
OUT_BATCH((0 << 16) | 0); /* clip x1, y1 */
@@ -456,11 +449,9 @@ intelEmitImmediateColorExpandBlit(struct intel_context *intel,
OUT_BATCH(((y + h) << 16) | (x + w));
ADVANCE_BATCH();
- intel_batchbuffer_data( intel->batch,
- src_bits,
- dwords * 4 );
+ intel_batchbuffer_data(intel, src_bits, dwords * 4, true);
- intel_batchbuffer_emit_mi_flush(intel->batch);
+ intel_batchbuffer_emit_mi_flush(intel);
return GL_TRUE;
}
@@ -480,9 +471,6 @@ intel_emit_linear_blit(struct intel_context *intel,
GLuint pitch, height;
GLboolean ok;
- /* Blits are in a different ringbuffer so we don't use them. */
- assert(intel->gen < 6);
-
/* The pitch given to the GPU must be DWORD aligned, and
* we want width to match pitch. Max width is (1 << 15 - 1),
* rounding that down to the nearest DWORD is 1 << 15 - 4
@@ -514,3 +502,81 @@ intel_emit_linear_blit(struct intel_context *intel,
assert(ok);
}
}
+
+/**
+ * Used to initialize the alpha value of an ARGB8888 teximage after
+ * loading it from an XRGB8888 source.
+ *
+ * This is very common with glCopyTexImage2D().
+ */
+void
+intel_set_teximage_alpha_to_one(struct gl_context *ctx,
+ struct intel_texture_image *intel_image)
+{
+ struct intel_context *intel = intel_context(ctx);
+ unsigned int image_x, image_y;
+ uint32_t x1, y1, x2, y2;
+ uint32_t BR13, CMD;
+ int pitch, cpp;
+ drm_intel_bo *aper_array[2];
+ struct intel_region *region = intel_image->mt->region;
+ BATCH_LOCALS;
+
+ assert(intel_image->base.TexFormat == MESA_FORMAT_ARGB8888);
+
+ /* get dest x/y in destination texture */
+ intel_miptree_get_image_offset(intel_image->mt,
+ intel_image->level,
+ intel_image->face,
+ 0,
+ &image_x, &image_y);
+
+ x1 = image_x;
+ y1 = image_y;
+ x2 = image_x + intel_image->base.Width;
+ y2 = image_y + intel_image->base.Height;
+
+ pitch = region->pitch;
+ cpp = region->cpp;
+
+ DBG("%s dst:buf(%p)/%d %d,%d sz:%dx%d\n",
+ __FUNCTION__,
+ intel_image->mt->region->buffer, (pitch * cpp),
+ x1, y1, x2 - x1, y2 - y1);
+
+ BR13 = br13_for_cpp(cpp) | 0xf0 << 16;
+ CMD = XY_COLOR_BLT_CMD;
+ CMD |= XY_BLT_WRITE_ALPHA;
+
+ assert(region->tiling != I915_TILING_Y);
+
+#ifndef I915
+ if (region->tiling != I915_TILING_NONE) {
+ CMD |= XY_DST_TILED;
+ pitch /= 4;
+ }
+#endif
+ BR13 |= (pitch * cpp);
+
+ /* do space check before going any further */
+ aper_array[0] = intel->batch.bo;
+ aper_array[1] = region->buffer;
+
+ if (drm_intel_bufmgr_check_aperture_space(aper_array,
+ ARRAY_SIZE(aper_array)) != 0) {
+ intel_batchbuffer_flush(intel);
+ }
+
+ BEGIN_BATCH_BLT(6);
+ OUT_BATCH(CMD);
+ OUT_BATCH(BR13);
+ OUT_BATCH((y1 << 16) | x1);
+ OUT_BATCH((y2 << 16) | x2);
+ OUT_RELOC_FENCED(region->buffer,
+ I915_GEM_DOMAIN_RENDER, I915_GEM_DOMAIN_RENDER,
+ 0);
+ OUT_BATCH(0xffffffff); /* white, but only alpha gets written */
+ ADVANCE_BATCH();
+
+ intel_batchbuffer_emit_mi_flush(intel);
+}
diff --git a/src/mesa/drivers/dri/intel/intel_blit.h b/src/mesa/drivers/dri/intel/intel_blit.h
index 01631465735..88322c7b493 100644
--- a/src/mesa/drivers/dri/intel/intel_blit.h
+++ b/src/mesa/drivers/dri/intel/intel_blit.h
@@ -33,7 +33,7 @@
extern void intelCopyBuffer(const __DRIdrawable * dpriv,
const drm_clip_rect_t * rect);
-extern void intelClearWithBlit(struct gl_context * ctx, GLbitfield mask);
+extern GLbitfield intelClearWithBlit(struct gl_context * ctx, GLbitfield mask);
GLboolean
intelEmitCopyBlit(struct intel_context *intel,
@@ -69,5 +69,7 @@ void intel_emit_linear_blit(struct intel_context *intel,
drm_intel_bo *src_bo,
unsigned int src_offset,
unsigned int size);
+void intel_set_teximage_alpha_to_one(struct gl_context *ctx,
+ struct intel_texture_image *intel_image);
#endif
diff --git a/src/mesa/drivers/dri/intel/intel_buffer_objects.c b/src/mesa/drivers/dri/intel/intel_buffer_objects.c
index 87da60a771e..439d6fc8247 100644
--- a/src/mesa/drivers/dri/intel/intel_buffer_objects.c
+++ b/src/mesa/drivers/dri/intel/intel_buffer_objects.c
@@ -27,6 +27,7 @@
#include "main/imports.h"
+#include "main/mfeatures.h"
#include "main/mtypes.h"
#include "main/macros.h"
#include "main/bufferobj.h"
@@ -52,6 +53,15 @@ intel_bufferobj_alloc_buffer(struct intel_context *intel,
intel_obj->Base.Size, 64);
}
+static void
+release_buffer(struct intel_buffer_object *intel_obj)
+{
+ drm_intel_bo_unreference(intel_obj->buffer);
+ intel_obj->buffer = NULL;
+ intel_obj->offset = 0;
+ intel_obj->source = 0;
+}
+
/**
* There is some duplication between mesa's bufferobjects and our
* bufmgr buffers. Both have an integer handle and a hashtable to
@@ -80,8 +90,7 @@ intel_bufferobj_release_region(struct intel_context *intel,
intel_obj->region->pbo = NULL;
intel_obj->region = NULL;
- drm_intel_bo_unreference(intel_obj->buffer);
- intel_obj->buffer = NULL;
+ release_buffer(intel_obj);
}
/* Break the COW tie to the region. Both the pbo and the region end
@@ -119,10 +128,8 @@ intel_bufferobj_free(struct gl_context * ctx, struct gl_buffer_object *obj)
if (intel_obj->region) {
intel_bufferobj_release_region(intel, intel_obj);
}
- else if (intel_obj->buffer) {
- drm_intel_bo_unreference(intel_obj->buffer);
- }
+ drm_intel_bo_unreference(intel_obj->buffer);
free(intel_obj);
}
@@ -153,19 +160,22 @@ intel_bufferobj_data(struct gl_context * ctx,
if (intel_obj->region)
intel_bufferobj_release_region(intel, intel_obj);
- if (intel_obj->buffer != NULL) {
- drm_intel_bo_unreference(intel_obj->buffer);
- intel_obj->buffer = NULL;
- }
+ if (intel_obj->buffer != NULL)
+ release_buffer(intel_obj);
+
free(intel_obj->sys_buffer);
intel_obj->sys_buffer = NULL;
if (size != 0) {
+ if (usage == GL_DYNAMIC_DRAW
#ifdef I915
- /* On pre-965, stick VBOs in system memory, as we're always doing swtnl
- * with their contents anyway.
- */
- if (target == GL_ARRAY_BUFFER || target == GL_ELEMENT_ARRAY_BUFFER) {
+ /* On pre-965, stick VBOs in system memory, as we're always doing
+ * swtnl with their contents anyway.
+ */
+ || target == GL_ARRAY_BUFFER || target == GL_ELEMENT_ARRAY_BUFFER
+#endif
+ )
+ {
intel_obj->sys_buffer = malloc(size);
if (intel_obj->sys_buffer != NULL) {
if (data != NULL)
@@ -173,7 +183,6 @@ intel_bufferobj_data(struct gl_context * ctx,
return GL_TRUE;
}
}
-#endif
intel_bufferobj_alloc_buffer(intel, intel_obj);
if (!intel_obj->buffer)
return GL_FALSE;
@@ -201,6 +210,7 @@ intel_bufferobj_subdata(struct gl_context * ctx,
{
struct intel_context *intel = intel_context(ctx);
struct intel_buffer_object *intel_obj = intel_buffer_object(obj);
+ bool busy;
if (size == 0)
return;
@@ -210,34 +220,53 @@ intel_bufferobj_subdata(struct gl_context * ctx,
if (intel_obj->region)
intel_bufferobj_cow(intel, intel_obj);
- if (intel_obj->sys_buffer)
- memcpy((char *)intel_obj->sys_buffer + offset, data, size);
- else {
- /* Flush any existing batchbuffer that might reference this data. */
- if (intel->gen < 6) {
- if (drm_intel_bo_busy(intel_obj->buffer) ||
- drm_intel_bo_references(intel->batch->buf, intel_obj->buffer)) {
- drm_intel_bo *temp_bo;
+ /* If we have a single copy in system memory, update that */
+ if (intel_obj->sys_buffer) {
+ if (intel_obj->source)
+ release_buffer(intel_obj);
- temp_bo = drm_intel_bo_alloc(intel->bufmgr, "subdata temp", size, 64);
+ if (intel_obj->buffer == NULL) {
+ memcpy((char *)intel_obj->sys_buffer + offset, data, size);
+ return;
+ }
- drm_intel_bo_subdata(temp_bo, 0, size, data);
+ free(intel_obj->sys_buffer);
+ intel_obj->sys_buffer = NULL;
+ }
- intel_emit_linear_blit(intel,
- intel_obj->buffer, offset,
- temp_bo, 0,
- size);
+ /* Otherwise we need to update the copy in video memory. */
+ busy =
+ drm_intel_bo_busy(intel_obj->buffer) ||
+ drm_intel_bo_references(intel->batch.bo, intel_obj->buffer);
- drm_intel_bo_unreference(temp_bo);
- } else {
- drm_intel_bo_subdata(intel_obj->buffer, offset, size, data);
- }
+ /* replace the current busy bo with fresh data */
+ if (busy && size == intel_obj->Base.Size) {
+ drm_intel_bo_unreference(intel_obj->buffer);
+ intel_bufferobj_alloc_buffer(intel, intel_obj);
+ drm_intel_bo_subdata(intel_obj->buffer, 0, size, data);
+ } else if (intel->gen < 6) {
+ if (busy) {
+ drm_intel_bo *temp_bo;
+
+ temp_bo = drm_intel_bo_alloc(intel->bufmgr, "subdata temp", size, 64);
+
+ drm_intel_bo_subdata(temp_bo, 0, size, data);
+
+ intel_emit_linear_blit(intel,
+ intel_obj->buffer, offset,
+ temp_bo, 0,
+ size);
+
+ drm_intel_bo_unreference(temp_bo);
} else {
- if (drm_intel_bo_references(intel->batch->buf, intel_obj->buffer)) {
- intel_batchbuffer_flush(intel->batch);
- }
drm_intel_bo_subdata(intel_obj->buffer, offset, size, data);
}
+ } else {
+ /* Can't use the blit to modify the buffer in the middle of batch. */
+ if (drm_intel_bo_references(intel->batch.bo, intel_obj->buffer)) {
+ intel_batchbuffer_flush(intel);
+ }
+ drm_intel_bo_subdata(intel_obj->buffer, offset, size, data);
}
}
@@ -279,14 +308,23 @@ intel_bufferobj_map(struct gl_context * ctx,
assert(intel_obj);
if (intel_obj->sys_buffer) {
- obj->Pointer = intel_obj->sys_buffer;
- obj->Length = obj->Size;
- obj->Offset = 0;
- return obj->Pointer;
+ if (!read_only && intel_obj->source) {
+ release_buffer(intel_obj);
+ }
+
+ if (!intel_obj->buffer || intel_obj->source) {
+ obj->Pointer = intel_obj->sys_buffer;
+ obj->Length = obj->Size;
+ obj->Offset = 0;
+ return obj->Pointer;
+ }
+
+ free(intel_obj->sys_buffer);
+ intel_obj->sys_buffer = NULL;
}
/* Flush any existing batchbuffer that might reference this data. */
- if (drm_intel_bo_references(intel->batch->buf, intel_obj->buffer))
+ if (drm_intel_bo_references(intel->batch.bo, intel_obj->buffer))
intel_flush(ctx);
if (intel_obj->region)
@@ -335,6 +373,7 @@ intel_bufferobj_map_range(struct gl_context * ctx,
{
struct intel_context *intel = intel_context(ctx);
struct intel_buffer_object *intel_obj = intel_buffer_object(obj);
+ GLboolean read_only = (access == GL_READ_ONLY_ARB);
assert(intel_obj);
@@ -346,8 +385,16 @@ intel_bufferobj_map_range(struct gl_context * ctx,
obj->AccessFlags = access;
if (intel_obj->sys_buffer) {
- obj->Pointer = intel_obj->sys_buffer + offset;
- return obj->Pointer;
+ if (!read_only && intel_obj->source)
+ release_buffer(intel_obj);
+
+ if (!intel_obj->buffer || intel_obj->source) {
+ obj->Pointer = intel_obj->sys_buffer + offset;
+ return obj->Pointer;
+ }
+
+ free(intel_obj->sys_buffer);
+ intel_obj->sys_buffer = NULL;
}
if (intel_obj->region)
@@ -358,7 +405,7 @@ intel_bufferobj_map_range(struct gl_context * ctx,
* syncing.
*/
if (!(access & GL_MAP_UNSYNCHRONIZED_BIT) &&
- drm_intel_bo_references(intel->batch->buf, intel_obj->buffer))
+ drm_intel_bo_references(intel->batch.bo, intel_obj->buffer))
intel_flush(ctx);
if (intel_obj->buffer == NULL) {
@@ -373,8 +420,7 @@ intel_bufferobj_map_range(struct gl_context * ctx,
(access & GL_MAP_INVALIDATE_BUFFER_BIT) &&
drm_intel_bo_busy(intel_obj->buffer)) {
drm_intel_bo_unreference(intel_obj->buffer);
- intel_obj->buffer = drm_intel_bo_alloc(intel->bufmgr, "bufferobj",
- intel_obj->Base.Size, 64);
+ intel_bufferobj_alloc_buffer(intel, intel_obj);
}
/* If the user is mapping a range of an active buffer object but
@@ -472,7 +518,7 @@ intel_bufferobj_unmap(struct gl_context * ctx,
* flush. Once again, we wish for a domain tracker in libdrm to cover
* usage inside of a batchbuffer.
*/
- intel_batchbuffer_emit_mi_flush(intel->batch);
+ intel_batchbuffer_emit_mi_flush(intel);
free(intel_obj->range_map_buffer);
intel_obj->range_map_buffer = NULL;
} else if (intel_obj->range_map_bo != NULL) {
@@ -492,7 +538,7 @@ intel_bufferobj_unmap(struct gl_context * ctx,
* flush. Once again, we wish for a domain tracker in libdrm to cover
* usage inside of a batchbuffer.
*/
- intel_batchbuffer_emit_mi_flush(intel->batch);
+ intel_batchbuffer_emit_mi_flush(intel);
drm_intel_bo_unreference(intel_obj->range_map_bo);
intel_obj->range_map_bo = NULL;
@@ -512,7 +558,8 @@ intel_bufferobj_unmap(struct gl_context * ctx,
drm_intel_bo *
intel_bufferobj_buffer(struct intel_context *intel,
- struct intel_buffer_object *intel_obj, GLuint flag)
+ struct intel_buffer_object *intel_obj,
+ GLuint flag)
{
if (intel_obj->region) {
if (flag == INTEL_WRITE_PART)
@@ -523,23 +570,169 @@ intel_bufferobj_buffer(struct intel_context *intel,
}
}
- if (intel_obj->buffer == NULL) {
- void *sys_buffer = intel_obj->sys_buffer;
+ if (intel_obj->source)
+ release_buffer(intel_obj);
- /* only one of buffer and sys_buffer could be non-NULL */
+ if (intel_obj->buffer == NULL) {
intel_bufferobj_alloc_buffer(intel, intel_obj);
- intel_obj->sys_buffer = NULL;
+ drm_intel_bo_subdata(intel_obj->buffer,
+ 0, intel_obj->Base.Size,
+ intel_obj->sys_buffer);
- intel_bufferobj_subdata(&intel->ctx,
- GL_ARRAY_BUFFER_ARB,
- 0,
- intel_obj->Base.Size,
- sys_buffer,
- &intel_obj->Base);
- free(sys_buffer);
+ free(intel_obj->sys_buffer);
intel_obj->sys_buffer = NULL;
+ intel_obj->offset = 0;
+ }
+
+ return intel_obj->buffer;
+}
+
+#define INTEL_UPLOAD_SIZE (64*1024)
+
+void
+intel_upload_finish(struct intel_context *intel)
+{
+ if (!intel->upload.bo)
+ return;
+
+ if (intel->upload.buffer_len) {
+ drm_intel_bo_subdata(intel->upload.bo,
+ intel->upload.buffer_offset,
+ intel->upload.buffer_len,
+ intel->upload.buffer);
+ intel->upload.buffer_len = 0;
+ }
+
+ drm_intel_bo_unreference(intel->upload.bo);
+ intel->upload.bo = NULL;
+}
+
+static void wrap_buffers(struct intel_context *intel, GLuint size)
+{
+ intel_upload_finish(intel);
+
+ if (size < INTEL_UPLOAD_SIZE)
+ size = INTEL_UPLOAD_SIZE;
+
+ intel->upload.bo = drm_intel_bo_alloc(intel->bufmgr, "upload", size, 0);
+ intel->upload.offset = 0;
+}
+
+void intel_upload_data(struct intel_context *intel,
+ const void *ptr, GLuint size, GLuint align,
+ drm_intel_bo **return_bo,
+ GLuint *return_offset)
+{
+ GLuint base, delta;
+
+ base = (intel->upload.offset + align - 1) / align * align;
+ if (intel->upload.bo == NULL || base + size > intel->upload.bo->size) {
+ wrap_buffers(intel, size);
+ base = 0;
+ }
+
+ drm_intel_bo_reference(intel->upload.bo);
+ *return_bo = intel->upload.bo;
+ *return_offset = base;
+
+ delta = base - intel->upload.offset;
+ if (intel->upload.buffer_len &&
+ intel->upload.buffer_len + delta + size > sizeof(intel->upload.buffer))
+ {
+ drm_intel_bo_subdata(intel->upload.bo,
+ intel->upload.buffer_offset,
+ intel->upload.buffer_len,
+ intel->upload.buffer);
+ intel->upload.buffer_len = 0;
+ }
+
+ if (size < sizeof(intel->upload.buffer))
+ {
+ if (intel->upload.buffer_len == 0)
+ intel->upload.buffer_offset = base;
+ else
+ intel->upload.buffer_len += delta;
+
+ memcpy(intel->upload.buffer + intel->upload.buffer_len, ptr, size);
+ intel->upload.buffer_len += size;
+ }
+ else
+ {
+ drm_intel_bo_subdata(intel->upload.bo, base, size, ptr);
+ }
+
+ intel->upload.offset = base + size;
+}
+
+void *intel_upload_map(struct intel_context *intel, GLuint size, GLuint align)
+{
+ GLuint base, delta;
+ char *ptr;
+
+ base = (intel->upload.offset + align - 1) / align * align;
+ if (intel->upload.bo == NULL || base + size > intel->upload.bo->size) {
+ wrap_buffers(intel, size);
+ base = 0;
+ }
+
+ delta = base - intel->upload.offset;
+ if (intel->upload.buffer_len &&
+ intel->upload.buffer_len + delta + size > sizeof(intel->upload.buffer))
+ {
+ drm_intel_bo_subdata(intel->upload.bo,
+ intel->upload.buffer_offset,
+ intel->upload.buffer_len,
+ intel->upload.buffer);
+ intel->upload.buffer_len = 0;
+ }
+
+ if (size <= sizeof(intel->upload.buffer)) {
+ if (intel->upload.buffer_len == 0)
+ intel->upload.buffer_offset = base;
+ else
+ intel->upload.buffer_len += delta;
+
+ ptr = intel->upload.buffer + intel->upload.buffer_len;
+ intel->upload.buffer_len += size;
+ } else
+ ptr = malloc(size);
+
+ return ptr;
+}
+
+void intel_upload_unmap(struct intel_context *intel,
+ const void *ptr, GLuint size, GLuint align,
+ drm_intel_bo **return_bo,
+ GLuint *return_offset)
+{
+ GLuint base;
+
+ base = (intel->upload.offset + align - 1) / align * align;
+ if (size > sizeof(intel->upload.buffer)) {
+ drm_intel_bo_subdata(intel->upload.bo, base, size, ptr);
+ free((void*)ptr);
+ }
+
+ drm_intel_bo_reference(intel->upload.bo);
+ *return_bo = intel->upload.bo;
+ *return_offset = base;
+
+ intel->upload.offset = base + size;
+}
+
+drm_intel_bo *
+intel_bufferobj_source(struct intel_context *intel,
+ struct intel_buffer_object *intel_obj,
+ GLuint align, GLuint *offset)
+{
+ if (intel_obj->buffer == NULL) {
+ intel_upload_data(intel,
+ intel_obj->sys_buffer, intel_obj->Base.Size, align,
+ &intel_obj->buffer, &intel_obj->offset);
+ intel_obj->source = 1;
}
+ *offset = intel_obj->offset;
return intel_obj->buffer;
}
@@ -554,6 +747,7 @@ intel_bufferobj_copy_subdata(struct gl_context *ctx,
struct intel_buffer_object *intel_src = intel_buffer_object(src);
struct intel_buffer_object *intel_dst = intel_buffer_object(dst);
drm_intel_bo *src_bo, *dst_bo;
+ GLuint src_offset;
if (size == 0)
return;
@@ -566,7 +760,7 @@ intel_bufferobj_copy_subdata(struct gl_context *ctx,
if (src == dst) {
char *ptr = intel_bufferobj_map(ctx, GL_COPY_WRITE_BUFFER,
GL_READ_WRITE, dst);
- memcpy(ptr + write_offset, ptr + read_offset, size);
+ memmove(ptr + write_offset, ptr + read_offset, size);
intel_bufferobj_unmap(ctx, GL_COPY_WRITE_BUFFER, dst);
} else {
const char *src_ptr;
@@ -588,18 +782,18 @@ intel_bufferobj_copy_subdata(struct gl_context *ctx,
/* Otherwise, we have real BOs, so blit them. */
dst_bo = intel_bufferobj_buffer(intel, intel_dst, INTEL_WRITE_PART);
- src_bo = intel_bufferobj_buffer(intel, intel_src, INTEL_READ);
+ src_bo = intel_bufferobj_source(intel, intel_src, 64, &src_offset);
intel_emit_linear_blit(intel,
dst_bo, write_offset,
- src_bo, read_offset, size);
+ src_bo, read_offset + src_offset, size);
/* Since we've emitted some blits to buffers that will (likely) be used
* in rendering operations in other cache domains in this batch, emit a
* flush. Once again, we wish for a domain tracker in libdrm to cover
* usage inside of a batchbuffer.
*/
- intel_batchbuffer_emit_mi_flush(intel->batch);
+ intel_batchbuffer_emit_mi_flush(intel);
}
#if FEATURE_APPLE_object_purgeable
diff --git a/src/mesa/drivers/dri/intel/intel_buffer_objects.h b/src/mesa/drivers/dri/intel/intel_buffer_objects.h
index b15c1921061..81ee21f0626 100644
--- a/src/mesa/drivers/dri/intel/intel_buffer_objects.h
+++ b/src/mesa/drivers/dri/intel/intel_buffer_objects.h
@@ -42,6 +42,8 @@ struct intel_buffer_object
{
struct gl_buffer_object Base;
drm_intel_bo *buffer; /* the low-level buffer manager's buffer handle */
+ GLuint offset; /* any offset into that buffer */
+
/** System memory buffer data, if not using a BO to store the data. */
void *sys_buffer;
@@ -55,6 +57,7 @@ struct intel_buffer_object
GLsizei range_map_size;
GLboolean mapped_gtt;
+ GLboolean source;
};
@@ -63,8 +66,26 @@ struct intel_buffer_object
drm_intel_bo *intel_bufferobj_buffer(struct intel_context *intel,
struct intel_buffer_object *obj,
GLuint flag);
+drm_intel_bo *intel_bufferobj_source(struct intel_context *intel,
+ struct intel_buffer_object *obj,
+ GLuint align,
+ GLuint *offset);
+
+void intel_upload_data(struct intel_context *intel,
+ const void *ptr, GLuint size, GLuint align,
+ drm_intel_bo **return_bo,
+ GLuint *return_offset);
+
+void *intel_upload_map(struct intel_context *intel,
+ GLuint size, GLuint align);
+void intel_upload_unmap(struct intel_context *intel,
+ const void *ptr, GLuint size, GLuint align,
+ drm_intel_bo **return_bo,
+ GLuint *return_offset);
+
+void intel_upload_finish(struct intel_context *intel);
-/* Hook the bufferobject implementation into mesa:
+/* Hook the bufferobject implementation into mesa:
*/
void intelInitBufferObjectFuncs(struct dd_function_table *functions);
diff --git a/src/mesa/drivers/dri/intel/intel_chipset.h b/src/mesa/drivers/dri/intel/intel_chipset.h
index 4fecdbed203..4ff9140d56e 100644
--- a/src/mesa/drivers/dri/intel/intel_chipset.h
+++ b/src/mesa/drivers/dri/intel/intel_chipset.h
@@ -133,6 +133,10 @@
devid == PCI_CHIP_SANDYBRIDGE_M_GT2_PLUS || \
devid == PCI_CHIP_SANDYBRIDGE_S)
+#define IS_GT1(devid) (devid == PCI_CHIP_SANDYBRIDGE_GT1 || \
+ devid == PCI_CHIP_SANDYBRIDGE_M_GT1 || \
+ devid == PCI_CHIP_SANDYBRIDGE_S)
+
#define IS_965(devid) (IS_GEN4(devid) || \
IS_G4X(devid) || \
IS_GEN5(devid) || \
diff --git a/src/mesa/drivers/dri/intel/intel_clear.c b/src/mesa/drivers/dri/intel/intel_clear.c
index fa451f0045e..82d29e76712 100644
--- a/src/mesa/drivers/dri/intel/intel_clear.c
+++ b/src/mesa/drivers/dri/intel/intel_clear.c
@@ -85,6 +85,8 @@ intelClear(struct gl_context *ctx, GLbitfield mask)
GLbitfield blit_mask = 0;
GLbitfield swrast_mask = 0;
struct gl_framebuffer *fb = ctx->DrawBuffer;
+ struct intel_renderbuffer *irb;
+ int i;
if (mask & (BUFFER_BIT_FRONT_LEFT | BUFFER_BIT_FRONT_RIGHT)) {
intel->front_buffer_dirty = GL_TRUE;
@@ -93,6 +95,22 @@ intelClear(struct gl_context *ctx, GLbitfield mask)
if (0)
fprintf(stderr, "%s\n", __FUNCTION__);
+ /* Get SW clears out of the way: Anything without an intel_renderbuffer */
+ for (i = 0; i < BUFFER_COUNT; i++) {
+ if (!(mask & (1 << i)))
+ continue;
+
+ irb = intel_get_renderbuffer(fb, i);
+ if (unlikely(!irb)) {
+ swrast_mask |= (1 << i);
+ mask &= ~(1 << i);
+ }
+ }
+ if (unlikely(swrast_mask)) {
+ debug_mask("swrast", swrast_mask);
+ _swrast_Clear(ctx, swrast_mask);
+ }
+
/* HW color buffers (front, back, aux, generic FBO, etc) */
if (colorMask == ~0) {
/* clear all R,G,B,A */
@@ -151,44 +169,18 @@ intelClear(struct gl_context *ctx, GLbitfield mask)
}
}
- if (intel->gen >= 6) {
- /* Blits are in a different ringbuffer so we don't use them. */
- tri_mask |= blit_mask;
- blit_mask = 0;
- }
-
- /* SW fallback clearing */
- swrast_mask = mask & ~tri_mask & ~blit_mask;
-
- {
- /* look for non-Intel renderbuffers (clear them with swrast) */
- GLbitfield blit_or_tri = blit_mask | tri_mask;
- while (blit_or_tri) {
- GLuint i = _mesa_ffs(blit_or_tri) - 1;
- GLbitfield bufBit = 1 << i;
- if (!fb->Attachment[i].Renderbuffer->ClassID) {
- blit_mask &= ~bufBit;
- tri_mask &= ~bufBit;
- swrast_mask |= bufBit;
- }
- blit_or_tri ^= bufBit;
- }
- }
+ /* Anything left, just use tris */
+ tri_mask |= mask & ~blit_mask;
if (blit_mask) {
debug_mask("blit", blit_mask);
- intelClearWithBlit(ctx, blit_mask);
+ tri_mask |= intelClearWithBlit(ctx, blit_mask);
}
if (tri_mask) {
debug_mask("tri", tri_mask);
_mesa_meta_Clear(&intel->ctx, tri_mask);
}
-
- if (swrast_mask) {
- debug_mask("swrast", swrast_mask);
- _swrast_Clear(ctx, swrast_mask);
- }
}
diff --git a/src/mesa/drivers/dri/intel/intel_context.c b/src/mesa/drivers/dri/intel/intel_context.c
index 968f3c6e466..7c422c4c3ac 100644
--- a/src/mesa/drivers/dri/intel/intel_context.c
+++ b/src/mesa/drivers/dri/intel/intel_context.c
@@ -496,11 +496,9 @@ intel_prepare_render(struct intel_context *intel)
* the swap, 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->need_throttle && intel->first_post_swapbuffers_batch) {
- 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;
- intel->need_throttle = GL_FALSE;
+ if (intel->need_throttle) {
+ drmCommandNone(intel->driFd, DRM_I915_GEM_THROTTLE);
+ intel->need_throttle = GL_FALSE;
}
}
@@ -513,7 +511,7 @@ intel_viewport(struct gl_context *ctx, GLint x, GLint y, GLsizei w, GLsizei h)
if (intel->saved_viewport)
intel->saved_viewport(ctx, x, y, w, h);
- if (!intel->meta.internal_viewport_call && ctx->DrawBuffer->Name == 0) {
+ if (ctx->DrawBuffer->Name == 0) {
dri2InvalidateDrawable(driContext->driDrawablePriv);
dri2InvalidateDrawable(driContext->driReadablePriv);
}
@@ -580,8 +578,8 @@ intel_flush(struct gl_context *ctx)
if (intel->gen < 4)
INTEL_FIREVERTICES(intel);
- if (intel->batch->map != intel->batch->ptr)
- intel_batchbuffer_flush(intel->batch);
+ if (intel->batch.used)
+ intel_batchbuffer_flush(intel);
}
static void
@@ -591,7 +589,8 @@ intel_glFlush(struct gl_context *ctx)
intel_flush(ctx);
intel_flush_front(ctx);
- intel->need_throttle = GL_TRUE;
+ if (intel->is_front_buffer_rendering)
+ intel->need_throttle = GL_TRUE;
}
void
@@ -608,7 +607,7 @@ intelFinish(struct gl_context * ctx)
irb = intel_renderbuffer(fb->_ColorDrawBuffers[i]);
- if (irb && irb->region)
+ if (irb && irb->region && irb->region->buffer)
drm_intel_bo_wait_rendering(irb->region->buffer);
}
if (fb->_DepthBuffer) {
@@ -669,8 +668,8 @@ intelInitContext(struct intel_context *intel,
mesaVis = &visual;
}
- if (!_mesa_initialize_context_for_api(&intel->ctx, api, mesaVis, shareCtx,
- functions, (void *) intel)) {
+ if (!_mesa_initialize_context(&intel->ctx, api, mesaVis, shareCtx,
+ functions, (void *) intel)) {
printf("%s: failed to init mesa context\n", __FUNCTION__);
return GL_FALSE;
}
@@ -708,12 +707,75 @@ intelInitContext(struct intel_context *intel,
}
}
+ memset(&ctx->TextureFormatSupported, 0,
+ sizeof(ctx->TextureFormatSupported));
+ ctx->TextureFormatSupported[MESA_FORMAT_ARGB8888] = GL_TRUE;
+ if (intel->has_xrgb_textures)
+ ctx->TextureFormatSupported[MESA_FORMAT_XRGB8888] = GL_TRUE;
+ ctx->TextureFormatSupported[MESA_FORMAT_ARGB4444] = GL_TRUE;
+ ctx->TextureFormatSupported[MESA_FORMAT_ARGB1555] = GL_TRUE;
+ ctx->TextureFormatSupported[MESA_FORMAT_RGB565] = GL_TRUE;
+ ctx->TextureFormatSupported[MESA_FORMAT_L8] = GL_TRUE;
+ ctx->TextureFormatSupported[MESA_FORMAT_A8] = GL_TRUE;
+ ctx->TextureFormatSupported[MESA_FORMAT_I8] = GL_TRUE;
+ ctx->TextureFormatSupported[MESA_FORMAT_AL88] = GL_TRUE;
+ if (intel->gen >= 4)
+ ctx->TextureFormatSupported[MESA_FORMAT_AL1616] = GL_TRUE;
+ ctx->TextureFormatSupported[MESA_FORMAT_S8_Z24] = GL_TRUE;
+ /*
+ * This was disabled in initial FBO enabling to avoid combinations
+ * of depth+stencil that wouldn't work together. We since decided
+ * that it was OK, since it's up to the app to come up with the
+ * combo that actually works, so this can probably be re-enabled.
+ */
+ /*
+ ctx->TextureFormatSupported[MESA_FORMAT_Z16] = GL_TRUE;
+ ctx->TextureFormatSupported[MESA_FORMAT_Z24] = GL_TRUE;
+ */
+
+ /* ctx->Extensions.MESA_ycbcr_texture */
+ ctx->TextureFormatSupported[MESA_FORMAT_YCBCR] = GL_TRUE;
+ ctx->TextureFormatSupported[MESA_FORMAT_YCBCR_REV] = GL_TRUE;
+
+ /* GL_3DFX_texture_compression_FXT1 */
+ ctx->TextureFormatSupported[MESA_FORMAT_RGB_FXT1] = GL_TRUE;
+ ctx->TextureFormatSupported[MESA_FORMAT_RGBA_FXT1] = GL_TRUE;
+
+ /* GL_EXT_texture_compression_s3tc */
+ ctx->TextureFormatSupported[MESA_FORMAT_RGB_DXT1] = GL_TRUE;
+ ctx->TextureFormatSupported[MESA_FORMAT_RGBA_DXT1] = GL_TRUE;
+ ctx->TextureFormatSupported[MESA_FORMAT_RGBA_DXT3] = GL_TRUE;
+ ctx->TextureFormatSupported[MESA_FORMAT_RGBA_DXT5] = GL_TRUE;
+
+#ifndef I915
+ /* GL_ARB_texture_rg */
+ ctx->TextureFormatSupported[MESA_FORMAT_R8] = GL_TRUE;
+ ctx->TextureFormatSupported[MESA_FORMAT_R16] = GL_TRUE;
+ ctx->TextureFormatSupported[MESA_FORMAT_RG88] = GL_TRUE;
+ ctx->TextureFormatSupported[MESA_FORMAT_RG1616] = GL_TRUE;
+
+ ctx->TextureFormatSupported[MESA_FORMAT_DUDV8] = GL_TRUE;
+ ctx->TextureFormatSupported[MESA_FORMAT_SIGNED_RGBA8888_REV] = GL_TRUE;
+
+ /* GL_EXT_texture_sRGB */
+ ctx->TextureFormatSupported[MESA_FORMAT_SARGB8] = GL_TRUE;
+ if (intel->gen >= 5 || intel->is_g4x)
+ ctx->TextureFormatSupported[MESA_FORMAT_SRGB_DXT1] = GL_TRUE;
+ ctx->TextureFormatSupported[MESA_FORMAT_SRGBA_DXT1] = GL_TRUE;
+ ctx->TextureFormatSupported[MESA_FORMAT_SRGBA_DXT3] = GL_TRUE;
+ ctx->TextureFormatSupported[MESA_FORMAT_SRGBA_DXT5] = GL_TRUE;
+ if (intel->has_luminance_srgb) {
+ ctx->TextureFormatSupported[MESA_FORMAT_SL8] = GL_TRUE;
+ ctx->TextureFormatSupported[MESA_FORMAT_SLA8] = GL_TRUE;
+ }
+#endif
+
driParseConfigFiles(&intel->optionCache, &intelScreen->optionCache,
sPriv->myNum, (intel->gen >= 4) ? "i965" : "i915");
- if (intelScreen->deviceID == PCI_CHIP_I865_G)
+ if (intel->gen < 4)
intel->maxBatchSize = 4096;
else
- intel->maxBatchSize = BATCH_SZ;
+ intel->maxBatchSize = sizeof(intel->batch.map);
intel->bufmgr = intelScreen->bufmgr;
@@ -767,8 +829,8 @@ intelInitContext(struct intel_context *intel,
*/
_mesa_init_point(ctx);
- meta_init_metaops(ctx, &intel->meta);
if (intel->gen >= 4) {
+ ctx->Const.sRGBCapable = GL_TRUE;
if (MAX_WIDTH > 8192)
ctx->Const.MaxRenderbufferSize = 8192;
} else {
@@ -826,7 +888,7 @@ intelInitContext(struct intel_context *intel,
if (INTEL_DEBUG & DEBUG_BUFMGR)
dri_bufmgr_set_debug(intel->bufmgr, GL_TRUE);
- intel->batch = intel_batchbuffer_alloc(intel);
+ intel_batchbuffer_reset(intel);
intel_fbo_init(intel);
@@ -874,8 +936,6 @@ intelDestroyContext(__DRIcontext * driContextPriv)
_mesa_meta_free(&intel->ctx);
- meta_destroy_metaops(&intel->meta);
-
intel->vtbl.destroy(intel);
_swsetup_DestroyContext(&intel->ctx);
@@ -885,15 +945,12 @@ intelDestroyContext(__DRIcontext * driContextPriv)
_swrast_DestroyContext(&intel->ctx);
intel->Fallback = 0x0; /* don't call _swrast_Flush later */
- intel_batchbuffer_free(intel->batch);
- intel->batch = NULL;
+ intel_batchbuffer_free(intel);
free(intel->prim.vb);
intel->prim.vb = NULL;
drm_intel_bo_unreference(intel->prim.vb_bo);
intel->prim.vb_bo = NULL;
- drm_intel_bo_unreference(intel->first_post_swapbuffers_batch);
- intel->first_post_swapbuffers_batch = NULL;
driDestroyOptionCache(&intel->optionCache);
diff --git a/src/mesa/drivers/dri/intel/intel_context.h b/src/mesa/drivers/dri/intel/intel_context.h
index 96493c0f2bb..772b2fba5a8 100644
--- a/src/mesa/drivers/dri/intel/intel_context.h
+++ b/src/mesa/drivers/dri/intel/intel_context.h
@@ -29,10 +29,9 @@
#define INTELCONTEXT_INC
-
+#include <stdbool.h>
#include "main/mtypes.h"
#include "main/mm.h"
-#include "dri_metaops.h"
#ifdef __cplusplus
extern "C" {
@@ -149,10 +148,9 @@ struct intel_context
void (*assert_not_dirty) (struct intel_context *intel);
void (*debug_batch)(struct intel_context *intel);
+ bool (*render_target_supported)(gl_format format);
} vtbl;
- struct dri_metaops meta;
-
GLbitfield Fallback; /**< mask of INTEL_FALLBACK_x bits */
GLuint NewGLState;
@@ -171,17 +169,28 @@ struct intel_context
int urb_size;
- struct intel_batchbuffer *batch;
- drm_intel_bo *first_post_swapbuffers_batch;
+ struct intel_batchbuffer {
+ drm_intel_bo *bo;
+ struct cached_batch_item *cached_items;
+
+ uint16_t emit, total;
+ uint16_t used, reserved_space;
+ uint32_t map[8192];
+#define BATCH_SZ (8192*sizeof(uint32_t))
+
+ uint32_t state_batch_offset;
+ bool is_blit;
+ } batch;
+
GLboolean need_throttle;
GLboolean no_batch_wrap;
struct
{
GLuint id;
+ uint32_t start_ptr; /**< for i8xx */
uint32_t primitive; /**< Current hardware primitive type */
void (*flush) (struct intel_context *);
- GLubyte *start_ptr; /**< for i8xx */
drm_intel_bo *vb_bo;
uint8_t *vb;
unsigned int start_offset; /**< Byte offset of primitive sequence */
@@ -189,6 +198,14 @@ struct intel_context
unsigned int count; /**< Number of vertices in current primitive */
} prim;
+ struct {
+ drm_intel_bo *bo;
+ GLuint offset;
+ uint32_t buffer_len;
+ uint32_t buffer_offset;
+ char buffer[4096];
+ } upload;
+
GLuint stats_wm;
/* Offsets of fields within the current vertex:
diff --git a/src/mesa/drivers/dri/intel/intel_decode.c b/src/mesa/drivers/dri/intel/intel_decode.c
index 25b4131594f..688b8fee642 100644
--- a/src/mesa/drivers/dri/intel/intel_decode.c
+++ b/src/mesa/drivers/dri/intel/intel_decode.c
@@ -1601,10 +1601,12 @@ decode_3d_965(uint32_t *data, int count, uint32_t hw_offset, uint32_t devid, int
{ 0x790a, 3, 3, "3DSTATE_AA_LINE_PARAMETERS" },
{ 0x790b, 4, 4, "3DSTATE_GS_SVB_INDEX" },
{ 0x790d, 3, 3, "3DSTATE_MULTISAMPLE" },
+ { 0x7910, 2, 2, "3DSTATE_CLEAR_PARAMS" },
{ 0x7b00, 6, 6, "3DPRIMITIVE" },
{ 0x7802, 4, 4, "3DSTATE_SAMPLER_STATE_POINTERS" },
{ 0x7805, 3, 3, "3DSTATE_URB" },
{ 0x780e, 4, 4, "3DSTATE_CC_STATE_POINTERS" },
+ { 0x780f, 2, 2, "3DSTATE_SCISSOR_STATE_POINTERS" },
{ 0x7810, 6, 6, "3DSTATE_VS_STATE" },
{ 0x7811, 7, 7, "3DSTATE_GS_STATE" },
{ 0x7812, 4, 4, "3DSTATE_CLIP_STATE" },
diff --git a/src/mesa/drivers/dri/intel/intel_extensions.c b/src/mesa/drivers/dri/intel/intel_extensions.c
index 556a4195bdd..febc1d4f859 100644
--- a/src/mesa/drivers/dri/intel/intel_extensions.c
+++ b/src/mesa/drivers/dri/intel/intel_extensions.c
@@ -25,12 +25,15 @@
*
**************************************************************************/
+#include "main/mfeatures.h"
+
#include "intel_chipset.h"
#include "intel_context.h"
#include "intel_extensions.h"
#include "utils.h"
+#define need_GL_ARB_ES2_compatibility
#define need_GL_ARB_draw_elements_base_vertex
#define need_GL_ARB_framebuffer_object
#define need_GL_ARB_map_buffer_range
@@ -78,8 +81,10 @@
* i965_dri.
*/
static const struct dri_extension card_extensions[] = {
+ { "GL_ARB_ES2_compatibility", GL_ARB_ES2_compatibility_functions },
{ "GL_ARB_draw_elements_base_vertex", GL_ARB_draw_elements_base_vertex_functions },
{ "GL_ARB_explicit_attrib_location", NULL },
+ { "GL_ARB_framebuffer_object", GL_ARB_framebuffer_object_functions},
{ "GL_ARB_half_float_pixel", NULL },
{ "GL_ARB_map_buffer_range", GL_ARB_map_buffer_range_functions },
{ "GL_ARB_multitexture", NULL },
@@ -161,7 +166,6 @@ static const struct dri_extension brw_extensions[] = {
{ "GL_ARB_fragment_program", NULL },
{ "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 },
@@ -171,9 +175,11 @@ static const struct dri_extension brw_extensions[] = {
{ "GL_ARB_texture_non_power_of_two", NULL },
{ "GL_ARB_texture_rg", NULL },
{ "GL_EXT_draw_buffers2", GL_EXT_draw_buffers2_functions },
+ { "GL_EXT_framebuffer_sRGB", NULL },
{ "GL_EXT_shadow_funcs", NULL },
{ "GL_EXT_stencil_two_side", GL_EXT_stencil_two_side_functions },
{ "GL_EXT_texture_sRGB", NULL },
+ { "GL_EXT_texture_sRGB_decode", NULL },
{ "GL_EXT_texture_swizzle", NULL },
{ "GL_EXT_vertex_array_bgra", NULL },
{ "GL_ATI_envmap_bumpmap", GL_ATI_envmap_bumpmap_functions },
diff --git a/src/mesa/drivers/dri/intel/intel_extensions_es2.c b/src/mesa/drivers/dri/intel/intel_extensions_es2.c
index 54b0517deb9..747ddf7644c 100644
--- a/src/mesa/drivers/dri/intel/intel_extensions_es2.c
+++ b/src/mesa/drivers/dri/intel/intel_extensions_es2.c
@@ -26,6 +26,7 @@
**************************************************************************/
#include "main/extensions.h"
+#include "main/mfeatures.h"
#include "intel_extensions.h"
@@ -62,6 +63,7 @@ static const char *es2_extensions[] = {
"GL_EXT_blend_minmax",
"GL_EXT_blend_subtract",
"GL_EXT_stencil_wrap",
+ "GL_NV_blend_square",
/* Optional GLES2 */
"GL_ARB_framebuffer_object",
@@ -95,9 +97,22 @@ intelInitExtensionsES1(struct gl_context *ctx)
_mesa_enable_extension(ctx, "GL_ARB_point_parameters");
_mesa_enable_extension(ctx, "GL_OES_draw_texture");
+
+ _mesa_enable_extension(ctx, "GL_OES_point_sprite");
}
/**
+ * \brief Extensions to disable.
+ *
+ * These extensions must be manually disabled because they may have been
+ * enabled by default.
+ */
+static const char* es2_extensions_disabled[] = {
+ "GL_OES_standard_derivatives",
+ NULL,
+};
+
+/**
* Initializes potential list of extensions if ctx == NULL, or actually enables
* extensions for a context.
*/
@@ -111,4 +126,6 @@ intelInitExtensionsES2(struct gl_context *ctx)
for (i = 0; es2_extensions[i]; i++)
_mesa_enable_extension(ctx, es2_extensions[i]);
+ for (i = 0; es2_extensions_disabled[i]; i++)
+ _mesa_disable_extension(ctx, es2_extensions_disabled[i]);
}
diff --git a/src/mesa/drivers/dri/intel/intel_fbo.c b/src/mesa/drivers/dri/intel/intel_fbo.c
index 18e796a1186..8b57eb19f56 100644
--- a/src/mesa/drivers/dri/intel/intel_fbo.c
+++ b/src/mesa/drivers/dri/intel/intel_fbo.c
@@ -28,11 +28,13 @@
#include "main/imports.h"
#include "main/macros.h"
+#include "main/mfeatures.h"
#include "main/mtypes.h"
#include "main/fbobject.h"
#include "main/framebuffer.h"
#include "main/renderbuffer.h"
#include "main/context.h"
+#include "main/teximage.h"
#include "main/texrender.h"
#include "drivers/common/meta.h"
@@ -42,6 +44,11 @@
#include "intel_fbo.h"
#include "intel_mipmap_tree.h"
#include "intel_regions.h"
+#include "intel_tex.h"
+#include "intel_span.h"
+#ifndef I915
+#include "brw_context.h"
+#endif
#define FILE_DEBUG_FLAG DEBUG_FBO
@@ -107,79 +114,27 @@ intel_alloc_renderbuffer_storage(struct gl_context * ctx, struct gl_renderbuffer
ASSERT(rb->Name != 0);
switch (internalFormat) {
- case GL_RED:
- case GL_R8:
- rb->Format = MESA_FORMAT_R8;
- rb->DataType = GL_UNSIGNED_BYTE;
- break;
- case GL_R16:
- rb->Format = MESA_FORMAT_R16;
- rb->DataType = GL_UNSIGNED_SHORT;
- break;
- case GL_RG:
- case GL_RG8:
- rb->Format = MESA_FORMAT_RG88;
- rb->DataType = GL_UNSIGNED_BYTE;
- break;
- case GL_RG16:
- rb->Format = MESA_FORMAT_RG1616;
- rb->DataType = GL_UNSIGNED_SHORT;
- break;
- case GL_R3_G3_B2:
- case GL_RGB4:
- case GL_RGB5:
- rb->Format = MESA_FORMAT_RGB565;
- rb->DataType = GL_UNSIGNED_BYTE;
- break;
- case GL_RGB:
- case GL_RGB8:
- case GL_RGB10:
- case GL_RGB12:
- case GL_RGB16:
- rb->Format = MESA_FORMAT_XRGB8888;
- rb->DataType = GL_UNSIGNED_BYTE;
- break;
- case GL_RGBA:
- case GL_RGBA2:
- case GL_RGBA4:
- case GL_RGB5_A1:
- case GL_RGBA8:
- case GL_RGB10_A2:
- case GL_RGBA12:
- case GL_RGBA16:
- rb->Format = MESA_FORMAT_ARGB8888;
- rb->DataType = GL_UNSIGNED_BYTE;
- break;
- case GL_ALPHA:
- case GL_ALPHA8:
- rb->Format = MESA_FORMAT_A8;
- rb->DataType = GL_UNSIGNED_BYTE;
- break;
- case GL_DEPTH_COMPONENT16:
- rb->Format = MESA_FORMAT_Z16;
- rb->DataType = GL_UNSIGNED_SHORT;
+ default:
+ /* Use the same format-choice logic as for textures.
+ * Renderbuffers aren't any different from textures for us,
+ * except they're less useful because you can't texture with
+ * them.
+ */
+ rb->Format = intel->ctx.Driver.ChooseTextureFormat(ctx, internalFormat,
+ GL_NONE, GL_NONE);
break;
case GL_STENCIL_INDEX:
case GL_STENCIL_INDEX1_EXT:
case GL_STENCIL_INDEX4_EXT:
case GL_STENCIL_INDEX8_EXT:
case GL_STENCIL_INDEX16_EXT:
- case GL_DEPTH_COMPONENT:
- case GL_DEPTH_COMPONENT24:
- case GL_DEPTH_COMPONENT32:
- case GL_DEPTH_STENCIL_EXT:
- case GL_DEPTH24_STENCIL8_EXT:
- /* alloc a depth+stencil buffer */
+ /* These aren't actual texture formats, so force them here. */
rb->Format = MESA_FORMAT_S8_Z24;
- rb->DataType = GL_UNSIGNED_INT_24_8_EXT;
break;
- default:
- _mesa_problem(ctx,
- "Unexpected format in intel_alloc_renderbuffer_storage");
- return GL_FALSE;
}
rb->_BaseFormat = _mesa_base_fbo_format(ctx, internalFormat);
+ rb->DataType = intel_mesa_format_to_rb_datatype(rb->Format);
cpp = _mesa_get_format_bytes(rb->Format);
intel_flush(ctx);
@@ -195,10 +150,15 @@ intel_alloc_renderbuffer_storage(struct gl_context * ctx, struct gl_renderbuffer
DBG("Allocating %d x %d Intel RBO\n", width, height);
tiling = I915_TILING_NONE;
+ if (intel->use_texture_tiling) {
+ GLenum base_format = _mesa_get_format_base_format(rb->Format);
- /* Gen6 requires depth must be tiling */
- if (intel->gen >= 6 && rb->Format == MESA_FORMAT_S8_Z24)
- tiling = I915_TILING_Y;
+ if (intel->gen >= 4 && (base_format == GL_DEPTH_COMPONENT ||
+ base_format == GL_DEPTH_STENCIL))
+ tiling = I915_TILING_Y;
+ else
+ tiling = I915_TILING_X;
+ }
irb->region = intel_region_alloc(intel->intelScreen, tiling, cpp,
width, height, GL_TRUE);
@@ -334,53 +294,10 @@ intel_create_renderbuffer(gl_format format)
_mesa_init_renderbuffer(&irb->Base, 0);
irb->Base.ClassID = INTEL_RB_CLASS;
-
- switch (format) {
- case MESA_FORMAT_RGB565:
- irb->Base._BaseFormat = GL_RGB;
- irb->Base.DataType = GL_UNSIGNED_BYTE;
- break;
- case MESA_FORMAT_XRGB8888:
- irb->Base._BaseFormat = GL_RGB;
- irb->Base.DataType = GL_UNSIGNED_BYTE;
- break;
- case MESA_FORMAT_ARGB8888:
- irb->Base._BaseFormat = GL_RGBA;
- irb->Base.DataType = GL_UNSIGNED_BYTE;
- break;
- case MESA_FORMAT_Z16:
- irb->Base._BaseFormat = GL_DEPTH_COMPONENT;
- irb->Base.DataType = GL_UNSIGNED_SHORT;
- break;
- case MESA_FORMAT_X8_Z24:
- irb->Base._BaseFormat = GL_DEPTH_COMPONENT;
- irb->Base.DataType = GL_UNSIGNED_INT;
- break;
- case MESA_FORMAT_S8_Z24:
- irb->Base._BaseFormat = GL_DEPTH_STENCIL;
- irb->Base.DataType = GL_UNSIGNED_INT_24_8_EXT;
- break;
- case MESA_FORMAT_A8:
- irb->Base._BaseFormat = GL_ALPHA;
- irb->Base.DataType = GL_UNSIGNED_BYTE;
- break;
- case MESA_FORMAT_R8:
- irb->Base._BaseFormat = GL_RED;
- irb->Base.DataType = GL_UNSIGNED_BYTE;
- break;
- case MESA_FORMAT_RG88:
- irb->Base._BaseFormat = GL_RG;
- irb->Base.DataType = GL_UNSIGNED_BYTE;
- break;
- default:
- _mesa_problem(NULL,
- "Unexpected intFormat in intel_create_renderbuffer");
- free(irb);
- return NULL;
- }
-
+ irb->Base._BaseFormat = _mesa_get_format_base_format(format);
irb->Base.Format = format;
irb->Base.InternalFormat = irb->Base._BaseFormat;
+ irb->Base.DataType = intel_mesa_format_to_rb_datatype(format);
/* intel-specific methods */
irb->Base.Delete = intel_delete_renderbuffer;
@@ -457,70 +374,16 @@ static GLboolean
intel_update_wrapper(struct gl_context *ctx, struct intel_renderbuffer *irb,
struct gl_texture_image *texImage)
{
- if (texImage->TexFormat == MESA_FORMAT_ARGB8888) {
- irb->Base.DataType = GL_UNSIGNED_BYTE;
- DBG("Render to RGBA8 texture OK\n");
- }
- else if (texImage->TexFormat == MESA_FORMAT_XRGB8888) {
- irb->Base.DataType = GL_UNSIGNED_BYTE;
- DBG("Render to XGBA8 texture OK\n");
- }
-#ifndef I915
- else if (texImage->TexFormat == MESA_FORMAT_SARGB8) {
- irb->Base.DataType = GL_UNSIGNED_BYTE;
- DBG("Render to SARGB8 texture OK\n");
- }
-#endif
- else if (texImage->TexFormat == MESA_FORMAT_RGB565) {
- irb->Base.DataType = GL_UNSIGNED_BYTE;
- DBG("Render to RGB5 texture OK\n");
- }
- else if (texImage->TexFormat == MESA_FORMAT_ARGB1555) {
- irb->Base.DataType = GL_UNSIGNED_BYTE;
- DBG("Render to ARGB1555 texture OK\n");
- }
- else if (texImage->TexFormat == MESA_FORMAT_ARGB4444) {
- irb->Base.DataType = GL_UNSIGNED_BYTE;
- DBG("Render to ARGB4444 texture OK\n");
- }
-#ifndef I915
- else if (texImage->TexFormat == MESA_FORMAT_A8) {
- irb->Base.DataType = GL_UNSIGNED_BYTE;
- DBG("Render to A8 texture OK\n");
- }
- else if (texImage->TexFormat == MESA_FORMAT_R8) {
- irb->Base.DataType = GL_UNSIGNED_BYTE;
- DBG("Render to R8 texture OK\n");
- }
- else if (texImage->TexFormat == MESA_FORMAT_RG88) {
- irb->Base.DataType = GL_UNSIGNED_BYTE;
- DBG("Render to RG88 texture OK\n");
- }
- else if (texImage->TexFormat == MESA_FORMAT_R16) {
- irb->Base.DataType = GL_UNSIGNED_SHORT;
- DBG("Render to R8 texture OK\n");
- }
- else if (texImage->TexFormat == MESA_FORMAT_RG1616) {
- irb->Base.DataType = GL_UNSIGNED_SHORT;
- DBG("Render to RG88 texture OK\n");
- }
-#endif
- else if (texImage->TexFormat == MESA_FORMAT_Z16) {
- irb->Base.DataType = GL_UNSIGNED_SHORT;
- DBG("Render to DEPTH16 texture OK\n");
- }
- else if (texImage->TexFormat == MESA_FORMAT_S8_Z24) {
- irb->Base.DataType = GL_UNSIGNED_INT_24_8_EXT;
- DBG("Render to DEPTH_STENCIL texture OK\n");
- }
- else {
+ if (!intel_span_supports_format(texImage->TexFormat)) {
DBG("Render to texture BAD FORMAT %s\n",
_mesa_get_format_name(texImage->TexFormat));
return GL_FALSE;
+ } else {
+ DBG("Render to texture %s\n", _mesa_get_format_name(texImage->TexFormat));
}
irb->Base.Format = texImage->TexFormat;
-
+ irb->Base.DataType = intel_mesa_format_to_rb_datatype(texImage->TexFormat);
irb->Base.InternalFormat = texImage->InternalFormat;
irb->Base._BaseFormat = _mesa_base_fbo_format(ctx, irb->Base.InternalFormat);
irb->Base.Width = texImage->Width;
@@ -562,6 +425,24 @@ intel_wrap_texture(struct gl_context * ctx, struct gl_texture_image *texImage)
return irb;
}
+static void
+intel_set_draw_offset_for_image(struct intel_texture_image *intel_image,
+ int zoffset)
+{
+ struct intel_mipmap_tree *mt = intel_image->mt;
+ unsigned int dst_x, dst_y;
+
+ /* compute offset of the particular 2D image within the texture region */
+ intel_miptree_get_image_offset(intel_image->mt,
+ intel_image->level,
+ intel_image->face,
+ zoffset,
+ &dst_x, &dst_y);
+
+ mt->region->draw_offset = (dst_y * mt->region->pitch + dst_x) * mt->cpp;
+ mt->region->draw_x = dst_x;
+ mt->region->draw_y = dst_y;
+}
/**
* Called by glFramebufferTexture[123]DEXT() (and other places) to
@@ -578,7 +459,6 @@ intel_render_texture(struct gl_context * ctx,
= att->Texture->Image[att->CubeMapFace][att->TextureLevel];
struct intel_renderbuffer *irb = intel_renderbuffer(att->Renderbuffer);
struct intel_texture_image *intel_image;
- GLuint dst_x, dst_y;
(void) fb;
@@ -624,19 +504,53 @@ intel_render_texture(struct gl_context * ctx,
intel_region_reference(&irb->region, intel_image->mt->region);
}
- /* compute offset of the particular 2D image within the texture region */
- intel_miptree_get_image_offset(intel_image->mt,
- att->TextureLevel,
- att->CubeMapFace,
- att->Zoffset,
- &dst_x, &dst_y);
-
- intel_image->mt->region->draw_offset = (dst_y * intel_image->mt->region->pitch +
- dst_x) * intel_image->mt->cpp;
- intel_image->mt->region->draw_x = dst_x;
- intel_image->mt->region->draw_y = dst_y;
+ intel_set_draw_offset_for_image(intel_image, att->Zoffset);
intel_image->used_as_render_target = GL_TRUE;
+#ifndef I915
+ if (!brw_context(ctx)->has_surface_tile_offset &&
+ (intel_image->mt->region->draw_offset & 4095) != 0) {
+ /* Original gen4 hardware couldn't draw to a non-tile-aligned
+ * destination in a miptree unless you actually setup your
+ * renderbuffer as a miptree and used the fragile
+ * lod/array_index/etc. controls to select the image. So,
+ * instead, we just make a new single-level miptree and render
+ * into that.
+ */
+ struct intel_context *intel = intel_context(ctx);
+ struct intel_mipmap_tree *old_mt = intel_image->mt;
+ struct intel_mipmap_tree *new_mt;
+ int comp_byte = 0, texel_bytes;
+
+ if (_mesa_is_format_compressed(intel_image->base.TexFormat))
+ comp_byte = intel_compressed_num_bytes(intel_image->base.TexFormat);
+
+ texel_bytes = _mesa_get_format_bytes(intel_image->base.TexFormat);
+
+ new_mt = intel_miptree_create(intel, newImage->TexObject->Target,
+ intel_image->base._BaseFormat,
+ intel_image->base.InternalFormat,
+ intel_image->level,
+ intel_image->level,
+ intel_image->base.Width,
+ intel_image->base.Height,
+ intel_image->base.Depth,
+ texel_bytes, comp_byte, GL_TRUE);
+
+ intel_miptree_image_copy(intel,
+ new_mt,
+ intel_image->face,
+ intel_image->level,
+ old_mt);
+
+ intel_miptree_release(intel, &intel_image->mt);
+ intel_image->mt = new_mt;
+ intel_set_draw_offset_for_image(intel_image, att->Zoffset);
+
+ intel_region_release(&irb->region);
+ intel_region_reference(&irb->region, intel_image->mt->region);
+ }
+#endif
/* update drawing region, etc */
intel_draw_buffer(ctx, fb);
}
@@ -659,14 +573,15 @@ intel_finish_render_texture(struct gl_context * ctx,
_glthread_GetID(), att->Texture->Name);
/* Flag that this image may now be validated into the object's miptree. */
- intel_image->used_as_render_target = GL_FALSE;
+ if (intel_image)
+ intel_image->used_as_render_target = GL_FALSE;
/* Since we've (probably) rendered to the texture and will (likely) use
* it in the texture domain later on in this batchbuffer, flush the
* batch. Once again, we wish for a domain tracker in libdrm to cover
* usage inside of a batchbuffer like GEM does in the kernel.
*/
- intel_batchbuffer_emit_mi_flush(intel->batch);
+ intel_batchbuffer_emit_mi_flush(intel);
}
/**
@@ -675,6 +590,7 @@ intel_finish_render_texture(struct gl_context * ctx,
static void
intel_validate_framebuffer(struct gl_context *ctx, struct gl_framebuffer *fb)
{
+ struct intel_context *intel = intel_context(ctx);
const struct intel_renderbuffer *depthRb =
intel_get_renderbuffer(fb, BUFFER_DEPTH);
const struct intel_renderbuffer *stencilRb =
@@ -682,10 +598,10 @@ intel_validate_framebuffer(struct gl_context *ctx, struct gl_framebuffer *fb)
int i;
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)) {
+ if (fb->Attachment[BUFFER_DEPTH].Type == GL_TEXTURE &&
+ fb->Attachment[BUFFER_STENCIL].Type == GL_TEXTURE &&
+ (fb->Attachment[BUFFER_DEPTH].Texture->Name ==
+ fb->Attachment[BUFFER_STENCIL].Texture->Name)) {
/* OK */
} else {
/* we only support combined depth/stencil buffers, not separate
@@ -698,40 +614,118 @@ intel_validate_framebuffer(struct gl_context *ctx, struct gl_framebuffer *fb)
}
}
- for (i = 0; i < ctx->Const.MaxDrawBuffers; i++) {
- struct gl_renderbuffer *rb = ctx->DrawBuffer->_ColorDrawBuffers[i];
- struct intel_renderbuffer *irb = intel_renderbuffer(rb);
+ for (i = 0; i < Elements(fb->Attachment); i++) {
+ struct gl_renderbuffer *rb;
+ struct intel_renderbuffer *irb;
- if (rb == NULL)
+ if (fb->Attachment[i].Type == GL_NONE)
continue;
+ /* A supported attachment will have a Renderbuffer set either
+ * from being a Renderbuffer or being a texture that got the
+ * intel_wrap_texture() treatment.
+ */
+ rb = fb->Attachment[i].Renderbuffer;
+ if (rb == NULL) {
+ DBG("attachment without renderbuffer\n");
+ fb->_Status = GL_FRAMEBUFFER_UNSUPPORTED_EXT;
+ continue;
+ }
+
+ irb = intel_renderbuffer(rb);
if (irb == NULL) {
DBG("software rendering renderbuffer\n");
fb->_Status = GL_FRAMEBUFFER_UNSUPPORTED_EXT;
continue;
}
- switch (irb->Base.Format) {
- case MESA_FORMAT_ARGB8888:
- case MESA_FORMAT_XRGB8888:
- case MESA_FORMAT_RGB565:
- case MESA_FORMAT_ARGB1555:
- case MESA_FORMAT_ARGB4444:
-#ifndef I915
- case MESA_FORMAT_SARGB8:
- case MESA_FORMAT_A8:
- case MESA_FORMAT_R8:
- case MESA_FORMAT_R16:
- case MESA_FORMAT_RG88:
- case MESA_FORMAT_RG1616:
-#endif
- break;
- default:
+ if (!intel_span_supports_format(irb->Base.Format) ||
+ !intel->vtbl.render_target_supported(irb->Base.Format)) {
+ DBG("Unsupported texture/renderbuffer format attached: %s\n",
+ _mesa_get_format_name(irb->Base.Format));
fb->_Status = GL_FRAMEBUFFER_UNSUPPORTED_EXT;
}
}
}
+/**
+ * Try to do a glBlitFramebuffer using glCopyTexSubImage2D
+ * We can do this when the dst renderbuffer is actually a texture and
+ * there is no scaling, mirroring or scissoring.
+ *
+ * \return new buffer mask indicating the buffers left to blit using the
+ * normal path.
+ */
+static GLbitfield
+intel_blit_framebuffer_copy_tex_sub_image(struct gl_context *ctx,
+ GLint srcX0, GLint srcY0,
+ GLint srcX1, GLint srcY1,
+ GLint dstX0, GLint dstY0,
+ GLint dstX1, GLint dstY1,
+ GLbitfield mask, GLenum filter)
+{
+ if (mask & GL_COLOR_BUFFER_BIT) {
+ const struct gl_framebuffer *drawFb = ctx->DrawBuffer;
+ const struct gl_framebuffer *readFb = ctx->ReadBuffer;
+ const struct gl_renderbuffer_attachment *drawAtt =
+ &drawFb->Attachment[drawFb->_ColorDrawBufferIndexes[0]];
+
+ /* If the source and destination are the same size with no
+ mirroring, the rectangles are within the size of the
+ texture and there is no scissor then we can use
+ glCopyTexSubimage2D to implement the blit. This will end
+ up as a fast hardware blit on some drivers */
+ if (drawAtt && drawAtt->Texture &&
+ srcX0 - srcX1 == dstX0 - dstX1 &&
+ srcY0 - srcY1 == dstY0 - dstY1 &&
+ srcX1 >= srcX0 &&
+ srcY1 >= srcY0 &&
+ srcX0 >= 0 && srcX1 <= readFb->Width &&
+ srcY0 >= 0 && srcY1 <= readFb->Height &&
+ dstX0 >= 0 && dstX1 <= drawFb->Width &&
+ dstY0 >= 0 && dstY1 <= drawFb->Height &&
+ !ctx->Scissor.Enabled) {
+ const struct gl_texture_object *texObj = drawAtt->Texture;
+ const GLuint dstLevel = drawAtt->TextureLevel;
+ const GLenum target = texObj->Target;
+
+ struct gl_texture_image *texImage =
+ _mesa_select_tex_image(ctx, texObj, target, dstLevel);
+ GLenum internalFormat = texImage->InternalFormat;
+
+ if (intel_copy_texsubimage(intel_context(ctx), target,
+ intel_texture_image(texImage),
+ internalFormat,
+ dstX0, dstY0,
+ srcX0, srcY0,
+ srcX1 - srcX0, /* width */
+ srcY1 - srcY0))
+ mask &= ~GL_COLOR_BUFFER_BIT;
+ }
+ }
+
+ return mask;
+}
+
+static void
+intel_blit_framebuffer(struct gl_context *ctx,
+ GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1,
+ GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1,
+ GLbitfield mask, GLenum filter)
+{
+ /* Try faster, glCopyTexSubImage2D approach first which uses the BLT. */
+ mask = intel_blit_framebuffer_copy_tex_sub_image(ctx,
+ srcX0, srcY0, srcX1, srcY1,
+ dstX0, dstY0, dstX1, dstY1,
+ mask, filter);
+ if (mask == 0x0)
+ return;
+
+ _mesa_meta_BlitFramebuffer(ctx,
+ srcX0, srcY0, srcX1, srcY1,
+ dstX0, dstY0, dstX1, dstY1,
+ mask, filter);
+}
/**
* Do one-time context initializations related to GL_EXT_framebuffer_object.
@@ -748,7 +742,7 @@ intel_fbo_init(struct intel_context *intel)
intel->ctx.Driver.FinishRenderTexture = intel_finish_render_texture;
intel->ctx.Driver.ResizeBuffers = intel_resize_buffers;
intel->ctx.Driver.ValidateFramebuffer = intel_validate_framebuffer;
- intel->ctx.Driver.BlitFramebuffer = _mesa_meta_BlitFramebuffer;
+ intel->ctx.Driver.BlitFramebuffer = intel_blit_framebuffer;
#if FEATURE_OES_EGL_image
intel->ctx.Driver.EGLImageTargetRenderbufferStorage =
diff --git a/src/mesa/drivers/dri/intel/intel_mipmap_tree.c b/src/mesa/drivers/dri/intel/intel_mipmap_tree.c
index 9c4e5c5ee8c..a3409274fb7 100644
--- a/src/mesa/drivers/dri/intel/intel_mipmap_tree.c
+++ b/src/mesa/drivers/dri/intel/intel_mipmap_tree.c
@@ -157,8 +157,6 @@ struct intel_mipmap_tree *
intel_miptree_create_for_region(struct intel_context *intel,
GLenum target,
GLenum internal_format,
- GLuint first_level,
- GLuint last_level,
struct intel_region *region,
GLuint depth0,
GLuint compress_byte)
@@ -166,7 +164,7 @@ intel_miptree_create_for_region(struct intel_context *intel,
struct intel_mipmap_tree *mt;
mt = intel_miptree_create_internal(intel, target, internal_format,
- first_level, last_level,
+ 0, 0,
region->width, region->height, 1,
region->cpp, compress_byte,
I915_TILING_NONE);
diff --git a/src/mesa/drivers/dri/intel/intel_mipmap_tree.h b/src/mesa/drivers/dri/intel/intel_mipmap_tree.h
index 21db2f4d3b3..760a8bce601 100644
--- a/src/mesa/drivers/dri/intel/intel_mipmap_tree.h
+++ b/src/mesa/drivers/dri/intel/intel_mipmap_tree.h
@@ -137,8 +137,6 @@ struct intel_mipmap_tree *
intel_miptree_create_for_region(struct intel_context *intel,
GLenum target,
GLenum internal_format,
- GLuint first_level,
- GLuint last_level,
struct intel_region *region,
GLuint depth0,
GLuint compress_byte);
diff --git a/src/mesa/drivers/dri/intel/intel_pixel.c b/src/mesa/drivers/dri/intel/intel_pixel.c
index d5c35775ce4..f97256e59bb 100644
--- a/src/mesa/drivers/dri/intel/intel_pixel.c
+++ b/src/mesa/drivers/dri/intel/intel_pixel.c
@@ -66,12 +66,12 @@ intel_check_blit_fragment_ops(struct gl_context * ctx, GLboolean src_alpha_is_on
}
if (ctx->Color.BlendEnabled &&
- (effective_func(ctx->Color.BlendSrcRGB, src_alpha_is_one) != GL_ONE ||
- effective_func(ctx->Color.BlendDstRGB, src_alpha_is_one) != GL_ZERO ||
- ctx->Color.BlendEquationRGB != GL_FUNC_ADD ||
- effective_func(ctx->Color.BlendSrcA, src_alpha_is_one) != GL_ONE ||
- effective_func(ctx->Color.BlendDstA, src_alpha_is_one) != GL_ZERO ||
- ctx->Color.BlendEquationA != GL_FUNC_ADD)) {
+ (effective_func(ctx->Color.Blend[0].SrcRGB, src_alpha_is_one) != GL_ONE ||
+ effective_func(ctx->Color.Blend[0].DstRGB, src_alpha_is_one) != GL_ZERO ||
+ ctx->Color.Blend[0].EquationRGB != GL_FUNC_ADD ||
+ effective_func(ctx->Color.Blend[0].SrcA, src_alpha_is_one) != GL_ONE ||
+ effective_func(ctx->Color.Blend[0].DstA, src_alpha_is_one) != GL_ZERO ||
+ ctx->Color.Blend[0].EquationA != GL_FUNC_ADD)) {
DBG("fallback due to blend\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 e7356a6da0d..43cdd0d2bac 100644
--- a/src/mesa/drivers/dri/intel/intel_pixel_bitmap.c
+++ b/src/mesa/drivers/dri/intel/intel_pixel_bitmap.c
@@ -31,6 +31,7 @@
#include "main/colormac.h"
#include "main/mtypes.h"
#include "main/macros.h"
+#include "main/pbo.h"
#include "main/bufferobj.h"
#include "main/state.h"
#include "main/texobj.h"
@@ -207,7 +208,7 @@ do_blit_bitmap( struct gl_context *ctx,
COPY_4V(tmpColor, ctx->Current.RasterColor);
- if (NEED_SECONDARY_COLOR(ctx)) {
+ if (_mesa_need_secondary_color(ctx)) {
ADD_3V(tmpColor, tmpColor, ctx->Current.RasterSecondaryColor);
}
@@ -285,7 +286,7 @@ do_blit_bitmap( struct gl_context *ctx,
out:
if (unlikely(INTEL_DEBUG & DEBUG_SYNC))
- intel_batchbuffer_flush(intel->batch);
+ intel_batchbuffer_flush(intel);
if (_mesa_is_bufferobj(unpack->BufferObj)) {
/* done with PBO so unmap it now */
diff --git a/src/mesa/drivers/dri/intel/intel_pixel_read.c b/src/mesa/drivers/dri/intel/intel_pixel_read.c
index 54da29236d2..b2e77c7986a 100644
--- a/src/mesa/drivers/dri/intel/intel_pixel_read.c
+++ b/src/mesa/drivers/dri/intel/intel_pixel_read.c
@@ -80,6 +80,7 @@ do_blit_readpixels(struct gl_context * ctx,
drm_intel_bo *dst_buffer;
GLboolean all;
GLint dst_x, dst_y;
+ GLuint dirty;
DBG("%s\n", __FUNCTION__);
@@ -129,7 +130,9 @@ do_blit_readpixels(struct gl_context * ctx,
return GL_TRUE;
}
+ dirty = intel->front_buffer_dirty;
intel_prepare_render(intel);
+ intel->front_buffer_dirty = dirty;
all = (width * height * src->cpp == dst->Base.Size &&
x == 0 && dst_offset == 0);
@@ -138,8 +141,8 @@ do_blit_readpixels(struct gl_context * ctx,
dst_y = 0;
dst_buffer = intel_bufferobj_buffer(intel, dst,
- all ? INTEL_WRITE_FULL :
- INTEL_WRITE_PART);
+ all ? INTEL_WRITE_FULL :
+ INTEL_WRITE_PART);
if (ctx->ReadBuffer->Name == 0)
y = ctx->ReadBuffer->Height - (y + height);
@@ -171,6 +174,10 @@ intelReadPixels(struct gl_context * ctx,
DBG("%s\n", __FUNCTION__);
+ if (do_blit_readpixels
+ (ctx, x, y, width, height, format, type, pack, pixels))
+ return;
+
intel_flush(ctx);
/* glReadPixels() wont dirty the front buffer, so reset the dirty
@@ -179,10 +186,6 @@ intelReadPixels(struct gl_context * ctx,
intel_prepare_render(intel);
intel->front_buffer_dirty = dirty;
- if (do_blit_readpixels
- (ctx, x, y, width, height, format, type, pack, pixels))
- return;
-
fallback_debug("%s: fallback to swrast\n", __FUNCTION__);
/* Update Mesa state before calling down into _swrast_ReadPixels, as
diff --git a/src/mesa/drivers/dri/intel/intel_reg.h b/src/mesa/drivers/dri/intel/intel_reg.h
index 955b100b212..5258699d3f9 100644
--- a/src/mesa/drivers/dri/intel/intel_reg.h
+++ b/src/mesa/drivers/dri/intel/intel_reg.h
@@ -37,6 +37,8 @@
#define FLUSH_MAP_CACHE (1 << 0)
#define INHIBIT_FLUSH_RENDER_CACHE (1 << 2)
+#define MI_FLUSH_DW (CMD_MI | (0x26 << 23) | 2)
+
/* Stalls command execution waiting for the given events to have occurred. */
#define MI_WAIT_FOR_EVENT (CMD_MI | (0x3 << 23))
#define MI_WAIT_FOR_PLANE_B_FLIP (1<<6)
diff --git a/src/mesa/drivers/dri/intel/intel_regions.c b/src/mesa/drivers/dri/intel/intel_regions.c
index e87e29462c3..a4da1ce4fa5 100644
--- a/src/mesa/drivers/dri/intel/intel_regions.c
+++ b/src/mesa/drivers/dri/intel/intel_regions.c
@@ -149,11 +149,6 @@ intel_region_alloc_internal(struct intel_screen *screen,
{
struct intel_region *region;
- if (buffer == NULL) {
- _DBG("%s <-- NULL\n", __FUNCTION__);
- return NULL;
- }
-
region = calloc(sizeof(*region), 1);
if (region == NULL)
return region;
@@ -180,6 +175,7 @@ intel_region_alloc(struct intel_screen *screen,
drm_intel_bo *buffer;
unsigned long flags = 0;
unsigned long aligned_pitch;
+ struct intel_region *region;
if (expect_accelerated_upload)
flags |= BO_ALLOC_FOR_RENDER;
@@ -187,9 +183,17 @@ intel_region_alloc(struct intel_screen *screen,
buffer = drm_intel_bo_alloc_tiled(screen->bufmgr, "region",
width, height, cpp,
&tiling, &aligned_pitch, flags);
+ if (buffer == NULL)
+ return NULL;
- return intel_region_alloc_internal(screen, cpp, width, height,
- aligned_pitch / cpp, tiling, buffer);
+ region = intel_region_alloc_internal(screen, cpp, width, height,
+ aligned_pitch / cpp, tiling, buffer);
+ if (region == NULL) {
+ drm_intel_bo_unreference(buffer);
+ return NULL;
+ }
+
+ return region;
}
GLboolean
@@ -491,7 +495,7 @@ intel_region_cow(struct intel_context *intel, struct intel_region *region)
assert(region->cpp * region->pitch * region->height == pbo->Base.Size);
- _DBG("%s %p (%d bytes)\n", __FUNCTION__, region, pbo->Base.Size);
+ _DBG("%s %p (%d bytes)\n", __FUNCTION__, region, (int)pbo->Base.Size);
/* Now blit from the texture buffer to the new buffer:
*/
diff --git a/src/mesa/drivers/dri/intel/intel_screen.c b/src/mesa/drivers/dri/intel/intel_screen.c
index e5b6c9f0e4a..c8cff0147ea 100644
--- a/src/mesa/drivers/dri/intel/intel_screen.c
+++ b/src/mesa/drivers/dri/intel/intel_screen.c
@@ -25,29 +25,18 @@
*
**************************************************************************/
+#include <errno.h>
#include "main/glheader.h"
#include "main/context.h"
#include "main/framebuffer.h"
#include "main/renderbuffer.h"
#include "main/hash.h"
#include "main/fbobject.h"
+#include "main/mfeatures.h"
#include "utils.h"
#include "xmlpool.h"
-#include "intel_batchbuffer.h"
-#include "intel_buffers.h"
-#include "intel_bufmgr.h"
-#include "intel_chipset.h"
-#include "intel_fbo.h"
-#include "intel_screen.h"
-#include "intel_tex.h"
-#include "intel_regions.h"
-
-#include "i915_drm.h"
-
-#define DRI_CONF_TEXTURE_TILING(def) \
-
PUBLIC const char __driConfigOptions[] =
DRI_CONF_BEGIN
DRI_CONF_SECTION_PERFORMANCE
@@ -92,6 +81,17 @@ DRI_CONF_END;
const GLuint __driNConfigOptions = 11;
+#include "intel_batchbuffer.h"
+#include "intel_buffers.h"
+#include "intel_bufmgr.h"
+#include "intel_chipset.h"
+#include "intel_fbo.h"
+#include "intel_screen.h"
+#include "intel_tex.h"
+#include "intel_regions.h"
+
+#include "i915_drm.h"
+
#ifdef USE_NEW_INTERFACE
static PFNGLXCREATECONTEXTMODES create_context_modes = NULL;
#endif /*USE_NEW_INTERFACE */
@@ -105,15 +105,16 @@ static const __DRItexBufferExtension intelTexBufferExtension = {
static void
intelDRI2Flush(__DRIdrawable *drawable)
{
- struct intel_context *intel = drawable->driContextPriv->driverPrivate;
+ GET_CURRENT_CONTEXT(ctx);
+ struct intel_context *intel = intel_context(ctx);
if (intel->gen < 4)
INTEL_FIREVERTICES(intel);
intel->need_throttle = GL_TRUE;
- if (intel->batch->map != intel->batch->ptr)
- intel_batchbuffer_flush(intel->batch);
+ if (intel->batch.used)
+ intel_batchbuffer_flush(intel);
}
static const struct __DRI2flushExtensionRec intelFlushExtension = {
@@ -312,13 +313,21 @@ intel_get_param(__DRIscreen *psp, int param, int *value)
ret = drmCommandWriteRead(psp->fd, DRM_I915_GETPARAM, &gp, sizeof(gp));
if (ret) {
- _mesa_warning(NULL, "drm_i915_getparam: %d", ret);
+ if (ret != -EINVAL)
+ _mesa_warning(NULL, "drm_i915_getparam: %d", ret);
return GL_FALSE;
}
return GL_TRUE;
}
+static GLboolean
+intel_get_boolean(__DRIscreen *psp, int param)
+{
+ int value = 0;
+ return intel_get_param(psp, param, &value) && value;
+}
+
static void
nop_callback(GLuint key, void *data, void *userData)
{
@@ -492,6 +501,10 @@ intel_init_bufmgr(struct intel_screen *intelScreen)
intelScreen->named_regions = _mesa_NewHashTable();
+ intelScreen->relaxed_relocations = 0;
+ intelScreen->relaxed_relocations |=
+ intel_get_boolean(spriv, I915_PARAM_HAS_RELAXED_DELTA) << 0;
+
return GL_TRUE;
}
@@ -645,6 +658,51 @@ __DRIconfig **intelInitScreen2(__DRIscreen *psp)
return (const __DRIconfig **)configs;
}
+struct intel_buffer {
+ __DRIbuffer base;
+ struct intel_region *region;
+};
+
+static __DRIbuffer *
+intelAllocateBuffer(__DRIscreen *screen,
+ unsigned attachment, unsigned format,
+ int width, int height)
+{
+ struct intel_buffer *intelBuffer;
+ struct intel_screen *intelScreen = screen->private;
+
+ intelBuffer = CALLOC(sizeof *intelBuffer);
+ if (intelBuffer == NULL)
+ return NULL;
+
+ intelBuffer->region = intel_region_alloc(intelScreen, I915_TILING_NONE,
+ format / 8, width, height, GL_TRUE);
+
+ if (intelBuffer->region == NULL) {
+ FREE(intelBuffer);
+ return NULL;
+ }
+
+ intel_region_flink(intelBuffer->region, &intelBuffer->base.name);
+
+ intelBuffer->base.attachment = attachment;
+ intelBuffer->base.cpp = intelBuffer->region->cpp;
+ intelBuffer->base.pitch =
+ intelBuffer->region->pitch * intelBuffer->region->cpp;
+
+ return &intelBuffer->base;
+}
+
+static void
+intelReleaseBuffer(__DRIscreen *screen, __DRIbuffer *buffer)
+{
+ struct intel_buffer *intelBuffer = (struct intel_buffer *) buffer;
+
+ intel_region_release(&intelBuffer->region);
+ free(intelBuffer);
+}
+
+
const struct __DriverAPIRec driDriverAPI = {
.DestroyScreen = intelDestroyScreen,
.CreateContext = intelCreateContext,
@@ -654,6 +712,8 @@ const struct __DriverAPIRec driDriverAPI = {
.MakeCurrent = intelMakeCurrent,
.UnbindContext = intelUnbindContext,
.InitScreen2 = intelInitScreen2,
+ .AllocateBuffer = intelAllocateBuffer,
+ .ReleaseBuffer = intelReleaseBuffer
};
/* This is the table of extensions that the loader will dlsym() for. */
diff --git a/src/mesa/drivers/dri/intel/intel_screen.h b/src/mesa/drivers/dri/intel/intel_screen.h
index 5863093f001..0f0b5be56dc 100644
--- a/src/mesa/drivers/dri/intel/intel_screen.h
+++ b/src/mesa/drivers/dri/intel/intel_screen.h
@@ -43,6 +43,7 @@ struct intel_screen
__DRIscreen *driScrnPriv;
GLboolean no_hw;
+ GLuint relaxed_relocations;
GLboolean no_vbo;
dri_bufmgr *bufmgr;
diff --git a/src/mesa/drivers/dri/intel/intel_span.c b/src/mesa/drivers/dri/intel/intel_span.c
index 104cadf0f9e..1f41518535c 100644
--- a/src/mesa/drivers/dri/intel/intel_span.c
+++ b/src/mesa/drivers/dri/intel/intel_span.c
@@ -25,6 +25,7 @@
*
**************************************************************************/
+#include <stdbool.h>
#include "main/glheader.h"
#include "main/macros.h"
#include "main/mtypes.h"
@@ -113,6 +114,26 @@ intel_set_span_functions(struct intel_context *intel,
#define TAG2(x,y) intel_##x##y##_A8
#include "spantmp2.h"
+#define SPANTMP_MESA_FMT MESA_FORMAT_R8
+#define TAG(x) intel_##x##_R8
+#define TAG2(x,y) intel_##x##y##_R8
+#include "spantmp2.h"
+
+#define SPANTMP_MESA_FMT MESA_FORMAT_RG88
+#define TAG(x) intel_##x##_RG88
+#define TAG2(x,y) intel_##x##y##_RG88
+#include "spantmp2.h"
+
+#define SPANTMP_MESA_FMT MESA_FORMAT_R16
+#define TAG(x) intel_##x##_R16
+#define TAG2(x,y) intel_##x##y##_R16
+#include "spantmp2.h"
+
+#define SPANTMP_MESA_FMT MESA_FORMAT_RG1616
+#define TAG(x) intel_##x##_RG1616
+#define TAG2(x,y) intel_##x##y##_RG1616
+#include "spantmp2.h"
+
#define LOCAL_DEPTH_VARS \
struct intel_renderbuffer *irb = intel_renderbuffer(rb); \
const GLint yScale = rb->Name ? 1 : -1; \
@@ -339,6 +360,32 @@ intel_unmap_vertex_shader_textures(struct gl_context *ctx)
}
}
+typedef void (*span_init_func)(struct gl_renderbuffer *rb);
+
+static span_init_func intel_span_init_funcs[MESA_FORMAT_COUNT] =
+{
+ [MESA_FORMAT_A8] = intel_InitPointers_A8,
+ [MESA_FORMAT_RGB565] = intel_InitPointers_RGB565,
+ [MESA_FORMAT_ARGB4444] = intel_InitPointers_ARGB4444,
+ [MESA_FORMAT_ARGB1555] = intel_InitPointers_ARGB1555,
+ [MESA_FORMAT_XRGB8888] = intel_InitPointers_xRGB8888,
+ [MESA_FORMAT_ARGB8888] = intel_InitPointers_ARGB8888,
+ [MESA_FORMAT_SARGB8] = intel_InitPointers_ARGB8888,
+ [MESA_FORMAT_Z16] = intel_InitDepthPointers_z16,
+ [MESA_FORMAT_X8_Z24] = intel_InitDepthPointers_z24_s8,
+ [MESA_FORMAT_S8_Z24] = intel_InitDepthPointers_z24_s8,
+ [MESA_FORMAT_R8] = intel_InitPointers_R8,
+ [MESA_FORMAT_RG88] = intel_InitPointers_RG88,
+ [MESA_FORMAT_R16] = intel_InitPointers_R16,
+ [MESA_FORMAT_RG1616] = intel_InitPointers_RG1616,
+};
+
+bool
+intel_span_supports_format(gl_format format)
+{
+ return intel_span_init_funcs[format] != NULL;
+}
+
/**
* Plug in appropriate span read/write functions for the given renderbuffer.
* These are used for the software fallbacks.
@@ -349,37 +396,6 @@ intel_set_span_functions(struct intel_context *intel,
{
struct intel_renderbuffer *irb = (struct intel_renderbuffer *) rb;
- switch (irb->Base.Format) {
- case MESA_FORMAT_A8:
- intel_InitPointers_A8(rb);
- break;
- case MESA_FORMAT_RGB565:
- intel_InitPointers_RGB565(rb);
- break;
- case MESA_FORMAT_ARGB4444:
- intel_InitPointers_ARGB4444(rb);
- break;
- case MESA_FORMAT_ARGB1555:
- intel_InitPointers_ARGB1555(rb);
- break;
- case MESA_FORMAT_XRGB8888:
- intel_InitPointers_xRGB8888(rb);
- break;
- case MESA_FORMAT_ARGB8888:
- case MESA_FORMAT_SARGB8:
- intel_InitPointers_ARGB8888(rb);
- break;
- case MESA_FORMAT_Z16:
- intel_InitDepthPointers_z16(rb);
- break;
- case MESA_FORMAT_X8_Z24:
- case MESA_FORMAT_S8_Z24:
- intel_InitDepthPointers_z24_s8(rb);
- break;
- default:
- _mesa_problem(NULL,
- "Unexpected MesaFormat %d in intelSetSpanFunctions",
- irb->Base.Format);
- break;
- }
+ assert(intel_span_init_funcs[irb->Base.Format]);
+ intel_span_init_funcs[irb->Base.Format](rb);
}
diff --git a/src/mesa/drivers/dri/intel/intel_span.h b/src/mesa/drivers/dri/intel/intel_span.h
index aa8d08e843a..5a4c4e8e52a 100644
--- a/src/mesa/drivers/dri/intel/intel_span.h
+++ b/src/mesa/drivers/dri/intel/intel_span.h
@@ -28,6 +28,9 @@
#ifndef _INTEL_SPAN_H
#define _INTEL_SPAN_H
+#include "main/formats.h"
+#include <stdbool.h>
+
extern void intelInitSpanFuncs(struct gl_context * ctx);
extern void intelSpanRenderFinish(struct gl_context * ctx);
@@ -38,5 +41,6 @@ void intel_renderbuffer_unmap(struct intel_context *intel,
struct gl_renderbuffer *rb);
void intel_map_vertex_shader_textures(struct gl_context *ctx);
void intel_unmap_vertex_shader_textures(struct gl_context *ctx);
+bool intel_span_supports_format(gl_format format);
#endif
diff --git a/src/mesa/drivers/dri/intel/intel_syncobj.c b/src/mesa/drivers/dri/intel/intel_syncobj.c
index bbfac74b605..b303ea84dd8 100644
--- a/src/mesa/drivers/dri/intel/intel_syncobj.c
+++ b/src/mesa/drivers/dri/intel/intel_syncobj.c
@@ -72,9 +72,9 @@ intel_fence_sync(struct gl_context *ctx, struct gl_sync_object *s,
struct intel_sync_object *sync = (struct intel_sync_object *)s;
assert(condition == GL_SYNC_GPU_COMMANDS_COMPLETE);
- intel_batchbuffer_emit_mi_flush(intel->batch);
+ intel_batchbuffer_emit_mi_flush(intel);
- sync->bo = intel->batch->buf;
+ sync->bo = intel->batch.bo;
drm_intel_bo_reference(sync->bo);
intel_flush(ctx);
diff --git a/src/mesa/drivers/dri/intel/intel_tex.c b/src/mesa/drivers/dri/intel/intel_tex.c
index 646e55bdff9..077c6119017 100644
--- a/src/mesa/drivers/dri/intel/intel_tex.c
+++ b/src/mesa/drivers/dri/intel/intel_tex.c
@@ -113,7 +113,6 @@ intelGenerateMipmap(struct gl_context *ctx, GLenum target,
void
intelInitTextureFuncs(struct dd_function_table *functions)
{
- functions->ChooseTextureFormat = intelChooseTextureFormat;
functions->GenerateMipmap = intelGenerateMipmap;
functions->NewTextureObject = intelNewTextureObject;
diff --git a/src/mesa/drivers/dri/intel/intel_tex.h b/src/mesa/drivers/dri/intel/intel_tex.h
index 7906554e453..52462f39d54 100644
--- a/src/mesa/drivers/dri/intel/intel_tex.h
+++ b/src/mesa/drivers/dri/intel/intel_tex.h
@@ -40,8 +40,7 @@ void intelInitTextureSubImageFuncs(struct dd_function_table *functions);
void intelInitTextureCopyImageFuncs(struct dd_function_table *functions);
-gl_format intelChooseTextureFormat(struct gl_context *ctx, GLint internalFormat,
- GLenum format, GLenum type);
+GLenum intel_mesa_format_to_rb_datatype(gl_format format);
void intelSetTexBuffer(__DRIcontext *pDRICtx,
GLint target, __DRIdrawable *pDraw);
@@ -66,4 +65,12 @@ void intel_tex_unmap_images(struct intel_context *intel,
int intel_compressed_num_bytes(GLuint mesaFormat);
+GLboolean intel_copy_texsubimage(struct intel_context *intel,
+ GLenum target,
+ struct intel_texture_image *intelImage,
+ GLenum internalFormat,
+ GLint dstx, GLint dsty,
+ GLint x, GLint y,
+ GLsizei width, GLsizei height);
+
#endif
diff --git a/src/mesa/drivers/dri/intel/intel_tex_copy.c b/src/mesa/drivers/dri/intel/intel_tex_copy.c
index 87b31bf078c..62d4169acd1 100644
--- a/src/mesa/drivers/dri/intel/intel_tex_copy.c
+++ b/src/mesa/drivers/dri/intel/intel_tex_copy.c
@@ -35,7 +35,6 @@
#include "intel_screen.h"
#include "intel_context.h"
-#include "intel_buffers.h"
#include "intel_mipmap_tree.h"
#include "intel_regions.h"
#include "intel_fbo.h"
@@ -50,74 +49,70 @@
* Do the best we can using the blitter. A future project is to use
* the texture engine and fragment programs for these copies.
*/
-static const struct intel_region *
-get_teximage_source(struct intel_context *intel, GLenum internalFormat)
+static struct intel_renderbuffer *
+get_teximage_readbuffer(struct intel_context *intel, GLenum internalFormat)
{
- struct intel_renderbuffer *irb;
-
DBG("%s %s\n", __FUNCTION__,
_mesa_lookup_enum_by_nr(internalFormat));
switch (internalFormat) {
case GL_DEPTH_COMPONENT:
case GL_DEPTH_COMPONENT16:
- irb = intel_get_renderbuffer(intel->ctx.ReadBuffer, BUFFER_DEPTH);
- if (irb && irb->region && irb->region->cpp == 2)
- return irb->region;
- return NULL;
case GL_DEPTH24_STENCIL8_EXT:
case GL_DEPTH_STENCIL_EXT:
- irb = intel_get_renderbuffer(intel->ctx.ReadBuffer, BUFFER_DEPTH);
- if (irb && irb->region && irb->region->cpp == 4)
- return irb->region;
- return NULL;
- case 4:
- case GL_RGBA:
- case GL_RGBA8:
- irb = intel_renderbuffer(intel->ctx.ReadBuffer->_ColorReadBuffer);
- /* We're required to set alpha to 1.0 in this case, but we can't
- * do that with the blitter, so fall back. We could use the 3D
- * engine or do two passes with the blitter, but it doesn't seem
- * worth it for this case. */
- if (irb->Base._BaseFormat == GL_RGB)
- return NULL;
- return irb->region;
- case 3:
- case GL_RGB:
- case GL_RGB8:
- return intel_readbuf_region(intel);
+ return intel_get_renderbuffer(intel->ctx.ReadBuffer, BUFFER_DEPTH);
default:
- return NULL;
+ return intel_renderbuffer(intel->ctx.ReadBuffer->_ColorReadBuffer);
}
}
-static GLboolean
-do_copy_texsubimage(struct intel_context *intel,
- GLenum target,
- struct intel_texture_image *intelImage,
- GLenum internalFormat,
- GLint dstx, GLint dsty,
- GLint x, GLint y, GLsizei width, GLsizei height)
+GLboolean
+intel_copy_texsubimage(struct intel_context *intel,
+ GLenum target,
+ struct intel_texture_image *intelImage,
+ GLenum internalFormat,
+ GLint dstx, GLint dsty,
+ GLint x, GLint y, GLsizei width, GLsizei height)
{
struct gl_context *ctx = &intel->ctx;
- const struct intel_region *src = get_teximage_source(intel, internalFormat);
+ struct intel_renderbuffer *irb;
+ bool copy_supported = false;
+ bool copy_supported_with_alpha_override = false;
+
+ intel_prepare_render(intel);
- if (!intelImage->mt || !src || !src->buffer) {
+ irb = get_teximage_readbuffer(intel, internalFormat);
+ if (!intelImage->mt || !irb || !irb->region) {
if (unlikely(INTEL_DEBUG & DEBUG_FALLBACKS))
fprintf(stderr, "%s fail %p %p (0x%08x)\n",
- __FUNCTION__, intelImage->mt, src, internalFormat);
+ __FUNCTION__, intelImage->mt, irb, internalFormat);
return GL_FALSE;
}
- if (intelImage->mt->cpp != src->cpp) {
- fallback_debug("%s fail %d vs %d cpp\n",
- __FUNCTION__, intelImage->mt->cpp, src->cpp);
+ copy_supported = intelImage->base.TexFormat == irb->Base.Format;
+
+ /* Converting ARGB8888 to XRGB8888 is trivial: ignore the alpha bits */
+ if (irb->Base.Format == MESA_FORMAT_ARGB8888 &&
+ intelImage->base.TexFormat == MESA_FORMAT_XRGB8888) {
+ copy_supported = true;
+ }
+
+ /* Converting XRGB8888 to ARGB8888 requires setting the alpha bits to 1.0 */
+ if (irb->Base.Format == MESA_FORMAT_XRGB8888 &&
+ intelImage->base.TexFormat == MESA_FORMAT_ARGB8888) {
+ copy_supported_with_alpha_override = true;
+ }
+
+ if (!copy_supported && !copy_supported_with_alpha_override) {
+ if (unlikely(INTEL_DEBUG & DEBUG_FALLBACKS))
+ fprintf(stderr, "%s mismatched formats %s, %s\n",
+ __FUNCTION__,
+ _mesa_get_format_name(intelImage->base.TexFormat),
+ _mesa_get_format_name(irb->Base.Format));
return GL_FALSE;
}
- /* intel_flush(ctx); */
- intel_prepare_render(intel);
{
drm_intel_bo *dst_bo = intel_region_buffer(intel,
intelImage->mt->region,
@@ -140,24 +135,24 @@ do_copy_texsubimage(struct intel_context *intel,
if (ctx->ReadBuffer->Name == 0) {
/* Flip vertical orientation for system framebuffers */
y = ctx->ReadBuffer->Height - (y + height);
- src_pitch = -src->pitch;
+ src_pitch = -irb->region->pitch;
} else {
/* reading from a FBO, y is already oriented the way we like */
- src_pitch = src->pitch;
+ src_pitch = irb->region->pitch;
}
/* blit from src buffer to texture */
if (!intelEmitCopyBlit(intel,
intelImage->mt->cpp,
src_pitch,
- src->buffer,
+ irb->region->buffer,
0,
- src->tiling,
+ irb->region->tiling,
intelImage->mt->region->pitch,
dst_bo,
0,
intelImage->mt->region->tiling,
- src->draw_x + x, src->draw_y + y,
+ irb->region->draw_x + x, irb->region->draw_y + y,
image_x + dstx, image_y + dsty,
width, height,
GL_COPY)) {
@@ -165,6 +160,9 @@ do_copy_texsubimage(struct intel_context *intel,
}
}
+ if (copy_supported_with_alpha_override)
+ intel_set_teximage_alpha_to_one(ctx, intelImage);
+
return GL_TRUE;
}
@@ -202,9 +200,9 @@ intelCopyTexImage1D(struct gl_context * ctx, GLenum target, GLint level,
&width, &height))
return;
- if (!do_copy_texsubimage(intel_context(ctx), target,
- intel_texture_image(texImage),
- internalFormat, 0, 0, x, y, width, height))
+ if (!intel_copy_texsubimage(intel_context(ctx), target,
+ intel_texture_image(texImage),
+ internalFormat, 0, 0, x, y, width, height))
goto fail;
return;
@@ -250,9 +248,9 @@ intelCopyTexImage2D(struct gl_context * ctx, GLenum target, GLint level,
&width, &height))
return;
- if (!do_copy_texsubimage(intel_context(ctx), target,
- intel_texture_image(texImage),
- internalFormat, 0, 0, x, y, width, height))
+ if (!intel_copy_texsubimage(intel_context(ctx), target,
+ intel_texture_image(texImage),
+ internalFormat, 0, 0, x, y, width, height))
goto fail;
return;
@@ -280,9 +278,9 @@ intelCopyTexSubImage1D(struct gl_context * ctx, GLenum target, GLint level,
/* Need to check texture is compatible with source format.
*/
- if (!do_copy_texsubimage(intel_context(ctx), target,
- intel_texture_image(texImage),
- internalFormat, xoffset, 0, x, y, width, 1)) {
+ if (!intel_copy_texsubimage(intel_context(ctx), target,
+ intel_texture_image(texImage),
+ internalFormat, xoffset, 0, x, y, width, 1)) {
fallback_debug("%s - fallback to swrast\n", __FUNCTION__);
_mesa_meta_CopyTexSubImage1D(ctx, target, level, xoffset, x, y, width);
}
@@ -304,11 +302,10 @@ intelCopyTexSubImage2D(struct gl_context * ctx, GLenum target, GLint level,
/* Need to check texture is compatible with source format.
*/
- if (!do_copy_texsubimage(intel_context(ctx), target,
- intel_texture_image(texImage),
- internalFormat,
- xoffset, yoffset, x, y, width, height)) {
-
+ if (!intel_copy_texsubimage(intel_context(ctx), target,
+ intel_texture_image(texImage),
+ internalFormat,
+ xoffset, yoffset, x, y, width, height)) {
fallback_debug("%s - fallback to swrast\n", __FUNCTION__);
_mesa_meta_CopyTexSubImage2D(ctx, target, level,
xoffset, yoffset, x, y, width, height);
diff --git a/src/mesa/drivers/dri/intel/intel_tex_format.c b/src/mesa/drivers/dri/intel/intel_tex_format.c
index 9d73a2fb375..87745bc66d4 100644
--- a/src/mesa/drivers/dri/intel/intel_tex_format.c
+++ b/src/mesa/drivers/dri/intel/intel_tex_format.c
@@ -4,224 +4,35 @@
#include "main/formats.h"
/**
- * Choose hardware texture format given the user's glTexImage parameters.
- *
- * It works out that this function is fine for all the supported
- * hardware. However, there is still a need to map the formats onto
- * hardware descriptors.
- *
- * Note that the i915 can actually support many more formats than
- * these if we take the step of simply swizzling the colors
- * immediately after sampling...
+ * Returns the renderbuffer DataType for a MESA_FORMAT.
*/
-gl_format
-intelChooseTextureFormat(struct gl_context * ctx, GLint internalFormat,
- GLenum format, GLenum type)
+GLenum
+intel_mesa_format_to_rb_datatype(gl_format format)
{
- struct intel_context *intel = intel_context(ctx);
-
-#if 0
- printf("%s intFmt=0x%x format=0x%x type=0x%x\n",
- __FUNCTION__, internalFormat, format, type);
-#endif
-
- switch (internalFormat) {
- case 4:
- case GL_RGBA:
- case GL_COMPRESSED_RGBA:
- if (type == GL_UNSIGNED_SHORT_4_4_4_4_REV)
- return MESA_FORMAT_ARGB4444;
- else if (type == GL_UNSIGNED_SHORT_1_5_5_5_REV)
- return MESA_FORMAT_ARGB1555;
- else
- return MESA_FORMAT_ARGB8888;
-
- case 3:
- case GL_RGB:
- case GL_COMPRESSED_RGB:
- if (type == GL_UNSIGNED_SHORT_5_6_5)
- return MESA_FORMAT_RGB565;
- else if (intel->has_xrgb_textures)
- return MESA_FORMAT_XRGB8888;
- else
- return MESA_FORMAT_ARGB8888;
-
- case GL_RGBA8:
- case GL_RGB10_A2:
- case GL_RGBA12:
- case GL_RGBA16:
- return MESA_FORMAT_ARGB8888;
-
- case GL_RGBA4:
- case GL_RGBA2:
- return MESA_FORMAT_ARGB4444;
-
- case GL_RGB5_A1:
- return MESA_FORMAT_ARGB1555;
-
- case GL_RGB8:
- case GL_RGB10:
- case GL_RGB12:
- case GL_RGB16:
- if (intel->has_xrgb_textures)
- return MESA_FORMAT_XRGB8888;
- else
- return MESA_FORMAT_ARGB8888;
-
- case GL_RGB5:
- case GL_RGB4:
- case GL_R3_G3_B2:
- return MESA_FORMAT_RGB565;
-
- case GL_ALPHA:
- case GL_ALPHA4:
- case GL_ALPHA8:
- case GL_ALPHA12:
- case GL_ALPHA16:
- case GL_COMPRESSED_ALPHA:
- return MESA_FORMAT_A8;
-
- case 1:
- case GL_LUMINANCE:
- case GL_LUMINANCE4:
- case GL_LUMINANCE8:
- case GL_LUMINANCE12:
- case GL_LUMINANCE16:
- case GL_COMPRESSED_LUMINANCE:
- return MESA_FORMAT_L8;
-
- case GL_LUMINANCE12_ALPHA4:
- case GL_LUMINANCE12_ALPHA12:
- case GL_LUMINANCE16_ALPHA16:
- /* i915 could implement this mode using MT_32BIT_RG1616. However, this
- * would require an extra swizzle instruction in the fragment shader to
- * convert the { R, G, 1.0, 1.0 } to { R, R, R, G }.
- */
-#ifndef I915
- return MESA_FORMAT_AL1616;
-#else
- /* FALLTHROUGH */
-#endif
-
- case 2:
- case GL_LUMINANCE_ALPHA:
- case GL_LUMINANCE4_ALPHA4:
- case GL_LUMINANCE6_ALPHA2:
- case GL_LUMINANCE8_ALPHA8:
- case GL_COMPRESSED_LUMINANCE_ALPHA:
- return MESA_FORMAT_AL88;
-
- case GL_INTENSITY:
- case GL_INTENSITY4:
- case GL_INTENSITY8:
- case GL_INTENSITY12:
- case GL_INTENSITY16:
- case GL_COMPRESSED_INTENSITY:
- return MESA_FORMAT_I8;
-
- case GL_YCBCR_MESA:
- if (type == GL_UNSIGNED_SHORT_8_8_MESA || type == GL_UNSIGNED_BYTE)
- return MESA_FORMAT_YCBCR;
- else
- return MESA_FORMAT_YCBCR_REV;
-
- case GL_COMPRESSED_RGB_FXT1_3DFX:
- return MESA_FORMAT_RGB_FXT1;
- case GL_COMPRESSED_RGBA_FXT1_3DFX:
- return MESA_FORMAT_RGBA_FXT1;
-
- case GL_RGB_S3TC:
- case GL_RGB4_S3TC:
- case GL_COMPRESSED_RGB_S3TC_DXT1_EXT:
- return MESA_FORMAT_RGB_DXT1;
-
- case GL_COMPRESSED_RGBA_S3TC_DXT1_EXT:
- return MESA_FORMAT_RGBA_DXT1;
-
- case GL_RGBA_S3TC:
- case GL_RGBA4_S3TC:
- case GL_COMPRESSED_RGBA_S3TC_DXT3_EXT:
- return MESA_FORMAT_RGBA_DXT3;
-
- case GL_COMPRESSED_RGBA_S3TC_DXT5_EXT:
- return MESA_FORMAT_RGBA_DXT5;
-
- case GL_DEPTH_COMPONENT:
- case GL_DEPTH_COMPONENT16:
- case GL_DEPTH_COMPONENT24:
- case GL_DEPTH_COMPONENT32:
-#if 0
- return MESA_FORMAT_Z16;
-#else
- /* fall-through.
- * 16bpp depth texture can't be paired with a stencil buffer so
- * always used combined depth/stencil format.
- */
-#endif
- case GL_DEPTH_STENCIL_EXT:
- case GL_DEPTH24_STENCIL8_EXT:
- return MESA_FORMAT_S8_Z24;
-
-#ifndef I915
- case GL_SRGB_EXT:
- case GL_SRGB8_EXT:
- case GL_SRGB_ALPHA_EXT:
- case GL_SRGB8_ALPHA8_EXT:
- case GL_COMPRESSED_SRGB_EXT:
- case GL_COMPRESSED_SRGB_ALPHA_EXT:
- case GL_COMPRESSED_SLUMINANCE_EXT:
- case GL_COMPRESSED_SLUMINANCE_ALPHA_EXT:
- return MESA_FORMAT_SARGB8;
- case GL_SLUMINANCE_EXT:
- case GL_SLUMINANCE8_EXT:
- 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 (intel->has_luminance_srgb)
- return MESA_FORMAT_SLA8;
- else
- return MESA_FORMAT_SARGB8;
- case GL_COMPRESSED_SRGB_S3TC_DXT1_EXT:
- case GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT:
- case GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT:
- case GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT:
- return MESA_FORMAT_SRGB_DXT1;
-
- /* i915 could also do this */
- case GL_DUDV_ATI:
- case GL_DU8DV8_ATI:
- return MESA_FORMAT_DUDV8;
- case GL_RGBA_SNORM:
- case GL_RGBA8_SNORM:
- return MESA_FORMAT_SIGNED_RGBA8888_REV;
-
- /* i915 can do a RG16, but it can't do any of the other RED or RG formats.
- * In addition, it only implements the broken D3D mode where undefined
- * components are read as 1.0. I'm not sure who thought reading
- * { R, G, 1.0, 1.0 } from a red-green texture would be useful.
- */
- case GL_RED:
- case GL_R8:
- return MESA_FORMAT_R8;
- case GL_R16:
- return MESA_FORMAT_R16;
- case GL_RG:
- case GL_RG8:
- return MESA_FORMAT_RG88;
- case GL_RG16:
- return MESA_FORMAT_RG1616;
-#endif
-
+ switch (format) {
+ case MESA_FORMAT_ARGB8888:
+ case MESA_FORMAT_XRGB8888:
+ case MESA_FORMAT_SARGB8:
+ case MESA_FORMAT_R8:
+ case MESA_FORMAT_RG88:
+ case MESA_FORMAT_A8:
+ case MESA_FORMAT_AL88:
+ case MESA_FORMAT_RGB565:
+ case MESA_FORMAT_ARGB1555:
+ case MESA_FORMAT_ARGB4444:
+ return GL_UNSIGNED_BYTE;
+ case MESA_FORMAT_R16:
+ case MESA_FORMAT_RG1616:
+ case MESA_FORMAT_Z16:
+ return GL_UNSIGNED_SHORT;
+ case MESA_FORMAT_X8_Z24:
+ return GL_UNSIGNED_INT;
+ case MESA_FORMAT_S8_Z24:
+ return GL_UNSIGNED_INT_24_8_EXT;
default:
- fprintf(stderr, "unexpected texture format %s in %s\n",
- _mesa_lookup_enum_by_nr(internalFormat), __FUNCTION__);
- return MESA_FORMAT_NONE;
+ _mesa_problem(NULL, "unexpected MESA_FORMAT for renderbuffer");
+ return GL_UNSIGNED_BYTE;
}
-
- return MESA_FORMAT_NONE; /* never get here */
}
int intel_compressed_num_bytes(GLuint mesaFormat)
diff --git a/src/mesa/drivers/dri/intel/intel_tex_image.c b/src/mesa/drivers/dri/intel/intel_tex_image.c
index 41cdbfd2cbd..906f8a62710 100644
--- a/src/mesa/drivers/dri/intel/intel_tex_image.c
+++ b/src/mesa/drivers/dri/intel/intel_tex_image.c
@@ -1,11 +1,13 @@
#include "main/glheader.h"
#include "main/macros.h"
+#include "main/mfeatures.h"
#include "main/mtypes.h"
#include "main/enums.h"
#include "main/bufferobj.h"
#include "main/context.h"
#include "main/formats.h"
+#include "main/pbo.h"
#include "main/texcompress.h"
#include "main/texstore.h"
#include "main/texgetimage.h"
@@ -55,11 +57,11 @@ logbase2(int n)
* 0)..(1x1). Consider pruning this tree at a validation if the
* saving is worth it.
*/
-static void
-guess_and_alloc_mipmap_tree(struct intel_context *intel,
- struct intel_texture_object *intelObj,
- struct intel_texture_image *intelImage,
- GLboolean expect_accelerated_upload)
+static struct intel_mipmap_tree *
+intel_miptree_create_for_teximage(struct intel_context *intel,
+ struct intel_texture_object *intelObj,
+ struct intel_texture_image *intelImage,
+ GLboolean expect_accelerated_upload)
{
GLuint firstLevel;
GLuint lastLevel;
@@ -72,70 +74,71 @@ guess_and_alloc_mipmap_tree(struct intel_context *intel,
DBG("%s\n", __FUNCTION__);
if (intelImage->base.Border)
- return;
+ return NULL;
if (intelImage->level > intelObj->base.BaseLevel &&
(intelImage->base.Width == 1 ||
(intelObj->base.Target != GL_TEXTURE_1D &&
intelImage->base.Height == 1) ||
(intelObj->base.Target == GL_TEXTURE_3D &&
- intelImage->base.Depth == 1)))
- return;
-
- /* If this image disrespects BaseLevel, allocate from level zero.
- * Usually BaseLevel == 0, so it's unlikely to happen.
- */
- if (intelImage->level < intelObj->base.BaseLevel)
- firstLevel = 0;
- else
- firstLevel = intelObj->base.BaseLevel;
-
-
- /* Figure out image dimensions at start level.
- */
- for (i = intelImage->level; i > firstLevel; i--) {
- width <<= 1;
- if (height != 1)
- height <<= 1;
- if (depth != 1)
- depth <<= 1;
- }
+ intelImage->base.Depth == 1))) {
+ /* For this combination, we're at some lower mipmap level and
+ * some important dimension is 1. We can't extrapolate up to a
+ * likely base level width/height/depth for a full mipmap stack
+ * from this info, so just allocate this one level.
+ */
+ firstLevel = intelImage->level;
+ lastLevel = intelImage->level;
+ } else {
+ /* If this image disrespects BaseLevel, allocate from level zero.
+ * Usually BaseLevel == 0, so it's unlikely to happen.
+ */
+ if (intelImage->level < intelObj->base.BaseLevel)
+ firstLevel = 0;
+ else
+ firstLevel = intelObj->base.BaseLevel;
+
+ /* Figure out image dimensions at start level. */
+ for (i = intelImage->level; i > firstLevel; i--) {
+ width <<= 1;
+ if (height != 1)
+ height <<= 1;
+ if (depth != 1)
+ depth <<= 1;
+ }
- /* Guess a reasonable value for lastLevel. This is probably going
- * to be wrong fairly often and might mean that we have to look at
- * resizable buffers, or require that buffers implement lazy
- * pagetable arrangements.
- */
- if ((intelObj->base.MinFilter == GL_NEAREST ||
- intelObj->base.MinFilter == GL_LINEAR) &&
- intelImage->level == firstLevel &&
- (intel->gen < 4 || firstLevel == 0)) {
- lastLevel = firstLevel;
- }
- else {
- lastLevel = firstLevel + logbase2(MAX2(MAX2(width, height), depth));
+ /* Guess a reasonable value for lastLevel. This is probably going
+ * to be wrong fairly often and might mean that we have to look at
+ * resizable buffers, or require that buffers implement lazy
+ * pagetable arrangements.
+ */
+ if ((intelObj->base.MinFilter == GL_NEAREST ||
+ intelObj->base.MinFilter == GL_LINEAR) &&
+ intelImage->level == firstLevel &&
+ (intel->gen < 4 || firstLevel == 0)) {
+ lastLevel = firstLevel;
+ } else {
+ lastLevel = firstLevel + logbase2(MAX2(MAX2(width, height), depth));
+ }
}
- assert(!intelObj->mt);
if (_mesa_is_format_compressed(intelImage->base.TexFormat))
comp_byte = intel_compressed_num_bytes(intelImage->base.TexFormat);
texelBytes = _mesa_get_format_bytes(intelImage->base.TexFormat);
- intelObj->mt = intel_miptree_create(intel,
- intelObj->base.Target,
- intelImage->base._BaseFormat,
- intelImage->base.InternalFormat,
- firstLevel,
- lastLevel,
- width,
- height,
- depth,
- texelBytes,
- comp_byte,
- expect_accelerated_upload);
-
- DBG("%s - success\n", __FUNCTION__);
+ return intel_miptree_create(intel,
+ intelObj->base.Target,
+ intelImage->base._BaseFormat,
+ intelImage->base.InternalFormat,
+ firstLevel,
+ lastLevel,
+ width,
+ height,
+ depth,
+ texelBytes,
+ comp_byte,
+ expect_accelerated_upload);
}
@@ -229,15 +232,18 @@ try_pbo_upload(struct intel_context *intel,
dst_stride = intelImage->mt->region->pitch;
- if (drm_intel_bo_references(intel->batch->buf, dst_buffer))
+ if (drm_intel_bo_references(intel->batch.bo, dst_buffer))
intel_flush(&intel->ctx);
{
- drm_intel_bo *src_buffer = intel_bufferobj_buffer(intel, pbo, INTEL_READ);
+ GLuint offset;
+ drm_intel_bo *src_buffer =
+ intel_bufferobj_source(intel, pbo, 64, &offset);
if (!intelEmitCopyBlit(intel,
intelImage->mt->cpp,
- src_stride, src_buffer, src_offset, GL_FALSE,
+ src_stride, src_buffer,
+ src_offset + offset, GL_FALSE,
dst_stride, dst_buffer, 0,
intelImage->mt->region->tiling,
0, 0, dst_x, dst_y, width, height,
@@ -343,41 +349,29 @@ intelTexImage(struct gl_context * ctx,
texImage->Data = NULL;
}
- if (!intelObj->mt) {
- guess_and_alloc_mipmap_tree(intel, intelObj, intelImage, pixels == NULL);
- if (!intelObj->mt) {
- DBG("guess_and_alloc_mipmap_tree: failed\n");
- }
- }
-
assert(!intelImage->mt);
if (intelObj->mt &&
intel_miptree_match_image(intelObj->mt, &intelImage->base)) {
-
+ /* Use an existing miptree when possible */
intel_miptree_reference(&intelImage->mt, intelObj->mt);
assert(intelImage->mt);
} else if (intelImage->base.Border == 0) {
- int comp_byte = 0;
- GLuint texelBytes = _mesa_get_format_bytes(intelImage->base.TexFormat);
- GLenum baseFormat = _mesa_get_format_base_format(intelImage->base.TexFormat);
- if (_mesa_is_format_compressed(intelImage->base.TexFormat)) {
- comp_byte =
- intel_compressed_num_bytes(intelImage->base.TexFormat);
- }
-
/* Didn't fit in the object miptree, but it's suitable for inclusion in
* a miptree, so create one just for our level and store it in the image.
* It'll get moved into the object miptree at validate time.
*/
- intelImage->mt = intel_miptree_create(intel, target,
- baseFormat,
- internalFormat,
- level, level,
- width, height, depth,
- texelBytes,
- comp_byte, pixels == NULL);
-
+ intelImage->mt = intel_miptree_create_for_teximage(intel, intelObj,
+ intelImage,
+ pixels == NULL);
+
+ /* Even if the object currently has a mipmap tree associated
+ * with it, this one is a more likely candidate to represent the
+ * whole object since our level didn't fit what was there
+ * before, and any lower levels would fit into our miptree.
+ */
+ if (intelImage->mt)
+ intel_miptree_reference(&intelObj->mt, intelImage->mt);
}
/* PBO fastpaths:
@@ -439,7 +433,7 @@ intelTexImage(struct gl_context * ctx,
if (intelImage->mt) {
if (pixels != NULL) {
/* Flush any queued rendering with the texture before mapping. */
- if (drm_intel_bo_references(intel->batch->buf,
+ if (drm_intel_bo_references(intel->batch.bo,
intelImage->mt->region->buffer)) {
intel_flush(ctx);
}
@@ -711,8 +705,7 @@ intelSetTexBuffer2(__DRIcontext *pDRICtx, GLint target,
}
mt = intel_miptree_create_for_region(intel, target,
- internalFormat,
- 0, 0, rb->region, 1, 0);
+ internalFormat, rb->region, 1, 0);
if (mt == NULL)
return;
@@ -777,7 +770,7 @@ intel_image_target_texture_2d(struct gl_context *ctx, GLenum target,
mt = intel_miptree_create_for_region(intel, target,
image->internal_format,
- 0, 0, image->region, 1, 0);
+ image->region, 1, 0);
if (mt == NULL)
return;
diff --git a/src/mesa/drivers/dri/intel/intel_tex_obj.h b/src/mesa/drivers/dri/intel/intel_tex_obj.h
index 5f60e0ea4f3..e93ef4a4727 100644
--- a/src/mesa/drivers/dri/intel/intel_tex_obj.h
+++ b/src/mesa/drivers/dri/intel/intel_tex_obj.h
@@ -32,11 +32,11 @@ struct intel_texture_object
{
struct gl_texture_object base; /* The "parent" object */
- /* The mipmap tree must include at least these levels once
- * validated:
+ /* This is a mirror of base._MaxLevel, updated at validate time,
+ * except that we don't bother with the non-base levels for
+ * non-mipmapped textures.
*/
- GLuint firstLevel;
- GLuint lastLevel;
+ unsigned int _MaxLevel;
/* Offset for firstLevel image:
*/
diff --git a/src/mesa/drivers/dri/intel/intel_tex_subimage.c b/src/mesa/drivers/dri/intel/intel_tex_subimage.c
index c9b992a21b9..d0f8294113a 100644
--- a/src/mesa/drivers/dri/intel/intel_tex_subimage.c
+++ b/src/mesa/drivers/dri/intel/intel_tex_subimage.c
@@ -27,6 +27,7 @@
**************************************************************************/
#include "main/mtypes.h"
+#include "main/pbo.h"
#include "main/texobj.h"
#include "main/texstore.h"
#include "main/texcompress.h"
@@ -89,19 +90,19 @@ intelTexSubimage(struct gl_context * ctx,
intel->gen < 6 && target == GL_TEXTURE_2D &&
drm_intel_bo_busy(dst_bo))
{
- unsigned long pitch;
- uint32_t tiling_mode = I915_TILING_NONE;
- temp_bo = drm_intel_bo_alloc_tiled(intel->bufmgr,
- "subimage blit bo",
- width, height,
- intelImage->mt->cpp,
- &tiling_mode,
- &pitch,
- 0);
- drm_intel_gem_bo_map_gtt(temp_bo);
+ dstRowStride = width * intelImage->mt->cpp;
+ temp_bo = drm_intel_bo_alloc(intel->bufmgr, "subimage blit bo",
+ dstRowStride * height, 0);
+ if (!temp_bo)
+ return;
+
+ if (drm_intel_gem_bo_map_gtt(temp_bo)) {
+ drm_intel_bo_unreference(temp_bo);
+ return;
+ }
+
texImage->Data = temp_bo->virtual;
texImage->ImageOffsets[0] = 0;
- dstRowStride = pitch;
intel_miptree_get_image_offset(intelImage->mt, level,
intelImage->face, 0,
diff --git a/src/mesa/drivers/dri/intel/intel_tex_validate.c b/src/mesa/drivers/dri/intel/intel_tex_validate.c
index ed5c5d896b9..a11b07ed09d 100644
--- a/src/mesa/drivers/dri/intel/intel_tex_validate.c
+++ b/src/mesa/drivers/dri/intel/intel_tex_validate.c
@@ -8,72 +8,21 @@
#define FILE_DEBUG_FLAG DEBUG_TEXTURE
/**
- * Compute which mipmap levels that really need to be sent to the hardware.
- * This depends on the base image size, GL_TEXTURE_MIN_LOD,
- * GL_TEXTURE_MAX_LOD, GL_TEXTURE_BASE_LEVEL, and GL_TEXTURE_MAX_LEVEL.
+ * When validating, we only care about the texture images that could
+ * be seen, so for non-mipmapped modes we want to ignore everything
+ * but BaseLevel.
*/
static void
-intel_calculate_first_last_level(struct intel_context *intel,
- struct intel_texture_object *intelObj)
+intel_update_max_level(struct intel_context *intel,
+ struct intel_texture_object *intelObj)
{
struct gl_texture_object *tObj = &intelObj->base;
- const struct gl_texture_image *const baseImage =
- tObj->Image[0][tObj->BaseLevel];
- /* These must be signed values. MinLod and MaxLod can be negative numbers,
- * and having firstLevel and lastLevel as signed prevents the need for
- * extra sign checks.
- */
- int firstLevel;
- int lastLevel;
-
- /* Yes, this looks overly complicated, but it's all needed.
- */
- switch (tObj->Target) {
- case GL_TEXTURE_1D:
- case GL_TEXTURE_2D:
- case GL_TEXTURE_3D:
- case GL_TEXTURE_CUBE_MAP:
- if (tObj->MinFilter == GL_NEAREST || tObj->MinFilter == GL_LINEAR) {
- /* GL_NEAREST and GL_LINEAR only care about GL_TEXTURE_BASE_LEVEL.
- */
- firstLevel = lastLevel = tObj->BaseLevel;
- }
- else {
- if (intel->gen == 2) {
- firstLevel = tObj->BaseLevel + (GLint) (tObj->MinLod + 0.5);
- firstLevel = MAX2(firstLevel, tObj->BaseLevel);
- firstLevel = MIN2(firstLevel, tObj->BaseLevel + baseImage->MaxLog2);
- lastLevel = tObj->BaseLevel + (GLint) (tObj->MaxLod + 0.5);
- lastLevel = MAX2(lastLevel, tObj->BaseLevel);
- lastLevel = MIN2(lastLevel, tObj->BaseLevel + baseImage->MaxLog2);
- lastLevel = MIN2(lastLevel, tObj->MaxLevel);
- lastLevel = MAX2(firstLevel, lastLevel); /* need at least one level */
- } else {
- /* Min/max LOD are taken into account in sampler state. We don't
- * want to re-layout textures just because clamping has been applied
- * since it means a bunch of blitting around and probably no memory
- * savings (since we have to keep the other levels around anyway).
- */
- firstLevel = tObj->BaseLevel;
- lastLevel = MIN2(tObj->BaseLevel + baseImage->MaxLog2,
- tObj->MaxLevel);
- /* need at least one level */
- lastLevel = MAX2(firstLevel, lastLevel);
- }
- }
- break;
- case GL_TEXTURE_RECTANGLE_NV:
- case GL_TEXTURE_4D_SGIS:
- firstLevel = lastLevel = 0;
- break;
- default:
- return;
+ if (tObj->MinFilter == GL_NEAREST || tObj->MinFilter == GL_LINEAR) {
+ intelObj->_MaxLevel = tObj->BaseLevel;
+ } else {
+ intelObj->_MaxLevel = tObj->_MaxLevel;
}
-
- /* save these values */
- intelObj->firstLevel = firstLevel;
- intelObj->lastLevel = lastLevel;
}
/**
@@ -135,8 +84,8 @@ intel_finalize_mipmap_tree(struct intel_context *intel, GLuint unit)
/* What levels must the tree include at a minimum?
*/
- intel_calculate_first_last_level(intel, intelObj);
- firstImage = intel_texture_image(tObj->Image[0][intelObj->firstLevel]);
+ intel_update_max_level(intel, intelObj);
+ firstImage = intel_texture_image(tObj->Image[0][tObj->BaseLevel]);
/* Fallback case:
*/
@@ -147,23 +96,6 @@ intel_finalize_mipmap_tree(struct intel_context *intel, GLuint unit)
return GL_FALSE;
}
-
- /* If both firstImage and intelObj have a tree which can contain
- * all active images, favour firstImage. Note that because of the
- * completeness requirement, we know that the image dimensions
- * will match.
- */
- if (firstImage->mt &&
- firstImage->mt != intelObj->mt &&
- firstImage->mt->first_level <= intelObj->firstLevel &&
- firstImage->mt->last_level >= intelObj->lastLevel) {
-
- if (intelObj->mt)
- intel_miptree_release(intel, &intelObj->mt);
-
- intel_miptree_reference(&intelObj->mt, firstImage->mt);
- }
-
if (_mesa_is_format_compressed(firstImage->base.TexFormat)) {
comp_byte = intel_compressed_num_bytes(firstImage->base.TexFormat);
cpp = comp_byte;
@@ -173,18 +105,17 @@ intel_finalize_mipmap_tree(struct intel_context *intel, GLuint unit)
/* Check tree can hold all active levels. Check tree matches
* target, imageFormat, etc.
- *
- * XXX: For some layouts (eg i945?), the test might have to be
- * first_level == firstLevel, as the tree isn't valid except at the
- * original start level. Hope to get around this by
- * programming minLod, maxLod, baseLevel into the hardware and
- * leaving the tree alone.
+ *
+ * For pre-gen4, we have to match first_level == tObj->BaseLevel,
+ * because we don't have the control that gen4 does to make min/mag
+ * determination happen at a nonzero (hardware) baselevel. Because
+ * of that, we just always relayout on baselevel change.
*/
if (intelObj->mt &&
(intelObj->mt->target != intelObj->base.Target ||
intelObj->mt->internal_format != firstImage->base.InternalFormat ||
- intelObj->mt->first_level != intelObj->firstLevel ||
- intelObj->mt->last_level != intelObj->lastLevel ||
+ intelObj->mt->first_level != tObj->BaseLevel ||
+ intelObj->mt->last_level < intelObj->_MaxLevel ||
intelObj->mt->width0 != firstImage->base.Width ||
intelObj->mt->height0 != firstImage->base.Height ||
intelObj->mt->depth0 != firstImage->base.Depth ||
@@ -201,25 +132,29 @@ intel_finalize_mipmap_tree(struct intel_context *intel, GLuint unit)
intelObj->base.Target,
firstImage->base._BaseFormat,
firstImage->base.InternalFormat,
- intelObj->firstLevel,
- intelObj->lastLevel,
+ tObj->BaseLevel,
+ intelObj->_MaxLevel,
firstImage->base.Width,
firstImage->base.Height,
firstImage->base.Depth,
cpp,
comp_byte,
GL_TRUE);
+ if (!intelObj->mt)
+ return GL_FALSE;
}
/* Pull in any images not in the object's tree:
*/
nr_faces = (intelObj->base.Target == GL_TEXTURE_CUBE_MAP) ? 6 : 1;
for (face = 0; face < nr_faces; face++) {
- for (i = intelObj->firstLevel; i <= intelObj->lastLevel; i++) {
+ for (i = tObj->BaseLevel; i <= intelObj->_MaxLevel; i++) {
struct intel_texture_image *intelImage =
intel_texture_image(intelObj->base.Image[face][i]);
-
- /* Need to import images in main memory or held in other trees.
+ /* skip too small size mipmap */
+ if (intelImage == NULL)
+ break;
+ /* Need to import images in main memory or held in other trees.
* If it's a render target, then its data isn't needed to be in
* the object tree (otherwise we'd be FBO incomplete), and we need
* to keep track of the image's MT as needing to be pulled in still,
@@ -289,7 +224,7 @@ intel_tex_map_images(struct intel_context *intel,
DBG("%s\n", __FUNCTION__);
- for (i = intelObj->firstLevel; i <= intelObj->lastLevel; i++)
+ for (i = intelObj->base.BaseLevel; i <= intelObj->_MaxLevel; i++)
intel_tex_map_level_images(intel, intelObj, i);
}
@@ -299,6 +234,6 @@ intel_tex_unmap_images(struct intel_context *intel,
{
int i;
- for (i = intelObj->firstLevel; i <= intelObj->lastLevel; i++)
+ for (i = intelObj->base.BaseLevel; i <= intelObj->_MaxLevel; i++)
intel_tex_unmap_level_images(intel, intelObj, i);
}
diff --git a/src/mesa/drivers/dri/mach64/mach64_context.c b/src/mesa/drivers/dri/mach64/mach64_context.c
index 7c989df5ec0..35b01a97402 100644
--- a/src/mesa/drivers/dri/mach64/mach64_context.c
+++ b/src/mesa/drivers/dri/mach64/mach64_context.c
@@ -120,7 +120,7 @@ GLboolean mach64CreateContext( gl_api api,
shareCtx = ((mach64ContextPtr) sharedContextPrivate)->glCtx;
else
shareCtx = NULL;
- mmesa->glCtx = _mesa_create_context(glVisual, shareCtx,
+ mmesa->glCtx = _mesa_create_context(API_OPENGL, glVisual, shareCtx,
&functions, (void *)mmesa);
if (!mmesa->glCtx) {
FREE(mmesa);
diff --git a/src/mesa/drivers/dri/mach64/mach64_context.h b/src/mesa/drivers/dri/mach64/mach64_context.h
index 11e8f53b283..70bc0ae79de 100644
--- a/src/mesa/drivers/dri/mach64/mach64_context.h
+++ b/src/mesa/drivers/dri/mach64/mach64_context.h
@@ -295,11 +295,11 @@ extern GLboolean mach64UnbindContext( __DRIcontext *driContextPriv );
#define LE32_OUT( x, y ) do { *(GLuint *)(x) = (y); } while (0)
#define LE32_OUT_FLOAT( x, y ) do { *(GLfloat *)(x) = (y); } while (0)
#else
-#ifndef __OpenBSD__
-#include <byteswap.h>
-#else
+#if defined(__OpenBSD__) || defined(__NetBSD__)
#include <machine/endian.h>
#define bswap_32 bswap32
+#else
+#include <byteswap.h>
#endif
#define LE32_IN( x ) bswap_32( *(GLuint *)(x) )
diff --git a/src/mesa/drivers/dri/mach64/mach64_state.c b/src/mesa/drivers/dri/mach64/mach64_state.c
index 8e795955c2c..c1a4e63204f 100644
--- a/src/mesa/drivers/dri/mach64/mach64_state.c
+++ b/src/mesa/drivers/dri/mach64/mach64_state.c
@@ -102,7 +102,7 @@ static void mach64UpdateAlphaMode( struct gl_context *ctx )
MACH64_ALPHA_BLEND_DST_MASK |
MACH64_ALPHA_BLEND_SAT);
- switch ( ctx->Color.BlendSrcRGB ) {
+ switch ( ctx->Color.Blend[0].SrcRGB ) {
case GL_ZERO:
s |= MACH64_ALPHA_BLEND_SRC_ZERO;
break;
@@ -135,7 +135,7 @@ static void mach64UpdateAlphaMode( struct gl_context *ctx )
FALLBACK( mmesa, MACH64_FALLBACK_BLEND_FUNC, GL_TRUE );
}
- switch ( ctx->Color.BlendDstRGB ) {
+ switch ( ctx->Color.Blend[0].DstRGB ) {
case GL_ZERO:
s |= MACH64_ALPHA_BLEND_DST_ZERO;
break;
diff --git a/src/mesa/drivers/dri/mga/mga_xmesa.c b/src/mesa/drivers/dri/mga/mga_xmesa.c
index d1b281a2c05..eb7df9785c1 100644
--- a/src/mesa/drivers/dri/mga/mga_xmesa.c
+++ b/src/mesa/drivers/dri/mga/mga_xmesa.c
@@ -457,7 +457,7 @@ mgaCreateContext( gl_api api,
shareCtx = ((mgaContextPtr) sharedContextPrivate)->glCtx;
else
shareCtx = NULL;
- mmesa->glCtx = _mesa_create_context(mesaVis, shareCtx,
+ mmesa->glCtx = _mesa_create_context(API_OPENGL, mesaVis, shareCtx,
&functions, (void *) mmesa);
if (!mmesa->glCtx) {
FREE(mmesa);
diff --git a/src/mesa/drivers/dri/mga/mgastate.c b/src/mesa/drivers/dri/mga/mgastate.c
index 25d7de28fe8..bfc55f4fc6d 100644
--- a/src/mesa/drivers/dri/mga/mgastate.c
+++ b/src/mesa/drivers/dri/mga/mgastate.c
@@ -30,6 +30,7 @@
#include "main/colormac.h"
#include "main/dd.h"
#include "main/mm.h"
+#include "main/state.h"
#include "mgacontext.h"
#include "mgadd.h"
@@ -114,7 +115,7 @@ static void mgaDDAlphaFunc(struct gl_context *ctx, GLenum func, GLfloat ref)
static void updateBlendLogicOp(struct gl_context *ctx)
{
mgaContextPtr mmesa = MGA_CONTEXT(ctx);
- GLboolean logicOp = RGBA_LOGICOP_ENABLED(ctx);
+ GLboolean logicOp = _mesa_rgba_logicop_enabled(ctx);
MGA_STATECHANGE( mmesa, MGA_UPLOAD_CONTEXT );
@@ -141,7 +142,7 @@ static void mgaDDBlendFuncSeparate( struct gl_context *ctx, GLenum sfactorRGB,
GLuint src;
GLuint dst;
- switch (ctx->Color.BlendSrcRGB) {
+ switch (ctx->Color.Blend[0].SrcRGB) {
case GL_ZERO:
src = AC_src_zero; break;
case GL_SRC_ALPHA:
@@ -169,7 +170,7 @@ static void mgaDDBlendFuncSeparate( struct gl_context *ctx, GLenum sfactorRGB,
break;
}
- switch (ctx->Color.BlendDstRGB) {
+ switch (ctx->Color.Blend[0].DstRGB) {
case GL_SRC_ALPHA:
dst = AC_dst_src_alpha; break;
case GL_ONE_MINUS_SRC_ALPHA:
@@ -197,7 +198,7 @@ static void mgaDDBlendFuncSeparate( struct gl_context *ctx, GLenum sfactorRGB,
mmesa->hw.blend_func = (src | dst);
FALLBACK( ctx, MGA_FALLBACK_BLEND,
- ctx->Color.BlendEnabled && !RGBA_LOGICOP_ENABLED(ctx) &&
+ ctx->Color.BlendEnabled && !_mesa_rgba_logicop_enabled(ctx) &&
mmesa->hw.blend_func == (AC_src_src_alpha_sat | AC_dst_zero) );
}
@@ -483,7 +484,7 @@ static void updateSpecularLighting( struct gl_context *ctx )
mgaContextPtr mmesa = MGA_CONTEXT(ctx);
unsigned int specen;
- specen = NEED_SECONDARY_COLOR(ctx) ? TMC_specen_enable : 0;
+ specen = _mesa_need_secondary_color(ctx) ? TMC_specen_enable : 0;
if ( specen != mmesa->hw.specen ) {
mmesa->hw.specen = specen;
@@ -962,7 +963,7 @@ void mgaEmitHwStateLocked( mgaContextPtr mmesa )
? mmesa->hw.zmode : (DC_zmode_nozcmp | DC_atype_i);
mmesa->setup.dwgctl &= DC_bop_MASK;
- mmesa->setup.dwgctl |= RGBA_LOGICOP_ENABLED(ctx)
+ mmesa->setup.dwgctl |= _mesa_rgba_logicop_enabled(ctx)
? mmesa->hw.rop : mgarop_NoBLK[ GL_COPY & 0x0f ];
mmesa->setup.alphactrl &= AC_src_MASK & AC_dst_MASK & AC_atmode_MASK
diff --git a/src/mesa/drivers/dri/nouveau/nouveau_context.c b/src/mesa/drivers/dri/nouveau/nouveau_context.c
index 53a121420d3..71dde413873 100644
--- a/src/mesa/drivers/dri/nouveau/nouveau_context.c
+++ b/src/mesa/drivers/dri/nouveau/nouveau_context.c
@@ -115,7 +115,8 @@ nouveau_context_init(struct gl_context *ctx, struct nouveau_screen *screen,
nouveau_fbo_functions_init(&functions);
/* Initialize the mesa context. */
- _mesa_initialize_context(ctx, visual, share_ctx, &functions, NULL);
+ _mesa_initialize_context(ctx, API_OPENGL, visual,
+ share_ctx, &functions, NULL);
nouveau_state_init(ctx);
nouveau_bo_state_init(ctx);
diff --git a/src/mesa/drivers/dri/nouveau/nouveau_driver.c b/src/mesa/drivers/dri/nouveau/nouveau_driver.c
index 27e2892f711..45630be7f6e 100644
--- a/src/mesa/drivers/dri/nouveau/nouveau_driver.c
+++ b/src/mesa/drivers/dri/nouveau/nouveau_driver.c
@@ -24,6 +24,8 @@
*
*/
+#include "main/mfeatures.h"
+
#include "nouveau_driver.h"
#include "nouveau_context.h"
#include "nouveau_fbo.h"
diff --git a/src/mesa/drivers/dri/nouveau/nouveau_driver.h b/src/mesa/drivers/dri/nouveau/nouveau_driver.h
index 8036b18edc0..158aec820aa 100644
--- a/src/mesa/drivers/dri/nouveau/nouveau_driver.h
+++ b/src/mesa/drivers/dri/nouveau/nouveau_driver.h
@@ -31,6 +31,7 @@
#include "main/mtypes.h"
#include "main/macros.h"
#include "main/formats.h"
+#include "main/state.h"
#include "utils.h"
#include "dri_util.h"
@@ -38,7 +39,6 @@
#include <assert.h>
#include "nouveau_device.h"
-#include "nouveau_pushbuf.h"
#include "nouveau_grobj.h"
#include "nouveau_channel.h"
#include "nouveau_bo.h"
@@ -46,6 +46,7 @@
#include "nouveau_screen.h"
#include "nouveau_state.h"
#include "nouveau_surface.h"
+#include "nv04_pushbuf.h"
#define DRIVER_DATE "20091015"
#define DRIVER_AUTHOR "Nouveau"
diff --git a/src/mesa/drivers/dri/nouveau/nouveau_fbo.c b/src/mesa/drivers/dri/nouveau/nouveau_fbo.c
index 079b5d63e4c..b36b5788781 100644
--- a/src/mesa/drivers/dri/nouveau/nouveau_fbo.c
+++ b/src/mesa/drivers/dri/nouveau/nouveau_fbo.c
@@ -32,6 +32,7 @@
#include "main/framebuffer.h"
#include "main/renderbuffer.h"
#include "main/fbobject.h"
+#include "main/mfeatures.h"
static GLboolean
set_renderbuffer_format(struct gl_renderbuffer *rb, GLenum internalFormat)
diff --git a/src/mesa/drivers/dri/nouveau/nouveau_texture.c b/src/mesa/drivers/dri/nouveau/nouveau_texture.c
index 2480b1ea500..988208ff56e 100644
--- a/src/mesa/drivers/dri/nouveau/nouveau_texture.c
+++ b/src/mesa/drivers/dri/nouveau/nouveau_texture.c
@@ -113,8 +113,10 @@ nouveau_teximage_map(struct gl_context *ctx, struct gl_texture_image *ti,
if (access & GL_MAP_WRITE_BIT)
flags |= NOUVEAU_BO_WR;
- ret = nouveau_bo_map(s->bo, flags);
- assert(!ret);
+ if (!s->bo->map) {
+ ret = nouveau_bo_map(s->bo, flags);
+ assert(!ret);
+ }
ti->Data = s->bo->map + y * s->pitch + x * s->cpp;
}
diff --git a/src/mesa/drivers/dri/nouveau/nv04_state_raster.c b/src/mesa/drivers/dri/nouveau/nv04_state_raster.c
index 98f2f98f1d0..78d29fc485b 100644
--- a/src/mesa/drivers/dri/nouveau/nv04_state_raster.c
+++ b/src/mesa/drivers/dri/nouveau/nv04_state_raster.c
@@ -264,8 +264,8 @@ nv04_emit_blend(struct gl_context *ctx, int emit)
NV04_MULTITEX_TRIANGLE_BLEND_TEXTURE_PERSPECTIVE_ENABLE;
/* Alpha blending. */
- blend |= get_blend_func(ctx->Color.BlendDstRGB) << 28 |
- get_blend_func(ctx->Color.BlendSrcRGB) << 24;
+ blend |= get_blend_func(ctx->Color.Blend[0].DstRGB) << 28 |
+ get_blend_func(ctx->Color.Blend[0].SrcRGB) << 24;
if (ctx->Color.BlendEnabled)
blend |= NV04_MULTITEX_TRIANGLE_BLEND_BLEND_ENABLE;
@@ -277,7 +277,7 @@ nv04_emit_blend(struct gl_context *ctx, int emit)
blend |= NV04_MULTITEX_TRIANGLE_BLEND_SHADE_MODE_FLAT;
/* Secondary color */
- if (NEED_SECONDARY_COLOR(ctx))
+ if (_mesa_need_secondary_color(ctx))
blend |= NV04_MULTITEX_TRIANGLE_BLEND_SPECULAR_ENABLE;
/* Fog. */
@@ -296,8 +296,8 @@ nv04_emit_blend(struct gl_context *ctx, int emit)
NV04_TEXTURED_TRIANGLE_BLEND_TEXTURE_PERSPECTIVE_ENABLE;
/* Alpha blending. */
- blend |= get_blend_func(ctx->Color.BlendDstRGB) << 28 |
- get_blend_func(ctx->Color.BlendSrcRGB) << 24;
+ blend |= get_blend_func(ctx->Color.Blend[0].DstRGB) << 28 |
+ get_blend_func(ctx->Color.Blend[0].SrcRGB) << 24;
if (ctx->Color.BlendEnabled)
blend |= NV04_TEXTURED_TRIANGLE_BLEND_BLEND_ENABLE;
@@ -315,7 +315,7 @@ nv04_emit_blend(struct gl_context *ctx, int emit)
blend |= get_texenv_mode(GL_MODULATE);
/* Secondary color */
- if (NEED_SECONDARY_COLOR(ctx))
+ if (_mesa_need_secondary_color(ctx))
blend |= NV04_TEXTURED_TRIANGLE_BLEND_SPECULAR_ENABLE;
/* Fog. */
diff --git a/src/mesa/drivers/dri/nouveau/nv10_state_raster.c b/src/mesa/drivers/dri/nouveau/nv10_state_raster.c
index bb1084ed11b..50021b0a7bf 100644
--- a/src/mesa/drivers/dri/nouveau/nv10_state_raster.c
+++ b/src/mesa/drivers/dri/nouveau/nv10_state_raster.c
@@ -68,7 +68,7 @@ nv10_emit_blend_equation(struct gl_context *ctx, int emit)
OUT_RINGb(chan, ctx->Color.BlendEnabled);
BEGIN_RING(chan, celsius, NV10_3D_BLEND_EQUATION, 1);
- OUT_RING(chan, nvgl_blend_eqn(ctx->Color.BlendEquationRGB));
+ OUT_RING(chan, nvgl_blend_eqn(ctx->Color.Blend[0].EquationRGB));
}
void
@@ -78,8 +78,8 @@ nv10_emit_blend_func(struct gl_context *ctx, int emit)
struct nouveau_grobj *celsius = context_eng3d(ctx);
BEGIN_RING(chan, celsius, NV10_3D_BLEND_FUNC_SRC, 2);
- OUT_RING(chan, nvgl_blend_func(ctx->Color.BlendSrcRGB));
- OUT_RING(chan, nvgl_blend_func(ctx->Color.BlendDstRGB));
+ OUT_RING(chan, nvgl_blend_func(ctx->Color.Blend[0].SrcRGB));
+ OUT_RING(chan, nvgl_blend_func(ctx->Color.Blend[0].DstRGB));
}
void
diff --git a/src/mesa/drivers/dri/nouveau/nv10_state_tnl.c b/src/mesa/drivers/dri/nouveau/nv10_state_tnl.c
index e8bd12e6e01..96d1b320d86 100644
--- a/src/mesa/drivers/dri/nouveau/nv10_state_tnl.c
+++ b/src/mesa/drivers/dri/nouveau/nv10_state_tnl.c
@@ -199,7 +199,7 @@ nv10_emit_light_model(struct gl_context *ctx, int emit)
BEGIN_RING(chan, celsius, NV10_3D_LIGHT_MODEL, 1);
OUT_RING(chan, ((m->LocalViewer ?
NV10_3D_LIGHT_MODEL_LOCAL_VIEWER : 0) |
- (NEED_SECONDARY_COLOR(ctx) ?
+ (_mesa_need_secondary_color(ctx) ?
NV10_3D_LIGHT_MODEL_SEPARATE_SPECULAR : 0) |
(!ctx->Light.Enabled && ctx->Fog.ColorSumEnabled ?
NV10_3D_LIGHT_MODEL_VERTEX_SPECULAR : 0)));
diff --git a/src/mesa/drivers/dri/nouveau/nv20_state_tnl.c b/src/mesa/drivers/dri/nouveau/nv20_state_tnl.c
index 4677198dd02..4f7ddd8e49f 100644
--- a/src/mesa/drivers/dri/nouveau/nv20_state_tnl.c
+++ b/src/mesa/drivers/dri/nouveau/nv20_state_tnl.c
@@ -178,7 +178,7 @@ nv20_emit_light_model(struct gl_context *ctx, int emit)
OUT_RING(chan, ((m->LocalViewer ?
NV20_3D_LIGHT_MODEL_VIEWER_LOCAL :
NV20_3D_LIGHT_MODEL_VIEWER_NONLOCAL) |
- (NEED_SECONDARY_COLOR(ctx) ?
+ (_mesa_need_secondary_color(ctx) ?
NV20_3D_LIGHT_MODEL_SEPARATE_SPECULAR :
0)));
diff --git a/src/mesa/drivers/dri/r128/r128_context.c b/src/mesa/drivers/dri/r128/r128_context.c
index 274108005f3..247d86ca008 100644
--- a/src/mesa/drivers/dri/r128/r128_context.c
+++ b/src/mesa/drivers/dri/r128/r128_context.c
@@ -128,7 +128,7 @@ GLboolean r128CreateContext( gl_api api,
shareCtx = ((r128ContextPtr) sharedContextPrivate)->glCtx;
else
shareCtx = NULL;
- rmesa->glCtx = _mesa_create_context(glVisual, shareCtx,
+ rmesa->glCtx = _mesa_create_context(API_OPENGL, glVisual, shareCtx,
&functions, (void *) rmesa);
if (!rmesa->glCtx) {
FREE(rmesa);
diff --git a/src/mesa/drivers/dri/r128/r128_state.c b/src/mesa/drivers/dri/r128/r128_state.c
index 4a49e8fc70f..7ce082ead22 100644
--- a/src/mesa/drivers/dri/r128/r128_state.c
+++ b/src/mesa/drivers/dri/r128/r128_state.c
@@ -43,6 +43,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "main/enums.h"
#include "main/colormac.h"
#include "main/macros.h"
+#include "main/state.h"
#include "swrast/swrast.h"
#include "vbo/vbo.h"
#include "tnl/tnl.h"
@@ -178,12 +179,12 @@ static void r128UpdateAlphaMode( struct gl_context *ctx )
(R128_ALPHA_BLEND_MASK << R128_ALPHA_BLEND_DST_SHIFT)
| R128_ALPHA_COMB_FCN_MASK);
- a |= blend_factor( rmesa, ctx->Color.BlendSrcRGB, GL_TRUE )
+ a |= blend_factor( rmesa, ctx->Color.Blend[0].SrcRGB, GL_TRUE )
<< R128_ALPHA_BLEND_SRC_SHIFT;
- a |= blend_factor( rmesa, ctx->Color.BlendDstRGB, GL_FALSE )
+ a |= blend_factor( rmesa, ctx->Color.Blend[0].DstRGB, GL_FALSE )
<< R128_ALPHA_BLEND_DST_SHIFT;
- switch (ctx->Color.BlendEquationRGB) {
+ switch (ctx->Color.Blend[0].EquationRGB) {
case GL_FUNC_ADD:
a |= R128_ALPHA_COMB_ADD_CLAMP;
break;
@@ -736,7 +737,7 @@ static void updateSpecularLighting( struct gl_context *ctx )
r128ContextPtr rmesa = R128_CONTEXT(ctx);
GLuint t = rmesa->setup.tex_cntl_c;
- if ( NEED_SECONDARY_COLOR( ctx ) ) {
+ if ( _mesa_need_secondary_color( ctx ) ) {
if (ctx->Light.ShadeModel == GL_FLAT) {
/* R128 can't do flat-shaded separate specular */
t &= ~R128_SPEC_LIGHT_ENABLE;
diff --git a/src/mesa/drivers/dri/r200/r200_context.c b/src/mesa/drivers/dri/r200/r200_context.c
index 5abfc9dac51..9c045b73acc 100644
--- a/src/mesa/drivers/dri/r200/r200_context.c
+++ b/src/mesa/drivers/dri/r200/r200_context.c
@@ -38,6 +38,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "main/simple_list.h"
#include "main/imports.h"
#include "main/extensions.h"
+#include "main/mfeatures.h"
#include "swrast/swrast.h"
#include "swrast_setup/swrast_setup.h"
diff --git a/src/mesa/drivers/dri/r200/r200_state.c b/src/mesa/drivers/dri/r200/r200_state.c
index b523edcb5d9..0a1e0b47577 100644
--- a/src/mesa/drivers/dri/r200/r200_state.c
+++ b/src/mesa/drivers/dri/r200/r200_state.c
@@ -245,10 +245,10 @@ static void r200_set_blend_state( struct gl_context * ctx )
}
}
- func = (blend_factor( ctx->Color.BlendSrcRGB, GL_TRUE ) << R200_SRC_BLEND_SHIFT) |
- (blend_factor( ctx->Color.BlendDstRGB, GL_FALSE ) << R200_DST_BLEND_SHIFT);
+ func = (blend_factor( ctx->Color.Blend[0].SrcRGB, GL_TRUE ) << R200_SRC_BLEND_SHIFT) |
+ (blend_factor( ctx->Color.Blend[0].DstRGB, GL_FALSE ) << R200_DST_BLEND_SHIFT);
- switch(ctx->Color.BlendEquationRGB) {
+ switch(ctx->Color.Blend[0].EquationRGB) {
case GL_FUNC_ADD:
eqn = R200_COMB_FCN_ADD_CLAMP;
break;
@@ -275,7 +275,7 @@ static void r200_set_blend_state( struct gl_context * ctx )
default:
fprintf( stderr, "[%s:%u] Invalid RGB blend equation (0x%04x).\n",
- __FUNCTION__, __LINE__, ctx->Color.BlendEquationRGB );
+ __FUNCTION__, __LINE__, ctx->Color.Blend[0].EquationRGB );
return;
}
@@ -284,10 +284,10 @@ static void r200_set_blend_state( struct gl_context * ctx )
return;
}
- funcA = (blend_factor( ctx->Color.BlendSrcA, GL_TRUE ) << R200_SRC_BLEND_SHIFT) |
- (blend_factor( ctx->Color.BlendDstA, GL_FALSE ) << R200_DST_BLEND_SHIFT);
+ funcA = (blend_factor( ctx->Color.Blend[0].SrcA, GL_TRUE ) << R200_SRC_BLEND_SHIFT) |
+ (blend_factor( ctx->Color.Blend[0].DstA, GL_FALSE ) << R200_DST_BLEND_SHIFT);
- switch(ctx->Color.BlendEquationA) {
+ switch(ctx->Color.Blend[0].EquationA) {
case GL_FUNC_ADD:
eqnA = R200_COMB_FCN_ADD_CLAMP;
break;
@@ -314,7 +314,7 @@ static void r200_set_blend_state( struct gl_context * ctx )
default:
fprintf( stderr, "[%s:%u] Invalid A blend equation (0x%04x).\n",
- __FUNCTION__, __LINE__, ctx->Color.BlendEquationA );
+ __FUNCTION__, __LINE__, ctx->Color.Blend[0].EquationA );
return;
}
diff --git a/src/mesa/drivers/dri/r200/r200_state_init.c b/src/mesa/drivers/dri/r200/r200_state_init.c
index f6afb90d595..e173cce0860 100644
--- a/src/mesa/drivers/dri/r200/r200_state_init.c
+++ b/src/mesa/drivers/dri/r200/r200_state_init.c
@@ -587,7 +587,7 @@ static void ctx_emit_cs(struct gl_context *ctx, struct radeon_state_atom *atom)
if (rrb) {
OUT_BATCH(CP_PACKET0(RADEON_RB3D_COLOROFFSET, 0));
- OUT_BATCH_RELOC(0, rrb->bo, 0, 0, RADEON_GEM_DOMAIN_VRAM, 0);
+ OUT_BATCH_RELOC(rrb->draw_offset, rrb->bo, rrb->draw_offset, 0, RADEON_GEM_DOMAIN_VRAM, 0);
OUT_BATCH(CP_PACKET0(RADEON_RB3D_COLORPITCH, 0));
OUT_BATCH_RELOC(cbpitch, rrb->bo, cbpitch, 0, RADEON_GEM_DOMAIN_VRAM, 0);
diff --git a/src/mesa/drivers/dri/r200/r200_tex.c b/src/mesa/drivers/dri/r200/r200_tex.c
index 064324731b5..092b7575831 100644
--- a/src/mesa/drivers/dri/r200/r200_tex.c
+++ b/src/mesa/drivers/dri/r200/r200_tex.c
@@ -37,6 +37,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "main/context.h"
#include "main/enums.h"
#include "main/image.h"
+#include "main/mfeatures.h"
#include "main/simple_list.h"
#include "main/texstore.h"
#include "main/teximage.h"
diff --git a/src/mesa/drivers/dri/r200/r200_texstate.c b/src/mesa/drivers/dri/r200/r200_texstate.c
index 24fb031ecb9..7adf9ad73ed 100644
--- a/src/mesa/drivers/dri/r200/r200_texstate.c
+++ b/src/mesa/drivers/dri/r200/r200_texstate.c
@@ -777,10 +777,9 @@ void r200SetTexBuffer2(__DRIcontext *pDRICtx, GLint target, GLint texture_format
struct radeon_framebuffer *rfb;
radeonTexObjPtr t;
uint32_t pitch_val;
- uint32_t internalFormat, type, format;
+ uint32_t internalFormat, format;
gl_format texFormat;
- type = GL_BGRA;
format = GL_UNSIGNED_BYTE;
internalFormat = (texture_format == __DRI_TEXTURE_FORMAT_RGB ? 3 : 4);
@@ -860,9 +859,20 @@ void r200SetTexBuffer2(__DRIcontext *pDRICtx, GLint target, GLint texture_format
t->pp_txsize = ((rb->base.Width - 1) << RADEON_TEX_USIZE_SHIFT)
| ((rb->base.Height - 1) << RADEON_TEX_VSIZE_SHIFT);
- t->pp_txformat |= R200_TXFORMAT_NON_POWER2;
- t->pp_txpitch = pitch_val;
- t->pp_txpitch -= 32;
+
+ if (target == GL_TEXTURE_RECTANGLE_NV) {
+ t->pp_txformat |= R200_TXFORMAT_NON_POWER2;
+ t->pp_txpitch = pitch_val;
+ t->pp_txpitch -= 32;
+ } else {
+ t->pp_txformat &= ~(R200_TXFORMAT_WIDTH_MASK |
+ R200_TXFORMAT_HEIGHT_MASK |
+ R200_TXFORMAT_CUBIC_MAP_ENABLE |
+ R200_TXFORMAT_F5_WIDTH_MASK |
+ R200_TXFORMAT_F5_HEIGHT_MASK);
+ t->pp_txformat |= ((texImage->WidthLog2 << R200_TXFORMAT_WIDTH_SHIFT) |
+ (texImage->HeightLog2 << R200_TXFORMAT_HEIGHT_SHIFT));
+ }
t->validated = GL_TRUE;
_mesa_unlock_texture(radeon->glCtx, texObj);
diff --git a/src/mesa/drivers/dri/r200/r200_vertprog.c b/src/mesa/drivers/dri/r200/r200_vertprog.c
index 5d69012a81f..63e03b0e0c7 100644
--- a/src/mesa/drivers/dri/r200/r200_vertprog.c
+++ b/src/mesa/drivers/dri/r200/r200_vertprog.c
@@ -438,7 +438,7 @@ static GLboolean r200_translate_vertex_program(struct gl_context *ctx, struct r2
(1 << VERT_RESULT_TEX5) | (1 << VERT_RESULT_PSIZ))) != 0) {
if (R200_DEBUG & RADEON_FALLBACKS) {
fprintf(stderr, "can't handle vert prog outputs 0x%llx\n",
- mesa_vp->Base.OutputsWritten);
+ (unsigned long long) mesa_vp->Base.OutputsWritten);
}
return GL_FALSE;
}
diff --git a/src/mesa/drivers/dri/r300/compiler/r300_fragprog.c b/src/mesa/drivers/dri/r300/compiler/r300_fragprog.c
index 782671bac01..deba9ca834d 100644
--- a/src/mesa/drivers/dri/r300/compiler/r300_fragprog.c
+++ b/src/mesa/drivers/dri/r300/compiler/r300_fragprog.c
@@ -49,6 +49,11 @@ static void presub_string(char out[10], unsigned int inst)
}
}
+static int get_msb(unsigned int bit, unsigned int r400_ext_addr)
+{
+ return (r400_ext_addr & bit) ? 1 << 5 : 0;
+}
+
/* just some random things... */
void r300FragmentProgramDump(struct radeon_compiler *c, void *user)
{
@@ -61,16 +66,21 @@ void r300FragmentProgramDump(struct radeon_compiler *c, void *user)
fprintf(stderr, "Hardware program\n");
fprintf(stderr, "----------------\n");
+ if (c->is_r400) {
+ fprintf(stderr, "code_offset_ext: %08x\n", code->r400_code_offset_ext);
+ }
for (n = 0; n <= (code->config & 3); n++) {
uint32_t code_addr = code->code_addr[3 - (code->config & 3) + n];
- int alu_offset = (code_addr & R300_ALU_START_MASK) >> R300_ALU_START_SHIFT;
- int alu_end = (code_addr & R300_ALU_SIZE_MASK) >> R300_ALU_SIZE_SHIFT;
+ unsigned int alu_offset = ((code_addr & R300_ALU_START_MASK) >> R300_ALU_START_SHIFT) +
+ (((code->r400_code_offset_ext >> (24 - (n * 6))) & 0x7) << 6);
+ unsigned int alu_end = ((code_addr & R300_ALU_SIZE_MASK) >> R300_ALU_SIZE_SHIFT) +
+ (((code->r400_code_offset_ext >> (27 - (n * 6))) & 0x7) << 6);
int tex_offset = (code_addr & R300_TEX_START_MASK) >> R300_TEX_START_SHIFT;
int tex_end = (code_addr & R300_TEX_SIZE_MASK) >> R300_TEX_SIZE_SHIFT;
- fprintf(stderr, "NODE %d: alu_offset: %d, tex_offset: %d, "
- "alu_end: %d, tex_end: %d (code_addr: %08x)\n", n,
+ fprintf(stderr, "NODE %d: alu_offset: %u, tex_offset: %d, "
+ "alu_end: %u, tex_end: %d (code_addr: %08x)\n", n,
alu_offset, tex_offset, alu_end, tex_end, code_addr);
if (n > 0 || (code->config & R300_PFS_CNTL_FIRST_NODE_HAS_TEX)) {
@@ -125,11 +135,15 @@ void r300FragmentProgramDump(struct radeon_compiler *c, void *user)
for (j = 0; j < 3; ++j) {
int regc = code->alu.inst[i].rgb_addr >> (j * 6);
int rega = code->alu.inst[i].alpha_addr >> (j * 6);
+ int msbc = get_msb(R400_ADDR_EXT_RGB_MSB_BIT(j),
+ code->alu.inst[i].r400_ext_addr);
+ int msba = get_msb(R400_ADDR_EXT_A_MSB_BIT(j),
+ code->alu.inst[i].r400_ext_addr);
sprintf(srcc[j], "%c%i",
- (regc & 32) ? 'c' : 't', regc & 31);
+ (regc & 32) ? 'c' : 't', (regc & 31) | msbc);
sprintf(srca[j], "%c%i",
- (rega & 32) ? 'c' : 't', rega & 31);
+ (rega & 32) ? 'c' : 't', (rega & 31) | msba);
}
dstc[0] = 0;
@@ -141,9 +155,14 @@ void r300FragmentProgramDump(struct radeon_compiler *c, void *user)
(code->alu.inst[i].
rgb_addr & R300_ALU_DSTC_REG_Z) ? "z" : "");
if (flags[0] != 0) {
+ unsigned int msb = get_msb(
+ R400_ADDRD_EXT_RGB_MSB_BIT,
+ code->alu.inst[i].r400_ext_addr);
+
sprintf(dstc, "t%i.%s ",
- (code->alu.inst[i].
- rgb_addr >> R300_ALU_DSTC_SHIFT) & 31,
+ ((code->alu.inst[i].
+ rgb_addr >> R300_ALU_DSTC_SHIFT)
+ & 31) | msb,
flags);
}
sprintf(flags, "%s%s%s",
@@ -166,9 +185,13 @@ void r300FragmentProgramDump(struct radeon_compiler *c, void *user)
dsta[0] = 0;
if (code->alu.inst[i].alpha_addr & R300_ALU_DSTA_REG) {
+ unsigned int msb = get_msb(
+ R400_ADDRD_EXT_A_MSB_BIT,
+ code->alu.inst[i].r400_ext_addr);
sprintf(dsta, "t%i.w ",
- (code->alu.inst[i].
- alpha_addr >> R300_ALU_DSTA_SHIFT) & 31);
+ ((code->alu.inst[i].
+ alpha_addr >> R300_ALU_DSTA_SHIFT) & 31)
+ | msb);
}
if (code->alu.inst[i].alpha_addr & R300_ALU_DSTA_OUTPUT) {
sprintf(tmp, "o%i.w ",
diff --git a/src/mesa/drivers/dri/r300/compiler/r300_fragprog_emit.c b/src/mesa/drivers/dri/r300/compiler/r300_fragprog_emit.c
index 1db8678e890..28d132a5fe3 100644
--- a/src/mesa/drivers/dri/r300/compiler/r300_fragprog_emit.c
+++ b/src/mesa/drivers/dri/r300/compiler/r300_fragprog_emit.c
@@ -64,6 +64,20 @@ struct r300_emit_state {
__FILE__, __FUNCTION__, ##args); \
} while(0)
+static unsigned int get_msbs_alu(unsigned int bits)
+{
+ return (bits >> 6) & 0x7;
+}
+
+/**
+ * @param lsbs The number of least significant bits
+ */
+static unsigned int get_msbs_tex(unsigned int bits, unsigned int lsbs)
+{
+ return (bits >> lsbs) & 0x15;
+}
+
+#define R400_EXT_GET_MSBS(x, lsbs, mask) (((x) >> lsbs) & mask)
/**
* Mark a temporary register as used.
@@ -83,7 +97,7 @@ static unsigned int use_source(struct r300_fragment_program_code* code, struct r
return src.Index | (1 << 5);
} else if (src.File == RC_FILE_TEMPORARY) {
use_temporary(code, src.Index);
- return src.Index;
+ return src.Index & 0x1f;
}
return 0;
@@ -151,11 +165,19 @@ static int emit_alu(struct r300_emit_state * emit, struct rc_pair_instruction* i
code->alu.inst[ip].alpha_inst = translate_alpha_opcode(c, inst->Alpha.Opcode);
for(j = 0; j < 3; ++j) {
+ /* Set the RGB address */
unsigned int src = use_source(code, inst->RGB.Src[j]);
unsigned int arg;
+ if (inst->RGB.Src[j].Index >= R300_PFS_NUM_TEMP_REGS)
+ code->alu.inst[ip].r400_ext_addr |= R400_ADDR_EXT_RGB_MSB_BIT(j);
+
code->alu.inst[ip].rgb_addr |= src << (6*j);
+ /* Set the Alpha address */
src = use_source(code, inst->Alpha.Src[j]);
+ if (inst->Alpha.Src[j].Index >= R300_PFS_NUM_TEMP_REGS)
+ code->alu.inst[ip].r400_ext_addr |= R400_ADDR_EXT_A_MSB_BIT(j);
+
code->alu.inst[ip].alpha_addr |= src << (6*j);
arg = r300FPTranslateRGBSwizzle(inst->RGB.Arg[j].Source, inst->RGB.Arg[j].Swizzle);
@@ -223,8 +245,10 @@ static int emit_alu(struct r300_emit_state * emit, struct rc_pair_instruction* i
if (inst->RGB.WriteMask) {
use_temporary(code, inst->RGB.DestIndex);
+ if (inst->RGB.DestIndex >= R300_PFS_NUM_TEMP_REGS)
+ code->alu.inst[ip].r400_ext_addr |= R400_ADDRD_EXT_RGB_MSB_BIT;
code->alu.inst[ip].rgb_addr |=
- (inst->RGB.DestIndex << R300_ALU_DSTC_SHIFT) |
+ ((inst->RGB.DestIndex & 0x1f) << R300_ALU_DSTC_SHIFT) |
(inst->RGB.WriteMask << R300_ALU_DSTC_REG_MASK_SHIFT);
}
if (inst->RGB.OutputWriteMask) {
@@ -236,8 +260,10 @@ static int emit_alu(struct r300_emit_state * emit, struct rc_pair_instruction* i
if (inst->Alpha.WriteMask) {
use_temporary(code, inst->Alpha.DestIndex);
+ if (inst->Alpha.DestIndex >= R300_PFS_NUM_TEMP_REGS)
+ code->alu.inst[ip].r400_ext_addr |= R400_ADDRD_EXT_A_MSB_BIT;
code->alu.inst[ip].alpha_addr |=
- (inst->Alpha.DestIndex << R300_ALU_DSTA_SHIFT) |
+ ((inst->Alpha.DestIndex & 0x1f) << R300_ALU_DSTA_SHIFT) |
R300_ALU_DSTA_REG;
}
if (inst->Alpha.OutputWriteMask) {
@@ -269,6 +295,8 @@ static int finish_node(struct r300_emit_state * emit)
unsigned tex_offset;
unsigned tex_end;
+ unsigned int alu_offset_msbs, alu_end_msbs;
+
if (code->alu.length == emit->node_first_alu) {
/* Generate a single NOP for this node */
struct rc_pair_instruction inst;
@@ -301,13 +329,48 @@ static int finish_node(struct r300_emit_state * emit)
*
* Also note that the register specification from AMD is slightly
* incorrect in its description of this register. */
- code->code_addr[emit->current_node] =
- (alu_offset << R300_ALU_START_SHIFT) |
- (alu_end << R300_ALU_SIZE_SHIFT) |
- (tex_offset << R300_TEX_START_SHIFT) |
- (tex_end << R300_TEX_SIZE_SHIFT) |
- emit->node_flags;
-
+ code->code_addr[emit->current_node] =
+ ((alu_offset << R300_ALU_START_SHIFT)
+ & R300_ALU_START_MASK)
+ | ((alu_end << R300_ALU_SIZE_SHIFT)
+ & R300_ALU_SIZE_MASK)
+ | ((tex_offset << R300_TEX_START_SHIFT)
+ & R300_TEX_START_MASK)
+ | ((tex_end << R300_TEX_SIZE_SHIFT)
+ & R300_TEX_SIZE_MASK)
+ | emit->node_flags
+ | (get_msbs_tex(tex_offset, 5)
+ << R400_TEX_START_MSB_SHIFT)
+ | (get_msbs_tex(tex_end, 5)
+ << R400_TEX_SIZE_MSB_SHIFT)
+ ;
+
+ /* Write r400 extended instruction fields. These will be ignored on
+ * r300 cards. */
+ alu_offset_msbs = get_msbs_alu(alu_offset);
+ alu_end_msbs = get_msbs_alu(alu_end);
+ switch(emit->current_node) {
+ case 0:
+ code->r400_code_offset_ext |=
+ alu_offset_msbs << R400_ALU_START3_MSB_SHIFT
+ | alu_end_msbs << R400_ALU_SIZE3_MSB_SHIFT;
+ break;
+ case 1:
+ code->r400_code_offset_ext |=
+ alu_offset_msbs << R400_ALU_START2_MSB_SHIFT
+ | alu_end_msbs << R400_ALU_SIZE2_MSB_SHIFT;
+ break;
+ case 2:
+ code->r400_code_offset_ext |=
+ alu_offset_msbs << R400_ALU_START1_MSB_SHIFT
+ | alu_end_msbs << R400_ALU_SIZE1_MSB_SHIFT;
+ break;
+ case 3:
+ code->r400_code_offset_ext |=
+ alu_offset_msbs << R400_ALU_START0_MSB_SHIFT
+ | alu_end_msbs << R400_ALU_SIZE0_MSB_SHIFT;
+ break;
+ }
return 1;
}
@@ -348,7 +411,7 @@ static int emit_tex(struct r300_emit_state * emit, struct rc_instruction * inst)
unsigned int opcode;
PROG_CODE;
- if (code->tex.length >= R300_PFS_MAX_TEX_INST) {
+ if (code->tex.length >= emit->compiler->Base.max_tex_insts) {
error("Too many TEX instructions");
return 0;
}
@@ -376,10 +439,17 @@ static int emit_tex(struct r300_emit_state * emit, struct rc_instruction * inst)
use_temporary(code, inst->U.I.SrcReg[0].Index);
code->tex.inst[code->tex.length++] =
- (inst->U.I.SrcReg[0].Index << R300_SRC_ADDR_SHIFT) |
- (dest << R300_DST_ADDR_SHIFT) |
- (unit << R300_TEX_ID_SHIFT) |
- (opcode << R300_TEX_INST_SHIFT);
+ ((inst->U.I.SrcReg[0].Index << R300_SRC_ADDR_SHIFT)
+ & R300_SRC_ADDR_MASK)
+ | ((dest << R300_DST_ADDR_SHIFT)
+ & R300_DST_ADDR_MASK)
+ | (unit << R300_TEX_ID_SHIFT)
+ | (opcode << R300_TEX_INST_SHIFT)
+ | (inst->U.I.SrcReg[0].Index >= R300_PFS_NUM_TEMP_REGS ?
+ R400_SRC_ADDR_EXT_BIT : 0)
+ | (dest >= R300_PFS_NUM_TEMP_REGS ?
+ R400_DST_ADDR_EXT_BIT : 0)
+ ;
return 1;
}
@@ -393,6 +463,7 @@ void r300BuildFragmentProgramHwCode(struct radeon_compiler *c, void *user)
struct r300_fragment_program_compiler *compiler = (struct r300_fragment_program_compiler*)c;
struct r300_emit_state emit;
struct r300_fragment_program_code *code = &compiler->code->code.r300;
+ unsigned int tex_end;
memset(&emit, 0, sizeof(emit));
emit.compiler = compiler;
@@ -424,11 +495,28 @@ void r300BuildFragmentProgramHwCode(struct radeon_compiler *c, void *user)
finish_node(&emit);
code->config |= emit.current_node; /* FIRST_NODE_HAS_TEX set by finish_node */
+
+ /* Set r400 extended instruction fields. These values will be ignored
+ * on r300 cards. */
+ code->r400_code_offset_ext |=
+ (get_msbs_alu(0)
+ << R400_ALU_OFFSET_MSB_SHIFT)
+ | (get_msbs_alu(code->alu.length - 1)
+ << R400_ALU_SIZE_MSB_SHIFT);
+
+ tex_end = code->tex.length ? code->tex.length - 1 : 0;
code->code_offset =
- (0 << R300_PFS_CNTL_ALU_OFFSET_SHIFT) |
- ((code->alu.length-1) << R300_PFS_CNTL_ALU_END_SHIFT) |
- (0 << R300_PFS_CNTL_TEX_OFFSET_SHIFT) |
- ((code->tex.length ? code->tex.length-1 : 0) << R300_PFS_CNTL_TEX_END_SHIFT);
+ ((0 << R300_PFS_CNTL_ALU_OFFSET_SHIFT)
+ & R300_PFS_CNTL_ALU_OFFSET_MASK)
+ | (((code->alu.length - 1) << R300_PFS_CNTL_ALU_END_SHIFT)
+ & R300_PFS_CNTL_ALU_END_MASK)
+ | ((0 << R300_PFS_CNTL_TEX_OFFSET_SHIFT)
+ & R300_PFS_CNTL_TEX_OFFSET_MASK)
+ | ((tex_end << R300_PFS_CNTL_TEX_END_SHIFT)
+ & R300_PFS_CNTL_TEX_END_MASK)
+ | (get_msbs_tex(0, 5) << R400_TEX_START_MSB_SHIFT)
+ | (get_msbs_tex(tex_end, 6) << R400_TEX_SIZE_MSB_SHIFT)
+ ;
if (emit.current_node < 3) {
int shift = 3 - emit.current_node;
@@ -438,4 +526,11 @@ void r300BuildFragmentProgramHwCode(struct radeon_compiler *c, void *user)
for(i = 0; i < shift; ++i)
code->code_addr[i] = 0;
}
+
+ if (code->pixsize >= R300_PFS_NUM_TEMP_REGS
+ || code->alu.length > R300_PFS_MAX_ALU_INST
+ || code->tex.length > R300_PFS_MAX_TEX_INST) {
+
+ code->r390_mode = 1;
+ }
}
diff --git a/src/mesa/drivers/dri/r300/compiler/r300_fragprog_swizzle.c b/src/mesa/drivers/dri/r300/compiler/r300_fragprog_swizzle.c
index 05d3da8a10d..5223aaa71a4 100644
--- a/src/mesa/drivers/dri/r300/compiler/r300_fragprog_swizzle.c
+++ b/src/mesa/drivers/dri/r300/compiler/r300_fragprog_swizzle.c
@@ -98,9 +98,6 @@ static int r300_swizzle_is_native(rc_opcode opcode, struct rc_src_register reg)
unsigned int relevant;
int j;
- if (reg.Abs)
- reg.Negate = RC_MASK_NONE;
-
if (opcode == RC_OPCODE_KIL ||
opcode == RC_OPCODE_TEX ||
opcode == RC_OPCODE_TXB ||
@@ -140,9 +137,6 @@ static void r300_swizzle_split(
struct rc_src_register src, unsigned int mask,
struct rc_swizzle_split * split)
{
- if (src.Abs)
- src.Negate = RC_MASK_NONE;
-
split->NumPhases = 0;
while(mask) {
@@ -222,13 +216,14 @@ unsigned int r300FPTranslateRGBSwizzle(unsigned int src, unsigned int swizzle)
*/
unsigned int r300FPTranslateAlphaSwizzle(unsigned int src, unsigned int swizzle)
{
+ unsigned int swz = GET_SWZ(swizzle, 0);
if (src == RC_PAIR_PRESUB_SRC) {
- return R300_ALU_ARGA_SRCP_X + swizzle;
+ return R300_ALU_ARGA_SRCP_X + swz;
}
- if (swizzle < 3)
- return swizzle + 3*src;
+ if (swz < 3)
+ return swz + 3*src;
- switch(swizzle) {
+ switch(swz) {
case RC_SWIZZLE_W: return R300_ALU_ARGA_SRC0A + src;
case RC_SWIZZLE_ONE: return R300_ALU_ARGA_ONE;
case RC_SWIZZLE_ZERO: return R300_ALU_ARGA_ZERO;
diff --git a/src/mesa/drivers/dri/r300/compiler/r3xx_fragprog.c b/src/mesa/drivers/dri/r300/compiler/r3xx_fragprog.c
index e0d349b98ce..9286733635f 100644
--- a/src/mesa/drivers/dri/r300/compiler/r3xx_fragprog.c
+++ b/src/mesa/drivers/dri/r300/compiler/r3xx_fragprog.c
@@ -78,12 +78,32 @@ static void rc_rewrite_depth_out(struct radeon_compiler *cc, void *user)
}
}
+static int radeon_saturate_output(
+ struct radeon_compiler * c,
+ struct rc_instruction * inst,
+ void* data)
+{
+ const struct rc_opcode_info *info = rc_get_opcode_info(inst->U.I.Opcode);
+
+ if (!info->HasDstReg || inst->U.I.DstReg.File != RC_FILE_OUTPUT)
+ return 0;
+
+ inst->U.I.SaturateMode = RC_SATURATE_ZERO_ONE;
+ return 1;
+}
+
void r3xx_compile_fragment_program(struct r300_fragment_program_compiler* c)
{
int is_r500 = c->Base.is_r500;
int opt = !c->Base.disable_optimizations;
+ int sat_out = c->state.frag_clamp;
/* Lists of instruction transformations. */
+ struct radeon_program_transformation saturate_output[] = {
+ { &radeon_saturate_output, c },
+ { 0, 0 }
+ };
+
struct radeon_program_transformation rewrite_tex[] = {
{ &radeonTransformTEX, c },
{ 0, 0 }
@@ -113,6 +133,7 @@ void r3xx_compile_fragment_program(struct r300_fragment_program_compiler* c)
{"unroll loops", 1, is_r500, rc_unroll_loops, NULL},
{"transform loops", 1, !is_r500, rc_transform_loops, NULL},
{"emulate branches", 1, !is_r500, rc_emulate_branches, NULL},
+ {"saturate output writes", 1, sat_out, rc_local_transform, saturate_output},
{"transform TEX", 1, 1, rc_local_transform, rewrite_tex},
{"native rewrite", 1, is_r500, rc_local_transform, native_rewrite_r500},
{"native rewrite", 1, !is_r500, rc_local_transform, native_rewrite_r300},
@@ -124,7 +145,7 @@ void r3xx_compile_fragment_program(struct r300_fragment_program_compiler* c)
/* This pass makes it easier for the scheduler to group TEX
* instructions and reduces the chances of creating too
* many texture indirections.*/
- {"register rename", 1, !is_r500 || opt, rc_rename_regs, NULL},
+ {"register rename", 1, !is_r500, rc_rename_regs, NULL},
{"pair translate", 1, 1, rc_pair_translate, NULL},
{"pair scheduling", 1, 1, rc_pair_schedule, NULL},
{"register allocation", 1, opt, rc_pair_regalloc, NULL},
diff --git a/src/mesa/drivers/dri/r300/compiler/r3xx_vertprog.c b/src/mesa/drivers/dri/r300/compiler/r3xx_vertprog.c
index 472029f63d0..8ad2175eadf 100644
--- a/src/mesa/drivers/dri/r300/compiler/r3xx_vertprog.c
+++ b/src/mesa/drivers/dri/r300/compiler/r3xx_vertprog.c
@@ -490,13 +490,6 @@ static void translate_vertex_program(struct radeon_compiler *c, void *user)
continue;
if (info->HasDstReg) {
- /* Relative addressing of destination operands is not supported yet. */
- if (vpi->DstReg.RelAddr) {
- rc_error(&compiler->Base, "Vertex program does not support relative "
- "addressing of destination operands (yet).\n");
- return;
- }
-
/* Neither is Saturate. */
if (vpi->SaturateMode != RC_SATURATE_NONE) {
rc_error(&compiler->Base, "Vertex program does not support the Saturate "
@@ -668,7 +661,6 @@ static void allocate_temporary_registers(struct radeon_compiler *c, void *user)
char hwtemps[RC_REGISTER_MAX_INDEX];
struct temporary_allocation * ta;
unsigned int i, j;
- struct rc_instruction *last_inst_src_reladdr = NULL;
memset(hwtemps, 0, sizeof(hwtemps));
@@ -693,28 +685,11 @@ static void allocate_temporary_registers(struct radeon_compiler *c, void *user)
}
}
- /* Pass 2: If there is relative addressing of dst temporaries, we cannot change register indices. Give up.
- * For src temporaries, save the last instruction which uses relative addressing. */
- for (inst = compiler->Base.Program.Instructions.Next; inst != &compiler->Base.Program.Instructions; inst = inst->Next) {
- const struct rc_opcode_info *opcode = rc_get_opcode_info(inst->U.I.Opcode);
-
- if (opcode->HasDstReg)
- if (inst->U.I.DstReg.RelAddr)
- return;
-
- for (i = 0; i < opcode->NumSrcRegs; ++i) {
- if (inst->U.I.SrcReg[i].File == RC_FILE_TEMPORARY &&
- inst->U.I.SrcReg[i].RelAddr) {
- last_inst_src_reladdr = inst;
- }
- }
- }
-
ta = (struct temporary_allocation*)memory_pool_malloc(&compiler->Base.Pool,
sizeof(struct temporary_allocation) * num_orig_temps);
memset(ta, 0, sizeof(struct temporary_allocation) * num_orig_temps);
- /* Pass 3: Determine original temporary lifetimes */
+ /* Pass 2: Determine original temporary lifetimes */
for(inst = compiler->Base.Program.Instructions.Next; inst != &compiler->Base.Program.Instructions; inst = inst->Next) {
const struct rc_opcode_info * opcode = rc_get_opcode_info(inst->U.I.Opcode);
/* Instructions inside of loops need to use the ENDLOOP
@@ -744,41 +719,22 @@ static void allocate_temporary_registers(struct radeon_compiler *c, void *user)
for (i = 0; i < opcode->NumSrcRegs; ++i) {
if (inst->U.I.SrcReg[i].File == RC_FILE_TEMPORARY) {
- struct rc_instruction *last_read;
-
- /* From "last_inst_src_reladdr", "end_loop", and "inst",
- * select the instruction with the highest instruction index (IP).
- * Note that "end_loop", if available, has always a higher index than "inst". */
- if (last_inst_src_reladdr) {
- if (end_loop) {
- last_read = last_inst_src_reladdr->IP > end_loop->IP ?
- last_inst_src_reladdr : end_loop;
- } else {
- last_read = last_inst_src_reladdr->IP > inst->IP ?
- last_inst_src_reladdr : inst;
- }
- } else {
- last_read = end_loop ? end_loop : inst;
- }
-
- ta[inst->U.I.SrcReg[i].Index].LastRead = last_read;
+ ta[inst->U.I.SrcReg[i].Index].LastRead = end_loop ? end_loop : inst;
}
}
}
- /* Pass 4: Register allocation */
+ /* Pass 3: Register allocation */
for(inst = compiler->Base.Program.Instructions.Next; inst != &compiler->Base.Program.Instructions; inst = inst->Next) {
const struct rc_opcode_info * opcode = rc_get_opcode_info(inst->U.I.Opcode);
- if (!last_inst_src_reladdr || last_inst_src_reladdr->IP < inst->IP) {
- for (i = 0; i < opcode->NumSrcRegs; ++i) {
- if (inst->U.I.SrcReg[i].File == RC_FILE_TEMPORARY) {
- unsigned int orig = inst->U.I.SrcReg[i].Index;
- inst->U.I.SrcReg[i].Index = ta[orig].HwTemp;
+ for (i = 0; i < opcode->NumSrcRegs; ++i) {
+ if (inst->U.I.SrcReg[i].File == RC_FILE_TEMPORARY) {
+ unsigned int orig = inst->U.I.SrcReg[i].Index;
+ inst->U.I.SrcReg[i].Index = ta[orig].HwTemp;
- if (ta[orig].Allocated && inst == ta[orig].LastRead)
- hwtemps[ta[orig].HwTemp] = 0;
- }
+ if (ta[orig].Allocated && inst == ta[orig].LastRead)
+ hwtemps[ta[orig].HwTemp] = 0;
}
}
@@ -792,12 +748,7 @@ static void allocate_temporary_registers(struct radeon_compiler *c, void *user)
break;
}
ta[orig].Allocated = 1;
- if (last_inst_src_reladdr &&
- last_inst_src_reladdr->IP > inst->IP) {
- ta[orig].HwTemp = orig;
- } else {
- ta[orig].HwTemp = j;
- }
+ ta[orig].HwTemp = j;
hwtemps[ta[orig].HwTemp] = 1;
}
diff --git a/src/mesa/drivers/dri/r300/compiler/r500_fragprog.c b/src/mesa/drivers/dri/r300/compiler/r500_fragprog.c
index ef81be48f77..140eeed3de3 100644
--- a/src/mesa/drivers/dri/r300/compiler/r500_fragprog.c
+++ b/src/mesa/drivers/dri/r300/compiler/r500_fragprog.c
@@ -77,9 +77,6 @@ static int r500_swizzle_is_native(rc_opcode opcode, struct rc_src_register reg)
if (opcode == RC_OPCODE_KIL && (reg.Swizzle != RC_SWIZZLE_XYZW || reg.Negate != RC_MASK_NONE))
return 0;
- if (reg.Negate)
- reg.Negate ^= RC_MASK_XYZW;
-
for(i = 0; i < 4; ++i) {
unsigned int swz = GET_SWZ(reg.Swizzle, i);
if (swz == RC_SWIZZLE_UNUSED) {
@@ -103,9 +100,6 @@ static int r500_swizzle_is_native(rc_opcode opcode, struct rc_src_register reg)
return 0;
} else {
/* ALU instructions support almost everything */
- if (reg.Abs)
- return 1;
-
relevant = 0;
for(i = 0; i < 3; ++i) {
unsigned int swz = GET_SWZ(reg.Swizzle, i);
diff --git a/src/mesa/drivers/dri/r300/compiler/r500_fragprog_emit.c b/src/mesa/drivers/dri/r300/compiler/r500_fragprog_emit.c
index 5da82d90f67..301b4446693 100644
--- a/src/mesa/drivers/dri/r300/compiler/r500_fragprog_emit.c
+++ b/src/mesa/drivers/dri/r300/compiler/r500_fragprog_emit.c
@@ -170,7 +170,7 @@ static unsigned int translate_arg_rgb(struct rc_pair_instruction *inst, int arg)
static unsigned int translate_arg_alpha(struct rc_pair_instruction *inst, int i)
{
unsigned int t = inst->Alpha.Arg[i].Source;
- t |= fix_hw_swizzle(inst->Alpha.Arg[i].Swizzle) << 2;
+ t |= fix_hw_swizzle(GET_SWZ(inst->Alpha.Arg[i].Swizzle, 0)) << 2;
t |= inst->Alpha.Arg[i].Negate << 5;
t |= inst->Alpha.Arg[i].Abs << 6;
return t;
@@ -372,7 +372,7 @@ static int emit_tex(struct r300_fragment_program_compiler *c, struct rc_sub_inst
| (inst->DstReg.WriteMask << 11)
| R500_INST_TEX_SEM_WAIT;
code->inst[ip].inst1 = R500_TEX_ID(inst->TexSrcUnit)
- | R500_TEX_SEM_ACQUIRE | R500_TEX_IGNORE_UNCOVERED;
+ | R500_TEX_SEM_ACQUIRE;
if (inst->TexSrcTarget == RC_TEXTURE_RECT)
code->inst[ip].inst1 |= R500_TEX_UNSCALED;
diff --git a/src/mesa/drivers/dri/r300/compiler/radeon_code.h b/src/mesa/drivers/dri/r300/compiler/radeon_code.h
index b69e81698ae..35360aa70f0 100644
--- a/src/mesa/drivers/dri/r300/compiler/radeon_code.h
+++ b/src/mesa/drivers/dri/r300/compiler/radeon_code.h
@@ -31,6 +31,9 @@
#define R300_PFS_NUM_TEMP_REGS 32
#define R300_PFS_NUM_CONST_REGS 32
+#define R400_PFS_MAX_ALU_INST 512
+#define R400_PFS_MAX_TEX_INST 512
+
#define R500_PFS_MAX_INST 512
#define R500_PFS_NUM_TEMP_REGS 128
#define R500_PFS_NUM_CONST_REGS 256
@@ -170,6 +173,8 @@ struct r300_fragment_program_external_state {
* RC_STATE_R300_TEXSCALE_FACTOR. */
unsigned clamp_and_scale_before_fetch : 1;
} unit[16];
+
+ unsigned frag_clamp:1;
};
@@ -187,24 +192,29 @@ struct r300_fragment_program_node {
*/
struct r300_fragment_program_code {
struct {
- int length; /**< total # of texture instructions used */
- uint32_t inst[R300_PFS_MAX_TEX_INST];
+ unsigned int length; /**< total # of texture instructions used */
+ uint32_t inst[R400_PFS_MAX_TEX_INST];
} tex;
struct {
- int length; /**< total # of ALU instructions used */
+ unsigned int length; /**< total # of ALU instructions used */
struct {
uint32_t rgb_inst;
uint32_t rgb_addr;
uint32_t alpha_inst;
uint32_t alpha_addr;
- } inst[R300_PFS_MAX_ALU_INST];
+ uint32_t r400_ext_addr;
+ } inst[R400_PFS_MAX_ALU_INST];
} alu;
uint32_t config; /* US_CONFIG */
uint32_t pixsize; /* US_PIXSIZE */
uint32_t code_offset; /* US_CODE_OFFSET */
+ uint32_t r400_code_offset_ext; /* US_CODE_EXT */
uint32_t code_addr[4]; /* US_CODE_ADDR */
+ /*US_CODE_BANK.R390_MODE: Enables 512 instructions and 64 temporaries
+ * for r400 cards */
+ unsigned int r390_mode:1;
};
diff --git a/src/mesa/drivers/dri/r300/compiler/radeon_compiler.c b/src/mesa/drivers/dri/r300/compiler/radeon_compiler.c
index 65548604bcc..79cd7996f78 100644
--- a/src/mesa/drivers/dri/r300/compiler/radeon_compiler.c
+++ b/src/mesa/drivers/dri/r300/compiler/radeon_compiler.c
@@ -373,9 +373,11 @@ void rc_get_stats(struct radeon_compiler *c, struct rc_program_stats *s)
const struct rc_opcode_info * info;
rc_for_all_reads_mask(tmp, reg_count_callback, &max_reg);
if (tmp->Type == RC_INSTRUCTION_NORMAL) {
+ info = rc_get_opcode_info(tmp->U.I.Opcode);
+ if (info->Opcode == RC_OPCODE_BEGIN_TEX)
+ continue;
if (tmp->U.I.PreSub.Opcode != RC_PRESUB_NONE)
s->num_presub_ops++;
- info = rc_get_opcode_info(tmp->U.I.Opcode);
} else {
if (tmp->U.P.RGB.Src[RC_PAIR_PRESUB_SRC].Used)
s->num_presub_ops++;
@@ -402,11 +404,11 @@ static void print_stats(struct radeon_compiler * c)
{
struct rc_program_stats s;
- rc_get_stats(c, &s);
-
- if (s.num_insts < 4)
+ if (c->initial_num_insts <= 5)
return;
+ rc_get_stats(c, &s);
+
switch (c->type) {
case RC_VERTEX_PROGRAM:
fprintf(stderr,"~~~~~~~~~ VERTEX PROGRAM ~~~~~~~~\n"
@@ -461,6 +463,11 @@ void rc_run_compiler_passes(struct radeon_compiler *c, struct radeon_compiler_pa
/* Executes a list of compiler passes given in the parameter 'list'. */
void rc_run_compiler(struct radeon_compiler *c, struct radeon_compiler_pass *list)
{
+ struct rc_program_stats s;
+
+ rc_get_stats(c, &s);
+ c->initial_num_insts = s.num_insts;
+
if (c->Debug & RC_DBG_LOG) {
fprintf(stderr, "%s: before compilation\n", shader_name[c->type]);
rc_print_program(&c->Program);
diff --git a/src/mesa/drivers/dri/r300/compiler/radeon_compiler.h b/src/mesa/drivers/dri/r300/compiler/radeon_compiler.h
index e6633395895..2d8e415f350 100644
--- a/src/mesa/drivers/dri/r300/compiler/radeon_compiler.h
+++ b/src/mesa/drivers/dri/r300/compiler/radeon_compiler.h
@@ -50,6 +50,7 @@ struct radeon_compiler {
char * ErrorMsg;
/* Hardware specification. */
+ unsigned is_r400:1;
unsigned is_r500:1;
unsigned has_half_swizzles:1;
unsigned has_presub:1;
@@ -57,6 +58,7 @@ struct radeon_compiler {
unsigned max_temp_regs;
unsigned max_constants;
int max_alu_insts;
+ unsigned max_tex_insts;
/* Whether to remove unused constants and empty holes in constant space. */
unsigned remove_unused_constants:1;
@@ -70,6 +72,8 @@ struct radeon_compiler {
/*@}*/
struct emulate_loop_state loop_state;
+
+ unsigned initial_num_insts; /* Number of instructions at start. */
};
void rc_init(struct radeon_compiler * c);
diff --git a/src/mesa/drivers/dri/r300/compiler/radeon_compiler_util.c b/src/mesa/drivers/dri/r300/compiler/radeon_compiler_util.c
index bf393a9fb16..15ec4418cb8 100644
--- a/src/mesa/drivers/dri/r300/compiler/radeon_compiler_util.c
+++ b/src/mesa/drivers/dri/r300/compiler/radeon_compiler_util.c
@@ -55,6 +55,24 @@ rc_swizzle get_swz(unsigned int swz, rc_swizzle idx)
return GET_SWZ(swz, idx);
}
+/**
+ * The purpose of this function is to standardize the number channels used by
+ * swizzles. All swizzles regardless of what instruction they are a part of
+ * should have 4 channels initialized with values.
+ * @param channels The number of channels in initial_value that have a
+ * meaningful value.
+ * @return An initialized swizzle that has all of the unused channels set to
+ * RC_SWIZZLE_UNUSED.
+ */
+unsigned int rc_init_swizzle(unsigned int initial_value, unsigned int channels)
+{
+ unsigned int i;
+ for (i = channels; i < 4; i++) {
+ SET_SWZ(initial_value, i, RC_SWIZZLE_UNUSED);
+ }
+ return initial_value;
+}
+
unsigned int combine_swizzles4(unsigned int src,
rc_swizzle swz_x, rc_swizzle swz_y, rc_swizzle swz_z, rc_swizzle swz_w)
{
@@ -147,13 +165,17 @@ unsigned int rc_src_reads_dst_mask(
return dst_mask & rc_swizzle_to_writemask(src_swz);
}
-unsigned int rc_source_type_swz(unsigned int swizzle, unsigned int channels)
+/**
+ * @return A bit mask specifying whether this swizzle will select from an RGB
+ * source, an Alpha source, or both.
+ */
+unsigned int rc_source_type_swz(unsigned int swizzle)
{
unsigned int chan;
unsigned int swz = RC_SWIZZLE_UNUSED;
unsigned int ret = RC_SOURCE_NONE;
- for(chan = 0; chan < channels; chan++) {
+ for(chan = 0; chan < 4; chan++) {
swz = GET_SWZ(swizzle, chan);
if (swz == RC_SWIZZLE_W) {
ret |= RC_SOURCE_ALPHA;
@@ -202,7 +224,7 @@ static void can_use_presub_read_cb(
if (d->RemoveSrcs[i].File == file
&& d->RemoveSrcs[i].Index == index) {
src_type &=
- ~rc_source_type_swz(d->RemoveSrcs[i].Swizzle, 4);
+ ~rc_source_type_swz(d->RemoveSrcs[i].Swizzle);
}
}
@@ -223,7 +245,6 @@ unsigned int rc_inst_can_use_presub(
{
struct can_use_presub_data d;
unsigned int num_presub_srcs;
- unsigned int presub_src_type = rc_source_type_mask(presub_writemask);
const struct rc_opcode_info * info =
rc_get_opcode_info(inst->U.I.Opcode);
@@ -253,13 +274,7 @@ unsigned int rc_inst_can_use_presub(
num_presub_srcs = rc_presubtract_src_reg_count(presub_op);
- if ((presub_src_type & RC_SOURCE_RGB)
- && d.RGBCount + num_presub_srcs > 3) {
- return 0;
- }
-
- if ((presub_src_type & RC_SOURCE_ALPHA)
- && d.AlphaCount + num_presub_srcs > 3) {
+ if (d.RGBCount + num_presub_srcs > 3 || d.AlphaCount + num_presub_srcs > 3) {
return 0;
}
diff --git a/src/mesa/drivers/dri/r300/compiler/radeon_compiler_util.h b/src/mesa/drivers/dri/r300/compiler/radeon_compiler_util.h
index 461ab9ffb10..dd0f6c66156 100644
--- a/src/mesa/drivers/dri/r300/compiler/radeon_compiler_util.h
+++ b/src/mesa/drivers/dri/r300/compiler/radeon_compiler_util.h
@@ -10,6 +10,8 @@ unsigned int rc_swizzle_to_writemask(unsigned int swz);
rc_swizzle get_swz(unsigned int swz, rc_swizzle idx);
+unsigned int rc_init_swizzle(unsigned int initial_value, unsigned int channels);
+
unsigned int combine_swizzles4(unsigned int src,
rc_swizzle swz_x, rc_swizzle swz_y,
rc_swizzle swz_z, rc_swizzle swz_w);
@@ -32,7 +34,7 @@ unsigned int rc_src_reads_dst_mask(
unsigned int dst_idx,
unsigned int dst_mask);
-unsigned int rc_source_type_swz(unsigned int swizzle, unsigned int channels);
+unsigned int rc_source_type_swz(unsigned int swizzle);
unsigned int rc_source_type_mask(unsigned int mask);
diff --git a/src/mesa/drivers/dri/r300/compiler/radeon_dataflow.c b/src/mesa/drivers/dri/r300/compiler/radeon_dataflow.c
index d0a64d936e0..c080d5aecc6 100644
--- a/src/mesa/drivers/dri/r300/compiler/radeon_dataflow.c
+++ b/src/mesa/drivers/dri/r300/compiler/radeon_dataflow.c
@@ -140,14 +140,8 @@ static void pair_sub_for_all_args(
for(i = 0; i < info->NumSrcRegs; i++) {
unsigned int src_type;
- unsigned int channels = 0;
- if (&fullinst->U.P.RGB == sub)
- channels = 3;
- else if (&fullinst->U.P.Alpha == sub)
- channels = 1;
-
- assert(channels > 0);
- src_type = rc_source_type_swz(sub->Arg[i].Swizzle, channels);
+
+ src_type = rc_source_type_swz(sub->Arg[i].Swizzle);
if (src_type == RC_SOURCE_NONE)
continue;
diff --git a/src/mesa/drivers/dri/r300/compiler/radeon_dataflow_deadcode.c b/src/mesa/drivers/dri/r300/compiler/radeon_dataflow_deadcode.c
index 87906f37b12..678e1475883 100644
--- a/src/mesa/drivers/dri/r300/compiler/radeon_dataflow_deadcode.c
+++ b/src/mesa/drivers/dri/r300/compiler/radeon_dataflow_deadcode.c
@@ -160,12 +160,8 @@ static void update_instruction(struct deadcode_state * s, struct rc_instruction
unsigned char * pused = get_used_ptr(s, inst->U.I.DstReg.File, inst->U.I.DstReg.Index);
if (pused) {
usedmask = *pused & inst->U.I.DstReg.WriteMask;
- if (!inst->U.I.DstReg.RelAddr)
- *pused &= ~usedmask;
+ *pused &= ~usedmask;
}
-
- if (inst->U.I.DstReg.RelAddr)
- mark_used(s, RC_FILE_ADDRESS, 0, RC_MASK_X);
}
insts->WriteMask |= usedmask;
@@ -219,22 +215,9 @@ void rc_dataflow_deadcode(struct radeon_compiler * c, void *user)
{
struct deadcode_state s;
unsigned int nr_instructions;
- unsigned has_temp_reladdr_src = 0;
rc_dataflow_mark_outputs_fn dce = (rc_dataflow_mark_outputs_fn)user;
unsigned int ip;
- /* Give up if there is relative addressing of destination operands. */
- for(struct rc_instruction * inst = c->Program.Instructions.Next;
- inst != &c->Program.Instructions;
- inst = inst->Next) {
- const struct rc_opcode_info *opcode = rc_get_opcode_info(inst->U.I.Opcode);
- if (opcode->HasDstReg &&
- inst->U.I.DstReg.WriteMask &&
- inst->U.I.DstReg.RelAddr) {
- return;
- }
- }
-
memset(&s, 0, sizeof(s));
s.C = c;
@@ -321,32 +304,6 @@ void rc_dataflow_deadcode(struct radeon_compiler * c, void *user)
rc_error(c, "%s: Unhandled control flow instruction %s\n", __FUNCTION__, opcode->Name);
}
}
-
- if (!has_temp_reladdr_src) {
- for (unsigned i = 0; i < opcode->NumSrcRegs; i++) {
- if (inst->U.I.SrcReg[i].File == RC_FILE_TEMPORARY &&
- inst->U.I.SrcReg[i].RelAddr) {
- /* If there is a register read from a temporary file with relative addressing,
- * mark all preceding written registers as used. */
- for (struct rc_instruction *ptr = inst->Prev;
- ptr != &c->Program.Instructions;
- ptr = ptr->Prev) {
- opcode = rc_get_opcode_info(ptr->U.I.Opcode);
- if (opcode->HasDstReg &&
- ptr->U.I.DstReg.File == RC_FILE_TEMPORARY &&
- ptr->U.I.DstReg.WriteMask) {
- mark_used(&s,
- ptr->U.I.DstReg.File,
- ptr->U.I.DstReg.Index,
- ptr->U.I.DstReg.WriteMask);
- }
- }
-
- has_temp_reladdr_src = 1;
- break;
- }
- }
- }
}
update_instruction(&s, inst);
diff --git a/src/mesa/drivers/dri/r300/compiler/radeon_dataflow_swizzles.c b/src/mesa/drivers/dri/r300/compiler/radeon_dataflow_swizzles.c
index a0f7bd81741..133a9f72ec7 100644
--- a/src/mesa/drivers/dri/r300/compiler/radeon_dataflow_swizzles.c
+++ b/src/mesa/drivers/dri/r300/compiler/radeon_dataflow_swizzles.c
@@ -56,6 +56,7 @@ static void rewrite_source(struct radeon_compiler * c,
mov->U.I.DstReg.Index = tempreg;
mov->U.I.DstReg.WriteMask = split.Phase[phase];
mov->U.I.SrcReg[0] = inst->U.I.SrcReg[src];
+ mov->U.I.PreSub = inst->U.I.PreSub;
phase_refmask = 0;
for(unsigned int chan = 0; chan < 4; ++chan) {
diff --git a/src/mesa/drivers/dri/r300/compiler/radeon_optimize.c b/src/mesa/drivers/dri/r300/compiler/radeon_optimize.c
index 44f4c0fbdc7..c4e6a5e0a1f 100644
--- a/src/mesa/drivers/dri/r300/compiler/radeon_optimize.c
+++ b/src/mesa/drivers/dri/r300/compiler/radeon_optimize.c
@@ -139,7 +139,6 @@ static void copy_propagate(struct radeon_compiler * c, struct rc_instruction * i
unsigned int i;
if (inst_mov->U.I.DstReg.File != RC_FILE_TEMPORARY ||
- inst_mov->U.I.DstReg.RelAddr ||
inst_mov->U.I.WriteALUResult ||
inst_mov->U.I.SaturateMode)
return;
@@ -312,7 +311,18 @@ static void constant_folding(struct radeon_compiler * c, struct rc_instruction *
struct rc_constant * constant;
struct rc_src_register newsrc;
int have_real_reference;
+ unsigned int chan;
+
+ /* If there are only 0, 0.5, 1, or _ swizzles, mark the source as a constant. */
+ for (chan = 0; chan < 4; ++chan)
+ if (GET_SWZ(inst->U.I.SrcReg[src].Swizzle, chan) <= 3)
+ break;
+ if (chan == 4) {
+ inst->U.I.SrcReg[src].File = RC_FILE_NONE;
+ continue;
+ }
+ /* Convert immediates to swizzles. */
if (inst->U.I.SrcReg[src].File != RC_FILE_CONSTANT ||
inst->U.I.SrcReg[src].RelAddr ||
inst->U.I.SrcReg[src].Index >= c->Program.Constants.Count)
@@ -326,7 +336,7 @@ static void constant_folding(struct radeon_compiler * c, struct rc_instruction *
newsrc = inst->U.I.SrcReg[src];
have_real_reference = 0;
- for(unsigned int chan = 0; chan < 4; ++chan) {
+ for (chan = 0; chan < 4; ++chan) {
unsigned int swz = GET_SWZ(newsrc.Swizzle, chan);
unsigned int newswz;
float imm;
diff --git a/src/mesa/drivers/dri/r300/compiler/radeon_pair_schedule.c b/src/mesa/drivers/dri/r300/compiler/radeon_pair_schedule.c
index 9beb5d63579..8e10813ff06 100644
--- a/src/mesa/drivers/dri/r300/compiler/radeon_pair_schedule.c
+++ b/src/mesa/drivers/dri/r300/compiler/radeon_pair_schedule.c
@@ -365,8 +365,8 @@ static int merge_presub_sources(
for(arg = 0; arg < info->NumSrcRegs; arg++) {
/*If this arg does not read from an rgb source,
* do nothing. */
- if (!(rc_source_type_swz(dst_full->RGB.Arg[arg].Swizzle,
- 3) & type)) {
+ if (!(rc_source_type_swz(dst_full->RGB.Arg[arg].Swizzle)
+ & type)) {
continue;
}
@@ -423,11 +423,11 @@ static int destructive_merge_instructions(
unsigned int index = 0;
int source;
- if (alpha->Alpha.Arg[arg].Swizzle < 3) {
+ if (GET_SWZ(alpha->Alpha.Arg[arg].Swizzle, 0) < 3) {
srcrgb = 1;
file = alpha->RGB.Src[oldsrc].File;
index = alpha->RGB.Src[oldsrc].Index;
- } else if (alpha->Alpha.Arg[arg].Swizzle < 4) {
+ } else if (GET_SWZ(alpha->Alpha.Arg[arg].Swizzle, 0) < 4) {
srcalpha = 1;
file = alpha->Alpha.Src[oldsrc].File;
index = alpha->Alpha.Src[oldsrc].Index;
@@ -544,18 +544,12 @@ static void rgb_to_alpha_remap (
{
int new_src_index;
unsigned int i;
- struct rc_pair_instruction_source * old_src =
- rc_pair_get_src(&inst->U.P, arg);
- if (!old_src) {
- return;
- }
for (i = 0; i < 3; i++) {
if (get_swz(arg->Swizzle, i) == old_swz) {
SET_SWZ(arg->Swizzle, i, RC_SWIZZLE_W);
}
}
- memset(old_src, 0, sizeof(struct rc_pair_instruction_source));
new_src_index = rc_pair_alloc_source(&inst->U.P, 0, 1,
old_file, new_index);
/* This conversion is not possible, we must have made a mistake in
@@ -728,7 +722,8 @@ static int convert_rgb_to_alpha(
for (j = 0; j < 3; j++) {
unsigned int swz = get_swz(pair_inst->Alpha.Arg[i].Swizzle, j);
if (swz != RC_SWIZZLE_UNUSED) {
- pair_inst->Alpha.Arg[i].Swizzle = swz;
+ pair_inst->Alpha.Arg[i].Swizzle =
+ rc_init_swizzle(swz, 1);
break;
}
}
diff --git a/src/mesa/drivers/dri/r300/compiler/radeon_pair_translate.c b/src/mesa/drivers/dri/r300/compiler/radeon_pair_translate.c
index fc05366f50e..9e03eb1aca8 100644
--- a/src/mesa/drivers/dri/r300/compiler/radeon_pair_translate.c
+++ b/src/mesa/drivers/dri/r300/compiler/radeon_pair_translate.c
@@ -28,6 +28,7 @@
#include "radeon_program_pair.h"
#include "radeon_compiler.h"
+#include "radeon_compiler_util.h"
/**
@@ -213,16 +214,21 @@ static void set_pair_instruction(struct r300_fragment_program_compiler *c,
if (needrgb && !istranscendent) {
unsigned int srcrgb = 0;
unsigned int srcalpha = 0;
+ unsigned int srcmask = 0;
int j;
/* We don't care about the alpha channel here. We only
* want the part of the swizzle that writes to rgb,
* since we are creating an rgb instruction. */
for(j = 0; j < 3; ++j) {
unsigned int swz = GET_SWZ(inst->SrcReg[i].Swizzle, j);
- if (swz < 3)
+
+ if (swz < RC_SWIZZLE_W)
srcrgb = 1;
- else if (swz < 4)
+ else if (swz == RC_SWIZZLE_W)
srcalpha = 1;
+
+ if (swz < RC_SWIZZLE_UNUSED)
+ srcmask |= 1 << j;
}
source = rc_pair_alloc_source(pair, srcrgb, srcalpha,
inst->SrcReg[i].File, inst->SrcReg[i].Index);
@@ -232,9 +238,10 @@ static void set_pair_instruction(struct r300_fragment_program_compiler *c,
return;
}
pair->RGB.Arg[i].Source = source;
- pair->RGB.Arg[i].Swizzle = inst->SrcReg[i].Swizzle & 0x1ff;
+ pair->RGB.Arg[i].Swizzle =
+ rc_init_swizzle(inst->SrcReg[i].Swizzle, 3);
pair->RGB.Arg[i].Abs = inst->SrcReg[i].Abs;
- pair->RGB.Arg[i].Negate = !!(inst->SrcReg[i].Negate & (RC_MASK_X | RC_MASK_Y | RC_MASK_Z));
+ pair->RGB.Arg[i].Negate = !!(srcmask & inst->SrcReg[i].Negate & (RC_MASK_X | RC_MASK_Y | RC_MASK_Z));
}
if (needalpha) {
unsigned int srcrgb = 0;
@@ -252,7 +259,7 @@ static void set_pair_instruction(struct r300_fragment_program_compiler *c,
return;
}
pair->Alpha.Arg[i].Source = source;
- pair->Alpha.Arg[i].Swizzle = swz;
+ pair->Alpha.Arg[i].Swizzle = rc_init_swizzle(swz, 1);
pair->Alpha.Arg[i].Abs = inst->SrcReg[i].Abs;
pair->Alpha.Arg[i].Negate = !!(inst->SrcReg[i].Negate & RC_MASK_W);
}
@@ -302,12 +309,6 @@ static void check_opcode_support(struct r300_fragment_program_compiler *c,
const struct rc_opcode_info * opcode = rc_get_opcode_info(inst->Opcode);
if (opcode->HasDstReg) {
- if (inst->DstReg.RelAddr) {
- rc_error(&c->Base, "Fragment program does not support relative addressing "
- "of destination operands.\n");
- return;
- }
-
if (inst->SaturateMode == RC_SATURATE_MINUS_PLUS_ONE) {
rc_error(&c->Base, "Fragment program does not support signed Saturate.\n");
return;
diff --git a/src/mesa/drivers/dri/r300/compiler/radeon_program.h b/src/mesa/drivers/dri/r300/compiler/radeon_program.h
index df6c94b35f9..a07f6b63c6e 100644
--- a/src/mesa/drivers/dri/r300/compiler/radeon_program.h
+++ b/src/mesa/drivers/dri/r300/compiler/radeon_program.h
@@ -56,11 +56,7 @@ struct rc_src_register {
struct rc_dst_register {
unsigned int File:3;
-
- /** Negative values may be used for relative addressing. */
- signed int Index:(RC_REGISTER_INDEX_BITS+1);
- unsigned int RelAddr:1;
-
+ unsigned int Index:RC_REGISTER_INDEX_BITS;
unsigned int WriteMask:4;
};
diff --git a/src/mesa/drivers/dri/r300/compiler/radeon_program_alu.c b/src/mesa/drivers/dri/r300/compiler/radeon_program_alu.c
index 58977a40c7c..9fc991166a3 100644
--- a/src/mesa/drivers/dri/r300/compiler/radeon_program_alu.c
+++ b/src/mesa/drivers/dri/r300/compiler/radeon_program_alu.c
@@ -91,7 +91,6 @@ static struct rc_dst_register dstregtmpmask(int index, int mask)
dst.File = RC_FILE_TEMPORARY;
dst.Index = index;
dst.WriteMask = mask;
- dst.RelAddr = 0;
return dst;
}
@@ -689,11 +688,12 @@ static void transform_r300_vertex_fix_LIT(struct radeon_compiler* c,
&constant_swizzle);
/* MOV dst, src */
+ dst.WriteMask = RC_MASK_XYZW;
emit1(c, inst->Prev, RC_OPCODE_MOV, 0,
dst,
inst->U.I.SrcReg[0]);
- /* MAX dst.z, src, 0.00...001 */
+ /* MAX dst.y, src, 0.00...001 */
emit2(c, inst->Prev, RC_OPCODE_MAX, 0,
dstregtmpmask(dst.Index, RC_MASK_Y),
srcreg(RC_FILE_TEMPORARY, dst.Index),
diff --git a/src/mesa/drivers/dri/r300/compiler/radeon_program_pair.c b/src/mesa/drivers/dri/r300/compiler/radeon_program_pair.c
index 5905d26e521..68874795b8a 100644
--- a/src/mesa/drivers/dri/r300/compiler/radeon_program_pair.c
+++ b/src/mesa/drivers/dri/r300/compiler/radeon_program_pair.c
@@ -211,27 +211,9 @@ struct rc_pair_instruction_source * rc_pair_get_src(
struct rc_pair_instruction * pair_inst,
struct rc_pair_instruction_arg * arg)
{
- unsigned int i, type;
- unsigned int channels = 0;
+ unsigned int type;
- for(i = 0; i < 3; i++) {
- if (arg == pair_inst->RGB.Arg + i) {
- channels = 3;
- break;
- }
- }
-
- if (channels == 0) {
- for (i = 0; i < 3; i++) {
- if (arg == pair_inst->Alpha.Arg + i) {
- channels = 1;
- break;
- }
- }
- }
-
- assert(channels > 0);
- type = rc_source_type_swz(arg->Swizzle, channels);
+ type = rc_source_type_swz(arg->Swizzle);
if (type & RC_SOURCE_RGB) {
return &pair_inst->RGB.Src[arg->Source];
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 ccf7a0070cd..6708b16d29a 100644
--- a/src/mesa/drivers/dri/r300/compiler/radeon_program_pair.h
+++ b/src/mesa/drivers/dri/r300/compiler/radeon_program_pair.h
@@ -63,7 +63,7 @@ struct rc_pair_instruction_source {
struct rc_pair_instruction_arg {
unsigned int Source:2;
- unsigned int Swizzle:9;
+ unsigned int Swizzle:12;
unsigned int Abs:1;
unsigned int Negate:1;
};
diff --git a/src/mesa/drivers/dri/r300/compiler/radeon_program_print.c b/src/mesa/drivers/dri/r300/compiler/radeon_program_print.c
index ae13f6742f8..390d1319460 100644
--- a/src/mesa/drivers/dri/r300/compiler/radeon_program_print.c
+++ b/src/mesa/drivers/dri/r300/compiler/radeon_program_print.c
@@ -110,7 +110,7 @@ static void rc_print_mask(FILE * f, unsigned int mask)
static void rc_print_dst_register(FILE * f, struct rc_dst_register dst)
{
- rc_print_register(f, dst.File, dst.Index, dst.RelAddr);
+ rc_print_register(f, dst.File, dst.Index, 0);
if (dst.WriteMask != RC_MASK_XYZW) {
fprintf(f, ".");
rc_print_mask(f, dst.WriteMask);
@@ -379,7 +379,7 @@ static void rc_print_pair_instruction(FILE * f, struct rc_instruction * fullinst
else
fprintf(f,"%d", inst->Alpha.Arg[arg].Source);
fprintf(f,".%c%s",
- rc_swizzle_char(inst->Alpha.Arg[arg].Swizzle), abs);
+ rc_swizzle_char(GET_SWZ(inst->Alpha.Arg[arg].Swizzle, 0)), abs);
}
fprintf(f, "\n");
}
diff --git a/src/mesa/drivers/dri/r300/compiler/radeon_program_tex.c b/src/mesa/drivers/dri/r300/compiler/radeon_program_tex.c
index f9d9f34b6ad..1cf77d9cf73 100644
--- a/src/mesa/drivers/dri/r300/compiler/radeon_program_tex.c
+++ b/src/mesa/drivers/dri/r300/compiler/radeon_program_tex.c
@@ -33,14 +33,14 @@
/* Series of transformations to be done on textures. */
static struct rc_src_register shadow_ambient(struct r300_fragment_program_compiler *compiler,
- int tmu)
+ int tmu)
{
struct rc_src_register reg = { 0, };
if (compiler->enable_shadow_ambient) {
reg.File = RC_FILE_CONSTANT;
reg.Index = rc_constants_add_state(&compiler->Base.Program.Constants,
- RC_STATE_SHADOW_AMBIENT, tmu);
+ RC_STATE_SHADOW_AMBIENT, tmu);
reg.Swizzle = RC_SWIZZLE_WWWW;
} else {
reg.File = RC_FILE_NONE;
@@ -149,14 +149,11 @@ int radeonTransformTEX(
return 1;
} else {
- rc_compare_func comparefunc = compiler->state.unit[inst->U.I.TexSrcUnit].texture_compare_func;
struct rc_instruction * inst_rcp = NULL;
- struct rc_instruction * inst_mad;
- struct rc_instruction * inst_cmp;
+ struct rc_instruction *inst_mul, *inst_add, *inst_cmp;
unsigned tmp_texsample;
unsigned tmp_sum;
- unsigned tmp_recip_w = 0;
- int pass, fail, tex;
+ int pass, fail;
/* Save the output register. */
struct rc_dst_register output_reg = inst->U.I.DstReg;
@@ -167,63 +164,68 @@ int radeonTransformTEX(
inst->U.I.DstReg.Index = tmp_texsample;
inst->U.I.DstReg.WriteMask = RC_MASK_XYZW;
- if (inst->U.I.Opcode == RC_OPCODE_TXP) {
- tmp_recip_w = rc_find_free_temporary(c);
+ tmp_sum = rc_find_free_temporary(c);
+ if (inst->U.I.Opcode == RC_OPCODE_TXP) {
/* Compute 1/W. */
inst_rcp = rc_insert_new_instruction(c, inst);
inst_rcp->U.I.Opcode = RC_OPCODE_RCP;
inst_rcp->U.I.DstReg.File = RC_FILE_TEMPORARY;
- inst_rcp->U.I.DstReg.Index = tmp_recip_w;
+ inst_rcp->U.I.DstReg.Index = tmp_sum;
inst_rcp->U.I.DstReg.WriteMask = RC_MASK_W;
inst_rcp->U.I.SrcReg[0] = inst->U.I.SrcReg[0];
inst_rcp->U.I.SrcReg[0].Swizzle =
RC_MAKE_SWIZZLE_SMEAR(GET_SWZ(inst->U.I.SrcReg[0].Swizzle, 3));
}
- /* Perspective-divide Z by W (if it's TXP) and add the texture sample (see below). */
- tmp_sum = rc_find_free_temporary(c);
- inst_mad = rc_insert_new_instruction(c, inst_rcp ? inst_rcp : inst);
- inst_mad->U.I.DstReg.File = RC_FILE_TEMPORARY;
- inst_mad->U.I.DstReg.Index = tmp_sum;
- inst_mad->U.I.SrcReg[0] = inst->U.I.SrcReg[0];
- inst_mad->U.I.SrcReg[0].Swizzle =
+ /* Divide Z by W (if it's TXP) and saturate. */
+ inst_mul = rc_insert_new_instruction(c, inst_rcp ? inst_rcp : inst);
+ inst_mul->U.I.Opcode = inst->U.I.Opcode == RC_OPCODE_TXP ? RC_OPCODE_MUL : RC_OPCODE_MOV;
+ inst_mul->U.I.DstReg.File = RC_FILE_TEMPORARY;
+ inst_mul->U.I.DstReg.Index = tmp_sum;
+ inst_mul->U.I.DstReg.WriteMask = RC_MASK_W;
+ inst_mul->U.I.SaturateMode = RC_SATURATE_ZERO_ONE;
+ inst_mul->U.I.SrcReg[0] = inst->U.I.SrcReg[0];
+ inst_mul->U.I.SrcReg[0].Swizzle =
RC_MAKE_SWIZZLE_SMEAR(GET_SWZ(inst->U.I.SrcReg[0].Swizzle, 2));
if (inst->U.I.Opcode == RC_OPCODE_TXP) {
- inst_mad->U.I.Opcode = RC_OPCODE_MAD;
- inst_mad->U.I.SrcReg[1].File = RC_FILE_TEMPORARY;
- inst_mad->U.I.SrcReg[1].Index = tmp_recip_w;
- inst_mad->U.I.SrcReg[1].Swizzle = RC_SWIZZLE_WWWW;
- tex = 2;
- } else {
- inst_mad->U.I.Opcode = RC_OPCODE_ADD;
- tex = 1;
- }
- inst_mad->U.I.SrcReg[tex].File = RC_FILE_TEMPORARY;
- inst_mad->U.I.SrcReg[tex].Index = tmp_texsample;
- inst_mad->U.I.SrcReg[tex].Swizzle = compiler->state.unit[inst->U.I.TexSrcUnit].depth_texture_swizzle;
-
- /* Fake EQUAL/NOTEQUAL, it seems to pass some tests suprisingly. */
- if (comparefunc == RC_COMPARE_FUNC_EQUAL) {
- comparefunc = RC_COMPARE_FUNC_GEQUAL;
- } else if (comparefunc == RC_COMPARE_FUNC_NOTEQUAL) {
- comparefunc = RC_COMPARE_FUNC_LESS;
+ inst_mul->U.I.SrcReg[1].File = RC_FILE_TEMPORARY;
+ inst_mul->U.I.SrcReg[1].Index = tmp_sum;
+ inst_mul->U.I.SrcReg[1].Swizzle = RC_SWIZZLE_WWWW;
}
- /* Recall that SrcReg[0] is r, SrcReg[tex] is tex and:
+ /* Add the depth texture value. */
+ inst_add = rc_insert_new_instruction(c, inst_mul);
+ inst_add->U.I.Opcode = RC_OPCODE_ADD;
+ inst_add->U.I.DstReg.File = RC_FILE_TEMPORARY;
+ inst_add->U.I.DstReg.Index = tmp_sum;
+ inst_add->U.I.DstReg.WriteMask = RC_MASK_W;
+ inst_add->U.I.SrcReg[0].File = RC_FILE_TEMPORARY;
+ inst_add->U.I.SrcReg[0].Index = tmp_sum;
+ inst_add->U.I.SrcReg[0].Swizzle = RC_SWIZZLE_WWWW;
+ inst_add->U.I.SrcReg[1].File = RC_FILE_TEMPORARY;
+ inst_add->U.I.SrcReg[1].Index = tmp_texsample;
+ inst_add->U.I.SrcReg[1].Swizzle = RC_SWIZZLE_XXXX;
+
+ /* Note that SrcReg[0] is r, SrcReg[1] is tex and:
* LESS: r < tex <=> -tex+r < 0
* GEQUAL: r >= tex <=> not (-tex+r < 0)
* GREATER: r > tex <=> tex-r < 0
* LEQUAL: r <= tex <=> not ( tex-r < 0)
- *
- * This negates either r or tex: */
- if (comparefunc == RC_COMPARE_FUNC_LESS || comparefunc == RC_COMPARE_FUNC_GEQUAL)
- inst_mad->U.I.SrcReg[tex].Negate = inst_mad->U.I.SrcReg[tex].Negate ^ RC_MASK_XYZW;
+ * EQUAL: GEQUAL
+ * NOTEQUAL:LESS
+ */
+
+ /* This negates either r or tex: */
+ if (comparefunc == RC_COMPARE_FUNC_LESS || comparefunc == RC_COMPARE_FUNC_GEQUAL ||
+ comparefunc == RC_COMPARE_FUNC_EQUAL || comparefunc == RC_COMPARE_FUNC_NOTEQUAL)
+ inst_add->U.I.SrcReg[1].Negate = inst_add->U.I.SrcReg[1].Negate ^ RC_MASK_XYZW;
else
- inst_mad->U.I.SrcReg[0].Negate = inst_mad->U.I.SrcReg[0].Negate ^ RC_MASK_XYZW;
+ inst_add->U.I.SrcReg[0].Negate = inst_add->U.I.SrcReg[0].Negate ^ RC_MASK_XYZW;
/* This negates the whole expresion: */
- if (comparefunc == RC_COMPARE_FUNC_LESS || comparefunc == RC_COMPARE_FUNC_GREATER) {
+ if (comparefunc == RC_COMPARE_FUNC_LESS || comparefunc == RC_COMPARE_FUNC_GREATER ||
+ comparefunc == RC_COMPARE_FUNC_NOTEQUAL) {
pass = 1;
fail = 2;
} else {
@@ -231,16 +233,19 @@ int radeonTransformTEX(
fail = 1;
}
- inst_cmp = rc_insert_new_instruction(c, inst_mad);
+ inst_cmp = rc_insert_new_instruction(c, inst_add);
inst_cmp->U.I.Opcode = RC_OPCODE_CMP;
inst_cmp->U.I.DstReg = output_reg;
inst_cmp->U.I.SrcReg[0].File = RC_FILE_TEMPORARY;
inst_cmp->U.I.SrcReg[0].Index = tmp_sum;
+ inst_cmp->U.I.SrcReg[0].Swizzle =
+ combine_swizzles(RC_SWIZZLE_WWWW,
+ compiler->state.unit[inst->U.I.TexSrcUnit].depth_texture_swizzle);
inst_cmp->U.I.SrcReg[pass].File = RC_FILE_NONE;
inst_cmp->U.I.SrcReg[pass].Swizzle = RC_SWIZZLE_1111;
inst_cmp->U.I.SrcReg[fail] = shadow_ambient(compiler, inst->U.I.TexSrcUnit);
- assert(tmp_texsample != tmp_sum && tmp_sum != tmp_recip_w);
+ assert(tmp_texsample != tmp_sum);
}
}
@@ -420,17 +425,21 @@ int radeonTransformTEX(
scale_texcoords(compiler, inst, RC_STATE_R300_TEXSCALE_FACTOR);
}
- /* Cannot write texture to output registers (all chips) or with masks (non-r500) */
+ /* Cannot write texture to output registers or with saturate (all chips),
+ * or with masks (non-r500). */
if (inst->U.I.Opcode != RC_OPCODE_KIL &&
(inst->U.I.DstReg.File != RC_FILE_TEMPORARY ||
+ inst->U.I.SaturateMode ||
(!c->is_r500 && inst->U.I.DstReg.WriteMask != RC_MASK_XYZW))) {
struct rc_instruction * inst_mov = rc_insert_new_instruction(c, inst);
inst_mov->U.I.Opcode = RC_OPCODE_MOV;
+ inst_mov->U.I.SaturateMode = inst->U.I.SaturateMode;
inst_mov->U.I.DstReg = inst->U.I.DstReg;
inst_mov->U.I.SrcReg[0].File = RC_FILE_TEMPORARY;
inst_mov->U.I.SrcReg[0].Index = rc_find_free_temporary(c);
+ inst->U.I.SaturateMode = 0;
inst->U.I.DstReg.File = RC_FILE_TEMPORARY;
inst->U.I.DstReg.Index = inst_mov->U.I.SrcReg[0].Index;
inst->U.I.DstReg.WriteMask = RC_MASK_XYZW;
diff --git a/src/mesa/drivers/dri/r300/compiler/radeon_rename_regs.c b/src/mesa/drivers/dri/r300/compiler/radeon_rename_regs.c
index 88165f78953..5bd19c0b9c6 100644
--- a/src/mesa/drivers/dri/r300/compiler/radeon_rename_regs.c
+++ b/src/mesa/drivers/dri/r300/compiler/radeon_rename_regs.c
@@ -51,6 +51,14 @@ void rc_rename_regs(struct radeon_compiler *c, void *user)
struct rc_reader_data reader_data;
unsigned char * used;
+ /* XXX Remove this once the register allocation works with flow control. */
+ for(inst = c->Program.Instructions.Next;
+ inst != &c->Program.Instructions;
+ inst = inst->Next) {
+ if (inst->U.I.Opcode == RC_OPCODE_BGNLOOP)
+ return;
+ }
+
used_length = 2 * rc_recompute_ips(c);
used = memory_pool_malloc(&c->Pool, sizeof(unsigned char) * used_length);
memset(used, 0, sizeof(unsigned char) * used_length);
diff --git a/src/mesa/drivers/dri/r300/r300_blit.c b/src/mesa/drivers/dri/r300/r300_blit.c
index 9fd8e8fde5f..14e60866d93 100644
--- a/src/mesa/drivers/dri/r300/r300_blit.c
+++ b/src/mesa/drivers/dri/r300/r300_blit.c
@@ -63,7 +63,6 @@ static void create_vertex_program(struct r300_context *r300)
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;
@@ -76,7 +75,6 @@ static void create_vertex_program(struct r300_context *r300)
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;
@@ -131,6 +129,7 @@ static void create_fragment_program(struct r300_context *r300)
compiler.Base.max_temp_regs = (compiler.Base.is_r500) ? 128 : 32;
compiler.Base.max_constants = compiler.Base.is_r500 ? 256 : 32;
compiler.Base.max_alu_insts = compiler.Base.is_r500 ? 512 : 64;
+ compiler.Base.max_tex_insts = compiler.Base.is_r500 ? 512 : 32;
compiler.code = &r300->blit.fp_code;
compiler.AllocateHwInputs = fp_allocate_hw_inputs;
diff --git a/src/mesa/drivers/dri/r300/r300_context.c b/src/mesa/drivers/dri/r300/r300_context.c
index c288834d243..0d8bd4fc706 100644
--- a/src/mesa/drivers/dri/r300/r300_context.c
+++ b/src/mesa/drivers/dri/r300/r300_context.c
@@ -43,6 +43,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "main/extensions.h"
#include "main/bufferobj.h"
#include "main/texobj.h"
+#include "main/mfeatures.h"
#include "swrast/swrast.h"
#include "swrast_setup/swrast_setup.h"
diff --git a/src/mesa/drivers/dri/r300/r300_fragprog_common.c b/src/mesa/drivers/dri/r300/r300_fragprog_common.c
index 4e457b51eba..a0a26f1b38d 100644
--- a/src/mesa/drivers/dri/r300/r300_fragprog_common.c
+++ b/src/mesa/drivers/dri/r300/r300_fragprog_common.c
@@ -226,6 +226,7 @@ static void translate_fragment_program(struct gl_context *ctx, struct r300_fragm
compiler.Base.max_temp_regs = (compiler.Base.is_r500) ? 128 : 32;
compiler.Base.max_constants = compiler.Base.is_r500 ? 256 : 32;
compiler.Base.max_alu_insts = compiler.Base.is_r500 ? 512 : 64;
+ compiler.Base.max_tex_insts = compiler.Base.is_r500 ? 512 : 32;
compiler.OutputDepth = FRAG_RESULT_DEPTH;
memset(compiler.OutputColor, 0, 4 * sizeof(unsigned));
compiler.OutputColor[0] = FRAG_RESULT_COLOR;
diff --git a/src/mesa/drivers/dri/r300/r300_reg.h b/src/mesa/drivers/dri/r300/r300_reg.h
index f7705b0f6fe..2b9d85fae8b 100644
--- a/src/mesa/drivers/dri/r300/r300_reg.h
+++ b/src/mesa/drivers/dri/r300/r300_reg.h
@@ -1658,6 +1658,10 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
# define R300_PFS_CNTL_TEX_OFFSET_MASK (31 << 13)
# define R300_PFS_CNTL_TEX_END_SHIFT 18
# define R300_PFS_CNTL_TEX_END_MASK (31 << 18)
+# define R400_PFS_CNTL_TEX_OFFSET_MSB_SHIFT 24
+# define R400_PFS_CNTL_TEX_OFFSET_MSB_MASK (0xf << 24)
+# define R400_PFS_CNTL_TEX_END_MSB_SHIFT 28
+# define R400_PFS_CNTL_TEX_END_MSB_MASK (0xf << 28)
/* gap */
@@ -1682,6 +1686,10 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
# define R300_TEX_SIZE_MASK (31 << 17)
# define R300_RGBA_OUT (1 << 22)
# define R300_W_OUT (1 << 23)
+# define R400_TEX_START_MSB_SHIFT 24
+# define R400_TEX_START_MSG_MASK (0xf << 24)
+# define R400_TEX_SIZE_MSB_SHIFT 28
+# define R400_TEX_SIZE_MSG_MASK (0xf << 28)
/* TEX
* As far as I can tell, texture instructions cannot write into output
@@ -1702,6 +1710,8 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
# define R300_TEX_OP_TXP 3
# define R300_TEX_OP_TXB 4
# define R300_TEX_INST_MASK (7 << 15)
+# define R400_SRC_ADDR_EXT_BIT (1 << 19)
+# define R400_DST_ADDR_EXT_BIT (1 << 20)
/* Output format from the unfied shader */
#define R300_US_OUT_FMT 0x46A4
@@ -1979,6 +1989,40 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
# define R300_ALU_OUTA_CLAMP (1 << 30)
/* END: Fragment program instruction set */
+/* R4xx extended fragment shader registers. */
+#define R400_US_ALU_EXT_ADDR_0 0x4ac0 /* up to 63 (0x4bbc) */
+# define R400_ADDR_EXT_RGB_MSB_BIT(x) (1 << (x))
+# define R400_ADDRD_EXT_RGB_MSB_BIT 0x08
+# define R400_ADDR_EXT_A_MSB_BIT(x) (1 << ((x) + 4))
+# define R400_ADDRD_EXT_A_MSB_BIT 0x80
+
+#define R400_US_CODE_BANK 0x46b8
+# define R400_BANK_SHIFT 0
+# define R400_BANK_MASK 0xf
+# define R400_R390_MODE_ENABLE (1 << 4)
+#define R400_US_CODE_EXT 0x46bc
+# define R400_ALU_OFFSET_MSB_SHIFT 0
+# define R400_ALU_OFFSET_MSB_MASK (0x7 << 0)
+# define R400_ALU_SIZE_MSB_SHIFT 3
+# define R400_ALU_SIZE_MSB_MASK (0x7 << 3)
+# define R400_ALU_START0_MSB_SHIFT 6
+# define R400_ALU_START0_MSB_MASK (0x7 << 6)
+# define R400_ALU_SIZE0_MSB_SHIFT 9
+# define R400_ALU_SIZE0_MSB_MASK (0x7 << 9)
+# define R400_ALU_START1_MSB_SHIFT 12
+# define R400_ALU_START1_MSB_MASK (0x7 << 12)
+# define R400_ALU_SIZE1_MSB_SHIFT 15
+# define R400_ALU_SIZE1_MSB_MASK (0x7 << 15)
+# define R400_ALU_START2_MSB_SHIFT 18
+# define R400_ALU_START2_MSB_MASK (0x7 << 18)
+# define R400_ALU_SIZE2_MSB_SHIFT 21
+# define R400_ALU_SIZE2_MSB_MASK (0x7 << 21)
+# define R400_ALU_START3_MSB_SHIFT 24
+# define R400_ALU_START3_MSB_MASK (0x7 << 24)
+# define R400_ALU_SIZE3_MSB_SHIFT 27
+# define R400_ALU_SIZE3_MSB_MASK (0x7 << 27)
+/* END: R4xx extended fragment shader registers. */
+
/* Fog: Fog Blending Enable */
#define R300_FG_FOG_BLEND 0x4bc0
# define R300_FG_FOG_BLEND_DISABLE (0 << 0)
diff --git a/src/mesa/drivers/dri/r300/r300_state.c b/src/mesa/drivers/dri/r300/r300_state.c
index ab8c1df5f74..51989c6b224 100644
--- a/src/mesa/drivers/dri/r300/r300_state.c
+++ b/src/mesa/drivers/dri/r300/r300_state.c
@@ -214,18 +214,18 @@ static void r300SetBlendState(struct gl_context * ctx)
(R300_BLEND_GL_ZERO << R300_DST_BLEND_SHIFT);
int eqnA = R300_COMB_FCN_ADD_CLAMP;
- if (RGBA_LOGICOP_ENABLED(ctx) || !ctx->Color.BlendEnabled) {
+ if (_mesa_rgba_logicop_enabled(ctx) || !ctx->Color.BlendEnabled) {
r300SetBlendCntl(r300, func, eqn, 0, func, eqn);
return;
}
func =
- (blend_factor(ctx->Color.BlendSrcRGB, GL_TRUE) <<
- R300_SRC_BLEND_SHIFT) | (blend_factor(ctx->Color.BlendDstRGB,
+ (blend_factor(ctx->Color.Blend[0].SrcRGB, GL_TRUE) <<
+ R300_SRC_BLEND_SHIFT) | (blend_factor(ctx->Color.Blend[0].DstRGB,
GL_FALSE) <<
R300_DST_BLEND_SHIFT);
- switch (ctx->Color.BlendEquationRGB) {
+ switch (ctx->Color.Blend[0].EquationRGB) {
case GL_FUNC_ADD:
eqn = R300_COMB_FCN_ADD_CLAMP;
break;
@@ -253,17 +253,17 @@ static void r300SetBlendState(struct gl_context * ctx)
default:
fprintf(stderr,
"[%s:%u] Invalid RGB blend equation (0x%04x).\n",
- __FUNCTION__, __LINE__, ctx->Color.BlendEquationRGB);
+ __FUNCTION__, __LINE__, ctx->Color.Blend[0].EquationRGB);
return;
}
funcA =
- (blend_factor(ctx->Color.BlendSrcA, GL_TRUE) <<
- R300_SRC_BLEND_SHIFT) | (blend_factor(ctx->Color.BlendDstA,
+ (blend_factor(ctx->Color.Blend[0].SrcA, GL_TRUE) <<
+ R300_SRC_BLEND_SHIFT) | (blend_factor(ctx->Color.Blend[0].DstA,
GL_FALSE) <<
R300_DST_BLEND_SHIFT);
- switch (ctx->Color.BlendEquationA) {
+ switch (ctx->Color.Blend[0].EquationA) {
case GL_FUNC_ADD:
eqnA = R300_COMB_FCN_ADD_CLAMP;
break;
@@ -291,7 +291,7 @@ static void r300SetBlendState(struct gl_context * ctx)
default:
fprintf(stderr,
"[%s:%u] Invalid A blend equation (0x%04x).\n",
- __FUNCTION__, __LINE__, ctx->Color.BlendEquationA);
+ __FUNCTION__, __LINE__, ctx->Color.Blend[0].EquationA);
return;
}
@@ -335,7 +335,7 @@ static void r300SetLogicOpState(struct gl_context *ctx)
{
r300ContextPtr r300 = R300_CONTEXT(ctx);
R300_STATECHANGE(r300, rop);
- if (RGBA_LOGICOP_ENABLED(ctx)) {
+ if (_mesa_rgba_logicop_enabled(ctx)) {
r300->hw.rop.cmd[1] = R300_RB3D_ROPCNTL_ROP_ENABLE |
translate_logicop(ctx->Color.LogicOp);
} else {
@@ -349,7 +349,7 @@ static void r300SetLogicOpState(struct gl_context *ctx)
*/
static void r300LogicOpcode(struct gl_context *ctx, GLenum logicop)
{
- if (RGBA_LOGICOP_ENABLED(ctx))
+ if (_mesa_rgba_logicop_enabled(ctx))
r300SetLogicOpState(ctx);
}
diff --git a/src/mesa/drivers/dri/r300/r300_tex.c b/src/mesa/drivers/dri/r300/r300_tex.c
index de662939992..f930b4d06bf 100644
--- a/src/mesa/drivers/dri/r300/r300_tex.c
+++ b/src/mesa/drivers/dri/r300/r300_tex.c
@@ -38,6 +38,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "main/context.h"
#include "main/enums.h"
#include "main/image.h"
+#include "main/mfeatures.h"
#include "main/mipmap.h"
#include "main/simple_list.h"
#include "main/texstore.h"
diff --git a/src/mesa/drivers/dri/r300/radeon_mesa_to_rc.c b/src/mesa/drivers/dri/r300/radeon_mesa_to_rc.c
index 471a3723cb9..232603ece59 100644
--- a/src/mesa/drivers/dri/r300/radeon_mesa_to_rc.c
+++ b/src/mesa/drivers/dri/r300/radeon_mesa_to_rc.c
@@ -128,7 +128,6 @@ static void translate_dstreg(struct rc_dst_register * dest, struct prog_dst_regi
{
dest->File = translate_register_file(src->File);
dest->Index = src->Index;
- dest->RelAddr = src->RelAddr;
dest->WriteMask = src->WriteMask;
}
diff --git a/src/mesa/drivers/dri/r600/evergreen_blit.c b/src/mesa/drivers/dri/r600/evergreen_blit.c
index fc9fa9d22c7..e07da8c15b4 100644
--- a/src/mesa/drivers/dri/r600/evergreen_blit.c
+++ b/src/mesa/drivers/dri/r600/evergreen_blit.c
@@ -1406,9 +1406,95 @@ eg_set_default_state(context_t *context)
num_hs_stack_entries = 85;
num_ls_stack_entries = 85;
break;
+ case CHIP_FAMILY_PALM:
+ num_ps_gprs = 93;
+ num_vs_gprs = 46;
+ num_temp_gprs = 4;
+ num_gs_gprs = 31;
+ num_es_gprs = 31;
+ num_hs_gprs = 23;
+ num_ls_gprs = 23;
+ num_ps_threads = 96;
+ num_vs_threads = 16;
+ num_gs_threads = 16;
+ num_es_threads = 16;
+ num_hs_threads = 16;
+ num_ls_threads = 16;
+ num_ps_stack_entries = 42;
+ num_vs_stack_entries = 42;
+ num_gs_stack_entries = 42;
+ num_es_stack_entries = 42;
+ num_hs_stack_entries = 42;
+ num_ls_stack_entries = 42;
+ break;
+ case CHIP_FAMILY_BARTS:
+ num_ps_gprs = 93;
+ num_vs_gprs = 46;
+ num_temp_gprs = 4;
+ num_gs_gprs = 31;
+ num_es_gprs = 31;
+ num_hs_gprs = 23;
+ num_ls_gprs = 23;
+ num_ps_threads = 128;
+ num_vs_threads = 20;
+ num_gs_threads = 20;
+ num_es_threads = 20;
+ num_hs_threads = 20;
+ num_ls_threads = 20;
+ num_ps_stack_entries = 85;
+ num_vs_stack_entries = 85;
+ num_gs_stack_entries = 85;
+ num_es_stack_entries = 85;
+ num_hs_stack_entries = 85;
+ num_ls_stack_entries = 85;
+ break;
+ case CHIP_FAMILY_TURKS:
+ num_ps_gprs = 93;
+ num_vs_gprs = 46;
+ num_temp_gprs = 4;
+ num_gs_gprs = 31;
+ num_es_gprs = 31;
+ num_hs_gprs = 23;
+ num_ls_gprs = 23;
+ num_ps_threads = 128;
+ num_vs_threads = 20;
+ num_gs_threads = 20;
+ num_es_threads = 20;
+ num_hs_threads = 20;
+ num_ls_threads = 20;
+ num_ps_stack_entries = 42;
+ num_vs_stack_entries = 42;
+ num_gs_stack_entries = 42;
+ num_es_stack_entries = 42;
+ num_hs_stack_entries = 42;
+ num_ls_stack_entries = 42;
+ break;
+ case CHIP_FAMILY_CAICOS:
+ num_ps_gprs = 93;
+ num_vs_gprs = 46;
+ num_temp_gprs = 4;
+ num_gs_gprs = 31;
+ num_es_gprs = 31;
+ num_hs_gprs = 23;
+ num_ls_gprs = 23;
+ num_ps_threads = 128;
+ num_vs_threads = 10;
+ num_gs_threads = 10;
+ num_es_threads = 10;
+ num_hs_threads = 10;
+ num_ls_threads = 10;
+ num_ps_stack_entries = 42;
+ num_vs_stack_entries = 42;
+ num_gs_stack_entries = 42;
+ num_es_stack_entries = 42;
+ num_hs_stack_entries = 42;
+ num_ls_stack_entries = 42;
+ break;
}
- if (context->radeon.radeonScreen->chip_family == CHIP_FAMILY_CEDAR)
+ if ((context->radeon.radeonScreen->chip_family == CHIP_FAMILY_CEDAR) ||
+ (context->radeon.radeonScreen->chip_family == CHIP_FAMILY_PALM) ||
+ (context->radeon.radeonScreen->chip_family == CHIP_FAMILY_CAICOS))
CLEARbit(sq_config, EG_SQ_CONFIG__VC_ENABLE_bit);
else
SETbit(sq_config, EG_SQ_CONFIG__VC_ENABLE_bit);
diff --git a/src/mesa/drivers/dri/r600/evergreen_fragprog.c b/src/mesa/drivers/dri/r600/evergreen_fragprog.c
index cfb923efdd5..e527c379b62 100644
--- a/src/mesa/drivers/dri/r600/evergreen_fragprog.c
+++ b/src/mesa/drivers/dri/r600/evergreen_fragprog.c
@@ -624,10 +624,7 @@ GLboolean evergreenSetupFragmentProgram(struct gl_context * ctx)
SETbit(evergreen->SPI_PS_INPUT_CNTL[ui].u32All, SEL_CENTROID_bit);
SETfield(evergreen->SPI_PS_INPUT_CNTL[ui].u32All, ui,
SEMANTIC_shift, SEMANTIC_mask);
- if (evergreen->SPI_INTERP_CONTROL_0.u32All & FLAT_SHADE_ENA_bit)
- SETbit(evergreen->SPI_PS_INPUT_CNTL[ui].u32All, FLAT_SHADE_bit);
- else
- CLEARbit(evergreen->SPI_PS_INPUT_CNTL[ui].u32All, FLAT_SHADE_bit);
+ CLEARbit(evergreen->SPI_PS_INPUT_CNTL[ui].u32All, FLAT_SHADE_bit);
}
unBit = 1 << VERT_RESULT_COL0;
@@ -663,10 +660,7 @@ GLboolean evergreenSetupFragmentProgram(struct gl_context * ctx)
SETbit(evergreen->SPI_PS_INPUT_CNTL[ui].u32All, SEL_CENTROID_bit);
SETfield(evergreen->SPI_PS_INPUT_CNTL[ui].u32All, ui,
SEMANTIC_shift, SEMANTIC_mask);
- if (evergreen->SPI_INTERP_CONTROL_0.u32All & FLAT_SHADE_ENA_bit)
- SETbit(evergreen->SPI_PS_INPUT_CNTL[ui].u32All, FLAT_SHADE_bit);
- else
- CLEARbit(evergreen->SPI_PS_INPUT_CNTL[ui].u32All, FLAT_SHADE_bit);
+ CLEARbit(evergreen->SPI_PS_INPUT_CNTL[ui].u32All, FLAT_SHADE_bit);
}
for(i=0; i<8; i++)
@@ -694,10 +688,7 @@ GLboolean evergreenSetupFragmentProgram(struct gl_context * ctx)
SETbit(evergreen->SPI_PS_INPUT_CNTL[ui].u32All, SEL_CENTROID_bit);
SETfield(evergreen->SPI_PS_INPUT_CNTL[ui].u32All, ui,
SEMANTIC_shift, SEMANTIC_mask);
- if (evergreen->SPI_INTERP_CONTROL_0.u32All & FLAT_SHADE_ENA_bit)
- SETbit(evergreen->SPI_PS_INPUT_CNTL[ui].u32All, FLAT_SHADE_bit);
- else
- CLEARbit(evergreen->SPI_PS_INPUT_CNTL[ui].u32All, FLAT_SHADE_bit);
+ CLEARbit(evergreen->SPI_PS_INPUT_CNTL[ui].u32All, FLAT_SHADE_bit);
}
unBit = 1 << FRAG_ATTRIB_PNTC;
if(mesa_fp->Base.InputsRead & unBit)
@@ -706,10 +697,7 @@ GLboolean evergreenSetupFragmentProgram(struct gl_context * ctx)
SETbit(evergreen->SPI_PS_INPUT_CNTL[ui].u32All, SEL_CENTROID_bit);
SETfield(evergreen->SPI_PS_INPUT_CNTL[ui].u32All, ui,
SEMANTIC_shift, SEMANTIC_mask);
- if (evergreen->SPI_INTERP_CONTROL_0.u32All & FLAT_SHADE_ENA_bit)
- SETbit(evergreen->SPI_PS_INPUT_CNTL[ui].u32All, FLAT_SHADE_bit);
- else
- CLEARbit(evergreen->SPI_PS_INPUT_CNTL[ui].u32All, FLAT_SHADE_bit);
+ CLEARbit(evergreen->SPI_PS_INPUT_CNTL[ui].u32All, FLAT_SHADE_bit);
SETbit(evergreen->SPI_PS_INPUT_CNTL[ui].u32All, PT_SPRITE_TEX_bit);
}
@@ -725,10 +713,7 @@ GLboolean evergreenSetupFragmentProgram(struct gl_context * ctx)
SETbit(evergreen->SPI_PS_INPUT_CNTL[ui].u32All, SEL_CENTROID_bit);
SETfield(evergreen->SPI_PS_INPUT_CNTL[ui].u32All, ui,
SEMANTIC_shift, SEMANTIC_mask);
- if (evergreen->SPI_INTERP_CONTROL_0.u32All & FLAT_SHADE_ENA_bit)
- SETbit(evergreen->SPI_PS_INPUT_CNTL[ui].u32All, FLAT_SHADE_bit);
- else
- CLEARbit(evergreen->SPI_PS_INPUT_CNTL[ui].u32All, FLAT_SHADE_bit);
+ CLEARbit(evergreen->SPI_PS_INPUT_CNTL[ui].u32All, FLAT_SHADE_bit);
}
}
diff --git a/src/mesa/drivers/dri/r600/evergreen_state.c b/src/mesa/drivers/dri/r600/evergreen_state.c
index 076a608573c..309c93fe088 100644
--- a/src/mesa/drivers/dri/r600/evergreen_state.c
+++ b/src/mesa/drivers/dri/r600/evergreen_state.c
@@ -32,6 +32,7 @@
#include "main/context.h"
#include "main/dd.h"
#include "main/simple_list.h"
+#include "main/state.h"
#include "tnl/tnl.h"
#include "tnl/t_pipeline.h"
@@ -342,7 +343,7 @@ static void evergreenSetBlendState(struct gl_context * ctx) //diff : CB_COLOR_CO
EVERGREEN_STATECHANGE(context, cb);
- if (RGBA_LOGICOP_ENABLED(ctx) || !ctx->Color.BlendEnabled) {
+ if (_mesa_rgba_logicop_enabled(ctx) || !ctx->Color.BlendEnabled) {
SETfield(blend_reg,
BLEND_ONE, COLOR_SRCBLEND_shift, COLOR_SRCBLEND_mask);
SETfield(blend_reg,
@@ -363,13 +364,13 @@ static void evergreenSetBlendState(struct gl_context * ctx) //diff : CB_COLOR_CO
}
SETfield(blend_reg,
- evergreenblend_factor(ctx->Color.BlendSrcRGB, GL_TRUE),
+ evergreenblend_factor(ctx->Color.Blend[0].SrcRGB, GL_TRUE),
COLOR_SRCBLEND_shift, COLOR_SRCBLEND_mask);
SETfield(blend_reg,
- evergreenblend_factor(ctx->Color.BlendDstRGB, GL_FALSE),
+ evergreenblend_factor(ctx->Color.Blend[0].DstRGB, GL_FALSE),
COLOR_DESTBLEND_shift, COLOR_DESTBLEND_mask);
- switch (ctx->Color.BlendEquationRGB) {
+ switch (ctx->Color.Blend[0].EquationRGB) {
case GL_FUNC_ADD:
eqn = COMB_DST_PLUS_SRC;
break;
@@ -401,20 +402,20 @@ static void evergreenSetBlendState(struct gl_context * ctx) //diff : CB_COLOR_CO
default:
fprintf(stderr,
"[%s:%u] Invalid RGB blend equation (0x%04x).\n",
- __FUNCTION__, __LINE__, ctx->Color.BlendEquationRGB);
+ __FUNCTION__, __LINE__, ctx->Color.Blend[0].EquationRGB);
return;
}
SETfield(blend_reg,
eqn, COLOR_COMB_FCN_shift, COLOR_COMB_FCN_mask);
SETfield(blend_reg,
- evergreenblend_factor(ctx->Color.BlendSrcA, GL_TRUE),
+ evergreenblend_factor(ctx->Color.Blend[0].SrcA, GL_TRUE),
ALPHA_SRCBLEND_shift, ALPHA_SRCBLEND_mask);
SETfield(blend_reg,
- evergreenblend_factor(ctx->Color.BlendDstA, GL_FALSE),
+ evergreenblend_factor(ctx->Color.Blend[0].DstA, GL_FALSE),
ALPHA_DESTBLEND_shift, ALPHA_DESTBLEND_mask);
- switch (ctx->Color.BlendEquationA) {
+ switch (ctx->Color.Blend[0].EquationA) {
case GL_FUNC_ADD:
eqnA = COMB_DST_PLUS_SRC;
break;
@@ -445,7 +446,7 @@ static void evergreenSetBlendState(struct gl_context * ctx) //diff : CB_COLOR_CO
default:
fprintf(stderr,
"[%s:%u] Invalid A blend equation (0x%04x).\n",
- __FUNCTION__, __LINE__, ctx->Color.BlendEquationA);
+ __FUNCTION__, __LINE__, ctx->Color.Blend[0].EquationA);
return;
}
@@ -520,7 +521,7 @@ static void evergreenSetLogicOpState(struct gl_context *ctx) //diff : CB_COLOR_C
EVERGREEN_STATECHANGE(context, cb);
- if (RGBA_LOGICOP_ENABLED(ctx))
+ if (_mesa_rgba_logicop_enabled(ctx))
SETfield(evergreen->CB_COLOR_CONTROL.u32All,
evergreen_translate_logicop(ctx->Color.LogicOp),
EG_CB_COLOR_CONTROL__ROP3_shift,
@@ -1148,7 +1149,7 @@ static void evergreenShadeModel(struct gl_context * ctx, GLenum mode) //same
static void evergreenLogicOpcode(struct gl_context *ctx, GLenum logicop) //diff
{
- if (RGBA_LOGICOP_ENABLED(ctx))
+ if (_mesa_rgba_logicop_enabled(ctx))
evergreenSetLogicOpState(ctx);
}
@@ -1469,6 +1470,30 @@ static void evergreenInitSQConfig(struct gl_context * ctx)
uMaxThreads = 192;
uMaxStackEntries = 256;
break;
+ case CHIP_FAMILY_BARTS:
+ uSqNumCfInsts = 2;
+ bVC_ENABLE = GL_TRUE;
+ uMaxGPRs = 256;
+ uPSThreadCount = 128;
+ uMaxThreads = 248;
+ uMaxStackEntries = 512;
+ break;
+ case CHIP_FAMILY_TURKS:
+ uSqNumCfInsts = 2;
+ bVC_ENABLE = GL_TRUE;
+ uMaxGPRs = 256;
+ uPSThreadCount = 128;
+ uMaxThreads = 248;
+ uMaxStackEntries = 256;
+ break;
+ case CHIP_FAMILY_CAICOS:
+ uSqNumCfInsts = 1;
+ bVC_ENABLE = GL_FALSE;
+ uMaxGPRs = 256;
+ uPSThreadCount = 128;
+ uMaxThreads = 192;
+ uMaxStackEntries = 256;
+ break;
default:
uSqNumCfInsts = 2;
bVC_ENABLE = GL_TRUE;
diff --git a/src/mesa/drivers/dri/r600/r600_context.c b/src/mesa/drivers/dri/r600/r600_context.c
index aa1891eac32..00708be1993 100644
--- a/src/mesa/drivers/dri/r600/r600_context.c
+++ b/src/mesa/drivers/dri/r600/r600_context.c
@@ -44,6 +44,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "main/bufferobj.h"
#include "main/texobj.h"
#include "main/points.h"
+#include "main/mfeatures.h"
#include "swrast/swrast.h"
#include "swrast_setup/swrast_setup.h"
@@ -259,7 +260,7 @@ static void r600InitConstValues(struct gl_context *ctx, radeonScreenPtr screen)
R700_CHIP_CONTEXT *r700 = (R700_CHIP_CONTEXT*)(&context->hw);
if( (context->radeon.radeonScreen->chip_family >= CHIP_FAMILY_CEDAR)
- &&(context->radeon.radeonScreen->chip_family <= CHIP_FAMILY_PALM) )
+ &&(context->radeon.radeonScreen->chip_family <= CHIP_FAMILY_CAICOS) )
{
r700->bShaderUseMemConstant = GL_TRUE;
}
diff --git a/src/mesa/drivers/dri/r600/r600_tex.c b/src/mesa/drivers/dri/r600/r600_tex.c
index c3d68c41e57..fe4f0e48661 100644
--- a/src/mesa/drivers/dri/r600/r600_tex.c
+++ b/src/mesa/drivers/dri/r600/r600_tex.c
@@ -38,6 +38,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "main/context.h"
#include "main/enums.h"
#include "main/image.h"
+#include "main/mfeatures.h"
#include "main/mipmap.h"
#include "main/simple_list.h"
#include "main/texstore.h"
@@ -264,9 +265,9 @@ static void r600SetTexFilter(radeonTexObjPtr t, GLenum minf, GLenum magf, GLfloa
static void r600SetTexBorderColor(radeonTexObjPtr t, const GLfloat color[4])
{
t->TD_PS_SAMPLER0_BORDER_ALPHA = *((uint32_t*)&(color[3]));
- t->TD_PS_SAMPLER0_BORDER_RED = *((uint32_t*)&(color[2]));
+ t->TD_PS_SAMPLER0_BORDER_BLUE = *((uint32_t*)&(color[2]));
t->TD_PS_SAMPLER0_BORDER_GREEN = *((uint32_t*)&(color[1]));
- t->TD_PS_SAMPLER0_BORDER_BLUE = *((uint32_t*)&(color[0]));
+ t->TD_PS_SAMPLER0_BORDER_RED = *((uint32_t*)&(color[0]));
SETfield(t->SQ_TEX_SAMPLER0, SQ_TEX_BORDER_COLOR_REGISTER,
BORDER_COLOR_TYPE_shift, BORDER_COLOR_TYPE_mask);
}
diff --git a/src/mesa/drivers/dri/r600/r700_assembler.c b/src/mesa/drivers/dri/r600/r700_assembler.c
index 1fa559cec1a..024853c1beb 100644
--- a/src/mesa/drivers/dri/r600/r700_assembler.c
+++ b/src/mesa/drivers/dri/r600/r700_assembler.c
@@ -481,6 +481,8 @@ unsigned int EG_GetNumOperands(GLuint opcode, GLuint nIsOp3)
case EG_OP2_INST_FLT_TO_INT:
case EG_OP2_INST_SIN:
case EG_OP2_INST_COS:
+ case EG_OP2_INST_FLT_TO_INT_FLOOR:
+ case EG_OP2_INST_MOVA_INT:
return 1;
default: radeon_error(
@@ -1134,7 +1136,7 @@ GLboolean EG_assemble_vfetch_instruction(r700_AssemblerBase* pAsm,
EG_VTX_WORD1__DST_SEL_W_shift,
EG_VTX_WORD1__DST_SEL_W_mask);
- SETfield(vfetch_instruction_ptr->m_Word1.val, 0, /* use format here, in r6/r7, format used set in const, need to use same */
+ SETfield(vfetch_instruction_ptr->m_Word1.val, 1,
EG_VTX_WORD1__UCF_shift,
EG_VTX_WORD1__UCF_bit);
SETfield(vfetch_instruction_ptr->m_Word1.val, data_format,
@@ -3297,23 +3299,76 @@ GLboolean assemble_ARL(r700_AssemblerBase *pAsm)
return GL_FALSE;
}
- pAsm->D.dst.opcode = SQ_OP2_INST_MOVA_FLOOR;
- setaddrmode_PVSDST(&(pAsm->D.dst), ADDR_ABSOLUTE);
- pAsm->D.dst.rtype = DST_REG_TEMPORARY;
- pAsm->D.dst.reg = 0;
- pAsm->D.dst.writex = 0;
- pAsm->D.dst.writey = 0;
- pAsm->D.dst.writez = 0;
- pAsm->D.dst.writew = 0;
-
- if( GL_FALSE == assemble_src(pAsm, 0, -1) )
+ if(8 == pAsm->unAsic)
{
- return GL_FALSE;
- }
+ /* Evergreen */
- if( GL_FALSE == next_ins(pAsm) )
+ /* Float to Signed Integer Using FLOOR */
+ pAsm->D.dst.opcode = EG_OP2_INST_FLT_TO_INT_FLOOR;
+ setaddrmode_PVSDST(&(pAsm->D.dst), ADDR_ABSOLUTE);
+ pAsm->D.dst.rtype = DST_REG_TEMPORARY;
+ pAsm->D.dst.reg = 0;
+ pAsm->D.dst.writex = 0;
+ pAsm->D.dst.writey = 0;
+ pAsm->D.dst.writez = 0;
+ pAsm->D.dst.writew = 0;
+
+ if( GL_FALSE == assemble_src(pAsm, 0, -1) )
+ {
+ return GL_FALSE;
+ }
+
+ if( GL_FALSE == next_ins(pAsm) )
+ {
+ return GL_FALSE;
+ }
+
+ /* Copy Signed Integer To Integer in AR and GPR */
+ pAsm->D.dst.opcode = EG_OP2_INST_MOVA_INT;
+ setaddrmode_PVSDST(&(pAsm->D.dst), ADDR_ABSOLUTE);
+ pAsm->D.dst.rtype = DST_REG_TEMPORARY;
+ pAsm->D.dst.reg = 0;
+ pAsm->D.dst.writex = 0;
+ pAsm->D.dst.writey = 0;
+ pAsm->D.dst.writez = 0;
+ pAsm->D.dst.writew = 0;
+
+ if( GL_FALSE == assemble_src(pAsm, 0, -1) )
+ {
+ return GL_FALSE;
+ }
+
+ if( GL_FALSE == next_ins(pAsm) )
+ {
+ return GL_FALSE;
+ }
+ }
+ else
{
- return GL_FALSE;
+ /* r6xx/r7xx */
+
+ /* Truncate floating-point to the nearest integer
+ in the range [-256, +255], and copy to AR and
+ to a GPR.
+ */
+ pAsm->D.dst.opcode = SQ_OP2_INST_MOVA_FLOOR;
+ setaddrmode_PVSDST(&(pAsm->D.dst), ADDR_ABSOLUTE);
+ pAsm->D.dst.rtype = DST_REG_TEMPORARY;
+ pAsm->D.dst.reg = 0;
+ pAsm->D.dst.writex = 0;
+ pAsm->D.dst.writey = 0;
+ pAsm->D.dst.writez = 0;
+ pAsm->D.dst.writew = 0;
+
+ if( GL_FALSE == assemble_src(pAsm, 0, -1) )
+ {
+ return GL_FALSE;
+ }
+
+ if( GL_FALSE == next_ins(pAsm) )
+ {
+ return GL_FALSE;
+ }
}
return GL_TRUE;
diff --git a/src/mesa/drivers/dri/r600/r700_fragprog.c b/src/mesa/drivers/dri/r600/r700_fragprog.c
index 2a6a39dfbac..40494cd6af0 100644
--- a/src/mesa/drivers/dri/r600/r700_fragprog.c
+++ b/src/mesa/drivers/dri/r600/r700_fragprog.c
@@ -47,13 +47,13 @@
void insert_wpos_code(struct gl_context *ctx, struct gl_fragment_program *fprog)
{
static const gl_state_index winstate[STATE_LENGTH]
- = { STATE_INTERNAL, STATE_FB_SIZE, 0, 0, 0};
+ = { STATE_INTERNAL, STATE_FB_WPOS_Y_TRANSFORM, 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 */
+ /* PARAM win_size = STATE_FB_WPOS_Y_TRANSFORM */
win_size = _mesa_add_state_reference(fprog->Base.Parameters, winstate);
wpos_temp = fprog->Base.NumTemporaries++;
@@ -74,9 +74,8 @@ void insert_wpos_code(struct gl_context *ctx, struct gl_fragment_program *fprog)
_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;
+ /* possibly invert wpos.y depending on STATE_FB_WPOS_Y_TRANSFORM var */
+ newInst[0].Opcode = OPCODE_MAD;
newInst[0].DstReg.File = PROGRAM_TEMPORARY;
newInst[0].DstReg.Index = wpos_temp;
newInst[0].DstReg.WriteMask = WRITEMASK_XYZW;
@@ -84,11 +83,14 @@ void insert_wpos_code(struct gl_context *ctx, struct gl_fragment_program *fprog)
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);
+ newInst[0].SrcReg[1].Swizzle = MAKE_SWIZZLE4(SWIZZLE_ONE, SWIZZLE_X, SWIZZLE_ONE, SWIZZLE_ONE);
+
+ newInst[0].SrcReg[2].File = PROGRAM_STATE_VAR;
+ newInst[0].SrcReg[2].Index = win_size;
+ newInst[0].SrcReg[2].Swizzle = MAKE_SWIZZLE4(SWIZZLE_ZERO, SWIZZLE_Y, SWIZZLE_ZERO, SWIZZLE_ZERO);
}
@@ -509,6 +511,7 @@ GLboolean r700SetupFragmentProgram(struct gl_context * ctx)
unsigned int ui, i;
unsigned int unNumOfReg;
unsigned int unBit;
+ unsigned int num_sq_ps_gprs;
GLuint exportCount;
GLboolean point_sprite = GL_FALSE;
@@ -619,6 +622,15 @@ GLboolean r700SetupFragmentProgram(struct gl_context * ctx)
SETfield(r700->ps.SQ_PGM_RESOURCES_PS.u32All, ui, NUM_GPRS_shift, NUM_GPRS_mask);
+ num_sq_ps_gprs = ((r700->sq_config.SQ_GPR_RESOURCE_MGMT_1.u32All & NUM_PS_GPRS_mask) >> NUM_PS_GPRS_shift);
+
+ if(ui > num_sq_ps_gprs)
+ {
+ /* care! thich changes sq - needs idle state */
+ R600_STATECHANGE(context, sq);
+ SETfield(r700->sq_config.SQ_GPR_RESOURCE_MGMT_1.u32All, ui, NUM_PS_GPRS_shift, NUM_PS_GPRS_mask);
+ }
+
CLEARbit(r700->ps.SQ_PGM_RESOURCES_PS.u32All, UNCACHED_FIRST_INST_bit);
if(fp->r700Shader.uStackSize) /* we don't use branch for now, it should be zero. */
@@ -645,10 +657,7 @@ GLboolean r700SetupFragmentProgram(struct gl_context * ctx)
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);
+ CLEARbit(r700->SPI_PS_INPUT_CNTL[ui].u32All, FLAT_SHADE_bit);
}
unBit = 1 << VERT_RESULT_COL0;
@@ -684,10 +693,7 @@ GLboolean r700SetupFragmentProgram(struct gl_context * ctx)
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);
+ CLEARbit(r700->SPI_PS_INPUT_CNTL[ui].u32All, FLAT_SHADE_bit);
}
for(i=0; i<8; i++)
@@ -716,10 +722,7 @@ GLboolean r700SetupFragmentProgram(struct gl_context * ctx)
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);
+ CLEARbit(r700->SPI_PS_INPUT_CNTL[ui].u32All, FLAT_SHADE_bit);
}
unBit = 1 << FRAG_ATTRIB_PNTC;
if(mesa_fp->Base.InputsRead & unBit)
@@ -747,10 +750,7 @@ GLboolean r700SetupFragmentProgram(struct gl_context * ctx)
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);
+ CLEARbit(r700->SPI_PS_INPUT_CNTL[ui].u32All, FLAT_SHADE_bit);
}
}
diff --git a/src/mesa/drivers/dri/r600/r700_state.c b/src/mesa/drivers/dri/r600/r700_state.c
index bd04a633b48..4d285b36489 100644
--- a/src/mesa/drivers/dri/r600/r700_state.c
+++ b/src/mesa/drivers/dri/r600/r700_state.c
@@ -32,6 +32,7 @@
#include "main/context.h"
#include "main/dd.h"
#include "main/simple_list.h"
+#include "main/state.h"
#include "tnl/tnl.h"
#include "tnl/t_pipeline.h"
@@ -453,7 +454,7 @@ static void r700SetBlendState(struct gl_context * ctx)
R600_STATECHANGE(context, blnd);
- if (RGBA_LOGICOP_ENABLED(ctx) || !ctx->Color.BlendEnabled) {
+ if (_mesa_rgba_logicop_enabled(ctx) || !ctx->Color.BlendEnabled) {
SETfield(blend_reg,
BLEND_ONE, COLOR_SRCBLEND_shift, COLOR_SRCBLEND_mask);
SETfield(blend_reg,
@@ -474,13 +475,13 @@ static void r700SetBlendState(struct gl_context * ctx)
}
SETfield(blend_reg,
- blend_factor(ctx->Color.BlendSrcRGB, GL_TRUE),
+ blend_factor(ctx->Color.Blend[0].SrcRGB, GL_TRUE),
COLOR_SRCBLEND_shift, COLOR_SRCBLEND_mask);
SETfield(blend_reg,
- blend_factor(ctx->Color.BlendDstRGB, GL_FALSE),
+ blend_factor(ctx->Color.Blend[0].DstRGB, GL_FALSE),
COLOR_DESTBLEND_shift, COLOR_DESTBLEND_mask);
- switch (ctx->Color.BlendEquationRGB) {
+ switch (ctx->Color.Blend[0].EquationRGB) {
case GL_FUNC_ADD:
eqn = COMB_DST_PLUS_SRC;
break;
@@ -512,20 +513,20 @@ static void r700SetBlendState(struct gl_context * ctx)
default:
fprintf(stderr,
"[%s:%u] Invalid RGB blend equation (0x%04x).\n",
- __FUNCTION__, __LINE__, ctx->Color.BlendEquationRGB);
+ __FUNCTION__, __LINE__, ctx->Color.Blend[0].EquationRGB);
return;
}
SETfield(blend_reg,
eqn, COLOR_COMB_FCN_shift, COLOR_COMB_FCN_mask);
SETfield(blend_reg,
- blend_factor(ctx->Color.BlendSrcA, GL_TRUE),
+ blend_factor(ctx->Color.Blend[0].SrcA, GL_TRUE),
ALPHA_SRCBLEND_shift, ALPHA_SRCBLEND_mask);
SETfield(blend_reg,
- blend_factor(ctx->Color.BlendDstA, GL_FALSE),
+ blend_factor(ctx->Color.Blend[0].DstA, GL_FALSE),
ALPHA_DESTBLEND_shift, ALPHA_DESTBLEND_mask);
- switch (ctx->Color.BlendEquationA) {
+ switch (ctx->Color.Blend[0].EquationA) {
case GL_FUNC_ADD:
eqnA = COMB_DST_PLUS_SRC;
break;
@@ -556,7 +557,7 @@ static void r700SetBlendState(struct gl_context * ctx)
default:
fprintf(stderr,
"[%s:%u] Invalid A blend equation (0x%04x).\n",
- __FUNCTION__, __LINE__, ctx->Color.BlendEquationA);
+ __FUNCTION__, __LINE__, ctx->Color.Blend[0].EquationA);
return;
}
@@ -644,7 +645,7 @@ static void r700SetLogicOpState(struct gl_context *ctx)
R600_STATECHANGE(context, blnd);
- if (RGBA_LOGICOP_ENABLED(ctx))
+ if (_mesa_rgba_logicop_enabled(ctx))
SETfield(r700->CB_COLOR_CONTROL.u32All,
translate_logicop(ctx->Color.LogicOp), ROP3_shift, ROP3_mask);
else
@@ -657,7 +658,7 @@ static void r700SetLogicOpState(struct gl_context *ctx)
*/
static void r700LogicOpcode(struct gl_context *ctx, GLenum logicop)
{
- if (RGBA_LOGICOP_ENABLED(ctx))
+ if (_mesa_rgba_logicop_enabled(ctx))
r700SetLogicOpState(ctx);
}
diff --git a/src/mesa/drivers/dri/r600/r700_vertprog.c b/src/mesa/drivers/dri/r600/r700_vertprog.c
index 7ba49d8f986..7d4be9180a0 100644
--- a/src/mesa/drivers/dri/r600/r700_vertprog.c
+++ b/src/mesa/drivers/dri/r600/r700_vertprog.c
@@ -605,6 +605,7 @@ GLboolean r700SetupVertexProgram(struct gl_context * ctx)
struct gl_program_parameter_list *paramList;
unsigned int unNumParamData;
unsigned int ui;
+ unsigned int num_sq_vs_gprs;
if(GL_FALSE == vp->loaded)
{
@@ -656,6 +657,16 @@ GLboolean r700SetupVertexProgram(struct gl_context * ctx)
SETfield(r700->vs.SQ_PGM_RESOURCES_VS.u32All, vp->r700Shader.nRegs + 1,
NUM_GPRS_shift, NUM_GPRS_mask);
+ num_sq_vs_gprs = ((r700->sq_config.SQ_GPR_RESOURCE_MGMT_1.u32All & NUM_VS_GPRS_mask) >> NUM_VS_GPRS_shift);
+
+ if((vp->r700Shader.nRegs + 1) > num_sq_vs_gprs)
+ {
+ /* care! thich changes sq - needs idle state */
+ R600_STATECHANGE(context, sq);
+ SETfield(r700->sq_config.SQ_GPR_RESOURCE_MGMT_1.u32All, vp->r700Shader.nRegs + 1,
+ NUM_VS_GPRS_shift, NUM_VS_GPRS_mask);
+ }
+
if(vp->r700Shader.uStackSize) /* we don't use branch for now, it should be zero. */
{
SETfield(r700->vs.SQ_PGM_RESOURCES_VS.u32All, vp->r700Shader.uStackSize,
diff --git a/src/mesa/drivers/dri/radeon/radeon_bocs_wrapper.h b/src/mesa/drivers/dri/radeon/radeon_bocs_wrapper.h
index 6c2648b6bd8..60f10496026 100644
--- a/src/mesa/drivers/dri/radeon/radeon_bocs_wrapper.h
+++ b/src/mesa/drivers/dri/radeon/radeon_bocs_wrapper.h
@@ -67,6 +67,9 @@ struct drm_radeon_info {
#define DRM_RADEON_INFO 0x1
#endif
+static inline void radeon_gem_get_kernel_name(struct radeon_bo *dummy, uint32_t *value)
+{
+}
static inline uint32_t radeon_gem_name_bo(struct radeon_bo *dummy)
{
diff --git a/src/mesa/drivers/dri/radeon/radeon_chipset.h b/src/mesa/drivers/dri/radeon/radeon_chipset.h
index 82789cec5ed..bd6f1c79504 100644
--- a/src/mesa/drivers/dri/radeon/radeon_chipset.h
+++ b/src/mesa/drivers/dri/radeon/radeon_chipset.h
@@ -34,7 +34,6 @@
#define PCI_CHIP_RV350_AV 0x4156
#define PCI_CHIP_RS250_4237 0x4237
#define PCI_CHIP_R200_BB 0x4242
-#define PCI_CHIP_R200_BC 0x4243
#define PCI_CHIP_RS100_4336 0x4336
#define PCI_CHIP_RS200_4337 0x4337
#define PCI_CHIP_RS250_4437 0x4437
@@ -445,6 +444,45 @@
#define PCI_CHIP_PALM_9804 0x9804
#define PCI_CHIP_PALM_9805 0x9805
+#define PCI_CHIP_BARTS_6720 0x6720
+#define PCI_CHIP_BARTS_6721 0x6721
+#define PCI_CHIP_BARTS_6722 0x6722
+#define PCI_CHIP_BARTS_6723 0x6723
+#define PCI_CHIP_BARTS_6724 0x6724
+#define PCI_CHIP_BARTS_6725 0x6725
+#define PCI_CHIP_BARTS_6726 0x6726
+#define PCI_CHIP_BARTS_6727 0x6727
+#define PCI_CHIP_BARTS_6728 0x6728
+#define PCI_CHIP_BARTS_6729 0x6729
+#define PCI_CHIP_BARTS_6738 0x6738
+#define PCI_CHIP_BARTS_6739 0x6739
+
+#define PCI_CHIP_TURKS_6740 0x6740
+#define PCI_CHIP_TURKS_6741 0x6741
+#define PCI_CHIP_TURKS_6742 0x6742
+#define PCI_CHIP_TURKS_6743 0x6743
+#define PCI_CHIP_TURKS_6744 0x6744
+#define PCI_CHIP_TURKS_6745 0x6745
+#define PCI_CHIP_TURKS_6746 0x6746
+#define PCI_CHIP_TURKS_6747 0x6747
+#define PCI_CHIP_TURKS_6748 0x6748
+#define PCI_CHIP_TURKS_6749 0x6749
+#define PCI_CHIP_TURKS_6750 0x6750
+#define PCI_CHIP_TURKS_6758 0x6758
+#define PCI_CHIP_TURKS_6759 0x6759
+
+#define PCI_CHIP_CAICOS_6760 0x6760
+#define PCI_CHIP_CAICOS_6761 0x6761
+#define PCI_CHIP_CAICOS_6762 0x6762
+#define PCI_CHIP_CAICOS_6763 0x6763
+#define PCI_CHIP_CAICOS_6764 0x6764
+#define PCI_CHIP_CAICOS_6765 0x6765
+#define PCI_CHIP_CAICOS_6766 0x6766
+#define PCI_CHIP_CAICOS_6767 0x6767
+#define PCI_CHIP_CAICOS_6768 0x6768
+#define PCI_CHIP_CAICOS_6770 0x6770
+#define PCI_CHIP_CAICOS_6779 0x6779
+
enum {
CHIP_FAMILY_R100,
CHIP_FAMILY_RV100,
@@ -489,6 +527,9 @@ enum {
CHIP_FAMILY_CYPRESS,
CHIP_FAMILY_HEMLOCK,
CHIP_FAMILY_PALM,
+ CHIP_FAMILY_BARTS,
+ CHIP_FAMILY_TURKS,
+ CHIP_FAMILY_CAICOS,
CHIP_FAMILY_LAST
};
diff --git a/src/mesa/drivers/dri/radeon/radeon_common.c b/src/mesa/drivers/dri/radeon/radeon_common.c
index 7361adffcf7..0d73c0e3b1b 100644
--- a/src/mesa/drivers/dri/radeon/radeon_common.c
+++ b/src/mesa/drivers/dri/radeon/radeon_common.c
@@ -905,7 +905,7 @@ void radeon_viewport(struct gl_context *ctx, GLint x, GLint y, GLsizei width, GL
if (!driContext->driScreenPriv->dri2.enabled)
return;
- if (!radeon->meta.internal_viewport_call && ctx->DrawBuffer->Name == 0) {
+ if (ctx->DrawBuffer->Name == 0) {
if (radeon->is_front_buffer_rendering) {
ctx->Driver.Flush(ctx);
}
diff --git a/src/mesa/drivers/dri/radeon/radeon_common_context.c b/src/mesa/drivers/dri/radeon/radeon_common_context.c
index ca6ab46ca43..405aecb19ec 100644
--- a/src/mesa/drivers/dri/radeon/radeon_common_context.c
+++ b/src/mesa/drivers/dri/radeon/radeon_common_context.c
@@ -100,6 +100,9 @@ static const char* get_chip_family_name(int chip_family)
case CHIP_FAMILY_CYPRESS: return "CYPRESS";
case CHIP_FAMILY_HEMLOCK: return "HEMLOCK";
case CHIP_FAMILY_PALM: return "PALM";
+ case CHIP_FAMILY_BARTS: return "BARTS";
+ case CHIP_FAMILY_TURKS: return "TURKS";
+ case CHIP_FAMILY_CAICOS: return "CAICOS";
default: return "unknown";
}
}
@@ -201,7 +204,7 @@ GLboolean radeonInitContext(radeonContextPtr radeon,
shareCtx = ((radeonContextPtr)sharedContextPrivate)->glCtx;
else
shareCtx = NULL;
- radeon->glCtx = _mesa_create_context(glVisual, shareCtx,
+ radeon->glCtx = _mesa_create_context(API_OPENGL, glVisual, shareCtx,
functions, (void *)radeon);
if (!radeon->glCtx)
return GL_FALSE;
@@ -209,8 +212,6 @@ GLboolean radeonInitContext(radeonContextPtr radeon,
ctx = radeon->glCtx;
driContextPriv->driverPrivate = radeon;
- meta_init_metaops(ctx, &radeon->meta);
-
_mesa_meta_init(ctx);
/* DRI fields */
@@ -317,7 +318,6 @@ void radeonDestroyContext(__DRIcontext *driContextPriv )
radeonFreeDmaRegions(radeon);
radeonReleaseArrays(radeon->glCtx, ~0);
- meta_destroy_metaops(&radeon->meta);
if (radeon->vtbl.free_context)
radeon->vtbl.free_context(radeon->glCtx);
_swsetup_DestroyContext( radeon->glCtx );
@@ -529,7 +529,7 @@ void radeon_prepare_render(radeonContextPtr radeon)
/* Intel driver does the equivalent of this, no clue if it is needed:*/
draw = drawable->driverPrivate;
- radeon_draw_buffer(radeon->glCtx, &draw->base);
+ radeon_draw_buffer(radeon->glCtx, radeon->glCtx->DrawBuffer);
driContext->dri2.draw_stamp = drawable->dri2.stamp;
}
diff --git a/src/mesa/drivers/dri/radeon/radeon_common_context.h b/src/mesa/drivers/dri/radeon/radeon_common_context.h
index c62913afd0c..3895ab8c4d8 100644
--- a/src/mesa/drivers/dri/radeon/radeon_common_context.h
+++ b/src/mesa/drivers/dri/radeon/radeon_common_context.h
@@ -14,7 +14,6 @@
#include "dri_util.h"
#include "tnl/t_vertex.h"
-#include "dri_metaops.h"
struct radeon_context;
#include "radeon_bocs_wrapper.h"
@@ -509,8 +508,6 @@ struct radeon_context {
*/
GLboolean is_front_buffer_reading;
- struct dri_metaops meta;
-
struct {
struct radeon_query_object *current;
struct radeon_state_atom queryobj;
diff --git a/src/mesa/drivers/dri/radeon/radeon_context.c b/src/mesa/drivers/dri/radeon/radeon_context.c
index e3de534b5f7..154a8815e4a 100644
--- a/src/mesa/drivers/dri/radeon/radeon_context.c
+++ b/src/mesa/drivers/dri/radeon/radeon_context.c
@@ -40,6 +40,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "main/simple_list.h"
#include "main/imports.h"
#include "main/extensions.h"
+#include "main/mfeatures.h"
#include "swrast/swrast.h"
#include "swrast_setup/swrast_setup.h"
diff --git a/src/mesa/drivers/dri/radeon/radeon_fbo.c b/src/mesa/drivers/dri/radeon/radeon_fbo.c
index a36a1dc94ac..d3c9257fb66 100644
--- a/src/mesa/drivers/dri/radeon/radeon_fbo.c
+++ b/src/mesa/drivers/dri/radeon/radeon_fbo.c
@@ -28,6 +28,7 @@
#include "main/imports.h"
#include "main/macros.h"
+#include "main/mfeatures.h"
#include "main/mtypes.h"
#include "main/enums.h"
#include "main/fbobject.h"
@@ -484,6 +485,8 @@ radeon_update_wrapper(struct gl_context *ctx, struct radeon_renderbuffer *rrb,
case MESA_FORMAT_S8_Z24:
rrb->base.DataType = GL_UNSIGNED_INT_24_8_EXT;
break;
+ default:
+ _mesa_problem(ctx, "Unexpected texture format in radeon_update_wrapper()");
}
rrb->cpp = _mesa_get_format_bytes(texImage->TexFormat);
diff --git a/src/mesa/drivers/dri/radeon/radeon_queryobj.c b/src/mesa/drivers/dri/radeon/radeon_queryobj.c
index a45ca7cad0d..cc395e9eab4 100644
--- a/src/mesa/drivers/dri/radeon/radeon_queryobj.c
+++ b/src/mesa/drivers/dri/radeon/radeon_queryobj.c
@@ -38,7 +38,7 @@ static void radeonQueryGetResult(struct gl_context *ctx, struct gl_query_object
radeonContextPtr radeon = RADEON_CONTEXT(ctx);
struct radeon_query_object *query = (struct radeon_query_object *)q;
uint32_t *result;
- int i;
+ int i, max_idx;
radeon_print(RADEON_STATE, RADEON_VERBOSE,
"%s: query id %d, result %d\n",
@@ -56,7 +56,11 @@ static void radeonQueryGetResult(struct gl_context *ctx, struct gl_query_object
* hw writes zpass end counts to qwords 1, 3, 5, 7.
* then we substract. MSB is the valid bit.
*/
- for (i = 0; i < 32; i += 4) {
+ if (radeon->radeonScreen->chip_family >= CHIP_FAMILY_CEDAR)
+ max_idx = 8 * 4; /* 8 DB's */
+ else
+ max_idx = 4 * 4; /* 4 DB's for r600, r700 */
+ for (i = 0; i < max_idx; i += 4) {
uint64_t start = (uint64_t)LE32_TO_CPU(result[i]) |
(uint64_t)LE32_TO_CPU(result[i + 1]) << 32;
uint64_t end = (uint64_t)LE32_TO_CPU(result[i + 2]) |
diff --git a/src/mesa/drivers/dri/radeon/radeon_screen.c b/src/mesa/drivers/dri/radeon/radeon_screen.c
index 94e56c2ade6..56c5959b0aa 100644
--- a/src/mesa/drivers/dri/radeon/radeon_screen.c
+++ b/src/mesa/drivers/dri/radeon/radeon_screen.c
@@ -628,7 +628,6 @@ static int radeon_set_screen_flags(radeonScreenPtr screen, int device_id)
break;
case PCI_CHIP_R200_BB:
- case PCI_CHIP_R200_BC:
case PCI_CHIP_R200_QH:
case PCI_CHIP_R200_QL:
case PCI_CHIP_R200_QM:
@@ -1163,6 +1162,54 @@ static int radeon_set_screen_flags(radeonScreenPtr screen, int device_id)
screen->chip_flags = RADEON_CHIPSET_TCL;
break;
+ case PCI_CHIP_BARTS_6720:
+ case PCI_CHIP_BARTS_6721:
+ case PCI_CHIP_BARTS_6722:
+ case PCI_CHIP_BARTS_6723:
+ case PCI_CHIP_BARTS_6724:
+ case PCI_CHIP_BARTS_6725:
+ case PCI_CHIP_BARTS_6726:
+ case PCI_CHIP_BARTS_6727:
+ case PCI_CHIP_BARTS_6728:
+ case PCI_CHIP_BARTS_6729:
+ case PCI_CHIP_BARTS_6738:
+ case PCI_CHIP_BARTS_6739:
+ screen->chip_family = CHIP_FAMILY_BARTS;
+ screen->chip_flags = RADEON_CHIPSET_TCL;
+ break;
+
+ case PCI_CHIP_TURKS_6740:
+ case PCI_CHIP_TURKS_6741:
+ case PCI_CHIP_TURKS_6742:
+ case PCI_CHIP_TURKS_6743:
+ case PCI_CHIP_TURKS_6744:
+ case PCI_CHIP_TURKS_6745:
+ case PCI_CHIP_TURKS_6746:
+ case PCI_CHIP_TURKS_6747:
+ case PCI_CHIP_TURKS_6748:
+ case PCI_CHIP_TURKS_6749:
+ case PCI_CHIP_TURKS_6750:
+ case PCI_CHIP_TURKS_6758:
+ case PCI_CHIP_TURKS_6759:
+ screen->chip_family = CHIP_FAMILY_TURKS;
+ screen->chip_flags = RADEON_CHIPSET_TCL;
+ break;
+
+ case PCI_CHIP_CAICOS_6760:
+ case PCI_CHIP_CAICOS_6761:
+ case PCI_CHIP_CAICOS_6762:
+ case PCI_CHIP_CAICOS_6763:
+ case PCI_CHIP_CAICOS_6764:
+ case PCI_CHIP_CAICOS_6765:
+ case PCI_CHIP_CAICOS_6766:
+ case PCI_CHIP_CAICOS_6767:
+ case PCI_CHIP_CAICOS_6768:
+ case PCI_CHIP_CAICOS_6770:
+ case PCI_CHIP_CAICOS_6779:
+ screen->chip_family = CHIP_FAMILY_CAICOS;
+ screen->chip_flags = RADEON_CHIPSET_TCL;
+ break;
+
default:
fprintf(stderr, "unknown chip id 0x%x, can't guess.\n",
device_id);
diff --git a/src/mesa/drivers/dri/radeon/radeon_span.c b/src/mesa/drivers/dri/radeon/radeon_span.c
index 1c5326fe9dc..caf3f253d2a 100644
--- a/src/mesa/drivers/dri/radeon/radeon_span.c
+++ b/src/mesa/drivers/dri/radeon/radeon_span.c
@@ -60,7 +60,7 @@ static void radeonSetSpanFunctions(struct radeon_renderbuffer *rrb);
static GLubyte *r200_depth_2byte(const struct radeon_renderbuffer * rrb,
GLint x, GLint y)
{
- GLubyte *ptr = rrb->bo->ptr;
+ GLubyte *ptr = rrb->bo->ptr + rrb->draw_offset;
GLint offset;
if (rrb->has_surface) {
offset = x * rrb->cpp + y * rrb->pitch;
@@ -85,7 +85,7 @@ static GLubyte *r200_depth_2byte(const struct radeon_renderbuffer * rrb,
static GLubyte *r200_depth_4byte(const struct radeon_renderbuffer * rrb,
GLint x, GLint y)
{
- GLubyte *ptr = rrb->bo->ptr;
+ GLubyte *ptr = rrb->bo->ptr + rrb->draw_offset;
GLint offset;
if (rrb->has_surface) {
offset = x * rrb->cpp + y * rrb->pitch;
@@ -439,7 +439,7 @@ static GLubyte *r600_ptr_color(const struct radeon_renderbuffer * rrb,
static GLubyte *radeon_ptr_4byte(const struct radeon_renderbuffer * rrb,
GLint x, GLint y)
{
- GLubyte *ptr = rrb->bo->ptr;
+ GLubyte *ptr = rrb->bo->ptr + rrb->draw_offset;
uint32_t mask = RADEON_BO_FLAGS_MACRO_TILE | RADEON_BO_FLAGS_MICRO_TILE;
GLint offset;
@@ -479,7 +479,7 @@ static GLubyte *radeon_ptr_4byte(const struct radeon_renderbuffer * rrb,
static GLubyte *radeon_ptr_2byte_8x2(const struct radeon_renderbuffer * rrb,
GLint x, GLint y)
{
- GLubyte *ptr = rrb->bo->ptr;
+ GLubyte *ptr = rrb->bo->ptr + rrb->draw_offset;
uint32_t mask = RADEON_BO_FLAGS_MACRO_TILE | RADEON_BO_FLAGS_MICRO_TILE;
GLint offset;
diff --git a/src/mesa/drivers/dri/radeon/radeon_state.c b/src/mesa/drivers/dri/radeon/radeon_state.c
index cae12f192c3..a93e61870a5 100644
--- a/src/mesa/drivers/dri/radeon/radeon_state.c
+++ b/src/mesa/drivers/dri/radeon/radeon_state.c
@@ -40,6 +40,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "main/context.h"
#include "main/framebuffer.h"
#include "main/simple_list.h"
+#include "main/state.h"
#include "vbo/vbo.h"
#include "tnl/tnl.h"
@@ -136,7 +137,7 @@ static void radeonBlendEquationSeparate( struct gl_context *ctx,
RADEON_STATECHANGE( rmesa, ctx );
rmesa->hw.ctx.cmd[CTX_RB3D_BLENDCNTL] = b;
if ( (ctx->Color.ColorLogicOpEnabled || (ctx->Color.BlendEnabled
- && ctx->Color.BlendEquationRGB == GL_LOGIC_OP)) ) {
+ && ctx->Color.Blend[0].EquationRGB == GL_LOGIC_OP)) ) {
rmesa->hw.ctx.cmd[CTX_RB3D_CNTL] |= RADEON_ROP_ENABLE;
} else {
rmesa->hw.ctx.cmd[CTX_RB3D_CNTL] &= ~RADEON_ROP_ENABLE;
@@ -153,7 +154,7 @@ static void radeonBlendFuncSeparate( struct gl_context *ctx,
~(RADEON_SRC_BLEND_MASK | RADEON_DST_BLEND_MASK);
GLboolean fallback = GL_FALSE;
- switch ( ctx->Color.BlendSrcRGB ) {
+ switch ( ctx->Color.Blend[0].SrcRGB ) {
case GL_ZERO:
b |= RADEON_SRC_BLEND_GL_ZERO;
break;
@@ -200,7 +201,7 @@ static void radeonBlendFuncSeparate( struct gl_context *ctx,
break;
}
- switch ( ctx->Color.BlendDstRGB ) {
+ switch ( ctx->Color.Blend[0].DstRGB ) {
case GL_ZERO:
b |= RADEON_DST_BLEND_GL_ZERO;
break;
@@ -661,7 +662,7 @@ static void radeonUpdateSpecular( struct gl_context *ctx )
TCL_FALLBACK( ctx, RADEON_TCL_FALLBACK_FOGCOORDSPEC, flag);
- if (NEED_SECONDARY_COLOR(ctx)) {
+ if (_mesa_need_secondary_color(ctx)) {
assert( (p & RADEON_SPECULAR_ENABLE) != 0 );
} else {
assert( (p & RADEON_SPECULAR_ENABLE) == 0 );
@@ -1602,7 +1603,7 @@ static void radeonEnable( struct gl_context *ctx, GLenum cap, GLboolean state )
rmesa->hw.ctx.cmd[CTX_RB3D_CNTL] &= ~RADEON_ALPHA_BLEND_ENABLE;
}
if ( (ctx->Color.ColorLogicOpEnabled || (ctx->Color.BlendEnabled
- && ctx->Color.BlendEquationRGB == GL_LOGIC_OP)) ) {
+ && ctx->Color.Blend[0].EquationRGB == GL_LOGIC_OP)) ) {
rmesa->hw.ctx.cmd[CTX_RB3D_CNTL] |= RADEON_ROP_ENABLE;
} else {
rmesa->hw.ctx.cmd[CTX_RB3D_CNTL] &= ~RADEON_ROP_ENABLE;
@@ -1612,12 +1613,12 @@ static void radeonEnable( struct gl_context *ctx, GLenum cap, GLboolean state )
*/
if (state) {
ctx->Driver.BlendEquationSeparate( ctx,
- ctx->Color.BlendEquationRGB,
- ctx->Color.BlendEquationA );
- ctx->Driver.BlendFuncSeparate( ctx, ctx->Color.BlendSrcRGB,
- ctx->Color.BlendDstRGB,
- ctx->Color.BlendSrcA,
- ctx->Color.BlendDstA );
+ ctx->Color.Blend[0].EquationRGB,
+ ctx->Color.Blend[0].EquationA );
+ ctx->Driver.BlendFuncSeparate( ctx, ctx->Color.Blend[0].SrcRGB,
+ ctx->Color.Blend[0].DstRGB,
+ ctx->Color.Blend[0].SrcA,
+ ctx->Color.Blend[0].DstA );
}
else {
FALLBACK( rmesa, RADEON_FALLBACK_BLEND_FUNC, GL_FALSE );
@@ -1741,7 +1742,7 @@ static void radeonEnable( struct gl_context *ctx, GLenum cap, GLboolean state )
case GL_COLOR_LOGIC_OP:
RADEON_STATECHANGE( rmesa, ctx );
if ( (ctx->Color.ColorLogicOpEnabled || (ctx->Color.BlendEnabled
- && ctx->Color.BlendEquationRGB == GL_LOGIC_OP)) ) {
+ && ctx->Color.Blend[0].EquationRGB == GL_LOGIC_OP)) ) {
rmesa->hw.ctx.cmd[CTX_RB3D_CNTL] |= RADEON_ROP_ENABLE;
} else {
rmesa->hw.ctx.cmd[CTX_RB3D_CNTL] &= ~RADEON_ROP_ENABLE;
@@ -2091,6 +2092,9 @@ static GLboolean r100ValidateBuffers(struct gl_context *ctx)
continue;
t = rmesa->state.texture.unit[i].texobj;
+
+ if (!t)
+ continue;
if (t->image_override && t->bo)
radeon_cs_space_add_persistent_bo(rmesa->radeon.cmdbuf.cs, t->bo,
RADEON_GEM_DOMAIN_GTT | RADEON_GEM_DOMAIN_VRAM, 0);
diff --git a/src/mesa/drivers/dri/radeon/radeon_state_init.c b/src/mesa/drivers/dri/radeon/radeon_state_init.c
index 698efb145c0..33b504cccf8 100644
--- a/src/mesa/drivers/dri/radeon/radeon_state_init.c
+++ b/src/mesa/drivers/dri/radeon/radeon_state_init.c
@@ -488,7 +488,7 @@ static void ctx_emit_cs(struct gl_context *ctx, struct radeon_state_atom *atom)
if (rrb) {
OUT_BATCH(CP_PACKET0(RADEON_RB3D_COLOROFFSET, 0));
- OUT_BATCH_RELOC(0, rrb->bo, 0, 0, RADEON_GEM_DOMAIN_VRAM, 0);
+ OUT_BATCH_RELOC(rrb->draw_offset, rrb->bo, rrb->draw_offset, 0, RADEON_GEM_DOMAIN_VRAM, 0);
OUT_BATCH(CP_PACKET0(RADEON_RB3D_COLORPITCH, 0));
OUT_BATCH_RELOC(cbpitch, rrb->bo, cbpitch, 0, RADEON_GEM_DOMAIN_VRAM, 0);
diff --git a/src/mesa/drivers/dri/radeon/radeon_tex.c b/src/mesa/drivers/dri/radeon/radeon_tex.c
index 83b1d1b1d74..8a35c7d2d27 100644
--- a/src/mesa/drivers/dri/radeon/radeon_tex.c
+++ b/src/mesa/drivers/dri/radeon/radeon_tex.c
@@ -37,6 +37,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "main/context.h"
#include "main/enums.h"
#include "main/image.h"
+#include "main/mfeatures.h"
#include "main/simple_list.h"
#include "main/texstore.h"
#include "main/teximage.h"
diff --git a/src/mesa/drivers/dri/radeon/radeon_texstate.c b/src/mesa/drivers/dri/radeon/radeon_texstate.c
index 32c021cb545..9ba98e303a7 100644
--- a/src/mesa/drivers/dri/radeon/radeon_texstate.c
+++ b/src/mesa/drivers/dri/radeon/radeon_texstate.c
@@ -652,12 +652,11 @@ void radeonSetTexBuffer2(__DRIcontext *pDRICtx, GLint target, GLint texture_form
struct radeon_framebuffer *rfb;
radeonTexObjPtr t;
uint32_t pitch_val;
- uint32_t internalFormat, type, format;
+ uint32_t internalFormat, format;
gl_format texFormat;
- type = GL_BGRA;
format = GL_UNSIGNED_BYTE;
- internalFormat = (texture_format == __DRI_TEXTURE_FORMAT_RGB ? 3 : 4);
+ internalFormat = (texture_format == __DRI_TEXTURE_FORMAT_RGB ? GL_RGB : GL_RGBA);
radeon = pDRICtx->driverPrivate;
rmesa = pDRICtx->driverPrivate;
@@ -739,6 +738,14 @@ void radeonSetTexBuffer2(__DRIcontext *pDRICtx, GLint target, GLint texture_form
t->pp_txformat |= RADEON_TXFORMAT_NON_POWER2;
t->pp_txpitch = pitch_val;
t->pp_txpitch -= 32;
+ } else {
+ t->pp_txformat &= ~(RADEON_TXFORMAT_WIDTH_MASK |
+ RADEON_TXFORMAT_HEIGHT_MASK |
+ RADEON_TXFORMAT_CUBIC_MAP_ENABLE |
+ RADEON_TXFORMAT_F5_WIDTH_MASK |
+ RADEON_TXFORMAT_F5_HEIGHT_MASK);
+ t->pp_txformat |= ((texImage->WidthLog2 << RADEON_TXFORMAT_WIDTH_SHIFT) |
+ (texImage->HeightLog2 << RADEON_TXFORMAT_HEIGHT_SHIFT));
}
t->validated = GL_TRUE;
_mesa_unlock_texture(radeon->glCtx, texObj);
diff --git a/src/mesa/drivers/dri/radeon/radeon_texture.c b/src/mesa/drivers/dri/radeon/radeon_texture.c
index 8b1e34fe766..9ec53881bb2 100644
--- a/src/mesa/drivers/dri/radeon/radeon_texture.c
+++ b/src/mesa/drivers/dri/radeon/radeon_texture.c
@@ -33,7 +33,9 @@
#include "main/imports.h"
#include "main/context.h"
#include "main/enums.h"
+#include "main/mfeatures.h"
#include "main/mipmap.h"
+#include "main/pbo.h"
#include "main/texcompress.h"
#include "main/texstore.h"
#include "main/teximage.h"
diff --git a/src/mesa/drivers/dri/radeon/radeon_texture.h b/src/mesa/drivers/dri/radeon/radeon_texture.h
index a1908c6bc72..538a07fbba8 100644
--- a/src/mesa/drivers/dri/radeon/radeon_texture.h
+++ b/src/mesa/drivers/dri/radeon/radeon_texture.h
@@ -32,6 +32,7 @@
#define RADEON_TEXTURE_H
#include "main/formats.h"
+#include "main/mfeatures.h"
void copy_rows(void* dst, GLuint dststride, const void* src, GLuint srcstride,
GLuint numrows, GLuint rowsize);
diff --git a/src/mesa/drivers/dri/savage/savage_xmesa.c b/src/mesa/drivers/dri/savage/savage_xmesa.c
index 92fb4f44884..681ed9aae34 100644
--- a/src/mesa/drivers/dri/savage/savage_xmesa.c
+++ b/src/mesa/drivers/dri/savage/savage_xmesa.c
@@ -314,7 +314,7 @@ savageCreateContext( gl_api api,
shareCtx = ((savageContextPtr) sharedContextPrivate)->glCtx;
else
shareCtx = NULL;
- ctx = _mesa_create_context(mesaVis, shareCtx, &functions, imesa);
+ ctx = _mesa_create_context(api, mesaVis, shareCtx, &functions, imesa);
if (!ctx) {
free(imesa);
return GL_FALSE;
diff --git a/src/mesa/drivers/dri/savage/savagestate.c b/src/mesa/drivers/dri/savage/savagestate.c
index 0906f85b1fa..21ebf5dc2b2 100644
--- a/src/mesa/drivers/dri/savage/savagestate.c
+++ b/src/mesa/drivers/dri/savage/savagestate.c
@@ -29,8 +29,9 @@
#include "main/enums.h"
#include "main/macros.h"
#include "main/dd.h"
-
#include "main/mm.h"
+#include "main/state.h"
+
#include "savagedd.h"
#include "savagecontext.h"
@@ -136,7 +137,7 @@ static void savageBlendFunc_s4(struct gl_context *ctx)
* blend modes
*/
if(ctx->Color.BlendEnabled){
- switch (ctx->Color.BlendDstRGB)
+ switch (ctx->Color.Blend[0].DstRGB)
{
case GL_ZERO:
imesa->regs.s4.drawLocalCtrl.ni.dstAlphaMode = DAM_Zero;
@@ -192,7 +193,7 @@ static void savageBlendFunc_s4(struct gl_context *ctx)
break;
}
- switch (ctx->Color.BlendSrcRGB)
+ switch (ctx->Color.Blend[0].SrcRGB)
{
case GL_ZERO:
imesa->regs.s4.drawLocalCtrl.ni.srcAlphaMode = SAM_Zero;
@@ -310,7 +311,7 @@ static void savageBlendFunc_s3d(struct gl_context *ctx)
* blend modes
*/
if(ctx->Color.BlendEnabled){
- switch (ctx->Color.BlendDstRGB)
+ switch (ctx->Color.Blend[0].DstRGB)
{
case GL_ZERO:
imesa->regs.s3d.drawCtrl.ni.dstAlphaMode = DAM_Zero;
@@ -366,7 +367,7 @@ static void savageBlendFunc_s3d(struct gl_context *ctx)
break;
}
- switch (ctx->Color.BlendSrcRGB)
+ switch (ctx->Color.Blend[0].SrcRGB)
{
case GL_ZERO:
imesa->regs.s3d.drawCtrl.ni.srcAlphaMode = SAM_Zero;
@@ -869,7 +870,7 @@ static void savageUpdateSpecular_s4(struct gl_context *ctx) {
savageContextPtr imesa = SAVAGE_CONTEXT( ctx );
uint32_t drawLocalCtrl = imesa->regs.s4.drawLocalCtrl.ui;
- if (NEED_SECONDARY_COLOR(ctx)) {
+ if (_mesa_need_secondary_color(ctx)) {
imesa->regs.s4.drawLocalCtrl.ni.specShadeEn = GL_TRUE;
} else {
imesa->regs.s4.drawLocalCtrl.ni.specShadeEn = GL_FALSE;
@@ -883,7 +884,7 @@ static void savageUpdateSpecular_s3d(struct gl_context *ctx) {
savageContextPtr imesa = SAVAGE_CONTEXT( ctx );
uint32_t drawCtrl = imesa->regs.s3d.drawCtrl.ui;
- if (NEED_SECONDARY_COLOR(ctx)) {
+ if (_mesa_need_secondary_color(ctx)) {
imesa->regs.s3d.drawCtrl.ni.specShadeEn = GL_TRUE;
} else {
imesa->regs.s3d.drawCtrl.ni.specShadeEn = GL_FALSE;
diff --git a/src/mesa/drivers/dri/sis/sis6326_state.c b/src/mesa/drivers/dri/sis/sis6326_state.c
index 9708f639124..9ca58293b43 100644
--- a/src/mesa/drivers/dri/sis/sis6326_state.c
+++ b/src/mesa/drivers/dri/sis/sis6326_state.c
@@ -35,6 +35,7 @@
#include "main/context.h"
#include "main/colormac.h"
+#include "main/state.h"
#include "swrast/swrast.h"
#include "vbo/vbo.h"
#include "tnl/tnl.h"
@@ -355,7 +356,7 @@ static void sis6326UpdateSpecular(struct gl_context *ctx)
sisContextPtr smesa = SIS_CONTEXT(ctx);
__GLSiSHardware *current = &smesa->current;
- if (NEED_SECONDARY_COLOR(ctx))
+ if (_mesa_need_secondary_color(ctx))
current->hwCapEnable |= S_ENABLE_Specular;
else
current->hwCapEnable &= ~S_ENABLE_Specular;
diff --git a/src/mesa/drivers/dri/sis/sis_context.c b/src/mesa/drivers/dri/sis/sis_context.c
index c5a9fdfb2a0..26ecfc463ca 100644
--- a/src/mesa/drivers/dri/sis/sis_context.c
+++ b/src/mesa/drivers/dri/sis/sis_context.c
@@ -186,7 +186,7 @@ sisCreateContext( gl_api api,
shareCtx = ((sisContextPtr)sharedContextPrivate)->glCtx;
else
shareCtx = NULL;
- smesa->glCtx = _mesa_create_context( glVisual, shareCtx,
+ smesa->glCtx = _mesa_create_context( API_OPENGL, glVisual, shareCtx,
&functions, (void *) smesa);
if (!smesa->glCtx) {
FREE(smesa);
diff --git a/src/mesa/drivers/dri/sis/sis_state.c b/src/mesa/drivers/dri/sis/sis_state.c
index e53c326441b..828772ed6ef 100644
--- a/src/mesa/drivers/dri/sis/sis_state.c
+++ b/src/mesa/drivers/dri/sis/sis_state.c
@@ -38,6 +38,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "main/context.h"
#include "main/macros.h"
+#include "main/state.h"
#include "swrast/swrast.h"
#include "vbo/vbo.h"
#include "tnl/tnl.h"
@@ -407,7 +408,7 @@ static void sisUpdateSpecular(struct gl_context *ctx)
sisContextPtr smesa = SIS_CONTEXT(ctx);
__GLSiSHardware *current = &smesa->current;
- if (NEED_SECONDARY_COLOR(ctx))
+ if (_mesa_need_secondary_color(ctx))
current->hwCapEnable |= MASK_SpecularEnable;
else
current->hwCapEnable &= ~MASK_SpecularEnable;
diff --git a/src/mesa/drivers/dri/swrast/swrast.c b/src/mesa/drivers/dri/swrast/swrast.c
index c7940e9c0da..719b406ec05 100644
--- a/src/mesa/drivers/dri/swrast/swrast.c
+++ b/src/mesa/drivers/dri/swrast/swrast.c
@@ -561,6 +561,60 @@ swrast_init_driver_functions(struct dd_function_table *driver)
driver->ChooseTextureFormat = swrastChooseTextureFormat;
}
+static const char *es2_extensions[] = {
+ /* Used by mesa internally (cf all_mesa_extensions in ../common/utils.c) */
+ "GL_ARB_draw_buffers",
+ "GL_ARB_multisample",
+ "GL_ARB_texture_compression",
+ "GL_ARB_transpose_matrix",
+ "GL_ARB_vertex_buffer_object",
+ "GL_ARB_window_pos",
+ "GL_EXT_blend_func_separate",
+ "GL_EXT_compiled_vertex_array",
+ "GL_EXT_framebuffer_blit",
+ "GL_EXT_multi_draw_arrays",
+ "GL_EXT_polygon_offset",
+ "GL_EXT_texture_object",
+ "GL_EXT_vertex_array",
+ "GL_IBM_multimode_draw_arrays",
+ "GL_MESA_window_pos",
+ "GL_NV_vertex_program",
+
+ /* Required by GLES2 */
+ "GL_ARB_fragment_program",
+ "GL_ARB_fragment_shader",
+ "GL_ARB_multitexture",
+ "GL_ARB_shader_objects",
+ "GL_ARB_texture_cube_map",
+ "GL_ARB_texture_mirrored_repeat",
+ "GL_ARB_texture_non_power_of_two",
+ "GL_ARB_vertex_shader",
+ "GL_EXT_blend_color",
+ "GL_EXT_blend_equation_separate",
+ "GL_EXT_blend_minmax",
+ "GL_EXT_blend_subtract",
+ "GL_EXT_stencil_wrap",
+
+ /* Optional GLES2 */
+ "GL_ARB_framebuffer_object",
+ "GL_EXT_texture_filter_anisotropic",
+ "GL_ARB_depth_texture",
+ "GL_EXT_packed_depth_stencil",
+ "GL_EXT_framebuffer_object",
+ NULL,
+};
+
+static void
+InitExtensionsES2(struct gl_context *ctx)
+{
+ int i;
+
+ /* Can't use driInitExtensions() since it uses extensions from
+ * main/remap_helper.h when called the first time. */
+
+ for (i = 0; es2_extensions[i]; i++)
+ _mesa_enable_extension(ctx, es2_extensions[i]);
+}
/**
* Context-related functions.
@@ -597,7 +651,7 @@ dri_create_context(gl_api api,
mesaCtx = &ctx->Base;
/* basic context setup */
- if (!_mesa_initialize_context(mesaCtx, visual, sharedCtx, &functions, (void *) cPriv)) {
+ if (!_mesa_initialize_context(mesaCtx, api, visual, sharedCtx, &functions, (void *) cPriv)) {
goto context_fail;
}
@@ -617,16 +671,29 @@ dri_create_context(gl_api api,
tnl->Driver.RunPipeline = _tnl_run_pipeline;
}
- _mesa_enable_sw_extensions(mesaCtx);
- _mesa_enable_1_3_extensions(mesaCtx);
- _mesa_enable_1_4_extensions(mesaCtx);
- _mesa_enable_1_5_extensions(mesaCtx);
- _mesa_enable_2_0_extensions(mesaCtx);
- _mesa_enable_2_1_extensions(mesaCtx);
-
_mesa_meta_init(mesaCtx);
+ _mesa_enable_sw_extensions(mesaCtx);
- driInitExtensions( mesaCtx, NULL, GL_FALSE );
+ switch (api) {
+ case API_OPENGL:
+ _mesa_enable_1_3_extensions(mesaCtx);
+ _mesa_enable_1_4_extensions(mesaCtx);
+ _mesa_enable_1_5_extensions(mesaCtx);
+ _mesa_enable_2_0_extensions(mesaCtx);
+ _mesa_enable_2_1_extensions(mesaCtx);
+
+ driInitExtensions( mesaCtx, NULL, GL_FALSE );
+ break;
+ case API_OPENGLES:
+ _mesa_enable_1_3_extensions(mesaCtx);
+ _mesa_enable_1_4_extensions(mesaCtx);
+ _mesa_enable_1_5_extensions(mesaCtx);
+
+ break;
+ case API_OPENGLES2:
+ InitExtensionsES2( mesaCtx);
+ break;
+ }
return GL_TRUE;
diff --git a/src/mesa/drivers/dri/tdfx/tdfx_context.c b/src/mesa/drivers/dri/tdfx/tdfx_context.c
index 63dfa5ae746..ad151359e67 100644
--- a/src/mesa/drivers/dri/tdfx/tdfx_context.c
+++ b/src/mesa/drivers/dri/tdfx/tdfx_context.c
@@ -194,7 +194,7 @@ GLboolean tdfxCreateContext( gl_api api,
else
shareCtx = NULL;
- fxMesa->glCtx = _mesa_create_context(mesaVis, shareCtx,
+ fxMesa->glCtx = _mesa_create_context(api, mesaVis, shareCtx,
&functions, (void *) fxMesa);
if (!fxMesa->glCtx) {
FREE(fxMesa);
diff --git a/src/mesa/drivers/dri/tdfx/tdfx_state.c b/src/mesa/drivers/dri/tdfx/tdfx_state.c
index 3f6822d4574..b26b2c710b9 100644
--- a/src/mesa/drivers/dri/tdfx/tdfx_state.c
+++ b/src/mesa/drivers/dri/tdfx/tdfx_state.c
@@ -84,7 +84,7 @@ static void tdfxUpdateAlphaMode( struct gl_context *ctx )
if ( ctx->Color.BlendEnabled
&& (fxMesa->Fallback & TDFX_FALLBACK_BLEND) == 0 ) {
- switch ( ctx->Color.BlendSrcRGB ) {
+ switch ( ctx->Color.Blend[0].SrcRGB ) {
case GL_ZERO:
srcRGB = GR_BLEND_ZERO;
break;
@@ -126,7 +126,7 @@ static void tdfxUpdateAlphaMode( struct gl_context *ctx )
srcRGB = GR_BLEND_ONE;
}
- switch ( ctx->Color.BlendSrcA ) {
+ switch ( ctx->Color.Blend[0].SrcA ) {
case GL_ZERO:
srcA = GR_BLEND_ZERO;
break;
@@ -156,7 +156,7 @@ static void tdfxUpdateAlphaMode( struct gl_context *ctx )
srcA = GR_BLEND_ONE;
}
- switch ( ctx->Color.BlendDstRGB ) {
+ switch ( ctx->Color.Blend[0].DstRGB ) {
case GL_ZERO:
dstRGB = GR_BLEND_ZERO;
break;
@@ -195,7 +195,7 @@ static void tdfxUpdateAlphaMode( struct gl_context *ctx )
dstRGB = GR_BLEND_ZERO;
}
- switch ( ctx->Color.BlendDstA ) {
+ switch ( ctx->Color.Blend[0].DstA ) {
case GL_ZERO:
dstA = GR_BLEND_ZERO;
break;
@@ -222,7 +222,7 @@ static void tdfxUpdateAlphaMode( struct gl_context *ctx )
dstA = GR_BLEND_ZERO;
}
- switch ( ctx->Color.BlendEquationRGB ) {
+ switch ( ctx->Color.Blend[0].EquationRGB ) {
case GL_FUNC_SUBTRACT:
eqRGB = GR_BLEND_OP_SUB;
break;
@@ -235,7 +235,7 @@ static void tdfxUpdateAlphaMode( struct gl_context *ctx )
break;
}
- switch ( ctx->Color.BlendEquationA ) {
+ switch ( ctx->Color.Blend[0].EquationA ) {
case GL_FUNC_SUBTRACT:
eqA = GR_BLEND_OP_SUB;
break;
diff --git a/src/mesa/drivers/dri/unichrome/via_context.c b/src/mesa/drivers/dri/unichrome/via_context.c
index 963609bde4a..77d7116611a 100644
--- a/src/mesa/drivers/dri/unichrome/via_context.c
+++ b/src/mesa/drivers/dri/unichrome/via_context.c
@@ -542,7 +542,7 @@ viaCreateContext(gl_api api,
else
shareCtx = NULL;
- vmesa->glCtx = _mesa_create_context(visual, shareCtx, &functions,
+ vmesa->glCtx = _mesa_create_context(API_OPENGL, visual, shareCtx, &functions,
(void*) vmesa);
vmesa->shareCtx = shareCtx;
diff --git a/src/mesa/drivers/dri/unichrome/via_state.c b/src/mesa/drivers/dri/unichrome/via_state.c
index 033352188d4..774f439bfb6 100644
--- a/src/mesa/drivers/dri/unichrome/via_state.c
+++ b/src/mesa/drivers/dri/unichrome/via_state.c
@@ -552,7 +552,7 @@ static void viaBlendFunc(struct gl_context *ctx, GLenum sfactor, GLenum dfactor)
if (VIA_DEBUG & DEBUG_STATE)
fprintf(stderr, "%s in\n", __FUNCTION__);
- switch (ctx->Color.BlendSrcRGB) {
+ switch (ctx->Color.Blend[0].SrcRGB) {
case GL_SRC_ALPHA_SATURATE:
case GL_CONSTANT_COLOR:
case GL_ONE_MINUS_CONSTANT_COLOR:
@@ -564,7 +564,7 @@ static void viaBlendFunc(struct gl_context *ctx, GLenum sfactor, GLenum dfactor)
break;
}
- switch (ctx->Color.BlendDstRGB) {
+ switch (ctx->Color.Blend[0].DstRGB) {
case GL_CONSTANT_COLOR:
case GL_ONE_MINUS_CONSTANT_COLOR:
case GL_CONSTANT_ALPHA:
@@ -757,14 +757,14 @@ void viaInitState(struct gl_context *ctx)
*/
ctx->Driver.BlendEquationSeparate( ctx,
- ctx->Color.BlendEquationRGB,
- ctx->Color.BlendEquationA);
+ ctx->Color.Blend[0].EquationRGB,
+ ctx->Color.Blend[0].EquationA);
ctx->Driver.BlendFuncSeparate( ctx,
- ctx->Color.BlendSrcRGB,
- ctx->Color.BlendDstRGB,
- ctx->Color.BlendSrcA,
- ctx->Color.BlendDstA);
+ ctx->Color.Blend[0].SrcRGB,
+ ctx->Color.Blend[0].DstRGB,
+ ctx->Color.Blend[0].SrcA,
+ ctx->Color.Blend[0].DstA);
ctx->Driver.Scissor( ctx, ctx->Scissor.X, ctx->Scissor.Y,
ctx->Scissor.Width, ctx->Scissor.Height );
@@ -953,8 +953,8 @@ static GLboolean viaChooseTextureState(struct gl_context *ctx)
static void viaChooseColorState(struct gl_context *ctx)
{
struct via_context *vmesa = VIA_CONTEXT(ctx);
- GLenum s = ctx->Color.BlendSrcRGB;
- GLenum d = ctx->Color.BlendDstRGB;
+ GLenum s = ctx->Color.Blend[0].SrcRGB;
+ GLenum d = ctx->Color.Blend[0].DstRGB;
/* The HW's blending equation is:
* (Ca * FCa + Cbias + Cb * FCb) << Cshift
diff --git a/src/mesa/drivers/dri/unichrome/via_tex.c b/src/mesa/drivers/dri/unichrome/via_tex.c
index 18fb8f33b9f..a2fb010e142 100644
--- a/src/mesa/drivers/dri/unichrome/via_tex.c
+++ b/src/mesa/drivers/dri/unichrome/via_tex.c
@@ -34,6 +34,7 @@
#include "main/context.h"
#include "main/mipmap.h"
#include "main/mm.h"
+#include "main/pbo.h"
#include "main/simple_list.h"
#include "main/texobj.h"
#include "main/texstore.h"
diff --git a/src/mesa/drivers/fbdev/glfbdev.c b/src/mesa/drivers/fbdev/glfbdev.c
index 5195bca97fa..1e0ac4c7a1f 100644
--- a/src/mesa/drivers/fbdev/glfbdev.c
+++ b/src/mesa/drivers/fbdev/glfbdev.c
@@ -722,7 +722,7 @@ glFBDevCreateContext( const GLFBDevVisualPtr visual, GLFBDevContextPtr share )
functions.GetBufferSize = get_buffer_size;
functions.Viewport = viewport;
- if (!_mesa_initialize_context(&ctx->glcontext, &visual->glvisual,
+ if (!_mesa_initialize_context(&ctx->glcontext, API_OPENGL, &visual->glvisual,
share ? &share->glcontext : NULL,
&functions, (void *) ctx)) {
free(ctx);
diff --git a/src/mesa/drivers/osmesa/Makefile b/src/mesa/drivers/osmesa/Makefile
index 50dd4526e19..39ab09af805 100644
--- a/src/mesa/drivers/osmesa/Makefile
+++ b/src/mesa/drivers/osmesa/Makefile
@@ -40,7 +40,7 @@ $(TOP)/$(LIB_DIR)/$(OSMESA_LIB_NAME): $(OBJECTS) $(CORE_MESA)
-major $(MESA_MAJOR) -minor $(MESA_MINOR) -patch $(MESA_TINY) \
-install $(TOP)/$(LIB_DIR) -cplusplus $(MKLIB_OPTIONS) \
-id $(INSTALL_LIB_DIR)/lib$(OSMESA_LIB).$(MESA_MAJOR).dylib \
- $(OSMESA_LIB_DEPS) $(OBJECTS) $(CORE_MESA) $(TALLOC_LIBS)
+ $(OSMESA_LIB_DEPS) $(OBJECTS) $(CORE_MESA)
diff --git a/src/mesa/drivers/osmesa/osmesa.c b/src/mesa/drivers/osmesa/osmesa.c
index 10ba6b79314..98f01fe057e 100644
--- a/src/mesa/drivers/osmesa/osmesa.c
+++ b/src/mesa/drivers/osmesa/osmesa.c
@@ -1155,6 +1155,7 @@ OSMesaCreateContextExt( GLenum format, GLint depthBits, GLint stencilBits,
functions.GetBufferSize = NULL;
if (!_mesa_initialize_context(&osmesa->mesa,
+ API_OPENGL,
osmesa->gl_visual,
sharelist ? &sharelist->mesa
: (struct gl_context *) NULL,
@@ -1356,7 +1357,7 @@ OSMesaMakeCurrent( OSMesaContext osmesa, void *buffer, GLenum type,
/* this updates the visual's red/green/blue/alphaBits fields */
- _mesa_update_framebuffer_visual(osmesa->gl_buffer);
+ _mesa_update_framebuffer_visual(&osmesa->mesa, osmesa->gl_buffer);
/* update the framebuffer size */
_mesa_resize_framebuffer(&osmesa->mesa, osmesa->gl_buffer, width, height);
diff --git a/src/mesa/drivers/windows/gdi/wmesa.c b/src/mesa/drivers/windows/gdi/wmesa.c
index 833e2526f3c..4a8b1b283d5 100644
--- a/src/mesa/drivers/windows/gdi/wmesa.c
+++ b/src/mesa/drivers/windows/gdi/wmesa.c
@@ -1479,7 +1479,8 @@ WMesaContext WMesaCreateContext(HDC hDC,
/* initialize the Mesa context data */
ctx = &c->gl_ctx;
- _mesa_initialize_context(ctx, visual, NULL, &functions, (void *)c);
+ _mesa_initialize_context(ctx, API_OPENGL, visual,
+ NULL, &functions, (void *)c);
/* visual no longer needed - it was copied by _mesa_initialize_context() */
_mesa_destroy_visual(visual);
diff --git a/src/mesa/drivers/windows/gldirect/dglcontext.c b/src/mesa/drivers/windows/gldirect/dglcontext.c
index 10ea0578506..9aedd2e3c4d 100644
--- a/src/mesa/drivers/windows/gldirect/dglcontext.c
+++ b/src/mesa/drivers/windows/gldirect/dglcontext.c
@@ -1414,7 +1414,7 @@ SkipPrimaryCreate:
}
#ifdef _USE_GLD3_WGL
- lpCtx->glCtx = _mesa_create_context(lpCtx->glVis, NULL, (void *)lpCtx, GL_TRUE);
+ lpCtx->glCtx = _mesa_create_context(API_OPENGL, lpCtx->glVis, NULL, (void *)lpCtx, GL_TRUE);
#else
// Create the Mesa context
lpCtx->glCtx = (*mesaFuncs.gl_create_context)(
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 1c43a38557d..1b070f0a11e 100644
--- a/src/mesa/drivers/windows/gldirect/dx7/gld_driver_dx7.c
+++ b/src/mesa/drivers/windows/gldirect/dx7/gld_driver_dx7.c
@@ -944,7 +944,6 @@ void gld_update_state_DX7(
// Stubs for future use.
/* _GLD_TEST_STATE(_NEW_TEXTURE_MATRIX);
_GLD_TEST_STATE(_NEW_COLOR_MATRIX);
- _GLD_TEST_STATE(_NEW_ACCUM);
_GLD_TEST_STATE(_NEW_EVAL);
_GLD_TEST_STATE(_NEW_HINT);
_GLD_TEST_STATE(_NEW_LINE);
@@ -967,7 +966,6 @@ void gld_update_state_DX7(
}
_GLD_TEST_UNHANDLED_STATE(_NEW_TEXTURE_MATRIX);
_GLD_TEST_UNHANDLED_STATE(_NEW_COLOR_MATRIX);
- _GLD_TEST_UNHANDLED_STATE(_NEW_ACCUM);
_GLD_TEST_UNHANDLED_STATE(_NEW_EVAL);
_GLD_TEST_UNHANDLED_STATE(_NEW_HINT);
_GLD_TEST_UNHANDLED_STATE(_NEW_LINE);
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 7fc50004de8..d66318e1149 100644
--- a/src/mesa/drivers/windows/gldirect/dx7/gld_primitive_dx7.c
+++ b/src/mesa/drivers/windows/gldirect/dx7/gld_primitive_dx7.c
@@ -62,7 +62,6 @@
#include "swrast/s_depth.h"
#include "swrast/s_lines.h"
#include "swrast/s_triangle.h"
-#include "swrast/s_trispan.h"
#include "tnl/tnl.h"
#include "tnl/t_context.h"
#include "tnl/t_pipeline.h"
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 c4c2e0b5676..4c272c95d6c 100644
--- a/src/mesa/drivers/windows/gldirect/dx8/gld_driver_dx8.c
+++ b/src/mesa/drivers/windows/gldirect/dx8/gld_driver_dx8.c
@@ -924,7 +924,6 @@ void gld_update_state_DX8(
// Stubs for future use.
/* _GLD_TEST_STATE(_NEW_TEXTURE_MATRIX);
_GLD_TEST_STATE(_NEW_COLOR_MATRIX);
- _GLD_TEST_STATE(_NEW_ACCUM);
_GLD_TEST_STATE(_NEW_EVAL);
_GLD_TEST_STATE(_NEW_HINT);
_GLD_TEST_STATE(_NEW_LINE);
@@ -947,7 +946,6 @@ void gld_update_state_DX8(
}
_GLD_TEST_UNHANDLED_STATE(_NEW_TEXTURE_MATRIX);
_GLD_TEST_UNHANDLED_STATE(_NEW_COLOR_MATRIX);
- _GLD_TEST_UNHANDLED_STATE(_NEW_ACCUM);
_GLD_TEST_UNHANDLED_STATE(_NEW_EVAL);
_GLD_TEST_UNHANDLED_STATE(_NEW_HINT);
_GLD_TEST_UNHANDLED_STATE(_NEW_LINE);
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 5b9dac09c6d..a2c5d87ecd5 100644
--- a/src/mesa/drivers/windows/gldirect/dx8/gld_primitive_dx8.c
+++ b/src/mesa/drivers/windows/gldirect/dx8/gld_primitive_dx8.c
@@ -62,7 +62,6 @@
#include "swrast/s_depth.h"
#include "swrast/s_lines.h"
#include "swrast/s_triangle.h"
-#include "swrast/s_trispan.h"
#include "tnl/tnl.h"
#include "tnl/t_context.h"
#include "tnl/t_pipeline.h"
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 aab70852016..171585dcf81 100644
--- a/src/mesa/drivers/windows/gldirect/dx9/gld_driver_dx9.c
+++ b/src/mesa/drivers/windows/gldirect/dx9/gld_driver_dx9.c
@@ -955,7 +955,6 @@ void gld_update_state_DX9(
// Stubs for future use.
/* _GLD_TEST_STATE(_NEW_TEXTURE_MATRIX);
_GLD_TEST_STATE(_NEW_COLOR_MATRIX);
- _GLD_TEST_STATE(_NEW_ACCUM);
_GLD_TEST_STATE(_NEW_EVAL);
_GLD_TEST_STATE(_NEW_HINT);
_GLD_TEST_STATE(_NEW_LINE);
@@ -977,7 +976,6 @@ void gld_update_state_DX9(
}
_GLD_TEST_UNHANDLED_STATE(_NEW_TEXTURE_MATRIX);
_GLD_TEST_UNHANDLED_STATE(_NEW_COLOR_MATRIX);
- _GLD_TEST_UNHANDLED_STATE(_NEW_ACCUM);
_GLD_TEST_UNHANDLED_STATE(_NEW_EVAL);
_GLD_TEST_UNHANDLED_STATE(_NEW_HINT);
_GLD_TEST_UNHANDLED_STATE(_NEW_LINE);
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 99edd26e9d2..65a00ae1b59 100644
--- a/src/mesa/drivers/windows/gldirect/dx9/gld_primitive_dx9.c
+++ b/src/mesa/drivers/windows/gldirect/dx9/gld_primitive_dx9.c
@@ -62,7 +62,6 @@
#include "swrast/s_depth.h"
#include "swrast/s_lines.h"
#include "swrast/s_triangle.h"
-#include "swrast/s_trispan.h"
#include "tnl/tnl.h"
#include "tnl/t_context.h"
#include "tnl/t_pipeline.h"
diff --git a/src/mesa/drivers/windows/gldirect/mesasw/gld_wgl_mesasw.c b/src/mesa/drivers/windows/gldirect/mesasw/gld_wgl_mesasw.c
index 7a26df8071e..bc66ec79888 100644
--- a/src/mesa/drivers/windows/gldirect/mesasw/gld_wgl_mesasw.c
+++ b/src/mesa/drivers/windows/gldirect/mesasw/gld_wgl_mesasw.c
@@ -61,7 +61,6 @@
#include "swrast/s_depth.h"
#include "swrast/s_lines.h"
#include "swrast/s_triangle.h"
-#include "swrast/s_trispan.h"
#include "tnl/tnl.h"
#include "tnl/t_context.h"
#include "tnl/t_pipeline.h"
diff --git a/src/mesa/drivers/x11/Makefile b/src/mesa/drivers/x11/Makefile
index f94aae85f2c..6b2a13c974f 100644
--- a/src/mesa/drivers/x11/Makefile
+++ b/src/mesa/drivers/x11/Makefile
@@ -47,6 +47,9 @@ INCLUDE_DIRS = \
CORE_MESA = $(TOP)/src/mesa/libmesa.a $(TOP)/src/mapi/glapi/libglapi.a
+ifeq ($(SHARED_GLAPI),1)
+GL_LIB_DEPS := -L$(TOP)/$(LIB_DIR) -l$(GLAPI_LIB) $(GL_LIB_DEPS)
+endif
.c.o:
diff --git a/src/mesa/drivers/x11/fakeglx.c b/src/mesa/drivers/x11/fakeglx.c
index 577e27d4da3..48657b44be1 100644
--- a/src/mesa/drivers/x11/fakeglx.c
+++ b/src/mesa/drivers/x11/fakeglx.c
@@ -1292,7 +1292,7 @@ Fake_glXCreateContext( Display *dpy, XVisualInfo *visinfo,
/* deallocate unused windows/buffers */
#if 0
- XMesaGarbageCollect();
+ XMesaGarbageCollect(dpy);
#endif
xmvis = find_glx_visual( dpy, visinfo );
@@ -1533,7 +1533,7 @@ Fake_glXDestroyContext( Display *dpy, GLXContext ctx )
MakeCurrent_PrevDrawBuffer = 0;
MakeCurrent_PrevReadBuffer = 0;
XMesaDestroyContext( glxCtx->xmesaContext );
- XMesaGarbageCollect();
+ XMesaGarbageCollect(dpy);
free(glxCtx);
}
@@ -2327,7 +2327,7 @@ Fake_glXCreateNewContext( Display *dpy, GLXFBConfig config,
return 0;
/* deallocate unused windows/buffers */
- XMesaGarbageCollect();
+ XMesaGarbageCollect(dpy);
glxCtx->xmesaContext = XMesaCreateContext(xmvis,
shareCtx ? shareCtx->xmesaContext : NULL);
@@ -2542,7 +2542,7 @@ Fake_glXCreateContextWithConfigSGIX(Display *dpy, GLXFBConfigSGIX config, int re
return 0;
/* deallocate unused windows/buffers */
- XMesaGarbageCollect();
+ XMesaGarbageCollect(dpy);
glxCtx->xmesaContext = XMesaCreateContext(xmvis,
shareCtx ? shareCtx->xmesaContext : NULL);
diff --git a/src/mesa/drivers/x11/xm_api.c b/src/mesa/drivers/x11/xm_api.c
index b5eabadf486..aad902d1eda 100644
--- a/src/mesa/drivers/x11/xm_api.c
+++ b/src/mesa/drivers/x11/xm_api.c
@@ -1398,7 +1398,7 @@ XMesaContext XMesaCreateContext( XMesaVisual v, XMesaContext share_list )
/* initialize with default driver functions, then plug in XMesa funcs */
_mesa_init_driver_functions(&functions);
xmesa_init_driver_functions(v, &functions);
- if (!_mesa_initialize_context(mesaCtx, &v->mesa_visual,
+ if (!_mesa_initialize_context(mesaCtx, API_OPENGL, &v->mesa_visual,
share_list ? &(share_list->mesa) : (struct gl_context *) NULL,
&functions, (void *) c)) {
free(c);
@@ -2064,12 +2064,12 @@ void xmesa_destroy_buffers_on_display(XMesaDisplay *dpy)
* Look for XMesaBuffers whose X window has been destroyed.
* Deallocate any such XMesaBuffers.
*/
-void XMesaGarbageCollect( void )
+void XMesaGarbageCollect( XMesaDisplay* dpy )
{
XMesaBuffer b, next;
for (b=XMesaBufferList; b; b=next) {
next = b->Next;
- if (b->display && b->frontxrb->drawable && b->type == WINDOW) {
+ if (b->display && b->display == dpy && b->frontxrb->drawable && b->type == WINDOW) {
XSync(b->display, False);
if (!window_exists( b->display, b->frontxrb->drawable )) {
/* found a dead window, free the ancillary info */
diff --git a/src/mesa/drivers/x11/xm_dd.c b/src/mesa/drivers/x11/xm_dd.c
index b8d9e20c426..3031b7b3273 100644
--- a/src/mesa/drivers/x11/xm_dd.c
+++ b/src/mesa/drivers/x11/xm_dd.c
@@ -41,6 +41,7 @@
#include "main/image.h"
#include "main/imports.h"
#include "main/mtypes.h"
+#include "main/pbo.h"
#include "main/state.h"
#include "main/texobj.h"
#include "main/teximage.h"
diff --git a/src/mesa/drivers/x11/xmesa.h b/src/mesa/drivers/x11/xmesa.h
index 98737fab248..347394e0a26 100644
--- a/src/mesa/drivers/x11/xmesa.h
+++ b/src/mesa/drivers/x11/xmesa.h
@@ -324,7 +324,7 @@ extern const char *XMesaGetString( XMesaContext c, int name );
*
* New in Mesa 2.3.
*/
-extern void XMesaGarbageCollect( void );
+extern void XMesaGarbageCollect( XMesaDisplay* dpy );
diff --git a/src/mesa/gl.pc.in b/src/mesa/gl.pc.in
index 97b86596fcf..2d3bc917ece 100644
--- a/src/mesa/gl.pc.in
+++ b/src/mesa/gl.pc.in
@@ -10,3 +10,4 @@ Version: @VERSION@
Libs: -L${libdir} -l@GL_LIB@
Libs.private: @GL_PC_LIB_PRIV@
Cflags: -I${includedir} @GL_PC_CFLAGS@
+glx_tls: @GLX_TLS@
diff --git a/src/mesa/main/.gitignore b/src/mesa/main/.gitignore
index d2fe135008c..391c334ab71 100644
--- a/src/mesa/main/.gitignore
+++ b/src/mesa/main/.gitignore
@@ -1,2 +1,4 @@
+api_exec_es1.c
+api_exec_es2.c
get_es1.c
get_es2.c
diff --git a/src/mesa/main/APIspec.xml b/src/mesa/main/APIspec.xml
index 16d0c9413d0..0f82d0a38e1 100644
--- a/src/mesa/main/APIspec.xml
+++ b/src/mesa/main/APIspec.xml
@@ -379,15 +379,68 @@
<value name="GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_OES" category="OES_texture_cube_map"/>
</desc>
- <desc name="internalFormat" error="GL_INVALID_VALUE">
+ <desc name="internalFormat">
<value name="GL_ALPHA"/>
+
+ <desc name="format" error="GL_INVALID_VALUE">
+ <value name="GL_ALPHA"/>
+ </desc>
+ </desc>
+
+ <desc name="internalFormat">
<value name="GL_RGB"/>
+
+ <desc name="format" error="GL_INVALID_VALUE">
+ <value name="GL_RGB"/>
+ </desc>
+ </desc>
+
+ <desc name="internalFormat">
<value name="GL_RGBA"/>
- <value name="GL_BGRA_EXT"/>
+
+ <desc name="format" error="GL_INVALID_VALUE">
+ <value name="GL_RGBA"/>
+ </desc>
+ </desc>
+
+ <desc name="internalFormat">
<value name="GL_LUMINANCE"/>
+
+ <desc name="format" error="GL_INVALID_VALUE">
+ <value name="GL_LUMINANCE"/>
+ </desc>
+ </desc>
+
+ <desc name="internalFormat">
<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 name="format" error="GL_INVALID_VALUE">
+ <value name="GL_LUMINANCE_ALPHA"/>
+ </desc>
+ </desc>
+
+ <desc name="internalFormat" category="OES_depth_texture">
+ <value name="GL_DEPTH_COMPONENT"/>
+
+ <desc name="format" error="GL_INVALID_VALUE">
+ <value name="GL_DEPTH_COMPONENT"/>
+ </desc>
+ </desc>
+
+ <desc name="internalFormat" category="OES_packed_depth_stencil">
+ <value name="GL_DEPTH_STENCIL_OES"/>
+
+ <desc name="format" error="GL_INVALID_VALUE">
+ <value name="GL_DEPTH_STENCIL_OES"/>
+ </desc>
+ </desc>
+
+ <desc name="internalFormat" category="EXT_texture_format_BGRA8888">
+ <value name="GL_BGRA_EXT"/>
+
+ <desc name="format" error="GL_INVALID_VALUE">
+ <value name="GL_BGRA_EXT"/>
+ </desc>
</desc>
<desc name="border" error="GL_INVALID_VALUE">
@@ -2004,6 +2057,14 @@
<value name="GL_UNSIGNED_INT_24_8_OES"/>
</desc>
</desc>
+
+ <desc name="format" category="EXT_texture_format_BGRA8888">
+ <value name="GL_BGRA_EXT"/>
+
+ <desc name="type" error="GL_INVALID_OPERATION">
+ <value name="GL_UNSIGNED_BYTE"/>
+ </desc>
+ </desc>
</template>
<template name="BindTexture">
@@ -3582,6 +3643,7 @@
<function name="ClearColor" template="ClearColor" gltype="GLclampf"/>
<function name="ClearStencil" template="ClearStencil"/>
<function name="ClearDepth" template="ClearDepth" gltype="GLclampd"/>
+ <function name="ClearDepthf" template="ClearDepth" gltype="GLclampf"/>
<function name="StencilMask" template="StencilMask"/>
<function name="StencilMaskSeparate" template="StencilMaskSeparate"/>
@@ -3626,6 +3688,7 @@
<function name="IsEnabled" template="IsEnabled"/>
<function name="DepthRange" template="DepthRange" gltype="GLclampd"/>
+ <function name="DepthRangef" template="DepthRange" gltype="GLclampf"/>
<function name="Frustum" template="Frustum" gltype="GLdouble"/>
<function name="LoadIdentity" template="LoadIdentity"/>
diff --git a/src/mesa/main/accum.c b/src/mesa/main/accum.c
index 9026110f3ef..6a83930a13d 100644
--- a/src/mesa/main/accum.c
+++ b/src/mesa/main/accum.c
@@ -27,6 +27,7 @@
#include "context.h"
#include "imports.h"
#include "macros.h"
+#include "mfeatures.h"
#include "state.h"
#include "mtypes.h"
#include "main/dispatch.h"
@@ -50,7 +51,6 @@ _mesa_ClearAccum( GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha )
if (TEST_EQ_4V(tmp, ctx->Accum.ClearColor))
return;
- FLUSH_VERTICES(ctx, _NEW_ACCUM);
COPY_4FV( ctx->Accum.ClearColor, tmp );
}
diff --git a/src/mesa/main/api_arrayelt.c b/src/mesa/main/api_arrayelt.c
index c22e18c9fbc..b429e2627e3 100644
--- a/src/mesa/main/api_arrayelt.c
+++ b/src/mesa/main/api_arrayelt.c
@@ -40,6 +40,8 @@
#include "context.h"
#include "imports.h"
#include "macros.h"
+#include "mfeatures.h"
+#include "mtypes.h"
#include "main/dispatch.h"
typedef void (GLAPIENTRY *array_func)( const void * );
diff --git a/src/mesa/main/api_arrayelt.h b/src/mesa/main/api_arrayelt.h
index 610e522a943..b90d713682e 100644
--- a/src/mesa/main/api_arrayelt.h
+++ b/src/mesa/main/api_arrayelt.h
@@ -28,6 +28,7 @@
#define API_ARRAYELT_H
+#include "main/mfeatures.h"
#include "main/mtypes.h"
#if FEATURE_arrayelt
diff --git a/src/mesa/main/api_exec.c b/src/mesa/main/api_exec.c
index 1427abd107a..4da48936484 100644
--- a/src/mesa/main/api_exec.c
+++ b/src/mesa/main/api_exec.c
@@ -87,6 +87,7 @@
#include "texobj.h"
#include "texparam.h"
#include "texstate.h"
+#include "texturebarrier.h"
#include "transformfeedback.h"
#include "mtypes.h"
#include "varray.h"
@@ -361,6 +362,10 @@ _mesa_create_exec_table(void)
SET_PointParameterfvEXT(exec, _mesa_PointParameterfv);
#endif
+ /* 95. GL_ARB_ES2_compatibility */
+ SET_ClearDepthf(exec, _mesa_ClearDepthf);
+ SET_DepthRangef(exec, _mesa_DepthRangef);
+
/* 97. GL_EXT_compiled_vertex_array */
#if _HAVE_FULL_GL
SET_LockArraysEXT(exec, _mesa_LockArraysEXT);
@@ -707,7 +712,18 @@ _mesa_create_exec_table(void)
SET_GetStringi(exec, _mesa_GetStringi);
SET_ClampColor(exec, _mesa_ClampColorARB);
+ /* GL_ARB_instanced_arrays */
+ SET_VertexAttribDivisorARB(exec, _mesa_VertexAttribDivisor);
+
+ /* GL_ARB_draw_buffer_blend */
+ SET_BlendFunciARB(exec, _mesa_BlendFunci);
+ SET_BlendFuncSeparateiARB(exec, _mesa_BlendFuncSeparatei);
+ SET_BlendEquationiARB(exec, _mesa_BlendEquationi);
+ SET_BlendEquationSeparateiARB(exec, _mesa_BlendEquationSeparatei);
+ /* GL_NV_texture_barrier */
+ SET_TextureBarrierNV(exec, _mesa_TextureBarrierNV);
+
return exec;
}
diff --git a/src/mesa/main/api_exec_es1.c b/src/mesa/main/api_exec_es1.c
index b29eb5a6d61..45cc19ce404 100644
--- a/src/mesa/main/api_exec_es1.c
+++ b/src/mesa/main/api_exec_es1.c
@@ -2,7 +2,7 @@
* THIS FILE AUTOMATICALLY GENERATED BY THE es_generator.py SCRIPT
* API specification file: main/APIspec.xml
* GLES version: GLES1.1
- * date: 2010-12-09 17:05:10
+ * date: 2011-03-16 14:46:40
*/
@@ -430,24 +430,17 @@ static void GL_APIENTRY _es_ClearColorx(GLclampx red, GLclampx green, GLclampx b
_mesa_ClearColor(converted_red, converted_green, converted_blue, converted_alpha);
}
-extern void GL_APIENTRY _mesa_ClearDepth(GLclampd depth);
-static void GL_APIENTRY _es_ClearDepthf(GLclampf depth)
-{
- GLclampd converted_depth;
-
- converted_depth = (GLclampd) (depth);
-
- _mesa_ClearDepth(converted_depth);
-}
+extern void GL_APIENTRY _mesa_ClearDepthf(GLclampf depth);
+#define _es_ClearDepthf _mesa_ClearDepthf
-extern void GL_APIENTRY _mesa_ClearDepth(GLclampd depth);
+extern void GL_APIENTRY _mesa_ClearDepthf(GLclampf depth);
static void GL_APIENTRY _es_ClearDepthx(GLclampx depth)
{
- GLclampd converted_depth;
+ GLclampf converted_depth;
- converted_depth = (GLclampd) (depth / 65536.0);
+ converted_depth = (GLclampf) (depth / 65536.0f);
- _mesa_ClearDepth(converted_depth);
+ _mesa_ClearDepthf(converted_depth);
}
extern void GL_APIENTRY _mesa_ClearStencil(GLint s);
@@ -787,28 +780,19 @@ static void GL_APIENTRY _es_DepthFunc(GLenum func)
extern void GL_APIENTRY _mesa_DepthMask(GLboolean flag);
#define _es_DepthMask _mesa_DepthMask
-extern void GL_APIENTRY _mesa_DepthRange(GLclampd zNear, GLclampd zFar);
-static void GL_APIENTRY _es_DepthRangef(GLclampf zNear, GLclampf zFar)
-{
- GLclampd converted_zNear;
- GLclampd converted_zFar;
-
- converted_zNear = (GLclampd) (zNear);
- converted_zFar = (GLclampd) (zFar);
+extern void GL_APIENTRY _mesa_DepthRangef(GLclampf zNear, GLclampf zFar);
+#define _es_DepthRangef _mesa_DepthRangef
- _mesa_DepthRange(converted_zNear, converted_zFar);
-}
-
-extern void GL_APIENTRY _mesa_DepthRange(GLclampd zNear, GLclampd zFar);
+extern void GL_APIENTRY _mesa_DepthRangef(GLclampf zNear, GLclampf zFar);
static void GL_APIENTRY _es_DepthRangex(GLclampx zNear, GLclampx zFar)
{
- GLclampd converted_zNear;
- GLclampd converted_zFar;
+ GLclampf converted_zNear;
+ GLclampf converted_zFar;
- converted_zNear = (GLclampd) (zNear / 65536.0);
- converted_zFar = (GLclampd) (zFar / 65536.0);
+ converted_zNear = (GLclampf) (zNear / 65536.0f);
+ converted_zFar = (GLclampf) (zFar / 65536.0f);
- _mesa_DepthRange(converted_zNear, converted_zFar);
+ _mesa_DepthRangef(converted_zNear, converted_zFar);
}
extern void GL_APIENTRY _mesa_Disable(GLenum cap);
@@ -4111,11 +4095,34 @@ static void GL_APIENTRY _es_TexImage2D(GLenum target, GLint level, GLint interna
}
switch(internalFormat) {
case GL_ALPHA:
+ if (format != GL_ALPHA) {
+ _mesa_error(_mesa_get_current_context(), GL_INVALID_VALUE, "glTexImage2D(internalFormat=0x%x)", internalFormat);
+ return;
+ }
+ break;
case GL_RGB:
+ if (format != GL_RGB) {
+ _mesa_error(_mesa_get_current_context(), GL_INVALID_VALUE, "glTexImage2D(internalFormat=0x%x)", internalFormat);
+ return;
+ }
+ break;
case GL_RGBA:
- case GL_BGRA_EXT:
+ if (format != GL_RGBA) {
+ _mesa_error(_mesa_get_current_context(), GL_INVALID_VALUE, "glTexImage2D(internalFormat=0x%x)", internalFormat);
+ return;
+ }
+ break;
case GL_LUMINANCE:
+ if (format != GL_LUMINANCE) {
+ _mesa_error(_mesa_get_current_context(), GL_INVALID_VALUE, "glTexImage2D(internalFormat=0x%x)", internalFormat);
+ return;
+ }
+ break;
case GL_LUMINANCE_ALPHA:
+ if (format != GL_LUMINANCE_ALPHA) {
+ _mesa_error(_mesa_get_current_context(), GL_INVALID_VALUE, "glTexImage2D(internalFormat=0x%x)", internalFormat);
+ return;
+ }
break;
default:
_mesa_error(_mesa_get_current_context(), GL_INVALID_VALUE, "glTexImage2D(internalFormat=%d)", internalFormat);
diff --git a/src/mesa/main/api_exec_es2.c b/src/mesa/main/api_exec_es2.c
index e706bc2c322..4c53e99f22d 100644
--- a/src/mesa/main/api_exec_es2.c
+++ b/src/mesa/main/api_exec_es2.c
@@ -2,7 +2,7 @@
* THIS FILE AUTOMATICALLY GENERATED BY THE es_generator.py SCRIPT
* API specification file: main/APIspec.xml
* GLES version: GLES2.0
- * date: 2010-12-09 17:05:11
+ * date: 2011-03-16 14:46:40
*/
@@ -403,15 +403,8 @@ static void GL_APIENTRY _es_Clear(GLbitfield mask)
extern void GL_APIENTRY _mesa_ClearColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
#define _es_ClearColor _mesa_ClearColor
-extern void GL_APIENTRY _mesa_ClearDepth(GLclampd depth);
-static void GL_APIENTRY _es_ClearDepthf(GLclampf depth)
-{
- GLclampd converted_depth;
-
- converted_depth = (GLclampd) (depth);
-
- _mesa_ClearDepth(converted_depth);
-}
+extern void GL_APIENTRY _mesa_ClearDepthf(GLclampf depth);
+#define _es_ClearDepthf _mesa_ClearDepthf
extern void GL_APIENTRY _mesa_ClearStencil(GLint s);
#define _es_ClearStencil _mesa_ClearStencil
@@ -671,17 +664,8 @@ static void GL_APIENTRY _es_DepthFunc(GLenum func)
extern void GL_APIENTRY _mesa_DepthMask(GLboolean flag);
#define _es_DepthMask _mesa_DepthMask
-extern void GL_APIENTRY _mesa_DepthRange(GLclampd zNear, GLclampd zFar);
-static void GL_APIENTRY _es_DepthRangef(GLclampf zNear, GLclampf zFar)
-{
- GLclampd converted_zNear;
- GLclampd converted_zFar;
-
- converted_zNear = (GLclampd) (zNear);
- converted_zFar = (GLclampd) (zFar);
-
- _mesa_DepthRange(converted_zNear, converted_zFar);
-}
+extern void GL_APIENTRY _mesa_DepthRangef(GLclampf zNear, GLclampf zFar);
+#define _es_DepthRangef _mesa_DepthRangef
extern void GL_APIENTRY _mesa_DetachShader(GLuint program, GLuint shader);
#define _es_DetachShader _mesa_DetachShader
@@ -1743,13 +1727,52 @@ static void GL_APIENTRY _es_TexImage2D(GLenum target, GLint level, GLint interna
}
switch(internalFormat) {
case GL_ALPHA:
+ if (format != GL_ALPHA) {
+ _mesa_error(_mesa_get_current_context(), GL_INVALID_VALUE, "glTexImage2D(internalFormat=0x%x)", internalFormat);
+ return;
+ }
+ break;
case GL_RGB:
+ if (format != GL_RGB) {
+ _mesa_error(_mesa_get_current_context(), GL_INVALID_VALUE, "glTexImage2D(internalFormat=0x%x)", internalFormat);
+ return;
+ }
+ break;
case GL_RGBA:
- case GL_BGRA_EXT:
+ if (format != GL_RGBA) {
+ _mesa_error(_mesa_get_current_context(), GL_INVALID_VALUE, "glTexImage2D(internalFormat=0x%x)", internalFormat);
+ return;
+ }
+ break;
case GL_LUMINANCE:
+ if (format != GL_LUMINANCE) {
+ _mesa_error(_mesa_get_current_context(), GL_INVALID_VALUE, "glTexImage2D(internalFormat=0x%x)", internalFormat);
+ return;
+ }
+ break;
case GL_LUMINANCE_ALPHA:
+ if (format != GL_LUMINANCE_ALPHA) {
+ _mesa_error(_mesa_get_current_context(), GL_INVALID_VALUE, "glTexImage2D(internalFormat=0x%x)", internalFormat);
+ return;
+ }
+ break;
case GL_DEPTH_COMPONENT:
+ if (format != GL_DEPTH_COMPONENT) {
+ _mesa_error(_mesa_get_current_context(), GL_INVALID_VALUE, "glTexImage2D(internalFormat=0x%x)", internalFormat);
+ return;
+ }
+ break;
case GL_DEPTH_STENCIL_OES:
+ if (format != GL_DEPTH_STENCIL_OES) {
+ _mesa_error(_mesa_get_current_context(), GL_INVALID_VALUE, "glTexImage2D(internalFormat=0x%x)", internalFormat);
+ return;
+ }
+ break;
+ case GL_BGRA_EXT:
+ if (format != GL_BGRA_EXT) {
+ _mesa_error(_mesa_get_current_context(), GL_INVALID_VALUE, "glTexImage2D(internalFormat=0x%x)", internalFormat);
+ return;
+ }
break;
default:
_mesa_error(_mesa_get_current_context(), GL_INVALID_VALUE, "glTexImage2D(internalFormat=%d)", internalFormat);
@@ -2095,6 +2118,12 @@ static void GL_APIENTRY _es_TexSubImage2D(GLenum target, GLint level, GLint xoff
return;
}
break;
+ case GL_BGRA_EXT:
+ if (type != GL_UNSIGNED_BYTE) {
+ _mesa_error(_mesa_get_current_context(), GL_INVALID_OPERATION, "glTexSubImage2D(format=0x%x)", format);
+ return;
+ }
+ break;
default:
_mesa_error(_mesa_get_current_context(), GL_INVALID_OPERATION, "glTexSubImage2D(format=0x%x)", format);
return;
diff --git a/src/mesa/main/api_noop.c b/src/mesa/main/api_noop.c
index 08b4b4a3b67..7d3d3327279 100644
--- a/src/mesa/main/api_noop.c
+++ b/src/mesa/main/api_noop.c
@@ -30,6 +30,7 @@
#include "context.h"
#include "light.h"
#include "macros.h"
+#include "mfeatures.h"
#include "dlist.h"
#include "eval.h"
#include "main/dispatch.h"
diff --git a/src/mesa/main/api_noop.h b/src/mesa/main/api_noop.h
index e7fd49bafbb..aca7f088db6 100644
--- a/src/mesa/main/api_noop.h
+++ b/src/mesa/main/api_noop.h
@@ -25,6 +25,7 @@
#ifndef _API_NOOP_H
#define _API_NOOP_H
+#include "main/mfeatures.h"
#include "main/mtypes.h"
#if FEATURE_beginend
diff --git a/src/mesa/main/api_validate.c b/src/mesa/main/api_validate.c
index ac9709db3f1..7c4652f747f 100644
--- a/src/mesa/main/api_validate.c
+++ b/src/mesa/main/api_validate.c
@@ -329,7 +329,7 @@ _mesa_validate_DrawArrays(struct gl_context *ctx,
GLboolean
_mesa_validate_DrawArraysInstanced(struct gl_context *ctx, GLenum mode, GLint first,
- GLsizei count, GLsizei primcount)
+ GLsizei count, GLsizei numInstances)
{
ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, GL_FALSE);
@@ -346,10 +346,10 @@ _mesa_validate_DrawArraysInstanced(struct gl_context *ctx, GLenum mode, GLint fi
return GL_FALSE;
}
- if (primcount <= 0) {
- if (primcount < 0)
+ if (numInstances <= 0) {
+ if (numInstances < 0)
_mesa_error(ctx, GL_INVALID_VALUE,
- "glDrawArraysInstanced(primcount=%d)", primcount);
+ "glDrawArraysInstanced(numInstances=%d)", numInstances);
return GL_FALSE;
}
@@ -374,7 +374,7 @@ _mesa_validate_DrawArraysInstanced(struct gl_context *ctx, GLenum mode, GLint fi
GLboolean
_mesa_validate_DrawElementsInstanced(struct gl_context *ctx,
GLenum mode, GLsizei count, GLenum type,
- const GLvoid *indices, GLsizei primcount)
+ const GLvoid *indices, GLsizei numInstances)
{
ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, GL_FALSE);
@@ -399,10 +399,10 @@ _mesa_validate_DrawElementsInstanced(struct gl_context *ctx,
return GL_FALSE;
}
- if (primcount <= 0) {
- if (primcount < 0)
+ if (numInstances <= 0) {
+ if (numInstances < 0)
_mesa_error(ctx, GL_INVALID_VALUE,
- "glDrawElementsInstanced(primcount=%d)", primcount);
+ "glDrawElementsInstanced(numInstances=%d)", numInstances);
return GL_FALSE;
}
diff --git a/src/mesa/main/arrayobj.c b/src/mesa/main/arrayobj.c
index 0d64b7de8dd..46010223370 100644
--- a/src/mesa/main/arrayobj.c
+++ b/src/mesa/main/arrayobj.c
@@ -43,11 +43,13 @@
#include "hash.h"
#include "imports.h"
#include "context.h"
+#include "mfeatures.h"
#if FEATURE_ARB_vertex_buffer_object
#include "bufferobj.h"
#endif
#include "arrayobj.h"
#include "macros.h"
+#include "mtypes.h"
#include "main/dispatch.h"
@@ -232,7 +234,7 @@ _mesa_initialize_array_object( struct gl_context *ctx,
init_array(ctx, &obj->Weight, 1, GL_FLOAT);
init_array(ctx, &obj->Normal, 3, GL_FLOAT);
init_array(ctx, &obj->Color, 4, GL_FLOAT);
- init_array(ctx, &obj->SecondaryColor, 4, GL_FLOAT);
+ init_array(ctx, &obj->SecondaryColor, 3, GL_FLOAT);
init_array(ctx, &obj->FogCoord, 1, GL_FLOAT);
init_array(ctx, &obj->Index, 1, GL_FLOAT);
for (i = 0; i < Elements(obj->TexCoord); i++) {
diff --git a/src/mesa/main/atifragshader.c b/src/mesa/main/atifragshader.c
index ae2feb3229a..44097e1a266 100644
--- a/src/mesa/main/atifragshader.c
+++ b/src/mesa/main/atifragshader.c
@@ -26,6 +26,7 @@
#include "main/hash.h"
#include "main/imports.h"
#include "main/macros.h"
+#include "main/mfeatures.h"
#include "main/enums.h"
#include "main/mtypes.h"
#include "main/dispatch.h"
@@ -316,6 +317,7 @@ _mesa_DeleteFragmentShaderATI(GLuint id)
if (prog) {
prog->RefCount--;
if (prog->RefCount <= 0) {
+ assert(prog != &DummyShader);
free(prog);
}
}
diff --git a/src/mesa/main/attrib.c b/src/mesa/main/attrib.c
index fb6fbe5b6db..ae7f633b8d8 100644
--- a/src/mesa/main/attrib.c
+++ b/src/mesa/main/attrib.c
@@ -43,6 +43,7 @@
#include "lines.h"
#include "macros.h"
#include "matrix.h"
+#include "mfeatures.h"
#include "multisample.h"
#include "points.h"
#include "polygon.h"
@@ -124,9 +125,6 @@ struct gl_enable_attrib
GLbitfield Texture[MAX_TEXTURE_UNITS];
GLbitfield TexGen[MAX_TEXTURE_UNITS];
- /* SGI_texture_color_table */
- GLboolean TextureColorTable[MAX_TEXTURE_UNITS];
-
/* GL_ARB_vertex_program / GL_NV_vertex_program */
GLboolean VertexProgram;
GLboolean VertexProgramPointSize;
@@ -310,7 +308,6 @@ _mesa_PushAttrib(GLbitfield mask)
for (i = 0; i < ctx->Const.MaxTextureUnits; i++) {
attr->Texture[i] = ctx->Texture.Unit[i].Enabled;
attr->TexGen[i] = ctx->Texture.Unit[i].TexGenEnabled;
- attr->TextureColorTable[i] = ctx->Texture.Unit[i].ColorTableEnabled;
}
/* GL_NV_vertex_program */
attr->VertexProgram = ctx->VertexProgram.Enabled;
@@ -656,9 +653,6 @@ pop_enable_group(struct gl_context *ctx, const struct gl_enable_attrib *enable)
_mesa_set_enable(ctx, GL_TEXTURE_GEN_Q,
(genEnabled & Q_BIT) ? GL_TRUE : GL_FALSE);
}
-
- /* GL_SGI_texture_color_table */
- ctx->Texture.Unit[i].ColorTableEnabled = enable->TextureColorTable[i];
}
_mesa_ActiveTextureARB(GL_TEXTURE0 + curTexUnitSave);
@@ -701,10 +695,6 @@ pop_texture_group(struct gl_context *ctx, struct texture_state *texstate)
(unit->Enabled & TEXTURE_2D_ARRAY_BIT) ? GL_TRUE : GL_FALSE);
}
- if (ctx->Extensions.SGI_texture_color_table) {
- _mesa_set_enable(ctx, GL_TEXTURE_COLOR_TABLE_SGI,
- unit->ColorTableEnabled);
- }
_mesa_TexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, unit->EnvMode);
_mesa_TexEnvfv(GL_TEXTURE_ENV, GL_TEXTURE_ENV_COLOR, unit->EnvColor);
_mesa_TexGeni(GL_S, GL_TEXTURE_GEN_MODE, unit->GenS.Mode);
@@ -953,20 +943,39 @@ _mesa_PopAttrib(void)
_mesa_set_enable(ctx, GL_BLEND, (color->BlendEnabled & 1));
}
}
- _mesa_BlendFuncSeparateEXT(color->BlendSrcRGB,
- color->BlendDstRGB,
- color->BlendSrcA,
- color->BlendDstA);
- /* This special case is because glBlendEquationSeparateEXT
- * cannot take GL_LOGIC_OP as a parameter.
- */
- if ( color->BlendEquationRGB == color->BlendEquationA ) {
- _mesa_BlendEquation(color->BlendEquationRGB);
- }
- else {
- _mesa_BlendEquationSeparateEXT(color->BlendEquationRGB,
- color->BlendEquationA);
- }
+ if (ctx->Color._BlendFuncPerBuffer ||
+ ctx->Color._BlendEquationPerBuffer) {
+ /* set blend per buffer */
+ GLuint buf;
+ for (buf = 0; buf < ctx->Const.MaxDrawBuffers; buf++) {
+ _mesa_BlendFuncSeparatei(buf, color->Blend[buf].SrcRGB,
+ color->Blend[buf].DstRGB,
+ color->Blend[buf].SrcA,
+ color->Blend[buf].DstA);
+ _mesa_BlendEquationSeparatei(buf,
+ color->Blend[buf].EquationRGB,
+ color->Blend[buf].EquationA);
+ }
+ }
+ else {
+ /* set same blend modes for all buffers */
+ _mesa_BlendFuncSeparateEXT(color->Blend[0].SrcRGB,
+ color->Blend[0].DstRGB,
+ color->Blend[0].SrcA,
+ color->Blend[0].DstA);
+ /* This special case is because glBlendEquationSeparateEXT
+ * cannot take GL_LOGIC_OP as a parameter.
+ */
+ if (color->Blend[0].EquationRGB ==
+ color->Blend[0].EquationA) {
+ _mesa_BlendEquation(color->Blend[0].EquationRGB);
+ }
+ else {
+ _mesa_BlendEquationSeparateEXT(
+ color->Blend[0].EquationRGB,
+ color->Blend[0].EquationA);
+ }
+ }
_mesa_BlendColor(color->BlendColor[0],
color->BlendColor[1],
color->BlendColor[2],
diff --git a/src/mesa/main/blend.c b/src/mesa/main/blend.c
index ec778b7244d..c74a168036a 100644
--- a/src/mesa/main/blend.c
+++ b/src/mesa/main/blend.c
@@ -37,6 +37,110 @@
#include "mtypes.h"
+
+/**
+ * Check if given blend source factor is legal.
+ * \return GL_TRUE if legal, GL_FALSE otherwise.
+ */
+static GLboolean
+legal_src_factor(const struct gl_context *ctx, GLenum factor)
+{
+ switch (factor) {
+ case GL_SRC_COLOR:
+ case GL_ONE_MINUS_SRC_COLOR:
+ return ctx->Extensions.NV_blend_square;
+ case GL_ZERO:
+ case GL_ONE:
+ case GL_DST_COLOR:
+ case GL_ONE_MINUS_DST_COLOR:
+ case GL_SRC_ALPHA:
+ case GL_ONE_MINUS_SRC_ALPHA:
+ case GL_DST_ALPHA:
+ case GL_ONE_MINUS_DST_ALPHA:
+ case GL_SRC_ALPHA_SATURATE:
+ case GL_CONSTANT_COLOR:
+ case GL_ONE_MINUS_CONSTANT_COLOR:
+ case GL_CONSTANT_ALPHA:
+ case GL_ONE_MINUS_CONSTANT_ALPHA:
+ return GL_TRUE;
+ default:
+ return GL_FALSE;
+ }
+}
+
+
+/**
+ * Check if given blend destination factor is legal.
+ * \return GL_TRUE if legal, GL_FALSE otherwise.
+ */
+static GLboolean
+legal_dst_factor(const struct gl_context *ctx, GLenum factor)
+{
+ switch (factor) {
+ case GL_DST_COLOR:
+ case GL_ONE_MINUS_DST_COLOR:
+ return ctx->Extensions.NV_blend_square;
+ case GL_ZERO:
+ case GL_ONE:
+ case GL_SRC_COLOR:
+ case GL_ONE_MINUS_SRC_COLOR:
+ case GL_SRC_ALPHA:
+ case GL_ONE_MINUS_SRC_ALPHA:
+ case GL_DST_ALPHA:
+ case GL_ONE_MINUS_DST_ALPHA:
+ case GL_CONSTANT_COLOR:
+ case GL_ONE_MINUS_CONSTANT_COLOR:
+ case GL_CONSTANT_ALPHA:
+ case GL_ONE_MINUS_CONSTANT_ALPHA:
+ return GL_TRUE;
+ default:
+ return GL_FALSE;
+ }
+}
+
+
+/**
+ * Check if src/dest RGB/A blend factors are legal. If not generate
+ * a GL error.
+ * \return GL_TRUE if factors are legal, GL_FALSE otherwise.
+ */
+static GLboolean
+validate_blend_factors(struct gl_context *ctx, const char *func,
+ GLenum sfactorRGB, GLenum dfactorRGB,
+ GLenum sfactorA, GLenum dfactorA)
+{
+ if (!legal_src_factor(ctx, sfactorRGB)) {
+ _mesa_error(ctx, GL_INVALID_ENUM,
+ "%s(sfactorRGB = %s)", func,
+ _mesa_lookup_enum_by_nr(sfactorRGB));
+ return GL_FALSE;
+ }
+
+ if (!legal_dst_factor(ctx, dfactorRGB)) {
+ _mesa_error(ctx, GL_INVALID_ENUM,
+ "%s(dfactorRGB = %s)", func,
+ _mesa_lookup_enum_by_nr(dfactorRGB));
+ return GL_FALSE;
+ }
+
+ if (sfactorA != sfactorRGB && !legal_src_factor(ctx, sfactorA)) {
+ _mesa_error(ctx, GL_INVALID_ENUM,
+ "%s(sfactorA = %s)", func,
+ _mesa_lookup_enum_by_nr(sfactorA));
+ return GL_FALSE;
+ }
+
+ if (dfactorA != dfactorRGB && !legal_dst_factor(ctx, dfactorA)) {
+ _mesa_error(ctx, GL_INVALID_ENUM,
+ "%s(dfactorA = %s)", func,
+ _mesa_lookup_enum_by_nr(dfactorA));
+ return GL_FALSE;
+ }
+
+ return GL_TRUE;
+}
+
+
/**
* Specify the blending operation.
*
@@ -53,21 +157,19 @@ _mesa_BlendFunc( GLenum sfactor, GLenum dfactor )
/**
- * Process GL_EXT_blend_func_separate().
+ * Set the separate blend source/dest factors for all draw buffers.
*
* \param sfactorRGB RGB source factor operator.
* \param dfactorRGB RGB destination factor operator.
* \param sfactorA alpha source factor operator.
* \param dfactorA alpha destination factor operator.
- *
- * Verifies the parameters and updates gl_colorbuffer_attrib.
- * On a change, flush the vertices and notify the driver via
- * dd_function_table::BlendFuncSeparate.
*/
void GLAPIENTRY
_mesa_BlendFuncSeparateEXT( GLenum sfactorRGB, GLenum dfactorRGB,
GLenum sfactorA, GLenum dfactorA )
{
+ GLuint buf, numBuffers;
+ GLboolean changed;
GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_BEGIN_END(ctx);
@@ -78,165 +180,130 @@ _mesa_BlendFuncSeparateEXT( GLenum sfactorRGB, GLenum dfactorRGB,
_mesa_lookup_enum_by_nr(sfactorA),
_mesa_lookup_enum_by_nr(dfactorA));
- switch (sfactorRGB) {
- case GL_SRC_COLOR:
- case GL_ONE_MINUS_SRC_COLOR:
- if (!ctx->Extensions.NV_blend_square) {
- _mesa_error(ctx, GL_INVALID_ENUM, "glBlendFunc or glBlendFuncSeparate (sfactorRGB)");
- return;
- }
- /* fall-through */
- case GL_ZERO:
- case GL_ONE:
- case GL_DST_COLOR:
- case GL_ONE_MINUS_DST_COLOR:
- case GL_SRC_ALPHA:
- case GL_ONE_MINUS_SRC_ALPHA:
- case GL_DST_ALPHA:
- case GL_ONE_MINUS_DST_ALPHA:
- case GL_SRC_ALPHA_SATURATE:
- case GL_CONSTANT_COLOR:
- case GL_ONE_MINUS_CONSTANT_COLOR:
- case GL_CONSTANT_ALPHA:
- case GL_ONE_MINUS_CONSTANT_ALPHA:
- break;
- default:
- _mesa_error(ctx, GL_INVALID_ENUM, "glBlendFunc or glBlendFuncSeparate (sfactorRGB)");
- return;
+ if (!validate_blend_factors(ctx, "glBlendFuncSeparate",
+ sfactorRGB, dfactorRGB,
+ sfactorA, dfactorA)) {
+ return;
}
- switch (dfactorRGB) {
- case GL_DST_COLOR:
- case GL_ONE_MINUS_DST_COLOR:
- if (!ctx->Extensions.NV_blend_square) {
- _mesa_error(ctx, GL_INVALID_ENUM, "glBlendFunc or glBlendFuncSeparate (dfactorRGB)");
- return;
- }
- /* fall-through */
- case GL_ZERO:
- case GL_ONE:
- case GL_SRC_COLOR:
- case GL_ONE_MINUS_SRC_COLOR:
- case GL_SRC_ALPHA:
- case GL_ONE_MINUS_SRC_ALPHA:
- case GL_DST_ALPHA:
- case GL_ONE_MINUS_DST_ALPHA:
- case GL_CONSTANT_COLOR:
- case GL_ONE_MINUS_CONSTANT_COLOR:
- case GL_CONSTANT_ALPHA:
- case GL_ONE_MINUS_CONSTANT_ALPHA:
+ numBuffers = ctx->Extensions.ARB_draw_buffers_blend
+ ? ctx->Const.MaxDrawBuffers : 1;
+
+ changed = GL_FALSE;
+ for (buf = 0; buf < numBuffers; buf++) {
+ if (ctx->Color.Blend[buf].SrcRGB != sfactorRGB ||
+ ctx->Color.Blend[buf].DstRGB != dfactorRGB ||
+ ctx->Color.Blend[buf].SrcA != sfactorA ||
+ ctx->Color.Blend[buf].DstA != dfactorA) {
+ changed = GL_TRUE;
break;
- default:
- _mesa_error(ctx, GL_INVALID_ENUM, "glBlendFunc or glBlendFuncSeparate (dfactorRGB)");
- return;
+ }
}
+ if (!changed)
+ return;
- switch (sfactorA) {
- case GL_SRC_COLOR:
- case GL_ONE_MINUS_SRC_COLOR:
- if (!ctx->Extensions.NV_blend_square) {
- _mesa_error(ctx, GL_INVALID_ENUM, "glBlendFunc or glBlendFuncSeparate (sfactorA)");
- return;
- }
- /* fall-through */
- case GL_ZERO:
- case GL_ONE:
- case GL_DST_COLOR:
- case GL_ONE_MINUS_DST_COLOR:
- case GL_SRC_ALPHA:
- case GL_ONE_MINUS_SRC_ALPHA:
- case GL_DST_ALPHA:
- case GL_ONE_MINUS_DST_ALPHA:
- case GL_SRC_ALPHA_SATURATE:
- case GL_CONSTANT_COLOR:
- case GL_ONE_MINUS_CONSTANT_COLOR:
- case GL_CONSTANT_ALPHA:
- case GL_ONE_MINUS_CONSTANT_ALPHA:
- break;
- default:
- _mesa_error(ctx, GL_INVALID_ENUM, "glBlendFunc or glBlendFuncSeparate (sfactorA)");
- return;
+ FLUSH_VERTICES(ctx, _NEW_COLOR);
+
+ for (buf = 0; buf < numBuffers; buf++) {
+ ctx->Color.Blend[buf].SrcRGB = sfactorRGB;
+ ctx->Color.Blend[buf].DstRGB = dfactorRGB;
+ ctx->Color.Blend[buf].SrcA = sfactorA;
+ ctx->Color.Blend[buf].DstA = dfactorA;
}
+ ctx->Color._BlendFuncPerBuffer = GL_FALSE;
- switch (dfactorA) {
- case GL_DST_COLOR:
- case GL_ONE_MINUS_DST_COLOR:
- if (!ctx->Extensions.NV_blend_square) {
- _mesa_error(ctx, GL_INVALID_ENUM, "glBlendFunc or glBlendFuncSeparate (dfactorA)");
- return;
- }
- /* fall-through */
- case GL_ZERO:
- case GL_ONE:
- case GL_SRC_COLOR:
- case GL_ONE_MINUS_SRC_COLOR:
- case GL_SRC_ALPHA:
- case GL_ONE_MINUS_SRC_ALPHA:
- case GL_DST_ALPHA:
- case GL_ONE_MINUS_DST_ALPHA:
- case GL_CONSTANT_COLOR:
- case GL_ONE_MINUS_CONSTANT_COLOR:
- case GL_CONSTANT_ALPHA:
- case GL_ONE_MINUS_CONSTANT_ALPHA:
- break;
- default:
- _mesa_error( ctx, GL_INVALID_ENUM, "glBlendFunc or glBlendFuncSeparate (dfactorA)" );
- return;
+ if (ctx->Driver.BlendFuncSeparate) {
+ ctx->Driver.BlendFuncSeparate(ctx, sfactorRGB, dfactorRGB,
+ sfactorA, dfactorA);
+ }
+}
+
+
+#if _HAVE_FULL_GL
+
+
+/**
+ * Set blend source/dest factors for one color buffer/target.
+ */
+void GLAPIENTRY
+_mesa_BlendFunci(GLuint buf, GLenum sfactor, GLenum dfactor)
+{
+ _mesa_BlendFuncSeparatei(buf, sfactor, dfactor, sfactor, dfactor);
+}
+
+
+/**
+ * Set separate blend source/dest factors for one color buffer/target.
+ */
+void GLAPIENTRY
+_mesa_BlendFuncSeparatei(GLuint buf, GLenum sfactorRGB, GLenum dfactorRGB,
+ GLenum sfactorA, GLenum dfactorA)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ ASSERT_OUTSIDE_BEGIN_END(ctx);
+
+ if (!ctx->Extensions.ARB_draw_buffers_blend) {
+ _mesa_error(ctx, GL_INVALID_OPERATION, "glBlendFunc[Separate]i()");
+ return;
+ }
+
+ if (buf >= ctx->Const.MaxDrawBuffers) {
+ _mesa_error(ctx, GL_INVALID_VALUE, "glBlendFuncSeparatei(buffer=%u)",
+ buf);
+ return;
}
- if (ctx->Color.BlendSrcRGB == sfactorRGB &&
- ctx->Color.BlendDstRGB == dfactorRGB &&
- ctx->Color.BlendSrcA == sfactorA &&
- ctx->Color.BlendDstA == dfactorA)
+ if (!validate_blend_factors(ctx, "glBlendFuncSeparatei",
+ sfactorRGB, dfactorRGB,
+ sfactorA, dfactorA)) {
return;
+ }
+
+ if (ctx->Color.Blend[buf].SrcRGB == sfactorRGB &&
+ ctx->Color.Blend[buf].DstRGB == dfactorRGB &&
+ ctx->Color.Blend[buf].SrcA == sfactorA &&
+ ctx->Color.Blend[buf].DstA == dfactorA)
+ return; /* no change */
FLUSH_VERTICES(ctx, _NEW_COLOR);
- ctx->Color.BlendSrcRGB = sfactorRGB;
- ctx->Color.BlendDstRGB = dfactorRGB;
- ctx->Color.BlendSrcA = sfactorA;
- ctx->Color.BlendDstA = dfactorA;
+ ctx->Color.Blend[buf].SrcRGB = sfactorRGB;
+ ctx->Color.Blend[buf].DstRGB = dfactorRGB;
+ ctx->Color.Blend[buf].SrcA = sfactorA;
+ ctx->Color.Blend[buf].DstA = dfactorA;
+ ctx->Color._BlendFuncPerBuffer = GL_TRUE;
- if (ctx->Driver.BlendFuncSeparate) {
- (*ctx->Driver.BlendFuncSeparate)( ctx, sfactorRGB, dfactorRGB,
- sfactorA, dfactorA );
+ if (ctx->Driver.BlendFuncSeparatei) {
+ ctx->Driver.BlendFuncSeparatei(ctx, buf, sfactorRGB, dfactorRGB,
+ sfactorA, dfactorA);
}
}
-#if _HAVE_FULL_GL
-
+/**
+ * Check if given blend equation is legal.
+ * \return GL_TRUE if legal, GL_FALSE otherwise.
+ */
static GLboolean
-_mesa_validate_blend_equation( struct gl_context *ctx,
- GLenum mode, GLboolean is_separate )
+legal_blend_equation(const struct gl_context *ctx,
+ GLenum mode, GLboolean is_separate)
{
switch (mode) {
- case GL_FUNC_ADD:
- break;
- case GL_MIN:
- case GL_MAX:
- if (!ctx->Extensions.EXT_blend_minmax) {
- return GL_FALSE;
- }
- break;
+ case GL_FUNC_ADD:
+ return GL_TRUE;
+ case GL_MIN:
+ case GL_MAX:
+ return ctx->Extensions.EXT_blend_minmax;
+ case GL_LOGIC_OP:
/* glBlendEquationSeparate cannot take GL_LOGIC_OP as a parameter.
*/
- case GL_LOGIC_OP:
- if (!ctx->Extensions.EXT_blend_logic_op || is_separate) {
- return GL_FALSE;
- }
- break;
- case GL_FUNC_SUBTRACT:
- case GL_FUNC_REVERSE_SUBTRACT:
- if (!ctx->Extensions.EXT_blend_subtract) {
- return GL_FALSE;
- }
- break;
- default:
- return GL_FALSE;
+ return ctx->Extensions.EXT_blend_logic_op && !is_separate;
+ case GL_FUNC_SUBTRACT:
+ case GL_FUNC_REVERSE_SUBTRACT:
+ return ctx->Extensions.EXT_blend_subtract;
+ default:
+ return GL_FALSE;
}
-
- return GL_TRUE;
}
@@ -244,39 +311,94 @@ _mesa_validate_blend_equation( struct gl_context *ctx,
void GLAPIENTRY
_mesa_BlendEquation( GLenum mode )
{
+ GLuint buf, numBuffers;
+ GLboolean changed;
GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_BEGIN_END(ctx);
if (MESA_VERBOSE & VERBOSE_API)
- _mesa_debug(ctx, "glBlendEquation %s\n",
+ _mesa_debug(ctx, "glBlendEquation(%s)\n",
_mesa_lookup_enum_by_nr(mode));
- if ( ! _mesa_validate_blend_equation( ctx, mode, GL_FALSE ) ) {
+ if (!legal_blend_equation(ctx, mode, GL_FALSE)) {
_mesa_error(ctx, GL_INVALID_ENUM, "glBlendEquation");
return;
}
- if ( (ctx->Color.BlendEquationRGB == mode) &&
- (ctx->Color.BlendEquationA == mode) )
+ numBuffers = ctx->Extensions.ARB_draw_buffers_blend
+ ? ctx->Const.MaxDrawBuffers : 1;
+
+ changed = GL_FALSE;
+ for (buf = 0; buf < numBuffers; buf++) {
+ if (ctx->Color.Blend[buf].EquationRGB != mode ||
+ ctx->Color.Blend[buf].EquationA != mode) {
+ changed = GL_TRUE;
+ break;
+ }
+ }
+ if (!changed)
return;
FLUSH_VERTICES(ctx, _NEW_COLOR);
- ctx->Color.BlendEquationRGB = mode;
- ctx->Color.BlendEquationA = mode;
+ for (buf = 0; buf < numBuffers; buf++) {
+ ctx->Color.Blend[buf].EquationRGB = mode;
+ ctx->Color.Blend[buf].EquationA = mode;
+ }
+ ctx->Color._BlendEquationPerBuffer = GL_FALSE;
if (ctx->Driver.BlendEquationSeparate)
(*ctx->Driver.BlendEquationSeparate)( ctx, mode, mode );
}
+/**
+ * Set blend equation for one color buffer/target.
+ */
+void GLAPIENTRY
+_mesa_BlendEquationi(GLuint buf, GLenum mode)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ ASSERT_OUTSIDE_BEGIN_END(ctx);
+
+ if (MESA_VERBOSE & VERBOSE_API)
+ _mesa_debug(ctx, "glBlendEquationi(%u, %s)\n",
+ buf, _mesa_lookup_enum_by_nr(mode));
+
+ if (buf >= ctx->Const.MaxDrawBuffers) {
+ _mesa_error(ctx, GL_INVALID_VALUE, "glBlendFuncSeparatei(buffer=%u)",
+ buf);
+ return;
+ }
+
+ if (!legal_blend_equation(ctx, mode, GL_FALSE)) {
+ _mesa_error(ctx, GL_INVALID_ENUM, "glBlendEquationi");
+ return;
+ }
+
+ if (ctx->Color.Blend[buf].EquationRGB == mode &&
+ ctx->Color.Blend[buf].EquationA == mode)
+ return; /* no change */
+
+ FLUSH_VERTICES(ctx, _NEW_COLOR);
+ ctx->Color.Blend[buf].EquationRGB = mode;
+ ctx->Color.Blend[buf].EquationA = mode;
+ ctx->Color._BlendEquationPerBuffer = GL_TRUE;
+
+ if (ctx->Driver.BlendEquationSeparatei)
+ ctx->Driver.BlendEquationSeparatei(ctx, buf, mode, mode);
+}
+
+
void GLAPIENTRY
_mesa_BlendEquationSeparateEXT( GLenum modeRGB, GLenum modeA )
{
+ GLuint buf, numBuffers;
+ GLboolean changed;
GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_BEGIN_END(ctx);
if (MESA_VERBOSE & VERBOSE_API)
- _mesa_debug(ctx, "glBlendEquationSeparateEXT %s %s\n",
+ _mesa_debug(ctx, "glBlendEquationSeparateEXT(%s %s)\n",
_mesa_lookup_enum_by_nr(modeRGB),
_mesa_lookup_enum_by_nr(modeA));
@@ -286,29 +408,88 @@ _mesa_BlendEquationSeparateEXT( GLenum modeRGB, GLenum modeA )
return;
}
- if ( ! _mesa_validate_blend_equation( ctx, modeRGB, GL_TRUE ) ) {
+ if (!legal_blend_equation(ctx, modeRGB, GL_TRUE)) {
_mesa_error(ctx, GL_INVALID_ENUM, "glBlendEquationSeparateEXT(modeRGB)");
return;
}
- if ( ! _mesa_validate_blend_equation( ctx, modeA, GL_TRUE ) ) {
+ if (!legal_blend_equation(ctx, modeA, GL_TRUE)) {
_mesa_error(ctx, GL_INVALID_ENUM, "glBlendEquationSeparateEXT(modeA)");
return;
}
+ numBuffers = ctx->Extensions.ARB_draw_buffers_blend
+ ? ctx->Const.MaxDrawBuffers : 1;
- if ( (ctx->Color.BlendEquationRGB == modeRGB) &&
- (ctx->Color.BlendEquationA == modeA) )
+ changed = GL_FALSE;
+ for (buf = 0; buf < numBuffers; buf++) {
+ if (ctx->Color.Blend[buf].EquationRGB != modeRGB ||
+ ctx->Color.Blend[buf].EquationA != modeA) {
+ changed = GL_TRUE;
+ break;
+ }
+ }
+ if (!changed)
return;
FLUSH_VERTICES(ctx, _NEW_COLOR);
- ctx->Color.BlendEquationRGB = modeRGB;
- ctx->Color.BlendEquationA = modeA;
+ for (buf = 0; buf < numBuffers; buf++) {
+ ctx->Color.Blend[buf].EquationRGB = modeRGB;
+ ctx->Color.Blend[buf].EquationA = modeA;
+ }
+ ctx->Color._BlendEquationPerBuffer = GL_FALSE;
if (ctx->Driver.BlendEquationSeparate)
- (*ctx->Driver.BlendEquationSeparate)( ctx, modeRGB, modeA );
+ ctx->Driver.BlendEquationSeparate(ctx, modeRGB, modeA);
}
-#endif
+
+
+/**
+ * Set separate blend equations for one color buffer/target.
+ */
+void
+_mesa_BlendEquationSeparatei(GLuint buf, GLenum modeRGB, GLenum modeA)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ ASSERT_OUTSIDE_BEGIN_END(ctx);
+
+ if (MESA_VERBOSE & VERBOSE_API)
+ _mesa_debug(ctx, "glBlendEquationSeparatei(%u, %s %s)\n", buf,
+ _mesa_lookup_enum_by_nr(modeRGB),
+ _mesa_lookup_enum_by_nr(modeA));
+
+ if (buf >= ctx->Const.MaxDrawBuffers) {
+ _mesa_error(ctx, GL_INVALID_VALUE, "glBlendEquationSeparatei(buffer=%u)",
+ buf);
+ return;
+ }
+
+ if (!legal_blend_equation(ctx, modeRGB, GL_TRUE)) {
+ _mesa_error(ctx, GL_INVALID_ENUM, "glBlendEquationSeparatei(modeRGB)");
+ return;
+ }
+
+ if (!legal_blend_equation(ctx, modeA, GL_TRUE)) {
+ _mesa_error(ctx, GL_INVALID_ENUM, "glBlendEquationSeparatei(modeA)");
+ return;
+ }
+
+ if (ctx->Color.Blend[buf].EquationRGB == modeRGB &&
+ ctx->Color.Blend[buf].EquationA == modeA)
+ return; /* no change */
+
+ FLUSH_VERTICES(ctx, _NEW_COLOR);
+ ctx->Color.Blend[buf].EquationRGB = modeRGB;
+ ctx->Color.Blend[buf].EquationA = modeA;
+ ctx->Color._BlendEquationPerBuffer = GL_TRUE;
+
+ if (ctx->Driver.BlendEquationSeparatei)
+ ctx->Driver.BlendEquationSeparatei(ctx, buf, modeRGB, modeA);
+}
+
+
+
+#endif /* _HAVE_FULL_GL */
/**
@@ -364,6 +545,10 @@ _mesa_AlphaFunc( GLenum func, GLclampf ref )
GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_BEGIN_END(ctx);
+ if (MESA_VERBOSE & VERBOSE_API)
+ _mesa_debug(ctx, "glAlphaFunc(%s, %f)\n",
+ _mesa_lookup_enum_by_nr(func), ref);
+
switch (func) {
case GL_NEVER:
case GL_LESS:
@@ -409,6 +594,9 @@ _mesa_LogicOp( GLenum opcode )
GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_BEGIN_END(ctx);
+ if (MESA_VERBOSE & VERBOSE_API)
+ _mesa_debug(ctx, "glLogicOp(%s)\n", _mesa_lookup_enum_by_nr(opcode));
+
switch (opcode) {
case GL_CLEAR:
case GL_SET:
@@ -483,7 +671,8 @@ _mesa_ColorMask( GLboolean red, GLboolean green,
ASSERT_OUTSIDE_BEGIN_END(ctx);
if (MESA_VERBOSE & VERBOSE_API)
- _mesa_debug(ctx, "glColorMask %d %d %d %d\n", red, green, blue, alpha);
+ _mesa_debug(ctx, "glColorMask(%d, %d, %d, %d)\n",
+ red, green, blue, alpha);
/* Shouldn't have any information about channel depth in core mesa
* -- should probably store these as the native booleans:
@@ -593,6 +782,8 @@ _mesa_ClampColorARB(GLenum target, GLenum clamp)
*/
void _mesa_init_color( struct gl_context * ctx )
{
+ GLuint i;
+
/* Color buffer group */
ctx->Color.IndexMask = ~0u;
memset(ctx->Color.ColorMask, 0xff, sizeof(ctx->Color.ColorMask));
@@ -602,12 +793,14 @@ void _mesa_init_color( struct gl_context * ctx )
ctx->Color.AlphaFunc = GL_ALWAYS;
ctx->Color.AlphaRef = 0;
ctx->Color.BlendEnabled = 0x0;
- ctx->Color.BlendSrcRGB = GL_ONE;
- ctx->Color.BlendDstRGB = GL_ZERO;
- ctx->Color.BlendSrcA = GL_ONE;
- ctx->Color.BlendDstA = GL_ZERO;
- ctx->Color.BlendEquationRGB = GL_FUNC_ADD;
- ctx->Color.BlendEquationA = GL_FUNC_ADD;
+ for (i = 0; i < Elements(ctx->Color.Blend); i++) {
+ ctx->Color.Blend[i].SrcRGB = GL_ONE;
+ ctx->Color.Blend[i].DstRGB = GL_ZERO;
+ ctx->Color.Blend[i].SrcA = GL_ONE;
+ ctx->Color.Blend[i].DstA = GL_ZERO;
+ ctx->Color.Blend[i].EquationRGB = GL_FUNC_ADD;
+ ctx->Color.Blend[i].EquationA = GL_FUNC_ADD;
+ }
ASSIGN_4V( ctx->Color.BlendColor, 0.0, 0.0, 0.0, 0.0 );
ctx->Color.IndexLogicOpEnabled = GL_FALSE;
ctx->Color.ColorLogicOpEnabled = GL_FALSE;
diff --git a/src/mesa/main/blend.h b/src/mesa/main/blend.h
index f72c779f1aa..39e7c9fd49b 100644
--- a/src/mesa/main/blend.h
+++ b/src/mesa/main/blend.h
@@ -48,13 +48,30 @@ _mesa_BlendFuncSeparateEXT( GLenum sfactorRGB, GLenum dfactorRGB,
extern void GLAPIENTRY
+_mesa_BlendFunci(GLuint buf, GLenum sfactor, GLenum dfactor);
+
+
+extern void GLAPIENTRY
+_mesa_BlendFuncSeparatei(GLuint buf, GLenum sfactorRGB, GLenum dfactorRGB,
+ GLenum sfactorA, GLenum dfactorA);
+
+
+extern void GLAPIENTRY
_mesa_BlendEquation( GLenum mode );
extern void GLAPIENTRY
+_mesa_BlendEquationi(GLuint buf, GLenum mode);
+
+
+extern void GLAPIENTRY
_mesa_BlendEquationSeparateEXT( GLenum modeRGB, GLenum modeA );
+extern void
+_mesa_BlendEquationSeparatei(GLuint buf, GLenum modeRGB, GLenum modeA);
+
+
extern void GLAPIENTRY
_mesa_BlendColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c
index 4d62f54a95a..3343bb2f40e 100644
--- a/src/mesa/main/bufferobj.c
+++ b/src/mesa/main/bufferobj.c
@@ -39,6 +39,8 @@
#include "context.h"
#include "bufferobj.h"
#include "fbobject.h"
+#include "mfeatures.h"
+#include "mtypes.h"
#include "texobj.h"
@@ -556,6 +558,7 @@ void
_mesa_init_buffer_objects( struct gl_context *ctx )
{
memset(&DummyBufferObject, 0, sizeof(DummyBufferObject));
+ _glthread_INIT_MUTEX(DummyBufferObject.Mutex);
DummyBufferObject.RefCount = 1000*1000*1000; /* never delete */
_mesa_reference_buffer_object(ctx, &ctx->Array.ArrayBufferObj,
@@ -656,248 +659,6 @@ _mesa_update_default_objects_buffer_objects(struct gl_context *ctx)
}
-/**
- * When we're about to read pixel data out of a PBO (via glDrawPixels,
- * glTexImage, etc) or write data into a PBO (via glReadPixels,
- * glGetTexImage, etc) we call this function to check that we're not
- * going to read out of bounds.
- *
- * XXX This would also be a convenient time to check that the PBO isn't
- * currently mapped. Whoever calls this function should check for that.
- * Remember, we can't use a PBO when it's mapped!
- *
- * If we're not using a PBO, this is a no-op.
- *
- * \param width width of image to read/write
- * \param height height of image to read/write
- * \param depth depth of image to read/write
- * \param format format of image to read/write
- * \param type datatype of image to read/write
- * \param ptr the user-provided pointer/offset
- * \return GL_TRUE if the PBO access is OK, GL_FALSE if the access would
- * go out of bounds.
- */
-GLboolean
-_mesa_validate_pbo_access(GLuint dimensions,
- const struct gl_pixelstore_attrib *pack,
- GLsizei width, GLsizei height, GLsizei depth,
- GLenum format, GLenum type, const GLvoid *ptr)
-{
- GLvoid *start, *end;
- const GLubyte *sizeAddr; /* buffer size, cast to a pointer */
-
- if (!_mesa_is_bufferobj(pack->BufferObj))
- return GL_TRUE; /* no PBO, OK */
-
- if (pack->BufferObj->Size == 0)
- /* no buffer! */
- return GL_FALSE;
-
- /* get address of first pixel we'll read */
- start = _mesa_image_address(dimensions, pack, ptr, width, height,
- format, type, 0, 0, 0);
-
- /* get address just past the last pixel we'll read */
- end = _mesa_image_address(dimensions, pack, ptr, width, height,
- format, type, depth-1, height-1, width);
-
-
- sizeAddr = ((const GLubyte *) 0) + pack->BufferObj->Size;
-
- if ((const GLubyte *) start > sizeAddr) {
- /* This will catch negative values / wrap-around */
- return GL_FALSE;
- }
- if ((const GLubyte *) end > sizeAddr) {
- /* Image read goes beyond end of buffer */
- return GL_FALSE;
- }
-
- /* OK! */
- return GL_TRUE;
-}
-
-
-/**
- * For commands that read from a PBO (glDrawPixels, glTexImage,
- * glPolygonStipple, etc), if we're reading from a PBO, map it read-only
- * and return the pointer into the PBO. If we're not reading from a
- * PBO, return \p src as-is.
- * If non-null return, must call _mesa_unmap_pbo_source() when done.
- *
- * \return NULL if error, else pointer to start of data
- */
-const GLvoid *
-_mesa_map_pbo_source(struct gl_context *ctx,
- const struct gl_pixelstore_attrib *unpack,
- const GLvoid *src)
-{
- const GLubyte *buf;
-
- if (_mesa_is_bufferobj(unpack->BufferObj)) {
- /* unpack from PBO */
- buf = (GLubyte *) ctx->Driver.MapBuffer(ctx, GL_PIXEL_UNPACK_BUFFER_EXT,
- GL_READ_ONLY_ARB,
- unpack->BufferObj);
- if (!buf)
- return NULL;
-
- buf = ADD_POINTERS(buf, src);
- }
- else {
- /* unpack from normal memory */
- buf = src;
- }
-
- return buf;
-}
-
-
-/**
- * Combine PBO-read validation and mapping.
- * If any GL errors are detected, they'll be recorded and NULL returned.
- * \sa _mesa_validate_pbo_access
- * \sa _mesa_map_pbo_source
- * A call to this function should have a matching call to
- * _mesa_unmap_pbo_source().
- */
-const GLvoid *
-_mesa_map_validate_pbo_source(struct gl_context *ctx,
- GLuint dimensions,
- const struct gl_pixelstore_attrib *unpack,
- GLsizei width, GLsizei height, GLsizei depth,
- GLenum format, GLenum type, const GLvoid *ptr,
- const char *where)
-{
- ASSERT(dimensions == 1 || dimensions == 2 || dimensions == 3);
-
- if (!_mesa_is_bufferobj(unpack->BufferObj)) {
- /* non-PBO access: no validation to be done */
- return ptr;
- }
-
- if (!_mesa_validate_pbo_access(dimensions, unpack,
- width, height, depth, format, type, ptr)) {
- _mesa_error(ctx, GL_INVALID_OPERATION,
- "%s(out of bounds PBO access)", where);
- return NULL;
- }
-
- if (_mesa_bufferobj_mapped(unpack->BufferObj)) {
- /* buffer is already mapped - that's an error */
- _mesa_error(ctx, GL_INVALID_OPERATION, "%s(PBO is mapped)", where);
- return NULL;
- }
-
- ptr = _mesa_map_pbo_source(ctx, unpack, ptr);
- return ptr;
-}
-
-
-/**
- * Counterpart to _mesa_map_pbo_source()
- */
-void
-_mesa_unmap_pbo_source(struct gl_context *ctx,
- const struct gl_pixelstore_attrib *unpack)
-{
- ASSERT(unpack != &ctx->Pack); /* catch pack/unpack mismatch */
- if (_mesa_is_bufferobj(unpack->BufferObj)) {
- ctx->Driver.UnmapBuffer(ctx, GL_PIXEL_UNPACK_BUFFER_EXT,
- unpack->BufferObj);
- }
-}
-
-
-/**
- * For commands that write to a PBO (glReadPixels, glGetColorTable, etc),
- * if we're writing to a PBO, map it write-only and return the pointer
- * into the PBO. If we're not writing to a PBO, return \p dst as-is.
- * If non-null return, must call _mesa_unmap_pbo_dest() when done.
- *
- * \return NULL if error, else pointer to start of data
- */
-void *
-_mesa_map_pbo_dest(struct gl_context *ctx,
- const struct gl_pixelstore_attrib *pack,
- GLvoid *dest)
-{
- void *buf;
-
- if (_mesa_is_bufferobj(pack->BufferObj)) {
- /* pack into PBO */
- buf = (GLubyte *) ctx->Driver.MapBuffer(ctx, GL_PIXEL_PACK_BUFFER_EXT,
- GL_WRITE_ONLY_ARB,
- pack->BufferObj);
- if (!buf)
- return NULL;
-
- buf = ADD_POINTERS(buf, dest);
- }
- else {
- /* pack to normal memory */
- buf = dest;
- }
-
- return buf;
-}
-
-
-/**
- * Combine PBO-write validation and mapping.
- * If any GL errors are detected, they'll be recorded and NULL returned.
- * \sa _mesa_validate_pbo_access
- * \sa _mesa_map_pbo_dest
- * A call to this function should have a matching call to
- * _mesa_unmap_pbo_dest().
- */
-GLvoid *
-_mesa_map_validate_pbo_dest(struct gl_context *ctx,
- GLuint dimensions,
- const struct gl_pixelstore_attrib *unpack,
- GLsizei width, GLsizei height, GLsizei depth,
- GLenum format, GLenum type, GLvoid *ptr,
- const char *where)
-{
- ASSERT(dimensions == 1 || dimensions == 2 || dimensions == 3);
-
- if (!_mesa_is_bufferobj(unpack->BufferObj)) {
- /* non-PBO access: no validation to be done */
- return ptr;
- }
-
- if (!_mesa_validate_pbo_access(dimensions, unpack,
- width, height, depth, format, type, ptr)) {
- _mesa_error(ctx, GL_INVALID_OPERATION,
- "%s(out of bounds PBO access)", where);
- return NULL;
- }
-
- if (_mesa_bufferobj_mapped(unpack->BufferObj)) {
- /* buffer is already mapped - that's an error */
- _mesa_error(ctx, GL_INVALID_OPERATION, "%s(PBO is mapped)", where);
- return NULL;
- }
-
- ptr = _mesa_map_pbo_dest(ctx, unpack, ptr);
- return ptr;
-}
-
-
-/**
- * Counterpart to _mesa_map_pbo_dest()
- */
-void
-_mesa_unmap_pbo_dest(struct gl_context *ctx,
- const struct gl_pixelstore_attrib *pack)
-{
- ASSERT(pack != &ctx->Unpack); /* catch pack/unpack mismatch */
- if (_mesa_is_bufferobj(pack->BufferObj)) {
- ctx->Driver.UnmapBuffer(ctx, GL_PIXEL_PACK_BUFFER_EXT, pack->BufferObj);
- }
-}
-
-
/**
* Return the gl_buffer_object for the given ID.
@@ -968,6 +729,10 @@ _mesa_BindBufferARB(GLenum target, GLuint buffer)
GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_BEGIN_END(ctx);
+ if (MESA_VERBOSE & VERBOSE_API)
+ _mesa_debug(ctx, "glBindBuffer(%s, %u)\n",
+ _mesa_lookup_enum_by_nr(target), buffer);
+
bind_buffer_object(ctx, target, buffer);
}
@@ -984,6 +749,7 @@ _mesa_DeleteBuffersARB(GLsizei n, const GLuint *ids)
GET_CURRENT_CONTEXT(ctx);
GLsizei i;
ASSERT_OUTSIDE_BEGIN_END(ctx);
+ FLUSH_VERTICES(ctx, 0);
if (n < 0) {
_mesa_error(ctx, GL_INVALID_VALUE, "glDeleteBuffersARB(n)");
@@ -1062,6 +828,9 @@ _mesa_GenBuffersARB(GLsizei n, GLuint *buffer)
GLint i;
ASSERT_OUTSIDE_BEGIN_END(ctx);
+ if (MESA_VERBOSE & VERBOSE_API)
+ _mesa_debug(ctx, "glGenBuffers(%d)\n", n);
+
if (n < 0) {
_mesa_error(ctx, GL_INVALID_VALUE, "glGenBuffersARB");
return;
@@ -1119,6 +888,12 @@ _mesa_BufferDataARB(GLenum target, GLsizeiptrARB size,
struct gl_buffer_object *bufObj;
ASSERT_OUTSIDE_BEGIN_END(ctx);
+ if (MESA_VERBOSE & VERBOSE_API)
+ _mesa_debug(ctx, "glBufferData(%s, %ld, %p, %s)\n",
+ _mesa_lookup_enum_by_nr(target),
+ (long int) size, data,
+ _mesa_lookup_enum_by_nr(usage));
+
if (size < 0) {
_mesa_error(ctx, GL_INVALID_VALUE, "glBufferDataARB(size < 0)");
return;
diff --git a/src/mesa/main/bufferobj.h b/src/mesa/main/bufferobj.h
index 4b97e34767e..91fa073b649 100644
--- a/src/mesa/main/bufferobj.h
+++ b/src/mesa/main/bufferobj.h
@@ -29,6 +29,7 @@
#define BUFFEROBJ_H
+#include "mfeatures.h"
#include "mtypes.h"
@@ -78,47 +79,6 @@ _mesa_reference_buffer_object(struct gl_context *ctx,
struct gl_buffer_object **ptr,
struct gl_buffer_object *bufObj);
-extern GLboolean
-_mesa_validate_pbo_access(GLuint dimensions,
- const struct gl_pixelstore_attrib *pack,
- GLsizei width, GLsizei height, GLsizei depth,
- GLenum format, GLenum type, const GLvoid *ptr);
-
-extern const GLvoid *
-_mesa_map_pbo_source(struct gl_context *ctx,
- const struct gl_pixelstore_attrib *unpack,
- const GLvoid *src);
-
-extern const GLvoid *
-_mesa_map_validate_pbo_source(struct gl_context *ctx,
- GLuint dimensions,
- const struct gl_pixelstore_attrib *unpack,
- GLsizei width, GLsizei height, GLsizei depth,
- GLenum format, GLenum type, const GLvoid *ptr,
- const char *where);
-
-extern void
-_mesa_unmap_pbo_source(struct gl_context *ctx,
- const struct gl_pixelstore_attrib *unpack);
-
-extern void *
-_mesa_map_pbo_dest(struct gl_context *ctx,
- const struct gl_pixelstore_attrib *pack,
- GLvoid *dest);
-
-extern GLvoid *
-_mesa_map_validate_pbo_dest(struct gl_context *ctx,
- GLuint dimensions,
- const struct gl_pixelstore_attrib *unpack,
- GLsizei width, GLsizei height, GLsizei depth,
- GLenum format, GLenum type, GLvoid *ptr,
- const char *where);
-
-extern void
-_mesa_unmap_pbo_dest(struct gl_context *ctx,
- const struct gl_pixelstore_attrib *pack);
-
-
extern void
_mesa_init_buffer_object_functions(struct dd_function_table *driver);
diff --git a/src/mesa/main/buffers.c b/src/mesa/main/buffers.c
index 86446311fe3..5c37f3d1a86 100644
--- a/src/mesa/main/buffers.c
+++ b/src/mesa/main/buffers.c
@@ -35,6 +35,7 @@
#include "colormac.h"
#include "context.h"
#include "enums.h"
+#include "mtypes.h"
#define BAD_MASK ~0u
diff --git a/src/mesa/main/clear.c b/src/mesa/main/clear.c
index c4c1d96e49c..43a9ccc116a 100644
--- a/src/mesa/main/clear.c
+++ b/src/mesa/main/clear.c
@@ -36,6 +36,7 @@
#include "colormac.h"
#include "enums.h"
#include "macros.h"
+#include "mtypes.h"
#include "state.h"
diff --git a/src/mesa/main/colormac.h b/src/mesa/main/colormac.h
index 245fb658bb3..a328dcd32af 100644
--- a/src/mesa/main/colormac.h
+++ b/src/mesa/main/colormac.h
@@ -198,12 +198,23 @@ do { \
((((B) & 0xf8) >> 1) | (((G) & 0xc0) >> 6) | (((G) & 0x38) << 10) | (((R) & 0xf8) << 5) | \
((A) ? 0x80 : 0))
+#define PACK_COLOR_2101010_UB( A, B, G, R ) \
+ (((B) << 22) | ((G) << 12) | ((R) << 2) | \
+ (((A) & 0xc0) << 24))
+
+#define PACK_COLOR_2101010_US( A, B, G, R ) \
+ ((((B) >> 6) << 20) | (((G) >> 6) << 10) | ((R) >> 6) | \
+ (((A) >> 14) << 30))
+
#define PACK_COLOR_4444( R, G, B, A ) \
((((R) & 0xf0) << 8) | (((G) & 0xf0) << 4) | ((B) & 0xf0) | ((A) >> 4))
#define PACK_COLOR_4444_REV( R, G, B, A ) \
((((B) & 0xf0) << 8) | (((A) & 0xf0) << 4) | ((R) & 0xf0) | ((G) >> 4))
+#define PACK_COLOR_44( L, A ) \
+ (((L) & 0xf0) | (((A) & 0xf0) >> 4))
+
#define PACK_COLOR_88( L, A ) \
(((L) << 8) | (A))
diff --git a/src/mesa/main/colortab.c b/src/mesa/main/colortab.c
index caa95835bc2..d0c865735ac 100644
--- a/src/mesa/main/colortab.c
+++ b/src/mesa/main/colortab.c
@@ -29,7 +29,10 @@
#include "context.h"
#include "image.h"
#include "macros.h"
+#include "mfeatures.h"
+#include "mtypes.h"
#include "pack.h"
+#include "pbo.h"
#include "state.h"
#include "teximage.h"
#include "texstate.h"
@@ -298,23 +301,6 @@ _mesa_ColorTable( GLenum target, GLenum internalFormat,
case GL_SHARED_TEXTURE_PALETTE_EXT:
table = &ctx->Texture.Palette;
break;
- case GL_TEXTURE_COLOR_TABLE_SGI:
- if (!ctx->Extensions.SGI_texture_color_table) {
- _mesa_error(ctx, GL_INVALID_ENUM, "glColorTable(target)");
- return;
- }
- table = &(texUnit->ColorTable);
- scale = ctx->Pixel.TextureColorTableScale;
- bias = ctx->Pixel.TextureColorTableBias;
- break;
- case GL_PROXY_TEXTURE_COLOR_TABLE_SGI:
- if (!ctx->Extensions.SGI_texture_color_table) {
- _mesa_error(ctx, GL_INVALID_ENUM, "glColorTable(target)");
- return;
- }
- table = &(texUnit->ProxyColorTable);
- proxy = GL_TRUE;
- break;
default:
/* try texture targets */
{
@@ -433,15 +419,6 @@ _mesa_ColorSubTable( GLenum target, GLsizei start,
case GL_SHARED_TEXTURE_PALETTE_EXT:
table = &ctx->Texture.Palette;
break;
- case GL_TEXTURE_COLOR_TABLE_SGI:
- if (!ctx->Extensions.SGI_texture_color_table) {
- _mesa_error(ctx, GL_INVALID_ENUM, "glColorSubTable(target)");
- return;
- }
- table = &(texUnit->ColorTable);
- scale = ctx->Pixel.TextureColorTableScale;
- bias = ctx->Pixel.TextureColorTableBias;
- break;
default:
/* try texture targets */
texObj = _mesa_select_tex_object(ctx, texUnit, target);
@@ -549,13 +526,6 @@ _mesa_GetColorTable( GLenum target, GLenum format,
case GL_SHARED_TEXTURE_PALETTE_EXT:
table = &ctx->Texture.Palette;
break;
- case GL_TEXTURE_COLOR_TABLE_SGI:
- if (!ctx->Extensions.SGI_texture_color_table) {
- _mesa_error(ctx, GL_INVALID_ENUM, "glGetColorTable(target)");
- return;
- }
- table = &(texUnit->ColorTable);
- break;
default:
/* try texture targets */
{
@@ -659,32 +629,10 @@ _mesa_GetColorTable( GLenum target, GLenum format,
static void GLAPIENTRY
_mesa_ColorTableParameterfv(GLenum target, GLenum pname, const GLfloat *params)
{
- GLfloat *scale, *bias;
+ /* no extensions use this function */
GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
-
- switch (target) {
- case GL_TEXTURE_COLOR_TABLE_SGI:
- scale = ctx->Pixel.TextureColorTableScale;
- bias = ctx->Pixel.TextureColorTableBias;
- break;
- default:
- _mesa_error(ctx, GL_INVALID_ENUM, "glColorTableParameter(target)");
- return;
- }
-
- if (pname == GL_COLOR_TABLE_SCALE_SGI) {
- COPY_4V(scale, params);
- }
- else if (pname == GL_COLOR_TABLE_BIAS_SGI) {
- COPY_4V(bias, params);
- }
- else {
- _mesa_error(ctx, GL_INVALID_ENUM, "glColorTableParameterfv(pname)");
- return;
- }
-
- ctx->NewState |= _NEW_PIXEL;
+ _mesa_error(ctx, GL_INVALID_ENUM, "glColorTableParameterfv(target)");
}
@@ -692,19 +640,10 @@ _mesa_ColorTableParameterfv(GLenum target, GLenum pname, const GLfloat *params)
static void GLAPIENTRY
_mesa_ColorTableParameteriv(GLenum target, GLenum pname, const GLint *params)
{
- GLfloat fparams[4];
- if (pname == GL_TEXTURE_COLOR_TABLE_SGI) {
- /* four values */
- fparams[0] = (GLfloat) params[0];
- fparams[1] = (GLfloat) params[1];
- fparams[2] = (GLfloat) params[2];
- fparams[3] = (GLfloat) params[3];
- }
- else {
- /* one values */
- fparams[0] = (GLfloat) params[0];
- }
- _mesa_ColorTableParameterfv(target, pname, fparams);
+ /* no extensions use this function */
+ GET_CURRENT_CONTEXT(ctx);
+ ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
+ _mesa_error(ctx, GL_INVALID_ENUM, "glColorTableParameteriv(target)");
}
@@ -721,28 +660,6 @@ _mesa_GetColorTableParameterfv( GLenum target, GLenum pname, GLfloat *params )
case GL_SHARED_TEXTURE_PALETTE_EXT:
table = &ctx->Texture.Palette;
break;
- case GL_TEXTURE_COLOR_TABLE_SGI:
- if (!ctx->Extensions.SGI_texture_color_table) {
- _mesa_error(ctx, GL_INVALID_ENUM, "glGetColorTableParameter(target)");
- return;
- }
- table = &(texUnit->ColorTable);
- if (pname == GL_COLOR_TABLE_SCALE_SGI) {
- COPY_4V(params, ctx->Pixel.TextureColorTableScale);
- return;
- }
- else if (pname == GL_COLOR_TABLE_BIAS_SGI) {
- COPY_4V(params, ctx->Pixel.TextureColorTableBias);
- return;
- }
- break;
- case GL_PROXY_TEXTURE_COLOR_TABLE_SGI:
- if (!ctx->Extensions.SGI_texture_color_table) {
- _mesa_error(ctx, GL_INVALID_ENUM, "glGetColorTableParameter(target)");
- return;
- }
- table = &(texUnit->ProxyColorTable);
- break;
default:
/* try texture targets */
{
@@ -806,34 +723,6 @@ _mesa_GetColorTableParameteriv( GLenum target, GLenum pname, GLint *params )
case GL_SHARED_TEXTURE_PALETTE_EXT:
table = &ctx->Texture.Palette;
break;
- case GL_TEXTURE_COLOR_TABLE_SGI:
- if (!ctx->Extensions.SGI_texture_color_table) {
- _mesa_error(ctx, GL_INVALID_ENUM, "glGetColorTableParameter(target)");
- return;
- }
- table = &(texUnit->ColorTable);
- if (pname == GL_COLOR_TABLE_SCALE_SGI) {
- params[0] = (GLint) ctx->Pixel.TextureColorTableScale[0];
- params[1] = (GLint) ctx->Pixel.TextureColorTableScale[1];
- params[2] = (GLint) ctx->Pixel.TextureColorTableScale[2];
- params[3] = (GLint) ctx->Pixel.TextureColorTableScale[3];
- return;
- }
- else if (pname == GL_COLOR_TABLE_BIAS_SGI) {
- params[0] = (GLint) ctx->Pixel.TextureColorTableBias[0];
- params[1] = (GLint) ctx->Pixel.TextureColorTableBias[1];
- params[2] = (GLint) ctx->Pixel.TextureColorTableBias[2];
- params[3] = (GLint) ctx->Pixel.TextureColorTableBias[3];
- return;
- }
- break;
- case GL_PROXY_TEXTURE_COLOR_TABLE_SGI:
- if (!ctx->Extensions.SGI_texture_color_table) {
- _mesa_error(ctx, GL_INVALID_ENUM, "glGetColorTableParameter(target)");
- return;
- }
- table = &(texUnit->ProxyColorTable);
- break;
default:
/* Try texture targets */
{
diff --git a/src/mesa/main/condrender.c b/src/mesa/main/condrender.c
index 25b3dd678dc..352e2e2b165 100644
--- a/src/mesa/main/condrender.c
+++ b/src/mesa/main/condrender.c
@@ -34,6 +34,7 @@
#include "glheader.h"
#include "condrender.h"
#include "enums.h"
+#include "mtypes.h"
#include "queryobj.h"
diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c
index f42a566c302..ca74284ca89 100644
--- a/src/mesa/main/context.c
+++ b/src/mesa/main/context.c
@@ -96,6 +96,7 @@
#include "fbobject.h"
#include "feedback.h"
#include "fog.h"
+#include "formats.h"
#include "framebuffer.h"
#include "hint.h"
#include "hash.h"
@@ -417,6 +418,10 @@ one_time_init( struct gl_context *ctx )
MESA_VERSION_STRING, __DATE__, __TIME__);
}
#endif
+
+#ifdef DEBUG
+ _mesa_test_formats();
+#endif
}
/* per-API one-time init */
@@ -481,30 +486,26 @@ init_program_limits(GLenum type, struct gl_program_constants *prog)
prog->MaxTemps = MAX_PROGRAM_TEMPS;
prog->MaxEnvParams = MAX_PROGRAM_ENV_PARAMS;
prog->MaxLocalParams = MAX_PROGRAM_LOCAL_PARAMS;
- prog->MaxUniformComponents = 4 * MAX_UNIFORMS;
+ prog->MaxAddressOffset = MAX_PROGRAM_LOCAL_PARAMS;
switch (type) {
case GL_VERTEX_PROGRAM_ARB:
prog->MaxParameters = MAX_VERTEX_PROGRAM_PARAMS;
prog->MaxAttribs = MAX_NV_VERTEX_PROGRAM_INPUTS;
prog->MaxAddressRegs = MAX_VERTEX_PROGRAM_ADDRESS_REGS;
+ prog->MaxUniformComponents = 4 * MAX_UNIFORMS;
break;
case GL_FRAGMENT_PROGRAM_ARB:
prog->MaxParameters = MAX_NV_FRAGMENT_PROGRAM_PARAMS;
prog->MaxAttribs = MAX_NV_FRAGMENT_PROGRAM_INPUTS;
prog->MaxAddressRegs = MAX_FRAGMENT_PROGRAM_ADDRESS_REGS;
+ prog->MaxUniformComponents = 4 * MAX_UNIFORMS;
break;
case MESA_GEOMETRY_PROGRAM:
prog->MaxParameters = MAX_NV_VERTEX_PROGRAM_PARAMS;
prog->MaxAttribs = MAX_NV_VERTEX_PROGRAM_INPUTS;
prog->MaxAddressRegs = MAX_VERTEX_PROGRAM_ADDRESS_REGS;
-
- prog->MaxGeometryTextureImageUnits = MAX_GEOMETRY_TEXTURE_IMAGE_UNITS;
- prog->MaxGeometryVaryingComponents = MAX_GEOMETRY_VARYING_COMPONENTS;
- prog->MaxVertexVaryingComponents = MAX_VERTEX_VARYING_COMPONENTS;
- prog->MaxGeometryUniformComponents = MAX_GEOMETRY_UNIFORM_COMPONENTS;
- prog->MaxGeometryOutputVertices = MAX_GEOMETRY_OUTPUT_VERTICES;
- prog->MaxGeometryTotalOutputComponents = MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS;
+ prog->MaxUniformComponents = MAX_GEOMETRY_UNIFORM_COMPONENTS;
break;
default:
assert(0 && "Bad program type in init_program_limits()");
@@ -521,6 +522,25 @@ init_program_limits(GLenum type, struct gl_program_constants *prog)
prog->MaxNativeTemps = 0;
prog->MaxNativeAddressRegs = 0;
prog->MaxNativeParameters = 0;
+
+ /* Set GLSL datatype range/precision info assuming IEEE float values.
+ * Drivers should override these defaults as needed.
+ */
+ prog->MediumFloat.RangeMin = 127;
+ prog->MediumFloat.RangeMax = 127;
+ prog->MediumFloat.Precision = 23;
+ prog->LowFloat = prog->HighFloat = prog->MediumFloat;
+
+ /* Assume ints are stored as floats for now, since this is the least-common
+ * denominator. The OpenGL ES spec implies (page 132) that the precision
+ * of integer types should be 0. Practically speaking, IEEE
+ * single-precision floating point values can only store integers in the
+ * range [-0x01000000, 0x01000000] without loss of precision.
+ */
+ prog->MediumInt.RangeMin = 24;
+ prog->MediumInt.RangeMax = 24;
+ prog->MediumInt.Precision = 0;
+ prog->LowInt = prog->HighInt = prog->MediumInt;
}
@@ -594,6 +614,13 @@ _mesa_init_constants(struct gl_context *ctx)
ctx->Const.MaxCombinedTextureImageUnits = MAX_COMBINED_TEXTURE_IMAGE_UNITS;
ctx->Const.MaxVarying = MAX_VARYING;
#endif
+#if FEATURE_ARB_geometry_shader4
+ ctx->Const.MaxGeometryTextureImageUnits = MAX_GEOMETRY_TEXTURE_IMAGE_UNITS;
+ ctx->Const.MaxVertexVaryingComponents = MAX_VERTEX_VARYING_COMPONENTS;
+ ctx->Const.MaxGeometryVaryingComponents = MAX_GEOMETRY_VARYING_COMPONENTS;
+ ctx->Const.MaxGeometryOutputVertices = MAX_GEOMETRY_OUTPUT_VERTICES;
+ ctx->Const.MaxGeometryTotalOutputComponents = MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS;
+#endif
/* Shading language version */
if (ctx->API == API_OPENGL) {
@@ -862,12 +889,12 @@ _mesa_alloc_dispatch_table(int size)
* \param driverContext pointer to driver-specific context data
*/
GLboolean
-_mesa_initialize_context_for_api(struct gl_context *ctx,
- gl_api api,
- const struct gl_config *visual,
- struct gl_context *share_list,
- const struct dd_function_table *driverFunctions,
- void *driverContext)
+_mesa_initialize_context(struct gl_context *ctx,
+ gl_api api,
+ const struct gl_config *visual,
+ struct gl_context *share_list,
+ const struct dd_function_table *driverFunctions,
+ void *driverContext)
{
struct gl_shared_state *shared;
int i;
@@ -955,6 +982,14 @@ _mesa_initialize_context_for_api(struct gl_context *ctx,
ctx->FragmentProgram._MaintainTexEnvProgram = GL_TRUE;
}
+ /* Mesa core handles all the formats that mesa core knows about.
+ * Drivers will want to override this list with just the formats
+ * they can handle, and confirm that appropriate fallbacks exist in
+ * _mesa_choose_tex_format().
+ */
+ memset(&ctx->TextureFormatSupported, GL_TRUE,
+ sizeof(ctx->TextureFormatSupported));
+
switch (ctx->API) {
case API_OPENGL:
#if FEATURE_dlist
@@ -997,25 +1032,6 @@ _mesa_initialize_context_for_api(struct gl_context *ctx,
/**
- * Initialize an OpenGL context.
- */
-GLboolean
-_mesa_initialize_context(struct gl_context *ctx,
- const struct gl_config *visual,
- struct gl_context *share_list,
- const struct dd_function_table *driverFunctions,
- void *driverContext)
-{
- return _mesa_initialize_context_for_api(ctx,
- API_OPENGL,
- visual,
- share_list,
- driverFunctions,
- driverContext);
-}
-
-
-/**
* Allocate and initialize a struct gl_context structure.
* Note that the driver needs to pass in its dd_function_table here since
* we need to at least call driverFunctions->NewTextureObject to initialize
@@ -1031,11 +1047,11 @@ _mesa_initialize_context(struct gl_context *ctx,
* \return pointer to a new __struct gl_contextRec or NULL if error.
*/
struct gl_context *
-_mesa_create_context_for_api(gl_api api,
- const struct gl_config *visual,
- struct gl_context *share_list,
- const struct dd_function_table *driverFunctions,
- void *driverContext)
+_mesa_create_context(gl_api api,
+ const struct gl_config *visual,
+ struct gl_context *share_list,
+ const struct dd_function_table *driverFunctions,
+ void *driverContext)
{
struct gl_context *ctx;
@@ -1046,8 +1062,8 @@ _mesa_create_context_for_api(gl_api api,
if (!ctx)
return NULL;
- if (_mesa_initialize_context_for_api(ctx, api, visual, share_list,
- driverFunctions, driverContext)) {
+ if (_mesa_initialize_context(ctx, api, visual, share_list,
+ driverFunctions, driverContext)) {
return ctx;
}
else {
@@ -1058,22 +1074,6 @@ _mesa_create_context_for_api(gl_api api,
/**
- * Create an OpenGL context.
- */
-struct gl_context *
-_mesa_create_context(const struct gl_config *visual,
- struct gl_context *share_list,
- const struct dd_function_table *driverFunctions,
- void *driverContext)
-{
- return _mesa_create_context_for_api(API_OPENGL, visual,
- share_list,
- driverFunctions,
- driverContext);
-}
-
-
-/**
* Free the data associated with the given context.
*
* But doesn't free the struct gl_context struct itself.
diff --git a/src/mesa/main/context.h b/src/mesa/main/context.h
index 42d98a33a8d..33a36311c8a 100644
--- a/src/mesa/main/context.h
+++ b/src/mesa/main/context.h
@@ -99,33 +99,20 @@ _mesa_destroy_visual( struct gl_config *vis );
/** \name Context-related functions */
/*@{*/
-extern struct gl_context *
-_mesa_create_context( const struct gl_config *visual,
- struct gl_context *share_list,
- const struct dd_function_table *driverFunctions,
- void *driverContext );
-
extern GLboolean
_mesa_initialize_context( struct gl_context *ctx,
+ gl_api api,
const struct gl_config *visual,
struct gl_context *share_list,
const struct dd_function_table *driverFunctions,
void *driverContext );
extern struct gl_context *
-_mesa_create_context_for_api(gl_api api,
- const struct gl_config *visual,
- struct gl_context *share_list,
- const struct dd_function_table *driverFunctions,
- void *driverContext);
-
-extern GLboolean
-_mesa_initialize_context_for_api(struct gl_context *ctx,
- gl_api api,
- const struct gl_config *visual,
- struct gl_context *share_list,
- const struct dd_function_table *driverFunctions,
- void *driverContext);
+_mesa_create_context(gl_api api,
+ const struct gl_config *visual,
+ struct gl_context *share_list,
+ const struct dd_function_table *driverFunctions,
+ void *driverContext);
extern void
_mesa_free_context_data( struct gl_context *ctx );
@@ -299,28 +286,4 @@ do { \
-/**
- * Is the secondary color needed?
- */
-#define NEED_SECONDARY_COLOR(CTX) \
- (((CTX)->Light.Enabled && \
- (CTX)->Light.Model.ColorControl == GL_SEPARATE_SPECULAR_COLOR) \
- || (CTX)->Fog.ColorSumEnabled \
- || ((CTX)->VertexProgram._Current && \
- ((CTX)->VertexProgram._Current != (CTX)->VertexProgram._TnlProgram) && \
- ((CTX)->VertexProgram._Current->Base.InputsRead & VERT_BIT_COLOR1)) \
- || ((CTX)->FragmentProgram._Current && \
- ((CTX)->FragmentProgram._Current != (CTX)->FragmentProgram._TexEnvProgram) && \
- ((CTX)->FragmentProgram._Current->Base.InputsRead & FRAG_BIT_COL1)) \
- )
-
-
-/**
- * Is RGBA LogicOp enabled?
- */
-#define RGBA_LOGICOP_ENABLED(CTX) \
- ((CTX)->Color.ColorLogicOpEnabled || \
- ((CTX)->Color.BlendEnabled && (CTX)->Color.BlendEquationRGB == GL_LOGIC_OP))
-
-
#endif /* CONTEXT_H */
diff --git a/src/mesa/main/convolve.c b/src/mesa/main/convolve.c
index 0231bcf6d3f..5d286eb316b 100644
--- a/src/mesa/main/convolve.c
+++ b/src/mesa/main/convolve.c
@@ -36,6 +36,7 @@
#include "colormac.h"
#include "convolve.h"
#include "macros.h"
+#include "mfeatures.h"
#include "mtypes.h"
#include "main/dispatch.h"
diff --git a/src/mesa/main/cpuinfo.c b/src/mesa/main/cpuinfo.c
index 35de69b180f..6363512961a 100644
--- a/src/mesa/main/cpuinfo.c
+++ b/src/mesa/main/cpuinfo.c
@@ -23,7 +23,7 @@
*/
-#include "main/imports.h"
+#include "main/compiler.h"
#include "main/cpuinfo.h"
diff --git a/src/mesa/main/dd.h b/src/mesa/main/dd.h
index c62969e9b7e..0947672a081 100644
--- a/src/mesa/main/dd.h
+++ b/src/mesa/main/dd.h
@@ -635,10 +635,15 @@ struct dd_function_table {
void (*BlendColor)(struct gl_context *ctx, const GLfloat color[4]);
/** Set the blend equation */
void (*BlendEquationSeparate)(struct gl_context *ctx, GLenum modeRGB, GLenum modeA);
+ void (*BlendEquationSeparatei)(struct gl_context *ctx, GLuint buffer,
+ GLenum modeRGB, GLenum modeA);
/** Specify pixel arithmetic */
void (*BlendFuncSeparate)(struct gl_context *ctx,
GLenum sfactorRGB, GLenum dfactorRGB,
GLenum sfactorA, GLenum dfactorA);
+ void (*BlendFuncSeparatei)(struct gl_context *ctx, GLuint buffer,
+ GLenum sfactorRGB, GLenum dfactorRGB,
+ GLenum sfactorA, GLenum dfactorA);
/** Specify clear values for the color buffers */
void (*ClearColor)(struct gl_context *ctx, const GLfloat color[4]);
/** Specify the clear value for the depth buffer */
@@ -876,11 +881,6 @@ struct dd_function_table {
*/
void (*ValidateTnlModule)( struct gl_context *ctx, GLuint new_state );
-
-#define PRIM_OUTSIDE_BEGIN_END (GL_POLYGON+1)
-#define PRIM_INSIDE_UNKNOWN_PRIM (GL_POLYGON+2)
-#define PRIM_UNKNOWN (GL_POLYGON+3)
-
/**
* Set by the driver-supplied T&L engine.
*
@@ -1025,6 +1025,11 @@ struct dd_function_table {
struct gl_transform_feedback_object *obj);
void (*DrawTransformFeedback)(struct gl_context *ctx, GLenum mode,
struct gl_transform_feedback_object *obj);
+
+ /**
+ * \name GL_NV_texture_barrier interface
+ */
+ void (*TextureBarrier)(struct gl_context *ctx);
};
diff --git a/src/mesa/main/debug.c b/src/mesa/main/debug.c
index 79aa53585f9..78881668e49 100644
--- a/src/mesa/main/debug.c
+++ b/src/mesa/main/debug.c
@@ -37,26 +37,6 @@
#include "texobj.h"
-/**
- * Primitive names
- */
-const char *_mesa_prim_name[GL_POLYGON+4] = {
- "GL_POINTS",
- "GL_LINES",
- "GL_LINE_LOOP",
- "GL_LINE_STRIP",
- "GL_TRIANGLES",
- "GL_TRIANGLE_STRIP",
- "GL_TRIANGLE_FAN",
- "GL_QUADS",
- "GL_QUAD_STRIP",
- "GL_POLYGON",
- "outside begin/end",
- "inside unknown primitive",
- "unknown state"
-};
-
-
static const char *
tex_target_name(GLenum tgt)
{
@@ -85,13 +65,12 @@ void
_mesa_print_state( const char *msg, GLuint state )
{
_mesa_debug(NULL,
- "%s: (0x%x) %s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s\n",
+ "%s: (0x%x) %s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s\n",
msg,
state,
(state & _NEW_MODELVIEW) ? "ctx->ModelView, " : "",
(state & _NEW_PROJECTION) ? "ctx->Projection, " : "",
(state & _NEW_TEXTURE_MATRIX) ? "ctx->TextureMatrix, " : "",
- (state & _NEW_ACCUM) ? "ctx->Accum, " : "",
(state & _NEW_COLOR) ? "ctx->Color, " : "",
(state & _NEW_DEPTH) ? "ctx->Depth, " : "",
(state & _NEW_EVAL) ? "ctx->Eval/EvalMap, " : "",
@@ -234,16 +213,6 @@ void
_mesa_init_debug( struct gl_context *ctx )
{
char *c;
-
- /* Dither disable */
- ctx->NoDither = _mesa_getenv("MESA_NO_DITHER") ? GL_TRUE : GL_FALSE;
- if (ctx->NoDither) {
- if (_mesa_getenv("MESA_DEBUG")) {
- _mesa_debug(ctx, "MESA_NO_DITHER set - dithering disabled\n");
- }
- ctx->Color.DitherFlag = GL_FALSE;
- }
-
c = _mesa_getenv("MESA_DEBUG");
if (c)
add_debug_flags(c);
@@ -327,8 +296,8 @@ write_texture_image(struct gl_texture_object *texObj,
/**
* Write renderbuffer image to a ppm file.
*/
-static void
-write_renderbuffer_image(const struct gl_renderbuffer *rb)
+void
+_mesa_write_renderbuffer_image(const struct gl_renderbuffer *rb)
{
GET_CURRENT_CONTEXT(ctx);
GLubyte *buffer;
@@ -345,6 +314,10 @@ write_renderbuffer_image(const struct gl_renderbuffer *rb)
type = GL_UNSIGNED_INT_24_8;
}
else {
+ _mesa_debug(NULL,
+ "Unsupported BaseFormat 0x%x in "
+ "_mesa_write_renderbuffer_image()\n",
+ rb->_BaseFormat);
return;
}
@@ -355,8 +328,12 @@ write_renderbuffer_image(const struct gl_renderbuffer *rb)
/* make filename */
_mesa_snprintf(s, sizeof(s), "/tmp/renderbuffer%u.ppm", rb->Name);
+ _mesa_snprintf(s, sizeof(s), "C:\\renderbuffer%u.ppm", rb->Name);
printf(" Writing renderbuffer image to %s\n", s);
+
+ _mesa_debug(NULL, " Writing renderbuffer image to %s\n", s);
+
write_ppm(s, buffer, rb->Width, rb->Height, 4, 0, 1, 2, GL_TRUE);
free(buffer);
@@ -443,7 +420,7 @@ dump_renderbuffer(const struct gl_renderbuffer *rb, GLboolean writeImage)
rb->Name, rb->Width, rb->Height,
_mesa_lookup_enum_by_nr(rb->InternalFormat));
if (writeImage) {
- write_renderbuffer_image(rb);
+ _mesa_write_renderbuffer_image(rb);
}
}
diff --git a/src/mesa/main/debug.h b/src/mesa/main/debug.h
index 17aa897e8d1..4968a9f1979 100644
--- a/src/mesa/main/debug.h
+++ b/src/mesa/main/debug.h
@@ -64,6 +64,9 @@ extern void _mesa_init_debug( struct gl_context *ctx );
#endif
extern void
+_mesa_write_renderbuffer_image(const struct gl_renderbuffer *rb);
+
+extern void
_mesa_dump_texture(GLuint texture, GLuint writeImages);
extern void
diff --git a/src/mesa/main/depth.c b/src/mesa/main/depth.c
index c5a910e144a..52c69a6bcd9 100644
--- a/src/mesa/main/depth.c
+++ b/src/mesa/main/depth.c
@@ -44,6 +44,9 @@ _mesa_ClearDepth( GLclampd depth )
GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_BEGIN_END(ctx);
+ if (MESA_VERBOSE & VERBOSE_API)
+ _mesa_debug(ctx, "glClearDepth(%f)\n", depth);
+
depth = CLAMP( depth, 0.0, 1.0 );
if (ctx->Depth.Clear == depth)
@@ -56,6 +59,12 @@ _mesa_ClearDepth( GLclampd depth )
}
+void GLAPIENTRY
+_mesa_ClearDepthf( GLclampf depth )
+{
+ _mesa_ClearDepth(depth);
+}
+
void GLAPIENTRY
_mesa_DepthFunc( GLenum func )
@@ -127,6 +136,9 @@ _mesa_DepthBoundsEXT( GLclampd zmin, GLclampd zmax )
GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_BEGIN_END(ctx);
+ if (MESA_VERBOSE & VERBOSE_API)
+ _mesa_debug(ctx, "glDepthBounds(%f, %f)\n", zmin, zmax);
+
if (zmin > zmax) {
_mesa_error(ctx, GL_INVALID_VALUE, "glDepthBoundsEXT(zmin > zmax)");
return;
diff --git a/src/mesa/main/depth.h b/src/mesa/main/depth.h
index b498a471534..2f428629f9a 100644
--- a/src/mesa/main/depth.h
+++ b/src/mesa/main/depth.h
@@ -44,6 +44,9 @@ extern void GLAPIENTRY
_mesa_ClearDepth( GLclampd depth );
extern void GLAPIENTRY
+_mesa_ClearDepthf( GLclampf depth );
+
+extern void GLAPIENTRY
_mesa_DepthFunc( GLenum func );
extern void GLAPIENTRY
diff --git a/src/mesa/main/dlist.c b/src/mesa/main/dlist.c
index 6c0c556ad8d..0112d9dde36 100644
--- a/src/mesa/main/dlist.c
+++ b/src/mesa/main/dlist.c
@@ -54,6 +54,7 @@
#include "light.h"
#include "macros.h"
#include "pack.h"
+#include "pbo.h"
#include "queryobj.h"
#include "teximage.h"
#include "mtypes.h"
@@ -188,6 +189,12 @@ typedef enum
OPCODE_BLEND_EQUATION,
OPCODE_BLEND_EQUATION_SEPARATE,
OPCODE_BLEND_FUNC_SEPARATE,
+
+ OPCODE_BLEND_EQUATION_I,
+ OPCODE_BLEND_EQUATION_SEPARATE_I,
+ OPCODE_BLEND_FUNC_I,
+ OPCODE_BLEND_FUNC_SEPARATE_I,
+
OPCODE_CALL_LIST,
OPCODE_CALL_LIST_OFFSET,
OPCODE_CLEAR,
@@ -421,6 +428,12 @@ typedef enum
OPCODE_ACTIVE_PROGRAM_EXT,
OPCODE_USE_SHADER_PROGRAM_EXT,
+ /* GL_ARB_instanced_arrays */
+ OPCODE_VERTEX_ATTRIB_DIVISOR,
+
+ /* GL_NV_texture_barrier */
+ OPCODE_TEXTURE_BARRIER_NV,
+
/* The following three are meta instructions */
OPCODE_ERROR, /* raise compiled-in error */
OPCODE_CONTINUE,
@@ -1143,6 +1156,82 @@ save_BlendColor(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha)
}
}
+/* GL_ARB_draw_buffers_blend */
+static void GLAPIENTRY
+save_BlendFuncSeparatei(GLuint buf, GLenum sfactorRGB, GLenum dfactorRGB,
+ GLenum sfactorA, GLenum dfactorA)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ Node *n;
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = alloc_instruction(ctx, OPCODE_BLEND_FUNC_SEPARATE_I, 5);
+ if (n) {
+ n[1].ui = buf;
+ n[2].e = sfactorRGB;
+ n[3].e = dfactorRGB;
+ n[4].e = sfactorA;
+ n[5].e = dfactorA;
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_BlendFuncSeparateiARB(ctx->Exec, (buf, sfactorRGB, dfactorRGB,
+ sfactorA, dfactorA));
+ }
+}
+
+/* GL_ARB_draw_buffers_blend */
+static void GLAPIENTRY
+save_BlendFunci(GLuint buf, GLenum sfactor, GLenum dfactor)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ Node *n;
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = alloc_instruction(ctx, OPCODE_BLEND_FUNC_SEPARATE_I, 3);
+ if (n) {
+ n[1].ui = buf;
+ n[2].e = sfactor;
+ n[3].e = dfactor;
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_BlendFunciARB(ctx->Exec, (buf, sfactor, dfactor));
+ }
+}
+
+/* GL_ARB_draw_buffers_blend */
+static void GLAPIENTRY
+save_BlendEquationi(GLuint buf, GLenum mode)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ Node *n;
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = alloc_instruction(ctx, OPCODE_BLEND_EQUATION_I, 2);
+ if (n) {
+ n[1].ui = buf;
+ n[2].e = mode;
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_BlendEquationiARB(ctx->Exec, (buf, mode));
+ }
+}
+
+/* GL_ARB_draw_buffers_blend */
+static void GLAPIENTRY
+save_BlendEquationSeparatei(GLuint buf, GLenum modeRGB, GLenum modeA)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ Node *n;
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = alloc_instruction(ctx, OPCODE_BLEND_EQUATION_SEPARATE_I, 3);
+ if (n) {
+ n[1].ui = buf;
+ n[2].e = modeRGB;
+ n[3].e = modeA;
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_BlendEquationSeparateiARB(ctx->Exec, (buf, modeRGB, modeA));
+ }
+}
+
+
static void invalidate_saved_current_state( struct gl_context *ctx )
{
GLint i;
@@ -6927,8 +7016,36 @@ exec_GetTexParameterIuiv(GLenum target, GLenum pname, GLuint *params)
}
+/* GL_ARB_instanced_arrays */
+static void
+save_VertexAttribDivisor(GLuint index, GLuint divisor)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ Node *n;
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = alloc_instruction(ctx, OPCODE_VERTEX_ATTRIB_DIVISOR, 2);
+ if (n) {
+ n[1].ui = index;
+ n[2].ui = divisor;
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_VertexAttribDivisorARB(ctx->Exec, (index, divisor));
+ }
+}
+/* GL_NV_texture_barrier */
+static void
+save_TextureBarrierNV()
+{
+ GET_CURRENT_CONTEXT(ctx);
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ alloc_instruction(ctx, OPCODE_TEXTURE_BARRIER_NV, 0);
+ if (ctx->ExecuteFlag) {
+ CALL_TextureBarrierNV(ctx->Exec, ());
+ }
+}
+
/**
* Save an error-generating command into display list.
@@ -7058,6 +7175,26 @@ execute_list(struct gl_context *ctx, GLuint list)
CALL_BlendFuncSeparateEXT(ctx->Exec,
(n[1].e, n[2].e, n[3].e, n[4].e));
break;
+
+ case OPCODE_BLEND_FUNC_I:
+ /* GL_ARB_draw_buffers_blend */
+ CALL_BlendFunciARB(ctx->Exec, (n[1].ui, n[2].e, n[3].e));
+ break;
+ case OPCODE_BLEND_FUNC_SEPARATE_I:
+ /* GL_ARB_draw_buffers_blend */
+ CALL_BlendFuncSeparateiARB(ctx->Exec, (n[1].ui, n[2].e, n[3].e,
+ n[4].e, n[5].e));
+ break;
+ case OPCODE_BLEND_EQUATION_I:
+ /* GL_ARB_draw_buffers_blend */
+ CALL_BlendEquationiARB(ctx->Exec, (n[1].ui, n[2].e));
+ break;
+ case OPCODE_BLEND_EQUATION_SEPARATE_I:
+ /* GL_ARB_draw_buffers_blend */
+ CALL_BlendEquationSeparateiARB(ctx->Exec,
+ (n[1].ui, n[2].e, n[3].e));
+ break;
+
case OPCODE_CALL_LIST:
/* Generated by glCallList(), don't add ListBase */
if (ctx->ListState.CallDepth < MAX_LIST_NESTING) {
@@ -8080,6 +8217,15 @@ execute_list(struct gl_context *ctx, GLuint list)
}
break;
+ case OPCODE_VERTEX_ATTRIB_DIVISOR:
+ /* GL_ARB_instanced_arrays */
+ CALL_VertexAttribDivisorARB(ctx->Exec, (n[1].ui, n[2].ui));
+ break;
+
+ case OPCODE_TEXTURE_BARRIER_NV:
+ CALL_TextureBarrierNV(ctx->Exec, ());
+ break;
+
case OPCODE_CONTINUE:
n = (Node *) n[1].next;
break;
@@ -8293,8 +8439,6 @@ _mesa_CallList(GLuint list)
GLboolean save_compile_flag;
GET_CURRENT_CONTEXT(ctx);
FLUSH_CURRENT(ctx, 0);
- /* VERY IMPORTANT: Save the CompileFlag status, turn it off, */
- /* execute the display list, and restore the CompileFlag. */
if (MESA_VERBOSE & VERBOSE_API)
_mesa_debug(ctx, "glCallList %d\n", list);
@@ -8304,8 +8448,12 @@ _mesa_CallList(GLuint list)
return;
}
-/* mesa_print_display_list( list ); */
+ if (0)
+ mesa_print_display_list( list );
+ /* VERY IMPORTANT: Save the CompileFlag status, turn it off,
+ * execute the display list, and restore the CompileFlag.
+ */
save_compile_flag = ctx->CompileFlag;
if (save_compile_flag) {
ctx->CompileFlag = GL_FALSE;
@@ -9749,6 +9897,18 @@ _mesa_create_save_table(void)
(void) save_Uniform4uiv;
#endif
+ /* GL_ARB_instanced_arrays */
+ SET_VertexAttribDivisorARB(table, save_VertexAttribDivisor);
+
+ /* GL_NV_texture_barrier */
+ SET_TextureBarrierNV(table, save_TextureBarrierNV);
+
+ /* GL_ARB_draw_buffer_blend */
+ SET_BlendFunciARB(table, save_BlendFunci);
+ SET_BlendFuncSeparateiARB(table, save_BlendFuncSeparatei);
+ SET_BlendEquationiARB(table, save_BlendEquationi);
+ SET_BlendEquationSeparateiARB(table, save_BlendEquationSeparatei);
+
return table;
}
diff --git a/src/mesa/main/dlist.h b/src/mesa/main/dlist.h
index 24241a4bd4f..160ed62f557 100644
--- a/src/mesa/main/dlist.h
+++ b/src/mesa/main/dlist.h
@@ -33,6 +33,7 @@
#define DLIST_H
+#include "main/mfeatures.h"
#include "main/mtypes.h"
diff --git a/src/mesa/main/drawpix.c b/src/mesa/main/drawpix.c
index 757aae6e703..fb86036a188 100644
--- a/src/mesa/main/drawpix.c
+++ b/src/mesa/main/drawpix.c
@@ -30,6 +30,8 @@
#include "enums.h"
#include "feedback.h"
#include "framebuffer.h"
+#include "mfeatures.h"
+#include "pbo.h"
#include "readpix.h"
#include "state.h"
#include "dispatch.h"
@@ -48,6 +50,17 @@ _mesa_DrawPixels( GLsizei width, GLsizei height,
GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
+ if (MESA_VERBOSE & VERBOSE_API)
+ _mesa_debug(ctx, "glDrawPixels(%d, %d, %s, %s, %p) // to %s at %d, %d\n",
+ width, height,
+ _mesa_lookup_enum_by_nr(format),
+ _mesa_lookup_enum_by_nr(type),
+ pixels,
+ _mesa_lookup_enum_by_nr(ctx->DrawBuffer->ColorDrawBuffer[0]),
+ IROUND(ctx->Current.RasterPos[0]),
+ IROUND(ctx->Current.RasterPos[1]));
+
+
if (width < 0 || height < 0) {
_mesa_error( ctx, GL_INVALID_VALUE, "glDrawPixels(width or height < 0" );
return;
@@ -123,6 +136,16 @@ _mesa_CopyPixels( GLint srcx, GLint srcy, GLsizei width, GLsizei height,
GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
+ if (MESA_VERBOSE & VERBOSE_API)
+ _mesa_debug(ctx,
+ "glCopyPixels(%d, %d, %d, %d, %s) // from %s to %s at %d, %d\n",
+ srcx, srcy, width, height,
+ _mesa_lookup_enum_by_nr(type),
+ _mesa_lookup_enum_by_nr(ctx->ReadBuffer->ColorReadBuffer),
+ _mesa_lookup_enum_by_nr(ctx->DrawBuffer->ColorDrawBuffer[0]),
+ IROUND(ctx->Current.RasterPos[0]),
+ IROUND(ctx->Current.RasterPos[1]));
+
if (width < 0 || height < 0) {
_mesa_error(ctx, GL_INVALID_VALUE, "glCopyPixels(width or height < 0)");
return;
diff --git a/src/mesa/main/drawtex.c b/src/mesa/main/drawtex.c
index b9afc9974e0..83485a928d8 100644
--- a/src/mesa/main/drawtex.c
+++ b/src/mesa/main/drawtex.c
@@ -24,6 +24,8 @@
#include "main/drawtex.h"
#include "main/state.h"
#include "main/imports.h"
+#include "main/mfeatures.h"
+#include "main/mtypes.h"
#if FEATURE_OES_draw_texture
@@ -43,11 +45,15 @@ draw_texture(struct gl_context *ctx, GLfloat x, GLfloat y, GLfloat z,
return;
}
+ _mesa_set_vp_override(ctx, GL_TRUE);
+
if (ctx->NewState)
_mesa_update_state(ctx);
ASSERT(ctx->Driver.DrawTex);
ctx->Driver.DrawTex(ctx, x, y, z, width, height);
+
+ _mesa_set_vp_override(ctx, GL_FALSE);
}
diff --git a/src/mesa/main/enable.c b/src/mesa/main/enable.c
index a038a95c55a..f247092410b 100644
--- a/src/mesa/main/enable.c
+++ b/src/mesa/main/enable.c
@@ -33,6 +33,7 @@
#include "enable.h"
#include "light.h"
#include "simple_list.h"
+#include "mfeatures.h"
#include "mtypes.h"
#include "enums.h"
#include "api_arrayelt.h"
@@ -351,9 +352,6 @@ _mesa_set_enable(struct gl_context *ctx, GLenum cap, GLboolean state)
ctx->Depth.Test = state;
break;
case GL_DITHER:
- if (ctx->NoDither) {
- state = GL_FALSE; /* MESA_NO_DITHER env var */
- }
if (ctx->Color.DitherFlag == state)
return;
FLUSH_VERTICES(ctx, _NEW_COLOR);
@@ -705,15 +703,6 @@ _mesa_set_enable(struct gl_context *ctx, GLenum cap, GLboolean state)
client_state( ctx, cap, state );
return;
- /* GL_SGI_texture_color_table */
- case GL_TEXTURE_COLOR_TABLE_SGI:
- CHECK_EXTENSION(SGI_texture_color_table, cap);
- if (ctx->Texture.Unit[ctx->Texture.CurrentUnit].ColorTableEnabled == state)
- return;
- FLUSH_VERTICES(ctx, _NEW_TEXTURE);
- ctx->Texture.Unit[ctx->Texture.CurrentUnit].ColorTableEnabled = state;
- break;
-
/* GL_ARB_texture_cube_map */
case GL_TEXTURE_CUBE_MAP_ARB:
CHECK_EXTENSION(ARB_texture_cube_map, cap);
@@ -967,6 +956,13 @@ _mesa_set_enable(struct gl_context *ctx, GLenum cap, GLboolean state)
}
break;
+ /* GL3.0 - GL_framebuffer_sRGB */
+ case GL_FRAMEBUFFER_SRGB_EXT:
+ CHECK_EXTENSION(EXT_framebuffer_sRGB, cap);
+ FLUSH_VERTICES(ctx, _NEW_BUFFERS);
+ ctx->Color.sRGBEnabled = state;
+ break;
+
default:
goto invalid_enum_error;
}
@@ -1303,11 +1299,6 @@ _mesa_IsEnabled( GLenum cap )
return (ctx->Array.ArrayObj->PointSize.Enabled != 0);
#endif
- /* GL_SGI_texture_color_table */
- case GL_TEXTURE_COLOR_TABLE_SGI:
- CHECK_EXTENSION(SGI_texture_color_table);
- return ctx->Texture.Unit[ctx->Texture.CurrentUnit].ColorTableEnabled;
-
/* GL_ARB_texture_cube_map */
case GL_TEXTURE_CUBE_MAP_ARB:
CHECK_EXTENSION(ARB_texture_cube_map);
@@ -1479,6 +1470,11 @@ _mesa_IsEnabled( GLenum cap )
}
return ctx->Array.PrimitiveRestart;
+ /* GL3.0 - GL_framebuffer_sRGB */
+ case GL_FRAMEBUFFER_SRGB_EXT:
+ CHECK_EXTENSION(EXT_framebuffer_sRGB);
+ return ctx->Color.sRGBEnabled;
+
default:
goto invalid_enum_error;
}
diff --git a/src/mesa/main/enums.c b/src/mesa/main/enums.c
index 0ce62c0e3c7..e9d6b6b156c 100644
--- a/src/mesa/main/enums.c
+++ b/src/mesa/main/enums.c
@@ -29,6 +29,7 @@
#include "main/mfeatures.h"
#include "main/enums.h"
#include "main/imports.h"
+#include "main/mtypes.h"
typedef struct {
size_t offset;
@@ -2275,6 +2276,7 @@ LONGSTRING static const char enum_string_table[] =
"GL_VERTEX_ATTRIB_ARRAY9_NV\0"
"GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING\0"
"GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB\0"
+ "GL_VERTEX_ATTRIB_ARRAY_DIVISOR_ARB\0"
"GL_VERTEX_ATTRIB_ARRAY_ENABLED\0"
"GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB\0"
"GL_VERTEX_ATTRIB_ARRAY_INTEGER\0"
@@ -2332,7 +2334,7 @@ LONGSTRING static const char enum_string_table[] =
"GL_ZOOM_Y\0"
;
-static const enum_elt all_enums[2294] =
+static const enum_elt all_enums[2295] =
{
{ 0, 0x00000600 }, /* GL_2D */
{ 6, 0x00001407 }, /* GL_2_BYTES */
@@ -4573,64 +4575,65 @@ static const enum_elt all_enums[2294] =
{ 49885, 0x00008659 }, /* GL_VERTEX_ATTRIB_ARRAY9_NV */
{ 49912, 0x0000889F }, /* GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING */
{ 49950, 0x0000889F }, /* GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB */
- { 49992, 0x00008622 }, /* GL_VERTEX_ATTRIB_ARRAY_ENABLED */
- { 50023, 0x00008622 }, /* GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB */
- { 50058, 0x000088FD }, /* GL_VERTEX_ATTRIB_ARRAY_INTEGER */
- { 50089, 0x000088FD }, /* GL_VERTEX_ATTRIB_ARRAY_INTEGER_EXT */
- { 50124, 0x0000886A }, /* GL_VERTEX_ATTRIB_ARRAY_NORMALIZED */
- { 50158, 0x0000886A }, /* GL_VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB */
- { 50196, 0x00008645 }, /* GL_VERTEX_ATTRIB_ARRAY_POINTER */
- { 50227, 0x00008645 }, /* GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB */
- { 50262, 0x00008623 }, /* GL_VERTEX_ATTRIB_ARRAY_SIZE */
- { 50290, 0x00008623 }, /* GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB */
- { 50322, 0x00008624 }, /* GL_VERTEX_ATTRIB_ARRAY_STRIDE */
- { 50352, 0x00008624 }, /* GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB */
- { 50386, 0x00008625 }, /* GL_VERTEX_ATTRIB_ARRAY_TYPE */
- { 50414, 0x00008625 }, /* GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB */
- { 50446, 0x000086A7 }, /* GL_VERTEX_BLEND_ARB */
- { 50466, 0x00008620 }, /* GL_VERTEX_PROGRAM_ARB */
- { 50488, 0x0000864A }, /* GL_VERTEX_PROGRAM_BINDING_NV */
- { 50517, 0x00008620 }, /* GL_VERTEX_PROGRAM_NV */
- { 50538, 0x00008642 }, /* GL_VERTEX_PROGRAM_POINT_SIZE */
- { 50567, 0x00008642 }, /* GL_VERTEX_PROGRAM_POINT_SIZE_ARB */
- { 50600, 0x00008642 }, /* GL_VERTEX_PROGRAM_POINT_SIZE_NV */
- { 50632, 0x00008643 }, /* GL_VERTEX_PROGRAM_TWO_SIDE */
- { 50659, 0x00008643 }, /* GL_VERTEX_PROGRAM_TWO_SIDE_ARB */
- { 50690, 0x00008643 }, /* GL_VERTEX_PROGRAM_TWO_SIDE_NV */
- { 50720, 0x00008B31 }, /* GL_VERTEX_SHADER */
- { 50737, 0x00008B31 }, /* GL_VERTEX_SHADER_ARB */
- { 50758, 0x00008621 }, /* GL_VERTEX_STATE_PROGRAM_NV */
- { 50785, 0x00000BA2 }, /* GL_VIEWPORT */
- { 50797, 0x00000800 }, /* GL_VIEWPORT_BIT */
- { 50813, 0x00008A1A }, /* GL_VOLATILE_APPLE */
- { 50831, 0x0000911D }, /* GL_WAIT_FAILED */
- { 50846, 0x000086AD }, /* GL_WEIGHT_ARRAY_ARB */
- { 50866, 0x0000889E }, /* GL_WEIGHT_ARRAY_BUFFER_BINDING */
- { 50897, 0x0000889E }, /* GL_WEIGHT_ARRAY_BUFFER_BINDING_ARB */
- { 50932, 0x0000889E }, /* GL_WEIGHT_ARRAY_BUFFER_BINDING_OES */
- { 50967, 0x000086AD }, /* GL_WEIGHT_ARRAY_OES */
- { 50987, 0x000086AC }, /* GL_WEIGHT_ARRAY_POINTER_ARB */
- { 51015, 0x000086AC }, /* GL_WEIGHT_ARRAY_POINTER_OES */
- { 51043, 0x000086AB }, /* GL_WEIGHT_ARRAY_SIZE_ARB */
- { 51068, 0x000086AB }, /* GL_WEIGHT_ARRAY_SIZE_OES */
- { 51093, 0x000086AA }, /* GL_WEIGHT_ARRAY_STRIDE_ARB */
- { 51120, 0x000086AA }, /* GL_WEIGHT_ARRAY_STRIDE_OES */
- { 51147, 0x000086A9 }, /* GL_WEIGHT_ARRAY_TYPE_ARB */
- { 51172, 0x000086A9 }, /* GL_WEIGHT_ARRAY_TYPE_OES */
- { 51197, 0x000086A6 }, /* GL_WEIGHT_SUM_UNITY_ARB */
- { 51221, 0x000081D4 }, /* GL_WRAP_BORDER_SUN */
- { 51240, 0x000088B9 }, /* GL_WRITE_ONLY */
- { 51254, 0x000088B9 }, /* GL_WRITE_ONLY_ARB */
- { 51272, 0x000088B9 }, /* GL_WRITE_ONLY_OES */
- { 51290, 0x00001506 }, /* GL_XOR */
- { 51297, 0x000085B9 }, /* GL_YCBCR_422_APPLE */
- { 51316, 0x00008757 }, /* GL_YCBCR_MESA */
- { 51330, 0x00000000 }, /* GL_ZERO */
- { 51338, 0x00000D16 }, /* GL_ZOOM_X */
- { 51348, 0x00000D17 }, /* GL_ZOOM_Y */
+ { 49992, 0x000088FE }, /* GL_VERTEX_ATTRIB_ARRAY_DIVISOR_ARB */
+ { 50027, 0x00008622 }, /* GL_VERTEX_ATTRIB_ARRAY_ENABLED */
+ { 50058, 0x00008622 }, /* GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB */
+ { 50093, 0x000088FD }, /* GL_VERTEX_ATTRIB_ARRAY_INTEGER */
+ { 50124, 0x000088FD }, /* GL_VERTEX_ATTRIB_ARRAY_INTEGER_EXT */
+ { 50159, 0x0000886A }, /* GL_VERTEX_ATTRIB_ARRAY_NORMALIZED */
+ { 50193, 0x0000886A }, /* GL_VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB */
+ { 50231, 0x00008645 }, /* GL_VERTEX_ATTRIB_ARRAY_POINTER */
+ { 50262, 0x00008645 }, /* GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB */
+ { 50297, 0x00008623 }, /* GL_VERTEX_ATTRIB_ARRAY_SIZE */
+ { 50325, 0x00008623 }, /* GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB */
+ { 50357, 0x00008624 }, /* GL_VERTEX_ATTRIB_ARRAY_STRIDE */
+ { 50387, 0x00008624 }, /* GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB */
+ { 50421, 0x00008625 }, /* GL_VERTEX_ATTRIB_ARRAY_TYPE */
+ { 50449, 0x00008625 }, /* GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB */
+ { 50481, 0x000086A7 }, /* GL_VERTEX_BLEND_ARB */
+ { 50501, 0x00008620 }, /* GL_VERTEX_PROGRAM_ARB */
+ { 50523, 0x0000864A }, /* GL_VERTEX_PROGRAM_BINDING_NV */
+ { 50552, 0x00008620 }, /* GL_VERTEX_PROGRAM_NV */
+ { 50573, 0x00008642 }, /* GL_VERTEX_PROGRAM_POINT_SIZE */
+ { 50602, 0x00008642 }, /* GL_VERTEX_PROGRAM_POINT_SIZE_ARB */
+ { 50635, 0x00008642 }, /* GL_VERTEX_PROGRAM_POINT_SIZE_NV */
+ { 50667, 0x00008643 }, /* GL_VERTEX_PROGRAM_TWO_SIDE */
+ { 50694, 0x00008643 }, /* GL_VERTEX_PROGRAM_TWO_SIDE_ARB */
+ { 50725, 0x00008643 }, /* GL_VERTEX_PROGRAM_TWO_SIDE_NV */
+ { 50755, 0x00008B31 }, /* GL_VERTEX_SHADER */
+ { 50772, 0x00008B31 }, /* GL_VERTEX_SHADER_ARB */
+ { 50793, 0x00008621 }, /* GL_VERTEX_STATE_PROGRAM_NV */
+ { 50820, 0x00000BA2 }, /* GL_VIEWPORT */
+ { 50832, 0x00000800 }, /* GL_VIEWPORT_BIT */
+ { 50848, 0x00008A1A }, /* GL_VOLATILE_APPLE */
+ { 50866, 0x0000911D }, /* GL_WAIT_FAILED */
+ { 50881, 0x000086AD }, /* GL_WEIGHT_ARRAY_ARB */
+ { 50901, 0x0000889E }, /* GL_WEIGHT_ARRAY_BUFFER_BINDING */
+ { 50932, 0x0000889E }, /* GL_WEIGHT_ARRAY_BUFFER_BINDING_ARB */
+ { 50967, 0x0000889E }, /* GL_WEIGHT_ARRAY_BUFFER_BINDING_OES */
+ { 51002, 0x000086AD }, /* GL_WEIGHT_ARRAY_OES */
+ { 51022, 0x000086AC }, /* GL_WEIGHT_ARRAY_POINTER_ARB */
+ { 51050, 0x000086AC }, /* GL_WEIGHT_ARRAY_POINTER_OES */
+ { 51078, 0x000086AB }, /* GL_WEIGHT_ARRAY_SIZE_ARB */
+ { 51103, 0x000086AB }, /* GL_WEIGHT_ARRAY_SIZE_OES */
+ { 51128, 0x000086AA }, /* GL_WEIGHT_ARRAY_STRIDE_ARB */
+ { 51155, 0x000086AA }, /* GL_WEIGHT_ARRAY_STRIDE_OES */
+ { 51182, 0x000086A9 }, /* GL_WEIGHT_ARRAY_TYPE_ARB */
+ { 51207, 0x000086A9 }, /* GL_WEIGHT_ARRAY_TYPE_OES */
+ { 51232, 0x000086A6 }, /* GL_WEIGHT_SUM_UNITY_ARB */
+ { 51256, 0x000081D4 }, /* GL_WRAP_BORDER_SUN */
+ { 51275, 0x000088B9 }, /* GL_WRITE_ONLY */
+ { 51289, 0x000088B9 }, /* GL_WRITE_ONLY_ARB */
+ { 51307, 0x000088B9 }, /* GL_WRITE_ONLY_OES */
+ { 51325, 0x00001506 }, /* GL_XOR */
+ { 51332, 0x000085B9 }, /* GL_YCBCR_422_APPLE */
+ { 51351, 0x00008757 }, /* GL_YCBCR_MESA */
+ { 51365, 0x00000000 }, /* GL_ZERO */
+ { 51373, 0x00000D16 }, /* GL_ZOOM_X */
+ { 51383, 0x00000D17 }, /* GL_ZOOM_Y */
};
-static const unsigned reduced_enums[1551] =
+static const unsigned reduced_enums[1552] =
{
535, /* GL_FALSE */
827, /* GL_LINES */
@@ -4776,7 +4779,7 @@ static const unsigned reduced_enums[1551] =
1856, /* GL_STENCIL_WRITEMASK */
1006, /* GL_MATRIX_MODE */
1222, /* GL_NORMALIZE */
- 2266, /* GL_VIEWPORT */
+ 2267, /* GL_VIEWPORT */
1195, /* GL_MODELVIEW_STACK_DEPTH */
1481, /* GL_PROJECTION_STACK_DEPTH */
2089, /* GL_TEXTURE_STACK_DEPTH */
@@ -4856,8 +4859,8 @@ static const unsigned reduced_enums[1551] =
741, /* GL_INDEX_OFFSET */
1550, /* GL_RED_SCALE */
1546, /* GL_RED_BIAS */
- 2292, /* GL_ZOOM_X */
- 2293, /* GL_ZOOM_Y */
+ 2293, /* GL_ZOOM_X */
+ 2294, /* GL_ZOOM_Y */
697, /* GL_GREEN_SCALE */
693, /* GL_GREEN_BIAS */
115, /* GL_BLUE_SCALE */
@@ -4960,7 +4963,7 @@ static const unsigned reduced_enums[1551] =
347, /* GL_COPY */
59, /* GL_AND_INVERTED */
1220, /* GL_NOOP */
- 2288, /* GL_XOR */
+ 2289, /* GL_XOR */
1287, /* GL_OR */
1221, /* GL_NOR */
526, /* GL_EQUIV */
@@ -5301,7 +5304,7 @@ static const unsigned reduced_enums[1551] =
354, /* GL_CULL_VERTEX_EXT */
356, /* GL_CULL_VERTEX_OBJECT_POSITION_EXT */
355, /* GL_CULL_VERTEX_EYE_POSITION_EXT */
- 2284, /* GL_WRAP_BORDER_SUN */
+ 2285, /* GL_WRAP_BORDER_SUN */
1991, /* GL_TEXTURE_COLOR_WRITEMASK_SGIS */
816, /* GL_LIGHT_MODEL_COLOR_CONTROL */
1758, /* GL_SINGLE_COLOR */
@@ -5481,7 +5484,7 @@ static const unsigned reduced_enums[1551] =
2213, /* GL_VERTEX_ARRAY_BINDING */
2080, /* GL_TEXTURE_RANGE_LENGTH_APPLE */
2081, /* GL_TEXTURE_RANGE_POINTER_APPLE */
- 2289, /* GL_YCBCR_422_APPLE */
+ 2290, /* GL_YCBCR_422_APPLE */
2202, /* GL_UNSIGNED_SHORT_8_8_APPLE */
2204, /* GL_UNSIGNED_SHORT_8_8_REV_APPLE */
2092, /* GL_TEXTURE_STORAGE_HINT_APPLE */
@@ -5491,12 +5494,12 @@ static const unsigned reduced_enums[1551] =
1760, /* GL_SLICE_ACCUM_SUN */
1510, /* GL_QUAD_MESH_SUN */
2139, /* GL_TRIANGLE_MESH_SUN */
- 2254, /* GL_VERTEX_PROGRAM_ARB */
- 2265, /* GL_VERTEX_STATE_PROGRAM_NV */
- 2239, /* GL_VERTEX_ATTRIB_ARRAY_ENABLED */
- 2247, /* GL_VERTEX_ATTRIB_ARRAY_SIZE */
- 2249, /* GL_VERTEX_ATTRIB_ARRAY_STRIDE */
- 2251, /* GL_VERTEX_ATTRIB_ARRAY_TYPE */
+ 2255, /* GL_VERTEX_PROGRAM_ARB */
+ 2266, /* GL_VERTEX_STATE_PROGRAM_NV */
+ 2240, /* GL_VERTEX_ATTRIB_ARRAY_ENABLED */
+ 2248, /* GL_VERTEX_ATTRIB_ARRAY_SIZE */
+ 2250, /* GL_VERTEX_ATTRIB_ARRAY_STRIDE */
+ 2252, /* GL_VERTEX_ATTRIB_ARRAY_TYPE */
383, /* GL_CURRENT_VERTEX_ATTRIB */
1455, /* GL_PROGRAM_LENGTH_ARB */
1471, /* GL_PROGRAM_STRING_ARB */
@@ -5518,14 +5521,14 @@ static const unsigned reduced_enums[1551] =
366, /* GL_CURRENT_MATRIX_STACK_DEPTH_ARB */
363, /* GL_CURRENT_MATRIX_ARB */
1468, /* GL_PROGRAM_POINT_SIZE */
- 2260, /* GL_VERTEX_PROGRAM_TWO_SIDE */
+ 2261, /* GL_VERTEX_PROGRAM_TWO_SIDE */
1467, /* GL_PROGRAM_PARAMETER_NV */
- 2245, /* GL_VERTEX_ATTRIB_ARRAY_POINTER */
+ 2246, /* GL_VERTEX_ATTRIB_ARRAY_POINTER */
1473, /* GL_PROGRAM_TARGET_NV */
1470, /* GL_PROGRAM_RESIDENT_NV */
2102, /* GL_TRACK_MATRIX_NV */
2103, /* GL_TRACK_MATRIX_TRANSFORM_NV */
- 2255, /* GL_VERTEX_PROGRAM_BINDING_NV */
+ 2256, /* GL_VERTEX_PROGRAM_BINDING_NV */
1449, /* GL_PROGRAM_ERROR_POSITION_ARB */
408, /* GL_DEPTH_CLAMP */
2221, /* GL_VERTEX_ATTRIB_ARRAY0_NV */
@@ -5582,14 +5585,14 @@ static const unsigned reduced_enums[1551] =
311, /* GL_COMPRESSED_TEXTURE_FORMATS */
1134, /* GL_MAX_VERTEX_UNITS_ARB */
23, /* GL_ACTIVE_VERTEX_UNITS_ARB */
- 2283, /* GL_WEIGHT_SUM_UNITY_ARB */
- 2253, /* GL_VERTEX_BLEND_ARB */
+ 2284, /* GL_WEIGHT_SUM_UNITY_ARB */
+ 2254, /* GL_VERTEX_BLEND_ARB */
385, /* GL_CURRENT_WEIGHT_ARB */
- 2281, /* GL_WEIGHT_ARRAY_TYPE_ARB */
- 2279, /* GL_WEIGHT_ARRAY_STRIDE_ARB */
- 2277, /* GL_WEIGHT_ARRAY_SIZE_ARB */
- 2275, /* GL_WEIGHT_ARRAY_POINTER_ARB */
- 2270, /* GL_WEIGHT_ARRAY_ARB */
+ 2282, /* GL_WEIGHT_ARRAY_TYPE_ARB */
+ 2280, /* GL_WEIGHT_ARRAY_STRIDE_ARB */
+ 2278, /* GL_WEIGHT_ARRAY_SIZE_ARB */
+ 2276, /* GL_WEIGHT_ARRAY_POINTER_ARB */
+ 2271, /* GL_WEIGHT_ARRAY_ARB */
442, /* GL_DOT3_RGB */
443, /* GL_DOT3_RGBA */
305, /* GL_COMPRESSED_RGB_FXT1_3DFX */
@@ -5634,7 +5637,7 @@ static const unsigned reduced_enums[1551] =
1197, /* GL_MODULATE_ADD_ATI */
1198, /* GL_MODULATE_SIGNED_ADD_ATI */
1199, /* GL_MODULATE_SUBTRACT_ATI */
- 2290, /* GL_YCBCR_MESA */
+ 2291, /* GL_YCBCR_MESA */
1294, /* GL_PACK_INVERT_MESA */
388, /* GL_DEBUG_OBJECT_MESA */
389, /* GL_DEBUG_PRINT_MESA */
@@ -5713,7 +5716,7 @@ static const unsigned reduced_enums[1551] =
1520, /* GL_QUERY_RESULT */
1522, /* GL_QUERY_RESULT_AVAILABLE */
1126, /* GL_MAX_VERTEX_ATTRIBS */
- 2243, /* GL_VERTEX_ATTRIB_ARRAY_NORMALIZED */
+ 2244, /* GL_VERTEX_ATTRIB_ARRAY_NORMALIZED */
433, /* GL_DEPTH_STENCIL_TO_RGBA_NV */
432, /* GL_DEPTH_STENCIL_TO_BGRA_NV */
1103, /* GL_MAX_TEXTURE_COORDS */
@@ -5736,7 +5739,7 @@ static const unsigned reduced_enums[1551] =
516, /* GL_EDGE_FLAG_ARRAY_BUFFER_BINDING */
1730, /* GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING */
573, /* GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING */
- 2271, /* GL_WEIGHT_ARRAY_BUFFER_BINDING */
+ 2272, /* GL_WEIGHT_ARRAY_BUFFER_BINDING */
2237, /* GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING */
1454, /* GL_PROGRAM_INSTRUCTIONS_ARB */
1070, /* GL_MAX_PROGRAM_INSTRUCTIONS_ARB */
@@ -5763,7 +5766,7 @@ static const unsigned reduced_enums[1551] =
1477, /* GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB */
2127, /* GL_TRANSPOSE_CURRENT_MATRIX_ARB */
1539, /* GL_READ_ONLY */
- 2285, /* GL_WRITE_ONLY */
+ 2286, /* GL_WRITE_ONLY */
1541, /* GL_READ_WRITE */
124, /* GL_BUFFER_ACCESS */
129, /* GL_BUFFER_MAPPED */
@@ -5821,7 +5824,8 @@ static const unsigned reduced_enums[1551] =
1069, /* GL_MAX_PROGRAM_IF_DEPTH_NV */
1073, /* GL_MAX_PROGRAM_LOOP_DEPTH_NV */
1072, /* GL_MAX_PROGRAM_LOOP_COUNT_NV */
- 2241, /* GL_VERTEX_ATTRIB_ARRAY_INTEGER */
+ 2242, /* GL_VERTEX_ATTRIB_ARRAY_INTEGER */
+ 2239, /* GL_VERTEX_ATTRIB_ARRAY_DIVISOR_ARB */
1012, /* GL_MAX_ARRAY_TEXTURE_LAYERS */
1149, /* GL_MIN_PROGRAM_TEXEL_OFFSET */
1086, /* GL_MAX_PROGRAM_TEXEL_OFFSET */
@@ -5843,12 +5847,12 @@ static const unsigned reduced_enums[1551] =
138, /* GL_BUFFER_SERIALIZED_MODIFY_APPLE */
128, /* GL_BUFFER_FLUSHING_UNMAP_APPLE */
1556, /* GL_RELEASED_APPLE */
- 2268, /* GL_VOLATILE_APPLE */
+ 2269, /* GL_VOLATILE_APPLE */
1595, /* GL_RETAINED_APPLE */
2144, /* GL_UNDEFINED_APPLE */
1504, /* GL_PURGEABLE_APPLE */
596, /* GL_FRAGMENT_SHADER */
- 2263, /* GL_VERTEX_SHADER */
+ 2264, /* GL_VERTEX_SHADER */
1465, /* GL_PROGRAM_OBJECT_ARB */
1747, /* GL_SHADER_OBJECT_ARB */
1041, /* GL_MAX_FRAGMENT_UNIFORM_COMPONENTS */
@@ -5909,8 +5913,8 @@ static const unsigned reduced_enums[1551] =
1306, /* GL_PALETTE8_R5_G6_B5_OES */
1309, /* GL_PALETTE8_RGBA4_OES */
1307, /* GL_PALETTE8_RGB5_A1_OES */
- 726, /* GL_IMPLEMENTATION_COLOR_READ_TYPE_OES */
- 724, /* GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES */
+ 725, /* GL_IMPLEMENTATION_COLOR_READ_TYPE */
+ 723, /* GL_IMPLEMENTATION_COLOR_READ_FORMAT */
1355, /* GL_POINT_SIZE_ARRAY_OES */
2014, /* GL_TEXTURE_CROP_RECT_OES */
996, /* GL_MATRIX_INDEX_ARRAY_BUFFER_BINDING_OES */
@@ -6166,7 +6170,7 @@ static const unsigned reduced_enums[1551] =
54, /* GL_ALREADY_SIGNALED */
2100, /* GL_TIMEOUT_EXPIRED */
312, /* GL_CONDITION_SATISFIED */
- 2269, /* GL_WAIT_FAILED */
+ 2270, /* GL_WAIT_FAILED */
126, /* GL_BUFFER_ACCESS_FLAGS */
132, /* GL_BUFFER_MAP_LENGTH */
133, /* GL_BUFFER_MAP_OFFSET */
@@ -6240,29 +6244,39 @@ const char *_mesa_lookup_enum_by_nr( int nr )
}
}
+/**
+ * Primitive names
+ */
+static const char *prim_names[PRIM_UNKNOWN + 1] = {
+ "GL_POINTS",
+ "GL_LINES",
+ "GL_LINE_LOOP",
+ "GL_LINE_STRIP",
+ "GL_TRIANGLES",
+ "GL_TRIANGLE_STRIP",
+ "GL_TRIANGLE_FAN",
+ "GL_QUADS",
+ "GL_QUAD_STRIP",
+ "GL_POLYGON",
+ "outside begin/end",
+ "inside unknown primitive",
+ "unknown state"
+};
+
+
/* Get the name of an enum given that it is a primitive type. Avoids
* GL_FALSE/GL_POINTS ambiguity and others.
*/
-const char *_mesa_lookup_prim_by_nr( int nr )
+const char *
+_mesa_lookup_prim_by_nr(GLuint nr)
{
- switch (nr) {
- case GL_POINTS: return "GL_POINTS";
- case GL_LINES: return "GL_LINES";
- case GL_LINE_STRIP: return "GL_LINE_STRIP";
- case GL_LINE_LOOP: return "GL_LINE_LOOP";
- case GL_TRIANGLES: return "GL_TRIANGLES";
- case GL_TRIANGLE_STRIP: return "GL_TRIANGLE_STRIP";
- case GL_TRIANGLE_FAN: return "GL_TRIANGLE_FAN";
- case GL_QUADS: return "GL_QUADS";
- case GL_QUAD_STRIP: return "GL_QUAD_STRIP";
- case GL_POLYGON: return "GL_POLYGON";
- case GL_POLYGON+1: return "OUTSIDE_BEGIN_END";
- default: return "<invalid>";
- }
+ if (nr < Elements(prim_names))
+ return prim_names[nr];
+ else
+ return "invalid mode";
}
-
int _mesa_lookup_enum_by_name( const char *symbol )
{
enum_elt * f = NULL;
diff --git a/src/mesa/main/enums.h b/src/mesa/main/enums.h
index c03cd34da92..7733df22f91 100644
--- a/src/mesa/main/enums.h
+++ b/src/mesa/main/enums.h
@@ -45,7 +45,7 @@ extern const char *_mesa_lookup_enum_by_nr( int nr );
/* Get the name of an enum given that it is a primitive type. Avoids
* GL_FALSE/GL_POINTS ambiguity and others.
*/
-const char *_mesa_lookup_prim_by_nr( int nr );
+const char *_mesa_lookup_prim_by_nr( unsigned nr );
extern int _mesa_lookup_enum_by_name( const char *symbol );
diff --git a/src/mesa/main/eval.c b/src/mesa/main/eval.c
index c607e6a26af..9ab55072f00 100644
--- a/src/mesa/main/eval.c
+++ b/src/mesa/main/eval.c
@@ -43,6 +43,7 @@
#include "context.h"
#include "eval.h"
#include "macros.h"
+#include "mfeatures.h"
#include "mtypes.h"
#include "main/dispatch.h"
diff --git a/src/mesa/main/eval.h b/src/mesa/main/eval.h
index bd908f00cdd..bfeeebde54d 100644
--- a/src/mesa/main/eval.h
+++ b/src/mesa/main/eval.h
@@ -37,6 +37,7 @@
#define EVAL_H
+#include "main/mfeatures.h"
#include "main/mtypes.h"
diff --git a/src/mesa/main/extensions.c b/src/mesa/main/extensions.c
index b71afdd61f3..3fec91b4654 100644
--- a/src/mesa/main/extensions.c
+++ b/src/mesa/main/extensions.c
@@ -24,206 +24,354 @@
*/
+/**
+ * \file
+ * \brief Extension handling
+ */
+
+
#include "glheader.h"
#include "imports.h"
#include "context.h"
#include "extensions.h"
+#include "mfeatures.h"
#include "mtypes.h"
+enum {
+ DISABLE = 0,
+ GL = 1 << API_OPENGL,
+ ES1 = 1 << API_OPENGLES,
+ ES2 = 1 << API_OPENGLES2,
+};
-#define F(x) offsetof(struct gl_extensions, x)
-#define ON GL_TRUE
-#define OFF GL_FALSE
+/**
+ * \brief An element of the \c extension_table.
+ */
+struct extension {
+ /** Name of extension, such as "GL_ARB_depth_clamp". */
+ const char *name;
+ /** Offset (in bytes) of the corresponding member in struct gl_extensions. */
+ size_t offset;
-/*
+ /** Set of API's in which the extension exists, as a bitset. */
+ uint8_t api_set;
+};
+
+
+/**
+ * Given a member \c x of struct gl_extensions, return offset of
+ * \c x in bytes.
+ */
+#define o(x) offsetof(struct gl_extensions, x)
+
+
+/**
+ * \brief Table of supported OpenGL extensions for all API's.
+ *
* Note: The GL_MESAX_* extensions are placeholders for future ARB extensions.
*/
-static const struct {
- GLboolean enabled;
- const char *name;
- int flag_offset;
-} default_extensions[] = {
- { OFF, "GL_ARB_blend_func_extended", F(ARB_blend_func_extended) },
- { ON, "GL_ARB_copy_buffer", F(ARB_copy_buffer) },
- { OFF, "GL_ARB_depth_buffer_float", F(ARB_depth_buffer_float) },
- { OFF, "GL_ARB_depth_clamp", F(ARB_depth_clamp) },
- { OFF, "GL_ARB_depth_texture", F(ARB_depth_texture) },
- { 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_draw_instanced", F(ARB_draw_instanced) },
- { OFF, "GL_ARB_explicit_attrib_location", F(ARB_explicit_attrib_location) },
- { 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) },
- /* TODO: reenable this when the new GLSL compiler actually supports them */
- /* { OFF, "GL_ARB_geometry_shader4", F(ARB_geometry_shader4) }, */
- { 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_instanced_arrays", F(ARB_instanced_arrays) },
- { OFF, "GL_ARB_map_buffer_range", F(ARB_map_buffer_range) },
- { ON, "GL_ARB_multisample", F(ARB_multisample) },
- { OFF, "GL_ARB_multitexture", F(ARB_multitexture) },
- { OFF, "GL_ARB_occlusion_query", F(ARB_occlusion_query) },
- { OFF, "GL_ARB_occlusion_query2", F(ARB_occlusion_query2) },
- { OFF, "GL_ARB_pixel_buffer_object", F(EXT_pixel_buffer_object) },
- { OFF, "GL_ARB_point_parameters", F(EXT_point_parameters) },
- { OFF, "GL_ARB_point_sprite", F(ARB_point_sprite) },
- { OFF, "GL_ARB_provoking_vertex", F(EXT_provoking_vertex) },
- { OFF, "GL_ARB_sampler_objects", F(ARB_sampler_objects) },
- { OFF, "GL_ARB_seamless_cube_map", F(ARB_seamless_cube_map) },
- { OFF, "GL_ARB_shader_objects", F(ARB_shader_objects) },
- { OFF, "GL_ARB_shader_stencil_export", F(ARB_shader_stencil_export) },
- { OFF, "GL_ARB_shading_language_100", F(ARB_shading_language_100) },
- { OFF, "GL_ARB_shadow", F(ARB_shadow) },
- { OFF, "GL_ARB_shadow_ambient", F(ARB_shadow_ambient) },
- { OFF, "GL_ARB_sync", F(ARB_sync) },
- { OFF, "GL_ARB_texture_border_clamp", F(ARB_texture_border_clamp) },
- { OFF, "GL_ARB_texture_buffer_object", F(ARB_texture_buffer_object) },
- { ON, "GL_ARB_texture_compression", F(ARB_texture_compression) },
- { OFF, "GL_ARB_texture_compression_rgtc", F(ARB_texture_compression_rgtc) },
- { OFF, "GL_ARB_texture_cube_map", F(ARB_texture_cube_map) },
- { OFF, "GL_ARB_texture_env_add", F(EXT_texture_env_add) },
- { OFF, "GL_ARB_texture_env_combine", F(ARB_texture_env_combine) },
- { OFF, "GL_ARB_texture_env_crossbar", F(ARB_texture_env_crossbar) },
- { OFF, "GL_ARB_texture_env_dot3", F(ARB_texture_env_dot3) },
- { OFF, "GL_MESAX_texture_float", F(ARB_texture_float) },
- { OFF, "GL_ARB_texture_mirrored_repeat", F(ARB_texture_mirrored_repeat)},
- { OFF, "GL_ARB_texture_multisample", F(ARB_texture_multisample) },
- { OFF, "GL_ARB_texture_non_power_of_two", F(ARB_texture_non_power_of_two)},
- { OFF, "GL_ARB_texture_rectangle", F(NV_texture_rectangle) },
- { OFF, "GL_ARB_texture_rg", F(ARB_texture_rg) },
- { OFF, "GL_ARB_texture_rgb10_a2ui", F(ARB_texture_rgb10_a2ui) },
- { OFF, "GL_ARB_texture_swizzle", F(EXT_texture_swizzle) },
- { ON, "GL_ARB_transpose_matrix", F(ARB_transpose_matrix) },
- { OFF, "GL_ARB_transform_feedback2", F(ARB_transform_feedback2) },
- { OFF, "GL_ARB_uniform_buffer_object", F(ARB_uniform_buffer_object) },
- { OFF, "GL_ARB_vertex_array_bgra", F(EXT_vertex_array_bgra) },
- { OFF, "GL_ARB_vertex_array_object", F(ARB_vertex_array_object) },
- { ON, "GL_ARB_vertex_buffer_object", F(ARB_vertex_buffer_object) },
- { OFF, "GL_ARB_vertex_program", F(ARB_vertex_program) },
- { OFF, "GL_ARB_vertex_shader", F(ARB_vertex_shader) },
- { OFF, "GL_ARB_vertex_type_2_10_10_10_rev", F(ARB_vertex_type_2_10_10_10_rev) },
- { ON, "GL_ARB_window_pos", F(ARB_window_pos) },
- { ON, "GL_EXT_abgr", F(EXT_abgr) },
- { ON, "GL_EXT_bgra", F(EXT_bgra) },
- { OFF, "GL_EXT_blend_color", F(EXT_blend_color) },
- { OFF, "GL_EXT_blend_equation_separate", F(EXT_blend_equation_separate) },
- { OFF, "GL_EXT_blend_func_separate", F(EXT_blend_func_separate) },
- { OFF, "GL_EXT_blend_logic_op", F(EXT_blend_logic_op) },
- { OFF, "GL_EXT_blend_minmax", F(EXT_blend_minmax) },
- { OFF, "GL_EXT_blend_subtract", F(EXT_blend_subtract) },
- { OFF, "GL_EXT_clip_volume_hint", F(EXT_clip_volume_hint) },
- { ON, "GL_EXT_compiled_vertex_array", F(EXT_compiled_vertex_array) },
- { 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) },
- { OFF, "GL_EXT_draw_instanced", F(ARB_draw_instanced) },
- { 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) },
- { OFF, "GL_EXT_framebuffer_object", F(EXT_framebuffer_object) },
- { OFF, "GL_EXT_framebuffer_sRGB", F(EXT_framebuffer_sRGB) },
- { OFF, "GL_EXT_fog_coord", F(EXT_fog_coord) },
- { OFF, "GL_EXT_gpu_program_parameters", F(EXT_gpu_program_parameters) },
- { OFF, "GL_EXT_gpu_shader4", F(EXT_gpu_shader4) },
- { ON, "GL_EXT_multi_draw_arrays", F(EXT_multi_draw_arrays) },
- { OFF, "GL_EXT_packed_depth_stencil", F(EXT_packed_depth_stencil) },
- { OFF, "GL_EXT_packed_float", F(EXT_packed_float) },
- { ON, "GL_EXT_packed_pixels", F(EXT_packed_pixels) },
- { OFF, "GL_EXT_paletted_texture", F(EXT_paletted_texture) },
- { OFF, "GL_EXT_pixel_buffer_object", F(EXT_pixel_buffer_object) },
- { OFF, "GL_EXT_point_parameters", F(EXT_point_parameters) },
- { ON, "GL_EXT_polygon_offset", F(EXT_polygon_offset) },
- { OFF, "GL_EXT_provoking_vertex", F(EXT_provoking_vertex) },
- { ON, "GL_EXT_rescale_normal", F(EXT_rescale_normal) },
- { OFF, "GL_EXT_secondary_color", F(EXT_secondary_color) },
- { OFF, "GL_EXT_separate_shader_objects", F(EXT_separate_shader_objects) },
- { ON, "GL_EXT_separate_specular_color", F(EXT_separate_specular_color) },
- { OFF, "GL_EXT_shadow_funcs", F(EXT_shadow_funcs) },
- { OFF, "GL_EXT_shared_texture_palette", F(EXT_shared_texture_palette) },
- { OFF, "GL_EXT_stencil_two_side", F(EXT_stencil_two_side) },
- { OFF, "GL_EXT_stencil_wrap", F(EXT_stencil_wrap) },
- { ON, "GL_EXT_subtexture", F(EXT_subtexture) },
- { ON, "GL_EXT_texture", F(EXT_texture) },
- { ON, "GL_EXT_texture3D", F(EXT_texture3D) },
- { OFF, "GL_EXT_texture_array", F(EXT_texture_array) },
- { OFF, "GL_EXT_texture_compression_s3tc", F(EXT_texture_compression_s3tc) },
- { OFF, "GL_EXT_texture_compression_rgtc", F(ARB_texture_compression_rgtc) },
- { OFF, "GL_EXT_texture_cube_map", F(ARB_texture_cube_map) },
- { ON, "GL_EXT_texture_edge_clamp", F(SGIS_texture_edge_clamp) },
- { OFF, "GL_EXT_texture_env_add", F(EXT_texture_env_add) },
- { OFF, "GL_EXT_texture_env_combine", F(EXT_texture_env_combine) },
- { OFF, "GL_EXT_texture_env_dot3", F(EXT_texture_env_dot3) },
- { OFF, "GL_EXT_texture_filter_anisotropic", F(EXT_texture_filter_anisotropic) },
- { OFF, "GL_EXT_texture_integer", F(EXT_texture_integer) },
- { OFF, "GL_EXT_texture_lod_bias", F(EXT_texture_lod_bias) },
- { OFF, "GL_EXT_texture_mirror_clamp", F(EXT_texture_mirror_clamp) },
- { ON, "GL_EXT_texture_object", F(EXT_texture_object) },
- { OFF, "GL_EXT_texture_rectangle", F(NV_texture_rectangle) },
- { OFF, "GL_EXT_texture_shared_exponent", F(EXT_texture_shared_exponent) },
- { OFF, "GL_EXT_texture_sRGB", F(EXT_texture_sRGB) },
- { OFF, "GL_EXT_texture_swizzle", F(EXT_texture_swizzle) },
- { OFF, "GL_EXT_timer_query", F(EXT_timer_query) },
- { OFF, "GL_EXT_transform_feedback", F(EXT_transform_feedback) },
- { ON, "GL_EXT_vertex_array", F(EXT_vertex_array) },
- { OFF, "GL_EXT_vertex_array_bgra", F(EXT_vertex_array_bgra) },
- { OFF, "GL_EXT_vertex_array_set", F(EXT_vertex_array_set) },
- { OFF, "GL_3DFX_texture_compression_FXT1", F(TDFX_texture_compression_FXT1) },
- { OFF, "GL_APPLE_client_storage", F(APPLE_client_storage) },
- { ON, "GL_APPLE_packed_pixels", F(APPLE_packed_pixels) },
- { OFF, "GL_APPLE_vertex_array_object", F(APPLE_vertex_array_object) },
- { OFF, "GL_APPLE_object_purgeable", F(APPLE_object_purgeable) },
- { OFF, "GL_ATI_blend_equation_separate", F(EXT_blend_equation_separate) },
- { OFF, "GL_ATI_envmap_bumpmap", F(ATI_envmap_bumpmap) },
- { OFF, "GL_ATI_texture_env_combine3", F(ATI_texture_env_combine3)},
- { OFF, "GL_ATI_texture_mirror_once", F(ATI_texture_mirror_once)},
- { OFF, "GL_ATI_fragment_shader", F(ATI_fragment_shader)},
- { OFF, "GL_ATI_separate_stencil", F(ATI_separate_stencil)},
- { ON, "GL_IBM_multimode_draw_arrays", F(IBM_multimode_draw_arrays) },
- { ON, "GL_IBM_rasterpos_clip", F(IBM_rasterpos_clip) },
- { OFF, "GL_IBM_texture_mirrored_repeat", F(ARB_texture_mirrored_repeat)},
- { OFF, "GL_INGR_blend_func_separate", F(EXT_blend_func_separate) },
- { OFF, "GL_MESA_pack_invert", F(MESA_pack_invert) },
- { OFF, "GL_MESA_resize_buffers", F(MESA_resize_buffers) },
- { OFF, "GL_MESA_texture_array", F(MESA_texture_array) },
- { OFF, "GL_MESA_texture_signed_rgba", F(MESA_texture_signed_rgba) },
- { 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) },
- { ON, "GL_NV_light_max_exponent", F(NV_light_max_exponent) },
- { OFF, "GL_NV_packed_depth_stencil", F(EXT_packed_depth_stencil) },
- { OFF, "GL_NV_point_sprite", F(NV_point_sprite) },
- { OFF, "GL_NV_primitive_restart", F(NV_primitive_restart) },
- { ON, "GL_NV_texgen_reflection", F(NV_texgen_reflection) },
- { OFF, "GL_NV_texture_env_combine4", F(NV_texture_env_combine4) },
- { OFF, "GL_NV_texture_rectangle", F(NV_texture_rectangle) },
- { OFF, "GL_NV_vertex_program", F(NV_vertex_program) },
- { OFF, "GL_NV_vertex_program1_1", F(NV_vertex_program1_1) },
- { ON, "GL_OES_read_format", F(OES_read_format) },
- { OFF, "GL_SGI_texture_color_table", F(SGI_texture_color_table) },
- { ON, "GL_SGIS_generate_mipmap", F(SGIS_generate_mipmap) },
- { OFF, "GL_SGIS_texture_border_clamp", F(ARB_texture_border_clamp) },
- { ON, "GL_SGIS_texture_edge_clamp", F(SGIS_texture_edge_clamp) },
- { 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) },
- { OFF, "GL_EXT_texture_format_BGRA8888", F(EXT_texture_format_BGRA8888) },
-#if FEATURE_OES_EGL_image
- { OFF, "GL_OES_EGL_image", F(OES_EGL_image) },
-#endif
+static const struct extension extension_table[] = {
+ /* ARB Extensions */
+ { "GL_ARB_ES2_compatibility", o(ARB_ES2_compatibility), GL },
+ { "GL_ARB_blend_func_extended", o(ARB_blend_func_extended), GL },
+ { "GL_ARB_copy_buffer", o(ARB_copy_buffer), GL },
+ { "GL_ARB_depth_buffer_float", o(ARB_depth_buffer_float), GL },
+ { "GL_ARB_depth_clamp", o(ARB_depth_clamp), GL },
+ { "GL_ARB_depth_texture", o(ARB_depth_texture), GL },
+ { "GL_ARB_draw_buffers", o(ARB_draw_buffers), GL },
+ { "GL_ARB_draw_buffers_blend", o(ARB_draw_buffers_blend), GL },
+ { "GL_ARB_draw_elements_base_vertex", o(ARB_draw_elements_base_vertex), GL },
+ { "GL_ARB_draw_instanced", o(ARB_draw_instanced), GL },
+ { "GL_ARB_explicit_attrib_location", o(ARB_explicit_attrib_location), GL },
+ { "GL_ARB_fragment_coord_conventions", o(ARB_fragment_coord_conventions), GL },
+ { "GL_ARB_fragment_program", o(ARB_fragment_program), GL },
+ { "GL_ARB_fragment_program_shadow", o(ARB_fragment_program_shadow), GL },
+ { "GL_ARB_fragment_shader", o(ARB_fragment_shader), GL },
+ { "GL_ARB_framebuffer_object", o(ARB_framebuffer_object), GL },
+ { "GL_ARB_framebuffer_sRGB", o(EXT_framebuffer_sRGB), GL },
+ { "GL_ARB_half_float_pixel", o(ARB_half_float_pixel), GL },
+ { "GL_ARB_half_float_vertex", o(ARB_half_float_vertex), GL },
+ { "GL_ARB_instanced_arrays", o(ARB_instanced_arrays), GL },
+ { "GL_ARB_map_buffer_range", o(ARB_map_buffer_range), GL },
+ { "GL_ARB_multisample", o(ARB_multisample), GL },
+ { "GL_ARB_multitexture", o(ARB_multitexture), GL },
+ { "GL_ARB_occlusion_query2", o(ARB_occlusion_query2), GL },
+ { "GL_ARB_occlusion_query", o(ARB_occlusion_query), GL },
+ { "GL_ARB_pixel_buffer_object", o(EXT_pixel_buffer_object), GL },
+ { "GL_ARB_point_parameters", o(EXT_point_parameters), GL },
+ { "GL_ARB_point_sprite", o(ARB_point_sprite), GL },
+ { "GL_ARB_provoking_vertex", o(EXT_provoking_vertex), GL },
+ { "GL_ARB_sampler_objects", o(ARB_sampler_objects), GL },
+ { "GL_ARB_seamless_cube_map", o(ARB_seamless_cube_map), GL },
+ { "GL_ARB_shader_objects", o(ARB_shader_objects), GL },
+ { "GL_ARB_shader_stencil_export", o(ARB_shader_stencil_export), GL },
+ { "GL_ARB_shading_language_100", o(ARB_shading_language_100), GL },
+ { "GL_ARB_shadow_ambient", o(ARB_shadow_ambient), GL },
+ { "GL_ARB_shadow", o(ARB_shadow), GL },
+ { "GL_ARB_sync", o(ARB_sync), GL },
+ { "GL_ARB_texture_border_clamp", o(ARB_texture_border_clamp), GL },
+ { "GL_ARB_texture_buffer_object", o(ARB_texture_buffer_object), GL },
+ { "GL_ARB_texture_compression", o(ARB_texture_compression), GL },
+ { "GL_ARB_texture_compression_rgtc", o(ARB_texture_compression_rgtc), GL },
+ { "GL_ARB_texture_cube_map", o(ARB_texture_cube_map), GL },
+ { "GL_ARB_texture_env_add", o(EXT_texture_env_add), GL },
+ { "GL_ARB_texture_env_combine", o(ARB_texture_env_combine), GL },
+ { "GL_ARB_texture_env_crossbar", o(ARB_texture_env_crossbar), GL },
+ { "GL_ARB_texture_env_dot3", o(ARB_texture_env_dot3), GL },
+ { "GL_ARB_texture_mirrored_repeat", o(ARB_texture_mirrored_repeat), GL },
+ { "GL_ARB_texture_multisample", o(ARB_texture_multisample), GL },
+ { "GL_ARB_texture_non_power_of_two", o(ARB_texture_non_power_of_two), GL | ES1 | ES2 },
+ { "GL_ARB_texture_rectangle", o(NV_texture_rectangle), GL },
+ { "GL_ARB_texture_rgb10_a2ui", o(ARB_texture_rgb10_a2ui), GL },
+ { "GL_ARB_texture_rg", o(ARB_texture_rg), GL },
+ { "GL_ARB_texture_swizzle", o(EXT_texture_swizzle), GL },
+ { "GL_ARB_transform_feedback2", o(ARB_transform_feedback2), GL },
+ { "GL_ARB_transpose_matrix", o(ARB_transpose_matrix), GL },
+ { "GL_ARB_uniform_buffer_object", o(ARB_uniform_buffer_object), GL },
+ { "GL_ARB_vertex_array_bgra", o(EXT_vertex_array_bgra), GL },
+ { "GL_ARB_vertex_array_object", o(ARB_vertex_array_object), GL },
+ { "GL_ARB_vertex_buffer_object", o(ARB_vertex_buffer_object), GL },
+ { "GL_ARB_vertex_program", o(ARB_vertex_program), GL },
+ { "GL_ARB_vertex_shader", o(ARB_vertex_shader), GL },
+ { "GL_ARB_vertex_type_2_10_10_10_rev", o(ARB_vertex_type_2_10_10_10_rev), GL },
+ { "GL_ARB_window_pos", o(ARB_window_pos), GL },
+
+ /* EXT extensions */
+ { "GL_EXT_abgr", o(EXT_abgr), GL },
+ { "GL_EXT_bgra", o(EXT_bgra), GL },
+ { "GL_EXT_blend_color", o(EXT_blend_color), GL },
+ { "GL_EXT_blend_equation_separate", o(EXT_blend_equation_separate), GL },
+ { "GL_EXT_blend_func_separate", o(EXT_blend_func_separate), GL },
+ { "GL_EXT_blend_logic_op", o(EXT_blend_logic_op), GL },
+ { "GL_EXT_blend_minmax", o(EXT_blend_minmax), GL | ES1 | ES2 },
+ { "GL_EXT_blend_subtract", o(EXT_blend_subtract), GL },
+ { "GL_EXT_clip_volume_hint", o(EXT_clip_volume_hint), GL },
+ { "GL_EXT_compiled_vertex_array", o(EXT_compiled_vertex_array), GL },
+ { "GL_EXT_copy_texture", o(EXT_copy_texture), GL },
+ { "GL_EXT_depth_bounds_test", o(EXT_depth_bounds_test), GL },
+ { "GL_EXT_draw_buffers2", o(EXT_draw_buffers2), GL },
+ { "GL_EXT_draw_instanced", o(ARB_draw_instanced), GL },
+ { "GL_EXT_draw_range_elements", o(EXT_draw_range_elements), GL },
+ { "GL_EXT_fog_coord", o(EXT_fog_coord), GL },
+ { "GL_EXT_framebuffer_blit", o(EXT_framebuffer_blit), GL },
+ { "GL_EXT_framebuffer_multisample", o(EXT_framebuffer_multisample), GL },
+ { "GL_EXT_framebuffer_object", o(EXT_framebuffer_object), GL },
+ { "GL_EXT_framebuffer_sRGB", o(EXT_framebuffer_sRGB), GL },
+ { "GL_EXT_gpu_program_parameters", o(EXT_gpu_program_parameters), GL },
+ { "GL_EXT_gpu_shader4", o(EXT_gpu_shader4), GL },
+ { "GL_EXT_multi_draw_arrays", o(EXT_multi_draw_arrays), GL | ES1 | ES2 },
+ { "GL_EXT_packed_depth_stencil", o(EXT_packed_depth_stencil), GL },
+ { "GL_EXT_packed_float", o(EXT_packed_float), GL },
+ { "GL_EXT_packed_pixels", o(EXT_packed_pixels), GL },
+ { "GL_EXT_paletted_texture", o(EXT_paletted_texture), GL },
+ { "GL_EXT_pixel_buffer_object", o(EXT_pixel_buffer_object), GL },
+ { "GL_EXT_point_parameters", o(EXT_point_parameters), GL },
+ { "GL_EXT_polygon_offset", o(EXT_polygon_offset), GL },
+ { "GL_EXT_provoking_vertex", o(EXT_provoking_vertex), GL },
+ { "GL_EXT_rescale_normal", o(EXT_rescale_normal), GL },
+ { "GL_EXT_secondary_color", o(EXT_secondary_color), GL },
+ { "GL_EXT_separate_shader_objects", o(EXT_separate_shader_objects), GL },
+ { "GL_EXT_separate_specular_color", o(EXT_separate_specular_color), GL },
+ { "GL_EXT_shadow_funcs", o(EXT_shadow_funcs), GL },
+ { "GL_EXT_shared_texture_palette", o(EXT_shared_texture_palette), GL },
+ { "GL_EXT_stencil_two_side", o(EXT_stencil_two_side), GL },
+ { "GL_EXT_stencil_wrap", o(EXT_stencil_wrap), GL },
+ { "GL_EXT_subtexture", o(EXT_subtexture), GL },
+ { "GL_EXT_texture3D", o(EXT_texture3D), GL },
+ { "GL_EXT_texture_array", o(EXT_texture_array), GL },
+ { "GL_EXT_texture_compression_dxt1", o(EXT_texture_compression_s3tc), GL | ES1 | ES2 },
+ { "GL_EXT_texture_compression_latc", o(EXT_texture_compression_latc), GL },
+ { "GL_EXT_texture_compression_rgtc", o(ARB_texture_compression_rgtc), GL },
+ { "GL_EXT_texture_compression_s3tc", o(EXT_texture_compression_s3tc), GL },
+ { "GL_EXT_texture_cube_map", o(ARB_texture_cube_map), GL },
+ { "GL_EXT_texture_edge_clamp", o(SGIS_texture_edge_clamp), GL },
+ { "GL_EXT_texture_env_add", o(EXT_texture_env_add), GL },
+ { "GL_EXT_texture_env_combine", o(EXT_texture_env_combine), GL },
+ { "GL_EXT_texture_env_dot3", o(EXT_texture_env_dot3), GL },
+ { "GL_EXT_texture_filter_anisotropic", o(EXT_texture_filter_anisotropic), GL | ES1 | ES2 },
+ { "GL_EXT_texture_format_BGRA8888", o(EXT_texture_format_BGRA8888), ES1 | ES2 },
+ { "GL_EXT_texture_integer", o(EXT_texture_integer), GL },
+ { "GL_EXT_texture_lod_bias", o(EXT_texture_lod_bias), GL | ES1 },
+ { "GL_EXT_texture_mirror_clamp", o(EXT_texture_mirror_clamp), GL },
+ { "GL_EXT_texture_object", o(EXT_texture_object), GL },
+ { "GL_EXT_texture", o(EXT_texture), GL },
+ { "GL_EXT_texture_rectangle", o(NV_texture_rectangle), GL },
+ { "GL_EXT_texture_shared_exponent", o(EXT_texture_shared_exponent), GL },
+ { "GL_EXT_texture_sRGB", o(EXT_texture_sRGB), GL },
+ { "GL_EXT_texture_sRGB_decode", o(EXT_texture_sRGB_decode), GL },
+ { "GL_EXT_texture_swizzle", o(EXT_texture_swizzle), GL },
+ { "GL_EXT_texture_type_2_10_10_10_REV", o(dummy_true), ES2 },
+ { "GL_EXT_timer_query", o(EXT_timer_query), GL },
+ { "GL_EXT_transform_feedback", o(EXT_transform_feedback), GL },
+ { "GL_EXT_vertex_array_bgra", o(EXT_vertex_array_bgra), GL },
+ { "GL_EXT_vertex_array", o(EXT_vertex_array), GL },
+ { "GL_EXT_vertex_array_set", o(EXT_vertex_array_set), GL },
+
+ /* OES extensions */
+ { "GL_OES_blend_equation_separate", o(EXT_blend_equation_separate), ES1 },
+ { "GL_OES_blend_func_separate", o(EXT_blend_func_separate), ES1 },
+ { "GL_OES_blend_subtract", o(EXT_blend_subtract), ES1 },
+ { "GL_OES_byte_coordinates", o(dummy_true), ES1 },
+ { "GL_OES_compressed_paletted_texture", o(dummy_false), DISABLE },
+ { "GL_OES_depth24", o(EXT_framebuffer_object), ES1 | ES2 },
+ { "GL_OES_depth32", o(dummy_false), DISABLE },
+ { "GL_OES_depth_texture", o(ARB_depth_texture), ES2 },
#if FEATURE_OES_draw_texture
- { OFF, "GL_OES_draw_texture", F(OES_draw_texture) },
-#endif /* FEATURE_OES_draw_texture */
+ { "GL_OES_draw_texture", o(OES_draw_texture), ES1 | ES2 },
+#endif
+#if FEATURE_OES_EGL_image
+ /* FIXME: Mesa expects GL_OES_EGL_image to be available in OpenGL contexts. */
+ { "GL_OES_EGL_image", o(OES_EGL_image), GL | ES1 | ES2 },
+#endif
+ { "GL_OES_element_index_uint", o(EXT_vertex_array), ES1 | ES2 },
+ { "GL_OES_fbo_render_mipmap", o(EXT_framebuffer_object), ES1 | ES2 },
+ { "GL_OES_fixed_point", o(dummy_true), ES1 },
+ { "GL_OES_framebuffer_object", o(EXT_framebuffer_object), ES1 },
+ { "GL_OES_mapbuffer", o(ARB_vertex_buffer_object), ES1 | ES2 },
+ { "GL_OES_matrix_get", o(dummy_true), ES1 },
+ { "GL_OES_packed_depth_stencil", o(EXT_packed_depth_stencil), ES1 | ES2 },
+ { "GL_OES_point_size_array", o(dummy_true), ES1 },
+ { "GL_OES_point_sprite", o(ARB_point_sprite), ES1 },
+ { "GL_OES_query_matrix", o(dummy_true), ES1 },
+ { "GL_OES_read_format", o(OES_read_format), GL | ES1 },
+ { "GL_OES_rgb8_rgba8", o(EXT_framebuffer_object), ES1 | ES2 },
+ { "GL_OES_single_precision", o(dummy_true), ES1 },
+ { "GL_OES_standard_derivatives", o(OES_standard_derivatives), ES2 },
+ { "GL_OES_stencil1", o(dummy_false), DISABLE },
+ { "GL_OES_stencil4", o(dummy_false), DISABLE },
+ { "GL_OES_stencil8", o(EXT_framebuffer_object), ES1 | ES2 },
+ { "GL_OES_stencil_wrap", o(EXT_stencil_wrap), ES1 },
+ { "GL_OES_texture_3D", o(EXT_texture3D), ES2 },
+ { "GL_OES_texture_cube_map", o(ARB_texture_cube_map), ES1 },
+ { "GL_OES_texture_env_crossbar", o(ARB_texture_env_crossbar), ES1 },
+ { "GL_OES_texture_mirrored_repeat", o(ARB_texture_mirrored_repeat), ES1 },
+ { "GL_OES_texture_npot", o(ARB_texture_non_power_of_two), ES2 },
+
+ /* Vendor extensions */
+ { "GL_3DFX_texture_compression_FXT1", o(TDFX_texture_compression_FXT1), GL },
+ { "GL_AMD_conservative_depth", o(AMD_conservative_depth), GL },
+ { "GL_APPLE_client_storage", o(APPLE_client_storage), GL },
+ { "GL_APPLE_object_purgeable", o(APPLE_object_purgeable), GL },
+ { "GL_APPLE_packed_pixels", o(APPLE_packed_pixels), GL },
+ { "GL_APPLE_vertex_array_object", o(APPLE_vertex_array_object), GL },
+ { "GL_ATI_blend_equation_separate", o(EXT_blend_equation_separate), GL },
+ { "GL_ATI_envmap_bumpmap", o(ATI_envmap_bumpmap), GL },
+ { "GL_ATI_fragment_shader", o(ATI_fragment_shader), GL },
+ { "GL_ATI_separate_stencil", o(ATI_separate_stencil), GL },
+ { "GL_ATI_texture_compression_3dc", o(ATI_texture_compression_3dc), GL },
+ { "GL_ATI_texture_env_combine3", o(ATI_texture_env_combine3), GL },
+ { "GL_ATI_texture_mirror_once", o(ATI_texture_mirror_once), GL },
+ { "GL_IBM_multimode_draw_arrays", o(IBM_multimode_draw_arrays), GL },
+ { "GL_IBM_rasterpos_clip", o(IBM_rasterpos_clip), GL },
+ { "GL_IBM_texture_mirrored_repeat", o(ARB_texture_mirrored_repeat), GL },
+ { "GL_INGR_blend_func_separate", o(EXT_blend_func_separate), GL },
+ { "GL_MESA_pack_invert", o(MESA_pack_invert), GL },
+ { "GL_MESA_resize_buffers", o(MESA_resize_buffers), GL },
+ { "GL_MESA_texture_array", o(MESA_texture_array), GL },
+ { "GL_MESA_texture_signed_rgba", o(MESA_texture_signed_rgba), GL },
+ { "GL_MESA_window_pos", o(ARB_window_pos), GL },
+ { "GL_MESAX_texture_float", o(ARB_texture_float), GL },
+ { "GL_MESA_ycbcr_texture", o(MESA_ycbcr_texture), GL },
+ { "GL_NV_blend_square", o(NV_blend_square), GL },
+ { "GL_NV_conditional_render", o(NV_conditional_render), GL },
+ { "GL_NV_depth_clamp", o(ARB_depth_clamp), GL },
+ { "GL_NV_fragment_program", o(NV_fragment_program), GL },
+ { "GL_NV_fragment_program_option", o(NV_fragment_program_option), GL },
+ { "GL_NV_light_max_exponent", o(NV_light_max_exponent), GL },
+ { "GL_NV_packed_depth_stencil", o(EXT_packed_depth_stencil), GL },
+ { "GL_NV_point_sprite", o(NV_point_sprite), GL },
+ { "GL_NV_primitive_restart", o(NV_primitive_restart), GL },
+ { "GL_NV_texgen_reflection", o(NV_texgen_reflection), GL },
+ { "GL_NV_texture_barrier", o(NV_texture_barrier), GL },
+ { "GL_NV_texture_env_combine4", o(NV_texture_env_combine4), GL },
+ { "GL_NV_texture_rectangle", o(NV_texture_rectangle), GL },
+ { "GL_NV_vertex_program1_1", o(NV_vertex_program1_1), GL },
+ { "GL_NV_vertex_program", o(NV_vertex_program), GL },
+ { "GL_S3_s3tc", o(S3_s3tc), GL },
+ { "GL_SGIS_generate_mipmap", o(SGIS_generate_mipmap), GL },
+ { "GL_SGIS_texture_border_clamp", o(ARB_texture_border_clamp), GL },
+ { "GL_SGIS_texture_edge_clamp", o(SGIS_texture_edge_clamp), GL },
+ { "GL_SGIS_texture_lod", o(SGIS_texture_lod), GL },
+ { "GL_SUN_multi_draw_arrays", o(EXT_multi_draw_arrays), GL },
+
+ { 0, 0, 0 },
};
+/**
+ * Given an extension name, lookup up the corresponding member of struct
+ * gl_extensions and return that member's offset (in bytes). If the name is
+ * not found in the \c extension_table, return 0.
+ *
+ * \param name Name of extension.
+ * \return Offset of member in struct gl_extensions.
+ */
+static size_t
+name_to_offset(const char* name)
+{
+ const struct extension *i;
+
+ if (name == 0)
+ return 0;
+
+ for (i = extension_table; i->name != 0; ++i) {
+ if (strcmp(name, i->name) == 0)
+ return i->offset;
+ }
+
+ return 0;
+}
+
+
+/**
+ * \brief Extensions enabled by default.
+ *
+ * These extensions are enabled by _mesa_init_extensions().
+ *
+ * XXX: Should these defaults also apply to GLES?
+ */
+static const size_t default_extensions[] = {
+ o(ARB_copy_buffer),
+ o(ARB_draw_buffers),
+ o(ARB_multisample),
+ o(ARB_texture_compression),
+ o(ARB_transpose_matrix),
+ o(ARB_vertex_buffer_object),
+ o(ARB_window_pos),
+
+ o(EXT_abgr),
+ o(EXT_bgra),
+ o(EXT_compiled_vertex_array),
+ o(EXT_copy_texture),
+ o(EXT_draw_range_elements),
+ o(EXT_multi_draw_arrays),
+ o(EXT_packed_pixels),
+ o(EXT_polygon_offset),
+ o(EXT_rescale_normal),
+ o(EXT_separate_specular_color),
+ o(EXT_subtexture),
+ o(EXT_texture),
+ o(EXT_texture3D),
+ o(EXT_texture_object),
+ o(EXT_vertex_array),
+
+ o(OES_read_format),
+ o(OES_standard_derivatives),
+
+ /* Vendor Extensions */
+ o(APPLE_packed_pixels),
+ o(IBM_multimode_draw_arrays),
+ o(IBM_rasterpos_clip),
+ o(NV_light_max_exponent),
+ o(NV_texgen_reflection),
+ o(SGIS_generate_mipmap),
+ o(SGIS_texture_edge_clamp),
+ o(SGIS_texture_lod),
+
+ 0,
+};
+
/**
* Enable all extensions suitable for a software-only renderer.
@@ -237,6 +385,7 @@ _mesa_enable_sw_extensions(struct gl_context *ctx)
ctx->Extensions.ARB_depth_texture = GL_TRUE;
/*ctx->Extensions.ARB_draw_buffers = GL_TRUE;*/
ctx->Extensions.ARB_draw_elements_base_vertex = GL_TRUE;
+ ctx->Extensions.ARB_draw_instanced = GL_TRUE;
ctx->Extensions.ARB_explicit_attrib_location = GL_TRUE;
ctx->Extensions.ARB_fragment_coord_conventions = GL_TRUE;
#if FEATURE_ARB_fragment_program
@@ -249,7 +398,8 @@ _mesa_enable_sw_extensions(struct gl_context *ctx)
#if FEATURE_ARB_framebuffer_object
ctx->Extensions.ARB_framebuffer_object = GL_TRUE;
#endif
-#if FEATURE_ARB_geometry_shader4
+#if FEATURE_ARB_geometry_shader4 && 0
+ /* XXX re-enable when GLSL compiler again supports geometry shaders */
ctx->Extensions.ARB_geometry_shader4 = GL_TRUE;
#endif
ctx->Extensions.ARB_half_float_pixel = GL_TRUE;
@@ -258,6 +408,7 @@ _mesa_enable_sw_extensions(struct gl_context *ctx)
ctx->Extensions.ARB_multitexture = GL_TRUE;
#if FEATURE_queryobj
ctx->Extensions.ARB_occlusion_query = GL_TRUE;
+ ctx->Extensions.ARB_occlusion_query2 = GL_TRUE;
#endif
ctx->Extensions.ARB_point_sprite = GL_TRUE;
#if FEATURE_ARB_shader_objects
@@ -278,6 +429,7 @@ _mesa_enable_sw_extensions(struct gl_context *ctx)
ctx->Extensions.ARB_texture_mirrored_repeat = GL_TRUE;
ctx->Extensions.ARB_texture_non_power_of_two = GL_TRUE;
ctx->Extensions.ARB_texture_rg = GL_TRUE;
+ ctx->Extensions.ARB_texture_compression_rgtc = GL_TRUE;
ctx->Extensions.ARB_vertex_array_object = GL_TRUE;
#if FEATURE_ARB_vertex_program
ctx->Extensions.ARB_vertex_program = GL_TRUE;
@@ -299,6 +451,7 @@ _mesa_enable_sw_extensions(struct gl_context *ctx)
#if FEATURE_ATI_fragment_shader
ctx->Extensions.ATI_fragment_shader = GL_TRUE;
#endif
+ ctx->Extensions.ATI_texture_compression_3dc = GL_TRUE;
ctx->Extensions.ATI_texture_env_combine3 = GL_TRUE;
ctx->Extensions.ATI_texture_mirror_once = GL_TRUE;
ctx->Extensions.ATI_separate_stencil = GL_TRUE;
@@ -334,6 +487,7 @@ _mesa_enable_sw_extensions(struct gl_context *ctx)
ctx->Extensions.EXT_stencil_wrap = GL_TRUE;
ctx->Extensions.EXT_stencil_two_side = GL_TRUE;
ctx->Extensions.EXT_texture_array = GL_TRUE;
+ ctx->Extensions.EXT_texture_compression_latc = GL_TRUE;
ctx->Extensions.EXT_texture_env_add = GL_TRUE;
ctx->Extensions.EXT_texture_env_combine = GL_TRUE;
ctx->Extensions.EXT_texture_env_dot3 = GL_TRUE;
@@ -341,6 +495,7 @@ _mesa_enable_sw_extensions(struct gl_context *ctx)
ctx->Extensions.EXT_texture_lod_bias = GL_TRUE;
#if FEATURE_EXT_texture_sRGB
ctx->Extensions.EXT_texture_sRGB = GL_TRUE;
+ ctx->Extensions.EXT_texture_sRGB_decode = GL_TRUE;
#endif
ctx->Extensions.EXT_texture_swizzle = GL_TRUE;
#if FEATURE_EXT_transform_feedback
@@ -369,7 +524,6 @@ _mesa_enable_sw_extensions(struct gl_context *ctx)
#if FEATURE_NV_fragment_program && FEATURE_ARB_fragment_program
ctx->Extensions.NV_fragment_program_option = GL_TRUE;
#endif
- ctx->Extensions.SGI_texture_color_table = GL_TRUE;
/*ctx->Extensions.SGIS_generate_mipmap = GL_TRUE;*/
ctx->Extensions.SGIS_texture_edge_clamp = GL_TRUE;
#if FEATURE_ARB_vertex_program || FEATURE_ARB_fragment_program
@@ -510,8 +664,7 @@ _mesa_enable_2_1_extensions(struct gl_context *ctx)
static GLboolean
set_extension( struct gl_context *ctx, const char *name, GLboolean state )
{
- GLboolean *base = (GLboolean *) &ctx->Extensions;
- GLuint i;
+ size_t offset;
if (ctx->Extensions.String) {
/* The string was already queried - can't change it now! */
@@ -519,16 +672,20 @@ set_extension( struct gl_context *ctx, const char *name, GLboolean state )
return GL_FALSE;
}
- for (i = 0 ; i < Elements(default_extensions) ; i++) {
- if (strcmp(default_extensions[i].name, name) == 0) {
- if (default_extensions[i].flag_offset) {
- GLboolean *enabled = base + default_extensions[i].flag_offset;
- *enabled = state;
- }
- return GL_TRUE;
- }
+ offset = name_to_offset(name);
+ if (offset == 0) {
+ _mesa_problem(ctx, "Trying to enable/disable unknown extension %s",
+ name);
+ return GL_FALSE;
+ } else if (offset == o(dummy_true) && state == GL_FALSE) {
+ _mesa_problem(ctx, "Trying to disable a permanently enabled extension: "
+ "%s", name);
+ return GL_FALSE;
+ } else {
+ GLboolean *base = (GLboolean *) &ctx->Extensions;
+ base[offset] = state;
+ return GL_TRUE;
}
- return GL_FALSE;
}
@@ -557,130 +714,112 @@ _mesa_disable_extension( struct gl_context *ctx, const char *name )
/**
- * Check if the i-th extension is enabled.
- */
-static GLboolean
-extension_enabled(struct gl_context *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( struct gl_context *ctx, const char *name )
{
- GLuint i;
-
- for (i = 0 ; i < Elements(default_extensions) ; i++) {
- if (strcmp(default_extensions[i].name, name) == 0) {
- return extension_enabled(ctx, i);
- }
- }
- return GL_FALSE;
-}
+ size_t offset;
+ GLboolean *base;
+ if (name == 0)
+ return GL_FALSE;
-/**
- * Append string 'b' onto string 'a'. Free 'a' and return new string.
- */
-static char *
-append(const char *a, const char *b)
-{
- const GLuint aLen = a ? strlen(a) : 0;
- const GLuint bLen = b ? strlen(b) : 0;
- char *s = calloc(1, aLen + bLen + 1);
- if (s) {
- if (a)
- memcpy(s, a, aLen);
- if (b)
- memcpy(s + aLen, b, bLen);
- s[aLen + bLen] = '\0';
- }
- if (a)
- free((void *) a);
- return s;
+ offset = name_to_offset(name);
+ if (offset == 0)
+ return GL_FALSE;
+ base = (GLboolean *) &ctx->Extensions;
+ return base[offset];
}
/**
- * Check the MESA_EXTENSION_OVERRIDE env var.
- * For extension names that are recognized, turn them on. For extension
- * names that are recognized and prefixed with '-', turn them off.
- * Return a string of the unknown/leftover names.
+ * \brief Apply the \c MESA_EXTENSION_OVERRIDE environment variable.
+ *
+ * \c MESA_EXTENSION_OVERRIDE is a space-separated list of extensions to
+ * enable or disable. The list is processed thus:
+ * - Enable recognized extension names that are prefixed with '+'.
+ * - Disable recognized extension names that are prefixed with '-'.
+ * - Enable recognized extension names that are not prefixed.
+ * - Collect unrecognized extension names in a new string.
+ *
+ * \return Space-separated list of unrecognized extension names (which must
+ * be freed). Does not return \c NULL.
*/
-static const char *
+static char *
get_extension_override( struct gl_context *ctx )
{
- const char *envExt = _mesa_getenv("MESA_EXTENSION_OVERRIDE");
- char *extraExt = NULL;
- char ext[1000];
- GLuint extLen = 0;
- GLuint i;
- GLboolean disableExt = GL_FALSE;
-
- if (!envExt)
- return NULL;
+ const char *env_const= _mesa_getenv("MESA_EXTENSION_OVERRIDE");
+ char *env;
+ char *ext;
+ char *extra_exts;
+ int len;
+
+ if (env_const == NULL) {
+ /* Return the empty string rather than NULL. This simplifies the logic
+ * of client functions. */
+ return calloc(1, sizeof(char));
+ }
- for (i = 0; ; i++) {
- if (envExt[i] == '\0' || envExt[i] == ' ') {
- /* terminate/process 'ext' if extLen > 0 */
- if (extLen > 0) {
- assert(extLen < sizeof(ext));
- /* enable extension named by 'ext' */
- ext[extLen] = 0;
- if (!set_extension(ctx, ext, !disableExt)) {
- /* unknown extension name, append it to extraExt */
- if (extraExt) {
- extraExt = append(extraExt, " ");
- }
- extraExt = append(extraExt, ext);
- }
- extLen = 0;
- disableExt = GL_FALSE;
- }
- if (envExt[i] == '\0')
- break;
- }
- else if (envExt[i] == '-') {
- disableExt = GL_TRUE;
+ /* extra_exts: List of unrecognized extensions. */
+ extra_exts = calloc(strlen(env_const), sizeof(char));
+
+ /* Copy env_const because strtok() is destructive. */
+ env = strdup(env_const);
+ for (ext = strtok(env, " "); ext != NULL; ext = strtok(NULL, " ")) {
+ int enable;
+ int recognized;
+ switch (ext[0]) {
+ case '+':
+ enable = 1;
+ ++ext;
+ break;
+ case '-':
+ enable = 0;
+ ++ext;
+ break;
+ default:
+ enable = 1;
+ break;
}
- else {
- /* accumulate this non-space character */
- ext[extLen++] = envExt[i];
+ recognized = set_extension(ctx, ext, enable);
+ if (!recognized) {
+ strcat(extra_exts, ext);
+ strcat(extra_exts, " ");
}
}
- return extraExt;
+ /* Remove trailing space. */
+ len = strlen(extra_exts);
+ if (extra_exts[len - 1] == ' ')
+ extra_exts[len - 1] = '\0';
+
+ return extra_exts;
}
/**
- * Run through the default_extensions array above and set the
- * ctx->Extensions.ARB/EXT_* flags accordingly.
- * To be called during context initialization.
+ * \brief Initialize extension tables and enable default extensions.
+ *
+ * This should be called during context initialization.
+ * Note: Sets gl_extensions.dummy_true to true.
*/
void
_mesa_init_extensions( struct gl_context *ctx )
{
GLboolean *base = (GLboolean *) &ctx->Extensions;
- GLuint i;
-
- for (i = 0 ; i < Elements(default_extensions) ; i++) {
- if (default_extensions[i].enabled &&
- default_extensions[i].flag_offset) {
- *(base + default_extensions[i].flag_offset) = GL_TRUE;
- }
- }
+ GLboolean *sentinel = base + o(extension_sentinel);
+ GLboolean *i;
+ const size_t *j;
+
+ /* First, turn all extensions off. */
+ for (i = base; i != sentinel; ++i)
+ *i = GL_FALSE;
+
+ /* Then, selectively turn default extensions on. */
+ ctx->Extensions.dummy_true = GL_TRUE;
+ for (j = default_extensions; *j != 0; ++j)
+ base[*j] = GL_TRUE;
}
@@ -688,258 +827,46 @@ _mesa_init_extensions( struct gl_context *ctx )
* Construct the GL_EXTENSIONS string. Called the first time that
* glGetString(GL_EXTENSIONS) is called.
*/
-static GLubyte *
-compute_extensions( struct gl_context *ctx )
+GLubyte*
+_mesa_make_extension_string(struct gl_context *ctx)
{
- const char *extraExt = get_extension_override(ctx);
- GLuint extStrLen = 0;
- char *s;
- GLuint i;
-
- /* first, compute length of the extension string */
- for (i = 0 ; i < Elements(default_extensions) ; i++) {
- if (extension_enabled(ctx, i)) {
- extStrLen += (GLuint) strlen(default_extensions[i].name) + 1;
- }
- }
-
- if (extraExt)
- extStrLen += strlen(extraExt) + 1; /* +1 for space */
-
- /* allocate the extension string */
- s = (char *) malloc(extStrLen);
- if (!s)
- return NULL;
+ /* The extension string. */
+ char *exts = 0;
+ /* Length of extension string. */
+ size_t length = 0;
+ /* String of extra extensions. */
+ char *extra_extensions = get_extension_override(ctx);
+ GLboolean *base = (GLboolean *) &ctx->Extensions;
+ const struct extension *i;
- /* second, build the extension string */
- extStrLen = 0;
- for (i = 0 ; i < Elements(default_extensions) ; i++) {
- if (extension_enabled(ctx, i)) {
- GLuint len = (GLuint) strlen(default_extensions[i].name);
- memcpy(s + extStrLen, default_extensions[i].name, len);
- extStrLen += len;
- s[extStrLen] = ' ';
- extStrLen++;
+ /* Compute length of the extension string. */
+ for (i = extension_table; i->name != 0; ++i) {
+ if (base[i->offset] && (i->api_set & (1 << ctx->API))) {
+ length += strlen(i->name) + 1; /* +1 for space */
}
}
- ASSERT(extStrLen > 0);
-
- s[extStrLen - 1] = 0; /* -1 to overwrite trailing the ' ' */
+ if (extra_extensions != NULL)
+ length += 1 + strlen(extra_extensions); /* +1 for space */
- if (extraExt) {
- s = append(s, " ");
- s = append(s, extraExt);
+ exts = (char *) calloc(length + 1, sizeof(char));
+ if (exts == NULL) {
+ free(extra_extensions);
+ return NULL;
}
- return (GLubyte *) s;
-}
-
-static size_t
-append_extension(GLubyte **str, const char *ext)
-{
- GLubyte *s = *str;
- size_t len = strlen(ext);
-
- if (s) {
- memcpy(s, ext, len);
- s[len++] = ' ';
- s[len] = '\0';
-
- *str += len;
- }
- else {
- len++;
+ /* Build the extension string.*/
+ for (i = extension_table; i->name != 0; ++i) {
+ if (base[i->offset] && (i->api_set & (1 << ctx->API))) {
+ strcat(exts, i->name);
+ strcat(exts, " ");
+ }
}
-
- return len;
-}
-
-
-static size_t
-make_extension_string_es1(const struct gl_context *ctx, GLubyte *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 (extra_extensions != 0) {
+ strcat(exts, extra_extensions);
+ free(extra_extensions);
}
- 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");
-
-#if FEATURE_OES_EGL_image
- if (ctx->Extensions.OES_EGL_image)
- len += append_extension(&str, "GL_OES_EGL_image");
-#endif
-
- return len;
-}
-
-
-static GLubyte *
-compute_extensions_es1(const struct gl_context *ctx)
-{
- GLubyte *s;
- unsigned int len;
-
- len = make_extension_string_es1(ctx, NULL);
- s = malloc(len + 1);
- if (!s)
- return NULL;
- make_extension_string_es1(ctx, s);
-
- return s;
-}
-
-static size_t
-make_extension_string_es2(const struct gl_context *ctx, GLubyte *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 0
- /* disabled because of missing GLSL support */
- if (ctx->Extensions.EXT_texture3D)
- len += append_extension(&str, "GL_OES_texture_3D");
-#endif
-
- 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");
-
-#if FEATURE_OES_EGL_image
- if (ctx->Extensions.OES_EGL_image)
- len += append_extension(&str, "GL_OES_EGL_image");
-#endif
-
- if (ctx->Extensions.EXT_texture_format_BGRA8888)
- len += append_extension(&str, "GL_EXT_texture_format_BGRA8888");
-
- return len;
-}
-
-static GLubyte *
-compute_extensions_es2(struct gl_context *ctx)
-{
- GLubyte *s;
- unsigned int len;
-
- len = make_extension_string_es2(ctx, NULL);
- s = malloc(len + 1);
- if (!s)
- return NULL;
- make_extension_string_es2(ctx, s);
-
- return s;
-}
-
-
-GLubyte *
-_mesa_make_extension_string(struct gl_context *ctx)
-{
- switch (ctx->API) {
- case API_OPENGL:
- return compute_extensions(ctx);
- case API_OPENGLES2:
- return compute_extensions_es2(ctx);
- case API_OPENGLES:
- return compute_extensions_es1(ctx);
- default:
- assert(0);
- return NULL;
- }
+ return (GLubyte *) exts;
}
/**
@@ -948,38 +875,42 @@ _mesa_make_extension_string(struct gl_context *ctx)
GLuint
_mesa_get_extension_count(struct gl_context *ctx)
{
- GLuint i;
+ GLboolean *base;
+ const struct extension *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 (ctx->Extensions.Count != 0)
+ return ctx->Extensions.Count;
+
+ base = (GLboolean *) &ctx->Extensions;
+ for (i = extension_table; i->name != 0; ++i) {
+ if (base[i->offset]) {
+ ctx->Extensions.Count++;
}
}
-
- if (0)
- _mesa_debug(ctx, "%u of %d extensions enabled\n", ctx->Extensions.Count,
- (int) Elements(default_extensions));
-
return ctx->Extensions.Count;
}
-
/**
* Return name of i-th enabled extension
*/
const GLubyte *
_mesa_get_enabled_extension(struct gl_context *ctx, GLuint index)
{
- GLuint i;
+ const GLboolean *base;
+ size_t n;
+ const struct extension *i;
+
+ if (index < 0)
+ return NULL;
- for (i = 0; i < Elements(default_extensions); i++) {
- if (extension_enabled(ctx, i)) {
- if (index == 0)
- return (const GLubyte *) default_extensions[i].name;
- index--;
+ base = (GLboolean*) &ctx->Extensions;
+ n = 0;
+ for (i = extension_table; i->name != 0; ++i) {
+ if (n == index && base[i->offset]) {
+ return (GLubyte*) i->name;
+ } else if (base[i->offset]) {
+ ++n;
}
}
diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c
index 975063d0d78..ffdd0842562 100644
--- a/src/mesa/main/fbobject.c
+++ b/src/mesa/main/fbobject.c
@@ -40,6 +40,8 @@
#include "framebuffer.h"
#include "hash.h"
#include "macros.h"
+#include "mfeatures.h"
+#include "mtypes.h"
#include "renderbuffer.h"
#include "state.h"
#include "teximage.h"
@@ -158,6 +160,29 @@ invalidate_framebuffer(struct gl_framebuffer *fb)
/**
+ * Return the gl_framebuffer object which corresponds to the given
+ * framebuffer target, such as GL_DRAW_FRAMEBUFFER.
+ * Check support for GL_EXT_framebuffer_blit to determine if certain
+ * targets are legal.
+ * \return gl_framebuffer pointer or NULL if target is illegal
+ */
+static struct gl_framebuffer *
+get_framebuffer_target(struct gl_context *ctx, GLenum target)
+{
+ switch (target) {
+ case GL_DRAW_FRAMEBUFFER:
+ return ctx->Extensions.EXT_framebuffer_blit ? ctx->DrawBuffer : NULL;
+ case GL_READ_FRAMEBUFFER:
+ return ctx->Extensions.EXT_framebuffer_blit ? ctx->ReadBuffer : NULL;
+ case GL_FRAMEBUFFER_EXT:
+ return ctx->DrawBuffer;
+ default:
+ return NULL;
+ }
+}
+
+
+/**
* Given a GL_*_ATTACHMENTn token, return a pointer to the corresponding
* gl_renderbuffer_attachment object.
* This function is only used for user-created FB objects, not the
@@ -359,6 +384,7 @@ _mesa_framebuffer_renderbuffer(struct gl_context *ctx,
assert(att);
_mesa_set_renderbuffer_attachment(ctx, att, rb);
}
+ rb->AttachedAnytime = GL_TRUE;
}
else {
_mesa_remove_attachment(ctx, att);
@@ -371,6 +397,37 @@ _mesa_framebuffer_renderbuffer(struct gl_context *ctx,
/**
+ * Fallback for ctx->Driver.ValidateFramebuffer()
+ * Check if the renderbuffer's formats are supported by the software
+ * renderer.
+ * Drivers should probably override this.
+ */
+void
+_mesa_validate_framebuffer(struct gl_context *ctx, struct gl_framebuffer *fb)
+{
+ gl_buffer_index buf;
+ for (buf = 0; buf < BUFFER_COUNT; buf++) {
+ const struct gl_renderbuffer *rb = fb->Attachment[buf].Renderbuffer;
+ if (rb) {
+ switch (rb->_BaseFormat) {
+ case GL_ALPHA:
+ case GL_LUMINANCE_ALPHA:
+ case GL_LUMINANCE:
+ case GL_INTENSITY:
+ case GL_RED:
+ case GL_RG:
+ fb->_Status = GL_FRAMEBUFFER_UNSUPPORTED;
+ return;
+ default:
+ /* render buffer format is supported by software rendering */
+ ;
+ }
+ }
+ }
+}
+
+
+/**
* For debug only.
*/
static void
@@ -402,8 +459,8 @@ fbo_incomplete(const char *msg, int index)
/**
* Is the given base format a legal format for a color renderbuffer?
*/
-static GLboolean
-is_legal_color_format(const struct gl_context *ctx, GLenum baseFormat)
+GLboolean
+_mesa_is_legal_color_format(const struct gl_context *ctx, GLenum baseFormat)
{
switch (baseFormat) {
case GL_RGB:
@@ -488,7 +545,7 @@ test_attachment_completeness(const struct gl_context *ctx, GLenum format,
baseFormat = _mesa_get_format_base_format(texImage->TexFormat);
if (format == GL_COLOR) {
- if (!is_legal_color_format(ctx, baseFormat)) {
+ if (!_mesa_is_legal_color_format(ctx, baseFormat)) {
att_incomplete("bad format");
att->Complete = GL_FALSE;
return;
@@ -542,8 +599,7 @@ test_attachment_completeness(const struct gl_context *ctx, GLenum format,
return;
}
if (format == GL_COLOR) {
- if (baseFormat != GL_RGB &&
- baseFormat != GL_RGBA) {
+ if (!_mesa_is_legal_color_format(ctx, baseFormat)) {
att_incomplete("bad renderbuffer color format");
att->Complete = GL_FALSE;
return;
@@ -620,7 +676,7 @@ _mesa_test_framebuffer_completeness(struct gl_context *ctx,
for (i = -2; i < (GLint) ctx->Const.MaxColorAttachments; i++) {
struct gl_renderbuffer_attachment *att;
GLenum f;
- gl_format mesaFormat;
+ gl_format attFormat;
/*
* XXX for ARB_fbo, only check color buffers that are named by
@@ -667,9 +723,9 @@ _mesa_test_framebuffer_completeness(struct gl_context *ctx,
minHeight = MIN2(minHeight, texImg->Height);
maxHeight = MAX2(maxHeight, texImg->Height);
f = texImg->_BaseFormat;
- mesaFormat = texImg->TexFormat;
+ attFormat = texImg->TexFormat;
numImages++;
- if (!is_legal_color_format(ctx, f) &&
+ if (!_mesa_is_legal_color_format(ctx, f) &&
!is_legal_depth_format(ctx, f)) {
fb->_Status = GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT;
fbo_incomplete("texture attachment incomplete", -1);
@@ -682,7 +738,7 @@ _mesa_test_framebuffer_completeness(struct gl_context *ctx,
minHeight = MIN2(minHeight, att->Renderbuffer->Height);
maxHeight = MAX2(minHeight, att->Renderbuffer->Height);
f = att->Renderbuffer->InternalFormat;
- mesaFormat = att->Renderbuffer->Format;
+ attFormat = att->Renderbuffer->Format;
numImages++;
}
else {
@@ -696,7 +752,7 @@ _mesa_test_framebuffer_completeness(struct gl_context *ctx,
}
/* check if integer color */
- fb->_IntegerColor = _mesa_is_format_integer_color(mesaFormat);
+ fb->_IntegerColor = _mesa_is_format_integer_color(attFormat);
/* Error-check width, height, format, samples
*/
@@ -793,7 +849,7 @@ _mesa_test_framebuffer_completeness(struct gl_context *ctx,
fb->Height = minHeight;
/* finally, update the visual info for the framebuffer */
- _mesa_update_framebuffer_visual(fb);
+ _mesa_update_framebuffer_visual(ctx, fb);
}
}
@@ -960,26 +1016,53 @@ _mesa_GenRenderbuffersEXT(GLsizei n, GLuint *renderbuffers)
/**
* Given an internal format token for a render buffer, return the
- * corresponding base format.
- * This is very similar to _mesa_base_tex_format() but the set of valid
- * internal formats is somewhat different.
+ * corresponding base format (one of GL_RGB, GL_RGBA, GL_STENCIL_INDEX,
+ * GL_DEPTH_COMPONENT, GL_DEPTH_STENCIL_EXT, GL_ALPHA, GL_LUMINANCE,
+ * GL_LUMINANCE_ALPHA, GL_INTENSITY, etc).
+ *
+ * This is similar to _mesa_base_tex_format() but the set of valid
+ * internal formats is different.
*
- * \return one of GL_RGB, GL_RGBA, GL_STENCIL_INDEX, GL_DEPTH_COMPONENT
- * GL_DEPTH_STENCIL_EXT or zero if error.
+ * Note that even if a format is determined to be legal here, validation
+ * of the FBO may fail if the format is not supported by the driver/GPU.
*
- * XXX in the future when we support red-only and red-green formats
- * we'll also return GL_RED and GL_RG.
+ * \param internalFormat as passed to glRenderbufferStorage()
+ * \return the base internal format, or 0 if internalFormat is illegal
*/
GLenum
_mesa_base_fbo_format(struct gl_context *ctx, GLenum internalFormat)
{
+ /*
+ * Notes: some formats such as alpha, luminance, etc. were added
+ * with GL_ARB_framebuffer_object.
+ */
switch (internalFormat) {
case GL_ALPHA:
case GL_ALPHA4:
case GL_ALPHA8:
case GL_ALPHA12:
case GL_ALPHA16:
- return GL_ALPHA;
+ return ctx->Extensions.ARB_framebuffer_object ? GL_ALPHA : 0;
+ case GL_LUMINANCE:
+ case GL_LUMINANCE4:
+ case GL_LUMINANCE8:
+ case GL_LUMINANCE12:
+ case GL_LUMINANCE16:
+ return ctx->Extensions.ARB_framebuffer_object ? GL_LUMINANCE : 0;
+ case GL_LUMINANCE_ALPHA:
+ case GL_LUMINANCE4_ALPHA4:
+ case GL_LUMINANCE6_ALPHA2:
+ case GL_LUMINANCE8_ALPHA8:
+ case GL_LUMINANCE12_ALPHA4:
+ case GL_LUMINANCE12_ALPHA12:
+ case GL_LUMINANCE16_ALPHA16:
+ return ctx->Extensions.ARB_framebuffer_object ? GL_LUMINANCE_ALPHA : 0;
+ case GL_INTENSITY:
+ case GL_INTENSITY4:
+ case GL_INTENSITY8:
+ case GL_INTENSITY12:
+ case GL_INTENSITY16:
+ return ctx->Extensions.ARB_framebuffer_object ? GL_INTENSITY : 0;
case GL_RGB:
case GL_R3_G3_B2:
case GL_RGB4:
@@ -988,6 +1071,7 @@ _mesa_base_fbo_format(struct gl_context *ctx, GLenum internalFormat)
case GL_RGB10:
case GL_RGB12:
case GL_RGB16:
+ case GL_SRGB8_EXT:
return GL_RGB;
case GL_RGBA:
case GL_RGBA2:
@@ -998,6 +1082,7 @@ _mesa_base_fbo_format(struct gl_context *ctx, GLenum internalFormat)
case GL_RGBA12:
case GL_RGBA16:
case GL_RGBA16_SNORM:
+ case GL_SRGB8_ALPHA8_EXT:
return GL_RGBA;
case GL_STENCIL_INDEX:
case GL_STENCIL_INDEX1_EXT:
@@ -1016,13 +1101,46 @@ _mesa_base_fbo_format(struct gl_context *ctx, GLenum internalFormat)
return GL_DEPTH_STENCIL_EXT;
else
return 0;
- /* XXX add floating point formats eventually */
+ case GL_RED:
+ case GL_R8:
+ case GL_R16:
+ return ctx->Extensions.ARB_texture_rg ? GL_RED : 0;
+ case GL_RG:
+ case GL_RG8:
+ case GL_RG16:
+ return ctx->Extensions.ARB_texture_rg ? GL_RG : 0;
+ /* XXX add floating point and integer formats eventually */
default:
return 0;
}
}
+/**
+ * Invalidate a renderbuffer attachment. Called from _mesa_HashWalk().
+ */
+static void
+invalidate_rb(GLuint key, void *data, void *userData)
+{
+ struct gl_framebuffer *fb = (struct gl_framebuffer *) data;
+ struct gl_renderbuffer *rb = (struct gl_renderbuffer *) userData;
+
+ /* If this is a user-created FBO */
+ if (fb->Name) {
+ GLuint i;
+ for (i = 0; i < BUFFER_COUNT; i++) {
+ struct gl_renderbuffer_attachment *att = fb->Attachment + i;
+ if (att->Type == GL_RENDERBUFFER &&
+ att->Renderbuffer == rb) {
+ /* Mark fb status as indeterminate to force re-validation */
+ fb->_Status = 0;
+ return;
+ }
+ }
+ }
+}
+
+
/** sentinal value, see below */
#define NO_SAMPLES 1000
@@ -1115,12 +1233,10 @@ renderbuffer_storage(GLenum target, GLenum internalFormat,
rb->NumSamples = 0;
}
- /*
- test_framebuffer_completeness(ctx, fb);
- */
- /* XXX if this renderbuffer is attached anywhere, invalidate attachment
- * points???
- */
+ /* Invalidate the framebuffers the renderbuffer is attached in. */
+ if (rb->AttachedAnytime) {
+ _mesa_HashWalk(ctx->Shared->FrameBuffers, invalidate_rb, rb);
+ }
}
@@ -1172,8 +1288,17 @@ get_component_bits(GLenum pname, GLenum baseFormat, gl_format format)
switch (pname) {
case GL_RENDERBUFFER_RED_SIZE_EXT:
case GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE:
+ if (baseFormat == GL_RGB || baseFormat == GL_RGBA ||
+ baseFormat == GL_RG || baseFormat == GL_RED)
+ return _mesa_get_format_bits(format, pname);
+ else
+ return 0;
case GL_RENDERBUFFER_GREEN_SIZE_EXT:
case GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE:
+ if (baseFormat == GL_RGB || baseFormat == GL_RGBA || baseFormat == GL_RG)
+ return _mesa_get_format_bits(format, pname);
+ else
+ return 0;
case GL_RENDERBUFFER_BLUE_SIZE_EXT:
case GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE:
if (baseFormat == GL_RGB || baseFormat == GL_RGBA)
@@ -1182,7 +1307,8 @@ get_component_bits(GLenum pname, GLenum baseFormat, gl_format format)
return 0;
case GL_RENDERBUFFER_ALPHA_SIZE_EXT:
case GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE:
- if (baseFormat == GL_RGBA || baseFormat == GL_ALPHA)
+ if (baseFormat == GL_RGBA || baseFormat == GL_ALPHA ||
+ baseFormat == GL_LUMINANCE_ALPHA)
return _mesa_get_format_bits(format, pname);
else
return 0;
@@ -1598,29 +1724,10 @@ _mesa_CheckFramebufferStatusEXT(GLenum target)
ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, 0);
- switch (target) {
-#if FEATURE_EXT_framebuffer_blit
- case GL_DRAW_FRAMEBUFFER_EXT:
- if (!ctx->Extensions.EXT_framebuffer_blit) {
- _mesa_error(ctx, GL_INVALID_ENUM, "glCheckFramebufferStatus(target)");
- return 0;
- }
- buffer = ctx->DrawBuffer;
- break;
- case GL_READ_FRAMEBUFFER_EXT:
- if (!ctx->Extensions.EXT_framebuffer_blit) {
- _mesa_error(ctx, GL_INVALID_ENUM, "glCheckFramebufferStatus(target)");
- return 0;
- }
- buffer = ctx->ReadBuffer;
- break;
-#endif
- case GL_FRAMEBUFFER_EXT:
- buffer = ctx->DrawBuffer;
- break;
- default:
+ buffer = get_framebuffer_target(ctx, target);
+ if (!buffer) {
_mesa_error(ctx, GL_INVALID_ENUM, "glCheckFramebufferStatus(target)");
- return 0; /* formerly GL_FRAMEBUFFER_STATUS_ERROR_EXT */
+ return 0;
}
if (buffer->Name == 0) {
@@ -1650,33 +1757,16 @@ framebuffer_texture(struct gl_context *ctx, const char *caller, GLenum target,
struct gl_renderbuffer_attachment *att;
struct gl_texture_object *texObj = NULL;
struct gl_framebuffer *fb;
- GLboolean error = GL_FALSE;
ASSERT_OUTSIDE_BEGIN_END(ctx);
- switch (target) {
- case GL_READ_FRAMEBUFFER_EXT:
- error = !ctx->Extensions.EXT_framebuffer_blit;
- fb = ctx->ReadBuffer;
- break;
- case GL_DRAW_FRAMEBUFFER_EXT:
- error = !ctx->Extensions.EXT_framebuffer_blit;
- /* fall-through */
- case GL_FRAMEBUFFER_EXT:
- fb = ctx->DrawBuffer;
- break;
- default:
- error = GL_TRUE;
- }
-
- if (error) {
+ fb = get_framebuffer_target(ctx, target);
+ if (!fb) {
_mesa_error(ctx, GL_INVALID_ENUM,
"glFramebufferTexture%sEXT(target=0x%x)", caller, target);
return;
}
- ASSERT(fb);
-
/* check framebuffer binding */
if (fb->Name == 0) {
_mesa_error(ctx, GL_INVALID_OPERATION,
@@ -1857,31 +1947,9 @@ _mesa_FramebufferRenderbufferEXT(GLenum target, GLenum attachment,
ASSERT_OUTSIDE_BEGIN_END(ctx);
- switch (target) {
-#if FEATURE_EXT_framebuffer_blit
- case GL_DRAW_FRAMEBUFFER_EXT:
- if (!ctx->Extensions.EXT_framebuffer_blit) {
- _mesa_error(ctx, GL_INVALID_ENUM,
- "glFramebufferRenderbufferEXT(target)");
- return;
- }
- fb = ctx->DrawBuffer;
- break;
- case GL_READ_FRAMEBUFFER_EXT:
- if (!ctx->Extensions.EXT_framebuffer_blit) {
- _mesa_error(ctx, GL_INVALID_ENUM,
- "glFramebufferRenderbufferEXT(target)");
- return;
- }
- fb = ctx->ReadBuffer;
- break;
-#endif
- case GL_FRAMEBUFFER_EXT:
- fb = ctx->DrawBuffer;
- break;
- default:
- _mesa_error(ctx, GL_INVALID_ENUM,
- "glFramebufferRenderbufferEXT(target)");
+ fb = get_framebuffer_target(ctx, target);
+ if (!fb) {
+ _mesa_error(ctx, GL_INVALID_ENUM, "glFramebufferRenderbufferEXT(target)");
return;
}
@@ -1913,6 +1981,13 @@ _mesa_FramebufferRenderbufferEXT(GLenum target, GLenum attachment,
" renderbuffer %u)", renderbuffer);
return;
}
+ else if (rb == &DummyRenderbuffer) {
+ /* This is what NVIDIA does */
+ _mesa_error(ctx, GL_INVALID_VALUE,
+ "glFramebufferRenderbufferEXT(renderbuffer %u)",
+ renderbuffer);
+ return;
+ }
}
else {
/* remove renderbuffer attachment */
@@ -1940,7 +2015,7 @@ _mesa_FramebufferRenderbufferEXT(GLenum target, GLenum attachment,
/* Some subsequent GL commands may depend on the framebuffer's visual
* after the binding is updated. Update visual info now.
*/
- _mesa_update_framebuffer_visual(fb);
+ _mesa_update_framebuffer_visual(ctx, fb);
}
@@ -1954,29 +2029,8 @@ _mesa_GetFramebufferAttachmentParameterivEXT(GLenum target, GLenum attachment,
ASSERT_OUTSIDE_BEGIN_END(ctx);
- switch (target) {
-#if FEATURE_EXT_framebuffer_blit
- case GL_DRAW_FRAMEBUFFER_EXT:
- if (!ctx->Extensions.EXT_framebuffer_blit) {
- _mesa_error(ctx, GL_INVALID_ENUM,
- "glGetFramebufferAttachmentParameterivEXT(target)");
- return;
- }
- buffer = ctx->DrawBuffer;
- break;
- case GL_READ_FRAMEBUFFER_EXT:
- if (!ctx->Extensions.EXT_framebuffer_blit) {
- _mesa_error(ctx, GL_INVALID_ENUM,
- "glGetFramebufferAttachmentParameterivEXT(target)");
- return;
- }
- buffer = ctx->ReadBuffer;
- break;
-#endif
- case GL_FRAMEBUFFER_EXT:
- buffer = ctx->DrawBuffer;
- break;
- default:
+ buffer = get_framebuffer_target(ctx, target);
+ if (!buffer) {
_mesa_error(ctx, GL_INVALID_ENUM,
"glGetFramebufferAttachmentParameterivEXT(target)");
return;
@@ -2071,7 +2125,14 @@ _mesa_GetFramebufferAttachmentParameterivEXT(GLenum target, GLenum attachment,
"glGetFramebufferAttachmentParameterivEXT(pname)");
}
else {
- *params = _mesa_get_format_color_encoding(att->Renderbuffer->Format);
+ if (ctx->Extensions.EXT_framebuffer_sRGB && ctx->Const.sRGBCapable) {
+ *params = _mesa_get_format_color_encoding(att->Renderbuffer->Format);
+ }
+ else {
+ /* According to ARB_framebuffer_sRGB, we should return LINEAR
+ * if the sRGB conversion is unsupported. */
+ *params = GL_LINEAR;
+ }
}
return;
case GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE:
@@ -2183,7 +2244,8 @@ _mesa_GenerateMipmapEXT(GLenum target)
#if FEATURE_EXT_framebuffer_blit
static const struct gl_renderbuffer_attachment *
-find_attachment(const struct gl_framebuffer *fb, const struct gl_renderbuffer *rb)
+find_attachment(const struct gl_framebuffer *fb,
+ const struct gl_renderbuffer *rb)
{
GLuint i;
for (i = 0; i < Elements(fb->Attachment); i++) {
@@ -2216,6 +2278,13 @@ _mesa_BlitFramebufferEXT(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1,
ASSERT_OUTSIDE_BEGIN_END(ctx);
FLUSH_VERTICES(ctx, _NEW_BUFFERS);
+ if (MESA_VERBOSE & VERBOSE_API)
+ _mesa_debug(ctx,
+ "glBlitFramebuffer(%d, %d, %d, %d, %d, %d, %d, %d, 0x%x, %s)\n",
+ srcX0, srcY0, srcX1, srcY1,
+ dstX0, dstY0, dstX1, dstY1,
+ mask, _mesa_lookup_enum_by_nr(filter));
+
if (ctx->NewState) {
_mesa_update_state(ctx);
}
diff --git a/src/mesa/main/fbobject.h b/src/mesa/main/fbobject.h
index 2aace2ebd4b..ba74a95b74c 100644
--- a/src/mesa/main/fbobject.h
+++ b/src/mesa/main/fbobject.h
@@ -69,8 +69,14 @@ _mesa_framebuffer_renderbuffer(struct gl_context *ctx, struct gl_framebuffer *fb
GLenum attachment, struct gl_renderbuffer *rb);
extern void
+_mesa_validate_framebuffer(struct gl_context *ctx, struct gl_framebuffer *fb);
+
+extern void
_mesa_test_framebuffer_completeness(struct gl_context *ctx, struct gl_framebuffer *fb);
+extern GLboolean
+_mesa_is_legal_color_format(const struct gl_context *ctx, GLenum baseFormat);
+
extern GLenum
_mesa_base_fbo_format(struct gl_context *ctx, GLenum internalFormat);
diff --git a/src/mesa/main/feedback.c b/src/mesa/main/feedback.c
index ffdecaecc29..fcb089f1f31 100644
--- a/src/mesa/main/feedback.c
+++ b/src/mesa/main/feedback.c
@@ -35,6 +35,7 @@
#include "enums.h"
#include "feedback.h"
#include "macros.h"
+#include "mfeatures.h"
#include "mtypes.h"
#include "main/dispatch.h"
diff --git a/src/mesa/main/feedback.h b/src/mesa/main/feedback.h
index f9fbbce70b9..0039a0b4cb0 100644
--- a/src/mesa/main/feedback.h
+++ b/src/mesa/main/feedback.h
@@ -27,6 +27,7 @@
#define FEEDBACK_H
+#include "main/mfeatures.h"
#include "main/mtypes.h"
diff --git a/src/mesa/main/texenvprogram.c b/src/mesa/main/ff_fragment_shader.cpp
index a8bffe416d9..9be531735ed 100644
--- a/src/mesa/main/texenvprogram.c
+++ b/src/mesa/main/ff_fragment_shader.cpp
@@ -26,8 +26,10 @@
*
**************************************************************************/
+extern "C" {
#include "glheader.h"
#include "imports.h"
+#include "mtypes.h"
#include "program/program.h"
#include "program/prog_parameter.h"
#include "program/prog_cache.h"
@@ -36,7 +38,7 @@
#include "program/prog_statevars.h"
#include "program/programopt.h"
#include "texenvprogram.h"
-
+}
/*
* Note on texture units:
@@ -523,7 +525,7 @@ struct ureg {
static const struct ureg undef = {
PROGRAM_UNDEFINED,
- ~0,
+ 255,
0,
0,
0
@@ -685,14 +687,15 @@ static struct ureg register_param5( struct texenv_fragment_program *p,
GLint s3,
GLint s4)
{
- gl_state_index tokens[STATE_LENGTH];
+ int tokens[STATE_LENGTH];
GLuint idx;
tokens[0] = s0;
tokens[1] = s1;
tokens[2] = s2;
tokens[3] = s3;
tokens[4] = s4;
- idx = _mesa_add_state_reference( p->program->Base.Parameters, tokens );
+ idx = _mesa_add_state_reference(p->program->Base.Parameters,
+ (gl_state_index *)tokens);
return make_ureg(PROGRAM_STATE_VAR, idx);
}
@@ -1466,7 +1469,7 @@ create_new_program(struct gl_context *ctx, struct state_key *key,
p.last_tex_stage = 0;
release_temps(ctx, &p);
- if (key->enabled_units) {
+ if (key->enabled_units && key->num_draw_buffers) {
GLboolean needbumpstage = GL_FALSE;
/* Zeroth pass - bump map textures first */
@@ -1559,7 +1562,7 @@ create_new_program(struct gl_context *ctx, struct state_key *key,
_mesa_copy_instructions(p.program->Base.Instructions, instBuffer,
p.program->Base.NumInstructions);
- if (p.program->FogOption) {
+ if (key->num_draw_buffers && p.program->FogOption) {
_mesa_append_fog_code(ctx, p.program);
p.program->FogOption = GL_NONE;
}
@@ -1585,6 +1588,7 @@ create_new_program(struct gl_context *ctx, struct state_key *key,
}
}
+extern "C" {
/**
* Return a fragment program which implements the current
@@ -1615,3 +1619,5 @@ _mesa_get_fixed_func_fragment_program(struct gl_context *ctx)
return prog;
}
+
+}
diff --git a/src/mesa/main/ffvertex_prog.c b/src/mesa/main/ffvertex_prog.c
index 0f2c313c819..b8e49a3757f 100644
--- a/src/mesa/main/ffvertex_prog.c
+++ b/src/mesa/main/ffvertex_prog.c
@@ -36,6 +36,7 @@
#include "main/glheader.h"
#include "main/mtypes.h"
#include "main/macros.h"
+#include "main/mfeatures.h"
#include "main/enums.h"
#include "main/ffvertex_prog.h"
#include "program/program.h"
diff --git a/src/mesa/main/formats.c b/src/mesa/main/formats.c
index cd9eb81852f..db10c9b4c2e 100644
--- a/src/mesa/main/formats.c
+++ b/src/mesa/main/formats.c
@@ -40,9 +40,10 @@ struct gl_format_info
const char *StrName;
/**
- * Base format is one of GL_RGB, GL_RGBA, GL_ALPHA, GL_LUMINANCE,
- * GL_LUMINANCE_ALPHA, GL_INTENSITY, GL_YCBCR_MESA, GL_COLOR_INDEX,
- * GL_DEPTH_COMPONENT, GL_STENCIL_INDEX, GL_DEPTH_STENCIL.
+ * Base format is one of GL_RED, GL_RG, GL_RGB, GL_RGBA, GL_ALPHA,
+ * GL_LUMINANCE, GL_LUMINANCE_ALPHA, GL_INTENSITY, GL_YCBCR_MESA,
+ * GL_COLOR_INDEX, GL_DEPTH_COMPONENT, GL_STENCIL_INDEX,
+ * GL_DEPTH_STENCIL, GL_DUDV_ATI.
*/
GLenum BaseFormat;
@@ -222,6 +223,15 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] =
1, 1, 2 /* BlockWidth/Height,Bytes */
},
{
+ MESA_FORMAT_AL44, /* Name */
+ "MESA_FORMAT_AL44", /* StrName */
+ GL_LUMINANCE_ALPHA, /* BaseFormat */
+ GL_UNSIGNED_NORMALIZED, /* DataType */
+ 0, 0, 0, 4, /* Red/Green/Blue/AlphaBits */
+ 4, 0, 0, 0, 0, /* Lum/Int/Index/Depth/StencilBits */
+ 1, 1, 1 /* BlockWidth/Height,Bytes */
+ },
+ {
MESA_FORMAT_AL88, /* Name */
"MESA_FORMAT_AL88", /* StrName */
GL_LUMINANCE_ALPHA, /* BaseFormat */
@@ -276,6 +286,15 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] =
1, 1, 1 /* BlockWidth/Height,Bytes */
},
{
+ MESA_FORMAT_A16, /* Name */
+ "MESA_FORMAT_A16", /* StrName */
+ GL_ALPHA, /* BaseFormat */
+ GL_UNSIGNED_NORMALIZED, /* DataType */
+ 0, 0, 0, 16, /* Red/Green/Blue/AlphaBits */
+ 0, 0, 0, 0, 0, /* Lum/Int/Index/Depth/StencilBits */
+ 1, 1, 2 /* BlockWidth/Height,Bytes */
+ },
+ {
MESA_FORMAT_L8, /* Name */
"MESA_FORMAT_L8", /* StrName */
GL_LUMINANCE, /* BaseFormat */
@@ -285,6 +304,15 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] =
1, 1, 1 /* BlockWidth/Height,Bytes */
},
{
+ MESA_FORMAT_L16, /* Name */
+ "MESA_FORMAT_L16", /* StrName */
+ GL_LUMINANCE, /* BaseFormat */
+ GL_UNSIGNED_NORMALIZED, /* DataType */
+ 0, 0, 0, 0, /* Red/Green/Blue/AlphaBits */
+ 16, 0, 0, 0, 0, /* Lum/Int/Index/Depth/StencilBits */
+ 1, 1, 2 /* BlockWidth/Height,Bytes */
+ },
+ {
MESA_FORMAT_I8, /* Name */
"MESA_FORMAT_I8", /* StrName */
GL_INTENSITY, /* BaseFormat */
@@ -294,6 +322,15 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] =
1, 1, 1 /* BlockWidth/Height,Bytes */
},
{
+ MESA_FORMAT_I16, /* Name */
+ "MESA_FORMAT_I16", /* StrName */
+ GL_INTENSITY, /* BaseFormat */
+ GL_UNSIGNED_NORMALIZED, /* DataType */
+ 0, 0, 0, 0, /* Red/Green/Blue/AlphaBits */
+ 0, 16, 0, 0, 0, /* Lum/Int/Index/Depth/StencilBits */
+ 1, 1, 2 /* BlockWidth/Height,Bytes */
+ },
+ {
MESA_FORMAT_CI8, /* Name */
"MESA_FORMAT_CI8", /* StrName */
GL_COLOR_INDEX, /* BaseFormat */
@@ -375,6 +412,15 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] =
1, 1, 4
},
{
+ MESA_FORMAT_ARGB2101010,
+ "MESA_FORMAT_ARGB2101010",
+ GL_RGBA,
+ GL_UNSIGNED_NORMALIZED,
+ 10, 10, 10, 2,
+ 0, 0, 0, 0, 0,
+ 1, 1, 4
+ },
+ {
MESA_FORMAT_Z24_S8, /* Name */
"MESA_FORMAT_Z24_S8", /* StrName */
GL_DEPTH_STENCIL, /* BaseFormat */
@@ -756,7 +802,7 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] =
{
MESA_FORMAT_SIGNED_R8, /* Name */
"MESA_FORMAT_SIGNED_R8", /* StrName */
- GL_RGBA, /* BaseFormat */
+ GL_RED, /* BaseFormat */
GL_SIGNED_NORMALIZED, /* DataType */
8, 0, 0, 0, /* Red/Green/Blue/AlphaBits */
0, 0, 0, 0, 0, /* Lum/Int/Index/Depth/StencilBits */
@@ -765,7 +811,7 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] =
{
MESA_FORMAT_SIGNED_RG88,
"MESA_FORMAT_SIGNED_RG88",
- GL_RGBA,
+ GL_RG,
GL_SIGNED_NORMALIZED,
8, 8, 0, 0,
0, 0, 0, 0, 0,
@@ -774,7 +820,7 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] =
{
MESA_FORMAT_SIGNED_RGBX8888,
"MESA_FORMAT_SIGNED_RGBX8888",
- GL_RGBA,
+ GL_RGB,
GL_SIGNED_NORMALIZED,
8, 8, 8, 0,
0, 0, 0, 0, 0,
@@ -803,7 +849,7 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] =
{
MESA_FORMAT_SIGNED_R_16,
"MESA_FORMAT_SIGNED_R_16",
- GL_RGBA,
+ GL_RED,
GL_SIGNED_NORMALIZED,
16, 0, 0, 0,
0, 0, 0, 0, 0,
@@ -812,7 +858,7 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] =
{
MESA_FORMAT_SIGNED_RG_16,
"MESA_FORMAT_SIGNED_RG_16",
- GL_RGBA,
+ GL_RG,
GL_SIGNED_NORMALIZED,
16, 16, 0, 0,
0, 0, 0, 0, 0,
@@ -821,7 +867,7 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] =
{
MESA_FORMAT_SIGNED_RGB_16,
"MESA_FORMAT_SIGNED_RGB_16",
- GL_RGBA,
+ GL_RGB,
GL_SIGNED_NORMALIZED,
16, 16, 16, 0,
0, 0, 0, 0, 0,
@@ -844,7 +890,79 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] =
16, 16, 16, 16,
0, 0, 0, 0, 0,
1, 1, 8
- }
+ },
+ {
+ MESA_FORMAT_RED_RGTC1,
+ "MESA_FORMAT_RED_RGTC1",
+ GL_RED,
+ GL_UNSIGNED_NORMALIZED,
+ 4, 0, 0, 0,
+ 0, 0, 0, 0, 0,
+ 4, 4, 8 /* 8 bytes per 4x4 block */
+ },
+ {
+ MESA_FORMAT_SIGNED_RED_RGTC1,
+ "MESA_FORMAT_SIGNED_RED_RGTC1",
+ GL_RED,
+ GL_SIGNED_NORMALIZED,
+ 4, 0, 0, 0,
+ 0, 0, 0, 0, 0,
+ 4, 4, 8 /* 8 bytes per 4x4 block */
+ },
+ {
+ MESA_FORMAT_RG_RGTC2,
+ "MESA_FORMAT_RG_RGTC2",
+ GL_RG,
+ GL_UNSIGNED_NORMALIZED,
+ 4, 4, 0, 0,
+ 0, 0, 0, 0, 0,
+ 4, 4, 16 /* 16 bytes per 4x4 block */
+ },
+ {
+ MESA_FORMAT_SIGNED_RG_RGTC2,
+ "MESA_FORMAT_SIGNED_RG_RGTC2",
+ GL_RG,
+ GL_SIGNED_NORMALIZED,
+ 4, 4, 0, 0,
+ 0, 0, 0, 0, 0,
+ 4, 4, 16 /* 16 bytes per 4x4 block */
+ },
+ {
+ MESA_FORMAT_L_LATC1,
+ "MESA_FORMAT_L_LATC1",
+ GL_LUMINANCE,
+ GL_UNSIGNED_NORMALIZED,
+ 0, 0, 0, 0,
+ 4, 0, 0, 0, 0,
+ 4, 4, 8 /* 8 bytes per 4x4 block */
+ },
+ {
+ MESA_FORMAT_SIGNED_L_LATC1,
+ "MESA_FORMAT_SIGNED_L_LATC1",
+ GL_LUMINANCE,
+ GL_SIGNED_NORMALIZED,
+ 0, 0, 0, 0,
+ 4, 0, 0, 0, 0,
+ 4, 4, 8 /* 8 bytes per 4x4 block */
+ },
+ {
+ MESA_FORMAT_LA_LATC2,
+ "MESA_FORMAT_LA_LATC2",
+ GL_LUMINANCE_ALPHA,
+ GL_UNSIGNED_NORMALIZED,
+ 0, 0, 0, 4,
+ 4, 0, 0, 0, 0,
+ 4, 4, 16 /* 16 bytes per 4x4 block */
+ },
+ {
+ MESA_FORMAT_SIGNED_LA_LATC2,
+ "MESA_FORMAT_SIGNED_LA_LATC2",
+ GL_LUMINANCE_ALPHA,
+ GL_SIGNED_NORMALIZED,
+ 0, 0, 0, 4,
+ 4, 0, 0, 0, 0,
+ 4, 4, 16 /* 16 bytes per 4x4 block */
+ },
};
@@ -863,7 +981,6 @@ const char *
_mesa_get_format_name(gl_format format)
{
const struct gl_format_info *info = _mesa_get_format_info(format);
- ASSERT(info->BytesPerBlock);
return info->StrName;
}
@@ -1047,6 +1164,48 @@ _mesa_get_format_color_encoding(gl_format format)
/**
+ * For an sRGB format, return the corresponding linear color space format.
+ * For non-sRGB formats, return the format as-is.
+ */
+gl_format
+_mesa_get_srgb_format_linear(gl_format format)
+{
+ switch (format) {
+ case MESA_FORMAT_SRGB8:
+ format = MESA_FORMAT_RGB888;
+ break;
+ case MESA_FORMAT_SRGBA8:
+ format = MESA_FORMAT_RGBA8888;
+ break;
+ case MESA_FORMAT_SARGB8:
+ format = MESA_FORMAT_ARGB8888;
+ break;
+ case MESA_FORMAT_SL8:
+ format = MESA_FORMAT_L8;
+ break;
+ case MESA_FORMAT_SLA8:
+ format = MESA_FORMAT_AL88;
+ break;
+ case MESA_FORMAT_SRGB_DXT1:
+ format = MESA_FORMAT_RGB_DXT1;
+ break;
+ case MESA_FORMAT_SRGBA_DXT1:
+ format = MESA_FORMAT_RGBA_DXT1;
+ break;
+ case MESA_FORMAT_SRGBA_DXT3:
+ format = MESA_FORMAT_RGBA_DXT3;
+ break;
+ case MESA_FORMAT_SRGBA_DXT5:
+ format = MESA_FORMAT_RGBA_DXT5;
+ break;
+ default:
+ break;
+ }
+ return format;
+}
+
+
+/**
* Return number of bytes needed to store an image of the given size
* in the given format.
*/
@@ -1123,6 +1282,27 @@ _mesa_format_row_stride(gl_format format, GLsizei width)
}
+/**
+ * Debug/test: check that all formats are handled in the
+ * _mesa_format_to_type_and_comps() function. When new pixel formats
+ * are added to Mesa, that function needs to be updated.
+ * This is a no-op after the first call.
+ */
+static void
+check_format_to_type_and_comps(void)
+{
+ gl_format f;
+
+ for (f = MESA_FORMAT_NONE + 1; f < MESA_FORMAT_COUNT; f++) {
+ GLenum datatype = 0;
+ GLuint comps = 0;
+ /* This function will emit a problem/warning if the format is
+ * not handled.
+ */
+ _mesa_format_to_type_and_comps(f, &datatype, &comps);
+ }
+}
+
/**
* Do sanity checking of the format info table.
@@ -1147,7 +1327,7 @@ _mesa_test_formats(void)
if (info->RedBits > 0) {
GLuint t = info->RedBits + info->GreenBits
+ info->BlueBits + info->AlphaBits;
- assert(t / 8 == info->BytesPerBlock);
+ assert(t / 8 <= info->BytesPerBlock);
(void) t;
}
}
@@ -1155,6 +1335,7 @@ _mesa_test_formats(void)
assert(info->DataType == GL_UNSIGNED_NORMALIZED ||
info->DataType == GL_SIGNED_NORMALIZED ||
info->DataType == GL_UNSIGNED_INT ||
+ info->DataType == GL_INT ||
info->DataType == GL_FLOAT);
if (info->BaseFormat == GL_RGB) {
@@ -1205,8 +1386,9 @@ _mesa_test_formats(void)
assert(info->LuminanceBits == 0);
assert(info->IntensityBits > 0);
}
-
}
+
+ check_format_to_type_and_comps();
}
@@ -1252,11 +1434,21 @@ _mesa_format_to_type_and_comps(gl_format format,
*comps = 4;
return;
+ case MESA_FORMAT_ARGB2101010:
+ *datatype = GL_UNSIGNED_INT_2_10_10_10_REV;
+ *comps = 4;
+ return;
+
case MESA_FORMAT_RGBA5551:
*datatype = GL_UNSIGNED_SHORT_5_5_5_1;
*comps = 4;
return;
+ case MESA_FORMAT_AL44:
+ *datatype = MESA_UNSIGNED_BYTE_4_4;
+ *comps = 2;
+ return;
+
case MESA_FORMAT_AL88:
case MESA_FORMAT_AL88_REV:
case MESA_FORMAT_RG88:
@@ -1274,6 +1466,9 @@ _mesa_format_to_type_and_comps(gl_format format,
return;
case MESA_FORMAT_R16:
+ case MESA_FORMAT_A16:
+ case MESA_FORMAT_L16:
+ case MESA_FORMAT_I16:
*datatype = GL_UNSIGNED_SHORT;
*comps = 1;
return;
@@ -1407,6 +1602,14 @@ _mesa_format_to_type_and_comps(gl_format format,
case MESA_FORMAT_SRGBA_DXT5:
#endif
#endif
+ case MESA_FORMAT_RED_RGTC1:
+ case MESA_FORMAT_SIGNED_RED_RGTC1:
+ case MESA_FORMAT_RG_RGTC2:
+ case MESA_FORMAT_SIGNED_RG_RGTC2:
+ case MESA_FORMAT_L_LATC1:
+ case MESA_FORMAT_SIGNED_L_LATC1:
+ case MESA_FORMAT_LA_LATC2:
+ case MESA_FORMAT_SIGNED_LA_LATC2:
/* XXX generate error instead? */
*datatype = GL_UNSIGNED_BYTE;
*comps = 0;
@@ -1478,10 +1681,13 @@ _mesa_format_to_type_and_comps(gl_format format,
*comps = 4;
return;
- case MESA_FORMAT_NONE:
case MESA_FORMAT_COUNT:
+ assert(0);
+ return;
+
+ case MESA_FORMAT_NONE:
/* For debug builds, warn if any formats are not handled */
-#ifndef DEBUG
+#ifdef DEBUG
default:
#endif
_mesa_problem(NULL, "bad format %s in _mesa_format_to_type_and_comps",
diff --git a/src/mesa/main/formats.h b/src/mesa/main/formats.h
index 997229bf9f4..04a18930b4e 100644
--- a/src/mesa/main/formats.h
+++ b/src/mesa/main/formats.h
@@ -35,6 +35,9 @@
#include <GL/gl.h>
+/* OpenGL doesn't have GL_UNSIGNED_BYTE_4_4, so we must define our own type
+ * for GL_LUMINANCE4_ALPHA4. */
+#define MESA_UNSIGNED_BYTE_4_4 (GL_UNSIGNED_BYTE<<1)
/**
@@ -65,14 +68,18 @@ typedef enum
MESA_FORMAT_RGBA5551, /* RRRR RGGG GGBB BBBA */
MESA_FORMAT_ARGB1555, /* ARRR RRGG GGGB BBBB */
MESA_FORMAT_ARGB1555_REV, /* GGGB BBBB ARRR RRGG */
+ MESA_FORMAT_AL44, /* AAAA LLLL */
MESA_FORMAT_AL88, /* AAAA AAAA LLLL LLLL */
MESA_FORMAT_AL88_REV, /* LLLL LLLL AAAA AAAA */
MESA_FORMAT_AL1616, /* AAAA AAAA AAAA AAAA LLLL LLLL LLLL LLLL */
MESA_FORMAT_AL1616_REV, /* LLLL LLLL LLLL LLLL AAAA AAAA AAAA AAAA */
MESA_FORMAT_RGB332, /* RRRG GGBB */
MESA_FORMAT_A8, /* AAAA AAAA */
+ MESA_FORMAT_A16, /* AAAA AAAA AAAA AAAA */
MESA_FORMAT_L8, /* LLLL LLLL */
+ MESA_FORMAT_L16, /* LLLL LLLL LLLL LLLL */
MESA_FORMAT_I8, /* IIII IIII */
+ MESA_FORMAT_I16, /* IIII IIII IIII IIII */
MESA_FORMAT_CI8, /* CCCC CCCC */
MESA_FORMAT_YCBCR, /* YYYY YYYY UorV UorV */
MESA_FORMAT_YCBCR_REV, /* UorV UorV YYYY YYYY */
@@ -82,6 +89,7 @@ typedef enum
MESA_FORMAT_R16, /* RRRR RRRR RRRR RRRR */
MESA_FORMAT_RG1616, /* RRRR RRRR RRRR RRRR GGGG GGGG GGGG GGGG */
MESA_FORMAT_RG1616_REV, /* GGGG GGGG GGGG GGGG RRRR RRRR RRRR RRRR */
+ MESA_FORMAT_ARGB2101010, /* AARR RRRR RRRR GGGG GGGG GGBB BBBB BBBB */
MESA_FORMAT_Z24_S8, /* ZZZZ ZZZZ ZZZZ ZZZZ ZZZZ ZZZZ SSSS SSSS */
MESA_FORMAT_S8_Z24, /* SSSS SSSS ZZZZ ZZZZ ZZZZ ZZZZ ZZZZ ZZZZ */
MESA_FORMAT_Z16, /* ZZZZ ZZZZ ZZZZ ZZZZ */
@@ -171,6 +179,20 @@ typedef enum
MESA_FORMAT_RGBA_16, /* ... */
/*@}*/
+ /*@{*/
+ MESA_FORMAT_RED_RGTC1,
+ MESA_FORMAT_SIGNED_RED_RGTC1,
+ MESA_FORMAT_RG_RGTC2,
+ MESA_FORMAT_SIGNED_RG_RGTC2,
+ /*@}*/
+
+ /*@{*/
+ MESA_FORMAT_L_LATC1,
+ MESA_FORMAT_SIGNED_L_LATC1,
+ MESA_FORMAT_LA_LATC2,
+ MESA_FORMAT_SIGNED_LA_LATC2,
+ /*@}*/
+
MESA_FORMAT_COUNT
} gl_format;
@@ -223,4 +245,7 @@ _mesa_format_to_type_and_comps(gl_format format,
extern void
_mesa_test_formats(void);
+extern gl_format
+_mesa_get_srgb_format_linear(gl_format format);
+
#endif /* FORMATS_H */
diff --git a/src/mesa/main/framebuffer.c b/src/mesa/main/framebuffer.c
index 5530c51c892..430e013d017 100644
--- a/src/mesa/main/framebuffer.c
+++ b/src/mesa/main/framebuffer.c
@@ -522,7 +522,8 @@ _mesa_update_draw_buffer_bounds(struct gl_context *ctx)
* integer Z values.
*/
void
-_mesa_update_framebuffer_visual(struct gl_framebuffer *fb)
+_mesa_update_framebuffer_visual(struct gl_context *ctx,
+ struct gl_framebuffer *fb)
{
GLuint i;
@@ -542,9 +543,8 @@ _mesa_update_framebuffer_visual(struct gl_framebuffer *fb)
const struct gl_renderbuffer *rb = fb->Attachment[i].Renderbuffer;
const GLenum baseFormat = _mesa_get_format_base_format(rb->Format);
const gl_format fmt = rb->Format;
-
- if (baseFormat == GL_RGBA || baseFormat == GL_RGB ||
- baseFormat == GL_ALPHA) {
+
+ if (_mesa_is_legal_color_format(ctx, baseFormat)) {
fb->Visual.redBits = _mesa_get_format_bits(fmt, GL_RED_BITS);
fb->Visual.greenBits = _mesa_get_format_bits(fmt, GL_GREEN_BITS);
fb->Visual.blueBits = _mesa_get_format_bits(fmt, GL_BLUE_BITS);
@@ -553,6 +553,8 @@ _mesa_update_framebuffer_visual(struct gl_framebuffer *fb)
+ fb->Visual.greenBits + fb->Visual.blueBits;
fb->Visual.floatMode = GL_FALSE;
fb->Visual.samples = rb->NumSamples;
+ if (_mesa_get_format_color_encoding(fmt) == GL_SRGB)
+ fb->Visual.sRGBCapable = ctx->Const.sRGBCapable;
break;
}
}
@@ -792,9 +794,6 @@ update_framebuffer(struct gl_context *ctx, struct gl_framebuffer *fb)
_mesa_drawbuffers(ctx, ctx->Const.MaxDrawBuffers,
ctx->Color.DrawBuffer, NULL);
}
- if (fb->ColorReadBuffer != ctx->Pixel.ReadBuffer) {
-
- }
}
else {
/* This is a user-created framebuffer.
@@ -890,6 +889,8 @@ _mesa_source_buffer_exists(struct gl_context *ctx, GLenum format)
}
ASSERT(_mesa_get_format_bits(ctx->ReadBuffer->_ColorReadBuffer->Format, GL_RED_BITS) > 0 ||
_mesa_get_format_bits(ctx->ReadBuffer->_ColorReadBuffer->Format, GL_ALPHA_BITS) > 0 ||
+ _mesa_get_format_bits(ctx->ReadBuffer->_ColorReadBuffer->Format, GL_TEXTURE_LUMINANCE_SIZE) > 0 ||
+ _mesa_get_format_bits(ctx->ReadBuffer->_ColorReadBuffer->Format, GL_TEXTURE_INTENSITY_SIZE) > 0 ||
_mesa_get_format_bits(ctx->ReadBuffer->_ColorReadBuffer->Format, GL_INDEX_BITS) > 0);
break;
case GL_DEPTH:
diff --git a/src/mesa/main/framebuffer.h b/src/mesa/main/framebuffer.h
index 20e3ff56b55..c3bd638c9de 100644
--- a/src/mesa/main/framebuffer.h
+++ b/src/mesa/main/framebuffer.h
@@ -70,7 +70,8 @@ extern void
_mesa_update_draw_buffer_bounds(struct gl_context *ctx);
extern void
-_mesa_update_framebuffer_visual(struct gl_framebuffer *fb);
+_mesa_update_framebuffer_visual(struct gl_context *ctx,
+ struct gl_framebuffer *fb);
extern void
_mesa_update_depth_buffer(struct gl_context *ctx, struct gl_framebuffer *fb,
diff --git a/src/mesa/main/get.c b/src/mesa/main/get.c
index 5ae35b868e3..7d1a5cf6002 100644
--- a/src/mesa/main/get.c
+++ b/src/mesa/main/get.c
@@ -29,6 +29,7 @@
#include "extensions.h"
#include "get.h"
#include "macros.h"
+#include "mfeatures.h"
#include "mtypes.h"
#include "state.h"
#include "texcompress.h"
@@ -272,6 +273,7 @@ static const int extra_EXT_gpu_shader4[] = {
};
+EXTRA_EXT(ARB_ES2_compatibility);
EXTRA_EXT(ARB_multitexture);
EXTRA_EXT(ARB_texture_cube_map);
EXTRA_EXT(MESA_texture_array);
@@ -288,7 +290,6 @@ EXTRA_EXT(NV_fragment_program);
EXTRA_EXT(NV_texture_rectangle);
EXTRA_EXT(EXT_stencil_two_side);
EXTRA_EXT(NV_light_max_exponent);
-EXTRA_EXT(SGI_texture_color_table);
EXTRA_EXT(EXT_depth_bounds_test);
EXTRA_EXT(ARB_depth_clamp);
EXTRA_EXT(ATI_fragment_shader);
@@ -315,6 +316,7 @@ EXTRA_EXT2(ARB_vertex_program, ARB_fragment_program);
EXTRA_EXT(ARB_vertex_buffer_object);
EXTRA_EXT(ARB_geometry_shader4);
EXTRA_EXT(ARB_copy_buffer);
+EXTRA_EXT(EXT_framebuffer_sRGB);
static const int
extra_ARB_vertex_program_ARB_fragment_program_NV_vertex_program[] = {
@@ -370,7 +372,7 @@ static const struct value_desc values[] = {
API_OPENGL_BIT | API_OPENGLES_BIT | API_OPENGLES2_BIT, NO_EXTRA},
{ GL_ALPHA_BITS, BUFFER_INT(Visual.alphaBits), extra_new_buffers },
{ GL_BLEND, CONTEXT_BIT0(Color.BlendEnabled), NO_EXTRA },
- { GL_BLEND_SRC, CONTEXT_ENUM(Color.BlendSrcRGB), NO_EXTRA },
+ { GL_BLEND_SRC, CONTEXT_ENUM(Color.Blend[0].SrcRGB), NO_EXTRA },
{ GL_BLUE_BITS, BUFFER_INT(Visual.blueBits), extra_new_buffers },
{ GL_COLOR_CLEAR_VALUE, CONTEXT_FIELD(Color.ClearColor[0], TYPE_FLOATN_4), NO_EXTRA },
{ GL_COLOR_WRITEMASK, LOC_CUSTOM, TYPE_INT_4, 0, NO_EXTRA },
@@ -433,15 +435,15 @@ static const struct value_desc values[] = {
extra_ARB_texture_cube_map }, /* XXX: OES_texture_cube_map */
/* XXX: OES_blend_subtract */
- { GL_BLEND_SRC_RGB_EXT, CONTEXT_ENUM(Color.BlendSrcRGB), NO_EXTRA },
- { GL_BLEND_DST_RGB_EXT, CONTEXT_ENUM(Color.BlendDstRGB), NO_EXTRA },
- { GL_BLEND_SRC_ALPHA_EXT, CONTEXT_ENUM(Color.BlendSrcA), NO_EXTRA },
- { GL_BLEND_DST_ALPHA_EXT, CONTEXT_ENUM(Color.BlendDstA), NO_EXTRA },
+ { GL_BLEND_SRC_RGB_EXT, CONTEXT_ENUM(Color.Blend[0].SrcRGB), NO_EXTRA },
+ { GL_BLEND_DST_RGB_EXT, CONTEXT_ENUM(Color.Blend[0].DstRGB), NO_EXTRA },
+ { GL_BLEND_SRC_ALPHA_EXT, CONTEXT_ENUM(Color.Blend[0].SrcA), NO_EXTRA },
+ { GL_BLEND_DST_ALPHA_EXT, CONTEXT_ENUM(Color.Blend[0].DstA), NO_EXTRA },
/* GL_BLEND_EQUATION_RGB, which is what we're really after, is
* defined identically to GL_BLEND_EQUATION. */
- { GL_BLEND_EQUATION, CONTEXT_ENUM(Color.BlendEquationRGB), NO_EXTRA },
- { GL_BLEND_EQUATION_ALPHA_EXT, CONTEXT_ENUM(Color.BlendEquationA), NO_EXTRA },
+ { GL_BLEND_EQUATION, CONTEXT_ENUM(Color.Blend[0].EquationRGB), NO_EXTRA },
+ { GL_BLEND_EQUATION_ALPHA_EXT, CONTEXT_ENUM(Color.Blend[0].EquationA), NO_EXTRA },
/* GL_ARB_texture_compression */
{ GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB, LOC_CUSTOM, TYPE_INT, 0, NO_EXTRA },
@@ -510,7 +512,7 @@ static const struct value_desc values[] = {
{ GL_ALPHA_TEST, CONTEXT_BOOL(Color.AlphaEnabled), NO_EXTRA },
{ GL_ALPHA_TEST_FUNC, CONTEXT_ENUM(Color.AlphaFunc), NO_EXTRA },
{ GL_ALPHA_TEST_REF, CONTEXT_FIELD(Color.AlphaRef, TYPE_FLOATN), NO_EXTRA },
- { GL_BLEND_DST, CONTEXT_ENUM(Color.BlendDstRGB), NO_EXTRA },
+ { GL_BLEND_DST, CONTEXT_ENUM(Color.Blend[0].DstRGB), NO_EXTRA },
{ GL_CLIP_PLANE0, CONTEXT_BIT0(Transform.ClipPlanesEnabled), NO_EXTRA },
{ GL_CLIP_PLANE1, CONTEXT_BIT1(Transform.ClipPlanesEnabled), NO_EXTRA },
{ GL_CLIP_PLANE2, CONTEXT_BIT2(Transform.ClipPlanesEnabled), NO_EXTRA },
@@ -586,6 +588,15 @@ static const struct value_desc values[] = {
{ GL_TEXTURE_COORD_ARRAY_STRIDE,
LOC_CUSTOM, TYPE_BOOLEAN, offsetof(struct gl_client_array, Stride), NO_EXTRA },
+ /* GL_ARB_ES2_compatibility */
+ { GL_SHADER_COMPILER, CONST(1), extra_ARB_ES2_compatibility },
+ { GL_MAX_VARYING_VECTORS, CONTEXT_INT(Const.MaxVarying),
+ extra_ARB_ES2_compatibility },
+ { GL_MAX_VERTEX_UNIFORM_VECTORS, LOC_CUSTOM, TYPE_INT, 0,
+ extra_ARB_ES2_compatibility },
+ { GL_MAX_FRAGMENT_UNIFORM_VECTORS, LOC_CUSTOM, TYPE_INT, 0,
+ extra_ARB_ES2_compatibility },
+
/* GL_ARB_multitexture */
{ GL_MAX_TEXTURE_UNITS_ARB,
CONTEXT_INT(Const.MaxTextureUnits), extra_ARB_multitexture },
@@ -899,11 +910,6 @@ static const struct value_desc values[] = {
CONTEXT_MATRIX_T(ProjectionMatrixStack.Top), NO_EXTRA },
{ GL_TRANSPOSE_TEXTURE_MATRIX_ARB, CONTEXT_MATRIX_T(TextureMatrixStack), NO_EXTRA },
- /* GL_SGI_texture_color_table */
- { GL_TEXTURE_COLOR_TABLE_SGI, LOC_TEXUNIT, TYPE_BOOLEAN,
- offsetof(struct gl_texture_unit, ColorTableEnabled),
- extra_SGI_texture_color_table },
-
/* GL_EXT_secondary_color */
{ GL_COLOR_SUM_EXT, CONTEXT_BOOL(Fog.ColorSumEnabled),
extra_EXT_secondary_color_ARB_vertex_program },
@@ -1195,22 +1201,22 @@ static const struct value_desc values[] = {
/* GL_ARB_geometry_shader4 */
{ GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_ARB,
- CONTEXT_INT(Const.GeometryProgram.MaxGeometryTextureImageUnits),
+ CONTEXT_INT(Const.MaxGeometryTextureImageUnits),
extra_ARB_geometry_shader4 },
{ GL_MAX_GEOMETRY_OUTPUT_VERTICES_ARB,
- CONTEXT_INT(Const.GeometryProgram.MaxGeometryOutputVertices),
+ CONTEXT_INT(Const.MaxGeometryOutputVertices),
extra_ARB_geometry_shader4 },
{ GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_ARB,
- CONTEXT_INT(Const.GeometryProgram.MaxGeometryTotalOutputComponents),
+ CONTEXT_INT(Const.MaxGeometryTotalOutputComponents),
extra_ARB_geometry_shader4 },
{ GL_MAX_GEOMETRY_UNIFORM_COMPONENTS_ARB,
- CONTEXT_INT(Const.GeometryProgram.MaxGeometryUniformComponents),
+ CONTEXT_INT(Const.GeometryProgram.MaxUniformComponents),
extra_ARB_geometry_shader4 },
{ GL_MAX_GEOMETRY_VARYING_COMPONENTS_ARB,
- CONTEXT_INT(Const.GeometryProgram.MaxGeometryVaryingComponents),
+ CONTEXT_INT(Const.MaxGeometryVaryingComponents),
extra_ARB_geometry_shader4 },
{ GL_MAX_VERTEX_VARYING_COMPONENTS_ARB,
- CONTEXT_INT(Const.GeometryProgram.MaxVertexVaryingComponents),
+ CONTEXT_INT(Const.MaxVertexVaryingComponents),
extra_ARB_geometry_shader4 },
/* GL_EXT_gpu_shader4 / GL 3.0 */
@@ -1227,6 +1233,10 @@ static const struct value_desc values[] = {
{ GL_MINOR_VERSION, CONTEXT_INT(VersionMinor), extra_version_30 },
{ GL_CONTEXT_FLAGS, CONTEXT_INT(Const.ContextFlags), extra_version_30 },
+ /* GL3.0 / GL_EXT_framebuffer_sRGB */
+ { GL_FRAMEBUFFER_SRGB_EXT, CONTEXT_BOOL(Color.sRGBEnabled), extra_EXT_framebuffer_sRGB },
+ { GL_FRAMEBUFFER_SRGB_CAPABLE_EXT, BUFFER_INT(Visual.sRGBCapable), extra_EXT_framebuffer_sRGB },
+
/* GL 3.1 */
/* NOTE: different enum values for GL_PRIMITIVE_RESTART_NV
* vs. GL_PRIMITIVE_RESTART!
@@ -2260,6 +2270,53 @@ find_value_indexed(const char *func, GLenum pname, int index, union value *v)
v->value_int = (ctx->Color.BlendEnabled >> index) & 1;
return TYPE_INT;
+ case GL_BLEND_SRC:
+ /* fall-through */
+ case GL_BLEND_SRC_RGB:
+ if (index >= ctx->Const.MaxDrawBuffers)
+ goto invalid_value;
+ if (!ctx->Extensions.ARB_draw_buffers_blend)
+ goto invalid_enum;
+ v->value_int = ctx->Color.Blend[index].SrcRGB;
+ return TYPE_INT;
+ case GL_BLEND_SRC_ALPHA:
+ if (index >= ctx->Const.MaxDrawBuffers)
+ goto invalid_value;
+ if (!ctx->Extensions.ARB_draw_buffers_blend)
+ goto invalid_enum;
+ v->value_int = ctx->Color.Blend[index].SrcA;
+ return TYPE_INT;
+ case GL_BLEND_DST:
+ /* fall-through */
+ case GL_BLEND_DST_RGB:
+ if (index >= ctx->Const.MaxDrawBuffers)
+ goto invalid_value;
+ if (!ctx->Extensions.ARB_draw_buffers_blend)
+ goto invalid_enum;
+ v->value_int = ctx->Color.Blend[index].DstRGB;
+ return TYPE_INT;
+ case GL_BLEND_DST_ALPHA:
+ if (index >= ctx->Const.MaxDrawBuffers)
+ goto invalid_value;
+ if (!ctx->Extensions.ARB_draw_buffers_blend)
+ goto invalid_enum;
+ v->value_int = ctx->Color.Blend[index].DstA;
+ return TYPE_INT;
+ case GL_BLEND_EQUATION_RGB:
+ if (index >= ctx->Const.MaxDrawBuffers)
+ goto invalid_value;
+ if (!ctx->Extensions.ARB_draw_buffers_blend)
+ goto invalid_enum;
+ v->value_int = ctx->Color.Blend[index].EquationRGB;
+ return TYPE_INT;
+ case GL_BLEND_EQUATION_ALPHA:
+ if (index >= ctx->Const.MaxDrawBuffers)
+ goto invalid_value;
+ if (!ctx->Extensions.ARB_draw_buffers_blend)
+ goto invalid_enum;
+ v->value_int = ctx->Color.Blend[index].EquationA;
+ return TYPE_INT;
+
case GL_COLOR_WRITEMASK:
if (index >= ctx->Const.MaxDrawBuffers)
goto invalid_value;
@@ -2310,8 +2367,10 @@ void GLAPIENTRY
_mesa_GetBooleanIndexedv( GLenum pname, GLuint index, GLboolean *params )
{
union value v;
+ enum value_type type =
+ find_value_indexed("glGetBooleanIndexedv", pname, index, &v);
- switch (find_value_indexed("glGetBooleanIndexedv", pname, index, &v)) {
+ switch (type) {
case TYPE_INT:
params[0] = INT_TO_BOOLEAN(v.value_int);
break;
@@ -2325,7 +2384,7 @@ _mesa_GetBooleanIndexedv( GLenum pname, GLuint index, GLboolean *params )
params[0] = INT64_TO_BOOLEAN(v.value_int);
break;
default:
- assert(0);
+ ; /* nothing - GL error was recorded */
}
}
@@ -2333,8 +2392,10 @@ void GLAPIENTRY
_mesa_GetIntegerIndexedv( GLenum pname, GLuint index, GLint *params )
{
union value v;
+ enum value_type type =
+ find_value_indexed("glGetIntegerIndexedv", pname, index, &v);
- switch (find_value_indexed("glGetIntegerIndexedv", pname, index, &v)) {
+ switch (type) {
case TYPE_INT:
params[0] = v.value_int;
break;
@@ -2348,7 +2409,7 @@ _mesa_GetIntegerIndexedv( GLenum pname, GLuint index, GLint *params )
params[0] = INT64_TO_INT(v.value_int);
break;
default:
- assert(0);
+ ; /* nothing - GL error was recorded */
}
}
@@ -2357,8 +2418,10 @@ void GLAPIENTRY
_mesa_GetInteger64Indexedv( GLenum pname, GLuint index, GLint64 *params )
{
union value v;
+ enum value_type type =
+ find_value_indexed("glGetIntegerIndexedv", pname, index, &v);
- switch (find_value_indexed("glGetIntegerIndexedv", pname, index, &v)) {
+ switch (type) {
case TYPE_INT:
params[0] = v.value_int;
break;
@@ -2372,7 +2435,7 @@ _mesa_GetInteger64Indexedv( GLenum pname, GLuint index, GLint64 *params )
params[0] = v.value_int;
break;
default:
- assert(0);
+ ; /* nothing - GL error was recorded */
}
}
#endif /* FEATURE_ARB_sync */
diff --git a/src/mesa/main/getstring.c b/src/mesa/main/getstring.c
index bfa283f6a30..f8866f68581 100644
--- a/src/mesa/main/getstring.c
+++ b/src/mesa/main/getstring.c
@@ -29,6 +29,8 @@
#include "get.h"
#include "enums.h"
#include "extensions.h"
+#include "mfeatures.h"
+#include "mtypes.h"
/**
diff --git a/src/mesa/main/glapidispatch.h b/src/mesa/main/glapidispatch.h
index 87784269c5c..cbfe6400e42 100644
--- a/src/mesa/main/glapidispatch.h
+++ b/src/mesa/main/glapidispatch.h
@@ -59,7 +59,7 @@
} while(0)
/* total number of offsets below */
-#define _gloffset_COUNT 881
+#define _gloffset_COUNT 892
#define _gloffset_NewList 0
#define _gloffset_EndList 1
@@ -642,313 +642,324 @@
#define _gloffset_FramebufferTextureARB 575
#define _gloffset_FramebufferTextureFaceARB 576
#define _gloffset_ProgramParameteriARB 577
-#define _gloffset_FlushMappedBufferRange 578
-#define _gloffset_MapBufferRange 579
-#define _gloffset_BindVertexArray 580
-#define _gloffset_GenVertexArrays 581
-#define _gloffset_CopyBufferSubData 582
-#define _gloffset_ClientWaitSync 583
-#define _gloffset_DeleteSync 584
-#define _gloffset_FenceSync 585
-#define _gloffset_GetInteger64v 586
-#define _gloffset_GetSynciv 587
-#define _gloffset_IsSync 588
-#define _gloffset_WaitSync 589
-#define _gloffset_DrawElementsBaseVertex 590
-#define _gloffset_DrawRangeElementsBaseVertex 591
-#define _gloffset_MultiDrawElementsBaseVertex 592
-#define _gloffset_BindTransformFeedback 593
-#define _gloffset_DeleteTransformFeedbacks 594
-#define _gloffset_DrawTransformFeedback 595
-#define _gloffset_GenTransformFeedbacks 596
-#define _gloffset_IsTransformFeedback 597
-#define _gloffset_PauseTransformFeedback 598
-#define _gloffset_ResumeTransformFeedback 599
-#define _gloffset_PolygonOffsetEXT 600
-#define _gloffset_GetPixelTexGenParameterfvSGIS 601
-#define _gloffset_GetPixelTexGenParameterivSGIS 602
-#define _gloffset_PixelTexGenParameterfSGIS 603
-#define _gloffset_PixelTexGenParameterfvSGIS 604
-#define _gloffset_PixelTexGenParameteriSGIS 605
-#define _gloffset_PixelTexGenParameterivSGIS 606
-#define _gloffset_SampleMaskSGIS 607
-#define _gloffset_SamplePatternSGIS 608
-#define _gloffset_ColorPointerEXT 609
-#define _gloffset_EdgeFlagPointerEXT 610
-#define _gloffset_IndexPointerEXT 611
-#define _gloffset_NormalPointerEXT 612
-#define _gloffset_TexCoordPointerEXT 613
-#define _gloffset_VertexPointerEXT 614
-#define _gloffset_PointParameterfEXT 615
-#define _gloffset_PointParameterfvEXT 616
-#define _gloffset_LockArraysEXT 617
-#define _gloffset_UnlockArraysEXT 618
-#define _gloffset_SecondaryColor3bEXT 619
-#define _gloffset_SecondaryColor3bvEXT 620
-#define _gloffset_SecondaryColor3dEXT 621
-#define _gloffset_SecondaryColor3dvEXT 622
-#define _gloffset_SecondaryColor3fEXT 623
-#define _gloffset_SecondaryColor3fvEXT 624
-#define _gloffset_SecondaryColor3iEXT 625
-#define _gloffset_SecondaryColor3ivEXT 626
-#define _gloffset_SecondaryColor3sEXT 627
-#define _gloffset_SecondaryColor3svEXT 628
-#define _gloffset_SecondaryColor3ubEXT 629
-#define _gloffset_SecondaryColor3ubvEXT 630
-#define _gloffset_SecondaryColor3uiEXT 631
-#define _gloffset_SecondaryColor3uivEXT 632
-#define _gloffset_SecondaryColor3usEXT 633
-#define _gloffset_SecondaryColor3usvEXT 634
-#define _gloffset_SecondaryColorPointerEXT 635
-#define _gloffset_MultiDrawArraysEXT 636
-#define _gloffset_MultiDrawElementsEXT 637
-#define _gloffset_FogCoordPointerEXT 638
-#define _gloffset_FogCoorddEXT 639
-#define _gloffset_FogCoorddvEXT 640
-#define _gloffset_FogCoordfEXT 641
-#define _gloffset_FogCoordfvEXT 642
-#define _gloffset_PixelTexGenSGIX 643
-#define _gloffset_BlendFuncSeparateEXT 644
-#define _gloffset_FlushVertexArrayRangeNV 645
-#define _gloffset_VertexArrayRangeNV 646
-#define _gloffset_CombinerInputNV 647
-#define _gloffset_CombinerOutputNV 648
-#define _gloffset_CombinerParameterfNV 649
-#define _gloffset_CombinerParameterfvNV 650
-#define _gloffset_CombinerParameteriNV 651
-#define _gloffset_CombinerParameterivNV 652
-#define _gloffset_FinalCombinerInputNV 653
-#define _gloffset_GetCombinerInputParameterfvNV 654
-#define _gloffset_GetCombinerInputParameterivNV 655
-#define _gloffset_GetCombinerOutputParameterfvNV 656
-#define _gloffset_GetCombinerOutputParameterivNV 657
-#define _gloffset_GetFinalCombinerInputParameterfvNV 658
-#define _gloffset_GetFinalCombinerInputParameterivNV 659
-#define _gloffset_ResizeBuffersMESA 660
-#define _gloffset_WindowPos2dMESA 661
-#define _gloffset_WindowPos2dvMESA 662
-#define _gloffset_WindowPos2fMESA 663
-#define _gloffset_WindowPos2fvMESA 664
-#define _gloffset_WindowPos2iMESA 665
-#define _gloffset_WindowPos2ivMESA 666
-#define _gloffset_WindowPos2sMESA 667
-#define _gloffset_WindowPos2svMESA 668
-#define _gloffset_WindowPos3dMESA 669
-#define _gloffset_WindowPos3dvMESA 670
-#define _gloffset_WindowPos3fMESA 671
-#define _gloffset_WindowPos3fvMESA 672
-#define _gloffset_WindowPos3iMESA 673
-#define _gloffset_WindowPos3ivMESA 674
-#define _gloffset_WindowPos3sMESA 675
-#define _gloffset_WindowPos3svMESA 676
-#define _gloffset_WindowPos4dMESA 677
-#define _gloffset_WindowPos4dvMESA 678
-#define _gloffset_WindowPos4fMESA 679
-#define _gloffset_WindowPos4fvMESA 680
-#define _gloffset_WindowPos4iMESA 681
-#define _gloffset_WindowPos4ivMESA 682
-#define _gloffset_WindowPos4sMESA 683
-#define _gloffset_WindowPos4svMESA 684
-#define _gloffset_MultiModeDrawArraysIBM 685
-#define _gloffset_MultiModeDrawElementsIBM 686
-#define _gloffset_DeleteFencesNV 687
-#define _gloffset_FinishFenceNV 688
-#define _gloffset_GenFencesNV 689
-#define _gloffset_GetFenceivNV 690
-#define _gloffset_IsFenceNV 691
-#define _gloffset_SetFenceNV 692
-#define _gloffset_TestFenceNV 693
-#define _gloffset_AreProgramsResidentNV 694
-#define _gloffset_BindProgramNV 695
-#define _gloffset_DeleteProgramsNV 696
-#define _gloffset_ExecuteProgramNV 697
-#define _gloffset_GenProgramsNV 698
-#define _gloffset_GetProgramParameterdvNV 699
-#define _gloffset_GetProgramParameterfvNV 700
-#define _gloffset_GetProgramStringNV 701
-#define _gloffset_GetProgramivNV 702
-#define _gloffset_GetTrackMatrixivNV 703
-#define _gloffset_GetVertexAttribPointervNV 704
-#define _gloffset_GetVertexAttribdvNV 705
-#define _gloffset_GetVertexAttribfvNV 706
-#define _gloffset_GetVertexAttribivNV 707
-#define _gloffset_IsProgramNV 708
-#define _gloffset_LoadProgramNV 709
-#define _gloffset_ProgramParameters4dvNV 710
-#define _gloffset_ProgramParameters4fvNV 711
-#define _gloffset_RequestResidentProgramsNV 712
-#define _gloffset_TrackMatrixNV 713
-#define _gloffset_VertexAttrib1dNV 714
-#define _gloffset_VertexAttrib1dvNV 715
-#define _gloffset_VertexAttrib1fNV 716
-#define _gloffset_VertexAttrib1fvNV 717
-#define _gloffset_VertexAttrib1sNV 718
-#define _gloffset_VertexAttrib1svNV 719
-#define _gloffset_VertexAttrib2dNV 720
-#define _gloffset_VertexAttrib2dvNV 721
-#define _gloffset_VertexAttrib2fNV 722
-#define _gloffset_VertexAttrib2fvNV 723
-#define _gloffset_VertexAttrib2sNV 724
-#define _gloffset_VertexAttrib2svNV 725
-#define _gloffset_VertexAttrib3dNV 726
-#define _gloffset_VertexAttrib3dvNV 727
-#define _gloffset_VertexAttrib3fNV 728
-#define _gloffset_VertexAttrib3fvNV 729
-#define _gloffset_VertexAttrib3sNV 730
-#define _gloffset_VertexAttrib3svNV 731
-#define _gloffset_VertexAttrib4dNV 732
-#define _gloffset_VertexAttrib4dvNV 733
-#define _gloffset_VertexAttrib4fNV 734
-#define _gloffset_VertexAttrib4fvNV 735
-#define _gloffset_VertexAttrib4sNV 736
-#define _gloffset_VertexAttrib4svNV 737
-#define _gloffset_VertexAttrib4ubNV 738
-#define _gloffset_VertexAttrib4ubvNV 739
-#define _gloffset_VertexAttribPointerNV 740
-#define _gloffset_VertexAttribs1dvNV 741
-#define _gloffset_VertexAttribs1fvNV 742
-#define _gloffset_VertexAttribs1svNV 743
-#define _gloffset_VertexAttribs2dvNV 744
-#define _gloffset_VertexAttribs2fvNV 745
-#define _gloffset_VertexAttribs2svNV 746
-#define _gloffset_VertexAttribs3dvNV 747
-#define _gloffset_VertexAttribs3fvNV 748
-#define _gloffset_VertexAttribs3svNV 749
-#define _gloffset_VertexAttribs4dvNV 750
-#define _gloffset_VertexAttribs4fvNV 751
-#define _gloffset_VertexAttribs4svNV 752
-#define _gloffset_VertexAttribs4ubvNV 753
-#define _gloffset_GetTexBumpParameterfvATI 754
-#define _gloffset_GetTexBumpParameterivATI 755
-#define _gloffset_TexBumpParameterfvATI 756
-#define _gloffset_TexBumpParameterivATI 757
-#define _gloffset_AlphaFragmentOp1ATI 758
-#define _gloffset_AlphaFragmentOp2ATI 759
-#define _gloffset_AlphaFragmentOp3ATI 760
-#define _gloffset_BeginFragmentShaderATI 761
-#define _gloffset_BindFragmentShaderATI 762
-#define _gloffset_ColorFragmentOp1ATI 763
-#define _gloffset_ColorFragmentOp2ATI 764
-#define _gloffset_ColorFragmentOp3ATI 765
-#define _gloffset_DeleteFragmentShaderATI 766
-#define _gloffset_EndFragmentShaderATI 767
-#define _gloffset_GenFragmentShadersATI 768
-#define _gloffset_PassTexCoordATI 769
-#define _gloffset_SampleMapATI 770
-#define _gloffset_SetFragmentShaderConstantATI 771
-#define _gloffset_PointParameteriNV 772
-#define _gloffset_PointParameterivNV 773
-#define _gloffset_ActiveStencilFaceEXT 774
-#define _gloffset_BindVertexArrayAPPLE 775
-#define _gloffset_DeleteVertexArraysAPPLE 776
-#define _gloffset_GenVertexArraysAPPLE 777
-#define _gloffset_IsVertexArrayAPPLE 778
-#define _gloffset_GetProgramNamedParameterdvNV 779
-#define _gloffset_GetProgramNamedParameterfvNV 780
-#define _gloffset_ProgramNamedParameter4dNV 781
-#define _gloffset_ProgramNamedParameter4dvNV 782
-#define _gloffset_ProgramNamedParameter4fNV 783
-#define _gloffset_ProgramNamedParameter4fvNV 784
-#define _gloffset_PrimitiveRestartIndexNV 785
-#define _gloffset_PrimitiveRestartNV 786
-#define _gloffset_DepthBoundsEXT 787
-#define _gloffset_BlendEquationSeparateEXT 788
-#define _gloffset_BindFramebufferEXT 789
-#define _gloffset_BindRenderbufferEXT 790
-#define _gloffset_CheckFramebufferStatusEXT 791
-#define _gloffset_DeleteFramebuffersEXT 792
-#define _gloffset_DeleteRenderbuffersEXT 793
-#define _gloffset_FramebufferRenderbufferEXT 794
-#define _gloffset_FramebufferTexture1DEXT 795
-#define _gloffset_FramebufferTexture2DEXT 796
-#define _gloffset_FramebufferTexture3DEXT 797
-#define _gloffset_GenFramebuffersEXT 798
-#define _gloffset_GenRenderbuffersEXT 799
-#define _gloffset_GenerateMipmapEXT 800
-#define _gloffset_GetFramebufferAttachmentParameterivEXT 801
-#define _gloffset_GetRenderbufferParameterivEXT 802
-#define _gloffset_IsFramebufferEXT 803
-#define _gloffset_IsRenderbufferEXT 804
-#define _gloffset_RenderbufferStorageEXT 805
-#define _gloffset_BlitFramebufferEXT 806
-#define _gloffset_BufferParameteriAPPLE 807
-#define _gloffset_FlushMappedBufferRangeAPPLE 808
-#define _gloffset_BindFragDataLocationEXT 809
-#define _gloffset_GetFragDataLocationEXT 810
-#define _gloffset_GetUniformuivEXT 811
-#define _gloffset_GetVertexAttribIivEXT 812
-#define _gloffset_GetVertexAttribIuivEXT 813
-#define _gloffset_Uniform1uiEXT 814
-#define _gloffset_Uniform1uivEXT 815
-#define _gloffset_Uniform2uiEXT 816
-#define _gloffset_Uniform2uivEXT 817
-#define _gloffset_Uniform3uiEXT 818
-#define _gloffset_Uniform3uivEXT 819
-#define _gloffset_Uniform4uiEXT 820
-#define _gloffset_Uniform4uivEXT 821
-#define _gloffset_VertexAttribI1iEXT 822
-#define _gloffset_VertexAttribI1ivEXT 823
-#define _gloffset_VertexAttribI1uiEXT 824
-#define _gloffset_VertexAttribI1uivEXT 825
-#define _gloffset_VertexAttribI2iEXT 826
-#define _gloffset_VertexAttribI2ivEXT 827
-#define _gloffset_VertexAttribI2uiEXT 828
-#define _gloffset_VertexAttribI2uivEXT 829
-#define _gloffset_VertexAttribI3iEXT 830
-#define _gloffset_VertexAttribI3ivEXT 831
-#define _gloffset_VertexAttribI3uiEXT 832
-#define _gloffset_VertexAttribI3uivEXT 833
-#define _gloffset_VertexAttribI4bvEXT 834
-#define _gloffset_VertexAttribI4iEXT 835
-#define _gloffset_VertexAttribI4ivEXT 836
-#define _gloffset_VertexAttribI4svEXT 837
-#define _gloffset_VertexAttribI4ubvEXT 838
-#define _gloffset_VertexAttribI4uiEXT 839
-#define _gloffset_VertexAttribI4uivEXT 840
-#define _gloffset_VertexAttribI4usvEXT 841
-#define _gloffset_VertexAttribIPointerEXT 842
-#define _gloffset_FramebufferTextureLayerEXT 843
-#define _gloffset_ColorMaskIndexedEXT 844
-#define _gloffset_DisableIndexedEXT 845
-#define _gloffset_EnableIndexedEXT 846
-#define _gloffset_GetBooleanIndexedvEXT 847
-#define _gloffset_GetIntegerIndexedvEXT 848
-#define _gloffset_IsEnabledIndexedEXT 849
-#define _gloffset_ClearColorIiEXT 850
-#define _gloffset_ClearColorIuiEXT 851
-#define _gloffset_GetTexParameterIivEXT 852
-#define _gloffset_GetTexParameterIuivEXT 853
-#define _gloffset_TexParameterIivEXT 854
-#define _gloffset_TexParameterIuivEXT 855
-#define _gloffset_BeginConditionalRenderNV 856
-#define _gloffset_EndConditionalRenderNV 857
-#define _gloffset_BeginTransformFeedbackEXT 858
-#define _gloffset_BindBufferBaseEXT 859
-#define _gloffset_BindBufferOffsetEXT 860
-#define _gloffset_BindBufferRangeEXT 861
-#define _gloffset_EndTransformFeedbackEXT 862
-#define _gloffset_GetTransformFeedbackVaryingEXT 863
-#define _gloffset_TransformFeedbackVaryingsEXT 864
-#define _gloffset_ProvokingVertexEXT 865
-#define _gloffset_GetTexParameterPointervAPPLE 866
-#define _gloffset_TextureRangeAPPLE 867
-#define _gloffset_GetObjectParameterivAPPLE 868
-#define _gloffset_ObjectPurgeableAPPLE 869
-#define _gloffset_ObjectUnpurgeableAPPLE 870
-#define _gloffset_ActiveProgramEXT 871
-#define _gloffset_CreateShaderProgramEXT 872
-#define _gloffset_UseShaderProgramEXT 873
-#define _gloffset_StencilFuncSeparateATI 874
-#define _gloffset_ProgramEnvParameters4fvEXT 875
-#define _gloffset_ProgramLocalParameters4fvEXT 876
-#define _gloffset_GetQueryObjecti64vEXT 877
-#define _gloffset_GetQueryObjectui64vEXT 878
-#define _gloffset_EGLImageTargetRenderbufferStorageOES 879
-#define _gloffset_EGLImageTargetTexture2DOES 880
+#define _gloffset_VertexAttribDivisorARB 578
+#define _gloffset_FlushMappedBufferRange 579
+#define _gloffset_MapBufferRange 580
+#define _gloffset_BindVertexArray 581
+#define _gloffset_GenVertexArrays 582
+#define _gloffset_CopyBufferSubData 583
+#define _gloffset_ClientWaitSync 584
+#define _gloffset_DeleteSync 585
+#define _gloffset_FenceSync 586
+#define _gloffset_GetInteger64v 587
+#define _gloffset_GetSynciv 588
+#define _gloffset_IsSync 589
+#define _gloffset_WaitSync 590
+#define _gloffset_DrawElementsBaseVertex 591
+#define _gloffset_DrawRangeElementsBaseVertex 592
+#define _gloffset_MultiDrawElementsBaseVertex 593
+#define _gloffset_BlendEquationSeparateiARB 594
+#define _gloffset_BlendEquationiARB 595
+#define _gloffset_BlendFuncSeparateiARB 596
+#define _gloffset_BlendFunciARB 597
+#define _gloffset_BindTransformFeedback 598
+#define _gloffset_DeleteTransformFeedbacks 599
+#define _gloffset_DrawTransformFeedback 600
+#define _gloffset_GenTransformFeedbacks 601
+#define _gloffset_IsTransformFeedback 602
+#define _gloffset_PauseTransformFeedback 603
+#define _gloffset_ResumeTransformFeedback 604
+#define _gloffset_ClearDepthf 605
+#define _gloffset_DepthRangef 606
+#define _gloffset_GetShaderPrecisionFormat 607
+#define _gloffset_ReleaseShaderCompiler 608
+#define _gloffset_ShaderBinary 609
+#define _gloffset_PolygonOffsetEXT 610
+#define _gloffset_GetPixelTexGenParameterfvSGIS 611
+#define _gloffset_GetPixelTexGenParameterivSGIS 612
+#define _gloffset_PixelTexGenParameterfSGIS 613
+#define _gloffset_PixelTexGenParameterfvSGIS 614
+#define _gloffset_PixelTexGenParameteriSGIS 615
+#define _gloffset_PixelTexGenParameterivSGIS 616
+#define _gloffset_SampleMaskSGIS 617
+#define _gloffset_SamplePatternSGIS 618
+#define _gloffset_ColorPointerEXT 619
+#define _gloffset_EdgeFlagPointerEXT 620
+#define _gloffset_IndexPointerEXT 621
+#define _gloffset_NormalPointerEXT 622
+#define _gloffset_TexCoordPointerEXT 623
+#define _gloffset_VertexPointerEXT 624
+#define _gloffset_PointParameterfEXT 625
+#define _gloffset_PointParameterfvEXT 626
+#define _gloffset_LockArraysEXT 627
+#define _gloffset_UnlockArraysEXT 628
+#define _gloffset_SecondaryColor3bEXT 629
+#define _gloffset_SecondaryColor3bvEXT 630
+#define _gloffset_SecondaryColor3dEXT 631
+#define _gloffset_SecondaryColor3dvEXT 632
+#define _gloffset_SecondaryColor3fEXT 633
+#define _gloffset_SecondaryColor3fvEXT 634
+#define _gloffset_SecondaryColor3iEXT 635
+#define _gloffset_SecondaryColor3ivEXT 636
+#define _gloffset_SecondaryColor3sEXT 637
+#define _gloffset_SecondaryColor3svEXT 638
+#define _gloffset_SecondaryColor3ubEXT 639
+#define _gloffset_SecondaryColor3ubvEXT 640
+#define _gloffset_SecondaryColor3uiEXT 641
+#define _gloffset_SecondaryColor3uivEXT 642
+#define _gloffset_SecondaryColor3usEXT 643
+#define _gloffset_SecondaryColor3usvEXT 644
+#define _gloffset_SecondaryColorPointerEXT 645
+#define _gloffset_MultiDrawArraysEXT 646
+#define _gloffset_MultiDrawElementsEXT 647
+#define _gloffset_FogCoordPointerEXT 648
+#define _gloffset_FogCoorddEXT 649
+#define _gloffset_FogCoorddvEXT 650
+#define _gloffset_FogCoordfEXT 651
+#define _gloffset_FogCoordfvEXT 652
+#define _gloffset_PixelTexGenSGIX 653
+#define _gloffset_BlendFuncSeparateEXT 654
+#define _gloffset_FlushVertexArrayRangeNV 655
+#define _gloffset_VertexArrayRangeNV 656
+#define _gloffset_CombinerInputNV 657
+#define _gloffset_CombinerOutputNV 658
+#define _gloffset_CombinerParameterfNV 659
+#define _gloffset_CombinerParameterfvNV 660
+#define _gloffset_CombinerParameteriNV 661
+#define _gloffset_CombinerParameterivNV 662
+#define _gloffset_FinalCombinerInputNV 663
+#define _gloffset_GetCombinerInputParameterfvNV 664
+#define _gloffset_GetCombinerInputParameterivNV 665
+#define _gloffset_GetCombinerOutputParameterfvNV 666
+#define _gloffset_GetCombinerOutputParameterivNV 667
+#define _gloffset_GetFinalCombinerInputParameterfvNV 668
+#define _gloffset_GetFinalCombinerInputParameterivNV 669
+#define _gloffset_ResizeBuffersMESA 670
+#define _gloffset_WindowPos2dMESA 671
+#define _gloffset_WindowPos2dvMESA 672
+#define _gloffset_WindowPos2fMESA 673
+#define _gloffset_WindowPos2fvMESA 674
+#define _gloffset_WindowPos2iMESA 675
+#define _gloffset_WindowPos2ivMESA 676
+#define _gloffset_WindowPos2sMESA 677
+#define _gloffset_WindowPos2svMESA 678
+#define _gloffset_WindowPos3dMESA 679
+#define _gloffset_WindowPos3dvMESA 680
+#define _gloffset_WindowPos3fMESA 681
+#define _gloffset_WindowPos3fvMESA 682
+#define _gloffset_WindowPos3iMESA 683
+#define _gloffset_WindowPos3ivMESA 684
+#define _gloffset_WindowPos3sMESA 685
+#define _gloffset_WindowPos3svMESA 686
+#define _gloffset_WindowPos4dMESA 687
+#define _gloffset_WindowPos4dvMESA 688
+#define _gloffset_WindowPos4fMESA 689
+#define _gloffset_WindowPos4fvMESA 690
+#define _gloffset_WindowPos4iMESA 691
+#define _gloffset_WindowPos4ivMESA 692
+#define _gloffset_WindowPos4sMESA 693
+#define _gloffset_WindowPos4svMESA 694
+#define _gloffset_MultiModeDrawArraysIBM 695
+#define _gloffset_MultiModeDrawElementsIBM 696
+#define _gloffset_DeleteFencesNV 697
+#define _gloffset_FinishFenceNV 698
+#define _gloffset_GenFencesNV 699
+#define _gloffset_GetFenceivNV 700
+#define _gloffset_IsFenceNV 701
+#define _gloffset_SetFenceNV 702
+#define _gloffset_TestFenceNV 703
+#define _gloffset_AreProgramsResidentNV 704
+#define _gloffset_BindProgramNV 705
+#define _gloffset_DeleteProgramsNV 706
+#define _gloffset_ExecuteProgramNV 707
+#define _gloffset_GenProgramsNV 708
+#define _gloffset_GetProgramParameterdvNV 709
+#define _gloffset_GetProgramParameterfvNV 710
+#define _gloffset_GetProgramStringNV 711
+#define _gloffset_GetProgramivNV 712
+#define _gloffset_GetTrackMatrixivNV 713
+#define _gloffset_GetVertexAttribPointervNV 714
+#define _gloffset_GetVertexAttribdvNV 715
+#define _gloffset_GetVertexAttribfvNV 716
+#define _gloffset_GetVertexAttribivNV 717
+#define _gloffset_IsProgramNV 718
+#define _gloffset_LoadProgramNV 719
+#define _gloffset_ProgramParameters4dvNV 720
+#define _gloffset_ProgramParameters4fvNV 721
+#define _gloffset_RequestResidentProgramsNV 722
+#define _gloffset_TrackMatrixNV 723
+#define _gloffset_VertexAttrib1dNV 724
+#define _gloffset_VertexAttrib1dvNV 725
+#define _gloffset_VertexAttrib1fNV 726
+#define _gloffset_VertexAttrib1fvNV 727
+#define _gloffset_VertexAttrib1sNV 728
+#define _gloffset_VertexAttrib1svNV 729
+#define _gloffset_VertexAttrib2dNV 730
+#define _gloffset_VertexAttrib2dvNV 731
+#define _gloffset_VertexAttrib2fNV 732
+#define _gloffset_VertexAttrib2fvNV 733
+#define _gloffset_VertexAttrib2sNV 734
+#define _gloffset_VertexAttrib2svNV 735
+#define _gloffset_VertexAttrib3dNV 736
+#define _gloffset_VertexAttrib3dvNV 737
+#define _gloffset_VertexAttrib3fNV 738
+#define _gloffset_VertexAttrib3fvNV 739
+#define _gloffset_VertexAttrib3sNV 740
+#define _gloffset_VertexAttrib3svNV 741
+#define _gloffset_VertexAttrib4dNV 742
+#define _gloffset_VertexAttrib4dvNV 743
+#define _gloffset_VertexAttrib4fNV 744
+#define _gloffset_VertexAttrib4fvNV 745
+#define _gloffset_VertexAttrib4sNV 746
+#define _gloffset_VertexAttrib4svNV 747
+#define _gloffset_VertexAttrib4ubNV 748
+#define _gloffset_VertexAttrib4ubvNV 749
+#define _gloffset_VertexAttribPointerNV 750
+#define _gloffset_VertexAttribs1dvNV 751
+#define _gloffset_VertexAttribs1fvNV 752
+#define _gloffset_VertexAttribs1svNV 753
+#define _gloffset_VertexAttribs2dvNV 754
+#define _gloffset_VertexAttribs2fvNV 755
+#define _gloffset_VertexAttribs2svNV 756
+#define _gloffset_VertexAttribs3dvNV 757
+#define _gloffset_VertexAttribs3fvNV 758
+#define _gloffset_VertexAttribs3svNV 759
+#define _gloffset_VertexAttribs4dvNV 760
+#define _gloffset_VertexAttribs4fvNV 761
+#define _gloffset_VertexAttribs4svNV 762
+#define _gloffset_VertexAttribs4ubvNV 763
+#define _gloffset_GetTexBumpParameterfvATI 764
+#define _gloffset_GetTexBumpParameterivATI 765
+#define _gloffset_TexBumpParameterfvATI 766
+#define _gloffset_TexBumpParameterivATI 767
+#define _gloffset_AlphaFragmentOp1ATI 768
+#define _gloffset_AlphaFragmentOp2ATI 769
+#define _gloffset_AlphaFragmentOp3ATI 770
+#define _gloffset_BeginFragmentShaderATI 771
+#define _gloffset_BindFragmentShaderATI 772
+#define _gloffset_ColorFragmentOp1ATI 773
+#define _gloffset_ColorFragmentOp2ATI 774
+#define _gloffset_ColorFragmentOp3ATI 775
+#define _gloffset_DeleteFragmentShaderATI 776
+#define _gloffset_EndFragmentShaderATI 777
+#define _gloffset_GenFragmentShadersATI 778
+#define _gloffset_PassTexCoordATI 779
+#define _gloffset_SampleMapATI 780
+#define _gloffset_SetFragmentShaderConstantATI 781
+#define _gloffset_PointParameteriNV 782
+#define _gloffset_PointParameterivNV 783
+#define _gloffset_ActiveStencilFaceEXT 784
+#define _gloffset_BindVertexArrayAPPLE 785
+#define _gloffset_DeleteVertexArraysAPPLE 786
+#define _gloffset_GenVertexArraysAPPLE 787
+#define _gloffset_IsVertexArrayAPPLE 788
+#define _gloffset_GetProgramNamedParameterdvNV 789
+#define _gloffset_GetProgramNamedParameterfvNV 790
+#define _gloffset_ProgramNamedParameter4dNV 791
+#define _gloffset_ProgramNamedParameter4dvNV 792
+#define _gloffset_ProgramNamedParameter4fNV 793
+#define _gloffset_ProgramNamedParameter4fvNV 794
+#define _gloffset_PrimitiveRestartIndexNV 795
+#define _gloffset_PrimitiveRestartNV 796
+#define _gloffset_DepthBoundsEXT 797
+#define _gloffset_BlendEquationSeparateEXT 798
+#define _gloffset_BindFramebufferEXT 799
+#define _gloffset_BindRenderbufferEXT 800
+#define _gloffset_CheckFramebufferStatusEXT 801
+#define _gloffset_DeleteFramebuffersEXT 802
+#define _gloffset_DeleteRenderbuffersEXT 803
+#define _gloffset_FramebufferRenderbufferEXT 804
+#define _gloffset_FramebufferTexture1DEXT 805
+#define _gloffset_FramebufferTexture2DEXT 806
+#define _gloffset_FramebufferTexture3DEXT 807
+#define _gloffset_GenFramebuffersEXT 808
+#define _gloffset_GenRenderbuffersEXT 809
+#define _gloffset_GenerateMipmapEXT 810
+#define _gloffset_GetFramebufferAttachmentParameterivEXT 811
+#define _gloffset_GetRenderbufferParameterivEXT 812
+#define _gloffset_IsFramebufferEXT 813
+#define _gloffset_IsRenderbufferEXT 814
+#define _gloffset_RenderbufferStorageEXT 815
+#define _gloffset_BlitFramebufferEXT 816
+#define _gloffset_BufferParameteriAPPLE 817
+#define _gloffset_FlushMappedBufferRangeAPPLE 818
+#define _gloffset_BindFragDataLocationEXT 819
+#define _gloffset_GetFragDataLocationEXT 820
+#define _gloffset_GetUniformuivEXT 821
+#define _gloffset_GetVertexAttribIivEXT 822
+#define _gloffset_GetVertexAttribIuivEXT 823
+#define _gloffset_Uniform1uiEXT 824
+#define _gloffset_Uniform1uivEXT 825
+#define _gloffset_Uniform2uiEXT 826
+#define _gloffset_Uniform2uivEXT 827
+#define _gloffset_Uniform3uiEXT 828
+#define _gloffset_Uniform3uivEXT 829
+#define _gloffset_Uniform4uiEXT 830
+#define _gloffset_Uniform4uivEXT 831
+#define _gloffset_VertexAttribI1iEXT 832
+#define _gloffset_VertexAttribI1ivEXT 833
+#define _gloffset_VertexAttribI1uiEXT 834
+#define _gloffset_VertexAttribI1uivEXT 835
+#define _gloffset_VertexAttribI2iEXT 836
+#define _gloffset_VertexAttribI2ivEXT 837
+#define _gloffset_VertexAttribI2uiEXT 838
+#define _gloffset_VertexAttribI2uivEXT 839
+#define _gloffset_VertexAttribI3iEXT 840
+#define _gloffset_VertexAttribI3ivEXT 841
+#define _gloffset_VertexAttribI3uiEXT 842
+#define _gloffset_VertexAttribI3uivEXT 843
+#define _gloffset_VertexAttribI4bvEXT 844
+#define _gloffset_VertexAttribI4iEXT 845
+#define _gloffset_VertexAttribI4ivEXT 846
+#define _gloffset_VertexAttribI4svEXT 847
+#define _gloffset_VertexAttribI4ubvEXT 848
+#define _gloffset_VertexAttribI4uiEXT 849
+#define _gloffset_VertexAttribI4uivEXT 850
+#define _gloffset_VertexAttribI4usvEXT 851
+#define _gloffset_VertexAttribIPointerEXT 852
+#define _gloffset_FramebufferTextureLayerEXT 853
+#define _gloffset_ColorMaskIndexedEXT 854
+#define _gloffset_DisableIndexedEXT 855
+#define _gloffset_EnableIndexedEXT 856
+#define _gloffset_GetBooleanIndexedvEXT 857
+#define _gloffset_GetIntegerIndexedvEXT 858
+#define _gloffset_IsEnabledIndexedEXT 859
+#define _gloffset_ClearColorIiEXT 860
+#define _gloffset_ClearColorIuiEXT 861
+#define _gloffset_GetTexParameterIivEXT 862
+#define _gloffset_GetTexParameterIuivEXT 863
+#define _gloffset_TexParameterIivEXT 864
+#define _gloffset_TexParameterIuivEXT 865
+#define _gloffset_BeginConditionalRenderNV 866
+#define _gloffset_EndConditionalRenderNV 867
+#define _gloffset_BeginTransformFeedbackEXT 868
+#define _gloffset_BindBufferBaseEXT 869
+#define _gloffset_BindBufferOffsetEXT 870
+#define _gloffset_BindBufferRangeEXT 871
+#define _gloffset_EndTransformFeedbackEXT 872
+#define _gloffset_GetTransformFeedbackVaryingEXT 873
+#define _gloffset_TransformFeedbackVaryingsEXT 874
+#define _gloffset_ProvokingVertexEXT 875
+#define _gloffset_GetTexParameterPointervAPPLE 876
+#define _gloffset_TextureRangeAPPLE 877
+#define _gloffset_GetObjectParameterivAPPLE 878
+#define _gloffset_ObjectPurgeableAPPLE 879
+#define _gloffset_ObjectUnpurgeableAPPLE 880
+#define _gloffset_ActiveProgramEXT 881
+#define _gloffset_CreateShaderProgramEXT 882
+#define _gloffset_UseShaderProgramEXT 883
+#define _gloffset_TextureBarrierNV 884
+#define _gloffset_StencilFuncSeparateATI 885
+#define _gloffset_ProgramEnvParameters4fvEXT 886
+#define _gloffset_ProgramLocalParameters4fvEXT 887
+#define _gloffset_GetQueryObjecti64vEXT 888
+#define _gloffset_GetQueryObjectui64vEXT 889
+#define _gloffset_EGLImageTargetRenderbufferStorageOES 890
+#define _gloffset_EGLImageTargetTexture2DOES 891
#else /* !_GLAPI_USE_REMAP_TABLE */
-#define driDispatchRemapTable_size 473
+#define driDispatchRemapTable_size 484
extern int driDispatchRemapTable[ driDispatchRemapTable_size ];
#define AttachShader_remap_index 0
@@ -1121,309 +1132,320 @@ extern int driDispatchRemapTable[ driDispatchRemapTable_size ];
#define FramebufferTextureARB_remap_index 167
#define FramebufferTextureFaceARB_remap_index 168
#define ProgramParameteriARB_remap_index 169
-#define FlushMappedBufferRange_remap_index 170
-#define MapBufferRange_remap_index 171
-#define BindVertexArray_remap_index 172
-#define GenVertexArrays_remap_index 173
-#define CopyBufferSubData_remap_index 174
-#define ClientWaitSync_remap_index 175
-#define DeleteSync_remap_index 176
-#define FenceSync_remap_index 177
-#define GetInteger64v_remap_index 178
-#define GetSynciv_remap_index 179
-#define IsSync_remap_index 180
-#define WaitSync_remap_index 181
-#define DrawElementsBaseVertex_remap_index 182
-#define DrawRangeElementsBaseVertex_remap_index 183
-#define MultiDrawElementsBaseVertex_remap_index 184
-#define BindTransformFeedback_remap_index 185
-#define DeleteTransformFeedbacks_remap_index 186
-#define DrawTransformFeedback_remap_index 187
-#define GenTransformFeedbacks_remap_index 188
-#define IsTransformFeedback_remap_index 189
-#define PauseTransformFeedback_remap_index 190
-#define ResumeTransformFeedback_remap_index 191
-#define PolygonOffsetEXT_remap_index 192
-#define GetPixelTexGenParameterfvSGIS_remap_index 193
-#define GetPixelTexGenParameterivSGIS_remap_index 194
-#define PixelTexGenParameterfSGIS_remap_index 195
-#define PixelTexGenParameterfvSGIS_remap_index 196
-#define PixelTexGenParameteriSGIS_remap_index 197
-#define PixelTexGenParameterivSGIS_remap_index 198
-#define SampleMaskSGIS_remap_index 199
-#define SamplePatternSGIS_remap_index 200
-#define ColorPointerEXT_remap_index 201
-#define EdgeFlagPointerEXT_remap_index 202
-#define IndexPointerEXT_remap_index 203
-#define NormalPointerEXT_remap_index 204
-#define TexCoordPointerEXT_remap_index 205
-#define VertexPointerEXT_remap_index 206
-#define PointParameterfEXT_remap_index 207
-#define PointParameterfvEXT_remap_index 208
-#define LockArraysEXT_remap_index 209
-#define UnlockArraysEXT_remap_index 210
-#define SecondaryColor3bEXT_remap_index 211
-#define SecondaryColor3bvEXT_remap_index 212
-#define SecondaryColor3dEXT_remap_index 213
-#define SecondaryColor3dvEXT_remap_index 214
-#define SecondaryColor3fEXT_remap_index 215
-#define SecondaryColor3fvEXT_remap_index 216
-#define SecondaryColor3iEXT_remap_index 217
-#define SecondaryColor3ivEXT_remap_index 218
-#define SecondaryColor3sEXT_remap_index 219
-#define SecondaryColor3svEXT_remap_index 220
-#define SecondaryColor3ubEXT_remap_index 221
-#define SecondaryColor3ubvEXT_remap_index 222
-#define SecondaryColor3uiEXT_remap_index 223
-#define SecondaryColor3uivEXT_remap_index 224
-#define SecondaryColor3usEXT_remap_index 225
-#define SecondaryColor3usvEXT_remap_index 226
-#define SecondaryColorPointerEXT_remap_index 227
-#define MultiDrawArraysEXT_remap_index 228
-#define MultiDrawElementsEXT_remap_index 229
-#define FogCoordPointerEXT_remap_index 230
-#define FogCoorddEXT_remap_index 231
-#define FogCoorddvEXT_remap_index 232
-#define FogCoordfEXT_remap_index 233
-#define FogCoordfvEXT_remap_index 234
-#define PixelTexGenSGIX_remap_index 235
-#define BlendFuncSeparateEXT_remap_index 236
-#define FlushVertexArrayRangeNV_remap_index 237
-#define VertexArrayRangeNV_remap_index 238
-#define CombinerInputNV_remap_index 239
-#define CombinerOutputNV_remap_index 240
-#define CombinerParameterfNV_remap_index 241
-#define CombinerParameterfvNV_remap_index 242
-#define CombinerParameteriNV_remap_index 243
-#define CombinerParameterivNV_remap_index 244
-#define FinalCombinerInputNV_remap_index 245
-#define GetCombinerInputParameterfvNV_remap_index 246
-#define GetCombinerInputParameterivNV_remap_index 247
-#define GetCombinerOutputParameterfvNV_remap_index 248
-#define GetCombinerOutputParameterivNV_remap_index 249
-#define GetFinalCombinerInputParameterfvNV_remap_index 250
-#define GetFinalCombinerInputParameterivNV_remap_index 251
-#define ResizeBuffersMESA_remap_index 252
-#define WindowPos2dMESA_remap_index 253
-#define WindowPos2dvMESA_remap_index 254
-#define WindowPos2fMESA_remap_index 255
-#define WindowPos2fvMESA_remap_index 256
-#define WindowPos2iMESA_remap_index 257
-#define WindowPos2ivMESA_remap_index 258
-#define WindowPos2sMESA_remap_index 259
-#define WindowPos2svMESA_remap_index 260
-#define WindowPos3dMESA_remap_index 261
-#define WindowPos3dvMESA_remap_index 262
-#define WindowPos3fMESA_remap_index 263
-#define WindowPos3fvMESA_remap_index 264
-#define WindowPos3iMESA_remap_index 265
-#define WindowPos3ivMESA_remap_index 266
-#define WindowPos3sMESA_remap_index 267
-#define WindowPos3svMESA_remap_index 268
-#define WindowPos4dMESA_remap_index 269
-#define WindowPos4dvMESA_remap_index 270
-#define WindowPos4fMESA_remap_index 271
-#define WindowPos4fvMESA_remap_index 272
-#define WindowPos4iMESA_remap_index 273
-#define WindowPos4ivMESA_remap_index 274
-#define WindowPos4sMESA_remap_index 275
-#define WindowPos4svMESA_remap_index 276
-#define MultiModeDrawArraysIBM_remap_index 277
-#define MultiModeDrawElementsIBM_remap_index 278
-#define DeleteFencesNV_remap_index 279
-#define FinishFenceNV_remap_index 280
-#define GenFencesNV_remap_index 281
-#define GetFenceivNV_remap_index 282
-#define IsFenceNV_remap_index 283
-#define SetFenceNV_remap_index 284
-#define TestFenceNV_remap_index 285
-#define AreProgramsResidentNV_remap_index 286
-#define BindProgramNV_remap_index 287
-#define DeleteProgramsNV_remap_index 288
-#define ExecuteProgramNV_remap_index 289
-#define GenProgramsNV_remap_index 290
-#define GetProgramParameterdvNV_remap_index 291
-#define GetProgramParameterfvNV_remap_index 292
-#define GetProgramStringNV_remap_index 293
-#define GetProgramivNV_remap_index 294
-#define GetTrackMatrixivNV_remap_index 295
-#define GetVertexAttribPointervNV_remap_index 296
-#define GetVertexAttribdvNV_remap_index 297
-#define GetVertexAttribfvNV_remap_index 298
-#define GetVertexAttribivNV_remap_index 299
-#define IsProgramNV_remap_index 300
-#define LoadProgramNV_remap_index 301
-#define ProgramParameters4dvNV_remap_index 302
-#define ProgramParameters4fvNV_remap_index 303
-#define RequestResidentProgramsNV_remap_index 304
-#define TrackMatrixNV_remap_index 305
-#define VertexAttrib1dNV_remap_index 306
-#define VertexAttrib1dvNV_remap_index 307
-#define VertexAttrib1fNV_remap_index 308
-#define VertexAttrib1fvNV_remap_index 309
-#define VertexAttrib1sNV_remap_index 310
-#define VertexAttrib1svNV_remap_index 311
-#define VertexAttrib2dNV_remap_index 312
-#define VertexAttrib2dvNV_remap_index 313
-#define VertexAttrib2fNV_remap_index 314
-#define VertexAttrib2fvNV_remap_index 315
-#define VertexAttrib2sNV_remap_index 316
-#define VertexAttrib2svNV_remap_index 317
-#define VertexAttrib3dNV_remap_index 318
-#define VertexAttrib3dvNV_remap_index 319
-#define VertexAttrib3fNV_remap_index 320
-#define VertexAttrib3fvNV_remap_index 321
-#define VertexAttrib3sNV_remap_index 322
-#define VertexAttrib3svNV_remap_index 323
-#define VertexAttrib4dNV_remap_index 324
-#define VertexAttrib4dvNV_remap_index 325
-#define VertexAttrib4fNV_remap_index 326
-#define VertexAttrib4fvNV_remap_index 327
-#define VertexAttrib4sNV_remap_index 328
-#define VertexAttrib4svNV_remap_index 329
-#define VertexAttrib4ubNV_remap_index 330
-#define VertexAttrib4ubvNV_remap_index 331
-#define VertexAttribPointerNV_remap_index 332
-#define VertexAttribs1dvNV_remap_index 333
-#define VertexAttribs1fvNV_remap_index 334
-#define VertexAttribs1svNV_remap_index 335
-#define VertexAttribs2dvNV_remap_index 336
-#define VertexAttribs2fvNV_remap_index 337
-#define VertexAttribs2svNV_remap_index 338
-#define VertexAttribs3dvNV_remap_index 339
-#define VertexAttribs3fvNV_remap_index 340
-#define VertexAttribs3svNV_remap_index 341
-#define VertexAttribs4dvNV_remap_index 342
-#define VertexAttribs4fvNV_remap_index 343
-#define VertexAttribs4svNV_remap_index 344
-#define VertexAttribs4ubvNV_remap_index 345
-#define GetTexBumpParameterfvATI_remap_index 346
-#define GetTexBumpParameterivATI_remap_index 347
-#define TexBumpParameterfvATI_remap_index 348
-#define TexBumpParameterivATI_remap_index 349
-#define AlphaFragmentOp1ATI_remap_index 350
-#define AlphaFragmentOp2ATI_remap_index 351
-#define AlphaFragmentOp3ATI_remap_index 352
-#define BeginFragmentShaderATI_remap_index 353
-#define BindFragmentShaderATI_remap_index 354
-#define ColorFragmentOp1ATI_remap_index 355
-#define ColorFragmentOp2ATI_remap_index 356
-#define ColorFragmentOp3ATI_remap_index 357
-#define DeleteFragmentShaderATI_remap_index 358
-#define EndFragmentShaderATI_remap_index 359
-#define GenFragmentShadersATI_remap_index 360
-#define PassTexCoordATI_remap_index 361
-#define SampleMapATI_remap_index 362
-#define SetFragmentShaderConstantATI_remap_index 363
-#define PointParameteriNV_remap_index 364
-#define PointParameterivNV_remap_index 365
-#define ActiveStencilFaceEXT_remap_index 366
-#define BindVertexArrayAPPLE_remap_index 367
-#define DeleteVertexArraysAPPLE_remap_index 368
-#define GenVertexArraysAPPLE_remap_index 369
-#define IsVertexArrayAPPLE_remap_index 370
-#define GetProgramNamedParameterdvNV_remap_index 371
-#define GetProgramNamedParameterfvNV_remap_index 372
-#define ProgramNamedParameter4dNV_remap_index 373
-#define ProgramNamedParameter4dvNV_remap_index 374
-#define ProgramNamedParameter4fNV_remap_index 375
-#define ProgramNamedParameter4fvNV_remap_index 376
-#define PrimitiveRestartIndexNV_remap_index 377
-#define PrimitiveRestartNV_remap_index 378
-#define DepthBoundsEXT_remap_index 379
-#define BlendEquationSeparateEXT_remap_index 380
-#define BindFramebufferEXT_remap_index 381
-#define BindRenderbufferEXT_remap_index 382
-#define CheckFramebufferStatusEXT_remap_index 383
-#define DeleteFramebuffersEXT_remap_index 384
-#define DeleteRenderbuffersEXT_remap_index 385
-#define FramebufferRenderbufferEXT_remap_index 386
-#define FramebufferTexture1DEXT_remap_index 387
-#define FramebufferTexture2DEXT_remap_index 388
-#define FramebufferTexture3DEXT_remap_index 389
-#define GenFramebuffersEXT_remap_index 390
-#define GenRenderbuffersEXT_remap_index 391
-#define GenerateMipmapEXT_remap_index 392
-#define GetFramebufferAttachmentParameterivEXT_remap_index 393
-#define GetRenderbufferParameterivEXT_remap_index 394
-#define IsFramebufferEXT_remap_index 395
-#define IsRenderbufferEXT_remap_index 396
-#define RenderbufferStorageEXT_remap_index 397
-#define BlitFramebufferEXT_remap_index 398
-#define BufferParameteriAPPLE_remap_index 399
-#define FlushMappedBufferRangeAPPLE_remap_index 400
-#define BindFragDataLocationEXT_remap_index 401
-#define GetFragDataLocationEXT_remap_index 402
-#define GetUniformuivEXT_remap_index 403
-#define GetVertexAttribIivEXT_remap_index 404
-#define GetVertexAttribIuivEXT_remap_index 405
-#define Uniform1uiEXT_remap_index 406
-#define Uniform1uivEXT_remap_index 407
-#define Uniform2uiEXT_remap_index 408
-#define Uniform2uivEXT_remap_index 409
-#define Uniform3uiEXT_remap_index 410
-#define Uniform3uivEXT_remap_index 411
-#define Uniform4uiEXT_remap_index 412
-#define Uniform4uivEXT_remap_index 413
-#define VertexAttribI1iEXT_remap_index 414
-#define VertexAttribI1ivEXT_remap_index 415
-#define VertexAttribI1uiEXT_remap_index 416
-#define VertexAttribI1uivEXT_remap_index 417
-#define VertexAttribI2iEXT_remap_index 418
-#define VertexAttribI2ivEXT_remap_index 419
-#define VertexAttribI2uiEXT_remap_index 420
-#define VertexAttribI2uivEXT_remap_index 421
-#define VertexAttribI3iEXT_remap_index 422
-#define VertexAttribI3ivEXT_remap_index 423
-#define VertexAttribI3uiEXT_remap_index 424
-#define VertexAttribI3uivEXT_remap_index 425
-#define VertexAttribI4bvEXT_remap_index 426
-#define VertexAttribI4iEXT_remap_index 427
-#define VertexAttribI4ivEXT_remap_index 428
-#define VertexAttribI4svEXT_remap_index 429
-#define VertexAttribI4ubvEXT_remap_index 430
-#define VertexAttribI4uiEXT_remap_index 431
-#define VertexAttribI4uivEXT_remap_index 432
-#define VertexAttribI4usvEXT_remap_index 433
-#define VertexAttribIPointerEXT_remap_index 434
-#define FramebufferTextureLayerEXT_remap_index 435
-#define ColorMaskIndexedEXT_remap_index 436
-#define DisableIndexedEXT_remap_index 437
-#define EnableIndexedEXT_remap_index 438
-#define GetBooleanIndexedvEXT_remap_index 439
-#define GetIntegerIndexedvEXT_remap_index 440
-#define IsEnabledIndexedEXT_remap_index 441
-#define ClearColorIiEXT_remap_index 442
-#define ClearColorIuiEXT_remap_index 443
-#define GetTexParameterIivEXT_remap_index 444
-#define GetTexParameterIuivEXT_remap_index 445
-#define TexParameterIivEXT_remap_index 446
-#define TexParameterIuivEXT_remap_index 447
-#define BeginConditionalRenderNV_remap_index 448
-#define EndConditionalRenderNV_remap_index 449
-#define BeginTransformFeedbackEXT_remap_index 450
-#define BindBufferBaseEXT_remap_index 451
-#define BindBufferOffsetEXT_remap_index 452
-#define BindBufferRangeEXT_remap_index 453
-#define EndTransformFeedbackEXT_remap_index 454
-#define GetTransformFeedbackVaryingEXT_remap_index 455
-#define TransformFeedbackVaryingsEXT_remap_index 456
-#define ProvokingVertexEXT_remap_index 457
-#define GetTexParameterPointervAPPLE_remap_index 458
-#define TextureRangeAPPLE_remap_index 459
-#define GetObjectParameterivAPPLE_remap_index 460
-#define ObjectPurgeableAPPLE_remap_index 461
-#define ObjectUnpurgeableAPPLE_remap_index 462
-#define ActiveProgramEXT_remap_index 463
-#define CreateShaderProgramEXT_remap_index 464
-#define UseShaderProgramEXT_remap_index 465
-#define StencilFuncSeparateATI_remap_index 466
-#define ProgramEnvParameters4fvEXT_remap_index 467
-#define ProgramLocalParameters4fvEXT_remap_index 468
-#define GetQueryObjecti64vEXT_remap_index 469
-#define GetQueryObjectui64vEXT_remap_index 470
-#define EGLImageTargetRenderbufferStorageOES_remap_index 471
-#define EGLImageTargetTexture2DOES_remap_index 472
+#define VertexAttribDivisorARB_remap_index 170
+#define FlushMappedBufferRange_remap_index 171
+#define MapBufferRange_remap_index 172
+#define BindVertexArray_remap_index 173
+#define GenVertexArrays_remap_index 174
+#define CopyBufferSubData_remap_index 175
+#define ClientWaitSync_remap_index 176
+#define DeleteSync_remap_index 177
+#define FenceSync_remap_index 178
+#define GetInteger64v_remap_index 179
+#define GetSynciv_remap_index 180
+#define IsSync_remap_index 181
+#define WaitSync_remap_index 182
+#define DrawElementsBaseVertex_remap_index 183
+#define DrawRangeElementsBaseVertex_remap_index 184
+#define MultiDrawElementsBaseVertex_remap_index 185
+#define BlendEquationSeparateiARB_remap_index 186
+#define BlendEquationiARB_remap_index 187
+#define BlendFuncSeparateiARB_remap_index 188
+#define BlendFunciARB_remap_index 189
+#define BindTransformFeedback_remap_index 190
+#define DeleteTransformFeedbacks_remap_index 191
+#define DrawTransformFeedback_remap_index 192
+#define GenTransformFeedbacks_remap_index 193
+#define IsTransformFeedback_remap_index 194
+#define PauseTransformFeedback_remap_index 195
+#define ResumeTransformFeedback_remap_index 196
+#define ClearDepthf_remap_index 197
+#define DepthRangef_remap_index 198
+#define GetShaderPrecisionFormat_remap_index 199
+#define ReleaseShaderCompiler_remap_index 200
+#define ShaderBinary_remap_index 201
+#define PolygonOffsetEXT_remap_index 202
+#define GetPixelTexGenParameterfvSGIS_remap_index 203
+#define GetPixelTexGenParameterivSGIS_remap_index 204
+#define PixelTexGenParameterfSGIS_remap_index 205
+#define PixelTexGenParameterfvSGIS_remap_index 206
+#define PixelTexGenParameteriSGIS_remap_index 207
+#define PixelTexGenParameterivSGIS_remap_index 208
+#define SampleMaskSGIS_remap_index 209
+#define SamplePatternSGIS_remap_index 210
+#define ColorPointerEXT_remap_index 211
+#define EdgeFlagPointerEXT_remap_index 212
+#define IndexPointerEXT_remap_index 213
+#define NormalPointerEXT_remap_index 214
+#define TexCoordPointerEXT_remap_index 215
+#define VertexPointerEXT_remap_index 216
+#define PointParameterfEXT_remap_index 217
+#define PointParameterfvEXT_remap_index 218
+#define LockArraysEXT_remap_index 219
+#define UnlockArraysEXT_remap_index 220
+#define SecondaryColor3bEXT_remap_index 221
+#define SecondaryColor3bvEXT_remap_index 222
+#define SecondaryColor3dEXT_remap_index 223
+#define SecondaryColor3dvEXT_remap_index 224
+#define SecondaryColor3fEXT_remap_index 225
+#define SecondaryColor3fvEXT_remap_index 226
+#define SecondaryColor3iEXT_remap_index 227
+#define SecondaryColor3ivEXT_remap_index 228
+#define SecondaryColor3sEXT_remap_index 229
+#define SecondaryColor3svEXT_remap_index 230
+#define SecondaryColor3ubEXT_remap_index 231
+#define SecondaryColor3ubvEXT_remap_index 232
+#define SecondaryColor3uiEXT_remap_index 233
+#define SecondaryColor3uivEXT_remap_index 234
+#define SecondaryColor3usEXT_remap_index 235
+#define SecondaryColor3usvEXT_remap_index 236
+#define SecondaryColorPointerEXT_remap_index 237
+#define MultiDrawArraysEXT_remap_index 238
+#define MultiDrawElementsEXT_remap_index 239
+#define FogCoordPointerEXT_remap_index 240
+#define FogCoorddEXT_remap_index 241
+#define FogCoorddvEXT_remap_index 242
+#define FogCoordfEXT_remap_index 243
+#define FogCoordfvEXT_remap_index 244
+#define PixelTexGenSGIX_remap_index 245
+#define BlendFuncSeparateEXT_remap_index 246
+#define FlushVertexArrayRangeNV_remap_index 247
+#define VertexArrayRangeNV_remap_index 248
+#define CombinerInputNV_remap_index 249
+#define CombinerOutputNV_remap_index 250
+#define CombinerParameterfNV_remap_index 251
+#define CombinerParameterfvNV_remap_index 252
+#define CombinerParameteriNV_remap_index 253
+#define CombinerParameterivNV_remap_index 254
+#define FinalCombinerInputNV_remap_index 255
+#define GetCombinerInputParameterfvNV_remap_index 256
+#define GetCombinerInputParameterivNV_remap_index 257
+#define GetCombinerOutputParameterfvNV_remap_index 258
+#define GetCombinerOutputParameterivNV_remap_index 259
+#define GetFinalCombinerInputParameterfvNV_remap_index 260
+#define GetFinalCombinerInputParameterivNV_remap_index 261
+#define ResizeBuffersMESA_remap_index 262
+#define WindowPos2dMESA_remap_index 263
+#define WindowPos2dvMESA_remap_index 264
+#define WindowPos2fMESA_remap_index 265
+#define WindowPos2fvMESA_remap_index 266
+#define WindowPos2iMESA_remap_index 267
+#define WindowPos2ivMESA_remap_index 268
+#define WindowPos2sMESA_remap_index 269
+#define WindowPos2svMESA_remap_index 270
+#define WindowPos3dMESA_remap_index 271
+#define WindowPos3dvMESA_remap_index 272
+#define WindowPos3fMESA_remap_index 273
+#define WindowPos3fvMESA_remap_index 274
+#define WindowPos3iMESA_remap_index 275
+#define WindowPos3ivMESA_remap_index 276
+#define WindowPos3sMESA_remap_index 277
+#define WindowPos3svMESA_remap_index 278
+#define WindowPos4dMESA_remap_index 279
+#define WindowPos4dvMESA_remap_index 280
+#define WindowPos4fMESA_remap_index 281
+#define WindowPos4fvMESA_remap_index 282
+#define WindowPos4iMESA_remap_index 283
+#define WindowPos4ivMESA_remap_index 284
+#define WindowPos4sMESA_remap_index 285
+#define WindowPos4svMESA_remap_index 286
+#define MultiModeDrawArraysIBM_remap_index 287
+#define MultiModeDrawElementsIBM_remap_index 288
+#define DeleteFencesNV_remap_index 289
+#define FinishFenceNV_remap_index 290
+#define GenFencesNV_remap_index 291
+#define GetFenceivNV_remap_index 292
+#define IsFenceNV_remap_index 293
+#define SetFenceNV_remap_index 294
+#define TestFenceNV_remap_index 295
+#define AreProgramsResidentNV_remap_index 296
+#define BindProgramNV_remap_index 297
+#define DeleteProgramsNV_remap_index 298
+#define ExecuteProgramNV_remap_index 299
+#define GenProgramsNV_remap_index 300
+#define GetProgramParameterdvNV_remap_index 301
+#define GetProgramParameterfvNV_remap_index 302
+#define GetProgramStringNV_remap_index 303
+#define GetProgramivNV_remap_index 304
+#define GetTrackMatrixivNV_remap_index 305
+#define GetVertexAttribPointervNV_remap_index 306
+#define GetVertexAttribdvNV_remap_index 307
+#define GetVertexAttribfvNV_remap_index 308
+#define GetVertexAttribivNV_remap_index 309
+#define IsProgramNV_remap_index 310
+#define LoadProgramNV_remap_index 311
+#define ProgramParameters4dvNV_remap_index 312
+#define ProgramParameters4fvNV_remap_index 313
+#define RequestResidentProgramsNV_remap_index 314
+#define TrackMatrixNV_remap_index 315
+#define VertexAttrib1dNV_remap_index 316
+#define VertexAttrib1dvNV_remap_index 317
+#define VertexAttrib1fNV_remap_index 318
+#define VertexAttrib1fvNV_remap_index 319
+#define VertexAttrib1sNV_remap_index 320
+#define VertexAttrib1svNV_remap_index 321
+#define VertexAttrib2dNV_remap_index 322
+#define VertexAttrib2dvNV_remap_index 323
+#define VertexAttrib2fNV_remap_index 324
+#define VertexAttrib2fvNV_remap_index 325
+#define VertexAttrib2sNV_remap_index 326
+#define VertexAttrib2svNV_remap_index 327
+#define VertexAttrib3dNV_remap_index 328
+#define VertexAttrib3dvNV_remap_index 329
+#define VertexAttrib3fNV_remap_index 330
+#define VertexAttrib3fvNV_remap_index 331
+#define VertexAttrib3sNV_remap_index 332
+#define VertexAttrib3svNV_remap_index 333
+#define VertexAttrib4dNV_remap_index 334
+#define VertexAttrib4dvNV_remap_index 335
+#define VertexAttrib4fNV_remap_index 336
+#define VertexAttrib4fvNV_remap_index 337
+#define VertexAttrib4sNV_remap_index 338
+#define VertexAttrib4svNV_remap_index 339
+#define VertexAttrib4ubNV_remap_index 340
+#define VertexAttrib4ubvNV_remap_index 341
+#define VertexAttribPointerNV_remap_index 342
+#define VertexAttribs1dvNV_remap_index 343
+#define VertexAttribs1fvNV_remap_index 344
+#define VertexAttribs1svNV_remap_index 345
+#define VertexAttribs2dvNV_remap_index 346
+#define VertexAttribs2fvNV_remap_index 347
+#define VertexAttribs2svNV_remap_index 348
+#define VertexAttribs3dvNV_remap_index 349
+#define VertexAttribs3fvNV_remap_index 350
+#define VertexAttribs3svNV_remap_index 351
+#define VertexAttribs4dvNV_remap_index 352
+#define VertexAttribs4fvNV_remap_index 353
+#define VertexAttribs4svNV_remap_index 354
+#define VertexAttribs4ubvNV_remap_index 355
+#define GetTexBumpParameterfvATI_remap_index 356
+#define GetTexBumpParameterivATI_remap_index 357
+#define TexBumpParameterfvATI_remap_index 358
+#define TexBumpParameterivATI_remap_index 359
+#define AlphaFragmentOp1ATI_remap_index 360
+#define AlphaFragmentOp2ATI_remap_index 361
+#define AlphaFragmentOp3ATI_remap_index 362
+#define BeginFragmentShaderATI_remap_index 363
+#define BindFragmentShaderATI_remap_index 364
+#define ColorFragmentOp1ATI_remap_index 365
+#define ColorFragmentOp2ATI_remap_index 366
+#define ColorFragmentOp3ATI_remap_index 367
+#define DeleteFragmentShaderATI_remap_index 368
+#define EndFragmentShaderATI_remap_index 369
+#define GenFragmentShadersATI_remap_index 370
+#define PassTexCoordATI_remap_index 371
+#define SampleMapATI_remap_index 372
+#define SetFragmentShaderConstantATI_remap_index 373
+#define PointParameteriNV_remap_index 374
+#define PointParameterivNV_remap_index 375
+#define ActiveStencilFaceEXT_remap_index 376
+#define BindVertexArrayAPPLE_remap_index 377
+#define DeleteVertexArraysAPPLE_remap_index 378
+#define GenVertexArraysAPPLE_remap_index 379
+#define IsVertexArrayAPPLE_remap_index 380
+#define GetProgramNamedParameterdvNV_remap_index 381
+#define GetProgramNamedParameterfvNV_remap_index 382
+#define ProgramNamedParameter4dNV_remap_index 383
+#define ProgramNamedParameter4dvNV_remap_index 384
+#define ProgramNamedParameter4fNV_remap_index 385
+#define ProgramNamedParameter4fvNV_remap_index 386
+#define PrimitiveRestartIndexNV_remap_index 387
+#define PrimitiveRestartNV_remap_index 388
+#define DepthBoundsEXT_remap_index 389
+#define BlendEquationSeparateEXT_remap_index 390
+#define BindFramebufferEXT_remap_index 391
+#define BindRenderbufferEXT_remap_index 392
+#define CheckFramebufferStatusEXT_remap_index 393
+#define DeleteFramebuffersEXT_remap_index 394
+#define DeleteRenderbuffersEXT_remap_index 395
+#define FramebufferRenderbufferEXT_remap_index 396
+#define FramebufferTexture1DEXT_remap_index 397
+#define FramebufferTexture2DEXT_remap_index 398
+#define FramebufferTexture3DEXT_remap_index 399
+#define GenFramebuffersEXT_remap_index 400
+#define GenRenderbuffersEXT_remap_index 401
+#define GenerateMipmapEXT_remap_index 402
+#define GetFramebufferAttachmentParameterivEXT_remap_index 403
+#define GetRenderbufferParameterivEXT_remap_index 404
+#define IsFramebufferEXT_remap_index 405
+#define IsRenderbufferEXT_remap_index 406
+#define RenderbufferStorageEXT_remap_index 407
+#define BlitFramebufferEXT_remap_index 408
+#define BufferParameteriAPPLE_remap_index 409
+#define FlushMappedBufferRangeAPPLE_remap_index 410
+#define BindFragDataLocationEXT_remap_index 411
+#define GetFragDataLocationEXT_remap_index 412
+#define GetUniformuivEXT_remap_index 413
+#define GetVertexAttribIivEXT_remap_index 414
+#define GetVertexAttribIuivEXT_remap_index 415
+#define Uniform1uiEXT_remap_index 416
+#define Uniform1uivEXT_remap_index 417
+#define Uniform2uiEXT_remap_index 418
+#define Uniform2uivEXT_remap_index 419
+#define Uniform3uiEXT_remap_index 420
+#define Uniform3uivEXT_remap_index 421
+#define Uniform4uiEXT_remap_index 422
+#define Uniform4uivEXT_remap_index 423
+#define VertexAttribI1iEXT_remap_index 424
+#define VertexAttribI1ivEXT_remap_index 425
+#define VertexAttribI1uiEXT_remap_index 426
+#define VertexAttribI1uivEXT_remap_index 427
+#define VertexAttribI2iEXT_remap_index 428
+#define VertexAttribI2ivEXT_remap_index 429
+#define VertexAttribI2uiEXT_remap_index 430
+#define VertexAttribI2uivEXT_remap_index 431
+#define VertexAttribI3iEXT_remap_index 432
+#define VertexAttribI3ivEXT_remap_index 433
+#define VertexAttribI3uiEXT_remap_index 434
+#define VertexAttribI3uivEXT_remap_index 435
+#define VertexAttribI4bvEXT_remap_index 436
+#define VertexAttribI4iEXT_remap_index 437
+#define VertexAttribI4ivEXT_remap_index 438
+#define VertexAttribI4svEXT_remap_index 439
+#define VertexAttribI4ubvEXT_remap_index 440
+#define VertexAttribI4uiEXT_remap_index 441
+#define VertexAttribI4uivEXT_remap_index 442
+#define VertexAttribI4usvEXT_remap_index 443
+#define VertexAttribIPointerEXT_remap_index 444
+#define FramebufferTextureLayerEXT_remap_index 445
+#define ColorMaskIndexedEXT_remap_index 446
+#define DisableIndexedEXT_remap_index 447
+#define EnableIndexedEXT_remap_index 448
+#define GetBooleanIndexedvEXT_remap_index 449
+#define GetIntegerIndexedvEXT_remap_index 450
+#define IsEnabledIndexedEXT_remap_index 451
+#define ClearColorIiEXT_remap_index 452
+#define ClearColorIuiEXT_remap_index 453
+#define GetTexParameterIivEXT_remap_index 454
+#define GetTexParameterIuivEXT_remap_index 455
+#define TexParameterIivEXT_remap_index 456
+#define TexParameterIuivEXT_remap_index 457
+#define BeginConditionalRenderNV_remap_index 458
+#define EndConditionalRenderNV_remap_index 459
+#define BeginTransformFeedbackEXT_remap_index 460
+#define BindBufferBaseEXT_remap_index 461
+#define BindBufferOffsetEXT_remap_index 462
+#define BindBufferRangeEXT_remap_index 463
+#define EndTransformFeedbackEXT_remap_index 464
+#define GetTransformFeedbackVaryingEXT_remap_index 465
+#define TransformFeedbackVaryingsEXT_remap_index 466
+#define ProvokingVertexEXT_remap_index 467
+#define GetTexParameterPointervAPPLE_remap_index 468
+#define TextureRangeAPPLE_remap_index 469
+#define GetObjectParameterivAPPLE_remap_index 470
+#define ObjectPurgeableAPPLE_remap_index 471
+#define ObjectUnpurgeableAPPLE_remap_index 472
+#define ActiveProgramEXT_remap_index 473
+#define CreateShaderProgramEXT_remap_index 474
+#define UseShaderProgramEXT_remap_index 475
+#define TextureBarrierNV_remap_index 476
+#define StencilFuncSeparateATI_remap_index 477
+#define ProgramEnvParameters4fvEXT_remap_index 478
+#define ProgramLocalParameters4fvEXT_remap_index 479
+#define GetQueryObjecti64vEXT_remap_index 480
+#define GetQueryObjectui64vEXT_remap_index 481
+#define EGLImageTargetRenderbufferStorageOES_remap_index 482
+#define EGLImageTargetTexture2DOES_remap_index 483
#define _gloffset_AttachShader driDispatchRemapTable[AttachShader_remap_index]
#define _gloffset_CreateProgram driDispatchRemapTable[CreateProgram_remap_index]
@@ -1595,6 +1617,7 @@ extern int driDispatchRemapTable[ driDispatchRemapTable_size ];
#define _gloffset_FramebufferTextureARB driDispatchRemapTable[FramebufferTextureARB_remap_index]
#define _gloffset_FramebufferTextureFaceARB driDispatchRemapTable[FramebufferTextureFaceARB_remap_index]
#define _gloffset_ProgramParameteriARB driDispatchRemapTable[ProgramParameteriARB_remap_index]
+#define _gloffset_VertexAttribDivisorARB driDispatchRemapTable[VertexAttribDivisorARB_remap_index]
#define _gloffset_FlushMappedBufferRange driDispatchRemapTable[FlushMappedBufferRange_remap_index]
#define _gloffset_MapBufferRange driDispatchRemapTable[MapBufferRange_remap_index]
#define _gloffset_BindVertexArray driDispatchRemapTable[BindVertexArray_remap_index]
@@ -1610,6 +1633,10 @@ extern int driDispatchRemapTable[ driDispatchRemapTable_size ];
#define _gloffset_DrawElementsBaseVertex driDispatchRemapTable[DrawElementsBaseVertex_remap_index]
#define _gloffset_DrawRangeElementsBaseVertex driDispatchRemapTable[DrawRangeElementsBaseVertex_remap_index]
#define _gloffset_MultiDrawElementsBaseVertex driDispatchRemapTable[MultiDrawElementsBaseVertex_remap_index]
+#define _gloffset_BlendEquationSeparateiARB driDispatchRemapTable[BlendEquationSeparateiARB_remap_index]
+#define _gloffset_BlendEquationiARB driDispatchRemapTable[BlendEquationiARB_remap_index]
+#define _gloffset_BlendFuncSeparateiARB driDispatchRemapTable[BlendFuncSeparateiARB_remap_index]
+#define _gloffset_BlendFunciARB driDispatchRemapTable[BlendFunciARB_remap_index]
#define _gloffset_BindTransformFeedback driDispatchRemapTable[BindTransformFeedback_remap_index]
#define _gloffset_DeleteTransformFeedbacks driDispatchRemapTable[DeleteTransformFeedbacks_remap_index]
#define _gloffset_DrawTransformFeedback driDispatchRemapTable[DrawTransformFeedback_remap_index]
@@ -1617,6 +1644,11 @@ extern int driDispatchRemapTable[ driDispatchRemapTable_size ];
#define _gloffset_IsTransformFeedback driDispatchRemapTable[IsTransformFeedback_remap_index]
#define _gloffset_PauseTransformFeedback driDispatchRemapTable[PauseTransformFeedback_remap_index]
#define _gloffset_ResumeTransformFeedback driDispatchRemapTable[ResumeTransformFeedback_remap_index]
+#define _gloffset_ClearDepthf driDispatchRemapTable[ClearDepthf_remap_index]
+#define _gloffset_DepthRangef driDispatchRemapTable[DepthRangef_remap_index]
+#define _gloffset_GetShaderPrecisionFormat driDispatchRemapTable[GetShaderPrecisionFormat_remap_index]
+#define _gloffset_ReleaseShaderCompiler driDispatchRemapTable[ReleaseShaderCompiler_remap_index]
+#define _gloffset_ShaderBinary driDispatchRemapTable[ShaderBinary_remap_index]
#define _gloffset_PolygonOffsetEXT driDispatchRemapTable[PolygonOffsetEXT_remap_index]
#define _gloffset_GetPixelTexGenParameterfvSGIS driDispatchRemapTable[GetPixelTexGenParameterfvSGIS_remap_index]
#define _gloffset_GetPixelTexGenParameterivSGIS driDispatchRemapTable[GetPixelTexGenParameterivSGIS_remap_index]
@@ -1891,6 +1923,7 @@ extern int driDispatchRemapTable[ driDispatchRemapTable_size ];
#define _gloffset_ActiveProgramEXT driDispatchRemapTable[ActiveProgramEXT_remap_index]
#define _gloffset_CreateShaderProgramEXT driDispatchRemapTable[CreateShaderProgramEXT_remap_index]
#define _gloffset_UseShaderProgramEXT driDispatchRemapTable[UseShaderProgramEXT_remap_index]
+#define _gloffset_TextureBarrierNV driDispatchRemapTable[TextureBarrierNV_remap_index]
#define _gloffset_StencilFuncSeparateATI driDispatchRemapTable[StencilFuncSeparateATI_remap_index]
#define _gloffset_ProgramEnvParameters4fvEXT driDispatchRemapTable[ProgramEnvParameters4fvEXT_remap_index]
#define _gloffset_ProgramLocalParameters4fvEXT driDispatchRemapTable[ProgramLocalParameters4fvEXT_remap_index]
@@ -3635,6 +3668,9 @@ extern int driDispatchRemapTable[ driDispatchRemapTable_size ];
#define CALL_ProgramParameteriARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLint)), _gloffset_ProgramParameteriARB, parameters)
#define GET_ProgramParameteriARB(disp) GET_by_offset(disp, _gloffset_ProgramParameteriARB)
#define SET_ProgramParameteriARB(disp, fn) SET_by_offset(disp, _gloffset_ProgramParameteriARB, fn)
+#define CALL_VertexAttribDivisorARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLuint)), _gloffset_VertexAttribDivisorARB, parameters)
+#define GET_VertexAttribDivisorARB(disp) GET_by_offset(disp, _gloffset_VertexAttribDivisorARB)
+#define SET_VertexAttribDivisorARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribDivisorARB, fn)
#define CALL_FlushMappedBufferRange(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLintptr, GLsizeiptr)), _gloffset_FlushMappedBufferRange, parameters)
#define GET_FlushMappedBufferRange(disp) GET_by_offset(disp, _gloffset_FlushMappedBufferRange)
#define SET_FlushMappedBufferRange(disp, fn) SET_by_offset(disp, _gloffset_FlushMappedBufferRange, fn)
@@ -3680,6 +3716,18 @@ extern int driDispatchRemapTable[ driDispatchRemapTable_size ];
#define CALL_MultiDrawElementsBaseVertex(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLsizei *, GLenum, const GLvoid **, GLsizei, const GLint *)), _gloffset_MultiDrawElementsBaseVertex, parameters)
#define GET_MultiDrawElementsBaseVertex(disp) GET_by_offset(disp, _gloffset_MultiDrawElementsBaseVertex)
#define SET_MultiDrawElementsBaseVertex(disp, fn) SET_by_offset(disp, _gloffset_MultiDrawElementsBaseVertex, fn)
+#define CALL_BlendEquationSeparateiARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLenum)), _gloffset_BlendEquationSeparateiARB, parameters)
+#define GET_BlendEquationSeparateiARB(disp) GET_by_offset(disp, _gloffset_BlendEquationSeparateiARB)
+#define SET_BlendEquationSeparateiARB(disp, fn) SET_by_offset(disp, _gloffset_BlendEquationSeparateiARB, fn)
+#define CALL_BlendEquationiARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum)), _gloffset_BlendEquationiARB, parameters)
+#define GET_BlendEquationiARB(disp) GET_by_offset(disp, _gloffset_BlendEquationiARB)
+#define SET_BlendEquationiARB(disp, fn) SET_by_offset(disp, _gloffset_BlendEquationiARB, fn)
+#define CALL_BlendFuncSeparateiARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLenum, GLenum, GLenum)), _gloffset_BlendFuncSeparateiARB, parameters)
+#define GET_BlendFuncSeparateiARB(disp) GET_by_offset(disp, _gloffset_BlendFuncSeparateiARB)
+#define SET_BlendFuncSeparateiARB(disp, fn) SET_by_offset(disp, _gloffset_BlendFuncSeparateiARB, fn)
+#define CALL_BlendFunciARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLenum)), _gloffset_BlendFunciARB, parameters)
+#define GET_BlendFunciARB(disp) GET_by_offset(disp, _gloffset_BlendFunciARB)
+#define SET_BlendFunciARB(disp, fn) SET_by_offset(disp, _gloffset_BlendFunciARB, fn)
#define CALL_BindTransformFeedback(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint)), _gloffset_BindTransformFeedback, parameters)
#define GET_BindTransformFeedback(disp) GET_by_offset(disp, _gloffset_BindTransformFeedback)
#define SET_BindTransformFeedback(disp, fn) SET_by_offset(disp, _gloffset_BindTransformFeedback, fn)
@@ -3701,6 +3749,21 @@ extern int driDispatchRemapTable[ driDispatchRemapTable_size ];
#define CALL_ResumeTransformFeedback(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(void)), _gloffset_ResumeTransformFeedback, parameters)
#define GET_ResumeTransformFeedback(disp) GET_by_offset(disp, _gloffset_ResumeTransformFeedback)
#define SET_ResumeTransformFeedback(disp, fn) SET_by_offset(disp, _gloffset_ResumeTransformFeedback, fn)
+#define CALL_ClearDepthf(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLclampf)), _gloffset_ClearDepthf, parameters)
+#define GET_ClearDepthf(disp) GET_by_offset(disp, _gloffset_ClearDepthf)
+#define SET_ClearDepthf(disp, fn) SET_by_offset(disp, _gloffset_ClearDepthf, fn)
+#define CALL_DepthRangef(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLclampf, GLclampf)), _gloffset_DepthRangef, parameters)
+#define GET_DepthRangef(disp) GET_by_offset(disp, _gloffset_DepthRangef)
+#define SET_DepthRangef(disp, fn) SET_by_offset(disp, _gloffset_DepthRangef, fn)
+#define CALL_GetShaderPrecisionFormat(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint *, GLint *)), _gloffset_GetShaderPrecisionFormat, parameters)
+#define GET_GetShaderPrecisionFormat(disp) GET_by_offset(disp, _gloffset_GetShaderPrecisionFormat)
+#define SET_GetShaderPrecisionFormat(disp, fn) SET_by_offset(disp, _gloffset_GetShaderPrecisionFormat, fn)
+#define CALL_ReleaseShaderCompiler(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(void)), _gloffset_ReleaseShaderCompiler, parameters)
+#define GET_ReleaseShaderCompiler(disp) GET_by_offset(disp, _gloffset_ReleaseShaderCompiler)
+#define SET_ReleaseShaderCompiler(disp, fn) SET_by_offset(disp, _gloffset_ReleaseShaderCompiler, fn)
+#define CALL_ShaderBinary(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, const GLuint *, GLenum, const GLvoid *, GLsizei)), _gloffset_ShaderBinary, parameters)
+#define GET_ShaderBinary(disp) GET_by_offset(disp, _gloffset_ShaderBinary)
+#define SET_ShaderBinary(disp, fn) SET_by_offset(disp, _gloffset_ShaderBinary, fn)
#define CALL_PolygonOffsetEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat)), _gloffset_PolygonOffsetEXT, parameters)
#define GET_PolygonOffsetEXT(disp) GET_by_offset(disp, _gloffset_PolygonOffsetEXT)
#define SET_PolygonOffsetEXT(disp, fn) SET_by_offset(disp, _gloffset_PolygonOffsetEXT, fn)
@@ -4523,6 +4586,9 @@ extern int driDispatchRemapTable[ driDispatchRemapTable_size ];
#define CALL_UseShaderProgramEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint)), _gloffset_UseShaderProgramEXT, parameters)
#define GET_UseShaderProgramEXT(disp) GET_by_offset(disp, _gloffset_UseShaderProgramEXT)
#define SET_UseShaderProgramEXT(disp, fn) SET_by_offset(disp, _gloffset_UseShaderProgramEXT, fn)
+#define CALL_TextureBarrierNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(void)), _gloffset_TextureBarrierNV, parameters)
+#define GET_TextureBarrierNV(disp) GET_by_offset(disp, _gloffset_TextureBarrierNV)
+#define SET_TextureBarrierNV(disp, fn) SET_by_offset(disp, _gloffset_TextureBarrierNV, fn)
#define CALL_StencilFuncSeparateATI(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint, GLuint)), _gloffset_StencilFuncSeparateATI, parameters)
#define GET_StencilFuncSeparateATI(disp) GET_by_offset(disp, _gloffset_StencilFuncSeparateATI)
#define SET_StencilFuncSeparateATI(disp, fn) SET_by_offset(disp, _gloffset_StencilFuncSeparateATI, fn)
diff --git a/src/mesa/main/glheader.h b/src/mesa/main/glheader.h
index 08ad5f32018..0df81198661 100644
--- a/src/mesa/main/glheader.h
+++ b/src/mesa/main/glheader.h
@@ -121,6 +121,10 @@ typedef void *GLeglImageOES;
#define GL_MAX_FRAGMENT_UNIFORM_VECTORS 0x8DFD
#endif
+#ifndef GL_ATI_texture_compression_3dc
+#define GL_ATI_texture_compression_3dc 1
+#define GL_COMPRESSED_LUMINANCE_ALPHA_3DC_ATI 0x8837
+#endif
/**
diff --git a/src/mesa/main/hint.c b/src/mesa/main/hint.c
index 878f10d4a43..ff8d88fffe0 100644
--- a/src/mesa/main/hint.c
+++ b/src/mesa/main/hint.c
@@ -29,6 +29,7 @@
#include "context.h"
#include "hint.h"
#include "imports.h"
+#include "mtypes.h"
@@ -39,8 +40,9 @@ _mesa_Hint( GLenum target, GLenum mode )
ASSERT_OUTSIDE_BEGIN_END(ctx);
if (MESA_VERBOSE & VERBOSE_API)
- _mesa_debug(ctx, "glHint %s %d\n",
- _mesa_lookup_enum_by_nr(target), mode);
+ _mesa_debug(ctx, "glHint %s %s\n",
+ _mesa_lookup_enum_by_nr(target),
+ _mesa_lookup_enum_by_nr(mode));
if (mode != GL_NICEST && mode != GL_FASTEST && mode != GL_DONT_CARE) {
_mesa_error(ctx, GL_INVALID_ENUM, "glHint(mode)");
diff --git a/src/mesa/main/histogram.c b/src/mesa/main/histogram.c
index b98e3219c53..75bb9259416 100644
--- a/src/mesa/main/histogram.c
+++ b/src/mesa/main/histogram.c
@@ -28,6 +28,7 @@
#include "colormac.h"
#include "histogram.h"
#include "macros.h"
+#include "mfeatures.h"
#include "main/dispatch.h"
diff --git a/src/mesa/main/image.c b/src/mesa/main/image.c
index f9f2ed73077..bbde3800e8c 100644
--- a/src/mesa/main/image.c
+++ b/src/mesa/main/image.c
@@ -35,6 +35,8 @@
#include "image.h"
#include "imports.h"
#include "macros.h"
+#include "mfeatures.h"
+#include "mtypes.h"
/**
@@ -66,6 +68,7 @@ _mesa_type_is_packed(GLenum type)
switch (type) {
case GL_UNSIGNED_BYTE_3_3_2:
case GL_UNSIGNED_BYTE_2_3_3_REV:
+ case MESA_UNSIGNED_BYTE_4_4:
case GL_UNSIGNED_SHORT_5_6_5:
case GL_UNSIGNED_SHORT_5_6_5_REV:
case GL_UNSIGNED_SHORT_4_4_4_4:
@@ -192,6 +195,8 @@ _mesa_sizeof_packed_type( GLenum type )
return sizeof(GLubyte);
case GL_UNSIGNED_BYTE_2_3_3_REV:
return sizeof(GLubyte);
+ case MESA_UNSIGNED_BYTE_4_4:
+ return sizeof(GLubyte);
case GL_UNSIGNED_SHORT_5_6_5:
return sizeof(GLushort);
case GL_UNSIGNED_SHORT_5_6_5_REV:
@@ -738,6 +743,11 @@ _mesa_is_color_format(GLenum format)
case GL_COMPRESSED_SIGNED_RED_RGTC1:
case GL_COMPRESSED_RG_RGTC2:
case GL_COMPRESSED_SIGNED_RG_RGTC2:
+ case GL_COMPRESSED_LUMINANCE_LATC1_EXT:
+ case GL_COMPRESSED_SIGNED_LUMINANCE_LATC1_EXT:
+ case GL_COMPRESSED_LUMINANCE_ALPHA_LATC2_EXT:
+ case GL_COMPRESSED_SIGNED_LUMINANCE_ALPHA_LATC2_EXT:
+ case GL_COMPRESSED_LUMINANCE_ALPHA_3DC_ATI:
/* signed, normalized texture formats */
case GL_RGBA_SNORM:
case GL_RGBA8_SNORM:
@@ -1020,6 +1030,13 @@ _mesa_is_compressed_format(struct gl_context *ctx, GLenum format)
case GL_COMPRESSED_RG_RGTC2:
case GL_COMPRESSED_SIGNED_RG_RGTC2:
return ctx->Extensions.ARB_texture_compression_rgtc;
+ case GL_COMPRESSED_LUMINANCE_LATC1_EXT:
+ case GL_COMPRESSED_SIGNED_LUMINANCE_LATC1_EXT:
+ case GL_COMPRESSED_LUMINANCE_ALPHA_LATC2_EXT:
+ case GL_COMPRESSED_SIGNED_LUMINANCE_ALPHA_LATC2_EXT:
+ return ctx->Extensions.EXT_texture_compression_latc;
+ case GL_COMPRESSED_LUMINANCE_ALPHA_3DC_ATI:
+ return ctx->Extensions.ATI_texture_compression_3dc;
default:
return GL_FALSE;
}
@@ -1579,8 +1596,8 @@ _mesa_clip_drawpixels(const struct gl_context *ctx,
* scissor box is ignored, and we use the bounds of the current readbuffer
* surface.
*
- * \return GL_TRUE if image is ready for drawing or
- * GL_FALSE if image was completely clipped away (draw nothing)
+ * \return GL_TRUE if region to read is in bounds
+ * GL_FALSE if region is completely out of bounds (nothing to read)
*/
GLboolean
_mesa_clip_readpixels(const struct gl_context *ctx,
diff --git a/src/mesa/main/imports.c b/src/mesa/main/imports.c
index d662e055b29..2ff21fa2eb5 100644
--- a/src/mesa/main/imports.c
+++ b/src/mesa/main/imports.c
@@ -46,6 +46,7 @@
#include "imports.h"
#include "context.h"
+#include "mtypes.h"
#include "version.h"
#ifdef _GNU_SOURCE
@@ -452,6 +453,7 @@ _mesa_inv_sqrtf(float n)
#endif
}
+#ifndef __GNUC__
/**
* Find the first bit set in a word.
*/
@@ -495,9 +497,6 @@ _mesa_ffs(int32_t i)
int
_mesa_ffsll(int64_t val)
{
-#ifdef ffsll
- return ffsll(val);
-#else
int bit;
assert(sizeof(val) == 8);
@@ -511,27 +510,24 @@ _mesa_ffsll(int64_t val)
return 32 + bit;
return 0;
-#endif
}
+#if ((_GNUC__ == 3 && __GNUC_MINOR__ < 4) || __GNUC__ < 4)
/**
* Return number of bits set in given GLuint.
*/
unsigned int
_mesa_bitcount(unsigned int n)
{
-#if defined(__GNUC__) && \
- ((_GNUC__ == 3 && __GNUC_MINOR__ >= 4) || __GNUC__ >= 4)
- return __builtin_popcount(n);
-#else
unsigned int bits;
for (bits = 0; n > 0; n = n >> 1) {
bits += (n & 1);
}
return bits;
-#endif
}
+#endif
+#endif
/**
@@ -941,7 +937,7 @@ _mesa_problem( const struct gl_context *ctx, const char *fmtString, ... )
va_end( args );
fprintf(stderr, "Mesa %s implementation error: %s\n", MESA_VERSION_STRING, str);
- fprintf(stderr, "Please report at bugzilla.freedesktop.org\n");
+ fprintf(stderr, "Please report at bugs.freedesktop.org\n");
}
diff --git a/src/mesa/main/imports.h b/src/mesa/main/imports.h
index c0686efed28..7c990a4768d 100644
--- a/src/mesa/main/imports.h
+++ b/src/mesa/main/imports.h
@@ -546,6 +546,24 @@ _mesa_inv_sqrtf(float x);
extern void
_mesa_init_sqrt_table(void);
+#ifdef __GNUC__
+
+#ifdef __MINGW32__
+#define ffs __builtin_ffs
+#define ffsll __builtin_ffsll
+#endif
+
+#define _mesa_ffs(i) ffs(i)
+#define _mesa_ffsll(i) ffsll(i)
+
+#if ((_GNUC__ == 3 && __GNUC_MINOR__ >= 4) || __GNUC__ >= 4)
+#define _mesa_bitcount(i) __builtin_popcount(i)
+#else
+extern unsigned int
+_mesa_bitcount(unsigned int n);
+#endif
+
+#else
extern int
_mesa_ffs(int32_t i);
@@ -554,6 +572,7 @@ _mesa_ffsll(int64_t i);
extern unsigned int
_mesa_bitcount(unsigned int n);
+#endif
extern GLhalfARB
_mesa_float_to_half(float f);
diff --git a/src/mesa/main/lines.c b/src/mesa/main/lines.c
index 81e179a9254..79bf5679d8a 100644
--- a/src/mesa/main/lines.c
+++ b/src/mesa/main/lines.c
@@ -43,6 +43,9 @@ _mesa_LineWidth( GLfloat width )
GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_BEGIN_END(ctx);
+ if (MESA_VERBOSE & VERBOSE_API)
+ _mesa_debug(ctx, "glLineWidth %f\n", width);
+
if (width<=0.0) {
_mesa_error( ctx, GL_INVALID_VALUE, "glLineWidth" );
return;
@@ -77,6 +80,9 @@ _mesa_LineStipple( GLint factor, GLushort pattern )
GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_BEGIN_END(ctx);
+ if (MESA_VERBOSE & VERBOSE_API)
+ _mesa_debug(ctx, "glLineStipple %d %u\n", factor, pattern);
+
factor = CLAMP( factor, 1, 256 );
if (ctx->Line.StippleFactor == factor &&
diff --git a/src/mesa/main/matrix.c b/src/mesa/main/matrix.c
index 105d4a327fb..76c7e1c9d1b 100644
--- a/src/mesa/main/matrix.c
+++ b/src/mesa/main/matrix.c
@@ -40,6 +40,7 @@
#include "context.h"
#include "enums.h"
#include "macros.h"
+#include "mfeatures.h"
#include "matrix.h"
#include "mtypes.h"
#include "math/m_matrix.h"
diff --git a/src/mesa/main/mipmap.c b/src/mesa/main/mipmap.c
index ad63b178df8..e594160ad9e 100644
--- a/src/mesa/main/mipmap.c
+++ b/src/mesa/main/mipmap.c
@@ -30,6 +30,7 @@
#include "imports.h"
#include "formats.h"
#include "mipmap.h"
+#include "mtypes.h"
#include "teximage.h"
#include "texstore.h"
#include "image.h"
@@ -611,6 +612,28 @@ do_row(GLenum datatype, GLuint comps, GLint srcWidth,
dst[i] = (blue << 5) | (green << 2) | red;
}
}
+
+ else if (datatype == MESA_UNSIGNED_BYTE_4_4 && comps == 2) {
+ GLuint i, j, k;
+ const GLubyte *rowA = (const GLubyte *) srcRowA;
+ const GLubyte *rowB = (const GLubyte *) srcRowB;
+ GLubyte *dst = (GLubyte *) dstRow;
+ for (i = j = 0, k = k0; i < (GLuint) dstWidth;
+ i++, j += colStride, k += colStride) {
+ const GLint rowAr0 = rowA[j] & 0xf;
+ const GLint rowAr1 = rowA[k] & 0xf;
+ const GLint rowBr0 = rowB[j] & 0xf;
+ const GLint rowBr1 = rowB[k] & 0xf;
+ const GLint rowAg0 = (rowA[j] >> 4) & 0xf;
+ const GLint rowAg1 = (rowA[k] >> 4) & 0xf;
+ const GLint rowBg0 = (rowB[j] >> 4) & 0xf;
+ const GLint rowBg1 = (rowB[k] >> 4) & 0xf;
+ const GLint r = (rowAr0 + rowAr1 + rowBr0 + rowBr1) >> 2;
+ const GLint g = (rowAg0 + rowAg1 + rowBg0 + rowBg1) >> 2;
+ dst[i] = (g << 4) | r;
+ }
+ }
+
else {
_mesa_problem(NULL, "bad format in do_row()");
}
@@ -1077,7 +1100,7 @@ do_row_3D(GLenum datatype, GLuint comps, GLint srcWidth,
}
}
else if ((datatype == GL_UNSIGNED_BYTE_3_3_2) && (comps == 3)) {
- DECLARE_ROW_POINTERS0(GLushort);
+ DECLARE_ROW_POINTERS0(GLubyte);
for (i = j = 0, k = k0; i < (GLuint) dstWidth;
i++, j += colStride, k += colStride) {
@@ -1114,6 +1137,34 @@ do_row_3D(GLenum datatype, GLuint comps, GLint srcWidth,
dst[i] = (b << 5) | (g << 2) | r;
}
}
+ else if (datatype == MESA_UNSIGNED_BYTE_4_4 && comps == 2) {
+ DECLARE_ROW_POINTERS0(GLubyte);
+
+ for (i = j = 0, k = k0; i < (GLuint) dstWidth;
+ i++, j += colStride, k += colStride) {
+ const GLint rowAr0 = rowA[j] & 0xf;
+ const GLint rowAr1 = rowA[k] & 0xf;
+ const GLint rowBr0 = rowB[j] & 0xf;
+ const GLint rowBr1 = rowB[k] & 0xf;
+ const GLint rowCr0 = rowC[j] & 0xf;
+ const GLint rowCr1 = rowC[k] & 0xf;
+ const GLint rowDr0 = rowD[j] & 0xf;
+ const GLint rowDr1 = rowD[k] & 0xf;
+ const GLint rowAg0 = (rowA[j] >> 4) & 0xf;
+ const GLint rowAg1 = (rowA[k] >> 4) & 0xf;
+ const GLint rowBg0 = (rowB[j] >> 4) & 0xf;
+ const GLint rowBg1 = (rowB[k] >> 4) & 0xf;
+ const GLint rowCg0 = (rowC[j] >> 4) & 0xf;
+ const GLint rowCg1 = (rowC[k] >> 4) & 0xf;
+ const GLint rowDg0 = (rowD[j] >> 4) & 0xf;
+ const GLint rowDg1 = (rowD[k] >> 4) & 0xf;
+ const GLint r = FILTER_SUM_3D(rowAr0, rowAr1, rowBr0, rowBr1,
+ rowCr0, rowCr1, rowDr0, rowDr1);
+ const GLint g = FILTER_SUM_3D(rowAg0, rowAg1, rowBg0, rowBg1,
+ rowCg0, rowCg1, rowDg0, rowDg1);
+ dst[i] = (g << 4) | r;
+ }
+ }
else {
_mesa_problem(NULL, "bad format in do_row()");
}
@@ -1704,12 +1755,22 @@ _mesa_generate_mipmap(struct gl_context *ctx, GLenum target,
if (srcImage->_BaseFormat == GL_RGB) {
convertFormat = MESA_FORMAT_RGB888;
components = 3;
- }
- else if (srcImage->_BaseFormat == GL_RGBA) {
+ } else if (srcImage->_BaseFormat == GL_RED) {
+ convertFormat = MESA_FORMAT_R8;
+ components = 1;
+ } else if (srcImage->_BaseFormat == GL_RG) {
+ convertFormat = MESA_FORMAT_RG88;
+ components = 2;
+ } else if (srcImage->_BaseFormat == GL_RGBA) {
convertFormat = MESA_FORMAT_RGBA8888;
components = 4;
- }
- else {
+ } else if (srcImage->_BaseFormat == GL_LUMINANCE) {
+ convertFormat = MESA_FORMAT_L8;
+ components = 1;
+ } else if (srcImage->_BaseFormat == GL_LUMINANCE_ALPHA) {
+ convertFormat = MESA_FORMAT_AL88;
+ components = 2;
+ } else {
_mesa_problem(ctx, "bad srcImage->_BaseFormat in _mesa_generate_mipmaps");
return;
}
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index 1c549a8e247..95a7988d7e4 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -40,6 +40,7 @@
#include "glapi/glapi.h"
#include "math/m_matrix.h" /* GLmatrix */
#include "main/simple_list.h" /* struct simple_node */
+#include "main/formats.h" /* MESA_FORMAT_COUNT */
/**
@@ -83,23 +84,12 @@
/*@{*/
typedef GLuint64 GLbitfield64;
-#define BITFIELD64_ONE 1ULL
-#define BITFIELD64_ALLONES ~0ULL
-
/** Set a single bit */
-#define BITFIELD64_BIT(b) (BITFIELD64_ONE << (b))
-
-/** Set a mask of the least significant \c b bits */
-#define BITFIELD64_MASK(b) (((b) >= 64) ? BITFIELD64_ALLONES : \
- (BITFIELD64_BIT(b) - 1))
-
-/**
- * Set all bits from l (low bit) to h (high bit), inclusive.
- *
- * \note \C BITFIELD_64_RANGE(0, 63) return 64 set bits.
- */
-#define BITFIELD64_RANGE(l, h) (BITFIELD64_MASK((h) + 1) & ~BITFIELD64_MASK(l))
-/*@}*/
+#ifdef __cplusplus
+#define BITFIELD64_BIT(b) (1UL << (b))
+#else
+#define BITFIELD64_BIT(b) (1ULL << (b))
+#endif
/**
@@ -120,6 +110,11 @@ struct st_context;
/*@}*/
+/** Extra draw modes beyond GL_POINTS, GL_TRIANGLE_FAN, etc */
+#define PRIM_OUTSIDE_BEGIN_END (GL_POLYGON+1)
+#define PRIM_INSIDE_UNKNOWN_PRIM (GL_POLYGON+2)
+#define PRIM_UNKNOWN (GL_POLYGON+3)
+
/**
* Shader stages. Note that these will become 5 with tessellation.
@@ -295,8 +290,8 @@ typedef enum
/**
* Indexes for geometry program result attributes
*/
-/*@{*/
-typedef enum {
+typedef enum
+{
GEOM_RESULT_POS = 0,
GEOM_RESULT_COL0 = 1,
GEOM_RESULT_COL1 = 2,
@@ -319,7 +314,7 @@ typedef enum {
/* ### we need to -2 because var0 is 18 instead 16 like in the others */
GEOM_RESULT_MAX = (GEOM_RESULT_VAR0 + MAX_VARYING - 2)
} gl_geom_result;
-/*@}*/
+
/**
* Indexes for fragment program input attributes.
@@ -518,6 +513,9 @@ struct gl_config
GLint bindToMipmapTexture;
GLint bindToTextureTargets;
GLint yInverted;
+
+ /* EXT_framebuffer_sRGB */
+ GLint sRGBCapable;
};
@@ -718,13 +716,20 @@ struct gl_colorbuffer_attrib
*/
/*@{*/
GLbitfield BlendEnabled; /**< Per-buffer blend enable flags */
- GLenum BlendSrcRGB; /**< Blending source operator */
- GLenum BlendDstRGB; /**< Blending destination operator */
- GLenum BlendSrcA; /**< GL_INGR_blend_func_separate */
- GLenum BlendDstA; /**< GL_INGR_blend_func_separate */
- GLenum BlendEquationRGB; /**< Blending equation */
- GLenum BlendEquationA; /**< GL_EXT_blend_equation_separate */
GLfloat BlendColor[4]; /**< Blending color */
+ struct
+ {
+ GLenum SrcRGB; /**< RGB blend source term */
+ GLenum DstRGB; /**< RGB blend dest term */
+ GLenum SrcA; /**< Alpha blend source term */
+ GLenum DstA; /**< Alpha blend dest term */
+ GLenum EquationRGB; /**< GL_ADD, GL_SUBTRACT, etc. */
+ GLenum EquationA; /**< GL_ADD, GL_SUBTRACT, etc. */
+ } Blend[MAX_DRAW_BUFFERS];
+ /** Are the blend func terms currently different for each buffer/target? */
+ GLboolean _BlendFuncPerBuffer;
+ /** Are the blend equations currently different for each buffer/target? */
+ GLboolean _BlendEquationPerBuffer;
/*@}*/
/**
@@ -741,6 +746,8 @@ struct gl_colorbuffer_attrib
GLenum ClampFragmentColor; /**< GL_TRUE, GL_FALSE or GL_FIXED_ONLY_ARB */
GLenum ClampReadColor; /**< GL_TRUE, GL_FALSE or GL_FIXED_ONLY_ARB */
+
+ GLboolean sRGBEnabled; /**< Framebuffer sRGB blending/updating requested */
};
@@ -849,6 +856,23 @@ struct gl_fog_attrib
};
+/**
+ * \brief Layout qualifiers for gl_FragDepth.
+ *
+ * Extension AMD_conservative_depth allows gl_FragDepth to be redeclared with
+ * a layout qualifier.
+ *
+ * \see enum ir_depth_layout
+ */
+enum gl_frag_depth_layout {
+ FRAG_DEPTH_LAYOUT_NONE, /**< No layout is specified. */
+ FRAG_DEPTH_LAYOUT_ANY,
+ FRAG_DEPTH_LAYOUT_GREATER,
+ FRAG_DEPTH_LAYOUT_LESS,
+ FRAG_DEPTH_LAYOUT_UNCHANGED
+};
+
+
/**
* Hint attribute group (GL_HINT_BIT).
*
@@ -1011,10 +1035,6 @@ struct gl_pixel_attrib
/** glPixelZoom */
GLfloat ZoomX, ZoomY;
-
- /** GL_SGI_texture_color_table */
- GLfloat TextureColorTableScale[4]; /**< RGBA */
- GLfloat TextureColorTableBias[4]; /**< RGBA */
};
@@ -1220,7 +1240,7 @@ struct gl_texture_image
* GL_DEPTH_COMPONENT or GL_DEPTH_STENCIL_EXT
* only. Used for choosing TexEnv arithmetic.
*/
- GLuint TexFormat; /**< The actual format: MESA_FORMAT_x */
+ gl_format TexFormat; /**< The actual texture memory format */
GLuint Border; /**< 0 or 1 */
GLuint Width; /**< = 2^WidthLog2 + 2*Border */
@@ -1314,6 +1334,7 @@ struct gl_texture_object
GLboolean _Complete; /**< Is texture object complete? */
GLboolean _RenderToTexture; /**< Any rendering to this texture? */
GLboolean Purgeable; /**< Is the buffer purgeable under memory pressure? */
+ GLenum sRGBDecode; /**< GL_DECODE_EXT or GL_SKIP_DECODE_EXT */
/** Actual texture images, indexed by [cube face] and [mipmap level] */
struct gl_texture_image *Image[MAX_FACES][MAX_TEXTURE_LEVELS];
@@ -1414,13 +1435,6 @@ struct gl_texture_unit
/** Points to highest priority, complete and enabled texture object */
struct gl_texture_object *_Current;
-
- /** GL_SGI_texture_color_table */
- /*@{*/
- struct gl_color_table ColorTable;
- struct gl_color_table ProxyColorTable;
- GLboolean ColorTableEnabled;
- /*@}*/
};
@@ -1545,6 +1559,7 @@ struct gl_client_array
GLboolean Enabled; /**< Enabled flag is a boolean */
GLboolean Normalized; /**< GL_ARB_vertex_program */
GLboolean Integer; /**< Integer-valued? */
+ GLuint InstanceDivisor; /**< GL_ARB_instanced_arrays */
GLuint _ElementSize; /**< size of each element in bytes */
struct gl_buffer_object *BufferObj;/**< GL_ARB_vertex_buffer_object */
@@ -1621,6 +1636,7 @@ struct gl_array_attrib
GLuint RestartIndex;
GLbitfield NewState; /**< mask of _NEW_ARRAY_* values */
+ GLboolean RebindArrays; /**< whether the VBO module should rebind arrays */
/* GL_ARB_vertex_buffer_object */
struct gl_buffer_object *ArrayBufferObj;
@@ -1747,11 +1763,24 @@ typedef enum
PROGRAM_WRITE_ONLY, /**< A dummy, write-only register */
PROGRAM_ADDRESS, /**< machine->AddressReg */
PROGRAM_SAMPLER, /**< for shader samplers, compile-time only */
+ PROGRAM_SYSTEM_VALUE,/**< InstanceId, PrimitiveID, etc. */
PROGRAM_UNDEFINED, /**< Invalid/TBD value */
PROGRAM_FILE_MAX
} gl_register_file;
+/**
+ * If the register file is PROGRAM_SYSTEM_VALUE, the register index will be
+ * one of these values.
+ */
+typedef enum
+{
+ SYSTEM_VALUE_FRONT_FACE, /**< Fragment shader only (not done yet) */
+ SYSTEM_VALUE_INSTANCE_ID, /**< Vertex shader only */
+ SYSTEM_VALUE_MAX /**< Number of values */
+} gl_system_value;
+
+
/** Vertex and fragment instructions */
struct prog_instruction;
struct gl_program_parameter_list;
@@ -1774,6 +1803,7 @@ struct gl_program
GLbitfield InputsRead; /**< Bitmask of which input regs are read */
GLbitfield64 OutputsWritten; /**< Bitmask of which output regs are written */
+ GLbitfield SystemValuesRead; /**< Bitmask of SYSTEM_VALUE_x inputs used */
GLbitfield InputFlags[MAX_PROGRAM_INPUTS]; /**< PROG_PARAM_BIT_x flags */
GLbitfield OutputFlags[MAX_PROGRAM_OUTPUTS]; /**< PROG_PARAM_BIT_x flags */
GLbitfield TexturesUsed[MAX_TEXTURE_UNITS]; /**< TEXTURE_x_BIT bitmask */
@@ -1855,6 +1885,7 @@ struct gl_fragment_program
GLboolean UsesKill; /**< shader uses KIL instruction */
GLboolean OriginUpperLeft;
GLboolean PixelCenterInteger;
+ enum gl_frag_depth_layout FragDepthLayout;
};
@@ -2066,8 +2097,6 @@ struct gl_shader
GLint RefCount; /**< Reference count */
GLboolean DeletePending;
GLboolean CompileStatus;
- GLboolean Main; /**< shader defines main() */
- GLboolean UnresolvedRefs;
const GLchar *Source; /**< Source code string */
GLuint SourceChecksum; /**< for debug/logging purposes */
struct gl_program *Program; /**< Post-compile assembly code */
@@ -2344,13 +2373,15 @@ struct gl_renderbuffer
GLenum InternalFormat; /**< The user-specified format */
GLenum _BaseFormat; /**< Either GL_RGB, GL_RGBA, GL_DEPTH_COMPONENT or
GL_STENCIL_INDEX. */
- GLuint Format; /**< The actual format: MESA_FORMAT_x */
+ gl_format Format; /**< The actual renderbuffer memory format */
GLubyte NumSamples;
GLenum DataType; /**< Type of values passed to the Get/Put functions */
GLvoid *Data; /**< This may not be used by some kinds of RBs */
+ GLboolean AttachedAnytime; /**< TRUE if it was attached to a framebuffer */
+
/* Used to wrap one renderbuffer around another: */
struct gl_renderbuffer *Wrapped;
@@ -2525,7 +2556,18 @@ struct gl_framebuffer
/**
- * Limits for vertex and fragment programs/shaders.
+ * Precision info for shader datatypes. See glGetShaderPrecisionFormat().
+ */
+struct gl_precision
+{
+ GLushort RangeMin; /**< min value exponent */
+ GLushort RangeMax; /**< max value exponent */
+ GLushort Precision; /**< number of mantissa bits */
+};
+
+
+/**
+ * Limits for vertex, geometry and fragment programs/shaders.
*/
struct gl_program_constants
{
@@ -2537,6 +2579,7 @@ struct gl_program_constants
GLuint MaxAttribs;
GLuint MaxTemps;
GLuint MaxAddressRegs;
+ GLuint MaxAddressOffset; /**< [-MaxAddressOffset, MaxAddressOffset-1] */
GLuint MaxParameters;
GLuint MaxLocalParams;
GLuint MaxEnvParams;
@@ -2550,14 +2593,10 @@ struct gl_program_constants
GLuint MaxNativeAddressRegs;
GLuint MaxNativeParameters;
/* For shaders */
- GLuint MaxUniformComponents;
- /* GL_ARB_geometry_shader4 */
- GLuint MaxGeometryTextureImageUnits;
- GLuint MaxGeometryVaryingComponents;
- GLuint MaxVertexVaryingComponents;
- GLuint MaxGeometryUniformComponents;
- GLuint MaxGeometryOutputVertices;
- GLuint MaxGeometryTotalOutputComponents;
+ GLuint MaxUniformComponents; /**< Usually == MaxParameters * 4 */
+ /* ES 2.0 and GL_ARB_ES2_compatibility */
+ struct gl_precision LowFloat, MediumFloat, HighFloat;
+ struct gl_precision LowInt, MediumInt, HighInt;
};
@@ -2577,6 +2616,7 @@ struct gl_constants
GLuint MaxTextureImageUnits;
GLuint MaxVertexTextureImageUnits;
GLuint MaxCombinedTextureImageUnits;
+ GLuint MaxGeometryTextureImageUnits;
GLuint MaxTextureUnits; /**< = MIN(CoordUnits, ImageUnits) */
GLfloat MaxTextureMaxAnisotropy; /**< GL_EXT_texture_filter_anisotropic */
GLfloat MaxTextureLodBias; /**< GL_EXT_texture_lod_bias */
@@ -2616,7 +2656,14 @@ struct gl_constants
GLuint MaxRenderbufferSize; /**< GL_EXT_framebuffer_object */
GLuint MaxSamples; /**< GL_ARB_framebuffer_object */
- GLuint MaxVarying; /**< Number of float[4] varying parameters */
+ /** Number of varying vectors between vertex and fragment shaders */
+ GLuint MaxVarying;
+ GLuint MaxVertexVaryingComponents; /**< Between vert and geom shader */
+ GLuint MaxGeometryVaryingComponents; /**< Between geom and frag shader */
+
+ /** GL_ARB_geometry_shader4 */
+ GLuint MaxGeometryOutputVertices;
+ GLuint MaxGeometryTotalOutputComponents;
GLuint GLSLVersion; /**< GLSL version supported (ex: 120 = 1.20) */
@@ -2644,6 +2691,9 @@ struct gl_constants
/** GL_EXT_gpu_shader4 */
GLint MinProgramTexelOffset, MaxProgramTexelOffset;
+
+ /* GL_EXT_framebuffer_sRGB */
+ GLboolean sRGBCapable; /* can enable sRGB blend/update on FBOs */
};
@@ -2654,12 +2704,16 @@ struct gl_constants
struct gl_extensions
{
GLboolean dummy; /* don't remove this! */
+ GLboolean dummy_true; /* Set true by _mesa_init_extensions(). */
+ GLboolean dummy_false; /* Set false by _mesa_init_extensions(). */
+ GLboolean ARB_ES2_compatibility;
GLboolean ARB_blend_func_extended;
GLboolean ARB_copy_buffer;
GLboolean ARB_depth_buffer_float;
GLboolean ARB_depth_clamp;
GLboolean ARB_depth_texture;
GLboolean ARB_draw_buffers;
+ GLboolean ARB_draw_buffers_blend;
GLboolean ARB_draw_elements_base_vertex;
GLboolean ARB_draw_instanced;
GLboolean ARB_fragment_coord_conventions;
@@ -2753,6 +2807,7 @@ struct gl_extensions
GLboolean EXT_texture_object;
GLboolean EXT_texture3D;
GLboolean EXT_texture_array;
+ GLboolean EXT_texture_compression_latc;
GLboolean EXT_texture_compression_s3tc;
GLboolean EXT_texture_env_add;
GLboolean EXT_texture_env_combine;
@@ -2763,18 +2818,22 @@ struct gl_extensions
GLboolean EXT_texture_mirror_clamp;
GLboolean EXT_texture_shared_exponent;
GLboolean EXT_texture_sRGB;
+ GLboolean EXT_texture_sRGB_decode;
GLboolean EXT_texture_swizzle;
GLboolean EXT_transform_feedback;
GLboolean EXT_timer_query;
GLboolean EXT_vertex_array;
GLboolean EXT_vertex_array_bgra;
GLboolean EXT_vertex_array_set;
+ GLboolean OES_standard_derivatives;
/* vendor extensions */
+ GLboolean AMD_conservative_depth;
GLboolean APPLE_client_storage;
GLboolean APPLE_packed_pixels;
GLboolean APPLE_vertex_array_object;
GLboolean APPLE_object_purgeable;
GLboolean ATI_envmap_bumpmap;
+ GLboolean ATI_texture_compression_3dc;
GLboolean ATI_texture_mirror_once;
GLboolean ATI_texture_env_combine3;
GLboolean ATI_fragment_shader;
@@ -2793,13 +2852,13 @@ struct gl_extensions
GLboolean NV_light_max_exponent;
GLboolean NV_point_sprite;
GLboolean NV_primitive_restart;
+ GLboolean NV_texture_barrier;
GLboolean NV_texgen_reflection;
GLboolean NV_texture_env_combine4;
GLboolean NV_texture_rectangle;
GLboolean NV_vertex_program;
GLboolean NV_vertex_program1_1;
GLboolean OES_read_format;
- GLboolean SGI_texture_color_table;
GLboolean SGIS_generate_mipmap;
GLboolean SGIS_texture_edge_clamp;
GLboolean SGIS_texture_lod;
@@ -2808,6 +2867,7 @@ struct gl_extensions
GLboolean OES_EGL_image;
GLboolean OES_draw_texture;
GLboolean EXT_texture_format_BGRA8888;
+ GLboolean extension_sentinel;
/** The extension string */
const GLubyte *String;
/** Number of supported extensions */
@@ -2846,40 +2906,37 @@ struct gl_matrix_stack
/**
* \name Bits to indicate what state has changed.
- *
- * 4 unused flags.
*/
/*@{*/
-#define _NEW_MODELVIEW 0x1 /**< __struct gl_contextRec::ModelView */
-#define _NEW_PROJECTION 0x2 /**< __struct gl_contextRec::Projection */
-#define _NEW_TEXTURE_MATRIX 0x4 /**< __struct gl_contextRec::TextureMatrix */
-#define _NEW_ACCUM 0x10 /**< __struct gl_contextRec::Accum */
-#define _NEW_COLOR 0x20 /**< __struct gl_contextRec::Color */
-#define _NEW_DEPTH 0x40 /**< __struct gl_contextRec::Depth */
-#define _NEW_EVAL 0x80 /**< __struct gl_contextRec::Eval, __struct gl_contextRec::EvalMap */
-#define _NEW_FOG 0x100 /**< __struct gl_contextRec::Fog */
-#define _NEW_HINT 0x200 /**< __struct gl_contextRec::Hint */
-#define _NEW_LIGHT 0x400 /**< __struct gl_contextRec::Light */
-#define _NEW_LINE 0x800 /**< __struct gl_contextRec::Line */
-#define _NEW_PIXEL 0x1000 /**< __struct gl_contextRec::Pixel */
-#define _NEW_POINT 0x2000 /**< __struct gl_contextRec::Point */
-#define _NEW_POLYGON 0x4000 /**< __struct gl_contextRec::Polygon */
-#define _NEW_POLYGONSTIPPLE 0x8000 /**< __struct gl_contextRec::PolygonStipple */
-#define _NEW_SCISSOR 0x10000 /**< __struct gl_contextRec::Scissor */
-#define _NEW_STENCIL 0x20000 /**< __struct gl_contextRec::Stencil */
-#define _NEW_TEXTURE 0x40000 /**< __struct gl_contextRec::Texture */
-#define _NEW_TRANSFORM 0x80000 /**< __struct gl_contextRec::Transform */
-#define _NEW_VIEWPORT 0x100000 /**< __struct gl_contextRec::Viewport */
-#define _NEW_PACKUNPACK 0x200000 /**< __struct gl_contextRec::Pack, __struct gl_contextRec::Unpack */
-#define _NEW_ARRAY 0x400000 /**< __struct gl_contextRec::Array */
-#define _NEW_RENDERMODE 0x800000 /**< __struct gl_contextRec::RenderMode, __struct gl_contextRec::Feedback, __struct gl_contextRec::Select */
-#define _NEW_BUFFERS 0x1000000 /**< __struct gl_contextRec::Visual, __struct gl_contextRec::DrawBuffer, */
-#define _NEW_MULTISAMPLE 0x2000000 /**< __struct gl_contextRec::Multisample */
-#define _NEW_TRACK_MATRIX 0x4000000 /**< __struct gl_contextRec::VertexProgram */
-#define _NEW_PROGRAM 0x8000000 /**< __struct gl_contextRec::VertexProgram */
-#define _NEW_CURRENT_ATTRIB 0x10000000 /**< __struct gl_contextRec::Current */
-#define _NEW_PROGRAM_CONSTANTS 0x20000000
-#define _NEW_BUFFER_OBJECT 0x40000000
+#define _NEW_MODELVIEW (1 << 0) /**< gl_context::ModelView */
+#define _NEW_PROJECTION (1 << 1) /**< gl_context::Projection */
+#define _NEW_TEXTURE_MATRIX (1 << 2) /**< gl_context::TextureMatrix */
+#define _NEW_COLOR (1 << 3) /**< gl_context::Color */
+#define _NEW_DEPTH (1 << 4) /**< gl_context::Depth */
+#define _NEW_EVAL (1 << 5) /**< gl_context::Eval, EvalMap */
+#define _NEW_FOG (1 << 6) /**< gl_context::Fog */
+#define _NEW_HINT (1 << 7) /**< gl_context::Hint */
+#define _NEW_LIGHT (1 << 8) /**< gl_context::Light */
+#define _NEW_LINE (1 << 9) /**< gl_context::Line */
+#define _NEW_PIXEL (1 << 10) /**< gl_context::Pixel */
+#define _NEW_POINT (1 << 11) /**< gl_context::Point */
+#define _NEW_POLYGON (1 << 12) /**< gl_context::Polygon */
+#define _NEW_POLYGONSTIPPLE (1 << 13) /**< gl_context::PolygonStipple */
+#define _NEW_SCISSOR (1 << 14) /**< gl_context::Scissor */
+#define _NEW_STENCIL (1 << 15) /**< gl_context::Stencil */
+#define _NEW_TEXTURE (1 << 16) /**< gl_context::Texture */
+#define _NEW_TRANSFORM (1 << 17) /**< gl_context::Transform */
+#define _NEW_VIEWPORT (1 << 18) /**< gl_context::Viewport */
+#define _NEW_PACKUNPACK (1 << 19) /**< gl_context::Pack, Unpack */
+#define _NEW_ARRAY (1 << 20) /**< gl_context::Array */
+#define _NEW_RENDERMODE (1 << 21) /**< gl_context::RenderMode, etc */
+#define _NEW_BUFFERS (1 << 22) /**< gl_context::Visual, DrawBuffer, */
+#define _NEW_CURRENT_ATTRIB (1 << 23) /**< gl_context::Current */
+#define _NEW_MULTISAMPLE (1 << 24) /**< gl_context::Multisample */
+#define _NEW_TRACK_MATRIX (1 << 25) /**< gl_context::VertexProgram */
+#define _NEW_PROGRAM (1 << 26) /**< New program/shader state */
+#define _NEW_PROGRAM_CONSTANTS (1 << 27)
+#define _NEW_BUFFER_OBJECT (1 << 28)
#define _NEW_ALL ~0
/*@}*/
@@ -3043,15 +3100,18 @@ struct gl_dlist_state
} Current;
};
+
/**
* Enum for the OpenGL APIs we know about and may support.
*/
-typedef enum {
+typedef enum
+{
API_OPENGL,
API_OPENGLES,
API_OPENGLES2
} gl_api;
+
/**
* Mesa rendering context.
*
@@ -3234,12 +3294,11 @@ struct gl_context
GLboolean FirstTimeCurrent;
/*@}*/
- /** Dither disable via MESA_NO_DITHER env var */
- GLboolean NoDither;
-
/** software compression/decompression supported or not */
GLboolean Mesa_DXTn;
+ GLboolean TextureFormatSupported[MESA_FORMAT_COUNT];
+
/**
* Use dp4 (rather than mul/mad) instructions for position
* transformation?
@@ -3262,10 +3321,6 @@ struct gl_context
};
-/** The string names for GL_POINT, GL_LINE_LOOP, etc */
-extern const char *_mesa_prim_name[GL_POLYGON+4];
-
-
#ifdef DEBUG
extern int MESA_VERBOSE;
extern int MESA_DEBUG_FLAGS;
diff --git a/src/mesa/main/multisample.c b/src/mesa/main/multisample.c
index 5487d45f56b..67fdb8c9db9 100644
--- a/src/mesa/main/multisample.c
+++ b/src/mesa/main/multisample.c
@@ -27,6 +27,7 @@
#include "main/context.h"
#include "main/macros.h"
#include "main/multisample.h"
+#include "main/mtypes.h"
/**
diff --git a/src/mesa/main/nvprogram.c b/src/mesa/main/nvprogram.c
index 36cea3bb9a6..dd198b8141a 100644
--- a/src/mesa/main/nvprogram.c
+++ b/src/mesa/main/nvprogram.c
@@ -42,6 +42,7 @@
#include "main/hash.h"
#include "main/imports.h"
#include "main/macros.h"
+#include "main/mtypes.h"
#include "main/nvprogram.h"
#include "program/arbprogparse.h"
#include "program/nvfragparse.h"
diff --git a/src/mesa/main/pack.c b/src/mesa/main/pack.c
index 6d524e64908..512835cb803 100644
--- a/src/mesa/main/pack.c
+++ b/src/mesa/main/pack.c
@@ -34,6 +34,7 @@
#include "enums.h"
#include "image.h"
#include "imports.h"
+#include "mtypes.h"
#include "pack.h"
#include "pixeltransfer.h"
#include "imports.h"
diff --git a/src/mesa/main/pbo.c b/src/mesa/main/pbo.c
new file mode 100644
index 00000000000..dc00d423ba9
--- /dev/null
+++ b/src/mesa/main/pbo.c
@@ -0,0 +1,372 @@
+/*
+ * Mesa 3-D graphics library
+ *
+ * Copyright (C) 1999-2008 Brian Paul All Rights Reserved.
+ * Copyright (C) 2009-2011 VMware, Inc. All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+
+/**
+ * \file pbo.c
+ * \brief Functions related to Pixel Buffer Objects.
+ */
+
+
+
+#include "glheader.h"
+#include "bufferobj.h"
+#include "image.h"
+#include "imports.h"
+#include "mtypes.h"
+#include "pbo.h"
+
+
+
+/**
+ * When we're about to read pixel data out of a PBO (via glDrawPixels,
+ * glTexImage, etc) or write data into a PBO (via glReadPixels,
+ * glGetTexImage, etc) we call this function to check that we're not
+ * going to read out of bounds.
+ *
+ * XXX This would also be a convenient time to check that the PBO isn't
+ * currently mapped. Whoever calls this function should check for that.
+ * Remember, we can't use a PBO when it's mapped!
+ *
+ * If we're not using a PBO, this is a no-op.
+ *
+ * \param width width of image to read/write
+ * \param height height of image to read/write
+ * \param depth depth of image to read/write
+ * \param format format of image to read/write
+ * \param type datatype of image to read/write
+ * \param ptr the user-provided pointer/offset
+ * \return GL_TRUE if the PBO access is OK, GL_FALSE if the access would
+ * go out of bounds.
+ */
+GLboolean
+_mesa_validate_pbo_access(GLuint dimensions,
+ const struct gl_pixelstore_attrib *pack,
+ GLsizei width, GLsizei height, GLsizei depth,
+ GLenum format, GLenum type, const GLvoid *ptr)
+{
+ GLvoid *start, *end;
+ const GLubyte *sizeAddr; /* buffer size, cast to a pointer */
+
+ if (!_mesa_is_bufferobj(pack->BufferObj))
+ return GL_TRUE; /* no PBO, OK */
+
+ if (pack->BufferObj->Size == 0)
+ /* no buffer! */
+ return GL_FALSE;
+
+ /* get address of first pixel we'll read */
+ start = _mesa_image_address(dimensions, pack, ptr, width, height,
+ format, type, 0, 0, 0);
+
+ /* get address just past the last pixel we'll read */
+ end = _mesa_image_address(dimensions, pack, ptr, width, height,
+ format, type, depth-1, height-1, width);
+
+
+ sizeAddr = ((const GLubyte *) 0) + pack->BufferObj->Size;
+
+ if ((const GLubyte *) start > sizeAddr) {
+ /* This will catch negative values / wrap-around */
+ return GL_FALSE;
+ }
+ if ((const GLubyte *) end > sizeAddr) {
+ /* Image read goes beyond end of buffer */
+ return GL_FALSE;
+ }
+
+ /* OK! */
+ return GL_TRUE;
+}
+
+
+/**
+ * For commands that read from a PBO (glDrawPixels, glTexImage,
+ * glPolygonStipple, etc), if we're reading from a PBO, map it read-only
+ * and return the pointer into the PBO. If we're not reading from a
+ * PBO, return \p src as-is.
+ * If non-null return, must call _mesa_unmap_pbo_source() when done.
+ *
+ * \return NULL if error, else pointer to start of data
+ */
+const GLvoid *
+_mesa_map_pbo_source(struct gl_context *ctx,
+ const struct gl_pixelstore_attrib *unpack,
+ const GLvoid *src)
+{
+ const GLubyte *buf;
+
+ if (_mesa_is_bufferobj(unpack->BufferObj)) {
+ /* unpack from PBO */
+ buf = (GLubyte *) ctx->Driver.MapBuffer(ctx, GL_PIXEL_UNPACK_BUFFER_EXT,
+ GL_READ_ONLY_ARB,
+ unpack->BufferObj);
+ if (!buf)
+ return NULL;
+
+ buf = ADD_POINTERS(buf, src);
+ }
+ else {
+ /* unpack from normal memory */
+ buf = src;
+ }
+
+ return buf;
+}
+
+
+/**
+ * Combine PBO-read validation and mapping.
+ * If any GL errors are detected, they'll be recorded and NULL returned.
+ * \sa _mesa_validate_pbo_access
+ * \sa _mesa_map_pbo_source
+ * A call to this function should have a matching call to
+ * _mesa_unmap_pbo_source().
+ */
+const GLvoid *
+_mesa_map_validate_pbo_source(struct gl_context *ctx,
+ GLuint dimensions,
+ const struct gl_pixelstore_attrib *unpack,
+ GLsizei width, GLsizei height, GLsizei depth,
+ GLenum format, GLenum type, const GLvoid *ptr,
+ const char *where)
+{
+ ASSERT(dimensions == 1 || dimensions == 2 || dimensions == 3);
+
+ if (!_mesa_is_bufferobj(unpack->BufferObj)) {
+ /* non-PBO access: no validation to be done */
+ return ptr;
+ }
+
+ if (!_mesa_validate_pbo_access(dimensions, unpack,
+ width, height, depth, format, type, ptr)) {
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "%s(out of bounds PBO access)", where);
+ return NULL;
+ }
+
+ if (_mesa_bufferobj_mapped(unpack->BufferObj)) {
+ /* buffer is already mapped - that's an error */
+ _mesa_error(ctx, GL_INVALID_OPERATION, "%s(PBO is mapped)", where);
+ return NULL;
+ }
+
+ ptr = _mesa_map_pbo_source(ctx, unpack, ptr);
+ return ptr;
+}
+
+
+/**
+ * Counterpart to _mesa_map_pbo_source()
+ */
+void
+_mesa_unmap_pbo_source(struct gl_context *ctx,
+ const struct gl_pixelstore_attrib *unpack)
+{
+ ASSERT(unpack != &ctx->Pack); /* catch pack/unpack mismatch */
+ if (_mesa_is_bufferobj(unpack->BufferObj)) {
+ ctx->Driver.UnmapBuffer(ctx, GL_PIXEL_UNPACK_BUFFER_EXT,
+ unpack->BufferObj);
+ }
+}
+
+
+/**
+ * For commands that write to a PBO (glReadPixels, glGetColorTable, etc),
+ * if we're writing to a PBO, map it write-only and return the pointer
+ * into the PBO. If we're not writing to a PBO, return \p dst as-is.
+ * If non-null return, must call _mesa_unmap_pbo_dest() when done.
+ *
+ * \return NULL if error, else pointer to start of data
+ */
+void *
+_mesa_map_pbo_dest(struct gl_context *ctx,
+ const struct gl_pixelstore_attrib *pack,
+ GLvoid *dest)
+{
+ void *buf;
+
+ if (_mesa_is_bufferobj(pack->BufferObj)) {
+ /* pack into PBO */
+ buf = (GLubyte *) ctx->Driver.MapBuffer(ctx, GL_PIXEL_PACK_BUFFER_EXT,
+ GL_WRITE_ONLY_ARB,
+ pack->BufferObj);
+ if (!buf)
+ return NULL;
+
+ buf = ADD_POINTERS(buf, dest);
+ }
+ else {
+ /* pack to normal memory */
+ buf = dest;
+ }
+
+ return buf;
+}
+
+
+/**
+ * Combine PBO-write validation and mapping.
+ * If any GL errors are detected, they'll be recorded and NULL returned.
+ * \sa _mesa_validate_pbo_access
+ * \sa _mesa_map_pbo_dest
+ * A call to this function should have a matching call to
+ * _mesa_unmap_pbo_dest().
+ */
+GLvoid *
+_mesa_map_validate_pbo_dest(struct gl_context *ctx,
+ GLuint dimensions,
+ const struct gl_pixelstore_attrib *unpack,
+ GLsizei width, GLsizei height, GLsizei depth,
+ GLenum format, GLenum type, GLvoid *ptr,
+ const char *where)
+{
+ ASSERT(dimensions == 1 || dimensions == 2 || dimensions == 3);
+
+ if (!_mesa_is_bufferobj(unpack->BufferObj)) {
+ /* non-PBO access: no validation to be done */
+ return ptr;
+ }
+
+ if (!_mesa_validate_pbo_access(dimensions, unpack,
+ width, height, depth, format, type, ptr)) {
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "%s(out of bounds PBO access)", where);
+ return NULL;
+ }
+
+ if (_mesa_bufferobj_mapped(unpack->BufferObj)) {
+ /* buffer is already mapped - that's an error */
+ _mesa_error(ctx, GL_INVALID_OPERATION, "%s(PBO is mapped)", where);
+ return NULL;
+ }
+
+ ptr = _mesa_map_pbo_dest(ctx, unpack, ptr);
+ return ptr;
+}
+
+
+/**
+ * Counterpart to _mesa_map_pbo_dest()
+ */
+void
+_mesa_unmap_pbo_dest(struct gl_context *ctx,
+ const struct gl_pixelstore_attrib *pack)
+{
+ ASSERT(pack != &ctx->Unpack); /* catch pack/unpack mismatch */
+ if (_mesa_is_bufferobj(pack->BufferObj)) {
+ ctx->Driver.UnmapBuffer(ctx, GL_PIXEL_PACK_BUFFER_EXT, pack->BufferObj);
+ }
+}
+
+
+
+/**
+ * Check if an unpack PBO is active prior to fetching a texture image.
+ * If so, do bounds checking and map the buffer into main memory.
+ * Any errors detected will be recorded.
+ * The caller _must_ call _mesa_unmap_teximage_pbo() too!
+ */
+const GLvoid *
+_mesa_validate_pbo_teximage(struct gl_context *ctx, GLuint dimensions,
+ GLsizei width, GLsizei height, GLsizei depth,
+ GLenum format, GLenum type, const GLvoid *pixels,
+ const struct gl_pixelstore_attrib *unpack,
+ const char *funcName)
+{
+ GLubyte *buf;
+
+ if (!_mesa_is_bufferobj(unpack->BufferObj)) {
+ /* no PBO */
+ return pixels;
+ }
+ if (!_mesa_validate_pbo_access(dimensions, unpack, width, height, depth,
+ format, type, pixels)) {
+ _mesa_error(ctx, GL_INVALID_OPERATION, funcName, "(invalid PBO access)");
+ return NULL;
+ }
+
+ buf = (GLubyte *) ctx->Driver.MapBuffer(ctx, GL_PIXEL_UNPACK_BUFFER_EXT,
+ GL_READ_ONLY_ARB, unpack->BufferObj);
+ if (!buf) {
+ _mesa_error(ctx, GL_INVALID_OPERATION, funcName, "(PBO is mapped)");
+ return NULL;
+ }
+
+ return ADD_POINTERS(buf, pixels);
+}
+
+
+/**
+ * Check if an unpack PBO is active prior to fetching a compressed texture
+ * image.
+ * If so, do bounds checking and map the buffer into main memory.
+ * Any errors detected will be recorded.
+ * The caller _must_ call _mesa_unmap_teximage_pbo() too!
+ */
+const GLvoid *
+_mesa_validate_pbo_compressed_teximage(struct gl_context *ctx,
+ GLsizei imageSize, const GLvoid *pixels,
+ const struct gl_pixelstore_attrib *packing,
+ const char *funcName)
+{
+ GLubyte *buf;
+
+ if (!_mesa_is_bufferobj(packing->BufferObj)) {
+ /* not using a PBO - return pointer unchanged */
+ return pixels;
+ }
+ if ((const GLubyte *) pixels + imageSize >
+ ((const GLubyte *) 0) + packing->BufferObj->Size) {
+ /* out of bounds read! */
+ _mesa_error(ctx, GL_INVALID_OPERATION, funcName, "(invalid PBO access)");
+ return NULL;
+ }
+
+ buf = (GLubyte*) ctx->Driver.MapBuffer(ctx, GL_PIXEL_UNPACK_BUFFER_EXT,
+ GL_READ_ONLY_ARB, packing->BufferObj);
+ if (!buf) {
+ _mesa_error(ctx, GL_INVALID_OPERATION, funcName, "(PBO is mapped");
+ return NULL;
+ }
+
+ return ADD_POINTERS(buf, pixels);
+}
+
+
+/**
+ * This function must be called after either of the validate_pbo_*_teximage()
+ * functions. It unmaps the PBO buffer if it was mapped earlier.
+ */
+void
+_mesa_unmap_teximage_pbo(struct gl_context *ctx,
+ const struct gl_pixelstore_attrib *unpack)
+{
+ if (_mesa_is_bufferobj(unpack->BufferObj)) {
+ ctx->Driver.UnmapBuffer(ctx, GL_PIXEL_UNPACK_BUFFER_EXT,
+ unpack->BufferObj);
+ }
+}
+
+
diff --git a/src/mesa/main/pbo.h b/src/mesa/main/pbo.h
new file mode 100644
index 00000000000..0cddd72ba7f
--- /dev/null
+++ b/src/mesa/main/pbo.h
@@ -0,0 +1,92 @@
+/*
+ * Mesa 3-D graphics library
+ *
+ * Copyright (C) 1999-2008 Brian Paul All Rights Reserved.
+ * Copyright (C) 2009-2011 VMware, Inc. All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+
+#ifndef PBO_H
+#define PBO_H
+
+
+#include "mtypes.h"
+
+
+extern GLboolean
+_mesa_validate_pbo_access(GLuint dimensions,
+ const struct gl_pixelstore_attrib *pack,
+ GLsizei width, GLsizei height, GLsizei depth,
+ GLenum format, GLenum type, const GLvoid *ptr);
+
+extern const GLvoid *
+_mesa_map_pbo_source(struct gl_context *ctx,
+ const struct gl_pixelstore_attrib *unpack,
+ const GLvoid *src);
+
+extern const GLvoid *
+_mesa_map_validate_pbo_source(struct gl_context *ctx,
+ GLuint dimensions,
+ const struct gl_pixelstore_attrib *unpack,
+ GLsizei width, GLsizei height, GLsizei depth,
+ GLenum format, GLenum type, const GLvoid *ptr,
+ const char *where);
+
+extern void
+_mesa_unmap_pbo_source(struct gl_context *ctx,
+ const struct gl_pixelstore_attrib *unpack);
+
+extern void *
+_mesa_map_pbo_dest(struct gl_context *ctx,
+ const struct gl_pixelstore_attrib *pack,
+ GLvoid *dest);
+
+extern GLvoid *
+_mesa_map_validate_pbo_dest(struct gl_context *ctx,
+ GLuint dimensions,
+ const struct gl_pixelstore_attrib *unpack,
+ GLsizei width, GLsizei height, GLsizei depth,
+ GLenum format, GLenum type, GLvoid *ptr,
+ const char *where);
+
+extern void
+_mesa_unmap_pbo_dest(struct gl_context *ctx,
+ const struct gl_pixelstore_attrib *pack);
+
+
+extern const GLvoid *
+_mesa_validate_pbo_teximage(struct gl_context *ctx, GLuint dimensions,
+ GLsizei width, GLsizei height, GLsizei depth,
+ GLenum format, GLenum type, const GLvoid *pixels,
+ const struct gl_pixelstore_attrib *unpack,
+ const char *funcName);
+
+extern const GLvoid *
+_mesa_validate_pbo_compressed_teximage(struct gl_context *ctx,
+ GLsizei imageSize, const GLvoid *pixels,
+ const struct gl_pixelstore_attrib *packing,
+ const char *funcName);
+
+extern void
+_mesa_unmap_teximage_pbo(struct gl_context *ctx,
+ const struct gl_pixelstore_attrib *unpack);
+
+
+#endif
diff --git a/src/mesa/main/pixel.c b/src/mesa/main/pixel.c
index 5f824b34294..195fa234be2 100644
--- a/src/mesa/main/pixel.c
+++ b/src/mesa/main/pixel.c
@@ -33,7 +33,9 @@
#include "colormac.h"
#include "context.h"
#include "macros.h"
+#include "mfeatures.h"
#include "pixel.h"
+#include "pbo.h"
#include "mtypes.h"
#include "main/dispatch.h"
@@ -684,9 +686,6 @@ _mesa_init_pixel( struct gl_context *ctx )
init_pixelmap(&ctx->PixelMaps.GtoG);
init_pixelmap(&ctx->PixelMaps.BtoB);
init_pixelmap(&ctx->PixelMaps.AtoA);
- /* GL_SGI_texture_color_table */
- ASSIGN_4V(ctx->Pixel.TextureColorTableScale, 1.0, 1.0, 1.0, 1.0);
- ASSIGN_4V(ctx->Pixel.TextureColorTableBias, 0.0, 0.0, 0.0, 0.0);
if (ctx->Visual.doubleBufferMode) {
ctx->Pixel.ReadBuffer = GL_BACK;
diff --git a/src/mesa/main/pixelstore.c b/src/mesa/main/pixelstore.c
index b16d27a4ea5..9d78eec7fea 100644
--- a/src/mesa/main/pixelstore.c
+++ b/src/mesa/main/pixelstore.c
@@ -32,6 +32,7 @@
#include "bufferobj.h"
#include "context.h"
#include "pixelstore.h"
+#include "mfeatures.h"
#include "mtypes.h"
diff --git a/src/mesa/main/pixeltransfer.c b/src/mesa/main/pixeltransfer.c
index 711181fd89e..c1832972f5b 100644
--- a/src/mesa/main/pixeltransfer.c
+++ b/src/mesa/main/pixeltransfer.c
@@ -33,6 +33,7 @@
#include "colormac.h"
#include "pixeltransfer.h"
#include "imports.h"
+#include "mtypes.h"
/*
diff --git a/src/mesa/main/polygon.c b/src/mesa/main/polygon.c
index 9c213b9b4c0..ff4232ecc39 100644
--- a/src/mesa/main/polygon.c
+++ b/src/mesa/main/polygon.c
@@ -30,11 +30,11 @@
#include "glheader.h"
#include "imports.h"
-#include "bufferobj.h"
#include "context.h"
#include "image.h"
#include "enums.h"
#include "pack.h"
+#include "pbo.h"
#include "polygon.h"
#include "mtypes.h"
diff --git a/src/mesa/main/queryobj.c b/src/mesa/main/queryobj.c
index 88743977206..e9cf5f64d08 100644
--- a/src/mesa/main/queryobj.c
+++ b/src/mesa/main/queryobj.c
@@ -25,9 +25,11 @@
#include "glheader.h"
#include "context.h"
+#include "enums.h"
#include "hash.h"
#include "imports.h"
#include "queryobj.h"
+#include "mfeatures.h"
#include "mtypes.h"
#include "main/dispatch.h"
@@ -143,6 +145,11 @@ get_query_binding_point(struct gl_context *ctx, GLenum target)
return &ctx->Query.CurrentOcclusionObject;
else
return NULL;
+ case GL_ANY_SAMPLES_PASSED:
+ if (ctx->Extensions.ARB_occlusion_query2)
+ return &ctx->Query.CurrentOcclusionObject;
+ else
+ return NULL;
case GL_TIME_ELAPSED_EXT:
if (ctx->Extensions.EXT_timer_query)
return &ctx->Query.CurrentTimerObject;
@@ -173,6 +180,9 @@ _mesa_GenQueriesARB(GLsizei n, GLuint *ids)
GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_BEGIN_END(ctx);
+ if (MESA_VERBOSE & VERBOSE_API)
+ _mesa_debug(ctx, "glGenQueries(%d)\n", n);
+
if (n < 0) {
_mesa_error(ctx, GL_INVALID_VALUE, "glGenQueriesARB(n < 0)");
return;
@@ -208,6 +218,10 @@ _mesa_DeleteQueriesARB(GLsizei n, const GLuint *ids)
GLint i;
GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_BEGIN_END(ctx);
+ FLUSH_VERTICES(ctx, 0);
+
+ if (MESA_VERBOSE & VERBOSE_API)
+ _mesa_debug(ctx, "glDeleeteQueries(%d)\n", n);
if (n < 0) {
_mesa_error(ctx, GL_INVALID_VALUE, "glDeleteQueriesARB(n < 0)");
@@ -240,6 +254,9 @@ _mesa_IsQueryARB(GLuint id)
GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, GL_FALSE);
+ if (MESA_VERBOSE & VERBOSE_API)
+ _mesa_debug(ctx, "glIsQuery(%u)\n", id);
+
if (id && _mesa_lookup_query_object(ctx, id))
return GL_TRUE;
else
@@ -254,6 +271,10 @@ _mesa_BeginQueryARB(GLenum target, GLuint id)
GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_BEGIN_END(ctx);
+ if (MESA_VERBOSE & VERBOSE_API)
+ _mesa_debug(ctx, "glBeginQuery(%s, %u)\n",
+ _mesa_lookup_enum_by_nr(target), id);
+
FLUSH_VERTICES(ctx, _NEW_DEPTH);
bindpt = get_query_binding_point(ctx, target);
@@ -305,6 +326,9 @@ _mesa_EndQueryARB(GLenum target)
GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_BEGIN_END(ctx);
+ if (MESA_VERBOSE & VERBOSE_API)
+ _mesa_debug(ctx, "glEndQuery(%s)\n", _mesa_lookup_enum_by_nr(target));
+
FLUSH_VERTICES(ctx, _NEW_DEPTH);
bindpt = get_query_binding_point(ctx, target);
@@ -335,6 +359,11 @@ _mesa_GetQueryivARB(GLenum target, GLenum pname, GLint *params)
GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_BEGIN_END(ctx);
+ if (MESA_VERBOSE & VERBOSE_API)
+ _mesa_debug(ctx, "glGetQueryiv(%s, %s)\n",
+ _mesa_lookup_enum_by_nr(target),
+ _mesa_lookup_enum_by_nr(pname));
+
bindpt = get_query_binding_point(ctx, target);
if (!bindpt) {
_mesa_error(ctx, GL_INVALID_ENUM, "glGetQueryARB(target)");
@@ -364,6 +393,10 @@ _mesa_GetQueryObjectivARB(GLuint id, GLenum pname, GLint *params)
GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_BEGIN_END(ctx);
+ if (MESA_VERBOSE & VERBOSE_API)
+ _mesa_debug(ctx, "glGetQueryObjectiv(%u, %s)\n", id,
+ _mesa_lookup_enum_by_nr(pname));
+
if (id)
q = _mesa_lookup_query_object(ctx, id);
@@ -378,11 +411,18 @@ _mesa_GetQueryObjectivARB(GLuint id, GLenum pname, GLint *params)
if (!q->Ready)
ctx->Driver.WaitQuery(ctx, q);
/* if result is too large for returned type, clamp to max value */
- if (q->Result > 0x7fffffff) {
- *params = 0x7fffffff;
- }
- else {
- *params = (GLint)q->Result;
+ if (q->Target == GL_ANY_SAMPLES_PASSED) {
+ if (q->Result)
+ *params = GL_TRUE;
+ else
+ *params = GL_FALSE;
+ } else {
+ if (q->Result > 0x7fffffff) {
+ *params = 0x7fffffff;
+ }
+ else {
+ *params = (GLint)q->Result;
+ }
}
break;
case GL_QUERY_RESULT_AVAILABLE_ARB:
@@ -404,6 +444,10 @@ _mesa_GetQueryObjectuivARB(GLuint id, GLenum pname, GLuint *params)
GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_BEGIN_END(ctx);
+ if (MESA_VERBOSE & VERBOSE_API)
+ _mesa_debug(ctx, "glGetQueryObjectuiv(%u, %s)\n", id,
+ _mesa_lookup_enum_by_nr(pname));
+
if (id)
q = _mesa_lookup_query_object(ctx, id);
@@ -418,11 +462,18 @@ _mesa_GetQueryObjectuivARB(GLuint id, GLenum pname, GLuint *params)
if (!q->Ready)
ctx->Driver.WaitQuery(ctx, q);
/* if result is too large for returned type, clamp to max value */
- if (q->Result > 0xffffffff) {
- *params = 0xffffffff;
- }
- else {
- *params = (GLuint)q->Result;
+ if (q->Target == GL_ANY_SAMPLES_PASSED) {
+ if (q->Result)
+ *params = GL_TRUE;
+ else
+ *params = GL_FALSE;
+ } else {
+ if (q->Result > 0xffffffff) {
+ *params = 0xffffffff;
+ }
+ else {
+ *params = (GLuint)q->Result;
+ }
}
break;
case GL_QUERY_RESULT_AVAILABLE_ARB:
@@ -447,6 +498,10 @@ _mesa_GetQueryObjecti64vEXT(GLuint id, GLenum pname, GLint64EXT *params)
GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_BEGIN_END(ctx);
+ if (MESA_VERBOSE & VERBOSE_API)
+ _mesa_debug(ctx, "glGetQueryObjecti64v(%u, %s)\n", id,
+ _mesa_lookup_enum_by_nr(pname));
+
if (id)
q = _mesa_lookup_query_object(ctx, id);
@@ -484,6 +539,10 @@ _mesa_GetQueryObjectui64vEXT(GLuint id, GLenum pname, GLuint64EXT *params)
GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_BEGIN_END(ctx);
+ if (MESA_VERBOSE & VERBOSE_API)
+ _mesa_debug(ctx, "glGetQueryObjectui64v(%u, %s)\n", id,
+ _mesa_lookup_enum_by_nr(pname));
+
if (id)
q = _mesa_lookup_query_object(ctx, id);
diff --git a/src/mesa/main/queryobj.h b/src/mesa/main/queryobj.h
index e289625731a..e4ad96ba5a3 100644
--- a/src/mesa/main/queryobj.h
+++ b/src/mesa/main/queryobj.h
@@ -27,6 +27,7 @@
#define QUERYOBJ_H
+#include "main/mfeatures.h"
#include "main/mtypes.h"
#include "main/hash.h"
diff --git a/src/mesa/main/rastpos.c b/src/mesa/main/rastpos.c
index 6f52f07dfab..a1f6f423416 100644
--- a/src/mesa/main/rastpos.c
+++ b/src/mesa/main/rastpos.c
@@ -32,6 +32,8 @@
#include "context.h"
#include "feedback.h"
#include "macros.h"
+#include "mfeatures.h"
+#include "mtypes.h"
#include "rastpos.h"
#include "state.h"
#include "main/dispatch.h"
diff --git a/src/mesa/main/readpix.c b/src/mesa/main/readpix.c
index a5612e34ecf..6e09a52c88a 100644
--- a/src/mesa/main/readpix.c
+++ b/src/mesa/main/readpix.c
@@ -26,10 +26,13 @@
#include "imports.h"
#include "bufferobj.h"
#include "context.h"
+#include "enums.h"
#include "readpix.h"
#include "framebuffer.h"
#include "formats.h"
#include "image.h"
+#include "mtypes.h"
+#include "pbo.h"
#include "state.h"
@@ -172,6 +175,13 @@ _mesa_ReadPixels( GLint x, GLint y, GLsizei width, GLsizei height,
FLUSH_CURRENT(ctx, 0);
+ if (MESA_VERBOSE & VERBOSE_API)
+ _mesa_debug(ctx, "glReadPixels(%d, %d, %s, %s, %p)\n",
+ width, height,
+ _mesa_lookup_enum_by_nr(format),
+ _mesa_lookup_enum_by_nr(type),
+ pixels);
+
if (width < 0 || height < 0) {
_mesa_error( ctx, GL_INVALID_VALUE,
"glReadPixels(width=%d height=%d)", width, height );
diff --git a/src/mesa/main/remap_helper.h b/src/mesa/main/remap_helper.h
index 7368c76e7e7..61530df3e1a 100644
--- a/src/mesa/main/remap_helper.h
+++ b/src/mesa/main/remap_helper.h
@@ -70,4666 +70,4710 @@ static const char _mesa_function_pool[] =
"\0"
"glLoadIdentity\0"
"\0"
- /* _mesa_function_pool[216]: SampleCoverageARB (will be remapped) */
+ /* _mesa_function_pool[216]: GetCombinerOutputParameterfvNV (will be remapped) */
+ "iiip\0"
+ "glGetCombinerOutputParameterfvNV\0"
+ "\0"
+ /* _mesa_function_pool[255]: SampleCoverageARB (will be remapped) */
"fi\0"
"glSampleCoverage\0"
"glSampleCoverageARB\0"
"\0"
- /* _mesa_function_pool[257]: ConvolutionFilter1D (offset 348) */
+ /* _mesa_function_pool[296]: ConvolutionFilter1D (offset 348) */
"iiiiip\0"
"glConvolutionFilter1D\0"
"glConvolutionFilter1DEXT\0"
"\0"
- /* _mesa_function_pool[312]: BeginQueryARB (will be remapped) */
+ /* _mesa_function_pool[351]: BeginQueryARB (will be remapped) */
"ii\0"
"glBeginQuery\0"
"glBeginQueryARB\0"
"\0"
- /* _mesa_function_pool[345]: RasterPos3dv (offset 71) */
+ /* _mesa_function_pool[384]: RasterPos3dv (offset 71) */
"p\0"
"glRasterPos3dv\0"
"\0"
- /* _mesa_function_pool[363]: PointParameteriNV (will be remapped) */
+ /* _mesa_function_pool[402]: PointParameteriNV (will be remapped) */
"ii\0"
"glPointParameteri\0"
"glPointParameteriNV\0"
"\0"
- /* _mesa_function_pool[405]: GetProgramiv (will be remapped) */
+ /* _mesa_function_pool[444]: GetProgramiv (will be remapped) */
"iip\0"
"glGetProgramiv\0"
"\0"
- /* _mesa_function_pool[425]: MultiTexCoord3sARB (offset 398) */
+ /* _mesa_function_pool[464]: MultiTexCoord3sARB (offset 398) */
"iiii\0"
"glMultiTexCoord3s\0"
"glMultiTexCoord3sARB\0"
"\0"
- /* _mesa_function_pool[470]: SecondaryColor3iEXT (will be remapped) */
+ /* _mesa_function_pool[509]: SecondaryColor3iEXT (will be remapped) */
"iii\0"
"glSecondaryColor3i\0"
"glSecondaryColor3iEXT\0"
"\0"
- /* _mesa_function_pool[516]: WindowPos3fMESA (will be remapped) */
+ /* _mesa_function_pool[555]: WindowPos3fMESA (will be remapped) */
"fff\0"
"glWindowPos3f\0"
"glWindowPos3fARB\0"
"glWindowPos3fMESA\0"
"\0"
- /* _mesa_function_pool[570]: TexCoord1iv (offset 99) */
+ /* _mesa_function_pool[609]: TexCoord1iv (offset 99) */
"p\0"
"glTexCoord1iv\0"
"\0"
- /* _mesa_function_pool[587]: TexCoord4sv (offset 125) */
+ /* _mesa_function_pool[626]: TexCoord4sv (offset 125) */
"p\0"
"glTexCoord4sv\0"
"\0"
- /* _mesa_function_pool[604]: RasterPos4s (offset 84) */
+ /* _mesa_function_pool[643]: RasterPos4s (offset 84) */
"iiii\0"
"glRasterPos4s\0"
"\0"
- /* _mesa_function_pool[624]: PixelTexGenParameterfvSGIS (will be remapped) */
+ /* _mesa_function_pool[663]: PixelTexGenParameterfvSGIS (will be remapped) */
"ip\0"
"glPixelTexGenParameterfvSGIS\0"
"\0"
- /* _mesa_function_pool[657]: ActiveTextureARB (offset 374) */
+ /* _mesa_function_pool[696]: ActiveTextureARB (offset 374) */
"i\0"
"glActiveTexture\0"
"glActiveTextureARB\0"
"\0"
- /* _mesa_function_pool[695]: BlitFramebufferEXT (will be remapped) */
+ /* _mesa_function_pool[734]: BlitFramebufferEXT (will be remapped) */
"iiiiiiiiii\0"
"glBlitFramebuffer\0"
"glBlitFramebufferEXT\0"
"\0"
- /* _mesa_function_pool[746]: TexCoord1f (offset 96) */
+ /* _mesa_function_pool[785]: TexCoord1f (offset 96) */
"f\0"
"glTexCoord1f\0"
"\0"
- /* _mesa_function_pool[762]: TexCoord1d (offset 94) */
+ /* _mesa_function_pool[801]: TexCoord1d (offset 94) */
"d\0"
"glTexCoord1d\0"
"\0"
- /* _mesa_function_pool[778]: VertexAttrib4ubvNV (will be remapped) */
+ /* _mesa_function_pool[817]: VertexAttrib4ubvNV (will be remapped) */
"ip\0"
"glVertexAttrib4ubvNV\0"
"\0"
- /* _mesa_function_pool[803]: TexCoord1i (offset 98) */
+ /* _mesa_function_pool[842]: TexCoord1i (offset 98) */
"i\0"
"glTexCoord1i\0"
"\0"
- /* _mesa_function_pool[819]: GetProgramNamedParameterdvNV (will be remapped) */
+ /* _mesa_function_pool[858]: GetProgramNamedParameterdvNV (will be remapped) */
"iipp\0"
"glGetProgramNamedParameterdvNV\0"
"\0"
- /* _mesa_function_pool[856]: Histogram (offset 367) */
+ /* _mesa_function_pool[895]: Histogram (offset 367) */
"iiii\0"
"glHistogram\0"
"glHistogramEXT\0"
"\0"
- /* _mesa_function_pool[889]: TexCoord1s (offset 100) */
+ /* _mesa_function_pool[928]: TexCoord1s (offset 100) */
"i\0"
"glTexCoord1s\0"
"\0"
- /* _mesa_function_pool[905]: GetMapfv (offset 267) */
+ /* _mesa_function_pool[944]: GetMapfv (offset 267) */
"iip\0"
"glGetMapfv\0"
"\0"
- /* _mesa_function_pool[921]: EvalCoord1f (offset 230) */
+ /* _mesa_function_pool[960]: EvalCoord1f (offset 230) */
"f\0"
"glEvalCoord1f\0"
"\0"
- /* _mesa_function_pool[938]: FramebufferTexture (will be remapped) */
+ /* _mesa_function_pool[977]: FramebufferTexture (will be remapped) */
"iiii\0"
"glFramebufferTexture\0"
"\0"
- /* _mesa_function_pool[965]: VertexAttribI1ivEXT (will be remapped) */
+ /* _mesa_function_pool[1004]: VertexAttribI1ivEXT (will be remapped) */
"ip\0"
"glVertexAttribI1ivEXT\0"
"glVertexAttribI1iv\0"
"\0"
- /* _mesa_function_pool[1010]: TexImage4DSGIS (dynamic) */
+ /* _mesa_function_pool[1049]: TexImage4DSGIS (dynamic) */
"iiiiiiiiiip\0"
"glTexImage4DSGIS\0"
"\0"
- /* _mesa_function_pool[1040]: PolygonStipple (offset 175) */
+ /* _mesa_function_pool[1079]: PolygonStipple (offset 175) */
"p\0"
"glPolygonStipple\0"
"\0"
- /* _mesa_function_pool[1060]: WindowPos2dvMESA (will be remapped) */
+ /* _mesa_function_pool[1099]: WindowPos2dvMESA (will be remapped) */
"p\0"
"glWindowPos2dv\0"
"glWindowPos2dvARB\0"
"glWindowPos2dvMESA\0"
"\0"
- /* _mesa_function_pool[1115]: ReplacementCodeuiColor3fVertex3fvSUN (dynamic) */
+ /* _mesa_function_pool[1154]: ReplacementCodeuiColor3fVertex3fvSUN (dynamic) */
"ppp\0"
"glReplacementCodeuiColor3fVertex3fvSUN\0"
"\0"
- /* _mesa_function_pool[1159]: BlendEquationSeparateEXT (will be remapped) */
+ /* _mesa_function_pool[1198]: BlendEquationSeparateEXT (will be remapped) */
"ii\0"
"glBlendEquationSeparate\0"
"glBlendEquationSeparateEXT\0"
"glBlendEquationSeparateATI\0"
"\0"
- /* _mesa_function_pool[1241]: ListParameterfSGIX (dynamic) */
+ /* _mesa_function_pool[1280]: ListParameterfSGIX (dynamic) */
"iif\0"
"glListParameterfSGIX\0"
"\0"
- /* _mesa_function_pool[1267]: SecondaryColor3bEXT (will be remapped) */
+ /* _mesa_function_pool[1306]: SecondaryColor3bEXT (will be remapped) */
"iii\0"
"glSecondaryColor3b\0"
"glSecondaryColor3bEXT\0"
"\0"
- /* _mesa_function_pool[1313]: TexCoord4fColor4fNormal3fVertex4fvSUN (dynamic) */
+ /* _mesa_function_pool[1352]: TexCoord4fColor4fNormal3fVertex4fvSUN (dynamic) */
"pppp\0"
"glTexCoord4fColor4fNormal3fVertex4fvSUN\0"
"\0"
- /* _mesa_function_pool[1359]: GetPixelMapfv (offset 271) */
+ /* _mesa_function_pool[1398]: GetPixelMapfv (offset 271) */
"ip\0"
"glGetPixelMapfv\0"
"\0"
- /* _mesa_function_pool[1379]: Color3uiv (offset 22) */
+ /* _mesa_function_pool[1418]: Color3uiv (offset 22) */
"p\0"
"glColor3uiv\0"
"\0"
- /* _mesa_function_pool[1394]: IsEnabled (offset 286) */
+ /* _mesa_function_pool[1433]: IsEnabled (offset 286) */
"i\0"
"glIsEnabled\0"
"\0"
- /* _mesa_function_pool[1409]: VertexAttrib4svNV (will be remapped) */
+ /* _mesa_function_pool[1448]: VertexAttrib4svNV (will be remapped) */
"ip\0"
"glVertexAttrib4svNV\0"
"\0"
- /* _mesa_function_pool[1433]: EvalCoord2fv (offset 235) */
+ /* _mesa_function_pool[1472]: EvalCoord2fv (offset 235) */
"p\0"
"glEvalCoord2fv\0"
"\0"
- /* _mesa_function_pool[1451]: GetBufferSubDataARB (will be remapped) */
+ /* _mesa_function_pool[1490]: GetBufferSubDataARB (will be remapped) */
"iiip\0"
"glGetBufferSubData\0"
"glGetBufferSubDataARB\0"
"\0"
- /* _mesa_function_pool[1498]: BufferSubDataARB (will be remapped) */
+ /* _mesa_function_pool[1537]: BufferSubDataARB (will be remapped) */
"iiip\0"
"glBufferSubData\0"
"glBufferSubDataARB\0"
"\0"
- /* _mesa_function_pool[1539]: TexCoord2fColor4ubVertex3fvSUN (dynamic) */
+ /* _mesa_function_pool[1578]: TexCoord2fColor4ubVertex3fvSUN (dynamic) */
"ppp\0"
"glTexCoord2fColor4ubVertex3fvSUN\0"
"\0"
- /* _mesa_function_pool[1577]: AttachShader (will be remapped) */
+ /* _mesa_function_pool[1616]: AttachShader (will be remapped) */
"ii\0"
"glAttachShader\0"
"\0"
- /* _mesa_function_pool[1596]: VertexAttrib2fARB (will be remapped) */
+ /* _mesa_function_pool[1635]: VertexAttrib2fARB (will be remapped) */
"iff\0"
"glVertexAttrib2f\0"
"glVertexAttrib2fARB\0"
"\0"
- /* _mesa_function_pool[1638]: GetDebugLogLengthMESA (dynamic) */
+ /* _mesa_function_pool[1677]: GetDebugLogLengthMESA (dynamic) */
"iii\0"
"glGetDebugLogLengthMESA\0"
"\0"
- /* _mesa_function_pool[1667]: GetMapiv (offset 268) */
+ /* _mesa_function_pool[1706]: GetMapiv (offset 268) */
"iip\0"
"glGetMapiv\0"
"\0"
- /* _mesa_function_pool[1683]: VertexAttrib3fARB (will be remapped) */
+ /* _mesa_function_pool[1722]: VertexAttrib3fARB (will be remapped) */
"ifff\0"
"glVertexAttrib3f\0"
"glVertexAttrib3fARB\0"
"\0"
- /* _mesa_function_pool[1726]: Indexubv (offset 316) */
+ /* _mesa_function_pool[1765]: Indexubv (offset 316) */
"p\0"
"glIndexubv\0"
"\0"
- /* _mesa_function_pool[1740]: GetQueryivARB (will be remapped) */
+ /* _mesa_function_pool[1779]: GetQueryivARB (will be remapped) */
"iip\0"
"glGetQueryiv\0"
"glGetQueryivARB\0"
"\0"
- /* _mesa_function_pool[1774]: TexImage3D (offset 371) */
+ /* _mesa_function_pool[1813]: TexImage3D (offset 371) */
"iiiiiiiiip\0"
"glTexImage3D\0"
"glTexImage3DEXT\0"
"\0"
- /* _mesa_function_pool[1815]: BindFragDataLocationEXT (will be remapped) */
+ /* _mesa_function_pool[1854]: BindFragDataLocationEXT (will be remapped) */
"iip\0"
"glBindFragDataLocationEXT\0"
"glBindFragDataLocation\0"
"\0"
- /* _mesa_function_pool[1869]: ReplacementCodeuiVertex3fvSUN (dynamic) */
+ /* _mesa_function_pool[1908]: ReplacementCodeuiVertex3fvSUN (dynamic) */
"pp\0"
"glReplacementCodeuiVertex3fvSUN\0"
"\0"
- /* _mesa_function_pool[1905]: EdgeFlagPointer (offset 312) */
+ /* _mesa_function_pool[1944]: EdgeFlagPointer (offset 312) */
"ip\0"
"glEdgeFlagPointer\0"
"\0"
- /* _mesa_function_pool[1927]: Color3ubv (offset 20) */
+ /* _mesa_function_pool[1966]: Color3ubv (offset 20) */
"p\0"
"glColor3ubv\0"
"\0"
- /* _mesa_function_pool[1942]: GetQueryObjectivARB (will be remapped) */
+ /* _mesa_function_pool[1981]: GetQueryObjectivARB (will be remapped) */
"iip\0"
"glGetQueryObjectiv\0"
"glGetQueryObjectivARB\0"
"\0"
- /* _mesa_function_pool[1988]: Vertex3dv (offset 135) */
+ /* _mesa_function_pool[2027]: Vertex3dv (offset 135) */
"p\0"
"glVertex3dv\0"
"\0"
- /* _mesa_function_pool[2003]: ReplacementCodeuiTexCoord2fVertex3fvSUN (dynamic) */
+ /* _mesa_function_pool[2042]: ReplacementCodeuiTexCoord2fVertex3fvSUN (dynamic) */
"ppp\0"
"glReplacementCodeuiTexCoord2fVertex3fvSUN\0"
"\0"
- /* _mesa_function_pool[2050]: CompressedTexSubImage2DARB (will be remapped) */
+ /* _mesa_function_pool[2089]: CompressedTexSubImage2DARB (will be remapped) */
"iiiiiiiip\0"
"glCompressedTexSubImage2D\0"
"glCompressedTexSubImage2DARB\0"
"\0"
- /* _mesa_function_pool[2116]: CombinerOutputNV (will be remapped) */
+ /* _mesa_function_pool[2155]: CombinerOutputNV (will be remapped) */
"iiiiiiiiii\0"
"glCombinerOutputNV\0"
"\0"
- /* _mesa_function_pool[2147]: VertexAttribs3fvNV (will be remapped) */
+ /* _mesa_function_pool[2186]: VertexAttribs3fvNV (will be remapped) */
"iip\0"
"glVertexAttribs3fvNV\0"
"\0"
- /* _mesa_function_pool[2173]: Uniform2fARB (will be remapped) */
+ /* _mesa_function_pool[2212]: Uniform2fARB (will be remapped) */
"iff\0"
"glUniform2f\0"
"glUniform2fARB\0"
"\0"
- /* _mesa_function_pool[2205]: LightModeliv (offset 166) */
+ /* _mesa_function_pool[2244]: LightModeliv (offset 166) */
"ip\0"
"glLightModeliv\0"
"\0"
- /* _mesa_function_pool[2224]: VertexAttrib1svARB (will be remapped) */
+ /* _mesa_function_pool[2263]: VertexAttrib1svARB (will be remapped) */
"ip\0"
"glVertexAttrib1sv\0"
"glVertexAttrib1svARB\0"
"\0"
- /* _mesa_function_pool[2267]: VertexAttribs1dvNV (will be remapped) */
+ /* _mesa_function_pool[2306]: VertexAttribs1dvNV (will be remapped) */
"iip\0"
"glVertexAttribs1dvNV\0"
"\0"
- /* _mesa_function_pool[2293]: Uniform2ivARB (will be remapped) */
+ /* _mesa_function_pool[2332]: Uniform2ivARB (will be remapped) */
"iip\0"
"glUniform2iv\0"
"glUniform2ivARB\0"
"\0"
- /* _mesa_function_pool[2327]: GetImageTransformParameterfvHP (dynamic) */
+ /* _mesa_function_pool[2366]: GetImageTransformParameterfvHP (dynamic) */
"iip\0"
"glGetImageTransformParameterfvHP\0"
"\0"
- /* _mesa_function_pool[2365]: Normal3bv (offset 53) */
+ /* _mesa_function_pool[2404]: Normal3bv (offset 53) */
"p\0"
"glNormal3bv\0"
"\0"
- /* _mesa_function_pool[2380]: TexGeniv (offset 193) */
+ /* _mesa_function_pool[2419]: TexGeniv (offset 193) */
"iip\0"
"glTexGeniv\0"
"\0"
- /* _mesa_function_pool[2396]: WeightubvARB (dynamic) */
+ /* _mesa_function_pool[2435]: WeightubvARB (dynamic) */
"ip\0"
"glWeightubvARB\0"
"\0"
- /* _mesa_function_pool[2415]: VertexAttrib1fvNV (will be remapped) */
+ /* _mesa_function_pool[2454]: VertexAttrib1fvNV (will be remapped) */
"ip\0"
"glVertexAttrib1fvNV\0"
"\0"
- /* _mesa_function_pool[2439]: Vertex3iv (offset 139) */
+ /* _mesa_function_pool[2478]: Vertex3iv (offset 139) */
"p\0"
"glVertex3iv\0"
"\0"
- /* _mesa_function_pool[2454]: CopyConvolutionFilter1D (offset 354) */
+ /* _mesa_function_pool[2493]: CopyConvolutionFilter1D (offset 354) */
"iiiii\0"
"glCopyConvolutionFilter1D\0"
"glCopyConvolutionFilter1DEXT\0"
"\0"
- /* _mesa_function_pool[2516]: VertexAttribI1uiEXT (will be remapped) */
+ /* _mesa_function_pool[2555]: VertexAttribI1uiEXT (will be remapped) */
"ii\0"
"glVertexAttribI1uiEXT\0"
"glVertexAttribI1ui\0"
"\0"
- /* _mesa_function_pool[2561]: ReplacementCodeuiNormal3fVertex3fSUN (dynamic) */
+ /* _mesa_function_pool[2600]: ReplacementCodeuiNormal3fVertex3fSUN (dynamic) */
"iffffff\0"
"glReplacementCodeuiNormal3fVertex3fSUN\0"
"\0"
- /* _mesa_function_pool[2609]: DeleteSync (will be remapped) */
+ /* _mesa_function_pool[2648]: DeleteSync (will be remapped) */
"i\0"
"glDeleteSync\0"
"\0"
- /* _mesa_function_pool[2625]: FragmentMaterialfvSGIX (dynamic) */
+ /* _mesa_function_pool[2664]: FragmentMaterialfvSGIX (dynamic) */
"iip\0"
"glFragmentMaterialfvSGIX\0"
"\0"
- /* _mesa_function_pool[2655]: BlendColor (offset 336) */
+ /* _mesa_function_pool[2694]: BlendColor (offset 336) */
"ffff\0"
"glBlendColor\0"
"glBlendColorEXT\0"
"\0"
- /* _mesa_function_pool[2690]: UniformMatrix4fvARB (will be remapped) */
+ /* _mesa_function_pool[2729]: UniformMatrix4fvARB (will be remapped) */
"iiip\0"
"glUniformMatrix4fv\0"
"glUniformMatrix4fvARB\0"
"\0"
- /* _mesa_function_pool[2737]: DeleteVertexArraysAPPLE (will be remapped) */
+ /* _mesa_function_pool[2776]: DeleteVertexArraysAPPLE (will be remapped) */
"ip\0"
"glDeleteVertexArrays\0"
"glDeleteVertexArraysAPPLE\0"
"\0"
- /* _mesa_function_pool[2788]: TexBuffer (will be remapped) */
+ /* _mesa_function_pool[2827]: TexBuffer (will be remapped) */
"iii\0"
"glTexBuffer\0"
"\0"
- /* _mesa_function_pool[2805]: ReadInstrumentsSGIX (dynamic) */
+ /* _mesa_function_pool[2844]: ReadInstrumentsSGIX (dynamic) */
"i\0"
"glReadInstrumentsSGIX\0"
"\0"
- /* _mesa_function_pool[2830]: CallLists (offset 3) */
+ /* _mesa_function_pool[2869]: CallLists (offset 3) */
"iip\0"
"glCallLists\0"
"\0"
- /* _mesa_function_pool[2847]: UniformMatrix2x4fv (will be remapped) */
+ /* _mesa_function_pool[2886]: UniformMatrix2x4fv (will be remapped) */
"iiip\0"
"glUniformMatrix2x4fv\0"
"\0"
- /* _mesa_function_pool[2874]: Color4ubVertex3fvSUN (dynamic) */
+ /* _mesa_function_pool[2913]: Color4ubVertex3fvSUN (dynamic) */
"pp\0"
"glColor4ubVertex3fvSUN\0"
"\0"
- /* _mesa_function_pool[2901]: Normal3iv (offset 59) */
+ /* _mesa_function_pool[2940]: Normal3iv (offset 59) */
"p\0"
"glNormal3iv\0"
"\0"
- /* _mesa_function_pool[2916]: PassThrough (offset 199) */
+ /* _mesa_function_pool[2955]: PassThrough (offset 199) */
"f\0"
"glPassThrough\0"
"\0"
- /* _mesa_function_pool[2933]: GetVertexAttribIivEXT (will be remapped) */
+ /* _mesa_function_pool[2972]: GetVertexAttribIivEXT (will be remapped) */
"iip\0"
"glGetVertexAttribIivEXT\0"
"glGetVertexAttribIiv\0"
"\0"
- /* _mesa_function_pool[2983]: TexParameterIivEXT (will be remapped) */
+ /* _mesa_function_pool[3022]: TexParameterIivEXT (will be remapped) */
"iip\0"
"glTexParameterIivEXT\0"
"glTexParameterIiv\0"
"\0"
- /* _mesa_function_pool[3027]: FramebufferTextureLayerEXT (will be remapped) */
+ /* _mesa_function_pool[3066]: FramebufferTextureLayerEXT (will be remapped) */
"iiiii\0"
"glFramebufferTextureLayer\0"
"glFramebufferTextureLayerEXT\0"
"\0"
- /* _mesa_function_pool[3089]: GetListParameterfvSGIX (dynamic) */
+ /* _mesa_function_pool[3128]: GetListParameterfvSGIX (dynamic) */
"iip\0"
"glGetListParameterfvSGIX\0"
"\0"
- /* _mesa_function_pool[3119]: Viewport (offset 305) */
+ /* _mesa_function_pool[3158]: Viewport (offset 305) */
"iiii\0"
"glViewport\0"
"\0"
- /* _mesa_function_pool[3136]: VertexAttrib4NusvARB (will be remapped) */
+ /* _mesa_function_pool[3175]: VertexAttrib4NusvARB (will be remapped) */
"ip\0"
"glVertexAttrib4Nusv\0"
"glVertexAttrib4NusvARB\0"
"\0"
- /* _mesa_function_pool[3183]: WindowPos4svMESA (will be remapped) */
+ /* _mesa_function_pool[3222]: WindowPos4svMESA (will be remapped) */
"p\0"
"glWindowPos4svMESA\0"
"\0"
- /* _mesa_function_pool[3205]: CreateProgramObjectARB (will be remapped) */
+ /* _mesa_function_pool[3244]: CreateProgramObjectARB (will be remapped) */
"\0"
"glCreateProgramObjectARB\0"
"\0"
- /* _mesa_function_pool[3232]: DeleteTransformFeedbacks (will be remapped) */
+ /* _mesa_function_pool[3271]: DeleteTransformFeedbacks (will be remapped) */
"ip\0"
"glDeleteTransformFeedbacks\0"
"\0"
- /* _mesa_function_pool[3263]: UniformMatrix4x3fv (will be remapped) */
+ /* _mesa_function_pool[3302]: UniformMatrix4x3fv (will be remapped) */
"iiip\0"
"glUniformMatrix4x3fv\0"
"\0"
- /* _mesa_function_pool[3290]: PrioritizeTextures (offset 331) */
+ /* _mesa_function_pool[3329]: PrioritizeTextures (offset 331) */
"ipp\0"
"glPrioritizeTextures\0"
"glPrioritizeTexturesEXT\0"
"\0"
- /* _mesa_function_pool[3340]: VertexAttribI3uiEXT (will be remapped) */
+ /* _mesa_function_pool[3379]: VertexAttribI3uiEXT (will be remapped) */
"iiii\0"
"glVertexAttribI3uiEXT\0"
"glVertexAttribI3ui\0"
"\0"
- /* _mesa_function_pool[3387]: AsyncMarkerSGIX (dynamic) */
+ /* _mesa_function_pool[3426]: AsyncMarkerSGIX (dynamic) */
"i\0"
"glAsyncMarkerSGIX\0"
"\0"
- /* _mesa_function_pool[3408]: GlobalAlphaFactorubSUN (dynamic) */
+ /* _mesa_function_pool[3447]: GlobalAlphaFactorubSUN (dynamic) */
"i\0"
"glGlobalAlphaFactorubSUN\0"
"\0"
- /* _mesa_function_pool[3436]: ClearColorIuiEXT (will be remapped) */
+ /* _mesa_function_pool[3475]: ClearColorIuiEXT (will be remapped) */
"iiii\0"
"glClearColorIuiEXT\0"
"\0"
- /* _mesa_function_pool[3461]: ClearDebugLogMESA (dynamic) */
+ /* _mesa_function_pool[3500]: ClearDebugLogMESA (dynamic) */
"iii\0"
"glClearDebugLogMESA\0"
"\0"
- /* _mesa_function_pool[3486]: Uniform4uiEXT (will be remapped) */
+ /* _mesa_function_pool[3525]: Uniform4uiEXT (will be remapped) */
"iiiii\0"
"glUniform4uiEXT\0"
"glUniform4ui\0"
"\0"
- /* _mesa_function_pool[3522]: ResetHistogram (offset 369) */
+ /* _mesa_function_pool[3561]: ResetHistogram (offset 369) */
"i\0"
"glResetHistogram\0"
"glResetHistogramEXT\0"
"\0"
- /* _mesa_function_pool[3562]: GetProgramNamedParameterfvNV (will be remapped) */
+ /* _mesa_function_pool[3601]: GetProgramNamedParameterfvNV (will be remapped) */
"iipp\0"
"glGetProgramNamedParameterfvNV\0"
"\0"
- /* _mesa_function_pool[3599]: PointParameterfEXT (will be remapped) */
+ /* _mesa_function_pool[3638]: PointParameterfEXT (will be remapped) */
"if\0"
"glPointParameterf\0"
"glPointParameterfARB\0"
"glPointParameterfEXT\0"
"glPointParameterfSGIS\0"
"\0"
- /* _mesa_function_pool[3685]: LoadIdentityDeformationMapSGIX (dynamic) */
+ /* _mesa_function_pool[3724]: LoadIdentityDeformationMapSGIX (dynamic) */
"i\0"
"glLoadIdentityDeformationMapSGIX\0"
"\0"
- /* _mesa_function_pool[3721]: GenFencesNV (will be remapped) */
+ /* _mesa_function_pool[3760]: GenFencesNV (will be remapped) */
"ip\0"
"glGenFencesNV\0"
"\0"
- /* _mesa_function_pool[3739]: ImageTransformParameterfHP (dynamic) */
+ /* _mesa_function_pool[3778]: ImageTransformParameterfHP (dynamic) */
"iif\0"
"glImageTransformParameterfHP\0"
"\0"
- /* _mesa_function_pool[3773]: MatrixIndexusvARB (dynamic) */
+ /* _mesa_function_pool[3812]: MatrixIndexusvARB (dynamic) */
"ip\0"
"glMatrixIndexusvARB\0"
"\0"
- /* _mesa_function_pool[3797]: DrawElementsBaseVertex (will be remapped) */
+ /* _mesa_function_pool[3836]: DrawElementsBaseVertex (will be remapped) */
"iiipi\0"
"glDrawElementsBaseVertex\0"
"\0"
- /* _mesa_function_pool[3829]: DisableVertexAttribArrayARB (will be remapped) */
+ /* _mesa_function_pool[3868]: DisableVertexAttribArrayARB (will be remapped) */
"i\0"
"glDisableVertexAttribArray\0"
"glDisableVertexAttribArrayARB\0"
"\0"
- /* _mesa_function_pool[3889]: TexCoord2sv (offset 109) */
+ /* _mesa_function_pool[3928]: TexCoord2sv (offset 109) */
"p\0"
"glTexCoord2sv\0"
"\0"
- /* _mesa_function_pool[3906]: Vertex4dv (offset 143) */
+ /* _mesa_function_pool[3945]: Vertex4dv (offset 143) */
"p\0"
"glVertex4dv\0"
"\0"
- /* _mesa_function_pool[3921]: StencilMaskSeparate (will be remapped) */
+ /* _mesa_function_pool[3960]: StencilMaskSeparate (will be remapped) */
"ii\0"
"glStencilMaskSeparate\0"
"\0"
- /* _mesa_function_pool[3947]: ProgramLocalParameter4dARB (will be remapped) */
+ /* _mesa_function_pool[3986]: ProgramLocalParameter4dARB (will be remapped) */
"iidddd\0"
"glProgramLocalParameter4dARB\0"
"\0"
- /* _mesa_function_pool[3984]: CompressedTexImage3DARB (will be remapped) */
+ /* _mesa_function_pool[4023]: CompressedTexImage3DARB (will be remapped) */
"iiiiiiiip\0"
"glCompressedTexImage3D\0"
"glCompressedTexImage3DARB\0"
"\0"
- /* _mesa_function_pool[4044]: Color3sv (offset 18) */
+ /* _mesa_function_pool[4083]: Color3sv (offset 18) */
"p\0"
"glColor3sv\0"
"\0"
- /* _mesa_function_pool[4058]: GetConvolutionParameteriv (offset 358) */
+ /* _mesa_function_pool[4097]: GetConvolutionParameteriv (offset 358) */
"iip\0"
"glGetConvolutionParameteriv\0"
"glGetConvolutionParameterivEXT\0"
"\0"
- /* _mesa_function_pool[4122]: VertexAttrib1fARB (will be remapped) */
+ /* _mesa_function_pool[4161]: VertexAttrib1fARB (will be remapped) */
"if\0"
"glVertexAttrib1f\0"
"glVertexAttrib1fARB\0"
"\0"
- /* _mesa_function_pool[4163]: Vertex2dv (offset 127) */
+ /* _mesa_function_pool[4202]: Vertex2dv (offset 127) */
"p\0"
"glVertex2dv\0"
"\0"
- /* _mesa_function_pool[4178]: TestFenceNV (will be remapped) */
+ /* _mesa_function_pool[4217]: TestFenceNV (will be remapped) */
"i\0"
"glTestFenceNV\0"
"\0"
- /* _mesa_function_pool[4195]: GetVertexAttribIuivEXT (will be remapped) */
- "iip\0"
- "glGetVertexAttribIuivEXT\0"
- "glGetVertexAttribIuiv\0"
- "\0"
- /* _mesa_function_pool[4247]: MultiTexCoord1fvARB (offset 379) */
+ /* _mesa_function_pool[4234]: MultiTexCoord1fvARB (offset 379) */
"ip\0"
"glMultiTexCoord1fv\0"
"glMultiTexCoord1fvARB\0"
"\0"
- /* _mesa_function_pool[4292]: TexCoord3iv (offset 115) */
+ /* _mesa_function_pool[4279]: TexCoord3iv (offset 115) */
"p\0"
"glTexCoord3iv\0"
"\0"
- /* _mesa_function_pool[4309]: Uniform2uivEXT (will be remapped) */
+ /* _mesa_function_pool[4296]: Uniform2uivEXT (will be remapped) */
"iip\0"
"glUniform2uivEXT\0"
"glUniform2uiv\0"
"\0"
- /* _mesa_function_pool[4345]: ColorFragmentOp2ATI (will be remapped) */
+ /* _mesa_function_pool[4332]: ColorFragmentOp2ATI (will be remapped) */
"iiiiiiiiii\0"
"glColorFragmentOp2ATI\0"
"\0"
- /* _mesa_function_pool[4379]: SecondaryColorPointerListIBM (dynamic) */
+ /* _mesa_function_pool[4366]: SecondaryColorPointerListIBM (dynamic) */
"iiipi\0"
"glSecondaryColorPointerListIBM\0"
"\0"
- /* _mesa_function_pool[4417]: GetPixelTexGenParameterivSGIS (will be remapped) */
+ /* _mesa_function_pool[4404]: GetPixelTexGenParameterivSGIS (will be remapped) */
"ip\0"
"glGetPixelTexGenParameterivSGIS\0"
"\0"
- /* _mesa_function_pool[4453]: Color3fv (offset 14) */
+ /* _mesa_function_pool[4440]: Color3fv (offset 14) */
"p\0"
"glColor3fv\0"
"\0"
- /* _mesa_function_pool[4467]: VertexAttrib4fNV (will be remapped) */
+ /* _mesa_function_pool[4454]: VertexAttrib4fNV (will be remapped) */
"iffff\0"
"glVertexAttrib4fNV\0"
"\0"
- /* _mesa_function_pool[4493]: ReplacementCodeubSUN (dynamic) */
+ /* _mesa_function_pool[4480]: ReplacementCodeubSUN (dynamic) */
"i\0"
"glReplacementCodeubSUN\0"
"\0"
- /* _mesa_function_pool[4519]: FinishAsyncSGIX (dynamic) */
+ /* _mesa_function_pool[4506]: FinishAsyncSGIX (dynamic) */
"p\0"
"glFinishAsyncSGIX\0"
"\0"
- /* _mesa_function_pool[4540]: GetDebugLogMESA (dynamic) */
+ /* _mesa_function_pool[4527]: GetDebugLogMESA (dynamic) */
"iiiipp\0"
"glGetDebugLogMESA\0"
"\0"
- /* _mesa_function_pool[4566]: FogCoorddEXT (will be remapped) */
+ /* _mesa_function_pool[4553]: FogCoorddEXT (will be remapped) */
"d\0"
"glFogCoordd\0"
"glFogCoorddEXT\0"
"\0"
- /* _mesa_function_pool[4596]: BeginConditionalRenderNV (will be remapped) */
+ /* _mesa_function_pool[4583]: BeginConditionalRenderNV (will be remapped) */
"ii\0"
"glBeginConditionalRenderNV\0"
"glBeginConditionalRender\0"
"\0"
- /* _mesa_function_pool[4652]: Color4ubVertex3fSUN (dynamic) */
+ /* _mesa_function_pool[4639]: Color4ubVertex3fSUN (dynamic) */
"iiiifff\0"
"glColor4ubVertex3fSUN\0"
"\0"
- /* _mesa_function_pool[4683]: FogCoordfEXT (will be remapped) */
+ /* _mesa_function_pool[4670]: FogCoordfEXT (will be remapped) */
"f\0"
"glFogCoordf\0"
"glFogCoordfEXT\0"
"\0"
- /* _mesa_function_pool[4713]: PointSize (offset 173) */
+ /* _mesa_function_pool[4700]: PointSize (offset 173) */
"f\0"
"glPointSize\0"
"\0"
- /* _mesa_function_pool[4728]: VertexAttribI2uivEXT (will be remapped) */
+ /* _mesa_function_pool[4715]: VertexAttribI2uivEXT (will be remapped) */
"ip\0"
"glVertexAttribI2uivEXT\0"
"glVertexAttribI2uiv\0"
"\0"
- /* _mesa_function_pool[4775]: TexCoord2fVertex3fSUN (dynamic) */
+ /* _mesa_function_pool[4762]: TexCoord2fVertex3fSUN (dynamic) */
"fffff\0"
"glTexCoord2fVertex3fSUN\0"
"\0"
- /* _mesa_function_pool[4806]: PopName (offset 200) */
+ /* _mesa_function_pool[4793]: PopName (offset 200) */
"\0"
"glPopName\0"
"\0"
- /* _mesa_function_pool[4818]: GlobalAlphaFactoriSUN (dynamic) */
+ /* _mesa_function_pool[4805]: GlobalAlphaFactoriSUN (dynamic) */
"i\0"
"glGlobalAlphaFactoriSUN\0"
"\0"
- /* _mesa_function_pool[4845]: VertexAttrib2dNV (will be remapped) */
+ /* _mesa_function_pool[4832]: VertexAttrib2dNV (will be remapped) */
"idd\0"
"glVertexAttrib2dNV\0"
"\0"
- /* _mesa_function_pool[4869]: GetProgramInfoLog (will be remapped) */
+ /* _mesa_function_pool[4856]: GetProgramInfoLog (will be remapped) */
"iipp\0"
"glGetProgramInfoLog\0"
"\0"
- /* _mesa_function_pool[4895]: VertexAttrib4NbvARB (will be remapped) */
+ /* _mesa_function_pool[4882]: VertexAttrib4NbvARB (will be remapped) */
"ip\0"
"glVertexAttrib4Nbv\0"
"glVertexAttrib4NbvARB\0"
"\0"
- /* _mesa_function_pool[4940]: GetActiveAttribARB (will be remapped) */
+ /* _mesa_function_pool[4927]: GetActiveAttribARB (will be remapped) */
"iiipppp\0"
"glGetActiveAttrib\0"
"glGetActiveAttribARB\0"
"\0"
- /* _mesa_function_pool[4988]: Vertex4sv (offset 149) */
+ /* _mesa_function_pool[4975]: Vertex4sv (offset 149) */
"p\0"
"glVertex4sv\0"
"\0"
- /* _mesa_function_pool[5003]: VertexAttrib4ubNV (will be remapped) */
+ /* _mesa_function_pool[4990]: VertexAttrib4ubNV (will be remapped) */
"iiiii\0"
"glVertexAttrib4ubNV\0"
"\0"
- /* _mesa_function_pool[5030]: ClampColor (will be remapped) */
+ /* _mesa_function_pool[5017]: ClampColor (will be remapped) */
"ii\0"
"glClampColor\0"
"\0"
- /* _mesa_function_pool[5047]: TextureRangeAPPLE (will be remapped) */
+ /* _mesa_function_pool[5034]: TextureRangeAPPLE (will be remapped) */
"iip\0"
"glTextureRangeAPPLE\0"
"\0"
- /* _mesa_function_pool[5072]: GetTexEnvfv (offset 276) */
+ /* _mesa_function_pool[5059]: GetTexEnvfv (offset 276) */
"iip\0"
"glGetTexEnvfv\0"
"\0"
- /* _mesa_function_pool[5091]: BindTransformFeedback (will be remapped) */
+ /* _mesa_function_pool[5078]: BindTransformFeedback (will be remapped) */
"ii\0"
"glBindTransformFeedback\0"
"\0"
- /* _mesa_function_pool[5119]: TexCoord2fColor4fNormal3fVertex3fSUN (dynamic) */
+ /* _mesa_function_pool[5106]: TexCoord2fColor4fNormal3fVertex3fSUN (dynamic) */
"ffffffffffff\0"
"glTexCoord2fColor4fNormal3fVertex3fSUN\0"
"\0"
- /* _mesa_function_pool[5172]: Indexub (offset 315) */
+ /* _mesa_function_pool[5159]: Indexub (offset 315) */
"i\0"
"glIndexub\0"
"\0"
- /* _mesa_function_pool[5185]: TexEnvi (offset 186) */
+ /* _mesa_function_pool[5172]: ColorMaskIndexedEXT (will be remapped) */
+ "iiiii\0"
+ "glColorMaskIndexedEXT\0"
+ "glColorMaski\0"
+ "\0"
+ /* _mesa_function_pool[5214]: TexEnvi (offset 186) */
"iii\0"
"glTexEnvi\0"
"\0"
- /* _mesa_function_pool[5200]: GetClipPlane (offset 259) */
+ /* _mesa_function_pool[5229]: GetClipPlane (offset 259) */
"ip\0"
"glGetClipPlane\0"
"\0"
- /* _mesa_function_pool[5219]: CombinerParameterfvNV (will be remapped) */
+ /* _mesa_function_pool[5248]: CombinerParameterfvNV (will be remapped) */
"ip\0"
"glCombinerParameterfvNV\0"
"\0"
- /* _mesa_function_pool[5247]: VertexAttribs3dvNV (will be remapped) */
+ /* _mesa_function_pool[5276]: VertexAttribs3dvNV (will be remapped) */
"iip\0"
"glVertexAttribs3dvNV\0"
"\0"
- /* _mesa_function_pool[5273]: VertexAttribI2uiEXT (will be remapped) */
+ /* _mesa_function_pool[5302]: VertexAttribI2uiEXT (will be remapped) */
"iii\0"
"glVertexAttribI2uiEXT\0"
"glVertexAttribI2ui\0"
"\0"
- /* _mesa_function_pool[5319]: VertexAttribs4fvNV (will be remapped) */
+ /* _mesa_function_pool[5348]: VertexAttribs4fvNV (will be remapped) */
"iip\0"
"glVertexAttribs4fvNV\0"
"\0"
- /* _mesa_function_pool[5345]: VertexArrayRangeNV (will be remapped) */
+ /* _mesa_function_pool[5374]: VertexArrayRangeNV (will be remapped) */
"ip\0"
"glVertexArrayRangeNV\0"
"\0"
- /* _mesa_function_pool[5370]: FragmentLightiSGIX (dynamic) */
+ /* _mesa_function_pool[5399]: FragmentLightiSGIX (dynamic) */
"iii\0"
"glFragmentLightiSGIX\0"
"\0"
- /* _mesa_function_pool[5396]: PolygonOffsetEXT (will be remapped) */
+ /* _mesa_function_pool[5425]: PolygonOffsetEXT (will be remapped) */
"ff\0"
"glPolygonOffsetEXT\0"
"\0"
- /* _mesa_function_pool[5419]: VertexAttribI4uivEXT (will be remapped) */
+ /* _mesa_function_pool[5448]: VertexAttribI4uivEXT (will be remapped) */
"ip\0"
"glVertexAttribI4uivEXT\0"
"glVertexAttribI4uiv\0"
"\0"
- /* _mesa_function_pool[5466]: PollAsyncSGIX (dynamic) */
+ /* _mesa_function_pool[5495]: PollAsyncSGIX (dynamic) */
"p\0"
"glPollAsyncSGIX\0"
"\0"
- /* _mesa_function_pool[5485]: DeleteFragmentShaderATI (will be remapped) */
+ /* _mesa_function_pool[5514]: DeleteFragmentShaderATI (will be remapped) */
"i\0"
"glDeleteFragmentShaderATI\0"
"\0"
- /* _mesa_function_pool[5514]: Scaled (offset 301) */
+ /* _mesa_function_pool[5543]: Scaled (offset 301) */
"ddd\0"
"glScaled\0"
"\0"
- /* _mesa_function_pool[5528]: ResumeTransformFeedback (will be remapped) */
+ /* _mesa_function_pool[5557]: ResumeTransformFeedback (will be remapped) */
"\0"
"glResumeTransformFeedback\0"
"\0"
- /* _mesa_function_pool[5556]: Scalef (offset 302) */
+ /* _mesa_function_pool[5585]: Scalef (offset 302) */
"fff\0"
"glScalef\0"
"\0"
- /* _mesa_function_pool[5570]: TexCoord2fNormal3fVertex3fvSUN (dynamic) */
+ /* _mesa_function_pool[5599]: TexCoord2fNormal3fVertex3fvSUN (dynamic) */
"ppp\0"
"glTexCoord2fNormal3fVertex3fvSUN\0"
"\0"
- /* _mesa_function_pool[5608]: MultTransposeMatrixdARB (will be remapped) */
+ /* _mesa_function_pool[5637]: MultTransposeMatrixdARB (will be remapped) */
"p\0"
"glMultTransposeMatrixd\0"
"glMultTransposeMatrixdARB\0"
"\0"
- /* _mesa_function_pool[5660]: ColorMaskIndexedEXT (will be remapped) */
- "iiiii\0"
- "glColorMaskIndexedEXT\0"
- "glColorMaski\0"
- "\0"
- /* _mesa_function_pool[5702]: ObjectUnpurgeableAPPLE (will be remapped) */
+ /* _mesa_function_pool[5689]: ObjectUnpurgeableAPPLE (will be remapped) */
"iii\0"
"glObjectUnpurgeableAPPLE\0"
"\0"
- /* _mesa_function_pool[5732]: AlphaFunc (offset 240) */
+ /* _mesa_function_pool[5719]: AlphaFunc (offset 240) */
"if\0"
"glAlphaFunc\0"
"\0"
- /* _mesa_function_pool[5748]: WindowPos2svMESA (will be remapped) */
+ /* _mesa_function_pool[5735]: WindowPos2svMESA (will be remapped) */
"p\0"
"glWindowPos2sv\0"
"glWindowPos2svARB\0"
"glWindowPos2svMESA\0"
"\0"
- /* _mesa_function_pool[5803]: EdgeFlag (offset 41) */
+ /* _mesa_function_pool[5790]: EdgeFlag (offset 41) */
"i\0"
"glEdgeFlag\0"
"\0"
- /* _mesa_function_pool[5817]: TexCoord2iv (offset 107) */
+ /* _mesa_function_pool[5804]: TexCoord2iv (offset 107) */
"p\0"
"glTexCoord2iv\0"
"\0"
- /* _mesa_function_pool[5834]: CompressedTexImage1DARB (will be remapped) */
+ /* _mesa_function_pool[5821]: CompressedTexImage1DARB (will be remapped) */
"iiiiiip\0"
"glCompressedTexImage1D\0"
"glCompressedTexImage1DARB\0"
"\0"
- /* _mesa_function_pool[5892]: Rotated (offset 299) */
+ /* _mesa_function_pool[5879]: Rotated (offset 299) */
"dddd\0"
"glRotated\0"
"\0"
- /* _mesa_function_pool[5908]: GetTexParameterIuivEXT (will be remapped) */
+ /* _mesa_function_pool[5895]: GetTexParameterIuivEXT (will be remapped) */
"iip\0"
"glGetTexParameterIuivEXT\0"
"glGetTexParameterIuiv\0"
"\0"
- /* _mesa_function_pool[5960]: VertexAttrib2sNV (will be remapped) */
+ /* _mesa_function_pool[5947]: VertexAttrib2sNV (will be remapped) */
"iii\0"
"glVertexAttrib2sNV\0"
"\0"
- /* _mesa_function_pool[5984]: ReadPixels (offset 256) */
+ /* _mesa_function_pool[5971]: ReadPixels (offset 256) */
"iiiiiip\0"
"glReadPixels\0"
"\0"
- /* _mesa_function_pool[6006]: EdgeFlagv (offset 42) */
+ /* _mesa_function_pool[5993]: EdgeFlagv (offset 42) */
"p\0"
"glEdgeFlagv\0"
"\0"
- /* _mesa_function_pool[6021]: NormalPointerListIBM (dynamic) */
+ /* _mesa_function_pool[6008]: NormalPointerListIBM (dynamic) */
"iipi\0"
"glNormalPointerListIBM\0"
"\0"
- /* _mesa_function_pool[6050]: IndexPointerEXT (will be remapped) */
+ /* _mesa_function_pool[6037]: IndexPointerEXT (will be remapped) */
"iiip\0"
"glIndexPointerEXT\0"
"\0"
- /* _mesa_function_pool[6074]: Color4iv (offset 32) */
+ /* _mesa_function_pool[6061]: Color4iv (offset 32) */
"p\0"
"glColor4iv\0"
"\0"
- /* _mesa_function_pool[6088]: TexParameterf (offset 178) */
+ /* _mesa_function_pool[6075]: TexParameterf (offset 178) */
"iif\0"
"glTexParameterf\0"
"\0"
- /* _mesa_function_pool[6109]: TexParameteri (offset 180) */
+ /* _mesa_function_pool[6096]: TexParameteri (offset 180) */
"iii\0"
"glTexParameteri\0"
"\0"
- /* _mesa_function_pool[6130]: NormalPointerEXT (will be remapped) */
+ /* _mesa_function_pool[6117]: NormalPointerEXT (will be remapped) */
"iiip\0"
"glNormalPointerEXT\0"
"\0"
- /* _mesa_function_pool[6155]: MultiTexCoord3dARB (offset 392) */
+ /* _mesa_function_pool[6142]: MultiTexCoord3dARB (offset 392) */
"iddd\0"
"glMultiTexCoord3d\0"
"glMultiTexCoord3dARB\0"
"\0"
- /* _mesa_function_pool[6200]: MultiTexCoord2iARB (offset 388) */
+ /* _mesa_function_pool[6187]: MultiTexCoord2iARB (offset 388) */
"iii\0"
"glMultiTexCoord2i\0"
"glMultiTexCoord2iARB\0"
"\0"
- /* _mesa_function_pool[6244]: DrawPixels (offset 257) */
+ /* _mesa_function_pool[6231]: DrawPixels (offset 257) */
"iiiip\0"
"glDrawPixels\0"
"\0"
- /* _mesa_function_pool[6264]: ReplacementCodeuiTexCoord2fNormal3fVertex3fSUN (dynamic) */
+ /* _mesa_function_pool[6251]: ReplacementCodeuiTexCoord2fNormal3fVertex3fSUN (dynamic) */
"iffffffff\0"
"glReplacementCodeuiTexCoord2fNormal3fVertex3fSUN\0"
"\0"
- /* _mesa_function_pool[6324]: MultiTexCoord2svARB (offset 391) */
+ /* _mesa_function_pool[6311]: MultiTexCoord2svARB (offset 391) */
"ip\0"
"glMultiTexCoord2sv\0"
"glMultiTexCoord2svARB\0"
"\0"
- /* _mesa_function_pool[6369]: ReplacementCodeubvSUN (dynamic) */
+ /* _mesa_function_pool[6356]: ReplacementCodeubvSUN (dynamic) */
"p\0"
"glReplacementCodeubvSUN\0"
"\0"
- /* _mesa_function_pool[6396]: Uniform3iARB (will be remapped) */
+ /* _mesa_function_pool[6383]: Uniform3iARB (will be remapped) */
"iiii\0"
"glUniform3i\0"
"glUniform3iARB\0"
"\0"
- /* _mesa_function_pool[6429]: DrawTransformFeedback (will be remapped) */
+ /* _mesa_function_pool[6416]: DrawTransformFeedback (will be remapped) */
"ii\0"
"glDrawTransformFeedback\0"
"\0"
- /* _mesa_function_pool[6457]: DrawElementsInstancedARB (will be remapped) */
+ /* _mesa_function_pool[6444]: DrawElementsInstancedARB (will be remapped) */
"iiipi\0"
"glDrawElementsInstancedARB\0"
"glDrawElementsInstancedEXT\0"
"glDrawElementsInstanced\0"
"\0"
- /* _mesa_function_pool[6542]: GetShaderInfoLog (will be remapped) */
+ /* _mesa_function_pool[6529]: GetShaderInfoLog (will be remapped) */
"iipp\0"
"glGetShaderInfoLog\0"
"\0"
- /* _mesa_function_pool[6567]: WeightivARB (dynamic) */
+ /* _mesa_function_pool[6554]: WeightivARB (dynamic) */
"ip\0"
"glWeightivARB\0"
"\0"
- /* _mesa_function_pool[6585]: PollInstrumentsSGIX (dynamic) */
+ /* _mesa_function_pool[6572]: PollInstrumentsSGIX (dynamic) */
"p\0"
"glPollInstrumentsSGIX\0"
"\0"
- /* _mesa_function_pool[6610]: GlobalAlphaFactordSUN (dynamic) */
+ /* _mesa_function_pool[6597]: GlobalAlphaFactordSUN (dynamic) */
"d\0"
"glGlobalAlphaFactordSUN\0"
"\0"
- /* _mesa_function_pool[6637]: GetFinalCombinerInputParameterfvNV (will be remapped) */
+ /* _mesa_function_pool[6624]: GetFinalCombinerInputParameterfvNV (will be remapped) */
"iip\0"
"glGetFinalCombinerInputParameterfvNV\0"
"\0"
- /* _mesa_function_pool[6679]: GenerateMipmapEXT (will be remapped) */
+ /* _mesa_function_pool[6666]: GenerateMipmapEXT (will be remapped) */
"i\0"
"glGenerateMipmap\0"
"glGenerateMipmapEXT\0"
"\0"
- /* _mesa_function_pool[6719]: GenLists (offset 5) */
+ /* _mesa_function_pool[6706]: GenLists (offset 5) */
"i\0"
"glGenLists\0"
"\0"
- /* _mesa_function_pool[6733]: SetFragmentShaderConstantATI (will be remapped) */
- "ip\0"
- "glSetFragmentShaderConstantATI\0"
+ /* _mesa_function_pool[6720]: DepthRangef (will be remapped) */
+ "ff\0"
+ "glDepthRangef\0"
"\0"
- /* _mesa_function_pool[6768]: GetMapAttribParameterivNV (dynamic) */
+ /* _mesa_function_pool[6738]: GetMapAttribParameterivNV (dynamic) */
"iiip\0"
"glGetMapAttribParameterivNV\0"
"\0"
- /* _mesa_function_pool[6802]: CreateShaderObjectARB (will be remapped) */
+ /* _mesa_function_pool[6772]: CreateShaderObjectARB (will be remapped) */
"i\0"
"glCreateShaderObjectARB\0"
"\0"
- /* _mesa_function_pool[6829]: GetSharpenTexFuncSGIS (dynamic) */
+ /* _mesa_function_pool[6799]: GetSharpenTexFuncSGIS (dynamic) */
"ip\0"
"glGetSharpenTexFuncSGIS\0"
"\0"
- /* _mesa_function_pool[6857]: BufferDataARB (will be remapped) */
+ /* _mesa_function_pool[6827]: BufferDataARB (will be remapped) */
"iipi\0"
"glBufferData\0"
"glBufferDataARB\0"
"\0"
- /* _mesa_function_pool[6892]: FlushVertexArrayRangeNV (will be remapped) */
+ /* _mesa_function_pool[6862]: FlushVertexArrayRangeNV (will be remapped) */
"\0"
"glFlushVertexArrayRangeNV\0"
"\0"
- /* _mesa_function_pool[6920]: MapGrid2d (offset 226) */
+ /* _mesa_function_pool[6890]: MapGrid2d (offset 226) */
"iddidd\0"
"glMapGrid2d\0"
"\0"
- /* _mesa_function_pool[6940]: MapGrid2f (offset 227) */
+ /* _mesa_function_pool[6910]: MapGrid2f (offset 227) */
"iffiff\0"
"glMapGrid2f\0"
"\0"
- /* _mesa_function_pool[6960]: SampleMapATI (will be remapped) */
+ /* _mesa_function_pool[6930]: SampleMapATI (will be remapped) */
"iii\0"
"glSampleMapATI\0"
"\0"
- /* _mesa_function_pool[6980]: VertexPointerEXT (will be remapped) */
+ /* _mesa_function_pool[6950]: VertexPointerEXT (will be remapped) */
"iiiip\0"
"glVertexPointerEXT\0"
"\0"
- /* _mesa_function_pool[7006]: GetTexFilterFuncSGIS (dynamic) */
+ /* _mesa_function_pool[6976]: GetTexFilterFuncSGIS (dynamic) */
"iip\0"
"glGetTexFilterFuncSGIS\0"
"\0"
- /* _mesa_function_pool[7034]: Scissor (offset 176) */
+ /* _mesa_function_pool[7004]: Scissor (offset 176) */
"iiii\0"
"glScissor\0"
"\0"
- /* _mesa_function_pool[7050]: Fogf (offset 153) */
+ /* _mesa_function_pool[7020]: Fogf (offset 153) */
"if\0"
"glFogf\0"
"\0"
- /* _mesa_function_pool[7061]: ReplacementCodeuiColor4ubVertex3fvSUN (dynamic) */
+ /* _mesa_function_pool[7031]: ReplacementCodeuiColor4ubVertex3fvSUN (dynamic) */
"ppp\0"
"glReplacementCodeuiColor4ubVertex3fvSUN\0"
"\0"
- /* _mesa_function_pool[7106]: TexSubImage1D (offset 332) */
+ /* _mesa_function_pool[7076]: TexSubImage1D (offset 332) */
"iiiiiip\0"
"glTexSubImage1D\0"
"glTexSubImage1DEXT\0"
"\0"
- /* _mesa_function_pool[7150]: VertexAttrib1sARB (will be remapped) */
+ /* _mesa_function_pool[7120]: VertexAttrib1sARB (will be remapped) */
"ii\0"
"glVertexAttrib1s\0"
"glVertexAttrib1sARB\0"
"\0"
- /* _mesa_function_pool[7191]: FenceSync (will be remapped) */
+ /* _mesa_function_pool[7161]: FenceSync (will be remapped) */
"ii\0"
"glFenceSync\0"
"\0"
- /* _mesa_function_pool[7207]: Color4usv (offset 40) */
+ /* _mesa_function_pool[7177]: Color4usv (offset 40) */
"p\0"
"glColor4usv\0"
"\0"
- /* _mesa_function_pool[7222]: Fogi (offset 155) */
+ /* _mesa_function_pool[7192]: Fogi (offset 155) */
"ii\0"
"glFogi\0"
"\0"
- /* _mesa_function_pool[7233]: DepthRange (offset 288) */
+ /* _mesa_function_pool[7203]: DepthRange (offset 288) */
"dd\0"
"glDepthRange\0"
"\0"
- /* _mesa_function_pool[7250]: RasterPos3iv (offset 75) */
+ /* _mesa_function_pool[7220]: RasterPos3iv (offset 75) */
"p\0"
"glRasterPos3iv\0"
"\0"
- /* _mesa_function_pool[7268]: FinalCombinerInputNV (will be remapped) */
+ /* _mesa_function_pool[7238]: FinalCombinerInputNV (will be remapped) */
"iiii\0"
"glFinalCombinerInputNV\0"
"\0"
- /* _mesa_function_pool[7297]: TexCoord2i (offset 106) */
+ /* _mesa_function_pool[7267]: TexCoord2i (offset 106) */
"ii\0"
"glTexCoord2i\0"
"\0"
- /* _mesa_function_pool[7314]: PixelMapfv (offset 251) */
+ /* _mesa_function_pool[7284]: PixelMapfv (offset 251) */
"iip\0"
"glPixelMapfv\0"
"\0"
- /* _mesa_function_pool[7332]: Color4ui (offset 37) */
+ /* _mesa_function_pool[7302]: Color4ui (offset 37) */
"iiii\0"
"glColor4ui\0"
"\0"
- /* _mesa_function_pool[7349]: RasterPos3s (offset 76) */
+ /* _mesa_function_pool[7319]: RasterPos3s (offset 76) */
"iii\0"
"glRasterPos3s\0"
"\0"
- /* _mesa_function_pool[7368]: Color3usv (offset 24) */
+ /* _mesa_function_pool[7338]: Color3usv (offset 24) */
"p\0"
"glColor3usv\0"
"\0"
- /* _mesa_function_pool[7383]: FlushRasterSGIX (dynamic) */
+ /* _mesa_function_pool[7353]: FlushRasterSGIX (dynamic) */
"\0"
"glFlushRasterSGIX\0"
"\0"
- /* _mesa_function_pool[7403]: TexCoord2f (offset 104) */
+ /* _mesa_function_pool[7373]: TexCoord2f (offset 104) */
"ff\0"
"glTexCoord2f\0"
"\0"
- /* _mesa_function_pool[7420]: ReplacementCodeuiTexCoord2fVertex3fSUN (dynamic) */
+ /* _mesa_function_pool[7390]: ReplacementCodeuiTexCoord2fVertex3fSUN (dynamic) */
"ifffff\0"
"glReplacementCodeuiTexCoord2fVertex3fSUN\0"
"\0"
- /* _mesa_function_pool[7469]: TexCoord2d (offset 102) */
+ /* _mesa_function_pool[7439]: TexCoord2d (offset 102) */
"dd\0"
"glTexCoord2d\0"
"\0"
- /* _mesa_function_pool[7486]: RasterPos3d (offset 70) */
+ /* _mesa_function_pool[7456]: RasterPos3d (offset 70) */
"ddd\0"
"glRasterPos3d\0"
"\0"
- /* _mesa_function_pool[7505]: RasterPos3f (offset 72) */
+ /* _mesa_function_pool[7475]: RasterPos3f (offset 72) */
"fff\0"
"glRasterPos3f\0"
"\0"
- /* _mesa_function_pool[7524]: Uniform1fARB (will be remapped) */
+ /* _mesa_function_pool[7494]: Uniform1fARB (will be remapped) */
"if\0"
"glUniform1f\0"
"glUniform1fARB\0"
"\0"
- /* _mesa_function_pool[7555]: AreTexturesResident (offset 322) */
+ /* _mesa_function_pool[7525]: AreTexturesResident (offset 322) */
"ipp\0"
"glAreTexturesResident\0"
"glAreTexturesResidentEXT\0"
"\0"
- /* _mesa_function_pool[7607]: TexCoord2s (offset 108) */
+ /* _mesa_function_pool[7577]: TexCoord2s (offset 108) */
"ii\0"
"glTexCoord2s\0"
"\0"
- /* _mesa_function_pool[7624]: StencilOpSeparate (will be remapped) */
+ /* _mesa_function_pool[7594]: StencilOpSeparate (will be remapped) */
"iiii\0"
"glStencilOpSeparate\0"
"glStencilOpSeparateATI\0"
"\0"
- /* _mesa_function_pool[7673]: ColorTableParameteriv (offset 341) */
+ /* _mesa_function_pool[7643]: ColorTableParameteriv (offset 341) */
"iip\0"
"glColorTableParameteriv\0"
"glColorTableParameterivSGI\0"
"\0"
- /* _mesa_function_pool[7729]: FogCoordPointerListIBM (dynamic) */
+ /* _mesa_function_pool[7699]: FogCoordPointerListIBM (dynamic) */
"iipi\0"
"glFogCoordPointerListIBM\0"
"\0"
- /* _mesa_function_pool[7760]: WindowPos3dMESA (will be remapped) */
+ /* _mesa_function_pool[7730]: WindowPos3dMESA (will be remapped) */
"ddd\0"
"glWindowPos3d\0"
"glWindowPos3dARB\0"
"glWindowPos3dMESA\0"
"\0"
- /* _mesa_function_pool[7814]: Color4us (offset 39) */
+ /* _mesa_function_pool[7784]: Color4us (offset 39) */
"iiii\0"
"glColor4us\0"
"\0"
- /* _mesa_function_pool[7831]: PointParameterfvEXT (will be remapped) */
+ /* _mesa_function_pool[7801]: PointParameterfvEXT (will be remapped) */
"ip\0"
"glPointParameterfv\0"
"glPointParameterfvARB\0"
"glPointParameterfvEXT\0"
"glPointParameterfvSGIS\0"
"\0"
- /* _mesa_function_pool[7921]: Color3bv (offset 10) */
+ /* _mesa_function_pool[7891]: Color3bv (offset 10) */
"p\0"
"glColor3bv\0"
"\0"
- /* _mesa_function_pool[7935]: WindowPos2fvMESA (will be remapped) */
+ /* _mesa_function_pool[7905]: WindowPos2fvMESA (will be remapped) */
"p\0"
"glWindowPos2fv\0"
"glWindowPos2fvARB\0"
"glWindowPos2fvMESA\0"
"\0"
- /* _mesa_function_pool[7990]: SecondaryColor3bvEXT (will be remapped) */
+ /* _mesa_function_pool[7960]: SecondaryColor3bvEXT (will be remapped) */
"p\0"
"glSecondaryColor3bv\0"
"glSecondaryColor3bvEXT\0"
"\0"
- /* _mesa_function_pool[8036]: VertexPointerListIBM (dynamic) */
+ /* _mesa_function_pool[8006]: VertexPointerListIBM (dynamic) */
"iiipi\0"
"glVertexPointerListIBM\0"
"\0"
- /* _mesa_function_pool[8066]: GetProgramLocalParameterfvARB (will be remapped) */
+ /* _mesa_function_pool[8036]: GetProgramLocalParameterfvARB (will be remapped) */
"iip\0"
"glGetProgramLocalParameterfvARB\0"
"\0"
- /* _mesa_function_pool[8103]: FragmentMaterialfSGIX (dynamic) */
+ /* _mesa_function_pool[8073]: FragmentMaterialfSGIX (dynamic) */
"iif\0"
"glFragmentMaterialfSGIX\0"
"\0"
- /* _mesa_function_pool[8132]: TexCoord2fNormal3fVertex3fSUN (dynamic) */
+ /* _mesa_function_pool[8102]: TexCoord2fNormal3fVertex3fSUN (dynamic) */
"ffffffff\0"
"glTexCoord2fNormal3fVertex3fSUN\0"
"\0"
- /* _mesa_function_pool[8174]: RenderbufferStorageEXT (will be remapped) */
+ /* _mesa_function_pool[8144]: RenderbufferStorageEXT (will be remapped) */
"iiii\0"
"glRenderbufferStorage\0"
"glRenderbufferStorageEXT\0"
"\0"
- /* _mesa_function_pool[8227]: IsFenceNV (will be remapped) */
+ /* _mesa_function_pool[8197]: IsFenceNV (will be remapped) */
"i\0"
"glIsFenceNV\0"
"\0"
- /* _mesa_function_pool[8242]: AttachObjectARB (will be remapped) */
+ /* _mesa_function_pool[8212]: AttachObjectARB (will be remapped) */
"ii\0"
"glAttachObjectARB\0"
"\0"
- /* _mesa_function_pool[8264]: GetFragmentLightivSGIX (dynamic) */
+ /* _mesa_function_pool[8234]: GetFragmentLightivSGIX (dynamic) */
"iip\0"
"glGetFragmentLightivSGIX\0"
"\0"
- /* _mesa_function_pool[8294]: UniformMatrix2fvARB (will be remapped) */
+ /* _mesa_function_pool[8264]: UniformMatrix2fvARB (will be remapped) */
"iiip\0"
"glUniformMatrix2fv\0"
"glUniformMatrix2fvARB\0"
"\0"
- /* _mesa_function_pool[8341]: MultiTexCoord2fARB (offset 386) */
+ /* _mesa_function_pool[8311]: MultiTexCoord2fARB (offset 386) */
"iff\0"
"glMultiTexCoord2f\0"
"glMultiTexCoord2fARB\0"
"\0"
- /* _mesa_function_pool[8385]: ColorTable (offset 339) */
+ /* _mesa_function_pool[8355]: ColorTable (offset 339) */
"iiiiip\0"
"glColorTable\0"
"glColorTableSGI\0"
"glColorTableEXT\0"
"\0"
- /* _mesa_function_pool[8438]: IndexPointer (offset 314) */
+ /* _mesa_function_pool[8408]: IndexPointer (offset 314) */
"iip\0"
"glIndexPointer\0"
"\0"
- /* _mesa_function_pool[8458]: Accum (offset 213) */
+ /* _mesa_function_pool[8428]: Accum (offset 213) */
"if\0"
"glAccum\0"
"\0"
- /* _mesa_function_pool[8470]: GetTexImage (offset 281) */
+ /* _mesa_function_pool[8440]: GetTexImage (offset 281) */
"iiiip\0"
"glGetTexImage\0"
"\0"
- /* _mesa_function_pool[8491]: MapControlPointsNV (dynamic) */
+ /* _mesa_function_pool[8461]: MapControlPointsNV (dynamic) */
"iiiiiiiip\0"
"glMapControlPointsNV\0"
"\0"
- /* _mesa_function_pool[8523]: ConvolutionFilter2D (offset 349) */
+ /* _mesa_function_pool[8493]: ConvolutionFilter2D (offset 349) */
"iiiiiip\0"
"glConvolutionFilter2D\0"
"glConvolutionFilter2DEXT\0"
"\0"
- /* _mesa_function_pool[8579]: Finish (offset 216) */
+ /* _mesa_function_pool[8549]: Finish (offset 216) */
"\0"
"glFinish\0"
"\0"
- /* _mesa_function_pool[8590]: MapParameterfvNV (dynamic) */
+ /* _mesa_function_pool[8560]: MapParameterfvNV (dynamic) */
"iip\0"
"glMapParameterfvNV\0"
"\0"
- /* _mesa_function_pool[8614]: ClearStencil (offset 207) */
+ /* _mesa_function_pool[8584]: ClearStencil (offset 207) */
"i\0"
"glClearStencil\0"
"\0"
- /* _mesa_function_pool[8632]: VertexAttrib3dvARB (will be remapped) */
+ /* _mesa_function_pool[8602]: VertexAttrib3dvARB (will be remapped) */
"ip\0"
"glVertexAttrib3dv\0"
"glVertexAttrib3dvARB\0"
"\0"
- /* _mesa_function_pool[8675]: Uniform4uivEXT (will be remapped) */
+ /* _mesa_function_pool[8645]: Uniform4uivEXT (will be remapped) */
"iip\0"
"glUniform4uivEXT\0"
"glUniform4uiv\0"
"\0"
- /* _mesa_function_pool[8711]: HintPGI (dynamic) */
+ /* _mesa_function_pool[8681]: HintPGI (dynamic) */
"ii\0"
"glHintPGI\0"
"\0"
- /* _mesa_function_pool[8725]: ConvolutionParameteriv (offset 353) */
+ /* _mesa_function_pool[8695]: ConvolutionParameteriv (offset 353) */
"iip\0"
"glConvolutionParameteriv\0"
"glConvolutionParameterivEXT\0"
"\0"
- /* _mesa_function_pool[8783]: Color4s (offset 33) */
+ /* _mesa_function_pool[8753]: Color4s (offset 33) */
"iiii\0"
"glColor4s\0"
"\0"
- /* _mesa_function_pool[8799]: InterleavedArrays (offset 317) */
+ /* _mesa_function_pool[8769]: InterleavedArrays (offset 317) */
"iip\0"
"glInterleavedArrays\0"
"\0"
- /* _mesa_function_pool[8824]: RasterPos2fv (offset 65) */
+ /* _mesa_function_pool[8794]: RasterPos2fv (offset 65) */
"p\0"
"glRasterPos2fv\0"
"\0"
- /* _mesa_function_pool[8842]: TexCoord1fv (offset 97) */
+ /* _mesa_function_pool[8812]: TexCoord1fv (offset 97) */
"p\0"
"glTexCoord1fv\0"
"\0"
- /* _mesa_function_pool[8859]: Vertex2d (offset 126) */
+ /* _mesa_function_pool[8829]: Vertex2d (offset 126) */
"dd\0"
"glVertex2d\0"
"\0"
- /* _mesa_function_pool[8874]: CullParameterdvEXT (dynamic) */
+ /* _mesa_function_pool[8844]: CullParameterdvEXT (dynamic) */
"ip\0"
"glCullParameterdvEXT\0"
"\0"
- /* _mesa_function_pool[8899]: ProgramNamedParameter4fNV (will be remapped) */
+ /* _mesa_function_pool[8869]: ProgramNamedParameter4fNV (will be remapped) */
"iipffff\0"
"glProgramNamedParameter4fNV\0"
"\0"
- /* _mesa_function_pool[8936]: Color3fVertex3fSUN (dynamic) */
+ /* _mesa_function_pool[8906]: Color3fVertex3fSUN (dynamic) */
"ffffff\0"
"glColor3fVertex3fSUN\0"
"\0"
- /* _mesa_function_pool[8965]: ProgramEnvParameter4fvARB (will be remapped) */
+ /* _mesa_function_pool[8935]: ProgramEnvParameter4fvARB (will be remapped) */
"iip\0"
"glProgramEnvParameter4fvARB\0"
"glProgramParameter4fvNV\0"
"\0"
- /* _mesa_function_pool[9022]: Color4i (offset 31) */
+ /* _mesa_function_pool[8992]: Color4i (offset 31) */
"iiii\0"
"glColor4i\0"
"\0"
- /* _mesa_function_pool[9038]: Color4f (offset 29) */
+ /* _mesa_function_pool[9008]: Color4f (offset 29) */
"ffff\0"
"glColor4f\0"
"\0"
- /* _mesa_function_pool[9054]: RasterPos4fv (offset 81) */
+ /* _mesa_function_pool[9024]: RasterPos4fv (offset 81) */
"p\0"
"glRasterPos4fv\0"
"\0"
- /* _mesa_function_pool[9072]: Color4d (offset 27) */
+ /* _mesa_function_pool[9042]: Color4d (offset 27) */
"dddd\0"
"glColor4d\0"
"\0"
- /* _mesa_function_pool[9088]: ClearIndex (offset 205) */
+ /* _mesa_function_pool[9058]: ClearIndex (offset 205) */
"f\0"
"glClearIndex\0"
"\0"
- /* _mesa_function_pool[9104]: Color4b (offset 25) */
+ /* _mesa_function_pool[9074]: Color4b (offset 25) */
"iiii\0"
"glColor4b\0"
"\0"
- /* _mesa_function_pool[9120]: LoadMatrixd (offset 292) */
+ /* _mesa_function_pool[9090]: LoadMatrixd (offset 292) */
"p\0"
"glLoadMatrixd\0"
"\0"
- /* _mesa_function_pool[9137]: FragmentLightModeliSGIX (dynamic) */
+ /* _mesa_function_pool[9107]: FragmentLightModeliSGIX (dynamic) */
"ii\0"
"glFragmentLightModeliSGIX\0"
"\0"
- /* _mesa_function_pool[9167]: RasterPos2dv (offset 63) */
+ /* _mesa_function_pool[9137]: RasterPos2dv (offset 63) */
"p\0"
"glRasterPos2dv\0"
"\0"
- /* _mesa_function_pool[9185]: ConvolutionParameterfv (offset 351) */
+ /* _mesa_function_pool[9155]: ConvolutionParameterfv (offset 351) */
"iip\0"
"glConvolutionParameterfv\0"
"glConvolutionParameterfvEXT\0"
"\0"
- /* _mesa_function_pool[9243]: TbufferMask3DFX (dynamic) */
+ /* _mesa_function_pool[9213]: TbufferMask3DFX (dynamic) */
"i\0"
"glTbufferMask3DFX\0"
"\0"
- /* _mesa_function_pool[9264]: GetTexGendv (offset 278) */
+ /* _mesa_function_pool[9234]: GetTexGendv (offset 278) */
"iip\0"
"glGetTexGendv\0"
"\0"
- /* _mesa_function_pool[9283]: GetVertexAttribfvNV (will be remapped) */
+ /* _mesa_function_pool[9253]: GetVertexAttribfvNV (will be remapped) */
"iip\0"
"glGetVertexAttribfvNV\0"
"\0"
- /* _mesa_function_pool[9310]: BeginTransformFeedbackEXT (will be remapped) */
+ /* _mesa_function_pool[9280]: BeginTransformFeedbackEXT (will be remapped) */
"i\0"
"glBeginTransformFeedbackEXT\0"
"glBeginTransformFeedback\0"
"\0"
- /* _mesa_function_pool[9366]: LoadProgramNV (will be remapped) */
+ /* _mesa_function_pool[9336]: LoadProgramNV (will be remapped) */
"iiip\0"
"glLoadProgramNV\0"
"\0"
- /* _mesa_function_pool[9388]: WaitSync (will be remapped) */
+ /* _mesa_function_pool[9358]: WaitSync (will be remapped) */
"iii\0"
"glWaitSync\0"
"\0"
- /* _mesa_function_pool[9404]: EndList (offset 1) */
+ /* _mesa_function_pool[9374]: EndList (offset 1) */
"\0"
"glEndList\0"
"\0"
- /* _mesa_function_pool[9416]: VertexAttrib4fvNV (will be remapped) */
+ /* _mesa_function_pool[9386]: VertexAttrib4fvNV (will be remapped) */
"ip\0"
"glVertexAttrib4fvNV\0"
"\0"
- /* _mesa_function_pool[9440]: GetAttachedObjectsARB (will be remapped) */
+ /* _mesa_function_pool[9410]: GetAttachedObjectsARB (will be remapped) */
"iipp\0"
"glGetAttachedObjectsARB\0"
"\0"
- /* _mesa_function_pool[9470]: Uniform3fvARB (will be remapped) */
+ /* _mesa_function_pool[9440]: Uniform3fvARB (will be remapped) */
"iip\0"
"glUniform3fv\0"
"glUniform3fvARB\0"
"\0"
- /* _mesa_function_pool[9504]: EvalCoord1fv (offset 231) */
+ /* _mesa_function_pool[9474]: EvalCoord1fv (offset 231) */
"p\0"
"glEvalCoord1fv\0"
"\0"
- /* _mesa_function_pool[9522]: DrawRangeElements (offset 338) */
+ /* _mesa_function_pool[9492]: DrawRangeElements (offset 338) */
"iiiiip\0"
"glDrawRangeElements\0"
"glDrawRangeElementsEXT\0"
"\0"
- /* _mesa_function_pool[9573]: EvalMesh2 (offset 238) */
+ /* _mesa_function_pool[9543]: EvalMesh2 (offset 238) */
"iiiii\0"
"glEvalMesh2\0"
"\0"
- /* _mesa_function_pool[9592]: Vertex4fv (offset 145) */
+ /* _mesa_function_pool[9562]: Vertex4fv (offset 145) */
"p\0"
"glVertex4fv\0"
"\0"
- /* _mesa_function_pool[9607]: GenTransformFeedbacks (will be remapped) */
+ /* _mesa_function_pool[9577]: GenTransformFeedbacks (will be remapped) */
"ip\0"
"glGenTransformFeedbacks\0"
"\0"
- /* _mesa_function_pool[9635]: SpriteParameterfvSGIX (dynamic) */
+ /* _mesa_function_pool[9605]: SpriteParameterfvSGIX (dynamic) */
"ip\0"
"glSpriteParameterfvSGIX\0"
"\0"
- /* _mesa_function_pool[9663]: CheckFramebufferStatusEXT (will be remapped) */
+ /* _mesa_function_pool[9633]: CheckFramebufferStatusEXT (will be remapped) */
"i\0"
"glCheckFramebufferStatus\0"
"glCheckFramebufferStatusEXT\0"
"\0"
- /* _mesa_function_pool[9719]: GlobalAlphaFactoruiSUN (dynamic) */
+ /* _mesa_function_pool[9689]: GlobalAlphaFactoruiSUN (dynamic) */
"i\0"
"glGlobalAlphaFactoruiSUN\0"
"\0"
- /* _mesa_function_pool[9747]: GetHandleARB (will be remapped) */
+ /* _mesa_function_pool[9717]: GetHandleARB (will be remapped) */
"i\0"
"glGetHandleARB\0"
"\0"
- /* _mesa_function_pool[9765]: GetVertexAttribivARB (will be remapped) */
+ /* _mesa_function_pool[9735]: GetVertexAttribivARB (will be remapped) */
"iip\0"
"glGetVertexAttribiv\0"
"glGetVertexAttribivARB\0"
"\0"
- /* _mesa_function_pool[9813]: GetCombinerInputParameterfvNV (will be remapped) */
+ /* _mesa_function_pool[9783]: BlendFunciARB (will be remapped) */
+ "iii\0"
+ "glBlendFunciARB\0"
+ "\0"
+ /* _mesa_function_pool[9804]: GetCombinerInputParameterfvNV (will be remapped) */
"iiiip\0"
"glGetCombinerInputParameterfvNV\0"
"\0"
- /* _mesa_function_pool[9852]: GetTexParameterIivEXT (will be remapped) */
+ /* _mesa_function_pool[9843]: GetTexParameterIivEXT (will be remapped) */
"iip\0"
"glGetTexParameterIivEXT\0"
"glGetTexParameterIiv\0"
"\0"
- /* _mesa_function_pool[9902]: CreateProgram (will be remapped) */
+ /* _mesa_function_pool[9893]: CreateProgram (will be remapped) */
"\0"
"glCreateProgram\0"
"\0"
- /* _mesa_function_pool[9920]: LoadTransposeMatrixdARB (will be remapped) */
+ /* _mesa_function_pool[9911]: LoadTransposeMatrixdARB (will be remapped) */
"p\0"
"glLoadTransposeMatrixd\0"
"glLoadTransposeMatrixdARB\0"
"\0"
- /* _mesa_function_pool[9972]: GetMinmax (offset 364) */
+ /* _mesa_function_pool[9963]: ReleaseShaderCompiler (will be remapped) */
+ "\0"
+ "glReleaseShaderCompiler\0"
+ "\0"
+ /* _mesa_function_pool[9989]: GetMinmax (offset 364) */
"iiiip\0"
"glGetMinmax\0"
"glGetMinmaxEXT\0"
"\0"
- /* _mesa_function_pool[10006]: StencilFuncSeparate (will be remapped) */
+ /* _mesa_function_pool[10023]: StencilFuncSeparate (will be remapped) */
"iiii\0"
"glStencilFuncSeparate\0"
"\0"
- /* _mesa_function_pool[10034]: SecondaryColor3sEXT (will be remapped) */
+ /* _mesa_function_pool[10051]: SecondaryColor3sEXT (will be remapped) */
"iii\0"
"glSecondaryColor3s\0"
"glSecondaryColor3sEXT\0"
"\0"
- /* _mesa_function_pool[10080]: Color3fVertex3fvSUN (dynamic) */
+ /* _mesa_function_pool[10097]: Color3fVertex3fvSUN (dynamic) */
"pp\0"
"glColor3fVertex3fvSUN\0"
"\0"
- /* _mesa_function_pool[10106]: GetInteger64i_v (will be remapped) */
+ /* _mesa_function_pool[10123]: GetInteger64i_v (will be remapped) */
"iip\0"
"glGetInteger64i_v\0"
"\0"
- /* _mesa_function_pool[10129]: Normal3fv (offset 57) */
+ /* _mesa_function_pool[10146]: Normal3fv (offset 57) */
"p\0"
"glNormal3fv\0"
"\0"
- /* _mesa_function_pool[10144]: GlobalAlphaFactorbSUN (dynamic) */
+ /* _mesa_function_pool[10161]: GlobalAlphaFactorbSUN (dynamic) */
"i\0"
"glGlobalAlphaFactorbSUN\0"
"\0"
- /* _mesa_function_pool[10171]: Color3us (offset 23) */
+ /* _mesa_function_pool[10188]: Color3us (offset 23) */
"iii\0"
"glColor3us\0"
"\0"
- /* _mesa_function_pool[10187]: ImageTransformParameterfvHP (dynamic) */
+ /* _mesa_function_pool[10204]: ImageTransformParameterfvHP (dynamic) */
"iip\0"
"glImageTransformParameterfvHP\0"
"\0"
- /* _mesa_function_pool[10222]: VertexAttrib4ivARB (will be remapped) */
+ /* _mesa_function_pool[10239]: VertexAttrib4ivARB (will be remapped) */
"ip\0"
"glVertexAttrib4iv\0"
"glVertexAttrib4ivARB\0"
"\0"
- /* _mesa_function_pool[10265]: End (offset 43) */
+ /* _mesa_function_pool[10282]: End (offset 43) */
"\0"
"glEnd\0"
"\0"
- /* _mesa_function_pool[10273]: VertexAttrib3fNV (will be remapped) */
+ /* _mesa_function_pool[10290]: VertexAttrib3fNV (will be remapped) */
"ifff\0"
"glVertexAttrib3fNV\0"
"\0"
- /* _mesa_function_pool[10298]: VertexAttribs2dvNV (will be remapped) */
+ /* _mesa_function_pool[10315]: VertexAttribs2dvNV (will be remapped) */
"iip\0"
"glVertexAttribs2dvNV\0"
"\0"
- /* _mesa_function_pool[10324]: GetQueryObjectui64vEXT (will be remapped) */
+ /* _mesa_function_pool[10341]: GetQueryObjectui64vEXT (will be remapped) */
"iip\0"
"glGetQueryObjectui64vEXT\0"
"\0"
- /* _mesa_function_pool[10354]: MultiTexCoord3fvARB (offset 395) */
+ /* _mesa_function_pool[10371]: MultiTexCoord3fvARB (offset 395) */
"ip\0"
"glMultiTexCoord3fv\0"
"glMultiTexCoord3fvARB\0"
"\0"
- /* _mesa_function_pool[10399]: SecondaryColor3dEXT (will be remapped) */
+ /* _mesa_function_pool[10416]: SecondaryColor3dEXT (will be remapped) */
"ddd\0"
"glSecondaryColor3d\0"
"glSecondaryColor3dEXT\0"
"\0"
- /* _mesa_function_pool[10445]: Color3ub (offset 19) */
+ /* _mesa_function_pool[10462]: Color3ub (offset 19) */
"iii\0"
"glColor3ub\0"
"\0"
- /* _mesa_function_pool[10461]: GetProgramParameterfvNV (will be remapped) */
+ /* _mesa_function_pool[10478]: GetProgramParameterfvNV (will be remapped) */
"iiip\0"
"glGetProgramParameterfvNV\0"
"\0"
- /* _mesa_function_pool[10493]: TangentPointerEXT (dynamic) */
+ /* _mesa_function_pool[10510]: TangentPointerEXT (dynamic) */
"iip\0"
"glTangentPointerEXT\0"
"\0"
- /* _mesa_function_pool[10518]: Color4fNormal3fVertex3fvSUN (dynamic) */
+ /* _mesa_function_pool[10535]: Color4fNormal3fVertex3fvSUN (dynamic) */
"ppp\0"
"glColor4fNormal3fVertex3fvSUN\0"
"\0"
- /* _mesa_function_pool[10553]: GetInstrumentsSGIX (dynamic) */
+ /* _mesa_function_pool[10570]: GetInstrumentsSGIX (dynamic) */
"\0"
"glGetInstrumentsSGIX\0"
"\0"
- /* _mesa_function_pool[10576]: GetUniformuivEXT (will be remapped) */
+ /* _mesa_function_pool[10593]: GetUniformuivEXT (will be remapped) */
"iip\0"
"glGetUniformuivEXT\0"
"glGetUniformuiv\0"
"\0"
- /* _mesa_function_pool[10616]: Color3ui (offset 21) */
+ /* _mesa_function_pool[10633]: Color3ui (offset 21) */
"iii\0"
"glColor3ui\0"
"\0"
- /* _mesa_function_pool[10632]: EvalMapsNV (dynamic) */
+ /* _mesa_function_pool[10649]: EvalMapsNV (dynamic) */
"ii\0"
"glEvalMapsNV\0"
"\0"
- /* _mesa_function_pool[10649]: TexSubImage2D (offset 333) */
+ /* _mesa_function_pool[10666]: TexSubImage2D (offset 333) */
"iiiiiiiip\0"
"glTexSubImage2D\0"
"glTexSubImage2DEXT\0"
"\0"
- /* _mesa_function_pool[10695]: FragmentLightivSGIX (dynamic) */
+ /* _mesa_function_pool[10712]: FragmentLightivSGIX (dynamic) */
"iip\0"
"glFragmentLightivSGIX\0"
"\0"
- /* _mesa_function_pool[10722]: GetTexParameterPointervAPPLE (will be remapped) */
+ /* _mesa_function_pool[10739]: GetTexParameterPointervAPPLE (will be remapped) */
"iip\0"
"glGetTexParameterPointervAPPLE\0"
"\0"
- /* _mesa_function_pool[10758]: TexGenfv (offset 191) */
+ /* _mesa_function_pool[10775]: TexGenfv (offset 191) */
"iip\0"
"glTexGenfv\0"
"\0"
- /* _mesa_function_pool[10774]: GetTransformFeedbackVaryingEXT (will be remapped) */
+ /* _mesa_function_pool[10791]: GetTransformFeedbackVaryingEXT (will be remapped) */
"iiipppp\0"
"glGetTransformFeedbackVaryingEXT\0"
"glGetTransformFeedbackVarying\0"
"\0"
- /* _mesa_function_pool[10846]: VertexAttrib4bvARB (will be remapped) */
+ /* _mesa_function_pool[10863]: VertexAttrib4bvARB (will be remapped) */
"ip\0"
"glVertexAttrib4bv\0"
"glVertexAttrib4bvARB\0"
"\0"
- /* _mesa_function_pool[10889]: AlphaFragmentOp2ATI (will be remapped) */
- "iiiiiiiii\0"
- "glAlphaFragmentOp2ATI\0"
+ /* _mesa_function_pool[10906]: ShaderBinary (will be remapped) */
+ "ipipi\0"
+ "glShaderBinary\0"
"\0"
- /* _mesa_function_pool[10922]: GetIntegerIndexedvEXT (will be remapped) */
+ /* _mesa_function_pool[10928]: GetIntegerIndexedvEXT (will be remapped) */
"iip\0"
"glGetIntegerIndexedvEXT\0"
"glGetIntegeri_v\0"
"\0"
- /* _mesa_function_pool[10967]: MultiTexCoord4sARB (offset 406) */
+ /* _mesa_function_pool[10973]: MultiTexCoord4sARB (offset 406) */
"iiiii\0"
"glMultiTexCoord4s\0"
"glMultiTexCoord4sARB\0"
"\0"
- /* _mesa_function_pool[11013]: GetFragmentMaterialivSGIX (dynamic) */
+ /* _mesa_function_pool[11019]: GetFragmentMaterialivSGIX (dynamic) */
"iip\0"
"glGetFragmentMaterialivSGIX\0"
"\0"
- /* _mesa_function_pool[11046]: WindowPos4dMESA (will be remapped) */
+ /* _mesa_function_pool[11052]: WindowPos4dMESA (will be remapped) */
"dddd\0"
"glWindowPos4dMESA\0"
"\0"
- /* _mesa_function_pool[11070]: WeightPointerARB (dynamic) */
+ /* _mesa_function_pool[11076]: WeightPointerARB (dynamic) */
"iiip\0"
"glWeightPointerARB\0"
"\0"
- /* _mesa_function_pool[11095]: WindowPos2dMESA (will be remapped) */
+ /* _mesa_function_pool[11101]: WindowPos2dMESA (will be remapped) */
"dd\0"
"glWindowPos2d\0"
"glWindowPos2dARB\0"
"glWindowPos2dMESA\0"
"\0"
- /* _mesa_function_pool[11148]: FramebufferTexture3DEXT (will be remapped) */
+ /* _mesa_function_pool[11154]: FramebufferTexture3DEXT (will be remapped) */
"iiiiii\0"
"glFramebufferTexture3D\0"
"glFramebufferTexture3DEXT\0"
"\0"
- /* _mesa_function_pool[11205]: BlendEquation (offset 337) */
+ /* _mesa_function_pool[11211]: BlendEquation (offset 337) */
"i\0"
"glBlendEquation\0"
"glBlendEquationEXT\0"
"\0"
- /* _mesa_function_pool[11243]: VertexAttrib3dNV (will be remapped) */
+ /* _mesa_function_pool[11249]: VertexAttrib3dNV (will be remapped) */
"iddd\0"
"glVertexAttrib3dNV\0"
"\0"
- /* _mesa_function_pool[11268]: VertexAttrib3dARB (will be remapped) */
+ /* _mesa_function_pool[11274]: VertexAttrib3dARB (will be remapped) */
"iddd\0"
"glVertexAttrib3d\0"
"glVertexAttrib3dARB\0"
"\0"
- /* _mesa_function_pool[11311]: VertexAttribI4usvEXT (will be remapped) */
+ /* _mesa_function_pool[11317]: VertexAttribI4usvEXT (will be remapped) */
"ip\0"
"glVertexAttribI4usvEXT\0"
"glVertexAttribI4usv\0"
"\0"
- /* _mesa_function_pool[11358]: ReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN (dynamic) */
+ /* _mesa_function_pool[11364]: ReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN (dynamic) */
"ppppp\0"
"glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN\0"
"\0"
- /* _mesa_function_pool[11422]: VertexAttrib4fARB (will be remapped) */
+ /* _mesa_function_pool[11428]: VertexAttrib4fARB (will be remapped) */
"iffff\0"
"glVertexAttrib4f\0"
"glVertexAttrib4fARB\0"
"\0"
- /* _mesa_function_pool[11466]: GetError (offset 261) */
+ /* _mesa_function_pool[11472]: GetError (offset 261) */
"\0"
"glGetError\0"
"\0"
- /* _mesa_function_pool[11479]: IndexFuncEXT (dynamic) */
+ /* _mesa_function_pool[11485]: IndexFuncEXT (dynamic) */
"if\0"
"glIndexFuncEXT\0"
"\0"
- /* _mesa_function_pool[11498]: TexCoord3dv (offset 111) */
+ /* _mesa_function_pool[11504]: TexCoord3dv (offset 111) */
"p\0"
"glTexCoord3dv\0"
"\0"
- /* _mesa_function_pool[11515]: Indexdv (offset 45) */
+ /* _mesa_function_pool[11521]: Indexdv (offset 45) */
"p\0"
"glIndexdv\0"
"\0"
- /* _mesa_function_pool[11528]: FramebufferTexture2DEXT (will be remapped) */
+ /* _mesa_function_pool[11534]: FramebufferTexture2DEXT (will be remapped) */
"iiiii\0"
"glFramebufferTexture2D\0"
"glFramebufferTexture2DEXT\0"
"\0"
- /* _mesa_function_pool[11584]: Normal3s (offset 60) */
+ /* _mesa_function_pool[11590]: Normal3s (offset 60) */
"iii\0"
"glNormal3s\0"
"\0"
- /* _mesa_function_pool[11600]: GetObjectParameterivAPPLE (will be remapped) */
+ /* _mesa_function_pool[11606]: GetObjectParameterivAPPLE (will be remapped) */
"iiip\0"
"glGetObjectParameterivAPPLE\0"
"\0"
- /* _mesa_function_pool[11634]: PushName (offset 201) */
+ /* _mesa_function_pool[11640]: PushName (offset 201) */
"i\0"
"glPushName\0"
"\0"
- /* _mesa_function_pool[11648]: MultiTexCoord2dvARB (offset 385) */
+ /* _mesa_function_pool[11654]: MultiTexCoord2dvARB (offset 385) */
"ip\0"
"glMultiTexCoord2dv\0"
"glMultiTexCoord2dvARB\0"
"\0"
- /* _mesa_function_pool[11693]: CullParameterfvEXT (dynamic) */
+ /* _mesa_function_pool[11699]: CullParameterfvEXT (dynamic) */
"ip\0"
"glCullParameterfvEXT\0"
"\0"
- /* _mesa_function_pool[11718]: Normal3i (offset 58) */
+ /* _mesa_function_pool[11724]: Normal3i (offset 58) */
"iii\0"
"glNormal3i\0"
"\0"
- /* _mesa_function_pool[11734]: ProgramNamedParameter4fvNV (will be remapped) */
+ /* _mesa_function_pool[11740]: ProgramNamedParameter4fvNV (will be remapped) */
"iipp\0"
"glProgramNamedParameter4fvNV\0"
"\0"
- /* _mesa_function_pool[11769]: SecondaryColorPointerEXT (will be remapped) */
+ /* _mesa_function_pool[11775]: SecondaryColorPointerEXT (will be remapped) */
"iiip\0"
"glSecondaryColorPointer\0"
"glSecondaryColorPointerEXT\0"
"\0"
- /* _mesa_function_pool[11826]: VertexAttrib4fvARB (will be remapped) */
+ /* _mesa_function_pool[11832]: VertexAttrib4fvARB (will be remapped) */
"ip\0"
"glVertexAttrib4fv\0"
"glVertexAttrib4fvARB\0"
"\0"
- /* _mesa_function_pool[11869]: ColorPointerListIBM (dynamic) */
+ /* _mesa_function_pool[11875]: ColorPointerListIBM (dynamic) */
"iiipi\0"
"glColorPointerListIBM\0"
"\0"
- /* _mesa_function_pool[11898]: GetActiveUniformARB (will be remapped) */
+ /* _mesa_function_pool[11904]: GetActiveUniformARB (will be remapped) */
"iiipppp\0"
"glGetActiveUniform\0"
"glGetActiveUniformARB\0"
"\0"
- /* _mesa_function_pool[11948]: ImageTransformParameteriHP (dynamic) */
+ /* _mesa_function_pool[11954]: ImageTransformParameteriHP (dynamic) */
"iii\0"
"glImageTransformParameteriHP\0"
"\0"
- /* _mesa_function_pool[11982]: Normal3b (offset 52) */
+ /* _mesa_function_pool[11988]: Normal3b (offset 52) */
"iii\0"
"glNormal3b\0"
"\0"
- /* _mesa_function_pool[11998]: Normal3d (offset 54) */
+ /* _mesa_function_pool[12004]: Normal3d (offset 54) */
"ddd\0"
"glNormal3d\0"
"\0"
- /* _mesa_function_pool[12014]: Uniform1uiEXT (will be remapped) */
+ /* _mesa_function_pool[12020]: Uniform1uiEXT (will be remapped) */
"ii\0"
"glUniform1uiEXT\0"
"glUniform1ui\0"
"\0"
- /* _mesa_function_pool[12047]: Normal3f (offset 56) */
+ /* _mesa_function_pool[12053]: Normal3f (offset 56) */
"fff\0"
"glNormal3f\0"
"\0"
- /* _mesa_function_pool[12063]: MultiTexCoord1svARB (offset 383) */
+ /* _mesa_function_pool[12069]: MultiTexCoord1svARB (offset 383) */
"ip\0"
"glMultiTexCoord1sv\0"
"glMultiTexCoord1svARB\0"
"\0"
- /* _mesa_function_pool[12108]: Indexi (offset 48) */
+ /* _mesa_function_pool[12114]: Indexi (offset 48) */
"i\0"
"glIndexi\0"
"\0"
- /* _mesa_function_pool[12120]: EGLImageTargetTexture2DOES (will be remapped) */
+ /* _mesa_function_pool[12126]: EGLImageTargetTexture2DOES (will be remapped) */
"ip\0"
"glEGLImageTargetTexture2DOES\0"
"\0"
- /* _mesa_function_pool[12153]: EndQueryARB (will be remapped) */
+ /* _mesa_function_pool[12159]: EndQueryARB (will be remapped) */
"i\0"
"glEndQuery\0"
"glEndQueryARB\0"
"\0"
- /* _mesa_function_pool[12181]: DeleteFencesNV (will be remapped) */
+ /* _mesa_function_pool[12187]: DeleteFencesNV (will be remapped) */
"ip\0"
"glDeleteFencesNV\0"
"\0"
- /* _mesa_function_pool[12202]: BindBufferRangeEXT (will be remapped) */
+ /* _mesa_function_pool[12208]: DeformationMap3dSGIX (dynamic) */
+ "iddiiddiiddiip\0"
+ "glDeformationMap3dSGIX\0"
+ "\0"
+ /* _mesa_function_pool[12247]: BindBufferRangeEXT (will be remapped) */
"iiiii\0"
"glBindBufferRangeEXT\0"
"glBindBufferRange\0"
"\0"
- /* _mesa_function_pool[12248]: DepthMask (offset 211) */
+ /* _mesa_function_pool[12293]: DepthMask (offset 211) */
"i\0"
"glDepthMask\0"
"\0"
- /* _mesa_function_pool[12263]: IsShader (will be remapped) */
+ /* _mesa_function_pool[12308]: IsShader (will be remapped) */
"i\0"
"glIsShader\0"
"\0"
- /* _mesa_function_pool[12277]: Indexf (offset 46) */
+ /* _mesa_function_pool[12322]: Indexf (offset 46) */
"f\0"
"glIndexf\0"
"\0"
- /* _mesa_function_pool[12289]: GetImageTransformParameterivHP (dynamic) */
+ /* _mesa_function_pool[12334]: GetImageTransformParameterivHP (dynamic) */
"iip\0"
"glGetImageTransformParameterivHP\0"
"\0"
- /* _mesa_function_pool[12327]: Indexd (offset 44) */
+ /* _mesa_function_pool[12372]: Indexd (offset 44) */
"d\0"
"glIndexd\0"
"\0"
- /* _mesa_function_pool[12339]: GetMaterialiv (offset 270) */
+ /* _mesa_function_pool[12384]: GetMaterialiv (offset 270) */
"iip\0"
"glGetMaterialiv\0"
"\0"
- /* _mesa_function_pool[12360]: StencilOp (offset 244) */
+ /* _mesa_function_pool[12405]: StencilOp (offset 244) */
"iii\0"
"glStencilOp\0"
"\0"
- /* _mesa_function_pool[12377]: WindowPos4ivMESA (will be remapped) */
+ /* _mesa_function_pool[12422]: WindowPos4ivMESA (will be remapped) */
"p\0"
"glWindowPos4ivMESA\0"
"\0"
- /* _mesa_function_pool[12399]: FramebufferTextureLayer (dynamic) */
+ /* _mesa_function_pool[12444]: FramebufferTextureLayer (dynamic) */
"iiiii\0"
"glFramebufferTextureLayerARB\0"
"\0"
- /* _mesa_function_pool[12435]: MultiTexCoord3svARB (offset 399) */
+ /* _mesa_function_pool[12480]: MultiTexCoord3svARB (offset 399) */
"ip\0"
"glMultiTexCoord3sv\0"
"glMultiTexCoord3svARB\0"
"\0"
- /* _mesa_function_pool[12480]: TexEnvfv (offset 185) */
+ /* _mesa_function_pool[12525]: TexEnvfv (offset 185) */
"iip\0"
"glTexEnvfv\0"
"\0"
- /* _mesa_function_pool[12496]: MultiTexCoord4iARB (offset 404) */
+ /* _mesa_function_pool[12541]: MultiTexCoord4iARB (offset 404) */
"iiiii\0"
"glMultiTexCoord4i\0"
"glMultiTexCoord4iARB\0"
"\0"
- /* _mesa_function_pool[12542]: Indexs (offset 50) */
+ /* _mesa_function_pool[12587]: Indexs (offset 50) */
"i\0"
"glIndexs\0"
"\0"
- /* _mesa_function_pool[12554]: Binormal3ivEXT (dynamic) */
+ /* _mesa_function_pool[12599]: Binormal3ivEXT (dynamic) */
"p\0"
"glBinormal3ivEXT\0"
"\0"
- /* _mesa_function_pool[12574]: ResizeBuffersMESA (will be remapped) */
+ /* _mesa_function_pool[12619]: ResizeBuffersMESA (will be remapped) */
"\0"
"glResizeBuffersMESA\0"
"\0"
- /* _mesa_function_pool[12596]: GetUniformivARB (will be remapped) */
+ /* _mesa_function_pool[12641]: BlendFuncSeparateiARB (will be remapped) */
+ "iiiii\0"
+ "glBlendFuncSeparateiARB\0"
+ "\0"
+ /* _mesa_function_pool[12672]: GetUniformivARB (will be remapped) */
"iip\0"
"glGetUniformiv\0"
"glGetUniformivARB\0"
"\0"
- /* _mesa_function_pool[12634]: PixelTexGenParameteriSGIS (will be remapped) */
+ /* _mesa_function_pool[12710]: PixelTexGenParameteriSGIS (will be remapped) */
"ii\0"
"glPixelTexGenParameteriSGIS\0"
"\0"
- /* _mesa_function_pool[12666]: VertexPointervINTEL (dynamic) */
+ /* _mesa_function_pool[12742]: VertexPointervINTEL (dynamic) */
"iip\0"
"glVertexPointervINTEL\0"
"\0"
- /* _mesa_function_pool[12693]: Vertex2i (offset 130) */
+ /* _mesa_function_pool[12769]: Vertex2i (offset 130) */
"ii\0"
"glVertex2i\0"
"\0"
- /* _mesa_function_pool[12708]: LoadMatrixf (offset 291) */
+ /* _mesa_function_pool[12784]: LoadMatrixf (offset 291) */
"p\0"
"glLoadMatrixf\0"
"\0"
- /* _mesa_function_pool[12725]: VertexAttribI1uivEXT (will be remapped) */
+ /* _mesa_function_pool[12801]: VertexAttribI1uivEXT (will be remapped) */
"ip\0"
"glVertexAttribI1uivEXT\0"
"glVertexAttribI1uiv\0"
"\0"
- /* _mesa_function_pool[12772]: Vertex2f (offset 128) */
+ /* _mesa_function_pool[12848]: Vertex2f (offset 128) */
"ff\0"
"glVertex2f\0"
"\0"
- /* _mesa_function_pool[12787]: ReplacementCodeuiColor4fNormal3fVertex3fvSUN (dynamic) */
+ /* _mesa_function_pool[12863]: ReplacementCodeuiColor4fNormal3fVertex3fvSUN (dynamic) */
"pppp\0"
"glReplacementCodeuiColor4fNormal3fVertex3fvSUN\0"
"\0"
- /* _mesa_function_pool[12840]: Color4bv (offset 26) */
+ /* _mesa_function_pool[12916]: Color4bv (offset 26) */
"p\0"
"glColor4bv\0"
"\0"
- /* _mesa_function_pool[12854]: VertexPointer (offset 321) */
+ /* _mesa_function_pool[12930]: VertexPointer (offset 321) */
"iiip\0"
"glVertexPointer\0"
"\0"
- /* _mesa_function_pool[12876]: SecondaryColor3uiEXT (will be remapped) */
+ /* _mesa_function_pool[12952]: SecondaryColor3uiEXT (will be remapped) */
"iii\0"
"glSecondaryColor3ui\0"
"glSecondaryColor3uiEXT\0"
"\0"
- /* _mesa_function_pool[12924]: StartInstrumentsSGIX (dynamic) */
+ /* _mesa_function_pool[13000]: StartInstrumentsSGIX (dynamic) */
"\0"
"glStartInstrumentsSGIX\0"
"\0"
- /* _mesa_function_pool[12949]: SecondaryColor3usvEXT (will be remapped) */
+ /* _mesa_function_pool[13025]: SecondaryColor3usvEXT (will be remapped) */
"p\0"
"glSecondaryColor3usv\0"
"glSecondaryColor3usvEXT\0"
"\0"
- /* _mesa_function_pool[12997]: VertexAttrib2fvNV (will be remapped) */
+ /* _mesa_function_pool[13073]: VertexAttrib2fvNV (will be remapped) */
"ip\0"
"glVertexAttrib2fvNV\0"
"\0"
- /* _mesa_function_pool[13021]: ProgramLocalParameter4dvARB (will be remapped) */
+ /* _mesa_function_pool[13097]: ProgramLocalParameter4dvARB (will be remapped) */
"iip\0"
"glProgramLocalParameter4dvARB\0"
"\0"
- /* _mesa_function_pool[13056]: DeleteLists (offset 4) */
+ /* _mesa_function_pool[13132]: DeleteLists (offset 4) */
"ii\0"
"glDeleteLists\0"
"\0"
- /* _mesa_function_pool[13074]: LogicOp (offset 242) */
+ /* _mesa_function_pool[13150]: LogicOp (offset 242) */
"i\0"
"glLogicOp\0"
"\0"
- /* _mesa_function_pool[13087]: MatrixIndexuivARB (dynamic) */
+ /* _mesa_function_pool[13163]: MatrixIndexuivARB (dynamic) */
"ip\0"
"glMatrixIndexuivARB\0"
"\0"
- /* _mesa_function_pool[13111]: Vertex2s (offset 132) */
+ /* _mesa_function_pool[13187]: Vertex2s (offset 132) */
"ii\0"
"glVertex2s\0"
"\0"
- /* _mesa_function_pool[13126]: RenderbufferStorageMultisample (will be remapped) */
+ /* _mesa_function_pool[13202]: RenderbufferStorageMultisample (will be remapped) */
"iiiii\0"
"glRenderbufferStorageMultisample\0"
"glRenderbufferStorageMultisampleEXT\0"
"\0"
- /* _mesa_function_pool[13202]: TexCoord4fv (offset 121) */
+ /* _mesa_function_pool[13278]: TexCoord4fv (offset 121) */
"p\0"
"glTexCoord4fv\0"
"\0"
- /* _mesa_function_pool[13219]: Tangent3sEXT (dynamic) */
+ /* _mesa_function_pool[13295]: Tangent3sEXT (dynamic) */
"iii\0"
"glTangent3sEXT\0"
"\0"
- /* _mesa_function_pool[13239]: GlobalAlphaFactorfSUN (dynamic) */
+ /* _mesa_function_pool[13315]: GlobalAlphaFactorfSUN (dynamic) */
"f\0"
"glGlobalAlphaFactorfSUN\0"
"\0"
- /* _mesa_function_pool[13266]: MultiTexCoord3iARB (offset 396) */
+ /* _mesa_function_pool[13342]: MultiTexCoord3iARB (offset 396) */
"iiii\0"
"glMultiTexCoord3i\0"
"glMultiTexCoord3iARB\0"
"\0"
- /* _mesa_function_pool[13311]: IsProgram (will be remapped) */
+ /* _mesa_function_pool[13387]: IsProgram (will be remapped) */
"i\0"
"glIsProgram\0"
"\0"
- /* _mesa_function_pool[13326]: TexCoordPointerListIBM (dynamic) */
+ /* _mesa_function_pool[13402]: TexCoordPointerListIBM (dynamic) */
"iiipi\0"
"glTexCoordPointerListIBM\0"
"\0"
- /* _mesa_function_pool[13358]: VertexAttribI4svEXT (will be remapped) */
+ /* _mesa_function_pool[13434]: VertexAttribI4svEXT (will be remapped) */
"ip\0"
"glVertexAttribI4svEXT\0"
"glVertexAttribI4sv\0"
"\0"
- /* _mesa_function_pool[13403]: GlobalAlphaFactorusSUN (dynamic) */
+ /* _mesa_function_pool[13479]: GlobalAlphaFactorusSUN (dynamic) */
"i\0"
"glGlobalAlphaFactorusSUN\0"
"\0"
- /* _mesa_function_pool[13431]: VertexAttrib2dvNV (will be remapped) */
+ /* _mesa_function_pool[13507]: VertexAttrib2dvNV (will be remapped) */
"ip\0"
"glVertexAttrib2dvNV\0"
"\0"
- /* _mesa_function_pool[13455]: FramebufferRenderbufferEXT (will be remapped) */
+ /* _mesa_function_pool[13531]: FramebufferRenderbufferEXT (will be remapped) */
"iiii\0"
"glFramebufferRenderbuffer\0"
"glFramebufferRenderbufferEXT\0"
"\0"
- /* _mesa_function_pool[13516]: ClearBufferuiv (will be remapped) */
+ /* _mesa_function_pool[13592]: ClearBufferuiv (will be remapped) */
"iip\0"
"glClearBufferuiv\0"
"\0"
- /* _mesa_function_pool[13538]: VertexAttrib1dvNV (will be remapped) */
+ /* _mesa_function_pool[13614]: VertexAttrib1dvNV (will be remapped) */
"ip\0"
"glVertexAttrib1dvNV\0"
"\0"
- /* _mesa_function_pool[13562]: GenTextures (offset 328) */
+ /* _mesa_function_pool[13638]: GenTextures (offset 328) */
"ip\0"
"glGenTextures\0"
"glGenTexturesEXT\0"
"\0"
- /* _mesa_function_pool[13597]: FramebufferTextureARB (will be remapped) */
+ /* _mesa_function_pool[13673]: FramebufferTextureARB (will be remapped) */
"iiii\0"
"glFramebufferTextureARB\0"
"\0"
- /* _mesa_function_pool[13627]: SetFenceNV (will be remapped) */
+ /* _mesa_function_pool[13703]: SetFenceNV (will be remapped) */
"ii\0"
"glSetFenceNV\0"
"\0"
- /* _mesa_function_pool[13644]: FramebufferTexture1DEXT (will be remapped) */
+ /* _mesa_function_pool[13720]: FramebufferTexture1DEXT (will be remapped) */
"iiiii\0"
"glFramebufferTexture1D\0"
"glFramebufferTexture1DEXT\0"
"\0"
- /* _mesa_function_pool[13700]: GetCombinerOutputParameterivNV (will be remapped) */
+ /* _mesa_function_pool[13776]: GetCombinerOutputParameterivNV (will be remapped) */
"iiip\0"
"glGetCombinerOutputParameterivNV\0"
"\0"
- /* _mesa_function_pool[13739]: MultiModeDrawArraysIBM (will be remapped) */
- "pppii\0"
- "glMultiModeDrawArraysIBM\0"
- "\0"
- /* _mesa_function_pool[13771]: PixelTexGenParameterivSGIS (will be remapped) */
+ /* _mesa_function_pool[13815]: PixelTexGenParameterivSGIS (will be remapped) */
"ip\0"
"glPixelTexGenParameterivSGIS\0"
"\0"
- /* _mesa_function_pool[13804]: TextureNormalEXT (dynamic) */
+ /* _mesa_function_pool[13848]: TextureNormalEXT (dynamic) */
"i\0"
"glTextureNormalEXT\0"
"\0"
- /* _mesa_function_pool[13826]: IndexPointerListIBM (dynamic) */
+ /* _mesa_function_pool[13870]: IndexPointerListIBM (dynamic) */
"iipi\0"
"glIndexPointerListIBM\0"
"\0"
- /* _mesa_function_pool[13854]: WeightfvARB (dynamic) */
+ /* _mesa_function_pool[13898]: WeightfvARB (dynamic) */
"ip\0"
"glWeightfvARB\0"
"\0"
- /* _mesa_function_pool[13872]: GetCombinerOutputParameterfvNV (will be remapped) */
- "iiip\0"
- "glGetCombinerOutputParameterfvNV\0"
- "\0"
- /* _mesa_function_pool[13911]: RasterPos2sv (offset 69) */
+ /* _mesa_function_pool[13916]: RasterPos2sv (offset 69) */
"p\0"
"glRasterPos2sv\0"
"\0"
- /* _mesa_function_pool[13929]: Color4ubv (offset 36) */
+ /* _mesa_function_pool[13934]: Color4ubv (offset 36) */
"p\0"
"glColor4ubv\0"
"\0"
- /* _mesa_function_pool[13944]: DrawBuffer (offset 202) */
+ /* _mesa_function_pool[13949]: DrawBuffer (offset 202) */
"i\0"
"glDrawBuffer\0"
"\0"
- /* _mesa_function_pool[13960]: TexCoord2fv (offset 105) */
+ /* _mesa_function_pool[13965]: TexCoord2fv (offset 105) */
"p\0"
"glTexCoord2fv\0"
"\0"
- /* _mesa_function_pool[13977]: WindowPos4fMESA (will be remapped) */
+ /* _mesa_function_pool[13982]: WindowPos4fMESA (will be remapped) */
"ffff\0"
"glWindowPos4fMESA\0"
"\0"
- /* _mesa_function_pool[14001]: TexCoord1sv (offset 101) */
+ /* _mesa_function_pool[14006]: TexCoord1sv (offset 101) */
"p\0"
"glTexCoord1sv\0"
"\0"
- /* _mesa_function_pool[14018]: WindowPos3dvMESA (will be remapped) */
+ /* _mesa_function_pool[14023]: WindowPos3dvMESA (will be remapped) */
"p\0"
"glWindowPos3dv\0"
"glWindowPos3dvARB\0"
"glWindowPos3dvMESA\0"
"\0"
- /* _mesa_function_pool[14073]: DepthFunc (offset 245) */
+ /* _mesa_function_pool[14078]: DepthFunc (offset 245) */
"i\0"
"glDepthFunc\0"
"\0"
- /* _mesa_function_pool[14088]: PixelMapusv (offset 253) */
+ /* _mesa_function_pool[14093]: PixelMapusv (offset 253) */
"iip\0"
"glPixelMapusv\0"
"\0"
- /* _mesa_function_pool[14107]: GetQueryObjecti64vEXT (will be remapped) */
+ /* _mesa_function_pool[14112]: GetQueryObjecti64vEXT (will be remapped) */
"iip\0"
"glGetQueryObjecti64vEXT\0"
"\0"
- /* _mesa_function_pool[14136]: MultiTexCoord1dARB (offset 376) */
+ /* _mesa_function_pool[14141]: MultiTexCoord1dARB (offset 376) */
"id\0"
"glMultiTexCoord1d\0"
"glMultiTexCoord1dARB\0"
"\0"
- /* _mesa_function_pool[14179]: PointParameterivNV (will be remapped) */
+ /* _mesa_function_pool[14184]: PointParameterivNV (will be remapped) */
"ip\0"
"glPointParameteriv\0"
"glPointParameterivNV\0"
"\0"
- /* _mesa_function_pool[14223]: BlendFunc (offset 241) */
+ /* _mesa_function_pool[14228]: BlendFunc (offset 241) */
"ii\0"
"glBlendFunc\0"
"\0"
- /* _mesa_function_pool[14239]: EndTransformFeedbackEXT (will be remapped) */
+ /* _mesa_function_pool[14244]: EndTransformFeedbackEXT (will be remapped) */
"\0"
"glEndTransformFeedbackEXT\0"
"glEndTransformFeedback\0"
"\0"
- /* _mesa_function_pool[14290]: Uniform2fvARB (will be remapped) */
+ /* _mesa_function_pool[14295]: Uniform2fvARB (will be remapped) */
"iip\0"
"glUniform2fv\0"
"glUniform2fvARB\0"
"\0"
- /* _mesa_function_pool[14324]: BufferParameteriAPPLE (will be remapped) */
+ /* _mesa_function_pool[14329]: BufferParameteriAPPLE (will be remapped) */
"iii\0"
"glBufferParameteriAPPLE\0"
"\0"
- /* _mesa_function_pool[14353]: MultiTexCoord3dvARB (offset 393) */
+ /* _mesa_function_pool[14358]: MultiTexCoord3dvARB (offset 393) */
"ip\0"
"glMultiTexCoord3dv\0"
"glMultiTexCoord3dvARB\0"
"\0"
- /* _mesa_function_pool[14398]: ReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN (dynamic) */
+ /* _mesa_function_pool[14403]: ReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN (dynamic) */
"pppp\0"
"glReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN\0"
"\0"
- /* _mesa_function_pool[14454]: DeleteObjectARB (will be remapped) */
+ /* _mesa_function_pool[14459]: DeleteObjectARB (will be remapped) */
"i\0"
"glDeleteObjectARB\0"
"\0"
- /* _mesa_function_pool[14475]: MatrixIndexPointerARB (dynamic) */
+ /* _mesa_function_pool[14480]: GetShaderPrecisionFormat (will be remapped) */
+ "iipp\0"
+ "glGetShaderPrecisionFormat\0"
+ "\0"
+ /* _mesa_function_pool[14513]: MatrixIndexPointerARB (dynamic) */
"iiip\0"
"glMatrixIndexPointerARB\0"
"\0"
- /* _mesa_function_pool[14505]: ProgramNamedParameter4dvNV (will be remapped) */
+ /* _mesa_function_pool[14543]: ProgramNamedParameter4dvNV (will be remapped) */
"iipp\0"
"glProgramNamedParameter4dvNV\0"
"\0"
- /* _mesa_function_pool[14540]: Tangent3fvEXT (dynamic) */
+ /* _mesa_function_pool[14578]: Tangent3fvEXT (dynamic) */
"p\0"
"glTangent3fvEXT\0"
"\0"
- /* _mesa_function_pool[14559]: Flush (offset 217) */
+ /* _mesa_function_pool[14597]: Flush (offset 217) */
"\0"
"glFlush\0"
"\0"
- /* _mesa_function_pool[14569]: Color4uiv (offset 38) */
+ /* _mesa_function_pool[14607]: Color4uiv (offset 38) */
"p\0"
"glColor4uiv\0"
"\0"
- /* _mesa_function_pool[14584]: VertexAttribI4iEXT (will be remapped) */
+ /* _mesa_function_pool[14622]: VertexAttribI4iEXT (will be remapped) */
"iiiii\0"
"glVertexAttribI4iEXT\0"
"glVertexAttribI4i\0"
"\0"
- /* _mesa_function_pool[14630]: GenVertexArrays (will be remapped) */
+ /* _mesa_function_pool[14668]: GenVertexArrays (will be remapped) */
"ip\0"
"glGenVertexArrays\0"
"\0"
- /* _mesa_function_pool[14652]: Uniform3uivEXT (will be remapped) */
+ /* _mesa_function_pool[14690]: Uniform3uivEXT (will be remapped) */
"iip\0"
"glUniform3uivEXT\0"
"glUniform3uiv\0"
"\0"
- /* _mesa_function_pool[14688]: RasterPos3sv (offset 77) */
+ /* _mesa_function_pool[14726]: RasterPos3sv (offset 77) */
"p\0"
"glRasterPos3sv\0"
"\0"
- /* _mesa_function_pool[14706]: BindFramebufferEXT (will be remapped) */
+ /* _mesa_function_pool[14744]: BindFramebufferEXT (will be remapped) */
"ii\0"
"glBindFramebuffer\0"
"glBindFramebufferEXT\0"
"\0"
- /* _mesa_function_pool[14749]: ReferencePlaneSGIX (dynamic) */
+ /* _mesa_function_pool[14787]: ReferencePlaneSGIX (dynamic) */
"p\0"
"glReferencePlaneSGIX\0"
"\0"
- /* _mesa_function_pool[14773]: PushAttrib (offset 219) */
+ /* _mesa_function_pool[14811]: PushAttrib (offset 219) */
"i\0"
"glPushAttrib\0"
"\0"
- /* _mesa_function_pool[14789]: RasterPos2i (offset 66) */
+ /* _mesa_function_pool[14827]: RasterPos2i (offset 66) */
"ii\0"
"glRasterPos2i\0"
"\0"
- /* _mesa_function_pool[14807]: ValidateProgramARB (will be remapped) */
+ /* _mesa_function_pool[14845]: ValidateProgramARB (will be remapped) */
"i\0"
"glValidateProgram\0"
"glValidateProgramARB\0"
"\0"
- /* _mesa_function_pool[14849]: TexParameteriv (offset 181) */
+ /* _mesa_function_pool[14887]: TexParameteriv (offset 181) */
"iip\0"
"glTexParameteriv\0"
"\0"
- /* _mesa_function_pool[14871]: UnlockArraysEXT (will be remapped) */
+ /* _mesa_function_pool[14909]: UnlockArraysEXT (will be remapped) */
"\0"
"glUnlockArraysEXT\0"
"\0"
- /* _mesa_function_pool[14891]: TexCoord2fColor3fVertex3fSUN (dynamic) */
+ /* _mesa_function_pool[14929]: TexCoord2fColor3fVertex3fSUN (dynamic) */
"ffffffff\0"
"glTexCoord2fColor3fVertex3fSUN\0"
"\0"
- /* _mesa_function_pool[14932]: WindowPos3fvMESA (will be remapped) */
+ /* _mesa_function_pool[14970]: WindowPos3fvMESA (will be remapped) */
"p\0"
"glWindowPos3fv\0"
"glWindowPos3fvARB\0"
"glWindowPos3fvMESA\0"
"\0"
- /* _mesa_function_pool[14987]: RasterPos2f (offset 64) */
+ /* _mesa_function_pool[15025]: RasterPos2f (offset 64) */
"ff\0"
"glRasterPos2f\0"
"\0"
- /* _mesa_function_pool[15005]: VertexAttrib1svNV (will be remapped) */
+ /* _mesa_function_pool[15043]: VertexAttrib1svNV (will be remapped) */
"ip\0"
"glVertexAttrib1svNV\0"
"\0"
- /* _mesa_function_pool[15029]: RasterPos2d (offset 62) */
+ /* _mesa_function_pool[15067]: RasterPos2d (offset 62) */
"dd\0"
"glRasterPos2d\0"
"\0"
- /* _mesa_function_pool[15047]: RasterPos3fv (offset 73) */
+ /* _mesa_function_pool[15085]: RasterPos3fv (offset 73) */
"p\0"
"glRasterPos3fv\0"
"\0"
- /* _mesa_function_pool[15065]: CopyTexSubImage3D (offset 373) */
+ /* _mesa_function_pool[15103]: CopyTexSubImage3D (offset 373) */
"iiiiiiiii\0"
"glCopyTexSubImage3D\0"
"glCopyTexSubImage3DEXT\0"
"\0"
- /* _mesa_function_pool[15119]: VertexAttrib2dARB (will be remapped) */
+ /* _mesa_function_pool[15157]: VertexAttrib2dARB (will be remapped) */
"idd\0"
"glVertexAttrib2d\0"
"glVertexAttrib2dARB\0"
"\0"
- /* _mesa_function_pool[15161]: Color4ub (offset 35) */
+ /* _mesa_function_pool[15199]: Color4ub (offset 35) */
"iiii\0"
"glColor4ub\0"
"\0"
- /* _mesa_function_pool[15178]: GetInteger64v (will be remapped) */
+ /* _mesa_function_pool[15216]: GetInteger64v (will be remapped) */
"ip\0"
"glGetInteger64v\0"
"\0"
- /* _mesa_function_pool[15198]: TextureColorMaskSGIS (dynamic) */
+ /* _mesa_function_pool[15236]: TextureColorMaskSGIS (dynamic) */
"iiii\0"
"glTextureColorMaskSGIS\0"
"\0"
- /* _mesa_function_pool[15227]: RasterPos2s (offset 68) */
+ /* _mesa_function_pool[15265]: RasterPos2s (offset 68) */
"ii\0"
"glRasterPos2s\0"
"\0"
- /* _mesa_function_pool[15245]: GetColorTable (offset 343) */
+ /* _mesa_function_pool[15283]: GetColorTable (offset 343) */
"iiip\0"
"glGetColorTable\0"
"glGetColorTableSGI\0"
"glGetColorTableEXT\0"
"\0"
- /* _mesa_function_pool[15305]: SelectBuffer (offset 195) */
+ /* _mesa_function_pool[15343]: SelectBuffer (offset 195) */
"ip\0"
"glSelectBuffer\0"
"\0"
- /* _mesa_function_pool[15324]: Indexiv (offset 49) */
+ /* _mesa_function_pool[15362]: Indexiv (offset 49) */
"p\0"
"glIndexiv\0"
"\0"
- /* _mesa_function_pool[15337]: TexCoord3i (offset 114) */
+ /* _mesa_function_pool[15375]: TexCoord3i (offset 114) */
"iii\0"
"glTexCoord3i\0"
"\0"
- /* _mesa_function_pool[15355]: CopyColorTable (offset 342) */
+ /* _mesa_function_pool[15393]: CopyColorTable (offset 342) */
"iiiii\0"
"glCopyColorTable\0"
"glCopyColorTableSGI\0"
"\0"
- /* _mesa_function_pool[15399]: GetHistogramParameterfv (offset 362) */
+ /* _mesa_function_pool[15437]: GetHistogramParameterfv (offset 362) */
"iip\0"
"glGetHistogramParameterfv\0"
"glGetHistogramParameterfvEXT\0"
"\0"
- /* _mesa_function_pool[15459]: Frustum (offset 289) */
+ /* _mesa_function_pool[15497]: Frustum (offset 289) */
"dddddd\0"
"glFrustum\0"
"\0"
- /* _mesa_function_pool[15477]: GetString (offset 275) */
+ /* _mesa_function_pool[15515]: GetString (offset 275) */
"i\0"
"glGetString\0"
"\0"
- /* _mesa_function_pool[15492]: ColorPointervINTEL (dynamic) */
+ /* _mesa_function_pool[15530]: ColorPointervINTEL (dynamic) */
"iip\0"
"glColorPointervINTEL\0"
"\0"
- /* _mesa_function_pool[15518]: TexEnvf (offset 184) */
+ /* _mesa_function_pool[15556]: TexEnvf (offset 184) */
"iif\0"
"glTexEnvf\0"
"\0"
- /* _mesa_function_pool[15533]: TexCoord3d (offset 110) */
+ /* _mesa_function_pool[15571]: TexCoord3d (offset 110) */
"ddd\0"
"glTexCoord3d\0"
"\0"
- /* _mesa_function_pool[15551]: AlphaFragmentOp1ATI (will be remapped) */
+ /* _mesa_function_pool[15589]: AlphaFragmentOp1ATI (will be remapped) */
"iiiiii\0"
"glAlphaFragmentOp1ATI\0"
"\0"
- /* _mesa_function_pool[15581]: TexCoord3f (offset 112) */
+ /* _mesa_function_pool[15619]: TexCoord3f (offset 112) */
"fff\0"
"glTexCoord3f\0"
"\0"
- /* _mesa_function_pool[15599]: MultiTexCoord3ivARB (offset 397) */
+ /* _mesa_function_pool[15637]: MultiTexCoord3ivARB (offset 397) */
"ip\0"
"glMultiTexCoord3iv\0"
"glMultiTexCoord3ivARB\0"
"\0"
- /* _mesa_function_pool[15644]: MultiTexCoord2sARB (offset 390) */
+ /* _mesa_function_pool[15682]: MultiTexCoord2sARB (offset 390) */
"iii\0"
"glMultiTexCoord2s\0"
"glMultiTexCoord2sARB\0"
"\0"
- /* _mesa_function_pool[15688]: VertexAttrib1dvARB (will be remapped) */
+ /* _mesa_function_pool[15726]: VertexAttrib1dvARB (will be remapped) */
"ip\0"
"glVertexAttrib1dv\0"
"glVertexAttrib1dvARB\0"
"\0"
- /* _mesa_function_pool[15731]: DeleteTextures (offset 327) */
+ /* _mesa_function_pool[15769]: DeleteTextures (offset 327) */
"ip\0"
"glDeleteTextures\0"
"glDeleteTexturesEXT\0"
"\0"
- /* _mesa_function_pool[15772]: TexCoordPointerEXT (will be remapped) */
+ /* _mesa_function_pool[15810]: TexCoordPointerEXT (will be remapped) */
"iiiip\0"
"glTexCoordPointerEXT\0"
"\0"
- /* _mesa_function_pool[15800]: TexSubImage4DSGIS (dynamic) */
+ /* _mesa_function_pool[15838]: TexSubImage4DSGIS (dynamic) */
"iiiiiiiiiiiip\0"
"glTexSubImage4DSGIS\0"
"\0"
- /* _mesa_function_pool[15835]: TexCoord3s (offset 116) */
+ /* _mesa_function_pool[15873]: TexCoord3s (offset 116) */
"iii\0"
"glTexCoord3s\0"
"\0"
- /* _mesa_function_pool[15853]: GetTexLevelParameteriv (offset 285) */
+ /* _mesa_function_pool[15891]: GetTexLevelParameteriv (offset 285) */
"iiip\0"
"glGetTexLevelParameteriv\0"
"\0"
- /* _mesa_function_pool[15884]: CombinerStageParameterfvNV (dynamic) */
+ /* _mesa_function_pool[15922]: CombinerStageParameterfvNV (dynamic) */
"iip\0"
"glCombinerStageParameterfvNV\0"
"\0"
- /* _mesa_function_pool[15918]: StopInstrumentsSGIX (dynamic) */
+ /* _mesa_function_pool[15956]: StopInstrumentsSGIX (dynamic) */
"i\0"
"glStopInstrumentsSGIX\0"
"\0"
- /* _mesa_function_pool[15943]: TexCoord4fColor4fNormal3fVertex4fSUN (dynamic) */
+ /* _mesa_function_pool[15981]: TexCoord4fColor4fNormal3fVertex4fSUN (dynamic) */
"fffffffffffffff\0"
"glTexCoord4fColor4fNormal3fVertex4fSUN\0"
"\0"
- /* _mesa_function_pool[15999]: ClearAccum (offset 204) */
+ /* _mesa_function_pool[16037]: ClearAccum (offset 204) */
"ffff\0"
"glClearAccum\0"
"\0"
- /* _mesa_function_pool[16018]: DeformSGIX (dynamic) */
+ /* _mesa_function_pool[16056]: DeformSGIX (dynamic) */
"i\0"
"glDeformSGIX\0"
"\0"
- /* _mesa_function_pool[16034]: GetVertexAttribfvARB (will be remapped) */
+ /* _mesa_function_pool[16072]: GetVertexAttribfvARB (will be remapped) */
"iip\0"
"glGetVertexAttribfv\0"
"glGetVertexAttribfvARB\0"
"\0"
- /* _mesa_function_pool[16082]: SecondaryColor3ivEXT (will be remapped) */
+ /* _mesa_function_pool[16120]: SecondaryColor3ivEXT (will be remapped) */
"p\0"
"glSecondaryColor3iv\0"
"glSecondaryColor3ivEXT\0"
"\0"
- /* _mesa_function_pool[16128]: TexCoord4iv (offset 123) */
+ /* _mesa_function_pool[16166]: TexCoord4iv (offset 123) */
"p\0"
"glTexCoord4iv\0"
"\0"
- /* _mesa_function_pool[16145]: VertexAttribI4uiEXT (will be remapped) */
+ /* _mesa_function_pool[16183]: VertexAttribI4uiEXT (will be remapped) */
"iiiii\0"
"glVertexAttribI4uiEXT\0"
"glVertexAttribI4ui\0"
"\0"
- /* _mesa_function_pool[16193]: GetFragmentMaterialfvSGIX (dynamic) */
+ /* _mesa_function_pool[16231]: GetFragmentMaterialfvSGIX (dynamic) */
"iip\0"
"glGetFragmentMaterialfvSGIX\0"
"\0"
- /* _mesa_function_pool[16226]: UniformMatrix4x2fv (will be remapped) */
+ /* _mesa_function_pool[16264]: UniformMatrix4x2fv (will be remapped) */
"iiip\0"
"glUniformMatrix4x2fv\0"
"\0"
- /* _mesa_function_pool[16253]: GetDetailTexFuncSGIS (dynamic) */
+ /* _mesa_function_pool[16291]: GetDetailTexFuncSGIS (dynamic) */
"ip\0"
"glGetDetailTexFuncSGIS\0"
"\0"
- /* _mesa_function_pool[16280]: GetCombinerStageParameterfvNV (dynamic) */
+ /* _mesa_function_pool[16318]: GetCombinerStageParameterfvNV (dynamic) */
"iip\0"
"glGetCombinerStageParameterfvNV\0"
"\0"
- /* _mesa_function_pool[16317]: PolygonOffset (offset 319) */
+ /* _mesa_function_pool[16355]: PolygonOffset (offset 319) */
"ff\0"
"glPolygonOffset\0"
"\0"
- /* _mesa_function_pool[16337]: BindVertexArray (will be remapped) */
+ /* _mesa_function_pool[16375]: BindVertexArray (will be remapped) */
"i\0"
"glBindVertexArray\0"
"\0"
- /* _mesa_function_pool[16358]: Color4ubVertex2fvSUN (dynamic) */
+ /* _mesa_function_pool[16396]: Color4ubVertex2fvSUN (dynamic) */
"pp\0"
"glColor4ubVertex2fvSUN\0"
"\0"
- /* _mesa_function_pool[16385]: Rectd (offset 86) */
+ /* _mesa_function_pool[16423]: Rectd (offset 86) */
"dddd\0"
"glRectd\0"
"\0"
- /* _mesa_function_pool[16399]: TexFilterFuncSGIS (dynamic) */
+ /* _mesa_function_pool[16437]: TexFilterFuncSGIS (dynamic) */
"iiip\0"
"glTexFilterFuncSGIS\0"
"\0"
- /* _mesa_function_pool[16425]: SampleMaskSGIS (will be remapped) */
- "fi\0"
- "glSampleMaskSGIS\0"
- "glSampleMaskEXT\0"
+ /* _mesa_function_pool[16463]: TextureBarrierNV (will be remapped) */
+ "\0"
+ "glTextureBarrierNV\0"
"\0"
- /* _mesa_function_pool[16462]: VertexAttribI4ubvEXT (will be remapped) */
+ /* _mesa_function_pool[16484]: VertexAttribI4ubvEXT (will be remapped) */
"ip\0"
"glVertexAttribI4ubvEXT\0"
"glVertexAttribI4ubv\0"
"\0"
- /* _mesa_function_pool[16509]: GetAttribLocationARB (will be remapped) */
+ /* _mesa_function_pool[16531]: GetAttribLocationARB (will be remapped) */
"ip\0"
"glGetAttribLocation\0"
"glGetAttribLocationARB\0"
"\0"
- /* _mesa_function_pool[16556]: RasterPos3i (offset 74) */
+ /* _mesa_function_pool[16578]: RasterPos3i (offset 74) */
"iii\0"
"glRasterPos3i\0"
"\0"
- /* _mesa_function_pool[16575]: VertexAttrib4ubvARB (will be remapped) */
+ /* _mesa_function_pool[16597]: VertexAttrib4ubvARB (will be remapped) */
"ip\0"
"glVertexAttrib4ubv\0"
"glVertexAttrib4ubvARB\0"
"\0"
- /* _mesa_function_pool[16620]: DetailTexFuncSGIS (dynamic) */
+ /* _mesa_function_pool[16642]: DetailTexFuncSGIS (dynamic) */
"iip\0"
"glDetailTexFuncSGIS\0"
"\0"
- /* _mesa_function_pool[16645]: Normal3fVertex3fSUN (dynamic) */
+ /* _mesa_function_pool[16667]: Normal3fVertex3fSUN (dynamic) */
"ffffff\0"
"glNormal3fVertex3fSUN\0"
"\0"
- /* _mesa_function_pool[16675]: CopyTexImage2D (offset 324) */
+ /* _mesa_function_pool[16697]: CopyTexImage2D (offset 324) */
"iiiiiiii\0"
"glCopyTexImage2D\0"
"glCopyTexImage2DEXT\0"
"\0"
- /* _mesa_function_pool[16722]: GetBufferPointervARB (will be remapped) */
+ /* _mesa_function_pool[16744]: GetBufferPointervARB (will be remapped) */
"iip\0"
"glGetBufferPointerv\0"
"glGetBufferPointervARB\0"
"\0"
- /* _mesa_function_pool[16770]: ProgramEnvParameter4fARB (will be remapped) */
+ /* _mesa_function_pool[16792]: ProgramEnvParameter4fARB (will be remapped) */
"iiffff\0"
"glProgramEnvParameter4fARB\0"
"glProgramParameter4fNV\0"
"\0"
- /* _mesa_function_pool[16828]: Uniform3ivARB (will be remapped) */
+ /* _mesa_function_pool[16850]: Uniform3ivARB (will be remapped) */
"iip\0"
"glUniform3iv\0"
"glUniform3ivARB\0"
"\0"
- /* _mesa_function_pool[16862]: Lightfv (offset 160) */
+ /* _mesa_function_pool[16884]: Lightfv (offset 160) */
"iip\0"
"glLightfv\0"
"\0"
- /* _mesa_function_pool[16877]: PrimitiveRestartIndexNV (will be remapped) */
+ /* _mesa_function_pool[16899]: PrimitiveRestartIndexNV (will be remapped) */
"i\0"
"glPrimitiveRestartIndexNV\0"
"glPrimitiveRestartIndex\0"
"\0"
- /* _mesa_function_pool[16930]: ClearDepth (offset 208) */
+ /* _mesa_function_pool[16952]: ClearDepth (offset 208) */
"d\0"
"glClearDepth\0"
"\0"
- /* _mesa_function_pool[16946]: GetFenceivNV (will be remapped) */
+ /* _mesa_function_pool[16968]: GetFenceivNV (will be remapped) */
"iip\0"
"glGetFenceivNV\0"
"\0"
- /* _mesa_function_pool[16966]: WindowPos4dvMESA (will be remapped) */
+ /* _mesa_function_pool[16988]: WindowPos4dvMESA (will be remapped) */
"p\0"
"glWindowPos4dvMESA\0"
"\0"
- /* _mesa_function_pool[16988]: ColorSubTable (offset 346) */
+ /* _mesa_function_pool[17010]: ColorSubTable (offset 346) */
"iiiiip\0"
"glColorSubTable\0"
"glColorSubTableEXT\0"
"\0"
- /* _mesa_function_pool[17031]: Color4fv (offset 30) */
+ /* _mesa_function_pool[17053]: Color4fv (offset 30) */
"p\0"
"glColor4fv\0"
"\0"
- /* _mesa_function_pool[17045]: MultiTexCoord4ivARB (offset 405) */
+ /* _mesa_function_pool[17067]: MultiTexCoord4ivARB (offset 405) */
"ip\0"
"glMultiTexCoord4iv\0"
"glMultiTexCoord4ivARB\0"
"\0"
- /* _mesa_function_pool[17090]: ProgramLocalParameters4fvEXT (will be remapped) */
+ /* _mesa_function_pool[17112]: ProgramLocalParameters4fvEXT (will be remapped) */
"iiip\0"
"glProgramLocalParameters4fvEXT\0"
"\0"
- /* _mesa_function_pool[17127]: ColorPointer (offset 308) */
+ /* _mesa_function_pool[17149]: ColorPointer (offset 308) */
"iiip\0"
"glColorPointer\0"
"\0"
- /* _mesa_function_pool[17148]: Rects (offset 92) */
+ /* _mesa_function_pool[17170]: Rects (offset 92) */
"iiii\0"
"glRects\0"
"\0"
- /* _mesa_function_pool[17162]: GetMapAttribParameterfvNV (dynamic) */
+ /* _mesa_function_pool[17184]: GetMapAttribParameterfvNV (dynamic) */
"iiip\0"
"glGetMapAttribParameterfvNV\0"
"\0"
- /* _mesa_function_pool[17196]: CreateShaderProgramEXT (will be remapped) */
+ /* _mesa_function_pool[17218]: CreateShaderProgramEXT (will be remapped) */
"ip\0"
"glCreateShaderProgramEXT\0"
"\0"
- /* _mesa_function_pool[17225]: ActiveProgramEXT (will be remapped) */
+ /* _mesa_function_pool[17247]: ActiveProgramEXT (will be remapped) */
"i\0"
"glActiveProgramEXT\0"
"\0"
- /* _mesa_function_pool[17247]: Lightiv (offset 162) */
+ /* _mesa_function_pool[17269]: Lightiv (offset 162) */
"iip\0"
"glLightiv\0"
"\0"
- /* _mesa_function_pool[17262]: VertexAttrib4sARB (will be remapped) */
+ /* _mesa_function_pool[17284]: VertexAttrib4sARB (will be remapped) */
"iiiii\0"
"glVertexAttrib4s\0"
"glVertexAttrib4sARB\0"
"\0"
- /* _mesa_function_pool[17306]: GetQueryObjectuivARB (will be remapped) */
+ /* _mesa_function_pool[17328]: GetQueryObjectuivARB (will be remapped) */
"iip\0"
"glGetQueryObjectuiv\0"
"glGetQueryObjectuivARB\0"
"\0"
- /* _mesa_function_pool[17354]: GetTexParameteriv (offset 283) */
+ /* _mesa_function_pool[17376]: GetTexParameteriv (offset 283) */
"iip\0"
"glGetTexParameteriv\0"
"\0"
- /* _mesa_function_pool[17379]: MapParameterivNV (dynamic) */
+ /* _mesa_function_pool[17401]: MapParameterivNV (dynamic) */
"iip\0"
"glMapParameterivNV\0"
"\0"
- /* _mesa_function_pool[17403]: GenRenderbuffersEXT (will be remapped) */
+ /* _mesa_function_pool[17425]: GenRenderbuffersEXT (will be remapped) */
"ip\0"
"glGenRenderbuffers\0"
"glGenRenderbuffersEXT\0"
"\0"
- /* _mesa_function_pool[17448]: ClearBufferfv (will be remapped) */
+ /* _mesa_function_pool[17470]: ClearBufferfv (will be remapped) */
"iip\0"
"glClearBufferfv\0"
"\0"
- /* _mesa_function_pool[17469]: VertexAttrib2dvARB (will be remapped) */
+ /* _mesa_function_pool[17491]: VertexAttrib2dvARB (will be remapped) */
"ip\0"
"glVertexAttrib2dv\0"
"glVertexAttrib2dvARB\0"
"\0"
- /* _mesa_function_pool[17512]: EdgeFlagPointerEXT (will be remapped) */
+ /* _mesa_function_pool[17534]: EdgeFlagPointerEXT (will be remapped) */
"iip\0"
"glEdgeFlagPointerEXT\0"
"\0"
- /* _mesa_function_pool[17538]: VertexAttribs2svNV (will be remapped) */
+ /* _mesa_function_pool[17560]: VertexAttribs2svNV (will be remapped) */
"iip\0"
"glVertexAttribs2svNV\0"
"\0"
- /* _mesa_function_pool[17564]: WeightbvARB (dynamic) */
+ /* _mesa_function_pool[17586]: WeightbvARB (dynamic) */
"ip\0"
"glWeightbvARB\0"
"\0"
- /* _mesa_function_pool[17582]: VertexAttrib2fvARB (will be remapped) */
+ /* _mesa_function_pool[17604]: VertexAttrib2fvARB (will be remapped) */
"ip\0"
"glVertexAttrib2fv\0"
"glVertexAttrib2fvARB\0"
"\0"
- /* _mesa_function_pool[17625]: GetBufferParameterivARB (will be remapped) */
+ /* _mesa_function_pool[17647]: GetBufferParameterivARB (will be remapped) */
"iip\0"
"glGetBufferParameteriv\0"
"glGetBufferParameterivARB\0"
"\0"
- /* _mesa_function_pool[17679]: Rectdv (offset 87) */
+ /* _mesa_function_pool[17701]: Rectdv (offset 87) */
"pp\0"
"glRectdv\0"
"\0"
- /* _mesa_function_pool[17692]: ListParameteriSGIX (dynamic) */
+ /* _mesa_function_pool[17714]: ListParameteriSGIX (dynamic) */
"iii\0"
"glListParameteriSGIX\0"
"\0"
- /* _mesa_function_pool[17718]: ReplacementCodeuiColor4fNormal3fVertex3fSUN (dynamic) */
+ /* _mesa_function_pool[17740]: BlendEquationiARB (will be remapped) */
+ "ii\0"
+ "glBlendEquationiARB\0"
+ "\0"
+ /* _mesa_function_pool[17764]: ReplacementCodeuiColor4fNormal3fVertex3fSUN (dynamic) */
"iffffffffff\0"
"glReplacementCodeuiColor4fNormal3fVertex3fSUN\0"
"\0"
- /* _mesa_function_pool[17777]: InstrumentsBufferSGIX (dynamic) */
+ /* _mesa_function_pool[17823]: InstrumentsBufferSGIX (dynamic) */
"ip\0"
"glInstrumentsBufferSGIX\0"
"\0"
- /* _mesa_function_pool[17805]: VertexAttrib4NivARB (will be remapped) */
+ /* _mesa_function_pool[17851]: VertexAttrib4NivARB (will be remapped) */
"ip\0"
"glVertexAttrib4Niv\0"
"glVertexAttrib4NivARB\0"
"\0"
- /* _mesa_function_pool[17850]: DrawArraysInstancedARB (will be remapped) */
+ /* _mesa_function_pool[17896]: DrawArraysInstancedARB (will be remapped) */
"iiii\0"
"glDrawArraysInstancedARB\0"
"glDrawArraysInstancedEXT\0"
"glDrawArraysInstanced\0"
"\0"
- /* _mesa_function_pool[17928]: GetAttachedShaders (will be remapped) */
+ /* _mesa_function_pool[17974]: GetAttachedShaders (will be remapped) */
"iipp\0"
"glGetAttachedShaders\0"
"\0"
- /* _mesa_function_pool[17955]: GenVertexArraysAPPLE (will be remapped) */
+ /* _mesa_function_pool[18001]: GenVertexArraysAPPLE (will be remapped) */
"ip\0"
"glGenVertexArraysAPPLE\0"
"\0"
- /* _mesa_function_pool[17982]: ClearBufferfi (will be remapped) */
+ /* _mesa_function_pool[18028]: ClearBufferfi (will be remapped) */
"iifi\0"
"glClearBufferfi\0"
"\0"
- /* _mesa_function_pool[18004]: Materialiv (offset 172) */
+ /* _mesa_function_pool[18050]: Materialiv (offset 172) */
"iip\0"
"glMaterialiv\0"
"\0"
- /* _mesa_function_pool[18022]: PushClientAttrib (offset 335) */
+ /* _mesa_function_pool[18068]: PushClientAttrib (offset 335) */
"i\0"
"glPushClientAttrib\0"
"\0"
- /* _mesa_function_pool[18044]: ProgramEnvParameters4fvEXT (will be remapped) */
+ /* _mesa_function_pool[18090]: ProgramEnvParameters4fvEXT (will be remapped) */
"iiip\0"
"glProgramEnvParameters4fvEXT\0"
"\0"
- /* _mesa_function_pool[18079]: TexCoord2fColor4fNormal3fVertex3fvSUN (dynamic) */
+ /* _mesa_function_pool[18125]: TexCoord2fColor4fNormal3fVertex3fvSUN (dynamic) */
"pppp\0"
"glTexCoord2fColor4fNormal3fVertex3fvSUN\0"
"\0"
- /* _mesa_function_pool[18125]: WindowPos2iMESA (will be remapped) */
+ /* _mesa_function_pool[18171]: WindowPos2iMESA (will be remapped) */
"ii\0"
"glWindowPos2i\0"
"glWindowPos2iARB\0"
"glWindowPos2iMESA\0"
"\0"
- /* _mesa_function_pool[18178]: SecondaryColor3fvEXT (will be remapped) */
+ /* _mesa_function_pool[18224]: SampleMaskSGIS (will be remapped) */
+ "fi\0"
+ "glSampleMaskSGIS\0"
+ "glSampleMaskEXT\0"
+ "\0"
+ /* _mesa_function_pool[18261]: SecondaryColor3fvEXT (will be remapped) */
"p\0"
"glSecondaryColor3fv\0"
"glSecondaryColor3fvEXT\0"
"\0"
- /* _mesa_function_pool[18224]: PolygonMode (offset 174) */
+ /* _mesa_function_pool[18307]: PolygonMode (offset 174) */
"ii\0"
"glPolygonMode\0"
"\0"
- /* _mesa_function_pool[18242]: CompressedTexSubImage1DARB (will be remapped) */
+ /* _mesa_function_pool[18325]: CompressedTexSubImage1DARB (will be remapped) */
"iiiiiip\0"
"glCompressedTexSubImage1D\0"
"glCompressedTexSubImage1DARB\0"
"\0"
- /* _mesa_function_pool[18306]: VertexAttribI1iEXT (will be remapped) */
+ /* _mesa_function_pool[18389]: VertexAttribI1iEXT (will be remapped) */
"ii\0"
"glVertexAttribI1iEXT\0"
"glVertexAttribI1i\0"
"\0"
- /* _mesa_function_pool[18349]: GetVertexAttribivNV (will be remapped) */
+ /* _mesa_function_pool[18432]: GetVertexAttribivNV (will be remapped) */
"iip\0"
"glGetVertexAttribivNV\0"
"\0"
- /* _mesa_function_pool[18376]: GetProgramStringARB (will be remapped) */
+ /* _mesa_function_pool[18459]: GetProgramStringARB (will be remapped) */
"iip\0"
"glGetProgramStringARB\0"
"\0"
- /* _mesa_function_pool[18403]: VertexAttribIPointerEXT (will be remapped) */
+ /* _mesa_function_pool[18486]: VertexAttribIPointerEXT (will be remapped) */
"iiiip\0"
"glVertexAttribIPointerEXT\0"
"glVertexAttribIPointer\0"
"\0"
- /* _mesa_function_pool[18459]: TexBumpParameterfvATI (will be remapped) */
+ /* _mesa_function_pool[18542]: TexBumpParameterfvATI (will be remapped) */
"ip\0"
"glTexBumpParameterfvATI\0"
"\0"
- /* _mesa_function_pool[18487]: CompileShaderARB (will be remapped) */
+ /* _mesa_function_pool[18570]: CompileShaderARB (will be remapped) */
"i\0"
"glCompileShader\0"
"glCompileShaderARB\0"
"\0"
- /* _mesa_function_pool[18525]: DeleteShader (will be remapped) */
+ /* _mesa_function_pool[18608]: DeleteShader (will be remapped) */
"i\0"
"glDeleteShader\0"
"\0"
- /* _mesa_function_pool[18543]: DisableClientState (offset 309) */
+ /* _mesa_function_pool[18626]: DisableClientState (offset 309) */
"i\0"
"glDisableClientState\0"
"\0"
- /* _mesa_function_pool[18567]: TexGeni (offset 192) */
+ /* _mesa_function_pool[18650]: TexGeni (offset 192) */
"iii\0"
"glTexGeni\0"
"\0"
- /* _mesa_function_pool[18582]: TexGenf (offset 190) */
+ /* _mesa_function_pool[18665]: TexGenf (offset 190) */
"iif\0"
"glTexGenf\0"
"\0"
- /* _mesa_function_pool[18597]: Uniform3fARB (will be remapped) */
+ /* _mesa_function_pool[18680]: Uniform3fARB (will be remapped) */
"ifff\0"
"glUniform3f\0"
"glUniform3fARB\0"
"\0"
- /* _mesa_function_pool[18630]: TexGend (offset 188) */
+ /* _mesa_function_pool[18713]: TexGend (offset 188) */
"iid\0"
"glTexGend\0"
"\0"
- /* _mesa_function_pool[18645]: ListParameterfvSGIX (dynamic) */
+ /* _mesa_function_pool[18728]: ListParameterfvSGIX (dynamic) */
"iip\0"
"glListParameterfvSGIX\0"
"\0"
- /* _mesa_function_pool[18672]: GetPolygonStipple (offset 274) */
+ /* _mesa_function_pool[18755]: GetPolygonStipple (offset 274) */
"p\0"
"glGetPolygonStipple\0"
"\0"
- /* _mesa_function_pool[18695]: Tangent3dvEXT (dynamic) */
+ /* _mesa_function_pool[18778]: Tangent3dvEXT (dynamic) */
"p\0"
"glTangent3dvEXT\0"
"\0"
- /* _mesa_function_pool[18714]: BindBufferOffsetEXT (will be remapped) */
+ /* _mesa_function_pool[18797]: BindBufferOffsetEXT (will be remapped) */
"iiii\0"
"glBindBufferOffsetEXT\0"
"\0"
- /* _mesa_function_pool[18742]: WindowPos3sMESA (will be remapped) */
+ /* _mesa_function_pool[18825]: WindowPos3sMESA (will be remapped) */
"iii\0"
"glWindowPos3s\0"
"glWindowPos3sARB\0"
"glWindowPos3sMESA\0"
"\0"
- /* _mesa_function_pool[18796]: VertexAttrib2svNV (will be remapped) */
+ /* _mesa_function_pool[18879]: VertexAttrib2svNV (will be remapped) */
"ip\0"
"glVertexAttrib2svNV\0"
"\0"
- /* _mesa_function_pool[18820]: DisableIndexedEXT (will be remapped) */
+ /* _mesa_function_pool[18903]: DisableIndexedEXT (will be remapped) */
"ii\0"
"glDisableIndexedEXT\0"
"glDisablei\0"
"\0"
- /* _mesa_function_pool[18855]: BindBufferBaseEXT (will be remapped) */
+ /* _mesa_function_pool[18938]: BindBufferBaseEXT (will be remapped) */
"iii\0"
"glBindBufferBaseEXT\0"
"glBindBufferBase\0"
"\0"
- /* _mesa_function_pool[18897]: TexCoord2fVertex3fvSUN (dynamic) */
+ /* _mesa_function_pool[18980]: TexCoord2fVertex3fvSUN (dynamic) */
"pp\0"
"glTexCoord2fVertex3fvSUN\0"
"\0"
- /* _mesa_function_pool[18926]: WindowPos4sMESA (will be remapped) */
+ /* _mesa_function_pool[19009]: WindowPos4sMESA (will be remapped) */
"iiii\0"
"glWindowPos4sMESA\0"
"\0"
- /* _mesa_function_pool[18950]: VertexAttrib4NuivARB (will be remapped) */
+ /* _mesa_function_pool[19033]: VertexAttrib4NuivARB (will be remapped) */
"ip\0"
"glVertexAttrib4Nuiv\0"
"glVertexAttrib4NuivARB\0"
"\0"
- /* _mesa_function_pool[18997]: ClientActiveTextureARB (offset 375) */
+ /* _mesa_function_pool[19080]: ClientActiveTextureARB (offset 375) */
"i\0"
"glClientActiveTexture\0"
"glClientActiveTextureARB\0"
"\0"
- /* _mesa_function_pool[19047]: PixelTexGenSGIX (will be remapped) */
+ /* _mesa_function_pool[19130]: PixelTexGenSGIX (will be remapped) */
"i\0"
"glPixelTexGenSGIX\0"
"\0"
- /* _mesa_function_pool[19068]: ReplacementCodeusvSUN (dynamic) */
+ /* _mesa_function_pool[19151]: ReplacementCodeusvSUN (dynamic) */
"p\0"
"glReplacementCodeusvSUN\0"
"\0"
- /* _mesa_function_pool[19095]: Uniform4fARB (will be remapped) */
+ /* _mesa_function_pool[19178]: Uniform4fARB (will be remapped) */
"iffff\0"
"glUniform4f\0"
"glUniform4fARB\0"
"\0"
- /* _mesa_function_pool[19129]: Color4sv (offset 34) */
+ /* _mesa_function_pool[19212]: Color4sv (offset 34) */
"p\0"
"glColor4sv\0"
"\0"
- /* _mesa_function_pool[19143]: FlushMappedBufferRange (will be remapped) */
+ /* _mesa_function_pool[19226]: FlushMappedBufferRange (will be remapped) */
"iii\0"
"glFlushMappedBufferRange\0"
"\0"
- /* _mesa_function_pool[19173]: IsProgramNV (will be remapped) */
+ /* _mesa_function_pool[19256]: IsProgramNV (will be remapped) */
"i\0"
"glIsProgramARB\0"
"glIsProgramNV\0"
"\0"
- /* _mesa_function_pool[19205]: FlushMappedBufferRangeAPPLE (will be remapped) */
+ /* _mesa_function_pool[19288]: FlushMappedBufferRangeAPPLE (will be remapped) */
"iii\0"
"glFlushMappedBufferRangeAPPLE\0"
"\0"
- /* _mesa_function_pool[19240]: PixelZoom (offset 246) */
+ /* _mesa_function_pool[19323]: PixelZoom (offset 246) */
"ff\0"
"glPixelZoom\0"
"\0"
- /* _mesa_function_pool[19256]: ReplacementCodePointerSUN (dynamic) */
+ /* _mesa_function_pool[19339]: ReplacementCodePointerSUN (dynamic) */
"iip\0"
"glReplacementCodePointerSUN\0"
"\0"
- /* _mesa_function_pool[19289]: ProgramEnvParameter4dARB (will be remapped) */
+ /* _mesa_function_pool[19372]: ProgramEnvParameter4dARB (will be remapped) */
"iidddd\0"
"glProgramEnvParameter4dARB\0"
"glProgramParameter4dNV\0"
"\0"
- /* _mesa_function_pool[19347]: ColorTableParameterfv (offset 340) */
+ /* _mesa_function_pool[19430]: ColorTableParameterfv (offset 340) */
"iip\0"
"glColorTableParameterfv\0"
"glColorTableParameterfvSGI\0"
"\0"
- /* _mesa_function_pool[19403]: FragmentLightModelfSGIX (dynamic) */
+ /* _mesa_function_pool[19486]: FragmentLightModelfSGIX (dynamic) */
"if\0"
"glFragmentLightModelfSGIX\0"
"\0"
- /* _mesa_function_pool[19433]: Binormal3bvEXT (dynamic) */
+ /* _mesa_function_pool[19516]: Binormal3bvEXT (dynamic) */
"p\0"
"glBinormal3bvEXT\0"
"\0"
- /* _mesa_function_pool[19453]: PixelMapuiv (offset 252) */
+ /* _mesa_function_pool[19536]: PixelMapuiv (offset 252) */
"iip\0"
"glPixelMapuiv\0"
"\0"
- /* _mesa_function_pool[19472]: Color3dv (offset 12) */
+ /* _mesa_function_pool[19555]: Color3dv (offset 12) */
"p\0"
"glColor3dv\0"
"\0"
- /* _mesa_function_pool[19486]: IsTexture (offset 330) */
+ /* _mesa_function_pool[19569]: IsTexture (offset 330) */
"i\0"
"glIsTexture\0"
"glIsTextureEXT\0"
"\0"
- /* _mesa_function_pool[19516]: VertexWeightfvEXT (dynamic) */
+ /* _mesa_function_pool[19599]: VertexWeightfvEXT (dynamic) */
"p\0"
"glVertexWeightfvEXT\0"
"\0"
- /* _mesa_function_pool[19539]: VertexAttrib1dARB (will be remapped) */
+ /* _mesa_function_pool[19622]: VertexAttrib1dARB (will be remapped) */
"id\0"
"glVertexAttrib1d\0"
"glVertexAttrib1dARB\0"
"\0"
- /* _mesa_function_pool[19580]: ImageTransformParameterivHP (dynamic) */
+ /* _mesa_function_pool[19663]: ImageTransformParameterivHP (dynamic) */
"iip\0"
"glImageTransformParameterivHP\0"
"\0"
- /* _mesa_function_pool[19615]: TexCoord4i (offset 122) */
+ /* _mesa_function_pool[19698]: TexCoord4i (offset 122) */
"iiii\0"
"glTexCoord4i\0"
"\0"
- /* _mesa_function_pool[19634]: DeleteQueriesARB (will be remapped) */
+ /* _mesa_function_pool[19717]: DeleteQueriesARB (will be remapped) */
"ip\0"
"glDeleteQueries\0"
"glDeleteQueriesARB\0"
"\0"
- /* _mesa_function_pool[19673]: Color4ubVertex2fSUN (dynamic) */
+ /* _mesa_function_pool[19756]: Color4ubVertex2fSUN (dynamic) */
"iiiiff\0"
"glColor4ubVertex2fSUN\0"
"\0"
- /* _mesa_function_pool[19703]: FragmentColorMaterialSGIX (dynamic) */
+ /* _mesa_function_pool[19786]: FragmentColorMaterialSGIX (dynamic) */
"ii\0"
"glFragmentColorMaterialSGIX\0"
"\0"
- /* _mesa_function_pool[19735]: CurrentPaletteMatrixARB (dynamic) */
+ /* _mesa_function_pool[19818]: CurrentPaletteMatrixARB (dynamic) */
"i\0"
"glCurrentPaletteMatrixARB\0"
"\0"
- /* _mesa_function_pool[19764]: GetMapdv (offset 266) */
+ /* _mesa_function_pool[19847]: GetMapdv (offset 266) */
"iip\0"
"glGetMapdv\0"
"\0"
- /* _mesa_function_pool[19780]: ObjectPurgeableAPPLE (will be remapped) */
+ /* _mesa_function_pool[19863]: ObjectPurgeableAPPLE (will be remapped) */
"iii\0"
"glObjectPurgeableAPPLE\0"
"\0"
- /* _mesa_function_pool[19808]: GetStringi (will be remapped) */
+ /* _mesa_function_pool[19891]: GetStringi (will be remapped) */
"ii\0"
"glGetStringi\0"
"\0"
- /* _mesa_function_pool[19825]: SamplePatternSGIS (will be remapped) */
+ /* _mesa_function_pool[19908]: SamplePatternSGIS (will be remapped) */
"i\0"
"glSamplePatternSGIS\0"
"glSamplePatternEXT\0"
"\0"
- /* _mesa_function_pool[19867]: PixelStoref (offset 249) */
+ /* _mesa_function_pool[19950]: PixelStoref (offset 249) */
"if\0"
"glPixelStoref\0"
"\0"
- /* _mesa_function_pool[19885]: IsQueryARB (will be remapped) */
+ /* _mesa_function_pool[19968]: IsQueryARB (will be remapped) */
"i\0"
"glIsQuery\0"
"glIsQueryARB\0"
"\0"
- /* _mesa_function_pool[19911]: ReplacementCodeuiColor4ubVertex3fSUN (dynamic) */
+ /* _mesa_function_pool[19994]: ReplacementCodeuiColor4ubVertex3fSUN (dynamic) */
"iiiiifff\0"
"glReplacementCodeuiColor4ubVertex3fSUN\0"
"\0"
- /* _mesa_function_pool[19960]: PixelStorei (offset 250) */
+ /* _mesa_function_pool[20043]: PixelStorei (offset 250) */
"ii\0"
"glPixelStorei\0"
"\0"
- /* _mesa_function_pool[19978]: VertexAttrib4usvARB (will be remapped) */
+ /* _mesa_function_pool[20061]: VertexAttrib4usvARB (will be remapped) */
"ip\0"
"glVertexAttrib4usv\0"
"glVertexAttrib4usvARB\0"
"\0"
- /* _mesa_function_pool[20023]: LinkProgramARB (will be remapped) */
+ /* _mesa_function_pool[20106]: LinkProgramARB (will be remapped) */
"i\0"
"glLinkProgram\0"
"glLinkProgramARB\0"
"\0"
- /* _mesa_function_pool[20057]: VertexAttrib2fNV (will be remapped) */
+ /* _mesa_function_pool[20140]: VertexAttrib2fNV (will be remapped) */
"iff\0"
"glVertexAttrib2fNV\0"
"\0"
- /* _mesa_function_pool[20081]: ShaderSourceARB (will be remapped) */
+ /* _mesa_function_pool[20164]: ShaderSourceARB (will be remapped) */
"iipp\0"
"glShaderSource\0"
"glShaderSourceARB\0"
"\0"
- /* _mesa_function_pool[20120]: FragmentMaterialiSGIX (dynamic) */
+ /* _mesa_function_pool[20203]: FragmentMaterialiSGIX (dynamic) */
"iii\0"
"glFragmentMaterialiSGIX\0"
"\0"
- /* _mesa_function_pool[20149]: EvalCoord2dv (offset 233) */
+ /* _mesa_function_pool[20232]: EvalCoord2dv (offset 233) */
"p\0"
"glEvalCoord2dv\0"
"\0"
- /* _mesa_function_pool[20167]: VertexAttrib3svARB (will be remapped) */
+ /* _mesa_function_pool[20250]: VertexAttrib3svARB (will be remapped) */
"ip\0"
"glVertexAttrib3sv\0"
"glVertexAttrib3svARB\0"
"\0"
- /* _mesa_function_pool[20210]: ColorMaterial (offset 151) */
+ /* _mesa_function_pool[20293]: ColorMaterial (offset 151) */
"ii\0"
"glColorMaterial\0"
"\0"
- /* _mesa_function_pool[20230]: CompressedTexSubImage3DARB (will be remapped) */
+ /* _mesa_function_pool[20313]: CompressedTexSubImage3DARB (will be remapped) */
"iiiiiiiiiip\0"
"glCompressedTexSubImage3D\0"
"glCompressedTexSubImage3DARB\0"
"\0"
- /* _mesa_function_pool[20298]: WindowPos2ivMESA (will be remapped) */
+ /* _mesa_function_pool[20381]: WindowPos2ivMESA (will be remapped) */
"p\0"
"glWindowPos2iv\0"
"glWindowPos2ivARB\0"
"glWindowPos2ivMESA\0"
"\0"
- /* _mesa_function_pool[20353]: IsFramebufferEXT (will be remapped) */
+ /* _mesa_function_pool[20436]: IsFramebufferEXT (will be remapped) */
"i\0"
"glIsFramebuffer\0"
"glIsFramebufferEXT\0"
"\0"
- /* _mesa_function_pool[20391]: Uniform4ivARB (will be remapped) */
+ /* _mesa_function_pool[20474]: Uniform4ivARB (will be remapped) */
"iip\0"
"glUniform4iv\0"
"glUniform4ivARB\0"
"\0"
- /* _mesa_function_pool[20425]: GetVertexAttribdvARB (will be remapped) */
+ /* _mesa_function_pool[20508]: GetVertexAttribdvARB (will be remapped) */
"iip\0"
"glGetVertexAttribdv\0"
"glGetVertexAttribdvARB\0"
"\0"
- /* _mesa_function_pool[20473]: TexBumpParameterivATI (will be remapped) */
+ /* _mesa_function_pool[20556]: TexBumpParameterivATI (will be remapped) */
"ip\0"
"glTexBumpParameterivATI\0"
"\0"
- /* _mesa_function_pool[20501]: GetSeparableFilter (offset 359) */
+ /* _mesa_function_pool[20584]: GetSeparableFilter (offset 359) */
"iiippp\0"
"glGetSeparableFilter\0"
"glGetSeparableFilterEXT\0"
"\0"
- /* _mesa_function_pool[20554]: Binormal3dEXT (dynamic) */
+ /* _mesa_function_pool[20637]: Binormal3dEXT (dynamic) */
"ddd\0"
"glBinormal3dEXT\0"
"\0"
- /* _mesa_function_pool[20575]: SpriteParameteriSGIX (dynamic) */
+ /* _mesa_function_pool[20658]: SpriteParameteriSGIX (dynamic) */
"ii\0"
"glSpriteParameteriSGIX\0"
"\0"
- /* _mesa_function_pool[20602]: RequestResidentProgramsNV (will be remapped) */
+ /* _mesa_function_pool[20685]: RequestResidentProgramsNV (will be remapped) */
"ip\0"
"glRequestResidentProgramsNV\0"
"\0"
- /* _mesa_function_pool[20634]: TagSampleBufferSGIX (dynamic) */
+ /* _mesa_function_pool[20717]: TagSampleBufferSGIX (dynamic) */
"\0"
"glTagSampleBufferSGIX\0"
"\0"
- /* _mesa_function_pool[20658]: TransformFeedbackVaryingsEXT (will be remapped) */
+ /* _mesa_function_pool[20741]: TransformFeedbackVaryingsEXT (will be remapped) */
"iipi\0"
"glTransformFeedbackVaryingsEXT\0"
"glTransformFeedbackVaryings\0"
"\0"
- /* _mesa_function_pool[20723]: FeedbackBuffer (offset 194) */
+ /* _mesa_function_pool[20806]: FeedbackBuffer (offset 194) */
"iip\0"
"glFeedbackBuffer\0"
"\0"
- /* _mesa_function_pool[20745]: RasterPos2iv (offset 67) */
+ /* _mesa_function_pool[20828]: RasterPos2iv (offset 67) */
"p\0"
"glRasterPos2iv\0"
"\0"
- /* _mesa_function_pool[20763]: TexImage1D (offset 182) */
+ /* _mesa_function_pool[20846]: TexImage1D (offset 182) */
"iiiiiiip\0"
"glTexImage1D\0"
"\0"
- /* _mesa_function_pool[20786]: ListParameterivSGIX (dynamic) */
+ /* _mesa_function_pool[20869]: ListParameterivSGIX (dynamic) */
"iip\0"
"glListParameterivSGIX\0"
"\0"
- /* _mesa_function_pool[20813]: MultiDrawElementsEXT (will be remapped) */
+ /* _mesa_function_pool[20896]: MultiDrawElementsEXT (will be remapped) */
"ipipi\0"
"glMultiDrawElements\0"
"glMultiDrawElementsEXT\0"
"\0"
- /* _mesa_function_pool[20863]: Color3s (offset 17) */
+ /* _mesa_function_pool[20946]: Color3s (offset 17) */
"iii\0"
"glColor3s\0"
"\0"
- /* _mesa_function_pool[20878]: Uniform1ivARB (will be remapped) */
+ /* _mesa_function_pool[20961]: Uniform1ivARB (will be remapped) */
"iip\0"
"glUniform1iv\0"
"glUniform1ivARB\0"
"\0"
- /* _mesa_function_pool[20912]: WindowPos2sMESA (will be remapped) */
+ /* _mesa_function_pool[20995]: WindowPos2sMESA (will be remapped) */
"ii\0"
"glWindowPos2s\0"
"glWindowPos2sARB\0"
"glWindowPos2sMESA\0"
"\0"
- /* _mesa_function_pool[20965]: WeightusvARB (dynamic) */
+ /* _mesa_function_pool[21048]: WeightusvARB (dynamic) */
"ip\0"
"glWeightusvARB\0"
"\0"
- /* _mesa_function_pool[20984]: TexCoordPointer (offset 320) */
+ /* _mesa_function_pool[21067]: TexCoordPointer (offset 320) */
"iiip\0"
"glTexCoordPointer\0"
"\0"
- /* _mesa_function_pool[21008]: FogCoordPointerEXT (will be remapped) */
+ /* _mesa_function_pool[21091]: FogCoordPointerEXT (will be remapped) */
"iip\0"
"glFogCoordPointer\0"
"glFogCoordPointerEXT\0"
"\0"
- /* _mesa_function_pool[21052]: IndexMaterialEXT (dynamic) */
+ /* _mesa_function_pool[21135]: IndexMaterialEXT (dynamic) */
"ii\0"
"glIndexMaterialEXT\0"
"\0"
- /* _mesa_function_pool[21075]: Color3i (offset 15) */
+ /* _mesa_function_pool[21158]: Color3i (offset 15) */
"iii\0"
"glColor3i\0"
"\0"
- /* _mesa_function_pool[21090]: FrontFace (offset 157) */
+ /* _mesa_function_pool[21173]: FrontFace (offset 157) */
"i\0"
"glFrontFace\0"
"\0"
- /* _mesa_function_pool[21105]: EvalCoord2d (offset 232) */
+ /* _mesa_function_pool[21188]: EvalCoord2d (offset 232) */
"dd\0"
"glEvalCoord2d\0"
"\0"
- /* _mesa_function_pool[21123]: SecondaryColor3ubvEXT (will be remapped) */
+ /* _mesa_function_pool[21206]: SecondaryColor3ubvEXT (will be remapped) */
"p\0"
"glSecondaryColor3ubv\0"
"glSecondaryColor3ubvEXT\0"
"\0"
- /* _mesa_function_pool[21171]: EvalCoord2f (offset 234) */
+ /* _mesa_function_pool[21254]: EvalCoord2f (offset 234) */
"ff\0"
"glEvalCoord2f\0"
"\0"
- /* _mesa_function_pool[21189]: VertexAttrib4dvARB (will be remapped) */
+ /* _mesa_function_pool[21272]: VertexAttrib4dvARB (will be remapped) */
"ip\0"
"glVertexAttrib4dv\0"
"glVertexAttrib4dvARB\0"
"\0"
- /* _mesa_function_pool[21232]: BindAttribLocationARB (will be remapped) */
+ /* _mesa_function_pool[21315]: BindAttribLocationARB (will be remapped) */
"iip\0"
"glBindAttribLocation\0"
"glBindAttribLocationARB\0"
"\0"
- /* _mesa_function_pool[21282]: Color3b (offset 9) */
+ /* _mesa_function_pool[21365]: Color3b (offset 9) */
"iii\0"
"glColor3b\0"
"\0"
- /* _mesa_function_pool[21297]: MultiTexCoord2dARB (offset 384) */
+ /* _mesa_function_pool[21380]: MultiTexCoord2dARB (offset 384) */
"idd\0"
"glMultiTexCoord2d\0"
"glMultiTexCoord2dARB\0"
"\0"
- /* _mesa_function_pool[21341]: ExecuteProgramNV (will be remapped) */
+ /* _mesa_function_pool[21424]: ExecuteProgramNV (will be remapped) */
"iip\0"
"glExecuteProgramNV\0"
"\0"
- /* _mesa_function_pool[21365]: Color3f (offset 13) */
+ /* _mesa_function_pool[21448]: Color3f (offset 13) */
"fff\0"
"glColor3f\0"
"\0"
- /* _mesa_function_pool[21380]: LightEnviSGIX (dynamic) */
+ /* _mesa_function_pool[21463]: LightEnviSGIX (dynamic) */
"ii\0"
"glLightEnviSGIX\0"
"\0"
- /* _mesa_function_pool[21400]: Color3d (offset 11) */
+ /* _mesa_function_pool[21483]: Color3d (offset 11) */
"ddd\0"
"glColor3d\0"
"\0"
- /* _mesa_function_pool[21415]: Normal3dv (offset 55) */
+ /* _mesa_function_pool[21498]: Normal3dv (offset 55) */
"p\0"
"glNormal3dv\0"
"\0"
- /* _mesa_function_pool[21430]: Lightf (offset 159) */
+ /* _mesa_function_pool[21513]: Lightf (offset 159) */
"iif\0"
"glLightf\0"
"\0"
- /* _mesa_function_pool[21444]: ReplacementCodeuiSUN (dynamic) */
+ /* _mesa_function_pool[21527]: ReplacementCodeuiSUN (dynamic) */
"i\0"
"glReplacementCodeuiSUN\0"
"\0"
- /* _mesa_function_pool[21470]: MatrixMode (offset 293) */
+ /* _mesa_function_pool[21553]: MatrixMode (offset 293) */
"i\0"
"glMatrixMode\0"
"\0"
- /* _mesa_function_pool[21486]: GetPixelMapusv (offset 273) */
+ /* _mesa_function_pool[21569]: GetPixelMapusv (offset 273) */
"ip\0"
"glGetPixelMapusv\0"
"\0"
- /* _mesa_function_pool[21507]: Lighti (offset 161) */
+ /* _mesa_function_pool[21590]: Lighti (offset 161) */
"iii\0"
"glLighti\0"
"\0"
- /* _mesa_function_pool[21521]: VertexAttribPointerNV (will be remapped) */
+ /* _mesa_function_pool[21604]: VertexAttribPointerNV (will be remapped) */
"iiiip\0"
"glVertexAttribPointerNV\0"
"\0"
- /* _mesa_function_pool[21552]: GetBooleanIndexedvEXT (will be remapped) */
+ /* _mesa_function_pool[21635]: ClearDepthf (will be remapped) */
+ "f\0"
+ "glClearDepthf\0"
+ "\0"
+ /* _mesa_function_pool[21652]: GetBooleanIndexedvEXT (will be remapped) */
"iip\0"
"glGetBooleanIndexedvEXT\0"
"glGetBooleani_v\0"
"\0"
- /* _mesa_function_pool[21597]: GetFramebufferAttachmentParameterivEXT (will be remapped) */
+ /* _mesa_function_pool[21697]: GetFramebufferAttachmentParameterivEXT (will be remapped) */
"iiip\0"
"glGetFramebufferAttachmentParameteriv\0"
"glGetFramebufferAttachmentParameterivEXT\0"
"\0"
- /* _mesa_function_pool[21682]: PixelTransformParameterfEXT (dynamic) */
+ /* _mesa_function_pool[21782]: PixelTransformParameterfEXT (dynamic) */
"iif\0"
"glPixelTransformParameterfEXT\0"
"\0"
- /* _mesa_function_pool[21717]: MultiTexCoord4dvARB (offset 401) */
+ /* _mesa_function_pool[21817]: MultiTexCoord4dvARB (offset 401) */
"ip\0"
"glMultiTexCoord4dv\0"
"glMultiTexCoord4dvARB\0"
"\0"
- /* _mesa_function_pool[21762]: PixelTransformParameteriEXT (dynamic) */
+ /* _mesa_function_pool[21862]: PixelTransformParameteriEXT (dynamic) */
"iii\0"
"glPixelTransformParameteriEXT\0"
"\0"
- /* _mesa_function_pool[21797]: GetDoublev (offset 260) */
+ /* _mesa_function_pool[21897]: GetDoublev (offset 260) */
"ip\0"
"glGetDoublev\0"
"\0"
- /* _mesa_function_pool[21814]: MultMatrixd (offset 295) */
+ /* _mesa_function_pool[21914]: MultMatrixd (offset 295) */
"p\0"
"glMultMatrixd\0"
"\0"
- /* _mesa_function_pool[21831]: MultMatrixf (offset 294) */
+ /* _mesa_function_pool[21931]: MultMatrixf (offset 294) */
"p\0"
"glMultMatrixf\0"
"\0"
- /* _mesa_function_pool[21848]: VertexAttribI4bvEXT (will be remapped) */
+ /* _mesa_function_pool[21948]: VertexAttribI4bvEXT (will be remapped) */
"ip\0"
"glVertexAttribI4bvEXT\0"
"glVertexAttribI4bv\0"
"\0"
- /* _mesa_function_pool[21893]: TexCoord2fColor4ubVertex3fSUN (dynamic) */
+ /* _mesa_function_pool[21993]: TexCoord2fColor4ubVertex3fSUN (dynamic) */
"ffiiiifff\0"
"glTexCoord2fColor4ubVertex3fSUN\0"
"\0"
- /* _mesa_function_pool[21936]: Uniform1iARB (will be remapped) */
+ /* _mesa_function_pool[22036]: Uniform1iARB (will be remapped) */
"ii\0"
"glUniform1i\0"
"glUniform1iARB\0"
"\0"
- /* _mesa_function_pool[21967]: VertexAttribPointerARB (will be remapped) */
+ /* _mesa_function_pool[22067]: VertexAttribPointerARB (will be remapped) */
"iiiiip\0"
"glVertexAttribPointer\0"
"glVertexAttribPointerARB\0"
"\0"
- /* _mesa_function_pool[22022]: VertexAttrib3sNV (will be remapped) */
+ /* _mesa_function_pool[22122]: VertexAttrib3sNV (will be remapped) */
"iiii\0"
"glVertexAttrib3sNV\0"
"\0"
- /* _mesa_function_pool[22047]: SharpenTexFuncSGIS (dynamic) */
+ /* _mesa_function_pool[22147]: SharpenTexFuncSGIS (dynamic) */
"iip\0"
"glSharpenTexFuncSGIS\0"
"\0"
- /* _mesa_function_pool[22073]: MultiTexCoord4fvARB (offset 403) */
+ /* _mesa_function_pool[22173]: MultiTexCoord4fvARB (offset 403) */
"ip\0"
"glMultiTexCoord4fv\0"
"glMultiTexCoord4fvARB\0"
"\0"
- /* _mesa_function_pool[22118]: Uniform2uiEXT (will be remapped) */
+ /* _mesa_function_pool[22218]: Uniform2uiEXT (will be remapped) */
"iii\0"
"glUniform2uiEXT\0"
"glUniform2ui\0"
"\0"
- /* _mesa_function_pool[22152]: UniformMatrix2x3fv (will be remapped) */
+ /* _mesa_function_pool[22252]: UniformMatrix2x3fv (will be remapped) */
"iiip\0"
"glUniformMatrix2x3fv\0"
"\0"
- /* _mesa_function_pool[22179]: TrackMatrixNV (will be remapped) */
+ /* _mesa_function_pool[22279]: TrackMatrixNV (will be remapped) */
"iiii\0"
"glTrackMatrixNV\0"
"\0"
- /* _mesa_function_pool[22201]: CombinerParameteriNV (will be remapped) */
+ /* _mesa_function_pool[22301]: CombinerParameteriNV (will be remapped) */
"ii\0"
"glCombinerParameteriNV\0"
"\0"
- /* _mesa_function_pool[22228]: DeleteAsyncMarkersSGIX (dynamic) */
+ /* _mesa_function_pool[22328]: DeleteAsyncMarkersSGIX (dynamic) */
"ii\0"
"glDeleteAsyncMarkersSGIX\0"
"\0"
- /* _mesa_function_pool[22257]: ReplacementCodeusSUN (dynamic) */
+ /* _mesa_function_pool[22357]: ReplacementCodeusSUN (dynamic) */
"i\0"
"glReplacementCodeusSUN\0"
"\0"
- /* _mesa_function_pool[22283]: IsAsyncMarkerSGIX (dynamic) */
+ /* _mesa_function_pool[22383]: IsAsyncMarkerSGIX (dynamic) */
"i\0"
"glIsAsyncMarkerSGIX\0"
"\0"
- /* _mesa_function_pool[22306]: FrameZoomSGIX (dynamic) */
+ /* _mesa_function_pool[22406]: FrameZoomSGIX (dynamic) */
"i\0"
"glFrameZoomSGIX\0"
"\0"
- /* _mesa_function_pool[22325]: Normal3fVertex3fvSUN (dynamic) */
+ /* _mesa_function_pool[22425]: Normal3fVertex3fvSUN (dynamic) */
"pp\0"
"glNormal3fVertex3fvSUN\0"
"\0"
- /* _mesa_function_pool[22352]: RasterPos4sv (offset 85) */
+ /* _mesa_function_pool[22452]: RasterPos4sv (offset 85) */
"p\0"
"glRasterPos4sv\0"
"\0"
- /* _mesa_function_pool[22370]: VertexAttrib4NsvARB (will be remapped) */
+ /* _mesa_function_pool[22470]: VertexAttrib4NsvARB (will be remapped) */
"ip\0"
"glVertexAttrib4Nsv\0"
"glVertexAttrib4NsvARB\0"
"\0"
- /* _mesa_function_pool[22415]: VertexAttrib3fvARB (will be remapped) */
+ /* _mesa_function_pool[22515]: VertexAttrib3fvARB (will be remapped) */
"ip\0"
"glVertexAttrib3fv\0"
"glVertexAttrib3fvARB\0"
"\0"
- /* _mesa_function_pool[22458]: ClearColor (offset 206) */
+ /* _mesa_function_pool[22558]: ClearColor (offset 206) */
"ffff\0"
"glClearColor\0"
"\0"
- /* _mesa_function_pool[22477]: GetSynciv (will be remapped) */
+ /* _mesa_function_pool[22577]: GetSynciv (will be remapped) */
"iiipp\0"
"glGetSynciv\0"
"\0"
- /* _mesa_function_pool[22496]: ClearColorIiEXT (will be remapped) */
+ /* _mesa_function_pool[22596]: ClearColorIiEXT (will be remapped) */
"iiii\0"
"glClearColorIiEXT\0"
"\0"
- /* _mesa_function_pool[22520]: DeleteFramebuffersEXT (will be remapped) */
+ /* _mesa_function_pool[22620]: DeleteFramebuffersEXT (will be remapped) */
"ip\0"
"glDeleteFramebuffers\0"
"glDeleteFramebuffersEXT\0"
"\0"
- /* _mesa_function_pool[22569]: GlobalAlphaFactorsSUN (dynamic) */
+ /* _mesa_function_pool[22669]: GlobalAlphaFactorsSUN (dynamic) */
"i\0"
"glGlobalAlphaFactorsSUN\0"
"\0"
- /* _mesa_function_pool[22596]: IsEnabledIndexedEXT (will be remapped) */
+ /* _mesa_function_pool[22696]: IsEnabledIndexedEXT (will be remapped) */
"ii\0"
"glIsEnabledIndexedEXT\0"
"glIsEnabledi\0"
"\0"
- /* _mesa_function_pool[22635]: TexEnviv (offset 187) */
+ /* _mesa_function_pool[22735]: TexEnviv (offset 187) */
"iip\0"
"glTexEnviv\0"
"\0"
- /* _mesa_function_pool[22651]: TexSubImage3D (offset 372) */
+ /* _mesa_function_pool[22751]: TexSubImage3D (offset 372) */
"iiiiiiiiiip\0"
"glTexSubImage3D\0"
"glTexSubImage3DEXT\0"
"\0"
- /* _mesa_function_pool[22699]: Tangent3fEXT (dynamic) */
+ /* _mesa_function_pool[22799]: Tangent3fEXT (dynamic) */
"fff\0"
"glTangent3fEXT\0"
"\0"
- /* _mesa_function_pool[22719]: SecondaryColor3uivEXT (will be remapped) */
+ /* _mesa_function_pool[22819]: SecondaryColor3uivEXT (will be remapped) */
"p\0"
"glSecondaryColor3uiv\0"
"glSecondaryColor3uivEXT\0"
"\0"
- /* _mesa_function_pool[22767]: MatrixIndexubvARB (dynamic) */
+ /* _mesa_function_pool[22867]: MatrixIndexubvARB (dynamic) */
"ip\0"
"glMatrixIndexubvARB\0"
"\0"
- /* _mesa_function_pool[22791]: Color4fNormal3fVertex3fSUN (dynamic) */
+ /* _mesa_function_pool[22891]: Color4fNormal3fVertex3fSUN (dynamic) */
"ffffffffff\0"
"glColor4fNormal3fVertex3fSUN\0"
"\0"
- /* _mesa_function_pool[22832]: PixelTexGenParameterfSGIS (will be remapped) */
+ /* _mesa_function_pool[22932]: PixelTexGenParameterfSGIS (will be remapped) */
"if\0"
"glPixelTexGenParameterfSGIS\0"
"\0"
- /* _mesa_function_pool[22864]: CreateShader (will be remapped) */
+ /* _mesa_function_pool[22964]: CreateShader (will be remapped) */
"i\0"
"glCreateShader\0"
"\0"
- /* _mesa_function_pool[22882]: GetColorTableParameterfv (offset 344) */
+ /* _mesa_function_pool[22982]: GetColorTableParameterfv (offset 344) */
"iip\0"
"glGetColorTableParameterfv\0"
"glGetColorTableParameterfvSGI\0"
"glGetColorTableParameterfvEXT\0"
"\0"
- /* _mesa_function_pool[22974]: FragmentLightModelfvSGIX (dynamic) */
+ /* _mesa_function_pool[23074]: FragmentLightModelfvSGIX (dynamic) */
"ip\0"
"glFragmentLightModelfvSGIX\0"
"\0"
- /* _mesa_function_pool[23005]: Bitmap (offset 8) */
+ /* _mesa_function_pool[23105]: Bitmap (offset 8) */
"iiffffp\0"
"glBitmap\0"
"\0"
- /* _mesa_function_pool[23023]: MultiTexCoord3fARB (offset 394) */
+ /* _mesa_function_pool[23123]: MultiTexCoord3fARB (offset 394) */
"ifff\0"
"glMultiTexCoord3f\0"
"glMultiTexCoord3fARB\0"
"\0"
- /* _mesa_function_pool[23068]: GetTexLevelParameterfv (offset 284) */
+ /* _mesa_function_pool[23168]: GetTexLevelParameterfv (offset 284) */
"iiip\0"
"glGetTexLevelParameterfv\0"
"\0"
- /* _mesa_function_pool[23099]: GetPixelTexGenParameterfvSGIS (will be remapped) */
+ /* _mesa_function_pool[23199]: GetPixelTexGenParameterfvSGIS (will be remapped) */
"ip\0"
"glGetPixelTexGenParameterfvSGIS\0"
"\0"
- /* _mesa_function_pool[23135]: GenFramebuffersEXT (will be remapped) */
+ /* _mesa_function_pool[23235]: GenFramebuffersEXT (will be remapped) */
"ip\0"
"glGenFramebuffers\0"
"glGenFramebuffersEXT\0"
"\0"
- /* _mesa_function_pool[23178]: VertexAttribDivisor (will be remapped) */
+ /* _mesa_function_pool[23278]: VertexAttribDivisor (will be remapped) */
"ii\0"
"glVertexAttribDivisor\0"
"\0"
- /* _mesa_function_pool[23204]: GetProgramParameterdvNV (will be remapped) */
+ /* _mesa_function_pool[23304]: GetProgramParameterdvNV (will be remapped) */
"iiip\0"
"glGetProgramParameterdvNV\0"
"\0"
- /* _mesa_function_pool[23236]: Vertex2sv (offset 133) */
+ /* _mesa_function_pool[23336]: Vertex2sv (offset 133) */
"p\0"
"glVertex2sv\0"
"\0"
- /* _mesa_function_pool[23251]: GetIntegerv (offset 263) */
+ /* _mesa_function_pool[23351]: GetIntegerv (offset 263) */
"ip\0"
"glGetIntegerv\0"
"\0"
- /* _mesa_function_pool[23269]: IsVertexArrayAPPLE (will be remapped) */
+ /* _mesa_function_pool[23369]: IsVertexArrayAPPLE (will be remapped) */
"i\0"
"glIsVertexArray\0"
"glIsVertexArrayAPPLE\0"
"\0"
- /* _mesa_function_pool[23309]: FragmentLightfvSGIX (dynamic) */
+ /* _mesa_function_pool[23409]: FragmentLightfvSGIX (dynamic) */
"iip\0"
"glFragmentLightfvSGIX\0"
"\0"
- /* _mesa_function_pool[23336]: DetachShader (will be remapped) */
+ /* _mesa_function_pool[23436]: VertexAttribDivisorARB (will be remapped) */
+ "ii\0"
+ "glVertexAttribDivisorARB\0"
+ "\0"
+ /* _mesa_function_pool[23465]: DetachShader (will be remapped) */
"ii\0"
"glDetachShader\0"
"\0"
- /* _mesa_function_pool[23355]: VertexAttrib4NubARB (will be remapped) */
+ /* _mesa_function_pool[23484]: VertexAttrib4NubARB (will be remapped) */
"iiiii\0"
"glVertexAttrib4Nub\0"
"glVertexAttrib4NubARB\0"
"\0"
- /* _mesa_function_pool[23403]: GetProgramEnvParameterfvARB (will be remapped) */
+ /* _mesa_function_pool[23532]: GetProgramEnvParameterfvARB (will be remapped) */
"iip\0"
"glGetProgramEnvParameterfvARB\0"
"\0"
- /* _mesa_function_pool[23438]: GetTrackMatrixivNV (will be remapped) */
+ /* _mesa_function_pool[23567]: GetTrackMatrixivNV (will be remapped) */
"iiip\0"
"glGetTrackMatrixivNV\0"
"\0"
- /* _mesa_function_pool[23465]: VertexAttrib3svNV (will be remapped) */
+ /* _mesa_function_pool[23594]: VertexAttrib3svNV (will be remapped) */
"ip\0"
"glVertexAttrib3svNV\0"
"\0"
- /* _mesa_function_pool[23489]: Uniform4fvARB (will be remapped) */
+ /* _mesa_function_pool[23618]: Uniform4fvARB (will be remapped) */
"iip\0"
"glUniform4fv\0"
"glUniform4fvARB\0"
"\0"
- /* _mesa_function_pool[23523]: MultTransposeMatrixfARB (will be remapped) */
+ /* _mesa_function_pool[23652]: MultTransposeMatrixfARB (will be remapped) */
"p\0"
"glMultTransposeMatrixf\0"
"glMultTransposeMatrixfARB\0"
"\0"
- /* _mesa_function_pool[23575]: GetTexEnviv (offset 277) */
+ /* _mesa_function_pool[23704]: GetTexEnviv (offset 277) */
"iip\0"
"glGetTexEnviv\0"
"\0"
- /* _mesa_function_pool[23594]: ColorFragmentOp1ATI (will be remapped) */
+ /* _mesa_function_pool[23723]: ColorFragmentOp1ATI (will be remapped) */
"iiiiiii\0"
"glColorFragmentOp1ATI\0"
"\0"
- /* _mesa_function_pool[23625]: GetUniformfvARB (will be remapped) */
+ /* _mesa_function_pool[23754]: GetUniformfvARB (will be remapped) */
"iip\0"
"glGetUniformfv\0"
"glGetUniformfvARB\0"
"\0"
- /* _mesa_function_pool[23663]: EGLImageTargetRenderbufferStorageOES (will be remapped) */
+ /* _mesa_function_pool[23792]: EGLImageTargetRenderbufferStorageOES (will be remapped) */
"ip\0"
"glEGLImageTargetRenderbufferStorageOES\0"
"\0"
- /* _mesa_function_pool[23706]: VertexAttribI2ivEXT (will be remapped) */
+ /* _mesa_function_pool[23835]: VertexAttribI2ivEXT (will be remapped) */
"ip\0"
"glVertexAttribI2ivEXT\0"
"glVertexAttribI2iv\0"
"\0"
- /* _mesa_function_pool[23751]: PopClientAttrib (offset 334) */
+ /* _mesa_function_pool[23880]: PopClientAttrib (offset 334) */
"\0"
"glPopClientAttrib\0"
"\0"
- /* _mesa_function_pool[23771]: ReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN (dynamic) */
+ /* _mesa_function_pool[23900]: ReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN (dynamic) */
"iffffffffffff\0"
"glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN\0"
"\0"
- /* _mesa_function_pool[23842]: DetachObjectARB (will be remapped) */
+ /* _mesa_function_pool[23971]: DetachObjectARB (will be remapped) */
"ii\0"
"glDetachObjectARB\0"
"\0"
- /* _mesa_function_pool[23864]: VertexBlendARB (dynamic) */
+ /* _mesa_function_pool[23993]: VertexBlendARB (dynamic) */
"i\0"
"glVertexBlendARB\0"
"\0"
- /* _mesa_function_pool[23884]: WindowPos3iMESA (will be remapped) */
+ /* _mesa_function_pool[24013]: WindowPos3iMESA (will be remapped) */
"iii\0"
"glWindowPos3i\0"
"glWindowPos3iARB\0"
"glWindowPos3iMESA\0"
"\0"
- /* _mesa_function_pool[23938]: SeparableFilter2D (offset 360) */
+ /* _mesa_function_pool[24067]: SeparableFilter2D (offset 360) */
"iiiiiipp\0"
"glSeparableFilter2D\0"
"glSeparableFilter2DEXT\0"
"\0"
- /* _mesa_function_pool[23991]: ProgramParameteriARB (will be remapped) */
+ /* _mesa_function_pool[24120]: ProgramParameteriARB (will be remapped) */
"iii\0"
"glProgramParameteriARB\0"
"\0"
- /* _mesa_function_pool[24019]: Map1d (offset 220) */
+ /* _mesa_function_pool[24148]: Map1d (offset 220) */
"iddiip\0"
"glMap1d\0"
"\0"
- /* _mesa_function_pool[24035]: Map1f (offset 221) */
+ /* _mesa_function_pool[24164]: Map1f (offset 221) */
"iffiip\0"
"glMap1f\0"
"\0"
- /* _mesa_function_pool[24051]: CompressedTexImage2DARB (will be remapped) */
+ /* _mesa_function_pool[24180]: CompressedTexImage2DARB (will be remapped) */
"iiiiiiip\0"
"glCompressedTexImage2D\0"
"glCompressedTexImage2DARB\0"
"\0"
- /* _mesa_function_pool[24110]: ArrayElement (offset 306) */
+ /* _mesa_function_pool[24239]: ArrayElement (offset 306) */
"i\0"
"glArrayElement\0"
"glArrayElementEXT\0"
"\0"
- /* _mesa_function_pool[24146]: TexImage2D (offset 183) */
+ /* _mesa_function_pool[24275]: TexImage2D (offset 183) */
"iiiiiiiip\0"
"glTexImage2D\0"
"\0"
- /* _mesa_function_pool[24170]: DepthBoundsEXT (will be remapped) */
+ /* _mesa_function_pool[24299]: DepthBoundsEXT (will be remapped) */
"dd\0"
"glDepthBoundsEXT\0"
"\0"
- /* _mesa_function_pool[24191]: ProgramParameters4fvNV (will be remapped) */
+ /* _mesa_function_pool[24320]: ProgramParameters4fvNV (will be remapped) */
"iiip\0"
"glProgramParameters4fvNV\0"
"\0"
- /* _mesa_function_pool[24222]: DeformationMap3fSGIX (dynamic) */
+ /* _mesa_function_pool[24351]: DeformationMap3fSGIX (dynamic) */
"iffiiffiiffiip\0"
"glDeformationMap3fSGIX\0"
"\0"
- /* _mesa_function_pool[24261]: GetProgramivNV (will be remapped) */
+ /* _mesa_function_pool[24390]: GetProgramivNV (will be remapped) */
"iip\0"
"glGetProgramivNV\0"
"\0"
- /* _mesa_function_pool[24283]: GetFragDataLocationEXT (will be remapped) */
+ /* _mesa_function_pool[24412]: GetFragDataLocationEXT (will be remapped) */
"ip\0"
"glGetFragDataLocationEXT\0"
"glGetFragDataLocation\0"
"\0"
- /* _mesa_function_pool[24334]: GetMinmaxParameteriv (offset 366) */
+ /* _mesa_function_pool[24463]: GetMinmaxParameteriv (offset 366) */
"iip\0"
"glGetMinmaxParameteriv\0"
"glGetMinmaxParameterivEXT\0"
"\0"
- /* _mesa_function_pool[24388]: PixelTransferf (offset 247) */
+ /* _mesa_function_pool[24517]: PixelTransferf (offset 247) */
"if\0"
"glPixelTransferf\0"
"\0"
- /* _mesa_function_pool[24409]: CopyTexImage1D (offset 323) */
+ /* _mesa_function_pool[24538]: CopyTexImage1D (offset 323) */
"iiiiiii\0"
"glCopyTexImage1D\0"
"glCopyTexImage1DEXT\0"
"\0"
- /* _mesa_function_pool[24455]: PushMatrix (offset 298) */
+ /* _mesa_function_pool[24584]: PushMatrix (offset 298) */
"\0"
"glPushMatrix\0"
"\0"
- /* _mesa_function_pool[24470]: Fogiv (offset 156) */
+ /* _mesa_function_pool[24599]: Fogiv (offset 156) */
"ip\0"
"glFogiv\0"
"\0"
- /* _mesa_function_pool[24482]: TexCoord1dv (offset 95) */
+ /* _mesa_function_pool[24611]: TexCoord1dv (offset 95) */
"p\0"
"glTexCoord1dv\0"
"\0"
- /* _mesa_function_pool[24499]: AlphaFragmentOp3ATI (will be remapped) */
+ /* _mesa_function_pool[24628]: AlphaFragmentOp3ATI (will be remapped) */
"iiiiiiiiiiii\0"
"glAlphaFragmentOp3ATI\0"
"\0"
- /* _mesa_function_pool[24535]: PixelTransferi (offset 248) */
+ /* _mesa_function_pool[24664]: PixelTransferi (offset 248) */
"ii\0"
"glPixelTransferi\0"
"\0"
- /* _mesa_function_pool[24556]: GetVertexAttribdvNV (will be remapped) */
+ /* _mesa_function_pool[24685]: GetVertexAttribdvNV (will be remapped) */
"iip\0"
"glGetVertexAttribdvNV\0"
"\0"
- /* _mesa_function_pool[24583]: VertexAttrib3fvNV (will be remapped) */
+ /* _mesa_function_pool[24712]: VertexAttrib3fvNV (will be remapped) */
"ip\0"
"glVertexAttrib3fvNV\0"
"\0"
- /* _mesa_function_pool[24607]: Rotatef (offset 300) */
+ /* _mesa_function_pool[24736]: Rotatef (offset 300) */
"ffff\0"
"glRotatef\0"
"\0"
- /* _mesa_function_pool[24623]: GetFinalCombinerInputParameterivNV (will be remapped) */
+ /* _mesa_function_pool[24752]: GetFinalCombinerInputParameterivNV (will be remapped) */
"iip\0"
"glGetFinalCombinerInputParameterivNV\0"
"\0"
- /* _mesa_function_pool[24665]: Vertex3i (offset 138) */
+ /* _mesa_function_pool[24794]: Vertex3i (offset 138) */
"iii\0"
"glVertex3i\0"
"\0"
- /* _mesa_function_pool[24681]: Vertex3f (offset 136) */
+ /* _mesa_function_pool[24810]: Vertex3f (offset 136) */
"fff\0"
"glVertex3f\0"
"\0"
- /* _mesa_function_pool[24697]: Clear (offset 203) */
+ /* _mesa_function_pool[24826]: Clear (offset 203) */
"i\0"
"glClear\0"
"\0"
- /* _mesa_function_pool[24708]: Vertex3d (offset 134) */
+ /* _mesa_function_pool[24837]: Vertex3d (offset 134) */
"ddd\0"
"glVertex3d\0"
"\0"
- /* _mesa_function_pool[24724]: GetMapParameterivNV (dynamic) */
+ /* _mesa_function_pool[24853]: GetMapParameterivNV (dynamic) */
"iip\0"
"glGetMapParameterivNV\0"
"\0"
- /* _mesa_function_pool[24751]: Uniform4iARB (will be remapped) */
+ /* _mesa_function_pool[24880]: Uniform4iARB (will be remapped) */
"iiiii\0"
"glUniform4i\0"
"glUniform4iARB\0"
"\0"
- /* _mesa_function_pool[24785]: ReadBuffer (offset 254) */
+ /* _mesa_function_pool[24914]: ReadBuffer (offset 254) */
"i\0"
"glReadBuffer\0"
"\0"
- /* _mesa_function_pool[24801]: ConvolutionParameteri (offset 352) */
+ /* _mesa_function_pool[24930]: ConvolutionParameteri (offset 352) */
"iii\0"
"glConvolutionParameteri\0"
"glConvolutionParameteriEXT\0"
"\0"
- /* _mesa_function_pool[24857]: Ortho (offset 296) */
+ /* _mesa_function_pool[24986]: Ortho (offset 296) */
"dddddd\0"
"glOrtho\0"
"\0"
- /* _mesa_function_pool[24873]: Binormal3sEXT (dynamic) */
+ /* _mesa_function_pool[25002]: Binormal3sEXT (dynamic) */
"iii\0"
"glBinormal3sEXT\0"
"\0"
- /* _mesa_function_pool[24894]: ListBase (offset 6) */
+ /* _mesa_function_pool[25023]: ListBase (offset 6) */
"i\0"
"glListBase\0"
"\0"
- /* _mesa_function_pool[24908]: Vertex3s (offset 140) */
+ /* _mesa_function_pool[25037]: Vertex3s (offset 140) */
"iii\0"
"glVertex3s\0"
"\0"
- /* _mesa_function_pool[24924]: ConvolutionParameterf (offset 350) */
+ /* _mesa_function_pool[25053]: ConvolutionParameterf (offset 350) */
"iif\0"
"glConvolutionParameterf\0"
"glConvolutionParameterfEXT\0"
"\0"
- /* _mesa_function_pool[24980]: GetColorTableParameteriv (offset 345) */
+ /* _mesa_function_pool[25109]: GetColorTableParameteriv (offset 345) */
"iip\0"
"glGetColorTableParameteriv\0"
"glGetColorTableParameterivSGI\0"
"glGetColorTableParameterivEXT\0"
"\0"
- /* _mesa_function_pool[25072]: ProgramEnvParameter4dvARB (will be remapped) */
+ /* _mesa_function_pool[25201]: ProgramEnvParameter4dvARB (will be remapped) */
"iip\0"
"glProgramEnvParameter4dvARB\0"
"glProgramParameter4dvNV\0"
"\0"
- /* _mesa_function_pool[25129]: ShadeModel (offset 177) */
+ /* _mesa_function_pool[25258]: ShadeModel (offset 177) */
"i\0"
"glShadeModel\0"
"\0"
- /* _mesa_function_pool[25145]: VertexAttribs2fvNV (will be remapped) */
+ /* _mesa_function_pool[25274]: VertexAttribs2fvNV (will be remapped) */
"iip\0"
"glVertexAttribs2fvNV\0"
"\0"
- /* _mesa_function_pool[25171]: Rectiv (offset 91) */
+ /* _mesa_function_pool[25300]: Rectiv (offset 91) */
"pp\0"
"glRectiv\0"
"\0"
- /* _mesa_function_pool[25184]: UseProgramObjectARB (will be remapped) */
+ /* _mesa_function_pool[25313]: UseProgramObjectARB (will be remapped) */
"i\0"
"glUseProgram\0"
"glUseProgramObjectARB\0"
"\0"
- /* _mesa_function_pool[25222]: GetMapParameterfvNV (dynamic) */
+ /* _mesa_function_pool[25351]: GetMapParameterfvNV (dynamic) */
"iip\0"
"glGetMapParameterfvNV\0"
"\0"
- /* _mesa_function_pool[25249]: EndConditionalRenderNV (will be remapped) */
+ /* _mesa_function_pool[25378]: EndConditionalRenderNV (will be remapped) */
"\0"
"glEndConditionalRenderNV\0"
"glEndConditionalRender\0"
"\0"
- /* _mesa_function_pool[25299]: PassTexCoordATI (will be remapped) */
+ /* _mesa_function_pool[25428]: PassTexCoordATI (will be remapped) */
"iii\0"
"glPassTexCoordATI\0"
"\0"
- /* _mesa_function_pool[25322]: DeleteProgram (will be remapped) */
+ /* _mesa_function_pool[25451]: DeleteProgram (will be remapped) */
"i\0"
"glDeleteProgram\0"
"\0"
- /* _mesa_function_pool[25341]: Tangent3ivEXT (dynamic) */
+ /* _mesa_function_pool[25470]: Tangent3ivEXT (dynamic) */
"p\0"
"glTangent3ivEXT\0"
"\0"
- /* _mesa_function_pool[25360]: Tangent3dEXT (dynamic) */
+ /* _mesa_function_pool[25489]: Tangent3dEXT (dynamic) */
"ddd\0"
"glTangent3dEXT\0"
"\0"
- /* _mesa_function_pool[25380]: SecondaryColor3dvEXT (will be remapped) */
+ /* _mesa_function_pool[25509]: SecondaryColor3dvEXT (will be remapped) */
"p\0"
"glSecondaryColor3dv\0"
"glSecondaryColor3dvEXT\0"
"\0"
- /* _mesa_function_pool[25426]: Vertex2fv (offset 129) */
+ /* _mesa_function_pool[25555]: AlphaFragmentOp2ATI (will be remapped) */
+ "iiiiiiiii\0"
+ "glAlphaFragmentOp2ATI\0"
+ "\0"
+ /* _mesa_function_pool[25588]: Vertex2fv (offset 129) */
"p\0"
"glVertex2fv\0"
"\0"
- /* _mesa_function_pool[25441]: MultiDrawArraysEXT (will be remapped) */
+ /* _mesa_function_pool[25603]: MultiDrawArraysEXT (will be remapped) */
"ippi\0"
"glMultiDrawArrays\0"
"glMultiDrawArraysEXT\0"
"\0"
- /* _mesa_function_pool[25486]: BindRenderbufferEXT (will be remapped) */
+ /* _mesa_function_pool[25648]: BindRenderbufferEXT (will be remapped) */
"ii\0"
"glBindRenderbuffer\0"
"glBindRenderbufferEXT\0"
"\0"
- /* _mesa_function_pool[25531]: MultiTexCoord4dARB (offset 400) */
+ /* _mesa_function_pool[25693]: MultiTexCoord4dARB (offset 400) */
"idddd\0"
"glMultiTexCoord4d\0"
"glMultiTexCoord4dARB\0"
"\0"
- /* _mesa_function_pool[25577]: FramebufferTextureFaceARB (will be remapped) */
+ /* _mesa_function_pool[25739]: FramebufferTextureFaceARB (will be remapped) */
"iiiii\0"
"glFramebufferTextureFaceARB\0"
"\0"
- /* _mesa_function_pool[25612]: Vertex3sv (offset 141) */
+ /* _mesa_function_pool[25774]: Vertex3sv (offset 141) */
"p\0"
"glVertex3sv\0"
"\0"
- /* _mesa_function_pool[25627]: SecondaryColor3usEXT (will be remapped) */
+ /* _mesa_function_pool[25789]: SecondaryColor3usEXT (will be remapped) */
"iii\0"
"glSecondaryColor3us\0"
"glSecondaryColor3usEXT\0"
"\0"
- /* _mesa_function_pool[25675]: ProgramLocalParameter4fvARB (will be remapped) */
+ /* _mesa_function_pool[25837]: ProgramLocalParameter4fvARB (will be remapped) */
"iip\0"
"glProgramLocalParameter4fvARB\0"
"\0"
- /* _mesa_function_pool[25710]: DeleteProgramsNV (will be remapped) */
+ /* _mesa_function_pool[25872]: DeleteProgramsNV (will be remapped) */
"ip\0"
"glDeleteProgramsARB\0"
"glDeleteProgramsNV\0"
"\0"
- /* _mesa_function_pool[25753]: EvalMesh1 (offset 236) */
+ /* _mesa_function_pool[25915]: EvalMesh1 (offset 236) */
"iii\0"
"glEvalMesh1\0"
"\0"
- /* _mesa_function_pool[25770]: PauseTransformFeedback (will be remapped) */
+ /* _mesa_function_pool[25932]: PauseTransformFeedback (will be remapped) */
"\0"
"glPauseTransformFeedback\0"
"\0"
- /* _mesa_function_pool[25797]: MultiTexCoord1sARB (offset 382) */
+ /* _mesa_function_pool[25959]: MultiTexCoord1sARB (offset 382) */
"ii\0"
"glMultiTexCoord1s\0"
"glMultiTexCoord1sARB\0"
"\0"
- /* _mesa_function_pool[25840]: ReplacementCodeuiColor3fVertex3fSUN (dynamic) */
+ /* _mesa_function_pool[26002]: ReplacementCodeuiColor3fVertex3fSUN (dynamic) */
"iffffff\0"
"glReplacementCodeuiColor3fVertex3fSUN\0"
"\0"
- /* _mesa_function_pool[25887]: GetVertexAttribPointervNV (will be remapped) */
+ /* _mesa_function_pool[26049]: GetVertexAttribPointervNV (will be remapped) */
"iip\0"
"glGetVertexAttribPointerv\0"
"glGetVertexAttribPointervARB\0"
"glGetVertexAttribPointervNV\0"
"\0"
- /* _mesa_function_pool[25975]: VertexAttribs1fvNV (will be remapped) */
+ /* _mesa_function_pool[26137]: VertexAttribs1fvNV (will be remapped) */
"iip\0"
"glVertexAttribs1fvNV\0"
"\0"
- /* _mesa_function_pool[26001]: MultiTexCoord1dvARB (offset 377) */
+ /* _mesa_function_pool[26163]: MultiTexCoord1dvARB (offset 377) */
"ip\0"
"glMultiTexCoord1dv\0"
"glMultiTexCoord1dvARB\0"
"\0"
- /* _mesa_function_pool[26046]: Uniform2iARB (will be remapped) */
+ /* _mesa_function_pool[26208]: Uniform2iARB (will be remapped) */
"iii\0"
"glUniform2i\0"
"glUniform2iARB\0"
"\0"
- /* _mesa_function_pool[26078]: Vertex2iv (offset 131) */
+ /* _mesa_function_pool[26240]: Vertex2iv (offset 131) */
"p\0"
"glVertex2iv\0"
"\0"
- /* _mesa_function_pool[26093]: GetProgramStringNV (will be remapped) */
+ /* _mesa_function_pool[26255]: GetProgramStringNV (will be remapped) */
"iip\0"
"glGetProgramStringNV\0"
"\0"
- /* _mesa_function_pool[26119]: ColorPointerEXT (will be remapped) */
+ /* _mesa_function_pool[26281]: ColorPointerEXT (will be remapped) */
"iiiip\0"
"glColorPointerEXT\0"
"\0"
- /* _mesa_function_pool[26144]: LineWidth (offset 168) */
+ /* _mesa_function_pool[26306]: LineWidth (offset 168) */
"f\0"
"glLineWidth\0"
"\0"
- /* _mesa_function_pool[26159]: MapBufferARB (will be remapped) */
+ /* _mesa_function_pool[26321]: MapBufferARB (will be remapped) */
"ii\0"
"glMapBuffer\0"
"glMapBufferARB\0"
"\0"
- /* _mesa_function_pool[26190]: MultiDrawElementsBaseVertex (will be remapped) */
+ /* _mesa_function_pool[26352]: MultiDrawElementsBaseVertex (will be remapped) */
"ipipip\0"
"glMultiDrawElementsBaseVertex\0"
"\0"
- /* _mesa_function_pool[26228]: TexParameterIuivEXT (will be remapped) */
+ /* _mesa_function_pool[26390]: TexParameterIuivEXT (will be remapped) */
"iip\0"
"glTexParameterIuivEXT\0"
"glTexParameterIuiv\0"
"\0"
- /* _mesa_function_pool[26274]: Binormal3svEXT (dynamic) */
+ /* _mesa_function_pool[26436]: Binormal3svEXT (dynamic) */
"p\0"
"glBinormal3svEXT\0"
"\0"
- /* _mesa_function_pool[26294]: ApplyTextureEXT (dynamic) */
+ /* _mesa_function_pool[26456]: ApplyTextureEXT (dynamic) */
"i\0"
"glApplyTextureEXT\0"
"\0"
- /* _mesa_function_pool[26315]: GetBufferParameteri64v (will be remapped) */
+ /* _mesa_function_pool[26477]: GetBufferParameteri64v (will be remapped) */
"iip\0"
"glGetBufferParameteri64v\0"
"\0"
- /* _mesa_function_pool[26345]: TexGendv (offset 189) */
+ /* _mesa_function_pool[26507]: TexGendv (offset 189) */
"iip\0"
"glTexGendv\0"
"\0"
- /* _mesa_function_pool[26361]: VertexAttribI3iEXT (will be remapped) */
+ /* _mesa_function_pool[26523]: VertexAttribI3iEXT (will be remapped) */
"iiii\0"
"glVertexAttribI3iEXT\0"
"glVertexAttribI3i\0"
"\0"
- /* _mesa_function_pool[26406]: EnableIndexedEXT (will be remapped) */
+ /* _mesa_function_pool[26568]: EnableIndexedEXT (will be remapped) */
"ii\0"
"glEnableIndexedEXT\0"
"glEnablei\0"
"\0"
- /* _mesa_function_pool[26439]: TextureMaterialEXT (dynamic) */
+ /* _mesa_function_pool[26601]: TextureMaterialEXT (dynamic) */
"ii\0"
"glTextureMaterialEXT\0"
"\0"
- /* _mesa_function_pool[26464]: TextureLightEXT (dynamic) */
+ /* _mesa_function_pool[26626]: TextureLightEXT (dynamic) */
"i\0"
"glTextureLightEXT\0"
"\0"
- /* _mesa_function_pool[26485]: ResetMinmax (offset 370) */
+ /* _mesa_function_pool[26647]: ResetMinmax (offset 370) */
"i\0"
"glResetMinmax\0"
"glResetMinmaxEXT\0"
"\0"
- /* _mesa_function_pool[26519]: SpriteParameterfSGIX (dynamic) */
+ /* _mesa_function_pool[26681]: SpriteParameterfSGIX (dynamic) */
"if\0"
"glSpriteParameterfSGIX\0"
"\0"
- /* _mesa_function_pool[26546]: EnableClientState (offset 313) */
+ /* _mesa_function_pool[26708]: EnableClientState (offset 313) */
"i\0"
"glEnableClientState\0"
"\0"
- /* _mesa_function_pool[26569]: VertexAttrib4sNV (will be remapped) */
+ /* _mesa_function_pool[26731]: VertexAttrib4sNV (will be remapped) */
"iiiii\0"
"glVertexAttrib4sNV\0"
"\0"
- /* _mesa_function_pool[26595]: GetConvolutionParameterfv (offset 357) */
+ /* _mesa_function_pool[26757]: GetConvolutionParameterfv (offset 357) */
"iip\0"
"glGetConvolutionParameterfv\0"
"glGetConvolutionParameterfvEXT\0"
"\0"
- /* _mesa_function_pool[26659]: VertexAttribs4dvNV (will be remapped) */
+ /* _mesa_function_pool[26821]: VertexAttribs4dvNV (will be remapped) */
"iip\0"
"glVertexAttribs4dvNV\0"
"\0"
- /* _mesa_function_pool[26685]: VertexAttrib4dARB (will be remapped) */
+ /* _mesa_function_pool[26847]: MultiModeDrawArraysIBM (will be remapped) */
+ "pppii\0"
+ "glMultiModeDrawArraysIBM\0"
+ "\0"
+ /* _mesa_function_pool[26879]: VertexAttrib4dARB (will be remapped) */
"idddd\0"
"glVertexAttrib4d\0"
"glVertexAttrib4dARB\0"
"\0"
- /* _mesa_function_pool[26729]: GetTexBumpParameterfvATI (will be remapped) */
+ /* _mesa_function_pool[26923]: GetTexBumpParameterfvATI (will be remapped) */
"ip\0"
"glGetTexBumpParameterfvATI\0"
"\0"
- /* _mesa_function_pool[26760]: ProgramNamedParameter4dNV (will be remapped) */
+ /* _mesa_function_pool[26954]: ProgramNamedParameter4dNV (will be remapped) */
"iipdddd\0"
"glProgramNamedParameter4dNV\0"
"\0"
- /* _mesa_function_pool[26797]: GetMaterialfv (offset 269) */
+ /* _mesa_function_pool[26991]: GetMaterialfv (offset 269) */
"iip\0"
"glGetMaterialfv\0"
"\0"
- /* _mesa_function_pool[26818]: VertexWeightfEXT (dynamic) */
+ /* _mesa_function_pool[27012]: VertexWeightfEXT (dynamic) */
"f\0"
"glVertexWeightfEXT\0"
"\0"
- /* _mesa_function_pool[26840]: Binormal3fEXT (dynamic) */
+ /* _mesa_function_pool[27034]: SetFragmentShaderConstantATI (will be remapped) */
+ "ip\0"
+ "glSetFragmentShaderConstantATI\0"
+ "\0"
+ /* _mesa_function_pool[27069]: Binormal3fEXT (dynamic) */
"fff\0"
"glBinormal3fEXT\0"
"\0"
- /* _mesa_function_pool[26861]: CallList (offset 2) */
+ /* _mesa_function_pool[27090]: CallList (offset 2) */
"i\0"
"glCallList\0"
"\0"
- /* _mesa_function_pool[26875]: Materialfv (offset 170) */
+ /* _mesa_function_pool[27104]: Materialfv (offset 170) */
"iip\0"
"glMaterialfv\0"
"\0"
- /* _mesa_function_pool[26893]: TexCoord3fv (offset 113) */
+ /* _mesa_function_pool[27122]: TexCoord3fv (offset 113) */
"p\0"
"glTexCoord3fv\0"
"\0"
- /* _mesa_function_pool[26910]: FogCoordfvEXT (will be remapped) */
+ /* _mesa_function_pool[27139]: FogCoordfvEXT (will be remapped) */
"p\0"
"glFogCoordfv\0"
"glFogCoordfvEXT\0"
"\0"
- /* _mesa_function_pool[26942]: MultiTexCoord1ivARB (offset 381) */
+ /* _mesa_function_pool[27171]: MultiTexCoord1ivARB (offset 381) */
"ip\0"
"glMultiTexCoord1iv\0"
"glMultiTexCoord1ivARB\0"
"\0"
- /* _mesa_function_pool[26987]: SecondaryColor3ubEXT (will be remapped) */
+ /* _mesa_function_pool[27216]: SecondaryColor3ubEXT (will be remapped) */
"iii\0"
"glSecondaryColor3ub\0"
"glSecondaryColor3ubEXT\0"
"\0"
- /* _mesa_function_pool[27035]: MultiTexCoord2ivARB (offset 389) */
+ /* _mesa_function_pool[27264]: MultiTexCoord2ivARB (offset 389) */
"ip\0"
"glMultiTexCoord2iv\0"
"glMultiTexCoord2ivARB\0"
"\0"
- /* _mesa_function_pool[27080]: FogFuncSGIS (dynamic) */
+ /* _mesa_function_pool[27309]: FogFuncSGIS (dynamic) */
"ip\0"
"glFogFuncSGIS\0"
"\0"
- /* _mesa_function_pool[27098]: CopyTexSubImage2D (offset 326) */
+ /* _mesa_function_pool[27327]: CopyTexSubImage2D (offset 326) */
"iiiiiiii\0"
"glCopyTexSubImage2D\0"
"glCopyTexSubImage2DEXT\0"
"\0"
- /* _mesa_function_pool[27151]: GetObjectParameterivARB (will be remapped) */
+ /* _mesa_function_pool[27380]: GetObjectParameterivARB (will be remapped) */
"iip\0"
"glGetObjectParameterivARB\0"
"\0"
- /* _mesa_function_pool[27182]: Color3iv (offset 16) */
+ /* _mesa_function_pool[27411]: Color3iv (offset 16) */
"p\0"
"glColor3iv\0"
"\0"
- /* _mesa_function_pool[27196]: TexCoord4fVertex4fSUN (dynamic) */
+ /* _mesa_function_pool[27425]: TexCoord4fVertex4fSUN (dynamic) */
"ffffffff\0"
"glTexCoord4fVertex4fSUN\0"
"\0"
- /* _mesa_function_pool[27230]: DrawElements (offset 311) */
+ /* _mesa_function_pool[27459]: DrawElements (offset 311) */
"iiip\0"
"glDrawElements\0"
"\0"
- /* _mesa_function_pool[27251]: BindVertexArrayAPPLE (will be remapped) */
+ /* _mesa_function_pool[27480]: BindVertexArrayAPPLE (will be remapped) */
"i\0"
"glBindVertexArrayAPPLE\0"
"\0"
- /* _mesa_function_pool[27277]: GetProgramLocalParameterdvARB (will be remapped) */
+ /* _mesa_function_pool[27506]: GetProgramLocalParameterdvARB (will be remapped) */
"iip\0"
"glGetProgramLocalParameterdvARB\0"
"\0"
- /* _mesa_function_pool[27314]: GetHistogramParameteriv (offset 363) */
+ /* _mesa_function_pool[27543]: GetHistogramParameteriv (offset 363) */
"iip\0"
"glGetHistogramParameteriv\0"
"glGetHistogramParameterivEXT\0"
"\0"
- /* _mesa_function_pool[27374]: MultiTexCoord1iARB (offset 380) */
+ /* _mesa_function_pool[27603]: MultiTexCoord1iARB (offset 380) */
"ii\0"
"glMultiTexCoord1i\0"
"glMultiTexCoord1iARB\0"
"\0"
- /* _mesa_function_pool[27417]: GetConvolutionFilter (offset 356) */
+ /* _mesa_function_pool[27646]: GetConvolutionFilter (offset 356) */
"iiip\0"
"glGetConvolutionFilter\0"
"glGetConvolutionFilterEXT\0"
"\0"
- /* _mesa_function_pool[27472]: GetProgramivARB (will be remapped) */
+ /* _mesa_function_pool[27701]: GetProgramivARB (will be remapped) */
"iip\0"
"glGetProgramivARB\0"
"\0"
- /* _mesa_function_pool[27495]: BlendFuncSeparateEXT (will be remapped) */
+ /* _mesa_function_pool[27724]: BlendFuncSeparateEXT (will be remapped) */
"iiii\0"
"glBlendFuncSeparate\0"
"glBlendFuncSeparateEXT\0"
"glBlendFuncSeparateINGR\0"
"\0"
- /* _mesa_function_pool[27568]: MapBufferRange (will be remapped) */
+ /* _mesa_function_pool[27797]: MapBufferRange (will be remapped) */
"iiii\0"
"glMapBufferRange\0"
"\0"
- /* _mesa_function_pool[27591]: ProgramParameters4dvNV (will be remapped) */
+ /* _mesa_function_pool[27820]: ProgramParameters4dvNV (will be remapped) */
"iiip\0"
"glProgramParameters4dvNV\0"
"\0"
- /* _mesa_function_pool[27622]: TexCoord2fColor3fVertex3fvSUN (dynamic) */
+ /* _mesa_function_pool[27851]: TexCoord2fColor3fVertex3fvSUN (dynamic) */
"ppp\0"
"glTexCoord2fColor3fVertex3fvSUN\0"
"\0"
- /* _mesa_function_pool[27659]: EvalPoint2 (offset 239) */
+ /* _mesa_function_pool[27888]: EvalPoint2 (offset 239) */
"ii\0"
"glEvalPoint2\0"
"\0"
- /* _mesa_function_pool[27676]: Uniform1uivEXT (will be remapped) */
+ /* _mesa_function_pool[27905]: Uniform1uivEXT (will be remapped) */
"iip\0"
"glUniform1uivEXT\0"
"glUniform1uiv\0"
"\0"
- /* _mesa_function_pool[27712]: EvalPoint1 (offset 237) */
+ /* _mesa_function_pool[27941]: EvalPoint1 (offset 237) */
"i\0"
"glEvalPoint1\0"
"\0"
- /* _mesa_function_pool[27728]: Binormal3dvEXT (dynamic) */
+ /* _mesa_function_pool[27957]: Binormal3dvEXT (dynamic) */
"p\0"
"glBinormal3dvEXT\0"
"\0"
- /* _mesa_function_pool[27748]: PopMatrix (offset 297) */
+ /* _mesa_function_pool[27977]: PopMatrix (offset 297) */
"\0"
"glPopMatrix\0"
"\0"
- /* _mesa_function_pool[27762]: FinishFenceNV (will be remapped) */
+ /* _mesa_function_pool[27991]: GetVertexAttribIuivEXT (will be remapped) */
+ "iip\0"
+ "glGetVertexAttribIuivEXT\0"
+ "glGetVertexAttribIuiv\0"
+ "\0"
+ /* _mesa_function_pool[28043]: FinishFenceNV (will be remapped) */
"i\0"
"glFinishFenceNV\0"
"\0"
- /* _mesa_function_pool[27781]: GetFogFuncSGIS (dynamic) */
+ /* _mesa_function_pool[28062]: GetFogFuncSGIS (dynamic) */
"p\0"
"glGetFogFuncSGIS\0"
"\0"
- /* _mesa_function_pool[27801]: GetUniformLocationARB (will be remapped) */
+ /* _mesa_function_pool[28082]: GetUniformLocationARB (will be remapped) */
"ip\0"
"glGetUniformLocation\0"
"glGetUniformLocationARB\0"
"\0"
- /* _mesa_function_pool[27850]: SecondaryColor3fEXT (will be remapped) */
+ /* _mesa_function_pool[28131]: SecondaryColor3fEXT (will be remapped) */
"fff\0"
"glSecondaryColor3f\0"
"glSecondaryColor3fEXT\0"
"\0"
- /* _mesa_function_pool[27896]: GetTexGeniv (offset 280) */
+ /* _mesa_function_pool[28177]: GetTexGeniv (offset 280) */
"iip\0"
"glGetTexGeniv\0"
"\0"
- /* _mesa_function_pool[27915]: CombinerInputNV (will be remapped) */
+ /* _mesa_function_pool[28196]: CombinerInputNV (will be remapped) */
"iiiiii\0"
"glCombinerInputNV\0"
"\0"
- /* _mesa_function_pool[27941]: VertexAttrib3sARB (will be remapped) */
+ /* _mesa_function_pool[28222]: VertexAttrib3sARB (will be remapped) */
"iiii\0"
"glVertexAttrib3s\0"
"glVertexAttrib3sARB\0"
"\0"
- /* _mesa_function_pool[27984]: IsTransformFeedback (will be remapped) */
+ /* _mesa_function_pool[28265]: IsTransformFeedback (will be remapped) */
"i\0"
"glIsTransformFeedback\0"
"\0"
- /* _mesa_function_pool[28009]: ReplacementCodeuiNormal3fVertex3fvSUN (dynamic) */
+ /* _mesa_function_pool[28290]: ReplacementCodeuiNormal3fVertex3fvSUN (dynamic) */
"ppp\0"
"glReplacementCodeuiNormal3fVertex3fvSUN\0"
"\0"
- /* _mesa_function_pool[28054]: Map2d (offset 222) */
+ /* _mesa_function_pool[28335]: Map2d (offset 222) */
"iddiiddiip\0"
"glMap2d\0"
"\0"
- /* _mesa_function_pool[28074]: Map2f (offset 223) */
+ /* _mesa_function_pool[28355]: Map2f (offset 223) */
"iffiiffiip\0"
"glMap2f\0"
"\0"
- /* _mesa_function_pool[28094]: ProgramStringARB (will be remapped) */
+ /* _mesa_function_pool[28375]: ProgramStringARB (will be remapped) */
"iiip\0"
"glProgramStringARB\0"
"\0"
- /* _mesa_function_pool[28119]: Vertex4s (offset 148) */
+ /* _mesa_function_pool[28400]: Vertex4s (offset 148) */
"iiii\0"
"glVertex4s\0"
"\0"
- /* _mesa_function_pool[28136]: TexCoord4fVertex4fvSUN (dynamic) */
+ /* _mesa_function_pool[28417]: TexCoord4fVertex4fvSUN (dynamic) */
"pp\0"
"glTexCoord4fVertex4fvSUN\0"
"\0"
- /* _mesa_function_pool[28165]: FragmentLightModelivSGIX (dynamic) */
+ /* _mesa_function_pool[28446]: FragmentLightModelivSGIX (dynamic) */
"ip\0"
"glFragmentLightModelivSGIX\0"
"\0"
- /* _mesa_function_pool[28196]: VertexAttrib1fNV (will be remapped) */
+ /* _mesa_function_pool[28477]: VertexAttrib1fNV (will be remapped) */
"if\0"
"glVertexAttrib1fNV\0"
"\0"
- /* _mesa_function_pool[28219]: Vertex4f (offset 144) */
+ /* _mesa_function_pool[28500]: Vertex4f (offset 144) */
"ffff\0"
"glVertex4f\0"
"\0"
- /* _mesa_function_pool[28236]: EvalCoord1d (offset 228) */
+ /* _mesa_function_pool[28517]: EvalCoord1d (offset 228) */
"d\0"
"glEvalCoord1d\0"
"\0"
- /* _mesa_function_pool[28253]: Vertex4d (offset 142) */
+ /* _mesa_function_pool[28534]: Vertex4d (offset 142) */
"dddd\0"
"glVertex4d\0"
"\0"
- /* _mesa_function_pool[28270]: RasterPos4dv (offset 79) */
+ /* _mesa_function_pool[28551]: RasterPos4dv (offset 79) */
"p\0"
"glRasterPos4dv\0"
"\0"
- /* _mesa_function_pool[28288]: UseShaderProgramEXT (will be remapped) */
+ /* _mesa_function_pool[28569]: UseShaderProgramEXT (will be remapped) */
"ii\0"
"glUseShaderProgramEXT\0"
"\0"
- /* _mesa_function_pool[28314]: FragmentLightfSGIX (dynamic) */
+ /* _mesa_function_pool[28595]: FragmentLightfSGIX (dynamic) */
"iif\0"
"glFragmentLightfSGIX\0"
"\0"
- /* _mesa_function_pool[28340]: GetCompressedTexImageARB (will be remapped) */
+ /* _mesa_function_pool[28621]: GetCompressedTexImageARB (will be remapped) */
"iip\0"
"glGetCompressedTexImage\0"
"glGetCompressedTexImageARB\0"
"\0"
- /* _mesa_function_pool[28396]: GetTexGenfv (offset 279) */
+ /* _mesa_function_pool[28677]: GetTexGenfv (offset 279) */
"iip\0"
"glGetTexGenfv\0"
"\0"
- /* _mesa_function_pool[28415]: Vertex4i (offset 146) */
+ /* _mesa_function_pool[28696]: Vertex4i (offset 146) */
"iiii\0"
"glVertex4i\0"
"\0"
- /* _mesa_function_pool[28432]: VertexWeightPointerEXT (dynamic) */
+ /* _mesa_function_pool[28713]: VertexWeightPointerEXT (dynamic) */
"iiip\0"
"glVertexWeightPointerEXT\0"
"\0"
- /* _mesa_function_pool[28463]: GetHistogram (offset 361) */
+ /* _mesa_function_pool[28744]: GetHistogram (offset 361) */
"iiiip\0"
"glGetHistogram\0"
"glGetHistogramEXT\0"
"\0"
- /* _mesa_function_pool[28503]: ActiveStencilFaceEXT (will be remapped) */
+ /* _mesa_function_pool[28784]: ActiveStencilFaceEXT (will be remapped) */
"i\0"
"glActiveStencilFaceEXT\0"
"\0"
- /* _mesa_function_pool[28529]: StencilFuncSeparateATI (will be remapped) */
+ /* _mesa_function_pool[28810]: StencilFuncSeparateATI (will be remapped) */
"iiii\0"
"glStencilFuncSeparateATI\0"
"\0"
- /* _mesa_function_pool[28560]: Materialf (offset 169) */
+ /* _mesa_function_pool[28841]: Materialf (offset 169) */
"iif\0"
"glMaterialf\0"
"\0"
- /* _mesa_function_pool[28577]: GetShaderSourceARB (will be remapped) */
+ /* _mesa_function_pool[28858]: GetShaderSourceARB (will be remapped) */
"iipp\0"
"glGetShaderSource\0"
"glGetShaderSourceARB\0"
"\0"
- /* _mesa_function_pool[28622]: IglooInterfaceSGIX (dynamic) */
+ /* _mesa_function_pool[28903]: IglooInterfaceSGIX (dynamic) */
"ip\0"
"glIglooInterfaceSGIX\0"
"\0"
- /* _mesa_function_pool[28647]: Materiali (offset 171) */
+ /* _mesa_function_pool[28928]: Materiali (offset 171) */
"iii\0"
"glMateriali\0"
"\0"
- /* _mesa_function_pool[28664]: VertexAttrib4dNV (will be remapped) */
+ /* _mesa_function_pool[28945]: VertexAttrib4dNV (will be remapped) */
"idddd\0"
"glVertexAttrib4dNV\0"
"\0"
- /* _mesa_function_pool[28690]: MultiModeDrawElementsIBM (will be remapped) */
+ /* _mesa_function_pool[28971]: MultiModeDrawElementsIBM (will be remapped) */
"ppipii\0"
"glMultiModeDrawElementsIBM\0"
"\0"
- /* _mesa_function_pool[28725]: Indexsv (offset 51) */
+ /* _mesa_function_pool[29006]: Indexsv (offset 51) */
"p\0"
"glIndexsv\0"
"\0"
- /* _mesa_function_pool[28738]: MultiTexCoord4svARB (offset 407) */
+ /* _mesa_function_pool[29019]: MultiTexCoord4svARB (offset 407) */
"ip\0"
"glMultiTexCoord4sv\0"
"glMultiTexCoord4svARB\0"
"\0"
- /* _mesa_function_pool[28783]: LightModelfv (offset 164) */
+ /* _mesa_function_pool[29064]: LightModelfv (offset 164) */
"ip\0"
"glLightModelfv\0"
"\0"
- /* _mesa_function_pool[28802]: TexCoord2dv (offset 103) */
+ /* _mesa_function_pool[29083]: TexCoord2dv (offset 103) */
"p\0"
"glTexCoord2dv\0"
"\0"
- /* _mesa_function_pool[28819]: GenQueriesARB (will be remapped) */
+ /* _mesa_function_pool[29100]: GenQueriesARB (will be remapped) */
"ip\0"
"glGenQueries\0"
"glGenQueriesARB\0"
"\0"
- /* _mesa_function_pool[28852]: EvalCoord1dv (offset 229) */
+ /* _mesa_function_pool[29133]: EvalCoord1dv (offset 229) */
"p\0"
"glEvalCoord1dv\0"
"\0"
- /* _mesa_function_pool[28870]: ReplacementCodeuiVertex3fSUN (dynamic) */
+ /* _mesa_function_pool[29151]: ReplacementCodeuiVertex3fSUN (dynamic) */
"ifff\0"
"glReplacementCodeuiVertex3fSUN\0"
"\0"
- /* _mesa_function_pool[28907]: Translated (offset 303) */
+ /* _mesa_function_pool[29188]: Translated (offset 303) */
"ddd\0"
"glTranslated\0"
"\0"
- /* _mesa_function_pool[28925]: Translatef (offset 304) */
+ /* _mesa_function_pool[29206]: Translatef (offset 304) */
"fff\0"
"glTranslatef\0"
"\0"
- /* _mesa_function_pool[28943]: Uniform3uiEXT (will be remapped) */
+ /* _mesa_function_pool[29224]: Uniform3uiEXT (will be remapped) */
"iiii\0"
"glUniform3uiEXT\0"
"glUniform3ui\0"
"\0"
- /* _mesa_function_pool[28978]: StencilMask (offset 209) */
+ /* _mesa_function_pool[29259]: StencilMask (offset 209) */
"i\0"
"glStencilMask\0"
"\0"
- /* _mesa_function_pool[28995]: Tangent3iEXT (dynamic) */
+ /* _mesa_function_pool[29276]: Tangent3iEXT (dynamic) */
"iii\0"
"glTangent3iEXT\0"
"\0"
- /* _mesa_function_pool[29015]: GetLightiv (offset 265) */
+ /* _mesa_function_pool[29296]: GetLightiv (offset 265) */
"iip\0"
"glGetLightiv\0"
"\0"
- /* _mesa_function_pool[29033]: DrawMeshArraysSUN (dynamic) */
+ /* _mesa_function_pool[29314]: DrawMeshArraysSUN (dynamic) */
"iiii\0"
"glDrawMeshArraysSUN\0"
"\0"
- /* _mesa_function_pool[29059]: IsList (offset 287) */
+ /* _mesa_function_pool[29340]: IsList (offset 287) */
"i\0"
"glIsList\0"
"\0"
- /* _mesa_function_pool[29071]: IsSync (will be remapped) */
+ /* _mesa_function_pool[29352]: IsSync (will be remapped) */
"i\0"
"glIsSync\0"
"\0"
- /* _mesa_function_pool[29083]: RenderMode (offset 196) */
+ /* _mesa_function_pool[29364]: RenderMode (offset 196) */
"i\0"
"glRenderMode\0"
"\0"
- /* _mesa_function_pool[29099]: GetMapControlPointsNV (dynamic) */
+ /* _mesa_function_pool[29380]: GetMapControlPointsNV (dynamic) */
"iiiiiip\0"
"glGetMapControlPointsNV\0"
"\0"
- /* _mesa_function_pool[29132]: DrawBuffersARB (will be remapped) */
+ /* _mesa_function_pool[29413]: DrawBuffersARB (will be remapped) */
"ip\0"
"glDrawBuffers\0"
"glDrawBuffersARB\0"
"glDrawBuffersATI\0"
"\0"
- /* _mesa_function_pool[29184]: ClearBufferiv (will be remapped) */
+ /* _mesa_function_pool[29465]: ClearBufferiv (will be remapped) */
"iip\0"
"glClearBufferiv\0"
"\0"
- /* _mesa_function_pool[29205]: ProgramLocalParameter4fARB (will be remapped) */
+ /* _mesa_function_pool[29486]: ProgramLocalParameter4fARB (will be remapped) */
"iiffff\0"
"glProgramLocalParameter4fARB\0"
"\0"
- /* _mesa_function_pool[29242]: SpriteParameterivSGIX (dynamic) */
+ /* _mesa_function_pool[29523]: SpriteParameterivSGIX (dynamic) */
"ip\0"
"glSpriteParameterivSGIX\0"
"\0"
- /* _mesa_function_pool[29270]: ProvokingVertexEXT (will be remapped) */
+ /* _mesa_function_pool[29551]: ProvokingVertexEXT (will be remapped) */
"i\0"
"glProvokingVertexEXT\0"
"glProvokingVertex\0"
"\0"
- /* _mesa_function_pool[29312]: MultiTexCoord1fARB (offset 378) */
+ /* _mesa_function_pool[29593]: MultiTexCoord1fARB (offset 378) */
"if\0"
"glMultiTexCoord1f\0"
"glMultiTexCoord1fARB\0"
"\0"
- /* _mesa_function_pool[29355]: LoadName (offset 198) */
+ /* _mesa_function_pool[29636]: LoadName (offset 198) */
"i\0"
"glLoadName\0"
"\0"
- /* _mesa_function_pool[29369]: VertexAttribs4ubvNV (will be remapped) */
+ /* _mesa_function_pool[29650]: VertexAttribs4ubvNV (will be remapped) */
"iip\0"
"glVertexAttribs4ubvNV\0"
"\0"
- /* _mesa_function_pool[29396]: WeightsvARB (dynamic) */
+ /* _mesa_function_pool[29677]: WeightsvARB (dynamic) */
"ip\0"
"glWeightsvARB\0"
"\0"
- /* _mesa_function_pool[29414]: Uniform1fvARB (will be remapped) */
+ /* _mesa_function_pool[29695]: Uniform1fvARB (will be remapped) */
"iip\0"
"glUniform1fv\0"
"glUniform1fvARB\0"
"\0"
- /* _mesa_function_pool[29448]: CopyTexSubImage1D (offset 325) */
+ /* _mesa_function_pool[29729]: CopyTexSubImage1D (offset 325) */
"iiiiii\0"
"glCopyTexSubImage1D\0"
"glCopyTexSubImage1DEXT\0"
"\0"
- /* _mesa_function_pool[29499]: CullFace (offset 152) */
+ /* _mesa_function_pool[29780]: CullFace (offset 152) */
"i\0"
"glCullFace\0"
"\0"
- /* _mesa_function_pool[29513]: BindTexture (offset 307) */
+ /* _mesa_function_pool[29794]: BindTexture (offset 307) */
"ii\0"
"glBindTexture\0"
"glBindTextureEXT\0"
"\0"
- /* _mesa_function_pool[29548]: BeginFragmentShaderATI (will be remapped) */
+ /* _mesa_function_pool[29829]: BeginFragmentShaderATI (will be remapped) */
"\0"
"glBeginFragmentShaderATI\0"
"\0"
- /* _mesa_function_pool[29575]: MultiTexCoord4fARB (offset 402) */
+ /* _mesa_function_pool[29856]: MultiTexCoord4fARB (offset 402) */
"iffff\0"
"glMultiTexCoord4f\0"
"glMultiTexCoord4fARB\0"
"\0"
- /* _mesa_function_pool[29621]: VertexAttribs3svNV (will be remapped) */
+ /* _mesa_function_pool[29902]: VertexAttribs3svNV (will be remapped) */
"iip\0"
"glVertexAttribs3svNV\0"
"\0"
- /* _mesa_function_pool[29647]: StencilFunc (offset 243) */
+ /* _mesa_function_pool[29928]: StencilFunc (offset 243) */
"iii\0"
"glStencilFunc\0"
"\0"
- /* _mesa_function_pool[29666]: CopyPixels (offset 255) */
+ /* _mesa_function_pool[29947]: CopyPixels (offset 255) */
"iiiii\0"
"glCopyPixels\0"
"\0"
- /* _mesa_function_pool[29686]: Rectsv (offset 93) */
+ /* _mesa_function_pool[29967]: Rectsv (offset 93) */
"pp\0"
"glRectsv\0"
"\0"
- /* _mesa_function_pool[29699]: ReplacementCodeuivSUN (dynamic) */
+ /* _mesa_function_pool[29980]: ReplacementCodeuivSUN (dynamic) */
"p\0"
"glReplacementCodeuivSUN\0"
"\0"
- /* _mesa_function_pool[29726]: EnableVertexAttribArrayARB (will be remapped) */
+ /* _mesa_function_pool[30007]: EnableVertexAttribArrayARB (will be remapped) */
"i\0"
"glEnableVertexAttribArray\0"
"glEnableVertexAttribArrayARB\0"
"\0"
- /* _mesa_function_pool[29784]: NormalPointervINTEL (dynamic) */
+ /* _mesa_function_pool[30065]: NormalPointervINTEL (dynamic) */
"ip\0"
"glNormalPointervINTEL\0"
"\0"
- /* _mesa_function_pool[29810]: CopyConvolutionFilter2D (offset 355) */
+ /* _mesa_function_pool[30091]: CopyConvolutionFilter2D (offset 355) */
"iiiiii\0"
"glCopyConvolutionFilter2D\0"
"glCopyConvolutionFilter2DEXT\0"
"\0"
- /* _mesa_function_pool[29873]: WindowPos3ivMESA (will be remapped) */
+ /* _mesa_function_pool[30154]: WindowPos3ivMESA (will be remapped) */
"p\0"
"glWindowPos3iv\0"
"glWindowPos3ivARB\0"
"glWindowPos3ivMESA\0"
"\0"
- /* _mesa_function_pool[29928]: CopyBufferSubData (will be remapped) */
+ /* _mesa_function_pool[30209]: CopyBufferSubData (will be remapped) */
"iiiii\0"
"glCopyBufferSubData\0"
"\0"
- /* _mesa_function_pool[29955]: NormalPointer (offset 318) */
+ /* _mesa_function_pool[30236]: NormalPointer (offset 318) */
"iip\0"
"glNormalPointer\0"
"\0"
- /* _mesa_function_pool[29976]: TexParameterfv (offset 179) */
+ /* _mesa_function_pool[30257]: TexParameterfv (offset 179) */
"iip\0"
"glTexParameterfv\0"
"\0"
- /* _mesa_function_pool[29998]: IsBufferARB (will be remapped) */
+ /* _mesa_function_pool[30279]: IsBufferARB (will be remapped) */
"i\0"
"glIsBuffer\0"
"glIsBufferARB\0"
"\0"
- /* _mesa_function_pool[30026]: WindowPos4iMESA (will be remapped) */
+ /* _mesa_function_pool[30307]: WindowPos4iMESA (will be remapped) */
"iiii\0"
"glWindowPos4iMESA\0"
"\0"
- /* _mesa_function_pool[30050]: VertexAttrib4uivARB (will be remapped) */
+ /* _mesa_function_pool[30331]: VertexAttrib4uivARB (will be remapped) */
"ip\0"
"glVertexAttrib4uiv\0"
"glVertexAttrib4uivARB\0"
"\0"
- /* _mesa_function_pool[30095]: Tangent3bvEXT (dynamic) */
+ /* _mesa_function_pool[30376]: Tangent3bvEXT (dynamic) */
"p\0"
"glTangent3bvEXT\0"
"\0"
- /* _mesa_function_pool[30114]: VertexAttribI3uivEXT (will be remapped) */
+ /* _mesa_function_pool[30395]: VertexAttribI3uivEXT (will be remapped) */
"ip\0"
"glVertexAttribI3uivEXT\0"
"glVertexAttribI3uiv\0"
"\0"
- /* _mesa_function_pool[30161]: UniformMatrix3x4fv (will be remapped) */
+ /* _mesa_function_pool[30442]: UniformMatrix3x4fv (will be remapped) */
"iiip\0"
"glUniformMatrix3x4fv\0"
"\0"
- /* _mesa_function_pool[30188]: ClipPlane (offset 150) */
+ /* _mesa_function_pool[30469]: ClipPlane (offset 150) */
"ip\0"
"glClipPlane\0"
"\0"
- /* _mesa_function_pool[30204]: Recti (offset 90) */
+ /* _mesa_function_pool[30485]: Recti (offset 90) */
"iiii\0"
"glRecti\0"
"\0"
- /* _mesa_function_pool[30218]: VertexAttribI3ivEXT (will be remapped) */
+ /* _mesa_function_pool[30499]: VertexAttribI3ivEXT (will be remapped) */
"ip\0"
"glVertexAttribI3ivEXT\0"
"glVertexAttribI3iv\0"
"\0"
- /* _mesa_function_pool[30263]: DrawRangeElementsBaseVertex (will be remapped) */
+ /* _mesa_function_pool[30544]: DrawRangeElementsBaseVertex (will be remapped) */
"iiiiipi\0"
"glDrawRangeElementsBaseVertex\0"
"\0"
- /* _mesa_function_pool[30302]: TexCoordPointervINTEL (dynamic) */
+ /* _mesa_function_pool[30583]: TexCoordPointervINTEL (dynamic) */
"iip\0"
"glTexCoordPointervINTEL\0"
"\0"
- /* _mesa_function_pool[30331]: DeleteBuffersARB (will be remapped) */
+ /* _mesa_function_pool[30612]: DeleteBuffersARB (will be remapped) */
"ip\0"
"glDeleteBuffers\0"
"glDeleteBuffersARB\0"
"\0"
- /* _mesa_function_pool[30370]: PixelTransformParameterfvEXT (dynamic) */
+ /* _mesa_function_pool[30651]: PixelTransformParameterfvEXT (dynamic) */
"iip\0"
"glPixelTransformParameterfvEXT\0"
"\0"
- /* _mesa_function_pool[30406]: PrimitiveRestartNV (will be remapped) */
+ /* _mesa_function_pool[30687]: PrimitiveRestartNV (will be remapped) */
"\0"
"glPrimitiveRestartNV\0"
"\0"
- /* _mesa_function_pool[30429]: WindowPos4fvMESA (will be remapped) */
+ /* _mesa_function_pool[30710]: WindowPos4fvMESA (will be remapped) */
"p\0"
"glWindowPos4fvMESA\0"
"\0"
- /* _mesa_function_pool[30451]: GetPixelMapuiv (offset 272) */
+ /* _mesa_function_pool[30732]: GetPixelMapuiv (offset 272) */
"ip\0"
"glGetPixelMapuiv\0"
"\0"
- /* _mesa_function_pool[30472]: Rectf (offset 88) */
+ /* _mesa_function_pool[30753]: Rectf (offset 88) */
"ffff\0"
"glRectf\0"
"\0"
- /* _mesa_function_pool[30486]: VertexAttrib1sNV (will be remapped) */
+ /* _mesa_function_pool[30767]: VertexAttrib1sNV (will be remapped) */
"ii\0"
"glVertexAttrib1sNV\0"
"\0"
- /* _mesa_function_pool[30509]: Indexfv (offset 47) */
+ /* _mesa_function_pool[30790]: Indexfv (offset 47) */
"p\0"
"glIndexfv\0"
"\0"
- /* _mesa_function_pool[30522]: SecondaryColor3svEXT (will be remapped) */
+ /* _mesa_function_pool[30803]: SecondaryColor3svEXT (will be remapped) */
"p\0"
"glSecondaryColor3sv\0"
"glSecondaryColor3svEXT\0"
"\0"
- /* _mesa_function_pool[30568]: LoadTransposeMatrixfARB (will be remapped) */
+ /* _mesa_function_pool[30849]: LoadTransposeMatrixfARB (will be remapped) */
"p\0"
"glLoadTransposeMatrixf\0"
"glLoadTransposeMatrixfARB\0"
"\0"
- /* _mesa_function_pool[30620]: GetPointerv (offset 329) */
+ /* _mesa_function_pool[30901]: GetPointerv (offset 329) */
"ip\0"
"glGetPointerv\0"
"glGetPointervEXT\0"
"\0"
- /* _mesa_function_pool[30655]: Tangent3bEXT (dynamic) */
+ /* _mesa_function_pool[30936]: Tangent3bEXT (dynamic) */
"iii\0"
"glTangent3bEXT\0"
"\0"
- /* _mesa_function_pool[30675]: CombinerParameterfNV (will be remapped) */
+ /* _mesa_function_pool[30956]: CombinerParameterfNV (will be remapped) */
"if\0"
"glCombinerParameterfNV\0"
"\0"
- /* _mesa_function_pool[30702]: IndexMask (offset 212) */
+ /* _mesa_function_pool[30983]: IndexMask (offset 212) */
"i\0"
"glIndexMask\0"
"\0"
- /* _mesa_function_pool[30717]: BindProgramNV (will be remapped) */
+ /* _mesa_function_pool[30998]: BindProgramNV (will be remapped) */
"ii\0"
"glBindProgramARB\0"
"glBindProgramNV\0"
"\0"
- /* _mesa_function_pool[30754]: VertexAttrib4svARB (will be remapped) */
+ /* _mesa_function_pool[31035]: VertexAttrib4svARB (will be remapped) */
"ip\0"
"glVertexAttrib4sv\0"
"glVertexAttrib4svARB\0"
"\0"
- /* _mesa_function_pool[30797]: GetFloatv (offset 262) */
+ /* _mesa_function_pool[31078]: GetFloatv (offset 262) */
"ip\0"
"glGetFloatv\0"
"\0"
- /* _mesa_function_pool[30813]: CreateDebugObjectMESA (dynamic) */
+ /* _mesa_function_pool[31094]: CreateDebugObjectMESA (dynamic) */
"\0"
"glCreateDebugObjectMESA\0"
"\0"
- /* _mesa_function_pool[30839]: GetShaderiv (will be remapped) */
+ /* _mesa_function_pool[31120]: GetShaderiv (will be remapped) */
"iip\0"
"glGetShaderiv\0"
"\0"
- /* _mesa_function_pool[30858]: ClientWaitSync (will be remapped) */
+ /* _mesa_function_pool[31139]: ClientWaitSync (will be remapped) */
"iii\0"
"glClientWaitSync\0"
"\0"
- /* _mesa_function_pool[30880]: TexCoord4s (offset 124) */
+ /* _mesa_function_pool[31161]: TexCoord4s (offset 124) */
"iiii\0"
"glTexCoord4s\0"
"\0"
- /* _mesa_function_pool[30899]: TexCoord3sv (offset 117) */
+ /* _mesa_function_pool[31180]: TexCoord3sv (offset 117) */
"p\0"
"glTexCoord3sv\0"
"\0"
- /* _mesa_function_pool[30916]: BindFragmentShaderATI (will be remapped) */
+ /* _mesa_function_pool[31197]: BindFragmentShaderATI (will be remapped) */
"i\0"
"glBindFragmentShaderATI\0"
"\0"
- /* _mesa_function_pool[30943]: PopAttrib (offset 218) */
+ /* _mesa_function_pool[31224]: PopAttrib (offset 218) */
"\0"
"glPopAttrib\0"
"\0"
- /* _mesa_function_pool[30957]: Fogfv (offset 154) */
+ /* _mesa_function_pool[31238]: Fogfv (offset 154) */
"ip\0"
"glFogfv\0"
"\0"
- /* _mesa_function_pool[30969]: UnmapBufferARB (will be remapped) */
+ /* _mesa_function_pool[31250]: UnmapBufferARB (will be remapped) */
"i\0"
"glUnmapBuffer\0"
"glUnmapBufferARB\0"
"\0"
- /* _mesa_function_pool[31003]: InitNames (offset 197) */
+ /* _mesa_function_pool[31284]: InitNames (offset 197) */
"\0"
"glInitNames\0"
"\0"
- /* _mesa_function_pool[31017]: Normal3sv (offset 61) */
+ /* _mesa_function_pool[31298]: Normal3sv (offset 61) */
"p\0"
"glNormal3sv\0"
"\0"
- /* _mesa_function_pool[31032]: Minmax (offset 368) */
+ /* _mesa_function_pool[31313]: Minmax (offset 368) */
"iii\0"
"glMinmax\0"
"glMinmaxEXT\0"
"\0"
- /* _mesa_function_pool[31058]: TexCoord4d (offset 118) */
+ /* _mesa_function_pool[31339]: TexCoord4d (offset 118) */
"dddd\0"
"glTexCoord4d\0"
"\0"
- /* _mesa_function_pool[31077]: DeformationMap3dSGIX (dynamic) */
- "iddiiddiiddiip\0"
- "glDeformationMap3dSGIX\0"
- "\0"
- /* _mesa_function_pool[31116]: TexCoord4f (offset 120) */
+ /* _mesa_function_pool[31358]: TexCoord4f (offset 120) */
"ffff\0"
"glTexCoord4f\0"
"\0"
- /* _mesa_function_pool[31135]: FogCoorddvEXT (will be remapped) */
+ /* _mesa_function_pool[31377]: FogCoorddvEXT (will be remapped) */
"p\0"
"glFogCoorddv\0"
"glFogCoorddvEXT\0"
"\0"
- /* _mesa_function_pool[31167]: FinishTextureSUNX (dynamic) */
+ /* _mesa_function_pool[31409]: FinishTextureSUNX (dynamic) */
"\0"
"glFinishTextureSUNX\0"
"\0"
- /* _mesa_function_pool[31189]: GetFragmentLightfvSGIX (dynamic) */
+ /* _mesa_function_pool[31431]: GetFragmentLightfvSGIX (dynamic) */
"iip\0"
"glGetFragmentLightfvSGIX\0"
"\0"
- /* _mesa_function_pool[31219]: Binormal3fvEXT (dynamic) */
+ /* _mesa_function_pool[31461]: Binormal3fvEXT (dynamic) */
"p\0"
"glBinormal3fvEXT\0"
"\0"
- /* _mesa_function_pool[31239]: GetBooleanv (offset 258) */
+ /* _mesa_function_pool[31481]: GetBooleanv (offset 258) */
"ip\0"
"glGetBooleanv\0"
"\0"
- /* _mesa_function_pool[31257]: ColorFragmentOp3ATI (will be remapped) */
+ /* _mesa_function_pool[31499]: ColorFragmentOp3ATI (will be remapped) */
"iiiiiiiiiiiii\0"
"glColorFragmentOp3ATI\0"
"\0"
- /* _mesa_function_pool[31294]: Hint (offset 158) */
+ /* _mesa_function_pool[31536]: Hint (offset 158) */
"ii\0"
"glHint\0"
"\0"
- /* _mesa_function_pool[31305]: Color4dv (offset 28) */
+ /* _mesa_function_pool[31547]: Color4dv (offset 28) */
"p\0"
"glColor4dv\0"
"\0"
- /* _mesa_function_pool[31319]: VertexAttrib2svARB (will be remapped) */
+ /* _mesa_function_pool[31561]: VertexAttrib2svARB (will be remapped) */
"ip\0"
"glVertexAttrib2sv\0"
"glVertexAttrib2svARB\0"
"\0"
- /* _mesa_function_pool[31362]: AreProgramsResidentNV (will be remapped) */
+ /* _mesa_function_pool[31604]: AreProgramsResidentNV (will be remapped) */
"ipp\0"
"glAreProgramsResidentNV\0"
"\0"
- /* _mesa_function_pool[31391]: WindowPos3svMESA (will be remapped) */
+ /* _mesa_function_pool[31633]: WindowPos3svMESA (will be remapped) */
"p\0"
"glWindowPos3sv\0"
"glWindowPos3svARB\0"
"glWindowPos3svMESA\0"
"\0"
- /* _mesa_function_pool[31446]: CopyColorSubTable (offset 347) */
+ /* _mesa_function_pool[31688]: CopyColorSubTable (offset 347) */
"iiiii\0"
"glCopyColorSubTable\0"
"glCopyColorSubTableEXT\0"
"\0"
- /* _mesa_function_pool[31496]: WeightdvARB (dynamic) */
+ /* _mesa_function_pool[31738]: WeightdvARB (dynamic) */
"ip\0"
"glWeightdvARB\0"
"\0"
- /* _mesa_function_pool[31514]: DeleteRenderbuffersEXT (will be remapped) */
+ /* _mesa_function_pool[31756]: DeleteRenderbuffersEXT (will be remapped) */
"ip\0"
"glDeleteRenderbuffers\0"
"glDeleteRenderbuffersEXT\0"
"\0"
- /* _mesa_function_pool[31565]: VertexAttrib4NubvARB (will be remapped) */
+ /* _mesa_function_pool[31807]: VertexAttrib4NubvARB (will be remapped) */
"ip\0"
"glVertexAttrib4Nubv\0"
"glVertexAttrib4NubvARB\0"
"\0"
- /* _mesa_function_pool[31612]: VertexAttrib3dvNV (will be remapped) */
+ /* _mesa_function_pool[31854]: VertexAttrib3dvNV (will be remapped) */
"ip\0"
"glVertexAttrib3dvNV\0"
"\0"
- /* _mesa_function_pool[31636]: GetObjectParameterfvARB (will be remapped) */
+ /* _mesa_function_pool[31878]: GetObjectParameterfvARB (will be remapped) */
"iip\0"
"glGetObjectParameterfvARB\0"
"\0"
- /* _mesa_function_pool[31667]: Vertex4iv (offset 147) */
+ /* _mesa_function_pool[31909]: Vertex4iv (offset 147) */
"p\0"
"glVertex4iv\0"
"\0"
- /* _mesa_function_pool[31682]: GetProgramEnvParameterdvARB (will be remapped) */
+ /* _mesa_function_pool[31924]: GetProgramEnvParameterdvARB (will be remapped) */
"iip\0"
"glGetProgramEnvParameterdvARB\0"
"\0"
- /* _mesa_function_pool[31717]: TexCoord4dv (offset 119) */
+ /* _mesa_function_pool[31959]: TexCoord4dv (offset 119) */
"p\0"
"glTexCoord4dv\0"
"\0"
- /* _mesa_function_pool[31734]: LockArraysEXT (will be remapped) */
+ /* _mesa_function_pool[31976]: LockArraysEXT (will be remapped) */
"ii\0"
"glLockArraysEXT\0"
"\0"
- /* _mesa_function_pool[31754]: Begin (offset 7) */
+ /* _mesa_function_pool[31996]: Begin (offset 7) */
"i\0"
"glBegin\0"
"\0"
- /* _mesa_function_pool[31765]: LightModeli (offset 165) */
+ /* _mesa_function_pool[32007]: LightModeli (offset 165) */
"ii\0"
"glLightModeli\0"
"\0"
- /* _mesa_function_pool[31783]: VertexAttribI4ivEXT (will be remapped) */
+ /* _mesa_function_pool[32025]: VertexAttribI4ivEXT (will be remapped) */
"ip\0"
"glVertexAttribI4ivEXT\0"
"glVertexAttribI4iv\0"
"\0"
- /* _mesa_function_pool[31828]: Rectfv (offset 89) */
+ /* _mesa_function_pool[32070]: Rectfv (offset 89) */
"pp\0"
"glRectfv\0"
"\0"
- /* _mesa_function_pool[31841]: LightModelf (offset 163) */
+ /* _mesa_function_pool[32083]: BlendEquationSeparateiARB (will be remapped) */
+ "iii\0"
+ "glBlendEquationSeparateiARB\0"
+ "\0"
+ /* _mesa_function_pool[32116]: LightModelf (offset 163) */
"if\0"
"glLightModelf\0"
"\0"
- /* _mesa_function_pool[31859]: GetTexParameterfv (offset 282) */
+ /* _mesa_function_pool[32134]: GetTexParameterfv (offset 282) */
"iip\0"
"glGetTexParameterfv\0"
"\0"
- /* _mesa_function_pool[31884]: GetLightfv (offset 264) */
+ /* _mesa_function_pool[32159]: GetLightfv (offset 264) */
"iip\0"
"glGetLightfv\0"
"\0"
- /* _mesa_function_pool[31902]: PixelTransformParameterivEXT (dynamic) */
+ /* _mesa_function_pool[32177]: PixelTransformParameterivEXT (dynamic) */
"iip\0"
"glPixelTransformParameterivEXT\0"
"\0"
- /* _mesa_function_pool[31938]: BinormalPointerEXT (dynamic) */
+ /* _mesa_function_pool[32213]: BinormalPointerEXT (dynamic) */
"iip\0"
"glBinormalPointerEXT\0"
"\0"
- /* _mesa_function_pool[31964]: VertexAttrib1dNV (will be remapped) */
+ /* _mesa_function_pool[32239]: VertexAttrib1dNV (will be remapped) */
"id\0"
"glVertexAttrib1dNV\0"
"\0"
- /* _mesa_function_pool[31987]: GetCombinerInputParameterivNV (will be remapped) */
+ /* _mesa_function_pool[32262]: GetCombinerInputParameterivNV (will be remapped) */
"iiiip\0"
"glGetCombinerInputParameterivNV\0"
"\0"
- /* _mesa_function_pool[32026]: Disable (offset 214) */
+ /* _mesa_function_pool[32301]: Disable (offset 214) */
"i\0"
"glDisable\0"
"\0"
- /* _mesa_function_pool[32039]: MultiTexCoord2fvARB (offset 387) */
+ /* _mesa_function_pool[32314]: MultiTexCoord2fvARB (offset 387) */
"ip\0"
"glMultiTexCoord2fv\0"
"glMultiTexCoord2fvARB\0"
"\0"
- /* _mesa_function_pool[32084]: GetRenderbufferParameterivEXT (will be remapped) */
+ /* _mesa_function_pool[32359]: GetRenderbufferParameterivEXT (will be remapped) */
"iip\0"
"glGetRenderbufferParameteriv\0"
"glGetRenderbufferParameterivEXT\0"
"\0"
- /* _mesa_function_pool[32150]: CombinerParameterivNV (will be remapped) */
+ /* _mesa_function_pool[32425]: CombinerParameterivNV (will be remapped) */
"ip\0"
"glCombinerParameterivNV\0"
"\0"
- /* _mesa_function_pool[32178]: GenFragmentShadersATI (will be remapped) */
+ /* _mesa_function_pool[32453]: GenFragmentShadersATI (will be remapped) */
"i\0"
"glGenFragmentShadersATI\0"
"\0"
- /* _mesa_function_pool[32205]: DrawArrays (offset 310) */
+ /* _mesa_function_pool[32480]: DrawArrays (offset 310) */
"iii\0"
"glDrawArrays\0"
"glDrawArraysEXT\0"
"\0"
- /* _mesa_function_pool[32239]: WeightuivARB (dynamic) */
+ /* _mesa_function_pool[32514]: WeightuivARB (dynamic) */
"ip\0"
"glWeightuivARB\0"
"\0"
- /* _mesa_function_pool[32258]: VertexAttrib2sARB (will be remapped) */
+ /* _mesa_function_pool[32533]: VertexAttrib2sARB (will be remapped) */
"iii\0"
"glVertexAttrib2s\0"
"glVertexAttrib2sARB\0"
"\0"
- /* _mesa_function_pool[32300]: ColorMask (offset 210) */
+ /* _mesa_function_pool[32575]: ColorMask (offset 210) */
"iiii\0"
"glColorMask\0"
"\0"
- /* _mesa_function_pool[32318]: GenAsyncMarkersSGIX (dynamic) */
+ /* _mesa_function_pool[32593]: GenAsyncMarkersSGIX (dynamic) */
"i\0"
"glGenAsyncMarkersSGIX\0"
"\0"
- /* _mesa_function_pool[32343]: Tangent3svEXT (dynamic) */
+ /* _mesa_function_pool[32618]: Tangent3svEXT (dynamic) */
"p\0"
"glTangent3svEXT\0"
"\0"
- /* _mesa_function_pool[32362]: GetListParameterivSGIX (dynamic) */
+ /* _mesa_function_pool[32637]: GetListParameterivSGIX (dynamic) */
"iip\0"
"glGetListParameterivSGIX\0"
"\0"
- /* _mesa_function_pool[32392]: BindBufferARB (will be remapped) */
+ /* _mesa_function_pool[32667]: BindBufferARB (will be remapped) */
"ii\0"
"glBindBuffer\0"
"glBindBufferARB\0"
"\0"
- /* _mesa_function_pool[32425]: GetInfoLogARB (will be remapped) */
+ /* _mesa_function_pool[32700]: GetInfoLogARB (will be remapped) */
"iipp\0"
"glGetInfoLogARB\0"
"\0"
- /* _mesa_function_pool[32447]: RasterPos4iv (offset 83) */
+ /* _mesa_function_pool[32722]: RasterPos4iv (offset 83) */
"p\0"
"glRasterPos4iv\0"
"\0"
- /* _mesa_function_pool[32465]: Enable (offset 215) */
+ /* _mesa_function_pool[32740]: Enable (offset 215) */
"i\0"
"glEnable\0"
"\0"
- /* _mesa_function_pool[32477]: LineStipple (offset 167) */
+ /* _mesa_function_pool[32752]: LineStipple (offset 167) */
"ii\0"
"glLineStipple\0"
"\0"
- /* _mesa_function_pool[32495]: VertexAttribs4svNV (will be remapped) */
+ /* _mesa_function_pool[32770]: VertexAttribs4svNV (will be remapped) */
"iip\0"
"glVertexAttribs4svNV\0"
"\0"
- /* _mesa_function_pool[32521]: EdgeFlagPointerListIBM (dynamic) */
+ /* _mesa_function_pool[32796]: EdgeFlagPointerListIBM (dynamic) */
"ipi\0"
"glEdgeFlagPointerListIBM\0"
"\0"
- /* _mesa_function_pool[32551]: UniformMatrix3x2fv (will be remapped) */
+ /* _mesa_function_pool[32826]: UniformMatrix3x2fv (will be remapped) */
"iiip\0"
"glUniformMatrix3x2fv\0"
"\0"
- /* _mesa_function_pool[32578]: GetMinmaxParameterfv (offset 365) */
+ /* _mesa_function_pool[32853]: GetMinmaxParameterfv (offset 365) */
"iip\0"
"glGetMinmaxParameterfv\0"
"glGetMinmaxParameterfvEXT\0"
"\0"
- /* _mesa_function_pool[32632]: VertexAttrib1fvARB (will be remapped) */
+ /* _mesa_function_pool[32907]: VertexAttrib1fvARB (will be remapped) */
"ip\0"
"glVertexAttrib1fv\0"
"glVertexAttrib1fvARB\0"
"\0"
- /* _mesa_function_pool[32675]: GenBuffersARB (will be remapped) */
+ /* _mesa_function_pool[32950]: GenBuffersARB (will be remapped) */
"ip\0"
"glGenBuffers\0"
"glGenBuffersARB\0"
"\0"
- /* _mesa_function_pool[32708]: VertexAttribs1svNV (will be remapped) */
+ /* _mesa_function_pool[32983]: VertexAttribs1svNV (will be remapped) */
"iip\0"
"glVertexAttribs1svNV\0"
"\0"
- /* _mesa_function_pool[32734]: Vertex3fv (offset 137) */
+ /* _mesa_function_pool[33009]: Vertex3fv (offset 137) */
"p\0"
"glVertex3fv\0"
"\0"
- /* _mesa_function_pool[32749]: GetTexBumpParameterivATI (will be remapped) */
+ /* _mesa_function_pool[33024]: GetTexBumpParameterivATI (will be remapped) */
"ip\0"
"glGetTexBumpParameterivATI\0"
"\0"
- /* _mesa_function_pool[32780]: Binormal3bEXT (dynamic) */
+ /* _mesa_function_pool[33055]: Binormal3bEXT (dynamic) */
"iii\0"
"glBinormal3bEXT\0"
"\0"
- /* _mesa_function_pool[32801]: FragmentMaterialivSGIX (dynamic) */
+ /* _mesa_function_pool[33076]: FragmentMaterialivSGIX (dynamic) */
"iip\0"
"glFragmentMaterialivSGIX\0"
"\0"
- /* _mesa_function_pool[32831]: IsRenderbufferEXT (will be remapped) */
+ /* _mesa_function_pool[33106]: IsRenderbufferEXT (will be remapped) */
"i\0"
"glIsRenderbuffer\0"
"glIsRenderbufferEXT\0"
"\0"
- /* _mesa_function_pool[32871]: GenProgramsNV (will be remapped) */
+ /* _mesa_function_pool[33146]: GenProgramsNV (will be remapped) */
"ip\0"
"glGenProgramsARB\0"
"glGenProgramsNV\0"
"\0"
- /* _mesa_function_pool[32908]: VertexAttrib4dvNV (will be remapped) */
+ /* _mesa_function_pool[33183]: VertexAttrib4dvNV (will be remapped) */
"ip\0"
"glVertexAttrib4dvNV\0"
"\0"
- /* _mesa_function_pool[32932]: EndFragmentShaderATI (will be remapped) */
+ /* _mesa_function_pool[33207]: EndFragmentShaderATI (will be remapped) */
"\0"
"glEndFragmentShaderATI\0"
"\0"
- /* _mesa_function_pool[32957]: Binormal3iEXT (dynamic) */
+ /* _mesa_function_pool[33232]: Binormal3iEXT (dynamic) */
"iii\0"
"glBinormal3iEXT\0"
"\0"
- /* _mesa_function_pool[32978]: WindowPos2fMESA (will be remapped) */
+ /* _mesa_function_pool[33253]: WindowPos2fMESA (will be remapped) */
"ff\0"
"glWindowPos2f\0"
"glWindowPos2fARB\0"
@@ -4739,589 +4783,600 @@ static const char _mesa_function_pool[] =
/* these functions need to be remapped */
static const struct gl_function_pool_remap MESA_remap_table_functions[] = {
- { 1577, AttachShader_remap_index },
- { 9902, CreateProgram_remap_index },
- { 22864, CreateShader_remap_index },
- { 25322, DeleteProgram_remap_index },
- { 18525, DeleteShader_remap_index },
- { 23336, DetachShader_remap_index },
- { 17928, GetAttachedShaders_remap_index },
- { 4869, GetProgramInfoLog_remap_index },
- { 405, GetProgramiv_remap_index },
- { 6542, GetShaderInfoLog_remap_index },
- { 30839, GetShaderiv_remap_index },
- { 13311, IsProgram_remap_index },
- { 12263, IsShader_remap_index },
- { 10006, StencilFuncSeparate_remap_index },
- { 3921, StencilMaskSeparate_remap_index },
- { 7624, StencilOpSeparate_remap_index },
- { 22152, UniformMatrix2x3fv_remap_index },
- { 2847, UniformMatrix2x4fv_remap_index },
- { 32551, UniformMatrix3x2fv_remap_index },
- { 30161, UniformMatrix3x4fv_remap_index },
- { 16226, UniformMatrix4x2fv_remap_index },
- { 3263, UniformMatrix4x3fv_remap_index },
- { 5030, ClampColor_remap_index },
- { 17982, ClearBufferfi_remap_index },
- { 17448, ClearBufferfv_remap_index },
- { 29184, ClearBufferiv_remap_index },
- { 13516, ClearBufferuiv_remap_index },
- { 19808, GetStringi_remap_index },
- { 2788, TexBuffer_remap_index },
- { 938, FramebufferTexture_remap_index },
- { 26315, GetBufferParameteri64v_remap_index },
- { 10106, GetInteger64i_v_remap_index },
- { 23178, VertexAttribDivisor_remap_index },
- { 9920, LoadTransposeMatrixdARB_remap_index },
- { 30568, LoadTransposeMatrixfARB_remap_index },
- { 5608, MultTransposeMatrixdARB_remap_index },
- { 23523, MultTransposeMatrixfARB_remap_index },
- { 216, SampleCoverageARB_remap_index },
- { 5834, CompressedTexImage1DARB_remap_index },
- { 24051, CompressedTexImage2DARB_remap_index },
- { 3984, CompressedTexImage3DARB_remap_index },
- { 18242, CompressedTexSubImage1DARB_remap_index },
- { 2050, CompressedTexSubImage2DARB_remap_index },
- { 20230, CompressedTexSubImage3DARB_remap_index },
- { 28340, GetCompressedTexImageARB_remap_index },
- { 3829, DisableVertexAttribArrayARB_remap_index },
- { 29726, EnableVertexAttribArrayARB_remap_index },
- { 31682, GetProgramEnvParameterdvARB_remap_index },
- { 23403, GetProgramEnvParameterfvARB_remap_index },
- { 27277, GetProgramLocalParameterdvARB_remap_index },
- { 8066, GetProgramLocalParameterfvARB_remap_index },
- { 18376, GetProgramStringARB_remap_index },
- { 27472, GetProgramivARB_remap_index },
- { 20425, GetVertexAttribdvARB_remap_index },
- { 16034, GetVertexAttribfvARB_remap_index },
- { 9765, GetVertexAttribivARB_remap_index },
- { 19289, ProgramEnvParameter4dARB_remap_index },
- { 25072, ProgramEnvParameter4dvARB_remap_index },
- { 16770, ProgramEnvParameter4fARB_remap_index },
- { 8965, ProgramEnvParameter4fvARB_remap_index },
- { 3947, ProgramLocalParameter4dARB_remap_index },
- { 13021, ProgramLocalParameter4dvARB_remap_index },
- { 29205, ProgramLocalParameter4fARB_remap_index },
- { 25675, ProgramLocalParameter4fvARB_remap_index },
- { 28094, ProgramStringARB_remap_index },
- { 19539, VertexAttrib1dARB_remap_index },
- { 15688, VertexAttrib1dvARB_remap_index },
- { 4122, VertexAttrib1fARB_remap_index },
- { 32632, VertexAttrib1fvARB_remap_index },
- { 7150, VertexAttrib1sARB_remap_index },
- { 2224, VertexAttrib1svARB_remap_index },
- { 15119, VertexAttrib2dARB_remap_index },
- { 17469, VertexAttrib2dvARB_remap_index },
- { 1596, VertexAttrib2fARB_remap_index },
- { 17582, VertexAttrib2fvARB_remap_index },
- { 32258, VertexAttrib2sARB_remap_index },
- { 31319, VertexAttrib2svARB_remap_index },
- { 11268, VertexAttrib3dARB_remap_index },
- { 8632, VertexAttrib3dvARB_remap_index },
- { 1683, VertexAttrib3fARB_remap_index },
- { 22415, VertexAttrib3fvARB_remap_index },
- { 27941, VertexAttrib3sARB_remap_index },
- { 20167, VertexAttrib3svARB_remap_index },
- { 4895, VertexAttrib4NbvARB_remap_index },
- { 17805, VertexAttrib4NivARB_remap_index },
- { 22370, VertexAttrib4NsvARB_remap_index },
- { 23355, VertexAttrib4NubARB_remap_index },
- { 31565, VertexAttrib4NubvARB_remap_index },
- { 18950, VertexAttrib4NuivARB_remap_index },
- { 3136, VertexAttrib4NusvARB_remap_index },
- { 10846, VertexAttrib4bvARB_remap_index },
- { 26685, VertexAttrib4dARB_remap_index },
- { 21189, VertexAttrib4dvARB_remap_index },
- { 11422, VertexAttrib4fARB_remap_index },
- { 11826, VertexAttrib4fvARB_remap_index },
- { 10222, VertexAttrib4ivARB_remap_index },
- { 17262, VertexAttrib4sARB_remap_index },
- { 30754, VertexAttrib4svARB_remap_index },
- { 16575, VertexAttrib4ubvARB_remap_index },
- { 30050, VertexAttrib4uivARB_remap_index },
- { 19978, VertexAttrib4usvARB_remap_index },
- { 21967, VertexAttribPointerARB_remap_index },
- { 32392, BindBufferARB_remap_index },
- { 6857, BufferDataARB_remap_index },
- { 1498, BufferSubDataARB_remap_index },
- { 30331, DeleteBuffersARB_remap_index },
- { 32675, GenBuffersARB_remap_index },
- { 17625, GetBufferParameterivARB_remap_index },
- { 16722, GetBufferPointervARB_remap_index },
- { 1451, GetBufferSubDataARB_remap_index },
- { 29998, IsBufferARB_remap_index },
- { 26159, MapBufferARB_remap_index },
- { 30969, UnmapBufferARB_remap_index },
- { 312, BeginQueryARB_remap_index },
- { 19634, DeleteQueriesARB_remap_index },
- { 12153, EndQueryARB_remap_index },
- { 28819, GenQueriesARB_remap_index },
- { 1942, GetQueryObjectivARB_remap_index },
- { 17306, GetQueryObjectuivARB_remap_index },
- { 1740, GetQueryivARB_remap_index },
- { 19885, IsQueryARB_remap_index },
- { 8242, AttachObjectARB_remap_index },
- { 18487, CompileShaderARB_remap_index },
- { 3205, CreateProgramObjectARB_remap_index },
- { 6802, CreateShaderObjectARB_remap_index },
- { 14454, DeleteObjectARB_remap_index },
- { 23842, DetachObjectARB_remap_index },
- { 11898, GetActiveUniformARB_remap_index },
- { 9440, GetAttachedObjectsARB_remap_index },
- { 9747, GetHandleARB_remap_index },
- { 32425, GetInfoLogARB_remap_index },
- { 31636, GetObjectParameterfvARB_remap_index },
- { 27151, GetObjectParameterivARB_remap_index },
- { 28577, GetShaderSourceARB_remap_index },
- { 27801, GetUniformLocationARB_remap_index },
- { 23625, GetUniformfvARB_remap_index },
- { 12596, GetUniformivARB_remap_index },
- { 20023, LinkProgramARB_remap_index },
- { 20081, ShaderSourceARB_remap_index },
- { 7524, Uniform1fARB_remap_index },
- { 29414, Uniform1fvARB_remap_index },
- { 21936, Uniform1iARB_remap_index },
- { 20878, Uniform1ivARB_remap_index },
- { 2173, Uniform2fARB_remap_index },
- { 14290, Uniform2fvARB_remap_index },
- { 26046, Uniform2iARB_remap_index },
- { 2293, Uniform2ivARB_remap_index },
- { 18597, Uniform3fARB_remap_index },
- { 9470, Uniform3fvARB_remap_index },
- { 6396, Uniform3iARB_remap_index },
- { 16828, Uniform3ivARB_remap_index },
- { 19095, Uniform4fARB_remap_index },
- { 23489, Uniform4fvARB_remap_index },
- { 24751, Uniform4iARB_remap_index },
- { 20391, Uniform4ivARB_remap_index },
- { 8294, UniformMatrix2fvARB_remap_index },
+ { 1616, AttachShader_remap_index },
+ { 9893, CreateProgram_remap_index },
+ { 22964, CreateShader_remap_index },
+ { 25451, DeleteProgram_remap_index },
+ { 18608, DeleteShader_remap_index },
+ { 23465, DetachShader_remap_index },
+ { 17974, GetAttachedShaders_remap_index },
+ { 4856, GetProgramInfoLog_remap_index },
+ { 444, GetProgramiv_remap_index },
+ { 6529, GetShaderInfoLog_remap_index },
+ { 31120, GetShaderiv_remap_index },
+ { 13387, IsProgram_remap_index },
+ { 12308, IsShader_remap_index },
+ { 10023, StencilFuncSeparate_remap_index },
+ { 3960, StencilMaskSeparate_remap_index },
+ { 7594, StencilOpSeparate_remap_index },
+ { 22252, UniformMatrix2x3fv_remap_index },
+ { 2886, UniformMatrix2x4fv_remap_index },
+ { 32826, UniformMatrix3x2fv_remap_index },
+ { 30442, UniformMatrix3x4fv_remap_index },
+ { 16264, UniformMatrix4x2fv_remap_index },
+ { 3302, UniformMatrix4x3fv_remap_index },
+ { 5017, ClampColor_remap_index },
+ { 18028, ClearBufferfi_remap_index },
+ { 17470, ClearBufferfv_remap_index },
+ { 29465, ClearBufferiv_remap_index },
+ { 13592, ClearBufferuiv_remap_index },
+ { 19891, GetStringi_remap_index },
+ { 2827, TexBuffer_remap_index },
+ { 977, FramebufferTexture_remap_index },
+ { 26477, GetBufferParameteri64v_remap_index },
+ { 10123, GetInteger64i_v_remap_index },
+ { 23278, VertexAttribDivisor_remap_index },
+ { 9911, LoadTransposeMatrixdARB_remap_index },
+ { 30849, LoadTransposeMatrixfARB_remap_index },
+ { 5637, MultTransposeMatrixdARB_remap_index },
+ { 23652, MultTransposeMatrixfARB_remap_index },
+ { 255, SampleCoverageARB_remap_index },
+ { 5821, CompressedTexImage1DARB_remap_index },
+ { 24180, CompressedTexImage2DARB_remap_index },
+ { 4023, CompressedTexImage3DARB_remap_index },
+ { 18325, CompressedTexSubImage1DARB_remap_index },
+ { 2089, CompressedTexSubImage2DARB_remap_index },
+ { 20313, CompressedTexSubImage3DARB_remap_index },
+ { 28621, GetCompressedTexImageARB_remap_index },
+ { 3868, DisableVertexAttribArrayARB_remap_index },
+ { 30007, EnableVertexAttribArrayARB_remap_index },
+ { 31924, GetProgramEnvParameterdvARB_remap_index },
+ { 23532, GetProgramEnvParameterfvARB_remap_index },
+ { 27506, GetProgramLocalParameterdvARB_remap_index },
+ { 8036, GetProgramLocalParameterfvARB_remap_index },
+ { 18459, GetProgramStringARB_remap_index },
+ { 27701, GetProgramivARB_remap_index },
+ { 20508, GetVertexAttribdvARB_remap_index },
+ { 16072, GetVertexAttribfvARB_remap_index },
+ { 9735, GetVertexAttribivARB_remap_index },
+ { 19372, ProgramEnvParameter4dARB_remap_index },
+ { 25201, ProgramEnvParameter4dvARB_remap_index },
+ { 16792, ProgramEnvParameter4fARB_remap_index },
+ { 8935, ProgramEnvParameter4fvARB_remap_index },
+ { 3986, ProgramLocalParameter4dARB_remap_index },
+ { 13097, ProgramLocalParameter4dvARB_remap_index },
+ { 29486, ProgramLocalParameter4fARB_remap_index },
+ { 25837, ProgramLocalParameter4fvARB_remap_index },
+ { 28375, ProgramStringARB_remap_index },
+ { 19622, VertexAttrib1dARB_remap_index },
+ { 15726, VertexAttrib1dvARB_remap_index },
+ { 4161, VertexAttrib1fARB_remap_index },
+ { 32907, VertexAttrib1fvARB_remap_index },
+ { 7120, VertexAttrib1sARB_remap_index },
+ { 2263, VertexAttrib1svARB_remap_index },
+ { 15157, VertexAttrib2dARB_remap_index },
+ { 17491, VertexAttrib2dvARB_remap_index },
+ { 1635, VertexAttrib2fARB_remap_index },
+ { 17604, VertexAttrib2fvARB_remap_index },
+ { 32533, VertexAttrib2sARB_remap_index },
+ { 31561, VertexAttrib2svARB_remap_index },
+ { 11274, VertexAttrib3dARB_remap_index },
+ { 8602, VertexAttrib3dvARB_remap_index },
+ { 1722, VertexAttrib3fARB_remap_index },
+ { 22515, VertexAttrib3fvARB_remap_index },
+ { 28222, VertexAttrib3sARB_remap_index },
+ { 20250, VertexAttrib3svARB_remap_index },
+ { 4882, VertexAttrib4NbvARB_remap_index },
+ { 17851, VertexAttrib4NivARB_remap_index },
+ { 22470, VertexAttrib4NsvARB_remap_index },
+ { 23484, VertexAttrib4NubARB_remap_index },
+ { 31807, VertexAttrib4NubvARB_remap_index },
+ { 19033, VertexAttrib4NuivARB_remap_index },
+ { 3175, VertexAttrib4NusvARB_remap_index },
+ { 10863, VertexAttrib4bvARB_remap_index },
+ { 26879, VertexAttrib4dARB_remap_index },
+ { 21272, VertexAttrib4dvARB_remap_index },
+ { 11428, VertexAttrib4fARB_remap_index },
+ { 11832, VertexAttrib4fvARB_remap_index },
+ { 10239, VertexAttrib4ivARB_remap_index },
+ { 17284, VertexAttrib4sARB_remap_index },
+ { 31035, VertexAttrib4svARB_remap_index },
+ { 16597, VertexAttrib4ubvARB_remap_index },
+ { 30331, VertexAttrib4uivARB_remap_index },
+ { 20061, VertexAttrib4usvARB_remap_index },
+ { 22067, VertexAttribPointerARB_remap_index },
+ { 32667, BindBufferARB_remap_index },
+ { 6827, BufferDataARB_remap_index },
+ { 1537, BufferSubDataARB_remap_index },
+ { 30612, DeleteBuffersARB_remap_index },
+ { 32950, GenBuffersARB_remap_index },
+ { 17647, GetBufferParameterivARB_remap_index },
+ { 16744, GetBufferPointervARB_remap_index },
+ { 1490, GetBufferSubDataARB_remap_index },
+ { 30279, IsBufferARB_remap_index },
+ { 26321, MapBufferARB_remap_index },
+ { 31250, UnmapBufferARB_remap_index },
+ { 351, BeginQueryARB_remap_index },
+ { 19717, DeleteQueriesARB_remap_index },
+ { 12159, EndQueryARB_remap_index },
+ { 29100, GenQueriesARB_remap_index },
+ { 1981, GetQueryObjectivARB_remap_index },
+ { 17328, GetQueryObjectuivARB_remap_index },
+ { 1779, GetQueryivARB_remap_index },
+ { 19968, IsQueryARB_remap_index },
+ { 8212, AttachObjectARB_remap_index },
+ { 18570, CompileShaderARB_remap_index },
+ { 3244, CreateProgramObjectARB_remap_index },
+ { 6772, CreateShaderObjectARB_remap_index },
+ { 14459, DeleteObjectARB_remap_index },
+ { 23971, DetachObjectARB_remap_index },
+ { 11904, GetActiveUniformARB_remap_index },
+ { 9410, GetAttachedObjectsARB_remap_index },
+ { 9717, GetHandleARB_remap_index },
+ { 32700, GetInfoLogARB_remap_index },
+ { 31878, GetObjectParameterfvARB_remap_index },
+ { 27380, GetObjectParameterivARB_remap_index },
+ { 28858, GetShaderSourceARB_remap_index },
+ { 28082, GetUniformLocationARB_remap_index },
+ { 23754, GetUniformfvARB_remap_index },
+ { 12672, GetUniformivARB_remap_index },
+ { 20106, LinkProgramARB_remap_index },
+ { 20164, ShaderSourceARB_remap_index },
+ { 7494, Uniform1fARB_remap_index },
+ { 29695, Uniform1fvARB_remap_index },
+ { 22036, Uniform1iARB_remap_index },
+ { 20961, Uniform1ivARB_remap_index },
+ { 2212, Uniform2fARB_remap_index },
+ { 14295, Uniform2fvARB_remap_index },
+ { 26208, Uniform2iARB_remap_index },
+ { 2332, Uniform2ivARB_remap_index },
+ { 18680, Uniform3fARB_remap_index },
+ { 9440, Uniform3fvARB_remap_index },
+ { 6383, Uniform3iARB_remap_index },
+ { 16850, Uniform3ivARB_remap_index },
+ { 19178, Uniform4fARB_remap_index },
+ { 23618, Uniform4fvARB_remap_index },
+ { 24880, Uniform4iARB_remap_index },
+ { 20474, Uniform4ivARB_remap_index },
+ { 8264, UniformMatrix2fvARB_remap_index },
{ 17, UniformMatrix3fvARB_remap_index },
- { 2690, UniformMatrix4fvARB_remap_index },
- { 25184, UseProgramObjectARB_remap_index },
- { 14807, ValidateProgramARB_remap_index },
- { 21232, BindAttribLocationARB_remap_index },
- { 4940, GetActiveAttribARB_remap_index },
- { 16509, GetAttribLocationARB_remap_index },
- { 29132, DrawBuffersARB_remap_index },
- { 17850, DrawArraysInstancedARB_remap_index },
- { 6457, DrawElementsInstancedARB_remap_index },
- { 13126, RenderbufferStorageMultisample_remap_index },
- { 13597, FramebufferTextureARB_remap_index },
- { 25577, FramebufferTextureFaceARB_remap_index },
- { 23991, ProgramParameteriARB_remap_index },
- { 19143, FlushMappedBufferRange_remap_index },
- { 27568, MapBufferRange_remap_index },
- { 16337, BindVertexArray_remap_index },
- { 14630, GenVertexArrays_remap_index },
- { 29928, CopyBufferSubData_remap_index },
- { 30858, ClientWaitSync_remap_index },
- { 2609, DeleteSync_remap_index },
- { 7191, FenceSync_remap_index },
- { 15178, GetInteger64v_remap_index },
- { 22477, GetSynciv_remap_index },
- { 29071, IsSync_remap_index },
- { 9388, WaitSync_remap_index },
- { 3797, DrawElementsBaseVertex_remap_index },
- { 30263, DrawRangeElementsBaseVertex_remap_index },
- { 26190, MultiDrawElementsBaseVertex_remap_index },
- { 5091, BindTransformFeedback_remap_index },
- { 3232, DeleteTransformFeedbacks_remap_index },
- { 6429, DrawTransformFeedback_remap_index },
- { 9607, GenTransformFeedbacks_remap_index },
- { 27984, IsTransformFeedback_remap_index },
- { 25770, PauseTransformFeedback_remap_index },
- { 5528, ResumeTransformFeedback_remap_index },
- { 5396, PolygonOffsetEXT_remap_index },
- { 23099, GetPixelTexGenParameterfvSGIS_remap_index },
- { 4417, GetPixelTexGenParameterivSGIS_remap_index },
- { 22832, PixelTexGenParameterfSGIS_remap_index },
- { 624, PixelTexGenParameterfvSGIS_remap_index },
- { 12634, PixelTexGenParameteriSGIS_remap_index },
- { 13771, PixelTexGenParameterivSGIS_remap_index },
- { 16425, SampleMaskSGIS_remap_index },
- { 19825, SamplePatternSGIS_remap_index },
- { 26119, ColorPointerEXT_remap_index },
- { 17512, EdgeFlagPointerEXT_remap_index },
- { 6050, IndexPointerEXT_remap_index },
- { 6130, NormalPointerEXT_remap_index },
- { 15772, TexCoordPointerEXT_remap_index },
- { 6980, VertexPointerEXT_remap_index },
- { 3599, PointParameterfEXT_remap_index },
- { 7831, PointParameterfvEXT_remap_index },
- { 31734, LockArraysEXT_remap_index },
- { 14871, UnlockArraysEXT_remap_index },
- { 1267, SecondaryColor3bEXT_remap_index },
- { 7990, SecondaryColor3bvEXT_remap_index },
- { 10399, SecondaryColor3dEXT_remap_index },
- { 25380, SecondaryColor3dvEXT_remap_index },
- { 27850, SecondaryColor3fEXT_remap_index },
- { 18178, SecondaryColor3fvEXT_remap_index },
- { 470, SecondaryColor3iEXT_remap_index },
- { 16082, SecondaryColor3ivEXT_remap_index },
- { 10034, SecondaryColor3sEXT_remap_index },
- { 30522, SecondaryColor3svEXT_remap_index },
- { 26987, SecondaryColor3ubEXT_remap_index },
- { 21123, SecondaryColor3ubvEXT_remap_index },
- { 12876, SecondaryColor3uiEXT_remap_index },
- { 22719, SecondaryColor3uivEXT_remap_index },
- { 25627, SecondaryColor3usEXT_remap_index },
- { 12949, SecondaryColor3usvEXT_remap_index },
- { 11769, SecondaryColorPointerEXT_remap_index },
- { 25441, MultiDrawArraysEXT_remap_index },
- { 20813, MultiDrawElementsEXT_remap_index },
- { 21008, FogCoordPointerEXT_remap_index },
- { 4566, FogCoorddEXT_remap_index },
- { 31135, FogCoorddvEXT_remap_index },
- { 4683, FogCoordfEXT_remap_index },
- { 26910, FogCoordfvEXT_remap_index },
- { 19047, PixelTexGenSGIX_remap_index },
- { 27495, BlendFuncSeparateEXT_remap_index },
- { 6892, FlushVertexArrayRangeNV_remap_index },
- { 5345, VertexArrayRangeNV_remap_index },
- { 27915, CombinerInputNV_remap_index },
- { 2116, CombinerOutputNV_remap_index },
- { 30675, CombinerParameterfNV_remap_index },
- { 5219, CombinerParameterfvNV_remap_index },
- { 22201, CombinerParameteriNV_remap_index },
- { 32150, CombinerParameterivNV_remap_index },
- { 7268, FinalCombinerInputNV_remap_index },
- { 9813, GetCombinerInputParameterfvNV_remap_index },
- { 31987, GetCombinerInputParameterivNV_remap_index },
- { 13872, GetCombinerOutputParameterfvNV_remap_index },
- { 13700, GetCombinerOutputParameterivNV_remap_index },
- { 6637, GetFinalCombinerInputParameterfvNV_remap_index },
- { 24623, GetFinalCombinerInputParameterivNV_remap_index },
- { 12574, ResizeBuffersMESA_remap_index },
- { 11095, WindowPos2dMESA_remap_index },
- { 1060, WindowPos2dvMESA_remap_index },
- { 32978, WindowPos2fMESA_remap_index },
- { 7935, WindowPos2fvMESA_remap_index },
- { 18125, WindowPos2iMESA_remap_index },
- { 20298, WindowPos2ivMESA_remap_index },
- { 20912, WindowPos2sMESA_remap_index },
- { 5748, WindowPos2svMESA_remap_index },
- { 7760, WindowPos3dMESA_remap_index },
- { 14018, WindowPos3dvMESA_remap_index },
- { 516, WindowPos3fMESA_remap_index },
- { 14932, WindowPos3fvMESA_remap_index },
- { 23884, WindowPos3iMESA_remap_index },
- { 29873, WindowPos3ivMESA_remap_index },
- { 18742, WindowPos3sMESA_remap_index },
- { 31391, WindowPos3svMESA_remap_index },
- { 11046, WindowPos4dMESA_remap_index },
- { 16966, WindowPos4dvMESA_remap_index },
- { 13977, WindowPos4fMESA_remap_index },
- { 30429, WindowPos4fvMESA_remap_index },
- { 30026, WindowPos4iMESA_remap_index },
- { 12377, WindowPos4ivMESA_remap_index },
- { 18926, WindowPos4sMESA_remap_index },
- { 3183, WindowPos4svMESA_remap_index },
- { 13739, MultiModeDrawArraysIBM_remap_index },
- { 28690, MultiModeDrawElementsIBM_remap_index },
- { 12181, DeleteFencesNV_remap_index },
- { 27762, FinishFenceNV_remap_index },
- { 3721, GenFencesNV_remap_index },
- { 16946, GetFenceivNV_remap_index },
- { 8227, IsFenceNV_remap_index },
- { 13627, SetFenceNV_remap_index },
- { 4178, TestFenceNV_remap_index },
- { 31362, AreProgramsResidentNV_remap_index },
- { 30717, BindProgramNV_remap_index },
- { 25710, DeleteProgramsNV_remap_index },
- { 21341, ExecuteProgramNV_remap_index },
- { 32871, GenProgramsNV_remap_index },
- { 23204, GetProgramParameterdvNV_remap_index },
- { 10461, GetProgramParameterfvNV_remap_index },
- { 26093, GetProgramStringNV_remap_index },
- { 24261, GetProgramivNV_remap_index },
- { 23438, GetTrackMatrixivNV_remap_index },
- { 25887, GetVertexAttribPointervNV_remap_index },
- { 24556, GetVertexAttribdvNV_remap_index },
- { 9283, GetVertexAttribfvNV_remap_index },
- { 18349, GetVertexAttribivNV_remap_index },
- { 19173, IsProgramNV_remap_index },
- { 9366, LoadProgramNV_remap_index },
- { 27591, ProgramParameters4dvNV_remap_index },
- { 24191, ProgramParameters4fvNV_remap_index },
- { 20602, RequestResidentProgramsNV_remap_index },
- { 22179, TrackMatrixNV_remap_index },
- { 31964, VertexAttrib1dNV_remap_index },
- { 13538, VertexAttrib1dvNV_remap_index },
- { 28196, VertexAttrib1fNV_remap_index },
- { 2415, VertexAttrib1fvNV_remap_index },
- { 30486, VertexAttrib1sNV_remap_index },
- { 15005, VertexAttrib1svNV_remap_index },
- { 4845, VertexAttrib2dNV_remap_index },
- { 13431, VertexAttrib2dvNV_remap_index },
- { 20057, VertexAttrib2fNV_remap_index },
- { 12997, VertexAttrib2fvNV_remap_index },
- { 5960, VertexAttrib2sNV_remap_index },
- { 18796, VertexAttrib2svNV_remap_index },
- { 11243, VertexAttrib3dNV_remap_index },
- { 31612, VertexAttrib3dvNV_remap_index },
- { 10273, VertexAttrib3fNV_remap_index },
- { 24583, VertexAttrib3fvNV_remap_index },
- { 22022, VertexAttrib3sNV_remap_index },
- { 23465, VertexAttrib3svNV_remap_index },
- { 28664, VertexAttrib4dNV_remap_index },
- { 32908, VertexAttrib4dvNV_remap_index },
- { 4467, VertexAttrib4fNV_remap_index },
- { 9416, VertexAttrib4fvNV_remap_index },
- { 26569, VertexAttrib4sNV_remap_index },
- { 1409, VertexAttrib4svNV_remap_index },
- { 5003, VertexAttrib4ubNV_remap_index },
- { 778, VertexAttrib4ubvNV_remap_index },
- { 21521, VertexAttribPointerNV_remap_index },
- { 2267, VertexAttribs1dvNV_remap_index },
- { 25975, VertexAttribs1fvNV_remap_index },
- { 32708, VertexAttribs1svNV_remap_index },
- { 10298, VertexAttribs2dvNV_remap_index },
- { 25145, VertexAttribs2fvNV_remap_index },
- { 17538, VertexAttribs2svNV_remap_index },
- { 5247, VertexAttribs3dvNV_remap_index },
- { 2147, VertexAttribs3fvNV_remap_index },
- { 29621, VertexAttribs3svNV_remap_index },
- { 26659, VertexAttribs4dvNV_remap_index },
- { 5319, VertexAttribs4fvNV_remap_index },
- { 32495, VertexAttribs4svNV_remap_index },
- { 29369, VertexAttribs4ubvNV_remap_index },
- { 26729, GetTexBumpParameterfvATI_remap_index },
- { 32749, GetTexBumpParameterivATI_remap_index },
- { 18459, TexBumpParameterfvATI_remap_index },
- { 20473, TexBumpParameterivATI_remap_index },
- { 15551, AlphaFragmentOp1ATI_remap_index },
- { 10889, AlphaFragmentOp2ATI_remap_index },
- { 24499, AlphaFragmentOp3ATI_remap_index },
- { 29548, BeginFragmentShaderATI_remap_index },
- { 30916, BindFragmentShaderATI_remap_index },
- { 23594, ColorFragmentOp1ATI_remap_index },
- { 4345, ColorFragmentOp2ATI_remap_index },
- { 31257, ColorFragmentOp3ATI_remap_index },
- { 5485, DeleteFragmentShaderATI_remap_index },
- { 32932, EndFragmentShaderATI_remap_index },
- { 32178, GenFragmentShadersATI_remap_index },
- { 25299, PassTexCoordATI_remap_index },
- { 6960, SampleMapATI_remap_index },
- { 6733, SetFragmentShaderConstantATI_remap_index },
- { 363, PointParameteriNV_remap_index },
- { 14179, PointParameterivNV_remap_index },
- { 28503, ActiveStencilFaceEXT_remap_index },
- { 27251, BindVertexArrayAPPLE_remap_index },
- { 2737, DeleteVertexArraysAPPLE_remap_index },
- { 17955, GenVertexArraysAPPLE_remap_index },
- { 23269, IsVertexArrayAPPLE_remap_index },
- { 819, GetProgramNamedParameterdvNV_remap_index },
- { 3562, GetProgramNamedParameterfvNV_remap_index },
- { 26760, ProgramNamedParameter4dNV_remap_index },
- { 14505, ProgramNamedParameter4dvNV_remap_index },
- { 8899, ProgramNamedParameter4fNV_remap_index },
- { 11734, ProgramNamedParameter4fvNV_remap_index },
- { 16877, PrimitiveRestartIndexNV_remap_index },
- { 30406, PrimitiveRestartNV_remap_index },
- { 24170, DepthBoundsEXT_remap_index },
- { 1159, BlendEquationSeparateEXT_remap_index },
- { 14706, BindFramebufferEXT_remap_index },
- { 25486, BindRenderbufferEXT_remap_index },
- { 9663, CheckFramebufferStatusEXT_remap_index },
- { 22520, DeleteFramebuffersEXT_remap_index },
- { 31514, DeleteRenderbuffersEXT_remap_index },
- { 13455, FramebufferRenderbufferEXT_remap_index },
- { 13644, FramebufferTexture1DEXT_remap_index },
- { 11528, FramebufferTexture2DEXT_remap_index },
- { 11148, FramebufferTexture3DEXT_remap_index },
- { 23135, GenFramebuffersEXT_remap_index },
- { 17403, GenRenderbuffersEXT_remap_index },
- { 6679, GenerateMipmapEXT_remap_index },
- { 21597, GetFramebufferAttachmentParameterivEXT_remap_index },
- { 32084, GetRenderbufferParameterivEXT_remap_index },
- { 20353, IsFramebufferEXT_remap_index },
- { 32831, IsRenderbufferEXT_remap_index },
- { 8174, RenderbufferStorageEXT_remap_index },
- { 695, BlitFramebufferEXT_remap_index },
- { 14324, BufferParameteriAPPLE_remap_index },
- { 19205, FlushMappedBufferRangeAPPLE_remap_index },
- { 1815, BindFragDataLocationEXT_remap_index },
- { 24283, GetFragDataLocationEXT_remap_index },
- { 10576, GetUniformuivEXT_remap_index },
- { 2933, GetVertexAttribIivEXT_remap_index },
- { 4195, GetVertexAttribIuivEXT_remap_index },
- { 12014, Uniform1uiEXT_remap_index },
- { 27676, Uniform1uivEXT_remap_index },
- { 22118, Uniform2uiEXT_remap_index },
- { 4309, Uniform2uivEXT_remap_index },
- { 28943, Uniform3uiEXT_remap_index },
- { 14652, Uniform3uivEXT_remap_index },
- { 3486, Uniform4uiEXT_remap_index },
- { 8675, Uniform4uivEXT_remap_index },
- { 18306, VertexAttribI1iEXT_remap_index },
- { 965, VertexAttribI1ivEXT_remap_index },
- { 2516, VertexAttribI1uiEXT_remap_index },
- { 12725, VertexAttribI1uivEXT_remap_index },
+ { 2729, UniformMatrix4fvARB_remap_index },
+ { 25313, UseProgramObjectARB_remap_index },
+ { 14845, ValidateProgramARB_remap_index },
+ { 21315, BindAttribLocationARB_remap_index },
+ { 4927, GetActiveAttribARB_remap_index },
+ { 16531, GetAttribLocationARB_remap_index },
+ { 29413, DrawBuffersARB_remap_index },
+ { 17896, DrawArraysInstancedARB_remap_index },
+ { 6444, DrawElementsInstancedARB_remap_index },
+ { 13202, RenderbufferStorageMultisample_remap_index },
+ { 13673, FramebufferTextureARB_remap_index },
+ { 25739, FramebufferTextureFaceARB_remap_index },
+ { 24120, ProgramParameteriARB_remap_index },
+ { 23436, VertexAttribDivisorARB_remap_index },
+ { 19226, FlushMappedBufferRange_remap_index },
+ { 27797, MapBufferRange_remap_index },
+ { 16375, BindVertexArray_remap_index },
+ { 14668, GenVertexArrays_remap_index },
+ { 30209, CopyBufferSubData_remap_index },
+ { 31139, ClientWaitSync_remap_index },
+ { 2648, DeleteSync_remap_index },
+ { 7161, FenceSync_remap_index },
+ { 15216, GetInteger64v_remap_index },
+ { 22577, GetSynciv_remap_index },
+ { 29352, IsSync_remap_index },
+ { 9358, WaitSync_remap_index },
+ { 3836, DrawElementsBaseVertex_remap_index },
+ { 30544, DrawRangeElementsBaseVertex_remap_index },
+ { 26352, MultiDrawElementsBaseVertex_remap_index },
+ { 32083, BlendEquationSeparateiARB_remap_index },
+ { 17740, BlendEquationiARB_remap_index },
+ { 12641, BlendFuncSeparateiARB_remap_index },
+ { 9783, BlendFunciARB_remap_index },
+ { 5078, BindTransformFeedback_remap_index },
+ { 3271, DeleteTransformFeedbacks_remap_index },
+ { 6416, DrawTransformFeedback_remap_index },
+ { 9577, GenTransformFeedbacks_remap_index },
+ { 28265, IsTransformFeedback_remap_index },
+ { 25932, PauseTransformFeedback_remap_index },
+ { 5557, ResumeTransformFeedback_remap_index },
+ { 21635, ClearDepthf_remap_index },
+ { 6720, DepthRangef_remap_index },
+ { 14480, GetShaderPrecisionFormat_remap_index },
+ { 9963, ReleaseShaderCompiler_remap_index },
+ { 10906, ShaderBinary_remap_index },
+ { 5425, PolygonOffsetEXT_remap_index },
+ { 23199, GetPixelTexGenParameterfvSGIS_remap_index },
+ { 4404, GetPixelTexGenParameterivSGIS_remap_index },
+ { 22932, PixelTexGenParameterfSGIS_remap_index },
+ { 663, PixelTexGenParameterfvSGIS_remap_index },
+ { 12710, PixelTexGenParameteriSGIS_remap_index },
+ { 13815, PixelTexGenParameterivSGIS_remap_index },
+ { 18224, SampleMaskSGIS_remap_index },
+ { 19908, SamplePatternSGIS_remap_index },
+ { 26281, ColorPointerEXT_remap_index },
+ { 17534, EdgeFlagPointerEXT_remap_index },
+ { 6037, IndexPointerEXT_remap_index },
+ { 6117, NormalPointerEXT_remap_index },
+ { 15810, TexCoordPointerEXT_remap_index },
+ { 6950, VertexPointerEXT_remap_index },
+ { 3638, PointParameterfEXT_remap_index },
+ { 7801, PointParameterfvEXT_remap_index },
+ { 31976, LockArraysEXT_remap_index },
+ { 14909, UnlockArraysEXT_remap_index },
+ { 1306, SecondaryColor3bEXT_remap_index },
+ { 7960, SecondaryColor3bvEXT_remap_index },
+ { 10416, SecondaryColor3dEXT_remap_index },
+ { 25509, SecondaryColor3dvEXT_remap_index },
+ { 28131, SecondaryColor3fEXT_remap_index },
+ { 18261, SecondaryColor3fvEXT_remap_index },
+ { 509, SecondaryColor3iEXT_remap_index },
+ { 16120, SecondaryColor3ivEXT_remap_index },
+ { 10051, SecondaryColor3sEXT_remap_index },
+ { 30803, SecondaryColor3svEXT_remap_index },
+ { 27216, SecondaryColor3ubEXT_remap_index },
+ { 21206, SecondaryColor3ubvEXT_remap_index },
+ { 12952, SecondaryColor3uiEXT_remap_index },
+ { 22819, SecondaryColor3uivEXT_remap_index },
+ { 25789, SecondaryColor3usEXT_remap_index },
+ { 13025, SecondaryColor3usvEXT_remap_index },
+ { 11775, SecondaryColorPointerEXT_remap_index },
+ { 25603, MultiDrawArraysEXT_remap_index },
+ { 20896, MultiDrawElementsEXT_remap_index },
+ { 21091, FogCoordPointerEXT_remap_index },
+ { 4553, FogCoorddEXT_remap_index },
+ { 31377, FogCoorddvEXT_remap_index },
+ { 4670, FogCoordfEXT_remap_index },
+ { 27139, FogCoordfvEXT_remap_index },
+ { 19130, PixelTexGenSGIX_remap_index },
+ { 27724, BlendFuncSeparateEXT_remap_index },
+ { 6862, FlushVertexArrayRangeNV_remap_index },
+ { 5374, VertexArrayRangeNV_remap_index },
+ { 28196, CombinerInputNV_remap_index },
+ { 2155, CombinerOutputNV_remap_index },
+ { 30956, CombinerParameterfNV_remap_index },
+ { 5248, CombinerParameterfvNV_remap_index },
+ { 22301, CombinerParameteriNV_remap_index },
+ { 32425, CombinerParameterivNV_remap_index },
+ { 7238, FinalCombinerInputNV_remap_index },
+ { 9804, GetCombinerInputParameterfvNV_remap_index },
+ { 32262, GetCombinerInputParameterivNV_remap_index },
+ { 216, GetCombinerOutputParameterfvNV_remap_index },
+ { 13776, GetCombinerOutputParameterivNV_remap_index },
+ { 6624, GetFinalCombinerInputParameterfvNV_remap_index },
+ { 24752, GetFinalCombinerInputParameterivNV_remap_index },
+ { 12619, ResizeBuffersMESA_remap_index },
+ { 11101, WindowPos2dMESA_remap_index },
+ { 1099, WindowPos2dvMESA_remap_index },
+ { 33253, WindowPos2fMESA_remap_index },
+ { 7905, WindowPos2fvMESA_remap_index },
+ { 18171, WindowPos2iMESA_remap_index },
+ { 20381, WindowPos2ivMESA_remap_index },
+ { 20995, WindowPos2sMESA_remap_index },
+ { 5735, WindowPos2svMESA_remap_index },
+ { 7730, WindowPos3dMESA_remap_index },
+ { 14023, WindowPos3dvMESA_remap_index },
+ { 555, WindowPos3fMESA_remap_index },
+ { 14970, WindowPos3fvMESA_remap_index },
+ { 24013, WindowPos3iMESA_remap_index },
+ { 30154, WindowPos3ivMESA_remap_index },
+ { 18825, WindowPos3sMESA_remap_index },
+ { 31633, WindowPos3svMESA_remap_index },
+ { 11052, WindowPos4dMESA_remap_index },
+ { 16988, WindowPos4dvMESA_remap_index },
+ { 13982, WindowPos4fMESA_remap_index },
+ { 30710, WindowPos4fvMESA_remap_index },
+ { 30307, WindowPos4iMESA_remap_index },
+ { 12422, WindowPos4ivMESA_remap_index },
+ { 19009, WindowPos4sMESA_remap_index },
+ { 3222, WindowPos4svMESA_remap_index },
+ { 26847, MultiModeDrawArraysIBM_remap_index },
+ { 28971, MultiModeDrawElementsIBM_remap_index },
+ { 12187, DeleteFencesNV_remap_index },
+ { 28043, FinishFenceNV_remap_index },
+ { 3760, GenFencesNV_remap_index },
+ { 16968, GetFenceivNV_remap_index },
+ { 8197, IsFenceNV_remap_index },
+ { 13703, SetFenceNV_remap_index },
+ { 4217, TestFenceNV_remap_index },
+ { 31604, AreProgramsResidentNV_remap_index },
+ { 30998, BindProgramNV_remap_index },
+ { 25872, DeleteProgramsNV_remap_index },
+ { 21424, ExecuteProgramNV_remap_index },
+ { 33146, GenProgramsNV_remap_index },
+ { 23304, GetProgramParameterdvNV_remap_index },
+ { 10478, GetProgramParameterfvNV_remap_index },
+ { 26255, GetProgramStringNV_remap_index },
+ { 24390, GetProgramivNV_remap_index },
+ { 23567, GetTrackMatrixivNV_remap_index },
+ { 26049, GetVertexAttribPointervNV_remap_index },
+ { 24685, GetVertexAttribdvNV_remap_index },
+ { 9253, GetVertexAttribfvNV_remap_index },
+ { 18432, GetVertexAttribivNV_remap_index },
+ { 19256, IsProgramNV_remap_index },
+ { 9336, LoadProgramNV_remap_index },
+ { 27820, ProgramParameters4dvNV_remap_index },
+ { 24320, ProgramParameters4fvNV_remap_index },
+ { 20685, RequestResidentProgramsNV_remap_index },
+ { 22279, TrackMatrixNV_remap_index },
+ { 32239, VertexAttrib1dNV_remap_index },
+ { 13614, VertexAttrib1dvNV_remap_index },
+ { 28477, VertexAttrib1fNV_remap_index },
+ { 2454, VertexAttrib1fvNV_remap_index },
+ { 30767, VertexAttrib1sNV_remap_index },
+ { 15043, VertexAttrib1svNV_remap_index },
+ { 4832, VertexAttrib2dNV_remap_index },
+ { 13507, VertexAttrib2dvNV_remap_index },
+ { 20140, VertexAttrib2fNV_remap_index },
+ { 13073, VertexAttrib2fvNV_remap_index },
+ { 5947, VertexAttrib2sNV_remap_index },
+ { 18879, VertexAttrib2svNV_remap_index },
+ { 11249, VertexAttrib3dNV_remap_index },
+ { 31854, VertexAttrib3dvNV_remap_index },
+ { 10290, VertexAttrib3fNV_remap_index },
+ { 24712, VertexAttrib3fvNV_remap_index },
+ { 22122, VertexAttrib3sNV_remap_index },
+ { 23594, VertexAttrib3svNV_remap_index },
+ { 28945, VertexAttrib4dNV_remap_index },
+ { 33183, VertexAttrib4dvNV_remap_index },
+ { 4454, VertexAttrib4fNV_remap_index },
+ { 9386, VertexAttrib4fvNV_remap_index },
+ { 26731, VertexAttrib4sNV_remap_index },
+ { 1448, VertexAttrib4svNV_remap_index },
+ { 4990, VertexAttrib4ubNV_remap_index },
+ { 817, VertexAttrib4ubvNV_remap_index },
+ { 21604, VertexAttribPointerNV_remap_index },
+ { 2306, VertexAttribs1dvNV_remap_index },
+ { 26137, VertexAttribs1fvNV_remap_index },
+ { 32983, VertexAttribs1svNV_remap_index },
+ { 10315, VertexAttribs2dvNV_remap_index },
+ { 25274, VertexAttribs2fvNV_remap_index },
+ { 17560, VertexAttribs2svNV_remap_index },
+ { 5276, VertexAttribs3dvNV_remap_index },
+ { 2186, VertexAttribs3fvNV_remap_index },
+ { 29902, VertexAttribs3svNV_remap_index },
+ { 26821, VertexAttribs4dvNV_remap_index },
+ { 5348, VertexAttribs4fvNV_remap_index },
+ { 32770, VertexAttribs4svNV_remap_index },
+ { 29650, VertexAttribs4ubvNV_remap_index },
+ { 26923, GetTexBumpParameterfvATI_remap_index },
+ { 33024, GetTexBumpParameterivATI_remap_index },
+ { 18542, TexBumpParameterfvATI_remap_index },
+ { 20556, TexBumpParameterivATI_remap_index },
+ { 15589, AlphaFragmentOp1ATI_remap_index },
+ { 25555, AlphaFragmentOp2ATI_remap_index },
+ { 24628, AlphaFragmentOp3ATI_remap_index },
+ { 29829, BeginFragmentShaderATI_remap_index },
+ { 31197, BindFragmentShaderATI_remap_index },
+ { 23723, ColorFragmentOp1ATI_remap_index },
+ { 4332, ColorFragmentOp2ATI_remap_index },
+ { 31499, ColorFragmentOp3ATI_remap_index },
+ { 5514, DeleteFragmentShaderATI_remap_index },
+ { 33207, EndFragmentShaderATI_remap_index },
+ { 32453, GenFragmentShadersATI_remap_index },
+ { 25428, PassTexCoordATI_remap_index },
+ { 6930, SampleMapATI_remap_index },
+ { 27034, SetFragmentShaderConstantATI_remap_index },
+ { 402, PointParameteriNV_remap_index },
+ { 14184, PointParameterivNV_remap_index },
+ { 28784, ActiveStencilFaceEXT_remap_index },
+ { 27480, BindVertexArrayAPPLE_remap_index },
+ { 2776, DeleteVertexArraysAPPLE_remap_index },
+ { 18001, GenVertexArraysAPPLE_remap_index },
+ { 23369, IsVertexArrayAPPLE_remap_index },
+ { 858, GetProgramNamedParameterdvNV_remap_index },
+ { 3601, GetProgramNamedParameterfvNV_remap_index },
+ { 26954, ProgramNamedParameter4dNV_remap_index },
+ { 14543, ProgramNamedParameter4dvNV_remap_index },
+ { 8869, ProgramNamedParameter4fNV_remap_index },
+ { 11740, ProgramNamedParameter4fvNV_remap_index },
+ { 16899, PrimitiveRestartIndexNV_remap_index },
+ { 30687, PrimitiveRestartNV_remap_index },
+ { 24299, DepthBoundsEXT_remap_index },
+ { 1198, BlendEquationSeparateEXT_remap_index },
+ { 14744, BindFramebufferEXT_remap_index },
+ { 25648, BindRenderbufferEXT_remap_index },
+ { 9633, CheckFramebufferStatusEXT_remap_index },
+ { 22620, DeleteFramebuffersEXT_remap_index },
+ { 31756, DeleteRenderbuffersEXT_remap_index },
+ { 13531, FramebufferRenderbufferEXT_remap_index },
+ { 13720, FramebufferTexture1DEXT_remap_index },
+ { 11534, FramebufferTexture2DEXT_remap_index },
+ { 11154, FramebufferTexture3DEXT_remap_index },
+ { 23235, GenFramebuffersEXT_remap_index },
+ { 17425, GenRenderbuffersEXT_remap_index },
+ { 6666, GenerateMipmapEXT_remap_index },
+ { 21697, GetFramebufferAttachmentParameterivEXT_remap_index },
+ { 32359, GetRenderbufferParameterivEXT_remap_index },
+ { 20436, IsFramebufferEXT_remap_index },
+ { 33106, IsRenderbufferEXT_remap_index },
+ { 8144, RenderbufferStorageEXT_remap_index },
+ { 734, BlitFramebufferEXT_remap_index },
+ { 14329, BufferParameteriAPPLE_remap_index },
+ { 19288, FlushMappedBufferRangeAPPLE_remap_index },
+ { 1854, BindFragDataLocationEXT_remap_index },
+ { 24412, GetFragDataLocationEXT_remap_index },
+ { 10593, GetUniformuivEXT_remap_index },
+ { 2972, GetVertexAttribIivEXT_remap_index },
+ { 27991, GetVertexAttribIuivEXT_remap_index },
+ { 12020, Uniform1uiEXT_remap_index },
+ { 27905, Uniform1uivEXT_remap_index },
+ { 22218, Uniform2uiEXT_remap_index },
+ { 4296, Uniform2uivEXT_remap_index },
+ { 29224, Uniform3uiEXT_remap_index },
+ { 14690, Uniform3uivEXT_remap_index },
+ { 3525, Uniform4uiEXT_remap_index },
+ { 8645, Uniform4uivEXT_remap_index },
+ { 18389, VertexAttribI1iEXT_remap_index },
+ { 1004, VertexAttribI1ivEXT_remap_index },
+ { 2555, VertexAttribI1uiEXT_remap_index },
+ { 12801, VertexAttribI1uivEXT_remap_index },
{ 81, VertexAttribI2iEXT_remap_index },
- { 23706, VertexAttribI2ivEXT_remap_index },
- { 5273, VertexAttribI2uiEXT_remap_index },
- { 4728, VertexAttribI2uivEXT_remap_index },
- { 26361, VertexAttribI3iEXT_remap_index },
- { 30218, VertexAttribI3ivEXT_remap_index },
- { 3340, VertexAttribI3uiEXT_remap_index },
- { 30114, VertexAttribI3uivEXT_remap_index },
- { 21848, VertexAttribI4bvEXT_remap_index },
- { 14584, VertexAttribI4iEXT_remap_index },
- { 31783, VertexAttribI4ivEXT_remap_index },
- { 13358, VertexAttribI4svEXT_remap_index },
- { 16462, VertexAttribI4ubvEXT_remap_index },
- { 16145, VertexAttribI4uiEXT_remap_index },
- { 5419, VertexAttribI4uivEXT_remap_index },
- { 11311, VertexAttribI4usvEXT_remap_index },
- { 18403, VertexAttribIPointerEXT_remap_index },
- { 3027, FramebufferTextureLayerEXT_remap_index },
- { 5660, ColorMaskIndexedEXT_remap_index },
- { 18820, DisableIndexedEXT_remap_index },
- { 26406, EnableIndexedEXT_remap_index },
- { 21552, GetBooleanIndexedvEXT_remap_index },
- { 10922, GetIntegerIndexedvEXT_remap_index },
- { 22596, IsEnabledIndexedEXT_remap_index },
- { 22496, ClearColorIiEXT_remap_index },
- { 3436, ClearColorIuiEXT_remap_index },
- { 9852, GetTexParameterIivEXT_remap_index },
- { 5908, GetTexParameterIuivEXT_remap_index },
- { 2983, TexParameterIivEXT_remap_index },
- { 26228, TexParameterIuivEXT_remap_index },
- { 4596, BeginConditionalRenderNV_remap_index },
- { 25249, EndConditionalRenderNV_remap_index },
- { 9310, BeginTransformFeedbackEXT_remap_index },
- { 18855, BindBufferBaseEXT_remap_index },
- { 18714, BindBufferOffsetEXT_remap_index },
- { 12202, BindBufferRangeEXT_remap_index },
- { 14239, EndTransformFeedbackEXT_remap_index },
- { 10774, GetTransformFeedbackVaryingEXT_remap_index },
- { 20658, TransformFeedbackVaryingsEXT_remap_index },
- { 29270, ProvokingVertexEXT_remap_index },
- { 10722, GetTexParameterPointervAPPLE_remap_index },
- { 5047, TextureRangeAPPLE_remap_index },
- { 11600, GetObjectParameterivAPPLE_remap_index },
- { 19780, ObjectPurgeableAPPLE_remap_index },
- { 5702, ObjectUnpurgeableAPPLE_remap_index },
- { 17225, ActiveProgramEXT_remap_index },
- { 17196, CreateShaderProgramEXT_remap_index },
- { 28288, UseShaderProgramEXT_remap_index },
- { 28529, StencilFuncSeparateATI_remap_index },
- { 18044, ProgramEnvParameters4fvEXT_remap_index },
- { 17090, ProgramLocalParameters4fvEXT_remap_index },
- { 14107, GetQueryObjecti64vEXT_remap_index },
- { 10324, GetQueryObjectui64vEXT_remap_index },
- { 23663, EGLImageTargetRenderbufferStorageOES_remap_index },
- { 12120, EGLImageTargetTexture2DOES_remap_index },
+ { 23835, VertexAttribI2ivEXT_remap_index },
+ { 5302, VertexAttribI2uiEXT_remap_index },
+ { 4715, VertexAttribI2uivEXT_remap_index },
+ { 26523, VertexAttribI3iEXT_remap_index },
+ { 30499, VertexAttribI3ivEXT_remap_index },
+ { 3379, VertexAttribI3uiEXT_remap_index },
+ { 30395, VertexAttribI3uivEXT_remap_index },
+ { 21948, VertexAttribI4bvEXT_remap_index },
+ { 14622, VertexAttribI4iEXT_remap_index },
+ { 32025, VertexAttribI4ivEXT_remap_index },
+ { 13434, VertexAttribI4svEXT_remap_index },
+ { 16484, VertexAttribI4ubvEXT_remap_index },
+ { 16183, VertexAttribI4uiEXT_remap_index },
+ { 5448, VertexAttribI4uivEXT_remap_index },
+ { 11317, VertexAttribI4usvEXT_remap_index },
+ { 18486, VertexAttribIPointerEXT_remap_index },
+ { 3066, FramebufferTextureLayerEXT_remap_index },
+ { 5172, ColorMaskIndexedEXT_remap_index },
+ { 18903, DisableIndexedEXT_remap_index },
+ { 26568, EnableIndexedEXT_remap_index },
+ { 21652, GetBooleanIndexedvEXT_remap_index },
+ { 10928, GetIntegerIndexedvEXT_remap_index },
+ { 22696, IsEnabledIndexedEXT_remap_index },
+ { 22596, ClearColorIiEXT_remap_index },
+ { 3475, ClearColorIuiEXT_remap_index },
+ { 9843, GetTexParameterIivEXT_remap_index },
+ { 5895, GetTexParameterIuivEXT_remap_index },
+ { 3022, TexParameterIivEXT_remap_index },
+ { 26390, TexParameterIuivEXT_remap_index },
+ { 4583, BeginConditionalRenderNV_remap_index },
+ { 25378, EndConditionalRenderNV_remap_index },
+ { 9280, BeginTransformFeedbackEXT_remap_index },
+ { 18938, BindBufferBaseEXT_remap_index },
+ { 18797, BindBufferOffsetEXT_remap_index },
+ { 12247, BindBufferRangeEXT_remap_index },
+ { 14244, EndTransformFeedbackEXT_remap_index },
+ { 10791, GetTransformFeedbackVaryingEXT_remap_index },
+ { 20741, TransformFeedbackVaryingsEXT_remap_index },
+ { 29551, ProvokingVertexEXT_remap_index },
+ { 10739, GetTexParameterPointervAPPLE_remap_index },
+ { 5034, TextureRangeAPPLE_remap_index },
+ { 11606, GetObjectParameterivAPPLE_remap_index },
+ { 19863, ObjectPurgeableAPPLE_remap_index },
+ { 5689, ObjectUnpurgeableAPPLE_remap_index },
+ { 17247, ActiveProgramEXT_remap_index },
+ { 17218, CreateShaderProgramEXT_remap_index },
+ { 28569, UseShaderProgramEXT_remap_index },
+ { 16463, TextureBarrierNV_remap_index },
+ { 28810, StencilFuncSeparateATI_remap_index },
+ { 18090, ProgramEnvParameters4fvEXT_remap_index },
+ { 17112, ProgramLocalParameters4fvEXT_remap_index },
+ { 14112, GetQueryObjecti64vEXT_remap_index },
+ { 10341, GetQueryObjectui64vEXT_remap_index },
+ { 23792, EGLImageTargetRenderbufferStorageOES_remap_index },
+ { 12126, EGLImageTargetTexture2DOES_remap_index },
{ -1, -1 }
};
/* these functions are in the ABI, but have alternative names */
static const struct gl_function_remap MESA_alt_functions[] = {
/* from GL_EXT_blend_color */
- { 2655, _gloffset_BlendColor },
+ { 2694, _gloffset_BlendColor },
/* from GL_EXT_blend_minmax */
- { 11205, _gloffset_BlendEquation },
+ { 11211, _gloffset_BlendEquation },
/* from GL_EXT_color_subtable */
- { 16988, _gloffset_ColorSubTable },
- { 31446, _gloffset_CopyColorSubTable },
+ { 17010, _gloffset_ColorSubTable },
+ { 31688, _gloffset_CopyColorSubTable },
/* from GL_EXT_convolution */
- { 257, _gloffset_ConvolutionFilter1D },
- { 2454, _gloffset_CopyConvolutionFilter1D },
- { 4058, _gloffset_GetConvolutionParameteriv },
- { 8523, _gloffset_ConvolutionFilter2D },
- { 8725, _gloffset_ConvolutionParameteriv },
- { 9185, _gloffset_ConvolutionParameterfv },
- { 20501, _gloffset_GetSeparableFilter },
- { 23938, _gloffset_SeparableFilter2D },
- { 24801, _gloffset_ConvolutionParameteri },
- { 24924, _gloffset_ConvolutionParameterf },
- { 26595, _gloffset_GetConvolutionParameterfv },
- { 27417, _gloffset_GetConvolutionFilter },
- { 29810, _gloffset_CopyConvolutionFilter2D },
+ { 296, _gloffset_ConvolutionFilter1D },
+ { 2493, _gloffset_CopyConvolutionFilter1D },
+ { 4097, _gloffset_GetConvolutionParameteriv },
+ { 8493, _gloffset_ConvolutionFilter2D },
+ { 8695, _gloffset_ConvolutionParameteriv },
+ { 9155, _gloffset_ConvolutionParameterfv },
+ { 20584, _gloffset_GetSeparableFilter },
+ { 24067, _gloffset_SeparableFilter2D },
+ { 24930, _gloffset_ConvolutionParameteri },
+ { 25053, _gloffset_ConvolutionParameterf },
+ { 26757, _gloffset_GetConvolutionParameterfv },
+ { 27646, _gloffset_GetConvolutionFilter },
+ { 30091, _gloffset_CopyConvolutionFilter2D },
/* from GL_EXT_copy_texture */
- { 15065, _gloffset_CopyTexSubImage3D },
- { 16675, _gloffset_CopyTexImage2D },
- { 24409, _gloffset_CopyTexImage1D },
- { 27098, _gloffset_CopyTexSubImage2D },
- { 29448, _gloffset_CopyTexSubImage1D },
+ { 15103, _gloffset_CopyTexSubImage3D },
+ { 16697, _gloffset_CopyTexImage2D },
+ { 24538, _gloffset_CopyTexImage1D },
+ { 27327, _gloffset_CopyTexSubImage2D },
+ { 29729, _gloffset_CopyTexSubImage1D },
/* from GL_EXT_draw_range_elements */
- { 9522, _gloffset_DrawRangeElements },
+ { 9492, _gloffset_DrawRangeElements },
/* from GL_EXT_histogram */
- { 856, _gloffset_Histogram },
- { 3522, _gloffset_ResetHistogram },
- { 9972, _gloffset_GetMinmax },
- { 15399, _gloffset_GetHistogramParameterfv },
- { 24334, _gloffset_GetMinmaxParameteriv },
- { 26485, _gloffset_ResetMinmax },
- { 27314, _gloffset_GetHistogramParameteriv },
- { 28463, _gloffset_GetHistogram },
- { 31032, _gloffset_Minmax },
- { 32578, _gloffset_GetMinmaxParameterfv },
+ { 895, _gloffset_Histogram },
+ { 3561, _gloffset_ResetHistogram },
+ { 9989, _gloffset_GetMinmax },
+ { 15437, _gloffset_GetHistogramParameterfv },
+ { 24463, _gloffset_GetMinmaxParameteriv },
+ { 26647, _gloffset_ResetMinmax },
+ { 27543, _gloffset_GetHistogramParameteriv },
+ { 28744, _gloffset_GetHistogram },
+ { 31313, _gloffset_Minmax },
+ { 32853, _gloffset_GetMinmaxParameterfv },
/* from GL_EXT_paletted_texture */
- { 8385, _gloffset_ColorTable },
- { 15245, _gloffset_GetColorTable },
- { 22882, _gloffset_GetColorTableParameterfv },
- { 24980, _gloffset_GetColorTableParameteriv },
+ { 8355, _gloffset_ColorTable },
+ { 15283, _gloffset_GetColorTable },
+ { 22982, _gloffset_GetColorTableParameterfv },
+ { 25109, _gloffset_GetColorTableParameteriv },
/* from GL_EXT_subtexture */
- { 7106, _gloffset_TexSubImage1D },
- { 10649, _gloffset_TexSubImage2D },
+ { 7076, _gloffset_TexSubImage1D },
+ { 10666, _gloffset_TexSubImage2D },
/* from GL_EXT_texture3D */
- { 1774, _gloffset_TexImage3D },
- { 22651, _gloffset_TexSubImage3D },
+ { 1813, _gloffset_TexImage3D },
+ { 22751, _gloffset_TexSubImage3D },
/* from GL_EXT_texture_object */
- { 3290, _gloffset_PrioritizeTextures },
- { 7555, _gloffset_AreTexturesResident },
- { 13562, _gloffset_GenTextures },
- { 15731, _gloffset_DeleteTextures },
- { 19486, _gloffset_IsTexture },
- { 29513, _gloffset_BindTexture },
+ { 3329, _gloffset_PrioritizeTextures },
+ { 7525, _gloffset_AreTexturesResident },
+ { 13638, _gloffset_GenTextures },
+ { 15769, _gloffset_DeleteTextures },
+ { 19569, _gloffset_IsTexture },
+ { 29794, _gloffset_BindTexture },
/* from GL_EXT_vertex_array */
- { 24110, _gloffset_ArrayElement },
- { 30620, _gloffset_GetPointerv },
- { 32205, _gloffset_DrawArrays },
+ { 24239, _gloffset_ArrayElement },
+ { 30901, _gloffset_GetPointerv },
+ { 32480, _gloffset_DrawArrays },
/* from GL_SGI_color_table */
- { 7673, _gloffset_ColorTableParameteriv },
- { 8385, _gloffset_ColorTable },
- { 15245, _gloffset_GetColorTable },
- { 15355, _gloffset_CopyColorTable },
- { 19347, _gloffset_ColorTableParameterfv },
- { 22882, _gloffset_GetColorTableParameterfv },
- { 24980, _gloffset_GetColorTableParameteriv },
+ { 7643, _gloffset_ColorTableParameteriv },
+ { 8355, _gloffset_ColorTable },
+ { 15283, _gloffset_GetColorTable },
+ { 15393, _gloffset_CopyColorTable },
+ { 19430, _gloffset_ColorTableParameterfv },
+ { 22982, _gloffset_GetColorTableParameterfv },
+ { 25109, _gloffset_GetColorTableParameteriv },
/* from GL_VERSION_1_3 */
- { 425, _gloffset_MultiTexCoord3sARB },
- { 657, _gloffset_ActiveTextureARB },
- { 4247, _gloffset_MultiTexCoord1fvARB },
- { 6155, _gloffset_MultiTexCoord3dARB },
- { 6200, _gloffset_MultiTexCoord2iARB },
- { 6324, _gloffset_MultiTexCoord2svARB },
- { 8341, _gloffset_MultiTexCoord2fARB },
- { 10354, _gloffset_MultiTexCoord3fvARB },
- { 10967, _gloffset_MultiTexCoord4sARB },
- { 11648, _gloffset_MultiTexCoord2dvARB },
- { 12063, _gloffset_MultiTexCoord1svARB },
- { 12435, _gloffset_MultiTexCoord3svARB },
- { 12496, _gloffset_MultiTexCoord4iARB },
- { 13266, _gloffset_MultiTexCoord3iARB },
- { 14136, _gloffset_MultiTexCoord1dARB },
- { 14353, _gloffset_MultiTexCoord3dvARB },
- { 15599, _gloffset_MultiTexCoord3ivARB },
- { 15644, _gloffset_MultiTexCoord2sARB },
- { 17045, _gloffset_MultiTexCoord4ivARB },
- { 18997, _gloffset_ClientActiveTextureARB },
- { 21297, _gloffset_MultiTexCoord2dARB },
- { 21717, _gloffset_MultiTexCoord4dvARB },
- { 22073, _gloffset_MultiTexCoord4fvARB },
- { 23023, _gloffset_MultiTexCoord3fARB },
- { 25531, _gloffset_MultiTexCoord4dARB },
- { 25797, _gloffset_MultiTexCoord1sARB },
- { 26001, _gloffset_MultiTexCoord1dvARB },
- { 26942, _gloffset_MultiTexCoord1ivARB },
- { 27035, _gloffset_MultiTexCoord2ivARB },
- { 27374, _gloffset_MultiTexCoord1iARB },
- { 28738, _gloffset_MultiTexCoord4svARB },
- { 29312, _gloffset_MultiTexCoord1fARB },
- { 29575, _gloffset_MultiTexCoord4fARB },
- { 32039, _gloffset_MultiTexCoord2fvARB },
+ { 464, _gloffset_MultiTexCoord3sARB },
+ { 696, _gloffset_ActiveTextureARB },
+ { 4234, _gloffset_MultiTexCoord1fvARB },
+ { 6142, _gloffset_MultiTexCoord3dARB },
+ { 6187, _gloffset_MultiTexCoord2iARB },
+ { 6311, _gloffset_MultiTexCoord2svARB },
+ { 8311, _gloffset_MultiTexCoord2fARB },
+ { 10371, _gloffset_MultiTexCoord3fvARB },
+ { 10973, _gloffset_MultiTexCoord4sARB },
+ { 11654, _gloffset_MultiTexCoord2dvARB },
+ { 12069, _gloffset_MultiTexCoord1svARB },
+ { 12480, _gloffset_MultiTexCoord3svARB },
+ { 12541, _gloffset_MultiTexCoord4iARB },
+ { 13342, _gloffset_MultiTexCoord3iARB },
+ { 14141, _gloffset_MultiTexCoord1dARB },
+ { 14358, _gloffset_MultiTexCoord3dvARB },
+ { 15637, _gloffset_MultiTexCoord3ivARB },
+ { 15682, _gloffset_MultiTexCoord2sARB },
+ { 17067, _gloffset_MultiTexCoord4ivARB },
+ { 19080, _gloffset_ClientActiveTextureARB },
+ { 21380, _gloffset_MultiTexCoord2dARB },
+ { 21817, _gloffset_MultiTexCoord4dvARB },
+ { 22173, _gloffset_MultiTexCoord4fvARB },
+ { 23123, _gloffset_MultiTexCoord3fARB },
+ { 25693, _gloffset_MultiTexCoord4dARB },
+ { 25959, _gloffset_MultiTexCoord1sARB },
+ { 26163, _gloffset_MultiTexCoord1dvARB },
+ { 27171, _gloffset_MultiTexCoord1ivARB },
+ { 27264, _gloffset_MultiTexCoord2ivARB },
+ { 27603, _gloffset_MultiTexCoord1iARB },
+ { 29019, _gloffset_MultiTexCoord4svARB },
+ { 29593, _gloffset_MultiTexCoord1fARB },
+ { 29856, _gloffset_MultiTexCoord4fARB },
+ { 32314, _gloffset_MultiTexCoord2fvARB },
{ -1, -1 }
};
@@ -5329,7 +5384,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[] = {
- { 9243, -1 }, /* TbufferMask3DFX */
+ { 9213, -1 }, /* TbufferMask3DFX */
{ -1, -1 }
};
#endif
@@ -5362,6 +5417,13 @@ static const struct gl_function_remap GL_APPLE_vertex_array_object_functions[] =
};
#endif
+#if defined(need_GL_ARB_ES2_compatibility)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_ARB_ES2_compatibility_functions[] = {
+ { -1, -1 }
+};
+#endif
+
#if defined(need_GL_ARB_copy_buffer)
/* functions defined in MESA_remap_table_functions are excluded */
static const struct gl_function_remap GL_ARB_copy_buffer_functions[] = {
@@ -5376,6 +5438,13 @@ static const struct gl_function_remap GL_ARB_draw_buffers_functions[] = {
};
#endif
+#if defined(need_GL_ARB_draw_buffers_blend)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_ARB_draw_buffers_blend_functions[] = {
+ { -1, -1 }
+};
+#endif
+
#if defined(need_GL_ARB_draw_elements_base_vertex)
/* functions defined in MESA_remap_table_functions are excluded */
static const struct gl_function_remap GL_ARB_draw_elements_base_vertex_functions[] = {
@@ -5400,7 +5469,14 @@ static const struct gl_function_remap GL_ARB_framebuffer_object_functions[] = {
#if defined(need_GL_ARB_geometry_shader4)
/* functions defined in MESA_remap_table_functions are excluded */
static const struct gl_function_remap GL_ARB_geometry_shader4_functions[] = {
- { 12399, -1 }, /* FramebufferTextureLayer */
+ { 12444, -1 }, /* FramebufferTextureLayer */
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_ARB_instanced_arrays)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_ARB_instanced_arrays_functions[] = {
{ -1, -1 }
};
#endif
@@ -5414,11 +5490,11 @@ static const struct gl_function_remap GL_ARB_map_buffer_range_functions[] = {
#if defined(need_GL_ARB_matrix_palette)
static const struct gl_function_remap GL_ARB_matrix_palette_functions[] = {
- { 3773, -1 }, /* MatrixIndexusvARB */
- { 13087, -1 }, /* MatrixIndexuivARB */
- { 14475, -1 }, /* MatrixIndexPointerARB */
- { 19735, -1 }, /* CurrentPaletteMatrixARB */
- { 22767, -1 }, /* MatrixIndexubvARB */
+ { 3812, -1 }, /* MatrixIndexusvARB */
+ { 13163, -1 }, /* MatrixIndexuivARB */
+ { 14513, -1 }, /* MatrixIndexPointerARB */
+ { 19818, -1 }, /* CurrentPaletteMatrixARB */
+ { 22867, -1 }, /* MatrixIndexubvARB */
{ -1, -1 }
};
#endif
@@ -5495,16 +5571,16 @@ static const struct gl_function_remap GL_ARB_vertex_array_object_functions[] = {
#if defined(need_GL_ARB_vertex_blend)
static const struct gl_function_remap GL_ARB_vertex_blend_functions[] = {
- { 2396, -1 }, /* WeightubvARB */
- { 6567, -1 }, /* WeightivARB */
- { 11070, -1 }, /* WeightPointerARB */
- { 13854, -1 }, /* WeightfvARB */
- { 17564, -1 }, /* WeightbvARB */
- { 20965, -1 }, /* WeightusvARB */
- { 23864, -1 }, /* VertexBlendARB */
- { 29396, -1 }, /* WeightsvARB */
- { 31496, -1 }, /* WeightdvARB */
- { 32239, -1 }, /* WeightuivARB */
+ { 2435, -1 }, /* WeightubvARB */
+ { 6554, -1 }, /* WeightivARB */
+ { 11076, -1 }, /* WeightPointerARB */
+ { 13898, -1 }, /* WeightfvARB */
+ { 17586, -1 }, /* WeightbvARB */
+ { 21048, -1 }, /* WeightusvARB */
+ { 23993, -1 }, /* VertexBlendARB */
+ { 29677, -1 }, /* WeightsvARB */
+ { 31738, -1 }, /* WeightdvARB */
+ { 32514, -1 }, /* WeightuivARB */
{ -1, -1 }
};
#endif
@@ -5574,7 +5650,7 @@ static const struct gl_function_remap GL_ATI_separate_stencil_functions[] = {
#if defined(need_GL_EXT_blend_color)
static const struct gl_function_remap GL_EXT_blend_color_functions[] = {
- { 2655, _gloffset_BlendColor },
+ { 2694, _gloffset_BlendColor },
{ -1, -1 }
};
#endif
@@ -5595,15 +5671,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[] = {
- { 11205, _gloffset_BlendEquation },
+ { 11211, _gloffset_BlendEquation },
{ -1, -1 }
};
#endif
#if defined(need_GL_EXT_color_subtable)
static const struct gl_function_remap GL_EXT_color_subtable_functions[] = {
- { 16988, _gloffset_ColorSubTable },
- { 31446, _gloffset_CopyColorSubTable },
+ { 17010, _gloffset_ColorSubTable },
+ { 31688, _gloffset_CopyColorSubTable },
{ -1, -1 }
};
#endif
@@ -5617,66 +5693,66 @@ static const struct gl_function_remap GL_EXT_compiled_vertex_array_functions[] =
#if defined(need_GL_EXT_convolution)
static const struct gl_function_remap GL_EXT_convolution_functions[] = {
- { 257, _gloffset_ConvolutionFilter1D },
- { 2454, _gloffset_CopyConvolutionFilter1D },
- { 4058, _gloffset_GetConvolutionParameteriv },
- { 8523, _gloffset_ConvolutionFilter2D },
- { 8725, _gloffset_ConvolutionParameteriv },
- { 9185, _gloffset_ConvolutionParameterfv },
- { 20501, _gloffset_GetSeparableFilter },
- { 23938, _gloffset_SeparableFilter2D },
- { 24801, _gloffset_ConvolutionParameteri },
- { 24924, _gloffset_ConvolutionParameterf },
- { 26595, _gloffset_GetConvolutionParameterfv },
- { 27417, _gloffset_GetConvolutionFilter },
- { 29810, _gloffset_CopyConvolutionFilter2D },
+ { 296, _gloffset_ConvolutionFilter1D },
+ { 2493, _gloffset_CopyConvolutionFilter1D },
+ { 4097, _gloffset_GetConvolutionParameteriv },
+ { 8493, _gloffset_ConvolutionFilter2D },
+ { 8695, _gloffset_ConvolutionParameteriv },
+ { 9155, _gloffset_ConvolutionParameterfv },
+ { 20584, _gloffset_GetSeparableFilter },
+ { 24067, _gloffset_SeparableFilter2D },
+ { 24930, _gloffset_ConvolutionParameteri },
+ { 25053, _gloffset_ConvolutionParameterf },
+ { 26757, _gloffset_GetConvolutionParameterfv },
+ { 27646, _gloffset_GetConvolutionFilter },
+ { 30091, _gloffset_CopyConvolutionFilter2D },
{ -1, -1 }
};
#endif
#if defined(need_GL_EXT_coordinate_frame)
static const struct gl_function_remap GL_EXT_coordinate_frame_functions[] = {
- { 10493, -1 }, /* TangentPointerEXT */
- { 12554, -1 }, /* Binormal3ivEXT */
- { 13219, -1 }, /* Tangent3sEXT */
- { 14540, -1 }, /* Tangent3fvEXT */
- { 18695, -1 }, /* Tangent3dvEXT */
- { 19433, -1 }, /* Binormal3bvEXT */
- { 20554, -1 }, /* Binormal3dEXT */
- { 22699, -1 }, /* Tangent3fEXT */
- { 24873, -1 }, /* Binormal3sEXT */
- { 25341, -1 }, /* Tangent3ivEXT */
- { 25360, -1 }, /* Tangent3dEXT */
- { 26274, -1 }, /* Binormal3svEXT */
- { 26840, -1 }, /* Binormal3fEXT */
- { 27728, -1 }, /* Binormal3dvEXT */
- { 28995, -1 }, /* Tangent3iEXT */
- { 30095, -1 }, /* Tangent3bvEXT */
- { 30655, -1 }, /* Tangent3bEXT */
- { 31219, -1 }, /* Binormal3fvEXT */
- { 31938, -1 }, /* BinormalPointerEXT */
- { 32343, -1 }, /* Tangent3svEXT */
- { 32780, -1 }, /* Binormal3bEXT */
- { 32957, -1 }, /* Binormal3iEXT */
+ { 10510, -1 }, /* TangentPointerEXT */
+ { 12599, -1 }, /* Binormal3ivEXT */
+ { 13295, -1 }, /* Tangent3sEXT */
+ { 14578, -1 }, /* Tangent3fvEXT */
+ { 18778, -1 }, /* Tangent3dvEXT */
+ { 19516, -1 }, /* Binormal3bvEXT */
+ { 20637, -1 }, /* Binormal3dEXT */
+ { 22799, -1 }, /* Tangent3fEXT */
+ { 25002, -1 }, /* Binormal3sEXT */
+ { 25470, -1 }, /* Tangent3ivEXT */
+ { 25489, -1 }, /* Tangent3dEXT */
+ { 26436, -1 }, /* Binormal3svEXT */
+ { 27069, -1 }, /* Binormal3fEXT */
+ { 27957, -1 }, /* Binormal3dvEXT */
+ { 29276, -1 }, /* Tangent3iEXT */
+ { 30376, -1 }, /* Tangent3bvEXT */
+ { 30936, -1 }, /* Tangent3bEXT */
+ { 31461, -1 }, /* Binormal3fvEXT */
+ { 32213, -1 }, /* BinormalPointerEXT */
+ { 32618, -1 }, /* Tangent3svEXT */
+ { 33055, -1 }, /* Binormal3bEXT */
+ { 33232, -1 }, /* Binormal3iEXT */
{ -1, -1 }
};
#endif
#if defined(need_GL_EXT_copy_texture)
static const struct gl_function_remap GL_EXT_copy_texture_functions[] = {
- { 15065, _gloffset_CopyTexSubImage3D },
- { 16675, _gloffset_CopyTexImage2D },
- { 24409, _gloffset_CopyTexImage1D },
- { 27098, _gloffset_CopyTexSubImage2D },
- { 29448, _gloffset_CopyTexSubImage1D },
+ { 15103, _gloffset_CopyTexSubImage3D },
+ { 16697, _gloffset_CopyTexImage2D },
+ { 24538, _gloffset_CopyTexImage1D },
+ { 27327, _gloffset_CopyTexSubImage2D },
+ { 29729, _gloffset_CopyTexSubImage1D },
{ -1, -1 }
};
#endif
#if defined(need_GL_EXT_cull_vertex)
static const struct gl_function_remap GL_EXT_cull_vertex_functions[] = {
- { 8874, -1 }, /* CullParameterdvEXT */
- { 11693, -1 }, /* CullParameterfvEXT */
+ { 8844, -1 }, /* CullParameterdvEXT */
+ { 11699, -1 }, /* CullParameterfvEXT */
{ -1, -1 }
};
#endif
@@ -5704,7 +5780,7 @@ static const struct gl_function_remap GL_EXT_draw_instanced_functions[] = {
#if defined(need_GL_EXT_draw_range_elements)
static const struct gl_function_remap GL_EXT_draw_range_elements_functions[] = {
- { 9522, _gloffset_DrawRangeElements },
+ { 9492, _gloffset_DrawRangeElements },
{ -1, -1 }
};
#endif
@@ -5753,39 +5829,39 @@ static const struct gl_function_remap GL_EXT_gpu_shader4_functions[] = {
#if defined(need_GL_EXT_histogram)
static const struct gl_function_remap GL_EXT_histogram_functions[] = {
- { 856, _gloffset_Histogram },
- { 3522, _gloffset_ResetHistogram },
- { 9972, _gloffset_GetMinmax },
- { 15399, _gloffset_GetHistogramParameterfv },
- { 24334, _gloffset_GetMinmaxParameteriv },
- { 26485, _gloffset_ResetMinmax },
- { 27314, _gloffset_GetHistogramParameteriv },
- { 28463, _gloffset_GetHistogram },
- { 31032, _gloffset_Minmax },
- { 32578, _gloffset_GetMinmaxParameterfv },
+ { 895, _gloffset_Histogram },
+ { 3561, _gloffset_ResetHistogram },
+ { 9989, _gloffset_GetMinmax },
+ { 15437, _gloffset_GetHistogramParameterfv },
+ { 24463, _gloffset_GetMinmaxParameteriv },
+ { 26647, _gloffset_ResetMinmax },
+ { 27543, _gloffset_GetHistogramParameteriv },
+ { 28744, _gloffset_GetHistogram },
+ { 31313, _gloffset_Minmax },
+ { 32853, _gloffset_GetMinmaxParameterfv },
{ -1, -1 }
};
#endif
#if defined(need_GL_EXT_index_func)
static const struct gl_function_remap GL_EXT_index_func_functions[] = {
- { 11479, -1 }, /* IndexFuncEXT */
+ { 11485, -1 }, /* IndexFuncEXT */
{ -1, -1 }
};
#endif
#if defined(need_GL_EXT_index_material)
static const struct gl_function_remap GL_EXT_index_material_functions[] = {
- { 21052, -1 }, /* IndexMaterialEXT */
+ { 21135, -1 }, /* IndexMaterialEXT */
{ -1, -1 }
};
#endif
#if defined(need_GL_EXT_light_texture)
static const struct gl_function_remap GL_EXT_light_texture_functions[] = {
- { 26294, -1 }, /* ApplyTextureEXT */
- { 26439, -1 }, /* TextureMaterialEXT */
- { 26464, -1 }, /* TextureLightEXT */
+ { 26456, -1 }, /* ApplyTextureEXT */
+ { 26601, -1 }, /* TextureMaterialEXT */
+ { 26626, -1 }, /* TextureLightEXT */
{ -1, -1 }
};
#endif
@@ -5806,20 +5882,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[] = {
- { 8385, _gloffset_ColorTable },
- { 15245, _gloffset_GetColorTable },
- { 22882, _gloffset_GetColorTableParameterfv },
- { 24980, _gloffset_GetColorTableParameteriv },
+ { 8355, _gloffset_ColorTable },
+ { 15283, _gloffset_GetColorTable },
+ { 22982, _gloffset_GetColorTableParameterfv },
+ { 25109, _gloffset_GetColorTableParameteriv },
{ -1, -1 }
};
#endif
#if defined(need_GL_EXT_pixel_transform)
static const struct gl_function_remap GL_EXT_pixel_transform_functions[] = {
- { 21682, -1 }, /* PixelTransformParameterfEXT */
- { 21762, -1 }, /* PixelTransformParameteriEXT */
- { 30370, -1 }, /* PixelTransformParameterfvEXT */
- { 31902, -1 }, /* PixelTransformParameterivEXT */
+ { 21782, -1 }, /* PixelTransformParameterfEXT */
+ { 21862, -1 }, /* PixelTransformParameteriEXT */
+ { 30651, -1 }, /* PixelTransformParameterfvEXT */
+ { 32177, -1 }, /* PixelTransformParameterivEXT */
{ -1, -1 }
};
#endif
@@ -5868,16 +5944,16 @@ static const struct gl_function_remap GL_EXT_stencil_two_side_functions[] = {
#if defined(need_GL_EXT_subtexture)
static const struct gl_function_remap GL_EXT_subtexture_functions[] = {
- { 7106, _gloffset_TexSubImage1D },
- { 10649, _gloffset_TexSubImage2D },
+ { 7076, _gloffset_TexSubImage1D },
+ { 10666, _gloffset_TexSubImage2D },
{ -1, -1 }
};
#endif
#if defined(need_GL_EXT_texture3D)
static const struct gl_function_remap GL_EXT_texture3D_functions[] = {
- { 1774, _gloffset_TexImage3D },
- { 22651, _gloffset_TexSubImage3D },
+ { 1813, _gloffset_TexImage3D },
+ { 22751, _gloffset_TexSubImage3D },
{ -1, -1 }
};
#endif
@@ -5898,19 +5974,19 @@ static const struct gl_function_remap GL_EXT_texture_integer_functions[] = {
#if defined(need_GL_EXT_texture_object)
static const struct gl_function_remap GL_EXT_texture_object_functions[] = {
- { 3290, _gloffset_PrioritizeTextures },
- { 7555, _gloffset_AreTexturesResident },
- { 13562, _gloffset_GenTextures },
- { 15731, _gloffset_DeleteTextures },
- { 19486, _gloffset_IsTexture },
- { 29513, _gloffset_BindTexture },
+ { 3329, _gloffset_PrioritizeTextures },
+ { 7525, _gloffset_AreTexturesResident },
+ { 13638, _gloffset_GenTextures },
+ { 15769, _gloffset_DeleteTextures },
+ { 19569, _gloffset_IsTexture },
+ { 29794, _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[] = {
- { 13804, -1 }, /* TextureNormalEXT */
+ { 13848, -1 }, /* TextureNormalEXT */
{ -1, -1 }
};
#endif
@@ -5932,30 +6008,30 @@ static const struct gl_function_remap GL_EXT_transform_feedback_functions[] = {
#if defined(need_GL_EXT_vertex_array)
/* functions defined in MESA_remap_table_functions are excluded */
static const struct gl_function_remap GL_EXT_vertex_array_functions[] = {
- { 24110, _gloffset_ArrayElement },
- { 30620, _gloffset_GetPointerv },
- { 32205, _gloffset_DrawArrays },
+ { 24239, _gloffset_ArrayElement },
+ { 30901, _gloffset_GetPointerv },
+ { 32480, _gloffset_DrawArrays },
{ -1, -1 }
};
#endif
#if defined(need_GL_EXT_vertex_weighting)
static const struct gl_function_remap GL_EXT_vertex_weighting_functions[] = {
- { 19516, -1 }, /* VertexWeightfvEXT */
- { 26818, -1 }, /* VertexWeightfEXT */
- { 28432, -1 }, /* VertexWeightPointerEXT */
+ { 19599, -1 }, /* VertexWeightfvEXT */
+ { 27012, -1 }, /* VertexWeightfEXT */
+ { 28713, -1 }, /* VertexWeightPointerEXT */
{ -1, -1 }
};
#endif
#if defined(need_GL_HP_image_transform)
static const struct gl_function_remap GL_HP_image_transform_functions[] = {
- { 2327, -1 }, /* GetImageTransformParameterfvHP */
- { 3739, -1 }, /* ImageTransformParameterfHP */
- { 10187, -1 }, /* ImageTransformParameterfvHP */
- { 11948, -1 }, /* ImageTransformParameteriHP */
- { 12289, -1 }, /* GetImageTransformParameterivHP */
- { 19580, -1 }, /* ImageTransformParameterivHP */
+ { 2366, -1 }, /* GetImageTransformParameterfvHP */
+ { 3778, -1 }, /* ImageTransformParameterfHP */
+ { 10204, -1 }, /* ImageTransformParameterfvHP */
+ { 11954, -1 }, /* ImageTransformParameteriHP */
+ { 12334, -1 }, /* GetImageTransformParameterivHP */
+ { 19663, -1 }, /* ImageTransformParameterivHP */
{ -1, -1 }
};
#endif
@@ -5969,14 +6045,14 @@ static const struct gl_function_remap GL_IBM_multimode_draw_arrays_functions[] =
#if defined(need_GL_IBM_vertex_array_lists)
static const struct gl_function_remap GL_IBM_vertex_array_lists_functions[] = {
- { 4379, -1 }, /* SecondaryColorPointerListIBM */
- { 6021, -1 }, /* NormalPointerListIBM */
- { 7729, -1 }, /* FogCoordPointerListIBM */
- { 8036, -1 }, /* VertexPointerListIBM */
- { 11869, -1 }, /* ColorPointerListIBM */
- { 13326, -1 }, /* TexCoordPointerListIBM */
- { 13826, -1 }, /* IndexPointerListIBM */
- { 32521, -1 }, /* EdgeFlagPointerListIBM */
+ { 4366, -1 }, /* SecondaryColorPointerListIBM */
+ { 6008, -1 }, /* NormalPointerListIBM */
+ { 7699, -1 }, /* FogCoordPointerListIBM */
+ { 8006, -1 }, /* VertexPointerListIBM */
+ { 11875, -1 }, /* ColorPointerListIBM */
+ { 13402, -1 }, /* TexCoordPointerListIBM */
+ { 13870, -1 }, /* IndexPointerListIBM */
+ { 32796, -1 }, /* EdgeFlagPointerListIBM */
{ -1, -1 }
};
#endif
@@ -5990,10 +6066,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[] = {
- { 12666, -1 }, /* VertexPointervINTEL */
- { 15492, -1 }, /* ColorPointervINTEL */
- { 29784, -1 }, /* NormalPointervINTEL */
- { 30302, -1 }, /* TexCoordPointervINTEL */
+ { 12742, -1 }, /* VertexPointervINTEL */
+ { 15530, -1 }, /* ColorPointervINTEL */
+ { 30065, -1 }, /* NormalPointervINTEL */
+ { 30583, -1 }, /* TexCoordPointervINTEL */
{ -1, -1 }
};
#endif
@@ -6007,10 +6083,10 @@ static const struct gl_function_remap GL_MESA_resize_buffers_functions[] = {
#if defined(need_GL_MESA_shader_debug)
static const struct gl_function_remap GL_MESA_shader_debug_functions[] = {
- { 1638, -1 }, /* GetDebugLogLengthMESA */
- { 3461, -1 }, /* ClearDebugLogMESA */
- { 4540, -1 }, /* GetDebugLogMESA */
- { 30813, -1 }, /* CreateDebugObjectMESA */
+ { 1677, -1 }, /* GetDebugLogLengthMESA */
+ { 3500, -1 }, /* ClearDebugLogMESA */
+ { 4527, -1 }, /* GetDebugLogMESA */
+ { 31094, -1 }, /* CreateDebugObjectMESA */
{ -1, -1 }
};
#endif
@@ -6031,15 +6107,15 @@ static const struct gl_function_remap GL_NV_condtitional_render_functions[] = {
#if defined(need_GL_NV_evaluators)
static const struct gl_function_remap GL_NV_evaluators_functions[] = {
- { 6768, -1 }, /* GetMapAttribParameterivNV */
- { 8491, -1 }, /* MapControlPointsNV */
- { 8590, -1 }, /* MapParameterfvNV */
- { 10632, -1 }, /* EvalMapsNV */
- { 17162, -1 }, /* GetMapAttribParameterfvNV */
- { 17379, -1 }, /* MapParameterivNV */
- { 24724, -1 }, /* GetMapParameterivNV */
- { 25222, -1 }, /* GetMapParameterfvNV */
- { 29099, -1 }, /* GetMapControlPointsNV */
+ { 6738, -1 }, /* GetMapAttribParameterivNV */
+ { 8461, -1 }, /* MapControlPointsNV */
+ { 8560, -1 }, /* MapParameterfvNV */
+ { 10649, -1 }, /* EvalMapsNV */
+ { 17184, -1 }, /* GetMapAttribParameterfvNV */
+ { 17401, -1 }, /* MapParameterivNV */
+ { 24853, -1 }, /* GetMapParameterivNV */
+ { 25351, -1 }, /* GetMapParameterfvNV */
+ { 29380, -1 }, /* GetMapControlPointsNV */
{ -1, -1 }
};
#endif
@@ -6081,8 +6157,15 @@ 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[] = {
- { 15884, -1 }, /* CombinerStageParameterfvNV */
- { 16280, -1 }, /* GetCombinerStageParameterfvNV */
+ { 15922, -1 }, /* CombinerStageParameterfvNV */
+ { 16318, -1 }, /* GetCombinerStageParameterfvNV */
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_NV_texture_barrier)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_NV_texture_barrier_functions[] = {
{ -1, -1 }
};
#endif
@@ -6110,23 +6193,23 @@ static const struct gl_function_remap GL_OES_EGL_image_functions[] = {
#if defined(need_GL_PGI_misc_hints)
static const struct gl_function_remap GL_PGI_misc_hints_functions[] = {
- { 8711, -1 }, /* HintPGI */
+ { 8681, -1 }, /* HintPGI */
{ -1, -1 }
};
#endif
#if defined(need_GL_SGIS_detail_texture)
static const struct gl_function_remap GL_SGIS_detail_texture_functions[] = {
- { 16253, -1 }, /* GetDetailTexFuncSGIS */
- { 16620, -1 }, /* DetailTexFuncSGIS */
+ { 16291, -1 }, /* GetDetailTexFuncSGIS */
+ { 16642, -1 }, /* DetailTexFuncSGIS */
{ -1, -1 }
};
#endif
#if defined(need_GL_SGIS_fog_function)
static const struct gl_function_remap GL_SGIS_fog_function_functions[] = {
- { 27080, -1 }, /* FogFuncSGIS */
- { 27781, -1 }, /* GetFogFuncSGIS */
+ { 27309, -1 }, /* FogFuncSGIS */
+ { 28062, -1 }, /* GetFogFuncSGIS */
{ -1, -1 }
};
#endif
@@ -6154,112 +6237,112 @@ static const struct gl_function_remap GL_SGIS_point_parameters_functions[] = {
#if defined(need_GL_SGIS_sharpen_texture)
static const struct gl_function_remap GL_SGIS_sharpen_texture_functions[] = {
- { 6829, -1 }, /* GetSharpenTexFuncSGIS */
- { 22047, -1 }, /* SharpenTexFuncSGIS */
+ { 6799, -1 }, /* GetSharpenTexFuncSGIS */
+ { 22147, -1 }, /* SharpenTexFuncSGIS */
{ -1, -1 }
};
#endif
#if defined(need_GL_SGIS_texture4D)
static const struct gl_function_remap GL_SGIS_texture4D_functions[] = {
- { 1010, -1 }, /* TexImage4DSGIS */
- { 15800, -1 }, /* TexSubImage4DSGIS */
+ { 1049, -1 }, /* TexImage4DSGIS */
+ { 15838, -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[] = {
- { 15198, -1 }, /* TextureColorMaskSGIS */
+ { 15236, -1 }, /* TextureColorMaskSGIS */
{ -1, -1 }
};
#endif
#if defined(need_GL_SGIS_texture_filter4)
static const struct gl_function_remap GL_SGIS_texture_filter4_functions[] = {
- { 7006, -1 }, /* GetTexFilterFuncSGIS */
- { 16399, -1 }, /* TexFilterFuncSGIS */
+ { 6976, -1 }, /* GetTexFilterFuncSGIS */
+ { 16437, -1 }, /* TexFilterFuncSGIS */
{ -1, -1 }
};
#endif
#if defined(need_GL_SGIX_async)
static const struct gl_function_remap GL_SGIX_async_functions[] = {
- { 3387, -1 }, /* AsyncMarkerSGIX */
- { 4519, -1 }, /* FinishAsyncSGIX */
- { 5466, -1 }, /* PollAsyncSGIX */
- { 22228, -1 }, /* DeleteAsyncMarkersSGIX */
- { 22283, -1 }, /* IsAsyncMarkerSGIX */
- { 32318, -1 }, /* GenAsyncMarkersSGIX */
+ { 3426, -1 }, /* AsyncMarkerSGIX */
+ { 4506, -1 }, /* FinishAsyncSGIX */
+ { 5495, -1 }, /* PollAsyncSGIX */
+ { 22328, -1 }, /* DeleteAsyncMarkersSGIX */
+ { 22383, -1 }, /* IsAsyncMarkerSGIX */
+ { 32593, -1 }, /* GenAsyncMarkersSGIX */
{ -1, -1 }
};
#endif
#if defined(need_GL_SGIX_flush_raster)
static const struct gl_function_remap GL_SGIX_flush_raster_functions[] = {
- { 7383, -1 }, /* FlushRasterSGIX */
+ { 7353, -1 }, /* FlushRasterSGIX */
{ -1, -1 }
};
#endif
#if defined(need_GL_SGIX_fragment_lighting)
static const struct gl_function_remap GL_SGIX_fragment_lighting_functions[] = {
- { 2625, -1 }, /* FragmentMaterialfvSGIX */
- { 5370, -1 }, /* FragmentLightiSGIX */
- { 8103, -1 }, /* FragmentMaterialfSGIX */
- { 8264, -1 }, /* GetFragmentLightivSGIX */
- { 9137, -1 }, /* FragmentLightModeliSGIX */
- { 10695, -1 }, /* FragmentLightivSGIX */
- { 11013, -1 }, /* GetFragmentMaterialivSGIX */
- { 16193, -1 }, /* GetFragmentMaterialfvSGIX */
- { 19403, -1 }, /* FragmentLightModelfSGIX */
- { 19703, -1 }, /* FragmentColorMaterialSGIX */
- { 20120, -1 }, /* FragmentMaterialiSGIX */
- { 21380, -1 }, /* LightEnviSGIX */
- { 22974, -1 }, /* FragmentLightModelfvSGIX */
- { 23309, -1 }, /* FragmentLightfvSGIX */
- { 28165, -1 }, /* FragmentLightModelivSGIX */
- { 28314, -1 }, /* FragmentLightfSGIX */
- { 31189, -1 }, /* GetFragmentLightfvSGIX */
- { 32801, -1 }, /* FragmentMaterialivSGIX */
+ { 2664, -1 }, /* FragmentMaterialfvSGIX */
+ { 5399, -1 }, /* FragmentLightiSGIX */
+ { 8073, -1 }, /* FragmentMaterialfSGIX */
+ { 8234, -1 }, /* GetFragmentLightivSGIX */
+ { 9107, -1 }, /* FragmentLightModeliSGIX */
+ { 10712, -1 }, /* FragmentLightivSGIX */
+ { 11019, -1 }, /* GetFragmentMaterialivSGIX */
+ { 16231, -1 }, /* GetFragmentMaterialfvSGIX */
+ { 19486, -1 }, /* FragmentLightModelfSGIX */
+ { 19786, -1 }, /* FragmentColorMaterialSGIX */
+ { 20203, -1 }, /* FragmentMaterialiSGIX */
+ { 21463, -1 }, /* LightEnviSGIX */
+ { 23074, -1 }, /* FragmentLightModelfvSGIX */
+ { 23409, -1 }, /* FragmentLightfvSGIX */
+ { 28446, -1 }, /* FragmentLightModelivSGIX */
+ { 28595, -1 }, /* FragmentLightfSGIX */
+ { 31431, -1 }, /* GetFragmentLightfvSGIX */
+ { 33076, -1 }, /* FragmentMaterialivSGIX */
{ -1, -1 }
};
#endif
#if defined(need_GL_SGIX_framezoom)
static const struct gl_function_remap GL_SGIX_framezoom_functions[] = {
- { 22306, -1 }, /* FrameZoomSGIX */
+ { 22406, -1 }, /* FrameZoomSGIX */
{ -1, -1 }
};
#endif
#if defined(need_GL_SGIX_igloo_interface)
static const struct gl_function_remap GL_SGIX_igloo_interface_functions[] = {
- { 28622, -1 }, /* IglooInterfaceSGIX */
+ { 28903, -1 }, /* IglooInterfaceSGIX */
{ -1, -1 }
};
#endif
#if defined(need_GL_SGIX_instruments)
static const struct gl_function_remap GL_SGIX_instruments_functions[] = {
- { 2805, -1 }, /* ReadInstrumentsSGIX */
- { 6585, -1 }, /* PollInstrumentsSGIX */
- { 10553, -1 }, /* GetInstrumentsSGIX */
- { 12924, -1 }, /* StartInstrumentsSGIX */
- { 15918, -1 }, /* StopInstrumentsSGIX */
- { 17777, -1 }, /* InstrumentsBufferSGIX */
+ { 2844, -1 }, /* ReadInstrumentsSGIX */
+ { 6572, -1 }, /* PollInstrumentsSGIX */
+ { 10570, -1 }, /* GetInstrumentsSGIX */
+ { 13000, -1 }, /* StartInstrumentsSGIX */
+ { 15956, -1 }, /* StopInstrumentsSGIX */
+ { 17823, -1 }, /* InstrumentsBufferSGIX */
{ -1, -1 }
};
#endif
#if defined(need_GL_SGIX_list_priority)
static const struct gl_function_remap GL_SGIX_list_priority_functions[] = {
- { 1241, -1 }, /* ListParameterfSGIX */
- { 3089, -1 }, /* GetListParameterfvSGIX */
- { 17692, -1 }, /* ListParameteriSGIX */
- { 18645, -1 }, /* ListParameterfvSGIX */
- { 20786, -1 }, /* ListParameterivSGIX */
- { 32362, -1 }, /* GetListParameterivSGIX */
+ { 1280, -1 }, /* ListParameterfSGIX */
+ { 3128, -1 }, /* GetListParameterfvSGIX */
+ { 17714, -1 }, /* ListParameteriSGIX */
+ { 18728, -1 }, /* ListParameterfvSGIX */
+ { 20869, -1 }, /* ListParameterivSGIX */
+ { 32637, -1 }, /* GetListParameterivSGIX */
{ -1, -1 }
};
#endif
@@ -6273,134 +6356,134 @@ static const struct gl_function_remap GL_SGIX_pixel_texture_functions[] = {
#if defined(need_GL_SGIX_polynomial_ffd)
static const struct gl_function_remap GL_SGIX_polynomial_ffd_functions[] = {
- { 3685, -1 }, /* LoadIdentityDeformationMapSGIX */
- { 16018, -1 }, /* DeformSGIX */
- { 24222, -1 }, /* DeformationMap3fSGIX */
- { 31077, -1 }, /* DeformationMap3dSGIX */
+ { 3724, -1 }, /* LoadIdentityDeformationMapSGIX */
+ { 12208, -1 }, /* DeformationMap3dSGIX */
+ { 16056, -1 }, /* DeformSGIX */
+ { 24351, -1 }, /* DeformationMap3fSGIX */
{ -1, -1 }
};
#endif
#if defined(need_GL_SGIX_reference_plane)
static const struct gl_function_remap GL_SGIX_reference_plane_functions[] = {
- { 14749, -1 }, /* ReferencePlaneSGIX */
+ { 14787, -1 }, /* ReferencePlaneSGIX */
{ -1, -1 }
};
#endif
#if defined(need_GL_SGIX_sprite)
static const struct gl_function_remap GL_SGIX_sprite_functions[] = {
- { 9635, -1 }, /* SpriteParameterfvSGIX */
- { 20575, -1 }, /* SpriteParameteriSGIX */
- { 26519, -1 }, /* SpriteParameterfSGIX */
- { 29242, -1 }, /* SpriteParameterivSGIX */
+ { 9605, -1 }, /* SpriteParameterfvSGIX */
+ { 20658, -1 }, /* SpriteParameteriSGIX */
+ { 26681, -1 }, /* SpriteParameterfSGIX */
+ { 29523, -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[] = {
- { 20634, -1 }, /* TagSampleBufferSGIX */
+ { 20717, -1 }, /* TagSampleBufferSGIX */
{ -1, -1 }
};
#endif
#if defined(need_GL_SGI_color_table)
static const struct gl_function_remap GL_SGI_color_table_functions[] = {
- { 7673, _gloffset_ColorTableParameteriv },
- { 8385, _gloffset_ColorTable },
- { 15245, _gloffset_GetColorTable },
- { 15355, _gloffset_CopyColorTable },
- { 19347, _gloffset_ColorTableParameterfv },
- { 22882, _gloffset_GetColorTableParameterfv },
- { 24980, _gloffset_GetColorTableParameteriv },
+ { 7643, _gloffset_ColorTableParameteriv },
+ { 8355, _gloffset_ColorTable },
+ { 15283, _gloffset_GetColorTable },
+ { 15393, _gloffset_CopyColorTable },
+ { 19430, _gloffset_ColorTableParameterfv },
+ { 22982, _gloffset_GetColorTableParameterfv },
+ { 25109, _gloffset_GetColorTableParameteriv },
{ -1, -1 }
};
#endif
#if defined(need_GL_SUNX_constant_data)
static const struct gl_function_remap GL_SUNX_constant_data_functions[] = {
- { 31167, -1 }, /* FinishTextureSUNX */
+ { 31409, -1 }, /* FinishTextureSUNX */
{ -1, -1 }
};
#endif
#if defined(need_GL_SUN_global_alpha)
static const struct gl_function_remap GL_SUN_global_alpha_functions[] = {
- { 3408, -1 }, /* GlobalAlphaFactorubSUN */
- { 4818, -1 }, /* GlobalAlphaFactoriSUN */
- { 6610, -1 }, /* GlobalAlphaFactordSUN */
- { 9719, -1 }, /* GlobalAlphaFactoruiSUN */
- { 10144, -1 }, /* GlobalAlphaFactorbSUN */
- { 13239, -1 }, /* GlobalAlphaFactorfSUN */
- { 13403, -1 }, /* GlobalAlphaFactorusSUN */
- { 22569, -1 }, /* GlobalAlphaFactorsSUN */
+ { 3447, -1 }, /* GlobalAlphaFactorubSUN */
+ { 4805, -1 }, /* GlobalAlphaFactoriSUN */
+ { 6597, -1 }, /* GlobalAlphaFactordSUN */
+ { 9689, -1 }, /* GlobalAlphaFactoruiSUN */
+ { 10161, -1 }, /* GlobalAlphaFactorbSUN */
+ { 13315, -1 }, /* GlobalAlphaFactorfSUN */
+ { 13479, -1 }, /* GlobalAlphaFactorusSUN */
+ { 22669, -1 }, /* GlobalAlphaFactorsSUN */
{ -1, -1 }
};
#endif
#if defined(need_GL_SUN_mesh_array)
static const struct gl_function_remap GL_SUN_mesh_array_functions[] = {
- { 29033, -1 }, /* DrawMeshArraysSUN */
+ { 29314, -1 }, /* DrawMeshArraysSUN */
{ -1, -1 }
};
#endif
#if defined(need_GL_SUN_triangle_list)
static const struct gl_function_remap GL_SUN_triangle_list_functions[] = {
- { 4493, -1 }, /* ReplacementCodeubSUN */
- { 6369, -1 }, /* ReplacementCodeubvSUN */
- { 19068, -1 }, /* ReplacementCodeusvSUN */
- { 19256, -1 }, /* ReplacementCodePointerSUN */
- { 21444, -1 }, /* ReplacementCodeuiSUN */
- { 22257, -1 }, /* ReplacementCodeusSUN */
- { 29699, -1 }, /* ReplacementCodeuivSUN */
+ { 4480, -1 }, /* ReplacementCodeubSUN */
+ { 6356, -1 }, /* ReplacementCodeubvSUN */
+ { 19151, -1 }, /* ReplacementCodeusvSUN */
+ { 19339, -1 }, /* ReplacementCodePointerSUN */
+ { 21527, -1 }, /* ReplacementCodeuiSUN */
+ { 22357, -1 }, /* ReplacementCodeusSUN */
+ { 29980, -1 }, /* ReplacementCodeuivSUN */
{ -1, -1 }
};
#endif
#if defined(need_GL_SUN_vertex)
static const struct gl_function_remap GL_SUN_vertex_functions[] = {
- { 1115, -1 }, /* ReplacementCodeuiColor3fVertex3fvSUN */
- { 1313, -1 }, /* TexCoord4fColor4fNormal3fVertex4fvSUN */
- { 1539, -1 }, /* TexCoord2fColor4ubVertex3fvSUN */
- { 1869, -1 }, /* ReplacementCodeuiVertex3fvSUN */
- { 2003, -1 }, /* ReplacementCodeuiTexCoord2fVertex3fvSUN */
- { 2561, -1 }, /* ReplacementCodeuiNormal3fVertex3fSUN */
- { 2874, -1 }, /* Color4ubVertex3fvSUN */
- { 4652, -1 }, /* Color4ubVertex3fSUN */
- { 4775, -1 }, /* TexCoord2fVertex3fSUN */
- { 5119, -1 }, /* TexCoord2fColor4fNormal3fVertex3fSUN */
- { 5570, -1 }, /* TexCoord2fNormal3fVertex3fvSUN */
- { 6264, -1 }, /* ReplacementCodeuiTexCoord2fNormal3fVertex3fSUN */
- { 7061, -1 }, /* ReplacementCodeuiColor4ubVertex3fvSUN */
- { 7420, -1 }, /* ReplacementCodeuiTexCoord2fVertex3fSUN */
- { 8132, -1 }, /* TexCoord2fNormal3fVertex3fSUN */
- { 8936, -1 }, /* Color3fVertex3fSUN */
- { 10080, -1 }, /* Color3fVertex3fvSUN */
- { 10518, -1 }, /* Color4fNormal3fVertex3fvSUN */
- { 11358, -1 }, /* ReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN */
- { 12787, -1 }, /* ReplacementCodeuiColor4fNormal3fVertex3fvSUN */
- { 14398, -1 }, /* ReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN */
- { 14891, -1 }, /* TexCoord2fColor3fVertex3fSUN */
- { 15943, -1 }, /* TexCoord4fColor4fNormal3fVertex4fSUN */
- { 16358, -1 }, /* Color4ubVertex2fvSUN */
- { 16645, -1 }, /* Normal3fVertex3fSUN */
- { 17718, -1 }, /* ReplacementCodeuiColor4fNormal3fVertex3fSUN */
- { 18079, -1 }, /* TexCoord2fColor4fNormal3fVertex3fvSUN */
- { 18897, -1 }, /* TexCoord2fVertex3fvSUN */
- { 19673, -1 }, /* Color4ubVertex2fSUN */
- { 19911, -1 }, /* ReplacementCodeuiColor4ubVertex3fSUN */
- { 21893, -1 }, /* TexCoord2fColor4ubVertex3fSUN */
- { 22325, -1 }, /* Normal3fVertex3fvSUN */
- { 22791, -1 }, /* Color4fNormal3fVertex3fSUN */
- { 23771, -1 }, /* ReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN */
- { 25840, -1 }, /* ReplacementCodeuiColor3fVertex3fSUN */
- { 27196, -1 }, /* TexCoord4fVertex4fSUN */
- { 27622, -1 }, /* TexCoord2fColor3fVertex3fvSUN */
- { 28009, -1 }, /* ReplacementCodeuiNormal3fVertex3fvSUN */
- { 28136, -1 }, /* TexCoord4fVertex4fvSUN */
- { 28870, -1 }, /* ReplacementCodeuiVertex3fSUN */
+ { 1154, -1 }, /* ReplacementCodeuiColor3fVertex3fvSUN */
+ { 1352, -1 }, /* TexCoord4fColor4fNormal3fVertex4fvSUN */
+ { 1578, -1 }, /* TexCoord2fColor4ubVertex3fvSUN */
+ { 1908, -1 }, /* ReplacementCodeuiVertex3fvSUN */
+ { 2042, -1 }, /* ReplacementCodeuiTexCoord2fVertex3fvSUN */
+ { 2600, -1 }, /* ReplacementCodeuiNormal3fVertex3fSUN */
+ { 2913, -1 }, /* Color4ubVertex3fvSUN */
+ { 4639, -1 }, /* Color4ubVertex3fSUN */
+ { 4762, -1 }, /* TexCoord2fVertex3fSUN */
+ { 5106, -1 }, /* TexCoord2fColor4fNormal3fVertex3fSUN */
+ { 5599, -1 }, /* TexCoord2fNormal3fVertex3fvSUN */
+ { 6251, -1 }, /* ReplacementCodeuiTexCoord2fNormal3fVertex3fSUN */
+ { 7031, -1 }, /* ReplacementCodeuiColor4ubVertex3fvSUN */
+ { 7390, -1 }, /* ReplacementCodeuiTexCoord2fVertex3fSUN */
+ { 8102, -1 }, /* TexCoord2fNormal3fVertex3fSUN */
+ { 8906, -1 }, /* Color3fVertex3fSUN */
+ { 10097, -1 }, /* Color3fVertex3fvSUN */
+ { 10535, -1 }, /* Color4fNormal3fVertex3fvSUN */
+ { 11364, -1 }, /* ReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN */
+ { 12863, -1 }, /* ReplacementCodeuiColor4fNormal3fVertex3fvSUN */
+ { 14403, -1 }, /* ReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN */
+ { 14929, -1 }, /* TexCoord2fColor3fVertex3fSUN */
+ { 15981, -1 }, /* TexCoord4fColor4fNormal3fVertex4fSUN */
+ { 16396, -1 }, /* Color4ubVertex2fvSUN */
+ { 16667, -1 }, /* Normal3fVertex3fSUN */
+ { 17764, -1 }, /* ReplacementCodeuiColor4fNormal3fVertex3fSUN */
+ { 18125, -1 }, /* TexCoord2fColor4fNormal3fVertex3fvSUN */
+ { 18980, -1 }, /* TexCoord2fVertex3fvSUN */
+ { 19756, -1 }, /* Color4ubVertex2fSUN */
+ { 19994, -1 }, /* ReplacementCodeuiColor4ubVertex3fSUN */
+ { 21993, -1 }, /* TexCoord2fColor4ubVertex3fSUN */
+ { 22425, -1 }, /* Normal3fVertex3fvSUN */
+ { 22891, -1 }, /* Color4fNormal3fVertex3fSUN */
+ { 23900, -1 }, /* ReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN */
+ { 26002, -1 }, /* ReplacementCodeuiColor3fVertex3fSUN */
+ { 27425, -1 }, /* TexCoord4fVertex4fSUN */
+ { 27851, -1 }, /* TexCoord2fColor3fVertex3fvSUN */
+ { 28290, -1 }, /* ReplacementCodeuiNormal3fVertex3fvSUN */
+ { 28417, -1 }, /* TexCoord4fVertex4fvSUN */
+ { 29151, -1 }, /* ReplacementCodeuiVertex3fSUN */
{ -1, -1 }
};
#endif
@@ -6408,40 +6491,40 @@ static const struct gl_function_remap GL_SUN_vertex_functions[] = {
#if defined(need_GL_VERSION_1_3)
/* functions defined in MESA_remap_table_functions are excluded */
static const struct gl_function_remap GL_VERSION_1_3_functions[] = {
- { 425, _gloffset_MultiTexCoord3sARB },
- { 657, _gloffset_ActiveTextureARB },
- { 4247, _gloffset_MultiTexCoord1fvARB },
- { 6155, _gloffset_MultiTexCoord3dARB },
- { 6200, _gloffset_MultiTexCoord2iARB },
- { 6324, _gloffset_MultiTexCoord2svARB },
- { 8341, _gloffset_MultiTexCoord2fARB },
- { 10354, _gloffset_MultiTexCoord3fvARB },
- { 10967, _gloffset_MultiTexCoord4sARB },
- { 11648, _gloffset_MultiTexCoord2dvARB },
- { 12063, _gloffset_MultiTexCoord1svARB },
- { 12435, _gloffset_MultiTexCoord3svARB },
- { 12496, _gloffset_MultiTexCoord4iARB },
- { 13266, _gloffset_MultiTexCoord3iARB },
- { 14136, _gloffset_MultiTexCoord1dARB },
- { 14353, _gloffset_MultiTexCoord3dvARB },
- { 15599, _gloffset_MultiTexCoord3ivARB },
- { 15644, _gloffset_MultiTexCoord2sARB },
- { 17045, _gloffset_MultiTexCoord4ivARB },
- { 18997, _gloffset_ClientActiveTextureARB },
- { 21297, _gloffset_MultiTexCoord2dARB },
- { 21717, _gloffset_MultiTexCoord4dvARB },
- { 22073, _gloffset_MultiTexCoord4fvARB },
- { 23023, _gloffset_MultiTexCoord3fARB },
- { 25531, _gloffset_MultiTexCoord4dARB },
- { 25797, _gloffset_MultiTexCoord1sARB },
- { 26001, _gloffset_MultiTexCoord1dvARB },
- { 26942, _gloffset_MultiTexCoord1ivARB },
- { 27035, _gloffset_MultiTexCoord2ivARB },
- { 27374, _gloffset_MultiTexCoord1iARB },
- { 28738, _gloffset_MultiTexCoord4svARB },
- { 29312, _gloffset_MultiTexCoord1fARB },
- { 29575, _gloffset_MultiTexCoord4fARB },
- { 32039, _gloffset_MultiTexCoord2fvARB },
+ { 464, _gloffset_MultiTexCoord3sARB },
+ { 696, _gloffset_ActiveTextureARB },
+ { 4234, _gloffset_MultiTexCoord1fvARB },
+ { 6142, _gloffset_MultiTexCoord3dARB },
+ { 6187, _gloffset_MultiTexCoord2iARB },
+ { 6311, _gloffset_MultiTexCoord2svARB },
+ { 8311, _gloffset_MultiTexCoord2fARB },
+ { 10371, _gloffset_MultiTexCoord3fvARB },
+ { 10973, _gloffset_MultiTexCoord4sARB },
+ { 11654, _gloffset_MultiTexCoord2dvARB },
+ { 12069, _gloffset_MultiTexCoord1svARB },
+ { 12480, _gloffset_MultiTexCoord3svARB },
+ { 12541, _gloffset_MultiTexCoord4iARB },
+ { 13342, _gloffset_MultiTexCoord3iARB },
+ { 14141, _gloffset_MultiTexCoord1dARB },
+ { 14358, _gloffset_MultiTexCoord3dvARB },
+ { 15637, _gloffset_MultiTexCoord3ivARB },
+ { 15682, _gloffset_MultiTexCoord2sARB },
+ { 17067, _gloffset_MultiTexCoord4ivARB },
+ { 19080, _gloffset_ClientActiveTextureARB },
+ { 21380, _gloffset_MultiTexCoord2dARB },
+ { 21817, _gloffset_MultiTexCoord4dvARB },
+ { 22173, _gloffset_MultiTexCoord4fvARB },
+ { 23123, _gloffset_MultiTexCoord3fARB },
+ { 25693, _gloffset_MultiTexCoord4dARB },
+ { 25959, _gloffset_MultiTexCoord1sARB },
+ { 26163, _gloffset_MultiTexCoord1dvARB },
+ { 27171, _gloffset_MultiTexCoord1ivARB },
+ { 27264, _gloffset_MultiTexCoord2ivARB },
+ { 27603, _gloffset_MultiTexCoord1iARB },
+ { 29019, _gloffset_MultiTexCoord4svARB },
+ { 29593, _gloffset_MultiTexCoord1fARB },
+ { 29856, _gloffset_MultiTexCoord4fARB },
+ { 32314, _gloffset_MultiTexCoord2fvARB },
{ -1, -1 }
};
#endif
diff --git a/src/mesa/main/renderbuffer.c b/src/mesa/main/renderbuffer.c
index 3d1a8f85923..67ee589d776 100644
--- a/src/mesa/main/renderbuffer.c
+++ b/src/mesa/main/renderbuffer.c
@@ -1086,7 +1086,7 @@ _mesa_soft_renderbuffer_storage(struct gl_context *ctx, struct gl_renderbuffer *
pixelSize = sizeof(GLuint);
break;
default:
- _mesa_problem(ctx, "Bad internalFormat in _mesa_soft_renderbuffer_storage");
+ /* unsupported format */
return GL_FALSE;
}
@@ -1481,7 +1481,7 @@ _mesa_add_color_renderbuffers(struct gl_context *ctx, struct gl_framebuffer *fb,
GLboolean frontLeft, GLboolean backLeft,
GLboolean frontRight, GLboolean backRight)
{
- GLuint b;
+ gl_buffer_index b;
if (rgbBits > 16 || alphaBits > 16) {
_mesa_problem(ctx,
@@ -1545,7 +1545,7 @@ _mesa_add_alpha_renderbuffers(struct gl_context *ctx, struct gl_framebuffer *fb,
GLboolean frontLeft, GLboolean backLeft,
GLboolean frontRight, GLboolean backRight)
{
- GLuint b;
+ gl_buffer_index b;
/* for window system framebuffers only! */
assert(fb->Name == 0);
@@ -1883,10 +1883,11 @@ _mesa_add_soft_renderbuffers(struct gl_framebuffer *fb,
/**
* Attach a renderbuffer to a framebuffer.
+ * \param bufferName one of the BUFFER_x tokens
*/
void
_mesa_add_renderbuffer(struct gl_framebuffer *fb,
- GLuint bufferName, struct gl_renderbuffer *rb)
+ gl_buffer_index bufferName, struct gl_renderbuffer *rb)
{
assert(fb);
assert(rb);
@@ -1916,9 +1917,11 @@ _mesa_add_renderbuffer(struct gl_framebuffer *fb,
/**
* Remove the named renderbuffer from the given framebuffer.
+ * \param bufferName one of the BUFFER_x tokens
*/
void
-_mesa_remove_renderbuffer(struct gl_framebuffer *fb, GLuint bufferName)
+_mesa_remove_renderbuffer(struct gl_framebuffer *fb,
+ gl_buffer_index bufferName)
{
struct gl_renderbuffer *rb;
diff --git a/src/mesa/main/renderbuffer.h b/src/mesa/main/renderbuffer.h
index 62e812f93a2..4702a8e952a 100644
--- a/src/mesa/main/renderbuffer.h
+++ b/src/mesa/main/renderbuffer.h
@@ -27,6 +27,7 @@
#define RENDERBUFFER_H
#include "glheader.h"
+#include "mtypes.h"
struct gl_context;
struct gl_framebuffer;
@@ -95,10 +96,11 @@ _mesa_add_soft_renderbuffers(struct gl_framebuffer *fb,
extern void
_mesa_add_renderbuffer(struct gl_framebuffer *fb,
- GLuint bufferName, struct gl_renderbuffer *rb);
+ gl_buffer_index bufferName, struct gl_renderbuffer *rb);
extern void
-_mesa_remove_renderbuffer(struct gl_framebuffer *fb, GLuint bufferName);
+_mesa_remove_renderbuffer(struct gl_framebuffer *fb,
+ gl_buffer_index bufferName);
extern void
_mesa_reference_renderbuffer(struct gl_renderbuffer **ptr,
diff --git a/src/mesa/main/scissor.c b/src/mesa/main/scissor.c
index 4cf0bc2528c..df665994a95 100644
--- a/src/mesa/main/scissor.c
+++ b/src/mesa/main/scissor.c
@@ -25,6 +25,7 @@
#include "main/glheader.h"
#include "main/context.h"
+#include "main/mtypes.h"
#include "main/scissor.h"
diff --git a/src/mesa/main/shaderapi.c b/src/mesa/main/shaderapi.c
index 96df58d35c2..2c5f2a147ce 100644
--- a/src/mesa/main/shaderapi.c
+++ b/src/mesa/main/shaderapi.c
@@ -41,13 +41,16 @@
#include "main/dispatch.h"
#include "main/enums.h"
#include "main/hash.h"
+#include "main/mfeatures.h"
+#include "main/mtypes.h"
#include "main/shaderapi.h"
#include "main/shaderobj.h"
#include "program/program.h"
#include "program/prog_parameter.h"
#include "program/prog_uniform.h"
-#include "talloc.h"
+#include "ralloc.h"
#include <stdbool.h>
+#include "../glsl/glsl_parser_extras.h"
/** Define this to enable shader substitution (see below) */
#define SHADER_SUBST 0
@@ -1134,9 +1137,9 @@ validate_program(struct gl_context *ctx, GLuint program)
if (!shProg->Validated) {
/* update info log */
if (shProg->InfoLog) {
- talloc_free(shProg->InfoLog);
+ ralloc_free(shProg->InfoLog);
}
- shProg->InfoLog = talloc_strdup(shProg, errMsg);
+ shProg->InfoLog = ralloc_strdup(shProg, errMsg);
}
}
@@ -1181,6 +1184,8 @@ void GLAPIENTRY
_mesa_CompileShaderARB(GLhandleARB shaderObj)
{
GET_CURRENT_CONTEXT(ctx);
+ if (MESA_VERBOSE & VERBOSE_API)
+ _mesa_debug(ctx, "glCompileShader %u\n", shaderObj);
compile_shader(ctx, shaderObj);
}
@@ -1189,6 +1194,8 @@ GLuint GLAPIENTRY
_mesa_CreateShader(GLenum type)
{
GET_CURRENT_CONTEXT(ctx);
+ if (MESA_VERBOSE & VERBOSE_API)
+ _mesa_debug(ctx, "glCreateShader %s\n", _mesa_lookup_enum_by_nr(type));
return create_shader(ctx, type);
}
@@ -1205,6 +1212,8 @@ GLuint GLAPIENTRY
_mesa_CreateProgram(void)
{
GET_CURRENT_CONTEXT(ctx);
+ if (MESA_VERBOSE & VERBOSE_API)
+ _mesa_debug(ctx, "glCreateProgram\n");
return create_shader_program(ctx);
}
@@ -1220,8 +1229,14 @@ _mesa_CreateProgramObjectARB(void)
void GLAPIENTRY
_mesa_DeleteObjectARB(GLhandleARB obj)
{
+ if (MESA_VERBOSE & VERBOSE_API) {
+ GET_CURRENT_CONTEXT(ctx);
+ _mesa_debug(ctx, "glDeleteObjectARB(%u)\n", obj);
+ }
+
if (obj) {
GET_CURRENT_CONTEXT(ctx);
+ FLUSH_VERTICES(ctx, 0);
if (is_program(ctx, obj)) {
delete_shader_program(ctx, obj);
}
@@ -1240,6 +1255,7 @@ _mesa_DeleteProgram(GLuint name)
{
if (name) {
GET_CURRENT_CONTEXT(ctx);
+ FLUSH_VERTICES(ctx, 0);
delete_shader_program(ctx, name);
}
}
@@ -1250,6 +1266,7 @@ _mesa_DeleteShader(GLuint name)
{
if (name) {
GET_CURRENT_CONTEXT(ctx);
+ FLUSH_VERTICES(ctx, 0);
delete_shader(ctx, name);
}
}
@@ -1625,20 +1642,58 @@ void GLAPIENTRY
_mesa_GetShaderPrecisionFormat(GLenum shadertype, GLenum precisiontype,
GLint* range, GLint* precision)
{
+ const struct gl_program_constants *limits;
+ const struct gl_precision *p;
GET_CURRENT_CONTEXT(ctx);
- (void) shadertype;
- (void) precisiontype;
- (void) range;
- (void) precision;
- _mesa_error(ctx, GL_INVALID_OPERATION, __FUNCTION__);
+
+ switch (shadertype) {
+ case GL_VERTEX_SHADER:
+ limits = &ctx->Const.VertexProgram;
+ break;
+ case GL_FRAGMENT_SHADER:
+ limits = &ctx->Const.FragmentProgram;
+ break;
+ default:
+ _mesa_error(ctx, GL_INVALID_ENUM,
+ "glGetShaderPrecisionFormat(shadertype)");
+ return;
+ }
+
+ switch (precisiontype) {
+ case GL_LOW_FLOAT:
+ p = &limits->LowFloat;
+ break;
+ case GL_MEDIUM_FLOAT:
+ p = &limits->MediumFloat;
+ break;
+ case GL_HIGH_FLOAT:
+ p = &limits->HighFloat;
+ break;
+ case GL_LOW_INT:
+ p = &limits->LowInt;
+ break;
+ case GL_MEDIUM_INT:
+ p = &limits->MediumInt;
+ break;
+ case GL_HIGH_INT:
+ p = &limits->HighInt;
+ break;
+ default:
+ _mesa_error(ctx, GL_INVALID_ENUM,
+ "glGetShaderPrecisionFormat(precisiontype)");
+ return;
+ }
+
+ range[0] = p->RangeMin;
+ range[1] = p->RangeMax;
+ precision[0] = p->Precision;
}
void GLAPIENTRY
_mesa_ReleaseShaderCompiler(void)
{
- GET_CURRENT_CONTEXT(ctx);
- _mesa_error(ctx, GL_INVALID_OPERATION, __FUNCTION__);
+ _mesa_destroy_shader_compiler_caches();
}
@@ -1677,7 +1732,7 @@ _mesa_ProgramParameteriARB(GLuint program, GLenum pname,
switch (pname) {
case GL_GEOMETRY_VERTICES_OUT_ARB:
if (value < 1 ||
- (unsigned) value > ctx->Const.GeometryProgram.MaxGeometryOutputVertices) {
+ (unsigned) value > ctx->Const.MaxGeometryOutputVertices) {
_mesa_error(ctx, GL_INVALID_VALUE,
"glProgramParameteri(GL_GEOMETRY_VERTICES_OUT_ARB=%d",
value);
@@ -1814,7 +1869,7 @@ _mesa_CreateShaderProgramEXT(GLenum type, const GLchar *string)
#endif
}
- shProg->InfoLog = talloc_strdup_append(shProg->InfoLog, sh->InfoLog);
+ ralloc_strcat(&shProg->InfoLog, sh->InfoLog);
}
delete_shader(ctx, shader);
@@ -1881,6 +1936,10 @@ _mesa_init_shader_dispatch(struct _glapi_table *exec)
SET_BindFragDataLocationEXT(exec, _mesa_BindFragDataLocation);
SET_GetFragDataLocationEXT(exec, _mesa_GetFragDataLocation);
+ /* GL_ARB_ES2_compatibility */
+ SET_ReleaseShaderCompiler(exec, _mesa_ReleaseShaderCompiler);
+ SET_GetShaderPrecisionFormat(exec, _mesa_GetShaderPrecisionFormat);
+
#endif /* FEATURE_GL */
}
diff --git a/src/mesa/main/shaderobj.c b/src/mesa/main/shaderobj.c
index 216bbce0032..62de23bd100 100644
--- a/src/mesa/main/shaderobj.c
+++ b/src/mesa/main/shaderobj.c
@@ -32,11 +32,13 @@
#include "main/glheader.h"
#include "main/context.h"
#include "main/hash.h"
+#include "main/mfeatures.h"
+#include "main/mtypes.h"
#include "main/shaderobj.h"
#include "program/program.h"
#include "program/prog_parameter.h"
#include "program/prog_uniform.h"
-#include "talloc.h"
+#include "ralloc.h"
/**********************************************************************/
/*** Shader object functions ***/
@@ -70,7 +72,8 @@ _mesa_reference_shader(struct gl_context *ctx, struct gl_shader **ptr,
deleteFlag = (old->RefCount == 0);
if (deleteFlag) {
- _mesa_HashRemove(ctx->Shared->ShaderObjects, old->Name);
+ if (old->Name != 0)
+ _mesa_HashRemove(ctx->Shared->ShaderObjects, old->Name);
ctx->Driver.DeleteShader(ctx, old);
}
@@ -103,7 +106,7 @@ _mesa_new_shader(struct gl_context *ctx, GLuint name, GLenum type)
struct gl_shader *shader;
assert(type == GL_FRAGMENT_SHADER || type == GL_VERTEX_SHADER ||
type == GL_GEOMETRY_SHADER_ARB);
- shader = talloc_zero(NULL, struct gl_shader);
+ shader = rzalloc(NULL, struct gl_shader);
if (shader) {
shader->Type = type;
shader->Name = name;
@@ -123,7 +126,7 @@ _mesa_delete_shader(struct gl_context *ctx, struct gl_shader *sh)
if (sh->Source)
free((void *) sh->Source);
_mesa_reference_program(ctx, &sh->Program, NULL);
- talloc_free(sh);
+ ralloc_free(sh);
}
@@ -211,7 +214,8 @@ _mesa_reference_shader_program(struct gl_context *ctx,
deleteFlag = (old->RefCount == 0);
if (deleteFlag) {
- _mesa_HashRemove(ctx->Shared->ShaderObjects, old->Name);
+ if (old->Name != 0)
+ _mesa_HashRemove(ctx->Shared->ShaderObjects, old->Name);
ctx->Driver.DeleteShaderProgram(ctx, old);
}
@@ -250,7 +254,7 @@ static struct gl_shader_program *
_mesa_new_shader_program(struct gl_context *ctx, GLuint name)
{
struct gl_shader_program *shProg;
- shProg = talloc_zero(NULL, struct gl_shader_program);
+ shProg = rzalloc(NULL, struct gl_shader_program);
if (shProg) {
shProg->Name = name;
_mesa_init_shader_program(ctx, shProg);
@@ -314,7 +318,7 @@ _mesa_free_shader_program_data(struct gl_context *ctx,
}
if (shProg->InfoLog) {
- talloc_free(shProg->InfoLog);
+ ralloc_free(shProg->InfoLog);
shProg->InfoLog = NULL;
}
@@ -345,7 +349,7 @@ _mesa_delete_shader_program(struct gl_context *ctx, struct gl_shader_program *sh
{
_mesa_free_shader_program_data(ctx, shProg);
- talloc_free(shProg);
+ ralloc_free(shProg);
}
diff --git a/src/mesa/main/shared.c b/src/mesa/main/shared.c
index 3abee0178eb..ce9fc4de327 100644
--- a/src/mesa/main/shared.c
+++ b/src/mesa/main/shared.c
@@ -30,6 +30,7 @@
#include "imports.h"
+#include "mfeatures.h"
#include "mtypes.h"
#include "hash.h"
#if FEATURE_ATI_fragment_shader
diff --git a/src/mesa/main/state.c b/src/mesa/main/state.c
index cce1b464f0c..19c9bbabda2 100644
--- a/src/mesa/main/state.c
+++ b/src/mesa/main/state.c
@@ -53,7 +53,7 @@
static void
update_separate_specular(struct gl_context *ctx)
{
- if (NEED_SECONDARY_COLOR(ctx))
+ if (_mesa_need_secondary_color(ctx))
ctx->_TriangleCaps |= DD_SEPARATE_SPECULAR;
else
ctx->_TriangleCaps &= ~DD_SEPARATE_SPECULAR;
@@ -442,7 +442,7 @@ update_color(struct gl_context *ctx)
/* This is needed to support 1.1's RGB logic ops AND
* 1.0's blending logicops.
*/
- ctx->Color._LogicOpEnabled = RGBA_LOGICOP_ENABLED(ctx);
+ ctx->Color._LogicOpEnabled = _mesa_rgba_logicop_enabled(ctx);
}
@@ -524,7 +524,7 @@ update_tricaps(struct gl_context *ctx, GLbitfield new_state)
ctx->_TriangleCaps |= DD_TRI_LIGHT_TWOSIDE;
if (ctx->Light.ShadeModel == GL_FLAT)
ctx->_TriangleCaps |= DD_FLATSHADE;
- if (NEED_SECONDARY_COLOR(ctx))
+ if (_mesa_need_secondary_color(ctx))
ctx->_TriangleCaps |= DD_SEPARATE_SPECULAR;
/*
@@ -662,6 +662,8 @@ _mesa_update_state_locked( struct gl_context *ctx )
ctx->NewState = 0;
ctx->Driver.UpdateState(ctx, new_state);
ctx->Array.NewState = 0;
+ if (!ctx->Array.RebindArrays)
+ ctx->Array.RebindArrays = (new_state & (_NEW_ARRAY | _NEW_PROGRAM)) != 0;
}
diff --git a/src/mesa/main/state.h b/src/mesa/main/state.h
index f0eb43d8ee3..a48c777567f 100644
--- a/src/mesa/main/state.h
+++ b/src/mesa/main/state.h
@@ -46,4 +46,43 @@ extern void
_mesa_set_vp_override(struct gl_context *ctx, GLboolean flag);
+/**
+ * Is the secondary color needed?
+ */
+static INLINE GLboolean
+_mesa_need_secondary_color(const struct gl_context *ctx)
+{
+ if (ctx->Light.Enabled &&
+ ctx->Light.Model.ColorControl == GL_SEPARATE_SPECULAR_COLOR)
+ return GL_TRUE;
+
+ if (ctx->Fog.ColorSumEnabled)
+ return GL_TRUE;
+
+ if (ctx->VertexProgram._Current &&
+ (ctx->VertexProgram._Current != ctx->VertexProgram._TnlProgram) &&
+ (ctx->VertexProgram._Current->Base.InputsRead & VERT_BIT_COLOR1))
+ return GL_TRUE;
+
+ if (ctx->FragmentProgram._Current &&
+ (ctx->FragmentProgram._Current != ctx->FragmentProgram._TexEnvProgram) &&
+ (ctx->FragmentProgram._Current->Base.InputsRead & FRAG_BIT_COL1))
+ return GL_TRUE;
+
+ return GL_FALSE;
+}
+
+
+/**
+ * Is RGBA LogicOp enabled?
+ */
+static INLINE GLboolean
+_mesa_rgba_logicop_enabled(const struct gl_context *ctx)
+{
+ return ctx->Color.ColorLogicOpEnabled ||
+ (ctx->Color.BlendEnabled && ctx->Color.Blend[0].EquationRGB == GL_LOGIC_OP);
+}
+
+
+
#endif
diff --git a/src/mesa/main/stencil.c b/src/mesa/main/stencil.c
index 93e2e97ce0c..d898bf1d749 100644
--- a/src/mesa/main/stencil.c
+++ b/src/mesa/main/stencil.c
@@ -147,6 +147,9 @@ _mesa_StencilFuncSeparateATI( GLenum frontfunc, GLenum backfunc, GLint ref, GLui
const GLint stencilMax = (1 << ctx->DrawBuffer->Visual.stencilBits) - 1;
ASSERT_OUTSIDE_BEGIN_END(ctx);
+ if (MESA_VERBOSE & VERBOSE_API)
+ _mesa_debug(ctx, "glStencilFuncSeparateATI()\n");
+
if (!validate_stencil_func(ctx, frontfunc)) {
_mesa_error(ctx, GL_INVALID_ENUM,
"glStencilFuncSeparateATI(frontfunc)");
@@ -203,6 +206,9 @@ _mesa_StencilFunc( GLenum func, GLint ref, GLuint mask )
const GLint face = ctx->Stencil.ActiveFace;
ASSERT_OUTSIDE_BEGIN_END(ctx);
+ if (MESA_VERBOSE & VERBOSE_API)
+ _mesa_debug(ctx, "glStencilFunc()\n");
+
if (!validate_stencil_func(ctx, func)) {
_mesa_error(ctx, GL_INVALID_ENUM, "glStencilFunc(func)");
return;
@@ -267,6 +273,9 @@ _mesa_StencilMask( GLuint mask )
GET_CURRENT_CONTEXT(ctx);
const GLint face = ctx->Stencil.ActiveFace;
+ if (MESA_VERBOSE & VERBOSE_API)
+ _mesa_debug(ctx, "glStencilMask()\n");
+
ASSERT_OUTSIDE_BEGIN_END(ctx);
if (face != 0) {
@@ -321,6 +330,9 @@ _mesa_StencilOp(GLenum fail, GLenum zfail, GLenum zpass)
GET_CURRENT_CONTEXT(ctx);
const GLint face = ctx->Stencil.ActiveFace;
+ if (MESA_VERBOSE & VERBOSE_API)
+ _mesa_debug(ctx, "glStencilOp()\n");
+
ASSERT_OUTSIDE_BEGIN_END(ctx);
if (!validate_stencil_op(ctx, fail)) {
@@ -386,6 +398,9 @@ _mesa_ActiveStencilFaceEXT(GLenum face)
GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_BEGIN_END(ctx);
+ if (MESA_VERBOSE & VERBOSE_API)
+ _mesa_debug(ctx, "glActiveStencilFaceEXT()\n");
+
if (!ctx->Extensions.EXT_stencil_two_side) {
_mesa_error(ctx, GL_INVALID_OPERATION, "glActiveStencilFaceEXT");
return;
@@ -416,6 +431,9 @@ _mesa_StencilOpSeparate(GLenum face, GLenum sfail, GLenum zfail, GLenum zpass)
GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_BEGIN_END(ctx);
+ if (MESA_VERBOSE & VERBOSE_API)
+ _mesa_debug(ctx, "glStencilOpSeparate()\n");
+
if (!validate_stencil_op(ctx, sfail)) {
_mesa_error(ctx, GL_INVALID_ENUM, "glStencilOpSeparate(sfail)");
return;
@@ -471,6 +489,9 @@ _mesa_StencilFuncSeparate(GLenum face, GLenum func, GLint ref, GLuint mask)
const GLint stencilMax = (1 << ctx->DrawBuffer->Visual.stencilBits) - 1;
ASSERT_OUTSIDE_BEGIN_END(ctx);
+ if (MESA_VERBOSE & VERBOSE_API)
+ _mesa_debug(ctx, "glStencilFuncSeparate()\n");
+
if (face != GL_FRONT && face != GL_BACK && face != GL_FRONT_AND_BACK) {
_mesa_error(ctx, GL_INVALID_ENUM, "glStencilFuncSeparate(face)");
return;
@@ -509,6 +530,9 @@ _mesa_StencilMaskSeparate(GLenum face, GLuint mask)
GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_BEGIN_END(ctx);
+ if (MESA_VERBOSE & VERBOSE_API)
+ _mesa_debug(ctx, "glStencilMaskSeparate()\n");
+
if (face != GL_FRONT && face != GL_BACK && face != GL_FRONT_AND_BACK) {
_mesa_error(ctx, GL_INVALID_ENUM, "glStencilaMaskSeparate(face)");
return;
diff --git a/src/mesa/main/syncobj.c b/src/mesa/main/syncobj.c
index 2c8bcbeaf7c..e1a5c6c0f92 100644
--- a/src/mesa/main/syncobj.c
+++ b/src/mesa/main/syncobj.c
@@ -59,8 +59,10 @@
#include "imports.h"
#include "context.h"
#include "macros.h"
+#include "mfeatures.h"
#include "get.h"
#include "dispatch.h"
+#include "mtypes.h"
#if FEATURE_ARB_sync
#include "syncobj.h"
diff --git a/src/mesa/main/texcompress.c b/src/mesa/main/texcompress.c
index e3d2a786b3e..d820ae92747 100644
--- a/src/mesa/main/texcompress.c
+++ b/src/mesa/main/texcompress.c
@@ -34,6 +34,8 @@
#include "imports.h"
#include "colormac.h"
#include "formats.h"
+#include "mfeatures.h"
+#include "mtypes.h"
#include "texcompress.h"
@@ -62,6 +64,7 @@ _mesa_get_compressed_formats(struct gl_context *ctx, GLint *formats, GLboolean a
n += 2;
}
}
+ /* don't return RGTC - ARB_texture_compression_rgtc query 19 */
if (ctx->Extensions.EXT_texture_compression_s3tc) {
if (formats) {
formats[n++] = GL_COMPRESSED_RGB_S3TC_DXT1_EXT;
@@ -161,6 +164,25 @@ _mesa_glenum_to_compressed_format(GLenum format)
case GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT:
return MESA_FORMAT_SRGBA_DXT5;
+ case GL_COMPRESSED_RED_RGTC1:
+ return MESA_FORMAT_RED_RGTC1;
+ case GL_COMPRESSED_SIGNED_RED_RGTC1:
+ return MESA_FORMAT_SIGNED_RED_RGTC1;
+ case GL_COMPRESSED_RG_RGTC2:
+ return MESA_FORMAT_RG_RGTC2;
+ case GL_COMPRESSED_SIGNED_RG_RGTC2:
+ return MESA_FORMAT_SIGNED_RG_RGTC2;
+
+ case GL_COMPRESSED_LUMINANCE_LATC1_EXT:
+ return MESA_FORMAT_L_LATC1;
+ case GL_COMPRESSED_SIGNED_LUMINANCE_LATC1_EXT:
+ return MESA_FORMAT_SIGNED_L_LATC1;
+ case GL_COMPRESSED_LUMINANCE_ALPHA_LATC2_EXT:
+ case GL_COMPRESSED_LUMINANCE_ALPHA_3DC_ATI:
+ return MESA_FORMAT_LA_LATC2;
+ case GL_COMPRESSED_SIGNED_LUMINANCE_ALPHA_LATC2_EXT:
+ return MESA_FORMAT_SIGNED_LA_LATC2;
+
default:
return MESA_FORMAT_NONE;
}
@@ -207,6 +229,25 @@ _mesa_compressed_format_to_glenum(struct gl_context *ctx, GLuint mesaFormat)
return GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT;
#endif
#endif
+
+ case MESA_FORMAT_RED_RGTC1:
+ return GL_COMPRESSED_RED_RGTC1;
+ case MESA_FORMAT_SIGNED_RED_RGTC1:
+ return GL_COMPRESSED_SIGNED_RED_RGTC1;
+ case MESA_FORMAT_RG_RGTC2:
+ return GL_COMPRESSED_RG_RGTC2;
+ case MESA_FORMAT_SIGNED_RG_RGTC2:
+ return GL_COMPRESSED_SIGNED_RG_RGTC2;
+
+ case MESA_FORMAT_L_LATC1:
+ return GL_COMPRESSED_LUMINANCE_LATC1_EXT;
+ case MESA_FORMAT_SIGNED_L_LATC1:
+ return GL_COMPRESSED_SIGNED_LUMINANCE_LATC1_EXT;
+ case MESA_FORMAT_LA_LATC2:
+ return GL_COMPRESSED_LUMINANCE_ALPHA_LATC2_EXT;
+ case MESA_FORMAT_SIGNED_LA_LATC2:
+ return GL_COMPRESSED_SIGNED_LUMINANCE_ALPHA_LATC2_EXT;
+
default:
_mesa_problem(ctx, "Unexpected mesa texture format in"
" _mesa_compressed_format_to_glenum()");
diff --git a/src/mesa/main/texcompress_fxt1.c b/src/mesa/main/texcompress_fxt1.c
index 33f46d4c8bb..bb7fb567f25 100644
--- a/src/mesa/main/texcompress_fxt1.c
+++ b/src/mesa/main/texcompress_fxt1.c
@@ -34,6 +34,7 @@
#include "colormac.h"
#include "image.h"
#include "macros.h"
+#include "mfeatures.h"
#include "mipmap.h"
#include "texcompress.h"
#include "texcompress_fxt1.h"
diff --git a/src/mesa/main/texcompress_fxt1.h b/src/mesa/main/texcompress_fxt1.h
index 38048b26ccb..b991f4c67ec 100644
--- a/src/mesa/main/texcompress_fxt1.h
+++ b/src/mesa/main/texcompress_fxt1.h
@@ -26,6 +26,7 @@
#define TEXCOMPRESS_FXT1_H
#include "glheader.h"
+#include "mfeatures.h"
#include "texstore.h"
struct gl_texture_image;
diff --git a/src/mesa/main/texcompress_rgtc.c b/src/mesa/main/texcompress_rgtc.c
new file mode 100644
index 00000000000..c50df19c5d8
--- /dev/null
+++ b/src/mesa/main/texcompress_rgtc.c
@@ -0,0 +1,460 @@
+/*
+ * Copyright (C) 2011 Red Hat Inc.
+ *
+ * block compression parts are:
+ * Copyright (C) 2004 Roland Scheidegger 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.
+ *
+ * Author:
+ * Dave Airlie
+ */
+
+/**
+ * \file texcompress_rgtc.c
+ * GL_EXT_texture_compression_rgtc support.
+ */
+
+
+#include "glheader.h"
+#include "imports.h"
+#include "colormac.h"
+#include "image.h"
+#include "macros.h"
+#include "mfeatures.h"
+#include "mipmap.h"
+#include "texcompress.h"
+#include "texcompress_rgtc.h"
+#include "texstore.h"
+
+#define RGTC_DEBUG 0
+
+static void unsigned_encode_rgtc_chan(GLubyte *blkaddr, GLubyte srccolors[4][4],
+ GLint numxpixels, GLint numypixels);
+static void signed_encode_rgtc_chan(GLbyte *blkaddr, GLbyte srccolors[4][4],
+ GLint numxpixels, GLint numypixels);
+
+static void unsigned_fetch_texel_rgtc(unsigned srcRowStride, const GLubyte *pixdata,
+ unsigned i, unsigned j, GLubyte *value, unsigned comps);
+
+static void signed_fetch_texel_rgtc(unsigned srcRowStride, const GLbyte *pixdata,
+ unsigned i, unsigned j, GLbyte *value, unsigned comps);
+
+static void extractsrc_u( GLubyte srcpixels[4][4], const GLchan *srcaddr,
+ GLint srcRowStride, GLint numxpixels, GLint numypixels, GLint comps)
+{
+ GLubyte i, j;
+ const GLchan *curaddr;
+ for (j = 0; j < numypixels; j++) {
+ curaddr = srcaddr + j * srcRowStride * comps;
+ for (i = 0; i < numxpixels; i++) {
+ srcpixels[j][i] = *curaddr / (CHAN_MAX / 255);
+ curaddr += comps;
+ }
+ }
+}
+
+static void extractsrc_s( GLbyte srcpixels[4][4], const GLfloat *srcaddr,
+ GLint srcRowStride, GLint numxpixels, GLint numypixels, GLint comps)
+{
+ GLubyte i, j;
+ const GLfloat *curaddr;
+ for (j = 0; j < numypixels; j++) {
+ curaddr = srcaddr + j * srcRowStride * comps;
+ for (i = 0; i < numxpixels; i++) {
+ srcpixels[j][i] = FLOAT_TO_BYTE_TEX(*curaddr);
+ curaddr += comps;
+ }
+ }
+}
+
+
+GLboolean
+_mesa_texstore_red_rgtc1(TEXSTORE_PARAMS)
+{
+ GLubyte *dst;
+ const GLint texWidth = dstRowStride * 4 / 8; /* a bit of a hack */
+ const GLchan *tempImage = NULL;
+ int i, j;
+ int numxpixels, numypixels;
+ const GLchan *srcaddr;
+ GLubyte srcpixels[4][4];
+ GLubyte *blkaddr;
+ GLint dstRowDiff;
+ ASSERT(dstFormat == MESA_FORMAT_RED_RGTC1 ||
+ dstFormat == MESA_FORMAT_L_LATC1);
+ ASSERT(dstXoffset % 4 == 0);
+ ASSERT(dstYoffset % 4 == 0);
+ ASSERT(dstZoffset % 4 == 0);
+ (void) dstZoffset;
+ (void) dstImageOffsets;
+
+
+ tempImage = _mesa_make_temp_chan_image(ctx, dims,
+ baseInternalFormat,
+ _mesa_get_format_base_format(dstFormat),
+ srcWidth, srcHeight, srcDepth,
+ srcFormat, srcType, srcAddr,
+ srcPacking);
+ if (!tempImage)
+ return GL_FALSE; /* out of memory */
+
+ dst = _mesa_compressed_image_address(dstXoffset, dstYoffset, 0,
+ dstFormat,
+ texWidth, (GLubyte *) dstAddr);
+
+ blkaddr = dst;
+ dstRowDiff = dstRowStride >= (srcWidth * 4) ? dstRowStride - (((srcWidth + 3) & ~3) * 4) : 0;
+ for (j = 0; j < srcHeight; j+=4) {
+ if (srcHeight > j + 3) numypixels = 4;
+ else numypixels = srcHeight - j;
+ srcaddr = tempImage + j * srcWidth;
+ for (i = 0; i < srcWidth; i += 4) {
+ if (srcWidth > i + 3) numxpixels = 4;
+ else numxpixels = srcWidth - i;
+ extractsrc_u(srcpixels, srcaddr, srcWidth, numxpixels, numypixels, 1);
+ unsigned_encode_rgtc_chan(blkaddr, srcpixels, numxpixels, numypixels);
+ srcaddr += numxpixels;
+ blkaddr += 8;
+ }
+ blkaddr += dstRowDiff;
+ }
+ if (tempImage)
+ free((void *) tempImage);
+
+ return GL_TRUE;
+}
+
+GLboolean
+_mesa_texstore_signed_red_rgtc1(TEXSTORE_PARAMS)
+{
+ GLbyte *dst;
+ const GLint texWidth = dstRowStride * 4 / 8; /* a bit of a hack */
+ const GLfloat *tempImage = NULL;
+ int i, j;
+ int numxpixels, numypixels;
+ const GLfloat *srcaddr;
+ GLbyte srcpixels[4][4];
+ GLbyte *blkaddr;
+ GLint dstRowDiff;
+ ASSERT(dstFormat == MESA_FORMAT_SIGNED_RED_RGTC1 ||
+ dstFormat == MESA_FORMAT_SIGNED_L_LATC1);
+ ASSERT(dstXoffset % 4 == 0);
+ ASSERT(dstYoffset % 4 == 0);
+ ASSERT(dstZoffset % 4 == 0);
+ (void) dstZoffset;
+ (void) dstImageOffsets;
+
+ tempImage = _mesa_make_temp_float_image(ctx, dims,
+ baseInternalFormat,
+ _mesa_get_format_base_format(dstFormat),
+ srcWidth, srcHeight, srcDepth,
+ srcFormat, srcType, srcAddr,
+ srcPacking, 0x0);
+ if (!tempImage)
+ return GL_FALSE; /* out of memory */
+
+ dst = (GLbyte *)_mesa_compressed_image_address(dstXoffset, dstYoffset, 0,
+ dstFormat,
+ texWidth, (GLubyte *) dstAddr);
+
+ blkaddr = dst;
+ dstRowDiff = dstRowStride >= (srcWidth * 4) ? dstRowStride - (((srcWidth + 3) & ~3) * 4) : 0;
+ for (j = 0; j < srcHeight; j+=4) {
+ if (srcHeight > j + 3) numypixels = 4;
+ else numypixels = srcHeight - j;
+ srcaddr = tempImage + j * srcWidth;
+ for (i = 0; i < srcWidth; i += 4) {
+ if (srcWidth > i + 3) numxpixels = 4;
+ else numxpixels = srcWidth - i;
+ extractsrc_s(srcpixels, srcaddr, srcWidth, numxpixels, numypixels, 1);
+ signed_encode_rgtc_chan(blkaddr, srcpixels, numxpixels, numypixels);
+ srcaddr += numxpixels;
+ blkaddr += 8;
+ }
+ blkaddr += dstRowDiff;
+ }
+ if (tempImage)
+ free((void *) tempImage);
+
+ return GL_TRUE;
+}
+
+GLboolean
+_mesa_texstore_rg_rgtc2(TEXSTORE_PARAMS)
+{
+ GLubyte *dst;
+ const GLint texWidth = dstRowStride * 4 / 16; /* a bit of a hack */
+ const GLchan *tempImage = NULL;
+ int i, j;
+ int numxpixels, numypixels;
+ const GLchan *srcaddr;
+ GLubyte srcpixels[4][4];
+ GLubyte *blkaddr;
+ GLint dstRowDiff;
+
+ ASSERT(dstFormat == MESA_FORMAT_RG_RGTC2 ||
+ dstFormat == MESA_FORMAT_LA_LATC2);
+ ASSERT(dstXoffset % 4 == 0);
+ ASSERT(dstYoffset % 4 == 0);
+ ASSERT(dstZoffset % 4 == 0);
+ (void) dstZoffset;
+ (void) dstImageOffsets;
+
+ tempImage = _mesa_make_temp_chan_image(ctx, dims,
+ baseInternalFormat,
+ _mesa_get_format_base_format(dstFormat),
+ srcWidth, srcHeight, srcDepth,
+ srcFormat, srcType, srcAddr,
+ srcPacking);
+ if (!tempImage)
+ return GL_FALSE; /* out of memory */
+
+ dst = _mesa_compressed_image_address(dstXoffset, dstYoffset, 0,
+ dstFormat,
+ texWidth, (GLubyte *) dstAddr);
+
+ blkaddr = dst;
+ dstRowDiff = dstRowStride >= (srcWidth * 8) ? dstRowStride - (((srcWidth + 7) & ~7) * 8) : 0;
+ for (j = 0; j < srcHeight; j+=4) {
+ if (srcHeight > j + 3) numypixels = 4;
+ else numypixels = srcHeight - j;
+ srcaddr = tempImage + j * srcWidth * 2;
+ for (i = 0; i < srcWidth; i += 4) {
+ if (srcWidth > i + 3) numxpixels = 4;
+ else numxpixels = srcWidth - i;
+ extractsrc_u(srcpixels, srcaddr, srcWidth, numxpixels, numypixels, 2);
+ unsigned_encode_rgtc_chan(blkaddr, srcpixels, numxpixels, numypixels);
+
+ blkaddr += 8;
+ extractsrc_u(srcpixels, (GLchan *)srcaddr + 1, srcWidth, numxpixels, numypixels, 2);
+ unsigned_encode_rgtc_chan(blkaddr, srcpixels, numxpixels, numypixels);
+
+ blkaddr += 8;
+
+ srcaddr += numxpixels * 2;
+ }
+ blkaddr += dstRowDiff;
+ }
+ if (tempImage)
+ free((void *) tempImage);
+
+ return GL_TRUE;
+}
+
+GLboolean
+_mesa_texstore_signed_rg_rgtc2(TEXSTORE_PARAMS)
+{
+ GLbyte *dst;
+ const GLint texWidth = dstRowStride * 4 / 16; /* a bit of a hack */
+ const GLfloat *tempImage = NULL;
+ int i, j;
+ int numxpixels, numypixels;
+ const GLfloat *srcaddr;
+ GLbyte srcpixels[4][4];
+ GLbyte *blkaddr;
+ GLint dstRowDiff;
+
+ ASSERT(dstFormat == MESA_FORMAT_SIGNED_RG_RGTC2 ||
+ dstFormat == MESA_FORMAT_SIGNED_LA_LATC2);
+ ASSERT(dstXoffset % 4 == 0);
+ ASSERT(dstYoffset % 4 == 0);
+ ASSERT(dstZoffset % 4 == 0);
+ (void) dstZoffset;
+ (void) dstImageOffsets;
+
+ tempImage = _mesa_make_temp_float_image(ctx, dims,
+ baseInternalFormat,
+ _mesa_get_format_base_format(dstFormat),
+ srcWidth, srcHeight, srcDepth,
+ srcFormat, srcType, srcAddr,
+ srcPacking, 0x0);
+ if (!tempImage)
+ return GL_FALSE; /* out of memory */
+
+ dst = (GLbyte *)_mesa_compressed_image_address(dstXoffset, dstYoffset, 0,
+ dstFormat,
+ texWidth, (GLubyte *) dstAddr);
+
+ blkaddr = dst;
+ dstRowDiff = dstRowStride >= (srcWidth * 8) ? dstRowStride - (((srcWidth + 7) & ~7) * 8) : 0;
+ for (j = 0; j < srcHeight; j += 4) {
+ if (srcHeight > j + 3) numypixels = 4;
+ else numypixels = srcHeight - j;
+ srcaddr = tempImage + j * srcWidth * 2;
+ for (i = 0; i < srcWidth; i += 4) {
+ if (srcWidth > i + 3) numxpixels = 4;
+ else numxpixels = srcWidth - i;
+
+ extractsrc_s(srcpixels, srcaddr, srcWidth, numxpixels, numypixels, 2);
+ signed_encode_rgtc_chan(blkaddr, srcpixels, numxpixels, numypixels);
+ blkaddr += 8;
+
+ extractsrc_s(srcpixels, srcaddr + 1, srcWidth, numxpixels, numypixels, 2);
+ signed_encode_rgtc_chan(blkaddr, srcpixels, numxpixels, numypixels);
+ blkaddr += 8;
+
+ srcaddr += numxpixels * 2;
+
+ }
+ blkaddr += dstRowDiff;
+ }
+ if (tempImage)
+ free((void *) tempImage);
+
+ return GL_TRUE;
+}
+
+void
+_mesa_fetch_texel_2d_f_red_rgtc1(const struct gl_texture_image *texImage,
+ GLint i, GLint j, GLint k, GLfloat *texel)
+{
+ GLubyte red;
+ unsigned_fetch_texel_rgtc(texImage->RowStride, (GLubyte *)(texImage->Data),
+ i, j, &red, 1);
+ texel[RCOMP] = UBYTE_TO_FLOAT(red);
+ texel[GCOMP] = 0.0;
+ texel[BCOMP] = 0.0;
+ texel[ACOMP] = 1.0;
+}
+
+void
+_mesa_fetch_texel_2d_f_signed_red_rgtc1(const struct gl_texture_image *texImage,
+ GLint i, GLint j, GLint k, GLfloat *texel)
+{
+ GLbyte red;
+ signed_fetch_texel_rgtc(texImage->RowStride, (GLbyte *)(texImage->Data),
+ i, j, &red, 1);
+ texel[RCOMP] = BYTE_TO_FLOAT_TEX(red);
+ texel[GCOMP] = 0.0;
+ texel[BCOMP] = 0.0;
+ texel[ACOMP] = 1.0;
+}
+
+void
+_mesa_fetch_texel_2d_f_rg_rgtc2(const struct gl_texture_image *texImage,
+ GLint i, GLint j, GLint k, GLfloat *texel)
+{
+ GLubyte red, green;
+ unsigned_fetch_texel_rgtc(texImage->RowStride, (GLubyte *)(texImage->Data),
+ i, j, &red, 2);
+ unsigned_fetch_texel_rgtc(texImage->RowStride, (GLubyte *)(texImage->Data) + 8,
+ i, j, &green, 2);
+ texel[RCOMP] = UBYTE_TO_FLOAT(red);
+ texel[GCOMP] = UBYTE_TO_FLOAT(green);
+ texel[BCOMP] = 0.0;
+ texel[ACOMP] = 1.0;
+}
+
+void
+_mesa_fetch_texel_2d_f_signed_rg_rgtc2(const struct gl_texture_image *texImage,
+ GLint i, GLint j, GLint k, GLfloat *texel)
+{
+ GLbyte red, green;
+ signed_fetch_texel_rgtc(texImage->RowStride, (GLbyte *)(texImage->Data),
+ i, j, &red, 2);
+ signed_fetch_texel_rgtc(texImage->RowStride, (GLbyte *)(texImage->Data) + 8,
+ i, j, &green, 2);
+ texel[RCOMP] = BYTE_TO_FLOAT_TEX(red);
+ texel[GCOMP] = BYTE_TO_FLOAT_TEX(green);
+ texel[BCOMP] = 0.0;
+ texel[ACOMP] = 1.0;
+}
+
+void
+_mesa_fetch_texel_2d_f_l_latc1(const struct gl_texture_image *texImage,
+ GLint i, GLint j, GLint k, GLfloat *texel)
+{
+ GLubyte red;
+ unsigned_fetch_texel_rgtc(texImage->RowStride, (GLubyte *)(texImage->Data),
+ i, j, &red, 1);
+ texel[RCOMP] =
+ texel[GCOMP] =
+ texel[BCOMP] = UBYTE_TO_FLOAT(red);
+ texel[ACOMP] = 1.0;
+}
+
+void
+_mesa_fetch_texel_2d_f_signed_l_latc1(const struct gl_texture_image *texImage,
+ GLint i, GLint j, GLint k, GLfloat *texel)
+{
+ GLbyte red;
+ signed_fetch_texel_rgtc(texImage->RowStride, (GLbyte *)(texImage->Data),
+ i, j, &red, 1);
+ texel[RCOMP] =
+ texel[GCOMP] =
+ texel[BCOMP] = BYTE_TO_FLOAT_TEX(red);
+ texel[ACOMP] = 1.0;
+}
+
+void
+_mesa_fetch_texel_2d_f_la_latc2(const struct gl_texture_image *texImage,
+ GLint i, GLint j, GLint k, GLfloat *texel)
+{
+ GLubyte red, green;
+ unsigned_fetch_texel_rgtc(texImage->RowStride, (GLubyte *)(texImage->Data),
+ i, j, &red, 2);
+ unsigned_fetch_texel_rgtc(texImage->RowStride, (GLubyte *)(texImage->Data) + 8,
+ i, j, &green, 2);
+ texel[RCOMP] =
+ texel[GCOMP] =
+ texel[BCOMP] = UBYTE_TO_FLOAT(red);
+ texel[ACOMP] = UBYTE_TO_FLOAT(green);
+}
+
+void
+_mesa_fetch_texel_2d_f_signed_la_latc2(const struct gl_texture_image *texImage,
+ GLint i, GLint j, GLint k, GLfloat *texel)
+{
+ GLbyte red, green;
+ signed_fetch_texel_rgtc(texImage->RowStride, (GLbyte *)(texImage->Data),
+ i, j, &red, 2);
+ signed_fetch_texel_rgtc(texImage->RowStride, (GLbyte *)(texImage->Data) + 8,
+ i, j, &green, 2);
+ texel[RCOMP] =
+ texel[GCOMP] =
+ texel[BCOMP] = BYTE_TO_FLOAT_TEX(red);
+ texel[ACOMP] = BYTE_TO_FLOAT_TEX(green);
+}
+
+#define TAG(x) unsigned_##x
+
+#define TYPE GLubyte
+#define T_MIN 0
+#define T_MAX 0xff
+
+#include "texcompress_rgtc_tmp.h"
+
+#undef TAG
+#undef TYPE
+#undef T_MIN
+#undef T_MAX
+
+#define TAG(x) signed_##x
+#define TYPE GLbyte
+#define T_MIN (GLbyte)-128
+#define T_MAX (GLbyte)127
+
+#include "texcompress_rgtc_tmp.h"
+
+#undef TAG
+#undef TYPE
+#undef T_MIN
+#undef T_MAX
diff --git a/src/mesa/main/texcompress_rgtc.h b/src/mesa/main/texcompress_rgtc.h
new file mode 100644
index 00000000000..18766770d74
--- /dev/null
+++ b/src/mesa/main/texcompress_rgtc.h
@@ -0,0 +1,77 @@
+/*
+ * Copyright (C) 2011 Red Hat Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (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 TEXCOMPRESS_RGTC_H
+#define TEXCOMPRESS_RGTC_H
+
+#include "glheader.h"
+#include "mfeatures.h"
+#include "texstore.h"
+
+struct gl_texture_image;
+
+extern GLboolean
+_mesa_texstore_red_rgtc1(TEXSTORE_PARAMS);
+
+extern GLboolean
+_mesa_texstore_signed_red_rgtc1(TEXSTORE_PARAMS);
+
+extern GLboolean
+_mesa_texstore_rg_rgtc2(TEXSTORE_PARAMS);
+
+extern GLboolean
+_mesa_texstore_signed_rg_rgtc2(TEXSTORE_PARAMS);
+
+extern void
+_mesa_fetch_texel_2d_f_red_rgtc1(const struct gl_texture_image *texImage,
+ GLint i, GLint j, GLint k, GLfloat *texel);
+
+extern void
+_mesa_fetch_texel_2d_f_signed_red_rgtc1(const struct gl_texture_image *texImage,
+ GLint i, GLint j, GLint k, GLfloat *texel);
+
+extern void
+_mesa_fetch_texel_2d_f_rg_rgtc2(const struct gl_texture_image *texImage,
+ GLint i, GLint j, GLint k, GLfloat *texel);
+
+extern void
+_mesa_fetch_texel_2d_f_signed_rg_rgtc2(const struct gl_texture_image *texImage,
+ GLint i, GLint j, GLint k, GLfloat *texel);
+
+extern void
+_mesa_fetch_texel_2d_f_l_latc1(const struct gl_texture_image *texImage,
+ GLint i, GLint j, GLint k, GLfloat *texel);
+
+extern void
+_mesa_fetch_texel_2d_f_signed_l_latc1(const struct gl_texture_image *texImage,
+ GLint i, GLint j, GLint k, GLfloat *texel);
+
+extern void
+_mesa_fetch_texel_2d_f_la_latc2(const struct gl_texture_image *texImage,
+ GLint i, GLint j, GLint k, GLfloat *texel);
+
+extern void
+_mesa_fetch_texel_2d_f_signed_la_latc2(const struct gl_texture_image *texImage,
+ GLint i, GLint j, GLint k, GLfloat *texel);
+
+#endif
diff --git a/src/mesa/main/texcompress_rgtc_tmp.h b/src/mesa/main/texcompress_rgtc_tmp.h
new file mode 100644
index 00000000000..c8bf082a158
--- /dev/null
+++ b/src/mesa/main/texcompress_rgtc_tmp.h
@@ -0,0 +1,418 @@
+/*
+ * Copyright (C) 2011 Red Hat Inc.
+ *
+ * block compression parts are:
+ * Copyright (C) 2004 Roland Scheidegger 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.
+ *
+ * Author:
+ * Dave Airlie
+ */
+
+/* included by texcompress_rgtc to define byte/ubyte compressors */
+
+static void TAG(fetch_texel_rgtc)(unsigned srcRowStride, const TYPE *pixdata,
+ unsigned i, unsigned j, TYPE *value, unsigned comps)
+{
+ TYPE decode;
+ const TYPE *blksrc = (pixdata + ((srcRowStride + 3) / 4 * (j / 4) + (i / 4)) * 8 * comps);
+ const TYPE alpha0 = blksrc[0];
+ const TYPE alpha1 = blksrc[1];
+ const char bit_pos = ((j&3) * 4 + (i&3)) * 3;
+ const TYPE acodelow = blksrc[2 + bit_pos / 8];
+ const TYPE acodehigh = (3 + bit_pos / 8) < 8 ? blksrc[3 + bit_pos / 8] : 0;
+ const TYPE code = (acodelow >> (bit_pos & 0x7) |
+ (acodehigh << (8 - (bit_pos & 0x7)))) & 0x7;
+
+ if (code == 0)
+ decode = alpha0;
+ else if (code == 1)
+ decode = alpha1;
+ else if (alpha0 > alpha1)
+ decode = ((alpha0 * (8 - code) + (alpha1 * (code - 1))) / 7);
+ else if (code < 6)
+ decode = ((alpha0 * (6 - code) + (alpha1 * (code - 1))) / 5);
+ else if (code == 6)
+ decode = T_MIN;
+ else
+ decode = T_MAX;
+
+ *value = decode;
+}
+
+static void TAG(write_rgtc_encoded_channel)(TYPE *blkaddr,
+ TYPE alphabase1,
+ TYPE alphabase2,
+ TYPE alphaenc[16])
+{
+ *blkaddr++ = alphabase1;
+ *blkaddr++ = alphabase2;
+ *blkaddr++ = alphaenc[0] | (alphaenc[1] << 3) | ((alphaenc[2] & 3) << 6);
+ *blkaddr++ = (alphaenc[2] >> 2) | (alphaenc[3] << 1) | (alphaenc[4] << 4) | ((alphaenc[5] & 1) << 7);
+ *blkaddr++ = (alphaenc[5] >> 1) | (alphaenc[6] << 2) | (alphaenc[7] << 5);
+ *blkaddr++ = alphaenc[8] | (alphaenc[9] << 3) | ((alphaenc[10] & 3) << 6);
+ *blkaddr++ = (alphaenc[10] >> 2) | (alphaenc[11] << 1) | (alphaenc[12] << 4) | ((alphaenc[13] & 1) << 7);
+ *blkaddr++ = (alphaenc[13] >> 1) | (alphaenc[14] << 2) | (alphaenc[15] << 5);
+}
+
+static void TAG(encode_rgtc_chan)(TYPE *blkaddr, TYPE srccolors[4][4],
+ int numxpixels, int numypixels)
+{
+ TYPE alphabase[2], alphause[2];
+ short alphatest[2] = { 0 };
+ unsigned int alphablockerror1, alphablockerror2, alphablockerror3;
+ TYPE i, j, aindex, acutValues[7];
+ TYPE alphaenc1[16], alphaenc2[16], alphaenc3[16];
+ int alphaabsmin = 0, alphaabsmax = 0;
+ short alphadist;
+
+ /* find lowest and highest alpha value in block, alphabase[0] lowest, alphabase[1] highest */
+ alphabase[0] = T_MAX; alphabase[1] = T_MIN;
+ for (j = 0; j < numypixels; j++) {
+ for (i = 0; i < numxpixels; i++) {
+ if (srccolors[j][i] == T_MIN)
+ alphaabsmin = 1;
+ else if (srccolors[j][i] == T_MAX)
+ alphaabsmax = 1;
+ else {
+ if (srccolors[j][i] > alphabase[1])
+ alphabase[1] = srccolors[j][i];
+ if (srccolors[j][i] < alphabase[0])
+ alphabase[0] = srccolors[j][i];
+ }
+ }
+ }
+
+
+ if (((alphabase[0] > alphabase[1]) && !(alphaabsmin && alphaabsmax))
+ || (alphabase[0] == alphabase[1] && !alphaabsmin && !alphaabsmax)) { /* one color, either max or min */
+ /* shortcut here since it is a very common case (and also avoids later problems) */
+ /* could also thest for alpha0 == alpha1 (and not min/max), but probably not common, so don't bother */
+
+ *blkaddr++ = srccolors[0][0];
+ blkaddr++;
+ *blkaddr++ = 0;
+ *blkaddr++ = 0;
+ *blkaddr++ = 0;
+ *blkaddr++ = 0;
+ *blkaddr++ = 0;
+ *blkaddr++ = 0;
+#if RGTC_DEBUG
+ fprintf(stderr, "enc0 used\n");
+#endif
+ return;
+ }
+
+ /* find best encoding for alpha0 > alpha1 */
+ /* it's possible this encoding is better even if both alphaabsmin and alphaabsmax are true */
+ alphablockerror1 = 0x0;
+ alphablockerror2 = 0xffffffff;
+ alphablockerror3 = 0xffffffff;
+ if (alphaabsmin) alphause[0] = T_MIN;
+ else alphause[0] = alphabase[0];
+ if (alphaabsmax) alphause[1] = T_MAX;
+ else alphause[1] = alphabase[1];
+ /* calculate the 7 cut values, just the middle between 2 of the computed alpha values */
+ for (aindex = 0; aindex < 7; aindex++) {
+ /* don't forget here is always rounded down */
+ acutValues[aindex] = (alphause[0] * (2*aindex + 1) + alphause[1] * (14 - (2*aindex + 1))) / 14;
+ }
+
+ for (j = 0; j < numypixels; j++) {
+ for (i = 0; i < numxpixels; i++) {
+ /* maybe it's overkill to have the most complicated calculation just for the error
+ calculation which we only need to figure out if encoding1 or encoding2 is better... */
+ if (srccolors[j][i] > acutValues[0]) {
+ alphaenc1[4*j + i] = 0;
+ alphadist = srccolors[j][i] - alphause[1];
+ }
+ else if (srccolors[j][i] > acutValues[1]) {
+ alphaenc1[4*j + i] = 2;
+ alphadist = srccolors[j][i] - (alphause[1] * 6 + alphause[0] * 1) / 7;
+ }
+ else if (srccolors[j][i] > acutValues[2]) {
+ alphaenc1[4*j + i] = 3;
+ alphadist = srccolors[j][i] - (alphause[1] * 5 + alphause[0] * 2) / 7;
+ }
+ else if (srccolors[j][i] > acutValues[3]) {
+ alphaenc1[4*j + i] = 4;
+ alphadist = srccolors[j][i] - (alphause[1] * 4 + alphause[0] * 3) / 7;
+ }
+ else if (srccolors[j][i] > acutValues[4]) {
+ alphaenc1[4*j + i] = 5;
+ alphadist = srccolors[j][i] - (alphause[1] * 3 + alphause[0] * 4) / 7;
+ }
+ else if (srccolors[j][i] > acutValues[5]) {
+ alphaenc1[4*j + i] = 6;
+ alphadist = srccolors[j][i] - (alphause[1] * 2 + alphause[0] * 5) / 7;
+ }
+ else if (srccolors[j][i] > acutValues[6]) {
+ alphaenc1[4*j + i] = 7;
+ alphadist = srccolors[j][i] - (alphause[1] * 1 + alphause[0] * 6) / 7;
+ }
+ else {
+ alphaenc1[4*j + i] = 1;
+ alphadist = srccolors[j][i] - alphause[0];
+ }
+ alphablockerror1 += alphadist * alphadist;
+ }
+ }
+
+#if RGTC_DEBUG
+ for (i = 0; i < 16; i++) {
+ fprintf(stderr, "%d ", alphaenc1[i]);
+ }
+ fprintf(stderr, "cutVals ");
+ for (i = 0; i < 8; i++) {
+ fprintf(stderr, "%d ", acutValues[i]);
+ }
+ fprintf(stderr, "srcVals ");
+ for (j = 0; j < numypixels; j++) {
+ for (i = 0; i < numxpixels; i++) {
+ fprintf(stderr, "%d ", srccolors[j][i]);
+ }
+ }
+ fprintf(stderr, "\n");
+#endif
+
+ /* it's not very likely this encoding is better if both alphaabsmin and alphaabsmax
+ are false but try it anyway */
+ if (alphablockerror1 >= 32) {
+
+ /* don't bother if encoding is already very good, this condition should also imply
+ we have valid alphabase colors which we absolutely need (alphabase[0] <= alphabase[1]) */
+ alphablockerror2 = 0;
+ for (aindex = 0; aindex < 5; aindex++) {
+ /* don't forget here is always rounded down */
+ acutValues[aindex] = (alphabase[0] * (10 - (2*aindex + 1)) + alphabase[1] * (2*aindex + 1)) / 10;
+ }
+ for (j = 0; j < numypixels; j++) {
+ for (i = 0; i < numxpixels; i++) {
+ /* maybe it's overkill to have the most complicated calculation just for the error
+ calculation which we only need to figure out if encoding1 or encoding2 is better... */
+ if (srccolors[j][i] == T_MIN) {
+ alphaenc2[4*j + i] = 6;
+ alphadist = 0;
+ }
+ else if (srccolors[j][i] == T_MAX) {
+ alphaenc2[4*j + i] = 7;
+ alphadist = 0;
+ }
+ else if (srccolors[j][i] <= acutValues[0]) {
+ alphaenc2[4*j + i] = 0;
+ alphadist = srccolors[j][i] - alphabase[0];
+ }
+ else if (srccolors[j][i] <= acutValues[1]) {
+ alphaenc2[4*j + i] = 2;
+ alphadist = srccolors[j][i] - (alphabase[0] * 4 + alphabase[1] * 1) / 5;
+ }
+ else if (srccolors[j][i] <= acutValues[2]) {
+ alphaenc2[4*j + i] = 3;
+ alphadist = srccolors[j][i] - (alphabase[0] * 3 + alphabase[1] * 2) / 5;
+ }
+ else if (srccolors[j][i] <= acutValues[3]) {
+ alphaenc2[4*j + i] = 4;
+ alphadist = srccolors[j][i] - (alphabase[0] * 2 + alphabase[1] * 3) / 5;
+ }
+ else if (srccolors[j][i] <= acutValues[4]) {
+ alphaenc2[4*j + i] = 5;
+ alphadist = srccolors[j][i] - (alphabase[0] * 1 + alphabase[1] * 4) / 5;
+ }
+ else {
+ alphaenc2[4*j + i] = 1;
+ alphadist = srccolors[j][i] - alphabase[1];
+ }
+ alphablockerror2 += alphadist * alphadist;
+ }
+ }
+
+
+ /* skip this if the error is already very small
+ this encoding is MUCH better on average than #2 though, but expensive! */
+ if ((alphablockerror2 > 96) && (alphablockerror1 > 96)) {
+ short blockerrlin1 = 0;
+ short blockerrlin2 = 0;
+ TYPE nralphainrangelow = 0;
+ TYPE nralphainrangehigh = 0;
+ alphatest[0] = T_MAX;
+ alphatest[1] = T_MIN;
+ /* if we have large range it's likely there are values close to 0/255, try to map them to 0/255 */
+ for (j = 0; j < numypixels; j++) {
+ for (i = 0; i < numxpixels; i++) {
+ if ((srccolors[j][i] > alphatest[1]) && (srccolors[j][i] < (T_MAX -(alphabase[1] - alphabase[0]) / 28)))
+ alphatest[1] = srccolors[j][i];
+ if ((srccolors[j][i] < alphatest[0]) && (srccolors[j][i] > (alphabase[1] - alphabase[0]) / 28))
+ alphatest[0] = srccolors[j][i];
+ }
+ }
+ /* shouldn't happen too often, don't really care about those degenerated cases */
+ if (alphatest[1] <= alphatest[0]) {
+ alphatest[0] = T_MIN+1;
+ alphatest[1] = T_MAX-1;
+ }
+ for (aindex = 0; aindex < 5; aindex++) {
+ /* don't forget here is always rounded down */
+ acutValues[aindex] = (alphatest[0] * (10 - (2*aindex + 1)) + alphatest[1] * (2*aindex + 1)) / 10;
+ }
+
+ /* find the "average" difference between the alpha values and the next encoded value.
+ This is then used to calculate new base values.
+ Should there be some weighting, i.e. those values closer to alphatest[x] have more weight,
+ since they will see more improvement, and also because the values in the middle are somewhat
+ likely to get no improvement at all (because the base values might move in different directions)?
+ OTOH it would mean the values in the middle are even less likely to get an improvement
+ */
+ for (j = 0; j < numypixels; j++) {
+ for (i = 0; i < numxpixels; i++) {
+ if (srccolors[j][i] <= alphatest[0] / 2) {
+ }
+ else if (srccolors[j][i] > ((T_MAX + alphatest[1]) / 2)) {
+ }
+ else if (srccolors[j][i] <= acutValues[0]) {
+ blockerrlin1 += (srccolors[j][i] - alphatest[0]);
+ nralphainrangelow += 1;
+ }
+ else if (srccolors[j][i] <= acutValues[1]) {
+ blockerrlin1 += (srccolors[j][i] - (alphatest[0] * 4 + alphatest[1] * 1) / 5);
+ blockerrlin2 += (srccolors[j][i] - (alphatest[0] * 4 + alphatest[1] * 1) / 5);
+ nralphainrangelow += 1;
+ nralphainrangehigh += 1;
+ }
+ else if (srccolors[j][i] <= acutValues[2]) {
+ blockerrlin1 += (srccolors[j][i] - (alphatest[0] * 3 + alphatest[1] * 2) / 5);
+ blockerrlin2 += (srccolors[j][i] - (alphatest[0] * 3 + alphatest[1] * 2) / 5);
+ nralphainrangelow += 1;
+ nralphainrangehigh += 1;
+ }
+ else if (srccolors[j][i] <= acutValues[3]) {
+ blockerrlin1 += (srccolors[j][i] - (alphatest[0] * 2 + alphatest[1] * 3) / 5);
+ blockerrlin2 += (srccolors[j][i] - (alphatest[0] * 2 + alphatest[1] * 3) / 5);
+ nralphainrangelow += 1;
+ nralphainrangehigh += 1;
+ }
+ else if (srccolors[j][i] <= acutValues[4]) {
+ blockerrlin1 += (srccolors[j][i] - (alphatest[0] * 1 + alphatest[1] * 4) / 5);
+ blockerrlin2 += (srccolors[j][i] - (alphatest[0] * 1 + alphatest[1] * 4) / 5);
+ nralphainrangelow += 1;
+ nralphainrangehigh += 1;
+ }
+ else {
+ blockerrlin2 += (srccolors[j][i] - alphatest[1]);
+ nralphainrangehigh += 1;
+ }
+ }
+ }
+ /* shouldn't happen often, needed to avoid div by zero */
+ if (nralphainrangelow == 0) nralphainrangelow = 1;
+ if (nralphainrangehigh == 0) nralphainrangehigh = 1;
+ alphatest[0] = alphatest[0] + (blockerrlin1 / nralphainrangelow);
+#if RGTC_DEBUG
+ fprintf(stderr, "block err lin low %d, nr %d\n", blockerrlin1, nralphainrangelow);
+ fprintf(stderr, "block err lin high %d, nr %d\n", blockerrlin2, nralphainrangehigh);
+#endif
+ /* again shouldn't really happen often... */
+ if (alphatest[0] < T_MIN) {
+ alphatest[0] = T_MIN;
+ }
+ alphatest[1] = alphatest[1] + (blockerrlin2 / nralphainrangehigh);
+ if (alphatest[1] > T_MAX) {
+ alphatest[1] = T_MAX;
+ }
+
+ alphablockerror3 = 0;
+ for (aindex = 0; aindex < 5; aindex++) {
+ /* don't forget here is always rounded down */
+ acutValues[aindex] = (alphatest[0] * (10 - (2*aindex + 1)) + alphatest[1] * (2*aindex + 1)) / 10;
+ }
+ for (j = 0; j < numypixels; j++) {
+ for (i = 0; i < numxpixels; i++) {
+ /* maybe it's overkill to have the most complicated calculation just for the error
+ calculation which we only need to figure out if encoding1 or encoding2 is better... */
+ if (srccolors[j][i] <= alphatest[0] / 2) {
+ alphaenc3[4*j + i] = 6;
+ alphadist = srccolors[j][i];
+ }
+ else if (srccolors[j][i] > ((T_MAX + alphatest[1]) / 2)) {
+ alphaenc3[4*j + i] = 7;
+ alphadist = T_MAX - srccolors[j][i];
+ }
+ else if (srccolors[j][i] <= acutValues[0]) {
+ alphaenc3[4*j + i] = 0;
+ alphadist = srccolors[j][i] - alphatest[0];
+ }
+ else if (srccolors[j][i] <= acutValues[1]) {
+ alphaenc3[4*j + i] = 2;
+ alphadist = srccolors[j][i] - (alphatest[0] * 4 + alphatest[1] * 1) / 5;
+ }
+ else if (srccolors[j][i] <= acutValues[2]) {
+ alphaenc3[4*j + i] = 3;
+ alphadist = srccolors[j][i] - (alphatest[0] * 3 + alphatest[1] * 2) / 5;
+ }
+ else if (srccolors[j][i] <= acutValues[3]) {
+ alphaenc3[4*j + i] = 4;
+ alphadist = srccolors[j][i] - (alphatest[0] * 2 + alphatest[1] * 3) / 5;
+ }
+ else if (srccolors[j][i] <= acutValues[4]) {
+ alphaenc3[4*j + i] = 5;
+ alphadist = srccolors[j][i] - (alphatest[0] * 1 + alphatest[1] * 4) / 5;
+ }
+ else {
+ alphaenc3[4*j + i] = 1;
+ alphadist = srccolors[j][i] - alphatest[1];
+ }
+ alphablockerror3 += alphadist * alphadist;
+ }
+ }
+ }
+ }
+
+ /* write the alpha values and encoding back. */
+ if ((alphablockerror1 <= alphablockerror2) && (alphablockerror1 <= alphablockerror3)) {
+#if RGTC_DEBUG
+ if (alphablockerror1 > 96) fprintf(stderr, "enc1 used, error %d\n", alphablockerror1);
+ fprintf(stderr,"w1: min %d max %d au0 %d au1 %d\n",
+ T_MIN, T_MAX,
+ alphause[1], alphause[0]);
+#endif
+
+ TAG(write_rgtc_encoded_channel)( blkaddr, alphause[1], alphause[0], alphaenc1 );
+ }
+ else if (alphablockerror2 <= alphablockerror3) {
+#if RGTC_DEBUG
+ if (alphablockerror2 > 96) fprintf(stderr, "enc2 used, error %d\n", alphablockerror2);
+ fprintf(stderr,"w2: min %d max %d au0 %d au1 %d\n",
+ T_MIN, T_MAX,
+ alphabase[0], alphabase[1]);
+#endif
+
+ TAG(write_rgtc_encoded_channel)( blkaddr, alphabase[0], alphabase[1], alphaenc2 );
+ }
+ else {
+#if RGTC_DEBUG
+ fprintf(stderr, "enc3 used, error %d\n", alphablockerror3);
+ fprintf(stderr,"w3: min %d max %d au0 %d au1 %d\n",
+ T_MIN, T_MAX,
+ alphatest[0], alphatest[1]);
+#endif
+
+ TAG(write_rgtc_encoded_channel)( blkaddr, (TYPE)alphatest[0], (TYPE)alphatest[1], alphaenc3 );
+ }
+}
diff --git a/src/mesa/main/texcompress_s3tc.c b/src/mesa/main/texcompress_s3tc.c
index 0e893a59fa3..25257ecc3d3 100644
--- a/src/mesa/main/texcompress_s3tc.c
+++ b/src/mesa/main/texcompress_s3tc.c
@@ -39,6 +39,8 @@
#include "dlopen.h"
#include "image.h"
#include "macros.h"
+#include "mfeatures.h"
+#include "mtypes.h"
#include "texcompress.h"
#include "texcompress_s3tc.h"
#include "texstore.h"
diff --git a/src/mesa/main/texenv.c b/src/mesa/main/texenv.c
index 508dbf4887d..194bcbea983 100644
--- a/src/mesa/main/texenv.c
+++ b/src/mesa/main/texenv.c
@@ -34,6 +34,7 @@
#include "main/context.h"
#include "main/enums.h"
#include "main/macros.h"
+#include "main/mtypes.h"
#include "main/texenv.h"
#include "main/texstate.h"
diff --git a/src/mesa/main/texfetch.c b/src/mesa/main/texfetch.c
index 372ef2654a7..988a7e05468 100644
--- a/src/mesa/main/texfetch.c
+++ b/src/mesa/main/texfetch.c
@@ -38,7 +38,9 @@
#include "texcompress.h"
#include "texcompress_fxt1.h"
#include "texcompress_s3tc.h"
+#include "texcompress_rgtc.h"
#include "texfetch.h"
+#include "teximage.h"
/**
@@ -237,6 +239,13 @@ texfetch_funcs[MESA_FORMAT_COUNT] =
store_texel_argb1555_rev
},
{
+ MESA_FORMAT_AL44,
+ fetch_texel_1d_f_al44,
+ fetch_texel_2d_f_al44,
+ fetch_texel_3d_f_al44,
+ store_texel_al44
+ },
+ {
MESA_FORMAT_AL88,
fetch_texel_1d_f_al88,
fetch_texel_2d_f_al88,
@@ -279,6 +288,13 @@ texfetch_funcs[MESA_FORMAT_COUNT] =
store_texel_a8
},
{
+ MESA_FORMAT_A16,
+ fetch_texel_1d_f_a16,
+ fetch_texel_2d_f_a16,
+ fetch_texel_3d_f_a16,
+ store_texel_a16
+ },
+ {
MESA_FORMAT_L8,
fetch_texel_1d_f_l8,
fetch_texel_2d_f_l8,
@@ -286,6 +302,13 @@ texfetch_funcs[MESA_FORMAT_COUNT] =
store_texel_l8
},
{
+ MESA_FORMAT_L16,
+ fetch_texel_1d_f_l16,
+ fetch_texel_2d_f_l16,
+ fetch_texel_3d_f_l16,
+ store_texel_l16
+ },
+ {
MESA_FORMAT_I8,
fetch_texel_1d_f_i8,
fetch_texel_2d_f_i8,
@@ -293,6 +316,13 @@ texfetch_funcs[MESA_FORMAT_COUNT] =
store_texel_i8
},
{
+ MESA_FORMAT_I16,
+ fetch_texel_1d_f_i16,
+ fetch_texel_2d_f_i16,
+ fetch_texel_3d_f_i16,
+ store_texel_i16
+ },
+ {
MESA_FORMAT_CI8,
fetch_texel_1d_f_ci8,
fetch_texel_2d_f_ci8,
@@ -356,6 +386,13 @@ texfetch_funcs[MESA_FORMAT_COUNT] =
store_texel_rg1616_rev,
},
{
+ MESA_FORMAT_ARGB2101010,
+ fetch_texel_1d_f_argb2101010,
+ fetch_texel_2d_f_argb2101010,
+ fetch_texel_3d_f_argb2101010,
+ store_texel_argb2101010
+ },
+ {
MESA_FORMAT_Z24_S8,
fetch_texel_1d_f_z24_s8,
fetch_texel_2d_f_z24_s8,
@@ -720,11 +757,67 @@ texfetch_funcs[MESA_FORMAT_COUNT] =
fetch_texel_2d_rgba_16,
fetch_texel_3d_rgba_16,
store_texel_rgba_16
- }
+ },
+ {
+ MESA_FORMAT_RED_RGTC1,
+ NULL,
+ _mesa_fetch_texel_2d_f_red_rgtc1,
+ NULL,
+ NULL
+ },
+ {
+ MESA_FORMAT_SIGNED_RED_RGTC1,
+ NULL,
+ _mesa_fetch_texel_2d_f_signed_red_rgtc1,
+ NULL,
+ NULL
+ },
+ {
+ MESA_FORMAT_RG_RGTC2,
+ NULL,
+ _mesa_fetch_texel_2d_f_rg_rgtc2,
+ NULL,
+ NULL
+ },
+ {
+ MESA_FORMAT_SIGNED_RG_RGTC2,
+ NULL,
+ _mesa_fetch_texel_2d_f_signed_rg_rgtc2,
+ NULL,
+ NULL
+ },
+ {
+ MESA_FORMAT_L_LATC1,
+ NULL,
+ _mesa_fetch_texel_2d_f_l_latc1,
+ NULL,
+ NULL
+ },
+ {
+ MESA_FORMAT_SIGNED_L_LATC1,
+ NULL,
+ _mesa_fetch_texel_2d_f_signed_l_latc1,
+ NULL,
+ NULL
+ },
+ {
+ MESA_FORMAT_LA_LATC2,
+ NULL,
+ _mesa_fetch_texel_2d_f_la_latc2,
+ NULL,
+ NULL
+ },
+ {
+ MESA_FORMAT_SIGNED_LA_LATC2,
+ NULL,
+ _mesa_fetch_texel_2d_f_signed_la_latc2,
+ NULL,
+ NULL
+ },
};
-static FetchTexelFuncF
+FetchTexelFuncF
_mesa_get_texel_fetch_func(gl_format format, GLuint dims)
{
#ifdef DEBUG
@@ -822,13 +915,36 @@ fetch_texel_chan_to_float(const struct gl_texture_image *texImage,
void
_mesa_set_fetch_functions(struct gl_texture_image *texImage, GLuint dims)
{
+ gl_format format = texImage->TexFormat;
+
ASSERT(dims == 1 || dims == 2 || dims == 3);
- texImage->FetchTexelf =
- _mesa_get_texel_fetch_func(texImage->TexFormat, dims);
+ if (texImage->TexObject->sRGBDecode == GL_SKIP_DECODE_EXT &&
+ _mesa_get_format_color_encoding(format) == GL_SRGB) {
+ format = _mesa_get_srgb_format_linear(format);
+ }
+
+ texImage->FetchTexelf = _mesa_get_texel_fetch_func(format, dims);
texImage->FetchTexelc = fetch_texel_float_to_chan;
ASSERT(texImage->FetchTexelc);
ASSERT(texImage->FetchTexelf);
}
+
+void
+_mesa_update_fetch_functions(struct gl_texture_object *texObj)
+{
+ GLuint face, i;
+ GLuint dims;
+
+ dims = _mesa_get_texture_dimensions(texObj->Target);
+
+ for (face = 0; face < 6; face++) {
+ for (i = 0; i < MAX_TEXTURE_LEVELS; i++) {
+ if (texObj->Image[face][i]) {
+ _mesa_set_fetch_functions(texObj->Image[face][i], dims);
+ }
+ }
+ }
+}
diff --git a/src/mesa/main/texfetch.h b/src/mesa/main/texfetch.h
index ef13bf27fec..002ff0c768c 100644
--- a/src/mesa/main/texfetch.h
+++ b/src/mesa/main/texfetch.h
@@ -34,7 +34,12 @@
extern StoreTexelFunc
_mesa_get_texel_store_func(gl_format format);
+extern FetchTexelFuncF
+_mesa_get_texel_fetch_func(gl_format format, GLuint dims);
+
extern void
_mesa_set_fetch_functions(struct gl_texture_image *texImage, GLuint dims);
+void
+_mesa_update_fetch_functions(struct gl_texture_object *texObj);
#endif
diff --git a/src/mesa/main/texfetch_tmp.h b/src/mesa/main/texfetch_tmp.h
index 2f583ed5223..36dede57f00 100644
--- a/src/mesa/main/texfetch_tmp.h
+++ b/src/mesa/main/texfetch_tmp.h
@@ -135,7 +135,7 @@ static void store_texel_rgba_f32(struct gl_texture_image *texImage,
GLint i, GLint j, GLint k, const void *texel)
{
const GLfloat *depth = (const GLfloat *) texel;
- GLfloat *dst = TEXEL_ADDR(GLfloat, texImage, i, j, k, 1);
+ GLfloat *dst = TEXEL_ADDR(GLfloat, texImage, i, j, k, 4);
dst[0] = depth[RCOMP];
dst[1] = depth[GCOMP];
dst[2] = depth[BCOMP];
@@ -163,9 +163,12 @@ static void FETCH(f_rgba_f16)( const struct gl_texture_image *texImage,
static void store_texel_rgba_f16(struct gl_texture_image *texImage,
GLint i, GLint j, GLint k, const void *texel)
{
- const GLfloat *depth = (const GLfloat *) texel;
- GLhalfARB *dst = TEXEL_ADDR(GLhalfARB, texImage, i, j, k, 1);
- dst[0] = _mesa_float_to_half(*depth);
+ const GLfloat *src = (const GLfloat *) texel;
+ GLhalfARB *dst = TEXEL_ADDR(GLhalfARB, texImage, i, j, k, 4);
+ dst[0] = _mesa_float_to_half(src[RCOMP]);
+ dst[1] = _mesa_float_to_half(src[GCOMP]);
+ dst[2] = _mesa_float_to_half(src[BCOMP]);
+ dst[3] = _mesa_float_to_half(src[ACOMP]);
}
#endif
@@ -188,9 +191,11 @@ static void FETCH(f_rgb_f32)( const struct gl_texture_image *texImage,
static void store_texel_rgb_f32(struct gl_texture_image *texImage,
GLint i, GLint j, GLint k, const void *texel)
{
- const GLfloat *depth = (const GLfloat *) texel;
- GLfloat *dst = TEXEL_ADDR(GLfloat, texImage, i, j, k, 1);
- dst[0] = *depth;
+ const GLfloat *src = (const GLfloat *) texel;
+ GLfloat *dst = TEXEL_ADDR(GLfloat, texImage, i, j, k, 3);
+ dst[0] = src[RCOMP];
+ dst[1] = src[GCOMP];
+ dst[2] = src[BCOMP];
}
#endif
@@ -214,9 +219,11 @@ static void FETCH(f_rgb_f16)( const struct gl_texture_image *texImage,
static void store_texel_rgb_f16(struct gl_texture_image *texImage,
GLint i, GLint j, GLint k, const void *texel)
{
- const GLfloat *depth = (const GLfloat *) texel;
- GLhalfARB *dst = TEXEL_ADDR(GLhalfARB, texImage, i, j, k, 1);
- dst[0] = _mesa_float_to_half(*depth);
+ const GLfloat *src = (const GLfloat *) texel;
+ GLhalfARB *dst = TEXEL_ADDR(GLhalfARB, texImage, i, j, k, 3);
+ dst[0] = _mesa_float_to_half(src[RCOMP]);
+ dst[1] = _mesa_float_to_half(src[GCOMP]);
+ dst[2] = _mesa_float_to_half(src[BCOMP]);
}
#endif
@@ -810,6 +817,31 @@ static void store_texel_argb1555_rev(struct gl_texture_image *texImage,
#endif
+/* MESA_FORMAT_ARGB2101010 ***************************************************/
+
+/* Fetch texel from 1D, 2D or 3D argb2101010 texture, return 4 GLchans */
+static void FETCH(f_argb2101010)( const struct gl_texture_image *texImage,
+ GLint i, GLint j, GLint k, GLfloat *texel )
+{
+ const GLuint *src = TEXEL_ADDR(GLuint, texImage, i, j, k, 1);
+ const GLuint s = *src;
+ texel[RCOMP] = ((s >> 20) & 0x3ff) * (1.0F / 1023.0F);
+ texel[GCOMP] = ((s >> 10) & 0x3ff) * (1.0F / 1023.0F);
+ texel[BCOMP] = ((s >> 0) & 0x3ff) * (1.0F / 1023.0F);
+ texel[ACOMP] = ((s >> 30) & 0x03) * (1.0F / 3.0F);
+}
+
+#if DIM == 3
+static void store_texel_argb2101010(struct gl_texture_image *texImage,
+ GLint i, GLint j, GLint k, const void *texel)
+{
+ const GLubyte *rgba = (const GLubyte *) texel;
+ GLuint *dst = TEXEL_ADDR(GLuint, texImage, i, j, k, 1);
+ *dst = PACK_COLOR_2101010_UB(rgba[ACOMP], rgba[RCOMP], rgba[GCOMP], rgba[BCOMP]);
+}
+#endif
+
+
/* MESA_FORMAT_RG88 **********************************************************/
/* Fetch texel from 1D, 2D or 3D rg88 texture, return 4 GLchans */
@@ -858,6 +890,30 @@ static void store_texel_rg88_rev(struct gl_texture_image *texImage,
#endif
+/* MESA_FORMAT_AL44 **********************************************************/
+
+/* Fetch texel from 1D, 2D or 3D al44 texture, return 4 GLchans */
+static void FETCH(f_al44)( const struct gl_texture_image *texImage,
+ GLint i, GLint j, GLint k, GLfloat *texel )
+{
+ const GLubyte s = *TEXEL_ADDR(GLubyte, texImage, i, j, k, 1);
+ texel[RCOMP] =
+ texel[GCOMP] =
+ texel[BCOMP] = (s & 0xf) * (1.0F / 15.0F);
+ texel[ACOMP] = ((s >> 4) & 0xf) * (1.0F / 15.0F);
+}
+
+#if DIM == 3
+static void store_texel_al44(struct gl_texture_image *texImage,
+ GLint i, GLint j, GLint k, const void *texel)
+{
+ const GLubyte *rgba = (const GLubyte *) texel;
+ GLubyte *dst = TEXEL_ADDR(GLubyte, texImage, i, j, k, 1);
+ *dst = PACK_COLOR_44(rgba[ACOMP], rgba[RCOMP]);
+}
+#endif
+
+
/* MESA_FORMAT_AL88 **********************************************************/
/* Fetch texel from 1D, 2D or 3D al88 texture, return 4 GLchans */
@@ -1099,6 +1155,30 @@ static void store_texel_a8(struct gl_texture_image *texImage,
#endif
+/* MESA_FORMAT_A16 ************************************************************/
+
+/* Fetch texel from 1D, 2D or 3D a8 texture, return 4 GLchans */
+static void FETCH(f_a16)( const struct gl_texture_image *texImage,
+ GLint i, GLint j, GLint k, GLfloat *texel )
+{
+ const GLushort *src = TEXEL_ADDR(GLushort, texImage, i, j, k, 1);
+ texel[RCOMP] =
+ texel[GCOMP] =
+ texel[BCOMP] = 0.0F;
+ texel[ACOMP] = USHORT_TO_FLOAT( src[0] );
+}
+
+#if DIM == 3
+static void store_texel_a16(struct gl_texture_image *texImage,
+ GLint i, GLint j, GLint k, const void *texel)
+{
+ const GLushort *rgba = (const GLushort *) texel;
+ GLushort *dst = TEXEL_ADDR(GLushort, texImage, i, j, k, 1);
+ *dst = rgba[ACOMP];
+}
+#endif
+
+
/* MESA_FORMAT_L8 ************************************************************/
/* Fetch texel from 1D, 2D or 3D l8 texture, return 4 GLchans */
@@ -1123,6 +1203,30 @@ static void store_texel_l8(struct gl_texture_image *texImage,
#endif
+/* MESA_FORMAT_L16 ***********************************************************/
+
+/* Fetch texel from 1D, 2D or 3D l16 texture, return 4 GLchans */
+static void FETCH(f_l16)( const struct gl_texture_image *texImage,
+ GLint i, GLint j, GLint k, GLfloat *texel )
+{
+ const GLushort *src = TEXEL_ADDR(GLushort, texImage, i, j, k, 1);
+ texel[RCOMP] =
+ texel[GCOMP] =
+ texel[BCOMP] = USHORT_TO_FLOAT( src[0] );
+ texel[ACOMP] = 1.0F;
+}
+
+#if DIM == 3
+static void store_texel_l16(struct gl_texture_image *texImage,
+ GLint i, GLint j, GLint k, const void *texel)
+{
+ const GLushort *rgba = (const GLushort *) texel;
+ GLushort *dst = TEXEL_ADDR(GLushort, texImage, i, j, k, 1);
+ *dst = rgba[RCOMP];
+}
+#endif
+
+
/* MESA_FORMAT_I8 ************************************************************/
/* Fetch texel from 1D, 2D or 3D i8 texture, return 4 GLchans */
@@ -1147,6 +1251,30 @@ static void store_texel_i8(struct gl_texture_image *texImage,
#endif
+/* MESA_FORMAT_I16 ***********************************************************/
+
+/* Fetch texel from 1D, 2D or 3D i16 texture, return 4 GLchans */
+static void FETCH(f_i16)( const struct gl_texture_image *texImage,
+ GLint i, GLint j, GLint k, GLfloat *texel )
+{
+ const GLushort *src = TEXEL_ADDR(GLushort, texImage, i, j, k, 1);
+ texel[RCOMP] =
+ texel[GCOMP] =
+ texel[BCOMP] =
+ texel[ACOMP] = USHORT_TO_FLOAT( src[0] );
+}
+
+#if DIM == 3
+static void store_texel_i16(struct gl_texture_image *texImage,
+ GLint i, GLint j, GLint k, const void *texel)
+{
+ const GLushort *rgba = (const GLushort *) texel;
+ GLushort *dst = TEXEL_ADDR(GLushort, texImage, i, j, k, 1);
+ *dst = rgba[RCOMP];
+}
+#endif
+
+
/* MESA_FORMAT_CI8 ***********************************************************/
/* Fetch CI texel from 1D, 2D or 3D ci8 texture, lookup the index in a
diff --git a/src/mesa/main/texformat.c b/src/mesa/main/texformat.c
index 894c0130b47..5eabf2aa527 100644
--- a/src/mesa/main/texformat.c
+++ b/src/mesa/main/texformat.c
@@ -34,9 +34,15 @@
#include "context.h"
+#include "mfeatures.h"
+#include "mtypes.h"
#include "texcompress.h"
#include "texformat.h"
+#define RETURN_IF_SUPPORTED(f) do { \
+ if (ctx->TextureFormatSupported[f]) \
+ return f; \
+} while (0)
/**
* Choose an appropriate texture format given the format, type and
@@ -64,75 +70,132 @@ _mesa_choose_tex_format( struct gl_context *ctx, GLint internalFormat,
/* shallow RGBA formats */
case 4:
case GL_RGBA:
+ if (type == GL_UNSIGNED_SHORT_4_4_4_4_REV) {
+ RETURN_IF_SUPPORTED(MESA_FORMAT_ARGB4444);
+ } else if (type == GL_UNSIGNED_SHORT_1_5_5_5_REV) {
+ RETURN_IF_SUPPORTED(MESA_FORMAT_ARGB1555);
+ }
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA8888);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_ARGB8888);
+ break;
+
case GL_RGBA8:
- return MESA_FORMAT_RGBA8888;
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA8888);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_ARGB8888);
+ break;
case GL_RGB5_A1:
- return MESA_FORMAT_ARGB1555;
+ RETURN_IF_SUPPORTED(MESA_FORMAT_ARGB1555);
+ break;
case GL_RGBA2:
- return MESA_FORMAT_ARGB4444_REV; /* just to test another format*/
+ RETURN_IF_SUPPORTED(MESA_FORMAT_ARGB4444_REV); /* just to test another format*/
+ RETURN_IF_SUPPORTED(MESA_FORMAT_ARGB4444);
+ break;
case GL_RGBA4:
- return MESA_FORMAT_ARGB4444;
+ RETURN_IF_SUPPORTED(MESA_FORMAT_ARGB4444);
+ break;
/* deep RGBA formats */
case GL_RGB10_A2:
+ RETURN_IF_SUPPORTED(MESA_FORMAT_ARGB2101010);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_ARGB8888);
+ break;
case GL_RGBA12:
case GL_RGBA16:
- return MESA_FORMAT_RGBA_16;
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_16);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_16);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA8888);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_ARGB8888);
+ break;
/* shallow RGB formats */
case 3:
case GL_RGB:
case GL_RGB8:
- return MESA_FORMAT_RGB888;
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGB888);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_XRGB8888);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_ARGB8888);
+ break;
case GL_R3_G3_B2:
- return MESA_FORMAT_RGB332;
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGB332);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGB888);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_XRGB8888);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_ARGB8888);
+ break;
case GL_RGB4:
- return MESA_FORMAT_RGB565_REV; /* just to test another format */
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGB565_REV); /* just to test another format */
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGB565);
+ break;
case GL_RGB5:
- return MESA_FORMAT_RGB565;
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGB565);
+ break;
/* deep RGB formats */
case GL_RGB10:
case GL_RGB12:
case GL_RGB16:
- return MESA_FORMAT_RGBA_16;
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_16);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_XRGB8888);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_ARGB8888);
+ break;
/* Alpha formats */
case GL_ALPHA:
case GL_ALPHA4:
+ case GL_ALPHA8:
+ RETURN_IF_SUPPORTED(MESA_FORMAT_A8);
+ break;
+
case GL_ALPHA12:
case GL_ALPHA16:
- case GL_ALPHA8:
- return MESA_FORMAT_A8;
+ RETURN_IF_SUPPORTED(MESA_FORMAT_A16);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_A8);
+ break;
/* Luminance formats */
case 1:
case GL_LUMINANCE:
case GL_LUMINANCE4:
+ case GL_LUMINANCE8:
+ RETURN_IF_SUPPORTED(MESA_FORMAT_L8);
+ break;
+
case GL_LUMINANCE12:
case GL_LUMINANCE16:
- case GL_LUMINANCE8:
- return MESA_FORMAT_L8;
+ RETURN_IF_SUPPORTED(MESA_FORMAT_L16);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_L8);
+ break;
/* Luminance/Alpha formats */
+ case GL_LUMINANCE4_ALPHA4:
+ RETURN_IF_SUPPORTED(MESA_FORMAT_AL44);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_AL88);
+ break;
+
case 2:
case GL_LUMINANCE_ALPHA:
- case GL_LUMINANCE4_ALPHA4:
case GL_LUMINANCE6_ALPHA2:
case GL_LUMINANCE8_ALPHA8:
- return MESA_FORMAT_AL88;
+ RETURN_IF_SUPPORTED(MESA_FORMAT_AL88);
+ break;
case GL_LUMINANCE12_ALPHA4:
case GL_LUMINANCE12_ALPHA12:
case GL_LUMINANCE16_ALPHA16:
- return MESA_FORMAT_AL1616;
+ RETURN_IF_SUPPORTED(MESA_FORMAT_AL1616);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_AL88);
+ break;
case GL_INTENSITY:
case GL_INTENSITY4:
+ case GL_INTENSITY8:
+ RETURN_IF_SUPPORTED(MESA_FORMAT_I8);
+ break;
+
case GL_INTENSITY12:
case GL_INTENSITY16:
- case GL_INTENSITY8:
- return MESA_FORMAT_I8;
+ RETURN_IF_SUPPORTED(MESA_FORMAT_I16);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_I8);
+ break;
case GL_COLOR_INDEX:
case GL_COLOR_INDEX1_EXT:
@@ -141,7 +204,8 @@ _mesa_choose_tex_format( struct gl_context *ctx, GLint internalFormat,
case GL_COLOR_INDEX12_EXT:
case GL_COLOR_INDEX16_EXT:
case GL_COLOR_INDEX8_EXT:
- return MESA_FORMAT_CI8;
+ RETURN_IF_SUPPORTED(MESA_FORMAT_CI8);
+ break;
default:
; /* fallthrough */
@@ -152,9 +216,12 @@ _mesa_choose_tex_format( struct gl_context *ctx, GLint internalFormat,
case GL_DEPTH_COMPONENT:
case GL_DEPTH_COMPONENT24:
case GL_DEPTH_COMPONENT32:
- return MESA_FORMAT_Z32;
+ RETURN_IF_SUPPORTED(MESA_FORMAT_Z32);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_S8_Z24);
+ break;
case GL_DEPTH_COMPONENT16:
- return MESA_FORMAT_Z16;
+ RETURN_IF_SUPPORTED(MESA_FORMAT_Z16);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_S8_Z24);
default:
; /* fallthrough */
}
@@ -162,27 +229,36 @@ _mesa_choose_tex_format( struct gl_context *ctx, GLint internalFormat,
switch (internalFormat) {
case GL_COMPRESSED_ALPHA_ARB:
- return MESA_FORMAT_A8;
+ RETURN_IF_SUPPORTED(MESA_FORMAT_A8);
+ break;
case GL_COMPRESSED_LUMINANCE_ARB:
- return MESA_FORMAT_L8;
+ RETURN_IF_SUPPORTED(MESA_FORMAT_L8);
+ break;
case GL_COMPRESSED_LUMINANCE_ALPHA_ARB:
- return MESA_FORMAT_AL88;
+ RETURN_IF_SUPPORTED(MESA_FORMAT_AL88);
+ break;
case GL_COMPRESSED_INTENSITY_ARB:
- return MESA_FORMAT_I8;
+ RETURN_IF_SUPPORTED(MESA_FORMAT_I8);
+ break;
case GL_COMPRESSED_RGB_ARB:
if (ctx->Extensions.EXT_texture_compression_s3tc ||
ctx->Extensions.S3_s3tc)
- return MESA_FORMAT_RGB_DXT1;
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGB_DXT1);
if (ctx->Extensions.TDFX_texture_compression_FXT1)
- return MESA_FORMAT_RGB_FXT1;
- return MESA_FORMAT_RGB888;
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGB_FXT1);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGB888);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_XRGB8888);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_ARGB8888);
+ break;
case GL_COMPRESSED_RGBA_ARB:
if (ctx->Extensions.EXT_texture_compression_s3tc ||
ctx->Extensions.S3_s3tc)
- return MESA_FORMAT_RGBA_DXT3; /* Not rgba_dxt1, see spec */
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_DXT3); /* Not rgba_dxt1, see spec */
if (ctx->Extensions.TDFX_texture_compression_FXT1)
- return MESA_FORMAT_RGBA_FXT1;
- return MESA_FORMAT_RGBA8888;
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_FXT1);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA8888);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_ARGB8888);
+ break;
default:
; /* fallthrough */
}
@@ -190,9 +266,9 @@ _mesa_choose_tex_format( struct gl_context *ctx, GLint internalFormat,
if (ctx->Extensions.MESA_ycbcr_texture) {
if (internalFormat == GL_YCBCR_MESA) {
if (type == GL_UNSIGNED_SHORT_8_8_MESA)
- return MESA_FORMAT_YCBCR;
+ RETURN_IF_SUPPORTED(MESA_FORMAT_YCBCR);
else
- return MESA_FORMAT_YCBCR_REV;
+ RETURN_IF_SUPPORTED(MESA_FORMAT_YCBCR_REV);
}
}
@@ -200,9 +276,11 @@ _mesa_choose_tex_format( struct gl_context *ctx, GLint internalFormat,
if (ctx->Extensions.TDFX_texture_compression_FXT1) {
switch (internalFormat) {
case GL_COMPRESSED_RGB_FXT1_3DFX:
- return MESA_FORMAT_RGB_FXT1;
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGB_FXT1);
+ break;
case GL_COMPRESSED_RGBA_FXT1_3DFX:
- return MESA_FORMAT_RGBA_FXT1;
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_FXT1);
+ break;
default:
; /* fallthrough */
}
@@ -213,13 +291,17 @@ _mesa_choose_tex_format( struct gl_context *ctx, GLint internalFormat,
if (ctx->Extensions.EXT_texture_compression_s3tc) {
switch (internalFormat) {
case GL_COMPRESSED_RGB_S3TC_DXT1_EXT:
- return MESA_FORMAT_RGB_DXT1;
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGB_DXT1);
+ break;
case GL_COMPRESSED_RGBA_S3TC_DXT1_EXT:
- return MESA_FORMAT_RGBA_DXT1;
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_DXT1);
+ break;
case GL_COMPRESSED_RGBA_S3TC_DXT3_EXT:
- return MESA_FORMAT_RGBA_DXT3;
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_DXT3);
+ break;
case GL_COMPRESSED_RGBA_S3TC_DXT5_EXT:
- return MESA_FORMAT_RGBA_DXT5;
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_DXT5);
+ break;
default:
; /* fallthrough */
}
@@ -229,10 +311,12 @@ _mesa_choose_tex_format( struct gl_context *ctx, GLint internalFormat,
switch (internalFormat) {
case GL_RGB_S3TC:
case GL_RGB4_S3TC:
- return MESA_FORMAT_RGB_DXT1;
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGB_DXT1);
+ break;
case GL_RGBA_S3TC:
case GL_RGBA4_S3TC:
- return MESA_FORMAT_RGBA_DXT3;
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_DXT3);
+ break;
default:
; /* fallthrough */
}
@@ -242,29 +326,41 @@ _mesa_choose_tex_format( struct gl_context *ctx, GLint internalFormat,
if (ctx->Extensions.ARB_texture_float) {
switch (internalFormat) {
case GL_ALPHA16F_ARB:
- return MESA_FORMAT_ALPHA_FLOAT16;
+ RETURN_IF_SUPPORTED(MESA_FORMAT_ALPHA_FLOAT16);
+ break;
case GL_ALPHA32F_ARB:
- return MESA_FORMAT_ALPHA_FLOAT32;
+ RETURN_IF_SUPPORTED(MESA_FORMAT_ALPHA_FLOAT32);
+ break;
case GL_LUMINANCE16F_ARB:
- return MESA_FORMAT_LUMINANCE_FLOAT16;
+ RETURN_IF_SUPPORTED(MESA_FORMAT_LUMINANCE_FLOAT16);
+ break;
case GL_LUMINANCE32F_ARB:
- return MESA_FORMAT_LUMINANCE_FLOAT32;
+ RETURN_IF_SUPPORTED(MESA_FORMAT_LUMINANCE_FLOAT32);
+ break;
case GL_LUMINANCE_ALPHA16F_ARB:
- return MESA_FORMAT_LUMINANCE_ALPHA_FLOAT16;
+ RETURN_IF_SUPPORTED(MESA_FORMAT_LUMINANCE_ALPHA_FLOAT16);
+ break;
case GL_LUMINANCE_ALPHA32F_ARB:
- return MESA_FORMAT_LUMINANCE_ALPHA_FLOAT32;
+ RETURN_IF_SUPPORTED(MESA_FORMAT_LUMINANCE_ALPHA_FLOAT32);
+ break;
case GL_INTENSITY16F_ARB:
- return MESA_FORMAT_INTENSITY_FLOAT16;
+ RETURN_IF_SUPPORTED(MESA_FORMAT_INTENSITY_FLOAT16);
+ break;
case GL_INTENSITY32F_ARB:
- return MESA_FORMAT_INTENSITY_FLOAT32;
+ RETURN_IF_SUPPORTED(MESA_FORMAT_INTENSITY_FLOAT32);
+ break;
case GL_RGB16F_ARB:
- return MESA_FORMAT_RGB_FLOAT16;
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGB_FLOAT16);
+ break;
case GL_RGB32F_ARB:
- return MESA_FORMAT_RGB_FLOAT32;
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGB_FLOAT32);
+ break;
case GL_RGBA16F_ARB:
- return MESA_FORMAT_RGBA_FLOAT16;
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_FLOAT16);
+ break;
case GL_RGBA32F_ARB:
- return MESA_FORMAT_RGBA_FLOAT32;
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_FLOAT32);
+ break;
default:
; /* fallthrough */
}
@@ -274,7 +370,9 @@ _mesa_choose_tex_format( struct gl_context *ctx, GLint internalFormat,
switch (internalFormat) {
case GL_DEPTH_STENCIL_EXT:
case GL_DEPTH24_STENCIL8_EXT:
- return MESA_FORMAT_Z24_S8;
+ RETURN_IF_SUPPORTED(MESA_FORMAT_Z24_S8);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_S8_Z24);
+ break;
default:
; /* fallthrough */
}
@@ -284,7 +382,8 @@ _mesa_choose_tex_format( struct gl_context *ctx, GLint internalFormat,
switch (internalFormat) {
case GL_DUDV_ATI:
case GL_DU8DV8_ATI:
- return MESA_FORMAT_DUDV8;
+ RETURN_IF_SUPPORTED(MESA_FORMAT_DUDV8);
+ break;
default:
; /* fallthrough */
}
@@ -294,7 +393,9 @@ _mesa_choose_tex_format( struct gl_context *ctx, GLint internalFormat,
switch (internalFormat) {
case GL_RGBA_SNORM:
case GL_RGBA8_SNORM:
- return MESA_FORMAT_SIGNED_RGBA8888;
+ RETURN_IF_SUPPORTED(MESA_FORMAT_SIGNED_RGBA8888);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_SIGNED_RGBA8888_REV);
+ break;
default:
; /* fallthrough */
}
@@ -304,24 +405,32 @@ _mesa_choose_tex_format( struct gl_context *ctx, GLint internalFormat,
switch (internalFormat) {
case GL_RED_SNORM:
case GL_R8_SNORM:
- return MESA_FORMAT_SIGNED_R8;
+ RETURN_IF_SUPPORTED(MESA_FORMAT_SIGNED_R8);
+ break;
case GL_RG_SNORM:
case GL_RG8_SNORM:
- return MESA_FORMAT_SIGNED_RG88;
+ RETURN_IF_SUPPORTED(MESA_FORMAT_SIGNED_RG88);
+ break;
case GL_RGB_SNORM:
case GL_RGB8_SNORM:
- return MESA_FORMAT_SIGNED_RGBX8888;
+ RETURN_IF_SUPPORTED(MESA_FORMAT_SIGNED_RGBX8888);
+ break;
case GL_RGBA_SNORM:
case GL_RGBA8_SNORM:
- return MESA_FORMAT_SIGNED_RGBA8888;
+ RETURN_IF_SUPPORTED(MESA_FORMAT_SIGNED_RGBA8888);
+ break;
case GL_R16_SNORM:
- return MESA_FORMAT_SIGNED_R_16;
+ RETURN_IF_SUPPORTED(MESA_FORMAT_SIGNED_R_16);
+ break;
case GL_RG16_SNORM:
- return MESA_FORMAT_SIGNED_RG_16;
+ RETURN_IF_SUPPORTED(MESA_FORMAT_SIGNED_RG_16);
+ break;
case GL_RGB16_SNORM:
- return MESA_FORMAT_SIGNED_RGB_16;
+ RETURN_IF_SUPPORTED(MESA_FORMAT_SIGNED_RGB_16);
+ break;
case GL_RGBA16_SNORM:
- return MESA_FORMAT_SIGNED_RGBA_16;
+ RETURN_IF_SUPPORTED(MESA_FORMAT_SIGNED_RGBA_16);
+ break;
default:
; /* fall-through */
}
@@ -332,48 +441,68 @@ _mesa_choose_tex_format( struct gl_context *ctx, GLint internalFormat,
switch (internalFormat) {
case GL_SRGB_EXT:
case GL_SRGB8_EXT:
- return MESA_FORMAT_SRGB8;
+ RETURN_IF_SUPPORTED(MESA_FORMAT_SRGB8);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_SARGB8);
+ break;
case GL_SRGB_ALPHA_EXT:
case GL_SRGB8_ALPHA8_EXT:
- return MESA_FORMAT_SRGBA8;
+ RETURN_IF_SUPPORTED(MESA_FORMAT_SRGBA8);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_SARGB8);
+ break;
case GL_SLUMINANCE_EXT:
case GL_SLUMINANCE8_EXT:
- return MESA_FORMAT_SL8;
+ RETURN_IF_SUPPORTED(MESA_FORMAT_SL8);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_SARGB8);
+ break;
case GL_SLUMINANCE_ALPHA_EXT:
case GL_SLUMINANCE8_ALPHA8_EXT:
- return MESA_FORMAT_SLA8;
+ RETURN_IF_SUPPORTED(MESA_FORMAT_SLA8);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_SARGB8);
+ break;
case GL_COMPRESSED_SLUMINANCE_EXT:
- return MESA_FORMAT_SL8;
+ RETURN_IF_SUPPORTED(MESA_FORMAT_SL8);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_SARGB8);
+ break;
case GL_COMPRESSED_SLUMINANCE_ALPHA_EXT:
- return MESA_FORMAT_SLA8;
+ RETURN_IF_SUPPORTED(MESA_FORMAT_SLA8);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_SARGB8);
+ break;
case GL_COMPRESSED_SRGB_EXT:
#if FEATURE_texture_s3tc
if (ctx->Extensions.EXT_texture_compression_s3tc)
- return MESA_FORMAT_SRGB_DXT1;
+ RETURN_IF_SUPPORTED(MESA_FORMAT_SRGB_DXT1);
#endif
- return MESA_FORMAT_SRGB8;
+ RETURN_IF_SUPPORTED(MESA_FORMAT_SRGB8);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_SARGB8);
+ break;
case GL_COMPRESSED_SRGB_ALPHA_EXT:
#if FEATURE_texture_s3tc
if (ctx->Extensions.EXT_texture_compression_s3tc)
- return MESA_FORMAT_SRGBA_DXT3; /* Not srgba_dxt1, see spec */
+ RETURN_IF_SUPPORTED(MESA_FORMAT_SRGBA_DXT3); /* Not srgba_dxt1, see spec */
#endif
- return MESA_FORMAT_SRGBA8;
+ RETURN_IF_SUPPORTED(MESA_FORMAT_SRGBA8);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_SARGB8);
+ break;
#if FEATURE_texture_s3tc
case GL_COMPRESSED_SRGB_S3TC_DXT1_EXT:
if (ctx->Extensions.EXT_texture_compression_s3tc)
- return MESA_FORMAT_SRGB_DXT1;
+ RETURN_IF_SUPPORTED(MESA_FORMAT_SRGB_DXT1);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_SARGB8);
break;
case GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT:
if (ctx->Extensions.EXT_texture_compression_s3tc)
- return MESA_FORMAT_SRGBA_DXT1;
+ RETURN_IF_SUPPORTED(MESA_FORMAT_SRGBA_DXT1);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_SARGB8);
break;
case GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT:
if (ctx->Extensions.EXT_texture_compression_s3tc)
- return MESA_FORMAT_SRGBA_DXT3;
+ RETURN_IF_SUPPORTED(MESA_FORMAT_SRGBA_DXT3);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_SARGB8);
break;
case GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT:
if (ctx->Extensions.EXT_texture_compression_s3tc)
- return MESA_FORMAT_SRGBA_DXT5;
+ RETURN_IF_SUPPORTED(MESA_FORMAT_SRGBA_DXT5);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_SARGB8);
break;
#endif
default:
@@ -390,42 +519,48 @@ _mesa_choose_tex_format( struct gl_context *ctx, GLint internalFormat,
case GL_INTENSITY32UI_EXT:
case GL_LUMINANCE32UI_EXT:
case GL_LUMINANCE_ALPHA32UI_EXT:
- return MESA_FORMAT_RGBA_UINT32;
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_UINT32);
+ break;
case GL_RGBA16UI_EXT:
case GL_RGB16UI_EXT:
case GL_ALPHA16UI_EXT:
case GL_INTENSITY16UI_EXT:
case GL_LUMINANCE16UI_EXT:
case GL_LUMINANCE_ALPHA16UI_EXT:
- return MESA_FORMAT_RGBA_UINT16;
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_UINT16);
+ break;
case GL_RGBA8UI_EXT:
case GL_RGB8UI_EXT:
case GL_ALPHA8UI_EXT:
case GL_INTENSITY8UI_EXT:
case GL_LUMINANCE8UI_EXT:
case GL_LUMINANCE_ALPHA8UI_EXT:
- return MESA_FORMAT_RGBA_UINT8;
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_UINT8);
+ break;
case GL_RGBA32I_EXT:
case GL_RGB32I_EXT:
case GL_ALPHA32I_EXT:
case GL_INTENSITY32I_EXT:
case GL_LUMINANCE32I_EXT:
case GL_LUMINANCE_ALPHA32I_EXT:
- return MESA_FORMAT_RGBA_INT32;
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_INT32);
+ break;
case GL_RGBA16I_EXT:
case GL_RGB16I_EXT:
case GL_ALPHA16I_EXT:
case GL_INTENSITY16I_EXT:
case GL_LUMINANCE16I_EXT:
case GL_LUMINANCE_ALPHA16I_EXT:
- return MESA_FORMAT_RGBA_INT16;
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_INT16);
+ break;
case GL_RGBA8I_EXT:
case GL_RGB8I_EXT:
case GL_ALPHA8I_EXT:
case GL_INTENSITY8I_EXT:
case GL_LUMINANCE8I_EXT:
case GL_LUMINANCE_ALPHA8I_EXT:
- return MESA_FORMAT_RGBA_INT8;
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_INT8);
+ break;
}
}
@@ -434,24 +569,87 @@ _mesa_choose_tex_format( struct gl_context *ctx, GLint internalFormat,
case GL_R8:
case GL_RED:
case GL_COMPRESSED_RED:
- return MESA_FORMAT_R8;
+ RETURN_IF_SUPPORTED(MESA_FORMAT_R8);
+ break;
case GL_R16:
- return MESA_FORMAT_R16;
+ RETURN_IF_SUPPORTED(MESA_FORMAT_R16);
+ break;
case GL_RG:
case GL_RG8:
case GL_COMPRESSED_RG:
- return MESA_FORMAT_RG88;
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RG88);
+ break;
case GL_RG16:
- return MESA_FORMAT_RG1616;
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RG1616);
+ break;
default:
; /* fallthrough */
}
}
+ if (ctx->Extensions.EXT_texture_format_BGRA8888) {
+ switch (internalFormat) {
+ case GL_BGRA:
+ RETURN_IF_SUPPORTED(MESA_FORMAT_ARGB8888);
+ break;
+
+ default:
+ ; /* fallthrough */
+ }
+ }
+
+ if (ctx->Extensions.ARB_texture_compression_rgtc) {
+ switch (internalFormat) {
+ case GL_COMPRESSED_RED_RGTC1:
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RED_RGTC1);
+ break;
+ case GL_COMPRESSED_SIGNED_RED_RGTC1:
+ RETURN_IF_SUPPORTED(MESA_FORMAT_SIGNED_RED_RGTC1);
+ break;
+ case GL_COMPRESSED_RG_RGTC2:
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RG_RGTC2);
+ break;
+ case GL_COMPRESSED_SIGNED_RG_RGTC2:
+ RETURN_IF_SUPPORTED(MESA_FORMAT_SIGNED_RG_RGTC2);
+ break;
+ default:
+ ; /* fallthrough */
+ }
+ }
+
+ if (ctx->Extensions.EXT_texture_compression_latc) {
+ switch (internalFormat) {
+ case GL_COMPRESSED_LUMINANCE_LATC1_EXT:
+ RETURN_IF_SUPPORTED(MESA_FORMAT_L_LATC1);
+ break;
+ case GL_COMPRESSED_SIGNED_LUMINANCE_LATC1_EXT:
+ RETURN_IF_SUPPORTED(MESA_FORMAT_SIGNED_L_LATC1);
+ break;
+ case GL_COMPRESSED_LUMINANCE_ALPHA_LATC2_EXT:
+ RETURN_IF_SUPPORTED(MESA_FORMAT_LA_LATC2);
+ break;
+ case GL_COMPRESSED_SIGNED_LUMINANCE_ALPHA_LATC2_EXT:
+ RETURN_IF_SUPPORTED(MESA_FORMAT_SIGNED_LA_LATC2);
+ break;
+ default:
+ ; /* fallthrough */
+ }
+ }
+
+ if (ctx->Extensions.ATI_texture_compression_3dc) {
+ switch (internalFormat) {
+ case GL_COMPRESSED_LUMINANCE_ALPHA_3DC_ATI:
+ RETURN_IF_SUPPORTED(MESA_FORMAT_LA_LATC2);
+ break;
+ default:
+ ; /* fallthrough */
+ }
+ }
+
_mesa_problem(ctx, "unexpected format in _mesa_choose_tex_format()");
return MESA_FORMAT_NONE;
}
diff --git a/src/mesa/main/texgen.c b/src/mesa/main/texgen.c
index 108ea4cd42c..0ace0b9364d 100644
--- a/src/mesa/main/texgen.c
+++ b/src/mesa/main/texgen.c
@@ -34,6 +34,7 @@
#include "main/context.h"
#include "main/enums.h"
#include "main/macros.h"
+#include "main/mfeatures.h"
#include "main/texgen.h"
#include "main/texstate.h"
#include "math/m_matrix.h"
diff --git a/src/mesa/main/texgen.h b/src/mesa/main/texgen.h
index 9ed80238363..336ffce9245 100644
--- a/src/mesa/main/texgen.h
+++ b/src/mesa/main/texgen.h
@@ -29,6 +29,7 @@
#include "compiler.h"
#include "glheader.h"
+#include "mfeatures.h"
struct _glapi_table;
diff --git a/src/mesa/main/texgetimage.c b/src/mesa/main/texgetimage.c
index c94f88e16e6..21d9140c550 100644
--- a/src/mesa/main/texgetimage.c
+++ b/src/mesa/main/texgetimage.c
@@ -35,7 +35,10 @@
#include "context.h"
#include "formats.h"
#include "image.h"
+#include "mfeatures.h"
+#include "mtypes.h"
#include "pack.h"
+#include "pbo.h"
#include "texgetimage.h"
#include "teximage.h"
@@ -432,11 +435,21 @@ get_tex_memcpy(struct gl_context *ctx, GLenum format, GLenum type, GLvoid *pixel
type == GL_UNSIGNED_BYTE) {
memCopy = GL_TRUE;
}
+ else if (texImage->TexFormat == MESA_FORMAT_L16 &&
+ format == GL_LUMINANCE &&
+ type == GL_UNSIGNED_SHORT) {
+ memCopy = GL_TRUE;
+ }
else if (texImage->TexFormat == MESA_FORMAT_A8 &&
format == GL_ALPHA &&
type == GL_UNSIGNED_BYTE) {
memCopy = GL_TRUE;
}
+ else if (texImage->TexFormat == MESA_FORMAT_A16 &&
+ format == GL_ALPHA &&
+ type == GL_UNSIGNED_SHORT) {
+ memCopy = GL_TRUE;
+ }
}
if (memCopy) {
@@ -793,8 +806,8 @@ _mesa_GetTexImage( GLenum target, GLint level, GLenum format,
* \return GL_TRUE if any error, GL_FALSE if no errors.
*/
static GLboolean
-getcompressedteximage_error_check(struct gl_context *ctx, GLenum target, GLint level,
- GLvoid *img)
+getcompressedteximage_error_check(struct gl_context *ctx, GLenum target,
+ GLint level, GLvoid *img)
{
struct gl_texture_object *texObj;
struct gl_texture_image *texImage;
diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c
index c5ae63052a7..2a3037f6189 100644
--- a/src/mesa/main/teximage.c
+++ b/src/mesa/main/teximage.c
@@ -40,6 +40,7 @@
#include "image.h"
#include "imports.h"
#include "macros.h"
+#include "mfeatures.h"
#include "state.h"
#include "texcompress.h"
#include "texfetch.h"
@@ -182,6 +183,15 @@ _mesa_base_tex_format( struct gl_context *ctx, GLint internalFormat )
; /* fallthrough */
}
+ if (ctx->Extensions.EXT_texture_format_BGRA8888) {
+ switch (internalFormat) {
+ case GL_BGRA_EXT:
+ return GL_RGBA;
+ default:
+ ; /* fallthrough */
+ }
+ }
+
if (ctx->Extensions.EXT_paletted_texture) {
switch (internalFormat) {
case GL_COLOR_INDEX:
@@ -340,11 +350,11 @@ _mesa_base_tex_format( struct gl_context *ctx, GLint internalFormat )
return GL_RGBA;
case GL_SLUMINANCE_ALPHA_EXT:
case GL_SLUMINANCE8_ALPHA8_EXT:
- case GL_COMPRESSED_SLUMINANCE_EXT:
case GL_COMPRESSED_SLUMINANCE_ALPHA_EXT:
return GL_LUMINANCE_ALPHA;
case GL_SLUMINANCE_EXT:
case GL_SLUMINANCE8_EXT:
+ case GL_COMPRESSED_SLUMINANCE_EXT:
return GL_LUMINANCE;
default:
; /* fallthrough */
@@ -499,6 +509,28 @@ _mesa_base_tex_format( struct gl_context *ctx, GLint internalFormat )
}
}
+ if (ctx->Extensions.EXT_texture_compression_latc) {
+ switch (internalFormat) {
+ case GL_COMPRESSED_LUMINANCE_LATC1_EXT:
+ case GL_COMPRESSED_SIGNED_LUMINANCE_LATC1_EXT:
+ return GL_LUMINANCE;
+ case GL_COMPRESSED_LUMINANCE_ALPHA_LATC2_EXT:
+ case GL_COMPRESSED_SIGNED_LUMINANCE_ALPHA_LATC2_EXT:
+ return GL_LUMINANCE_ALPHA;
+ default:
+ ; /* fallthrough */
+ }
+ }
+
+ if (ctx->Extensions.ATI_texture_compression_3dc) {
+ switch (internalFormat) {
+ case GL_COMPRESSED_LUMINANCE_ALPHA_3DC_ATI:
+ return GL_LUMINANCE_ALPHA;
+ default:
+ ; /* fallthrough */
+ }
+ }
+
return -1; /* error */
}
@@ -693,6 +725,9 @@ _mesa_select_tex_object(struct gl_context *ctx,
const struct gl_texture_unit *texUnit,
GLenum target)
{
+ const GLboolean arrayTex = (ctx->Extensions.MESA_texture_array ||
+ ctx->Extensions.EXT_texture_array);
+
switch (target) {
case GL_TEXTURE_1D:
return texUnit->CurrentTex[TEXTURE_1D_INDEX];
@@ -725,17 +760,13 @@ _mesa_select_tex_object(struct gl_context *ctx,
return ctx->Extensions.NV_texture_rectangle
? ctx->Texture.ProxyTex[TEXTURE_RECT_INDEX] : NULL;
case GL_TEXTURE_1D_ARRAY_EXT:
- return ctx->Extensions.MESA_texture_array
- ? texUnit->CurrentTex[TEXTURE_1D_ARRAY_INDEX] : NULL;
+ return arrayTex ? texUnit->CurrentTex[TEXTURE_1D_ARRAY_INDEX] : NULL;
case GL_PROXY_TEXTURE_1D_ARRAY_EXT:
- return ctx->Extensions.MESA_texture_array
- ? ctx->Texture.ProxyTex[TEXTURE_1D_ARRAY_INDEX] : NULL;
+ return arrayTex ? ctx->Texture.ProxyTex[TEXTURE_1D_ARRAY_INDEX] : NULL;
case GL_TEXTURE_2D_ARRAY_EXT:
- return ctx->Extensions.MESA_texture_array
- ? texUnit->CurrentTex[TEXTURE_2D_ARRAY_INDEX] : NULL;
+ return arrayTex ? texUnit->CurrentTex[TEXTURE_2D_ARRAY_INDEX] : NULL;
case GL_PROXY_TEXTURE_2D_ARRAY_EXT:
- return ctx->Extensions.MESA_texture_array
- ? ctx->Texture.ProxyTex[TEXTURE_2D_ARRAY_INDEX] : NULL;
+ return arrayTex ? ctx->Texture.ProxyTex[TEXTURE_2D_ARRAY_INDEX] : NULL;
default:
_mesa_problem(NULL, "bad target in _mesa_select_tex_object()");
return NULL;
@@ -920,7 +951,8 @@ _mesa_max_texture_levels(struct gl_context *ctx, GLenum target)
case GL_PROXY_TEXTURE_1D_ARRAY_EXT:
case GL_TEXTURE_2D_ARRAY_EXT:
case GL_PROXY_TEXTURE_2D_ARRAY_EXT:
- return ctx->Extensions.MESA_texture_array
+ return (ctx->Extensions.MESA_texture_array ||
+ ctx->Extensions.EXT_texture_array)
? ctx->Const.MaxTextureLevels : 0;
default:
return 0; /* bad target */
@@ -931,8 +963,8 @@ _mesa_max_texture_levels(struct gl_context *ctx, GLenum target)
/**
* Return number of dimensions per mipmap level for the given texture target.
*/
-static GLint
-get_texture_dimensions(GLenum target)
+GLint
+_mesa_get_texture_dimensions(GLenum target)
{
switch (target) {
case GL_TEXTURE_1D:
@@ -1157,7 +1189,7 @@ _mesa_init_teximage_fields(struct gl_context *ctx, GLenum target,
img->TexFormat = format;
- dims = get_texture_dimensions(target);
+ dims = _mesa_get_texture_dimensions(target);
_mesa_set_fetch_functions(img, dims);
}
@@ -1372,7 +1404,8 @@ target_can_be_compressed(const struct gl_context *ctx, GLenum target,
return ctx->Extensions.ARB_texture_cube_map;
case GL_PROXY_TEXTURE_2D_ARRAY_EXT:
case GL_TEXTURE_2D_ARRAY_EXT:
- return ctx->Extensions.MESA_texture_array;
+ return (ctx->Extensions.MESA_texture_array ||
+ ctx->Extensions.EXT_texture_array);
default:
return GL_FALSE;
}
@@ -1413,7 +1446,8 @@ legal_teximage_target(struct gl_context *ctx, GLuint dims, GLenum target)
return ctx->Extensions.NV_texture_rectangle;
case GL_TEXTURE_1D_ARRAY_EXT:
case GL_PROXY_TEXTURE_1D_ARRAY_EXT:
- return ctx->Extensions.MESA_texture_array;
+ return (ctx->Extensions.MESA_texture_array ||
+ ctx->Extensions.EXT_texture_array);
default:
return GL_FALSE;
}
@@ -1424,7 +1458,8 @@ legal_teximage_target(struct gl_context *ctx, GLuint dims, GLenum target)
return GL_TRUE;
case GL_TEXTURE_2D_ARRAY_EXT:
case GL_PROXY_TEXTURE_2D_ARRAY_EXT:
- return ctx->Extensions.MESA_texture_array;
+ return (ctx->Extensions.MESA_texture_array ||
+ ctx->Extensions.EXT_texture_array);
default:
return GL_FALSE;
}
@@ -1461,7 +1496,8 @@ legal_texsubimage_target(struct gl_context *ctx, GLuint dims, GLenum target)
case GL_TEXTURE_RECTANGLE_NV:
return ctx->Extensions.NV_texture_rectangle;
case GL_TEXTURE_1D_ARRAY_EXT:
- return ctx->Extensions.MESA_texture_array;
+ return (ctx->Extensions.MESA_texture_array ||
+ ctx->Extensions.EXT_texture_array);
default:
return GL_FALSE;
}
@@ -1470,7 +1506,8 @@ legal_texsubimage_target(struct gl_context *ctx, GLuint dims, GLenum target)
case GL_TEXTURE_3D:
return GL_TRUE;
case GL_TEXTURE_2D_ARRAY_EXT:
- return ctx->Extensions.MESA_texture_array;
+ return (ctx->Extensions.MESA_texture_array ||
+ ctx->Extensions.EXT_texture_array);
default:
return GL_FALSE;
}
@@ -1883,7 +1920,9 @@ copytexture_error_check( struct gl_context *ctx, GLuint dimensions,
/* Check that the source buffer is complete */
if (ctx->ReadBuffer->Name) {
- _mesa_test_framebuffer_completeness(ctx, ctx->ReadBuffer);
+ if (ctx->ReadBuffer->_Status == 0) {
+ _mesa_test_framebuffer_completeness(ctx, ctx->ReadBuffer);
+ }
if (ctx->ReadBuffer->_Status != GL_FRAMEBUFFER_COMPLETE_EXT) {
_mesa_error(ctx, GL_INVALID_FRAMEBUFFER_OPERATION_EXT,
"glCopyTexImage%dD(invalid readbuffer)", dimensions);
@@ -1985,7 +2024,9 @@ copytexsubimage_error_check1( struct gl_context *ctx, GLuint dimensions,
{
/* Check that the source buffer is complete */
if (ctx->ReadBuffer->Name) {
- _mesa_test_framebuffer_completeness(ctx, ctx->ReadBuffer);
+ if (ctx->ReadBuffer->_Status == 0) {
+ _mesa_test_framebuffer_completeness(ctx, ctx->ReadBuffer);
+ }
if (ctx->ReadBuffer->_Status != GL_FRAMEBUFFER_COMPLETE_EXT) {
_mesa_error(ctx, GL_INVALID_FRAMEBUFFER_OPERATION_EXT,
"glCopyTexImage%dD(invalid readbuffer)", dimensions);
diff --git a/src/mesa/main/teximage.h b/src/mesa/main/teximage.h
index 5bb9d492e93..bb5509e5be6 100644
--- a/src/mesa/main/teximage.h
+++ b/src/mesa/main/teximage.h
@@ -126,6 +126,8 @@ _mesa_test_proxy_teximage(struct gl_context *ctx, GLenum target, GLint level,
extern GLuint
_mesa_tex_target_to_face(GLenum target);
+extern GLint
+_mesa_get_texture_dimensions(GLenum target);
/**
* Lock a texture for updating. See also _mesa_lock_context_textures().
diff --git a/src/mesa/main/texobj.c b/src/mesa/main/texobj.c
index 5bc5639dbf7..5be881ec45e 100644
--- a/src/mesa/main/texobj.c
+++ b/src/mesa/main/texobj.c
@@ -141,6 +141,7 @@ _mesa_initialize_texture_object( struct gl_texture_object *obj,
obj->Swizzle[2] = GL_BLUE;
obj->Swizzle[3] = GL_ALPHA;
obj->_Swizzle = SWIZZLE_NOOP;
+ obj->sRGBDecode = GL_DECODE_EXT;
}
@@ -470,6 +471,12 @@ _mesa_test_texobj_completeness( const struct gl_context *ctx,
ASSERT(maxLevels > 0);
+ if (t->MaxLevel < t->BaseLevel) {
+ incomplete(t, "MAX_LEVEL (%d) < BASE_LEVEL (%d)",
+ t->MaxLevel, t->BaseLevel);
+ return;
+ }
+
t->_MaxLevel = baseLevel + maxLog2;
t->_MaxLevel = MIN2(t->_MaxLevel, t->MaxLevel);
t->_MaxLevel = MIN2(t->_MaxLevel, maxLevels - 1);
diff --git a/src/mesa/main/texpal.c b/src/mesa/main/texpal.c
index a25e7aa4ff8..b2112f957a2 100644
--- a/src/mesa/main/texpal.c
+++ b/src/mesa/main/texpal.c
@@ -18,6 +18,7 @@
#include "glheader.h"
#include "compiler.h" /* for ASSERT */
#include "context.h"
+#include "mfeatures.h"
#include "mtypes.h"
#include "imports.h"
#include "pixelstore.h"
diff --git a/src/mesa/main/texparam.c b/src/mesa/main/texparam.c
index d5c83de97f7..6e14face4dd 100644
--- a/src/mesa/main/texparam.c
+++ b/src/mesa/main/texparam.c
@@ -33,12 +33,16 @@
#include "main/glheader.h"
#include "main/colormac.h"
#include "main/context.h"
+#include "main/enums.h"
#include "main/formats.h"
#include "main/macros.h"
+#include "main/mfeatures.h"
+#include "main/mtypes.h"
#include "main/texcompress.h"
#include "main/texparam.h"
#include "main/teximage.h"
#include "main/texstate.h"
+#include "main/texfetch.h"
#include "program/prog_instruction.h"
@@ -113,12 +117,14 @@ get_texobj(struct gl_context *ctx, GLenum target, GLboolean get)
}
break;
case GL_TEXTURE_1D_ARRAY_EXT:
- if (ctx->Extensions.MESA_texture_array) {
+ if (ctx->Extensions.MESA_texture_array ||
+ ctx->Extensions.EXT_texture_array) {
return texUnit->CurrentTex[TEXTURE_1D_ARRAY_INDEX];
}
break;
case GL_TEXTURE_2D_ARRAY_EXT:
- if (ctx->Extensions.MESA_texture_array) {
+ if (ctx->Extensions.MESA_texture_array ||
+ ctx->Extensions.EXT_texture_array) {
return texUnit->CurrentTex[TEXTURE_2D_ARRAY_INDEX];
}
break;
@@ -172,13 +178,26 @@ set_swizzle_component(GLuint *swizzle, GLuint comp, GLuint swz)
/**
- * This is called just prior to changing any texture object state.
+ * This is called just prior to changing any texture object state which
+ * will not effect texture completeness.
+ */
+static INLINE void
+flush(struct gl_context *ctx)
+{
+ FLUSH_VERTICES(ctx, _NEW_TEXTURE);
+}
+
+
+/**
+ * This is called just prior to changing any texture object state which
+ * can effect texture completeness (texture base level, max level,
+ * minification filter).
* Any pending rendering will be flushed out, we'll set the _NEW_TEXTURE
* state flag and then mark the texture object as 'incomplete' so that any
* per-texture derived state gets recomputed.
*/
static INLINE void
-flush(struct gl_context *ctx, struct gl_texture_object *texObj)
+incomplete(struct gl_context *ctx, struct gl_texture_object *texObj)
{
FLUSH_VERTICES(ctx, _NEW_TEXTURE);
texObj->_Complete = GL_FALSE;
@@ -201,7 +220,7 @@ set_tex_parameteri(struct gl_context *ctx,
switch (params[0]) {
case GL_NEAREST:
case GL_LINEAR:
- flush(ctx, texObj);
+ incomplete(ctx, texObj);
texObj->MinFilter = params[0];
return GL_TRUE;
case GL_NEAREST_MIPMAP_NEAREST:
@@ -209,14 +228,13 @@ set_tex_parameteri(struct gl_context *ctx,
case GL_NEAREST_MIPMAP_LINEAR:
case GL_LINEAR_MIPMAP_LINEAR:
if (texObj->Target != GL_TEXTURE_RECTANGLE_NV) {
- flush(ctx, texObj);
+ incomplete(ctx, texObj);
texObj->MinFilter = params[0];
return GL_TRUE;
}
/* fall-through */
default:
- _mesa_error( ctx, GL_INVALID_ENUM, "glTexParameter(param=0x%x)",
- params[0] );
+ goto invalid_param;
}
return GL_FALSE;
@@ -226,12 +244,11 @@ set_tex_parameteri(struct gl_context *ctx,
switch (params[0]) {
case GL_NEAREST:
case GL_LINEAR:
- flush(ctx, texObj);
+ flush(ctx); /* does not effect completeness */
texObj->MagFilter = params[0];
return GL_TRUE;
default:
- _mesa_error( ctx, GL_INVALID_ENUM, "glTexParameter(param=0x%x)",
- params[0]);
+ goto invalid_param;
}
return GL_FALSE;
@@ -239,7 +256,7 @@ set_tex_parameteri(struct gl_context *ctx,
if (texObj->WrapS == params[0])
return GL_FALSE;
if (validate_texture_wrap_mode(ctx, texObj->Target, params[0])) {
- flush(ctx, texObj);
+ flush(ctx);
texObj->WrapS = params[0];
return GL_TRUE;
}
@@ -249,7 +266,7 @@ set_tex_parameteri(struct gl_context *ctx,
if (texObj->WrapT == params[0])
return GL_FALSE;
if (validate_texture_wrap_mode(ctx, texObj->Target, params[0])) {
- flush(ctx, texObj);
+ flush(ctx);
texObj->WrapT = params[0];
return GL_TRUE;
}
@@ -259,7 +276,7 @@ set_tex_parameteri(struct gl_context *ctx,
if (texObj->WrapR == params[0])
return GL_FALSE;
if (validate_texture_wrap_mode(ctx, texObj->Target, params[0])) {
- flush(ctx, texObj);
+ flush(ctx);
texObj->WrapR = params[0];
return GL_TRUE;
}
@@ -274,7 +291,7 @@ set_tex_parameteri(struct gl_context *ctx,
"glTexParameter(param=%d)", params[0]);
return GL_FALSE;
}
- flush(ctx, texObj);
+ incomplete(ctx, texObj);
texObj->BaseLevel = params[0];
return GL_TRUE;
@@ -286,34 +303,31 @@ set_tex_parameteri(struct gl_context *ctx,
"glTexParameter(param=%d)", params[0]);
return GL_FALSE;
}
- flush(ctx, texObj);
+ incomplete(ctx, texObj);
texObj->MaxLevel = params[0];
return GL_TRUE;
case GL_GENERATE_MIPMAP_SGIS:
if (texObj->GenerateMipmap != params[0]) {
- flush(ctx, texObj);
+ /* no flush() */
texObj->GenerateMipmap = params[0] ? GL_TRUE : GL_FALSE;
return GL_TRUE;
}
return GL_FALSE;
case GL_TEXTURE_COMPARE_MODE_ARB:
- if (ctx->Extensions.ARB_shadow &&
- (params[0] == GL_NONE ||
- params[0] == GL_COMPARE_R_TO_TEXTURE_ARB)) {
- if (texObj->CompareMode != params[0]) {
- flush(ctx, texObj);
+ if (ctx->Extensions.ARB_shadow) {
+ if (texObj->CompareMode == params[0])
+ return GL_FALSE;
+ if (params[0] == GL_NONE ||
+ params[0] == GL_COMPARE_R_TO_TEXTURE_ARB) {
+ flush(ctx);
texObj->CompareMode = params[0];
return GL_TRUE;
}
- return GL_FALSE;
+ goto invalid_param;
}
- else {
- _mesa_error(ctx, GL_INVALID_ENUM,
- "glTexParameter(GL_TEXTURE_COMPARE_MODE_ARB)");
- }
- return GL_FALSE;
+ goto invalid_pname;
case GL_TEXTURE_COMPARE_FUNC_ARB:
if (ctx->Extensions.ARB_shadow) {
@@ -322,7 +336,7 @@ set_tex_parameteri(struct gl_context *ctx,
switch (params[0]) {
case GL_LEQUAL:
case GL_GEQUAL:
- flush(ctx, texObj);
+ flush(ctx);
texObj->CompareFunc = params[0];
return GL_TRUE;
case GL_EQUAL:
@@ -332,38 +346,32 @@ set_tex_parameteri(struct gl_context *ctx,
case GL_ALWAYS:
case GL_NEVER:
if (ctx->Extensions.EXT_shadow_funcs) {
- flush(ctx, texObj);
+ flush(ctx);
texObj->CompareFunc = params[0];
return GL_TRUE;
}
/* fall-through */
default:
- _mesa_error(ctx, GL_INVALID_ENUM,
- "glTexParameter(GL_TEXTURE_COMPARE_FUNC_ARB)");
+ goto invalid_param;
}
}
- else {
- _mesa_error(ctx, GL_INVALID_ENUM, "glTexParameter(pname=0x%x)", pname);
- }
- return GL_FALSE;
+ goto invalid_pname;
case GL_DEPTH_TEXTURE_MODE_ARB:
- if (ctx->Extensions.ARB_depth_texture &&
- (params[0] == GL_LUMINANCE ||
- params[0] == GL_INTENSITY ||
- params[0] == GL_ALPHA ||
- (ctx->Extensions.ARB_texture_rg && params[0] == GL_RED))) {
- if (texObj->DepthMode != params[0]) {
- flush(ctx, texObj);
+ if (ctx->Extensions.ARB_depth_texture) {
+ if (texObj->DepthMode == params[0])
+ return GL_FALSE;
+ if (params[0] == GL_LUMINANCE ||
+ params[0] == GL_INTENSITY ||
+ params[0] == GL_ALPHA ||
+ (ctx->Extensions.ARB_texture_rg && params[0] == GL_RED)) {
+ flush(ctx);
texObj->DepthMode = params[0];
return GL_TRUE;
}
+ goto invalid_param;
}
- else {
- _mesa_error(ctx, GL_INVALID_ENUM,
- "glTexParameter(GL_DEPTH_TEXTURE_MODE_ARB)");
- }
- return GL_FALSE;
+ goto invalid_pname;
#if FEATURE_OES_draw_texture
case GL_TEXTURE_CROP_RECT_OES:
@@ -388,19 +396,18 @@ set_tex_parameteri(struct gl_context *ctx,
}
ASSERT(comp < 4);
if (swz >= 0) {
- flush(ctx, texObj);
+ flush(ctx);
texObj->Swizzle[comp] = params[0];
set_swizzle_component(&texObj->_Swizzle, comp, swz);
return GL_TRUE;
}
}
- _mesa_error(ctx, GL_INVALID_ENUM, "glTexParameter(pname=0x%x)", pname);
- return GL_FALSE;
+ goto invalid_pname;
case GL_TEXTURE_SWIZZLE_RGBA_EXT:
if (ctx->Extensions.EXT_texture_swizzle) {
GLuint comp;
- flush(ctx, texObj);
+ flush(ctx);
for (comp = 0; comp < 4; comp++) {
const GLint swz = comp_to_swizzle(params[comp]);
if (swz >= 0) {
@@ -415,12 +422,34 @@ set_tex_parameteri(struct gl_context *ctx,
}
return GL_TRUE;
}
- _mesa_error(ctx, GL_INVALID_ENUM, "glTexParameter(pname=0x%x)", pname);
- return GL_FALSE;
+ goto invalid_pname;
+
+ case GL_TEXTURE_SRGB_DECODE_EXT:
+ if (ctx->Extensions.EXT_texture_sRGB_decode) {
+ GLenum decode = params[0];
+ if (decode == GL_DECODE_EXT || decode == GL_SKIP_DECODE_EXT) {
+ if (texObj->sRGBDecode != decode) {
+ flush(ctx);
+ texObj->sRGBDecode = decode;
+ _mesa_update_fetch_functions(texObj);
+ }
+ return GL_TRUE;
+ }
+ }
+ goto invalid_pname;
default:
- _mesa_error(ctx, GL_INVALID_ENUM, "glTexParameter(pname=0x%x)", pname);
+ goto invalid_pname;
}
+
+invalid_pname:
+ _mesa_error(ctx, GL_INVALID_ENUM, "glTexParameter(pname=%s)",
+ _mesa_lookup_enum_by_nr(pname));
+ return GL_FALSE;
+
+invalid_param:
+ _mesa_error(ctx, GL_INVALID_ENUM, "glTexParameter(param=%s)",
+ _mesa_lookup_enum_by_nr(params[0]));
return GL_FALSE;
}
@@ -438,19 +467,19 @@ set_tex_parameterf(struct gl_context *ctx,
case GL_TEXTURE_MIN_LOD:
if (texObj->MinLod == params[0])
return GL_FALSE;
- flush(ctx, texObj);
+ flush(ctx);
texObj->MinLod = params[0];
return GL_TRUE;
case GL_TEXTURE_MAX_LOD:
if (texObj->MaxLod == params[0])
return GL_FALSE;
- flush(ctx, texObj);
+ flush(ctx);
texObj->MaxLod = params[0];
return GL_TRUE;
case GL_TEXTURE_PRIORITY:
- flush(ctx, texObj);
+ flush(ctx);
texObj->Priority = CLAMP(params[0], 0.0F, 1.0F);
return GL_TRUE;
@@ -462,7 +491,7 @@ set_tex_parameterf(struct gl_context *ctx,
_mesa_error(ctx, GL_INVALID_VALUE, "glTexParameter(param)" );
return GL_FALSE;
}
- flush(ctx, texObj);
+ flush(ctx);
/* clamp to max, that's what NVIDIA does */
texObj->MaxAnisotropy = MIN2(params[0],
ctx->Const.MaxTextureMaxAnisotropy);
@@ -479,7 +508,7 @@ set_tex_parameterf(struct gl_context *ctx,
case GL_TEXTURE_COMPARE_FAIL_VALUE_ARB:
if (ctx->Extensions.ARB_shadow_ambient) {
if (texObj->CompareFailValue != params[0]) {
- flush(ctx, texObj);
+ flush(ctx);
texObj->CompareFailValue = CLAMP(params[0], 0.0F, 1.0F);
return GL_TRUE;
}
@@ -494,7 +523,7 @@ set_tex_parameterf(struct gl_context *ctx,
/* NOTE: this is really part of OpenGL 1.4, not EXT_texture_lod_bias */
if (ctx->Extensions.EXT_texture_lod_bias) {
if (texObj->LodBias != params[0]) {
- flush(ctx, texObj);
+ flush(ctx);
texObj->LodBias = params[0];
return GL_TRUE;
}
@@ -503,7 +532,7 @@ set_tex_parameterf(struct gl_context *ctx,
break;
case GL_TEXTURE_BORDER_COLOR:
- flush(ctx, texObj);
+ flush(ctx);
texObj->BorderColor.f[RCOMP] = params[0];
texObj->BorderColor.f[GCOMP] = params[1];
texObj->BorderColor.f[BCOMP] = params[2];
@@ -541,6 +570,7 @@ _mesa_TexParameterf(GLenum target, GLenum pname, GLfloat param)
case GL_TEXTURE_COMPARE_MODE_ARB:
case GL_TEXTURE_COMPARE_FUNC_ARB:
case GL_DEPTH_TEXTURE_MODE_ARB:
+ case GL_TEXTURE_SRGB_DECODE_EXT:
{
/* convert float param to int */
GLint p[4];
@@ -589,6 +619,7 @@ _mesa_TexParameterfv(GLenum target, GLenum pname, const GLfloat *params)
case GL_TEXTURE_COMPARE_MODE_ARB:
case GL_TEXTURE_COMPARE_FUNC_ARB:
case GL_DEPTH_TEXTURE_MODE_ARB:
+ case GL_TEXTURE_SRGB_DECODE_EXT:
{
/* convert float param to int */
GLint p[4];
@@ -803,7 +834,6 @@ _mesa_GetTexLevelParameteriv( GLenum target, GLint level,
const struct gl_texture_unit *texUnit;
struct gl_texture_object *texObj;
const struct gl_texture_image *img = NULL;
- GLboolean isProxy;
GLint maxLevels;
gl_format texFormat;
GET_CURRENT_CONTEXT(ctx);
@@ -831,7 +861,6 @@ _mesa_GetTexLevelParameteriv( GLenum target, GLint level,
}
texObj = _mesa_select_tex_object(ctx, texUnit, target);
- _mesa_lock_texture(ctx, texObj);
img = _mesa_select_tex_image(ctx, texObj, target, level);
if (!img || !img->TexFormat) {
@@ -840,13 +869,11 @@ _mesa_GetTexLevelParameteriv( GLenum target, GLint level,
*params = 1;
else
*params = 0;
- goto out;
+ return;
}
texFormat = img->TexFormat;
- isProxy = _mesa_is_proxy_texture(target);
-
switch (pname) {
case GL_TEXTURE_WIDTH:
*params = img->Width;
@@ -858,9 +885,9 @@ _mesa_GetTexLevelParameteriv( GLenum target, GLint level,
*params = img->Depth;
break;
case GL_TEXTURE_INTERNAL_FORMAT:
- if (_mesa_is_format_compressed(img->TexFormat)) {
+ if (_mesa_is_format_compressed(texFormat)) {
/* need to return the actual compressed format */
- *params = _mesa_compressed_format_to_glenum(ctx, img->TexFormat);
+ *params = _mesa_compressed_format_to_glenum(ctx, texFormat);
}
else {
/* return the user's requested internal format */
@@ -931,8 +958,7 @@ _mesa_GetTexLevelParameteriv( GLenum target, GLint level,
if (ctx->Extensions.ARB_depth_texture)
*params = _mesa_get_format_bits(texFormat, pname);
else
- _mesa_error(ctx, GL_INVALID_ENUM,
- "glGetTexLevelParameter[if]v(pname)");
+ goto invalid_pname;
break;
case GL_TEXTURE_STENCIL_SIZE_EXT:
if (ctx->Extensions.EXT_packed_depth_stencil ||
@@ -940,8 +966,7 @@ _mesa_GetTexLevelParameteriv( GLenum target, GLint level,
*params = _mesa_get_format_bits(texFormat, pname);
}
else {
- _mesa_error(ctx, GL_INVALID_ENUM,
- "glGetTexLevelParameter[if]v(pname)");
+ goto invalid_pname;
}
break;
case GL_TEXTURE_SHARED_SIZE:
@@ -952,14 +977,14 @@ _mesa_GetTexLevelParameteriv( GLenum target, GLint level,
*params = 0;
}
else {
- _mesa_error(ctx, GL_INVALID_ENUM,
- "glGetTexLevelParameter[if]v(pname)");
+ goto invalid_pname;
}
break;
/* GL_ARB_texture_compression */
case GL_TEXTURE_COMPRESSED_IMAGE_SIZE:
- if (_mesa_is_format_compressed(img->TexFormat) && !isProxy) {
+ if (_mesa_is_format_compressed(texFormat) &&
+ !_mesa_is_proxy_texture(target)) {
*params = _mesa_format_image_size(texFormat, img->Width,
img->Height, img->Depth);
}
@@ -969,7 +994,7 @@ _mesa_GetTexLevelParameteriv( GLenum target, GLint level,
}
break;
case GL_TEXTURE_COMPRESSED:
- *params = (GLint) _mesa_is_format_compressed(img->TexFormat);
+ *params = (GLint) _mesa_is_format_compressed(texFormat);
break;
/* GL_ARB_texture_float */
@@ -979,8 +1004,7 @@ _mesa_GetTexLevelParameteriv( GLenum target, GLint level,
_mesa_get_format_datatype(texFormat) : GL_NONE;
}
else {
- _mesa_error(ctx, GL_INVALID_ENUM,
- "glGetTexLevelParameter[if]v(pname)");
+ goto invalid_pname;
}
break;
case GL_TEXTURE_GREEN_TYPE_ARB:
@@ -989,8 +1013,7 @@ _mesa_GetTexLevelParameteriv( GLenum target, GLint level,
_mesa_get_format_datatype(texFormat) : GL_NONE;
}
else {
- _mesa_error(ctx, GL_INVALID_ENUM,
- "glGetTexLevelParameter[if]v(pname)");
+ goto invalid_pname;
}
break;
case GL_TEXTURE_BLUE_TYPE_ARB:
@@ -999,8 +1022,7 @@ _mesa_GetTexLevelParameteriv( GLenum target, GLint level,
_mesa_get_format_datatype(texFormat) : GL_NONE;
}
else {
- _mesa_error(ctx, GL_INVALID_ENUM,
- "glGetTexLevelParameter[if]v(pname)");
+ goto invalid_pname;
}
break;
case GL_TEXTURE_ALPHA_TYPE_ARB:
@@ -1009,8 +1031,7 @@ _mesa_GetTexLevelParameteriv( GLenum target, GLint level,
_mesa_get_format_datatype(texFormat) : GL_NONE;
}
else {
- _mesa_error(ctx, GL_INVALID_ENUM,
- "glGetTexLevelParameter[if]v(pname)");
+ goto invalid_pname;
}
break;
case GL_TEXTURE_LUMINANCE_TYPE_ARB:
@@ -1019,8 +1040,7 @@ _mesa_GetTexLevelParameteriv( GLenum target, GLint level,
_mesa_get_format_datatype(texFormat) : GL_NONE;
}
else {
- _mesa_error(ctx, GL_INVALID_ENUM,
- "glGetTexLevelParameter[if]v(pname)");
+ goto invalid_pname;
}
break;
case GL_TEXTURE_INTENSITY_TYPE_ARB:
@@ -1029,8 +1049,7 @@ _mesa_GetTexLevelParameteriv( GLenum target, GLint level,
_mesa_get_format_datatype(texFormat) : GL_NONE;
}
else {
- _mesa_error(ctx, GL_INVALID_ENUM,
- "glGetTexLevelParameter[if]v(pname)");
+ goto invalid_pname;
}
break;
case GL_TEXTURE_DEPTH_TYPE_ARB:
@@ -1039,18 +1058,21 @@ _mesa_GetTexLevelParameteriv( GLenum target, GLint level,
_mesa_get_format_datatype(texFormat) : GL_NONE;
}
else {
- _mesa_error(ctx, GL_INVALID_ENUM,
- "glGetTexLevelParameter[if]v(pname)");
+ goto invalid_pname;
}
break;
default:
- _mesa_error(ctx, GL_INVALID_ENUM,
- "glGetTexLevelParameter[if]v(pname)");
+ goto invalid_pname;
}
- out:
- _mesa_unlock_texture(ctx, texObj);
+ /* no error if we get here */
+ return;
+
+invalid_pname:
+ _mesa_error(ctx, GL_INVALID_ENUM,
+ "glGetTexLevelParameter[if]v(pname=%s)",
+ _mesa_lookup_enum_by_nr(pname));
}
diff --git a/src/mesa/main/texrender.c b/src/mesa/main/texrender.c
index 8961b926487..8cec24c3e24 100644
--- a/src/mesa/main/texrender.c
+++ b/src/mesa/main/texrender.c
@@ -3,6 +3,7 @@
#include "colormac.h"
#include "macros.h"
#include "texfetch.h"
+#include "teximage.h"
#include "texrender.h"
#include "renderbuffer.h"
@@ -20,6 +21,7 @@ struct texture_renderbuffer
struct gl_renderbuffer Base; /**< Base class object */
struct gl_texture_image *TexImage;
StoreTexelFunc Store;
+ FetchTexelFuncF Fetchf;
GLint Yoffset; /**< Layer for 1D array textures. */
GLint Zoffset; /**< Layer for 2D array textures, or slice
* for 3D textures
@@ -48,7 +50,7 @@ texture_get_row(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count
GLchan *rgbaOut = (GLchan *) values;
for (i = 0; i < count; i++) {
GLfloat rgba[4];
- trb->TexImage->FetchTexelf(trb->TexImage, x + i, y, z, rgba);
+ trb->Fetchf(trb->TexImage, x + i, y, z, rgba);
UNCLAMPED_FLOAT_TO_RGBA_CHAN(rgbaOut + 4 * i, rgba);
}
}
@@ -56,7 +58,7 @@ texture_get_row(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count
GLushort *zValues = (GLushort *) values;
for (i = 0; i < count; i++) {
GLfloat flt;
- trb->TexImage->FetchTexelf(trb->TexImage, x + i, y, z, &flt);
+ trb->Fetchf(trb->TexImage, x + i, y, z, &flt);
zValues[i] = (GLushort) (flt * 0xffff);
}
}
@@ -67,7 +69,7 @@ texture_get_row(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count
*/
for (i = 0; i < count; i++) {
GLfloat flt;
- trb->TexImage->FetchTexelf(trb->TexImage, x + i, y, z, &flt);
+ trb->Fetchf(trb->TexImage, x + i, y, z, &flt);
#if 0
/* this should work, but doesn't (overflow due to low precision) */
zValues[i] = (GLuint) (flt * scale);
@@ -81,7 +83,7 @@ texture_get_row(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count
GLuint *zValues = (GLuint *) values;
for (i = 0; i < count; i++) {
GLfloat flt;
- trb->TexImage->FetchTexelf(trb->TexImage, x + i, y, z, &flt);
+ trb->Fetchf(trb->TexImage, x + i, y, z, &flt);
zValues[i] = ((GLuint) (flt * 0xffffff)) << 8;
}
}
@@ -89,7 +91,7 @@ texture_get_row(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count
GLuint *zValues = (GLuint *) values;
for (i = 0; i < count; i++) {
GLfloat flt;
- trb->TexImage->FetchTexelf(trb->TexImage, x + i, y, z, &flt);
+ trb->Fetchf(trb->TexImage, x + i, y, z, &flt);
zValues[i] = (GLuint) (flt * 0xffffff);
}
}
@@ -112,7 +114,7 @@ texture_get_values(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint co
GLchan *rgbaOut = (GLchan *) values;
for (i = 0; i < count; i++) {
GLfloat rgba[4];
- trb->TexImage->FetchTexelf(trb->TexImage, x[i], y[i] + trb->Yoffset,
+ trb->Fetchf(trb->TexImage, x[i], y[i] + trb->Yoffset,
z, rgba);
UNCLAMPED_FLOAT_TO_RGBA_CHAN(rgbaOut + 4 * i, rgba);
}
@@ -121,7 +123,7 @@ texture_get_values(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint co
GLushort *zValues = (GLushort *) values;
for (i = 0; i < count; i++) {
GLfloat flt;
- trb->TexImage->FetchTexelf(trb->TexImage, x[i], y[i] + trb->Yoffset,
+ trb->Fetchf(trb->TexImage, x[i], y[i] + trb->Yoffset,
z, &flt);
zValues[i] = (GLushort) (flt * 0xffff);
}
@@ -130,7 +132,7 @@ texture_get_values(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint co
GLuint *zValues = (GLuint *) values;
for (i = 0; i < count; i++) {
GLfloat flt;
- trb->TexImage->FetchTexelf(trb->TexImage, x[i], y[i] + trb->Yoffset,
+ trb->Fetchf(trb->TexImage, x[i], y[i] + trb->Yoffset,
z, &flt);
#if 0
zValues[i] = (GLuint) (flt * 0xffffffff);
@@ -143,7 +145,7 @@ texture_get_values(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint co
GLuint *zValues = (GLuint *) values;
for (i = 0; i < count; i++) {
GLfloat flt;
- trb->TexImage->FetchTexelf(trb->TexImage, x[i], y[i] + trb->Yoffset,
+ trb->Fetchf(trb->TexImage, x[i], y[i] + trb->Yoffset,
z, &flt);
zValues[i] = ((GLuint) (flt * 0xffffff)) << 8;
}
@@ -152,7 +154,7 @@ texture_get_values(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint co
GLuint *zValues = (GLuint *) values;
for (i = 0; i < count; i++) {
GLfloat flt;
- trb->TexImage->FetchTexelf(trb->TexImage, x[i], y[i] + trb->Yoffset,
+ trb->Fetchf(trb->TexImage, x[i], y[i] + trb->Yoffset,
z, &flt);
zValues[i] = (GLuint) (flt * 0xffffff);
}
@@ -517,8 +519,6 @@ wrap_texture(struct gl_context *ctx, struct gl_renderbuffer_attachment *att)
_mesa_reference_renderbuffer(&att->Renderbuffer, &(trb->Base));
}
-
-
/**
* Update the renderbuffer wrapper for rendering to a texture.
* For example, update the width, height of the RB based on the texture size,
@@ -542,6 +542,8 @@ update_wrapper(struct gl_context *ctx, const struct gl_renderbuffer_attachment *
trb->Store = store_nop;
}
+ trb->Fetchf = trb->TexImage->FetchTexelf;
+
if (att->Texture->Target == GL_TEXTURE_1D_ARRAY_EXT) {
trb->Yoffset = att->Zoffset;
trb->Zoffset = 0;
@@ -582,6 +584,22 @@ update_wrapper(struct gl_context *ctx, const struct gl_renderbuffer_attachment *
trb->Base.DataType = GL_UNSIGNED_INT;
trb->Base._BaseFormat = GL_DEPTH_COMPONENT;
break;
+ /* SRGB formats pre EXT_framebuffer_sRGB don't do sRGB translations on FBO readback */
+ case MESA_FORMAT_SRGB8:
+ trb->Fetchf = _mesa_get_texel_fetch_func(MESA_FORMAT_RGB888, _mesa_get_texture_dimensions(att->Texture->Target));
+ trb->Base.DataType = CHAN_TYPE;
+ trb->Base._BaseFormat = GL_RGBA;
+ break;
+ case MESA_FORMAT_SRGBA8:
+ trb->Fetchf = _mesa_get_texel_fetch_func(MESA_FORMAT_RGBA8888, _mesa_get_texture_dimensions(att->Texture->Target));
+ trb->Base.DataType = CHAN_TYPE;
+ trb->Base._BaseFormat = GL_RGBA;
+ break;
+ case MESA_FORMAT_SARGB8:
+ trb->Fetchf = _mesa_get_texel_fetch_func(MESA_FORMAT_ARGB8888, _mesa_get_texture_dimensions(att->Texture->Target));
+ trb->Base.DataType = CHAN_TYPE;
+ trb->Base._BaseFormat = GL_RGBA;
+ break;
default:
trb->Base.DataType = CHAN_TYPE;
trb->Base._BaseFormat = GL_RGBA;
diff --git a/src/mesa/main/texstate.c b/src/mesa/main/texstate.c
index f4d77189f29..41d531f5976 100644
--- a/src/mesa/main/texstate.c
+++ b/src/mesa/main/texstate.c
@@ -818,9 +818,6 @@ _mesa_free_texture_data(struct gl_context *ctx)
/* Free proxy texture objects */
for (tgt = 0; tgt < NUM_TEXTURE_TARGETS; tgt++)
ctx->Driver.DeleteTexture(ctx, ctx->Texture.ProxyTex[tgt]);
-
- for (u = 0; u < Elements(ctx->Texture.Unit); u++)
- _mesa_free_colortable_data(&ctx->Texture.Unit[u].ColorTable);
}
diff --git a/src/mesa/main/texstore.c b/src/mesa/main/texstore.c
index 89677c519e5..591759149ad 100644
--- a/src/mesa/main/texstore.c
+++ b/src/mesa/main/texstore.c
@@ -58,11 +58,15 @@
#include "image.h"
#include "macros.h"
#include "mipmap.h"
+#include "mfeatures.h"
+#include "mtypes.h"
#include "pack.h"
+#include "pbo.h"
#include "imports.h"
#include "pack.h"
#include "texcompress.h"
#include "texcompress_fxt1.h"
+#include "texcompress_rgtc.h"
#include "texcompress_s3tc.h"
#include "teximage.h"
#include "texstore.h"
@@ -308,15 +312,15 @@ compute_component_mapping(GLenum inFormat, GLenum outFormat,
* \param srcPacking source image pixel packing
* \return resulting image with format = textureBaseFormat and type = GLfloat.
*/
-static GLfloat *
-make_temp_float_image(struct gl_context *ctx, GLuint dims,
- GLenum logicalBaseFormat,
- GLenum textureBaseFormat,
- GLint srcWidth, GLint srcHeight, GLint srcDepth,
- GLenum srcFormat, GLenum srcType,
- const GLvoid *srcAddr,
- const struct gl_pixelstore_attrib *srcPacking,
- GLbitfield transferOps)
+GLfloat *
+_mesa_make_temp_float_image(struct gl_context *ctx, GLuint dims,
+ GLenum logicalBaseFormat,
+ GLenum textureBaseFormat,
+ GLint srcWidth, GLint srcHeight, GLint srcDepth,
+ GLenum srcFormat, GLenum srcType,
+ const GLvoid *srcAddr,
+ const struct gl_pixelstore_attrib *srcPacking,
+ GLbitfield transferOps)
{
GLfloat *tempImage;
const GLint components = _mesa_components_in_format(logicalBaseFormat);
@@ -2038,6 +2042,132 @@ _mesa_texstore_argb1555(TEXSTORE_PARAMS)
}
+static GLboolean
+_mesa_texstore_argb2101010(TEXSTORE_PARAMS)
+{
+ const GLuint texelBytes = _mesa_get_format_bytes(dstFormat);
+ const GLenum baseFormat = _mesa_get_format_base_format(dstFormat);
+
+ ASSERT(dstFormat == MESA_FORMAT_ARGB2101010);
+ ASSERT(texelBytes == 4);
+
+ if (!ctx->_ImageTransferState &&
+ !srcPacking->SwapBytes &&
+ dstFormat == MESA_FORMAT_ARGB2101010 &&
+ srcFormat == GL_BGRA &&
+ srcType == GL_UNSIGNED_INT_2_10_10_10_REV &&
+ baseInternalFormat == GL_RGBA) {
+ /* simple memcpy path */
+ memcpy_texture(ctx, dims,
+ dstFormat, dstAddr, dstXoffset, dstYoffset, dstZoffset,
+ dstRowStride,
+ dstImageOffsets,
+ srcWidth, srcHeight, srcDepth, srcFormat, srcType,
+ srcAddr, srcPacking);
+ }
+ else {
+ /* general path */
+ const GLfloat *tempImage = _mesa_make_temp_float_image(ctx, dims,
+ baseInternalFormat,
+ baseFormat,
+ srcWidth, srcHeight, srcDepth,
+ srcFormat, srcType, srcAddr,
+ srcPacking,
+ ctx->_ImageTransferState);
+ const GLfloat *src = tempImage;
+ GLint img, row, col;
+ if (!tempImage)
+ return GL_FALSE;
+ for (img = 0; img < srcDepth; img++) {
+ GLubyte *dstRow = (GLubyte *) dstAddr
+ + dstImageOffsets[dstZoffset + img] * texelBytes
+ + dstYoffset * dstRowStride
+ + dstXoffset * texelBytes;
+ if (baseInternalFormat == GL_RGBA) {
+ for (row = 0; row < srcHeight; row++) {
+ GLuint *dstUI = (GLuint *) dstRow;
+ for (col = 0; col < srcWidth; col++) {
+ GLushort a,r,g,b;
+
+ UNCLAMPED_FLOAT_TO_USHORT(a, src[ACOMP]);
+ UNCLAMPED_FLOAT_TO_USHORT(r, src[RCOMP]);
+ UNCLAMPED_FLOAT_TO_USHORT(g, src[GCOMP]);
+ UNCLAMPED_FLOAT_TO_USHORT(b, src[BCOMP]);
+ dstUI[col] = PACK_COLOR_2101010_US(a, r, g, b);
+ src += 4;
+ }
+ dstRow += dstRowStride;
+ }
+ } else if (baseInternalFormat == GL_RGB) {
+ for (row = 0; row < srcHeight; row++) {
+ GLuint *dstUI = (GLuint *) dstRow;
+ for (col = 0; col < srcWidth; col++) {
+ GLushort r,g,b;
+
+ UNCLAMPED_FLOAT_TO_USHORT(r, src[RCOMP]);
+ UNCLAMPED_FLOAT_TO_USHORT(g, src[GCOMP]);
+ UNCLAMPED_FLOAT_TO_USHORT(b, src[BCOMP]);
+ dstUI[col] = PACK_COLOR_2101010_US(0xffff, r, g, b);
+ src += 4;
+ }
+ dstRow += dstRowStride;
+ }
+ } else {
+ ASSERT(0);
+ }
+ }
+ free((void *) tempImage);
+ }
+ return GL_TRUE;
+}
+
+
+/**
+ * Do texstore for 2-channel, 4-bit/channel, unsigned normalized formats.
+ */
+static GLboolean
+_mesa_texstore_unorm44(TEXSTORE_PARAMS)
+{
+ const GLuint texelBytes = _mesa_get_format_bytes(dstFormat);
+ const GLenum baseFormat = _mesa_get_format_base_format(dstFormat);
+
+ ASSERT(dstFormat == MESA_FORMAT_AL44);
+ ASSERT(texelBytes == 1);
+
+ {
+ /* general path */
+ const GLchan *tempImage = _mesa_make_temp_chan_image(ctx, dims,
+ baseInternalFormat,
+ baseFormat,
+ srcWidth, srcHeight, srcDepth,
+ srcFormat, srcType, srcAddr,
+ srcPacking);
+ const GLchan *src = tempImage;
+ GLint img, row, col;
+ if (!tempImage)
+ return GL_FALSE;
+ for (img = 0; img < srcDepth; img++) {
+ GLubyte *dstRow = (GLubyte *) dstAddr
+ + dstImageOffsets[dstZoffset + img] * texelBytes
+ + dstYoffset * dstRowStride
+ + dstXoffset * texelBytes;
+ for (row = 0; row < srcHeight; row++) {
+ GLubyte *dstUS = (GLubyte *) dstRow;
+ for (col = 0; col < srcWidth; col++) {
+ /* src[0] is luminance, src[1] is alpha */
+ dstUS[col] = PACK_COLOR_44( CHAN_TO_UBYTE(src[1]),
+ CHAN_TO_UBYTE(src[0]) );
+ src += 2;
+ }
+ dstRow += dstRowStride;
+ }
+ }
+ free((void *) tempImage);
+ }
+ return GL_TRUE;
+}
+
+
/**
* Do texstore for 2-channel, 8-bit/channel, unsigned normalized formats.
*/
@@ -2189,7 +2319,7 @@ _mesa_texstore_unorm1616(TEXSTORE_PARAMS)
}
else {
/* general path */
- const GLfloat *tempImage = make_temp_float_image(ctx, dims,
+ const GLfloat *tempImage = _mesa_make_temp_float_image(ctx, dims,
baseInternalFormat,
baseFormat,
srcWidth, srcHeight, srcDepth,
@@ -2237,21 +2367,23 @@ _mesa_texstore_unorm1616(TEXSTORE_PARAMS)
}
+/* Texstore for R16, A16, L16, I16. */
static GLboolean
-_mesa_texstore_r16(TEXSTORE_PARAMS)
+_mesa_texstore_unorm16(TEXSTORE_PARAMS)
{
const GLboolean littleEndian = _mesa_little_endian();
const GLuint texelBytes = _mesa_get_format_bytes(dstFormat);
const GLenum baseFormat = _mesa_get_format_base_format(dstFormat);
- ASSERT(dstFormat == MESA_FORMAT_R16);
+ ASSERT(dstFormat == MESA_FORMAT_R16 ||
+ dstFormat == MESA_FORMAT_A16 ||
+ dstFormat == MESA_FORMAT_L16 ||
+ dstFormat == MESA_FORMAT_I16);
ASSERT(texelBytes == 2);
if (!ctx->_ImageTransferState &&
!srcPacking->SwapBytes &&
- dstFormat == MESA_FORMAT_R16 &&
- baseInternalFormat == GL_RED &&
- srcFormat == GL_RED &&
+ baseInternalFormat == srcFormat &&
srcType == GL_UNSIGNED_SHORT &&
littleEndian) {
/* simple memcpy path */
@@ -2264,7 +2396,7 @@ _mesa_texstore_r16(TEXSTORE_PARAMS)
}
else {
/* general path */
- const GLfloat *tempImage = make_temp_float_image(ctx, dims,
+ const GLfloat *tempImage = _mesa_make_temp_float_image(ctx, dims,
baseInternalFormat,
baseFormat,
srcWidth, srcHeight, srcDepth,
@@ -2322,7 +2454,7 @@ _mesa_texstore_rgba_16(TEXSTORE_PARAMS)
}
else {
/* general path */
- const GLfloat *tempImage = make_temp_float_image(ctx, dims,
+ const GLfloat *tempImage = _mesa_make_temp_float_image(ctx, dims,
baseInternalFormat,
baseFormat,
srcWidth, srcHeight, srcDepth,
@@ -2389,7 +2521,7 @@ _mesa_texstore_signed_rgba_16(TEXSTORE_PARAMS)
}
else {
/* general path */
- const GLfloat *tempImage = make_temp_float_image(ctx, dims,
+ const GLfloat *tempImage = _mesa_make_temp_float_image(ctx, dims,
baseInternalFormat,
baseFormat,
srcWidth, srcHeight, srcDepth,
@@ -2489,7 +2621,7 @@ _mesa_texstore_rgb332(TEXSTORE_PARAMS)
* Texstore for _mesa_texformat_a8, _mesa_texformat_l8, _mesa_texformat_i8.
*/
static GLboolean
-_mesa_texstore_a8(TEXSTORE_PARAMS)
+_mesa_texstore_unorm8(TEXSTORE_PARAMS)
{
const GLuint texelBytes = _mesa_get_format_bytes(dstFormat);
const GLenum baseFormat = _mesa_get_format_base_format(dstFormat);
@@ -2771,7 +2903,7 @@ _mesa_texstore_signed_r8(TEXSTORE_PARAMS)
/* XXX look at adding optimized paths */
{
/* general path */
- const GLfloat *tempImage = make_temp_float_image(ctx, dims,
+ const GLfloat *tempImage = _mesa_make_temp_float_image(ctx, dims,
baseInternalFormat,
baseFormat,
srcWidth, srcHeight, srcDepth,
@@ -2816,7 +2948,7 @@ _mesa_texstore_signed_rg88(TEXSTORE_PARAMS)
/* XXX look at adding optimized paths */
{
/* general path */
- const GLfloat *tempImage = make_temp_float_image(ctx, dims,
+ const GLfloat *tempImage = _mesa_make_temp_float_image(ctx, dims,
baseInternalFormat,
baseFormat,
srcWidth, srcHeight, srcDepth,
@@ -2861,7 +2993,7 @@ _mesa_texstore_signed_rgbx8888(TEXSTORE_PARAMS)
{
/* general path */
- const GLfloat *tempImage = make_temp_float_image(ctx, dims,
+ const GLfloat *tempImage = _mesa_make_temp_float_image(ctx, dims,
baseInternalFormat,
baseFormat,
srcWidth, srcHeight, srcDepth,
@@ -2974,7 +3106,7 @@ _mesa_texstore_signed_rgba8888(TEXSTORE_PARAMS)
}
else {
/* general path */
- const GLfloat *tempImage = make_temp_float_image(ctx, dims,
+ const GLfloat *tempImage = _mesa_make_temp_float_image(ctx, dims,
baseInternalFormat,
baseFormat,
srcWidth, srcHeight, srcDepth,
@@ -3283,7 +3415,7 @@ _mesa_texstore_rgba_float32(TEXSTORE_PARAMS)
}
else {
/* general path */
- const GLfloat *tempImage = make_temp_float_image(ctx, dims,
+ const GLfloat *tempImage = _mesa_make_temp_float_image(ctx, dims,
baseInternalFormat,
baseFormat,
srcWidth, srcHeight, srcDepth,
@@ -3353,7 +3485,7 @@ _mesa_texstore_rgba_float16(TEXSTORE_PARAMS)
}
else {
/* general path */
- const GLfloat *tempImage = make_temp_float_image(ctx, dims,
+ const GLfloat *tempImage = _mesa_make_temp_float_image(ctx, dims,
baseInternalFormat,
baseFormat,
srcWidth, srcHeight, srcDepth,
@@ -3419,7 +3551,7 @@ _mesa_texstore_rgba_int8(TEXSTORE_PARAMS)
}
else {
/* general path */
- const GLfloat *tempImage = make_temp_float_image(ctx, dims,
+ const GLfloat *tempImage = _mesa_make_temp_float_image(ctx, dims,
baseInternalFormat,
baseFormat,
srcWidth, srcHeight, srcDepth,
@@ -3484,7 +3616,7 @@ _mesa_texstore_rgba_int16(TEXSTORE_PARAMS)
}
else {
/* general path */
- const GLfloat *tempImage = make_temp_float_image(ctx, dims,
+ const GLfloat *tempImage = _mesa_make_temp_float_image(ctx, dims,
baseInternalFormat,
baseFormat,
srcWidth, srcHeight, srcDepth,
@@ -3549,7 +3681,7 @@ _mesa_texstore_rgba_int32(TEXSTORE_PARAMS)
}
else {
/* general path */
- const GLfloat *tempImage = make_temp_float_image(ctx, dims,
+ const GLfloat *tempImage = _mesa_make_temp_float_image(ctx, dims,
baseInternalFormat,
baseFormat,
srcWidth, srcHeight, srcDepth,
@@ -3849,7 +3981,7 @@ _mesa_texstore_sl8(TEXSTORE_PARAMS)
newDstFormat = MESA_FORMAT_L8;
/* _mesa_textore_a8 handles luminance8 too */
- k = _mesa_texstore_a8(ctx, dims, baseInternalFormat,
+ k = _mesa_texstore_unorm8(ctx, dims, baseInternalFormat,
newDstFormat, dstAddr,
dstXoffset, dstYoffset, dstZoffset,
dstRowStride, dstImageOffsets,
@@ -3921,23 +4053,28 @@ texstore_funcs[MESA_FORMAT_COUNT] =
{ MESA_FORMAT_RGBA5551, _mesa_texstore_rgba5551 },
{ MESA_FORMAT_ARGB1555, _mesa_texstore_argb1555 },
{ MESA_FORMAT_ARGB1555_REV, _mesa_texstore_argb1555 },
+ { MESA_FORMAT_AL44, _mesa_texstore_unorm44 },
{ MESA_FORMAT_AL88, _mesa_texstore_unorm88 },
{ MESA_FORMAT_AL88_REV, _mesa_texstore_unorm88 },
{ MESA_FORMAT_AL1616, _mesa_texstore_unorm1616 },
{ MESA_FORMAT_AL1616_REV, _mesa_texstore_unorm1616 },
{ MESA_FORMAT_RGB332, _mesa_texstore_rgb332 },
- { MESA_FORMAT_A8, _mesa_texstore_a8 },
- { MESA_FORMAT_L8, _mesa_texstore_a8 },
- { MESA_FORMAT_I8, _mesa_texstore_a8 },
+ { MESA_FORMAT_A8, _mesa_texstore_unorm8 },
+ { MESA_FORMAT_A16, _mesa_texstore_unorm16 },
+ { MESA_FORMAT_L8, _mesa_texstore_unorm8 },
+ { MESA_FORMAT_L16, _mesa_texstore_unorm16 },
+ { MESA_FORMAT_I8, _mesa_texstore_unorm8 },
+ { MESA_FORMAT_I16, _mesa_texstore_unorm16 },
{ MESA_FORMAT_CI8, _mesa_texstore_ci8 },
{ MESA_FORMAT_YCBCR, _mesa_texstore_ycbcr },
{ MESA_FORMAT_YCBCR_REV, _mesa_texstore_ycbcr },
- { MESA_FORMAT_R8, _mesa_texstore_a8 },
+ { MESA_FORMAT_R8, _mesa_texstore_unorm8 },
{ MESA_FORMAT_RG88, _mesa_texstore_unorm88 },
{ MESA_FORMAT_RG88_REV, _mesa_texstore_unorm88 },
- { MESA_FORMAT_R16, _mesa_texstore_r16 },
+ { MESA_FORMAT_R16, _mesa_texstore_unorm16 },
{ MESA_FORMAT_RG1616, _mesa_texstore_unorm1616 },
{ MESA_FORMAT_RG1616_REV, _mesa_texstore_unorm1616 },
+ { MESA_FORMAT_ARGB2101010, _mesa_texstore_argb2101010 },
{ MESA_FORMAT_Z24_S8, _mesa_texstore_z24_s8 },
{ MESA_FORMAT_S8_Z24, _mesa_texstore_s8_z24 },
{ MESA_FORMAT_Z16, _mesa_texstore_z16 },
@@ -3993,7 +4130,19 @@ texstore_funcs[MESA_FORMAT_COUNT] =
{ MESA_FORMAT_SIGNED_RG_16, _mesa_texstore_signed_rgba_16 },
{ MESA_FORMAT_SIGNED_RGB_16, _mesa_texstore_signed_rgba_16 },
{ MESA_FORMAT_SIGNED_RGBA_16, _mesa_texstore_signed_rgba_16 },
- { MESA_FORMAT_RGBA_16, _mesa_texstore_rgba_16 }
+ { MESA_FORMAT_RGBA_16, _mesa_texstore_rgba_16 },
+
+ { MESA_FORMAT_RED_RGTC1, _mesa_texstore_red_rgtc1 },
+ { MESA_FORMAT_SIGNED_RED_RGTC1, _mesa_texstore_signed_red_rgtc1 },
+ { MESA_FORMAT_RG_RGTC2, _mesa_texstore_rg_rgtc2 },
+ { MESA_FORMAT_SIGNED_RG_RGTC2, _mesa_texstore_signed_rg_rgtc2 },
+
+ /* Re-use the R/RG texstore functions.
+ * The code is generic enough to handle LATC too. */
+ { MESA_FORMAT_L_LATC1, _mesa_texstore_red_rgtc1 },
+ { MESA_FORMAT_SIGNED_L_LATC1, _mesa_texstore_signed_red_rgtc1 },
+ { MESA_FORMAT_LA_LATC2, _mesa_texstore_rg_rgtc2 },
+ { MESA_FORMAT_SIGNED_LA_LATC2, _mesa_texstore_signed_rg_rgtc2 }
};
@@ -4059,94 +4208,6 @@ _mesa_texstore(TEXSTORE_PARAMS)
}
-/**
- * Check if an unpack PBO is active prior to fetching a texture image.
- * If so, do bounds checking and map the buffer into main memory.
- * Any errors detected will be recorded.
- * The caller _must_ call _mesa_unmap_teximage_pbo() too!
- */
-const GLvoid *
-_mesa_validate_pbo_teximage(struct gl_context *ctx, GLuint dimensions,
- GLsizei width, GLsizei height, GLsizei depth,
- GLenum format, GLenum type, const GLvoid *pixels,
- const struct gl_pixelstore_attrib *unpack,
- const char *funcName)
-{
- GLubyte *buf;
-
- if (!_mesa_is_bufferobj(unpack->BufferObj)) {
- /* no PBO */
- return pixels;
- }
- if (!_mesa_validate_pbo_access(dimensions, unpack, width, height, depth,
- format, type, pixels)) {
- _mesa_error(ctx, GL_INVALID_OPERATION, funcName, "(invalid PBO access)");
- return NULL;
- }
-
- buf = (GLubyte *) ctx->Driver.MapBuffer(ctx, GL_PIXEL_UNPACK_BUFFER_EXT,
- GL_READ_ONLY_ARB, unpack->BufferObj);
- if (!buf) {
- _mesa_error(ctx, GL_INVALID_OPERATION, funcName, "(PBO is mapped)");
- return NULL;
- }
-
- return ADD_POINTERS(buf, pixels);
-}
-
-
-/**
- * Check if an unpack PBO is active prior to fetching a compressed texture
- * image.
- * If so, do bounds checking and map the buffer into main memory.
- * Any errors detected will be recorded.
- * The caller _must_ call _mesa_unmap_teximage_pbo() too!
- */
-const GLvoid *
-_mesa_validate_pbo_compressed_teximage(struct gl_context *ctx,
- GLsizei imageSize, const GLvoid *pixels,
- const struct gl_pixelstore_attrib *packing,
- const char *funcName)
-{
- GLubyte *buf;
-
- if (!_mesa_is_bufferobj(packing->BufferObj)) {
- /* not using a PBO - return pointer unchanged */
- return pixels;
- }
- if ((const GLubyte *) pixels + imageSize >
- ((const GLubyte *) 0) + packing->BufferObj->Size) {
- /* out of bounds read! */
- _mesa_error(ctx, GL_INVALID_OPERATION, funcName, "(invalid PBO access)");
- return NULL;
- }
-
- buf = (GLubyte*) ctx->Driver.MapBuffer(ctx, GL_PIXEL_UNPACK_BUFFER_EXT,
- GL_READ_ONLY_ARB, packing->BufferObj);
- if (!buf) {
- _mesa_error(ctx, GL_INVALID_OPERATION, funcName, "(PBO is mapped");
- return NULL;
- }
-
- return ADD_POINTERS(buf, pixels);
-}
-
-
-/**
- * This function must be called after either of the validate_pbo_*_teximage()
- * functions. It unmaps the PBO buffer if it was mapped earlier.
- */
-void
-_mesa_unmap_teximage_pbo(struct gl_context *ctx,
- const struct gl_pixelstore_attrib *unpack)
-{
- if (_mesa_is_bufferobj(unpack->BufferObj)) {
- ctx->Driver.UnmapBuffer(ctx, GL_PIXEL_UNPACK_BUFFER_EXT,
- unpack->BufferObj);
- }
-}
-
-
/** Return texture size in bytes */
static GLuint
texture_size(const struct gl_texture_image *texImage)
diff --git a/src/mesa/main/texstore.h b/src/mesa/main/texstore.h
index 177ede423f5..d563187098c 100644
--- a/src/mesa/main/texstore.h
+++ b/src/mesa/main/texstore.h
@@ -81,6 +81,15 @@ _mesa_make_temp_chan_image(struct gl_context *ctx, GLuint dims,
const GLvoid *srcAddr,
const struct gl_pixelstore_attrib *srcPacking);
+GLfloat *
+_mesa_make_temp_float_image(struct gl_context *ctx, GLuint dims,
+ GLenum logicalBaseFormat,
+ GLenum textureBaseFormat,
+ GLint srcWidth, GLint srcHeight, GLint srcDepth,
+ GLenum srcFormat, GLenum srcType,
+ const GLvoid *srcAddr,
+ const struct gl_pixelstore_attrib *srcPacking,
+ GLbitfield transferOps);
extern void
_mesa_store_teximage1d(struct gl_context *ctx, GLenum target, GLint level,
@@ -197,22 +206,4 @@ _mesa_store_compressed_texsubimage3d(struct gl_context *ctx, GLenum target,
struct gl_texture_image *texImage);
-extern const GLvoid *
-_mesa_validate_pbo_teximage(struct gl_context *ctx, GLuint dimensions,
- GLsizei width, GLsizei height, GLsizei depth,
- GLenum format, GLenum type, const GLvoid *pixels,
- const struct gl_pixelstore_attrib *unpack,
- const char *funcName);
-
-extern const GLvoid *
-_mesa_validate_pbo_compressed_teximage(struct gl_context *ctx,
- GLsizei imageSize, const GLvoid *pixels,
- const struct gl_pixelstore_attrib *packing,
- const char *funcName);
-
-extern void
-_mesa_unmap_teximage_pbo(struct gl_context *ctx,
- const struct gl_pixelstore_attrib *unpack);
-
-
#endif
diff --git a/src/mesa/main/texturebarrier.c b/src/mesa/main/texturebarrier.c
new file mode 100644
index 00000000000..56cc8718ca3
--- /dev/null
+++ b/src/mesa/main/texturebarrier.c
@@ -0,0 +1,54 @@
+/*
+ * Copyright © 2011 Marek Olšák <maraeo@gmail.com>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * 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 texturebarrier.c
+ * Implementation of glTextureBarrierNV.
+ *
+ * \author Marek Olšák <maraeo@gmail.com>
+ */
+
+#include "context.h"
+#include "texturebarrier.h"
+
+
+static void
+_mesa_texture_barrier(struct gl_context *ctx)
+{
+ /* no-op */
+}
+
+void
+_mesa_init_texture_barrier_functions(struct dd_function_table *driver)
+{
+ driver->TextureBarrier = _mesa_texture_barrier;
+}
+
+void GLAPIENTRY
+_mesa_TextureBarrierNV(void)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ ASSERT_OUTSIDE_BEGIN_END(ctx);
+
+ ctx->Driver.TextureBarrier(ctx);
+}
diff --git a/src/mesa/main/texturebarrier.h b/src/mesa/main/texturebarrier.h
new file mode 100644
index 00000000000..a84a85b2176
--- /dev/null
+++ b/src/mesa/main/texturebarrier.h
@@ -0,0 +1,44 @@
+/*
+ * Copyright © 2011 Marek Olšák <maraeo@gmail.com>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * 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 texturebarrier.h
+ * GL_NV_texture_barrier
+ *
+ * \author Marek Olšák <maraeo@gmail.com>
+ */
+
+#ifndef TEXTUREBARRIER_H
+#define TEXTUREBARRIER_H
+
+#include "glheader.h"
+
+struct dd_function_table;
+
+extern void
+_mesa_init_texture_barrier_functions(struct dd_function_table *driver);
+
+extern void GLAPIENTRY
+_mesa_TextureBarrierNV(void);
+
+#endif /* TEXTUREBARRIER_H */
diff --git a/src/mesa/main/transformfeedback.c b/src/mesa/main/transformfeedback.c
index d297b5ed712..fbd70d56ca9 100644
--- a/src/mesa/main/transformfeedback.c
+++ b/src/mesa/main/transformfeedback.c
@@ -34,6 +34,8 @@
#include "bufferobj.h"
#include "context.h"
#include "hash.h"
+#include "mfeatures.h"
+#include "mtypes.h"
#include "transformfeedback.h"
#include "shaderapi.h"
#include "shaderobj.h"
diff --git a/src/mesa/main/uniforms.c b/src/mesa/main/uniforms.c
index d61856d0ebc..1d74efafdf7 100644
--- a/src/mesa/main/uniforms.c
+++ b/src/mesa/main/uniforms.c
@@ -39,6 +39,8 @@
#include "main/glheader.h"
#include "main/context.h"
#include "main/dispatch.h"
+#include "main/mfeatures.h"
+#include "main/mtypes.h"
#include "main/shaderapi.h"
#include "main/shaderobj.h"
#include "main/uniforms.h"
@@ -207,6 +209,18 @@ static struct gl_builtin_uniform_element gl_NormalScale_elements[] = {
{NULL, {STATE_NORMAL_SCALE}, SWIZZLE_XXXX},
};
+static struct gl_builtin_uniform_element gl_MESABumpRotMatrix0_elements[] = {
+ {NULL, {STATE_INTERNAL, STATE_ROT_MATRIX_0}, SWIZZLE_XYZW},
+};
+
+static struct gl_builtin_uniform_element gl_MESABumpRotMatrix1_elements[] = {
+ {NULL, {STATE_INTERNAL, STATE_ROT_MATRIX_1}, SWIZZLE_XYZW},
+};
+
+static struct gl_builtin_uniform_element gl_MESAFogParamsOptimized_elements[] = {
+ {NULL, {STATE_INTERNAL, STATE_FOG_PARAMS_OPTIMIZED}, SWIZZLE_XYZW},
+};
+
#define MATRIX(name, statevar, modifier) \
static struct gl_builtin_uniform_element name ## _elements[] = { \
{ NULL, { statevar, 0, 0, 0, modifier}, SWIZZLE_XYZW }, \
@@ -310,6 +324,10 @@ const struct gl_builtin_uniform_desc _mesa_builtin_uniform_desc[] = {
STATEVAR(gl_NormalMatrix),
STATEVAR(gl_NormalScale),
+ STATEVAR(gl_MESABumpRotMatrix0),
+ STATEVAR(gl_MESABumpRotMatrix1),
+ STATEVAR(gl_MESAFogParamsOptimized),
+
{NULL, NULL, 0}
};
@@ -448,6 +466,36 @@ _mesa_get_active_uniform(struct gl_context *ctx, GLuint program, GLuint index,
}
+static unsigned
+get_vector_elements(GLenum type)
+{
+ switch (type) {
+ case GL_FLOAT:
+ case GL_INT:
+ case GL_BOOL:
+ case GL_UNSIGNED_INT:
+ default: /* Catch all the various sampler types. */
+ return 1;
+
+ case GL_FLOAT_VEC2:
+ case GL_INT_VEC2:
+ case GL_BOOL_VEC2:
+ case GL_UNSIGNED_INT_VEC2:
+ return 2;
+
+ case GL_FLOAT_VEC3:
+ case GL_INT_VEC3:
+ case GL_BOOL_VEC3:
+ case GL_UNSIGNED_INT_VEC3:
+ return 3;
+
+ case GL_FLOAT_VEC4:
+ case GL_INT_VEC4:
+ case GL_BOOL_VEC4:
+ case GL_UNSIGNED_INT_VEC4:
+ return 4;
+ }
+}
static void
get_matrix_dims(GLenum type, GLint *rows, GLint *cols)
@@ -506,17 +554,8 @@ get_uniform_rows_cols(const struct gl_program_parameter *p,
get_matrix_dims(p->DataType, rows, cols);
if (*rows == 0 && *cols == 0) {
/* not a matrix type, probably a float or vector */
- if (p->Size <= 4) {
- *rows = 1;
- *cols = p->Size;
- }
- else {
- *rows = p->Size / 4 + 1;
- if (p->Size % 4 == 0)
- *cols = 4;
- else
- *cols = p->Size % 4;
- }
+ *rows = 1;
+ *cols = get_vector_elements(p->DataType);
}
}
@@ -640,8 +679,10 @@ _mesa_get_uniformfv(struct gl_context *ctx, GLuint program, GLint location,
k = 0;
for (i = 0; i < rows; i++) {
+ const int base = paramPos + offset + i;
+
for (j = 0; j < cols; j++ ) {
- params[k++] = prog->Parameters->ParameterValues[paramPos+i][j];
+ params[k++] = prog->Parameters->ParameterValues[base][j];
}
}
}
@@ -673,8 +714,10 @@ _mesa_get_uniformiv(struct gl_context *ctx, GLuint program, GLint location,
k = 0;
for (i = 0; i < rows; i++) {
+ const int base = paramPos + offset + i;
+
for (j = 0; j < cols; j++ ) {
- params[k++] = (GLint) prog->Parameters->ParameterValues[paramPos+i][j];
+ params[k++] = (GLint) prog->Parameters->ParameterValues[base][j];
}
}
}
@@ -707,8 +750,10 @@ _mesa_get_uniformuiv(struct gl_context *ctx, GLuint program, GLint location,
k = 0;
for (i = 0; i < rows; i++) {
+ const int base = paramPos + offset + i;
+
for (j = 0; j < cols; j++ ) {
- params[k++] = (GLuint) prog->Parameters->ParameterValues[paramPos+i][j];
+ params[k++] = (GLuint) prog->Parameters->ParameterValues[base][j];
}
}
}
diff --git a/src/mesa/main/varray.c b/src/mesa/main/varray.c
index 2728b382262..cfed4b506a5 100644
--- a/src/mesa/main/varray.c
+++ b/src/mesa/main/varray.c
@@ -33,6 +33,7 @@
#include "hash.h"
#include "image.h"
#include "macros.h"
+#include "mfeatures.h"
#include "mtypes.h"
#include "varray.h"
#include "arrayobj.h"
@@ -127,8 +128,8 @@ update_array(struct gl_context *ctx,
GLsizei elementSize;
GLenum format = GL_RGBA;
- if (ctx->API != API_OPENGLES) {
- /* fixed point arrays / data is only allowed with OpenGL ES 1.x */
+ if (ctx->API != API_OPENGLES && ctx->API != API_OPENGLES2) {
+ /* fixed point arrays / data is only allowed with OpenGL ES 1.x/2.0 */
legalTypesMask &= ~FIXED_BIT;
}
@@ -507,7 +508,7 @@ get_vertex_array_attrib(struct gl_context *ctx, GLuint index, GLenum pname,
{
const struct gl_client_array *array;
- if (index >= MAX_VERTEX_GENERIC_ATTRIBS) {
+ if (index >= ctx->Const.VertexProgram.MaxAttribs) {
_mesa_error(ctx, GL_INVALID_VALUE, "%s(index=%u)", caller, index);
return 0;
}
@@ -533,14 +534,41 @@ get_vertex_array_attrib(struct gl_context *ctx, GLuint index, GLenum pname,
if (ctx->Extensions.EXT_gpu_shader4) {
return array->Integer;
}
- /* fall-through */
+ goto error;
+ case GL_VERTEX_ATTRIB_ARRAY_DIVISOR_ARB:
+ if (ctx->Extensions.ARB_instanced_arrays) {
+ return array->InstanceDivisor;
+ }
+ goto error;
default:
- _mesa_error(ctx, GL_INVALID_ENUM, "%s(pname=0x%x)", caller, pname);
- return 0;
+ ; /* fall-through */
}
+
+error:
+ _mesa_error(ctx, GL_INVALID_ENUM, "%s(pname=0x%x)", caller, pname);
+ return 0;
}
+static const GLfloat *
+get_current_attrib(struct gl_context *ctx, GLuint index, const char *function)
+{
+ if (index == 0) {
+ if (ctx->API != API_OPENGLES2) {
+ _mesa_error(ctx, GL_INVALID_OPERATION, "%s(index==0)", function);
+ return NULL;
+ }
+ }
+ else if (index >= ctx->Const.VertexProgram.MaxAttribs) {
+ _mesa_error(ctx, GL_INVALID_VALUE,
+ "%s(index>=GL_MAX_VERTEX_ATTRIBS)", function);
+ return NULL;
+ }
+
+ FLUSH_CURRENT(ctx, 0);
+ return ctx->Current.Attrib[VERT_ATTRIB_GENERIC0 + index];
+}
+
void GLAPIENTRY
_mesa_GetVertexAttribfvARB(GLuint index, GLenum pname, GLfloat *params)
{
@@ -548,13 +576,8 @@ _mesa_GetVertexAttribfvARB(GLuint index, GLenum pname, GLfloat *params)
ASSERT_OUTSIDE_BEGIN_END(ctx);
if (pname == GL_CURRENT_VERTEX_ATTRIB_ARB) {
- if (index == 0) {
- _mesa_error(ctx, GL_INVALID_OPERATION,
- "glGetVertexAttribfv(index==0)");
- }
- else {
- const GLfloat *v = ctx->Current.Attrib[VERT_ATTRIB_GENERIC0 + index];
- FLUSH_CURRENT(ctx, 0);
+ const GLfloat *v = get_current_attrib(ctx, index, "glGetVertexAttribfv");
+ if (v != NULL) {
COPY_4V(params, v);
}
}
@@ -572,13 +595,8 @@ _mesa_GetVertexAttribdvARB(GLuint index, GLenum pname, GLdouble *params)
ASSERT_OUTSIDE_BEGIN_END(ctx);
if (pname == GL_CURRENT_VERTEX_ATTRIB_ARB) {
- if (index == 0) {
- _mesa_error(ctx, GL_INVALID_OPERATION,
- "glGetVertexAttribdv(index==0)");
- }
- else {
- const GLfloat *v = ctx->Current.Attrib[VERT_ATTRIB_GENERIC0 + index];
- FLUSH_CURRENT(ctx, 0);
+ const GLfloat *v = get_current_attrib(ctx, index, "glGetVertexAttribdv");
+ if (v != NULL) {
params[0] = (GLdouble) v[0];
params[1] = (GLdouble) v[1];
params[2] = (GLdouble) v[2];
@@ -599,13 +617,8 @@ _mesa_GetVertexAttribivARB(GLuint index, GLenum pname, GLint *params)
ASSERT_OUTSIDE_BEGIN_END(ctx);
if (pname == GL_CURRENT_VERTEX_ATTRIB_ARB) {
- if (index == 0) {
- _mesa_error(ctx, GL_INVALID_OPERATION,
- "glGetVertexAttribiv(index==0)");
- }
- else {
- const GLfloat *v = ctx->Current.Attrib[VERT_ATTRIB_GENERIC0 + index];
- FLUSH_CURRENT(ctx, 0);
+ const GLfloat *v = get_current_attrib(ctx, index, "glGetVertexAttribiv");
+ if (v != NULL) {
/* XXX should floats in[0,1] be scaled to full int range? */
params[0] = (GLint) v[0];
params[1] = (GLint) v[1];
@@ -628,13 +641,9 @@ _mesa_GetVertexAttribIiv(GLuint index, GLenum pname, GLint *params)
ASSERT_OUTSIDE_BEGIN_END(ctx);
if (pname == GL_CURRENT_VERTEX_ATTRIB_ARB) {
- if (index == 0) {
- _mesa_error(ctx, GL_INVALID_OPERATION,
- "glGetVertexAttribIiv(index==0)");
- }
- else {
- const GLfloat *v = ctx->Current.Attrib[VERT_ATTRIB_GENERIC0 + index];
- FLUSH_CURRENT(ctx, 0);
+ const GLfloat *v =
+ get_current_attrib(ctx, index, "glGetVertexAttribIiv");
+ if (v != NULL) {
/* XXX we don't have true integer-valued vertex attribs yet */
params[0] = (GLint) v[0];
params[1] = (GLint) v[1];
@@ -657,13 +666,9 @@ _mesa_GetVertexAttribIuiv(GLuint index, GLenum pname, GLuint *params)
ASSERT_OUTSIDE_BEGIN_END(ctx);
if (pname == GL_CURRENT_VERTEX_ATTRIB_ARB) {
- if (index == 0) {
- _mesa_error(ctx, GL_INVALID_OPERATION,
- "glGetVertexAttribIuiv(index==0)");
- }
- else {
- const GLfloat *v = ctx->Current.Attrib[VERT_ATTRIB_GENERIC0 + index];
- FLUSH_CURRENT(ctx, 0);
+ const GLfloat *v =
+ get_current_attrib(ctx, index, "glGetVertexAttribIuiv");
+ if (v != NULL) {
/* XXX we don't have true integer-valued vertex attribs yet */
params[0] = (GLuint) v[0];
params[1] = (GLuint) v[1];
@@ -1065,6 +1070,33 @@ _mesa_PrimitiveRestartIndex(GLuint index)
/**
+ * See GL_ARB_instanced_arrays.
+ * Note that the instance divisor only applies to generic arrays, not
+ * the legacy vertex arrays.
+ */
+void GLAPIENTRY
+_mesa_VertexAttribDivisor(GLuint index, GLuint divisor)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
+
+ if (!ctx->Extensions.ARB_instanced_arrays) {
+ _mesa_error(ctx, GL_INVALID_OPERATION, "glVertexAttribDivisor()");
+ return;
+ }
+
+ if (index >= ctx->Const.VertexProgram.MaxAttribs) {
+ _mesa_error(ctx, GL_INVALID_ENUM, "glVertexAttribDivisor(index = %u)",
+ index);
+ return;
+ }
+
+ ctx->Array.ArrayObj->VertexAttrib[index].InstanceDivisor = divisor;
+}
+
+
+
+/**
* Copy one client vertex array to another.
*/
void
@@ -1081,6 +1113,7 @@ _mesa_copy_client_array(struct gl_context *ctx,
dst->Enabled = src->Enabled;
dst->Normalized = src->Normalized;
dst->Integer = src->Integer;
+ dst->InstanceDivisor = src->InstanceDivisor;
dst->_ElementSize = src->_ElementSize;
_mesa_reference_buffer_object(ctx, &dst->BufferObj, src->BufferObj);
dst->_MaxElement = src->_MaxElement;
diff --git a/src/mesa/main/varray.h b/src/mesa/main/varray.h
index af9324134ec..53e68c89667 100644
--- a/src/mesa/main/varray.h
+++ b/src/mesa/main/varray.h
@@ -218,6 +218,10 @@ extern void GLAPIENTRY
_mesa_PrimitiveRestartIndex(GLuint index);
+extern void GLAPIENTRY
+_mesa_VertexAttribDivisor(GLuint index, GLuint divisor);
+
+
extern void
_mesa_copy_client_array(struct gl_context *ctx,
struct gl_client_array *dst,
diff --git a/src/mesa/main/version.c b/src/mesa/main/version.c
index 69a28da84c6..a10b86e761e 100644
--- a/src/mesa/main/version.c
+++ b/src/mesa/main/version.c
@@ -22,7 +22,8 @@
*/
-#include "context.h"
+#include "imports.h"
+#include "mtypes.h"
#include "version.h"
diff --git a/src/mesa/main/version.h b/src/mesa/main/version.h
index 1b535080991..2e6335846e3 100644
--- a/src/mesa/main/version.h
+++ b/src/mesa/main/version.h
@@ -1,6 +1,6 @@
/*
* Mesa 3-D graphics library
- * Version: 7.10
+ * Version: 7.11
*
* Copyright (C) 1999-2008 Brian Paul All Rights Reserved.
* Copyright (C) 2009 VMware, Inc. All Rights Reserved.
@@ -33,9 +33,9 @@ struct gl_context;
/* Mesa version */
#define MESA_MAJOR 7
-#define MESA_MINOR 10
+#define MESA_MINOR 11
#define MESA_PATCH 0
-#define MESA_VERSION_STRING "7.10-devel"
+#define MESA_VERSION_STRING "7.11-devel"
/* To make version comparison easy */
#define MESA_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))
diff --git a/src/mesa/main/viewport.c b/src/mesa/main/viewport.c
index 4747022d0b4..a58697ab370 100644
--- a/src/mesa/main/viewport.c
+++ b/src/mesa/main/viewport.c
@@ -31,6 +31,7 @@
#include "context.h"
#include "macros.h"
+#include "mtypes.h"
#include "viewport.h"
@@ -145,7 +146,11 @@ _mesa_DepthRange(GLclampd nearval, GLclampd farval)
}
}
-
+void GLAPIENTRY
+_mesa_DepthRangef(GLclampf nearval, GLclampf farval)
+{
+ _mesa_DepthRange(nearval, farval);
+}
/**
* Initialize the context viewport attribute group.
diff --git a/src/mesa/main/viewport.h b/src/mesa/main/viewport.h
index 909ff92eee5..db4507beaaf 100644
--- a/src/mesa/main/viewport.h
+++ b/src/mesa/main/viewport.h
@@ -43,6 +43,9 @@ _mesa_set_viewport(struct gl_context *ctx, GLint x, GLint y,
extern void GLAPIENTRY
_mesa_DepthRange(GLclampd nearval, GLclampd farval);
+extern void GLAPIENTRY
+_mesa_DepthRangef(GLclampf nearval, GLclampf farval);
+
extern void
_mesa_init_viewport(struct gl_context *ctx);
diff --git a/src/mesa/main/vtxfmt.c b/src/mesa/main/vtxfmt.c
index 8a72641862b..692ce080c9f 100644
--- a/src/mesa/main/vtxfmt.c
+++ b/src/mesa/main/vtxfmt.c
@@ -30,6 +30,7 @@
#include "api_arrayelt.h"
#include "context.h"
#include "imports.h"
+#include "mfeatures.h"
#include "mtypes.h"
#include "vtxfmt.h"
#include "eval.h"
diff --git a/src/mesa/main/vtxfmt.h b/src/mesa/main/vtxfmt.h
index 147385cee96..8bbc54964da 100644
--- a/src/mesa/main/vtxfmt.h
+++ b/src/mesa/main/vtxfmt.h
@@ -34,6 +34,7 @@
#define _VTXFMT_H_
#include "compiler.h"
+#include "mfeatures.h"
#include "mtypes.h"
#if FEATURE_beginend
diff --git a/src/mesa/program/.gitignore b/src/mesa/program/.gitignore
index 086fd9a705c..4c20872e14a 100644
--- a/src/mesa/program/.gitignore
+++ b/src/mesa/program/.gitignore
@@ -1 +1,4 @@
program_parse.output
+lex.yy.c
+program_parse.tab.c
+program_parse.tab.h
diff --git a/src/mesa/program/Makefile b/src/mesa/program/Makefile
deleted file mode 100644
index 400a543bdab..00000000000
--- a/src/mesa/program/Makefile
+++ /dev/null
@@ -1,7 +0,0 @@
-all: program_parse.tab.c lex.yy.c
-
-program_parse.tab.c program_parse.tab.h: program_parse.y
- bison -v -d $<
-
-lex.yy.c: program_lexer.l
- flex --never-interactive $<
diff --git a/src/mesa/program/arbprogparse.h b/src/mesa/program/arbprogparse.h
index 08e25a1c168..4c0c3007205 100644
--- a/src/mesa/program/arbprogparse.h
+++ b/src/mesa/program/arbprogparse.h
@@ -26,7 +26,11 @@
#ifndef ARBPROGPARSE_H
#define ARBPROGPARSE_H
-#include "main/mtypes.h"
+#include "main/glheader.h"
+
+struct gl_context;
+struct gl_fragment_program;
+struct gl_vertex_program;
extern void
_mesa_parse_arb_vertex_program(struct gl_context *ctx, GLenum target,
diff --git a/src/mesa/program/ir_to_mesa.cpp b/src/mesa/program/ir_to_mesa.cpp
index b274a961b28..9578f42f144 100644
--- a/src/mesa/program/ir_to_mesa.cpp
+++ b/src/mesa/program/ir_to_mesa.cpp
@@ -105,13 +105,13 @@ extern ir_to_mesa_src_reg ir_to_mesa_undef;
class ir_to_mesa_instruction : public exec_node {
public:
- /* Callers of this talloc-based new need not call delete. It's
- * easier to just talloc_free 'ctx' (or any of its ancestors). */
+ /* Callers of this ralloc-based new need not call delete. It's
+ * easier to just ralloc_free 'ctx' (or any of its ancestors). */
static void* operator new(size_t size, void *ctx)
{
void *node;
- node = talloc_zero_size(ctx, size);
+ node = rzalloc_size(ctx, size);
assert(node != NULL);
return node;
@@ -295,6 +295,8 @@ public:
bool process_move_condition(ir_rvalue *ir);
+ void copy_propagate(void);
+
void *mem_ctx;
};
@@ -316,7 +318,7 @@ fail_link(struct gl_shader_program *prog, const char *fmt, ...)
{
va_list args;
va_start(args, fmt);
- prog->InfoLog = talloc_vasprintf_append(prog->InfoLog, fmt, args);
+ ralloc_vasprintf_append(&prog->InfoLog, fmt, args);
va_end(args);
prog->LinkStatus = GL_FALSE;
@@ -649,6 +651,7 @@ type_size(const struct glsl_type *type)
return 1;
}
case GLSL_TYPE_ARRAY:
+ assert(type->length > 0);
return type_size(type->fields.array) * type->length;
case GLSL_TYPE_STRUCT:
size = 0;
@@ -724,6 +727,29 @@ ir_to_mesa_visitor::visit(ir_variable *ir)
fp->OriginUpperLeft = ir->origin_upper_left;
fp->PixelCenterInteger = ir->pixel_center_integer;
+
+ } else if (strcmp(ir->name, "gl_FragDepth") == 0) {
+ struct gl_fragment_program *fp = (struct gl_fragment_program *)this->prog;
+ switch (ir->depth_layout) {
+ case ir_depth_layout_none:
+ fp->FragDepthLayout = FRAG_DEPTH_LAYOUT_NONE;
+ break;
+ case ir_depth_layout_any:
+ fp->FragDepthLayout = FRAG_DEPTH_LAYOUT_ANY;
+ break;
+ case ir_depth_layout_greater:
+ fp->FragDepthLayout = FRAG_DEPTH_LAYOUT_GREATER;
+ break;
+ case ir_depth_layout_less:
+ fp->FragDepthLayout = FRAG_DEPTH_LAYOUT_LESS;
+ break;
+ case ir_depth_layout_unchanged:
+ fp->FragDepthLayout = FRAG_DEPTH_LAYOUT_UNCHANGED;
+ break;
+ default:
+ assert(0);
+ break;
+ }
}
if (ir->mode == ir_var_uniform && strncmp(ir->name, "gl_", 3) == 0) {
@@ -1449,16 +1475,16 @@ void
ir_to_mesa_visitor::visit(ir_dereference_variable *ir)
{
variable_storage *entry = find_variable_storage(ir->var);
+ ir_variable *var = ir->var;
if (!entry) {
- switch (ir->var->mode) {
+ switch (var->mode) {
case ir_var_uniform:
- entry = new(mem_ctx) variable_storage(ir->var, PROGRAM_UNIFORM,
- ir->var->location);
+ entry = new(mem_ctx) variable_storage(var, PROGRAM_UNIFORM,
+ var->location);
this->variables.push_tail(entry);
break;
case ir_var_in:
- case ir_var_out:
case ir_var_inout:
/* The linker assigns locations for varyings and attributes,
* including deprecated builtins (like gl_Color), user-assign
@@ -1467,45 +1493,47 @@ ir_to_mesa_visitor::visit(ir_dereference_variable *ir)
*
* FINISHME: We would hit this path for function arguments. Fix!
*/
- assert(ir->var->location != -1);
- if (ir->var->mode == ir_var_in ||
- ir->var->mode == ir_var_inout) {
- entry = new(mem_ctx) variable_storage(ir->var,
- PROGRAM_INPUT,
- ir->var->location);
-
- if (this->prog->Target == GL_VERTEX_PROGRAM_ARB &&
- ir->var->location >= VERT_ATTRIB_GENERIC0) {
- _mesa_add_attribute(prog->Attributes,
- ir->var->name,
- _mesa_sizeof_glsl_type(ir->var->type->gl_type),
- ir->var->type->gl_type,
- ir->var->location - VERT_ATTRIB_GENERIC0);
- }
- } else {
- entry = new(mem_ctx) variable_storage(ir->var,
- PROGRAM_OUTPUT,
- ir->var->location);
- }
-
+ assert(var->location != -1);
+ entry = new(mem_ctx) variable_storage(var,
+ PROGRAM_INPUT,
+ var->location);
+ if (this->prog->Target == GL_VERTEX_PROGRAM_ARB &&
+ var->location >= VERT_ATTRIB_GENERIC0) {
+ _mesa_add_attribute(this->prog->Attributes,
+ var->name,
+ _mesa_sizeof_glsl_type(var->type->gl_type),
+ var->type->gl_type,
+ var->location - VERT_ATTRIB_GENERIC0);
+ }
+ break;
+ case ir_var_out:
+ assert(var->location != -1);
+ entry = new(mem_ctx) variable_storage(var,
+ PROGRAM_OUTPUT,
+ var->location);
break;
+ case ir_var_system_value:
+ entry = new(mem_ctx) variable_storage(var,
+ PROGRAM_SYSTEM_VALUE,
+ var->location);
+ break;
case ir_var_auto:
case ir_var_temporary:
- entry = new(mem_ctx) variable_storage(ir->var, PROGRAM_TEMPORARY,
+ entry = new(mem_ctx) variable_storage(var, PROGRAM_TEMPORARY,
this->next_temp);
this->variables.push_tail(entry);
- next_temp += type_size(ir->var->type);
+ next_temp += type_size(var->type);
break;
}
if (!entry) {
- printf("Failed to make storage for %s\n", ir->var->name);
+ printf("Failed to make storage for %s\n", var->name);
exit(1);
}
}
- this->result = ir_to_mesa_src_reg(entry->file, entry->index, ir->var->type);
+ this->result = ir_to_mesa_src_reg(entry->file, entry->index, var->type);
}
void
@@ -1542,7 +1570,7 @@ ir_to_mesa_visitor::visit(ir_dereference_array *ir)
this->result, src_reg_for_float(element_size));
}
- src_reg.reladdr = talloc(mem_ctx, ir_to_mesa_src_reg);
+ src_reg.reladdr = ralloc(mem_ctx, ir_to_mesa_src_reg);
memcpy(src_reg.reladdr, &index_reg, sizeof(index_reg));
}
@@ -1569,7 +1597,13 @@ ir_to_mesa_visitor::visit(ir_dereference_record *ir)
break;
offset += type_size(struct_type->fields.structure[i].type);
}
- this->result.swizzle = swizzle_for_size(ir->type->vector_elements);
+
+ /* If the type is smaller than a vec4, replicate the last channel out. */
+ if (ir->type->is_scalar() || ir->type->is_vector())
+ this->result.swizzle = swizzle_for_size(ir->type->vector_elements);
+ else
+ this->result.swizzle = SWIZZLE_NOOP;
+
this->result.index += offset;
}
@@ -1893,7 +1927,7 @@ ir_to_mesa_visitor::get_function_signature(ir_function_signature *sig)
return entry;
}
- entry = talloc(mem_ctx, function_entry);
+ entry = ralloc(mem_ctx, function_entry);
entry->sig = sig;
entry->sig_id = this->next_signature_id++;
entry->bgn_inst = NULL;
@@ -2230,12 +2264,12 @@ ir_to_mesa_visitor::ir_to_mesa_visitor()
next_temp = 1;
next_signature_id = 1;
current_function = NULL;
- mem_ctx = talloc_new(NULL);
+ mem_ctx = ralloc_context(NULL);
}
ir_to_mesa_visitor::~ir_to_mesa_visitor()
{
- talloc_free(mem_ctx);
+ ralloc_free(mem_ctx);
}
static struct prog_src_register
@@ -2284,8 +2318,8 @@ set_branchtargets(ir_to_mesa_visitor *v,
}
}
- if_stack = talloc_zero_array(v->mem_ctx, int, if_count);
- loop_stack = talloc_zero_array(v->mem_ctx, int, loop_count);
+ if_stack = rzalloc_array(v->mem_ctx, int, if_count);
+ loop_stack = rzalloc_array(v->mem_ctx, int, loop_count);
for (i = 0; i < num_instructions; i++) {
switch (mesa_instructions[i].Opcode) {
@@ -2372,6 +2406,11 @@ print_program(struct prog_instruction *mesa_instructions,
}
}
+
+/**
+ * Count resources used by the given gpu program (number of texture
+ * samplers, etc).
+ */
static void
count_resources(struct gl_program *prog)
{
@@ -2395,6 +2434,55 @@ count_resources(struct gl_program *prog)
_mesa_update_shader_textures_used(prog);
}
+
+/**
+ * Check if the given vertex/fragment/shader program is within the
+ * resource limits of the context (number of texture units, etc).
+ * If any of those checks fail, record a linker error.
+ *
+ * XXX more checks are needed...
+ */
+static void
+check_resources(const struct gl_context *ctx,
+ struct gl_shader_program *shader_program,
+ struct gl_program *prog)
+{
+ switch (prog->Target) {
+ case GL_VERTEX_PROGRAM_ARB:
+ if (_mesa_bitcount(prog->SamplersUsed) >
+ ctx->Const.MaxVertexTextureImageUnits) {
+ fail_link(shader_program, "Too many vertex shader texture samplers");
+ }
+ if (prog->Parameters->NumParameters > MAX_UNIFORMS) {
+ fail_link(shader_program, "Too many vertex shader constants");
+ }
+ break;
+ case MESA_GEOMETRY_PROGRAM:
+ if (_mesa_bitcount(prog->SamplersUsed) >
+ ctx->Const.MaxGeometryTextureImageUnits) {
+ fail_link(shader_program, "Too many geometry shader texture samplers");
+ }
+ if (prog->Parameters->NumParameters >
+ MAX_GEOMETRY_UNIFORM_COMPONENTS / 4) {
+ fail_link(shader_program, "Too many geometry shader constants");
+ }
+ break;
+ case GL_FRAGMENT_PROGRAM_ARB:
+ if (_mesa_bitcount(prog->SamplersUsed) >
+ ctx->Const.MaxTextureImageUnits) {
+ fail_link(shader_program, "Too many fragment shader texture samplers");
+ }
+ if (prog->Parameters->NumParameters > MAX_UNIFORMS) {
+ fail_link(shader_program, "Too many fragment shader constants");
+ }
+ break;
+ default:
+ _mesa_problem(ctx, "unexpected program type in check_resources()");
+ }
+}
+
+
+
struct uniform_sort {
struct gl_uniform *u;
int pos;
@@ -2428,7 +2516,7 @@ add_uniforms_to_parameters_list(struct gl_shader_program *shader_program,
unsigned int next_sampler = 0, num_uniforms = 0;
struct uniform_sort *sorted_uniforms;
- sorted_uniforms = talloc_array(NULL, struct uniform_sort,
+ sorted_uniforms = ralloc_array(NULL, struct uniform_sort,
shader_program->Uniforms->NumUniforms);
for (i = 0; i < shader_program->Uniforms->NumUniforms; i++) {
@@ -2507,7 +2595,7 @@ add_uniforms_to_parameters_list(struct gl_shader_program *shader_program,
}
}
- talloc_free(sorted_uniforms);
+ ralloc_free(sorted_uniforms);
}
static void
@@ -2523,7 +2611,7 @@ set_uniform_initializer(struct gl_context *ctx, void *mem_ctx,
for (unsigned int i = 0; i < type->length; i++) {
const glsl_type *field_type = type->fields.structure[i].type;
- const char *field_name = talloc_asprintf(mem_ctx, "%s.%s", name,
+ const char *field_name = ralloc_asprintf(mem_ctx, "%s.%s", name,
type->fields.structure[i].name);
set_uniform_initializer(ctx, mem_ctx, shader_program, field_name,
field_type, field_constant);
@@ -2554,7 +2642,7 @@ set_uniform_initializer(struct gl_context *ctx, void *mem_ctx,
void *values;
if (element_type->base_type == GLSL_TYPE_BOOL) {
- int *conv = talloc_array(mem_ctx, int, element_type->components());
+ int *conv = ralloc_array(mem_ctx, int, element_type->components());
for (unsigned int j = 0; j < element_type->components(); j++) {
conv[j] = element->value.b[j];
}
@@ -2600,14 +2688,206 @@ set_uniform_initializers(struct gl_context *ctx,
continue;
if (!mem_ctx)
- mem_ctx = talloc_new(NULL);
+ mem_ctx = ralloc_context(NULL);
set_uniform_initializer(ctx, mem_ctx, shader_program, var->name,
var->type, var->constant_value);
}
}
- talloc_free(mem_ctx);
+ ralloc_free(mem_ctx);
+}
+
+/*
+ * On a basic block basis, tracks available PROGRAM_TEMPORARY register
+ * channels for copy propagation and updates following instructions to
+ * use the original versions.
+ *
+ * The ir_to_mesa_visitor lazily produces code assuming that this pass
+ * will occur. As an example, a TXP production before this pass:
+ *
+ * 0: MOV TEMP[1], INPUT[4].xyyy;
+ * 1: MOV TEMP[1].w, INPUT[4].wwww;
+ * 2: TXP TEMP[2], TEMP[1], texture[0], 2D;
+ *
+ * and after:
+ *
+ * 0: MOV TEMP[1], INPUT[4].xyyy;
+ * 1: MOV TEMP[1].w, INPUT[4].wwww;
+ * 2: TXP TEMP[2], INPUT[4].xyyw, texture[0], 2D;
+ *
+ * which allows for dead code elimination on TEMP[1]'s writes.
+ */
+void
+ir_to_mesa_visitor::copy_propagate(void)
+{
+ ir_to_mesa_instruction **acp = rzalloc_array(mem_ctx,
+ ir_to_mesa_instruction *,
+ this->next_temp * 4);
+ int *acp_level = rzalloc_array(mem_ctx, int, this->next_temp * 4);
+ int level = 0;
+
+ foreach_iter(exec_list_iterator, iter, this->instructions) {
+ ir_to_mesa_instruction *inst = (ir_to_mesa_instruction *)iter.get();
+
+ assert(inst->dst_reg.file != PROGRAM_TEMPORARY
+ || inst->dst_reg.index < this->next_temp);
+
+ /* First, do any copy propagation possible into the src regs. */
+ for (int r = 0; r < 3; r++) {
+ ir_to_mesa_instruction *first = NULL;
+ bool good = true;
+ int acp_base = inst->src_reg[r].index * 4;
+
+ if (inst->src_reg[r].file != PROGRAM_TEMPORARY ||
+ inst->src_reg[r].reladdr)
+ continue;
+
+ /* See if we can find entries in the ACP consisting of MOVs
+ * from the same src register for all the swizzled channels
+ * of this src register reference.
+ */
+ for (int i = 0; i < 4; i++) {
+ int src_chan = GET_SWZ(inst->src_reg[r].swizzle, i);
+ ir_to_mesa_instruction *copy_chan = acp[acp_base + src_chan];
+
+ if (!copy_chan) {
+ good = false;
+ break;
+ }
+
+ assert(acp_level[acp_base + src_chan] <= level);
+
+ if (!first) {
+ first = copy_chan;
+ } else {
+ if (first->src_reg[0].file != copy_chan->src_reg[0].file ||
+ first->src_reg[0].index != copy_chan->src_reg[0].index) {
+ good = false;
+ break;
+ }
+ }
+ }
+
+ if (good) {
+ /* We've now validated that we can copy-propagate to
+ * replace this src register reference. Do it.
+ */
+ inst->src_reg[r].file = first->src_reg[0].file;
+ inst->src_reg[r].index = first->src_reg[0].index;
+
+ int swizzle = 0;
+ for (int i = 0; i < 4; i++) {
+ int src_chan = GET_SWZ(inst->src_reg[r].swizzle, i);
+ ir_to_mesa_instruction *copy_inst = acp[acp_base + src_chan];
+ swizzle |= (GET_SWZ(copy_inst->src_reg[0].swizzle, src_chan) <<
+ (3 * i));
+ }
+ inst->src_reg[r].swizzle = swizzle;
+ }
+ }
+
+ switch (inst->op) {
+ case OPCODE_BGNLOOP:
+ case OPCODE_ENDLOOP:
+ /* End of a basic block, clear the ACP entirely. */
+ memset(acp, 0, sizeof(*acp) * this->next_temp * 4);
+ break;
+
+ case OPCODE_IF:
+ ++level;
+ break;
+
+ case OPCODE_ENDIF:
+ case OPCODE_ELSE:
+ /* Clear all channels written inside the block from the ACP, but
+ * leaving those that were not touched.
+ */
+ for (int r = 0; r < this->next_temp; r++) {
+ for (int c = 0; c < 4; c++) {
+ if (!acp[4 * r + c])
+ continue;
+
+ if (acp_level[4 * r + c] >= level)
+ acp[4 * r + c] = NULL;
+ }
+ }
+ if (inst->op == OPCODE_ENDIF)
+ --level;
+ break;
+
+ default:
+ /* Continuing the block, clear any written channels from
+ * the ACP.
+ */
+ if (inst->dst_reg.file == PROGRAM_TEMPORARY && inst->dst_reg.reladdr) {
+ /* Any temporary might be written, so no copy propagation
+ * across this instruction.
+ */
+ memset(acp, 0, sizeof(*acp) * this->next_temp * 4);
+ } else if (inst->dst_reg.file == PROGRAM_OUTPUT &&
+ inst->dst_reg.reladdr) {
+ /* Any output might be written, so no copy propagation
+ * from outputs across this instruction.
+ */
+ for (int r = 0; r < this->next_temp; r++) {
+ for (int c = 0; c < 4; c++) {
+ if (!acp[4 * r + c])
+ continue;
+
+ if (acp[4 * r + c]->src_reg[0].file == PROGRAM_OUTPUT)
+ acp[4 * r + c] = NULL;
+ }
+ }
+ } else if (inst->dst_reg.file == PROGRAM_TEMPORARY ||
+ inst->dst_reg.file == PROGRAM_OUTPUT) {
+ /* Clear where it's used as dst. */
+ if (inst->dst_reg.file == PROGRAM_TEMPORARY) {
+ for (int c = 0; c < 4; c++) {
+ if (inst->dst_reg.writemask & (1 << c)) {
+ acp[4 * inst->dst_reg.index + c] = NULL;
+ }
+ }
+ }
+
+ /* Clear where it's used as src. */
+ for (int r = 0; r < this->next_temp; r++) {
+ for (int c = 0; c < 4; c++) {
+ if (!acp[4 * r + c])
+ continue;
+
+ int src_chan = GET_SWZ(acp[4 * r + c]->src_reg[0].swizzle, c);
+
+ if (acp[4 * r + c]->src_reg[0].file == inst->dst_reg.file &&
+ acp[4 * r + c]->src_reg[0].index == inst->dst_reg.index &&
+ inst->dst_reg.writemask & (1 << src_chan))
+ {
+ acp[4 * r + c] = NULL;
+ }
+ }
+ }
+ }
+ break;
+ }
+
+ /* If this is a copy, add it to the ACP. */
+ if (inst->op == OPCODE_MOV &&
+ inst->dst_reg.file == PROGRAM_TEMPORARY &&
+ !inst->dst_reg.reladdr &&
+ !inst->saturate &&
+ !inst->src_reg[0].reladdr &&
+ !inst->src_reg[0].negate) {
+ for (int i = 0; i < 4; i++) {
+ if (inst->dst_reg.writemask & (1 << i)) {
+ acp[4 * inst->dst_reg.index + i] = inst;
+ acp_level[4 * inst->dst_reg.index + i] = level;
+ }
+ }
+ }
+ }
+
+ ralloc_free(acp_level);
+ ralloc_free(acp);
}
@@ -2706,9 +2986,11 @@ get_mesa_program(struct gl_context *ctx,
mesa_instructions =
(struct prog_instruction *)calloc(num_instructions,
sizeof(*mesa_instructions));
- mesa_instruction_annotation = talloc_array(v.mem_ctx, ir_instruction *,
+ mesa_instruction_annotation = ralloc_array(v.mem_ctx, ir_instruction *,
num_instructions);
+ v.copy_propagate();
+
/* Convert ir_mesa_instructions into prog_instructions.
*/
mesa_inst = mesa_instructions;
@@ -2798,6 +3080,8 @@ get_mesa_program(struct gl_context *ctx,
do_set_program_inouts(shader->ir, prog);
count_resources(prog);
+ check_resources(ctx, shader_program, prog);
+
_mesa_reference_program(ctx, &shader->Program, prog);
if ((ctx->Shader.Flags & GLSL_NO_OPT) == 0) {
@@ -2861,7 +3145,7 @@ _mesa_ir_link_shader(struct gl_context *ctx, struct gl_shader_program *prog)
if (options->EmitNoIfs) {
progress = lower_discard(ir) || progress;
- progress = do_if_to_cond_assign(ir) || progress;
+ progress = lower_if_to_cond_assign(ir) || progress;
}
if (options->EmitNoNoise)
@@ -2961,7 +3245,7 @@ _mesa_glsl_compile_shader(struct gl_context *ctx, struct gl_shader *shader)
_mesa_glsl_lexer_dtor(state);
}
- talloc_free(shader->ir);
+ ralloc_free(shader->ir);
shader->ir = new(shader) exec_list;
if (!state->error && !state->translation_unit.is_empty())
_mesa_ast_to_hir(shader->ir, state);
@@ -3008,7 +3292,7 @@ _mesa_glsl_compile_shader(struct gl_context *ctx, struct gl_shader *shader)
/* Retain any live IR, but trash the rest. */
reparent_ir(shader->ir, shader->ir);
- talloc_free(state);
+ ralloc_free(state);
if (shader->CompileStatus) {
if (!ctx->Driver.CompileShader(ctx, shader))
diff --git a/src/mesa/program/ir_to_mesa.h b/src/mesa/program/ir_to_mesa.h
index 7197615f949..7410e149735 100644
--- a/src/mesa/program/ir_to_mesa.h
+++ b/src/mesa/program/ir_to_mesa.h
@@ -25,8 +25,11 @@
extern "C" {
#endif
-#include "main/config.h"
-#include "main/mtypes.h"
+#include "main/glheader.h"
+
+struct gl_context;
+struct gl_shader;
+struct gl_shader_program;
void _mesa_glsl_compile_shader(struct gl_context *ctx, struct gl_shader *sh);
void _mesa_glsl_link_shader(struct gl_context *ctx, struct gl_shader_program *prog);
diff --git a/src/mesa/program/lex.yy.c b/src/mesa/program/lex.yy.c
index 135eca6fd8d..33e1a110188 100644
--- a/src/mesa/program/lex.yy.c
+++ b/src/mesa/program/lex.yy.c
@@ -1,5 +1,6 @@
+#line 2 "program/lex.yy.c"
-#line 3 "lex.yy.c"
+#line 4 "program/lex.yy.c"
#define YY_INT_ALIGNED short int
@@ -53,6 +54,7 @@ typedef int flex_int32_t;
typedef unsigned char flex_uint8_t;
typedef unsigned short int flex_uint16_t;
typedef unsigned int flex_uint32_t;
+#endif /* ! C99 */
/* Limits of integral types. */
#ifndef INT8_MIN
@@ -83,8 +85,6 @@ typedef unsigned int flex_uint32_t;
#define UINT32_MAX (4294967295U)
#endif
-#endif /* ! C99 */
-
#endif /* ! FLEXINT_H */
#ifdef __cplusplus
@@ -158,15 +158,7 @@ typedef void* yyscan_t;
/* Size of default input buffer. */
#ifndef YY_BUF_SIZE
-#ifdef __ia64__
-/* On IA-64, the buffer size is 16k, not 8k.
- * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
- * Ditto for the __ia64__ case accordingly.
- */
-#define YY_BUF_SIZE 32768
-#else
#define YY_BUF_SIZE 16384
-#endif /* __ia64__ */
#endif
/* The state buf must be large enough to hold one state per character in the main buffer.
@@ -178,6 +170,11 @@ typedef void* yyscan_t;
typedef struct yy_buffer_state *YY_BUFFER_STATE;
#endif
+#ifndef YY_TYPEDEF_YY_SIZE_T
+#define YY_TYPEDEF_YY_SIZE_T
+typedef size_t yy_size_t;
+#endif
+
#define EOB_ACT_CONTINUE_SCAN 0
#define EOB_ACT_END_OF_FILE 1
#define EOB_ACT_LAST_MATCH 2
@@ -200,11 +197,6 @@ typedef struct yy_buffer_state *YY_BUFFER_STATE;
#define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner )
-#ifndef YY_TYPEDEF_YY_SIZE_T
-#define YY_TYPEDEF_YY_SIZE_T
-typedef size_t yy_size_t;
-#endif
-
#ifndef YY_STRUCT_YY_BUFFER_STATE
#define YY_STRUCT_YY_BUFFER_STATE
struct yy_buffer_state
@@ -222,7 +214,7 @@ struct yy_buffer_state
/* Number of characters read into yy_ch_buf, not including EOB
* characters.
*/
- int yy_n_chars;
+ yy_size_t yy_n_chars;
/* Whether we "own" the buffer - i.e., we know we created it,
* and can realloc() it to grow it, and should free() it to
@@ -301,7 +293,7 @@ static void yy_init_buffer (YY_BUFFER_STATE b,FILE *file ,yyscan_t yyscanner );
YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner );
YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str ,yyscan_t yyscanner );
-YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,int len ,yyscan_t yyscanner );
+YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,yy_size_t len ,yyscan_t yyscanner );
void *yyalloc (yy_size_t ,yyscan_t yyscanner );
void *yyrealloc (void *,yy_size_t ,yyscan_t yyscanner );
@@ -1017,8 +1009,8 @@ static yyconst flex_int16_t yy_chk[1368] =
#define yymore() yymore_used_but_not_detected
#define YY_MORE_ADJ 0
#define YY_RESTORE_YY_MORE_OFFSET
-#line 1 "program_lexer.l"
-#line 2 "program_lexer.l"
+#line 1 "program/program_lexer.l"
+#line 2 "program/program_lexer.l"
/*
* Copyright © 2009 Intel Corporation
*
@@ -1173,7 +1165,7 @@ static keyword. Declare them here to avoid a compiler warning. */
int yyget_column (yyscan_t yyscanner);
void yyset_column (int column_no , yyscan_t yyscanner);
-#line 1177 "lex.yy.c"
+#line 1169 "program/lex.yy.c"
#define INITIAL 0
@@ -1202,8 +1194,8 @@ struct yyguts_t
size_t yy_buffer_stack_max; /**< capacity of stack. */
YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */
char yy_hold_char;
- int yy_n_chars;
- int yyleng_r;
+ yy_size_t yy_n_chars;
+ yy_size_t yyleng_r;
char *yy_c_buf_p;
int yy_init;
int yy_start;
@@ -1260,7 +1252,7 @@ FILE *yyget_out (yyscan_t yyscanner );
void yyset_out (FILE * out_str ,yyscan_t yyscanner );
-int yyget_leng (yyscan_t yyscanner );
+yy_size_t yyget_leng (yyscan_t yyscanner );
char *yyget_text (yyscan_t yyscanner );
@@ -1310,12 +1302,7 @@ static int input (yyscan_t yyscanner );
/* Amount of stuff to slurp up with each read. */
#ifndef YY_READ_BUF_SIZE
-#ifdef __ia64__
-/* On IA-64, the buffer size is 16k, not 8k */
-#define YY_READ_BUF_SIZE 16384
-#else
#define YY_READ_BUF_SIZE 8192
-#endif /* __ia64__ */
#endif
/* Copy whatever the last rule matched to the standard output. */
@@ -1323,7 +1310,7 @@ static int input (yyscan_t yyscanner );
/* This used to be an fputs(), but since the string might contain NUL's,
* we now use fwrite().
*/
-#define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0)
+#define ECHO fwrite( yytext, yyleng, 1, yyout )
#endif
/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
@@ -1334,7 +1321,7 @@ static int input (yyscan_t yyscanner );
if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
{ \
int c = '*'; \
- size_t n; \
+ yy_size_t n; \
for ( n = 0; n < max_size && \
(c = getc( yyin )) != EOF && c != '\n'; ++n ) \
buf[n] = (char) c; \
@@ -1419,10 +1406,10 @@ YY_DECL
register int yy_act;
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-#line 169 "program_lexer.l"
+#line 169 "program/program_lexer.l"
-#line 1426 "lex.yy.c"
+#line 1413 "program/lex.yy.c"
yylval = yylval_param;
@@ -1511,17 +1498,17 @@ do_action: /* This label is used only to access EOF actions. */
case 1:
YY_RULE_SETUP
-#line 171 "program_lexer.l"
+#line 171 "program/program_lexer.l"
{ return ARBvp_10; }
YY_BREAK
case 2:
YY_RULE_SETUP
-#line 172 "program_lexer.l"
+#line 172 "program/program_lexer.l"
{ return ARBfp_10; }
YY_BREAK
case 3:
YY_RULE_SETUP
-#line 173 "program_lexer.l"
+#line 173 "program/program_lexer.l"
{
yylval->integer = at_address;
return_token_or_IDENTIFIER(require_ARB_vp, ADDRESS);
@@ -1529,692 +1516,692 @@ YY_RULE_SETUP
YY_BREAK
case 4:
YY_RULE_SETUP
-#line 177 "program_lexer.l"
+#line 177 "program/program_lexer.l"
{ return ALIAS; }
YY_BREAK
case 5:
YY_RULE_SETUP
-#line 178 "program_lexer.l"
+#line 178 "program/program_lexer.l"
{ return ATTRIB; }
YY_BREAK
case 6:
YY_RULE_SETUP
-#line 179 "program_lexer.l"
+#line 179 "program/program_lexer.l"
{ return END; }
YY_BREAK
case 7:
YY_RULE_SETUP
-#line 180 "program_lexer.l"
+#line 180 "program/program_lexer.l"
{ return OPTION; }
YY_BREAK
case 8:
YY_RULE_SETUP
-#line 181 "program_lexer.l"
+#line 181 "program/program_lexer.l"
{ return OUTPUT; }
YY_BREAK
case 9:
YY_RULE_SETUP
-#line 182 "program_lexer.l"
+#line 182 "program/program_lexer.l"
{ return PARAM; }
YY_BREAK
case 10:
YY_RULE_SETUP
-#line 183 "program_lexer.l"
+#line 183 "program/program_lexer.l"
{ yylval->integer = at_temp; return TEMP; }
YY_BREAK
case 11:
YY_RULE_SETUP
-#line 185 "program_lexer.l"
+#line 185 "program/program_lexer.l"
{ return_opcode( 1, VECTOR_OP, ABS, 3); }
YY_BREAK
case 12:
YY_RULE_SETUP
-#line 186 "program_lexer.l"
+#line 186 "program/program_lexer.l"
{ return_opcode( 1, BIN_OP, ADD, 3); }
YY_BREAK
case 13:
YY_RULE_SETUP
-#line 187 "program_lexer.l"
+#line 187 "program/program_lexer.l"
{ return_opcode(require_ARB_vp, ARL, ARL, 3); }
YY_BREAK
case 14:
YY_RULE_SETUP
-#line 189 "program_lexer.l"
+#line 189 "program/program_lexer.l"
{ return_opcode(require_ARB_fp, TRI_OP, CMP, 3); }
YY_BREAK
case 15:
YY_RULE_SETUP
-#line 190 "program_lexer.l"
+#line 190 "program/program_lexer.l"
{ return_opcode(require_ARB_fp, SCALAR_OP, COS, 3); }
YY_BREAK
case 16:
YY_RULE_SETUP
-#line 192 "program_lexer.l"
+#line 192 "program/program_lexer.l"
{ return_opcode(require_NV_fp, VECTOR_OP, DDX, 3); }
YY_BREAK
case 17:
YY_RULE_SETUP
-#line 193 "program_lexer.l"
+#line 193 "program/program_lexer.l"
{ return_opcode(require_NV_fp, VECTOR_OP, DDY, 3); }
YY_BREAK
case 18:
YY_RULE_SETUP
-#line 194 "program_lexer.l"
+#line 194 "program/program_lexer.l"
{ return_opcode( 1, BIN_OP, DP3, 3); }
YY_BREAK
case 19:
YY_RULE_SETUP
-#line 195 "program_lexer.l"
+#line 195 "program/program_lexer.l"
{ return_opcode( 1, BIN_OP, DP4, 3); }
YY_BREAK
case 20:
YY_RULE_SETUP
-#line 196 "program_lexer.l"
+#line 196 "program/program_lexer.l"
{ return_opcode( 1, BIN_OP, DPH, 3); }
YY_BREAK
case 21:
YY_RULE_SETUP
-#line 197 "program_lexer.l"
+#line 197 "program/program_lexer.l"
{ return_opcode( 1, BIN_OP, DST, 3); }
YY_BREAK
case 22:
YY_RULE_SETUP
-#line 199 "program_lexer.l"
+#line 199 "program/program_lexer.l"
{ return_opcode( 1, SCALAR_OP, EX2, 3); }
YY_BREAK
case 23:
YY_RULE_SETUP
-#line 200 "program_lexer.l"
+#line 200 "program/program_lexer.l"
{ return_opcode(require_ARB_vp, SCALAR_OP, EXP, 3); }
YY_BREAK
case 24:
YY_RULE_SETUP
-#line 202 "program_lexer.l"
+#line 202 "program/program_lexer.l"
{ return_opcode( 1, VECTOR_OP, FLR, 3); }
YY_BREAK
case 25:
YY_RULE_SETUP
-#line 203 "program_lexer.l"
+#line 203 "program/program_lexer.l"
{ return_opcode( 1, VECTOR_OP, FRC, 3); }
YY_BREAK
case 26:
YY_RULE_SETUP
-#line 205 "program_lexer.l"
+#line 205 "program/program_lexer.l"
{ return_opcode(require_ARB_fp, KIL, KIL, 3); }
YY_BREAK
case 27:
YY_RULE_SETUP
-#line 207 "program_lexer.l"
+#line 207 "program/program_lexer.l"
{ return_opcode( 1, VECTOR_OP, LIT, 3); }
YY_BREAK
case 28:
YY_RULE_SETUP
-#line 208 "program_lexer.l"
+#line 208 "program/program_lexer.l"
{ return_opcode( 1, SCALAR_OP, LG2, 3); }
YY_BREAK
case 29:
YY_RULE_SETUP
-#line 209 "program_lexer.l"
+#line 209 "program/program_lexer.l"
{ return_opcode(require_ARB_vp, SCALAR_OP, LOG, 3); }
YY_BREAK
case 30:
YY_RULE_SETUP
-#line 210 "program_lexer.l"
+#line 210 "program/program_lexer.l"
{ return_opcode(require_ARB_fp, TRI_OP, LRP, 3); }
YY_BREAK
case 31:
YY_RULE_SETUP
-#line 212 "program_lexer.l"
+#line 212 "program/program_lexer.l"
{ return_opcode( 1, TRI_OP, MAD, 3); }
YY_BREAK
case 32:
YY_RULE_SETUP
-#line 213 "program_lexer.l"
+#line 213 "program/program_lexer.l"
{ return_opcode( 1, BIN_OP, MAX, 3); }
YY_BREAK
case 33:
YY_RULE_SETUP
-#line 214 "program_lexer.l"
+#line 214 "program/program_lexer.l"
{ return_opcode( 1, BIN_OP, MIN, 3); }
YY_BREAK
case 34:
YY_RULE_SETUP
-#line 215 "program_lexer.l"
+#line 215 "program/program_lexer.l"
{ return_opcode( 1, VECTOR_OP, MOV, 3); }
YY_BREAK
case 35:
YY_RULE_SETUP
-#line 216 "program_lexer.l"
+#line 216 "program/program_lexer.l"
{ return_opcode( 1, BIN_OP, MUL, 3); }
YY_BREAK
case 36:
YY_RULE_SETUP
-#line 218 "program_lexer.l"
+#line 218 "program/program_lexer.l"
{ return_opcode(require_NV_fp, VECTOR_OP, PK2H, 4); }
YY_BREAK
case 37:
YY_RULE_SETUP
-#line 219 "program_lexer.l"
+#line 219 "program/program_lexer.l"
{ return_opcode(require_NV_fp, VECTOR_OP, PK2US, 5); }
YY_BREAK
case 38:
YY_RULE_SETUP
-#line 220 "program_lexer.l"
+#line 220 "program/program_lexer.l"
{ return_opcode(require_NV_fp, VECTOR_OP, PK4B, 4); }
YY_BREAK
case 39:
YY_RULE_SETUP
-#line 221 "program_lexer.l"
+#line 221 "program/program_lexer.l"
{ return_opcode(require_NV_fp, VECTOR_OP, PK4UB, 5); }
YY_BREAK
case 40:
YY_RULE_SETUP
-#line 222 "program_lexer.l"
+#line 222 "program/program_lexer.l"
{ return_opcode( 1, BINSC_OP, POW, 3); }
YY_BREAK
case 41:
YY_RULE_SETUP
-#line 224 "program_lexer.l"
+#line 224 "program/program_lexer.l"
{ return_opcode( 1, SCALAR_OP, RCP, 3); }
YY_BREAK
case 42:
YY_RULE_SETUP
-#line 225 "program_lexer.l"
+#line 225 "program/program_lexer.l"
{ return_opcode(require_NV_fp, BIN_OP, RFL, 3); }
YY_BREAK
case 43:
YY_RULE_SETUP
-#line 226 "program_lexer.l"
+#line 226 "program/program_lexer.l"
{ return_opcode( 1, SCALAR_OP, RSQ, 3); }
YY_BREAK
case 44:
YY_RULE_SETUP
-#line 228 "program_lexer.l"
+#line 228 "program/program_lexer.l"
{ return_opcode(require_ARB_fp, SCALAR_OP, SCS, 3); }
YY_BREAK
case 45:
YY_RULE_SETUP
-#line 229 "program_lexer.l"
+#line 229 "program/program_lexer.l"
{ return_opcode(require_NV_fp, BIN_OP, SEQ, 3); }
YY_BREAK
case 46:
YY_RULE_SETUP
-#line 230 "program_lexer.l"
+#line 230 "program/program_lexer.l"
{ return_opcode(require_NV_fp, BIN_OP, SFL, 3); }
YY_BREAK
case 47:
YY_RULE_SETUP
-#line 231 "program_lexer.l"
+#line 231 "program/program_lexer.l"
{ return_opcode( 1, BIN_OP, SGE, 3); }
YY_BREAK
case 48:
YY_RULE_SETUP
-#line 232 "program_lexer.l"
+#line 232 "program/program_lexer.l"
{ return_opcode(require_NV_fp, BIN_OP, SGT, 3); }
YY_BREAK
case 49:
YY_RULE_SETUP
-#line 233 "program_lexer.l"
+#line 233 "program/program_lexer.l"
{ return_opcode(require_ARB_fp, SCALAR_OP, SIN, 3); }
YY_BREAK
case 50:
YY_RULE_SETUP
-#line 234 "program_lexer.l"
+#line 234 "program/program_lexer.l"
{ return_opcode(require_NV_fp, BIN_OP, SLE, 3); }
YY_BREAK
case 51:
YY_RULE_SETUP
-#line 235 "program_lexer.l"
+#line 235 "program/program_lexer.l"
{ return_opcode( 1, BIN_OP, SLT, 3); }
YY_BREAK
case 52:
YY_RULE_SETUP
-#line 236 "program_lexer.l"
+#line 236 "program/program_lexer.l"
{ return_opcode(require_NV_fp, BIN_OP, SNE, 3); }
YY_BREAK
case 53:
YY_RULE_SETUP
-#line 237 "program_lexer.l"
+#line 237 "program/program_lexer.l"
{ return_opcode(require_NV_fp, BIN_OP, STR, 3); }
YY_BREAK
case 54:
YY_RULE_SETUP
-#line 238 "program_lexer.l"
+#line 238 "program/program_lexer.l"
{ return_opcode( 1, BIN_OP, SUB, 3); }
YY_BREAK
case 55:
YY_RULE_SETUP
-#line 239 "program_lexer.l"
+#line 239 "program/program_lexer.l"
{ return_opcode( 1, SWZ, SWZ, 3); }
YY_BREAK
case 56:
YY_RULE_SETUP
-#line 241 "program_lexer.l"
+#line 241 "program/program_lexer.l"
{ return_opcode(require_ARB_fp, SAMPLE_OP, TEX, 3); }
YY_BREAK
case 57:
YY_RULE_SETUP
-#line 242 "program_lexer.l"
+#line 242 "program/program_lexer.l"
{ return_opcode(require_ARB_fp, SAMPLE_OP, TXB, 3); }
YY_BREAK
case 58:
YY_RULE_SETUP
-#line 243 "program_lexer.l"
+#line 243 "program/program_lexer.l"
{ return_opcode(require_NV_fp, TXD_OP, TXD, 3); }
YY_BREAK
case 59:
YY_RULE_SETUP
-#line 244 "program_lexer.l"
+#line 244 "program/program_lexer.l"
{ return_opcode(require_ARB_fp, SAMPLE_OP, TXP, 3); }
YY_BREAK
case 60:
YY_RULE_SETUP
-#line 246 "program_lexer.l"
+#line 246 "program/program_lexer.l"
{ return_opcode(require_NV_fp, SCALAR_OP, UP2H, 4); }
YY_BREAK
case 61:
YY_RULE_SETUP
-#line 247 "program_lexer.l"
+#line 247 "program/program_lexer.l"
{ return_opcode(require_NV_fp, SCALAR_OP, UP2US, 5); }
YY_BREAK
case 62:
YY_RULE_SETUP
-#line 248 "program_lexer.l"
+#line 248 "program/program_lexer.l"
{ return_opcode(require_NV_fp, SCALAR_OP, UP4B, 4); }
YY_BREAK
case 63:
YY_RULE_SETUP
-#line 249 "program_lexer.l"
+#line 249 "program/program_lexer.l"
{ return_opcode(require_NV_fp, SCALAR_OP, UP4UB, 5); }
YY_BREAK
case 64:
YY_RULE_SETUP
-#line 251 "program_lexer.l"
+#line 251 "program/program_lexer.l"
{ return_opcode(require_NV_fp, TRI_OP, X2D, 3); }
YY_BREAK
case 65:
YY_RULE_SETUP
-#line 252 "program_lexer.l"
+#line 252 "program/program_lexer.l"
{ return_opcode( 1, BIN_OP, XPD, 3); }
YY_BREAK
case 66:
YY_RULE_SETUP
-#line 254 "program_lexer.l"
+#line 254 "program/program_lexer.l"
{ return_token_or_IDENTIFIER(require_ARB_vp, VERTEX); }
YY_BREAK
case 67:
YY_RULE_SETUP
-#line 255 "program_lexer.l"
+#line 255 "program/program_lexer.l"
{ return_token_or_IDENTIFIER(require_ARB_fp, FRAGMENT); }
YY_BREAK
case 68:
YY_RULE_SETUP
-#line 256 "program_lexer.l"
+#line 256 "program/program_lexer.l"
{ return PROGRAM; }
YY_BREAK
case 69:
YY_RULE_SETUP
-#line 257 "program_lexer.l"
+#line 257 "program/program_lexer.l"
{ return STATE; }
YY_BREAK
case 70:
YY_RULE_SETUP
-#line 258 "program_lexer.l"
+#line 258 "program/program_lexer.l"
{ return RESULT; }
YY_BREAK
case 71:
YY_RULE_SETUP
-#line 260 "program_lexer.l"
+#line 260 "program/program_lexer.l"
{ return AMBIENT; }
YY_BREAK
case 72:
YY_RULE_SETUP
-#line 261 "program_lexer.l"
+#line 261 "program/program_lexer.l"
{ return ATTENUATION; }
YY_BREAK
case 73:
YY_RULE_SETUP
-#line 262 "program_lexer.l"
+#line 262 "program/program_lexer.l"
{ return BACK; }
YY_BREAK
case 74:
YY_RULE_SETUP
-#line 263 "program_lexer.l"
+#line 263 "program/program_lexer.l"
{ return_token_or_DOT(require_ARB_vp, CLIP); }
YY_BREAK
case 75:
YY_RULE_SETUP
-#line 264 "program_lexer.l"
+#line 264 "program/program_lexer.l"
{ return COLOR; }
YY_BREAK
case 76:
YY_RULE_SETUP
-#line 265 "program_lexer.l"
+#line 265 "program/program_lexer.l"
{ return_token_or_DOT(require_ARB_fp, DEPTH); }
YY_BREAK
case 77:
YY_RULE_SETUP
-#line 266 "program_lexer.l"
+#line 266 "program/program_lexer.l"
{ return DIFFUSE; }
YY_BREAK
case 78:
YY_RULE_SETUP
-#line 267 "program_lexer.l"
+#line 267 "program/program_lexer.l"
{ return DIRECTION; }
YY_BREAK
case 79:
YY_RULE_SETUP
-#line 268 "program_lexer.l"
+#line 268 "program/program_lexer.l"
{ return EMISSION; }
YY_BREAK
case 80:
YY_RULE_SETUP
-#line 269 "program_lexer.l"
+#line 269 "program/program_lexer.l"
{ return ENV; }
YY_BREAK
case 81:
YY_RULE_SETUP
-#line 270 "program_lexer.l"
+#line 270 "program/program_lexer.l"
{ return EYE; }
YY_BREAK
case 82:
YY_RULE_SETUP
-#line 271 "program_lexer.l"
+#line 271 "program/program_lexer.l"
{ return FOGCOORD; }
YY_BREAK
case 83:
YY_RULE_SETUP
-#line 272 "program_lexer.l"
+#line 272 "program/program_lexer.l"
{ return FOG; }
YY_BREAK
case 84:
YY_RULE_SETUP
-#line 273 "program_lexer.l"
+#line 273 "program/program_lexer.l"
{ return FRONT; }
YY_BREAK
case 85:
YY_RULE_SETUP
-#line 274 "program_lexer.l"
+#line 274 "program/program_lexer.l"
{ return HALF; }
YY_BREAK
case 86:
YY_RULE_SETUP
-#line 275 "program_lexer.l"
+#line 275 "program/program_lexer.l"
{ return INVERSE; }
YY_BREAK
case 87:
YY_RULE_SETUP
-#line 276 "program_lexer.l"
+#line 276 "program/program_lexer.l"
{ return INVTRANS; }
YY_BREAK
case 88:
YY_RULE_SETUP
-#line 277 "program_lexer.l"
+#line 277 "program/program_lexer.l"
{ return LIGHT; }
YY_BREAK
case 89:
YY_RULE_SETUP
-#line 278 "program_lexer.l"
+#line 278 "program/program_lexer.l"
{ return LIGHTMODEL; }
YY_BREAK
case 90:
YY_RULE_SETUP
-#line 279 "program_lexer.l"
+#line 279 "program/program_lexer.l"
{ return LIGHTPROD; }
YY_BREAK
case 91:
YY_RULE_SETUP
-#line 280 "program_lexer.l"
+#line 280 "program/program_lexer.l"
{ return LOCAL; }
YY_BREAK
case 92:
YY_RULE_SETUP
-#line 281 "program_lexer.l"
+#line 281 "program/program_lexer.l"
{ return MATERIAL; }
YY_BREAK
case 93:
YY_RULE_SETUP
-#line 282 "program_lexer.l"
+#line 282 "program/program_lexer.l"
{ return MAT_PROGRAM; }
YY_BREAK
case 94:
YY_RULE_SETUP
-#line 283 "program_lexer.l"
+#line 283 "program/program_lexer.l"
{ return MATRIX; }
YY_BREAK
case 95:
YY_RULE_SETUP
-#line 284 "program_lexer.l"
+#line 284 "program/program_lexer.l"
{ return_token_or_DOT(require_ARB_vp, MATRIXINDEX); }
YY_BREAK
case 96:
YY_RULE_SETUP
-#line 285 "program_lexer.l"
+#line 285 "program/program_lexer.l"
{ return MODELVIEW; }
YY_BREAK
case 97:
YY_RULE_SETUP
-#line 286 "program_lexer.l"
+#line 286 "program/program_lexer.l"
{ return MVP; }
YY_BREAK
case 98:
YY_RULE_SETUP
-#line 287 "program_lexer.l"
+#line 287 "program/program_lexer.l"
{ return_token_or_DOT(require_ARB_vp, NORMAL); }
YY_BREAK
case 99:
YY_RULE_SETUP
-#line 288 "program_lexer.l"
+#line 288 "program/program_lexer.l"
{ return OBJECT; }
YY_BREAK
case 100:
YY_RULE_SETUP
-#line 289 "program_lexer.l"
+#line 289 "program/program_lexer.l"
{ return PALETTE; }
YY_BREAK
case 101:
YY_RULE_SETUP
-#line 290 "program_lexer.l"
+#line 290 "program/program_lexer.l"
{ return PARAMS; }
YY_BREAK
case 102:
YY_RULE_SETUP
-#line 291 "program_lexer.l"
+#line 291 "program/program_lexer.l"
{ return PLANE; }
YY_BREAK
case 103:
YY_RULE_SETUP
-#line 292 "program_lexer.l"
+#line 292 "program/program_lexer.l"
{ return_token_or_DOT(require_ARB_vp, POINT_TOK); }
YY_BREAK
case 104:
YY_RULE_SETUP
-#line 293 "program_lexer.l"
+#line 293 "program/program_lexer.l"
{ return_token_or_DOT(require_ARB_vp, POINTSIZE); }
YY_BREAK
case 105:
YY_RULE_SETUP
-#line 294 "program_lexer.l"
+#line 294 "program/program_lexer.l"
{ return POSITION; }
YY_BREAK
case 106:
YY_RULE_SETUP
-#line 295 "program_lexer.l"
+#line 295 "program/program_lexer.l"
{ return PRIMARY; }
YY_BREAK
case 107:
YY_RULE_SETUP
-#line 296 "program_lexer.l"
+#line 296 "program/program_lexer.l"
{ return PROJECTION; }
YY_BREAK
case 108:
YY_RULE_SETUP
-#line 297 "program_lexer.l"
+#line 297 "program/program_lexer.l"
{ return_token_or_DOT(require_ARB_fp, RANGE); }
YY_BREAK
case 109:
YY_RULE_SETUP
-#line 298 "program_lexer.l"
+#line 298 "program/program_lexer.l"
{ return ROW; }
YY_BREAK
case 110:
YY_RULE_SETUP
-#line 299 "program_lexer.l"
+#line 299 "program/program_lexer.l"
{ return SCENECOLOR; }
YY_BREAK
case 111:
YY_RULE_SETUP
-#line 300 "program_lexer.l"
+#line 300 "program/program_lexer.l"
{ return SECONDARY; }
YY_BREAK
case 112:
YY_RULE_SETUP
-#line 301 "program_lexer.l"
+#line 301 "program/program_lexer.l"
{ return SHININESS; }
YY_BREAK
case 113:
YY_RULE_SETUP
-#line 302 "program_lexer.l"
+#line 302 "program/program_lexer.l"
{ return_token_or_DOT(require_ARB_vp, SIZE_TOK); }
YY_BREAK
case 114:
YY_RULE_SETUP
-#line 303 "program_lexer.l"
+#line 303 "program/program_lexer.l"
{ return SPECULAR; }
YY_BREAK
case 115:
YY_RULE_SETUP
-#line 304 "program_lexer.l"
+#line 304 "program/program_lexer.l"
{ return SPOT; }
YY_BREAK
case 116:
YY_RULE_SETUP
-#line 305 "program_lexer.l"
+#line 305 "program/program_lexer.l"
{ return TEXCOORD; }
YY_BREAK
case 117:
YY_RULE_SETUP
-#line 306 "program_lexer.l"
+#line 306 "program/program_lexer.l"
{ return_token_or_DOT(require_ARB_fp, TEXENV); }
YY_BREAK
case 118:
YY_RULE_SETUP
-#line 307 "program_lexer.l"
+#line 307 "program/program_lexer.l"
{ return_token_or_DOT(require_ARB_vp, TEXGEN); }
YY_BREAK
case 119:
YY_RULE_SETUP
-#line 308 "program_lexer.l"
+#line 308 "program/program_lexer.l"
{ return_token_or_DOT(require_ARB_vp, TEXGEN_Q); }
YY_BREAK
case 120:
YY_RULE_SETUP
-#line 309 "program_lexer.l"
+#line 309 "program/program_lexer.l"
{ return_token_or_DOT(require_ARB_vp, TEXGEN_S); }
YY_BREAK
case 121:
YY_RULE_SETUP
-#line 310 "program_lexer.l"
+#line 310 "program/program_lexer.l"
{ return_token_or_DOT(require_ARB_vp, TEXGEN_T); }
YY_BREAK
case 122:
YY_RULE_SETUP
-#line 311 "program_lexer.l"
+#line 311 "program/program_lexer.l"
{ return TEXTURE; }
YY_BREAK
case 123:
YY_RULE_SETUP
-#line 312 "program_lexer.l"
+#line 312 "program/program_lexer.l"
{ return TRANSPOSE; }
YY_BREAK
case 124:
YY_RULE_SETUP
-#line 313 "program_lexer.l"
+#line 313 "program/program_lexer.l"
{ return_token_or_DOT(require_ARB_vp, VTXATTRIB); }
YY_BREAK
case 125:
YY_RULE_SETUP
-#line 314 "program_lexer.l"
+#line 314 "program/program_lexer.l"
{ return_token_or_DOT(require_ARB_vp, WEIGHT); }
YY_BREAK
case 126:
YY_RULE_SETUP
-#line 316 "program_lexer.l"
+#line 316 "program/program_lexer.l"
{ return_token_or_IDENTIFIER(require_ARB_fp, TEXTURE_UNIT); }
YY_BREAK
case 127:
YY_RULE_SETUP
-#line 317 "program_lexer.l"
+#line 317 "program/program_lexer.l"
{ return_token_or_IDENTIFIER(require_ARB_fp, TEX_1D); }
YY_BREAK
case 128:
YY_RULE_SETUP
-#line 318 "program_lexer.l"
+#line 318 "program/program_lexer.l"
{ return_token_or_IDENTIFIER(require_ARB_fp, TEX_2D); }
YY_BREAK
case 129:
YY_RULE_SETUP
-#line 319 "program_lexer.l"
+#line 319 "program/program_lexer.l"
{ return_token_or_IDENTIFIER(require_ARB_fp, TEX_3D); }
YY_BREAK
case 130:
YY_RULE_SETUP
-#line 320 "program_lexer.l"
+#line 320 "program/program_lexer.l"
{ return_token_or_IDENTIFIER(require_ARB_fp, TEX_CUBE); }
YY_BREAK
case 131:
YY_RULE_SETUP
-#line 321 "program_lexer.l"
+#line 321 "program/program_lexer.l"
{ return_token_or_IDENTIFIER(require_ARB_fp && require_rect, TEX_RECT); }
YY_BREAK
case 132:
YY_RULE_SETUP
-#line 322 "program_lexer.l"
+#line 322 "program/program_lexer.l"
{ return_token_or_IDENTIFIER(require_ARB_fp && require_shadow, TEX_SHADOW1D); }
YY_BREAK
case 133:
YY_RULE_SETUP
-#line 323 "program_lexer.l"
+#line 323 "program/program_lexer.l"
{ return_token_or_IDENTIFIER(require_ARB_fp && require_shadow, TEX_SHADOW2D); }
YY_BREAK
case 134:
YY_RULE_SETUP
-#line 324 "program_lexer.l"
+#line 324 "program/program_lexer.l"
{ return_token_or_IDENTIFIER(require_ARB_fp && require_shadow && require_rect, TEX_SHADOWRECT); }
YY_BREAK
case 135:
YY_RULE_SETUP
-#line 325 "program_lexer.l"
+#line 325 "program/program_lexer.l"
{ return_token_or_IDENTIFIER(require_ARB_fp && require_texarray, TEX_ARRAY1D); }
YY_BREAK
case 136:
YY_RULE_SETUP
-#line 326 "program_lexer.l"
+#line 326 "program/program_lexer.l"
{ return_token_or_IDENTIFIER(require_ARB_fp && require_texarray, TEX_ARRAY2D); }
YY_BREAK
case 137:
YY_RULE_SETUP
-#line 327 "program_lexer.l"
+#line 327 "program/program_lexer.l"
{ return_token_or_IDENTIFIER(require_ARB_fp && require_shadow && require_texarray, TEX_ARRAYSHADOW1D); }
YY_BREAK
case 138:
YY_RULE_SETUP
-#line 328 "program_lexer.l"
+#line 328 "program/program_lexer.l"
{ return_token_or_IDENTIFIER(require_ARB_fp && require_shadow && require_texarray, TEX_ARRAYSHADOW2D); }
YY_BREAK
case 139:
YY_RULE_SETUP
-#line 330 "program_lexer.l"
+#line 330 "program/program_lexer.l"
{ return handle_ident(yyextra, yytext, yylval); }
YY_BREAK
case 140:
YY_RULE_SETUP
-#line 332 "program_lexer.l"
+#line 332 "program/program_lexer.l"
{ return DOT_DOT; }
YY_BREAK
case 141:
YY_RULE_SETUP
-#line 334 "program_lexer.l"
+#line 334 "program/program_lexer.l"
{
yylval->integer = strtol(yytext, NULL, 10);
return INTEGER;
@@ -2222,7 +2209,7 @@ YY_RULE_SETUP
YY_BREAK
case 142:
YY_RULE_SETUP
-#line 338 "program_lexer.l"
+#line 338 "program/program_lexer.l"
{
yylval->real = _mesa_strtof(yytext, NULL);
return REAL;
@@ -2234,7 +2221,7 @@ case 143:
yyg->yy_c_buf_p = yy_cp -= 1;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
-#line 342 "program_lexer.l"
+#line 342 "program/program_lexer.l"
{
yylval->real = _mesa_strtof(yytext, NULL);
return REAL;
@@ -2242,7 +2229,7 @@ YY_RULE_SETUP
YY_BREAK
case 144:
YY_RULE_SETUP
-#line 346 "program_lexer.l"
+#line 346 "program/program_lexer.l"
{
yylval->real = _mesa_strtof(yytext, NULL);
return REAL;
@@ -2250,7 +2237,7 @@ YY_RULE_SETUP
YY_BREAK
case 145:
YY_RULE_SETUP
-#line 350 "program_lexer.l"
+#line 350 "program/program_lexer.l"
{
yylval->real = _mesa_strtof(yytext, NULL);
return REAL;
@@ -2258,7 +2245,7 @@ YY_RULE_SETUP
YY_BREAK
case 146:
YY_RULE_SETUP
-#line 355 "program_lexer.l"
+#line 355 "program/program_lexer.l"
{
yylval->swiz_mask.swizzle = SWIZZLE_NOOP;
yylval->swiz_mask.mask = WRITEMASK_XYZW;
@@ -2267,7 +2254,7 @@ YY_RULE_SETUP
YY_BREAK
case 147:
YY_RULE_SETUP
-#line 361 "program_lexer.l"
+#line 361 "program/program_lexer.l"
{
yylval->swiz_mask.swizzle = SWIZZLE_INVAL;
yylval->swiz_mask.mask = WRITEMASK_XY
@@ -2277,7 +2264,7 @@ YY_RULE_SETUP
YY_BREAK
case 148:
YY_RULE_SETUP
-#line 367 "program_lexer.l"
+#line 367 "program/program_lexer.l"
{
yylval->swiz_mask.swizzle = SWIZZLE_INVAL;
yylval->swiz_mask.mask = WRITEMASK_XZW;
@@ -2286,7 +2273,7 @@ YY_RULE_SETUP
YY_BREAK
case 149:
YY_RULE_SETUP
-#line 372 "program_lexer.l"
+#line 372 "program/program_lexer.l"
{
yylval->swiz_mask.swizzle = SWIZZLE_INVAL;
yylval->swiz_mask.mask = WRITEMASK_YZW;
@@ -2295,7 +2282,7 @@ YY_RULE_SETUP
YY_BREAK
case 150:
YY_RULE_SETUP
-#line 378 "program_lexer.l"
+#line 378 "program/program_lexer.l"
{
yylval->swiz_mask.swizzle = SWIZZLE_INVAL;
yylval->swiz_mask.mask = WRITEMASK_X
@@ -2305,7 +2292,7 @@ YY_RULE_SETUP
YY_BREAK
case 151:
YY_RULE_SETUP
-#line 384 "program_lexer.l"
+#line 384 "program/program_lexer.l"
{
yylval->swiz_mask.swizzle = SWIZZLE_INVAL;
yylval->swiz_mask.mask = WRITEMASK_Y
@@ -2315,7 +2302,7 @@ YY_RULE_SETUP
YY_BREAK
case 152:
YY_RULE_SETUP
-#line 390 "program_lexer.l"
+#line 390 "program/program_lexer.l"
{
yylval->swiz_mask.swizzle = SWIZZLE_INVAL;
yylval->swiz_mask.mask = WRITEMASK_ZW;
@@ -2324,7 +2311,7 @@ YY_RULE_SETUP
YY_BREAK
case 153:
YY_RULE_SETUP
-#line 396 "program_lexer.l"
+#line 396 "program/program_lexer.l"
{
const unsigned s = swiz_from_char(yytext[1]);
yylval->swiz_mask.swizzle = MAKE_SWIZZLE4(s, s, s, s);
@@ -2334,7 +2321,7 @@ YY_RULE_SETUP
YY_BREAK
case 154:
YY_RULE_SETUP
-#line 403 "program_lexer.l"
+#line 403 "program/program_lexer.l"
{
yylval->swiz_mask.swizzle = MAKE_SWIZZLE4(swiz_from_char(yytext[1]),
swiz_from_char(yytext[2]),
@@ -2346,7 +2333,7 @@ YY_RULE_SETUP
YY_BREAK
case 155:
YY_RULE_SETUP
-#line 412 "program_lexer.l"
+#line 412 "program/program_lexer.l"
{
yylval->swiz_mask.swizzle = SWIZZLE_NOOP;
yylval->swiz_mask.mask = WRITEMASK_XYZW;
@@ -2355,7 +2342,7 @@ YY_RULE_SETUP
YY_BREAK
case 156:
YY_RULE_SETUP
-#line 418 "program_lexer.l"
+#line 418 "program/program_lexer.l"
{
yylval->swiz_mask.swizzle = SWIZZLE_INVAL;
yylval->swiz_mask.mask = WRITEMASK_XY
@@ -2365,7 +2352,7 @@ YY_RULE_SETUP
YY_BREAK
case 157:
YY_RULE_SETUP
-#line 424 "program_lexer.l"
+#line 424 "program/program_lexer.l"
{
yylval->swiz_mask.swizzle = SWIZZLE_INVAL;
yylval->swiz_mask.mask = WRITEMASK_XZW;
@@ -2374,7 +2361,7 @@ YY_RULE_SETUP
YY_BREAK
case 158:
YY_RULE_SETUP
-#line 429 "program_lexer.l"
+#line 429 "program/program_lexer.l"
{
yylval->swiz_mask.swizzle = SWIZZLE_INVAL;
yylval->swiz_mask.mask = WRITEMASK_YZW;
@@ -2383,7 +2370,7 @@ YY_RULE_SETUP
YY_BREAK
case 159:
YY_RULE_SETUP
-#line 435 "program_lexer.l"
+#line 435 "program/program_lexer.l"
{
yylval->swiz_mask.swizzle = SWIZZLE_INVAL;
yylval->swiz_mask.mask = WRITEMASK_X
@@ -2393,7 +2380,7 @@ YY_RULE_SETUP
YY_BREAK
case 160:
YY_RULE_SETUP
-#line 441 "program_lexer.l"
+#line 441 "program/program_lexer.l"
{
yylval->swiz_mask.swizzle = SWIZZLE_INVAL;
yylval->swiz_mask.mask = WRITEMASK_Y
@@ -2403,7 +2390,7 @@ YY_RULE_SETUP
YY_BREAK
case 161:
YY_RULE_SETUP
-#line 447 "program_lexer.l"
+#line 447 "program/program_lexer.l"
{
yylval->swiz_mask.swizzle = SWIZZLE_INVAL;
yylval->swiz_mask.mask = WRITEMASK_ZW;
@@ -2412,7 +2399,7 @@ YY_RULE_SETUP
YY_BREAK
case 162:
YY_RULE_SETUP
-#line 453 "program_lexer.l"
+#line 453 "program/program_lexer.l"
{
const unsigned s = swiz_from_char(yytext[1]);
yylval->swiz_mask.swizzle = MAKE_SWIZZLE4(s, s, s, s);
@@ -2422,7 +2409,7 @@ YY_RULE_SETUP
YY_BREAK
case 163:
YY_RULE_SETUP
-#line 461 "program_lexer.l"
+#line 461 "program/program_lexer.l"
{
if (require_ARB_vp) {
return TEXGEN_R;
@@ -2436,7 +2423,7 @@ YY_RULE_SETUP
YY_BREAK
case 164:
YY_RULE_SETUP
-#line 472 "program_lexer.l"
+#line 472 "program/program_lexer.l"
{
yylval->swiz_mask.swizzle = MAKE_SWIZZLE4(swiz_from_char(yytext[1]),
swiz_from_char(yytext[2]),
@@ -2448,13 +2435,13 @@ YY_RULE_SETUP
YY_BREAK
case 165:
YY_RULE_SETUP
-#line 481 "program_lexer.l"
+#line 481 "program/program_lexer.l"
{ return DOT; }
YY_BREAK
case 166:
/* rule 166 can match eol */
YY_RULE_SETUP
-#line 483 "program_lexer.l"
+#line 483 "program/program_lexer.l"
{
yylloc->first_line++;
yylloc->first_column = 1;
@@ -2465,7 +2452,7 @@ YY_RULE_SETUP
YY_BREAK
case 167:
YY_RULE_SETUP
-#line 490 "program_lexer.l"
+#line 490 "program/program_lexer.l"
/* eat whitespace */ ;
YY_BREAK
case 168:
@@ -2473,20 +2460,20 @@ case 168:
yyg->yy_c_buf_p = yy_cp -= 1;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
-#line 491 "program_lexer.l"
+#line 491 "program/program_lexer.l"
/* eat comments */ ;
YY_BREAK
case 169:
YY_RULE_SETUP
-#line 492 "program_lexer.l"
+#line 492 "program/program_lexer.l"
{ return yytext[0]; }
YY_BREAK
case 170:
YY_RULE_SETUP
-#line 493 "program_lexer.l"
+#line 493 "program/program_lexer.l"
ECHO;
YY_BREAK
-#line 2490 "lex.yy.c"
+#line 2477 "program/lex.yy.c"
case YY_STATE_EOF(INITIAL):
yyterminate();
@@ -2673,7 +2660,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
else
{
- int num_to_read =
+ yy_size_t num_to_read =
YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
while ( num_to_read <= 0 )
@@ -2687,7 +2674,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
if ( b->yy_is_our_buffer )
{
- int new_size = b->yy_buf_size * 2;
+ yy_size_t new_size = b->yy_buf_size * 2;
if ( new_size <= 0 )
b->yy_buf_size += b->yy_buf_size / 8;
@@ -2718,7 +2705,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
/* Read in more data. */
YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
- yyg->yy_n_chars, (size_t) num_to_read );
+ yyg->yy_n_chars, num_to_read );
YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
}
@@ -2831,7 +2818,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
{ /* need to shift things up to make room */
/* +2 for EOB chars. */
- register int number_to_move = yyg->yy_n_chars + 2;
+ register yy_size_t number_to_move = yyg->yy_n_chars + 2;
register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
register char *source =
@@ -2881,7 +2868,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
else
{ /* need more input */
- int offset = yyg->yy_c_buf_p - yyg->yytext_ptr;
+ yy_size_t offset = yyg->yy_c_buf_p - yyg->yytext_ptr;
++yyg->yy_c_buf_p;
switch ( yy_get_next_buffer( yyscanner ) )
@@ -2905,7 +2892,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
case EOB_ACT_END_OF_FILE:
{
if ( yywrap(yyscanner ) )
- return EOF;
+ return 0;
if ( ! yyg->yy_did_buffer_switch_on_eof )
YY_NEW_FILE;
@@ -3161,7 +3148,7 @@ void yypop_buffer_state (yyscan_t yyscanner)
*/
static void yyensure_buffer_stack (yyscan_t yyscanner)
{
- int num_to_alloc;
+ yy_size_t num_to_alloc;
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
if (!yyg->yy_buffer_stack) {
@@ -3254,17 +3241,16 @@ YY_BUFFER_STATE yy_scan_string (yyconst char * yystr , yyscan_t yyscanner)
/** Setup the input buffer state to scan the given bytes. The next call to yylex() will
* scan from a @e copy of @a bytes.
- * @param yybytes the byte buffer to scan
- * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
+ * @param bytes the byte buffer to scan
+ * @param len the number of bytes in the buffer pointed to by @a bytes.
* @param yyscanner The scanner object.
* @return the newly allocated buffer state object.
*/
-YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, int _yybytes_len , yyscan_t yyscanner)
+YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len , yyscan_t yyscanner)
{
YY_BUFFER_STATE b;
char *buf;
- yy_size_t n;
- int i;
+ yy_size_t n, i;
/* Get memory for full buffer, including space for trailing EOB's. */
n = _yybytes_len + 2;
@@ -3374,7 +3360,7 @@ FILE *yyget_out (yyscan_t yyscanner)
/** Get the length of the current token.
* @param yyscanner The scanner object.
*/
-int yyget_leng (yyscan_t yyscanner)
+yy_size_t yyget_leng (yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
return yyleng;
@@ -3661,7 +3647,7 @@ void yyfree (void * ptr , yyscan_t yyscanner)
#define YYTABLES_NAME "yytables"
-#line 493 "program_lexer.l"
+#line 493 "program/program_lexer.l"
diff --git a/src/mesa/program/nvfragparse.h b/src/mesa/program/nvfragparse.h
index 3e85dd2c30b..088e7527d5b 100644
--- a/src/mesa/program/nvfragparse.h
+++ b/src/mesa/program/nvfragparse.h
@@ -30,7 +30,10 @@
#ifndef NVFRAGPARSE_H
#define NVFRAGPARSE_H
-#include "main/mtypes.h"
+#include "main/glheader.h"
+
+struct gl_context;
+struct gl_fragment_program;
extern void
_mesa_parse_nv_fragment_program(struct gl_context *ctx, GLenum target,
diff --git a/src/mesa/program/nvvertparse.h b/src/mesa/program/nvvertparse.h
index e98e867320f..7318e149416 100644
--- a/src/mesa/program/nvvertparse.h
+++ b/src/mesa/program/nvvertparse.h
@@ -29,7 +29,10 @@
#ifndef NVVERTPARSE_H
#define NVVERTPARSE_H
-#include "main/mtypes.h"
+#include "main/glheader.h"
+
+struct gl_context;
+struct gl_vertex_program;
extern void
_mesa_parse_nv_vertex_program(struct gl_context *ctx, GLenum target,
diff --git a/src/mesa/program/prog_cache.c b/src/mesa/program/prog_cache.c
index 56ca59890de..2ccedb5d7d0 100644
--- a/src/mesa/program/prog_cache.c
+++ b/src/mesa/program/prog_cache.c
@@ -29,6 +29,7 @@
#include "main/glheader.h"
#include "main/mtypes.h"
#include "main/imports.h"
+#include "main/shaderobj.h"
#include "program/prog_cache.h"
#include "program/program.h"
@@ -104,7 +105,8 @@ rehash(struct gl_program_cache *cache)
static void
-clear_cache(struct gl_context *ctx, struct gl_program_cache *cache)
+clear_cache(struct gl_context *ctx, struct gl_program_cache *cache,
+ GLboolean shader)
{
struct cache_item *c, *next;
GLuint i;
@@ -115,7 +117,13 @@ clear_cache(struct gl_context *ctx, struct gl_program_cache *cache)
for (c = cache->items[i]; c; c = next) {
next = c->next;
free(c->key);
- _mesa_reference_program(ctx, &c->program, NULL);
+ if (shader) {
+ _mesa_reference_shader_program(ctx,
+ (struct gl_shader_program **)&c->program,
+ NULL);
+ } else {
+ _mesa_reference_program(ctx, &c->program, NULL);
+ }
free(c);
}
cache->items[i] = NULL;
@@ -147,7 +155,16 @@ _mesa_new_program_cache(void)
void
_mesa_delete_program_cache(struct gl_context *ctx, struct gl_program_cache *cache)
{
- clear_cache(ctx, cache);
+ clear_cache(ctx, cache, GL_FALSE);
+ free(cache->items);
+ free(cache);
+}
+
+void
+_mesa_delete_shader_cache(struct gl_context *ctx,
+ struct gl_program_cache *cache)
+{
+ clear_cache(ctx, cache, GL_TRUE);
free(cache->items);
free(cache);
}
@@ -197,7 +214,35 @@ _mesa_program_cache_insert(struct gl_context *ctx,
if (cache->size < 1000)
rehash(cache);
else
- clear_cache(ctx, cache);
+ clear_cache(ctx, cache, GL_FALSE);
+ }
+
+ cache->n_items++;
+ c->next = cache->items[hash % cache->size];
+ cache->items[hash % cache->size] = c;
+}
+
+void
+_mesa_shader_cache_insert(struct gl_context *ctx,
+ struct gl_program_cache *cache,
+ const void *key, GLuint keysize,
+ struct gl_shader_program *program)
+{
+ const GLuint hash = hash_key(key, keysize);
+ struct cache_item *c = CALLOC_STRUCT(cache_item);
+
+ c->hash = hash;
+
+ c->key = malloc(keysize);
+ memcpy(c->key, key, keysize);
+
+ c->program = (struct gl_program *)program; /* no refcount change */
+
+ if (cache->n_items > cache->size * 1.5) {
+ if (cache->size < 1000)
+ rehash(cache);
+ else
+ clear_cache(ctx, cache, GL_TRUE);
}
cache->n_items++;
diff --git a/src/mesa/program/prog_cache.h b/src/mesa/program/prog_cache.h
index 4907ae3030e..5d46bfc5cc9 100644
--- a/src/mesa/program/prog_cache.h
+++ b/src/mesa/program/prog_cache.h
@@ -30,8 +30,9 @@
#define PROG_CACHE_H
-#include "main/mtypes.h"
+#include "main/glheader.h"
+struct gl_context;
/** Opaque type */
struct gl_program_cache;
@@ -43,6 +44,9 @@ _mesa_new_program_cache(void);
extern void
_mesa_delete_program_cache(struct gl_context *ctx, struct gl_program_cache *pc);
+extern void
+_mesa_delete_shader_cache(struct gl_context *ctx,
+ struct gl_program_cache *cache);
extern struct gl_program *
_mesa_search_program_cache(struct gl_program_cache *cache,
@@ -54,5 +58,11 @@ _mesa_program_cache_insert(struct gl_context *ctx,
const void *key, GLuint keysize,
struct gl_program *program);
+void
+_mesa_shader_cache_insert(struct gl_context *ctx,
+ struct gl_program_cache *cache,
+ const void *key, GLuint keysize,
+ struct gl_shader_program *program);
+
#endif /* PROG_CACHE_H */
diff --git a/src/mesa/program/prog_execute.c b/src/mesa/program/prog_execute.c
index 1d97a077f52..e7553c69dbe 100644
--- a/src/mesa/program/prog_execute.c
+++ b/src/mesa/program/prog_execute.c
@@ -159,6 +159,10 @@ get_src_register_pointer(const struct prog_src_register *source,
return ZeroVec;
return prog->Parameters->ParameterValues[reg];
+ case PROGRAM_SYSTEM_VALUE:
+ assert(reg < Elements(machine->SystemValues));
+ return machine->SystemValues[reg];
+
default:
_mesa_problem(NULL,
"Invalid src register file %d in get_src_register_pointer()",
@@ -1670,6 +1674,18 @@ _mesa_execute_program(struct gl_context * ctx,
fetch_texel(ctx, machine, inst, texcoord, lodBias, color);
+ if (DEBUG_PROG) {
+ printf("TXB (%g, %g, %g, %g) = texture[%d][%g %g %g %g]"
+ " bias %g\n",
+ color[0], color[1], color[2], color[3],
+ inst->TexSrcUnit,
+ texcoord[0],
+ texcoord[1],
+ texcoord[2],
+ texcoord[3],
+ lodBias);
+ }
+
store_vector4(inst, machine, color);
}
break;
diff --git a/src/mesa/program/prog_execute.h b/src/mesa/program/prog_execute.h
index cefd468c36b..cdf37082a00 100644
--- a/src/mesa/program/prog_execute.h
+++ b/src/mesa/program/prog_execute.h
@@ -61,6 +61,7 @@ struct gl_program_machine
GLfloat (*EnvParams)[4]; /**< Vertex or Fragment env parameters */
GLuint CondCodes[4]; /**< COND_* value for x/y/z/w */
GLint AddressReg[MAX_PROGRAM_ADDRESS_REGS][4];
+ GLfloat SystemValues[SYSTEM_VALUE_MAX][4];
const GLubyte *Samplers; /** Array mapping sampler var to tex unit */
diff --git a/src/mesa/program/prog_instruction.h b/src/mesa/program/prog_instruction.h
index a383828e344..669d7102980 100644
--- a/src/mesa/program/prog_instruction.h
+++ b/src/mesa/program/prog_instruction.h
@@ -247,7 +247,7 @@ typedef enum prog_opcode {
* Number of bits for the src/dst register Index field.
* This limits the size of temp/uniform register files.
*/
-#define INST_INDEX_BITS 11
+#define INST_INDEX_BITS 12
/**
diff --git a/src/mesa/program/prog_optimize.h b/src/mesa/program/prog_optimize.h
index 00f1080449b..463f5fc51c4 100644
--- a/src/mesa/program/prog_optimize.h
+++ b/src/mesa/program/prog_optimize.h
@@ -27,9 +27,10 @@
#include "main/config.h"
-#include "main/mtypes.h"
+#include "main/glheader.h"
+struct gl_context;
struct gl_program;
struct prog_instruction;
diff --git a/src/mesa/program/prog_print.c b/src/mesa/program/prog_print.c
index abebf392c0a..484596af760 100644
--- a/src/mesa/program/prog_print.c
+++ b/src/mesa/program/prog_print.c
@@ -72,6 +72,8 @@ _mesa_register_file_name(gl_register_file f)
return "ADDR";
case PROGRAM_SAMPLER:
return "SAMPLER";
+ case PROGRAM_SYSTEM_VALUE:
+ return "SYSVAL";
case PROGRAM_UNDEFINED:
return "UNDEFINED";
default:
@@ -310,6 +312,9 @@ reg_string(gl_register_file f, GLint index, gl_prog_print_mode mode,
case PROGRAM_UNIFORM: /* extension */
sprintf(str, "uniform[%s%d]", addr, index);
break;
+ case PROGRAM_SYSTEM_VALUE:
+ sprintf(str, "sysvalue[%s%d]", addr, index);
+ break;
case PROGRAM_STATE_VAR:
{
struct gl_program_parameter *param
diff --git a/src/mesa/program/prog_statevars.h b/src/mesa/program/prog_statevars.h
index 009ebde0012..f2407af9c87 100644
--- a/src/mesa/program/prog_statevars.h
+++ b/src/mesa/program/prog_statevars.h
@@ -25,8 +25,10 @@
#ifndef PROG_STATEVARS_H
#define PROG_STATEVARS_H
-#include "main/mtypes.h"
+#include "main/glheader.h"
+struct gl_context;
+struct gl_program_parameter_list;
/**
* Number of STATE_* values we need to address any GL state.
diff --git a/src/mesa/program/program.c b/src/mesa/program/program.c
index 9ffa49bb013..79034ab26f2 100644
--- a/src/mesa/program/program.c
+++ b/src/mesa/program/program.c
@@ -32,6 +32,7 @@
#include "main/glheader.h"
#include "main/context.h"
#include "main/hash.h"
+#include "main/mfeatures.h"
#include "program.h"
#include "prog_cache.h"
#include "prog_parameter.h"
@@ -70,6 +71,9 @@ _mesa_init_program(struct gl_context *ctx)
ASSERT(ctx->Const.VertexProgram.MaxUniformComponents <= 4 * MAX_UNIFORMS);
ASSERT(ctx->Const.FragmentProgram.MaxUniformComponents <= 4 * MAX_UNIFORMS);
+ ASSERT(ctx->Const.VertexProgram.MaxAddressOffset <= (1 << INST_INDEX_BITS));
+ ASSERT(ctx->Const.FragmentProgram.MaxAddressOffset <= (1 << INST_INDEX_BITS));
+
/* If this fails, increase prog_instruction::TexSrcUnit size */
ASSERT(MAX_TEXTURE_UNITS < (1 << 5));
@@ -807,7 +811,7 @@ _mesa_combine_programs(struct gl_context *ctx,
/* Connect color outputs of fprogA to color inputs of fprogB, via a
* new temporary register.
*/
- if ((progA->OutputsWritten & (1 << FRAG_RESULT_COLOR)) &&
+ if ((progA->OutputsWritten & BITFIELD64_BIT(FRAG_RESULT_COLOR)) &&
(progB_inputsRead & FRAG_BIT_COL0)) {
GLint tempReg = _mesa_find_free_register(usedTemps, MAX_PROGRAM_TEMPS,
firstTemp);
@@ -830,7 +834,7 @@ _mesa_combine_programs(struct gl_context *ctx,
/* compute combined program's InputsRead */
inputsB = progB_inputsRead;
- if (progA->OutputsWritten & (1 << FRAG_RESULT_COLOR)) {
+ if (progA->OutputsWritten & BITFIELD64_BIT(FRAG_RESULT_COLOR)) {
inputsB &= ~(1 << FRAG_ATTRIB_COL0);
}
newProg->InputsRead = progA->InputsRead | inputsB;
diff --git a/src/mesa/program/program_parse.tab.c b/src/mesa/program/program_parse.tab.c
index baef311d0c1..63a635dfdab 100644
--- a/src/mesa/program/program_parse.tab.c
+++ b/src/mesa/program/program_parse.tab.c
@@ -1,23 +1,24 @@
-
-/* A Bison parser, made by GNU Bison 2.4.1. */
+/* A Bison parser, made by GNU Bison 2.3. */
/* Skeleton implementation for Bison's Yacc-like parsers in C
-
- Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+
+ Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
Free Software Foundation, Inc.
-
- This program is free software: you can redistribute it and/or modify
+
+ This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>. */
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA. */
/* As a special exception, you may create a larger work that contains
part or all of the Bison parser skeleton and distribute that work
@@ -28,7 +29,7 @@
special exception, which will cause the skeleton and the resulting
Bison output files to be licensed under the GNU General Public
License without this special exception.
-
+
This special exception was added by the Free Software Foundation in
version 2.2 of Bison. */
@@ -46,7 +47,7 @@
#define YYBISON 1
/* Bison version. */
-#define YYBISON_VERSION "2.4.1"
+#define YYBISON_VERSION "2.3"
/* Skeleton name. */
#define YYSKELETON_NAME "yacc.c"
@@ -54,21 +55,236 @@
/* Pure parsers. */
#define YYPURE 1
-/* Push parsers. */
-#define YYPUSH 0
-
-/* Pull parsers. */
-#define YYPULL 1
-
/* Using locations. */
#define YYLSP_NEEDED 1
-/* Copy the first part of user declarations. */
+/* Tokens. */
+#ifndef YYTOKENTYPE
+# define YYTOKENTYPE
+ /* Put the tokens into the symbol table, so that GDB and other debuggers
+ know about them. */
+ enum yytokentype {
+ ARBvp_10 = 258,
+ ARBfp_10 = 259,
+ ADDRESS = 260,
+ ALIAS = 261,
+ ATTRIB = 262,
+ OPTION = 263,
+ OUTPUT = 264,
+ PARAM = 265,
+ TEMP = 266,
+ END = 267,
+ BIN_OP = 268,
+ BINSC_OP = 269,
+ SAMPLE_OP = 270,
+ SCALAR_OP = 271,
+ TRI_OP = 272,
+ VECTOR_OP = 273,
+ ARL = 274,
+ KIL = 275,
+ SWZ = 276,
+ TXD_OP = 277,
+ INTEGER = 278,
+ REAL = 279,
+ AMBIENT = 280,
+ ATTENUATION = 281,
+ BACK = 282,
+ CLIP = 283,
+ COLOR = 284,
+ DEPTH = 285,
+ DIFFUSE = 286,
+ DIRECTION = 287,
+ EMISSION = 288,
+ ENV = 289,
+ EYE = 290,
+ FOG = 291,
+ FOGCOORD = 292,
+ FRAGMENT = 293,
+ FRONT = 294,
+ HALF = 295,
+ INVERSE = 296,
+ INVTRANS = 297,
+ LIGHT = 298,
+ LIGHTMODEL = 299,
+ LIGHTPROD = 300,
+ LOCAL = 301,
+ MATERIAL = 302,
+ MAT_PROGRAM = 303,
+ MATRIX = 304,
+ MATRIXINDEX = 305,
+ MODELVIEW = 306,
+ MVP = 307,
+ NORMAL = 308,
+ OBJECT = 309,
+ PALETTE = 310,
+ PARAMS = 311,
+ PLANE = 312,
+ POINT_TOK = 313,
+ POINTSIZE = 314,
+ POSITION = 315,
+ PRIMARY = 316,
+ PROGRAM = 317,
+ PROJECTION = 318,
+ RANGE = 319,
+ RESULT = 320,
+ ROW = 321,
+ SCENECOLOR = 322,
+ SECONDARY = 323,
+ SHININESS = 324,
+ SIZE_TOK = 325,
+ SPECULAR = 326,
+ SPOT = 327,
+ STATE = 328,
+ TEXCOORD = 329,
+ TEXENV = 330,
+ TEXGEN = 331,
+ TEXGEN_Q = 332,
+ TEXGEN_R = 333,
+ TEXGEN_S = 334,
+ TEXGEN_T = 335,
+ TEXTURE = 336,
+ TRANSPOSE = 337,
+ TEXTURE_UNIT = 338,
+ TEX_1D = 339,
+ TEX_2D = 340,
+ TEX_3D = 341,
+ TEX_CUBE = 342,
+ TEX_RECT = 343,
+ TEX_SHADOW1D = 344,
+ TEX_SHADOW2D = 345,
+ TEX_SHADOWRECT = 346,
+ TEX_ARRAY1D = 347,
+ TEX_ARRAY2D = 348,
+ TEX_ARRAYSHADOW1D = 349,
+ TEX_ARRAYSHADOW2D = 350,
+ VERTEX = 351,
+ VTXATTRIB = 352,
+ WEIGHT = 353,
+ IDENTIFIER = 354,
+ USED_IDENTIFIER = 355,
+ MASK4 = 356,
+ MASK3 = 357,
+ MASK2 = 358,
+ MASK1 = 359,
+ SWIZZLE = 360,
+ DOT_DOT = 361,
+ DOT = 362
+ };
+#endif
+/* Tokens. */
+#define ARBvp_10 258
+#define ARBfp_10 259
+#define ADDRESS 260
+#define ALIAS 261
+#define ATTRIB 262
+#define OPTION 263
+#define OUTPUT 264
+#define PARAM 265
+#define TEMP 266
+#define END 267
+#define BIN_OP 268
+#define BINSC_OP 269
+#define SAMPLE_OP 270
+#define SCALAR_OP 271
+#define TRI_OP 272
+#define VECTOR_OP 273
+#define ARL 274
+#define KIL 275
+#define SWZ 276
+#define TXD_OP 277
+#define INTEGER 278
+#define REAL 279
+#define AMBIENT 280
+#define ATTENUATION 281
+#define BACK 282
+#define CLIP 283
+#define COLOR 284
+#define DEPTH 285
+#define DIFFUSE 286
+#define DIRECTION 287
+#define EMISSION 288
+#define ENV 289
+#define EYE 290
+#define FOG 291
+#define FOGCOORD 292
+#define FRAGMENT 293
+#define FRONT 294
+#define HALF 295
+#define INVERSE 296
+#define INVTRANS 297
+#define LIGHT 298
+#define LIGHTMODEL 299
+#define LIGHTPROD 300
+#define LOCAL 301
+#define MATERIAL 302
+#define MAT_PROGRAM 303
+#define MATRIX 304
+#define MATRIXINDEX 305
+#define MODELVIEW 306
+#define MVP 307
+#define NORMAL 308
+#define OBJECT 309
+#define PALETTE 310
+#define PARAMS 311
+#define PLANE 312
+#define POINT_TOK 313
+#define POINTSIZE 314
+#define POSITION 315
+#define PRIMARY 316
+#define PROGRAM 317
+#define PROJECTION 318
+#define RANGE 319
+#define RESULT 320
+#define ROW 321
+#define SCENECOLOR 322
+#define SECONDARY 323
+#define SHININESS 324
+#define SIZE_TOK 325
+#define SPECULAR 326
+#define SPOT 327
+#define STATE 328
+#define TEXCOORD 329
+#define TEXENV 330
+#define TEXGEN 331
+#define TEXGEN_Q 332
+#define TEXGEN_R 333
+#define TEXGEN_S 334
+#define TEXGEN_T 335
+#define TEXTURE 336
+#define TRANSPOSE 337
+#define TEXTURE_UNIT 338
+#define TEX_1D 339
+#define TEX_2D 340
+#define TEX_3D 341
+#define TEX_CUBE 342
+#define TEX_RECT 343
+#define TEX_SHADOW1D 344
+#define TEX_SHADOW2D 345
+#define TEX_SHADOWRECT 346
+#define TEX_ARRAY1D 347
+#define TEX_ARRAY2D 348
+#define TEX_ARRAYSHADOW1D 349
+#define TEX_ARRAYSHADOW2D 350
+#define VERTEX 351
+#define VTXATTRIB 352
+#define WEIGHT 353
+#define IDENTIFIER 354
+#define USED_IDENTIFIER 355
+#define MASK4 356
+#define MASK3 357
+#define MASK2 358
+#define MASK1 359
+#define SWIZZLE 360
+#define DOT_DOT 361
+#define DOT 362
+
-/* Line 189 of yacc.c */
-#line 1 "program_parse.y"
+
+
+/* Copy the first part of user declarations. */
+#line 1 "program/program_parse.y"
/*
* Copyright © 2009 Intel Corporation
@@ -188,9 +404,6 @@ static struct asm_instruction *asm_instruction_copy_ctor(
#define YYLEX_PARAM state->scanner
-/* Line 189 of yacc.c */
-#line 193 "program_parse.tab.c"
-
/* Enabling traces. */
#ifndef YYDEBUG
# define YYDEBUG 0
@@ -209,130 +422,10 @@ static struct asm_instruction *asm_instruction_copy_ctor(
# define YYTOKEN_TABLE 0
#endif
-
-/* Tokens. */
-#ifndef YYTOKENTYPE
-# define YYTOKENTYPE
- /* Put the tokens into the symbol table, so that GDB and other debuggers
- know about them. */
- enum yytokentype {
- ARBvp_10 = 258,
- ARBfp_10 = 259,
- ADDRESS = 260,
- ALIAS = 261,
- ATTRIB = 262,
- OPTION = 263,
- OUTPUT = 264,
- PARAM = 265,
- TEMP = 266,
- END = 267,
- BIN_OP = 268,
- BINSC_OP = 269,
- SAMPLE_OP = 270,
- SCALAR_OP = 271,
- TRI_OP = 272,
- VECTOR_OP = 273,
- ARL = 274,
- KIL = 275,
- SWZ = 276,
- TXD_OP = 277,
- INTEGER = 278,
- REAL = 279,
- AMBIENT = 280,
- ATTENUATION = 281,
- BACK = 282,
- CLIP = 283,
- COLOR = 284,
- DEPTH = 285,
- DIFFUSE = 286,
- DIRECTION = 287,
- EMISSION = 288,
- ENV = 289,
- EYE = 290,
- FOG = 291,
- FOGCOORD = 292,
- FRAGMENT = 293,
- FRONT = 294,
- HALF = 295,
- INVERSE = 296,
- INVTRANS = 297,
- LIGHT = 298,
- LIGHTMODEL = 299,
- LIGHTPROD = 300,
- LOCAL = 301,
- MATERIAL = 302,
- MAT_PROGRAM = 303,
- MATRIX = 304,
- MATRIXINDEX = 305,
- MODELVIEW = 306,
- MVP = 307,
- NORMAL = 308,
- OBJECT = 309,
- PALETTE = 310,
- PARAMS = 311,
- PLANE = 312,
- POINT_TOK = 313,
- POINTSIZE = 314,
- POSITION = 315,
- PRIMARY = 316,
- PROGRAM = 317,
- PROJECTION = 318,
- RANGE = 319,
- RESULT = 320,
- ROW = 321,
- SCENECOLOR = 322,
- SECONDARY = 323,
- SHININESS = 324,
- SIZE_TOK = 325,
- SPECULAR = 326,
- SPOT = 327,
- STATE = 328,
- TEXCOORD = 329,
- TEXENV = 330,
- TEXGEN = 331,
- TEXGEN_Q = 332,
- TEXGEN_R = 333,
- TEXGEN_S = 334,
- TEXGEN_T = 335,
- TEXTURE = 336,
- TRANSPOSE = 337,
- TEXTURE_UNIT = 338,
- TEX_1D = 339,
- TEX_2D = 340,
- TEX_3D = 341,
- TEX_CUBE = 342,
- TEX_RECT = 343,
- TEX_SHADOW1D = 344,
- TEX_SHADOW2D = 345,
- TEX_SHADOWRECT = 346,
- TEX_ARRAY1D = 347,
- TEX_ARRAY2D = 348,
- TEX_ARRAYSHADOW1D = 349,
- TEX_ARRAYSHADOW2D = 350,
- VERTEX = 351,
- VTXATTRIB = 352,
- WEIGHT = 353,
- IDENTIFIER = 354,
- USED_IDENTIFIER = 355,
- MASK4 = 356,
- MASK3 = 357,
- MASK2 = 358,
- MASK1 = 359,
- SWIZZLE = 360,
- DOT_DOT = 361,
- DOT = 362
- };
-#endif
-
-
-
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
typedef union YYSTYPE
+#line 126 "program/program_parse.y"
{
-
-/* Line 214 of yacc.c */
-#line 126 "program_parse.y"
-
struct asm_instruction *inst;
struct asm_symbol *sym;
struct asm_symbol temp_sym;
@@ -356,15 +449,13 @@ typedef union YYSTYPE
unsigned xyzw_valid:1;
unsigned negate:1;
} ext_swizzle;
-
-
-
-/* Line 214 of yacc.c */
-#line 364 "program_parse.tab.c"
-} YYSTYPE;
-# define YYSTYPE_IS_TRIVIAL 1
+}
+/* Line 193 of yacc.c. */
+#line 455 "program/program_parse.tab.c"
+ YYSTYPE;
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1
+# define YYSTYPE_IS_TRIVIAL 1
#endif
#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED
@@ -382,16 +473,14 @@ typedef struct YYLTYPE
/* Copy the second part of user declarations. */
-
-/* Line 264 of yacc.c */
-#line 271 "program_parse.y"
+#line 271 "program/program_parse.y"
extern int yylex(YYSTYPE *yylval_param, YYLTYPE *yylloc_param,
void *yyscanner);
-/* Line 264 of yacc.c */
-#line 395 "program_parse.tab.c"
+/* Line 216 of yacc.c. */
+#line 484 "program/program_parse.tab.c"
#ifdef short
# undef short
@@ -441,7 +530,7 @@ typedef short int yytype_int16;
#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
#ifndef YY_
-# if YYENABLE_NLS
+# if defined YYENABLE_NLS && YYENABLE_NLS
# if ENABLE_NLS
# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
# define YY_(msgid) dgettext ("bison-runtime", msgid)
@@ -466,14 +555,14 @@ typedef short int yytype_int16;
#if (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER)
static int
-YYID (int yyi)
+YYID (int i)
#else
static int
-YYID (yyi)
- int yyi;
+YYID (i)
+ int i;
#endif
{
- return yyi;
+ return i;
}
#endif
@@ -555,9 +644,9 @@ void free (void *); /* INFRINGES ON USER NAME SPACE */
/* A type that is properly aligned for any stack member. */
union yyalloc
{
- yytype_int16 yyss_alloc;
- YYSTYPE yyvs_alloc;
- YYLTYPE yyls_alloc;
+ yytype_int16 yyss;
+ YYSTYPE yyvs;
+ YYLTYPE yyls;
};
/* The size of the maximum gap between one aligned stack and the next. */
@@ -592,12 +681,12 @@ union yyalloc
elements in the stack, and YYPTR gives the new location of the
stack. Advance YYPTR to a properly aligned location for the next
stack. */
-# define YYSTACK_RELOCATE(Stack_alloc, Stack) \
+# define YYSTACK_RELOCATE(Stack) \
do \
{ \
YYSIZE_T yynewbytes; \
- YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
- Stack = &yyptr->Stack_alloc; \
+ YYCOPY (&yyptr->Stack, Stack, yysize); \
+ Stack = &yyptr->Stack; \
yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
yyptr += yynewbytes / sizeof (*yyptr); \
} \
@@ -1349,7 +1438,7 @@ while (YYID (0))
we won't break user code: when these are the locations we know. */
#ifndef YY_LOCATION_PRINT
-# if YYLTYPE_IS_TRIVIAL
+# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
# define YY_LOCATION_PRINT(File, Loc) \
fprintf (File, "%d.%d-%d.%d", \
(Loc).first_line, (Loc).first_column, \
@@ -1468,20 +1557,17 @@ yy_symbol_print (yyoutput, yytype, yyvaluep, yylocationp, state)
#if (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER)
static void
-yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
+yy_stack_print (yytype_int16 *bottom, yytype_int16 *top)
#else
static void
-yy_stack_print (yybottom, yytop)
- yytype_int16 *yybottom;
- yytype_int16 *yytop;
+yy_stack_print (bottom, top)
+ yytype_int16 *bottom;
+ yytype_int16 *top;
#endif
{
YYFPRINTF (stderr, "Stack now");
- for (; yybottom <= yytop; yybottom++)
- {
- int yybot = *yybottom;
- YYFPRINTF (stderr, " %d", yybot);
- }
+ for (; bottom <= top; ++bottom)
+ YYFPRINTF (stderr, " %d", *bottom);
YYFPRINTF (stderr, "\n");
}
@@ -1517,11 +1603,11 @@ yy_reduce_print (yyvsp, yylsp, yyrule, state)
/* The symbols being reduced. */
for (yyi = 0; yyi < yynrhs; yyi++)
{
- YYFPRINTF (stderr, " $%d = ", yyi + 1);
+ fprintf (stderr, " $%d = ", yyi + 1);
yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
&(yyvsp[(yyi + 1) - (yynrhs)])
, &(yylsp[(yyi + 1) - (yynrhs)]) , state);
- YYFPRINTF (stderr, "\n");
+ fprintf (stderr, "\n");
}
}
@@ -1805,8 +1891,10 @@ yydestruct (yymsg, yytype, yyvaluep, yylocationp, state)
break;
}
}
+
/* Prevent warnings from -Wmissing-prototypes. */
+
#ifdef YYPARSE_PARAM
#if defined __STDC__ || defined __cplusplus
int yyparse (void *YYPARSE_PARAM);
@@ -1825,9 +1913,10 @@ int yyparse ();
-/*-------------------------.
-| yyparse or yypush_parse. |
-`-------------------------*/
+
+/*----------.
+| yyparse. |
+`----------*/
#ifdef YYPARSE_PARAM
#if (defined __STDC__ || defined __C99__FUNC__ \
@@ -1851,97 +1940,88 @@ yyparse (state)
#endif
#endif
{
-/* The lookahead symbol. */
+ /* The look-ahead symbol. */
int yychar;
-/* The semantic value of the lookahead symbol. */
+/* The semantic value of the look-ahead symbol. */
YYSTYPE yylval;
-/* Location data for the lookahead symbol. */
+/* Number of syntax errors so far. */
+int yynerrs;
+/* Location data for the look-ahead symbol. */
YYLTYPE yylloc;
- /* Number of syntax errors so far. */
- int yynerrs;
-
- int yystate;
- /* Number of tokens to shift before error messages enabled. */
- int yyerrstatus;
+ int yystate;
+ int yyn;
+ int yyresult;
+ /* Number of tokens to shift before error messages enabled. */
+ int yyerrstatus;
+ /* Look-ahead token as an internal (translated) token number. */
+ int yytoken = 0;
+#if YYERROR_VERBOSE
+ /* Buffer for error messages, and its allocated size. */
+ char yymsgbuf[128];
+ char *yymsg = yymsgbuf;
+ YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
+#endif
- /* The stacks and their tools:
- `yyss': related to states.
- `yyvs': related to semantic values.
- `yyls': related to locations.
+ /* Three stacks and their tools:
+ `yyss': related to states,
+ `yyvs': related to semantic values,
+ `yyls': related to locations.
- Refer to the stacks thru separate pointers, to allow yyoverflow
- to reallocate them elsewhere. */
+ Refer to the stacks thru separate pointers, to allow yyoverflow
+ to reallocate them elsewhere. */
- /* The state stack. */
- yytype_int16 yyssa[YYINITDEPTH];
- yytype_int16 *yyss;
- yytype_int16 *yyssp;
+ /* The state stack. */
+ yytype_int16 yyssa[YYINITDEPTH];
+ yytype_int16 *yyss = yyssa;
+ yytype_int16 *yyssp;
- /* The semantic value stack. */
- YYSTYPE yyvsa[YYINITDEPTH];
- YYSTYPE *yyvs;
- YYSTYPE *yyvsp;
+ /* The semantic value stack. */
+ YYSTYPE yyvsa[YYINITDEPTH];
+ YYSTYPE *yyvs = yyvsa;
+ YYSTYPE *yyvsp;
- /* The location stack. */
- YYLTYPE yylsa[YYINITDEPTH];
- YYLTYPE *yyls;
- YYLTYPE *yylsp;
+ /* The location stack. */
+ YYLTYPE yylsa[YYINITDEPTH];
+ YYLTYPE *yyls = yylsa;
+ YYLTYPE *yylsp;
+ /* The locations where the error started and ended. */
+ YYLTYPE yyerror_range[2];
- /* The locations where the error started and ended. */
- YYLTYPE yyerror_range[2];
+#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N))
- YYSIZE_T yystacksize;
+ YYSIZE_T yystacksize = YYINITDEPTH;
- int yyn;
- int yyresult;
- /* Lookahead token as an internal (translated) token number. */
- int yytoken;
/* The variables used to return semantic value and location from the
action routines. */
YYSTYPE yyval;
YYLTYPE yyloc;
-#if YYERROR_VERBOSE
- /* Buffer for error messages, and its allocated size. */
- char yymsgbuf[128];
- char *yymsg = yymsgbuf;
- YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
-#endif
-
-#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N))
-
/* The number of symbols on the RHS of the reduced rule.
Keep to zero when no symbol should be popped. */
int yylen = 0;
- yytoken = 0;
- yyss = yyssa;
- yyvs = yyvsa;
- yyls = yylsa;
- yystacksize = YYINITDEPTH;
-
YYDPRINTF ((stderr, "Starting parse\n"));
yystate = 0;
yyerrstatus = 0;
yynerrs = 0;
- yychar = YYEMPTY; /* Cause a token to be read. */
+ yychar = YYEMPTY; /* Cause a token to be read. */
/* Initialize stack pointers.
Waste one element of value and location stack
so that they stay on the same level as the state stack.
The wasted elements are never initialized. */
+
yyssp = yyss;
yyvsp = yyvs;
yylsp = yyls;
-
-#if YYLTYPE_IS_TRIVIAL
+#if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
/* Initialize the default location before parsing starts. */
yylloc.first_line = yylloc.last_line = 1;
- yylloc.first_column = yylloc.last_column = 1;
+ yylloc.first_column = yylloc.last_column = 0;
#endif
goto yysetstate;
@@ -1980,7 +2060,6 @@ YYLTYPE yylloc;
&yyvs1, yysize * sizeof (*yyvsp),
&yyls1, yysize * sizeof (*yylsp),
&yystacksize);
-
yyls = yyls1;
yyss = yyss1;
yyvs = yyvs1;
@@ -2002,9 +2081,9 @@ YYLTYPE yylloc;
(union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
if (! yyptr)
goto yyexhaustedlab;
- YYSTACK_RELOCATE (yyss_alloc, yyss);
- YYSTACK_RELOCATE (yyvs_alloc, yyvs);
- YYSTACK_RELOCATE (yyls_alloc, yyls);
+ YYSTACK_RELOCATE (yyss);
+ YYSTACK_RELOCATE (yyvs);
+ YYSTACK_RELOCATE (yyls);
# undef YYSTACK_RELOCATE
if (yyss1 != yyssa)
YYSTACK_FREE (yyss1);
@@ -2025,9 +2104,6 @@ YYLTYPE yylloc;
YYDPRINTF ((stderr, "Entering state %d\n", yystate));
- if (yystate == YYFINAL)
- YYACCEPT;
-
goto yybackup;
/*-----------.
@@ -2036,16 +2112,16 @@ YYLTYPE yylloc;
yybackup:
/* Do appropriate processing given the current state. Read a
- lookahead token if we need one and don't already have one. */
+ look-ahead token if we need one and don't already have one. */
- /* First try to decide what to do without reference to lookahead token. */
+ /* First try to decide what to do without reference to look-ahead token. */
yyn = yypact[yystate];
if (yyn == YYPACT_NINF)
goto yydefault;
- /* Not known => get a lookahead token if don't already have one. */
+ /* Not known => get a look-ahead token if don't already have one. */
- /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
+ /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */
if (yychar == YYEMPTY)
{
YYDPRINTF ((stderr, "Reading a token: "));
@@ -2077,16 +2153,20 @@ yybackup:
goto yyreduce;
}
+ if (yyn == YYFINAL)
+ YYACCEPT;
+
/* Count tokens shifted since error; after three, turn off error
status. */
if (yyerrstatus)
yyerrstatus--;
- /* Shift the lookahead token. */
+ /* Shift the look-ahead token. */
YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
- /* Discard the shifted token. */
- yychar = YYEMPTY;
+ /* Discard the shifted token unless it is eof. */
+ if (yychar != YYEOF)
+ yychar = YYEMPTY;
yystate = yyn;
*++yyvsp = yylval;
@@ -2127,9 +2207,7 @@ yyreduce:
switch (yyn)
{
case 3:
-
-/* Line 1455 of yacc.c */
-#line 282 "program_parse.y"
+#line 282 "program/program_parse.y"
{
if (state->prog->Target != GL_VERTEX_PROGRAM_ARB) {
yyerror(& (yylsp[(1) - (1)]), state, "invalid fragment program header");
@@ -2140,9 +2218,7 @@ yyreduce:
break;
case 4:
-
-/* Line 1455 of yacc.c */
-#line 290 "program_parse.y"
+#line 290 "program/program_parse.y"
{
if (state->prog->Target != GL_FRAGMENT_PROGRAM_ARB) {
yyerror(& (yylsp[(1) - (1)]), state, "invalid vertex program header");
@@ -2155,9 +2231,7 @@ yyreduce:
break;
case 7:
-
-/* Line 1455 of yacc.c */
-#line 306 "program_parse.y"
+#line 306 "program/program_parse.y"
{
int valid = 0;
@@ -2182,9 +2256,7 @@ yyreduce:
break;
case 10:
-
-/* Line 1455 of yacc.c */
-#line 334 "program_parse.y"
+#line 334 "program/program_parse.y"
{
if ((yyvsp[(1) - (2)].inst) != NULL) {
if (state->inst_tail == NULL) {
@@ -2202,9 +2274,7 @@ yyreduce:
break;
case 12:
-
-/* Line 1455 of yacc.c */
-#line 352 "program_parse.y"
+#line 352 "program/program_parse.y"
{
(yyval.inst) = (yyvsp[(1) - (1)].inst);
state->prog->NumAluInstructions++;
@@ -2212,9 +2282,7 @@ yyreduce:
break;
case 13:
-
-/* Line 1455 of yacc.c */
-#line 357 "program_parse.y"
+#line 357 "program/program_parse.y"
{
(yyval.inst) = (yyvsp[(1) - (1)].inst);
state->prog->NumTexInstructions++;
@@ -2222,63 +2290,49 @@ yyreduce:
break;
case 24:
-
-/* Line 1455 of yacc.c */
-#line 378 "program_parse.y"
+#line 378 "program/program_parse.y"
{
(yyval.inst) = asm_instruction_ctor(OPCODE_ARL, & (yyvsp[(2) - (4)].dst_reg), & (yyvsp[(4) - (4)].src_reg), NULL, NULL);
;}
break;
case 25:
-
-/* Line 1455 of yacc.c */
-#line 384 "program_parse.y"
+#line 384 "program/program_parse.y"
{
(yyval.inst) = asm_instruction_copy_ctor(& (yyvsp[(1) - (4)].temp_inst), & (yyvsp[(2) - (4)].dst_reg), & (yyvsp[(4) - (4)].src_reg), NULL, NULL);
;}
break;
case 26:
-
-/* Line 1455 of yacc.c */
-#line 390 "program_parse.y"
+#line 390 "program/program_parse.y"
{
(yyval.inst) = asm_instruction_copy_ctor(& (yyvsp[(1) - (4)].temp_inst), & (yyvsp[(2) - (4)].dst_reg), & (yyvsp[(4) - (4)].src_reg), NULL, NULL);
;}
break;
case 27:
-
-/* Line 1455 of yacc.c */
-#line 396 "program_parse.y"
+#line 396 "program/program_parse.y"
{
(yyval.inst) = asm_instruction_copy_ctor(& (yyvsp[(1) - (6)].temp_inst), & (yyvsp[(2) - (6)].dst_reg), & (yyvsp[(4) - (6)].src_reg), & (yyvsp[(6) - (6)].src_reg), NULL);
;}
break;
case 28:
-
-/* Line 1455 of yacc.c */
-#line 403 "program_parse.y"
+#line 403 "program/program_parse.y"
{
(yyval.inst) = asm_instruction_copy_ctor(& (yyvsp[(1) - (6)].temp_inst), & (yyvsp[(2) - (6)].dst_reg), & (yyvsp[(4) - (6)].src_reg), & (yyvsp[(6) - (6)].src_reg), NULL);
;}
break;
case 29:
-
-/* Line 1455 of yacc.c */
-#line 410 "program_parse.y"
+#line 410 "program/program_parse.y"
{
(yyval.inst) = asm_instruction_copy_ctor(& (yyvsp[(1) - (8)].temp_inst), & (yyvsp[(2) - (8)].dst_reg), & (yyvsp[(4) - (8)].src_reg), & (yyvsp[(6) - (8)].src_reg), & (yyvsp[(8) - (8)].src_reg));
;}
break;
case 30:
-
-/* Line 1455 of yacc.c */
-#line 416 "program_parse.y"
+#line 416 "program/program_parse.y"
{
(yyval.inst) = asm_instruction_copy_ctor(& (yyvsp[(1) - (8)].temp_inst), & (yyvsp[(2) - (8)].dst_reg), & (yyvsp[(4) - (8)].src_reg), NULL, NULL);
if ((yyval.inst) != NULL) {
@@ -2323,9 +2377,7 @@ yyreduce:
break;
case 31:
-
-/* Line 1455 of yacc.c */
-#line 460 "program_parse.y"
+#line 460 "program/program_parse.y"
{
(yyval.inst) = asm_instruction_ctor(OPCODE_KIL, NULL, & (yyvsp[(2) - (2)].src_reg), NULL, NULL);
state->fragment.UsesKill = 1;
@@ -2333,9 +2385,7 @@ yyreduce:
break;
case 32:
-
-/* Line 1455 of yacc.c */
-#line 465 "program_parse.y"
+#line 465 "program/program_parse.y"
{
(yyval.inst) = asm_instruction_ctor(OPCODE_KIL_NV, NULL, NULL, NULL, NULL);
(yyval.inst)->Base.DstReg.CondMask = (yyvsp[(2) - (2)].dst_reg).CondMask;
@@ -2346,9 +2396,7 @@ yyreduce:
break;
case 33:
-
-/* Line 1455 of yacc.c */
-#line 475 "program_parse.y"
+#line 475 "program/program_parse.y"
{
(yyval.inst) = asm_instruction_copy_ctor(& (yyvsp[(1) - (12)].temp_inst), & (yyvsp[(2) - (12)].dst_reg), & (yyvsp[(4) - (12)].src_reg), & (yyvsp[(6) - (12)].src_reg), & (yyvsp[(8) - (12)].src_reg));
if ((yyval.inst) != NULL) {
@@ -2393,102 +2441,74 @@ yyreduce:
break;
case 34:
-
-/* Line 1455 of yacc.c */
-#line 519 "program_parse.y"
+#line 519 "program/program_parse.y"
{
(yyval.integer) = (yyvsp[(2) - (2)].integer);
;}
break;
case 35:
-
-/* Line 1455 of yacc.c */
-#line 524 "program_parse.y"
+#line 524 "program/program_parse.y"
{ (yyval.integer) = TEXTURE_1D_INDEX; ;}
break;
case 36:
-
-/* Line 1455 of yacc.c */
-#line 525 "program_parse.y"
+#line 525 "program/program_parse.y"
{ (yyval.integer) = TEXTURE_2D_INDEX; ;}
break;
case 37:
-
-/* Line 1455 of yacc.c */
-#line 526 "program_parse.y"
+#line 526 "program/program_parse.y"
{ (yyval.integer) = TEXTURE_3D_INDEX; ;}
break;
case 38:
-
-/* Line 1455 of yacc.c */
-#line 527 "program_parse.y"
+#line 527 "program/program_parse.y"
{ (yyval.integer) = TEXTURE_CUBE_INDEX; ;}
break;
case 39:
-
-/* Line 1455 of yacc.c */
-#line 528 "program_parse.y"
+#line 528 "program/program_parse.y"
{ (yyval.integer) = TEXTURE_RECT_INDEX; ;}
break;
case 40:
-
-/* Line 1455 of yacc.c */
-#line 529 "program_parse.y"
+#line 529 "program/program_parse.y"
{ (yyval.integer) = -TEXTURE_1D_INDEX; ;}
break;
case 41:
-
-/* Line 1455 of yacc.c */
-#line 530 "program_parse.y"
+#line 530 "program/program_parse.y"
{ (yyval.integer) = -TEXTURE_2D_INDEX; ;}
break;
case 42:
-
-/* Line 1455 of yacc.c */
-#line 531 "program_parse.y"
+#line 531 "program/program_parse.y"
{ (yyval.integer) = -TEXTURE_RECT_INDEX; ;}
break;
case 43:
-
-/* Line 1455 of yacc.c */
-#line 532 "program_parse.y"
+#line 532 "program/program_parse.y"
{ (yyval.integer) = TEXTURE_1D_ARRAY_INDEX; ;}
break;
case 44:
-
-/* Line 1455 of yacc.c */
-#line 533 "program_parse.y"
+#line 533 "program/program_parse.y"
{ (yyval.integer) = TEXTURE_2D_ARRAY_INDEX; ;}
break;
case 45:
-
-/* Line 1455 of yacc.c */
-#line 534 "program_parse.y"
+#line 534 "program/program_parse.y"
{ (yyval.integer) = -TEXTURE_1D_ARRAY_INDEX; ;}
break;
case 46:
-
-/* Line 1455 of yacc.c */
-#line 535 "program_parse.y"
+#line 535 "program/program_parse.y"
{ (yyval.integer) = -TEXTURE_2D_ARRAY_INDEX; ;}
break;
case 47:
-
-/* Line 1455 of yacc.c */
-#line 539 "program_parse.y"
+#line 539 "program/program_parse.y"
{
/* FIXME: Is this correct? Should the extenedSwizzle be applied
* FIXME: to the existing swizzle?
@@ -2501,9 +2521,7 @@ yyreduce:
break;
case 48:
-
-/* Line 1455 of yacc.c */
-#line 551 "program_parse.y"
+#line 551 "program/program_parse.y"
{
(yyval.src_reg) = (yyvsp[(2) - (2)].src_reg);
@@ -2514,9 +2532,7 @@ yyreduce:
break;
case 49:
-
-/* Line 1455 of yacc.c */
-#line 559 "program_parse.y"
+#line 559 "program/program_parse.y"
{
(yyval.src_reg) = (yyvsp[(3) - (4)].src_reg);
@@ -2534,9 +2550,7 @@ yyreduce:
break;
case 50:
-
-/* Line 1455 of yacc.c */
-#line 576 "program_parse.y"
+#line 576 "program/program_parse.y"
{
(yyval.src_reg) = (yyvsp[(1) - (2)].src_reg);
@@ -2546,9 +2560,7 @@ yyreduce:
break;
case 51:
-
-/* Line 1455 of yacc.c */
-#line 583 "program_parse.y"
+#line 583 "program/program_parse.y"
{
struct asm_symbol temp_sym;
@@ -2568,9 +2580,7 @@ yyreduce:
break;
case 52:
-
-/* Line 1455 of yacc.c */
-#line 602 "program_parse.y"
+#line 602 "program/program_parse.y"
{
(yyval.src_reg) = (yyvsp[(2) - (3)].src_reg);
@@ -2584,9 +2594,7 @@ yyreduce:
break;
case 53:
-
-/* Line 1455 of yacc.c */
-#line 613 "program_parse.y"
+#line 613 "program/program_parse.y"
{
(yyval.src_reg) = (yyvsp[(3) - (5)].src_reg);
@@ -2606,9 +2614,7 @@ yyreduce:
break;
case 54:
-
-/* Line 1455 of yacc.c */
-#line 633 "program_parse.y"
+#line 633 "program/program_parse.y"
{
(yyval.dst_reg) = (yyvsp[(1) - (3)].dst_reg);
(yyval.dst_reg).WriteMask = (yyvsp[(2) - (3)].swiz_mask).mask;
@@ -2634,9 +2640,7 @@ yyreduce:
break;
case 55:
-
-/* Line 1455 of yacc.c */
-#line 658 "program_parse.y"
+#line 658 "program/program_parse.y"
{
set_dst_reg(& (yyval.dst_reg), PROGRAM_ADDRESS, 0);
(yyval.dst_reg).WriteMask = (yyvsp[(2) - (2)].swiz_mask).mask;
@@ -2644,9 +2648,7 @@ yyreduce:
break;
case 56:
-
-/* Line 1455 of yacc.c */
-#line 665 "program_parse.y"
+#line 665 "program/program_parse.y"
{
const unsigned xyzw_valid =
((yyvsp[(1) - (7)].ext_swizzle).xyzw_valid << 0)
@@ -2680,9 +2682,7 @@ yyreduce:
break;
case 57:
-
-/* Line 1455 of yacc.c */
-#line 698 "program_parse.y"
+#line 698 "program/program_parse.y"
{
(yyval.ext_swizzle) = (yyvsp[(2) - (2)].ext_swizzle);
(yyval.ext_swizzle).negate = ((yyvsp[(1) - (2)].negate)) ? 1 : 0;
@@ -2690,9 +2690,7 @@ yyreduce:
break;
case 58:
-
-/* Line 1455 of yacc.c */
-#line 705 "program_parse.y"
+#line 705 "program/program_parse.y"
{
if (((yyvsp[(1) - (1)].integer) != 0) && ((yyvsp[(1) - (1)].integer) != 1)) {
yyerror(& (yylsp[(1) - (1)]), state, "invalid extended swizzle selector");
@@ -2710,9 +2708,7 @@ yyreduce:
break;
case 59:
-
-/* Line 1455 of yacc.c */
-#line 720 "program_parse.y"
+#line 720 "program/program_parse.y"
{
char s;
@@ -2768,9 +2764,7 @@ yyreduce:
break;
case 60:
-
-/* Line 1455 of yacc.c */
-#line 775 "program_parse.y"
+#line 775 "program/program_parse.y"
{
struct asm_symbol *const s = (struct asm_symbol *)
_mesa_symbol_table_find_symbol(state->st, 0, (yyvsp[(1) - (1)].string));
@@ -2816,9 +2810,7 @@ yyreduce:
break;
case 61:
-
-/* Line 1455 of yacc.c */
-#line 818 "program_parse.y"
+#line 818 "program/program_parse.y"
{
set_src_reg(& (yyval.src_reg), PROGRAM_INPUT, (yyvsp[(1) - (1)].attrib));
state->prog->InputsRead |= (1U << (yyval.src_reg).Base.Index);
@@ -2830,9 +2822,7 @@ yyreduce:
break;
case 62:
-
-/* Line 1455 of yacc.c */
-#line 827 "program_parse.y"
+#line 827 "program/program_parse.y"
{
if (! (yyvsp[(3) - (4)].src_reg).Base.RelAddr
&& ((unsigned) (yyvsp[(3) - (4)].src_reg).Base.Index >= (yyvsp[(1) - (4)].sym)->param_binding_length)) {
@@ -2857,9 +2847,7 @@ yyreduce:
break;
case 63:
-
-/* Line 1455 of yacc.c */
-#line 849 "program_parse.y"
+#line 849 "program/program_parse.y"
{
gl_register_file file = ((yyvsp[(1) - (1)].temp_sym).name != NULL)
? (yyvsp[(1) - (1)].temp_sym).param_binding_type
@@ -2870,18 +2858,14 @@ yyreduce:
break;
case 64:
-
-/* Line 1455 of yacc.c */
-#line 859 "program_parse.y"
+#line 859 "program/program_parse.y"
{
set_dst_reg(& (yyval.dst_reg), PROGRAM_OUTPUT, (yyvsp[(1) - (1)].result));
;}
break;
case 65:
-
-/* Line 1455 of yacc.c */
-#line 863 "program_parse.y"
+#line 863 "program/program_parse.y"
{
struct asm_symbol *const s = (struct asm_symbol *)
_mesa_symbol_table_find_symbol(state->st, 0, (yyvsp[(1) - (1)].string));
@@ -2911,9 +2895,7 @@ yyreduce:
break;
case 66:
-
-/* Line 1455 of yacc.c */
-#line 892 "program_parse.y"
+#line 892 "program/program_parse.y"
{
struct asm_symbol *const s = (struct asm_symbol *)
_mesa_symbol_table_find_symbol(state->st, 0, (yyvsp[(1) - (1)].string));
@@ -2933,9 +2915,7 @@ yyreduce:
break;
case 69:
-
-/* Line 1455 of yacc.c */
-#line 913 "program_parse.y"
+#line 913 "program/program_parse.y"
{
init_src_reg(& (yyval.src_reg));
(yyval.src_reg).Base.Index = (yyvsp[(1) - (1)].integer);
@@ -2943,9 +2923,7 @@ yyreduce:
break;
case 70:
-
-/* Line 1455 of yacc.c */
-#line 920 "program_parse.y"
+#line 920 "program/program_parse.y"
{
/* FINISHME: Add support for multiple address registers.
*/
@@ -2958,32 +2936,24 @@ yyreduce:
break;
case 71:
-
-/* Line 1455 of yacc.c */
-#line 931 "program_parse.y"
+#line 931 "program/program_parse.y"
{ (yyval.integer) = 0; ;}
break;
case 72:
-
-/* Line 1455 of yacc.c */
-#line 932 "program_parse.y"
+#line 932 "program/program_parse.y"
{ (yyval.integer) = (yyvsp[(2) - (2)].integer); ;}
break;
case 73:
-
-/* Line 1455 of yacc.c */
-#line 933 "program_parse.y"
+#line 933 "program/program_parse.y"
{ (yyval.integer) = -(yyvsp[(2) - (2)].integer); ;}
break;
case 74:
-
-/* Line 1455 of yacc.c */
-#line 937 "program_parse.y"
+#line 937 "program/program_parse.y"
{
- if (((yyvsp[(1) - (1)].integer) < 0) || ((yyvsp[(1) - (1)].integer) > 4095)) {
+ if (((yyvsp[(1) - (1)].integer) < 0) || ((yyvsp[(1) - (1)].integer) > (state->limits->MaxAddressOffset - 1))) {
char s[100];
_mesa_snprintf(s, sizeof(s),
"relative address offset too large (%d)", (yyvsp[(1) - (1)].integer));
@@ -2996,11 +2966,9 @@ yyreduce:
break;
case 75:
-
-/* Line 1455 of yacc.c */
-#line 951 "program_parse.y"
+#line 951 "program/program_parse.y"
{
- if (((yyvsp[(1) - (1)].integer) < 0) || ((yyvsp[(1) - (1)].integer) > 4096)) {
+ if (((yyvsp[(1) - (1)].integer) < 0) || ((yyvsp[(1) - (1)].integer) > state->limits->MaxAddressOffset)) {
char s[100];
_mesa_snprintf(s, sizeof(s),
"relative address offset too large (%d)", (yyvsp[(1) - (1)].integer));
@@ -3013,9 +2981,7 @@ yyreduce:
break;
case 76:
-
-/* Line 1455 of yacc.c */
-#line 965 "program_parse.y"
+#line 965 "program/program_parse.y"
{
struct asm_symbol *const s = (struct asm_symbol *)
_mesa_symbol_table_find_symbol(state->st, 0, (yyvsp[(1) - (1)].string));
@@ -3036,9 +3002,7 @@ yyreduce:
break;
case 77:
-
-/* Line 1455 of yacc.c */
-#line 985 "program_parse.y"
+#line 985 "program/program_parse.y"
{
if ((yyvsp[(1) - (1)].swiz_mask).mask != WRITEMASK_X) {
yyerror(& (yylsp[(1) - (1)]), state, "invalid address component selector");
@@ -3050,9 +3014,7 @@ yyreduce:
break;
case 78:
-
-/* Line 1455 of yacc.c */
-#line 996 "program_parse.y"
+#line 996 "program/program_parse.y"
{
if ((yyvsp[(1) - (1)].swiz_mask).mask != WRITEMASK_X) {
yyerror(& (yylsp[(1) - (1)]), state,
@@ -3065,41 +3027,31 @@ yyreduce:
break;
case 83:
-
-/* Line 1455 of yacc.c */
-#line 1012 "program_parse.y"
+#line 1012 "program/program_parse.y"
{ (yyval.swiz_mask).swizzle = SWIZZLE_NOOP; (yyval.swiz_mask).mask = WRITEMASK_XYZW; ;}
break;
case 88:
-
-/* Line 1455 of yacc.c */
-#line 1016 "program_parse.y"
+#line 1016 "program/program_parse.y"
{ (yyval.swiz_mask).swizzle = SWIZZLE_NOOP; (yyval.swiz_mask).mask = WRITEMASK_XYZW; ;}
break;
case 89:
-
-/* Line 1455 of yacc.c */
-#line 1020 "program_parse.y"
+#line 1020 "program/program_parse.y"
{
(yyval.dst_reg) = (yyvsp[(2) - (3)].dst_reg);
;}
break;
case 90:
-
-/* Line 1455 of yacc.c */
-#line 1024 "program_parse.y"
+#line 1024 "program/program_parse.y"
{
(yyval.dst_reg) = (yyvsp[(2) - (3)].dst_reg);
;}
break;
case 91:
-
-/* Line 1455 of yacc.c */
-#line 1028 "program_parse.y"
+#line 1028 "program/program_parse.y"
{
(yyval.dst_reg).CondMask = COND_TR;
(yyval.dst_reg).CondSwizzle = SWIZZLE_NOOP;
@@ -3108,9 +3060,7 @@ yyreduce:
break;
case 92:
-
-/* Line 1455 of yacc.c */
-#line 1036 "program_parse.y"
+#line 1036 "program/program_parse.y"
{
(yyval.dst_reg) = (yyvsp[(1) - (2)].dst_reg);
(yyval.dst_reg).CondSwizzle = (yyvsp[(2) - (2)].swiz_mask).swizzle;
@@ -3118,9 +3068,7 @@ yyreduce:
break;
case 93:
-
-/* Line 1455 of yacc.c */
-#line 1043 "program_parse.y"
+#line 1043 "program/program_parse.y"
{
(yyval.dst_reg) = (yyvsp[(1) - (2)].dst_reg);
(yyval.dst_reg).CondSwizzle = (yyvsp[(2) - (2)].swiz_mask).swizzle;
@@ -3128,9 +3076,7 @@ yyreduce:
break;
case 94:
-
-/* Line 1455 of yacc.c */
-#line 1050 "program_parse.y"
+#line 1050 "program/program_parse.y"
{
const int cond = _mesa_parse_cc((yyvsp[(1) - (1)].string));
if ((cond == 0) || ((yyvsp[(1) - (1)].string)[2] != '\0')) {
@@ -3154,9 +3100,7 @@ yyreduce:
break;
case 95:
-
-/* Line 1455 of yacc.c */
-#line 1073 "program_parse.y"
+#line 1073 "program/program_parse.y"
{
const int cond = _mesa_parse_cc((yyvsp[(1) - (1)].string));
if ((cond == 0) || ((yyvsp[(1) - (1)].string)[2] != '\0')) {
@@ -3180,9 +3124,7 @@ yyreduce:
break;
case 102:
-
-/* Line 1455 of yacc.c */
-#line 1104 "program_parse.y"
+#line 1104 "program/program_parse.y"
{
struct asm_symbol *const s =
declare_variable(state, (yyvsp[(2) - (4)].string), at_attrib, & (yylsp[(2) - (4)]));
@@ -3202,54 +3144,42 @@ yyreduce:
break;
case 103:
-
-/* Line 1455 of yacc.c */
-#line 1123 "program_parse.y"
+#line 1123 "program/program_parse.y"
{
(yyval.attrib) = (yyvsp[(2) - (2)].attrib);
;}
break;
case 104:
-
-/* Line 1455 of yacc.c */
-#line 1127 "program_parse.y"
+#line 1127 "program/program_parse.y"
{
(yyval.attrib) = (yyvsp[(2) - (2)].attrib);
;}
break;
case 105:
-
-/* Line 1455 of yacc.c */
-#line 1133 "program_parse.y"
+#line 1133 "program/program_parse.y"
{
(yyval.attrib) = VERT_ATTRIB_POS;
;}
break;
case 106:
-
-/* Line 1455 of yacc.c */
-#line 1137 "program_parse.y"
+#line 1137 "program/program_parse.y"
{
(yyval.attrib) = VERT_ATTRIB_WEIGHT;
;}
break;
case 107:
-
-/* Line 1455 of yacc.c */
-#line 1141 "program_parse.y"
+#line 1141 "program/program_parse.y"
{
(yyval.attrib) = VERT_ATTRIB_NORMAL;
;}
break;
case 108:
-
-/* Line 1455 of yacc.c */
-#line 1145 "program_parse.y"
+#line 1145 "program/program_parse.y"
{
if (!state->ctx->Extensions.EXT_secondary_color) {
yyerror(& (yylsp[(2) - (2)]), state, "GL_EXT_secondary_color not supported");
@@ -3261,9 +3191,7 @@ yyreduce:
break;
case 109:
-
-/* Line 1455 of yacc.c */
-#line 1154 "program_parse.y"
+#line 1154 "program/program_parse.y"
{
if (!state->ctx->Extensions.EXT_fog_coord) {
yyerror(& (yylsp[(1) - (1)]), state, "GL_EXT_fog_coord not supported");
@@ -3275,18 +3203,14 @@ yyreduce:
break;
case 110:
-
-/* Line 1455 of yacc.c */
-#line 1163 "program_parse.y"
+#line 1163 "program/program_parse.y"
{
(yyval.attrib) = VERT_ATTRIB_TEX0 + (yyvsp[(2) - (2)].integer);
;}
break;
case 111:
-
-/* Line 1455 of yacc.c */
-#line 1167 "program_parse.y"
+#line 1167 "program/program_parse.y"
{
yyerror(& (yylsp[(1) - (4)]), state, "GL_ARB_matrix_palette not supported");
YYERROR;
@@ -3294,18 +3218,14 @@ yyreduce:
break;
case 112:
-
-/* Line 1455 of yacc.c */
-#line 1172 "program_parse.y"
+#line 1172 "program/program_parse.y"
{
(yyval.attrib) = VERT_ATTRIB_GENERIC0 + (yyvsp[(3) - (4)].integer);
;}
break;
case 113:
-
-/* Line 1455 of yacc.c */
-#line 1178 "program_parse.y"
+#line 1178 "program/program_parse.y"
{
if ((unsigned) (yyvsp[(1) - (1)].integer) >= state->limits->MaxAttribs) {
yyerror(& (yylsp[(1) - (1)]), state, "invalid vertex attribute reference");
@@ -3317,45 +3237,35 @@ yyreduce:
break;
case 117:
-
-/* Line 1455 of yacc.c */
-#line 1192 "program_parse.y"
+#line 1192 "program/program_parse.y"
{
(yyval.attrib) = FRAG_ATTRIB_WPOS;
;}
break;
case 118:
-
-/* Line 1455 of yacc.c */
-#line 1196 "program_parse.y"
+#line 1196 "program/program_parse.y"
{
(yyval.attrib) = FRAG_ATTRIB_COL0 + (yyvsp[(2) - (2)].integer);
;}
break;
case 119:
-
-/* Line 1455 of yacc.c */
-#line 1200 "program_parse.y"
+#line 1200 "program/program_parse.y"
{
(yyval.attrib) = FRAG_ATTRIB_FOGC;
;}
break;
case 120:
-
-/* Line 1455 of yacc.c */
-#line 1204 "program_parse.y"
+#line 1204 "program/program_parse.y"
{
(yyval.attrib) = FRAG_ATTRIB_TEX0 + (yyvsp[(2) - (2)].integer);
;}
break;
case 123:
-
-/* Line 1455 of yacc.c */
-#line 1212 "program_parse.y"
+#line 1212 "program/program_parse.y"
{
struct asm_symbol *const s =
declare_variable(state, (yyvsp[(2) - (3)].string), at_param, & (yylsp[(2) - (3)]));
@@ -3374,9 +3284,7 @@ yyreduce:
break;
case 124:
-
-/* Line 1455 of yacc.c */
-#line 1230 "program_parse.y"
+#line 1230 "program/program_parse.y"
{
if (((yyvsp[(4) - (6)].integer) != 0) && ((unsigned) (yyvsp[(4) - (6)].integer) != (yyvsp[(6) - (6)].temp_sym).param_binding_length)) {
free((yyvsp[(2) - (6)].string));
@@ -3402,18 +3310,14 @@ yyreduce:
break;
case 125:
-
-/* Line 1455 of yacc.c */
-#line 1255 "program_parse.y"
+#line 1255 "program/program_parse.y"
{
(yyval.integer) = 0;
;}
break;
case 126:
-
-/* Line 1455 of yacc.c */
-#line 1259 "program_parse.y"
+#line 1259 "program/program_parse.y"
{
if (((yyvsp[(1) - (1)].integer) < 1) || ((unsigned) (yyvsp[(1) - (1)].integer) > state->limits->MaxParameters)) {
yyerror(& (yylsp[(1) - (1)]), state, "invalid parameter array size");
@@ -3425,27 +3329,21 @@ yyreduce:
break;
case 127:
-
-/* Line 1455 of yacc.c */
-#line 1270 "program_parse.y"
+#line 1270 "program/program_parse.y"
{
(yyval.temp_sym) = (yyvsp[(2) - (2)].temp_sym);
;}
break;
case 128:
-
-/* Line 1455 of yacc.c */
-#line 1276 "program_parse.y"
+#line 1276 "program/program_parse.y"
{
(yyval.temp_sym) = (yyvsp[(3) - (4)].temp_sym);
;}
break;
case 130:
-
-/* Line 1455 of yacc.c */
-#line 1283 "program_parse.y"
+#line 1283 "program/program_parse.y"
{
(yyvsp[(1) - (3)].temp_sym).param_binding_length += (yyvsp[(3) - (3)].temp_sym).param_binding_length;
(yyval.temp_sym) = (yyvsp[(1) - (3)].temp_sym);
@@ -3453,9 +3351,7 @@ yyreduce:
break;
case 131:
-
-/* Line 1455 of yacc.c */
-#line 1290 "program_parse.y"
+#line 1290 "program/program_parse.y"
{
memset(& (yyval.temp_sym), 0, sizeof((yyval.temp_sym)));
(yyval.temp_sym).param_binding_begin = ~0;
@@ -3464,9 +3360,7 @@ yyreduce:
break;
case 132:
-
-/* Line 1455 of yacc.c */
-#line 1296 "program_parse.y"
+#line 1296 "program/program_parse.y"
{
memset(& (yyval.temp_sym), 0, sizeof((yyval.temp_sym)));
(yyval.temp_sym).param_binding_begin = ~0;
@@ -3475,9 +3369,7 @@ yyreduce:
break;
case 133:
-
-/* Line 1455 of yacc.c */
-#line 1302 "program_parse.y"
+#line 1302 "program/program_parse.y"
{
memset(& (yyval.temp_sym), 0, sizeof((yyval.temp_sym)));
(yyval.temp_sym).param_binding_begin = ~0;
@@ -3486,9 +3378,7 @@ yyreduce:
break;
case 134:
-
-/* Line 1455 of yacc.c */
-#line 1310 "program_parse.y"
+#line 1310 "program/program_parse.y"
{
memset(& (yyval.temp_sym), 0, sizeof((yyval.temp_sym)));
(yyval.temp_sym).param_binding_begin = ~0;
@@ -3497,9 +3387,7 @@ yyreduce:
break;
case 135:
-
-/* Line 1455 of yacc.c */
-#line 1316 "program_parse.y"
+#line 1316 "program/program_parse.y"
{
memset(& (yyval.temp_sym), 0, sizeof((yyval.temp_sym)));
(yyval.temp_sym).param_binding_begin = ~0;
@@ -3508,9 +3396,7 @@ yyreduce:
break;
case 136:
-
-/* Line 1455 of yacc.c */
-#line 1322 "program_parse.y"
+#line 1322 "program/program_parse.y"
{
memset(& (yyval.temp_sym), 0, sizeof((yyval.temp_sym)));
(yyval.temp_sym).param_binding_begin = ~0;
@@ -3519,9 +3405,7 @@ yyreduce:
break;
case 137:
-
-/* Line 1455 of yacc.c */
-#line 1330 "program_parse.y"
+#line 1330 "program/program_parse.y"
{
memset(& (yyval.temp_sym), 0, sizeof((yyval.temp_sym)));
(yyval.temp_sym).param_binding_begin = ~0;
@@ -3530,9 +3414,7 @@ yyreduce:
break;
case 138:
-
-/* Line 1455 of yacc.c */
-#line 1336 "program_parse.y"
+#line 1336 "program/program_parse.y"
{
memset(& (yyval.temp_sym), 0, sizeof((yyval.temp_sym)));
(yyval.temp_sym).param_binding_begin = ~0;
@@ -3541,9 +3423,7 @@ yyreduce:
break;
case 139:
-
-/* Line 1455 of yacc.c */
-#line 1342 "program_parse.y"
+#line 1342 "program/program_parse.y"
{
memset(& (yyval.temp_sym), 0, sizeof((yyval.temp_sym)));
(yyval.temp_sym).param_binding_begin = ~0;
@@ -3552,100 +3432,72 @@ yyreduce:
break;
case 140:
-
-/* Line 1455 of yacc.c */
-#line 1349 "program_parse.y"
+#line 1349 "program/program_parse.y"
{ memcpy((yyval.state), (yyvsp[(1) - (1)].state), sizeof((yyval.state))); ;}
break;
case 141:
-
-/* Line 1455 of yacc.c */
-#line 1350 "program_parse.y"
+#line 1350 "program/program_parse.y"
{ memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;}
break;
case 142:
-
-/* Line 1455 of yacc.c */
-#line 1353 "program_parse.y"
+#line 1353 "program/program_parse.y"
{ memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;}
break;
case 143:
-
-/* Line 1455 of yacc.c */
-#line 1354 "program_parse.y"
+#line 1354 "program/program_parse.y"
{ memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;}
break;
case 144:
-
-/* Line 1455 of yacc.c */
-#line 1355 "program_parse.y"
+#line 1355 "program/program_parse.y"
{ memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;}
break;
case 145:
-
-/* Line 1455 of yacc.c */
-#line 1356 "program_parse.y"
+#line 1356 "program/program_parse.y"
{ memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;}
break;
case 146:
-
-/* Line 1455 of yacc.c */
-#line 1357 "program_parse.y"
+#line 1357 "program/program_parse.y"
{ memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;}
break;
case 147:
-
-/* Line 1455 of yacc.c */
-#line 1358 "program_parse.y"
+#line 1358 "program/program_parse.y"
{ memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;}
break;
case 148:
-
-/* Line 1455 of yacc.c */
-#line 1359 "program_parse.y"
+#line 1359 "program/program_parse.y"
{ memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;}
break;
case 149:
-
-/* Line 1455 of yacc.c */
-#line 1360 "program_parse.y"
+#line 1360 "program/program_parse.y"
{ memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;}
break;
case 150:
-
-/* Line 1455 of yacc.c */
-#line 1361 "program_parse.y"
+#line 1361 "program/program_parse.y"
{ memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;}
break;
case 151:
-
-/* Line 1455 of yacc.c */
-#line 1362 "program_parse.y"
+#line 1362 "program/program_parse.y"
{ memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;}
break;
case 152:
-
-/* Line 1455 of yacc.c */
-#line 1363 "program_parse.y"
+#line 1363 "program/program_parse.y"
{ memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;}
break;
case 153:
-
-/* Line 1455 of yacc.c */
-#line 1367 "program_parse.y"
+#line 1367 "program/program_parse.y"
{
memset((yyval.state), 0, sizeof((yyval.state)));
(yyval.state)[0] = STATE_MATERIAL;
@@ -3655,36 +3507,28 @@ yyreduce:
break;
case 154:
-
-/* Line 1455 of yacc.c */
-#line 1376 "program_parse.y"
+#line 1376 "program/program_parse.y"
{
(yyval.integer) = (yyvsp[(1) - (1)].integer);
;}
break;
case 155:
-
-/* Line 1455 of yacc.c */
-#line 1380 "program_parse.y"
+#line 1380 "program/program_parse.y"
{
(yyval.integer) = STATE_EMISSION;
;}
break;
case 156:
-
-/* Line 1455 of yacc.c */
-#line 1384 "program_parse.y"
+#line 1384 "program/program_parse.y"
{
(yyval.integer) = STATE_SHININESS;
;}
break;
case 157:
-
-/* Line 1455 of yacc.c */
-#line 1390 "program_parse.y"
+#line 1390 "program/program_parse.y"
{
memset((yyval.state), 0, sizeof((yyval.state)));
(yyval.state)[0] = STATE_LIGHT;
@@ -3694,27 +3538,21 @@ yyreduce:
break;
case 158:
-
-/* Line 1455 of yacc.c */
-#line 1399 "program_parse.y"
+#line 1399 "program/program_parse.y"
{
(yyval.integer) = (yyvsp[(1) - (1)].integer);
;}
break;
case 159:
-
-/* Line 1455 of yacc.c */
-#line 1403 "program_parse.y"
+#line 1403 "program/program_parse.y"
{
(yyval.integer) = STATE_POSITION;
;}
break;
case 160:
-
-/* Line 1455 of yacc.c */
-#line 1407 "program_parse.y"
+#line 1407 "program/program_parse.y"
{
if (!state->ctx->Extensions.EXT_point_parameters) {
yyerror(& (yylsp[(1) - (1)]), state, "GL_ARB_point_parameters not supported");
@@ -3726,36 +3564,28 @@ yyreduce:
break;
case 161:
-
-/* Line 1455 of yacc.c */
-#line 1416 "program_parse.y"
+#line 1416 "program/program_parse.y"
{
(yyval.integer) = (yyvsp[(2) - (2)].integer);
;}
break;
case 162:
-
-/* Line 1455 of yacc.c */
-#line 1420 "program_parse.y"
+#line 1420 "program/program_parse.y"
{
(yyval.integer) = STATE_HALF_VECTOR;
;}
break;
case 163:
-
-/* Line 1455 of yacc.c */
-#line 1426 "program_parse.y"
+#line 1426 "program/program_parse.y"
{
(yyval.integer) = STATE_SPOT_DIRECTION;
;}
break;
case 164:
-
-/* Line 1455 of yacc.c */
-#line 1432 "program_parse.y"
+#line 1432 "program/program_parse.y"
{
(yyval.state)[0] = (yyvsp[(2) - (2)].state)[0];
(yyval.state)[1] = (yyvsp[(2) - (2)].state)[1];
@@ -3763,9 +3593,7 @@ yyreduce:
break;
case 165:
-
-/* Line 1455 of yacc.c */
-#line 1439 "program_parse.y"
+#line 1439 "program/program_parse.y"
{
memset((yyval.state), 0, sizeof((yyval.state)));
(yyval.state)[0] = STATE_LIGHTMODEL_AMBIENT;
@@ -3773,9 +3601,7 @@ yyreduce:
break;
case 166:
-
-/* Line 1455 of yacc.c */
-#line 1444 "program_parse.y"
+#line 1444 "program/program_parse.y"
{
memset((yyval.state), 0, sizeof((yyval.state)));
(yyval.state)[0] = STATE_LIGHTMODEL_SCENECOLOR;
@@ -3784,9 +3610,7 @@ yyreduce:
break;
case 167:
-
-/* Line 1455 of yacc.c */
-#line 1452 "program_parse.y"
+#line 1452 "program/program_parse.y"
{
memset((yyval.state), 0, sizeof((yyval.state)));
(yyval.state)[0] = STATE_LIGHTPROD;
@@ -3797,9 +3621,7 @@ yyreduce:
break;
case 169:
-
-/* Line 1455 of yacc.c */
-#line 1464 "program_parse.y"
+#line 1464 "program/program_parse.y"
{
memset((yyval.state), 0, sizeof((yyval.state)));
(yyval.state)[0] = (yyvsp[(3) - (3)].integer);
@@ -3808,45 +3630,35 @@ yyreduce:
break;
case 170:
-
-/* Line 1455 of yacc.c */
-#line 1472 "program_parse.y"
+#line 1472 "program/program_parse.y"
{
(yyval.integer) = STATE_TEXENV_COLOR;
;}
break;
case 171:
-
-/* Line 1455 of yacc.c */
-#line 1478 "program_parse.y"
+#line 1478 "program/program_parse.y"
{
(yyval.integer) = STATE_AMBIENT;
;}
break;
case 172:
-
-/* Line 1455 of yacc.c */
-#line 1482 "program_parse.y"
+#line 1482 "program/program_parse.y"
{
(yyval.integer) = STATE_DIFFUSE;
;}
break;
case 173:
-
-/* Line 1455 of yacc.c */
-#line 1486 "program_parse.y"
+#line 1486 "program/program_parse.y"
{
(yyval.integer) = STATE_SPECULAR;
;}
break;
case 174:
-
-/* Line 1455 of yacc.c */
-#line 1492 "program_parse.y"
+#line 1492 "program/program_parse.y"
{
if ((unsigned) (yyvsp[(1) - (1)].integer) >= state->MaxLights) {
yyerror(& (yylsp[(1) - (1)]), state, "invalid light selector");
@@ -3858,9 +3670,7 @@ yyreduce:
break;
case 175:
-
-/* Line 1455 of yacc.c */
-#line 1503 "program_parse.y"
+#line 1503 "program/program_parse.y"
{
memset((yyval.state), 0, sizeof((yyval.state)));
(yyval.state)[0] = STATE_TEXGEN;
@@ -3870,63 +3680,49 @@ yyreduce:
break;
case 176:
-
-/* Line 1455 of yacc.c */
-#line 1512 "program_parse.y"
+#line 1512 "program/program_parse.y"
{
(yyval.integer) = STATE_TEXGEN_EYE_S;
;}
break;
case 177:
-
-/* Line 1455 of yacc.c */
-#line 1516 "program_parse.y"
+#line 1516 "program/program_parse.y"
{
(yyval.integer) = STATE_TEXGEN_OBJECT_S;
;}
break;
case 178:
-
-/* Line 1455 of yacc.c */
-#line 1521 "program_parse.y"
+#line 1521 "program/program_parse.y"
{
(yyval.integer) = STATE_TEXGEN_EYE_S - STATE_TEXGEN_EYE_S;
;}
break;
case 179:
-
-/* Line 1455 of yacc.c */
-#line 1525 "program_parse.y"
+#line 1525 "program/program_parse.y"
{
(yyval.integer) = STATE_TEXGEN_EYE_T - STATE_TEXGEN_EYE_S;
;}
break;
case 180:
-
-/* Line 1455 of yacc.c */
-#line 1529 "program_parse.y"
+#line 1529 "program/program_parse.y"
{
(yyval.integer) = STATE_TEXGEN_EYE_R - STATE_TEXGEN_EYE_S;
;}
break;
case 181:
-
-/* Line 1455 of yacc.c */
-#line 1533 "program_parse.y"
+#line 1533 "program/program_parse.y"
{
(yyval.integer) = STATE_TEXGEN_EYE_Q - STATE_TEXGEN_EYE_S;
;}
break;
case 182:
-
-/* Line 1455 of yacc.c */
-#line 1539 "program_parse.y"
+#line 1539 "program/program_parse.y"
{
memset((yyval.state), 0, sizeof((yyval.state)));
(yyval.state)[0] = (yyvsp[(2) - (2)].integer);
@@ -3934,27 +3730,21 @@ yyreduce:
break;
case 183:
-
-/* Line 1455 of yacc.c */
-#line 1546 "program_parse.y"
+#line 1546 "program/program_parse.y"
{
(yyval.integer) = STATE_FOG_COLOR;
;}
break;
case 184:
-
-/* Line 1455 of yacc.c */
-#line 1550 "program_parse.y"
+#line 1550 "program/program_parse.y"
{
(yyval.integer) = STATE_FOG_PARAMS;
;}
break;
case 185:
-
-/* Line 1455 of yacc.c */
-#line 1556 "program_parse.y"
+#line 1556 "program/program_parse.y"
{
memset((yyval.state), 0, sizeof((yyval.state)));
(yyval.state)[0] = STATE_CLIPPLANE;
@@ -3963,9 +3753,7 @@ yyreduce:
break;
case 186:
-
-/* Line 1455 of yacc.c */
-#line 1564 "program_parse.y"
+#line 1564 "program/program_parse.y"
{
if ((unsigned) (yyvsp[(1) - (1)].integer) >= state->MaxClipPlanes) {
yyerror(& (yylsp[(1) - (1)]), state, "invalid clip plane selector");
@@ -3977,9 +3765,7 @@ yyreduce:
break;
case 187:
-
-/* Line 1455 of yacc.c */
-#line 1575 "program_parse.y"
+#line 1575 "program/program_parse.y"
{
memset((yyval.state), 0, sizeof((yyval.state)));
(yyval.state)[0] = (yyvsp[(2) - (2)].integer);
@@ -3987,27 +3773,21 @@ yyreduce:
break;
case 188:
-
-/* Line 1455 of yacc.c */
-#line 1582 "program_parse.y"
+#line 1582 "program/program_parse.y"
{
(yyval.integer) = STATE_POINT_SIZE;
;}
break;
case 189:
-
-/* Line 1455 of yacc.c */
-#line 1586 "program_parse.y"
+#line 1586 "program/program_parse.y"
{
(yyval.integer) = STATE_POINT_ATTENUATION;
;}
break;
case 190:
-
-/* Line 1455 of yacc.c */
-#line 1592 "program_parse.y"
+#line 1592 "program/program_parse.y"
{
(yyval.state)[0] = (yyvsp[(1) - (5)].state)[0];
(yyval.state)[1] = (yyvsp[(1) - (5)].state)[1];
@@ -4018,9 +3798,7 @@ yyreduce:
break;
case 191:
-
-/* Line 1455 of yacc.c */
-#line 1602 "program_parse.y"
+#line 1602 "program/program_parse.y"
{
(yyval.state)[0] = (yyvsp[(1) - (2)].state)[0];
(yyval.state)[1] = (yyvsp[(1) - (2)].state)[1];
@@ -4031,9 +3809,7 @@ yyreduce:
break;
case 192:
-
-/* Line 1455 of yacc.c */
-#line 1612 "program_parse.y"
+#line 1612 "program/program_parse.y"
{
(yyval.state)[2] = 0;
(yyval.state)[3] = 3;
@@ -4041,9 +3817,7 @@ yyreduce:
break;
case 193:
-
-/* Line 1455 of yacc.c */
-#line 1617 "program_parse.y"
+#line 1617 "program/program_parse.y"
{
/* It seems logical that the matrix row range specifier would have
* to specify a range or more than one row (i.e., $5 > $3).
@@ -4062,9 +3836,7 @@ yyreduce:
break;
case 194:
-
-/* Line 1455 of yacc.c */
-#line 1635 "program_parse.y"
+#line 1635 "program/program_parse.y"
{
(yyval.state)[0] = (yyvsp[(2) - (3)].state)[0];
(yyval.state)[1] = (yyvsp[(2) - (3)].state)[1];
@@ -4073,54 +3845,42 @@ yyreduce:
break;
case 195:
-
-/* Line 1455 of yacc.c */
-#line 1643 "program_parse.y"
+#line 1643 "program/program_parse.y"
{
(yyval.integer) = 0;
;}
break;
case 196:
-
-/* Line 1455 of yacc.c */
-#line 1647 "program_parse.y"
+#line 1647 "program/program_parse.y"
{
(yyval.integer) = (yyvsp[(1) - (1)].integer);
;}
break;
case 197:
-
-/* Line 1455 of yacc.c */
-#line 1653 "program_parse.y"
+#line 1653 "program/program_parse.y"
{
(yyval.integer) = STATE_MATRIX_INVERSE;
;}
break;
case 198:
-
-/* Line 1455 of yacc.c */
-#line 1657 "program_parse.y"
+#line 1657 "program/program_parse.y"
{
(yyval.integer) = STATE_MATRIX_TRANSPOSE;
;}
break;
case 199:
-
-/* Line 1455 of yacc.c */
-#line 1661 "program_parse.y"
+#line 1661 "program/program_parse.y"
{
(yyval.integer) = STATE_MATRIX_INVTRANS;
;}
break;
case 200:
-
-/* Line 1455 of yacc.c */
-#line 1667 "program_parse.y"
+#line 1667 "program/program_parse.y"
{
if ((yyvsp[(1) - (1)].integer) > 3) {
yyerror(& (yylsp[(1) - (1)]), state, "invalid matrix row reference");
@@ -4132,9 +3892,7 @@ yyreduce:
break;
case 201:
-
-/* Line 1455 of yacc.c */
-#line 1678 "program_parse.y"
+#line 1678 "program/program_parse.y"
{
(yyval.state)[0] = STATE_MODELVIEW_MATRIX;
(yyval.state)[1] = (yyvsp[(2) - (2)].integer);
@@ -4142,9 +3900,7 @@ yyreduce:
break;
case 202:
-
-/* Line 1455 of yacc.c */
-#line 1683 "program_parse.y"
+#line 1683 "program/program_parse.y"
{
(yyval.state)[0] = STATE_PROJECTION_MATRIX;
(yyval.state)[1] = 0;
@@ -4152,9 +3908,7 @@ yyreduce:
break;
case 203:
-
-/* Line 1455 of yacc.c */
-#line 1688 "program_parse.y"
+#line 1688 "program/program_parse.y"
{
(yyval.state)[0] = STATE_MVP_MATRIX;
(yyval.state)[1] = 0;
@@ -4162,9 +3916,7 @@ yyreduce:
break;
case 204:
-
-/* Line 1455 of yacc.c */
-#line 1693 "program_parse.y"
+#line 1693 "program/program_parse.y"
{
(yyval.state)[0] = STATE_TEXTURE_MATRIX;
(yyval.state)[1] = (yyvsp[(2) - (2)].integer);
@@ -4172,9 +3924,7 @@ yyreduce:
break;
case 205:
-
-/* Line 1455 of yacc.c */
-#line 1698 "program_parse.y"
+#line 1698 "program/program_parse.y"
{
yyerror(& (yylsp[(1) - (4)]), state, "GL_ARB_matrix_palette not supported");
YYERROR;
@@ -4182,9 +3932,7 @@ yyreduce:
break;
case 206:
-
-/* Line 1455 of yacc.c */
-#line 1703 "program_parse.y"
+#line 1703 "program/program_parse.y"
{
(yyval.state)[0] = STATE_PROGRAM_MATRIX;
(yyval.state)[1] = (yyvsp[(3) - (4)].integer);
@@ -4192,27 +3940,21 @@ yyreduce:
break;
case 207:
-
-/* Line 1455 of yacc.c */
-#line 1710 "program_parse.y"
+#line 1710 "program/program_parse.y"
{
(yyval.integer) = 0;
;}
break;
case 208:
-
-/* Line 1455 of yacc.c */
-#line 1714 "program_parse.y"
+#line 1714 "program/program_parse.y"
{
(yyval.integer) = (yyvsp[(2) - (3)].integer);
;}
break;
case 209:
-
-/* Line 1455 of yacc.c */
-#line 1719 "program_parse.y"
+#line 1719 "program/program_parse.y"
{
/* Since GL_ARB_vertex_blend isn't supported, only modelview matrix
* zero is valid.
@@ -4227,9 +3969,7 @@ yyreduce:
break;
case 210:
-
-/* Line 1455 of yacc.c */
-#line 1732 "program_parse.y"
+#line 1732 "program/program_parse.y"
{
/* Since GL_ARB_matrix_palette isn't supported, just let any value
* through here. The error will be generated later.
@@ -4239,9 +3979,7 @@ yyreduce:
break;
case 211:
-
-/* Line 1455 of yacc.c */
-#line 1740 "program_parse.y"
+#line 1740 "program/program_parse.y"
{
if ((unsigned) (yyvsp[(1) - (1)].integer) >= state->MaxProgramMatrices) {
yyerror(& (yylsp[(1) - (1)]), state, "invalid program matrix selector");
@@ -4253,9 +3991,7 @@ yyreduce:
break;
case 212:
-
-/* Line 1455 of yacc.c */
-#line 1751 "program_parse.y"
+#line 1751 "program/program_parse.y"
{
memset((yyval.state), 0, sizeof((yyval.state)));
(yyval.state)[0] = STATE_DEPTH_RANGE;
@@ -4263,9 +3999,7 @@ yyreduce:
break;
case 217:
-
-/* Line 1455 of yacc.c */
-#line 1763 "program_parse.y"
+#line 1763 "program/program_parse.y"
{
memset((yyval.state), 0, sizeof((yyval.state)));
(yyval.state)[0] = state->state_param_enum;
@@ -4276,9 +4010,7 @@ yyreduce:
break;
case 218:
-
-/* Line 1455 of yacc.c */
-#line 1773 "program_parse.y"
+#line 1773 "program/program_parse.y"
{
(yyval.state)[0] = (yyvsp[(1) - (1)].integer);
(yyval.state)[1] = (yyvsp[(1) - (1)].integer);
@@ -4286,9 +4018,7 @@ yyreduce:
break;
case 219:
-
-/* Line 1455 of yacc.c */
-#line 1778 "program_parse.y"
+#line 1778 "program/program_parse.y"
{
(yyval.state)[0] = (yyvsp[(1) - (3)].integer);
(yyval.state)[1] = (yyvsp[(3) - (3)].integer);
@@ -4296,9 +4026,7 @@ yyreduce:
break;
case 220:
-
-/* Line 1455 of yacc.c */
-#line 1785 "program_parse.y"
+#line 1785 "program/program_parse.y"
{
memset((yyval.state), 0, sizeof((yyval.state)));
(yyval.state)[0] = state->state_param_enum;
@@ -4309,9 +4037,7 @@ yyreduce:
break;
case 221:
-
-/* Line 1455 of yacc.c */
-#line 1795 "program_parse.y"
+#line 1795 "program/program_parse.y"
{
memset((yyval.state), 0, sizeof((yyval.state)));
(yyval.state)[0] = state->state_param_enum;
@@ -4322,9 +4048,7 @@ yyreduce:
break;
case 222:
-
-/* Line 1455 of yacc.c */
-#line 1804 "program_parse.y"
+#line 1804 "program/program_parse.y"
{
(yyval.state)[0] = (yyvsp[(1) - (1)].integer);
(yyval.state)[1] = (yyvsp[(1) - (1)].integer);
@@ -4332,9 +4056,7 @@ yyreduce:
break;
case 223:
-
-/* Line 1455 of yacc.c */
-#line 1809 "program_parse.y"
+#line 1809 "program/program_parse.y"
{
(yyval.state)[0] = (yyvsp[(1) - (3)].integer);
(yyval.state)[1] = (yyvsp[(3) - (3)].integer);
@@ -4342,9 +4064,7 @@ yyreduce:
break;
case 224:
-
-/* Line 1455 of yacc.c */
-#line 1816 "program_parse.y"
+#line 1816 "program/program_parse.y"
{
memset((yyval.state), 0, sizeof((yyval.state)));
(yyval.state)[0] = state->state_param_enum;
@@ -4355,9 +4075,7 @@ yyreduce:
break;
case 225:
-
-/* Line 1455 of yacc.c */
-#line 1826 "program_parse.y"
+#line 1826 "program/program_parse.y"
{
if ((unsigned) (yyvsp[(1) - (1)].integer) >= state->limits->MaxEnvParams) {
yyerror(& (yylsp[(1) - (1)]), state, "invalid environment parameter reference");
@@ -4368,9 +4086,7 @@ yyreduce:
break;
case 226:
-
-/* Line 1455 of yacc.c */
-#line 1836 "program_parse.y"
+#line 1836 "program/program_parse.y"
{
if ((unsigned) (yyvsp[(1) - (1)].integer) >= state->limits->MaxLocalParams) {
yyerror(& (yylsp[(1) - (1)]), state, "invalid local parameter reference");
@@ -4381,9 +4097,7 @@ yyreduce:
break;
case 231:
-
-/* Line 1455 of yacc.c */
-#line 1851 "program_parse.y"
+#line 1851 "program/program_parse.y"
{
(yyval.vector).count = 4;
(yyval.vector).data[0] = (yyvsp[(1) - (1)].real);
@@ -4394,9 +4108,7 @@ yyreduce:
break;
case 232:
-
-/* Line 1455 of yacc.c */
-#line 1861 "program_parse.y"
+#line 1861 "program/program_parse.y"
{
(yyval.vector).count = 1;
(yyval.vector).data[0] = (yyvsp[(1) - (1)].real);
@@ -4407,9 +4119,7 @@ yyreduce:
break;
case 233:
-
-/* Line 1455 of yacc.c */
-#line 1869 "program_parse.y"
+#line 1869 "program/program_parse.y"
{
(yyval.vector).count = 1;
(yyval.vector).data[0] = (float) (yyvsp[(1) - (1)].integer);
@@ -4420,9 +4130,7 @@ yyreduce:
break;
case 234:
-
-/* Line 1455 of yacc.c */
-#line 1879 "program_parse.y"
+#line 1879 "program/program_parse.y"
{
(yyval.vector).count = 4;
(yyval.vector).data[0] = (yyvsp[(2) - (3)].real);
@@ -4433,9 +4141,7 @@ yyreduce:
break;
case 235:
-
-/* Line 1455 of yacc.c */
-#line 1887 "program_parse.y"
+#line 1887 "program/program_parse.y"
{
(yyval.vector).count = 4;
(yyval.vector).data[0] = (yyvsp[(2) - (5)].real);
@@ -4446,9 +4152,7 @@ yyreduce:
break;
case 236:
-
-/* Line 1455 of yacc.c */
-#line 1896 "program_parse.y"
+#line 1896 "program/program_parse.y"
{
(yyval.vector).count = 4;
(yyval.vector).data[0] = (yyvsp[(2) - (7)].real);
@@ -4459,9 +4163,7 @@ yyreduce:
break;
case 237:
-
-/* Line 1455 of yacc.c */
-#line 1905 "program_parse.y"
+#line 1905 "program/program_parse.y"
{
(yyval.vector).count = 4;
(yyval.vector).data[0] = (yyvsp[(2) - (9)].real);
@@ -4472,55 +4174,41 @@ yyreduce:
break;
case 238:
-
-/* Line 1455 of yacc.c */
-#line 1915 "program_parse.y"
+#line 1915 "program/program_parse.y"
{
(yyval.real) = ((yyvsp[(1) - (2)].negate)) ? -(yyvsp[(2) - (2)].real) : (yyvsp[(2) - (2)].real);
;}
break;
case 239:
-
-/* Line 1455 of yacc.c */
-#line 1919 "program_parse.y"
+#line 1919 "program/program_parse.y"
{
(yyval.real) = (float)(((yyvsp[(1) - (2)].negate)) ? -(yyvsp[(2) - (2)].integer) : (yyvsp[(2) - (2)].integer));
;}
break;
case 240:
-
-/* Line 1455 of yacc.c */
-#line 1924 "program_parse.y"
+#line 1924 "program/program_parse.y"
{ (yyval.negate) = FALSE; ;}
break;
case 241:
-
-/* Line 1455 of yacc.c */
-#line 1925 "program_parse.y"
+#line 1925 "program/program_parse.y"
{ (yyval.negate) = TRUE; ;}
break;
case 242:
-
-/* Line 1455 of yacc.c */
-#line 1926 "program_parse.y"
+#line 1926 "program/program_parse.y"
{ (yyval.negate) = FALSE; ;}
break;
case 243:
-
-/* Line 1455 of yacc.c */
-#line 1929 "program_parse.y"
+#line 1929 "program/program_parse.y"
{ (yyval.integer) = (yyvsp[(2) - (2)].integer); ;}
break;
case 245:
-
-/* Line 1455 of yacc.c */
-#line 1933 "program_parse.y"
+#line 1933 "program/program_parse.y"
{
/* NV_fragment_program_option defines the size qualifiers in a
* fairly broken way. "SHORT" or "LONG" can optionally be used
@@ -4557,24 +4245,18 @@ yyreduce:
break;
case 246:
-
-/* Line 1455 of yacc.c */
-#line 1967 "program_parse.y"
+#line 1967 "program/program_parse.y"
{
;}
break;
case 247:
-
-/* Line 1455 of yacc.c */
-#line 1971 "program_parse.y"
+#line 1971 "program/program_parse.y"
{ (yyval.integer) = (yyvsp[(1) - (1)].integer); ;}
break;
case 249:
-
-/* Line 1455 of yacc.c */
-#line 1975 "program_parse.y"
+#line 1975 "program/program_parse.y"
{
if (!declare_variable(state, (yyvsp[(3) - (3)].string), (yyvsp[(0) - (3)].integer), & (yylsp[(3) - (3)]))) {
free((yyvsp[(3) - (3)].string));
@@ -4584,9 +4266,7 @@ yyreduce:
break;
case 250:
-
-/* Line 1455 of yacc.c */
-#line 1982 "program_parse.y"
+#line 1982 "program/program_parse.y"
{
if (!declare_variable(state, (yyvsp[(1) - (1)].string), (yyvsp[(0) - (1)].integer), & (yylsp[(1) - (1)]))) {
free((yyvsp[(1) - (1)].string));
@@ -4596,9 +4276,7 @@ yyreduce:
break;
case 251:
-
-/* Line 1455 of yacc.c */
-#line 1991 "program_parse.y"
+#line 1991 "program/program_parse.y"
{
struct asm_symbol *const s =
declare_variable(state, (yyvsp[(3) - (5)].string), at_output, & (yylsp[(3) - (5)]));
@@ -4613,9 +4291,7 @@ yyreduce:
break;
case 252:
-
-/* Line 1455 of yacc.c */
-#line 2005 "program_parse.y"
+#line 2005 "program/program_parse.y"
{
if (state->mode == ARB_vertex) {
(yyval.result) = VERT_RESULT_HPOS;
@@ -4627,9 +4303,7 @@ yyreduce:
break;
case 253:
-
-/* Line 1455 of yacc.c */
-#line 2014 "program_parse.y"
+#line 2014 "program/program_parse.y"
{
if (state->mode == ARB_vertex) {
(yyval.result) = VERT_RESULT_FOGC;
@@ -4641,18 +4315,14 @@ yyreduce:
break;
case 254:
-
-/* Line 1455 of yacc.c */
-#line 2023 "program_parse.y"
+#line 2023 "program/program_parse.y"
{
(yyval.result) = (yyvsp[(2) - (2)].result);
;}
break;
case 255:
-
-/* Line 1455 of yacc.c */
-#line 2027 "program_parse.y"
+#line 2027 "program/program_parse.y"
{
if (state->mode == ARB_vertex) {
(yyval.result) = VERT_RESULT_PSIZ;
@@ -4664,9 +4334,7 @@ yyreduce:
break;
case 256:
-
-/* Line 1455 of yacc.c */
-#line 2036 "program_parse.y"
+#line 2036 "program/program_parse.y"
{
if (state->mode == ARB_vertex) {
(yyval.result) = VERT_RESULT_TEX0 + (yyvsp[(3) - (3)].integer);
@@ -4678,9 +4346,7 @@ yyreduce:
break;
case 257:
-
-/* Line 1455 of yacc.c */
-#line 2045 "program_parse.y"
+#line 2045 "program/program_parse.y"
{
if (state->mode == ARB_fragment) {
(yyval.result) = FRAG_RESULT_DEPTH;
@@ -4692,18 +4358,14 @@ yyreduce:
break;
case 258:
-
-/* Line 1455 of yacc.c */
-#line 2056 "program_parse.y"
+#line 2056 "program/program_parse.y"
{
(yyval.result) = (yyvsp[(2) - (3)].integer) + (yyvsp[(3) - (3)].integer);
;}
break;
case 259:
-
-/* Line 1455 of yacc.c */
-#line 2062 "program_parse.y"
+#line 2062 "program/program_parse.y"
{
(yyval.integer) = (state->mode == ARB_vertex)
? VERT_RESULT_COL0
@@ -4712,9 +4374,7 @@ yyreduce:
break;
case 260:
-
-/* Line 1455 of yacc.c */
-#line 2068 "program_parse.y"
+#line 2068 "program/program_parse.y"
{
if (state->mode == ARB_vertex) {
(yyval.integer) = VERT_RESULT_COL0;
@@ -4726,9 +4386,7 @@ yyreduce:
break;
case 261:
-
-/* Line 1455 of yacc.c */
-#line 2077 "program_parse.y"
+#line 2077 "program/program_parse.y"
{
if (state->mode == ARB_vertex) {
(yyval.integer) = VERT_RESULT_BFC0;
@@ -4740,18 +4398,14 @@ yyreduce:
break;
case 262:
-
-/* Line 1455 of yacc.c */
-#line 2088 "program_parse.y"
+#line 2088 "program/program_parse.y"
{
(yyval.integer) = 0;
;}
break;
case 263:
-
-/* Line 1455 of yacc.c */
-#line 2092 "program_parse.y"
+#line 2092 "program/program_parse.y"
{
if (state->mode == ARB_vertex) {
(yyval.integer) = 0;
@@ -4763,9 +4417,7 @@ yyreduce:
break;
case 264:
-
-/* Line 1455 of yacc.c */
-#line 2101 "program_parse.y"
+#line 2101 "program/program_parse.y"
{
if (state->mode == ARB_vertex) {
(yyval.integer) = 1;
@@ -4777,93 +4429,67 @@ yyreduce:
break;
case 265:
-
-/* Line 1455 of yacc.c */
-#line 2111 "program_parse.y"
+#line 2111 "program/program_parse.y"
{ (yyval.integer) = 0; ;}
break;
case 266:
-
-/* Line 1455 of yacc.c */
-#line 2112 "program_parse.y"
+#line 2112 "program/program_parse.y"
{ (yyval.integer) = 0; ;}
break;
case 267:
-
-/* Line 1455 of yacc.c */
-#line 2113 "program_parse.y"
+#line 2113 "program/program_parse.y"
{ (yyval.integer) = 1; ;}
break;
case 268:
-
-/* Line 1455 of yacc.c */
-#line 2116 "program_parse.y"
+#line 2116 "program/program_parse.y"
{ (yyval.integer) = 0; ;}
break;
case 269:
-
-/* Line 1455 of yacc.c */
-#line 2117 "program_parse.y"
+#line 2117 "program/program_parse.y"
{ (yyval.integer) = 0; ;}
break;
case 270:
-
-/* Line 1455 of yacc.c */
-#line 2118 "program_parse.y"
+#line 2118 "program/program_parse.y"
{ (yyval.integer) = 1; ;}
break;
case 271:
-
-/* Line 1455 of yacc.c */
-#line 2121 "program_parse.y"
+#line 2121 "program/program_parse.y"
{ (yyval.integer) = 0; ;}
break;
case 272:
-
-/* Line 1455 of yacc.c */
-#line 2122 "program_parse.y"
+#line 2122 "program/program_parse.y"
{ (yyval.integer) = (yyvsp[(2) - (3)].integer); ;}
break;
case 273:
-
-/* Line 1455 of yacc.c */
-#line 2125 "program_parse.y"
+#line 2125 "program/program_parse.y"
{ (yyval.integer) = 0; ;}
break;
case 274:
-
-/* Line 1455 of yacc.c */
-#line 2126 "program_parse.y"
+#line 2126 "program/program_parse.y"
{ (yyval.integer) = (yyvsp[(2) - (3)].integer); ;}
break;
case 275:
-
-/* Line 1455 of yacc.c */
-#line 2129 "program_parse.y"
+#line 2129 "program/program_parse.y"
{ (yyval.integer) = 0; ;}
break;
case 276:
-
-/* Line 1455 of yacc.c */
-#line 2130 "program_parse.y"
+#line 2130 "program/program_parse.y"
{ (yyval.integer) = (yyvsp[(2) - (3)].integer); ;}
break;
case 277:
-
-/* Line 1455 of yacc.c */
-#line 2134 "program_parse.y"
+#line 2134 "program/program_parse.y"
{
if ((unsigned) (yyvsp[(1) - (1)].integer) >= state->MaxTextureCoordUnits) {
yyerror(& (yylsp[(1) - (1)]), state, "invalid texture coordinate unit selector");
@@ -4875,9 +4501,7 @@ yyreduce:
break;
case 278:
-
-/* Line 1455 of yacc.c */
-#line 2145 "program_parse.y"
+#line 2145 "program/program_parse.y"
{
if ((unsigned) (yyvsp[(1) - (1)].integer) >= state->MaxTextureImageUnits) {
yyerror(& (yylsp[(1) - (1)]), state, "invalid texture image unit selector");
@@ -4889,9 +4513,7 @@ yyreduce:
break;
case 279:
-
-/* Line 1455 of yacc.c */
-#line 2156 "program_parse.y"
+#line 2156 "program/program_parse.y"
{
if ((unsigned) (yyvsp[(1) - (1)].integer) >= state->MaxTextureUnits) {
yyerror(& (yylsp[(1) - (1)]), state, "invalid texture unit selector");
@@ -4903,9 +4525,7 @@ yyreduce:
break;
case 280:
-
-/* Line 1455 of yacc.c */
-#line 2167 "program_parse.y"
+#line 2167 "program/program_parse.y"
{
struct asm_symbol *exist = (struct asm_symbol *)
_mesa_symbol_table_find_symbol(state->st, 0, (yyvsp[(2) - (4)].string));
@@ -4932,9 +4552,8 @@ yyreduce:
break;
-
-/* Line 1455 of yacc.c */
-#line 4938 "program_parse.tab.c"
+/* Line 1267 of yacc.c. */
+#line 4557 "program/program_parse.tab.c"
default: break;
}
YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
@@ -5010,7 +4629,7 @@ yyerrlab:
if (yyerrstatus == 3)
{
- /* If just tried and failed to reuse lookahead token after an
+ /* If just tried and failed to reuse look-ahead token after an
error, discard it. */
if (yychar <= YYEOF)
@@ -5027,7 +4646,7 @@ yyerrlab:
}
}
- /* Else will try to reuse lookahead token after shifting the error
+ /* Else will try to reuse look-ahead token after shifting the error
token. */
goto yyerrlab1;
@@ -5085,11 +4704,14 @@ yyerrlab1:
YY_STACK_PRINT (yyss, yyssp);
}
+ if (yyn == YYFINAL)
+ YYACCEPT;
+
*++yyvsp = yylval;
yyerror_range[1] = yylloc;
/* Using YYLLOC is tempting, but would change the location of
- the lookahead. YYLOC is available though. */
+ the look-ahead. YYLOC is available though. */
YYLLOC_DEFAULT (yyloc, (yyerror_range - 1), 2);
*++yylsp = yyloc;
@@ -5114,7 +4736,7 @@ yyabortlab:
yyresult = 1;
goto yyreturn;
-#if !defined(yyoverflow) || YYERROR_VERBOSE
+#ifndef yyoverflow
/*-------------------------------------------------.
| yyexhaustedlab -- memory exhaustion comes here. |
`-------------------------------------------------*/
@@ -5125,7 +4747,7 @@ yyexhaustedlab:
#endif
yyreturn:
- if (yychar != YYEMPTY)
+ if (yychar != YYEOF && yychar != YYEMPTY)
yydestruct ("Cleanup: discarding lookahead",
yytoken, &yylval, &yylloc, state);
/* Do not reclaim the symbols of the rule which action triggered
@@ -5151,9 +4773,7 @@ yyreturn:
}
-
-/* Line 1675 of yacc.c */
-#line 2196 "program_parse.y"
+#line 2196 "program/program_parse.y"
void
diff --git a/src/mesa/program/program_parse.tab.h b/src/mesa/program/program_parse.tab.h
index 045241d9e77..1b30f941396 100644
--- a/src/mesa/program/program_parse.tab.h
+++ b/src/mesa/program/program_parse.tab.h
@@ -1,23 +1,24 @@
-
-/* A Bison parser, made by GNU Bison 2.4.1. */
+/* A Bison parser, made by GNU Bison 2.3. */
/* Skeleton interface for Bison's Yacc-like parsers in C
-
- Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+
+ Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
Free Software Foundation, Inc.
-
- This program is free software: you can redistribute it and/or modify
+
+ This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>. */
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA. */
/* As a special exception, you may create a larger work that contains
part or all of the Bison parser skeleton and distribute that work
@@ -28,11 +29,10 @@
special exception, which will cause the skeleton and the resulting
Bison output files to be licensed under the GNU General Public
License without this special exception.
-
+
This special exception was added by the Free Software Foundation in
version 2.2 of Bison. */
-
/* Tokens. */
#ifndef YYTOKENTYPE
# define YYTOKENTYPE
@@ -146,16 +146,120 @@
DOT = 362
};
#endif
+/* Tokens. */
+#define ARBvp_10 258
+#define ARBfp_10 259
+#define ADDRESS 260
+#define ALIAS 261
+#define ATTRIB 262
+#define OPTION 263
+#define OUTPUT 264
+#define PARAM 265
+#define TEMP 266
+#define END 267
+#define BIN_OP 268
+#define BINSC_OP 269
+#define SAMPLE_OP 270
+#define SCALAR_OP 271
+#define TRI_OP 272
+#define VECTOR_OP 273
+#define ARL 274
+#define KIL 275
+#define SWZ 276
+#define TXD_OP 277
+#define INTEGER 278
+#define REAL 279
+#define AMBIENT 280
+#define ATTENUATION 281
+#define BACK 282
+#define CLIP 283
+#define COLOR 284
+#define DEPTH 285
+#define DIFFUSE 286
+#define DIRECTION 287
+#define EMISSION 288
+#define ENV 289
+#define EYE 290
+#define FOG 291
+#define FOGCOORD 292
+#define FRAGMENT 293
+#define FRONT 294
+#define HALF 295
+#define INVERSE 296
+#define INVTRANS 297
+#define LIGHT 298
+#define LIGHTMODEL 299
+#define LIGHTPROD 300
+#define LOCAL 301
+#define MATERIAL 302
+#define MAT_PROGRAM 303
+#define MATRIX 304
+#define MATRIXINDEX 305
+#define MODELVIEW 306
+#define MVP 307
+#define NORMAL 308
+#define OBJECT 309
+#define PALETTE 310
+#define PARAMS 311
+#define PLANE 312
+#define POINT_TOK 313
+#define POINTSIZE 314
+#define POSITION 315
+#define PRIMARY 316
+#define PROGRAM 317
+#define PROJECTION 318
+#define RANGE 319
+#define RESULT 320
+#define ROW 321
+#define SCENECOLOR 322
+#define SECONDARY 323
+#define SHININESS 324
+#define SIZE_TOK 325
+#define SPECULAR 326
+#define SPOT 327
+#define STATE 328
+#define TEXCOORD 329
+#define TEXENV 330
+#define TEXGEN 331
+#define TEXGEN_Q 332
+#define TEXGEN_R 333
+#define TEXGEN_S 334
+#define TEXGEN_T 335
+#define TEXTURE 336
+#define TRANSPOSE 337
+#define TEXTURE_UNIT 338
+#define TEX_1D 339
+#define TEX_2D 340
+#define TEX_3D 341
+#define TEX_CUBE 342
+#define TEX_RECT 343
+#define TEX_SHADOW1D 344
+#define TEX_SHADOW2D 345
+#define TEX_SHADOWRECT 346
+#define TEX_ARRAY1D 347
+#define TEX_ARRAY2D 348
+#define TEX_ARRAYSHADOW1D 349
+#define TEX_ARRAYSHADOW2D 350
+#define VERTEX 351
+#define VTXATTRIB 352
+#define WEIGHT 353
+#define IDENTIFIER 354
+#define USED_IDENTIFIER 355
+#define MASK4 356
+#define MASK3 357
+#define MASK2 358
+#define MASK1 359
+#define SWIZZLE 360
+#define DOT_DOT 361
+#define DOT 362
+
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
typedef union YYSTYPE
+#line 126 "program/program_parse.y"
{
-
-/* Line 1676 of yacc.c */
-#line 126 "program_parse.y"
-
struct asm_instruction *inst;
struct asm_symbol *sym;
struct asm_symbol temp_sym;
@@ -179,15 +283,13 @@ typedef union YYSTYPE
unsigned xyzw_valid:1;
unsigned negate:1;
} ext_swizzle;
-
-
-
-/* Line 1676 of yacc.c */
-#line 187 "program_parse.tab.h"
-} YYSTYPE;
-# define YYSTYPE_IS_TRIVIAL 1
+}
+/* Line 1529 of yacc.c. */
+#line 289 "program/program_parse.tab.h"
+ YYSTYPE;
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1
+# define YYSTYPE_IS_TRIVIAL 1
#endif
@@ -206,4 +308,3 @@ typedef struct YYLTYPE
#endif
-
diff --git a/src/mesa/program/program_parse.y b/src/mesa/program/program_parse.y
index 784ea28c17a..19aa8ccdb53 100644
--- a/src/mesa/program/program_parse.y
+++ b/src/mesa/program/program_parse.y
@@ -935,7 +935,7 @@ addrRegRelOffset: { $$ = 0; }
addrRegPosOffset: INTEGER
{
- if (($1 < 0) || ($1 > 4095)) {
+ if (($1 < 0) || ($1 > (state->limits->MaxAddressOffset - 1))) {
char s[100];
_mesa_snprintf(s, sizeof(s),
"relative address offset too large (%d)", $1);
@@ -949,7 +949,7 @@ addrRegPosOffset: INTEGER
addrRegNegOffset: INTEGER
{
- if (($1 < 0) || ($1 > 4096)) {
+ if (($1 < 0) || ($1 > state->limits->MaxAddressOffset)) {
char s[100];
_mesa_snprintf(s, sizeof(s),
"relative address offset too large (%d)", $1);
diff --git a/src/mesa/program/register_allocate.c b/src/mesa/program/register_allocate.c
index ada6e356419..95a9bde401a 100644
--- a/src/mesa/program/register_allocate.c
+++ b/src/mesa/program/register_allocate.c
@@ -30,7 +30,7 @@
* Graph-coloring register allocator.
*/
-#include <talloc.h>
+#include <ralloc.h>
#include "main/imports.h"
#include "main/macros.h"
@@ -38,8 +38,10 @@
#include "register_allocate.h"
struct ra_reg {
- char *name;
GLboolean *conflicts;
+ unsigned int *conflict_list;
+ unsigned int conflict_list_size;
+ unsigned int num_conflicts;
};
struct ra_regs {
@@ -68,6 +70,7 @@ struct ra_class {
struct ra_node {
GLboolean *adjacency;
+ unsigned int *adjacency_list;
unsigned int class;
unsigned int adjacency_count;
unsigned int reg;
@@ -93,23 +96,44 @@ ra_alloc_reg_set(unsigned int count)
unsigned int i;
struct ra_regs *regs;
- regs = talloc_zero(NULL, struct ra_regs);
+ regs = rzalloc(NULL, struct ra_regs);
regs->count = count;
- regs->regs = talloc_zero_array(regs, struct ra_reg, count);
+ regs->regs = rzalloc_array(regs, struct ra_reg, count);
for (i = 0; i < count; i++) {
- regs->regs[i].conflicts = talloc_zero_array(regs->regs, GLboolean, count);
+ regs->regs[i].conflicts = rzalloc_array(regs->regs, GLboolean, count);
regs->regs[i].conflicts[i] = GL_TRUE;
+
+ regs->regs[i].conflict_list = ralloc_array(regs->regs, unsigned int, 4);
+ regs->regs[i].conflict_list_size = 4;
+ regs->regs[i].conflict_list[0] = i;
+ regs->regs[i].num_conflicts = 1;
}
return regs;
}
+static void
+ra_add_conflict_list(struct ra_regs *regs, unsigned int r1, unsigned int r2)
+{
+ struct ra_reg *reg1 = &regs->regs[r1];
+
+ if (reg1->conflict_list_size == reg1->num_conflicts) {
+ reg1->conflict_list_size *= 2;
+ reg1->conflict_list = reralloc(regs->regs, reg1->conflict_list,
+ unsigned int, reg1->conflict_list_size);
+ }
+ reg1->conflict_list[reg1->num_conflicts++] = r2;
+ reg1->conflicts[r2] = GL_TRUE;
+}
+
void
ra_add_reg_conflict(struct ra_regs *regs, unsigned int r1, unsigned int r2)
{
- regs->regs[r1].conflicts[r2] = GL_TRUE;
- regs->regs[r2].conflicts[r1] = GL_TRUE;
+ if (!regs->regs[r1].conflicts[r2]) {
+ ra_add_conflict_list(regs, r1, r2);
+ ra_add_conflict_list(regs, r2, r1);
+ }
}
unsigned int
@@ -117,14 +141,13 @@ ra_alloc_reg_class(struct ra_regs *regs)
{
struct ra_class *class;
- regs->classes = talloc_realloc(regs, regs->classes,
- struct ra_class *,
- regs->class_count + 1);
+ regs->classes = reralloc(regs->regs, regs->classes, struct ra_class *,
+ regs->class_count + 1);
- class = talloc_zero(regs, struct ra_class);
+ class = rzalloc(regs, struct ra_class);
regs->classes[regs->class_count] = class;
- class->regs = talloc_zero_array(class, GLboolean, regs->count);
+ class->regs = rzalloc_array(class, GLboolean, regs->count);
return regs->class_count++;
}
@@ -148,7 +171,7 @@ ra_set_finalize(struct ra_regs *regs)
unsigned int b, c;
for (b = 0; b < regs->class_count; b++) {
- regs->classes[b]->q = talloc_array(regs, unsigned int, regs->class_count);
+ regs->classes[b]->q = ralloc_array(regs, unsigned int, regs->class_count);
}
/* Compute, for each class B and C, how many regs of B an
@@ -160,15 +183,15 @@ ra_set_finalize(struct ra_regs *regs)
int max_conflicts = 0;
for (rc = 0; rc < regs->count; rc++) {
- unsigned int rb;
int conflicts = 0;
+ int i;
if (!regs->classes[c]->regs[rc])
continue;
- for (rb = 0; rb < regs->count; rb++) {
- if (regs->classes[b]->regs[rb] &&
- regs->regs[rb].conflicts[rc])
+ for (i = 0; i < regs->regs[rc].num_conflicts; i++) {
+ unsigned int rb = regs->regs[rc].conflict_list[i];
+ if (regs->classes[b]->regs[rb])
conflicts++;
}
max_conflicts = MAX2(max_conflicts, conflicts);
@@ -178,22 +201,32 @@ ra_set_finalize(struct ra_regs *regs)
}
}
+static void
+ra_add_node_adjacency(struct ra_graph *g, unsigned int n1, unsigned int n2)
+{
+ g->nodes[n1].adjacency[n2] = GL_TRUE;
+ g->nodes[n1].adjacency_list[g->nodes[n1].adjacency_count] = n2;
+ g->nodes[n1].adjacency_count++;
+}
+
struct ra_graph *
ra_alloc_interference_graph(struct ra_regs *regs, unsigned int count)
{
struct ra_graph *g;
unsigned int i;
- g = talloc_zero(regs, struct ra_graph);
+ g = rzalloc(regs, struct ra_graph);
g->regs = regs;
- g->nodes = talloc_zero_array(g, struct ra_node, count);
+ g->nodes = rzalloc_array(g, struct ra_node, count);
g->count = count;
- g->stack = talloc_zero_array(g, unsigned int, count);
+ g->stack = rzalloc_array(g, unsigned int, count);
for (i = 0; i < count; i++) {
- g->nodes[i].adjacency = talloc_zero_array(g, GLboolean, count);
- g->nodes[i].adjacency[i] = GL_TRUE;
+ g->nodes[i].adjacency = rzalloc_array(g, GLboolean, count);
+ g->nodes[i].adjacency_list = ralloc_array(g, unsigned int, count);
+ g->nodes[i].adjacency_count = 0;
+ ra_add_node_adjacency(g, i, i);
g->nodes[i].reg = ~0;
}
@@ -211,13 +244,10 @@ void
ra_add_node_interference(struct ra_graph *g,
unsigned int n1, unsigned int n2)
{
- if (g->nodes[n1].adjacency[n2])
- return;
-
- g->nodes[n1].adjacency[n2] = GL_TRUE;
- g->nodes[n2].adjacency_count++;
- g->nodes[n2].adjacency[n1] = GL_TRUE;
- g->nodes[n2].adjacency_count++;
+ if (!g->nodes[n1].adjacency[n2]) {
+ ra_add_node_adjacency(g, n1, n2);
+ ra_add_node_adjacency(g, n2, n1);
+ }
}
static GLboolean pq_test(struct ra_graph *g, unsigned int n)
@@ -226,13 +256,12 @@ static GLboolean pq_test(struct ra_graph *g, unsigned int n)
unsigned int q = 0;
int n_class = g->nodes[n].class;
- for (j = 0; j < g->count; j++) {
- if (j == n || g->nodes[j].in_stack)
- continue;
+ for (j = 0; j < g->nodes[n].adjacency_count; j++) {
+ unsigned int n2 = g->nodes[n].adjacency_list[j];
+ unsigned int n2_class = g->nodes[n2].class;
- if (g->nodes[n].adjacency[j]) {
- unsigned int j_class = g->nodes[j].class;
- q += g->regs->classes[n_class]->q[j_class];
+ if (n != n2 && !g->nodes[n2].in_stack) {
+ q += g->regs->classes[n_class]->q[n2_class];
}
}
@@ -303,14 +332,15 @@ ra_select(struct ra_graph *g)
continue;
/* Check if any of our neighbors conflict with this register choice. */
- for (i = 0; i < g->count; i++) {
- if (g->nodes[n].adjacency[i] &&
- !g->nodes[i].in_stack &&
- g->regs->regs[r].conflicts[g->nodes[i].reg]) {
+ for (i = 0; i < g->nodes[n].adjacency_count; i++) {
+ unsigned int n2 = g->nodes[n].adjacency_list[i];
+
+ if (!g->nodes[n2].in_stack &&
+ g->regs->regs[r].conflicts[g->nodes[n2].reg]) {
break;
}
}
- if (i == g->count)
+ if (i == g->nodes[n].adjacency_count)
break;
}
if (r == g->regs->count)
@@ -368,17 +398,17 @@ ra_get_spill_benefit(struct ra_graph *g, unsigned int n)
float benefit = 0;
int n_class = g->nodes[n].class;
- /* Define the benefit of eliminating an interference between n, j
+ /* Define the benefit of eliminating an interference between n, n2
* through spilling as q(C, B) / p(C). This is similar to the
* "count number of edges" approach of traditional graph coloring,
* but takes classes into account.
*/
- for (j = 0; j < g->count; j++) {
- if (j != n && g->nodes[n].adjacency[j]) {
- unsigned int j_class = g->nodes[j].class;
- benefit += ((float)g->regs->classes[n_class]->q[j_class] /
+ for (j = 0; j < g->nodes[n].adjacency_count; j++) {
+ unsigned int n2 = g->nodes[n].adjacency_list[j];
+ if (n != n2) {
+ unsigned int n2_class = g->nodes[n2].class;
+ benefit += ((float)g->regs->classes[n_class]->q[n2_class] /
g->regs->classes[n_class]->p);
- break;
}
}
diff --git a/src/mesa/program/sampler.cpp b/src/mesa/program/sampler.cpp
index 9a813c87955..1457d1199fa 100644
--- a/src/mesa/program/sampler.cpp
+++ b/src/mesa/program/sampler.cpp
@@ -23,7 +23,6 @@
* DEALINGS IN THE SOFTWARE.
*/
-#include <cstdio>
#include "ir.h"
#include "glsl_types.h"
#include "ir_visitor.h"
@@ -40,7 +39,7 @@ static void fail_link(struct gl_shader_program *prog, const char *fmt, ...)
{
va_list args;
va_start(args, fmt);
- prog->InfoLog = talloc_vasprintf_append(prog->InfoLog, fmt, args);
+ ralloc_vasprintf_append(&prog->InfoLog, fmt, args);
va_end(args);
prog->LinkStatus = GL_FALSE;
@@ -52,7 +51,7 @@ public:
get_sampler_name(ir_dereference *last,
struct gl_shader_program *shader_program)
{
- this->mem_ctx = talloc_new(NULL);
+ this->mem_ctx = ralloc_context(NULL);
this->shader_program = shader_program;
this->name = NULL;
this->offset = 0;
@@ -61,7 +60,7 @@ public:
~get_sampler_name()
{
- talloc_free(this->mem_ctx);
+ ralloc_free(this->mem_ctx);
}
virtual ir_visitor_status visit(ir_dereference_variable *ir)
@@ -72,7 +71,7 @@ public:
virtual ir_visitor_status visit_leave(ir_dereference_record *ir)
{
- this->name = talloc_asprintf(mem_ctx, "%s.%s", name, ir->field);
+ this->name = ralloc_asprintf(mem_ctx, "%s.%s", name, ir->field);
return visit_continue;
}
@@ -91,16 +90,14 @@ public:
* all that would work would be an unrolled loop counter that ends
* up being constant above.
*/
- shader_program->InfoLog =
- talloc_asprintf_append(shader_program->InfoLog,
- "warning: Variable sampler array index "
- "unsupported.\nThis feature of the language "
- "was removed in GLSL 1.20 and is unlikely "
- "to be supported for 1.10 in Mesa.\n");
+ ralloc_strcat(&shader_program->InfoLog,
+ "warning: Variable sampler array index unsupported.\n"
+ "This feature of the language was removed in GLSL 1.20 "
+ "and is unlikely to be supported for 1.10 in Mesa.\n");
i = 0;
}
if (ir != last) {
- this->name = talloc_asprintf(mem_ctx, "%s[%d]", name, i);
+ this->name = ralloc_asprintf(mem_ctx, "%s[%d]", name, i);
} else {
offset = i;
}
diff --git a/src/mesa/sources.mak b/src/mesa/sources.mak
index 9a78a23aa7e..fcf8ab2e794 100644
--- a/src/mesa/sources.mak
+++ b/src/mesa/sources.mak
@@ -59,6 +59,7 @@ MAIN_SOURCES = \
main/multisample.c \
main/nvprogram.c \
main/pack.c \
+ main/pbo.c \
main/pixel.c \
main/pixelstore.c \
main/pixeltransfer.c \
@@ -78,10 +79,10 @@ MAIN_SOURCES = \
main/stencil.c \
main/syncobj.c \
main/texcompress.c \
+ main/texcompress_rgtc.c \
main/texcompress_s3tc.c \
main/texcompress_fxt1.c \
main/texenv.c \
- main/texenvprogram.c \
main/texfetch.c \
main/texformat.c \
main/texgen.c \
@@ -93,6 +94,7 @@ MAIN_SOURCES = \
main/texrender.c \
main/texstate.c \
main/texstore.c \
+ main/texturebarrier.c \
main/transformfeedback.c \
main/uniforms.c \
main/varray.c \
@@ -101,6 +103,9 @@ MAIN_SOURCES = \
main/vtxfmt.c \
$(MAIN_ES_SOURCES)
+MAIN_CXX_SOURCES = \
+ main/ff_fragment_shader.cpp
+
MATH_SOURCES = \
math/m_debug_clip.c \
math/m_debug_norm.c \
@@ -213,8 +218,10 @@ STATETRACKER_SOURCES = \
state_tracker/st_cb_queryobj.c \
state_tracker/st_cb_rasterpos.c \
state_tracker/st_cb_readpixels.c \
+ state_tracker/st_cb_syncobj.c \
state_tracker/st_cb_strings.c \
state_tracker/st_cb_texture.c \
+ state_tracker/st_cb_texturebarrier.c \
state_tracker/st_cb_viewport.c \
state_tracker/st_cb_xformfb.c \
state_tracker/st_context.c \
@@ -252,6 +259,7 @@ PROGRAM_SOURCES = \
program/register_allocate.c \
program/symbol_table.c
+
SHADER_CXX_SOURCES = \
program/ir_to_mesa.cpp \
program/sampler.cpp
@@ -312,7 +320,8 @@ MESA_SOURCES = \
$(ASM_C_SOURCES)
MESA_CXX_SOURCES = \
- $(SHADER_CXX_SOURCES)
+ $(MAIN_CXX_SOURCES) \
+ $(SHADER_CXX_SOURCES)
# Sources for building Gallium drivers
MESA_GALLIUM_SOURCES = \
@@ -325,7 +334,8 @@ MESA_GALLIUM_SOURCES = \
x86/common_x86.c
MESA_GALLIUM_CXX_SOURCES = \
- $(SHADER_CXX_SOURCES)
+ $(MAIN_CXX_SOURCES) \
+ $(SHADER_CXX_SOURCES)
# All the core C sources, for dependency checking
ALL_SOURCES = \
diff --git a/src/mesa/state_tracker/st_atom.c b/src/mesa/state_tracker/st_atom.c
index e29ab46ef99..bf160fe1080 100644
--- a/src/mesa/state_tracker/st_atom.c
+++ b/src/mesa/state_tracker/st_atom.c
@@ -147,7 +147,11 @@ void st_validate_state( struct st_context *st )
/*printf("%s %x/%x\n", __FUNCTION__, state->mesa, state->st);*/
+#ifdef NDEBUG
+ if (0) {
+#else
if (1) {
+#endif
/* Debug version which enforces various sanity checks on the
* state flags which are generated and checked to help ensure
* state atoms are ordered correctly in the list.
diff --git a/src/mesa/state_tracker/st_atom_blend.c b/src/mesa/state_tracker/st_atom_blend.c
index a8ec4adce77..fb1c7a4efee 100644
--- a/src/mesa/state_tracker/st_atom_blend.c
+++ b/src/mesa/state_tracker/st_atom_blend.c
@@ -169,13 +169,18 @@ colormask_per_rt(struct gl_context *ctx)
}
/**
- * Figure out if blend enables are different per rt.
+ * Figure out if blend enables/state are different per rt.
*/
static GLboolean
blend_per_rt(struct gl_context *ctx)
{
if (ctx->Color.BlendEnabled &&
(ctx->Color.BlendEnabled != ((1 << ctx->Const.MaxDrawBuffers) - 1))) {
+ /* This can only happen if GL_EXT_draw_buffers2 is enabled */
+ return GL_TRUE;
+ }
+ if (ctx->Color._BlendFuncPerBuffer || ctx->Color._BlendEquationPerBuffer) {
+ /* this can only happen if GL_ARB_draw_buffers_blend is enabled */
return GL_TRUE;
}
return GL_FALSE;
@@ -186,7 +191,7 @@ update_blend( struct st_context *st )
{
struct pipe_blend_state *blend = &st->state.blend;
unsigned num_state = 1;
- unsigned i;
+ unsigned i, j;
memset(blend, 0, sizeof(*blend));
@@ -202,39 +207,50 @@ update_blend( struct st_context *st )
don't happen. */
if (st->ctx->Color.ColorLogicOpEnabled ||
(st->ctx->Color.BlendEnabled &&
- st->ctx->Color.BlendEquationRGB == GL_LOGIC_OP)) {
+ st->ctx->Color.Blend[0].EquationRGB == GL_LOGIC_OP)) {
/* logicop enabled */
blend->logicop_enable = 1;
blend->logicop_func = translate_logicop(st->ctx->Color.LogicOp);
}
else if (st->ctx->Color.BlendEnabled) {
/* blending enabled */
- for (i = 0; i < num_state; i++) {
+ for (i = 0, j = 0; i < num_state; i++) {
blend->rt[i].blend_enable = (st->ctx->Color.BlendEnabled >> i) & 0x1;
- blend->rt[i].rgb_func = translate_blend(st->ctx->Color.BlendEquationRGB);
- if (st->ctx->Color.BlendEquationRGB == GL_MIN ||
- st->ctx->Color.BlendEquationRGB == GL_MAX) {
+ if (st->ctx->Extensions.ARB_draw_buffers_blend)
+ j = i;
+
+ blend->rt[i].rgb_func =
+ translate_blend(st->ctx->Color.Blend[j].EquationRGB);
+
+ if (st->ctx->Color.Blend[i].EquationRGB == GL_MIN ||
+ st->ctx->Color.Blend[i].EquationRGB == GL_MAX) {
/* Min/max are special */
blend->rt[i].rgb_src_factor = PIPE_BLENDFACTOR_ONE;
blend->rt[i].rgb_dst_factor = PIPE_BLENDFACTOR_ONE;
}
else {
- blend->rt[i].rgb_src_factor = translate_blend(st->ctx->Color.BlendSrcRGB);
- blend->rt[i].rgb_dst_factor = translate_blend(st->ctx->Color.BlendDstRGB);
+ blend->rt[i].rgb_src_factor =
+ translate_blend(st->ctx->Color.Blend[j].SrcRGB);
+ blend->rt[i].rgb_dst_factor =
+ translate_blend(st->ctx->Color.Blend[j].DstRGB);
}
- blend->rt[i].alpha_func = translate_blend(st->ctx->Color.BlendEquationA);
- if (st->ctx->Color.BlendEquationA == GL_MIN ||
- st->ctx->Color.BlendEquationA == GL_MAX) {
+ blend->rt[i].alpha_func =
+ translate_blend(st->ctx->Color.Blend[j].EquationA);
+
+ if (st->ctx->Color.Blend[i].EquationA == GL_MIN ||
+ st->ctx->Color.Blend[i].EquationA == GL_MAX) {
/* Min/max are special */
blend->rt[i].alpha_src_factor = PIPE_BLENDFACTOR_ONE;
blend->rt[i].alpha_dst_factor = PIPE_BLENDFACTOR_ONE;
}
else {
- blend->rt[i].alpha_src_factor = translate_blend(st->ctx->Color.BlendSrcA);
- blend->rt[i].alpha_dst_factor = translate_blend(st->ctx->Color.BlendDstA);
+ blend->rt[i].alpha_src_factor =
+ translate_blend(st->ctx->Color.Blend[j].SrcA);
+ blend->rt[i].alpha_dst_factor =
+ translate_blend(st->ctx->Color.Blend[j].DstA);
}
}
}
diff --git a/src/mesa/state_tracker/st_atom_constbuf.c b/src/mesa/state_tracker/st_atom_constbuf.c
index f1d08a3e166..05667a74305 100644
--- a/src/mesa/state_tracker/st_atom_constbuf.c
+++ b/src/mesa/state_tracker/st_atom_constbuf.c
@@ -56,7 +56,6 @@ void st_upload_constants( struct st_context *st,
unsigned shader_type)
{
struct pipe_context *pipe = st->pipe;
- struct pipe_resource **cbuf = &st->state.constants[shader_type];
assert(shader_type == PIPE_SHADER_VERTEX ||
shader_type == PIPE_SHADER_FRAGMENT ||
@@ -64,6 +63,7 @@ void st_upload_constants( struct st_context *st,
/* update constants */
if (params && params->NumParameters) {
+ struct pipe_resource *cbuf;
const uint paramBytes = params->NumParameters * sizeof(GLfloat) * 4;
/* Update the constants which come from fixed-function state, such as
@@ -75,11 +75,12 @@ 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.
+ * Let's use a user buffer to avoid an unnecessary copy.
*/
- pipe_resource_reference(cbuf, NULL );
- *cbuf = pipe_buffer_create(pipe->screen,
- PIPE_BIND_CONSTANT_BUFFER,
- paramBytes );
+ cbuf = pipe_user_buffer_create(pipe->screen,
+ params->ParameterValues,
+ paramBytes,
+ PIPE_BIND_CONSTANT_BUFFER);
if (ST_DEBUG & DEBUG_CONSTANTS) {
debug_printf("%s(shader=%d, numParams=%d, stateFlags=0x%x)\n",
@@ -88,17 +89,15 @@ void st_upload_constants( struct st_context *st,
_mesa_print_parameter_list(params);
}
- /* load Mesa constants into the constant buffer */
- pipe_buffer_write(st->pipe, *cbuf,
- 0, paramBytes,
- params->ParameterValues);
+ st->pipe->set_constant_buffer(st->pipe, shader_type, 0, cbuf);
+ pipe_resource_reference(&cbuf, NULL);
- st->pipe->set_constant_buffer(st->pipe, shader_type, 0, *cbuf);
+ st->state.constants[shader_type].ptr = params->ParameterValues;
+ st->state.constants[shader_type].size = paramBytes;
}
- else if (*cbuf) {
- st->constants.tracked_state[shader_type].dirty.mesa = 0x0;
-
- pipe_resource_reference(cbuf, NULL);
+ else if (st->state.constants[shader_type].ptr) {
+ st->state.constants[shader_type].ptr = NULL;
+ st->state.constants[shader_type].size = 0;
st->pipe->set_constant_buffer(st->pipe, shader_type, 0, NULL);
}
}
diff --git a/src/mesa/state_tracker/st_atom_framebuffer.c b/src/mesa/state_tracker/st_atom_framebuffer.c
index 2843b7b1764..76386fe017a 100644
--- a/src/mesa/state_tracker/st_atom_framebuffer.c
+++ b/src/mesa/state_tracker/st_atom_framebuffer.c
@@ -39,7 +39,7 @@
#include "cso_cache/cso_context.h"
#include "util/u_math.h"
#include "util/u_inlines.h"
-
+#include "util/u_format.h"
/**
@@ -55,8 +55,10 @@ update_renderbuffer_surface(struct st_context *st,
struct pipe_resource *resource = strb->rtt->pt;
int rtt_width = strb->Base.Width;
int rtt_height = strb->Base.Height;
+ enum pipe_format format = st->ctx->Color.sRGBEnabled ? resource->format : util_format_linear(resource->format);
if (!strb->surface ||
+ strb->surface->format != format ||
strb->surface->texture != resource ||
strb->surface->width != rtt_width ||
strb->surface->height != rtt_height) {
@@ -67,7 +69,7 @@ update_renderbuffer_surface(struct st_context *st,
u_minify(resource->height0, level) == rtt_height) {
struct pipe_surface surf_tmpl;
memset(&surf_tmpl, 0, sizeof(surf_tmpl));
- surf_tmpl.format = resource->format;
+ surf_tmpl.format = format;
surf_tmpl.usage = PIPE_BIND_RENDER_TARGET;
surf_tmpl.u.tex.level = level;
surf_tmpl.u.tex.first_layer = strb->rtt_face + strb->rtt_slice;
diff --git a/src/mesa/state_tracker/st_atom_pixeltransfer.c b/src/mesa/state_tracker/st_atom_pixeltransfer.c
index 378b30e57cc..9557adc2d8b 100644
--- a/src/mesa/state_tracker/st_atom_pixeltransfer.c
+++ b/src/mesa/state_tracker/st_atom_pixeltransfer.c
@@ -99,7 +99,7 @@ create_color_map_texture(struct gl_context *ctx)
/* create texture for color map/table */
pt = st_texture_create(st, PIPE_TEXTURE_2D, format, 0,
- texSize, texSize, 1, PIPE_BIND_SAMPLER_VIEW);
+ texSize, texSize, 1, 1, PIPE_BIND_SAMPLER_VIEW);
return pt;
}
@@ -187,7 +187,7 @@ get_pixel_transfer_program(struct gl_context *ctx, const struct state_key *key)
inst[ic].TexSrcTarget = TEXTURE_2D_INDEX;
ic++;
fp->Base.InputsRead = (1 << FRAG_ATTRIB_TEX0);
- fp->Base.OutputsWritten = (1 << FRAG_RESULT_COLOR);
+ fp->Base.OutputsWritten = BITFIELD64_BIT(FRAG_RESULT_COLOR);
fp->Base.SamplersUsed = 0x1; /* sampler 0 (bit 0) is used */
if (key->scaleAndBias) {
diff --git a/src/mesa/state_tracker/st_atom_rasterizer.c b/src/mesa/state_tracker/st_atom_rasterizer.c
index f92ca13d5e4..8bccceeec53 100644
--- a/src/mesa/state_tracker/st_atom_rasterizer.c
+++ b/src/mesa/state_tracker/st_atom_rasterizer.c
@@ -70,14 +70,16 @@ static void update_raster_state( struct st_context *st )
{
raster->front_ccw = (ctx->Polygon.FrontFace == GL_CCW);
- /* XXX
- * I think the intention here is that user-created framebuffer objects
- * use Y=0=TOP layout instead of OpenGL's normal Y=0=bottom layout.
- * Flipping Y changes CW to CCW and vice-versa.
- * But this is an implementation/driver-specific artifact - remove...
+ /*
+ * Gallium's surfaces are Y=0=TOP orientation. OpenGL is the
+ * opposite. Window system surfaces are Y=0=TOP. Mesa's FBOs
+ * must match OpenGL conventions so FBOs use Y=0=BOTTOM. In that
+ * case, we must invert Y and flip the notion of front vs. back.
*/
- if (ctx->DrawBuffer && ctx->DrawBuffer->Name != 0)
+ if (st_fb_orientation(ctx->DrawBuffer) == Y_0_BOTTOM) {
+ /* Drawing to an FBO. The viewport will be inverted. */
raster->front_ccw ^= 1;
+ }
}
/* _NEW_LIGHT
diff --git a/src/mesa/state_tracker/st_atom_sampler.c b/src/mesa/state_tracker/st_atom_sampler.c
index b67068df373..474cbd5897d 100644
--- a/src/mesa/state_tracker/st_atom_sampler.c
+++ b/src/mesa/state_tracker/st_atom_sampler.c
@@ -36,6 +36,7 @@
#include "st_context.h"
#include "st_cb_texture.h"
+#include "st_format.h"
#include "st_atom.h"
#include "pipe/p_context.h"
#include "pipe/p_defines.h"
@@ -117,49 +118,6 @@ gl_filter_to_img_filter(GLenum filter)
}
-static void
-xlate_border_color(const GLfloat *colorIn, GLenum baseFormat, GLfloat *colorOut)
-{
- switch (baseFormat) {
- case GL_RED:
- colorOut[0] = colorIn[0];
- colorOut[1] = 0.0F;
- colorOut[2] = 0.0F;
- colorOut[3] = 1.0F;
- break;
- case GL_RG:
- colorOut[0] = colorIn[0];
- colorOut[1] = colorIn[1];
- colorOut[2] = 0.0F;
- colorOut[3] = 1.0F;
- break;
- case GL_RGB:
- colorOut[0] = colorIn[0];
- colorOut[1] = colorIn[1];
- colorOut[2] = colorIn[2];
- colorOut[3] = 1.0F;
- break;
- case GL_ALPHA:
- colorOut[0] = colorOut[1] = colorOut[2] = 0.0;
- colorOut[3] = colorIn[3];
- break;
- case GL_LUMINANCE:
- colorOut[0] = colorOut[1] = colorOut[2] = colorIn[0];
- colorOut[3] = 1.0;
- break;
- case GL_LUMINANCE_ALPHA:
- colorOut[0] = colorOut[1] = colorOut[2] = colorIn[0];
- colorOut[3] = colorIn[3];
- break;
- case GL_INTENSITY:
- colorOut[0] = colorOut[1] = colorOut[2] = colorOut[3] = colorIn[0];
- break;
- default:
- COPY_4V(colorOut, colorIn);
- }
-}
-
-
static void
update_samplers(struct st_context *st)
{
@@ -223,7 +181,7 @@ update_samplers(struct st_context *st)
assert(sampler->min_lod <= sampler->max_lod);
}
- xlate_border_color(texobj->BorderColor.f,
+ st_translate_color(texobj->BorderColor.f,
teximg ? teximg->_BaseFormat : GL_RGBA,
sampler->border_color);
diff --git a/src/mesa/state_tracker/st_atom_shader.c b/src/mesa/state_tracker/st_atom_shader.c
index 05442ef91b5..c311d043931 100644
--- a/src/mesa/state_tracker/st_atom_shader.c
+++ b/src/mesa/state_tracker/st_atom_shader.c
@@ -50,99 +50,6 @@
#include "st_program.h"
-
-/**
- * Translate fragment program if needed.
- */
-static void
-translate_fp(struct st_context *st,
- struct st_fragment_program *stfp)
-{
- if (!stfp->tgsi.tokens) {
- assert(stfp->Base.Base.NumInstructions > 0);
-
- st_translate_fragment_program(st, stfp);
- }
-}
-
-/*
- * Translate geometry program if needed.
- */
-static void
-translate_gp(struct st_context *st,
- struct st_geometry_program *stgp)
-{
- if (!stgp->tgsi.tokens) {
- assert(stgp->Base.Base.NumInstructions > 1);
-
- st_translate_geometry_program(st, stgp);
- }
-}
-
-/**
- * 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;
-
- /* 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));
-
-
- /* 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.
- */
- st_prepare_vertex_program( st, stvp );
-
- /* 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;
- }
- }
-
- /* 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.
@@ -167,12 +74,16 @@ static void
update_fp( struct st_context *st )
{
struct st_fragment_program *stfp;
+ struct st_fp_variant_key key;
assert(st->ctx->FragmentProgram._Current);
stfp = st_fragment_program(st->ctx->FragmentProgram._Current);
assert(stfp->Base.Base.Target == GL_FRAGMENT_PROGRAM_ARB);
- translate_fp(st, stfp);
+ memset(&key, 0, sizeof(key));
+ key.st = st;
+
+ st->fp_variant = st_get_fp_variant(st, stfp, &key);
st_reference_fragprog(st, &st->fp, stfp);
@@ -182,7 +93,8 @@ update_fp( struct st_context *st )
cso_set_fragment_shader_handle(st->cso_context, fs);
}
else {
- cso_set_fragment_shader_handle(st->cso_context, stfp->driver_shader);
+ cso_set_fragment_shader_handle(st->cso_context,
+ st->fp_variant->driver_shader);
}
}
@@ -206,6 +118,7 @@ static void
update_vp( struct st_context *st )
{
struct st_vertex_program *stvp;
+ struct st_vp_variant_key key;
/* find active shader and params -- Should be covered by
* ST_NEW_VERTEX_PROGRAM
@@ -214,12 +127,26 @@ update_vp( struct st_context *st )
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);
+ memset(&key, 0, sizeof key);
+ key.st = st; /* variants are per-context */
+
+ /* 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));
+
+ st->vp_variant = st_get_vp_variant(st, stvp, &key);
st_reference_vertprog(st, &st->vp, stvp);
cso_set_vertex_shader_handle(st->cso_context,
- st->vp_varient->driver_shader);
+ st->vp_variant->driver_shader);
st->vertex_result_to_slot = stvp->result_to_output;
}
@@ -231,14 +158,16 @@ const struct st_tracked_state st_update_vp = {
_NEW_POLYGON, /* mesa */
ST_NEW_VERTEX_PROGRAM | ST_NEW_EDGEFLAGS_DATA /* st */
},
- update_vp /* update */
+ update_vp /* update */
};
+
+
static void
update_gp( struct st_context *st )
{
-
struct st_geometry_program *stgp;
+ struct st_gp_variant_key key;
if (!st->ctx->GeometryProgram._Current) {
cso_set_geometry_shader_handle(st->cso_context, NULL);
@@ -248,18 +177,22 @@ update_gp( struct st_context *st )
stgp = st_geometry_program(st->ctx->GeometryProgram._Current);
assert(stgp->Base.Base.Target == MESA_GEOMETRY_PROGRAM);
- translate_gp(st, stgp);
+ memset(&key, 0, sizeof(key));
+ key.st = st;
+
+ st->gp_variant = st_get_gp_variant(st, stgp, &key);
st_reference_geomprog(st, &st->gp, stgp);
- cso_set_geometry_shader_handle(st->cso_context, stgp->driver_shader);
+ cso_set_geometry_shader_handle(st->cso_context,
+ st->gp_variant->driver_shader);
}
const struct st_tracked_state st_update_gp = {
- "st_update_gp", /* name */
- { /* dirty */
- 0, /* mesa */
- ST_NEW_GEOMETRY_PROGRAM /* st */
+ "st_update_gp", /* name */
+ { /* dirty */
+ 0, /* mesa */
+ ST_NEW_GEOMETRY_PROGRAM /* st */
},
- update_gp /* update */
+ update_gp /* update */
};
diff --git a/src/mesa/state_tracker/st_atom_texture.c b/src/mesa/state_tracker/st_atom_texture.c
index 029b0403462..fd03669e660 100644
--- a/src/mesa/state_tracker/st_atom_texture.c
+++ b/src/mesa/state_tracker/st_atom_texture.c
@@ -45,6 +45,7 @@
#include "util/u_inlines.h"
#include "cso_cache/cso_context.h"
+
/**
* Combine depth texture mode with "swizzle" so that depth mode swizzling
* takes place before texture swizzling, and return the resulting swizzle.
@@ -54,8 +55,8 @@
* \param swizzle Texture swizzle, a bitmask computed using MAKE_SWIZZLE4.
* \param depthmode One of GL_LUMINANCE, GL_INTENSITY, GL_ALPHA, GL_RED.
*/
-static GLuint apply_depthmode(enum pipe_format format,
- GLuint swizzle, GLenum depthmode)
+static GLuint
+apply_depthmode(enum pipe_format format, GLuint swizzle, GLenum depthmode)
{
const struct util_format_description *desc =
util_format_description(format);
@@ -109,6 +110,7 @@ static GLuint apply_depthmode(enum pipe_format format,
return MAKE_SWIZZLE4(swiz[0], swiz[1], swiz[2], swiz[3]);
}
+
/**
* Return TRUE if the swizzling described by "swizzle" and
* "depthmode" (for depth textures only) is different from the swizzling
@@ -118,8 +120,9 @@ static GLuint apply_depthmode(enum pipe_format format,
* \param swizzle Texture swizzle, a bitmask computed using MAKE_SWIZZLE4.
* \param depthmode One of GL_LUMINANCE, GL_INTENSITY, GL_ALPHA.
*/
-static boolean check_sampler_swizzle(struct pipe_sampler_view *sv,
- GLuint swizzle, GLenum depthmode)
+static boolean
+check_sampler_swizzle(struct pipe_sampler_view *sv,
+ GLuint swizzle, GLenum depthmode)
{
swizzle = apply_depthmode(sv->texture->format, swizzle, depthmode);
@@ -127,15 +130,15 @@ static boolean check_sampler_swizzle(struct pipe_sampler_view *sv,
(sv->swizzle_g != GET_SWZ(swizzle, 1)) ||
(sv->swizzle_b != GET_SWZ(swizzle, 2)) ||
(sv->swizzle_a != GET_SWZ(swizzle, 3)))
- return true;
- return false;
+ return TRUE;
+ return FALSE;
}
+
static INLINE struct pipe_sampler_view *
st_create_texture_sampler_view_from_stobj(struct pipe_context *pipe,
struct st_texture_object *stObj,
enum pipe_format format)
-
{
struct pipe_sampler_view templ;
GLuint swizzle = apply_depthmode(stObj->pt->format,
@@ -161,19 +164,20 @@ static INLINE struct pipe_sampler_view *
st_get_texture_sampler_view_from_stobj(struct st_texture_object *stObj,
struct pipe_context *pipe,
enum pipe_format format)
-
{
if (!stObj || !stObj->pt) {
return NULL;
}
if (!stObj->sampler_view) {
- stObj->sampler_view = st_create_texture_sampler_view_from_stobj(pipe, stObj, format);
+ stObj->sampler_view =
+ st_create_texture_sampler_view_from_stobj(pipe, stObj, format);
}
return stObj->sampler_view;
}
+
static void
update_textures(struct st_context *st)
{
@@ -214,17 +218,29 @@ update_textures(struct st_context *st)
continue;
}
+ /* Determine the format of the texture sampler view */
st_view_format = stObj->pt->format;
{
- struct st_texture_image *firstImage;
- enum pipe_format firstImageFormat;
- firstImage = st_texture_image(stObj->base.Image[0][stObj->base.BaseLevel]);
+ const struct st_texture_image *firstImage =
+ st_texture_image(stObj->base.Image[0][stObj->base.BaseLevel]);
+ const gl_format texFormat = firstImage->base.TexFormat;
+ enum pipe_format firstImageFormat =
+ st_mesa_format_to_pipe_format(texFormat);
+
+ if ((stObj->base.sRGBDecode == GL_SKIP_DECODE_EXT) &&
+ (_mesa_get_format_color_encoding(texFormat) == GL_SRGB)) {
+ /* don't do sRGB->RGB conversion. Interpret the texture
+ * texture data as linear values.
+ */
+ const gl_format linearFormat =
+ _mesa_get_srgb_format_linear(texFormat);
+ firstImageFormat = st_mesa_format_to_pipe_format(linearFormat);
+ }
- firstImageFormat = st_mesa_format_to_pipe_format(firstImage->base.TexFormat);
if (firstImageFormat != stObj->pt->format)
st_view_format = firstImageFormat;
-
}
+
st->state.num_textures = su + 1;
/* if sampler view has changed dereference it */
diff --git a/src/mesa/state_tracker/st_atom_viewport.c b/src/mesa/state_tracker/st_atom_viewport.c
index d10f1840df6..133cc49eaf0 100644
--- a/src/mesa/state_tracker/st_atom_viewport.c
+++ b/src/mesa/state_tracker/st_atom_viewport.c
@@ -47,10 +47,14 @@ update_viewport( struct st_context *st )
/* _NEW_BUFFERS
*/
if (st_fb_orientation(ctx->DrawBuffer) == Y_0_TOP) {
+ /* Drawing to a window. The corresponding gallium surface uses
+ * Y=0=TOP but OpenGL is Y=0=BOTTOM. So we need to invert the viewport.
+ */
yScale = -1;
yBias = (GLfloat)ctx->DrawBuffer->Height;
}
else {
+ /* Drawing to an FBO where Y=0=BOTTOM, like OpenGL - don't invert */
yScale = 1.0;
yBias = 0.0;
}
diff --git a/src/mesa/state_tracker/st_cb_accum.c b/src/mesa/state_tracker/st_cb_accum.c
index a76ae92dc3d..3e01c440bda 100644
--- a/src/mesa/state_tracker/st_cb_accum.c
+++ b/src/mesa/state_tracker/st_cb_accum.c
@@ -33,6 +33,7 @@
#include "main/imports.h"
#include "main/image.h"
#include "main/macros.h"
+#include "main/mfeatures.h"
#include "st_debug.h"
#include "st_context.h"
@@ -41,6 +42,7 @@
#include "st_texture.h"
#include "pipe/p_context.h"
#include "pipe/p_defines.h"
+#include "util/u_format.h"
#include "util/u_inlines.h"
#include "util/u_tile.h"
@@ -145,7 +147,9 @@ accum_accum(struct st_context *st, GLfloat value,
buf = (GLfloat *) malloc(width * height * 4 * sizeof(GLfloat));
- pipe_get_tile_rgba(pipe, color_trans, 0, 0, width, height, buf);
+ pipe_get_tile_rgba_format(pipe, color_trans, 0, 0, width, height,
+ util_format_linear(color_strb->texture->format),
+ buf);
switch (acc_strb->format) {
case PIPE_FORMAT_R16G16B16A16_SNORM:
@@ -182,7 +186,6 @@ accum_load(struct st_context *st, GLfloat value,
GLubyte *data = acc_strb->data;
GLfloat *buf;
-
if (ST_DEBUG & DEBUG_FALLBACK)
debug_printf("%s: fallback processing\n", __FUNCTION__);
@@ -193,7 +196,9 @@ accum_load(struct st_context *st, GLfloat value,
buf = (GLfloat *) malloc(width * height * 4 * sizeof(GLfloat));
- pipe_get_tile_rgba(pipe, color_trans, 0, 0, width, height, buf);
+ pipe_get_tile_rgba_format(pipe, color_trans, 0, 0, width, height,
+ util_format_linear(color_strb->texture->format),
+ buf);
switch (acc_strb->format) {
case PIPE_FORMAT_R16G16B16A16_SNORM:
@@ -231,6 +236,7 @@ accum_return(struct gl_context *ctx, GLfloat value,
size_t stride = acc_strb->stride;
const GLubyte *data = acc_strb->data;
GLfloat *buf;
+ enum pipe_format format = util_format_linear(color_strb->texture->format);
if (ST_DEBUG & DEBUG_FALLBACK)
debug_printf("%s: fallback processing\n", __FUNCTION__);
@@ -249,7 +255,8 @@ accum_return(struct gl_context *ctx, GLfloat value,
width, height);
if (usage & PIPE_TRANSFER_READ)
- pipe_get_tile_rgba(pipe, color_trans, 0, 0, width, height, buf);
+ pipe_get_tile_rgba_format(pipe, color_trans, 0, 0, width, height,
+ format, buf);
switch (acc_strb->format) {
case PIPE_FORMAT_R16G16B16A16_SNORM:
@@ -278,7 +285,8 @@ accum_return(struct gl_context *ctx, GLfloat value,
_mesa_problem(NULL, "unexpected format in st_clear_accum_buffer()");
}
- pipe_put_tile_rgba(pipe, color_trans, 0, 0, width, height, buf);
+ pipe_put_tile_rgba_format(pipe, color_trans, 0, 0, width, height,
+ format, buf);
free(buf);
pipe->transfer_destroy(pipe, color_trans);
diff --git a/src/mesa/state_tracker/st_cb_accum.h b/src/mesa/state_tracker/st_cb_accum.h
index b8c9c350031..050a21483e4 100644
--- a/src/mesa/state_tracker/st_cb_accum.h
+++ b/src/mesa/state_tracker/st_cb_accum.h
@@ -30,7 +30,11 @@
#define ST_CB_ACCUM_H
-#include "main/mtypes.h"
+#include "main/mfeatures.h"
+
+struct dd_function_table;
+struct gl_context;
+struct gl_renderbuffer;
#if FEATURE_accum
diff --git a/src/mesa/state_tracker/st_cb_bitmap.c b/src/mesa/state_tracker/st_cb_bitmap.c
index f08697fe23b..49b196032b9 100644
--- a/src/mesa/state_tracker/st_cb_bitmap.c
+++ b/src/mesa/state_tracker/st_cb_bitmap.c
@@ -34,6 +34,8 @@
#include "main/image.h"
#include "main/bufferobj.h"
#include "main/macros.h"
+#include "main/mfeatures.h"
+#include "main/pbo.h"
#include "program/program.h"
#include "program/prog_print.h"
@@ -185,48 +187,47 @@ find_free_bit(uint bitfield)
/**
* Combine basic bitmap fragment program with the user-defined program.
+ * \param st current context
+ * \param fpIn the incoming fragment program
+ * \param fpOut the new fragment program which does fragment culling
+ * \param bitmap_sampler sampler number for the bitmap texture
*/
-static struct st_fragment_program *
-combined_bitmap_fragment_program(struct gl_context *ctx)
+void
+st_make_bitmap_fragment_program(struct st_context *st,
+ struct gl_fragment_program *fpIn,
+ struct gl_fragment_program **fpOut,
+ GLuint *bitmap_sampler)
{
- struct st_context *st = st_context(ctx);
- struct st_fragment_program *stfp = st->fp;
-
- if (!stfp->bitmap_program) {
- /*
- * Generate new program which is the user-defined program prefixed
- * with the bitmap sampler/kill instructions.
- */
- struct st_fragment_program *bitmap_prog;
- uint sampler;
-
- sampler = find_free_bit(st->fp->Base.Base.SamplersUsed);
- bitmap_prog = make_bitmap_fragment_program(ctx, sampler);
+ struct st_fragment_program *bitmap_prog;
+ struct gl_program *newProg;
+ uint sampler;
- stfp->bitmap_program = (struct st_fragment_program *)
- _mesa_combine_programs(ctx,
- &bitmap_prog->Base.Base, &stfp->Base.Base);
- stfp->bitmap_program->bitmap_sampler = sampler;
+ /*
+ * Generate new program which is the user-defined program prefixed
+ * with the bitmap sampler/kill instructions.
+ */
+ sampler = find_free_bit(fpIn->Base.SamplersUsed);
+ bitmap_prog = make_bitmap_fragment_program(st->ctx, sampler);
- /* done with this after combining */
- st_reference_fragprog(st, &bitmap_prog, NULL);
+ newProg = _mesa_combine_programs(st->ctx,
+ &bitmap_prog->Base.Base,
+ &fpIn->Base);
+ /* done with this after combining */
+ st_reference_fragprog(st, &bitmap_prog, NULL);
#if 0
- {
- struct gl_program *p = &stfp->bitmap_program->Base.Base;
- printf("Combined bitmap program:\n");
- _mesa_print_program(p);
- printf("InputsRead: 0x%x\n", p->InputsRead);
- printf("OutputsWritten: 0x%x\n", p->OutputsWritten);
- _mesa_print_parameter_list(p->Parameters);
- }
-#endif
-
- /* translate to TGSI tokens */
- st_translate_fragment_program(st, stfp->bitmap_program);
+ {
+ printf("Combined bitmap program:\n");
+ _mesa_print_program(newProg);
+ printf("InputsRead: 0x%x\n", newProg->InputsRead);
+ printf("OutputsWritten: 0x%x\n", newProg->OutputsWritten);
+ _mesa_print_parameter_list(newProg->Parameters);
}
+#endif
- return stfp->bitmap_program;
+ /* return results */
+ *fpOut = (struct gl_fragment_program *) newProg;
+ *bitmap_sampler = sampler;
}
@@ -276,7 +277,7 @@ make_bitmap_texture(struct gl_context *ctx, GLsizei width, GLsizei height,
* Create texture to hold bitmap pattern.
*/
pt = st_texture_create(st, st->internal_target, st->bitmap.tex_format,
- 0, width, height, 1,
+ 0, width, height, 1, 1,
PIPE_BIND_SAMPLER_VIEW);
if (!pt) {
_mesa_unmap_pbo_source(ctx, unpack);
@@ -349,7 +350,9 @@ setup_bitmap_vertex_data(struct st_context *st, bool normalized,
if (!st->bitmap.vbuf) {
st->bitmap.vbuf = pipe_buffer_create(pipe->screen,
PIPE_BIND_VERTEX_BUFFER,
- max_slots * sizeof(st->bitmap.vertices));
+ PIPE_USAGE_STREAM,
+ max_slots *
+ sizeof(st->bitmap.vertices));
}
/* Positions are in clip coords since we need to do clipping in case
@@ -389,10 +392,11 @@ setup_bitmap_vertex_data(struct st_context *st, bool normalized,
/* put vertex data into vbuf */
pipe_buffer_write_nooverlap(st->pipe,
- st->bitmap.vbuf,
- st->bitmap.vbuf_slot * sizeof st->bitmap.vertices,
- sizeof st->bitmap.vertices,
- st->bitmap.vertices);
+ st->bitmap.vbuf,
+ st->bitmap.vbuf_slot
+ * sizeof(st->bitmap.vertices),
+ sizeof st->bitmap.vertices,
+ st->bitmap.vertices);
return st->bitmap.vbuf_slot++ * sizeof st->bitmap.vertices;
}
@@ -411,11 +415,16 @@ draw_bitmap_quad(struct gl_context *ctx, GLint x, GLint y, GLfloat z,
struct st_context *st = st_context(ctx);
struct pipe_context *pipe = st->pipe;
struct cso_context *cso = st->cso_context;
- struct st_fragment_program *stfp;
+ struct st_fp_variant *fpv;
+ struct st_fp_variant_key key;
GLuint maxSize;
GLuint offset;
- stfp = combined_bitmap_fragment_program(ctx);
+ memset(&key, 0, sizeof(key));
+ key.st = st;
+ key.bitmap = GL_TRUE;
+
+ fpv = st_get_fp_variant(st, st->fp, &key);
/* As an optimization, Mesa's fragment programs will sometimes get the
* primary color from a statevar/constant rather than a varying variable.
@@ -428,7 +437,7 @@ draw_bitmap_quad(struct gl_context *ctx, GLint x, GLint y, GLfloat z,
GLfloat colorSave[4];
COPY_4V(colorSave, ctx->Current.Attrib[VERT_ATTRIB_COLOR0]);
COPY_4V(ctx->Current.Attrib[VERT_ATTRIB_COLOR0], color);
- st_upload_constants(st, stfp->Base.Base.Parameters, PIPE_SHADER_FRAGMENT);
+ st_upload_constants(st, fpv->parameters, PIPE_SHADER_FRAGMENT);
COPY_4V(ctx->Current.Attrib[VERT_ATTRIB_COLOR0], colorSave);
}
@@ -437,7 +446,8 @@ draw_bitmap_quad(struct gl_context *ctx, GLint x, GLint y, GLfloat z,
/* XXX if the bitmap is larger than the max texture size, break
* it up into chunks.
*/
- maxSize = 1 << (pipe->screen->get_param(pipe->screen, PIPE_CAP_MAX_TEXTURE_2D_LEVELS) - 1);
+ maxSize = 1 << (pipe->screen->get_param(pipe->screen,
+ PIPE_CAP_MAX_TEXTURE_2D_LEVELS) - 1);
assert(width <= (GLsizei)maxSize);
assert(height <= (GLsizei)maxSize);
@@ -448,13 +458,14 @@ draw_bitmap_quad(struct gl_context *ctx, GLint x, GLint y, GLfloat z,
cso_save_fragment_shader(cso);
cso_save_vertex_shader(cso);
cso_save_vertex_elements(cso);
+ cso_save_vertex_buffers(cso);
/* rasterizer state: just scissor */
st->bitmap.rasterizer.scissor = ctx->Scissor.Enabled;
cso_set_rasterizer(cso, &st->bitmap.rasterizer);
/* fragment shader state: TEX lookup program */
- cso_set_fragment_shader_handle(cso, stfp->driver_shader);
+ cso_set_fragment_shader_handle(cso, fpv->driver_shader);
/* vertex shader state: position + texcoord pass-through */
cso_set_vertex_shader_handle(cso, st->bitmap.vs);
@@ -462,21 +473,22 @@ draw_bitmap_quad(struct gl_context *ctx, GLint x, GLint y, GLfloat z,
/* user samplers, plus our bitmap sampler */
{
struct pipe_sampler_state *samplers[PIPE_MAX_SAMPLERS];
- uint num = MAX2(stfp->bitmap_sampler + 1, st->state.num_samplers);
+ uint num = MAX2(fpv->bitmap_sampler + 1, st->state.num_samplers);
uint i;
for (i = 0; i < st->state.num_samplers; i++) {
samplers[i] = &st->state.samplers[i];
}
- samplers[stfp->bitmap_sampler] = &st->bitmap.samplers[sv->texture->target != PIPE_TEXTURE_RECT];
+ samplers[fpv->bitmap_sampler] =
+ &st->bitmap.samplers[sv->texture->target != PIPE_TEXTURE_RECT];
cso_set_samplers(cso, num, (const struct pipe_sampler_state **) samplers);
}
/* user textures, plus the bitmap texture */
{
struct pipe_sampler_view *sampler_views[PIPE_MAX_SAMPLERS];
- uint num = MAX2(stfp->bitmap_sampler + 1, st->state.num_textures);
+ uint num = MAX2(fpv->bitmap_sampler + 1, st->state.num_textures);
memcpy(sampler_views, st->state.sampler_views, sizeof(sampler_views));
- sampler_views[stfp->bitmap_sampler] = sv;
+ sampler_views[fpv->bitmap_sampler] = sv;
cso_set_fragment_sampler_views(cso, num, sampler_views);
}
@@ -504,9 +516,11 @@ draw_bitmap_quad(struct gl_context *ctx, GLint x, GLint y, GLfloat z,
z = z * 2.0 - 1.0;
/* draw textured quad */
- offset = setup_bitmap_vertex_data(st, sv->texture->target != PIPE_TEXTURE_RECT, x, y, width, height, z, color);
+ offset = setup_bitmap_vertex_data(st,
+ sv->texture->target != PIPE_TEXTURE_RECT,
+ x, y, width, height, z, color);
- util_draw_vertex_buffer(pipe, st->bitmap.vbuf, offset,
+ util_draw_vertex_buffer(pipe, st->cso_context, st->bitmap.vbuf, offset,
PIPE_PRIM_TRIANGLE_FAN,
4, /* verts */
3); /* attribs/vert */
@@ -520,6 +534,7 @@ draw_bitmap_quad(struct gl_context *ctx, GLint x, GLint y, GLfloat z,
cso_restore_fragment_shader(cso);
cso_restore_vertex_shader(cso);
cso_restore_vertex_elements(cso);
+ cso_restore_vertex_buffers(cso);
}
@@ -548,7 +563,7 @@ reset_cache(struct st_context *st)
cache->texture = st_texture_create(st, PIPE_TEXTURE_2D,
st->bitmap.tex_format, 0,
BITMAP_CACHE_WIDTH, BITMAP_CACHE_HEIGHT,
- 1,
+ 1, 1,
PIPE_BIND_SAMPLER_VIEW);
}
@@ -573,6 +588,9 @@ print_cache(const struct bitmap_cache *cache)
}
+/**
+ * Create gallium pipe_transfer object for the bitmap cache.
+ */
static void
create_cache_trans(struct st_context *st)
{
@@ -651,7 +669,9 @@ st_flush_bitmap_cache(struct st_context *st)
}
}
-/* Flush bitmap cache and release vertex buffer.
+
+/**
+ * Flush bitmap cache and release vertex buffer.
*/
void
st_flush_bitmap( struct st_context *st )
@@ -737,7 +757,8 @@ accum_bitmap(struct st_context *st,
* Called via ctx->Driver.Bitmap()
*/
static void
-st_Bitmap(struct gl_context *ctx, GLint x, GLint y, GLsizei width, GLsizei height,
+st_Bitmap(struct gl_context *ctx, GLint x, GLint y,
+ GLsizei width, GLsizei height,
const struct gl_pixelstore_attrib *unpack, const GLubyte *bitmap )
{
struct st_context *st = st_context(ctx);
@@ -764,7 +785,8 @@ st_Bitmap(struct gl_context *ctx, GLint x, GLint y, GLsizei width, GLsizei heigh
pt = make_bitmap_texture(ctx, width, height, unpack, bitmap);
if (pt) {
- struct pipe_sampler_view *sv = st_create_texture_sampler_view(st->pipe, pt);
+ struct pipe_sampler_view *sv =
+ st_create_texture_sampler_view(st->pipe, pt);
assert(pt->target == PIPE_TEXTURE_2D || pt->target == PIPE_TEXTURE_RECT);
@@ -814,16 +836,19 @@ st_init_bitmap(struct st_context *st)
st->bitmap.rasterizer.gl_rasterization_rules = 1;
/* find a usable texture format */
- if (screen->is_format_supported(screen, PIPE_FORMAT_I8_UNORM, PIPE_TEXTURE_2D, 0,
- PIPE_BIND_SAMPLER_VIEW, 0)) {
+ if (screen->is_format_supported(screen, PIPE_FORMAT_I8_UNORM,
+ PIPE_TEXTURE_2D, 0,
+ PIPE_BIND_SAMPLER_VIEW)) {
st->bitmap.tex_format = PIPE_FORMAT_I8_UNORM;
}
- else if (screen->is_format_supported(screen, PIPE_FORMAT_A8_UNORM, PIPE_TEXTURE_2D, 0,
- PIPE_BIND_SAMPLER_VIEW, 0)) {
+ else if (screen->is_format_supported(screen, PIPE_FORMAT_A8_UNORM,
+ PIPE_TEXTURE_2D, 0,
+ PIPE_BIND_SAMPLER_VIEW)) {
st->bitmap.tex_format = PIPE_FORMAT_A8_UNORM;
}
- else if (screen->is_format_supported(screen, PIPE_FORMAT_L8_UNORM, PIPE_TEXTURE_2D, 0,
- PIPE_BIND_SAMPLER_VIEW, 0)) {
+ else if (screen->is_format_supported(screen, PIPE_FORMAT_L8_UNORM,
+ PIPE_TEXTURE_2D, 0,
+ PIPE_BIND_SAMPLER_VIEW)) {
st->bitmap.tex_format = PIPE_FORMAT_L8_UNORM;
}
else {
@@ -845,8 +870,6 @@ st_destroy_bitmap(struct st_context *st)
struct pipe_context *pipe = st->pipe;
struct bitmap_cache *cache = st->bitmap.cache;
-
-
if (st->bitmap.vs) {
cso_delete_vertex_shader(st->cso_context, st->bitmap.vs);
st->bitmap.vs = NULL;
diff --git a/src/mesa/state_tracker/st_cb_bitmap.h b/src/mesa/state_tracker/st_cb_bitmap.h
index d04b2b67795..ed141580376 100644
--- a/src/mesa/state_tracker/st_cb_bitmap.h
+++ b/src/mesa/state_tracker/st_cb_bitmap.h
@@ -31,9 +31,12 @@
#include "main/compiler.h"
+#include "main/mfeatures.h"
struct dd_function_table;
struct st_context;
+struct gl_fragment_program;
+struct st_fragment_program;
#if FEATURE_drawpix
@@ -47,6 +50,12 @@ extern void
st_destroy_bitmap(struct st_context *st);
extern void
+st_make_bitmap_fragment_program(struct st_context *st,
+ struct gl_fragment_program *fpIn,
+ struct gl_fragment_program **fpOut,
+ GLuint *bitmap_sampler);
+
+extern void
st_flush_bitmap_cache(struct st_context *st);
/* Flush bitmap cache and release vertex buffer. Needed at end of
diff --git a/src/mesa/state_tracker/st_cb_blit.c b/src/mesa/state_tracker/st_cb_blit.c
index 06cee520b37..6d02a7dccd4 100644
--- a/src/mesa/state_tracker/st_cb_blit.c
+++ b/src/mesa/state_tracker/st_cb_blit.c
@@ -33,6 +33,7 @@
#include "main/imports.h"
#include "main/image.h"
#include "main/macros.h"
+#include "main/mfeatures.h"
#include "st_context.h"
#include "st_texture.h"
@@ -40,7 +41,6 @@
#include "st_cb_fbo.h"
#include "util/u_blit.h"
-#include "util/u_inlines.h"
void
diff --git a/src/mesa/state_tracker/st_cb_blit.h b/src/mesa/state_tracker/st_cb_blit.h
index c230652cefc..c6d9a367955 100644
--- a/src/mesa/state_tracker/st_cb_blit.h
+++ b/src/mesa/state_tracker/st_cb_blit.h
@@ -30,6 +30,7 @@
#include "main/compiler.h"
+#include "main/mfeatures.h"
struct dd_function_table;
struct st_context;
diff --git a/src/mesa/state_tracker/st_cb_bufferobjects.c b/src/mesa/state_tracker/st_cb_bufferobjects.c
index 8b60f9040d0..b9b606d539c 100644
--- a/src/mesa/state_tracker/st_cb_bufferobjects.c
+++ b/src/mesa/state_tracker/st_cb_bufferobjects.c
@@ -171,7 +171,7 @@ st_bufferobj_data(struct gl_context *ctx,
struct st_context *st = st_context(ctx);
struct pipe_context *pipe = st->pipe;
struct st_buffer_object *st_obj = st_buffer_object(obj);
- unsigned buffer_usage;
+ unsigned bind, pipe_usage;
st_obj->Base.Size = size;
st_obj->Base.Usage = usage;
@@ -179,22 +179,43 @@ st_bufferobj_data(struct gl_context *ctx,
switch(target) {
case GL_PIXEL_PACK_BUFFER_ARB:
case GL_PIXEL_UNPACK_BUFFER_ARB:
- buffer_usage = PIPE_BIND_RENDER_TARGET;
+ bind = PIPE_BIND_RENDER_TARGET | PIPE_BIND_SAMPLER_VIEW;
break;
case GL_ARRAY_BUFFER_ARB:
- buffer_usage = PIPE_BIND_VERTEX_BUFFER;
+ bind = PIPE_BIND_VERTEX_BUFFER;
break;
case GL_ELEMENT_ARRAY_BUFFER_ARB:
- buffer_usage = PIPE_BIND_INDEX_BUFFER;
+ bind = PIPE_BIND_INDEX_BUFFER;
break;
default:
- buffer_usage = 0;
+ bind = 0;
+ }
+
+ switch (usage) {
+ case GL_STATIC_DRAW:
+ case GL_STATIC_READ:
+ case GL_STATIC_COPY:
+ pipe_usage = PIPE_USAGE_STATIC;
+ break;
+ case GL_DYNAMIC_DRAW:
+ case GL_DYNAMIC_READ:
+ case GL_DYNAMIC_COPY:
+ pipe_usage = PIPE_USAGE_DYNAMIC;
+ break;
+ case GL_STREAM_DRAW:
+ case GL_STREAM_READ:
+ case GL_STREAM_COPY:
+ pipe_usage = PIPE_USAGE_STREAM;
+ break;
+ default:
+ pipe_usage = PIPE_USAGE_DEFAULT;
}
pipe_resource_reference( &st_obj->buffer, NULL );
if (size != 0) {
- st_obj->buffer = pipe_buffer_create(pipe->screen, buffer_usage, size);
+ st_obj->buffer = pipe_buffer_create(pipe->screen, bind,
+ pipe_usage, size);
if (!st_obj->buffer) {
return GL_FALSE;
@@ -280,11 +301,15 @@ st_bufferobj_map_range(struct gl_context *ctx, GLenum target,
if (access & GL_MAP_FLUSH_EXPLICIT_BIT)
flags |= PIPE_TRANSFER_FLUSH_EXPLICIT;
- if (access & GL_MAP_INVALIDATE_RANGE_BIT)
- flags |= PIPE_TRANSFER_DISCARD;
-
- if (access & GL_MAP_INVALIDATE_BUFFER_BIT)
- flags |= PIPE_TRANSFER_DISCARD;
+ if (access & GL_MAP_INVALIDATE_BUFFER_BIT) {
+ flags |= PIPE_TRANSFER_DISCARD_WHOLE_RESOURCE;
+ }
+ else if (access & GL_MAP_INVALIDATE_RANGE_BIT) {
+ if (offset == 0 && length == obj->Size)
+ flags |= PIPE_TRANSFER_DISCARD_WHOLE_RESOURCE;
+ else
+ flags |= PIPE_TRANSFER_DISCARD_RANGE;
+ }
if (access & GL_MAP_UNSYNCHRONIZED_BIT)
flags |= PIPE_TRANSFER_UNSYNCHRONIZED;
@@ -360,7 +385,7 @@ st_bufferobj_unmap(struct gl_context *ctx, GLenum target, struct gl_buffer_objec
struct st_buffer_object *st_obj = st_buffer_object(obj);
if (obj->Length)
- pipe_buffer_unmap(pipe, st_obj->buffer, st_obj->transfer);
+ pipe_buffer_unmap(pipe, st_obj->transfer);
st_obj->transfer = NULL;
obj->Pointer = NULL;
@@ -409,8 +434,8 @@ st_copy_buffer_subdata(struct gl_context *ctx,
if (srcPtr && dstPtr)
memcpy(dstPtr + writeOffset, srcPtr + readOffset, size);
- pipe_buffer_unmap(pipe, srcObj->buffer, src_transfer);
- pipe_buffer_unmap(pipe, dstObj->buffer, dst_transfer);
+ pipe_buffer_unmap(pipe, src_transfer);
+ pipe_buffer_unmap(pipe, dst_transfer);
}
diff --git a/src/mesa/state_tracker/st_cb_clear.c b/src/mesa/state_tracker/st_cb_clear.c
index bd1dd78b23c..1eb748e0d5d 100644
--- a/src/mesa/state_tracker/st_cb_clear.c
+++ b/src/mesa/state_tracker/st_cb_clear.c
@@ -42,6 +42,7 @@
#include "st_cb_accum.h"
#include "st_cb_clear.h"
#include "st_cb_fbo.h"
+#include "st_format.h"
#include "st_program.h"
#include "pipe/p_context.h"
@@ -62,26 +63,12 @@
void
st_init_clear(struct st_context *st)
{
- struct pipe_context *pipe = st->pipe;
struct pipe_screen *pscreen = st->pipe->screen;
memset(&st->clear, 0, sizeof(st->clear));
st->clear.raster.gl_rasterization_rules = 1;
st->clear.enable_ds_separate = pscreen->get_param(pscreen, PIPE_CAP_DEPTHSTENCIL_CLEAR_SEPARATE);
-
- /* fragment shader state: color pass-through program */
- st->clear.fs = util_make_fragment_passthrough_shader(pipe);
-
- /* vertex shader state: color/position pass-through */
- {
- const uint semantic_names[] = { TGSI_SEMANTIC_POSITION,
- TGSI_SEMANTIC_COLOR };
- const uint semantic_indexes[] = { 0, 0 };
- st->clear.vs = util_make_vertex_passthrough_shader(pipe, 2,
- semantic_names,
- semantic_indexes);
- }
}
@@ -107,6 +94,42 @@ st_destroy_clear(struct st_context *st)
/**
+ * Helper function to set the fragment shaders.
+ */
+static INLINE void
+set_fragment_shader(struct st_context *st)
+{
+ if (!st->clear.fs)
+ st->clear.fs = util_make_fragment_passthrough_shader(st->pipe);
+
+ cso_set_fragment_shader_handle(st->cso_context, st->clear.fs);
+}
+
+
+/**
+ * Helper function to set the vertex shader.
+ */
+static INLINE void
+set_vertex_shader(struct st_context *st)
+{
+ /* vertex shader - still required to provide the linkage between
+ * fragment shader input semantics and vertex_element/buffers.
+ */
+ if (!st->clear.vs)
+ {
+ const uint semantic_names[] = { TGSI_SEMANTIC_POSITION,
+ TGSI_SEMANTIC_COLOR };
+ const uint semantic_indexes[] = { 0, 0 };
+ st->clear.vs = util_make_vertex_passthrough_shader(st->pipe, 2,
+ semantic_names,
+ semantic_indexes);
+ }
+
+ cso_set_vertex_shader_handle(st->cso_context, st->clear.vs);
+}
+
+
+/**
* Draw a screen-aligned quadrilateral.
* Coords are clip coords with y=0=bottom.
*/
@@ -138,6 +161,7 @@ draw_quad(struct st_context *st,
if (!st->clear.vbuf) {
st->clear.vbuf = pipe_buffer_create(pipe->screen,
PIPE_BIND_VERTEX_BUFFER,
+ PIPE_USAGE_STREAM,
max_slots * sizeof(st->clear.vertices));
}
@@ -172,7 +196,8 @@ draw_quad(struct st_context *st,
st->clear.vertices);
/* draw */
- util_draw_vertex_buffer(pipe,
+ util_draw_vertex_buffer(pipe,
+ st->cso_context,
st->clear.vbuf,
st->clear.vbuf_slot * sizeof(st->clear.vertices),
PIPE_PRIM_TRIANGLE_FAN,
@@ -202,6 +227,7 @@ clear_with_quad(struct gl_context *ctx,
const GLfloat x1 = (GLfloat) ctx->DrawBuffer->_Xmax / fb_width * 2.0f - 1.0f;
const GLfloat y0 = (GLfloat) ctx->DrawBuffer->_Ymin / fb_height * 2.0f - 1.0f;
const GLfloat y1 = (GLfloat) ctx->DrawBuffer->_Ymax / fb_height * 2.0f - 1.0f;
+ float clearColor[4];
/*
printf("%s %s%s%s %f,%f %f,%f\n", __FUNCTION__,
@@ -221,6 +247,7 @@ clear_with_quad(struct gl_context *ctx,
cso_save_fragment_shader(st->cso_context);
cso_save_vertex_shader(st->cso_context);
cso_save_vertex_elements(st->cso_context);
+ cso_save_vertex_buffers(st->cso_context);
/* blend state: RGBA masking */
{
@@ -292,12 +319,17 @@ clear_with_quad(struct gl_context *ctx,
}
cso_set_clip(st->cso_context, &st->clear.clip);
- cso_set_fragment_shader_handle(st->cso_context, st->clear.fs);
- cso_set_vertex_shader_handle(st->cso_context, st->clear.vs);
+ set_fragment_shader(st);
+ set_vertex_shader(st);
- /* draw quad matching scissor rect (XXX verify coord round-off) */
- draw_quad(st, x0, y0, x1, y1,
- (GLfloat) ctx->Depth.Clear, ctx->Color.ClearColor);
+ if (ctx->DrawBuffer->_ColorDrawBuffers[0]) {
+ st_translate_color(ctx->Color.ClearColor,
+ ctx->DrawBuffer->_ColorDrawBuffers[0]->_BaseFormat,
+ clearColor);
+ }
+
+ /* draw quad matching scissor rect */
+ draw_quad(st, x0, y0, x1, y1, (GLfloat) ctx->Depth.Clear, clearColor);
/* Restore pipe state */
cso_restore_blend(st->cso_context);
@@ -309,6 +341,7 @@ clear_with_quad(struct gl_context *ctx,
cso_restore_fragment_shader(st->cso_context);
cso_restore_vertex_shader(st->cso_context);
cso_restore_vertex_elements(st->cso_context);
+ cso_restore_vertex_buffers(st->cso_context);
}
@@ -470,13 +503,9 @@ st_Clear(struct gl_context *ctx, GLbitfield mask)
if (mask & (1 << b)) {
struct gl_renderbuffer *rb
= ctx->DrawBuffer->Attachment[b].Renderbuffer;
- struct st_renderbuffer *strb;
-
- assert(rb);
+ struct st_renderbuffer *strb = st_renderbuffer(rb);
- strb = st_renderbuffer(rb);
-
- if (!strb->surface)
+ if (!strb || !strb->surface)
continue;
if (check_clear_color_with_quad( ctx, rb ))
@@ -541,12 +570,21 @@ st_Clear(struct gl_context *ctx, GLbitfield mask)
* required from the visual. Hence fix this up to avoid potential
* read-modify-write in the driver.
*/
+ float clearColor[4];
+
if ((clear_buffers & PIPE_CLEAR_DEPTHSTENCIL) &&
((clear_buffers & PIPE_CLEAR_DEPTHSTENCIL) != PIPE_CLEAR_DEPTHSTENCIL) &&
(depthRb == stencilRb) &&
(ctx->DrawBuffer->Visual.depthBits == 0 ||
ctx->DrawBuffer->Visual.stencilBits == 0))
clear_buffers |= PIPE_CLEAR_DEPTHSTENCIL;
+
+ if (ctx->DrawBuffer->_ColorDrawBuffers[0]) {
+ st_translate_color(ctx->Color.ClearColor,
+ ctx->DrawBuffer->_ColorDrawBuffers[0]->_BaseFormat,
+ clearColor);
+ }
+
st->pipe->clear(st->pipe, clear_buffers, ctx->Color.ClearColor,
ctx->Depth.Clear, ctx->Stencil.Clear);
}
diff --git a/src/mesa/state_tracker/st_cb_drawpixels.c b/src/mesa/state_tracker/st_cb_drawpixels.c
index c9786024575..eccc207579b 100644
--- a/src/mesa/state_tracker/st_cb_drawpixels.c
+++ b/src/mesa/state_tracker/st_cb_drawpixels.c
@@ -34,7 +34,10 @@
#include "main/image.h"
#include "main/bufferobj.h"
#include "main/macros.h"
+#include "main/mfeatures.h"
+#include "main/mtypes.h"
#include "main/pack.h"
+#include "main/pbo.h"
#include "main/texformat.h"
#include "main/texstore.h"
#include "program/program.h"
@@ -94,88 +97,61 @@ is_passthrough_program(const struct gl_fragment_program *prog)
/**
* Make fragment shader for glDraw/CopyPixels. This shader is made
* by combining the pixel transfer shader with the user-defined shader.
- * \return pointer to Gallium driver fragment shader
+ * \param fpIn the current/incoming fragment program
+ * \param fpOut returns the combined fragment program
*/
-static void *
-combined_drawpix_fragment_program(struct gl_context *ctx)
+void
+st_make_drawpix_fragment_program(struct st_context *st,
+ struct gl_fragment_program *fpIn,
+ struct gl_fragment_program **fpOut)
{
- struct st_context *st = st_context(ctx);
- struct st_fragment_program *stfp;
+ struct gl_program *newProg;
- if (st->pixel_xfer.program->serialNo == st->pixel_xfer.xfer_prog_sn
- && st->fp->serialNo == st->pixel_xfer.user_prog_sn) {
- /* the pixel tranfer program has not changed and the user-defined
- * program has not changed, so re-use the combined program.
- */
- stfp = st->pixel_xfer.combined_prog;
+ if (is_passthrough_program(fpIn)) {
+ newProg = (struct gl_program *) _mesa_clone_fragment_program(st->ctx,
+ &st->pixel_xfer.program->Base);
}
else {
- /* Concatenate the pixel transfer program with the current user-
- * defined program.
- */
- if (is_passthrough_program(&st->fp->Base)) {
- stfp = (struct st_fragment_program *)
- _mesa_clone_fragment_program(ctx, &st->pixel_xfer.program->Base);
- }
- else {
#if 0
- printf("Base program:\n");
- _mesa_print_program(&st->fp->Base.Base);
- printf("DrawPix program:\n");
- _mesa_print_program(&st->pixel_xfer.program->Base.Base);
+ /* debug */
+ printf("Base program:\n");
+ _mesa_print_program(&fpIn->Base);
+ printf("DrawPix program:\n");
+ _mesa_print_program(&st->pixel_xfer.program->Base.Base);
#endif
- stfp = (struct st_fragment_program *)
- _mesa_combine_programs(ctx,
- &st->pixel_xfer.program->Base.Base,
- &st->fp->Base.Base);
- }
+ newProg = _mesa_combine_programs(st->ctx,
+ &st->pixel_xfer.program->Base.Base,
+ &fpIn->Base);
+ }
#if 0
- {
- struct gl_program *p = &stfp->Base.Base;
- printf("Combined DrawPixels program:\n");
- _mesa_print_program(p);
- printf("InputsRead: 0x%x\n", p->InputsRead);
- printf("OutputsWritten: 0x%x\n", p->OutputsWritten);
- _mesa_print_parameter_list(p->Parameters);
- }
+ /* debug */
+ printf("Combined DrawPixels program:\n");
+ _mesa_print_program(newProg);
+ printf("InputsRead: 0x%x\n", newProg->InputsRead);
+ printf("OutputsWritten: 0x%x\n", newProg->OutputsWritten);
+ _mesa_print_parameter_list(newProg->Parameters);
#endif
- /* translate to TGSI tokens */
- st_translate_fragment_program(st, stfp);
-
- /* save new program, update serial numbers */
- st->pixel_xfer.xfer_prog_sn = st->pixel_xfer.program->serialNo;
- st->pixel_xfer.user_prog_sn = st->fp->serialNo;
- st->pixel_xfer.combined_prog_sn = stfp->serialNo;
- /* can't reference new program directly, already have a reference on it */
- st_reference_fragprog(st, &st->pixel_xfer.combined_prog, NULL);
- st->pixel_xfer.combined_prog = stfp;
- }
-
- /* Ideally we'd have updated the pipe constants during the normal
- * st/atom mechanism. But we can't since this is specific to glDrawPixels.
- */
- st_upload_constants(st, stfp->Base.Base.Parameters, PIPE_SHADER_FRAGMENT);
-
- return stfp->driver_shader;
+ *fpOut = (struct gl_fragment_program *) newProg;
}
/**
- * Create fragment shader that does a TEX() instruction to get a Z and/or
+ * Create fragment program that does a TEX() instruction to get a Z and/or
* stencil value value, then writes to FRAG_RESULT_DEPTH/FRAG_RESULT_STENCIL.
* Used for glDrawPixels(GL_DEPTH_COMPONENT / GL_STENCIL_INDEX).
* Pass fragment color through as-is.
- * \return pointer to the Gallium driver fragment shader
+ * \return pointer to the gl_fragment program
*/
-static void *
-make_fragment_shader_z_stencil(struct st_context *st, GLboolean write_depth,
- GLboolean write_stencil)
+struct gl_fragment_program *
+st_make_drawpix_z_stencil_program(struct st_context *st,
+ GLboolean write_depth,
+ GLboolean write_stencil)
{
struct gl_context *ctx = st->ctx;
struct gl_program *p;
- struct st_fragment_program *stp;
+ struct gl_fragment_program *fp;
GLuint ic = 0;
const GLuint shaderIndex = write_depth * 2 + write_stencil;
@@ -183,7 +159,7 @@ make_fragment_shader_z_stencil(struct st_context *st, GLboolean write_depth,
if (st->drawpix.shaders[shaderIndex]) {
/* already have the proper shader */
- return st->drawpix.shaders[shaderIndex]->driver_shader;
+ return st->drawpix.shaders[shaderIndex];
}
/*
@@ -237,26 +213,23 @@ make_fragment_shader_z_stencil(struct st_context *st, GLboolean write_depth,
p->InputsRead = FRAG_BIT_TEX0 | FRAG_BIT_COL0;
p->OutputsWritten = 0;
if (write_depth)
- p->OutputsWritten |= (1 << FRAG_RESULT_DEPTH);
+ p->OutputsWritten |= BITFIELD64_BIT(FRAG_RESULT_DEPTH);
if (write_stencil)
- p->OutputsWritten |= (1 << FRAG_RESULT_STENCIL);
+ p->OutputsWritten |= BITFIELD64_BIT(FRAG_RESULT_STENCIL);
p->SamplersUsed = 0x1; /* sampler 0 (bit 0) is used */
if (write_stencil)
p->SamplersUsed |= 1 << 1;
- stp = st_fragment_program((struct gl_fragment_program *) p);
+ fp = (struct gl_fragment_program *) p;
/* save the new shader */
- st->drawpix.shaders[shaderIndex] = stp;
-
- st_translate_fragment_program(st, stp);
+ st->drawpix.shaders[shaderIndex] = fp;
- return stp->driver_shader;
+ return fp;
}
-
/**
* Create a simple vertex shader that just passes through the
* vertex position and texcoord (and optionally, color).
@@ -371,7 +344,7 @@ alloc_texture(struct st_context *st, GLsizei width, GLsizei height,
struct pipe_resource *pt;
pt = st_texture_create(st, st->internal_target, texFormat, 0,
- width, height, 1, PIPE_BIND_SAMPLER_VIEW);
+ width, height, 1, 1, PIPE_BIND_SAMPLER_VIEW);
return pt;
}
@@ -550,10 +523,11 @@ draw_quad(struct gl_context *ctx, GLfloat x0, GLfloat y0, GLfloat z,
/* allocate/load buffer object with vertex data */
buf = pipe_buffer_create(pipe->screen,
PIPE_BIND_VERTEX_BUFFER,
+ PIPE_USAGE_STATIC,
sizeof(verts));
pipe_buffer_write(st->pipe, buf, 0, sizeof(verts), verts);
- util_draw_vertex_buffer(pipe, buf, 0,
+ util_draw_vertex_buffer(pipe, st->cso_context, buf, 0,
PIPE_PRIM_QUADS,
4, /* verts */
3); /* attribs/vert */
@@ -598,6 +572,7 @@ draw_textured_quad(struct gl_context *ctx, GLint x, GLint y, GLfloat z,
cso_save_fragment_shader(cso);
cso_save_vertex_shader(cso);
cso_save_vertex_elements(cso);
+ cso_save_vertex_buffers(cso);
if (write_stencil) {
cso_save_depth_stencil_alpha(cso);
cso_save_blend(cso);
@@ -714,6 +689,7 @@ draw_textured_quad(struct gl_context *ctx, GLint x, GLint y, GLfloat z,
cso_restore_fragment_shader(cso);
cso_restore_vertex_shader(cso);
cso_restore_vertex_elements(cso);
+ cso_restore_vertex_buffers(cso);
if (write_stencil) {
cso_restore_depth_stencil_alpha(cso);
cso_restore_blend(cso);
@@ -873,6 +849,61 @@ draw_stencil_pixels(struct gl_context *ctx, GLint x, GLint y,
/**
+ * Get fragment program variant for a glDrawPixels or glCopyPixels
+ * command for RGBA data.
+ */
+static struct st_fp_variant *
+get_color_fp_variant(struct st_context *st)
+{
+ struct gl_context *ctx = st->ctx;
+ struct st_fp_variant_key key;
+ struct st_fp_variant *fpv;
+
+ memset(&key, 0, sizeof(key));
+
+ key.st = st;
+ key.drawpixels = 1;
+ key.scaleAndBias = (ctx->Pixel.RedBias != 0.0 ||
+ ctx->Pixel.RedScale != 1.0 ||
+ ctx->Pixel.GreenBias != 0.0 ||
+ ctx->Pixel.GreenScale != 1.0 ||
+ ctx->Pixel.BlueBias != 0.0 ||
+ ctx->Pixel.BlueScale != 1.0 ||
+ ctx->Pixel.AlphaBias != 0.0 ||
+ ctx->Pixel.AlphaScale != 1.0);
+ key.pixelMaps = ctx->Pixel.MapColorFlag;
+
+ fpv = st_get_fp_variant(st, st->fp, &key);
+
+ return fpv;
+}
+
+
+/**
+ * Get fragment program variant for a glDrawPixels or glCopyPixels
+ * command for depth/stencil data.
+ */
+static struct st_fp_variant *
+get_depth_stencil_fp_variant(struct st_context *st, GLboolean write_depth,
+ GLboolean write_stencil)
+{
+ struct st_fp_variant_key key;
+ struct st_fp_variant *fpv;
+
+ memset(&key, 0, sizeof(key));
+
+ key.st = st;
+ key.drawpixels = 1;
+ key.drawpixels_z = write_depth;
+ key.drawpixels_stencil = write_stencil;
+
+ fpv = st_get_fp_variant(st, st->fp, &key);
+
+ return fpv;
+}
+
+
+/**
* Called via ctx->Driver.DrawPixels()
*/
static void
@@ -889,6 +920,7 @@ st_DrawPixels(struct gl_context *ctx, GLint x, GLint y,
struct pipe_sampler_view *sv[2];
int num_sampler_view = 1;
enum pipe_format stencil_format = PIPE_FORMAT_NONE;
+ struct st_fp_variant *fpv;
if (format == GL_DEPTH_STENCIL)
write_stencil = write_depth = GL_TRUE;
@@ -921,14 +953,25 @@ st_DrawPixels(struct gl_context *ctx, GLint x, GLint y,
st_validate_state(st);
+ /*
+ * Get vertex/fragment shaders
+ */
if (write_depth || write_stencil) {
- driver_fp = make_fragment_shader_z_stencil(st, write_depth, write_stencil);
+ fpv = get_depth_stencil_fp_variant(st, write_depth, write_stencil);
+
+ driver_fp = fpv->driver_shader;
+
driver_vp = make_passthrough_vertex_shader(st, GL_TRUE);
+
color = ctx->Current.RasterColor;
}
else {
- driver_fp = combined_drawpix_fragment_program(ctx);
+ fpv = get_color_fp_variant(st);
+
+ driver_fp = fpv->driver_shader;
+
driver_vp = make_passthrough_vertex_shader(st, GL_FALSE);
+
color = NULL;
if (st->pixel_xfer.pixelmap_enabled) {
sv[1] = st->pixel_xfer.pixelmap_sampler_view;
@@ -936,6 +979,9 @@ st_DrawPixels(struct gl_context *ctx, GLint x, GLint y,
}
}
+ /* update fragment program constants */
+ st_upload_constants(st, fpv->parameters, PIPE_SHADER_FRAGMENT);
+
/* draw with textured quad */
{
struct pipe_resource *pt
@@ -1097,6 +1143,110 @@ copy_stencil_pixels(struct gl_context *ctx, GLint srcx, GLint srcy,
}
+/** Do the src/dest regions overlap? */
+static GLboolean
+regions_overlap(GLint srcX, GLint srcY, GLint dstX, GLint dstY,
+ GLsizei width, GLsizei height)
+{
+ if (srcX + width <= dstX ||
+ dstX + width <= srcX ||
+ srcY + height <= dstY ||
+ dstY + height <= srcY)
+ return GL_FALSE;
+ else
+ return GL_TRUE;
+}
+
+
+/**
+ * Try to do a glCopyPixels for simple cases with a blit by calling
+ * pipe->resource_copy_region().
+ *
+ * We can do this when we're copying color pixels (depth/stencil
+ * eventually) with no pixel zoom, no pixel transfer ops, no
+ * per-fragment ops, the src/dest regions don't overlap and the
+ * src/dest pixel formats are the same.
+ */
+static GLboolean
+blit_copy_pixels(struct gl_context *ctx, GLint srcx, GLint srcy,
+ GLsizei width, GLsizei height,
+ GLint dstx, GLint dsty, GLenum type)
+{
+ struct st_context *st = st_context(ctx);
+ struct pipe_context *pipe = st->pipe;
+ struct gl_pixelstore_attrib pack, unpack;
+ GLint readX, readY, readW, readH;
+
+ if (type == GL_COLOR &&
+ ctx->Pixel.ZoomX == 1.0 &&
+ ctx->Pixel.ZoomY == 1.0 &&
+ ctx->_ImageTransferState == 0x0 &&
+ !ctx->Color.BlendEnabled &&
+ !ctx->Color.AlphaEnabled &&
+ !ctx->Depth.Test &&
+ !ctx->Fog.Enabled &&
+ !ctx->Stencil.Enabled &&
+ !ctx->FragmentProgram.Enabled &&
+ !ctx->VertexProgram.Enabled &&
+ !ctx->Shader.CurrentFragmentProgram &&
+ st_fb_orientation(ctx->ReadBuffer) == st_fb_orientation(ctx->DrawBuffer) &&
+ ctx->DrawBuffer->_NumColorDrawBuffers == 1) {
+ struct st_renderbuffer *rbRead, *rbDraw;
+ GLint drawX, drawY;
+
+ /*
+ * Clip the read region against the src buffer bounds.
+ * We'll still allocate a temporary buffer/texture for the original
+ * src region size but we'll only read the region which is on-screen.
+ * This may mean that we draw garbage pixels into the dest region, but
+ * that's expected.
+ */
+ readX = srcx;
+ readY = srcy;
+ readW = width;
+ readH = height;
+ pack = ctx->DefaultPacking;
+ if (!_mesa_clip_readpixels(ctx, &readX, &readY, &readW, &readH, &pack))
+ return GL_TRUE; /* all done */
+
+ /* clip against dest buffer bounds and scissor box */
+ drawX = dstx + pack.SkipPixels;
+ drawY = dsty + pack.SkipRows;
+ unpack = pack;
+ if (!_mesa_clip_drawpixels(ctx, &drawX, &drawY, &readW, &readH, &unpack))
+ return GL_TRUE; /* all done */
+
+ readX = readX - pack.SkipPixels + unpack.SkipPixels;
+ readY = readY - pack.SkipRows + unpack.SkipRows;
+
+ rbRead = st_get_color_read_renderbuffer(ctx);
+ rbDraw = st_renderbuffer(ctx->DrawBuffer->_ColorDrawBuffers[0]);
+
+ if ((rbRead != rbDraw ||
+ !regions_overlap(readX, readY, drawX, drawY, readW, readH)) &&
+ rbRead->Base.Format == rbDraw->Base.Format) {
+ struct pipe_box srcBox;
+
+ /* flip src/dst position if needed */
+ if (st_fb_orientation(ctx->ReadBuffer) == Y_0_TOP) {
+ /* both buffers will have the same orientation */
+ readY = ctx->ReadBuffer->Height - readY - readH;
+ drawY = ctx->DrawBuffer->Height - drawY - readH;
+ }
+
+ u_box_2d(readX, readY, readW, readH, &srcBox);
+
+ pipe->resource_copy_region(pipe,
+ rbDraw->texture, 0, drawX, drawY, 0,
+ rbRead->texture, 0, &srcBox);
+ return GL_TRUE;
+ }
+ }
+
+ return GL_FALSE;
+}
+
+
static void
st_CopyPixels(struct gl_context *ctx, GLint srcx, GLint srcy,
GLsizei width, GLsizei height,
@@ -1116,6 +1266,7 @@ st_CopyPixels(struct gl_context *ctx, GLint srcx, GLint srcy,
GLint readX, readY, readW, readH;
GLuint sample_count;
struct gl_pixelstore_attrib pack = ctx->DefaultPacking;
+ struct st_fp_variant *fpv;
st_validate_state(st);
@@ -1125,11 +1276,29 @@ st_CopyPixels(struct gl_context *ctx, GLint srcx, GLint srcy,
return;
}
+ if (blit_copy_pixels(ctx, srcx, srcy, width, height, dstx, dsty, type))
+ return;
+
+ /*
+ * The subsequent code implements glCopyPixels by copying the source
+ * pixels into a temporary texture that's then applied to a textured quad.
+ * When we draw the textured quad, all the usual per-fragment operations
+ * are handled.
+ */
+
+
+ /*
+ * Get vertex/fragment shaders
+ */
if (type == GL_COLOR) {
rbRead = st_get_color_read_renderbuffer(ctx);
color = NULL;
- driver_fp = combined_drawpix_fragment_program(ctx);
+
+ fpv = get_color_fp_variant(st);
+ driver_fp = fpv->driver_shader;
+
driver_vp = make_passthrough_vertex_shader(st, GL_FALSE);
+
if (st->pixel_xfer.pixelmap_enabled) {
sv[1] = st->pixel_xfer.pixelmap_sampler_view;
num_sampler_view++;
@@ -1139,10 +1308,17 @@ st_CopyPixels(struct gl_context *ctx, GLint srcx, GLint srcy,
assert(type == GL_DEPTH);
rbRead = st_renderbuffer(ctx->ReadBuffer->_DepthBuffer);
color = ctx->Current.Attrib[VERT_ATTRIB_COLOR0];
- driver_fp = make_fragment_shader_z_stencil(st, GL_TRUE, GL_FALSE);
+
+ fpv = get_depth_stencil_fp_variant(st, GL_TRUE, GL_FALSE);
+ driver_fp = fpv->driver_shader;
+
driver_vp = make_passthrough_vertex_shader(st, GL_TRUE);
}
+ /* update fragment program constants */
+ st_upload_constants(st, fpv->parameters, PIPE_SHADER_FRAGMENT);
+
+
if (rbRead->Base.Wrapped)
rbRead = st_renderbuffer(rbRead->Base.Wrapped);
@@ -1156,7 +1332,7 @@ st_CopyPixels(struct gl_context *ctx, GLint srcx, GLint srcy,
if (screen->is_format_supported(screen, srcFormat, st->internal_target,
sample_count,
- PIPE_BIND_SAMPLER_VIEW, 0)) {
+ PIPE_BIND_SAMPLER_VIEW)) {
texFormat = srcFormat;
}
else {
@@ -1211,7 +1387,7 @@ st_CopyPixels(struct gl_context *ctx, GLint srcx, GLint srcy,
if (srcFormat == texFormat) {
struct pipe_box src_box;
u_box_2d(readX, readY, readW, readH, &src_box);
- /* copy source framebuffer surface into mipmap/texture */
+ /* copy source framebuffer surface into mipmap/texture */
pipe->resource_copy_region(pipe,
pt, /* dest tex */
0,
@@ -1224,7 +1400,8 @@ st_CopyPixels(struct gl_context *ctx, GLint srcx, GLint srcy,
else {
/* CPU-based fallback/conversion */
struct pipe_transfer *ptRead =
- pipe_get_transfer(st->pipe, rbRead->texture, 0, 0,
+ pipe_get_transfer(st->pipe, rbRead->texture,
+ 0, 0, /* level, layer */
PIPE_TRANSFER_READ,
readX, readY, readW, readH);
struct pipe_transfer *ptTex;
@@ -1245,15 +1422,19 @@ st_CopyPixels(struct gl_context *ctx, GLint srcx, GLint srcy,
if (type == GL_COLOR) {
/* alternate path using get/put_tile() */
GLfloat *buf = (GLfloat *) malloc(width * height * 4 * sizeof(GLfloat));
- pipe_get_tile_rgba(pipe, ptRead, readX, readY, readW, readH, buf);
- pipe_put_tile_rgba(pipe, ptTex, pack.SkipPixels, pack.SkipRows,
- readW, readH, buf);
+ enum pipe_format readFormat, drawFormat;
+ readFormat = util_format_linear(rbRead->texture->format);
+ drawFormat = util_format_linear(pt->format);
+ pipe_get_tile_rgba_format(pipe, ptRead, 0, 0, readW, readH,
+ readFormat, buf);
+ pipe_put_tile_rgba_format(pipe, ptTex, pack.SkipPixels, pack.SkipRows,
+ readW, readH, drawFormat, buf);
free(buf);
}
else {
/* GL_DEPTH */
GLuint *buf = (GLuint *) malloc(width * height * sizeof(GLuint));
- pipe_get_tile_z(pipe, ptRead, readX, readY, readW, readH, buf);
+ pipe_get_tile_z(pipe, ptRead, 0, 0, readW, readH, buf);
pipe_put_tile_z(pipe, ptTex, pack.SkipPixels, pack.SkipRows,
readW, readH, buf);
free(buf);
@@ -1294,7 +1475,7 @@ st_destroy_drawpix(struct st_context *st)
for (i = 0; i < Elements(st->drawpix.shaders); i++) {
if (st->drawpix.shaders[i])
- st_reference_fragprog(st, &st->drawpix.shaders[i], NULL);
+ _mesa_reference_fragprog(st->ctx, &st->drawpix.shaders[i], NULL);
}
st_reference_fragprog(st, &st->pixel_xfer.combined_prog, NULL);
diff --git a/src/mesa/state_tracker/st_cb_drawpixels.h b/src/mesa/state_tracker/st_cb_drawpixels.h
index 575f169e08e..44d7f5ed1e7 100644
--- a/src/mesa/state_tracker/st_cb_drawpixels.h
+++ b/src/mesa/state_tracker/st_cb_drawpixels.h
@@ -31,6 +31,7 @@
#include "main/compiler.h"
+#include "main/mfeatures.h"
struct dd_function_table;
struct st_context;
@@ -42,6 +43,16 @@ extern void st_init_drawpixels_functions(struct dd_function_table *functions);
extern void
st_destroy_drawpix(struct st_context *st);
+extern void
+st_make_drawpix_fragment_program(struct st_context *st,
+ struct gl_fragment_program *fpIn,
+ struct gl_fragment_program **fpOut);
+
+extern struct gl_fragment_program *
+st_make_drawpix_z_stencil_program(struct st_context *st,
+ GLboolean write_depth,
+ GLboolean write_stencil);
+
#else
static INLINE void
diff --git a/src/mesa/state_tracker/st_cb_drawtex.c b/src/mesa/state_tracker/st_cb_drawtex.c
index 6cad7d3216e..86ceb9d78b3 100644
--- a/src/mesa/state_tracker/st_cb_drawtex.c
+++ b/src/mesa/state_tracker/st_cb_drawtex.c
@@ -15,6 +15,7 @@
#include "main/imports.h"
#include "main/image.h"
#include "main/macros.h"
+#include "main/mfeatures.h"
#include "program/program.h"
#include "program/prog_print.h"
@@ -138,6 +139,7 @@ st_DrawTex(struct gl_context *ctx, GLfloat x, GLfloat y, GLfloat z,
/* create the vertex buffer */
vbuffer = pipe_buffer_create(pipe->screen, PIPE_BIND_VERTEX_BUFFER,
+ PIPE_USAGE_STREAM,
numAttribs * 4 * 4 * sizeof(GLfloat));
/* load vertex buffer */
@@ -220,7 +222,7 @@ st_DrawTex(struct gl_context *ctx, GLfloat x, GLfloat y, GLfloat z,
}
}
- pipe_buffer_unmap(pipe, vbuffer, vbuffer_transfer);
+ pipe_buffer_unmap(pipe, vbuffer_transfer);
#undef SET_ATTRIB
}
@@ -229,6 +231,7 @@ st_DrawTex(struct gl_context *ctx, GLfloat x, GLfloat y, GLfloat z,
cso_save_viewport(cso);
cso_save_vertex_shader(cso);
cso_save_vertex_elements(cso);
+ cso_save_vertex_buffers(cso);
{
void *vs = lookup_shader(pipe, numAttribs,
@@ -263,7 +266,7 @@ st_DrawTex(struct gl_context *ctx, GLfloat x, GLfloat y, GLfloat z,
}
- util_draw_vertex_buffer(pipe, vbuffer,
+ util_draw_vertex_buffer(pipe, cso, vbuffer,
0, /* offset */
PIPE_PRIM_TRIANGLE_FAN,
4, /* verts */
@@ -276,6 +279,7 @@ st_DrawTex(struct gl_context *ctx, GLfloat x, GLfloat y, GLfloat z,
cso_restore_viewport(cso);
cso_restore_vertex_shader(cso);
cso_restore_vertex_elements(cso);
+ cso_restore_vertex_buffers(cso);
}
diff --git a/src/mesa/state_tracker/st_cb_drawtex.h b/src/mesa/state_tracker/st_cb_drawtex.h
index d21262f8977..455da04e674 100644
--- a/src/mesa/state_tracker/st_cb_drawtex.h
+++ b/src/mesa/state_tracker/st_cb_drawtex.h
@@ -11,6 +11,7 @@
#include "main/compiler.h"
+#include "main/mfeatures.h"
struct dd_function_table;
struct st_context;
diff --git a/src/mesa/state_tracker/st_cb_eglimage.c b/src/mesa/state_tracker/st_cb_eglimage.c
index c4b84de790c..dfde821fc19 100644
--- a/src/mesa/state_tracker/st_cb_eglimage.c
+++ b/src/mesa/state_tracker/st_cb_eglimage.c
@@ -26,6 +26,7 @@
* Chia-I Wu <olv@lunarg.com>
*/
+#include "main/mfeatures.h"
#include "main/texobj.h"
#include "main/texfetch.h"
#include "main/teximage.h"
diff --git a/src/mesa/state_tracker/st_cb_eglimage.h b/src/mesa/state_tracker/st_cb_eglimage.h
index b6e44d5aff5..48567ed9da5 100644
--- a/src/mesa/state_tracker/st_cb_eglimage.h
+++ b/src/mesa/state_tracker/st_cb_eglimage.h
@@ -30,6 +30,7 @@
#define ST_CB_EGLIMAGE_H
#include "main/compiler.h"
+#include "main/mfeatures.h"
struct dd_function_table;
diff --git a/src/mesa/state_tracker/st_cb_fbo.c b/src/mesa/state_tracker/st_cb_fbo.c
index cd718a31a14..0df04287ae6 100644
--- a/src/mesa/state_tracker/st_cb_fbo.c
+++ b/src/mesa/state_tracker/st_cb_fbo.c
@@ -38,6 +38,7 @@
#include "main/fbobject.h"
#include "main/framebuffer.h"
#include "main/macros.h"
+#include "main/mfeatures.h"
#include "main/renderbuffer.h"
#include "pipe/p_context.h"
@@ -61,7 +62,8 @@
* during window resize.
*/
static GLboolean
-st_renderbuffer_alloc_storage(struct gl_context * ctx, struct gl_renderbuffer *rb,
+st_renderbuffer_alloc_storage(struct gl_context * ctx,
+ struct gl_renderbuffer *rb,
GLenum internalFormat,
GLuint width, GLuint height)
{
@@ -75,12 +77,18 @@ st_renderbuffer_alloc_storage(struct gl_context * ctx, struct gl_renderbuffer *r
if (strb->format != PIPE_FORMAT_NONE)
format = strb->format;
else
- format = st_choose_renderbuffer_format(screen, internalFormat, rb->NumSamples);
-
+ format = st_choose_renderbuffer_format(screen, internalFormat,
+ rb->NumSamples);
+
+ if (format == PIPE_FORMAT_NONE) {
+ return FALSE;
+ }
+
/* init renderbuffer fields */
strb->Base.Width = width;
strb->Base.Height = height;
strb->Base.Format = st_pipe_format_to_mesa_format(format);
+ strb->Base._BaseFormat = _mesa_base_fbo_format(ctx, internalFormat);
strb->Base.DataType = st_format_datatype(format);
strb->defined = GL_FALSE; /* undefined contents now */
@@ -231,6 +239,7 @@ st_new_renderbuffer_fb(enum pipe_format format, int samples, boolean sw)
strb->Base.ClassID = 0x4242; /* just a unique value */
strb->Base.NumSamples = samples;
strb->Base.Format = st_pipe_format_to_mesa_format(format);
+ strb->Base._BaseFormat = _mesa_get_format_base_format(strb->Base.Format);
strb->Base.DataType = st_format_datatype(format);
strb->format = format;
strb->software = sw;
@@ -387,7 +396,7 @@ st_render_texture(struct gl_context *ctx,
/* new surface for rendering into the texture */
memset(&surf_tmpl, 0, sizeof(surf_tmpl));
- surf_tmpl.format = strb->texture->format;
+ surf_tmpl.format = ctx->Color.sRGBEnabled ? strb->texture->format : util_format_linear(strb->texture->format);
surf_tmpl.usage = PIPE_BIND_RENDER_TARGET;
surf_tmpl.u.tex.level = strb->rtt_level;
surf_tmpl.u.tex.first_layer = strb->rtt_face + strb->rtt_slice;
@@ -422,14 +431,11 @@ static void
st_finish_render_texture(struct gl_context *ctx,
struct gl_renderbuffer_attachment *att)
{
- struct st_context *st = st_context(ctx);
struct st_renderbuffer *strb = st_renderbuffer(att->Renderbuffer);
if (!strb)
return;
- st_flush(st, PIPE_FLUSH_RENDER_CACHE, NULL);
-
strb->rtt = NULL;
/*
@@ -445,11 +451,14 @@ st_finish_render_texture(struct gl_context *ctx,
* Validate a renderbuffer attachment for a particular set of bindings.
*/
static GLboolean
-st_validate_attachment(struct pipe_screen *screen,
+st_validate_attachment(struct gl_context *ctx,
+ struct pipe_screen *screen,
const struct gl_renderbuffer_attachment *att,
unsigned bindings)
{
const struct st_texture_object *stObj = st_texture_object(att->Texture);
+ enum pipe_format format;
+ gl_format texFormat;
/* Only validate texture attachments for now, since
* st_renderbuffer_alloc_storage makes sure that
@@ -461,9 +470,22 @@ st_validate_attachment(struct pipe_screen *screen,
if (!stObj)
return GL_FALSE;
- return screen->is_format_supported(screen, stObj->pt->format,
+ format = stObj->pt->format;
+ texFormat =
+ stObj->base.Image[att->CubeMapFace][att->TextureLevel]->TexFormat;
+
+ /* If the encoding is sRGB and sRGB rendering cannot be enabled,
+ * check for linear format support instead.
+ * Later when we create a surface, we change the format to a linear one. */
+ if (!ctx->Const.sRGBCapable &&
+ _mesa_get_format_color_encoding(texFormat) == GL_SRGB) {
+ const gl_format linearFormat = _mesa_get_srgb_format_linear(texFormat);
+ format = st_mesa_format_to_pipe_format(linearFormat);
+ }
+
+ return screen->is_format_supported(screen, format,
PIPE_TEXTURE_2D,
- stObj->pt->nr_samples, bindings, 0);
+ stObj->pt->nr_samples, bindings);
}
@@ -525,20 +547,23 @@ st_validate_framebuffer(struct gl_context *ctx, struct gl_framebuffer *fb)
return;
}
- if (!st_validate_attachment(screen,
+ if (!st_validate_attachment(ctx,
+ screen,
depth,
PIPE_BIND_DEPTH_STENCIL)) {
fb->_Status = GL_FRAMEBUFFER_UNSUPPORTED_EXT;
return;
}
- if (!st_validate_attachment(screen,
+ if (!st_validate_attachment(ctx,
+ screen,
stencil,
PIPE_BIND_DEPTH_STENCIL)) {
fb->_Status = GL_FRAMEBUFFER_UNSUPPORTED_EXT;
return;
}
for (i = 0; i < ctx->Const.MaxColorAttachments; i++) {
- if (!st_validate_attachment(screen,
+ if (!st_validate_attachment(ctx,
+ screen,
&fb->Attachment[BUFFER_COLOR0 + i],
PIPE_BIND_RENDER_TARGET)) {
fb->_Status = GL_FRAMEBUFFER_UNSUPPORTED_EXT;
diff --git a/src/mesa/state_tracker/st_cb_feedback.c b/src/mesa/state_tracker/st_cb_feedback.c
index 5c01856f033..9b85a39bedd 100644
--- a/src/mesa/state_tracker/st_cb_feedback.c
+++ b/src/mesa/state_tracker/st_cb_feedback.c
@@ -40,6 +40,7 @@
#include "main/imports.h"
#include "main/context.h"
#include "main/feedback.h"
+#include "main/mfeatures.h"
#include "vbo/vbo.h"
diff --git a/src/mesa/state_tracker/st_cb_feedback.h b/src/mesa/state_tracker/st_cb_feedback.h
index f2342f58238..02e34e40271 100644
--- a/src/mesa/state_tracker/st_cb_feedback.h
+++ b/src/mesa/state_tracker/st_cb_feedback.h
@@ -31,6 +31,7 @@
#include "main/compiler.h"
+#include "main/mfeatures.h"
struct dd_function_table;
diff --git a/src/mesa/state_tracker/st_cb_flush.c b/src/mesa/state_tracker/st_cb_flush.c
index 5a2343d3aec..0e27cb9a3fd 100644
--- a/src/mesa/state_tracker/st_cb_flush.c
+++ b/src/mesa/state_tracker/st_cb_flush.c
@@ -76,7 +76,7 @@ display_front_buffer(struct st_context *st)
}
-void st_flush( struct st_context *st, uint pipeFlushFlags,
+void st_flush( struct st_context *st,
struct pipe_fence_handle **fence )
{
FLUSH_CURRENT(st->ctx, 0);
@@ -89,7 +89,7 @@ void st_flush( struct st_context *st, uint pipeFlushFlags,
util_blit_flush(st->blit);
util_gen_mipmap_flush(st->gen_mipmap);
- st->pipe->flush( st->pipe, pipeFlushFlags, fence );
+ st->pipe->flush( st->pipe, fence );
}
@@ -100,10 +100,11 @@ void st_finish( struct st_context *st )
{
struct pipe_fence_handle *fence = NULL;
- st_flush(st, PIPE_FLUSH_RENDER_CACHE | PIPE_FLUSH_FRAME, &fence);
+ st_flush(st, &fence);
if(fence) {
- st->pipe->screen->fence_finish(st->pipe->screen, fence, 0);
+ st->pipe->screen->fence_finish(st->pipe->screen, fence,
+ PIPE_TIMEOUT_INFINITE);
st->pipe->screen->fence_reference(st->pipe->screen, &fence, NULL);
}
}
@@ -122,7 +123,7 @@ static void st_glFlush(struct gl_context *ctx)
* synchronization issues. Calling finish() here will just hide
* problems that need to be fixed elsewhere.
*/
- st_flush(st, PIPE_FLUSH_RENDER_CACHE | PIPE_FLUSH_FRAME, NULL);
+ st_flush(st, NULL);
if (is_front_buffer_dirty(st)) {
display_front_buffer(st);
diff --git a/src/mesa/state_tracker/st_cb_flush.h b/src/mesa/state_tracker/st_cb_flush.h
index 7672b4cf1da..598536ba045 100644
--- a/src/mesa/state_tracker/st_cb_flush.h
+++ b/src/mesa/state_tracker/st_cb_flush.h
@@ -40,7 +40,7 @@ extern void
st_init_flush_functions(struct dd_function_table *functions);
extern void
-st_flush(struct st_context *st, uint pipeFlushFlags,
+st_flush(struct st_context *st,
struct pipe_fence_handle **fence);
extern void
diff --git a/src/mesa/state_tracker/st_cb_program.c b/src/mesa/state_tracker/st_cb_program.c
index 4d83fcc6ccb..32694975d17 100644
--- a/src/mesa/state_tracker/st_cb_program.c
+++ b/src/mesa/state_tracker/st_cb_program.c
@@ -46,16 +46,13 @@
#include "st_cb_program.h"
-static GLuint SerialNo = 1;
-
/**
* Called via ctx->Driver.BindProgram() to bind an ARB vertex or
* fragment program.
*/
-static void st_bind_program( struct gl_context *ctx,
- GLenum target,
- struct gl_program *prog )
+static void
+st_bind_program(struct gl_context *ctx, GLenum target, struct gl_program *prog)
{
struct st_context *st = st_context(ctx);
@@ -77,7 +74,8 @@ static void st_bind_program( struct gl_context *ctx,
* Called via ctx->Driver.UseProgram() to bind a linked GLSL program
* (vertex shader + fragment shader).
*/
-static void st_use_program( struct gl_context *ctx, struct gl_shader_program *shProg)
+static void
+st_use_program(struct gl_context *ctx, struct gl_shader_program *shProg)
{
struct st_context *st = st_context(ctx);
@@ -87,48 +85,28 @@ static void st_use_program( struct gl_context *ctx, struct gl_shader_program *sh
}
-
/**
* Called via ctx->Driver.NewProgram() to allocate a new vertex or
* fragment program.
*/
-static struct gl_program *st_new_program( struct gl_context *ctx,
- GLenum target,
- GLuint id )
+static struct gl_program *
+st_new_program(struct gl_context *ctx, GLenum target, GLuint id)
{
switch (target) {
case GL_VERTEX_PROGRAM_ARB: {
struct st_vertex_program *prog = ST_CALLOC_STRUCT(st_vertex_program);
-
- prog->serialNo = SerialNo++;
-
- return _mesa_init_vertex_program( ctx,
- &prog->Base,
- target,
- id );
+ return _mesa_init_vertex_program(ctx, &prog->Base, target, id);
}
case GL_FRAGMENT_PROGRAM_ARB:
case GL_FRAGMENT_PROGRAM_NV: {
struct st_fragment_program *prog = ST_CALLOC_STRUCT(st_fragment_program);
-
- prog->serialNo = SerialNo++;
-
- return _mesa_init_fragment_program( ctx,
- &prog->Base,
- target,
- id );
+ return _mesa_init_fragment_program(ctx, &prog->Base, target, id);
}
case MESA_GEOMETRY_PROGRAM: {
struct st_geometry_program *prog = ST_CALLOC_STRUCT(st_geometry_program);
-
- prog->serialNo = SerialNo++;
-
- return _mesa_init_geometry_program( ctx,
- &prog->Base,
- target,
- id );
+ return _mesa_init_geometry_program(ctx, &prog->Base, target, id);
}
default:
@@ -138,7 +116,10 @@ static struct gl_program *st_new_program( struct gl_context *ctx,
}
-void
+/**
+ * Called via ctx->Driver.DeleteProgram()
+ */
+static void
st_delete_program(struct gl_context *ctx, struct gl_program *prog)
{
struct st_context *st = st_context(ctx);
@@ -147,17 +128,15 @@ st_delete_program(struct gl_context *ctx, struct gl_program *prog)
case GL_VERTEX_PROGRAM_ARB:
{
struct st_vertex_program *stvp = (struct st_vertex_program *) prog;
- st_vp_release_varients( st, stvp );
+ st_release_vp_variants( st, stvp );
}
break;
case MESA_GEOMETRY_PROGRAM:
{
- struct st_geometry_program *stgp = (struct st_geometry_program *) prog;
+ struct st_geometry_program *stgp =
+ (struct st_geometry_program *) prog;
- if (stgp->driver_shader) {
- cso_delete_geometry_shader(st->cso_context, stgp->driver_shader);
- stgp->driver_shader = NULL;
- }
+ st_release_gp_variants(st, stgp);
if (stgp->tgsi.tokens) {
st_free_tokens((void *) stgp->tgsi.tokens);
@@ -167,23 +146,15 @@ st_delete_program(struct gl_context *ctx, struct gl_program *prog)
break;
case GL_FRAGMENT_PROGRAM_ARB:
{
- struct st_fragment_program *stfp = (struct st_fragment_program *) prog;
+ struct st_fragment_program *stfp =
+ (struct st_fragment_program *) prog;
- if (stfp->driver_shader) {
- cso_delete_fragment_shader(st->cso_context, stfp->driver_shader);
- stfp->driver_shader = NULL;
- }
+ st_release_fp_variants(st, stfp);
if (stfp->tgsi.tokens) {
st_free_tokens(stfp->tgsi.tokens);
stfp->tgsi.tokens = NULL;
}
-
- if (stfp->bitmap_program) {
- struct gl_program *prg = &stfp->bitmap_program->Base.Base;
- _mesa_reference_program(ctx, &prg, NULL);
- stfp->bitmap_program = NULL;
- }
}
break;
default:
@@ -195,15 +166,25 @@ st_delete_program(struct gl_context *ctx, struct gl_program *prog)
}
-static GLboolean st_is_program_native( struct gl_context *ctx,
- GLenum target,
- struct gl_program *prog )
+/**
+ * Called via ctx->Driver.IsProgramNative()
+ */
+static GLboolean
+st_is_program_native(struct gl_context *ctx,
+ GLenum target,
+ struct gl_program *prog)
{
return GL_TRUE;
}
-static GLboolean st_program_string_notify( struct gl_context *ctx,
+/**
+ * Called via ctx->Driver.ProgramStringNotify()
+ * Called when the program's text/code is changed. We have to free
+ * all shader variants and corresponding gallium shaders when this happens.
+ */
+static GLboolean
+st_program_string_notify( struct gl_context *ctx,
GLenum target,
struct gl_program *prog )
{
@@ -212,12 +193,7 @@ static GLboolean st_program_string_notify( struct gl_context *ctx,
if (target == GL_FRAGMENT_PROGRAM_ARB) {
struct st_fragment_program *stfp = (struct st_fragment_program *) prog;
- stfp->serialNo++;
-
- if (stfp->driver_shader) {
- cso_delete_fragment_shader(st->cso_context, stfp->driver_shader);
- stfp->driver_shader = NULL;
- }
+ st_release_fp_variants(st, stfp);
if (stfp->tgsi.tokens) {
st_free_tokens(stfp->tgsi.tokens);
@@ -230,12 +206,7 @@ static GLboolean st_program_string_notify( struct gl_context *ctx,
else if (target == MESA_GEOMETRY_PROGRAM) {
struct st_geometry_program *stgp = (struct st_geometry_program *) prog;
- stgp->serialNo++;
-
- if (stgp->driver_shader) {
- cso_delete_geometry_shader(st->cso_context, stgp->driver_shader);
- stgp->driver_shader = NULL;
- }
+ st_release_gp_variants(st, stgp);
if (stgp->tgsi.tokens) {
st_free_tokens((void *) stgp->tgsi.tokens);
@@ -248,9 +219,7 @@ static GLboolean st_program_string_notify( struct gl_context *ctx,
else if (target == GL_VERTEX_PROGRAM_ARB) {
struct st_vertex_program *stvp = (struct st_vertex_program *) prog;
- stvp->serialNo++;
-
- st_vp_release_varients( st, stvp );
+ st_release_vp_variants( st, stvp );
if (st->vp == stvp)
st->dirty.st |= ST_NEW_VERTEX_PROGRAM;
@@ -261,8 +230,11 @@ static GLboolean st_program_string_notify( struct gl_context *ctx,
}
-
-void st_init_program_functions(struct dd_function_table *functions)
+/**
+ * Plug in the program and shader-related device driver functions.
+ */
+void
+st_init_program_functions(struct dd_function_table *functions)
{
functions->BindProgram = st_bind_program;
functions->UseProgram = st_use_program;
diff --git a/src/mesa/state_tracker/st_cb_program.h b/src/mesa/state_tracker/st_cb_program.h
index 004afb6d812..091a4439c48 100644
--- a/src/mesa/state_tracker/st_cb_program.h
+++ b/src/mesa/state_tracker/st_cb_program.h
@@ -29,15 +29,10 @@
#define ST_CB_PROGRAM_H
-#include "main/mtypes.h"
-
struct dd_function_table;
extern void
st_init_program_functions(struct dd_function_table *functions);
-extern void
-st_delete_program(struct gl_context *ctx, struct gl_program *prog);
-
#endif
diff --git a/src/mesa/state_tracker/st_cb_queryobj.c b/src/mesa/state_tracker/st_cb_queryobj.c
index aa31b3710b5..d0ac253bcec 100644
--- a/src/mesa/state_tracker/st_cb_queryobj.c
+++ b/src/mesa/state_tracker/st_cb_queryobj.c
@@ -35,6 +35,7 @@
#include "main/imports.h"
#include "main/context.h"
+#include "main/mfeatures.h"
#include "pipe/p_context.h"
#include "pipe/p_defines.h"
@@ -84,6 +85,8 @@ st_BeginQuery(struct gl_context *ctx, struct gl_query_object *q)
/* convert GL query type to Gallium query type */
switch (q->Target) {
+ case GL_ANY_SAMPLES_PASSED:
+ /* fall-through */
case GL_SAMPLES_PASSED_ARB:
type = PIPE_QUERY_OCCLUSION_COUNTER;
break;
diff --git a/src/mesa/state_tracker/st_cb_queryobj.h b/src/mesa/state_tracker/st_cb_queryobj.h
index 017471b0b06..03f0be8372b 100644
--- a/src/mesa/state_tracker/st_cb_queryobj.h
+++ b/src/mesa/state_tracker/st_cb_queryobj.h
@@ -29,6 +29,7 @@
#define ST_CB_QUERYOBJ_H
+#include "main/mfeatures.h"
#include "main/mtypes.h"
/**
diff --git a/src/mesa/state_tracker/st_cb_rasterpos.c b/src/mesa/state_tracker/st_cb_rasterpos.c
index 15a4f602d1d..32d465c5cce 100644
--- a/src/mesa/state_tracker/st_cb_rasterpos.c
+++ b/src/mesa/state_tracker/st_cb_rasterpos.c
@@ -38,6 +38,7 @@
#include "main/imports.h"
#include "main/macros.h"
+#include "main/mfeatures.h"
#include "main/feedback.h"
#include "st_context.h"
diff --git a/src/mesa/state_tracker/st_cb_rasterpos.h b/src/mesa/state_tracker/st_cb_rasterpos.h
index 2dc109bb184..b61411bd20c 100644
--- a/src/mesa/state_tracker/st_cb_rasterpos.h
+++ b/src/mesa/state_tracker/st_cb_rasterpos.h
@@ -30,6 +30,7 @@
#include "main/compiler.h"
+#include "main/mfeatures.h"
struct dd_function_table;
diff --git a/src/mesa/state_tracker/st_cb_readpixels.c b/src/mesa/state_tracker/st_cb_readpixels.c
index 0507be74578..f8da2a4d158 100644
--- a/src/mesa/state_tracker/st_cb_readpixels.c
+++ b/src/mesa/state_tracker/st_cb_readpixels.c
@@ -38,9 +38,11 @@
#include "main/context.h"
#include "main/image.h"
#include "main/pack.h"
+#include "main/pbo.h"
#include "pipe/p_context.h"
#include "pipe/p_defines.h"
+#include "util/u_format.h"
#include "util/u_inlines.h"
#include "util/u_tile.h"
@@ -336,6 +338,7 @@ st_readpixels(struct gl_context *ctx, GLint x, GLint y, GLsizei width, GLsizei h
struct st_renderbuffer *strb;
struct gl_pixelstore_attrib clippedPacking = *pack;
struct pipe_transfer *trans;
+ enum pipe_format pformat;
assert(ctx->ReadBuffer->Width > 0);
@@ -421,6 +424,9 @@ st_readpixels(struct gl_context *ctx, GLint x, GLint y, GLsizei width, GLsizei h
yStep = 1;
}
+ /* possibly convert sRGB format to linear RGB format */
+ pformat = util_format_linear(trans->resource->format);
+
if (ST_DEBUG & DEBUG_FALLBACK)
debug_printf("%s: fallback processing\n", __FUNCTION__);
@@ -435,8 +441,8 @@ st_readpixels(struct gl_context *ctx, GLint x, GLint y, GLsizei width, GLsizei h
const GLint dstStride = _mesa_image_row_stride(&clippedPacking, width,
format, type);
- if (trans->resource->format == PIPE_FORMAT_Z24_UNORM_S8_USCALED ||
- trans->resource->format == PIPE_FORMAT_Z24X8_UNORM) {
+ if (pformat == PIPE_FORMAT_Z24_UNORM_S8_USCALED ||
+ pformat == PIPE_FORMAT_Z24X8_UNORM) {
if (format == GL_DEPTH_COMPONENT) {
for (i = 0; i < height; i++) {
GLuint ztemp[MAX_WIDTH];
@@ -467,8 +473,8 @@ st_readpixels(struct gl_context *ctx, GLint x, GLint y, GLsizei width, GLsizei h
}
}
}
- else if (trans->resource->format == PIPE_FORMAT_S8_USCALED_Z24_UNORM ||
- trans->resource->format == PIPE_FORMAT_X8Z24_UNORM) {
+ else if (pformat == PIPE_FORMAT_S8_USCALED_Z24_UNORM ||
+ pformat == PIPE_FORMAT_X8Z24_UNORM) {
if (format == GL_DEPTH_COMPONENT) {
for (i = 0; i < height; i++) {
GLuint ztemp[MAX_WIDTH];
@@ -494,7 +500,7 @@ st_readpixels(struct gl_context *ctx, GLint x, GLint y, GLsizei width, GLsizei h
}
}
}
- else if (trans->resource->format == PIPE_FORMAT_Z16_UNORM) {
+ else if (pformat == PIPE_FORMAT_Z16_UNORM) {
for (i = 0; i < height; i++) {
GLushort ztemp[MAX_WIDTH];
GLfloat zfloat[MAX_WIDTH];
@@ -509,7 +515,7 @@ st_readpixels(struct gl_context *ctx, GLint x, GLint y, GLsizei width, GLsizei h
dst += dstStride;
}
}
- else if (trans->resource->format == PIPE_FORMAT_Z32_UNORM) {
+ else if (pformat == PIPE_FORMAT_Z32_UNORM) {
for (i = 0; i < height; i++) {
GLuint ztemp[MAX_WIDTH];
GLfloat zfloat[MAX_WIDTH];
@@ -528,7 +534,8 @@ st_readpixels(struct gl_context *ctx, GLint x, GLint y, GLsizei width, GLsizei h
/* RGBA format */
/* Do a row at a time to flip image data vertically */
for (i = 0; i < height; i++) {
- pipe_get_tile_rgba(pipe, trans, 0, y, width, 1, df);
+ pipe_get_tile_rgba_format(pipe, trans, 0, y, width, 1,
+ pformat, df);
y += yStep;
df += dfStride;
if (!dfStride) {
diff --git a/src/mesa/state_tracker/st_cb_readpixels.h b/src/mesa/state_tracker/st_cb_readpixels.h
index 83c9b659e3d..9622ae6feea 100644
--- a/src/mesa/state_tracker/st_cb_readpixels.h
+++ b/src/mesa/state_tracker/st_cb_readpixels.h
@@ -29,9 +29,11 @@
#ifndef ST_CB_READPIXELS_H
#define ST_CB_READPIXELS_H
-#include "main/mtypes.h"
+#include "main/glheader.h"
struct dd_function_table;
+struct gl_context;
+struct gl_pixelstore_attrib;
extern struct st_renderbuffer *
st_get_color_read_renderbuffer(struct gl_context *ctx);
diff --git a/src/mesa/state_tracker/st_cb_syncobj.c b/src/mesa/state_tracker/st_cb_syncobj.c
new file mode 100644
index 00000000000..d575a84974b
--- /dev/null
+++ b/src/mesa/state_tracker/st_cb_syncobj.c
@@ -0,0 +1,122 @@
+/**************************************************************************
+ *
+ * Copyright 2011 Marek Olšák <maraeo@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, 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 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.
+ *
+ **************************************************************************/
+
+ /*
+ * Authors:
+ * Marek Olšák <maraeo@gmail.com>
+ */
+
+#include "main/glheader.h"
+#include "main/macros.h"
+#include "pipe/p_context.h"
+#include "pipe/p_screen.h"
+#include "st_context.h"
+#include "st_cb_syncobj.h"
+
+struct st_sync_object {
+ struct gl_sync_object b;
+
+ struct pipe_fence_handle *fence;
+};
+
+
+static struct gl_sync_object * st_new_sync_object(struct gl_context *ctx,
+ GLenum type)
+{
+ if (type == GL_SYNC_FENCE)
+ return (struct gl_sync_object*)CALLOC_STRUCT(st_sync_object);
+ else
+ return NULL;
+}
+
+static void st_delete_sync_object(struct gl_context *ctx,
+ struct gl_sync_object *obj)
+{
+ struct pipe_screen *screen = st_context(ctx)->pipe->screen;
+ struct st_sync_object *so = (struct st_sync_object*)obj;
+
+ screen->fence_reference(screen, &so->fence, NULL);
+ FREE(so);
+}
+
+static void st_fence_sync(struct gl_context *ctx, struct gl_sync_object *obj,
+ GLenum condition, GLbitfield flags)
+{
+ struct pipe_context *pipe = st_context(ctx)->pipe;
+ struct st_sync_object *so = (struct st_sync_object*)obj;
+
+ assert(condition == GL_SYNC_GPU_COMMANDS_COMPLETE && flags == 0);
+ assert(so->fence == NULL);
+
+ pipe->flush(pipe, &so->fence);
+}
+
+static void st_check_sync(struct gl_context *ctx, struct gl_sync_object *obj)
+{
+ struct pipe_screen *screen = st_context(ctx)->pipe->screen;
+ struct st_sync_object *so = (struct st_sync_object*)obj;
+
+ if (so->fence && screen->fence_signalled(screen, so->fence)) {
+ screen->fence_reference(screen, &so->fence, NULL);
+ so->b.StatusFlag = GL_TRUE;
+ }
+}
+
+static void st_client_wait_sync(struct gl_context *ctx,
+ struct gl_sync_object *obj,
+ GLbitfield flags, GLuint64 timeout)
+{
+ struct pipe_screen *screen = st_context(ctx)->pipe->screen;
+ struct st_sync_object *so = (struct st_sync_object*)obj;
+
+ /* We don't care about GL_SYNC_FLUSH_COMMANDS_BIT, because flush is
+ * already called when creating a fence. */
+
+ if (so->fence &&
+ screen->fence_finish(screen, so->fence, timeout)) {
+ screen->fence_reference(screen, &so->fence, NULL);
+ so->b.StatusFlag = GL_TRUE;
+ }
+}
+
+static void st_server_wait_sync(struct gl_context *ctx,
+ struct gl_sync_object *obj,
+ GLbitfield flags, GLuint64 timeout)
+{
+ /* NO-OP.
+ * Neither Gallium nor DRM interfaces support blocking on the GPU. */
+}
+
+void st_init_syncobj_functions(struct dd_function_table *functions)
+{
+ functions->NewSyncObject = st_new_sync_object;
+ functions->FenceSync = st_fence_sync;
+ functions->DeleteSyncObject = st_delete_sync_object;
+ functions->CheckSync = st_check_sync;
+ functions->ClientWaitSync = st_client_wait_sync;
+ functions->ServerWaitSync = st_server_wait_sync;
+}
diff --git a/src/mesa/state_tracker/st_cb_syncobj.h b/src/mesa/state_tracker/st_cb_syncobj.h
new file mode 100644
index 00000000000..c254684780c
--- /dev/null
+++ b/src/mesa/state_tracker/st_cb_syncobj.h
@@ -0,0 +1,38 @@
+/**************************************************************************
+ *
+ * Copyright 2011 Marek Olšák <maraeo@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, 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 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_SYNCOBJ_H
+#define ST_CB_SYNCOBJ_H
+
+
+struct dd_function_table;
+
+extern void
+st_init_syncobj_functions(struct dd_function_table *functions);
+
+
+#endif /* ST_CB_SYNCOBJ_H */
diff --git a/src/mesa/state_tracker/st_cb_texture.c b/src/mesa/state_tracker/st_cb_texture.c
index 866426a7549..9d5eb113ff7 100644
--- a/src/mesa/state_tracker/st_cb_texture.c
+++ b/src/mesa/state_tracker/st_cb_texture.c
@@ -35,6 +35,7 @@
#include "main/macros.h"
#include "main/mipmap.h"
#include "main/pack.h"
+#include "main/pbo.h"
#include "main/pixeltransfer.h"
#include "main/texcompress.h"
#include "main/texfetch.h"
@@ -74,19 +75,18 @@ gl_target_to_pipe(GLenum target)
switch (target) {
case GL_TEXTURE_1D:
return PIPE_TEXTURE_1D;
-
case GL_TEXTURE_2D:
return PIPE_TEXTURE_2D;
-
case GL_TEXTURE_RECTANGLE_NV:
return PIPE_TEXTURE_RECT;
-
case GL_TEXTURE_3D:
return PIPE_TEXTURE_3D;
-
case GL_TEXTURE_CUBE_MAP_ARB:
return PIPE_TEXTURE_CUBE;
-
+ case GL_TEXTURE_1D_ARRAY_EXT:
+ return PIPE_TEXTURE_1D_ARRAY;
+ case GL_TEXTURE_2D_ARRAY_EXT:
+ return PIPE_TEXTURE_2D_ARRAY;
default:
assert(0);
return 0;
@@ -217,7 +217,6 @@ default_bindings(struct st_context *st, enum pipe_format format)
{
struct pipe_screen *screen = st->pipe->screen;
const unsigned target = PIPE_TEXTURE_2D;
- const unsigned geom = 0x0;
unsigned bindings;
if (util_format_is_depth_or_stencil(format))
@@ -225,10 +224,17 @@ default_bindings(struct st_context *st, enum pipe_format format)
else
bindings = PIPE_BIND_SAMPLER_VIEW | PIPE_BIND_RENDER_TARGET;
- if (screen->is_format_supported(screen, format, target, 0, bindings, geom))
+ if (screen->is_format_supported(screen, format, target, 0, bindings))
return bindings;
- else
- return PIPE_BIND_SAMPLER_VIEW;
+ else {
+ /* Try non-sRGB. */
+ format = util_format_linear(format);
+
+ if (screen->is_format_supported(screen, format, target, 0, bindings))
+ return bindings;
+ else
+ return PIPE_BIND_SAMPLER_VIEW;
+ }
}
@@ -261,6 +267,55 @@ get_texture_dims(GLenum target)
/**
+ * Given the size of a mipmap image, try to compute the size of the level=0
+ * mipmap image.
+ *
+ * Note that this isn't always accurate for odd-sized, non-POW textures.
+ * For example, if level=1 and width=40 then the level=0 width may be 80 or 81.
+ *
+ * \return GL_TRUE for success, GL_FALSE for failure
+ */
+static GLboolean
+guess_base_level_size(GLenum target,
+ GLuint width, GLuint height, GLuint depth, GLuint level,
+ GLuint *width0, GLuint *height0, GLuint *depth0)
+{
+ const GLuint dims = get_texture_dims(target);
+
+ assert(width >= 1);
+ assert(height >= 1);
+ assert(depth >= 1);
+
+ if (level > 0) {
+ /* Depending on the image's size, we can't always make a guess here */
+ if ((dims >= 1 && width == 1) ||
+ (dims >= 2 && height == 1) ||
+ (dims >= 3 && depth == 1)) {
+ /* we can't determine the image size at level=0 */
+ return GL_FALSE;
+ }
+
+ /* grow the image size until we hit level = 0 */
+ while (level > 0) {
+ if (width > 1)
+ width <<= 1;
+ if (height > 1)
+ height <<= 1;
+ if (depth > 1)
+ depth <<= 1;
+ level--;
+ }
+ }
+
+ *width0 = width;
+ *height0 = height;
+ *depth0 = depth;
+
+ return GL_TRUE;
+}
+
+
+/**
* Try to allocate a pipe_resource object for the given st_texture_object.
*
* We use the given st_texture_image as a clue to determine the size of the
@@ -273,50 +328,27 @@ guess_and_alloc_texture(struct st_context *st,
struct st_texture_object *stObj,
const struct st_texture_image *stImage)
{
- const GLuint dims = get_texture_dims(stObj->base.Target);
- GLuint level, lastLevel, width, height, depth;
+ GLuint lastLevel, width, height, depth;
GLuint bindings;
+ GLuint ptWidth, ptHeight, ptDepth, ptLayers;
enum pipe_format fmt;
DBG("%s\n", __FUNCTION__);
assert(!stObj->pt);
- level = stImage->level;
- width = stImage->base.Width2; /* size w/out border */
- height = stImage->base.Height2;
- depth = stImage->base.Depth2;
-
- assert(width > 0);
- assert(height > 0);
- assert(depth > 0);
-
- /* Depending on the image's size, we can't always make a guess here.
- */
- if (level > 0) {
- if ( (dims >= 1 && width == 1) ||
- (dims >= 2 && height == 1) ||
- (dims >= 3 && depth == 1) ) {
- /* we can't determine the image size at level=0 */
- stObj->width0 = stObj->height0 = stObj->depth0 = 0;
- /* this is not an out of memory error */
- return GL_TRUE;
- }
+ if (!guess_base_level_size(stObj->base.Target,
+ stImage->base.Width2,
+ stImage->base.Height2,
+ stImage->base.Depth2,
+ stImage->level,
+ &width, &height, &depth)) {
+ /* we can't determine the image size at level=0 */
+ stObj->width0 = stObj->height0 = stObj->depth0 = 0;
+ /* this is not an out of memory error */
+ return GL_TRUE;
}
- /* grow the image size until we hit level = 0 */
- while (level > 0) {
- if (width != 1)
- width <<= 1;
- if (height != 1)
- height <<= 1;
- if (depth != 1)
- depth <<= 1;
- level--;
- }
-
- assert(level == 0);
-
/* At this point, (width x height x depth) is the expected size of
* the level=0 mipmap image.
*/
@@ -353,13 +385,18 @@ guess_and_alloc_texture(struct st_context *st,
bindings = default_bindings(st, fmt);
+ st_gl_texture_dims_to_pipe_dims(stObj->base.Target,
+ width, height, depth,
+ &ptWidth, &ptHeight, &ptDepth, &ptLayers);
+
stObj->pt = st_texture_create(st,
gl_target_to_pipe(stObj->base.Target),
fmt,
lastLevel,
- width,
- height,
- depth,
+ ptWidth,
+ ptHeight,
+ ptDepth,
+ ptLayers,
bindings);
DBG("%s returning %d\n", __FUNCTION__, (stObj->pt != NULL));
@@ -407,125 +444,6 @@ strip_texture_border(GLint border,
/**
- * Try to do texture compression via rendering. If the Gallium driver
- * can render into a compressed surface this will allow us to do texture
- * compression.
- * \return GL_TRUE for success, GL_FALSE for failure
- */
-static GLboolean
-compress_with_blit(struct gl_context * ctx,
- GLenum target, GLint level,
- GLint xoffset, GLint yoffset, GLint zoffset,
- GLint width, GLint height, GLint depth,
- GLenum format, GLenum type, const void *pixels,
- const struct gl_pixelstore_attrib *unpack,
- struct gl_texture_image *texImage)
-{
- const GLuint dstImageOffsets[1] = {0};
- struct st_texture_image *stImage = st_texture_image(texImage);
- struct st_context *st = st_context(ctx);
- struct pipe_context *pipe = st->pipe;
- struct pipe_screen *screen = pipe->screen;
- gl_format mesa_format;
- struct pipe_resource templ;
- struct pipe_resource *src_tex;
- struct pipe_sampler_view view_templ;
- struct pipe_sampler_view *src_view;
- struct pipe_surface *dst_surface, surf_tmpl;
- struct pipe_transfer *tex_xfer;
- void *map;
-
- if (!stImage->pt) {
- /* XXX: Can this happen? Should we assert? */
- return GL_FALSE;
- }
-
- /* get destination surface (in the compressed texture) */
- memset(&surf_tmpl, 0, sizeof(surf_tmpl));
- surf_tmpl.format = stImage->pt->format;
- surf_tmpl.usage = PIPE_BIND_RENDER_TARGET;
- surf_tmpl.u.tex.level = stImage->level;
- surf_tmpl.u.tex.first_layer = stImage->face;
- surf_tmpl.u.tex.last_layer = stImage->face;
- dst_surface = pipe->create_surface(pipe, stImage->pt, &surf_tmpl);
- if (!dst_surface) {
- /* can't render into this format (or other problem) */
- return GL_FALSE;
- }
-
- /* Choose format for the temporary RGBA texture image.
- */
- mesa_format = st_ChooseTextureFormat(ctx, GL_RGBA, format, type);
- assert(mesa_format);
- if (!mesa_format)
- return GL_FALSE;
-
- /* Create the temporary source texture
- */
- memset(&templ, 0, sizeof(templ));
- templ.target = st->internal_target;
- templ.format = st_mesa_format_to_pipe_format(mesa_format);
- templ.width0 = width;
- templ.height0 = height;
- templ.depth0 = 1;
- templ.array_size = 1;
- templ.last_level = 0;
- templ.usage = PIPE_USAGE_DEFAULT;
- templ.bind = PIPE_BIND_SAMPLER_VIEW;
- src_tex = screen->resource_create(screen, &templ);
-
- if (!src_tex)
- return GL_FALSE;
-
- /* Put user's tex data into the temporary texture
- */
- tex_xfer = pipe_get_transfer(st_context(ctx)->pipe, src_tex,
- 0, 0, /* layer, level are zero */
- PIPE_TRANSFER_WRITE,
- 0, 0, width, height); /* x, y, w, h */
- map = pipe_transfer_map(pipe, tex_xfer);
-
- _mesa_texstore(ctx, 2, GL_RGBA, mesa_format,
- map, /* dest ptr */
- 0, 0, 0, /* dest x/y/z offset */
- tex_xfer->stride, /* dest row stride (bytes) */
- dstImageOffsets, /* image offsets (for 3D only) */
- width, height, 1, /* size */
- format, type, /* source format/type */
- pixels, /* source data */
- unpack); /* source data packing */
-
- pipe_transfer_unmap(pipe, tex_xfer);
- pipe->transfer_destroy(pipe, tex_xfer);
-
- /* Create temporary sampler view */
- u_sampler_view_default_template(&view_templ,
- src_tex,
- src_tex->format);
- src_view = pipe->create_sampler_view(pipe, src_tex, &view_templ);
-
-
- /* copy / compress image */
- util_blit_pixels_tex(st->blit,
- src_view, /* sampler view (src) */
- 0, 0, /* src x0, y0 */
- width, height, /* src x1, y1 */
- dst_surface, /* pipe_surface (dst) */
- xoffset, yoffset, /* dst x0, y0 */
- xoffset + width, /* dst x1 */
- yoffset + height, /* dst y1 */
- 0.0, /* z */
- PIPE_TEX_MIPFILTER_NEAREST);
-
- pipe_surface_reference(&dst_surface, NULL);
- pipe_resource_reference(&src_tex, NULL);
- pipe_sampler_view_reference(&src_view, NULL);
-
- return GL_TRUE;
-}
-
-
-/**
* Do glTexImage1/2/3D().
*/
static void
@@ -542,7 +460,6 @@ st_TexImage(struct gl_context * ctx,
GLsizei imageSize, GLboolean compressed_src)
{
struct st_context *st = st_context(ctx);
- struct pipe_screen *screen = st->pipe->screen;
struct st_texture_object *stObj = st_texture_object(texObj);
struct st_texture_image *stImage = st_texture_image(texImage);
GLuint dstRowStride = 0;
@@ -669,22 +586,10 @@ st_TexImage(struct gl_context * ctx,
pixels, unpack, "glTexImage");
}
- /* See if we can do texture compression with a blit/render.
- */
- if (!compressed_src &&
- !ctx->Mesa_DXTn &&
- _mesa_is_format_compressed(texImage->TexFormat) &&
- screen->is_format_supported(screen,
- stImage->pt->format,
- stImage->pt->target, 0,
- PIPE_BIND_RENDER_TARGET, 0)) {
- if (!pixels)
- goto done;
-
- if (compress_with_blit(ctx, target, level, 0, 0, 0, width, height, depth,
- format, type, pixels, unpack, texImage)) {
- goto done;
- }
+ /* for a 1D array upload the image as a series of layer with height = 1 */
+ if (target == GL_TEXTURE_1D_ARRAY) {
+ depth = height;
+ height = 1;
}
/*
@@ -918,6 +823,7 @@ decompress_with_blit(struct gl_context * ctx, GLenum target, GLint level,
else {
/* format translation via floats */
GLuint row;
+ enum pipe_format format = util_format_linear(dst_texture->format);
for (row = 0; row < height; row++) {
const GLbitfield transferOps = 0x0; /* bypassed for glGetTexImage() */
GLfloat rgba[4 * MAX_WIDTH];
@@ -928,7 +834,8 @@ decompress_with_blit(struct gl_context * ctx, GLenum target, GLint level,
debug_printf("%s: fallback format translation\n", __FUNCTION__);
/* get float[4] rgba row from surface */
- pipe_get_tile_rgba(pipe, tex_xfer, 0, row, width, 1, rgba);
+ pipe_get_tile_rgba_format(pipe, tex_xfer, 0, row, width, 1,
+ format, rgba);
_mesa_pack_rgba_span_float(ctx, width, (GLfloat (*)[4]) rgba, format,
type, dest, &ctx->Pack, transferOps);
@@ -1073,7 +980,6 @@ st_TexSubimage(struct gl_context *ctx, GLint dims, GLenum target, GLint level,
struct gl_texture_image *texImage)
{
struct st_context *st = st_context(ctx);
- struct pipe_screen *screen = st->pipe->screen;
struct st_texture_image *stImage = st_texture_image(texImage);
GLuint dstRowStride;
const GLuint srcImageStride =
@@ -1093,20 +999,10 @@ st_TexSubimage(struct gl_context *ctx, GLint dims, GLenum target, GLint level,
if (!pixels)
return;
- /* See if we can do texture compression with a blit/render.
- */
- if (!ctx->Mesa_DXTn &&
- _mesa_is_format_compressed(texImage->TexFormat) &&
- screen->is_format_supported(screen,
- stImage->pt->format,
- stImage->pt->target, 0,
- PIPE_BIND_RENDER_TARGET, 0)) {
- if (compress_with_blit(ctx, target, level,
- xoffset, yoffset, zoffset,
- width, height, depth,
- format, type, pixels, packing, texImage)) {
- goto done;
- }
+ /* for a 1D array upload the image as a series of layer with height = 1 */
+ if (target == GL_TEXTURE_1D_ARRAY) {
+ depth = height;
+ height = 1;
}
/* Map buffer if necessary. Need to lock to prevent other contexts
@@ -1387,7 +1283,9 @@ fallback_copy_texsubimage(struct gl_context *ctx, GLenum target, GLint level,
/* XXX this usually involves a lot of int/float conversion.
* try to avoid that someday.
*/
- pipe_get_tile_rgba(pipe, src_trans, 0, 0, width, height, tempSrc);
+ pipe_get_tile_rgba_format(pipe, src_trans, 0, 0, width, height,
+ util_format_linear(strb->texture->format),
+ tempSrc);
/* Store into texture memory.
* Note that this does some special things such as pixel transfer
@@ -1528,6 +1426,9 @@ st_copy_texsubimage(struct gl_context *ctx,
if (texBaseFormat == GL_DEPTH_COMPONENT ||
texBaseFormat == GL_DEPTH_STENCIL) {
strb = st_renderbuffer(fb->_DepthBuffer);
+ if (strb->Base.Wrapped) {
+ strb = st_renderbuffer(strb->Base.Wrapped);
+ }
}
else {
/* texBaseFormat == GL_RGB, GL_RGBA, GL_ALPHA, etc */
@@ -1621,17 +1522,15 @@ st_copy_texsubimage(struct gl_context *ctx,
texBaseFormat != GL_DEPTH_STENCIL &&
screen->is_format_supported(screen, src_format,
PIPE_TEXTURE_2D, sample_count,
- PIPE_BIND_SAMPLER_VIEW,
- 0) &&
+ PIPE_BIND_SAMPLER_VIEW) &&
screen->is_format_supported(screen, dest_format,
PIPE_TEXTURE_2D, 0,
- PIPE_BIND_RENDER_TARGET,
- 0)) {
+ PIPE_BIND_RENDER_TARGET)) {
/* draw textured quad to do the copy */
GLint srcY0, srcY1;
struct pipe_surface surf_tmpl;
memset(&surf_tmpl, 0, sizeof(surf_tmpl));
- surf_tmpl.format = stImage->pt->format;
+ surf_tmpl.format = util_format_linear(stImage->pt->format);
surf_tmpl.usage = PIPE_BIND_RENDER_TARGET;
surf_tmpl.u.tex.level = stImage->level;
surf_tmpl.u.tex.first_layer = stImage->face + destZ;
@@ -1831,6 +1730,7 @@ st_finalize_texture(struct gl_context *ctx,
GLuint face;
struct st_texture_image *firstImage;
enum pipe_format firstImageFormat;
+ GLuint ptWidth, ptHeight, ptDepth, ptLayers;
if (stObj->base._Complete) {
/* The texture is complete and we know exactly how many mipmap levels
@@ -1855,9 +1755,8 @@ st_finalize_texture(struct gl_context *ctx,
* will match.
*/
if (firstImage->pt &&
- stObj->pt &&
firstImage->pt != stObj->pt &&
- firstImage->pt->last_level >= stObj->pt->last_level) {
+ (!stObj->pt || firstImage->pt->last_level >= stObj->pt->last_level)) {
pipe_resource_reference(&stObj->pt, firstImage->pt);
pipe_sampler_view_reference(&stObj->sampler_view, NULL);
}
@@ -1865,6 +1764,24 @@ st_finalize_texture(struct gl_context *ctx,
/* Find gallium format for the Mesa texture */
firstImageFormat = st_mesa_format_to_pipe_format(firstImage->base.TexFormat);
+ /* Find size of level=0 Gallium mipmap image, plus number of texture layers */
+ {
+ GLuint width, height, depth;
+ if (!guess_base_level_size(stObj->base.Target,
+ firstImage->base.Width2,
+ firstImage->base.Height2,
+ firstImage->base.Depth2,
+ stObj->base.BaseLevel,
+ &width, &height, &depth)) {
+ width = stObj->width0;
+ height = stObj->height0;
+ depth = stObj->depth0;
+ }
+ /* convert GL dims to Gallium dims */
+ st_gl_texture_dims_to_pipe_dims(stObj->base.Target, width, height, depth,
+ &ptWidth, &ptHeight, &ptDepth, &ptLayers);
+ }
+
/* If we already have a gallium texture, check that it matches the texture
* object's format, target, size, num_levels, etc.
*/
@@ -1872,9 +1789,10 @@ st_finalize_texture(struct gl_context *ctx,
if (stObj->pt->target != gl_target_to_pipe(stObj->base.Target) ||
!st_sampler_compat_formats(stObj->pt->format, firstImageFormat) ||
stObj->pt->last_level < stObj->lastLevel ||
- stObj->pt->width0 != stObj->width0 ||
- stObj->pt->height0 != stObj->height0 ||
- stObj->pt->depth0 != stObj->depth0)
+ stObj->pt->width0 != ptWidth ||
+ stObj->pt->height0 != ptHeight ||
+ stObj->pt->depth0 != ptDepth ||
+ stObj->pt->array_size != ptLayers)
{
/* The gallium texture does not match the Mesa texture so delete the
* gallium texture now. We'll make a new one below.
@@ -1894,9 +1812,10 @@ st_finalize_texture(struct gl_context *ctx,
gl_target_to_pipe(stObj->base.Target),
firstImageFormat,
stObj->lastLevel,
- stObj->width0,
- stObj->height0,
- stObj->depth0,
+ ptWidth,
+ ptHeight,
+ ptDepth,
+ ptLayers,
bindings);
if (!stObj->pt) {
diff --git a/src/mesa/state_tracker/st_cb_texture.h b/src/mesa/state_tracker/st_cb_texture.h
index 60987055eb1..f1502bda788 100644
--- a/src/mesa/state_tracker/st_cb_texture.h
+++ b/src/mesa/state_tracker/st_cb_texture.h
@@ -31,9 +31,10 @@
#include "main/glheader.h"
-#include "main/mtypes.h"
struct dd_function_table;
+struct gl_context;
+struct gl_texture_object;
struct pipe_context;
struct st_context;
diff --git a/src/gallium/targets/dri-noop/swrast_drm_api.c b/src/mesa/state_tracker/st_cb_texturebarrier.c
index a99779f1837..2f1a22b5888 100644
--- a/src/gallium/targets/dri-noop/swrast_drm_api.c
+++ b/src/mesa/state_tracker/st_cb_texturebarrier.c
@@ -1,8 +1,7 @@
/**************************************************************************
*
- * Copyright 2009, VMware, Inc.
+ * Copyright 2011 Marek Olšák <maraeo@gmail.com>
* All Rights Reserved.
- * Copyright 2010 George Sapountzis <gsapountzis@gmail.com>
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
@@ -19,45 +18,43 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
- * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * 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.
*
**************************************************************************/
-#include "pipe/p_compiler.h"
-#include "util/u_memory.h"
-#include "dri_sw_winsys.h"
-#include "noop/noop_public.h"
-#include "target-helpers/inline_debug_helper.h"
-#include "target-helpers/inline_sw_helper.h"
+/**
+ * glTextureBarrierNV function
+ *
+ * \author Marek Olšák
+ */
-struct pipe_screen *
-drisw_create_screen(struct drisw_loader_funcs *lf)
-{
- struct sw_winsys *winsys = NULL;
- struct pipe_screen *screen = NULL;
+#include "main/imports.h"
+#include "main/context.h"
- winsys = dri_create_sw_winsys(lf);
- if (winsys == NULL)
- return NULL;
+#include "pipe/p_context.h"
+#include "pipe/p_defines.h"
+#include "st_context.h"
+#include "st_cb_texturebarrier.h"
- screen = noop_screen_create(winsys);
- if (!screen)
- goto fail;
- screen = debug_screen_wrap(screen);
+/**
+ * Called via ctx->Driver.TextureBarrier()
+ */
+static void
+st_TextureBarrier(struct gl_context *ctx)
+{
+ struct pipe_context *pipe = st_context(ctx)->pipe;
- return screen;
+ pipe->texture_barrier(pipe);
+}
-fail:
- if (winsys)
- winsys->destroy(winsys);
- return NULL;
+void st_init_texture_barrier_functions(struct dd_function_table *functions)
+{
+ functions->TextureBarrier = st_TextureBarrier;
}
-
-/* vim: set sw=3 ts=8 sts=3 expandtab: */
diff --git a/src/mesa/state_tracker/st_cb_texturebarrier.h b/src/mesa/state_tracker/st_cb_texturebarrier.h
new file mode 100644
index 00000000000..3b7d3776fd5
--- /dev/null
+++ b/src/mesa/state_tracker/st_cb_texturebarrier.h
@@ -0,0 +1,37 @@
+/**************************************************************************
+ *
+ * Copyright 2011 Marek Olšák <maraeo@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, 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.
+ *
+ **************************************************************************/
+
+#ifndef ST_CB_TEXTUREBARRIER_H
+#define ST_CB_TEXTUREBARRIER_H
+
+
+struct dd_function_table;
+
+extern void st_init_texture_barrier_functions(struct dd_function_table *functions);
+
+
+#endif
diff --git a/src/mesa/state_tracker/st_cb_xformfb.c b/src/mesa/state_tracker/st_cb_xformfb.c
index 838a0a4a934..e415b186aa7 100644
--- a/src/mesa/state_tracker/st_cb_xformfb.c
+++ b/src/mesa/state_tracker/st_cb_xformfb.c
@@ -35,6 +35,7 @@
#include "main/imports.h"
#include "main/context.h"
+#include "main/mfeatures.h"
#include "main/transformfeedback.h"
#include "st_cb_xformfb.h"
diff --git a/src/mesa/state_tracker/st_cb_xformfb.h b/src/mesa/state_tracker/st_cb_xformfb.h
index 574cf481e18..1215ebea871 100644
--- a/src/mesa/state_tracker/st_cb_xformfb.h
+++ b/src/mesa/state_tracker/st_cb_xformfb.h
@@ -30,6 +30,7 @@
#include "main/compiler.h"
+#include "main/mfeatures.h"
struct dd_function_table;
diff --git a/src/mesa/state_tracker/st_context.c b/src/mesa/state_tracker/st_context.c
index 6ec9c699a26..5a39ab0a110 100644
--- a/src/mesa/state_tracker/st_context.c
+++ b/src/mesa/state_tracker/st_context.c
@@ -51,7 +51,9 @@
#include "st_cb_texture.h"
#include "st_cb_xformfb.h"
#include "st_cb_flush.h"
+#include "st_cb_syncobj.h"
#include "st_cb_strings.h"
+#include "st_cb_texturebarrier.h"
#include "st_cb_viewport.h"
#include "st_atom.h"
#include "st_draw.h"
@@ -178,7 +180,7 @@ struct st_context *st_create_context(gl_api api, struct pipe_context *pipe,
memset(&funcs, 0, sizeof(funcs));
st_init_driver_functions(&funcs);
- ctx = _mesa_create_context_for_api(api, visual, shareCtx, &funcs, NULL);
+ ctx = _mesa_create_context(api, visual, shareCtx, &funcs, NULL);
/* XXX: need a capability bit in gallium to query if the pipe
* driver prefers DP4 or MUL/MAD for vertex transformation.
@@ -203,14 +205,13 @@ static void st_destroy_context_priv( struct st_context *st )
st_destroy_drawpix(st);
st_destroy_drawtex(st);
- for (i = 0; i < Elements(st->state.sampler_views); i++) {
- pipe_sampler_view_reference(&st->state.sampler_views[i], NULL);
+ /* Unreference any user vertex buffers. */
+ for (i = 0; i < st->num_user_vbs; i++) {
+ pipe_resource_reference(&st->user_vb[i], NULL);
}
- for (i = 0; i < Elements(st->state.constants); i++) {
- if (st->state.constants[i]) {
- pipe_resource_reference(&st->state.constants[i], NULL);
- }
+ for (i = 0; i < Elements(st->state.sampler_views); i++) {
+ pipe_sampler_view_reference(&st->state.sampler_views[i], NULL);
}
if (st->default_texture) {
@@ -245,13 +246,14 @@ void st_destroy_context( struct st_context *st )
for (i = 0; i < PIPE_SHADER_TYPES; i++) {
pipe->set_constant_buffer(pipe, i, 0, NULL);
- pipe_resource_reference(&st->state.constants[i], NULL);
}
_mesa_delete_program_cache(st->ctx, st->pixel_xfer.cache);
_vbo_DestroyContext(st->ctx);
+ st_destroy_program_variants(st);
+
_mesa_free_context_data(ctx);
st_destroy_context_priv(st);
@@ -287,11 +289,13 @@ void st_init_driver_functions(struct dd_function_table *functions)
st_init_cond_render_functions(functions);
st_init_readpixels_functions(functions);
st_init_texture_functions(functions);
+ st_init_texture_barrier_functions(functions);
st_init_flush_functions(functions);
st_init_string_functions(functions);
st_init_viewport_functions(functions);
st_init_xformfb_functions(functions);
+ st_init_syncobj_functions(functions);
functions->UpdateState = st_invalidate_state;
}
diff --git a/src/mesa/state_tracker/st_context.h b/src/mesa/state_tracker/st_context.h
index d342c0cff1e..77765f02379 100644
--- a/src/mesa/state_tracker/st_context.h
+++ b/src/mesa/state_tracker/st_context.h
@@ -1,4 +1,3 @@
-//struct dd_function_table;
/**************************************************************************
*
* Copyright 2003 Tungsten Graphics, Inc., Cedar Park, Texas.
@@ -93,7 +92,10 @@ 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_resource *constants[PIPE_SHADER_TYPES];
+ struct {
+ void *ptr;
+ unsigned size;
+ } constants[PIPE_SHADER_TYPES];
struct pipe_framebuffer_state framebuffer;
struct pipe_sampler_view *sampler_views[PIPE_MAX_SAMPLERS];
struct pipe_scissor_state scissor;
@@ -106,15 +108,6 @@ struct st_context
GLuint poly_stipple[32]; /**< In OpenGL's bottom-to-top order */
} state;
- struct {
- struct st_tracked_state tracked_state[PIPE_SHADER_TYPES];
- } constants;
-
- /* XXX unused: */
- struct {
- struct gl_fragment_program *fragment_program;
- } cb;
-
char vendor[100];
char renderer[100];
@@ -130,7 +123,9 @@ struct st_context
struct st_fragment_program *fp; /**< Currently bound fragment program */
struct st_geometry_program *gp; /**< Currently bound geometry program */
- struct st_vp_varient *vp_varient;
+ struct st_vp_variant *vp_variant;
+ struct st_fp_variant *fp_variant;
+ struct st_gp_variant *gp_variant;
struct gl_texture_object *default_texture;
@@ -160,7 +155,7 @@ struct st_context
/** for glDraw/CopyPixels */
struct {
- struct st_fragment_program *shaders[4];
+ struct gl_fragment_program *shaders[4];
void *vert_shaders[2]; /**< ureg shaders */
} drawpix;
@@ -190,6 +185,11 @@ struct st_context
int force_msaa;
void *winsys_drawable_handle;
+
+ /* User vertex buffers. */
+ struct pipe_resource *user_vb[PIPE_MAX_ATTRIBS];
+ unsigned user_vb_stride[PIPE_MAX_ATTRIBS];
+ unsigned num_user_vbs;
};
diff --git a/src/mesa/state_tracker/st_debug.c b/src/mesa/state_tracker/st_debug.c
index df32491d044..e1e373d07d4 100644
--- a/src/mesa/state_tracker/st_debug.c
+++ b/src/mesa/state_tracker/st_debug.c
@@ -89,8 +89,8 @@ st_print_current(void)
}
#endif
- if (st->vp->varients)
- tgsi_dump( st->vp->varients[0].tgsi.tokens, 0 );
+ if (st->vp->variants)
+ tgsi_dump( st->vp->variants[0].tgsi.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 61a0e1b0877..40afa436292 100644
--- a/src/mesa/state_tracker/st_draw.c
+++ b/src/mesa/state_tracker/st_draw.c
@@ -43,6 +43,7 @@
#include "main/imports.h"
#include "main/image.h"
#include "main/macros.h"
+#include "main/mfeatures.h"
#include "program/prog_uniform.h"
#include "vbo/vbo.h"
@@ -241,15 +242,14 @@ st_pipe_vertex_format(GLenum type, GLuint size, GLenum format,
*/
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)
+ const struct st_vp_variant *vpv,
+ const struct gl_client_array **arrays)
{
GLuint attr;
const struct gl_buffer_object *firstBufObj = NULL;
GLint firstStride = -1;
- GLuint num_client_arrays = 0;
const GLubyte *client_addr = NULL;
+ GLboolean user_memory;
for (attr = 0; attr < vpv->num_inputs; attr++) {
const GLuint mesaAttr = vp->index_to_input[attr];
@@ -258,16 +258,19 @@ is_interleaved_arrays(const struct st_vertex_program *vp,
if (firstStride < 0) {
firstStride = stride;
+ user_memory = !bufObj || !bufObj->Name;
}
else if (firstStride != stride) {
return GL_FALSE;
}
-
+
if (!bufObj || !bufObj->Name) {
- num_client_arrays++;
/* Try to detect if the client-space arrays are
* "close" to each other.
*/
+ if (!user_memory) {
+ return GL_FALSE;
+ }
if (!client_addr) {
client_addr = arrays[mesaAttr]->Ptr;
}
@@ -277,6 +280,9 @@ is_interleaved_arrays(const struct st_vertex_program *vp,
}
}
else if (!firstBufObj) {
+ if (user_memory) {
+ return GL_FALSE;
+ }
firstBufObj = bufObj;
}
else if (bufObj != firstBufObj) {
@@ -284,57 +290,11 @@ is_interleaved_arrays(const struct st_vertex_program *vp,
}
}
- *userSpace = (num_client_arrays == vpv->num_inputs);
- /* debug_printf("user space: %s (%d arrays, %d inputs)\n",
- (int)*userSpace ? "Yes" : "No", num_client_arrays, vp->num_inputs); */
-
return GL_TRUE;
}
/**
- * Compute the memory range occupied by the arrays.
- */
-static void
-get_arrays_bounds(const struct st_vertex_program *vp,
- 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;
-
- /* debug_printf("get_arrays_bounds: Handling %u attrs\n", vpv->num_inputs); */
-
- 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;
- const unsigned sz = (arrays[mesaAttr]->Size *
- _mesa_sizeof_type(arrays[mesaAttr]->Type));
- const GLubyte *end = start + (max_index * stride) + sz;
-
- /* debug_printf("attr %u: stride %d size %u start %p end %p\n",
- attr, stride, sz, start, end); */
-
- if (attr == 0) {
- low_addr = start;
- high_addr = end;
- }
- else {
- low_addr = MIN2(low_addr, start);
- high_addr = MAX2(high_addr, end);
- }
- }
-
- *low = low_addr;
- *high = high_addr;
-}
-
-
-/**
* Set up for drawing interleaved arrays that all live in one VBO
* or all live in user space.
* \param vbuffer returns vertex buffer info
@@ -343,17 +303,27 @@ get_arrays_bounds(const struct st_vertex_program *vp,
static void
setup_interleaved_attribs(struct gl_context *ctx,
const struct st_vertex_program *vp,
- const struct st_vp_varient *vpv,
+ const struct st_vp_variant *vpv,
const struct gl_client_array **arrays,
- GLuint max_index,
- GLboolean userSpace,
struct pipe_vertex_buffer *vbuffer,
- struct pipe_vertex_element velements[])
+ struct pipe_vertex_element velements[],
+ unsigned max_index,
+ unsigned num_instances)
{
struct st_context *st = st_context(ctx);
struct pipe_context *pipe = st->pipe;
GLuint attr;
- const GLubyte *offset0 = NULL;
+ const GLubyte *low_addr = NULL;
+
+ /* Find the lowest address. */
+ if(vpv->num_inputs) {
+ low_addr = arrays[vp->index_to_input[0]]->Ptr;
+
+ for (attr = 1; attr < vpv->num_inputs; attr++) {
+ const GLubyte *start = arrays[vp->index_to_input[attr]]->Ptr;
+ low_addr = MIN2(low_addr, start);
+ }
+ }
for (attr = 0; attr < vpv->num_inputs; attr++) {
const GLuint mesaAttr = vp->index_to_input[attr];
@@ -361,34 +331,31 @@ setup_interleaved_attribs(struct gl_context *ctx,
struct st_buffer_object *stobj = st_buffer_object(bufobj);
GLsizei stride = arrays[mesaAttr]->StrideB;
- /*printf("stobj %u = %p\n", attr, (void*)stobj);*/
-
if (attr == 0) {
- const GLubyte *low, *high;
-
- get_arrays_bounds(vp, vpv, arrays, max_index, &low, &high);
- /* debug_printf("buffer range: %p %p range %d max index %u\n",
- low, high, high - low, max_index); */
-
- offset0 = low;
- if (userSpace) {
+ if (bufobj && bufobj->Name) {
+ vbuffer->buffer = NULL;
+ pipe_resource_reference(&vbuffer->buffer, stobj->buffer);
+ vbuffer->buffer_offset = pointer_to_offset(low_addr);
+ } else {
+ uint divisor = arrays[mesaAttr]->InstanceDivisor;
+ uint length = (divisor ? num_instances / divisor : max_index) + 1;
vbuffer->buffer =
- pipe_user_buffer_create(pipe->screen, (void *) low, high - low,
+ pipe_user_buffer_create(pipe->screen, (void*)low_addr,
+ stride * length,
PIPE_BIND_VERTEX_BUFFER);
vbuffer->buffer_offset = 0;
- }
- else {
- vbuffer->buffer = NULL;
- pipe_resource_reference(&vbuffer->buffer, stobj->buffer);
- vbuffer->buffer_offset = pointer_to_offset(low);
+
+ /* Track user vertex buffers. */
+ pipe_resource_reference(&st->user_vb[0], vbuffer->buffer);
+ st->user_vb_stride[0] = stride;
+ st->num_user_vbs = 1;
}
vbuffer->stride = stride; /* in bytes */
- vbuffer->max_index = max_index;
}
velements[attr].src_offset =
- (unsigned) (arrays[mesaAttr]->Ptr - offset0);
- velements[attr].instance_divisor = 0;
+ (unsigned) (arrays[mesaAttr]->Ptr - low_addr);
+ velements[attr].instance_divisor = arrays[mesaAttr]->InstanceDivisor;
velements[attr].vertex_buffer_index = 0;
velements[attr].src_format =
st_pipe_vertex_format(arrays[mesaAttr]->Type,
@@ -409,12 +376,12 @@ setup_interleaved_attribs(struct gl_context *ctx,
static void
setup_non_interleaved_attribs(struct gl_context *ctx,
const struct st_vertex_program *vp,
- const struct st_vp_varient *vpv,
+ const struct st_vp_variant *vpv,
const struct gl_client_array **arrays,
- GLuint max_index,
- GLboolean *userSpace,
struct pipe_vertex_buffer vbuffer[],
- struct pipe_vertex_element velements[])
+ struct pipe_vertex_element velements[],
+ unsigned max_index,
+ unsigned num_instances)
{
struct st_context *st = st_context(ctx);
struct pipe_context *pipe = st->pipe;
@@ -425,8 +392,6 @@ setup_non_interleaved_attribs(struct gl_context *ctx,
struct gl_buffer_object *bufobj = arrays[mesaAttr]->BufferObj;
GLsizei stride = arrays[mesaAttr]->StrideB;
- *userSpace = GL_FALSE;
-
if (bufobj && bufobj->Name) {
/* Attribute data is in a VBO.
* Recall that for VBOs, the gl_client_array->Ptr field is
@@ -434,39 +399,26 @@ setup_non_interleaved_attribs(struct gl_context *ctx,
*/
struct st_buffer_object *stobj = st_buffer_object(bufobj);
assert(stobj->buffer);
- /*printf("stobj %u = %p\n", attr, (void*) stobj);*/
vbuffer[attr].buffer = NULL;
pipe_resource_reference(&vbuffer[attr].buffer, stobj->buffer);
vbuffer[attr].buffer_offset = pointer_to_offset(arrays[mesaAttr]->Ptr);
- velements[attr].src_offset = 0;
}
else {
- /* attribute data is in user-space memory, not a VBO */
- uint bytes;
- /*printf("user-space array %d stride %d\n", attr, stride);*/
-
- *userSpace = GL_TRUE;
-
/* wrap user data */
if (arrays[mesaAttr]->Ptr) {
- /* user's vertex array */
- if (arrays[mesaAttr]->StrideB) {
- bytes = arrays[mesaAttr]->StrideB * (max_index + 1);
- }
- else {
- bytes = arrays[mesaAttr]->Size
- * _mesa_sizeof_type(arrays[mesaAttr]->Type);
- }
- vbuffer[attr].buffer =
+ uint divisor = arrays[mesaAttr]->InstanceDivisor;
+ uint length = (divisor ? num_instances / divisor : max_index) + 1;
+ vbuffer[attr].buffer =
pipe_user_buffer_create(pipe->screen,
- (void *) arrays[mesaAttr]->Ptr, bytes,
+ (void *) arrays[mesaAttr]->Ptr,
+ stride * length,
PIPE_BIND_VERTEX_BUFFER);
}
else {
/* no array, use ctx->Current.Attrib[] value */
- bytes = sizeof(ctx->Current.Attrib[0]);
- vbuffer[attr].buffer =
+ uint bytes = sizeof(ctx->Current.Attrib[0]);
+ vbuffer[attr].buffer =
pipe_user_buffer_create(pipe->screen,
(void *) ctx->Current.Attrib[mesaAttr],
bytes,
@@ -475,15 +427,18 @@ setup_non_interleaved_attribs(struct gl_context *ctx,
}
vbuffer[attr].buffer_offset = 0;
- velements[attr].src_offset = 0;
- }
- assert(velements[attr].src_offset <= 2048); /* 11-bit field */
+ /* Track user vertex buffers. */
+ pipe_resource_reference(&st->user_vb[attr], vbuffer[attr].buffer);
+ st->user_vb_stride[attr] = stride;
+ st->num_user_vbs = MAX2(st->num_user_vbs, attr+1);
+ }
/* common-case setup */
vbuffer[attr].stride = stride; /* in bytes */
- vbuffer[attr].max_index = max_index;
- velements[attr].instance_divisor = 0;
+
+ velements[attr].src_offset = 0;
+ velements[attr].instance_divisor = arrays[mesaAttr]->InstanceDivisor;
velements[attr].vertex_buffer_index = attr;
velements[attr].src_format
= st_pipe_vertex_format(arrays[mesaAttr]->Type,
@@ -598,6 +553,64 @@ translate_prim(const struct gl_context *ctx, unsigned prim)
}
+static void
+st_validate_varrays(struct gl_context *ctx,
+ const struct gl_client_array **arrays,
+ unsigned max_index,
+ unsigned num_instances)
+{
+ struct st_context *st = st_context(ctx);
+ const struct st_vertex_program *vp;
+ const struct st_vp_variant *vpv;
+ struct pipe_vertex_buffer vbuffer[PIPE_MAX_SHADER_INPUTS];
+ struct pipe_vertex_element velements[PIPE_MAX_ATTRIBS];
+ unsigned num_vbuffers, num_velements;
+ GLuint attr;
+ unsigned i;
+
+ /* must get these after state validation! */
+ vp = st->vp;
+ vpv = st->vp_variant;
+
+ memset(velements, 0, sizeof(struct pipe_vertex_element) * vpv->num_inputs);
+
+ /* Unreference any user vertex buffers. */
+ for (i = 0; i < st->num_user_vbs; i++) {
+ pipe_resource_reference(&st->user_vb[i], NULL);
+ }
+ st->num_user_vbs = 0;
+
+ /*
+ * Setup the vbuffer[] and velements[] arrays.
+ */
+ if (is_interleaved_arrays(vp, vpv, arrays)) {
+ setup_interleaved_attribs(ctx, vp, vpv, arrays, vbuffer, velements,
+ max_index, num_instances);
+
+ num_vbuffers = 1;
+ num_velements = vpv->num_inputs;
+ if (num_velements == 0)
+ num_vbuffers = 0;
+ }
+ else {
+ setup_non_interleaved_attribs(ctx, vp, vpv, arrays,
+ vbuffer, velements, max_index, num_instances);
+ num_vbuffers = vpv->num_inputs;
+ num_velements = vpv->num_inputs;
+ }
+
+ cso_set_vertex_buffers(st->cso_context, num_vbuffers, vbuffer);
+ cso_set_vertex_elements(st->cso_context, num_velements, velements);
+
+ /* unreference buffers (frees wrapped user-space buffer objects)
+ * This is OK, because the pipe driver should reference buffers by itself
+ * in set_vertex_buffers. */
+ for (attr = 0; attr < num_vbuffers; attr++) {
+ pipe_resource_reference(&vbuffer[attr].buffer, NULL);
+ assert(!vbuffer[attr].buffer);
+ }
+}
+
/**
* This function gets plugged into the VBO module and is called when
@@ -616,90 +629,84 @@ st_draw_vbo(struct gl_context *ctx,
{
struct st_context *st = st_context(ctx);
struct pipe_context *pipe = st->pipe;
- const struct st_vertex_program *vp;
- 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;
struct pipe_index_buffer ibuffer;
- GLboolean userSpace = GL_FALSE;
- GLboolean vertDataEdgeFlags;
struct pipe_draw_info info;
- unsigned i;
+ unsigned i, num_instances = 1;
+ GLboolean new_array =
+ st->dirty.st && (st->dirty.mesa & (_NEW_ARRAY | _NEW_PROGRAM)) != 0;
/* Mesa core state should have been validated already */
assert(ctx->NewState == 0x0);
- /* Gallium probably doesn't want this in some cases. */
- if (!index_bounds_valid)
- 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);
+ if (ib) {
+ /* Gallium probably doesn't want this in some cases. */
+ if (!index_bounds_valid)
+ if (!vbo_all_varyings_in_vbos(arrays))
+ vbo_get_minmax_index(ctx, prims, ib, &min_index, &max_index);
- vertDataEdgeFlags = arrays[VERT_ATTRIB_EDGEFLAG]->BufferObj &&
- arrays[VERT_ATTRIB_EDGEFLAG]->BufferObj->Name;
- if (vertDataEdgeFlags != st->vertdata_edgeflags) {
- st->vertdata_edgeflags = vertDataEdgeFlags;
- st->dirty.st |= ST_NEW_EDGEFLAGS_DATA;
+ for (i = 0; i < nr_prims; i++) {
+ num_instances = MAX2(num_instances, prims[i].num_instances);
+ }
+ } else {
+ /* Get min/max index for non-indexed drawing. */
+ min_index = ~0;
+ max_index = 0;
+
+ for (i = 0; i < nr_prims; i++) {
+ min_index = MIN2(min_index, prims[i].start);
+ max_index = MAX2(max_index, prims[i].start + prims[i].count - 1);
+ num_instances = MAX2(num_instances, prims[i].num_instances);
+ }
}
- st_validate_state(st);
+ /* Validate state. */
+ if (st->dirty.st) {
+ GLboolean vertDataEdgeFlags;
- /* must get these after state validation! */
- vp = st->vp;
- vpv = st->vp_varient;
+ /* 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 != st->vertdata_edgeflags) {
+ st->vertdata_edgeflags = vertDataEdgeFlags;
+ st->dirty.st |= ST_NEW_EDGEFLAGS_DATA;
+ }
+
+ st_validate_state(st);
+
+ if (new_array) {
+ st_validate_varrays(ctx, arrays, max_index, num_instances);
+ }
#if 0
- if (MESA_VERBOSE & VERBOSE_GLSL) {
- check_uniforms(ctx);
- }
+ if (MESA_VERBOSE & VERBOSE_GLSL) {
+ check_uniforms(ctx);
+ }
#else
- (void) check_uniforms;
+ (void) check_uniforms;
#endif
-
- memset(velements, 0, sizeof(struct pipe_vertex_element) * vpv->num_inputs);
- /*
- * Setup the vbuffer[] and velements[] arrays.
- */
- if (is_interleaved_arrays(vp, vpv, arrays, &userSpace)) {
- /*printf("Draw interleaved\n");*/
- setup_interleaved_attribs(ctx, vp, vpv, arrays, max_index, userSpace,
- vbuffer, velements);
- num_vbuffers = 1;
- num_velements = vpv->num_inputs;
- if (num_velements == 0)
- num_vbuffers = 0;
- }
- else {
- /*printf("Draw non-interleaved\n");*/
- setup_non_interleaved_attribs(ctx, vp, vpv, arrays, max_index,
- &userSpace, vbuffer, velements);
- num_vbuffers = vpv->num_inputs;
- num_velements = vpv->num_inputs;
}
-#if 0
- {
- GLuint i;
- for (i = 0; i < num_vbuffers; i++) {
- printf("buffers[%d].stride = %u\n", i, vbuffer[i].stride);
- printf("buffers[%d].max_index = %u\n", i, vbuffer[i].max_index);
- printf("buffers[%d].buffer_offset = %u\n", i, vbuffer[i].buffer_offset);
- printf("buffers[%d].buffer = %p\n", i, (void*) vbuffer[i].buffer);
- }
- for (i = 0; i < num_velements; i++) {
- printf("vlements[%d].vbuffer_index = %u\n", i, velements[i].vertex_buffer_index);
- printf("vlements[%d].src_offset = %u\n", i, velements[i].src_offset);
- printf("vlements[%d].format = %s\n", i, util_format_name(velements[i].src_format));
+ /* Notify the driver that the content of user buffers may have been
+ * changed. */
+ if (!new_array && st->num_user_vbs) {
+ for (i = 0; i < st->num_user_vbs; i++) {
+ if (st->user_vb[i]) {
+ unsigned stride = st->user_vb_stride[i];
+
+ if (stride) {
+ pipe->redefine_user_buffer(pipe, st->user_vb[i],
+ min_index * stride,
+ (max_index + 1 - min_index) * stride);
+ } else {
+ /* stride == 0 */
+ pipe->redefine_user_buffer(pipe, st->user_vb[i],
+ 0, st->user_vb[i]->width0);
+ }
+ }
}
}
-#endif
-
- pipe->set_vertex_buffers(pipe, num_vbuffers, vbuffer);
- cso_set_vertex_elements(st->cso_context, num_velements, velements);
setup_index_buffer(ctx, ib, &ibuffer);
pipe->set_index_buffer(pipe, &ibuffer);
@@ -733,17 +740,6 @@ st_draw_vbo(struct gl_context *ctx,
}
pipe_resource_reference(&ibuffer.buffer, NULL);
-
- /* unreference buffers (frees wrapped user-space buffer objects) */
- for (attr = 0; attr < num_vbuffers; attr++) {
- pipe_resource_reference(&vbuffer[attr].buffer, NULL);
- assert(!vbuffer[attr].buffer);
- }
-
- if (userSpace)
- {
- pipe->set_vertex_buffers(pipe, 0, NULL);
- }
}
diff --git a/src/mesa/state_tracker/st_draw.h b/src/mesa/state_tracker/st_draw.h
index 2e4c468cff5..5d3c278228f 100644
--- a/src/mesa/state_tracker/st_draw.h
+++ b/src/mesa/state_tracker/st_draw.h
@@ -36,10 +36,11 @@
#include "main/compiler.h"
#include "main/glheader.h"
-#include "main/mtypes.h"
struct _mesa_index_buffer;
struct _mesa_prim;
+struct gl_client_array;
+struct gl_context;
struct st_context;
void st_init_draw( struct st_context *st );
diff --git a/src/mesa/state_tracker/st_draw_feedback.c b/src/mesa/state_tracker/st_draw_feedback.c
index 7f392fc4916..1e1220bfe52 100644
--- a/src/mesa/state_tracker/st_draw_feedback.c
+++ b/src/mesa/state_tracker/st_draw_feedback.c
@@ -28,6 +28,7 @@
#include "main/imports.h"
#include "main/image.h"
#include "main/macros.h"
+#include "main/mfeatures.h"
#include "vbo/vbo.h"
@@ -109,9 +110,7 @@ st_feedback_draw_vbo(struct gl_context *ctx,
struct pipe_index_buffer ibuffer;
struct pipe_transfer *vb_transfer[PIPE_MAX_ATTRIBS];
struct pipe_transfer *ib_transfer = NULL;
- struct pipe_transfer *cb_transfer;
GLuint attr, i;
- ubyte *mapped_constants;
const void *mapped_indices = NULL;
assert(draw);
@@ -123,10 +122,10 @@ st_feedback_draw_vbo(struct gl_context *ctx,
/* must get these after state validation! */
vp = st->vp;
- vs = &st->vp_varient->tgsi;
+ vs = &st->vp_variant->tgsi;
- if (!st->vp_varient->draw_shader) {
- st->vp_varient->draw_shader = draw_create_vertex_shader(draw, vs);
+ if (!st->vp_variant->draw_shader) {
+ st->vp_variant->draw_shader = draw_create_vertex_shader(draw, vs);
}
/*
@@ -139,7 +138,7 @@ st_feedback_draw_vbo(struct gl_context *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, NULL);
- draw_bind_vertex_shader(draw, st->vp_varient->draw_shader);
+ draw_bind_vertex_shader(draw, st->vp_variant->draw_shader);
set_feedback_vertex_format(ctx);
/* loop over TGSI shader inputs to determine vertex buffer
@@ -180,7 +179,6 @@ st_feedback_draw_vbo(struct gl_context *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].src_format =
@@ -221,7 +219,7 @@ st_feedback_draw_vbo(struct gl_context *ctx,
break;
default:
assert(0);
- return;
+ goto out_unref_vertex;
}
if (bufobj && bufobj->Name) {
@@ -242,14 +240,10 @@ st_feedback_draw_vbo(struct gl_context *ctx,
draw_set_mapped_index_buffer(draw, mapped_indices);
}
- /* map constant buffers */
- mapped_constants = pipe_buffer_map(pipe,
- st->state.constants[PIPE_SHADER_VERTEX],
- PIPE_TRANSFER_READ,
- &cb_transfer);
+ /* set the constant buffer */
draw_set_mapped_constant_buffer(st->draw, PIPE_SHADER_VERTEX, 0,
- mapped_constants,
- st->state.constants[PIPE_SHADER_VERTEX]->width0);
+ st->state.constants[PIPE_SHADER_VERTEX].ptr,
+ st->state.constants[PIPE_SHADER_VERTEX].size);
/* draw here */
@@ -258,30 +252,25 @@ st_feedback_draw_vbo(struct gl_context *ctx,
}
- /* unmap constant buffers */
- pipe_buffer_unmap(pipe, st->state.constants[PIPE_SHADER_VERTEX],
- cb_transfer);
-
/*
* unmap vertex/index buffers
*/
- for (i = 0; i < PIPE_MAX_ATTRIBS; i++) {
- if (draw->pt.vertex_buffer[i].buffer) {
- pipe_buffer_unmap(pipe, draw->pt.vertex_buffer[i].buffer,
- vb_transfer[i]);
- pipe_resource_reference(&draw->pt.vertex_buffer[i].buffer, NULL);
- draw_set_mapped_vertex_buffer(draw, i, NULL);
- }
- }
-
if (ib) {
draw_set_mapped_index_buffer(draw, NULL);
draw_set_index_buffer(draw, NULL);
if (ib_transfer)
- pipe_buffer_unmap(pipe, ibuffer.buffer, ib_transfer);
+ pipe_buffer_unmap(pipe, ib_transfer);
pipe_resource_reference(&ibuffer.buffer, NULL);
}
+
+ out_unref_vertex:
+ for (attr = 0; attr < vp->num_inputs; attr++) {
+ pipe_buffer_unmap(pipe, vb_transfer[attr]);
+ draw_set_mapped_vertex_buffer(draw, attr, NULL);
+ pipe_resource_reference(&vbuffers[attr].buffer, NULL);
+ }
+ draw_set_vertex_buffers(draw, 0, NULL);
}
#endif /* FEATURE_feedback || FEATURE_rastpos */
diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c
index 930b60ade2d..bbcae3b02e9 100644
--- a/src/mesa/state_tracker/st_extensions.c
+++ b/src/mesa/state_tracker/st_extensions.c
@@ -29,6 +29,7 @@
#include "main/imports.h"
#include "main/context.h"
#include "main/macros.h"
+#include "main/mfeatures.h"
#include "pipe/p_context.h"
#include "pipe/p_defines.h"
@@ -224,6 +225,7 @@ void st_init_extensions(struct st_context *st)
ctx->Extensions.ARB_draw_elements_base_vertex = GL_TRUE;
ctx->Extensions.ARB_fragment_coord_conventions = GL_TRUE;
ctx->Extensions.ARB_fragment_program = GL_TRUE;
+ ctx->Extensions.ARB_half_float_pixel = GL_TRUE;
ctx->Extensions.ARB_map_buffer_range = GL_TRUE;
ctx->Extensions.ARB_multisample = GL_TRUE;
ctx->Extensions.ARB_texture_border_clamp = GL_TRUE; /* XXX temp */
@@ -258,6 +260,8 @@ void st_init_extensions(struct st_context *st)
ctx->Extensions.EXT_texture_env_dot3 = GL_TRUE;
ctx->Extensions.EXT_texture_lod_bias = GL_TRUE;
ctx->Extensions.EXT_vertex_array_bgra = GL_TRUE;
+ if (ctx->API == API_OPENGLES || ctx->API == API_OPENGLES2)
+ ctx->Extensions.EXT_texture_format_BGRA8888 = GL_TRUE;
ctx->Extensions.APPLE_vertex_array_object = GL_TRUE;
@@ -343,6 +347,7 @@ void st_init_extensions(struct st_context *st)
if (screen->get_param(screen, PIPE_CAP_OCCLUSION_QUERY)) {
ctx->Extensions.ARB_occlusion_query = GL_TRUE;
+ ctx->Extensions.ARB_occlusion_query2 = GL_TRUE;
}
if (screen->get_param(screen, PIPE_CAP_TIMER_QUERY)) {
ctx->Extensions.EXT_timer_query = GL_TRUE;
@@ -361,59 +366,109 @@ void st_init_extensions(struct st_context *st)
*/
if (screen->is_format_supported(screen, PIPE_FORMAT_S8_USCALED_Z24_UNORM,
PIPE_TEXTURE_2D, 0,
- PIPE_BIND_DEPTH_STENCIL, 0) &&
+ PIPE_BIND_DEPTH_STENCIL) &&
screen->is_format_supported(screen, PIPE_FORMAT_S8_USCALED_Z24_UNORM,
PIPE_TEXTURE_2D, 0,
- PIPE_BIND_SAMPLER_VIEW, 0)) {
+ PIPE_BIND_SAMPLER_VIEW)) {
ctx->Extensions.EXT_packed_depth_stencil = GL_TRUE;
}
else if (screen->is_format_supported(screen, PIPE_FORMAT_Z24_UNORM_S8_USCALED,
PIPE_TEXTURE_2D, 0,
- PIPE_BIND_DEPTH_STENCIL, 0) &&
+ PIPE_BIND_DEPTH_STENCIL) &&
screen->is_format_supported(screen, PIPE_FORMAT_Z24_UNORM_S8_USCALED,
PIPE_TEXTURE_2D, 0,
- PIPE_BIND_SAMPLER_VIEW, 0)) {
+ PIPE_BIND_SAMPLER_VIEW)) {
ctx->Extensions.EXT_packed_depth_stencil = GL_TRUE;
}
/* sRGB support */
if (screen->is_format_supported(screen, PIPE_FORMAT_A8B8G8R8_SRGB,
PIPE_TEXTURE_2D, 0,
- PIPE_BIND_SAMPLER_VIEW, 0) ||
+ PIPE_BIND_SAMPLER_VIEW) ||
screen->is_format_supported(screen, PIPE_FORMAT_B8G8R8A8_SRGB,
PIPE_TEXTURE_2D, 0,
- PIPE_BIND_SAMPLER_VIEW, 0)) {
+ PIPE_BIND_SAMPLER_VIEW)) {
ctx->Extensions.EXT_texture_sRGB = GL_TRUE;
+ ctx->Extensions.EXT_texture_sRGB_decode = GL_TRUE;
+ if (screen->is_format_supported(screen, PIPE_FORMAT_A8B8G8R8_SRGB,
+ PIPE_TEXTURE_2D, 0,
+ PIPE_BIND_RENDER_TARGET) ||
+ screen->is_format_supported(screen, PIPE_FORMAT_B8G8R8A8_SRGB,
+ PIPE_TEXTURE_2D, 0,
+ PIPE_BIND_RENDER_TARGET)) {
+ ctx->Extensions.EXT_framebuffer_sRGB = GL_TRUE;
+ ctx->Const.sRGBCapable = GL_TRUE;
+ }
}
if (screen->is_format_supported(screen, PIPE_FORMAT_R8G8_UNORM,
PIPE_TEXTURE_2D, 0,
- PIPE_BIND_SAMPLER_VIEW, 0)) {
+ PIPE_BIND_SAMPLER_VIEW)) {
ctx->Extensions.ARB_texture_rg = GL_TRUE;
}
/* s3tc support */
if (screen->is_format_supported(screen, PIPE_FORMAT_DXT5_RGBA,
PIPE_TEXTURE_2D, 0,
- PIPE_BIND_SAMPLER_VIEW, 0) &&
- (ctx->Mesa_DXTn ||
- screen->is_format_supported(screen, PIPE_FORMAT_DXT5_RGBA,
- PIPE_TEXTURE_2D, 0,
- PIPE_BIND_RENDER_TARGET, 0))) {
+ PIPE_BIND_SAMPLER_VIEW) &&
+ ctx->Mesa_DXTn) {
ctx->Extensions.EXT_texture_compression_s3tc = GL_TRUE;
ctx->Extensions.S3_s3tc = GL_TRUE;
}
+ if (screen->is_format_supported(screen, PIPE_FORMAT_RGTC1_UNORM,
+ PIPE_TEXTURE_2D, 0,
+ PIPE_BIND_SAMPLER_VIEW) &&
+ screen->is_format_supported(screen, PIPE_FORMAT_RGTC1_SNORM,
+ PIPE_TEXTURE_2D, 0,
+ PIPE_BIND_SAMPLER_VIEW) &&
+ screen->is_format_supported(screen, PIPE_FORMAT_RGTC2_UNORM,
+ PIPE_TEXTURE_2D, 0,
+ PIPE_BIND_SAMPLER_VIEW) &&
+ screen->is_format_supported(screen, PIPE_FORMAT_RGTC2_SNORM,
+ PIPE_TEXTURE_2D, 0,
+ PIPE_BIND_SAMPLER_VIEW)
+ ) {
+ ctx->Extensions.ARB_texture_compression_rgtc = GL_TRUE;
+ }
+
+ if (screen->is_format_supported(screen, PIPE_FORMAT_LATC1_UNORM,
+ PIPE_TEXTURE_2D, 0,
+ PIPE_BIND_SAMPLER_VIEW) &&
+ screen->is_format_supported(screen, PIPE_FORMAT_LATC1_SNORM,
+ PIPE_TEXTURE_2D, 0,
+ PIPE_BIND_SAMPLER_VIEW) &&
+ screen->is_format_supported(screen, PIPE_FORMAT_LATC2_UNORM,
+ PIPE_TEXTURE_2D, 0,
+ PIPE_BIND_SAMPLER_VIEW) &&
+ screen->is_format_supported(screen, PIPE_FORMAT_LATC2_SNORM,
+ PIPE_TEXTURE_2D, 0,
+ PIPE_BIND_SAMPLER_VIEW)) {
+ ctx->Extensions.EXT_texture_compression_latc = GL_TRUE;
+ }
+
+ if (screen->is_format_supported(screen, PIPE_FORMAT_LATC2_UNORM,
+ PIPE_TEXTURE_2D, 0,
+ PIPE_BIND_SAMPLER_VIEW)) {
+ ctx->Extensions.ATI_texture_compression_3dc = GL_TRUE;
+ }
+
/* ycbcr support */
if (screen->is_format_supported(screen, PIPE_FORMAT_UYVY,
PIPE_TEXTURE_2D, 0,
- PIPE_BIND_SAMPLER_VIEW, 0) ||
+ PIPE_BIND_SAMPLER_VIEW) ||
screen->is_format_supported(screen, PIPE_FORMAT_YUYV,
PIPE_TEXTURE_2D, 0,
- PIPE_BIND_SAMPLER_VIEW, 0)) {
+ PIPE_BIND_SAMPLER_VIEW)) {
ctx->Extensions.MESA_ycbcr_texture = GL_TRUE;
}
+ /* GL_EXT_texture_array */
+ if (screen->get_param(screen, PIPE_CAP_ARRAY_TEXTURES)) {
+ ctx->Extensions.EXT_texture_array = GL_TRUE;
+ ctx->Extensions.MESA_texture_array = GL_TRUE;
+ }
+
/* GL_ARB_framebuffer_object */
if (ctx->Extensions.EXT_packed_depth_stencil) {
/* we support always support GL_EXT_framebuffer_blit */
@@ -428,21 +483,21 @@ void st_init_extensions(struct st_context *st)
ctx->Extensions.EXT_draw_buffers2 = GL_TRUE;
}
+ if (screen->get_param(screen, PIPE_CAP_INDEP_BLEND_FUNC)) {
+ ctx->Extensions.ARB_draw_buffers_blend = GL_TRUE;
+ }
+
/* GL_ARB_half_float_vertex */
if (screen->is_format_supported(screen, PIPE_FORMAT_R16G16B16A16_FLOAT,
PIPE_BUFFER, 0,
- PIPE_BIND_VERTEX_BUFFER, 0)) {
+ PIPE_BIND_VERTEX_BUFFER)) {
ctx->Extensions.ARB_half_float_vertex = GL_TRUE;
}
-#if 0 /* not yet */
- if (screen->get_param(screen, PIPE_CAP_INDEP_BLEND_FUNC)) {
- ctx->Extensions.ARB_draw_buffers_blend = GL_TRUE;
- }
-#endif
-
if (screen->get_shader_param(screen, PIPE_SHADER_GEOMETRY, PIPE_SHADER_CAP_MAX_INSTRUCTIONS) > 0) {
+#if 0 /* XXX re-enable when GLSL compiler again supports geometry shaders */
ctx->Extensions.ARB_geometry_shader4 = GL_TRUE;
+#endif
}
if (screen->get_param(screen, PIPE_CAP_PRIMITIVE_RESTART)) {
@@ -456,4 +511,19 @@ void st_init_extensions(struct st_context *st)
if (screen->get_param(screen, PIPE_CAP_SHADER_STENCIL_EXPORT)) {
ctx->Extensions.ARB_shader_stencil_export = GL_TRUE;
}
+
+ if (screen->get_param(screen, PIPE_CAP_TGSI_INSTANCEID)) {
+ ctx->Extensions.ARB_draw_instanced = GL_TRUE;
+ }
+ if (screen->get_param(screen, PIPE_CAP_VERTEX_ELEMENT_INSTANCE_DIVISOR)) {
+ ctx->Extensions.ARB_instanced_arrays = GL_TRUE;
+ }
+
+ if (screen->fence_finish) {
+ ctx->Extensions.ARB_sync = GL_TRUE;
+ }
+
+ if (st->pipe->texture_barrier) {
+ ctx->Extensions.NV_texture_barrier = GL_TRUE;
+ }
}
diff --git a/src/mesa/state_tracker/st_format.c b/src/mesa/state_tracker/st_format.c
index 955d821a657..03655ee0483 100644
--- a/src/mesa/state_tracker/st_format.c
+++ b/src/mesa/state_tracker/st_format.c
@@ -37,6 +37,7 @@
#include "main/texstore.h"
#include "main/image.h"
#include "main/macros.h"
+#include "main/mfeatures.h"
#include "pipe/p_context.h"
#include "pipe/p_defines.h"
@@ -112,12 +113,9 @@ st_format_datatype(enum pipe_format format)
return GL_UNSIGNED_SHORT;
}
else {
- /* compressed format? */
- assert(0);
+ /* probably a compressed format, unsupported anyway */
+ return GL_NONE;
}
-
- assert(0);
- return GL_NONE;
}
@@ -146,14 +144,28 @@ st_mesa_format_to_pipe_format(gl_format mesaFormat)
return PIPE_FORMAT_B4G4R4A4_UNORM;
case MESA_FORMAT_RGB565:
return PIPE_FORMAT_B5G6R5_UNORM;
+ case MESA_FORMAT_RGB332:
+ return PIPE_FORMAT_B2G3R3_UNORM;
+ case MESA_FORMAT_ARGB2101010:
+ return PIPE_FORMAT_B10G10R10A2_UNORM;
+ case MESA_FORMAT_AL44:
+ return PIPE_FORMAT_L4A4_UNORM;
case MESA_FORMAT_AL88:
return PIPE_FORMAT_L8A8_UNORM;
+ case MESA_FORMAT_AL1616:
+ return PIPE_FORMAT_L16A16_UNORM;
case MESA_FORMAT_A8:
return PIPE_FORMAT_A8_UNORM;
+ case MESA_FORMAT_A16:
+ return PIPE_FORMAT_A16_UNORM;
case MESA_FORMAT_L8:
return PIPE_FORMAT_L8_UNORM;
+ case MESA_FORMAT_L16:
+ return PIPE_FORMAT_L16_UNORM;
case MESA_FORMAT_I8:
return PIPE_FORMAT_I8_UNORM;
+ case MESA_FORMAT_I16:
+ return PIPE_FORMAT_I16_UNORM;
case MESA_FORMAT_Z16:
return PIPE_FORMAT_Z16_UNORM;
case MESA_FORMAT_Z32:
@@ -229,6 +241,24 @@ st_mesa_format_to_pipe_format(gl_format mesaFormat)
case MESA_FORMAT_RGBA_UINT32:
return PIPE_FORMAT_R32G32B32A32_USCALED;
+ case MESA_FORMAT_RED_RGTC1:
+ return PIPE_FORMAT_RGTC1_UNORM;
+ case MESA_FORMAT_SIGNED_RED_RGTC1:
+ return PIPE_FORMAT_RGTC1_SNORM;
+ case MESA_FORMAT_RG_RGTC2:
+ return PIPE_FORMAT_RGTC2_UNORM;
+ case MESA_FORMAT_SIGNED_RG_RGTC2:
+ return PIPE_FORMAT_RGTC2_SNORM;
+
+ case MESA_FORMAT_L_LATC1:
+ return PIPE_FORMAT_LATC1_UNORM;
+ case MESA_FORMAT_SIGNED_L_LATC1:
+ return PIPE_FORMAT_LATC1_SNORM;
+ case MESA_FORMAT_LA_LATC2:
+ return PIPE_FORMAT_LATC2_UNORM;
+ case MESA_FORMAT_SIGNED_LA_LATC2:
+ return PIPE_FORMAT_LATC2_SNORM;
+
default:
assert(0);
return PIPE_FORMAT_NONE;
@@ -261,14 +291,28 @@ st_pipe_format_to_mesa_format(enum pipe_format format)
return MESA_FORMAT_ARGB4444;
case PIPE_FORMAT_B5G6R5_UNORM:
return MESA_FORMAT_RGB565;
+ case PIPE_FORMAT_B2G3R3_UNORM:
+ return MESA_FORMAT_RGB332;
+ case PIPE_FORMAT_B10G10R10A2_UNORM:
+ return MESA_FORMAT_ARGB2101010;
+ case PIPE_FORMAT_L4A4_UNORM:
+ return MESA_FORMAT_AL44;
case PIPE_FORMAT_L8A8_UNORM:
return MESA_FORMAT_AL88;
+ case PIPE_FORMAT_L16A16_UNORM:
+ return MESA_FORMAT_AL1616;
case PIPE_FORMAT_A8_UNORM:
return MESA_FORMAT_A8;
+ case PIPE_FORMAT_A16_UNORM:
+ return MESA_FORMAT_A16;
case PIPE_FORMAT_L8_UNORM:
return MESA_FORMAT_L8;
+ case PIPE_FORMAT_L16_UNORM:
+ return MESA_FORMAT_L16;
case PIPE_FORMAT_I8_UNORM:
return MESA_FORMAT_I8;
+ case PIPE_FORMAT_I16_UNORM:
+ return MESA_FORMAT_I16;
case PIPE_FORMAT_S8_USCALED:
return MESA_FORMAT_S8;
@@ -354,6 +398,24 @@ st_pipe_format_to_mesa_format(enum pipe_format format)
case PIPE_FORMAT_R32G32B32A32_USCALED:
return MESA_FORMAT_RGBA_UINT32;
+ case PIPE_FORMAT_RGTC1_UNORM:
+ return MESA_FORMAT_RED_RGTC1;
+ case PIPE_FORMAT_RGTC1_SNORM:
+ return MESA_FORMAT_SIGNED_RED_RGTC1;
+ case PIPE_FORMAT_RGTC2_UNORM:
+ return MESA_FORMAT_RG_RGTC2;
+ case PIPE_FORMAT_RGTC2_SNORM:
+ return MESA_FORMAT_SIGNED_RG_RGTC2;
+
+ case PIPE_FORMAT_LATC1_UNORM:
+ return MESA_FORMAT_L_LATC1;
+ case PIPE_FORMAT_LATC1_SNORM:
+ return MESA_FORMAT_SIGNED_L_LATC1;
+ case PIPE_FORMAT_LATC2_UNORM:
+ return MESA_FORMAT_LA_LATC2;
+ case PIPE_FORMAT_LATC2_SNORM:
+ return MESA_FORMAT_SIGNED_LA_LATC2;
+
default:
assert(0);
return MESA_FORMAT_NONE;
@@ -370,13 +432,12 @@ find_supported_format(struct pipe_screen *screen,
uint num_formats,
enum pipe_texture_target target,
unsigned sample_count,
- unsigned tex_usage,
- unsigned geom_flags)
+ unsigned tex_usage)
{
uint i;
for (i = 0; i < num_formats; i++) {
if (screen->is_format_supported(screen, formats[i], target,
- sample_count, tex_usage, geom_flags)) {
+ sample_count, tex_usage)) {
return formats[i];
}
}
@@ -391,8 +452,7 @@ static enum pipe_format
default_rgba_format(struct pipe_screen *screen,
enum pipe_texture_target target,
unsigned sample_count,
- unsigned tex_usage,
- unsigned geom_flags)
+ unsigned tex_usage)
{
static const enum pipe_format colorFormats[] = {
PIPE_FORMAT_B8G8R8A8_UNORM,
@@ -401,7 +461,7 @@ default_rgba_format(struct pipe_screen *screen,
PIPE_FORMAT_B5G6R5_UNORM
};
return find_supported_format(screen, colorFormats, Elements(colorFormats),
- target, sample_count, tex_usage, geom_flags);
+ target, sample_count, tex_usage);
}
@@ -412,8 +472,7 @@ static enum pipe_format
default_rgb_format(struct pipe_screen *screen,
enum pipe_texture_target target,
unsigned sample_count,
- unsigned tex_usage,
- unsigned geom_flags)
+ unsigned tex_usage)
{
static const enum pipe_format colorFormats[] = {
PIPE_FORMAT_B8G8R8X8_UNORM,
@@ -425,7 +484,7 @@ default_rgb_format(struct pipe_screen *screen,
PIPE_FORMAT_B5G6R5_UNORM
};
return find_supported_format(screen, colorFormats, Elements(colorFormats),
- target, sample_count, tex_usage, geom_flags);
+ target, sample_count, tex_usage);
}
/**
@@ -435,8 +494,7 @@ static enum pipe_format
default_srgba_format(struct pipe_screen *screen,
enum pipe_texture_target target,
unsigned sample_count,
- unsigned tex_usage,
- unsigned geom_flags)
+ unsigned tex_usage)
{
static const enum pipe_format colorFormats[] = {
PIPE_FORMAT_B8G8R8A8_SRGB,
@@ -444,7 +502,7 @@ default_srgba_format(struct pipe_screen *screen,
PIPE_FORMAT_A8B8G8R8_SRGB,
};
return find_supported_format(screen, colorFormats, Elements(colorFormats),
- target, sample_count, tex_usage, geom_flags);
+ target, sample_count, tex_usage);
}
@@ -466,170 +524,180 @@ st_choose_format(struct pipe_screen *screen, GLenum internalFormat,
enum pipe_texture_target target, unsigned sample_count,
unsigned bindings)
{
- unsigned geom_flags = 0; /* we don't care about POT vs. NPOT here, yet */
switch (internalFormat) {
+ case GL_RGB10:
+ case GL_RGB10_A2:
+ if (screen->is_format_supported( screen, PIPE_FORMAT_B10G10R10A2_UNORM,
+ target, sample_count, bindings))
+ return PIPE_FORMAT_B10G10R10A2_UNORM;
+ /* Pass through. */
case 4:
case GL_RGBA:
case GL_RGBA8:
- case GL_RGB10_A2:
- return default_rgba_format( screen, target, sample_count, bindings,
- geom_flags );
+ return default_rgba_format( screen, target, sample_count, bindings);
+
+ case GL_BGRA:
+ if (screen->is_format_supported( screen, PIPE_FORMAT_B8G8R8A8_UNORM,
+ target, sample_count, bindings))
+ return PIPE_FORMAT_B8G8R8A8_UNORM;
+ return default_rgba_format( screen, target, sample_count, bindings);
case 3:
case GL_RGB:
- return default_rgb_format( screen, target, sample_count, bindings,
- geom_flags );
+ case GL_RGB8:
+ return default_rgb_format( screen, target, sample_count, bindings);
+
+ case GL_RGB12:
+ case GL_RGB16:
case GL_RGBA12:
case GL_RGBA16:
if (screen->is_format_supported( screen, PIPE_FORMAT_R16G16B16A16_UNORM,
- target, sample_count, bindings,
- geom_flags ))
+ target, sample_count, bindings))
return PIPE_FORMAT_R16G16B16A16_UNORM;
- return default_rgba_format( screen, target, sample_count, bindings,
- geom_flags );
+ return default_rgba_format( screen, target, sample_count, bindings);
case GL_RGBA4:
case GL_RGBA2:
if (screen->is_format_supported( screen, PIPE_FORMAT_B4G4R4A4_UNORM,
- target, sample_count, bindings,
- geom_flags ))
+ target, sample_count, bindings))
return PIPE_FORMAT_B4G4R4A4_UNORM;
- return default_rgba_format( screen, target, sample_count, bindings,
- geom_flags );
+ return default_rgba_format( screen, target, sample_count, bindings);
case GL_RGB5_A1:
if (screen->is_format_supported( screen, PIPE_FORMAT_B5G5R5A1_UNORM,
- target, sample_count, bindings,
- geom_flags ))
+ target, sample_count, bindings))
return PIPE_FORMAT_B5G5R5A1_UNORM;
- return default_rgba_format( screen, target, sample_count, bindings,
- geom_flags );
-
- case GL_RGB8:
- case GL_RGB10:
- case GL_RGB12:
- case GL_RGB16:
- return default_rgb_format( screen, target, sample_count, bindings,
- geom_flags );
+ return default_rgba_format( screen, target, sample_count, bindings);
+ case GL_R3_G3_B2:
+ if (screen->is_format_supported( screen, PIPE_FORMAT_B2G3R3_UNORM,
+ target, sample_count, bindings))
+ return PIPE_FORMAT_B2G3R3_UNORM;
+ /* Pass through. */
case GL_RGB5:
case GL_RGB4:
- case GL_R3_G3_B2:
if (screen->is_format_supported( screen, PIPE_FORMAT_B5G6R5_UNORM,
- target, sample_count, bindings,
- geom_flags ))
+ target, sample_count, bindings))
return PIPE_FORMAT_B5G6R5_UNORM;
if (screen->is_format_supported( screen, PIPE_FORMAT_B5G5R5A1_UNORM,
- target, sample_count, bindings,
- geom_flags ))
+ target, sample_count, bindings))
return PIPE_FORMAT_B5G5R5A1_UNORM;
- return default_rgba_format( screen, target, sample_count, bindings,
- geom_flags );
+ return default_rgba_format( screen, target, sample_count, bindings);
+ case GL_ALPHA12:
+ case GL_ALPHA16:
+ if (screen->is_format_supported( screen, PIPE_FORMAT_A16_UNORM, target,
+ sample_count, bindings))
+ return PIPE_FORMAT_A16_UNORM;
+ /* Pass through. */
case GL_ALPHA:
case GL_ALPHA4:
case GL_ALPHA8:
- case GL_ALPHA12:
- case GL_ALPHA16:
case GL_COMPRESSED_ALPHA:
if (screen->is_format_supported( screen, PIPE_FORMAT_A8_UNORM, target,
- sample_count, bindings, geom_flags ))
+ sample_count, bindings))
return PIPE_FORMAT_A8_UNORM;
- return default_rgba_format( screen, target, sample_count, bindings,
- geom_flags );
+ return default_rgba_format( screen, target, sample_count, bindings);
+ case GL_LUMINANCE12:
+ case GL_LUMINANCE16:
+ if (screen->is_format_supported( screen, PIPE_FORMAT_L16_UNORM, target,
+ sample_count, bindings))
+ return PIPE_FORMAT_L16_UNORM;
+ /* Pass through. */
case 1:
case GL_LUMINANCE:
case GL_LUMINANCE4:
case GL_LUMINANCE8:
- case GL_LUMINANCE12:
- case GL_LUMINANCE16:
- case GL_COMPRESSED_LUMINANCE:
if (screen->is_format_supported( screen, PIPE_FORMAT_L8_UNORM, target,
- sample_count, bindings, geom_flags ))
+ sample_count, bindings))
return PIPE_FORMAT_L8_UNORM;
- return default_rgba_format( screen, target, sample_count, bindings,
- geom_flags );
+ return default_rgba_format( screen, target, sample_count, bindings);
+ case GL_LUMINANCE12_ALPHA4:
+ case GL_LUMINANCE12_ALPHA12:
+ case GL_LUMINANCE16_ALPHA16:
+ if (screen->is_format_supported( screen, PIPE_FORMAT_L16A16_UNORM, target,
+ sample_count, bindings))
+ return PIPE_FORMAT_L16A16_UNORM;
+ /* Pass through. */
case 2:
case GL_LUMINANCE_ALPHA:
- case GL_LUMINANCE4_ALPHA4:
case GL_LUMINANCE6_ALPHA2:
case GL_LUMINANCE8_ALPHA8:
- case GL_LUMINANCE12_ALPHA4:
- case GL_LUMINANCE12_ALPHA12:
- case GL_LUMINANCE16_ALPHA16:
- case GL_COMPRESSED_LUMINANCE_ALPHA:
if (screen->is_format_supported( screen, PIPE_FORMAT_L8A8_UNORM, target,
- sample_count, bindings, geom_flags ))
+ sample_count, bindings))
+ return PIPE_FORMAT_L8A8_UNORM;
+ return default_rgba_format( screen, target, sample_count, bindings);
+
+ case GL_LUMINANCE4_ALPHA4:
+ if (screen->is_format_supported( screen, PIPE_FORMAT_L4A4_UNORM, target,
+ sample_count, bindings))
+ return PIPE_FORMAT_L4A4_UNORM;
+ if (screen->is_format_supported( screen, PIPE_FORMAT_L8A8_UNORM, target,
+ sample_count, bindings))
return PIPE_FORMAT_L8A8_UNORM;
- return default_rgba_format( screen, target, sample_count, bindings,
- geom_flags );
+ return default_rgba_format( screen, target, sample_count, bindings);
+ case GL_INTENSITY12:
+ case GL_INTENSITY16:
+ if (screen->is_format_supported( screen, PIPE_FORMAT_I16_UNORM, target,
+ sample_count, bindings))
+ return PIPE_FORMAT_I16_UNORM;
+ /* Pass through. */
case GL_INTENSITY:
case GL_INTENSITY4:
case GL_INTENSITY8:
- case GL_INTENSITY12:
- case GL_INTENSITY16:
case GL_COMPRESSED_INTENSITY:
if (screen->is_format_supported( screen, PIPE_FORMAT_I8_UNORM, target,
- sample_count, bindings, geom_flags ))
+ sample_count, bindings))
return PIPE_FORMAT_I8_UNORM;
- return default_rgba_format( screen, target, sample_count, bindings,
- geom_flags );
+ return default_rgba_format( screen, target, sample_count, bindings);
case GL_YCBCR_MESA:
if (screen->is_format_supported(screen, PIPE_FORMAT_UYVY, target,
- sample_count, bindings, geom_flags)) {
+ sample_count, bindings)) {
return PIPE_FORMAT_UYVY;
}
if (screen->is_format_supported(screen, PIPE_FORMAT_YUYV, target,
- sample_count, bindings, geom_flags)) {
+ sample_count, bindings)) {
return PIPE_FORMAT_YUYV;
}
return PIPE_FORMAT_NONE;
- case GL_COMPRESSED_RED:
- case GL_COMPRESSED_RG:
case GL_COMPRESSED_RGB:
/* can only sample from compressed formats */
if (bindings & ~PIPE_BIND_SAMPLER_VIEW)
return PIPE_FORMAT_NONE;
else if (screen->is_format_supported(screen, PIPE_FORMAT_DXT1_RGB,
- target, sample_count, bindings,
- geom_flags))
+ target, sample_count, bindings))
return PIPE_FORMAT_DXT1_RGB;
else
- return default_rgb_format(screen, target, sample_count, bindings,
- geom_flags);
+ return default_rgb_format(screen, target, sample_count, bindings);
case GL_COMPRESSED_RGBA:
/* can only sample from compressed formats */
if (bindings & ~PIPE_BIND_SAMPLER_VIEW)
return PIPE_FORMAT_NONE;
else if (screen->is_format_supported(screen, PIPE_FORMAT_DXT3_RGBA,
- target, sample_count, bindings,
- geom_flags))
+ target, sample_count, bindings))
return PIPE_FORMAT_DXT3_RGBA;
else
- return default_rgba_format(screen, target, sample_count, bindings,
- geom_flags);
+ return default_rgba_format(screen, target, sample_count, bindings);
case GL_RGB_S3TC:
case GL_RGB4_S3TC:
case GL_COMPRESSED_RGB_S3TC_DXT1_EXT:
if (screen->is_format_supported(screen, PIPE_FORMAT_DXT1_RGB,
- target, sample_count, bindings,
- geom_flags))
+ target, sample_count, bindings))
return PIPE_FORMAT_DXT1_RGB;
else
return PIPE_FORMAT_NONE;
case GL_COMPRESSED_RGBA_S3TC_DXT1_EXT:
if (screen->is_format_supported(screen, PIPE_FORMAT_DXT1_RGBA,
- target, sample_count, bindings,
- geom_flags))
+ target, sample_count, bindings))
return PIPE_FORMAT_DXT1_RGBA;
else
return PIPE_FORMAT_NONE;
@@ -638,16 +706,14 @@ st_choose_format(struct pipe_screen *screen, GLenum internalFormat,
case GL_RGBA4_S3TC:
case GL_COMPRESSED_RGBA_S3TC_DXT3_EXT:
if (screen->is_format_supported(screen, PIPE_FORMAT_DXT3_RGBA,
- target, sample_count, bindings,
- geom_flags))
+ target, sample_count, bindings))
return PIPE_FORMAT_DXT3_RGBA;
else
return PIPE_FORMAT_NONE;
case GL_COMPRESSED_RGBA_S3TC_DXT5_EXT:
if (screen->is_format_supported(screen, PIPE_FORMAT_DXT5_RGBA,
- target, sample_count, bindings,
- geom_flags))
+ target, sample_count, bindings))
return PIPE_FORMAT_DXT5_RGBA;
else
return PIPE_FORMAT_NONE;
@@ -661,32 +727,32 @@ st_choose_format(struct pipe_screen *screen, GLenum internalFormat,
case GL_DEPTH_COMPONENT16:
if (screen->is_format_supported(screen, PIPE_FORMAT_Z16_UNORM, target,
- sample_count, bindings, geom_flags))
+ sample_count, bindings))
return PIPE_FORMAT_Z16_UNORM;
/* fall-through */
case GL_DEPTH_COMPONENT24:
if (screen->is_format_supported(screen, PIPE_FORMAT_Z24_UNORM_S8_USCALED,
- target, sample_count, bindings, geom_flags))
+ target, sample_count, bindings))
return PIPE_FORMAT_Z24_UNORM_S8_USCALED;
if (screen->is_format_supported(screen, PIPE_FORMAT_S8_USCALED_Z24_UNORM,
- target, sample_count, bindings, geom_flags))
+ target, sample_count, bindings))
return PIPE_FORMAT_S8_USCALED_Z24_UNORM;
/* fall-through */
case GL_DEPTH_COMPONENT32:
if (screen->is_format_supported(screen, PIPE_FORMAT_Z32_UNORM, target,
- sample_count, bindings, geom_flags))
+ sample_count, bindings))
return PIPE_FORMAT_Z32_UNORM;
/* fall-through */
case GL_DEPTH_COMPONENT:
{
static const enum pipe_format formats[] = {
- PIPE_FORMAT_Z16_UNORM,
PIPE_FORMAT_Z32_UNORM,
PIPE_FORMAT_Z24_UNORM_S8_USCALED,
- PIPE_FORMAT_S8_USCALED_Z24_UNORM
+ PIPE_FORMAT_S8_USCALED_Z24_UNORM,
+ PIPE_FORMAT_Z16_UNORM
};
return find_supported_format(screen, formats, Elements(formats),
- target, sample_count, bindings, geom_flags);
+ target, sample_count, bindings);
}
case GL_STENCIL_INDEX:
@@ -701,7 +767,7 @@ st_choose_format(struct pipe_screen *screen, GLenum internalFormat,
PIPE_FORMAT_S8_USCALED_Z24_UNORM
};
return find_supported_format(screen, formats, Elements(formats),
- target, sample_count, bindings, geom_flags);
+ target, sample_count, bindings);
}
case GL_DEPTH_STENCIL_EXT:
@@ -712,23 +778,32 @@ st_choose_format(struct pipe_screen *screen, GLenum internalFormat,
PIPE_FORMAT_S8_USCALED_Z24_UNORM
};
return find_supported_format(screen, formats, Elements(formats),
- target, sample_count, bindings, geom_flags);
+ target, sample_count, bindings);
}
case GL_SRGB_EXT:
case GL_SRGB8_EXT:
- case GL_COMPRESSED_SRGB_EXT:
- case GL_COMPRESSED_SRGB_ALPHA_EXT:
case GL_SRGB_ALPHA_EXT:
case GL_SRGB8_ALPHA8_EXT:
- return default_srgba_format( screen, target, sample_count, bindings,
- geom_flags );
+ return default_srgba_format( screen, target, sample_count, bindings);
+
+ case GL_COMPRESSED_SRGB_EXT:
case GL_COMPRESSED_SRGB_S3TC_DXT1_EXT:
- return PIPE_FORMAT_DXT1_SRGB;
+ if (screen->is_format_supported(screen, PIPE_FORMAT_DXT1_SRGB, target,
+ sample_count, bindings))
+ return PIPE_FORMAT_DXT1_SRGB;
+ return default_srgba_format( screen, target, sample_count, bindings);
+
case GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT:
return PIPE_FORMAT_DXT1_SRGBA;
+
+ case GL_COMPRESSED_SRGB_ALPHA_EXT:
case GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT:
- return PIPE_FORMAT_DXT3_SRGBA;
+ if (screen->is_format_supported(screen, PIPE_FORMAT_DXT3_SRGBA, target,
+ sample_count, bindings))
+ return PIPE_FORMAT_DXT3_SRGBA;
+ return default_srgba_format( screen, target, sample_count, bindings);
+
case GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT:
return PIPE_FORMAT_DXT5_SRGBA;
@@ -737,68 +812,107 @@ st_choose_format(struct pipe_screen *screen, GLenum internalFormat,
case GL_COMPRESSED_SLUMINANCE_EXT:
case GL_COMPRESSED_SLUMINANCE_ALPHA_EXT:
if (screen->is_format_supported(screen, PIPE_FORMAT_L8A8_SRGB, target,
- sample_count, bindings, geom_flags))
+ sample_count, bindings))
return PIPE_FORMAT_L8A8_SRGB;
- return default_srgba_format( screen, target, sample_count, bindings,
- geom_flags );
+ return default_srgba_format( screen, target, sample_count, bindings);
case GL_SLUMINANCE_EXT:
case GL_SLUMINANCE8_EXT:
if (screen->is_format_supported(screen, PIPE_FORMAT_L8_SRGB, target,
- sample_count, bindings, geom_flags))
+ sample_count, bindings))
return PIPE_FORMAT_L8_SRGB;
- return default_srgba_format( screen, target, sample_count, bindings,
- geom_flags );
+ return default_srgba_format( screen, target, sample_count, bindings);
case GL_RED:
case GL_R8:
if (screen->is_format_supported(screen, PIPE_FORMAT_R8_UNORM, target,
- sample_count, bindings, geom_flags))
+ sample_count, bindings))
return PIPE_FORMAT_R8_UNORM;
return PIPE_FORMAT_NONE;
case GL_RG:
case GL_RG8:
if (screen->is_format_supported(screen, PIPE_FORMAT_R8G8_UNORM, target,
- sample_count, bindings, geom_flags))
+ sample_count, bindings))
return PIPE_FORMAT_R8G8_UNORM;
return PIPE_FORMAT_NONE;
case GL_R16:
if (screen->is_format_supported(screen, PIPE_FORMAT_R16_UNORM, target,
- sample_count, bindings, geom_flags))
+ sample_count, bindings))
return PIPE_FORMAT_R16_UNORM;
return PIPE_FORMAT_NONE;
case GL_RG16:
if (screen->is_format_supported(screen, PIPE_FORMAT_R16G16_UNORM, target,
- sample_count, bindings, geom_flags))
+ sample_count, bindings))
return PIPE_FORMAT_R16G16_UNORM;
return PIPE_FORMAT_NONE;
+ case GL_COMPRESSED_RED:
case GL_COMPRESSED_RED_RGTC1:
if (screen->is_format_supported(screen, PIPE_FORMAT_RGTC1_UNORM, target,
- sample_count, bindings, geom_flags))
+ sample_count, bindings))
return PIPE_FORMAT_RGTC1_UNORM;
+ if (screen->is_format_supported(screen, PIPE_FORMAT_R8_UNORM, target,
+ sample_count, bindings))
+ return PIPE_FORMAT_R8_UNORM;
return PIPE_FORMAT_NONE;
case GL_COMPRESSED_SIGNED_RED_RGTC1:
if (screen->is_format_supported(screen, PIPE_FORMAT_RGTC1_SNORM, target,
- sample_count, bindings, geom_flags))
+ sample_count, bindings))
return PIPE_FORMAT_RGTC1_SNORM;
return PIPE_FORMAT_NONE;
+ case GL_COMPRESSED_RG:
case GL_COMPRESSED_RG_RGTC2:
if (screen->is_format_supported(screen, PIPE_FORMAT_RGTC2_UNORM, target,
- sample_count, bindings, geom_flags))
+ sample_count, bindings))
return PIPE_FORMAT_RGTC2_UNORM;
+ if (screen->is_format_supported(screen, PIPE_FORMAT_R8G8_UNORM, target,
+ sample_count, bindings))
+ return PIPE_FORMAT_R8G8_UNORM;
return PIPE_FORMAT_NONE;
case GL_COMPRESSED_SIGNED_RG_RGTC2:
if (screen->is_format_supported(screen, PIPE_FORMAT_RGTC2_SNORM, target,
- sample_count, bindings, geom_flags))
+ sample_count, bindings))
return PIPE_FORMAT_RGTC2_SNORM;
return PIPE_FORMAT_NONE;
+ case GL_COMPRESSED_LUMINANCE:
+ case GL_COMPRESSED_LUMINANCE_LATC1_EXT:
+ if (screen->is_format_supported(screen, PIPE_FORMAT_LATC1_UNORM, target,
+ sample_count, bindings))
+ return PIPE_FORMAT_LATC1_UNORM;
+ if (screen->is_format_supported(screen, PIPE_FORMAT_L8_UNORM, target,
+ sample_count, bindings))
+ return PIPE_FORMAT_L8_UNORM;
+ return PIPE_FORMAT_NONE;
+
+ case GL_COMPRESSED_SIGNED_LUMINANCE_LATC1_EXT:
+ if (screen->is_format_supported(screen, PIPE_FORMAT_LATC1_SNORM, target,
+ sample_count, bindings))
+ return PIPE_FORMAT_LATC1_SNORM;
+ return PIPE_FORMAT_NONE;
+
+ case GL_COMPRESSED_LUMINANCE_ALPHA:
+ case GL_COMPRESSED_LUMINANCE_ALPHA_LATC2_EXT:
+ case GL_COMPRESSED_LUMINANCE_ALPHA_3DC_ATI:
+ if (screen->is_format_supported(screen, PIPE_FORMAT_LATC2_UNORM, target,
+ sample_count, bindings))
+ return PIPE_FORMAT_LATC2_UNORM;
+ if (screen->is_format_supported(screen, PIPE_FORMAT_L8A8_UNORM, target,
+ sample_count, bindings))
+ return PIPE_FORMAT_L8A8_UNORM;
+ return PIPE_FORMAT_NONE;
+
+ case GL_COMPRESSED_SIGNED_LUMINANCE_ALPHA_LATC2_EXT:
+ if (screen->is_format_supported(screen, PIPE_FORMAT_LATC2_SNORM, target,
+ sample_count, bindings))
+ return PIPE_FORMAT_LATC2_SNORM;
+ return PIPE_FORMAT_NONE;
+
/* signed/unsigned integer formats.
* XXX Mesa only has formats for RGBA signed/unsigned integer formats.
* If/when new formats are added this code should be updated.
@@ -822,7 +936,7 @@ st_choose_format(struct pipe_screen *screen, GLenum internalFormat,
case GL_LUMINANCE_ALPHA8I_EXT:
if (screen->is_format_supported(screen, PIPE_FORMAT_R8G8B8A8_SSCALED,
target,
- sample_count, bindings, geom_flags))
+ sample_count, bindings))
return PIPE_FORMAT_R8G8B8A8_SSCALED;
return PIPE_FORMAT_NONE;
case GL_RGBA16I_EXT:
@@ -833,7 +947,7 @@ st_choose_format(struct pipe_screen *screen, GLenum internalFormat,
case GL_LUMINANCE_ALPHA16I_EXT:
if (screen->is_format_supported(screen, PIPE_FORMAT_R16G16B16A16_SSCALED,
target,
- sample_count, bindings, geom_flags))
+ sample_count, bindings))
return PIPE_FORMAT_R16G16B16A16_SSCALED;
return PIPE_FORMAT_NONE;
case GL_RGBA32I_EXT:
@@ -845,7 +959,7 @@ st_choose_format(struct pipe_screen *screen, GLenum internalFormat,
/* xxx */
if (screen->is_format_supported(screen, PIPE_FORMAT_R32G32B32A32_SSCALED,
target,
- sample_count, bindings, geom_flags))
+ sample_count, bindings))
return PIPE_FORMAT_R32G32B32A32_SSCALED;
return PIPE_FORMAT_NONE;
@@ -857,7 +971,7 @@ st_choose_format(struct pipe_screen *screen, GLenum internalFormat,
case GL_LUMINANCE_ALPHA8UI_EXT:
if (screen->is_format_supported(screen, PIPE_FORMAT_R8G8B8A8_USCALED,
target,
- sample_count, bindings, geom_flags))
+ sample_count, bindings))
return PIPE_FORMAT_R8G8B8A8_USCALED;
return PIPE_FORMAT_NONE;
@@ -869,7 +983,7 @@ st_choose_format(struct pipe_screen *screen, GLenum internalFormat,
case GL_LUMINANCE_ALPHA16UI_EXT:
if (screen->is_format_supported(screen, PIPE_FORMAT_R16G16B16A16_USCALED,
target,
- sample_count, bindings, geom_flags))
+ sample_count, bindings))
return PIPE_FORMAT_R16G16B16A16_USCALED;
return PIPE_FORMAT_NONE;
@@ -881,7 +995,7 @@ st_choose_format(struct pipe_screen *screen, GLenum internalFormat,
case GL_LUMINANCE_ALPHA32UI_EXT:
if (screen->is_format_supported(screen, PIPE_FORMAT_R32G32B32A32_USCALED,
target,
- sample_count, bindings, geom_flags))
+ sample_count, bindings))
return PIPE_FORMAT_R32G32B32A32_USCALED;
return PIPE_FORMAT_NONE;
@@ -955,8 +1069,14 @@ gl_format
st_ChooseTextureFormat(struct gl_context *ctx, GLint internalFormat,
GLenum format, GLenum type)
{
+ boolean want_renderable =
+ internalFormat == 3 || internalFormat == 4 ||
+ internalFormat == GL_RGB || internalFormat == GL_RGBA ||
+ internalFormat == GL_RGB8 || internalFormat == GL_RGBA8 ||
+ internalFormat == GL_BGRA;
+
return st_ChooseTextureFormat_renderable(ctx, internalFormat,
- format, type, GL_TRUE);
+ format, type, want_renderable);
}
/**
@@ -1010,3 +1130,55 @@ st_sampler_compat_formats(enum pipe_format format1, enum pipe_format format2)
return GL_FALSE;
}
+
+
+
+/**
+ * This is used for translating texture border color and the clear
+ * color. For example, the clear color is interpreted according to
+ * the renderbuffer's base format. For example, if clearing a
+ * GL_LUMINANCE buffer, ClearColor[0] = luminance and ClearColor[1] =
+ * alpha. Similarly for texture border colors.
+ */
+void
+st_translate_color(const GLfloat colorIn[4], GLenum baseFormat,
+ GLfloat colorOut[4])
+{
+ switch (baseFormat) {
+ case GL_RED:
+ colorOut[0] = colorIn[0];
+ colorOut[1] = 0.0F;
+ colorOut[2] = 0.0F;
+ colorOut[3] = 1.0F;
+ break;
+ case GL_RG:
+ colorOut[0] = colorIn[0];
+ colorOut[1] = colorIn[1];
+ colorOut[2] = 0.0F;
+ colorOut[3] = 1.0F;
+ break;
+ case GL_RGB:
+ colorOut[0] = colorIn[0];
+ colorOut[1] = colorIn[1];
+ colorOut[2] = colorIn[2];
+ colorOut[3] = 1.0F;
+ break;
+ case GL_ALPHA:
+ colorOut[0] = colorOut[1] = colorOut[2] = 0.0;
+ colorOut[3] = colorIn[3];
+ break;
+ case GL_LUMINANCE:
+ colorOut[0] = colorOut[1] = colorOut[2] = colorIn[0];
+ colorOut[3] = 1.0;
+ break;
+ case GL_LUMINANCE_ALPHA:
+ colorOut[0] = colorOut[1] = colorOut[2] = colorIn[0];
+ colorOut[3] = colorIn[3];
+ break;
+ case GL_INTENSITY:
+ colorOut[0] = colorOut[1] = colorOut[2] = colorOut[3] = colorIn[0];
+ break;
+ default:
+ COPY_4V(colorOut, colorIn);
+ }
+}
diff --git a/src/mesa/state_tracker/st_format.h b/src/mesa/state_tracker/st_format.h
index 43fa59b1006..0fb570f6ee4 100644
--- a/src/mesa/state_tracker/st_format.h
+++ b/src/mesa/state_tracker/st_format.h
@@ -31,11 +31,12 @@
#define ST_FORMAT_H
#include "main/formats.h"
-#include "main/mtypes.h"
+#include "main/glheader.h"
#include "pipe/p_defines.h"
#include "pipe/p_format.h"
+struct gl_context;
struct pipe_screen;
extern GLenum
@@ -76,4 +77,10 @@ st_equal_formats(enum pipe_format pFormat, GLenum format, GLenum type);
extern GLboolean
st_sampler_compat_formats(enum pipe_format format1, enum pipe_format format2);
+
+extern void
+st_translate_color(const GLfloat colorIn[4], GLenum baseFormat,
+ GLfloat colorOut[4]);
+
+
#endif /* ST_FORMAT_H */
diff --git a/src/mesa/state_tracker/st_gen_mipmap.c b/src/mesa/state_tracker/st_gen_mipmap.c
index c5f6008a222..aea69c1b434 100644
--- a/src/mesa/state_tracker/st_gen_mipmap.c
+++ b/src/mesa/state_tracker/st_gen_mipmap.c
@@ -87,7 +87,7 @@ st_render_mipmap(struct st_context *st,
/* XXX should probably kill this and always use util_gen_mipmap
since this implements a sw fallback as well */
if (!screen->is_format_supported(screen, psv->format, psv->texture->target,
- 0, PIPE_BIND_RENDER_TARGET, 0)) {
+ 0, PIPE_BIND_RENDER_TARGET)) {
return FALSE;
}
@@ -103,54 +103,78 @@ st_render_mipmap(struct st_context *st,
* image with stride==width.
*/
static void
-decompress_image(enum pipe_format format,
- const uint8_t *src, uint8_t *dst,
- unsigned width, unsigned height)
+decompress_image(enum pipe_format format, int datatype,
+ const uint8_t *src, void *dst,
+ unsigned width, unsigned height, unsigned src_stride)
{
const struct util_format_description *desc = util_format_description(format);
const uint bw = util_format_get_blockwidth(format);
const uint bh = util_format_get_blockheight(format);
- const uint dst_stride = 4 * MAX2(width, bw);
- const uint src_stride = util_format_get_stride(format, width);
-
- desc->unpack_rgba_8unorm(dst, dst_stride, src, src_stride, width, height);
-
- if (width < bw || height < bh) {
- /* We're decompressing an image smaller than the compression
- * block size. We don't want garbage pixel values in the region
- * outside (width x height) so replicate pixels from the (width
- * x height) region to fill out the (bw x bh) block size.
- */
- uint x, y;
- for (y = 0; y < bh; y++) {
- for (x = 0; x < bw; x++) {
- if (x >= width || y >= height) {
- uint p = (y * bw + x) * 4;
- dst[p + 0] = dst[0];
- dst[p + 1] = dst[1];
- dst[p + 2] = dst[2];
- dst[p + 3] = dst[3];
- }
- }
+ uint dst_stride = 4 * MAX2(width, bw);
+
+ if (datatype == GL_FLOAT) {
+ desc->unpack_rgba_float((float *)dst, dst_stride * sizeof(GLfloat), src, src_stride, width, height);
+ if (width < bw || height < bh) {
+ float *dst_p = (float *)dst;
+ /* We're decompressing an image smaller than the compression
+ * block size. We don't want garbage pixel values in the region
+ * outside (width x height) so replicate pixels from the (width
+ * x height) region to fill out the (bw x bh) block size.
+ */
+ uint x, y;
+ for (y = 0; y < bh; y++) {
+ for (x = 0; x < bw; x++) {
+ if (x >= width || y >= height) {
+ uint p = (y * bw + x) * 4;
+ dst_p[p + 0] = dst_p[0];
+ dst_p[p + 1] = dst_p[1];
+ dst_p[p + 2] = dst_p[2];
+ dst_p[p + 3] = dst_p[3];
+ }
+ }
+ }
+ }
+ } else {
+ desc->unpack_rgba_8unorm((uint8_t *)dst, dst_stride, src, src_stride, width, height);
+ if (width < bw || height < bh) {
+ uint8_t *dst_p = (uint8_t *)dst;
+ /* We're decompressing an image smaller than the compression
+ * block size. We don't want garbage pixel values in the region
+ * outside (width x height) so replicate pixels from the (width
+ * x height) region to fill out the (bw x bh) block size.
+ */
+ uint x, y;
+ for (y = 0; y < bh; y++) {
+ for (x = 0; x < bw; x++) {
+ if (x >= width || y >= height) {
+ uint p = (y * bw + x) * 4;
+ dst_p[p + 0] = dst_p[0];
+ dst_p[p + 1] = dst_p[1];
+ dst_p[p + 2] = dst_p[2];
+ dst_p[p + 3] = dst_p[3];
+ }
+ }
+ }
}
}
}
-
/**
* Helper function to compress an image. The source is a 32-bpp RGBA image
* with stride==width.
*/
static void
-compress_image(enum pipe_format format,
- const uint8_t *src, uint8_t *dst,
- unsigned width, unsigned height)
+compress_image(enum pipe_format format, int datatype,
+ const void *src, uint8_t *dst,
+ unsigned width, unsigned height, unsigned dst_stride)
{
const struct util_format_description *desc = util_format_description(format);
- const uint dst_stride = util_format_get_stride(format, width);
const uint src_stride = 4 * width;
- desc->pack_rgba_8unorm(dst, dst_stride, src, src_stride, width, height);
+ if (datatype == GL_FLOAT)
+ desc->pack_rgba_float(dst, dst_stride, (GLfloat *)src, src_stride * sizeof(GLfloat), width, height);
+ else
+ desc->pack_rgba_8unorm(dst, dst_stride, (uint8_t *)src, src_stride, width, height);
}
@@ -180,7 +204,10 @@ fallback_generate_mipmap(struct gl_context *ctx, GLenum target,
_mesa_is_format_compressed(texObj->Image[face][baseLevel]->TexFormat);
if (compressed) {
- datatype = GL_UNSIGNED_BYTE;
+ GLenum type =
+ _mesa_get_format_datatype(texObj->Image[face][baseLevel]->TexFormat);
+
+ datatype = type == GL_UNSIGNED_NORMALIZED ? GL_UNSIGNED_BYTE : GL_FLOAT;
comps = 4;
}
else {
@@ -232,11 +259,11 @@ fallback_generate_mipmap(struct gl_context *ctx, GLenum target,
assert(comps == 4);
- srcTemp = malloc(srcWidth2 * srcHeight2 * comps + 000);
- dstTemp = malloc(dstWidth2 * dstHeight2 * comps + 000);
+ srcTemp = malloc(srcWidth2 * srcHeight2 * comps * (datatype == GL_FLOAT ? 4 : 1));
+ dstTemp = malloc(dstWidth2 * dstHeight2 * comps * (datatype == GL_FLOAT ? 4 : 1));
/* decompress the src image: srcData -> srcTemp */
- decompress_image(format, srcData, srcTemp, srcWidth, srcHeight);
+ decompress_image(format, datatype, srcData, srcTemp, srcWidth2, srcHeight2, srcTrans->stride);
_mesa_generate_mipmap_level(target, datatype, comps,
0 /*border*/,
@@ -248,7 +275,7 @@ fallback_generate_mipmap(struct gl_context *ctx, GLenum target,
dstWidth2); /* stride in texels */
/* compress the new image: dstTemp -> dstData */
- compress_image(format, dstTemp, dstData, dstWidth, dstHeight);
+ compress_image(format, datatype, dstTemp, dstData, dstWidth2, dstHeight2, dstTrans->stride);
free(srcTemp);
free(dstTemp);
@@ -338,6 +365,11 @@ st_generate_mipmap(struct gl_context *ctx, GLenum target,
if (lastLevel == 0)
return;
+ /* The texture isn't in a "complete" state yet so set the expected
+ * lastLevel here, since it won't get done in st_finalize_texture().
+ */
+ stObj->lastLevel = lastLevel;
+
if (pt->last_level < lastLevel) {
/* The current gallium texture doesn't have space for all the
* mipmap levels we need to generate. So allocate a new texture.
@@ -352,13 +384,9 @@ st_generate_mipmap(struct gl_context *ctx, GLenum target,
oldTex->width0,
oldTex->height0,
oldTex->depth0,
+ oldTex->array_size,
oldTex->bind);
- /* The texture isn't in a "complete" state yet so set the expected
- * lastLevel here, since it won't get done in st_finalize_texture().
- */
- stObj->lastLevel = lastLevel;
-
/* This will copy the old texture's base image into the new texture
* which we just allocated.
*/
@@ -367,8 +395,6 @@ st_generate_mipmap(struct gl_context *ctx, GLenum target,
/* release the old tex (will likely be freed too) */
pipe_resource_reference(&oldTex, NULL);
pipe_sampler_view_reference(&stObj->sampler_view, NULL);
-
- pt = stObj->pt;
}
else {
/* Make sure that the base texture image data is present in the
@@ -377,6 +403,8 @@ st_generate_mipmap(struct gl_context *ctx, GLenum target,
st_finalize_texture(ctx, st->pipe, texObj);
}
+ pt = stObj->pt;
+
assert(pt->last_level >= lastLevel);
/* Try to generate the mipmap by rendering/texturing. If that fails,
diff --git a/src/mesa/state_tracker/st_gen_mipmap.h b/src/mesa/state_tracker/st_gen_mipmap.h
index 3ba091da151..815c6a51638 100644
--- a/src/mesa/state_tracker/st_gen_mipmap.h
+++ b/src/mesa/state_tracker/st_gen_mipmap.h
@@ -30,8 +30,10 @@
#define ST_GEN_MIPMAP_H
-#include "main/mtypes.h"
+#include "main/glheader.h"
+struct gl_context;
+struct gl_texture_object;
struct st_context;
extern void
diff --git a/src/mesa/state_tracker/st_manager.c b/src/mesa/state_tracker/st_manager.c
index 0307b48978b..a68544ddac7 100644
--- a/src/mesa/state_tracker/st_manager.c
+++ b/src/mesa/state_tracker/st_manager.c
@@ -38,6 +38,7 @@
#include "main/mtypes.h"
#include "main/context.h"
+#include "main/mfeatures.h"
#include "main/texobj.h"
#include "main/teximage.h"
#include "main/texstate.h"
@@ -425,19 +426,13 @@ st_framebuffer_create(struct st_framebuffer_iface *stfbi)
struct gl_config mode;
gl_buffer_index idx;
+ if (!stfbi)
+ return NULL;
+
stfb = CALLOC_STRUCT(st_framebuffer);
if (!stfb)
return NULL;
- /* for FBO-only context */
- if (!stfbi) {
- struct gl_framebuffer *base = _mesa_get_incomplete_framebuffer();
-
- stfb->Base = *base;
-
- return stfb;
- }
-
st_visual_to_context_mode(stfbi->visual, &mode);
_mesa_initialize_window_framebuffer(&stfb->Base, &mode);
@@ -507,13 +502,14 @@ st_context_flush(struct st_context_iface *stctxi, unsigned flags,
struct pipe_fence_handle **fence)
{
struct st_context *st = (struct st_context *) stctxi;
- st_flush(st, flags, fence);
- if (flags & PIPE_FLUSH_RENDER_CACHE)
+ st_flush(st, fence);
+ if (flags & ST_FLUSH_FRONT)
st_manager_flush_frontbuffer(st);
}
static boolean
-st_context_teximage(struct st_context_iface *stctxi, enum st_texture_type target,
+st_context_teximage(struct st_context_iface *stctxi,
+ enum st_texture_type target,
int level, enum pipe_format internal_format,
struct pipe_resource *tex, boolean mipmap)
{
@@ -688,8 +684,9 @@ st_api_create_context(struct st_api *stapi, struct st_manager *smapi,
if (attribs->major > 1 || attribs->minor > 0) {
_mesa_compute_version(st->ctx);
- if (st->ctx->VersionMajor < attribs->major ||
- st->ctx->VersionMajor < attribs->minor) {
+ /* is the actual version less than the requested version? */
+ if (st->ctx->VersionMajor * 10 + st->ctx->VersionMinor <
+ attribs->major * 10 + attribs->minor) {
st_destroy_context(st);
return NULL;
}
@@ -762,7 +759,8 @@ st_api_make_current(struct st_api *stapi, struct st_context_iface *stctxi,
ret = _mesa_make_current(st->ctx, &stdraw->Base, &stread->Base);
}
else {
- ret = FALSE;
+ struct gl_framebuffer *incomplete = _mesa_get_incomplete_framebuffer();
+ ret = _mesa_make_current(st->ctx, incomplete, incomplete);
}
st_framebuffer_reference(&stdraw, NULL);
@@ -865,7 +863,8 @@ st_manager_validate_framebuffers(struct st_context *st)
* Add a color renderbuffer on demand.
*/
boolean
-st_manager_add_color_renderbuffer(struct st_context *st, struct gl_framebuffer *fb,
+st_manager_add_color_renderbuffer(struct st_context *st,
+ struct gl_framebuffer *fb,
gl_buffer_index idx)
{
struct st_framebuffer *stfb = st_ws_framebuffer(fb);
diff --git a/src/mesa/state_tracker/st_mesa_to_tgsi.c b/src/mesa/state_tracker/st_mesa_to_tgsi.c
index f848462310e..c07739f9d53 100644
--- a/src/mesa/state_tracker/st_mesa_to_tgsi.c
+++ b/src/mesa/state_tracker/st_mesa_to_tgsi.c
@@ -72,6 +72,7 @@ struct st_translate {
struct ureg_src inputs[PIPE_MAX_SHADER_INPUTS];
struct ureg_dst address[1];
struct ureg_src samplers[PIPE_MAX_SAMPLERS];
+ struct ureg_src systemValues[SYSTEM_VALUE_MAX];
/* Extra info for handling point size clamping in vertex shader */
struct ureg_dst pointSizeResult; /**< Actual point size output register */
@@ -104,6 +105,13 @@ struct st_translate {
};
+/** Map Mesa's SYSTEM_VALUE_x to TGSI_SEMANTIC_x */
+static unsigned mesa_sysval_to_semantic[SYSTEM_VALUE_MAX] = {
+ TGSI_SEMANTIC_FACE,
+ TGSI_SEMANTIC_INSTANCEID
+};
+
+
/**
* Make note of a branch to a label in the TGSI code.
* After we've emitted all instructions, we'll go over the list
@@ -216,9 +224,9 @@ src_register( struct st_translate *t,
case PROGRAM_TEMPORARY:
assert(index >= 0);
+ assert(index < Elements(t->temps));
if (ureg_dst_is_undef(t->temps[index]))
t->temps[index] = ureg_DECL_temporary( t->ureg );
- assert(index < Elements(t->temps));
return ureg_src(t->temps[index]);
case PROGRAM_NAMED_PARAM:
@@ -245,6 +253,10 @@ src_register( struct st_translate *t,
case PROGRAM_ADDRESS:
return ureg_src(t->address[index]);
+ case PROGRAM_SYSTEM_VALUE:
+ assert(index < Elements(t->systemValues));
+ return t->systemValues[index];
+
default:
debug_assert( 0 );
return ureg_src_undef();
@@ -274,6 +286,8 @@ translate_texture_target( GLuint textarget,
case TEXTURE_3D_INDEX: return TGSI_TEXTURE_3D;
case TEXTURE_CUBE_INDEX: return TGSI_TEXTURE_CUBE;
case TEXTURE_RECT_INDEX: return TGSI_TEXTURE_RECT;
+ case TEXTURE_1D_ARRAY_INDEX: return TGSI_TEXTURE_1D_ARRAY;
+ case TEXTURE_2D_ARRAY_INDEX: return TGSI_TEXTURE_2D_ARRAY;
default:
debug_assert( 0 );
return TGSI_TEXTURE_1D;
@@ -739,10 +753,12 @@ compile_instruction(
/**
* Emit the TGSI instructions to adjust the WPOS pixel center convention
+ * Basically, add (adjX, adjY) to the fragment position.
*/
static void
emit_adjusted_wpos( struct st_translate *t,
- const struct gl_program *program, GLfloat value)
+ const struct gl_program *program,
+ GLfloat adjX, GLfloat adjY)
{
struct ureg_program *ureg = t->ureg;
struct ureg_dst wpos_temp = ureg_DECL_temporary(ureg);
@@ -752,7 +768,7 @@ emit_adjusted_wpos( struct st_translate *t,
* The shader might also use gl_FragCoord.w and .z.
*/
ureg_ADD(ureg, wpos_temp, wpos_input,
- ureg_imm4f(ureg, value, value, 0.0f, 0.0f));
+ ureg_imm4f(ureg, adjX, adjY, 0.0f, 0.0f));
t->inputs[t->inputMapping[FRAG_ATTRIB_WPOS]] = ureg_src(wpos_temp);
}
@@ -836,9 +852,12 @@ emit_wpos(struct st_context *st,
boolean invert = FALSE;
if (fp->OriginUpperLeft) {
+ /* Fragment shader wants origin in upper-left */
if (pscreen->get_param(pscreen, PIPE_CAP_TGSI_FS_COORD_ORIGIN_UPPER_LEFT)) {
+ /* the driver supports upper-left origin */
}
else if (pscreen->get_param(pscreen, PIPE_CAP_TGSI_FS_COORD_ORIGIN_LOWER_LEFT)) {
+ /* the driver supports lower-left origin, need to invert Y */
ureg_property_fs_coord_origin(ureg, TGSI_FS_COORD_ORIGIN_LOWER_LEFT);
invert = TRUE;
}
@@ -846,28 +865,37 @@ emit_wpos(struct st_context *st,
assert(0);
}
else {
+ /* Fragment shader wants origin in lower-left */
if (pscreen->get_param(pscreen, PIPE_CAP_TGSI_FS_COORD_ORIGIN_LOWER_LEFT))
+ /* the driver supports lower-left origin */
ureg_property_fs_coord_origin(ureg, TGSI_FS_COORD_ORIGIN_LOWER_LEFT);
else if (pscreen->get_param(pscreen, PIPE_CAP_TGSI_FS_COORD_ORIGIN_UPPER_LEFT))
+ /* the driver supports upper-left origin, need to invert Y */
invert = TRUE;
else
assert(0);
}
if (fp->PixelCenterInteger) {
+ /* Fragment shader wants pixel center integer */
if (pscreen->get_param(pscreen, PIPE_CAP_TGSI_FS_COORD_PIXEL_CENTER_INTEGER))
+ /* the driver supports pixel center integer */
ureg_property_fs_coord_pixel_center(ureg, TGSI_FS_COORD_PIXEL_CENTER_INTEGER);
else if (pscreen->get_param(pscreen, PIPE_CAP_TGSI_FS_COORD_PIXEL_CENTER_HALF_INTEGER))
- emit_adjusted_wpos(t, program, invert ? 0.5f : -0.5f);
+ /* the driver supports pixel center half integer, need to bias X,Y */
+ emit_adjusted_wpos(t, program, 0.5f, invert ? 0.5f : -0.5f);
else
assert(0);
}
else {
+ /* Fragment shader wants pixel center half integer */
if (pscreen->get_param(pscreen, PIPE_CAP_TGSI_FS_COORD_PIXEL_CENTER_HALF_INTEGER)) {
+ /* the driver supports pixel center half integer */
}
else if (pscreen->get_param(pscreen, PIPE_CAP_TGSI_FS_COORD_PIXEL_CENTER_INTEGER)) {
+ /* the driver supports pixel center integer, need to bias X,Y */
ureg_property_fs_coord_pixel_center(ureg, TGSI_FS_COORD_PIXEL_CENTER_INTEGER);
- emit_adjusted_wpos(t, program, invert ? -0.5f : 0.5f);
+ emit_adjusted_wpos(t, program, 0.5f, invert ? -0.5f : 0.5f);
}
else
assert(0);
@@ -1089,6 +1117,21 @@ st_translate_mesa_program(
t->address[0] = ureg_DECL_address( ureg );
}
+ /* Declare misc input registers
+ */
+ {
+ GLbitfield sysInputs = program->SystemValuesRead;
+ unsigned numSys = 0;
+ for (i = 0; sysInputs; i++) {
+ if (sysInputs & (1 << i)) {
+ unsigned semName = mesa_sysval_to_semantic[i];
+ t->systemValues[i] = ureg_DECL_system_value(ureg, numSys, semName, 0);
+ numSys++;
+ sysInputs &= ~(1 << i);
+ }
+ }
+ }
+
if (program->IndirectRegisterFiles & (1 << PROGRAM_TEMPORARY)) {
/* If temps are accessed with indirect addressing, declare temporaries
* in sequential order. Else, we declare them on demand elsewhere.
diff --git a/src/mesa/state_tracker/st_mesa_to_tgsi.h b/src/mesa/state_tracker/st_mesa_to_tgsi.h
index 9bfd4960b60..0615e52ef62 100644
--- a/src/mesa/state_tracker/st_mesa_to_tgsi.h
+++ b/src/mesa/state_tracker/st_mesa_to_tgsi.h
@@ -29,18 +29,20 @@
#ifndef ST_MESA_TO_TGSI_H
#define ST_MESA_TO_TGSI_H
-#include "main/mtypes.h"
-
-#include "pipe/p_compiler.h"
-
-struct ureg_program;
-
#if defined __cplusplus
extern "C" {
#endif
-struct tgsi_token;
+#include "main/glheader.h"
+
+#include "pipe/p_compiler.h"
+#include "pipe/p_defines.h"
+
+struct gl_context;
struct gl_program;
+struct tgsi_token;
+struct ureg_program;
+
enum pipe_error
st_translate_mesa_program(
diff --git a/src/mesa/state_tracker/st_program.c b/src/mesa/state_tracker/st_program.c
index aae2913c202..0b1ad63afeb 100644
--- a/src/mesa/state_tracker/st_program.c
+++ b/src/mesa/state_tracker/st_program.c
@@ -32,7 +32,10 @@
#include "main/imports.h"
+#include "main/hash.h"
+#include "main/mfeatures.h"
#include "main/mtypes.h"
+#include "program/prog_parameter.h"
#include "program/prog_print.h"
#include "program/programopt.h"
@@ -44,6 +47,8 @@
#include "tgsi/tgsi_ureg.h"
#include "st_debug.h"
+#include "st_cb_bitmap.h"
+#include "st_cb_drawpixels.h"
#include "st_context.h"
#include "st_program.h"
#include "st_mesa_to_tgsi.h"
@@ -52,34 +57,111 @@
/**
+ * Delete a vertex program variant. Note the caller must unlink
+ * the variant from the linked list.
+ */
+static void
+delete_vp_variant(struct st_context *st, struct st_vp_variant *vpv)
+{
+ if (vpv->driver_shader)
+ cso_delete_vertex_shader(st->cso_context, vpv->driver_shader);
+
+#if FEATURE_feedback || FEATURE_rastpos
+ if (vpv->draw_shader)
+ draw_delete_vertex_shader( st->draw, vpv->draw_shader );
+#endif
+
+ if (vpv->tgsi.tokens)
+ st_free_tokens(vpv->tgsi.tokens);
+
+ FREE( vpv );
+}
+
+
+
+/**
* Clean out any old compilations:
*/
void
-st_vp_release_varients( struct st_context *st,
+st_release_vp_variants( struct st_context *st,
struct st_vertex_program *stvp )
{
- struct st_vp_varient *vpv;
+ struct st_vp_variant *vpv;
- for (vpv = stvp->varients; vpv; ) {
- struct st_vp_varient *next = vpv->next;
+ for (vpv = stvp->variants; vpv; ) {
+ struct st_vp_variant *next = vpv->next;
+ delete_vp_variant(st, vpv);
+ vpv = next;
+ }
- if (vpv->driver_shader)
- cso_delete_vertex_shader(st->cso_context, vpv->driver_shader);
-
-#if FEATURE_feedback || FEATURE_rastpos
- if (vpv->draw_shader)
- draw_delete_vertex_shader( st->draw, vpv->draw_shader );
-#endif
+ stvp->variants = NULL;
+}
+
+
+
+/**
+ * Delete a fragment program variant. Note the caller must unlink
+ * the variant from the linked list.
+ */
+static void
+delete_fp_variant(struct st_context *st, struct st_fp_variant *fpv)
+{
+ if (fpv->driver_shader)
+ cso_delete_fragment_shader(st->cso_context, fpv->driver_shader);
+ if (fpv->parameters)
+ _mesa_free_parameter_list(fpv->parameters);
- if (vpv->tgsi.tokens)
- st_free_tokens(vpv->tgsi.tokens);
+ FREE(fpv);
+}
+
+
+/**
+ * Free all variants of a fragment program.
+ */
+void
+st_release_fp_variants(struct st_context *st, struct st_fragment_program *stfp)
+{
+ struct st_fp_variant *fpv;
+
+ for (fpv = stfp->variants; fpv; ) {
+ struct st_fp_variant *next = fpv->next;
+ delete_fp_variant(st, fpv);
+ fpv = next;
+ }
+
+ stfp->variants = NULL;
+}
+
+
+/**
+ * Delete a geometry program variant. Note the caller must unlink
+ * the variant from the linked list.
+ */
+static void
+delete_gp_variant(struct st_context *st, struct st_gp_variant *gpv)
+{
+ if (gpv->driver_shader)
+ cso_delete_geometry_shader(st->cso_context, gpv->driver_shader);
- FREE( vpv );
+ FREE(gpv);
+}
- vpv = next;
+
+/**
+ * Free all variants of a geometry program.
+ */
+void
+st_release_gp_variants(struct st_context *st, struct st_geometry_program *stgp)
+{
+ struct st_gp_variant *gpv;
+
+ for (gpv = stgp->variants; gpv; ) {
+ struct st_gp_variant *next = gpv->next;
+ delete_gp_variant(st, gpv);
+ gpv = next;
}
- stvp->varients = NULL;
+ stgp->variants = NULL;
}
@@ -92,7 +174,7 @@ st_vp_release_varients( struct st_context *st,
* \param tokensOut destination for TGSI tokens
* \return pointer to cached pipe_shader object.
*/
-void
+static void
st_prepare_vertex_program(struct st_context *st,
struct st_vertex_program *stvp)
{
@@ -196,17 +278,22 @@ st_prepare_vertex_program(struct st_context *st,
}
-struct st_vp_varient *
+/**
+ * Translate a vertex program to create a new variant.
+ */
+static struct st_vp_variant *
st_translate_vertex_program(struct st_context *st,
struct st_vertex_program *stvp,
- const struct st_vp_varient_key *key)
+ const struct st_vp_variant_key *key)
{
- struct st_vp_varient *vpv = CALLOC_STRUCT(st_vp_varient);
+ struct st_vp_variant *vpv = CALLOC_STRUCT(st_vp_variant);
struct pipe_context *pipe = st->pipe;
struct ureg_program *ureg;
enum pipe_error error;
unsigned num_outputs;
+ st_prepare_vertex_program( st, stvp );
+
_mesa_remove_output_reads(&stvp->Base.Base, PROGRAM_OUTPUT);
_mesa_remove_output_reads(&stvp->Base.Base, PROGRAM_VARYING);
@@ -231,23 +318,22 @@ st_translate_vertex_program(struct st_context *st,
debug_printf("\n");
}
- error =
- st_translate_mesa_program(st->ctx,
- TGSI_PROCESSOR_VERTEX,
- ureg,
- &stvp->Base.Base,
- /* inputs */
- vpv->num_inputs,
- stvp->input_to_index,
- NULL, /* input semantic name */
- NULL, /* input semantic index */
- NULL,
- /* outputs */
- num_outputs,
- stvp->result_to_output,
- stvp->output_semantic_name,
- stvp->output_semantic_index,
- key->passthrough_edgeflags );
+ error = st_translate_mesa_program(st->ctx,
+ TGSI_PROCESSOR_VERTEX,
+ ureg,
+ &stvp->Base.Base,
+ /* inputs */
+ vpv->num_inputs,
+ stvp->input_to_index,
+ NULL, /* input semantic name */
+ NULL, /* input semantic index */
+ NULL,
+ /* outputs */
+ num_outputs,
+ stvp->result_to_output,
+ stvp->output_semantic_name,
+ stvp->output_semantic_index,
+ key->passthrough_edgeflags );
if (error)
goto fail;
@@ -277,201 +363,326 @@ fail:
}
+/**
+ * Find/create a vertex program variant.
+ */
+struct st_vp_variant *
+st_get_vp_variant(struct st_context *st,
+ struct st_vertex_program *stvp,
+ const struct st_vp_variant_key *key)
+{
+ struct st_vp_variant *vpv;
+
+ /* Search for existing variant */
+ for (vpv = stvp->variants; vpv; vpv = vpv->next) {
+ if (memcmp(&vpv->key, key, sizeof(*key)) == 0) {
+ break;
+ }
+ }
+
+ if (!vpv) {
+ /* create now */
+ vpv = st_translate_vertex_program(st, stvp, key);
+ if (vpv) {
+ /* insert into list */
+ vpv->next = stvp->variants;
+ stvp->variants = vpv;
+ }
+ }
+
+ return vpv;
+}
+
/**
- * Translate a Mesa fragment shader into a TGSI shader.
- * \return pointer to cached pipe_shader object.
+ * Translate a Mesa fragment shader into a TGSI shader using extra info in
+ * the key.
+ * \return new fragment program variant
*/
-void
+static struct st_fp_variant *
st_translate_fragment_program(struct st_context *st,
- struct st_fragment_program *stfp )
+ struct st_fragment_program *stfp,
+ const struct st_fp_variant_key *key)
{
struct pipe_context *pipe = st->pipe;
- GLuint outputMapping[FRAG_RESULT_MAX];
- GLuint inputMapping[FRAG_ATTRIB_MAX];
- GLuint interpMode[PIPE_MAX_SHADER_INPUTS]; /* XXX size? */
- GLuint attr;
- enum pipe_error error;
- const GLbitfield inputsRead = stfp->Base.Base.InputsRead;
- struct ureg_program *ureg;
+ struct st_fp_variant *variant = CALLOC_STRUCT(st_fp_variant);
+ GLboolean deleteFP = GL_FALSE;
- ubyte input_semantic_name[PIPE_MAX_SHADER_INPUTS];
- ubyte input_semantic_index[PIPE_MAX_SHADER_INPUTS];
- uint fs_num_inputs = 0;
+ if (!variant)
+ return NULL;
- ubyte fs_output_semantic_name[PIPE_MAX_SHADER_OUTPUTS];
- ubyte fs_output_semantic_index[PIPE_MAX_SHADER_OUTPUTS];
- uint fs_num_outputs = 0;
+ assert(!(key->bitmap && key->drawpixels));
- _mesa_remove_output_reads(&stfp->Base.Base, PROGRAM_OUTPUT);
+#if FEATURE_drawpix
+ if (key->bitmap) {
+ /* glBitmap drawing */
+ struct gl_fragment_program *fp; /* we free this temp program below */
- /*
- * Convert Mesa program inputs to TGSI input register semantics.
- */
- for (attr = 0; attr < FRAG_ATTRIB_MAX; attr++) {
- if (inputsRead & (1 << attr)) {
- const GLuint slot = fs_num_inputs++;
+ st_make_bitmap_fragment_program(st, &stfp->Base,
+ &fp, &variant->bitmap_sampler);
- inputMapping[attr] = slot;
+ variant->parameters = _mesa_clone_parameter_list(fp->Base.Parameters);
+ stfp = st_fragment_program(fp);
+ deleteFP = GL_TRUE;
+ }
+ else if (key->drawpixels) {
+ /* glDrawPixels drawing */
+ struct gl_fragment_program *fp; /* we free this temp program below */
- switch (attr) {
- case FRAG_ATTRIB_WPOS:
- input_semantic_name[slot] = TGSI_SEMANTIC_POSITION;
- input_semantic_index[slot] = 0;
- interpMode[slot] = TGSI_INTERPOLATE_LINEAR;
- break;
- case FRAG_ATTRIB_COL0:
- input_semantic_name[slot] = TGSI_SEMANTIC_COLOR;
- input_semantic_index[slot] = 0;
- interpMode[slot] = TGSI_INTERPOLATE_LINEAR;
- break;
- case FRAG_ATTRIB_COL1:
- input_semantic_name[slot] = TGSI_SEMANTIC_COLOR;
- input_semantic_index[slot] = 1;
- interpMode[slot] = TGSI_INTERPOLATE_LINEAR;
- break;
- case FRAG_ATTRIB_FOGC:
- input_semantic_name[slot] = TGSI_SEMANTIC_FOG;
- input_semantic_index[slot] = 0;
- interpMode[slot] = TGSI_INTERPOLATE_PERSPECTIVE;
- break;
- case FRAG_ATTRIB_FACE:
- input_semantic_name[slot] = TGSI_SEMANTIC_FACE;
- input_semantic_index[slot] = 0;
- interpMode[slot] = TGSI_INTERPOLATE_CONSTANT;
- 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_PNTC:
- 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:
- case FRAG_ATTRIB_VAR0:
- default:
- /* Actually, let's try and zero-base this just for
- * readability of the generated TGSI.
- */
- assert(attr >= FRAG_ATTRIB_TEX0);
- input_semantic_index[slot] = (attr - FRAG_ATTRIB_TEX0);
- input_semantic_name[slot] = TGSI_SEMANTIC_GENERIC;
- if (attr == FRAG_ATTRIB_PNTC)
- interpMode[slot] = TGSI_INTERPOLATE_LINEAR;
- else
- interpMode[slot] = TGSI_INTERPOLATE_PERSPECTIVE;
- break;
- }
+ if (key->drawpixels_z || key->drawpixels_stencil) {
+ fp = st_make_drawpix_z_stencil_program(st, key->drawpixels_z,
+ key->drawpixels_stencil);
}
else {
- inputMapping[attr] = -1;
+ /* RGBA */
+ st_make_drawpix_fragment_program(st, &stfp->Base, &fp);
+ variant->parameters = _mesa_clone_parameter_list(fp->Base.Parameters);
+ deleteFP = GL_TRUE;
}
+ stfp = st_fragment_program(fp);
}
+#endif
- /*
- * Semantics and mapping for outputs
- */
- {
- uint numColors = 0;
- GLbitfield64 outputsWritten = stfp->Base.Base.OutputsWritten;
-
- /* if z is written, emit that first */
- if (outputsWritten & BITFIELD64_BIT(FRAG_RESULT_DEPTH)) {
- fs_output_semantic_name[fs_num_outputs] = TGSI_SEMANTIC_POSITION;
- fs_output_semantic_index[fs_num_outputs] = 0;
- outputMapping[FRAG_RESULT_DEPTH] = fs_num_outputs;
- fs_num_outputs++;
- outputsWritten &= ~(1 << FRAG_RESULT_DEPTH);
- }
+ if (!stfp->tgsi.tokens) {
+ /* need to translate Mesa instructions to TGSI now */
+ GLuint outputMapping[FRAG_RESULT_MAX];
+ GLuint inputMapping[FRAG_ATTRIB_MAX];
+ GLuint interpMode[PIPE_MAX_SHADER_INPUTS]; /* XXX size? */
+ GLuint attr;
+ enum pipe_error error;
+ const GLbitfield inputsRead = stfp->Base.Base.InputsRead;
+ struct ureg_program *ureg;
+ GLboolean write_all = GL_FALSE;
- if (outputsWritten & BITFIELD64_BIT(FRAG_RESULT_STENCIL)) {
- fs_output_semantic_name[fs_num_outputs] = TGSI_SEMANTIC_STENCIL;
- fs_output_semantic_index[fs_num_outputs] = 0;
- outputMapping[FRAG_RESULT_STENCIL] = fs_num_outputs;
- fs_num_outputs++;
- outputsWritten &= ~(1 << FRAG_RESULT_STENCIL);
- }
+ ubyte input_semantic_name[PIPE_MAX_SHADER_INPUTS];
+ ubyte input_semantic_index[PIPE_MAX_SHADER_INPUTS];
+ uint fs_num_inputs = 0;
+
+ ubyte fs_output_semantic_name[PIPE_MAX_SHADER_OUTPUTS];
+ ubyte fs_output_semantic_index[PIPE_MAX_SHADER_OUTPUTS];
+ uint fs_num_outputs = 0;
+
+
+ _mesa_remove_output_reads(&stfp->Base.Base, PROGRAM_OUTPUT);
+
+ /*
+ * Convert Mesa program inputs to TGSI input register semantics.
+ */
+ for (attr = 0; attr < FRAG_ATTRIB_MAX; attr++) {
+ if (inputsRead & (1 << attr)) {
+ const GLuint slot = fs_num_inputs++;
+
+ inputMapping[attr] = slot;
- /* handle remaning outputs (color) */
- for (attr = 0; attr < FRAG_RESULT_MAX; attr++) {
- if (outputsWritten & BITFIELD64_BIT(attr)) {
switch (attr) {
- case FRAG_RESULT_DEPTH:
- case FRAG_RESULT_STENCIL:
- /* handled above */
- assert(0);
+ case FRAG_ATTRIB_WPOS:
+ input_semantic_name[slot] = TGSI_SEMANTIC_POSITION;
+ input_semantic_index[slot] = 0;
+ interpMode[slot] = TGSI_INTERPOLATE_LINEAR;
+ break;
+ case FRAG_ATTRIB_COL0:
+ input_semantic_name[slot] = TGSI_SEMANTIC_COLOR;
+ input_semantic_index[slot] = 0;
+ interpMode[slot] = TGSI_INTERPOLATE_LINEAR;
break;
+ case FRAG_ATTRIB_COL1:
+ input_semantic_name[slot] = TGSI_SEMANTIC_COLOR;
+ input_semantic_index[slot] = 1;
+ interpMode[slot] = TGSI_INTERPOLATE_LINEAR;
+ break;
+ case FRAG_ATTRIB_FOGC:
+ input_semantic_name[slot] = TGSI_SEMANTIC_FOG;
+ input_semantic_index[slot] = 0;
+ interpMode[slot] = TGSI_INTERPOLATE_PERSPECTIVE;
+ break;
+ case FRAG_ATTRIB_FACE:
+ input_semantic_name[slot] = TGSI_SEMANTIC_FACE;
+ input_semantic_index[slot] = 0;
+ interpMode[slot] = TGSI_INTERPOLATE_CONSTANT;
+ 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_PNTC:
+ 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:
+ case FRAG_ATTRIB_VAR0:
default:
- assert(attr == FRAG_RESULT_COLOR ||
- (FRAG_RESULT_DATA0 <= attr && attr < FRAG_RESULT_MAX));
- fs_output_semantic_name[fs_num_outputs] = TGSI_SEMANTIC_COLOR;
- fs_output_semantic_index[fs_num_outputs] = numColors;
- outputMapping[attr] = fs_num_outputs;
- numColors++;
+ /* Actually, let's try and zero-base this just for
+ * readability of the generated TGSI.
+ */
+ assert(attr >= FRAG_ATTRIB_TEX0);
+ input_semantic_index[slot] = (attr - FRAG_ATTRIB_TEX0);
+ input_semantic_name[slot] = TGSI_SEMANTIC_GENERIC;
+ if (attr == FRAG_ATTRIB_PNTC)
+ interpMode[slot] = TGSI_INTERPOLATE_LINEAR;
+ else
+ interpMode[slot] = TGSI_INTERPOLATE_PERSPECTIVE;
break;
}
+ }
+ else {
+ inputMapping[attr] = -1;
+ }
+ }
+ /*
+ * Semantics and mapping for outputs
+ */
+ {
+ uint numColors = 0;
+ GLbitfield64 outputsWritten = stfp->Base.Base.OutputsWritten;
+
+ /* if z is written, emit that first */
+ if (outputsWritten & BITFIELD64_BIT(FRAG_RESULT_DEPTH)) {
+ fs_output_semantic_name[fs_num_outputs] = TGSI_SEMANTIC_POSITION;
+ fs_output_semantic_index[fs_num_outputs] = 0;
+ outputMapping[FRAG_RESULT_DEPTH] = fs_num_outputs;
fs_num_outputs++;
+ outputsWritten &= ~(1 << FRAG_RESULT_DEPTH);
+ }
+
+ if (outputsWritten & BITFIELD64_BIT(FRAG_RESULT_STENCIL)) {
+ fs_output_semantic_name[fs_num_outputs] = TGSI_SEMANTIC_STENCIL;
+ fs_output_semantic_index[fs_num_outputs] = 0;
+ outputMapping[FRAG_RESULT_STENCIL] = fs_num_outputs;
+ fs_num_outputs++;
+ outputsWritten &= ~(1 << FRAG_RESULT_STENCIL);
+ }
+
+ /* handle remaning outputs (color) */
+ for (attr = 0; attr < FRAG_RESULT_MAX; attr++) {
+ if (outputsWritten & BITFIELD64_BIT(attr)) {
+ switch (attr) {
+ case FRAG_RESULT_DEPTH:
+ case FRAG_RESULT_STENCIL:
+ /* handled above */
+ assert(0);
+ break;
+ case FRAG_RESULT_COLOR:
+ write_all = GL_TRUE; /* fallthrough */
+ default:
+ assert(attr == FRAG_RESULT_COLOR ||
+ (FRAG_RESULT_DATA0 <= attr && attr < FRAG_RESULT_MAX));
+ fs_output_semantic_name[fs_num_outputs] = TGSI_SEMANTIC_COLOR;
+ fs_output_semantic_index[fs_num_outputs] = numColors;
+ outputMapping[attr] = fs_num_outputs;
+ numColors++;
+ break;
+ }
+
+ fs_num_outputs++;
+ }
}
}
- }
- ureg = ureg_create( TGSI_PROCESSOR_FRAGMENT );
- if (ureg == NULL)
- return;
+ ureg = ureg_create( TGSI_PROCESSOR_FRAGMENT );
+ if (ureg == NULL)
+ return NULL;
- if (ST_DEBUG & DEBUG_MESA) {
- _mesa_print_program(&stfp->Base.Base);
- _mesa_print_program_parameters(st->ctx, &stfp->Base.Base);
- debug_printf("\n");
+ if (ST_DEBUG & DEBUG_MESA) {
+ _mesa_print_program(&stfp->Base.Base);
+ _mesa_print_program_parameters(st->ctx, &stfp->Base.Base);
+ debug_printf("\n");
+ }
+ if (write_all == GL_TRUE)
+ ureg_property_fs_color0_writes_all_cbufs(ureg, 1);
+
+ error = st_translate_mesa_program(st->ctx,
+ TGSI_PROCESSOR_FRAGMENT,
+ ureg,
+ &stfp->Base.Base,
+ /* inputs */
+ fs_num_inputs,
+ inputMapping,
+ input_semantic_name,
+ input_semantic_index,
+ interpMode,
+ /* outputs */
+ fs_num_outputs,
+ outputMapping,
+ fs_output_semantic_name,
+ fs_output_semantic_index, FALSE );
+
+ stfp->tgsi.tokens = ureg_get_tokens( ureg, NULL );
+ ureg_destroy( ureg );
}
- error =
- st_translate_mesa_program(st->ctx,
- TGSI_PROCESSOR_FRAGMENT,
- ureg,
- &stfp->Base.Base,
- /* inputs */
- fs_num_inputs,
- inputMapping,
- input_semantic_name,
- input_semantic_index,
- interpMode,
- /* outputs */
- fs_num_outputs,
- outputMapping,
- fs_output_semantic_name,
- fs_output_semantic_index, FALSE );
-
- stfp->tgsi.tokens = ureg_get_tokens( ureg, NULL );
- ureg_destroy( ureg );
- stfp->driver_shader = pipe->create_fs_state(pipe, &stfp->tgsi);
+ /* fill in variant */
+ variant->driver_shader = pipe->create_fs_state(pipe, &stfp->tgsi);
+ variant->key = *key;
if (ST_DEBUG & DEBUG_TGSI) {
tgsi_dump( stfp->tgsi.tokens, 0/*TGSI_DUMP_VERBOSE*/ );
debug_printf("\n");
}
+
+ if (deleteFP) {
+ /* Free the temporary program made above */
+ struct gl_fragment_program *fp = &stfp->Base;
+ _mesa_reference_fragprog(st->ctx, &fp, NULL);
+ }
+
+ return variant;
}
-void
+
+/**
+ * Translate fragment program if needed.
+ */
+struct st_fp_variant *
+st_get_fp_variant(struct st_context *st,
+ struct st_fragment_program *stfp,
+ const struct st_fp_variant_key *key)
+{
+ struct st_fp_variant *fpv;
+
+ /* Search for existing variant */
+ for (fpv = stfp->variants; fpv; fpv = fpv->next) {
+ if (memcmp(&fpv->key, key, sizeof(*key)) == 0) {
+ break;
+ }
+ }
+
+ if (!fpv) {
+ /* create new */
+ fpv = st_translate_fragment_program(st, stfp, key);
+ if (fpv) {
+ /* insert into list */
+ fpv->next = stfp->variants;
+ stfp->variants = fpv;
+ }
+ }
+
+ return fpv;
+}
+
+
+/**
+ * Translate a geometry program to create a new variant.
+ */
+static struct st_gp_variant *
st_translate_geometry_program(struct st_context *st,
- struct st_geometry_program *stgp)
+ struct st_geometry_program *stgp,
+ const struct st_gp_variant_key *key)
{
GLuint inputMapping[GEOM_ATTRIB_MAX];
GLuint outputMapping[GEOM_RESULT_MAX];
@@ -494,12 +705,19 @@ st_translate_geometry_program(struct st_context *st,
GLuint maxSlot = 0;
struct ureg_program *ureg;
+ struct st_gp_variant *gpv;
+
+ gpv = CALLOC_STRUCT(st_gp_variant);
+ if (!gpv)
+ return NULL;
+
_mesa_remove_output_reads(&stgp->Base.Base, PROGRAM_OUTPUT);
_mesa_remove_output_reads(&stgp->Base.Base, PROGRAM_VARYING);
ureg = ureg_create( TGSI_PROCESSOR_GEOMETRY );
if (ureg == NULL) {
- return;
+ FREE(gpv);
+ return NULL;
}
/* which vertex output goes to the first geometry input */
@@ -529,7 +747,7 @@ st_translate_geometry_program(struct st_context *st,
} else
++gs_builtin_inputs;
-#if 1
+#if 0
debug_printf("input map at %d = %d\n",
slot + gs_array_offset, stgp->input_map[slot + gs_array_offset]);
#endif
@@ -580,7 +798,7 @@ st_translate_geometry_program(struct st_context *st,
* mapping and the semantic information for each output.
*/
for (attr = 0; attr < GEOM_RESULT_MAX; attr++) {
- if (stgp->Base.Base.OutputsWritten & (1 << attr)) {
+ if (stgp->Base.Base.OutputsWritten & BITFIELD64_BIT(attr)) {
GLuint slot;
slot = gs_num_outputs;
@@ -671,37 +889,35 @@ st_translate_geometry_program(struct st_context *st,
st_free_tokens(stgp->tgsi.tokens);
stgp->tgsi.tokens = NULL;
}
- if (stgp->driver_shader) {
- cso_delete_geometry_shader(st->cso_context, stgp->driver_shader);
- stgp->driver_shader = NULL;
- }
ureg_property_gs_input_prim(ureg, stgp->Base.InputType);
ureg_property_gs_output_prim(ureg, stgp->Base.OutputType);
ureg_property_gs_max_vertices(ureg, stgp->Base.VerticesOut);
- error = st_translate_mesa_program(st->ctx,
- TGSI_PROCESSOR_GEOMETRY,
- ureg,
- &stgp->Base.Base,
- /* inputs */
- gs_num_inputs,
- inputMapping,
- stgp->input_semantic_name,
- stgp->input_semantic_index,
- NULL,
- /* outputs */
- gs_num_outputs,
- outputMapping,
- gs_output_semantic_name,
- gs_output_semantic_index,
- FALSE);
-
+ error = st_translate_mesa_program(st->ctx,
+ TGSI_PROCESSOR_GEOMETRY,
+ ureg,
+ &stgp->Base.Base,
+ /* inputs */
+ gs_num_inputs,
+ inputMapping,
+ stgp->input_semantic_name,
+ stgp->input_semantic_index,
+ NULL,
+ /* outputs */
+ gs_num_outputs,
+ outputMapping,
+ gs_output_semantic_name,
+ gs_output_semantic_index,
+ FALSE);
stgp->num_inputs = gs_num_inputs;
stgp->tgsi.tokens = ureg_get_tokens( ureg, NULL );
ureg_destroy( ureg );
- stgp->driver_shader = pipe->create_gs_state(pipe, &stgp->tgsi);
+
+ /* fill in new variant */
+ gpv->driver_shader = pipe->create_gs_state(pipe, &stgp->tgsi);
+ gpv->key = *key;
if ((ST_DEBUG & DEBUG_TGSI) && (ST_DEBUG & DEBUG_MESA)) {
_mesa_print_program(&stgp->Base.Base);
@@ -712,8 +928,44 @@ st_translate_geometry_program(struct st_context *st,
tgsi_dump(stgp->tgsi.tokens, 0);
debug_printf("\n");
}
+
+ return gpv;
}
+
+/**
+ * Get/create geometry program variant.
+ */
+struct st_gp_variant *
+st_get_gp_variant(struct st_context *st,
+ struct st_geometry_program *stgp,
+ const struct st_gp_variant_key *key)
+{
+ struct st_gp_variant *gpv;
+
+ /* Search for existing variant */
+ for (gpv = stgp->variants; gpv; gpv = gpv->next) {
+ if (memcmp(&gpv->key, key, sizeof(*key)) == 0) {
+ break;
+ }
+ }
+
+ if (!gpv) {
+ /* create new */
+ gpv = st_translate_geometry_program(st, stgp, key);
+ if (gpv) {
+ /* insert into list */
+ gpv->next = stgp->variants;
+ stgp->variants = gpv;
+ }
+ }
+
+ return gpv;
+}
+
+
+
+
/**
* Debug- print current shader text
*/
@@ -759,3 +1011,155 @@ st_print_shaders(struct gl_context *ctx)
}
}
}
+
+
+/**
+ * Vert/Geom/Frag programs have per-context variants. Free all the
+ * variants attached to the given program which match the given context.
+ */
+static void
+destroy_program_variants(struct st_context *st, struct gl_program *program)
+{
+ if (!program)
+ return;
+
+ switch (program->Target) {
+ case GL_VERTEX_PROGRAM_ARB:
+ {
+ struct st_vertex_program *stvp = (struct st_vertex_program *) program;
+ struct st_vp_variant *vpv, **prevPtr = &stvp->variants;
+
+ for (vpv = stvp->variants; vpv; ) {
+ struct st_vp_variant *next = vpv->next;
+ if (vpv->key.st == st) {
+ /* unlink from list */
+ *prevPtr = next;
+ /* destroy this variant */
+ delete_vp_variant(st, vpv);
+ }
+ else {
+ prevPtr = &vpv->next;
+ }
+ vpv = next;
+ }
+ }
+ break;
+ case GL_FRAGMENT_PROGRAM_ARB:
+ {
+ struct st_fragment_program *stfp =
+ (struct st_fragment_program *) program;
+ struct st_fp_variant *fpv, **prevPtr = &stfp->variants;
+
+ for (fpv = stfp->variants; fpv; ) {
+ struct st_fp_variant *next = fpv->next;
+ if (fpv->key.st == st) {
+ /* unlink from list */
+ *prevPtr = next;
+ /* destroy this variant */
+ delete_fp_variant(st, fpv);
+ }
+ else {
+ prevPtr = &fpv->next;
+ }
+ fpv = next;
+ }
+ }
+ break;
+ case MESA_GEOMETRY_PROGRAM:
+ {
+ struct st_geometry_program *stgp =
+ (struct st_geometry_program *) program;
+ struct st_gp_variant *gpv, **prevPtr = &stgp->variants;
+
+ for (gpv = stgp->variants; gpv; ) {
+ struct st_gp_variant *next = gpv->next;
+ if (gpv->key.st == st) {
+ /* unlink from list */
+ *prevPtr = next;
+ /* destroy this variant */
+ delete_gp_variant(st, gpv);
+ }
+ else {
+ prevPtr = &gpv->next;
+ }
+ gpv = next;
+ }
+ }
+ break;
+ default:
+ _mesa_problem(NULL, "Unexpected program target in "
+ "destroy_program_variants_cb()");
+ }
+}
+
+
+/**
+ * Callback for _mesa_HashWalk. Free all the shader's program variants
+ * which match the given context.
+ */
+static void
+destroy_shader_program_variants_cb(GLuint key, void *data, void *userData)
+{
+ struct st_context *st = (struct st_context *) userData;
+ struct gl_shader *shader = (struct gl_shader *) data;
+
+ switch (shader->Type) {
+ case GL_SHADER_PROGRAM_MESA:
+ {
+ struct gl_shader_program *shProg = (struct gl_shader_program *) data;
+ GLuint i;
+
+ for (i = 0; i < shProg->NumShaders; i++) {
+ destroy_program_variants(st, shProg->Shaders[i]->Program);
+ }
+
+ destroy_program_variants(st, (struct gl_program *)
+ shProg->VertexProgram);
+ destroy_program_variants(st, (struct gl_program *)
+ shProg->FragmentProgram);
+ destroy_program_variants(st, (struct gl_program *)
+ shProg->GeometryProgram);
+ }
+ break;
+ case GL_VERTEX_SHADER:
+ case GL_FRAGMENT_SHADER:
+ case GL_GEOMETRY_SHADER:
+ {
+ destroy_program_variants(st, shader->Program);
+ }
+ break;
+ default:
+ assert(0);
+ }
+}
+
+
+/**
+ * Callback for _mesa_HashWalk. Free all the program variants which match
+ * the given context.
+ */
+static void
+destroy_program_variants_cb(GLuint key, void *data, void *userData)
+{
+ struct st_context *st = (struct st_context *) userData;
+ struct gl_program *program = (struct gl_program *) data;
+ destroy_program_variants(st, program);
+}
+
+
+/**
+ * Walk over all shaders and programs to delete any variants which
+ * belong to the given context.
+ * This is called during context tear-down.
+ */
+void
+st_destroy_program_variants(struct st_context *st)
+{
+ /* ARB vert/frag program */
+ _mesa_HashWalk(st->ctx->Shared->Programs,
+ destroy_program_variants_cb, st);
+
+ /* GLSL vert/frag/geom shaders */
+ _mesa_HashWalk(st->ctx->Shared->ShaderObjects,
+ destroy_shader_program_variants_cb, st);
+}
diff --git a/src/mesa/state_tracker/st_program.h b/src/mesa/state_tracker/st_program.h
index 72dbc715fe1..c4244df939e 100644
--- a/src/mesa/state_tracker/st_program.h
+++ b/src/mesa/state_tracker/st_program.h
@@ -40,26 +40,61 @@
#include "st_context.h"
+/** Fragment program variant key */
+struct st_fp_variant_key
+{
+ struct st_context *st; /**< variants are per-context */
+
+ /** for glBitmap */
+ GLuint bitmap:1; /**< glBitmap variant? */
+
+ /** for glDrawPixels */
+ GLuint drawpixels:1; /**< glDrawPixels variant */
+ GLuint scaleAndBias:1; /**< glDrawPixels w/ scale and/or bias? */
+ GLuint pixelMaps:1; /**< glDrawPixels w/ pixel lookup map? */
+ GLuint drawpixels_z:1; /**< glDrawPixels(GL_DEPTH) */
+ GLuint drawpixels_stencil:1; /**< glDrawPixels(GL_STENCIL) */
+};
+
+
+/**
+ * Variant of a fragment program.
+ */
+struct st_fp_variant
+{
+ /** Parameters which generated this version of fragment program */
+ struct st_fp_variant_key key;
+
+ /** Driver's compiled shader */
+ void *driver_shader;
+
+ /** For glBitmap variants */
+ struct gl_program_parameter_list *parameters;
+ uint bitmap_sampler;
+
+ /** next in linked list */
+ struct st_fp_variant *next;
+};
+
+
/**
* Derived from Mesa gl_fragment_program:
*/
struct st_fragment_program
{
struct gl_fragment_program Base;
- GLuint serialNo;
struct pipe_shader_state tgsi;
- void *driver_shader;
- /** Program prefixed with glBitmap prologue */
- struct st_fragment_program *bitmap_program;
- uint bitmap_sampler;
+ struct st_fp_variant *variants;
};
-struct st_vp_varient_key
+/** Vertex program variant key */
+struct st_vp_variant_key
{
+ struct st_context *st; /**< variants are per-context */
boolean passthrough_edgeflags;
};
@@ -68,12 +103,12 @@ struct st_vp_varient_key
* This represents a vertex program, especially translated to match
* the inputs of a particular fragment shader.
*/
-struct st_vp_varient
+struct st_vp_variant
{
/* Parameters which generated this translated version of a vertex
* shader:
*/
- struct st_vp_varient_key key;
+ struct st_vp_variant_key key;
/**
* TGSI tokens (to later generate a 'draw' module shader for
@@ -88,9 +123,9 @@ struct st_vp_varient
struct draw_vertex_shader *draw_shader;
/** Next in linked list */
- struct st_vp_varient *next;
+ struct st_vp_variant *next;
- /** similar to that in st_vertex_program, but with information about edgeflags too */
+ /** similar to that in st_vertex_program, but with edgeflags info too */
GLuint num_inputs;
};
@@ -101,7 +136,6 @@ struct st_vp_varient
struct st_vertex_program
{
struct gl_vertex_program Base; /**< The Mesa vertex program */
- GLuint serialNo, lastSerialNo;
/** maps a Mesa VERT_ATTRIB_x to a packed TGSI input index */
GLuint input_to_index[VERT_ATTRIB_MAX];
@@ -115,18 +149,41 @@ struct st_vertex_program
ubyte output_semantic_index[VERT_RESULT_MAX];
GLuint num_outputs;
- /** List of translated varients of this vertex program.
+ /** List of translated variants of this vertex program.
*/
- struct st_vp_varient *varients;
+ struct st_vp_variant *variants;
+};
+
+
+
+/** Geometry program variant key */
+struct st_gp_variant_key
+{
+ struct st_context *st; /**< variants are per-context */
+ /* no other fields yet */
+};
+
+
+/**
+ * Geometry program variant.
+ */
+struct st_gp_variant
+{
+ /* Parameters which generated this translated version of a vertex */
+ struct st_gp_variant_key key;
+
+ void *driver_shader;
+
+ struct st_gp_variant *next;
};
+
/**
* Derived from Mesa gl_geometry_program:
*/
struct st_geometry_program
{
struct gl_geometry_program Base; /**< The Mesa geometry program */
- GLuint serialNo;
/** map GP input back to VP output */
GLuint input_map[PIPE_MAX_SHADER_INPUTS];
@@ -145,9 +202,12 @@ struct st_geometry_program
ubyte input_semantic_index[PIPE_MAX_SHADER_INPUTS];
struct pipe_shader_state tgsi;
- void *driver_shader;
+
+ struct st_gp_variant *variants;
};
+
+
static INLINE struct st_fragment_program *
st_fragment_program( struct gl_fragment_program *fp )
{
@@ -162,9 +222,9 @@ st_vertex_program( struct gl_vertex_program *vp )
}
static INLINE struct st_geometry_program *
-st_geometry_program( struct gl_geometry_program *vp )
+st_geometry_program( struct gl_geometry_program *gp )
{
- return (struct st_geometry_program *)vp;
+ return (struct st_geometry_program *)gp;
}
static INLINE void
@@ -198,32 +258,43 @@ st_reference_fragprog(struct st_context *st,
}
-extern void
-st_translate_fragment_program(struct st_context *st,
- struct st_fragment_program *fp);
+extern struct st_vp_variant *
+st_get_vp_variant(struct st_context *st,
+ struct st_vertex_program *stvp,
+ const struct st_vp_variant_key *key);
+
+
+extern struct st_fp_variant *
+st_get_fp_variant(struct st_context *st,
+ struct st_fragment_program *stfp,
+ const struct st_fp_variant_key *key);
+
+
+extern struct st_gp_variant *
+st_get_gp_variant(struct st_context *st,
+ struct st_geometry_program *stgp,
+ const struct st_gp_variant_key *key);
+
+
extern void
-st_translate_geometry_program(struct st_context *st,
- struct st_geometry_program *stgp);
+st_release_vp_variants( struct st_context *st,
+ struct st_vertex_program *stvp );
-/* 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);
+st_release_fp_variants( struct st_context *st,
+ struct st_fragment_program *stfp );
-extern struct st_vp_varient *
-st_translate_vertex_program(struct st_context *st,
- struct st_vertex_program *stvp,
- const struct st_vp_varient_key *key);
+extern void
+st_release_gp_variants(struct st_context *st,
+ struct st_geometry_program *stgp);
-void
-st_vp_release_varients( struct st_context *st,
- struct st_vertex_program *stvp );
extern void
st_print_shaders(struct gl_context *ctx);
+extern void
+st_destroy_program_variants(struct st_context *st);
+
#endif
diff --git a/src/mesa/state_tracker/st_texture.c b/src/mesa/state_tracker/st_texture.c
index 155ea39f18c..ffe7e256a56 100644
--- a/src/mesa/state_tracker/st_texture.c
+++ b/src/mesa/state_tracker/st_texture.c
@@ -59,6 +59,7 @@ st_texture_create(struct st_context *st,
GLuint width0,
GLuint height0,
GLuint depth0,
+ GLuint layers,
GLuint bind )
{
struct pipe_resource pt, *newtex;
@@ -68,6 +69,8 @@ st_texture_create(struct st_context *st,
assert(width0 > 0);
assert(height0 > 0);
assert(depth0 > 0);
+ if (target == PIPE_TEXTURE_CUBE)
+ assert(layers == 6);
DBG("%s target %s format %s last_level %d\n", __FUNCTION__,
_mesa_lookup_enum_by_nr(target),
@@ -75,7 +78,7 @@ st_texture_create(struct st_context *st,
assert(format);
assert(screen->is_format_supported(screen, format, target, 0,
- PIPE_BIND_SAMPLER_VIEW, 0));
+ PIPE_BIND_SAMPLER_VIEW));
memset(&pt, 0, sizeof(pt));
pt.target = target;
@@ -84,7 +87,7 @@ st_texture_create(struct st_context *st,
pt.width0 = width0;
pt.height0 = height0;
pt.depth0 = depth0;
- pt.array_size = (target == PIPE_TEXTURE_CUBE ? 6 : 1);
+ pt.array_size = (target == PIPE_TEXTURE_CUBE ? 6 : layers);
pt.usage = PIPE_USAGE_DEFAULT;
pt.bind = bind;
pt.flags = 0;
@@ -98,6 +101,72 @@ st_texture_create(struct st_context *st,
/**
+ * In OpenGL the number of 1D array texture layers is the "height" and
+ * the number of 2D array texture layers is the "depth". In Gallium the
+ * number of layers in an array texture is a separate 'array_size' field.
+ * This function converts dimensions from the former to the later.
+ */
+void
+st_gl_texture_dims_to_pipe_dims(GLenum texture,
+ GLuint widthIn,
+ GLuint heightIn,
+ GLuint depthIn,
+ GLuint *widthOut,
+ GLuint *heightOut,
+ GLuint *depthOut,
+ GLuint *layersOut)
+{
+ switch (texture) {
+ case GL_TEXTURE_1D:
+ assert(heightIn == 1);
+ assert(depthIn == 1);
+ *widthOut = widthIn;
+ *heightOut = 1;
+ *depthOut = 1;
+ *layersOut = 1;
+ break;
+ case GL_TEXTURE_1D_ARRAY:
+ assert(depthIn == 1);
+ *widthOut = widthIn;
+ *heightOut = 1;
+ *depthOut = 1;
+ *layersOut = heightIn;
+ break;
+ case GL_TEXTURE_2D:
+ case GL_TEXTURE_RECTANGLE:
+ assert(depthIn == 1);
+ *widthOut = widthIn;
+ *heightOut = heightIn;
+ *depthOut = 1;
+ *layersOut = 1;
+ break;
+ case GL_TEXTURE_CUBE_MAP:
+ assert(depthIn == 1);
+ *widthOut = widthIn;
+ *heightOut = heightIn;
+ *depthOut = 1;
+ *layersOut = 6;
+ break;
+ case GL_TEXTURE_2D_ARRAY:
+ *widthOut = widthIn;
+ *heightOut = heightIn;
+ *depthOut = 1;
+ *layersOut = depthIn;
+ break;
+ default:
+ assert(0 && "Unexpected texture in st_gl_texture_dims_to_pipe_dims()");
+ /* fall-through */
+ case GL_TEXTURE_3D:
+ *widthOut = widthIn;
+ *heightOut = heightIn;
+ *depthOut = depthIn;
+ *layersOut = 1;
+ break;
+ }
+}
+
+
+/**
* Check if a texture image can be pulled into a unified mipmap texture.
*/
GLboolean
@@ -105,6 +174,8 @@ st_texture_match_image(const struct pipe_resource *pt,
const struct gl_texture_image *image,
GLuint face, GLuint level)
{
+ GLuint ptWidth, ptHeight, ptDepth, ptLayers;
+
/* Images with borders are never pulled into mipmap textures.
*/
if (image->Border)
@@ -115,12 +186,17 @@ st_texture_match_image(const struct pipe_resource *pt,
if (st_mesa_format_to_pipe_format(image->TexFormat) != pt->format)
return GL_FALSE;
+ st_gl_texture_dims_to_pipe_dims(image->TexObject->Target,
+ image->Width, image->Height, image->Depth,
+ &ptWidth, &ptHeight, &ptDepth, &ptLayers);
+
/* Test if this image's size matches what's expected in the
* established texture.
*/
- if (image->Width != u_minify(pt->width0, level) ||
- image->Height != u_minify(pt->height0, level) ||
- image->Depth != u_minify(pt->depth0, level))
+ if (ptWidth != u_minify(pt->width0, level) ||
+ ptHeight != u_minify(pt->height0, level) ||
+ ptDepth != u_minify(pt->depth0, level) ||
+ ptLayers != pt->array_size)
return GL_FALSE;
return GL_TRUE;
@@ -212,14 +288,20 @@ st_texture_image_data(struct st_context *st,
GLuint src_row_stride, GLuint src_image_stride)
{
struct pipe_context *pipe = st->pipe;
- GLuint depth = u_minify(dst->depth0, level);
GLuint i;
const GLubyte *srcUB = src;
struct pipe_transfer *dst_transfer;
+ GLuint layers;
+
+ if (dst->target == PIPE_TEXTURE_1D_ARRAY ||
+ dst->target == PIPE_TEXTURE_2D_ARRAY)
+ layers = dst->array_size;
+ else
+ layers = u_minify(dst->depth0, level);
DBG("%s\n", __FUNCTION__);
- for (i = 0; i < depth; i++) {
+ for (i = 0; i < layers; i++) {
dst_transfer = pipe_get_transfer(st->pipe, dst, level, face + i,
PIPE_TRANSFER_WRITE, 0, 0,
u_minify(dst->width0, level),
diff --git a/src/mesa/state_tracker/st_texture.h b/src/mesa/state_tracker/st_texture.h
index c78901c0360..d50c3c9af79 100644
--- a/src/mesa/state_tracker/st_texture.h
+++ b/src/mesa/state_tracker/st_texture.h
@@ -71,7 +71,10 @@ struct st_texture_object
*/
GLuint lastLevel;
- /** The size of the level=0 mipmap image */
+ /** The size of the level=0 mipmap image.
+ * Note that the number of 1D array layers will be in height0 and the
+ * number of 2D array layers will be in depth0, as in GL.
+ */
GLuint width0, height0, depth0;
/* On validation any active images held in main memory or in other
@@ -125,9 +128,7 @@ st_create_texture_sampler_view(struct pipe_context *pipe,
{
struct pipe_sampler_view templ;
- u_sampler_view_default_template(&templ,
- texture,
- texture->format);
+ u_sampler_view_default_template(&templ, texture, texture->format);
return pipe->create_sampler_view(pipe, texture, &templ);
}
@@ -140,17 +141,15 @@ st_create_texture_sampler_view_format(struct pipe_context *pipe,
{
struct pipe_sampler_view templ;
- u_sampler_view_default_template(&templ,
- texture,
- format);
+ u_sampler_view_default_template(&templ, texture, format);
return pipe->create_sampler_view(pipe, texture, &templ);
}
+
static INLINE struct pipe_sampler_view *
st_get_texture_sampler_view(struct st_texture_object *stObj,
struct pipe_context *pipe)
-
{
if (!stObj || !stObj->pt) {
return NULL;
@@ -172,9 +171,20 @@ st_texture_create(struct st_context *st,
GLuint width0,
GLuint height0,
GLuint depth0,
+ GLuint layers,
GLuint tex_usage );
+extern void
+st_gl_texture_dims_to_pipe_dims(GLenum texture,
+ GLuint widthIn,
+ GLuint heightIn,
+ GLuint depthIn,
+ GLuint *widthOut,
+ GLuint *heightOut,
+ GLuint *depthOut,
+ GLuint *layersOut);
+
/* Check if an image fits into an existing texture object.
*/
extern GLboolean
diff --git a/src/mesa/swrast/s_aaline.h b/src/mesa/swrast/s_aaline.h
index f7d92c52412..74d5518e179 100644
--- a/src/mesa/swrast/s_aaline.h
+++ b/src/mesa/swrast/s_aaline.h
@@ -28,7 +28,7 @@
#define S_AALINE_H
-#include "main/mtypes.h"
+struct gl_context;
extern void
diff --git a/src/mesa/swrast/s_aatriangle.c b/src/mesa/swrast/s_aatriangle.c
index c597808e40e..2c02a01327f 100644
--- a/src/mesa/swrast/s_aatriangle.c
+++ b/src/mesa/swrast/s_aatriangle.c
@@ -33,6 +33,7 @@
#include "main/colormac.h"
#include "main/macros.h"
#include "main/imports.h"
+#include "main/state.h"
#include "s_aatriangle.h"
#include "s_context.h"
#include "s_span.h"
@@ -305,7 +306,7 @@ _swrast_set_aa_triangle_function(struct gl_context *ctx)
if (ctx->Texture._EnabledCoordUnits != 0
|| ctx->FragmentProgram._Current
|| swrast->_FogEnabled
- || NEED_SECONDARY_COLOR(ctx)) {
+ || _mesa_need_secondary_color(ctx)) {
SWRAST_CONTEXT(ctx)->Triangle = general_aa_tri;
}
else {
diff --git a/src/mesa/swrast/s_aatriangle.h b/src/mesa/swrast/s_aatriangle.h
index 746e456f5f4..e40efb1985b 100644
--- a/src/mesa/swrast/s_aatriangle.h
+++ b/src/mesa/swrast/s_aatriangle.h
@@ -28,7 +28,7 @@
#define S_AATRIANGLE_H
-#include "main/mtypes.h"
+struct gl_context;
extern void
diff --git a/src/mesa/swrast/s_accum.h b/src/mesa/swrast/s_accum.h
index 071644b64fa..1ad7d329529 100644
--- a/src/mesa/swrast/s_accum.h
+++ b/src/mesa/swrast/s_accum.h
@@ -27,7 +27,8 @@
#define S_ACCUM_H
-#include "main/mtypes.h"
+struct gl_context;
+struct gl_renderbuffer;
extern void
diff --git a/src/mesa/swrast/s_alpha.h b/src/mesa/swrast/s_alpha.h
index 7cd6d800b29..fca209a4467 100644
--- a/src/mesa/swrast/s_alpha.h
+++ b/src/mesa/swrast/s_alpha.h
@@ -1,4 +1,3 @@
-
/*
* Mesa 3-D graphics library
* Version: 4.1
@@ -28,9 +27,10 @@
#define S_ALPHA_H
-#include "main/mtypes.h"
+#include "main/glheader.h"
#include "s_span.h"
+struct gl_context;
extern GLint
_swrast_alpha_test( const struct gl_context *ctx, SWspan *span );
diff --git a/src/mesa/swrast/s_atifragshader.h b/src/mesa/swrast/s_atifragshader.h
index 39a6e64ed92..10aaaa592c7 100644
--- a/src/mesa/swrast/s_atifragshader.h
+++ b/src/mesa/swrast/s_atifragshader.h
@@ -27,9 +27,9 @@
#define S_ATIFRAGSHADER_H
-#include "main/mtypes.h"
#include "s_span.h"
+struct gl_context;
extern void
_swrast_exec_fragment_shader( struct gl_context *ctx, SWspan *span );
diff --git a/src/mesa/swrast/s_bitmap.c b/src/mesa/swrast/s_bitmap.c
index 21488d3ba3e..18f1c1866bf 100644
--- a/src/mesa/swrast/s_bitmap.c
+++ b/src/mesa/swrast/s_bitmap.c
@@ -33,6 +33,7 @@
#include "main/condrender.h"
#include "main/image.h"
#include "main/macros.h"
+#include "main/pbo.h"
#include "s_context.h"
#include "s_span.h"
diff --git a/src/mesa/swrast/s_blend.c b/src/mesa/swrast/s_blend.c
index d61baba0f33..793921250ad 100644
--- a/src/mesa/swrast/s_blend.c
+++ b/src/mesa/swrast/s_blend.c
@@ -75,10 +75,10 @@ blend_noop(struct gl_context *ctx, GLuint n, const GLubyte mask[],
{
GLint bytes;
- ASSERT(ctx->Color.BlendEquationRGB == GL_FUNC_ADD);
- ASSERT(ctx->Color.BlendEquationA == GL_FUNC_ADD);
- ASSERT(ctx->Color.BlendSrcRGB == GL_ZERO);
- ASSERT(ctx->Color.BlendDstRGB == GL_ONE);
+ ASSERT(ctx->Color.Blend[0].EquationRGB == GL_FUNC_ADD);
+ ASSERT(ctx->Color.Blend[0].EquationA == GL_FUNC_ADD);
+ ASSERT(ctx->Color.Blend[0].SrcRGB == GL_ZERO);
+ ASSERT(ctx->Color.Blend[0].DstRGB == GL_ONE);
(void) ctx;
/* just memcpy */
@@ -101,10 +101,10 @@ static void _BLENDAPI
blend_replace(struct gl_context *ctx, GLuint n, const GLubyte mask[],
GLvoid *src, const GLvoid *dst, GLenum chanType)
{
- ASSERT(ctx->Color.BlendEquationRGB == GL_FUNC_ADD);
- ASSERT(ctx->Color.BlendEquationA == GL_FUNC_ADD);
- ASSERT(ctx->Color.BlendSrcRGB == GL_ONE);
- ASSERT(ctx->Color.BlendDstRGB == GL_ZERO);
+ ASSERT(ctx->Color.Blend[0].EquationRGB == GL_FUNC_ADD);
+ ASSERT(ctx->Color.Blend[0].EquationA == GL_FUNC_ADD);
+ ASSERT(ctx->Color.Blend[0].SrcRGB == GL_ONE);
+ ASSERT(ctx->Color.Blend[0].DstRGB == GL_ZERO);
(void) ctx;
(void) n;
(void) mask;
@@ -125,12 +125,12 @@ blend_transparency_ubyte(struct gl_context *ctx, GLuint n, const GLubyte mask[],
const GLubyte (*dest)[4] = (const GLubyte (*)[4]) dst;
GLuint i;
- ASSERT(ctx->Color.BlendEquationRGB == GL_FUNC_ADD);
- ASSERT(ctx->Color.BlendEquationA == GL_FUNC_ADD);
- ASSERT(ctx->Color.BlendSrcRGB == GL_SRC_ALPHA);
- ASSERT(ctx->Color.BlendSrcA == GL_SRC_ALPHA);
- ASSERT(ctx->Color.BlendDstRGB == GL_ONE_MINUS_SRC_ALPHA);
- ASSERT(ctx->Color.BlendDstA == GL_ONE_MINUS_SRC_ALPHA);
+ ASSERT(ctx->Color.Blend[0].EquationRGB == GL_FUNC_ADD);
+ ASSERT(ctx->Color.Blend[0].EquationA == GL_FUNC_ADD);
+ ASSERT(ctx->Color.Blend[0].SrcRGB == GL_SRC_ALPHA);
+ ASSERT(ctx->Color.Blend[0].SrcA == GL_SRC_ALPHA);
+ ASSERT(ctx->Color.Blend[0].DstRGB == GL_ONE_MINUS_SRC_ALPHA);
+ ASSERT(ctx->Color.Blend[0].DstA == GL_ONE_MINUS_SRC_ALPHA);
ASSERT(chanType == GL_UNSIGNED_BYTE);
(void) ctx;
@@ -170,12 +170,12 @@ blend_transparency_ushort(struct gl_context *ctx, GLuint n, const GLubyte mask[]
const GLushort (*dest)[4] = (const GLushort (*)[4]) dst;
GLuint i;
- ASSERT(ctx->Color.BlendEquationRGB == GL_FUNC_ADD);
- ASSERT(ctx->Color.BlendEquationA == GL_FUNC_ADD);
- ASSERT(ctx->Color.BlendSrcRGB == GL_SRC_ALPHA);
- ASSERT(ctx->Color.BlendSrcA == GL_SRC_ALPHA);
- ASSERT(ctx->Color.BlendDstRGB == GL_ONE_MINUS_SRC_ALPHA);
- ASSERT(ctx->Color.BlendDstA == GL_ONE_MINUS_SRC_ALPHA);
+ ASSERT(ctx->Color.Blend[0].EquationRGB == GL_FUNC_ADD);
+ ASSERT(ctx->Color.Blend[0].EquationA == GL_FUNC_ADD);
+ ASSERT(ctx->Color.Blend[0].SrcRGB == GL_SRC_ALPHA);
+ ASSERT(ctx->Color.Blend[0].SrcA == GL_SRC_ALPHA);
+ ASSERT(ctx->Color.Blend[0].DstRGB == GL_ONE_MINUS_SRC_ALPHA);
+ ASSERT(ctx->Color.Blend[0].DstA == GL_ONE_MINUS_SRC_ALPHA);
ASSERT(chanType == GL_UNSIGNED_SHORT);
(void) ctx;
@@ -208,12 +208,12 @@ blend_transparency_float(struct gl_context *ctx, GLuint n, const GLubyte mask[],
const GLfloat (*dest)[4] = (const GLfloat (*)[4]) dst;
GLuint i;
- ASSERT(ctx->Color.BlendEquationRGB == GL_FUNC_ADD);
- ASSERT(ctx->Color.BlendEquationA == GL_FUNC_ADD);
- ASSERT(ctx->Color.BlendSrcRGB == GL_SRC_ALPHA);
- ASSERT(ctx->Color.BlendSrcA == GL_SRC_ALPHA);
- ASSERT(ctx->Color.BlendDstRGB == GL_ONE_MINUS_SRC_ALPHA);
- ASSERT(ctx->Color.BlendDstA == GL_ONE_MINUS_SRC_ALPHA);
+ ASSERT(ctx->Color.Blend[0].EquationRGB == GL_FUNC_ADD);
+ ASSERT(ctx->Color.Blend[0].EquationA == GL_FUNC_ADD);
+ ASSERT(ctx->Color.Blend[0].SrcRGB == GL_SRC_ALPHA);
+ ASSERT(ctx->Color.Blend[0].SrcA == GL_SRC_ALPHA);
+ ASSERT(ctx->Color.Blend[0].DstRGB == GL_ONE_MINUS_SRC_ALPHA);
+ ASSERT(ctx->Color.Blend[0].DstA == GL_ONE_MINUS_SRC_ALPHA);
ASSERT(chanType == GL_FLOAT);
(void) ctx;
@@ -248,10 +248,10 @@ blend_add(struct gl_context *ctx, GLuint n, const GLubyte mask[],
{
GLuint i;
- ASSERT(ctx->Color.BlendEquationRGB == GL_FUNC_ADD);
- ASSERT(ctx->Color.BlendEquationA == GL_FUNC_ADD);
- ASSERT(ctx->Color.BlendSrcRGB == GL_ONE);
- ASSERT(ctx->Color.BlendDstRGB == GL_ONE);
+ ASSERT(ctx->Color.Blend[0].EquationRGB == GL_FUNC_ADD);
+ ASSERT(ctx->Color.Blend[0].EquationA == GL_FUNC_ADD);
+ ASSERT(ctx->Color.Blend[0].SrcRGB == GL_ONE);
+ ASSERT(ctx->Color.Blend[0].DstRGB == GL_ONE);
(void) ctx;
if (chanType == GL_UNSIGNED_BYTE) {
@@ -313,8 +313,8 @@ blend_min(struct gl_context *ctx, GLuint n, const GLubyte mask[],
GLvoid *src, const GLvoid *dst, GLenum chanType)
{
GLuint i;
- ASSERT(ctx->Color.BlendEquationRGB == GL_MIN);
- ASSERT(ctx->Color.BlendEquationA == GL_MIN);
+ ASSERT(ctx->Color.Blend[0].EquationRGB == GL_MIN);
+ ASSERT(ctx->Color.Blend[0].EquationA == GL_MIN);
(void) ctx;
if (chanType == GL_UNSIGNED_BYTE) {
@@ -366,8 +366,8 @@ blend_max(struct gl_context *ctx, GLuint n, const GLubyte mask[],
GLvoid *src, const GLvoid *dst, GLenum chanType)
{
GLuint i;
- ASSERT(ctx->Color.BlendEquationRGB == GL_MAX);
- ASSERT(ctx->Color.BlendEquationA == GL_MAX);
+ ASSERT(ctx->Color.Blend[0].EquationRGB == GL_MAX);
+ ASSERT(ctx->Color.Blend[0].EquationA == GL_MAX);
(void) ctx;
if (chanType == GL_UNSIGNED_BYTE) {
@@ -500,7 +500,7 @@ blend_general_float(struct gl_context *ctx, GLuint n, const GLubyte mask[],
*/
/* Source RGB factor */
- switch (ctx->Color.BlendSrcRGB) {
+ switch (ctx->Color.Blend[0].SrcRGB) {
case GL_ZERO:
sR = sG = sB = 0.0F;
break;
@@ -570,7 +570,7 @@ blend_general_float(struct gl_context *ctx, GLuint n, const GLubyte mask[],
}
/* Source Alpha factor */
- switch (ctx->Color.BlendSrcA) {
+ switch (ctx->Color.Blend[0].SrcA) {
case GL_ZERO:
sA = 0.0F;
break;
@@ -624,7 +624,7 @@ blend_general_float(struct gl_context *ctx, GLuint n, const GLubyte mask[],
}
/* Dest RGB factor */
- switch (ctx->Color.BlendDstRGB) {
+ switch (ctx->Color.Blend[0].DstRGB) {
case GL_ZERO:
dR = dG = dB = 0.0F;
break;
@@ -687,7 +687,7 @@ blend_general_float(struct gl_context *ctx, GLuint n, const GLubyte mask[],
}
/* Dest Alpha factor */
- switch (ctx->Color.BlendDstA) {
+ switch (ctx->Color.Blend[0].DstA) {
case GL_ZERO:
dA = 0.0F;
break;
@@ -738,7 +738,7 @@ blend_general_float(struct gl_context *ctx, GLuint n, const GLubyte mask[],
}
/* compute the blended RGB */
- switch (ctx->Color.BlendEquationRGB) {
+ switch (ctx->Color.Blend[0].EquationRGB) {
case GL_FUNC_ADD:
r = Rs * sR + Rd * dR;
g = Gs * sG + Gd * dG;
@@ -775,7 +775,7 @@ blend_general_float(struct gl_context *ctx, GLuint n, const GLubyte mask[],
}
/* compute the blended alpha */
- switch (ctx->Color.BlendEquationA) {
+ switch (ctx->Color.Blend[0].EquationA) {
case GL_FUNC_ADD:
a = As * sA + Ad * dA;
break;
@@ -907,13 +907,13 @@ void
_swrast_choose_blend_func(struct gl_context *ctx, GLenum chanType)
{
SWcontext *swrast = SWRAST_CONTEXT(ctx);
- const GLenum eq = ctx->Color.BlendEquationRGB;
- const GLenum srcRGB = ctx->Color.BlendSrcRGB;
- const GLenum dstRGB = ctx->Color.BlendDstRGB;
- const GLenum srcA = ctx->Color.BlendSrcA;
- const GLenum dstA = ctx->Color.BlendDstA;
+ const GLenum eq = ctx->Color.Blend[0].EquationRGB;
+ const GLenum srcRGB = ctx->Color.Blend[0].SrcRGB;
+ const GLenum dstRGB = ctx->Color.Blend[0].DstRGB;
+ const GLenum srcA = ctx->Color.Blend[0].SrcA;
+ const GLenum dstA = ctx->Color.Blend[0].DstA;
- if (ctx->Color.BlendEquationRGB != ctx->Color.BlendEquationA) {
+ if (ctx->Color.Blend[0].EquationRGB != ctx->Color.Blend[0].EquationA) {
swrast->BlendFunc = blend_general;
}
else if (eq == GL_MIN) {
diff --git a/src/mesa/swrast/s_blend.h b/src/mesa/swrast/s_blend.h
index 8b06dd5031e..69cd89e7ac4 100644
--- a/src/mesa/swrast/s_blend.h
+++ b/src/mesa/swrast/s_blend.h
@@ -27,9 +27,12 @@
#define S_BLEND_H
-#include "main/mtypes.h"
+#include "main/glheader.h"
#include "s_span.h"
+struct gl_context;
+struct gl_renderbuffer;
+
extern void
_swrast_blend_span(struct gl_context *ctx, struct gl_renderbuffer *rb, SWspan *span);
diff --git a/src/mesa/swrast/s_depth.h b/src/mesa/swrast/s_depth.h
index e5dae7ef865..44820ac8f76 100644
--- a/src/mesa/swrast/s_depth.h
+++ b/src/mesa/swrast/s_depth.h
@@ -27,9 +27,12 @@
#define S_DEPTH_H
-#include "main/mtypes.h"
+#include "main/glheader.h"
#include "s_span.h"
+struct gl_context;
+struct gl_renderbuffer;
+
extern GLuint
_swrast_depth_test_span( struct gl_context *ctx, SWspan *span);
diff --git a/src/mesa/swrast/s_drawpix.c b/src/mesa/swrast/s_drawpix.c
index 4d0666898b4..11c63457f52 100644
--- a/src/mesa/swrast/s_drawpix.c
+++ b/src/mesa/swrast/s_drawpix.c
@@ -31,6 +31,7 @@
#include "main/imports.h"
#include "main/macros.h"
#include "main/pack.h"
+#include "main/pbo.h"
#include "main/pixeltransfer.h"
#include "main/state.h"
diff --git a/src/mesa/swrast/s_fog.h b/src/mesa/swrast/s_fog.h
index ebc3513f496..9f93b705084 100644
--- a/src/mesa/swrast/s_fog.h
+++ b/src/mesa/swrast/s_fog.h
@@ -28,9 +28,10 @@
#define S_FOG_H
-#include "main/mtypes.h"
+#include "main/glheader.h"
#include "s_span.h"
+struct gl_context;
extern GLfloat
_swrast_z_to_fogfactor(struct gl_context *ctx, GLfloat z);
diff --git a/src/mesa/swrast/s_fragprog.h b/src/mesa/swrast/s_fragprog.h
index 689d3fc82e4..62a68361769 100644
--- a/src/mesa/swrast/s_fragprog.h
+++ b/src/mesa/swrast/s_fragprog.h
@@ -27,9 +27,10 @@
#define S_FRAGPROG_H
-#include "main/mtypes.h"
#include "s_span.h"
+struct gl_context;
+
extern void
_swrast_exec_fragment_program(struct gl_context *ctx, SWspan *span);
diff --git a/src/mesa/swrast/s_logic.h b/src/mesa/swrast/s_logic.h
index 95c7fe3e150..0a3adfca5ff 100644
--- a/src/mesa/swrast/s_logic.h
+++ b/src/mesa/swrast/s_logic.h
@@ -27,9 +27,11 @@
#define S_LOGIC_H
-#include "main/mtypes.h"
#include "s_span.h"
+struct gl_context;
+struct gl_renderbuffer;
+
extern void
_swrast_logicop_rgba_span(struct gl_context *ctx, struct gl_renderbuffer *rb,
SWspan *span);
diff --git a/src/mesa/swrast/s_masking.h b/src/mesa/swrast/s_masking.h
index 3712c82163b..5124509a049 100644
--- a/src/mesa/swrast/s_masking.h
+++ b/src/mesa/swrast/s_masking.h
@@ -27,9 +27,12 @@
#define S_MASKING_H
-#include "main/mtypes.h"
+#include "main/glheader.h"
#include "s_span.h"
+struct gl_context;
+struct gl_renderbuffer;
+
extern void
_swrast_mask_rgba_span(struct gl_context *ctx, struct gl_renderbuffer *rb,
diff --git a/src/mesa/swrast/s_readpix.c b/src/mesa/swrast/s_readpix.c
index 9fe0752a37f..5c8d7e9c5cf 100644
--- a/src/mesa/swrast/s_readpix.c
+++ b/src/mesa/swrast/s_readpix.c
@@ -24,7 +24,6 @@
#include "main/glheader.h"
-#include "main/bufferobj.h"
#include "main/colormac.h"
#include "main/feedback.h"
#include "main/formats.h"
@@ -32,6 +31,7 @@
#include "main/imports.h"
#include "main/macros.h"
#include "main/pack.h"
+#include "main/pbo.h"
#include "main/state.h"
#include "s_context.h"
diff --git a/src/mesa/swrast/s_span.h b/src/mesa/swrast/s_span.h
index 18e275ec8ab..afafbe09acf 100644
--- a/src/mesa/swrast/s_span.h
+++ b/src/mesa/swrast/s_span.h
@@ -28,7 +28,12 @@
#define S_SPAN_H
-#include "swrast.h"
+#include "main/config.h"
+#include "main/glheader.h"
+#include "main/mtypes.h"
+
+struct gl_context;
+struct gl_renderbuffer;
/**
diff --git a/src/mesa/swrast/s_texcombine.c b/src/mesa/swrast/s_texcombine.c
index 99c44413fbe..0c8cc9ff37b 100644
--- a/src/mesa/swrast/s_texcombine.c
+++ b/src/mesa/swrast/s_texcombine.c
@@ -713,11 +713,6 @@ _swrast_texture_span( struct gl_context *ctx, SWspan *span )
swrast->TextureSample[unit]( ctx, texUnit->_Current, span->end,
texcoords, lambda, texels );
- /* GL_SGI_texture_color_table */
- if (texUnit->ColorTableEnabled) {
- _mesa_lookup_rgba_float(&texUnit->ColorTable, span->end, texels);
- }
-
/* GL_EXT_texture_swizzle */
if (curObj->_Swizzle != SWIZZLE_NOOP) {
swizzle_texels(curObj->_Swizzle, span->end, texels);
diff --git a/src/mesa/swrast/s_texcombine.h b/src/mesa/swrast/s_texcombine.h
index 5f47ebecbf1..11049d86b26 100644
--- a/src/mesa/swrast/s_texcombine.h
+++ b/src/mesa/swrast/s_texcombine.h
@@ -27,9 +27,10 @@
#define S_TEXCOMBINE_H
-#include "main/mtypes.h"
#include "s_span.h"
+struct gl_context;
+
extern void
_swrast_texture_span( struct gl_context *ctx, SWspan *span );
diff --git a/src/mesa/swrast/s_texfilter.c b/src/mesa/swrast/s_texfilter.c
index 539d878ddb4..42785400c0e 100644
--- a/src/mesa/swrast/s_texfilter.c
+++ b/src/mesa/swrast/s_texfilter.c
@@ -27,7 +27,6 @@
#include "main/context.h"
#include "main/colormac.h"
#include "main/imports.h"
-#include "main/texformat.h"
#include "s_context.h"
#include "s_texfilter.h"
@@ -2919,51 +2918,51 @@ shadow_compare4(GLenum function, GLfloat coord,
switch (function) {
case GL_LEQUAL:
- if (depth00 <= coord) luminance -= d;
- if (depth01 <= coord) luminance -= d;
- if (depth10 <= coord) luminance -= d;
- if (depth11 <= coord) luminance -= d;
+ if (coord > depth00) luminance -= d;
+ if (coord > depth01) luminance -= d;
+ if (coord > depth10) luminance -= d;
+ if (coord > depth11) luminance -= d;
return luminance;
case GL_GEQUAL:
- if (depth00 >= coord) luminance -= d;
- if (depth01 >= coord) luminance -= d;
- if (depth10 >= coord) luminance -= d;
- if (depth11 >= coord) luminance -= d;
+ if (coord < depth00) luminance -= d;
+ if (coord < depth01) luminance -= d;
+ if (coord < depth10) luminance -= d;
+ if (coord < depth11) luminance -= d;
return luminance;
case GL_LESS:
- if (depth00 < coord) luminance -= d;
- if (depth01 < coord) luminance -= d;
- if (depth10 < coord) luminance -= d;
- if (depth11 < coord) luminance -= d;
+ if (coord >= depth00) luminance -= d;
+ if (coord >= depth01) luminance -= d;
+ if (coord >= depth10) luminance -= d;
+ if (coord >= depth11) luminance -= d;
return luminance;
case GL_GREATER:
- if (depth00 > coord) luminance -= d;
- if (depth01 > coord) luminance -= d;
- if (depth10 > coord) luminance -= d;
- if (depth11 > coord) luminance -= d;
+ if (coord <= depth00) luminance -= d;
+ if (coord <= depth01) luminance -= d;
+ if (coord <= depth10) luminance -= d;
+ if (coord <= depth11) luminance -= d;
return luminance;
case GL_EQUAL:
- if (depth00 == coord) luminance -= d;
- if (depth01 == coord) luminance -= d;
- if (depth10 == coord) luminance -= d;
- if (depth11 == coord) luminance -= d;
+ if (coord != depth00) luminance -= d;
+ if (coord != depth01) luminance -= d;
+ if (coord != depth10) luminance -= d;
+ if (coord != depth11) luminance -= d;
return luminance;
case GL_NOTEQUAL:
- if (depth00 != coord) luminance -= d;
- if (depth01 != coord) luminance -= d;
- if (depth10 != coord) luminance -= d;
- if (depth11 != coord) luminance -= d;
+ if (coord == depth00) luminance -= d;
+ if (coord == depth01) luminance -= d;
+ if (coord == depth10) luminance -= d;
+ if (coord == depth11) luminance -= d;
return luminance;
case GL_ALWAYS:
- return 0.0;
+ return 1.0F;
case GL_NEVER:
return ambient;
case GL_NONE:
/* ordinary bilinear filtering */
return lerp_2d(wi, wj, depth00, depth10, depth01, depth11);
default:
- _mesa_problem(NULL, "Bad compare func in sample_depth_texture");
- return 0.0F;
+ _mesa_problem(NULL, "Bad compare func in sample_compare4");
+ return ambient;
}
}
@@ -3031,7 +3030,7 @@ sample_depth_texture( struct gl_context *ctx,
if (tObj->MagFilter == GL_NEAREST) {
GLuint i;
for (i = 0; i < n; i++) {
- GLfloat depthSample;
+ GLfloat depthSample, depthRef;
GLint col, row, slice;
nearest_texcoord(tObj, level, texcoords[i], &col, &row, &slice);
@@ -3044,8 +3043,9 @@ sample_depth_texture( struct gl_context *ctx,
depthSample = tObj->BorderColor.f[0];
}
- result = shadow_compare(function, texcoords[i][compare_coord],
- depthSample, ambient);
+ depthRef = CLAMP(texcoords[i][compare_coord], 0.0F, 1.0F);
+
+ result = shadow_compare(function, depthRef, depthSample, ambient);
switch (tObj->DepthMode) {
case GL_LUMINANCE:
@@ -3069,7 +3069,7 @@ sample_depth_texture( struct gl_context *ctx,
GLuint i;
ASSERT(tObj->MagFilter == GL_LINEAR);
for (i = 0; i < n; i++) {
- GLfloat depth00, depth01, depth10, depth11;
+ GLfloat depth00, depth01, depth10, depth11, depthRef;
GLint i0, i1, j0, j1;
GLint slice;
GLfloat wi, wj;
@@ -3135,7 +3135,9 @@ sample_depth_texture( struct gl_context *ctx,
}
}
- result = shadow_compare4(function, texcoords[i][compare_coord],
+ depthRef = CLAMP(texcoords[i][compare_coord], 0.0F, 1.0F);
+
+ result = shadow_compare4(function, depthRef,
depth00, depth01, depth10, depth11,
ambient, wi, wj);
diff --git a/src/mesa/swrast/s_texfilter.h b/src/mesa/swrast/s_texfilter.h
index 34520f22948..69f2d80003a 100644
--- a/src/mesa/swrast/s_texfilter.h
+++ b/src/mesa/swrast/s_texfilter.h
@@ -27,9 +27,11 @@
#define S_TEXFILTER_H
-#include "main/mtypes.h"
#include "s_context.h"
+struct gl_context;
+struct gl_texture_object;
+
extern texture_sample_func
_swrast_choose_texture_sample_func( struct gl_context *ctx,
diff --git a/src/mesa/swrast/s_triangle.c b/src/mesa/swrast/s_triangle.c
index 85513e1f204..d07a4ef7513 100644
--- a/src/mesa/swrast/s_triangle.c
+++ b/src/mesa/swrast/s_triangle.c
@@ -34,7 +34,8 @@
#include "main/colormac.h"
#include "main/imports.h"
#include "main/macros.h"
-#include "main/texformat.h"
+#include "main/mtypes.h"
+#include "main/state.h"
#include "program/prog_instruction.h"
#include "s_aatriangle.h"
@@ -1032,7 +1033,7 @@ _swrast_choose_triangle( struct gl_context *ctx )
if (ctx->Texture._EnabledCoordUnits ||
ctx->FragmentProgram._Current ||
ctx->ATIFragmentShader._Enabled ||
- NEED_SECONDARY_COLOR(ctx) ||
+ _mesa_need_secondary_color(ctx) ||
swrast->_FogEnabled) {
/* Ugh, we do a _lot_ of tests to pick the best textured tri func */
const struct gl_texture_object *texObj2D;
@@ -1113,7 +1114,7 @@ _swrast_choose_triangle( struct gl_context *ctx )
}
else {
ASSERT(!swrast->_FogEnabled);
- ASSERT(!NEED_SECONDARY_COLOR(ctx));
+ ASSERT(!_mesa_need_secondary_color(ctx));
if (ctx->Light.ShadeModel==GL_SMOOTH) {
/* smooth shaded, no texturing, stippled or some raster ops */
#if CHAN_BITS != 8
diff --git a/src/mesa/swrast_setup/ss_triangle.h b/src/mesa/swrast_setup/ss_triangle.h
index 05110865daf..a027f48269e 100644
--- a/src/mesa/swrast_setup/ss_triangle.h
+++ b/src/mesa/swrast_setup/ss_triangle.h
@@ -29,7 +29,7 @@
#ifndef SS_TRIANGLE_H
#define SS_TRIANGLE_H
-#include "main/mtypes.h"
+struct gl_context;
void _swsetup_trifuncs_init( struct gl_context *ctx );
diff --git a/src/mesa/swrast_setup/ss_vb.h b/src/mesa/swrast_setup/ss_vb.h
index b8322f35a3d..05e665b5c30 100644
--- a/src/mesa/swrast_setup/ss_vb.h
+++ b/src/mesa/swrast_setup/ss_vb.h
@@ -29,7 +29,7 @@
#ifndef SS_VB_H
#define SS_VB_H
-#include "main/mtypes.h"
+struct gl_context;
void _swsetup_vb_init( struct gl_context *ctx );
void _swsetup_choose_rastersetup_func( struct gl_context *ctx );
diff --git a/src/mesa/tnl/t_context.c b/src/mesa/tnl/t_context.c
index 47aeeb88594..5f5e2663b5f 100644
--- a/src/mesa/tnl/t_context.c
+++ b/src/mesa/tnl/t_context.c
@@ -34,6 +34,7 @@
#include "main/light.h"
#include "math/m_translate.h"
#include "math/m_xform.h"
+#include "main/state.h"
#include "tnl.h"
#include "t_context.h"
@@ -127,7 +128,7 @@ _tnl_InvalidateState( struct gl_context *ctx, GLuint new_state )
RENDERINPUTS_SET( tnl->render_inputs_bitset, _TNL_ATTRIB_COLOR0 );
}
- if (NEED_SECONDARY_COLOR(ctx))
+ if (_mesa_need_secondary_color(ctx))
RENDERINPUTS_SET( tnl->render_inputs_bitset, _TNL_ATTRIB_COLOR1 );
for (i = 0; i < ctx->Const.MaxTextureCoordUnits; i++) {
diff --git a/src/mesa/tnl/t_context.h b/src/mesa/tnl/t_context.h
index bc01646247c..6a9444216c0 100644
--- a/src/mesa/tnl/t_context.h
+++ b/src/mesa/tnl/t_context.h
@@ -527,6 +527,8 @@ typedef struct
GLubyte *block[VERT_ATTRIB_MAX];
GLuint nr_blocks;
+ GLuint CurInstance;
+
} TNLcontext;
diff --git a/src/mesa/tnl/t_draw.c b/src/mesa/tnl/t_draw.c
index e2aac64ad74..b1967e65417 100644
--- a/src/mesa/tnl/t_draw.c
+++ b/src/mesa/tnl/t_draw.c
@@ -125,6 +125,43 @@ convert_half_to_float(const struct gl_client_array *input,
}
}
+/**
+ * \brief Convert fixed-point to floating-point.
+ *
+ * In OpenGL, a fixed-point number is a "signed 2's complement 16.16 scaled
+ * integer" (Table 2.2 of the OpenGL ES 2.0 spec).
+ *
+ * If the buffer has the \c normalized flag set, the formula
+ * \code normalize(x) := (2*x + 1) / (2^16 - 1) \endcode
+ * is used to map the fixed-point numbers into the range [-1, 1].
+ */
+static void
+convert_fixed_to_float(const struct gl_client_array *input,
+ const GLubyte *ptr, GLfloat *fptr,
+ GLuint count)
+{
+ GLuint i, j;
+ const GLint size = input->Size;
+
+ if (input->Normalized) {
+ for (i = 0; i < count; ++i) {
+ const GLfixed *in = (GLfixed *) ptr;
+ for (j = 0; j < size; ++j) {
+ *fptr++ = (GLfloat) (2 * in[j] + 1) / (GLfloat) ((1 << 16) - 1);
+ }
+ ptr += input->StrideB;
+ }
+ } else {
+ for (i = 0; i < count; ++i) {
+ const GLfixed *in = (GLfixed *) ptr;
+ for (j = 0; j < size; ++j) {
+ *fptr++ = in[j] / (GLfloat) (1 << 16);
+ }
+ ptr += input->StrideB;
+ }
+ }
+}
+
/* Adjust pointer to point at first requested element, convert to
* floating point, populate VB->AttribPtr[].
*/
@@ -175,14 +212,7 @@ static void _tnl_import_array( struct gl_context *ctx,
convert_half_to_float(input, ptr, fptr, count, sz);
break;
case GL_FIXED:
- {
- GLuint i, j;
- for (i = 0; i < count; i++) {
- const GLint *in = (GLint *) (ptr + i * input->StrideB);
- for (j = 0; j < sz; j++)
- *fptr++ = *in++ / 65536.0f;
- }
- }
+ convert_fixed_to_float(input, ptr, fptr, count);
break;
default:
assert(0);
@@ -463,6 +493,7 @@ void _tnl_draw_prims( struct gl_context *ctx,
*/
struct gl_buffer_object *bo[VERT_ATTRIB_MAX + 1];
GLuint nr_bo = 0;
+ GLuint inst;
for (i = 0; i < nr_prims;) {
GLuint this_nr_prims;
@@ -477,18 +508,24 @@ void _tnl_draw_prims( struct gl_context *ctx,
break;
}
+ assert(prim[i].num_instances > 0);
+
/* Binding inputs may imply mapping some vertex buffer objects.
* They will need to be unmapped below.
*/
- bind_prims(ctx, &prim[i], this_nr_prims);
- bind_inputs(ctx, arrays, max_index + prim[i].basevertex + 1,
- bo, &nr_bo);
- bind_indices(ctx, ib, bo, &nr_bo);
+ for (inst = 0; inst < prim[i].num_instances; inst++) {
- TNL_CONTEXT(ctx)->Driver.RunPipeline(ctx);
+ bind_prims(ctx, &prim[i], this_nr_prims);
+ bind_inputs(ctx, arrays, max_index + prim[i].basevertex + 1,
+ bo, &nr_bo);
+ bind_indices(ctx, ib, bo, &nr_bo);
- unmap_vbos(ctx, bo, nr_bo);
- free_space(ctx);
+ tnl->CurInstance = inst;
+ TNL_CONTEXT(ctx)->Driver.RunPipeline(ctx);
+
+ unmap_vbos(ctx, bo, nr_bo);
+ free_space(ctx);
+ }
i += this_nr_prims;
}
diff --git a/src/mesa/tnl/t_vb_program.c b/src/mesa/tnl/t_vb_program.c
index 76f8fde3f52..f5d8f7477aa 100644
--- a/src/mesa/tnl/t_vb_program.c
+++ b/src/mesa/tnl/t_vb_program.c
@@ -67,6 +67,8 @@ struct vp_stage_data {
GLvector4f ndcCoords; /**< normalized device coords */
GLubyte *clipmask; /**< clip flags */
GLubyte ormask, andmask; /**< for clipping */
+
+ struct gl_program_machine machine;
};
@@ -218,7 +220,8 @@ _tnl_program_string(struct gl_context *ctx, GLenum target, struct gl_program *pr
* Initialize virtual machine state prior to executing vertex program.
*/
static void
-init_machine(struct gl_context *ctx, struct gl_program_machine *machine)
+init_machine(struct gl_context *ctx, struct gl_program_machine *machine,
+ GLuint instID)
{
/* Input registers get initialized from the current vertex attribs */
memcpy(machine->VertAttribs, ctx->Current.Attrib,
@@ -254,6 +257,8 @@ init_machine(struct gl_context *ctx, struct gl_program_machine *machine)
machine->FetchTexelDeriv = NULL; /* not used by vertex programs */
machine->Samplers = ctx->VertexProgram._Current->Base.SamplerUnits;
+
+ machine->SystemValues[SYSTEM_VALUE_INSTANCE_ID][0] = (GLfloat) instID;
}
@@ -311,7 +316,7 @@ run_vp( struct gl_context *ctx, struct tnl_pipeline_stage *stage )
struct vp_stage_data *store = VP_STAGE_DATA(stage);
struct vertex_buffer *VB = &tnl->vb;
struct gl_vertex_program *program = ctx->VertexProgram._Current;
- struct gl_program_machine machine;
+ struct gl_program_machine *machine = &store->machine;
GLuint outputs[VERT_RESULT_MAX], numOutputs;
GLuint i, j;
@@ -339,7 +344,7 @@ run_vp( struct gl_context *ctx, struct tnl_pipeline_stage *stage )
for (i = 0; i < VB->Count; i++) {
GLuint attr;
- init_machine(ctx, &machine);
+ init_machine(ctx, machine, tnl->CurInstance);
#if 0
printf("Input %d: %f, %f, %f, %f\n", i,
@@ -372,23 +377,23 @@ run_vp( struct gl_context *ctx, struct tnl_pipeline_stage *stage )
check_float(data[2]);
check_float(data[3]);
#endif
- COPY_CLEAN_4V(machine.VertAttribs[attr], size, data);
+ COPY_CLEAN_4V(machine->VertAttribs[attr], size, data);
}
}
/* execute the program */
- _mesa_execute_program(ctx, &program->Base, &machine);
+ _mesa_execute_program(ctx, &program->Base, machine);
/* copy the output registers into the VB->attribs arrays */
for (j = 0; j < numOutputs; j++) {
const GLuint attr = outputs[j];
#ifdef NAN_CHECK
- check_float(machine.Outputs[attr][0]);
- check_float(machine.Outputs[attr][1]);
- check_float(machine.Outputs[attr][2]);
- check_float(machine.Outputs[attr][3]);
+ check_float(machine->Outputs[attr][0]);
+ check_float(machine->Outputs[attr][1]);
+ check_float(machine->Outputs[attr][2]);
+ check_float(machine->Outputs[attr][3]);
#endif
- COPY_4V(store->results[attr].data[i], machine.Outputs[attr]);
+ COPY_4V(store->results[attr].data[i], machine->Outputs[attr]);
}
/* FOGC is a special case. Fragment shader expects (f,0,0,1) */
@@ -398,14 +403,14 @@ run_vp( struct gl_context *ctx, struct tnl_pipeline_stage *stage )
store->results[VERT_RESULT_FOGC].data[i][3] = 1.0;
}
#ifdef NAN_CHECK
- ASSERT(machine.Outputs[0][3] != 0.0F);
+ ASSERT(machine->Outputs[0][3] != 0.0F);
#endif
#if 0
printf("HPOS: %f %f %f %f\n",
- machine.Outputs[0][0],
- machine.Outputs[0][1],
- machine.Outputs[0][2],
- machine.Outputs[0][3]);
+ machine->Outputs[0][0],
+ machine->Outputs[0][1],
+ machine->Outputs[0][2],
+ machine->Outputs[0][3]);
#endif
}
@@ -501,7 +506,7 @@ init_vp(struct gl_context *ctx, struct tnl_pipeline_stage *stage)
const GLuint size = VB->Size;
GLuint i;
- stage->privatePtr = MALLOC(sizeof(*store));
+ stage->privatePtr = CALLOC(sizeof(*store));
store = VP_STAGE_DATA(stage);
if (!store)
return GL_FALSE;
diff --git a/src/mesa/tnl/t_vertex.h b/src/mesa/tnl/t_vertex.h
index 252f2f7c295..83b0dbcebbd 100644
--- a/src/mesa/tnl/t_vertex.h
+++ b/src/mesa/tnl/t_vertex.h
@@ -28,9 +28,12 @@
#ifndef _TNL_VERTEX_H
#define _TNL_VERTEX_H
-#include "main/mtypes.h"
+#include "main/glheader.h"
#include "t_context.h"
+struct gl_context;
+struct tnl_clipspace;
+
/* New mechanism to specify hardware vertices so that tnl can build
* and manipulate them directly.
*/
diff --git a/src/mesa/tnl/t_vp_build.c b/src/mesa/tnl/t_vp_build.c
index 421ec88a454..70492a4353d 100644
--- a/src/mesa/tnl/t_vp_build.c
+++ b/src/mesa/tnl/t_vp_build.c
@@ -32,7 +32,7 @@
#include "main/glheader.h"
#include "main/ffvertex_prog.h"
-#include "main/dd.h"
+#include "main/mtypes.h"
#include "t_vp_build.h"
diff --git a/src/mesa/tnl/t_vp_build.h b/src/mesa/tnl/t_vp_build.h
index 1d10ff245d9..e9f6de5a920 100644
--- a/src/mesa/tnl/t_vp_build.h
+++ b/src/mesa/tnl/t_vp_build.h
@@ -27,7 +27,7 @@
#ifndef T_VP_BUILD_H
#define T_VP_BUILD_H
-#include "main/mtypes.h"
+struct gl_context;
#define TNL_FIXED_FUNCTION_STATE_FLAGS (_NEW_PROGRAM | \
_NEW_LIGHT | \
diff --git a/src/mesa/tnl/tnl.h b/src/mesa/tnl/tnl.h
index 702efdc5cca..24a0c725008 100644
--- a/src/mesa/tnl/tnl.h
+++ b/src/mesa/tnl/tnl.h
@@ -28,8 +28,11 @@
#ifndef _TNL_H
#define _TNL_H
-#include "main/mtypes.h"
+#include "main/glheader.h"
+struct gl_client_array;
+struct gl_context;
+struct gl_program;
/* These are the public-access functions exported from tnl. (A few
diff --git a/src/mesa/vbo/vbo.h b/src/mesa/vbo/vbo.h
index c1406b250ae..26c3d4e0a72 100644
--- a/src/mesa/vbo/vbo.h
+++ b/src/mesa/vbo/vbo.h
@@ -32,15 +32,19 @@
#ifndef _VBO_H
#define _VBO_H
-#include "main/mtypes.h"
+#include "main/glheader.h"
+
+struct gl_client_array;
+struct gl_context;
struct _mesa_prim {
- GLuint mode:8;
+ GLuint mode:8; /**< GL_POINTS, GL_LINES, GL_QUAD_STRIP, etc */
GLuint indexed:1;
GLuint begin:1;
GLuint end:1;
GLuint weak:1;
- GLuint pad:20;
+ GLuint no_current_update:1;
+ GLuint pad:19;
GLuint start;
GLuint count;
@@ -123,9 +127,12 @@ vbo_get_minmax_index(struct gl_context *ctx, const struct _mesa_prim *prim,
void vbo_use_buffer_objects(struct gl_context *ctx);
+void vbo_always_unmap_buffers(struct gl_context *ctx);
void vbo_set_draw_func(struct gl_context *ctx, vbo_draw_func func);
+void vbo_check_buffers_are_unmapped(struct gl_context *ctx);
+
void GLAPIENTRY
_es_Color4f(GLfloat r, GLfloat g, GLfloat b, GLfloat a);
diff --git a/src/mesa/vbo/vbo_attrib_tmp.h b/src/mesa/vbo/vbo_attrib_tmp.h
index 3c235accf30..c793ce0dc37 100644
--- a/src/mesa/vbo/vbo_attrib_tmp.h
+++ b/src/mesa/vbo/vbo_attrib_tmp.h
@@ -341,7 +341,7 @@ TAG(VertexAttrib1fARB)(GLuint index, GLfloat x)
else if (index < MAX_VERTEX_GENERIC_ATTRIBS)
ATTR1F(VBO_ATTRIB_GENERIC0 + index, x);
else
- ERROR();
+ ERROR(GL_INVALID_VALUE);
}
static void GLAPIENTRY
@@ -353,7 +353,7 @@ TAG(VertexAttrib1fvARB)(GLuint index, const GLfloat * v)
else if (index < MAX_VERTEX_GENERIC_ATTRIBS)
ATTR1FV(VBO_ATTRIB_GENERIC0 + index, v);
else
- ERROR();
+ ERROR(GL_INVALID_VALUE);
}
static void GLAPIENTRY
@@ -365,7 +365,7 @@ TAG(VertexAttrib2fARB)(GLuint index, GLfloat x, GLfloat y)
else if (index < MAX_VERTEX_GENERIC_ATTRIBS)
ATTR2F(VBO_ATTRIB_GENERIC0 + index, x, y);
else
- ERROR();
+ ERROR(GL_INVALID_VALUE);
}
static void GLAPIENTRY
@@ -377,7 +377,7 @@ TAG(VertexAttrib2fvARB)(GLuint index, const GLfloat * v)
else if (index < MAX_VERTEX_GENERIC_ATTRIBS)
ATTR2FV(VBO_ATTRIB_GENERIC0 + index, v);
else
- ERROR();
+ ERROR(GL_INVALID_VALUE);
}
static void GLAPIENTRY
@@ -389,7 +389,7 @@ TAG(VertexAttrib3fARB)(GLuint index, GLfloat x, GLfloat y, GLfloat z)
else if (index < MAX_VERTEX_GENERIC_ATTRIBS)
ATTR3F(VBO_ATTRIB_GENERIC0 + index, x, y, z);
else
- ERROR();
+ ERROR(GL_INVALID_VALUE);
}
static void GLAPIENTRY
@@ -401,7 +401,7 @@ TAG(VertexAttrib3fvARB)(GLuint index, const GLfloat * v)
else if (index < MAX_VERTEX_GENERIC_ATTRIBS)
ATTR3FV(VBO_ATTRIB_GENERIC0 + index, v);
else
- ERROR();
+ ERROR(GL_INVALID_VALUE);
}
static void GLAPIENTRY
@@ -413,7 +413,7 @@ TAG(VertexAttrib4fARB)(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
else if (index < MAX_VERTEX_GENERIC_ATTRIBS)
ATTR4F(VBO_ATTRIB_GENERIC0 + index, x, y, z, w);
else
- ERROR();
+ ERROR(GL_INVALID_VALUE);
}
static void GLAPIENTRY
@@ -425,7 +425,7 @@ TAG(VertexAttrib4fvARB)(GLuint index, const GLfloat * v)
else if (index < MAX_VERTEX_GENERIC_ATTRIBS)
ATTR4FV(VBO_ATTRIB_GENERIC0 + index, v);
else
- ERROR();
+ ERROR(GL_INVALID_VALUE);
}
@@ -442,7 +442,7 @@ TAG(VertexAttribI1i)(GLuint index, GLint x)
else if (index < MAX_VERTEX_GENERIC_ATTRIBS)
ATTR1I(VBO_ATTRIB_GENERIC0 + index, x);
else
- ERROR();
+ ERROR(GL_INVALID_VALUE);
}
static void GLAPIENTRY
@@ -454,7 +454,7 @@ TAG(VertexAttribI2i)(GLuint index, GLint x, GLint y)
else if (index < MAX_VERTEX_GENERIC_ATTRIBS)
ATTR2I(VBO_ATTRIB_GENERIC0 + index, x, y);
else
- ERROR();
+ ERROR(GL_INVALID_VALUE);
}
static void GLAPIENTRY
@@ -466,7 +466,7 @@ TAG(VertexAttribI3i)(GLuint index, GLint x, GLint y, GLint z)
else if (index < MAX_VERTEX_GENERIC_ATTRIBS)
ATTR3I(VBO_ATTRIB_GENERIC0 + index, x, y, z);
else
- ERROR();
+ ERROR(GL_INVALID_VALUE);
}
static void GLAPIENTRY
@@ -478,7 +478,7 @@ TAG(VertexAttribI4i)(GLuint index, GLint x, GLint y, GLint z, GLint w)
else if (index < MAX_VERTEX_GENERIC_ATTRIBS)
ATTR4I(VBO_ATTRIB_GENERIC0 + index, x, y, z, w);
else
- ERROR();
+ ERROR(GL_INVALID_VALUE);
}
static void GLAPIENTRY
@@ -490,7 +490,7 @@ TAG(VertexAttribI2iv)(GLuint index, const GLint *v)
else if (index < MAX_VERTEX_GENERIC_ATTRIBS)
ATTR2IV(VBO_ATTRIB_GENERIC0 + index, v);
else
- ERROR();
+ ERROR(GL_INVALID_VALUE);
}
static void GLAPIENTRY
@@ -502,7 +502,7 @@ TAG(VertexAttribI3iv)(GLuint index, const GLint *v)
else if (index < MAX_VERTEX_GENERIC_ATTRIBS)
ATTR3IV(VBO_ATTRIB_GENERIC0 + index, v);
else
- ERROR();
+ ERROR(GL_INVALID_VALUE);
}
static void GLAPIENTRY
@@ -514,7 +514,7 @@ TAG(VertexAttribI4iv)(GLuint index, const GLint *v)
else if (index < MAX_VERTEX_GENERIC_ATTRIBS)
ATTR4IV(VBO_ATTRIB_GENERIC0 + index, v);
else
- ERROR();
+ ERROR(GL_INVALID_VALUE);
}
@@ -531,7 +531,7 @@ TAG(VertexAttribI1ui)(GLuint index, GLuint x)
else if (index < MAX_VERTEX_GENERIC_ATTRIBS)
ATTR1UI(VBO_ATTRIB_GENERIC0 + index, x);
else
- ERROR();
+ ERROR(GL_INVALID_VALUE);
}
static void GLAPIENTRY
@@ -543,7 +543,7 @@ TAG(VertexAttribI2ui)(GLuint index, GLuint x, GLuint y)
else if (index < MAX_VERTEX_GENERIC_ATTRIBS)
ATTR2UI(VBO_ATTRIB_GENERIC0 + index, x, y);
else
- ERROR();
+ ERROR(GL_INVALID_VALUE);
}
static void GLAPIENTRY
@@ -555,7 +555,7 @@ TAG(VertexAttribI3ui)(GLuint index, GLuint x, GLuint y, GLuint z)
else if (index < MAX_VERTEX_GENERIC_ATTRIBS)
ATTR3UI(VBO_ATTRIB_GENERIC0 + index, x, y, z);
else
- ERROR();
+ ERROR(GL_INVALID_VALUE);
}
static void GLAPIENTRY
@@ -567,7 +567,7 @@ TAG(VertexAttribI4ui)(GLuint index, GLuint x, GLuint y, GLuint z, GLuint w)
else if (index < MAX_VERTEX_GENERIC_ATTRIBS)
ATTR4UI(VBO_ATTRIB_GENERIC0 + index, x, y, z, w);
else
- ERROR();
+ ERROR(GL_INVALID_VALUE);
}
static void GLAPIENTRY
@@ -579,7 +579,7 @@ TAG(VertexAttribI2uiv)(GLuint index, const GLuint *v)
else if (index < MAX_VERTEX_GENERIC_ATTRIBS)
ATTR2UIV(VBO_ATTRIB_GENERIC0 + index, v);
else
- ERROR();
+ ERROR(GL_INVALID_VALUE);
}
static void GLAPIENTRY
@@ -591,7 +591,7 @@ TAG(VertexAttribI3uiv)(GLuint index, const GLuint *v)
else if (index < MAX_VERTEX_GENERIC_ATTRIBS)
ATTR3UIV(VBO_ATTRIB_GENERIC0 + index, v);
else
- ERROR();
+ ERROR(GL_INVALID_VALUE);
}
static void GLAPIENTRY
@@ -603,7 +603,7 @@ TAG(VertexAttribI4uiv)(GLuint index, const GLuint *v)
else if (index < MAX_VERTEX_GENERIC_ATTRIBS)
ATTR4UIV(VBO_ATTRIB_GENERIC0 + index, v);
else
- ERROR();
+ ERROR(GL_INVALID_VALUE);
}
@@ -720,7 +720,7 @@ TAG(Materialfv)(GLenum face, GLenum pname,
MAT(VBO_ATTRIB_MAT_FRONT_DIFFUSE, 4, face, params);
break;
default:
- ERROR();
+ ERROR(GL_INVALID_ENUM);
return;
}
}
diff --git a/src/mesa/vbo/vbo_context.c b/src/mesa/vbo/vbo_context.c
index 9992cc34739..6656ed89816 100644
--- a/src/mesa/vbo/vbo_context.c
+++ b/src/mesa/vbo/vbo_context.c
@@ -209,7 +209,6 @@ GLboolean _vbo_CreateContext( struct gl_context *ctx )
void _vbo_InvalidateState( struct gl_context *ctx, GLuint new_state )
{
- _ae_invalidate_state(ctx, new_state);
vbo_exec_invalidate_state(ctx, new_state);
}
diff --git a/src/mesa/vbo/vbo_context.h b/src/mesa/vbo/vbo_context.h
index 8d6f2a7ce6d..2ded6ccbff2 100644
--- a/src/mesa/vbo/vbo_context.h
+++ b/src/mesa/vbo/vbo_context.h
@@ -51,6 +51,7 @@
#ifndef _VBO_CONTEXT_H
#define _VBO_CONTEXT_H
+#include "main/mfeatures.h"
#include "vbo.h"
#include "vbo_attrib.h"
#include "vbo_exec.h"
diff --git a/src/mesa/vbo/vbo_exec.h b/src/mesa/vbo/vbo_exec.h
index 47e51f09c94..d52a557e03f 100644
--- a/src/mesa/vbo/vbo_exec.h
+++ b/src/mesa/vbo/vbo_exec.h
@@ -34,18 +34,22 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
#ifndef __VBO_EXEC_H__
#define __VBO_EXEC_H__
+#include "main/mfeatures.h"
#include "main/mtypes.h"
#include "vbo.h"
#include "vbo_attrib.h"
+/**
+ * Max number of primitives (number of glBegin/End pairs) per VBO.
+ */
#define VBO_MAX_PRIM 64
-/* Wierd implementation stuff:
+
+/**
+ * Size of the VBO to use for glBegin/glVertex/glEnd-style rendering.
*/
#define VBO_VERT_BUFFER_SIZE (1024*64) /* bytes */
-#define VBO_MAX_ATTR_CODEGEN 16
-#define ERROR_ATTRIB 16
/** Current vertex program mode */
@@ -139,6 +143,9 @@ struct vbo_exec_context
const struct gl_client_array *inputs[VERT_ATTRIB_MAX];
} array;
+ /* Which flags to set in vbo_exec_BeginVertices() */
+ GLbitfield begin_vertices_flags;
+
#ifdef DEBUG
GLint flush_call_depth;
#endif
@@ -151,7 +158,6 @@ struct vbo_exec_context
void vbo_exec_init( struct gl_context *ctx );
void vbo_exec_destroy( struct gl_context *ctx );
void vbo_exec_invalidate_state( struct gl_context *ctx, GLuint new_state );
-void vbo_exec_FlushVertices_internal( struct gl_context *ctx, GLboolean unmap );
void vbo_exec_BeginVertices( struct gl_context *ctx );
void vbo_exec_FlushVertices( struct gl_context *ctx, GLuint flags );
diff --git a/src/mesa/vbo/vbo_exec_api.c b/src/mesa/vbo/vbo_exec_api.c
index fb981ccc3bc..fcd544de763 100644
--- a/src/mesa/vbo/vbo_exec_api.c
+++ b/src/mesa/vbo/vbo_exec_api.c
@@ -34,6 +34,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "main/bufferobj.h"
#include "main/context.h"
#include "main/macros.h"
+#include "main/mfeatures.h"
#include "main/vtxfmt.h"
#include "main/dlist.h"
#include "main/eval.h"
@@ -158,8 +159,7 @@ static void vbo_exec_copy_to_current( struct vbo_exec_context *exec )
exec->vtx.attrsz[i],
exec->vtx.attrptr[i]);
- if (memcmp(current, tmp, sizeof(tmp)) != 0)
- {
+ if (memcmp(current, tmp, sizeof(tmp)) != 0) {
memcpy(current, tmp, sizeof(tmp));
/* Given that we explicitly state size here, there is no need
@@ -191,14 +191,18 @@ static void vbo_exec_copy_to_current( struct vbo_exec_context *exec )
}
-static void vbo_exec_copy_from_current( struct vbo_exec_context *exec )
+/**
+ * Copy current vertex attribute values into the current vertex.
+ */
+static void
+vbo_exec_copy_from_current(struct vbo_exec_context *exec)
{
struct gl_context *ctx = exec->ctx;
struct vbo_context *vbo = vbo_context(ctx);
GLint i;
- for (i = VBO_ATTRIB_POS+1 ; i < VBO_ATTRIB_MAX ; i++) {
- const GLfloat *current = (GLfloat *)vbo->currval[i].Ptr;
+ for (i = VBO_ATTRIB_POS + 1; i < VBO_ATTRIB_MAX; i++) {
+ const GLfloat *current = (GLfloat *) vbo->currval[i].Ptr;
switch (exec->vtx.attrsz[i]) {
case 4: exec->vtx.attrptr[i][3] = current[3];
case 3: exec->vtx.attrptr[i][2] = current[2];
@@ -212,17 +216,21 @@ static void vbo_exec_copy_from_current( struct vbo_exec_context *exec )
/**
* Flush existing data, set new attrib size, replay copied vertices.
+ * This is called when we transition from a small vertex attribute size
+ * to a larger one. Ex: glTexCoord2f -> glTexCoord4f.
+ * We need to go back over the previous 2-component texcoords and insert
+ * zero and one values.
*/
-static void vbo_exec_wrap_upgrade_vertex( struct vbo_exec_context *exec,
- GLuint attr,
- GLuint newsz )
+static void
+vbo_exec_wrap_upgrade_vertex(struct vbo_exec_context *exec,
+ GLuint attr, GLuint newSize )
{
struct gl_context *ctx = exec->ctx;
struct vbo_context *vbo = vbo_context(ctx);
- GLint lastcount = exec->vtx.vert_count;
+ const GLint lastcount = exec->vtx.vert_count;
GLfloat *old_attrptr[VBO_ATTRIB_MAX];
- GLuint old_vtx_size = exec->vtx.vertex_size;
- GLuint oldsz = exec->vtx.attrsz[attr];
+ const GLuint old_vtx_size = exec->vtx.vertex_size; /* floats per vertex */
+ const GLuint oldSize = exec->vtx.attrsz[attr];
GLuint i;
/* Run pipeline on current vertices, copy wrapped vertices
@@ -238,7 +246,7 @@ static void vbo_exec_wrap_upgrade_vertex( struct vbo_exec_context *exec,
memcpy(old_attrptr, exec->vtx.attrptr, sizeof(old_attrptr));
}
- if (unlikely(oldsz)) {
+ if (unlikely(oldSize)) {
/* Do a COPY_TO_CURRENT to ensure back-copying works for the
* case when the attribute already exists in the vertex and is
* having its size increased.
@@ -250,21 +258,21 @@ static void vbo_exec_wrap_upgrade_vertex( struct vbo_exec_context *exec,
* begin/end so that they don't bloat the vertices.
*/
if (ctx->Driver.CurrentExecPrimitive == PRIM_OUTSIDE_BEGIN_END &&
- !oldsz && lastcount > 8 && exec->vtx.vertex_size) {
+ !oldSize && lastcount > 8 && exec->vtx.vertex_size) {
vbo_exec_copy_to_current( exec );
reset_attrfv( exec );
}
/* Fix up sizes:
*/
- exec->vtx.attrsz[attr] = newsz;
- exec->vtx.vertex_size += newsz - oldsz;
+ exec->vtx.attrsz[attr] = newSize;
+ exec->vtx.vertex_size += newSize - oldSize;
exec->vtx.max_vert = ((VBO_VERT_BUFFER_SIZE - exec->vtx.buffer_used) /
(exec->vtx.vertex_size * sizeof(GLfloat)));
exec->vtx.vert_count = 0;
exec->vtx.buffer_ptr = exec->vtx.buffer_map;
- if (unlikely(oldsz)) {
+ if (unlikely(oldSize)) {
/* Size changed, recalculate all the attrptr[] values
*/
GLfloat *tmp = exec->vtx.vertex;
@@ -282,11 +290,11 @@ static void vbo_exec_wrap_upgrade_vertex( struct vbo_exec_context *exec,
* values.
*/
vbo_exec_copy_from_current( exec );
-
- } else {
+ }
+ else {
/* Just have to append the new attribute at the end */
exec->vtx.attrptr[attr] = exec->vtx.vertex +
- exec->vtx.vertex_size - newsz;
+ exec->vtx.vertex_size - newSize;
}
/* Replay stored vertices to translate them
@@ -310,10 +318,10 @@ static void vbo_exec_wrap_upgrade_vertex( struct vbo_exec_context *exec,
GLint new_offset = exec->vtx.attrptr[j] - exec->vtx.vertex;
if (j == attr) {
- if (oldsz) {
+ if (oldSize) {
GLfloat tmp[4];
- COPY_CLEAN_4V(tmp, oldsz, data + old_offset);
- COPY_SZ_4V(dest + new_offset, newsz, tmp);
+ COPY_CLEAN_4V(tmp, oldSize, data + old_offset);
+ COPY_SZ_4V(dest + new_offset, newSize, tmp);
} else {
GLfloat *current = (GLfloat *)vbo->currval[j].Ptr;
COPY_SZ_4V(dest + new_offset, sz, current);
@@ -336,74 +344,86 @@ static void vbo_exec_wrap_upgrade_vertex( struct vbo_exec_context *exec,
}
-static void vbo_exec_fixup_vertex( struct gl_context *ctx,
- GLuint attr, GLuint sz )
+/**
+ * This is when a vertex attribute transitions to a different size.
+ * For example, we saw a bunch of glTexCoord2f() calls and now we got a
+ * glTexCoord4f() call. We promote the array from size=2 to size=4.
+ */
+static void
+vbo_exec_fixup_vertex(struct gl_context *ctx, GLuint attr, GLuint newSize)
{
struct vbo_exec_context *exec = &vbo_context(ctx)->exec;
- int i;
- if (sz > exec->vtx.attrsz[attr]) {
+ if (newSize > exec->vtx.attrsz[attr]) {
/* New size is larger. Need to flush existing vertices and get
* an enlarged vertex format.
*/
- vbo_exec_wrap_upgrade_vertex( exec, attr, sz );
+ vbo_exec_wrap_upgrade_vertex( exec, attr, newSize );
}
- else if (sz < exec->vtx.active_sz[attr]) {
+ else if (newSize < exec->vtx.active_sz[attr]) {
static const GLfloat id[4] = { 0, 0, 0, 1 };
+ GLuint i;
/* New size is smaller - just need to fill in some
* zeros. Don't need to flush or wrap.
*/
- for (i = sz ; i <= exec->vtx.attrsz[attr] ; i++)
+ for (i = newSize; i <= exec->vtx.attrsz[attr]; i++)
exec->vtx.attrptr[attr][i-1] = id[i-1];
}
- exec->vtx.active_sz[attr] = sz;
+ exec->vtx.active_sz[attr] = newSize;
/* Does setting NeedFlush belong here? Necessitates resetting
* vtxfmt on each flush (otherwise flags won't get reset
* afterwards).
*/
if (attr == 0)
- exec->ctx->Driver.NeedFlush |= FLUSH_STORED_VERTICES;
+ ctx->Driver.NeedFlush |= FLUSH_STORED_VERTICES;
}
-/*
+/**
+ * This macro is used to implement all the glVertex, glColor, glTexCoord,
+ * glVertexAttrib, etc functions.
*/
-#define ATTR( A, N, V0, V1, V2, V3 ) \
-do { \
- struct vbo_exec_context *exec = &vbo_context(ctx)->exec; \
+#define ATTR( A, N, V0, V1, V2, V3 ) \
+do { \
+ struct vbo_exec_context *exec = &vbo_context(ctx)->exec; \
\
- if (unlikely(!(exec->ctx->Driver.NeedFlush & FLUSH_UPDATE_CURRENT))) \
- ctx->Driver.BeginVertices( ctx ); \
+ if (unlikely(!(ctx->Driver.NeedFlush & FLUSH_UPDATE_CURRENT))) \
+ ctx->Driver.BeginVertices( ctx ); \
+ \
if (unlikely(exec->vtx.active_sz[A] != N)) \
vbo_exec_fixup_vertex(ctx, A, N); \
\
- { \
- GLfloat *dest = exec->vtx.attrptr[A]; \
- if (N>0) dest[0] = V0; \
- if (N>1) dest[1] = V1; \
- if (N>2) dest[2] = V2; \
- if (N>3) dest[3] = V3; \
- } \
- \
- if ((A) == 0) { \
- GLuint i; \
- \
- for (i = 0; i < exec->vtx.vertex_size; i++) \
- exec->vtx.buffer_ptr[i] = exec->vtx.vertex[i]; \
- \
+ { \
+ GLfloat *dest = exec->vtx.attrptr[A]; \
+ if (N>0) dest[0] = V0; \
+ if (N>1) dest[1] = V1; \
+ if (N>2) dest[2] = V2; \
+ if (N>3) dest[3] = V3; \
+ } \
+ \
+ if ((A) == 0) { \
+ /* This is a glVertex call */ \
+ GLuint i; \
+ \
+ for (i = 0; i < exec->vtx.vertex_size; i++) \
+ exec->vtx.buffer_ptr[i] = exec->vtx.vertex[i]; \
+ \
exec->vtx.buffer_ptr += exec->vtx.vertex_size; \
- exec->ctx->Driver.NeedFlush |= FLUSH_STORED_VERTICES; \
- \
- if (++exec->vtx.vert_count >= exec->vtx.max_vert) \
- vbo_exec_vtx_wrap( exec ); \
- } \
+ \
+ /* Set FLUSH_STORED_VERTICES to indicate that there's now */ \
+ /* something to draw (not just updating a color or texcoord).*/ \
+ ctx->Driver.NeedFlush |= FLUSH_STORED_VERTICES; \
+ \
+ if (++exec->vtx.vert_count >= exec->vtx.max_vert) \
+ vbo_exec_vtx_wrap( exec ); \
+ } \
} while (0)
-#define ERROR() _mesa_error( ctx, GL_INVALID_ENUM, __FUNCTION__ )
+#define ERROR(err) _mesa_error( ctx, err, __FUNCTION__ )
#define TAG(x) vbo_##x
#include "vbo_attrib_tmp.h"
@@ -513,6 +533,24 @@ static void GLAPIENTRY vbo_exec_EvalPoint2( GLint i, GLint j )
/**
+ * Flush (draw) vertices.
+ * \param unmap - leave VBO unmapped after flushing?
+ */
+static void
+vbo_exec_FlushVertices_internal(struct vbo_exec_context *exec, GLboolean unmap)
+{
+ if (exec->vtx.vert_count || unmap) {
+ vbo_exec_vtx_flush( exec, unmap );
+ }
+
+ if (exec->vtx.vertex_size) {
+ vbo_exec_copy_to_current( exec );
+ reset_attrfv( exec );
+ }
+}
+
+
+/**
* Called via glBegin.
*/
static void GLAPIENTRY vbo_exec_Begin( GLenum mode )
@@ -538,7 +576,7 @@ static void GLAPIENTRY vbo_exec_Begin( GLenum mode )
* begin/end pairs.
*/
if (exec->vtx.vertex_size && !exec->vtx.attrsz[0])
- vbo_exec_FlushVertices_internal( ctx, GL_FALSE );
+ vbo_exec_FlushVertices_internal(exec, GL_FALSE);
i = exec->vtx.prim_count++;
exec->vtx.prim[i].mode = mode;
@@ -801,6 +839,19 @@ void vbo_use_buffer_objects(struct gl_context *ctx)
}
+/**
+ * If this function is called, all VBO buffers will be unmapped when
+ * we flush.
+ * Otherwise, if a simple command like glColor3f() is called and we flush,
+ * the current VBO may be left mapped.
+ */
+void
+vbo_always_unmap_buffers(struct gl_context *ctx)
+{
+ struct vbo_exec_context *exec = &vbo_context(ctx)->exec;
+ exec->begin_vertices_flags |= FLUSH_STORED_VERTICES;
+}
+
void vbo_exec_vtx_init( struct vbo_exec_context *exec )
{
@@ -824,7 +875,7 @@ void vbo_exec_vtx_init( struct vbo_exec_context *exec )
/* Hook our functions into the dispatch table.
*/
- _mesa_install_exec_vtxfmt( exec->ctx, &exec->vtxfmt );
+ _mesa_install_exec_vtxfmt( ctx, &exec->vtxfmt );
for (i = 0 ; i < VBO_ATTRIB_MAX ; i++) {
ASSERT(i < Elements(exec->vtx.attrsz));
@@ -856,6 +907,8 @@ void vbo_exec_vtx_init( struct vbo_exec_context *exec )
}
exec->vtx.vertex_size = 0;
+
+ exec->begin_vertices_flags = FLUSH_UPDATE_CURRENT;
}
@@ -893,32 +946,25 @@ void vbo_exec_vtx_destroy( struct vbo_exec_context *exec )
_mesa_reference_buffer_object(ctx, &exec->vtx.bufferobj, NULL);
}
+
+/**
+ * Called upon first glVertex, glColor, glTexCoord, etc.
+ */
void vbo_exec_BeginVertices( struct gl_context *ctx )
{
struct vbo_exec_context *exec = &vbo_context(ctx)->exec;
- if (0) printf("%s\n", __FUNCTION__);
- vbo_exec_vtx_map( exec );
- assert((exec->ctx->Driver.NeedFlush & FLUSH_UPDATE_CURRENT) == 0);
- exec->ctx->Driver.NeedFlush |= FLUSH_UPDATE_CURRENT;
-}
-
-void vbo_exec_FlushVertices_internal( struct gl_context *ctx, GLboolean unmap )
-{
- struct vbo_exec_context *exec = &vbo_context(ctx)->exec;
+ vbo_exec_vtx_map( exec );
- if (exec->vtx.vert_count || unmap) {
- vbo_exec_vtx_flush( exec, unmap );
- }
+ assert((ctx->Driver.NeedFlush & FLUSH_UPDATE_CURRENT) == 0);
+ assert(exec->begin_vertices_flags);
- if (exec->vtx.vertex_size) {
- vbo_exec_copy_to_current( exec );
- reset_attrfv( exec );
- }
+ ctx->Driver.NeedFlush |= exec->begin_vertices_flags;
}
/**
+ * Called via ctx->Driver.FlushVertices()
* \param flags bitmask of FLUSH_STORED_VERTICES, FLUSH_UPDATE_CURRENT
*/
void vbo_exec_FlushVertices( struct gl_context *ctx, GLuint flags )
@@ -931,10 +977,8 @@ void vbo_exec_FlushVertices( struct gl_context *ctx, GLuint flags )
assert(exec->flush_call_depth == 1);
#endif
- if (0) printf("%s\n", __FUNCTION__);
-
- if (exec->ctx->Driver.CurrentExecPrimitive != PRIM_OUTSIDE_BEGIN_END) {
- if (0) printf("%s - inside begin/end\n", __FUNCTION__);
+ if (ctx->Driver.CurrentExecPrimitive != PRIM_OUTSIDE_BEGIN_END) {
+ /* We've had glBegin but not glEnd! */
#ifdef DEBUG
exec->flush_call_depth--;
assert(exec->flush_call_depth == 0);
@@ -942,14 +986,12 @@ void vbo_exec_FlushVertices( struct gl_context *ctx, GLuint flags )
return;
}
- vbo_exec_FlushVertices_internal( ctx, GL_TRUE );
+ /* Flush (draw), and make sure VBO is left unmapped when done */
+ vbo_exec_FlushVertices_internal(exec, GL_TRUE);
/* Need to do this to ensure BeginVertices gets called again:
*/
- if (exec->ctx->Driver.NeedFlush & FLUSH_UPDATE_CURRENT)
- exec->ctx->Driver.NeedFlush &= ~FLUSH_UPDATE_CURRENT;
-
- exec->ctx->Driver.NeedFlush &= ~flags;
+ ctx->Driver.NeedFlush &= ~(FLUSH_UPDATE_CURRENT | flags);
#ifdef DEBUG
exec->flush_call_depth--;
@@ -1020,7 +1062,7 @@ VertexAttrib4f_nopos(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
if (index < MAX_VERTEX_GENERIC_ATTRIBS)
ATTR(VBO_ATTRIB_GENERIC0 + index, 4, x, y, z, w);
else
- ERROR();
+ ERROR(GL_INVALID_VALUE);
}
void GLAPIENTRY
diff --git a/src/mesa/vbo/vbo_exec_array.c b/src/mesa/vbo/vbo_exec_array.c
index dd36cc32a70..98d6badc47a 100644
--- a/src/mesa/vbo/vbo_exec_array.c
+++ b/src/mesa/vbo/vbo_exec_array.c
@@ -39,6 +39,44 @@
/**
+ * All vertex buffers should be in an unmapped state when we're about
+ * to draw. This debug function checks that.
+ */
+static void
+check_buffers_are_unmapped(const struct gl_client_array **inputs)
+{
+#ifdef DEBUG
+ GLuint i;
+
+ for (i = 0; i < VERT_ATTRIB_MAX; i++) {
+ if (inputs[i]) {
+ struct gl_buffer_object *obj = inputs[i]->BufferObj;
+ assert(!_mesa_bufferobj_mapped(obj));
+ (void) obj;
+ }
+ }
+#endif
+}
+
+
+/**
+ * A debug function that may be called from other parts of Mesa as
+ * needed during debugging.
+ */
+void
+vbo_check_buffers_are_unmapped(struct gl_context *ctx)
+{
+ struct vbo_context *vbo = vbo_context(ctx);
+ struct vbo_exec_context *exec = &vbo->exec;
+ /* check the current vertex arrays */
+ check_buffers_are_unmapped(exec->array.inputs);
+ /* check the current glBegin/glVertex/glEnd-style VBO */
+ assert(!_mesa_bufferobj_mapped(exec->vtx.bufferobj));
+}
+
+
+
+/**
* Compute min and max elements by scanning the index buffer for
* glDraw[Range]Elements() calls.
* If primitive restart is enabled, we need to ignore restart
@@ -423,6 +461,14 @@ recalculate_input_bindings(struct gl_context *ctx)
inputs[VERT_ATTRIB_GENERIC0 + i] = &vbo->generic_currval[i];
const_inputs |= 1 << (VERT_ATTRIB_GENERIC0 + i);
}
+
+ /* There is no need to make _NEW_ARRAY dirty here for the TnL program,
+ * because it already takes care of invalidating the state necessary
+ * to revalidate vertex arrays. Not marking the state as dirty also
+ * improves performance (quite significantly in some apps).
+ */
+ if (!ctx->VertexProgram._MaintainTnlProgram)
+ ctx->NewState |= _NEW_ARRAY;
break;
case VP_NV:
@@ -448,6 +494,8 @@ recalculate_input_bindings(struct gl_context *ctx)
inputs[i] = &vbo->generic_currval[i - VERT_ATTRIB_GENERIC0];
const_inputs |= 1 << i;
}
+
+ ctx->NewState |= _NEW_ARRAY;
break;
case VP_ARB:
@@ -483,8 +531,9 @@ recalculate_input_bindings(struct gl_context *ctx)
inputs[VERT_ATTRIB_GENERIC0 + i] = &vbo->generic_currval[i];
const_inputs |= 1 << (VERT_ATTRIB_GENERIC0 + i);
}
-
}
+
+ ctx->NewState |= _NEW_ARRAY;
break;
}
@@ -502,8 +551,13 @@ recalculate_input_bindings(struct gl_context *ctx)
static void
bind_arrays(struct gl_context *ctx)
{
+ if (!ctx->Array.RebindArrays) {
+ return;
+ }
+
bind_array_obj(ctx);
recalculate_input_bindings(ctx);
+ ctx->Array.RebindArrays = GL_FALSE;
}
@@ -576,6 +630,7 @@ vbo_draw_arrays(struct gl_context *ctx, GLenum mode, GLint start,
if (primCount > 0) {
/* draw one or two prims */
+ check_buffers_are_unmapped(exec->array.inputs);
vbo->draw_prims(ctx, exec->array.inputs, prim, primCount, NULL,
GL_TRUE, start, start + count - 1);
}
@@ -585,6 +640,7 @@ vbo_draw_arrays(struct gl_context *ctx, GLenum mode, GLint start,
prim[0].start = start;
prim[0].count = count;
+ check_buffers_are_unmapped(exec->array.inputs);
vbo->draw_prims(ctx, exec->array.inputs, prim, 1, NULL,
GL_TRUE, start, start + count - 1);
}
@@ -629,15 +685,15 @@ vbo_exec_DrawArrays(GLenum mode, GLint start, GLsizei count)
*/
static void GLAPIENTRY
vbo_exec_DrawArraysInstanced(GLenum mode, GLint start, GLsizei count,
- GLsizei primcount)
+ GLsizei numInstances)
{
GET_CURRENT_CONTEXT(ctx);
if (MESA_VERBOSE & VERBOSE_DRAW)
_mesa_debug(ctx, "glDrawArraysInstanced(%s, %d, %d, %d)\n",
- _mesa_lookup_enum_by_nr(mode), start, count, primcount);
+ _mesa_lookup_enum_by_nr(mode), start, count, numInstances);
- if (!_mesa_validate_DrawArraysInstanced(ctx, mode, start, count, primcount))
+ if (!_mesa_validate_DrawArraysInstanced(ctx, mode, start, count, numInstances))
return;
FLUSH_CURRENT( ctx, 0 );
@@ -649,7 +705,7 @@ vbo_exec_DrawArraysInstanced(GLenum mode, GLint start, GLsizei count,
if (0)
check_draw_arrays_data(ctx, start, count);
- vbo_draw_arrays(ctx, mode, start, count, primcount);
+ vbo_draw_arrays(ctx, mode, start, count, numInstances);
if (0)
print_draw_arrays(ctx, mode, start, count);
@@ -724,7 +780,7 @@ vbo_validated_drawrangeelements(struct gl_context *ctx, GLenum mode,
GLuint start, GLuint end,
GLsizei count, GLenum type,
const GLvoid *indices,
- GLint basevertex, GLint primcount)
+ GLint basevertex, GLint numInstances)
{
struct vbo_context *vbo = vbo_context(ctx);
struct vbo_exec_context *exec = &vbo->exec;
@@ -757,7 +813,7 @@ vbo_validated_drawrangeelements(struct gl_context *ctx, GLenum mode,
prim[0].count = count;
prim[0].indexed = 1;
prim[0].basevertex = basevertex;
- prim[0].num_instances = primcount;
+ prim[0].num_instances = numInstances;
/* Need to give special consideration to rendering a range of
* indices starting somewhere above zero. Typically the
@@ -790,6 +846,7 @@ vbo_validated_drawrangeelements(struct gl_context *ctx, GLenum mode,
* for the latter case elsewhere.
*/
+ check_buffers_are_unmapped(exec->array.inputs);
vbo->draw_prims( ctx, exec->array.inputs, prim, 1, &ib,
index_bounds_valid, start, end );
}
@@ -977,21 +1034,21 @@ vbo_exec_DrawElementsBaseVertex(GLenum mode, GLsizei count, GLenum type,
*/
static void GLAPIENTRY
vbo_exec_DrawElementsInstanced(GLenum mode, GLsizei count, GLenum type,
- const GLvoid *indices, GLsizei primcount)
+ const GLvoid *indices, GLsizei numInstances)
{
GET_CURRENT_CONTEXT(ctx);
if (MESA_VERBOSE & VERBOSE_DRAW)
_mesa_debug(ctx, "glDrawElementsInstanced(%s, %d, %s, %p, %d)\n",
_mesa_lookup_enum_by_nr(mode), count,
- _mesa_lookup_enum_by_nr(type), indices, primcount);
+ _mesa_lookup_enum_by_nr(type), indices, numInstances);
if (!_mesa_validate_DrawElementsInstanced(ctx, mode, count, type, indices,
- primcount))
+ numInstances))
return;
vbo_validated_drawrangeelements(ctx, mode, GL_FALSE, ~0, ~0,
- count, type, indices, 0, primcount);
+ count, type, indices, 0, numInstances);
}
@@ -1106,6 +1163,7 @@ vbo_validated_multidrawelements(struct gl_context *ctx, GLenum mode,
prim[i].basevertex = 0;
}
+ check_buffers_are_unmapped(exec->array.inputs);
vbo->draw_prims(ctx, exec->array.inputs, prim, primcount, &ib,
GL_FALSE, ~0, ~0);
} else {
@@ -1130,6 +1188,7 @@ vbo_validated_multidrawelements(struct gl_context *ctx, GLenum mode,
else
prim[0].basevertex = 0;
+ check_buffers_are_unmapped(exec->array.inputs);
vbo->draw_prims(ctx, exec->array.inputs, prim, 1, &ib,
GL_FALSE, ~0, ~0);
}
diff --git a/src/mesa/vbo/vbo_exec_draw.c b/src/mesa/vbo/vbo_exec_draw.c
index 94aa021ac9a..539658021e3 100644
--- a/src/mesa/vbo/vbo_exec_draw.c
+++ b/src/mesa/vbo/vbo_exec_draw.c
@@ -29,6 +29,7 @@
#include "main/bufferobj.h"
#include "main/compiler.h"
#include "main/enums.h"
+#include "main/mfeatures.h"
#include "main/state.h"
#include "vbo_context.h"
@@ -244,6 +245,7 @@ vbo_exec_bind_arrays( struct gl_context *ctx )
arrays[attr]._MaxElement = count; /* ??? */
varying_inputs |= 1 << attr;
+ ctx->NewState |= _NEW_ARRAY;
}
}
@@ -251,6 +253,9 @@ vbo_exec_bind_arrays( struct gl_context *ctx )
}
+/**
+ * Unmap the VBO. This is called before drawing.
+ */
static void
vbo_exec_vtx_unmap( struct vbo_exec_context *exec )
{
@@ -283,6 +288,9 @@ vbo_exec_vtx_unmap( struct vbo_exec_context *exec )
}
+/**
+ * Map the vertex buffer to begin storing glVertex, glColor, etc data.
+ */
void
vbo_exec_vtx_map( struct vbo_exec_context *exec )
{
@@ -299,14 +307,12 @@ vbo_exec_vtx_map( struct vbo_exec_context *exec )
if (!_mesa_is_bufferobj(exec->vtx.bufferobj))
return;
- if (exec->vtx.buffer_map != NULL) {
- assert(0);
- exec->vtx.buffer_map = NULL;
- exec->vtx.buffer_ptr = NULL;
- }
+ assert(!exec->vtx.buffer_map);
+ assert(!exec->vtx.buffer_ptr);
if (VBO_VERT_BUFFER_SIZE > exec->vtx.buffer_used + 1024 &&
ctx->Driver.MapBufferRange) {
+ /* The VBO exists and there's room for more */
exec->vtx.buffer_map =
(GLfloat *)ctx->Driver.MapBufferRange(ctx,
target,
@@ -319,6 +325,7 @@ vbo_exec_vtx_map( struct vbo_exec_context *exec )
}
if (!exec->vtx.buffer_map) {
+ /* Need to allocate a new VBO */
exec->vtx.buffer_used = 0;
ctx->Driver.BufferData(ctx, target,
@@ -347,9 +354,10 @@ vbo_exec_vtx_map( struct vbo_exec_context *exec )
/**
* Execute the buffer and save copied verts.
+ * \param keep_unmapped if true, leave the VBO unmapped when we're done.
*/
void
-vbo_exec_vtx_flush( struct vbo_exec_context *exec, GLboolean unmap )
+vbo_exec_vtx_flush(struct vbo_exec_context *exec, GLboolean keepUnmapped)
{
if (0)
vbo_exec_debug_verts( exec );
@@ -389,7 +397,7 @@ vbo_exec_vtx_flush( struct vbo_exec_context *exec, GLboolean unmap )
/* If using a real VBO, get new storage -- unless asked not to.
*/
- if (_mesa_is_bufferobj(exec->vtx.bufferobj) && !unmap) {
+ if (_mesa_is_bufferobj(exec->vtx.bufferobj) && !keepUnmapped) {
vbo_exec_vtx_map( exec );
}
}
@@ -397,14 +405,13 @@ vbo_exec_vtx_flush( struct vbo_exec_context *exec, GLboolean unmap )
/* May have to unmap explicitly if we didn't draw:
*/
- if (unmap &&
+ if (keepUnmapped &&
_mesa_is_bufferobj(exec->vtx.bufferobj) &&
exec->vtx.buffer_map) {
vbo_exec_vtx_unmap( exec );
}
-
- if (unmap || exec->vtx.vertex_size == 0)
+ if (keepUnmapped || exec->vtx.vertex_size == 0)
exec->vtx.max_vert = 0;
else
exec->vtx.max_vert = ((VBO_VERT_BUFFER_SIZE - exec->vtx.buffer_used) /
diff --git a/src/mesa/vbo/vbo_save.c b/src/mesa/vbo/vbo_save.c
index 4e7bcddc970..4343b348180 100644
--- a/src/mesa/vbo/vbo_save.c
+++ b/src/mesa/vbo/vbo_save.c
@@ -29,6 +29,7 @@
#include "main/mtypes.h"
#include "main/bufferobj.h"
#include "main/imports.h"
+#include "main/mfeatures.h"
#include "vbo_context.h"
diff --git a/src/mesa/vbo/vbo_save.h b/src/mesa/vbo/vbo_save.h
index f5a407ced14..cd827ce6c06 100644
--- a/src/mesa/vbo/vbo_save.h
+++ b/src/mesa/vbo/vbo_save.h
@@ -34,6 +34,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
#ifndef VBO_SAVE_H
#define VBO_SAVE_H
+#include "main/mfeatures.h"
#include "main/mtypes.h"
#include "vbo.h"
#include "vbo_attrib.h"
@@ -96,7 +97,9 @@ struct vbo_save_vertex_list {
*/
#define VBO_SAVE_BUFFER_SIZE (8*1024) /* dwords */
#define VBO_SAVE_PRIM_SIZE 128
-#define VBO_SAVE_PRIM_WEAK 0x40
+#define VBO_SAVE_PRIM_MODE_MASK 0x3f
+#define VBO_SAVE_PRIM_WEAK 0x40
+#define VBO_SAVE_PRIM_NO_CURRENT_UPDATE 0x80
#define VBO_SAVE_FALLBACK 0x10000000
diff --git a/src/mesa/vbo/vbo_save_api.c b/src/mesa/vbo/vbo_save_api.c
index 817d478e2ac..836c76fe835 100644
--- a/src/mesa/vbo/vbo_save_api.c
+++ b/src/mesa/vbo/vbo_save_api.c
@@ -74,6 +74,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "main/enums.h"
#include "main/eval.h"
#include "main/macros.h"
+#include "main/mfeatures.h"
#include "main/api_noop.h"
#include "main/api_validate.h"
#include "main/api_arrayelt.h"
@@ -294,26 +295,30 @@ static void _save_compile_vertex_list( struct gl_context *ctx )
node->vertex_store->refcount++;
node->prim_store->refcount++;
-
- node->current_size = node->vertex_size - node->attrsz[0];
- node->current_data = NULL;
-
- if (node->current_size) {
- /* If the malloc fails, we just pull the data out of the VBO
- * later instead.
- */
- node->current_data = MALLOC( node->current_size * sizeof(GLfloat) );
- if (node->current_data) {
- const char *buffer = (const char *)save->vertex_store->buffer;
- unsigned attr_offset = node->attrsz[0] * sizeof(GLfloat);
- unsigned vertex_offset = 0;
-
- if (node->count)
- vertex_offset = (node->count-1) * node->vertex_size * sizeof(GLfloat);
-
- memcpy( node->current_data,
- buffer + node->buffer_offset + vertex_offset + attr_offset,
- node->current_size * sizeof(GLfloat) );
+ if (node->prim[0].no_current_update) {
+ node->current_size = 0;
+ node->current_data = NULL;
+ } else {
+ node->current_size = node->vertex_size - node->attrsz[0];
+ node->current_data = NULL;
+
+ if (node->current_size) {
+ /* If the malloc fails, we just pull the data out of the VBO
+ * later instead.
+ */
+ node->current_data = MALLOC( node->current_size * sizeof(GLfloat) );
+ if (node->current_data) {
+ const char *buffer = (const char *)save->vertex_store->buffer;
+ unsigned attr_offset = node->attrsz[0] * sizeof(GLfloat);
+ unsigned vertex_offset = 0;
+
+ if (node->count)
+ vertex_offset = (node->count-1) * node->vertex_size * sizeof(GLfloat);
+
+ memcpy( node->current_data,
+ buffer + node->buffer_offset + vertex_offset + attr_offset,
+ node->current_size * sizeof(GLfloat) );
+ }
}
}
@@ -397,6 +402,7 @@ static void _save_wrap_buffers( struct gl_context *ctx )
GLint i = save->prim_count - 1;
GLenum mode;
GLboolean weak;
+ GLboolean no_current_update;
assert(i < (GLint) save->prim_max);
assert(i >= 0);
@@ -407,6 +413,7 @@ static void _save_wrap_buffers( struct gl_context *ctx )
save->prim[i].start);
mode = save->prim[i].mode;
weak = save->prim[i].weak;
+ no_current_update = save->prim[i].no_current_update;
/* store the copied vertices, and allocate a new list.
*/
@@ -416,6 +423,7 @@ static void _save_wrap_buffers( struct gl_context *ctx )
*/
save->prim[0].mode = mode;
save->prim[0].weak = weak;
+ save->prim[0].no_current_update = no_current_update;
save->prim[0].begin = 0;
save->prim[0].end = 0;
save->prim[0].pad = 0;
@@ -625,7 +633,7 @@ static void _save_reset_vertex( struct gl_context *ctx )
-#define ERROR() _mesa_compile_error( ctx, GL_INVALID_ENUM, __FUNCTION__ );
+#define ERROR(err) _mesa_compile_error( ctx, err, __FUNCTION__ );
/* Only one size for each attribute may be active at once. Eg. if
@@ -638,11 +646,11 @@ static void _save_reset_vertex( struct gl_context *ctx )
do { \
struct vbo_save_context *save = &vbo_context(ctx)->save; \
\
- if (save->active_sz[A] != N) \
+ if (save->active_sz[A] != N) \
save_fixup_vertex(ctx, A, N); \
\
{ \
- GLfloat *dest = save->attrptr[A]; \
+ GLfloat *dest = save->attrptr[A]; \
if (N>0) dest[0] = V0; \
if (N>1) dest[1] = V1; \
if (N>2) dest[2] = V2; \
@@ -655,7 +663,7 @@ do { \
for (i = 0; i < save->vertex_size; i++) \
save->buffer_ptr[i] = save->vertex[i]; \
\
- save->buffer_ptr += save->vertex_size; \
+ save->buffer_ptr += save->vertex_size; \
\
if (++save->vert_count >= save->max_vert) \
_save_wrap_filled_vertex( ctx ); \
@@ -770,10 +778,11 @@ GLboolean vbo_save_NotifyBegin( struct gl_context *ctx, GLenum mode )
GLuint i = save->prim_count++;
assert(i < save->prim_max);
- save->prim[i].mode = mode & ~VBO_SAVE_PRIM_WEAK;
+ save->prim[i].mode = mode & VBO_SAVE_PRIM_MODE_MASK;
save->prim[i].begin = 1;
save->prim[i].end = 0;
save->prim[i].weak = (mode & VBO_SAVE_PRIM_WEAK) ? 1 : 0;
+ save->prim[i].no_current_update = (mode & VBO_SAVE_PRIM_NO_CURRENT_UPDATE) ? 1 : 0;
save->prim[i].pad = 0;
save->prim[i].start = save->vert_count;
save->prim[i].count = 0;
@@ -934,7 +943,7 @@ static void GLAPIENTRY _save_OBE_DrawArrays(GLenum mode, GLint start, GLsizei co
_ae_map_vbos( ctx );
- vbo_save_NotifyBegin( ctx, mode | VBO_SAVE_PRIM_WEAK );
+ vbo_save_NotifyBegin( ctx, mode | VBO_SAVE_PRIM_WEAK | VBO_SAVE_PRIM_NO_CURRENT_UPDATE);
for (i = 0; i < count; i++)
CALL_ArrayElement(GET_DISPATCH(), (start + i));
@@ -960,7 +969,7 @@ static void GLAPIENTRY _save_OBE_DrawElements(GLenum mode, GLsizei count, GLenum
if (_mesa_is_bufferobj(ctx->Array.ElementArrayBufferObj))
indices = ADD_POINTERS(ctx->Array.ElementArrayBufferObj->Pointer, indices);
- vbo_save_NotifyBegin( ctx, mode | VBO_SAVE_PRIM_WEAK );
+ vbo_save_NotifyBegin( ctx, mode | VBO_SAVE_PRIM_WEAK | VBO_SAVE_PRIM_NO_CURRENT_UPDATE );
switch (type) {
case GL_UNSIGNED_BYTE:
diff --git a/src/mesa/vbo/vbo_save_draw.c b/src/mesa/vbo/vbo_save_draw.c
index 533c150a918..634a6d3f84b 100644
--- a/src/mesa/vbo/vbo_save_draw.c
+++ b/src/mesa/vbo/vbo_save_draw.c
@@ -30,6 +30,7 @@
#include "main/bufferobj.h"
#include "main/context.h"
#include "main/imports.h"
+#include "main/mfeatures.h"
#include "main/mtypes.h"
#include "main/macros.h"
#include "main/light.h"
@@ -201,6 +202,7 @@ static void vbo_bind_vertex_list(struct gl_context *ctx,
buffer_offset += node->attrsz[src] * sizeof(GLfloat);
varying_inputs |= 1<<attr;
+ ctx->NewState |= _NEW_ARRAY;
}
}
diff --git a/src/mesa/vbo/vbo_save_loopback.c b/src/mesa/vbo/vbo_save_loopback.c
index b1cfa9c2a8f..51e598e7e61 100644
--- a/src/mesa/vbo/vbo_save_loopback.c
+++ b/src/mesa/vbo/vbo_save_loopback.c
@@ -29,6 +29,7 @@
#include "main/glheader.h"
#include "main/enums.h"
#include "main/imports.h"
+#include "main/mfeatures.h"
#include "main/mtypes.h"
#include "main/dispatch.h"
#include "glapi/glapi.h"
diff --git a/src/mesa/vbo/vbo_split_copy.c b/src/mesa/vbo/vbo_split_copy.c
index 26d0046e83d..8c981f93e5c 100644
--- a/src/mesa/vbo/vbo_split_copy.c
+++ b/src/mesa/vbo/vbo_split_copy.c
@@ -222,6 +222,7 @@ begin( struct copy_context *copy, GLenum mode, GLboolean begin_flag )
prim->mode = mode;
prim->begin = begin_flag;
+ prim->num_instances = 1;
}
diff --git a/src/mesa/vbo/vbo_split_inplace.c b/src/mesa/vbo/vbo_split_inplace.c
index 789cf31364b..f6aa576b6c8 100644
--- a/src/mesa/vbo/vbo_split_inplace.c
+++ b/src/mesa/vbo/vbo_split_inplace.c
@@ -178,6 +178,7 @@ static void split_prims( struct split_context *split)
outprim->end = (nr == remaining && prim->end);
outprim->start = prim->start + j;
outprim->count = nr;
+ outprim->num_instances = prim->num_instances;
update_index_bounds(split, outprim);
@@ -221,6 +222,7 @@ static void split_prims( struct split_context *split)
tmpprim.indexed = 1;
tmpprim.start = 0;
tmpprim.count = count;
+ tmpprim.num_instances = 1;
flush_vertex(split);
diff --git a/src/mesa/x86-64/xform4.S b/src/mesa/x86-64/xform4.S
index e52a6118c31..6141e434679 100644
--- a/src/mesa/x86-64/xform4.S
+++ b/src/mesa/x86-64/xform4.S
@@ -55,7 +55,7 @@ _mesa_x86_64_transform_points4_general:
* rdx = source
*/
movl V4F_COUNT(%rdx), %ecx /* count */
- movzx V4F_STRIDE(%rdx), %eax /* stride */
+ movzbl V4F_STRIDE(%rdx), %eax /* stride */
movl %ecx, V4F_COUNT(%rdi) /* set dest count */
movl $4, V4F_SIZE(%rdi) /* set dest size */
@@ -138,7 +138,7 @@ _mesa_x86_64_transform_points4_3d:
movaps 16(%rax), %xmm10
movl V4F_COUNT(%rdx), %ecx /* count */
- movzx V4F_STRIDE(%rdx), %eax /* stride */
+ movzbl V4F_STRIDE(%rdx), %eax /* stride */
movl %ecx, V4F_COUNT(%rdi) /* set dest count */
movl $4, V4F_SIZE(%rdi) /* set dest size */
@@ -199,7 +199,7 @@ p4_3d_done:
_mesa_x86_64_transform_points4_identity:
movl V4F_COUNT(%rdx), %ecx /* count */
- movzx V4F_STRIDE(%rdx), %eax /* stride */
+ movzbl V4F_STRIDE(%rdx), %eax /* stride */
movl %ecx, V4F_COUNT(%rdi) /* set dest count */
movl $4, V4F_SIZE(%rdi) /* set dest size */
@@ -228,7 +228,7 @@ p4_identity_done:
_mesa_3dnow_transform_points4_3d_no_rot:
movl V4F_COUNT(%rdx), %ecx /* count */
- movzx V4F_STRIDE(%rdx), %eax /* stride */
+ movzbl V4F_STRIDE(%rdx), %eax /* stride */
movl %ecx, V4F_COUNT(%rdi) /* set dest count */
movl $4, V4F_SIZE(%rdi) /* set dest size */
@@ -293,7 +293,7 @@ p4_3d_no_rot_done:
_mesa_3dnow_transform_points4_perspective:
movl V4F_COUNT(%rdx), %ecx /* count */
- movzx V4F_STRIDE(%rdx), %eax /* stride */
+ movzbl V4F_STRIDE(%rdx), %eax /* stride */
movl %ecx, V4F_COUNT(%rdi) /* set dest count */
movl $4, V4F_SIZE(%rdi) /* set dest size */
@@ -360,7 +360,7 @@ p4_perspective_done:
_mesa_3dnow_transform_points4_2d_no_rot:
movl V4F_COUNT(%rdx), %ecx /* count */
- movzx V4F_STRIDE(%rdx), %eax /* stride */
+ movzbl V4F_STRIDE(%rdx), %eax /* stride */
movl %ecx, V4F_COUNT(%rdi) /* set dest count */
movl $4, V4F_SIZE(%rdi) /* set dest size */
@@ -416,7 +416,7 @@ p4_2d_no_rot_done:
_mesa_3dnow_transform_points4_2d:
movl V4F_COUNT(%rdx), %ecx /* count */
- movzx V4F_STRIDE(%rdx), %eax /* stride */
+ movzbl V4F_STRIDE(%rdx), %eax /* stride */
movl %ecx, V4F_COUNT(%rdi) /* set dest count */
movl $4, V4F_SIZE(%rdi) /* set dest size */
diff --git a/src/mesa/x86/mmx.h b/src/mesa/x86/mmx.h
index d4bda07eade..74e9979d312 100644
--- a/src/mesa/x86/mmx.h
+++ b/src/mesa/x86/mmx.h
@@ -27,7 +27,9 @@
#define ASM_MMX_H
#include "main/compiler.h"
-#include "main/mtypes.h"
+#include "main/glheader.h"
+
+struct gl_context;
extern void _ASMAPI
_mesa_mmx_blend_transparency( struct gl_context *ctx, GLuint n, const GLubyte mask[],
diff --git a/src/mesa/x86/read_rgba_span_x86.S b/src/mesa/x86/read_rgba_span_x86.S
index 3886a510bbc..3be4515b114 100644
--- a/src/mesa/x86/read_rgba_span_x86.S
+++ b/src/mesa/x86/read_rgba_span_x86.S
@@ -77,7 +77,9 @@
*/
.globl _generic_read_RGBA_span_BGRA8888_REV_MMX
+#ifndef USE_DRICORE
.hidden _generic_read_RGBA_span_BGRA8888_REV_MMX
+#endif
.type _generic_read_RGBA_span_BGRA8888_REV_MMX, @function
_generic_read_RGBA_span_BGRA8888_REV_MMX:
pushl %ebx
@@ -172,7 +174,9 @@ _generic_read_RGBA_span_BGRA8888_REV_MMX:
*/
.globl _generic_read_RGBA_span_BGRA8888_REV_SSE
+#ifndef USE_DRICORE
.hidden _generic_read_RGBA_span_BGRA8888_REV_SSE
+#endif
.type _generic_read_RGBA_span_BGRA8888_REV_SSE, @function
_generic_read_RGBA_span_BGRA8888_REV_SSE:
pushl %esi
@@ -335,7 +339,9 @@ _generic_read_RGBA_span_BGRA8888_REV_SSE:
.text
.globl _generic_read_RGBA_span_BGRA8888_REV_SSE2
+#ifndef USE_DRICORE
.hidden _generic_read_RGBA_span_BGRA8888_REV_SSE2
+#endif
.type _generic_read_RGBA_span_BGRA8888_REV_SSE2, @function
_generic_read_RGBA_span_BGRA8888_REV_SSE2:
pushl %esi
@@ -494,7 +500,9 @@ _generic_read_RGBA_span_BGRA8888_REV_SSE2:
.text
.globl _generic_read_RGBA_span_RGB565_MMX
+#ifndef USE_DRICORE
.hidden _generic_read_RGBA_span_RGB565_MMX
+#endif
.type _generic_read_RGBA_span_RGB565_MMX, @function
_generic_read_RGBA_span_RGB565_MMX:
@@ -648,7 +656,7 @@ _generic_read_RGBA_span_RGB565_MMX:
testl $0x01, %ecx
je .L01
- movzxw (%eax), %ecx
+ movzwl (%eax), %ecx
movd %ecx, %mm4
pshufw $0x00, %mm4, %mm0
diff --git a/src/talloc/Android.mk b/src/talloc/Android.mk
deleted file mode 100644
index 375c7e633dc..00000000000
--- a/src/talloc/Android.mk
+++ /dev/null
@@ -1,13 +0,0 @@
-LOCAL_PATH := $(call my-dir)
-
-include $(CLEAR_VARS)
-
-LOCAL_SRC_FILES := \
- talloc.c
-
-LOCAL_CFLAGS := \
- -fvisibility=hidden
-
-LOCAL_MODULE := libmesa_talloc
-
-include $(BUILD_STATIC_LIBRARY)
diff --git a/src/talloc/SConscript b/src/talloc/SConscript
deleted file mode 100644
index 3bf7029bb25..00000000000
--- a/src/talloc/SConscript
+++ /dev/null
@@ -1,20 +0,0 @@
-Import('*')
-
-if env['platform'] != 'windows':
- Return()
-
-env = env.Clone()
-
-talloc = env.SharedLibrary(
- target = 'talloc',
- source = ['talloc.c', 'talloc.def'],
-)
-
-env.InstallSharedLibrary(talloc)
-
-if env['platform'] == 'windows':
- talloc = env.FindIxes(talloc, 'LIBPREFIX', 'LIBSUFFIX')
-else:
- talloc = env.FindIxes(talloc, 'SHLIBPREFIX', 'SHLIBSUFFIX')
-
-Export('talloc')
diff --git a/src/talloc/gpl-3.0.txt b/src/talloc/gpl-3.0.txt
deleted file mode 100644
index 94a9ed024d3..00000000000
--- a/src/talloc/gpl-3.0.txt
+++ /dev/null
@@ -1,674 +0,0 @@
- GNU GENERAL PUBLIC LICENSE
- Version 3, 29 June 2007
-
- Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
- Preamble
-
- The GNU General Public License is a free, copyleft license for
-software and other kinds of works.
-
- The licenses for most software and other practical works are designed
-to take away your freedom to share and change the works. By contrast,
-the GNU General Public License is intended to guarantee your freedom to
-share and change all versions of a program--to make sure it remains free
-software for all its users. We, the Free Software Foundation, use the
-GNU General Public License for most of our software; it applies also to
-any other work released this way by its authors. You can apply it to
-your programs, too.
-
- When we speak of free software, we are referring to freedom, not
-price. Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-them if you wish), that you receive source code or can get it if you
-want it, that you can change the software or use pieces of it in new
-free programs, and that you know you can do these things.
-
- To protect your rights, we need to prevent others from denying you
-these rights or asking you to surrender the rights. Therefore, you have
-certain responsibilities if you distribute copies of the software, or if
-you modify it: responsibilities to respect the freedom of others.
-
- For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must pass on to the recipients the same
-freedoms that you received. You must make sure that they, too, receive
-or can get the source code. And you must show them these terms so they
-know their rights.
-
- Developers that use the GNU GPL protect your rights with two steps:
-(1) assert copyright on the software, and (2) offer you this License
-giving you legal permission to copy, distribute and/or modify it.
-
- For the developers' and authors' protection, the GPL clearly explains
-that there is no warranty for this free software. For both users' and
-authors' sake, the GPL requires that modified versions be marked as
-changed, so that their problems will not be attributed erroneously to
-authors of previous versions.
-
- Some devices are designed to deny users access to install or run
-modified versions of the software inside them, although the manufacturer
-can do so. This is fundamentally incompatible with the aim of
-protecting users' freedom to change the software. The systematic
-pattern of such abuse occurs in the area of products for individuals to
-use, which is precisely where it is most unacceptable. Therefore, we
-have designed this version of the GPL to prohibit the practice for those
-products. If such problems arise substantially in other domains, we
-stand ready to extend this provision to those domains in future versions
-of the GPL, as needed to protect the freedom of users.
-
- Finally, every program is threatened constantly by software patents.
-States should not allow patents to restrict development and use of
-software on general-purpose computers, but in those that do, we wish to
-avoid the special danger that patents applied to a free program could
-make it effectively proprietary. To prevent this, the GPL assures that
-patents cannot be used to render the program non-free.
-
- The precise terms and conditions for copying, distribution and
-modification follow.
-
- TERMS AND CONDITIONS
-
- 0. Definitions.
-
- "This License" refers to version 3 of the GNU General Public License.
-
- "Copyright" also means copyright-like laws that apply to other kinds of
-works, such as semiconductor masks.
-
- "The Program" refers to any copyrightable work licensed under this
-License. Each licensee is addressed as "you". "Licensees" and
-"recipients" may be individuals or organizations.
-
- To "modify" a work means to copy from or adapt all or part of the work
-in a fashion requiring copyright permission, other than the making of an
-exact copy. The resulting work is called a "modified version" of the
-earlier work or a work "based on" the earlier work.
-
- A "covered work" means either the unmodified Program or a work based
-on the Program.
-
- To "propagate" a work means to do anything with it that, without
-permission, would make you directly or secondarily liable for
-infringement under applicable copyright law, except executing it on a
-computer or modifying a private copy. Propagation includes copying,
-distribution (with or without modification), making available to the
-public, and in some countries other activities as well.
-
- To "convey" a work means any kind of propagation that enables other
-parties to make or receive copies. Mere interaction with a user through
-a computer network, with no transfer of a copy, is not conveying.
-
- An interactive user interface displays "Appropriate Legal Notices"
-to the extent that it includes a convenient and prominently visible
-feature that (1) displays an appropriate copyright notice, and (2)
-tells the user that there is no warranty for the work (except to the
-extent that warranties are provided), that licensees may convey the
-work under this License, and how to view a copy of this License. If
-the interface presents a list of user commands or options, such as a
-menu, a prominent item in the list meets this criterion.
-
- 1. Source Code.
-
- The "source code" for a work means the preferred form of the work
-for making modifications to it. "Object code" means any non-source
-form of a work.
-
- A "Standard Interface" means an interface that either is an official
-standard defined by a recognized standards body, or, in the case of
-interfaces specified for a particular programming language, one that
-is widely used among developers working in that language.
-
- The "System Libraries" of an executable work include anything, other
-than the work as a whole, that (a) is included in the normal form of
-packaging a Major Component, but which is not part of that Major
-Component, and (b) serves only to enable use of the work with that
-Major Component, or to implement a Standard Interface for which an
-implementation is available to the public in source code form. A
-"Major Component", in this context, means a major essential component
-(kernel, window system, and so on) of the specific operating system
-(if any) on which the executable work runs, or a compiler used to
-produce the work, or an object code interpreter used to run it.
-
- The "Corresponding Source" for a work in object code form means all
-the source code needed to generate, install, and (for an executable
-work) run the object code and to modify the work, including scripts to
-control those activities. However, it does not include the work's
-System Libraries, or general-purpose tools or generally available free
-programs which are used unmodified in performing those activities but
-which are not part of the work. For example, Corresponding Source
-includes interface definition files associated with source files for
-the work, and the source code for shared libraries and dynamically
-linked subprograms that the work is specifically designed to require,
-such as by intimate data communication or control flow between those
-subprograms and other parts of the work.
-
- The Corresponding Source need not include anything that users
-can regenerate automatically from other parts of the Corresponding
-Source.
-
- The Corresponding Source for a work in source code form is that
-same work.
-
- 2. Basic Permissions.
-
- All rights granted under this License are granted for the term of
-copyright on the Program, and are irrevocable provided the stated
-conditions are met. This License explicitly affirms your unlimited
-permission to run the unmodified Program. The output from running a
-covered work is covered by this License only if the output, given its
-content, constitutes a covered work. This License acknowledges your
-rights of fair use or other equivalent, as provided by copyright law.
-
- You may make, run and propagate covered works that you do not
-convey, without conditions so long as your license otherwise remains
-in force. You may convey covered works to others for the sole purpose
-of having them make modifications exclusively for you, or provide you
-with facilities for running those works, provided that you comply with
-the terms of this License in conveying all material for which you do
-not control copyright. Those thus making or running the covered works
-for you must do so exclusively on your behalf, under your direction
-and control, on terms that prohibit them from making any copies of
-your copyrighted material outside their relationship with you.
-
- Conveying under any other circumstances is permitted solely under
-the conditions stated below. Sublicensing is not allowed; section 10
-makes it unnecessary.
-
- 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
-
- No covered work shall be deemed part of an effective technological
-measure under any applicable law fulfilling obligations under article
-11 of the WIPO copyright treaty adopted on 20 December 1996, or
-similar laws prohibiting or restricting circumvention of such
-measures.
-
- When you convey a covered work, you waive any legal power to forbid
-circumvention of technological measures to the extent such circumvention
-is effected by exercising rights under this License with respect to
-the covered work, and you disclaim any intention to limit operation or
-modification of the work as a means of enforcing, against the work's
-users, your or third parties' legal rights to forbid circumvention of
-technological measures.
-
- 4. Conveying Verbatim Copies.
-
- You may convey verbatim copies of the Program's source code as you
-receive it, in any medium, provided that you conspicuously and
-appropriately publish on each copy an appropriate copyright notice;
-keep intact all notices stating that this License and any
-non-permissive terms added in accord with section 7 apply to the code;
-keep intact all notices of the absence of any warranty; and give all
-recipients a copy of this License along with the Program.
-
- You may charge any price or no price for each copy that you convey,
-and you may offer support or warranty protection for a fee.
-
- 5. Conveying Modified Source Versions.
-
- You may convey a work based on the Program, or the modifications to
-produce it from the Program, in the form of source code under the
-terms of section 4, provided that you also meet all of these conditions:
-
- a) The work must carry prominent notices stating that you modified
- it, and giving a relevant date.
-
- b) The work must carry prominent notices stating that it is
- released under this License and any conditions added under section
- 7. This requirement modifies the requirement in section 4 to
- "keep intact all notices".
-
- c) You must license the entire work, as a whole, under this
- License to anyone who comes into possession of a copy. This
- License will therefore apply, along with any applicable section 7
- additional terms, to the whole of the work, and all its parts,
- regardless of how they are packaged. This License gives no
- permission to license the work in any other way, but it does not
- invalidate such permission if you have separately received it.
-
- d) If the work has interactive user interfaces, each must display
- Appropriate Legal Notices; however, if the Program has interactive
- interfaces that do not display Appropriate Legal Notices, your
- work need not make them do so.
-
- A compilation of a covered work with other separate and independent
-works, which are not by their nature extensions of the covered work,
-and which are not combined with it such as to form a larger program,
-in or on a volume of a storage or distribution medium, is called an
-"aggregate" if the compilation and its resulting copyright are not
-used to limit the access or legal rights of the compilation's users
-beyond what the individual works permit. Inclusion of a covered work
-in an aggregate does not cause this License to apply to the other
-parts of the aggregate.
-
- 6. Conveying Non-Source Forms.
-
- You may convey a covered work in object code form under the terms
-of sections 4 and 5, provided that you also convey the
-machine-readable Corresponding Source under the terms of this License,
-in one of these ways:
-
- a) Convey the object code in, or embodied in, a physical product
- (including a physical distribution medium), accompanied by the
- Corresponding Source fixed on a durable physical medium
- customarily used for software interchange.
-
- b) Convey the object code in, or embodied in, a physical product
- (including a physical distribution medium), accompanied by a
- written offer, valid for at least three years and valid for as
- long as you offer spare parts or customer support for that product
- model, to give anyone who possesses the object code either (1) a
- copy of the Corresponding Source for all the software in the
- product that is covered by this License, on a durable physical
- medium customarily used for software interchange, for a price no
- more than your reasonable cost of physically performing this
- conveying of source, or (2) access to copy the
- Corresponding Source from a network server at no charge.
-
- c) Convey individual copies of the object code with a copy of the
- written offer to provide the Corresponding Source. This
- alternative is allowed only occasionally and noncommercially, and
- only if you received the object code with such an offer, in accord
- with subsection 6b.
-
- d) Convey the object code by offering access from a designated
- place (gratis or for a charge), and offer equivalent access to the
- Corresponding Source in the same way through the same place at no
- further charge. You need not require recipients to copy the
- Corresponding Source along with the object code. If the place to
- copy the object code is a network server, the Corresponding Source
- may be on a different server (operated by you or a third party)
- that supports equivalent copying facilities, provided you maintain
- clear directions next to the object code saying where to find the
- Corresponding Source. Regardless of what server hosts the
- Corresponding Source, you remain obligated to ensure that it is
- available for as long as needed to satisfy these requirements.
-
- e) Convey the object code using peer-to-peer transmission, provided
- you inform other peers where the object code and Corresponding
- Source of the work are being offered to the general public at no
- charge under subsection 6d.
-
- A separable portion of the object code, whose source code is excluded
-from the Corresponding Source as a System Library, need not be
-included in conveying the object code work.
-
- A "User Product" is either (1) a "consumer product", which means any
-tangible personal property which is normally used for personal, family,
-or household purposes, or (2) anything designed or sold for incorporation
-into a dwelling. In determining whether a product is a consumer product,
-doubtful cases shall be resolved in favor of coverage. For a particular
-product received by a particular user, "normally used" refers to a
-typical or common use of that class of product, regardless of the status
-of the particular user or of the way in which the particular user
-actually uses, or expects or is expected to use, the product. A product
-is a consumer product regardless of whether the product has substantial
-commercial, industrial or non-consumer uses, unless such uses represent
-the only significant mode of use of the product.
-
- "Installation Information" for a User Product means any methods,
-procedures, authorization keys, or other information required to install
-and execute modified versions of a covered work in that User Product from
-a modified version of its Corresponding Source. The information must
-suffice to ensure that the continued functioning of the modified object
-code is in no case prevented or interfered with solely because
-modification has been made.
-
- If you convey an object code work under this section in, or with, or
-specifically for use in, a User Product, and the conveying occurs as
-part of a transaction in which the right of possession and use of the
-User Product is transferred to the recipient in perpetuity or for a
-fixed term (regardless of how the transaction is characterized), the
-Corresponding Source conveyed under this section must be accompanied
-by the Installation Information. But this requirement does not apply
-if neither you nor any third party retains the ability to install
-modified object code on the User Product (for example, the work has
-been installed in ROM).
-
- The requirement to provide Installation Information does not include a
-requirement to continue to provide support service, warranty, or updates
-for a work that has been modified or installed by the recipient, or for
-the User Product in which it has been modified or installed. Access to a
-network may be denied when the modification itself materially and
-adversely affects the operation of the network or violates the rules and
-protocols for communication across the network.
-
- Corresponding Source conveyed, and Installation Information provided,
-in accord with this section must be in a format that is publicly
-documented (and with an implementation available to the public in
-source code form), and must require no special password or key for
-unpacking, reading or copying.
-
- 7. Additional Terms.
-
- "Additional permissions" are terms that supplement the terms of this
-License by making exceptions from one or more of its conditions.
-Additional permissions that are applicable to the entire Program shall
-be treated as though they were included in this License, to the extent
-that they are valid under applicable law. If additional permissions
-apply only to part of the Program, that part may be used separately
-under those permissions, but the entire Program remains governed by
-this License without regard to the additional permissions.
-
- When you convey a copy of a covered work, you may at your option
-remove any additional permissions from that copy, or from any part of
-it. (Additional permissions may be written to require their own
-removal in certain cases when you modify the work.) You may place
-additional permissions on material, added by you to a covered work,
-for which you have or can give appropriate copyright permission.
-
- Notwithstanding any other provision of this License, for material you
-add to a covered work, you may (if authorized by the copyright holders of
-that material) supplement the terms of this License with terms:
-
- a) Disclaiming warranty or limiting liability differently from the
- terms of sections 15 and 16 of this License; or
-
- b) Requiring preservation of specified reasonable legal notices or
- author attributions in that material or in the Appropriate Legal
- Notices displayed by works containing it; or
-
- c) Prohibiting misrepresentation of the origin of that material, or
- requiring that modified versions of such material be marked in
- reasonable ways as different from the original version; or
-
- d) Limiting the use for publicity purposes of names of licensors or
- authors of the material; or
-
- e) Declining to grant rights under trademark law for use of some
- trade names, trademarks, or service marks; or
-
- f) Requiring indemnification of licensors and authors of that
- material by anyone who conveys the material (or modified versions of
- it) with contractual assumptions of liability to the recipient, for
- any liability that these contractual assumptions directly impose on
- those licensors and authors.
-
- All other non-permissive additional terms are considered "further
-restrictions" within the meaning of section 10. If the Program as you
-received it, or any part of it, contains a notice stating that it is
-governed by this License along with a term that is a further
-restriction, you may remove that term. If a license document contains
-a further restriction but permits relicensing or conveying under this
-License, you may add to a covered work material governed by the terms
-of that license document, provided that the further restriction does
-not survive such relicensing or conveying.
-
- If you add terms to a covered work in accord with this section, you
-must place, in the relevant source files, a statement of the
-additional terms that apply to those files, or a notice indicating
-where to find the applicable terms.
-
- Additional terms, permissive or non-permissive, may be stated in the
-form of a separately written license, or stated as exceptions;
-the above requirements apply either way.
-
- 8. Termination.
-
- You may not propagate or modify a covered work except as expressly
-provided under this License. Any attempt otherwise to propagate or
-modify it is void, and will automatically terminate your rights under
-this License (including any patent licenses granted under the third
-paragraph of section 11).
-
- However, if you cease all violation of this License, then your
-license from a particular copyright holder is reinstated (a)
-provisionally, unless and until the copyright holder explicitly and
-finally terminates your license, and (b) permanently, if the copyright
-holder fails to notify you of the violation by some reasonable means
-prior to 60 days after the cessation.
-
- Moreover, your license from a particular copyright holder is
-reinstated permanently if the copyright holder notifies you of the
-violation by some reasonable means, this is the first time you have
-received notice of violation of this License (for any work) from that
-copyright holder, and you cure the violation prior to 30 days after
-your receipt of the notice.
-
- Termination of your rights under this section does not terminate the
-licenses of parties who have received copies or rights from you under
-this License. If your rights have been terminated and not permanently
-reinstated, you do not qualify to receive new licenses for the same
-material under section 10.
-
- 9. Acceptance Not Required for Having Copies.
-
- You are not required to accept this License in order to receive or
-run a copy of the Program. Ancillary propagation of a covered work
-occurring solely as a consequence of using peer-to-peer transmission
-to receive a copy likewise does not require acceptance. However,
-nothing other than this License grants you permission to propagate or
-modify any covered work. These actions infringe copyright if you do
-not accept this License. Therefore, by modifying or propagating a
-covered work, you indicate your acceptance of this License to do so.
-
- 10. Automatic Licensing of Downstream Recipients.
-
- Each time you convey a covered work, the recipient automatically
-receives a license from the original licensors, to run, modify and
-propagate that work, subject to this License. You are not responsible
-for enforcing compliance by third parties with this License.
-
- An "entity transaction" is a transaction transferring control of an
-organization, or substantially all assets of one, or subdividing an
-organization, or merging organizations. If propagation of a covered
-work results from an entity transaction, each party to that
-transaction who receives a copy of the work also receives whatever
-licenses to the work the party's predecessor in interest had or could
-give under the previous paragraph, plus a right to possession of the
-Corresponding Source of the work from the predecessor in interest, if
-the predecessor has it or can get it with reasonable efforts.
-
- You may not impose any further restrictions on the exercise of the
-rights granted or affirmed under this License. For example, you may
-not impose a license fee, royalty, or other charge for exercise of
-rights granted under this License, and you may not initiate litigation
-(including a cross-claim or counterclaim in a lawsuit) alleging that
-any patent claim is infringed by making, using, selling, offering for
-sale, or importing the Program or any portion of it.
-
- 11. Patents.
-
- A "contributor" is a copyright holder who authorizes use under this
-License of the Program or a work on which the Program is based. The
-work thus licensed is called the contributor's "contributor version".
-
- A contributor's "essential patent claims" are all patent claims
-owned or controlled by the contributor, whether already acquired or
-hereafter acquired, that would be infringed by some manner, permitted
-by this License, of making, using, or selling its contributor version,
-but do not include claims that would be infringed only as a
-consequence of further modification of the contributor version. For
-purposes of this definition, "control" includes the right to grant
-patent sublicenses in a manner consistent with the requirements of
-this License.
-
- Each contributor grants you a non-exclusive, worldwide, royalty-free
-patent license under the contributor's essential patent claims, to
-make, use, sell, offer for sale, import and otherwise run, modify and
-propagate the contents of its contributor version.
-
- In the following three paragraphs, a "patent license" is any express
-agreement or commitment, however denominated, not to enforce a patent
-(such as an express permission to practice a patent or covenant not to
-sue for patent infringement). To "grant" such a patent license to a
-party means to make such an agreement or commitment not to enforce a
-patent against the party.
-
- If you convey a covered work, knowingly relying on a patent license,
-and the Corresponding Source of the work is not available for anyone
-to copy, free of charge and under the terms of this License, through a
-publicly available network server or other readily accessible means,
-then you must either (1) cause the Corresponding Source to be so
-available, or (2) arrange to deprive yourself of the benefit of the
-patent license for this particular work, or (3) arrange, in a manner
-consistent with the requirements of this License, to extend the patent
-license to downstream recipients. "Knowingly relying" means you have
-actual knowledge that, but for the patent license, your conveying the
-covered work in a country, or your recipient's use of the covered work
-in a country, would infringe one or more identifiable patents in that
-country that you have reason to believe are valid.
-
- If, pursuant to or in connection with a single transaction or
-arrangement, you convey, or propagate by procuring conveyance of, a
-covered work, and grant a patent license to some of the parties
-receiving the covered work authorizing them to use, propagate, modify
-or convey a specific copy of the covered work, then the patent license
-you grant is automatically extended to all recipients of the covered
-work and works based on it.
-
- A patent license is "discriminatory" if it does not include within
-the scope of its coverage, prohibits the exercise of, or is
-conditioned on the non-exercise of one or more of the rights that are
-specifically granted under this License. You may not convey a covered
-work if you are a party to an arrangement with a third party that is
-in the business of distributing software, under which you make payment
-to the third party based on the extent of your activity of conveying
-the work, and under which the third party grants, to any of the
-parties who would receive the covered work from you, a discriminatory
-patent license (a) in connection with copies of the covered work
-conveyed by you (or copies made from those copies), or (b) primarily
-for and in connection with specific products or compilations that
-contain the covered work, unless you entered into that arrangement,
-or that patent license was granted, prior to 28 March 2007.
-
- Nothing in this License shall be construed as excluding or limiting
-any implied license or other defenses to infringement that may
-otherwise be available to you under applicable patent law.
-
- 12. No Surrender of Others' Freedom.
-
- If conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot convey a
-covered work so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you may
-not convey it at all. For example, if you agree to terms that obligate you
-to collect a royalty for further conveying from those to whom you convey
-the Program, the only way you could satisfy both those terms and this
-License would be to refrain entirely from conveying the Program.
-
- 13. Use with the GNU Affero General Public License.
-
- Notwithstanding any other provision of this License, you have
-permission to link or combine any covered work with a work licensed
-under version 3 of the GNU Affero General Public License into a single
-combined work, and to convey the resulting work. The terms of this
-License will continue to apply to the part which is the covered work,
-but the special requirements of the GNU Affero General Public License,
-section 13, concerning interaction through a network will apply to the
-combination as such.
-
- 14. Revised Versions of this License.
-
- The Free Software Foundation may publish revised and/or new versions of
-the GNU General Public License from time to time. Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
- Each version is given a distinguishing version number. If the
-Program specifies that a certain numbered version of the GNU General
-Public License "or any later version" applies to it, you have the
-option of following the terms and conditions either of that numbered
-version or of any later version published by the Free Software
-Foundation. If the Program does not specify a version number of the
-GNU General Public License, you may choose any version ever published
-by the Free Software Foundation.
-
- If the Program specifies that a proxy can decide which future
-versions of the GNU General Public License can be used, that proxy's
-public statement of acceptance of a version permanently authorizes you
-to choose that version for the Program.
-
- Later license versions may give you additional or different
-permissions. However, no additional obligations are imposed on any
-author or copyright holder as a result of your choosing to follow a
-later version.
-
- 15. Disclaimer of Warranty.
-
- THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
-APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
-HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
-OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
-THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
-IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
-ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
- 16. Limitation of Liability.
-
- IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
-THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
-GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
-USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
-DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
-PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
-EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
-SUCH DAMAGES.
-
- 17. Interpretation of Sections 15 and 16.
-
- If the disclaimer of warranty and limitation of liability provided
-above cannot be given local legal effect according to their terms,
-reviewing courts shall apply local law that most closely approximates
-an absolute waiver of all civil liability in connection with the
-Program, unless a warranty or assumption of liability accompanies a
-copy of the Program in return for a fee.
-
- END OF TERMS AND CONDITIONS
-
- How to Apply These Terms to Your New Programs
-
- If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
- To do so, attach the following notices to the program. It is safest
-to attach them to the start of each source file to most effectively
-state the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
- <one line to give the program's name and a brief idea of what it does.>
- Copyright (C) <year> <name of author>
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-Also add information on how to contact you by electronic and paper mail.
-
- If the program does terminal interaction, make it output a short
-notice like this when it starts in an interactive mode:
-
- <program> Copyright (C) <year> <name of author>
- This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
- This is free software, and you are welcome to redistribute it
- under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License. Of course, your program's commands
-might be different; for a GUI interface, you would use an "about box".
-
- You should also get your employer (if you work as a programmer) or school,
-if any, to sign a "copyright disclaimer" for the program, if necessary.
-For more information on this, and how to apply and follow the GNU GPL, see
-<http://www.gnu.org/licenses/>.
-
- The GNU General Public License does not permit incorporating your program
-into proprietary programs. If your program is a subroutine library, you
-may consider it more useful to permit linking proprietary applications with
-the library. If this is what you want to do, use the GNU Lesser General
-Public License instead of this License. But first, please read
-<http://www.gnu.org/philosophy/why-not-lgpl.html>.
diff --git a/src/talloc/lgpl-3.0.txt b/src/talloc/lgpl-3.0.txt
deleted file mode 100644
index 65c5ca88a67..00000000000
--- a/src/talloc/lgpl-3.0.txt
+++ /dev/null
@@ -1,165 +0,0 @@
- GNU LESSER GENERAL PUBLIC LICENSE
- Version 3, 29 June 2007
-
- Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-
- This version of the GNU Lesser General Public License incorporates
-the terms and conditions of version 3 of the GNU General Public
-License, supplemented by the additional permissions listed below.
-
- 0. Additional Definitions.
-
- As used herein, "this License" refers to version 3 of the GNU Lesser
-General Public License, and the "GNU GPL" refers to version 3 of the GNU
-General Public License.
-
- "The Library" refers to a covered work governed by this License,
-other than an Application or a Combined Work as defined below.
-
- An "Application" is any work that makes use of an interface provided
-by the Library, but which is not otherwise based on the Library.
-Defining a subclass of a class defined by the Library is deemed a mode
-of using an interface provided by the Library.
-
- A "Combined Work" is a work produced by combining or linking an
-Application with the Library. The particular version of the Library
-with which the Combined Work was made is also called the "Linked
-Version".
-
- The "Minimal Corresponding Source" for a Combined Work means the
-Corresponding Source for the Combined Work, excluding any source code
-for portions of the Combined Work that, considered in isolation, are
-based on the Application, and not on the Linked Version.
-
- The "Corresponding Application Code" for a Combined Work means the
-object code and/or source code for the Application, including any data
-and utility programs needed for reproducing the Combined Work from the
-Application, but excluding the System Libraries of the Combined Work.
-
- 1. Exception to Section 3 of the GNU GPL.
-
- You may convey a covered work under sections 3 and 4 of this License
-without being bound by section 3 of the GNU GPL.
-
- 2. Conveying Modified Versions.
-
- If you modify a copy of the Library, and, in your modifications, a
-facility refers to a function or data to be supplied by an Application
-that uses the facility (other than as an argument passed when the
-facility is invoked), then you may convey a copy of the modified
-version:
-
- a) under this License, provided that you make a good faith effort to
- ensure that, in the event an Application does not supply the
- function or data, the facility still operates, and performs
- whatever part of its purpose remains meaningful, or
-
- b) under the GNU GPL, with none of the additional permissions of
- this License applicable to that copy.
-
- 3. Object Code Incorporating Material from Library Header Files.
-
- The object code form of an Application may incorporate material from
-a header file that is part of the Library. You may convey such object
-code under terms of your choice, provided that, if the incorporated
-material is not limited to numerical parameters, data structure
-layouts and accessors, or small macros, inline functions and templates
-(ten or fewer lines in length), you do both of the following:
-
- a) Give prominent notice with each copy of the object code that the
- Library is used in it and that the Library and its use are
- covered by this License.
-
- b) Accompany the object code with a copy of the GNU GPL and this license
- document.
-
- 4. Combined Works.
-
- You may convey a Combined Work under terms of your choice that,
-taken together, effectively do not restrict modification of the
-portions of the Library contained in the Combined Work and reverse
-engineering for debugging such modifications, if you also do each of
-the following:
-
- a) Give prominent notice with each copy of the Combined Work that
- the Library is used in it and that the Library and its use are
- covered by this License.
-
- b) Accompany the Combined Work with a copy of the GNU GPL and this license
- document.
-
- c) For a Combined Work that displays copyright notices during
- execution, include the copyright notice for the Library among
- these notices, as well as a reference directing the user to the
- copies of the GNU GPL and this license document.
-
- d) Do one of the following:
-
- 0) Convey the Minimal Corresponding Source under the terms of this
- License, and the Corresponding Application Code in a form
- suitable for, and under terms that permit, the user to
- recombine or relink the Application with a modified version of
- the Linked Version to produce a modified Combined Work, in the
- manner specified by section 6 of the GNU GPL for conveying
- Corresponding Source.
-
- 1) Use a suitable shared library mechanism for linking with the
- Library. A suitable mechanism is one that (a) uses at run time
- a copy of the Library already present on the user's computer
- system, and (b) will operate properly with a modified version
- of the Library that is interface-compatible with the Linked
- Version.
-
- e) Provide Installation Information, but only if you would otherwise
- be required to provide such information under section 6 of the
- GNU GPL, and only to the extent that such information is
- necessary to install and execute a modified version of the
- Combined Work produced by recombining or relinking the
- Application with a modified version of the Linked Version. (If
- you use option 4d0, the Installation Information must accompany
- the Minimal Corresponding Source and Corresponding Application
- Code. If you use option 4d1, you must provide the Installation
- Information in the manner specified by section 6 of the GNU GPL
- for conveying Corresponding Source.)
-
- 5. Combined Libraries.
-
- You may place library facilities that are a work based on the
-Library side by side in a single library together with other library
-facilities that are not Applications and are not covered by this
-License, and convey such a combined library under terms of your
-choice, if you do both of the following:
-
- a) Accompany the combined library with a copy of the same work based
- on the Library, uncombined with any other library facilities,
- conveyed under the terms of this License.
-
- b) Give prominent notice with the combined library that part of it
- is a work based on the Library, and explaining where to find the
- accompanying uncombined form of the same work.
-
- 6. Revised Versions of the GNU Lesser General Public License.
-
- The Free Software Foundation may publish revised and/or new versions
-of the GNU Lesser General Public License from time to time. Such new
-versions will be similar in spirit to the present version, but may
-differ in detail to address new problems or concerns.
-
- Each version is given a distinguishing version number. If the
-Library as you received it specifies that a certain numbered version
-of the GNU Lesser General Public License "or any later version"
-applies to it, you have the option of following the terms and
-conditions either of that published version or of any later version
-published by the Free Software Foundation. If the Library as you
-received it does not specify a version number of the GNU Lesser
-General Public License, you may choose any version of the GNU Lesser
-General Public License ever published by the Free Software Foundation.
-
- If the Library as you received it specifies that a proxy can decide
-whether future versions of the GNU Lesser General Public License shall
-apply, that proxy's public statement of acceptance of any version is
-permanent authorization for you to choose that version for the
-Library.
diff --git a/src/talloc/talloc.c b/src/talloc/talloc.c
deleted file mode 100644
index ea77684f7b9..00000000000
--- a/src/talloc/talloc.c
+++ /dev/null
@@ -1,2034 +0,0 @@
-/*
- Samba Unix SMB/CIFS implementation.
-
- Samba trivial allocation library - new interface
-
- NOTE: Please read talloc_guide.txt for full documentation
-
- Copyright (C) Andrew Tridgell 2004
- Copyright (C) Stefan Metzmacher 2006
-
- ** NOTE! The following LGPL license applies to the talloc
- ** library. This does NOT imply that all of Samba is released
- ** under the LGPL
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 3 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with this library; if not, see <http://www.gnu.org/licenses/>.
-*/
-
-/*
- inspired by http://swapped.cc/halloc/
-*/
-
-#include "talloc.h"
-#include <string.h>
-
-#define TALLOC_MIN(a,b) ((a)<(b)?(a):(b))
-
-/* Visual C++ 2008 compatibility */
-#if defined(_MSC_VER) && !defined(_cplusplus)
-typedef size_t ssize_t;
-#define inline __inline
-#endif
-
-/* Xcode/gcc4.0 compatibility */
-#if defined(__APPLE__) || defined(__MINGW32__)
-static size_t strnlen (const char* s, size_t n)
-{
- size_t i;
- for (i = 0; i < n; ++i)
- {
- if (s[i] == '\0')
- break;
- }
- return i;
-}
-#endif
-
-/* Visual C++ 2008 & Xcode/gcc4.0 compatibility */
-#if !defined(_cplusplus) && (defined(WIN32) || defined(__APPLE__) || defined(ANDROID))
-typedef int bool;
-#define false 0
-#define true 1
-#endif
-
-
-#ifdef TALLOC_BUILD_VERSION_MAJOR
-#if (TALLOC_VERSION_MAJOR != TALLOC_BUILD_VERSION_MAJOR)
-#error "TALLOC_VERSION_MAJOR != TALLOC_BUILD_VERSION_MAJOR"
-#endif
-#endif
-
-#ifdef TALLOC_BUILD_VERSION_MINOR
-#if (TALLOC_VERSION_MINOR != TALLOC_BUILD_VERSION_MINOR)
-#error "TALLOC_VERSION_MINOR != TALLOC_BUILD_VERSION_MINOR"
-#endif
-#endif
-
-/* use this to force every realloc to change the pointer, to stress test
- code that might not cope */
-#define ALWAYS_REALLOC 0
-
-
-#define MAX_TALLOC_SIZE 0x10000000
-#define TALLOC_MAGIC_BASE 0xe814ec70
-#define TALLOC_MAGIC ( \
- TALLOC_MAGIC_BASE + \
- (TALLOC_VERSION_MAJOR << 12) + \
- (TALLOC_VERSION_MINOR << 4) \
-)
-
-#define TALLOC_FLAG_FREE 0x01
-#define TALLOC_FLAG_LOOP 0x02
-#define TALLOC_FLAG_POOL 0x04 /* This is a talloc pool */
-#define TALLOC_FLAG_POOLMEM 0x08 /* This is allocated in a pool */
-#define TALLOC_MAGIC_REFERENCE ((const char *)1)
-
-/* by default we abort when given a bad pointer (such as when talloc_free() is called
- on a pointer that came from malloc() */
-#ifndef TALLOC_ABORT
-#define TALLOC_ABORT(reason) abort()
-#endif
-
-#ifndef discard_const_p
-#if defined(__intptr_t_defined) || defined(HAVE_INTPTR_T)
-# define discard_const_p(type, ptr) ((type *)((intptr_t)(ptr)))
-#else
-# define discard_const_p(type, ptr) ((type *)(ptr))
-#endif
-#endif
-
-/* these macros gain us a few percent of speed on gcc */
-#if (__GNUC__ >= 3)
-/* the strange !! is to ensure that __builtin_expect() takes either 0 or 1
- as its first argument */
-#ifndef likely
-#define likely(x) __builtin_expect(!!(x), 1)
-#endif
-#ifndef unlikely
-#define unlikely(x) __builtin_expect(!!(x), 0)
-#endif
-#else
-#ifndef likely
-#define likely(x) (x)
-#endif
-#ifndef unlikely
-#define unlikely(x) (x)
-#endif
-#endif
-
-/* this null_context is only used if talloc_enable_leak_report() or
- talloc_enable_leak_report_full() is called, otherwise it remains
- NULL
-*/
-static void *null_context;
-static void *autofree_context;
-
-struct talloc_reference_handle {
- struct talloc_reference_handle *next, *prev;
- void *ptr;
- const char *location;
-};
-
-typedef int (*talloc_destructor_t)(void *);
-
-struct talloc_chunk {
- struct talloc_chunk *next, *prev;
- struct talloc_chunk *parent, *child;
- struct talloc_reference_handle *refs;
- talloc_destructor_t destructor;
- const char *name;
- size_t size;
- unsigned flags;
-
- /*
- * "pool" has dual use:
- *
- * For the talloc pool itself (i.e. TALLOC_FLAG_POOL is set), "pool"
- * marks the end of the currently allocated area.
- *
- * For members of the pool (i.e. TALLOC_FLAG_POOLMEM is set), "pool"
- * is a pointer to the struct talloc_chunk of the pool that it was
- * allocated from. This way children can quickly find the pool to chew
- * from.
- */
- void *pool;
-};
-
-/* 16 byte alignment seems to keep everyone happy */
-#define TC_HDR_SIZE ((sizeof(struct talloc_chunk)+15)&~15)
-#define TC_PTR_FROM_CHUNK(tc) ((void *)(TC_HDR_SIZE + (char*)tc))
-
-int talloc_version_major(void)
-{
- return TALLOC_VERSION_MAJOR;
-}
-
-int talloc_version_minor(void)
-{
- return TALLOC_VERSION_MINOR;
-}
-
-static void (*talloc_log_fn)(const char *message);
-
-void talloc_set_log_fn(void (*log_fn)(const char *message))
-{
- talloc_log_fn = log_fn;
-}
-
-static void talloc_log(const char *fmt, ...) PRINTF_ATTRIBUTE(1,2);
-static void talloc_log(const char *fmt, ...)
-{
- va_list ap;
- char *message;
-
- if (!talloc_log_fn) {
- return;
- }
-
- va_start(ap, fmt);
- message = talloc_vasprintf(NULL, fmt, ap);
- va_end(ap);
-
- talloc_log_fn(message);
- talloc_free(message);
-}
-
-static void talloc_log_stderr(const char *message)
-{
- fprintf(stderr, "%s", message);
-}
-
-void talloc_set_log_stderr(void)
-{
- talloc_set_log_fn(talloc_log_stderr);
-}
-
-static void (*talloc_abort_fn)(const char *reason);
-
-void talloc_set_abort_fn(void (*abort_fn)(const char *reason))
-{
- talloc_abort_fn = abort_fn;
-}
-
-static void talloc_abort(const char *reason)
-{
- talloc_log("%s\n", reason);
-
- if (!talloc_abort_fn) {
- TALLOC_ABORT(reason);
- }
-
- talloc_abort_fn(reason);
-}
-
-static void talloc_abort_magic(unsigned magic)
-{
- unsigned striped = magic - TALLOC_MAGIC_BASE;
- unsigned major = (striped & 0xFFFFF000) >> 12;
- unsigned minor = (striped & 0x00000FF0) >> 4;
- talloc_log("Bad talloc magic[0x%08X/%u/%u] expected[0x%08X/%u/%u]\n",
- magic, major, minor,
- TALLOC_MAGIC, TALLOC_VERSION_MAJOR, TALLOC_VERSION_MINOR);
- talloc_abort("Bad talloc magic value - wrong talloc version used/mixed");
-}
-
-static void talloc_abort_double_free(void)
-{
- talloc_abort("Bad talloc magic value - double free");
-}
-
-static void talloc_abort_unknown_value(void)
-{
- talloc_abort("Bad talloc magic value - unknown value");
-}
-
-/* panic if we get a bad magic value */
-static inline struct talloc_chunk *talloc_chunk_from_ptr(const void *ptr)
-{
- const char *pp = (const char *)ptr;
- struct talloc_chunk *tc = discard_const_p(struct talloc_chunk, pp - TC_HDR_SIZE);
- if (unlikely((tc->flags & (TALLOC_FLAG_FREE | ~0xF)) != TALLOC_MAGIC)) {
- if ((tc->flags & (~0xFFF)) == TALLOC_MAGIC_BASE) {
- talloc_abort_magic(tc->flags & (~0xF));
- return NULL;
- }
-
- if (tc->flags & TALLOC_FLAG_FREE) {
- talloc_log("talloc: double free error - first free may be at %s\n", tc->name);
- talloc_abort_double_free();
- return NULL;
- } else {
- talloc_abort_unknown_value();
- return NULL;
- }
- }
- return tc;
-}
-
-/* hook into the front of the list */
-#define _TLIST_ADD(list, p) \
-do { \
- if (!(list)) { \
- (list) = (p); \
- (p)->next = (p)->prev = NULL; \
- } else { \
- (list)->prev = (p); \
- (p)->next = (list); \
- (p)->prev = NULL; \
- (list) = (p); \
- }\
-} while (0)
-
-/* remove an element from a list - element doesn't have to be in list. */
-#define _TLIST_REMOVE(list, p) \
-do { \
- if ((p) == (list)) { \
- (list) = (p)->next; \
- if (list) (list)->prev = NULL; \
- } else { \
- if ((p)->prev) (p)->prev->next = (p)->next; \
- if ((p)->next) (p)->next->prev = (p)->prev; \
- } \
- if ((p) && ((p) != (list))) (p)->next = (p)->prev = NULL; \
-} while (0)
-
-
-/*
- return the parent chunk of a pointer
-*/
-static inline struct talloc_chunk *talloc_parent_chunk(const void *ptr)
-{
- struct talloc_chunk *tc;
-
- if (unlikely(ptr == NULL)) {
- return NULL;
- }
-
- tc = talloc_chunk_from_ptr(ptr);
- while (tc->prev) tc=tc->prev;
-
- return tc->parent;
-}
-
-void *talloc_parent(const void *ptr)
-{
- struct talloc_chunk *tc = talloc_parent_chunk(ptr);
- return tc? TC_PTR_FROM_CHUNK(tc) : NULL;
-}
-
-/*
- find parents name
-*/
-const char *talloc_parent_name(const void *ptr)
-{
- struct talloc_chunk *tc = talloc_parent_chunk(ptr);
- return tc? tc->name : NULL;
-}
-
-/*
- A pool carries an in-pool object count count in the first 16 bytes.
- bytes. This is done to support talloc_steal() to a parent outside of the
- pool. The count includes the pool itself, so a talloc_free() on a pool will
- only destroy the pool if the count has dropped to zero. A talloc_free() of a
- pool member will reduce the count, and eventually also call free(3) on the
- pool memory.
-
- The object count is not put into "struct talloc_chunk" because it is only
- relevant for talloc pools and the alignment to 16 bytes would increase the
- memory footprint of each talloc chunk by those 16 bytes.
-*/
-
-#define TALLOC_POOL_HDR_SIZE 16
-
-static unsigned int *talloc_pool_objectcount(struct talloc_chunk *tc)
-{
- return (unsigned int *)((char *)tc + sizeof(struct talloc_chunk));
-}
-
-/*
- Allocate from a pool
-*/
-
-static struct talloc_chunk *talloc_alloc_pool(struct talloc_chunk *parent,
- size_t size)
-{
- struct talloc_chunk *pool_ctx = NULL;
- size_t space_left;
- struct talloc_chunk *result;
- size_t chunk_size;
-
- if (parent == NULL) {
- return NULL;
- }
-
- if (parent->flags & TALLOC_FLAG_POOL) {
- pool_ctx = parent;
- }
- else if (parent->flags & TALLOC_FLAG_POOLMEM) {
- pool_ctx = (struct talloc_chunk *)parent->pool;
- }
-
- if (pool_ctx == NULL) {
- return NULL;
- }
-
- space_left = ((char *)pool_ctx + TC_HDR_SIZE + pool_ctx->size)
- - ((char *)pool_ctx->pool);
-
- /*
- * Align size to 16 bytes
- */
- chunk_size = ((size + 15) & ~15);
-
- if (space_left < chunk_size) {
- return NULL;
- }
-
- result = (struct talloc_chunk *)pool_ctx->pool;
-
-#if defined(DEVELOPER) && defined(VALGRIND_MAKE_MEM_UNDEFINED)
- VALGRIND_MAKE_MEM_UNDEFINED(result, size);
-#endif
-
- pool_ctx->pool = (void *)((char *)result + chunk_size);
-
- result->flags = TALLOC_MAGIC | TALLOC_FLAG_POOLMEM;
- result->pool = pool_ctx;
-
- *talloc_pool_objectcount(pool_ctx) += 1;
-
- return result;
-}
-
-/*
- Allocate a bit of memory as a child of an existing pointer
-*/
-static inline void *__talloc(const void *context, size_t size)
-{
- struct talloc_chunk *tc = NULL;
-
- if (unlikely(context == NULL)) {
- context = null_context;
- }
-
- if (unlikely(size >= MAX_TALLOC_SIZE)) {
- return NULL;
- }
-
- if (context != NULL) {
- tc = talloc_alloc_pool(talloc_chunk_from_ptr(context),
- TC_HDR_SIZE+size);
- }
-
- if (tc == NULL) {
- tc = (struct talloc_chunk *)malloc(TC_HDR_SIZE+size);
- if (unlikely(tc == NULL)) return NULL;
- tc->flags = TALLOC_MAGIC;
- tc->pool = NULL;
- }
-
- tc->size = size;
- tc->destructor = NULL;
- tc->child = NULL;
- tc->name = NULL;
- tc->refs = NULL;
-
- if (likely(context)) {
- struct talloc_chunk *parent = talloc_chunk_from_ptr(context);
-
- if (parent->child) {
- parent->child->parent = NULL;
- tc->next = parent->child;
- tc->next->prev = tc;
- } else {
- tc->next = NULL;
- }
- tc->parent = parent;
- tc->prev = NULL;
- parent->child = tc;
- } else {
- tc->next = tc->prev = tc->parent = NULL;
- }
-
- return TC_PTR_FROM_CHUNK(tc);
-}
-
-/*
- * Create a talloc pool
- */
-
-void *talloc_pool(const void *context, size_t size)
-{
- void *result = __talloc(context, size + TALLOC_POOL_HDR_SIZE);
- struct talloc_chunk *tc;
-
- if (unlikely(result == NULL)) {
- return NULL;
- }
-
- tc = talloc_chunk_from_ptr(result);
-
- tc->flags |= TALLOC_FLAG_POOL;
- tc->pool = (char *)result + TALLOC_POOL_HDR_SIZE;
-
- *talloc_pool_objectcount(tc) = 1;
-
-#if defined(DEVELOPER) && defined(VALGRIND_MAKE_MEM_NOACCESS)
- VALGRIND_MAKE_MEM_NOACCESS(tc->pool, size);
-#endif
-
- return result;
-}
-
-/*
- setup a destructor to be called on free of a pointer
- the destructor should return 0 on success, or -1 on failure.
- if the destructor fails then the free is failed, and the memory can
- be continued to be used
-*/
-void _talloc_set_destructor(const void *ptr, int (*destructor)(void *))
-{
- struct talloc_chunk *tc = talloc_chunk_from_ptr(ptr);
- tc->destructor = destructor;
-}
-
-/*
- increase the reference count on a piece of memory.
-*/
-int talloc_increase_ref_count(const void *ptr)
-{
- if (unlikely(!talloc_reference(null_context, ptr))) {
- return -1;
- }
- return 0;
-}
-
-/*
- helper for talloc_reference()
-
- this is referenced by a function pointer and should not be inline
-*/
-static int talloc_reference_destructor(struct talloc_reference_handle *handle)
-{
- struct talloc_chunk *ptr_tc = talloc_chunk_from_ptr(handle->ptr);
- _TLIST_REMOVE(ptr_tc->refs, handle);
- return 0;
-}
-
-/*
- more efficient way to add a name to a pointer - the name must point to a
- true string constant
-*/
-static inline void _talloc_set_name_const(const void *ptr, const char *name)
-{
- struct talloc_chunk *tc = talloc_chunk_from_ptr(ptr);
- tc->name = name;
-}
-
-/*
- internal talloc_named_const()
-*/
-static inline void *_talloc_named_const(const void *context, size_t size, const char *name)
-{
- void *ptr;
-
- ptr = __talloc(context, size);
- if (unlikely(ptr == NULL)) {
- return NULL;
- }
-
- _talloc_set_name_const(ptr, name);
-
- return ptr;
-}
-
-/*
- make a secondary reference to a pointer, hanging off the given context.
- the pointer remains valid until both the original caller and this given
- context are freed.
-
- the major use for this is when two different structures need to reference the
- same underlying data, and you want to be able to free the two instances separately,
- and in either order
-*/
-void *_talloc_reference_loc(const void *context, const void *ptr, const char *location)
-{
- struct talloc_chunk *tc;
- struct talloc_reference_handle *handle;
- if (unlikely(ptr == NULL)) return NULL;
-
- tc = talloc_chunk_from_ptr(ptr);
- handle = (struct talloc_reference_handle *)_talloc_named_const(context,
- sizeof(struct talloc_reference_handle),
- TALLOC_MAGIC_REFERENCE);
- if (unlikely(handle == NULL)) return NULL;
-
- /* note that we hang the destructor off the handle, not the
- main context as that allows the caller to still setup their
- own destructor on the context if they want to */
- talloc_set_destructor(handle, talloc_reference_destructor);
- handle->ptr = discard_const_p(void, ptr);
- handle->location = location;
- _TLIST_ADD(tc->refs, handle);
- return handle->ptr;
-}
-
-static void *_talloc_steal_internal(const void *new_ctx, const void *ptr);
-
-/*
- internal talloc_free call
-*/
-static inline int _talloc_free_internal(void *ptr, const char *location)
-{
- struct talloc_chunk *tc;
-
- if (unlikely(ptr == NULL)) {
- return -1;
- }
-
- tc = talloc_chunk_from_ptr(ptr);
-
- if (unlikely(tc->refs)) {
- int is_child;
- /* check this is a reference from a child or grantchild
- * back to it's parent or grantparent
- *
- * in that case we need to remove the reference and
- * call another instance of talloc_free() on the current
- * pointer.
- */
- is_child = talloc_is_parent(tc->refs, ptr);
- _talloc_free_internal(tc->refs, location);
- if (is_child) {
- return _talloc_free_internal(ptr, location);
- }
- return -1;
- }
-
- if (unlikely(tc->flags & TALLOC_FLAG_LOOP)) {
- /* we have a free loop - stop looping */
- return 0;
- }
-
- if (unlikely(tc->destructor)) {
- talloc_destructor_t d = tc->destructor;
- if (d == (talloc_destructor_t)-1) {
- return -1;
- }
- tc->destructor = (talloc_destructor_t)-1;
- if (d(ptr) == -1) {
- tc->destructor = d;
- return -1;
- }
- tc->destructor = NULL;
- }
-
- if (tc->parent) {
- _TLIST_REMOVE(tc->parent->child, tc);
- if (tc->parent->child) {
- tc->parent->child->parent = tc->parent;
- }
- } else {
- if (tc->prev) tc->prev->next = tc->next;
- if (tc->next) tc->next->prev = tc->prev;
- }
-
- tc->flags |= TALLOC_FLAG_LOOP;
-
- while (tc->child) {
- /* we need to work out who will own an abandoned child
- if it cannot be freed. In priority order, the first
- choice is owner of any remaining reference to this
- pointer, the second choice is our parent, and the
- final choice is the null context. */
- void *child = TC_PTR_FROM_CHUNK(tc->child);
- const void *new_parent = null_context;
- if (unlikely(tc->child->refs)) {
- struct talloc_chunk *p = talloc_parent_chunk(tc->child->refs);
- if (p) new_parent = TC_PTR_FROM_CHUNK(p);
- }
- if (unlikely(_talloc_free_internal(child, location) == -1)) {
- if (new_parent == null_context) {
- struct talloc_chunk *p = talloc_parent_chunk(ptr);
- if (p) new_parent = TC_PTR_FROM_CHUNK(p);
- }
- _talloc_steal_internal(new_parent, child);
- }
- }
-
- tc->flags |= TALLOC_FLAG_FREE;
-
- /* we mark the freed memory with where we called the free
- * from. This means on a double free error we can report where
- * the first free came from
- */
- tc->name = location;
-
- if (tc->flags & (TALLOC_FLAG_POOL|TALLOC_FLAG_POOLMEM)) {
- struct talloc_chunk *pool;
- unsigned int *pool_object_count;
-
- pool = (tc->flags & TALLOC_FLAG_POOL)
- ? tc : (struct talloc_chunk *)tc->pool;
-
- pool_object_count = talloc_pool_objectcount(pool);
-
- if (*pool_object_count == 0) {
- talloc_abort("Pool object count zero!");
- return 0;
- }
-
- *pool_object_count -= 1;
-
- if (*pool_object_count == 0) {
- free(pool);
- }
- }
- else {
- free(tc);
- }
- return 0;
-}
-
-/*
- move a lump of memory from one talloc context to another return the
- ptr on success, or NULL if it could not be transferred.
- passing NULL as ptr will always return NULL with no side effects.
-*/
-static void *_talloc_steal_internal(const void *new_ctx, const void *ptr)
-{
- struct talloc_chunk *tc, *new_tc;
-
- if (unlikely(!ptr)) {
- return NULL;
- }
-
- if (unlikely(new_ctx == NULL)) {
- new_ctx = null_context;
- }
-
- tc = talloc_chunk_from_ptr(ptr);
-
- if (unlikely(new_ctx == NULL)) {
- if (tc->parent) {
- _TLIST_REMOVE(tc->parent->child, tc);
- if (tc->parent->child) {
- tc->parent->child->parent = tc->parent;
- }
- } else {
- if (tc->prev) tc->prev->next = tc->next;
- if (tc->next) tc->next->prev = tc->prev;
- }
-
- tc->parent = tc->next = tc->prev = NULL;
- return discard_const_p(void, ptr);
- }
-
- new_tc = talloc_chunk_from_ptr(new_ctx);
-
- if (unlikely(tc == new_tc || tc->parent == new_tc)) {
- return discard_const_p(void, ptr);
- }
-
- if (tc->parent) {
- _TLIST_REMOVE(tc->parent->child, tc);
- if (tc->parent->child) {
- tc->parent->child->parent = tc->parent;
- }
- } else {
- if (tc->prev) tc->prev->next = tc->next;
- if (tc->next) tc->next->prev = tc->prev;
- }
-
- tc->parent = new_tc;
- if (new_tc->child) new_tc->child->parent = NULL;
- _TLIST_ADD(new_tc->child, tc);
-
- return discard_const_p(void, ptr);
-}
-
-/*
- move a lump of memory from one talloc context to another return the
- ptr on success, or NULL if it could not be transferred.
- passing NULL as ptr will always return NULL with no side effects.
-*/
-void *_talloc_steal_loc(const void *new_ctx, const void *ptr, const char *location)
-{
- struct talloc_chunk *tc;
-
- if (unlikely(ptr == NULL)) {
- return NULL;
- }
-
- tc = talloc_chunk_from_ptr(ptr);
-
- if (unlikely(tc->refs != NULL) && talloc_parent(ptr) != new_ctx) {
- struct talloc_reference_handle *h;
-
- talloc_log("WARNING: talloc_steal with references at %s\n",
- location);
-
- for (h=tc->refs; h; h=h->next) {
- talloc_log("\treference at %s\n",
- h->location);
- }
- }
-
- return _talloc_steal_internal(new_ctx, ptr);
-}
-
-/*
- this is like a talloc_steal(), but you must supply the old
- parent. This resolves the ambiguity in a talloc_steal() which is
- called on a context that has more than one parent (via references)
-
- The old parent can be either a reference or a parent
-*/
-void *talloc_reparent(const void *old_parent, const void *new_parent, const void *ptr)
-{
- struct talloc_chunk *tc;
- struct talloc_reference_handle *h;
-
- if (unlikely(ptr == NULL)) {
- return NULL;
- }
-
- if (old_parent == talloc_parent(ptr)) {
- return _talloc_steal_internal(new_parent, ptr);
- }
-
- tc = talloc_chunk_from_ptr(ptr);
- for (h=tc->refs;h;h=h->next) {
- if (talloc_parent(h) == old_parent) {
- if (_talloc_steal_internal(new_parent, h) != h) {
- return NULL;
- }
- return discard_const_p(void, ptr);
- }
- }
-
- /* it wasn't a parent */
- return NULL;
-}
-
-/*
- remove a secondary reference to a pointer. This undo's what
- talloc_reference() has done. The context and pointer arguments
- must match those given to a talloc_reference()
-*/
-static inline int talloc_unreference(const void *context, const void *ptr)
-{
- struct talloc_chunk *tc = talloc_chunk_from_ptr(ptr);
- struct talloc_reference_handle *h;
-
- if (unlikely(context == NULL)) {
- context = null_context;
- }
-
- for (h=tc->refs;h;h=h->next) {
- struct talloc_chunk *p = talloc_parent_chunk(h);
- if (p == NULL) {
- if (context == NULL) break;
- } else if (TC_PTR_FROM_CHUNK(p) == context) {
- break;
- }
- }
- if (h == NULL) {
- return -1;
- }
-
- return _talloc_free_internal(h, __location__);
-}
-
-/*
- remove a specific parent context from a pointer. This is a more
- controlled varient of talloc_free()
-*/
-int talloc_unlink(const void *context, void *ptr)
-{
- struct talloc_chunk *tc_p, *new_p;
- void *new_parent;
-
- if (ptr == NULL) {
- return -1;
- }
-
- if (context == NULL) {
- context = null_context;
- }
-
- if (talloc_unreference(context, ptr) == 0) {
- return 0;
- }
-
- if (context == NULL) {
- if (talloc_parent_chunk(ptr) != NULL) {
- return -1;
- }
- } else {
- if (talloc_chunk_from_ptr(context) != talloc_parent_chunk(ptr)) {
- return -1;
- }
- }
-
- tc_p = talloc_chunk_from_ptr(ptr);
-
- if (tc_p->refs == NULL) {
- return _talloc_free_internal(ptr, __location__);
- }
-
- new_p = talloc_parent_chunk(tc_p->refs);
- if (new_p) {
- new_parent = TC_PTR_FROM_CHUNK(new_p);
- } else {
- new_parent = NULL;
- }
-
- if (talloc_unreference(new_parent, ptr) != 0) {
- return -1;
- }
-
- _talloc_steal_internal(new_parent, ptr);
-
- return 0;
-}
-
-/*
- add a name to an existing pointer - va_list version
-*/
-static inline const char *talloc_set_name_v(const void *ptr, const char *fmt, va_list ap) PRINTF_ATTRIBUTE(2,0);
-
-static inline const char *talloc_set_name_v(const void *ptr, const char *fmt, va_list ap)
-{
- struct talloc_chunk *tc = talloc_chunk_from_ptr(ptr);
- tc->name = talloc_vasprintf(ptr, fmt, ap);
- if (likely(tc->name)) {
- _talloc_set_name_const(tc->name, ".name");
- }
- return tc->name;
-}
-
-/*
- add a name to an existing pointer
-*/
-const char *talloc_set_name(const void *ptr, const char *fmt, ...)
-{
- const char *name;
- va_list ap;
- va_start(ap, fmt);
- name = talloc_set_name_v(ptr, fmt, ap);
- va_end(ap);
- return name;
-}
-
-
-/*
- create a named talloc pointer. Any talloc pointer can be named, and
- talloc_named() operates just like talloc() except that it allows you
- to name the pointer.
-*/
-void *talloc_named(const void *context, size_t size, const char *fmt, ...)
-{
- va_list ap;
- void *ptr;
- const char *name;
-
- ptr = __talloc(context, size);
- if (unlikely(ptr == NULL)) return NULL;
-
- va_start(ap, fmt);
- name = talloc_set_name_v(ptr, fmt, ap);
- va_end(ap);
-
- if (unlikely(name == NULL)) {
- _talloc_free_internal(ptr, __location__);
- return NULL;
- }
-
- return ptr;
-}
-
-/*
- return the name of a talloc ptr, or "UNNAMED"
-*/
-const char *talloc_get_name(const void *ptr)
-{
- struct talloc_chunk *tc = talloc_chunk_from_ptr(ptr);
- if (unlikely(tc->name == TALLOC_MAGIC_REFERENCE)) {
- return ".reference";
- }
- if (likely(tc->name)) {
- return tc->name;
- }
- return "UNNAMED";
-}
-
-
-/*
- check if a pointer has the given name. If it does, return the pointer,
- otherwise return NULL
-*/
-void *talloc_check_name(const void *ptr, const char *name)
-{
- const char *pname;
- if (unlikely(ptr == NULL)) return NULL;
- pname = talloc_get_name(ptr);
- if (likely(pname == name || strcmp(pname, name) == 0)) {
- return discard_const_p(void, ptr);
- }
- return NULL;
-}
-
-static void talloc_abort_type_missmatch(const char *location,
- const char *name,
- const char *expected)
-{
- const char *reason;
-
- reason = talloc_asprintf(NULL,
- "%s: Type mismatch: name[%s] expected[%s]",
- location,
- name?name:"NULL",
- expected);
- if (!reason) {
- reason = "Type mismatch";
- }
-
- talloc_abort(reason);
-}
-
-void *_talloc_get_type_abort(const void *ptr, const char *name, const char *location)
-{
- const char *pname;
-
- if (unlikely(ptr == NULL)) {
- talloc_abort_type_missmatch(location, NULL, name);
- return NULL;
- }
-
- pname = talloc_get_name(ptr);
- if (likely(pname == name || strcmp(pname, name) == 0)) {
- return discard_const_p(void, ptr);
- }
-
- talloc_abort_type_missmatch(location, pname, name);
- return NULL;
-}
-
-/*
- this is for compatibility with older versions of talloc
-*/
-void *talloc_init(const char *fmt, ...)
-{
- va_list ap;
- void *ptr;
- const char *name;
-
- /*
- * samba3 expects talloc_report_depth_cb(NULL, ...)
- * reports all talloc'ed memory, so we need to enable
- * null_tracking
- */
- talloc_enable_null_tracking();
-
- ptr = __talloc(NULL, 0);
- if (unlikely(ptr == NULL)) return NULL;
-
- va_start(ap, fmt);
- name = talloc_set_name_v(ptr, fmt, ap);
- va_end(ap);
-
- if (unlikely(name == NULL)) {
- _talloc_free_internal(ptr, __location__);
- return NULL;
- }
-
- return ptr;
-}
-
-/*
- this is a replacement for the Samba3 talloc_destroy_pool functionality. It
- should probably not be used in new code. It's in here to keep the talloc
- code consistent across Samba 3 and 4.
-*/
-void talloc_free_children(void *ptr)
-{
- struct talloc_chunk *tc;
-
- if (unlikely(ptr == NULL)) {
- return;
- }
-
- tc = talloc_chunk_from_ptr(ptr);
-
- while (tc->child) {
- /* we need to work out who will own an abandoned child
- if it cannot be freed. In priority order, the first
- choice is owner of any remaining reference to this
- pointer, the second choice is our parent, and the
- final choice is the null context. */
- void *child = TC_PTR_FROM_CHUNK(tc->child);
- const void *new_parent = null_context;
- if (unlikely(tc->child->refs)) {
- struct talloc_chunk *p = talloc_parent_chunk(tc->child->refs);
- if (p) new_parent = TC_PTR_FROM_CHUNK(p);
- }
- if (unlikely(talloc_free(child) == -1)) {
- if (new_parent == null_context) {
- struct talloc_chunk *p = talloc_parent_chunk(ptr);
- if (p) new_parent = TC_PTR_FROM_CHUNK(p);
- }
- _talloc_steal_internal(new_parent, child);
- }
- }
-
- if ((tc->flags & TALLOC_FLAG_POOL)
- && (*talloc_pool_objectcount(tc) == 1)) {
- tc->pool = ((char *)tc + TC_HDR_SIZE + TALLOC_POOL_HDR_SIZE);
-#if defined(DEVELOPER) && defined(VALGRIND_MAKE_MEM_NOACCESS)
- VALGRIND_MAKE_MEM_NOACCESS(
- tc->pool, tc->size - TALLOC_POOL_HDR_SIZE);
-#endif
- }
-}
-
-/*
- Allocate a bit of memory as a child of an existing pointer
-*/
-void *_talloc(const void *context, size_t size)
-{
- return __talloc(context, size);
-}
-
-/*
- externally callable talloc_set_name_const()
-*/
-void talloc_set_name_const(const void *ptr, const char *name)
-{
- _talloc_set_name_const(ptr, name);
-}
-
-/*
- create a named talloc pointer. Any talloc pointer can be named, and
- talloc_named() operates just like talloc() except that it allows you
- to name the pointer.
-*/
-void *talloc_named_const(const void *context, size_t size, const char *name)
-{
- return _talloc_named_const(context, size, name);
-}
-
-/*
- free a talloc pointer. This also frees all child pointers of this
- pointer recursively
-
- return 0 if the memory is actually freed, otherwise -1. The memory
- will not be freed if the ref_count is > 1 or the destructor (if
- any) returns non-zero
-*/
-int _talloc_free(void *ptr, const char *location)
-{
- struct talloc_chunk *tc;
-
- if (unlikely(ptr == NULL)) {
- return -1;
- }
-
- tc = talloc_chunk_from_ptr(ptr);
-
- if (unlikely(tc->refs != NULL)) {
- struct talloc_reference_handle *h;
-
- talloc_log("ERROR: talloc_free with references at %s\n",
- location);
-
- for (h=tc->refs; h; h=h->next) {
- talloc_log("\treference at %s\n",
- h->location);
- }
- return -1;
- }
-
- return _talloc_free_internal(ptr, location);
-}
-
-
-
-/*
- A talloc version of realloc. The context argument is only used if
- ptr is NULL
-*/
-void *_talloc_realloc(const void *context, void *ptr, size_t size, const char *name)
-{
- struct talloc_chunk *tc;
- void *new_ptr;
- bool malloced = false;
-
- /* size zero is equivalent to free() */
- if (unlikely(size == 0)) {
- talloc_unlink(context, ptr);
- return NULL;
- }
-
- if (unlikely(size >= MAX_TALLOC_SIZE)) {
- return NULL;
- }
-
- /* realloc(NULL) is equivalent to malloc() */
- if (ptr == NULL) {
- return _talloc_named_const(context, size, name);
- }
-
- tc = talloc_chunk_from_ptr(ptr);
-
- /* don't allow realloc on referenced pointers */
- if (unlikely(tc->refs)) {
- return NULL;
- }
-
- /* don't let anybody try to realloc a talloc_pool */
- if (unlikely(tc->flags & TALLOC_FLAG_POOL)) {
- return NULL;
- }
-
- /* don't shrink if we have less than 1k to gain */
- if ((size < tc->size) && ((tc->size - size) < 1024)) {
- tc->size = size;
- return ptr;
- }
-
- /* by resetting magic we catch users of the old memory */
- tc->flags |= TALLOC_FLAG_FREE;
-
-#if ALWAYS_REALLOC
- new_ptr = malloc(size + TC_HDR_SIZE);
- if (new_ptr) {
- memcpy(new_ptr, tc, tc->size + TC_HDR_SIZE);
- free(tc);
- }
-#else
- if (tc->flags & TALLOC_FLAG_POOLMEM) {
-
- new_ptr = talloc_alloc_pool(tc, size + TC_HDR_SIZE);
- *talloc_pool_objectcount((struct talloc_chunk *)
- (tc->pool)) -= 1;
-
- if (new_ptr == NULL) {
- new_ptr = malloc(TC_HDR_SIZE+size);
- malloced = true;
- }
-
- if (new_ptr) {
- memcpy(new_ptr, tc, TALLOC_MIN(tc->size,size) + TC_HDR_SIZE);
- }
- }
- else {
- new_ptr = realloc(tc, size + TC_HDR_SIZE);
- }
-#endif
- if (unlikely(!new_ptr)) {
- tc->flags &= ~TALLOC_FLAG_FREE;
- return NULL;
- }
-
- tc = (struct talloc_chunk *)new_ptr;
- tc->flags &= ~TALLOC_FLAG_FREE;
- if (malloced) {
- tc->flags &= ~TALLOC_FLAG_POOLMEM;
- }
- if (tc->parent) {
- tc->parent->child = tc;
- }
- if (tc->child) {
- tc->child->parent = tc;
- }
-
- if (tc->prev) {
- tc->prev->next = tc;
- }
- if (tc->next) {
- tc->next->prev = tc;
- }
-
- tc->size = size;
- _talloc_set_name_const(TC_PTR_FROM_CHUNK(tc), name);
-
- return TC_PTR_FROM_CHUNK(tc);
-}
-
-/*
- a wrapper around talloc_steal() for situations where you are moving a pointer
- between two structures, and want the old pointer to be set to NULL
-*/
-void *_talloc_move(const void *new_ctx, const void *_pptr)
-{
- const void **pptr = discard_const_p(const void *,_pptr);
- void *ret = talloc_steal(new_ctx, discard_const_p(void, *pptr));
- (*pptr) = NULL;
- return ret;
-}
-
-/*
- return the total size of a talloc pool (subtree)
-*/
-size_t talloc_total_size(const void *ptr)
-{
- size_t total = 0;
- struct talloc_chunk *c, *tc;
-
- if (ptr == NULL) {
- ptr = null_context;
- }
- if (ptr == NULL) {
- return 0;
- }
-
- tc = talloc_chunk_from_ptr(ptr);
-
- if (tc->flags & TALLOC_FLAG_LOOP) {
- return 0;
- }
-
- tc->flags |= TALLOC_FLAG_LOOP;
-
- if (likely(tc->name != TALLOC_MAGIC_REFERENCE)) {
- total = tc->size;
- }
- for (c=tc->child;c;c=c->next) {
- total += talloc_total_size(TC_PTR_FROM_CHUNK(c));
- }
-
- tc->flags &= ~TALLOC_FLAG_LOOP;
-
- return total;
-}
-
-/*
- return the total number of blocks in a talloc pool (subtree)
-*/
-size_t talloc_total_blocks(const void *ptr)
-{
- size_t total = 0;
- struct talloc_chunk *c, *tc;
-
- if (ptr == NULL) {
- ptr = null_context;
- }
- if (ptr == NULL) {
- return 0;
- }
-
- tc = talloc_chunk_from_ptr(ptr);
-
- if (tc->flags & TALLOC_FLAG_LOOP) {
- return 0;
- }
-
- tc->flags |= TALLOC_FLAG_LOOP;
-
- total++;
- for (c=tc->child;c;c=c->next) {
- total += talloc_total_blocks(TC_PTR_FROM_CHUNK(c));
- }
-
- tc->flags &= ~TALLOC_FLAG_LOOP;
-
- return total;
-}
-
-/*
- return the number of external references to a pointer
-*/
-size_t talloc_reference_count(const void *ptr)
-{
- struct talloc_chunk *tc = talloc_chunk_from_ptr(ptr);
- struct talloc_reference_handle *h;
- size_t ret = 0;
-
- for (h=tc->refs;h;h=h->next) {
- ret++;
- }
- return ret;
-}
-
-/*
- report on memory usage by all children of a pointer, giving a full tree view
-*/
-void talloc_report_depth_cb(const void *ptr, int depth, int max_depth,
- void (*callback)(const void *ptr,
- int depth, int max_depth,
- int is_ref,
- void *private_data),
- void *private_data)
-{
- struct talloc_chunk *c, *tc;
-
- if (ptr == NULL) {
- ptr = null_context;
- }
- if (ptr == NULL) return;
-
- tc = talloc_chunk_from_ptr(ptr);
-
- if (tc->flags & TALLOC_FLAG_LOOP) {
- return;
- }
-
- callback(ptr, depth, max_depth, 0, private_data);
-
- if (max_depth >= 0 && depth >= max_depth) {
- return;
- }
-
- tc->flags |= TALLOC_FLAG_LOOP;
- for (c=tc->child;c;c=c->next) {
- if (c->name == TALLOC_MAGIC_REFERENCE) {
- struct talloc_reference_handle *h = (struct talloc_reference_handle *)TC_PTR_FROM_CHUNK(c);
- callback(h->ptr, depth + 1, max_depth, 1, private_data);
- } else {
- talloc_report_depth_cb(TC_PTR_FROM_CHUNK(c), depth + 1, max_depth, callback, private_data);
- }
- }
- tc->flags &= ~TALLOC_FLAG_LOOP;
-}
-
-static void talloc_report_depth_FILE_helper(const void *ptr, int depth, int max_depth, int is_ref, void *_f)
-{
- const char *name = talloc_get_name(ptr);
- FILE *f = (FILE *)_f;
-
- if (is_ref) {
- fprintf(f, "%*sreference to: %s\n", depth*4, "", name);
- return;
- }
-
- if (depth == 0) {
- fprintf(f,"%stalloc report on '%s' (total %6lu bytes in %3lu blocks)\n",
- (max_depth < 0 ? "full " :""), name,
- (unsigned long)talloc_total_size(ptr),
- (unsigned long)talloc_total_blocks(ptr));
- return;
- }
-
- fprintf(f, "%*s%-30s contains %6lu bytes in %3lu blocks (ref %d) %p\n",
- depth*4, "",
- name,
- (unsigned long)talloc_total_size(ptr),
- (unsigned long)talloc_total_blocks(ptr),
- (int)talloc_reference_count(ptr), ptr);
-
-#if 0
- fprintf(f, "content: ");
- if (talloc_total_size(ptr)) {
- int tot = talloc_total_size(ptr);
- int i;
-
- for (i = 0; i < tot; i++) {
- if ((((char *)ptr)[i] > 31) && (((char *)ptr)[i] < 126)) {
- fprintf(f, "%c", ((char *)ptr)[i]);
- } else {
- fprintf(f, "~%02x", ((char *)ptr)[i]);
- }
- }
- }
- fprintf(f, "\n");
-#endif
-}
-
-/*
- report on memory usage by all children of a pointer, giving a full tree view
-*/
-void talloc_report_depth_file(const void *ptr, int depth, int max_depth, FILE *f)
-{
- if (f) {
- talloc_report_depth_cb(ptr, depth, max_depth, talloc_report_depth_FILE_helper, f);
- fflush(f);
- }
-}
-
-/*
- report on memory usage by all children of a pointer, giving a full tree view
-*/
-void talloc_report_full(const void *ptr, FILE *f)
-{
- talloc_report_depth_file(ptr, 0, -1, f);
-}
-
-/*
- report on memory usage by all children of a pointer
-*/
-void talloc_report(const void *ptr, FILE *f)
-{
- talloc_report_depth_file(ptr, 0, 1, f);
-}
-
-/*
- report on any memory hanging off the null context
-*/
-static void talloc_report_null(void)
-{
- if (talloc_total_size(null_context) != 0) {
- talloc_report(null_context, stderr);
- }
-}
-
-/*
- report on any memory hanging off the null context
-*/
-static void talloc_report_null_full(void)
-{
- if (talloc_total_size(null_context) != 0) {
- talloc_report_full(null_context, stderr);
- }
-}
-
-/*
- enable tracking of the NULL context
-*/
-void talloc_enable_null_tracking(void)
-{
- if (null_context == NULL) {
- null_context = _talloc_named_const(NULL, 0, "null_context");
- if (autofree_context != NULL) {
- talloc_reparent(NULL, null_context, autofree_context);
- }
- }
-}
-
-/*
- enable tracking of the NULL context, not moving the autofree context
- into the NULL context. This is needed for the talloc testsuite
-*/
-void talloc_enable_null_tracking_no_autofree(void)
-{
- if (null_context == NULL) {
- null_context = _talloc_named_const(NULL, 0, "null_context");
- }
-}
-
-/*
- disable tracking of the NULL context
-*/
-void talloc_disable_null_tracking(void)
-{
- if (null_context != NULL) {
- /* we have to move any children onto the real NULL
- context */
- struct talloc_chunk *tc, *tc2;
- tc = talloc_chunk_from_ptr(null_context);
- for (tc2 = tc->child; tc2; tc2=tc2->next) {
- if (tc2->parent == tc) tc2->parent = NULL;
- if (tc2->prev == tc) tc2->prev = NULL;
- }
- for (tc2 = tc->next; tc2; tc2=tc2->next) {
- if (tc2->parent == tc) tc2->parent = NULL;
- if (tc2->prev == tc) tc2->prev = NULL;
- }
- tc->child = NULL;
- tc->next = NULL;
- }
- talloc_free(null_context);
- null_context = NULL;
-}
-
-/*
- enable leak reporting on exit
-*/
-void talloc_enable_leak_report(void)
-{
- talloc_enable_null_tracking();
- atexit(talloc_report_null);
-}
-
-/*
- enable full leak reporting on exit
-*/
-void talloc_enable_leak_report_full(void)
-{
- talloc_enable_null_tracking();
- atexit(talloc_report_null_full);
-}
-
-/*
- talloc and zero memory.
-*/
-void *_talloc_zero(const void *ctx, size_t size, const char *name)
-{
- void *p = _talloc_named_const(ctx, size, name);
-
- if (p) {
- memset(p, '\0', size);
- }
-
- return p;
-}
-
-/*
- memdup with a talloc.
-*/
-void *_talloc_memdup(const void *t, const void *p, size_t size, const char *name)
-{
- void *newp = _talloc_named_const(t, size, name);
-
- if (likely(newp)) {
- memcpy(newp, p, size);
- }
-
- return newp;
-}
-
-static inline char *__talloc_strlendup(const void *t, const char *p, size_t len)
-{
- char *ret;
-
- ret = (char *)__talloc(t, len + 1);
- if (unlikely(!ret)) return NULL;
-
- memcpy(ret, p, len);
- ret[len] = 0;
-
- _talloc_set_name_const(ret, ret);
- return ret;
-}
-
-/*
- strdup with a talloc
-*/
-char *talloc_strdup(const void *t, const char *p)
-{
- if (unlikely(!p)) return NULL;
- return __talloc_strlendup(t, p, strlen(p));
-}
-
-/*
- strndup with a talloc
-*/
-char *talloc_strndup(const void *t, const char *p, size_t n)
-{
- if (unlikely(!p)) return NULL;
- return __talloc_strlendup(t, p, strnlen(p, n));
-}
-
-static inline char *__talloc_strlendup_append(char *s, size_t slen,
- const char *a, size_t alen)
-{
- char *ret;
-
- ret = talloc_realloc(NULL, s, char, slen + alen + 1);
- if (unlikely(!ret)) return NULL;
-
- /* append the string and the trailing \0 */
- memcpy(&ret[slen], a, alen);
- ret[slen+alen] = 0;
-
- _talloc_set_name_const(ret, ret);
- return ret;
-}
-
-/*
- * Appends at the end of the string.
- */
-char *talloc_strdup_append(char *s, const char *a)
-{
- if (unlikely(!s)) {
- return talloc_strdup(NULL, a);
- }
-
- if (unlikely(!a)) {
- return s;
- }
-
- return __talloc_strlendup_append(s, strlen(s), a, strlen(a));
-}
-
-/*
- * Appends at the end of the talloc'ed buffer,
- * not the end of the string.
- */
-char *talloc_strdup_append_buffer(char *s, const char *a)
-{
- size_t slen;
-
- if (unlikely(!s)) {
- return talloc_strdup(NULL, a);
- }
-
- if (unlikely(!a)) {
- return s;
- }
-
- slen = talloc_get_size(s);
- if (likely(slen > 0)) {
- slen--;
- }
-
- return __talloc_strlendup_append(s, slen, a, strlen(a));
-}
-
-/*
- * Appends at the end of the string.
- */
-char *talloc_strndup_append(char *s, const char *a, size_t n)
-{
- if (unlikely(!s)) {
- return talloc_strdup(NULL, a);
- }
-
- if (unlikely(!a)) {
- return s;
- }
-
- return __talloc_strlendup_append(s, strlen(s), a, strnlen(a, n));
-}
-
-/*
- * Appends at the end of the talloc'ed buffer,
- * not the end of the string.
- */
-char *talloc_strndup_append_buffer(char *s, const char *a, size_t n)
-{
- size_t slen;
-
- if (unlikely(!s)) {
- return talloc_strdup(NULL, a);
- }
-
- if (unlikely(!a)) {
- return s;
- }
-
- slen = talloc_get_size(s);
- if (likely(slen > 0)) {
- slen--;
- }
-
- return __talloc_strlendup_append(s, slen, a, strnlen(a, n));
-}
-
-#ifndef va_copy
-#ifdef HAVE___VA_COPY
-#define va_copy(dest, src) __va_copy(dest, src)
-#else
-#define va_copy(dest, src) (dest) = (src)
-#endif
-#endif
-
-char *talloc_vasprintf(const void *t, const char *fmt, va_list ap)
-{
- int len;
- char *ret;
- va_list ap2;
- char c;
-
- /* this call looks strange, but it makes it work on older solaris boxes */
- va_copy(ap2, ap);
- #ifdef _MSC_VER
- /* MSVC runtime needs to use _vcsprintf to return buffer size; vsnprintf would return -1 */
- len = _vscprintf(fmt, ap2);
- #else
- len = vsnprintf(&c, 1, fmt, ap2);
- #endif
- va_end(ap2);
- if (unlikely(len < 0)) {
- return NULL;
- }
-
- ret = (char *)__talloc(t, len+1);
- if (unlikely(!ret)) return NULL;
-
- va_copy(ap2, ap);
- vsnprintf(ret, len+1, fmt, ap2);
- va_end(ap2);
-
- _talloc_set_name_const(ret, ret);
- return ret;
-}
-
-
-/*
- Perform string formatting, and return a pointer to newly allocated
- memory holding the result, inside a memory pool.
- */
-char *talloc_asprintf(const void *t, const char *fmt, ...)
-{
- va_list ap;
- char *ret;
-
- va_start(ap, fmt);
- ret = talloc_vasprintf(t, fmt, ap);
- va_end(ap);
- return ret;
-}
-
-static inline char *__talloc_vaslenprintf_append(char *s, size_t slen,
- const char *fmt, va_list ap)
- PRINTF_ATTRIBUTE(3,0);
-
-static inline char *__talloc_vaslenprintf_append(char *s, size_t slen,
- const char *fmt, va_list ap)
-{
- ssize_t alen;
- va_list ap2;
- char c;
-
- va_copy(ap2, ap);
- #ifdef _MSC_VER
- /* MSVC runtime needs to use _vcsprintf to return buffer size; vsnprintf would return -1 */
- alen = _vscprintf(fmt, ap2);
- #else
- alen = vsnprintf(&c, 1, fmt, ap2);
- #endif
- va_end(ap2);
-
- if (alen <= 0) {
- /* Either the vsnprintf failed or the format resulted in
- * no characters being formatted. In the former case, we
- * ought to return NULL, in the latter we ought to return
- * the original string. Most current callers of this
- * function expect it to never return NULL.
- */
- return s;
- }
-
- s = talloc_realloc(NULL, s, char, slen + alen + 1);
- if (!s) return NULL;
-
- va_copy(ap2, ap);
- vsnprintf(s + slen, alen + 1, fmt, ap2);
- va_end(ap2);
-
- _talloc_set_name_const(s, s);
- return s;
-}
-
-/**
- * Realloc @p s to append the formatted result of @p fmt and @p ap,
- * and return @p s, which may have moved. Good for gradually
- * accumulating output into a string buffer. Appends at the end
- * of the string.
- **/
-char *talloc_vasprintf_append(char *s, const char *fmt, va_list ap)
-{
- if (unlikely(!s)) {
- return talloc_vasprintf(NULL, fmt, ap);
- }
-
- return __talloc_vaslenprintf_append(s, strlen(s), fmt, ap);
-}
-
-/**
- * Realloc @p s to append the formatted result of @p fmt and @p ap,
- * and return @p s, which may have moved. Always appends at the
- * end of the talloc'ed buffer, not the end of the string.
- **/
-char *talloc_vasprintf_append_buffer(char *s, const char *fmt, va_list ap)
-{
- size_t slen;
-
- if (unlikely(!s)) {
- return talloc_vasprintf(NULL, fmt, ap);
- }
-
- slen = talloc_get_size(s);
- if (likely(slen > 0)) {
- slen--;
- }
-
- return __talloc_vaslenprintf_append(s, slen, fmt, ap);
-}
-
-/*
- Realloc @p s to append the formatted result of @p fmt and return @p
- s, which may have moved. Good for gradually accumulating output
- into a string buffer.
- */
-char *talloc_asprintf_append(char *s, const char *fmt, ...)
-{
- va_list ap;
-
- va_start(ap, fmt);
- s = talloc_vasprintf_append(s, fmt, ap);
- va_end(ap);
- return s;
-}
-
-/*
- Realloc @p s to append the formatted result of @p fmt and return @p
- s, which may have moved. Good for gradually accumulating output
- into a buffer.
- */
-char *talloc_asprintf_append_buffer(char *s, const char *fmt, ...)
-{
- va_list ap;
-
- va_start(ap, fmt);
- s = talloc_vasprintf_append_buffer(s, fmt, ap);
- va_end(ap);
- return s;
-}
-
-/*
- alloc an array, checking for integer overflow in the array size
-*/
-void *_talloc_array(const void *ctx, size_t el_size, unsigned count, const char *name)
-{
- if (count >= MAX_TALLOC_SIZE/el_size) {
- return NULL;
- }
- return _talloc_named_const(ctx, el_size * count, name);
-}
-
-/*
- alloc an zero array, checking for integer overflow in the array size
-*/
-void *_talloc_zero_array(const void *ctx, size_t el_size, unsigned count, const char *name)
-{
- if (count >= MAX_TALLOC_SIZE/el_size) {
- return NULL;
- }
- return _talloc_zero(ctx, el_size * count, name);
-}
-
-/*
- realloc an array, checking for integer overflow in the array size
-*/
-void *_talloc_realloc_array(const void *ctx, void *ptr, size_t el_size, unsigned count, const char *name)
-{
- if (count >= MAX_TALLOC_SIZE/el_size) {
- return NULL;
- }
- return _talloc_realloc(ctx, ptr, el_size * count, name);
-}
-
-/*
- a function version of talloc_realloc(), so it can be passed as a function pointer
- to libraries that want a realloc function (a realloc function encapsulates
- all the basic capabilities of an allocation library, which is why this is useful)
-*/
-void *talloc_realloc_fn(const void *context, void *ptr, size_t size)
-{
- return _talloc_realloc(context, ptr, size, NULL);
-}
-
-
-static int talloc_autofree_destructor(void *ptr)
-{
- autofree_context = NULL;
- return 0;
-}
-
-static void talloc_autofree(void)
-{
- talloc_free(autofree_context);
-}
-
-/*
- return a context which will be auto-freed on exit
- this is useful for reducing the noise in leak reports
-*/
-void *talloc_autofree_context(void)
-{
- if (autofree_context == NULL) {
- autofree_context = _talloc_named_const(NULL, 0, "autofree_context");
- talloc_set_destructor(autofree_context, talloc_autofree_destructor);
- atexit(talloc_autofree);
- }
- return autofree_context;
-}
-
-size_t talloc_get_size(const void *context)
-{
- struct talloc_chunk *tc;
-
- if (context == NULL) {
- context = null_context;
- }
- if (context == NULL) {
- return 0;
- }
-
- tc = talloc_chunk_from_ptr(context);
-
- return tc->size;
-}
-
-/*
- find a parent of this context that has the given name, if any
-*/
-void *talloc_find_parent_byname(const void *context, const char *name)
-{
- struct talloc_chunk *tc;
-
- if (context == NULL) {
- return NULL;
- }
-
- tc = talloc_chunk_from_ptr(context);
- while (tc) {
- if (tc->name && strcmp(tc->name, name) == 0) {
- return TC_PTR_FROM_CHUNK(tc);
- }
- while (tc && tc->prev) tc = tc->prev;
- if (tc) {
- tc = tc->parent;
- }
- }
- return NULL;
-}
-
-/*
- show the parentage of a context
-*/
-void talloc_show_parents(const void *context, FILE *file)
-{
- struct talloc_chunk *tc;
-
- if (context == NULL) {
- fprintf(file, "talloc no parents for NULL\n");
- return;
- }
-
- tc = talloc_chunk_from_ptr(context);
- fprintf(file, "talloc parents of '%s'\n", talloc_get_name(context));
- while (tc) {
- fprintf(file, "\t'%s'\n", talloc_get_name(TC_PTR_FROM_CHUNK(tc)));
- while (tc && tc->prev) tc = tc->prev;
- if (tc) {
- tc = tc->parent;
- }
- }
- fflush(file);
-}
-
-/*
- return 1 if ptr is a parent of context
-*/
-int talloc_is_parent(const void *context, const void *ptr)
-{
- struct talloc_chunk *tc;
-
- if (context == NULL) {
- return 0;
- }
-
- tc = talloc_chunk_from_ptr(context);
- while (tc) {
- if (TC_PTR_FROM_CHUNK(tc) == ptr) return 1;
- while (tc && tc->prev) tc = tc->prev;
- if (tc) {
- tc = tc->parent;
- }
- }
- return 0;
-}
diff --git a/src/talloc/talloc.def b/src/talloc/talloc.def
deleted file mode 100644
index 13d7a159cef..00000000000
--- a/src/talloc/talloc.def
+++ /dev/null
@@ -1,63 +0,0 @@
-EXPORTS
- _talloc
- _talloc_array
- _talloc_free
- _talloc_get_type_abort
- _talloc_memdup
- _talloc_move
- _talloc_realloc
- _talloc_realloc_array
- _talloc_reference_loc
- _talloc_set_destructor
- _talloc_steal_loc
- _talloc_zero
- _talloc_zero_array
- talloc_asprintf
- talloc_asprintf_append
- talloc_asprintf_append_buffer
- talloc_autofree_context
- talloc_check_name
- talloc_disable_null_tracking
- talloc_enable_leak_report
- talloc_enable_leak_report_full
- talloc_enable_null_tracking
- talloc_enable_null_tracking_no_autofree
- talloc_find_parent_byname
- talloc_free_children
- talloc_get_name
- talloc_get_size
- talloc_increase_ref_count
- talloc_init
- talloc_is_parent
- talloc_named
- talloc_named_const
- talloc_parent
- talloc_parent_name
- talloc_pool
- talloc_realloc_fn
- talloc_reference_count
- talloc_reparent
- talloc_report
- talloc_report_depth_cb
- talloc_report_depth_file
- talloc_report_full
- talloc_set_abort_fn
- talloc_set_log_fn
- talloc_set_log_stderr
- talloc_set_name
- talloc_set_name_const
- talloc_show_parents
- talloc_strdup
- talloc_strdup_append
- talloc_strdup_append_buffer
- talloc_strndup
- talloc_strndup_append
- talloc_strndup_append_buffer
- talloc_total_blocks
- talloc_total_size
- talloc_unlink
- talloc_vasprintf
- talloc_vasprintf_append
- talloc_vasprintf_append_buffer
- talloc_version_major
- talloc_version_minor
diff --git a/src/talloc/talloc.h b/src/talloc/talloc.h
deleted file mode 100644
index f549a17fba2..00000000000
--- a/src/talloc/talloc.h
+++ /dev/null
@@ -1,202 +0,0 @@
-#ifndef _TALLOC_H_
-#define _TALLOC_H_
-/*
- Unix SMB/CIFS implementation.
- Samba temporary memory allocation functions
-
- Copyright (C) Andrew Tridgell 2004-2005
- Copyright (C) Stefan Metzmacher 2006
-
- ** NOTE! The following LGPL license applies to the talloc
- ** library. This does NOT imply that all of Samba is released
- ** under the LGPL
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 3 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with this library; if not, see <http://www.gnu.org/licenses/>.
-*/
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <stdarg.h>
-
-#define TALLOC_VERSION_MAJOR 2
-#define TALLOC_VERSION_MINOR 0
-
-int talloc_version_major(void);
-int talloc_version_minor(void);
-
-/* this is only needed for compatibility with the old talloc */
-typedef void TALLOC_CTX;
-
-/*
- this uses a little trick to allow __LINE__ to be stringified
-*/
-#ifndef __location__
-#define __TALLOC_STRING_LINE1__(s) #s
-#define __TALLOC_STRING_LINE2__(s) __TALLOC_STRING_LINE1__(s)
-#define __TALLOC_STRING_LINE3__ __TALLOC_STRING_LINE2__(__LINE__)
-#define __location__ __FILE__ ":" __TALLOC_STRING_LINE3__
-#endif
-
-#ifndef TALLOC_DEPRECATED
-#define TALLOC_DEPRECATED 0
-#endif
-
-#ifndef PRINTF_ATTRIBUTE
-#if (__GNUC__ >= 3)
-/** Use gcc attribute to check printf fns. a1 is the 1-based index of
- * the parameter containing the format, and a2 the index of the first
- * argument. Note that some gcc 2.x versions don't handle this
- * properly **/
-#define PRINTF_ATTRIBUTE(a1, a2) __attribute__ ((format (__printf__, a1, a2)))
-#else
-#define PRINTF_ATTRIBUTE(a1, a2)
-#endif
-#endif
-
-/* try to make talloc_set_destructor() and talloc_steal() type safe,
- if we have a recent gcc */
-#if (__GNUC__ >= 3)
-#define _TALLOC_TYPEOF(ptr) __typeof__(ptr)
-#define talloc_set_destructor(ptr, function) \
- do { \
- int (*_talloc_destructor_fn)(_TALLOC_TYPEOF(ptr)) = (function); \
- _talloc_set_destructor((ptr), (int (*)(void *))_talloc_destructor_fn); \
- } while(0)
-/* this extremely strange macro is to avoid some braindamaged warning
- stupidity in gcc 4.1.x */
-#define talloc_steal(ctx, ptr) ({ _TALLOC_TYPEOF(ptr) __talloc_steal_ret = (_TALLOC_TYPEOF(ptr))_talloc_steal_loc((ctx),(ptr), __location__); __talloc_steal_ret; })
-#else
-#define talloc_set_destructor(ptr, function) \
- _talloc_set_destructor((ptr), (int (*)(void *))(function))
-#define _TALLOC_TYPEOF(ptr) void *
-#define talloc_steal(ctx, ptr) (_TALLOC_TYPEOF(ptr))_talloc_steal_loc((ctx),(ptr), __location__)
-#endif
-
-#define talloc_reference(ctx, ptr) (_TALLOC_TYPEOF(ptr))_talloc_reference_loc((ctx),(ptr), __location__)
-#define talloc_move(ctx, ptr) (_TALLOC_TYPEOF(*(ptr)))_talloc_move((ctx),(void *)(ptr))
-
-/* useful macros for creating type checked pointers */
-#define talloc(ctx, type) (type *)talloc_named_const(ctx, sizeof(type), #type)
-#define talloc_size(ctx, size) talloc_named_const(ctx, size, __location__)
-#define talloc_ptrtype(ctx, ptr) (_TALLOC_TYPEOF(ptr))talloc_size(ctx, sizeof(*(ptr)))
-
-#define talloc_new(ctx) talloc_named_const(ctx, 0, "talloc_new: " __location__)
-
-#define talloc_zero(ctx, type) (type *)_talloc_zero(ctx, sizeof(type), #type)
-#define talloc_zero_size(ctx, size) _talloc_zero(ctx, size, __location__)
-
-#define talloc_zero_array(ctx, type, count) (type *)_talloc_zero_array(ctx, sizeof(type), count, #type)
-#define talloc_array(ctx, type, count) (type *)_talloc_array(ctx, sizeof(type), count, #type)
-#define talloc_array_size(ctx, size, count) _talloc_array(ctx, size, count, __location__)
-#define talloc_array_ptrtype(ctx, ptr, count) (_TALLOC_TYPEOF(ptr))talloc_array_size(ctx, sizeof(*(ptr)), count)
-#define talloc_array_length(ctx) (talloc_get_size(ctx)/sizeof(*ctx))
-
-#define talloc_realloc(ctx, p, type, count) (type *)_talloc_realloc_array(ctx, p, sizeof(type), count, #type)
-#define talloc_realloc_size(ctx, ptr, size) _talloc_realloc(ctx, ptr, size, __location__)
-
-#define talloc_memdup(t, p, size) _talloc_memdup(t, p, size, __location__)
-
-#define talloc_set_type(ptr, type) talloc_set_name_const(ptr, #type)
-#define talloc_get_type(ptr, type) (type *)talloc_check_name(ptr, #type)
-#define talloc_get_type_abort(ptr, type) (type *)_talloc_get_type_abort(ptr, #type, __location__)
-
-#define talloc_find_parent_bytype(ptr, type) (type *)talloc_find_parent_byname(ptr, #type)
-#define talloc_free(ctx) _talloc_free(ctx, __location__)
-
-
-#if TALLOC_DEPRECATED
-#define talloc_zero_p(ctx, type) talloc_zero(ctx, type)
-#define talloc_p(ctx, type) talloc(ctx, type)
-#define talloc_array_p(ctx, type, count) talloc_array(ctx, type, count)
-#define talloc_realloc_p(ctx, p, type, count) talloc_realloc(ctx, p, type, count)
-#define talloc_destroy(ctx) talloc_free(ctx)
-#define talloc_append_string(c, s, a) (s?talloc_strdup_append(s,a):talloc_strdup(c, a))
-#endif
-
-#define TALLOC_FREE(ctx) do { talloc_free(ctx); ctx=NULL; } while(0)
-
-/* The following definitions come from talloc.c */
-void *_talloc(const void *context, size_t size);
-void *talloc_pool(const void *context, size_t size);
-void _talloc_set_destructor(const void *ptr, int (*_destructor)(void *));
-int talloc_increase_ref_count(const void *ptr);
-size_t talloc_reference_count(const void *ptr);
-void *_talloc_reference_loc(const void *context, const void *ptr, const char *location);
-int talloc_unlink(const void *context, void *ptr);
-const char *talloc_set_name(const void *ptr, const char *fmt, ...) PRINTF_ATTRIBUTE(2,3);
-void talloc_set_name_const(const void *ptr, const char *name);
-void *talloc_named(const void *context, size_t size,
- const char *fmt, ...) PRINTF_ATTRIBUTE(3,4);
-void *talloc_named_const(const void *context, size_t size, const char *name);
-const char *talloc_get_name(const void *ptr);
-void *talloc_check_name(const void *ptr, const char *name);
-void *_talloc_get_type_abort(const void *ptr, const char *name, const char *location);
-void *talloc_parent(const void *ptr);
-const char *talloc_parent_name(const void *ptr);
-void *talloc_init(const char *fmt, ...) PRINTF_ATTRIBUTE(1,2);
-int _talloc_free(void *ptr, const char *location);
-void talloc_free_children(void *ptr);
-void *_talloc_realloc(const void *context, void *ptr, size_t size, const char *name);
-void *_talloc_steal_loc(const void *new_ctx, const void *ptr, const char *location);
-void *talloc_reparent(const void *old_parent, const void *new_parent, const void *ptr);
-void *_talloc_move(const void *new_ctx, const void *pptr);
-size_t talloc_total_size(const void *ptr);
-size_t talloc_total_blocks(const void *ptr);
-void talloc_report_depth_cb(const void *ptr, int depth, int max_depth,
- void (*callback)(const void *ptr,
- int depth, int max_depth,
- int is_ref,
- void *private_data),
- void *private_data);
-void talloc_report_depth_file(const void *ptr, int depth, int max_depth, FILE *f);
-void talloc_report_full(const void *ptr, FILE *f);
-void talloc_report(const void *ptr, FILE *f);
-void talloc_enable_null_tracking(void);
-void talloc_enable_null_tracking_no_autofree(void);
-void talloc_disable_null_tracking(void);
-void talloc_enable_leak_report(void);
-void talloc_enable_leak_report_full(void);
-void *_talloc_zero(const void *ctx, size_t size, const char *name);
-void *_talloc_memdup(const void *t, const void *p, size_t size, const char *name);
-void *_talloc_array(const void *ctx, size_t el_size, unsigned count, const char *name);
-void *_talloc_zero_array(const void *ctx, size_t el_size, unsigned count, const char *name);
-void *_talloc_realloc_array(const void *ctx, void *ptr, size_t el_size, unsigned count, const char *name);
-void *talloc_realloc_fn(const void *context, void *ptr, size_t size);
-void *talloc_autofree_context(void);
-size_t talloc_get_size(const void *ctx);
-void *talloc_find_parent_byname(const void *ctx, const char *name);
-void talloc_show_parents(const void *context, FILE *file);
-int talloc_is_parent(const void *context, const void *ptr);
-
-char *talloc_strdup(const void *t, const char *p);
-char *talloc_strdup_append(char *s, const char *a);
-char *talloc_strdup_append_buffer(char *s, const char *a);
-
-char *talloc_strndup(const void *t, const char *p, size_t n);
-char *talloc_strndup_append(char *s, const char *a, size_t n);
-char *talloc_strndup_append_buffer(char *s, const char *a, size_t n);
-
-char *talloc_vasprintf(const void *t, const char *fmt, va_list ap) PRINTF_ATTRIBUTE(2,0);
-char *talloc_vasprintf_append(char *s, const char *fmt, va_list ap) PRINTF_ATTRIBUTE(2,0);
-char *talloc_vasprintf_append_buffer(char *s, const char *fmt, va_list ap) PRINTF_ATTRIBUTE(2,0);
-
-char *talloc_asprintf(const void *t, const char *fmt, ...) PRINTF_ATTRIBUTE(2,3);
-char *talloc_asprintf_append(char *s, const char *fmt, ...) PRINTF_ATTRIBUTE(2,3);
-char *talloc_asprintf_append_buffer(char *s, const char *fmt, ...) PRINTF_ATTRIBUTE(2,3);
-
-void talloc_set_abort_fn(void (*abort_fn)(const char *reason));
-void talloc_set_log_fn(void (*log_fn)(const char *message));
-void talloc_set_log_stderr(void);
-
-#endif
diff --git a/src/talloc/talloc_guide.txt b/src/talloc/talloc_guide.txt
deleted file mode 100644
index 01de806662d..00000000000
--- a/src/talloc/talloc_guide.txt
+++ /dev/null
@@ -1,757 +0,0 @@
-Using talloc in Samba4
-======================
-
-.. contents::
-
-Andrew Tridgell
-August 2009
-
-The most current version of this document is available at
- http://samba.org/ftp/unpacked/talloc/talloc_guide.txt
-
-If you are used to the "old" talloc from Samba3 before 3.0.20 then please read
-this carefully, as talloc has changed a lot. With 3.0.20 (or 3.0.14?) the
-Samba4 talloc has been ported back to Samba3, so this guide applies to both.
-
-The new talloc is a hierarchical, reference counted memory pool system
-with destructors. Quite a mouthful really, but not too bad once you
-get used to it.
-
-Perhaps the biggest change from Samba3 is that there is no distinction
-between a "talloc context" and a "talloc pointer". Any pointer
-returned from talloc() is itself a valid talloc context. This means
-you can do this::
-
- struct foo *X = talloc(mem_ctx, struct foo);
- X->name = talloc_strdup(X, "foo");
-
-and the pointer X->name would be a "child" of the talloc context "X"
-which is itself a child of mem_ctx. So if you do talloc_free(mem_ctx)
-then it is all destroyed, whereas if you do talloc_free(X) then just X
-and X->name are destroyed, and if you do talloc_free(X->name) then
-just the name element of X is destroyed.
-
-If you think about this, then what this effectively gives you is an
-n-ary tree, where you can free any part of the tree with
-talloc_free().
-
-If you find this confusing, then I suggest you run the testsuite to
-watch talloc in action. You may also like to add your own tests to
-testsuite.c to clarify how some particular situation is handled.
-
-
-Performance
------------
-
-All the additional features of talloc() over malloc() do come at a
-price. We have a simple performance test in Samba4 that measures
-talloc() versus malloc() performance, and it seems that talloc() is
-about 4% slower than malloc() on my x86 Debian Linux box. For Samba,
-the great reduction in code complexity that we get by using talloc
-makes this worthwhile, especially as the total overhead of
-talloc/malloc in Samba is already quite small.
-
-
-talloc API
-----------
-
-The following is a complete guide to the talloc API. Read it all at
-least twice.
-
-Multi-threading
----------------
-
-talloc itself does not deal with threads. It is thread-safe (assuming
-the underlying "malloc" is), as long as each thread uses different
-memory contexts.
-If two threads uses the same context then they need to synchronize in
-order to be safe. In particular:
-- when using talloc_enable_leak_report(), giving directly NULL as a
-parent context implicitly refers to a hidden "null context" global
-variable, so this should not be used in a multi-threaded environment
-without proper synchronization ;
-- the context returned by talloc_autofree_context() is also global so
-shouldn't be used by several threads simultaneously without
-synchronization.
-
-
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-(type *)talloc(const void *context, type);
-
-The talloc() macro is the core of the talloc library. It takes a
-memory context and a type, and returns a pointer to a new area of
-memory of the given type.
-
-The returned pointer is itself a talloc context, so you can use it as
-the context argument to more calls to talloc if you wish.
-
-The returned pointer is a "child" of the supplied context. This means
-that if you talloc_free() the context then the new child disappears as
-well. Alternatively you can free just the child.
-
-The context argument to talloc() can be NULL, in which case a new top
-level context is created.
-
-
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-void *talloc_size(const void *context, size_t size);
-
-The function talloc_size() should be used when you don't have a
-convenient type to pass to talloc(). Unlike talloc(), it is not type
-safe (as it returns a void *), so you are on your own for type checking.
-
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-(typeof(ptr)) talloc_ptrtype(const void *ctx, ptr);
-
-The talloc_ptrtype() macro should be used when you have a pointer and
-want to allocate memory to point at with this pointer. When compiling
-with gcc >= 3 it is typesafe. Note this is a wrapper of talloc_size()
-and talloc_get_name() will return the current location in the source file.
-and not the type.
-
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-int talloc_free(void *ptr);
-
-The talloc_free() function frees a piece of talloc memory, and all its
-children. You can call talloc_free() on any pointer returned by
-talloc().
-
-The return value of talloc_free() indicates success or failure, with 0
-returned for success and -1 for failure. The only possible failure
-condition is if the pointer had a destructor attached to it and the
-destructor returned -1. See talloc_set_destructor() for details on
-destructors.
-
-If this pointer has an additional parent when talloc_free() is called
-then the memory is not actually released, but instead the most
-recently established parent is destroyed. See talloc_reference() for
-details on establishing additional parents.
-
-For more control on which parent is removed, see talloc_unlink()
-
-talloc_free() operates recursively on its children.
-
-From the 2.0 version of talloc, as a special case, talloc_free() is
-refused on pointers that have more than one parent, as talloc would
-have no way of knowing which parent should be removed. To free a
-pointer that has more than one parent please use talloc_unlink().
-
-To help you find problems in your code caused by this behaviour, if
-you do try and free a pointer with more than one parent then the
-talloc logging function will be called to give output like this:
-
- ERROR: talloc_free with references at some_dir/source/foo.c:123
- reference at some_dir/source/other.c:325
- reference at some_dir/source/third.c:121
-
-Please see the documentation for talloc_set_log_fn() and
-talloc_set_log_stderr() for more information on talloc logging
-functions.
-
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-int talloc_free_children(void *ptr);
-
-The talloc_free_children() walks along the list of all children of a
-talloc context and talloc_free()s only the children, not the context
-itself.
-
-
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-void *talloc_reference(const void *context, const void *ptr);
-
-The talloc_reference() function makes "context" an additional parent
-of "ptr".
-
-The return value of talloc_reference() is always the original pointer
-"ptr", unless talloc ran out of memory in creating the reference in
-which case it will return NULL (each additional reference consumes
-around 48 bytes of memory on intel x86 platforms).
-
-If "ptr" is NULL, then the function is a no-op, and simply returns NULL.
-
-After creating a reference you can free it in one of the following
-ways:
-
- - you can talloc_free() any parent of the original pointer. That
- will reduce the number of parents of this pointer by 1, and will
- cause this pointer to be freed if it runs out of parents.
-
- - you can talloc_free() the pointer itself. That will destroy the
- most recently established parent to the pointer and leave the
- pointer as a child of its current parent.
-
-For more control on which parent to remove, see talloc_unlink()
-
-
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-int talloc_unlink(const void *context, const void *ptr);
-
-The talloc_unlink() function removes a specific parent from ptr. The
-context passed must either be a context used in talloc_reference()
-with this pointer, or must be a direct parent of ptr.
-
-Note that if the parent has already been removed using talloc_free()
-then this function will fail and will return -1. Likewise, if "ptr"
-is NULL, then the function will make no modifications and return -1.
-
-Usually you can just use talloc_free() instead of talloc_unlink(), but
-sometimes it is useful to have the additional control on which parent
-is removed.
-
-
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-void talloc_set_destructor(const void *ptr, int (*destructor)(void *));
-
-The function talloc_set_destructor() sets the "destructor" for the
-pointer "ptr". A destructor is a function that is called when the
-memory used by a pointer is about to be released. The destructor
-receives the pointer as an argument, and should return 0 for success
-and -1 for failure.
-
-The destructor can do anything it wants to, including freeing other
-pieces of memory. A common use for destructors is to clean up
-operating system resources (such as open file descriptors) contained
-in the structure the destructor is placed on.
-
-You can only place one destructor on a pointer. If you need more than
-one destructor then you can create a zero-length child of the pointer
-and place an additional destructor on that.
-
-To remove a destructor call talloc_set_destructor() with NULL for the
-destructor.
-
-If your destructor attempts to talloc_free() the pointer that it is
-the destructor for then talloc_free() will return -1 and the free will
-be ignored. This would be a pointless operation anyway, as the
-destructor is only called when the memory is just about to go away.
-
-
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-int talloc_increase_ref_count(const void *ptr);
-
-The talloc_increase_ref_count(ptr) function is exactly equivalent to:
-
- talloc_reference(NULL, ptr);
-
-You can use either syntax, depending on which you think is clearer in
-your code.
-
-It returns 0 on success and -1 on failure.
-
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-size_t talloc_reference_count(const void *ptr);
-
-Return the number of references to the pointer.
-
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-void talloc_set_name(const void *ptr, const char *fmt, ...);
-
-Each talloc pointer has a "name". The name is used principally for
-debugging purposes, although it is also possible to set and get the
-name on a pointer in as a way of "marking" pointers in your code.
-
-The main use for names on pointer is for "talloc reports". See
-talloc_report() and talloc_report_full() for details. Also see
-talloc_enable_leak_report() and talloc_enable_leak_report_full().
-
-The talloc_set_name() function allocates memory as a child of the
-pointer. It is logically equivalent to:
- talloc_set_name_const(ptr, talloc_asprintf(ptr, fmt, ...));
-
-Note that multiple calls to talloc_set_name() will allocate more
-memory without releasing the name. All of the memory is released when
-the ptr is freed using talloc_free().
-
-
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-void talloc_set_name_const(const void *ptr, const char *name);
-
-The function talloc_set_name_const() is just like talloc_set_name(),
-but it takes a string constant, and is much faster. It is extensively
-used by the "auto naming" macros, such as talloc_p().
-
-This function does not allocate any memory. It just copies the
-supplied pointer into the internal representation of the talloc
-ptr. This means you must not pass a name pointer to memory that will
-disappear before the ptr is freed with talloc_free().
-
-
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-void *talloc_named(const void *context, size_t size, const char *fmt, ...);
-
-The talloc_named() function creates a named talloc pointer. It is
-equivalent to:
-
- ptr = talloc_size(context, size);
- talloc_set_name(ptr, fmt, ....);
-
-
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-void *talloc_named_const(const void *context, size_t size, const char *name);
-
-This is equivalent to::
-
- ptr = talloc_size(context, size);
- talloc_set_name_const(ptr, name);
-
-
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-const char *talloc_get_name(const void *ptr);
-
-This returns the current name for the given talloc pointer. See
-talloc_set_name() for details.
-
-
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-void *talloc_init(const char *fmt, ...);
-
-This function creates a zero length named talloc context as a top
-level context. It is equivalent to::
-
- talloc_named(NULL, 0, fmt, ...);
-
-
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-void *talloc_new(void *ctx);
-
-This is a utility macro that creates a new memory context hanging
-off an exiting context, automatically naming it "talloc_new: __location__"
-where __location__ is the source line it is called from. It is
-particularly useful for creating a new temporary working context.
-
-
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-(type *)talloc_realloc(const void *context, void *ptr, type, count);
-
-The talloc_realloc() macro changes the size of a talloc
-pointer. The "count" argument is the number of elements of type "type"
-that you want the resulting pointer to hold.
-
-talloc_realloc() has the following equivalences::
-
- talloc_realloc(context, NULL, type, 1) ==> talloc(context, type);
- talloc_realloc(context, NULL, type, N) ==> talloc_array(context, type, N);
- talloc_realloc(context, ptr, type, 0) ==> talloc_free(ptr);
-
-The "context" argument is only used if "ptr" is NULL, otherwise it is
-ignored.
-
-talloc_realloc() returns the new pointer, or NULL on failure. The call
-will fail either due to a lack of memory, or because the pointer has
-more than one parent (see talloc_reference()).
-
-
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-void *talloc_realloc_size(const void *context, void *ptr, size_t size);
-
-the talloc_realloc_size() function is useful when the type is not
-known so the typesafe talloc_realloc() cannot be used.
-
-
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-void *talloc_steal(const void *new_ctx, const void *ptr);
-
-The talloc_steal() function changes the parent context of a talloc
-pointer. It is typically used when the context that the pointer is
-currently a child of is going to be freed and you wish to keep the
-memory for a longer time.
-
-The talloc_steal() function returns the pointer that you pass it. It
-does not have any failure modes.
-
-NOTE: It is possible to produce loops in the parent/child relationship
-if you are not careful with talloc_steal(). No guarantees are provided
-as to your sanity or the safety of your data if you do this.
-
-talloc_steal (new_ctx, NULL) will return NULL with no sideeffects.
-
-Note that if you try and call talloc_steal() on a pointer that has
-more than one parent then the result is ambiguous. Talloc will choose
-to remove the parent that is currently indicated by talloc_parent()
-and replace it with the chosen parent. You will also get a message
-like this via the talloc logging functions:
-
- WARNING: talloc_steal with references at some_dir/source/foo.c:123
- reference at some_dir/source/other.c:325
- reference at some_dir/source/third.c:121
-
-To unambiguously change the parent of a pointer please see the
-function talloc_reparent(). See the talloc_set_log_fn() documentation
-for more information on talloc logging.
-
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-void *talloc_reparent(const void *old_parent, const void *new_parent, const void *ptr);
-
-The talloc_reparent() function changes the parent context of a talloc
-pointer. It is typically used when the context that the pointer is
-currently a child of is going to be freed and you wish to keep the
-memory for a longer time.
-
-The talloc_reparent() function returns the pointer that you pass it. It
-does not have any failure modes.
-
-The difference between talloc_reparent() and talloc_steal() is that
-talloc_reparent() can specify which parent you wish to change. This is
-useful when a pointer has multiple parents via references.
-
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-void *talloc_parent(const void *ptr);
-
-The talloc_parent() function returns the current talloc parent. This
-is usually the pointer under which this memory was originally created,
-but it may have changed due to a talloc_steal() or talloc_reparent()
-
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-size_t talloc_total_size(const void *ptr);
-
-The talloc_total_size() function returns the total size in bytes used
-by this pointer and all child pointers. Mostly useful for debugging.
-
-Passing NULL is allowed, but it will only give a meaningful result if
-talloc_enable_leak_report() or talloc_enable_leak_report_full() has
-been called.
-
-
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-size_t talloc_total_blocks(const void *ptr);
-
-The talloc_total_blocks() function returns the total memory block
-count used by this pointer and all child pointers. Mostly useful for
-debugging.
-
-Passing NULL is allowed, but it will only give a meaningful result if
-talloc_enable_leak_report() or talloc_enable_leak_report_full() has
-been called.
-
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-void talloc_report_depth_cb(const void *ptr, int depth, int max_depth,
- void (*callback)(const void *ptr,
- int depth, int max_depth,
- int is_ref,
- void *priv),
- void *priv);
-
-This provides a more flexible reports than talloc_report(). It
-will recursively call the callback for the entire tree of memory
-referenced by the pointer. References in the tree are passed with
-is_ref = 1 and the pointer that is referenced.
-
-You can pass NULL for the pointer, in which case a report is
-printed for the top level memory context, but only if
-talloc_enable_leak_report() or talloc_enable_leak_report_full()
-has been called.
-
-The recursion is stopped when depth >= max_depth.
-max_depth = -1 means only stop at leaf nodes.
-
-
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-void talloc_report_depth_file(const void *ptr, int depth, int max_depth, FILE *f);
-
-This provides a more flexible reports than talloc_report(). It
-will let you specify the depth and max_depth.
-
-
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-void talloc_report(const void *ptr, FILE *f);
-
-The talloc_report() function prints a summary report of all memory
-used by ptr. One line of report is printed for each immediate child of
-ptr, showing the total memory and number of blocks used by that child.
-
-You can pass NULL for the pointer, in which case a report is printed
-for the top level memory context, but only if
-talloc_enable_leak_report() or talloc_enable_leak_report_full() has
-been called.
-
-
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-void talloc_report_full(const void *ptr, FILE *f);
-
-This provides a more detailed report than talloc_report(). It will
-recursively print the ensire tree of memory referenced by the
-pointer. References in the tree are shown by giving the name of the
-pointer that is referenced.
-
-You can pass NULL for the pointer, in which case a report is printed
-for the top level memory context, but only if
-talloc_enable_leak_report() or talloc_enable_leak_report_full() has
-been called.
-
-
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-void talloc_enable_leak_report(void);
-
-This enables calling of talloc_report(NULL, stderr) when the program
-exits. In Samba4 this is enabled by using the --leak-report command
-line option.
-
-For it to be useful, this function must be called before any other
-talloc function as it establishes a "null context" that acts as the
-top of the tree. If you don't call this function first then passing
-NULL to talloc_report() or talloc_report_full() won't give you the
-full tree printout.
-
-Here is a typical talloc report:
-
-talloc report on 'null_context' (total 267 bytes in 15 blocks)
- libcli/auth/spnego_parse.c:55 contains 31 bytes in 2 blocks
- libcli/auth/spnego_parse.c:55 contains 31 bytes in 2 blocks
- iconv(UTF8,CP850) contains 42 bytes in 2 blocks
- libcli/auth/spnego_parse.c:55 contains 31 bytes in 2 blocks
- iconv(CP850,UTF8) contains 42 bytes in 2 blocks
- iconv(UTF8,UTF-16LE) contains 45 bytes in 2 blocks
- iconv(UTF-16LE,UTF8) contains 45 bytes in 2 blocks
-
-
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-void talloc_enable_leak_report_full(void);
-
-This enables calling of talloc_report_full(NULL, stderr) when the
-program exits. In Samba4 this is enabled by using the
---leak-report-full command line option.
-
-For it to be useful, this function must be called before any other
-talloc function as it establishes a "null context" that acts as the
-top of the tree. If you don't call this function first then passing
-NULL to talloc_report() or talloc_report_full() won't give you the
-full tree printout.
-
-Here is a typical full report:
-
-full talloc report on 'root' (total 18 bytes in 8 blocks)
- p1 contains 18 bytes in 7 blocks (ref 0)
- r1 contains 13 bytes in 2 blocks (ref 0)
- reference to: p2
- p2 contains 1 bytes in 1 blocks (ref 1)
- x3 contains 1 bytes in 1 blocks (ref 0)
- x2 contains 1 bytes in 1 blocks (ref 0)
- x1 contains 1 bytes in 1 blocks (ref 0)
-
-
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-void talloc_enable_null_tracking(void);
-
-This enables tracking of the NULL memory context without enabling leak
-reporting on exit. Useful for when you want to do your own leak
-reporting call via talloc_report_null_full();
-
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-void talloc_disable_null_tracking(void);
-
-This disables tracking of the NULL memory context.
-
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-(type *)talloc_zero(const void *ctx, type);
-
-The talloc_zero() macro is equivalent to::
-
- ptr = talloc(ctx, type);
- if (ptr) memset(ptr, 0, sizeof(type));
-
-
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-void *talloc_zero_size(const void *ctx, size_t size)
-
-The talloc_zero_size() function is useful when you don't have a known type
-
-
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-void *talloc_memdup(const void *ctx, const void *p, size_t size);
-
-The talloc_memdup() function is equivalent to::
-
- ptr = talloc_size(ctx, size);
- if (ptr) memcpy(ptr, p, size);
-
-
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-char *talloc_strdup(const void *ctx, const char *p);
-
-The talloc_strdup() function is equivalent to::
-
- ptr = talloc_size(ctx, strlen(p)+1);
- if (ptr) memcpy(ptr, p, strlen(p)+1);
-
-This functions sets the name of the new pointer to the passed
-string. This is equivalent to::
-
- talloc_set_name_const(ptr, ptr)
-
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-char *talloc_strndup(const void *t, const char *p, size_t n);
-
-The talloc_strndup() function is the talloc equivalent of the C
-library function strndup()
-
-This functions sets the name of the new pointer to the passed
-string. This is equivalent to:
- talloc_set_name_const(ptr, ptr)
-
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-char *talloc_append_string(const void *t, char *orig, const char *append);
-
-The talloc_append_string() function appends the given formatted
-string to the given string.
-
-This function sets the name of the new pointer to the new
-string. This is equivalent to::
-
- talloc_set_name_const(ptr, ptr)
-
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-char *talloc_vasprintf(const void *t, const char *fmt, va_list ap);
-
-The talloc_vasprintf() function is the talloc equivalent of the C
-library function vasprintf()
-
-This functions sets the name of the new pointer to the new
-string. This is equivalent to::
-
- talloc_set_name_const(ptr, ptr)
-
-
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-char *talloc_asprintf(const void *t, const char *fmt, ...);
-
-The talloc_asprintf() function is the talloc equivalent of the C
-library function asprintf()
-
-This functions sets the name of the new pointer to the new
-string. This is equivalent to::
-
- talloc_set_name_const(ptr, ptr)
-
-
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-char *talloc_asprintf_append(char *s, const char *fmt, ...);
-
-The talloc_asprintf_append() function appends the given formatted
-string to the given string.
-Use this varient when the string in the current talloc buffer may
-have been truncated in length.
-
-This functions sets the name of the new pointer to the new
-string. This is equivalent to::
-
- talloc_set_name_const(ptr, ptr)
-
-
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-char *talloc_asprintf_append_buffer(char *s, const char *fmt, ...);
-
-The talloc_asprintf_append() function appends the given formatted
-string to the end of the currently allocated talloc buffer.
-Use this varient when the string in the current talloc buffer has
-not been changed.
-
-This functions sets the name of the new pointer to the new
-string. This is equivalent to::
-
- talloc_set_name_const(ptr, ptr)
-
-
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-((type *)talloc_array(const void *ctx, type, uint_t count);
-
-The talloc_array() macro is equivalent to::
-
- (type *)talloc_size(ctx, sizeof(type) * count);
-
-except that it provides integer overflow protection for the multiply,
-returning NULL if the multiply overflows.
-
-
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-void *talloc_array_size(const void *ctx, size_t size, uint_t count);
-
-The talloc_array_size() function is useful when the type is not
-known. It operates in the same way as talloc_array(), but takes a size
-instead of a type.
-
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-(typeof(ptr)) talloc_array_ptrtype(const void *ctx, ptr, uint_t count);
-
-The talloc_ptrtype() macro should be used when you have a pointer to an array
-and want to allocate memory of an array to point at with this pointer. When compiling
-with gcc >= 3 it is typesafe. Note this is a wrapper of talloc_array_size()
-and talloc_get_name() will return the current location in the source file.
-and not the type.
-
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-void *talloc_realloc_fn(const void *ctx, void *ptr, size_t size);
-
-This is a non-macro version of talloc_realloc(), which is useful
-as libraries sometimes want a ralloc function pointer. A realloc()
-implementation encapsulates the functionality of malloc(), free() and
-realloc() in one call, which is why it is useful to be able to pass
-around a single function pointer.
-
-
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-void *talloc_autofree_context(void);
-
-This is a handy utility function that returns a talloc context
-which will be automatically freed on program exit. This can be used
-to reduce the noise in memory leak reports.
-
-
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-void *talloc_check_name(const void *ptr, const char *name);
-
-This function checks if a pointer has the specified name. If it does
-then the pointer is returned. It it doesn't then NULL is returned.
-
-
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-(type *)talloc_get_type(const void *ptr, type);
-
-This macro allows you to do type checking on talloc pointers. It is
-particularly useful for void* private pointers. It is equivalent to
-this::
-
- (type *)talloc_check_name(ptr, #type)
-
-
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-talloc_set_type(const void *ptr, type);
-
-This macro allows you to force the name of a pointer to be a
-particular type. This can be used in conjunction with
-talloc_get_type() to do type checking on void* pointers.
-
-It is equivalent to this::
-
- talloc_set_name_const(ptr, #type)
-
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-talloc_get_size(const void *ctx);
-
-This function lets you know the amount of memory alloced so far by
-this context. It does NOT account for subcontext memory.
-This can be used to calculate the size of an array.
-
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-void *talloc_find_parent_byname(const void *ctx, const char *name);
-
-Find a parent memory context of the current context that has the given
-name. This can be very useful in complex programs where it may be
-difficult to pass all information down to the level you need, but you
-know the structure you want is a parent of another context.
-
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-(type *)talloc_find_parent_bytype(ctx, type);
-
-Like talloc_find_parent_byname() but takes a type, making it typesafe.
-
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-void talloc_set_log_fn(void (*log_fn)(const char *message));
-
-This function sets a logging function that talloc will use for
-warnings and errors. By default talloc will not print any warnings or
-errors.
-
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-void talloc_set_log_stderr(void)
-
-This sets the talloc log function to write log messages to stderr